[ossim] 02/23: Imported Upstream version 1.8.20.2+ds

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Wed Dec 16 17:28:14 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository ossim.

commit d242a4491ca8b4f29295ae34770259a12371e1ec
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Wed Dec 16 14:20:44 2015 +0100

    Imported Upstream version 1.8.20.2+ds
---
 .cvsignore                                         |     8 -
 CMakeLists.txt                                     |   238 -
 COPYING.GPL                                        |    90 -
 COPYING.LGPL                                       |   141 -
 Doxyfile                                           |  1552 ---
 Doxyfile.in                                        |  1120 --
 LGPL.txt                                           |   141 -
 LICENSE.txt                                        |    43 -
 Makefile.common.in                                 |   218 -
 aclocal.m4                                         |   781 --
 bin/.cvsignore                                     |     2 -
 config.guess                                       |  1317 ---
 config.sub                                         |  1411 ---
 configure                                          | 10862 ------------------
 configure.ac                                       |   786 --
 doc/.cvsignore                                     |     2 -
 doc/ossim.spec                                     |    78 -
 etc/config_files/dbossim.cfg                       |     7 -
 etc/linux/ld.so.conf.d/ossim.conf                  |     9 -
 etc/linux/profile.d/ossim.csh                      |    14 -
 etc/linux/profile.d/ossim.sh                       |    13 -
 etc/mac/Info.plist.in                              |    36 -
 etc/mac/wxmac.icns                                 |   Bin 36901 -> 0 bytes
 etc/templates/orthoigen3.kwl                       |    32 -
 etc/templates/ossim-dem-color-table-template.kwl   |    85 -
 etc/templates/ossim_preferences_template           |   467 -
 etc/templates/utm_projection_template.geom         |    27 -
 header.gpl                                         |    24 -
 header.lgpl                                        |    24 -
 include/ossim/.cvsignore                           |     2 -
 include/ossim/base/ossim2dLinearRegression.h       |    75 -
 include/ossim/base/ossim2dTo2dIdentityTransform.h  |    68 -
 include/ossim/base/ossim2dTo2dShiftTransform.h     |   126 -
 include/ossim/base/ossim2dTo2dTransform.h          |    64 -
 include/ossim/base/ossim2dTo2dTransformFactory.h   |    44 -
 .../ossim/base/ossim2dTo2dTransformFactoryBase.h   |    49 -
 include/ossim/base/ossim2dTo2dTransformRegistry.h  |    84 -
 .../ossim/base/ossimAdjustableParameterInterface.h |   124 -
 include/ossim/base/ossimAdjustmentExecutive.h      |   180 -
 include/ossim/base/ossimAdjustmentInfo.h           |    50 -
 include/ossim/base/ossimArgumentParser.h           |   200 -
 include/ossim/base/ossimBaseObjectFactory.h        |    35 -
 include/ossim/base/ossimCallback1.h                |    81 -
 include/ossim/base/ossimCallback1wRet.h            |    81 -
 include/ossim/base/ossimCallback2wRet.h            |    82 -
 include/ossim/base/ossimCommon.h                   |   624 -
 .../ossim/base/ossimConnectableDisplayListener.h   |   109 -
 include/ossim/base/ossimConnectionEvent.h          |    79 -
 include/ossim/base/ossimConstants.h                |   556 -
 include/ossim/base/ossimContainerEvent.h           |    45 -
 include/ossim/base/ossimDataObject.h               |   128 -
 include/ossim/base/ossimDate.h                     |   272 -
 include/ossim/base/ossimDateProperty.h             |    37 -
 include/ossim/base/ossimDatumFactory.h             |    69 -
 include/ossim/base/ossimDatumFactoryRegistry.h     |    75 -
 include/ossim/base/ossimDirectory.h                |   105 -
 include/ossim/base/ossimDisplayInterface.h         |    40 -
 include/ossim/base/ossimDpt3d.h                    |   144 -
 include/ossim/base/ossimDrect.h                    |   859 --
 include/ossim/base/ossimDuration.h                 |   166 -
 .../base/ossimElevationManagerEventListener.h      |    18 -
 include/ossim/base/ossimEllipsoidFactory.h         |    53 -
 include/ossim/base/ossimEndian.h                   |   288 -
 include/ossim/base/ossimEpsgDatumFactory.h         |    70 -
 include/ossim/base/ossimFactoryListInterface.h     |   265 -
 include/ossim/base/ossimFilename.h                 |   264 -
 include/ossim/base/ossimFontInformation.h          |   100 -
 include/ossim/base/ossimGeoPolygon.h               |   158 -
 include/ossim/base/ossimGeoTiffDatumLut.h          |    74 -
 include/ossim/base/ossimGeocent.h                  |   162 -
 include/ossim/base/ossimGeoid.h                    |    66 -
 include/ossim/base/ossimGeoidEgm96.h               |    66 -
 include/ossim/base/ossimGeoidManager.h             |    87 -
 include/ossim/base/ossimGeoidNgs.h                 |    64 -
 include/ossim/base/ossimGeoidNgsHeader.h           |    84 -
 include/ossim/base/ossimGpt.h                      |   350 -
 include/ossim/base/ossimGrect.h                    |   331 -
 include/ossim/base/ossimHexString.h                |   142 -
 include/ossim/base/ossimHistogramSource.h          |    57 -
 include/ossim/base/ossimIoStream.h                 |   176 -
 include/ossim/base/ossimKeywordNames.h             |   206 -
 include/ossim/base/ossimKeywordlist.h              |   511 -
 include/ossim/base/ossimLine.h                     |    81 -
 include/ossim/base/ossimListener.h                 |    51 -
 include/ossim/base/ossimLookUpTable.h              |   116 -
 include/ossim/base/ossimNBandLutDataObject.h       |   489 -
 include/ossim/base/ossimNadconGridDatum.h          |    46 -
 include/ossim/base/ossimNadconGridFile.h           |    54 -
 include/ossim/base/ossimNadconGridHeader.h         |    89 -
 include/ossim/base/ossimNadconNarDatum.h           |    21 -
 include/ossim/base/ossimNadconNasDatum.h           |    19 -
 include/ossim/base/ossimNormRgbVector.h            |   109 -
 include/ossim/base/ossimNotify.h                   |   107 -
 include/ossim/base/ossimObjectFactoryRegistry.h    |    74 -
 include/ossim/base/ossimPointHash.h                |    28 -
 include/ossim/base/ossimPolyArea2d.h               |   332 -
 include/ossim/base/ossimPolygon.h                  |   246 -
 include/ossim/base/ossimPolynom.h                  |   872 --
 include/ossim/base/ossimProcessInterface.h         |    86 -
 include/ossim/base/ossimProcessListener.h          |    29 -
 include/ossim/base/ossimProcessProgressEvent.h     |    51 -
 include/ossim/base/ossimPropertyInterface.h        |    41 -
 include/ossim/base/ossimRectanglePartitioner.h     |   147 -
 include/ossim/base/ossimRectilinearDataObject.h    |   150 -
 include/ossim/base/ossimRefPtr.h                   |    87 -
 include/ossim/base/ossimReferenced.h               |   107 -
 include/ossim/base/ossimRegExp.h                   |   227 -
 include/ossim/base/ossimRgbVector.h                |   109 -
 include/ossim/base/ossimRtti.h                     |   506 -
 include/ossim/base/ossimStdOutProgress.h           |    35 -
 include/ossim/base/ossimStreamFactory.h            |    37 -
 include/ossim/base/ossimStreamFactoryBase.h        |    35 -
 include/ossim/base/ossimStreamFactoryRegistry.h    |    40 -
 include/ossim/base/ossimString.h                   |   935 --
 include/ossim/base/ossimStringProperty.h           |    73 -
 include/ossim/base/ossimTempFilename.h             |    42 -
 include/ossim/base/ossimTileHash.h                 |    46 -
 include/ossim/base/ossimTiledImageHash.h           |    40 -
 include/ossim/base/ossimTraceManager.h             |    69 -
 include/ossim/base/ossimUnitConversionTool.h       |    80 -
 include/ossim/base/ossimUnitTypeLut.h              |    57 -
 include/ossim/base/ossimVisitor.h                  |   204 -
 include/ossim/base/ossimVrect.h                    |   167 -
 include/ossim/base/ossimXmlString.h                |    67 -
 .../ossim/elevation/ossimDtedElevationDatabase.h   |    74 -
 include/ossim/elevation/ossimDtedFactory.h         |    38 -
 include/ossim/elevation/ossimDtedHandler.h         |   235 -
 include/ossim/elevation/ossimElevCellHandler.h     |   110 -
 include/ossim/elevation/ossimElevManager.h         |   148 -
 include/ossim/elevation/ossimElevSource.h          |   181 -
 include/ossim/elevation/ossimElevSourceFactory.h   |    74 -
 include/ossim/elevation/ossimElevationDatabase.h   |   231 -
 .../elevation/ossimElevationDatabaseFactoryBase.h  |    32 -
 .../elevation/ossimGeneralRasterElevHandler.h      |   169 -
 .../ossimGeneralRasterElevationDatabase.h          |    79 -
 .../ossim/elevation/ossimImageElevationDatabase.h  |   208 -
 .../ossim/elevation/ossimImageElevationHandler.h   |   129 -
 .../ossim/elevation/ossimSrtmElevationDatabase.h   |    78 -
 include/ossim/elevation/ossimSrtmFactory.h         |    57 -
 include/ossim/elevation/ossimSrtmHandler.h         |   105 -
 .../ossim/elevation/ossimTiledElevationDatabase.h  |   213 -
 include/ossim/font/ossimFontFactoryBase.h          |    41 -
 include/ossim/imaging/ossim3x3ConvolutionFilter.h  |    97 -
 include/ossim/imaging/ossimAOD.h                   |    66 -
 include/ossim/imaging/ossimAdrgTileSource.h        |   196 -
 .../imaging/ossimAnnotationMultiEllipseObject.h    |    66 -
 include/ossim/imaging/ossimAnnotationObject.h      |   105 -
 include/ossim/imaging/ossimAppFixedTileCache.h     |   117 -
 include/ossim/imaging/ossimAppTileCache.h          |   170 -
 include/ossim/imaging/ossimAtCorrRemapper.h        |    88 -
 include/ossim/imaging/ossimBandAverageFilter.h     |   110 -
 include/ossim/imaging/ossimBandClipFilter.h        |    92 -
 include/ossim/imaging/ossimBandMergeSource.h       |    62 -
 include/ossim/imaging/ossimBandSelector.h          |   158 -
 include/ossim/imaging/ossimBandSeparateHandler.h   |    97 -
 include/ossim/imaging/ossimBitMaskTileSource.h     |   133 -
 include/ossim/imaging/ossimBitMaskWriter.h         |   133 -
 include/ossim/imaging/ossimBlendMosaic.h           |    78 -
 include/ossim/imaging/ossimBrightnessMatch.h       |    57 -
 include/ossim/imaging/ossimBumpShadeTileSource.h   |   281 -
 include/ossim/imaging/ossimCastTileSourceFilter.h  |    93 -
 include/ossim/imaging/ossimCcfTileSource.h         |   232 -
 .../ossim/imaging/ossimClosestToCenterCombiner.h   |    60 -
 include/ossim/imaging/ossimColorNormalizedFusion.h |    32 -
 include/ossim/imaging/ossimConvolutionFilter1D.h   |   124 -
 include/ossim/imaging/ossimConvolutionSource.h     |    72 -
 include/ossim/imaging/ossimDespeckleFilter.h       |    48 -
 include/ossim/imaging/ossimDoqqTileSource.h        |    58 -
 include/ossim/imaging/ossimDtedTileSource.h        |   259 -
 include/ossim/imaging/ossimERSTileSource.h         |    56 -
 include/ossim/imaging/ossimEdgeFilter.h            |    83 -
 include/ossim/imaging/ossimElevImageSource.h       |   146 -
 include/ossim/imaging/ossimEnviHeaderFileWriter.h  |    78 -
 include/ossim/imaging/ossimEnviTileSource.h        |   101 -
 include/ossim/imaging/ossimEquationCombiner.h      |   313 -
 include/ossim/imaging/ossimFeatherMosaic.h         |    87 -
 include/ossim/imaging/ossimFftFilter.h             |    86 -
 include/ossim/imaging/ossimFgdcFileWriter.h        |   157 -
 include/ossim/imaging/ossimFilter.h                |   486 -
 include/ossim/imaging/ossimFilterResampler.h       |   150 -
 include/ossim/imaging/ossimFilterTable.h           |    97 -
 include/ossim/imaging/ossimFixedTileCache.h        |   146 -
 include/ossim/imaging/ossimFusionCombiner.h        |    47 -
 include/ossim/imaging/ossimGammaRemapper.h         |    71 -
 include/ossim/imaging/ossimGeneralRasterInfo.h     |   431 -
 .../ossim/imaging/ossimGeneralRasterTileSource.h   |   212 -
 include/ossim/imaging/ossimGeoAnnotationBitmap.h   |    54 -
 .../imaging/ossimGeoAnnotationMultiEllipseObject.h |    69 -
 include/ossim/imaging/ossimGeoPolyCutter.h         |   233 -
 include/ossim/imaging/ossimGeomFileWriter.h        |    57 -
 include/ossim/imaging/ossimGridRemapEngine.h       |    70 -
 .../ossim/imaging/ossimGridRemapEngineFactory.h    |    37 -
 include/ossim/imaging/ossimGridRemapSource.h       |   144 -
 include/ossim/imaging/ossimHistoMatchRemapper.h    |    96 -
 include/ossim/imaging/ossimHistogramEqualization.h |    99 -
 include/ossim/imaging/ossimHistogramRemapper.h     |   571 -
 .../ossim/imaging/ossimHistogramThreshholdFilter.h |    51 -
 include/ossim/imaging/ossimHsiRemapper.h           |   256 -
 include/ossim/imaging/ossimHsiToRgbSource.h        |    49 -
 include/ossim/imaging/ossimHsvGridRemapEngine.h    |    54 -
 include/ossim/imaging/ossimHsvToRgbSource.h        |    42 -
 include/ossim/imaging/ossimImageChain.h            |   416 -
 include/ossim/imaging/ossimImageCombiner.h         |   135 -
 include/ossim/imaging/ossimImageData.h             |  1236 --
 include/ossim/imaging/ossimImageDataFactory.h      |    63 -
 include/ossim/imaging/ossimImageDataHelper.h       |   101 -
 include/ossim/imaging/ossimImageGaussianFilter.h   |    80 -
 include/ossim/imaging/ossimImageGeometry.h         |   443 -
 include/ossim/imaging/ossimImageGeometryFactory.h  |    53 -
 .../ossim/imaging/ossimImageGeometryFactoryBase.h  |    44 -
 include/ossim/imaging/ossimImageGeometryRegistry.h |    74 -
 include/ossim/imaging/ossimImageHandler.h          |   778 --
 .../ossim/imaging/ossimImageHandlerFactoryBase.h   |    90 -
 include/ossim/imaging/ossimImageHandlerRegistry.h  |   137 -
 include/ossim/imaging/ossimImageHistogramSource.h  |   105 -
 include/ossim/imaging/ossimImageMetaData.h         |   138 -
 .../imaging/ossimImageMetaDataWriterFactory.h      |    87 -
 .../imaging/ossimImageMetaDataWriterFactoryBase.h  |    67 -
 .../imaging/ossimImageMetaDataWriterRegistry.h     |    98 -
 include/ossim/imaging/ossimImageModel.h            |   189 -
 include/ossim/imaging/ossimImageMosaic.h           |    73 -
 include/ossim/imaging/ossimImageRenderer.h         |   460 -
 include/ossim/imaging/ossimImageSharpenFilter.h    |    83 -
 include/ossim/imaging/ossimImageSource.h           |   246 -
 include/ossim/imaging/ossimImageSourceFilter.h     |    66 -
 include/ossim/imaging/ossimImageSourceSequencer.h  |   168 -
 .../ossim/imaging/ossimImageToPlaneNormalFilter.h  |    74 -
 include/ossim/imaging/ossimImageWriterFactory.h    |    63 -
 .../imaging/ossimImageWriterFactoryRegistry.h      |    89 -
 include/ossim/imaging/ossimIndexToRgbLutFilter.h   |   205 -
 .../ossim/imaging/ossimIntensityAdjustmentFilter.h |    74 -
 include/ossim/imaging/ossimJpegDefaultTable.h      |   162 -
 include/ossim/imaging/ossimJpegMemDest.h           |    36 -
 include/ossim/imaging/ossimJpegMemSrc.h            |    43 -
 include/ossim/imaging/ossimJpegTileSource.h        |   215 -
 include/ossim/imaging/ossimJpegYCbCrToRgbSource.h  |    37 -
 include/ossim/imaging/ossimMapCompositionSource.h  |   336 -
 include/ossim/imaging/ossimMaskFilter.h            |   266 -
 include/ossim/imaging/ossimMaxMosaic.h             |    78 -
 include/ossim/imaging/ossimMeanMedianFilter.h      |   129 -
 include/ossim/imaging/ossimMemoryImageSource.h     |    96 -
 include/ossim/imaging/ossimMetadataFileWriter.h    |   176 -
 include/ossim/imaging/ossimMonoGridRemapEngine.h   |    54 -
 include/ossim/imaging/ossimNBandToIndexFilter.h    |   129 -
 include/ossim/imaging/ossimNitf20Writer.h          |   135 -
 include/ossim/imaging/ossimNitfTileSource.h        |   532 -
 include/ossim/imaging/ossimNitfTileSource_12.h     |    41 -
 include/ossim/imaging/ossimNitfWriter.h            |   137 -
 include/ossim/imaging/ossimNitfWriterBase.h        |   183 -
 include/ossim/imaging/ossimNormalizedRemapTable.h  |    84 -
 .../ossim/imaging/ossimNormalizedS16RemapTable.h   |   146 -
 .../ossim/imaging/ossimNormalizedU11RemapTable.h   |   117 -
 .../ossim/imaging/ossimNormalizedU16RemapTable.h   |   116 -
 .../ossim/imaging/ossimNormalizedU8RemapTable.h    |   116 -
 include/ossim/imaging/ossimOrthoImageMosaic.h      |    61 -
 include/ossim/imaging/ossimOverviewBuilderBase.h   |   240 -
 include/ossim/imaging/ossimPixelFlipper.h          |   272 -
 include/ossim/imaging/ossimPolyCutter.h            |   108 -
 include/ossim/imaging/ossimQbTileFilesHandler.h    |    44 -
 .../ossim/imaging/ossimQuickbirdNitfTileSource.h   |    30 -
 .../ossim/imaging/ossimQuickbirdTiffTileSource.h   |    36 -
 include/ossim/imaging/ossimRLevelFilter.h          |    99 -
 include/ossim/imaging/ossimReadmeFileWriter.h      |    57 -
 include/ossim/imaging/ossimRectangleCutFilter.h    |    57 -
 include/ossim/imaging/ossimRgbGridRemapEngine.h    |    54 -
 include/ossim/imaging/ossimRgbToGreyFilter.h       |    70 -
 include/ossim/imaging/ossimRgbToHsiSource.h        |    47 -
 include/ossim/imaging/ossimRgbToHsvSource.h        |    47 -
 include/ossim/imaging/ossimRgbToIndexFilter.h      |    96 -
 include/ossim/imaging/ossimRgbToJpegYCbCrSource.h  |    32 -
 include/ossim/imaging/ossimS16ImageData.h          |   184 -
 include/ossim/imaging/ossimSFIMFusion.h            |    86 -
 include/ossim/imaging/ossimScaleFilter.h           |   184 -
 include/ossim/imaging/ossimSingleImageChain.h      |   470 -
 include/ossim/imaging/ossimSrtmTileSource.h        |    74 -
 include/ossim/imaging/ossimSubImageTileSource.h    |    90 -
 include/ossim/imaging/ossimTableRemapper.h         |   141 -
 include/ossim/imaging/ossimTiffOverviewBuilder.h   |   303 -
 include/ossim/imaging/ossimTiffTileSource.h        |   364 -
 include/ossim/imaging/ossimTileCache.h             |   105 -
 include/ossim/imaging/ossimTilePatch.h             |   136 -
 include/ossim/imaging/ossimTiledImageHandler.h     |   160 -
 include/ossim/imaging/ossimTiling.h                |   200 -
 include/ossim/imaging/ossimTilingPoly.h            |    96 -
 include/ossim/imaging/ossimTilingRect.h            |    67 -
 .../imaging/ossimTopographicCorrectionFilter.h     |   224 -
 include/ossim/imaging/ossimTrimFilter.h            |    71 -
 include/ossim/imaging/ossimTwoColorView.h          |   105 -
 include/ossim/imaging/ossimU11ImageData.h          |   188 -
 include/ossim/imaging/ossimU16ImageData.h          |   192 -
 include/ossim/imaging/ossimU8ImageData.h           |   175 -
 include/ossim/imaging/ossimUsgsDemTileSource.h     |   194 -
 .../imaging/ossimValueAssignImageSourceFilter.h    |   102 -
 .../ossim/imaging/ossimVpfAnnotationCoverageInfo.h |    77 -
 .../ossim/imaging/ossimVpfAnnotationFeatureInfo.h  |   229 -
 include/ossim/imaging/ossimVpfTileSource.h         |   164 -
 include/ossim/imaging/ossimWatermarkFilter.h       |   347 -
 include/ossim/kbool/_dl_itr.h                      |   407 -
 include/ossim/kbool/_dl_itr.inc                    |  2448 ----
 include/ossim/kbool/_lnk_itr.h                     |   163 -
 include/ossim/kbool/_lnk_itr.inc                   |   269 -
 include/ossim/kbool/bool_globals.h                 |   143 -
 include/ossim/kbool/booleng.h                      |   406 -
 include/ossim/kbool/graph.h                        |   211 -
 include/ossim/kbool/graphlst.h                     |    70 -
 include/ossim/kbool/line.h                         |   111 -
 include/ossim/kbool/link.h                         |   234 -
 include/ossim/kbool/lpoint.h                       |    64 -
 include/ossim/kbool/node.h                         |    88 -
 include/ossim/kbool/record.h                       |    82 -
 include/ossim/kbool/scanbeam.h                     |    62 -
 include/ossim/kbool/valuesvc.h                     |     9 -
 include/ossim/matrix/newmat.h                      |  1805 ---
 include/ossim/matrix/newmatap.h                    |   201 -
 include/ossim/matrix/newmatrc.h                    |   171 -
 include/ossim/parallel/ossimIgen.h                 |    71 -
 include/ossim/parallel/ossimImageChainMtAdaptor.h  |   122 -
 .../ossimImageMpiMWriterSequenceConnection.h       |    60 -
 .../ossimImageMpiSWriterSequenceConnection.h       |    53 -
 include/ossim/parallel/ossimOrthoIgen.h            |   249 -
 include/ossim/plugin/ossimDynamicLibrary.h         |    63 -
 include/ossim/projection/ossimAdjMapModel.h        |   137 -
 include/ossim/projection/ossimApplanixEcefModel.h  |   102 -
 include/ossim/projection/ossimApplanixUtmModel.h   |    83 -
 include/ossim/projection/ossimBuckeyeSensor.h      |   134 -
 include/ossim/projection/ossimCadrgProjection.h    |    90 -
 include/ossim/projection/ossimCoarseGridModel.h    |   178 -
 .../ossim/projection/ossimEpsgProjectionDatabase.h |   132 -
 .../ossim/projection/ossimEpsgProjectionFactory.h  |    77 -
 .../ossim/projection/ossimEquDistCylProjection.h   |   217 -
 include/ossim/projection/ossimIkonosRpcModel.h     |    76 -
 .../ossim/projection/ossimImageProjectionModel.h   |    61 -
 .../projection/ossimImageViewAffineTransform.h     |   167 -
 include/ossim/projection/ossimLensDistortion.h     |    52 -
 include/ossim/projection/ossimMapProjection.h      |   367 -
 .../ossim/projection/ossimMapProjectionFactory.h   |    66 -
 include/ossim/projection/ossimMapProjectionInfo.h  |   276 -
 .../projection/ossimMeanRadialLensDistortion.h     |   119 -
 include/ossim/projection/ossimNitfRpcModel.h       |   115 -
 include/ossim/projection/ossimProjection.h         |   146 -
 .../projection/ossimProjectionFactoryRegistry.h    |    82 -
 include/ossim/projection/ossimQuickbirdRpcModel.h  |    85 -
 .../projection/ossimRadialDecentLensDistortion.h   |   159 -
 include/ossim/projection/ossimRpcProjection.h      |   238 -
 include/ossim/projection/ossimRpcSolver.h          |   243 -
 include/ossim/projection/ossimSensorModel.h        |   378 -
 include/ossim/projection/ossimSensorModelFactory.h |    64 -
 .../projection/ossimStatePlaneProjectionInfo.h     |   105 -
 .../ossim/projection/ossimTiffProjectionFactory.h  |    67 -
 include/ossim/projection/ossimUpspt.h              |    42 -
 include/ossim/projection/ossimUtm.h                |   178 -
 include/ossim/projection/ossimUtmpt.h              |    89 -
 .../ossim/projection/ossimWktProjectionFactory.h   |    71 -
 include/ossim/support_data/ossimApplanixEOFile.h   |   211 -
 include/ossim/support_data/ossimAuxFileHandler.h   |   230 -
 include/ossim/support_data/ossimCcfInfo.h          |    60 -
 include/ossim/support_data/ossimDemHeader.h        |   383 -
 include/ossim/support_data/ossimDemInfo.h          |    58 -
 include/ossim/support_data/ossimDemProfile.h       |    96 -
 include/ossim/support_data/ossimDemStats.h         |    88 -
 include/ossim/support_data/ossimDemUtil.h          |    82 -
 include/ossim/support_data/ossimDoqq.h             |   126 -
 include/ossim/support_data/ossimDtedAcc.h          |   134 -
 include/ossim/support_data/ossimDtedDsi.h          |   237 -
 include/ossim/support_data/ossimDtedHdr.h          |   127 -
 include/ossim/support_data/ossimDtedInfo.h         |    77 -
 include/ossim/support_data/ossimDtedRecord.h       |   164 -
 include/ossim/support_data/ossimDtedUhl.h          |   130 -
 include/ossim/support_data/ossimDtedVol.h          |   109 -
 include/ossim/support_data/ossimEnviHeader.h       |   415 -
 include/ossim/support_data/ossimEnviInfo.h         |    54 -
 include/ossim/support_data/ossimFgdcTxtDoc.h       |   129 -
 include/ossim/support_data/ossimFgdcXmlDoc.h       |   188 -
 include/ossim/support_data/ossimIkonosMetaData.h   |   120 -
 include/ossim/support_data/ossimInfoBase.h         |    83 -
 include/ossim/support_data/ossimInfoFactory.h      |    59 -
 .../ossim/support_data/ossimInfoFactoryInterface.h |    80 -
 include/ossim/support_data/ossimJ2kCodRecord.h     |    75 -
 include/ossim/support_data/ossimJ2kInfo.h          |   124 -
 include/ossim/support_data/ossimJ2kSizRecord.h     |   130 -
 include/ossim/support_data/ossimJ2kSotRecord.h     |    84 -
 include/ossim/support_data/ossimJp2Info.h          |    63 -
 include/ossim/support_data/ossimJpipMessage.h      |    36 -
 include/ossim/support_data/ossimLasHdr.h           |   176 -
 include/ossim/support_data/ossimLasInfo.h          |    57 -
 include/ossim/support_data/ossimNitfAcftbTag.h     |   403 -
 include/ossim/support_data/ossimNitfAimidbTag.h    |   278 -
 include/ossim/support_data/ossimNitfBlockaTag.h    |   334 -
 include/ossim/support_data/ossimNitfCommon.h       |   182 -
 .../support_data/ossimNitfCompressionHeader.h      |    36 -
 include/ossim/support_data/ossimNitfCscrnaTag.h    |   184 -
 include/ossim/support_data/ossimNitfCsdidaTag.h    |   209 -
 include/ossim/support_data/ossimNitfCsexraTag.h    |   477 -
 .../support_data/ossimNitfDataExtensionSegment.h   |    34 -
 .../ossimNitfDataExtensionSegmentV2_0.h            |    72 -
 .../ossim/support_data/ossimNitfEmbeddedRpfDes.h   |    43 -
 include/ossim/support_data/ossimNitfEngrdaTag.h    |   148 -
 include/ossim/support_data/ossimNitfFile.h         |    92 -
 include/ossim/support_data/ossimNitfFileHeader.h   |   203 -
 .../ossim/support_data/ossimNitfFileHeaderV2_0.h   |   605 -
 .../ossim/support_data/ossimNitfFileHeaderV2_1.h   |   616 -
 .../ossim/support_data/ossimNitfFileHeaderV2_X.h   |   254 -
 .../support_data/ossimNitfGeoPositioningTag.h      |   229 -
 include/ossim/support_data/ossimNitfImageBand.h    |    47 -
 .../ossim/support_data/ossimNitfImageBandV2_0.h    |   112 -
 .../ossim/support_data/ossimNitfImageBandV2_1.h    |    27 -
 include/ossim/support_data/ossimNitfImageHeader.h  |   180 -
 .../ossim/support_data/ossimNitfImageHeaderV2_0.h  |   164 -
 .../ossim/support_data/ossimNitfImageHeaderV2_1.h  |   395 -
 include/ossim/support_data/ossimNitfInfo.h         |    59 -
 include/ossim/support_data/ossimNitfJ2klraTag.h    |   176 -
 .../support_data/ossimNitfLocalGeographicTag.h     |    81 -
 include/ossim/support_data/ossimNitfMstgtaTag.h    |   217 -
 .../support_data/ossimNitfNameConversionTables.h   |    29 -
 include/ossim/support_data/ossimNitfPiaimcTag.h    |   427 -
 .../support_data/ossimNitfProjectionParameterTag.h |   332 -
 .../ossim/support_data/ossimNitfRegisteredTag.h    |   124 -
 .../support_data/ossimNitfRegisteredTagFactory.h   |    29 -
 include/ossim/support_data/ossimNitfRpcATag.h      |    35 -
 include/ossim/support_data/ossimNitfRpcBTag.h      |    30 -
 include/ossim/support_data/ossimNitfRpcBase.h      |   543 -
 .../ossim/support_data/ossimNitfRpfTagFactory.h    |    39 -
 include/ossim/support_data/ossimNitfSensraTag.h    |   268 -
 include/ossim/support_data/ossimNitfStdidcTag.h    |   203 -
 .../support_data/ossimNitfTagFactoryRegistry.h     |    51 -
 .../ossim/support_data/ossimNitfTagInformation.h   |    86 -
 include/ossim/support_data/ossimNitfUnknownTag.h   |    83 -
 include/ossim/support_data/ossimNitfUse00aTag.h    |   282 -
 .../support_data/ossimNitfVqCompressionHeader.h    |    79 -
 include/ossim/support_data/ossimNmeaMessage.h      |    86 -
 .../ossim/support_data/ossimQuickbirdMetaData.h    |   129 -
 include/ossim/support_data/ossimRpfAttributes.h    |   370 -
 .../ossim/support_data/ossimRpfCoverageSection.h   |   162 -
 include/ossim/support_data/ossimRpfFrame.h         |   207 -
 include/ossim/support_data/ossimRpfFrameEntry.h    |    61 -
 include/ossim/support_data/ossimRpfHeader.h        |   181 -
 .../ossimRpfImageDescriptionSubheader.h            |   127 -
 include/ossim/support_data/ossimRpfInfo.h          |    62 -
 .../ossim/support_data/ossimRpfLocationSection.h   |   167 -
 include/ossim/support_data/ossimRpfToc.h           |   229 -
 include/ossim/support_data/ossimRpfTocEntry.h      |   113 -
 include/ossim/support_data/ossimSrtmSupportData.h  |   203 -
 include/ossim/support_data/ossimSupportFilesList.h |    44 -
 include/ossim/support_data/ossimTiffInfo.h         |   771 --
 include/ossim/support_data/ossimTiffWorld.h        |    80 -
 include/ossim/support_data/ossimWavelength.h       |   106 -
 include/ossim/support_data/ossimXmpInfo.h          |   120 -
 include/ossim/util/ossimBatchTest.h                |   150 -
 include/ossim/util/ossimChipperUtil.h              |   569 -
 include/ossim/util/ossimFileWalker.h               |   227 -
 include/ossim/util/ossimImageUtil.h                |   399 -
 include/ossim/util/ossimInfo.h                     |   563 -
 include/ossim/util/ossimRpfUtil.h                  |    85 -
 .../vec/ossimVpfDatabaseHeaderTableValidator.h     |    17 -
 include/ossim/vec/ossimVpfTableValidator.h         |    18 -
 include/ossim/vec/vpf.h                            |    35 -
 include/ossim/vpfutil/values.h                     |    92 -
 install-sh                                         |   251 -
 lib/.cvsignore                                     |     2 -
 ltmain.sh                                          |  6401 -----------
 makefile.vc                                        |    38 -
 makefiles/cygwin/makelib                           |   248 -
 makefiles/cygwin/makelibcore                       |   162 -
 makefiles/cygwin/makeprog                          |    71 -
 makefiles/cygwin/makeroot                          |   199 -
 makefiles/macosx/libtiff_config.site               |   174 -
 makefiles/macosx/makelib                           |   240 -
 makefiles/macosx/makelibcore                       |   185 -
 makefiles/macosx/makeprog                          |    67 -
 makefiles/macosx/makeroot                          |   167 -
 makefiles/mingw/makelib                            |   248 -
 makefiles/mingw/makelibcore                        |   165 -
 makefiles/mingw/makeprog                           |    71 -
 makefiles/mingw/makeroot                           |   196 -
 makefiles/solaris/makelib                          |   247 -
 makefiles/solaris/makelibcore                      |   193 -
 makefiles/solaris/makeprog                         |    67 -
 makefiles/solaris/makeroot                         |   195 -
 makefiles/unx/.cvsignore                           |     1 -
 makefiles/unx/makeapps.unx                         |    52 -
 makefiles/unx/makelib                              |   212 -
 makefiles/unx/makelibbase.unx                      |    11 -
 makefiles/unx/makelibcore                          |   158 -
 makefiles/unx/makelibelevation.unx                 |    11 -
 makefiles/unx/makelibfont.unx                      |    11 -
 makefiles/unx/makelibimaging.unx                   |    11 -
 makefiles/unx/makelibinit.unx                      |    11 -
 makefiles/unx/makelibkbool.unx                     |    11 -
 makefiles/unx/makelibmatrix.unx                    |    11 -
 makefiles/unx/makelibparallel.unx                  |    11 -
 makefiles/unx/makelibplugin.unx                    |    11 -
 makefiles/unx/makelibprojection.unx                |    11 -
 makefiles/unx/makelibsupportdata.unx               |    11 -
 makefiles/unx/makelibvec.unx                       |    11 -
 makefiles/unx/makelibvpfutil.unx                   |    11 -
 makefiles/unx/makelibwx.unx                        |    11 -
 makefiles/unx/makelibwxogl.unx                     |    11 -
 makefiles/unx/makeprog                             |    67 -
 makefiles/unx/makeroot                             |   199 -
 makefiles/unx/makeroot.unx                         |   142 -
 makefiles/unx/makesrc.unx                          |    51 -
 nmake.opt                                          |   212 -
 ospr.spec                                          |    51 -
 ossim.spec.in                                      |   131 -
 ossim/CMakeLists.txt                               |   277 +
 ossim/Doxyfile                                     |  1552 +++
 ossim/LICENSE.txt                                  |    23 +
 ossim/OSSIM_logo.png                               |   Bin 0 -> 112233 bytes
 README.txt => ossim/README.txt                     |     0
 ossim/doc/ossim.spec                               |    78 +
 ossim/etc/linux/profile.d/ossim.csh                |    18 +
 ossim/etc/linux/profile.d/ossim.sh                 |    19 +
 ossim/etc/templates/ossim_preferences_template     |   585 +
 {include => ossim/include}/ossim/base/datum.h      |     0
 .../include}/ossim/base/ossim2dBilinearTransform.h |     0
 ossim/include/ossim/base/ossim2dLinearRegression.h |    77 +
 .../ossim/base/ossim2dTo2dIdentityTransform.h      |    69 +
 .../ossim/base/ossim2dTo2dMatrixTransform.h        |   221 +
 .../include/ossim/base/ossim2dTo2dShiftTransform.h |   127 +
 ossim/include/ossim/base/ossim2dTo2dTransform.h    |    65 +
 .../ossim/base/ossim2dTo2dTransformFactory.h       |    45 +
 .../ossim/base/ossim2dTo2dTransformFactoryBase.h   |    50 +
 .../ossim/base/ossim2dTo2dTransformRegistry.h      |    85 +
 .../include}/ossim/base/ossimActiveEdgeTable.h     |     0
 .../ossim/base/ossimAdjSolutionAttributes.h        |     0
 .../ossim/base/ossimAdjustableParameterInfo.h      |     0
 .../ossim/base/ossimAdjustableParameterInterface.h |   157 +
 .../include/ossim/base/ossimAdjustmentExecutive.h  |   173 +
 ossim/include/ossim/base/ossimAdjustmentInfo.h     |    50 +
 .../include}/ossim/base/ossimAffineTransform.h     |     0
 .../include}/ossim/base/ossimApplicationUsage.h    |     0
 ossim/include/ossim/base/ossimArgumentParser.h     |   230 +
 {include => ossim/include}/ossim/base/ossimAxes.h  |     0
 ossim/include/ossim/base/ossimBaseObjectFactory.h  |    35 +
 .../include}/ossim/base/ossimBilSplitter.h         |     0
 ossim/include/ossim/base/ossimBinaryDataProperty.h |    37 +
 .../include}/ossim/base/ossimBooleanProperty.h     |     0
 .../include}/ossim/base/ossimByteStreamBuffer.h    |     0
 ossim/include/ossim/base/ossimCallback1.h          |    82 +
 ossim/include/ossim/base/ossimCallback1wRet.h      |    82 +
 ossim/include/ossim/base/ossimCallback2wRet.h      |    83 +
 .../include}/ossim/base/ossimCmyVector.h           |     0
 .../include}/ossim/base/ossimColorProperty.h       |     0
 .../include}/ossim/base/ossimColumnVector3d.h      |     0
 .../include}/ossim/base/ossimColumnVector4d.h      |     0
 ossim/include/ossim/base/ossimCommon.h             |   661 ++
 .../ossim/base/ossimConnectableContainer.h         |     0
 .../base/ossimConnectableContainerInterface.h      |     0
 .../ossim/base/ossimConnectableDisplayListener.h   |   110 +
 .../include}/ossim/base/ossimConnectableObject.h   |     0
 .../ossim/base/ossimConnectableObjectListener.h    |     0
 ossim/include/ossim/base/ossimConnectionEvent.h    |    80 +
 ossim/include/ossim/base/ossimConstants.h          |   545 +
 ossim/include/ossim/base/ossimContainerEvent.h     |    46 +
 .../include}/ossim/base/ossimContainerProperty.h   |     0
 .../include}/ossim/base/ossimCplUtil.h             |     0
 .../include}/ossim/base/ossimCsvFile.h             |     0
 .../include}/ossim/base/ossimCustomEditorWindow.h  |     0
 .../base/ossimCustomEditorWindowFactoryBase.h      |     0
 .../ossim/base/ossimCustomEditorWindowRegistry.h   |     0
 ossim/include/ossim/base/ossimDataObject.h         |   116 +
 ossim/include/ossim/base/ossimDate.h               |   280 +
 ossim/include/ossim/base/ossimDateProperty.h       |    37 +
 {include => ossim/include}/ossim/base/ossimDatum.h |     0
 ossim/include/ossim/base/ossimDatumFactory.h       |    66 +
 .../ossim/base/ossimDatumFactoryInterface.h        |     0
 .../include/ossim/base/ossimDatumFactoryRegistry.h |    75 +
 .../include}/ossim/base/ossimDblGrid.h             |     0
 ossim/include/ossim/base/ossimDirectory.h          |   106 +
 .../include}/ossim/base/ossimDirectoryData.h       |     0
 .../include}/ossim/base/ossimDirectoryTree.h       |     0
 .../ossim/base/ossimDisplayEventListener.h         |     0
 ossim/include/ossim/base/ossimDisplayInterface.h   |    41 +
 .../include}/ossim/base/ossimDisplayListEvent.h    |     0
 .../include}/ossim/base/ossimDisplayRefreshEvent.h |     0
 {include => ossim/include}/ossim/base/ossimDms.h   |     0
 .../include}/ossim/base/ossimDoubleGridProperty.h  |     0
 {include => ossim/include}/ossim/base/ossimDpt.h   |     0
 ossim/include/ossim/base/ossimDpt3d.h              |   149 +
 ossim/include/ossim/base/ossimDrect.h              |   860 ++
 ossim/include/ossim/base/ossimDuration.h           |   167 +
 .../include}/ossim/base/ossimEbcdicToAscii.h       |     0
 .../include}/ossim/base/ossimEcefPoint.h           |     0
 .../include}/ossim/base/ossimEcefRay.h             |     0
 .../include}/ossim/base/ossimEcefVector.h          |     0
 .../ossim/base/ossimElevationManagerEvent.h        |     0
 .../base/ossimElevationManagerEventListener.h      |    18 +
 .../include}/ossim/base/ossimEllipsoid.h           |     0
 ossim/include/ossim/base/ossimEllipsoidFactory.h   |    53 +
 ossim/include/ossim/base/ossimEndian.h             |   273 +
 .../include}/ossim/base/ossimEnvironmentUtility.h  |     0
 ossim/include/ossim/base/ossimEpsgDatumFactory.h   |    70 +
 .../include}/ossim/base/ossimEquTokenDefines.h     |     0
 .../include}/ossim/base/ossimEquTokenizer.h        |     0
 .../include}/ossim/base/ossimErrorCodes.h          |     0
 .../include}/ossim/base/ossimErrorContext.h        |     0
 .../ossim/base/ossimErrorStatusInterface.h         |     0
 {include => ossim/include}/ossim/base/ossimEvent.h |     0
 .../include}/ossim/base/ossimEventIds.h            |     0
 .../include}/ossim/base/ossimException.h           |     0
 .../include}/ossim/base/ossimFactoryBaseTemplate.h |     0
 .../include/ossim/base/ossimFactoryListInterface.h |   266 +
 .../ossim/base/ossimFileProcessorInterface.h       |    42 +
 ossim/include/ossim/base/ossimFilename.h           |   265 +
 .../include}/ossim/base/ossimFilenameProperty.h    |     0
 .../include}/ossim/base/ossimFlexLexer.h           |     0
 ossim/include/ossim/base/ossimFontInformation.h    |   100 +
 .../include}/ossim/base/ossimFontProperty.h        |     0
 {include => ossim/include}/ossim/base/ossimFpt.h   |     0
 {include => ossim/include}/ossim/base/ossimFpt3d.h |     0
 ossim/include/ossim/base/ossimGeoPolygon.h         |   137 +
 .../ossim/base/ossimGeoTiffCoordTransformsLut.h    |     0
 ossim/include/ossim/base/ossimGeoTiffDatumLut.h    |    75 +
 ossim/include/ossim/base/ossimGeocent.h            |   162 +
 .../include}/ossim/base/ossimGeodeticEvaluator.h   |     0
 ossim/include/ossim/base/ossimGeoid.h              |    66 +
 ossim/include/ossim/base/ossimGeoidEgm96.h         |    66 +
 ossim/include/ossim/base/ossimGeoidImage.h         |   117 +
 ossim/include/ossim/base/ossimGeoidManager.h       |    87 +
 ossim/include/ossim/base/ossimGeoidNgs.h           |    64 +
 ossim/include/ossim/base/ossimGeoidNgsHeader.h     |    83 +
 .../include}/ossim/base/ossimGeoref.h              |     0
 ossim/include/ossim/base/ossimGpt.h                |   359 +
 ossim/include/ossim/base/ossimGrect.h              |   311 +
 .../include}/ossim/base/ossimGzStream.h            |     0
 ossim/include/ossim/base/ossimHexString.h          |   147 +
 .../include}/ossim/base/ossimHistogram.h           |     0
 ossim/include/ossim/base/ossimHistogramSource.h    |    58 +
 .../include}/ossim/base/ossimHsiVector.h           |     0
 .../include}/ossim/base/ossimHsvVector.h           |     0
 .../include}/ossim/base/ossimHttpRequest.h         |     0
 .../include}/ossim/base/ossimHttpResponse.h        |     0
 {include => ossim/include}/ossim/base/ossimId.h    |     0
 .../include}/ossim/base/ossimIdManager.h           |     0
 .../include}/ossim/base/ossimImageAoiListener.h    |     0
 .../include}/ossim/base/ossimImageGeometryEvent.h  |     0
 .../ossim/base/ossimImageGeometryEventListener.h   |     0
 .../include}/ossim/base/ossimImagePolygonEvent.h   |     0
 .../include}/ossim/base/ossimImageRectangleEvent.h |     0
 .../include}/ossim/base/ossimImageTypeLut.h        |     0
 .../include}/ossim/base/ossimInterleaveTypeLut.h   |     0
 ossim/include/ossim/base/ossimIoStream.h           |   236 +
 {include => ossim/include}/ossim/base/ossimIpt.h   |     0
 {include => ossim/include}/ossim/base/ossimIrect.h |     0
 .../include}/ossim/base/ossimJpegYCbCrVector.h     |     0
 .../include}/ossim/base/ossimKeyword.h             |     0
 ossim/include/ossim/base/ossimKeywordNames.h       |   209 +
 ossim/include/ossim/base/ossimKeywordlist.h        |   529 +
 .../ossim/base/ossimLagrangeInterpolator.h         |     0
 .../include}/ossim/base/ossimLeastSquaresBilin.h   |     0
 ossim/include/ossim/base/ossimLeastSquaresPlane.h  |   121 +
 ossim/include/ossim/base/ossimLine.h               |    81 +
 ossim/include/ossim/base/ossimListener.h           |    52 +
 .../include}/ossim/base/ossimListenerManager.h     |     0
 ossim/include/ossim/base/ossimLookUpTable.h        |   117 +
 .../include}/ossim/base/ossimLsrPoint.h            |     0
 .../include}/ossim/base/ossimLsrRay.h              |     0
 .../include}/ossim/base/ossimLsrSpace.h            |     0
 .../include}/ossim/base/ossimLsrVector.h           |     0
 .../include}/ossim/base/ossimMatrix3x3.h           |     0
 .../include}/ossim/base/ossimMatrix4x4.h           |     0
 .../include}/ossim/base/ossimMatrixProperty.h      |     0
 ossim/include/ossim/base/ossimMetadataInterface.h  |    46 +
 .../include}/ossim/base/ossimMouseEvent.h          |     0
 .../include}/ossim/base/ossimMouseListener.h       |     0
 .../include}/ossim/base/ossimMultiBandHistogram.h  |     0
 .../ossim/base/ossimMultiResLevelHistogram.h       |     0
 ossim/include/ossim/base/ossimNBandLutDataObject.h |   489 +
 ossim/include/ossim/base/ossimNadconGridDatum.h    |    47 +
 ossim/include/ossim/base/ossimNadconGridFile.h     |    54 +
 ossim/include/ossim/base/ossimNadconGridHeader.h   |    89 +
 ossim/include/ossim/base/ossimNadconNarDatum.h     |    21 +
 ossim/include/ossim/base/ossimNadconNasDatum.h     |    20 +
 ossim/include/ossim/base/ossimNormRgbVector.h      |   109 +
 ossim/include/ossim/base/ossimNotify.h             |   107 +
 .../include}/ossim/base/ossimNotifyContext.h       |     0
 .../include}/ossim/base/ossimNumericProperty.h     |     0
 .../include}/ossim/base/ossimObject.h              |     0
 .../ossim/base/ossimObjectDestructingEvent.h       |     0
 .../include}/ossim/base/ossimObjectEvents.h        |     0
 .../include}/ossim/base/ossimObjectFactory.h       |     0
 .../ossim/base/ossimObjectFactoryRegistry.h        |    74 +
 .../include}/ossim/base/ossimObservationSet.h      |     0
 .../include}/ossim/base/ossimOutputSource.h        |     0
 .../include}/ossim/base/ossimPackedBits.h          |     0
 ossim/include/ossim/base/ossimPointHash.h          |    29 +
 .../include}/ossim/base/ossimPointObservation.h    |     0
 ossim/include/ossim/base/ossimPolyArea2d.h         |   151 +
 .../include}/ossim/base/ossimPolyLine.h            |     0
 ossim/include/ossim/base/ossimPolygon.h            |   248 +
 ossim/include/ossim/base/ossimPolynom.h            |   872 ++
 {include => ossim/include}/ossim/base/ossimPool.h  |     0
 .../include}/ossim/base/ossimPoolObject.h          |     0
 .../include}/ossim/base/ossimPreferences.h         |     0
 ossim/include/ossim/base/ossimProcessInterface.h   |    86 +
 ossim/include/ossim/base/ossimProcessListener.h    |    30 +
 .../include/ossim/base/ossimProcessProgressEvent.h |    52 +
 .../include}/ossim/base/ossimProperty.h            |     0
 .../include}/ossim/base/ossimPropertyEvent.h       |     0
 ossim/include/ossim/base/ossimPropertyInterface.h  |    41 +
 .../ossim/base/ossimPropertyInterfaceFactory.h     |     0
 .../ossim/base/ossimPropertyInterfaceRegistry.h    |     0
 .../include}/ossim/base/ossimProtocolStream.h      |     0
 .../include}/ossim/base/ossimQuadTreeWarp.h        |     0
 .../include}/ossim/base/ossimQuadrilateralMap.h    |     0
 .../include}/ossim/base/ossimQuaternion.h          |     0
 .../include}/ossim/base/ossimROIEvent.h            |     0
 .../include}/ossim/base/ossimROIEventListener.h    |     0
 .../include}/ossim/base/ossimRationalNumber.h      |     0
 .../include/ossim/base/ossimRectanglePartitioner.h |   148 +
 .../ossim/base/ossimRectilinearDataObject.h        |   156 +
 ossim/include/ossim/base/ossimRefPtr.h             |    87 +
 ossim/include/ossim/base/ossimReferenced.h         |   107 +
 .../include}/ossim/base/ossimRefreshEvent.h        |     0
 ossim/include/ossim/base/ossimRegExp.h             |   264 +
 .../include}/ossim/base/ossimRgbLutDataObject.h    |     0
 ossim/include/ossim/base/ossimRgbVector.h          |   115 +
 ossim/include/ossim/base/ossimRtti.h               |   511 +
 .../include}/ossim/base/ossimScalarTypeLut.h       |     0
 .../include}/ossim/base/ossimSevenParamDatum.h     |     0
 .../include}/ossim/base/ossimSource.h              |     0
 .../include}/ossim/base/ossimStateChangedEvent.h   |     0
 ossim/include/ossim/base/ossimStdOutProgress.h     |    36 +
 .../include}/ossim/base/ossimStreamBase.h          |     0
 ossim/include/ossim/base/ossimStreamFactory.h      |    38 +
 ossim/include/ossim/base/ossimStreamFactoryBase.h  |    36 +
 .../ossim/base/ossimStreamFactoryRegistry.h        |    40 +
 ossim/include/ossim/base/ossimString.h             |   936 ++
 .../include}/ossim/base/ossimStringListProperty.h  |     0
 ossim/include/ossim/base/ossimStringProperty.h     |    73 +
 {include => ossim/include}/ossim/base/ossimTDpt.h  |     0
 ossim/include/ossim/base/ossimTempFilename.h       |    43 +
 .../include}/ossim/base/ossimTextProperty.h        |     0
 .../include}/ossim/base/ossimThinPlateSpline.h     |     0
 .../include}/ossim/base/ossimThreeParamDatum.h     |     0
 .../include}/ossim/base/ossimTieGpt.h              |     0
 .../include}/ossim/base/ossimTieGptSet.h           |     0
 .../base/ossimTieMeasurementGeneratorInterface.h   |    83 +
 ossim/include/ossim/base/ossimTileHash.h           |    47 +
 ossim/include/ossim/base/ossimTiledImageHash.h     |    41 +
 {include => ossim/include}/ossim/base/ossimTimer.h |     0
 {include => ossim/include}/ossim/base/ossimTrace.h |     0
 ossim/include/ossim/base/ossimTraceManager.h       |    70 +
 ossim/include/ossim/base/ossimUnitConversionTool.h |    81 +
 ossim/include/ossim/base/ossimUnitTypeLut.h        |    57 +
 {include => ossim/include}/ossim/base/ossimUrl.h   |     0
 .../include}/ossim/base/ossimUsgsQuad.h            |     0
 .../include}/ossim/base/ossimViewController.h      |     0
 .../include}/ossim/base/ossimViewEvent.h           |     0
 .../include}/ossim/base/ossimViewInterface.h       |     0
 .../include}/ossim/base/ossimViewListener.h        |     0
 ossim/include/ossim/base/ossimVisitor.h            |   229 +
 ossim/include/ossim/base/ossimVrect.h              |   168 +
 .../include}/ossim/base/ossimWLSBundleSolution.h   |     0
 .../include}/ossim/base/ossimWebRequest.h          |     0
 .../ossim/base/ossimWebRequestFactoryBase.h        |     0
 .../ossim/base/ossimWebRequestFactoryRegistry.h    |     0
 .../include}/ossim/base/ossimWebResponse.h         |     0
 .../include}/ossim/base/ossimWgs72Datum.h          |     0
 .../include}/ossim/base/ossimWgs84Datum.h          |     0
 {include => ossim/include}/ossim/base/ossimWms.h   |     0
 .../include}/ossim/base/ossimXmlAttribute.h        |     0
 .../include}/ossim/base/ossimXmlDocument.h         |     0
 .../include}/ossim/base/ossimXmlNode.h             |     0
 ossim/include/ossim/base/ossimXmlString.h          |    67 +
 .../ossim/elevation/ossimDtedElevationDatabase.h   |    81 +
 ossim/include/ossim/elevation/ossimDtedFactory.h   |    39 +
 ossim/include/ossim/elevation/ossimDtedHandler.h   |   241 +
 .../include/ossim/elevation/ossimElevCellHandler.h |   110 +
 .../ossim/elevation/ossimElevCellHandlerFactory.h  |     0
 .../include}/ossim/elevation/ossimElevLess.h       |     0
 ossim/include/ossim/elevation/ossimElevManager.h   |   184 +
 ossim/include/ossim/elevation/ossimElevSource.h    |   182 +
 .../ossim/elevation/ossimElevSourceFactory.h       |    75 +
 .../ossim/elevation/ossimElevationAccuracyInfo.h   |     0
 .../ossim/elevation/ossimElevationCellDatabase.h   |   170 +
 .../ossim/elevation/ossimElevationDatabase.h       |    90 +
 .../elevation/ossimElevationDatabaseFactory.h      |     0
 .../elevation/ossimElevationDatabaseFactoryBase.h  |    33 +
 .../elevation/ossimElevationDatabaseRegistry.h     |     0
 .../elevation/ossimGeneralRasterElevFactory.h      |     0
 .../elevation/ossimGeneralRasterElevHandler.h      |   170 +
 .../ossimGeneralRasterElevationDatabase.h          |    86 +
 .../include}/ossim/elevation/ossimHgtRef.h         |     0
 .../ossim/elevation/ossimImageElevationDatabase.h  |   219 +
 .../ossim/elevation/ossimImageElevationHandler.h   |   135 +
 .../ossim/elevation/ossimSrtmElevationDatabase.h   |    84 +
 ossim/include/ossim/elevation/ossimSrtmFactory.h   |    58 +
 ossim/include/ossim/elevation/ossimSrtmHandler.h   |   111 +
 .../ossim/elevation/ossimTiledElevationDatabase.h  |   223 +
 {include => ossim/include}/ossim/font/ossimFont.h  |     0
 ossim/include/ossim/font/ossimFontFactoryBase.h    |    42 +
 .../include}/ossim/font/ossimFontFactoryRegistry.h |     0
 .../include}/ossim/font/ossimFreeTypeFont.h        |     0
 .../include}/ossim/font/ossimFreeTypeFontFactory.h |     0
 .../include}/ossim/font/ossimGdBitmapFont.h        |     0
 .../include}/ossim/font/ossimGdSansBold.inc        |     0
 .../include}/ossim/imaging/gdfontg.inc             |     0
 .../include}/ossim/imaging/gdfontl.inc             |     0
 .../include}/ossim/imaging/gdfontmb.inc            |     0
 .../include}/ossim/imaging/gdfonts.inc             |     0
 .../include}/ossim/imaging/gdfontt.inc             |     0
 .../ossim/imaging/ossim3x3ConvolutionFilter.h      |    98 +
 ossim/include/ossim/imaging/ossimAOD.h             |    67 +
 .../include}/ossim/imaging/ossimAdrgHeader.h       |     0
 ossim/include/ossim/imaging/ossimAdrgTileSource.h  |   197 +
 .../ossim/imaging/ossimAnnotationEllipseObject.h   |     0
 .../ossim/imaging/ossimAnnotationFontObject.h      |     0
 .../ossim/imaging/ossimAnnotationGdBitmapFont.h    |     0
 .../ossim/imaging/ossimAnnotationLineObject.h      |     0
 .../ossim/imaging/ossimAnnotationMapGridSource.h   |     0
 .../imaging/ossimAnnotationMultiEllipseObject.h    |    66 +
 .../ossim/imaging/ossimAnnotationMultiLineObject.h |     0
 .../imaging/ossimAnnotationMultiPolyLineObject.h   |     0
 .../ossim/imaging/ossimAnnotationMultiPolyObject.h |     0
 .../include/ossim/imaging/ossimAnnotationObject.h  |   105 +
 .../ossim/imaging/ossimAnnotationObjectFactory.h   |     0
 .../ossim/imaging/ossimAnnotationPolyObject.h      |     0
 .../include}/ossim/imaging/ossimAnnotationSource.h |     0
 .../include/ossim/imaging/ossimAppFixedTileCache.h |   118 +
 ossim/include/ossim/imaging/ossimAppTileCache.h    |   171 +
 .../ossim/imaging/ossimArcInfoGridWriter.h         |     0
 .../ossim/imaging/ossimAtCorrGridRemapper.h        |     0
 .../include}/ossim/imaging/ossimAtCorrKeywords.h   |     0
 ossim/include/ossim/imaging/ossimAtCorrRemapper.h  |    89 +
 .../include}/ossim/imaging/ossimAtbController.h    |     0
 .../include}/ossim/imaging/ossimAtbMatchPoint.h    |     0
 .../include}/ossim/imaging/ossimAtbPointSource.h   |     0
 .../include/ossim/imaging/ossimBandAverageFilter.h |   111 +
 ossim/include/ossim/imaging/ossimBandClipFilter.h  |    93 +
 ossim/include/ossim/imaging/ossimBandMergeSource.h |    63 +
 ossim/include/ossim/imaging/ossimBandSelector.h    |   169 +
 .../ossim/imaging/ossimBandSeparateHandler.h       |    98 +
 .../include/ossim/imaging/ossimBitMaskTileSource.h |   134 +
 ossim/include/ossim/imaging/ossimBitMaskWriter.h   |   134 +
 ossim/include/ossim/imaging/ossimBlendMosaic.h     |    79 +
 .../ossim/imaging/ossimBrightnessContrastSource.h  |     0
 ossim/include/ossim/imaging/ossimBrightnessMatch.h |    58 +
 .../ossim/imaging/ossimBumpShadeTileSource.h       |   284 +
 .../include}/ossim/imaging/ossimCacheTileSource.h  |     0
 .../ossim/imaging/ossimCastTileSourceFilter.h      |    94 +
 .../include}/ossim/imaging/ossimCcfHead.h          |     0
 ossim/include/ossim/imaging/ossimCcfTileSource.h   |   233 +
 .../ossim/imaging/ossimCibCadrgTileSource.h        |     0
 .../ossim/imaging/ossimClosestToCenterCombiner.h   |    61 +
 ossim/include/ossim/imaging/ossimCodecBase.h       |    67 +
 ossim/include/ossim/imaging/ossimCodecFactory.h    |    74 +
 .../ossim/imaging/ossimCodecFactoryInterface.h     |    91 +
 .../ossim/imaging/ossimCodecFactoryRegistry.h      |    56 +
 .../ossim/imaging/ossimColorNormalizedFusion.h     |    33 +
 .../ossim/imaging/ossimConvolutionFilter1D.h       |   125 +
 .../include/ossim/imaging/ossimConvolutionSource.h |    73 +
 ossim/include/ossim/imaging/ossimDespeckleFilter.h |    49 +
 ossim/include/ossim/imaging/ossimDilationFilter.h  |    74 +
 .../ossim/imaging/ossimDiscrete3x3HatFilter.h      |     0
 .../ossim/imaging/ossimDiscreteConvolutionKernel.h |     0
 .../ossim/imaging/ossimDiscreteNearestNeighbor.h   |     0
 ossim/include/ossim/imaging/ossimDoqqTileSource.h  |    59 +
 ossim/include/ossim/imaging/ossimDtedTileSource.h  |   260 +
 .../include}/ossim/imaging/ossimERSFileWriter.h    |     0
 ossim/include/ossim/imaging/ossimERSTileSource.h   |    57 +
 .../ossim/imaging/ossimEastingNorthingCutter.h     |     0
 ossim/include/ossim/imaging/ossimEdgeFilter.h      |    84 +
 ossim/include/ossim/imaging/ossimElevImageSource.h |   147 +
 .../ossim/imaging/ossimEnviHeaderFileWriter.h      |    79 +
 ossim/include/ossim/imaging/ossimEnviTileSource.h  |   102 +
 .../include/ossim/imaging/ossimEquationCombiner.h  |   324 +
 .../ossim/imaging/ossimEsriShapeFileInterface.h    |     0
 ossim/include/ossim/imaging/ossimFeatherMosaic.h   |    88 +
 ossim/include/ossim/imaging/ossimFftFilter.h       |    87 +
 ossim/include/ossim/imaging/ossimFgdcFileWriter.h  |   158 +
 ossim/include/ossim/imaging/ossimFilter.h          |   511 +
 ossim/include/ossim/imaging/ossimFilterResampler.h |   152 +
 ossim/include/ossim/imaging/ossimFilterTable.h     |    98 +
 ossim/include/ossim/imaging/ossimFixedTileCache.h  |   147 +
 ossim/include/ossim/imaging/ossimFusionCombiner.h  |    48 +
 ossim/include/ossim/imaging/ossimGammaRemapper.h   |    72 +
 .../include}/ossim/imaging/ossimGdFont.h           |     0
 .../include}/ossim/imaging/ossimGdFontExterns.h    |     0
 .../include/ossim/imaging/ossimGeneralRasterInfo.h |   432 +
 .../ossim/imaging/ossimGeneralRasterTileSource.h   |   213 +
 .../ossim/imaging/ossimGeneralRasterWriter.h       |     0
 .../ossim/imaging/ossimGeoAnnotationBitmap.h       |    55 +
 .../imaging/ossimGeoAnnotationEllipseObject.h      |     0
 .../ossim/imaging/ossimGeoAnnotationFontObject.h   |     0
 .../ossim/imaging/ossimGeoAnnotationGdBitmapFont.h |     0
 .../ossim/imaging/ossimGeoAnnotationLineObject.h   |     0
 .../imaging/ossimGeoAnnotationMultiEllipseObject.h |    70 +
 .../ossimGeoAnnotationMultiPolyLineObject.h        |     0
 .../imaging/ossimGeoAnnotationMultiPolyObject.h    |     0
 .../ossim/imaging/ossimGeoAnnotationObject.h       |     0
 .../imaging/ossimGeoAnnotationPolyLineObject.h     |     0
 .../ossim/imaging/ossimGeoAnnotationPolyObject.h   |     0
 .../ossim/imaging/ossimGeoAnnotationSource.h       |     0
 ossim/include/ossim/imaging/ossimGeoPolyCutter.h   |   221 +
 .../ossim/imaging/ossimGeographicAnnotationGrid.h  |     0
 ossim/include/ossim/imaging/ossimGeomFileWriter.h  |    58 +
 .../ossim/imaging/ossimGpkgWriterInterface.h       |    73 +
 ossim/include/ossim/imaging/ossimGridRemapEngine.h |    71 +
 .../ossim/imaging/ossimGridRemapEngineFactory.h    |    37 +
 ossim/include/ossim/imaging/ossimGridRemapSource.h |   145 +
 .../ossim/imaging/ossimHistoMatchRemapper.h        |    98 +
 .../ossim/imaging/ossimHistogramEqualization.h     |   100 +
 .../ossim/imaging/ossimHistogramMatchFilter.h      |     0
 .../include/ossim/imaging/ossimHistogramRemapper.h |   574 +
 .../ossim/imaging/ossimHistogramThreshholdFilter.h |    52 +
 .../include}/ossim/imaging/ossimHistogramWriter.h  |     0
 ossim/include/ossim/imaging/ossimHsiRemapper.h     |   257 +
 ossim/include/ossim/imaging/ossimHsiToRgbSource.h  |    50 +
 .../ossim/imaging/ossimHsvGridRemapEngine.h        |    55 +
 ossim/include/ossim/imaging/ossimHsvToRgbSource.h  |    43 +
 .../include}/ossim/imaging/ossimIgenGenerator.h    |     0
 .../include}/ossim/imaging/ossimImageCacheBase.h   |     0
 .../ossim/imaging/ossimImageCacheTileSource.h      |     0
 ossim/include/ossim/imaging/ossimImageChain.h      |   417 +
 ossim/include/ossim/imaging/ossimImageCombiner.h   |   140 +
 ossim/include/ossim/imaging/ossimImageData.h       |  1275 +++
 .../include/ossim/imaging/ossimImageDataFactory.h  |    64 +
 ossim/include/ossim/imaging/ossimImageDataHelper.h |   102 +
 .../ossim/imaging/ossimImageDisplayWriter.h        |     0
 .../include}/ossim/imaging/ossimImageFileWriter.h  |     0
 .../ossim/imaging/ossimImageGaussianFilter.h       |    81 +
 ossim/include/ossim/imaging/ossimImageGeometry.h   |   473 +
 .../ossim/imaging/ossimImageGeometryFactory.h      |    54 +
 .../ossim/imaging/ossimImageGeometryFactoryBase.h  |    45 +
 .../ossim/imaging/ossimImageGeometryRegistry.h     |    75 +
 ossim/include/ossim/imaging/ossimImageHandler.h    |   788 ++
 .../ossim/imaging/ossimImageHandlerFactory.h       |     0
 .../ossim/imaging/ossimImageHandlerFactoryBase.h   |   110 +
 .../ossim/imaging/ossimImageHandlerRegistry.h      |   157 +
 .../ossim/imaging/ossimImageHistogramSource.h      |   106 +
 ossim/include/ossim/imaging/ossimImageMetaData.h   |   139 +
 .../imaging/ossimImageMetaDataWriterFactory.h      |    88 +
 .../imaging/ossimImageMetaDataWriterFactoryBase.h  |    68 +
 .../imaging/ossimImageMetaDataWriterRegistry.h     |    99 +
 ossim/include/ossim/imaging/ossimImageModel.h      |   190 +
 ossim/include/ossim/imaging/ossimImageMosaic.h     |    74 +
 .../ossimImageReconstructionFilterFactory.h        |     0
 .../ossimImageReconstructionFilterRegistry.h       |     0
 ossim/include/ossim/imaging/ossimImageRenderer.h   |   500 +
 .../ossim/imaging/ossimImageSharpenFilter.h        |    84 +
 ossim/include/ossim/imaging/ossimImageSource.h     |   247 +
 .../ossim/imaging/ossimImageSourceFactory.h        |     0
 .../ossim/imaging/ossimImageSourceFactoryBase.h    |     0
 .../imaging/ossimImageSourceFactoryRegistry.h      |     0
 .../include/ossim/imaging/ossimImageSourceFilter.h |    67 +
 .../imaging/ossimImageSourceHistogramFilter.h      |     0
 .../ossim/imaging/ossimImageSourceSequencer.h      |   168 +
 .../ossim/imaging/ossimImageStatisticsSource.h     |     0
 .../ossim/imaging/ossimImageToPlaneNormalFilter.h  |    75 +
 .../include}/ossim/imaging/ossimImageWriter.h      |     0
 .../ossim/imaging/ossimImageWriterFactory.h        |    64 +
 .../ossim/imaging/ossimImageWriterFactoryBase.h    |     0
 .../imaging/ossimImageWriterFactoryRegistry.h      |    90 +
 .../ossim/imaging/ossimIndexToRgbLutFilter.h       |   176 +
 .../ossim/imaging/ossimIntensityAdjustmentFilter.h |    75 +
 .../include}/ossim/imaging/ossimIso8211.h          |     0
 ossim/include/ossim/imaging/ossimJpegCodec.h       |   134 +
 .../include/ossim/imaging/ossimJpegDefaultTable.h  |   163 +
 ossim/include/ossim/imaging/ossimJpegMemDest.h     |    36 +
 ossim/include/ossim/imaging/ossimJpegMemSrc.h      |    43 +
 .../include}/ossim/imaging/ossimJpegStdIOSrc.h     |     0
 ossim/include/ossim/imaging/ossimJpegTileSource.h  |   216 +
 .../include}/ossim/imaging/ossimJpegWriter.h       |     0
 .../ossim/imaging/ossimJpegYCbCrToRgbSource.h      |    38 +
 .../ossim/imaging/ossimLandsatTileSource.h         |     0
 .../imaging/ossimLandsatTopoCorrectionFilter.h     |     0
 .../ossim/imaging/ossimLocalCorrelationFusion.h    |     0
 .../ossim/imaging/ossimMapCompositionSource.h      |   337 +
 ossim/include/ossim/imaging/ossimMaskFilter.h      |   267 +
 ossim/include/ossim/imaging/ossimMaxMosaic.h       |    79 +
 .../include/ossim/imaging/ossimMeanMedianFilter.h  |   130 +
 .../include/ossim/imaging/ossimMemoryImageSource.h |    96 +
 .../ossim/imaging/ossimMetadataFileWriter.h        |   177 +
 .../ossim/imaging/ossimMonoGridRemapEngine.h       |    55 +
 .../imaging/ossimMultiBandHistogramTileSource.h    |     0
 .../ossim/imaging/ossimNBandToIndexFilter.h        |   130 +
 ossim/include/ossim/imaging/ossimNitf20Writer.h    |   136 +
 ossim/include/ossim/imaging/ossimNitfTileSource.h  |   544 +
 .../include/ossim/imaging/ossimNitfTileSource_12.h |    42 +
 ossim/include/ossim/imaging/ossimNitfWriter.h      |   173 +
 ossim/include/ossim/imaging/ossimNitfWriterBase.h  |   184 +
 .../ossim/imaging/ossimNormalizedRemapTable.h      |    85 +
 .../ossim/imaging/ossimNormalizedS16RemapTable.h   |   147 +
 .../ossim/imaging/ossimNormalizedU11RemapTable.h   |   118 +
 .../ossim/imaging/ossimNormalizedU16RemapTable.h   |   117 +
 .../ossim/imaging/ossimNormalizedU8RemapTable.h    |   117 +
 .../include}/ossim/imaging/ossimNullPixelFlip.h    |     0
 .../include/ossim/imaging/ossimOrthoImageMosaic.h  |    62 +
 .../ossim/imaging/ossimOverviewBuilderBase.h       |   241 +
 .../ossim/imaging/ossimOverviewBuilderFactory.h    |     0
 .../imaging/ossimOverviewBuilderFactoryBase.h      |     0
 .../imaging/ossimOverviewBuilderFactoryRegistry.h  |     0
 .../ossim/imaging/ossimOverviewSequencer.h         |     0
 .../include}/ossim/imaging/ossimPdfWriter.h        |     0
 .../include/ossim/imaging/ossimPiecewiseRemapper.h |   262 +
 ossim/include/ossim/imaging/ossimPixelFlipper.h    |   273 +
 ossim/include/ossim/imaging/ossimPolyCutter.h      |   109 +
 .../ossim/imaging/ossimQbTileFilesHandler.h        |    45 +
 .../ossim/imaging/ossimQuickbirdNitfTileSource.h   |    45 +
 .../ossim/imaging/ossimQuickbirdTiffTileSource.h   |    37 +
 ossim/include/ossim/imaging/ossimRLevelFilter.h    |   100 +
 .../ossim/imaging/ossimRangeDomeTileSource.h       |   122 +
 .../include/ossim/imaging/ossimReadmeFileWriter.h  |    58 +
 .../ossim/imaging/ossimRectangleCutFilter.h        |    58 +
 .../include}/ossim/imaging/ossimResampler.h        |     0
 .../ossim/imaging/ossimRgbGridRemapEngine.h        |    55 +
 .../include}/ossim/imaging/ossimRgbImage.h         |     0
 ossim/include/ossim/imaging/ossimRgbToGreyFilter.h |    71 +
 ossim/include/ossim/imaging/ossimRgbToHsiSource.h  |    48 +
 ossim/include/ossim/imaging/ossimRgbToHsvSource.h  |    48 +
 .../include/ossim/imaging/ossimRgbToIndexFilter.h  |    97 +
 .../ossim/imaging/ossimRgbToJpegYCbCrSource.h      |    33 +
 .../ossim/imaging/ossimRpfCacheTileSource.h        |     0
 ossim/include/ossim/imaging/ossimS16ImageData.h    |   185 +
 ossim/include/ossim/imaging/ossimSFIMFusion.h      |    86 +
 .../ossim/imaging/ossimSICDToDetectedImage.h       |     0
 .../include}/ossim/imaging/ossimScalarRemapper.h   |     0
 ossim/include/ossim/imaging/ossimScaleFilter.h     |   185 +
 ossim/include/ossim/imaging/ossimShiftFilter.h     |   106 +
 .../include/ossim/imaging/ossimSingleImageChain.h  |   557 +
 ossim/include/ossim/imaging/ossimSlopeFilter.h     |    84 +
 ossim/include/ossim/imaging/ossimSrtmTileSource.h  |    75 +
 .../ossim/imaging/ossimStreamReaderInterface.h     |    53 +
 .../ossim/imaging/ossimSubImageTileSource.h        |    91 +
 ossim/include/ossim/imaging/ossimTableRemapper.h   |    96 +
 .../ossim/imaging/ossimTiffOverviewBuilder.h       |   304 +
 ossim/include/ossim/imaging/ossimTiffTileSource.h  |   365 +
 .../include}/ossim/imaging/ossimTiffWriter.h       |     0
 ossim/include/ossim/imaging/ossimTileCache.h       |   106 +
 ossim/include/ossim/imaging/ossimTilePatch.h       |   137 +
 .../include/ossim/imaging/ossimTiledImageHandler.h |   161 +
 ossim/include/ossim/imaging/ossimTiling.h          |   201 +
 ossim/include/ossim/imaging/ossimTilingPoly.h      |    97 +
 ossim/include/ossim/imaging/ossimTilingRect.h      |    68 +
 .../imaging/ossimTopographicCorrectionFilter.h     |   225 +
 ossim/include/ossim/imaging/ossimTrimFilter.h      |    72 +
 ossim/include/ossim/imaging/ossimTwoColorView.h    |   106 +
 ossim/include/ossim/imaging/ossimU11ImageData.h    |   189 +
 ossim/include/ossim/imaging/ossimU16ImageData.h    |   193 +
 ossim/include/ossim/imaging/ossimU8ImageData.h     |   176 +
 .../include/ossim/imaging/ossimUsgsDemTileSource.h |   195 +
 .../imaging/ossimValueAssignImageSourceFilter.h    |   103 +
 .../include}/ossim/imaging/ossimVectorRenderer.h   |     0
 .../include}/ossim/imaging/ossimVertexExtractor.h  |     0
 .../ossim/imaging/ossimVpfAnnotationCoverageInfo.h |    78 +
 .../ossim/imaging/ossimVpfAnnotationFeatureInfo.h  |   230 +
 .../ossim/imaging/ossimVpfAnnotationLibraryInfo.h  |     0
 .../ossim/imaging/ossimVpfAnnotationSource.h       |     0
 ossim/include/ossim/imaging/ossimVpfTileSource.h   |   165 +
 ossim/include/ossim/imaging/ossimWatermarkFilter.h |   348 +
 .../include}/ossim/imaging/ossimWorldFileWriter.h  |     0
 {include => ossim/include}/ossim/init/ossimInit.h  |     0
 {include => ossim/include}/ossim/matrix/controlw.h |     0
 {include => ossim/include}/ossim/matrix/include.h  |     0
 {include => ossim/include}/ossim/matrix/myexcept.h |     0
 ossim/include/ossim/matrix/newmat.h                |  1807 +++
 ossim/include/ossim/matrix/newmatap.h              |   201 +
 {include => ossim/include}/ossim/matrix/newmatio.h |     0
 {include => ossim/include}/ossim/matrix/newmatnl.h |     0
 ossim/include/ossim/matrix/newmatrc.h              |   171 +
 {include => ossim/include}/ossim/matrix/newmatrm.h |     0
 {include => ossim/include}/ossim/matrix/precisio.h |     0
 {include => ossim/include}/ossim/matrix/solution.h |     0
 {include => ossim/include}/ossim/ossimConfig.h.in  |     0
 {include => ossim/include}/ossim/ossimConfig.h.vc  |     0
 ossim/include/ossim/parallel/ossimIgen.h           |    72 +
 .../ossim/parallel/ossimImageChainMtAdaptor.h      |   123 +
 .../ossim/parallel/ossimImageHandlerMtAdaptor.h    |     0
 .../ossimImageMpiMWriterSequenceConnection.h       |    61 +
 .../ossimImageMpiSWriterSequenceConnection.h       |    54 +
 .../include}/ossim/parallel/ossimJob.h             |     0
 .../ossim/parallel/ossimJobMultiThreadQueue.h      |     0
 .../include}/ossim/parallel/ossimJobQueue.h        |     0
 .../include}/ossim/parallel/ossimJobThreadQueue.h  |     0
 .../include}/ossim/parallel/ossimMpi.h             |     0
 .../parallel/ossimMpiMasterOverviewSequencer.h     |     0
 .../parallel/ossimMpiSlaveOverviewSequencer.h      |     0
 .../include}/ossim/parallel/ossimMtDebug.h         |     0
 .../ossim/parallel/ossimMultiThreadSequencer.h     |     0
 ossim/include/ossim/parallel/ossimOrthoIgen.h      |   253 +
 ossim/include/ossim/plugin/ossimDynamicLibrary.h   |    67 +
 .../include}/ossim/plugin/ossimPluginLibrary.h     |     0
 .../ossim/plugin/ossimSharedObjectBridge.h         |     0
 .../ossim/plugin/ossimSharedPluginRegistry.h       |     0
 .../point_cloud/ossimGenericPointCloudHandler.h    |    41 +
 ossim/include/ossim/point_cloud/ossimPointBlock.h  |    98 +
 .../ossim/point_cloud/ossimPointCloudGeometry.h    |    89 +
 .../ossim/point_cloud/ossimPointCloudHandler.h     |    98 +
 .../point_cloud/ossimPointCloudHandlerFactory.h    |    44 +
 .../point_cloud/ossimPointCloudHandlerRegistry.h   |    58 +
 .../point_cloud/ossimPointCloudImageHandler.h      |   255 +
 .../ossimPointCloudImageHandlerFactory.h           |    48 +
 .../ossim/point_cloud/ossimPointCloudSource.h      |    84 +
 ossim/include/ossim/point_cloud/ossimPointRecord.h |    91 +
 ossim/include/ossim/projection/ossimAdjMapModel.h  |   138 +
 .../ossim/projection/ossimAffineProjection.h       |     0
 .../ossim/projection/ossimAlbersProjection.h       |     0
 .../include}/ossim/projection/ossimAlphaSensor.h   |     0
 .../ossim/projection/ossimAlphaSensorHRI.h         |     0
 .../ossim/projection/ossimAlphaSensorHSI.h         |     0
 .../ossim/projection/ossimApplanixEcefModel.h      |   102 +
 .../ossim/projection/ossimApplanixUtmModel.h       |    83 +
 .../ossim/projection/ossimAzimEquDistProjection.h  |     0
 .../ossim/projection/ossimBilinearProjection.h     |     0
 .../include}/ossim/projection/ossimBngProjection.h |     0
 .../ossim/projection/ossimBonneProjection.h        |     0
 .../include/ossim/projection/ossimBuckeyeSensor.h  |   146 +
 .../ossim/projection/ossimCadrgProjection.h        |    91 +
 .../ossim/projection/ossimCassiniProjection.h      |     0
 .../ossim/projection/ossimCoarseGridModel.h        |   185 +
 .../ossim/projection/ossimCylEquAreaProjection.h   |     0
 .../ossim/projection/ossimEckert4Projection.h      |     0
 .../ossim/projection/ossimEckert6Projection.h      |     0
 .../ossim/projection/ossimEpsgProjectionDatabase.h |   132 +
 .../ossim/projection/ossimEpsgProjectionFactory.h  |    77 +
 .../ossim/projection/ossimEquDistCylProjection.h   |   223 +
 .../include}/ossim/projection/ossimFcsiModel.h     |     0
 .../ossim/projection/ossimGnomonicProjection.h     |     0
 .../ossim/projection/ossimGoogleProjection.h       |    35 +
 .../include/ossim/projection/ossimIkonosRpcModel.h |    77 +
 .../ossim/projection/ossimImageProjectionModel.h   |    62 +
 .../projection/ossimImageViewAffineTransform.h     |   188 +
 .../projection/ossimImageViewProjectionTransform.h |     0
 .../ossim/projection/ossimImageViewTransform.h     |     0
 .../projection/ossimImageViewTransformFactory.h    |     0
 .../include}/ossim/projection/ossimIpodSensor.h    |     0
 .../ossimLambertConformalConicProjection.h         |     0
 .../include}/ossim/projection/ossimLandSatModel.h  |     0
 .../include/ossim/projection/ossimLensDistortion.h |    52 +
 .../ossim/projection/ossimLlxyProjection.h         |     0
 .../include/ossim/projection/ossimMapProjection.h  |   377 +
 .../ossim/projection/ossimMapProjectionFactory.h   |    67 +
 .../ossim/projection/ossimMapProjectionInfo.h      |   277 +
 .../ossim/projection/ossimMapViewController.h      |     0
 .../projection/ossimMeanRadialLensDistortion.h     |   119 +
 .../ossim/projection/ossimMercatorProjection.h     |     0
 .../include}/ossim/projection/ossimMgrs.h          |     0
 .../ossim/projection/ossimMillerProjection.h       |     0
 .../ossim/projection/ossimMiscProjectionFactory.h  |     0
 .../ossim/projection/ossimMollweidProjection.h     |     0
 .../projection/ossimNewZealandMapGridProjection.h  |     0
 .../ossim/projection/ossimNgaProjectionFactory.h   |    66 +
 .../include}/ossim/projection/ossimNitfMapModel.h  |     0
 .../ossim/projection/ossimNitfProjectionFactory.h  |     0
 ossim/include/ossim/projection/ossimNitfRpcModel.h |   116 +
 ossim/include/ossim/projection/ossimNitfRsmModel.h |    92 +
 .../projection/ossimObliqueMercatorProjection.h    |     0
 .../ossim/projection/ossimOptimizableProjection.h  |     0
 .../ossim/projection/ossimOrthoGraphicProjection.h |     0
 .../ossim/projection/ossimPolarStereoProjection.h  |     0
 .../include}/ossim/projection/ossimPolarst.h       |     0
 .../ossim/projection/ossimPolyconicProjection.h    |     0
 .../ossim/projection/ossimPolynomProjection.h      |     0
 .../projection/ossimPositionQualityEvaluator.h     |     0
 .../ossim/projection/ossimPpjFrameSensor.h         |     0
 ossim/include/ossim/projection/ossimProjection.h   |   147 +
 .../ossim/projection/ossimProjectionFactoryBase.h  |     0
 .../projection/ossimProjectionFactoryRegistry.h    |    82 +
 .../ossimProjectionViewControllerFactory.h         |     0
 .../ossim/projection/ossimQuadProjection.h         |     0
 .../ossim/projection/ossimQuickbirdRpcModel.h      |    86 +
 .../include}/ossim/projection/ossimRS1SarModel.h   |     0
 .../projection/ossimRadialDecentLensDistortion.h   |   159 +
 .../include}/ossim/projection/ossimRpcModel.h      |     0
 .../include/ossim/projection/ossimRpcProjection.h  |   238 +
 ossim/include/ossim/projection/ossimRpcSolver.h    |   244 +
 ossim/include/ossim/projection/ossimRsmModel.h     |   166 +
 .../include}/ossim/projection/ossimSarModel.h      |     0
 ossim/include/ossim/projection/ossimSensorModel.h  |   393 +
 .../ossim/projection/ossimSensorModelFactory.h     |    65 +
 .../ossim/projection/ossimSensorModelTuple.h       |     0
 .../include}/ossim/projection/ossimSinusoid.h      |     0
 .../ossim/projection/ossimSinusoidalProjection.h   |     0
 .../ossim/projection/ossimSkyBoxLearSensor.h       |     0
 .../ossim/projection/ossimSmacCallibrationSystem.h |     0
 .../include}/ossim/projection/ossimSonomaSensor.h  |     0
 .../ossimSpaceObliqueMercatorProjection.h          |     0
 .../include}/ossim/projection/ossimSpot5Model.h    |     0
 .../projection/ossimStatePlaneProjectionInfo.h     |   103 +
 .../projection/ossimStereographicProjection.h      |     0
 .../ossim/projection/ossimTiffProjectionFactory.h  |    68 +
 .../include}/ossim/projection/ossimTranmerc.h      |     0
 .../projection/ossimTransCylEquAreaProjection.h    |     0
 .../projection/ossimTransMercatorProjection.h      |     0
 .../include}/ossim/projection/ossimUps.h           |     0
 .../include}/ossim/projection/ossimUpsProjection.h |     0
 ossim/include/ossim/projection/ossimUpspt.h        |    44 +
 ossim/include/ossim/projection/ossimUtm.h          |   178 +
 .../include}/ossim/projection/ossimUtmProjection.h |     0
 ossim/include/ossim/projection/ossimUtmpt.h        |    90 +
 .../projection/ossimVanDerGrintenProjection.h      |     0
 .../ossim/projection/ossimWarpProjection.h         |     0
 .../ossim/projection/ossimWktProjectionFactory.h   |    76 +
 .../include}/ossim/support_data/ossimAigBounds.h   |     0
 .../ossim/support_data/ossimAigDataFileHeader.h    |     0
 .../include}/ossim/support_data/ossimAigHeader.h   |     0
 .../ossim/support_data/ossimAigIndexFileHeader.h   |     0
 .../ossim/support_data/ossimAigStatistics.h        |     0
 .../support_data/ossimAlphaSensorSupportData.h     |     0
 .../ossim/support_data/ossimApplanixEOFile.h       |   211 +
 .../ossim/support_data/ossimAuxFileHandler.h       |   231 +
 .../ossim/support_data/ossimAuxXmlSupportData.h    |    94 +
 ossim/include/ossim/support_data/ossimCcfInfo.h    |    61 +
 .../include}/ossim/support_data/ossimCeosData.h    |     0
 .../include}/ossim/support_data/ossimDemGrid.h     |     0
 ossim/include/ossim/support_data/ossimDemHeader.h  |   384 +
 ossim/include/ossim/support_data/ossimDemInfo.h    |    59 +
 .../include}/ossim/support_data/ossimDemPoint.h    |     0
 ossim/include/ossim/support_data/ossimDemProfile.h |    97 +
 ossim/include/ossim/support_data/ossimDemStats.h   |    89 +
 ossim/include/ossim/support_data/ossimDemUtil.h    |    83 +
 ossim/include/ossim/support_data/ossimDoqq.h       |   127 +
 ossim/include/ossim/support_data/ossimDtedAcc.h    |   135 +
 ossim/include/ossim/support_data/ossimDtedDsi.h    |   238 +
 ossim/include/ossim/support_data/ossimDtedHdr.h    |   128 +
 ossim/include/ossim/support_data/ossimDtedInfo.h   |    78 +
 ossim/include/ossim/support_data/ossimDtedRecord.h |   165 +
 ossim/include/ossim/support_data/ossimDtedUhl.h    |   131 +
 ossim/include/ossim/support_data/ossimDtedVol.h    |   110 +
 .../include}/ossim/support_data/ossimERS.h         |     0
 ossim/include/ossim/support_data/ossimEnviHeader.h |   415 +
 ossim/include/ossim/support_data/ossimEnviInfo.h   |    55 +
 .../include}/ossim/support_data/ossimFfL5.h        |     0
 .../include}/ossim/support_data/ossimFfL7.h        |     0
 .../include}/ossim/support_data/ossimFfRevb.h      |     0
 .../include}/ossim/support_data/ossimFfRevc.h      |     0
 ossim/include/ossim/support_data/ossimFgdcTxtDoc.h |   130 +
 ossim/include/ossim/support_data/ossimFgdcXmlDoc.h |   189 +
 .../include}/ossim/support_data/ossimGeoTiff.h     |     0
 .../ossim/support_data/ossimGmlSupportData.h       |   118 +
 .../ossim/support_data/ossimIkonosMetaData.h       |   121 +
 ossim/include/ossim/support_data/ossimInfoBase.h   |    84 +
 .../include/ossim/support_data/ossimInfoFactory.h  |    60 +
 .../ossim/support_data/ossimInfoFactoryInterface.h |    81 +
 .../ossim/support_data/ossimInfoFactoryRegistry.h  |     0
 .../include/ossim/support_data/ossimJ2kCodRecord.h |    96 +
 ossim/include/ossim/support_data/ossimJ2kInfo.h    |   125 +
 .../include/ossim/support_data/ossimJ2kSizRecord.h |   131 +
 .../include/ossim/support_data/ossimJ2kSotRecord.h |    85 +
 ossim/include/ossim/support_data/ossimJp2Info.h    |   135 +
 .../include/ossim/support_data/ossimJpipMessage.h  |    36 +
 .../ossim/support_data/ossimJpipMessageDecoder.h   |     0
 .../ossim/support_data/ossimJpipMessageHeader.h    |     0
 ossim/include/ossim/support_data/ossimLasHdr.h     |   188 +
 ossim/include/ossim/support_data/ossimLasInfo.h    |    58 +
 .../include/ossim/support_data/ossimNitfAcftbTag.h |   404 +
 .../ossim/support_data/ossimNitfAimidbTag.h        |   279 +
 .../ossim/support_data/ossimNitfBlockaTag.h        |   335 +
 ossim/include/ossim/support_data/ossimNitfCommon.h |   183 +
 .../support_data/ossimNitfCompressionHeader.h      |    36 +
 .../ossim/support_data/ossimNitfCsccgaTag.h        |     0
 .../ossim/support_data/ossimNitfCscrnaTag.h        |   185 +
 .../ossim/support_data/ossimNitfCsdidaTag.h        |   210 +
 .../ossim/support_data/ossimNitfCsexraTag.h        |   478 +
 .../ossim/support_data/ossimNitfCsproaTag.h        |     0
 .../support_data/ossimNitfDataExtensionSegment.h   |    53 +
 .../ossimNitfDataExtensionSegmentV2_0.h            |    88 +
 .../ossimNitfDataExtensionSegmentV2_1.h            |   115 +
 .../ossim/support_data/ossimNitfEmbeddedRpfDes.h   |    44 +
 .../ossim/support_data/ossimNitfEngrdaTag.h        |   149 +
 .../ossim/support_data/ossimNitfExoptaTag.h        |     0
 ossim/include/ossim/support_data/ossimNitfFile.h   |    93 +
 .../ossim/support_data/ossimNitfFileHeader.h       |   220 +
 .../ossim/support_data/ossimNitfFileHeaderV2_0.h   |   612 +
 .../ossim/support_data/ossimNitfFileHeaderV2_1.h   |   641 ++
 .../ossim/support_data/ossimNitfFileHeaderV2_X.h   |   255 +
 .../support_data/ossimNitfGeoPositioningTag.h      |   230 +
 .../ossim/support_data/ossimNitfHistoaTag.h        |     0
 .../ossim/support_data/ossimNitfIchipbTag.h        |     0
 .../ossim/support_data/ossimNitfImageBand.h        |    51 +
 .../ossim/support_data/ossimNitfImageBandV2_0.h    |   113 +
 .../ossim/support_data/ossimNitfImageBandV2_1.h    |    27 +
 .../support_data/ossimNitfImageDataMaskV2_1.h      |    37 +
 .../ossim/support_data/ossimNitfImageHeader.h      |   181 +
 .../ossim/support_data/ossimNitfImageHeaderV2_0.h  |   165 +
 .../ossim/support_data/ossimNitfImageHeaderV2_1.h  |   428 +
 .../ossim/support_data/ossimNitfImageHeaderV2_X.h  |     0
 .../ossim/support_data/ossimNitfImageLut.h         |     0
 .../ossim/support_data/ossimNitfImageLutV2_0.h     |     0
 .../ossim/support_data/ossimNitfImageLutV2_1.h     |     0
 ossim/include/ossim/support_data/ossimNitfInfo.h   |    60 +
 .../ossim/support_data/ossimNitfJ2klraTag.h        |   177 +
 .../ossim/support_data/ossimNitfLabelHeader.h      |     0
 .../ossim/support_data/ossimNitfLabelHeaderV2_0.h  |     0
 .../support_data/ossimNitfLocalCartographicTag.h   |     0
 .../support_data/ossimNitfLocalGeographicTag.h     |    81 +
 .../ossim/support_data/ossimNitfMstgtaTag.h        |   218 +
 .../support_data/ossimNitfNameConversionTables.h   |    30 +
 .../ossim/support_data/ossimNitfPiaimcTag.h        |   428 +
 .../support_data/ossimNitfProjectionParameterTag.h |   333 +
 .../ossim/support_data/ossimNitfRegisteredTag.h    |   125 +
 .../support_data/ossimNitfRegisteredTagFactory.h   |    30 +
 .../include/ossim/support_data/ossimNitfRpcATag.h  |    35 +
 .../include/ossim/support_data/ossimNitfRpcBTag.h  |    30 +
 .../include/ossim/support_data/ossimNitfRpcBase.h  |   544 +
 .../ossim/support_data/ossimNitfRpfTagFactory.h    |    40 +
 .../ossim/support_data/ossimNitfRsmecaTag.h        |   252 +
 .../ossim/support_data/ossimNitfRsmidaTag.h        |   233 +
 .../ossim/support_data/ossimNitfRsmpcaTag.h        |   129 +
 .../ossim/support_data/ossimNitfRsmpiaTag.h        |   109 +
 .../ossim/support_data/ossimNitfSensraTag.h        |   269 +
 .../ossim/support_data/ossimNitfStdidcTag.h        |   204 +
 .../ossim/support_data/ossimNitfSymbolHeader.h     |     0
 .../ossim/support_data/ossimNitfSymbolHeaderV2_0.h |     0
 .../ossim/support_data/ossimNitfTagFactory.h       |     0
 .../support_data/ossimNitfTagFactoryRegistry.h     |    49 +
 .../ossim/support_data/ossimNitfTagInformation.h   |    99 +
 .../ossim/support_data/ossimNitfTextHeader.h       |     0
 .../ossim/support_data/ossimNitfTextHeaderV2_0.h   |     0
 .../ossim/support_data/ossimNitfTextHeaderV2_1.h   |     0
 .../ossim/support_data/ossimNitfUnknownTag.h       |    84 +
 .../ossim/support_data/ossimNitfUse00aTag.h        |   283 +
 .../support_data/ossimNitfVqCompressionHeader.h    |    79 +
 .../include/ossim/support_data/ossimNmeaMessage.h  |    87 +
 .../ossim/support_data/ossimNmeaMessageSequencer.h |     0
 .../ossim/support_data/ossimPpjFrameSensorFile.h   |     0
 .../ossim/support_data/ossimQuickbirdMetaData.h    |   130 +
 .../ossim/support_data/ossimQuickbirdRpcHeader.h   |     0
 .../ossim/support_data/ossimQuickbirdTile.h        |     0
 .../support_data/ossimRpfAttributeOffsetRecord.h   |     0
 .../ossimRpfAttributeSectionSubheader.h            |     0
 .../ossim/support_data/ossimRpfAttributes.h        |   371 +
 .../support_data/ossimRpfBoundaryRectRecord.h      |     0
 .../ossimRpfBoundaryRectSectionSubheader.h         |     0
 .../ossim/support_data/ossimRpfBoundaryRectTable.h |     0
 .../ossimRpfColorConverterOffsetRecord.h           |     0
 .../ossimRpfColorConverterSubsection.h             |     0
 .../support_data/ossimRpfColorConverterTable.h     |     0
 .../ossimRpfColorGrayscaleOffsetRecord.h           |     0
 .../support_data/ossimRpfColorGrayscaleSubheader.h |     0
 .../support_data/ossimRpfColorGrayscaleTable.h     |     0
 .../ossim/support_data/ossimRpfComponentIdLut.h    |     0
 .../ossimRpfCompressionLookupOffsetRecord.h        |     0
 .../support_data/ossimRpfCompressionSection.h      |     0
 .../ossimRpfCompressionSectionSubheader.h          |     0
 .../ossim/support_data/ossimRpfConstants.h         |     0
 .../ossim/support_data/ossimRpfCoverageSection.h   |   163 +
 ossim/include/ossim/support_data/ossimRpfFrame.h   |   208 +
 .../ossim/support_data/ossimRpfFrameEntry.h        |    62 +
 .../support_data/ossimRpfFrameFileIndexRecord.h    |     0
 .../ossimRpfFrameFileIndexSectionSubheader.h       |     0
 .../ossimRpfFrameFileIndexSubsection.h             |     0
 .../ossim/support_data/ossimRpfFrameFileReader.h   |     0
 ossim/include/ossim/support_data/ossimRpfHeader.h  |   182 +
 .../ossimRpfImageDescriptionSubheader.h            |   128 +
 .../ossimRpfImageDisplayParameterSubheader.h       |     0
 ossim/include/ossim/support_data/ossimRpfInfo.h    |    63 +
 .../ossim/support_data/ossimRpfLocationSection.h   |   168 +
 .../ossim/support_data/ossimRpfMaskSubheader.h     |     0
 .../ossim/support_data/ossimRpfMaskSubsection.h    |     0
 .../ossim/support_data/ossimRpfPathnameRecord.h    |     0
 .../support_data/ossimRpfReplaceUpdateRecord.h     |     0
 .../ossimRpfReplaceUpdateSectionSubheader.h        |     0
 .../support_data/ossimRpfReplaceUpdateTable.h      |     0
 ossim/include/ossim/support_data/ossimRpfToc.h     |   230 +
 .../include/ossim/support_data/ossimRpfTocEntry.h  |   114 +
 .../ossim/support_data/ossimSpaceImagingGeom.h     |     0
 .../ossim/support_data/ossimSpotDimapSupportData.h |     0
 .../include}/ossim/support_data/ossimSrcRecord.h   |     0
 .../ossim/support_data/ossimSrtmFilename.h         |     0
 .../ossim/support_data/ossimSrtmSupportData.h      |   204 +
 .../ossim/support_data/ossimSupportFilesList.h     |    45 +
 ossim/include/ossim/support_data/ossimTiffInfo.h   |   772 ++
 ossim/include/ossim/support_data/ossimTiffWorld.h  |    81 +
 ossim/include/ossim/support_data/ossimWavelength.h |   107 +
 ossim/include/ossim/support_data/ossimWkt.h        |   112 +
 ossim/include/ossim/support_data/ossimXmpInfo.h    |   121 +
 ossim/include/ossim/util/ossimAutRegUtil.h         |   289 +
 ossim/include/ossim/util/ossimBatchTest.h          |   146 +
 ossim/include/ossim/util/ossimChipperUtil.h        |   768 ++
 ossim/include/ossim/util/ossimEquationUtil.h       |    61 +
 ossim/include/ossim/util/ossimFileWalker.h         |   223 +
 ossim/include/ossim/util/ossimHLZUtil.h            |   182 +
 ossim/include/ossim/util/ossimImageUtil.h          |   504 +
 ossim/include/ossim/util/ossimInfo.h               |   698 ++
 ossim/include/ossim/util/ossimRpfUtil.h            |    86 +
 ossim/include/ossim/util/ossimSlopeUtil.h          |    67 +
 ossim/include/ossim/util/ossimViewshedUtil.h       |   198 +
 .../ossim/vec/ossimVpfBoundingRecordTable.h        |     0
 .../include}/ossim/vec/ossimVpfCoverage.h          |     0
 .../include}/ossim/vec/ossimVpfDatabase.h          |     0
 .../include}/ossim/vec/ossimVpfDatabaseHeader.h    |     0
 .../vec/ossimVpfDatabaseHeaderTableValidator.h     |    18 +
 .../include}/ossim/vec/ossimVpfExtent.h            |     0
 .../include}/ossim/vec/ossimVpfFeatureClass.h      |     0
 .../ossim/vec/ossimVpfFeatureClassSchema.h         |     0
 .../include}/ossim/vec/ossimVpfLibrary.h           |     0
 .../vec/ossimVpfLibraryAttributeTableValidator.h   |     0
 .../include}/ossim/vec/ossimVpfTable.h             |     0
 ossim/include/ossim/vec/ossimVpfTableValidator.h   |    19 +
 ossim/include/ossim/vec/vpf.h                      |    36 +
 .../include}/ossim/video/ossimVideoGeometry.h      |     0
 .../include}/ossim/video/ossimVideoHandler.h       |     0
 .../include}/ossim/video/ossimVideoImageHandler.h  |     0
 .../include}/ossim/video/ossimVideoImageSource.h   |     0
 .../include}/ossim/video/ossimVideoSource.h        |     0
 .../include}/ossim/vpfutil/linklist.h              |     0
 {include => ossim/include}/ossim/vpfutil/machine.h |     0
 .../include}/ossim/vpfutil/mapgraph.h              |     0
 {include => ossim/include}/ossim/vpfutil/polygrf.h |     0
 .../include}/ossim/vpfutil/projectn.h              |     0
 .../include}/ossim/vpfutil/protomas.h              |     0
 {include => ossim/include}/ossim/vpfutil/set.h     |     0
 {include => ossim/include}/ossim/vpfutil/system.h  |     0
 ossim/include/ossim/vpfutil/values.h               |    92 +
 {include => ossim/include}/ossim/vpfutil/vpfapi.h  |     0
 {include => ossim/include}/ossim/vpfutil/vpfdisp.h |     0
 {include => ossim/include}/ossim/vpfutil/vpfdraw.h |     0
 {include => ossim/include}/ossim/vpfutil/vpfinit.h |     0
 {include => ossim/include}/ossim/vpfutil/vpfio.h   |     0
 {include => ossim/include}/ossim/vpfutil/vpfmisc.h |     0
 {include => ossim/include}/ossim/vpfutil/vpfprim.h |     0
 .../include}/ossim/vpfutil/vpfrelat.h              |     0
 .../include}/ossim/vpfutil/vpfselec.h              |     0
 .../include}/ossim/vpfutil/vpftable.h              |     0
 {include => ossim/include}/ossim/vpfutil/vpftidx.h |     0
 {include => ossim/include}/ossim/vpfutil/vpfview.h |     0
 {include => ossim/include}/ossim/vpfutil/xmemory.h |     0
 ossim/ossim_header.txt                             |     8 +
 .../packaging}/pkgconfig/ossim.pc.in               |     0
 .../projection/ossim_epsg_projections-v7_4.csv     |  3252 ++++++
 .../projection}/ossim_harn_state_plane_epsg.csv    |     0
 .../projection}/ossim_harn_state_plane_esri.csv    |     0
 .../ossim/projection/ossim_state_plane_readme.txt  |    76 +
 .../ossim/projection}/ossim_state_plane_spcs.csv   |     0
 .../share/ossim/projection}/ossim_wkt_pcs.csv      |     0
 .../LambertConformalConicProjection_template.geom  |     0
 {etc => ossim/share/ossim}/templates/applanix.geom |     0
 .../share/ossim}/templates/applanix_ecef.geom      |     0
 .../templates/applanix_ecef_camera_file_sn0056.kwl |    57 +
 .../ossim/templates/applanix_ecef_eo_example.txt   |   160 +
 .../share/ossim}/templates/applanix_utm.geom       |     0
 .../templates/applanix_utm_camera_file_sn0085D.kwl |    74 +
 .../ossim/templates/applanix_utm_eo_example.txt    |   115 +
 .../templates/bilinear_projection_template.geom    |     0
 .../templates/elevation_database_template.sql      |     0
 .../fgdc_metadata_file_writer_template.xml         |     0
 .../ossim}/templates/general_raster_template.omd   |     0
 .../templates/geographic_projection_template.geom  |     0
 ossim/share/ossim/templates/index_to_rgb.lut       |    85 +
 .../ossim}/templates/nitf-site-configuration.kwl   |     0
 .../share/ossim}/templates/orthoigen1.kwl          |     0
 .../share/ossim}/templates/orthoigen2.kwl          |     0
 ossim/share/ossim/templates/orthoigen3.kwl         |    49 +
 .../share/ossim}/templates/orthoigen4.kwl          |     0
 .../orthoigenTilingTemplateByOutputBytes.kwl       |     0
 .../templates/orthoigen_annotation_template.kwl    |     0
 .../share/ossim}/templates/orthoigen_srtm.kwl      |     0
 .../ossim}/templates/orthoigen_writer_template.kwl |     0
 .../ossim}/templates/ossim-batch-test-template.kwl |     0
 .../ossim-chipper-color-table-template.kwl         |    85 +
 .../templates/ossim-dem-example-commands.txt       |     0
 .../ossim/templates/ossim_preferences_template     |   585 +
 .../ossim}/templates/sample_applanix_camera.kwl    |     0
 .../share/ossim}/templates/shapefile_template.omd  |     0
 .../share/ossim}/templates/usgs_dem_template.kwl   |     0
 .../ossim/templates/utm_projection_template.geom   |    44 +
 ossim/share/ossim/util/ossimHlzApi.json            |    96 +
 ossim/share/ossim/util/ossimSlopeApi.json          |    39 +
 ossim/share/ossim/util/ossimViewshedApi.json       |    86 +
 {src => ossim/src}/apps/CMakeLists.txt             |     0
 ossim/src/apps/curl_apps/CMakeLists.txt            |    73 +
 ossim/src/apps/curl_apps/omar-data-mgr.cpp         |    72 +
 ossim/src/apps/curl_apps/omarDataMgrUtil.cpp       |   942 ++
 ossim/src/apps/curl_apps/omarDataMgrUtil.h         |   269 +
 .../src}/apps/ossim-adrg-dump/CMakeLists.txt       |     0
 {src => ossim/src}/apps/ossim-adrg-dump/Makefile   |     0
 .../src}/apps/ossim-adrg-dump/ossim-adrg-dump.cpp  |     0
 .../src}/apps/ossim-applanix2ogeom/CMakeLists.txt  |     0
 .../src}/apps/ossim-applanix2ogeom/Makefile        |     0
 .../src}/apps/ossim-applanix2ogeom/makefile.vc     |     0
 .../ossim-applanix2ogeom/ossim-applanix2ogeom.cpp  |   323 +
 ossim/src/apps/ossim-autreg/CMakeLists.txt         |     2 +
 ossim/src/apps/ossim-autreg/ossim-autreg.cpp       |    97 +
 .../src}/apps/ossim-band-merge/CMakeLists.txt      |     0
 {src => ossim/src}/apps/ossim-band-merge/Makefile  |     0
 .../src}/apps/ossim-band-merge/makefile.vc         |     0
 .../src/apps/ossim-band-merge/ossim-band-merge.cpp |   327 +
 .../src}/apps/ossim-batch-test/CMakeLists.txt      |     0
 .../apps/ossim-batch-test/ossim-batch-test.cpp     |     0
 {src => ossim/src}/apps/ossim-btoa/CMakeLists.txt  |     0
 {src => ossim/src}/apps/ossim-btoa/Makefile        |     0
 {src => ossim/src}/apps/ossim-btoa/makefile.vc     |     0
 {src => ossim/src}/apps/ossim-btoa/ossim-btoa.cpp  |     0
 .../src}/apps/ossim-chgkwval/CMakeLists.txt        |     0
 {src => ossim/src}/apps/ossim-chgkwval/Makefile    |     0
 {src => ossim/src}/apps/ossim-chgkwval/makefile.vc |     0
 ossim/src/apps/ossim-chgkwval/ossim-chgkwval.cpp   |    80 +
 .../src}/apps/ossim-chipper/CMakeLists.txt         |     0
 ossim/src/apps/ossim-chipper/ossim-chipper.cpp     |    92 +
 {src => ossim/src}/apps/ossim-cmm/CMakeLists.txt   |     0
 {src => ossim/src}/apps/ossim-cmm/Makefile         |     0
 {src => ossim/src}/apps/ossim-cmm/makefile.vc      |     0
 ossim/src/apps/ossim-cmm/ossim-cmm.cpp             |   496 +
 .../apps/ossim-computeSrtmStats/CMakeLists.txt     |     0
 .../src}/apps/ossim-computeSrtmStats/Makefile      |     0
 .../src}/apps/ossim-computeSrtmStats/makefile.vc   |     0
 .../ossim-computeSrtmStats.cpp                     |     0
 {src => ossim/src}/apps/ossim-config.in            |     0
 .../src}/apps/ossim-correl/CMakeLists.txt          |     0
 {src => ossim/src}/apps/ossim-correl/Makefile      |     0
 {src => ossim/src}/apps/ossim-correl/makefile.vc   |     0
 .../src}/apps/ossim-correl/ossim-correl.cpp        |     0
 .../src}/apps/ossim-create-bitmask/CMakeLists.txt  |     0
 .../ossim-create-bitmask/ossim-create-bitmask.cpp  |     0
 .../src}/apps/ossim-create-cg/CMakeLists.txt       |     0
 {src => ossim/src}/apps/ossim-create-cg/Makefile   |     0
 .../src}/apps/ossim-create-cg/makefile.vc          |     0
 ossim/src/apps/ossim-create-cg/ossim-create-cg.cpp |   144 +
 .../src}/apps/ossim-create-histo/CMakeLists.txt    |     0
 .../src}/apps/ossim-create-histo/Makefile          |     0
 .../src}/apps/ossim-create-histo/makefile.vc       |     0
 .../apps/ossim-create-histo/ossim-create-histo.cpp |   300 +
 .../src}/apps/ossim-deg2dms/CMakeLists.txt         |     0
 {src => ossim/src}/apps/ossim-deg2dms/Makefile     |     0
 {src => ossim/src}/apps/ossim-deg2dms/makefile.vc  |     0
 ossim/src/apps/ossim-deg2dms/ossim-deg2dms.cpp     |   113 +
 .../src}/apps/ossim-dms2deg/CMakeLists.txt         |     0
 {src => ossim/src}/apps/ossim-dms2deg/Makefile     |     0
 {src => ossim/src}/apps/ossim-dms2deg/makefile.vc  |     0
 ossim/src/apps/ossim-dms2deg/ossim-dms2deg.cpp     |   167 +
 .../src}/apps/ossim-dump-ocg/CMakeLists.txt        |     0
 {src => ossim/src}/apps/ossim-dump-ocg/Makefile    |     0
 {src => ossim/src}/apps/ossim-dump-ocg/makefile.vc |     0
 .../src}/apps/ossim-dump-ocg/ossim-dump-ocg.cpp    |     0
 ossim/src/apps/ossim-equation/CMakeLists.txt       |     2 +
 ossim/src/apps/ossim-equation/Makefile             |     3 +
 ossim/src/apps/ossim-equation/makefile.vc          |    11 +
 ossim/src/apps/ossim-equation/ossim-equation.cpp   |    28 +
 .../apps/ossim-extract-vertices/CMakeLists.txt     |     0
 .../src}/apps/ossim-extract-vertices/Makefile      |     0
 .../src}/apps/ossim-extract-vertices/makefile.vc   |     0
 .../ossim-extract-vertices.cpp                     |     0
 ossim/src/apps/ossim-hlz/CMakeLists.txt            |     2 +
 ossim/src/apps/ossim-hlz/Makefile                  |     3 +
 ossim/src/apps/ossim-hlz/makefile.vc               |    11 +
 ossim/src/apps/ossim-hlz/ossim-hlz.cpp             |    58 +
 {src => ossim/src}/apps/ossim-icp/CMakeLists.txt   |     0
 {src => ossim/src}/apps/ossim-icp/Makefile         |     0
 {src => ossim/src}/apps/ossim-icp/makefile.vc      |     0
 {src => ossim/src}/apps/ossim-icp/ossim-icp.cpp    |     0
 {src => ossim/src}/apps/ossim-igen/CMakeLists.txt  |     0
 {src => ossim/src}/apps/ossim-igen/Makefile        |     0
 {src => ossim/src}/apps/ossim-igen/makefile.vc     |     0
 {src => ossim/src}/apps/ossim-igen/ossim-igen.cpp  |     0
 .../src}/apps/ossim-image-compare/CMakeLists.txt   |     0
 .../ossim-image-compare/ossim-image-compare.cpp    |     0
 ossim/src/apps/ossim-image-synth/CMakeLists.txt    |     2 +
 ossim/src/apps/ossim-image-synth/Makefile          |     3 +
 ossim/src/apps/ossim-image-synth/makefile.vc       |    11 +
 .../apps/ossim-image-synth/ossim-image-synth.cpp   |   184 +
 .../src}/apps/ossim-img2md/CMakeLists.txt          |     0
 {src => ossim/src}/apps/ossim-img2md/Makefile      |     0
 {src => ossim/src}/apps/ossim-img2md/makefile.vc   |     0
 ossim/src/apps/ossim-img2md/ossim-img2md.cpp       |   160 +
 .../src}/apps/ossim-img2rr/CMakeLists.txt          |     0
 {src => ossim/src}/apps/ossim-img2rr/Makefile      |     0
 {src => ossim/src}/apps/ossim-img2rr/makefile.vc   |     0
 .../src}/apps/ossim-img2rr/ossim-img2rr.cpp        |     0
 {src => ossim/src}/apps/ossim-info/CMakeLists.txt  |     0
 {src => ossim/src}/apps/ossim-info/Makefile        |     0
 {src => ossim/src}/apps/ossim-info/makefile.vc     |     0
 ossim/src/apps/ossim-info/ossim-info.cpp           |    71 +
 .../src}/apps/ossim-modopt/CMakeLists.txt          |     0
 {src => ossim/src}/apps/ossim-modopt/Makefile      |     0
 {src => ossim/src}/apps/ossim-modopt/makefile.vc   |     0
 .../src}/apps/ossim-modopt/ossim-modopt.cpp        |     0
 .../src}/apps/ossim-mosaic/CMakeLists.txt          |     0
 {src => ossim/src}/apps/ossim-mosaic/Makefile      |     0
 {src => ossim/src}/apps/ossim-mosaic/makefile.vc   |     0
 .../src}/apps/ossim-mosaic/mosaic_usage.txt        |     0
 .../src}/apps/ossim-mosaic/ossim-mosaic.cpp        |     0
 .../src}/apps/ossim-ogeom2ogeom/CMakeLists.txt     |     0
 {src => ossim/src}/apps/ossim-ogeom2ogeom/Makefile |     0
 .../src}/apps/ossim-ogeom2ogeom/makefile.vc        |     0
 .../apps/ossim-ogeom2ogeom/ossim-ogeom2ogeom.cpp   |     0
 .../src}/apps/ossim-orthoigen/CMakeLists.txt       |     0
 {src => ossim/src}/apps/ossim-orthoigen/Makefile   |     0
 .../src}/apps/ossim-orthoigen/makefile.vc          |     0
 ossim/src/apps/ossim-orthoigen/ossim-orthoigen.cpp |   168 +
 ossim/src/apps/ossim-pc2dem/CMakeLists.txt         |     2 +
 .../src/apps/ossim-pc2dem}/Makefile                |     0
 .../src/apps/ossim-pc2dem}/makefile.vc             |     0
 ossim/src/apps/ossim-pc2dem/ossim-pc2dem.cpp       |   747 ++
 .../src}/apps/ossim-pixelflip/CMakeLists.txt       |     0
 {src => ossim/src}/apps/ossim-pixelflip/Makefile   |     0
 .../src}/apps/ossim-pixelflip/makefile.vc          |     0
 ossim/src/apps/ossim-pixelflip/ossim-pixelflip.cpp |   419 +
 .../src}/apps/ossim-preproc/CMakeLists.txt         |     0
 ossim/src/apps/ossim-preproc/ossim-preproc.cpp     |    87 +
 {src => ossim/src}/apps/ossim-prune/CMakeLists.txt |     0
 {src => ossim/src}/apps/ossim-prune/Makefile       |     0
 {src => ossim/src}/apps/ossim-prune/makefile.vc    |     0
 ossim/src/apps/ossim-prune/ossim-prune.cpp         |   133 +
 .../src}/apps/ossim-rejout/CMakeLists.txt          |     0
 {src => ossim/src}/apps/ossim-rejout/Makefile      |     0
 {src => ossim/src}/apps/ossim-rejout/makefile.vc   |     0
 .../src}/apps/ossim-rejout/ossim-rejout.cpp        |     0
 {src => ossim/src}/apps/ossim-rpf/CMakeLists.txt   |     0
 {src => ossim/src}/apps/ossim-rpf/Makefile         |     0
 {src => ossim/src}/apps/ossim-rpf/makefile.vc      |     0
 {src => ossim/src}/apps/ossim-rpf/ossim-rpf.cpp    |     0
 .../src}/apps/ossim-senint/CMakeLists.txt          |     0
 {src => ossim/src}/apps/ossim-senint/Makefile      |     0
 {src => ossim/src}/apps/ossim-senint/makefile.vc   |     0
 .../src}/apps/ossim-senint/ossim-senint.cpp        |     0
 ossim/src/apps/ossim-slope/CMakeLists.txt          |     2 +
 ossim/src/apps/ossim-slope/Makefile                |     3 +
 ossim/src/apps/ossim-slope/makefile.vc             |    11 +
 ossim/src/apps/ossim-slope/ossim-slope.cpp         |    38 +
 .../src}/apps/ossim-space-imaging/CMakeLists.txt   |     0
 .../src}/apps/ossim-space-imaging/Makefile         |     0
 .../src}/apps/ossim-space-imaging/makefile.vc      |     0
 .../ossim-space-imaging/ossim-space-imaging.cpp    |     0
 .../src}/apps/ossim-src2src/CMakeLists.txt         |     0
 ossim/src/apps/ossim-src2src/ossim-src2src.cpp     |   523 +
 .../src}/apps/ossim-swapbytes/CMakeLists.txt       |     0
 {src => ossim/src}/apps/ossim-swapbytes/Makefile   |     0
 .../src}/apps/ossim-swapbytes/makefile.vc          |     0
 .../src}/apps/ossim-swapbytes/ossim-swapbytes.cpp  |     0
 .../src}/apps/ossim-tfw2ogeom/CMakeLists.txt       |     0
 {src => ossim/src}/apps/ossim-tfw2ogeom/Makefile   |     0
 .../src}/apps/ossim-tfw2ogeom/makefile.vc          |     0
 .../src}/apps/ossim-tfw2ogeom/ossim-tfw2ogeom.cpp  |     0
 .../src}/apps/ossim-tfw2ogeom/template.kwl         |     0
 ossim/src/apps/ossim-viewshed/CMakeLists.txt       |     2 +
 ossim/src/apps/ossim-viewshed/Makefile             |     3 +
 ossim/src/apps/ossim-viewshed/makefile.vc          |    11 +
 ossim/src/apps/ossim-viewshed/ossim-viewshed.cpp   |    53 +
 ossim/src/apps/ossim-viirs-proc/CMakeLists.txt     |     2 +
 .../src/apps/ossim-viirs-proc/ossim-viirs-proc.cpp |   265 +
 .../src}/apps/ossim-ws-cmp/CMakeLists.txt          |     0
 {src => ossim/src}/apps/ossim-ws-cmp/Makefile      |     0
 {src => ossim/src}/apps/ossim-ws-cmp/makefile.vc   |     0
 ossim/src/apps/ossim-ws-cmp/ossim-ws-cmp.cpp       |   229 +
 .../src}/examples/tutorial/band_average.cpp        |     0
 .../src}/examples/tutorial/image_copy.cpp          |     0
 .../src}/examples/tutorial/image_copy_b1.cpp       |     0
 .../src}/examples/tutorial/image_data.cpp          |     0
 .../src}/examples/tutorial/image_open.cpp          |     0
 {src => ossim/src}/examples/tutorial/kwl.cpp       |     0
 .../src}/examples/tutorial/ossim_preferences       |     0
 {src => ossim/src}/examples/tutorial/reproject.cpp |     0
 .../writing_your_own_image_processing_filter.html  |     0
 ossim/src/ossim/CMakeLists.txt                     |   146 +
 {src => ossim/src}/ossim/base/ellips.dat           |     0
 {src => ossim/src}/ossim/base/makefile.vc          |     0
 .../src}/ossim/base/ossim2dBilinearTransform.cpp   |     0
 .../src}/ossim/base/ossim2dLinearRegression.cpp    |     0
 .../ossim/base/ossim2dTo2dIdentityTransform.cpp    |     0
 .../src/ossim/base/ossim2dTo2dMatrixTransform.cpp  |   184 +
 .../src}/ossim/base/ossim2dTo2dShiftTransform.cpp  |     0
 ossim/src/ossim/base/ossim2dTo2dTransform.cpp      |   281 +
 .../src/ossim/base/ossim2dTo2dTransformFactory.cpp |    67 +
 .../ossim/base/ossim2dTo2dTransformRegistry.cpp    |    27 +
 .../src}/ossim/base/ossimActiveEdgeTable.cpp       |     0
 .../src}/ossim/base/ossimAdjSolutionAttributes.cpp |     0
 .../ossim/base/ossimAdjustableParameterInfo.cpp    |     0
 .../base/ossimAdjustableParameterInterface.cpp     |   894 ++
 ossim/src/ossim/base/ossimAdjustmentExecutive.cpp  |   784 ++
 .../src}/ossim/base/ossimAdjustmentInfo.cpp        |     0
 .../src}/ossim/base/ossimAffineTransform.cpp       |     0
 ossim/src/ossim/base/ossimApplicationUsage.cpp     |   216 +
 ossim/src/ossim/base/ossimArgumentParser.cpp       |   574 +
 ossim/src/ossim/base/ossimBaseObjectFactory.cpp    |    61 +
 {src => ossim/src}/ossim/base/ossimBilSplitter.cpp |     0
 ossim/src/ossim/base/ossimBinaryDataProperty.cpp   |    40 +
 .../src}/ossim/base/ossimBooleanProperty.cpp       |     0
 .../src}/ossim/base/ossimByteStreamBuffer.cpp      |     0
 {src => ossim/src}/ossim/base/ossimCmyVector.cpp   |     0
 .../src}/ossim/base/ossimColorProperty.cpp         |     0
 .../src}/ossim/base/ossimColumnVector3d.cpp        |     0
 ossim/src/ossim/base/ossimCommon.cpp               |  1130 ++
 .../src}/ossim/base/ossimConnectableContainer.cpp  |     0
 .../base/ossimConnectableContainerInterface.cpp    |     0
 .../ossim/base/ossimConnectableDisplayListener.cpp |   180 +
 .../src}/ossim/base/ossimConnectableObject.cpp     |     0
 .../ossim/base/ossimConnectableObjectListener.cpp  |   113 +
 .../src}/ossim/base/ossimConnectionEvent.cpp       |     0
 ossim/src/ossim/base/ossimContainerEvent.cpp       |    32 +
 .../src}/ossim/base/ossimContainerProperty.cpp     |     0
 {src => ossim/src}/ossim/base/ossimCplUtil.cpp     |     0
 {src => ossim/src}/ossim/base/ossimCsvFile.cpp     |     0
 .../src}/ossim/base/ossimCustomEditorWindow.cpp    |     0
 .../base/ossimCustomEditorWindowFactoryBase.cpp    |     0
 .../ossim/base/ossimCustomEditorWindowRegistry.cpp |     0
 ossim/src/ossim/base/ossimDataObject.cpp           |   191 +
 ossim/src/ossim/base/ossimDate.cpp                 |  1140 ++
 ossim/src/ossim/base/ossimDateProperty.cpp         |   146 +
 {src => ossim/src}/ossim/base/ossimDatum.cpp       |     0
 ossim/src/ossim/base/ossimDatumFactory.cpp         |   363 +
 ossim/src/ossim/base/ossimDatumFactory.inc         |   287 +
 ossim/src/ossim/base/ossimDatumFactoryRegistry.cpp |    98 +
 ossim/src/ossim/base/ossimDblGrid.cpp              |  1225 ++
 ossim/src/ossim/base/ossimDirectory.cpp            |   320 +
 .../src}/ossim/base/ossimDirectoryData.cpp         |     0
 .../src}/ossim/base/ossimDirectoryTree.cpp         |     0
 .../src}/ossim/base/ossimDisplayEventListener.cpp  |     0
 ossim/src/ossim/base/ossimDisplayInterface.cpp     |    32 +
 .../src}/ossim/base/ossimDisplayListEvent.cpp      |     0
 .../src}/ossim/base/ossimDisplayRefreshEvent.cpp   |     0
 {src => ossim/src}/ossim/base/ossimDms.cpp         |     0
 .../src}/ossim/base/ossimDoubleGridProperty.cpp    |     0
 {src => ossim/src}/ossim/base/ossimDpt.cpp         |     0
 ossim/src/ossim/base/ossimDpt3d.cpp                |   207 +
 ossim/src/ossim/base/ossimDrect.cpp                |   854 ++
 ossim/src/ossim/base/ossimDuration.cpp             |   270 +
 .../src}/ossim/base/ossimEbcdicToAscii.cpp         |     0
 {src => ossim/src}/ossim/base/ossimEcefPoint.cpp   |     0
 {src => ossim/src}/ossim/base/ossimEcefRay.cpp     |     0
 {src => ossim/src}/ossim/base/ossimEcefVector.cpp  |     0
 .../src}/ossim/base/ossimElevationManagerEvent.cpp |     0
 .../base/ossimElevationManagerEventListener.cpp    |     0
 ossim/src/ossim/base/ossimEllipsoid.cpp            |   691 ++
 ossim/src/ossim/base/ossimEllipsoidFactory.cpp     |   243 +
 {src => ossim/src}/ossim/base/ossimEndian.cpp      |     0
 .../src}/ossim/base/ossimEnvironmentUtility.cpp    |     0
 ossim/src/ossim/base/ossimEpsgDatumFactory.cpp     |   243 +
 ossim/src/ossim/base/ossimEquTokenizer.cpp         |  1817 +++
 {src => ossim/src}/ossim/base/ossimEquTokenizer.l  |     0
 {src => ossim/src}/ossim/base/ossimErrorCodes.cpp  |     0
 .../src}/ossim/base/ossimErrorStatusInterface.cpp  |     0
 {src => ossim/src}/ossim/base/ossimEvent.cpp       |     0
 {src => ossim/src}/ossim/base/ossimException.cpp   |     0
 .../src}/ossim/base/ossimFactoryBaseTemplate.cpp   |     0
 ossim/src/ossim/base/ossimFilename.cpp             |  1338 +++
 .../src}/ossim/base/ossimFilenameProperty.cpp      |     0
 .../src}/ossim/base/ossimFontInformation.cpp       |     0
 .../src}/ossim/base/ossimFontProperty.cpp          |     0
 {src => ossim/src}/ossim/base/ossimFpt.cpp         |     0
 {src => ossim/src}/ossim/base/ossimFpt3d.cpp       |     0
 ossim/src/ossim/base/ossimGeoPolygon.cpp           |   402 +
 .../ossim/base/ossimGeoTiffCoordTransformsLut.cpp  |     0
 ossim/src/ossim/base/ossimGeoTiffDatumLut.cpp      |   121 +
 {src => ossim/src}/ossim/base/ossimGeocent.c       |     0
 .../src}/ossim/base/ossimGeodeticEvaluator.cpp     |     0
 {src => ossim/src}/ossim/base/ossimGeoid.cpp       |     0
 ossim/src/ossim/base/ossimGeoidEgm96.cpp           |   315 +
 ossim/src/ossim/base/ossimGeoidImage.cpp           |   364 +
 ossim/src/ossim/base/ossimGeoidManager.cpp         |   349 +
 ossim/src/ossim/base/ossimGeoidNgs.cpp             |   274 +
 .../src}/ossim/base/ossimGeoidNgsHeader.cpp        |     0
 {src => ossim/src}/ossim/base/ossimGeoref.cpp      |     0
 {src => ossim/src}/ossim/base/ossimGpt.cpp         |     0
 ossim/src/ossim/base/ossimGrect.cpp                |   320 +
 {src => ossim/src}/ossim/base/ossimGzStream.cpp    |     0
 {src => ossim/src}/ossim/base/ossimHexString.cpp   |     0
 ossim/src/ossim/base/ossimHistogram.cpp            |  1612 +++
 ossim/src/ossim/base/ossimHistogramSource.cpp      |   107 +
 {src => ossim/src}/ossim/base/ossimHsiVector.cpp   |     0
 {src => ossim/src}/ossim/base/ossimHsvVector.cpp   |     0
 {src => ossim/src}/ossim/base/ossimHttpRequest.cpp |     0
 .../src}/ossim/base/ossimHttpResponse.cpp          |     0
 {src => ossim/src}/ossim/base/ossimId.cpp          |     0
 {src => ossim/src}/ossim/base/ossimIdManager.cpp   |     0
 .../src}/ossim/base/ossimImageAoiListener.cpp      |     0
 .../src}/ossim/base/ossimImageGeometryEvent.cpp    |     0
 .../ossim/base/ossimImageGeometryEventListener.cpp |     0
 .../src}/ossim/base/ossimImageTypeLut.cpp          |     0
 .../src}/ossim/base/ossimInterleaveTypeLut.cpp     |     0
 ossim/src/ossim/base/ossimIoStream.cpp             |   533 +
 {src => ossim/src}/ossim/base/ossimIpt.cpp         |     0
 {src => ossim/src}/ossim/base/ossimIrect.cpp       |     0
 .../src}/ossim/base/ossimJpegYCbCrVector.cpp       |     0
 {src => ossim/src}/ossim/base/ossimKeyword.cpp     |     0
 ossim/src/ossim/base/ossimKeywordNames.cpp         |   198 +
 ossim/src/ossim/base/ossimKeywordlist.cpp          |  1411 +++
 .../src}/ossim/base/ossimLagrangeInterpolator.cpp  |     0
 .../src}/ossim/base/ossimLeastSquaresBilin.cpp     |     0
 ossim/src/ossim/base/ossimLeastSquaresPlane.cpp    |   128 +
 {src => ossim/src}/ossim/base/ossimLine.cpp        |     0
 ossim/src/ossim/base/ossimListener.cpp             |    52 +
 .../src}/ossim/base/ossimListenerManager.cpp       |     0
 {src => ossim/src}/ossim/base/ossimLookUpTable.cpp |     0
 {src => ossim/src}/ossim/base/ossimLsrPoint.cpp    |     0
 {src => ossim/src}/ossim/base/ossimLsrRay.cpp      |     0
 {src => ossim/src}/ossim/base/ossimLsrSpace.cpp    |     0
 {src => ossim/src}/ossim/base/ossimLsrVector.cpp   |     0
 {src => ossim/src}/ossim/base/ossimMatrix3x3.cpp   |     0
 {src => ossim/src}/ossim/base/ossimMatrix4x4.cpp   |     0
 .../src}/ossim/base/ossimMatrixProperty.cpp        |     0
 {src => ossim/src}/ossim/base/ossimMouseEvent.cpp  |     0
 .../src}/ossim/base/ossimMouseListener.cpp         |     0
 .../src}/ossim/base/ossimMultiBandHistogram.cpp    |     0
 .../ossim/base/ossimMultiResLevelHistogram.cpp     |     0
 .../src}/ossim/base/ossimNBandLutDataObject.cpp    |     0
 .../src}/ossim/base/ossimNadconGridDatum.cpp       |     0
 .../src}/ossim/base/ossimNadconGridFile.cpp        |     0
 .../src}/ossim/base/ossimNadconGridHeader.cpp      |     0
 .../src}/ossim/base/ossimNadconNarDatum.cpp        |     0
 .../src}/ossim/base/ossimNadconNasDatum.cpp        |     0
 ossim/src/ossim/base/ossimNormRgbVector.cpp        |   183 +
 ossim/src/ossim/base/ossimNotify.cpp               |   436 +
 .../src}/ossim/base/ossimNumericProperty.cpp       |     0
 ossim/src/ossim/base/ossimObject.cpp               |   133 +
 .../ossim/base/ossimObjectDestructingEvent.cpp     |     0
 .../src}/ossim/base/ossimObjectFactory.cpp         |     0
 .../src/ossim/base/ossimObjectFactoryRegistry.cpp  |   175 +
 ossim/src/ossim/base/ossimObservationSet.cpp       |   228 +
 .../src}/ossim/base/ossimOutputSource.cpp          |     0
 {src => ossim/src}/ossim/base/ossimPackedBits.cpp  |     0
 .../src}/ossim/base/ossimPointObservation.cpp      |     0
 ossim/src/ossim/base/ossimPolyArea2d.cpp           |   837 ++
 ossim/src/ossim/base/ossimPolyLine.cpp             |   561 +
 ossim/src/ossim/base/ossimPolygon.cpp              |  1267 +++
 {src => ossim/src}/ossim/base/ossimPreferences.cpp |     0
 ossim/src/ossim/base/ossimProcessInterface.cpp     |   145 +
 ossim/src/ossim/base/ossimProcessListener.cpp      |    45 +
 ossim/src/ossim/base/ossimProcessProgressEvent.cpp |    69 +
 {src => ossim/src}/ossim/base/ossimProperty.cpp    |     0
 .../src}/ossim/base/ossimPropertyInterface.cpp     |     0
 .../ossim/base/ossimPropertyInterfaceFactory.cpp   |     0
 .../ossim/base/ossimPropertyInterfaceRegistry.cpp  |     0
 ossim/src/ossim/base/ossimQuadTreeWarp.cpp         |  1651 +++
 .../src}/ossim/base/ossimQuadrilateralMap.cpp      |     0
 {src => ossim/src}/ossim/base/ossimQuaternion.cpp  |     0
 {src => ossim/src}/ossim/base/ossimROIEvent.cpp    |     0
 .../src}/ossim/base/ossimROIEventListener.cpp      |     0
 .../src}/ossim/base/ossimRationalNumber.cpp        |     0
 ossim/src/ossim/base/ossimRectanglePartitioner.cpp |   249 +
 .../src/ossim/base/ossimRectilinearDataObject.cpp  |   309 +
 {src => ossim/src}/ossim/base/ossimReferenced.cpp  |     0
 .../src}/ossim/base/ossimRefreshEvent.cpp          |     0
 ossim/src/ossim/base/ossimRegExp.cpp               |  1299 +++
 ossim/src/ossim/base/ossimRgbLutDataObject.cpp     |   280 +
 {src => ossim/src}/ossim/base/ossimRgbVector.cpp   |     0
 ossim/src/ossim/base/ossimRtti.cpp                 |   153 +
 .../src}/ossim/base/ossimScalarTypeLut.cpp         |     0
 .../src}/ossim/base/ossimSevenParamDatum.cpp       |     0
 ossim/src/ossim/base/ossimSource.cpp               |   168 +
 .../src}/ossim/base/ossimStateChangedEvent.cpp     |     0
 ossim/src/ossim/base/ossimStdOutProgress.cpp       |    62 +
 {src => ossim/src}/ossim/base/ossimStreamBase.cpp  |     0
 ossim/src/ossim/base/ossimStreamFactory.cpp        |    94 +
 .../src/ossim/base/ossimStreamFactoryRegistry.cpp  |    75 +
 ossim/src/ossim/base/ossimString.cpp               |  1088 ++
 .../src}/ossim/base/ossimStringListProperty.cpp    |     0
 ossim/src/ossim/base/ossimStringProperty.cpp       |   127 +
 {src => ossim/src}/ossim/base/ossimTDpt.cpp        |     0
 ossim/src/ossim/base/ossimTempFilename.cpp         |   116 +
 .../src}/ossim/base/ossimTextProperty.cpp          |     0
 .../src}/ossim/base/ossimThinPlateSpline.cpp       |     0
 .../src}/ossim/base/ossimThreeParamDatum.cpp       |     0
 {src => ossim/src}/ossim/base/ossimTieGpt.cpp      |     0
 {src => ossim/src}/ossim/base/ossimTieGptSet.cpp   |     0
 ossim/src/ossim/base/ossimTileHash.cpp             |   124 +
 ossim/src/ossim/base/ossimTiledImageHash.cpp       |   141 +
 {src => ossim/src}/ossim/base/ossimTimer.cpp       |     0
 ossim/src/ossim/base/ossimTrace.cpp                |    41 +
 ossim/src/ossim/base/ossimTraceManager.cpp         |   106 +
 ossim/src/ossim/base/ossimUnitConversionTool.cpp   |   436 +
 ossim/src/ossim/base/ossimUnitTypeLut.cpp          |   100 +
 {src => ossim/src}/ossim/base/ossimUrl.cpp         |     0
 {src => ossim/src}/ossim/base/ossimUsgsQuad.cpp    |     0
 .../src}/ossim/base/ossimViewController.cpp        |     0
 {src => ossim/src}/ossim/base/ossimViewEvent.cpp   |     0
 .../src}/ossim/base/ossimViewInterface.cpp         |     0
 .../src}/ossim/base/ossimViewListener.cpp          |     0
 ossim/src/ossim/base/ossimVisitor.cpp              |   419 +
 ossim/src/ossim/base/ossimVrect.cpp                |    42 +
 .../src}/ossim/base/ossimWLSBundleSolution.cpp     |     0
 {src => ossim/src}/ossim/base/ossimWebRequest.cpp  |     0
 .../src}/ossim/base/ossimWebRequestFactoryBase.cpp |     0
 .../ossim/base/ossimWebRequestFactoryRegistry.cpp  |     0
 {src => ossim/src}/ossim/base/ossimWebResponse.cpp |     0
 ossim/src/ossim/base/ossimWgs72Datum.cpp           |   207 +
 ossim/src/ossim/base/ossimWgs84Datum.cpp           |    66 +
 {src => ossim/src}/ossim/base/ossimWms.cpp         |     0
 ossim/src/ossim/base/ossimXmlAttribute.cpp         |   247 +
 ossim/src/ossim/base/ossimXmlDocument.cpp          |   431 +
 {src => ossim/src}/ossim/base/ossimXmlNode.cpp     |     0
 ossim/src/ossim/base/ossimXmlString.cpp            |    98 +
 {src => ossim/src}/ossim/dll_main/Makefile         |     0
 {src => ossim/src}/ossim/dll_main/makefile.vc      |     0
 {src => ossim/src}/ossim/dll_main/ossimDllMain.cpp |     0
 {src => ossim/src}/ossim/elevation/makefile.vc     |     0
 .../ossim/elevation/ossimDtedElevationDatabase.cpp |   260 +
 .../src}/ossim/elevation/ossimDtedFactory.cpp      |     0
 .../src}/ossim/elevation/ossimDtedHandler.cpp      |     0
 ossim/src/ossim/elevation/ossimElevCellHandler.cpp |   103 +
 .../elevation/ossimElevCellHandlerFactory.cpp      |   131 +
 ossim/src/ossim/elevation/ossimElevManager.cpp     |   656 ++
 ossim/src/ossim/elevation/ossimElevSource.cpp      |   276 +
 .../src/ossim/elevation/ossimElevSourceFactory.cpp |    44 +
 .../ossim/elevation/ossimElevationCellDatabase.cpp |   171 +
 .../src/ossim/elevation/ossimElevationDatabase.cpp |    61 +
 .../elevation/ossimElevationDatabaseFactory.cpp    |   115 +
 .../elevation/ossimElevationDatabaseRegistry.cpp   |    54 +
 .../elevation/ossimGeneralRasterElevFactory.cpp    |     0
 .../elevation/ossimGeneralRasterElevHandler.cpp    |   725 ++
 .../ossimGeneralRasterElevationDatabase.cpp        |   156 +
 {src => ossim/src}/ossim/elevation/ossimHgtRef.cpp |     0
 .../elevation/ossimImageElevationDatabase.cpp      |   468 +
 .../ossim/elevation/ossimImageElevationHandler.cpp |   260 +
 .../ossim/elevation/ossimSrtmElevationDatabase.cpp |   243 +
 .../src}/ossim/elevation/ossimSrtmFactory.cpp      |     0
 ossim/src/ossim/elevation/ossimSrtmHandler.cpp     |   497 +
 .../elevation/ossimTiledElevationDatabase.cpp      |   656 ++
 {src => ossim/src}/ossim/font/makefile.vc          |     0
 {src => ossim/src}/ossim/font/ossimFont.cpp        |     0
 .../src}/ossim/font/ossimFontFactoryRegistry.cpp   |     0
 .../src}/ossim/font/ossimFreeTypeFont.cpp          |     0
 .../src}/ossim/font/ossimFreeTypeFontFactory.cpp   |     0
 .../src}/ossim/font/ossimGdBitmapFont.cpp          |     0
 {src => ossim/src}/ossim/imaging/makefile.vc       |     0
 .../ossim/imaging/ossim3x3ConvolutionFilter.cpp    |   634 ++
 ossim/src/ossim/imaging/ossimAOD.cpp               |   238 +
 .../src}/ossim/imaging/ossimAdrgHeader.cpp         |     0
 .../src}/ossim/imaging/ossimAdrgTileSource.cpp     |     0
 .../ossim/imaging/ossimAnnotationEllipseObject.cpp |     0
 .../ossim/imaging/ossimAnnotationFontObject.cpp    |     0
 .../ossim/imaging/ossimAnnotationGdBitmapFont.cpp  |     0
 .../ossim/imaging/ossimAnnotationLineObject.cpp    |   185 +
 .../imaging/ossimAnnotationMultiEllipseObject.cpp  |     0
 .../imaging/ossimAnnotationMultiLineObject.cpp     |   192 +
 .../imaging/ossimAnnotationMultiPolyLineObject.cpp |     0
 .../imaging/ossimAnnotationMultiPolyObject.cpp     |     0
 .../src}/ossim/imaging/ossimAnnotationObject.cpp   |     0
 .../ossim/imaging/ossimAnnotationObjectFactory.cpp |     0
 .../ossim/imaging/ossimAnnotationPolyObject.cpp    |     0
 .../src}/ossim/imaging/ossimAnnotationSource.cpp   |     0
 ossim/src/ossim/imaging/ossimAppFixedTileCache.cpp |   431 +
 ossim/src/ossim/imaging/ossimAppTileCache.cpp      |   303 +
 ossim/src/ossim/imaging/ossimArcInfoGridWriter.cpp |   371 +
 .../src}/ossim/imaging/ossimAtCorrGridRemapper.cpp |     0
 ossim/src/ossim/imaging/ossimAtCorrRemapper.cpp    |   731 ++
 .../src}/ossim/imaging/ossimAtbController.cpp      |     0
 .../src}/ossim/imaging/ossimAtbMatchPoint.cpp      |     0
 .../src}/ossim/imaging/ossimAtbPointSource.cpp     |     0
 ossim/src/ossim/imaging/ossimBandAverageFilter.cpp |   395 +
 ossim/src/ossim/imaging/ossimBandClipFilter.cpp    |   699 ++
 ossim/src/ossim/imaging/ossimBandMergeSource.cpp   |   287 +
 ossim/src/ossim/imaging/ossimBandSelector.cpp      |   713 ++
 .../src/ossim/imaging/ossimBandSeparateHandler.cpp |   284 +
 ossim/src/ossim/imaging/ossimBitMaskTileSource.cpp |   386 +
 ossim/src/ossim/imaging/ossimBitMaskWriter.cpp     |   482 +
 .../src}/ossim/imaging/ossimBlendMosaic.cpp        |     0
 .../imaging/ossimBrightnessContrastSource.cpp      |     0
 ossim/src/ossim/imaging/ossimBrightnessMatch.cpp   |   248 +
 .../src/ossim/imaging/ossimBumpShadeTileSource.cpp |   539 +
 .../src}/ossim/imaging/ossimCacheTileSource.cpp    |     0
 .../ossim/imaging/ossimCastTileSourceFilter.cpp    |   689 ++
 {src => ossim/src}/ossim/imaging/ossimCcfHead.cpp  |     0
 ossim/src/ossim/imaging/ossimCcfTileSource.cpp     |   902 ++
 .../src/ossim/imaging/ossimCibCadrgTileSource.cpp  |  1334 +++
 .../ossim/imaging/ossimClosestToCenterCombiner.cpp |   143 +
 ossim/src/ossim/imaging/ossimCodecBase.cpp         |     3 +
 ossim/src/ossim/imaging/ossimCodecFactory.cpp      |    84 +
 .../ossim/imaging/ossimCodecFactoryInterface.cpp   |    14 +
 .../ossim/imaging/ossimCodecFactoryRegistry.cpp    |    55 +
 .../ossim/imaging/ossimColorNormalizedFusion.cpp   |   146 +
 .../src/ossim/imaging/ossimConvolutionFilter1D.cpp |   669 ++
 ossim/src/ossim/imaging/ossimConvolutionSource.cpp |   527 +
 {src => ossim/src}/ossim/imaging/ossimDdffield.cpp |     0
 ossim/src/ossim/imaging/ossimDdffielddefn.cpp      |   867 ++
 .../src}/ossim/imaging/ossimDdfmodule.cpp          |     0
 .../src}/ossim/imaging/ossimDdfrecord.cpp          |     0
 ossim/src/ossim/imaging/ossimDdfsubfielddefn.cpp   |   997 ++
 {src => ossim/src}/ossim/imaging/ossimDdfutils.cpp |     0
 ossim/src/ossim/imaging/ossimDespeckleFilter.cpp   |   237 +
 ossim/src/ossim/imaging/ossimDilationFilter.cpp    |   308 +
 .../ossim/imaging/ossimDiscrete3x3HatFilter.cpp    |     0
 .../imaging/ossimDiscreteConvolutionKernel.cpp     |     0
 ossim/src/ossim/imaging/ossimDoqqTileSource.cpp    |   261 +
 ossim/src/ossim/imaging/ossimDtedTileSource.cpp    |   683 ++
 .../src}/ossim/imaging/ossimERSFileWriter.cpp      |     0
 ossim/src/ossim/imaging/ossimERSTileSource.cpp     |   220 +
 .../ossim/imaging/ossimEastingNorthingCutter.cpp   |   203 +
 ossim/src/ossim/imaging/ossimEdgeFilter.cpp        |   650 ++
 ossim/src/ossim/imaging/ossimElevImageSource.cpp   |   822 ++
 .../ossim/imaging/ossimEnviHeaderFileWriter.cpp    |   102 +
 .../src}/ossim/imaging/ossimEnviTileSource.cpp     |     0
 ossim/src/ossim/imaging/ossimEquationCombiner.cpp  |  3573 ++++++
 .../ossim/imaging/ossimEsriShapeFileInterface.cpp  |     0
 ossim/src/ossim/imaging/ossimFeatherMosaic.cpp     |   476 +
 ossim/src/ossim/imaging/ossimFftFilter.cpp         |   473 +
 ossim/src/ossim/imaging/ossimFgdcFileWriter.cpp    |   956 ++
 ossim/src/ossim/imaging/ossimFilter.cpp            |   334 +
 ossim/src/ossim/imaging/ossimFilterResampler.cpp   |   951 ++
 ossim/src/ossim/imaging/ossimFilterTable.cpp       |   148 +
 .../src}/ossim/imaging/ossimFixedTileCache.cpp     |     0
 .../src}/ossim/imaging/ossimFusionCombiner.cpp     |     0
 ossim/src/ossim/imaging/ossimGammaRemapper.cpp     |   435 +
 ossim/src/ossim/imaging/ossimGeneralRasterInfo.cpp |  1299 +++
 .../ossim/imaging/ossimGeneralRasterTileSource.cpp |  1601 +++
 .../ossim/imaging/ossimGeneralRasterWriter.cpp     |     0
 .../src/ossim/imaging/ossimGeoAnnotationBitmap.cpp |   205 +
 .../imaging/ossimGeoAnnotationEllipseObject.cpp    |     0
 .../ossim/imaging/ossimGeoAnnotationFontObject.cpp |     0
 .../imaging/ossimGeoAnnotationGdBitmapFont.cpp     |     0
 .../ossim/imaging/ossimGeoAnnotationLineObject.cpp |     0
 .../ossimGeoAnnotationMultiEllipseObject.cpp       |   181 +
 .../ossimGeoAnnotationMultiPolyLineObject.cpp      |     0
 .../imaging/ossimGeoAnnotationMultiPolyObject.cpp  |     0
 .../ossim/imaging/ossimGeoAnnotationObject.cpp     |     0
 .../imaging/ossimGeoAnnotationPolyLineObject.cpp   |     0
 .../ossim/imaging/ossimGeoAnnotationPolyObject.cpp |     0
 .../ossim/imaging/ossimGeoAnnotationSource.cpp     |     0
 ossim/src/ossim/imaging/ossimGeoPolyCutter.cpp     |   375 +
 .../imaging/ossimGeographicAnnotationGrid.cpp      |     0
 .../src}/ossim/imaging/ossimGeomFileWriter.cpp     |     0
 .../src}/ossim/imaging/ossimGridRemapEngine.cpp    |     0
 .../ossim/imaging/ossimGridRemapEngineFactory.cpp  |    45 +
 .../src}/ossim/imaging/ossimGridRemapSource.cpp    |     0
 .../src/ossim/imaging/ossimHistoMatchRemapper.cpp  |   350 +
 .../ossim/imaging/ossimHistogramEqualization.cpp   |   539 +
 .../ossim/imaging/ossimHistogramMatchFilter.cpp    |     0
 ossim/src/ossim/imaging/ossimHistogramRemapper.cpp |  2065 ++++
 .../imaging/ossimHistogramThreshholdFilter.cpp     |   261 +
 ossim/src/ossim/imaging/ossimHistogramWriter.cpp   |   310 +
 ossim/src/ossim/imaging/ossimHsiRemapper.cpp       |  3193 ++++++
 ossim/src/ossim/imaging/ossimHsiToRgbSource.cpp    |   148 +
 .../src/ossim/imaging/ossimHsvGridRemapEngine.cpp  |   277 +
 ossim/src/ossim/imaging/ossimHsvToRgbSource.cpp    |   160 +
 ossim/src/ossim/imaging/ossimIgenGenerator.cpp     |   682 ++
 ossim/src/ossim/imaging/ossimImageCacheBase.cpp    |   662 ++
 .../ossim/imaging/ossimImageCacheTileSource.cpp    |   438 +
 ossim/src/ossim/imaging/ossimImageChain.cpp        |  1834 +++
 ossim/src/ossim/imaging/ossimImageCombiner.cpp     |   688 ++
 ossim/src/ossim/imaging/ossimImageData.cpp         |  7326 ++++++++++++
 ossim/src/ossim/imaging/ossimImageDataFactory.cpp  |   260 +
 ossim/src/ossim/imaging/ossimImageDataHelper.cpp   |   608 +
 .../src}/ossim/imaging/ossimImageDisplayWriter.cpp |     0
 ossim/src/ossim/imaging/ossimImageFileWriter.cpp   |  1653 +++
 .../src/ossim/imaging/ossimImageGaussianFilter.cpp |   246 +
 ossim/src/ossim/imaging/ossimImageGeometry.cpp     |  1750 +++
 .../ossim/imaging/ossimImageGeometryFactory.cpp    |   228 +
 .../ossim/imaging/ossimImageGeometryRegistry.cpp   |    75 +
 ossim/src/ossim/imaging/ossimImageHandler.cpp      |  1689 +++
 .../src/ossim/imaging/ossimImageHandlerFactory.cpp |   905 ++
 .../ossim/imaging/ossimImageHandlerFactoryBase.cpp |    36 +
 .../ossim/imaging/ossimImageHandlerRegistry.cpp    |   283 +
 .../ossim/imaging/ossimImageHistogramSource.cpp    |   524 +
 .../src}/ossim/imaging/ossimImageMetaData.cpp      |     0
 .../imaging/ossimImageMetaDataWriterFactory.cpp    |     0
 .../ossimImageMetaDataWriterFactoryBase.cpp        |    29 +
 .../imaging/ossimImageMetaDataWriterRegistry.cpp   |   172 +
 ossim/src/ossim/imaging/ossimImageModel.cpp        |   155 +
 .../src}/ossim/imaging/ossimImageMosaic.cpp        |     0
 .../ossimImageReconstructionFilterFactory.cpp      |     0
 .../ossimImageReconstructionFilterRegistry.cpp     |     0
 ossim/src/ossim/imaging/ossimImageRenderer.cpp     |  2401 ++++
 .../src/ossim/imaging/ossimImageSharpenFilter.cpp  |   226 +
 ossim/src/ossim/imaging/ossimImageSource.cpp       |   379 +
 .../src/ossim/imaging/ossimImageSourceFactory.cpp  |   591 +
 .../ossim/imaging/ossimImageSourceFactoryBase.cpp  |     0
 .../imaging/ossimImageSourceFactoryRegistry.cpp    |     0
 ossim/src/ossim/imaging/ossimImageSourceFilter.cpp |   216 +
 .../imaging/ossimImageSourceHistogramFilter.cpp    |     0
 .../ossim/imaging/ossimImageSourceSequencer.cpp    |   449 +
 .../ossim/imaging/ossimImageStatisticsSource.cpp   |   180 +
 .../imaging/ossimImageToPlaneNormalFilter.cpp      |   489 +
 .../src}/ossim/imaging/ossimImageWriter.cpp        |     0
 .../src/ossim/imaging/ossimImageWriterFactory.cpp  |   373 +
 .../ossim/imaging/ossimImageWriterFactoryBase.cpp  |     0
 .../imaging/ossimImageWriterFactoryRegistry.cpp    |   293 +
 .../src/ossim/imaging/ossimIndexToRgbLutFilter.cpp |   514 +
 .../imaging/ossimIntensityAdjustmentFilter.cpp     |   289 +
 ossim/src/ossim/imaging/ossimJpegCodec.cpp         |   510 +
 .../src}/ossim/imaging/ossimJpegMemDest.cpp        |     0
 .../src}/ossim/imaging/ossimJpegMemSrc.cpp         |     0
 .../src}/ossim/imaging/ossimJpegStdIOSrc.cpp       |     0
 .../src}/ossim/imaging/ossimJpegTileSource.cpp     |     0
 ossim/src/ossim/imaging/ossimJpegWriter.cpp        |   462 +
 .../ossim/imaging/ossimJpegYCbCrToRgbSource.cpp    |   115 +
 .../src}/ossim/imaging/ossimLandsatTileSource.cpp  |     0
 .../imaging/ossimLandsatTopoCorrectionFilter.cpp   |   361 +
 .../ossim/imaging/ossimLocalCorrelationFusion.cpp  |     0
 .../ossim/imaging/ossimMapCompositionSource.cpp    |  3801 +++++++
 ossim/src/ossim/imaging/ossimMaskFilter.cpp        |   863 ++
 ossim/src/ossim/imaging/ossimMaxMosaic.cpp         |   556 +
 ossim/src/ossim/imaging/ossimMeanMedianFilter.cpp  |   931 ++
 ossim/src/ossim/imaging/ossimMemoryImageSource.cpp |   246 +
 .../src/ossim/imaging/ossimMetadataFileWriter.cpp  |   278 +
 .../src/ossim/imaging/ossimMonoGridRemapEngine.cpp |   369 +
 .../imaging/ossimMultiBandHistogramTileSource.cpp  |     0
 .../src/ossim/imaging/ossimNBandToIndexFilter.cpp  |   566 +
 ossim/src/ossim/imaging/ossimNitf20Writer.cpp      |   833 ++
 ossim/src/ossim/imaging/ossimNitfTileSource.cpp    |  3419 ++++++
 ossim/src/ossim/imaging/ossimNitfTileSource_12.cpp |   256 +
 ossim/src/ossim/imaging/ossimNitfWriter.cpp        |   930 ++
 ossim/src/ossim/imaging/ossimNitfWriterBase.cpp    |   361 +
 .../ossim/imaging/ossimNormalizedRemapTable.cpp    |    37 +
 .../ossim/imaging/ossimNormalizedS16RemapTable.cpp |    50 +
 .../ossim/imaging/ossimNormalizedU11RemapTable.cpp |    42 +
 .../ossim/imaging/ossimNormalizedU16RemapTable.cpp |    45 +
 .../ossim/imaging/ossimNormalizedU8RemapTable.cpp  |    43 +
 .../src}/ossim/imaging/ossimNullPixelFlip.cpp      |     0
 .../src}/ossim/imaging/ossimOrthoImageMosaic.cpp   |     0
 .../ossim/imaging/ossimOverviewBuilderBase.cpp     |     0
 .../ossim/imaging/ossimOverviewBuilderFactory.cpp  |     0
 .../imaging/ossimOverviewBuilderFactoryBase.cpp    |     0
 .../ossimOverviewBuilderFactoryRegistry.cpp        |     0
 ossim/src/ossim/imaging/ossimOverviewSequencer.cpp |  1049 ++
 ossim/src/ossim/imaging/ossimPdfWriter.cpp         |  1888 +++
 ossim/src/ossim/imaging/ossimPiecewiseRemapper.cpp |   926 ++
 .../src}/ossim/imaging/ossimPixelFlipper.cpp       |     0
 ossim/src/ossim/imaging/ossimPolyCutter.cpp        |   412 +
 .../src/ossim/imaging/ossimQbTileFilesHandler.cpp  |   291 +
 .../ossim/imaging/ossimQuickbirdNitfTileSource.cpp |   168 +
 .../ossim/imaging/ossimQuickbirdTiffTileSource.cpp |     0
 ossim/src/ossim/imaging/ossimRLevelFilter.cpp      |   235 +
 .../src/ossim/imaging/ossimRangeDomeTileSource.cpp |   392 +
 ossim/src/ossim/imaging/ossimReadmeFileWriter.cpp  |   455 +
 .../src/ossim/imaging/ossimRectangleCutFilter.cpp  |   307 +
 .../src}/ossim/imaging/ossimResampler.cpp          |     0
 .../src/ossim/imaging/ossimRgbGridRemapEngine.cpp  |   272 +
 {src => ossim/src}/ossim/imaging/ossimRgbImage.cpp |     0
 ossim/src/ossim/imaging/ossimRgbToGreyFilter.cpp   |   248 +
 ossim/src/ossim/imaging/ossimRgbToHsiSource.cpp    |   163 +
 ossim/src/ossim/imaging/ossimRgbToHsvSource.cpp    |   156 +
 ossim/src/ossim/imaging/ossimRgbToIndexFilter.cpp  |   229 +
 .../ossim/imaging/ossimRgbToJpegYCbCrSource.cpp    |    94 +
 .../src/ossim/imaging/ossimRpfCacheTileSource.cpp  |  1315 +++
 .../src}/ossim/imaging/ossimS16ImageData.cpp       |     0
 ossim/src/ossim/imaging/ossimSFIMFusion.cpp        |   409 +
 .../ossim/imaging/ossimSICDToDetectedImage.cpp     |     0
 .../src}/ossim/imaging/ossimScalarRemapper.cpp     |     0
 ossim/src/ossim/imaging/ossimScaleFilter.cpp       |   960 ++
 ossim/src/ossim/imaging/ossimShiftFilter.cpp       |   311 +
 ossim/src/ossim/imaging/ossimSingleImageChain.cpp  |   953 ++
 ossim/src/ossim/imaging/ossimSlopeFilter.cpp       |   209 +
 ossim/src/ossim/imaging/ossimSrtmTileSource.cpp    |   179 +
 .../src/ossim/imaging/ossimSubImageTileSource.cpp  |   226 +
 ossim/src/ossim/imaging/ossimTableRemapper.cpp     |   577 +
 .../src/ossim/imaging/ossimTiffOverviewBuilder.cpp |  1439 +++
 ossim/src/ossim/imaging/ossimTiffTileSource.cpp    |  2721 +++++
 ossim/src/ossim/imaging/ossimTiffWriter.cpp        |  1741 +++
 .../src}/ossim/imaging/ossimTileCache.cpp          |     0
 ossim/src/ossim/imaging/ossimTilePatch.cpp         |   519 +
 ossim/src/ossim/imaging/ossimTiledImageHandler.cpp |   565 +
 ossim/src/ossim/imaging/ossimTiling.cpp            |   988 ++
 ossim/src/ossim/imaging/ossimTilingPoly.cpp        |   370 +
 ossim/src/ossim/imaging/ossimTilingRect.cpp        |   887 ++
 .../imaging/ossimTopographicCorrectionFilter.cpp   |  1298 +++
 ossim/src/ossim/imaging/ossimTrimFilter.cpp        |   358 +
 ossim/src/ossim/imaging/ossimTwoColorView.cpp      |   421 +
 .../src}/ossim/imaging/ossimU11ImageData.cpp       |     0
 .../src}/ossim/imaging/ossimU16ImageData.cpp       |     0
 .../src}/ossim/imaging/ossimU8ImageData.cpp        |     0
 ossim/src/ossim/imaging/ossimUsgsDemTileSource.cpp |   575 +
 .../imaging/ossimValueAssignImageSourceFilter.cpp  |   378 +
 .../src}/ossim/imaging/ossimVectorRenderer.cpp     |     0
 .../src}/ossim/imaging/ossimVertexExtractor.cpp    |     0
 .../imaging/ossimVpfAnnotationCoverageInfo.cpp     |   218 +
 .../imaging/ossimVpfAnnotationFeatureInfo.cpp      |  1446 +++
 .../imaging/ossimVpfAnnotationLibraryInfo.cpp      |   260 +
 .../ossim/imaging/ossimVpfAnnotationSource.cpp     |     0
 .../src}/ossim/imaging/ossimVpfTileSource.cpp      |     0
 .../src}/ossim/imaging/ossimWatermarkFilter.cpp    |     0
 .../src}/ossim/imaging/ossimWorldFileWriter.cpp    |     0
 {src => ossim/src}/ossim/init/makefile.vc          |     0
 ossim/src/ossim/init/ossimInit.cpp                 |   713 ++
 {src => ossim/src}/ossim/makefile.vc               |     0
 {src => ossim/src}/ossim/matrix/bandmat.cpp        |     0
 {src => ossim/src}/ossim/matrix/bc.mak             |     0
 {src => ossim/src}/ossim/matrix/bc32.mak           |     0
 {src => ossim/src}/ossim/matrix/cc.mak             |     0
 {src => ossim/src}/ossim/matrix/cholesky.cpp       |     0
 {src => ossim/src}/ossim/matrix/evalue.cpp         |     0
 {src => ossim/src}/ossim/matrix/example.txt        |     0
 {src => ossim/src}/ossim/matrix/fft.cpp            |     0
 {src => ossim/src}/ossim/matrix/gnu.mak            |     0
 {src => ossim/src}/ossim/matrix/hholder.cpp        |     0
 {src => ossim/src}/ossim/matrix/jacobi.cpp         |     0
 {src => ossim/src}/ossim/matrix/makefile.vc        |     0
 {src => ossim/src}/ossim/matrix/ms.mak             |     0
 {src => ossim/src}/ossim/matrix/ms_nt.mak          |     0
 {src => ossim/src}/ossim/matrix/myexcept.cpp       |     0
 {src => ossim/src}/ossim/matrix/newfft.cpp         |     0
 {src => ossim/src}/ossim/matrix/newmat.txt         |     0
 {src => ossim/src}/ossim/matrix/newmat1.cpp        |     0
 {src => ossim/src}/ossim/matrix/newmat2.cpp        |     0
 {src => ossim/src}/ossim/matrix/newmat3.cpp        |     0
 ossim/src/ossim/matrix/newmat4.cpp                 |  1027 ++
 ossim/src/ossim/matrix/newmat5.cpp                 |   485 +
 {src => ossim/src}/ossim/matrix/newmat6.cpp        |     0
 {src => ossim/src}/ossim/matrix/newmat7.cpp        |     0
 {src => ossim/src}/ossim/matrix/newmat8.cpp        |     0
 {src => ossim/src}/ossim/matrix/newmat9.cpp        |     0
 {src => ossim/src}/ossim/matrix/newmatex.cpp       |     0
 {src => ossim/src}/ossim/matrix/newmatnl.cpp       |     0
 {src => ossim/src}/ossim/matrix/newmatrm.cpp       |     0
 {src => ossim/src}/ossim/matrix/nl_ex.txt          |     0
 {src => ossim/src}/ossim/matrix/sl_ex.txt          |     0
 {src => ossim/src}/ossim/matrix/solution.cpp       |     0
 {src => ossim/src}/ossim/matrix/sort.cpp           |     0
 {src => ossim/src}/ossim/matrix/submat.cpp         |     0
 {src => ossim/src}/ossim/matrix/svd.cpp            |     0
 {src => ossim/src}/ossim/matrix/test_exc.txt       |     0
 {src => ossim/src}/ossim/matrix/watco_nt.mak       |     0
 {src => ossim/src}/ossim/matrix/watcom.mak         |     0
 {src => ossim/src}/ossim/ossimConfig.h.in          |     0
 ossim/src/ossim/ossimVersion.h.in                  |    14 +
 {src => ossim/src}/ossim/parallel/makefile.vc      |     0
 ossim/src/ossim/parallel/ossimIgen.cpp             |   743 ++
 .../ossim/parallel/ossimImageChainMtAdaptor.cpp    |   459 +
 .../ossim/parallel/ossimImageHandlerMtAdaptor.cpp  |     0
 .../ossimImageMpiMWriterSequenceConnection.cpp     |     0
 .../ossimImageMpiSWriterSequenceConnection.cpp     |     0
 {src => ossim/src}/ossim/parallel/ossimJob.cpp     |     0
 .../ossim/parallel/ossimJobMultiThreadQueue.cpp    |     0
 .../src}/ossim/parallel/ossimJobQueue.cpp          |     0
 .../src}/ossim/parallel/ossimJobThreadQueue.cpp    |     0
 ossim/src/ossim/parallel/ossimMpi.cpp              |   190 +
 .../parallel/ossimMpiMasterOverviewSequencer.cpp   |     0
 .../parallel/ossimMpiSlaveOverviewSequencer.cpp    |     0
 .../ossim/parallel/ossimMultiThreadSequencer.cpp   |     0
 ossim/src/ossim/parallel/ossimOrthoIgen.cpp        |  3043 +++++
 {src => ossim/src}/ossim/plugin/makefile.vc        |     0
 ossim/src/ossim/plugin/ossimDynamicLibrary.cpp     |   107 +
 ossim/src/ossim/plugin/ossimPluginLibrary.cpp      |    90 +
 .../src}/ossim/plugin/ossimSharedObjectBridge.cpp  |     0
 .../src/ossim/plugin/ossimSharedPluginRegistry.cpp |   229 +
 .../point_cloud/ossimGenericPointCloudHandler.cpp  |    69 +
 ossim/src/ossim/point_cloud/ossimPointBlock.cpp    |   239 +
 .../ossim/point_cloud/ossimPointCloudGeometry.cpp  |    79 +
 .../ossim/point_cloud/ossimPointCloudHandler.cpp   |   100 +
 .../point_cloud/ossimPointCloudHandlerRegistry.cpp |    98 +
 .../point_cloud/ossimPointCloudImageHandler.cpp    |   832 ++
 .../ossimPointCloudImageHandlerFactory.cpp         |   160 +
 .../ossim/point_cloud/ossimPointCloudSource.cpp    |    67 +
 ossim/src/ossim/point_cloud/ossimPointRecord.cpp   |   180 +
 {src => ossim/src}/ossim/projection/makefile.vc    |     0
 ossim/src/ossim/projection/ossimAdjMapModel.cpp    |   418 +
 .../ossim/projection/ossimAffineProjection.cpp     |     0
 .../src/ossim/projection/ossimAlbersProjection.cpp |   642 ++
 .../src}/ossim/projection/ossimAlphaSensor.cpp     |     0
 .../src}/ossim/projection/ossimAlphaSensorHRI.cpp  |     0
 .../src}/ossim/projection/ossimAlphaSensorHSI.cpp  |     0
 .../ossim/projection/ossimApplanixEcefModel.cpp    |   806 ++
 .../src/ossim/projection/ossimApplanixUtmModel.cpp |   979 ++
 .../projection/ossimAzimEquDistProjection.cpp      |     0
 .../ossim/projection/ossimBilinearProjection.cpp   |     0
 .../src}/ossim/projection/ossimBngProjection.cpp   |     0
 .../src}/ossim/projection/ossimBonneProjection.cpp |     0
 ossim/src/ossim/projection/ossimBuckeyeSensor.cpp  |   721 ++
 .../src}/ossim/projection/ossimCadrgProjection.cpp |     0
 .../ossim/projection/ossimCassiniProjection.cpp    |     0
 .../src/ossim/projection/ossimCoarseGridModel.cpp  |  1049 ++
 .../ossim/projection/ossimCylEquAreaProjection.cpp |     0
 .../ossim/projection/ossimEckert4Projection.cpp    |     0
 .../ossim/projection/ossimEckert6Projection.cpp    |     0
 .../projection/ossimEpsgProjectionDatabase.cpp     |   913 ++
 .../projection/ossimEpsgProjectionFactory.cpp      |   206 +
 .../ossim/projection/ossimEquDistCylProjection.cpp |   680 ++
 ossim/src/ossim/projection/ossimFcsiModel.cpp      |  1064 ++
 .../ossim/projection/ossimGnomonicProjection.cpp   |     0
 .../src/ossim/projection/ossimGoogleProjection.cpp |   125 +
 ossim/src/ossim/projection/ossimIkonosRpcModel.cpp |   985 ++
 .../ossim/projection/ossimImageProjectionModel.cpp |    55 +
 .../projection/ossimImageViewAffineTransform.cpp   |   339 +
 .../ossimImageViewProjectionTransform.cpp          |   508 +
 .../ossim/projection/ossimImageViewTransform.cpp   |   319 +
 .../projection/ossimImageViewTransformFactory.cpp  |     0
 .../src}/ossim/projection/ossimIpodSensor.cpp      |     0
 .../ossimLambertConformalConicProjection.cpp       |     0
 .../src}/ossim/projection/ossimLandSatModel.cpp    |     0
 ossim/src/ossim/projection/ossimLensDistortion.cpp |   132 +
 .../src}/ossim/projection/ossimLlxyProjection.cpp  |     0
 ossim/src/ossim/projection/ossimMapProjection.cpp  |  1699 +++
 .../ossim/projection/ossimMapProjectionFactory.cpp |   290 +
 .../ossim/projection/ossimMapProjectionInfo.cpp    |     0
 .../ossim/projection/ossimMapViewController.cpp    |     0
 .../projection/ossimMeanRadialLensDistortion.cpp   |     0
 .../ossim/projection/ossimMercatorProjection.cpp   |     0
 ossim/src/ossim/projection/ossimMgrs.c             |  1325 +++
 .../ossim/projection/ossimMillerProjection.cpp     |     0
 .../projection/ossimMiscProjectionFactory.cpp      |     0
 .../ossim/projection/ossimMollweidProjection.cpp   |     0
 .../ossimNewZealandMapGridProjection.cpp           |     0
 .../ossim/projection/ossimNgaProjectionFactory.cpp |    87 +
 .../src}/ossim/projection/ossimNitfMapModel.cpp    |     0
 .../projection/ossimNitfProjectionFactory.cpp      |   987 ++
 ossim/src/ossim/projection/ossimNitfRpcModel.cpp   |   475 +
 ossim/src/ossim/projection/ossimNitfRsmModel.cpp   |   491 +
 .../projection/ossimObliqueMercatorProjection.cpp  |     0
 .../projection/ossimOptimizableProjection.cpp      |     0
 .../projection/ossimOrthoGraphicProjection.cpp     |     0
 .../projection/ossimPolarStereoProjection.cpp      |     0
 {src => ossim/src}/ossim/projection/ossimPolarst.c |     0
 .../ossim/projection/ossimPolyconicProjection.cpp  |     0
 .../ossim/projection/ossimPolynomProjection.cpp    |     0
 .../projection/ossimPositionQualityEvaluator.cpp   |     0
 .../src}/ossim/projection/ossimPpjFrameSensor.cpp  |     0
 .../src}/ossim/projection/ossimProjection.cpp      |     0
 .../projection/ossimProjectionFactoryBase.cpp      |   111 +
 .../projection/ossimProjectionFactoryRegistry.cpp  |   173 +
 .../ossimProjectionViewControllerFactory.cpp       |     0
 .../src}/ossim/projection/ossimQuadProjection.cpp  |     0
 .../ossim/projection/ossimQuickbirdRpcModel.cpp    |   497 +
 ossim/src/ossim/projection/ossimRS1SarModel.cpp    |  1087 ++
 .../projection/ossimRadialDecentLensDistortion.cpp |     0
 ossim/src/ossim/projection/ossimRpcModel.cpp       |  1393 +++
 ossim/src/ossim/projection/ossimRpcProjection.cpp  |  1393 +++
 ossim/src/ossim/projection/ossimRpcSolver.cpp      |   828 ++
 ossim/src/ossim/projection/ossimRsmModel.cpp       |   997 ++
 .../src}/ossim/projection/ossimSarModel.cpp        |     0
 ossim/src/ossim/projection/ossimSensorModel.cpp    |  1783 +++
 .../ossim/projection/ossimSensorModelFactory.cpp   |   705 ++
 .../ossim/projection/ossimSensorModelTuple.cpp     |     0
 .../src}/ossim/projection/ossimSinusoid.c          |     0
 .../ossim/projection/ossimSinusoidalProjection.cpp |     0
 .../ossim/projection/ossimSkyBoxLearSensor.cpp     |     0
 .../projection/ossimSmacCallibrationSystem.cpp     |     0
 .../src}/ossim/projection/ossimSonomaSensor.cpp    |     0
 .../ossimSpaceObliqueMercatorProjection.cpp        |     0
 .../src}/ossim/projection/ossimSpot5Model.cpp      |     0
 .../projection/ossimStatePlaneProjectionInfo.cpp   |     0
 .../projection/ossimStereographicProjection.cpp    |     0
 .../projection/ossimTiffProjectionFactory.cpp      |     0
 ossim/src/ossim/projection/ossimTranmerc.c         |   625 +
 .../projection/ossimTransCylEquAreaProjection.cpp  |     0
 .../projection/ossimTransMercatorProjection.cpp    |   733 ++
 {src => ossim/src}/ossim/projection/ossimUps.c     |     0
 .../src}/ossim/projection/ossimUpsProjection.cpp   |     0
 {src => ossim/src}/ossim/projection/ossimUpspt.cpp |     0
 {src => ossim/src}/ossim/projection/ossimUtm.c     |     0
 .../src}/ossim/projection/ossimUtmProjection.cpp   |     0
 ossim/src/ossim/projection/ossimUtmpt.cpp          |    89 +
 .../projection/ossimVanDerGrintenProjection.cpp    |     0
 .../src}/ossim/projection/ossimWarpProjection.cpp  |     0
 .../ossim/projection/ossimWktProjectionFactory.cpp |   426 +
 {src => ossim/src}/ossim/support_data/makefile.vc  |     0
 .../src}/ossim/support_data/ossimAigBounds.cpp     |     0
 .../ossim/support_data/ossimAigDataFileHeader.cpp  |     0
 .../src}/ossim/support_data/ossimAigHeader.cpp     |     0
 .../ossim/support_data/ossimAigIndexFileHeader.cpp |     0
 .../src}/ossim/support_data/ossimAigStatistics.cpp |     0
 .../support_data/ossimAlphaSensorSupportData.cpp   |   699 ++
 .../src/ossim/support_data/ossimApplanixEOFile.cpp |   691 ++
 .../src/ossim/support_data/ossimAuxFileHandler.cpp |  1139 ++
 .../ossim/support_data/ossimAuxXmlSupportData.cpp  |   352 +
 ossim/src/ossim/support_data/ossimCcfInfo.cpp      |    59 +
 ossim/src/ossim/support_data/ossimCeosData.cpp     |  1379 +++
 .../src}/ossim/support_data/ossimDemGrid.cpp       |     0
 ossim/src/ossim/support_data/ossimDemHeader.cpp    |   786 ++
 ossim/src/ossim/support_data/ossimDemInfo.cpp      |    62 +
 ossim/src/ossim/support_data/ossimDemPoint.cpp     |    17 +
 ossim/src/ossim/support_data/ossimDemProfile.cpp   |   156 +
 ossim/src/ossim/support_data/ossimDemStats.cpp     |   127 +
 ossim/src/ossim/support_data/ossimDemUtil.cpp      |   179 +
 ossim/src/ossim/support_data/ossimDoqq.cpp         |   438 +
 ossim/src/ossim/support_data/ossimDtedAcc.cpp      |   287 +
 ossim/src/ossim/support_data/ossimDtedDsi.cpp      |   586 +
 ossim/src/ossim/support_data/ossimDtedHdr.cpp      |   234 +
 ossim/src/ossim/support_data/ossimDtedInfo.cpp     |   285 +
 .../src}/ossim/support_data/ossimDtedRecord.cpp    |     0
 ossim/src/ossim/support_data/ossimDtedUhl.cpp      |   331 +
 .../src}/ossim/support_data/ossimDtedVol.cpp       |     0
 {src => ossim/src}/ossim/support_data/ossimERS.cpp |     0
 ossim/src/ossim/support_data/ossimEnviHeader.cpp   |   952 ++
 ossim/src/ossim/support_data/ossimEnviInfo.cpp     |    79 +
 .../src}/ossim/support_data/ossimFfL5.cpp          |     0
 ossim/src/ossim/support_data/ossimFfL7.cpp         |   707 ++
 .../src}/ossim/support_data/ossimFfRevb.cpp        |     0
 .../src}/ossim/support_data/ossimFfRevc.cpp        |     0
 ossim/src/ossim/support_data/ossimFgdcTxtDoc.cpp   |   307 +
 ossim/src/ossim/support_data/ossimFgdcXmlDoc.cpp   |   549 +
 .../src}/ossim/support_data/ossimGeoTiff.cpp       |     0
 .../src/ossim/support_data/ossimGmlSupportData.cpp |  1092 ++
 .../src/ossim/support_data/ossimIkonosMetaData.cpp |   600 +
 ossim/src/ossim/support_data/ossimInfoBase.cpp     |    45 +
 ossim/src/ossim/support_data/ossimInfoFactory.cpp  |   135 +
 .../support_data/ossimInfoFactoryRegistry.cpp      |     0
 ossim/src/ossim/support_data/ossimJ2kCodRecord.cpp |   124 +
 ossim/src/ossim/support_data/ossimJ2kInfo.cpp      |   239 +
 ossim/src/ossim/support_data/ossimJ2kSizRecord.cpp |   181 +
 ossim/src/ossim/support_data/ossimJ2kSotRecord.cpp |    88 +
 ossim/src/ossim/support_data/ossimJp2Info.cpp      |   654 ++
 .../src}/ossim/support_data/ossimJpipMessage.cpp   |     0
 .../ossim/support_data/ossimJpipMessageDecoder.cpp |     0
 ossim/src/ossim/support_data/ossimLasHdr.cpp       |   627 +
 ossim/src/ossim/support_data/ossimLasInfo.cpp      |    60 +
 ossim/src/ossim/support_data/ossimNitfAcftbTag.cpp |   265 +
 .../src/ossim/support_data/ossimNitfAimidbTag.cpp  |   172 +
 .../src/ossim/support_data/ossimNitfBlockaTag.cpp  |   326 +
 ossim/src/ossim/support_data/ossimNitfCommon.cpp   |   542 +
 .../support_data/ossimNitfCompressionHeader.cpp    |    20 +
 .../src/ossim/support_data/ossimNitfCsccgaTag.cpp  |    86 +
 .../src/ossim/support_data/ossimNitfCscrnaTag.cpp  |   155 +
 .../src/ossim/support_data/ossimNitfCsdidaTag.cpp  |   150 +
 .../src/ossim/support_data/ossimNitfCsexraTag.cpp  |   338 +
 .../src}/ossim/support_data/ossimNitfCsproaTag.cpp |     0
 .../support_data/ossimNitfDataExtensionSegment.cpp |    58 +
 .../ossimNitfDataExtensionSegmentV2_0.cpp          |   247 +
 .../ossimNitfDataExtensionSegmentV2_1.cpp          |   554 +
 .../ossim/support_data/ossimNitfEmbeddedRpfDes.cpp |    39 +
 .../src/ossim/support_data/ossimNitfEngrdaTag.cpp  |   254 +
 .../src}/ossim/support_data/ossimNitfExoptaTag.cpp |     0
 ossim/src/ossim/support_data/ossimNitfFile.cpp     |   416 +
 .../src/ossim/support_data/ossimNitfFileHeader.cpp |   230 +
 .../ossim/support_data/ossimNitfFileHeaderV2_0.cpp |  1704 +++
 .../ossim/support_data/ossimNitfFileHeaderV2_1.cpp |  2115 ++++
 .../ossim/support_data/ossimNitfFileHeaderV2_X.cpp |   532 +
 .../support_data/ossimNitfGeoPositioningTag.cpp    |   143 +
 .../src/ossim/support_data/ossimNitfHistoaTag.cpp  |   470 +
 .../src}/ossim/support_data/ossimNitfIchipbTag.cpp |     0
 .../src/ossim/support_data/ossimNitfImageBand.cpp  |    27 +
 .../ossim/support_data/ossimNitfImageBandV2_0.cpp  |   223 +
 .../ossim/support_data/ossimNitfImageBandV2_1.cpp  |     0
 .../support_data/ossimNitfImageDataMaskV2_1.cpp    |    79 +
 .../ossim/support_data/ossimNitfImageHeader.cpp    |   400 +
 .../support_data/ossimNitfImageHeaderV2_0.cpp      |  1039 ++
 .../support_data/ossimNitfImageHeaderV2_1.cpp      |  1816 +++
 .../support_data/ossimNitfImageHeaderV2_X.cpp      |     0
 .../src}/ossim/support_data/ossimNitfImageLut.cpp  |     0
 .../ossim/support_data/ossimNitfImageLutV2_0.cpp   |     0
 .../ossim/support_data/ossimNitfImageLutV2_1.cpp   |     0
 ossim/src/ossim/support_data/ossimNitfInfo.cpp     |    60 +
 .../src/ossim/support_data/ossimNitfJ2klraTag.cpp  |   182 +
 .../ossim/support_data/ossimNitfLabelHeader.cpp    |     0
 .../support_data/ossimNitfLabelHeaderV2_0.cpp      |     0
 .../support_data/ossimNitfLocalCartographicTag.cpp |   137 +
 .../support_data/ossimNitfLocalGeographicTag.cpp   |   110 +
 .../src/ossim/support_data/ossimNitfMstgtaTag.cpp  |   135 +
 .../support_data/ossimNitfNameConversionTables.cpp |   164 +
 .../src/ossim/support_data/ossimNitfPiaimcTag.cpp  |   412 +
 .../ossimNitfProjectionParameterTag.cpp            |   213 +
 .../ossim/support_data/ossimNitfRegisteredTag.cpp  |   117 +
 .../support_data/ossimNitfRegisteredTagFactory.cpp |   210 +
 ossim/src/ossim/support_data/ossimNitfRpcATag.cpp  |    24 +
 ossim/src/ossim/support_data/ossimNitfRpcBTag.cpp  |    22 +
 ossim/src/ossim/support_data/ossimNitfRpcBase.cpp  |   929 ++
 .../ossim/support_data/ossimNitfRpfTagFactory.cpp  |    54 +
 .../src/ossim/support_data/ossimNitfRsmecaTag.cpp  |  1160 ++
 .../src/ossim/support_data/ossimNitfRsmidaTag.cpp  |   952 ++
 .../src/ossim/support_data/ossimNitfRsmpcaTag.cpp  |   607 +
 .../src/ossim/support_data/ossimNitfRsmpiaTag.cpp  |   341 +
 .../src/ossim/support_data/ossimNitfSensraTag.cpp  |   444 +
 .../src/ossim/support_data/ossimNitfStdidcTag.cpp  |   469 +
 .../ossim/support_data/ossimNitfSymbolHeader.cpp   |     0
 .../support_data/ossimNitfSymbolHeaderV2_0.cpp     |     0
 .../ossim/support_data/ossimNitfTagFactory.cpp     |     0
 .../support_data/ossimNitfTagFactoryRegistry.cpp   |   101 +
 .../ossim/support_data/ossimNitfTagInformation.cpp |   209 +
 .../ossim/support_data/ossimNitfTextHeader.cpp     |     0
 .../ossim/support_data/ossimNitfTextHeaderV2_0.cpp |     0
 .../ossim/support_data/ossimNitfTextHeaderV2_1.cpp |     0
 .../src/ossim/support_data/ossimNitfUnknownTag.cpp |   126 +
 .../src/ossim/support_data/ossimNitfUse00aTag.cpp  |   540 +
 .../support_data/ossimNitfVqCompressionHeader.cpp  |   349 +
 ossim/src/ossim/support_data/ossimNmeaMessage.cpp  |    99 +
 .../support_data/ossimNmeaMessageSequencer.cpp     |     0
 .../ossim/support_data/ossimPpjFrameSensorFile.cpp |     0
 .../ossim/support_data/ossimQuickbirdMetaData.cpp  |   819 ++
 .../ossim/support_data/ossimQuickbirdRpcHeader.cpp |   247 +
 .../src}/ossim/support_data/ossimQuickbirdTile.cpp |     0
 .../support_data/ossimRpfAttributeOffsetRecord.cpp |     0
 .../ossimRpfAttributeSectionSubheader.cpp          |     0
 .../src/ossim/support_data/ossimRpfAttributes.cpp  |   171 +
 .../support_data/ossimRpfBoundaryRectRecord.cpp    |     0
 .../ossimRpfBoundaryRectSectionSubheader.cpp       |     0
 .../support_data/ossimRpfBoundaryRectTable.cpp     |     0
 .../ossimRpfColorConverterOffsetRecord.cpp         |     0
 .../ossimRpfColorConverterSubsection.cpp           |   131 +
 .../support_data/ossimRpfColorConverterTable.cpp   |     0
 .../ossimRpfColorGrayscaleOffsetRecord.cpp         |     0
 .../ossimRpfColorGrayscaleSubheader.cpp            |     0
 .../support_data/ossimRpfColorGrayscaleTable.cpp   |     0
 .../ossim/support_data/ossimRpfComponentIdLut.cpp  |     0
 .../ossimRpfCompressionLookupOffsetRecord.cpp      |     0
 .../support_data/ossimRpfCompressionSection.cpp    |     0
 .../ossimRpfCompressionSectionSubheader.cpp        |     0
 .../ossim/support_data/ossimRpfCoverageSection.cpp |   296 +
 ossim/src/ossim/support_data/ossimRpfFrame.cpp     |  1130 ++
 .../src/ossim/support_data/ossimRpfFrameEntry.cpp  |   126 +
 .../support_data/ossimRpfFrameFileIndexRecord.cpp  |     0
 .../ossimRpfFrameFileIndexSectionSubheader.cpp     |     0
 .../ossimRpfFrameFileIndexSubsection.cpp           |     0
 .../ossim/support_data/ossimRpfFrameFileReader.cpp |     0
 ossim/src/ossim/support_data/ossimRpfHeader.cpp    |   873 ++
 .../ossimRpfImageDescriptionSubheader.cpp          |   115 +
 .../ossimRpfImageDisplayParameterSubheader.cpp     |     0
 ossim/src/ossim/support_data/ossimRpfInfo.cpp      |    92 +
 .../ossim/support_data/ossimRpfLocationSection.cpp |   316 +
 .../ossim/support_data/ossimRpfMaskSubheader.cpp   |     0
 .../ossim/support_data/ossimRpfMaskSubsection.cpp  |     0
 .../ossim/support_data/ossimRpfPathnameRecord.cpp  |     0
 .../support_data/ossimRpfReplaceUpdateRecord.cpp   |     0
 .../ossimRpfReplaceUpdateSectionSubheader.cpp      |     0
 .../support_data/ossimRpfReplaceUpdateTable.cpp    |     0
 ossim/src/ossim/support_data/ossimRpfToc.cpp       |  1295 +++
 ossim/src/ossim/support_data/ossimRpfTocEntry.cpp  |   280 +
 .../ossim/support_data/ossimSpaceImagingGeom.cpp   |     0
 .../support_data/ossimSpotDimapSupportData.cpp     |     0
 .../src}/ossim/support_data/ossimSrcRecord.cpp     |     0
 .../src}/ossim/support_data/ossimSrtmFilename.cpp  |     0
 .../ossim/support_data/ossimSrtmSupportData.cpp    |     0
 .../ossim/support_data/ossimSupportFilesList.cpp   |    43 +
 ossim/src/ossim/support_data/ossimTiffInfo.cpp     |  3913 +++++++
 ossim/src/ossim/support_data/ossimTiffWorld.cpp    |   269 +
 ossim/src/ossim/support_data/ossimWavelength.cpp   |   204 +
 ossim/src/ossim/support_data/ossimWkt.cpp          |   274 +
 ossim/src/ossim/support_data/ossimXmpInfo.cpp      |   645 ++
 ossim/src/ossim/util/ossimAutRegUtil.cpp           |  1747 +++
 ossim/src/ossim/util/ossimBatchTest.cpp            |  1257 ++
 ossim/src/ossim/util/ossimChipperUtil.cpp          |  5081 +++++++++
 ossim/src/ossim/util/ossimEquationUtil.cpp         |   410 +
 ossim/src/ossim/util/ossimFileWalker.cpp           |   535 +
 ossim/src/ossim/util/ossimHLZUtil.cpp              |  1108 ++
 ossim/src/ossim/util/ossimImageUtil.cpp            |  2133 ++++
 ossim/src/ossim/util/ossimInfo.cpp                 |  2772 +++++
 ossim/src/ossim/util/ossimRpfUtil.cpp              |   349 +
 ossim/src/ossim/util/ossimSlopeUtil.cpp            |   374 +
 ossim/src/ossim/util/ossimViewshedUtil.cpp         |   873 ++
 {src => ossim/src}/ossim/vec/makefile.vc           |     0
 .../src}/ossim/vec/ossimVpfBoundingRecordTable.cpp |     0
 ossim/src/ossim/vec/ossimVpfCoverage.cpp           |   187 +
 {src => ossim/src}/ossim/vec/ossimVpfDatabase.cpp  |     0
 .../src}/ossim/vec/ossimVpfDatabaseHeader.cpp      |     0
 .../vec/ossimVpfDatabaseHeaderTableValidator.cpp   |   133 +
 {src => ossim/src}/ossim/vec/ossimVpfExtent.cpp    |     0
 .../src}/ossim/vec/ossimVpfFeatureClass.cpp        |     0
 ossim/src/ossim/vec/ossimVpfFeatureClassSchema.cpp |   149 +
 {src => ossim/src}/ossim/vec/ossimVpfLibrary.cpp   |     0
 .../vec/ossimVpfLibraryAttributeTableValidator.cpp |     0
 ossim/src/ossim/vec/ossimVpfTable.cpp              |   913 ++
 {src => ossim/src}/ossim/version-config.cpp        |     0
 .../src}/ossim/video/ossimVideoGeometry.cpp        |     0
 .../src}/ossim/video/ossimVideoHandler.cpp         |     0
 .../src}/ossim/video/ossimVideoImageHandler.cpp    |     0
 .../src}/ossim/video/ossimVideoImageSource.cpp     |     0
 .../src}/ossim/video/ossimVideoSource.cpp          |     0
 {src => ossim/src}/ossim/vpfutil/bitarray.c        |     0
 {src => ossim/src}/ossim/vpfutil/distance.c        |     0
 {src => ossim/src}/ossim/vpfutil/linklist.c        |     0
 {src => ossim/src}/ossim/vpfutil/makefile.vc       |     0
 {src => ossim/src}/ossim/vpfutil/polygrf.c         |     0
 ossim/src/ossim/vpfutil/set.c                      |  1304 +++
 {src => ossim/src}/ossim/vpfutil/vpfclip.c         |     0
 {src => ossim/src}/ossim/vpfutil/vpfcntnt.c        |     0
 {src => ossim/src}/ossim/vpfutil/vpfdict.c         |     0
 ossim/src/ossim/vpfutil/vpfdisp.c                  |   504 +
 {src => ossim/src}/ossim/vpfutil/vpfdraw.c         |     0
 {src => ossim/src}/ossim/vpfutil/vpfmisc.c         |     0
 {src => ossim/src}/ossim/vpfutil/vpfnear.c         |     0
 {src => ossim/src}/ossim/vpfutil/vpfprim.c         |     0
 {src => ossim/src}/ossim/vpfutil/vpfptply.c        |     0
 {src => ossim/src}/ossim/vpfutil/vpfquery.c        |     0
 ossim/src/ossim/vpfutil/vpfread.c                  |  1649 +++
 ossim/src/ossim/vpfutil/vpfrelat.c                 |   907 ++
 {src => ossim/src}/ossim/vpfutil/vpfselec.c        |     0
 {src => ossim/src}/ossim/vpfutil/vpfspx.c          |     0
 ossim/src/ossim/vpfutil/vpftable.c                 |  1087 ++
 ossim/src/ossim/vpfutil/vpftidx.c                  |  1968 ++++
 {src => ossim/src}/ossim/vpfutil/vpfwrite.c        |     0
 ossim/src/test/CMakeLists.txt                      |    71 +
 ossim/src/test/ossim-aux-dot-xml-test.cpp          |    66 +
 .../src}/test/ossim-byte-stream-buffer-test.cpp    |     0
 {src => ossim/src}/test/ossim-csv-file-test.cpp    |     0
 ossim/src/test/ossim-date-test.cpp                 |    57 +
 {src => ossim/src}/test/ossim-datum-shift.cpp      |     0
 ossim/src/test/ossim-directory-test.cpp            |    81 +
 ossim/src/test/ossim-dms-test.cpp                  |   100 +
 ossim/src/test/ossim-dted-handler-test.cpp         |    81 +
 ossim/src/test/ossim-dump-vpf-table.cpp            |    36 +
 {src => ossim/src}/test/ossim-duration-test.cpp    |     0
 ossim/src/test/ossim-elevation-manager-test.cpp    |    55 +
 ossim/src/test/ossim-envi-hdr-test.cpp             |    49 +
 .../src}/test/ossim-epsg-factory-test.cpp          |     0
 ossim/src/test/ossim-eq-projection-test.cpp        |    51 +
 ossim/src/test/ossim-fgdc-txt-doc-test.cpp         |    74 +
 ossim/src/test/ossim-filename-test.cpp             |   202 +
 ossim/src/test/ossim-foo.cpp                       |   111 +
 ossim/src/test/ossim-get-pixel-test.cpp            |   219 +
 ossim/src/test/ossim-gpkg-writer-test.cpp          |   233 +
 ossim/src/test/ossim-gpt-test.cpp                  |   142 +
 ossim/src/test/ossim-gsd-test.cpp                  |   119 +
 ossim/src/test/ossim-gsoc1.cpp                     |    91 +
 {src => ossim/src}/test/ossim-histo-compare.cpp    |     0
 ossim/src/test/ossim-image-chain-test.cpp          |    81 +
 ossim/src/test/ossim-image-elevation-test.cpp      |    99 +
 ossim/src/test/ossim-image-geometry-test.cpp       |   349 +
 .../src}/test/ossim-image-handler-test.cpp         |     0
 ossim/src/test/ossim-image-writer-test.cpp         |    76 +
 ossim/src/test/ossim-index-to-rgb-lut-test.cpp     |   200 +
 ossim/src/test/ossim-info-test.cpp                 |    72 +
 {src => ossim/src}/test/ossim-jobqueue-test.cpp    |     0
 {src => ossim/src}/test/ossim-keywordlist-test.cpp |     0
 ossim/src/test/ossim-least-squares-plane-test.cpp  |    42 +
 ossim/src/test/ossim-loadtile-test.cpp             |   127 +
 {src => ossim/src}/test/ossim-lsr-space-test.cpp   |     0
 ossim/src/test/ossim-mask-filter-test.cpp          |   182 +
 ossim/src/test/ossim-nitf-rsm-model-test.cpp       |   513 +
 ossim/src/test/ossim-notify-test.cpp               |    52 +
 ossim/src/test/ossim-obj-allocate.cpp              |    75 +
 ossim/src/test/ossim-piecewise-remapper-test.cpp   |   257 +
 .../src}/test/ossim-pixel-flipper-test.cpp         |     0
 ossim/src/test/ossim-point-cloud-handler-test.cpp  |    93 +
 .../test/ossim-point-cloud-image-handler-test.cpp  |    81 +
 ossim/src/test/ossim-point-test.cpp                |   185 +
 .../src}/test/ossim-projection-factory-test.cpp    |     0
 ossim/src/test/ossim-projection-test.cpp           |    94 +
 ossim/src/test/ossim-range-dome-test.cpp           |   247 +
 .../test/ossim-read-write-consistency-test.cpp     |     0
 ossim/src/test/ossim-rect-test.cpp                 |    72 +
 ossim/src/test/ossim-ref-ptr-test.cpp              |    91 +
 ossim/src/test/ossim-remap-table-test.cpp          |   360 +
 ossim/src/test/ossim-shift-filter-test.cpp         |   201 +
 ossim/src/test/ossim-single-image-chain-test.cpp   |   166 +
 .../ossim-single-image-chain-threaded-test.cpp     |   102 +
 ossim/src/test/ossim-srtm-support-data-test.cpp    |    49 +
 {src => ossim/src}/test/ossim-string-test.cpp      |     0
 {src => ossim/src}/test/ossim-test.cpp             |     0
 .../src}/test/ossim-thin-plate-spline-test.cpp     |     0
 .../test/ossim-threaded-app-tile-cache-test.cpp    |     0
 ossim/src/test/ossim-threaded-chain-test.cpp       |   221 +
 ossim/src/test/ossim-threaded-elevation-test.cpp   |   192 +
 ossim/src/test/ossim-threaded-logfile-test.cpp     |    94 +
 .../src}/test/ossim-threaded-polyarea2d-test.cpp   |     0
 ossim/src/test/ossim-tiff-info-test.cpp            |    83 +
 ossim/src/test/ossim-tiled-elevation-test.cpp      |   209 +
 ossim/src/test/ossim-visitor-test.cpp              |   105 +
 ossim/src/test/ossim-wavelength-test.cpp           |   128 +
 ossim/src/test/ossim-wkt-proj-factory-test.cpp     |   123 +
 ossim/src/test/ossim-wkt-test.cpp                  |    53 +
 ossim/src/test/ossim-xml-test.cpp                  |    49 +
 scripts/.cvsignore                                 |     0
 scripts/Makefile                                   |     1 -
 scripts/change_report                              |    23 -
 scripts/convert_headers.pl                         |   176 -
 scripts/convert_headers_readme.txt                 |     5 -
 scripts/icp.sh                                     |    17 -
 scripts/igen.sh                                    |    17 -
 scripts/movecc2cpp.sh                              |     7 -
 scripts/orthoigen.sh                               |    20 -
 scripts/ossim_environment                          |    33 -
 scripts/whatsout                                   |    33 -
 share/ossim/ossim_epsg_projections-v7_4.csv        |  3252 ------
 share/ossim/ossim_state_plane_readme.txt           |    75 -
 specs/gdal.spec                                    |    75 -
 specs/geotiff.spec                                 |    78 -
 specs/ossim-geoid.spec                             |    39 -
 src/.cvsignore                                     |     3 -
 src/apps/.cvsignore                                |     3 -
 src/apps/makefile.inc                              |    42 -
 src/apps/makefile.vc                               |   282 -
 src/apps/ossim-adrg-dump/.cvsignore                |     5 -
 .../ossim-applanix2ogeom/ossim-applanix2ogeom.cpp  |   322 -
 src/apps/ossim-band-merge/ossim-band-merge.cpp     |   326 -
 src/apps/ossim-btoa/.cvsignore                     |     3 -
 src/apps/ossim-chgkwval/ossim-chgkwval.cpp         |    55 -
 src/apps/ossim-chipper/ossim-chipper.cpp           |    91 -
 src/apps/ossim-cmm/ossim-cmm.cpp                   |   457 -
 src/apps/ossim-create-cg/ossim-create-cg.cpp       |   143 -
 src/apps/ossim-create-histo/ossim-create-histo.cpp |   299 -
 src/apps/ossim-deg2dms/ossim-deg2dms.cpp           |   112 -
 src/apps/ossim-dem/CMakeLists.txt                  |     2 -
 src/apps/ossim-dem/ossim-dem.cpp                   |    91 -
 src/apps/ossim-dms2deg/ossim-dms2deg.cpp           |   166 -
 src/apps/ossim-img2md/ossim-img2md.cpp             |   159 -
 src/apps/ossim-info/.cvsignore                     |     5 -
 src/apps/ossim-info/ossim-info.cpp                 |    70 -
 src/apps/ossim-orthoigen/ossim-orthoigen.cpp       |   167 -
 src/apps/ossim-pixelflip/ossim-pixelflip.cpp       |   418 -
 src/apps/ossim-preproc/ossim-preproc.cpp           |    86 -
 src/apps/ossim-prune/ossim-prune.cpp               |   130 -
 src/apps/ossim-src2src/ossim-src2src.cpp           |   522 -
 src/apps/ossim-ws-cmp/ossim-ws-cmp.cpp             |   229 -
 src/examples/data_types/directory/Makefile         |     3 -
 .../data_types/directory/directorytest.cpp         |    35 -
 src/examples/data_types/dms/Makefile               |     2 -
 src/examples/data_types/dms/dms_test.cpp           |   100 -
 src/examples/data_types/polygonarea/Makefile       |     3 -
 .../data_types/polygonarea/polygonarea.cpp         |   113 -
 src/examples/elevation/dted_test/Makefile          |     2 -
 .../elevation/dted_test/dtedHandlerTest.cpp        |    80 -
 src/examples/elevation/srtm_test/Makefile          |     5 -
 .../elevation/srtm_test/srtmSupportDataTest.cpp    |    48 -
 src/examples/shared/image_filters/Makefile         |     7 -
 .../image_filters/ossimSharedRgbToGreyFilter.cpp   |   334 -
 .../image_filters/ossimSharedRgbToGreyFilter.h     |    62 -
 src/examples/tutorial/Makefile                     |    40 -
 src/examples/vpf/Makefile                          |     2 -
 src/examples/vpf/dump_table.cpp                    |    33 -
 src/makefile.inc                                   |    71 -
 src/makefile.targ.inc                              |    27 -
 src/makefile.vc                                    |    29 -
 .../ossim_applanix2ogeom.vcproj                    |   135 -
 src/msvc/apps/ossim_cmm/ossim_cmm.vcproj           |   137 -
 src/msvc/apps/ossim_correl/ossim_correl.vcproj     |   135 -
 .../ossim_createhisto/ossim_createhisto.vcproj     |   135 -
 src/msvc/apps/ossim_foo/ossim_foo.vcproj           |   134 -
 src/msvc/apps/ossim_icp/ossim_icp.vcproj           |   139 -
 src/msvc/apps/ossim_igen/ossim_igen.vcproj         |   134 -
 .../apps/ossim_image_info/ossim_image_info.vcproj  |   134 -
 src/msvc/apps/ossim_img2rr/ossim_img2rr.vcproj     |   135 -
 .../ossim_ogeom2ogeom/ossim_ogeom2ogeom.vcproj     |   134 -
 .../apps/ossim_orthoigen/ossim_orthoigen.vcproj    |   135 -
 src/msvc/apps/ossim_rejout/ossim_rejout.vcproj     |   135 -
 src/msvc/ossim.iss                                 |    21 -
 src/msvc/ossim_core_project/AssemblyInfo.cpp       |    58 -
 src/msvc/ossim_core_project/ReadMe.txt             |    31 -
 src/msvc/ossim_core_project/Stdafx.cpp             |     5 -
 src/msvc/ossim_core_project/Stdafx.h               |     6 -
 src/msvc/ossim_core_project/app.ico                |   Bin 1078 -> 0 bytes
 src/msvc/ossim_core_project/app.rc                 |    52 -
 src/msvc/ossim_core_project/compiler_options.txt   |     2 -
 src/msvc/ossim_core_project/makefile.vc            |    27 -
 src/msvc/ossim_core_project/ossim_core_project.cpp |    15 -
 src/msvc/ossim_core_project/ossim_core_project.h   |     7 -
 src/msvc/ossim_core_project/ossim_core_project.sln |    39 -
 .../ossim_core_project/ossim_core_project.vcproj   |  4340 -------
 src/ossim/.cvsignore                               |     2 -
 src/ossim/CMakeLists.txt                           |   143 -
 src/ossim/base/.cvsignore                          |     7 -
 src/ossim/base/ossim2dTo2dTransform.cpp            |   280 -
 src/ossim/base/ossim2dTo2dTransformFactory.cpp     |    66 -
 src/ossim/base/ossim2dTo2dTransformRegistry.cpp    |    26 -
 .../base/ossimAdjustableParameterInterface.cpp     |   750 --
 src/ossim/base/ossimAdjustmentExecutive.cpp        |   782 --
 src/ossim/base/ossimApplicationUsage.cpp           |   216 -
 src/ossim/base/ossimArgumentParser.cpp             |   497 -
 src/ossim/base/ossimBaseObjectFactory.cpp          |    61 -
 src/ossim/base/ossimCommon.cpp                     |  1050 --
 src/ossim/base/ossimConnectableDisplayListener.cpp |   179 -
 src/ossim/base/ossimConnectableObjectListener.cpp  |   112 -
 src/ossim/base/ossimContainerEvent.cpp             |    31 -
 src/ossim/base/ossimDataObject.cpp                 |   190 -
 src/ossim/base/ossimDate.cpp                       |  1077 --
 src/ossim/base/ossimDateProperty.cpp               |   146 -
 src/ossim/base/ossimDatumFactory.cpp               |   359 -
 src/ossim/base/ossimDatumFactory.inc               |   287 -
 src/ossim/base/ossimDatumFactoryRegistry.cpp       |    95 -
 src/ossim/base/ossimDblGrid.cpp                    |  1220 --
 src/ossim/base/ossimDirectory.cpp                  |   319 -
 src/ossim/base/ossimDisplayInterface.cpp           |    31 -
 src/ossim/base/ossimDpt3d.cpp                      |   190 -
 src/ossim/base/ossimDrect.cpp                      |   846 --
 src/ossim/base/ossimDuration.cpp                   |   269 -
 src/ossim/base/ossimEllipsoid.cpp                  |   661 --
 src/ossim/base/ossimEllipsoidFactory.cpp           |   230 -
 src/ossim/base/ossimEpsgDatumFactory.cpp           |   235 -
 src/ossim/base/ossimEquTokenizer.cpp               |  1796 ---
 src/ossim/base/ossimFilename.cpp                   |  1337 ---
 src/ossim/base/ossimGeoPolygon.cpp                 |   334 -
 src/ossim/base/ossimGeoTiffDatumLut.cpp            |   120 -
 src/ossim/base/ossimGeoidEgm96.cpp                 |   315 -
 src/ossim/base/ossimGeoidManager.cpp               |   294 -
 src/ossim/base/ossimGeoidNgs.cpp                   |   274 -
 src/ossim/base/ossimGrect.cpp                      |   234 -
 src/ossim/base/ossimHistogram.cpp                  |  1586 ---
 src/ossim/base/ossimHistogramSource.cpp            |   106 -
 src/ossim/base/ossimIoStream.cpp                   |   396 -
 src/ossim/base/ossimKeywordNames.cpp               |   198 -
 src/ossim/base/ossimKeywordlist.cpp                |  1376 ---
 src/ossim/base/ossimListener.cpp                   |    51 -
 src/ossim/base/ossimNormRgbVector.cpp              |   183 -
 src/ossim/base/ossimNotify.cpp                     |   421 -
 src/ossim/base/ossimObject.cpp                     |   132 -
 src/ossim/base/ossimObjectFactoryRegistry.cpp      |   174 -
 src/ossim/base/ossimObservationSet.cpp             |   228 -
 src/ossim/base/ossimPolyArea2d.cpp                 |  1622 ---
 src/ossim/base/ossimPolyLine.cpp                   |   565 -
 src/ossim/base/ossimPolygon.cpp                    |  1266 ---
 src/ossim/base/ossimProcessInterface.cpp           |   144 -
 src/ossim/base/ossimProcessListener.cpp            |    44 -
 src/ossim/base/ossimProcessProgressEvent.cpp       |    68 -
 src/ossim/base/ossimQuadTreeWarp.cpp               |  1648 ---
 src/ossim/base/ossimRectanglePartitioner.cpp       |   248 -
 src/ossim/base/ossimRectilinearDataObject.cpp      |   293 -
 src/ossim/base/ossimRegExp.cpp                     |  1285 ---
 src/ossim/base/ossimRgbLutDataObject.cpp           |   279 -
 src/ossim/base/ossimRtti.cpp                       |   137 -
 src/ossim/base/ossimSource.cpp                     |   167 -
 src/ossim/base/ossimStdOutProgress.cpp             |    61 -
 src/ossim/base/ossimStreamFactory.cpp              |    93 -
 src/ossim/base/ossimStreamFactoryRegistry.cpp      |    75 -
 src/ossim/base/ossimString.cpp                     |  1087 --
 src/ossim/base/ossimStringProperty.cpp             |   127 -
 src/ossim/base/ossimTempFilename.cpp               |   115 -
 src/ossim/base/ossimTileHash.cpp                   |   123 -
 src/ossim/base/ossimTiledImageHash.cpp             |   140 -
 src/ossim/base/ossimTrace.cpp                      |    40 -
 src/ossim/base/ossimTraceManager.cpp               |   105 -
 src/ossim/base/ossimUnitConversionTool.cpp         |   435 -
 src/ossim/base/ossimUnitTypeLut.cpp                |    97 -
 src/ossim/base/ossimVisitor.cpp                    |   379 -
 src/ossim/base/ossimVrect.cpp                      |    41 -
 src/ossim/base/ossimWgs72Datum.cpp                 |   207 -
 src/ossim/base/ossimWgs84Datum.cpp                 |    66 -
 src/ossim/base/ossimXmlAttribute.cpp               |   241 -
 src/ossim/base/ossimXmlDocument.cpp                |   435 -
 src/ossim/base/ossimXmlString.cpp                  |    98 -
 src/ossim/elevation/.cvsignore                     |     1 -
 src/ossim/elevation/ossimDtedElevationDatabase.cpp |   244 -
 src/ossim/elevation/ossimElevCellHandler.cpp       |   109 -
 .../elevation/ossimElevCellHandlerFactory.cpp      |   130 -
 src/ossim/elevation/ossimElevManager.cpp           |   365 -
 src/ossim/elevation/ossimElevSource.cpp            |   279 -
 src/ossim/elevation/ossimElevSourceFactory.cpp     |    43 -
 src/ossim/elevation/ossimElevationDatabase.cpp     |   169 -
 .../elevation/ossimElevationDatabaseFactory.cpp    |   115 -
 .../elevation/ossimElevationDatabaseRegistry.cpp   |    53 -
 .../elevation/ossimGeneralRasterElevHandler.cpp    |   737 --
 .../ossimGeneralRasterElevationDatabase.cpp        |   147 -
 .../elevation/ossimImageElevationDatabase.cpp      |   449 -
 src/ossim/elevation/ossimImageElevationHandler.cpp |   246 -
 src/ossim/elevation/ossimSrtmElevationDatabase.cpp |   242 -
 src/ossim/elevation/ossimSrtmHandler.cpp           |   516 -
 .../elevation/ossimTiledElevationDatabase.cpp      |   683 --
 src/ossim/font/.cvsignore                          |     1 -
 src/ossim/imaging/.cvsignore                       |     1 -
 src/ossim/imaging/ossim3x3ConvolutionFilter.cpp    |   633 --
 src/ossim/imaging/ossimAOD.cpp                     |   237 -
 src/ossim/imaging/ossimAnnotationLineObject.cpp    |   184 -
 .../imaging/ossimAnnotationMultiLineObject.cpp     |   191 -
 src/ossim/imaging/ossimAppFixedTileCache.cpp       |   430 -
 src/ossim/imaging/ossimAppTileCache.cpp            |   302 -
 src/ossim/imaging/ossimArcInfoGridWriter.cpp       |   370 -
 src/ossim/imaging/ossimAtCorrRemapper.cpp          |   730 --
 src/ossim/imaging/ossimBandAverageFilter.cpp       |   394 -
 src/ossim/imaging/ossimBandClipFilter.cpp          |   698 --
 src/ossim/imaging/ossimBandMergeSource.cpp         |   275 -
 src/ossim/imaging/ossimBandSelector.cpp            |   639 --
 src/ossim/imaging/ossimBandSeparateHandler.cpp     |   283 -
 src/ossim/imaging/ossimBitMaskTileSource.cpp       |   385 -
 src/ossim/imaging/ossimBitMaskWriter.cpp           |   481 -
 src/ossim/imaging/ossimBrightnessMatch.cpp         |   247 -
 src/ossim/imaging/ossimBumpShadeTileSource.cpp     |   523 -
 src/ossim/imaging/ossimCastTileSourceFilter.cpp    |   688 --
 src/ossim/imaging/ossimCcfTileSource.cpp           |   901 --
 src/ossim/imaging/ossimCibCadrgTileSource.cpp      |  1328 ---
 src/ossim/imaging/ossimClosestToCenterCombiner.cpp |   142 -
 src/ossim/imaging/ossimColorNormalizedFusion.cpp   |   145 -
 src/ossim/imaging/ossimConvolutionFilter1D.cpp     |   668 --
 src/ossim/imaging/ossimConvolutionSource.cpp       |   526 -
 src/ossim/imaging/ossimDdffielddefn.cpp            |   866 --
 src/ossim/imaging/ossimDdfsubfielddefn.cpp         |   997 --
 src/ossim/imaging/ossimDespeckleFilter.cpp         |   236 -
 src/ossim/imaging/ossimDoqqTileSource.cpp          |   260 -
 src/ossim/imaging/ossimDtedTileSource.cpp          |   682 --
 src/ossim/imaging/ossimERSTileSource.cpp           |   219 -
 src/ossim/imaging/ossimEastingNorthingCutter.cpp   |   202 -
 src/ossim/imaging/ossimEdgeFilter.cpp              |   649 --
 src/ossim/imaging/ossimElevImageSource.cpp         |   821 --
 src/ossim/imaging/ossimEnviHeaderFileWriter.cpp    |   101 -
 src/ossim/imaging/ossimEquationCombiner.cpp        |  3558 ------
 src/ossim/imaging/ossimFeatherMosaic.cpp           |   475 -
 src/ossim/imaging/ossimFftFilter.cpp               |   472 -
 src/ossim/imaging/ossimFgdcFileWriter.cpp          |   955 --
 src/ossim/imaging/ossimFilter.cpp                  |   333 -
 src/ossim/imaging/ossimFilterResampler.cpp         |   937 --
 src/ossim/imaging/ossimFilterTable.cpp             |   149 -
 src/ossim/imaging/ossimGammaRemapper.cpp           |   434 -
 src/ossim/imaging/ossimGeneralRasterInfo.cpp       |  1295 ---
 src/ossim/imaging/ossimGeneralRasterTileSource.cpp |  1600 ---
 src/ossim/imaging/ossimGeoAnnotationBitmap.cpp     |   204 -
 .../ossimGeoAnnotationMultiEllipseObject.cpp       |   174 -
 src/ossim/imaging/ossimGeoPolyCutter.cpp           |   322 -
 src/ossim/imaging/ossimGridRemapEngineFactory.cpp  |    44 -
 src/ossim/imaging/ossimHistoMatchRemapper.cpp      |   349 -
 src/ossim/imaging/ossimHistogramEqualization.cpp   |   538 -
 src/ossim/imaging/ossimHistogramRemapper.cpp       |  1926 ----
 .../imaging/ossimHistogramThreshholdFilter.cpp     |   260 -
 src/ossim/imaging/ossimHistogramWriter.cpp         |   309 -
 src/ossim/imaging/ossimHsiRemapper.cpp             |  3192 ------
 src/ossim/imaging/ossimHsiToRgbSource.cpp          |   147 -
 src/ossim/imaging/ossimHsvGridRemapEngine.cpp      |   276 -
 src/ossim/imaging/ossimHsvToRgbSource.cpp          |   159 -
 src/ossim/imaging/ossimIgenGenerator.cpp           |   681 --
 src/ossim/imaging/ossimImageCacheBase.cpp          |   661 --
 src/ossim/imaging/ossimImageCacheTileSource.cpp    |   437 -
 src/ossim/imaging/ossimImageChain.cpp              |  1833 ---
 src/ossim/imaging/ossimImageCombiner.cpp           |   633 --
 src/ossim/imaging/ossimImageData.cpp               |  7001 ------------
 src/ossim/imaging/ossimImageDataFactory.cpp        |   259 -
 src/ossim/imaging/ossimImageDataHelper.cpp         |   615 -
 src/ossim/imaging/ossimImageFileWriter.cpp         |  1653 ---
 src/ossim/imaging/ossimImageGaussianFilter.cpp     |   245 -
 src/ossim/imaging/ossimImageGeometry.cpp           |  1306 ---
 src/ossim/imaging/ossimImageGeometryFactory.cpp    |   227 -
 src/ossim/imaging/ossimImageGeometryRegistry.cpp   |    74 -
 src/ossim/imaging/ossimImageHandler.cpp            |  1693 ---
 src/ossim/imaging/ossimImageHandlerFactory.cpp     |   858 --
 src/ossim/imaging/ossimImageHandlerFactoryBase.cpp |    27 -
 src/ossim/imaging/ossimImageHandlerRegistry.cpp    |   266 -
 src/ossim/imaging/ossimImageHistogramSource.cpp    |   518 -
 .../ossimImageMetaDataWriterFactoryBase.cpp        |    28 -
 .../imaging/ossimImageMetaDataWriterRegistry.cpp   |   171 -
 src/ossim/imaging/ossimImageModel.cpp              |   154 -
 src/ossim/imaging/ossimImageRenderer.cpp           |  1926 ----
 src/ossim/imaging/ossimImageSharpenFilter.cpp      |   225 -
 src/ossim/imaging/ossimImageSource.cpp             |   378 -
 src/ossim/imaging/ossimImageSourceFactory.cpp      |   586 -
 src/ossim/imaging/ossimImageSourceFilter.cpp       |   215 -
 src/ossim/imaging/ossimImageSourceSequencer.cpp    |   403 -
 src/ossim/imaging/ossimImageStatisticsSource.cpp   |   179 -
 .../imaging/ossimImageToPlaneNormalFilter.cpp      |   467 -
 src/ossim/imaging/ossimImageWriterFactory.cpp      |   372 -
 .../imaging/ossimImageWriterFactoryRegistry.cpp    |   284 -
 src/ossim/imaging/ossimIndexToRgbLutFilter.cpp     |   626 -
 .../imaging/ossimIntensityAdjustmentFilter.cpp     |   288 -
 src/ossim/imaging/ossimJpegWriter.cpp              |   467 -
 src/ossim/imaging/ossimJpegYCbCrToRgbSource.cpp    |   114 -
 .../imaging/ossimLandsatTopoCorrectionFilter.cpp   |   360 -
 src/ossim/imaging/ossimMapCompositionSource.cpp    |  3800 -------
 src/ossim/imaging/ossimMaskFilter.cpp              |   862 --
 src/ossim/imaging/ossimMaxMosaic.cpp               |   550 -
 src/ossim/imaging/ossimMeanMedianFilter.cpp        |   930 --
 src/ossim/imaging/ossimMemoryImageSource.cpp       |   245 -
 src/ossim/imaging/ossimMetadataFileWriter.cpp      |   277 -
 src/ossim/imaging/ossimMonoGridRemapEngine.cpp     |   368 -
 src/ossim/imaging/ossimNBandToIndexFilter.cpp      |   559 -
 src/ossim/imaging/ossimNitf20Writer.cpp            |   832 --
 src/ossim/imaging/ossimNitfTileSource.cpp          |  3366 ------
 src/ossim/imaging/ossimNitfTileSource_12.cpp       |   255 -
 src/ossim/imaging/ossimNitfWriter.cpp              |   739 --
 src/ossim/imaging/ossimNitfWriterBase.cpp          |   360 -
 src/ossim/imaging/ossimNormalizedRemapTable.cpp    |    36 -
 src/ossim/imaging/ossimNormalizedS16RemapTable.cpp |    49 -
 src/ossim/imaging/ossimNormalizedU11RemapTable.cpp |    41 -
 src/ossim/imaging/ossimNormalizedU16RemapTable.cpp |    44 -
 src/ossim/imaging/ossimNormalizedU8RemapTable.cpp  |    42 -
 src/ossim/imaging/ossimOverviewSequencer.cpp       |  1050 --
 src/ossim/imaging/ossimPdfWriter.cpp               |  1875 ---
 src/ossim/imaging/ossimPolyCutter.cpp              |   411 -
 src/ossim/imaging/ossimQbTileFilesHandler.cpp      |   290 -
 src/ossim/imaging/ossimQuickbirdNitfTileSource.cpp |   154 -
 src/ossim/imaging/ossimRLevelFilter.cpp            |   234 -
 src/ossim/imaging/ossimReadmeFileWriter.cpp        |   454 -
 src/ossim/imaging/ossimRectangleCutFilter.cpp      |   308 -
 src/ossim/imaging/ossimRgbGridRemapEngine.cpp      |   271 -
 src/ossim/imaging/ossimRgbToGreyFilter.cpp         |   247 -
 src/ossim/imaging/ossimRgbToHsiSource.cpp          |   162 -
 src/ossim/imaging/ossimRgbToHsvSource.cpp          |   155 -
 src/ossim/imaging/ossimRgbToIndexFilter.cpp        |   228 -
 src/ossim/imaging/ossimRgbToJpegYCbCrSource.cpp    |    93 -
 src/ossim/imaging/ossimRpfCacheTileSource.cpp      |  1314 ---
 src/ossim/imaging/ossimSFIMFusion.cpp              |   408 -
 src/ossim/imaging/ossimScaleFilter.cpp             |   959 --
 src/ossim/imaging/ossimSingleImageChain.cpp        |   766 --
 src/ossim/imaging/ossimSrtmTileSource.cpp          |   159 -
 src/ossim/imaging/ossimSubImageTileSource.cpp      |   225 -
 src/ossim/imaging/ossimTableRemapper.cpp           |   584 -
 src/ossim/imaging/ossimTiffOverviewBuilder.cpp     |  1438 ---
 src/ossim/imaging/ossimTiffTileSource.cpp          |  2691 -----
 src/ossim/imaging/ossimTiffWriter.cpp              |  1739 ---
 src/ossim/imaging/ossimTilePatch.cpp               |   518 -
 src/ossim/imaging/ossimTiledImageHandler.cpp       |   564 -
 src/ossim/imaging/ossimTiling.cpp                  |   986 --
 src/ossim/imaging/ossimTilingPoly.cpp              |   369 -
 src/ossim/imaging/ossimTilingRect.cpp              |   886 --
 .../imaging/ossimTopographicCorrectionFilter.cpp   |  1297 ---
 src/ossim/imaging/ossimTrimFilter.cpp              |   357 -
 src/ossim/imaging/ossimTwoColorView.cpp            |   420 -
 src/ossim/imaging/ossimUsgsDemTileSource.cpp       |   574 -
 .../imaging/ossimValueAssignImageSourceFilter.cpp  |   377 -
 .../imaging/ossimVpfAnnotationCoverageInfo.cpp     |   217 -
 .../imaging/ossimVpfAnnotationFeatureInfo.cpp      |  1446 ---
 .../imaging/ossimVpfAnnotationLibraryInfo.cpp      |   259 -
 src/ossim/init/.cvsignore                          |     1 -
 src/ossim/init/ossimInit.cpp                       |   716 --
 src/ossim/kbool/.cvsignore                         |     4 -
 src/ossim/kbool/booleng.cpp                        |   685 --
 src/ossim/kbool/graph.cpp                          |  2647 -----
 src/ossim/kbool/graphlst.cpp                       |   414 -
 src/ossim/kbool/line.cpp                           |  1476 ---
 src/ossim/kbool/link.cpp                           |   724 --
 src/ossim/kbool/lpoint.cpp                         |   203 -
 src/ossim/kbool/makefile.vc                        |    23 -
 src/ossim/kbool/node.cpp                           |   673 --
 src/ossim/kbool/record.cpp                         |   357 -
 src/ossim/kbool/scanbeam.cpp                       |  1374 ---
 src/ossim/matrix/.cvsignore                        |     1 -
 src/ossim/matrix/newmat4.cpp                       |  1027 --
 src/ossim/matrix/newmat5.cpp                       |   485 -
 src/ossim/ossimVersion.h.in                        |    14 -
 src/ossim/parallel/.cvsignore                      |     4 -
 src/ossim/parallel/ossimIgen.cpp                   |   727 --
 src/ossim/parallel/ossimImageChainMtAdaptor.cpp    |   458 -
 src/ossim/parallel/ossimMpi.cpp                    |   186 -
 src/ossim/parallel/ossimOrthoIgen.cpp              |  2975 -----
 src/ossim/plugin/.cvsignore                        |     1 -
 src/ossim/plugin/ossimDynamicLibrary.cpp           |   107 -
 src/ossim/plugin/ossimPluginLibrary.cpp            |    89 -
 src/ossim/plugin/ossimSharedPluginRegistry.cpp     |   230 -
 src/ossim/projection/.cvsignore                    |     3 -
 src/ossim/projection/ossimAdjMapModel.cpp          |   417 -
 src/ossim/projection/ossimAlbersProjection.cpp     |   641 --
 src/ossim/projection/ossimApplanixEcefModel.cpp    |   801 --
 src/ossim/projection/ossimApplanixUtmModel.cpp     |   978 --
 src/ossim/projection/ossimBuckeyeSensor.cpp        |   623 -
 src/ossim/projection/ossimCoarseGridModel.cpp      |  1025 --
 .../projection/ossimEpsgProjectionDatabase.cpp     |   877 --
 .../projection/ossimEpsgProjectionFactory.cpp      |   203 -
 src/ossim/projection/ossimEquDistCylProjection.cpp |   672 --
 src/ossim/projection/ossimFcsiModel.cpp            |  1064 --
 src/ossim/projection/ossimIkonosRpcModel.cpp       |   959 --
 src/ossim/projection/ossimImageProjectionModel.cpp |    54 -
 .../projection/ossimImageViewAffineTransform.cpp   |   306 -
 .../ossimImageViewProjectionTransform.cpp          |   507 -
 src/ossim/projection/ossimImageViewTransform.cpp   |   278 -
 src/ossim/projection/ossimLensDistortion.cpp       |   132 -
 src/ossim/projection/ossimMapProjection.cpp        |  1670 ---
 src/ossim/projection/ossimMapProjectionFactory.cpp |   285 -
 src/ossim/projection/ossimMgrs.c                   |  1325 ---
 .../projection/ossimNitfProjectionFactory.cpp      |   986 --
 src/ossim/projection/ossimNitfRpcModel.cpp         |   474 -
 .../projection/ossimProjectionFactoryBase.cpp      |    97 -
 .../projection/ossimProjectionFactoryRegistry.cpp  |   168 -
 src/ossim/projection/ossimQuickbirdRpcModel.cpp    |   490 -
 src/ossim/projection/ossimRS1SarModel.cpp          |  1083 --
 src/ossim/projection/ossimRpcModel.cpp             |  1391 ---
 src/ossim/projection/ossimRpcProjection.cpp        |  1393 ---
 src/ossim/projection/ossimRpcSolver.cpp            |   827 --
 src/ossim/projection/ossimSensorModel.cpp          |  1679 ---
 src/ossim/projection/ossimSensorModelFactory.cpp   |   680 --
 src/ossim/projection/ossimTranmerc.c               |   625 -
 .../projection/ossimTransMercatorProjection.cpp    |   733 --
 src/ossim/projection/ossimUtmpt.cpp                |    88 -
 src/ossim/projection/ossimWktProjectionFactory.cpp |   188 -
 src/ossim/support_data/.cvsignore                  |     4 -
 .../support_data/ossimAlphaSensorSupportData.cpp   |   691 --
 src/ossim/support_data/ossimApplanixEOFile.cpp     |   691 --
 src/ossim/support_data/ossimAuxFileHandler.cpp     |  1138 --
 src/ossim/support_data/ossimCcfInfo.cpp            |    58 -
 src/ossim/support_data/ossimCeosData.cpp           |  1379 ---
 src/ossim/support_data/ossimDemHeader.cpp          |   785 --
 src/ossim/support_data/ossimDemInfo.cpp            |    61 -
 src/ossim/support_data/ossimDemPoint.cpp           |    16 -
 src/ossim/support_data/ossimDemProfile.cpp         |   155 -
 src/ossim/support_data/ossimDemStats.cpp           |   126 -
 src/ossim/support_data/ossimDemUtil.cpp            |   178 -
 src/ossim/support_data/ossimDoqq.cpp               |   437 -
 src/ossim/support_data/ossimDtedAcc.cpp            |   285 -
 src/ossim/support_data/ossimDtedDsi.cpp            |   586 -
 src/ossim/support_data/ossimDtedHdr.cpp            |   233 -
 src/ossim/support_data/ossimDtedInfo.cpp           |   284 -
 src/ossim/support_data/ossimDtedUhl.cpp            |   330 -
 src/ossim/support_data/ossimEnviHeader.cpp         |   952 --
 src/ossim/support_data/ossimEnviInfo.cpp           |    78 -
 src/ossim/support_data/ossimFfL7.cpp               |   707 --
 src/ossim/support_data/ossimFgdcTxtDoc.cpp         |   306 -
 src/ossim/support_data/ossimFgdcXmlDoc.cpp         |   548 -
 src/ossim/support_data/ossimIkonosMetaData.cpp     |   599 -
 src/ossim/support_data/ossimInfoBase.cpp           |    44 -
 src/ossim/support_data/ossimInfoFactory.cpp        |   134 -
 src/ossim/support_data/ossimJ2kCodRecord.cpp       |    93 -
 src/ossim/support_data/ossimJ2kInfo.cpp            |   248 -
 src/ossim/support_data/ossimJ2kSizRecord.cpp       |   169 -
 src/ossim/support_data/ossimJ2kSotRecord.cpp       |    87 -
 src/ossim/support_data/ossimJp2Info.cpp            |   211 -
 src/ossim/support_data/ossimLasHdr.cpp             |   627 -
 src/ossim/support_data/ossimLasInfo.cpp            |    58 -
 src/ossim/support_data/ossimNitfAcftbTag.cpp       |   264 -
 src/ossim/support_data/ossimNitfAimidbTag.cpp      |   171 -
 src/ossim/support_data/ossimNitfBlockaTag.cpp      |   325 -
 src/ossim/support_data/ossimNitfCommon.cpp         |   541 -
 .../support_data/ossimNitfCompressionHeader.cpp    |    20 -
 src/ossim/support_data/ossimNitfCsccgaTag.cpp      |    86 -
 src/ossim/support_data/ossimNitfCscrnaTag.cpp      |   154 -
 src/ossim/support_data/ossimNitfCsdidaTag.cpp      |   149 -
 src/ossim/support_data/ossimNitfCsexraTag.cpp      |   337 -
 .../support_data/ossimNitfDataExtensionSegment.cpp |    26 -
 .../ossimNitfDataExtensionSegmentV2_0.cpp          |   135 -
 src/ossim/support_data/ossimNitfEmbeddedRpfDes.cpp |    38 -
 src/ossim/support_data/ossimNitfEngrdaTag.cpp      |   253 -
 src/ossim/support_data/ossimNitfFile.cpp           |   407 -
 src/ossim/support_data/ossimNitfFileHeader.cpp     |   226 -
 src/ossim/support_data/ossimNitfFileHeaderV2_0.cpp |  1638 ---
 src/ossim/support_data/ossimNitfFileHeaderV2_1.cpp |  1820 ---
 src/ossim/support_data/ossimNitfFileHeaderV2_X.cpp |   531 -
 .../support_data/ossimNitfGeoPositioningTag.cpp    |   142 -
 src/ossim/support_data/ossimNitfHistoaTag.cpp      |   470 -
 src/ossim/support_data/ossimNitfImageBand.cpp      |    26 -
 src/ossim/support_data/ossimNitfImageBandV2_0.cpp  |   217 -
 src/ossim/support_data/ossimNitfImageHeader.cpp    |   396 -
 .../support_data/ossimNitfImageHeaderV2_0.cpp      |  1038 --
 .../support_data/ossimNitfImageHeaderV2_1.cpp      |  1380 ---
 src/ossim/support_data/ossimNitfInfo.cpp           |    59 -
 src/ossim/support_data/ossimNitfJ2klraTag.cpp      |   181 -
 .../support_data/ossimNitfLocalCartographicTag.cpp |   137 -
 .../support_data/ossimNitfLocalGeographicTag.cpp   |   110 -
 src/ossim/support_data/ossimNitfMstgtaTag.cpp      |   134 -
 .../support_data/ossimNitfNameConversionTables.cpp |   163 -
 src/ossim/support_data/ossimNitfPiaimcTag.cpp      |   411 -
 .../ossimNitfProjectionParameterTag.cpp            |   212 -
 src/ossim/support_data/ossimNitfRegisteredTag.cpp  |   116 -
 .../support_data/ossimNitfRegisteredTagFactory.cpp |   193 -
 src/ossim/support_data/ossimNitfRpcATag.cpp        |    24 -
 src/ossim/support_data/ossimNitfRpcBTag.cpp        |    22 -
 src/ossim/support_data/ossimNitfRpcBase.cpp        |   928 --
 src/ossim/support_data/ossimNitfRpfTagFactory.cpp  |    56 -
 src/ossim/support_data/ossimNitfSensraTag.cpp      |   444 -
 src/ossim/support_data/ossimNitfStdidcTag.cpp      |   468 -
 .../support_data/ossimNitfTagFactoryRegistry.cpp   |   113 -
 src/ossim/support_data/ossimNitfTagInformation.cpp |   190 -
 src/ossim/support_data/ossimNitfUnknownTag.cpp     |   125 -
 src/ossim/support_data/ossimNitfUse00aTag.cpp      |   539 -
 .../support_data/ossimNitfVqCompressionHeader.cpp  |   349 -
 src/ossim/support_data/ossimNmeaMessage.cpp        |    98 -
 src/ossim/support_data/ossimQuickbirdMetaData.cpp  |   818 --
 src/ossim/support_data/ossimQuickbirdRpcHeader.cpp |   246 -
 src/ossim/support_data/ossimRpfAttributes.cpp      |   170 -
 .../ossimRpfColorConverterSubsection.cpp           |   130 -
 src/ossim/support_data/ossimRpfCoverageSection.cpp |   295 -
 src/ossim/support_data/ossimRpfFrame.cpp           |  1121 --
 src/ossim/support_data/ossimRpfFrameEntry.cpp      |   125 -
 src/ossim/support_data/ossimRpfHeader.cpp          |   872 --
 .../ossimRpfImageDescriptionSubheader.cpp          |   114 -
 src/ossim/support_data/ossimRpfInfo.cpp            |    92 -
 src/ossim/support_data/ossimRpfLocationSection.cpp |   315 -
 src/ossim/support_data/ossimRpfToc.cpp             |  1294 ---
 src/ossim/support_data/ossimRpfTocEntry.cpp        |   279 -
 src/ossim/support_data/ossimSupportFilesList.cpp   |    42 -
 src/ossim/support_data/ossimTiffInfo.cpp           |  3890 -------
 src/ossim/support_data/ossimTiffWorld.cpp          |   268 -
 src/ossim/support_data/ossimWavelength.cpp         |   204 -
 src/ossim/support_data/ossimXmpInfo.cpp            |   644 --
 src/ossim/util/ossimBatchTest.cpp                  |  1268 ---
 src/ossim/util/ossimChipperUtil.cpp                |  3861 -------
 src/ossim/util/ossimFileWalker.cpp                 |   504 -
 src/ossim/util/ossimImageUtil.cpp                  |  1511 ---
 src/ossim/util/ossimInfo.cpp                       |  2403 ----
 src/ossim/util/ossimRpfUtil.cpp                    |   348 -
 src/ossim/vec/.cvsignore                           |     2 -
 src/ossim/vec/ossimVpfCoverage.cpp                 |   196 -
 .../vec/ossimVpfDatabaseHeaderTableValidator.cpp   |   132 -
 src/ossim/vec/ossimVpfFeatureClassSchema.cpp       |   148 -
 src/ossim/vec/ossimVpfTable.cpp                    |   913 --
 src/ossim/vpfutil/.cvsignore                       |     1 -
 src/ossim/vpfutil/set.c                            |  1303 ---
 src/ossim/vpfutil/vpfdisp.c                        |   504 -
 src/ossim/vpfutil/vpfread.c                        |  1646 ---
 src/ossim/vpfutil/vpfrelat.c                       |   904 --
 src/ossim/vpfutil/vpftable.c                       |  1082 --
 src/ossim/vpfutil/vpftidx.c                        |  1958 ----
 src/test/CMakeLists.txt                            |    50 -
 src/test/ossim-date-test.cpp                       |    56 -
 src/test/ossim-directory-test.cpp                  |    80 -
 src/test/ossim-elevation-manager-test.cpp          |    41 -
 src/test/ossim-envi-hdr-test.cpp                   |    48 -
 src/test/ossim-fgdc-txt-doc-test.cpp               |    73 -
 src/test/ossim-filename-test.cpp                   |   201 -
 src/test/ossim-foo.cpp                             |    49 -
 src/test/ossim-get-pixel-test.cpp                  |   218 -
 src/test/ossim-gpt-test.cpp                        |   141 -
 src/test/ossim-gsd-test.cpp                        |   118 -
 src/test/ossim-image-chain-test.cpp                |    80 -
 src/test/ossim-image-elevation-test.cpp            |    98 -
 src/test/ossim-image-geometry-test.cpp             |   348 -
 src/test/ossim-image-writer-test.cpp               |    77 -
 src/test/ossim-info-test.cpp                       |    71 -
 src/test/ossim-loadtile-test.cpp                   |   115 -
 src/test/ossim-mask-filter-test.cpp                |   181 -
 src/test/ossim-notify-test.cpp                     |    51 -
 src/test/ossim-point-test.cpp                      |   184 -
 src/test/ossim-projection-test.cpp                 |    75 -
 src/test/ossim-ref-ptr-test.cpp                    |    90 -
 src/test/ossim-remap-table-test.cpp                |   359 -
 src/test/ossim-single-image-chain-test.cpp         |   164 -
 .../ossim-single-image-chain-threaded-test.cpp     |   101 -
 src/test/ossim-threaded-chain-test.cpp             |   221 -
 src/test/ossim-threaded-elevation-test.cpp         |   165 -
 src/test/ossim-tiff-info-test.cpp                  |    82 -
 src/test/ossim-tiled-elevation-test.cpp            |   207 -
 src/test/ossim-visitor-test.cpp                    |   101 -
 src/test/ossim-wavelength-test.cpp                 |   127 -
 src/test/ossim-xml-test.cpp                        |    48 -
 xcode/ossim/English.lproj/InfoPlist.strings        |   Bin 140 -> 0 bytes
 xcode/ossim/Resources/icons/ossimPlanet.icns       |   Bin 53664 -> 0 bytes
 xcode/ossim/Resources/icons/ossimPlanet.ico        |   Bin 84070 -> 0 bytes
 xcode/ossim/Resources/imagelinker-Info.plist       |    22 -
 xcode/ossim/Resources/iview-Info.plist             |    22 -
 xcode/ossim/Resources/ossim-Info.plist             |    34 -
 xcode/ossim/Resources/ossimPlanet-Info.plist       |    20 -
 xcode/ossim/Resources/ossimPlanetQt-info.plist     |    20 -
 xcode/ossim/Resources/ossimPlanetQtApp-Info.plist  |    22 -
 xcode/ossim/Resources/ossim_qt-Info.plist          |    34 -
 xcode/ossim/Resources/version.plist                |    18 -
 xcode/ossim/common_settings.xcconfig               |    24 -
 xcode/ossim/convert_headers.pl                     |   163 -
 xcode/ossim/ossim.xcodeproj/project.pbxproj        | 11353 -------------------
 xcode/ossim/ossim_Prefix.pch                       |     5 -
 xcode/ossim/ossimplanet2-Info.plist                |    28 -
 3178 files changed, 340350 insertions(+), 363222 deletions(-)

diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index 1037a52..0000000
--- a/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-autom4te.cache
-Makefile
-Makefile.common
-config.log
-config.cache
-config.status
-*.mak
-.emacs*
diff --git a/CMakeLists.txt b/CMakeLists.txt
deleted file mode 100644
index 05989be..0000000
--- a/CMakeLists.txt
+++ /dev/null
@@ -1,238 +0,0 @@
-PROJECT(ossimcore)
-Message("################## Setting up OSSIM core library #########################")
-
-IF(NOT OSSIM_BUILD_ADDITIONAL_OSSIM_DIRECTORIES)
-   SET(OSSIM_BUILD_ADDITIONAL_OSSIM_DIRECTORIES "" CACHE PATH "Specify full paths separated by ; to additional OSSIM applications you wish to include into the ossim build framework.  These will have variables setup for the ossim includes" FORCE)
-ENDIF(NOT OSSIM_BUILD_ADDITIONAL_OSSIM_DIRECTORIES)
-
-IF(NOT APPLE)
-  cmake_minimum_required(VERSION 2.6)
-ELSE(NOT APPLE)
-  cmake_minimum_required(VERSION 2.8)
-ENDIF(NOT APPLE)
-
-SET(CMAKE_MODULE_PATH "${${PROJECT_NAME}_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
-
-INCLUDE(OssimVersion)
-INCLUDE(OssimCommonVariables)
-
-# Expose some build options
-OPTION(BUILD_OSSIM_FREETYPE_SUPPORT "Set to ON to build OSSIM with freetype support.  Use OFF to turn off freetype support." ON)
-
-OPTION(BUILD_OSSIM_MPI_SUPPORT "Set to ON to build OSSIM with MPI support.  Use OFF to turn off MPI support." ON)
-
-OPTION(BUILD_OSSIM_ID_SUPPORT "Set to ON to build OSSIM SVN ID support into the library.  Use OFF to turn off ID support." ON)
-
-OPTION(BUILD_OSSIM_TEST_APPS "Set to ON to build ossim test apps.  Use OFF to disable." OFF)
-
-###################################################################################
-# Include the Utilities in the root make
-###################################################################################
-INCLUDE(OssimUtilities)
-
-INCLUDE(CheckIncludeFile)
-CHECK_INCLUDE_FILE("dirent.h" CMAKE_HAVE_DIRENT_H)
-CHECK_INCLUDE_FILE("unistd.h" CMAKE_HAVE_UNISTD_H)
-CHECK_INCLUDE_FILE("getopt.h" CMAKE_HAVE_GETOPT_H)
-CHECK_INCLUDE_FILE("fcntl.h" CMAKE_HAVE_FCNTL_H)
-CHECK_INCLUDE_FILE("dbmalloc.h" CMAKE_HAVE_DBMALLOC_H)
-CHECK_INCLUDE_FILE("malloc.h" CMAKE_HAVE_MALLOC_H)
-CHECK_INCLUDE_FILE("dlfcn.h" CMAKE_HAVE_DLFCN_H)
-
-# Set our include paths:
-include_directories( ${PROJECT_SOURCE_DIR}/include )
-include_directories( ${PROJECT_BINARY_DIR}/include )
-
-# Stores list of libs to link with. Initialized throughout.
-set( ossimDependentLibs )
-
-#---
-# Find required and optional packages and add their include paths and libraries:
-#---
-
-# GEOS - Currently optional until it is actually called.:
-find_package( GEOS )
-if( GEOS_FOUND )
-   include_directories( ${GEOS_INCLUDE_DIR} )
-   set( ossimDependentLibs ${ossimDependentLibs} ${GEOS_LIBRARY} )
-else( GEOS_FOUND )
-   message( WARNING "Could not find geos package! Consider installing this as it will soon become a required package." )
-endif( GEOS_FOUND )
-
-# GEOFIFF - Required:
-set( OSSIM_HAS_GEOTIFF 0 )
-find_package( GEOTIFF )
-if( GEOTIFF_FOUND )
-   include_directories( ${GEOTIFF_INCLUDE_DIR} )
-   set( ossimDependentLibs ${ossimDependentLibs} ${GEOTIFF_LIBRARY} )
-   set( OSSIM_HAS_GEOTIFF 1 )
-else( GEOTIFF_FOUND )
-   message( FATAL_ERROR "Could not find required geotiff package!" )
-endif( GEOTIFF_FOUND )
-
-# JPEG - Required package:
-find_package( JPEG )
-if( JPEG_FOUND )
-   include_directories( ${JPEG_INCLUDE_DIR} )
-   set( ossimDependentLibs ${ossimDependentLibs} ${JPEG_LIBRARY} )
-else( JPEG_FOUND )
-   message( FATAL_ERROR "Could not find required jpeg package!" )
-endif( JPEG_FOUND )
-
-# OpenThreads - Required:
-find_package( OpenThreads )
-if( OPENTHREADS_FOUND )
-   include_directories( ${OPENTHREADS_INCLUDE_DIR} )
-   set( ossimDependentLibs ${ossimDependentLibs} ${OPENTHREADS_LIBRARY} )
-else( OPENTHREADS_FOUND )
-   message( FATAL_ERROR "Could not find required OpenThreads package!" )
-endif( OPENTHREADS_FOUND )
-
-# TIFF - Required:
-find_package( TIFF )
-if( TIFF_FOUND )
-   include_directories( ${TIFF_INCLUDE_DIR} )
-   set( ossimDependentLibs ${ossimDependentLibs} ${TIFF_LIBRARY} )
-else( TIFF_FOUND )
-   message( FATAL_ERROR "Could not find required tiff package!" )
-endif( TIFF_FOUND )
-
-# DL - Required on unix:
-if( UNIX )
-   find_library( DL_LIBRARY dl )
-   if ( DL_LIBRARY )
-      set( ossimDependentLibs ${ossimDependentLibs} ${DL_LIBRARY} )
-   else( DL_LIBRARY )
-      # TODO:  Is this required on unix?  If so move to the required section.
-      message( FATAL_ERROR "Could not find dl library!" )
-   endif( DL_LIBRARY )
-endif( UNIX )
-
-# FREETYPE - Optional:
-set( OSSIM_HAS_FREETYPE 0 )
-if( BUILD_OSSIM_FREETYPE_SUPPORT )
-   find_package(Freetype)
-   if( FREETYPE_FOUND )
-      include_directories( ${FREETYPE_INCLUDE_DIRS} )
-      set( ossimDependentLibs ${ossimDependentLibs} ${FREETYPE_LIBRARIES} )
-      set( OSSIM_HAS_FREETYPE 1 )
-   else( FREETYPE_FOUND )
-      message( WARNING "Could not find optional freetype package!" )
-   endif( FREETYPE_FOUND )
-endif( BUILD_OSSIM_FREETYPE_SUPPORT )
-
-# MPI - Optional:
-set( OSSIM_HAS_MPI 0 )
-if( BUILD_OSSIM_MPI_SUPPORT )
-   find_package(MPI)
-   if ( MPI_FOUND )
-      include_directories( ${MPI_INCLUDE_DIR} )
-      set( ossimDependentLibs ${ossimDependentLibs} ${MPI_LIBRARY} )
-      set( OSSIM_HAS_MPI 1 )
-   else ( MPI_FOUND )
-      message( WARNING "Could not find optional MPI package!" )
-   endif ( MPI_FOUND )
-endif( BUILD_OSSIM_MPI_SUPPORT )
-
-# ZLIB - Optional:
-set( OSSIM_HAS_LIBZ 0 )
-find_package( ZLIB )
-if ( ZLIB_FOUND )
-   include_directories( ${ZLIB_INCLUDE_DIR} )
-   set( ossimDependentLibs ${ossimDependentLibs} ${ZLIB_LIBRARY} )
-   set( OSSIM_HAS_LIBZ 1 )
-else ( ZLIB_FOUND )
-   message( WARNING "Could not find optional zlib package!" )
-endif ( ZLIB_FOUND )
-
-#---
-# Call the OSSIM macros in OssimUtilities.cmake
-#---
-TODAYS_DATE(OSSIM_BUILD_DATE)
-SET(OSSIM_SVN_REVISION_NUMBER "UNKNOWN")
-GET_SVN_REVISION()
-if ( NOT ${Project_WC_REVISION} EQUAL 0 )
-   set( OSSIM_SVN_REVISION_NUMBER ${Project_WC_REVISION} )
-endif()
-
-#####################################################################################
-# Call the configure files for ossimConfig and ossimVersion setup
-#####################################################################################
-set(OSSIM_VERSION_NUMBER "\"${OSSIM_VERSION}\"")
-set(OSSIM_BUILD_DATE "\"${OSSIM_BUILD_DATE}\"")
-
-# Setting of OSSIM_ID to variable expanded $Id$ results.  Embedded troughout code.
-set(OSSIM_ID_ENABLED   1)
-IF(NOT BUILD_OSSIM_ID_SUPPORT)
-   set(OSSIM_ID_ENABLED 0)
-ENDIF(NOT BUILD_OSSIM_ID_SUPPORT)
-
-SET(OSSIM_CONFIGURE_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/include/ossim/ossimConfig.h")
-CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/src/ossim/ossimConfig.h.in"
-	       "${OSSIM_CONFIGURE_HEADER}")
-SET(OSSIM_VERSION_HEADER_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/src/ossim/ossimVersion.h.in")
-SET(OSSIM_VERSION_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/include/ossim/ossimVersion.h")
-CONFIGURE_FILE("${OSSIM_VERSION_HEADER_CONFIG}"
-               "${OSSIM_VERSION_HEADER}")
-
-
-##################################################################################################
-# Instead of creating another CMakeLists under src we will just add the subdirectories to build
-# here
-##################################################################################################
-SUBDIRS(src/ossim)
-SUBDIRS(src/apps)
-
-#---
-# Building test apps optional.
-#---
-IF(BUILD_OSSIM_TEST_APPS)
-  SUBDIRS(src/test)
-ENDIF(BUILD_OSSIM_TEST_APPS)
-
-set(TARGET_COMMON_LIBRARIES ossim ${OPENTHREADS_LIBRARY})
-
-##################################################################################################
-#
-# Setup install destinations for the shared files
-#
-##################################################################################################
-FILE(GLOB ossim_projection_codes_csv ${${PROJECT_NAME}_SOURCE_DIR}/share/ossim/*.csv ${${PROJECT_NAME}_SOURCE_DIR}/share/ossim/*.txt)
-INSTALL(FILES ${ossim_projection_codes_csv} DESTINATION share/ossim/projection COMPONENT ossim)
-
-###################### OUTPUT GENERAL VARIABLE SETTINGS #######################
-
-MESSAGE( STATUS "OSSIM_SVN_REVISION_NUMBER       = ${OSSIM_SVN_REVISION_NUMBER}" )
-MESSAGE( STATUS "BUILD_LIBRARY_DIR               = ${BUILD_LIBRARY_DIR}" )
-MESSAGE( STATUS "BUILD_RUNTIME_DIR               = ${BUILD_RUNTIME_DIR}" )
-MESSAGE( STATUS "BUILD_OSSIM_FREETYPE_SUPPORT    = ${BUILD_OSSIM_FREETYPE_SUPPORT}" )
-MESSAGE( STATUS "BUILD_OSSIM_TEST_APPS           = ${BUILD_OSSIM_TEST_APPS}" )
-MESSAGE( STATUS "CMAKE_BUILD_TYPE                = ${CMAKE_BUILD_TYPE}" )
-MESSAGE( STATUS "CMAKE_CXX_COMPILER              = ${CMAKE_CXX_COMPILER}" )
-MESSAGE( STATUS "CMAKE_CXX_FLAGS                 = ${CMAKE_CXX_FLAGS}" )
-MESSAGE( STATUS "CMAKE_CXX_FLAGS_DEBUG           = ${CMAKE_CXX_FLAGS_DEBUG}" )
-MESSAGE( STATUS "CMAKE_CXX_FLAGS_RELEASE         = ${CMAKE_CXX_FLAGS_RELEASE}" )
-MESSAGE( STATUS "CMAKE_INSTALL_PREFIX            = ${CMAKE_INSTALL_PREFIX}" )
-MESSAGE( STATUS "FREETYPE_LIBRARY                = ${FREETYPE_LIBRARIES}" )
-MESSAGE( STATUS "FREETYPE_INCLUDE                = ${FREETYPE_INCLUDE_DIRS}" )
-MESSAGE( STATUS "GEOTIFF_LIBRARY                 = ${GEOTIFF_LIBRARIES}" )
-MESSAGE( STATUS "GEOTIFF_INCLUDE                 = ${GEOTIFF_INCLUDE_DIR}" )
-MESSAGE( STATUS "JPEG_LIBRARY                    = ${JPEG_LIBRARIES}" )
-MESSAGE( STATUS "JPEG_INCLUDE                    = ${JPEG_INCLUDE_DIR}" )
-MESSAGE( STATUS "MPI_LIBRARY                     = ${MPI_LIBRARIES}" )
-MESSAGE( STATUS "MPI_INCLUDE                     = ${MPI_INCLUDE_PATH}" )
-MESSAGE( STATUS "OPENTHREADS_LIBRARY             = ${OPENTHREADS_LIBRARY}" )
-MESSAGE( STATUS "OPENTHREADS_INCLUDE             = ${OPENTHREADS_INCLUDE_DIR}" )
-MESSAGE( STATUS "OSSIM_COMPILE_WITH_FULL_WARNING = ${OSSIM_COMPILE_WITH_FULL_WARNING}" )
-MESSAGE( STATUS "OSSIM DEPENDENT LIBRARIES       = ${ossimDependentLibs}" )
-MESSAGE( STATUS "TIFF_LIBRARY                    = ${TIFF_LIBRARIES}" )
-MESSAGE( STATUS "TIFF_INCLUDE                    = ${TIFF_INCLUDE_DIR}" )
-MESSAGE( STATUS "ZLIB_LIBRARY                    = ${ZLIB_LIBRARIES}" )
-MESSAGE( STATUS "ZLIB_INCLUDE                    = ${ZLIB_INCLUDE_DIR}" )
-
-#-----------------------------------------------------------------------------
-# uninstall target
-#-----------------------------------------------------------------------------
-OSSIM_ADD_COMMON_MAKE_UNINSTALL()
-
-message("################## end of OSSIM core library setup #########################")
diff --git a/COPYING.GPL b/COPYING.GPL
deleted file mode 100644
index b54a57e..0000000
--- a/COPYING.GPL
+++ /dev/null
@@ -1,90 +0,0 @@
-GNU GENERAL PUBLIC LICENSE
-
-Version 2, June 1991
-
-Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
-
-Preamble
-
-The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library Genera [...]
-
-When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
-
-To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
-
-For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
-
-We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
-
-Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
-
-Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
-
-The precise terms and conditions for copying, distribution and modification follow.
-
-GNU GENERAL PUBLIC LICENSE
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. ( [...]
-
-Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
-
-1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
-
-2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
-
-a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
-
-b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
-
-c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is i [...]
-
-These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose p [...]
-
-Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
-
-3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
-
-a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
-
-b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
-
-c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major co [...]
-
-If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though  third parties are not compelled to copy the source along with the object code.
-
-4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
-
-5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works ba [...]
-
-6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
-
-7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the  conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not dis [...]
-
-If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/dono [...]
-
-This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
-
-8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
-
-9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problemsor concerns.
-
-Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
-
-10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
-
-NO WARRANTY
-
-11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  [...]
-
-12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU  FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO [...]
-
-END OF TERMS AND CONDITIONS
diff --git a/COPYING.LGPL b/COPYING.LGPL
deleted file mode 100644
index edc42b3..0000000
--- a/COPYING.LGPL
+++ /dev/null
@@ -1,141 +0,0 @@
-GNU LESSER GENERAL PUBLIC LICENSE 
-
-Version 2.1, February 1999
-
-(The master copy of this license lives on the GNU website.) 
-
-Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
-as the successor of the GNU Library Public License, version 2, hence
-the version number 2.1.]
-
-Preamble
-
-The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. 
-
-This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. 
-
-When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. 
-
-To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. 
-
-For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. 
-
-We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. 
-
-To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. 
-
-Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder.  Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. 
-
-Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. 
-
-When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. 
-
-We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. 
-
-For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. 
-
-In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. 
-
-Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of aprogram that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. 
-
-The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from thelibrary, whereas the latter must be combined with the library in order to run. 
-
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 
-
-0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". 
-
-A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. 
-
-The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) 
-
-"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. 
-
-Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 
-
-1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. 
-
-You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 
-
-2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, andcopy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all ofthese conditions: 
-
-a) The modified work must itself be a software library. 
-b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. 
-c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. 
-d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. 
-
-(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) 
-
-These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose p [...]
-
-Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. 
-
-In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 
-
-3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these  [...]
-
-Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. 
-
-This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 
-
-4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. 
-
-If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 
-
-5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. 
-
-However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library(because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. 
-
-When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. 
-
-If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) 
-
-Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 
-
-6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. 
-
-You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: 
-
-a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It i [...]
-
-For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler,kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. 
-
-It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 
-
-7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: 
-
-a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 
-
-8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 
-
-9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works ba [...]
-
-10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a licensefrom the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 
-
-11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not dis [...]
-
-If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. 
-
-It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor [...]
-
-This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 
-
-12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographicaldistribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 
-
-13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. 
-
-Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 
-
-14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two  goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software g [...]
-
-NO WARRANTY 
-
-15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU.  [...]
-
-16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO  [...]
-
-END OF TERMS AND CONDITIONS
diff --git a/Doxyfile b/Doxyfile
deleted file mode 100644
index 2ce2856..0000000
--- a/Doxyfile
+++ /dev/null
@@ -1,1552 +0,0 @@
-# Doxyfile 1.7.1
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING      = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME           = "OSSIM - Open Source Software Image Map"
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER         = "Version 1.8.14"
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = doc
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS         = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE        = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF       =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH        =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH    =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF      = YES
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF           = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS           = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES  = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 4
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN   = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL   = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING      =
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT    = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT        = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT            = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen to replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT   = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING            = YES
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT   = NO
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penality.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will rougly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols
-
-SYMBOL_CACHE_SIZE      = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = YES
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC         = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespace are hidden.
-
-EXTRACT_ANON_NSPACES   = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS       = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS        = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES       = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS       =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = YES
-
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES       = NO
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES             = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page.
-# This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES        = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER    =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. The create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE            =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC       = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE           =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT                  = include \
-                         src \
-                         ../ossim_plugins
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING         = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
-
-FILE_PATTERNS          = *.cpp \
-                         *.h \
-                         *.cc \
-                         *.dox
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE              = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE                = CVS \
-                         .svn
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS       = *CVS*
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS        =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH           =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS       =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH             =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output.
-# If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER           =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis.
-# Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match.
-# The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
-
-FILTER_PATTERNS        =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER         = YES
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = YES
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = YES
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.
-# Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS              = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX    = 4
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          = ossim
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header.
-
-HTML_HEADER            =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER            =
-
-# If the HTML_TIMESTAMP tag is set to YES then the generated HTML
-# documentation will contain the timesstamp.
-
-HTML_TIMESTAMP         = NO
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET        =
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP         = YES
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS     = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS  = NO
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
-GENERATE_DOCSET        = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME        = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID       = org.doxygen.Project
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE               =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION           =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING     =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND             = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP           = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE               =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE          = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER     = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME   =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-# Qt Help Project / Custom Filters</a>.
-
-QHP_CUST_FILTER_ATTRS  =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-# Qt Help Project / Filter Attributes</a>.
-
-QHP_SECT_FILTER_ATTRS  =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION           =
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX          = NO
-
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW      = NO
-
-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list.
-
-USE_INLINE_TREES       = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE       = 10
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE           = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX         = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS         = NO
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX           = NO
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES     = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE      = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN           = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA             =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD                =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader.
-# This is useful
-# if you want to understand what is going on.
-# On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH           =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS  =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED             =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED      =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-#
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-#
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES               =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS        = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
-# powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH            =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = NO
-
-# By default doxygen will write a font called FreeSans.ttf to the output
-# directory and reference it in all dot files that doxygen generates. This
-# font does not include all possible unicode characters however, so when you need
-# these (or just want a differently looking font) you can specify the font name
-# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
-# which can be done by putting it in a standard location or by setting the
-# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
-# containing the font.
-
-DOT_FONTNAME           = FreeSans.ttf
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE           = 10
-
-# By default doxygen will tell dot to use the output directory to look for the
-# FreeSans.ttf font (which doxygen will put there itself). If you specify a
-# different font using DOT_FONTNAME you can set the path where dot
-# can find it using this tag.
-
-DOT_FONTPATH           =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS           = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK               = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH             = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH           = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH        = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT       = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH               =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS           =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES    = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH    = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT        = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS      = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP            = YES
diff --git a/Doxyfile.in b/Doxyfile.in
deleted file mode 100644
index 359e072..0000000
--- a/Doxyfile.in
+++ /dev/null
@@ -1,1120 +0,0 @@
-# Doxyfile 1.3.6
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
-# by quotes) that should identify the project.
-
-PROJECT_NAME           = "OSSIM - Open Source Image Map"
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
-# if some version control system is used.
-
-PROJECT_NUMBER         = "Version @OSSIM_VERSION@"
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = @DOXYGEN_OUTPUT_DIRECTORY@
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, 
-# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en 
-# (Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese, 
-# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
-
-OUTPUT_LANGUAGE        = English
-
-# This tag can be used to specify the encoding used in the generated output. 
-# The encoding is not always determined by the language that is chosen, 
-# but also whether or not the output is meant for Windows or non-Windows users. 
-# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES 
-# forces the Windows encoding (this is the default for the Windows binary), 
-# whereas setting the tag to NO uses a Unix-style encoding (the default for 
-# all platforms other than Windows).
-
-USE_WINDOWS_ENCODING   = NO
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator 
-# that is used to form the text in various listings. Each string 
-# in this list, if found as the leading text of the brief description, will be 
-# stripped from the text and the result after processing the whole list, is used 
-# as the annotated text. Otherwise, the brief description is used as-is. If left 
-# blank, the following values are used ("$name" is automatically replaced with the 
-# name of the entity): "The $name class" "The $name widget" "The $name file" 
-# "is" "provides" "specifies" "contains" "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF       = 
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited 
-# members of a class in the documentation of that class as if those members were 
-# ordinary class members. Constructors, destructors and assignment operators of 
-# the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user-defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. It is allowed to use relative paths in the argument list. 
-# If left blank the directory from which doxygen is run is used as the 
-# path to strip.
-
-STRIP_FROM_PATH        = 
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful is your file systems 
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments will behave just like the Qt-style comments (thus requiring an 
-# explicit @brief command for a brief description.
-
-JAVADOC_AUTOBRIEF      = YES
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member 
-# documentation.
-
-DETAILS_AT_TOP         = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
-# member inherits the documentation from any documented member that it 
-# re-implements.
-
-INHERIT_DOCS           = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 4
-
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user-defined paragraph with heading "Side Effects:". 
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                = 
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 
-# only. Doxygen will then generate output that is more tailored for C. 
-# For instance, some of the names that are used will be different. The list 
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources 
-# only. Doxygen will then generate output that is more tailored for Java. 
-# For instance, namespaces will be presented as packages, qualified scopes 
-# will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
-# the same type (for instance a group of public functions) to be put as a 
-# subgroup of that type (e.g. under the Public Functions section). Set it to 
-# NO to prevent subgrouping. Alternatively, this can be done per class using 
-# the \nosubgrouping command.
-
-SUBGROUPING            = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = YES
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
-# will be included in the documentation.
-
-EXTRACT_STATIC         = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = YES
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these classes will be included in the various 
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
-# documentation blocks found inside the body of a function. 
-# If set to NO (the default) these blocks will be appended to the 
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower-case letters. If set to YES upper-case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
-# users are advised to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put a list of the files that are included by a file in the documentation 
-# of that file.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
-# declaration order.
-
-SORT_MEMBER_DOCS       = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
-# brief documentation of file, namespace and class members alphabetically 
-# by member name. If set to NO (the default) the members will appear in 
-# declaration order.
-
-SORT_BRIEF_DOCS        = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
-# sorted by fully-qualified names, including namespaces. If set to 
-# NO (the default), the class list will be sorted only by class name, 
-# not including the namespace part. 
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the 
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting 
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional 
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS       = 
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or define consists of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and defines in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated 
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
-# potential errors in the documentation, such as not documenting some 
-# parameters in a documented function, or documenting parameters that 
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
-# warning originated and the warning text.
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
-# to stderr.
-
-WARN_LOGFILE           = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
-# with spaces.
-
-INPUT                  = include src
-
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp 
-# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc
-
-FILE_PATTERNS          = *.cpp \
-                         *.h \
-                         *.cc \
-                         *.dox
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
-# If left blank NO is used.
-
-RECURSIVE              = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should 
-# excluded from the INPUT source files. This way you can easily exclude a 
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE                = CVS .svn
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories 
-# that are symbolic links (a Unix filesystem feature) are excluded from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
-# certain files from those directories.
-
-EXCLUDE_PATTERNS       = *CVS*
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
-# the \include command).
-
-EXAMPLE_PATH           = 
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank all files are included.
-
-EXAMPLE_PATTERNS       = 
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
-# the \image command).
-
-IMAGE_PATH             = 
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
-# to standard output.
-
-INPUT_FILTER           = 
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
-# Note: To get rid of all source code in the generated output, make sure also 
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER         = YES
-
-# Setting the INLINE_SOURCES tag to YES will include the body 
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = YES
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
-# then for each documented function all documented 
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES (the default) 
-# then for each documented function all documented entities 
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = YES
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX    = 4
-
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          = @DOXYGEN_IGNORE_PREFIX@
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard header.
-
-HTML_HEADER            = 
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard footer.
-
-HTML_FOOTER            = 
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If the tag is left blank doxygen 
-# will generate a default style sheet. Note that doxygen will try to copy 
-# the style sheet file to the HTML output directory, so don't put your own 
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET        = 
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
-# files or namespaces will be aligned in HTML using tables. If set to 
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS     = YES
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
-# written to the html output directory.
-
-CHM_FILE               = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION           = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND             = NO
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
-# top of each HTML page. The value NO (the default) enables the index and 
-# the value YES disables it.
-
-DISABLE_INDEX          = NO
-
-# This tag can be used to set the number of enum values (range [1..20]) 
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
-# probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW      = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
-# generate Latex output.
-
-GENERATE_LATEX         = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         = 
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           = 
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS         = NO
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
-# higher quality PDF documentation.
-
-USE_PDFLATEX           = NO
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
-# in the output.
-
-LATEX_HIDE_INDICES     = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimized for Word 97 and may not look very pretty with 
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assignments. You only have to provide 
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    = 
-
-# Set optional variables used in the generation of an rtf document. 
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
-# generate man pages
-
-GENERATE_MAN           = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to 
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
-# the code including all documentation.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_SCHEMA             = 
-
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_DTD                = 
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
-# dump the program listings (including syntax highlighting 
-# and cross-referencing information) to the XML output. Note that 
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
-# generate a Perl module file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
-# moment.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
-# nicely formatted so it can be parsed by a human reader.  This is useful 
-# if you want to understand what is going on.  On the other hand, if this 
-# tag is set to NO the size of the Perl module output will be much smaller 
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file 
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
-# This is useful so different doxyrules.make files included by the same 
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX = 
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
-# files.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
-# PREDEFINED and EXPAND_AS_PREDEFINED tags.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
-# the preprocessor.
-
-INCLUDE_PATH           = 
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
-# be used.
-
-INCLUDE_FILE_PATTERNS  = 
-
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
-# omitted =1 is assumed.
-
-PREDEFINED             = 
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED      = 
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all function-like macros that are alone 
-# on a line, have an all uppercase name, and do not end with a semicolon. Such 
-# function macros are typically used for boiler-plate code, and will confuse the 
-# parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles. 
-# Optionally an initial location of the external documentation 
-# can be added for each tagfile. The format of a tag file without 
-# this location is as follows: 
-#   TAGFILES = file1 file2 ... 
-# Adding location for the tag files is done as follows: 
-#   TAGFILES = file1=loc1 "file2 = loc2" ... 
-# where "loc1" and "loc2" can be relative or absolute paths or 
-# URLs. If a location is present for each tag, the installdox tool 
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen 
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES               = 
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       = 
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
-# be listed.
-
-EXTERNAL_GROUPS        = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script 
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or 
-# super classes. Setting the tag to NO turns the diagrams off. Note that this 
-# option is superseded by the HAVE_DOT option below. This is only a fallback. It is 
-# recommended to install and use dot, since it yields more powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = NO
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
-# collaboration diagrams in a style similar to the OMG's Unified Modeling 
-# Language.
-
-UML_LOOK               = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the 
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = YES
-
-# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
-# generate a call dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable call graphs for selected 
-# functions only using the \callgraph command.
-
-CALL_GRAPH             = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT       = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
-# found. If left blank, it is assumed the dot tool can be found on the path.
-
-DOT_PATH               = 
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
-# \dotfile command).
-
-DOTFILE_DIRS           = 
-
-# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
-# this value, doxygen will try to truncate the graph, so that it fits within 
-# the specified constraint. Beware that most browsers cannot cope with very 
-# large images.
-
-MAX_DOT_GRAPH_WIDTH    = 1024
-
-# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
-# this value, doxygen will try to truncate the graph, so that it fits within 
-# the specified constraint. Beware that most browsers cannot cope with very 
-# large images.
-
-MAX_DOT_GRAPH_HEIGHT   = 1024
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
-# graphs generated by dot. A depth value of 3 means that only nodes reachable 
-# from the root by following a path via at most 3 edges will be shown. Nodes that 
-# lay further from the root node will be omitted. Note that setting this option to 
-# 1 or 2 may greatly reduce the computation time needed for large code bases. Also 
-# note that a graph may be further truncated if the graph's image dimensions are 
-# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). 
-# If 0 is used for the depth value (the default), the graph is not depth-constrained.
-
-MAX_DOT_GRAPH_DEPTH    = 0
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermediate dot files that are used to generate 
-# the various graphs.
-
-DOT_CLEANUP            = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be 
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE           = NO
diff --git a/LGPL.txt b/LGPL.txt
deleted file mode 100644
index 6e38660..0000000
--- a/LGPL.txt
+++ /dev/null
@@ -1,141 +0,0 @@
-GNU LESSER GENERAL PUBLIC LICENSE 
-
-Version 2.1, February 1999 
-
-(The master copy of this license lives on the GNU website.) 
-
-Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
-as the successor of the GNU Library Public License, version 2, hence
-the version number 2.1.]
-
-Preamble
-
-The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. 
-
-This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. 
-
-When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. 
-
-To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. 
-
-For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. 
-
-We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. 
-
-To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. 
-
-Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder.  Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. 
-
-Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. 
-
-When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. 
-
-We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. 
-
-For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. 
-
-In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. 
-
-Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of aprogram that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. 
-
-The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from thelibrary, whereas the latter must be combined with the library in order to run. 
-
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 
-
-0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". 
-
-A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. 
-
-The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) 
-
-"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. 
-
-Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 
-
-1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. 
-
-You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 
-
-2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, andcopy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all ofthese conditions: 
-
-a) The modified work must itself be a software library. 
-b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. 
-c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. 
-d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. 
-
-(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) 
-
-These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose p [...]
-
-Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. 
-
-In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 
-
-3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these  [...]
-
-Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. 
-
-This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 
-
-4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. 
-
-If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 
-
-5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. 
-
-However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library(because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. 
-
-When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. 
-
-If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) 
-
-Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 
-
-6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. 
-
-You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: 
-
-a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It i [...]
-
-For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler,kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. 
-
-It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 
-
-7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: 
-
-a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 
-
-8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 
-
-9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works ba [...]
-
-10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a licensefrom the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 
-
-11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not dis [...]
-
-If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. 
-
-It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor [...]
-
-This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 
-
-12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographicaldistribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 
-
-13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. 
-
-Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 
-
-14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two  goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software g [...]
-
-NO WARRANTY 
-
-15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU.  [...]
-
-16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO  [...]
-
-END OF TERMS AND CONDITIONS
diff --git a/LICENSE.txt b/LICENSE.txt
deleted file mode 100644
index 211725e..0000000
--- a/LICENSE.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-The OSSIM tree embeds some code from other libraries as well new code.  We will describe the license terms of the embedded modules as well as the license of the ossim core engine.  All code derived or embedded in the ossim core engine should not restrict the use of commercial purposes.
-
-1.  OSSIM engine abides by the LGPL license terms.  We grant you the use of the OSSIM core engine in commercial or non commercial use without royalty as long as the credits for the original authors stay within the source code.  See the top level LGPL.txt found found here along side the LICENSE.txt.
-
-2.  shapelib.  The shape library was written by Frank Warmerdam and has an MIT Style license these files include:
-       dbfopen.c shpopen.c shptree.c
-and are located in src/ossim/vec directory.  They have the following copyright 
-******************************************************************************
- * Copyright (c) 1999, Frank Warmerdam
- *
- * This software is available under the following "MIT Style" license,
- * or at the option of the licensee under the LGPL (see LICENSE.LGPL).  This
- * option is discussed in more detail in shapelib.html.
- *
- * --
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
-
-
-
-3. The matrix library was written by Robert Davies.  At the time of download the site was located at http://www.robertnz.net. He gives free use in commercial and non commercial as long as his code remains in tact and the credits for the author are known.
-
-4. The kbool library does polygon boolean operation and is used by the ossimPolyArea2d class.  The license terms are based on the wxwidgets licensing which gives free use in commercial and non-commercial libraries.  At the time of download the module used could be found at: http://boolean.klaasholwerda.nl/download/download.html
-
-5. Geotrans.  The geotrans library is a set of map projections that are certified and hosted by NGA.  They give free use in commercial and non commercial software packages and at the time of download the geotrans modules could be found at http://earth-info.nga.mil/GandG/geotrans/.  We have embedded the datum, ellipsoid, and map projections into the ossim baseline and wrapped in C++ classes so to remove the global variable access common in the raw getorans c library.
-
- 
\ No newline at end of file
diff --git a/Makefile.common.in b/Makefile.common.in
deleted file mode 100644
index 8e59d5a..0000000
--- a/Makefile.common.in
+++ /dev/null
@@ -1,218 +0,0 @@
-##
-# $Id: Makefile.common.in 12710 2008-04-18 13:40:12Z gpotts $
-###
-SHELL				= /bin/sh
-
-OSSIM_TOP			= @OSSIM_TOP@
-TOP				= @OSSIM_TOP@
-OSSIM_LIB_PATH			= @OSSIM_TOP@/lib
-OSSIM_MAJOR_VERSION_NUMBER	= @OSSIM_MAJOR_VERSION_NUMBER@
-OSSIM_MINOR_VERSION_NUMBER	= @OSSIM_MINOR_VERSION_NUMBER@
-OSSIM_RELEASE_NUMBER		= @OSSIM_RELEASE_NUMBER@
-OSSIM_VERSION			= @OSSIM_VERSION@
-OSSIM_ARCHIVE			= ossim-${OSSIM_VERSION}
-OSSIM_ARCHIVE_TGZ		= ${OSSIM_ARCHIVE}.tgz
-
-AR				= @AR@
-AR_FLAGS			= @AR_FLAGS@
-BASE_DEFINES  			= @BASE_DEFINES@
-BUILD_SHARED_OBJS		= @BUILD_SHARED_OBJS@
-BUILD_STATIC_OBJS		= @BUILD_STATIC_OBJS@
-BUILD_SHARED_LIBS		= @BUILD_SHARED_LIBS@
-BUILD_STATIC_LIBS		= @BUILD_STATIC_LIBS@
-BUILD_SINGLE_SHARED_LIBS	= @BUILD_SINGLE_SHARED_LIBS@
-BUILD_SINGLE_STATIC_LIBS	= @BUILD_SINGLE_STATIC_LIBS@
-BUILD_STATIC_APPS		= @BUILD_STATIC_APPS@
-CC		= @CC@
-CFLAGS		= @CFLAGS@
-CDEBUGFLAGS	= @CDEBUGFLAGS@
-CHMOD		= @CHMOD@
-CXX		= @CXX@
-CXXFLAGS	= @CXXFLAGS@
-DATA_DIR	= @datadir@
-DOC_DIR		= @datadir@/doc
-RANLIB		= @RANLIB@
-DESTDIR =
-DIRNAME		= @DIRNAME@
-ECHO		= @ECHO@
-EXEEXT		= @EXEEXT@
-exec_prefix	= @exec_prefix@
-HOST_RESULT	= @HOST_RESULT@
-INC_DIR		= @includedir@
-INST_LIB	= $(DESTDIR)@libdir@
-INST_BIN	= $(DESTDIR)@bindir@
-INST_PACKAGE_BIN= $(DESTDIR)@bindir@/ossim_packages
-INST_INC	= $(DESTDIR)@includedir@/ossim
-INST_SHARE	= $(DESTDIR)@datadir@/ossim
-INST_DATA	= $(DESTDIR)@datadir@/ossim
-INST_DOCS	= $(DESTDIR)@datadir@/ossim/doc/
-INST_TEMPLATES	= $(DESTDIR)@datadir@/ossim/templates
-INSTALL 	= @INSTALL@
-INSTALL_PROGRAM	= $(INSTALL) -m 755
-INSTALL_DATA	= $(INSTALL) -m 644
-INSTALL_INCLUDES= $(INSTALL) -m 444
-LDFLAGS		= @LDFLAGS@
-LDFLAGS_APP     = @LDFLAGS_APP@ 
-LDFLAGS_EXE	= @LDFLAGS_EXE@
-LD_SHARED	= @LD_SHARED@
-LIB_DIR		= @libdir@
-LIB_SRC		= $(OSSIM_TOP)/lib
-MAN_DIR		= @mandir@
-OBJEXT		= @OBJEXT@
-PIC_FLAG        = @PIC_FLAG@
-prefix		= @prefix@
-PROGRAM_PREFIX  = @PROGRAM_PREFIX@
-RANLIB		= @RANLIB@
-RESCOMP		= @RESCOMP@
-RESFLAGS	= @RESFLAGS@
-RM		= @RM@
-RM_NOPROMPT	= $(RM) -f
-RM_CMD		= $(RM) -f core core.* *.o *.d *.a *~ *.out *.exe *.lo
-RMDIR		= $(RM) -rf
-SED		= @SED@
-SHARED_LIB_FLAG = @SHARED_LIB_FLAG@
-SHARED_OBJ_DIR  = @SHARED_OBJ_DIR@
-
-SO_VERSIONLESS_EXT	= @SO_VERSIONLESS_EXT@
-SO_SONAME_EXT		= @SO_SONAME_EXT@
-SO_REALNAME_EXT		= @SO_REALNAME_EXT@
-
-SRC_DIR		= @srcdir@
-STATIC_OBJ_DIR  = @STATIC_OBJ_DIR@
-STRIP           = @STRIP@
-SYS_CONF_DIR	= @sysconfdir@
-VPATH		= @srcdir@
-
-# the datum factory file in base/factory
-# will hang if optimization is turned on
-# and so we will do a special compile for that 
-# file
-#
-NO_OPTIMIZATION_CFLAGS = ${filter-out -fast -O2 -Os -O3, ${CFLAGS} }
-NO_OPTIMIZATION_CXXFLAGS = ${filter-out -fast -O2 -Os -O3, ${CXXFLAGS} }
-
-GEOTIFF_INCLUDE_PATH = @GEOTIFF_INCLUDE_PATH@
-GEOTIFF_LIB_PATH     = @GEOTIFF_LIB_PATH@
-GEOTIFF_LIBS         = @GEOTIFF_LIBS@
-GEOTIFF_DEFINES      = @GEOTIFF_DEFINES@
-
-JPEG_INCLUDE_PATH    = @JPEG_INCLUDE_PATH@
-JPEG_LIB_PATH        = @JPEG_LIB_PATH@
-JPEG_LIBS            = @JPEG_LIBS@
-
-LIBTIFF_INCLUDE_PATH = @LIBTIFF_INCLUDE_PATH@
-LIBTIFF_LIB_PATH     = @LIBTIFF_LIB_PATH@
-LIBTIFF_LIBS         = @LIBTIFF_LIBS@
-
-MPI_DEFINES          = @MPI_DEFINES@
-MPI_INCLUDES         = @MPI_INCLUDES@
-MPI_LIBS             = @MPI_LIBS@
-MPI_LIB_PATH         = @MPI_LIB_PATH@
-
-###
-# OpenThreads support turned off for now until needed.
-OPEN_THREADS_INCLUDES = @OPEN_THREADS_INCLUDES@
-OPEN_THREADS_LIBS     = @OPEN_THREADS_LIBS@
-OPEN_THREADS_LIB_PATH = @OPEN_THREADS_LIB_PATH@
-OPEN_THREADS_DEFINES  = @OPEN_THREADS_DEFINES@
-###
-# OPEN_THREADS_INCLUDES=
-# OPEN_THREADS_LIBS=
-# OPEN_THREADS_LIB_PATH=
-# OPEN_THREADS_DEFINES=
-
-FREETYPE_DEFINES      = @FREETYPE_DEFINES@
-FREETYPE_INCLUDES     = @FREETYPE_INCLUDES@
-FREETYPE_LIBS         = @FREETYPE_LIBS@
-FREETYPE_LIB_PATH     = @FREETYPE_LIB_PATH@
-FREETYPE_SETTING      = @FREETYPE_SETTING@
-
-# Fourier library for image correlator
-# FFTW_DEFINES          = 
-# FFTW_INCLUDES         = 
-# FFTW_LIB_PATH         = 
-# FFTW_LIBS             = -lfftw3
-
-LIBS = @LIBS@
-
-BASE_INCLUDES = -I at OSSIM_TOP@/include $(OSSIM_HOST_INCLUDE) $(ADDITIONAL_INCLUDES) $(FREETYPE_INCLUDES) $(LIBTIFF_INCLUDE_PATH) $(MPI_INCLUDES)   $(OPEN_THREADS_INCLUDES) $(GEOTIFF_INCLUDE_PATH) $(LIBTIFF_INCLUDE_PATH) $(JPEG_INCLUDE_PATH) $(LIBGRASS_INCLUDE)
-
-ifeq ($(HOST_RESULT),darwin)
-   BASE_INCLUDES_INST = -I/Library/Frameworks/ossim.framework/Headers $(OSSIM_HOST_INCLUDE) $(ADDITIONAL_INCLUDES) $(FREETYPE_INCLUDES) $(LIBTIFF_INCLUDE_PATH) $(MPI_INCLUDES)   $(OPEN_THREADS_INCLUDES) $(GEOTIFF_INCLUDE_PATH) $(LIBTIFF_INCLUDE_PATH) $(LIBGRASS_INCLUDE)
-else
-   BASE_INCLUDES_INST = -I$(prefix)/include/ossim $(OSSIM_HOST_INCLUDE) $(ADDITIONAL_INCLUDES) $(FREETYPE_INCLUDES) $(LIBTIFF_INCLUDE_PATH) $(MPI_INCLUDES)   $(OPEN_THREADS_INCLUDES) $(GEOTIFF_INCLUDE_PATH) $(LIBTIFF_INCLUDE_PATH) $(LIBGRASS_INCLUDE)
-endif
-
-BASE_ROOT=@OSSIM_TOP@/src/ossim/base
-ELEVATION_ROOT=@OSSIM_TOP@/src/ossim/elevation
-FONT_ROOT=@OSSIM_TOP@/src/ossim/font
-IMAGING_ROOT=@OSSIM_TOP@/src/ossim/imaging
-KBOOL_ROOT=@OSSIM_TOP@/src/ossim/kbool
-MATRIX_ROOT=@OSSIM_TOP@/src/ossim/matrix
-PARALLEL_ROOT=@OSSIM_TOP@/src/ossim/parallel
-PROJECTION_ROOT=@OSSIM_TOP@/src/ossim/projection
-SUPPORT_DATA_ROOT=@OSSIM_TOP@/src/ossim/support_data
-VEC_ROOT=@OSSIM_TOP@/src/ossim/vec
-VPFUTIL_ROOT=@OSSIM_TOP@/src/ossim/vpfutil
-PLUGIN_ROOT=@OSSIM_TOP@/src/ossim/plugin
-INIT_ROOT=@OSSIM_TOP@/src/ossim/init
-KBOOL_ROOT=@OSSIM_TOP@/src/ossim/kbool
-
-LIB_BASE=libossim_base
-LIB_ELEVATION=libossim_elevation
-LIB_FONT=libossim_font
-LIB_IMAGING=libossim_imaging
-LIB_KBOOL=libossim_kbool
-LIB_MATRIX=libossim_matrix
-LIB_PARALLEL=libossim_parallel
-LIB_PROJECTION=libossim_projection
-LIB_SUPPORT_DATA=libossim_support_data
-LIB_VEC=libossim_vec
-LIB_VPFUTIL=libossim_vpfutil
-LIB_PLUGIN=libossim_plugin
-LIB_INIT=libossim_init
-LIB_KBOOL=libossim_kbool
-
-###
-# Convenience link lines in the correct link order for separate libraries.
-###
-LINK_KBOOL		= -lossim_kbool
-LINK_MATRIX 		= -lossim_matrix $LINK_KBOOL
-LINK_BASE 		= -lossim_base $LINK_MATRIX
-LINK_PLUGIN             = -lossim_plugin $LINK_BASE
-LINK_FONT 		= -lossim_font $LINK_PLUGIN
-LINK_VPF 		= -lossim_vpfutil $LINK_FONT
-LINK_VEC 		= -lossim_vec $LINK_VPF
-LINK_SUPPORT_DATA 	= -lossim_support_data $LINK_VEC
-LINK_ELEVATION 		= -lossim_elevation $LINK_SUPPORT_DATA
-LINK_PROJECTION	        = -lossim_projection $LINK_ELEVATION
-LINK_IMAGING 		= -lossim_imaging $LINK_PROJECTION
-LINK_PARALLEL 		= -lossim_parallel $LINK_IMAGING
-LINK_INIT		= -lossim_init $LINK_PARALLEL
-
-
-###
-# External stuff ossim links with.
-###
-LINK_EXTERNALS = $(ADDITIONAL_LIB_PATH) $(ADDITIONAL_LIBS_BEFORE)  $(OPEN_THREADS_LIB_PATH) $(FREETYPE_LIB_PATH) $(MPI_LIB_PATH) $(MPI_LIBS) $(FREETYPE_LIBS) $(ADDITIONAL_LIBS_AFTER) $(LIBGRASS_LIBS) $(GEOTIFF_LIB_PATH) $(LIBTIFF_LIB_PATH) $(GEOTIFF_LIBS) $(LIBTIFF_LIBS) $(OPEN_THREADS_LIBS) $(JPEG_LIB_PATH) $(JPEG_LIBS) $(LIBS)
-
-###
-# Link line for making single ossim library.
-###
-OSSIM_LIB_LINK = $(LINK_EXTERNALS)
-
-###
-# Link line for applications.
-###
-OSSIM_APP_LINK = -L$(OSSIM_LIB_PATH) -lossim $(LINK_EXTERNALS)
-OSSIM_CONFIG_APP_LINK_INST = -L$(prefix)/lib/ossim -lossim $(LINK_EXTERNALS)
-
-###
-# If single libossim link apps with just that.  Since the single ossim lib
-# linked with external libs we only need libossim at this point.
-###
-ifeq ($(BUILD_SINGLE_SHARED_LIBS),yes)
-  ifeq ($(HOST_RESULT),darwin)
-	OSSIM_CONFIG_APP_LINK_INST = -F/Library/Frameworks -framework ossim  $(MPI_LIB_PATH) $(MPI_LIBS)
-  endif 
-endif
diff --git a/aclocal.m4 b/aclocal.m4
deleted file mode 100644
index 6040b5f..0000000
--- a/aclocal.m4
+++ /dev/null
@@ -1,781 +0,0 @@
-dnl ---
-dnl $Id: aclocal.m4 16903 2010-03-22 20:13:11Z dburken $
-dnl
-dnl If you modify this code run "autoconf" in this same directory with no 
-dnl arguments to regenerate the configure script to pick up your changes 
-dnl in OSSIM.
-dnl 
-dnl ---
-
-
-dnl ---
-dnl User defined functions start here...
-dnl ---
-
-dnl ---
-dnl Function to set program prefix.  If set all applications (programs)
-dnl will be prefixed with the prefix picked up here.
-dnl Like: prefix=ossim_ 
-dnl The program igen will be named ossim_igen
-dnl ---
-AC_DEFUN([OSSIM_CHECK_PROGRAM_PREFIX],
-   [AC_ARG_WITH([program_prefix],
-      AS_HELP_STRING([--with-program_prefix=prefix],
-         [add prefix to applications (default is no prefix)]),
-      [app_prefix=$withval], [app_prefix=])
-
-   echo "Program prefix = $app_prefix"
-   AC_SUBST(PROGRAM_PREFIX, $app_prefix)
-])
-dnl End of program prefix function.
-
-
-dnl JPEG support
-AC_DEFUN(OSSIM_CHECK_JPEG,
-[
-  AC_ARG_WITH(jpeg,[  --with-jpeg[=ARG]         Include JPEG support (ARG=no or full_path_to_jpeg)],,)
-
-  JPEG_TOP=
-  JPEG_INCLUDE_PATH=
-  JPEG_LIB_PATH=
-  JPEG_LIBS=
-
-  if test "$with_jpeg" = "no" ; then
-    dnl Required support.
-    echo "ERROR: no is not an option as jpeg is required!"
-    AC_MSG_ERROR([jpeg support required!])
-  elif test "$with_jpeg" = "" ; then
-    dnl No args, look in standard intall locations as default.
-    if test -f "$OSSIM_TOP/../jpeg/jpeglib.h" ; then
-        JPEG_TOP="$OSSIM_TOP/../jpeg"
-    elif test -f "$OSSIM_TOP/../jpeg-8a/jpeglib.h" ; then
-      JPEG_TOP="$OSSIM_TOP/../jpeg-8a"
-    elif test -f "$OSSIM_TOP/../jpeg-6b/jpeglib.h" ; then
-      JPEG_TOP="$OSSIM_TOP/../jpeg-6b"
-    elif test -f "/usr/include/jpeglib.h" ; then
-      JPEG_TOP="/usr"
-    elif test -f "/usr/local/include/jpeglib.h" ; then
-      JPEG_TOP="/usr/local"
-    elif test -f "/opt/local/include/jpeglib.h" ; then
-      JPEG_TOP="/opt/local"
-    elif test -f "/sw/include/jpeglib.h" ; then
-      JPEG_TOP="/sw"
-    else
-      dnl Required support.
-      echo "ERROR: JPEG_TOP not found!"
-      AC_MSG_ERROR([jpeg support required!])
-    fi
-  else
-    dnl User passed in path to jpeg top.
-    JPEG_TOP=$with_jpeg
-  fi
-	
-  echo "JPEG_TOP:  $JPEG_TOP"
-
-  if test -d "$JPEG_TOP" ; then
-    dnl Set the include path.
-    if test -f "$JPEG_TOP/include/jpeglib.h" ; then
-      JPEG_INCLUDE_PATH="-I$JPEG_TOP/include"
-    elif test -f "$JPEG_TOP/jpeglib.h" ; then
-      JPEG_INCLUDE_PATH="-I$JPEG_TOP"
-    else
-      dnl Required support.
-      echo "ERROR: jpeglib.h not found!"
-      AC_MSG_ERROR([jpeg support required!])
-    fi
-
-    dnl Standard location.
-    if test "$JPEG_INCLUDE_PATH" = "-I/usr/include" ; then
-      JPEG_INCLUDE_PATH=""
-    fi
-
-    dnl Set the lib path
-    if test -f "$JPEG_TOP/lib/libjpeg.a" ; then
-	JPEG_LIB_PATH="-L$JPEG_TOP/lib"
-    elif test -f "$JPEG_TOP/lib/libjpeg.dll.a" ; then
-	JPEG_LIB_PATH="-L$JPEG_TOP/lib"
-    elif test -f "$JPEG_TOP/lib/libjpeg.lib" ; then
-	JPEG_LIB_PATH="-L$JPEG_TOP/lib"
-    elif test -f "$JPEG_TOP/lib64/libjpeg.a" ; then
-	JPEG_LIB_PATH="-L$JPEG_TOP/lib64" 
-    elif test -f "$JPEG_TOP/lib/libjpeg.so" ; then
-	JPEG_LIB_PATH="-L$JPEG_TOP/lib"
-    elif test -f "$JPEG_TOP/.libs/libjpeg.so" ; then
-	JPEG_LIB_PATH="-L$JPEG_TOP/lib"
-    elif test -f "$JPEG_TOP/libjpeg.a" ; then
-	JPEG_LIB_PATH="-L$JPEG_TOP"
-    elif test -f "$JPEG_TOP/libjpeg.lib" ; then
-	JPEG_LIB_PATH="-L$JPEG_TOP"
-    elif test -f "$JPEG_TOP/libjpeg.so" ; then
-	JPEG_LIB_PATH="-L$JPEG_TOP"
-    elif test -f "$JPEG_TOP/lib64/libjpeg.so" ; then
-	JPEG_LIB_PATH="-L$JPEG_TOP/lib64" 
-    else
-      dnl Required support.
-      echo "ERROR: libjpeg not found!"
-      AC_MSG_ERROR([jpeg support required!])
-    fi
-    JPEG_LIBS=-ljpeg
-
-    dnl ---
-    dnl Standard location. Do not add to link line in case someone has an
-    dnl LD_LIBRARY_PATH set to avoid picking up the wrong library at run
-    dnl time.
-    dnl ---
-    if test "$JPEG_LIB_PATH" = "-L/usr/lib" ; then
-      JPEG_LIB_PATH=""
-    elif test "$JPEG_LIB_PATH" = "-L/usr/lib64" ; then
-      JPEG_LIB_PATH=""
-    fi
-
-    echo "JPEG_INCLUDE_PATH	= $JPEG_INCLUDE_PATH"
-    echo "JPEG_LIB_PATH	        = $JPEG_LIB_PATH"
-    echo "JPEG_LIBS	        = $JPEG_LIBS"
-  else
-    echo "JPEG_TOP not determined!"
-    AC_MSG_ERROR([jpeg support required!])
-  fi
-
-  AC_SUBST(JPEG_INCLUDE_PATH, $JPEG_INCLUDE_PATH)
-  AC_SUBST(JPEG_LIB_PATH,     $JPEG_LIB_PATH)
-  AC_SUBST(JPEG_LIBS,         $JPEG_LIBS)
-])
-dnl End of JPEG support...
-
-###
-# Usage for AC_ARG_WITH:
-# AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
-###
-
-dnl Check for mpi package.
-AC_DEFUN(OSSIM_CHECK_MPI,
-[
-  AC_ARG_WITH(mpi,[  --with-mpi=[ARG]          Include mpi support (ARG=yes or no or directory to install location)],,)
-
-  AC_ARG_WITH(mpi-inc,[--with-mpi-inc=[DIR]  MPI include path (ARG=/path/to/mpi/includes in non standard location)],[mpi_include_path="$withval"],[mpi_include_path=""])
-
-
-  AC_ARG_WITH(mpi-lib,[--with-mpi-lib[=DIR] MPI lib path (ARG=/path/to/mpi/libs in none standard location)],[mpi_lib_path="$withval"],[mpi_lib_path=""])
-
-  AC_ARG_WITH(openmpi-flag,[--with-openmpi-flag[=ARG] OpenMPi flag(ARG=1 if openmpi, 0 if not)],[openmpi_flag="$withval"],[openmpi_flag=""])
-
-  MPI_TOP= 
-  MPI_INCLUDE_PATH=
-  MPI_INCLUDES= 
-  MPI_LIBS= 
-  MPI_LIB_PATH=
-  MPI_ENABLED="0"
-  OPENMPI_FOUND="0"
-
-  # Check for include path.
-  if test -n "$mpi_include_path" ; then
-    MPI_INCLUDE_PATH="$mpi_include_path"
-  fi
-
-  # Check for lib path.
-  if test -n "$mpi_lib_path" ; then
-    MPI_LIB_PATH="-L$mpi_lib_path"
-  fi
-
-  # Check for openmpi flag
-  if test -n "$openmpi_flag" ; then
-    OPENMPI_FOUND="$openmpi_flag"
-  fi
-
-  # New section for include and path in non standard place.
-  if test -n "$MPI_INCLUDE_PATH" && test -n "$MPI_LIB_PATH" ; then
-    MPI_ENABLED="1"
-    if test "$OPENMPI_FOUND" = "1" ; then
-      MPI_INCLUDES="-I$MPI_INCLUDE_PATH"
-      MPI_LIBS="-lmpi_cxx -lmpi"
-    else
-      MPI_INCLUDES="-I$MPI_INCLUDE_PATH"
-      MPI_LIBS=-llammpi++ -lmpi -llam -llammpio
-    fi
-  else
-    if test "$with_mpi" = "yes" -o "$with_mpi" = ""; then
-      if test -f "/usr/bin/lamboot" ; then
-	MPI_TOP=/usr
-      elif test -f "/usr/local/bin/lamboot" ; then
-        MPI_TOP=/usr/local
-      elif test -f "/usr/local/ossim/bin/lamboot" ; then
-        MPI_TOP=/usr/local/ossim
-      elif test -f "/opt/local/bin/lamboot" ; then
-        MPI_TOP=/opt/local
-      elif test -f "/sw/local/bin/lamboot" ; then
-        MPI_TOP=/sw/local
-      elif test -f "/usr/local/bin/mpirun" ; then
-        MPI_TOP=/usr/local
-        OPENMPI_FOUND="1"
-    fi
-    elif test "$with_mpi" != "no" ; then
-      if test -f "$with_mpi/bin/lamboot" ; then
-        MPI_TOP="$with_mpi"
-      fi
-    fi
-
-    if test "$OPENMPI_FOUND" = "1" ; then
-      MPI_LIBS="-lmpi_cxx -lmpi"
-      MPI_ENABLED="1"
-    elif test "$MPI_TOP" = "/usr" ; then
-      MPI_INCLUDES=
-      MPI_LIB_PATH=
-      if test -f "/usr/include/lam/mpi.h" ; then
-        if test -f "/usr/include/lam/32/lam_config.h" ; then
-          MPI_INCLUDES="-I/usr/include/lam -I/usr/include/lam/32"
-        else
-          MPI_INCLUDES="-I/usr/include/lam"
-        fi
-      fi
-      if test -e "/usr/lib/lam/libmpi.so" ; then
-        MPI_LIB_PATH="-L/usr/lib/lam"
-      fi
-      MPI_LIBS="-llammpi++ -lmpi -llam -llammpio"
-      MPI_ENABLED="1"
-    elif test "$MPI_TOP" != "" ; then
-      dnl library path for linking
-      MPI_LIB_PATH="-L$MPI_TOP/lib"
-      dnl libraries to link with
-      MPI_LIBS="-llammpi++ -lmpi -llam -llammpio"
-      dnl enable for starters.
-      MPI_ENABLED="1"
-      dnl Find includes.  These seem to vary by different packagers.
-      if test -f "$MPI_TOP/include/mpi.h" ; then
-	MPI_INCLUDES="-I$MPI_TOP/include"
-      elif test -f "$MPI_TOP/include/lammpi/mpi.h" ; then
-	MPI_INCLUDES="-I$MPI_TOP/include/lammpi"
-      else
-        dnl No mpi.h found
-        echo "MPI include mpi.h not found, disabled..."
-        MPI_ENABLED="0"
-      fi
-    fi
-  fi
-
-  if test "$MPI_ENABLED" = "1" ; then
-    dnl ---
-    dnl Standard location. Do not add to link line in case someone has an
-    dnl LD_LIBRARY_PATH set to avoid picking up the wrong library at run
-    dnl time.
-    dnl ---
-    if test "$MPI_LIB_PATH" = "-L/usr/lib" ; then
-      MPI_LIB_PATH=""
-    elif test "$MPI_LIB_PATH" = "-L/usr/lib64" ; then
-      MPI_LIB_PATH=""
-    fi
-  fi
-
-dnl If an mpi directory was not specified try looking parallel to 
-dnl the ossim (this) package.
-  echo "OPENMPI_FOUND           = $OPENMPI_FOUND"
-  echo "MPI_INCLUDE_PATH        = $MPI_INCLUDE_PATH"
-  echo "MPI_INCLUDES		= $MPI_INCLUDES"
-  echo "MPI_LIB_PATH		= $MPI_LIB_PATH"
-  echo "MPI_LIBS		= $MPI_LIBS"
-  echo "MPI_ENABLED		= $MPI_ENABLED"
-
-  AC_SUBST(MPI_INCLUDES,   $MPI_INCLUDES)
-  AC_SUBST(MPI_LIB_PATH,   $MPI_LIB_PATH)
-  AC_SUBST(MPI_LIBS,       $MPI_LIBS)
-  
-  if test "$MPI_ENABLED" = "1" ; then
-    AC_DEFINE(OSSIM_HAS_MPI, 1)
-  fi
-
-])
-dnl End of MPI package...
-
-dnl Check for OpenThreads package.
-AC_DEFUN(OSSIM_CHECK_OPEN_THREADS,
-[
-  AC_ARG_WITH(openthreads,       [  --with-openthreads[=ARG]  Open threads support , ARG=yes or no or directory to install location],,)
-
-  OPEN_THREADS_TOP=
-  OPEN_THREADS_INCLUDES=
-  OPEN_THREADS_LIBS= 
-  OPEN_THREADS_LIB_PATH=
-  OPEN_THREADS_ENABLED="0"
-  OPEN_THREADS_FRAMEWORK="no"
-  if test "$with_openthreads" = "no" ; then
-    dnl Required support.
-    echo "ERROR: no is not an option as openthreads is required!"
-    AC_MSG_ERROR([openthreads support required!])
-  elif test "$with_openthreads" = "" ; then
-    dnl Look in all the standard places.
-    if test -d "/Library/Frameworks/OpenThreads.framework" ; then
-	OPEN_THREADS_TOP="/Library/Frameworks/"
-	OPEN_THREADS_FRAMEWORK="yes"
-    elif test -d "$HOME/Library/Frameworks/OpenThreads.framework" ; then
-	OPEN_THREADS_TOP="$HOME/Library/Frameworks/"
-	OPEN_THREADS_FRAMEWORK="yes"
-    elif test -f "/usr/local/include/OpenThreads/Mutex" ; then
-	OPEN_THREADS_TOP="/usr/local"
-    elif test -f "/opt/local/include/OpenThreads/Mutex" ; then
-	OPEN_THREADS_TOP="/opt/local"
-    elif test -f "/sw/local/include/OpenThreads/Mutex" ; then
-	OPEN_THREADS_TOP="/sw/local"
-    elif test -f "/usr/include/OpenThreads/Mutex" ; then
-	OPEN_THREADS_TOP="/usr"
-    elif test -f "$OSSIM_TOP/../OpenThreads/include/OpenThreads/Mutex" ; then
-        OPEN_THREADS_TOP="$OSSIM_TOP/../OpenThreads"
-    fi
-  else
-    dnl User passed in OpenThreads top.
-    if test -d "$with_openthreads/OpenThreads.framework" ; then
-	OPEN_THREADS_TOP="$with_openthreads"
-	OPEN_THREADS_FRAMEWORK="yes"
-    else
-    	OPEN_THREADS_TOP=$with_openthreads
-	OPEN_THREADS_INCLUDES=-I$with_openthreads    
-    fi	
-  fi
-   
-  if test "$OPEN_THREADS_FRAMEWORK" = "yes" ; then
-	OPEN_THREADS_INCLUDES="-F$OPEN_THREADS_TOP"
-	OPEN_THREADS_ENABLED="1"
-	OPEN_THREADS_LIBS="-F$OPEN_THREADS_TOP -framework OpenThreads"
-  elif test -d "$OPEN_THREADS_TOP" ; then
-    OPEN_THREADS_INCLUDES="-I$OPEN_THREADS_TOP/include"
-    OPEN_THREADS_LIBS="-lOpenThreads"
-
-    dnl Set the lib path.
-    if test -f "$OPEN_THREADS_TOP/lib/Linux32/libOpenThreads.so" ; then
-      OPEN_THREADS_LIB_PATH="-L$OPEN_THREADS_TOP/lib/Linux32"
-    elif test -f "$OPEN_THREADS_TOP/lib64/libOpenThreads.so" ; then
-      OPEN_THREADS_LIB_PATH="-L$OPEN_THREADS_TOP/lib64"
-    elif test -f "$OPEN_THREADS_TOP/lib/libOpenThreads.so" ; then
-      OPEN_THREADS_LIB_PATH="-L$OPEN_THREADS_TOP/lib"
-    elif test -f "$OPEN_THREADS_TOP/lib/libOpenThreads.a" ; then
-      OPEN_THREADS_LIB_PATH="-L$OPEN_THREADS_TOP/lib"
-    elif test -f "$OPEN_THREADS_TOP/lib/OpenThreads.lib" ; then
-      OPEN_THREADS_LIB_PATH="-L$OPEN_THREADS_TOP/lib"
-    elif test -f "$OPEN_THREADS_TOP/lib/libOpenThreads.dll.a" ; then
-      OPEN_THREADS_LIB_PATH="-L$OPEN_THREADS_TOP/lib"
-    else
-      dnl Required support.
-      echo "ERROR: libOpenThreads not found!"
-      AC_MSG_ERROR([OpenThreads support required!])
-    fi
-
-    dnl ---
-    dnl Standard location. Do not add to link line in case someone has an
-    dnl LD_LIBRARY_PATH set to avoid picking up the wrong library at run
-    dnl time.
-    dnl ---
-    if test "$OPEN_THREADS_LIB_PATH" = "-L/usr/lib" ; then
-      OPEN_THREADS_LIB_PATH=""
-    elif test "$OPEN_THREADS_LIB_PATH" = "-L/usr/lib64" ; then
-      OPEN_THREADS_LIB_PATH=""
-    fi
-
-    OPEN_THREADS_ENABLED="1"
-  else
-    echo "OPEN_THREADS_TOP not determined!"
-    AC_MSG_ERROR([OpenThreads support required!])
-  fi
-
-  echo "OPEN_THREADS_INCLUDES   = $OPEN_THREADS_INCLUDES"
-  echo "OPEN_THREADS_LIBS       = $OPEN_THREADS_LIBS"
-  echo "OPEN_THREADS_LIB_PATH   = $OPEN_THREADS_LIB_PATH"
-  echo "OPEN_THREADS_ENABLED    = $OPEN_THREADS_ENABLED"
-
-  AC_SUBST(OPEN_THREADS_INCLUDES,   $OPEN_THREADS_INCLUDES)
-  AC_SUBST(OPEN_THREADS_LIBS,       $OPEN_THREADS_LIBS)
-  AC_SUBST(OPEN_THREADS_LIB_PATH,   $OPEN_THREADS_LIB_PATH)
-
-  if test "$OPEN_THREADS_ENABLED" = "1" ; then
-    AC_DEFINE(OSSIM_HAS_OPEN_THREADS, 1)
-  fi
-
-])
-dnl End of OpenThread package...
-
-
-dnl Check for freetype package.
-AC_DEFUN(OSSIM_CHECK_FREETYPE,
-[
-  AC_ARG_WITH(freetype,[  --with-freetype[=ARG]     Include freetype support (ARG=no or full_path_to_free)],,)
-
-  FREETYPE_TOP=""
-  FREETYPE_INCLUDES= 
-  FREETYPE_LIBS= 
-  FREETYPE_LIB_PATH=
-  FREETYPE_ENABLED="0"
-
-  if test "$with_freetype" = "" ; then
-    if test -f "/usr/bin/freetype-config" ; then
-	FREETYPE_CONFIG_FOUND=1
-	FREETYPE_INCLUDES=`freetype-config --cflags`
-	FREETYPE_LIBS=`freetype-config --libs`
-	FREETYPE_LIB_PATH=-L`freetype-config --prefix`/lib
-        FREETYPE_ENABLED="1"
-    elif test -d "/usr/include/freetype2" ; then
-        FREETYPE_TOP="/usr"
-    elif test -d "/usr/local/include/freetype2" ; then
-        FREETYPE_TOP="/usr/local"
-    elif test -d "/usr/X11R6/include/freetype2" ; then
-        FREETYPE_TOP="/usr/X11R6"
-    fi
-  else 
-    FREETYPE_TOP=$with_freetype
-  fi
-
-  if test "$FREETYPE_TOP" != "" ; then
-    if test -d "$FREETYPE_TOP/include/freetype2" ; then
-      FREETYPE_INCLUDES="-I$FREETYPE_TOP/include -I$FREETYPE_TOP/include/freetype2 -I$FREETYPE_TOP/include/freetype2/freetype"
-      FREETYPE_LIB_PATH="-L$FREETYPE_TOP/lib"
-      FREETYPE_LIBS="-lfreetype"
-      FREETYPE_ENABLED="1"
-    fi
-  fi
-
-  dnl ---
-  dnl Standard location. Do not add to link line in case someone has an
-  dnl LD_LIBRARY_PATH set to avoid picking up the wrong library at run
-  dnl time.
-  dnl ---
-  if test "$FREETYPE_LIB_PATH" = "-L/usr/lib" ; then
-    FREETYPE_LIB_PATH=""
-  elif test "$FREETYPE_LIB_PATH" = "-L/usr/lib64" ; then
-    FREETYPE_LIB_PATH=""
-  fi
-
-  echo "FREETYPE_INCLUDES	= $FREETYPE_INCLUDES"
-  echo "FREETYPE_LIB_PATH	= $FREETYPE_LIB_PATH"
-  echo "FREETYPE_LIBS		= $FREETYPE_LIBS"
-  echo "FREETYPE_ENABLED 	= $FREETYPE_ENABLED"
-
-  AC_SUBST(FREETYPE_INCLUDES,   $FREETYPE_INCLUDES)
-  AC_SUBST(FREETYPE_LIB_PATH,   $FREETYPE_LIB_PATH)
-  AC_SUBST(FREETYPE_LIBS,       $FREETYPE_LIBS)
-
-  if test "$FREETYPE_ENABLED" = "1" ; then
-    AC_DEFINE(OSSIM_HAS_FREETYPE, 1)
-  fi
-
-])
-
-dnl Check for geotif package.
-AC_DEFUN(OSSIM_CHECK_GEOTIFF,
-[
-  AC_ARG_WITH(geotiff,[  --with-geotiff[=ARG]      Include geotiff support (ARG=no or full_path_to_geotiff)],,)
-
-  GEOTIFF_TOP=
-  GEOTIFF_INCLUDE_PATH=
-  GEOTIFF_LIB_PATH=
-  GEOTIFF_LIBS=
-  GEOTIFF_ENABLED="0"
-
-  if test "$with_geotiff" = "no" ; then
-    dnl User does not want to use geotiff so do nothing...
-    echo "Geotiff support option = no"
-  elif test "$with_geotiff" = "" ; then
-    dnl No args, look in standard intall location as default.
-    dnl Look in parallel directory.
-    if test -d "$OSSIM_TOP/../geotiff" ; then
-      if test -f "$OSSIM_TOP/../geotiff/include/geotiff.h" ; then
-        dnl User did a make install to top.
-        GEOTIFF_TOP="$OSSIM_TOP/../geotiff"
-      else
-        GEOTIFF_TOP="$OSSIM_TOP/../geotiff/libgeotiff"
-      fi
-    elif test -f "/usr/local/include/geotiff.h" ; then
-	GEOTIFF_TOP="/usr/local"
-    elif test -f "/usr/include/geotiff.h" ; then
-	GEOTIFF_TOP="/usr"
-    elif test -f "/usr/include/libgeotiff/geotiff.h" ; then
-	GEOTIFF_TOP="/usr"
-    elif test -f "/usr/include/geotiff/geotiff.h" ; then
-	GEOTIFF_TOP="/usr"
-    elif test -f "/opt/local/include/geotiff.h" ; then
-	GEOTIFF_TOP="/opt/local"
-    fi
-  else
-    dnl User passed in geotiff top.
-    GEOTIFF_TOP=$with_geotiff
-  fi
-  
-  if test -d $GEOTIFF_TOP && test "$GEOTIFF_TOP" != ""; then
-    dnl Set the include path.
-    if test -f "$GEOTIFF_TOP/include/geotiff.h" ; then
-      GEOTIFF_INCLUDE_PATH="-I$GEOTIFF_TOP/include"
-    elif test -f "$GEOTIFF_TOP/include/libgeotiff/geotiff.h" ; then
-      GEOTIFF_INCLUDE_PATH="-I$GEOTIFF_TOP/include/libgeotiff"
-    elif test -f "$GEOTIFF_TOP/include/geotiff/geotiff.h" ; then
-      GEOTIFF_INCLUDE_PATH="-I$GEOTIFF_TOP/include/geotiff"
-    else
-      GEOTIFF_INCLUDE_PATH="-I$GEOTIFF_TOP"
-    fi
-    dnl Set the lib path.
-    if test -d "$GEOTIFF_TOP/lib" ; then
-      GEOTIFF_LIB_PATH="-L$GEOTIFF_TOP/lib"
-    elif test -d "$GEOTIFF_TOP/lib64" ; then
-	GEOTIFF_LIB_PATH="-L$GEOTIFF_TOP/lib64"
-    else
-      GEOTIFF_LIB_PATH="-L$GEOTIFF_TOP"
-    fi
-
-    dnl ---
-    dnl Standard location. Do not add to link line in case someone has an
-    dnl LD_LIBRARY_PATH set to avoid picking up the wrong library at run
-    dnl time.
-    dnl ---
-    if test "$GEOTIFF_LIB_PATH" = "-L/usr/lib" ; then
-      GEOTIFF_LIB_PATH=""
-    elif test "$GEOTIFF_LIB_PATH" = "-L/usr/lib64" ; then
-      GEOTIFF_LIB_PATH=""
-    fi
-
-    GEOTIFF_LIBS=-lgeotiff
-    GEOTIFF_ENABLED="1"
-  else
-    dnl Required support.
-    echo "ERROR: GEOTIFF_TOP not found!"
-    AC_MSG_ERROR([geotiff support required!])
-  fi
-
-  echo "GEOTIFF_INCLUDE_PATH	= $GEOTIFF_INCLUDE_PATH"
-  echo "GEOTIFF_LIB_PATH	= $GEOTIFF_LIB_PATH"
-  echo "GEOTIFF_LIBS	        = $GEOTIFF_LIBS"
-  echo "GEOTIFF_ENABLED         = $GEOTIFF_ENABLED"
-
-  AC_SUBST(GEOTIFF_INCLUDE_PATH, $GEOTIFF_INCLUDE_PATH)
-  AC_SUBST(GEOTIFF_LIB_PATH,     $GEOTIFF_LIB_PATH)
-  AC_SUBST(GEOTIFF_LIBS,         $GEOTIFF_LIBS)
-
-  if test "$GEOTIFF_ENABLED" = "1" ; then
-    AC_DEFINE(OSSIM_HAS_GEOTIFF, 1)
-  fi
-
-])
-dnl End of Geotiff package...
-
-
-dnl Check for libtiff package.
-AC_DEFUN(OSSIM_CHECK_LIBTIFF,
-[
-  AC_ARG_WITH(libtiff,[  --with-libtiff[=ARG]      Include libtiff support (ARG=no or full_path_to_libtiff)],,)
-
-  LIBTIFF_TOP=
-  LIBTIFF_INCLUDE_PATH=
-  LIBTIFF_LIB_PATH=
-  LIBTIFF_LIBS=
-
-  if test "$with_libtiff" = "no" ; then
-    dnl User does not want to use libtiff so do nothing...
-    AC_MSG_ERROR([libtiff support required!])
-  elif test "$with_libtiff" = "" ; then
-    dnl No args, look in standard intall location as default.
-    if test -d "$OSSIM_TOP/../libtiff" ; then
-        LIBTIFF_TOP="$OSSIM_TOP/../libtiff"
-    elif test -f "/usr/local/include/tiff.h" ; then
-	LIBTIFF_TOP="/usr/local"
-    elif test -f "/usr/include/tiff.h" ; then
-	LIBTIFF_TOP="/usr"
-    elif test -f "/opt/local/include/tiff.h" ; then
-	LIBTIFF_TOP="/opt/local"
-    else
-      echo "Libtiff support disabled."
-    fi
-  else
-    dnl User passed in libtiff top.
-    LIBTIFF_TOP=$with_libtiff
-  fi
-  
-  if test -d "$LIBTIFF_TOP" ; then
-    dnl Set the include path.
-    if test -f "$LIBTIFF_TOP/include/tiff.h" ; then
-	LIBTIFF_INCLUDE_PATH="-I$LIBTIFF_TOP/include"
-    elif test -f "$LIBTIFF_TOP/libtiff/tiff.h" ; then
-	LIBTIFF_INCLUDE_PATH="-I$LIBTIFF_TOP/libtiff"
-    else
-	LIBTIFF_INCLUDE_PATH="-I$LIBTIFF_TOP"
-    fi
-    dnl Set the lib path
-    if test -f "$LIBTIFF_TOP/lib/libtiff.a" ; then
-	LIBTIFF_LIB_PATH="-L$LIBTIFF_TOP/lib"
-    elif test -f "$LIBTIFF_TOP/lib/libtiff.so" ; then
-	LIBTIFF_LIB_PATH="-L$LIBTIFF_TOP/lib"
-    elif test -f "$LIBTIFF_TOP/lib64/libtiff.a" ; then
-	LIBTIFF_LIB_PATH="-L$LIBTIFF_TOP/lib64"
-    elif test -f "$LIBTIFF_TOP/lib64/libtiff.so" ; then
-	LIBTIFF_LIB_PATH="-L$LIBTIFF_TOP/lib64"
-    elif test -f "$LIBTIFF_TOP/libtiff/libtiff.a" ; then
-	LIBTIFF_LIB_PATH="-L$LIBTIFF_TOP/libtiff"
-    elif test -f "$LIBTIFF_TOP/libtiff/libtiff.so" ; then
-	LIBTIFF_LIB_PATH="-L$LIBTIFF_TOP/libtiff"
-    elif test -f "$LIBTIFF_TOP/libtiff/.libs/libtiff.a" ; then
-	LIBTIFF_LIB_PATH="-L$LIBTIFF_TOP/libtiff/.libs"
-    elif test -f "$LIBTIFF_TOP/libtiff/.libs/libtiff.so" ; then
-	LIBTIFF_LIB_PATH="-L$LIBTIFF_TOP/libtiff/.libs"
-    elif test -f "$LIBTIFF_TOP/.libs/libtiff.a" ; then
-	LIBTIFF_LIB_PATH="-L$LIBTIFF_TOP/.libs"
-    elif test -f "$LIBTIFF_TOP/.libs/libtiff.so" ; then
-	LIBTIFF_LIB_PATH="-L$LIBTIFF_TOP/.libs"
-    else
-	LIBTIFF_LIB_PATH=-L$LIBTIFF_TOP
-    fi
-
-    dnl ---
-    dnl Standard location. Do not add to link line in case someone has an
-    dnl LD_LIBRARY_PATH set to avoid picking up the wrong library at run
-    dnl time.
-    dnl ---
-    if test "$LIBTIFF_LIB_PATH" = "-L/usr/lib" ; then
-      LIBTIFF_LIB_PATH=""
-    elif test "$LIBTIFF_LIB_PATH" = "-L/usr/lib64" ; then
-      LIBTIFF_LIB_PATH=""
-    fi
-
-    LIBTIFF_LIBS=-ltiff
-    echo "LIBTIFF_INCLUDE_PATH	= $LIBTIFF_INCLUDE_PATH"
-    echo "LIBTIFF_LIB_PATH	= $LIBTIFF_LIB_PATH"
-    echo "LIBTIFF_LIBS	        = $LIBTIFF_LIBS"
-  else
-    AC_MSG_ERROR([libtiff support required!])
-  fi
-
-  AC_SUBST(LIBTIFF_INCLUDE_PATH, $LIBTIFF_INCLUDE_PATH)
-  AC_SUBST(LIBTIFF_LIB_PATH,     $LIBTIFF_LIB_PATH)
-  AC_SUBST(LIBTIFF_LIBS,         $LIBTIFF_LIBS)
-
-])
-dnl End of Libtiff package...
-
-
-
-dnl this macro checks for a command line argument and caches the result
-dnl usage: OSSIM_ARG_WITH(option, helpmessage, variable-name)
-AC_DEFUN([OSSIM_ARG_WITH],
-        [
-          AC_MSG_CHECKING([for --with-$1])
-          no_cache=0
-          AC_ARG_WITH($1, [$2],
-                      [
-                        if test "$withval" = yes; then
-                          ac_cv_use_$1='$3=yes'
-                        elif test "$withval" = "" ; then
-                          ac_cv_use_$1='$3=no'
-			else
-                          ac_cv_use_$1='$3=$withval'
-                        fi
-                      ],
-                      [
-				ac_cv_use_$1='$3=no'
-dnl                        LINE=`grep "$3" ${wx_arg_cache_file}`
-dnl                        if test "x$LINE" != x ; then
-dnl                          eval "DEFAULT_$LINE"
-dnl                        else
-dnl                          no_cache=1
-dnl                        fi
-
-dnl                        ac_cv_use_$1='$3='$DEFAULT_$3
-                      ])
-
-          eval "$ac_cv_use_$1"
-dnl          if test "$no_cache" != 1; then
-dnl            echo $ac_cv_use_$1 >> ${wx_arg_cache_file}.tmp
-dnl          fi
-
-          if test "$$3" = yes; then
-            AC_MSG_RESULT(yes)
-          else
-            AC_MSG_RESULT(no)
-          fi
-        ]
-)
-
-dnl like OSSIM_ARG_WITH but uses AC_ARG_ENABLE instead of AC_ARG_WITH
-dnl usage: OSSIM_ARG_ENABLE(option, helpmessage, variable-name, enablestring)
-dnl
-dnl enablestring is a hack and allows to show "checking for --disable-foo"
-dnl message when running configure instead of the default "checking for
-dnl --enable-foo" one whih is useful for the options enabled by default
-AC_DEFUN([OSSIM_ARG_ENABLE],   
-         [
-   	  enablestring=$4
-          AC_MSG_CHECKING([for --${enablestring:-enable}-$1])
-          no_cache=0
-          AC_ARG_ENABLE($1, [$2],
-                        [
-                          if test "$enableval" = yes; then
-                            ac_cv_use_$1='$3=yes'
-                           else
-                            ac_cv_use_$1='$3=no'
-                          fi
-                        ],
-                        [
-                          ac_cv_use_$1='$3=$$3'
-dnl                          LINE=`grep "$3" ${wx_arg_cache_file}`
-dnl                          if test "x$LINE" != x ; then
-dnl                            eval "DEFAULT_$LINE"
-dnl                          else
-dnl                            no_cache=1
-dnl                          fi
-
-dnl                          ac_cv_use_$1='$3='$DEFAULT_$3
-                        ])
-
-          eval "$ac_cv_use_$1"
-dnl          if test "$no_cache" != 1; then
-dnl          echo $ac_cv_use_$1 >> ${wx_arg_cache_file}.tmp
-dnl      fi
-
-          if test "$$3" = yes; then
-            AC_MSG_RESULT(yes)
-          else
-            AC_MSG_RESULT(no)
-          fi
-        ]
-)
-
-define(OSSIM_SYS_LARGEFILE_TEST,
-[typedef struct {
-    unsigned int field: sizeof(off_t) == 8;
-} wxlf;
-])
-
-OSSIM_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, CACHE-VAR)
-define(OSSIM_SYS_LARGEFILE_MACRO_VALUE,
-[
-    AC_CACHE_CHECK([for $1 value needed for large files], [$3],
-        [
-          AC_TRY_COMPILE([#define $1 $2
-                          #include <sys/types.h>],
-                         OSSIM_SYS_LARGEFILE_TEST,
-                         [$3=$2],
-                         [$3=no])
-        ]
-    )
-
-    if test "$$3" != no; then
-        ossim_largefile=yes
-        AC_DEFINE_UNQUOTED([$1], [$$3])
-    fi
-])
-
-dnl AC_SYS_LARGEFILE
-dnl ----------------
-dnl By default, many hosts won't let programs access large files;
-dnl one must use special compiler options to get large-file access to work.
-dnl For more details about this brain damage please see:
-dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
-AC_DEFUN([AC_SYS_LARGEFILE],
-[AC_ARG_ENABLE(largefile,
-               [  --disable-largefile     omit support for large files])
-if test "$enable_largefile" != no; then
-    dnl _FILE_OFFSET_BITS==64 is needed for Linux, Solaris, ...
-    dnl _LARGE_FILES -- for AIX
-    ossim_largefile=no
-    OSSIM_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64, ac_cv_sys_file_offset_bits)
-    if test "x$ossim_largefile" != "xyes"; then
-        OSSIM_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, ac_cv_sys_large_files)
-    fi
-
-    AC_MSG_CHECKING(if large file support is available)
-    if test "x$ossim_largefile" = "xyes"; then
-        AC_DEFINE(HAVE_LARGEFILE_SUPPORT)
-    fi
-    AC_MSG_RESULT($ossim_largefile)
-fi
-])
diff --git a/bin/.cvsignore b/bin/.cvsignore
deleted file mode 100644
index 90aec9f..0000000
--- a/bin/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-.libs
-*
diff --git a/config.guess b/config.guess
deleted file mode 100644
index dff9e48..0000000
--- a/config.guess
+++ /dev/null
@@ -1,1317 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-#   Free Software Foundation, Inc.
-
-timestamp='2001-09-04'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Written by Per Bothner <bothner at cygnus.com>.
-# Please send patches to <config-patches at gnu.org>.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches at gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
-    --version | -v )
-       echo "$version" ; exit 0 ;;
-    --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-
-dummy=dummy-$$
-trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script.
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int dummy(){}" > $dummy.c ;
-	for c in cc gcc c89 ; do
-	  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
-	  if test $? = 0 ; then
-	     CC_FOR_BUILD="$c"; break ;
-	  fi ;
-	done ;
-	rm -f $dummy.c $dummy.o $dummy.rel ;
-	if test x"$CC_FOR_BUILD" = x ; then
-	  CC_FOR_BUILD=no_compiler_found ;
-	fi
-	;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi at noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-	PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-	# Netbsd (nbsd) targets should (where applicable) match one or
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-	# switched to ELF, *-*-netbsd* would select the old
-	# object file format.  This provides both forward
-	# compatibility and a consistent mechanism for selecting the
-	# object file format.
-	# Determine the machine/vendor (is the vendor relevant).
-	case "${UNAME_MACHINE}" in
-	    amiga) machine=m68k-unknown ;;
-	    arm32) machine=arm-unknown ;;
-	    atari*) machine=m68k-atari ;;
-	    sun3*) machine=m68k-sun ;;
-	    mac68k) machine=m68k-apple ;;
-	    macppc) machine=powerpc-apple ;;
-	    hp3[0-9][05]) machine=m68k-hp ;;
-	    ibmrt|romp-ibm) machine=romp-ibm ;;
-	    *) machine=${UNAME_MACHINE}-unknown ;;
-	esac
-	# The Operating System including object format, if it has switched
-	# to ELF recently, or will in the future.
-	case "${UNAME_MACHINE}" in
-	    i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
-		eval $set_cc_for_build
-		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-			| grep __ELF__ >/dev/null
-		then
-		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-		    # Return netbsd for either.  FIX?
-		    os=netbsd
-		else
-		    os=netbsdelf
-		fi
-		;;
-	    *)
-	        os=netbsd
-		;;
-	esac
-	# The OS release
-	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-	# contains redundant information, the shorter form:
-	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}"
-	exit 0 ;;
-    alpha:OSF1:*:*)
-	if test $UNAME_RELEASE = "V4.0"; then
-		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-	fi
-	# A Vn.n version is a released version.
-	# A Tn.n version is a released field test version.
-	# A Xn.n version is an unreleased experimental baselevel.
-	# 1.2 uses "1.2" for uname -r.
-	cat <<EOF >$dummy.s
-	.data
-\$Lformat:
-	.byte 37,100,45,37,120,10,0	# "%d-%x\n"
-
-	.text
-	.globl main
-	.align 4
-	.ent main
-main:
-	.frame \$30,16,\$26,0
-	ldgp \$29,0(\$27)
-	.prologue 1
-	.long 0x47e03d80 # implver \$0
-	lda \$2,-1
-	.long 0x47e20c21 # amask \$2,\$1
-	lda \$16,\$Lformat
-	mov \$0,\$17
-	not \$1,\$18
-	jsr \$26,printf
-	ldgp \$29,0(\$26)
-	mov 0,\$16
-	jsr \$26,exit
-	.end main
-EOF
-	eval $set_cc_for_build
-	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
-	if test "$?" = 0 ; then
-		case `./$dummy` in
-			0-0)
-				UNAME_MACHINE="alpha"
-				;;
-			1-0)
-				UNAME_MACHINE="alphaev5"
-				;;
-			1-1)
-				UNAME_MACHINE="alphaev56"
-				;;
-			1-101)
-				UNAME_MACHINE="alphapca56"
-				;;
-			2-303)
-				UNAME_MACHINE="alphaev6"
-				;;
-			2-307)
-				UNAME_MACHINE="alphaev67"
-				;;
-			2-1307)
-				UNAME_MACHINE="alphaev68"
-				;;
-		esac
-	fi
-	rm -f $dummy.s $dummy
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit 0 ;;
-    Alpha\ *:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# Should we change UNAME_MACHINE based on the output of uname instead
-	# of the specific Alpha model?
-	echo alpha-pc-interix
-	exit 0 ;;
-    21064:Windows_NT:50:3)
-	echo alpha-dec-winnt3.5
-	exit 0 ;;
-    Amiga*:UNIX_System_V:4.0:*)
-	echo m68k-unknown-sysv4
-	exit 0;;
-    amiga:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit 0 ;;
-    arc64:OpenBSD:*:*)
-	echo mips64el-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    arc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    hkmips:OpenBSD:*:*)
-	echo mips-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    pmax:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sgi:OpenBSD:*:*)
-	echo mips-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    wgrisc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    *:OS/390:*:*)
-	echo i370-ibm-openedition
-	exit 0 ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit 0;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-	echo hppa1.1-hitachi-hiuxmpp
-	exit 0;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-	if test "`(/bin/universe) 2>/dev/null`" = att ; then
-		echo pyramid-pyramid-sysv3
-	else
-		echo pyramid-pyramid-bsd
-	fi
-	exit 0 ;;
-    NILE*:*:*:dcosx)
-	echo pyramid-pyramid-svr4
-	exit 0 ;;
-    sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    i86pc:SunOS:5.*:*)
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    sun4*:SunOS:6*:*)
-	# According to config.sub, this is the proper way to canonicalize
-	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    sun4*:SunOS:*:*)
-	case "`/usr/bin/arch -k`" in
-	    Series*|S4*)
-		UNAME_RELEASE=`uname -v`
-		;;
-	esac
-	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit 0 ;;
-    sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit 0 ;;
-    sun*:*:4.2BSD:*)
-	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-	case "`/bin/arch`" in
-	    sun3)
-		echo m68k-sun-sunos${UNAME_RELEASE}
-		;;
-	    sun4)
-		echo sparc-sun-sunos${UNAME_RELEASE}
-		;;
-	esac
-	exit 0 ;;
-    aushp:SunOS:*:*)
-	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit 0 ;;
-    sparc*:NetBSD:*)
-	echo `uname -p`-unknown-netbsd${UNAME_RELEASE}
-	exit 0 ;;
-    atari*:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
-        exit 0 ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit 0 ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit 0 ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit 0 ;;
-    sun3*:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mac68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme88k:OpenBSD:*:*)
-	echo m88k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    powerpc:machten:*:*)
-	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit 0 ;;
-    RISC*:Mach:*:*)
-	echo mips-dec-mach_bsd4.3
-	exit 0 ;;
-    RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
-    VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit 0 ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-	#if defined (host_mips) && defined (MIPSEB)
-	#if defined (SYSTYPE_SYSV)
-	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_SVR4)
-	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-	#endif
-	#endif
-	  exit (-1);
-	}
-EOF
-	$CC_FOR_BUILD $dummy.c -o $dummy \
-	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && rm -f $dummy.c $dummy && exit 0
-	rm -f $dummy.c $dummy
-	echo mips-mips-riscos${UNAME_RELEASE}
-	exit 0 ;;
-    Motorola:PowerMAX_OS:*:*)
-	echo powerpc-motorola-powermax
-	exit 0 ;;
-    Night_Hawk:Power_UNIX:*:*)
-	echo powerpc-harris-powerunix
-	exit 0 ;;
-    m88k:CX/UX:7*:*)
-	echo m88k-harris-cxux7
-	exit 0 ;;
-    m88k:*:4*:R4*)
-	echo m88k-motorola-sysv4
-	exit 0 ;;
-    m88k:*:3*:R3*)
-	echo m88k-motorola-sysv3
-	exit 0 ;;
-    AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-	then
-	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-	       [ ${TARGET_BINARY_INTERFACE}x = x ]
-	    then
-		echo m88k-dg-dgux${UNAME_RELEASE}
-	    else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
-	    fi
-	else
-	    echo i586-dg-dgux${UNAME_RELEASE}
-	fi
- 	exit 0 ;;
-    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
-	echo m88k-dolphin-sysv3
-	exit 0 ;;
-    M88*:*:R3*:*)
-	# Delta 88k system running SVR3
-	echo m88k-motorola-sysv3
-	exit 0 ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-	echo m88k-tektronix-sysv3
-	exit 0 ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-	echo m68k-tektronix-bsd
-	exit 0 ;;
-    *:IRIX*:*:*)
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit 0 ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
-	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-	echo i386-ibm-aix
-	exit 0 ;;
-    ia64:AIX:*:*)
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit 0 ;;
-    *:AIX:2:3)
-	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		eval $set_cc_for_build
-		sed 's/^		//' << EOF >$dummy.c
-		#include <sys/systemcfg.h>
-
-		main()
-			{
-			if (!__power_pc())
-				exit(1);
-			puts("powerpc-ibm-aix3.2.5");
-			exit(0);
-			}
-EOF
-		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
-		rm -f $dummy.c $dummy
-		echo rs6000-ibm-aix3.2.5
-	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-		echo rs6000-ibm-aix3.2.4
-	else
-		echo rs6000-ibm-aix3.2
-	fi
-	exit 0 ;;
-    *:AIX:*:[45])
-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
-	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-		IBM_ARCH=rs6000
-	else
-		IBM_ARCH=powerpc
-	fi
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit 0 ;;
-    *:AIX:*:*)
-	echo rs6000-ibm-aix
-	exit 0 ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-	echo romp-ibm-bsd4.4
-	exit 0 ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit 0 ;;                           # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-	echo rs6000-bull-bosx
-	exit 0 ;;
-    DPX/2?00:B.O.S.:*:*)
-	echo m68k-bull-sysv3
-	exit 0 ;;
-    9000/[34]??:4.3bsd:1.*:*)
-	echo m68k-hp-bsd
-	exit 0 ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-	echo m68k-hp-bsd4.4
-	exit 0 ;;
-    9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
-	    9000/[678][0-9][0-9])
-              case "${HPUX_REV}" in
-                11.[0-9][0-9])
-                  if [ -x /usr/bin/getconf ]; then
-                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
-                        esac ;;
-                    esac
-                  fi ;;
-              esac
-              if [ "${HP_ARCH}" = "" ]; then
-	      eval $set_cc_for_build
-              sed 's/^              //' << EOF >$dummy.c
-
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
-
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
-
-                  switch (cpu)
-              	{
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-              	case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-              	    switch (bits)
-              		{
-              		case 64: puts ("hppa2.0w"); break;
-              		case 32: puts ("hppa2.0n"); break;
-              		default: puts ("hppa2.0"); break;
-              		} break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-              	    puts ("hppa2.0"); break;
-              #endif
-              	default: puts ("hppa1.0"); break;
-              	}
-                  exit (0);
-              }
-EOF
-	    (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
-	    if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
-	    rm -f $dummy.c $dummy
-	fi ;;
-	esac
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit 0 ;;
-    ia64:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ia64-hp-hpux${HPUX_REV}
-	exit 0 ;;
-    3050*:HI-UX:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <unistd.h>
-	int
-	main ()
-	{
-	  long cpu = sysconf (_SC_CPU_VERSION);
-	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-	     results, however.  */
-	  if (CPU_IS_PA_RISC (cpu))
-	    {
-	      switch (cpu)
-		{
-		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-		  default: puts ("hppa-hitachi-hiuxwe2"); break;
-		}
-	    }
-	  else if (CPU_IS_HP_MC68K (cpu))
-	    puts ("m68k-hitachi-hiuxwe2");
-	  else puts ("unknown-hitachi-hiuxwe2");
-	  exit (0);
-	}
-EOF
-	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
-	rm -f $dummy.c $dummy
-	echo unknown-hitachi-hiuxwe2
-	exit 0 ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-	echo hppa1.1-hp-bsd
-	exit 0 ;;
-    9000/8??:4.3bsd:*:*)
-	echo hppa1.0-hp-bsd
-	exit 0 ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-	echo hppa1.0-hp-mpeix
-	exit 0 ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-	echo hppa1.1-hp-osf
-	exit 0 ;;
-    hp8??:OSF1:*:*)
-	echo hppa1.0-hp-osf
-	exit 0 ;;
-    i*86:OSF1:*:*)
-	if [ -x /usr/sbin/sysversion ] ; then
-	    echo ${UNAME_MACHINE}-unknown-osf1mk
-	else
-	    echo ${UNAME_MACHINE}-unknown-osf1
-	fi
-	exit 0 ;;
-    parisc*:Lites*:*:*)
-	echo hppa1.1-hp-lites
-	exit 0 ;;
-    hppa*:OpenBSD:*:*)
-	echo hppa-unknown-openbsd
-	exit 0 ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-	echo c1-convex-bsd
-        exit 0 ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-        exit 0 ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-	echo c34-convex-bsd
-        exit 0 ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-	echo c38-convex-bsd
-        exit 0 ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-	echo c4-convex-bsd
-        exit 0 ;;
-    CRAY*X-MP:*:*:*)
-	echo xmp-cray-unicos
-        exit 0 ;;
-    CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY*[A-Z]90:*:*:*)
-	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-	      -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY*TS:*:*:*)
-	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY*T3D:*:*:*)
-	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY*T3E:*:*:*)
-	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY*SV1:*:*:*)
-	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY-2:*:*:*)
-	echo cray2-cray-unicos
-        exit 0 ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit 0 ;;
-    hp300:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit 0 ;;
-    sparc*:BSD/OS:*:*)
-	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
-    *:BSD/OS:*:*)
-	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
-    *:FreeBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit 0 ;;
-    *:OpenBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-	exit 0 ;;
-    i*:CYGWIN*:*)
-	echo ${UNAME_MACHINE}-pc-cygwin
-	exit 0 ;;
-    i*:MINGW*:*)
-	echo ${UNAME_MACHINE}-pc-mingw32
-	exit 0 ;;
-    i*:PW*:*)
-	echo ${UNAME_MACHINE}-pc-pw32
-	exit 0 ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-	# UNAME_MACHINE based on the output of uname instead of i386?
-	echo i386-pc-interix
-	exit 0 ;;
-    i*:UWIN*:*)
-	echo ${UNAME_MACHINE}-pc-uwin
-	exit 0 ;;
-    p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin
-	exit 0 ;;
-    prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    *:GNU:*:*)
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit 0 ;;
-    i*86:Minix:*:*)
-	echo ${UNAME_MACHINE}-pc-minix
-	exit 0 ;;
-    arm*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
-    ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux
-	exit 0 ;;
-    m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
-    mips:Linux:*:*)
-	case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
-	  big)    echo mips-unknown-linux-gnu && exit 0 ;;
-	  little) echo mipsel-unknown-linux-gnu && exit 0 ;;
-	esac
-	;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit 0 ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
-	exit 0 ;;
-    alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-	exit 0 ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-	# Look for CPU level
-	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
-	  *)    echo hppa-unknown-linux-gnu ;;
-	esac
-	exit 0 ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
-	exit 0 ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
-	exit 0 ;;
-    sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
-    x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
-	exit 0 ;;
-    i*86:Linux:*:*)
-	# The BFD linker knows what the default object file format is, so
-	# first see if it will tell us. cd to the root directory to prevent
-	# problems with other programs or directories called `ld' in the path.
-	ld_supported_targets=`cd /; ld --help 2>&1 \
-			 | sed -ne '/supported targets:/!d
-				    s/[ 	][ 	]*/ /g
-				    s/.*supported targets: *//
-				    s/ .*//
-				    p'`
-        case "$ld_supported_targets" in
-	  elf32-i386)
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-		;;
-	  a.out-i386-linux)
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-		exit 0 ;;		
-	  coff-i386)
-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-		exit 0 ;;
-	  "")
-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
-		# one that does not give us useful --help.
-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-		exit 0 ;;
-	esac
-	# Determine whether the default compiler is a.out or elf
-	eval $set_cc_for_build
-	cat >$dummy.c <<EOF
-#include <features.h>
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-#ifdef __ELF__
-# ifdef __GLIBC__
-#  if __GLIBC__ >= 2
-    printf ("%s-pc-linux-gnu\n", argv[1]);
-#  else
-    printf ("%s-pc-linux-gnulibc1\n", argv[1]);
-#  endif
-# else
-   printf ("%s-pc-linux-gnulibc1\n", argv[1]);
-# endif
-#else
-  printf ("%s-pc-linux-gnuaout\n", argv[1]);
-#endif
-  return 0;
-}
-EOF
-	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
-	rm -f $dummy.c $dummy
-	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
-	;;
-    i*86:DYNIX/ptx:4*:*)
-	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-	# earlier versions are messed up and put the nodename in both
-	# sysname and nodename.
-	echo i386-sequent-sysv4
-	exit 0 ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
-	# I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
-	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit 0 ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-	else
-		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-	fi
-	exit 0 ;;
-    i*86:*:5:[78]*)
-	case `/bin/uname -X | grep "^Machine"` in
-	    *486*)	     UNAME_MACHINE=i486 ;;
-	    *Pentium)	     UNAME_MACHINE=i586 ;;
-	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-	esac
-	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-	exit 0 ;;
-    i*86:*:3.2:*)
-	if test -f /usr/options/cb.name; then
-		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-	elif /bin/uname -X 2>/dev/null >/dev/null ; then
-		UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
-		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
-			&& UNAME_MACHINE=i586
-		(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-	else
-		echo ${UNAME_MACHINE}-pc-sysv32
-	fi
-	exit 0 ;;
-    i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit 0 ;;
-    pc:*:*:*)
-	# Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-	echo i386-pc-msdosdjgpp
-        exit 0 ;;
-    Intel:Mach:3*:*)
-	echo i386-pc-mach3
-	exit 0 ;;
-    paragon:*:*:*)
-	echo i860-intel-osf1
-	exit 0 ;;
-    i860:*:4.*:*) # i860-SVR4
-	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-	fi
-	exit 0 ;;
-    mini*:CTIX:SYS*5:*)
-	# "miniframe"
-	echo m68010-convergent-sysv
-	exit 0 ;;
-    M68*:*:R3V[567]*:*)
-	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
-	OS_REL=''
-	test -r /etc/.relid \
-	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && echo i486-ncr-sysv4 && exit 0 ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    mc68030:UNIX_System_V:4.*:*)
-	echo m68k-atari-sysv4
-	exit 0 ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    rs6000:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
-	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    SM[BE]S:UNIX_SV:*:*)
-	echo mips-dde-sysv${UNAME_RELEASE}
-	exit 0 ;;
-    RM*:ReliantUNIX-*:*:*)
-	echo mips-sni-sysv4
-	exit 0 ;;
-    RM*:SINIX-*:*:*)
-	echo mips-sni-sysv4
-	exit 0 ;;
-    *:SINIX-*:*:*)
-	if uname -p 2>/dev/null >/dev/null ; then
-		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo ${UNAME_MACHINE}-sni-sysv4
-	else
-		echo ns32k-sni-sysv
-	fi
-	exit 0 ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel at ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit 0 ;;
-    *:UNIX_System_V:4*:FTX*)
-	# From Gerald Hewes <hewes at openmarket.com>.
-	# How about differentiating between stratus architectures? -djm
-	echo hppa1.1-stratus-sysv4
-	exit 0 ;;
-    *:*:*:FTX*)
-	# From seanf at swdc.stratus.com.
-	echo i860-stratus-sysv4
-	exit 0 ;;
-    *:VOS:*:*)
-	# From Paul.Green at stratus.com.
-	echo hppa1.1-stratus-vos
-	exit 0 ;;
-    mc68*:A/UX:*:*)
-	echo m68k-apple-aux${UNAME_RELEASE}
-	exit 0 ;;
-    news*:NEWS-OS:6*:*)
-	echo mips-sony-newsos6
-	exit 0 ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
-	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
-	fi
-        exit 0 ;;
-    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
-	echo powerpc-be-beos
-	exit 0 ;;
-    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
-	echo powerpc-apple-beos
-	exit 0 ;;
-    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
-	echo i586-pc-beos
-	exit 0 ;;
-    SX-4:SUPER-UX:*:*)
-	echo sx4-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
-    SX-5:SUPER-UX:*:*)
-	echo sx5-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
-    Power*:Rhapsody:*:*)
-	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
-    *:Rhapsody:*:*)
-	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
-    *:Darwin:*:*)
-	echo `uname -p`-apple-darwin${UNAME_RELEASE}
-	exit 0 ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-	if test "${UNAME_MACHINE}" = "x86pc"; then
-		UNAME_MACHINE=pc
-	fi
-	echo `uname -p`-${UNAME_MACHINE}-nto-qnx
-	exit 0 ;;
-    *:QNX:*:4*)
-	echo i386-pc-qnx
-	exit 0 ;;
-    NSR-[KW]:NONSTOP_KERNEL:*:*)
-	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit 0 ;;
-    *:NonStop-UX:*:*)
-	echo mips-compaq-nonstopux
-	exit 0 ;;
-    BS2000:POSIX*:*:*)
-	echo bs2000-siemens-sysv
-	exit 0 ;;
-    DS/*:UNIX_System_V:*:*)
-	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit 0 ;;
-    *:Plan9:*:*)
-	# "uname -m" is not consistent, so use $cputype instead. 386
-	# is converted to i386 for consistency with other x86
-	# operating systems.
-	if test "$cputype" = "386"; then
-	    UNAME_MACHINE=i386
-	else
-	    UNAME_MACHINE="$cputype"
-	fi
-	echo ${UNAME_MACHINE}-unknown-plan9
-	exit 0 ;;
-    i*86:OS/2:*:*)
-	# If we were able to find `uname', then EMX Unix compatibility
-	# is probably installed.
-	echo ${UNAME_MACHINE}-pc-os2-emx
-	exit 0 ;;
-    *:TOPS-10:*:*)
-	echo pdp10-unknown-tops10
-	exit 0 ;;
-    *:TENEX:*:*)
-	echo pdp10-unknown-tenex
-	exit 0 ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-	echo pdp10-dec-tops20
-	exit 0 ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-	echo pdp10-xkl-tops20
-	exit 0 ;;
-    *:TOPS-20:*:*)
-	echo pdp10-unknown-tops20
-	exit 0 ;;
-    *:ITS:*:*)
-	echo pdp10-unknown-its
-	exit 0 ;;
-    i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
-	exit 0 ;;
-    i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
-	exit 0 ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-          "4"
-#else
-	  ""
-#endif
-         ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-	printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-	printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
-rm -f $dummy.c $dummy
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-	echo c1-convex-bsd
-	exit 0 ;;
-    c2*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit 0 ;;
-    c34*)
-	echo c34-convex-bsd
-	exit 0 ;;
-    c38*)
-	echo c38-convex-bsd
-	exit 0 ;;
-    c4*)
-	echo c4-convex-bsd
-	exit 0 ;;
-    esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-    ftp://ftp.gnu.org/pub/gnu/config/
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches at gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/config.sub b/config.sub
deleted file mode 100644
index 393f13d..0000000
--- a/config.sub
+++ /dev/null
@@ -1,1411 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-#   Free Software Foundation, Inc.
-
-timestamp='2001-09-07'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Please send patches to <config-patches at gnu.org>.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches at gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
-    --version | -v )
-       echo "$version" ; exit 0 ;;
-    --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help"
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo $1
-       exit 0;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-	-sun*os*)
-		# Prevent following clause from handling this invalid input.
-		;;
-	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis)
-		os=
-		basic_machine=$1
-		;;
-	-sim | -cisco | -oki | -wec | -winbond)
-		os=
-		basic_machine=$1
-		;;
-	-scout)
-		;;
-	-wrs)
-		os=-vxworks
-		basic_machine=$1
-		;;
-	-chorusos*)
-		os=-chorusos
-		basic_machine=$1
-		;;
- 	-chorusrdb)
- 		os=-chorusrdb
-		basic_machine=$1
- 		;;
-	-hiux*)
-		os=-hiuxwe2
-		;;
-	-sco5)
-		os=-sco3.2v5
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco4)
-		os=-sco3.2v4
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2.[4-9]*)
-		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2v[4-9]*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco*)
-		os=-sco3.2v2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-udk*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-isc)
-		os=-isc2.2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-clix*)
-		basic_machine=clipper-intergraph
-		;;
-	-isc*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-lynx*)
-		os=-lynxos
-		;;
-	-ptx*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-		;;
-	-windowsnt*)
-		os=`echo $os | sed -e 's/windowsnt/winnt/'`
-		;;
-	-psos*)
-		os=-psos
-		;;
-	-mint | -mint[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-	# Recognize the basic CPU types without company name.
-	# Some are omitted here because they have special meanings below.
-	1750a | 580 \
-	| a29k \
-	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
-	| c4x | clipper \
-	| d10v | d30v | dsp16xx \
-	| fr30 \
-	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-	| i370 | i860 | i960 | ia64 \
-	| m32r | m68000 | m68k | m88k | mcore \
-	| mips16 | mips64 | mips64el | mips64orion | mips64orionel \
-	| mips64vr4100 | mips64vr4100el | mips64vr4300 \
-	| mips64vr4300el | mips64vr5000 | mips64vr5000el \
-	| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
-	| mipsisa32 \
-	| mn10200 | mn10300 \
-	| ns16k | ns32k \
-	| openrisc \
-	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
-	| pyramid \
-	| s390 | s390x \
-	| sh | sh[34] | sh[34]eb | shbe | shle \
-	| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
-	| stormy16 | strongarm \
-	| tahoe | thumb | tic80 | tron \
-	| v850 \
-	| we32k \
-	| x86 | xscale \
-	| z8k)
-		basic_machine=$basic_machine-unknown
-		;;
-	m6811 | m68hc11 | m6812 | m68hc12)
-		# Motorola 68HC11/12.
-		basic_machine=$basic_machine-unknown
-		os=-none
-		;;
-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-		;;
-
-	# We use `pc' rather than `unknown'
-	# because (1) that's what they normally are, and
-	# (2) the word "unknown" tends to confuse beginning users.
-	i*86 | x86_64)
-	  basic_machine=$basic_machine-pc
-	  ;;
-	# Object if more than one company name word.
-	*-*-*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-	# Recognize the basic CPU types with company name.
-	580-* \
-	| a29k-* \
-	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-	| alphapca5[67]-* | arc-* \
-	| arm-*  | armbe-* | armle-* | armv*-* \
-	| bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c54x-* \
-	| clipper-* | cray2-* | cydra-* \
-	| d10v-* | d30v-* \
-	| elxsi-* \
-	| f30[01]-* | f700-* | fr30-* | fx80-* \
-	| h8300-* | h8500-* \
-	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-	| i*86-* | i860-* | i960-* | ia64-* \
-	| m32r-* \
-	| m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | mcore-* \
-	| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
-	| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
-	| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
-	| mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
-	| none-* | np1-* | ns16k-* | ns32k-* \
-	| orion-* \
-	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
-	| pyramid-* \
-	| romp-* | rs6000-* \
-	| s390-* | s390x-* \
-	| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
-	| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
-	| sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \
-	| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
-	| v850-* | vax-* \
-	| we32k-* \
-	| x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \
-	| ymp-* \
-	| z8k-*)
-		;;
-	# Recognize the various machine names and aliases which stand
-	# for a CPU type and a company and sometimes even an OS.
-	386bsd)
-		basic_machine=i386-unknown
-		os=-bsd
-		;;
-	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-		basic_machine=m68000-att
-		;;
-	3b*)
-		basic_machine=we32k-att
-		;;
-	a29khif)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	adobe68k)
-		basic_machine=m68010-adobe
-		os=-scout
-		;;
-	alliant | fx80)
-		basic_machine=fx80-alliant
-		;;
-	altos | altos3068)
-		basic_machine=m68k-altos
-		;;
-	am29k)
-		basic_machine=a29k-none
-		os=-bsd
-		;;
-	amdahl)
-		basic_machine=580-amdahl
-		os=-sysv
-		;;
-	amiga | amiga-*)
-		basic_machine=m68k-unknown
-		;;
-	amigaos | amigados)
-		basic_machine=m68k-unknown
-		os=-amigaos
-		;;
-	amigaunix | amix)
-		basic_machine=m68k-unknown
-		os=-sysv4
-		;;
-	apollo68)
-		basic_machine=m68k-apollo
-		os=-sysv
-		;;
-	apollo68bsd)
-		basic_machine=m68k-apollo
-		os=-bsd
-		;;
-	aux)
-		basic_machine=m68k-apple
-		os=-aux
-		;;
-	balance)
-		basic_machine=ns32k-sequent
-		os=-dynix
-		;;
-	convex-c1)
-		basic_machine=c1-convex
-		os=-bsd
-		;;
-	convex-c2)
-		basic_machine=c2-convex
-		os=-bsd
-		;;
-	convex-c32)
-		basic_machine=c32-convex
-		os=-bsd
-		;;
-	convex-c34)
-		basic_machine=c34-convex
-		os=-bsd
-		;;
-	convex-c38)
-		basic_machine=c38-convex
-		os=-bsd
-		;;
-	cray | ymp)
-		basic_machine=ymp-cray
-		os=-unicos
-		;;
-	cray2)
-		basic_machine=cray2-cray
-		os=-unicos
-		;;
-	[cjt]90)
-		basic_machine=${basic_machine}-cray
-		os=-unicos
-		;;
-	crds | unos)
-		basic_machine=m68k-crds
-		;;
-	cris | cris-* | etrax*)
-		basic_machine=cris-axis
-		;;
-	da30 | da30-*)
-		basic_machine=m68k-da30
-		;;
-	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-		basic_machine=mips-dec
-		;;
-	delta | 3300 | motorola-3300 | motorola-delta \
-	      | 3300-motorola | delta-motorola)
-		basic_machine=m68k-motorola
-		;;
-	delta88)
-		basic_machine=m88k-motorola
-		os=-sysv3
-		;;
-	dpx20 | dpx20-*)
-		basic_machine=rs6000-bull
-		os=-bosx
-		;;
-	dpx2* | dpx2*-bull)
-		basic_machine=m68k-bull
-		os=-sysv3
-		;;
-	ebmon29k)
-		basic_machine=a29k-amd
-		os=-ebmon
-		;;
-	elxsi)
-		basic_machine=elxsi-elxsi
-		os=-bsd
-		;;
-	encore | umax | mmax)
-		basic_machine=ns32k-encore
-		;;
-	es1800 | OSE68k | ose68k | ose | OSE)
-		basic_machine=m68k-ericsson
-		os=-ose
-		;;
-	fx2800)
-		basic_machine=i860-alliant
-		;;
-	genix)
-		basic_machine=ns32k-ns
-		;;
-	gmicro)
-		basic_machine=tron-gmicro
-		os=-sysv
-		;;
-	go32)
-		basic_machine=i386-pc
-		os=-go32
-		;;
-	h3050r* | hiux*)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	h8300hms)
-		basic_machine=h8300-hitachi
-		os=-hms
-		;;
-	h8300xray)
-		basic_machine=h8300-hitachi
-		os=-xray
-		;;
-	h8500hms)
-		basic_machine=h8500-hitachi
-		os=-hms
-		;;
-	harris)
-		basic_machine=m88k-harris
-		os=-sysv3
-		;;
-	hp300-*)
-		basic_machine=m68k-hp
-		;;
-	hp300bsd)
-		basic_machine=m68k-hp
-		os=-bsd
-		;;
-	hp300hpux)
-		basic_machine=m68k-hp
-		os=-hpux
-		;;
-	hp3k9[0-9][0-9] | hp9[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k2[0-9][0-9] | hp9k31[0-9])
-		basic_machine=m68000-hp
-		;;
-	hp9k3[2-9][0-9])
-		basic_machine=m68k-hp
-		;;
-	hp9k6[0-9][0-9] | hp6[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k7[0-79][0-9] | hp7[0-79][0-9])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k78[0-9] | hp78[0-9])
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][13679] | hp8[0-9][13679])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][0-9] | hp8[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hppa-next)
-		os=-nextstep3
-		;;
-	hppaosf)
-		basic_machine=hppa1.1-hp
-		os=-osf
-		;;
-	hppro)
-		basic_machine=hppa1.1-hp
-		os=-proelf
-		;;
-	i370-ibm* | ibm*)
-		basic_machine=i370-ibm
-		;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-	i*86v32)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv32
-		;;
-	i*86v4*)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv4
-		;;
-	i*86v)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv
-		;;
-	i*86sol2)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-solaris2
-		;;
-	i386mach)
-		basic_machine=i386-mach
-		os=-mach
-		;;
-	i386-vsta | vsta)
-		basic_machine=i386-unknown
-		os=-vsta
-		;;
-	iris | iris4d)
-		basic_machine=mips-sgi
-		case $os in
-		    -irix*)
-			;;
-		    *)
-			os=-irix4
-			;;
-		esac
-		;;
-	isi68 | isi)
-		basic_machine=m68k-isi
-		os=-sysv
-		;;
-	m88k-omron*)
-		basic_machine=m88k-omron
-		;;
-	magnum | m3230)
-		basic_machine=mips-mips
-		os=-sysv
-		;;
-	merlin)
-		basic_machine=ns32k-utek
-		os=-sysv
-		;;
-	mingw32)
-		basic_machine=i386-pc
-		os=-mingw32
-		;;
-	miniframe)
-		basic_machine=m68000-convergent
-		;;
-	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-	mipsel*-linux*)
-		basic_machine=mipsel-unknown
-		os=-linux-gnu
-		;;
-	mips*-linux*)
-		basic_machine=mips-unknown
-		os=-linux-gnu
-		;;
-	mips3*-*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-		;;
-	mips3*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-		;;
-	mmix*)
-		basic_machine=mmix-knuth
-		os=-mmixware
-		;;
-	monitor)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	msdos)
-		basic_machine=i386-pc
-		os=-msdos
-		;;
-	mvs)
-		basic_machine=i370-ibm
-		os=-mvs
-		;;
-	ncr3000)
-		basic_machine=i486-ncr
-		os=-sysv4
-		;;
-	netbsd386)
-		basic_machine=i386-unknown
-		os=-netbsd
-		;;
-	netwinder)
-		basic_machine=armv4l-rebel
-		os=-linux
-		;;
-	news | news700 | news800 | news900)
-		basic_machine=m68k-sony
-		os=-newsos
-		;;
-	news1000)
-		basic_machine=m68030-sony
-		os=-newsos
-		;;
-	news-3600 | risc-news)
-		basic_machine=mips-sony
-		os=-newsos
-		;;
-	necv70)
-		basic_machine=v70-nec
-		os=-sysv
-		;;
-	next | m*-next )
-		basic_machine=m68k-next
-		case $os in
-		    -nextstep* )
-			;;
-		    -ns2*)
-		      os=-nextstep2
-			;;
-		    *)
-		      os=-nextstep3
-			;;
-		esac
-		;;
-	nh3000)
-		basic_machine=m68k-harris
-		os=-cxux
-		;;
-	nh[45]000)
-		basic_machine=m88k-harris
-		os=-cxux
-		;;
-	nindy960)
-		basic_machine=i960-intel
-		os=-nindy
-		;;
-	mon960)
-		basic_machine=i960-intel
-		os=-mon960
-		;;
-	nonstopux)
-		basic_machine=mips-compaq
-		os=-nonstopux
-		;;
-	np1)
-		basic_machine=np1-gould
-		;;
-	nsr-tandem)
-		basic_machine=nsr-tandem
-		;;
-	op50n-* | op60c-*)
-		basic_machine=hppa1.1-oki
-		os=-proelf
-		;;
-	OSE68000 | ose68000)
-		basic_machine=m68000-ericsson
-		os=-ose
-		;;
-	os68k)
-		basic_machine=m68k-none
-		os=-os68k
-		;;
-	pa-hitachi)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	paragon)
-		basic_machine=i860-intel
-		os=-osf
-		;;
-	pbd)
-		basic_machine=sparc-tti
-		;;
-	pbb)
-		basic_machine=m68k-tti
-		;;
-        pc532 | pc532-*)
-		basic_machine=ns32k-pc532
-		;;
-	pentium | p5 | k5 | k6 | nexgen)
-		basic_machine=i586-pc
-		;;
-	pentiumpro | p6 | 6x86 | athlon)
-		basic_machine=i686-pc
-		;;
-	pentiumii | pentium2)
-		basic_machine=i686-pc
-		;;
-	pentium-* | p5-* | k5-* | k6-* | nexgen-*)
-		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumpro-* | p6-* | 6x86-* | athlon-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumii-* | pentium2-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pn)
-		basic_machine=pn-gould
-		;;
-	power)	basic_machine=power-ibm
-		;;
-	ppc)	basic_machine=powerpc-unknown
-	        ;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppcle | powerpclittle | ppc-le | powerpc-little)
-		basic_machine=powerpcle-unknown
-	        ;;
-	ppcle-* | powerpclittle-*)
-		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64)	basic_machine=powerpc64-unknown
-	        ;;
-	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-		basic_machine=powerpc64le-unknown
-	        ;;
-	ppc64le-* | powerpc64little-*)
-		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ps2)
-		basic_machine=i386-ibm
-		;;
-	pw32)
-		basic_machine=i586-unknown
-		os=-pw32
-		;;
-	rom68k)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	rm[46]00)
-		basic_machine=mips-siemens
-		;;
-	rtpc | rtpc-*)
-		basic_machine=romp-ibm
-		;;
-	sa29200)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	sequent)
-		basic_machine=i386-sequent
-		;;
-	sh)
-		basic_machine=sh-hitachi
-		os=-hms
-		;;
-	sparclite-wrs)
-		basic_machine=sparclite-wrs
-		os=-vxworks
-		;;
-	sps7)
-		basic_machine=m68k-bull
-		os=-sysv2
-		;;
-	spur)
-		basic_machine=spur-unknown
-		;;
-	st2000)
-		basic_machine=m68k-tandem
-		;;
-	stratus)
-		basic_machine=i860-stratus
-		os=-sysv4
-		;;
-	sun2)
-		basic_machine=m68000-sun
-		;;
-	sun2os3)
-		basic_machine=m68000-sun
-		os=-sunos3
-		;;
-	sun2os4)
-		basic_machine=m68000-sun
-		os=-sunos4
-		;;
-	sun3os3)
-		basic_machine=m68k-sun
-		os=-sunos3
-		;;
-	sun3os4)
-		basic_machine=m68k-sun
-		os=-sunos4
-		;;
-	sun4os3)
-		basic_machine=sparc-sun
-		os=-sunos3
-		;;
-	sun4os4)
-		basic_machine=sparc-sun
-		os=-sunos4
-		;;
-	sun4sol2)
-		basic_machine=sparc-sun
-		os=-solaris2
-		;;
-	sun3 | sun3-*)
-		basic_machine=m68k-sun
-		;;
-	sun4)
-		basic_machine=sparc-sun
-		;;
-	sun386 | sun386i | roadrunner)
-		basic_machine=i386-sun
-		;;
-	sv1)
-		basic_machine=sv1-cray
-		os=-unicos
-		;;
-	symmetry)
-		basic_machine=i386-sequent
-		os=-dynix
-		;;
-	t3e)
-		basic_machine=t3e-cray
-		os=-unicos
-		;;
-	tic54x | c54x*)
-		basic_machine=tic54x-unknown
-		os=-coff
-		;;
-	tx39)
-		basic_machine=mipstx39-unknown
-		;;
-	tx39el)
-		basic_machine=mipstx39el-unknown
-		;;
-	tower | tower-32)
-		basic_machine=m68k-ncr
-		;;
-	udi29k)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	ultra3)
-		basic_machine=a29k-nyu
-		os=-sym1
-		;;
-	v810 | necv810)
-		basic_machine=v810-nec
-		os=-none
-		;;
-	vaxv)
-		basic_machine=vax-dec
-		os=-sysv
-		;;
-	vms)
-		basic_machine=vax-dec
-		os=-vms
-		;;
-	vpp*|vx|vx-*)
-               basic_machine=f301-fujitsu
-               ;;
-	vxworks960)
-		basic_machine=i960-wrs
-		os=-vxworks
-		;;
-	vxworks68)
-		basic_machine=m68k-wrs
-		os=-vxworks
-		;;
-	vxworks29k)
-		basic_machine=a29k-wrs
-		os=-vxworks
-		;;
-	w65*)
-		basic_machine=w65-wdc
-		os=-none
-		;;
-	w89k-*)
-		basic_machine=hppa1.1-winbond
-		os=-proelf
-		;;
-	windows32)
-		basic_machine=i386-pc
-		os=-windows32-msvcrt
-		;;
-	xmp)
-		basic_machine=xmp-cray
-		os=-unicos
-		;;
-        xps | xps100)
-		basic_machine=xps100-honeywell
-		;;
-	z8k-*-coff)
-		basic_machine=z8k-unknown
-		os=-sim
-		;;
-	none)
-		basic_machine=none-none
-		os=-none
-		;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-	w89k)
-		basic_machine=hppa1.1-winbond
-		;;
-	op50n)
-		basic_machine=hppa1.1-oki
-		;;
-	op60c)
-		basic_machine=hppa1.1-oki
-		;;
-	mips)
-		if [ x$os = x-linux-gnu ]; then
-			basic_machine=mips-unknown
-		else
-			basic_machine=mips-mips
-		fi
-		;;
-	romp)
-		basic_machine=romp-ibm
-		;;
-	rs6000)
-		basic_machine=rs6000-ibm
-		;;
-	vax)
-		basic_machine=vax-dec
-		;;
-	pdp10)
-		# there are many clones, so DEC is not a safe bet
-		basic_machine=pdp10-unknown
-		;;
-	pdp11)
-		basic_machine=pdp11-dec
-		;;
-	we32k)
-		basic_machine=we32k-att
-		;;
-	sh3 | sh4 | sh3eb | sh4eb)
-		basic_machine=sh-unknown
-		;;
-	sparc | sparcv9 | sparcv9b)
-		basic_machine=sparc-sun
-		;;
-        cydra)
-		basic_machine=cydra-cydrome
-		;;
-	orion)
-		basic_machine=orion-highlevel
-		;;
-	orion105)
-		basic_machine=clipper-highlevel
-		;;
-	mac | mpw | mac-mpw)
-		basic_machine=m68k-apple
-		;;
-	pmac | pmac-mpw)
-		basic_machine=powerpc-apple
-		;;
-	c4x*)
-		basic_machine=c4x-none
-		os=-coff
-		;;
-	*-unknown)
-		# Make sure to match an already-canonicalized machine name.
-		;;
-	*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-	*-digital*)
-		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-		;;
-	*-commodore*)
-		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-		;;
-	*)
-		;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
-	# -solaris* is a basic system type, with this one exception.
-	-solaris1 | -solaris1.*)
-		os=`echo $os | sed -e 's|solaris1|sunos4|'`
-		;;
-	-solaris)
-		os=-solaris2
-		;;
-	-svr4*)
-		os=-sysv4
-		;;
-	-unixware*)
-		os=-sysv4.2uw
-		;;
-	-gnu/linux*)
-		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-		;;
-	# First accept the basic system types.
-	# The portable systems comes first.
-	# Each alternative MUST END IN A *, to match a version number.
-	# -sysv* is not here because it comes later, after sysvr4.
-	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* \
-	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
-	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* \
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
-	      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
-	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-	      | -os2* | -vos*)
-	# Remember, each alternative MUST END IN *, to match a version number.
-		;;
-	-qnx*)
-		case $basic_machine in
-		    x86-* | i*86-*)
-			;;
-		    *)
-			os=-nto$os
-			;;
-		esac
-		;;
-	-nto*)
-		os=-nto-qnx
-		;;
-	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
-	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-		;;
-	-mac*)
-		os=`echo $os | sed -e 's|mac|macos|'`
-		;;
-	-linux*)
-		os=`echo $os | sed -e 's|linux|linux-gnu|'`
-		;;
-	-sunos5*)
-		os=`echo $os | sed -e 's|sunos5|solaris2|'`
-		;;
-	-sunos6*)
-		os=`echo $os | sed -e 's|sunos6|solaris3|'`
-		;;
-	-opened*)
-		os=-openedition
-		;;
-	-wince*)
-		os=-wince
-		;;
-	-osfrose*)
-		os=-osfrose
-		;;
-	-osf*)
-		os=-osf
-		;;
-	-utek*)
-		os=-bsd
-		;;
-	-dynix*)
-		os=-bsd
-		;;
-	-acis*)
-		os=-aos
-		;;
-	-386bsd)
-		os=-bsd
-		;;
-	-ctix* | -uts*)
-		os=-sysv
-		;;
-	-ns2 )
-	        os=-nextstep2
-		;;
-	-nsk*)
-		os=-nsk
-		;;
-	# Preserve the version number of sinix5.
-	-sinix5.*)
-		os=`echo $os | sed -e 's|sinix|sysv|'`
-		;;
-	-sinix*)
-		os=-sysv4
-		;;
-	-triton*)
-		os=-sysv3
-		;;
-	-oss*)
-		os=-sysv3
-		;;
-	-svr4)
-		os=-sysv4
-		;;
-	-svr3)
-		os=-sysv3
-		;;
-	-sysvr4)
-		os=-sysv4
-		;;
-	# This must come after -sysvr4.
-	-sysv*)
-		;;
-	-ose*)
-		os=-ose
-		;;
-	-es1800*)
-		os=-ose
-		;;
-	-xenix)
-		os=-xenix
-		;;
-        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-	        os=-mint
-		;;
-	-none)
-		;;
-	*)
-		# Get rid of the `-' at the beginning of $os.
-		os=`echo $os | sed 's/[^-]*-//'`
-		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-		exit 1
-		;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-	*-acorn)
-		os=-riscix1.2
-		;;
-	arm*-rebel)
-		os=-linux
-		;;
-	arm*-semi)
-		os=-aout
-		;;
-	pdp10-*)
-		os=-tops20
-		;;
-        pdp11-*)
-		os=-none
-		;;
-	*-dec | vax-*)
-		os=-ultrix4.2
-		;;
-	m68*-apollo)
-		os=-domain
-		;;
-	i386-sun)
-		os=-sunos4.0.2
-		;;
-	m68000-sun)
-		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
-		;;
-	m68*-cisco)
-		os=-aout
-		;;
-	mips*-cisco)
-		os=-elf
-		;;
-	mips*-*)
-		os=-elf
-		;;
-	*-tti)	# must be before sparc entry or we get the wrong os.
-		os=-sysv3
-		;;
-	sparc-* | *-sun)
-		os=-sunos4.1.1
-		;;
-	*-be)
-		os=-beos
-		;;
-	*-ibm)
-		os=-aix
-		;;
-	*-wec)
-		os=-proelf
-		;;
-	*-winbond)
-		os=-proelf
-		;;
-	*-oki)
-		os=-proelf
-		;;
-	*-hp)
-		os=-hpux
-		;;
-	*-hitachi)
-		os=-hiux
-		;;
-	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-		os=-sysv
-		;;
-	*-cbm)
-		os=-amigaos
-		;;
-	*-dg)
-		os=-dgux
-		;;
-	*-dolphin)
-		os=-sysv3
-		;;
-	m68k-ccur)
-		os=-rtu
-		;;
-	m88k-omron*)
-		os=-luna
-		;;
-	*-next )
-		os=-nextstep
-		;;
-	*-sequent)
-		os=-ptx
-		;;
-	*-crds)
-		os=-unos
-		;;
-	*-ns)
-		os=-genix
-		;;
-	i370-*)
-		os=-mvs
-		;;
-	*-next)
-		os=-nextstep3
-		;;
-        *-gould)
-		os=-sysv
-		;;
-        *-highlevel)
-		os=-bsd
-		;;
-	*-encore)
-		os=-bsd
-		;;
-        *-sgi)
-		os=-irix
-		;;
-        *-siemens)
-		os=-sysv4
-		;;
-	*-masscomp)
-		os=-rtu
-		;;
-	f30[01]-fujitsu | f700-fujitsu)
-		os=-uxpv
-		;;
-	*-rom68k)
-		os=-coff
-		;;
-	*-*bug)
-		os=-coff
-		;;
-	*-apple)
-		os=-macos
-		;;
-	*-atari*)
-		os=-mint
-		;;
-	*)
-		os=-none
-		;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-	*-unknown)
-		case $os in
-			-riscix*)
-				vendor=acorn
-				;;
-			-sunos*)
-				vendor=sun
-				;;
-			-aix*)
-				vendor=ibm
-				;;
-			-beos*)
-				vendor=be
-				;;
-			-hpux*)
-				vendor=hp
-				;;
-			-mpeix*)
-				vendor=hp
-				;;
-			-hiux*)
-				vendor=hitachi
-				;;
-			-unos*)
-				vendor=crds
-				;;
-			-dgux*)
-				vendor=dg
-				;;
-			-luna*)
-				vendor=omron
-				;;
-			-genix*)
-				vendor=ns
-				;;
-			-mvs* | -opened*)
-				vendor=ibm
-				;;
-			-ptx*)
-				vendor=sequent
-				;;
-			-vxsim* | -vxworks*)
-				vendor=wrs
-				;;
-			-aux*)
-				vendor=apple
-				;;
-			-hms*)
-				vendor=hitachi
-				;;
-			-mpw* | -macos*)
-				vendor=apple
-				;;
-			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-				vendor=atari
-				;;
-			-vos*)
-				vendor=stratus
-				;;
-		esac
-		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-		;;
-esac
-
-echo $basic_machine$os
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/configure b/configure
deleted file mode 100755
index fc5182b..0000000
--- a/configure
+++ /dev/null
@@ -1,10862 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for ossim 1.8.4.
-#
-# Report bugs to <http://bugzilla.remotesensing.org>.
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""	$as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
-else
-  as_have_required=no
-fi
-
-  if test $as_have_required = yes &&	 (eval ":
-(as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=\$LINENO
-  as_lineno_2=\$LINENO
-  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
-  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
-  :
-else
-  as_candidate_shells=
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  case $as_dir in
-	 /*)
-	   for as_base in sh bash ksh sh5; do
-	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
-	   done;;
-       esac
-done
-IFS=$as_save_IFS
-
-
-      for as_shell in $as_candidate_shells $SHELL; do
-	 # Try only shells that exist, to save several forks.
-	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-		{ ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-_ASEOF
-}; then
-  CONFIG_SHELL=$as_shell
-	       as_have_required=yes
-	       if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-(as_func_return () {
-  (exit $1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
-  break
-fi
-
-fi
-
-      done
-
-      if test "x$CONFIG_SHELL" != x; then
-  for as_var in BASH_ENV ENV
-	do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-	done
-	export CONFIG_SHELL
-	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-
-    if test $as_have_required = no; then
-  echo This script requires a shell more modern than all the
-      echo shells that I found on your system.  Please install a
-      echo modern shell, or manually run the script under such a
-      echo shell if you do have one.
-      { (exit 1); exit 1; }
-fi
-
-
-fi
-
-fi
-
-
-
-(eval "as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0") || {
-  echo No shell found that supports shell functions.
-  echo Please tell bug-autoconf at gnu.org about your system,
-  echo including any error possibly output before this message.
-  echo This can help us improve future autoconf versions.
-  echo Configuration will now proceed without shell functions.
-}
-
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -p'
-  fi
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-	test -d "$1/.";
-      else
-	case $1 in
-	-*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Identity of this package.
-PACKAGE_NAME='ossim'
-PACKAGE_TARNAME='ossim'
-PACKAGE_VERSION='1.8.4'
-PACKAGE_STRING='ossim 1.8.4'
-PACKAGE_BUGREPORT='http://bugzilla.remotesensing.org'
-
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-ac_subst_vars='LTLIBOBJS
-LIBOBJS
-INCLUDE_COMMON
-OSSIM_PREFIX
-OSSIM_INCLUDES
-OSSIM_LIBS
-OSSIM_CPP_FLAGS
-OSSIM_CFLAGS
-LDFLAGS_APP
-LDFLAGS_EXE
-LDFLAGS_VERSIONING
-LDFLAGS_GL
-LD_SHARED
-OPTIMIZATION_FLAG
-CARBON
-HOST_RESULT
-AR_FLAGS
-BASE_DEFINES
-CDEBUGFLAGS
-OSSIM_RESOURCES_MACOSX_TEXT
-OSSIM_RESOURCES_MACOSX_DATA
-LIBOSSIMMACRESCOMP
-LIBOSSIMMACRES
-TOOLKIT_DIR
-MACOSX_BUNDLE
-RESFLAGS
-RESCOMP
-PIC_FLAG
-SHARED_LIB_FLAG
-SO_REALNAME_EXT
-SO_SONAME_EXT
-SO_VERSIONLESS_EXT
-STATIC_OBJ_DIR
-SHARED_OBJ_DIR
-BUILD_STATIC_APPS
-BUILD_SINGLE_STATIC_LIBS
-BUILD_SINGLE_SHARED_LIBS
-BUILD_STATIC_LIBS
-BUILD_SHARED_LIBS
-BUILD_STATIC_OBJS
-BUILD_SHARED_OBJS
-OSSIM_VERSION
-OSSIM_RELEASE_NUMBER
-OSSIM_MINOR_VERSION_NUMBER
-OSSIM_MAJOR_VERSION_NUMBER
-top_builddir
-OSSIM_TOP
-PROGRAM_PREFIX
-FREETYPE_LIBS
-FREETYPE_LIB_PATH
-FREETYPE_INCLUDES
-OPEN_THREADS_LIB_PATH
-OPEN_THREADS_LIBS
-OPEN_THREADS_INCLUDES
-MPI_LIBS
-MPI_LIB_PATH
-MPI_INCLUDES
-GEOTIFF_LIBS
-GEOTIFF_LIB_PATH
-GEOTIFF_INCLUDE_PATH
-JPEG_LIBS
-JPEG_LIB_PATH
-JPEG_INCLUDE_PATH
-LIBTIFF_LIBS
-LIBTIFF_LIB_PATH
-LIBTIFF_INCLUDE_PATH
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-EGREP
-GREP
-CHMOD
-SED
-DIRNAME
-STRIP
-RM
-ECHO
-AR
-CXXCPP
-CPP
-ac_ct_CXX
-CXXFLAGS
-CXX
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-RANLIB
-INSTALL_DATA
-INSTALL_SCRIPT
-INSTALL_PROGRAM
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-with_libtiff
-with_jpeg
-with_geotiff
-with_mpi
-with_mpi_inc
-with_mpi_lib
-with_openmpi_flag
-with_openthreads
-with_freetype
-with_program_prefix
-enable_sharedOssimLibraries
-enable_staticOssimLibraries
-enable_singleSharedOssimLibrary
-enable_singleStaticOssimLibrary
-enable_staticOssimApps
-enable_largefile
-enable_debug
-enable_optimization
-enable_warn_all
-'
-      ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CXX
-CXXFLAGS
-CCC
-CPP
-CXXCPP'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval $ac_prev=\$ac_option
-    ac_prev=
-    continue
-  fi
-
-  case $ac_option in
-  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)	ac_optarg=yes ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case $ac_dashdash$ac_option in
-  --)
-    ac_dashdash=yes ;;
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir=$ac_optarg ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build_alias ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build_alias=$ac_optarg ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file=$ac_optarg ;;
-
-  --config-cache | -C)
-    cache_file=config.cache ;;
-
-  -datadir | --datadir | --datadi | --datad)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=*)
-    datadir=$ac_optarg ;;
-
-  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
-  | --dataroo | --dataro | --datar)
-    ac_prev=datarootdir ;;
-  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
-  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
-    datarootdir=$ac_optarg ;;
-
-  -disable-* | --disable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=no ;;
-
-  -docdir | --docdir | --docdi | --doc | --do)
-    ac_prev=docdir ;;
-  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
-    docdir=$ac_optarg ;;
-
-  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
-    ac_prev=dvidir ;;
-  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
-    dvidir=$ac_optarg ;;
-
-  -enable-* | --enable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=\$ac_optarg ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix=$ac_optarg ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he | -h)
-    ac_init_help=long ;;
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
-    ac_init_help=recursive ;;
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
-    ac_init_help=short ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host_alias ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host_alias=$ac_optarg ;;
-
-  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
-    ac_prev=htmldir ;;
-  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
-  | --ht=*)
-    htmldir=$ac_optarg ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir=$ac_optarg ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir=$ac_optarg ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir=$ac_optarg ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir=$ac_optarg ;;
-
-  -localedir | --localedir | --localedi | --localed | --locale)
-    ac_prev=localedir ;;
-  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
-    localedir=$ac_optarg ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst | --locals)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
-    localstatedir=$ac_optarg ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir=$ac_optarg ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c | -n)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir=$ac_optarg ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix=$ac_optarg ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix=$ac_optarg ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix=$ac_optarg ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name=$ac_optarg ;;
-
-  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
-    ac_prev=pdfdir ;;
-  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
-    pdfdir=$ac_optarg ;;
-
-  -psdir | --psdir | --psdi | --psd | --ps)
-    ac_prev=psdir ;;
-  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
-    psdir=$ac_optarg ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir=$ac_optarg ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir=$ac_optarg ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site=$ac_optarg ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir=$ac_optarg ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir=$ac_optarg ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target_alias ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
-
-  -with-* | --with-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=\$ac_optarg ;;
-
-  -without-* | --without-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=no ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes=$ac_optarg ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries=$ac_optarg ;;
-
-  -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; }
-    ;;
-
-  *=*)
-    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
-   { (exit 1); exit 1; }; }
-    eval $ac_envvar=\$ac_optarg
-    export $ac_envvar ;;
-
-  *)
-    # FIXME: should be removed in autoconf 3.0.
-    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
-    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { $as_echo "$as_me: error: missing argument to $ac_option" >&2
-   { (exit 1); exit 1; }; }
-fi
-
-if test -n "$ac_unrecognized_opts"; then
-  case $enable_option_checking in
-    no) ;;
-    fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
-   { (exit 1); exit 1; }; } ;;
-    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
-  esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
-		datadir sysconfdir sharedstatedir localstatedir includedir \
-		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
-do
-  eval ac_val=\$$ac_var
-  # Remove trailing slashes.
-  case $ac_val in
-    */ )
-      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
-      eval $ac_var=\$ac_val;;
-  esac
-  # Be sure to have absolute directory names.
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* )  continue;;
-    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
-  esac
-  { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; }
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
-  if test "x$build_alias" = x; then
-    cross_compiling=maybe
-    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
-  elif test "x$build_alias" != "x$host_alias"; then
-    cross_compiling=yes
-  fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  { $as_echo "$as_me: error: working directory cannot be determined" >&2
-   { (exit 1); exit 1; }; }
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
-   { (exit 1); exit 1; }; }
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then the parent directory.
-  ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_myself" : 'X\(//\)[^/]' \| \
-	 X"$as_myself" : 'X\(//\)$' \| \
-	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  srcdir=$ac_confdir
-  if test ! -r "$srcdir/$ac_unique_file"; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
-  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
-   { (exit 1); exit 1; }; }
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
-	cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
-   { (exit 1); exit 1; }; }
-	pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
-  srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
-  eval ac_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_env_${ac_var}_value=\$${ac_var}
-  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
-  # Omit some internal or obsolete options to make the list less imposing.
-  # This message is too long to be a string in the A/UX 3.1 sh.
-  cat <<_ACEOF
-\`configure' configures ossim 1.8.4 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  -h, --help              display this help and exit
-      --help=short        display options specific to this package
-      --help=recursive    display the short help of all the included packages
-  -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking...' messages
-      --cache-file=FILE   cache test results in FILE [disabled]
-  -C, --config-cache      alias for \`--cache-file=config.cache'
-  -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
-
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
-  --bindir=DIR            user executables [EPREFIX/bin]
-  --sbindir=DIR           system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR        program executables [EPREFIX/libexec]
-  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --libdir=DIR            object code libraries [EPREFIX/lib]
-  --includedir=DIR        C header files [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
-  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR           info documentation [DATAROOTDIR/info]
-  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
-  --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --docdir=DIR            documentation root [DATAROOTDIR/doc/ossim]
-  --htmldir=DIR           html documentation [DOCDIR]
-  --dvidir=DIR            dvi documentation [DOCDIR]
-  --pdfdir=DIR            pdf documentation [DOCDIR]
-  --psdir=DIR             ps documentation [DOCDIR]
-_ACEOF
-
-  cat <<\_ACEOF
-
-System types:
-  --build=BUILD     configure for building on BUILD [guessed]
-  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-  case $ac_init_help in
-     short | recursive ) echo "Configuration of ossim 1.8.4:";;
-   esac
-  cat <<\_ACEOF
-
-Optional Features:
-  --disable-option-checking  ignore unrecognized --enable/--with options
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-sharedOssimLibraries build shared ossim libraries(default=no)
-  --enable-staticOssimLibraries build static ossim libraries(default=no)
-  --enable-singleSharedOssimLibrary build single shared ossim library(default=yes)
-  --enable-singleStaticOssimLibrary build single static ossim librarie(default=no)
-  --enable-staticOssimApps build static ossim apps(default=no)
-  --disable-largefile     omit support for large files
-  --enable-debug          add debug flag
-  --enable-optimization   add optimization
-  --enable-warn_all       enable -Wall compiler option
-
-Optional Packages:
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-libtiff=ARG      Include libtiff support (ARG=no or full_path_to_libtiff)
-  --with-jpeg=ARG         Include JPEG support (ARG=no or full_path_to_jpeg)
-  --with-geotiff=ARG      Include geotiff support (ARG=no or full_path_to_geotiff)
-  --with-mpi=ARG          Include mpi support (ARG=yes or no or directory to install location)
---with-mpi-inc=DIR  MPI include path (ARG=/path/to/mpi/includes in non standard location)
---with-mpi-lib=DIR MPI lib path (ARG=/path/to/mpi/libs in none standard location)
---with-openmpi-flag=ARG OpenMPi flag(ARG=1 if openmpi, 0 if not)
-  --with-openthreads=ARG  Open threads support , ARG=yes or no or directory to install location
-  --with-freetype=ARG     Include freetype support (ARG=no or full_path_to_free)
-  --with-program_prefix=prefix
-                          add prefix to applications (default is no prefix)
-
-Some influential environment variables:
-  CC          C compiler command
-  CFLAGS      C compiler flags
-  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
-              nonstandard directory <lib dir>
-  LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
-              you have headers in a nonstandard directory <include dir>
-  CXX         C++ compiler command
-  CXXFLAGS    C++ compiler flags
-  CPP         C preprocessor
-  CXXCPP      C++ preprocessor
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-Report bugs to <http://bugzilla.remotesensing.org>.
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
-  # If there are subdirs, report their specific --help.
-  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d "$ac_dir" ||
-      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
-      continue
-    ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-    cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
-    elif test -f "$ac_srcdir/configure"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure" --help=recursive
-    else
-      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi || ac_status=$?
-    cd "$ac_pwd" || { ac_status=$?; break; }
-  done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
-  cat <<\_ACEOF
-ossim configure 1.8.4
-generated by GNU Autoconf 2.63
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
-  exit
-fi
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by ossim $as_me 1.8.4, which was
-generated by GNU Autoconf 2.63.  Invocation command line was
-
-  $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  $as_echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *\'*)
-      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
-    2)
-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-	ac_must_keep_next=false # Got value, back to normal.
-      else
-	case $ac_arg in
-	  *=* | --config-cache | -C | -disable-* | --disable-* \
-	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-	  | -with-* | --with-* | -without-* | --without-* | --x)
-	    case "$ac_configure_args0 " in
-	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-	    esac
-	    ;;
-	  -* ) ac_must_keep_next=true ;;
-	esac
-      fi
-      ac_configure_args="$ac_configure_args '$ac_arg'"
-      ;;
-    esac
-  done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
-
-    cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-(
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
-  (set) 2>&1 |
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      sed -n \
-	"s/'\''/'\''\\\\'\'''\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
-      ;; #(
-    *)
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-)
-    echo
-
-    cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
-    echo
-    for ac_var in $ac_subst_vars
-    do
-      eval ac_val=\$$ac_var
-      case $ac_val in
-      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-      esac
-      $as_echo "$ac_var='\''$ac_val'\''"
-    done | sort
-    echo
-
-    if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
-_ASBOX
-      echo
-      for ac_var in $ac_subst_files
-      do
-	eval ac_val=\$$ac_var
-	case $ac_val in
-	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-	esac
-	$as_echo "$ac_var='\''$ac_val'\''"
-      done | sort
-      echo
-    fi
-
-    if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
-      echo
-      cat confdefs.h
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      $as_echo "$as_me: caught signal $ac_signal"
-    $as_echo "$as_me: exit $exit_status"
-  } >&5
-  rm -f core *.core core.conftest.* &&
-    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
-    exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
-  ac_site_file1=$CONFIG_SITE
-elif test "x$prefix" != xNONE; then
-  ac_site_file1=$prefix/share/config.site
-  ac_site_file2=$prefix/etc/config.site
-else
-  ac_site_file1=$ac_default_prefix/share/config.site
-  ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
-  test "x$ac_site_file" = xNONE && continue
-  if test -r "$ac_site_file"; then
-    { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special
-  # files actually), so we avoid doing that.
-  if test -f "$cache_file"; then
-    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . "$cache_file";;
-      *)                      . "./$cache_file";;
-    esac
-  fi
-else
-  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
-  >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val=\$ac_cv_env_${ac_var}_value
-  eval ac_new_val=\$ac_env_${ac_var}_value
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
-    *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-	# differences in whitespace do not lead to failure.
-	ac_old_val_w=`echo x $ac_old_val`
-	ac_new_val_w=`echo x $ac_new_val`
-	if test "$ac_old_val_w" != "$ac_new_val_w"; then
-	  { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-	  ac_cache_corrupted=:
-	else
-	  { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
-	  eval $ac_var=\$ac_old_val
-	fi
-	{ $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
-$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
-	{ $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
-$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
-    *) ac_arg=$ac_var=$ac_new_val ;;
-    esac
-    case " $ac_configure_args " in
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-  { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-ac_config_headers="$ac_config_headers include/ossim/ossimConfig.h"
-
-
-OSSIM_TOP=`pwd`
-TOP=${OSSIM_TOP}
-top_builddir=${TOP}
-
-ac_aux_dir=
-for ac_dir in ${OSSIM_TOP} "$srcdir"/${OSSIM_TOP}; do
-  if test -f "$ac_dir/install-sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f "$ac_dir/install.sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  elif test -f "$ac_dir/shtool"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/shtool install -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ${OSSIM_TOP} \"$srcdir\"/${OSSIM_TOP}" >&5
-$as_echo "$as_me: error: cannot find install-sh or install.sh in ${OSSIM_TOP} \"$srcdir\"/${OSSIM_TOP}" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
-
-
-
-OSSIM_MAJOR_VERSION_NUMBER=1
-OSSIM_MINOR_VERSION_NUMBER=8
-OSSIM_RELEASE_NUMBER=4
-
-
-OSSIM_VERSION=${OSSIM_MAJOR_VERSION_NUMBER}.${OSSIM_MINOR_VERSION_NUMBER}.${OSSIM_RELEASE_NUMBER}
-
-cat >>confdefs.h <<_ACEOF
-#define OSSIM_MAJOR_VERSION_NUMBER ${OSSIM_MAJOR_VERSION_NUMBER}
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define OSSIM_MINOR_VERSION_NUMBER ${OSSIM_MINOR_VERSION_NUMBER}
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define OSSIM_RELEASE_NUMBER ${OSSIM_RELEASE_NUMBER}
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define OSSIM_VERSION "${OSSIM_VERSION}"
-_ACEOF
-
-
-
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
-  ./ | .// | /cC/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
-	  if test $ac_prog = install &&
-	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  elif test $ac_prog = install &&
-	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # program-specific install script used by HP pwplus--don't use.
-	    :
-	  else
-	    rm -rf conftest.one conftest.two conftest.dir
-	    echo one > conftest.one
-	    echo two > conftest.two
-	    mkdir conftest.dir
-	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
-	      test -s conftest.one && test -s conftest.two &&
-	      test -s conftest.dir/conftest.one &&
-	      test -s conftest.dir/conftest.two
-	    then
-	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-	      break 3
-	    fi
-	  fi
-	fi
-      done
-    done
-    ;;
-esac
-
-done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_RANLIB="ranlib"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_RANLIB" = x; then
-    RANLIB=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    RANLIB=$ac_ct_RANLIB
-  fi
-else
-  RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-
-CFLAGS=""
-CXXFLAGS=""
-BASE_DEFINES=""
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  for ac_prog in xlc gcc cl cc egcs
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in xlc gcc cl cc egcs
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
-  esac
-done
-rm -f $ac_rmfiles
-
-if { (ac_try="$ac_link_default"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link_default") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile.  We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
-	;;
-    [ab].out )
-	# We found the default executable, but exeext='' is most
-	# certainly right.
-	break;;
-    *.* )
-        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
-	then :; else
-	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	fi
-	# We set ac_cv_exeext here because the later test for it is not
-	# safe: cross compilers may not add the suffix if given an `-o'
-	# argument, so we may need to know it at that point already.
-	# Even if this section looks crufty: it has the advantage of
-	# actually working.
-	break;;
-    * )
-	break;;
-  esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
-  ac_file=''
-fi
-
-{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-if test -z "$ac_file"; then
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
-  if { ac_try='./$ac_file'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-    cross_compiling=no
-  else
-    if test "$cross_compiling" = maybe; then
-	cross_compiling=yes
-    else
-	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-    fi
-  fi
-fi
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	  break;;
-    * ) break;;
-  esac
-done
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  for ac_file in conftest.o conftest.obj conftest.*; do
-  test -f "$ac_file" || continue;
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_compiler_gnu=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_compiler_gnu=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
-   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_g=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	CFLAGS=""
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  :
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_c_werror_flag=$ac_save_c_werror_flag
-	 CFLAGS="-g"
-	 cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_g=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_c89=$ac_arg
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { $as_echo "$as_me:$LINENO: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -z "$CXX"; then
-  if test -n "$CCC"; then
-    CXX=$CCC
-  else
-    if test -n "$ac_tool_prefix"; then
-  for ac_prog in xlC g++ cl CC cxx c++ cc++ aCC egcs
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CXX"; then
-  ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
-  { $as_echo "$as_me:$LINENO: result: $CXX" >&5
-$as_echo "$CXX" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CXX" && break
-  done
-fi
-if test -z "$CXX"; then
-  ac_ct_CXX=$CXX
-  for ac_prog in xlC g++ cl CC cxx c++ cc++ aCC egcs
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CXX"; then
-  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CXX="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-$as_echo "$ac_ct_CXX" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CXX" && break
-done
-
-  if test "x$ac_ct_CXX" = x; then
-    CXX="g++"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CXX=$ac_ct_CXX
-  fi
-fi
-
-  fi
-fi
-# Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
-$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_compiler_gnu=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_compiler_gnu=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
-$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GXX=yes
-else
-  GXX=
-fi
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
-$as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
-   ac_cxx_werror_flag=yes
-   ac_cv_prog_cxx_g=no
-   CXXFLAGS="-g"
-   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cxx_g=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	CXXFLAGS=""
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  :
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-	 CXXFLAGS="-g"
-	 cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cxx_g=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
-$as_echo "$ac_cv_prog_cxx_g" >&6; }
-if test "$ac_test_CXXFLAGS" = set; then
-  CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
-  if test "$GXX" = yes; then
-    CXXFLAGS="-g -O2"
-  else
-    CXXFLAGS="-g"
-  fi
-else
-  if test "$GXX" = yes; then
-    CXXFLAGS="-O2"
-  else
-    CXXFLAGS=
-  fi
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  :
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
-fi
-
-    done
-    ac_cv_prog_CPP=$CPP
-
-fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  :
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
-$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
-if test -z "$CXXCPP"; then
-  if test "${ac_cv_prog_CXXCPP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-      # Double quotes because CXXCPP needs to be expanded
-    for CXXCPP in "$CXX -E" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  :
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
-fi
-
-    done
-    ac_cv_prog_CXXCPP=$CXXCPP
-
-fi
-  CXXCPP=$ac_cv_prog_CXXCPP
-else
-  ac_cv_prog_CXXCPP=$CXXCPP
-fi
-{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5
-$as_echo "$CXXCPP" >&6; }
-ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  :
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-# Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AR="ar"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
-  { $as_echo "$as_me:$LINENO: result: $AR" >&5
-$as_echo "$AR" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-# Extract the first word of "echo", so it can be a program name with args.
-set dummy echo; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ECHO+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ECHO"; then
-  ac_cv_prog_ECHO="$ECHO" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ECHO="echo"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_prog_ECHO" && ac_cv_prog_ECHO="echo"
-fi
-fi
-ECHO=$ac_cv_prog_ECHO
-if test -n "$ECHO"; then
-  { $as_echo "$as_me:$LINENO: result: $ECHO" >&5
-$as_echo "$ECHO" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-# Extract the first word of "rm", so it can be a program name with args.
-set dummy rm; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RM+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$RM"; then
-  ac_cv_prog_RM="$RM" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_RM="rm"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_prog_RM" && ac_cv_prog_RM="rm"
-fi
-fi
-RM=$ac_cv_prog_RM
-if test -n "$RM"; then
-  { $as_echo "$as_me:$LINENO: result: $RM" >&5
-$as_echo "$RM" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-# Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="strip"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP="strip"
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-# Extract the first word of "dirname", so it can be a program name with args.
-set dummy dirname; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DIRNAME+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$DIRNAME"; then
-  ac_cv_prog_DIRNAME="$DIRNAME" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_DIRNAME="dirname"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-DIRNAME=$ac_cv_prog_DIRNAME
-if test -n "$DIRNAME"; then
-  { $as_echo "$as_me:$LINENO: result: $DIRNAME" >&5
-$as_echo "$DIRNAME" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-# Extract the first word of "sed", so it can be a program name with args.
-set dummy sed; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_SED+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$SED"; then
-  ac_cv_prog_SED="$SED" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_SED="sed"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-SED=$ac_cv_prog_SED
-if test -n "$SED"; then
-  { $as_echo "$as_me:$LINENO: result: $SED" >&5
-$as_echo "$SED" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-# Extract the first word of "chmod", so it can be a program name with args.
-set dummy chmod; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CHMOD+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CHMOD"; then
-  ac_cv_prog_CHMOD="$CHMOD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CHMOD="chmod"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CHMOD=$ac_cv_prog_CHMOD
-if test -n "$CHMOD"; then
-  { $as_echo "$as_me:$LINENO: result: $CHMOD" >&5
-$as_echo "$CHMOD" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-
-
-
-{ $as_echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
-$as_echo_n "checking for openpty in -lutil... " >&6; }
-if test "${ac_cv_lib_util_openpty+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lutil  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char openpty ();
-int
-main ()
-{
-return openpty ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_util_openpty=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_util_openpty=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
-$as_echo "$ac_cv_lib_util_openpty" >&6; }
-if test "x$ac_cv_lib_util_openpty" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBUTIL 1
-_ACEOF
-
-  LIBS="-lutil $LIBS"
-
-fi
-
-
-{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_dl_dlopen=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_dl_dlopen=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBDL 1
-_ACEOF
-
-  LIBS="-ldl $LIBS"
-
-fi
-
-
-{ $as_echo "$as_me:$LINENO: checking for sin in -lm" >&5
-$as_echo_n "checking for sin in -lm... " >&6; }
-if test "${ac_cv_lib_m_sin+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char sin ();
-int
-main ()
-{
-return sin ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_m_sin=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_m_sin=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_sin" >&5
-$as_echo "$ac_cv_lib_m_sin" >&6; }
-if test "x$ac_cv_lib_m_sin" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBM 1
-_ACEOF
-
-  LIBS="-lm $LIBS"
-
-fi
-
-
-{ $as_echo "$as_me:$LINENO: checking for main in -lz" >&5
-$as_echo_n "checking for main in -lz... " >&6; }
-if test "${ac_cv_lib_z_main+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-
-int
-main ()
-{
-return main ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_z_main=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_z_main=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_main" >&5
-$as_echo "$ac_cv_lib_z_main" >&6; }
-if test "x$ac_cv_lib_z_main" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
-_ACEOF
-
-  LIBS="-lz $LIBS"
-
-fi
-
-
-
-{ $as_echo "$as_me:$LINENO: checking for pthread_attr_init in -lpthread" >&5
-$as_echo_n "checking for pthread_attr_init in -lpthread... " >&6; }
-if test "${ac_cv_lib_pthread_pthread_attr_init+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pthread_attr_init ();
-int
-main ()
-{
-return pthread_attr_init ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_pthread_pthread_attr_init=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_pthread_pthread_attr_init=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_attr_init" >&5
-$as_echo "$ac_cv_lib_pthread_pthread_attr_init" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_attr_init" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBPTHREAD 1
-_ACEOF
-
-  LIBS="-lpthread $LIBS"
-
-fi
-
-
-
-{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$GREP"; then
-  ac_path_GREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in grep ggrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-# Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_GREP_found && break 3
-    done
-  done
-done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-else
-  ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     if test -z "$EGREP"; then
-  ac_path_EGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in egrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_EGREP_found && break 3
-    done
-  done
-done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_EGREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-else
-  ac_cv_path_EGREP=$EGREP
-fi
-
-   fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_header_stdc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_header_stdc=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-		  inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of float" >&5
-$as_echo_n "checking size of float... " >&6; }
-if test "${ac_cv_sizeof_float+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid; break
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr $ac_mid + 1`
-			if test $ac_lo -le $ac_mid; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (float))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=$ac_mid; break
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_hi=`expr '(' $ac_mid ')' - 1`
-			if test $ac_mid -le $ac_hi; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo= ac_hi=
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_float=$ac_lo;;
-'') if test "$ac_cv_type_float" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (float)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_float=0
-   fi ;;
-esac
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-static long int longval () { return (long int) (sizeof (float)); }
-static unsigned long int ulongval () { return (long int) (sizeof (float)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (float))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (float))))
-	return 1;
-      fprintf (f, "%ld", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (float))))
-	return 1;
-      fprintf (f, "%lu", i);
-    }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
-  return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_float=`cat conftest.val`
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-if test "$ac_cv_type_float" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (float)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_float=0
-   fi
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.val
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
-$as_echo "$ac_cv_sizeof_float" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_FLOAT $ac_cv_sizeof_float
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of double" >&5
-$as_echo_n "checking size of double... " >&6; }
-if test "${ac_cv_sizeof_double+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid; break
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr $ac_mid + 1`
-			if test $ac_lo -le $ac_mid; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (double))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=$ac_mid; break
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_hi=`expr '(' $ac_mid ')' - 1`
-			if test $ac_mid -le $ac_hi; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo= ac_hi=
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_double=$ac_lo;;
-'') if test "$ac_cv_type_double" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (double)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_double=0
-   fi ;;
-esac
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-static long int longval () { return (long int) (sizeof (double)); }
-static unsigned long int ulongval () { return (long int) (sizeof (double)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (double))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (double))))
-	return 1;
-      fprintf (f, "%ld", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (double))))
-	return 1;
-      fprintf (f, "%lu", i);
-    }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
-  return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_double=`cat conftest.val`
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-if test "$ac_cv_type_double" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (double)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_double=0
-   fi
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.val
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
-$as_echo "$ac_cv_sizeof_double" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_DOUBLE $ac_cv_sizeof_double
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of long long" >&5
-$as_echo_n "checking size of long long... " >&6; }
-if test "${ac_cv_sizeof_long_long+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid; break
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr $ac_mid + 1`
-			if test $ac_lo -le $ac_mid; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=$ac_mid; break
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_hi=`expr '(' $ac_mid ')' - 1`
-			if test $ac_mid -le $ac_hi; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo= ac_hi=
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_long_long=$ac_lo;;
-'') if test "$ac_cv_type_long_long" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (long long)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_long_long=0
-   fi ;;
-esac
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-static long int longval () { return (long int) (sizeof (long long)); }
-static unsigned long int ulongval () { return (long int) (sizeof (long long)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (long long))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (long long))))
-	return 1;
-      fprintf (f, "%ld", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (long long))))
-	return 1;
-      fprintf (f, "%lu", i);
-    }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
-  return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_long_long=`cat conftest.val`
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-if test "$ac_cv_type_long_long" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (long long)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_long_long=0
-   fi
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.val
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
-$as_echo "$ac_cv_sizeof_long_long" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of long int" >&5
-$as_echo_n "checking size of long int... " >&6; }
-if test "${ac_cv_sizeof_long_int+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long int))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long int))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid; break
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr $ac_mid + 1`
-			if test $ac_lo -le $ac_mid; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long int))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long int))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=$ac_mid; break
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_hi=`expr '(' $ac_mid ')' - 1`
-			if test $ac_mid -le $ac_hi; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo= ac_hi=
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long int))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_long_int=$ac_lo;;
-'') if test "$ac_cv_type_long_int" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long int)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (long int)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_long_int=0
-   fi ;;
-esac
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-static long int longval () { return (long int) (sizeof (long int)); }
-static unsigned long int ulongval () { return (long int) (sizeof (long int)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (long int))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (long int))))
-	return 1;
-      fprintf (f, "%ld", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (long int))))
-	return 1;
-      fprintf (f, "%lu", i);
-    }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
-  return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_long_int=`cat conftest.val`
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-if test "$ac_cv_type_long_int" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long int)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (long int)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_long_int=0
-   fi
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.val
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5
-$as_echo "$ac_cv_sizeof_long_int" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of int" >&5
-$as_echo_n "checking size of int... " >&6; }
-if test "${ac_cv_sizeof_int+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid; break
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr $ac_mid + 1`
-			if test $ac_lo -le $ac_mid; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=$ac_mid; break
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_hi=`expr '(' $ac_mid ')' - 1`
-			if test $ac_mid -le $ac_hi; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo= ac_hi=
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_int=$ac_lo;;
-'') if test "$ac_cv_type_int" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (int)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_int=0
-   fi ;;
-esac
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-static long int longval () { return (long int) (sizeof (int)); }
-static unsigned long int ulongval () { return (long int) (sizeof (int)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (int))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (int))))
-	return 1;
-      fprintf (f, "%ld", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (int))))
-	return 1;
-      fprintf (f, "%lu", i);
-    }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
-  return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_int=`cat conftest.val`
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-if test "$ac_cv_type_int" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (int)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_int=0
-   fi
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.val
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
-$as_echo "$ac_cv_sizeof_int" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of short int" >&5
-$as_echo_n "checking size of short int... " >&6; }
-if test "${ac_cv_sizeof_short_int+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (short int))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (short int))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid; break
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr $ac_mid + 1`
-			if test $ac_lo -le $ac_mid; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (short int))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (short int))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=$ac_mid; break
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_hi=`expr '(' $ac_mid ')' - 1`
-			if test $ac_mid -le $ac_hi; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo= ac_hi=
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (short int))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_short_int=$ac_lo;;
-'') if test "$ac_cv_type_short_int" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short int)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (short int)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_short_int=0
-   fi ;;
-esac
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-static long int longval () { return (long int) (sizeof (short int)); }
-static unsigned long int ulongval () { return (long int) (sizeof (short int)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (short int))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (short int))))
-	return 1;
-      fprintf (f, "%ld", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (short int))))
-	return 1;
-      fprintf (f, "%lu", i);
-    }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
-  return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_short_int=`cat conftest.val`
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-if test "$ac_cv_type_short_int" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short int)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (short int)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_short_int=0
-   fi
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.val
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short_int" >&5
-$as_echo "$ac_cv_sizeof_short_int" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
-_ACEOF
-
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
-   { (exit 1); exit 1; }; }
-
-{ $as_echo "$as_me:$LINENO: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-$as_echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:$LINENO: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-$as_echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-echo "Host type:  ${host}"
-
-
-{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_header_stdc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_header_stdc=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_header in fcntl.h unistd.h dbmalloc.h dlfcn.h malloc.h getopt.h dirent.h libtar.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------------------------ ##
-## Report this to http://bugzilla.remotesensing.org ##
-## ------------------------------------------------ ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-
-fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-if test "${ac_cv_header_zlib_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
-$as_echo_n "checking for zlib.h... " >&6; }
-if test "${ac_cv_header_zlib_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
-$as_echo "$ac_cv_header_zlib_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5
-$as_echo_n "checking zlib.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <zlib.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5
-$as_echo_n "checking zlib.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <zlib.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------------------------ ##
-## Report this to http://bugzilla.remotesensing.org ##
-## ------------------------------------------------ ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
-$as_echo_n "checking for zlib.h... " >&6; }
-if test "${ac_cv_header_zlib_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_zlib_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
-$as_echo "$ac_cv_header_zlib_h" >&6; }
-
-fi
-if test "x$ac_cv_header_zlib_h" = x""yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define OSSIM_HAS_LIBZ 1
-_ACEOF
-
-fi
-
-
-
-echo "HAVE ZLIB ===================================== ${HAVE_ZLIB_H}"
-
-
-
-
-# Check whether --with-libtiff was given.
-if test "${with_libtiff+set}" = set; then
-  withval=$with_libtiff;
-fi
-
-
-  LIBTIFF_TOP=
-  LIBTIFF_INCLUDE_PATH=
-  LIBTIFF_LIB_PATH=
-  LIBTIFF_LIBS=
-
-  if test "$with_libtiff" = "no" ; then
-        { { $as_echo "$as_me:$LINENO: error: libtiff support required!" >&5
-$as_echo "$as_me: error: libtiff support required!" >&2;}
-   { (exit 1); exit 1; }; }
-  elif test "$with_libtiff" = "" ; then
-        if test -d "$OSSIM_TOP/../libtiff" ; then
-        LIBTIFF_TOP="$OSSIM_TOP/../libtiff"
-    elif test -f "/usr/local/include/tiff.h" ; then
-	LIBTIFF_TOP="/usr/local"
-    elif test -f "/usr/include/tiff.h" ; then
-	LIBTIFF_TOP="/usr"
-    elif test -f "/opt/local/include/tiff.h" ; then
-	LIBTIFF_TOP="/opt/local"
-    else
-      echo "Libtiff support disabled."
-    fi
-  else
-        LIBTIFF_TOP=$with_libtiff
-  fi
-
-  if test -d "$LIBTIFF_TOP" ; then
-        if test -f "$LIBTIFF_TOP/include/tiff.h" ; then
-	LIBTIFF_INCLUDE_PATH="-I$LIBTIFF_TOP/include"
-    elif test -f "$LIBTIFF_TOP/libtiff/tiff.h" ; then
-	LIBTIFF_INCLUDE_PATH="-I$LIBTIFF_TOP/libtiff"
-    else
-	LIBTIFF_INCLUDE_PATH="-I$LIBTIFF_TOP"
-    fi
-        if test -f "$LIBTIFF_TOP/lib/libtiff.a" ; then
-	LIBTIFF_LIB_PATH="-L$LIBTIFF_TOP/lib"
-    elif test -f "$LIBTIFF_TOP/lib/libtiff.so" ; then
-	LIBTIFF_LIB_PATH="-L$LIBTIFF_TOP/lib"
-    elif test -f "$LIBTIFF_TOP/lib64/libtiff.a" ; then
-	LIBTIFF_LIB_PATH="-L$LIBTIFF_TOP/lib64"
-    elif test -f "$LIBTIFF_TOP/lib64/libtiff.so" ; then
-	LIBTIFF_LIB_PATH="-L$LIBTIFF_TOP/lib64"
-    elif test -f "$LIBTIFF_TOP/libtiff/libtiff.a" ; then
-	LIBTIFF_LIB_PATH="-L$LIBTIFF_TOP/libtiff"
-    elif test -f "$LIBTIFF_TOP/libtiff/libtiff.so" ; then
-	LIBTIFF_LIB_PATH="-L$LIBTIFF_TOP/libtiff"
-    elif test -f "$LIBTIFF_TOP/libtiff/.libs/libtiff.a" ; then
-	LIBTIFF_LIB_PATH="-L$LIBTIFF_TOP/libtiff/.libs"
-    elif test -f "$LIBTIFF_TOP/libtiff/.libs/libtiff.so" ; then
-	LIBTIFF_LIB_PATH="-L$LIBTIFF_TOP/libtiff/.libs"
-    elif test -f "$LIBTIFF_TOP/.libs/libtiff.a" ; then
-	LIBTIFF_LIB_PATH="-L$LIBTIFF_TOP/.libs"
-    elif test -f "$LIBTIFF_TOP/.libs/libtiff.so" ; then
-	LIBTIFF_LIB_PATH="-L$LIBTIFF_TOP/.libs"
-    else
-	LIBTIFF_LIB_PATH=-L$LIBTIFF_TOP
-    fi
-
-                        if test "$LIBTIFF_LIB_PATH" = "-L/usr/lib" ; then
-      LIBTIFF_LIB_PATH=""
-    elif test "$LIBTIFF_LIB_PATH" = "-L/usr/lib64" ; then
-      LIBTIFF_LIB_PATH=""
-    fi
-
-    LIBTIFF_LIBS=-ltiff
-    echo "LIBTIFF_INCLUDE_PATH	= $LIBTIFF_INCLUDE_PATH"
-    echo "LIBTIFF_LIB_PATH	= $LIBTIFF_LIB_PATH"
-    echo "LIBTIFF_LIBS	        = $LIBTIFF_LIBS"
-  else
-    { { $as_echo "$as_me:$LINENO: error: libtiff support required!" >&5
-$as_echo "$as_me: error: libtiff support required!" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-
-  LIBTIFF_INCLUDE_PATH=$LIBTIFF_INCLUDE_PATH
-
-  LIBTIFF_LIB_PATH=$LIBTIFF_LIB_PATH
-
-  LIBTIFF_LIBS=$LIBTIFF_LIBS
-
-
-
-
-
-
-# Check whether --with-jpeg was given.
-if test "${with_jpeg+set}" = set; then
-  withval=$with_jpeg;
-fi
-
-
-  JPEG_TOP=
-  JPEG_INCLUDE_PATH=
-  JPEG_LIB_PATH=
-  JPEG_LIBS=
-
-  if test "$with_jpeg" = "no" ; then
-        echo "ERROR: no is not an option as jpeg is required!"
-    { { $as_echo "$as_me:$LINENO: error: jpeg support required!" >&5
-$as_echo "$as_me: error: jpeg support required!" >&2;}
-   { (exit 1); exit 1; }; }
-  elif test "$with_jpeg" = "" ; then
-        if test -f "$OSSIM_TOP/../jpeg/jpeglib.h" ; then
-        JPEG_TOP="$OSSIM_TOP/../jpeg"
-    elif test -f "$OSSIM_TOP/../jpeg-8a/jpeglib.h" ; then
-      JPEG_TOP="$OSSIM_TOP/../jpeg-8a"
-    elif test -f "$OSSIM_TOP/../jpeg-6b/jpeglib.h" ; then
-      JPEG_TOP="$OSSIM_TOP/../jpeg-6b"
-    elif test -f "/usr/include/jpeglib.h" ; then
-      JPEG_TOP="/usr"
-    elif test -f "/usr/local/include/jpeglib.h" ; then
-      JPEG_TOP="/usr/local"
-    elif test -f "/opt/local/include/jpeglib.h" ; then
-      JPEG_TOP="/opt/local"
-    elif test -f "/sw/include/jpeglib.h" ; then
-      JPEG_TOP="/sw"
-    else
-            echo "ERROR: JPEG_TOP not found!"
-      { { $as_echo "$as_me:$LINENO: error: jpeg support required!" >&5
-$as_echo "$as_me: error: jpeg support required!" >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-  else
-        JPEG_TOP=$with_jpeg
-  fi
-
-  echo "JPEG_TOP:  $JPEG_TOP"
-
-  if test -d "$JPEG_TOP" ; then
-        if test -f "$JPEG_TOP/include/jpeglib.h" ; then
-      JPEG_INCLUDE_PATH="-I$JPEG_TOP/include"
-    elif test -f "$JPEG_TOP/jpeglib.h" ; then
-      JPEG_INCLUDE_PATH="-I$JPEG_TOP"
-    else
-            echo "ERROR: jpeglib.h not found!"
-      { { $as_echo "$as_me:$LINENO: error: jpeg support required!" >&5
-$as_echo "$as_me: error: jpeg support required!" >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-
-        if test "$JPEG_INCLUDE_PATH" = "-I/usr/include" ; then
-      JPEG_INCLUDE_PATH=""
-    fi
-
-        if test -f "$JPEG_TOP/lib/libjpeg.a" ; then
-	JPEG_LIB_PATH="-L$JPEG_TOP/lib"
-    elif test -f "$JPEG_TOP/lib/libjpeg.dll.a" ; then
-	JPEG_LIB_PATH="-L$JPEG_TOP/lib"
-    elif test -f "$JPEG_TOP/lib/libjpeg.lib" ; then
-	JPEG_LIB_PATH="-L$JPEG_TOP/lib"
-    elif test -f "$JPEG_TOP/lib64/libjpeg.a" ; then
-	JPEG_LIB_PATH="-L$JPEG_TOP/lib64"
-    elif test -f "$JPEG_TOP/lib/libjpeg.so" ; then
-	JPEG_LIB_PATH="-L$JPEG_TOP/lib"
-    elif test -f "$JPEG_TOP/.libs/libjpeg.so" ; then
-	JPEG_LIB_PATH="-L$JPEG_TOP/lib"
-    elif test -f "$JPEG_TOP/libjpeg.a" ; then
-	JPEG_LIB_PATH="-L$JPEG_TOP"
-    elif test -f "$JPEG_TOP/libjpeg.lib" ; then
-	JPEG_LIB_PATH="-L$JPEG_TOP"
-    elif test -f "$JPEG_TOP/libjpeg.so" ; then
-	JPEG_LIB_PATH="-L$JPEG_TOP"
-    elif test -f "$JPEG_TOP/lib64/libjpeg.so" ; then
-	JPEG_LIB_PATH="-L$JPEG_TOP/lib64"
-    else
-            echo "ERROR: libjpeg not found!"
-      { { $as_echo "$as_me:$LINENO: error: jpeg support required!" >&5
-$as_echo "$as_me: error: jpeg support required!" >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-    JPEG_LIBS=-ljpeg
-
-                        if test "$JPEG_LIB_PATH" = "-L/usr/lib" ; then
-      JPEG_LIB_PATH=""
-    elif test "$JPEG_LIB_PATH" = "-L/usr/lib64" ; then
-      JPEG_LIB_PATH=""
-    fi
-
-    echo "JPEG_INCLUDE_PATH	= $JPEG_INCLUDE_PATH"
-    echo "JPEG_LIB_PATH	        = $JPEG_LIB_PATH"
-    echo "JPEG_LIBS	        = $JPEG_LIBS"
-  else
-    echo "JPEG_TOP not determined!"
-    { { $as_echo "$as_me:$LINENO: error: jpeg support required!" >&5
-$as_echo "$as_me: error: jpeg support required!" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-
-  JPEG_INCLUDE_PATH=$JPEG_INCLUDE_PATH
-
-  JPEG_LIB_PATH=$JPEG_LIB_PATH
-
-  JPEG_LIBS=$JPEG_LIBS
-
-
-
-
-
-# Check whether --with-geotiff was given.
-if test "${with_geotiff+set}" = set; then
-  withval=$with_geotiff;
-fi
-
-
-  GEOTIFF_TOP=
-  GEOTIFF_INCLUDE_PATH=
-  GEOTIFF_LIB_PATH=
-  GEOTIFF_LIBS=
-  GEOTIFF_ENABLED="0"
-
-  if test "$with_geotiff" = "no" ; then
-        echo "Geotiff support option = no"
-  elif test "$with_geotiff" = "" ; then
-            if test -d "$OSSIM_TOP/../geotiff" ; then
-      if test -f "$OSSIM_TOP/../geotiff/include/geotiff.h" ; then
-                GEOTIFF_TOP="$OSSIM_TOP/../geotiff"
-      else
-        GEOTIFF_TOP="$OSSIM_TOP/../geotiff/libgeotiff"
-      fi
-    elif test -f "/usr/local/include/geotiff.h" ; then
-	GEOTIFF_TOP="/usr/local"
-    elif test -f "/usr/include/geotiff.h" ; then
-	GEOTIFF_TOP="/usr"
-    elif test -f "/usr/include/libgeotiff/geotiff.h" ; then
-	GEOTIFF_TOP="/usr"
-    elif test -f "/usr/include/geotiff/geotiff.h" ; then
-	GEOTIFF_TOP="/usr"
-    elif test -f "/opt/local/include/geotiff.h" ; then
-	GEOTIFF_TOP="/opt/local"
-    fi
-  else
-        GEOTIFF_TOP=$with_geotiff
-  fi
-
-  if test -d $GEOTIFF_TOP && test "$GEOTIFF_TOP" != ""; then
-        if test -f "$GEOTIFF_TOP/include/geotiff.h" ; then
-      GEOTIFF_INCLUDE_PATH="-I$GEOTIFF_TOP/include"
-    elif test -f "$GEOTIFF_TOP/include/libgeotiff/geotiff.h" ; then
-      GEOTIFF_INCLUDE_PATH="-I$GEOTIFF_TOP/include/libgeotiff"
-    elif test -f "$GEOTIFF_TOP/include/geotiff/geotiff.h" ; then
-      GEOTIFF_INCLUDE_PATH="-I$GEOTIFF_TOP/include/geotiff"
-    else
-      GEOTIFF_INCLUDE_PATH="-I$GEOTIFF_TOP"
-    fi
-        if test -d "$GEOTIFF_TOP/lib" ; then
-      GEOTIFF_LIB_PATH="-L$GEOTIFF_TOP/lib"
-    elif test -d "$GEOTIFF_TOP/lib64" ; then
-	GEOTIFF_LIB_PATH="-L$GEOTIFF_TOP/lib64"
-    else
-      GEOTIFF_LIB_PATH="-L$GEOTIFF_TOP"
-    fi
-
-                        if test "$GEOTIFF_LIB_PATH" = "-L/usr/lib" ; then
-      GEOTIFF_LIB_PATH=""
-    elif test "$GEOTIFF_LIB_PATH" = "-L/usr/lib64" ; then
-      GEOTIFF_LIB_PATH=""
-    fi
-
-    GEOTIFF_LIBS=-lgeotiff
-    GEOTIFF_ENABLED="1"
-  else
-        echo "ERROR: GEOTIFF_TOP not found!"
-    { { $as_echo "$as_me:$LINENO: error: geotiff support required!" >&5
-$as_echo "$as_me: error: geotiff support required!" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-
-  echo "GEOTIFF_INCLUDE_PATH	= $GEOTIFF_INCLUDE_PATH"
-  echo "GEOTIFF_LIB_PATH	= $GEOTIFF_LIB_PATH"
-  echo "GEOTIFF_LIBS	        = $GEOTIFF_LIBS"
-  echo "GEOTIFF_ENABLED         = $GEOTIFF_ENABLED"
-
-  GEOTIFF_INCLUDE_PATH=$GEOTIFF_INCLUDE_PATH
-
-  GEOTIFF_LIB_PATH=$GEOTIFF_LIB_PATH
-
-  GEOTIFF_LIBS=$GEOTIFF_LIBS
-
-
-  if test "$GEOTIFF_ENABLED" = "1" ; then
-    cat >>confdefs.h <<\_ACEOF
-#define OSSIM_HAS_GEOTIFF 1
-_ACEOF
-
-  fi
-
-
-
-
-
-# Check whether --with-mpi was given.
-if test "${with_mpi+set}" = set; then
-  withval=$with_mpi;
-fi
-
-
-
-# Check whether --with-mpi-inc was given.
-if test "${with_mpi_inc+set}" = set; then
-  withval=$with_mpi_inc; mpi_include_path="$withval"
-else
-  mpi_include_path=""
-fi
-
-
-
-
-# Check whether --with-mpi-lib was given.
-if test "${with_mpi_lib+set}" = set; then
-  withval=$with_mpi_lib; mpi_lib_path="$withval"
-else
-  mpi_lib_path=""
-fi
-
-
-
-# Check whether --with-openmpi-flag was given.
-if test "${with_openmpi_flag+set}" = set; then
-  withval=$with_openmpi_flag; openmpi_flag="$withval"
-else
-  openmpi_flag=""
-fi
-
-
-  MPI_TOP=
-  MPI_INCLUDE_PATH=
-  MPI_INCLUDES=
-  MPI_LIBS=
-  MPI_LIB_PATH=
-  MPI_ENABLED="0"
-  OPENMPI_FOUND="0"
-
-  # Check for include path.
-  if test -n "$mpi_include_path" ; then
-    MPI_INCLUDE_PATH="$mpi_include_path"
-  fi
-
-  # Check for lib path.
-  if test -n "$mpi_lib_path" ; then
-    MPI_LIB_PATH="-L$mpi_lib_path"
-  fi
-
-  # Check for openmpi flag
-  if test -n "$openmpi_flag" ; then
-    OPENMPI_FOUND="$openmpi_flag"
-  fi
-
-  # New section for include and path in non standard place.
-  if test -n "$MPI_INCLUDE_PATH" && test -n "$MPI_LIB_PATH" ; then
-    MPI_ENABLED="1"
-    if test "$OPENMPI_FOUND" = "1" ; then
-      MPI_INCLUDES="-I$MPI_INCLUDE_PATH"
-      MPI_LIBS="-lmpi_cxx -lmpi"
-    else
-      MPI_INCLUDES="-I$MPI_INCLUDE_PATH"
-      MPI_LIBS=-llammpi++ -lmpi -llam -llammpio
-    fi
-  else
-    if test "$with_mpi" = "yes" -o "$with_mpi" = ""; then
-      if test -f "/usr/bin/lamboot" ; then
-	MPI_TOP=/usr
-      elif test -f "/usr/local/bin/lamboot" ; then
-        MPI_TOP=/usr/local
-      elif test -f "/usr/local/ossim/bin/lamboot" ; then
-        MPI_TOP=/usr/local/ossim
-      elif test -f "/opt/local/bin/lamboot" ; then
-        MPI_TOP=/opt/local
-      elif test -f "/sw/local/bin/lamboot" ; then
-        MPI_TOP=/sw/local
-      elif test -f "/usr/local/bin/mpirun" ; then
-        MPI_TOP=/usr/local
-        OPENMPI_FOUND="1"
-    fi
-    elif test "$with_mpi" != "no" ; then
-      if test -f "$with_mpi/bin/lamboot" ; then
-        MPI_TOP="$with_mpi"
-      fi
-    fi
-
-    if test "$OPENMPI_FOUND" = "1" ; then
-      MPI_LIBS="-lmpi_cxx -lmpi"
-      MPI_ENABLED="1"
-    elif test "$MPI_TOP" = "/usr" ; then
-      MPI_INCLUDES=
-      MPI_LIB_PATH=
-      if test -f "/usr/include/lam/mpi.h" ; then
-        if test -f "/usr/include/lam/32/lam_config.h" ; then
-          MPI_INCLUDES="-I/usr/include/lam -I/usr/include/lam/32"
-        else
-          MPI_INCLUDES="-I/usr/include/lam"
-        fi
-      fi
-      if test -e "/usr/lib/lam/libmpi.so" ; then
-        MPI_LIB_PATH="-L/usr/lib/lam"
-      fi
-      MPI_LIBS="-llammpi++ -lmpi -llam -llammpio"
-      MPI_ENABLED="1"
-    elif test "$MPI_TOP" != "" ; then
-            MPI_LIB_PATH="-L$MPI_TOP/lib"
-            MPI_LIBS="-llammpi++ -lmpi -llam -llammpio"
-            MPI_ENABLED="1"
-            if test -f "$MPI_TOP/include/mpi.h" ; then
-	MPI_INCLUDES="-I$MPI_TOP/include"
-      elif test -f "$MPI_TOP/include/lammpi/mpi.h" ; then
-	MPI_INCLUDES="-I$MPI_TOP/include/lammpi"
-      else
-                echo "MPI include mpi.h not found, disabled..."
-        MPI_ENABLED="0"
-      fi
-    fi
-  fi
-
-  if test "$MPI_ENABLED" = "1" ; then
-                        if test "$MPI_LIB_PATH" = "-L/usr/lib" ; then
-      MPI_LIB_PATH=""
-    elif test "$MPI_LIB_PATH" = "-L/usr/lib64" ; then
-      MPI_LIB_PATH=""
-    fi
-  fi
-
-  echo "OPENMPI_FOUND           = $OPENMPI_FOUND"
-  echo "MPI_INCLUDE_PATH        = $MPI_INCLUDE_PATH"
-  echo "MPI_INCLUDES		= $MPI_INCLUDES"
-  echo "MPI_LIB_PATH		= $MPI_LIB_PATH"
-  echo "MPI_LIBS		= $MPI_LIBS"
-  echo "MPI_ENABLED		= $MPI_ENABLED"
-
-  MPI_INCLUDES=$MPI_INCLUDES
-
-  MPI_LIB_PATH=$MPI_LIB_PATH
-
-  MPI_LIBS=$MPI_LIBS
-
-
-  if test "$MPI_ENABLED" = "1" ; then
-    cat >>confdefs.h <<\_ACEOF
-#define OSSIM_HAS_MPI 1
-_ACEOF
-
-  fi
-
-
-
-
-
-# Check whether --with-openthreads was given.
-if test "${with_openthreads+set}" = set; then
-  withval=$with_openthreads;
-fi
-
-
-  OPEN_THREADS_TOP=
-  OPEN_THREADS_INCLUDES=
-  OPEN_THREADS_LIBS=
-  OPEN_THREADS_LIB_PATH=
-  OPEN_THREADS_ENABLED="0"
-  OPEN_THREADS_FRAMEWORK="no"
-  if test "$with_openthreads" = "no" ; then
-        echo "ERROR: no is not an option as openthreads is required!"
-    { { $as_echo "$as_me:$LINENO: error: openthreads support required!" >&5
-$as_echo "$as_me: error: openthreads support required!" >&2;}
-   { (exit 1); exit 1; }; }
-  elif test "$with_openthreads" = "" ; then
-        if test -d "/Library/Frameworks/OpenThreads.framework" ; then
-	OPEN_THREADS_TOP="/Library/Frameworks/"
-	OPEN_THREADS_FRAMEWORK="yes"
-    elif test -d "$HOME/Library/Frameworks/OpenThreads.framework" ; then
-	OPEN_THREADS_TOP="$HOME/Library/Frameworks/"
-	OPEN_THREADS_FRAMEWORK="yes"
-    elif test -f "/usr/local/include/OpenThreads/Mutex" ; then
-	OPEN_THREADS_TOP="/usr/local"
-    elif test -f "/opt/local/include/OpenThreads/Mutex" ; then
-	OPEN_THREADS_TOP="/opt/local"
-    elif test -f "/sw/local/include/OpenThreads/Mutex" ; then
-	OPEN_THREADS_TOP="/sw/local"
-    elif test -f "/usr/include/OpenThreads/Mutex" ; then
-	OPEN_THREADS_TOP="/usr"
-    elif test -f "$OSSIM_TOP/../OpenThreads/include/OpenThreads/Mutex" ; then
-        OPEN_THREADS_TOP="$OSSIM_TOP/../OpenThreads"
-    fi
-  else
-        if test -d "$with_openthreads/OpenThreads.framework" ; then
-	OPEN_THREADS_TOP="$with_openthreads"
-	OPEN_THREADS_FRAMEWORK="yes"
-    else
-    	OPEN_THREADS_TOP=$with_openthreads
-	OPEN_THREADS_INCLUDES=-I$with_openthreads
-    fi
-  fi
-
-  if test "$OPEN_THREADS_FRAMEWORK" = "yes" ; then
-	OPEN_THREADS_INCLUDES="-F$OPEN_THREADS_TOP"
-	OPEN_THREADS_ENABLED="1"
-	OPEN_THREADS_LIBS="-F$OPEN_THREADS_TOP -framework OpenThreads"
-  elif test -d "$OPEN_THREADS_TOP" ; then
-    OPEN_THREADS_INCLUDES="-I$OPEN_THREADS_TOP/include"
-    OPEN_THREADS_LIBS="-lOpenThreads"
-
-        if test -f "$OPEN_THREADS_TOP/lib/Linux32/libOpenThreads.so" ; then
-      OPEN_THREADS_LIB_PATH="-L$OPEN_THREADS_TOP/lib/Linux32"
-    elif test -f "$OPEN_THREADS_TOP/lib64/libOpenThreads.so" ; then
-      OPEN_THREADS_LIB_PATH="-L$OPEN_THREADS_TOP/lib64"
-    elif test -f "$OPEN_THREADS_TOP/lib/libOpenThreads.so" ; then
-      OPEN_THREADS_LIB_PATH="-L$OPEN_THREADS_TOP/lib"
-    elif test -f "$OPEN_THREADS_TOP/lib/libOpenThreads.a" ; then
-      OPEN_THREADS_LIB_PATH="-L$OPEN_THREADS_TOP/lib"
-    elif test -f "$OPEN_THREADS_TOP/lib/OpenThreads.lib" ; then
-      OPEN_THREADS_LIB_PATH="-L$OPEN_THREADS_TOP/lib"
-    elif test -f "$OPEN_THREADS_TOP/lib/libOpenThreads.dll.a" ; then
-      OPEN_THREADS_LIB_PATH="-L$OPEN_THREADS_TOP/lib"
-    else
-            echo "ERROR: libOpenThreads not found!"
-      { { $as_echo "$as_me:$LINENO: error: OpenThreads support required!" >&5
-$as_echo "$as_me: error: OpenThreads support required!" >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-
-                        if test "$OPEN_THREADS_LIB_PATH" = "-L/usr/lib" ; then
-      OPEN_THREADS_LIB_PATH=""
-    elif test "$OPEN_THREADS_LIB_PATH" = "-L/usr/lib64" ; then
-      OPEN_THREADS_LIB_PATH=""
-    fi
-
-    OPEN_THREADS_ENABLED="1"
-  else
-    echo "OPEN_THREADS_TOP not determined!"
-    { { $as_echo "$as_me:$LINENO: error: OpenThreads support required!" >&5
-$as_echo "$as_me: error: OpenThreads support required!" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-
-  echo "OPEN_THREADS_INCLUDES   = $OPEN_THREADS_INCLUDES"
-  echo "OPEN_THREADS_LIBS       = $OPEN_THREADS_LIBS"
-  echo "OPEN_THREADS_LIB_PATH   = $OPEN_THREADS_LIB_PATH"
-  echo "OPEN_THREADS_ENABLED    = $OPEN_THREADS_ENABLED"
-
-  OPEN_THREADS_INCLUDES=$OPEN_THREADS_INCLUDES
-
-  OPEN_THREADS_LIBS=$OPEN_THREADS_LIBS
-
-  OPEN_THREADS_LIB_PATH=$OPEN_THREADS_LIB_PATH
-
-
-  if test "$OPEN_THREADS_ENABLED" = "1" ; then
-    cat >>confdefs.h <<\_ACEOF
-#define OSSIM_HAS_OPEN_THREADS 1
-_ACEOF
-
-  fi
-
-
-
-
-
-# Check whether --with-freetype was given.
-if test "${with_freetype+set}" = set; then
-  withval=$with_freetype;
-fi
-
-
-  FREETYPE_TOP=""
-  FREETYPE_INCLUDES=
-  FREETYPE_LIBS=
-  FREETYPE_LIB_PATH=
-  FREETYPE_ENABLED="0"
-
-  if test "$with_freetype" = "" ; then
-    if test -f "/usr/bin/freetype-config" ; then
-	FREETYPE_CONFIG_FOUND=1
-	FREETYPE_INCLUDES=`freetype-config --cflags`
-	FREETYPE_LIBS=`freetype-config --libs`
-	FREETYPE_LIB_PATH=-L`freetype-config --prefix`/lib
-        FREETYPE_ENABLED="1"
-    elif test -d "/usr/include/freetype2" ; then
-        FREETYPE_TOP="/usr"
-    elif test -d "/usr/local/include/freetype2" ; then
-        FREETYPE_TOP="/usr/local"
-    elif test -d "/usr/X11R6/include/freetype2" ; then
-        FREETYPE_TOP="/usr/X11R6"
-    fi
-  else
-    FREETYPE_TOP=$with_freetype
-  fi
-
-  if test "$FREETYPE_TOP" != "" ; then
-    if test -d "$FREETYPE_TOP/include/freetype2" ; then
-      FREETYPE_INCLUDES="-I$FREETYPE_TOP/include -I$FREETYPE_TOP/include/freetype2 -I$FREETYPE_TOP/include/freetype2/freetype"
-      FREETYPE_LIB_PATH="-L$FREETYPE_TOP/lib"
-      FREETYPE_LIBS="-lfreetype"
-      FREETYPE_ENABLED="1"
-    fi
-  fi
-
-            if test "$FREETYPE_LIB_PATH" = "-L/usr/lib" ; then
-    FREETYPE_LIB_PATH=""
-  elif test "$FREETYPE_LIB_PATH" = "-L/usr/lib64" ; then
-    FREETYPE_LIB_PATH=""
-  fi
-
-  echo "FREETYPE_INCLUDES	= $FREETYPE_INCLUDES"
-  echo "FREETYPE_LIB_PATH	= $FREETYPE_LIB_PATH"
-  echo "FREETYPE_LIBS		= $FREETYPE_LIBS"
-  echo "FREETYPE_ENABLED 	= $FREETYPE_ENABLED"
-
-  FREETYPE_INCLUDES=$FREETYPE_INCLUDES
-
-  FREETYPE_LIB_PATH=$FREETYPE_LIB_PATH
-
-  FREETYPE_LIBS=$FREETYPE_LIBS
-
-
-  if test "$FREETYPE_ENABLED" = "1" ; then
-    cat >>confdefs.h <<\_ACEOF
-#define OSSIM_HAS_FREETYPE 1
-_ACEOF
-
-  fi
-
-
-
-
-# Check whether --with-program_prefix was given.
-if test "${with_program_prefix+set}" = set; then
-  withval=$with_program_prefix; app_prefix=$withval
-else
-  app_prefix=
-fi
-
-
-   echo "Program prefix = $app_prefix"
-   PROGRAM_PREFIX=$app_prefix
-
-
-
-BASE_DEFINES="${BASE_DEFINES} ${GEOTIFF_DEFINES}"
-
-OSSIM_USE_UNIX=0
-OSSIM_USE_WIN32=0
-OSSIM_USE_MAC=0
-
-OSSIM_USE_CYGWIN=0
-OSSIM_USE_LINUX=0
-OSSIM_USE_SGI=
-OSSIM_USE_HPUX=
-OSSIM_USE_SYSV=
-OSSIM_USE_SVR4=
-OSSIM_USE_AIX=
-OSSIM_USE_SUN=
-OSSIM_USE_SOLARIS=
-OSSIM_USE_SUNOS=
-OSSIM_USE_ALPHA=
-OSSIM_USE_OSF=
-OSSIM_USE_BSD=
-OSSIM_USE_DARWIN=
-OSSIM_USE_MAC=
-OSSIM_USE_FREEBSD=
-OSSIM_USE_OPENBSD=
-OSSIM_USE_NETBSD=
-OSSIM_USE_VMS=
-OSSIM_USE_ULTRIX=
-TOOLKIT_VERSION=
-WIDGET_SET=
-HOST_RESULT=linux
-lib_unicode_suffix=
-lib_debug_suffix=
-OSSIM_HOST_INCLUDE=
-OSSIM_HOST_LIB=
-CARBON=
-LDFLAGS_EXE=
-LDFLAGS_APP=
-
-ossimBuildSharedLibraries="no"
-
-   	  enablestring=
-          { $as_echo "$as_me:$LINENO: checking for --${enablestring:-enable}-sharedOssimLibraries" >&5
-$as_echo_n "checking for --${enablestring:-enable}-sharedOssimLibraries... " >&6; }
-          no_cache=0
-          # Check whether --enable-sharedOssimLibraries was given.
-if test "${enable_sharedOssimLibraries+set}" = set; then
-  enableval=$enable_sharedOssimLibraries;
-                          if test "$enableval" = yes; then
-                            ac_cv_use_sharedOssimLibraries='ossimBuildSharedLibraries=yes'
-                           else
-                            ac_cv_use_sharedOssimLibraries='ossimBuildSharedLibraries=no'
-                          fi
-
-else
-
-                          ac_cv_use_sharedOssimLibraries='ossimBuildSharedLibraries=$ossimBuildSharedLibraries'
-
-
-fi
-
-
-          eval "$ac_cv_use_sharedOssimLibraries"
-
-          if test "$ossimBuildSharedLibraries" = yes; then
-            { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-          else
-            { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-          fi
-
-
-
-ossimBuildStaticLibraries="no"
-
-   	  enablestring=
-          { $as_echo "$as_me:$LINENO: checking for --${enablestring:-enable}-staticOssimLibraries" >&5
-$as_echo_n "checking for --${enablestring:-enable}-staticOssimLibraries... " >&6; }
-          no_cache=0
-          # Check whether --enable-staticOssimLibraries was given.
-if test "${enable_staticOssimLibraries+set}" = set; then
-  enableval=$enable_staticOssimLibraries;
-                          if test "$enableval" = yes; then
-                            ac_cv_use_staticOssimLibraries='ossimBuildStaticLibraries=yes'
-                           else
-                            ac_cv_use_staticOssimLibraries='ossimBuildStaticLibraries=no'
-                          fi
-
-else
-
-                          ac_cv_use_staticOssimLibraries='ossimBuildStaticLibraries=$ossimBuildStaticLibraries'
-
-
-fi
-
-
-          eval "$ac_cv_use_staticOssimLibraries"
-
-          if test "$ossimBuildStaticLibraries" = yes; then
-            { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-          else
-            { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-          fi
-
-
-
-ossimBuildSingleSharedLibrary="yes"
-
-   	  enablestring=
-          { $as_echo "$as_me:$LINENO: checking for --${enablestring:-enable}-singleSharedOssimLibrary" >&5
-$as_echo_n "checking for --${enablestring:-enable}-singleSharedOssimLibrary... " >&6; }
-          no_cache=0
-          # Check whether --enable-singleSharedOssimLibrary was given.
-if test "${enable_singleSharedOssimLibrary+set}" = set; then
-  enableval=$enable_singleSharedOssimLibrary;
-                          if test "$enableval" = yes; then
-                            ac_cv_use_singleSharedOssimLibrary='ossimBuildSingleSharedLibrary=yes'
-                           else
-                            ac_cv_use_singleSharedOssimLibrary='ossimBuildSingleSharedLibrary=no'
-                          fi
-
-else
-
-                          ac_cv_use_singleSharedOssimLibrary='ossimBuildSingleSharedLibrary=$ossimBuildSingleSharedLibrary'
-
-
-fi
-
-
-          eval "$ac_cv_use_singleSharedOssimLibrary"
-
-          if test "$ossimBuildSingleSharedLibrary" = yes; then
-            { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-          else
-            { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-          fi
-
-
-
-ossimBuildSingleStaticLibrary="no"
-
-   	  enablestring=
-          { $as_echo "$as_me:$LINENO: checking for --${enablestring:-enable}-singleStaticOssimLibrary" >&5
-$as_echo_n "checking for --${enablestring:-enable}-singleStaticOssimLibrary... " >&6; }
-          no_cache=0
-          # Check whether --enable-singleStaticOssimLibrary was given.
-if test "${enable_singleStaticOssimLibrary+set}" = set; then
-  enableval=$enable_singleStaticOssimLibrary;
-                          if test "$enableval" = yes; then
-                            ac_cv_use_singleStaticOssimLibrary='ossimBuildSingleStaticLibrary=yes'
-                           else
-                            ac_cv_use_singleStaticOssimLibrary='ossimBuildSingleStaticLibrary=no'
-                          fi
-
-else
-
-                          ac_cv_use_singleStaticOssimLibrary='ossimBuildSingleStaticLibrary=$ossimBuildSingleStaticLibrary'
-
-
-fi
-
-
-          eval "$ac_cv_use_singleStaticOssimLibrary"
-
-          if test "$ossimBuildSingleStaticLibrary" = yes; then
-            { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-          else
-            { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-          fi
-
-
-
-ossimLinkApplicationsStatic="no"
-
-   	  enablestring=
-          { $as_echo "$as_me:$LINENO: checking for --${enablestring:-enable}-staticOssimApps" >&5
-$as_echo_n "checking for --${enablestring:-enable}-staticOssimApps... " >&6; }
-          no_cache=0
-          # Check whether --enable-staticOssimApps was given.
-if test "${enable_staticOssimApps+set}" = set; then
-  enableval=$enable_staticOssimApps;
-                          if test "$enableval" = yes; then
-                            ac_cv_use_staticOssimApps='ossimLinkApplicationsStatic=yes'
-                           else
-                            ac_cv_use_staticOssimApps='ossimLinkApplicationsStatic=no'
-                          fi
-
-else
-
-                          ac_cv_use_staticOssimApps='ossimLinkApplicationsStatic=$ossimLinkApplicationsStatic'
-
-
-fi
-
-
-          eval "$ac_cv_use_staticOssimApps"
-
-          if test "$ossimLinkApplicationsStatic" = yes; then
-            { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-          else
-            { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-          fi
-
-
-
-BUILD_SHARED_OBJS="no"
-BUILD_STATIC_OBJS="no"
-BUILD_SHARED_LIBS=${ossimBuildSharedLibraries}
-BUILD_STATIC_LIBS=${ossimBuildStaticLibraries}
-BUILD_SINGLE_SHARED_LIBS=${ossimBuildSingleSharedLibrary}
-BUILD_SINGLE_STATIC_LIBS=${ossimBuildSingleStaticLibrary}
-BUILD_STATIC_APPS=${ossimLinkApplicationsStatic}
-
-
-if test "$BUILD_STATIC_LIBS"        = "no" && \
-   test "$BUILD_SHARED_LIBS"        = "no" && \
-   test "$BUILD_SINGLE_STATIC_LIBS" = "no" && \
-   test "$BUILD_SINGLE_SHARED_LIBS" = "no" ; then \
-   { { $as_echo "$as_me:$LINENO: error: \"ERROR:  Both build static and shared library disabled!\"" >&5
-$as_echo "$as_me: error: \"ERROR:  Both build static and shared library disabled!\"" >&2;}
-   { (exit 1); exit 1; }; } ;
-fi
-
-
-if test "$BUILD_STATIC_LIBS"        = "yes" || \
-   test "$BUILD_SINGLE_STATIC_LIBS" = "yes" ; then \
-   BUILD_STATIC_OBJS="yes" ;
-fi
-if test "$BUILD_SHARED_LIBS"        = "yes" || \
-   test "$BUILD_SINGLE_SHARED_LIBS" = "yes" ; then \
-   BUILD_SHARED_OBJS="yes" ;
-fi
-
-if test "$BUILD_STATIC_APPS" = "yes" && test "$BUILD_STATIC_OBJS" = "no" ; then { { $as_echo "$as_me:$LINENO: error: \"ERROR:  Cannot link apps statically if static library build is turned off!\"" >&5
-$as_echo "$as_me: error: \"ERROR:  Cannot link apps statically if static library build is turned off!\"" >&2;}
-   { (exit 1); exit 1; }; } ; fi
-
-if test "$BUILD_STATIC_APPS" = "yes" && test "$BUILD_STATIC_LIBS" = "no" && test "$BUILD_SINGLE_STATIC_LIBS" = "no" ; then { { $as_echo "$as_me:$LINENO: error: \"ERROR:  Cannot link apps statically if static library build is turned off!\"" >&5
-$as_echo "$as_me: error: \"ERROR:  Cannot link apps statically if static library build is turned off!\"" >&2;}
-   { (exit 1); exit 1; }; } ; fi
-
-if test "$BUILD_STATIC_APPS" = "yes" ; then
-  LDFLAGS_APP="-static"
-  cat >>confdefs.h <<\_ACEOF
-#define OSSIM_DYNAMIC_ENABLED 0
-_ACEOF
-
-fi
-
-SHARED_OBJ_DIR=".shared_obj"
-STATIC_OBJ_DIR=".static_obj"
-
-SO_VERSIONLESS_EXT="so"
-SO_SONAME_EXT="${SO_VERSIONLESS_EXT}.${OSSIM_MAJOR_VERSION_NUMBER}"
-SO_REALNAME_EXT="${SO_VERSIONLESS_EXT}.${OSSIM_VERSION}"
-LD_SHARED="${CXX} -shared -Wl,-soname,\$(SHARED_LIB_SONAME)"
-
-LDFLAGS=""
-PIC_FLAG="-fPIC"
-AR_FLAGS="cru"
-
-
-
-SPECIALIZED_MAKEFILE_DIR="unx"
-case "${host}" in
-  *-hp-hpux* )
-    OSSIM_USE_HPUX=1
-    NEEDS_D_REENTRANT_FOR_R_FUNCS=1
-    SO_VERSIONLESS_EXT=sl
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_HPUX__ 1
-_ACEOF
-
-    HOST_RESULT=hpux
-    SO_VERSIONLESS_EXT=sl
-  ;;
-  *-*-linux* )
-    OSSIM_USE_LINUX=1
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_LINUX__ 1
-_ACEOF
-
-    TMP=`uname -m`
-    if test "x$TMP" = "xalpha"; then
-      OSSIM_USE_ALPHA=1
-      cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_ALPHA__ 1
-_ACEOF
-
-    fi
-    HOST_RESULT=linux
-  ;;
-  *-*-irix5* | *-*-irix6* )
-    OSSIM_USE_SGI=1
-    OSSIM_USE_SVR4=1
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_SGI__ 1
-_ACEOF
-
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_SVR4__ 1
-_ACEOF
-
-    HOST_RESULT=irix
-  ;;
-  *-*-solaris2* )
-    OSSIM_USE_SUN=1
-    OSSIM_USE_SOLARIS=1
-    OSSIM_USE_SVR4=1
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_SUN__ 1
-_ACEOF
-
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_SOLARIS__ 1
-_ACEOF
-
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_SVR4__ 1
-_ACEOF
-
-    NEEDS_D_REENTRANT_FOR_R_FUNCS=1
-    HOST_RESULT=solaris
-    SPECIALIZED_MAKEFILE_DIR="solaris"
-  ;;
-  *-*-sunos4* )
-    OSSIM_USE_SUN=1
-    OSSIM_USE_SUNOS=1
-    OSSIM_USE_BSD=1
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_SUN__ 1
-_ACEOF
-
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_SUNOS__ 1
-_ACEOF
-
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_BSD__ 1
-_ACEOF
-
-    HOST_RESULT=sunos
-  ;;
-  *-*-freebsd*)
-    OSSIM_USE_BSD=1
-    OSSIM_USE_FREEBSD=1
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_FREEBSD__ 1
-_ACEOF
-
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_BSD__ 1
-_ACEOF
-
-    HOST_RESULT=freebsd
-  ;;
-  *-*-openbsd*)
-    OSSIM_USE_BSD=1
-    OSSIM_USE_OPENBSD=1
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_FREEBSD__ 1
-_ACEOF
-
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_OPENBSD__ 1
-_ACEOF
-
-    HOST_RESULT=openbsd
-  ;;
-  *-*-netbsd*)
-    OSSIM_USE_BSD=1
-    OSSIM_USE_NETBSD=1
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_FREEBSD__ 1
-_ACEOF
-
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_NETBSD__ 1
-_ACEOF
-
-    HOST_RESULT=netbsd
-  ;;
-  *-*-osf* )
-    OSSIM_USE_ALPHA=1
-    OSSIM_USE_OSF=1
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_ALPHA__ 1
-_ACEOF
-
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_OSF__ 1
-_ACEOF
-
-    NEEDS_D_REENTRANT_FOR_R_FUNCS=1
-    HOST_RESULT=osf
-  ;;
-  *-*-dgux5* )
-    OSSIM_USE_ALPHA=1
-    OSSIM_USE_SVR4=1
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_ALPHA__ 1
-_ACEOF
-
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_SVR4__ 1
-_ACEOF
-
-    HOST_RESULT=dgux5
-  ;;
-  *-*-sysv5* )
-    OSSIM_USE_SYSV=1
-    OSSIM_USE_SVR4=1
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_SYSV__ 1
-_ACEOF
-
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_SVR4__ 1
-_ACEOF
-
-    HOST_RESULT=sysv5
-  ;;
-  *-*-aix* )
-    OSSIM_USE_AIX=1
-    OSSIM_USE_SYSV=1
-    OSSIM_USE_SVR4=1
-            SO_VERSIONLESS_EXT=a
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_AIX__ 1
-_ACEOF
-
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_SYSV__ 1
-_ACEOF
-
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_SVR4__ 1
-_ACEOF
-
-    HOST_RESULT=aix
-  ;;
-
-  *-*-cygwin* )
-    SO_VERSIONLESS_EXT=dll
-    PROGRAM_EXT=".exe"
-    RESCOMP=windres
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_CYGWIN__ 1
-_ACEOF
-
-    OSSIM_USE_CYGWIN=1
-    HOST_RESULT=cygwin
-    PIC_FLAG=""
-    SPECIALIZED_MAKEFILE_DIR="cygwin"
-  ;;
-
-  *-*-mingw32* )
-    SO_VERSIONLESS_EXT=dll
-    PROGRAM_EXT=".exe"
-    RESCOMP=windres
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_CYGWIN__ 1
-_ACEOF
-
-    OSSIM_USE_CYGWIN=1
-    HOST_RESULT=mingw32
-    LDFLAGS="$LDFLAGS -Wl,--subsystem,windows -mwindows -mthreads"
-    CFLAGS="${CFLAGS} -mthreads"
-    CXXFLAGS="${CXXFLAGS} -mthreads"
-    PIC_FLAG="-DPIC"
-    SPECIALIZED_MAKEFILE_DIR="mingw"
-    LIBS="$LIBS -ljpeg"
-  ;;
-
-  *-pc-msdosdjgpp )
-    OSSIM_USE_UNIX=0
-    OSSIM_USE_DOS=1
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_DOS__ 1
-_ACEOF
-
-    PROGRAM_EXT=".exe"
-        LIBS="$LIBS -lstdc++"
-    HOST_RESULT=msdosdjgpp
-  ;;
-
-  *-pc-os2_emx | *-pc-os2-emx )
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_EMX__ 1
-_ACEOF
-
-    PROGRAM_EXT=".exe"
-    LIBS="$LIBS -lstdcpp"
-    HOST_RESULT=os2_emx
-  ;;
-
-  *-darwin* )
-        SO_VERSIONLESS_EXT="dylib"
-    SO_SONAME_EXT="${OSSIM_MAJOR_VERSION_NUMBER}.${SO_VERSIONLESS_EXT}"
-    SO_REALNAME_EXT="${OSSIM_VERSION}.${SO_VERSIONLESS_EXT}"
-    OSSIM_USE_BSD=1
-    OSSIM_USE_DARWIN=1
-    OSSIM_USE_MAC=1
-    TOOLKIT=MAC
-    SO_VERSIONLESS_EXT=dylib
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_BSD__ 1
-_ACEOF
-
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_DARWIN__ 1
-_ACEOF
-
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_POWERPC__ 1
-_ACEOF
-
-    CARBON="-DCARBON"
-    CFLAGS="${CFLAGS} -Wno-long-double -DDARWIN -DMACOSX -no-cpp-precomp"
-    CXXFLAGS="${CXXFLAGS} -Wno-long-double -DDARWIN -DMACOSX -no-cpp-precomp"
-    OSSIM_HOST_INCLUDE="${OSSIM_HOST_INCLUDE} -I/sw/include"
-    OSSIM_HOST_LIB="${OSSIM_HOST_LIB} -L/sw/lib"
-    LD_FLAGS="-dynamiclib -compatibility_version ${OSSIM_MAJOR_VERSION_NUMBER}.${OSSIM_MINOR_VERSION_NUMBER} -current_version ${OSSIM_VERSION} -install_name ${INSTALL_NAME} -single_module -undefined dynamic_lookup "
-        HOST_RESULT=darwin
-    SPECIALIZED_MAKEFILE_DIR="macosx"
-  ;;
-
-  *-*-beos* )
-        OSSIM_USE_BEOS=1
-    cat >>confdefs.h <<\_ACEOF
-#define __OSSIM_BEOS__ 1
-_ACEOF
-
-    HOST_RESULT=beos
-  ;;
-
-  *)
-    { { $as_echo "$as_me:$LINENO: error: unknown system type ${host}." >&5
-$as_echo "$as_me: error: unknown system type ${host}." >&2;}
-   { (exit 1); exit 1; }; }
-esac
-
-TOOLKIT_DIR=`echo ${TOOLKIT} | tr "[A-Z]" "[a-z]"`
-
-if test "$ac_cv_sizeof_float" = "4" ; then
-	cat >>confdefs.h <<\_ACEOF
-#define OSSIM_SIZEOF_FLOAT 4
-_ACEOF
-
-else
-	echo "WARNING: float is not 4 bytes setting to 0 bytes"
-	cat >>confdefs.h <<\_ACEOF
-#define OSSIM_SIZEOF_FLOAT 0
-_ACEOF
-
-fi
-
-if test "$ac_cv_sizeof_double" = "8" ; then
-	cat >>confdefs.h <<\_ACEOF
-#define OSSIM_SIZEOF_DOUBLE 8
-_ACEOF
-
-else
-	echo "WARNING: double is not 8 bytes setting to 0 bytes"
-	cat >>confdefs.h <<\_ACEOF
-#define OSSIM_SIZEOF_DOUBLE 0
-_ACEOF
-
-fi
-
-
-if test "$ac_cv_sizeof_long_int" = "4" ; then
-	cat >>confdefs.h <<\_ACEOF
-#define OSSIM_SIZEOF_LONG_INT 4
-_ACEOF
-
-elif test "$ac_cv_sizeof_long_int" = "8" ; then
-	cat >>confdefs.h <<\_ACEOF
-#define OSSIM_SIZEOF_LONG_INT 8
-_ACEOF
-
-else
-	echo "WARNING: long int  is not 4 or 8  bytes setting to 0 bytes"
-	cat >>confdefs.h <<\_ACEOF
-#define OSSIM_SIZEOF_DOUBLE 0
-_ACEOF
-
-fi
-
-if test "$ac_cv_sizeof_long_long" = "4" ; then
-	cat >>confdefs.h <<\_ACEOF
-#define OSSIM_SIZEOF_LONG_LONG 4
-_ACEOF
-
-elif test "$ac_cv_sizeof_long_long" = "8" ; then
-	cat >>confdefs.h <<\_ACEOF
-#define OSSIM_SIZEOF_LONG_LONG 8
-_ACEOF
-
-else
-	echo "WARNING: long long  is not 4 or 8  bytes setting to 0 bytes"
-	cat >>confdefs.h <<\_ACEOF
-#define OSSIM_SIZEOF_DOUBLE 0
-_ACEOF
-
-fi
-
-if test "$ac_cv_sizeof_short_int" = "2" ; then
-	cat >>confdefs.h <<\_ACEOF
-#define OSSIM_SIZEOF_SHORT_INT 2
-_ACEOF
-
-else
-	echo "WARNING: long int  is not 4 or 8  bytes setting to 0 bytes"
-	cat >>confdefs.h <<\_ACEOF
-#define OSSIM_SIZEOF_SHORT_INT 0
-_ACEOF
-
-fi
-
-if test "$ac_cv_sizeof_int" = "4" ; then
-	cat >>confdefs.h <<\_ACEOF
-#define OSSIM_SIZEOF_INT 4
-_ACEOF
-
-else
-	echo "WARNING: int is not 4 bytes setting to 0 bytes"
-	cat >>confdefs.h <<\_ACEOF
-#define OSSIM_SIZEOF_INT 0
-_ACEOF
-
-fi
-
-
-
-
-{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if test "${ac_cv_c_const+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
-  /* Ultrix mips cc rejects this.  */
-  typedef int charset[2];
-  const charset cs;
-  /* SunOS 4.1.1 cc rejects this.  */
-  char const *const *pcpcc;
-  char **ppc;
-  /* NEC SVR4.0.2 mips cc rejects this.  */
-  struct point {int x, y;};
-  static struct point const zero = {0,0};
-  /* AIX XL C 1.02.0.0 rejects this.
-     It does not let you subtract one const X* pointer from another in
-     an arm of an if-expression whose if-part is not a constant
-     expression */
-  const char *g = "string";
-  pcpcc = &g + (g ? g-g : 0);
-  /* HPUX 7.0 cc rejects these. */
-  ++pcpcc;
-  ppc = (char**) pcpcc;
-  pcpcc = (char const *const *) ppc;
-  { /* SCO 3.2v4 cc rejects this.  */
-    char *t;
-    char const *s = 0 ? (char *) 0 : (char const *) 0;
-
-    *t++ = 0;
-    if (s) return 0;
-  }
-  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-    int x[] = {25, 17};
-    const int *foo = &x[0];
-    ++foo;
-  }
-  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-    typedef const int *iptr;
-    iptr p = 0;
-    ++p;
-  }
-  { /* AIX XL C 1.02.0.0 rejects this saying
-       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-    struct s { int j; const int *ap[3]; };
-    struct s *b; b->j = 5;
-  }
-  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-    const int foo = 10;
-    if (!foo) return 0;
-  }
-  return !cs[0] && !zero.x;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_c_const=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_c_const=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
-if test $ac_cv_c_const = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define const /**/
-_ACEOF
-
-fi
-
-{ $as_echo "$as_me:$LINENO: checking for inline" >&5
-$as_echo_n "checking for inline... " >&6; }
-if test "${ac_cv_c_inline+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
-#endif
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_c_inline=$ac_kw
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  test "$ac_cv_c_inline" != no && break
-done
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-$as_echo "$ac_cv_c_inline" >&6; }
-
-
-case $ac_cv_c_inline in
-  inline | yes) ;;
-  *)
-    case $ac_cv_c_inline in
-      no) ac_val=;;
-      *) ac_val=$ac_cv_c_inline;;
-    esac
-    cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
-_ACEOF
-    ;;
-esac
-
-{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
-$as_echo_n "checking for size_t... " >&6; }
-if test "${ac_cv_type_size_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_type_size_t=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof (size_t))
-       return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof ((size_t)))
-	  return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  :
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_size_t=yes
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-$as_echo "$ac_cv_type_size_t" >&6; }
-if test "x$ac_cv_type_size_t" = x""yes; then
-  :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
-_ACEOF
-
-fi
-
-
-# Check whether --enable-largefile was given.
-if test "${enable_largefile+set}" = set; then
-  enableval=$enable_largefile;
-fi
-
-if test "$enable_largefile" != no; then
-            ossim_largefile=no
-
-    { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
-$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
-if test "${ac_cv_sys_file_offset_bits+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-
-          cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#define _FILE_OFFSET_BITS 64
-                          #include <sys/types.h>
-int
-main ()
-{
-typedef struct {
-    unsigned int field: sizeof(off_t) == 8;
-} wxlf;
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_sys_file_offset_bits=64
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_sys_file_offset_bits=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
-$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
-
-    if test "$ac_cv_sys_file_offset_bits" != no; then
-        ossim_largefile=yes
-        cat >>confdefs.h <<_ACEOF
-#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
-_ACEOF
-
-    fi
-
-    if test "x$ossim_largefile" != "xyes"; then
-
-    { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
-$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
-if test "${ac_cv_sys_large_files+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-
-          cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#define _LARGE_FILES 1
-                          #include <sys/types.h>
-int
-main ()
-{
-typedef struct {
-    unsigned int field: sizeof(off_t) == 8;
-} wxlf;
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_sys_large_files=1
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_sys_large_files=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
-$as_echo "$ac_cv_sys_large_files" >&6; }
-
-    if test "$ac_cv_sys_large_files" != no; then
-        ossim_largefile=yes
-        cat >>confdefs.h <<_ACEOF
-#define _LARGE_FILES $ac_cv_sys_large_files
-_ACEOF
-
-    fi
-
-    fi
-
-    { $as_echo "$as_me:$LINENO: checking if large file support is available" >&5
-$as_echo_n "checking if large file support is available... " >&6; }
-    if test "x$ossim_largefile" = "xyes"; then
-        cat >>confdefs.h <<\_ACEOF
-#define HAVE_LARGEFILE_SUPPORT 1
-_ACEOF
-
-    fi
-    { $as_echo "$as_me:$LINENO: result: $ossim_largefile" >&5
-$as_echo "$ossim_largefile" >&6; }
-fi
-
-
-if test "x$ossim_largefile" = "xyes"; then
-    if test "x$ac_cv_sys_file_offset_bits" = "x64"; then
-        OSSIM_LARGEFILE_FLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES"
-    else
-         OSSIM_LARGEFILE_FLAGS="-D_LARGE_FILES"
-     fi
-
-          BASE_DEFINES="${BASE_DEFINES} ${OSSIM_LARGEFILE_FLAGS}"
-fi
-
-if test "$OSSIM_USE_AIX" = "1"; then
-    CXXFLAGS="${CXXFLAGS}"
-        CXX="xlC"
-    CC="xlc"
-fi
-
-ossimSHARED_LIBRARY="yes"
-ossimDEBUG_FLAG="no"
-ossimOPTIMIZATION_FLAG="yes"
-ossimWARN_ALL_FLAG="yes"
-
-
-   	  enablestring=
-          { $as_echo "$as_me:$LINENO: checking for --${enablestring:-enable}-debug" >&5
-$as_echo_n "checking for --${enablestring:-enable}-debug... " >&6; }
-          no_cache=0
-          # Check whether --enable-debug was given.
-if test "${enable_debug+set}" = set; then
-  enableval=$enable_debug;
-                          if test "$enableval" = yes; then
-                            ac_cv_use_debug='ossimDEBUG_FLAG=yes'
-                           else
-                            ac_cv_use_debug='ossimDEBUG_FLAG=no'
-                          fi
-
-else
-
-                          ac_cv_use_debug='ossimDEBUG_FLAG=$ossimDEBUG_FLAG'
-
-
-fi
-
-
-          eval "$ac_cv_use_debug"
-
-          if test "$ossimDEBUG_FLAG" = yes; then
-            { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-          else
-            { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-          fi
-
-
-
-if test "$ossimDEBUG_FLAG" = "yes" ; then
-	ossimOPTIMIZATION_FLAG="no"
-fi
-
-
-   	  enablestring=
-          { $as_echo "$as_me:$LINENO: checking for --${enablestring:-enable}-optimization" >&5
-$as_echo_n "checking for --${enablestring:-enable}-optimization... " >&6; }
-          no_cache=0
-          # Check whether --enable-optimization was given.
-if test "${enable_optimization+set}" = set; then
-  enableval=$enable_optimization;
-                          if test "$enableval" = yes; then
-                            ac_cv_use_optimization='ossimOPTIMIZATION_FLAG=yes'
-                           else
-                            ac_cv_use_optimization='ossimOPTIMIZATION_FLAG=no'
-                          fi
-
-else
-
-                          ac_cv_use_optimization='ossimOPTIMIZATION_FLAG=$ossimOPTIMIZATION_FLAG'
-
-
-fi
-
-
-          eval "$ac_cv_use_optimization"
-
-          if test "$ossimOPTIMIZATION_FLAG" = yes; then
-            { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-          else
-            { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-          fi
-
-
-
-   	  enablestring=
-          { $as_echo "$as_me:$LINENO: checking for --${enablestring:-enable}-warn_all" >&5
-$as_echo_n "checking for --${enablestring:-enable}-warn_all... " >&6; }
-          no_cache=0
-          # Check whether --enable-warn_all was given.
-if test "${enable_warn_all+set}" = set; then
-  enableval=$enable_warn_all;
-                          if test "$enableval" = yes; then
-                            ac_cv_use_warn_all='ossimWARN_ALL_FLAG=yes'
-                           else
-                            ac_cv_use_warn_all='ossimWARN_ALL_FLAG=no'
-                          fi
-
-else
-
-                          ac_cv_use_warn_all='ossimWARN_ALL_FLAG=$ossimWARN_ALL_FLAG'
-
-
-fi
-
-
-          eval "$ac_cv_use_warn_all"
-
-          if test "$ossimWARN_ALL_FLAG" = yes; then
-            { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-          else
-            { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-          fi
-
-
-
-DEBUG_FLAG=""
-OPTIMIZATION_FLAG=""
-WARN_OPTION=""
-
-if test "$ossimDEBUG_FLAG" = "yes" ; then
-	DEBUG_FLAG="-g"
-else
-	DEBUG_FLAG=""
-fi
-
-if test "$ossimOPTIMIZATION_FLAG" = "yes"  ; then
-	OPTIMIZATION_FLAG="-O2"
-	case "${host}" in
-		*-darwin* )
-#			had to comment out since creates internal compile error for file
-#			vpftidx.c in vpf_util directory
-#			OPTIMIZATION_FLAG="-fast"
-			OPTIMIZATION_FLAG="-O2"
-		;;
-	      *-*-mingw32* | *-*-cygwin* )
-			OPTIMIZATION_FLAG="-O2"
-		;;
-	esac
-
-else
-	OPTIMIZATION_FLAG=""
-fi
-
-if test "$ossimWARN_ALL_FLAG" = "yes"  ; then
-	WARN_OPTION="-Wall"
-fi
-
-CFLAGS="${CFLAGS} ${WARN_OPTION} -pipe"
-CXXFLAGS="${CXXFLAGS} ${WARN_OPTION} -pipe"
-CDEBUGFLAGS="${DEBUG_FLAG} ${OPTIMIZATION_FLAG}"
-
-
-cd ${OSSIM_TOP}
-
-echo "Host:  ${host}"
-
-if test "$ossimSHARED_LIBRARY" = "yes" ; then
-
-   BUILD_SHARED=yes
-   SHARED_OBJ_DIR=.shared_obj
-
-   case "${host}" in
-      *-hp-hpux* )
-      ;;
-      *-*-linux* )
-      ;;
-      *-*-solaris2* )
-	LD_SHARED="${CXX} -shared "
-      ;;
-      *-*-sunos4* )
-	LD_SHARED="${CXX} -shared "
-      ;;
-      *-*-darwin* )
-	LD_SHARED="${CXX} -dynamiclib  -single_module -flat_namespace -undefined suppress"
-      ;;
-      *-*-aix* )
-      ;;
-      *-*-mingw32* | *-*-cygwin* )
-         LD_SHARED="dllwrap.exe --output-def \$(OSSIM_DLL_DEF) --implib \$(OSSIM_IMP_LIB) --export-all --driver-name=\$(CXX)"
-         PIC_FLAG="-DPIC"
-      ;;
-      *-*-beos* )
-         LD_SHARED="${LD} -shared"
-      ;;
-      *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | \
-                     *-*-sunos4* | \
-                     *-*-irix5* | *-*-irix6* | \
-                     *-*-osf* | \
-                     *-*-dgux5* | \
-                     *-*-sysv5* )
-			      ;;
-      *)
-         { { $as_echo "$as_me:$LINENO: error: unknown system type $host." >&5
-$as_echo "$as_me: error: unknown system type $host." >&2;}
-   { (exit 1); exit 1; }; }
-   esac
-
-fi
-
-LIBS="${LIBS}"
-
-echo "BASE_DEFINES from configure:  ${BASE_DEFINES}"
-echo "LIBS from configure:  ${LIBS}"
-
-CFLAGS="${CFLAGS} ${DEFS}"
-CXXFLAGS="${CXXFLAGS} ${DEFS}"
-
-
-if test "$OSSIM_USE_CYGWIN" = "1" ; then
- ADDITIONAL_GUI_LIBS="-lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lwsock32 -lkernel32 -luser32 -lgdi32 -lcomdlg32"
-fi
-
-INCLUDE_COMMON="include ${TOP}/Makefile.common"
-
-
-OSSIM_TOP=$OSSIM_TOP
-
-top_builddir=$top_builddir
-
-OSSIM_MAJOR_VERSION_NUMBER=$OSSIM_MAJOR_VERSION_NUMBER
-
-OSSIM_MINOR_VERSION_NUMBER=$OSSIM_MINOR_VERSION_NUMBER
-
-OSSIM_RELEASE_NUMBER=$OSSIM_RELEASE_NUMBER
-
-OSSIM_VERSION=$OSSIM_VERSION
-
-BUILD_SHARED_OBJS=$BUILD_SHARED_OBJS
-
-BUILD_STATIC_OBJS=$BUILD_STATIC_OBJS
-
-BUILD_SHARED_LIBS=$BUILD_SHARED_LIBS
-
-BUILD_STATIC_LIBS=$BUILD_STATIC_LIBS
-
-BUILD_SINGLE_SHARED_LIBS=$BUILD_SINGLE_SHARED_LIBS
-
-BUILD_SINGLE_STATIC_LIBS=$BUILD_SINGLE_STATIC_LIBS
-
-BUILD_STATIC_APPS=$BUILD_STATIC_APPS
-
-
-
-SO_VERSIONLESS_EXT=$SO_VERSIONLESS_EXT
-
-SO_SONAME_EXT=$SO_SONAME_EXT
-
-SO_REALNAME_EXT=$SO_REALNAME_EXT
-
-SHARED_LIB_FLAG=$SHARED_LIB_FLAG
-
-PIC_FLAG=$PIC_FLAG
-
-
-
-
-
-
-
-
-
-CFLAGS=$CFLAGS
-
-CXXFLAGS=$CXXFLAGS
-
-CDEBUGFLAGS=$CDEBUGFLAGS
-
-BASE_DEFINES=$BASE_DEFINES
-
-AR_FLAGS=$AR_FLAGS
-
-HOST_RESULT=$HOST_RESULT
-
-
-OPTIMIZATION_FLAG=$OPTIMIZATION_FLAG
-
-LD_SHARED=$LD_SHARED
-
-LDFLAGS=$LDFLAGS
-
-LDFLAGS_GL=$LDFLAGS_GL
-
-LDFLAGS_VERSIONING=LDFLAGS_VERSIONING
-
-LDFLAGS_EXE=$LDFLAGS_EXE
-
-LDFLAGS_APP=$LDFLAGS_APP
-
-
-
-
-
-
-
-
-ac_config_files="$ac_config_files ossim.spec Makefile.common Makefile:makefiles/${SPECIALIZED_MAKEFILE_DIR}/makeroot makelib.mak:makefiles/${SPECIALIZED_MAKEFILE_DIR}/makelib makeprog.mak:makefiles/${SPECIALIZED_MAKEFILE_DIR}/makeprog src/apps/Makefile:makefiles/unx/makeapps.unx src/Makefile:makefiles/unx/makesrc.unx src/ossim/Makefile:makefiles/${SPECIALIZED_MAKEFILE_DIR}/makelibcore src/ossim/base/Makefile:makefiles/unx/makelibbase.unx src/ossim/elevation/Makefile:makefiles/unx/makelib [...]
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
-
-  (set) 2>&1 |
-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      # `set' does not quote correctly, so add quotes (double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \).
-      sed -n \
-	"s/'/'\\\\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;; #(
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-) |
-  sed '
-     /^ac_cv_env_/b end
-     t clear
-     :clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t end
-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
-  if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
-      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
-  else
-    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
-  fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
-  # 1. Remove the extension, and $U if already installed.
-  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
-  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
-  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
-  #    will be set to the directory where LIBOBJS objects are built.
-  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""	$as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -p'
-  fi
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-	test -d "$1/.";
-      else
-	case $1 in
-	-*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-
-# Save the log message, to keep $[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by ossim $as_me 1.8.4, which was
-generated by GNU Autoconf 2.63.  Invocation command line was
-
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-case $ac_config_headers in *"
-"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
-esac
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTION]... [FILE]...
-
-  -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, then exit
-  -q, --quiet, --silent
-                   do not print progress messages
-  -d, --debug      don't remove temporary files
-      --recheck    update $as_me by reconfiguring in the same conditions
-      --file=FILE[:TEMPLATE]
-                   instantiate the configuration file FILE
-      --header=FILE[:TEMPLATE]
-                   instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Report bugs to <bug-autoconf at gnu.org>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_version="\\
-ossim config.status 1.8.4
-configured by $0, generated by GNU Autoconf 2.63,
-  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2008 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
-  case $1 in
-  --*=*)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
-    ac_shift=:
-    ;;
-  *)
-    ac_option=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  esac
-
-  case $ac_option in
-  # Handling of the options.
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    $as_echo "$ac_cs_version"; exit ;;
-  --debug | --debu | --deb | --de | --d | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
-    ac_need_defaults=false;;
-  --he | --h)
-    # Conflict between --help and --header
-    { $as_echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; };;
-  --help | --hel | -h )
-    $as_echo "$ac_cs_usage"; exit ;;
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil | --si | --s)
-    ac_cs_silent=: ;;
-
-  # This is an error.
-  -*) { $as_echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; } ;;
-
-  *) ac_config_targets="$ac_config_targets $1"
-     ac_need_defaults=false ;;
-
-  esac
-  shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
-  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-  shift
-  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
-  CONFIG_SHELL='$SHELL'
-  export CONFIG_SHELL
-  exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-  $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
-  case $ac_config_target in
-    "include/ossim/ossimConfig.h") CONFIG_HEADERS="$CONFIG_HEADERS include/ossim/ossimConfig.h" ;;
-    "ossim.spec") CONFIG_FILES="$CONFIG_FILES ossim.spec" ;;
-    "Makefile.common") CONFIG_FILES="$CONFIG_FILES Makefile.common" ;;
-    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:makefiles/${SPECIALIZED_MAKEFILE_DIR}/makeroot" ;;
-    "makelib.mak") CONFIG_FILES="$CONFIG_FILES makelib.mak:makefiles/${SPECIALIZED_MAKEFILE_DIR}/makelib" ;;
-    "makeprog.mak") CONFIG_FILES="$CONFIG_FILES makeprog.mak:makefiles/${SPECIALIZED_MAKEFILE_DIR}/makeprog" ;;
-    "src/apps/Makefile") CONFIG_FILES="$CONFIG_FILES src/apps/Makefile:makefiles/unx/makeapps.unx" ;;
-    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile:makefiles/unx/makesrc.unx" ;;
-    "src/ossim/Makefile") CONFIG_FILES="$CONFIG_FILES src/ossim/Makefile:makefiles/${SPECIALIZED_MAKEFILE_DIR}/makelibcore" ;;
-    "src/ossim/base/Makefile") CONFIG_FILES="$CONFIG_FILES src/ossim/base/Makefile:makefiles/unx/makelibbase.unx" ;;
-    "src/ossim/elevation/Makefile") CONFIG_FILES="$CONFIG_FILES src/ossim/elevation/Makefile:makefiles/unx/makelibelevation.unx" ;;
-    "src/ossim/font/Makefile") CONFIG_FILES="$CONFIG_FILES src/ossim/font/Makefile:makefiles/unx/makelibfont.unx" ;;
-    "src/ossim/imaging/Makefile") CONFIG_FILES="$CONFIG_FILES src/ossim/imaging/Makefile:makefiles/unx/makelibimaging.unx" ;;
-    "src/ossim/init/Makefile") CONFIG_FILES="$CONFIG_FILES src/ossim/init/Makefile:makefiles/unx/makelibinit.unx" ;;
-    "src/ossim/kbool/Makefile") CONFIG_FILES="$CONFIG_FILES src/ossim/kbool/Makefile:makefiles/unx/makelibkbool.unx" ;;
-    "src/ossim/matrix/Makefile") CONFIG_FILES="$CONFIG_FILES src/ossim/matrix/Makefile:makefiles/unx/makelibmatrix.unx" ;;
-    "src/ossim/parallel/Makefile") CONFIG_FILES="$CONFIG_FILES src/ossim/parallel/Makefile:makefiles/unx/makelibparallel.unx" ;;
-    "src/ossim/plugin/Makefile") CONFIG_FILES="$CONFIG_FILES src/ossim/plugin/Makefile:makefiles/unx/makelibplugin.unx" ;;
-    "src/ossim/projection/Makefile") CONFIG_FILES="$CONFIG_FILES src/ossim/projection/Makefile:makefiles/unx/makelibprojection.unx" ;;
-    "src/ossim/support_data/Makefile") CONFIG_FILES="$CONFIG_FILES src/ossim/support_data/Makefile:makefiles/unx/makelibsupportdata.unx" ;;
-    "src/ossim/vec/Makefile") CONFIG_FILES="$CONFIG_FILES src/ossim/vec/Makefile:makefiles/unx/makelibvec.unx" ;;
-    "src/ossim/vpfutil/Makefile") CONFIG_FILES="$CONFIG_FILES src/ossim/vpfutil/Makefile:makefiles/unx/makelibvpfutil.unx" ;;
-
-  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
-   { (exit 1); exit 1; }; };;
-  esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-fi
-
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
-  tmp=
-  trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
-  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=./conf$$-$RANDOM
-  (umask 077 && mkdir "$tmp")
-} ||
-{
-   $as_echo "$as_me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
-}
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr='
'
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\\r'
-else
-  ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
-_ACEOF
-
-
-{
-  echo "cat >conf$$subs.awk <<_ACEOF" &&
-  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
-  echo "_ACEOF"
-} >conf$$subs.sh ||
-  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  . ./conf$$subs.sh ||
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-
-  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
-  if test $ac_delim_n = $ac_delim_num; then
-    break
-  elif $ac_last_try; then
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\).*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\).*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
-  N
-  s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
-  for (key in S) S_is_set[key] = 1
-  FS = ""
-
-}
-{
-  line = $ 0
-  nfields = split(line, field, "@")
-  substed = 0
-  len = length(field[1])
-  for (i = 2; i < nfields; i++) {
-    key = field[i]
-    keylen = length(key)
-    if (S_is_set[key]) {
-      value = S[key]
-      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
-      len += length(value) + length(field[++i])
-      substed = 1
-    } else
-      len += 1 + keylen
-  }
-
-  print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
-  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
-  cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
-$as_echo "$as_me: error: could not setup config files machinery" >&2;}
-   { (exit 1); exit 1; }; }
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[	 ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[	 ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-# Set up the scripts for CONFIG_HEADERS section.
-# No need to generate them if there are no CONFIG_HEADERS.
-# This happens for instance with `./config.status Makefile'.
-if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
-BEGIN {
-_ACEOF
-
-# Transform confdefs.h into an awk script `defines.awk', embedded as
-# here-document in config.status, that substitutes the proper values into
-# config.h.in to produce config.h.
-
-# Create a delimiter string that does not exist in confdefs.h, to ease
-# handling of long lines.
-ac_delim='%!_!# '
-for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
-    break
-  elif $ac_last_try; then
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
-   { (exit 1); exit 1; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-
-# For the awk script, D is an array of macro values keyed by name,
-# likewise P contains macro parameters if any.  Preserve backslash
-# newline sequences.
-
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-sed -n '
-s/.\{148\}/&'"$ac_delim"'/g
-t rset
-:rset
-s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
-t def
-d
-:def
-s/\\$//
-t bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3"/p
-s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
-d
-:bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3\\\\\\n"\\/p
-t cont
-s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
-t cont
-d
-:cont
-n
-s/.\{148\}/&'"$ac_delim"'/g
-t clear
-:clear
-s/\\$//
-t bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/"/p
-d
-:bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
-b cont
-' <confdefs.h | sed '
-s/'"$ac_delim"'/"\\\
-"/g' >>$CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  for (key in D) D_is_set[key] = 1
-  FS = ""
-}
-/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
-  line = \$ 0
-  split(line, arg, " ")
-  if (arg[1] == "#") {
-    defundef = arg[2]
-    mac1 = arg[3]
-  } else {
-    defundef = substr(arg[1], 2)
-    mac1 = arg[2]
-  }
-  split(mac1, mac2, "(") #)
-  macro = mac2[1]
-  prefix = substr(line, 1, index(line, defundef) - 1)
-  if (D_is_set[macro]) {
-    # Preserve the white space surrounding the "#".
-    print prefix "define", macro P[macro] D[macro]
-    next
-  } else {
-    # Replace #undef with comments.  This is necessary, for example,
-    # in the case of _POSIX_SOURCE, which is predefined and required
-    # on some systems where configure will not decide to define it.
-    if (defundef == "undef") {
-      print "/*", prefix defundef, macro, "*/"
-      next
-    }
-  }
-}
-{ print }
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
-$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
-   { (exit 1); exit 1; }; }
-fi # test -n "$CONFIG_HEADERS"
-
-
-eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
-shift
-for ac_tag
-do
-  case $ac_tag in
-  :[FHLC]) ac_mode=$ac_tag; continue;;
-  esac
-  case $ac_mode$ac_tag in
-  :[FHL]*:*);;
-  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
-$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
-   { (exit 1); exit 1; }; };;
-  :[FH]-) ac_tag=-:-;;
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-  esac
-  ac_save_IFS=$IFS
-  IFS=:
-  set x $ac_tag
-  IFS=$ac_save_IFS
-  shift
-  ac_file=$1
-  shift
-
-  case $ac_mode in
-  :L) ac_source=$1;;
-  :[FH])
-    ac_file_inputs=
-    for ac_f
-    do
-      case $ac_f in
-      -) ac_f="$tmp/stdin";;
-      *) # Look for the file first in the build tree, then in the source tree
-	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
-	 # because $ac_f cannot contain `:'.
-	 test -f "$ac_f" ||
-	   case $ac_f in
-	   [\\/$]*) false;;
-	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
-	   esac ||
-	   { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
-   { (exit 1); exit 1; }; };;
-      esac
-      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
-      ac_file_inputs="$ac_file_inputs '$ac_f'"
-    done
-
-    # Let's still pretend it is `configure' which instantiates (i.e., don't
-    # use $as_me), people would be surprised to read:
-    #    /* config.h.  Generated by config.status.  */
-    configure_input='Generated from '`
-	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
-	`' by configure.'
-    if test x"$ac_file" != x-; then
-      configure_input="$ac_file.  $configure_input"
-      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
-    fi
-    # Neutralize special characters interpreted by sed in replacement strings.
-    case $configure_input in #(
-    *\&* | *\|* | *\\* )
-       ac_sed_conf_input=`$as_echo "$configure_input" |
-       sed 's/[\\\\&|]/\\\\&/g'`;; #(
-    *) ac_sed_conf_input=$configure_input;;
-    esac
-
-    case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; } ;;
-    esac
-    ;;
-  esac
-
-  ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$ac_file" : 'X\(//\)[^/]' \| \
-	 X"$ac_file" : 'X\(//\)$' \| \
-	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  { as_dir="$ac_dir"
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
-  ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
-  case $ac_mode in
-  :F)
-  #
-  # CONFIG_FILE
-  #
-
-  case $INSTALL in
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
-  esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-
-ac_sed_dataroot='
-/datarootdir/ {
-  p
-  q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p
-'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  ac_datarootdir_hack='
-  s&@datadir@&$datadir&g
-  s&@docdir@&$docdir&g
-  s&@infodir@&$infodir&g
-  s&@localedir@&$localedir&g
-  s&@mandir@&$mandir&g
-    s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
-  { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&2;}
-
-  rm -f "$tmp/stdin"
-  case $ac_file in
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
-  esac \
-  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
- ;;
-  :H)
-  #
-  # CONFIG_HEADER
-  #
-  if test x"$ac_file" != x-; then
-    {
-      $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
-      { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
-    else
-      rm -f "$ac_file"
-      mv "$tmp/config.h" "$ac_file" \
-	|| { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-  else
-    $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
-$as_echo "$as_me: error: could not create -" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
- ;;
-
-
-  esac
-
-done # for ac_tag
-
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
-  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded.  So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status.  When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
-  ac_cs_success=:
-  ac_config_status_args=
-  test "$silent" = yes &&
-    ac_config_status_args="$ac_config_status_args --quiet"
-  exec 5>/dev/null
-  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
-  exec 5>>config.log
-  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
-  # would make configure fail if this is the last instruction.
-  $ac_cs_success || { (exit 1); exit 1; }
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
-  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
-
-echo "  OSSIM configured settings:"
-echo "  host:                           ${host}"
-echo "  OSSIM_TOP:                      ${OSSIM_TOP}"
-echo "  top_builddir:                   ${top_builddir}"
-echo "  OSSIM_MAJOR_VERSION_NUMBER:     ${OSSIM_MAJOR_VERSION_NUMBER}"
-echo "  OSSIM_MINOR_VERSION_NUMBER:     ${OSSIM_MINOR_VERSION_NUMBER}"
-echo "  OSSIM_RELEASE_NUMBER:           ${OSSIM_RELEASE_NUMBER}"
-echo "  OSSIM_VERSION:                  ${OSSIM_VERSION}"
-echo "  BUILD_SHARED_OBJS:              ${BUILD_SHARED_OBJS}"
-echo "  BUILD_STATIC_OBJS:              ${BUILD_STATIC_OBJS}"
-echo "  BUILD_SHARED_LIBS:              ${BUILD_SHARED_LIBS}"
-echo "  BUILD_STATIC_LIBS:              ${BUILD_STATIC_LIBS}"
-echo "  BUILD_SINGLE_SHARED_LIBS:       ${BUILD_SINGLE_SHARED_LIBS}"
-echo "  BUILD_SINGLE_STATIC_LIBS:       ${BUILD_SINGLE_STATIC_LIBS}"
-echo "  BUILD_STATIC_APPS:              ${BUILD_STATIC_APPS}"
-echo "  SHARED_OBJ_DIR:                 ${SHARED_OBJ_DIR}"
-echo "  STATIC_OBJ_DIR:                 ${STATIC_OBJ_DIR}"
-echo "  SO_VERSIONLESS_EXT:             ${SO_VERSIONLESS_EXT}"
-echo "  SO_SONAME_EXT:                  ${SO_SONAME_EXT}"
-echo "  SO_REALNAME_EXT:                ${SO_REALNAME_EXT}"
-echo "  SHARED_APP_FLAG:                ${SHARED_APP_FLAG}"
-echo "  PIC_FLAG:                       ${PIC_FLAG}"
-echo "  RESCOMP:                        ${RESCOMP}"
-echo "  RESFLAGS:                       ${RESFLAGS}"
-echo "  MACOSX_BUNDLE:                  ${MACOSX_BUNDLE}"
-echo "  TOOLKIT_DIR:                    ${TOOLKIT_DIR}"
-echo "  LIBOSSIMMACRES:                 ${LIBOSSIMMACRES}"
-echo "  LIBOSSIMMACRESCOMP:             ${LIBOSSIMMACRESCOMP}"
-echo "  OSSIM_RESOURCES_MACOSX_DATA:    ${OSSIM_RESOURCES_MACOSX_DATA}"
-echo "  OSSIM_RESOURCES_MACOSX_TEXT:    ${OSSIM_RESOURCES_MACOSX_TEXT}"
-echo "  CFLAGS:                         ${CFLAGS}"
-echo "  CXXFLAGS:                       ${CXXFLAGS}"
-echo "  CDEBUGFLAGS:                    ${CDEBUGFLAGS}"
-echo "  BASE_DEFINES:                   ${BASE_DEFINES}"
-echo "  AR_FLAGS:                       ${AR_FLAGS}"
-echo "  HOST_RESULT:                    ${HOST_RESULT}"
-echo "  CARBON:                         ${CARBON}"
-echo "  OPTIMIZATION_FLAG:              ${OPTIMIZATION_FLAG}"
-echo "  LD_SHARED:                      ${LD_SHARED}"
-echo "  LDFLAGS:                        ${LDFLAGS}"
-echo "  LDFLAGS_GL:                     ${LDFLAGS_GL}"
-echo "  LDFLAGS_VERSIONING:             ${LDFLAGS_VERSIONING}"
-echo "  LDFLAGS_EXE:                    ${LDFLAGS_EXE}"
-echo "  LDFLAGS_APP:                    ${LDFLAGS_APP}"
-echo "  INSTALL:                        ${INSTALL}"
-echo "  OSSIM_VERSION:                  ${OSSIM_VERSION}"
-echo "  INCLUDE_COMMON:                 ${INCLUDE_COMMON}"
-echo "  -------------- INSTALL LOCATIONS ----------------"
-echo "  prefix(to change use --prefix):           ${prefix}"
-echo "  exec_prefix(to change use --exec_prefix): ${exec_prefix}"
-echo "  bindir(to change use --bindir):           ${bindir}"
-echo "  includedir(to change use --includedir:    ${includedir}"
-echo "  libdir(to change use --libdir):           ${libdir}"
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index a1e00a5..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,786 +0,0 @@
-dnl ---
-dnl $Id: configure.ac 16665 2010-02-24 19:01:26Z gpotts $
-dnl ---
-
-dnl Required initialization macro
-AC_INIT([ossim],[1.8.4],[http://bugzilla.remotesensing.org])
-
-dnl Configure include/ossim/ossimConfig.h from include/ossim/ossimConfig.h.in
-AC_CONFIG_HEADER(include/ossim/ossimConfig.h)
-
-OSSIM_TOP=`pwd`
-TOP=${OSSIM_TOP}
-top_builddir=${TOP}
-
-AC_CONFIG_AUX_DIR(${OSSIM_TOP})
-
-OSSIM_MAJOR_VERSION_NUMBER=1
-OSSIM_MINOR_VERSION_NUMBER=8
-OSSIM_RELEASE_NUMBER=4
-
-
-OSSIM_VERSION=${OSSIM_MAJOR_VERSION_NUMBER}.${OSSIM_MINOR_VERSION_NUMBER}.${OSSIM_RELEASE_NUMBER}
-
-AC_DEFINE_UNQUOTED(OSSIM_MAJOR_VERSION_NUMBER, ${OSSIM_MAJOR_VERSION_NUMBER} )
-AC_DEFINE_UNQUOTED(OSSIM_MINOR_VERSION_NUMBER, ${OSSIM_MINOR_VERSION_NUMBER} )
-AC_DEFINE_UNQUOTED(OSSIM_RELEASE_NUMBER, ${OSSIM_RELEASE_NUMBER} )
-AC_DEFINE_UNQUOTED(OSSIM_VERSION, "${OSSIM_VERSION}" )
-
-dnl ---
-dnl 1) Check for programs section...
-dnl ---
-
-dnl Set the "INSTALL" variable.
-AC_PROG_INSTALL
-
-dnl Set the "RANLIB" varaible.
-AC_PROG_RANLIB
-
-dnl Start with blank compiler flags and base defines.
-CFLAGS=""
-CXXFLAGS=""
-BASE_DEFINES=""
-
-dnl Set the "CC" variable.
-AC_PROG_CC(xlc gcc cl cc egcs)
-
-dnl Set the "CXX" variable.
-AC_PROG_CXX(xlC g++ cl CC cxx c++ cc++ aCC egcs)
-
-dnl Set the "CPP" variable.
-AC_PROG_CPP
-
-dnl Set the "CXXCPP" variable.  This will also set GXX to yes if using gnu.
-AC_PROG_CXXCPP
-
-dnl Set the "EXEEXT" or executable extension.
-AC_EXEEXT
-
-dnl Set the "OBJEXT" or object extension.
-AC_OBJEXT
-
-AC_CHECK_PROG(AR, ar, ar, ar)
-AC_CHECK_PROG(ECHO, echo, echo, echo)
-AC_CHECK_PROG(RM, rm, rm, rm)
-AC_CHECK_PROG(STRIP, strip, strip, strip)
-AC_CHECK_PROG(DIRNAME, dirname, dirname)
-AC_CHECK_PROG(SED, sed, sed)
-AC_CHECK_PROG(CHMOD, chmod, chmod)
-
-dnl ----
-dnl AC_CHECK_LIB will define a standard system lib variable "$(LIB)"
-dnl that will check all standard libraries
-dnl ---
-
-dnl This library may be required by Python 2.0
-AC_CHECK_LIB(util, openpty)
-AC_CHECK_LIB(dl, dlopen)
-AC_CHECK_LIB(m, sin)
-AC_CHECK_LIB(z, main)
-
-AC_CHECK_LIB(pthread, pthread_attr_init)
-dnl Now check the Size support
-
-AC_CHECK_SIZEOF(float, 4)
-AC_CHECK_SIZEOF(double, 8)
-AC_CHECK_SIZEOF(long long, 8)
-AC_CHECK_SIZEOF(long int, 4)
-AC_CHECK_SIZEOF(int, 4)
-AC_CHECK_SIZEOF(short int, 2)
-
-dnl ---
-dnl Compute the canonical host-system type variable, host, and its three 
-dnl individual parts host_cpu, host_vendor, and host_os.
-dnl host can be set with `--host` option.
-dnl ---
-AC_CANONICAL_HOST
-echo "Host type:  ${host}"
-
-dnl ---
-dnl 2) Check for headers section.
-dnl ---
-
-dnl Defines "STDC_HEADERS"
-AC_HEADER_STDC
-
-dnl If you want to check for functions (currently no checks) it would go here.
-dnl Like:  AC_CHECK_FUNCS(strchr memcpy)
-
-
-AC_CHECK_HEADERS(fcntl.h unistd.h dbmalloc.h dlfcn.h malloc.h getopt.h dirent.h libtar.h)
-AC_CHECK_HEADER(zlib.h, [AC_DEFINE(OSSIM_HAS_LIBZ)])
-
-echo "HAVE ZLIB ===================================== ${HAVE_ZLIB_H}"
-
-dnl ---
-dnl 3) Check for libraries section.
-dnl ---
-
-dnl Check for libtiff support (required)...
-OSSIM_CHECK_LIBTIFF
-
-dnl Check for jpeg support (required)...
-OSSIM_CHECK_JPEG
-
-dnl Check for geotiff support (required)...
-OSSIM_CHECK_GEOTIFF
-
-dnl Check for the mpi package (not required)...
-OSSIM_CHECK_MPI
-
-dnl Check for OpenThreads (required)...
-OSSIM_CHECK_OPEN_THREADS
-
-dnl Check for freetype package (not required)...
-OSSIM_CHECK_FREETYPE
-
-dnl Check for program prefix for apps, like prefix = ossim_ , igen = ossim_igen
-OSSIM_CHECK_PROGRAM_PREFIX
-
-BASE_DEFINES="${BASE_DEFINES} ${GEOTIFF_DEFINES}"
-
-OSSIM_USE_UNIX=0
-OSSIM_USE_WIN32=0
-OSSIM_USE_MAC=0
-
-OSSIM_USE_CYGWIN=0
-OSSIM_USE_LINUX=0
-OSSIM_USE_SGI=
-OSSIM_USE_HPUX=
-OSSIM_USE_SYSV=
-OSSIM_USE_SVR4=
-OSSIM_USE_AIX=
-OSSIM_USE_SUN=
-OSSIM_USE_SOLARIS=
-OSSIM_USE_SUNOS=
-OSSIM_USE_ALPHA=
-OSSIM_USE_OSF=
-OSSIM_USE_BSD=
-OSSIM_USE_DARWIN=
-OSSIM_USE_MAC=
-OSSIM_USE_FREEBSD=
-OSSIM_USE_OPENBSD=
-OSSIM_USE_NETBSD=
-OSSIM_USE_VMS=
-OSSIM_USE_ULTRIX=
-TOOLKIT_VERSION=
-WIDGET_SET=
-HOST_RESULT=linux
-lib_unicode_suffix=
-lib_debug_suffix=
-OSSIM_HOST_INCLUDE=
-OSSIM_HOST_LIB=
-CARBON=
-LDFLAGS_EXE=
-LDFLAGS_APP=
-
-dnl ---
-dnl Shared library variables:
-dnl Defaulted to linux behavior, override switch on host.
-dnl ---
-ossimBuildSharedLibraries="no"
-OSSIM_ARG_ENABLE(sharedOssimLibraries,   [  --enable-sharedOssimLibraries build shared ossim libraries(default=no)], ossimBuildSharedLibraries)
-                                                                              
-ossimBuildStaticLibraries="no"
-OSSIM_ARG_ENABLE(staticOssimLibraries,   [  --enable-staticOssimLibraries build static ossim libraries(default=no)], ossimBuildStaticLibraries)
-
-ossimBuildSingleSharedLibrary="yes"
-OSSIM_ARG_ENABLE(singleSharedOssimLibrary,   [  --enable-singleSharedOssimLibrary build single shared ossim library(default=yes)], ossimBuildSingleSharedLibrary)
-                                                                              
-ossimBuildSingleStaticLibrary="no"
-OSSIM_ARG_ENABLE(singleStaticOssimLibrary,   [  --enable-singleStaticOssimLibrary build single static ossim librarie(default=no)], ossimBuildSingleStaticLibrary)
-
-ossimLinkApplicationsStatic="no"
-OSSIM_ARG_ENABLE(staticOssimApps,   [  --enable-staticOssimApps build static ossim apps(default=no)], ossimLinkApplicationsStatic)
-
-BUILD_SHARED_OBJS="no"
-BUILD_STATIC_OBJS="no"
-BUILD_SHARED_LIBS=${ossimBuildSharedLibraries}
-BUILD_STATIC_LIBS=${ossimBuildStaticLibraries}
-BUILD_SINGLE_SHARED_LIBS=${ossimBuildSingleSharedLibrary}
-BUILD_SINGLE_STATIC_LIBS=${ossimBuildSingleStaticLibrary}
-BUILD_STATIC_APPS=${ossimLinkApplicationsStatic}
-
-
-dnl --- 
-dnl Do some sanity checks...  You have to build at least one library.
-dnl ---
-if test "$BUILD_STATIC_LIBS"        = "no" && \
-   test "$BUILD_SHARED_LIBS"        = "no" && \
-   test "$BUILD_SINGLE_STATIC_LIBS" = "no" && \
-   test "$BUILD_SINGLE_SHARED_LIBS" = "no" ; then \
-   AC_MSG_ERROR("ERROR:  Both build static and shared library disabled!") ; 
-fi
-
-
-dnl ---
-dnl Enable / disable object builds.
-dnl ---
-if test "$BUILD_STATIC_LIBS"        = "yes" || \
-   test "$BUILD_SINGLE_STATIC_LIBS" = "yes" ; then \
-   BUILD_STATIC_OBJS="yes" ;
-fi
-if test "$BUILD_SHARED_LIBS"        = "yes" || \
-   test "$BUILD_SINGLE_SHARED_LIBS" = "yes" ; then \
-   BUILD_SHARED_OBJS="yes" ;
-fi
-
-dnl ---
-dnl Check for trying to link static without static library.
-dnl---
-if test "$BUILD_STATIC_APPS" = "yes" && test "$BUILD_STATIC_OBJS" = "no" ; then AC_MSG_ERROR("ERROR:  Cannot link apps statically if static library build is turned off!") ; fi
-
-if test "$BUILD_STATIC_APPS" = "yes" && test "$BUILD_STATIC_LIBS" = "no" && test "$BUILD_SINGLE_STATIC_LIBS" = "no" ; then AC_MSG_ERROR("ERROR:  Cannot link apps statically if static library build is turned off!") ; fi
-
-dnl ---
-dnl Set the LDFLAG for application link.
-dnl ---
-if test "$BUILD_STATIC_APPS" = "yes" ; then 
-  LDFLAGS_APP="-static"
-  AC_DEFINE(OSSIM_DYNAMIC_ENABLED, 0)
-fi
-
-SHARED_OBJ_DIR=".shared_obj"
-STATIC_OBJ_DIR=".static_obj"
-
-SO_VERSIONLESS_EXT="so"
-SO_SONAME_EXT="${SO_VERSIONLESS_EXT}.${OSSIM_MAJOR_VERSION_NUMBER}"
-SO_REALNAME_EXT="${SO_VERSIONLESS_EXT}.${OSSIM_VERSION}"
-LD_SHARED="${CXX} -shared -Wl,-soname,\$(SHARED_LIB_SONAME)"
-
-LDFLAGS=""
-PIC_FLAG="-fPIC"
-AR_FLAGS="cru"
-
-
-dnl --------------------------------------------------------------------------
-dnl HOST specific stuff goes here...
-dnl To support a new system, you need to add its canonical name (as determined
-dnl by config.sub or specified by the configure command line) to this "case"
-dnl and also define the shared library flags below - search for
-dnl SHARED_LIB_SETUP to find the exact place
-dnl --------------------------------------------------------------------------
-
-SPECIALIZED_MAKEFILE_DIR="unx"
-case "${host}" in
-  *-hp-hpux* )
-    OSSIM_USE_HPUX=1
-    NEEDS_D_REENTRANT_FOR_R_FUNCS=1
-    SO_VERSIONLESS_EXT=sl
-    AC_DEFINE(__OSSIM_HPUX__)
-    HOST_RESULT=hpux
-    SO_VERSIONLESS_EXT=sl
-  ;;
-  *-*-linux* )
-    OSSIM_USE_LINUX=1
-    AC_DEFINE(__OSSIM_LINUX__)
-    TMP=`uname -m`
-    if test "x$TMP" = "xalpha"; then
-      OSSIM_USE_ALPHA=1
-      AC_DEFINE(__OSSIM_ALPHA__)
-    fi
-    HOST_RESULT=linux
-  ;;
-  *-*-irix5* | *-*-irix6* )
-    OSSIM_USE_SGI=1
-    OSSIM_USE_SVR4=1
-    AC_DEFINE(__OSSIM_SGI__)
-    AC_DEFINE(__OSSIM_SVR4__)
-    HOST_RESULT=irix
-  ;;
-  *-*-solaris2* )
-    OSSIM_USE_SUN=1
-    OSSIM_USE_SOLARIS=1
-    OSSIM_USE_SVR4=1
-    AC_DEFINE(__OSSIM_SUN__)
-    AC_DEFINE(__OSSIM_SOLARIS__)
-    AC_DEFINE(__OSSIM_SVR4__)
-    NEEDS_D_REENTRANT_FOR_R_FUNCS=1
-    HOST_RESULT=solaris
-    SPECIALIZED_MAKEFILE_DIR="solaris"
-  ;;
-  *-*-sunos4* )
-    OSSIM_USE_SUN=1
-    OSSIM_USE_SUNOS=1
-    OSSIM_USE_BSD=1
-    AC_DEFINE(__OSSIM_SUN__)
-    AC_DEFINE(__OSSIM_SUNOS__)
-    AC_DEFINE(__OSSIM_BSD__)
-    HOST_RESULT=sunos
-  ;;
-  *-*-freebsd*)
-    OSSIM_USE_BSD=1
-    OSSIM_USE_FREEBSD=1
-    AC_DEFINE(__OSSIM_FREEBSD__)
-    AC_DEFINE(__OSSIM_BSD__)
-    HOST_RESULT=freebsd
-  ;;
-  *-*-openbsd*)
-    OSSIM_USE_BSD=1
-    OSSIM_USE_OPENBSD=1
-    AC_DEFINE(__OSSIM_FREEBSD__)
-    AC_DEFINE(__OSSIM_OPENBSD__)
-    HOST_RESULT=openbsd
-  ;;
-  *-*-netbsd*)
-    OSSIM_USE_BSD=1
-    OSSIM_USE_NETBSD=1
-    AC_DEFINE(__OSSIM_FREEBSD__)
-    AC_DEFINE(__OSSIM_NETBSD__)
-    HOST_RESULT=netbsd
-  ;;
-  *-*-osf* )
-    OSSIM_USE_ALPHA=1
-    OSSIM_USE_OSF=1
-    AC_DEFINE(__OSSIM_ALPHA__)
-    AC_DEFINE(__OSSIM_OSF__)
-    NEEDS_D_REENTRANT_FOR_R_FUNCS=1
-    HOST_RESULT=osf
-  ;;
-  *-*-dgux5* )
-    OSSIM_USE_ALPHA=1
-    OSSIM_USE_SVR4=1
-    AC_DEFINE(__OSSIM_ALPHA__)
-    AC_DEFINE(__OSSIM_SVR4__)
-    HOST_RESULT=dgux5
-  ;;
-  *-*-sysv5* )
-    OSSIM_USE_SYSV=1
-    OSSIM_USE_SVR4=1
-    AC_DEFINE(__OSSIM_SYSV__)
-    AC_DEFINE(__OSSIM_SVR4__)
-    HOST_RESULT=sysv5
-  ;;
-  *-*-aix* )
-    OSSIM_USE_AIX=1
-    OSSIM_USE_SYSV=1
-    OSSIM_USE_SVR4=1
-    dnl Irvin Probst <irvin.probst at fr.thalesgroup.com> reports that the shared
-    dnl libraries under AIX have the same suffix as the normal ones
-    SO_VERSIONLESS_EXT=a
-    AC_DEFINE(__OSSIM_AIX__)
-    AC_DEFINE(__OSSIM_SYSV__)
-    AC_DEFINE(__OSSIM_SVR4__)
-    HOST_RESULT=aix
-  ;;
-
-  *-*-cygwin* )
-    SO_VERSIONLESS_EXT=dll
-    PROGRAM_EXT=".exe"
-    RESCOMP=windres
-    AC_DEFINE(__OSSIM_CYGWIN__)
-    OSSIM_USE_CYGWIN=1
-    HOST_RESULT=cygwin
-    PIC_FLAG=""
-    SPECIALIZED_MAKEFILE_DIR="cygwin"
-  ;;
-  
-  *-*-mingw32* )
-    SO_VERSIONLESS_EXT=dll
-    PROGRAM_EXT=".exe"
-    RESCOMP=windres
-    AC_DEFINE(__OSSIM_CYGWIN__)
-    OSSIM_USE_CYGWIN=1
-    HOST_RESULT=mingw32
-    LDFLAGS="$LDFLAGS -Wl,--subsystem,windows -mwindows -mthreads"
-    CFLAGS="${CFLAGS} -mthreads"
-    CXXFLAGS="${CXXFLAGS} -mthreads"
-    PIC_FLAG="-DPIC"
-    SPECIALIZED_MAKEFILE_DIR="mingw"
-    LIBS="$LIBS -ljpeg"
-  ;;
-
-  *-pc-msdosdjgpp )
-    OSSIM_USE_UNIX=0
-    OSSIM_USE_DOS=1
-    AC_DEFINE(__OSSIM_DOS__)
-    PROGRAM_EXT=".exe"
-    dnl DJGPP needs explicit -lstdc++ for some reason (VS: mayb some versions only?)
-    LIBS="$LIBS -lstdc++"
-    HOST_RESULT=msdosdjgpp
-  ;;
-
-  *-pc-os2_emx | *-pc-os2-emx )
-    AC_DEFINE(__OSSIM_EMX__)
-    PROGRAM_EXT=".exe"
-    LIBS="$LIBS -lstdcpp"
-    HOST_RESULT=os2_emx
-  ;;
-
-  *-darwin* )
-    dnl PowerPC Darwin based distributions (including Mac OS X)
-    SO_VERSIONLESS_EXT="dylib"
-    SO_SONAME_EXT="${OSSIM_MAJOR_VERSION_NUMBER}.${SO_VERSIONLESS_EXT}"
-    SO_REALNAME_EXT="${OSSIM_VERSION}.${SO_VERSIONLESS_EXT}"
-    OSSIM_USE_BSD=1
-    OSSIM_USE_DARWIN=1
-    OSSIM_USE_MAC=1
-    TOOLKIT=MAC
-    SO_VERSIONLESS_EXT=dylib
-    AC_DEFINE(__OSSIM_BSD__)
-    AC_DEFINE(__OSSIM_DARWIN__)
-    AC_DEFINE(__OSSIM_POWERPC__)
-    CARBON="-DCARBON"
-    CFLAGS="${CFLAGS} -Wno-long-double -DDARWIN -DMACOSX -no-cpp-precomp"
-    CXXFLAGS="${CXXFLAGS} -Wno-long-double -DDARWIN -DMACOSX -no-cpp-precomp"
-    OSSIM_HOST_INCLUDE="${OSSIM_HOST_INCLUDE} -I/sw/include"
-    OSSIM_HOST_LIB="${OSSIM_HOST_LIB} -L/sw/lib"
-    LD_FLAGS="-dynamiclib -compatibility_version ${OSSIM_MAJOR_VERSION_NUMBER}.${OSSIM_MINOR_VERSION_NUMBER} -current_version ${OSSIM_VERSION} -install_name ${INSTALL_NAME} -single_module -undefined dynamic_lookup "
-    dnl SO_VERSIONLESS_EXT="dylib"
-    HOST_RESULT=darwin
-    SPECIALIZED_MAKEFILE_DIR="macosx"
-  ;;
-
-  *-*-beos* )
-    dnl leave OSSIM_USE_UNIX on - BeOS is sufficiently Unix-like for this
-    OSSIM_USE_BEOS=1
-    AC_DEFINE(__OSSIM_BEOS__)
-    HOST_RESULT=beos
-  ;;
-
-  *)
-    AC_MSG_ERROR(unknown system type ${host}.)
-esac
-
-TOOLKIT_DIR=`echo ${TOOLKIT} | tr "[[A-Z]]" "[[a-z]]"`
-
-if test "$ac_cv_sizeof_float" = "4" ; then
-	AC_DEFINE(OSSIM_SIZEOF_FLOAT, 4)
-else
-	echo "WARNING: float is not 4 bytes setting to 0 bytes"
-	AC_DEFINE(OSSIM_SIZEOF_FLOAT, 0)
-fi
-
-if test "$ac_cv_sizeof_double" = "8" ; then
-	AC_DEFINE(OSSIM_SIZEOF_DOUBLE, 8)
-else
-	echo "WARNING: double is not 8 bytes setting to 0 bytes"
-	AC_DEFINE(OSSIM_SIZEOF_DOUBLE, 0)
-fi
-
-
-if test "$ac_cv_sizeof_long_int" = "4" ; then
-	AC_DEFINE(OSSIM_SIZEOF_LONG_INT, 4)
-elif test "$ac_cv_sizeof_long_int" = "8" ; then
-	AC_DEFINE(OSSIM_SIZEOF_LONG_INT, 8)
-else
-	echo "WARNING: long int  is not 4 or 8  bytes setting to 0 bytes"
-	AC_DEFINE(OSSIM_SIZEOF_DOUBLE, 0)
-fi
-
-if test "$ac_cv_sizeof_long_long" = "4" ; then
-	AC_DEFINE(OSSIM_SIZEOF_LONG_LONG, 4)
-elif test "$ac_cv_sizeof_long_long" = "8" ; then
-	AC_DEFINE(OSSIM_SIZEOF_LONG_LONG, 8)
-else 
-	echo "WARNING: long long  is not 4 or 8  bytes setting to 0 bytes"
-	AC_DEFINE(OSSIM_SIZEOF_DOUBLE, 0)
-fi
-
-if test "$ac_cv_sizeof_short_int" = "2" ; then
-	AC_DEFINE(OSSIM_SIZEOF_SHORT_INT, 2)
-else
-	echo "WARNING: long int  is not 4 or 8  bytes setting to 0 bytes"
-	AC_DEFINE(OSSIM_SIZEOF_SHORT_INT, 0)
-fi
-
-if test "$ac_cv_sizeof_int" = "4" ; then
-	AC_DEFINE(OSSIM_SIZEOF_INT, 4)
-else
-	echo "WARNING: int is not 4 bytes setting to 0 bytes"
-	AC_DEFINE(OSSIM_SIZEOF_INT, 0)
-fi
-
-
-
-dnl We really need a relatively recent libtiff, at least a 3.5.x version.
-dnl AC_CHECK_LIB(tiff, TIFFReadRGBATile)
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_C_INLINE
-AC_TYPE_SIZE_T
-
-AC_SYS_LARGEFILE
-
-if test "x$ossim_largefile" = "xyes"; then
-    if test "x$ac_cv_sys_file_offset_bits" = "x64"; then
-        OSSIM_LARGEFILE_FLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES"
-    else
-         OSSIM_LARGEFILE_FLAGS="-D_LARGE_FILES"
-     fi
- 
-     dnl Added to base defines.
-     BASE_DEFINES="${BASE_DEFINES} ${OSSIM_LARGEFILE_FLAGS}"
-fi
-
-dnl CXXFLAG getting wiped slick up above somewhere so set this again...
-if test "$OSSIM_USE_AIX" = "1"; then
-    CXXFLAGS="${CXXFLAGS}"
-    dnl Use the native compiler over gcc...
-    CXX="xlC"
-    CC="xlc"
-fi
-
-ossimSHARED_LIBRARY="yes"
-ossimDEBUG_FLAG="no"
-ossimOPTIMIZATION_FLAG="yes"
-ossimWARN_ALL_FLAG="yes"
-
-OSSIM_ARG_ENABLE(debug,       [  --enable-debug          add debug flag], ossimDEBUG_FLAG)
-
-dnl If debug is set above default the ossimOPTIMIZATION_FLAG to no...
-dnl They can still turn optimization on with the next line.
-if test "$ossimDEBUG_FLAG" = "yes" ; then
-	ossimOPTIMIZATION_FLAG="no"
-fi
-
-OSSIM_ARG_ENABLE(optimization,[  --enable-optimization   add optimization], ossimOPTIMIZATION_FLAG)
-OSSIM_ARG_ENABLE(warn_all,    [  --enable-warn_all       enable -Wall compiler option], ossimWARN_ALL_FLAG)
-
-DEBUG_FLAG=""
-OPTIMIZATION_FLAG=""
-WARN_OPTION=""
-
-if test "$ossimDEBUG_FLAG" = "yes" ; then
-	DEBUG_FLAG="-g"
-else
-	DEBUG_FLAG=""
-fi
-
-dnl -------------------------
-dnl NOTE:
-dnl The -O3 flag has given us grief with the templates on older gcc compilers
-dnl (3.2 in particular); hence, back to -O2...
-dnl 
-dnl You can override at make time with: "make CDEBUGFLAGS=-O3"
-dnl -------------------------
-if test "$ossimOPTIMIZATION_FLAG" = "yes"  ; then
-	OPTIMIZATION_FLAG="-O2"
-	case "${host}" in
-		*-darwin* )
-#			had to comment out since creates internal compile error for file
-#			vpftidx.c in vpf_util directory
-#			OPTIMIZATION_FLAG="-fast"
-			OPTIMIZATION_FLAG="-O2"
-		;;
-	      *-*-mingw32* | *-*-cygwin* )
-			OPTIMIZATION_FLAG="-O2"
-		;;
-	esac
-
-else
-	OPTIMIZATION_FLAG=""
-fi
-
-if test "$ossimWARN_ALL_FLAG" = "yes"  ; then
-	WARN_OPTION="-Wall"
-fi
-
-CFLAGS="${CFLAGS} ${WARN_OPTION} -pipe"
-CXXFLAGS="${CXXFLAGS} ${WARN_OPTION} -pipe"
-CDEBUGFLAGS="${DEBUG_FLAG} ${OPTIMIZATION_FLAG}"
-
-dnl OSSIM_CONFIGURE_PACKAGES
-
-cd ${OSSIM_TOP}
-
-echo "Host:  ${host}"
-
-if test "$ossimSHARED_LIBRARY" = "yes" ; then
-
-   BUILD_SHARED=yes
-   SHARED_OBJ_DIR=.shared_obj
-
-   case "${host}" in
-      *-hp-hpux* )
-      ;;
-      *-*-linux* )
-      ;;
-      *-*-solaris2* )
-	LD_SHARED="${CXX} -shared "
-      ;;
-      *-*-sunos4* )
-	LD_SHARED="${CXX} -shared "
-      ;;
-      *-*-darwin* )
-	LD_SHARED="${CXX} -dynamiclib  -single_module -flat_namespace -undefined suppress"
-      ;;
-      *-*-aix* )
-      ;;
-      *-*-mingw32* | *-*-cygwin* )
-         LD_SHARED="dllwrap.exe --output-def \$(OSSIM_DLL_DEF) --implib \$(OSSIM_IMP_LIB) --export-all --driver-name=\$(CXX)"
-         PIC_FLAG="-DPIC"
-      ;;
-      *-*-beos* )
-         LD_SHARED="${LD} -shared"
-      ;;
-      *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | \
-                     *-*-sunos4* | \
-                     *-*-irix5* | *-*-irix6* | \
-                     *-*-osf* | \
-                     *-*-dgux5* | \
-                     *-*-sysv5* )
-			dnl defaults are ok
-      ;;
-      *)
-         AC_MSG_ERROR(unknown system type $host.)
-   esac
-	
-fi
-
-dnl ---
-dnl Add pthread needed by static build right now.  
-dnl We should add a test for this perhaps(drb).
-dnl ---
-LIBS="${LIBS}"
-
-echo "BASE_DEFINES from configure:  ${BASE_DEFINES}"
-echo "LIBS from configure:  ${LIBS}"
-
-CFLAGS="${CFLAGS} ${DEFS}"
-CXXFLAGS="${CXXFLAGS} ${DEFS}"
-
-dnl
-dnl  Now setup the ossim-config file for install locations
-dnl  
-
-if test "$OSSIM_USE_CYGWIN" = "1" ; then
- ADDITIONAL_GUI_LIBS="-lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lwsock32 -lkernel32 -luser32 -lgdi32 -lcomdlg32"
-fi
-
-INCLUDE_COMMON="include ${TOP}/Makefile.common"
-
-dnl _____________________ START DOING SOME SUBSTITUTIONS _________________
-dnl
-dnl
-
-AC_SUBST(OSSIM_TOP, $OSSIM_TOP)
-AC_SUBST(top_builddir, $top_builddir)
-AC_SUBST(OSSIM_MAJOR_VERSION_NUMBER, $OSSIM_MAJOR_VERSION_NUMBER)
-AC_SUBST(OSSIM_MINOR_VERSION_NUMBER, $OSSIM_MINOR_VERSION_NUMBER)
-AC_SUBST(OSSIM_RELEASE_NUMBER, $OSSIM_RELEASE_NUMBER)
-AC_SUBST(OSSIM_VERSION, $OSSIM_VERSION)
-AC_SUBST(BUILD_SHARED_OBJS, $BUILD_SHARED_OBJS)
-AC_SUBST(BUILD_STATIC_OBJS, $BUILD_STATIC_OBJS)
-AC_SUBST(BUILD_SHARED_LIBS, $BUILD_SHARED_LIBS)
-AC_SUBST(BUILD_STATIC_LIBS, $BUILD_STATIC_LIBS)
-AC_SUBST(BUILD_SINGLE_SHARED_LIBS, $BUILD_SINGLE_SHARED_LIBS)
-AC_SUBST(BUILD_SINGLE_STATIC_LIBS, $BUILD_SINGLE_STATIC_LIBS)
-AC_SUBST(BUILD_STATIC_APPS, $BUILD_STATIC_APPS)
-AC_SUBST(SHARED_OBJ_DIR)
-AC_SUBST(STATIC_OBJ_DIR)
-AC_SUBST(SO_VERSIONLESS_EXT, $SO_VERSIONLESS_EXT)
-AC_SUBST(SO_SONAME_EXT, $SO_SONAME_EXT)
-AC_SUBST(SO_REALNAME_EXT, $SO_REALNAME_EXT)
-AC_SUBST(SHARED_LIB_FLAG, $SHARED_LIB_FLAG)
-AC_SUBST(PIC_FLAG, $PIC_FLAG)
-AC_SUBST(RESCOMP)
-AC_SUBST(RESFLAGS)
-AC_SUBST(MACOSX_BUNDLE)
-AC_SUBST(TOOLKIT_DIR)
-AC_SUBST(LIBOSSIMMACRES)
-AC_SUBST(LIBOSSIMMACRESCOMP)
-AC_SUBST(OSSIM_RESOURCES_MACOSX_DATA)
-AC_SUBST(OSSIM_RESOURCES_MACOSX_TEXT)
-AC_SUBST(CFLAGS, $CFLAGS)
-AC_SUBST(CXXFLAGS, $CXXFLAGS)
-AC_SUBST(CDEBUGFLAGS, $CDEBUGFLAGS)
-AC_SUBST(BASE_DEFINES, $BASE_DEFINES)
-AC_SUBST(AR_FLAGS, $AR_FLAGS)
-AC_SUBST(HOST_RESULT, $HOST_RESULT )
-AC_SUBST(CARBON)
-AC_SUBST(OPTIMIZATION_FLAG, $OPTIMIZATION_FLAG)
-AC_SUBST(LD_SHARED, $LD_SHARED)
-AC_SUBST(LDFLAGS, $LDFLAGS)
-AC_SUBST(LDFLAGS_GL, $LDFLAGS_GL)
-AC_SUBST(LDFLAGS_VERSIONING, LDFLAGS_VERSIONING)
-AC_SUBST(LDFLAGS_EXE, $LDFLAGS_EXE)
-AC_SUBST(LDFLAGS_APP, $LDFLAGS_APP)
-AC_SUBST(OSSIM_CFLAGS)
-AC_SUBST(OSSIM_CPP_FLAGS)
-AC_SUBST(OSSIM_LIBS)
-AC_SUBST(OSSIM_INCLUDES)
-AC_SUBST(OSSIM_PREFIX)
-AC_SUBST(INCLUDE_COMMON)
-
-dnl ---
-dnl Required output macro.
-dnl ---
-AC_OUTPUT(
-ossim.spec
-Makefile.common 
-Makefile:makefiles/${SPECIALIZED_MAKEFILE_DIR}/makeroot
-makelib.mak:makefiles/${SPECIALIZED_MAKEFILE_DIR}/makelib
-makeprog.mak:makefiles/${SPECIALIZED_MAKEFILE_DIR}/makeprog
-src/apps/Makefile:makefiles/unx/makeapps.unx
-src/Makefile:makefiles/unx/makesrc.unx
-src/ossim/Makefile:makefiles/${SPECIALIZED_MAKEFILE_DIR}/makelibcore
-src/ossim/base/Makefile:makefiles/unx/makelibbase.unx
-src/ossim/elevation/Makefile:makefiles/unx/makelibelevation.unx
-src/ossim/font/Makefile:makefiles/unx/makelibfont.unx
-src/ossim/imaging/Makefile:makefiles/unx/makelibimaging.unx
-src/ossim/init/Makefile:makefiles/unx/makelibinit.unx
-src/ossim/kbool/Makefile:makefiles/unx/makelibkbool.unx
-src/ossim/matrix/Makefile:makefiles/unx/makelibmatrix.unx
-src/ossim/parallel/Makefile:makefiles/unx/makelibparallel.unx
-src/ossim/plugin/Makefile:makefiles/unx/makelibplugin.unx
-src/ossim/projection/Makefile:makefiles/unx/makelibprojection.unx
-src/ossim/support_data/Makefile:makefiles/unx/makelibsupportdata.unx
-src/ossim/vec/Makefile:makefiles/unx/makelibvec.unx
-src/ossim/vpfutil/Makefile:makefiles/unx/makelibvpfutil.unx
-)
-
-echo "  OSSIM configured settings:"
-echo "  host:                           ${host}"
-echo "  OSSIM_TOP:                      ${OSSIM_TOP}"
-echo "  top_builddir:                   ${top_builddir}"
-echo "  OSSIM_MAJOR_VERSION_NUMBER:     ${OSSIM_MAJOR_VERSION_NUMBER}"
-echo "  OSSIM_MINOR_VERSION_NUMBER:     ${OSSIM_MINOR_VERSION_NUMBER}"
-echo "  OSSIM_RELEASE_NUMBER:           ${OSSIM_RELEASE_NUMBER}"
-echo "  OSSIM_VERSION:                  ${OSSIM_VERSION}"
-echo "  BUILD_SHARED_OBJS:              ${BUILD_SHARED_OBJS}"
-echo "  BUILD_STATIC_OBJS:              ${BUILD_STATIC_OBJS}"
-echo "  BUILD_SHARED_LIBS:              ${BUILD_SHARED_LIBS}"
-echo "  BUILD_STATIC_LIBS:              ${BUILD_STATIC_LIBS}"
-echo "  BUILD_SINGLE_SHARED_LIBS:       ${BUILD_SINGLE_SHARED_LIBS}"
-echo "  BUILD_SINGLE_STATIC_LIBS:       ${BUILD_SINGLE_STATIC_LIBS}"
-echo "  BUILD_STATIC_APPS:              ${BUILD_STATIC_APPS}"
-echo "  SHARED_OBJ_DIR:                 ${SHARED_OBJ_DIR}"
-echo "  STATIC_OBJ_DIR:                 ${STATIC_OBJ_DIR}"
-echo "  SO_VERSIONLESS_EXT:             ${SO_VERSIONLESS_EXT}"
-echo "  SO_SONAME_EXT:                  ${SO_SONAME_EXT}"
-echo "  SO_REALNAME_EXT:                ${SO_REALNAME_EXT}"
-echo "  SHARED_APP_FLAG:                ${SHARED_APP_FLAG}"
-echo "  PIC_FLAG:                       ${PIC_FLAG}"
-echo "  RESCOMP:                        ${RESCOMP}"
-echo "  RESFLAGS:                       ${RESFLAGS}"
-echo "  MACOSX_BUNDLE:                  ${MACOSX_BUNDLE}"
-echo "  TOOLKIT_DIR:                    ${TOOLKIT_DIR}"
-echo "  LIBOSSIMMACRES:                 ${LIBOSSIMMACRES}"
-echo "  LIBOSSIMMACRESCOMP:             ${LIBOSSIMMACRESCOMP}"
-echo "  OSSIM_RESOURCES_MACOSX_DATA:    ${OSSIM_RESOURCES_MACOSX_DATA}"
-echo "  OSSIM_RESOURCES_MACOSX_TEXT:    ${OSSIM_RESOURCES_MACOSX_TEXT}"
-echo "  CFLAGS:                         ${CFLAGS}"
-echo "  CXXFLAGS:                       ${CXXFLAGS}"
-echo "  CDEBUGFLAGS:                    ${CDEBUGFLAGS}"
-echo "  BASE_DEFINES:                   ${BASE_DEFINES}"
-echo "  AR_FLAGS:                       ${AR_FLAGS}"
-echo "  HOST_RESULT:                    ${HOST_RESULT}"
-echo "  CARBON:                         ${CARBON}"
-echo "  OPTIMIZATION_FLAG:              ${OPTIMIZATION_FLAG}"
-echo "  LD_SHARED:                      ${LD_SHARED}"
-echo "  LDFLAGS:                        ${LDFLAGS}"
-echo "  LDFLAGS_GL:                     ${LDFLAGS_GL}"
-echo "  LDFLAGS_VERSIONING:             ${LDFLAGS_VERSIONING}"
-echo "  LDFLAGS_EXE:                    ${LDFLAGS_EXE}"
-echo "  LDFLAGS_APP:                    ${LDFLAGS_APP}"
-echo "  INSTALL:                        ${INSTALL}"
-echo "  OSSIM_VERSION:                  ${OSSIM_VERSION}"
-echo "  INCLUDE_COMMON:                 ${INCLUDE_COMMON}"
-echo "  -------------- INSTALL LOCATIONS ----------------"
-echo "  prefix(to change use --prefix):           ${prefix}"
-echo "  exec_prefix(to change use --exec_prefix): ${exec_prefix}"
-echo "  bindir(to change use --bindir):           ${bindir}"
-echo "  includedir(to change use --includedir:    ${includedir}"
-echo "  libdir(to change use --libdir):           ${libdir}"
diff --git a/doc/.cvsignore b/doc/.cvsignore
deleted file mode 100644
index f038433..0000000
--- a/doc/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-dox
-man
diff --git a/doc/ossim.spec b/doc/ossim.spec
deleted file mode 100644
index e74e778..0000000
--- a/doc/ossim.spec
+++ /dev/null
@@ -1,78 +0,0 @@
-# $Id: ossim.spec 16 2001-02-08 11:04:54Z dmetz $
-# $crtd:  by  Derald Metzger  on  000226 $
-# $cmnt:  spec file for ossim $
-
-# Preamble
-Summary: Open Source Software Image Map
-Name: ossim
-Version: 0.999.7
-Release: 1
-Copyright: GPL LGPL
-Group: Applications/Image
-Source: ftp://ftp.remotesensing.org/pub/ossim/%{name}-%{version}.tgz
-URL: http://www.remotesensing.org/ossim/
-Distribution: na
-Vendor: imagelinks.com
-Packager: Derald Metzger <dmetz at remotesensing.org>
-BuildRoot: %{_tmppath}/%{name}-%{version}
-#Provides: 
-#Requires: 
-
-%description
- ######--- This is alpha stage development code. ---######
- OSSIM (Open Source Software Image Map) project. 
-Pronounced "awesome", the OSSIM project leverages existing open source 
-algorithms, tools, and packages to construct an integrated library for 
-remote sensing, image-processing, and Geographical Information Sciences (GIS) 
-analysis.
-
-%prep
-%setup
-rm -r `find . -name CVS -print`
-
-%build
-./configure \
-    --prefix=%{_prefix} \
-    --with-grass=no \
-    --without-python
-make
-
-%install
-make \
-  version=%{version} \
-  prefix=$RPM_BUILD_ROOT%{_prefix} \
-  sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} \
-  install
-
-%changelog
-* Wed Feb 08 2001  Derald Metzger <dmetz at remotesensing.org>
--UPDATE pkg to 0.999.7-1
-  The ossim dir tree has been extensively reconfigured.
-* Thu Dec 28 2000  Derald Metzger <dmetz at remotesensing.org>
--UPDATE pkg to 0.999.3-1
-  The 0.999 is meant to imply preliminary code (alpha or beta).
-  The .3-1 is the 3rd preliminary version and first rpm release of it. 
-- Remove $BR build root stuff from Makefile. Use make var defs on cmdline.
-- Macroized and updated the files manifest
-- Added config dir etc/ossim
-- Added doc dir
-- Removed lib/ossim - linking statically
-* Thu Aug 31 2000  Derald Metzger <dmetz at remotesensing.org>
--pkg 0.2.0a-2  Rebuild with wxGTK-2.2.1-0.
-* Sat Aug 26 2000  Derald Metzger <dmetz at remotesensing.org>
--pkg 0.2.0a-1  Snapshot of current alpha code
-* Thu May 23 2000  Derald Metzger <dmetz at remotesensing.org>
--PACKGED 0.0.0-1
-- rpm'd ossim. Started version at 0.0.0
-
-%files
-%defattr(-,root,root)
-%{_bindir}/%{name}
-%doc %{_docdir}/%{name}-%{version}/
-%config %{_sysconfdir}/%{name}
-
-
-
-
-
-
diff --git a/etc/config_files/dbossim.cfg b/etc/config_files/dbossim.cfg
deleted file mode 100644
index 9ae94d7..0000000
--- a/etc/config_files/dbossim.cfg
+++ /dev/null
@@ -1,7 +0,0 @@
-db.server: dante.imagelinks.com
-db.user: elevman
-db.pass: elevman
-db.database: ilelev
-db.l0-table: level0
-db.l1-table: level1
-db.l2-table: level2
diff --git a/etc/linux/ld.so.conf.d/ossim.conf b/etc/linux/ld.so.conf.d/ossim.conf
deleted file mode 100644
index 2865a7d..0000000
--- a/etc/linux/ld.so.conf.d/ossim.conf
+++ /dev/null
@@ -1,9 +0,0 @@
-###
-# $Id: ossim.conf 10669 2007-03-30 19:50:07Z dburken $
-# Edit (uncomment) accordingly and copy to /etc/ld.so.conf.d/
-# As root run:  /sbin/ldconfig
-#
-#     UNCOMMENT / EDIT BELOW
-# /usr/local/lib/ossim
-# /usr/local/ossim/lib 
-# /usr/local/ossim/lib/ossim
diff --git a/etc/linux/profile.d/ossim.csh b/etc/linux/profile.d/ossim.csh
deleted file mode 100644
index 95786a2..0000000
--- a/etc/linux/profile.d/ossim.csh
+++ /dev/null
@@ -1,14 +0,0 @@
-###
-# $Id: ossim.csh 9909 2006-11-17 20:18:29Z dburken $
-# For csh / tcsh users do: source omar.sh
-# The '.' is a dot.
-# 
-# Edit prefix as needed:
-###
-set ossim_bin=/usr/local/ossim/bin
-if ( "${path}" !~ *$ossim_bin* ) then
-   set path = ( $ossim_bin $path )
-endif
-
-
-
diff --git a/etc/linux/profile.d/ossim.sh b/etc/linux/profile.d/ossim.sh
deleted file mode 100644
index 8a74839..0000000
--- a/etc/linux/profile.d/ossim.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-###
-# $Id: ossim.sh 9909 2006-11-17 20:18:29Z dburken $
-# For sh / bash users do: . omar.sh
-# The '.' is a dot.
-# 
-# Edit prefix as needed:
-###
-ossim_bin=/usr/local/ossim/bin
-if ! echo ${PATH} | /bin/grep -q $ossim_bin ; then
-   PATH=$ossim_bin:${PATH}
-fi
-
-export PATH
diff --git a/etc/mac/Info.plist.in b/etc/mac/Info.plist.in
deleted file mode 100644
index 2be3d33..0000000
--- a/etc/mac/Info.plist.in
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
-<plist version="0.9">
-<dict>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleIdentifier</key>
-	<string>org.wxwindows.IDENTIFIER</string>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>EXECUTABLE</string>
-	<key>CFBundleIconFile</key>
-	<string>wxmac.icns</string>
-	<key>CFBundleName</key>
-	<string>EXECUTABLE</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>VERSION</string>
-	<key>CFBundleShortVersionString</key>
-	<string>VERSION</string>
-	<key>CFBundleGetInfoString</key>
-	<string>EXECUTABLE version VERSION, (c) 2002 wxWindows</string>
-	<key>CFBundleLongVersionString</key>
-	<string>VERSION, (c) 2002 wxWindows</string>
-	<key>NSHumanReadableCopyright</key>
-	<string>Copyright 2002 wxWindows</string>
-	<key>LSRequiresCarbon</key>
-        <true/>
-	<key>CSResourcesFileMapped</key>
-	<true/>
-</dict>
-</plist>
diff --git a/etc/mac/wxmac.icns b/etc/mac/wxmac.icns
deleted file mode 100644
index c541782..0000000
Binary files a/etc/mac/wxmac.icns and /dev/null differ
diff --git a/etc/templates/orthoigen3.kwl b/etc/templates/orthoigen3.kwl
deleted file mode 100644
index 2aef87d..0000000
--- a/etc/templates/orthoigen3.kwl
+++ /dev/null
@@ -1,32 +0,0 @@
-//  This shows how to add tiling support to the output.
-// theTile mask here is only for show.   The output file added to the orthoigen 
-// is used as the mask for generating named tile files.
-//
-// Note:  When tiling is enabled any meter pixel overrides are ignored and is 
-// computed based on the tiling parameters.
-//
-
-igen.slave_tile_buffers: 10
- 
-// Ten km tiles with 100 with pixel size of 10 meters:
-igen.tiling.type: ossimTiling
-igen.tiling.tiling_distance: 10000 10000
-igen.tiling.tiling_distance_type: meters
-igen.tiling.delta: 10 10
-igen.tiling.delta_type: per_pixel
-igen.tiling.tile_name_mask: tile_%r%_%c%
-igen.tiling.padding_size_in_pixels: 0 0
-
-
-
-object1.type:  ossimImageChain
-object1.description:
-object1.enabled:  1
-object1.id:  1
-object1.object1.description:  
-object1.object1.enabled:  1
-object1.object1.id:  2
-object1.object1.resampler.magnify_type:  nearest
-object1.object1.resampler.minify_type:  nearest
-object1.object1.type:  ossimImageRenderer
-
diff --git a/etc/templates/ossim-dem-color-table-template.kwl b/etc/templates/ossim-dem-color-table-template.kwl
deleted file mode 100644
index 555c5d9..0000000
--- a/etc/templates/ossim-dem-color-table-template.kwl
+++ /dev/null
@@ -1,85 +0,0 @@
-// ---
-// This is a color lookup table that can be used with the ossim-dem application.
-// Usage example:  
-// 
-// ossim-dem --op color-relief --color-table color-relief-lut1.kwl --projection geo-scaled 
-//           -t 512 -w ossim_png N37W123.hgt outputs/basic-color-relief.png
-// ---
-
-number_of_entries:  25
-type:  ossimRgbLutDataObject
-entry0.b:  115
-entry0.g:  115
-entry0.r:  115
-entry1.b:  89
-entry1.g:  153
-entry1.r:  113
-entry2.b:  101
-entry2.g:  170
-entry2.r:  117
-entry3.b:  113
-entry3.g:  190
-entry3.r:  149
-entry4.b:  117
-entry4.g:  214
-entry4.r:  178
-entry5.b:  149
-entry5.g:  226
-entry5.r:  202
-entry6.b:  161
-entry6.g:  238
-entry6.r:  222
-entry7.b:  161
-entry7.g:  238
-entry7.r:  242
-entry8.b:  153
-entry8.g:  222
-entry8.r:  238
-entry9.b:  133
-entry9.g:  206
-entry9.r:  242
-entry10.b:  129
-entry10.g:  182
-entry10.r:  234
-entry11.b:  121
-entry11.g:  157
-entry11.r:  218
-entry12.b:  125
-entry12.g:  141
-entry12.r:  194
-entry13.b:  145
-entry13.g:  157
-entry13.r:  214
-entry14.b:  165
-entry14.g:  174
-entry14.r:  226
-entry15.b:  182
-entry15.g:  186
-entry15.r:  222
-entry16.b:  210
-entry16.g:  198
-entry16.r:  238
-entry17.b:  226
-entry17.g:  206
-entry17.r:  255
-entry18.b:  234
-entry18.g:  218
-entry18.r:  250
-entry19.b:  230
-entry19.g:  222
-entry19.r:  255
-entry20.b:  242
-entry20.g:  230
-entry20.r:  255
-entry21.b:  255
-entry21.g:  242
-entry21.r:  255
-entry22.b:  255
-entry22.g:  255
-entry22.r:  255
-entry23.b:  255
-entry23.g:  240
-entry23.r:  219
-entry24.b:  255
-entry24.g:  255
-entry24.r:  255
diff --git a/etc/templates/ossim_preferences_template b/etc/templates/ossim_preferences_template
deleted file mode 100644
index 0ca61fc..0000000
--- a/etc/templates/ossim_preferences_template
+++ /dev/null
@@ -1,467 +0,0 @@
-// ------------------------------------------------------------------------
-// $Id: ossim_preferences_template 21742 2012-09-14 19:00:24Z dburken $
-// 
-// Description:  ossim_preferences_template
-// 
-// This file will be automatically loaded by ossim applications provided the
-// environment variable "OSSIM_PREFS_FILE" is set to point to some form of 
-// this file.
-//
-// Note:  c++ comments "//" can be used to comment a line.
-//
-// To set the environment variable for automatic preference file loading:
-//
-// This assumes a preference file in your home called "ossim_preferences".
-// Typically this would be put in a dot file read at startup of a shell.
-//
-// tcsh and csh users:  setenv OSSIM_PREFS_FILE ~/ossim_preferences
-//
-// bash and sh users:   export OSSIM_PREFS_FILE=~/ossim_preferences
-// 
-// windoze users:       I'll have to look this up...
-//
-// You can also use the "-P <preference_file>" option at application startup.
-// where <preference_file> is full path and filename.
-//
-// Note that system environment variables found in this ossim preferences
-// file in the format "$(env_var_name)" will be expanded in place.
-// 
-// ------------------------------------------------------------------------
-
-// ---
-// Keyword pair: 
-// elevation_source.type
-// elevation_source.filename 
-// 
-// Indicates an elevation source.  These should be listed in pairs.  Numbering
-// should start with 1 with lowest number being the highest resolution.  This
-// can be a cell(file) or a directory.
-// 
-// There are four elevation_source.type types:
-// elevation_source.type: dted_directory
-// elevation_source.type: srtm_directory
-// elevation_source.type: general_raster_directory
-// 
-// The elevation_source.connection_string is a connection for your database.  Typically this is a directory location.
-// 
-// NOTES:
-// The elevation_source keyword replaces the deprecated keywords:
-// dted_directory
-// image_directory
-// srtm_directory
-// dted_cell
-// 
-//
-// We support bringing cells into memory for dted and srtm datasets.  You can also control the number of open cells by
-// specifying a min and max open cells.  If the number of cells opened exceeds the maximum then it will shrink the active
-// opened cells to the minumum.  We currently use a least recently used algorithm.
-// Examples:
-//---
-//elevation_manager.elevation_source1.connection_string: $(OSSIM_DATA)/elevation/srtm1
-//elevation_manager.elevation_source1.type: srtm_directory
-//elevation_manager.elevation_source1.min_open_cells: 25
-//elevation_manager.elevation_source1.max_open_cells: 50
-//elevation_manager.elevation_source1.memory_map_cells: true
-//elevation_manager.elevation_source1.geoid.type: geoid1996
-
-//elevation_manager.elevation_source2.type: dted_directory
-//elevation_manager.elevation_source2.connection_string: $(OSSIM_DATA)/elevation/dted/1k
-//elevation_manager.elevation_source2.min_open_cells: 25 
-//elevation_manager.elevation_source2.max_open_cells: 50 
-//elevation_manager.elevation_source2.memory_map_cells: true
-//elevation_manager.elevation_source2.geoid.type: geoid1996
-
-//elevation_manager.elevation_source3.connection_string: $(OSSIM_DATA)/elevation/general_raster_srtmplus
-//elevation_manager.elevation_source3.type: general_raster_directory
-//elevation_manager.elevation_source3.min_open_cells: 25 
-//elevation_manager.elevation_source3.max_open_cells: 50 
-//elevation_manager.elevation_source3.memory_map_cells: false
-
-//elevation_manager.elevation_source1.connection_string: $(OSSIM_DATA)/elevation/srtm/3arc
-//elevation_manager.elevation_source1.type: image_directory
-//elevation_manager.elevation_source1.min_open_cells: 25
-//elevation_manager.elevation_source1.max_open_cells: 50
-//elevation_manager.elevation_source1.memory_map_cells: false
-//elevation_manager.elevation_source1.geoid.type: geoid1996
-
-
-// Identity geoid is 0 everywhere, so MSL = Ellipsoid. Useful when DEM provides posts 
-// relative to ellipsoid instead of customary MSL. This is specific to each elev database:
-//elevation_manager.elevation_source3.geoid.type: identity
-
-// Default height above ellipsoid, for use when no elev data is present, instead of returning NAN:
-//elevation_manager.default_height_above_ellipsoid: 0.0
-
-// this is n elevation offset that is added to the height returned from the elevation manager.
-// if the value is nan then nothing is added.
-//
-//elevation_manager.elevation_offset: nan
-
-// Allows one to specify to the elevation manager to use the ellipsoid offset as defined by the geoid manager if a getHeightAboveEllipsoid fails
-//
-//elevation_manager.use_geoid_if_null: true
-
-// ---
-// Keyword:  default_elevation_path
-// Default path for the elevation manager popup "Add" to start at.
-default_elevation_path:  /images/elevation/srtm/1arc
-// ---
-
-// ---
-// Keyword:  elevation.enabled
-// If disabled calls to the elevation manager getHeightAboveMSL and 
-// getHeightAboveEllipsoid will return a null height.  (default=true)
-// Use: "true", "yes", "y" or "1" to enable, 
-//      "false", "no", "n" or "0" to disable.
-elevation_manager.enabled:  true
-// ---
-
-// ---
-// Location of datum grids:
-//
-// Snip from: http://www.ngs.noaa.gov/TOOLS/Nadcon/Nadcon.html
-// 
-// Advances in the accuracies now obtainable in geodetic surveys, specifically
-// through use of differential GPS, has allowed for the creation of state 
-// High Precision Geodetic Networks (HPGNs), also referred to as High Accuracy
-// Reference Networks (HARNs) throughout the country.
-// 
-// Latest ftp location(20100206):
-// ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon/
-//
-// ---
-// datum_grids: $(OSSIM_DATA)/ossim/elevation/nadcon-grids
-
-// ---
-// Look-up tables for European Petroleum Survey Group (EPSG) coded projections and datums.
-// These are expected to be delimiter-separated value (*.csv|tsv) files.
-// NOTE: ESRI codes are NOT EPSG codes, however, they do not conflict with EPSG so ingesting them
-// as if they were EPSG. Eventually, separate databases or a multi-Db solution may need to be 
-// implemented. OLK 05/2010
-// --- 
-epsg_database_file1: $(OSSIM_DATA)/ossim/share/ossim/projection/ossim_epsg_projections-v7_4.csv
-epsg_database_file2: $(OSSIM_DATA)/ossim/share/ossim/projection/ossim_harn_state_plane_epsg.csv
-epsg_database_file3: $(OSSIM_DATA)/ossim/share/ossim/projection/ossim_state_plane_spcs.csv
-epsg_database_file4: $(OSSIM_DATA)/ossim/share/ossim/projection/ossim_harn_state_plane_esri.csv
-
-// Database file for WKT-based projection factory:
-wkt_database_file: $(OSSIM_DATA)/ossim/share/ossim/ossim_wkt_pcs.csv
-
-// ---
-// deprecated for new geoid_ngs_directory keyword
-//
-// Geoid support:
-// Note:  Since the sensor models do earth intersects at height above the 
-//        ellipsoid and the vertical datum of DTED is geoid_egm_96_grid, you
-//        should have a geoid grid in place for accurate earth intersections.
-// ---
-// ---
-// GEOID 99:  Set keyword to the directory containing the GEOID 99 grids.
-// 
-// Notes:  
-// - Grids must be in the native byte order.
-// - Can be downloaded from:
-// http://www.ngs.noaa.gov/GEOID/GEOID99
-// ---
-// geoid_99_directory:  $(OSSIM_DATA)/ele1/geoid/geoid99
-
-// current release only allows for a single directory
-// we will allow for multiple directories later and auto detecting
-// if possible.
-//
-// currently the file names are hard coded and need to be from the NGS distribution
-// also downloadable from ftp.remotesensing.org under/ossim/test_data.tgz
-//
-geoid_ngs_directory: $(OSSIM_DATA)/ear1/geoid/geoid99
-geoid_ngs_directory.byte_order: big_endian
-
-// ---
-// Generic support has been added to each NGS geoid grid. You can download
-// ngs grids for 1999, 2003, ... and should work.
-// byte order can be big_endian or little_endian
-//geoid_ngs_directory1: $(OSSIM_DATA)/ear1/geoidngs99
-//geoid_ngs_directory1.byte_order: little_endian
-
-// ---
-// GEOID EGM 96:  Set keyword to the path to the egm96.grd
-// 
-// Notes:
-// - Grid must be in BIG ENDIAN (UNIX) format.
-// - Can be downloaded from svn:
-// svn co http://svn.osgeo.org/ossim/trunk/ossim_package_support/geoids geoids
-// ---
-geoid_egm_96_grid: $(OSSIM_DATA)/ele1/geoid/geoid96/egm96.grd
-
-
-// ---
-// Font support:
-// NOTE:  To use the MapCompositionSource you must at least have "font.dir1"
-//        set to some default.
-// ---
-// font.file1: /usr/share/fonts/default/Type1/b018032l.pfb
-// font.dir1: /usr/share/fonts/default/Type1
-
-
-//---
-// OSSIM plugin support:
-//
-// Notes:  
-// 
-// Embedded trace debug can be turned on using "ossimDynamic" 
-// eg using icp application: 
-// $ icp -T ossimDynamic 
-// ossimDynamicLibrary::load DEBUG:
-// Loaded library:  /usr/local/lib/libossimpng_plugin.so
-// ossimDynamicLibrary::load DEBUG:
-// Loaded library:  /usr/local/lib/libossimgdal_plugin.so
-// ossimDynamicLibrary::load DEBUG:
-// Loaded library:  /usr/local/lib/libossimreg_plugin.so
-// ossimDynamicLibrary::load DEBUG:
-// Loaded library:  /usr/local/lib/libossimcontrib_plugin.so
-//
-// Keywords:
-//
-// plugin.dir1:  < directory where plugins are >
-//
-// you can also list by individual file names
-//
-// plugin.file1: < full path and file name >
-//---
-// Example, edit/uncomment as needed:
-// plugin.file1: $(OSSIM_DATA)/ossim/plugins/libossimpng_plugin.so
-// plugin.file2: $(OSSIM_DATA)/ossim/plugins/libossimkakadu_plugin.so
-// plugin.file3: $(OSSIM_DATA)/ossim/plugins/libossimmrsid_plugin.so
-// plugin.file4: $(OSSIM_DATA)/ossim/plugins/libossim_plugin.so
-// plugin.file5: $(OSSIM_DATA)/ossim/plugins/libossimreg_plugin.so
-// plugin.file6: $(OSSIM_DATA)/ossim/plugins/libossimcontrib_plugin.so
-// plugin.file7: $(OSSIM_DATA)/ossim/plugins/libossimkmlsuperoverlay_plugin.so
-// plugin.file8: $(OSSIM_DATA)/ossim/plugins/libossimlas_plugin.so
-// plugin.file9: $(OSSIM_DATA)/ossim/plugins/libossimgdal_plugin.so
-// 
-//
-// We also support a second style that allows one to pass options to any plugins that support them
-// the options param is an embedded keywordlist that is surrounded by triple quotes
-// plugin0.file: <path to>/libossimkakadu_plugin
-// plugin0.options: """
-//                  read_factory.location: front
-//                  writer_factory.location: back
-//                  """
-//
-// END OSSIM plugin support
-//---
-
-// Toggles for recceVue application:
-statusLatLon: true
-statusHeight: true
-statusDatum: true
-statusGSD: true
-statusUpdateOnClick: true
-
-
-// ---
-// Keyword: cache_size
-// The cache size is in megabytes
-// ---
-cache_size:
-
-// ---
-// Keyword: overview_stop_dimension
-//
-// Affects any overview building from img2rr, imagelinker, iview. Controls
-// the amount of resLevels created.  This is also used to control the amount
-// of levels the J2K writers use from the kakadu plugin.
-// 
-// This is the point where "img2rr" or the overview builder will stop 
-// decimating the image down.  So in other words, if the 
-// overview_stop_dimension keyword is 64, img2rr application will build 
-// overviews, decimating each level by 2 until both the width and height are 
-// less than or equal to 64.  Note the larger the dimension the less levels
-// created.
-// 
-// Uncomment one below.
-// ---
-overview_stop_dimension: 8
-// overview_stop_dimension: 16
-// overview_stop_dimension: 32
-// overview_stop_dimension: 64
-// overview_stop_dimension: 128
-// overview_stop_dimension: 256
-// overview_stop_dimension: 512
-
-// ---
-// Keyword: overview_builder.scan_for_min_max_null_if_float
-// 
-// Control overview sequencer scanning for min, max, nulls for float data. If
-// true and input data is float scalar type scanning will be performed and a
-// dot.omd file will be written with the min, max, nulls in it.
-// 
-// Type: boolean, set to true, false, 1, 0
-// 
-// CAUTION: Because the j2k overview builder requires the min/max up front for 
-// normalization this is NOT a good option to turn on.  In other word if you
-// are doing ossim-img2rr -r -t ossim_kakadu_nitf_j2k <float-image> you should
-// disable this and set the min/max with ossim-cmm(compute min max) or do it
-// manually.
-// ---
-// overview_builder.scan_for_min_max_null_if_float: true
-
-// ---
-// Keyword: tile_size
-//
-// Tile size x y
-//
-// Affects all ossim application.  This is the internal tile size of any
-// image chain unless overridden by the filter.
-// 
-// Notes: 
-// 1) OSSIM can handle any tile size; however it is best to use a size that
-// is a power of two.
-// 2) 
-// 
-// Uncomment one below.  
-// ---
-// tile_size: 32 32
-tile_size: 64 64
-// tile_size: 128 128
-// tile_size: 256 256
-// tile_size: 512 512
-// tile_size: 1024 1024
-
-
-// ---
-// Keyword: shapefile_colors_auto
-// 
-// Shape file colors set to automatic.
-// This is a boolean value.  If true pen and brush color of shape files will
-// be determined by indexing a color table in a round robin approach.  If set 
-// to true the auto colors override keywords for "pen" and "brush" color.
-// Default value if not found if "false".
-// 
-// Value can be: true, yes, y, 1, false, no, n or 0
-// ---
-shapefile_colors_auto: false
-
-// ---
-// Shape file pen color:
-// Three values for red, green and blue between 0 and 1.0 with 1.0 being 
-// brightness and 0.0 being black.
-// ---
-shapefile_normalized_rgb_pen_color: 0.004 1.0 0.004
-
-// ---
-// Shape file pen color:
-// Three values for red, green and blue between 0 and 1.0 with 1.0 being 
-// brightness and 0.0 being black.
-// ---
-shapefile_normalized_rgb_brush_color: 0.004 1.0 0.004
-
-// ---
-// Shape file point size:
-// Width and height for points in pixels.
-// ---
-shapefile_point_size: 6.0 6.0
-
-
-// --------------------------
-// Some keywords for the OSSIM GUI application
-//
-//
-// igen spec files output./  This is the directory location you would
-// like the igen export GUI to default to when outputing spec files
-ossim.igen_spec_output_directory: /work/gpotts/igen_test
-
-// this is the igen executable.  Make sure you put the full path
-ossim.igen_executable:  /work/gpotts/ossim/bin/igen
-
-// END keywords for OSSIM GUI
-//--------------------------
-
-// ---
-// Position Quality Evaluator (PQE) keywords. 
-// Note Circulay Error(CE) and Linear Error (LE)  units are in meters.
-// These keywords are for the imagelinker->image-window->PQE dialog box.
-// They allow the user to calculater position quality factoring in backdrop
-// and elevation uncertainty.
-// ---
-
-// Backdrop enter "name,ce90,le90" like "JOG-A,77,38".
-pqe_backdrop1: TLM50,31,25
-pqe_backdrop2: TLM100,61,25
-pqe_backdrop3: JOG-A,77,38
-pqe_backdrop4: TPC,613,47
-pqe_backdrop5: ONC,1226,93
-pqe_backdrop6: JNC,2452,187
-pqe_backdrop7: GNC,6129,465
-
-// Elevation enter "name,ce90,le90" like "SRTM_1ARC,20,16"
-// Accuracies vary widely depending on terrain and how they were computed.
-// These are just examples.
-pqe_elev1: SRTM_3ARC,20,16
-pqe_elev2: SRTM_1ARC,20,10
-pqe_elev3: DTED_LEVEL2,40,20
-pqe_elev4: DTED_LEVEL1,50,30
-pqe_elev5: RPC_No_DEM_State,-2,-1.6449
-// Special Case
-// RPC_No_DEM_State, Scale Divisor, 1-Sigma Divisor (minus signs required)
-
-pqe_normalized_rgb_ellipse_color: 0.004 1.0 0.004
-
-// End of PQE keywords...
-
-// ---
-// Log file support:  If set all output from ossimNotify to stdout and to 
-// stderr will be written to the log file.  Optionally users of ossim 
-// applications can use the "--ossim-logfile <some_file>" command line 
-// argument.  Note that the "--ossim-logfile" command line argument overrides
-// the preference setting.
-// 
-// Uncomment and set path to use log file:
-// ---
-// ossim.log.file: D:\tmp\ossim-log.txt
-
-// ---
-// Kakadu threads:
-// ---
-kakadu_threads: 4
-
-// ---
-// ossim threads:
-// ---
-ossim_threads: 4
-
-// Keyword for ingesting terrasar-x and radarsat-2 data. When TRUE, instructs the 
-// sensor model to create an ossim coarse grid replacement model to improve performance
-geometric_sar_sensor_model.create_ocg: true
-
-// Keyword parsed presently by orthoigen. If true, histograms will be computed when needed
-// for all images that do not yet have a histogram. 
-autogenerate_histogram: true
-
-// specify true or fals if you want the ossimInit to look in the current 
-// program path to see if any plugins are available.  Turn this off if you 
-// want to load them from a keyword list and remove the need to scan the 
-// directory for valid plugins
-ossim_init.auto_load_plugins: false
-
-// When true, indicates to orthoigen application that the specified cut rectangle for the product 
-// shall be adjusted to fit the minimum bounding valid image rect. This eliminates null exterior 
-// pixels when the cut rect extends beyond the valid image rect. This preference can be overriden
-// by an option on the orthoigen command line. See the usage on orthoigen. [default is false]
-orthoigen.clip_to_valid_rect: false
-
-// Specifies the preference for remapping null-valued pixels to 1 (min). Possible settings are:
-//   "none" -- Bypasses pixel flipper
-//   "all_nulls" -- replaces any occurrence of the null value with 1. 
-//			Ex: (20,0,10) becomes (20,1,10), also (0,0,0) becomes (1,1,1)
-//   "only_partial_nulls" -- replaces null-valued band only if another band is non-null.
-//			Ex: (20,0,10) becomes (20,1,10), but (0,0,0) is not remapped.
-//   "all_bands_if_partial_null" -- Remaps all bands of a pixel if even one band is null.
-//			Ex: (20,0,10) becomes (1,1,1), but (0,0,0) is not remapped
-//   "only_full_nulls" -- Remaps pixel only if all bands are null.
-//			Ex: (0,0,0) becomes (1,1,1), but (20,0,10) is not remapped
-orthoigen.flip_null_pixels: none
-
-// ---
-// NITF writer site configuration file:
-// ---
-// nitf_writer.site_configuration_file: $(OSSIM_DATA)/ossim/share/nitf-site-configuration.kwl
diff --git a/etc/templates/utm_projection_template.geom b/etc/templates/utm_projection_template.geom
deleted file mode 100644
index 252b91f..0000000
--- a/etc/templates/utm_projection_template.geom
+++ /dev/null
@@ -1,27 +0,0 @@
-//---------------------------------------------------------------------
-// $Id: utm_projection_template.geom 9465 2006-08-28 18:53:59Z dburken $
-//
-// Description:
-// This is a keyword list with minimum set of key words to make an
-// ossimUtmProjection.
-//---------------------------------------------------------------------
-central_meridian:  -87.000000000000000
-datum:  WGE
-ellipse_code:  WE
-ellipse_name:  WGS 84
-false_easting_northing:  ( 500000.000000000000000, 0.000000000000000 )
-false_easting_northing_units:  meters
-hemisphere:  N
-major_axis:  6378137.000000000000000
-minor_axis:  6356752.314199999906123
-origin_latitude:  0.000000000000000
-pixel_scale_units:  meters
-pixel_scale_xy:  ( 5.0, 5.0 )
-
-// point(tie center of pixel) or area (tie upper left corner of pixel).
-pixel_type:  point
-
-tie_point_units:  meters
-tie_point_xy:  ( 138425.0, 4738765.0 )
-type:  ossimUtmProjection
-zone:  16
diff --git a/header.gpl b/header.gpl
deleted file mode 100644
index 67d00e9..0000000
--- a/header.gpl
+++ /dev/null
@@ -1,24 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// OSSIM is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License 
-// as published by the Free Software Foundation.
-//
-// This software is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
-//
-// You should have received a copy of the GNU General Public License
-// along with this software. If not, write to the Free Software 
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-
-// 1307, USA.
-//
-// See the GPL in the COPYING.GPL file for more details.
-//
-// Author: John Doe (johndoe at email.org)
-// Description: A brief description of the contents of the file.
-//
-//*************************************************************************
-// \$Log\$  (Remove escapes when using header)
-//
diff --git a/header.lgpl b/header.lgpl
deleted file mode 100644
index 03a1323..0000000
--- a/header.lgpl
+++ /dev/null
@@ -1,24 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// OSSIM is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Library General Public License 
-// as published by the Free Software Foundation.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
-//
-// You should have received a copy of the GNU Library General Public License
-// along with this library. If not, write to the Free Software 
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-
-// 1307, USA.
-//
-// See the LGPL in the COPYING.LGPL file for more details.
-//
-// Author: John Doe (johndoe at email.org)
-// Description: A brief description of the contents of the file.
-//
-//*************************************************************************
-// \$Log\$  (Remove escapes when using header)
-//
diff --git a/include/ossim/.cvsignore b/include/ossim/.cvsignore
deleted file mode 100644
index c03dd8f..0000000
--- a/include/ossim/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-ossimConfig.h
-
diff --git a/include/ossim/base/ossim2dLinearRegression.h b/include/ossim/base/ossim2dLinearRegression.h
deleted file mode 100644
index 7b86d0b..0000000
--- a/include/ossim/base/ossim2dLinearRegression.h
+++ /dev/null
@@ -1,75 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts (gpotts at imagelinks)
-//
-//*************************************************************************
-// $Id: ossim2dLinearRegression.h 9968 2006-11-29 14:01:53Z gpotts $
-#ifndef ossim2dLinearRegression_HEADER
-#define ossim2dLinearRegression_HEADER
-#include <ossim/base/ossimDpt.h>
-#include <vector>
-#include <iostream>
-
-class ossim2dLinearRegression
-{
-public:
-   friend std::ostream& operator <<(std::ostream& out, const ossim2dLinearRegression& data)
-      {
-         out << "y = " << data.theSlope << "*x + " << data.theIntercept;
-
-         return out;
-      }
-   ossim2dLinearRegression();
-   void getEquation(double& slope,
-                    double& intercept)
-   {
-      slope     = theSlope;
-      intercept = theIntercept;
-   }
-   void addPoint(const ossimDpt& pt)
-      {
-//         thePoints.push_back(pt);
-         ++theNumberOfPoints;
-         theSumX  += pt.x;
-         theSumY  += pt.y;
-         theSumXX += pt.x*pt.x;
-         theSumYY += pt.y*pt.y;
-         theSumXY += pt.x*pt.y; 
-         theSolvedFlag     = false;
-      }
-   void clear()
-      {
-//         thePoints.clear();
-         theNumberOfPoints = 0;
-         theSumX           = 0.0;
-         theSumXX          = 0.0;
-         theSumY           = 0.0;
-         theSumYY          = 0.0;
-         theIntercept      = 0.0;
-         theSlope          = 0.0;
-         theSumXY          = 0.0;
-         theSolvedFlag     = false;
-      }
-   void solve();
-   ossim_uint32 getNumberOfPoints()const
-      {
-         return theNumberOfPoints;
-//         return thePoints.size();
-      }
-protected:
-//   std::vector<ossimDpt> thePoints;
-   ossim_uint32 theNumberOfPoints;
-   double theSumX;
-   double theSumY;
-   double theSumXX;
-   double theSumYY;
-   double theSumXY;
-   
-   double theIntercept;
-   double theSlope;
-   bool   theSolvedFlag;
-};
-
-#endif
diff --git a/include/ossim/base/ossim2dTo2dIdentityTransform.h b/include/ossim/base/ossim2dTo2dIdentityTransform.h
deleted file mode 100644
index fd4da43..0000000
--- a/include/ossim/base/ossim2dTo2dIdentityTransform.h
+++ /dev/null
@@ -1,68 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description:  Contains class definition for ossim2dTo2dIdentityTransform.
-// 
-//*******************************************************************
-//  $Id$
-#ifndef ossim2dTo2dIdentityTransform_HEADER
-#define ossim2dTo2dIdentityTransform_HEADER
-#include "ossim2dTo2dTransform.h"
-/**
- * This is the identity transform and just passes the input to the output.
- */
-class OSSIM_DLL ossim2dTo2dIdentityTransform : public ossim2dTo2dTransform
-{
-public:
-   /**
-    * forward transform just passes the point to the output.
-    */
-   virtual void forward(const ossimDpt& input,
-                        ossimDpt& output) const
-   {
-      output = input;
-   }
-   
-   /**
-    * forward transform nothing is modified on the input point.
-    */
-   virtual void forward(ossimDpt&  /* modify_this */) const
-   {
-      // do nothing this is identity
-   }
-   
-   /**
-    * inverse transform just passes the point to the output.
-    */
-   virtual void inverse(const ossimDpt& input,
-                        ossimDpt&       output) const
-   {
-      output = input;
-   }
-   
-   /**
-    * inverse transform nothing is modified on the input point.
-    */
-   virtual void inverse(ossimDpt&  /* modify_this */) const
-   {
-      // do nothing this is identity
-   }
-   
-   /**
-    * Pass equality to the parent
-    */
-   virtual const ossim2dTo2dIdentityTransform& operator=(
-                                                 const ossim2dTo2dIdentityTransform& rhs)
-   {
-      ossim2dTo2dTransform::operator =(rhs);
-      
-      return *this;
-   }
-   
-protected:
-   TYPE_DATA
-};
-#endif
diff --git a/include/ossim/base/ossim2dTo2dShiftTransform.h b/include/ossim/base/ossim2dTo2dShiftTransform.h
deleted file mode 100644
index 7c74694..0000000
--- a/include/ossim/base/ossim2dTo2dShiftTransform.h
+++ /dev/null
@@ -1,126 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-//----------------------------------------------------------------------------
-// $Id$
-#ifndef ossim2dTo2dShiftTransform_HEADER
-#define ossim2dTo2dShiftTransform_HEADER
-#include <ossim/base/ossim2dTo2dTransform.h>
-
-class OSSIM_DLL ossim2dTo2dShiftTransform : public ossim2dTo2dTransform
-{
-public:
-   /**
-    * Constructor to initialize the shift transform
-    */
-   ossim2dTo2dShiftTransform(const ossimDpt& shift = ossimDpt(0.0,0.0))
-   :ossim2dTo2dTransform(),
-   m_shift(shift)
-   {}
-   
-   /**
-    * Copy constructor
-    */
-   ossim2dTo2dShiftTransform(const ossim2dTo2dShiftTransform& src)
-   :ossim2dTo2dTransform(src),
-   m_shift(src.m_shift)
-   {}
-   
-   /**
-    * Duplication method that duplicates this object
-    */
-   virtual ossimObject* dup()const{return new ossim2dTo2dShiftTransform(*this);}
-   
-   /**
-    * operator = allows one to copy the contents of the class through a common = 
-    * operator.  The = is passed to the derived class.
-    */
-   const ossim2dTo2dShiftTransform& operator =(const ossim2dTo2dShiftTransform& src)
-   {
-      if(this == &src) return *this;
-      
-      ossim2dTo2dTransform::operator =(*this); // call base classes equal operator
-      m_shift = src.m_shift;
-      
-      return *this;
-   }
-   
-   /**
-    * Apply the shift to the input.
-    *
-    * @param input The value to shift.
-    * @param output the shifted value.
-    */
-   virtual void forward(const ossimDpt& input,
-                        ossimDpt& output) const
-   {
-      output = input + m_shift;
-   }
-   /**
-    * Apply the shift to the input and put the result in the same variable
-    *
-    * @param modify_this The value to shift.  The result is placed back into this value.
-    */
-   virtual void forward(ossimDpt&  modify_this) const
-   {
-      modify_this.x += m_shift.x;
-      modify_this.y += m_shift.y;
-   }
-
-   /**
-    * Negate the shift to the input and put the result in output.
-    *
-    * @param input The value to apply the negated shift.
-    * @param output the shifted value.
-    */
-   virtual void inverse(const ossimDpt& input,
-                        ossimDpt& output) const
-   {
-      output = input - m_shift;
-   }
-   
-   /**
-    * Negate the shift operation and put the result in the same variable
-    *
-    * @param modify_this The value to shift.  The result is placed back into this value.
-    */
-   virtual void inverse(ossimDpt&  modify_this) const
-   {
-      modify_this.x -= m_shift.x;
-      modify_this.y -= m_shift.y;
-   }
-   /**
-    * Saves the state of this object.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix = 0)const;
-   
-   /**
-    * loads the state of this object from a keywordlist.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix = 0);
-   
-   /**
-    * Print the contents of the class and pass to the derived class.
-    */
-   virtual std::ostream& print(std::ostream& out) const
-   {
-      ossim2dTo2dTransform::print(out);
-      
-      out << "shift: " << m_shift;
-      
-      return out;
-   }
-   
-protected:
-   virtual ~ossim2dTo2dShiftTransform(){}
-   
-   ossimDpt m_shift;
-   
-TYPE_DATA;
-};
-#endif
diff --git a/include/ossim/base/ossim2dTo2dTransform.h b/include/ossim/base/ossim2dTo2dTransform.h
deleted file mode 100644
index 33e1ae9..0000000
--- a/include/ossim/base/ossim2dTo2dTransform.h
+++ /dev/null
@@ -1,64 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossim2dTo2dTransform.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossim2dTo2dTransform_HEADER
-#define ossim2dTo2dTransform_HEADER
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimDpt.h>
-
-class OSSIMDLLEXPORT ossim2dTo2dTransform : public ossimObject
-{
-public:
-   virtual void forward(const ossimDpt& input,
-                        ossimDpt& output) const=0;
-   
-   virtual void forward(ossimDpt&  modify_this) const;
-      
-   virtual void inverse(const ossimDpt& input,
-                        ossimDpt&       output) const;
-
-   virtual void inverse(ossimDpt&  modify_this) const;
-      
-   virtual const ossim2dTo2dTransform& operator=(
-      const ossim2dTo2dTransform& rhs);
-   
-   /*!
-    * Used by the inverse iterator.  This will give it a good initial value
-    * that is within the input transforms
-    */
-   virtual ossimDpt getOrigin() const;
-
-   virtual std::ostream& print(std::ostream& out) const;
-   
-   virtual bool saveState(ossimKeywordlist& kwl,
-                   const char* prefix = 0)const;
-   
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                  const char* prefix = 0);
-   
-   void setConvergenceThreshold(const double& new_threshold);
-   
-   void setMaxIterations(int new_max_iters);
-
-   void setDxDy(const ossimDpt& dxdy);
-
-protected:
-   ossim2dTo2dTransform();
-   virtual ~ossim2dTo2dTransform(){}
-   double theConvergenceThreshold;
-   int    theMaxIterations;
-
-   ossimDpt theDxDy;
-   
-TYPE_DATA      
-};
-
-#endif
diff --git a/include/ossim/base/ossim2dTo2dTransformFactory.h b/include/ossim/base/ossim2dTo2dTransformFactory.h
deleted file mode 100644
index 8694443..0000000
--- a/include/ossim/base/ossim2dTo2dTransformFactory.h
+++ /dev/null
@@ -1,44 +0,0 @@
-//**************************************************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description: Class declaration of ossim2dTo2dTransformFactory.
-//
-//**************************************************************************************************
-// $Id$
-#ifndef ossim2dTo2dTransformFactory_HEADER
-#define ossim2dTo2dTransformFactory_HEADER
-#include <ossim/base/ossim2dTo2dTransformFactoryBase.h>
-
-class ossim2dTo2dTransform;
-class OSSIM_DLL ossim2dTo2dTransformFactory : public ossim2dTo2dTransformFactoryBase
-{
-public:
-   ossim2dTo2dTransformFactory(){}
-   static ossim2dTo2dTransformFactory* instance();
-   
-   /**
-    * Take a transform type name.
-    */
-   virtual ossim2dTo2dTransform* createTransform(const ossimString& name)const;
-   
-   /**
-    * Take a keywordlist.
-    */
-   virtual ossim2dTo2dTransform* createTransform(const ossimKeywordlist& kwl,
-                                                 const char* prefix)const;
-   
-   /*!
-    * This should return the type name of all objects in all factories.
-    * This is the name used to construct the objects dynamially and this
-    * name must be unique.
-    */
-   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
-  
-protected:
-   static ossim2dTo2dTransformFactory* m_instance;
-};
-
-#endif
diff --git a/include/ossim/base/ossim2dTo2dTransformFactoryBase.h b/include/ossim/base/ossim2dTo2dTransformFactoryBase.h
deleted file mode 100644
index 24a8d51..0000000
--- a/include/ossim/base/ossim2dTo2dTransformFactoryBase.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#ifndef ossim2dTo2dTransformFactoryBase_HEADER
-#define ossim2dTo2dTransformFactoryBase_HEADER
-#include <ossim/base/ossimObjectFactory.h>
-//**************************************************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description: Class declaration of ossim2dTo2dTransformFactoryBase.
-//
-//**************************************************************************************************
-// $Id$
-#include <ossim/base/ossim2dTo2dTransform.h>
-
-class OSSIM_DLL ossim2dTo2dTransformFactoryBase : public ossimObjectFactory
-{
-public:
-   
-   /**
-    * Creates an object given a type name.
-    */
-   virtual ossimObject* createObject(const ossimString& typeName)const
-   {
-      return createTransform(typeName);
-   }
-   
-   /**
-    * Creates and object given a keyword list.
-    */
-   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
-                                     const char* prefix=0)const
-   {
-      return createTransform(kwl, prefix);
-   }
-   
-   /**
-    * Take a transform type name.
-    */
-   virtual ossim2dTo2dTransform* createTransform(const ossimString& name)const=0;
-   
-   /**
-    * Take a keywordlist.
-    */
-   virtual ossim2dTo2dTransform* createTransform(const ossimKeywordlist& kwl,
-                                                 const char* prefix)const=0;
-protected:
-};
-#endif
diff --git a/include/ossim/base/ossim2dTo2dTransformRegistry.h b/include/ossim/base/ossim2dTo2dTransformRegistry.h
deleted file mode 100644
index 9bf06de..0000000
--- a/include/ossim/base/ossim2dTo2dTransformRegistry.h
+++ /dev/null
@@ -1,84 +0,0 @@
-//**************************************************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description: Class declaration of ossim2dTo2dTransformRegistry.
-//
-//**************************************************************************************************
-// $Id$
-#ifndef ossim2dTo2dTransformRegistry_HEADER
-#define ossim2dTo2dTransformRegistry_HEADER
-#include <ossim/base/ossimObjectFactory.h>
-#include <ossim/base/ossimRtti.h>
-#include <ossim/base/ossim2dTo2dTransformFactoryBase.h>
-#include <ossim/base/ossim2dTo2dTransform.h>
-#include <vector>
-#include <ossim/base/ossimFactoryListInterface.h>
-
-class OSSIM_DLL ossim2dTo2dTransformRegistry : public ossimObjectFactory,
-                                               public ossimFactoryListInterface<ossim2dTo2dTransformFactoryBase,
-                                                                                ossim2dTo2dTransform>
-{
-public:
-   virtual ~ossim2dTo2dTransformRegistry(){}
-   static ossim2dTo2dTransformRegistry* instance();
-   
-   /*!
-    * Creates an object given a type name.
-    */
-   virtual ossimObject* createObject(const ossimString& typeName)const
-   {
-      return createObjectFromRegistry(typeName);
-   }
-   
-   /*!
-    * Creates and object given a keyword list.
-    */
-   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
-                                     const char* prefix=0)const
-   {
-      return createObjectFromRegistry(kwl, prefix);
-   }
-   /*!
-    * Creates an object given a type name.
-    */
-   virtual ossim2dTo2dTransform* createTransform(const ossimString& typeName)const
-   {
-      return createNativeObjectFromRegistry(typeName);
-   }
-   
-   /*!
-    * Creates and object given a keyword list.
-    */
-   virtual ossim2dTo2dTransform* createTransform(const ossimKeywordlist& kwl,
-                                                 const char* prefix=0)const
-   {
-      return createNativeObjectFromRegistry(kwl, prefix);
-   }
-   
-   /*!
-    * This should return the type name of all objects in all factories.
-    * This is the name used to construct the objects dynamially and this
-    * name must be unique.
-    */
-   virtual void getTypeNameList(std::vector<ossimString>& typeList)const
-   {
-      getAllTypeNamesFromRegistry(typeList);
-   }
-   
-protected:
-   ossim2dTo2dTransformRegistry()
-   :ossimObjectFactory()
-   {}
-   
-   ossim2dTo2dTransformRegistry( const ossim2dTo2dTransformRegistry& rhs )
-   :ossimObjectFactory(rhs)
-   {}
-   void operator =(const ossim2dTo2dTransformRegistry&){}
-   static ossim2dTo2dTransformRegistry* m_instance;
-   
-   TYPE_DATA
-};
-#endif
diff --git a/include/ossim/base/ossimAdjustableParameterInterface.h b/include/ossim/base/ossimAdjustableParameterInterface.h
deleted file mode 100644
index 8091227..0000000
--- a/include/ossim/base/ossimAdjustableParameterInterface.h
+++ /dev/null
@@ -1,124 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts (gpotts at imagelinks.com)
-//
-//*************************************************************************
-// $Id: ossimAdjustableParameterInterface.h 9968 2006-11-29 14:01:53Z gpotts $
-#ifndef ossimAdjustableParameterInterface_HEADER
-#define ossimAdjustableParameterInterface_HEADER
-#include <ossim/base/ossimRtti.h>
-#include <vector>
-#include <ossim/base/ossimAdjustmentInfo.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimObject.h>
-
-class OSSIMDLLEXPORT ossimAdjustableParameterInterface
-{
-public:
-   ossimAdjustableParameterInterface();
-   ossimAdjustableParameterInterface(const ossimAdjustableParameterInterface& rhs);
-   virtual ~ossimAdjustableParameterInterface(){}
-   void newAdjustment(ossim_uint32 numberOfParameters=0);
-   void setAdjustmentDescription(const ossimString& description);
-   ossimString getAdjustmentDescription()const;
-   void setCurrentAdjustment(ossim_uint32 adjustmentIndex, bool notify=false);
-   void eraseAdjustment(bool notify);
-   void eraseAdjustment(ossim_uint32 idx, bool notify);
-   virtual void initAdjustableParameters();
-   void resetAdjustableParameters(bool notify=false);
-   void copyAdjustment(ossim_uint32 idx, bool notify);
-   void copyAdjustment(bool notify = false);
-
-   virtual ossimObject* getBaseObject()=0;
-   virtual const ossimObject* getBaseObject()const=0;
-   
-   /*!
-    * Will copy the adjustment but will set the new center to the
-    * applied current center plus the application of the adjustment
-    *
-    */
-   void keepAdjustment(ossim_uint32 idx, bool createCopy);
-   void keepAdjustment(bool createCopy=true);
-   
-
-   const ossimAdjustableParameterInterface& operator = (const ossimAdjustableParameterInterface& rhs);
-   void removeAllAdjustments();
-   ossim_uint32 getNumberOfAdjustableParameters()const;
-   double       getAdjustableParameter(ossim_uint32 idx)const;
-   void         setAdjustableParameter(ossim_uint32 idx, double value,
-                                       bool notify=false);
-   void         setAdjustableParameter(ossim_uint32 idx,
-                                       double value,
-                                       double sigma,
-                                       bool notify=false);
-   double       getParameterSigma(ossim_uint32 idx)const;
-   void         setParameterSigma(ossim_uint32 idx,
-                                  double value,
-                                  bool notify=false);
-   ossimUnitType getParameterUnit(ossim_uint32 idx)const;
-   void          setParameterUnit(ossim_uint32 idx, ossimUnitType unit);
-   void          setParameterUnit(ossim_uint32 idx, const ossimString& unit);
-
-   void           setParameterCenter(ossim_uint32 idx,
-                                     double center,
-                                     bool notify = false);
-   double        getParameterCenter(ossim_uint32 idx)const;
-   double        computeParameterOffset(ossim_uint32 idx)const;
-   void          setParameterOffset(ossim_uint32 idx,
-                                    ossim_float64 value,
-                                    bool notify = false);
-   
-   ossimString   getParameterDescription(ossim_uint32 idx)const;
-   void          setParameterDescription(ossim_uint32 idx,
-                                         const ossimString& descrption);
-
-   ossim_int32 findParameterIdxGivenDescription(ossim_uint32 adjustmentIdx,
-                                                const ossimString& name)const;
-   ossim_int32 findParameterIdxContainingDescription(ossim_uint32 adjustmentIdx,
-                                                     const ossimString& name)const;
-   
-   bool isParameterLocked(ossim_uint32 idx)const;
-
-   void setParameterLockFlag(ossim_uint32 idxParam, bool flag);
-   bool getParameterLockFlag(ossim_uint32 idx)const;
-
-   void lockAllParametersCurrentAdjustment();
-   void unlockAllParametersCurrentAdjustment();
-
-   void lockAllParameters(ossim_uint32 idxAdjustment);
-   void unlockAllParameters(ossim_uint32 idxAdjustment);
-   
-   void resizeAdjustableParameterArray(ossim_uint32 numberOfParameters);
-
-   void setAdjustment(const ossimAdjustmentInfo& adj, bool notify=false);
-   void setAdjustment(ossim_uint32 idx, const ossimAdjustmentInfo& adj, bool notify=false);
-   
-   void addAdjustment(const ossimAdjustmentInfo& adj, bool notify);
-   void getAdjustment(ossimAdjustmentInfo& adj);
-   void getAdjustment(ossim_uint32 idx, ossimAdjustmentInfo& adj);
-   
-   ossim_uint32 getNumberOfAdjustments()const;
-   ossim_uint32 getCurrentAdjustmentIdx()const;
-
-   
-   void setDirtyFlag(bool flag=true);
-   void setAllDirtyFlag(bool flag = true);
-   bool hasDirtyAdjustments()const;
-   
-   bool saveAdjustments(ossimKeywordlist& kwl,
-                        const ossimString& prefix=ossimString(""))const;
-   bool loadAdjustments(const ossimKeywordlist& kwl,
-                        const ossimString& prefix=ossimString(""));
-private:
-   std::vector<ossimAdjustmentInfo> theAdjustmentList;
-   ossim_uint32                     theCurrentAdjustment;
-   
-public:
-   virtual void adjustableParametersChanged();
-   
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/base/ossimAdjustmentExecutive.h b/include/ossim/base/ossimAdjustmentExecutive.h
deleted file mode 100644
index 017b706..0000000
--- a/include/ossim/base/ossimAdjustmentExecutive.h
+++ /dev/null
@@ -1,180 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  David Hicks
-// test
-//
-// Description: Executive class for adjustment operations.
-//----------------------------------------------------------------------------
-#ifndef ossimAdjustmentExecutive_HEADER
-#define ossimAdjustmentExecutive_HEADER
-
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimObservationSet.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/matrix/newmat.h>
-#include <ossim/matrix/newmatap.h>
-#include <ossim/matrix/newmatio.h>
-
-#include <ctime>
-#include <vector>
-#include <iostream>
-
-class ossimWLSBundleSolution;
-class ossimAdjSolutionAttributes;
-
-
-class OSSIM_DLL ossimAdjustmentExecutive : public ossimObject
-{
-public:
-
-   /**
-    * @brief constructor
-    */
-   ossimAdjustmentExecutive(std::ostream& report);
-   
-   /** @brief ossimObservationSet constructor
-    *
-    * @param obsSet     tiepoint observation set.
-    */
-   ossimAdjustmentExecutive(ossimObservationSet& obsSet, std::ostream& report);
-   
-
-   /** @brief destructor */
-   ~ossimAdjustmentExecutive();
-   
-   /**
-    * @brief initialize adjustment solution
-    *
-    * @param obsSet     tiepoint observation set.
-    *
-    * @return true on success, false on error.
-    */
-   bool initializeSolution(ossimObservationSet& obsSet);
-
-   /**
-    * @brief run adjustment solution
-    *
-    * @return true on success, false on error.
-    */
-   bool runSolution();
-
-   /**
-    * @brief summarize solution
-    */
-   void summarizeSolution() const;
-
-
-   /**
-    * @brief compute mean and RMS error of residuals
-    *
-    * @param res   image residual matrix.
-    *
-    * @return true on success, false on error.
-    */
-   bool computeResidualStatistics(NEWMAT::Matrix& res);
-
-
-   /**
-    * @brief compute SEUW
-    *
-    * @return   standard error of unit weight.
-    */
-   double computeSEUW();
-   
-   /**
-    * @brief Print parameter correction method.
-    */
-   std::ostream& printParameterCorrectionSummary(std::ostream& out) const;
-   
-   /**
-    * @brief Print observation correction method.
-    */
-   std::ostream& printObservationCorrectionSummary(std::ostream& out) const;
-   
-   /**
-    * @brief Print residuals method.
-    */
-   std::ostream& printResidualSummary(std::ostream& out) const;
-
-
-   inline bool isValid() const { return theExecValid; }
-
-
-   // Generate time stamp
-   inline ossimString timeStamp()const
-   {
-      char timeString[22];
-      time_t now = time(NULL);
-      strftime(timeString, 22, "%a %m.%d.%y %H:%M:%S", localtime(&now));
-      string timeStamp(timeString);
-      return timeStamp;
-   }
-
-protected:
-   bool theExecValid;
-
-   // Observation set
-   ossimObservationSet* theObsSet;
-
-   // Optimizer
-   ossimWLSBundleSolution* theSol;
-
-   // Attribute interface
-   ossimAdjSolutionAttributes* theSolAttributes;
-
-   // Status parameters
-   double theConvCriteria;
-   int    theMaxIter;
-   bool   theMaxIterExceeded;
-   bool   theSolDiverged;
-   bool   theSolConverged;
-
-   // Traits
-   int theNumObsInSet;
-   int theNumImages;
-   int theNumParams;
-   int theNumMeasurements;
-   int theRankN;
-
-   // Solution arrays
-   NEWMAT::Matrix theMeasResiduals; // theNumMeasurements X 2
-   NEWMAT::Matrix theObjPartials;   // theNumObjObs*3 X 2
-   NEWMAT::Matrix theParPartials;   // theNumImages*(npar/image) X 2
-
-   // Statistics
-   double theXrms;
-   double theYrms;
-   double theXmean;
-   double theYmean;
-   std::vector<double> theSEUW;
-
-   // Adjustable parameter info
-   std::vector<double> theParInitialValues;
-   std::vector<double> theParInitialStdDev;
-   std::vector<ossimString> theParDesc;
-   std::vector<int> theImgs;
-
-   // Observation info
-   std::vector<double> theObsInitialValues;
-   std::vector<double> theObsInitialStdDev;
-   
-   std::ostream& theRep;
-                                  
-   
-   /**
-    * @brief Update adjustable parameters.
-    */
-   bool updateParameters();
-   
-   /**
-    * @brief Update observatin.
-    */
-   bool updateObservations();
-
-};
-
-#endif // #ifndef ossimAdjustmentExecutive_HEADER
diff --git a/include/ossim/base/ossimAdjustmentInfo.h b/include/ossim/base/ossimAdjustmentInfo.h
deleted file mode 100644
index 35e4799..0000000
--- a/include/ossim/base/ossimAdjustmentInfo.h
+++ /dev/null
@@ -1,50 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts (gpotts at imagelinks.com)
-//
-//*************************************************************************
-// $Id: ossimAdjustmentInfo.h 9968 2006-11-29 14:01:53Z gpotts $
-#ifndef ossimAdjustmentInfo_HEADER
-#define ossimAdjustmentInfo_HEADER
-#include <vector>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimAdjustableParameterInfo.h>
-
-class ossimAdjustmentInfo
-{
-public:
-   friend std::ostream& operator <<(std::ostream& out, const ossimAdjustmentInfo& data);
-   
-   
-   ossimAdjustmentInfo(int numberOfAdjustableParameters=0);
-   ossimAdjustmentInfo(const ossimAdjustmentInfo& rhs);
-   
-   void setNumberOfAdjustableParameters(ossim_uint32 numberOfAdjustableParameters);
-   ossim_uint32 getNumberOfAdjustableParameters()const;
-   ossimString getDescription()const;
-   void setDescription(const ossimString& description);
-   bool isDirty()const;
-   void setDirtyFlag(bool flag=true);
-   void setLockParameterFlag(bool flag,
-                             ossim_uint32 idx);
-   void keep();
-   
-   std::vector<ossimAdjustableParameterInfo>& getParameterList();
-   const std::vector<ossimAdjustableParameterInfo>& getParameterList()const;
-   void setLockFlag(bool flag,ossim_uint32 idx);
-   
-   bool saveState(ossimKeywordlist& kwl,
-                  const ossimString& prefix=ossimString(""))const;
-   bool loadState(const ossimKeywordlist& kwl,
-                  const ossimString& prefix=ossimString(""));
-   
-private:
-   std::vector<ossimAdjustableParameterInfo> theParameterList;
-   ossimString                               theDescription;
-   mutable bool                              theDirtyFlag;
-};
-
-#endif
diff --git a/include/ossim/base/ossimArgumentParser.h b/include/ossim/base/ossimArgumentParser.h
deleted file mode 100644
index 40a755b..0000000
--- a/include/ossim/base/ossimArgumentParser.h
+++ /dev/null
@@ -1,200 +0,0 @@
-//-------------------------------------------------------------------------
-//
-// This code was taken from Open Scene Graph and incorporated from into
-// OSSIM.
-//
-//-------------------------------------------------------------------------
-// $Id: ossimArgumentParser.h 19900 2011-08-04 14:19:57Z dburken $
-#ifndef ossimArgumentParser_HEADER
-#define ossimArgumentParser_HEADER 1
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimString.h>
-#include <map>
-#include <string>
-#include <iosfwd>
-
-class ossimApplicationUsage;
-
-class OSSIMDLLEXPORT ossimArgumentParser
-{
-public:
-   
-   class ossimParameter
-   {
-   public:
-      enum ossimParameterType
-      {
-         OSSIM_FLOAT_PARAMETER,
-         OSSIM_DOUBLE_PARAMETER,
-         OSSIM_INT_PARAMETER,
-         OSSIM_UNSIGNED_INT_PARAMETER,
-         OSSIM_STRING_PARAMETER,
-      };
-      
-      union ossimValueUnion
-      {
-         float*          theFloat;
-         double*         theDouble;
-         int*            theInt;
-         unsigned int*   theUint;
-         std::string*    theString;
-      };
-      
-      ossimParameter(float& value)
-      {
-         theType = OSSIM_FLOAT_PARAMETER; theValue.theFloat = &value;
-      }
-      
-      ossimParameter(double& value)
-      {
-         theType = OSSIM_DOUBLE_PARAMETER; theValue.theDouble = &value;
-      }
-      
-      ossimParameter(int& value)
-      {
-         theType = OSSIM_INT_PARAMETER; theValue.theInt = &value;
-      }
-      
-      ossimParameter(unsigned int& value)
-      {
-         theType = OSSIM_UNSIGNED_INT_PARAMETER; theValue.theUint = &value;
-      }
-      
-      ossimParameter(std::string& value)
-      {
-         theType = OSSIM_STRING_PARAMETER; theValue.theString = &value;
-      }
-      
-      ossimParameter(ossimString& value)
-      {
-         theType = OSSIM_STRING_PARAMETER; theValue.theString =
-                                              &(value.string());
-      }
-      
-      bool valid(const char* str) const;
-      bool assign(const char* str);
-      
-   protected:
-      
-      ossimParameterType   theType;
-      ossimValueUnion      theValue;
-   };
-   
-   /** return return true if specified string is an option in the form of
-    * -option or --option .
-    */
-   static bool isOption(const char* str);
-   
-   /** return return true if string is any other string apart from an option.*/
-   static bool isString(const char* str);
-   
-   /** return return true if specified parameter is an number.*/
-   static bool isNumber(const char* str);
-   
-public:
-   
-   ossimArgumentParser(int* argc,char **argv);
-
-   ~ossimArgumentParser();
-
-   /** @brief Initialize from command arguments. */
-   void initialize(int* argc, const char **argv); 
-   
-   void setApplicationUsage(ossimApplicationUsage* usage) { theUsage = usage; }
-   ossimApplicationUsage* getApplicationUsage() { return theUsage; }
-   const ossimApplicationUsage* getApplicationUsage() const { return theUsage; }
-   
-   /** return the argument count.*/
-   int& argc() { return *theArgc; }
-   
-   /** return the argument array.*/
-   char** argv() { return theArgv; }
-   
-   /** return char* argument at specificed position.*/
-   char* operator [] (int pos) { return theArgv[pos]; }
-   
-   /** return const char* argument at specificed position.*/
-   const char* operator [] (int pos) const { return theArgv[pos]; }
-   
-   /** return the application name, as specified by argv[0] */
-   std::string getApplicationName() const;
-   
-   /** return the position of an occurence of a string in the argument list.
-    * return -1 when no string is found.*/      
-   int find(const std::string& str) const;
-   
-   /** return return true if specified parameter is an option in the form of -option or --option .*/
-   bool isOption(int pos) const;
-   
-   /** return return true if specified parameter is an string, which can be any other string apart from an option.*/
-   bool isString(int pos) const;
-   
-   /** return return true if specified parameter is an number.*/
-   bool isNumber(int pos) const;
-   
-   bool containsOptions() const;
-   
-   /** remove one or more arguments from the argv argument list, and decrement the argc respectively.*/
-   void remove(int pos,int num=1);
-   
-   /** return true if specified argument matches string.*/        
-   bool match(int pos, const std::string& str) const;
-   
-   /** search for an occurance of a string in the argument list, on sucess
-    * remove that occurance from the list and return true, otherwise return false.*/
-   bool read(const std::string& str);
-   bool read(const std::string& str, ossimParameter value1);
-   bool read(const std::string& str, ossimParameter value1, ossimParameter value2);
-   bool read(const std::string& str, ossimParameter value1, ossimParameter value2, ossimParameter value3);
-   bool read(const std::string& str, ossimParameter value1, ossimParameter value2, ossimParameter value3, ossimParameter value4);
-   
-   /** Returns the number of parameters of type value associated with specified option, 
-    *  or -1 if option not found */
-   int numberOfParams(const std::string& str, ossimParameter value) const;
-   
-   /** if the argument value at the position pos matches specified string, and subsequent
-    * paramters are also matched then set the paramter values and remove the from the list of arguments.*/
-   bool read(int pos, const std::string& str);
-   bool read(int pos, const std::string& str, ossimParameter value1);
-   bool read(int pos, const std::string& str, ossimParameter value1, ossimParameter value2);
-   bool read(int pos, const std::string& str, ossimParameter value1, ossimParameter value2, ossimParameter value3);
-   bool read(int pos, const std::string& str, ossimParameter value1, ossimParameter value2, ossimParameter value3, ossimParameter value4);
-   
-   
-   enum ossimErrorSeverity
-   {
-      OSSIM_BENIGN = 0,
-      OSSIM_CRITICAL = 1
-   };
-   
-   typedef std::map<std::string,ossimErrorSeverity> ossimErrorMessageMap;
-   
-   /** return the error flag, true if an error has occured when reading arguments.*/
-   bool errors(ossimErrorSeverity severity=OSSIM_BENIGN) const;
-   
-   /** report an error message by adding to the ErrorMessageMap.*/
-   void reportError(const std::string& message,ossimErrorSeverity severity=OSSIM_CRITICAL);
-   
-   /** for each remaining option report it as an unrecongnized.*/
-   void reportRemainingOptionsAsUnrecognized(ossimErrorSeverity severity=OSSIM_BENIGN);
-   
-   /** return the error message, if any has occured.*/
-   ossimErrorMessageMap& getErrorMessageMap() { return theErrorMessageMap; }
-   
-   /** return the error message, if any has occured.*/
-   const ossimErrorMessageMap& getErrorMessageMap() const { return theErrorMessageMap; }
-   
-   /** write out error messages at an above specified .*/
-   void writeErrorMessages(std::ostream& output,ossimErrorSeverity sevrity=OSSIM_BENIGN);
-   
-   
-protected:
-   
-   int*                     theArgc;
-   char**                   theArgv;
-   ossimErrorMessageMap     theErrorMessageMap;
-   ossimApplicationUsage*   theUsage;
-        
-};
-
-#endif
diff --git a/include/ossim/base/ossimBaseObjectFactory.h b/include/ossim/base/ossimBaseObjectFactory.h
deleted file mode 100644
index 2907486..0000000
--- a/include/ossim/base/ossimBaseObjectFactory.h
+++ /dev/null
@@ -1,35 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-// Description:
-//
-//*************************************************************************
-// $Id: ossimBaseObjectFactory.h 9968 2006-11-29 14:01:53Z gpotts $
-#ifndef ossimBaseObjectFactory_HEADER
-#define ossimBaseObjectFactory_HEADER
-#include <ossim/base/ossimObjectFactory.h>
-
-class OSSIMDLLEXPORT ossimBaseObjectFactory : public ossimObjectFactory
-{
-public:
-   virtual ~ossimBaseObjectFactory(){theInstance = NULL;}
-   
-   static ossimBaseObjectFactory* instance();
-   virtual ossimObject* createObject(const ossimString& typeName)const;
-   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
-                                     const char* prefix=0)const;
-   /*!
-    * This should return the type name of all objects in all factories.
-    * This is the name used to construct the objects dynamially and this
-    * name must be unique.
-    */
-   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
-   
-protected:
-   static ossimBaseObjectFactory* theInstance;
-   
-TYPE_DATA
-};
-#endif
diff --git a/include/ossim/base/ossimCallback1.h b/include/ossim/base/ossimCallback1.h
deleted file mode 100644
index 3375676..0000000
--- a/include/ossim/base/ossimCallback1.h
+++ /dev/null
@@ -1,81 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossimCallback1wRet.h
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Simple templated callback class that takes a single parameter(argument) "P1"
-// with void return.
-//
-// See link for more detail description:
-// http://www.tutok.sk/fastgl/callback.html
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#ifndef ossimCallback1_HEADER
-#define ossimCallback1_HEADER 1
-
-/**
- * @class ossimCallback1
- *
- * Usage example, note template params can be anything:
- *
- * Caller interface to register callback:
- *
- * @code
- * void registerCallback(ossimCallback1<const ossimFilename&>* cb);
- * @endcode
- *
- * Callee creation of call back mechanism:
- *
- * @code
- * class ProcessFileCB: public ossimCallback1<const ossimFilename&>
- * {
- * public:
- *    ProcessFileCB(
- *       ossimImageElevationDatabase* obj,
- *       void (ossimImageElevationDatabase::*func)(const ossimFilename&))
- *       :
- *       m_obj(obj),
- *       m_func(func)
- *    {}
- *       
- *    virtual void operator()(const ossimFilename& file) const
- *    {
- *       ( m_obj->*m_func)(file);
- *    }
- * 
- * private:
- *    ossimImageElevationDatabase* m_obj;
- *    void (ossimImageElevationDatabase::*m_func)(const ossimFilename& file);
- * };
- * @endcode
- *
- * Making/registering a callback.
- *
- * @code
- * ossimFileWalker* fw = new ossimFileWalker();
- *
- * ossimCallback1wRet<const ossimFilename&>* cb =
- *    new ProcessFileCB(this, &ossimImageElevationDatabase::processFile);
- *
- * fw->registerProcessFileCallback(cb);
- *
- * @endcode
- */
-template <class P1> class ossimCallback1
-{
-public:
-   ossimCallback1(){}
-   virtual ~ossimCallback1(){}
-   virtual void operator()(P1 p1) const = 0;
-};
-
-#endif /* #ifndef ossimCallback1_HEADER */
diff --git a/include/ossim/base/ossimCallback1wRet.h b/include/ossim/base/ossimCallback1wRet.h
deleted file mode 100644
index 4599662..0000000
--- a/include/ossim/base/ossimCallback1wRet.h
+++ /dev/null
@@ -1,81 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossimCallback1wRet.h
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Simple templated callback class that takes a single parameter(argument) "P1"
-// and has a return "RT".
-//
-// See link for more detail description:
-// http://www.tutok.sk/fastgl/callback.html
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#ifndef ossimCallback1wRet_HEADER
-#define ossimCallback1wRet_HEADER 1
-
-/**
- * @class ossimCallback1wRet
- *
- * Usage example, note template params can be anything:
- *
- * Caller interface to register callback:
- *
- * @code
- * void registerCallback(ossimCallback1wRet<const ossimFilename&, bool>* cb);
- * @endcode
- *
- * Callee creation of call back mechanism:
- *
- * @code
- * class ProcessFileCB: public ossimCallback1wRet<const ossimFilename&, bool>
- * {
- * public:
- *    ProcessFileCB(
- *       ossimImageElevationDatabase* obj,
- *       bool (ossimImageElevationDatabase::*func)(const ossimFilename&))
- *       :
- *       m_obj(obj),
- *       m_func(func)
- *    {}
- *       
- *    virtual bool operator()(const ossimFilename& file) const
- *    {
- *       return ( m_obj->*m_func)(file);
- *    }
- * 
- * private:
- *    ossimImageElevationDatabase* m_obj;
- *    bool (ossimImageElevationDatabase::*m_func)(const ossimFilename& file);
- * };
- * @endcode
- *
- * Making/registering a callback.
- *
- * @code
- * ossimFileWalker* fw = new ossimFileWalker();
- *
- * ossimCallback1wRet<const ossimFilename&, bool>* cb =
- *    new ProcessFileCB(this, &ossimImageElevationDatabase::processFile);
- *
- * fw->registerProcessFileCallback(cb);
- *
- * @endcode
- */
-template <class P1, class RT> class ossimCallback1wRet
-{
-public:
-   ossimCallback1wRet(){}
-   virtual ~ossimCallback1wRet(){}
-   virtual RT operator()(P1 p1) const = 0;
-};
-
-#endif /* #ifndef ossimCallback1wRet_HEADER */
diff --git a/include/ossim/base/ossimCallback2wRet.h b/include/ossim/base/ossimCallback2wRet.h
deleted file mode 100644
index cd03bab..0000000
--- a/include/ossim/base/ossimCallback2wRet.h
+++ /dev/null
@@ -1,82 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossimCallback2wRet.h
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Simple templated callback class that takes a two parameters(arguments) "P1"
-// and has a return "RT".
-//
-// See link for more detail description:
-// http://www.tutok.sk/fastgl/callback.html
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#ifndef ossimCallback2wRet_HEADER
-#define ossimCallback2wRet_HEADER 1
-
-/**
- * @class ossimCallback2wRet
- *
- * Usage example, note template params can be anything:
- *
- * Caller interface to register callback:
- *
- * @code
- * void registerCallback(ossimCallback2wRet<const ossimFilename&, bool&, bool>* cb);
- * @endcode
- *
- * Callee creation of call back mechanism:
- *
- * @code
- * class ProcessFileCB: public ossimCallback2wRet<const ossimFilename&, bool&, bool>
- * {
- * public:
- *    ProcessFileCB(
- *       ossimImageElevationDatabase* obj,
- *       bool (ossimImageElevationDatabase::*func)(const ossimFilename&, bool&))
- *       :
- *       m_obj(obj),
- *       m_func(func)
- *    {}
- *       
- *    virtual bool operator()(const ossimFilename& file, bool& flag) const
- *    {
- *       return ( m_obj->*m_func)(file, flag);
- *    }
- * 
- * private:
- *    ossimImageElevationDatabase* m_obj;
- *    bool (ossimImageElevationDatabase::*m_func)(const ossimFilename& file, bool& flag);
- * };
- * @endcode
- *
- * Making/registering a callback.
- *
- * @code
- * ossimFileWalker* fw = new ossimFileWalker();
- *
- * ossimCallback2wRet<const ossimFilename&, bool&, bool>* cb =
- *    new ProcessFileCB(this, &ossimImageElevationDatabase::processFile);
- *
- * fw->registerProcessFileCallback(cb);
- *
- * @endcode
- */
-
-template <class P1, class P2, class RT> class ossimCallback2wRet
-{
-public:
-   ossimCallback2wRet(){}
-   virtual ~ossimCallback2wRet(){}
-   virtual RT operator()(P1 p1, P2 p2) const = 0;
-};
-
-#endif /* #ifndef ossimCallback2wRet_HEADER */
diff --git a/include/ossim/base/ossimCommon.h b/include/ossim/base/ossimCommon.h
deleted file mode 100644
index 9d5a756..0000000
--- a/include/ossim/base/ossimCommon.h
+++ /dev/null
@@ -1,624 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts, with some additions and modifciations by
-// Patrick Melody
-//
-// Description: Common file for utility functions.
-//
-//*************************************************************************
-// $Id: ossimCommon.h 22197 2013-03-12 02:00:55Z dburken $
-#ifndef ossimCommon_HEADER
-#define ossimCommon_HEADER 1
-
-
-// XXX nullify these for now, but eventually replace with a #include 
-#define ossimREQUIRE(expr) 
-#define ossimENSURE(expr)  
-#define ossimCHECK(expr) 
-#define ossimSTATIC_CHECK(expr,msg)  
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimString.h>
-#include <cfloat>
-#include <cmath>
-#include <istream>
-#include <sstream>
-#include <string>
-#include <vector>
-#include <iostream>
-#include <algorithm>
-#include <iterator>
-class ossimIpt;
-class ossimDpt;
-class ossimGpt;
-namespace NEWMAT
-{
-   class Matrix;
-}
-
-namespace ossim
-{
-   OSSIM_DLL std::istream& skipws(std::istream& in);
-   OSSIM_DLL bool isWhiteSpace(int c);
-    template<class T>
-/*     inline bool almostEqual(T x, T y, T tolerence = std::numeric_limits<T>::epsilon()) */
-/*         // are x and y within tolerance distance of each other? */
-/*         { return std::abs(x - y) <= tolerence; } */
-    inline bool almostEqual(T x, T y, T tolerence = FLT_EPSILON)
-        // are x and y within tolerance distance of each other?
-        { return std::fabs(x - y) <= tolerence; }
-
-    template <class T>
-    inline bool inInterval(T x, T a, T b)
-	// is x in the closed interval [a,b]?
-	{ return x >= a && x <= b; }
-
-    template <class T>
-    inline bool inOpenInterval(T x, T a, T b)
-	// is x in the open interval (a,b)?
-	{ return x > a && x < b; }
-
-   
-    /**
-     * isnan Test for floating point Not A Number (NAN) value.
-     * This should be used test for nan.
-     * DO NOT USE operator==.  Like "if (height == ossim::nan())"
-     *
-     * @return true if nan, false if not.
-     *
-     * @see nan()
-     */
-#if defined(WIN32) || defined(_MSC_VER) && !defined(__CYGWIN__) && !defined(__MWERKS__)
-    inline bool isnan(const float& v) { return _isnan(v); }
-    inline bool isnan(const double& v) { return _isnan(v); }
-#elif defined(sun) || defined(__sun)
-#    if defined(__SVR4) || defined(__svr4__)
-/* Solaris */
-    inline bool isnan(const float& v)  { return ( ::isnan(v) ); }
-    inline bool isnan(const double& v) { return ( ::isnan(v) ); }
-#    else
-/* SunOS */
-    inline bool isnan(const float& v)  { return ( ::isnan(v) ); }
-    inline bool isnan(const double& v) { return ( ::isnan(v) ); }
-#   endif
-#else
-    inline bool isnan(const float& v)  { return ( std::isnan(v) ); }
-    inline bool isnan(const double& v) { return ( std::isnan(v) ); }
-#endif
-
-/* #if defined(WIN32) || defined(_MSC_VER) && !defined(__CYGWIN__) && !defined(__MWERKS__) */
-/*     inline bool isnan(const float& v) { return _isnan(v); } */
-/*     inline bool isnan(const double& v) { return _isnan(v); } */
-/* #else */
-/*     inline bool isnan(const float& v)  { return ( std::isnan(v) ); } */
-/*     inline bool isnan(const double& v) { return ( std::isnan(v) ); } */
-/* #endif */
-
-    /** @brief Class lets us see bit patterns of floats. */
-    class OSSIM_DLL IntFloatBitCoercion
-    {
-    public:
-       union
-       { 
-          ossim_int64 intname;
-          ossim_float64 floatname;
-       } bits;
-       IntFloatBitCoercion(ossim_int64 x)   { bits.intname = x;   }
-       IntFloatBitCoercion(ossim_float64 x) { bits.floatname = x; }
-    };
-    
-    /**
-     * @brief Declaration of nan part of nan() declared here for inline
-     * ossim::nan().
-     */
-    extern OSSIM_DLL_DATA(const IntFloatBitCoercion) nanValue;
-    
-    /**
-     * @brief Method to return ieee floating point double precision NAN.
-     *
-     * @return ieee floating point double precision NAN.
-     *
-     * @see isnan()
-     *
-     * @note casts seamlessly to float and long double.
-     *
-     * @note Use ossim::isnan(v) to test for nan.
-     * Like "if (isnan(myDoubleValue)) { doSomething; }"
-     * DO NOT USE operator==.  Like "if (myDoubleValue == ossim::nan())"
-     */
-    inline double nan() { return nanValue.bits.floatname; }
-
-   template <class T>
-   inline T abs(const T& value)
-   {
-      if(value < 0)
-      {
-         return -value;
-      }
-      return value;
-   }
-    template <class S, class T> 
-    inline T lerp(S x, T begin, T end)
-	// linear interpolation from begin to end by x
-	{ return x*(end - begin) + begin; }
-    
-    template <class T> 
-    inline T inverseLerp(T x, T begin, T end)
-	// inverse of lerp: if lerp(z,begin,end) = x, then inverseLerp(x,begin,end) = z.
-        // when begin=end, inverseLerp is underconstrained, so we define it to be 0.
-	{ return begin == end ? (ossim::isnan(x) ? x : T(0)) : (x - begin)/(end - begin); }
-
-    template <class S, class T> 
-    T quaderp(S x, T begin, T middle, T end)
-	// quadratic interpolation through begin,middle,end by x
-	{
-	    // newton interpolation
-	    const T a1 = S(2)*(middle - begin);
-	    const T a2 = S(2)*(end - middle) - a1;
-	    return x*((x - S(0.5))*a2 + a1) + begin;
-	}
-
-    template <class T> 
-    inline T clamp(T x, T a, T b)
-	// clamp x to [a, b]
-	{
-	    ossimREQUIRE(a <= b);  // input must make sense, disallow nans 
-	    
-            if (ossim::isnan(x)) return x;
-            if (x < a) return a;
-            if (b < x) return b;
-            return x;
-	}
-    
-    template <class T>
-    T wrap(T x, T a, T b)
-	// wrap x modularly into [a,b)
-	{
-	    ossimREQUIRE(a <= b);  // input must make sense, disallow nans 
-	    
-	    if (a == b && !ossim::isnan(x))
-		return a;
-	    else {
-		T z = x < a ? b : a;
-		return std::fmod(x - z, b - a) + z;
-	    }
-	}
-
-    // XXX to Garrett from PJM:
-    //     min and max routines. std::min/max do not in fact correctly handle nan.  
-    //     this is troublesome, i think my code always was asserting no nans before values got
-    //     through std::min/std::max.  i agree with you that if any of the input is nan,
-    //     then the result should be nan, but the STL doesn't really consider the possibility
-    //     that inputs to min/max have a "strange" ordering to them.  we could overload
-    //     std::min/max to do this behavior but that's evil. for all my whining, i think
-    //     we should have ossim::max/max that do the right thing wrt nan.  however:
-    //     if we "correctly" handle nans like this, does that subtly break any existing code?
-    template <class T>
-    inline T min(T a, T b)
-       // min of a,b; nan if either a or b are nan
-    {
-       return (a < b) ? a : b;
-    }
-    
-    template <>
-    inline ossim_float32 min<ossim_float32>(ossim_float32 a, ossim_float32 b)
-    {
-       if (ossim::isnan(a)||ossim::isnan(b))
-       {
-          return ossim::nan();
-       }
-       else
-       {
-          return (a < b) ? a : b;
-       }
-    }
-    
-    template <>
-    inline ossim_float64  min<ossim_float64>(ossim_float64  a, ossim_float64 b)
-    {
-       if (ossim::isnan(a)||ossim::isnan(b))
-       {
-          return ossim::nan();
-       }
-       else
-       {
-          return (a < b) ? a : b;
-       }
-    }
-    
-    template <class T>
-    inline T max(T a, T b)
-       // max of a,b; nan if either a or b are nan
-    {
-       return (a < b) ? b : a;
-    }
-    template <>
-    inline ossim_float32 max<ossim_float32>(ossim_float32 a, ossim_float32 b)
-    {
-       if (ossim::isnan(b))
-          return b;
-       else
-          return (a < b) ? b : a;       
-    }
-    template <>
-    inline ossim_float64 max<ossim_float64>(ossim_float64 a, ossim_float64 b)
-    {
-       if (ossim::isnan(b))
-          return b;
-       else
-          return (a < b) ? b : a;       
-    }
-    inline double radiansToDegrees(double x) { return x*DEG_PER_RAD;}
-    inline double degreesToRadians(double x) { return x*RAD_PER_DEG;}
-    inline double cosd(double x)             { return std::cos(x*RAD_PER_DEG); }
-    inline double sind(double x)             { return std::sin(x*RAD_PER_DEG); }
-    inline double tand(double x)             { return std::tan(x*RAD_PER_DEG); }
-        // trig fncs with parameter in degrees
-        
-    inline double acosd(double x)            { return DEG_PER_RAD*std::acos(x); }
-    inline double asind(double x)            { return DEG_PER_RAD*std::asin(x); }
-    inline double atand(double x)            { return DEG_PER_RAD*std::atan(x); }
-    inline double atan2d(double y, double x) { return DEG_PER_RAD*std::atan2(y,x); }
-        // trig fncs with result in degrees
-
-    template <class IntType>
-    IntType gcd(IntType n, IntType m)
-        // greatest common divisor of two ints
-        // NB: We use n and m as temporaries in this function, so there is no value
-        //     in using const IntType& as we would only need to make a copy anyway...
-        {
-            IntType zero(0);    // Avoid repeated construction
-            
-            // This is abs() - given the existence of broken compilers with Koenig
-            // lookup issues and other problems, I code this explicitly. (Remember,
-            // IntType may be a user-defined type).
-            if (n < zero)
-                n = -n;
-            if (m < zero)
-                m = -m;
-            
-            // As n and m are now positive, we can be sure that %= returns a
-            // positive value (the standard guarantees this for built-in types,
-            // and we require it of user-defined types).
-            for (;;) {
-                if (m == zero)
-                    return n;
-                n %= m;
-                if (n == zero)
-                    return m;
-                m %= n;
-            }
-        }
-
-    template <>
-    inline int gcd<int>(int n, int m)
-        // greatest common divisor specialize for int.
-        // XXX this is the old gcd, the above code is the old ossimGcd().
-        //     i made this a specialization of the template above,
-        //     is this really necessary or more efficient, or can we safely delete this specialization?
-        //     i don't know why this fnc must be decled inline, otherwise there's a compile error.
-        //     the simple test case doesn't have this problem.
-        { 
-            if (m == 0)
-                return n;
-            else
-                return gcd(m, n % m);  // gcc can optimize tail calls right?
-        }
-
-    template <class IntType>
-    IntType lcm(IntType n, IntType m)
-        // least common multiple
-        // NB: We use n and m as temporaries in this function, so there is no value
-        //     in using const IntType& as we would only need to make a copy anyway...
-        {
-            IntType zero(0);    // Avoid repeated construction
-            
-            if (n == zero || m == zero) {
-                return zero;
-            } else {
-                n /= gcd(n, m);
-                n *= m;
-                if (n < zero)
-                    n = -n;
-                return n;
-            }
-        }
-    
-    template<class T> 
-    inline T square(T x)
-        { return x*x; }
-        
-    // identical to copysign() but usable in templates
-    template <class T>
-    inline T sgn(T x) 
-        // signum function, returns 0, 1, -1, or nan
-        {
-            const T table[] = {T(0), T(1), T(-1)};
-            return table[((x < T(0)) << 1) | (x > T(0))];
-        }
-    template <>
-    inline ossim_float32 sgn<ossim_float32>(ossim_float32 x) 
-        // signum function, returns 0, 1, -1, or nan
-        {
-            const ossim_float32 table[] = {ossim_float32(0), ossim_float32(1), ossim_float32(-1)};
-            return ossim::isnan(x) ? x : table[((x < ossim_float32(0)) << 1) | (x > ossim_float32(0))];
-        }
-    template <>
-    inline ossim_float64 sgn(ossim_float64 x) 
-        // signum function, returns 0, 1, -1, or nan
-        {
-            const ossim_float64 table[] = {ossim_float64(0), ossim_float64(1), ossim_float64(-1)};
-            return ossim::isnan(x) ? x : table[((x < ossim_float64(0)) << 1) | (x > ossim_float64(0))];
-        }
-
-    template <class R, class F>    
-    inline R round(F x)
-        // correctly round a float, and cast to desired type R
-        {
-            R result = static_cast<R>((x < F(0)) ? std::ceil(x - F(0.5)) : std::floor(x + F(0.5)));
-            
-            ossimENSURE(ossim::isnan(x) == ossim::isnan(result));   // if x is nan, R must be a float type
-            return result;
-            
-            // XXX is this better than use of ceil/floor?:    return static_cast<long long>((x < T(0)) ? x - T(0.5) : x + T(0.5));
-        }
-
-    inline double ft2mtrs(double feet)      { return (feet * MTRS_PER_FT); }
-    inline double usft2mtrs(double feet)    { return (feet * US_METERS_PER_FT); }
-    inline double mtrs2ft(double meters)    { return (meters / MTRS_PER_FT); }
-    inline double mtrs2usft(double meters)  { return (meters / US_METERS_PER_FT); }
-        // Common conversion functions
-
-    template <class T>
-    std::pair<T, T> quadraticRoots(T a, T b, T c)
-	// evaluates quadradic formula (positive sqrt is first)
-	{
-            // XXX could suffer from catastrophic cancellation, 
-            // see David Goldberg's "What Every Computer Scientist Should Know About Floating-Point Arithmetic"
-	    T s = std::sqrt(b*b - T(4)*a*c);
-	    T twoA = T(2)*a;
-            return std::pair<T, T>((-b + s)/twoA, (-b - s)/twoA); 
-	}
-
-    template <class T>
-    inline void memClear(T& var, int z = 0)
-	// zero out a variable's memory (for a given value of zero)
-	{ memset(&var, z, sizeof(T)); }
-
-    template <class T>
-    inline void memClear(T* var)
-        // prevent user from accidentally passing in a pointer to his struct
-        { ossimSTATIC_CHECK(false, YOU_PROBABLY_WANT_TO_MEMCLEAR_WHAT_THE_POINTER_POINTS_TO_NOT_THE_POINTER_ITSELF); }
-
-    OSSIM_DLL ossimByteOrder byteOrder();
-        // test endianness of current machine 
-
-    // values for various scalar types
-    OSSIM_DLL double defaultMin(ossimScalarType scalarType);
-    OSSIM_DLL double defaultMax(ossimScalarType scalarType);
-    OSSIM_DLL double defaultNull(ossimScalarType scalarType);
-    OSSIM_DLL ossim_uint32 scalarSizeInBytes(ossimScalarType scalarType);
-    
-    /** @brief @return true if scalar type is signed, false if not. */
-    OSSIM_DLL bool isSigned(ossimScalarType scalarType);
-
-    /**
-     * @brief Get actual bits per pixel for a given scalar type.
-     * 
-     * This is bits used.  (OSSIM_USHORT11 = 11)
-     * 
-     * @returns The actual bits per pixel.  This will return 0 if the
-     * input connection is not hooked up or there is an unhandled scalar type.
-     */
-    OSSIM_DLL ossim_uint32 getActualBitsPerPixel(ossimScalarType scalarType);
-    
-    /**
-     * @brief Get bits per pixel for a given scalar type.
-     * 
-     * This the total bits per pixel.  (OSSIM_USHORT11 = 16)
-     * 
-     * @returns The bits per pixel.  This will return 0 if the
-     * input connection is not hooked up or there is an unhandled scalar type.
-     */
-    OSSIM_DLL ossim_uint32 getBitsPerPixel(ossimScalarType scalarType);  
-        
-    OSSIM_DLL void defaultTileSize(ossimIpt& tileSize);
-
-    OSSIM_DLL std::string convertHtmlSpecialCharactersToNormalCharacter(const std::string& src);
-
-    /** Heading pitch roll extraction from a matrix. */
-    OSSIM_DLL bool matrixToHpr( ossim_float64 hpr[3],
-                                const NEWMAT::Matrix& rotation );
-
-    /** Heading pitch roll extraction from a matrix. */
-    OSSIM_DLL bool matrixToHpr( ossim_float64 hpr[3],
-                                const NEWMAT::Matrix& lsrMatrix,
-                                const NEWMAT::Matrix& rotationalMatrix);
-    
-    OSSIM_DLL void lexQuotedTokens(const std::string& str,
-                                   ossim_uint32 start,
-                                   const char* whitespace,
-                                   const char* quotes,
-                                   std::vector<std::string>& tokens, bool& unbalancedQuotes);
-   /**
-    * Will take a vector of ossimDpt and convert to a string list separated by spaces
-    * For example: 
-    *      (45,34) (12,34)
-    */
-   
-   OSSIM_DLL void toStringList(ossimString& resultStringOfPoints,
-                               const std::vector<ossimDpt>& pointList,
-                               char separator=' ');
-   OSSIM_DLL void toStringList(ossimString& resultStringOfPoints,
-                               const std::vector<ossimIpt>& pointList,
-                               char separator = ' ');
-   OSSIM_DLL void toStringList(ossimString& resultStringOfPoints,
-                               const std::vector<ossimGpt>& pointList,
-                               char seaprator = ' ');
-   
-   /**
-    * Will take a string list separated by spaces and convert to a vector of ossimDpts.  It will not clear
-    * the passed in list but will append all points found.
-    */
-   OSSIM_DLL void toVector(std::vector<ossimDpt>& result,
-                           const ossimString& stringOfPoints);
-   OSSIM_DLL void toVector(std::vector<ossimIpt>& result,
-                           const ossimString& stringOfPoints);
-   OSSIM_DLL void toVector(std::vector<ossimGpt>& result,
-                           const ossimString& stringOfPoints);
-   
-   /**
-    * This will output a vector of values inst a string
-    *
-    *  (value1,...,valueN)
-    *
-    * Parenthesis are required
-    */ 
-   template <class T>
-   void toSimpleStringList(ossimString& result,
-                           const std::vector<T>& valuesList)
-   {
-      std::ostringstream out;
-      
-      if(!valuesList.empty())
-      {
-         ossim_uint32 idx = 0;
-         ossim_uint32 size = (ossim_uint32) (valuesList.size()-1);
-         for(idx = 0; idx < size; ++idx)
-         {
-            out << valuesList[idx] << ",";
-         }
-         out << valuesList[size];
-      }
-      
-      result = "("+out.str()+")";
-   }
-   
-   /**
-    * This will output a vector of values inst a string
-    *
-    *  (value1,...,valueN)
-    *
-    * Specialize the char for it will output the actual ascii char instead of the numeric value
-    *
-    * Parenthesis are required
-    */ 
-   template <>
-   OSSIM_DLL void toSimpleStringList(ossimString& result,
-                                     const std::vector<ossim_uint8>& valuesList);
-   
-   /**
-    * Generic function to extract a list of values into a vector of string where
-    * the string of points is of the form:
-    *
-    * (value1,value2, ... , )
-    *
-    * Parenthesis are required
-    */ 
-   OSSIM_DLL bool extractSimpleValues(std::vector<ossimString>& values,
-                                      const ossimString& stringOfPoints);
-
-   
-  template <class T>  bool toSimpleVector(std::vector<T>& result, const ossimString& stringOfPoints)
-  {
-     std::istringstream in(stringOfPoints);
-     ossim::skipws(in);
-     bool returnValue = true;
-     char c = in.get();
-     ossimString value = "";
-     if(c == '(')
-     {
-        c = (char)in.get();
-        while( (c!=')') && (c!= '\n') && (in.good()) )
-        {
-           if(c!= ',')
-           {
-              value += ossimString(c);
-           }
-           else
-           {
-              result.push_back(static_cast<T>(value.toDouble()));
-              value = "";
-           }
-           c = in.get();
-        }
-     }
-     if(c!= ')')
-     {
-        returnValue = false;
-     }
-     else
-     {
-        if(!value.empty())
-        {
-           result.push_back(static_cast<T>(value.toDouble()));
-        }
-     }
-     
-     return returnValue;
-  }
-   
-   /**
-    *  Takes input format of the form:
-    *  (value1,value2,...,valueN)
-    */
-  OSSIM_DLL bool toSimpleVector(std::vector<ossim_uint32>& result,
-                                const ossimString& stringOfPoints);
-   /**
-    *  Takes input format of the form:
-    *  (value1,value2,...,valueN)
-    */
-  OSSIM_DLL bool toSimpleVector(std::vector<ossim_int32>& result,
-                                const ossimString& stringOfPoints);
-   /**
-    *  Takes input format of the form:
-    *  (value1,value2,...,valueN)
-    */
-   OSSIM_DLL bool toSimpleVector(std::vector<ossim_uint16>& result,
-                                 const ossimString& stringOfPoints);
-   /**
-    *  Takes input format of the form:
-    *  (value1,value2,...,valueN)
-    */
-  OSSIM_DLL bool toSimpleVector(std::vector<ossim_int16>& result,
-                                const ossimString& stringOfPoints);
-   /**
-    *  Takes input format of the form:
-    *  (value1,value2,...,valueN)
-    */
-   OSSIM_DLL bool toSimpleVector(std::vector<ossim_uint8>& result,
-                                 const ossimString& stringOfPoints);
-   /**
-    *  Takes input format of the form:
-    *  (value1,value2,...,valueN)
-    */
-   OSSIM_DLL bool toSimpleVector(std::vector<ossim_int8>& result,
-                                 const ossimString& stringOfPoints);
-   
-        // lex str into tokens starting at position start using whitespace  
-	//    chars as delimiters and quotes[0] and quotes[1] as the opening
-	//    and closing quotation chars (for quoting tokens containing whitespace).
-	//    unbalancedQuotes is true iff it aborted when detecting unbalanced quoting.
-	// REQUIRE(whitespace != NULL);
-	// REQUIRE(quotes != NULL);
-	// REQUIRE(tokens != NULL);
-	// REQUIRE(unbalancedQuotes != NULL);
-
-   /**
-    * @brief Get the number threads to use from ossimPreferences or OpenThreads.
-    *
-    * Keyword searched for is:  "ossim_threads"
-    *
-    * If keyword is not found OpenThreads::GetNumberOfProcessors() is used.
-    *
-    * @return Number of threads. Default=1
-    */
-   OSSIM_DLL ossim_uint32 getNumberOfThreads();
-
-}
-
-#endif /* #ifndef ossimCommon_HEADER */
diff --git a/include/ossim/base/ossimConnectableDisplayListener.h b/include/ossim/base/ossimConnectableDisplayListener.h
deleted file mode 100644
index 07649b0..0000000
--- a/include/ossim/base/ossimConnectableDisplayListener.h
+++ /dev/null
@@ -1,109 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (c) 2004, David Burken, all rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: ossimConnectableDisplayListener
-// 
-// This class is intended for connectable displays that wants to be a
-// ossimConnectableObjectListener and a ossimDisplayEventListener to avoid
-// a triangle inheritance.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimConnectableDisplayListener.h 9094 2006-06-13 19:12:40Z dburken $
-
-#ifndef ossimConnectableDisplayListener_HEADER
-#define ossimConnectableDisplayListener_HEADER
-
-#include <ossim/base/ossimListener.h>
-
-class ossimConnectionEvent;
-class ossimObjectDestructingEvent;
-class ossimPropertyEvent;
-class ossimContainerEvent;
-class oossimDisplayListEvent;
-class ossimRefreshEvent;
-class ossimDisplayListEvent;
-class ossimDisplayRefreshEvent;
-
-/**
- * This class is intended for connectable displays that wants to be a
- * ossimConnectableObjectListener and a ossimDisplayEventListener to avoid
- * a triangle inheritance.
- */
-class OSSIMDLLEXPORT ossimConnectableDisplayListener : public ossimListener
-{
-public:
-
-   /** default constructor */
-   ossimConnectableDisplayListener();
-
-   /**
-    * Method called by listener managers.  This will in turn call the correct
-    * xxxEvent method.
-    *
-    * @param event Event to handle.
-    */
-   virtual void processEvent(ossimEvent& event);
-
-   /** @param event Event to handle signifying an object destroying. */
-   virtual void objectDestructingEvent(ossimObjectDestructingEvent& event);
-
-   /** @param event Event to handle signifying an object connecting. */
-   virtual void connectionEvent(ossimConnectionEvent& event);
-
-   /** @param event Event to handle signifying a disconnect input event. */
-   virtual void disconnectInputEvent(ossimConnectionEvent& event);
-
-   /** @param event Event to handle signifying an output disconnect event. */
-   virtual void disconnectOutputEvent(ossimConnectionEvent& event);
-
-   /** @param event Event to handle signifying a connect input event. */
-   virtual void connectInputEvent(ossimConnectionEvent& event);
-
-   /** @param event Event to handle signifying a connect  output event. */
-   virtual void connectOutputEvent(ossimConnectionEvent& event);
-
-   /**
-    * @param event Event to handle signifying a property has changed  event.
-    */
-   virtual void propertyEvent(ossimPropertyEvent& event);
-
-   /**
-    * @param event Event to handle signifying a dislay list  has changed
-    * event.
-    */
-   virtual void displayListEvent(ossimDisplayListEvent&);
-
-   /**
-    * @param event Event to handle signifying a dislay refresh
-    * is needed.
-    */
-   virtual void displayRefreshEvent(ossimDisplayRefreshEvent&);
-
-   /**
-    * @param event Event to handle signifying a refresh is needed.
-    */
-   virtual void refreshEvent(ossimRefreshEvent& event);
-
-   /**
-    * Container Events:
-    * Typically isued by objects that contain children.  If anyone is
-    * interested, can latch on to this event.  Other objects within the
-    * system might be interest in this event even 
-    */
-
-   /** @param event Event signifying an object was added to a container. */
-   virtual void addObjectEvent(ossimContainerEvent& event);
-
-   /** @param event Event signifying an object was removed from a container. */
-   virtual void removeObjectEvent(ossimContainerEvent& event);
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/base/ossimConnectionEvent.h b/include/ossim/base/ossimConnectionEvent.h
deleted file mode 100644
index d86471c..0000000
--- a/include/ossim/base/ossimConnectionEvent.h
+++ /dev/null
@@ -1,79 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-//*************************************************************************
-// $Id: ossimConnectionEvent.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimConnectionEvent_HEADER
-#define ossimConnectionEvent_HEADER
-
-#include <vector>
-
-#include <ossim/base/ossimEventIds.h>
-#include <ossim/base/ossimEvent.h>
-#include <ossim/base/ossimConnectableObject.h>
-
-class OSSIMDLLEXPORT ossimConnectionEvent : public ossimEvent
-{
-public:
-   enum ossimConnectionDirectionType
-   {
-      OSSIM_DIRECTION_UNKNOWN  = 0,
-      OSSIM_INPUT_DIRECTION    = 1,
-      OSSIM_OUTPUT_DIRECTION   = 2,
-      OSSIM_INPUT_OUTPUT_DIRECTION = 3
-   };
-   
-   ossimConnectionEvent(ossimObject* object=NULL,
-                        long id=OSSIM_EVENT_NULL_ID);
-
-   ossimConnectionEvent(ossimObject* object,
-                        long id,
-                        const ossimConnectableObject::ConnectableObjectList& newList,
-                        const ossimConnectableObject::ConnectableObjectList& oldList,
-                        ossimConnectionDirectionType whichDirection);
-
-   ossimConnectionEvent(ossimObject* object,
-                        long id,
-                        ossimConnectableObject* newConnectableObject,
-                        ossimConnectableObject* oldConnectableObject,
-                        ossimConnectionDirectionType whichDirection);
-   
-   ossimConnectionEvent(const ossimConnectionEvent& rhs);
-
-   ossimObject* dup()const;
-   
-   virtual void setDirection(ossimConnectionDirectionType direction);
-   
-   virtual ossimConnectionDirectionType getDirection()const;
-
-   virtual ossim_uint32 getNumberOfNewObjects()const;
-   
-   virtual ossim_uint32 getNumberOfOldObjects()const;
-   
-   virtual ossimConnectableObject* getOldObject(ossim_uint32 i=0);
-
-   virtual ossimConnectableObject* getNewObject(ossim_uint32 i=0);
-
-   virtual bool isDisconnect()const;
-   
-   virtual bool isConnect()const;
-      
-   virtual bool isInputDirection()const;
-   
-   virtual bool isOutputDirection()const;
-   
-protected:
-   ossimConnectableObject::ConnectableObjectList theNewObjectList;
-   ossimConnectableObject::ConnectableObjectList theOldObjectList;
-   ossimConnectionDirectionType         theDirectionType;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/base/ossimConstants.h b/include/ossim/base/ossimConstants.h
deleted file mode 100644
index ee6c327..0000000
--- a/include/ossim/base/ossimConstants.h
+++ /dev/null
@@ -1,556 +0,0 @@
-/********************************************************************
- *
- * License:  See top level LICENSE.txt file.
- *
- * Author: Ken Melero
- * 
- * Description: Common file for global constants.
- *
- **************************************************************************
- * $Id: ossimConstants.h 22221 2013-04-11 15:30:08Z dburken $
- */
-#ifndef ossimConstants_HEADER
-#define ossimConstants_HEADER 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus   
-#include <cfloat>
-#else
-#include <float.h>
-#endif
-#include <ossim/ossimConfig.h>
-
-#ifdef NULL
-#undef NULL
-#define NULL 0
-#endif
-/**
- * WARNINGS SECTION:
- */
-#ifdef _MSC_VER /* Quiet a bunch of MSVC warnings... */
-#  pragma warning(disable:4786) /* visual c6.0 compiler */
-#  pragma warning(disable:4251)/* for std:: member variable to have dll interface */
-#  pragma warning(disable:4275) /* for std:: base class to have dll interface */
-#  pragma warning(disable:4800) /* int forcing value to bool */
-#  pragma warning(disable:4244) /* conversion, possible loss of data */
-#endif
-#if defined(__GNUC__)
-#   define OSSIM_DEPRECATE_METHOD(func) func __attribute__ ((deprecated))
-#elif defined(_MSC_VER)
-#   define OSSIM_DEPRECATE_METHOD(func)  __declspec(deprecated) func 
-#else
-#   define OSSIM_DEPRECATE_METHOD(func)
-#endif
-   
-/**
- * DLL IMPORT/EXORT SECTION
- */
-#if defined(OSSIM_STATIC)
-#  define OSSIMEXPORT
-#  define OSSIMIMPORT
-#  define OSSIMDLLEXPORT
-#  define OSSIM_DLL
-#  define OSSIMDLLEXPORT_DATA(type) type
-#  define OSSIM_DLL_DATA(type) type
-#  define OSSIMDLLEXPORT_CTORFN 
-#elif defined(__MINGW32__) || defined(__CYGWIN__) || defined(_MSC_VER) || defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__)
-#  define OSSIMEXPORT __declspec(dllexport)
-#  define OSSIMIMPORT __declspec(dllimport)
-#  ifdef OSSIMMAKINGDLL
-#    define OSSIMDLLEXPORT OSSIMEXPORT
-#    define OSSIM_DLL       OSSIMEXPORT
-#    define OSSIMDLLEXPORT_DATA(type) OSSIMEXPORT type
-#    define OSSIM_DLL_DATA(type) OSSIMEXPORT type
-#    define OSSIMDLLEXPORT_CTORFN
-#  else
-#    define OSSIMDLLEXPORT OSSIMIMPORT
-#    define OSSIM_DLL      OSSIMIMPORT
-#    define OSSIMDLLEXPORT_DATA(type) OSSIMIMPORT type
-#    define OSSIM_DLL_DATA(type) OSSIMIMPORT type
-#    define OSSIMDLLEXPORT_CTORFN
-#  endif
-#else /* not #if defined(_MSC_VER) */
-#  define OSSIMEXPORT
-#  define OSSIMIMPORT
-#  define OSSIMDLLEXPORT
-#  define OSSIM_DLL
-#  define OSSIMDLLEXPORT_DATA(type) type
-#  define OSSIM_DLL_DATA(type) type
-#  define OSSIMDLLEXPORT_CTORFN
-#endif /* #if defined(_MSC_VER) */
-   
-/**
- * Previous DLL import export section.  Commented out, but left just in case.
- */
-#if 0 /* Comment out ALL this mess! */
-#if defined(_MSC_VER) || defined(__VISUALC__) || defined(__BORLANDC__) || defined(__GNUC__) || defined(__WATCOMC__)
-#  if (_MSC_VER >= 1300)	/* MSVC .NET 2003 version */
-#    define OSSIMEXPORT __declspec(dllexport)
-#    define OSSIMIMPORT __declspec(dllimport)
-#  else
-#    define OSSIMEXPORT __declspec(dllexport)
-#    define OSSIMIMPORT __declspec(dllimport)
-#  endif
-#else /* compiler doesn't support __declspec() */
-#   define OSSIMEXPORT
-#   define OSSIMIMPORT
-#endif
-
-#if defined(__WXPM__)
-#  if defined (__WATCOMC__)
-#    define OSSIMEXPORT __declspec(dllexport)
- /*
-   __declspec(dllimport) prepends __imp to imported symbols. We do NOT
-   want that!
- */
-#    define OSSIMIMPORT
-#  elif (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )))
-#    define OSSIMEXPORT _Export
-#    define OSSIMIMPORT _Export
-#  endif
-#elif defined(__OSSIMMAC__)
-#  ifdef __MWERKS__
-#    define OSSIMEXPORT __declspec(export)
-#    define OSSIMIMPORT __declspec(import)
-#  endif
-#endif
-
-#if defined(_MSC_VER)
-#  pragma warning(disable:4786) /* visual c6.0 compiler */
-#  pragma warning(disable:4251) /* for std:: member variable to have dll interface */
-#  pragma warning(disable:4275) /* for std:: base class to have dll interface */
-#  pragma warning(disable:4800) /* int forcing value to bool */
-#  pragma warning(disable:4244) /* conversion, possible loss of data */
-
-#  ifdef OSSIMSINGLEDLL /* one gigantic dll, all declared export */
-#    ifdef EXPORT_OSMMATRIX
-#      define EXPORT_OSMMATRIX  OSSIMEXPORT
-#    endif
-#    ifndef OSSIMDLLEXPORT
-#      define OSSIMDLLEXPORT    OSSIMEXPORT
-#    endif
-#    ifdef EXPORT_OSMELEV
-#      define EXPORT_OSMELEV    OSSIMEXPORT
-#    endif
-#    ifdef EXPORT_OSMSPTDATA
-#      define EXPORT_OSMSPTDATA OSSIMEXPORT
-#    endif
-#    ifdef EXPORT_ISO8211
-#      define EXPORT_ISO8211    OSSIMEXPORT
-#    endif
-#    ifdef EXPORT_OSMPROJ
-#      define EXPORT_OSMPROJ    OSSIMEXPORT
-#    endif
-#    ifndef EXPORT_OSMIMAGING
-#      define EXPORT_OSMIMAGING OSSIMEXPORT
-#    endif
-#  else /* individual dlls, each with their own import/export symbols */
-#    ifndef EXPORT_OSMMATRIX
-#      ifdef OSMMATRIX_EXPORTS
-#        define EXPORT_OSMMATRIX OSSIMEXPORT
-#      else
-#        define EXPORT_OSMMATRIX OSSIMIMPORT
-#      endif
-#    endif
-#    ifndef OSSIMDLLEXPORT
-#      ifdef OSMBASE_EXPORTS
-#        define OSSIMDLLEXPORT OSSIMEXPORT
-#      else
-#        define OSSIMDLLEXPORT OSSIMIMPORT
-#      endif
-#    endif
-#    ifndef EXPORT_OSMELEV
-#      ifdef OSMELEV_EXPORTS
-#        define EXPORT_OSMELEV OSSIMEXPORT
-#      else
-#        define EXPORT_OSMELEV OSSIMIMPORT
-#      endif
-#    endif
-#    ifndef EXPORT_OSMSPTDATA
-#      ifdef OSMSPTDATA_EXPORTS
-#        define EXPORT_OSMSPTDATA OSSIMEXPORT
-#      else
-#        define EXPORT_OSMSPTDATA OSSIMIMPORT
-#      endif
-#    endif
-#    ifndef EXPORT_OSMPROJ
-#      ifdef OSMPROJ_EXPORTS
-#        define EXPORT_OSMPROJ OSSIMEXPORT
-#      else
-#        define EXPORT_OSMPROJ OSSIMIMPORT
-#      endif
-#    endif
-#    ifndef EXPORT_ISO8211
-#      ifdef ISO8211_EXPORTS
-#        define EXPORT_ISO8211 OSSIMEXPORT
-#      else
-#        define EXPORT_ISO8211 OSSIMIMPORT
-#      endif
-#    endif
-#    ifndef EXPORT_OSMIMAGING
-#      ifdef OSMIMAGING_EXPORTS
-#        define EXPORT_OSMIMAGING OSSIMEXPORT
-#      else
-#        define EXPORT_OSMIMAGING OSSIMIMPORT
-#      endif
-#    endif
-#  endif
-#else /* defined(_MSC_VER) */
-#  ifdef OSSIMMAKINGDLL
-#    define OSSIMDLLEXPORT OSSIMEXPORT
-#    define OSSIM_DLL       OSSIMEXPORT
-#    define OSSIMDLLEXPORT_DATA(type) OSSIMEXPORT type
-#    define OSSIM_DLL_DATA(type) OSSIMEXPORT type
-#    define OSSIMDLLEXPORT_CTORFN
-#  elif defined(OSSIMUSINGDLL)
-#    define OSSIMDLLEXPORT OSSIMIMPORT
-#    define OSSIM_DLL      OSSIMIMPORT
-#    define OSSIMDLLEXPORT_DATA(type) OSSIMIMPORT type
-#    define OSSIM_DLL_DATA(type) OSSIMIMPORT type
-#    define OSSIMDLLEXPORT_CTORFN
-#  else /* not making nor using DLL */
-#    define OSSIMDLLEXPORT
-#    define OSSIM_DLL
-#    define OSSIM_DLL_DATA(type) type
-#    define OSSIMDLLEXPORT_DATA(type) type
-#    define OSSIMDLLEXPORT_CTORFN
-#  endif
-#  define EXPORT_OSMMATRIX  OSSIMDLLEXPORT
-#  define EXPORT_OSMELEV    OSSIMDLLEXPORT
-#  define EXPORT_OSMSPTDATA OSSIMDLLEXPORT
-#  define EXPORT_OSMPROJ    OSSIMDLLEXPORT
-#  define EXPORT_OSMIMAGING OSSIMDLLEXPORT
-#endif
-#endif /* End of commented out "#if 0" old DLL import/export section. */
-
-/*
-  we know that if this is defined all other types are defined
-  since its included from ossimConfig.h
-*/
-typedef char                   ossim_int8;
-typedef unsigned char          ossim_uint8;
-typedef signed char            ossim_sint8;
-
-typedef short                  ossim_int16;
-typedef unsigned short         ossim_uint16;
-typedef signed short           ossim_sint16;
-
-typedef int                    ossim_int32;
-typedef unsigned int           ossim_uint32;
-typedef signed int             ossim_sint32;
-
-typedef float                  ossim_float32;
-typedef double                 ossim_float64;
-
-
-typedef long long              ossim_int64;
-typedef unsigned long long     ossim_uint64;
-typedef signed long long       ossim_sint64;
-   
-typedef ossim_int32            ossimErrorCode;
-
-enum ossimVertexOrdering
-{
-   OSSIM_VERTEX_ORDER_UNKNOWN    = 0,
-   OSSIM_CLOCKWISE_ORDER         = 1,
-   OSSIM_COUNTERCLOCKWISE_ORDER  = 2
-};
-
-//---
-// For histogram builders.  Note that FAST computation mode will not sample all tiles.
-//---   
-enum ossimHistogramMode
-{
-   OSSIM_HISTO_MODE_UNKNOWN = 0,
-   OSSIM_HISTO_MODE_NORMAL  = 1,
-   OSSIM_HISTO_MODE_FAST    = 2
-};
-
-/*
- Corner coordinates are relative to center (0) of pixel
- or relative to the upper left of pixel (1).
-*/
-enum ossimPixelType
-{
-   OSSIM_PIXEL_IS_POINT = 0,
-   OSSIM_PIXEL_IS_AREA  = 1
-};
-
-/*
- Definitions for scalar type identification.
-*/
-enum ossimScalarType
-{
-   OSSIM_SCALAR_UNKNOWN    =  0, 
-   OSSIM_UINT8             =  1, /**< 8 bit unsigned integer        */
-   OSSIM_SINT8             =  2, /**< 8 bit signed integer          */
-   OSSIM_UINT16            =  3, /**< 16 bit unsigned integer       */
-   OSSIM_SINT16            =  4, /**< 16 bit signed integer         */
-   OSSIM_UINT32            =  5, /**< 32 bit unsigned integer       */
-   OSSIM_SINT32            =  6, /**< 32 bit signed integer         */
-   OSSIM_UINT64            =  7, /**< 64 bit unsigned integer       */
-   OSSIM_SINT64            =  8, /**< 64 bit signed integer         */
-   OSSIM_FLOAT32           =  9, /**< 32 bit floating point         */
-   OSSIM_FLOAT64           = 10, /**< 64 bit floating point         */
-   OSSIM_CINT16            = 11, /**< 16 bit complex integer        */
-   OSSIM_CINT32            = 12, /**< 32 bit complex integer        */
-   OSSIM_CFLOAT32          = 13, /**< 32 bit complex floating point */
-   OSSIM_CFLOAT64          = 14, /**< 64 bit complex floating point */
-   OSSIM_NORMALIZED_FLOAT  = 15, /**< 32 bit normalized floating point */
-   OSSIM_NORMALIZED_DOUBLE = 16, /**< 64 bit normalized floating point */
-
-   //---
-   // Below for backward compatibility only.  Please use above enums in
-   // conjunction with null, min, max settings to determine bit depth.
-   //---
-   OSSIM_USHORT11          = 17, /**< 16 bit unsigned integer (11 bits used) */
-   OSSIM_UCHAR             = 1,  /**< 8 bit unsigned iteger  */
-   OSSIM_USHORT16          = 3,  /**< 16 bit unsigned iteger */
-   OSSIM_SSHORT16          = 4,  /**< 16 bit signed integer  */
-   OSSIM_FLOAT             = 9,  /**< 32 bit floating point  */
-   OSSIM_DOUBLE            = 10, /**< 64 bit floating point  */
-};
-
-/*
- Definitions for interleave type identification.
-*/
-enum ossimInterleaveType
-{
-   OSSIM_INTERLEAVE_UNKNOWN = 0,
-   OSSIM_BIL                = 1,  /* band interleaved by line */
-   OSSIM_BIP                = 2,  /* band interleaved by pixel */
-   OSSIM_BSQ                = 3,  /* band sequential */
-   OSSIM_BSQ_MULTI_FILE     = 4   /* band sequential in separate files */
-};
-
-/*
- Definitions for origin location.
-*/
-enum ossimOriginLocationType
-{
-   OSSIM_ORIGIN_LOCATION_UNKNOWN = 0,
-   OSSIM_CENTER                  = 1,
-   OSSIM_UPPER_LEFT              = 2,
-   OSSIM_UPPER_LEFT_CENTER       = 3,
-   OSSIM_LOWER_LEFT              = 4,
-   OSSIM_LOWER_LEFT_CENTER       = 5
-};
-
-/*
- Definitions for coordinate system type.
-*/
-enum ossimCoordinateSystemType
-{
-   OSSIM_COORDINATE_SYSTEM_UNKNOWN = 0,
-   OSSIM_IMAGE_SPACE               = 1,
-   OSSIM_GEOGRAPHIC_SPACE          = 2,
-   OSSIM_PROJECTED_SPACE           = 3,
-   OSSIM_GEOCENTRIC_SPACE          = 4
-};
-
-/*
- Definitions for coordinate system orientation mode .
-*/
-enum ossimCoordSysOrientMode
-{
-   OSSIM_LEFT_HANDED  = 0,
-   OSSIM_RIGHT_HANDED = 1
-};
-
-/*
- Definitions for unit type.
-*/
-enum ossimUnitType
-{
-   OSSIM_UNIT_UNKNOWN    = 0,
-   OSSIM_METERS          = 1,
-   OSSIM_FEET            = 2,
-   OSSIM_US_SURVEY_FEET  = 3,
-   OSSIM_DEGREES         = 4,
-   OSSIM_RADIANS         = 5,
-   OSSIM_NAUTICAL_MILES  = 6,
-   OSSIM_SECONDS         = 7,
-   OSSIM_MINUTES         = 8,
-   OSSIM_PIXEL           = 9,
-   OSSIM_MILES           = 10,
-   OSSIM_MILLIMETERS     = 11,
-   OSSIM_MICRONS         = 12,
-   OSSIM_CENTIMETERS     = 13,
-   OSSIM_YARDS           = 14,
-   OSSIM_INCHES          = 15,
-   OSSIM_KILOMETERS      = 16
-};
-
-/** Definitions for data object status. */
-enum ossimDataObjectStatus
-{
-   OSSIM_STATUS_UNKNOWN = 0,
-   OSSIM_NULL           = 1, // not initialized
-   OSSIM_EMPTY          = 2, // initialized but blank or empty
-   OSSIM_PARTIAL        = 3, // contains some null/invalid values
-   OSSIM_FULL           = 4  // all valid data
-};
-
-/** Definitions for image type identification. */
-enum ossimImageType
-{
-   OSSIM_IMAGE_TYPE_UNKNOWN       = 0,
-   OSSIM_TIFF_STRIP               = 1,
-   OSSIM_TIFF_STRIP_BAND_SEPARATE = 2,
-   OSSIM_TIFF_TILED               = 3,
-   OSSIM_TIFF_TILED_BAND_SEPARATE = 4,
-   OSSIM_GENERAL_RASTER_BIP       = 5,
-   OSSIM_GENERAL_RASTER_BIL       = 6,
-   OSSIM_GENERAL_RASTER_BSQ       = 7,
-   OSSIM_JPEG                     = 8,
-   OSSIM_PDF                      = 9
-};
-
-/** Definitions for metadata type identification. */
-enum ossimMetadataType
-{
-   OSSIM_META_UNKNOWN   = 0,
-   OSSIM_META_TFW       = 1,
-   OSSIM_META_JGW       = 2,
-   OSSIM_META_GEOM      = 3,
-   OSSIM_META_README    = 4,
-   OSSIM_META_FGDC      = 5,
-   OSSIM_META_ENVI      = 6
-};
-
-enum ossimByteOrder
-{
-   OSSIM_LITTLE_ENDIAN = 0,
-   OSSIM_BIG_ENDIAN    = 1
-};
-
-enum ossimCompareType
-{
-   OSSIM_COMPARE_FULL=0,      // compares full traversal if supported.  Not just instance pointers
-   OSSIM_COMPARE_IMMEDIATE=1  // Only immediate attributes are compared
-};
-
-#ifndef FLT_EPSILON
-#  define FLT_EPSILON __FLT_EPSILON__
-#endif
-   
-#ifndef DBL_EPSILON
-#  define DBL_EPSILON __DBL_EPSILON__
-#endif
-   
-#ifndef M_PI
-#  define M_PI             ((ossim_float64)3.141592653589793238462643)
-#endif
-#ifndef TWO_PI
-#  define TWO_PI           ((ossim_float64)(2.0 * M_PI))
-#endif
-#ifndef DEG_PER_RAD
-#  define DEG_PER_RAD      ((ossim_float64)(180.0/M_PI))
-#endif
-#ifndef SEC_PER_RAD
-#  define SEC_PER_RAD      ((ossim_float64)206264.8062471)
-#endif
-#ifndef RAD_PER_DEG
-#  define RAD_PER_DEG      ((ossim_float64)(M_PI/180.0))
-#endif
-#ifndef MTRS_PER_FT
-#  define MTRS_PER_FT      ((ossim_float64)0.3048)
-#endif
-#ifndef FT_PER_MTRS
-#  define FT_PER_MTRS      ((ossim_float64)3.280839895013122)
-#endif
-#ifndef FT_PER_MILE
-#  define FT_PER_MILE      ((ossim_float64)5280.0)
-#endif
-#ifndef SQRT_TWO_PI
-#  define SQRT_TWO_PI      ((ossim_float64)2.50662827463100050242)
-#endif
-#ifndef SQRT_TWO_PI_DIV2
-#  define SQRT_TWO_PI_DIV2 ((ossim_float64)7.07106781186547524401E-1)
-#endif
-
-#define TIFFTAG_OSSIM_METADATA 50955
-#define OSSIM_DEFAULT_TILE_HEIGHT  ((ossim_int32)64)
-#define OSSIM_DEFAULT_TILE_WIDTH   ((ossim_int32)64)
-
-/*
- NOTE Reference for U.S. feet value:
- U.S.G.S. "Map Projections - A Working Manual"
- USGS Professional paper 1395 page 51
-*/
-#ifndef US_METERS_PER_FT
-#  define  US_METERS_PER_FT ((ossim_float64)0.3048006096)
-#endif
-
-//---
-// Integer nan kept for ossimIpt.
-// This should be the most negative int: -2147483648
-//---
-#define OSSIM_INT_NAN ((ossim_sint32)0x80000000)
-
-#define OSSIM_DEFAULT_NULL_PIX_UCHAR  ((ossim_uint8)0)
-#define OSSIM_DEFAULT_MIN_PIX_UCHAR   ((ossim_uint8)1)
-#define OSSIM_DEFAULT_MAX_PIX_UCHAR   ((ossim_uint8)255)
-
-#define OSSIM_DEFAULT_NULL_PIX_UINT8  ((ossim_uint8)0)
-#define OSSIM_DEFAULT_MIN_PIX_UINT8   ((ossim_uint8)1)
-#define OSSIM_DEFAULT_MAX_PIX_UINT8   ((ossim_uint8)255)
-
-#define OSSIM_DEFAULT_NULL_PIX_SINT8  ((ossim_sint8)0x80)
-#define OSSIM_DEFAULT_MIN_PIX_SINT8   ((ossim_sint8)0x81)
-#define OSSIM_DEFAULT_MAX_PIX_SINT8   ((ossim_sint8)0x7F)
-
-#define OSSIM_DEFAULT_NULL_PIX_SINT16 ((ossim_sint16)0x8000)
-#define OSSIM_DEFAULT_MIN_PIX_SINT16  ((ossim_sint16)0x8001)
-#define OSSIM_DEFAULT_MAX_PIX_SINT16  ((ossim_sint16)0x7FFF)
-
-#define OSSIM_DEFAULT_NULL_PIX_UINT16 ((ossim_uint16)0)
-#define OSSIM_DEFAULT_MIN_PIX_UINT16  ((ossim_uint16)1)
-#define OSSIM_DEFAULT_MAX_PIX_UINT16  ((ossim_uint16)0xFFFF)
-
-#define OSSIM_DEFAULT_NULL_PIX_SINT32 ((ossim_sint32)0x80000000)
-#define OSSIM_DEFAULT_MIN_PIX_SINT32  ((ossim_sint32)0x80000001)
-#define OSSIM_DEFAULT_MAX_PIX_SINT32  ((ossim_sint32)0x7FFFFFFF)
-
-#define OSSIM_DEFAULT_NULL_PIX_UINT32 ((ossim_uint32)0)
-#define OSSIM_DEFAULT_MIN_PIX_UINT32  ((ossim_uint32)1)
-#define OSSIM_DEFAULT_MAX_PIX_UINT32  ((ossim_uint32)0xFFFFFFFF)
-
-#define OSSIM_DEFAULT_NULL_PIX_SINT64 ((ossim_sint32)0x8000000000000000)
-#define OSSIM_DEFAULT_MIN_PIX_SINT64  ((ossim_sint32)0x8000000000000001)
-#define OSSIM_DEFAULT_MAX_PIX_SINT64  ((ossim_sint32)0x7FFFFFFFFFFFFFFF)
-
-#define OSSIM_DEFAULT_NULL_PIX_UINT64 ((ossim_uint32)0)
-#define OSSIM_DEFAULT_MIN_PIX_UINT64  ((ossim_uint32)1)
-#define OSSIM_DEFAULT_MAX_PIX_UINT64  ((ossim_uint32)0xFFFFFFFFFFFFFFFF)
-
-#define OSSIM_DEFAULT_NULL_PIX_UINT11 ((ossim_uint16)0)
-#define OSSIM_DEFAULT_MIN_PIX_UINT11  ((ossim_uint16)1)
-#define OSSIM_DEFAULT_MAX_PIX_UINT11  ((ossim_uint16)0x07FF)
-
-#define OSSIM_DEFAULT_NULL_PIX_FLOAT  ((ossim_float32)-1.0/FLT_EPSILON)
-#define OSSIM_DEFAULT_MIN_PIX_FLOAT   ((ossim_float32)((-1.0/FLT_EPSILON) + 1))
-#define OSSIM_DEFAULT_MAX_PIX_FLOAT   ((ossim_float32)((1.0/FLT_EPSILON)))
-
-#define OSSIM_DEFAULT_NULL_PIX_NORM_FLOAT  ((ossim_float32)0)
-#define OSSIM_DEFAULT_MIN_PIX_NORM_FLOAT   ((ossim_float32)((2*FLT_EPSILON)))
-#define OSSIM_DEFAULT_MAX_PIX_NORM_FLOAT   ((ossim_float32)1.0)
-
-#define OSSIM_DEFAULT_NULL_PIX_DOUBLE      ((ossim_float64)-1.0/DBL_EPSILON)
-#define OSSIM_DEFAULT_MIN_PIX_DOUBLE       ((ossim_float64)((-1.0/DBL_EPSILON) + 1))
-#define OSSIM_DEFAULT_MAX_PIX_DOUBLE       ((ossim_float64)((1.0/DBL_EPSILON)))
-
-#define OSSIM_DEFAULT_NULL_PIX_NORM_DOUBLE ((ossim_float64)0)
-#define OSSIM_DEFAULT_MIN_PIX_NORM_DOUBLE  ((ossim_float64)((2*DBL_EPSILON)))
-#define OSSIM_DEFAULT_MAX_PIX_NORM_DOUBLE  ((ossim_float64)(1.0))
-
-#define OSSIM_DEFAULT_MEAN_SEA_LEVEL ((ossim_float64)0.0)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* #ifndef ossimConstants_HEADER */
diff --git a/include/ossim/base/ossimContainerEvent.h b/include/ossim/base/ossimContainerEvent.h
deleted file mode 100644
index d7485c3..0000000
--- a/include/ossim/base/ossimContainerEvent.h
+++ /dev/null
@@ -1,45 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimContainerEvent.h 19966 2011-08-16 18:12:56Z gpotts $
-#ifndef ossimContainerEvent_HEADER
-#define ossimContainerEvent_HEADER
-#include <ossim/base/ossimEvent.h>
-#include <ossim/base/ossimEventIds.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <vector>
-
-class OSSIMDLLEXPORT ossimContainerEvent : public ossimEvent
-{
-public:
-
-   typedef std::vector<ossimRefPtr<ossimObject> > ObjectList;
-   
-   /** constuctor */
-   ossimContainerEvent(ossimObject* obj1,// the object firing the event.
-                       long id);
-
-   void setObjectList(ossimObject* obj);
-   void setObjectList(ObjectList& objects);
-   ObjectList& getObjectList(){return m_objectList;}
-   const ObjectList& getObjectList()const{return m_objectList;}
-   
-protected:
-   
-   /*!
-    * This is the object associated with the container event.
-    * if this was an add then it s the object added to the
-    * container.
-    */
-      ObjectList m_objectList;
-
-TYPE_DATA
-};
-
-#endif /* end of: "#ifndef ossimContainerEvent_HEADER" */
diff --git a/include/ossim/base/ossimDataObject.h b/include/ossim/base/ossimDataObject.h
deleted file mode 100644
index 047c545..0000000
--- a/include/ossim/base/ossimDataObject.h
+++ /dev/null
@@ -1,128 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimDataObject.h 19931 2011-08-10 11:53:25Z gpotts $
-
-#ifndef ossimDataObject_HEADER
-#define ossimDataObject_HEADER
-
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimDpt3d.h>
-
-class ossimSource;
-
-class OSSIMDLLEXPORT ossimDataObject : public ossimObject
-{
-public:
-   ossimDataObject(ossimSource* source=0,
-                   ossimDataObjectStatus status=OSSIM_STATUS_UNKNOWN);
-   
-   ossimDataObject(const ossimDataObject& rhs);
-   virtual ~ossimDataObject();
-
-
-
-   virtual ossim_uint32 getHashId()const=0;
-   
-   /**
-    * Sets the owner of this Data object.
-    */
-   virtual void setOwner(ossimSource* aSource);
-
-   virtual ossimSource* getOwner();
-
-   virtual const ossimSource* getOwner() const;
-
-   /**
-    * Full list found in ossimConstants.h
-    *
-    * OSSIM_STATUS_UNKNOWN
-    * OSSIM_NULL            Null data.  The buffers are never allocated
-    * OSSIM_EMPTY           Allocated data but its empty.  Most of the
-    *                       time this will be the default for an initialized
-    *                       data object.
-    * OSSIM_PARTIAL         Says that some of the object is empty and is only
-    *                       partially full
-    * OSSIM_FULL            This data is completey full
-    */
-   virtual void  setDataObjectStatus(ossimDataObjectStatus status) const;
-
-   /**
-    * @return Returns enumerated status:
-    * OSSIM_STATUS_UNKNOWN = 0
-    * OSSIM_NULL           = 1
-    * OSSIM_EMPTY          = 2
-    * OSSIM_PARTIAL        = 3
-    * OSSIM_FULL           = 4
-    */
-   virtual ossimDataObjectStatus getDataObjectStatus() const;
-
-   /**
-    * @return Returns the status as a string, like "OSSIM_NULL".
-    */
-   virtual ossimString getDataObjectStatusString() const;
-
-   virtual ossim_uint32 getObjectSizeInBytes()const;
-
-   virtual ossim_uint32 getDataSizeInBytes()const=0;
-
-   /**
-    * This is to be overriden in the derived classes so they can check
-    * If their data is null.
-    */
-   virtual bool isInitialize() const;
-
-   /**
-    * Will allow derived classes to initialize their buffers.  This class
-    * does nothing with this and reset any internal attributes.
-    */
-   virtual void initialize()=0;
-   
-   virtual void assign(const ossimDataObject* rhs);
-
-   /**
-    * Derived classes should implement this method.  For data objects
-    * there is usually 2 types of tests a shallow and a deep test.  If
-    * deepTest is false then a shallow test is performed.  I shallow test
-    * just doesn't compare the data but instead compares the fields that
-    * describes the data. For example if it were an ossimImageData then a
-    * shallow compare will just compare the origin, scale, width, height,
-    * number of bands, min, max, null, and scalar type.  If
-    * it were a deep compare it will also test the actual data to one another.
-    */
-   virtual bool isEqualTo(const ossimDataObject& rhs,
-                          bool deepTest=false)const=0;
-   
-   virtual const ossimDataObject* operator =(const ossimDataObject* rhs);
-   
-   virtual const ossimDataObject& operator=(const ossimDataObject& rhs);
-
-   virtual bool operator==(const ossimDataObject& rhs) const;
-   virtual bool operator!=(const ossimDataObject& rhs) const;
-
-   virtual std::ostream& print(std::ostream& out) const;
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-
-protected:
-
-   //***
-   // Note:  This object is not responsible for deletion of the ossimSource*
-   //        "theSource".  It is simply a hook to his owner for things
-   //        like unregister and so forth...
-   //***
-   ossimSource*                      theOwner;
-   mutable ossimDataObjectStatus     theDataObjectStatus;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/base/ossimDate.h b/include/ossim/base/ossimDate.h
deleted file mode 100644
index b96f6a9..0000000
--- a/include/ossim/base/ossimDate.h
+++ /dev/null
@@ -1,272 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimDate.h 19704 2011-05-31 22:20:40Z dburken $
-#ifndef ossimDate_HEADER
-#define ossimDate_HEADER
-#include <ctime>
-#include <iosfwd>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimXmlNode.h>
-
-class OSSIM_DLL ossimLocalTm : public std::tm
-{
-public:
-   friend OSSIM_DLL std::ostream& operator<<(std::ostream& out, const ossimLocalTm& src);
-   friend OSSIM_DLL int operator== (const ossimLocalTm& t1,
-                                    const ossimLocalTm& src);
-   friend OSSIM_DLL int operator!= (const ossimLocalTm& t1,
-                                    const ossimLocalTm& src);
-   friend OSSIM_DLL int operator<  (const ossimLocalTm& t1,
-                                    const ossimLocalTm& src);
-   friend OSSIM_DLL int operator<= (const ossimLocalTm& t1,
-                                    const ossimLocalTm& src);
-   friend OSSIM_DLL int operator>  (const ossimLocalTm& t1,
-                                    const ossimLocalTm& src);
-   friend OSSIM_DLL int operator>= (const ossimLocalTm& t1,
-                                    const ossimLocalTm& src);
-   
-   ossimLocalTm (time_t t=0);     // Set to time, 0 is magic for 'now'
-   ossimLocalTm (tm const & t); // Copy constructor
-   
-   ossimLocalTm & operator= (tm const & t);            // Assignment
-   operator time_t (void) const;        // Conversion operator
-   
-   int isValid (void) const;             // Test for validity
-   
-   void now();
-   int compare (ossimLocalTm const & t) const;      // Compare times
-   int compare (std::time_t const tt) const;       // Compare times
-   
-   enum ossimLocalTmFormat     // Date format flags
-   {
-      ossimLocalTmFormatYear          = (int)0x0001,            // Print year
-      ossimLocalTmFormatYearShort     = (int)0x0002, // Print last two digits
-      ossimLocalTmFormatPadYear       = (int)0x0004,    // Pad year to 2 or 4
-      ossimLocalTmFormatZeroYear      = (int)0x0008,        // Zero fill year
-      ossimLocalTmFormatMonth         = (int)0x0010,           // Print month
-      ossimLocalTmFormatMonText       = (int)0x0020,   // Print month in text
-      ossimLocalTmFormatPadMon        = (int)0x0040, // Pad to 2 (trunc to 3)
-      ossimLocalTmFormatZeroMon       = (int)0x0080,       // Zero fill month
-      ossimLocalTmFormatDay           = (int)0x0100,            // Print date
-      ossimLocalTmFormatDayOfWeek     = (int)0x0200,     // Print day of week
-      ossimLocalTmFormatPadDay        = (int)0x0400,         // Pad date to 2
-      ossimLocalTmFormatZeroDay       = (int)0x0800,         // Zero fill day
-      ossimLocalTmFormatDMY           = (int)0x0111, // Print date, mth, year
-      ossimLocalTmFormatPadDMY        = (int)0x0444,         // Pad all three
-      ossimLocalTmFormatZeroDMY       = (int)0x0888,   // Zero fill all three
-      ossimLocalTmFormatYearFirst     = (int)0x1000,      // Print year first
-      ossimLocalTmFormatMonFirst      = (int)0x2000,     // Print month first
-      ossimLocalTmFormatSepChar       = (int)0x4000,// Separate fields datech
-      ossimLocalTmFormatSepSpace      = (int)0x8000,  // Separate fields space
-      ossimLocalTmFormatInternational = (int)(ossimLocalTmFormatDMY|ossimLocalTmFormatMonText|ossimLocalTmFormatPadMon|
-                                              ossimLocalTmFormatSepSpace),
-      ossimLocalTmFormatIntlShort     = (int)(ossimLocalTmFormatDMY|ossimLocalTmFormatMonText|ossimLocalTmFormatPadMon|
-                                              ossimLocalTmFormatSepSpace|ossimLocalTmFormatYearShort),
-      ossimLocalTmFormatUsa           = (int)(ossimLocalTmFormatDMY|ossimLocalTmFormatMonFirst|ossimLocalTmFormatPadDMY|
-                                              ossimLocalTmFormatZeroDMY|ossimLocalTmFormatYearShort|ossimLocalTmFormatSepChar),
-      ossimLocalTmFormatEnglish       = (int)(ossimLocalTmFormatDMY|ossimLocalTmFormatYearShort|ossimLocalTmFormatPadDMY|
-                                              ossimLocalTmFormatZeroDMY|ossimLocalTmFormatSepChar),
-      ossimLocalTmFormatJapanese      = (int)(ossimLocalTmFormatDMY|ossimLocalTmFormatYearFirst|ossimLocalTmFormatPadDMY|
-                                              ossimLocalTmFormatZeroDMY|ossimLocalTmFormatYearShort|ossimLocalTmFormatMonFirst|
-                                              ossimLocalTmFormatSepChar),
-      ossimLocalTmFormatFull          = (int)(ossimLocalTmFormatDMY|ossimLocalTmFormatDayOfWeek|ossimLocalTmFormatMonText|
-                                              ossimLocalTmFormatSepSpace)
-   };
-   
-   enum ossimTimeFormat  // Time format (nb: time zones not implemented)
-   {
-      ossimTimeFormatSecs          = (int)0x0001,         // Print seconds
-      ossimTimeFormatZeroSecs      = (int)0x0002,     // Zero fill seconds
-      ossimTimeFormatPadSecs       = (int)0x0004,      // Pad seconds to 2
-      ossimTimeFormatSecsAll       = (int)0x0007,
-      ossimTimeFormatTimeZone      = (int)0x0008,        // Print timezone
-      ossimTimeFormatMins          = (int)0x0010,         // Print minutes
-      ossimTimeFormatZeroMins      = (int)0x0020,     // Zero fill minutes
-      ossimTimeFormatPadMins       = (int)0x0040,      // Pad minutes to 2
-      ossimTimeFormatMinsAll       = (int)0x0070,
-      ossimTimeFormatTZNumeric     = (int)0x0080,      // Print numeric TZ
-      ossimTimeFormatHour          = (int)0x0100,            // Print hour
-      ossimTimeFormatZeroHour      = (int)0x0200,        // Zero fill hour
-      ossimTimeFormatPadHour       = (int)0x0400,  // Pad hour to 2 digits
-      ossimTimeFormatHourAll       = (int)0x0700,
-      ossimTimeFormat24hour        = (int)0x0800,          // 24hour clock
-      ossimTimeFormatSepChar       = (int)0x1000, // Separate field timech
-      ossimTimeFormatSepSpace      = (int)0x2000, // Separate fields space
-      ossimTimeFormatSepAbbrev     = (int)0x4000,     // Add abbreviations
-      ossimTimeFormatAmPm          = (int)0x8000,       // Add 'am' or 'pm'
-      ossimTimeFormatInternational = (int)(ossimTimeFormatHourAll|ossimTimeFormatMinsAll|ossimTimeFormatSecsAll|
-                                           ossimTimeFormat24hour|ossimTimeFormatSepChar),
-      ossimTimeFormatShortTime     = (int)(ossimTimeFormatHourAll|ossimTimeFormatMinsAll|ossimTimeFormat24hour|
-                                           ossimTimeFormatSepChar),
-      ossimTimeFormatClockTime     = (int)(ossimTimeFormatHour|ossimTimeFormatPadHour|ossimTimeFormatMinsAll|
-                                           ossimTimeFormatAmPm|ossimTimeFormatSepChar),
-      ossimTimeFormatLongTime      = (int)(ossimTimeFormatHour|ossimTimeFormatPadHour|ossimTimeFormatMinsAll|
-                                           ossimTimeFormatSecsAll|ossimTimeFormatSepAbbrev|ossimTimeFormatSepSpace),
-      ossimTimeFormatMillitary     = (int)(ossimTimeFormatHourAll|ossimTimeFormatMinsAll|ossimTimeFormat24hour)
-   };
-   
-   
-   static char timech;    // Character used for time separator
-   static char datech;    // Character used for date separator
-   static int datefmt;                  // Default date format
-   static int timefmt;                  // Default time format
-   
-   // Output methods
-   std::ostream& print(std::ostream & os,
-                       int df =datefmt,
-                       int tf =timefmt) const;
-   std::ostream& printTime(std::ostream & os, int f =timefmt) const;
-   std::ostream& printDate(std::ostream & os, int f =datefmt) const;
-   
-   /**
-    * @brief method to dump all the data members.  This is the tm struct +
-    * the theFractionalSecond from this class.
-    *
-    * @note: tm_gmtoff and  tm_zone from tm struct are not printed as they
-    * are not standard.
-    *
-    * @param os Stream to dump to.
-    *
-    * @return stream.
-    */
-   std::ostream& dump(std::ostream& os) const;
-   
-   
-   int getYear()const;
-   
-   int getShortYear()const;
-   
-   /*!
-    * This is one based i.e. values are returned between 1-12
-    */
-   int getMonth()const;
-   
-   /*!
-    * returns the day 1-31
-    */
-   int getDay()const;
-   double getJulian()const;
-   double getModifiedJulian()const;
-   
-   ossimLocalTm& setDay(int day);
-   /*!
-    * The month is a number bewteen 1 and 12.  We will shift it to the internal
-    * representation
-    */
-   ossimLocalTm& setMonth(int month);
-   ossimLocalTm& setYear(int year);
-   ossimLocalTm& setDateFromJulian(double jd);
-   ossimLocalTm& setDateFromModifiedJulian(double mjd);
-   
-   void setFractionalDay(double fractionalDay);
-   static void extractHmsFromFractionalDay(double fractionalDay,
-                                           int &h,
-                                           int &m,
-                                           int &s,
-                                           double& fractionalSecond);
-   int getHour()const;
-   int getMin()const;
-   int getSec()const;
-   double getFractionalSecond()const;
-   ossimLocalTm& setHour(int h);
-   ossimLocalTm& setMin(int m);
-   ossimLocalTm& setSec(int s);
-   ossimLocalTm& setFloatSec(double s);
-   ossimLocalTm& setFractionalSecond(double fractS);
-   
-   /**
-    * getTicks() will call getEpoc.  This is te number of microseconds passed
-    * since (00:00:00 UTC, January 1, 1970)
-    */ 
-   time_t getTicks()const;
-   time_t getEpoc()const;
-   
-   void addSeconds(ossim_float64 n);
-   void addMinutes(ossim_float64 n);
-   void addHours(ossim_float64 n);
-   void addDays(ossim_float64 n);
-   
-   ossim_float64 deltaInSeconds(const ossimLocalTm& d)const;
-   ossim_float64 deltaInMinutes(const ossimLocalTm& d)const;
-   ossim_float64 delatInHours(const ossimLocalTm& d)const;
-   ossim_float64 deltaInDays(const ossimLocalTm& d)const;
-   
-   ossimLocalTm convertToGmt()const;
-   /**
-    * Will not adjust for timezone.  The passed in value is based on seconds.
-    */ 
-   void setTimeNoAdjustmentGivenEpoc(time_t ticks);
-   
-   /**
-    * Will adjust for timezone. The passed in value is based on seconds.
-    */ 
-   void setTimeGivenEpoc(time_t ticks);
-   
-   bool setIso8601(const std::string& timeString, bool shiftToGmtOffsetZero=false);
-   
-   ossimRefPtr<ossimXmlNode> saveXml()const;
-   bool loadXml(ossimRefPtr<ossimXmlNode> dateNode);
-   
-protected:
-   // Time suffix
-   void tSfx(std::ostream & os, int fmt, char ch) const;
-   // Time field formatters
-   void pHour(std::ostream & os, int fmt) const;
-   void pMins(std::ostream & os, int fmt) const;
-   void pSecs(std::ostream & os, int fmt) const;
-   // Date suffix
-   void dSfx(std::ostream & os, int fmt) const;
-   // Date field formatters
-   void pDate(std::ostream & os, int fmt) const;
-   void pMonth(std::ostream & os, int fmt) const;
-   void pYear(std::ostream & os, int fmt) const;
-   
-   double theFractionalSecond;
-};
-
-
-class OSSIM_DLL ossimDate : public ossimLocalTm
-{
-public:
-   friend OSSIM_DLL std::ostream& operator<<(std::ostream& out, const ossimDate& src);
-   
-   ossimDate(int datefmt =ossimLocalTm::datefmt);
-   ossimDate (ossimLocalTm const & t,
-              int dtfmt =ossimLocalTm::datefmt);
-   ossimDate (time_t t, int dtfmt =ossimLocalTm::datefmt);
-   ossimDate(int month, int day, int year,int dtfmt=ossimLocalTm::datefmt);
-   
-   int fmt(int f);
-   int fmt(void) const;
-   
-   std::ostream & print (std::ostream & os) const;
-   
-private:
-   int _fmt;
-};
-
-class OSSIM_DLL ossimTime :public ossimLocalTm
-{
-public:
-   friend OSSIM_DLL std::ostream& operator<<(std::ostream& out, const ossimTime& src);
-   ossimTime(int tmfmt =ossimLocalTm::timefmt);
-   ossimTime (ossimTime const & t,
-              int tmfmt =ossimLocalTm::timefmt);
-   ossimTime (time_t t, int tmfmt =ossimLocalTm::timefmt);
-   
-   int fmt (int f);
-   int fmt (void) const;
-   
-   std::ostream& print (std::ostream & os) const;
-   
-private:
-   int _fmt;   
-};
-#endif
diff --git a/include/ossim/base/ossimDateProperty.h b/include/ossim/base/ossimDateProperty.h
deleted file mode 100644
index 211563f..0000000
--- a/include/ossim/base/ossimDateProperty.h
+++ /dev/null
@@ -1,37 +0,0 @@
-//*******************************************************************
-//
-// LICENSE: LGPL see top level license.txt
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimDateProperty.h 9094 2006-06-13 19:12:40Z dburken $
-#ifndef ossimDateProperty_HEADER
-#define ossimDateProperty_HEADER
-#include <ossim/base/ossimProperty.h>
-#include <ossim/base/ossimDate.h>
-
-class OSSIM_DLL ossimDateProperty : public ossimProperty
-{
-public:
-   ossimDateProperty();
-   ossimDateProperty(const ossimString& name,
-                     const ossimString& value);
-   ossimDateProperty(const ossimString& name,
-                     const ossimLocalTm& value);
-   ossimDateProperty(const ossimDateProperty& src);
-   virtual ossimObject* dup()const;
-   
-   void setDate(const ossimLocalTm& localTm);
-   const ossimLocalTm& getDate()const;
-   virtual bool setValue(const ossimString& value);
-   virtual void valueToString(ossimString& valueResult)const;
-   virtual const ossimProperty& assign(const ossimProperty& rhs);
-   
-protected:
-   ossimLocalTm theValue;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/base/ossimDatumFactory.h b/include/ossim/base/ossimDatumFactory.h
deleted file mode 100644
index 1d08163..0000000
--- a/include/ossim/base/ossimDatumFactory.h
+++ /dev/null
@@ -1,69 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-// Description:
-//
-// This is the DatumFactory class.  You give it a code and it will
-// construct a Datum class.  It returns NULL if no code was found.
-//*******************************************************************
-//  $Id: ossimDatumFactory.h 19682 2011-05-31 14:21:20Z dburken $
-
-#ifndef ossimDatumFactory_HEADER
-#define ossimDatumFactory_HEADER 1
-
-#include <ossim/base/ossimDatumFactoryInterface.h>
-#include <ossim/base/ossimEllipsoidFactory.h>
-#include <map>
-#include <string>
-#include <vector>
-
-class ossimFilename;
-class ossimDatum;
-class ossimWgs84Datum;
-class ossimWgs72Datum;
-class ossimString;
-
-class OSSIM_DLL ossimDatumFactory : public ossimDatumFactoryInterface
-{
-public:
-
-   /** virtual destructor */
-   virtual ~ossimDatumFactory();
-
-   /**
-    * create method
-    *
-    * Implements pure virtual ossimDatumFactoryInterface::create.
-    *
-    * @return const pointer to a datum.
-    */
-   virtual const ossimDatum* create(const ossimString &code)const;
-   virtual const ossimDatum* create(const ossimKeywordlist& kwl, const char *prefix=0)const;
-
-   const ossimDatum* create(const ossimDatum* copy) const;
-
-   static ossimDatumFactory* instance();
-   const ossimDatum* wgs84()const{return theWgs84Datum;}
-   const ossimDatum* wgs72()const{return theWgs72Datum;}
-   std::vector<ossimString> getList()const;
-   virtual void getList(std::vector<ossimString>& list)const;
-   void writeCStructure(const ossimFilename& file);
-protected:
-   static ossimDatumFactory*       theInstance;
-   const ossimDatum*               theWgs84Datum;
-   const ossimDatum*               theWgs72Datum;
-   std::map<std::string, const ossimDatum*> theDatumTable;
-   
-
-   ossimDatumFactory()
-      :theWgs84Datum(0),
-       theWgs72Datum(0)
-       {}
-
-   void deleteAll();
-   void initializeDefaults();
-};
-#endif
diff --git a/include/ossim/base/ossimDatumFactoryRegistry.h b/include/ossim/base/ossimDatumFactoryRegistry.h
deleted file mode 100644
index 9180760..0000000
--- a/include/ossim/base/ossimDatumFactoryRegistry.h
+++ /dev/null
@@ -1,75 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file
-//
-// Author:  David Burken
-//
-// Description: Class declaration of Registry (singleton) for datum factories.
-//
-//----------------------------------------------------------------------------
-// $Id$
-
-#ifndef ossimDatumFactoryRegistry_HEADER
-#define ossimDatumFactoryRegistry_HEADER
-
-#include <vector>
-#include <ossim/base/ossimConstants.h> /* for OSSIM_DLL macro */
-#include <ossim/base/ossimDatumFactoryInterface.h> 
-#include <OpenThreads/ReadWriteMutex>
-
-// Forward class declarations.
-class ossimDatumFactoryInterface;
-class ossimString;
-class ossimDatum;
-
-class OSSIM_DLL ossimDatumFactoryRegistry : public ossimDatumFactoryInterface
-{
-public:
-   
-   /** destructor */
-   ~ossimDatumFactoryRegistry();
-
-   /**
-    * instance method
-    *
-    * @return Point to the instance of the registry.
-    */
-   static ossimDatumFactoryRegistry* instance();
-
-   /**
-    * Method to add factory to registry.
-    * @param factory Factory to register.
-    */
-   void registerFactory(ossimDatumFactoryInterface* factory);
-   
-   /**
-    * create method
-    *
-    * Implements pure virtual ossimDatumFactoryInterface::create.
-    *
-    * @return const pointer to a datum.
-    */
-   virtual const ossimDatum* create(const ossimString& code)const;
-   virtual const ossimDatum* create(const ossimKeywordlist& kwl, const char *prefix=0) const;
-
-   /**
-    * getList method to return a combined list of all datums from registered
-    * datum factories.
-    *
-    * @param list The list to add to.
-    */
-   virtual void getList(std::vector<ossimString>& list) const;
-   
-protected:
-
-   /** hidden from use default constructor */
-   ossimDatumFactoryRegistry();
-
-   /** Single static instance of this class. */
-   static ossimDatumFactoryRegistry* theInstance;
-
-	mutable OpenThreads::ReadWriteMutex theFactoryListMutex;
-   std::vector<ossimDatumFactoryInterface*> theFactoryList;
-};
-
-#endif /* #ifndef ossimDatumFactoryRegistry_HEADER */
diff --git a/include/ossim/base/ossimDirectory.h b/include/ossim/base/ossimDirectory.h
deleted file mode 100644
index 32a1ae3..0000000
--- a/include/ossim/base/ossimDirectory.h
+++ /dev/null
@@ -1,105 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-//
-// Description: 
-//
-//*************************************************************************
-// $Id: ossimDirectory.h 14776 2009-06-25 14:34:06Z dburken $
-#ifndef ossimDirectory_HEADER
-#define ossimDirectory_HEADER
-
-#include <ossim/base/ossimFilename.h>
-
-#ifndef _WIN32
-class ossimDirectoryData;
-#endif
-
-class  OSSIMDLLEXPORT ossimDirectory
-{
-public:
-   
-   /*!
-    * These flags define what kind of filenames is included in the list
-    * of files enumerated by GetFirst/GetNext.
-    */
-   enum
-   {
-      OSSIM_DIR_FILES     = 0x0001,       // include files
-      OSSIM_DIR_DIRS      = 0x0002,       // include directories
-      OSSIM_DIR_HIDDEN    = 0x0004,       // include hidden files
-      OSSIM_DIR_DOTDOT    = 0x0008,       // include '.' and '..'
-      
-      // by default, enumerate everything except '.' and '..'
-      OSSIM_DIR_DEFAULT   = OSSIM_DIR_FILES | OSSIM_DIR_DIRS | OSSIM_DIR_HIDDEN
-   };
-
-
-   ossimDirectory();
-   
-   ossimDirectory(const ossimFilename& dir);
-   
-   ~ossimDirectory();
-   
-   bool open(const ossimFilename& dir);
-   
-   bool isOpened() const;
-   
-   bool getFirst(ossimFilename &filename,
-                 int flags = OSSIM_DIR_DEFAULT);
-   
-   /*!
-    * Get next file in the enumeration started with either GetFirst() or
-    * GetFirstNormal().
-    */
-   bool getNext(ossimFilename &filename) const;
-   
-   void findAllFilesThatMatch(std::vector<ossimFilename>& result,
-                              const ossimString& regularExpressionPattern,
-                              int flags = OSSIM_DIR_DEFAULT);
-   
-#if defined (_WIN32)
-   void setFlags(int flags) { theFlags = flags; };
-   bool fileMatched(ossimFilename &filename) const;
-#endif    
-
-   // ESH 07/2008, Trac #234: OSSIM is case sensitive 
-   // when using worldfile templates during ingest
-   /*!
-    * Case insensitive search for files with the same name but 
-    * with letters that have different case than the input name. 
-    *
-    * On Windows there can only be one match, but the case can be 
-    * different than the input name. On UNIX there can be multiple 
-    * matches.
-    *
-    * If the bExcludeExactMatch input parameter is set to false, 
-    * the original input name will be included in the 'result'
-    * vector if it is found in the directory. Otherwise (the default),
-    * the input name is excluded from the 'result' vector even if it
-    * is found in the directory.
-    *
-    * Returns true if a name has been added to the result vector.
-    */
-   bool findCaseInsensitiveEquivalents( const ossimFilename &filename, 
-                                        std::vector<ossimFilename>& result,
-                                        bool bExcludeExactMatch = true );
-   
-   // TODO using scandir() when available later, emulating it otherwise
-   
-private:
-#if defined (_WIN32)
-   long          theData;
-   ossimFilename theDirectoryName;
-   int           theFlags;
-#else
-   ossimDirectoryData *theData;
-#endif
-};
-
-#endif /* #ifndef ossimDirectory_HEADER */
diff --git a/include/ossim/base/ossimDisplayInterface.h b/include/ossim/base/ossimDisplayInterface.h
deleted file mode 100644
index 9953db9..0000000
--- a/include/ossim/base/ossimDisplayInterface.h
+++ /dev/null
@@ -1,40 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimDisplayInterface.h 9094 2006-06-13 19:12:40Z dburken $
-#ifndef ossimDisplayInterface_HEADER
-#define ossimDisplayInterface_HEADER
-#include <ossim/base/ossimRtti.h>
-#include <ossim/base/ossimString.h>
-
-class OSSIMDLLEXPORT ossimDisplayInterface
-{
-public:
-   ossimDisplayInterface();
-
-   virtual ~ossimDisplayInterface();
-
-   /*!
-    * Returns the display back to the caller
-    */
-   virtual void* getDisplayDevice()=0;
-
-   virtual void setTitle(const ossimString& title)=0;
-   virtual void getTitle(ossimString& title)const=0;
-   virtual ossimString getTitle()const;
-   virtual void close()=0;
-   virtual bool isOpen() const=0;
-   virtual bool open()=0;
-   virtual bool isMinimized()const=0;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/base/ossimDpt3d.h b/include/ossim/base/ossimDpt3d.h
deleted file mode 100644
index 125fd92..0000000
--- a/include/ossim/base/ossimDpt3d.h
+++ /dev/null
@@ -1,144 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-// Description:  
-//
-// Contains class declaration for dpt3d
-// Used to represent a 3d double point containing an x, y and z data member.
-//*******************************************************************
-//  $Id: ossimDpt3d.h 16347 2010-01-13 23:12:09Z dburken $
-
-#ifndef ossimDpt3d_HEADER
-#define ossimDpt3d_HEADER
-
-#include <cmath>
-#include <iosfwd>
-#include <string>
-
-#include <ossim/base/ossimCommon.h> /* for ossim::isnan */
-#include <ossim/base/ossimColumnVector3d.h>
-
-class ossimIpt;
-class ossimDpt;
-
-class OSSIMDLLEXPORT ossimDpt3d
-{
-public:
-   friend OSSIMDLLEXPORT std::ostream & operator <<(std::ostream &out,
-                                                    const ossimDpt3d &rhs);
-   
-   ossimDpt3d(const double &aX=0, const double &aY=0, const double &aZ=0)
-      :x(aX), y(aY), z(aZ) {}
-
-   ossimDpt3d(const ossimDpt &aPt);
-   ossimDpt3d(const ossimIpt &aPt);
-   
-   ossimDpt3d(const ossimColumnVector3d &pt)
-      : x(pt[0]), y(pt[1]), z(pt[2]) {}
-   
-   bool operator ==(const ossimDpt3d &rhs) const
-      {
-         return ( (x == rhs.x) &&
-                  (y == rhs.y) &&
-                  (z == rhs.z));
-      }
-   bool operator !=(const ossimDpt3d &rhs) const
-   {
-      return ( (x != rhs.x) ||
-               (y != rhs.y) ||
-               (z != rhs.z) );
-   }
-   
-   void makeNan(){x = ossim::nan(); y=ossim::nan(); z=ossim::nan();}
-
-   bool hasNans()const
-   {
-      return (ossim::isnan(x) || ossim::isnan(y) || ossim::isnan(z));
-   }
-   /*!
-    * METHOD: length()
-    * Returns the RSS of the components.
-    */
-   double length() const { return std::sqrt(x*x + y*y + z*z); }
-   double length2() const { return x*x + y*y + z*z; }
-   
-   //***
-   // OPERATORS: +, -, +=, -=
-   // Point add/subtract with other point:
-   //***
-   ossimDpt3d operator+(const ossimDpt3d& p) const
-      { return ossimDpt3d(x+p.x, y+p.y, z+p.z); }
-   ossimDpt3d operator-(const ossimDpt3d& p) const
-      { return ossimDpt3d(x-p.x, y-p.y, z-p.z); }
-   const ossimDpt3d& operator+=(const ossimDpt3d& p)
-      { x += p.x; y += p.y; z += p.z; return *this; }
-   const ossimDpt3d& operator-=(const ossimDpt3d& p)
-      { x -= p.x; y -= p.y; z -= p.z; return *this; }
-
-   //***
-   // OPERATORS: *, /
-   // Scale point components by scalar:
-   //***
-   ossimDpt3d operator*(const double& d) const
-      { return ossimDpt3d(d*x, d*y, d*z); }
-   ossimDpt3d operator/(const double& d) const
-      { return ossimDpt3d(x/d, y/d, z/d); }
-  void operator /=(double value)
-      {
-         x /= value;
-         y /= value;
-         z /= value;
-      }
-   void operator *=(double value) 
-      {
-         x *= value;
-         y *= value;
-         z *= value;
-      }
-   double operator *(const ossimDpt3d& src)const
-   {
-      return (x*src.x + y*src.y + z*src.z);
-   }
-   inline const ossimDpt3d operator ^ (const ossimDpt3d& rhs) const
-   {
-      return ossimDpt3d(y*rhs.z-z*rhs.y,
-                        z*rhs.x-x*rhs.z ,
-                        x*rhs.y-y*rhs.x);
-   }
-
-   /**
-    * @brief To string method.
-    * 
-    * @param precision Output floating point precision.
-    * 
-    * @return std::string representing point.
-    *
-    * Output format:
-    * ( 0.0000000,  0.0000000,  0.00000000 )
-    *   -----x----  -----y----  ------z----
-    */
-   std::string toString(ossim_uint32 precision=15) const;
-   
-   /**
-    * @brief Initializes this point from string.
-    *
-    * Expected format:
-    * 
-    * ( 0.0000000,  0.0000000,  0.00000000 )
-    *   -----x----  -----y----  ------z----
-    *
-    * @param s String to initialize from.
-    */
-   void toPoint(const std::string& s); 
-   
-   double x;
-   double y;
-   double z;
-};
-
-#endif
diff --git a/include/ossim/base/ossimDrect.h b/include/ossim/base/ossimDrect.h
deleted file mode 100644
index b67251c..0000000
--- a/include/ossim/base/ossimDrect.h
+++ /dev/null
@@ -1,859 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Contains class declaration for drect.
-// Container class for four double points representing a rectangle.
-// 
-//*******************************************************************
-//  $Id: ossimDrect.h 22197 2013-03-12 02:00:55Z dburken $
-
-#ifndef ossimDrect_HEADER
-#define ossimDrect_HEADER
-
-#include <iosfwd>
-#include <vector>
-
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimFpt.h>
-
-//***
-// NOTE:  A word on corner points...
-//
-// There is the concept of "pixel is area" and "pixel is point".
-// - Pixel is area means the (x,y) pixel coordinate refers to the upper left
-//   corner of the pixel, NOT the center of the pixel.
-// - Pixel is point means the (x,y) pixel coordinate refers to the center
-//   of the pixel, NOT the upper left corner.
-//
-// For the uniformity purposes, all pixel points  should be in the
-// "pixel is point" form; therefore, the (x,y) point should represent the
-// CENTER of the pixel.
-//***
-
-//***
-// Forward class declarations.
-//***
-class ossimIrect;
-class ossimPolygon;
-class ossimKeywordlist;
-
-//*******************************************************************
-// CLASS:  ossimDrect
-//*******************************************************************
-
-class OSSIMDLLEXPORT ossimDrect
-{
-public:
-   enum
-   {
-      UPPER_LEFT  = 1,
-      LOWER_LEFT  = 2,
-      LOWER_RIGHT = 4,
-      UPPER_RIGHT = 8
-   };
-
-   ossimDrect()
-      :
-         theUlCorner(0.0, 0.0),
-         theUrCorner(0.0, 0.0),
-         theLrCorner(0.0, 0.0),
-         theLlCorner(0.0, 0.0),
-         theOrientMode(OSSIM_LEFT_HANDED)
-      {}
-
-   ossimDrect(const ossimDpt&   ul_corner,
-              const ossimDpt&   lr_corner,
-              ossimCoordSysOrientMode mode=OSSIM_LEFT_HANDED)
-      :
-         theUlCorner(ul_corner),
-         theUrCorner(lr_corner.x, ul_corner.y),
-         theLrCorner(lr_corner),
-         theLlCorner(ul_corner.x, lr_corner.y),
-         theOrientMode(mode)
-      {
-      }
-
-   ossimDrect(const double& ul_corner_x,
-              const double& ul_corner_y,
-              const double& lr_corner_x,
-              const double& lr_corner_y,
-              ossimCoordSysOrientMode mode=OSSIM_LEFT_HANDED)
-      :
-         theUlCorner(ul_corner_x, ul_corner_y),
-         theUrCorner(lr_corner_x, ul_corner_y),
-         theLrCorner(lr_corner_x, lr_corner_y),
-         theLlCorner(ul_corner_x, lr_corner_y),
-         theOrientMode(mode)
-      {}
-   
-   ossimDrect(const ossimDrect& rect)
-      :
-         theUlCorner(rect.ul()),
-         theUrCorner(rect.ur()),
-         theLrCorner(rect.lr()),
-         theLlCorner(rect.ll()),
-         theOrientMode(rect.orientMode())
-      {}
-
-   ossimDrect(const ossimIrect& rect);
-
-   /*!
-    * Must compute a bounding rect given a collection of points or polygon:
-    */
-   ossimDrect(const std::vector<ossimDpt>& points,
-              ossimCoordSysOrientMode mode=OSSIM_LEFT_HANDED);
-   ossimDrect(const ossimDpt& p1,
-              const ossimDpt& p2,
-              const ossimDpt& p3,
-              const ossimDpt& p4,
-              ossimCoordSysOrientMode mode=OSSIM_LEFT_HANDED);
-   ossimDrect(const ossimPolygon& polygon, 
-              ossimCoordSysOrientMode mode=OSSIM_LEFT_HANDED);
-
-   /** destructor */
-   ~ossimDrect();
-   
-   //! Constructs an Drect surrounding the specified point, and of specified size.
-   ossimDrect(const ossimDpt& center, 
-              const double&   size_x, 
-              const double&   size_y,
-              ossimCoordSysOrientMode mode=OSSIM_LEFT_HANDED);
-
-   inline const ossimDrect& operator=  (const ossimDrect& rect);
-   const ossimDrect&        operator=  (const ossimIrect& rect);
-   inline bool              operator!= (const ossimDrect& rect) const;
-   inline bool              operator== (const ossimDrect& rect) const;
-
-   friend ossimDrect operator*(double scalar, const ossimDrect& rect)
-   {
-      ossimDpt ul(rect.theUlCorner.x*scalar,
-                  rect.theUlCorner.y*scalar);
-      
-      if(rect.theOrientMode == OSSIM_LEFT_HANDED)
-      {
-         return ossimDrect(ul.x,
-                           ul.y,
-                           ul.x+rect.width()*scalar-1,
-                           ul.y+rect.height()*scalar-1,
-                           rect.theOrientMode);
-      }
-      return ossimDrect(ul.x,
-                        ul.y,
-                        ul.x+rect.width()*scalar-1,
-                        ul.y-(rect.height()*scalar-1),
-                        rect.theOrientMode);
-      
-   }
-   
-   const ossimDrect& operator *=(double scalar)
-      {
-          ossimDpt ul(theUlCorner.x*scalar,
-                      theUlCorner.y*scalar);
-
-          if(theOrientMode == OSSIM_LEFT_HANDED)
-          {
-             *this = ossimDrect(ul.x,
-                                ul.y,
-                                (ul.x+width()*scalar-1),
-                                (ul.y+height()*scalar-1),
-                                theOrientMode);
-          }
-          else
-          {
-             *this = ossimDrect(ul.x,
-                                ul.y,
-                                (ul.x+width()*scalar-1),
-                                (ul.y-(height()*scalar-1)),
-                                theOrientMode);
-                                
-          }
-         return *this;
-      }
-   
-   ossimDrect operator *(double scalar)const
-      {
-         ossimDpt ul((theUlCorner.x*scalar),
-                     (theUlCorner.y*scalar));
-
-         if(theOrientMode == OSSIM_LEFT_HANDED)
-         {
-            return ossimDrect(ul.x,
-                              ul.y,
-                              (ul.x+width()*scalar-1),
-                              (ul.y+height()*scalar-1),
-                              theOrientMode);
-         }
-
-         return ossimDrect(ul.x,
-                           ul.y,
-                           (ul.x+width()*scalar-1),
-                           ul.y-(height()*scalar-1),
-                           theOrientMode);
-      }
-   const ossimDrect& operator *=(const ossimDpt& scalar)
-      {
-         ossimDpt ul((theUlCorner.x*scalar.x),
-                     (theUlCorner.y*scalar.y));
-         
-         if(theOrientMode == OSSIM_LEFT_HANDED)
-         {
-            *this = ossimDrect(ul.x,
-                               ul.y,
-                               (ul.x+width()*scalar.x - 1),
-                               (ul.y+height()*scalar.y - 1),
-                               theOrientMode);
-         }
-         else
-         {
-            *this = ossimDrect(ul.x,
-                               ul.y,
-                               (ul.x+width()*scalar.x - 1),
-                               (ul.y-(height()*scalar.y - 1)),
-                               theOrientMode);            
-         }
-         return *this;
-      }
-   
-   ossimDrect operator *(const ossimDpt& scalar)const
-      {
-         ossimDpt ul((theUlCorner.x*scalar.x),
-                     (theUlCorner.y*scalar.y));
-         
-         if(theOrientMode == OSSIM_LEFT_HANDED)
-         {
-            return ossimDrect(ul.x,
-                              ul.y,
-                              (ul.x+width()*scalar.x-1),
-                              (ul.y+height()*scalar.y-1),
-                              theOrientMode);
-         }
-         return ossimDrect(ul.x,
-                           ul.y,
-                           (ul.x+width()*scalar.x-1),
-                           (ul.y-(height()*scalar.y-1)),
-                           theOrientMode);
-      }
-   const ossimDrect& operator +=(const ossimDpt& shift)
-      {
-         ossimDpt ul((theUlCorner.x+shift.x),
-                     (theUlCorner.y+shift.y));
-                     
-         if(theOrientMode == OSSIM_LEFT_HANDED)
-         {
-            *this = ossimDrect(ul.x,
-                               ul.y,
-                               ul.x+width()-1,
-                               ul.y+height()-1,
-                               theOrientMode);
-         }
-         else
-         {
-            *this = ossimDrect(ul.x,
-                               ul.y,
-                               ul.x+width()-1,
-                               ul.y-(height()-1),
-                               theOrientMode);            
-         }
-         return *this;
-      }
-   
-   const ossimDrect& operator -=(const ossimDpt& shift)
-      {
-         ossimDpt ul((theUlCorner.x-shift.x),
-                     (theUlCorner.y-shift.y));
-         
-         if(theOrientMode == OSSIM_LEFT_HANDED)
-         {
-            *this = ossimDrect(ul.x,
-                               ul.y,
-                               ul.x+width()-1,
-                               ul.y+height()-1,
-                               theOrientMode);
-         }
-         else
-         {
-            *this = ossimDrect(ul.x,
-                               ul.y,
-                               ul.x+width()-1,
-                               ul.y-(height()-1),
-                               theOrientMode);
-         }
-         return *this;
-      }
-   
-   ossimDrect operator +(const ossimDpt& shift)const
-      {
-         ossimDpt ul((theUlCorner.x+shift.x),
-                     (theUlCorner.y+shift.y));
-                     
-         if(theOrientMode == OSSIM_LEFT_HANDED)
-         {
-            return ossimDrect(ul.x,
-                              ul.y,
-                              ul.x+width()-1,
-                              ul.y+height()-1,
-                              theOrientMode);
-         }
-         else
-         {
-            return ossimDrect(ul.x,
-                              ul.y,
-                              ul.x+width()-1,
-                              ul.y-(height()-1),
-                              theOrientMode);
-         }
-      }  
-
-   ossimDrect operator -(const ossimDpt& shift)const
-      {
-         ossimIpt ul(ossim::round<int>(theUlCorner.x-shift.x),
-                     ossim::round<int>(theUlCorner.y-shift.y));
-                     
-         if(theOrientMode == OSSIM_LEFT_HANDED)
-         {
-            return ossimDrect(ul.x,
-                              ul.y,
-                              ul.x+width()-1,
-                              ul.y+height()-1,
-                              theOrientMode);
-         }
-         else
-         {
-            return ossimDrect(ul.x,
-                              ul.y,
-                              ul.x+width()-1,
-                              ul.y-(height()-1),
-                              theOrientMode);            
-         }
-      }  
-
-   const ossimDpt& ul() const { return theUlCorner; }
-   const ossimDpt& ur() const { return theUrCorner; }
-   const ossimDpt& lr() const { return theLrCorner; }
-   const ossimDpt& ll() const { return theLlCorner; }
-
-   const ossimDrect& changeOrientationMode(ossimCoordSysOrientMode mode)
-   {
-      // if we are already in the orientation then return
-      //
-      if(mode == theOrientMode) return *this;
-      if(mode == OSSIM_LEFT_HANDED)
-      {
-         // we must be right handed so change to left handed
-         *this = ossimDrect(theUlCorner.x,
-                            theLlCorner.y,
-                            theLrCorner.x,
-                            theUlCorner.y,
-                            OSSIM_LEFT_HANDED);
-      }
-      else
-      {
-         // we must be left handed so change to RIGHT handed
-         *this = ossimDrect(theUlCorner.x,
-                            theLlCorner.y,
-                            theLrCorner.x,
-                            theUlCorner.y,
-                            OSSIM_RIGHT_HANDED);
-      }
-      theOrientMode = mode;
-      
-      return *this;
-   }
-   
-   void getBounds(double& minx, double& miny,
-                  double& maxx, double& maxy)const
-      {
-         minx = theUlCorner.x;
-         maxx = theUrCorner.x;
-         if(theOrientMode == OSSIM_LEFT_HANDED)
-         {
-            miny = theUlCorner.y;
-            maxy = theLrCorner.y;
-         }
-         else
-         {
-            maxy = theUlCorner.y;
-            miny = theLrCorner.y;
-         }
-      }
-   void makeNan()
-      {
-         theUlCorner.makeNan();
-         theLlCorner.makeNan();
-         theLrCorner.makeNan();
-         theUrCorner.makeNan();
-      }
-   
-   bool hasNans()const{ return (theUlCorner.hasNans() ||
-                                theLlCorner.hasNans() ||
-                                theLrCorner.hasNans() ||
-                                theUrCorner.hasNans());}
-   
-   bool isNan()const{ return (theUlCorner.hasNans() &&
-                              theLlCorner.hasNans() &&
-                              theLrCorner.hasNans() &&
-                              theUrCorner.hasNans());}
-
-   double area()const
-      {
-         return width()*height();
-      }
-   //***
-   // This class supports both left and right-handed coordinate systems. For
-   // both, the positive x-axis extends to the "right".
-   //***
-   ossimCoordSysOrientMode orientMode() const { return theOrientMode; }
-   void setOrientMode(ossimCoordSysOrientMode mode) { theOrientMode = mode; }
-   
-   /*!
-    * Sets the upper left corner to "pt".  Adjusts the remaining corners
-    * accordingly.
-    */
-   inline void set_ul(const ossimDpt& pt);
-
-   /*!
-    * Sets the upper right corner to "pt".  Adjusts the remaining corners
-    * accordingly.
-    */
-   inline void set_ur(const ossimDpt& pt);
-
-   /*!
-    * Sets the lower right corner to "pt".  Adjusts the remaining corners
-    * accordingly.
-    */
-   inline void set_lr(const ossimDpt& pt);
-
-   /*!
-    * Sets the lower left corner to "pt".  Adjusts the remaining corners
-    * accordingly.
-    */
-   inline void set_ll(const ossimDpt& pt);
-
-   /*!
-    * Sets the upper left x.  Adjusts the remaining corners accordingly.
-    */
-   inline void set_ulx(ossim_float64 x);
-
-   /*!
-    * Sets the upper left y.  Adjusts the remaining corners accordingly.
-    */
-   inline void set_uly(ossim_float64 y);
-
-   /*!
-    * Sets the upper right x.  Adjusts the remaining corners accordingly.
-    */
-   inline void set_urx(ossim_float64 x);
-
-   /*!
-    * Sets the upper right y.  Adjusts the remaining corners accordingly.
-    */
-   inline void set_ury(ossim_float64 y);
-
-   /*!
-    * Sets the lower right x.  Adjusts the remaining corners accordingly.
-    */
-   inline void set_lrx(ossim_float64 x);
-
-   /*!
-    * Sets the lower right y.  Adjusts the remaining corners accordingly.
-    */
-   inline void set_lry(ossim_float64 y);
-
-   /*!
-    * Sets the lower left x.  Adjusts the remaining corners accordingly.
-    */
-   inline void set_llx(ossim_float64 x);
-
-   /*!
-    * Sets the lower left y.  Adjusts the remaining corners accordingly.
-    */
-   inline void set_lly(ossim_float64 y);
-
-   /*!
-    * METHOD: initBoundingRect(points)
-    * Initializes this rect to the bounding rect containing all points in the
-    * collection passed in.
-    */
-   void initBoundingRect(const std::vector<ossimDpt>& points);
-
-   /*!
-    * Returns true if "pt" falls within rectangle.  Fall on an edge is also
-    * considered to be within.  The edge is expanded by epsilon value so any value
-    * within epsilon is inside
-    */
-   bool pointWithin(const ossimDpt& pt, double epsilon=0.0) const;
-
-   /*!
-    * Returns true if "pt" falls within rectangle.  Fall on an edge is also
-    * considered to be within.
-    */
-   bool pointWithin(const ossimFpt& pt, double epsilon=0.0) const;
-
-   /*!
-    * Returns true if any portion of an input rectangle "rect" intersects
-    * "this" rectangle.  
-    */
-   bool intersects(const ossimDrect& rect) const;
-
-   /*!
-    * Returns true if "this" rectangle is contained completely within the
-    * input rectangle "rect".
-    */
-   bool completely_within(const ossimDrect& rect) const;
-
-   ossimCoordSysOrientMode orientationMode()const{return theOrientMode;}
-   /*!
-    * Returns the height of a rectangle.
-    */
-   ossim_float64 height() const { return fabs(theLlCorner.y - theUlCorner.y) + 1.0; }
-
-   /*!
-    * Returns the width of a rectangle.
-    */
-   ossim_float64 width()  const { return fabs(theLrCorner.x - theLlCorner.x) + 1.0; }
-
-   ossimDpt size() const { return ossimDpt(width(), height()); }
-
-   /*!
-    * Stretches this rectangle out to integer boundaries.
-    */
-   void stretchOut();
-
-   /*!
-    * Will stretch the rect to the passed in tiled boundary.
-    */
-   void stretchToTileBoundary(const ossimDpt& widthHeight);
-
-   const ossimDrect& expand(const ossimDpt& padding);
-
-   /**
-    * @return ossimString representing ossimIrect.
-    *
-    * Format:  ( 30, -90, 512, 512, [LH|RH] )
-    *            -x- -y-  -w-  -h-   -Right or left handed-
-    *
-    * where:
-    *     x and y are origins either upper left if LEFT HANDED (LH) or
-    *                                lower left if RIGHT HANDED (RH)
-    *     w and h are width and height respectively
-    *     The last value is LH or RH to indicate LeftHanded or RightHanded
-    *    
-    */
-   ossimString toString()const;
-   /**
-    * expected Format:  form 1: ( 30, -90, 512, 512, [LH|RH] )
-    *                            -x- -y-  -w-  -h-   -Right or left handed-
-    * 
-    *                   form 2: ( 30, -90, 512, 512)
-    *                            -x- -y-  -w-  -h-
-    *
-    * NOTE: Form 2 assumes Left handed were x,y is origin upper left and y positive down.
-    *
-    * This method starts by doing a "makeNan" on rect. 
-    *
-    * @param rectString String to initialize from.
-    * @return true or false to indicate successful parsing.
-    */
-   bool toRect(const ossimString& rectString);
-
-   bool saveState(ossimKeywordlist& kwl,
-                  const char* prefix=0)const;
-   bool loadState(const ossimKeywordlist& kwl,
-                  const char* prefix=0);
-
-   /*!
-    * Will subdivide this rect into four partitions.
-    */
-   void splitToQuad(ossimDrect& ulRect,
-                    ossimDrect& urRect,
-                    ossimDrect& lrRect,
-                    ossimDrect& llRect);
-   
-   /*!
-   * Finds the point on the rect boundary that is closest to the arg_point. Closest is defined as
-   * the minimum perpendicular distance.
-   */
-   ossimDpt findClosestEdgePointTo(const ossimDpt& arg_point) const;
-   
-   ossimDrect clipToRect(const ossimDrect& rect)const;
-
-   inline ossimDpt midPoint()const;
-
-   void print(std::ostream& os) const;
-
-   ossimDrect combine(const ossimDrect& rect)const;
-   
-   friend OSSIMDLLEXPORT std::ostream& operator<<(std::ostream& os,
-                                                  const ossimDrect& rect);
-
-   bool clip(ossimDpt &p1,
-             ossimDpt  &p2)const;
-
-   static long getCode(const ossimDpt& aPoint,
-                       const ossimDrect& clipRect);
-private:
-
-   enum ossimCohenSutherlandClipCodes
-   {
-      NONE   = 0,
-      LEFT   = 1,
-      RIGHT  = 2,
-      BOTTOM = 4,
-      TOP    = 8
-   };
-   
-   //***
-   // Private data members representing the rectangle corners.
-   //***
-   ossimDpt theUlCorner;
-   ossimDpt theUrCorner;
-   ossimDpt theLrCorner;
-   ossimDpt theLlCorner;
-
-   ossimCoordSysOrientMode  theOrientMode;
-};
-
-//*******************************************************************
-// Inline Method: ossimDrect::operator=(ossimDrect)
-//*******************************************************************
-inline const ossimDrect& ossimDrect::operator=(const ossimDrect& rect)
-{
-   if (this != &rect)
-   {
-      theUlCorner   = rect.theUlCorner;
-      theUrCorner   = rect.theUrCorner;
-      theLrCorner   = rect.theLrCorner;
-      theLlCorner   = rect.theLlCorner;
-      theOrientMode = rect.theOrientMode;
-   }
-
-   return *this;
-}
-
-//*******************************************************************
-// Inline Method: ossimDrect::operator!=
-//*******************************************************************
-inline bool ossimDrect::operator!=(const ossimDrect& rect) const
-{
-   return ( (theUlCorner   != rect.theUlCorner) ||
-            (theUrCorner   != rect.theUrCorner) ||
-            (theLrCorner   != rect.theLrCorner) ||
-            (theLlCorner   != rect.theLlCorner) ||
-            (theOrientMode != rect.theOrientMode));
-}
-
-//*******************************************************************
-// Inline Method: ossimDrect::operator==
-//*******************************************************************
-inline bool ossimDrect::operator==(const ossimDrect& rect) const
-{
-   return ( (theUlCorner   == rect.theUlCorner) &&
-            (theUrCorner   == rect.theUrCorner) &&
-            (theLrCorner   == rect.theLrCorner) &&
-            (theLlCorner   == rect.theLlCorner) &&
-            (theOrientMode == rect.theOrientMode));
-}
-
-//*******************************************************************
-// Inline Method: ossimDrect::set_ul
-//*******************************************************************
-inline void ossimDrect::set_ul(const ossimDpt& pt)
-{
-   theUlCorner   = pt;
-   theUrCorner.y = pt.y;
-   theLlCorner.x = pt.x;
-}
-
-//*******************************************************************
-// Inline Method: ossimDrect::set_ur
-//*******************************************************************
-inline void ossimDrect::set_ur(const ossimDpt& pt)
-{
-   theUrCorner   = pt;
-   theUlCorner.y = pt.y;
-   theLrCorner.x = pt.x;
-}
-
-//*******************************************************************
-// Inline Method: ossimDrect::set_lr
-//*******************************************************************
-inline void ossimDrect::set_lr(const ossimDpt& pt)
-{
-   theLrCorner   = pt;
-   theUrCorner.x = pt.x;
-   theLlCorner.y = pt.y;
-}
-
-//*******************************************************************
-// Inline Method: ossimDrect::set_ll
-//*******************************************************************
-inline void ossimDrect::set_ll(const ossimDpt& pt)
-{
-   theLlCorner   = pt;
-   theUlCorner.x = pt.x;
-   theLrCorner.y = pt.y;
-}
-
-//*******************************************************************
-// Inline Method: ossimDrect::set_ulx
-//*******************************************************************
-inline void ossimDrect::set_ulx(ossim_float64 x)
-{
-   theUlCorner.x = x;
-   theLlCorner.x = x;
-}
-
-//*******************************************************************
-// Inline Method: ossimDrect::set_uly
-//*******************************************************************
-inline void ossimDrect::set_uly(ossim_float64 y)
-{
-   theUlCorner.y = y;
-   theUrCorner.y = y;
-}
-
-//*******************************************************************
-// Inline Method: ossimDrect::set_urx
-//*******************************************************************
-inline void ossimDrect::set_urx(ossim_float64 x)
-{
-   theUrCorner.x = x;
-   theLrCorner.x = x;
-}
-
-//*******************************************************************
-// Inline Method: ossimDrect::set_ury
-//*******************************************************************
-inline void ossimDrect::set_ury(ossim_float64 y)
-{
-   theUrCorner.y = y;
-   theUlCorner.y = y;
-}
-
-//*******************************************************************
-// Inline Method: ossimDrect::set_lrx
-//*******************************************************************
-inline void ossimDrect::set_lrx(ossim_float64 x)
-{
-   theLrCorner.x = x;
-   theUrCorner.x = x;
-}
-
-//*******************************************************************
-// Inline Method: ossimDrect::set_lry
-//*******************************************************************
-inline void ossimDrect::set_lry(ossim_float64 y)
-{
-   theLrCorner.y = y;
-   theLlCorner.y = y;
-}
-
-//*******************************************************************
-// Inline Method: ossimDrect::set_llx
-//*******************************************************************
-inline void ossimDrect::set_llx(ossim_float64 x)
-{
-   theLlCorner.x = x;
-   theUlCorner.x = x;
-}
-
-//*******************************************************************
-// Inline Method: ossimDrect::set_lly
-//*******************************************************************
-inline void ossimDrect::set_lly(ossim_float64 y)
-{
-   theLlCorner.y = y;
-   theLrCorner.y = y;
-}
-
-//*******************************************************************
-// Inline Method: ossimDrect::pointWithin(const ossimDpt& pt) 
-//*******************************************************************
-inline bool ossimDrect::pointWithin(const ossimDpt& pt, double epsilon) const
-{
-   if (theOrientMode == OSSIM_LEFT_HANDED)
-   {
-      return ((pt.x >= (ul().x-epsilon)) &&
-              (pt.x <= (ur().x+epsilon)) &&
-              (pt.y >= (ul().y-epsilon)) &&
-              (pt.y <= (ll().y+epsilon)));
-   }
-   return ((pt.x >= (ul().x-epsilon)) &&
-           (pt.x <= (ur().x+epsilon)) &&
-           (pt.y <= (ul().y+epsilon)) &&
-           (pt.y >= (ll().y-epsilon)));
-}
-
-//*******************************************************************
-// Inline Method: ossimDrect::pointWithin(const ossimFpt& pt)
-//*******************************************************************
-inline bool ossimDrect::pointWithin(const ossimFpt& pt, double epsilon) const
-{
-   if (theOrientMode == OSSIM_LEFT_HANDED)
-   {
-      return ((pt.x >= (ul().x-epsilon)) &&
-              (pt.x <= (ur().x+epsilon)) &&
-              (pt.y >= (ul().y-epsilon)) &&
-              (pt.y <= (ll().y+epsilon)));
-   }
-   return ((pt.x >= (ul().x-epsilon)) &&
-           (pt.x <= (ur().x+epsilon)) &&
-           (pt.y <= (ul().y+epsilon)) &&
-           (pt.y >= (ll().y-epsilon)));
-}
-
-//*******************************************************************
-// Inline Method: ossimDrect::midPoint()
-//*******************************************************************
-inline ossimDpt ossimDrect::midPoint()const
-{
-   return ossimDpt( (ul().x + ur().x + ll().x + lr().x)*.25,
-                    (ul().y + ur().y + ll().y + lr().y)*.25);
-}
-
-//*******************************************************************
-// Inline Method: ossimDrect::combine(const ossimDrect& rect)
-//*******************************************************************
-inline ossimDrect ossimDrect::combine(const ossimDrect& rect)const
-{
-   if(rect.hasNans() || hasNans())
-   {
-      ossimDrect result;
-
-      result.makeNan();
-
-      return result;
-   }
-   if (theOrientMode != rect.theOrientMode)
-      return(*this);
-   
-   ossimDpt ulCombine;
-   ossimDpt lrCombine;
-
-   if(theOrientMode == OSSIM_LEFT_HANDED)
-   {
-      ulCombine.x = ((ul().x <= rect.ul().x)?ul().x:rect.ul().x);
-      ulCombine.y = ((ul().y <= rect.ul().y)?ul().y:rect.ul().y);
-      lrCombine.x = ((lr().x >= rect.lr().x)?lr().x:rect.lr().x);
-      lrCombine.y = ((lr().y >= rect.lr().y)?lr().y:rect.lr().y);
-   }
-   else
-   {
-      ulCombine.x = ((ul().x <= rect.ul().x)?ul().x:rect.ul().x);
-      ulCombine.y = ((ul().y >= rect.ul().y)?ul().y:rect.ul().y);
-      lrCombine.x = ((lr().x >= rect.lr().x)?lr().x:rect.lr().x);
-      lrCombine.y = ((lr().y <= rect.lr().y)?lr().y:rect.lr().y);
-   }
-
-   return ossimDrect(ulCombine, lrCombine, theOrientMode);
-}
-#endif
diff --git a/include/ossim/base/ossimDuration.h b/include/ossim/base/ossimDuration.h
deleted file mode 100644
index c61921b..0000000
--- a/include/ossim/base/ossimDuration.h
+++ /dev/null
@@ -1,166 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id$
-#ifndef ossimDuration_HEADER
-#define ossimDuration_HEADER
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimReferenced.h>
-#include <iostream>
-
-class OSSIM_DLL ossimDuration
-{
-public:
-   /**
-    * This will take an iso8601 encoded duration string and parse out
-    * the individual values
-    */
-   ossimDuration(const ossimString& iso8601Duration = ossimString(""));
-   
-   
-   /**
-    * zero out all fields
-    */
-   void clearFields();
-   
-   /**
-    * This will take an iso8601 encoded duration stream and parse out
-    * the individual values it will stop when a blank character or whitespace is found
-    */
-   bool readIso8601Encoding(std::istream& in);
-   
-   /**
-    * This will take an iso8601 encoded duration stream and parse out
-    * the individual values it will stop when a blank character or whitespace is found
-    */
-   bool setByIso8601DurationString(const ossimString& iso8601Duration);
-   
-   /**
-    * Will take the field values and encode into a iso8601 string format.
-    * Note, anything that is 0 will not be output.
-    *
-    */
-   void toIso8601DurationString(ossimString& result);
-   
-   /**
-    * this will not use the months field or the years field but will use all other
-    * fields to calculate a total value in seconds.  We can not determine leap years
-    * and how many days are in a month so those are omitted and so this serves as
-    * a utility method to just calculate the total seconds if you give a duration string
-    * that contains only one or all or any of the following: weeks, days, minutes, hours,
-    * and/or seconds.
-    *
-    * If the sign is set to negative it will return a negative value.
-    */
-   ossim_float64 toSeconds()const;
-   
-   void setSign(ossim_int32 value)
-   {
-      theSign = ((value < 0)?-1:1);
-   }
-   /**
-    * returns the sign.  Should be either -1 or 1 for the return
-    */
-   ossim_int32 sign()const
-   {
-      return theSign;
-   }
-   void setYears(ossim_uint64 value)
-   {
-      theYears = value;
-   }
-   ossim_int64 years()const
-   {
-      return theYears;
-   }
-   void setMonths(ossim_uint64 value)
-   {
-      theMonths = value;
-   }
-   ossim_int64 months()const
-   {
-      return theMonths;
-   }
-   void setWeeks(ossim_uint64 value)
-   {
-      theWeeks = value;
-   }
-   ossim_int64 weeks()const
-   {
-      return theWeeks;
-   }
-   void setDays(ossim_uint64 value)
-   {
-      theDays = value;
-   }
-   ossim_int64 days()const
-   {
-      return theDays;
-   }
-   void setHours(ossim_uint64 value)
-   {
-      theHours = value;
-   }
-   ossim_int64 hours()const
-   {
-      return theHours;
-   }
-   void setMinutes(ossim_uint64 value)
-   {
-      theMinutes = value;
-   }
-   ossim_int64 minutes()const
-   {
-      return theMinutes;
-   }
-   void setSeconds(ossim_float64 value)
-   {
-      theSeconds = value;
-   }
-   ossim_float64 seconds()const
-   {
-      return theSeconds;
-   }
-   
-   /**
-    * Sets all values in one call
-    */
-   void setAll(ossim_int32 signValue,
-               ossim_uint64 yearsValue,
-               ossim_uint64 monthsValue,
-               ossim_uint64 weeksValue,
-               ossim_uint64 daysValue,
-               ossim_uint64 hoursValue,
-               ossim_uint64 minutesValue,
-               ossim_float64 secondsValue)
-   {
-      theSign    = ((signValue < 0)?-1:1);
-      theYears   = yearsValue;
-      theMonths  = monthsValue;
-      theWeeks   = weeksValue;
-      theDays    = daysValue;
-      theHours   = hoursValue;
-      theMinutes = minutesValue;
-      theSeconds = secondsValue;
-   }
-               
-   
-protected:
-   ossim_int32 theSign; // indicates -1 for negative and anything else is positive
-   ossim_int64 theYears; // number of years
-   ossim_int64 theMonths; // number of months
-   ossim_int64 theWeeks; // number of months
-   ossim_int64 theDays;   // number of days
-   ossim_int64 theHours;  // number of hours
-   ossim_int64 theMinutes; // number of minutes
-   ossim_float64 theSeconds; // umber of Seconds
-};
-
-#endif
diff --git a/include/ossim/base/ossimElevationManagerEventListener.h b/include/ossim/base/ossimElevationManagerEventListener.h
deleted file mode 100644
index d8a4a74..0000000
--- a/include/ossim/base/ossimElevationManagerEventListener.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef ossimElevationManagerEventListener_HEADER
-#define ossmiElevationManagerEventListener_HEADER
-
-#include <ossim/base/ossimListener.h>
-#include <ossim/base/ossimElevationManagerEvent.h>
-
-class OSSIMDLLEXPORT ossimElevationManagerEventListener : public ossimListener
-{
- public:
-   ossimElevationManagerEventListener();
-   virtual ~ossimElevationManagerEventListener();
-   virtual void processEvent( ossimEvent& event );
-   virtual void processEvent( ossimElevationManagerEvent& event );
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/base/ossimEllipsoidFactory.h b/include/ossim/base/ossimEllipsoidFactory.h
deleted file mode 100644
index f9a49de..0000000
--- a/include/ossim/base/ossimEllipsoidFactory.h
+++ /dev/null
@@ -1,53 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-// Description:
-//
-// Thie file contains the ossimEllipsoidFactory.
-//*******************************************************************
-//  $Id: ossimEllipsoidFactory.h 19682 2011-05-31 14:21:20Z dburken $
-
-#ifndef ossimEllipsoidFactory_HEADER
-#define ossimEllipsoidFactory_HEADER
-
-#include <ossim/base/ossimConstants.h>
-#include <map>
-#include <string>
-
-class ossimEllipsoid;
-class ossimString;
-class ossimWgs84Ellipsoid;
-class ossimWgs72Ellipsoid;
-
-class OSSIMDLLEXPORT ossimEllipsoidFactory
-{
-public:
-   virtual ~ossimEllipsoidFactory();
-   const ossimEllipsoid* create(const ossimString &code)const;
-   const ossimEllipsoid* wgs84()const{return theWgs84Ellipsoid;}
-   const ossimEllipsoid* wgs72()const{return theWgs72Ellipsoid;}
-
-   //! Given an alpha code (for example "WE" for WGS84), returns the corresponding EPSG code or 0
-   //! if not found.
-   ossim_uint32 findEpsgCode(const ossimString &alpha_code) const;
-
-   static ossimEllipsoidFactory* instance();
-   
-private:
-   typedef std::map<std::string, ossimEllipsoid*> TableType;
-   typedef std::map<ossim_uint32, std::string> EpsgTableType;
-
-   static ossimEllipsoidFactory*     theInstance;
-   ossimEllipsoid*       theWgs84Ellipsoid;
-   ossimEllipsoid*       theWgs72Ellipsoid;
-   TableType             theEllipsoidTable;
-   EpsgTableType         theEpsgTable;
-   ossimEllipsoidFactory();
-   void initializeTable();
-   void deleteAll();
-};
-
-#endif
diff --git a/include/ossim/base/ossimEndian.h b/include/ossim/base/ossimEndian.h
deleted file mode 100644
index ae7d455..0000000
--- a/include/ossim/base/ossimEndian.h
+++ /dev/null
@@ -1,288 +0,0 @@
-//******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-// 
-// Description: This file contains the interface to the
-//              endian byte swap
-//
-//***********************************
-// $ID$
-#ifndef ossimEndian_HEADER
-#define ossimEndian_HEADER
-
-// for OSSIM_LITTLE_ENDIAN AND BIG_ENDIAN
-#include <ossim/base/ossimConstants.h>
-
-class OSSIMDLLEXPORT ossimEndian
-{
-public:
-   ossimEndian();
-
-   /*!
-    *  Swap bytes methods that work on a single pixel.
-    */
-   inline void swap(ossim_sint8    &/*data*/){}
-   inline void swap(ossim_uint8    &/*data*/){}
-   inline void swap(ossim_int16   &data) const;
-   inline void swap(ossim_uint16  &data) const;
-   inline void swap(ossim_int32   &data) const;
-   inline void swap(ossim_uint32  &data) const;
-   inline void swap(ossim_uint64  &data) const;
-   inline void swap(ossim_sint64  &data) const;
-   inline void swap(ossim_float32 &data) const;
-   inline void swap(ossim_float64 &data) const;
-
-   /*!
-    *  Swap bytes methods that work on arrays of pixels.
-    *
-    *  @note size is number of pixels, not number of bytes.
-    */
-   inline void swap(ossimScalarType scalar, void* data, ossim_uint32 size) const;
-   // only here to allow template based swaps to compile correctly
-   //
-   inline void swap(ossim_sint8* data, ossim_uint32 size)const;
-   inline void swap(ossim_uint8* data, ossim_uint32 size)const;
-   
-   inline void swap(ossim_int16* data, ossim_uint32 size) const;
-   inline void swap(ossim_uint16* data, ossim_uint32 size) const;
-
-   inline void swap(ossim_int32* data, ossim_uint32 size) const;
-   inline void swap(ossim_uint32* data, ossim_uint32 size) const;
-
-//#ifdef HAS_LONG_LONG
-   inline void swap(ossim_int64* data, ossim_uint32 size) const;
-   inline void swap(ossim_uint64* data, ossim_uint32 size) const;
-//#endif
-
-   inline void swap(ossim_float32* data, ossim_uint32 size) const;
-   inline void swap(ossim_float64* data, ossim_uint32 size) const;
-
-   inline void swapTwoBytes(void* data, ossim_uint32 size) const;
-   inline void swapFourBytes(void* data, ossim_uint32 size) const;
-   inline void swapEightBytes(void* data, ossim_uint32 size) const;
-   inline ossimByteOrder getSystemEndianType() const;
-
-private:
-
-   // Holds the Endian of the architecture that you are running on.
-   ossimByteOrder  theSystemEndianType;  
-   
-   void swapTwoBytes(void *data) const;
-   void swapFourBytes(void *data) const;
-   void swapEightBytes(void *data) const;
-
-   void swapPrivate(ossim_uint8 *c1,
-                    ossim_uint8 *c2) const;
-};
-
-inline ossimByteOrder ossimEndian::getSystemEndianType() const
-{
-   return theSystemEndianType;
-}
-
-inline void ossimEndian::swap(ossim_sint8* /* data */,
-                              ossim_uint32 /* size */ )const
-{
-   //intentionally left blank
-}
-
-inline void ossimEndian::swap(ossim_uint8* /* data */,
-                              ossim_uint32 /* size */ )const
-{
-   //intentionally left blank
-}
-
-inline void ossimEndian::swap(ossim_int16 &data) const
-{
-   swapTwoBytes(reinterpret_cast<void*>(&data));   
-} 
-
-inline void ossimEndian::swap(ossim_uint16 &data) const
-{
-   swapTwoBytes(reinterpret_cast<void*>(&data));
-}
-
-inline void ossimEndian::swap(ossim_int32 &data) const
-{
-   swapFourBytes(reinterpret_cast<void*>(&data));
-}
-
-inline void ossimEndian::swap(ossim_uint32 &data) const
-{
-   swapFourBytes(reinterpret_cast<void*>(&data));
-}
-
-inline void ossimEndian::swap(ossim_uint64 &data) const
-{
-   swapEightBytes(reinterpret_cast<void*>(&data));
-}
-
-inline void ossimEndian::swap(ossim_sint64 &data) const
-{
-   swapEightBytes(reinterpret_cast<void*>(&data));
-}
-
-inline void ossimEndian::swap(ossim_float32 &data) const
-{
-   swapFourBytes(reinterpret_cast<void*>(&data));
-}
-
-inline void ossimEndian::swap(ossim_float64 &data) const
-{
-   swapEightBytes(reinterpret_cast<void*>(&data));
-}
-
-inline void ossimEndian::swapTwoBytes(void *data) const
-{
-   unsigned char *c = reinterpret_cast<unsigned char*>(data);
-
-   swapPrivate(&c[0], &c[1]);
-}
-
-inline void ossimEndian::swapFourBytes(void* data) const
-{
-   unsigned char *c = reinterpret_cast<unsigned char*>(data);
-
-   swapPrivate(&c[0], &c[3]);
-   swapPrivate(&c[1], &c[2]);
-}
-
-inline void ossimEndian::swapEightBytes(void* data) const
-{
-   unsigned char *c = reinterpret_cast<unsigned char*>(data);
-
-   swapPrivate(&c[0], &c[7]);
-   swapPrivate(&c[1], &c[6]);
-   swapPrivate(&c[2], &c[5]);
-   swapPrivate(&c[3], &c[4]);
-}
-
-inline void ossimEndian::swapPrivate(ossim_uint8 *c1,                       
-                                     ossim_uint8 *c2) const
-{
-   ossim_uint8 temp_c = *c1;
-   *c1 = *c2;
-   *c2 = temp_c;
-}
-
-inline void ossimEndian::swap(ossimScalarType scalar,
-                              void* data, ossim_uint32 size) const
-{
-   switch (scalar)
-   {
-      case OSSIM_USHORT16:
-      case OSSIM_SSHORT16:
-      case  OSSIM_USHORT11:
-         swapTwoBytes(data, size);
-         return;
-         
-      case OSSIM_FLOAT:
-      case OSSIM_NORMALIZED_FLOAT:
-         swapFourBytes(data, size);
-         return;
-         
-      case OSSIM_DOUBLE:
-      case OSSIM_NORMALIZED_DOUBLE:
-         swapEightBytes(data, size);
-         break;
-         
-      default:
-         return;
-   }
-}
-
-inline void ossimEndian::swap(ossim_int16* data, ossim_uint32 size) const
-{
-   swapTwoBytes(data, size);
-}
-
-inline void ossimEndian::swap(ossim_uint16* data, ossim_uint32 size) const
-{
-   swapTwoBytes(data, size);
-}
-
-inline void ossimEndian::swap(ossim_int32* data, ossim_uint32 size) const
-{
-   swapFourBytes(data, size);
-}
-
-inline void ossimEndian::swap(ossim_uint32* data, ossim_uint32 size) const
-{
-   swapFourBytes(data, size);
-}
-
-#ifdef HAS_LONG_LONG
-
-inline void ossimEndian::swap(ossim_int64* data, ossim_uint32 size) const
-{
-   swapEightBytes(data, size);
-}
-
-inline void ossimEndian::swap(ossim_uint64* data, ossim_uint32 size) const
-{
-   swapEightBytes(data, size);
-}
-
-#endif /* End of #ifdef HAS_LONG_LONG */
-
-inline void ossimEndian::swap(ossim_float32* data, ossim_uint32 size) const
-{
-   swapFourBytes(data, size);
-}
-
-inline void ossimEndian::swap(ossim_float64* data, ossim_uint32 size) const
-{
-   swapEightBytes(data, size);
-}
-
-inline void ossimEndian::swapTwoBytes(void* data, ossim_uint32 size) const
-{
-   ossim_uint16* buf = reinterpret_cast<ossim_uint16*>(data);
-   for (ossim_uint32 i=0; i<size; ++i)
-   {
-      buf[i] = ((buf[i] & 0x00ff) << 8) | ((buf[i] & 0xff00) >> 8);
-   }
-}
-
-inline void ossimEndian::swapFourBytes(void* data, ossim_uint32 size) const
-{
-   ossim_uint32* buf = reinterpret_cast<ossim_uint32*>(data);
-   for (ossim_uint32 i=0; i<size; ++i)
-   {
-      buf[i]
-         = (  ((buf[i] & 0xff000000) >> 24)
-            | ((buf[i] & 0x00ff0000) >> 8)
-            | ((buf[i] & 0x0000ff00) << 8)
-            | ((buf[i] & 0x000000ff) << 24));
-   }
-}
-
-inline void ossimEndian::swapEightBytes(void* data, ossim_uint32 size) const
-{
-#ifdef HAS_LONG_LONG
-   uint64* buf = reinterpret_cast<ossim_uint64*>(data);
-   for (uint32 i=0; i<size; ++i)
-   {
-      buf[i]
-         = (  ((buf[i] & 0xff00000000000000ull) >> 56)
-            | ((buf[i] & 0x00ff000000000000ull) >> 40)
-            | ((buf[i] & 0x0000ff0000000000ull) >> 24)
-            | ((buf[i] & 0x000000ff00000000ull) >> 8)
-            | ((buf[i] & 0x00000000ff000000ull) << 8)
-            | ((buf[i] & 0x0000000000ff0000ull) << 24)
-            | ((buf[i] & 0x000000000000ff00ull) << 40)
-            | ((buf[i] & 0x00000000000000ffull) << 56));
-   }
-#else
-   ossim_float64* buf = reinterpret_cast<ossim_float64*>(data);
-   for (ossim_uint32 i=0; i<size; ++i)
-   {
-      swapEightBytes(buf+i);
-   }
-   
-#endif
-}
-
-#endif /* End of #ifndef ossimEndian_HEADER */
diff --git a/include/ossim/base/ossimEpsgDatumFactory.h b/include/ossim/base/ossimEpsgDatumFactory.h
deleted file mode 100644
index 9d3f58c..0000000
--- a/include/ossim/base/ossimEpsgDatumFactory.h
+++ /dev/null
@@ -1,70 +0,0 @@
-//*************************************************************************************************
-//                          OSSIM -- Open Source Software Image Map
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Oscar Kramer
-//
-//*************************************************************************************************
-//  $Id$
-
-#ifndef ossimEpsgDatumFactory_HEADER
-#define ossimEpsgDatumFactory_HEADER 1
-
-#include <ossim/base/ossimDatumFactoryInterface.h>
-#include <map>
-#include <string>
-
-class ossimDatum;
-class ossimString;
-
-//*************************************************************************************************
-//! Class for creating datum instances from EPSG codes. 
-//! Presently only a small subset of EPSG datums are supported. These are hardcoded here or,
-//! alternatively, the EPSG code is mapped to the OSSIM/Geotrans code and ossimDatumFactory is
-//! used to produce the final datum. 
-//! 
-//! TO DO:
-//! Eventually we should have a disk-file based database lookup of datums with associated parameters
-//! similar to the EPSG projection factory and database.
-//*************************************************************************************************
-class OSSIM_DLL ossimEpsgDatumFactory : public ossimDatumFactoryInterface
-{
-public:
-   //! Singleton implementation.
-   static ossimEpsgDatumFactory* instance();
-
-   //! Destructor
-   virtual ~ossimEpsgDatumFactory();
-
-   //! Creates a datum instance given an EPSG spec in the form "EPSG:<datum_code>".
-   virtual const ossimDatum* create(const ossimString &epsg_spec)const;
-
-   //! Creates a datum instance given a KWL and prefix
-   virtual const ossimDatum* create(const ossimKeywordlist& kwl, const char *prefix=0)const;
-
-   //! Returns list of all datums supported, in the form of "EPSG:<code>, <datum_name>".
-   virtual void getList(std::vector<ossimString>& list)const;
-   
-   //! Specific to this factory only. Creates a datum instance given an EPSG integer code.
-   const ossimDatum* create(ossim_uint32 epsg_code)const;
-
-   //! Specific to this factory only. Given an alpha-code, returns equivalent EPSG datum code or
-   //! 0 if not found.
-   ossim_uint32 findEpsgCode(const ossimString& alpha_code) const;
-
-   //! Specific to this factory only. Given an EPSG, returns equivalent alpha-code datum code or
-   //! empty string if not found.
-   ossimString findAlphaCode(ossim_uint32 epsg_code) const;
-
-protected:
-   //! Hidden constructors for singleton implementation.
-   ossimEpsgDatumFactory();
-
-   //! Presently implemented as a mapping from EPSG code to OSSIM/Geotrans alpha-codes found in 
-   //! ossimDatumFactory. Eventually should be independent (and deprecate) ossimDatumFactory.
-   std::map<ossim_uint32, std::string> m_epsgToAlphaMap;
-   
-   static ossimEpsgDatumFactory* m_instance;
-};
-#endif
diff --git a/include/ossim/base/ossimFactoryListInterface.h b/include/ossim/base/ossimFactoryListInterface.h
deleted file mode 100644
index f96001c..0000000
--- a/include/ossim/base/ossimFactoryListInterface.h
+++ /dev/null
@@ -1,265 +0,0 @@
-//**************************************************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description: Class declaration of ossimFactoryListInterface.
-//
-//**************************************************************************************************
-// $Id$
-#ifndef ossimFactoryListInterface_HEADER
-#define ossimFactoryListInterface_HEADER
-#include <OpenThreads/Mutex>
-#include <OpenThreads/ScopedLock>
-#include <vector>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimKeywordlist.h>
-
-/**
- * The is a factory list interface that allows registries to be accessed in a common way.  
- */
-template <class T, class NativeType>
-class ossimFactoryListInterface
-   {
-   public:
-      typedef std::vector<T*> FactoryListType;
-      typedef T FactoryType;
-      typedef NativeType NativeReturnType;
-      
-      ossimFactoryListInterface(){}
-      
-      /**
-       * This is for backward compatability and calls registerFactory for simple adds.
-       */
-      void addFactory(T* factory)
-      {
-         registerFactory(factory);
-      }
-      
-      /**
-       * Public access method to determine if a factory is already registered to this
-       * list
-       */
-      bool isFactoryRegistered(T* factory)const
-      {
-         if(!factory) return false;
-         OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_factoryListMutex);
-         
-         return findFactory(factory);
-      }
-      
-      /**
-       * Will register a factory to the factory list.  Will append the passed in factory if not
-       * already registered to the list.
-       */
-      void registerFactory(T* factory, bool pushToFrontFlag=false)
-      {
-         if(!factory) return;
-         OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_factoryListMutex);
-         if(!findFactory(factory))
-         {
-            if (pushToFrontFlag)
-            {
-               m_factoryList.insert(m_factoryList.begin(), factory);
-            }
-            else
-            {
-               m_factoryList.push_back(factory);
-            }
-         }
-      }
-      /**
-       * Will remove the factory from the registry.
-       */
-      void unregisterFactory(T* factory)
-      {
-         OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_factoryListMutex);
-         ossim_uint32 idx = 0;
-         for(idx = 0; idx < m_factoryList.size(); ++idx)
-         {
-            if(factory == m_factoryList[idx])
-            {
-               m_factoryList.erase(m_factoryList.begin() + idx);
-               return;
-            }
-         }
-      }
-      
-      /**
-       * Will remove all factories from the registry.
-       */
-      void unregisterAllFactories()
-      {
-         OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_factoryListMutex);
-         m_factoryList.clear();
-      }
-      
-      /**
-       * Inserts the factory to the front of the list.
-       */
-      void registerFactoryToFront(T* factory)
-      {
-         OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_factoryListMutex);
-         if(!findFactory(factory))
-         {
-            m_factoryList.insert(m_factoryList.begin(), factory);
-         }
-      }
-      
-      /**
-       * Will insert the factory before the beforeThisFactory.  If not found
-       * it will do a simple append.
-       */
-      void registerFactoryBefore(T* factory, T* beforeThisFactory)
-      {
-         OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_factoryListMutex);
-         if(!findFactory(factory))
-         {
-            ossim_uint32 idx = 0;
-            for(idx = 0; idx < m_factoryList.size(); ++idx)
-            {
-               if(beforeThisFactory == m_factoryList[idx])
-               {
-                  m_factoryList.insert(m_factoryList.begin() + idx, factory);
-                  return;
-               }
-            }
-            m_factoryList.push_back(factory);
-         }
-      }
-      
-      /**
-       *
-       * Will add all object types the factories can allocate.  Typically a list of classnames are returned
-       *
-       */
-      void getAllTypeNamesFromRegistry(std::vector<ossimString>& typeList)const;
-      
-      /**
-       * This is the base object return for all objects in the system.  This is used for 
-       * backward compatability.
-       */
-      ossimObject* createObjectFromRegistry(const ossimString& typeName)const;
-      
-      /**
-       * This is the base object return for all objects in the system.  This is used for 
-       * backward compatability.
-       */
-      ossimObject* createObjectFromRegistry(const ossimKeywordlist& kwl,
-                                            const char* prefix=0)const;
-
-      /**
-       * This is a helper method that calls the createObject and makes sure that the
-       * returned object is of the NativeType base type this registry supports.
-       */
-      NativeType* createNativeObjectFromRegistry(const ossimString& typeName)const;
-      
-      /**
-       * This is a helper method that calls the createObject and makes sure that the
-       * returned object is of the NativeType base type this registry supports.
-       *
-       * @param kwl is a state keywordlist allowing one to instantiate an object 
-       *        defined by a set of name value pairs.  It will use the type 
-       *        keyword to create an object of the defined type and then load the 
-       *        state.
-       */
-      NativeType* createNativeObjectFromRegistry(const ossimKeywordlist& kwl,
-                                                 const char* prefix=0)const;
-   protected:
-      /**
-       * Utility to find a factory in the list
-       */
-      bool findFactory(T* factory)const
-      {
-         if(!factory) return false;
-         ossim_uint32 idx = 0;
-         for(;idx < m_factoryList.size();++idx)
-         {
-            if(m_factoryList[idx] == factory)
-            {
-               return true;
-            }
-         }
-         
-         return false;
-      }
-      mutable OpenThreads::Mutex m_factoryListMutex;
-      FactoryListType m_factoryList;
-   };
-
-template <class T, class NativeType>
-void ossimFactoryListInterface<T, NativeType>::getAllTypeNamesFromRegistry(std::vector<ossimString>& typeList)const
-{
-   //OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_factoryListMutex);
-   ossim_uint32 idx = 0;
-   for(; idx<m_factoryList.size(); ++idx)
-   {
-      m_factoryList[idx]->getTypeNameList(typeList);
-   }
-}
-template <class T, class NativeType>
-ossimObject* ossimFactoryListInterface<T, NativeType>::createObjectFromRegistry(const ossimString& typeName)const
-{
-   //OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_factoryListMutex);
-   ossimObject* result = 0;
-   ossim_uint32 idx = 0;
-   for(;((idx<m_factoryList.size())&&!result); ++idx)
-   {
-      result = m_factoryList[idx]->createObject(typeName);
-   }
-   return result;
-}
-
-template <class T, class NativeType>
-ossimObject* ossimFactoryListInterface<T, NativeType>::createObjectFromRegistry(const ossimKeywordlist& kwl,
-                                                                                const char* prefix)const
-{
-   // OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_factoryListMutex);
-   ossimObject* result = 0;
-   ossim_uint32 idx = 0;
-   for(;((idx<m_factoryList.size())&&!result); ++idx)
-   {
-      result = m_factoryList[idx]->createObject(kwl, prefix);
-   }
-   return result;
-}
-
-template <class T, class NativeType>
-NativeType* ossimFactoryListInterface<T, NativeType>::createNativeObjectFromRegistry(const ossimString& typeName)const
-{
-   NativeType* result = 0;
-   ossimRefPtr<ossimObject> tempObject = createObjectFromRegistry(typeName);
-   if(tempObject.valid())
-   {
-      result = dynamic_cast<NativeType*>(tempObject.get());
-      if(result)
-      {
-         tempObject.release();
-      }
-   }
-   
-   return result;
-}
-
-template <class T, class NativeType>
-NativeType* ossimFactoryListInterface<T, NativeType>::createNativeObjectFromRegistry(const ossimKeywordlist& kwl,
-                                                                                     const char* prefix)const
-{
-   NativeType* result = 0;
-   ossimRefPtr<ossimObject> tempObject = createObjectFromRegistry(kwl, prefix);
-   if(tempObject.valid())
-   {
-      result = dynamic_cast<NativeType*>(tempObject.get());
-      if(result)
-      {
-         tempObject.release();
-      }
-   }
-   
-   return result;
-}
-
-#endif
diff --git a/include/ossim/base/ossimFilename.h b/include/ossim/base/ossimFilename.h
deleted file mode 100644
index 5e6065b..0000000
--- a/include/ossim/base/ossimFilename.h
+++ /dev/null
@@ -1,264 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Ken Melero
-//
-// Description: This class provides manipulation of filenames.
-//
-//*************************************************************************
-// $Id: ossimFilename.h 20192 2011-10-25 17:27:25Z dburken $
-
-#ifndef ossimFilename_HEADER
-#define ossimFilename_HEADER
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimString.h>
-
-class ossimLocalTm;
-
-class OSSIM_DLL ossimFilename : public ossimString
-{
-public:
-   enum AccessModes
-   {
-      OSSIM_READ_WRITE = 6,
-      OSSIM_READ       = 4,
-      OSSIM_WRITE      = 2,
-      OSSIM_EXE	       = 1, // The PC docs say that this is ignored
-      OSSIM_EXIST      = 0
-   };
-   ossimFilename();
-   ossimFilename(const ossimFilename& src);
-   ossimFilename(const ossimString& src);
-   ossimFilename(const std::string& src);
-   ossimFilename(const char* src);
-
-   template <class Iter> ossimFilename(Iter s, Iter e);
-
-   static const ossimFilename NIL;
-
-   bool operator == (const ossimFilename& rhs)const;
-   
-   bool operator == (const ossimString& rhs)const;
-   bool operator == (const char* rhs)const;
-
-   /** @brief Writes f to the output stream os. */
-//    friend std::ostream& operator<<(std::ostream& os,
-   //                                const ossimFilename& s);
-   
-   void convertBackToForwardSlashes();
-   void convertForwardToBackSlashes();
-
-   bool setTimes(ossimLocalTm* accessTime,
-                 ossimLocalTm* modTime,
-                 ossimLocalTm* createTime)const;
-   bool getTimes(ossimLocalTm* accessTime,
-                 ossimLocalTm* modTime,
-                 ossimLocalTm* createTime)const;
-   
-   bool touch()const;
-   
-   /**
-    * Method to do file name expansion.
-    *
-    * Like: ~/docs will be expanded to /home/user/docs
-    *
-    * @return The expanded file name.
-    *
-    * @note METHOD IS NOT COMPLETE YET.
-    */
-   ossimFilename expand() const;
-   
-   // Methods to test ossimFilename for various states.
-   bool        exists()       const;
-   bool        isFile()       const;
-   bool        isDir()        const;
-   bool        isReadable()   const;
-   bool        isWriteable()  const;
-   bool        isExecutable() const;
-   ossim_int64 fileSize()     const;
-   
-   // Methods to access parts of the ossimFilename.
-
-   /**
-    * @return "tif" if file is "/data/images/t1.tif".
-    *
-    * @note The '.' (dot) is not returned.
-    */
-   ossimString   ext() const;
-
-   /**
-    * @return @return "/data/images" if file is "/data/images/t1.tif".
-    */
-   ossimFilename path() const;
-
-   /**
-    * @return @return "c:" if file is "c:\data\images\t1.tif".
-    */
-   ossimFilename drive() const;
-   
-   /**
-    * @return @return "t1.tif" if file is "/data/images/t1.tif".
-    */
-   ossimFilename file() const;
-
-   /**
-    * @return @return "t1" if file is "/data/images/t1.tif".
-    */
-   ossimFilename fileNoExtension() const;
-
-   /**
-    * @return @return "/data/images/t1" if file is "/data/images/t1.tif".
-    *
-    * @note  The '.' (dot) is not returned.
-    */
-   ossimFilename noExtension() const;
-
-   /**
-    * Sets the extension of a file name.
-    *
-    * Given:
-    * ossimFilename f = "foo";
-    * f.setExtension("tif");
-    * f now equals "foo.tif"
-    *
-    * Given: 
-    * ossimFilename f = "foo.jpg";
-    * f.setExtension("tif");
-    * f now equals "foo.tif"
-    * 
-    * Given: 
-    * ossimFilename f = "foo.jpg";
-    * f.setExtension(".tif");
-    * f now equals "foo.tif"
-    *
-    * Given: 
-    * ossimFilename f = "foo.";
-    * ossimFilename f2;
-    * f2 = f.setExtension("tif");
-    * f now equals "foo.tif"
-    * f2 now equals "foo.tif"
-    *
-    * @param e Extension to add or replace.
-    *
-    * @returns a reference to this.
-    */
-   ossimFilename& setExtension(const ossimString& e);
-
-   /**
-	* Sets the file path and drive.
-	* Input: the drive to be set (this should come from the user's preferences)
-	* Example: "x:"
-	* Given: "/filepath/file.ext"
-    * @return @return "c:\filepath\file.ext".
-    */
-   ossimFilename& setDrive(const ossimString& d);
-   ossimFilename& setPath(const ossimString& p);
-   ossimFilename& setFile(const ossimString& f);
-   
-   void split(ossimString& drivePart,
-              ossimString& pathPart,
-              ossimString& filePart,
-              ossimString& extPart)const;
-   
-   void merge(const ossimString& drivePart,
-              const ossimString& pathPart,
-              const ossimString& filePart,
-              const ossimString& extPart);
-   /*!
-    * Returns file appended onto this string. Path seperator is always placed
-    * between this and file.  Returns file if this string is empty.
-    * Given: this = /foo  and file  = bar output  = /foo/bar
-    * Given: this = /foo/ and file  = bar output  = /foo/bar
-    */
-   ossimFilename dirCat(const ossimFilename& file) const;
-
-   /*!
-    */
-   bool createDirectory(bool recurseFlag=true,
-                        int perm=0775)const;
-
-   /*!
-    * @brief Removes pathname from filesystem if supported by platform.
-    *
-    * If pathname is a directory it will only be removed if empty. If supported
-    * will set errno and output equivalent string if one occurs.
-    *
-    * @return true on success, false on error.
-    */
-   static bool remove(const ossimFilename& pathname);
-
-   /**
-    * Will use a wildcard remove.  NOTE:  This is in
-    * a regular expression format so if you want all
-    * files with prefix myfile to be erased then you would give
-    * it <path>/myfile.*
-    *
-    * The . here is a regular expression '.' character which says any character
-    * and the * "is any number of"
-    * 
-    */ 
-   static bool wildcardRemove(const ossimFilename& pathname);
-
-   bool rename(const ossimFilename& destFile, bool overwriteDestinationFlag=true)const;
-   
-   bool remove()const;
-   bool wildcardRemove()const;
-
-   /**
-    * @brief Copies this file to output file.
-    *
-    * Copies this to output file. If output file is a directory, this->file() is
-    * appended to output file.
-    * 
-    * @param outputFile File name to copy to.
-    * 
-    * @return True on success, false on error.
-    */
-   bool copyFileTo(const ossimFilename& ouputFile) const;
-
-   /**
-    * @brief Checks whether file name is relative or absolute.
-    * 
-    * @return true if file name has a relative path, false if absolute.
-    *
-    * @note This will return true if file name is empty.
-    */
-   bool isRelative() const;
-   
-   /**
-    * @brief Method to check if expansion is needed.
-    *
-    * This checks if file isRelative() first if isRelative is false (has
-    * absolute path) it then walks the file and looks for '$'.
-    * 
-    * @return true if file name is relative or has environment vars.
-    *
-    * @note This will return false if file name is empty.
-    */
-   bool needsExpansion() const;
-
-   /** @return The path separator. */
-   char getPathSeparator() const;
-   
-protected:
-
-   void convertToNative();
-
-   /*!
-    * since windows uses \ for path separation
-    * and unix / we need to be consistent.
-    */
-   static const char thePathSeparator;
-
-};
-
-// inline std::ostream& operator<<(std::ostream& os, const ossimFilename& f)
-// {
-//   return os << f.string().c_str();
-// }
-
-#endif
diff --git a/include/ossim/base/ossimFontInformation.h b/include/ossim/base/ossimFontInformation.h
deleted file mode 100644
index 2e53043..0000000
--- a/include/ossim/base/ossimFontInformation.h
+++ /dev/null
@@ -1,100 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  See top level LICENSE.txt.
-//
-// Author: Garrett Potts
-// 
-//********************************************************************
-// $Id: ossimFontInformation.h 9094 2006-06-13 19:12:40Z dburken $
-#ifndef ossimFontInformation_HEADER
-#define ossimFontInformation_HEADER
-
-#include <iosfwd>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimIpt.h>
-
-class ossimKeywordlist;
-
-class OSSIMDLLEXPORT ossimFontInformation
-{
-public:
-   friend std::ostream& operator << (std::ostream& out,
-                                     const ossimFontInformation& rhs);
-
-   ossimFontInformation();
-
-   ossimFontInformation(const ossimString& family,
-                        const ossimString& style,
-                        const ossimIpt&    pointSize,
-                        bool               fixedFlag,
-                        const ossimDpt&    scale=ossimDpt(1.0,1.0),
-                        double             rotation = 0.0,
-                        const ossimDpt&    shear=ossimDpt(0.0, 0.0));
-
-   ossimFontInformation(const ossimFontInformation& rhs);
-
-   bool isFixed()const;
-
-   /**
-    * Saves the current state of this object.
-    *
-    * For keywords see loadState:
-    */
-   bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
-
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    *
-    * Keywords:
-    *
-    * family_name:
-    * style_name:
-    * fixed_flag:
-    * point_size: ( x, y )
-    * scale: ( x, y )
-    * shear: ( x, y )
-    * rotation:
-    *
-    * point_size_x:  (deprecated)
-    * point_size_y:  (deprecated)
-    * scale_x: (deprecated)
-    * scale_y: (deprecated)
-    * shear_x: (deprecated)
-    * shear_y: (deprecated)
-    */   
-   bool loadState(const ossimKeywordlist& kwl,
-                  const char* prefix=0);
-
-   bool operator ==(const ossimFontInformation& rhs)const;
-
-   bool operator !=(const ossimFontInformation& rhs)const;
-
-   const ossimFontInformation& operator =(const ossimFontInformation& rhs);
-   
-   static const char* FAMILY_NAME_KW;
-   static const char* STYLE_NAME_KW;
-   static const char* POINT_SIZE_KW;   // point_size: ( x, y ) 
-   static const char* POINT_SIZE_X_KW; // deprecated
-   static const char* POINT_SIZE_Y_KW; // deprecated
-   static const char* FIXED_FLAG_KW;
-   static const char* SHEAR_KW;        // shear: ( x, y ) 
-   static const char* SHEAR_X_KW;      // deprecated
-   static const char* SHEAR_Y_KW;      // deprecated
-   static const char* SCALE_KW;        // scale: ( x, y ) 
-   static const char* SCALE_X_KW;      // deprecated
-   static const char* SCALE_Y_KW;      // deprecated
-   static const char* ROTATION_KW;
-   
-   
-   ossimString    theFamilyName;
-   ossimString    theStyleName;
-   ossimIpt       thePointSize;
-   bool           theFixedFlag;
-   ossimDpt       theScale;
-   double         theRotation;
-   ossimDpt       theShear;
-};
-
-#endif
diff --git a/include/ossim/base/ossimGeoPolygon.h b/include/ossim/base/ossimGeoPolygon.h
deleted file mode 100644
index 580612c..0000000
--- a/include/ossim/base/ossimGeoPolygon.h
+++ /dev/null
@@ -1,158 +0,0 @@
-//*****************************************************************************
-// FILE: ossimPolygon.h
-//
-// Copyright (C) 2001 ImageLinks, Inc.
-//
-// License:  See top level LICENSE.txt file.
-//
-// AUTHOR: Garrett Potts
-//
-//*****************************************************************************
-//  $Id: ossimGeoPolygon.h 12760 2008-04-29 16:33:29Z dburken $
-#ifndef ossimGeoPolygon_HEADER
-#define ossimGeoPolygon_HEADER
-#include <vector>
-#include <ossim/base/ossimGpt.h>
-
-class ossimKeywordlist;
-
-class OSSIMDLLEXPORT ossimGeoPolygon
-{
-public:
-   friend OSSIM_DLL std::ostream& operator <<(std::ostream& out, const ossimGeoPolygon& poly);
-   ossimGeoPolygon():theCurrentVertex(-1),
-                     theOrderingType(OSSIM_VERTEX_ORDER_UNKNOWN)
-      {}
-   ossimGeoPolygon(const std::vector<ossimGpt>& points)
-      :theVertexList(points),
-       theOrderingType(OSSIM_VERTEX_ORDER_UNKNOWN)
-      {
-         theCurrentVertex = 0;
-      }
-   ossimGeoPolygon(const ossimGeoPolygon& rhs)
-      {
-         theVertexList   = rhs.theVertexList;
-         theOrderingType = rhs.theOrderingType;
-	 theAttributeList = rhs.theAttributeList;
-	 theHoleList = rhs.theHoleList;
-         theCurrentVertex = rhs.theCurrentVertex;
-      }
-
-    void addPoint(const ossimGpt& pt)
-      {
-         theVertexList.push_back(pt);
-      }
-   void addPoint(double lat, double lon, double h=ossim::nan(), const ossimDatum* datum=0)
-      {
-         theVertexList.push_back(ossimGpt(lat, lon, h, datum));
-      }
-   void addAttribute( const ossimString& attribute )
-     {
-       theAttributeList.push_back( attribute );
-     }
-   void addHole( const ossimGeoPolygon& polygon )
-     {
-       theHoleList.push_back( polygon );
-     }
-   ossimGpt& operator[](int index)
-      {
-         return theVertexList[index];
-      }
-   const ossimGpt& operator[](int index)const
-      {
-         return theVertexList[index];
-      }
-   
-   const std::vector<ossimGpt>& getVertexList()const
-      {
-         return theVertexList;
-      }
-   std::vector<ossimString>& getAttributeList()
-      {
-         return theAttributeList;
-      }
-   std::vector<ossimGeoPolygon>& getHoleList()
-      {
-         return theHoleList;
-      }
-
-   void clear()
-      {
-         theVertexList.clear();
-      }
-   ossim_uint32 size()const
-      {
-         return (ossim_uint32)theVertexList.size();
-      }
-   void resize(ossim_uint32 newSize)
-      {
-         theVertexList.resize(newSize);
-         theCurrentVertex = 0;
-         theOrderingType  = OSSIM_VERTEX_ORDER_UNKNOWN;
-      }
-   const ossimGeoPolygon& operator = (const std::vector<ossimGpt>& rhs)
-      {
-         theVertexList = rhs;
-         theCurrentVertex = 0;
-         theOrderingType = OSSIM_VERTEX_ORDER_UNKNOWN;
-
-         return *this;
-      }
-
-   const ossimGeoPolygon& operator = (const ossimGeoPolygon& rhs)
-      {
-         if(&rhs != this)
-         {
-            theVertexList = rhs.theVertexList;
-            theCurrentVertex = rhs.theCurrentVertex;
-	    theAttributeList = rhs.theAttributeList;
-	    theHoleList = rhs.theHoleList;
-         }
-         theOrderingType = rhs.theOrderingType;
-
-         return *this;
-      }
-   void stretchOut(ossimGeoPolygon& newPolygon,
-                   double displacement);
-   double area()const;
-
-   ossimGpt computeCentroid()const;
-   
-   bool vertex(int index, ossimGpt& v) const;
-   bool nextVertex(ossimDpt& v) const;
-   bool hasNans()const;
-   void reverseOrder();
-   
-   bool saveState(ossimKeywordlist& kwl,
-                  const char* prefix=0)const;
-   
-   bool loadState(const ossimKeywordlist& kwl,
-                  const char* prefix=0);
-    
-   void checkOrdering()const;
-   ossimVertexOrdering getOrdering()const
-      {
-         if(theOrderingType == OSSIM_VERTEX_ORDER_UNKNOWN)
-         {
-            checkOrdering();
-         }
-         return theOrderingType;
-      }
-   void setOrdering(ossimVertexOrdering ordering)
-      {
-         theOrderingType = ordering;
-      }
-protected:
-   std::vector<ossimGpt> theVertexList;
-   std::vector<ossimString> theAttributeList;
-   std::vector<ossimGeoPolygon> theHoleList;
-   mutable ossim_int32 theCurrentVertex;
-   
-   /*!
-    * This enumeration is found in ossimConstants.h
-    */
-   mutable ossimVertexOrdering theOrderingType;
-   
-};
-
-#endif
diff --git a/include/ossim/base/ossimGeoTiffDatumLut.h b/include/ossim/base/ossimGeoTiffDatumLut.h
deleted file mode 100644
index 5d0ae0d..0000000
--- a/include/ossim/base/ossimGeoTiffDatumLut.h
+++ /dev/null
@@ -1,74 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2001 ImageLinks Inc.
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Contains class declaration for GeoTiffDatumLut. Used to map a
-// geotiff coordinate transformation code to an ossim projection.
-//*******************************************************************
-//  $Id: ossimGeoTiffDatumLut.h 9094 2006-06-13 19:12:40Z dburken $
-
-#ifndef ossimGeoTiffDatumLut_HEADER
-#define ossimGeoTiffDatumLut_HEADER
-
-#include <ossim/base/ossimLookUpTable.h>
-#include <ossim/base/ossimKeywordNames.h>
-
-class OSSIMDLLEXPORT ossimGeoTiffDatumLut : public ossimLookUpTable
-{
-public:
-
-   enum
-   {
-      //---
-      // Datum codes cut from geotiff specification section 6.3.2.1.
-      //---
-      GCS_Adindan                     = 4201,
-      GCS_Arc_1950                    = 4209,
-      GCS_Arc_1960                    = 4210,
-      GCS_ED50                        = 4230,
-      GCS_NAD27                       = 4267,
-      GCS_NAD83                       = 4269,
-      GCS_OSGB_1936                   = 4277,
-      GCS_WGS_72                      = 4322,
-      GCS_WGS_84                      = 4326,
-      GCS_Tokyo                       = 4301,
-      GCS_NAD83_HARN                  = 4152,
-
-      //---
-      // Datum codes cut from geotiff specification section 6.3.2.1.
-      // NOTE:  These codes imply an ellipsoid only!
-      //---
-      GCS_Clark_1866                  = 4008,
-      
-      //---
-      // Datum codes cut from geotiff specification section 6.3.2.2.
-      //---
-      DatumE_WGS84                    = 6030,
-      Datum_Adindan                   = 6201,
-      Datum_Arc_1950                  = 6209,
-      Datum_Arc_1960                  = 6210,
-      Datum_European_Datum_1950       = 6230,
-      Datum_North_American_Datum_1927 = 6267,
-      Datum_North_American_Datum_1983 = 6269,
-      Datum_OSGB_1936                 = 6277,
-      Datum_Tokyo                     = 6301,
-      Datum_WGS72                     = 6322,
-      Datum_WGS84                     = 6326,
-      Datum_NAD83_HARN                = 6152
-   };
-   
-   ossimGeoTiffDatumLut();
-
-   virtual ~ossimGeoTiffDatumLut();
-   
-   virtual ossimKeyword getKeyword() const;
-};
-
-#endif
diff --git a/include/ossim/base/ossimGeocent.h b/include/ossim/base/ossimGeocent.h
deleted file mode 100644
index f234069..0000000
--- a/include/ossim/base/ossimGeocent.h
+++ /dev/null
@@ -1,162 +0,0 @@
-#ifndef GEOCENT_H
-  #define GEOCENT_H
-
-/***************************************************************************/
-/* RSC IDENTIFIER:  GEOCENTRIC
- *
- * ABSTRACT
- *
- *    This component provides conversions between Geodetic coordinates (latitude,
- *    longitude in radians and height in meters) and Geocentric coordinates
- *    (X, Y, Z) in meters.
- *
- * ERROR HANDLING
- *
- *    This component checks parameters for valid values.  If an invalid value
- *    is found, the error code is combined with the current error code using 
- *    the bitwise or.  This combining allows multiple error codes to be
- *    returned. The possible error codes are:
- *
- *      GEOCENT_NO_ERROR        : No errors occurred in function
- *      GEOCENT_LAT_ERROR       : Latitude out of valid range
- *                                 (-90 to 90 degrees)
- *      GEOCENT_LON_ERROR       : Longitude out of valid range
- *                                 (-180 to 360 degrees)
- *      GEOCENT_A_ERROR         : Semi-major axis less than or equal to zero
- *      GEOCENT_INV_F_ERROR     : Inverse flattening outside of valid range
- *								                 (250 to 350)
- *
- *
- * REUSE NOTES
- *
- *    GEOCENTRIC is intended for reuse by any application that performs
- *    coordinate conversions between geodetic coordinates and geocentric
- *    coordinates.
- *    
- *
- * REFERENCES
- *    
- *    An Improved Algorithm for Geocentric to Geodetic Coordinate Conversion,
- *    Ralph Toms, February 1996  UCRL-JC-123138.
- *    
- *    Further information on GEOCENTRIC can be found in the Reuse Manual.
- *
- *    GEOCENTRIC originated from : U.S. Army Topographic Engineering Center
- *                                 Geospatial Information Division
- *                                 7701 Telegraph Road
- *                                 Alexandria, VA  22310-3864
- *
- * LICENSES
- *
- *    None apply to this component.
- *
- * RESTRICTIONS
- *
- *    GEOCENTRIC has no restrictions.
- *
- * ENVIRONMENT
- *
- *    GEOCENTRIC was tested and certified in the following environments:
- *
- *    1. Solaris 2.5 with GCC version 2.8.1
- *    2. Windows 95 with MS Visual C++ version 6
- *
- * MODIFICATIONS
- *
- *    Date              Description
- *    ----              -----------
- *
- *
- */
-
-
-/***************************************************************************/
-/*
- *                              DEFINES
- */
-  #define GEOCENT_NO_ERROR        0x0000
-  #define GEOCENT_LAT_ERROR       0x0001
-  #define GEOCENT_LON_ERROR       0x0002
-  #define GEOCENT_A_ERROR         0x0004
-  #define GEOCENT_INV_F_ERROR     0x0008
-
-
-/***************************************************************************/
-/*
- *                              FUNCTION PROTOTYPES
- */
-
-/* ensure proper linkage to c++ programs */
-  #ifdef __cplusplus
-extern "C" {
-  #endif
-
-
-  long Set_Geocentric_Parameters (double a, 
-                                  double f);
-/*
- * The function Set_Geocentric_Parameters receives the ellipsoid parameters
- * as inputs and sets the corresponding state variables.
- *
- *    a  : Semi-major axis of ellipsoid, in meters.          (input)
- *    f  : Flattening of ellipsoid.						               (input)
- */
-
-
-  void Get_Geocentric_Parameters (double *a, 
-                                  double *f);
-/*
- * The function Get_Geocentric_Parameters returns the ellipsoid parameters
- * to be used in geocentric coordinate conversions.
- *
- *    a  : Semi-major axis of ellipsoid, in meters.          (output)
- *    f  : Flattening of ellipsoid.						               (output)
- */
-
-
-  long Convert_Geodetic_To_Geocentric (double Latitude,
-                                       double Longitude,
-                                       double Height,
-                                       double *X,
-                                       double *Y,
-                                       double *Z);
-/*
- * The function Convert_Geodetic_To_Geocentric converts geodetic coordinates
- * (latitude, longitude, and height) to geocentric coordinates (X, Y, Z),
- * according to the current ellipsoid parameters.
- *
- *    Latitude  : Geodetic latitude in radians                     (input)
- *    Longitude : Geodetic longitude in radians                    (input)
- *    Height    : Geodetic height, in meters                       (input)
- *    X         : Calculated Geocentric X coordinate, in meters.   (output)
- *    Y         : Calculated Geocentric Y coordinate, in meters.   (output)
- *    Z         : Calculated Geocentric Z coordinate, in meters.   (output)
- *
- */
-
-
-  void Convert_Geocentric_To_Geodetic (double X,
-                                       double Y, 
-                                       double Z,
-                                       double *Latitude,
-                                       double *Longitude,
-                                       double *Height);
-/*
- * The function Convert_Geocentric_To_Geodetic converts geocentric
- * coordinates (X, Y, Z) to geodetic coordinates (latitude, longitude, 
- * and height), according to the current ellipsoid parameters.
- *
- *    X         : Geocentric X coordinate, in meters.         (input)
- *    Y         : Geocentric Y coordinate, in meters.         (input)
- *    Z         : Geocentric Z coordinate, in meters.         (input)
- *    Latitude  : Calculated latitude value in radians.       (output)
- *    Longitude : Calculated longitude value in radians.      (output)
- *    Height    : Calculated height value, in meters.         (output)
- */
-
-
-  #ifdef __cplusplus
-}
-  #endif
-
-#endif /* GEOCENT_H */
diff --git a/include/ossim/base/ossimGeoid.h b/include/ossim/base/ossimGeoid.h
deleted file mode 100644
index 31386a7..0000000
--- a/include/ossim/base/ossimGeoid.h
+++ /dev/null
@@ -1,66 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// DESCRIPTION:
-//   Contains declaration of class ossimGeoid. Maintains a grid of elevation
-//   offsets for the geoid (mean sea level) relative to WGS-84 ellipsoid.
-//
-// SOFTWARE HISTORY:
-//>
-//   17Apr2001  Oscar Kramer
-//              Initial coding.
-//<
-//*****************************************************************************
-
-#ifndef ossimGeoid_HEADER
-#define ossimGeoid_HEADER
-
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimErrorStatusInterface.h>
-
-class ossimGpt;
-class ossimFilename;
-
-class OSSIMDLLEXPORT ossimGeoid : public ossimObject,
-				  public ossimErrorStatusInterface
-{
-public:
-   ossimGeoid();
-
-   virtual bool open(const ossimFilename& dir, ossimByteOrder byteOrder=OSSIM_BIG_ENDIAN) = 0;
-
-   /**
-    *  @return The offset from the ellipsoid to the geoid.  Returns
-    *  ossim::nan() if grid does not contain the point.
-    */
-   virtual double offsetFromEllipsoid(const ossimGpt& gpt) const = 0;
-
-protected:
-   virtual ~ossimGeoid();
-   
-   TYPE_DATA
-};
-
-/**
- * Identity geoid.
- */
-class OSSIM_DLL ossimIdentityGeoid : public ossimGeoid
-{
-public:
-   virtual ossimString getShortName()const
-   {
-      return ossimString("identity");
-   }
-   virtual bool open(const ossimFilename& /*dir*/, ossimByteOrder)
-   {
-      return false; // can't be opened 
-   }
-   virtual double offsetFromEllipsoid(const ossimGpt& /*gpt*/) const
-   {
-      return 0.0;
-   }
-   
-   TYPE_DATA
-};
-#endif
diff --git a/include/ossim/base/ossimGeoidEgm96.h b/include/ossim/base/ossimGeoidEgm96.h
deleted file mode 100644
index 3d6bd87..0000000
--- a/include/ossim/base/ossimGeoidEgm96.h
+++ /dev/null
@@ -1,66 +0,0 @@
-//*******************************************************************
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author:  David Burken
-//
-// Description:
-//
-// Contains class definition for ossimGeoidEgm96 which is
-// "Earth Gravity Model 1996".
-//
-//*******************************************************************
-//  $Id: ossimGeoidEgm96.h 14799 2009-06-30 08:54:44Z dburken $
-
-#ifndef ossimGeoidEgm96_HEADER
-#define ossimGeoidEgm96_HEADER
-
-#include <ossim/base/ossimGeoid.h>
-#include <vector>
-
-#define GEOID_NO_ERROR              0x0000
-#define GEOID_FILE_OPEN_ERROR       0x0001
-#define GEOID_INITIALIZE_ERROR      0x0002
-#define GEOID_NOT_INITIALIZED_ERROR 0x0004
-#define GEOID_LAT_ERROR             0x0008
-#define GEOID_LON_ERROR             0x0010
-
-class ossimGpt;
-
-class OSSIMDLLEXPORT ossimGeoidEgm96 : public ossimGeoid
-{
-
-public:
-   ossimGeoidEgm96();
-   ossimGeoidEgm96(const ossimFilename& grid_file,
-                   ossimByteOrder byteOrder=OSSIM_BIG_ENDIAN);
-   
-   virtual ~ossimGeoidEgm96();
-
-   virtual bool open(const ossimFilename& grid_file,
-                     ossimByteOrder byteOrder=OSSIM_BIG_ENDIAN);
-
-   virtual ossimString getShortName()const;
-   
-   /**
-    *  @return The offset from the ellipsoid to the geoid or ossim::nan()
-    *  (IEEE NAN) if grid does not contain the point.
-    */
-   virtual double offsetFromEllipsoid(const ossimGpt& gpt) const;
-
-   double geoidToEllipsoidHeight(double lat,
-                                 double lon,
-                                 double geoidHeight) const;
-   
-   double ellipsoidToGeoidHeight(double lat,
-                           double lon,
-                           double ellipsoidHeight) const;
-
-protected:
-
-   std::vector<float> theGeoidHeightBuffer;
-   mutable float* theGeoidHeightBufferPtr;
-   TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/base/ossimGeoidManager.h b/include/ossim/base/ossimGeoidManager.h
deleted file mode 100644
index bfd859c..0000000
--- a/include/ossim/base/ossimGeoidManager.h
+++ /dev/null
@@ -1,87 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Contains declaration of class ossimGeoidManager. Maintains
-//   a list of geoids.
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimGeoidManager.h 16139 2009-12-18 18:37:07Z gpotts $
-
-#ifndef ossimGeoidManager_HEADER
-#define ossimGeoidManager_HEADER
-
-#include <vector>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimGeoid.h>
-/*****************************************************************************
- *
- * CLASS: ossimGeoidManager 
- *
- *****************************************************************************/
-class OSSIMDLLEXPORT ossimGeoidManager : public ossimGeoid
-{
-public:
-
-
-   virtual ~ossimGeoidManager();
-      
-   /**
-    * Implements singelton pattern:
-    */
-   static ossimGeoidManager* instance();
-
-   
-   /**
-    * Permits initialization of geoids from directory name. Should never be
-    * called since called on specific geoid types:
-    */
-   virtual bool open(const ossimFilename& dir, ossimByteOrder byteOrder);
-
-   /**
-    *  @return The offset from the ellipsoid to the geoid or ossim::nan()
-    *  if grid does not contain the point.
-    */
-   virtual double offsetFromEllipsoid(const ossimGpt& gpt) const;
-
-   /**
-    * Method to save the state of the object to a keyword list.
-    * Return true if ok or false on error. DO NOTHING
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0) const;
-
-   /**
-    * Method to the load (recreate) the state of the object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   /**
-    * Permits adding additional geoids to the list: 
-    */
-   virtual void addGeoid(ossimRefPtr<ossimGeoid> geoid, bool toFrontFlag=false);
-
-   ossimGeoid* findGeoidByShortName(const ossimString& shortName, bool caseSensitive=true);
-private:
-   /**
-    *  Private constructor.  Use "instance" method.
-    */
-   ossimGeoidManager();
-
-   static ossimGeoidManager* theInstance;
-   mutable std::vector< ossimRefPtr<ossimGeoid> > theGeoidList;
-   
-   // will use this as a identity if one wants but don't want it part of the internal list
-   //
-   ossimRefPtr<ossimGeoid> theIdentityGeoid;
-   
-   TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/base/ossimGeoidNgs.h b/include/ossim/base/ossimGeoidNgs.h
deleted file mode 100644
index 8d19e8e..0000000
--- a/include/ossim/base/ossimGeoidNgs.h
+++ /dev/null
@@ -1,64 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-// Description:
-//
-//*******************************************************************
-//  $Id: ossimGeoidNgs.h 11496 2007-08-06 09:18:28Z dburken $
-#ifndef ossimGeoidNgs_HEADER
-#define ossimGeoidNgs_HEADER
-
-#include <ossim/base/ossimGeoid.h>
-#include <ossim/base/ossimGeoidNgsHeader.h>
-
-class OSSIMDLLEXPORT ossimGeoidNgs : public ossimGeoid
-{
-
-public:
-   ossimGeoidNgs();
-   ossimGeoidNgs(const ossimFilename& dir,
-                 ossimByteOrder byteOrder = OSSIM_LITTLE_ENDIAN);
-   virtual ~ossimGeoidNgs();
-
-   virtual ossimString getShortName()const;
-   
-   virtual bool open(const ossimFilename& dir,
-                     ossimByteOrder byteOrder = OSSIM_LITTLE_ENDIAN);
-
-   virtual bool addFile(const ossimFilename& file,
-                        ossimByteOrder byteOrder = OSSIM_LITTLE_ENDIAN);
-   /**
-    *  @return The offset from the ellipsoid to the geoid or ossim::nan()
-    *  if grid does not contain the point.
-    */
-   virtual double offsetFromEllipsoid(const ossimGpt&) const;
-
-   /**
-    *  @return Geoid to ellipsoid height or ossim::nan()
-    *  if grid does not contain the point.
-    */
-   double geoidToEllipsoidHeight(double lat,
-                                 double lon,
-                                 double geoidHeight) const;
-
-   /**
-    *  @return Ellipsoid to geoid height or ossim::nan()
-    *  if grid does not contain the point.
-    */
-   double ellipsoidToGeoidHeight(double lat,
-                                 double lon,
-                                 double ellipsoidHeight) const;
-protected:
-   void fixLatLon(double &lat, double &lon) const;
-   double deltaHeight(double lat, double lon)const;
-   
-   std::vector<ossimGeoidNgsHeader> theGridVector;
-   ossimString theShortName;
-
-   TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/base/ossimGeoidNgsHeader.h b/include/ossim/base/ossimGeoidNgsHeader.h
deleted file mode 100644
index e2f105f..0000000
--- a/include/ossim/base/ossimGeoidNgsHeader.h
+++ /dev/null
@@ -1,84 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts (gpotts at imagelinks.com)
-//
-// Description:
-//
-//*******************************************************************
-//  $Id: ossimGeoidNgsHeader.h 11496 2007-08-06 09:18:28Z dburken $
-#ifndef ossimGeoidNgsHeader_HEADER
-#define ossimGeoidNgsHeader_HEADER
-#include <ossim/base/ossimFilename.h>
-
-#include <iostream>
-
-class OSSIMDLLEXPORT ossimGeoidNgsHeader
-{
-public:
-   friend std::ostream& operator << (std::ostream &out, const ossimGeoidNgsHeader &data);
-   
-   ossimGeoidNgsHeader();
-   ossimGeoidNgsHeader(const ossimFilename &fileName,
-                       ossimByteOrder byteOrder=OSSIM_LITTLE_ENDIAN);
-
-   bool initialize(const ossimFilename &fileName,
-                   ossimByteOrder byteOrder=OSSIM_LITTLE_ENDIAN);
-   
-   double southernMostLat()const{return theSouthernMostLatitude;}
-   double westernMostLon()const{return theWesternMostLongitude;}
-   double latDelta()const{return theLatDelta;}
-   double lonDelta()const{return theLonDelta;}
-   int    rows()const{return theRows;}
-   int    cols()const{return theCols;}
-   int    dataType()const{return theDataType;}
-   bool   pointWithin(double lat, double lon)const;
-   const ossimFilename& filename()const{return theFilename;}
-   
-   int headerSize()const{return 44;}
-   int dataTypeSize()const{return theDataType==1?4:0;}
-
-   /** @return Height delta or ossim::nan() if not found. */
-   double getHeightDelta(double lat, double lon)const;
-   
-private:
-   ossimFilename theFilename;
-   ossimByteOrder theByteOrder;
-   double theSouthernMostLatitude;
-
-   /*!
-    * Important:  The geoid.bin files expresses this as a possitive value.
-    *
-    * example: -90.0 is 270 degrees.
-    */
-   double theWesternMostLongitude;
-
-   /*!
-    * Specifies the spacing of the latitude direction.
-    */
-   double theLatDelta;
-
-   /*!
-    * longitude spacing.
-    */
-   double theLonDelta;
-
-   /*!
-    * theRows specifies the number of lat increments
-    */
-   int    theRows;
-
-   /*!
-    * theCols specifies the number of lon increments
-    */
-   int    theCols;
-
-   /*!
-    * Specifies the datatype.  if this is 1 then the data that follows
-    * is 4 byte floats.
-    */
-   int    theDataType;
-};
-
-#endif
diff --git a/include/ossim/base/ossimGpt.h b/include/ossim/base/ossimGpt.h
deleted file mode 100644
index f3a6ce3..0000000
--- a/include/ossim/base/ossimGpt.h
+++ /dev/null
@@ -1,350 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt.
-//
-// Author: Garrett Potts
-//
-// Description:
-//
-// Contains class declaration for gpt.
-//
-// CONSTRUCTOR TAKES LAT/LON IN DEGREES!!!
-//
-// Height is relative to the ellipsoid in meters.
-//
-//*******************************************************************
-//  $Id: ossimGpt.h 19900 2011-08-04 14:19:57Z dburken $
-
-#ifndef ossimGpt_HEADER
-#define ossimGpt_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimDatumFactory.h>
-#include <ossim/base/ossimString.h>
-#include <iosfwd>
-
-class  ossimDatum;
-class  ossimEcefPoint;
-
-class OSSIM_DLL ossimGpt
-{
-public:
-   /**
-    * Constructor.  The values are assumed to be in DEGREES.
-    */
-   ossimGpt(const double alat=0,  // degrees
-            const double alon=0,  // degrees
-            const double ahgt=0,
-            const ossimDatum* aDatum=ossimDatumFactory::instance()->wgs84())
-      : lat(alat),
-        lon(alon),
-        hgt(ahgt),  // relative to the ellipsoid
-        theDatum(aDatum) {}//limitLonTo180();}
-
-   /**
-    * Copy Constructor:
-    */
-   ossimGpt(const ossimGpt& src);
-   
-   /**
-    * Constructor.  Conversion from geocentric to ground.
-    */
-   ossimGpt(const ossimEcefPoint &aPt,
-            const ossimDatum* aDatum=ossimDatumFactory::instance()->wgs84());
-
-   /**
-    * latr().  Returns the latitude in radian measure.  
-    */
-   double latr()const{return lat*RAD_PER_DEG;}
-
-   /**
-    * Returns the latitude in radian measure.  
-    */
-   void latr(double radianValue){lat = radianValue*DEG_PER_RAD;}
-
-   /**
-    * Returns the longitude in radian measure.  
-    */
-   double lonr()const{return lon*RAD_PER_DEG;}
-
-   /**
-    * Assumes the value being passed in is in radians.
-    */
-   void lonr(double radianValue)
-      {lon = radianValue*DEG_PER_RAD; }//limitLonTo180();}
-
-   /**
-    * Will convert the radian measure to degrees.
-    */
-   double latd()const{return lat;}
-
-   /**
-    * Assumes the passed in value is in degrees.
-    */
-   void latd(double degreeValue){lat = degreeValue;}
-
-   /**
-    * Will convert the radian measure to degrees.
-    */
-   double lond()const{return lon;}
-
-   /**
-    *  Assumes the passed in value is in degrees.
-    */
-   void lond(double degreeValue){lon = degreeValue; }//limitLonTo180();}
-
-   /**
-    * @return Returns the height in meters above the ellipsoid.
-    */
-   double height()const{return hgt;}
-
-   /**
-    * @return Returns the height in meters above mean sea level (msl).
-    * 
-    * @note This is the height above the ellipsoid minus any geoid offset.
-    */
-   double heightMSL() const;
-
-   /**
-    * Sets the "hgt" data member to height.
-    *
-    * @param height Height above the ellipsoid in meters.
-    */
-   void height(double height){hgt = height;}
-
-   /**
-    * Sets the "hgt" data member to heightMsl adding any geiod offset.
-    *
-    * @param heightMSL Height in meters above msl.
-    */
-   void heightMSL(double heightMSL);
-
-   void makeNan(){lat=ossim::nan(); lon=ossim::nan(); hgt=ossim::nan();}
-   bool isNan()const
-   {
-      return (ossim::isnan(lat)&&ossim::isnan(lon)&&ossim::isnan(hgt));
-   }
-   bool hasNans()const
-   {
-      return (ossim::isnan(lat)||ossim::isnan(lon)||ossim::isnan(hgt));
-   }
-   bool isLatNan()const{return ossim::isnan(lat);}
-   bool isLonNan()const{return ossim::isnan(lon);}
-   bool isHgtNan()const{return ossim::isnan(hgt);}
-
-   std::ostream& print(std::ostream& os, ossim_uint32 precision=15) const;
-
-   friend OSSIMDLLEXPORT std::ostream& operator<<(std::ostream& os,
-                                                  const ossimGpt& pt);
-   
-   /**
-    * @param precision Output floating point precision.
-    * 
-    * @return ossimString representing point.
-    *
-    * Output format:
-    * ( 30.00000000000000, -90.00000000000000, 0.00000000000000, WGE )
-    *   -----latitude----  -----longitude----  ------height----  datum
-    */
-   ossimString toString(ossim_uint32 precision=15) const;
-
-   /**
-    * Initializes this point from string.  This method opens an istream to
-    * s and then calls operator>>.
-    *
-    * Expected format:
-    * ( 30.00000000000000, -90.00000000000000, 0.00000000000000, WGE )
-    *  -----latitude----  -----longitude----  ------height----  datum
-    *
-    * @param s String to initialize from.
-    *
-    * @see operator>>
-    */
-   void toPoint(const std::string& s);
-   
-   /**
-    * Method to input the formatted string of the "operator<<".
-    * 
-    * This method starts by doing a "makeNan" on aPt.  So if anything goes
-    * wrong with the stream or parsing aPt could be all or partially nan.
-    *
-    * @param is Input stream istream to formatted text.
-    * @param aPt osimGpt to be initialized from stream.
-    * @return istream pass in.
-    *
-    * Expected format:
-    * ( 30.00000000000000, -90.00000000000000, 0.00000000000000, WGE )
-    *  -----latitude----  -----longitude----  ------height----  datum
-    */
-   friend OSSIMDLLEXPORT std::istream& operator>>(std::istream& is,
-                                                  ossimGpt& pt);
-
-   /**
-    * datum().  returns the datum associated with this ground.
-    *
-    */
-   const ossimDatum* datum()const{return theDatum;}
-
-   /**
-    * Note: this will not do a shift.  This just allows you to set the datum.
-    *       If you want an automatic shift to occur then you must call the
-    *       changeDatum method
-    */
-   void datum(const ossimDatum* aDatum){theDatum = aDatum?aDatum:theDatum;}
-
-   /**
-    * This will actually perform a shift.
-    */
-   void changeDatum(const ossimDatum *datum);
-
-   const ossimGpt& operator = (const ossimGpt &aPt);
-   bool operator ==(const ossimGpt& gpt)const;
-
-   bool operator != (const ossimGpt& gpt) const { return !(*this == gpt); }
-   
-   /**
-    * METHOD: limitLonTo180()
-    * Converts the lon data member to a value between -180 and +180:
-    */
-   void  limitLonTo180()
-   { if (lon <= -180.0) lon += 360.0; else if (lon > 180.0) lon -= 360.0; }
-
-   /**
-    * @brief Wrap method to maintain longitude between -180 and +180 and latitude between
-    * -90 and +90.  Inlined below.
-    */
-   void wrap();
-
-   void clampLon(double low, double high)
-      {
-         if(lon < low) lon = low;
-         if(lon > high) lon = high;
-      }
-
-   void clampLat(double low, double high)
-      {
-         if(lat < low) lat = low;
-         if(lat > high) lat = high;
-      }
-
-   void clampHgt(double low, double high)
-      {
-         if(hgt < low) hgt = low;
-         if(hgt > high) hgt = high;
-      }
-      
-   /**
-    * METHOD: distanceTo(ossimGpt)
-    * Computes straight-line distance in meters between this and arg gpt:
-    */
-   double distanceTo(const ossimGpt& arg_gpt) const;
-
-   /**
-   * METHOD: azimuthTo(ossimGpt)
-   * Computes the great-circle starting azimuth (i.e., at this gpt) to the argument gpt in degrees.
-   * In other words, what direction we would need to start walking in to travel the shortest 
-   * distance to arg_gpt (assumes spherical earth)
-   */
-   double azimuthTo(const ossimGpt& arg_gpt) const;
-
-   ossimDpt metersPerDegree() const;
-   
-   ossimString toDmsString()const;
-
-   bool isEqualTo(const ossimGpt& rhs, ossimCompareType compareType=OSSIM_COMPARE_FULL)const;
-   ossim_float64 lat; //> latitude in degrees measure
-   ossim_float64 lon; //> longitude in degrees measure
-
-   /**
-    * Height in meters above the ellipsiod.
-    *
-    * @note This is NOT the same as "height msl".  "Height msl" is above
-    * the geoid or better know as mean sea level.
-    */ 
-   ossim_float64 hgt;
-
-private:
-   
-   /**
-    * Know reference location plus an implied ellipsoid.
-    */
-   const ossimDatum* theDatum;
- 
-};
-
-inline const ossimGpt& ossimGpt::operator=(const ossimGpt& aPt)
-{
-   if ( this != &aPt )
-   {
-      lat = aPt.lat;
-      lon = aPt.lon;
-      hgt = aPt.hgt;
-
-      if(aPt.datum())
-      {
-         theDatum = aPt.datum();
-      }
-      if(!theDatum)
-      {
-         theDatum = ossimDatumFactory::instance()->wgs84();
-      }
-   }
-   return *this;
-}
-
-inline void ossimGpt::wrap()
-{
-   if ( lon > 180.0 )
-   {
-      do
-      {
-         lon = lon - 360.0;
-      } while ( lon > 180.0 );
-   }
-   else if ( lon < -180.0  )
-   {
-      do
-      {
-         lon = lon + 360.0;
-      } while ( lon < -180.0 );
-   }
-   if ( lat > 90.0 )
-   {
-      if ( lat > 360.0 ) // Remove total wraps.
-      {
-         do
-         {
-            lat = lat - 360.0;
-         } while ( lat > 360.0);
-      }
-      if ( lat > 270.0 ) // Between 270 and 360.
-      {
-         lat = lat - 360.0;
-      }
-      else if ( lat > 90 ) // Between 90 and 270.
-      {
-         lat = 180.0 - lat;
-      }
-   }
-   else if ( lat < -90.0  )
-   {
-      if ( lat < -360.0 ) // Remove total wraps.
-      {
-         do
-         {
-            lat = lat + 360.0;
-         } while ( lat < -360.0);
-      }
-      if ( lat < -270.0 ) 
-      {
-         lat = 360.0 + lat; // Between -270 and -360;
-      }
-      else if ( lat < -90.0 )
-      {
-         lat = -180.0 - lat;
-      }
-   }
-}
-
-#endif /* #ifndef ossimGpt_HEADER */
diff --git a/include/ossim/base/ossimGrect.h b/include/ossim/base/ossimGrect.h
deleted file mode 100644
index 45a1fb2..0000000
--- a/include/ossim/base/ossimGrect.h
+++ /dev/null
@@ -1,331 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimGrect.h 22197 2013-03-12 02:00:55Z dburken $
-#ifndef ossimGrect_HEADER
-#define ossimGrect_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimDatumFactory.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimCommon.h>
-
-#include <vector>
-#include <iostream>
-
-class OSSIM_DLL ossimGrect
-{
-public:
-   friend OSSIM_DLL std::ostream& operator<<(std::ostream& os, const ossimGrect& rect);
-
-   /**
-    * Will default to 0,0,0,0.
-    */
-    ossimGrect()
-      :
-         theUlCorner(0.0, 0.0, 0.0),
-         theUrCorner(0.0, 0.0, 0.0),
-         theLrCorner(0.0, 0.0, 0.0),
-         theLlCorner(0.0, 0.0, 0.0)
-      {}
-
-   /**
-    * Copies the passed in rectangle to this
-    * object.
-    */
-   ossimGrect(const ossimGrect& rect)
-      :
-         theUlCorner(rect.ul()),
-         theUrCorner(rect.ur()),
-         theLrCorner(rect.lr()),
-         theLlCorner(rect.ll())
-      {}
-
-   /**
-    * WIll take two ground points and fill the
-    * bounding rect appropriately.
-    */
-   ossimGrect(const ossimGpt& ul,
-              const ossimGpt& lr)
-      : 
-         theUlCorner(ul),
-         theUrCorner(ul.latd(), lr.lond(),0,ul.datum()),
-         theLrCorner(lr),
-         theLlCorner(lr.latd(), ul.lond(), 0, ul.datum())
-      {
-      }
-
-   /**
-    * Takes the upper left and lower right ground
-    * points
-    */
-   ossimGrect(double ulLat,
-              double ulLon,
-              double lrLat,
-              double lrLon,
-              const ossimDatum* aDatum=ossimDatumFactory::instance()->wgs84())
-      : 
-         theUlCorner(ulLat, ulLon,0, aDatum),
-         theUrCorner(ulLat, lrLon, 0, aDatum),
-         theLrCorner(lrLat, lrLon, 0, aDatum),
-         theLlCorner(lrLat, ulLon, 0, aDatum)
-      {}
-   ossimGrect(const ossimGpt& point,
-              double latSpacingInDegrees,
-              double lonSpacingInDegrees)
-      :
-         theUlCorner(point),
-         theUrCorner(point),
-         theLrCorner(point),
-         theLlCorner(point)
-      {
-         std::vector<ossimGrect> v;
-         computeEvenTiles(v, latSpacingInDegrees, lonSpacingInDegrees);
-         if(v.size())
-            *this = v[0];
-      }
-   ossimGrect(std::vector<ossimGpt>& points);
-   ossimGrect(const ossimGpt& p1,
-              const ossimGpt& p2,
-              const ossimGpt& p3,
-              const ossimGpt& p4);
-              
-
-   const ossimGrect& operator=(const ossimGrect& rect)
-      {
-         theUlCorner = rect.ul();
-         theUrCorner = rect.ur();
-         theLrCorner = rect.lr();
-         theLlCorner = rect.ll();
-         return *this;
-      }
-
-   inline ossimGpt midPoint()const;
-   
-   /**
-    * Returns the height of a rectangle.
-    */
-   inline ossim_float64 height() const;
-
-   /**
-    * Returns the width of a rectangle.
-    */
-   inline ossim_float64 width()  const;
-   
-   inline const ossimGpt& ul()const;
-   inline const ossimGpt& ur()const;
-   inline const ossimGpt& ll()const;
-   inline const ossimGpt& lr()const;
-   
-   inline ossimGpt& ul();
-   inline ossimGpt& ur();
-   inline ossimGpt& ll();
-   inline ossimGpt& lr();
-	
-   inline void makeNan();
-   
-   inline bool isLonLatNan()const;
-	
-   inline bool hasNans()const;
-   
-   inline bool isNan()const;
-   
-   /*!
-    * Returns true if "this" rectangle is contained completely within the
-    * input rectangle "rect".
-    */
-   bool completely_within(const ossimGrect& rect) const;
-	
-   /*!
-    * Returns true if any portion of an input rectangle "rect" intersects
-    * "this" rectangle.  
-    */
-   bool intersects(const ossimGrect& rect) const;
-
-   inline ossimGrect clipToRect(const ossimGrect& rect)const;
-
-   inline ossimGrect combine(const ossimGrect& rect)const;
-
-   /**
-    * METHOD: pointWithin(ossimGpt)
-    *
-    * @param gpt Point to test for withinness.
-    * 
-    * @return true if argument is inside of horizontal rectangle
-    *
-    * @note Height is not considered and there is no datum shift applied if
-    * gpt is of a different datum than this datum.
-    */
-   inline bool pointWithin(const ossimGpt& gpt) const; //inline below
-
-   ossimGrect stretchToEvenBoundary(double latSpacingInDegrees,
-                                    double lonSpacingInDegrees)const;
-   
-   void computeEvenTiles(std::vector<ossimGrect>& result,
-                         double latSpacingInDegrees,
-                         double lonSpacingInDegrees,
-                         bool clipToGeographicBounds = true)const;
-private:
-   ossimGpt theUlCorner;
-   ossimGpt theUrCorner;
-   ossimGpt theLrCorner;
-   ossimGpt theLlCorner;
-  
-};
-
-//==================== BEGIN INLINE DEFINITIONS ===============================
-
-//*****************************************************************************
-//  INLINE METHOD: ossimGrect::midPoint()
-//*****************************************************************************
-inline ossimGpt ossimGrect::midPoint()const
-{
-   return ossimGpt((ul().latd() + ur().latd() + ll().latd() + lr().latd())*.25,
-                   (ul().lond() + ur().lond() + ll().lond() + lr().lond())*.25,
-                   (ul().height()+ur().height()+ll().height()+
-                    lr().height())*.25,
-                   ul().datum() );
-}
-
-//*****************************************************************************
-//  INLINE METHOD: ossimGrect::clipToRect()
-//*****************************************************************************
-inline ossimGrect ossimGrect::clipToRect(const ossimGrect& rect)const
-{
-    double     ulx, uly, lrx, lry;
-
-    ulx = ossim::max<ossim_float64>(rect.ul().lond(),ul().lond());
-    uly = ossim::min<ossim_float64>(rect.ul().latd(),ul().latd());
-    lrx = ossim::min<ossim_float64>(rect.lr().lond(),lr().lond());
-    lry = ossim::max<ossim_float64>(rect.lr().latd(),lr().latd());
-
-    if( lrx < ulx || lry > uly )
-    {
-       return ossimGrect(ossimGpt(0,0,0),ossimGpt(0,0,0));
-    }
-    else
-    {
-       return ossimGrect(ossimGpt(uly, ulx, 0, rect.ul().datum()),
-                         ossimGpt(lry, lrx, 0, rect.ul().datum()));
-    }
-}
-
-//*******************************************************************
-// Inline Method: ossimDrect::combine(const ossimDrect& rect)
-//*******************************************************************
-inline ossimGrect ossimGrect::combine(const ossimGrect& rect)const
-{
-   ossimGpt ulCombine;
-   ossimGpt lrCombine;
-	
-	ulCombine.lon = ((ul().lon <= rect.ul().lon)?ul().lon:rect.ul().lon);
-   ulCombine.lat = ((ul().lat >= rect.ul().lat)?ul().lat:rect.ul().lat);
-   lrCombine.lon = ((lr().lon >= rect.lr().lon)?lr().lon:rect.lr().lon);
-   lrCombine.lat = ((lr().lat <= rect.lr().lat)?lr().lat:rect.lr().lat);
-	
-   return ossimGrect(ulCombine, lrCombine);
-}
-
-//*****************************************************************************
-//  INLINE METHOD: ossimGrect::pointWithin()
-//*****************************************************************************
-inline bool ossimGrect::pointWithin(const ossimGpt& gpt) const
-{
-   return ((gpt.lat <= theUlCorner.lat) && (gpt.lat >= theLrCorner.lat) &&
-           (gpt.lon >= theUlCorner.lon) && (gpt.lon <= theLrCorner.lon));
-}
-
-inline ossim_float64 ossimGrect::height() const
-{
-   return fabs(theLlCorner.latd() - theUlCorner.latd());
-}
-
-inline ossim_float64 ossimGrect::width() const
-{
-   return fabs(theLrCorner.lond() - theLlCorner.lond());
-}
-
-inline const ossimGpt& ossimGrect::ul() const
-{
-   return theUlCorner;
-}
-
-inline const ossimGpt& ossimGrect::ur() const
-{
-   return theUrCorner;
-}
-
-inline const ossimGpt& ossimGrect::ll() const
-{
-   return theLlCorner;
-}
-
-inline const ossimGpt& ossimGrect::lr() const
-{
-   return theLrCorner;
-}
-   
-inline ossimGpt& ossimGrect::ul()
-{
-   return theUlCorner;
-}
-
-inline ossimGpt& ossimGrect::ur()
-{
-   return theUrCorner;
-}
-
-inline ossimGpt& ossimGrect::ll()
-{
-   return theLlCorner;
-}
-
-inline ossimGpt& ossimGrect::lr()
-{
-   return theLrCorner;
-}
-	
-inline void ossimGrect::makeNan()
-{
-   theUlCorner.makeNan();
-   theLlCorner.makeNan();
-   theLrCorner.makeNan();
-   theUrCorner.makeNan();
-}
-
-inline bool ossimGrect::isLonLatNan() const
-{
-   return ( ossim::isnan(theUlCorner.lat) ||
-            ossim::isnan(theUlCorner.lon) ||
-            ossim::isnan(theUrCorner.lat) ||
-            ossim::isnan(theUrCorner.lon) ||
-            ossim::isnan(theLrCorner.lat) ||
-            ossim::isnan(theLrCorner.lon) ||
-            ossim::isnan(theLlCorner.lat) ||
-            ossim::isnan(theLlCorner.lon) );
-}
-
-inline bool ossimGrect::hasNans() const
-{
-   return ( theUlCorner.hasNans() ||
-            theLlCorner.hasNans() ||
-            theLrCorner.hasNans() ||
-            theUrCorner.hasNans() );
-}
-
-inline bool ossimGrect::isNan()const
-{
-   return ( theUlCorner.hasNans() &&
-            theLlCorner.hasNans() &&
-            theLrCorner.hasNans() &&
-            theUrCorner.hasNans() );
-}
-
-#endif /* End of "#ifndef ossimGrect_HEADER" */
diff --git a/include/ossim/base/ossimHexString.h b/include/ossim/base/ossimHexString.h
deleted file mode 100644
index 7891679..0000000
--- a/include/ossim/base/ossimHexString.h
+++ /dev/null
@@ -1,142 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts (gpotts at imagelinks.com)
-// 
-//********************************************************************
-// $Id: ossimHexString.h 12952 2008-06-01 16:23:19Z dburken $
-
-#include <cstring>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimConstants.h>
-
-class OSSIMDLLEXPORT ossimHexString : public ossimString
-{
-public:
-   ossimHexString():ossimString()
-      {}
-   template <class Iter>
-      ossimHexString(Iter start, Iter end):ossimString(start, end){}
-   ossimHexString(const std::string& aString):ossimString(aString)
-      {}
-   ossimHexString(const char *aString):ossimString(aString?aString:"")
-      {}
-   ossimHexString(const ossimString& aString):ossimString(aString.c_str())
-      {}
-   
-   ossimHexString(char value):ossimString()
-      {
-         assign(value);
-      }
-   ossimHexString(ossim_int16 value):ossimString()
-      {
-         assign(value);
-      }
-   ossimHexString(ossim_int32 value):ossimString()
-      {
-         assign(value);
-      }
-   ossimHexString(ossim_uint8 value):ossimString()
-      {
-         assign(value);
-      }
-   ossimHexString(ossim_uint16 value):ossimString()
-      {
-         assign(value);
-      }
-   ossimHexString(ossim_uint32 value):ossimString()
-      {
-         assign(value);
-      }
-
-   bool operator==(const ossimHexString& s) const {return (std::strcmp(this->c_str(),s.c_str())==0);}
-   bool operator==(const char* s) const {return (std::strcmp(this->c_str(),s)==0);}
-   bool operator!=(const ossimHexString& s) const {return (std::strcmp(this->c_str(),s.c_str())!=0);}
-   bool operator!=(const char* s) const {return (std::strcmp(this->c_str(),s)!=0);}
-   operator const char*()const{return c_str();}
-   const char* chars()const{return c_str();}
-   char& operator[](int i)
-      {
-         return *( const_cast<char*>(c_str())+i);
-      }
-   const char& operator[](int i)const
-      {
-         return *(c_str()+i);
-      }
-   const ossimHexString& operator =(ossim_int16 value)
-      {
-         assign(value);
-         return *this;
-      }
-   const ossimHexString& operator =(ossim_int32 value)
-      {
-         assign(value);
-         return *this;
-      }
-   const ossimHexString& operator =(ossim_uint16 value)
-      {
-         assign(value);
-         return *this;
-      }
-   const ossimHexString& operator =(ossim_uint32 value)
-      {
-         assign(value);
-         return *this;
-      }
-   const ossimHexString& operator =(ossim_int8 value)
-      {
-         assign(value);
-         return *this;
-      }
-   const ossimHexString& operator =(ossim_uint8 value)
-      {
-         assign(value);
-         return *this;
-      }
-   const ossimHexString& operator =(const ossim_int8* value)
-      {
-         ossimString::operator=(value);
-         return *this;
-      }
-   const ossimHexString& operator =(const ossimString& value)
-      {
-         ossimString::operator=(value);
-         return *this;
-      }
-
-   const ossimHexString& operator =(const ossimHexString& value)
-      {
-         ossimString::operator=(value);
-         return *this;
-      }
-
-   const ossimHexString& operator =(const std::string& value)
-      {
-         ossimString::operator=(value);
-         return *this;
-      }
-   
-   ossim_int32  toInt32()const;
-   ossim_int16  toInt16()const;
-   ossim_int8   toChar()const;
-   ossim_uint8  toUchar()const;
-   ossim_uint32 toUint32()const;
-   ossim_uint16 toUint16()const;
-
-   void assign(ossim_int16 value)
-      {
-         assign((ossim_uint16)value);
-      }
-   void assign(ossim_int32 value)
-      {
-         assign((ossim_uint32)value);
-      }
-   void assign(ossim_int8 value)
-      {
-         assign((ossim_uint8)value);
-      }
-   void assign(ossim_uint16 value);
-   void assign(ossim_uint32 value);
-   void assign(ossim_uint8  value);
-};
diff --git a/include/ossim/base/ossimHistogramSource.h b/include/ossim/base/ossimHistogramSource.h
deleted file mode 100644
index f0d400b..0000000
--- a/include/ossim/base/ossimHistogramSource.h
+++ /dev/null
@@ -1,57 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimHistogramSource.h 11721 2007-09-13 13:19:34Z gpotts $
-#ifndef ossimHistogramSource_HEADER
-#define ossimHistogramSource_HEADER
-
-#include <ossim/base/ossimSource.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimMultiResLevelHistogram.h>
-
-class OSSIM_DLL ossimHistogramSource : public ossimSource
-{
-public:
-   
-   virtual ~ossimHistogramSource();
-   
-   virtual ossimRefPtr<ossimMultiResLevelHistogram> getHistogram();
-   
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-protected:
-   ossimHistogramSource(ossimObject* owner=NULL,
-                        ossim_uint32 numberOfInputs=0,
-                        ossim_uint32 numberOfOutputs=0,
-                        bool inputListFixedFlag=true,
-                        bool outputListFixedFlag=true);
-   
-   ossimRefPtr<ossimMultiResLevelHistogram> theHistogram;
-   
-   /*!
-    * if the filename is not "" then it will use
-    * this to store the histogram outside the keywordlist.
-    *
-    * it will set the filename keyword to the filename and
-    * during a save state will save it out to the file
-    * instead of inline to the keyword list.
-    */
-   ossimFilename                theFilename;
-   
-private:
-   /** Hidden from use copy constructor. */
-   ossimHistogramSource(const ossimHistogramSource&);
-
-TYPE_DATA
-};
-
-#endif /* End of "#ifndef ossimHistogramSource_HEADER" */
diff --git a/include/ossim/base/ossimIoStream.h b/include/ossim/base/ossimIoStream.h
deleted file mode 100644
index 89bb1c0..0000000
--- a/include/ossim/base/ossimIoStream.h
+++ /dev/null
@@ -1,176 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-// Description:
-// 
-// Class declarations for:
-//
-// ossimIStream
-// ossimOStream
-// ossimIOStream
-// ossimIOMemoryStream
-// ossimIMemoryStream
-// ossimOMemoryStream
-// ossimIOFStream
-// ossimIFStream
-// ossimOFStream
-//
-//*******************************************************************
-//  $Id: ossimIoStream.h 11176 2007-06-07 19:45:56Z dburken $
-#ifndef ossimIoStream_HEADER
-#define ossimIoStream_HEADER
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimStreamBase.h>
-#include <iostream>
-#include <fstream>
-#include <sstream>
-#include <ossim/base/ossimString.h>
-
-
-class OSSIM_DLL ossimIStream : public ossimStreamBase, public std::istream   
-{
-public:
-   ossimIStream();
-   ossimIStream(std::streambuf* sb);
-   virtual ~ossimIStream();
-};
-
-
-class OSSIM_DLL ossimOStream : public ossimStreamBase, public std::ostream
-{
-public:
-   ossimOStream();
-   ossimOStream(std::streambuf* sb);   
-   virtual ~ossimOStream();
-};
-
-class OSSIM_DLL ossimIOStream : public ossimStreamBase, public std::iostream
-{
-public:
-   ossimIOStream();
-   virtual ~ossimIOStream();
-};
-
-class OSSIM_DLL ossimIOMemoryStream : public ossimIOStream
-{
-public:
-   ossimIOMemoryStream();
-
-   virtual ~ossimIOMemoryStream();
-
-   // ??? (drb)
-   bool is_open()const;
-
-   // ??? (drb)
-   virtual void open(const char* /* protocolString */,
-                     int /* openMode */);
-
-   ossimString str();
-
-   // ??? (drb)
-   virtual void close();
-
-   // ??? (drb) std::streamsize
-   ossim_uint64 size()const;
-
-protected:
-   std::stringbuf theBuf;
-};
-
-class OSSIM_DLL ossimIMemoryStream : public ossimIStream
-{
-public:
-   
-   ossimIMemoryStream(const ossimString& inputBuf);
-   
-   virtual ~ossimIMemoryStream();
-   
-   bool is_open()const;
-   
-   ossim_uint64 size()const;
-   
-   virtual void open(const char* /* protocolString */,
-                     int /* openMode */ );
-
-   virtual void close();
-   
-   ossimString str();
-
-protected:
-   std::stringbuf theBuf;
-   
-};
-
-class OSSIM_DLL ossimOMemoryStream : public ossimOStream
-{
-public:
-   ossimOMemoryStream();
-   virtual ~ossimOMemoryStream();   
-
-   bool is_open()const;
-
-   ossim_uint64 size()const;
-
-   virtual void open(const char* /* protocolString */,
-                     int /* openMode */ );
-
-   virtual void close();
-
-   ossimString str();
-
-protected:
-   std::stringbuf theBuf;
-};
-
-class OSSIM_DLL ossimIOFStream : public ossimStreamBase, public std::fstream
-{
-public:
-   ossimIOFStream();
-
-   ossimIOFStream(const char* name,
-                  std::ios_base::openmode mode =
-                  std::ios_base::in | std::ios_base::out);
-
-   virtual ~ossimIOFStream();
-};
-
-class OSSIM_DLL ossimIFStream : public ossimStreamBase, public std::ifstream
-{
-public:
-   ossimIFStream();
-   
-   ossimIFStream(const char* file,
-                 std::ios_base::openmode mode = std::ios_base::in);
-
-   virtual ~ossimIFStream();
-
-};
-
-class OSSIM_DLL ossimOFStream : public ossimStreamBase, public std::ofstream
-{
-public:
-   ossimOFStream();
-
-   ossimOFStream(const char* name,
-                 std::ios_base::openmode mode =
-                 std::ios_base::out|std::ios_base::trunc);
-
-   virtual ~ossimOFStream();
-
-};
-
-OSSIM_DLL void operator >> (ossimIStream& in,ossimOStream& out);
-OSSIM_DLL ossimIOStream& operator >> (ossimIStream& in,ossimIOStream& out);
-OSSIM_DLL void operator >> (ossimIOStream& in,ossimOStream& out);
-OSSIM_DLL ossimIOStream& operator >> (ossimIOStream& in,ossimIOStream& out);
-OSSIM_DLL void operator << (ossimOStream& out, ossimIStream& in);
-OSSIM_DLL void operator << (ossimOStream& out, ossimIOStream& in);
-OSSIM_DLL ossimIOStream& operator << (ossimIOStream& out, ossimIStream& in);
-OSSIM_DLL ossimIOStream& operator << (ossimIOStream& out, ossimIOStream& in);
-
-
-#endif
diff --git a/include/ossim/base/ossimKeywordNames.h b/include/ossim/base/ossimKeywordNames.h
deleted file mode 100644
index bacefd8..0000000
--- a/include/ossim/base/ossimKeywordNames.h
+++ /dev/null
@@ -1,206 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  See top level LICENSE.txt file
-//
-// Author: Ken Melero (kmelero at remotesensing.org)
-//
-// Description: Common file for global Keywors.
-//
-//*************************************************************************
-// $Id: ossimKeywordNames.h 19180 2011-03-22 17:36:33Z oscarkramer $
-
-#ifndef ossimKeywordNames_HEADER
-#define ossimKeywordNames_HEADER
-
-#include <ossim/base/ossimConstants.h>
-
-class OSSIMDLLEXPORT ossimKeywordNames
-{
-public:
-   //***
-   // NOTE:  List keyword in alphabetical order.
-   //***
-   static const char* AZIMUTH_ANGLE_KW;
-   static const char* BAND_KW;
-   static const char* BANDS_KW;
-   static const char* BORDER_SIZE_KW;
-   static const char* BRUSH_COLOR_KW;
-   static const char* BYTE_ORDER_KW;
-   static const char* CE90_ABSOLUTE_KW;
-   static const char* CE90_RELATIVE_KW;
-   static const char* CENTER_PIXEL_X_KW;
-   static const char* CENTER_PIXEL_Y_KW;
-   static const char* CENTRAL_MERIDIAN_KW;
-   static const char* CENTRAL_POINT1_LAT_KW;
-   static const char* CENTRAL_POINT1_LON_KW;
-   static const char* CENTRAL_POINT2_LAT_KW;
-   static const char* CENTRAL_POINT2_LON_KW;
-   static const char* COMPRESS_KW;
-   static const char* COMPRESSION_QUALITY_KW;
-   static const char* COMPRESSION_TYPE_KW;
-   static const char* CONVERGENCE_THRESHOLD_KW;
-   static const char* CREATE_EX_KW;
-   static const char* CREATE_EXTERNAL_GEOMETRY_KW;
-   static const char* CREATE_IMAGE_KW;
-   static const char* CREATE_HISTOGRAM_KW;   
-   static const char* CREATE_OVERVIEW_KW;
-   static const char* DATA_FILE_KW;
-   static const char* DATE_KW;
-   static const char* DATE_YEAR_KW;
-   static const char* DATE_MONTH_KW;
-   static const char* DATE_DAY_KW;
-   static const char* DATE_HOUR_KW;
-   static const char* DATE_MIN_KW;
-   static const char* DATE_SEC_KW;
-   static const char* DATE_FRACT_SEC_KW;
-   static const char* DATUM_KW;
-   static const char* DECIMAL_DEGREES_PER_PIXEL_LAT;
-   static const char* DECIMAL_DEGREES_PER_PIXEL_LON;
-   static const char* DESCRIPTION_KW;
-   static const char* ELEVATION_ANGLE_KW;
-   static const char* ELEVATION_CELL_KW;
-   static const char* ELEVATION_SOURCE_KW;
-   static const char* ELEVATION_LOOKUP_FLAG_KW;
-   static const char* ELLIPSE_CODE_KW;
-   static const char* ELLIPSE_EPSG_CODE_KW;
-   static const char* ELLIPSE_NAME_KW;
-   static const char* ENABLED_KW;
-   static const char* ENABLE_CACHE_KW;
-   static const char* EXTRACT_VERTICES_KW;  
-   static const char* ENTRY_KW;
-   static const char* FALSE_EASTING_NORTHING_KW;
-   static const char* FALSE_EASTING_NORTHING_UNITS_KW;
-   static const char* FALSE_EASTING_KW;
-   static const char* FALSE_NORTHING_KW;
-   static const char* FEATURE_NAME_KW;
-   static const char* FILENAME_KW;
-   static const char* FILEPATH_KW;
-   static const char* FILL_FLAG_KW;
-   static const char* FRAME_INDEX_KW;       
-   static const char* GCS_CODE_KW;
-   static const char* GEOM_FILE_KW;
-   static const char* HEMISPHERE_KW;
-   static const char* HORIZONTAL_SIZE_KW;
-   static const char* ID_KW;
-   static const char* IMAGE_CE90_KW;
-   static const char* IMAGE_FILE_KW;
-   static const char* IMAGE_ID_KW;
-   static const char* IMAGE_MODEL_TRANSFORM_MATRIX_KW;
-   static const char* IMAGE_MODEL_TRANSFORM_UNIT_KW;
-   static const char* IMAGE_PATH_KW;
-   static const char* IMAGE_TYPE_KW;
-   static const char* IMAGE_DATE_KW;
-   static const char* IMAGE_FILE_SIZE_KW;
-   static const char* INPUT_RR_LEVEL_KW;
-   static const char* INTERLEAVE_TYPE_KW;
-   static const char* JULIAN_DAY_KW;
-   static const char* LAT_INCREMENT_KW;
-   static const char* LL_LAT_KW;
-   static const char* LL_LON_KW;
-   static const char* LR_LAT_KW;
-   static const char* LR_LON_KW;
-   static const char* LL_X_KW;
-   static const char* LL_Y_KW;
-   static const char* LR_X_KW;
-   static const char* LR_Y_KW;
-   static const char* LON_INCREMENT_KW;
-   static const char* MAJOR_AXIS_KW;
-   static const char* MAX_VALUE_KW;
-   static const char* MAX_ITERATIONS_KW;
-   static const char* MAX_QUADTREE_LEVELS_KW;
-   static const char* METADATA_TYPE_KW;
-   static const char* METERS_PER_PIXEL_X_KW;
-   static const char* METERS_PER_PIXEL_Y_KW;
-   static const char* MINOR_AXIS_KW;
-   static const char* MIN_VALUE_KW;
-   static const char* NULL_VALUE_KW;
-   static const char* NUMBER_BANDS_KW;
-   static const char* NUMBER_ENTRIES_KW;
-   static const char* NUMBER_INPUT_BANDS_KW;
-   static const char* NUMBER_INPUTS_KW;
-   static const char* NUMBER_OUTPUTS_KW;
-   static const char* NUMBER_OUTPUT_BANDS_KW;
-   static const char* NUMBER_LINES_KW;
-   static const char* NUMBER_REDUCED_RES_SETS_KW;
-   static const char* NUMBER_SAMPLES_KW;
-   static const char* ORIGIN_LATITUDE_KW;
-   static const char* ORIGIN_X_KW;
-   static const char* ORIGIN_Y_KW;
-   static const char* OUTPUT_FILE_KW;
-   static const char* OUTPUT_FILE_PREFIX_KW;
-   static const char* OUTPUT_FILE_EXTENSION_KW;
-   static const char* OUTPUT_TILE_SIZE_KW;
-   static const char* OVERVIEW_COMPRESSION_QUALITY_KW;
-   static const char* OVERVIEW_COMPRESSION_TYPE_KW;
-   static const char* OVERVIEW_FILE_KW;
-   static const char* OVERVIEW_STOP_DIMENSION_KW;
-   static const char* PCS_CODE_KW;
-   static const char* PEN_COLOR_KW;
-   static const char* PHOTOMETRIC_KW;
-   static const char* PIXEL_SCALE_XY_KW;
-   // static const char* PIXEL_SCALE_Y_KW;
-   static const char* PIXEL_SCALE_UNITS_KW;
-   static const char* PIXEL_TYPE_KW;
-   static const char* PLANAR_CONFIG_KW;
-   static const char* POINT_WIDTH_HEIGHT_KW;
-   static const char* PROJECTION_KW;
-   static const char* QUALITY_KW;
-   static const char* QUERY_KW;
-   static const char* RADIOMETRY_KW;
-   static const char* REDUCED_RES_LEVEL_KW;
-   static const char* REF_GPT_LAT_KW;
-   static const char* REF_GPT_LON_KW;
-   static const char* REF_GPT_HGT_KW;
-   static const char* REF_IPT_LINE_KW;
-   static const char* REF_IPT_SAMP_KW;
-   static const char* ROTATION_KW;
-   static const char* SCALAR_TYPE_KW;
-   static const char* SCALE_PER_PIXEL_X_KW;
-   static const char* SCALE_PER_PIXEL_Y_KW;
-   static const char* SCALE_FACTOR_KW;
-   static const char* SCALE_X_KW;
-   static const char* SCALE_Y_KW;
-   static const char* SCALE_FACTOR_X_KW;
-   static const char* SCALE_FACTOR_Y_KW;
-   static const char* SENSOR_ID_KW;
-   static const char* SRS_NAME_KW;
-   static const char* STD_PARALLEL_1_KW;
-   static const char* STD_PARALLEL_2_KW;
-   static const char* THICKNESS_KW;
-   static const char* TIE_POINT_EASTING_KW;
-   static const char* TIE_POINT_NORTHING_KW;
-   static const char* TIE_POINT_XY_KW;
-   // static const char* TIE_POINT_Y_KW;
-   static const char* TIE_POINT_UNITS_KW;
-   
-   static const char* TIE_POINT_LAT_KW;
-   static const char* TIE_POINT_LON_KW;
-   static const char* TILE_SOURCE_KW;
-   static const char* TILE_TYPE_KW;
-   static const char* TILE_SIZE_X_KW;
-   static const char* TILE_SIZE_Y_KW;
-   static const char* TRANSLATION_X_KW;
-   static const char* TRANSLATION_Y_KW;
-   static const char* TYPE_KW;
-   static const char* UL_LAT_KW;
-   static const char* UL_LON_KW;
-   static const char* UNITS_KW;
-  
-   static const char* UR_LAT_KW;
-   static const char* UR_LON_KW;
-   static const char* UL_X_KW;
-   static const char* UL_Y_KW;
-   static const char* UR_X_KW;
-   static const char* UR_Y_KW;
-   static const char* VALID_VERTICES_KW;
-   static const char* VERTICAL_SIZE_KW;
-   static const char* ZONE_KW;
-
-protected:
-   ossimKeywordNames();
-   ossimKeywordNames(const ossimKeywordNames& rhs);
-   const ossimKeywordNames& operator =(const ossimKeywordNames &rhs);
-};
-
-#endif
diff --git a/include/ossim/base/ossimKeywordlist.h b/include/ossim/base/ossimKeywordlist.h
deleted file mode 100644
index 317850a..0000000
--- a/include/ossim/base/ossimKeywordlist.h
+++ /dev/null
@@ -1,511 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Ken Melero
-// 
-// Description: This class provides capabilities for keywordlists.
-//
-//********************************************************************
-// $Id: ossimKeywordlist.h 21527 2012-08-26 16:50:49Z dburken $
-
-#ifndef ossimKeywordlist_HEADER
-#define ossimKeywordlist_HEADER 1
-
-#include <ossim/base/ossimErrorStatusInterface.h>
-#include <ossim/base/ossimReferenced.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimErrorCodes.h>
-#include <ossim/base/ossimString.h>
-#include <iosfwd>
-#include <map>
-#include <vector>
-#include <algorithm>
-
-static const char DEFAULT_DELIMITER = ':';
-
-class ossimFilename;
-
-
-class OSSIM_DLL ossimKeywordlist : public ossimErrorStatusInterface,
-   public ossimReferenced
-{
-public:
-
-   typedef std::map<std::string, std::string> KeywordMap;
-
-   ossimKeywordlist(const ossimKeywordlist& src);
-   ossimKeywordlist(char delimiter = DEFAULT_DELIMITER,
-                    bool expandEnvVars = false);
-
-   ossimKeywordlist(const char* file,
-                    char        delimiter = DEFAULT_DELIMITER,
-                    bool        ignoreBinaryChars = false,
-                    bool        expandEnvVars = false );
-
-   ossimKeywordlist(const ossimFilename& fileName,
-                    char                 delimiter = DEFAULT_DELIMITER,
-                    bool                 ignoreBinaryChars = false,
-                    bool                 expandEnvVars = false);
-
-   ~ossimKeywordlist();
-
-   static const std::string NULL_KW;
-
-   /*!
-    *  Reads file and adds keywords to the KeywordMap.
-    *  Returns true if file was parsed, false on error.
-    */
-   bool addFile(const char* file);
-
-   /*!
-    *  Reads file and adds keywords to the KeywordMap.
-    *  Returns true if file was parsed, false on error.
-    */
-   bool addFile(const ossimFilename& file); 
-
-   /*!
-    *  Method to change default delimiter.  Handy when parsing
-    *  files similar to a ossimKeywordlist.  (DEFAULT = ':')
-    */
-   void change_delimiter(char del);
-
-   ossimString delimiter_str() const;
-
-   /*!
-    * If set to true, then strings found having the format
-    * "$(env_var_name)" are expanded in place.
-    */
-   void setExpandEnvVarsFlag( bool flag );
-   /*!
-    * Returns the flag that determines whether or not
-    * environment variables are expanded.
-    */
-   bool getExpandEnvVarsFlag( void ) const;
-
-   void add(const char* prefix,
-            const ossimKeywordlist& kwl,
-            bool overwrite=true);
-
-   /**
-    * This is a generic find method that takes a comparator type and iterates through 
-    * the map executing the overloaded operator ().
-    * Typical code example format
-    <pre>
-    typedef std::unary_function<std::pair<ossimString, ossimString>, bool> KwlCompareFunctionType;
-    
-    class KwlKeyCaseInsensitiveEquals : public KwlCompareFunctionType
-    {
-    public:
-       KwlKeyCaseInsensitiveEquals(const ossimString& key):m_key(key){}
-       virtual bool operator()(const KwlComparePairType& rhs)const
-       {
-          return (m_key == rhs.first.downcase());
-       }
-       ossimString m_key;
-    };
-
-    // now for use case example:
-    kwl.findValue(value, KwlKeyCaseInsensitiveEquals("foo"));
-    </pre>
-    
-    This example shows how to supplly your own comparator and do a case insensitive
-    search for the key foo and the value is set to the variable value.
-    *
-    */
-   template<class CompareType>
-   bool findValue(ossimString& value, const CompareType& compare)const
-   {
-      KeywordMap::const_iterator iter = std::find_if(m_map.begin(), m_map.end(), compare);
-      bool result = (iter != m_map.end());
-      if(result) value = iter->second;
-      return result;
-   }
-   
-   std::string& operator[](const std::string& key)
-   {
-      return m_map[key];
-   }
-   std::string operator[](const std::string& key)const
-   {
-      ossimString result = find(key.c_str());
-      
-      return result.c_str();
-   }
-
-   // Methods to add keywords to list.
-   void addPair(const std::string& key,
-                const std::string& value,
-                bool               overwrite = true);
-
-   void addPair(const std::string& prefix,
-                const std::string& key,
-                const std::string& value,
-                bool               overwrite = true);
-   
-   /*!
-    * Allows you to extract out a sub keywordlist from another
-    * you can also collapse the hieracrchy by setting
-    * strip prefix to true.
-    */
-   void add(const ossimKeywordlist& kwl,
-            const char* prefix=0,
-            bool stripPrefix=true);
-  
-   void add(const char*   key,
-            const char*   value,
-            bool          overwrite = true);
-
-   void add(const char*   prefix,
-            const char*   key,
-            const char*   value,
-            bool          overwrite = true);
-
-   void add(const char*   key,
-            char          value,
-            bool          overwrite = true);
-
-   void add(const char*   prefix,
-            const char*   key,
-            char          value,
-            bool          overwrite = true);
-
-   void add(const char*   key,
-            ossim_int16   value,
-            bool          overwrite = true);
-
-   void add(const char*   prefix,
-            const char*   key,
-            ossim_int16   value,
-            bool          overwrite = true);
-
-   void add(const char*   key,
-            ossim_uint16  value,
-            bool          overwrite = true);
-
-   void add(const char*   prefix,
-            const char*   key,
-            ossim_uint16  value,
-            bool          overwrite = true);
-
-   void add(const char*   key,
-            ossim_int32   value,
-            bool          overwrite = true);
-
-   void add(const char*   prefix,
-            const char*   key,
-            ossim_int32   value,
-            bool          overwrite = true);
-
-   void add(const char*   key,
-            ossim_uint32  value,
-            bool          overwrite = true);
-
-   void add(const char*   prefix,
-            const char*   key,
-            ossim_uint32  value,
-            bool          overwrite = true);
-
-   void add(const char*   key,
-            ossim_int64   value,
-            bool          overwrite = true);
-
-   void add(const char*   prefix,
-            const char*   key,
-            ossim_int64   value,
-            bool          overwrite = true);
-
-   void add(const char*   key,
-            ossim_uint64  value,
-            bool          overwrite = true);
-
-   void add(const char*   prefix,
-            const char*   key,
-            ossim_uint64  value,
-            bool          overwrite = true);
-
-   /**
-    * @param key Key for key-value pair.
-    *
-    * @param value Value to pair with key.  Note this will be stored as a
-    * string.
-    * 
-    * @param precision Decimal point precision of the output. (default = 8)
-    *
-    * @param trimZeroFlag If true trailing '0's and any trailing '.' will
-    * be trimmed from the converted string.  (default = false)
-    *
-    * @param scientific If true output will be in scientific notation else
-    * fixed is used. (default = false)
-    */
-   void add(const char*   key,
-            ossim_float32 value,
-            bool          overwrite    = true,
-            int           precision    = 8);
-
-   /**
-    * @param key Key for key-value pair.
-    *
-    * @param value Value to pair with key.  Note this will be stored as a
-    * string.
-    * 
-    * @param precision Decimal point precision of the output. (default = 8)
-    *
-    * @param trimZeroFlag If true trailing '0's and any trailing '.' will
-    * be trimmed from the converted string.  (default = false)
-    *
-    * @param scientific If true output will be in scientific notation else
-    * fixed is used. (default = false)
-    */
-   void add(const char*   prefix,
-            const char*   key,
-            ossim_float32 value,
-            bool          overwrite    = true,
-            int           precision    = 8);
-
-   /**
-    * @param key Key for key-value pair.
-    *
-    * @param value Value to pair with key.  Note this will be stored as a
-    * string.
-    * 
-    * @param precision Decimal point precision of the output. (default = 15)
-    *
-    * @param trimZeroFlag If true trailing '0's and any trailing '.' will
-    * be trimmed from the converted string.  (default = false)
-    *
-    * @param scientific If true output will be in scientific notation else
-    * fixed is used. (default = false)
-    */
-   void add(const char*   key,
-            ossim_float64 value,
-            bool          overwrite    = true,
-            int           precision    = 15);
-
-   /**
-    * @param key Key for key-value pair.
-    *
-    * @param value Value to pair with key.  Note this will be stored as a
-    * string.
-    * 
-    * @param precision Decimal point precision of the output. (default = 15)
-    *
-    * @param trimZeroFlag If true trailing '0's and any trailing '.' will
-    * be trimmed from the converted string.  (default = false)
-    *
-    * @param scientific If true output will be in scientific notation else
-    * fixed is used. (default = false)
-    */
-   void add(const char*   prefix,
-            const char*   key,
-            ossim_float64 value,
-            bool          overwrite    = true,
-            int           precision    = 15);
-
-   /**
-    * @brief Checks for key in map.
-    *
-    * Note that "find" and findKey will alway return an empty string even if
-    * the key in not in the map.
-    *
-    * @return true if key is in map even if value is empty; false, if not.
-    */
-   bool hasKey( const std::string& key ) const;
-   
-   /**
-    *  @brief Find methods that take std::string(s).
-    *  Searches the map for key(/prefix) and returns the resulting value
-    *  or an empty string if the key was not found.
-    *  @param key e.g. "number_line"
-    *  @param prefix e..g "image0."
-    *  @return Reference to string.  This will be emptry if not found or
-    *  if value is empty.
-    */
-   const std::string& findKey(const std::string& key) const;
-   const std::string& findKey(const std::string& prefix,
-                              const std::string& key) const;
-   
-   const char* find(const char* key) const;
-   const char* find(const char* prefix,
-                    const char* key) const;
-
-   void remove(const char * key);
-   void remove(const char* prefix, const char * key);
-
-   /*!
-    *  Searches the map for the number of keys containing the string.
-    */
-   ossim_uint32 numberOf(const char* str) const;
-
-   /*!
-    *  Searches the map for the number of keys containing the prefix+key.
-    *  
-    *  Given the keyword list contains:
-    *
-    *  source.type1: foo
-    *  source.type2: you
-    *
-    *  This:
-    *
-    *  int number_of_sources = numberOf("source", "type");
-    *
-    *  number_of_sources equals 2
-    */
-   ossim_uint32 numberOf(const char* prefix, const char* key) const;
-
-   /**
-    * Methods to dump the ossimKeywordlist to a file on disk.
-    *
-    * @param file Name of output file.
-    * @param comment Optional string that will be written to line 1
-    * as a C++-style comment. A "//" is prepended to the input string.
-    *
-    * @return true on success, false on error.
-    */
-   virtual bool write(const char* file, const char* comment = 0) const;
-
-   virtual ossimString toString()const;
-   virtual void toString(ossimString& result)const;
-
-   virtual void writeToStream(std::ostream &out)const;
-
-   virtual std::ostream& print(std::ostream& os) const;
-   OSSIMDLLEXPORT friend std::ostream& operator<<(std::ostream& os,
-                                                  const ossimKeywordlist& kwl);
-   bool operator ==(ossimKeywordlist& kwl)const;
-
-    /*!
-     * Clear all contents out of the ossimKeywordlist.
-     */
-
-    void clear();
-
-    /*!
-     * Add contents of another keyword list to this one.
-     *
-     * @param src the keyword list to copy items from.
-     * @param overwrite true if keys existing in this and src should have
-     * their value overwritten by the src value, otherwise false to preserve
-     * the original value.  Defaults to true.
-     */
-
-   void addList( const ossimKeywordlist &src, bool overwrite = true );
-
-   /** deprecated method */
-   virtual bool parseStream(std::istream& is,
-                            bool ignoreBinaryChars);
-   
-   virtual bool parseStream(std::istream& is);
-   virtual bool parseString(const std::string& inString);
-
-   /*!
-    *  Will return a list of keys that contain the string passed in.
-    *  Later we will need to allow a user to specify regular expresion
-    *  searches.
-    */
-   std::vector<ossimString> findAllKeysThatContains(
-      const ossimString &searchString)const;
-
-   std::vector<ossimString> findAllKeysThatMatch(
-      const ossimString &regularExpression)const;
-
-   void extractKeysThatMatch(ossimKeywordlist& kwl,
-                             const ossimString &regularExpression)const;
-
-   void removeKeysThatMatch(const ossimString &regularExpression);
-   /*!
-    * Will return only the portion of the key that
-    * matches the regular expression.
-    *
-    * example:
-    *
-    *  source1.source1.a:
-    *  source1.source2.a:
-    *  source1.source3.a:
-    *  source1.source4.a:
-    *  source1.source10.a:
-    *
-    *  kwl.getSubstringKeyList("source1.source[0-9]*\\.");
-    *
-    *  will return:
-    *
-    *  source1.source1.
-    *  source1.source2.
-    *  source1.source3.
-    *  source1.source4.
-    *  source1.source10.
-    *
-    */
-   std::vector<ossimString> getSubstringKeyList(const ossimString& regularExpression)const;
-   void getSubstringKeyList(std::vector<ossimString>& result,
-                            const ossimString& regularExpression)const;
-
-   ossim_uint32 getNumberOfSubstringKeys(
-      const ossimString& regularExpression)const;
-
-   void addPrefixToAll(const ossimString& prefix);
-   void addPrefixToKeysThatMatch(const ossimString& prefix,
-                                 const ossimString& regularExpression);
-   void stripPrefixFromAll(const ossimString& regularExpression);
-
-   /*!
-    * Returns the number of elements.
-    */
-   ossim_uint32 getSize()const;
-
-   const ossimKeywordlist::KeywordMap& getMap()const;
-   ossimKeywordlist::KeywordMap& getMap();
-   
-   ossimKeywordlist& downcaseKeywords();
-   ossimKeywordlist& upcaseKeywords();
-   
-   ossimKeywordlist& trimAllValues(const ossimString& valueToTrim= ossimString(" \t\n\r"));
-   ossimKeywordlist trimAllValues(const ossimString& valueToTrim= ossimString(" \t\n\r"))const;
-
-
-   //! [OLK, Aug/2008]
-   //! Sets the boolean  <rtn_val> depending on value associated with keyword for values = 
-   //! (yes|no|true|false|1|0). Returns TRUE if keyword found, otherwise false. Also returns false
-   //! if none of the above permitted values are specified (rtn_val left unchanged in this case).
-   bool getBoolKeywordValue(bool& rtn_val, 
-                            const char* keyword, 
-                            const char* prefix=0) const;
-
-protected:
-   enum KeywordlistParseState
-   {
-      KeywordlistParseState_OK         = 0,
-      KeywordlistParseState_FAIL       = 1, // just used to say this set of token has failed the rules
-      KeywordlistParseState_BAD_STREAM = 2, // Means an error occured that is a mal formed stream for Keywordlist
-   };
-   /*!
-    *  Method to parse files to initialize the list.  Method will error on
-    *  binary characters if "ignoreBinaryChars = false".  This is used by
-    *  ImageHandler factories that can be passed a binary file inadvertently
-    *  by a user.  The "ignoreBinaryChars" flag should be set to true if
-    *  a text file contains mixed ascii/binary values.
-    *  Returns true if file was parsed, false on error.
-    */
-   bool parseFile(const ossimFilename& file,
-                  bool  ignoreBinaryChars = false);
-
-   bool isValidKeywordlistCharacter(ossim_uint8 c)const;
-   void skipWhitespace(std::istream& in)const;
-   KeywordlistParseState readComments(ossimString& sequence, std::istream& in)const;
-   KeywordlistParseState readKey(ossimString& sequence, std::istream& in)const;
-   KeywordlistParseState readValue(ossimString& sequence, std::istream& in)const;
-   KeywordlistParseState readKeyAndValuePair(ossimString& key, ossimString& value, std::istream& in)const;
-   
-   // Method to see if keyword exists in list.
-   KeywordMap::iterator getMapEntry(const std::string& key);
-   KeywordMap::iterator getMapEntry(const ossimString& key);
-   KeywordMap::iterator getMapEntry(const char* key);
-
-   KeywordMap               m_map;
-   char                     m_delimiter;
-   bool                     m_preserveKeyValues; // enables preserving empty field values, multi lines, ... etc
-   bool                     m_expandEnvVars;
-};
-
-#endif /* #ifndef ossimKeywordlist_HEADER */
-
diff --git a/include/ossim/base/ossimLine.h b/include/ossim/base/ossimLine.h
deleted file mode 100644
index 2d6858a..0000000
--- a/include/ossim/base/ossimLine.h
+++ /dev/null
@@ -1,81 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Garrett Potts
-//*******************************************************************
-//  $Id: ossimLine.h 9094 2006-06-13 19:12:40Z dburken $
-#ifndef ossimLine_HEADER
-#define ossimLine_HEADER
-#include <ossim/base/ossimDpt.h>
-#include <iosfwd>
-
-class OSSIMDLLEXPORT ossimLine
-{
-public:
-   friend std::ostream& operator <<(std::ostream& out,
-                               const ossimLine& rhs);
-   ossimLine(const ossimDpt& p1=ossimDpt(0,0),
-             const ossimDpt& p2=ossimDpt(0,0))
-      :theP1(p1),
-       theP2(p2)
-      {
-      }
-
-   
-   ossimDpt getVector()const
-      {
-         return (theP2-theP1);
-      }
-
-   /*!
-    * Computes the following equation:
-    *
-    * Note: this object will be line a and the passed
-    *       in object will be line b;
-    *       and
-    *       P1 and P2 coorespond to this object and
-    *       P3 and P4 will coorespond to the passed in object.
-    *
-    * Now find point formed at the intersection of line a and b:
-    *
-    * Pa = P1 + ua ( P2 - P1 ) 
-    * Pb = P3 + ub ( P4 - P3 )
-    *const ossimDpt&   ul_corner,
-              const ossimDpt&   lr_corner,
-              ossimCoordSysOrientMode mode=OSSIM_LEFT_HANDED);
-    * x1 + ua (x2 - x1) = x3 + ub (x4 - x3) 
-    * and 
-    * y1 + ua (y2 - y1) = y3 + ub (y4 - y3)
-    *
-    * Solve:
-    *  ua = ((x4-x3)(y1-y3) - (y4-y3)(x1-x3))/
-    *       ((y4-y3)(x2-x1) - (x4-x3)(y2-y1))
-    *  ub = ((x2-x1)(y1-y3) - (y2-y1)(x1-x3))/
-    *       ((y4-y3)(x2-x1) - (x4-x3)(y2-y1))
-    * substitute:
-    *
-    * x = x1 + ua (x2 - x1) 
-    * y = y1 + ua (y2 - y1)
-    *
-    */
-   ossimDpt intersectInfinite(const ossimLine& line)const;
-
-   ossimDpt intersectSegment(const ossimLine& line)const;
-
-   ossimDpt midPoint()const;
-   double length()const;
-   ossimDpt normal()const;
-   /*!
-    * Will return true if the point is on the line.
-    */
-   bool isPointWithin(const ossimDpt& point, double delta=FLT_EPSILON)const;
-
-   bool isPointOnInfiniteLine(const ossimDpt& point, double delta=FLT_EPSILON)const;
-
-   ossimDpt   theP1;
-   ossimDpt   theP2;
-};
-
-#endif
diff --git a/include/ossim/base/ossimListener.h b/include/ossim/base/ossimListener.h
deleted file mode 100644
index 041b284..0000000
--- a/include/ossim/base/ossimListener.h
+++ /dev/null
@@ -1,51 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimListener.h 14789 2009-06-29 16:48:14Z dburken $
-#ifndef ossimListener_HEADER
-#define ossimListener_HEADER
-#include <ossim/base/ossimObject.h>
-
-class ossimEvent;
-
-/*!
- * Base class for all listners.  Listners nned to derive from this
- * class and override the processEvent method.
- */
-class OSSIMDLLEXPORT ossimListener
-{
-public:
-
-   ossimListener();
-
-   virtual ~ossimListener();
-
-   /**
-    * ProcessEvent.  The defaul is to do nothing.  Derived
-    * classes need to override this class.
-    */
-   virtual void processEvent(ossimEvent& event);
-
-   void enableListener();
-
-   void disableListener();
-
-   void setListenerEnableFlag(bool flag);
-
-   bool isListenerEnabled() const;
-
-   bool getListenerEnableFlag() const;
-
-protected:
-   bool theListenerEnableFlag;
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/base/ossimLookUpTable.h b/include/ossim/base/ossimLookUpTable.h
deleted file mode 100644
index 1b3d904..0000000
--- a/include/ossim/base/ossimLookUpTable.h
+++ /dev/null
@@ -1,116 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Contains class declaration for LookUpTable. 
-//*******************************************************************
-//  $Id: ossimLookUpTable.h 19448 2011-04-26 15:15:07Z dburken $
-
-#ifndef ossimLookUpTable_HEADER
-#define ossimLookUpTable_HEADER
-
-#include <vector>
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimKeyword.h>
-
-class ossimKeywordlist;
-
-//*******************************************************************
-// CLASS:  LookUpTable
-//*******************************************************************
-class OSSIMDLLEXPORT ossimLookUpTable
-{
-public:
-
-   enum
-   {
-      NOT_FOUND    = -1
-   };
-   
-   virtual ~ossimLookUpTable();
-
-   /*!
-    *  @return
-    *  Returns the entry string associated with the entry number (key) passed
-    *  in. Returns empty string if entry number is not in the list.
-    */
-   virtual ossimString getEntryString(ossim_int32 entry_number) const;
-
-   /*!
-    *  @param table_index Index into the table
-    *  Note:  This is not the key mapped to the but the index into the table.
-    *  @return
-    *  Returns the entry string associated with the table index passed in.
-    *  Returns empty string if index is out of range.
-    */
-   virtual ossimString getTableIndexString(ossim_uint32 table_index) const;
-
-   /*!
-    *  Returns the entry string associated with the entry number passed in.
-    *  Returns empty string if entry number is not in the list.
-    */
-   virtual ossimString operator[](ossim_int32 entry_number) const;
-
-   /*!
-    *  Returns the entry string associated with lookup table keyword entry
-    *  in the Keywordlist passed in.
-    *  Returns empty string if keyword entry is not in the Keywordlist.
-    */
-   virtual ossimString getEntryString(const ossimKeywordlist& kwl,
-                                      const char* prefix=0) const;
-
-   /*!
-    *  Returns the entry number associated with the entry string passed in.
-    *  Returns NOT_FOUND(-1) if entry string is not in the list.
-    *  If case_insensitive == true(default), the test is case insensitive;
-    *  else, the test will be case sensitive.
-    */
-   virtual ossim_int32 getEntryNumber(const char* entry_string,
-                                      bool case_insensitive = true) const;
-
-   /*!
-    *  Returns the entry number associated with the lookup table keyword
-    *  entry in the Keywordlist passed in.  Returns NOT_FOUND(-1) if no
-    *  matching entry.
-    *  If case_insensitive == true(default), the test is case insensitive;
-    *  else, the test will be case sensitive.
-    */
-   virtual ossim_int32 getEntryNumber(const ossimKeywordlist& kwl,
-                                      const char* prefix=0,
-                                      bool case_insensitive = true) const;
-
-   /*!
-    *  Returns keyword for lookups from a Keywordlist.
-    */
-   virtual ossimKeyword getKeyword() const=0;
-
-   virtual ossim_uint32 getTableSize() const;
-  
-  void dumpValues(std::ostream& out)const;
-protected:
-
-   ossimLookUpTable(ossim_int32 table_size);
-
-   class ossimKeyValueMap
-   {
-   public:
-      void init (ossim_int32 key, const ossimString& value) { theKey=key; theValue=value; }
-      ossim_int32  theKey;
-      ossimString theValue;
-   };
-
-   std::vector<ossimKeyValueMap>  theTable;
-   
-   ossimLookUpTable(){}
-};
-
-#endif
diff --git a/include/ossim/base/ossimNBandLutDataObject.h b/include/ossim/base/ossimNBandLutDataObject.h
deleted file mode 100644
index be9aa66..0000000
--- a/include/ossim/base/ossimNBandLutDataObject.h
+++ /dev/null
@@ -1,489 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2005 Garrett Potts
-//
-// LICENSE: LGPL See top level license file.
-// 
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimNBandLutDataObject.h 19732 2011-06-06 22:24:54Z dburken $
-#ifndef ossimNBandLutDataObject_HEADER
-#define ossimNBandLutDataObject_HEADER 1
-
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimFilename.h>
-#include <iostream>
-#include <map>
-
-/**
- * class ossimNBandLutDataObject
- *
- * Sample CADRG LUT taken from an arbitrary CADRG image entry.  This is a keywordlist
- * support by the loadstate of this class.
- *
- * <pre>
- * entry0:  25 39 116 
- * entry1:  245 242 242 
- * entry10:  92 89 115 
- * entry100:  74 55 85 
- * entry101:  233 165 53 
- * entry102:  75 2 4 
- * entry103:  162 118 42 
- * entry104:  233 159 130 
- * entry105:  189 129 40 
- * entry106:  154 109 66 
- * entry107:  145 97 85 
- * entry108:  121 86 31 
- * entry109:  238 151 118 
- * entry11:  52 31 76 
- * entry110:  239 167 42 
- * entry111:  236 137 100 
- * entry112:  179 112 88 
- * entry113:  92 37 33 
- * entry114:  121 66 24 
- * entry115:  120 133 151 
- * entry116:  76 92 192 
- * entry117:  36 50 117 
- * entry118:  57 75 191 
- * entry119:  125 45 50 
- * entry12:  235 217 204 
- * entry120:  102 65 81 
- * entry121:  172 148 199 
- * entry122:  204 145 95 
- * entry123:  81 19 5 
- * entry124:  91 4 1 
- * entry125:  109 54 31 
- * entry126:  137 114 118 
- * entry127:  230 150 52 
- * entry128:  82 38 87 
- * entry129:  190 120 76 
- * entry13:  244 218 172 
- * entry130:  170 109 45 
- * entry131:  95 20 22 
- * entry132:  150 80 61 
- * entry133:  225 122 82 
- * entry134:  122 37 16 
- * entry135:  146 88 49 
- * entry136:  122 94 122 
- * entry137:  230 135 63 
- * entry138:  137 73 75 
- * entry139:  119 46 29 
- * entry14:  189 167 141 
- * entry140:  190 142 128 
- * entry141:  242 216 187 
- * entry142:  176 125 95 
- * entry143:  193 117 143 
- * entry144:  19 0 0 
- * entry145:  12 1 42 
- * entry146:  24 4 26 
- * entry147:  38 40 52 
- * entry148:  8 24 175 
- * entry149:  40 23 45 
- * entry15:  245 213 142 
- * entry150:  39 11 58 
- * entry151:  10 0 22 
- * entry152:  236 148 41 
- * entry153:  101 41 11 
- * entry154:  230 113 67 
- * entry155:  148 44 46 
- * entry156:  225 144 133 
- * entry157:  115 2 13 
- * entry158:  159 79 49 
- * entry159:  164 95 33 
- * entry16:  246 241 205 
- * entry160:  97 6 22 
- * entry161:  175 90 133 
- * entry162:  112 23 20 
- * entry163:  105 22 6 
- * entry164:  148 59 33 
- * entry165:  215 118 104 
- * entry166:  211 122 41 
- * entry167:  233 129 34 
- * entry168:  153 73 25 
- * entry169:  208 102 39 
- * entry17:  240 215 89 
- * entry170:  206 101 133 
- * entry171:  229 113 96 
- * entry172:  127 16 25 
- * entry173:  224 104 28 
- * entry174:  171 76 74 
- * entry175:  221 94 78 
- * entry176:  229 86 94 
- * entry177:  213 80 57 
- * entry178:  161 44 36 
- * entry179:  155 54 19 
- * entry18:  115 92 157 
- * entry180:  130 25 5 
- * entry181:  150 29 24 
- * entry182:  198 54 34 
- * entry183:  224 61 70 
- * entry184:  213 82 37 
- * entry185:  186 28 31 
- * entry186:  200 64 15 
- * entry187:  110 2 2 
- * entry188:  195 38 12 
- * entry189:  151 6 8 
- * entry19:  160 163 37 
- * entry190:  193 13 10 
- * entry191:  205 1 3 
- * entry192:  44 62 193 
- * entry193:  35 14 16 
- * entry194:  15 30 118 
- * entry195:  28 47 189 
- * entry196:  25 3 80 
- * entry197:  7 16 118 
- * entry198:  33 10 6 
- * entry199:  39 24 95 
- * entry2:  216 212 237 
- * entry20:  38 29 21 
- * entry200:  82 58 159 
- * entry201:  55 29 142 
- * entry202:  33 4 23 
- * entry203:  17 14 36 
- * entry204:  58 26 41 
- * entry205:  11 13 14 
- * entry206:  74 87 85 
- * entry207:  50 60 41 
- * entry208:  119 123 98 
- * entry209:  193 187 172 
- * entry21:  208 202 156 
- * entry210:  124 126 128 
- * entry211:  47 68 84 
- * entry212:  110 119 60 
- * entry213:  63 145 121 
- * entry214:  154 166 147 
- * entry215:  107 156 104 
- * entry22:  242 202 152 
- * entry23:  168 148 140 
- * entry24:  31 22 25 
- * entry25:  245 205 114 
- * entry26:  245 191 137 
- * entry27:  175 161 172 
- * entry28:  17 6 11 
- * entry29:  172 170 137 
- * entry3:  247 230 113 
- * entry30:  51 27 20 
- * entry31:  239 210 73 
- * entry32:  185 176 129 
- * entry33:  35 2 13 
- * entry34:  60 52 51 
- * entry35:  101 78 70 
- * entry36:  141 124 101 
- * entry37:  206 184 107 
- * entry38:  244 174 106 
- * entry39:  82 98 136 
- * entry4:  246 231 132 
- * entry40:  190 191 239 
- * entry41:  241 188 161 
- * entry42:  67 51 38 
- * entry43:  244 184 122 
- * entry44:  211 201 142 
- * entry45:  61 27 16 
- * entry46:  182 182 82 
- * entry47:  243 188 87 
- * entry48:  86 83 60 
- * entry49:  61 40 43 
- * entry5:  204 198 166 
- * entry50:  146 141 93 
- * entry51:  44 4 4 
- * entry52:  231 210 51 
- * entry53:  85 74 39 
- * entry54:  197 169 127 
- * entry55:  182 151 60 
- * entry56:  121 98 73 
- * entry57:  243 182 145 
- * entry58:  58 18 21 
- * entry59:  241 157 91 
- * entry6:  2 0 2 
- * entry60:  59 4 1 
- * entry61:  155 162 223 
- * entry62:  154 133 80 
- * entry63:  73 21 16 
- * entry64:  195 183 116 
- * entry65:  76 51 29 
- * entry66:  234 181 63 
- * entry67:  58 59 98 
- * entry68:  42 22 79 
- * entry69:  134 143 219 
- * entry7:  204 204 239 
- * entry70:  106 117 205 
- * entry71:  48 65 117 
- * entry72:  63 54 117 
- * entry73:  125 93 62 
- * entry74:  137 138 41 
- * entry75:  104 68 59 
- * entry76:  113 99 41 
- * entry77:  76 30 11 
- * entry78:  239 184 48 
- * entry79:  161 129 98 
- * entry8:  31 4 66 
- * entry80:  241 170 126 
- * entry81:  145 109 105 
- * entry82:  207 163 116 
- * entry83:  79 41 40 
- * entry84:  175 138 41 
- * entry85:  10 0 56 
- * entry86:  180 151 77 
- * entry87:  72 12 24 
- * entry88:  242 154 105 
- * entry89:  91 26 15 
- * entry9:  246 238 162 
- * entry90:  160 118 53 
- * entry91:  228 166 141 
- * entry92:  231 160 69 
- * entry93:  61 2 11 
- * entry94:  132 83 60 
- * entry95:  86 46 24 
- * entry96:  243 143 86 
- * entry97:  108 60 46 
- * entry98:  109 76 38 
- * entry99:  96 86 84 
- * null_value:  -1
- * number_bands:  3
- * number_entries:  216
- * scalar_type:  ossim_uint8
- * type:  ossimNBandLutDataObject
- *
- *
- * NOTES:
- * 
- * - The null_value keyword above is the index in the lut that correspnds to an invalid pixel value.
- * - Each entry will have number_bands.  SO if number of bands is 3 then there will be 3 values
- *   Where the first value is for band 1, ... etc.
- * - scalar_type is a hint as to the scalar type of the entries.  Is the resulting lut for 8 bit, 16 bit , etc data.
- * - You should always use the LUT_ENTRY_TYPE when getting values from the lut.  This value could change to an
- *   ossim_float32 precision and if you use the LUT_ENTRY_TYPE then your code will not have to change.
- *   
- * </pre>
- */
-class OSSIM_DLL ossimNBandLutDataObject : public ossimObject
-{
-public:
-   
-   typedef ossim_int32 LUT_ENTRY_TYPE;
-   
-   friend std::ostream& operator <<(std::ostream& out,
-                                    const ossimNBandLutDataObject& lut);
-   /*!
-    * Will allocate 256 values for the color table
-    */
-   ossimNBandLutDataObject(ossim_uint32 numberOfEntries=0,
-                           ossim_uint32 numberOfBands=0,
-                           ossimScalarType bandScalarType = OSSIM_UINT8,
-                           ossim_int32 nullPixelIndex=-1);
-   ossimNBandLutDataObject(const ossimNBandLutDataObject& lut);
-   ossimObject* dup()const
-   {
-      return new ossimNBandLutDataObject(*this);
-   }
-   void create(ossim_uint32 numberOfEntries,
-               ossim_uint32 numberOfBands=3);
-   const LUT_ENTRY_TYPE* operator[](ossim_uint32 idx)const
-   {
-      if(theLut)
-      {
-         return &theLut[idx*theNumberOfBands];
-      }
-      
-      return 0;
-   }
-   LUT_ENTRY_TYPE* operator[](ossim_uint32 idx)
-   {
-      if(theLut)
-      {
-         return &theLut[idx*theNumberOfBands];
-      }
-      
-      return 0;
-   }
-   const LUT_ENTRY_TYPE* operator[](ossim_int32 idx)const
-   {
-      if(theLut)
-      {
-         return &theLut[idx*theNumberOfBands];
-      }
-      
-      return 0;
-   }
-   LUT_ENTRY_TYPE* operator[](ossim_int32 idx)
-   {
-      if(theLut)
-      {
-         return &theLut[idx*theNumberOfBands];
-      }
-      
-      return 0;
-   }
-   const LUT_ENTRY_TYPE* operator[](double normalizedIndex)const
-   {
-      int idx = int(normalizedIndex*theNumberOfEntries);
-      if (idx < 0)
-      {
-         idx = 0;
-      }
-      return (*this)[idx];
-   }
-
-   /**
-    * @param normalizedIndex  If a double precision value is passed in then it is
-    *                         assumed to be in normalized space where the value ranges from 0.0 to 1.0
-    * @return the starting address of the band values.
-    */ 
-   LUT_ENTRY_TYPE* operator[](double normalizedIndex)
-   {
-      ossim_uint32 idx = int(normalizedIndex*(theNumberOfEntries-1));
-      if (idx >= theNumberOfEntries)
-      {
-         idx = theNumberOfEntries-1;
-      }
-      return (*this)[idx];
-   }
-   
-   bool hasNullPixelIndex()const
-   {
-      return (theNullPixelIndex >= 0);
-   }
-   /**
-    * Will return the min max value for a given band
-    *
-    * @param band band number to query.  This is 0 based so the first band
-    *        is indicated by the value of 0.
-    * @param minValue is the minimum value returned for the passed in band
-    * @param maxValue is the maximum value returned for the passed in band
-    */
-   void getMinMax(ossim_uint32 band,
-                  LUT_ENTRY_TYPE& minValue,
-                  LUT_ENTRY_TYPE& maxValue);
-
-   /**
-    * @return First index with alpha of 0 or -1 if not found or there is no alpha.
-    *
-    * Currently only works on 4 band data.  May consider adding an alpha channel
-    * class data member in the future.
-    */
-   ossim_int32 getFirstNullAlphaIndex() const;
-   
-   /**
-    * Allows you to specify which entry is to be designated as an invalid
-    * entry.  Note: setting this to -1 indicates no null entry is set.
-    *
-    * @param idx is the entry number that will be used for the null value
-    */
-   void setNullPixelIndex(ossim_int32 idx){theNullPixelIndex = idx;}
-
-   /**
-    * @return Return either a positive value indicating the entry designated for
-    *         a null pixel value or a -1 to say no null pixel has been designated
-    *         yet.
-    */ 
-   ossim_int32 getNullPixelIndex()const{return theNullPixelIndex;}
-
-   /**
-    * @return Return the number of bands this lut is indexed for.
-    */ 
-   ossim_uint32 getNumberOfBands()const{return theNumberOfBands;}
-
-   /**
-    * @return Return the number of entries in the lut.
-    */ 
-   ossim_uint32 getNumberOfEntries()const{return theNumberOfEntries;}
-
-   /**
-    * This method gives you a way to find an entry index closest to the passed in
-    * band values.
-    * 
-    * @param values Is an array of band values.  This array must be equal to the number
-    *        of bands for the lut.
-    * @return Returns the nearest index to the passed in value.  
-    */ 
-   ossim_uint32 findIndex(ossim_int32* values) const;
-
-   /**
-    * @brief This method gives you a way to find an entry index closest to the
-    * passed in band values.
-    * 
-    * @param values Is an array of band values.
-    * @param size Size of values array.  Note if size is less than the LUT
-    * number of bands, the trailing bands get dropped.  This allows finding
-    * an index dropping the alpha channel.
-    * 
-    * @return Returns the nearest index to the passed in value.  
-    */ 
-   ossim_uint32 findIndex(ossim_int32* values, ossim_uint32 size) const;
-
-   /**
-    * Will do a simple memset to '\0' all 
-    */ 
-   void clearLut();
-   /**
-    * does a deep copy from the passed in lut to the object.
-    *
-    * @param lut The lut to copy.
-    */ 
-   const ossimNBandLutDataObject& operator =(const ossimNBandLutDataObject& lut);
-
-   /**
-    * Determines if the state of this lut is identical to the passed in lut
-    *
-    * @param lut Checks equality of the this object to the lut parameter.
-    * @return True if equal and false otherwise
-    */ 
-   bool operator ==(const ossimNBandLutDataObject& lut)const;
-
-   /**
-    * Reads in an external lut file.  The external file is in a keywordlist format specified by the saveState.
-    */ 
-   bool open(const ossimFilename& lutFile);
-
-   /**
-    * <pre>
-    * 
-    * Keywords:
-    *  
-    * entry0:
-    * entry1:
-    * :
-    * entry<number_entries-1>:
-    * null_value:  -1
-    * number_bands:  3
-    * number_entries:  216
-    * scalar_type:  ossim_uint8
-    * type:  ossimNBandLutDataObject
-    *
-    * Where entry<idx> is repeasted for each entry number where idx start from 0 and goes to number_entries-1
-    * each entry must have number_bands values.
-    * </pre>
-    *
-    * @param kwl The keyword list to store the keywords to.  Each keyword could be prefixed by an optional
-    *            prefix parameter.
-    * @param prefix The optional prefix parameter used to prefix each keyword.
-    * 
-    */ 
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
-
-   std::vector<ossimString> getEntryLabels(ossim_uint32 band);
-
-   void setEntryLables(ossim_uint32 band, std::vector<ossimString> entryLabels);
-
-   
-   /**
-    * Loads the state of the object by reading in the keywords listed in the save state.
-    *
-    * @param kwl The keywordlist to extract the classes keywords from to restore its state.
-    * @param prefix  Optional prefix value used to prefix each keyword.
-    */ 
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-protected:
-   virtual ~ossimNBandLutDataObject();
-
-   LUT_ENTRY_TYPE *theLut;
-   ossim_uint32    theNumberOfEntries;
-   ossim_uint32    theNumberOfBands;
-   ossimScalarType theBandScalarType;
-   ossim_int32     theNullPixelIndex;
-   std::map<ossim_uint32, std::vector<ossimString> >  m_entryLabels;
-   
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/base/ossimNadconGridDatum.h b/include/ossim/base/ossimNadconGridDatum.h
deleted file mode 100644
index 6db9ec0..0000000
--- a/include/ossim/base/ossimNadconGridDatum.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef ossimNadconGridDatum_HEADER
-#define ossimNadconGridDatum_HEADER
-
-#include <ossim/base/ossimThreeParamDatum.h>
-#include <ossim/base/ossimNadconGridFile.h>
-#include <ossim/base/ossimDrect.h>
-
-class ossimNadconGridDatum : public ossimThreeParamDatum
-{
-public:
-  ossimNadconGridDatum(const ossimFilename& datumDirectory,
-		       const ossimString &code, 
-		       const ossimString &name,
-		       const ossimEllipsoid* anEllipsoid,
-		       double sigmaX,
-		       double sigmaY,
-		       double sigmaZ,
-		       double westLongitude,
-		       double eastLongitude,
-		       double southLatitude,
-		       double northLatitude,
-		       double param1,
-		       double param2,
-		       double param3);
-
-protected:
-  mutable ossimDrect theConusRect;
-  mutable ossimDrect theHawaiiRect;
-  mutable ossimDrect theAlaskaRect;
-  mutable ossimDrect theStGeorgeRect;
-  mutable ossimDrect theLatStLaurenceRect;
-  mutable ossimDrect theStPaulRect;
-  mutable ossimDrect thePrviRect;
-  
-  mutable ossimNadconGridFile theLatGrid;
-  mutable ossimNadconGridFile theLonGrid;
-  
-  mutable ossimDrect    theCurrentGridRect;
-  ossimFilename theDatumDirectory;
-  
-  void checkGrid(const ossimDpt& latLon)const;
-   
-   TYPE_DATA;   
-};
-
-#endif
diff --git a/include/ossim/base/ossimNadconGridFile.h b/include/ossim/base/ossimNadconGridFile.h
deleted file mode 100644
index 4ad7d27..0000000
--- a/include/ossim/base/ossimNadconGridFile.h
+++ /dev/null
@@ -1,54 +0,0 @@
-//**************************************************************************
-// Copyright (C) 2003 Storage Area Networks, Inc.
-//
-// Written by:   Kenneth Melero  <kmelero at sanz.com>
-//
-//**************************************************************************
-
-#ifndef ossimNadconGridFile_HEADER
-#define ossimNadconGridFile_HEADER
-#include <ossim/base/ossimNadconGridHeader.h>
-#include <fstream>
-
-class ossimNadconGridFile
-{
-public:
-  ossimNadconGridFile():
-    theFileOkFlag(false)
-      {}
-   ~ossimNadconGridFile();
-   bool open(const ossimFilename& file);
-   void close();
-
-   /*!
-    */
-   double getShiftAtLatLon(double lat, double lon)const;
-   bool pointWithin(double lat, double lon)const;
-   const ossimDrect getBoundingRect()const
-      {
-         return theBoundingRect;
-      }
-   
-   const ossimFilename& getFilename()const
-      {
-         return theFilename;
-      }
-   bool getFileOkFlag()const
-      {
-         return theFileOkFlag;
-      }
-   ossimDpt getSpacing()const
-      {
-         return theHeader.getSpacing();
-      }
-   
-protected:
-   mutable std::ifstream theInputFile;
-  mutable bool theFileOkFlag;
-  ossimFilename         theFilename;
-   ossimNadconGridHeader theHeader;
-   ossimDrect            theBoundingRect;
-  ossimDpt               theLatLonOrigin;
-};
-
-#endif
diff --git a/include/ossim/base/ossimNadconGridHeader.h b/include/ossim/base/ossimNadconGridHeader.h
deleted file mode 100644
index ace3118..0000000
--- a/include/ossim/base/ossimNadconGridHeader.h
+++ /dev/null
@@ -1,89 +0,0 @@
-//**************************************************************************
-// Copyright (C) 2003 Storage Area Networks, Inc.
-//
-// Written by:   Kenneth Melero  <kmelero at sanz.com>
-//
-//**************************************************************************
-
-#ifndef ossimNadconGridHeader_HEADER
-#define ossimNadconGridHeader_HEADER
-#include <iostream>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimDrect.h>
-
-class ossimNadconGridHeader
-{
-public:
-   friend std::ostream& operator <<(std::ostream& out, const ossimNadconGridHeader& rhs);
-   ossimNadconGridHeader()
-      :theCols(0),
-       theRows(0),
-       theZ(0),
-       theMinX(0),
-       theDx(0),
-       theMinY(0),
-       theDy(0)
-      {
-      }
-   bool readHeader(const ossimFilename& file);
-   bool readHeader(std::istream& in);
-
-   int getStartOffset()const
-      {
-         return (theCols+2)*4;
-      }
-
-   int getBytesPerRow()const
-      {
-         return (theCols+1)*4;
-      }
-
-   int getNumberOfRows()const
-      {
-         return theRows;
-      }
-   int getNumberOfCols()const
-      {
-         return theCols;
-      }
-   double getDeltaX()const
-      {
-         return (double)theDx;
-      }
-   double getDeltaY()const
-      {
-         return (double)theDy;
-      }
-   ossimDrect getBoundingRect()const
-      {
-         return ossimDrect(theMinX,
-                           theMinY + (theRows)*theDy,
-                           theMinX + (theCols)*theDx,
-                           theMinY,
-                           OSSIM_RIGHT_HANDED);
-      }
-   double getMinX()const
-      {
-         return theMinX;
-      }
-   double getMinY()const
-      {
-         return theMinY;
-      }
-   ossimDpt getSpacing()const
-      {
-         return ossimDpt(theDx, theDy);
-      }
-protected:
-   int*   theCharBuf[64];
-   int   theCols;
-   int   theRows;
-   int   theZ;
-   double theMinX;
-   double theDx;
-   double theMinY;
-   double theDy;
-};
-
-#endif
diff --git a/include/ossim/base/ossimNadconNarDatum.h b/include/ossim/base/ossimNadconNarDatum.h
deleted file mode 100644
index 46706c2..0000000
--- a/include/ossim/base/ossimNadconNarDatum.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef ossimNadconNarDatum_HEADER
-#define ossimNadconNarDatum_HEADER
-
-#include <ossim/base/ossimNadconGridDatum.h>
-#include <ossim/base/ossimNadconGridFile.h>
-class ossimNadconNarDatum : public ossimNadconGridDatum
-{
-public:
-   ossimNadconNarDatum(const ossimFilename& nadconDirectory);
-
-   // Argument holds the source point and datum.  Returns another
-   // point with this datum.
-   //
-   virtual ossimGpt shift(const ossimGpt    &aPt)const;
-   //utility functions to shift to and from the standard coordinates.
-   //Users should use the shift instead!!!
-   //
-   TYPE_DATA;
-};
-
-#endif
diff --git a/include/ossim/base/ossimNadconNasDatum.h b/include/ossim/base/ossimNadconNasDatum.h
deleted file mode 100644
index 508a133..0000000
--- a/include/ossim/base/ossimNadconNasDatum.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef ossimNadconNasDatum_HEADER
-#define ossimNadconNasDatum_HEADER
-
-#include <ossim/base/ossimNadconGridDatum.h>
-#include <ossim/base/ossimNadconGridFile.h>
-
-class ossimNadconNasDatum : public ossimNadconGridDatum
-{
-public:
-   ossimNadconNasDatum(const ossimFilename& nadconDirectory);
-
-   // Argument holds the source point and datum.  Returns another
-   // point with this datum.
-   //
-   virtual ossimGpt shift(const ossimGpt    &aPt)const;
-   TYPE_DATA;
-};
-
-#endif
diff --git a/include/ossim/base/ossimNormRgbVector.h b/include/ossim/base/ossimNormRgbVector.h
deleted file mode 100644
index b5f4b25..0000000
--- a/include/ossim/base/ossimNormRgbVector.h
+++ /dev/null
@@ -1,109 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2005 Garrett Potts
-//
-// License: LGPL
-// Author: Garrett Potts 
-// Description:
-//
-//*************************************************************************
-// $Id: ossimNormRgbVector.h 9094 2006-06-13 19:12:40Z dburken $
-#ifndef ossimNormRgbVector_HEADER
-#define ossimNormRgbVector_HEADER
-#include <iostream>
-#include <ossim/base/ossimConstants.h>
-
-class ossimJpegYCbCrVector;
-class ossimHsiVector;
-class ossimHsvVector;
-class ossimCmyVector;
-class ossimRgbVector;
-
-class OSSIM_DLL ossimNormRgbVector
-{
-public:
-   friend std::ostream& operator <<(std::ostream& out, const ossimNormRgbVector& data)
-   {
-      out << "<" << data.theBuf[0] << ", "
-          << data.theBuf[1] << ", "
-          << data.theBuf[2] << ">";
-
-         return out;
-      }
-   ossimNormRgbVector(ossim_float64 r=0, ossim_float64 g=0, ossim_float64 b=0)
-      {
-         theBuf[0] = r;
-         theBuf[1] = g;
-         theBuf[2] = b;
-      }
-   ossimNormRgbVector(ossim_float64 grey)
-      {
-         theBuf[0] = grey;
-         theBuf[1] = grey;
-         theBuf[2] = grey;
-      }
-   ossimNormRgbVector(ossim_float64 colorData[3])
-      {
-         theBuf[0] = colorData[0];
-         theBuf[1] = colorData[1];
-         theBuf[2] = colorData[2];
-      }
-   ossimNormRgbVector(const ossimNormRgbVector& rgb)
-   {
-      theBuf[0] = rgb.theBuf[0];
-      theBuf[1] = rgb.theBuf[1];
-      theBuf[2] = rgb.theBuf[2];
-   }
-   ossimNormRgbVector(const ossimRgbVector& rgb);
-   ossimNormRgbVector(const ossimJpegYCbCrVector& YCbCr);
-   ossimNormRgbVector(const ossimHsiVector& hsi);
-   ossimNormRgbVector(const ossimHsvVector& hsv);
-   ossimNormRgbVector(const ossimCmyVector& cmy);
-   ossimNormRgbVector operator -(const ossimNormRgbVector& rgb)const
-   {
-      return ossimNormRgbVector(clamp(theBuf[0] - rgb.theBuf[0]),
-                                clamp(theBuf[1] - rgb.theBuf[1]),
-                                clamp(theBuf[2] - rgb.theBuf[2]));
-   }
-   ossimNormRgbVector operator *(ossim_float64 t)const
-   {
-      return ossimNormRgbVector(clamp(theBuf[0]*t),
-                                clamp(theBuf[1]*t),
-                                clamp(theBuf[2]*t));
-   }
-   
-   const ossimNormRgbVector& operator =(const ossimJpegYCbCrVector& data);
-   const ossimNormRgbVector& operator =(const ossimHsiVector& hsi);
-   const ossimNormRgbVector& operator =(const ossimHsvVector& hsv);
-   const ossimNormRgbVector& operator =(const ossimCmyVector& cmy);
-   bool operator ==(const ossimNormRgbVector& rgb)
-      {
-         return ( (rgb.theBuf[0] == theBuf[0])&&
-                  (rgb.theBuf[1] == theBuf[1])&&
-                  (rgb.theBuf[2] == theBuf[2]));
-      }
-   bool operator !=(const ossimNormRgbVector& rgb)
-      {
-         return ( (rgb.theBuf[0] != theBuf[0])||
-                  (rgb.theBuf[1] != theBuf[1])||
-                  (rgb.theBuf[2] != theBuf[2]));
-      }
-   static ossim_float64 clamp(ossim_float64 colorValue, ossim_float64 min=0.0, ossim_float64 max=1.0)
-      {
-         colorValue = colorValue > max? max:colorValue;
-         colorValue = colorValue < min? min:colorValue;
-         
-         return colorValue;
-      }
-   ossim_float64 getR() const { return theBuf[0]; }
-   ossim_float64 getG()const  { return theBuf[1]; }
-   ossim_float64 getB()const  { return theBuf[2]; }
-   void setR(ossim_float64 r) { theBuf[0] = r; }
-   void setG(ossim_float64 g) { theBuf[1] = g; }
-   void setB(ossim_float64 b) { theBuf[2] = b; }
-   
-protected:
-   ossim_float64 theBuf[3];
-   
-};
-
-#endif
diff --git a/include/ossim/base/ossimNotify.h b/include/ossim/base/ossimNotify.h
deleted file mode 100644
index 30a8a46..0000000
--- a/include/ossim/base/ossimNotify.h
+++ /dev/null
@@ -1,107 +0,0 @@
-//-------------------------------------------------------------------
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-// Contains class declaration for ossimNotify
-//-------------------------------------------------------------------
-//  $Id: ossimNotify.h 21458 2012-08-07 20:40:35Z dburken $
-#ifndef ossimNotify_HEADER
-#define ossimNotify_HEADER 1
-
-#include <ossim/base/ossimErrorCodes.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimFilename.h>
-#include <iostream>
-#include <fstream>
-
-/**
-  * Notification level enumeration.  This specifies the
-  * level of the mesage being written.
-  */
-enum ossimNotifyLevel
-{
-   ossimNotifyLevel_ALWAYS = 0,
-   ossimNotifyLevel_FATAL  = 1,
-   ossimNotifyLevel_WARN   = 2,
-   ossimNotifyLevel_NOTICE = 3,
-   ossimNotifyLevel_INFO   = 4,
-   ossimNotifyLevel_DEBUG  = 5
-};
-
-/**
- * Flags to allow the user to turn off certain notification levels
- * 
- */
-enum ossimNotifyFlags
-{
-   ossimNotifyFlags_NONE   = 0,
-   ossimNotifyFlags_FATAL  = 1,
-   ossimNotifyFlags_WARN   = 2,
-   ossimNotifyFlags_NOTICE = 4,
-   ossimNotifyFlags_INFO   = 8,
-   ossimNotifyFlags_DEBUG  = 16,
-   ossimNotifyFlags_ALL    = (ossimNotifyFlags_FATAL|
-                              ossimNotifyFlags_WARN|
-                              ossimNotifyFlags_NOTICE|
-                              ossimNotifyFlags_INFO|
-                              ossimNotifyFlags_DEBUG)
-};
-
-OSSIMDLLEXPORT void ossimSetDefaultNotifyHandlers();
-
-OSSIMDLLEXPORT void ossimSetNotifyStream(std::ostream* outputStream,
-                                         ossimNotifyFlags whichLevelsToRedirect=ossimNotifyFlags_ALL);
-
-OSSIMDLLEXPORT std::ostream* ossimGetNotifyStream(ossimNotifyLevel whichLevel);
-
-OSSIMDLLEXPORT bool ossimIsReportingEnabled();
-
-OSSIMDLLEXPORT std::ostream& ossimNotify(ossimNotifyLevel level = ossimNotifyLevel_WARN);
-
-/**
- *
- */
-OSSIMDLLEXPORT void ossimSetLogFilename(const ossimFilename& filename);
-
-/** @brief Returns the log filename if set. */
-/* OSSIMDLLEXPORT const char* ossimGetLogFilename(); */
-OSSIMDLLEXPORT void ossimGetLogFilename(ossimFilename& logFile);
-
-
-/**
- *
- */
-OSSIMDLLEXPORT void ossimDisableNotify(ossimNotifyFlags notifyLevel=ossimNotifyFlags_ALL);
-
-/**
- *
- */
-OSSIMDLLEXPORT void ossimEnableNotify(ossimNotifyFlags notifyLevel=ossimNotifyFlags_ALL);
-
-
-OSSIMDLLEXPORT void ossimSetNotifyFlag(ossimNotifyFlags notifyFlags);
-OSSIMDLLEXPORT void ossimPushNotifyFlags();
-OSSIMDLLEXPORT void ossimPopNotifyFlags();
-OSSIMDLLEXPORT ossimNotifyFlags ossimGetNotifyFlags();
-
-
-/**
- * 
- */
-OSSIMDLLEXPORT void  ossimSetError( const char *className,
-                                    ossim_int32 error,
-                                    const char *fmtString=0, ...);
-
-/**
- * This is for general warnings and information feedback
- *
- * @param fmtString a C printf() style formatting string used (with the
- * following arguments) to prepare an error message.
- */
-OSSIMDLLEXPORT void  ossimSetInfo( const char *className,
-                                   const char *fmtString=0, ...);
-
-#endif /* #ifndef ossimNotify_HEADER */
diff --git a/include/ossim/base/ossimObjectFactoryRegistry.h b/include/ossim/base/ossimObjectFactoryRegistry.h
deleted file mode 100644
index 803eae1..0000000
--- a/include/ossim/base/ossimObjectFactoryRegistry.h
+++ /dev/null
@@ -1,74 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimObjectFactoryRegistry.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimObjectFactoryRegistry_HEADER
-#define ossimObjectFactoryRegistry_HEADER
-#include <vector>
-
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimObjectFactory.h>
-#include <ossim/base/ossimFactoryListInterface.h>
-
-class ossimKeywordlist;
-class ossimString;
-class OSSIMDLLEXPORT ossimObjectFactoryRegistry : public ossimObject,
-                                                  public ossimFactoryListInterface<ossimObjectFactory, ossimObject>
-{
-public:
-   virtual ~ossimObjectFactoryRegistry();
-   static ossimObjectFactoryRegistry* instance();
-   
-   virtual ossimObject* createObject(const ossimString& name)const
-   {
-      return createObjectFromRegistry(name);
-   }
-   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
-                                     const char* prefix=0)const
-   {
-      return createObjectFromRegistry(kwl, prefix);
-   }
-   
-   /*!
-    * Returns a type list of all objects that can be instantiated
-    * through the createObjectMethods above.
-    */
-   virtual void getTypeNameList(std::vector<ossimString>& typeList)const
-   {
-      getAllTypeNamesFromRegistry(typeList);
-   }
-
-   /*!
-    * returns a list of objects that are of the passed in
-    * base type.  for example:
-    *
-    *  If I want all ossimImageSource objects then I call:
-    *
-    *  ossimObjectFactoryRegistry::instance()->getTypeNameList(l,
-    *                                                          "ossimImageSource");
-    */ 
-   virtual void getTypeNameList(std::vector<ossimString>& typeList,
-                                const ossimString& baseType)const;
-   
-protected:
-   ossimObjectFactoryRegistry();//hide
-   ossimObjectFactoryRegistry(const ossimObjectFactoryRegistry&):ossimObject(){}//hide
-   void operator =(const ossimObjectFactoryRegistry&){}//hide
-   
-//   std::vector<ossimObjectFactory*>   theFactoryList;
-
-//   ossimObjectFactory* findFactory(ossimObjectFactory* factory)const;
-
-TYPE_DATA
-};
-
-extern "C"
-{
-  OSSIMDLLEXPORT void* ossimObjectFactoryRegistryGetInstance();
-}
-#endif
diff --git a/include/ossim/base/ossimPointHash.h b/include/ossim/base/ossimPointHash.h
deleted file mode 100644
index 9ac9859..0000000
--- a/include/ossim/base/ossimPointHash.h
+++ /dev/null
@@ -1,28 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-// Description: Point Hash is a base for hashing functions
-//              
-//*******************************************************************
-//  $Id: ossimPointHash.h 9094 2006-06-13 19:12:40Z dburken $
-
-#ifndef ossimPointHash_HEADER
-#define ossimPointHash_HEADER
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimFpt.h>
-
-class OSSIMDLLEXPORT ossimPointHash
-{
-public:
-   virtual ~ossimPointHash(){}
-   virtual long operator ()(const ossimDpt &aPoint)=0;
-   virtual long operator ()(const ossimFpt &aPoint)=0;
-};
-
-#endif
diff --git a/include/ossim/base/ossimPolyArea2d.h b/include/ossim/base/ossimPolyArea2d.h
deleted file mode 100644
index 400ca79..0000000
--- a/include/ossim/base/ossimPolyArea2d.h
+++ /dev/null
@@ -1,332 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//*******************************************************************
-//$Id: ossimPolyArea2d.h 9968 2006-11-29 14:01:53Z gpotts $
-#ifndef ossimPolyArea2d_HEADER
-#define ossimPolyArea2d_HEADER
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimPolygon.h>
-#include <ossim/base/ossimReferenced.h>
-#include <ossim/kbool/bool_globals.h>
-class Bool_Engine;
-
-class OSSIM_DLL ossimPolyArea2d : public ossimReferenced
-{
-public:
-   friend OSSIM_DLL std::ostream& operator <<(std::ostream& out, const ossimPolyArea2d& data);
-   ossimPolyArea2d()
-      :theEngine(0)
-      {
-         clearEngine();
-      }
-   ossimPolyArea2d(const vector<ossimDpt>& polygon)
-      :theEngine(0)
-   {
-      clearEngine();
-      (*this) = polygon;
-   }
-   ossimPolyArea2d(const vector<ossimIpt>& polygon)
-         :theEngine(0)
-      {
-         clearEngine();
-         (*this) = polygon;
-      }
-   ossimPolyArea2d(const vector<ossimGpt>& polygon)
-      :theEngine(0)
-      {
-         clearEngine();
-         (*this) = polygon;
-      }
-      
-   ossimPolyArea2d(const ossimDpt& p1,
-                   const ossimDpt& p2,
-                   const ossimDpt& p3,
-                   const ossimDpt& p4);
-   ossimPolyArea2d(const ossimPolyArea2d& rhs);
-      
-   ossimPolyArea2d(const ossimIrect& rect)
-      :theEngine(0)
-      {
-         (*this) = rect;
-      }
-   ossimPolyArea2d(const ossimDrect& rect)
-      :theEngine(0)
-      {
-         (*this) = rect;
-      }
-   ossimPolyArea2d(const ossimPolygon& polygon)
-      :theEngine(0)
-   {
-      (*this) = polygon;
-   }
-   ~ossimPolyArea2d();
-
-   void clear()
-   {
-      clearEngine();
-   }
-   const ossimPolyArea2d& operator =(const ossimPolyArea2d& rhs);
-   const ossimPolyArea2d& operator =(const ossimPolygon& rhs);
-   const ossimPolyArea2d& operator =(const ossimIrect& rect);
-   const ossimPolyArea2d& operator =(const ossimDrect& rect);
-   const ossimPolyArea2d& operator =(const vector<ossimDpt>& polygon);
-   const ossimPolyArea2d& operator =(const vector<ossimGpt>& polygon);
-   const ossimPolyArea2d& operator =(const vector<ossimIpt>& polygon);
-
-
-   
-   ossimPolyArea2d operator &(const ossimPolyArea2d& rhs)const;
-   ossimPolyArea2d operator -(const ossimPolyArea2d& rhs)const;
-   ossimPolyArea2d operator +(const ossimPolyArea2d& rhs)const;
-   ossimPolyArea2d operator ^(const ossimPolyArea2d& rhs)const;
-   const ossimPolyArea2d& operator &=(const ossimPolyArea2d& rhs);
-   const ossimPolyArea2d& operator -=(const ossimPolyArea2d& rhs);
-   const ossimPolyArea2d& operator +=(const ossimPolyArea2d& rhs);
-   const ossimPolyArea2d& operator ^=(const ossimPolyArea2d& rhs);
-   
-
-   void add(const ossimPolyArea2d& rhs);
-   
-   bool getVisiblePolygons(vector<ossimPolygon>& polyList)const;
-   bool getPolygonHoles(vector<ossimPolygon>& polyList, bool includeFalsePolygons=false)const;
-   bool isEmpty()const;
-   bool isPointWithin(const ossimDpt& point, double epsilonBall=.0000001)const;
-   bool isPointWithin(double x, double y, double epsilonBall=.0000001)const;
-   void getBoundingRect(ossimDrect& rect);
-
-   bool saveState(ossimKeywordlist& kwl,
-                  const char* prefix=0)const;
-   bool loadState(const ossimKeywordlist& kwl,
-                  const char* prefix=0);
-   
-protected:
-   void armBoolEng();
-   void clearEngine();
-   void performOperation(const ossimPolyArea2d& rhs,
-                         BOOL_OP operation); 
-   void performOperation(ossimPolyArea2d& result,
-                         const ossimPolyArea2d& rhs,
-                         BOOL_OP operation)const;
-   void clearPolygons();
-   
-   mutable Bool_Engine* theEngine;
-};
-
-
-
-#endif
-
-
-
-
-
-
-
-
-#if 0
-
-
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// OSSIM is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License 
-// as published by the Free Software Foundation.
-//
-// This software is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
-//
-// You should have received a copy of the GNU General Public License
-// along with this software. If not, write to the Free Software 
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-
-// 1307, USA.
-//
-// See the GPL in the COPYING.GPL file for more details.
-//
-// Author: Garrett Potts (gpotts at imagelinks.com)
-//
-//*************************************************************************
-// $Id: ossimPolyArea2d.h 9968 2006-11-29 14:01:53Z gpotts $
-#ifndef ossimPolyArea2d_HEADER
-#define ossimPolyArea2d_HEADER
-extern "C"
-{
-#include "libpolyclip/polyarea.h"
-}
-
-#include <iostream>
-#include <vector>
-using namespace std;
-
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimPolygon.h>
-
-/*!
- * This class uses the multiclip 2-d polygon library
- * to do intersections, unions, set difference, and xor
- * operations.  It will also use the library to do quick
- * point inside and poly inside tests.
- */
-class OSSIM_DLL ossimPolyArea2d
-{
-public:
-   friend OSSIM_DLL ostream& operator  <<(ostream& out,
-                                const ossimPolyArea2d& data);
-   /*!
-    * we will use the multi clip library in
-    * libpolyclip directory.
-    */
-   ossimPolyArea2d();
-   /*!
-    * If the copy polygon flag is false
-    * it will set its internal thePolygon to polygon
-    * else it will make a copy of it.
-    */
-   ossimPolyArea2d(POLYAREA* polygon,
-                  bool    copyPolygonFlag=false);
-   
-   ossimPolyArea2d(const ossimPolyArea2d& rhs);
-   ossimPolyArea2d(const vector<ossimDpt>& polygon);
-   ossimPolyArea2d(const vector<ossimGpt>& polygon);
-   ossimPolyArea2d(ossimDpt* points,
-                  long number);
-
-   ossimPolyArea2d(const ossimDpt& p1,
-                   const ossimDpt& p2,
-                   const ossimDpt& p3,
-                   const ossimDpt& p4);
-   ossimPolyArea2d(const ossimIrect& rect)
-      :thePolygon(NULL)
-      {
-         (*this) = rect;
-      }
-   ossimPolyArea2d(const ossimDrect& rect)
-      :thePolygon(NULL)
-      {
-         (*this) = rect;
-      }
-   
-   ossimPolyArea2d(const ossimPolygon& polygon);
-   ~ossimPolyArea2d();
-
-   /*!
-    * Will scale the polygon along the x and y direction
-    * by the passed in scale.  It will modify itself and
-    * return a const reference to itself.
-    */
-   const ossimPolyArea2d& operator *=(const ossimDpt& scale);
-   
-   /*!
-    * Will scale the polygon along the x and y direction
-    * by the passed in scale.  It will return another object.
-    */
-   ossimPolyArea2d operator *(const ossimDpt& scale)const;
-
-   /*!
-    * Scales evenly along the x and y direction.
-    */
-   const ossimPolyArea2d& operator *=(double scale);
-
-   /*!
-    * Scales evenly along the x and y direction.
-    */
-   ossimPolyArea2d operator *(double scale)const;
-
-   /*!
-    * Assignment operator.  Allows you to assign
-    * or copy one polygon to another.
-    */
-   const ossimPolyArea2d& operator =(const ossimPolyArea2d& rhs);
-
-   const ossimPolyArea2d& operator =(const ossimIrect& rect);
-   const ossimPolyArea2d& operator =(const ossimDrect& rect);
-   
-   /*!
-    * Will do a set difference on the this - right
-    * and return a new polygon.
-    */
-   ossimPolyArea2d operator -(const ossimPolyArea2d& rhs)const;
-
-   /*!
-    * This will do the same as - but will
-    * update itself.
-    */
-   ossimPolyArea2d& operator -=(const ossimPolyArea2d& rhs);
-   
-   /*!
-    * do a union of 2 polygons.
-    */
-   ossimPolyArea2d operator +(const ossimPolyArea2d& rhs)const;
-
-   /*!
-    * This will do the same as the operator
-    * + but will update itself.
-    */
-   ossimPolyArea2d& operator +=(const ossimPolyArea2d& rhs);
-
-
-   /*!
-    * do an intersection of 2 polygons
-    */
-   ossimPolyArea2d operator &(const ossimPolyArea2d& rhs)const;
-
-   /*!
-    * This will do the same as the operator &
-    * but will update itself.
-    */
-
-   ossimPolyArea2d& operator &=(const ossimPolyArea2d& rhs);
-
-   /*!
-    * Will perform the "excusive or" of the this
-    * object with the right side
-    */
-   ossimPolyArea2d operator ^(const ossimPolyArea2d& rhs)const;
-
-   /*!
-    * This is the non const version and will update
-    * itself.
-    */
-   ossimPolyArea2d& operator ^=(const ossimPolyArea2d& rhs);
-
-   /*!
-    * This only makes since if you know that there are no holes.
-    * For example, using it after an intersection only operation by loading
-    * up two filled regions and intersecting them.
-    */
-   bool getAllVisiblePolygons(vector<ossimPolygon>& polyList)const;
-   
-   bool isEmpty()const
-      {
-         return (thePolygon == NULL);
-      }
-
-   bool isPointWithin(const ossimDpt& point)const;
-   bool isPointWithin(double x, double y)const;
-   void getBoundingRect(ossimDrect& rect);
-
-   bool saveState(ossimKeywordlist& kwl,
-                  const char* prefix=0)const;
-   bool loadState(const ossimKeywordlist& kwl,
-                  const char* prefix=0);
-protected:
-   POLYAREA *thePolygon;
-
-   void loadPolygonForCurrentContour(ossimPolygon& polygon,
-                                     bool visible);
-};
-
-#endif
-#endif
diff --git a/include/ossim/base/ossimPolygon.h b/include/ossim/base/ossimPolygon.h
deleted file mode 100644
index fff71ef..0000000
--- a/include/ossim/base/ossimPolygon.h
+++ /dev/null
@@ -1,246 +0,0 @@
-//*****************************************************************************
-// FILE: ossimPolygon.h
-//
-// Copyright (C) 2001 ImageLinks, Inc.
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Contains declaration of class ossimPolygon.
-//   This class provides utilities associated with N-vertex, convex
-//   (i.e., only two intersections for any line passing through the polygon).
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimPolygon.h 19180 2011-03-22 17:36:33Z oscarkramer $
-
-#ifndef ossimPolygon_HEADER
-#define ossimPolygon_HEADER
-#include <iostream>
-#include <vector>
-using namespace std;
-
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimIrect.h>
-
-class ossimLine;
-
-/******************************************************************************
- *
- * CLASS:  ossimPolygon
- *
- *****************************************************************************/
-class OSSIMDLLEXPORT ossimPolygon
-{
-public:
-   ossimPolygon();
-   ossimPolygon(const vector<ossimIpt>& polygon);
-   ossimPolygon(const vector<ossimDpt>& polygon);
-   ossimPolygon(int numVertices, const ossimDpt* vertex_array);
-
-   ossimPolygon(const ossimPolygon& copy_this);
-   
-   /**
-    * CONSTRUCTOR: Provided for convenience. Does not imply the polygon is
-    * limited to four vertices:
-    */
-   ossimPolygon(ossimDpt v1,
-                ossimDpt v2,
-                ossimDpt v3,
-                ossimDpt v4);
-   
-   ossimPolygon(const ossimIrect& rect);
-   ossimPolygon(const ossimDrect& rect);
-
-   ~ossimPolygon();
-
-   ossimDpt& operator[](int index);
-   
-   const ossimDpt& operator[](int index)const;
-
-   ossim_uint32 getVertexCount()const;
-   
-   ossim_uint32 getNumberOfVertices()const;
-
-   //! Returns polygon area. Negative indicates CW ordering of vertices (in right-handed coordinates)
-   double area()const;
-
-   void getIntegerBounds(ossim_int32& minX,
-                         ossim_int32& minY,
-                         ossim_int32& maxX,
-                         ossim_int32& maxY)const;
-   void getFloatBounds(ossim_float64& minX,
-                       ossim_float64& minY,
-                       ossim_float64& maxX,
-                       ossim_float64& maxY)const;
-
-   void getBoundingRect(ossimIrect& rect)const;
-   void getBoundingRect(ossimDrect& rect)const;
-
-   /**
-    * Initializes minRect with the minimum area rect (not-necessarily
-    * aligned with axes) that bounds this polygon.
-    *
-    * @param minRect Polygon to initialize with the minimum rect.
-    */
-   void getMinimumBoundingRect(ossimPolygon& minRect) const;
-   
-   void roundToIntegerBounds(bool compress=false);
-
-   void clear();
-
-   void addPoint(const ossimDpt& pt);
-   void addPoint(double x, double y);
-
-   ossimDpt midPoint()const;
-   
-   /**
-    * will sequence through the polygon and check to see if any values are NAN
-    */
-   bool hasNans()const;
-
-   const vector<ossimDpt>& getVertexList()const;
-      
-   /**
-    * Uses the ossimPolyArea2d class for the intersection
-    */
-   bool clipToRect(vector<ossimPolygon>& result,
-                   const ossimDrect& rect)const;
-
-   
-   /**
-    * METHOD: clipLineSegment(p1, p2)
-    * Implements Cyrus-Beck clipping algorithm as described in:
-    * http://www.daimi.au.dk/~mbl/cgcourse/wiki/cyrus-beck_line-clipping_.html
-    * Clips the line segment defined by thw two endpoints provided. The
-    * endpoints are modified as needed to represent the clipped line. Returnes
-    * true if intersection present.
-    */
-   bool clipLineSegment(ossimDpt& p1, ossimDpt& p2) const;
-
-   /**
-    * METHOD: pointWithin(ossimDpt)
-    * Returns TRUE if point is inside polygon.
-    */
-   bool pointWithin(const ossimDpt& point) const;
-
-   bool isPointWithin(const ossimDpt& point) const;
-
-   /**
-   * METHOD: isRectWithin()
-   * Returns true if all the corner points of the given rect fit within.
-   */
-   bool isRectWithin(const ossimIrect &rect) const;
-
-   /**
-   * METHOD: isPolyWithin()
-   * Returns true if all the vertices of the given polygon fit within.
-   */
-   bool isPolyWithin(const ossimPolygon &poly) const;
-
-   /**
-    * METHOD: vertex(index)
-    * Returns the ossimDpt vertex given the index. Returns false if no vertex
-    * defined.
-    */
-   bool vertex(int index, ossimDpt& tbd_vertex) const;
-
-   /**
-    * METHOD: nextVertex()
-    * Assigns the ossimDpt tbd_vertex following the current vertex. The current
-    * vertex is initialized with a call to vertex(int), or after the last
-    * vertex is reached. Returns false if no vertex defined. Intended to be
-    * when cycling through all vertices.
-    */
-   bool nextVertex(ossimDpt& tbd_vertex) const;
-
-   void reverseOrder();
-   /**
-    * OPERATORS: (Some are inlined at bottom) 
-    */
-   const ossimPolygon& operator= (const ossimPolygon& copy_this);
-   const ossimPolygon& operator= (const vector<ossimDpt>& vertexList);
-   const ossimPolygon& operator= (const vector<ossimIpt>& vertexList);
-   const ossimPolygon& operator= (const ossimIrect& rect);
-   const ossimPolygon& operator= (const ossimDrect& rect);
-   bool                operator==(const ossimPolygon& compare_this) const;
-   bool                operator!=(const ossimPolygon& compare_this) const;
-
-   const ossimPolygon& operator *=(const ossimDpt& scale);
-   const ossimPolygon& operator *=(double scale);
-   
-   ossimPolygon operator *(const ossimDpt& scale)const;
-   ossimPolygon operator *(double scale)const;
-   
-   void resize(ossim_uint32 newSize);
-
-   /**
-    * METHOD: print()
-    */
-   void print(ostream& os) const;
-   friend ostream& operator<<(ostream&, const ossimPolygon&);
-
-
-   bool saveState(ossimKeywordlist& kwl,
-                  const char* prefix=0)const;
-   
-   bool loadState(const ossimKeywordlist& kwl,
-                  const char* prefix=0);
-
-   ossimVertexOrdering checkOrdering()const;
-
-   ossimVertexOrdering getOrdering()const;
-
-protected:
-   /**
-   * METHOD: getCentroid()
-   * Assigns the ossimDpt centroid the polygon.
-   * Warning: centroid is not guaranteed to be inside the polygon!
-    */
-   void getCentroid(ossimDpt &centroid) const;
-
-   /**
-   * METHOD: shrink()
-   * Shrinks the current polygon by inset, return true if success.
-    */
-   bool shrink(ossimPolygon &dest, double inset) const;
-   
-   /**
-   * METHOD: remove()
-   * Removes the vertex from the polygon.
-
-    */
-   void removeVertex(int vertex);
-   /**
-   * METHOD: removeSmallestContributingVertex()
-   * Removes the vertex that contributes the smallest area to the polygon.
-    */
-   void removeSmallestContributingVertex();
-
-   void intersectEdge(ossimDpt& result,
-                      const ossimLine& segment,
-                      const ossimDrect& rect,
-                      int edge);
-   
-   bool isInsideEdge(const ossimDpt& pt,
-                     const ossimDrect& rect,
-                     int edge)const;
-
-   /**
-   * Assigns destPt the point that fits a circle of given radius inside the polygon vertex.
-   * Warning: destPt is not guaranteed to be inside the polygon!
-   * (you may not be able to fit a circle of the given radius inside the polygon)
-   */
-   void fitCircleInsideVertex(ossimDpt &destPt, unsigned int vertex, double radius) const;
-
-   mutable ossimVertexOrdering theOrderingType;
-   vector<ossimDpt> theVertexList;
-   mutable ossim_int32 theCurrentVertex;
-};
-
-#endif /* End of "#ifndef ossimPolygon_HEADER" */
diff --git a/include/ossim/base/ossimPolynom.h b/include/ossim/base/ossimPolynom.h
deleted file mode 100644
index 09f9552..0000000
--- a/include/ossim/base/ossimPolynom.h
+++ /dev/null
@@ -1,872 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// ossimPolynom.h
-// Author: Frederic Claudel Meraka/CSIR, 2005
-///////////////////////////////////////////////////////////////////////////////
-//
-//TODO : check if automatically removing small monoms is actually viable
-//
-//TBD : normalization for Least Mean Square fit
-//TBD : copy constructor for different DIM
-//TBD : LOW PRIORITY redo serialization so that doesn't have to use strings (streams only)
-
-#ifndef ossimPolynom_HEADER
-#define ossimPolynom_HEADER
-
-#include <cmath>
-#include <vector>
-#include <map>
-#include <set>
-#include <iostream>
-#include <iomanip>
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/matrix/newmat.h>
-#include <ossim/matrix/newmatap.h>
-
-/**
- * template class for multivariate polynom algebra
- *
- * T   : the storage type, constraints: must have 0 (zero) as value, support ops fabs + - * /
- * DIM : the dimension of the input space, integer (>=1, default : 1)
- *
- * stores a set of monoms, a monom is (exponent tuples + coefficient)
- * requires a precion (epsilon) for comparisons
- * note: monoms absolute values below epsilon are removed from the map
- */
-template < class T, int DIM = 1 >
-class  ossimPolynom
-{
-public:
-   /**
-    * inner types
-    */
-   typedef std::vector< int > EXP_TUPLE; //! type to store exponent tuples
-   typedef std::vector< T >   VAR_TUPLE; //! type to store multivariate input
-
-   struct EXP_TUPLE_LESSTHAN //! inner functor for sorting exponent tuples
-   {
-      //warning both EXP_TUPLE should have same dimension (not necessarily DIM)
-      bool operator()(const EXP_TUPLE& o1, const EXP_TUPLE& o2)const
-      {
-         for(unsigned int i=0;i<o1.size();++i)
-         {
-            if (o1[i]<o2[i])
-            {
-               return true;
-            } else if (o1[i]>o2[i])
-            {
-               return false;
-            }
-         }
-         return false;
-      }
-   };
-
-   typedef std::map< EXP_TUPLE, T , EXP_TUPLE_LESSTHAN > MONOM_MAP; //! for storing polynom
-
-   typedef std::set< EXP_TUPLE, EXP_TUPLE_LESSTHAN >     EXPT_SET; //! for storing set of exponent tuples
-
-   /** 
-    * construction : 
-    * 
-    */
-    //TBD : by default, adapt epsilon to template type T
-   ossimPolynom(const T& epsilon = 0) //! must supply epsilon value, default 0
-      : theEpsilon(epsilon)
-   {}
-
-   ossimPolynom(const ossimPolynom& p) : 
-      theMonoms(p.getMonoms()),
-      theEpsilon(p.getEpsilon())
-   {}
-
-   ~ossimPolynom()
-   {}
-
-   const ossimPolynom& operator=(const ossimPolynom< T, DIM >& pt)
-   {
-      if (this != &pt)
-      {
-         theEpsilon = pt.getEpsilon();
-         theMonoms  = pt.getMonoms();
-      }
-      return *this;
-   }
-
-   void setMonom(const EXP_TUPLE& m, const T& v)
-   {
-      if (isNegligible(v))
-      {
-         theMonoms.erase(m); //TBC TBD: what happens if m is not in the map?
-      } else {
-         theMonoms[m] = v;
-      }
-   }
-
-   void setMonom(const int mexp[DIM], const T& v)
-   {
-      EXP_TUPLE mexpV(mexp,mexp+DIM);
-      if (isNegligible(v))
-      {
-         theMonoms.erase(mexpV); //TBC TBD: what happens if m is not in the map?
-      } else {
-         theMonoms[mexpV] = v;
-      }
-   }
-
-
-   inline void delMonom(const EXP_TUPLE& m)
-   {
-      theMonoms.erase(m); //TBC TBD: what happens if m is not in the map?
-   }
-
-   T getCoeff(const EXP_TUPLE& m)const
-   {
-      typename MONOM_MAP::const_iterator it = theMonoms.find(m);
-      if (it != theMonoms.end())
-      {
-         return it->second;
-      } else {
-         return 0;
-      }
-   }
-
-   void nullify()  //set to 0
-   {
-      theMonoms.clear();
-   }
-
-   inline bool isNull()const
-   {
-      return (theMonoms.size() == 0);
-   }
-  
-   inline const MONOM_MAP& getMonoms()const 
-   {
-      return theMonoms;
-   }
-
-   inline const T& getEpsilon()const  //! no setEpsilon beacause might erase monoms
-   {
-      return theEpsilon;
-   }
-
-   /**
-    * comparison operators
-    * -don't compare theEpsilon values
-    * -use my own epsilon in comparisons (not the compared to's epsilon)
-    */
-   bool operator==(const ossimPolynom& pt)const
-   {
-      if (getMonoms().size() != pt.getMonoms().size()) return false;
-
-      // loop on my monoms
-      typename MONOM_MAP::const_iterator it;
-      for ( it = getMonoms().begin(); it != getMonoms().end() ; ++it )
-      {
-         if ( !isNegligible(it->second - pt.getCoeff(it->first)) ) return false;
-      }
-      return true; //same number of identical monoms
-   }
-
-   bool operator!=(const ossimPolynom& pt)const
-   {
-      return !operator==(pt);
-   }
-
-   inline bool isNegligible(const T& v)const //! can v be considered as zero?
-   {
-      return ( fabs(v) <= theEpsilon );
-   }   
-
-   /** 
-    * orders
-    */
-   int getOrder(int d)const //! returns maximum order of monoms for a specific dimension (d starts at 0)
-   {
-      if ((d>=DIM) || (d<0)) return -1; //error = no dimension
-
-      // loop on monoms
-      int order = -1; //for null polynom
-      int corder;
-      typename MONOM_MAP::const_iterator it;
-      for ( it = getMonoms().begin(); it != getMonoms().end() ; ++it )
-      {
-         corder = (it->first)[d];
-         if ( corder > order ) order = corder;
-      }
-      return order;
-   }
-
-   int getTotalOrder()const //! returns maximum order of monoms
-   {
-      int order = -1; //for null polynom
-      int sorder;
-      typename MONOM_MAP::const_iterator it;
-      for ( it = getMonoms().begin(); it != getMonoms().end() ; ++it )
-      {
-         sorder = 0;
-         for (int d=0;d<DIM;++d) sorder+=(it->first)[d];
-         if ( sorder > order ) order = sorder;
-      }
-      return order;
-   }
-
-   /**
-    * evaluation : needs DIM values as input
-    */
-   T eval(const VAR_TUPLE& v)const
-   {
-      T ev = 0;
-      //loop on monoms. TBD optimize powers using map order
-      typename MONOM_MAP::const_iterator it;
-      int p;
-      for ( it = getMonoms().begin(); it != getMonoms().end() ; ++it )
-      {
-         //compute powers
-         T mv = it->second;
-         for(int d=0;d<DIM;++d)
-         {
-            p = (it->first)[d];
-            if (p != 0)
-            {
-               mv *= std::pow( v[d], p );
-            }
-         }
-         //add momom value
-         ev += mv;
-      }
-      return ev;
-   }
-
-   /** 
-    * partial differentiation polynom
-    */
-   void pdiff(int pdim, ossimPolynom& result)const
-   {
-      result.nullify();
-      int ord;
-      //loop on monoms
-      for ( typename MONOM_MAP::const_iterator it = getMonoms().begin(); it != getMonoms().end() ; ++it )
-      {
-         ord = it->first[pdim];
-         if (ord>=1)
-         {
-            EXP_TUPLE expDiff(it->first);
-            expDiff[pdim] -= 1;
-            result.setMonom(expDiff, it->second * ord);
-         }
-      }
-   }
-
-   /**
-    * operations with scalar
-    */
-   const ossimPolynom& operator*=(const T& k)
-   {
-      //loop on monoms
-      for ( typename MONOM_MAP::const_iterator it = getMonoms().begin(); it != getMonoms().end() ; ++it )
-      {
-         it->second *= k;
-      }
-      discardNullMonoms();
-   }
-
-   /**
-    * arithmetic operators
-    */
-   ossimPolynom operator+(const ossimPolynom& p)const
-   {
-      ossimPolynom< T , DIM > sum(*this);
-      return (sum+=p);
-   }
-   ossimPolynom operator-(const ossimPolynom& p)const
-   {
-      ossimPolynom< T , DIM > diff(*this);
-      return (diff-=p);
-   }
-
-   const ossimPolynom& operator+=(const ossimPolynom& p)
-   {
-      typename MONOM_MAP::const_iterator it;
-      //loop on p monoms
-      for ( it = p.getMonoms().begin(); it != p.getMonoms().end() ; ++it )
-      {
-         setMonom( it->first, getCoeff(it->first) + it->second );
-      }
-      return *this;
-   }
-
-   const ossimPolynom& operator-=(const ossimPolynom& p)
-   {
-      typename MONOM_MAP::const_iterator it;
-      //loop on p monoms
-      for ( it = p.getMonoms().begin(); it != p.getMonoms().end() ; ++it )
-      {
-         setMonom( it->first, getCoeff(it->first) - it->second );
-      }
-      return *this;
-   }
-
-   /**
-    * product operator : use epsilon from left side
-    */
-   ossimPolynom operator*(const ossimPolynom& p)const
-   {
-      //do a stupid multiplication (sum all monom pairs)      
-      ossimPolynom< T , DIM > prod(getEpsilon());
-      T coeff;
-      //loop on p monoms
-      for ( typename MONOM_MAP::const_iterator it = getMonoms().begin(); it != getMonoms().end() ; ++it )
-      {      
-         for ( typename MONOM_MAP::const_iterator pit = p.getMonoms().begin(); pit != p.getMonoms().end() ; ++pit )
-         {
-            coeff = it->second * pit->second;
-            if (coeff!=0)
-            {
-               EXP_TUPLE prodExp(it->first);
-               addExpTuple(prodExp, pit->first);
-               prod.addMonomQuick(prodExp, coeff);
-            }
-         }
-      }
-      //scan for null monoms and discard
-      prod.discardNullMonoms();
-      return prod;
-   }
-
-   const ossimPolynom& operator*=(const ossimPolynom& p)
-   {
-      return operator=( this->operator*(p) );
-   }
-
-   static void addExpTuple(EXP_TUPLE& m1, const EXP_TUPLE& m2)
-   {
-      for(int i=0;i<DIM;++i) {
-         m1[i] += m2[i];
-      }
-   }
-   
-   /**
-    * I/O
-    * 
-    * stream serialization format :
-    *  [ k1 (e1_1,e1_2,...,e1_DIM) ; k2 (e2_1,e2_2,..,e2_DIM) ; kN (eN_1,...eN_DIM)]
-    *
-    * N is the number of monoms
-    * ei_j is exponent for dimension j and monom i
-    *
-    * order is not important
-    * all monoms should have the same dimension : DIM
-    * you should add eps=xxxx at the beginning, separated by semi-colon ; (by default epsilon is 0)
-    *
-    * examples:
-    *  [ ] is the null polynom, [ eps=1.0e-5 ] too
-    *  [ 1.0 (0) 3.5 (1) ] is polynom 1.0 + 3.5*x, with epsilon = 0
-    *  [ eps=1.0E-12 ;  2.0 (1,1,0) ; -1.0 (0,0,1) ] is polynom 2*x*y-z, with epsilon=10^-12
-    */
-   
-   std::ostream& print(std::ostream& os)const
-   {
-      static const char* monom_sep = " ; ";
-      static const char* no_sep    = "";
-
-      const char* use_sep = no_sep;
-
-      os<<"[";
-      os<<std::setprecision(16); //16 for double, TBD TBC: adapt to epsilon
-      os<<std::setiosflags(std::ios_base::scientific);
-      //output epsilon if not null
-      if (getEpsilon() > 0)
-      {         
-         os<<use_sep<<"eps="<<getEpsilon();
-         use_sep=monom_sep;
-      }
-      //loop on monoms
-      for ( typename MONOM_MAP::const_iterator it = getMonoms().begin(); it != getMonoms().end() ; ++it )
-      {
-         os<<use_sep<<it->second<<"(";
-         for(int d=0 ; d<DIM ; ++d)
-         {
-            if (d>0)
-            {
-               os<<",";
-            }
-            os<<(it->first)[d];
-         }
-         os<<")";
-         use_sep=monom_sep;
-      }
-      os<<"]";
-      return os;
-   }
- 
-   std::ostream& 
-   printNice(std::ostream& os, const char symbols[DIM]) //!classic representation (bad accuracy, for display only)
-   {
-      if (getMonoms().size() == 0)
-      {
-         os<<"0"; //zero
-      } else {
-         os<<std::setiosflags(std::ios_base::fixed);
-         os<<std::setprecision(14); //14 for double, TBD TBC: adapt to epsilon
-         //loop on monoms (map order)
-         for ( typename MONOM_MAP::const_iterator it = getMonoms().begin(); it != getMonoms().end() ; ++it )
-         {
-            T coeff = it->second;
-            if (coeff>0)
-            {
-               os<<"+";
-            }
-            os<<coeff;
-            for(int d=0;d<DIM;++d) 
-            {
-               int ord=(it->first)[d];
-               if (ord>0)
-               {
-                  os<<""<<symbols[d];
-                  if (ord != 1)
-                  {
-                     os<<ord;
-                  }
-               }
-            }
-         }
-      }
-      return os;
-   }
-
-   std::istream& import(std::istream& is) //! note that it can only import for the template type T and dimesnion DIM
-   {
-      nullify();
-
-      //extract data in brackets [ ]
-      //swallow bracket
-      ossimString tempString;
-      char tempChar;
-      is.get(tempChar);
-      if (!is) 
-      {
-         std::cerr<<"ossimPolynom::import ERROR, cannot read left bracket ["<<std::endl;
-         return is;
-      }
-      if (tempChar != '[')
-      {
-         std::cerr<<"ossimPolynom::import ERROR, missing left bracket ["<<std::endl;
-         return is;
-      }
-      const int BUFSIZE=32768;  //should be enough fro most apps (TBC TBD : allow loops if not enough)
-      char buffer[BUFSIZE];
-      is.getline(buffer, BUFSIZE, ']');
-      if (!is)
-      {
-         std::cerr<<"ossimPolynom::import ERROR, cannot read after left bracket ["<<std::endl;
-         return is;
-      }     
-      if (is.gcount() >= BUFSIZE-1)
-      {
-         std::cerr<<"ossimPolynom::import ERROR, cannot find right bracket ] after "<<BUFSIZE-1<<"characters"<<std::endl;
-         return is;
-      }
-      tempString = buffer; //no more brackets
-
-      //split string using semicolons
-      std::vector< ossimString > subparts = tempString.explode(";");
-      //loop on subparts
-      for (typename std::vector< ossimString >::const_iterator it=subparts.begin() ; it!=subparts.end() ; ++it )
-      {
-         ossimString sp = it->trim();
-         //check for epsilon
-         ossimString aft_eps=sp.after("eps=");
-         if (aft_eps.size()>0)
-         {
-            //get epsilon value
-            aft_eps.trim();
-            theEpsilon = static_cast< T >(aft_eps.toDouble());
-         } else {
-            //no epsilon : must be a monom
-            ossimString scalpart=sp.before("(");
-            if (scalpart.size() < sp.size())
-            {
-              T coeff = static_cast< T >(scalpart.toDouble());
-              ossimString expopart = ((sp.before(")")).after("(")).trim();
-              if (expopart.size() == 0)
-              {
-                 std::cerr<<"ossimPolynom::import ERROR, cannot find ) in monom or empty monom"<<std::endl;
-                 return is;
-              }
-              std::vector< ossimString > vexpo = expopart.explode(",");
-              if (vexpo.size() != DIM)
-              {
-                 std::cerr<<"ossimPolynom::import ERROR, bad number of exponents in monom (need "<<DIM<<"): "<<vexpo.size()<<std::endl;
-                 return is;
-              }
-              //store all exponents
-              EXP_TUPLE expt(DIM);
-              int d;
-              std::vector< ossimString >::const_iterator eit;
-              for (eit=vexpo.begin() , d=0 ; eit != vexpo.end() ; ++eit, ++d )
-              {
-                 expt[d] = eit->toInt(); //TBD : could check that value is integer, but how?
-              }
-              //add new monom (if duplicate...error)
-              if (getMonoms().find(expt) != getMonoms().end())
-              {
-                 std::cerr<<"ossimPolynom::import ERROR, duplicate exponent tuple in polynom"<<std::endl;
-                 return is;
-              }
-              theMonoms[expt] = coeff;
-
-            } else {
-               std::cerr<<"ossimPolynom::import ERROR, cannot find left parenthesis ( in monom "<<std::endl;
-               return is;
-            }
-         }
-      }
-
-      return is;
-   }
-/**
- * constructs simple exponent tuples set for using LMSfit
- * need order for each dimension
- */
- EXPT_SET builExpSet(const EXP_TUPLE& orders)const
- {
-    EXPT_SET eset;
-    if (orders.size() != DIM)
-    {
-       std::cerr<<"ossimPolynom::import ERROR bad dimension for parameter, need "<<DIM<<" elements"<<std::endl;
-       return eset;
-    }
-    //initialise variable exponent tuple
-    EXP_TUPLE et(DIM);
-    for(int d=0;d<DIM;++d) et[d]=0;
-    while (et[0] <= orders[0])
-    {
-      //add tuple to set
-      eset.insert(et);
-
-      //increment tuple within bounds
-      et[DIM-1]++;
-      for(int d=DIM-1 ; d>=0 ; --d)
-      {
-         if ((et[d] > orders[d]) && (d>0))
-         {
-            et[d] = 0;
-            et[d-1]++;
-         }
-      }
-    }
-    return eset;
- }
-
- /** 
-  * concatenate exponents (at the right) to existing tuple set, for a given maximum total order
-  * eg: with eset={(0,1),(0,0)} , 
-  * then addExpTuple(2,1,eset) = {(0,1,0,0),(0,1,0,1),(0,1,1,0), (0,0,0,0),(0,0,0,1),(0,0,1,0)}
-  */
- void addExpTupleRight(int newdim, int totalOrder, EXPT_SET& eset )const
- {
-    EXPT_SET newset;
-    // add a copy off eset for each order with the specific last dim
-    for(int o=0; o<=totalOrder ; ++o)
-    {
-       EXPT_SET extset; //extended set
-       if (eset.size()==0)
-       {
-          EXP_TUPLE tu(1);
-          tu[0]=o;
-          extset.insert(tu);
-       } else {
-          //we have to construct a new set from eset, extending dimension
-          // cause: stored tuples cannot be compared at different dimensions
-          for(typename EXPT_SET::iterator sit = eset.begin(); sit != eset.end(); ++sit)
-          {
-             EXP_TUPLE tu(*sit);
-             tu.push_back(o);
-             extset.insert(tu);
-          }
-       }
-       //recursively add remaining dimensions
-       if (newdim>1)
-       {
-          addExpTupleRight(newdim-1, totalOrder-o, extset); //only dimension decreases
-       }
-       //add full set for the specific order
-       newset.insert(extset.begin(), extset.end());
-    }
-    eset=newset; //overwrite
- }
-
-/**
- * fits the polynom to the observations using Least Mean Squares
- * returns true on success (can fail if not enough observations)
- *  + also updates rms error(root mean square)
- * NOTES: inputs must have same size and must be ordered the same way
- *        use builExpSet() to construct classic polynoms 
- * TODO: add weights to observations
- */
-bool
-LMSfit(const EXPT_SET&                expset,
-       const std::vector< VAR_TUPLE > obs_input,
-       const std::vector< T >         obs_output,
-       T*                             prms = NULL)
-{
-   //init
-   nullify();
-
-   //check size
-   int nobs = (int)obs_input.size();
-   if (nobs != (int)obs_output.size())
-   {
-      std::cerr<<"ossimPolynom::LMSfit ERROR observation input/output must have the same size"<<std::endl;
-      return false;
-   }
-   if (nobs<=0)
-   {
-      std::cerr<<"ossimPolynom::LMSfit ERROR observation count is zero"<<std::endl;
-      return false;
-   }
-   int ncoeff = (int)expset.size();  
-   if (ncoeff<=0)
-   {
-      std::cerr<<"ossimPolynom::LMSfit ERROR exponent count is zero"<<std::endl;
-      return false;
-   }
-   
-   //construct LMS linear system (using OSSIM matrices)
-   // M.k = v
-   // M : monom matrix
-   // k : polynbm coefficients
-   // v : output_obs
-   NEWMAT::Matrix M(nobs, ncoeff);
-   double elt;
-   int p;
-   typename EXPT_SET::const_iterator cit;
-   typename std::vector< VAR_TUPLE >::const_iterator oit;
-   int i,j;
-   for (cit=expset.begin(), j=1; cit != expset.end() ; ++cit, ++j) //loop on exponent tuples
-   {
-      for(oit=obs_input.begin(), i=1; oit!=obs_input.end();++oit, ++i) //loop on observations
-      {
-         //compute powers using observation position
-         elt=1.0;
-         for(int d=0;d<DIM;++d)
-         {
-            p = (*cit)[d];
-            if (p != 0)
-            {
-               elt *= std::pow( (*oit)[d], p );
-            }
-         }
-         //init M
-         M(i,j) = elt; //NEWMAT indices start at 1
-      }
-   }
-
-   NEWMAT::ColumnVector v(nobs);
-   for(int o=0;o<nobs;++o)
-   {
-      v(o+1) = obs_output[o];
-   }
-
-   //build LMS symmetric matrix tM.M
-   //build best fit
-   NEWMAT::ColumnVector bfit = invert(M.t()*M)*M.t()*v; //TBD : check inversion
-
-   //compute RMS (optional, if rms non null)
-   if (prms!=NULL)
-   {
-      NEWMAT::ColumnVector delta = M*bfit - v;
-      *prms = std::sqrt( delta.SumSquare() / nobs);
-   }
-
-   //init polynom
-   for (cit=expset.begin(), j=1; cit != expset.end() ; ++cit, ++j) //loop on exponent tuples
-   {
-      setMonom(*cit, bfit(j));
-   }
-   return true;
-}
-
-
-/**
- * Standard least squares
- * Modified version of LMSfit that uses standard NEWMAT inverse as
- *  alternative to SVD solution.
- */
-bool
-SLSfit(const EXPT_SET&                expset,
-       const std::vector< VAR_TUPLE > obs_input,
-       const std::vector< T >         obs_output,
-       T*                             prms = NULL)
-{
-   //init
-   nullify();
-
-   //check size
-   int nobs = (int)obs_input.size();
-   if (nobs != (int)obs_output.size())
-   {
-      std::cerr<<"ossimPolynom::LMSfit ERROR observation input/output must have the same size"<<std::endl;
-      return false;
-   }
-   if (nobs<=0)
-   {
-      std::cerr<<"ossimPolynom::LMSfit ERROR observation count is zero"<<std::endl;
-      return false;
-   }
-   int ncoeff = (int)expset.size();  
-   if (ncoeff<=0)
-   {
-      std::cerr<<"ossimPolynom::LMSfit ERROR exponent count is zero"<<std::endl;
-      return false;
-   }
-   
-   // M : monom matrix
-   // k : polynomial coefficients
-   // v : output_obs
-   NEWMAT::Matrix M(nobs, ncoeff);
-   double elt;
-   int p;
-   typename EXPT_SET::const_iterator cit;
-   typename std::vector< VAR_TUPLE >::const_iterator oit;
-   int i,j;
-   for (cit=expset.begin(), j=1; cit != expset.end() ; ++cit, ++j) //loop on exponent tuples
-   {
-      for(oit=obs_input.begin(), i=1; oit!=obs_input.end();++oit, ++i) //loop on observations
-      {
-         elt=1.0;
-         for(int d=0;d<DIM;++d)
-         {
-            p = (*cit)[d];
-            if (p != 0)
-            {
-               elt *= std::pow( (*oit)[d], p );
-            }
-         }
-         M(i,j) = elt;
-      }
-   }
-
-   NEWMAT::ColumnVector v(nobs);
-   for(int o=0;o<nobs;++o)
-   {
-      v(o+1) = obs_output[o];
-   }
-
-   //perform solution
-   NEWMAT::ColumnVector bfit = (M.t()*M).i()*M.t()*v;
-
-   //compute RMS (optional, if rms non null)
-   if (prms!=NULL)
-   {
-      NEWMAT::ColumnVector delta = M*bfit - v;
-      *prms = std::sqrt( delta.SumSquare() / nobs);
-   }
-
-   //init polynom
-   for (cit=expset.begin(), j=1; cit != expset.end() ; ++cit, ++j) //loop on exponent tuples
-   {
-      setMonom(*cit, bfit(j));
-   }
-   return true;
-}
-
-protected:
-   /**
-    * protected data members
-    */
-   MONOM_MAP theMonoms; //!associate a scalar to each tuple of orders : monom
-
-   T theEpsilon; //! positive values below epsilon are considered 0 
-
-   /**
-    * method to erase all negligible monoms : user don't need that (automatic)
-    */
-   void
-   discardNullMonoms()
-   {     
-      std::vector< typename MONOM_MAP::iterator > erasev; //storage for iterators on elements to erase
-      for (typename MONOM_MAP::iterator it = theMonoms.begin(); it != theMonoms.end() ; ++it )
-      {
-         if (isNegligible(it->second)) erasev.push_back(it);
-      }
-      //erase all elements afterwards
-      for ( typename std::vector< typename MONOM_MAP::iterator >::const_iterator vit = erasev.begin(); vit != erasev.end() ; ++vit )
-      {
-         theMonoms.erase(*vit); //*vit is  an iterator in theMonoms
-      }      
-   }
-
-   /**
-    * add value without testing for negligible
-    */
-   void 
-   addMonomQuick(const EXP_TUPLE& m, const T& v)
-   {
-      typename MONOM_MAP::iterator it = theMonoms.find(m);
-      if (it != theMonoms.end())
-      {
-         it->second  += v;
-      } else {
-         theMonoms.insert( MONOM_MAP::value_type(m,v));
-      }
-   }
-
-   /** 
-    * invert stolen from ossimRpcSolver
-    */
-   NEWMAT::Matrix 
-   invert(const NEWMAT::Matrix& m)const
-   {
-      ossim_uint32 idx = 0;
-      NEWMAT::DiagonalMatrix d;
-      NEWMAT::Matrix u;
-      NEWMAT::Matrix v;
-
-      // decompose m.t*m which is stored in Temp into the singular values and vectors.
-      //
-      NEWMAT::SVD(m, d, u, v, true, true);
-      
-      // invert the diagonal
-      // this is just doing the reciprical fo all diagonal components and store back int
-      // d.  ths compute d inverse.
-      //
-      for(idx=0; idx < (ossim_uint32)d.Ncols(); ++idx)
-      {
-         if(d[idx] > getEpsilon()) //adpated here for epsilon
-         {
-            d[idx] = 1.0/d[idx];
-         }
-         else
-         {
-            d[idx] = 0.0;
-         }
-      }
-
-      //compute inverse of decomposed m;
-      return v*d*u.t();
-   }
-
-}; //class ossimPolynom
-
-
-
-/**
- * stream operators
- */
-template < class T, int DIM  > std::ostream& 
-operator<<(std::ostream& os, const ossimPolynom<T,DIM>& pt)
-{
-   return pt.print(os);
-}
-
-template < class T, int DIM > std::istream&
-operator>>(std::istream& is, ossimPolynom<T,DIM>& pt)
-{
-   return pt.import(is);
-}
-
-#endif
diff --git a/include/ossim/base/ossimProcessInterface.h b/include/ossim/base/ossimProcessInterface.h
deleted file mode 100644
index 288441b..0000000
--- a/include/ossim/base/ossimProcessInterface.h
+++ /dev/null
@@ -1,86 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimProcessInterface.h 14789 2009-06-29 16:48:14Z dburken $
-#ifndef ossimProcessInterface_HEADER
-#define ossimProcessInterface_HEADER
-#include <iosfwd>
-#include <ossim/base/ossimRtti.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimProcessProgressEvent.h>
-#include <ossim/base/ossimListenerManager.h>
-
-class ossimObject;
-class ossimListenerManager;
-
-class OSSIMDLLEXPORT ossimProcessInterface
-{
-public:
-
-   enum ossimProcessStatus
-   {
-      PROCESS_STATUS_UNKNOWN       = 0,
-      PROCESS_STATUS_EXECUTING     = 1,
-      PROCESS_STATUS_ABORTED       = 2,
-      PROCESS_STATUS_ABORT_REQUEST = 3,
-      PROCESS_STATUS_NOT_EXECUTING = 4
-   };
-   
-   ossimProcessInterface();
-   
-   virtual ~ossimProcessInterface();
-   
-   virtual ossimObject* getObject()=0;
-   virtual const ossimObject* getObject()const=0;
-   virtual bool execute()=0;
-   
-   virtual void abort();
-
-   bool needsAborting()const;
-
-   bool isAbortRequested()const;
-
-   bool isAborted()const;
-
-   bool isExecuting()const;
-
-   ossimProcessStatus getProcessStatus()const;
-
-   virtual void setProcessStatus(ossimProcessStatus processStatus);
-
-   virtual double getPercentComplete()const;
-
-   virtual void setPercentComplete(double percentComplete);
-
-   virtual ossimListenerManager* getManager();
-
-   void enableEvents();
-   
-   void disableEvents();
-
-   void setCurrentMessage(const ossimString& message);
-
-   /*!
-    *  Called by friend operator<< function, derived classes should override
-    *  if something different is desired.
-    */
-   virtual std::ostream& print(std::ostream& out) const;
-   
-   friend std::ostream& operator<<(std::ostream& out,
-                                   const ossimProcessInterface& data);
-   
-protected:
-   double              thePercentComplete;
-   ossimProcessStatus  theProcessStatus;
-   ossimString         theMessage;
-   bool                theEventFlag;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/base/ossimProcessListener.h b/include/ossim/base/ossimProcessListener.h
deleted file mode 100644
index c32504c..0000000
--- a/include/ossim/base/ossimProcessListener.h
+++ /dev/null
@@ -1,29 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-// $Id: ossimProcessListener.h 14799 2009-06-30 08:54:44Z dburken $
-//----------------------------------------------------------------------------
-#ifndef ossimProcessListener_HEADER
-#define ossimProcessListener_HEADER
-#include <ossim/base/ossimListener.h>
-
-class ossimProcessProgressEvent;
-
-class OSSIMDLLEXPORT ossimProcessListener : public ossimListener
-{
-public:
-   ossimProcessListener();
-   virtual ~ossimProcessListener();
-   virtual void processEvent(ossimEvent& event);
-   virtual void processProgressEvent(ossimProcessProgressEvent& event);
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/base/ossimProcessProgressEvent.h b/include/ossim/base/ossimProcessProgressEvent.h
deleted file mode 100644
index 4483f27..0000000
--- a/include/ossim/base/ossimProcessProgressEvent.h
+++ /dev/null
@@ -1,51 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-// Description: Event for process progress.
-//
-// $Id: ossimProcessProgressEvent.h 9094 2006-06-13 19:12:40Z dburken $
-//----------------------------------------------------------------------------
-#ifndef ossimProcessProgressEvent_HEADER
-#define ossimProcessProgressEvent_HEADER
-
-#include <ossim/base/ossimEvent.h>
-#include <ossim/base/ossimString.h>
-
-class OSSIMDLLEXPORT ossimProcessProgressEvent : public ossimEvent
-{
-public:
-   ossimProcessProgressEvent(ossimObject* owner=NULL,
-                             double percentComplete=0.0,
-                             const ossimString message="",
-                             bool outputMessageFlag=false);
-
-   virtual ossimObject* dup()const;
-   
-   double getPercentComplete()const;
-   
-   ossimString getMessage()const;
-
-   void getMessage(ossimString& message)const;
-   
-   void setPercentComplete(double percentComplete);
-   
-   void setMessage(const ossimString& message);
-
-   void setOutputMessageFlag(bool flag);
-
-   bool getOutputMessageFlag() const;
-      
-protected:
-   double      thePercentComplete;
-   ossimString theMessage;
-   bool        theOutputMessageFlag;
-
-TYPE_DATA
-};
-#endif
diff --git a/include/ossim/base/ossimPropertyInterface.h b/include/ossim/base/ossimPropertyInterface.h
deleted file mode 100644
index 97b1234..0000000
--- a/include/ossim/base/ossimPropertyInterface.h
+++ /dev/null
@@ -1,41 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// LICENSE: LGPL see top level license.txt
-//
-// Author: Garrett Potts (gpotts at imagelinks)
-//
-//*************************************************************************
-// $Id: ossimPropertyInterface.h 12989 2008-06-04 17:05:41Z gpotts $
-#ifndef ossimPropertyInterface_HEADER
-#define ossimPropertyInterface_HEADER
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimProperty.h>
-
-
-class OSSIM_DLL ossimPropertyInterface
-{
-public:
-   ossimPropertyInterface()
-      {}
-   
-   virtual ~ossimPropertyInterface()
-      {}
-
-   virtual void setProperty(const ossimString& name,
-                            const ossimString& value);
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const; 
-	virtual ossimString getPropertyValueAsString(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   void getPropertyList(std::vector<ossimRefPtr<ossimProperty> >& propertyList)const;
-   void setProperties(std::vector<ossimRefPtr<ossimProperty> >& propertyList);
-   
-protected:
-   
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/base/ossimRectanglePartitioner.h b/include/ossim/base/ossimRectanglePartitioner.h
deleted file mode 100644
index 321befc..0000000
--- a/include/ossim/base/ossimRectanglePartitioner.h
+++ /dev/null
@@ -1,147 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (C) 2004 David Burken, all rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-// Utility class to partition up a rectangle.
-//
-// $Id: ossimRectanglePartitioner.h 9094 2006-06-13 19:12:40Z dburken $
-//----------------------------------------------------------------------------
-#ifndef ossimRectanglePartitioner_HEADER
-#define ossimRectanglePartitioner_HEADER
-
-#include <ossim/base/ossimConstants.h>
-#include <vector>
-
-class ossimIrect;
-
-/**
- * class ossimRectanglePartitioner
- * Utility class to partition up a rectangle.
- */
-class OSSIMDLLEXPORT ossimRectanglePartitioner
-{
-public:
-
-   /** default construtor */
-   ossimRectanglePartitioner();
-
-   /** destructor */
-   ~ossimRectanglePartitioner();
-
-   /**
-    * Partitions the rectangle doing a binary split on the longest dimension
-    * until the total size is less than or equal to the "maxSizeInBytes".
-    * Initializes "result" with the resulting rectangles starting at the
-    * upper left corner.
-    *
-    * @param inputRectangle The source rectangle usually the bounding rectangle
-    * of a scene.
-    *
-    * @param result The vector of ossimIrects to hold the result.
-    *
-    * @param maxSizeInBytes Maximum size of the resulting rectangle partitions
-    * in bytes.
-    *
-    * @param bands The number of bands in the image.
-    *
-    * @param bytesPerPixel.  The number of bytes per pixel for a single band.
-    *
-    * @param internalOverlapPixels Overlap in pixels for desired partitions.
-    * (default = 0) This is added to all four sides of the rectangle so 
-    *
-    * @note The result rectangle passed in will be cleared for starters.
-    *
-    * @note Edge rectangles will be clipped to the inputRectangle.
-    */
-   void binaryPartition(const ossimIrect& inputRectangle,
-                        std::vector<ossimIrect>& result,
-                        ossim_uint64 maxSizeInBytes,
-                        ossim_uint32 bands,
-                        ossim_uint32 bytesPerPixel,
-                        ossim_uint32 internalOverlapPixels = 0) const;
-
-private:
-
-   /**
-    * Recursively splits the input rectangle until the size is less than
-    * or equal to maxSizeInBytes.
-    * 
-    * @param rect Input rectangle to split.
-    *
-    * @param maxSizeInBytes Maximum size of the resulting rectangle partitions
-    * in bytes.
-    *
-    * @param bands The number of bands in the image.
-    *
-    * @param bytesPerPixel.  The number of bytes per pixel for a single band.
-    *
-    * @param internalOverlapPixels Overlap in pixels for desired partitions.
-    * (default = 0)
-    *
-    * @note Will split the longest dimension.  If square will split in the
-    * lengthwise direction.
-    */
-   void splitUntilLessThanMax(ossimIrect& rect,
-                              ossim_uint64 maxSizeInBytes,
-                              ossim_uint32 bands,
-                              ossim_uint32 bytesPerPixel,
-                              ossim_uint32 internalOverlapPixels = 0) const;
-
-   /**
-    * Splits rectangle in half rounding up if needed.
-    *
-    * @param input Rectangle to split.
-    *
-    * @note output will be a zero base rect.
-    *
-    * @notes Will split the longest dimension.  If square will split in the
-    * lengthwise direction.
-    */
-   void splitRect(ossimIrect& rect) const;
-
-   /**
-    * @param rect Rectangle to give size for in bytes.
-    *
-    * @param bands The number of bands in the image.
-    *
-    * @param bytesPerPixel.  The number of bytes per pixel for a single band.
-    *
-    * @param internalOverlapPixels Overlap in pixels.
-    * (default = 0)
-    * 
-    * @return size of rectangle in bytes.
-    */
-   ossim_uint64 getSize(const ossimIrect& rect,
-                        ossim_uint32 bands,
-                        ossim_uint32 bytesPerPixel,
-                        ossim_uint32 internalOverlapPixels = 0) const;
-
-   /**
-    * Convenience trace method.
-    *
-    * @param r Input rectangle.
-    *
-    * @param v Vector of resulting partitioned rectangles.
-    *
-    * @param maxSizeInBytes Maximum size of the resulting rectangle partitions
-    * in bytes.
-    *
-    * @param bands The number of bands in the image.
-    *
-    * @param bytesPerPixel.  The number of bytes per pixel for a single band.
-    */
-   void trace(const ossimIrect& r,
-              const std::vector<ossimIrect>& v,
-              ossim_uint64 maxSizeInBytes,
-              ossim_uint32 bands,
-              ossim_uint32 bytesPerPixel) const;
-   
-};
-
-#endif /* End of "#ifndef ossimRectanglePartitioner_HEADER" */
diff --git a/include/ossim/base/ossimRectilinearDataObject.h b/include/ossim/base/ossimRectilinearDataObject.h
deleted file mode 100644
index da3fb0c..0000000
--- a/include/ossim/base/ossimRectilinearDataObject.h
+++ /dev/null
@@ -1,150 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimRectilinearDataObject.h 19931 2011-08-10 11:53:25Z gpotts $
-#ifndef ossimRectilinearDataObject_HEADER
-#define ossimRectilinearDataObject_HEADER
-#include <ossim/base/ossimDataObject.h>
-
-class OSSIMDLLEXPORT ossimRectilinearDataObject : public ossimDataObject
-{
-public:
-
-   /** default constructor */
-   ossimRectilinearDataObject();
-
-   ossimRectilinearDataObject(const ossimRectilinearDataObject&rhs);
-      
-   ossimRectilinearDataObject(ossim_uint32 numberOfSpatialComponents,
-                              ossimSource* owner,
-                              ossim_uint32 numberOfDataComponents,
-                              ossimScalarType scalarType=OSSIM_SCALAR_UNKNOWN,
-                              ossimDataObjectStatus status=OSSIM_NULL);
-   
-   /**
-    * This is a helper constructor that allows one to instantiate a one
-    * dimensional Spatial component with N number of data components.
-    * It will internally allocate theSpatialExtent to 1 and set the
-    * contents equal to the value passed in to length.
-    */
-   ossimRectilinearDataObject(ossimSource* owner,
-                              ossim_uint32 numberOfDataComponents,
-                              ossim_uint32 length,
-                              ossimScalarType scalarType=OSSIM_SCALAR_UNKNOWN,
-                              ossimDataObjectStatus status=OSSIM_NULL);
-
-   /**
-    * This is a helper constructor that allows one to instantiate a two
-    * dimensional Spatial component (WidthxHeight) with N number of
-    * data components.  It will internally allocate theSpatialExtent
-    * to 2 and set the contents equal to the value passed in to width, and
-    * height.
-    */
-   ossimRectilinearDataObject(ossimSource* owner,
-                              ossim_uint32 numberOfDataComponents,
-                              ossim_uint32 width,
-                              ossim_uint32 height,
-                              ossimScalarType scalarType=OSSIM_SCALAR_UNKNOWN,
-                              ossimDataObjectStatus status=OSSIM_NULL);
-
-   /**
-    * This is a helper constructor that allows one to instantiate a two
-    * dimensional Spatial component (WidthxHeightxDepth) with N number of
-    * data components.  It will internally allocate theSpatialExtent
-    * to 3 and set the contents equal to the value passed in to width,
-    * height, and depth.
-    */
-   ossimRectilinearDataObject(ossimSource* owner,
-                              ossim_uint32 numberOfDataComponents,
-                              ossim_uint32 width,
-                              ossim_uint32 height,
-                              ossim_uint32 depth,
-                              ossimScalarType   scalarType=OSSIM_SCALAR_UNKNOWN,
-                              ossimDataObjectStatus status=OSSIM_NULL);
-   
-
-   virtual ~ossimRectilinearDataObject();
-   /**
-    * How many components make up this data object.  For
-    * example:  If this were an RGB image data object then
-    * the number of components would be set to 3 and the
-    * RGB would be seen as a single data object being
-    * passed through.
-    */
-   virtual void setNumberOfDataComponents(ossim_uint32 n);
-   
-   virtual void setSpatialExtents(ossim_uint32* extents, ossim_uint32  size);
-
-   /**
-    *  See ossimScalarType in ossimConstants for a full list
-    *
-    *  OSSIM_SCALAR_UNKNOWN
-    *  OSSIM_UCHAR          Unsigned char
-    *  OSSIM_USHORT16       16bit unsigned short
-    *  OSSIM_SSHORT16       16bit signed short
-    *  OSSIM_USHORT11       11bit unsigned short
-    *  OSSIM_FLOAT          float
-    *  OSSIM_NORMALIZED_DOUBLE normalized 0 to 1 data
-    */
-   virtual void setScalarType(ossimScalarType type);
-
-   virtual ossim_uint32 getNumberOfDataComponents() const;
-
-   virtual ossim_uint32 getNumberOfSpatialComponents() const;
-
-   virtual const ossim_uint32* getSpatialExtents() const;
-
-   virtual ossimScalarType getScalarType() const;
-
-   virtual ossim_uint32 getScalarSizeInBytes()const;
-
-   virtual void*   getBuf();
-
-   virtual const void* getBuf() const;
-
-   virtual void assign(const ossimRectilinearDataObject* data);
-
-   /**
-    *  Calls deInitialize() which deletes theDataBuffer and sets object status
-    *  to OSSIM_NULL, then initializes theDataBuffer.
-    *
-    *  @see deInitialize
-    *  
-    *  @note This method is destructive in that if the buffer existed of
-    *  the correct size it will delete it, then reallocate.
-    */
-   virtual void initialize();
-
-   virtual ossim_uint32 computeSpatialProduct()const;
-
-   virtual ossim_uint32 getDataSizeInBytes()const;
-
-   virtual std::ostream& print(std::ostream& out) const;
-
-   /**
-    * @brief assignment operator=
-    * @param rhs The data to assign from.
-    * @param A reference to this object.
-    */
-   virtual const ossimRectilinearDataObject& operator=(
-      const ossimRectilinearDataObject& rhs);
-
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-
-protected:
-   ossim_uint32              m_numberOfDataComponents;
-   ossimScalarType           m_scalarType;
-   std::vector<ossim_uint8>  m_dataBuffer;
-   std::vector<ossim_uint32> m_spatialExtents;
-   
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/base/ossimRefPtr.h b/include/ossim/base/ossimRefPtr.h
deleted file mode 100644
index 4269b60..0000000
--- a/include/ossim/base/ossimRefPtr.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*-c++-*- ossim - Copyright (C) since 2004 Garrett Potts 
- *
- * This was taken directly from OpenSceneGraph and will retain OSGGPL license.
- * This is basically an LGPL.
- * 
-*/
-#ifndef ossimRefPtr_HEADER
-#define ossimRefPtr_HEADER
-#include <ossim/base/ossimConstants.h>
-
-template<class T> class ossimRefPtr
-{
- public:
-   typedef T element_type;
-   
-   ossimRefPtr() :m_ptr(0) {}
-   ossimRefPtr(T* t):m_ptr(t)              { if (m_ptr) m_ptr->ref(); }
-   ossimRefPtr(const ossimRefPtr& rp):m_ptr(rp.m_ptr)  { if (m_ptr) m_ptr->ref(); }
-   ~ossimRefPtr()                           { if (m_ptr) m_ptr->unref(); m_ptr=0; }
-   
-   inline ossimRefPtr& operator = (const ossimRefPtr& rp)
-      {
-         if (m_ptr==rp.m_ptr) return *this;
-         T* tmpPtr = m_ptr;
-         m_ptr = rp.m_ptr;
-         if (m_ptr) m_ptr->ref();
-         // unref second to prevent any deletion of any object which might
-         // be referenced by the other object. i.e rp is child of the
-         // original _ptr.
-         if (tmpPtr) tmpPtr->unref();
-         return *this;
-      }
-   
-   inline ossimRefPtr& operator = (T* ptr)
-      {
-         if (m_ptr==ptr) return *this;
-         T* tmpPtr = m_ptr;
-         m_ptr = ptr;
-         if (m_ptr) m_ptr->ref();
-         // unref second to prevent any deletion of any object which might
-         // be referenced by the other object. i.e rp is child of the
-         // original m_ptr.
-         if (tmpPtr) tmpPtr->unref();
-         return *this;
-      }
-   
-   // comparison operators for ossimRefPtr.
-   inline bool operator == (const ossimRefPtr& rp) const { return (m_ptr==rp.m_ptr); }
-   inline bool operator != (const ossimRefPtr& rp) const { return (m_ptr!=rp.m_ptr); }
-   inline bool operator < (const ossimRefPtr& rp) const { return (m_ptr<rp.m_ptr); }
-   inline bool operator > (const ossimRefPtr& rp) const { return (m_ptr>rp.m_ptr); }
-   
-   // comparion operator for const T*.
-   inline bool operator == (const T* ptr) const { return (m_ptr==ptr); }
-   inline bool operator != (const T* ptr) const { return (m_ptr!=ptr); }
-   inline bool operator < (const T* ptr) const { return (m_ptr<ptr); }
-   inline bool operator > (const T* ptr) const { return (m_ptr>ptr); }
-   
-   inline T& operator*()  { return *m_ptr; }
-   
-   inline const T& operator*() const { return *m_ptr; }
-   
-   inline T* operator->() { return m_ptr; }
-   
-   inline const T* operator->() const   { return m_ptr; }
-   
-   inline bool operator!() const	{ return m_ptr==0L; }
-   
-   inline bool valid() const	{ return m_ptr!=0L; }
-   
-   inline T* get() { return m_ptr; }
-   
-   inline const T* get() const { return m_ptr; }
-   
-   /** take control over the object pointed to by ref_ptr, unreference but do not delete even if ref count goes to 0,
-    * return the pointer to the object.
-    * Note, do not use this unless you are 100% sure your code handles the deletion of the object correctly, and
-    * only use when absolutely required.*/
-   inline T* take() { return release();}
-   
-   inline T* release() { T* tmp=m_ptr; if (m_ptr) m_ptr->unref_nodelete(); m_ptr=0; return tmp;}
-   
- private:
-   T* m_ptr;
-};
-
-#endif
diff --git a/include/ossim/base/ossimReferenced.h b/include/ossim/base/ossimReferenced.h
deleted file mode 100644
index db20a80..0000000
--- a/include/ossim/base/ossimReferenced.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*-c++-*- libossim - Copyright (C) since 2004 Garrett Potts 
- * LICENSE: LGPL
- * Author: Garrett Potts
-*/
-#ifndef ossimReferenced_HEADER
-#define ossimReferenced_HEADER
-#include <ossim/base/ossimConstants.h>
-#include <OpenThreads/ScopedLock>
-#include <OpenThreads/Mutex>
-
-class OSSIMDLLEXPORT ossimReferenced
-{
- public:
-   ossimReferenced()
-   : theRefMutex(new OpenThreads::Mutex),
-     theRefCount(0)
-      {}
-   
-   ossimReferenced(const ossimReferenced&)
-   : theRefMutex(new OpenThreads::Mutex),
-   theRefCount(0)
-   {}
-   inline ossimReferenced& operator = (const ossimReferenced&) { return *this; }
-   
-
-   /*! increment the reference count by one, indicating that 
-       this object has another pointer which is referencing it.*/
-   inline void ref() const;
-   
-   /*! decrement the reference count by one, indicating that 
-       a pointer to this object is referencing it.  If the
-       reference count goes to zero, it is assumed that this object
-       is no longer referenced and is automatically deleted.*/
-   inline void unref() const;
-   
-   /*! decrement the reference count by one, indicating that 
-       a pointer to this object is referencing it.  However, do
-       not delete it, even if ref count goes to 0.  Warning, unref_nodelete() 
-       should only be called if the user knows exactly who will
-       be resonsible for, one should prefer unref() over unref_nodelete() 
-       as the later can lead to memory leaks.*/
-   inline void unref_nodelete() const 
-   { 
-      if (theRefMutex)
-      {
-         OpenThreads::ScopedLock<OpenThreads::Mutex> lock(*theRefMutex); 
-         --theRefCount;
-      }
-      else
-      {
-         --theRefCount;
-      }
-   }
-   
-   /*! return the number pointers currently referencing this object. */
-   inline int referenceCount() const { return theRefCount; }
-   
-   
- protected:
-   virtual ~ossimReferenced();
-   mutable OpenThreads::Mutex*     theRefMutex;
-   mutable int theRefCount;
-};
-
-inline void ossimReferenced::ref() const
-{
-   if (theRefMutex)
-   {
-      OpenThreads::ScopedLock<OpenThreads::Mutex> lock(*theRefMutex); 
-      ++theRefCount;
-   }
-   else
-   {
-      ++theRefCount;
-   }
-}
-
-inline void ossimReferenced::unref() const
-{
-   bool needDelete = false;
-   if (theRefMutex)
-   {
-      OpenThreads::ScopedLock<OpenThreads::Mutex> lock(*theRefMutex); 
-      --theRefCount;
-      needDelete = theRefCount<=0;
-   }
-   else
-   {
-      --theRefCount;
-      needDelete = theRefCount<=0;
-   }
-   
-   if (needDelete)
-   {
-      delete this;
-   }
-   
-#if 0
-    --theRefCount;
-    if (theRefCount==0)
-    {
-        delete this;
-    }
-#endif
-}
-
-#endif
diff --git a/include/ossim/base/ossimRegExp.h b/include/ossim/base/ossimRegExp.h
deleted file mode 100644
index ad769c5..0000000
--- a/include/ossim/base/ossimRegExp.h
+++ /dev/null
@@ -1,227 +0,0 @@
-//
-// Copyright (C) 1991 Texas Instruments Incorporated.
-//
-// Permission is granted to any individual or institution to use, copy, modify,
-// and distribute this software, provided that this complete copyright and
-// permission notice is maintained, intact, in all copies and supporting
-// documentation.
-//
-// Texas Instruments Incorporated provides this software "as is" without
-// express or implied warranty.
-//
-// .NAME CoolRegExp - Pattern matching with regular expressions.
-// .LIBRARY cool
-// .HEADER String Classes
-// .INCLUDE cool/RegExp.h
-// .FILE cool/RegExp.C
-// .FILE cool/RegExp.h
-// .EXAMPLE examples/ex_RegExp.C
-//
-//
-// .SECTION Description
-//  A regular expression allows a programmer to specify  complex
-//  patterns  that  can  be searched for and matched against the
-//  character string of a string object. In its simplest form, a
-//  regular  expression  is  a  sequence  of  characters used to
-//  search for exact character matches. However, many times  the
-//  exact  sequence to be found is not known, or only a match at
-//  the beginning or end of a string is desired. The cool  regu-
-//  lar  expression  class implements regular expression pattern
-//  matching as is found and implemented in many  UNIX  commands
-//  and utilities.
-//
-//  The regular expression class provides a convenient mechanism
-//  for  specifying  and  manipulating  regular expressions. The
-//  regular expression object allows specification of such  pat-
-//  terns  by using the following regular expression metacharac-
-//  ters:
-// 
-//   ^        Matches at beginning of a line
-//
-//   $        Matches at end of a line
-//
-//  .         Matches any single character
-//
-//  [ ]       Matches any character(s) inside the brackets
-//
-//  [^ ]      Matches any character(s) not inside the brackets
-//
-//   -        Matches any character in range on either side of a dash
-//
-//   *        Matches preceding pattern zero or more times
-//
-//   +        Matches preceding pattern one or more times
-//
-//   ?        Matches preceding pattern zero or once only
-//
-//  ()        Saves a matched expression and uses it in a  later match
-// 
-//  Note that more than one of these metacharacters can be  used
-//  in  a  single  regular expression in order to create complex
-//  search patterns. For example, the pattern [^ab1-9]  says  to
-//  match  any  character  sequence that does not begin with the
-//  characters "ab"  followed  by  numbers  in  the  series  one
-//  through nine.
- 
-
-#ifndef ossimRegExph
-#define ossimRegExph
-
-#include <ossim/base/ossimString.h>
-
-const int NSUBEXP = 10;
-
-
-class OSSIMDLLEXPORT ossimRegExp {
-public:
-  inline ossimRegExp ();			// ossimRegExp with program=NULL
-  inline ossimRegExp (const char*);	// ossimRegExp with compiled char*
-  ossimRegExp (const ossimRegExp&);	// Copy constructor
-  inline ~ossimRegExp();			// Destructor 
-
-  void compile (const char*);		// Compiles char* --> regexp
-  bool find (const char*);		// true if regexp in char* arg
-  inline ossim_uint32 start() const;	// Index to start of first find
-  inline ossim_uint32 end() const;	// Index to end of first find
-
-  bool operator== (const ossimRegExp&) const;	// Equality operator
-  inline bool operator!= (const ossimRegExp&) const; // Inequality operator
-  bool deep_equal (const ossimRegExp&) const;	// Same regexp and state?
-  
-  inline bool is_valid() const;		// true if compiled regexp
-  inline void set_invalid();		// Invalidates regexp
-
-  // awf added
-  ossim_uint32 start(ossim_uint32 n) const;
-  ossim_uint32 end(ossim_uint32 n) const;
-  std::string match(ossim_uint32 n) const;
-  
-private: 
-  const char* startp[NSUBEXP];
-  const char* endp[NSUBEXP];
-  char  regstart;			// Internal use only
-  char  reganch;			// Internal use only
-  const char* regmust;			// Internal use only
-  ossim_uint32 regmlen;			// Internal use only
-  char* program;   
-  ossim_uint32 progsize;
-  const char* searchstring;
-
- // work variables
-  mutable const char* regparse;
-  mutable int   regnpar;	// () count.
-  mutable char  regdummy;
-  mutable char* regcode;	// Code-emit pointer; &regdummy = don't.
-  mutable long  regsize;	// Code size.
-  const char*  reginput;	// String-input pointer.
-  const char*  regbol;	// Beginning of input, for ^ check.
-  const char* *regstartp;	// Pointer to startp array.
-  const char* *regendp;	// Ditto for endp.
-
-  char* reg (int, int*);
-  char* regbranch (int*);
-  char* regpiece (int*);
-  char* regatom (int*);
-  char* regnode (char);
-  const char* regnext (register const char*);
-  char* regnext (register char*);
-  void        regc (unsigned char);
-  void        reginsert (char, char*);
-  void        regtail (char*, const char*);
-  void        regoptail (char*, const char*);
-  int regtry (const char*, const char* *,
-              const char* *, const char*);
-  int regmatch (const char*);
-  int regrepeat (const char*);
-#ifdef STRCSPN
-  int strcspn ();
-#endif
-  
-}; 
-
-// ossimRegExp -- Creates an empty regular expression.
-
-inline ossimRegExp::ossimRegExp () { 
-  this->program = NULL;
-}
-
-
-// ossimRegExp -- Creates a regular expression from string s, and
-// compiles s.
-
-
-inline ossimRegExp::ossimRegExp (const char* s) {  
-  this->program = NULL;
-  compile(s);
-}
-
-// ~ossimRegExp -- Frees space allocated for regular expression.
-
-inline ossimRegExp::~ossimRegExp () {
-//#ifndef WIN32
-   if(program)
-   {
-      delete [] this->program;
-      this->program = 0;
-   }
-//#endif
-}
-
-// Start -- 
-
-inline ossim_uint32 ossimRegExp::start () const {
-  return(this->startp[0] - searchstring);
-}
-
-
-// End -- Returns the start/end index of the last item found.
-
-
-inline ossim_uint32 ossimRegExp::end () const {
-  return(this->endp[0] - searchstring);
-}
-
-
-// operator!= //
-
-inline bool ossimRegExp::operator!= (const ossimRegExp& r) const {
-  return(!(*this == r));
-}
-
-
-// is_valid -- Returns true if a valid regular expression is compiled
-// and ready for pattern matching.
-
-inline bool ossimRegExp::is_valid () const {
-  return (this->program != NULL);
-}
-
-
-// set_invalid -- Invalidates regular expression.
-
-inline void ossimRegExp::set_invalid () {
-//#ifndef WIN32
-  delete [] this->program;
-//#endif
-  this->program = NULL;
-}
-
-// -- Return start index of nth submatch. start(0) is the start of the full match.
-inline ossim_uint32 ossimRegExp::start(ossim_uint32 n) const
-{
-  return this->startp[n] - searchstring;
-}
-
-// -- Return end index of nth submatch. end(0) is the end of the full match.
-inline ossim_uint32 ossimRegExp::end(ossim_uint32 n) const
-{
-  return this->endp[n] - searchstring;
-}
-
-// -- Return nth submatch as a string.
-inline std::string ossimRegExp::match(ossim_uint32 n) const
-{
-	return std::string(this->startp[n], this->endp[n] - this->startp[n]);
-}
-
-#endif // CoolRegExph
diff --git a/include/ossim/base/ossimRgbVector.h b/include/ossim/base/ossimRgbVector.h
deleted file mode 100644
index 8852887..0000000
--- a/include/ossim/base/ossimRgbVector.h
+++ /dev/null
@@ -1,109 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author: Garrett Potts
-// Description:
-//
-//*************************************************************************
-// $Id: ossimRgbVector.h 14789 2009-06-29 16:48:14Z dburken $
-#ifndef ossimRgbVector_HEADER
-#define ossimRgbVector_HEADER
-#include <iostream>
-using namespace std;
-#include <ossim/base/ossimConstants.h>
-
-class ossimJpegYCbCrVector;
-class ossimHsiVector;
-class ossimHsvVector;
-class ossimCmyVector;
-
-class OSSIMDLLEXPORT ossimRgbVector
-{
-public:
-   friend ostream& operator <<(ostream& out, const ossimRgbVector& data)
-      {
-         out << "<" << (long)data.theBuf[0] << ", "
-             << (long)data.theBuf[1] << ", "
-             << (long)data.theBuf[2] << ">";
-
-         return out;
-      }
-   ossimRgbVector(unsigned char r=0, unsigned char g=0, unsigned char b=0)
-      {
-         theBuf[0] = r;
-         theBuf[1] = g;
-         theBuf[2] = b;
-      }
-   ossimRgbVector(unsigned char grey)
-      {
-         theBuf[0] = grey;
-         theBuf[1] = grey;
-         theBuf[2] = grey;
-      }
-   ossimRgbVector(unsigned char colorData[3])
-      {
-         theBuf[0] = colorData[0];
-         theBuf[1] = colorData[1];
-         theBuf[2] = colorData[2];
-      }
-
-   ossimRgbVector(const ossimJpegYCbCrVector& YCbCr);
-   ossimRgbVector(const ossimHsiVector& hsi);
-   ossimRgbVector(const ossimHsvVector& hsv);
-   ossimRgbVector(const ossimCmyVector& cmy);
-
-   ossimRgbVector operator -(const ossimRgbVector& rgb)const
-      {
-         return ossimRgbVector((unsigned char)clamp((long)theBuf[0] - (long)rgb.theBuf[0]),
-                               (unsigned char)clamp((long)theBuf[1] - (long)rgb.theBuf[1]),
-                               (unsigned char)clamp((long)theBuf[2] - (long)rgb.theBuf[2]));
-      }
-
-   ossimRgbVector operator +(const ossimRgbVector& rgb)const
-      {
-         return ossimRgbVector((unsigned char)clamp((long)theBuf[0] + (long)rgb.theBuf[0]),
-                               (unsigned char)clamp((long)theBuf[1] + (long)rgb.theBuf[1]),
-                               (unsigned char)clamp((long)theBuf[2] + (long)rgb.theBuf[2]));
-      }
-   ossimRgbVector operator *(double t)const
-      {
-         return ossimRgbVector((unsigned char)clamp((long)(theBuf[0]*t)),
-                               (unsigned char)clamp((long)(theBuf[1]*t)),
-                               (unsigned char)clamp((long)(theBuf[2]*t)));
-      }
-   const ossimRgbVector& operator =(const ossimJpegYCbCrVector& data);
-   const ossimRgbVector& operator =(const ossimHsiVector& hsi);
-   const ossimRgbVector& operator =(const ossimHsvVector& hsv);
-   const ossimRgbVector& operator =(const ossimCmyVector& cmy);
-   bool operator ==(const ossimRgbVector& rgb)
-      {
-         return ( (rgb.theBuf[0] == theBuf[0])&&
-                  (rgb.theBuf[1] == theBuf[1])&&
-                  (rgb.theBuf[2] == theBuf[2]));
-      }
-   bool operator !=(const ossimRgbVector& rgb)
-      {
-         return ( (rgb.theBuf[0] != theBuf[0])||
-                  (rgb.theBuf[1] != theBuf[1])||
-                  (rgb.theBuf[2] != theBuf[2]));
-      }
-   static long clamp(long colorValue, unsigned char min=0, unsigned char max=255)
-      {
-         colorValue = colorValue > (long)max? (long)max:colorValue;
-         colorValue = colorValue < (long)min? (long)min:colorValue;
-         
-         return colorValue;
-      }
-   unsigned char getR() const { return theBuf[0]; }
-   unsigned char getG()const  { return theBuf[1]; }
-   unsigned char getB()const  { return theBuf[2]; }
-   void setR(unsigned char  R) { theBuf[0] = R; }
-   void setG(unsigned char G)  { theBuf[1] = G; }
-   void setB(unsigned char B)  { theBuf[2] = B; }
-   
-protected:
-   unsigned char theBuf[3];
-};
-
-#endif
diff --git a/include/ossim/base/ossimRtti.h b/include/ossim/base/ossimRtti.h
deleted file mode 100644
index 19259ba..0000000
--- a/include/ossim/base/ossimRtti.h
+++ /dev/null
@@ -1,506 +0,0 @@
-#ifndef RTTI_H
-#define RTTI_H
-
-/////////////////////////////////////////////////////////////////////////////////////////
-/* 
-   RTTI_H:	This file provides support for RTTI and generalized (virtual-base to derived and 
-		separate hierarchy branches) casting. There is also support for RT obj creation
-	  	from type names.
-
-		In order to enable these features for a class, two things should be done:
-
-		1)	insert the text TYPE_DATA (without ';') as the last item in the class-decl.
-		2)	in the .C file where the class's implementation resides, insert the following (without';'):
-		
-			RTTI_DEF(classname,"RT classname")	     if the class has no bases with RTTI
- 			RTTI_DEFn(classname,"RT classname",b1,...bn) if the class has bases b1,...bn with RTTI
-
-			Use RTTI_DEF_INST instead of RTTI_DEF if you want to enable RT obj creation for classname.
-			You should provide then a public default ctor.
-			
-   RTTI is used via a class called RTTItypeid. A typeid describes a type of a class. typeids can be compared
-   with operator== and operator!= and can be retrieved from classes/pointers. They should provide all necessary 
-   support for any kind of RTTI/casting, as described by the macros below (by RTTI-class we mean a class having RTTI,
-   as described above). The 'return type' of the macros is listed between quotes:
-
-   'RTTItypeid'
-   STATIC_TYPE_INFO(T)		T=RTTI-class name. Returns a RTTItypeid with T's type. if T hasn't RTTI, a 
-				compile-time error occurs.
-   'RTTItypeid'
-   TYPE_INFO(p)		        p=ptr to a RTTI-class.  
-				Returns the RTTItypeid of the class-obj p is really pointing at. 
-			        If *p hasn't RTTI, a compile-time error occurs.	
-				If p==NULL, a special typeid for the NULL pointer is returned. 
-				This typeid has the name (const char*) "NULL".  
-   'T*'
-   PTR_CAST(T,p)		T=RTTI-class, p=RTTI-class ptr.
-				Returns p cast to the type T as a T*, if cast is possible, else
-				returns NULL. If *p or T have no RTTI, a compile-time error occurs.
-				Note that p can point to virtual base classes. Casting between separate
-				branches of a class hierarchy is also supported, as long as all classes
-				have RTTI. Therefore PTR_CAST is a fully general and safe operator.
-				If p==NULL, the operator returns NULL.
-
-   Some other macros. Not essential, provided mostly for convenience:
-   =================
-   const char*
-   STATIC_TYPE_NAME(T)		T=RTTI-class name. Returns the name (const char*) of T's type.
-				Provided for convenience. Compile-time error if T hasn't RTTI.
-   const char*
-   TYPE_NAME(p)			p=RTTI-class ptr. Returns the class name (char*) of real *p.
-				Provided for convenience.  Compile-time error if *p hasn't RTTI.
-   int				If p==NULL, "NULL" is returned.
-   DYN_CAST(t,p)		t=RTTItypeid. p=RTTI-class ptr.
-				Returns 1 if p can indeed be cast to t, else returns 0.
-				Compile-time error if *p hasn't RTTI.
-				If p==NULL, 1 is returned (NULL can be cast to anything).
-				This operator is useful when we just want to check that a pointer can be cast to
-				a RTTItypeid variable (which can be created/selected at run-time). For creating a RTTItypeid, 
-				construct a subclass of RTTItypeid called RTTIdyntypeid which allows construction from a const char*, i.e. from
-				a user specification and pass it to DYN_CAST.
-				DYN_TYPE can't return a typed pointer (since t is a RTTItypeid var and C++ has no 'real' type variables), 
-				but returns a 1/0 indicating whether the cast is possible or not. 
-   void*
-   UPTR_CAST(t,p)		t=RTTItypeid. p=RTTI-class ptr.
-				Returns p cast to a void* if cast succeeds, else returns NULL.
-				Again, p can point to virtual-bases and casts between separate branches of a class dag
-				are supported. this operator is practically the 'untyped' version of PTR_CAST, offering
-				the extra feature that the type is expressed by a run-time type variable (RTTItypeid).
-				Compile-time error if *p hasn't RTTI.
-
-  
-  Obsolete macros:		This set of macros is based on Stroustrup. They are not general and safe 
-  ===============		(e.g. virtual-base to derived casts are trapped as compile-time errors and casts
-				between separate class-dag branches are incorrectly done without any warnings). 
-				The above macros are including ALL functionality of these macros, which are
-				provided only for completeness:
-
-  OLD_PTR_CAST(T,p)		Like PTR_CAST(T,p), but without accepting p=ptr to virtual bases and performing
-				incorrect casts between separate branches of a class-dag.
-  OLD_UPTR_CAST(t,p)		Like UPTR_CAST(t,p), but with same problems as above.
-  OLD_DYN_CAST(t,p)		Like DYN_CAST(t,p), but with same problems as above.
- 
-
-  RT Object Creation:		This feature enables the user to create objects of a RT-selected type in a generic manner.
-  ==================		Typically, we create/obtain a RT type (via a RTTItypeid t1). Then, having another RTTItypeid t2
-				(typically from the (STATIC_)TYPE_INFO of some ROOT class / ROOT* ptr, we call:
-
-				ROOT* new_obj = (ROOT*)t2.create(t1);
-
-				create() searches for t1 in the class DAG rooted at t2. If found, it creates a new obj of type 
-				t1 and returns it as a '(void*)(t2*)'. For example, we know above that we get a ROOT* since
-				t2 is ROOT's RTTItypeid, so we can _safely_ cast the void* to ROOT. If create() can't make the t1
-				object (there's no such type or the type is not declared via RTTI_DEF_INST), it returns NULL.
-				This gives a fully generic typeid-based factory method for RT obj creation.
-
-  REMARK:	RTTI support adds some additional info, both static+virtual, to a class. The current implementation
-  =======	adds a static object and some static functions and 2 virtual functions to each class desiring RTTI.
-		This may of course cause potential name-clash problems. In order to avoid this, all added identifiers
-		in the RTTI system are prefixed with RTTI_ (see the TYPE_DATA macro).
-  
-  REMARK_2:	There are two classes related to RTTI: RTTItypeid and RTTITypeinfo. A RTTItypeid is, as it says, an 'id for a type'
-  ========	It actually wraps a RTTITypeinfo*, where a RTTITypeinfo contains the actual encoding of a class type.
-		You can freely create/copy/destroy/manipulate RTTItypeid's, but you should NEVER deal directly
-		with RTTITypeinfo. A RTTITypeinfo should actually be created ONLY by the TYPE_DATA macros, as part of a class definition,
-		since the RTTITypeinfo encodes a type info for an EXISTING class. All type-related stuff should be therefore
-		handled via RTTItypeid's. If you really want to dynamically create a dummy typeid, use RTTIdyntypeid class.
-
-  REMARK 3:	All names introduced by this RTTI implementation (RTTItypeid,RTTIdyntypeid,RTTITypeinfo,etc)
-  =========	are prefixed by RTTI, to make this system easily acceptable by e.g. C++ environments which happen to 
-	 	already support typeids.
-
-*/				
-
-	
-//////////////////////////////////////////////////////////////
-
-#include <cstring> // for strdup,strcmp
-#include <ossim/base/ossimConstants.h>
-/////////////////////////////////////////////////////////////
-
-class RTTITypeinfo;
-
-class OSSIMDLLEXPORT RTTItypeid	
-		{							// Main class for RTTI interface.
-		public:
-
-		                    RTTItypeid(const RTTITypeinfo* p):  theId(p)  {}
-				    RTTItypeid(); 			 
-		   int 		    operator==(RTTItypeid) const;
-		   int 		    operator!=(RTTItypeid) const;
-		   const RTTITypeinfo* get_info() const    	 { return theId; }
-		   int 		    can_cast(RTTItypeid) const;	 	// 1 if the arg can be cast to this, else 0
-		   const char* 	    getname() const;
-		   int 		    num_subclasses() const;		// Return # subclasses of this
-		   RTTItypeid	    subclass(int) const;		// Return ith subclass of this
-		   int		    num_baseclasses() const;		// Return # baseclasses of this
-		   RTTItypeid 	    baseclass(int) const;		// Return ith baseclass of this
-		   void*	    create(RTTItypeid) const;	 	// Tries to create an instance of a subclass of this
-								 	// having of type given by the RTTItypeid arg. If ok, it returns it 
-								 	// casted to the class-type of this and then to void* 
-		   int		    can_create() const;			// Return 1 if this type is instantiable, else 0
-                   RTTItypeid       find_baseclass(const char* name)const;// 
-		   static RTTItypeid 
-                   null_type();			// the RTTItypeid for NULL ptrs
-                   
-	        protected:
-
-		    const RTTITypeinfo* theId;				// RTTItypeid implementation (the only data-member)
-		};
-
-
-class OSSIMDLLEXPORT RTTIdyntypeid : public RTTItypeid					//Class for dynamic type creation from user strings.
-		{							//Useful for creating typeids at RT for comparison
-		public:							//purposes.
-				    RTTIdyntypeid(const char*);
-				   ~RTTIdyntypeid();
-		private:
-				    static const RTTITypeinfo* a[];
-		};
-
-///////////////////////////////////////////////////////////////////
-
-class OSSIMDLLEXPORT RTTITypeinfo {							//Implementation of type-related info
-		public:
-
-		               RTTITypeinfo(const char* name, const RTTITypeinfo* bb[],
-					 void* (*)(int,void*),void* (*)());
-		  	      ~RTTITypeinfo();
-		   const char* getname() const;				//Returns name of this RTTITypeinfo	
-		   int 	       same(const RTTITypeinfo*) const;		//Compares 2 RTTITypeinfo objs
-		   int         can_cast(const RTTITypeinfo*) const;	//1 if the arg can be cast to this, else 0
-		   int         has_base(const RTTITypeinfo*) const;	//1 if this has the arg as some base, else 0		
-		   
-		   
-		   const RTTITypeinfo*  
-		   	       subclass(int=0) const;			//get i-th subclass of this, if any, else NULL
-		   int	       num_subclasses() const;			//get # subclasses of this 
-		   void*       create(const RTTITypeinfo*,const char*) const;	//search for a subclass named char*,
-									//create obj of it and return it cast to 
-									//the RTTITypeinfo* type, which is either 
-									//this or a direct base of this. 
-		   int	       can_create() const;			//Returns 1 if this type has a default ctor, else 0			
-			
-		private:
-
-		   char* 	          n;				//type name 
-	           const RTTITypeinfo**   b;				//base types (NULL-ended array of RTTITypeinfo's for this's direct bases)
-		   int			  ns;				//#subtypes of this type
-		   const RTTITypeinfo**	  subtypes;			//types derived from this type
-		   static const RTTITypeinfo null_type;			//convenience type info for a 'null' type
-		   void*		  (*new_obj)();			//func to create a new obj of this type
-		   void*		  (*cast)(int,void*);		//func to cast an obj of this type to
-									//ith baseclass of it or to itself
-		   
-		   void 		  add_subtype(const RTTITypeinfo*);//adds a subtype to this's subtypes[]	
-		   void			  del_subtype(const RTTITypeinfo*);//dels a subtype from this's subtypes[]
-
-		   friend class		  RTTItypeid;			//for null_type
-		};      	
-
-
-
-
-inline int RTTITypeinfo::num_subclasses() const				//Return # subclasses of this
-{
-  return ns;
-} 
-
-inline const RTTITypeinfo* RTTITypeinfo::subclass(int i) const		//Return ith subclass of this, else NULL;
-{
-  return (i>=0 && i<ns)? subtypes[i]: 0;
-} 
-
-inline int RTTITypeinfo::same(const RTTITypeinfo* p) const			//Compare 2 RTTITypeinfo's:
-{  										//First, try to see if it's the same
-   return this==p || !strcmp(n,p->n); 						//'physical' RTTITypeinfo (which should be the case,
-}										//since we create them per-class and not per-obj).
-  										//If this fails, still do a textual name comaprison.
-
-inline int RTTITypeinfo::can_cast(const RTTITypeinfo* p) const
-{  
-   return same(p) || p->has_base(this); 
-}
-
-inline int RTTITypeinfo::can_create() const
-{
-   return new_obj!=0;
-}
-
-/////////////////////////////////////////////////////////////////
-//
-// RTTItypeid methods:
-//
-
-inline RTTItypeid RTTItypeid::null_type()
-{
-   return &(RTTITypeinfo::null_type);
-}
-
-inline RTTItypeid::RTTItypeid(): theId(null_type().theId)   
-{
-}
-
-inline int RTTItypeid::operator==(RTTItypeid i) const
-{ 
-  return theId->same(i.theId); 
-}
-
-inline int RTTItypeid::operator!=(RTTItypeid i) const
-{
-  return !(theId->same(i.theId));
-}
-
-inline int RTTItypeid::can_cast(RTTItypeid i) const
-{
-  return theId->can_cast(i.theId);
-}
-
-
-inline const char* RTTItypeid::getname() const
-{
-  return theId->getname();
-}
-
-inline int RTTItypeid::num_subclasses() const
-{
-  return theId->num_subclasses();
-}
-
-inline RTTItypeid RTTItypeid::subclass(int i) const
-{
-  return theId->subclass(i);
-}
-
-inline int RTTItypeid::num_baseclasses() const
-{
-  int i;
-  for(i=0;theId->b[i];i++){}
-  return i;
-}
-
-inline RTTItypeid RTTItypeid::baseclass(int i) const
-{
-  return theId->b[i];
-}
-
-inline void* RTTItypeid::create(RTTItypeid t) const
-{
-   return theId->create(theId,t.getname());
-}
-
-inline int RTTItypeid::can_create() const
-{
-  return theId->can_create();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-
-inline RTTIdyntypeid::RTTIdyntypeid(const char* c) : RTTItypeid(new RTTITypeinfo(c,a,0,0)) { }   //create a dummy RTTITypeinfo
-inline RTTIdyntypeid::~RTTIdyntypeid()
-{
-   if(theId)
-   {
-      delete theId;
-      theId = 0;
-   }
-}				    //delete the dummy RTTITypeinfo
-		
-
-/////////////////////////////////////////////////////////////////////////////////////
-		
-// 1. Main operators
-#define STATIC_TYPE_INFO(T)   T::RTTI_sinfo()
-#define TYPE_INFO(p)          ((p)? (p)->RTTI_vinfo() : RTTItypeid::null_type() )
-#define PTR_CAST(T,p) 	      ((p)? (T*)((p)->RTTI_cast(STATIC_TYPE_INFO(T))) : 0)
-
-
-// 2. Convenience operators
-#define STATIC_TYPE_NAME(T)   (STATIC_TYPE_INFO(T).getname())	
-#define TYPE_NAME(p)	      ((p)? ((p)->RTTI_vinfo().getname()) : RTTItypeid::null_type().getname())	
-#define DYN_CAST(t,p)	      ((p)? ((p)->RTTI_cast((t))!=0) : 1)
-#define UPTR_CAST(t,p)	      ((p)? ((p)->RTTI_cast((t))) : 0)	
-
-// 3. Unsafe operators (see Stroustrup)
-#define OLD_PTR_CAST(T,p)     ((p)? ((STATIC_TYPE_INFO(T).can_cast((p)->RTTI_vinfo()))? (T*)p : 0) : 0)
-#define OLD_UPTR_CAST(t,p)    ((p)? ((t).can_cast((p)->RTTI_vinfo())? (void*)p : 0) : 0)
-#define OLD_DYN_CAST(t,p)     ((p)? ((t).can_cast((p)->RTTI_vinfo())? 1 : 0) : 1)
-
-
-// Definition of TYPE_DATA for a RTTI-class: introduces one static RTTITypeinfo data-member
-// and a couple of virtuals.
-
-#define TYPE_DATA			 		          \
-	protected:					          \
-	   static  const  RTTITypeinfo RTTI_obj; 		  \
-	   static  void*  RTTI_scast(int,void*);	          \
-	   static  void*  RTTI_new();			          \
-	public:						          \
-	   virtual RTTItypeid RTTI_vinfo() const { return &RTTI_obj; }\
-	   static  RTTItypeid RTTI_sinfo()	 { return &RTTI_obj; }\
-	   virtual void*  RTTI_cast(RTTItypeid);\
-	   virtual const void*  RTTI_cast(RTTItypeid)const;
-	
-
-
-// Definition of auxiliary data-structs supporting RTTI for a class: defines the static RTTITypeinfo
-// object of that class and its associated virtuals.
-
-// Auxiliary definition of the construction method:
-#define RTTI_NEW(cls,name)     void* cls::RTTI_new() { return new cls; }	\
-			       const RTTITypeinfo cls::RTTI_obj = RTTITypeinfo(name,RTTI_base_##cls,cls::RTTI_scast,cls::RTTI_new);
-
-#define RTTI_NO_NEW(cls,name)  const RTTITypeinfo cls::RTTI_obj = RTTITypeinfo(name,RTTI_base_##cls,cls::RTTI_scast,0);
-
-
-
-//////////////////////////////////////////////////////////////////
-//
-//	Top-level macros:
-//
-
-#define RTTI_DEF_BASE(cls,name)					\
-	static const RTTITypeinfo* RTTI_base_##cls [] = { 0 };\
-	void* cls::RTTI_cast(RTTItypeid t)			\
-	{							\
-	   if (t == &RTTI_obj) return this;			\
-	   return 0;						\
-	}							\
-	const void* cls::RTTI_cast(RTTItypeid t)const	\
-	{							\
-	   if (t == &RTTI_obj) return this;			\
-	   return 0;						\
-	}							\
-        void* cls::RTTI_scast(int /* i */,void* p)			\
-	{  cls* ptr = (cls*)p; return ptr; }			
-	
-
-#define RTTI_DEF1_BASE(cls,name,b1)				\
-        static const RTTITypeinfo* RTTI_base_##cls [] = 	\
-	       { STATIC_TYPE_INFO(b1).get_info(),0 };		\
-  	void* cls::RTTI_cast(RTTItypeid t)			\
-	{							\
-	   if (t == &RTTI_obj) return this;			\
-	   void* ptr;						\
-	   if ((ptr=b1::RTTI_cast(t))) return ptr;		\
-	   return 0;						\
-	}							\
-  	const void* cls::RTTI_cast(RTTItypeid t)const	\
-	{							\
-	   if (t == &RTTI_obj) return this;			\
-	   const void* ptr;						\
-	   if ((ptr=b1::RTTI_cast(t))) return ptr;		\
-	   return 0;						\
-	}							\
-	void* cls::RTTI_scast(int i,void* p)			\
-	{  cls* ptr = (cls*)p;					\
-	   switch(i)						\
-	   {  case  0: return (b1*)ptr;	 }			\
-	   return ptr;						\
-	}							
-									
-
-#define RTTI_DEF2_BASE(cls,name,b1,b2)				\
-        static const RTTITypeinfo* RTTI_base_##cls [] = 	\
-	       { STATIC_TYPE_INFO(b1).get_info(),		\
-		 STATIC_TYPE_INFO(b2).get_info(),0 };		\
-  	void* cls::RTTI_cast(RTTItypeid t)			\
-	{							\
-	   if (t == &RTTI_obj) return this;			\
-	   void* ptr;						\
-	   if ((ptr=b1::RTTI_cast(t))) return ptr;		\
-	   if ((ptr=b2::RTTI_cast(t))) return ptr;		\
-	   return 0;						\
-	}							\
-  	const void* cls::RTTI_cast(RTTItypeid t)const	\
-	{							\
-	   if (t == &RTTI_obj) return this;			\
-	   const void* ptr;					\
-	   if ((ptr=b1::RTTI_cast(t))) return ptr;		\
-	   if ((ptr=b2::RTTI_cast(t))) return ptr;		\
-	   return 0;						\
-	}							\
-	void* cls::RTTI_scast(int i,void* p)			\
-	{  cls* ptr = (cls*)p;					\
-	   switch(i)						\
-	   {  case  0: return (b1*)ptr;				\
-	      case  1: return (b2*)ptr;				\
-	   }							\
-	   return ptr;						\
-	}							
-	
-#define RTTI_DEF3_BASE(cls,name,b1,b2,b3)			\
-        static const RTTITypeinfo* RTTI_base_##cls [] = 	\
-	       { STATIC_TYPE_INFO(b1).get_info(),		\
-		 STATIC_TYPE_INFO(b2).get_info(),		\
-		 STATIC_TYPE_INFO(b3).get_info(), 0 };		\
-  	void* cls::RTTI_cast(RTTItypeid t)			\
-	{							\
-	   if (t == &RTTI_obj) return this;			\
-	   void* ptr;						\
-	   if ((ptr=b1::RTTI_cast(t))) return ptr;		\
-	   if ((ptr=b2::RTTI_cast(t))) return ptr;		\
-	   if ((ptr=b3::RTTI_cast(t))) return ptr;		\
-	   return 0;						\
-	}							\
-  	const void* cls::RTTI_cast(RTTItypeid t)const	\
-	{							\
-	   if (t == &RTTI_obj) return this;			\
-	   const void* ptr;					\
-	   if ((ptr=b1::RTTI_cast(t))) return ptr;		\
-	   if ((ptr=b2::RTTI_cast(t))) return ptr;		\
-	   if ((ptr=b3::RTTI_cast(t))) return ptr;		\
-	   return 0;						\
-	}							\
-	void* cls::RTTI_scast(int i,void* p)			\
-	{  cls* ptr = (cls*)p;					\
-	   switch(i)						\
-	   {  case  0: return (b1*)ptr;				\
-	      case  1: return (b2*)ptr;				\
-	      case  2: return (b3*)ptr;				\
-	   }							\
-	   return ptr;						\
-	}							
-	
-					
-
-#define RTTI_DEF_INST(cls,name)					\
-	RTTI_DEF_BASE(cls,name)					\
-	RTTI_NEW(cls,name)			
-
-#define RTTI_DEF(cls,name)					\
-	RTTI_DEF_BASE(cls,name)					\
-	RTTI_NO_NEW(cls,name)
-
-#define RTTI_DEF1_INST(cls,name,b1)				\
-	RTTI_DEF1_BASE(cls,name,b1)				\
-	RTTI_NEW(cls,name)			
-
-#define RTTI_DEF1(cls,name,b1)					\
-	RTTI_DEF1_BASE(cls,name,b1)				\
-	RTTI_NO_NEW(cls,name)			
-	
-#define RTTI_DEF2_INST(cls,name,b1,b2)				\
-	RTTI_DEF2_BASE(cls,name,b1,b2)				\
-	RTTI_NEW(cls,name)			
-
-#define RTTI_DEF2(cls,name,b1,b2)				\
-	RTTI_DEF2_BASE(cls,name,b1,b2)				\
-	RTTI_NO_NEW(cls,name)			
-
-#define RTTI_DEF3_INST(cls,name,b1,b2,b3)			\
-	RTTI_DEF3_BASE(cls,name,b1,b2,b3)			\
-	RTTI_NEW(cls,name)	
-
-#define RTTI_DEF3(cls,name,b1,b2,b3)				\
-	RTTI_DEF3_BASE(cls,name,b1,b2,b3)			\
-	RTTI_NO_NEW(cls,name)			
-
-
-#endif
-
-
-			 
-
-		
diff --git a/include/ossim/base/ossimStdOutProgress.h b/include/ossim/base/ossimStdOutProgress.h
deleted file mode 100644
index be2636c..0000000
--- a/include/ossim/base/ossimStdOutProgress.h
+++ /dev/null
@@ -1,35 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimStdOutProgress.h 10422 2007-02-06 04:03:13Z gpotts $
-#ifndef ossimStdOutProgress_HEADER
-#define ossimStdOutProgress_HEADER
-
-#include <ossim/base/ossimProcessListener.h>
-#include <ossim/base/ossimProcessProgressEvent.h>
-#include <ossim/base/ossimNotifyContext.h>
-
-class OSSIM_DLL ossimStdOutProgress : public ossimProcessListener
-{
-public:
-   ossimStdOutProgress(ossim_uint32 precision = 0, bool flushStream=false);
-
-   virtual void processProgressEvent(ossimProcessProgressEvent& event);
-      
-   virtual void setFlushStreamFlag(bool flag);
-
-protected:
-   ossim_uint32 thePrecision;
-   bool         theFlushStreamFlag;
-TYPE_DATA
-};
-
-OSSIM_DLL extern ossimStdOutProgress theStdOutProgress;
-#endif
diff --git a/include/ossim/base/ossimStreamFactory.h b/include/ossim/base/ossimStreamFactory.h
deleted file mode 100644
index c89ca43..0000000
--- a/include/ossim/base/ossimStreamFactory.h
+++ /dev/null
@@ -1,37 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2005 Garrett Potts
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//
-//*******************************************************************
-//  $Id: ossimStreamFactory.h 11176 2007-06-07 19:45:56Z dburken $
-//
-#ifndef ossimStreamFactory_HEADER
-#define ossimStreamFactory_HEADER
-#include <ossim/base/ossimStreamFactoryBase.h>
-#include <ossim/base/ossimIoStream.h>
-
-class OSSIM_DLL ossimStreamFactory : public ossimStreamFactoryBase
-{
-public:
-   static ossimStreamFactory* instance();
-   virtual ~ossimStreamFactory();
- 
-   virtual ossimRefPtr<ossimIFStream>
-      createNewIFStream(const ossimFilename& file,
-                        std::ios_base::openmode openMode) const;
-
-   
-protected:
-   ossimStreamFactory();
-   ossimStreamFactory(const ossimStreamFactory&);
-   static ossimStreamFactory* theInstance;
-   
-};
-
-#endif
diff --git a/include/ossim/base/ossimStreamFactoryBase.h b/include/ossim/base/ossimStreamFactoryBase.h
deleted file mode 100644
index 5ab764b..0000000
--- a/include/ossim/base/ossimStreamFactoryBase.h
+++ /dev/null
@@ -1,35 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2005 Garrett Potts
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//
-//*******************************************************************
-//  $Id: ossimStreamFactoryBase.h 11176 2007-06-07 19:45:56Z dburken $
-//
-#ifndef ossimStreamFactoryBase_HEADER
-#define ossimStreamFactoryBase_HEADER
-
-#include <iosfwd>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimIoStream.h>
-
-class ossimFilename;
-class ossimIStream;
-
-class OSSIM_DLL ossimStreamFactoryBase
-{
-public:
-   virtual ~ossimStreamFactoryBase(){}
-   
-   virtual ossimRefPtr<ossimIFStream> createNewIFStream(
-      const ossimFilename& file,
-      std::ios_base::openmode openMode)const=0;
-};
-
-#endif
diff --git a/include/ossim/base/ossimStreamFactoryRegistry.h b/include/ossim/base/ossimStreamFactoryRegistry.h
deleted file mode 100644
index 13ff939..0000000
--- a/include/ossim/base/ossimStreamFactoryRegistry.h
+++ /dev/null
@@ -1,40 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimStreamFactoryRegistry.h 11176 2007-06-07 19:45:56Z dburken $
-//
-#ifndef ossimStreamFactoryRegistry_HEADER
-#define ossimStreamFactoryRegistry_HEADER
-#include <vector>
-
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimIoStream.h>
-#include <ossim/base/ossimStreamFactoryBase.h>
-
-
-class OSSIM_DLL ossimStreamFactoryRegistry : public ossimStreamFactoryBase
-{
-public:
-   static ossimStreamFactoryRegistry* instance();
-   virtual ~ossimStreamFactoryRegistry();
-   
-   void registerFactory(ossimStreamFactoryBase* factory);
-   
-   virtual ossimRefPtr<ossimIFStream> createNewIFStream(
-      const ossimFilename& file, std::ios_base::openmode openMode) const;
-   
-protected:
-   ossimStreamFactoryRegistry();
-private:
-   /** @brief copy constructor hidden from use */
-   ossimStreamFactoryRegistry(const ossimStreamFactoryRegistry&);
-   
-   std::vector<ossimStreamFactoryBase*> theFactoryList;
-   static ossimStreamFactoryRegistry* theInstance;
-};
-
-#endif
diff --git a/include/ossim/base/ossimString.h b/include/ossim/base/ossimString.h
deleted file mode 100644
index 1c4ee82..0000000
--- a/include/ossim/base/ossimString.h
+++ /dev/null
@@ -1,935 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-// Description: This class extends the stl's string class.
-//
-//********************************************************************
-// $Id: ossimString.h 20491 2012-01-23 20:10:06Z dburken $
-#ifndef ossimString_HEADER
-#define ossimString_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-#include <string>
-#include <vector>
-#include <iostream>
-
-
-class OSSIM_DLL ossimString
-{
-public:
-
-   typedef std::string::const_iterator const_iterator;
-   typedef std::string::iterator       iterator;
-   typedef std::string::size_type      size_type;
-
-   /** @brief default constructor */
-   ossimString(): m_str() {}
-
-   /** @brief constructor that takes a std::string */
-   ossimString(const std::string& s):m_str(s) {}
-
-   /**
-    * @brief constructor that takes char*
-    * NOTE: std::string construtor throws exception given null pointer;
-    * hence, the null check.
-    */
-   ossimString(const char *aString):m_str( aString?aString:"" ){}
-
-   /** @brief copy constructor */
-   ossimString(const ossimString& aString):m_str(aString.m_str){}
-
-   /** @brief constructor - constructs with n copies of c */
-   ossimString(std::string::size_type n, char c):m_str(n,c){}
-
-   /** @brief constructor - constructs with 1 c. */
-   ossimString(char aChar):m_str(1, aChar){}
-
-   template <class Iter>
-   ossimString(Iter startIter, Iter endIter):m_str(startIter, endIter){}
-
-   /** @brief destructor */
-   ~ossimString(){}
-
-   bool contains(const ossimString& aString) const
-   { return m_str.find(aString.m_str)!=std::string::npos; }
-
-   bool contains(const char* aString) const
-   { return m_str.find(aString)!=std::string::npos; }
-
-   /** @brief Type conversion operator to a const std::string&. */
-   operator const std::string&() const { return m_str; }
-
-   /** @brief Type conversion operator to a std::string&. */
-   operator std::string&() { return m_str; }
-
-   /** @brief Type conversion operator to a const char*. */
-   operator const char*() const { return m_str.c_str(); }
-
-   /** @brief For backward compatibility. */
-   const char* chars() const { return m_str.c_str(); }
-
-   /** @brief Reads s from the input stream is. */
-   friend OSSIM_DLL std::istream& operator>>(std::istream&  is, ossimString& s);
-
-   /** @brief Writes s to the output stream os. */
-   friend OSSIM_DLL std::ostream& operator<<(std::ostream& os,
-                                             const ossimString& s);
-
-   /**
-    * @brief Reads a string from the input stream is, stopping when it
-    * reaches delim.
-    */
-   friend OSSIM_DLL std::istream& getline( std::istream& is,
-                                           ossimString& str,
-                                           char delim );
-
-   /** @brief Reads a single line from the input stream is. */
-   friend OSSIM_DLL std::istream& getline( std::istream& is, ossimString& str );
-
-   const ossimString& operator=(const std::string& s)
-   {
-      m_str = s;
-      return *this;
-   }
-
-   const ossimString& operator=(const char* s)
-   {
-      if (s) // std::string::operator= throws exception given null pointer.
-      {
-         m_str = s;
-      }
-      else
-      {
-         m_str = "";
-      }
-      return *this;
-   }
-
-   const ossimString& operator=(char c)
-   {
-      m_str = c;
-      return *this;
-   }
-
-   const ossimString& operator=(const ossimString& s)
-   {
-      if ( this != &s )
-      {
-         m_str = s.m_str;
-      }
-      return *this;
-   }
-
-   const ossimString& operator+=(const ossimString& s)
-   {
-      m_str.append(s.m_str);
-      return *this;
-   }
-
-   const ossimString& operator+=(const std::string& s)
-   {
-      m_str.append(s);
-      return *this;
-   }
-
-   const ossimString& operator+=(const char* s)
-   {
-      if ( s ) m_str.append(s);
-      return *this;
-   }
-
-   const ossimString& operator+=(char c)
-   {
-      m_str.append(1, c);
-      return *this;
-   }
-
-   const ossimString& append(const ossimString& s);
-
-   const ossimString& append(const std::string& s);
-
-   const ossimString& append(const char* s);
-
-   /**
-    *  @brief  Provides access to the data contained in the %string.
-    *  @param n The index of the character to access.
-    *  @return  Read-only (const) reference to the character.
-    *  @throw  std::out_of_range  If @a n is an invalid index.
-    *
-    *  This function provides for safer data access.  The parameter is
-    *  first checked that it is in the range of the string.  The function
-    *  throws out_of_range if the check fails.
-    */
-   const char& at(std::string::size_type n) const;
-
-   /**
-    *  @brief  Provides access to the data contained in the %string.
-    *  @param n The index of the character to access.
-    *  @return  Read/write reference to the character.
-    *  @throw  std::out_of_range  If @a n is an invalid index.
-    *
-    *  This function provides for safer data access.  The parameter is
-    *  first checked that it is in the range of the string.  The function
-    *  throws out_of_range if the check fails.  Success results in
-    *  unsharing the string.
-    */
-   char& at(std::string::size_type n);
-
-   /** @brief Append n copies of c to *this. */
-   const ossimString& append(std::string::size_type n, char c);
-
-   ossimString operator+(const ossimString& s)const
-   {
-      ossimString returnS(*this);
-      returnS.m_str.append(s.m_str);
-      return returnS;
-   }
-
-   ossimString operator+(const std::string& s)const
-   {
-      ossimString returnS(*this);
-      returnS.m_str.append(s);
-      return returnS;
-   }
-
-   ossimString operator+(const char* s)const
-   {
-      ossimString returnS(*this);
-      if ( s ) returnS.m_str.append(s);
-      return returnS;
-   }
-
-   ossimString operator+(char c)const
-   {
-      ossimString returnS(*this);
-      returnS.m_str.append(1, c);
-      return returnS;
-   }
-
-   friend OSSIM_DLL ossimString operator+(const char* s1, const ossimString& s2);
-
-   friend OSSIM_DLL ossimString operator+(const std::string s1, const ossimString& s2);
-
-   friend OSSIM_DLL ossimString operator+(char c, const ossimString& s2);
-   friend OSSIM_DLL bool operator==(const char* lhs, const ossimString& rhs);
-   friend OSSIM_DLL bool operator==(const std::string& lhs, const ossimString& rhs);
-
-   /**
-    *  @brief  Test if this ossimString is equal to another ossimString.
-    *  @param rhs ossimString to compare.
-    *  @return  True if strings are equal.  False otherwise.
-    */
-   bool operator==(const ossimString& rhs) const
-   {
-      return (m_str.compare( rhs.m_str ) == 0);
-   }
-
-   /**
-    *  @brief  Test if this ossimString is equal to a C sting.
-    *  @param rhs C string to compare.
-    *  @return  True if strings are equal.
-    *  False if rhs is not equal null or null.
-    */
-   bool operator==(const char* rhs) const
-   {
-      bool result = false;
-      if (rhs)
-      {
-         result = (m_str.compare(std::string(rhs)) == 0);
-      }
-      return result;
-   }
-
-   /**
-    *  @brief  Test if this ossimString is not equal to another ossimString.
-    *  @param rhs ossimString to compare.
-    *  @return  True if strings are not equal.  False otherwise.
-    */
-   bool operator!=(const ossimString& rhs) const
-   {
-      return !(m_str.compare(rhs.m_str) == 0);
-   }
-
-   /**
-    *  @brief  Test if this ossimString is not equal to a C sting.
-    *  @param rhs C string to compare.
-    *  @return  True if strings are not equal or rhs is null.
-    *  False if rhs equal to this string.
-    */
-   bool operator!=(const char* rhs) const
-   {
-      bool result = true;
-      if (rhs)
-      {
-         result = !(m_str.compare(std::string(rhs)) == 0);
-      }
-      return result;
-   }
-
-   char& operator[](std::string::size_type i)
-   {
-      return m_str[i];
-      // return *( const_cast<char*>(m_strc_str())+i);
-   }
-
-   const char& operator[](std::string::size_type i)const
-   {
-      return m_str[i];
-   }
-
-   /**
-    * @brief If pos > size(), throws out_of_range. Otherwise, equivalent to
-    * insert(begin() + pos, s, s + traits::length(s)).
-    */
-   std::string& insert(std::string::size_type pos, const char* s);
-
-   /** @brief Equivalent to insert(end(), c). */
-   void push_back(char c);
-
-   /** @brief Equivalent to basic_string(*this, pos, n). */
-   std::string substr(std::string::size_type pos = 0,
-                      std::string::size_type n = std::string::npos) const;
-
-   /**
-    * this will strip lead and trailing character passed in.
-    * So if you want to remove blanks:
-    *    ossimString temp("       asdfasdf      ");
-    *    ossimString trimmedString = temp.trim(" \n\t\r");
-    *
-    *    this will now contain "asdfasdf" without the blanks.
-    *
-    */
-   ossimString trim(const ossimString& valueToTrim= ossimString(" \t\n\r"))const;
-   ossimString& trim(const ossimString& valueToTrim= ossimString(" \t\n\r"));
-
-   ossimString beforePos(std::string::size_type pos)const;
-    ossimString afterPos(std::string::size_type pos)const;
-
-   /**
-    *  Substitutes searchKey string with replacementValue and returns a
-    *  string.  Will replace all occurrences found if "replaceAll" is true.
-    */
-   ossimString substitute(const ossimString &searchKey,
-                                  const ossimString &replacementValue,
-                                  bool replaceAll=false)const;
-
-   /**
-    *  Substitutes searchKey string with replacementValue and returns a
-    *  reference to *this.  Will replace all occurrences found if
-    *  "replaceAll" is true.  (like substitute only works on "this")
-    */
-   ossimString& gsub(const ossimString &searchKey,
-                             const ossimString &replacementValue,
-                             bool replaceAll=false);
-
-   std::vector<ossimString> explode(const ossimString& delimeter) const;
-
-   /**
-    * If the variable "$(env_var_name)" is found in the string, where
-    * "env_var_name" is any system environment variable resolvable by
-    * the getenv() function, the variable is expanded in place and the
-    * result returned.
-    */
-   ossimString expandEnvironmentVariable() const;
-
-   /**
-    * @param aString String to make an upcased copy of.
-    *
-    * @return An upcased version of aString.
-    */
-   static ossimString upcase(const ossimString& aString);
-
-   /**
-    * @param aString String to make an downcased copy of.
-    *
-    * @return A downcased version of aString.
-    */
-   static ossimString downcase(const ossimString& aString);
-
-   /**
-    * Upcases this string.
-    *
-    * @return Reference to this.
-    */
-   ossimString& upcase();
-   ossimString upcase()const;
-
-   /**
-    * Downcases this string.
-    *
-    * @return Reference to this.
-    */
-   ossimString& downcase();
-   ossimString downcase()const;
-
-   /**
-    * @brief Returns a pointer to a null-terminated array of characters
-    * representing the string's contents.
-    */
-   const char* c_str() const { return m_str.c_str(); }
-
-   /**
-    * @brief Returns a pointer to an array of characters (not necessarily
-    * null-terminated) representing the string's contents.
-    */
-   const char* data() const { return m_str.data(); }
-
-   /** @return The size of the string. */
-   std::string::size_type size() const { return m_str.size(); }
-
-   /** @return The size of the string. */
-   std::string::size_type length() const { return m_str.size(); }
-
-   /** @return True if size is 0. */
-   bool empty() const { return m_str.empty(); }
-
-   /** @return The underlying std::string container. */
-   const std::string& string() const { return m_str; }
-
-   /** @return The underlying std::string container. */
-   std::string& string() { return m_str; }
-
-   /** @return An iterator pointing to the beginning of the string. */
-   std::string::iterator begin() { return m_str.begin(); }
-
-   /** @return An iterator pointing to the end of the string. */
-   std::string::iterator end() { return m_str.end(); }
-
-   /** @return An const_iterator pointing to the beginning of the string. */
-   std::string::const_iterator begin() const { return m_str.begin(); }
-
-   /** @return An const_iterator pointing to the end of the string. */
-   std::string::const_iterator end() const { return m_str.end(); }
-
-   /** @brief Erases the entire container. */
-   void clear() { m_str.clear(); }
-
-   /** @brief Erases the character at position p. */
-   std::string::iterator erase(std::string::iterator p);
-
-   /** @brief Erases the range [first, last). */
-   std::string::iterator erase(std::string::iterator first,
-                               std::string::iterator last);
-
-   /** @brief Erases a range. */
-   std::string& erase(std::string::size_type pos = 0,
-                      std::string::size_type n = std::string::npos);
-
-   /**
-    * @brief Searches for s as a substring of *this, beginning at character
-    * pos of *this.
-    */
-   std::string::size_type find(const std::string& s,
-                               std::string::size_type pos = 0) const;
-
-   /**
-    * @brief Searches for the first n characters of s as a substring of *this,
-    * beginning at character pos of *this.
-    */
-   std::string::size_type find(const char* s,
-                               std::string::size_type pos,
-                               std::string::size_type n) const;
-
-   /**
-    * @brief Searches for a null-terminated character array as a substring
-    * of *this, beginning at character pos of *this.
-    */
-   std::string::size_type find(const char* s,
-                               std::string::size_type pos = 0) const;
-
-   /**
-    * @brief Searches for the character c, beginning at character position
-    * pos.
-    */
-   std::string::size_type find(char c, std::string::size_type pos = 0) const;
-
-    /**
-    * @brief Searches backward for s as a substring of *this, beginning at
-    * character position min(pos, size()).
-    */
-   std::string::size_type rfind(const std::string& s,
-                                std::string::size_type pos = 0) const;
-
-   /**
-    * @brief Searches backward for the first n characters of s as a substring
-    * of *this, beginning at character position min(pos, size()).
-    */
-   std::string::size_type rfind(const char* s,
-                                std::string::size_type pos,
-                                std::string::size_type n) const;
-
-   /**
-    * @brief Searches backward for a null-terminated character array as a
-    * substring of *this, beginning at character min(pos, size()).
-    */
-   std::string::size_type rfind(const char* s,
-                                std::string::size_type pos = 0) const;
-
-   /**
-    * @brief Searches backward for the character c, beginning at character
-    * position min(pos, size().
-    */
-   std::string::size_type rfind(char c, std::string::size_type pos = 0) const;
-
-   /** @brief Equivalent to find(c, pos). */
-   std::string::size_type find_first_of(
-      char c, std::string::size_type pos = 0) const;
-
-   /**
-    * @brief Returns the smallest character position N such that
-    * pos <= N < size(), and such that (*this)[N] does not compare equal to c.
-    * Returns npos if no such character position exists.
-    */
-   std::string::size_type find_first_not_of(
-      char c, std::string::size_type pos = 0) const;
-
-   /**
-    * @brief Equivalent to find_first_of(s, pos, traits::length(s)).
-    */
-   std::string::size_type find_first_of(
-      const char* s, std::string::size_type pos = 0) const;
-
-      /**
-    * @brief Equivalent to find_first_not_of(s, pos, traits::length(s)).
-    */
-   std::string::size_type find_first_not_of(
-      const char* s, std::string::size_type pos = 0) const;
-
-   /** @brief Equivalent to rfind(c, pos). */
-   std::string::size_type find_last_of(
-      char c, std::string::size_type pos = std::string::npos) const;
-
-   /**
-    * @brief Erases the existing characters and replaces them by n copies
-    * of c.
-    */
-   std::string& assign(std::string::size_type n, char c);
-
-   /** @brief Replaces a substring of *this with the string s. */
-   std::string& replace(std::string::size_type pos,
-                        std::string::size_type n,
-                        const std::string& s);
-
-   /** brief Equivalent to insert(erase(first, last), s.begin(), s.end()). */
-   std::string& replace(std::string::iterator first,
-                        std::string::iterator last,
-                        const std::string& s);
-
-   /** @brief Replaces a substring of *this with a substring of s. */
-   std::string& replace(std::string::size_type pos,
-                        std::string::size_type n,
-                        const std::string& s,
-                        std::string::size_type pos1,
-                        std::string::size_type n1);
-
-   /** @brief Requests that the string's capacity be changed. */
-   void reserve(std::string::size_type n);
-
-   /**
-    * METHOD: before(str, pos)
-    * Returns string beginning at pos and ending one before the token str
-    * If string not found or pos out of range the whole string will be
-    * returned.
-    */
-   ossimString before(const ossimString& str, std::string::size_type pos=0)const;
-
-   /**
-    * METHOD: after(str, pos)
-    * Returns string immediately after the token str. The search for str
-    * begins at pos.  Returns an empty string if not found or pos out of
-    * range.
-    */
-   ossimString after (const ossimString& str, std::string::size_type pos=0)const;
-
-   char* stringDup()const;
-
-   /**
-    * String to numeric methods.
-    */
-   bool                 toBool()const;
-   static bool          toBool(const ossimString& aString);
-
-   ossim_uint8          toUInt8()const;
-   static ossim_uint8   toUInt8(const ossimString& aString);
-
-   int                  toInt()const;
-   static int           toInt(const ossimString& aString);
-
-   ossim_int16          toInt16()const;
-   static ossim_int16   toInt16(const ossimString& aString);
-   ossim_uint16         toUInt16()const;
-   static ossim_uint16  toUInt16(const ossimString& aString);
-
-   ossim_int32          toInt32()const;
-   static ossim_int32   toInt32(const ossimString& aString);
-   ossim_uint32         toUInt32()const;
-   static ossim_uint32  toUInt32(const ossimString& aString);
-
-   ossim_int64          toInt64()const;
-   static ossim_int64   toInt64(const ossimString& aString);
-   ossim_uint64         toUInt64()const;
-   static ossim_uint64  toUInt64(const ossimString& aString);
-
-   /**
-    * toLong's deprecated, please use the toInts...
-    */
-   long                 toLong()const;
-   static long          toLong(const ossimString& aString);
-   unsigned long        toULong()const;
-   static unsigned long toULong(const ossimString& aString);
-
-   ossim_float32        toFloat32()const;
-   static ossim_float32 toFloat32(const ossimString& aString);
-   ossim_float64        toFloat64()const;
-   static ossim_float64 toFloat64(const ossimString& aString);
-   double               toDouble()const;
-   static double        toDouble(const ossimString& aString);
-
-   /**
-    * Numeric to string methods.
-    */
-   static ossimString toString(bool aValue);
-   static ossimString toString(ossim_int16   aValue);
-   static ossimString toString(ossim_uint16  aValue);
-   static ossimString toString(ossim_int32   aValue);
-   static ossimString toString(ossim_uint32  aValue);
-   static ossimString toString(ossim_int64   aValue);
-   static ossimString toString(ossim_uint64  aValue);
-
-   /**
-    * @param aValue Value to convert to string.
-    *
-    * @param precision Decimal point precision of the output.
-    *
-    * @param fixed If true setiosflags(std::ios::fixed) will be called.
-    */
-   static ossimString toString(ossim_float32 aValue,
-                               ossim_int32 precision = 8,
-                               bool fixed = false);
-
-   /**
-    * @param aValue Value to convert to string.
-    *
-    * @param precision Decimal point precision of the output.
-    *
-    * @param fixed If true setiosflags(std::ios::fixed) will be called.
-    */
-   static ossimString toString(ossim_float64 aValue,
-                               ossim_int32 precision = 15,
-                               bool fixed = false);
-
-   static ossimString stripLeading(const ossimString &value,
-                                   char characterToStrip);
-
-
-   /**
-    * Splits this string into a vector of strings (fields) using the delimiter list specified.
-    * If a delimiter is encountered at the beginning or the end of this, or two delimiters are
-    * contiguous, a blank field is inserted in the vector, unless skipBlankFields is true.
-    */
-   void split(std::vector<ossimString>& result,
-              const ossimString& separatorList,
-              bool skipBlankFields=false)const;
-
-   std::vector<ossimString> split(const ossimString& separatorList,
-                                  bool skipBlankFields=false)const;
-
-   const ossimString& join(const std::vector<ossimString>& stringList,
-                           const ossimString& separator);
-
-   //---
-   // Regular expression pattern utilities
-   //---
-
-   /**
-    * Returns from start of string up to but not including found pattern.
-    * Returns "" if pattern not found.
-    */
-   ossimString beforeRegExp(const char *regularExpressionPattern) const;
-
-   /**
-    * Returns from position of found pattern to end of string.
-    * Returns "" if pattern not found.
-    */
-   ossimString fromRegExp(const char *regularExpressionPattern) const;
-
-   /**
-    * Returns from position after found pattern to end of string.
-    * Returns "" if pattern not found.
-    */
-   ossimString afterRegExp(const char *regularExpressionPattern) const;
-
-   /**
-    * Returns from found pattern to end of pattern.
-    * Returns "" if pattern not found.
-    */
-   ossimString match(const char *regularExpressionPattern) const;
-
-   ossimString replaceAllThatMatch(const char *regularExpressionPattern,
-                                   const char *value="") const;
-
-   ossimString replaceStrThatMatch(const char *regularExpressionPattern,
-                                   const char *value="") const;
-
-   ossimString urlEncode()const;
-
-   /**
-    * If OSSIM_ID_ENABLED returns the OSSIM_ID which currently is the
-    * expanded cvs $Id: ossimString.h 20491 2012-01-23 20:10:06Z dburken $ macro; else, an empty string.
-    */
-   ossimString getOssimId() const;
-
-protected:
-
-   std::string m_str;
-};
-
-inline std::string::iterator ossimString::erase(std::string::iterator p)
-{
-   return m_str.erase(p);
-}
-
-inline std::string::iterator ossimString::erase(std::string::iterator first,
-                                                std::string::iterator last)
-{
-   return m_str.erase(first, last);
-}
-
-inline std::string& ossimString::erase(std::string::size_type pos,
-                                       std::string::size_type n)
-{
-   return m_str.erase(pos, n);
-}
-
-inline std::string::size_type ossimString::find(
-   const std::string& s, std::string::size_type pos) const
-{
-   return m_str.find(s, pos);
-}
-
-inline std::string::size_type ossimString::find(
-   const char* s, std::string::size_type pos, std::string::size_type n) const
-{
-   return m_str.find(s, pos, n);
-}
-
-inline std::string::size_type ossimString::find(
-   const char* s, std::string::size_type pos) const
-{
-   return m_str.find(s, pos);
-}
-
-inline std::string::size_type ossimString::find(
-   char c, std::string::size_type pos) const
-{
-   return m_str.find(c, pos);
-}
-
-inline std::string::size_type ossimString::rfind(
-   const std::string& s, std::string::size_type pos) const
-{
-   return m_str.rfind(s, pos);
-}
-
-inline std::string::size_type ossimString::rfind(
-   const char* s, std::string::size_type pos, std::string::size_type n) const
-{
-   return m_str.rfind(s, pos, n);
-}
-
-inline std::string::size_type ossimString::rfind(
-   const char* s, std::string::size_type pos) const
-{
-   return m_str.rfind(s, pos);
-}
-
-inline std::string::size_type ossimString::rfind(
-   char c, std::string::size_type pos) const
-{
-   return m_str.rfind(c, pos);
-}
-
-inline std::string::size_type ossimString::find_first_of(
-   char c, std::string::size_type pos) const
-{
-   return m_str.find_first_of(c, pos);
-}
-
-inline std::string::size_type ossimString::find_first_of(
-   const char* s, std::string::size_type pos) const
-{
-   return m_str.find_first_of(s, pos);
-}
-
-inline std::string::size_type ossimString::find_first_not_of(
-   const char c, std::string::size_type pos) const
-{
-   return m_str.find_first_not_of(c, pos);
-}
-
-inline std::string::size_type ossimString::find_first_not_of(
-   const char* s, std::string::size_type pos) const
-{
-   return m_str.find_first_not_of(s, pos);
-}
-
-inline std::string::size_type ossimString::find_last_of(
-   char c, std::string::size_type pos) const
-{
-   return m_str.find_last_of(c, pos);
-}
-
-inline const ossimString& ossimString::append(const ossimString& s)
-{
-   m_str.append(s.m_str);
-   return *this;
-}
-
-inline const ossimString& ossimString::append(const std::string& s)
-{
-   m_str.append(s);
-   return *this;
-}
-
-inline const ossimString& ossimString::append(const char* s)
-{
-   if ( s ) m_str.append(s);
-   return *this;
-}
-
-inline const ossimString& ossimString::append(std::string::size_type n, char c)
-{
-   m_str.append(n, c);
-   return *this;
-}
-
-inline const char& ossimString::at(std::string::size_type n) const
-{
-   return m_str.at(n); 
-}
-
-inline char& ossimString::at(std::string::size_type n)
-{
-   return m_str.at(n);
-}
-
-inline std::string& ossimString::assign(std::string::size_type n, char c)
-{
-   return m_str.assign(n, c);
-}
-
-inline std::string& ossimString::replace(
-   std::string::size_type pos, std::string::size_type n, const std::string& s)
-{
-   return m_str.replace(pos, n, s);
-}
-
-inline std::string& ossimString::replace(std::string::iterator first,
-                                         std::string::iterator last,
-                                         const std::string& s)
-{
-   return m_str.replace(first, last, s);
-}
-
-inline std::string& ossimString::replace(std::string::size_type pos,
-                                         std::string::size_type n,
-                                         const std::string& s,
-                                         std::string::size_type pos1,
-                                         std::string::size_type n1)
-{
-   return m_str.replace(pos, n, s, pos1, n1);
-}
-
-inline void ossimString::reserve(std::string::size_type n)
-{
-   m_str.reserve(n);
-}
-
-
-inline std::string& ossimString::insert(std::string::size_type pos,
-                                        const char* s)
-{
-   if (s) m_str.insert(pos, s);
-   return m_str;
-}
-
-inline void ossimString::push_back(char c)
-{
-   m_str.push_back(c);
-}
-
-inline std::string ossimString::substr(std::string::size_type pos,
-                                       std::string::size_type n) const
-{
-   return m_str.substr(pos, n);
-}
-
-inline std::istream& getline( std::istream& is, ossimString& str, char delim )
-{
-   return std::getline( is, str.string(), delim );
-}
-
-inline std::istream& getline( std::istream& is, ossimString& str )
-{
-   // Not sure why getline( is, str.string()) doesn't work. (drb)
-   return std::getline( is, str.string(), '\n' );
-}
-
-inline std::istream& operator>>(std::istream&  is, ossimString& s)
-{
-   return is >> s.string();
-}
-
-inline std::ostream& operator<<(std::ostream& os, const ossimString& s)
-{
-   return os << s.string();
-}
-
-inline ossimString operator+(const char* s1, const ossimString& s2)
-{
-   ossimString result;
-   if ( s1 ) result = ossimString( s1 + s2.string() );
-   else result = s2;
-   return result;
-}
-
-inline ossimString operator+(const std::string s1, const ossimString& s2)
-{
-   return ossimString( s1 + s2.string() );
-}
-
-inline ossimString operator+(char c, const ossimString& s2)
-{
-   return ossimString( c + s2.string() );
-}
-
-inline bool operator==(const char* lhs, const ossimString& rhs)
-{
-   return (rhs.operator ==(lhs));
-}
-
-inline bool operator==(const std::string& lhs, const ossimString& rhs)
-{
-   return (rhs.operator ==(lhs));
-}
-
-/**
- * @brief For use with std::map as a compare operator:
- * std::map<ossimString, ossimString, ossimStringLtstr>
- *
- * This will allow the find method on map to work.
- */
-struct ossimStringLtstr
-{
-   bool operator()(const ossimString& s1, const ossimString& s2) const
-   {
-      return s1.string().compare(s2.string()) < 0;
-   }
-};
-
-#endif /* #ifndef ossimString_HEADER */
diff --git a/include/ossim/base/ossimStringProperty.h b/include/ossim/base/ossimStringProperty.h
deleted file mode 100644
index cb3cd61..0000000
--- a/include/ossim/base/ossimStringProperty.h
+++ /dev/null
@@ -1,73 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// LICENSE: LGPL see top level license.txt
-//
-// Author: Garrett Potts (gpotts at imagelinks.com)
-//
-//*************************************************************************
-// $Id: ossimStringProperty.h 9094 2006-06-13 19:12:40Z dburken $
-#ifndef ossimStringProperty_HEADER
-#define ossimStringProperty_HEADER
-#include <ossim/base/ossimProperty.h>
-#include <vector>
-
-class OSSIMDLLEXPORT ossimStringProperty : public ossimProperty
-{
-public:
-   ossimStringProperty(const ossimString& name = ossimString(""),
-                       const ossimString& value = ossimString(""),
-                       bool editableFlag = true,
-                       const std::vector<ossimString>& constraintList = std::vector<ossimString>());
-   
-   ossimStringProperty(const ossimStringProperty& rhs);
-
-   /*!
-    * Duplicates the object and returns a new one
-    */
-   virtual ossimObject* dup()const;
-
-   virtual const ossimProperty& assign(const ossimProperty& rhs);
-   
-   void setEditableFlag(bool flag);
-   bool getEditableFlag()const;
-   bool isEditable()const;
-   
-   /*!
-    * Clears the constraints for this string.  You can constrain
-    * it to a string list by calling setConstraints.
-    */
-   void clearConstraints();
-
-   /*!
-    * Sets the constraints for this property.  If the editable
-    * flag is present then this says the editing is not readonly
-    * and one can hand type the value in without only selecting
-    * from a choice list.
-    */
-   void setConstraints(const std::vector<ossimString>& constraintList);
-
-   void addConstraint(const ossimString& value);
-   const std::vector<ossimString>& getConstraints()const;
-   
-   bool hasConstraints()const;
-   
-   /*!
-    * will try to set the value.  If the constraints are set
-    * it will make sure that the value is in the list and
-    * if its not then it will return false 
-    */
-   virtual bool setValue(const ossimString& value);
-   
-   virtual void valueToString(ossimString& valueResult)const;
-  
-   
-protected:
-   ossimString theValue;
-   bool        theEditableFlag;
-   std::vector<ossimString> theConstraints;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/base/ossimTempFilename.h b/include/ossim/base/ossimTempFilename.h
deleted file mode 100644
index 270281b..0000000
--- a/include/ossim/base/ossimTempFilename.h
+++ /dev/null
@@ -1,42 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// Description: This is a tmeporary filename class it will create a temporary
-//              file and will also delete it upon destruction
-//
-//*************************************************************************
-// $Id: ossimTempFilename.h 9094 2006-06-13 19:12:40Z dburken $
-#ifndef ossimTempFilename_HEADER
-#define ossimTempFilename_HEADER
-#include <ossim/base/ossimFilename.h>
-
-class OSSIM_DLL ossimTempFilename : public ossimFilename
-{
-public:
-   ossimTempFilename(const ossimString& tempDir="",
-                     const ossimString& prefix = "",
-                     const ossimString& extension = "",
-                     bool autodelete=true,
-                     bool useWildcardDelete=true);
-
-   void generateRandomFile();
-   void generateRandomDir();
-   
-   ~ossimTempFilename();
-   
-protected:
-   ossimString theTempDir;
-   ossimString thePrefix;
-   ossimString theExtension;
-   bool theAutoDeleteFlag;
-   bool theWildCardDeleteFlag;
-   
-
-   void generate(bool createAsDirectoryFlag);
-};
-#endif
diff --git a/include/ossim/base/ossimTileHash.h b/include/ossim/base/ossimTileHash.h
deleted file mode 100644
index faf0b36..0000000
--- a/include/ossim/base/ossimTileHash.h
+++ /dev/null
@@ -1,46 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken Copied from TiledImageHash.
-//
-// Description: Hashing function for tiled rectangles.  Will hash a
-//              dpt or fpt to a single index value.
-//
-// NOTE:  Works on rectangles that are positive in the line up (y)
-//        direction.  Use TiledImageHash for rectangles that are positive
-//        in the line down direction.
-//              
-//*******************************************************************
-//  $Id: ossimTileHash.h 9094 2006-06-13 19:12:40Z dburken $
-
-#ifndef TileHash_HEADER
-#define TileHash_HEADER
-
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimPointHash.h>
-
-class OSSIMDLLEXPORT ossimTileHash : public ossimPointHash
-{
-public:
-   ossimTileHash(const ossimDrect &imageRect,
-                 double tileWidth,
-                 double tileHeight);
-
-   virtual ~ossimTileHash();
-
-   virtual long operator()(const ossimDpt &aPoint);
-   virtual long operator()(const ossimFpt &aPoint);
-   
-private:
-   ossimDrect   theImageRect;
-   double  theTileWidth;
-   double  theTileHeight;
-   long    theNumberOfHorizTiles;
-   long    theNumberOfVertTiles;
-};
-
-#endif
diff --git a/include/ossim/base/ossimTiledImageHash.h b/include/ossim/base/ossimTiledImageHash.h
deleted file mode 100644
index 6531c45..0000000
--- a/include/ossim/base/ossimTiledImageHash.h
+++ /dev/null
@@ -1,40 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-// Description: Hashing function for tiled rectangles.  Will hash a
-//              dpt to a single index value.
-//              
-//*******************************************************************
-//  $Id: ossimTiledImageHash.h 9094 2006-06-13 19:12:40Z dburken $
-#ifndef ossimTiledImageHash_HEADER
-#define ossimTiledImageHash_HEADER
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimPointHash.h>
-
-class OSSIMDLLEXPORT ossimTiledImageHash : public ossimPointHash
-{
-public:
-   ossimTiledImageHash(const ossimDrect &imageRect,
-                       double tileWidth,
-                       double tileHeight);
-
-   virtual ~ossimTiledImageHash();
-
-   virtual long operator()(const ossimDpt &aPoint);
-   virtual long operator()(const ossimFpt &aPoint);
-   
-private:
-   ossimDrect   theImageRect;
-   double  theTileWidth;
-   double  theTileHeight;
-   long    theNumberOfHorizTiles;
-   long    theNumberOfVertTiles;
-};
-
-#endif
diff --git a/include/ossim/base/ossimTraceManager.h b/include/ossim/base/ossimTraceManager.h
deleted file mode 100644
index d01829f..0000000
--- a/include/ossim/base/ossimTraceManager.h
+++ /dev/null
@@ -1,69 +0,0 @@
-//*****************************************************************************
-// Copyright (C) 2005 Garrett Potts, all rights reserved.
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-// 
-// DESCRIPTION:
-//   Contains declaration of class ossimTraceManager.
-//
-//*****************************************************************************
-// $Id: ossimTraceManager.h 9094 2006-06-13 19:12:40Z dburken $
-#ifndef ossimTraceManager_HEADER
-#define ossimTraceManager_HEADER
-
-#include <ossim/base/ossimString.h>
-
-class ossimTrace;
-
-class OSSIMDLLEXPORT ossimTraceManager
-{
-public:
-   /**
-    * @return ossimTraceManager* to instance of the ossim trace manager.
-    */
-   static ossimTraceManager* instance();
-
-   /**
-    * Sets "thePattern" to "pattern", then calls setTraceFlags(true).
-    *
-    * @param pattern Regular expression to enable trace for.
-    */
-   void setTracePattern(const ossimString& pattern);
-
-   /**
-    * @param traceObj ossimTrace* to add to "theTraceList".
-    */
-   void addTrace(ossimTrace* traceObj);
-
-   /**
-    * @param traceObj ossimTrace* to remove from "theTraceList".
-    */
-   void removeTrace(ossimTrace* traceObj);
-   
-protected:
-   /** Protected default constructor. */
-   ossimTraceManager();
-
-private:
-   /**
-    * Loops through "theTraceList" and sets any trace object's enable flag to
-    * flag if it matches regular expression of "thePattern".
-    * For trace objects not matching "thePattern" no action is taken.
-    */
-   void setTraceFlags(bool flag);
-
-   /** The instance of this manager. */
-   static ossimTraceManager* theInstance;
-
-   /** The regular expression pattern like "ossimDynamic|ossimGdal". */
-   ossimString               thePattern;
-
-   /** The list of trace objects. */
-   std::vector<ossimTrace*>  theTraceList;
-};
-
-#endif
diff --git a/include/ossim/base/ossimUnitConversionTool.h b/include/ossim/base/ossimUnitConversionTool.h
deleted file mode 100644
index 274e7e4..0000000
--- a/include/ossim/base/ossimUnitConversionTool.h
+++ /dev/null
@@ -1,80 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimUnitConversionTool.h 10378 2007-01-26 14:27:21Z gpotts $
-#ifndef ossimUnitConversionTool_HEADER
-#define ossimUnitConversionTool_HEADER
-#include <iostream>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimGpt.h>
-
-class OSSIM_DLL ossimUnitConversionTool
-{
-public:
-   friend std::ostream& operator<<(std::ostream& out,
-                                   const ossimUnitConversionTool& data);
-
-   ossimUnitConversionTool(double value=1.0,
-                           ossimUnitType unitType=OSSIM_METERS);
-
-   ossimUnitConversionTool(const ossimGpt& origin,
-                           double value,
-                           ossimUnitType unitType=OSSIM_METERS);
-
-   void setOrigin(const ossimGpt& gpt);
-
-   ossimGpt getOrigin()const;
-
-   void getOrigin(ossimGpt& result)const;
-
-   void setValue(double value, ossimUnitType unitType=OSSIM_METERS);
-
-   double getValue(ossimUnitType unitType=OSSIM_METERS) const;
-   
-   void setMeters(double value);
-   void setRadians(double value);
-   void setDegrees(double value);
-   void setMinutes(double value);
-   void setSeconds(double value);
-   void setUsSurveyFeet(double value);
-   void setFeet(double value);
-   void setNauticalMiles(double value);
-   void setMiles(double value);
-   void setMillimeters(double value);
-   void setMicrons(double value);
-   void setCentimeters(double value);
-   void setYards(double value);
-   void setInches(double value);
-   void setKilometers(double value);
-   double getMeters()const;
-   double getRadians()const;
-   double getDegrees()const;
-   double getMinutes()const;
-   double getSeconds()const;
-   double getUsSurveyFeet()const;
-   double getFeet()const;
-   double getNauticalMiles()const;
-   double getMiles()const;
-   double getMillimeters()const;
-   double getMicrons()const;
-   double getCentimeters()const;
-   double getYards()const;
-   double getInches()const;
-   double getKilometers()const;
-   
-protected:
-   double         theValue;
-   ossimUnitType  theUnitType;
-   ossimGpt       theOrigin;
-
-   double computeMeters()const;
-};
-
-#endif
diff --git a/include/ossim/base/ossimUnitTypeLut.h b/include/ossim/base/ossimUnitTypeLut.h
deleted file mode 100644
index 3e84bd1..0000000
--- a/include/ossim/base/ossimUnitTypeLut.h
+++ /dev/null
@@ -1,57 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimUnitTypeLut.h 11959 2007-10-31 19:22:56Z gpotts $
-#ifndef ossimUnitTypeLut_HEADER
-#define ossimUnitTypeLut_HEADER
-
-#include <ossim/base/ossimLookUpTable.h>
-#include <ossim/base/ossimKeywordNames.h>
-
-class OSSIMDLLEXPORT ossimUnitTypeLut : public ossimLookUpTable
-{
-public:
-
-   /**
-    * Returns the static instance of an ossimUnitTypeLut object.
-    */
-   static ossimUnitTypeLut* instance();
-
-   virtual ~ossimUnitTypeLut();
-
-   /*!
-    *  Returns the entry number associated with the entry string passed in.
-    *  Returns OSSIM_UNIT_UNKNOWN if entry string is not in the list.
-    *  If case_insensitive == true(default), the test is case insensitive;
-    *  else, the test will be case sensitive.
-    */
-   virtual ossim_int32 getEntryNumber(const char* entry_string,
-                                      bool case_insensitive = true) const;
-
-   /*!
-    *  Returns the entry number associated with the lookup table keyword
-    *  entry in the Keywordlist passed in.  Returns NOT_FOUND(-1) if no
-    *  matching entry.
-    *  If case_insensitive == true(default), the test is case insensitive;
-    *  else, the test will be case sensitive.
-    */
-   virtual ossim_int32 getEntryNumber(const ossimKeywordlist& kwl,
-                                      const char* prefix=0,
-                                      bool case_insensitive = true) const;
-   
-   virtual ossimKeyword getKeyword() const;
-
-protected:
-   ossimUnitTypeLut();
-
-private:
-   static ossimUnitTypeLut* theInstance;
-   
-};
-
-#endif
diff --git a/include/ossim/base/ossimVisitor.h b/include/ossim/base/ossimVisitor.h
deleted file mode 100644
index 9af759c..0000000
--- a/include/ossim/base/ossimVisitor.h
+++ /dev/null
@@ -1,204 +0,0 @@
-// $Id: ossimVisitor.h 22158 2013-02-20 12:29:10Z gpotts $
-
-#ifndef ossimVisitor_HEADER
-#define ossimVisitor_HEADER 1
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimId.h>
-#include <ossim/base/ossimEvent.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <set>
-#include <vector>
-
-class ossimConnectableObject;
-
-
-class OSSIM_DLL ossimVisitor : public ossimReferenced
-{
-public:
-   typedef std::set<ossimRefPtr<ossimObject> >    MarkCollectionRef;
-   typedef std::set<ossimRefPtr<ossimObject> >    CollectionRef;
-   typedef std::vector<ossimRefPtr<ossimObject> > ListRef;
-   typedef std::set<ossimObject*>                 Collection;
-   typedef std::vector<ossimObject* >             List;
-   /**
-    * Enumeration type can be a mask and will traverse a graph of connectables based on the values.
-    */
-   enum VisitorType
-   {
-      VISIT_NONE     = 0,
-      VISIT_CHILDREN = 1,
-      VISIT_INPUTS   = 2,
-      VISIT_OUTPUTS  = 4,
-      VISIT_ALL      = (VISIT_CHILDREN|VISIT_INPUTS|VISIT_OUTPUTS)
-   };
-   
-   ossimVisitor(int visitorType = VISIT_NONE);
-   ossimVisitor(const ossimVisitor& src);
-   virtual void reset();
-   virtual ossimRefPtr<ossimVisitor> dup()const=0;
-   virtual void visit(ossimObject* obj);
-   virtual void visit(ossimConnectableObject* obj);
-   VisitorType getVisitorType()const;
-   void setVisitorType(int vType, bool on=true);
-   void turnOffVisitorType(int vType);
-   bool hasVisited(ossimObject* obj)const;
-   bool stopTraversal()const;
-protected:
-   VisitorType            m_visitorType;
-   mutable Collection     m_markNode;
-   mutable bool           m_stopTraversalFlag;
-};
-
-class OSSIM_DLL ossimCollectionVisitor : public ossimVisitor
-{
-public:
-   ossimCollectionVisitor(int visitorType =(VISIT_INPUTS|VISIT_CHILDREN));
-   ossimCollectionVisitor(const ossimCollectionVisitor& src);
-   ListRef& getObjects();
-   const ListRef& getObjects()const;
-   ossimObject* getObject(ossim_uint32 idx = 0);
-   const ossimObject* getObject(ossim_uint32 idx = 0)const;
-
-   // Inlined to force template instantiation.
-   template <class T> T* getObjectAs(ossim_uint32 idx=0)
-   {
-      if(idx < m_collection.size())
-      {
-         return dynamic_cast<T*>(m_collection[idx].get());
-      }
-      return 0;
-   }
-
-   // Inlined to force template instantiation.
-   template<class T> const T* getObjectAs(ossim_uint32 idx=0)const
-   {
-      if(idx < m_collection.size())
-      {
-         return dynamic_cast<const T*>(m_collection[idx].get());
-      }
-      return 0;
-   }
-
-   virtual void reset();
- 
-protected:
-   ListRef m_collection; 
-   
-};
-
-class OSSIM_DLL ossimIdVisitor : public ossimVisitor
-{
-public:
-   /** 
-    * @brief Default constructor
-    * Constructs with id of 0 and vistor type of VISIT_INPUTS|VISIT_CHILDREN.
-    */
-   ossimIdVisitor();
-
-   ossimIdVisitor(int visitorType);
-   ossimIdVisitor(const ossimId& id, int visitorType =(VISIT_INPUTS|VISIT_CHILDREN));
-   ossimIdVisitor(const ossimIdVisitor& src);
-
-   virtual ossimRefPtr<ossimVisitor> dup()const;
-   virtual void visit(ossimConnectableObject* obj);
-
-   /** @brief Resets m_object to 0, calls ossimVisitor::reset(). */
-   virtual void reset();
-   
-   ossimConnectableObject* getObject();
-   const ossimConnectableObject* getObject()const;
-   void setId(const ossimId& id);
-   const ossimId& getId()const;
-protected:
-   ossimConnectableObject* m_object;
-   ossimId m_id;
-};
-
-class OSSIM_DLL ossimTypeNameVisitor : public ossimCollectionVisitor
-{
-public:
-   ossimTypeNameVisitor(int visitorType =(VISIT_INPUTS|VISIT_CHILDREN));
-   ossimTypeNameVisitor(const ossimString& typeName, bool firstofTypeFlag=false, int visitorType =(VISIT_INPUTS|VISIT_CHILDREN));
-   ossimTypeNameVisitor(const ossimTypeNameVisitor& src);
-   virtual ossimRefPtr<ossimVisitor> dup()const;
-   virtual void visit(ossimObject* obj);
-   void setTypeName(const ossimString& typeName);
-   const ossimString& getTypeName()const;
-
-   /**
-    * @brief Set the m_firstOfTypeFlag.
-    *
-    * @param flag If flag is true, ossimTypeNameVisitor::visit will stop traversing if it
-    * finds an object of m_typeName.
-    */
-   void setFirstOfTypeFlag(bool flag);
-
-   /** @return m_firstOfTypeFlag */
-   bool getFirstOfTypeFlag() const;
-   
-protected:
-   ossimString m_typeName;
-   bool        m_firstOfTypeFlag;
-};
-
-class OSSIM_DLL ossimTypeIdVisitor : public ossimCollectionVisitor
-{
-public:
-   ossimTypeIdVisitor(int visitorType =(VISIT_INPUTS|VISIT_CHILDREN));
-   ossimTypeIdVisitor(const RTTItypeid& typeId, bool firstofTypeFlag=false, int visitorType =(VISIT_INPUTS|VISIT_CHILDREN));
-   ossimTypeIdVisitor(const ossimTypeIdVisitor& src);
-   virtual ossimRefPtr<ossimVisitor> dup()const;
-   virtual void visit(ossimObject* obj);
-   void setTypeId(const RTTItypeid& typeId);
-   const RTTItypeid& getTypeId()const;
-protected:
-   RTTItypeid m_typeId;
-   bool        m_firstOfTypeFlag;
-};
-
-class OSSIM_DLL ossimEventVisitor : public ossimVisitor
-{
-public:
-   ossimEventVisitor(ossimEvent* evt,
-                      int visitorType =(VISIT_OUTPUTS|VISIT_CHILDREN));
-   ossimEventVisitor(const ossimEventVisitor& src);
-   virtual ossimRefPtr<ossimVisitor> dup()const;
-   virtual void visit(ossimObject* obj);
-   
-protected:
-   ossimRefPtr<ossimEvent> m_event;
-  
-};
-
-/**
- * @class ossimViewInterfaceVisitor
- *
- * Visitor to update view and then propagate property event to outputs.
- */
-class OSSIM_DLL ossimViewInterfaceVisitor : public ossimVisitor
-{
-public:
-   ossimViewInterfaceVisitor(ossimObject* view,
-                             int visitorType =(VISIT_OUTPUTS|VISIT_CHILDREN));
-   ossimViewInterfaceVisitor(const ossimViewInterfaceVisitor& src);
-   virtual ossimRefPtr<ossimVisitor> dup()const;
-
-   /**
-    * @brief Calls ossimViewInterface::setView if obj cast to
-    * ossimViewInterface*.  On success a property event is sent to
-    * output side so that things like ossimCombiner can reinitialize if
-    * needed.
-    *
-    * @param obj Object to visit.
-    */
-   virtual void visit(ossimObject* obj);
-   
-
-   ossimObject* getView();
-   const ossimObject* getView()const;
-protected:
-   ossimRefPtr<ossimObject> m_view;
-};
-
-#endif
diff --git a/include/ossim/base/ossimVrect.h b/include/ossim/base/ossimVrect.h
deleted file mode 100644
index 3948e41..0000000
--- a/include/ossim/base/ossimVrect.h
+++ /dev/null
@@ -1,167 +0,0 @@
-//*******************************************************************
-//
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-// Contains class declaration for vrect.
-// Container class for four double points representing a rectangle
-// where y is up
-// 
-//*******************************************************************
-//  $Id: ossimVrect.h 11955 2007-10-31 16:10:22Z gpotts $
-#ifndef ossimVrect_HEADER
-#define ossimVrect_HEADER
-#include <iostream>
-
-#include <ossim/base/ossimDpt.h>
-
-class OSSIMDLLEXPORT ossimVrect
-{
-public:
-   ossimVrect()
-      :theUlCorner(0.0, 0.0),
-       theLlCorner(0.0, 0.0),
-       theLrCorner(0.0, 0.0),
-       theUrCorner(0.0, 0.0)
-      {}
-   ossimVrect(const ossimDpt &ul,
-         const ossimDpt &lr)
-      :theUlCorner(ul),
-       theLlCorner(ul.x, lr.y),
-       theLrCorner(lr),
-       theUrCorner(lr.x, ul.y)
-      {}
-   ossimVrect(double ul_corner_x,
-         double ul_corner_y,
-         double lr_corner_x,
-         double lr_corner_y)
-      :
-         theUlCorner(ul_corner_x, ul_corner_y),
-         theLlCorner(ul_corner_x, lr_corner_y),
-         theLrCorner(lr_corner_x, lr_corner_y),
-         theUrCorner(lr_corner_x, ul_corner_y)
-      {}
-   ossimVrect(const ossimVrect& rect)
-      :
-         theUlCorner(rect.ul()),
-         theLlCorner(rect.ll()),
-         theLrCorner(rect.lr()),
-         theUrCorner(rect.ur())
-      {}
-
-   ~ossimVrect();
-
-   const ossimVrect& operator=  (const ossimVrect& rect);
-   bool         operator!= (const ossimVrect& rect) const;
-   bool         operator== (const ossimVrect& rect) const;
-   
-   const ossimDpt &ul() const { return theUlCorner; }
-   const ossimDpt &ur() const { return theUrCorner; }
-   const ossimDpt &lr() const { return theLrCorner; }
-   const ossimDpt &ll() const { return theLlCorner; }
-   /*!
-    * Returns the height of a rectangle.
-    */
-   ossim_float64 height() const
-      { return fabs(theLlCorner.y - theUlCorner.y) + 1.0; }
-
-   /*!
-    * Returns the width of a rectangle.
-    */
-   ossim_float64 width()  const
-      { return fabs(theLrCorner.x - theLlCorner.x) + 1.0; }
-   
-   inline ossimDpt midPoint()const;
-   void print(std::ostream& os) const;
-   
-   ossimVrect combine(const ossimVrect& rect)const;
-   inline ossimVrect clipToRect(const ossimVrect& rect)const;
-
-   friend std::ostream& operator<<(std::ostream& os, const ossimVrect& rect);
-
-private:
-   ossimDpt theUlCorner;
-   ossimDpt theLlCorner;
-   ossimDpt theLrCorner;
-   ossimDpt theUrCorner;
-};
-
-inline const ossimVrect& ossimVrect::operator=(const ossimVrect& rect)
-{
-   if (this != &rect)
-   {
-      theUlCorner = rect.ul();
-      theUrCorner = rect.ur();
-      theLrCorner = rect.lr();
-      theLlCorner = rect.ll();
-   }
-
-   return *this;
-}
-
-inline bool ossimVrect::operator!=(const ossimVrect& rect) const
-{
-   return ( (theUlCorner != rect.ul()) ||
-            (theUrCorner != rect.ur()) ||
-            (theLrCorner != rect.lr()) ||
-            (theLlCorner != rect.ll()) );
-}
-
-inline bool ossimVrect::operator==(const ossimVrect& rect) const
-{
-   return ( (theUlCorner == rect.ul()) &&
-            (theUrCorner == rect.ur()) &&
-            (theLrCorner == rect.lr()) &&
-            (theLlCorner == rect.ll()) );
-}
-
-
-inline ossimVrect ossimVrect::clipToRect(const ossimVrect& rect)const
-{
-    ossim_float64     ulx, uly, lrx, lry;
-
-    // XXX not replaced with std::max or ossim::max since the test is backward 
-    //     here and will give a different answer in the case of nan.
-    #define d_MAX(a,b)      (((a)>(b)) ? a : b)
-
-    ulx = d_MAX(rect.ul().x,ul().x);
-    uly = d_MAX(rect.ul().y,ul().y);
-
-    #undef d_MAX
-
-    lrx = std::min(rect.lr().x,lr().x);
-    lry = std::min(rect.lr().y,lr().y);
-
-    if( lrx <= ulx || lry <= uly )
-        return ossimVrect(ossimDpt(0,0),ossimDpt(0,0));
-    else
-       return ossimVrect(ulx,uly,lrx,lry);
-}
-
-inline ossimDpt ossimVrect::midPoint()const
-{
-   return ossimDpt( (ul().x + ur().x + ll().x + lr().x)*.25,
-               (ul().y + ur().y + ll().y + lr().y)*.25);
-}
-
-inline ossimVrect ossimVrect::combine(const ossimVrect& rect)const
-{
-   ossimDpt ulCombine;
-   ossimDpt lrCombine;
-   
-   ulCombine.x = ((ul().x <= rect.ul().x)?ul().x:rect.ul().x);
-   ulCombine.y = ((ul().y >= rect.ul().y)?ul().y:rect.ul().y);
-   lrCombine.x = ((lr().x >= rect.lr().x)?lr().x:rect.lr().x);
-   lrCombine.y = ((lr().y <= rect.lr().y)?lr().y:rect.lr().y);
-
-   return ossimVrect(ulCombine, lrCombine);
-}
-
-#endif
diff --git a/include/ossim/base/ossimXmlString.h b/include/ossim/base/ossimXmlString.h
deleted file mode 100644
index 8105f99..0000000
--- a/include/ossim/base/ossimXmlString.h
+++ /dev/null
@@ -1,67 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author: Garrett Potts
-// Description: This class provides manipulation of filenames.
-//
-//*************************************************************************
-// $Id: ossimXmlString.h 22328 2013-07-25 17:17:52Z gpotts $
-
-#ifndef ossimXmlString_HEADER
-#define ossimXmlString_HEADER
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimString.h>
-
-class OSSIM_DLL ossimXmlString : public ossimString
-{
-public:
-   ossimXmlString()
-      :
-         ossimString()
-      {}
-   ossimXmlString(const ossimXmlString& src)
-      :
-         ossimString(src)
-      {}
-   ossimXmlString(const ossimString& src)
-      :
-         ossimString("")
-      {
-         assign(src);
-
-      }
-   ossimXmlString(const char* src)
-      :
-         ossimString("")
-      {
-         assign(src);
-      }
-   
-   template <class Iter>
-   ossimXmlString(Iter s, Iter e)
-      :ossimString("")
-      {
-         assign(ossimString(s, e));
-      }
-
-   const ossimXmlString& operator =(const char* s)
-      {
-         return assign(ossimString(s));
-      }
-   	  const ossimXmlString& operator =(const ossimString& s)
-      {
-         return assign(ossimString(s));
-      }
-	  const ossimXmlString& operator =(const std::string& s)
-      {
-         return assign(ossimString(s));
-      }
-   static ossimString wrapCDataIfNeeded(const ossimString& input);
-   static ossimString wrapCData(const ossimString& input);
-   static bool containsSpecialXmlCharacters(const ossimString& value);
-   const ossimXmlString& assign(const ossimString& s);
-};
-
-#endif
diff --git a/include/ossim/elevation/ossimDtedElevationDatabase.h b/include/ossim/elevation/ossimDtedElevationDatabase.h
deleted file mode 100644
index 3c85efd..0000000
--- a/include/ossim/elevation/ossimDtedElevationDatabase.h
+++ /dev/null
@@ -1,74 +0,0 @@
-#ifndef ossimDtedElevationDatabase_HEADER
-#define ossimDtedElevationDatabase_HEADER
-#include "ossimElevationDatabase.h"
-#include <ossim/base/ossimFilename.h>
-#include <ossim/elevation/ossimDtedHandler.h>
-#include <OpenThreads/Mutex>
-
-class OSSIM_DLL ossimDtedElevationDatabase : public ossimElevationCellDatabase
-{
-public:
-   typedef std::vector<ossimRefPtr<CellInfo> > DirectMap; // 360x180 cell grid
-   ossimDtedElevationDatabase()
-   :ossimElevationCellDatabase(),
-   m_extension("")
-   {
-   }
-   ossimDtedElevationDatabase(const ossimDtedElevationDatabase& rhs)
-   :ossimElevationCellDatabase(rhs),
-   m_extension(rhs.m_extension)
-   {
-   }
-   virtual ~ossimDtedElevationDatabase()
-   {
-   }
-   ossimObject* dup()const
-   {
-      return new ossimDtedElevationDatabase(*this);
-   }
-   virtual bool open(const ossimString& connectionString);
-   virtual bool pointHasCoverage(const ossimGpt& gpt) const
-   {
-      ossimFilename filename;
-      createFullPath(filename, gpt);
-      
-      return filename.exists();
-   }
-   
-   virtual bool getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const;
-   virtual double getHeightAboveMSL(const ossimGpt&);
-   virtual double getHeightAboveEllipsoid(const ossimGpt& gpt);
-   virtual ossim_uint64 createId(const ossimGpt& pt)const
-   {
-      ossim_uint64 y = static_cast<ossim_uint64>(ossim::wrap(pt.latd(), -90.0, 90.0)+90.0);
-      ossim_uint64 x = static_cast<ossim_uint64>(ossim::wrap(pt.lond(),-180.0,180.0)+180.0);
-      // map the extreme edge to the same ID ax the 179 west cell and the same for the 89
-      // degree north cell.
-      //
-      x = x==360?359:x;
-      y = y==180?179:y;
-      // dted databases are 1x1 degree cells and we will use a world 
-      // grid for id generation.
-      //
-      return (y*360+x);
-   }
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix = 0);
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix = 0)const;
-   
-protected:
-   ossimString                m_extension;
-   ossimRefPtr<ossimElevCellHandler> m_lastHandler;
-   mutable OpenThreads::Mutex m_mutex;
-   
-   bool openDtedDirectory(const ossimFilename& dir);
-   void createRelativePath(ossimFilename& file, const ossimGpt& gpt)const;
-   void createFullPath(ossimFilename& file, const ossimGpt& gpt)const
-   {
-      ossimFilename relativeFile;
-      createRelativePath(relativeFile, gpt);
-      file = ossimFilename(m_connectionString).dirCat(relativeFile);
-   }
-   virtual ossimRefPtr<ossimElevCellHandler> createCell(const ossimGpt& gpt);
-TYPE_DATA
-};
-#endif
diff --git a/include/ossim/elevation/ossimDtedFactory.h b/include/ossim/elevation/ossimDtedFactory.h
deleted file mode 100644
index 62e47c9..0000000
--- a/include/ossim/elevation/ossimDtedFactory.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//*****************************************************************************
-// FILE: ossimDtedFactory.cc
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author:  David Burken
-//
-// Description:
-//
-// Class declaration for ossimDtedFactory.
-// This is the base class interface for elevation cell factories.
-//*****************************************************************************
-// $Id: ossimDtedFactory.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimDtedFactory_HEADER
-#define ossimDtedFactory_HEADER
-
-#include <ossim/elevation/ossimElevSourceFactory.h>
-
-/** CLASS:  ossimDtedFactory */
-class OSSIM_DLL ossimDtedFactory : public ossimElevSourceFactory
-{
-public:
-
-   ossimDtedFactory();
-   ossimDtedFactory(const ossimFilename& dir);
-      
-
-   virtual ossimElevSource* getNewElevSource(const ossimGpt& gpt) const;
-   virtual void createIndex();
-protected:
-   virtual ~ossimDtedFactory();
-
-TYPE_DATA
-};
-
-#endif /* End of "#ifndef ossimDtedFactory_HEADER" */
diff --git a/include/ossim/elevation/ossimDtedHandler.h b/include/ossim/elevation/ossimDtedHandler.h
deleted file mode 100644
index 13f469b..0000000
--- a/include/ossim/elevation/ossimDtedHandler.h
+++ /dev/null
@@ -1,235 +0,0 @@
-//*****************************************************************************
-// FILE: ossimDtedHandler.h
-//
-// License:  See top level LICENSE.txt file.
-//
-// DESCRIPTION:
-//   Contains declaration of class ossimDtedHandler. This class derives from
-//   ossimElevHandler. It is responsible for loading an individual DTED cell
-//   from disk. This elevation files are memory mapped.
-//
-// SOFTWARE HISTORY:
-//>
-//   05Feb2001  Ken Melero
-//              Initial coding of ossimDted.h
-//   19Apr2001  Oscar Kramer
-//              Derived from ossimElevCellHandler.
-//<
-//*****************************************************************************
-// $Id: ossimDtedHandler.h 21210 2012-07-03 13:11:20Z gpotts $
-
-#ifndef ossimDtedHandler_HEADER
-#define ossimDtedHandler_HEADER
-
-#include <fstream>
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/elevation/ossimElevCellHandler.h>
-#include <OpenThreads/Mutex>
-#include <ossim/support_data/ossimDtedVol.h>
-#include <ossim/support_data/ossimDtedHdr.h>
-#include <ossim/support_data/ossimDtedUhl.h>
-#include <ossim/support_data/ossimDtedDsi.h>
-#include <ossim/support_data/ossimDtedAcc.h>
-#include <ossim/support_data/ossimDtedRecord.h>
-
-class OSSIM_DLL ossimDtedHandler : public ossimElevCellHandler
-{
-public:
-
-   /// number of Dted posts per point.
-   static const int TOTAL_POSTS = 4;
-   /// number of Dted posts per block
-   static const int NUM_POSTS_PER_BLOCK= 2;
-
-   /// ossimDtedHandler
-   ossimDtedHandler()
-   {
-      
-   }
-   ossimDtedHandler(const ossimFilename& dted_file, bool memoryMapFlag=false);
-   
-
-   enum
-   {
-      DATA_RECORD_OFFSET_TO_POST = 8,     // bytes
-      DATA_RECORD_CHECKSUM_SIZE  = 4,     // bytes
-      POST_SIZE                  = 2,     // bytes
-      NULL_POST                  = -32767 // Fixed by DTED specification.
-   };
-
-   virtual bool open(const ossimFilename& file, bool memoryMapFlag=false);
-   virtual void close();
-   
-   /*!
-    * METHOD: getHeightAboveMSL
-    * Height access methods.
-    */
-   virtual double getHeightAboveMSL(const ossimGpt&);
-
-   /*!
-    *  METHOD:  getSizeOfElevCell
-    *  Returns the number of post in the cell.  Satisfies pure virtual.
-    *  Note:  x = longitude, y = latitude
-    */
-   virtual ossimIpt getSizeOfElevCell() const;
-      
-   /*!
-    *  METHOD:  getPostValue
-    *  Returns the value at a given grid point as a double.
-    *  Satisfies pure virtual.
-    */
-   virtual double getPostValue(const ossimIpt& gridPt) const;
-
-   ossimString  edition()         const;
-   ossimString  productLevel()    const;
-   ossimString  compilationDate() const;
-
-   virtual bool isOpen()const;
-   
-   virtual bool getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const;
-   
-   const ossimDtedVol& vol()const
-   {
-      return m_vol;
-   }
-   const ossimDtedHdr& hdr()const
-   {
-      return m_hdr;
-   }
-   const ossimDtedUhl& uhl()const
-   {
-      return m_uhl;
-   }
-   const ossimDtedDsi& dsi()const
-   {
-      return m_dsi;
-   }
-   const ossimDtedAcc& acc()const
-   {
-      return m_acc;
-   }
-protected:
-
-   /// DtedPost, this class contains the height, weighting factor and status
-   class DtedPost
-   {
-   public:
-     // constructor - initialise variables
-     DtedPost():
-       m_height(0),
-       m_weight(0),
-       m_status(false)
-     {
-     }
-     // destructor
-     virtual ~DtedPost();
-     // member variables
-     double m_height;
-     double m_weight;
-     bool m_status;
-   };
-
-   /// DtedHeight is a class for storing DTED information
-   /// - 4 posts are used to generate an interpolated height value.
-   class DtedHeight
-   {
-   public:
-     // constructor
-     DtedHeight();
-     // destructor
-     virtual ~DtedHeight();
-     // calculate the interpolated Height for the posts
-     double calcHeight();
-     // debug
-     void debug();
-     // post data
-     DtedPost m_posts[TOTAL_POSTS];
-   };
-
-
-   virtual ~ossimDtedHandler();
-  // Disallow operator= and copy construction...
-   const ossimDtedHandler& operator=(const ossimDtedHandler& rhs);
-   ossimDtedHandler(const ossimDtedHandler&);
-
-   /*!
-    *  If statistics file exist, stats will be initialized from that; else,
-    *  this scans the dted cell and gets stats, then, writes new stats file.
-    *  The statistics file will be named accordingly:
-    *  If dted cell = n27.dt1 then the stats file = n27.statistics.
-    *  Currently method only grabs the min and max posts value.
-    */
-   void gatherStatistics();
-
-   ossim_sint16 convertSignedMagnitude(ossim_uint16& s) const;
-   virtual double getHeightAboveMSL(const ossimGpt&, bool readFromFile);
-
-  /**
-   * read the height posts from the File
-   * @param postData - post heights, status & weight
-   * @param offset - file contents offset to start reading from
-   */
-   void readPostsFromFile(DtedHeight &postData, int offset);
-
-   mutable OpenThreads::Mutex m_fileStrMutex;
-   mutable std::ifstream m_fileStr;
-   
-   ossim_int32      m_numLonLines;  // east-west dir
-   ossim_int32      m_numLatPoints; // north-south
-   ossim_int32      m_dtedRecordSizeInBytes;
-   ossimString      m_edition;
-   ossimString      m_productLevel;
-   ossimString      m_compilationDate;
-   ossim_int32      m_offsetToFirstDataRecord;
-   double           m_latSpacing;   // degrees
-   double           m_lonSpacing;   // degrees
-   ossimDpt         m_swCornerPost; // cell origin;
-
-   // Indicates whether byte swapping is needed.
-   bool m_swapBytesFlag;
-
-   mutable OpenThreads::Mutex m_memoryMapMutex;
-   mutable std::vector<ossim_uint8> m_memoryMap;
-   
-   ossimDtedVol m_vol;
-   ossimDtedHdr m_hdr;
-   ossimDtedUhl m_uhl;
-   ossimDtedDsi m_dsi;
-   ossimDtedAcc m_acc;
-   TYPE_DATA
-};
-
-inline ossim_sint16 ossimDtedHandler::convertSignedMagnitude(ossim_uint16& s) const
-{
-   // DATA_VALUE_MASK 0x7fff = 0111 1111 1111 1111
-   // DATA_SIGN_MASK  0x8000 = 1000 0000 0000 0000
-   
-   // First check to see if the bytes need swapped.
-   s = (m_swapBytesFlag ? ( ((s & 0x00ff) << 8) | ((s & 0xff00) >> 8) ) : s);
-   
-   // If the sign bit is set, mask it out then multiply by negative one.
-   if (s & 0x8000)
-   {
-      return (static_cast<ossim_sint16>(s & 0x7fff) * -1);
-   }
-   
-   return static_cast<ossim_sint16>(s);
-}
-
-inline bool ossimDtedHandler::isOpen()const
-{
-   if(!m_memoryMap.empty()) return true;
-   
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_fileStrMutex);
-   return (m_fileStr.is_open());
-}
-
-inline void ossimDtedHandler::close()
-{
-   m_fileStr.close();
-   m_memoryMap.clear();
-}
-
-#endif
diff --git a/include/ossim/elevation/ossimElevCellHandler.h b/include/ossim/elevation/ossimElevCellHandler.h
deleted file mode 100644
index 7d6e251..0000000
--- a/include/ossim/elevation/ossimElevCellHandler.h
+++ /dev/null
@@ -1,110 +0,0 @@
-//*****************************************************************************
-// FILE: ossimElevCellHandler.h
-//
-// License:  See top level LICENSE.txt file.
-//
-// DESCRIPTION:
-//   Contains declaration of class osimElevHandler. This class provides a
-//   base-class interface for the various DEM file formats.
-//
-// SOFTWARE HISTORY:
-//>
-//   13Apr2001  Oscar Kramer
-//              Initial coding.
-//<
-//*****************************************************************************
-// $Id: ossimElevCellHandler.h 21210 2012-07-03 13:11:20Z gpotts $
-
-
-#ifndef ossimElevCellHandler_HEADER
-#define ossimElevCellHandler_HEADER
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/elevation/ossimElevSource.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimIpt.h>
-
-class ossimGpt;
-
-/******************************************************************************
- *
- * CLASS:  ossimElevCellHandler
- *
- *****************************************************************************/
-class OSSIM_DLL ossimElevCellHandler : public ossimElevSource
-{
-public:
-   /**
-    * Constructors:
-    */
-
-   ossimElevCellHandler (const char* elev_filename);
-   ossimElevCellHandler (const ossimElevCellHandler& src);
-
-
-   const ossimElevCellHandler& operator=(const ossimElevCellHandler& rhs);
-   virtual ossimFilename getFilename() const;
-   
-   
-   /**
-    *  METHOD:  getSizeOfElevCell 
-    *  Returns the number of post in the cell.
-    *  Note:  x = longitude, y = latitude
-    */
-   virtual ossimIpt getSizeOfElevCell() const = 0;
-
-   /**
-    *  METHOD:  getPostValue
-    *  Returns the value at a given grid point as a double.
-    */
-   virtual double getPostValue(const ossimIpt& gridPt) const = 0;
-      
-   /**
-    * METHOD: meanSpacingMeters()
-    * Implements pure virtual for. This method is used for deterrming
-    * preferred DEM among multiple overlapping elev sources:
-    */
-   virtual double getMeanSpacingMeters() const;
-
-   /**
-    * METHOD: pointIsInsideRect()
-    * Method to check if the ground point elevation is defined:
-    */
-   virtual bool pointHasCoverage(const ossimGpt&) const;
-
-   virtual bool getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const;
-   /**
-    * METHODS: accuracyLE90(), accuracyCE90()
-    * Returns the vertical and horizontal accuracy (90% confidence):
-    */
- // virtual double getAccuracyLE90(const ossimGpt&) const;
- //  virtual double getAccuracyCE90(const ossimGpt&) const;
-
-   bool canConnectMyInputTo(ossim_int32 inputIndex,
-                            const ossimConnectableObject* object)const;
-   virtual void close(){}
-   virtual bool open(const ossimFilename&, bool=false){return false;}
-      
-protected:
-   ossimElevCellHandler ();
-   virtual ~ossimElevCellHandler();
-   
-   /**
-    * Virtual method for reading 
-    */
-   ossimFilename        theFilename;
-   double               theMeanSpacing;  // meters
-   double               theAbsLE90;
-   double               theAbsCE90;
-
-
-   
-TYPE_DATA
-};
-
-inline bool ossimElevCellHandler::pointHasCoverage(const ossimGpt& gpt) const
-{
-   return theGroundRect.pointWithin(gpt);
-}
-
-#endif
diff --git a/include/ossim/elevation/ossimElevManager.h b/include/ossim/elevation/ossimElevManager.h
deleted file mode 100644
index 013fc20..0000000
--- a/include/ossim/elevation/ossimElevManager.h
+++ /dev/null
@@ -1,148 +0,0 @@
-//*****************************************************************************
-// FILE: ossimElevManager.h
-//
-// License:  See top level LICENSE.txt file.
-//
-// DESCRIPTION:
-//   Contains declaration of class ossimElevManager. This object provides a
-//   single interface to an imaging chain for accessing multiple elevation
-//   sources. This object owns one or more elevation sources in an ordered
-//   list. When queried for an elevation at a particular point, it searches
-//   the available sources for the best result, instantiating new sources if
-//   necessary.
-//
-// SOFTWARE HISTORY:
-//>
-//   13Apr2001  Oscar Kramer
-//              Initial coding.
-//<
-//*****************************************************************************
-#ifndef ossimElevManager_HEADER
-#define ossimElevManager_HEADER
-#include <vector>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimVisitor.h>
-#include <ossim/elevation/ossimElevSource.h>
-#include <ossim/elevation/ossimElevationDatabase.h>
-#include <OpenThreads/ReadWriteMutex>
-class OSSIM_DLL ossimElevManager : public ossimElevSource
-{
-public: 
-   typedef std::vector<ossimRefPtr<ossimElevationDatabase> > ElevationDatabaseListType;
-   
-   class OSSIM_DLL ConnectionStringVisitor : public ossimVisitor
-   {
-   public:
-      ConnectionStringVisitor(const ossimString& value):m_connectionString(value){}
-      virtual ossimRefPtr<ossimVisitor> dup()const{return new ConnectionStringVisitor(*this);}
-      const ossimString& getConnectionString()const{return m_connectionString;}
-      virtual void visit(ossimObject* obj);
-      ossimElevationDatabase* getElevationDatabase(){return m_database.get();} 
-      
-   protected:
-      ossimString m_connectionString;
-      ossimRefPtr<ossimElevationDatabase> m_database;
-   };
-   
-   virtual ~ossimElevManager();
-   
-   /**
-    * METHOD: instance()
-    * Implements singelton pattern
-    */
-   static ossimElevManager* instance();
-   
-   virtual double getHeightAboveEllipsoid(const ossimGpt& gpt);
-   virtual double getHeightAboveMSL(const ossimGpt& gpt);
-
-
-   virtual bool pointHasCoverage(const ossimGpt& /*gpt*/) const
-   {
-      std::cout << "ossimElevManager::pointHasCoverage(): NOT IMPLEMENTED!!!\n";
-      return false;
-   }
-   virtual double getMeanSpacingMeters() const
-   {
-      std::cout << "ossimElevManager::pointHasCoverage(): NOT IMPLEMENTED AND SHOULD NOT BE USED AT THIS LEVEL!!!\n";
-      return 1.0;
-   }
-   virtual bool getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const;
-  
-   ossim_uint32 getNumberOfElevationDatabases()const
-   {
-      return (ossim_uint32)m_elevationDatabaseList.size();
-   }
-   ossimElevationDatabase* getElevationDatabase(ossim_uint32 idx)
-   {
-      return m_elevationDatabaseList[idx].get();
-   }
-   const ossimElevationDatabase* getElevationDatabase(ossim_uint32 idx)const
-   {
-      return m_elevationDatabaseList[idx].get();
-   }
-   ElevationDatabaseListType& getElevationDatabaseList()
-   {
-      return m_elevationDatabaseList;
-   }
-   const ElevationDatabaseListType& getElevationDatabaseList()const
-   {
-      return m_elevationDatabaseList;
-   }
-   void addDatabase(ossimElevationDatabase* database);
-   bool loadElevationPath(const ossimFilename& path);
-   
-   void setDefaultHeightAboveEllipsoid(double meters) {m_defaultHeightAboveEllipsoid=meters;}
-   void setElevationOffset(double meters) {m_elevationOffset=meters;}
-   double getElevationOffset() const { return m_elevationOffset; }
-   
-   void getOpenCellList(std::vector<ossimFilename>& list) const;
-
-   void setUseGeoidIfNullFlag(bool flag)
-   {
-      m_useGeoidIfNullFlag = flag;
-   }
-   
-   bool getUseGeoidIfNullFlag()const
-   {
-      return m_useGeoidIfNullFlag;
-   }
-   void clear();
-   /**
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0) const;
-   
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-   virtual void accept(ossimVisitor& visitor);
-   
-protected:
-   ossimElevManager();
-   void loadStandardElevationPaths();
-   
-   static ossimElevManager* m_instance;
-   ElevationDatabaseListType m_elevationDatabaseList;
-   ossim_float64 m_defaultHeightAboveEllipsoid;
-   ossim_float64 m_elevationOffset;
-   
-   // if an elevation is returned that's null for ellipsoid then use the geoid manager to calculate a shift
-   //
-   bool          m_useGeoidIfNullFlag; 
-   
-   
-   /**
-    * I have tried the readwrite lock interfaces but have found it unstable.  I am using the standard Mutex
-    * and it seems to be much more stable across all platforms.  More testing needs to occur for the ReadWriteMutex.
-    * For now we will use Mutex.
-    */
-   OpenThreads::Mutex m_mutex;
-};
-
-#endif
diff --git a/include/ossim/elevation/ossimElevSource.h b/include/ossim/elevation/ossimElevSource.h
deleted file mode 100644
index 2882d2f..0000000
--- a/include/ossim/elevation/ossimElevSource.h
+++ /dev/null
@@ -1,181 +0,0 @@
-//*****************************************************************************
-// FILE: ossimElevSource.h
-//
-// License:  See top level LICENSE.txt file.
-// 
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION:
-//   Contains declaration of class ossimElevSource. This is the base class for
-//   all objects providing height information given horizontal ground position.
-//
-//*****************************************************************************
-// $Id: ossimElevSource.h 21380 2012-07-25 13:18:31Z gpotts $
-
-#ifndef ossimElevSource_HEADER
-#define ossimElevSource_HEADER
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimSource.h>
-#include <ossim/base/ossimGrect.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimGeoid.h>
-#include <ossim/elevation/ossimElevationAccuracyInfo.h>
-class ossimEcefRay;
-class ossimKeywordlist;
-
-/******************************************************************************
- * CLASS:  ossimElevSource
- *
- *****************************************************************************/
-class OSSIM_DLL ossimElevSource : public ossimSource
-{
-public:
-
-   virtual const ossimElevSource& operator = (const ossimElevSource& src);
-   /**
-    * Height access methods:
-    */
-   virtual double getHeightAboveMSL(const ossimGpt&) = 0;
-   virtual double getHeightAboveEllipsoid(const ossimGpt&);
-
-   /**
-    *  METHOD: intersectRay()
-    *  
-    *  Service method for intersecting a ray with the elevation surface to
-    *  arrive at a ground point. The ray is expected to originate ABOVE the
-    *  surface and pointing down.
-    *
-    *  NOTE: the gpt argument is expected to be initialized with the desired
-    *  datum, including ellipsoid, for the proper intersection point to be
-    *  computed.
-    *
-    *  LIMITATION: This release supports only single valued solutions, i.e., it
-    *  is possible a ray passing through one side of a mountain and out the
-    *  other will return an intersection with the far side. Eventually,
-    *  a more robust algorithm will be employed.
-    *
-    *  Returns true if good intersection found.
-    */
-   bool intersectRay(const ossimEcefRay& ray, ossimGpt& gpt, double defaultElevValue = 0.0);
-   
-   /**
-    * Access methods for the bounding elevations:
-    */
-   virtual double getMinHeightAboveMSL() const;
-   virtual double getMaxHeightAboveMSL() const;
-
-   /**
-    * Special numeric quantities as defined by this source:
-    */
-   double getNullHeightValue() const;
-   double getSeaLevelValue()   const;
-
-   /**
-    * METHOD: pointHasCoverage(gpt)
-    * Returns TRUE if coverage exists over gpt:
-    */
-   virtual bool pointHasCoverage(const ossimGpt&) const = 0;
-
-   /**
-    * METHOD: meanSpacingMeters()
-    * This method returns the post spacing in the region of gpt:
-    */
-   virtual double getMeanSpacingMeters() const = 0;
-
-
-   virtual bool getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const =0;
-
-
-
-   /**
-    * METHODS: accuracyLE90(), accuracyCE90()
-    * Returns the vertical and horizontal accuracy (90% confidence) in the
-    * region of gpt:
-    */
-   //virtual double getAccuracyLE90(const ossimGpt& gpt) const = 0;
-   //virtual double getAccuracyCE90(const ossimGpt& gpt) const = 0;
-
-
-   /**
-    *  METHOD:  getBoundingGndRect
-    *  
-    *  @return  The bounding geograpic rectangle in decimal degrees.
-    */
-   virtual const ossimGrect& getBoundingGndRect() const;
-   
-   virtual bool canConnectMyInputTo(ossim_int32 inputIndex,
-                                    const ossimConnectableObject* object)const;
-   
-   /**
-    * Implement ossimSource base-class pure virtuals:
-    */
-   virtual void initialize();
-
-//   virtual ossimFilename getFilename() const;
-
-   /**
-    * Opens a stream to an elevation cell.
-    *
-    * @return Returns true on success, false on error.
-    *
-    * @note This implementation always returns true.  This should be
-    * overridden in derived classes that have streams to files.
-    */
-//   virtual bool open();
-   
-   /**
-    * Closes the stream to the file.
-    *
-    * @note This implementation does nothing.  This should be
-    * overridden in derived classes that have streams to files.
-    */
-//   virtual void close();
-
-   /**
-    * @return Returns the flag which controls whether or not statistics will
-    * be computed upon opening a cell and not finding a corresponding
-    * statistics file.
-    */
-   virtual bool getComputeStatisticsFlag() const;
-
-   /**
-    * Sets the flag which controls whether or not statistics will
-    * be computed upon opening a cell and not finding a corresponding
-    * statistics file.
-    *
-    * @param flag  true to enable, false to disable.
-    *
-    * @note This flag can also be controlled by user via the ossim preferences
-    * keyword = "elevation.compute_statistics.enabled".
-    */
-   virtual void setComputeStatisticsFlag(bool flag);
-
-
-protected:
-   virtual ~ossimElevSource();
-   /**
-    * Constructors/Destructors:
-    */
-   ossimElevSource();
-   ossimElevSource(const ossimElevSource& src);
-
-   /**
-    * Data members:
-    */
-   double     theMinHeightAboveMSL;
-   double     theMaxHeightAboveMSL;
-   double     theNullHeightValue;
-   double     theSeaLevelValue;
-   ossimGrect theGroundRect;
-
-   //> Controls statistics gathering.  Defaulted to true.
-   bool       theComputeStatsFlag;
-
-
-private:
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/elevation/ossimElevSourceFactory.h b/include/ossim/elevation/ossimElevSourceFactory.h
deleted file mode 100644
index 28c87ec..0000000
--- a/include/ossim/elevation/ossimElevSourceFactory.h
+++ /dev/null
@@ -1,74 +0,0 @@
-//----------------------------------------------------------------------------
-// FILE: ossimElevSourceFactory.cc
-//
-// Copyright (C) 2002 ImageLinks, Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Class declaration for ossimElevSourceFactory.
-//
-// This is the base class interface for elevation source factories which main
-// function is to return an elevation source that covers the ground point
-// passed to the "getElevSource" method.
-//
-// Note the caller of "getElevSource" is responsible for managing the memory
-// new'd from the method.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimElevSourceFactory.h 13269 2008-07-25 14:27:36Z dburken $
-
-#ifndef ossimElevSourceFactory_HEADER
-#define ossimElevSourceFactory_HEADER
-
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimFilename.h>
-
-class ossimElevSource;
-class ossimGpt;
-
-/*!****************************************************************************
- * CLASS:  ossimElevSourceFactory
- *
- *****************************************************************************/
-class OSSIM_DLL ossimElevSourceFactory : public ossimObject
-{
-public:
-
-   /** default constructor */
-   ossimElevSourceFactory();
-
-   /** virtual destructor */
-   virtual ~ossimElevSourceFactory();
-
-   /**
-    *  Pure virtual method.
-    *  return an elevation source pointer that has elevation coverage for the
-    *  ground point passed in.
-    *  Note the caller of this method is responsible for managing the memory
-    *  allocated.
-    */
-   virtual ossimElevSource* getNewElevSource(const ossimGpt& gpt)const=0;
-
-   /**
-    * @return The directory the factory returns data from.
-    */
-   virtual ossimFilename getDirectory() const;
-
-   /**
-    * @param directory The directory to return data from.
-    */
-   virtual void setDirectory(const ossimFilename& directory);
-
-protected:
-   ossimFilename theDirectory;
-   
-TYPE_DATA
-}; 
-
-#endif /* End of "#ifndef ossimElevSourceFactory_HEADER" */
diff --git a/include/ossim/elevation/ossimElevationDatabase.h b/include/ossim/elevation/ossimElevationDatabase.h
deleted file mode 100644
index 706ebe9..0000000
--- a/include/ossim/elevation/ossimElevationDatabase.h
+++ /dev/null
@@ -1,231 +0,0 @@
-#ifndef ossimElevationDatabase_HEADER
-#define ossimElevationDatabase_HEADER
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimReferenced.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimGeoid.h>
-#include <ossim/base/ossimGeoidManager.h>
-#include <ossim/elevation/ossimElevSource.h>
-#include <ossim/elevation/ossimElevCellHandler.h>
-#include <ossim/base/ossimTimer.h>
-#include <vector>
-#include <map>
-class OSSIM_DLL ossimElevationDatabase : public ossimElevSource
-{
-public:
-   
-   ossimElevationDatabase()
-   :ossimElevSource(),
-   m_meanSpacing(0.0)
-   {
-   }
-      
-   ossimElevationDatabase(const ossimElevationDatabase& src)
-   :ossimElevSource(src),
-   m_connectionString(src.m_connectionString),
-   m_geoid(src.m_geoid),
-   m_meanSpacing(src.m_meanSpacing)
-   {
-   }
-
-   const ossimElevationDatabase& operator = (const ossimElevationDatabase& rhs);
-      
-   virtual bool getAccuracyInfo(ossimElevationAccuracyInfo& /*info*/, const ossimGpt& /*gpt*/) const
-   {
-      return false;
-   }
-  virtual double getMeanSpacingMeters() const
-   {
-      return m_meanSpacing;
-   }
-   virtual void setGeoid(ossimGeoid* geoid)
-   {
-      m_geoid = geoid;
-   }
-   ossimGeoid* getGeoid()
-   {
-      return m_geoid.get();
-   }
-   const ossimGeoid* getGeoid()const
-   {
-      return m_geoid.get();
-   }
-   
-   /**
-    * Open a connection to a database.  In most cases this will be a pointer
-    * to a directory like in a Dted directory reader.  
-    *
-    */
-   virtual bool open(const ossimString& connectionString)=0;
-   const ossimString& getConnectionString()const
-   {
-      return m_connectionString;
-   }
-   virtual void getOpenCellList(std::vector<ossimFilename>& /* list */) const
-   {
-   }
-
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-   
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix)const;
-   
-protected:
-   virtual ~ossimElevationDatabase()
-   {
-      m_geoid = 0;
-   }
-   virtual double getOffsetFromEllipsoid(const ossimGpt& gpt)const;
-
-   ossimString m_connectionString;
-   ossimRefPtr<ossimGeoid>    m_geoid;
-   ossim_float64              m_meanSpacing;
-   
-TYPE_DATA
-};
-
-class OSSIM_DLL ossimElevationCellDatabase : public ossimElevationDatabase
-{
-public:
-   struct CellInfo : ossimReferenced
-   {
-      CellInfo(ossim_uint64 id,
-               ossimElevCellHandler* handler = 0)
-         :ossimReferenced(),
-          m_id(id),
-          m_handler(handler),
-          m_timestamp(0)
-      {
-            m_timestamp = ossimTimer::instance()->tick();
-      }
-      CellInfo(const CellInfo& src)
-         :ossimReferenced(src),
-          m_id(src.m_id),
-          m_handler(src.m_handler),
-          m_timestamp(src.m_timestamp)
-      {
-      }
-      CellInfo()
-         :ossimReferenced(),
-          m_id(0),
-          m_handler(0),
-          m_timestamp(0)
-      {
-      }
-      const CellInfo& operator =(const CellInfo& src)
-      {
-         if (this != &src)
-         {
-            m_id = src.m_id;
-            m_handler = src.m_handler;
-            m_timestamp = src.m_timestamp;
-         }
-         return *this;
-      }
-      void updateTimestamp()
-      {
-         m_timestamp = ossimTimer::instance()->tick();
-      }
-      ossim_uint64 id()const
-      {
-         return m_id;
-      }
-      ossim_uint64                      m_id;
-      ossimRefPtr<ossimElevCellHandler> m_handler;
-      ossimTimer::Timer_t               m_timestamp;
-   };
-   typedef std::map<ossim_uint64, ossimRefPtr<CellInfo> > CellMap;
-   
-   ossimElevationCellDatabase()
-      :ossimElevationDatabase(),
-      m_minOpenCells(5),
-      m_maxOpenCells(10),
-      m_memoryMapCellsFlag(false)
-   {
-   }
-   ossimElevationCellDatabase(const ossimElevationCellDatabase& src)
-      :ossimElevationDatabase(src),
-      m_minOpenCells(src.m_minOpenCells),
-      m_maxOpenCells(src.m_maxOpenCells),
-      m_cacheMap(src.m_cacheMap),
-      m_memoryMapCellsFlag(src.m_memoryMapCellsFlag)
-   {
-   }
-   const ossimElevationCellDatabase& operator=(const ossimElevationCellDatabase& rhs);
-
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix)const;
-   virtual ossim_uint32 getMinOpenCells()const
-   {
-      return m_minOpenCells;
-   }
-   virtual ossim_uint32 getMaxOpenCells()const
-   {
-      return m_maxOpenCells;
-   }
-   virtual void setMinMaxOpenCells(ossim_uint64 minCellCount,
-                                   ossim_uint64 maxCellCount)
-   {
-      m_minOpenCells = minCellCount;
-      m_maxOpenCells = maxCellCount;
-   }
-   virtual bool getMemoryMapCellsFlag()const
-   {
-      return m_memoryMapCellsFlag;
-   }
-   virtual void setMemoryMapCellsFlag(bool flag)
-   {
-      m_memoryMapCellsFlag = flag;
-   }
-   virtual void getOpenCellList(std::vector<ossimFilename>& list) const;
-   virtual ossim_uint64 createId(const ossimGpt& /* pt */)const
-   {
-      return 0;
-   }
-   virtual ossimRefPtr<ossimElevCellHandler> getOrCreateCellHandler(const ossimGpt& gpt);
-protected:
-   virtual ossimRefPtr<ossimElevCellHandler> createCell(const ossimGpt& /* gpt */)
-   {
-      return 0;
-   }
-   virtual void remove(ossim_uint64 id)
-   {
-      CellMap::iterator iter = m_cacheMap.find(id);
-      if(iter != m_cacheMap.end())
-      {
-         m_cacheMap.erase(iter);
-      }
-   }
-   void flushCacheToMinOpenCells()
-   {
-      // lets flush the cache from least recently used to recent.
-      //
-      CellMap sortedMap;
-      CellMap::iterator iter = m_cacheMap.begin();
-      
-      while(iter != m_cacheMap.end())
-      {
-         sortedMap.insert(std::make_pair(iter->second->m_timestamp, iter->second));
-         ++iter;
-      }
-      
-      iter = sortedMap.begin();
-      while((iter!=sortedMap.end())&&(m_cacheMap.size() > m_minOpenCells))
-      {
-         remove(iter->second->id());
-         ++iter;
-      }
-   }
-   
-   ossim_uint32               m_minOpenCells;
-   ossim_uint32               m_maxOpenCells;
-   mutable OpenThreads::Mutex m_cacheMapMutex;
-   CellMap                    m_cacheMap;
-   ossim_uint32               m_memoryMapCellsFlag;
-   
-   TYPE_DATA;
-};
-
-#endif
diff --git a/include/ossim/elevation/ossimElevationDatabaseFactoryBase.h b/include/ossim/elevation/ossimElevationDatabaseFactoryBase.h
deleted file mode 100644
index 1456140..0000000
--- a/include/ossim/elevation/ossimElevationDatabaseFactoryBase.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef ossimElevationDatabaseFactoryBase_HEADER
-#define ossimElevationDatabaseFactoryBase_HEADER
-#include <ossim/base/ossimObjectFactory.h>
-#include <ossim/elevation/ossimElevationDatabase.h>
-
-class OSSIM_DLL ossimElevationDatabaseFactoryBase : public ossimObjectFactory
-{
-public:
-   /**
-    * Creates an object given a type name.
-    */
-   virtual ossimObject* createObject(const ossimString& typeName)const
-   {
-      return createDatabase(typeName);
-   }
-   
-   /**
-    * Creates and object given a keyword list.
-    */
-   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
-                                     const char* prefix=0)const
-   {
-      return createDatabase(kwl, prefix);
-   }
-   
-   virtual ossimElevationDatabase* createDatabase(const ossimString& typeName)const=0;
-   virtual ossimElevationDatabase* createDatabase(const ossimKeywordlist& kwl,
-                                                  const char* prefix=0)const=0;
-   virtual ossimElevationDatabase* open(const ossimString& connectionString)const=0;
-};
-
-#endif
diff --git a/include/ossim/elevation/ossimGeneralRasterElevHandler.h b/include/ossim/elevation/ossimGeneralRasterElevHandler.h
deleted file mode 100644
index 497bd14..0000000
--- a/include/ossim/elevation/ossimGeneralRasterElevHandler.h
+++ /dev/null
@@ -1,169 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  see top level LICENSE.txt
-// 
-// Author:  Garrett Potts
-//
-// Description:
-// 
-//
-//----------------------------------------------------------------------------
-// $Id: ossimGeneralRasterElevHandler.h 16355 2010-01-14 21:15:25Z dburken $
-#ifndef ossimGeneralRasterElevHandler_HEADER
-#define ossimGeneralRasterElevHandler_HEADER
-#include <list>
-#include <ossim/base/ossimIoStream.h>
-//#include <fstream>
-
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/elevation/ossimElevCellHandler.h>
-#include <ossim/imaging/ossimGeneralRasterInfo.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimImageViewTransform.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimGpt.h>
-#include <OpenThreads/Mutex>
-#include <OpenThreads/ScopedLock>
-class ossimProjection;
-/**
- * @class ossimGeneralRasterElevHandler Elevation source for an srtm file.
- */
-class  OSSIM_DLL ossimGeneralRasterElevHandler : public ossimElevCellHandler
-{
-public:
-   class GeneralRasterInfo
-      {
-      public:
-         GeneralRasterInfo()
-         :theWidth(0),
-         theHeight(0),
-         theNullHeightValue(ossim::nan()),
-         theScalarType(OSSIM_SCALAR_UNKNOWN),
-         theBytesPerRawLine(0),
-         theDatum(0),
-         theGeometry(0)
-         {
-         }
-         GeneralRasterInfo(const  ossimGeneralRasterElevHandler::GeneralRasterInfo& src)
-         :theFilename(src.theFilename),
-         theImageRect(src.theImageRect),
-         theUl(src.theUl),
-         theLr(src.theLr),
-         theWidth(src.theWidth),
-         theHeight(src.theHeight),
-         theWgs84GroundRect(src.theWgs84GroundRect),
-         theNullHeightValue(src.theNullHeightValue),
-         theByteOrder(src.theByteOrder),
-         theScalarType(src.theScalarType),
-         theBytesPerRawLine(src.theBytesPerRawLine),
-         theDatum(src.theDatum),
-         theGeometry(src.theGeometry)
-         {
-         }
-         ossimFilename     theFilename;
-         ossimIrect        theImageRect;
-         ossimIpt          theUl;
-         ossimIpt          theLr;
-         ossim_uint32      theWidth;
-         ossim_uint32      theHeight;
-         ossimDrect        theWgs84GroundRect;
-         ossim_float64     theNullHeightValue;
-         ossimByteOrder    theByteOrder;
-         ossimScalarType   theScalarType;
-         ossim_uint32      theBytesPerRawLine;
-         const ossimDatum* theDatum;
-         ossimRefPtr<ossimImageGeometry> theGeometry;  //add by simbla
-      };
-   ossimGeneralRasterElevHandler(const ossimFilename& file="");
-   ossimGeneralRasterElevHandler(const ossimGeneralRasterElevHandler::GeneralRasterInfo& generalRasterInfo);
-   ossimGeneralRasterElevHandler(const ossimGeneralRasterElevHandler& rhs);
-   const ossimGeneralRasterElevHandler& operator=(const ossimGeneralRasterElevHandler& rhs);
-
-   /** destructor */
-   virtual ~ossimGeneralRasterElevHandler();
-   virtual ossimObject* dup()const;
-
-   /**
-    * METHOD: getHeightAboveMSL
-    * Height access methods.
-    */
-   virtual double getHeightAboveMSL(const ossimGpt&);
-
-   /**
-    *  METHOD:  getSizeOfElevCell
-    *  Returns the number of post in the cell.  Satisfies pure virtual.
-    *  Note:  x = longitude, y = latitude
-    */
-   virtual ossimIpt getSizeOfElevCell() const;
-      
-   /**
-    *  METHOD:  getPostValue
-    *  Returns the value at a given grid point as a double.
-    *  Satisfies pure virtual.
-    */
-   virtual double getPostValue(const ossimIpt& gridPt) const;
-
-   virtual bool isOpen()const;
-
-   /**
-    * Opens a stream to the srtm cell.
-    *
-    * @return Returns true on success, false on error.
-    */
-   bool open(const ossimFilename& file, bool memoryMapFlag=false);
-
-   /**
-    * Closes the stream to the file.
-    */
-   virtual void close();
-
-   /**
-    * This method does not really fit the handler since this handle a
-    * directory not a cell that could have holes in it.  So users looking for
-    * valid coverage should call "pointHasCoverage".
-    */
-   ossimDrect getBoundingRect()const;
-
-   /**
-    * Loops through ossimGeneralRasterElevHandler::BoundingRectListType and
-    * checks for coverage.
-    *
-    * @param gpt Point to look for.
-    *
-    * @return true if coverage is found false if not.
-    */
-   virtual bool pointHasCoverage(const ossimGpt& gpt) const;
-
-   const ossimGeneralRasterElevHandler::GeneralRasterInfo& generalRasterInfo()const;
-   
-private:
-   template <class T>
-   double getHeightAboveMSLFileTemplate(T dummy,
-                                    const ossimGeneralRasterElevHandler::GeneralRasterInfo& info,
-                                    const ossimGpt& gpt);
-   template <class T>
-   double getHeightAboveMSLMemoryTemplate(T dummy,
-                                    const ossimGeneralRasterElevHandler::GeneralRasterInfo& info,
-                                    const ossimGpt& gpt);
-   
-   virtual bool setFilename(const ossimFilename& file);
-   
-   ossimGeneralRasterElevHandler::GeneralRasterInfo theGeneralRasterInfo;
-   mutable OpenThreads::Mutex m_inputStreamMutex;
-   std::ifstream m_inputStream;
-
-   /** @brief true if stream is open. */
-   bool          m_streamOpen;
-   
-   std::vector<char> m_memoryMap;
-TYPE_DATA
-};
-
-#endif /* End of "#ifndef ossimGeneralRasterElevHandler_HEADER" */
diff --git a/include/ossim/elevation/ossimGeneralRasterElevationDatabase.h b/include/ossim/elevation/ossimGeneralRasterElevationDatabase.h
deleted file mode 100644
index f8fdb51..0000000
--- a/include/ossim/elevation/ossimGeneralRasterElevationDatabase.h
+++ /dev/null
@@ -1,79 +0,0 @@
-#ifndef ossimGeneralRasterElevationDatabase_HEADER
-#define ossimGeneralRasterElevationDatabase_HEADER
-#include "ossimElevationDatabase.h"
-#include <ossim/base/ossimFilename.h>
-#include <ossim/elevation/ossimGeneralRasterElevHandler.h>
-#include <OpenThreads/Mutex>
-
-class OSSIM_DLL ossimGeneralRasterElevationDatabase : public ossimElevationCellDatabase
-{
-public:
-   ossimGeneralRasterElevationDatabase()
-   :ossimElevationCellDatabase()
-   {
-   }
-   ossimGeneralRasterElevationDatabase(const ossimGeneralRasterElevationDatabase& rhs)
-   :ossimElevationCellDatabase(rhs)
-   {
-   }
-   virtual ~ossimGeneralRasterElevationDatabase()
-   {
-      if(m_cellHandler.valid())
-      {
-         m_cellHandler->close();
-      }
-      m_cellHandler = 0;
-   }
-   ossimObject* dup()const
-   {
-      return new ossimGeneralRasterElevationDatabase(*this);
-   }
-   virtual bool open(const ossimString& connectionString);
-   virtual bool pointHasCoverage(const ossimGpt& gpt) const;
-
-   virtual bool getAccuracyInfo(ossimElevationAccuracyInfo& /*info*/, const ossimGpt& /*gpt*/) const
-   {
-      return false;
-   }
-
-   /**
-    * METHODS: accuracyLE90(), accuracyCE90()
-    * Returns the vertical and horizontal accuracy (90% confidence) in the
-    * region of gpt:
-    */
-//   virtual double getAccuracyLE90(const ossimGpt& /* gpt */) const
-//   {
-//      std::cout << "ossimGeneralElevationDatabase::getAccuracyLE90 \n";
-//      return 0.0;
-//   }
-//   virtual double getAccuracyCE90(const ossimGpt& /* gpt */) const
- //  {
- //     std::cout << "ossimGeneralElevationDatabase::getAccuracyCE90 \n";
- //     return 0.0;
- //  }
-   virtual double getHeightAboveMSL(const ossimGpt&);
-   virtual double getHeightAboveEllipsoid(const ossimGpt& gpt);
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix = 0);
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix = 0)const;
-   virtual ossim_uint64 createId(const ossimGpt& /* pt */)const
-   {
-     return 0;
-   }
-   
-protected:
-   ossimRefPtr<ossimGeneralRasterElevHandler> m_cellHandler;
-   bool openGeneralRasterDirectory(const ossimFilename& dir);
-   void createRelativePath(ossimFilename& file, const ossimGpt& gpt)const;
-   void createFullPath(ossimFilename& file, const ossimGpt& gpt)const
-   {
-      ossimFilename relativeFile;
-      createRelativePath(relativeFile, gpt);
-      file = ossimFilename(m_connectionString).dirCat(relativeFile);
-   }
-   ossimRefPtr<ossimElevCellHandler> createHandler(const ossimGpt& /* gpt */);
-   virtual ossimRefPtr<ossimElevCellHandler> createCell(const ossimGpt& /* gpt */);
-   
-   
-   TYPE_DATA
-};
-#endif
diff --git a/include/ossim/elevation/ossimImageElevationDatabase.h b/include/ossim/elevation/ossimImageElevationDatabase.h
deleted file mode 100644
index 7ce9d1d..0000000
--- a/include/ossim/elevation/ossimImageElevationDatabase.h
+++ /dev/null
@@ -1,208 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossimImageElevationDatabase.h
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: See description for class below.
-//
-//----------------------------------------------------------------------------
-// $Id$
-
-#ifndef ossimImageElevationDatabase_HEADER
-#define ossimImageElevationDatabase_HEADER 1
-
-#include <ossim/elevation/ossimElevationDatabase.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimGrect.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimRtti.h>
-#include <map>
-
-class ossimString;
-
-/**
- * @class ossimTiledElevationDatabase
- *
- * Elevation source used for working with generic images opened by an
- * ossimImageHandler. This class is typically utilized through the
- * ossimElevManager.
- */
-class OSSIM_DLL ossimImageElevationDatabase : public ossimElevationCellDatabase
-{
-public:
-
-   /** default constructor */
-   ossimImageElevationDatabase();
-
-   /**
-    * @brief Open a connection to a database.
-    *
-    * @param connectionString File or directory to open.  In most cases this
-    * will point to a directory containing DEMs. Satisfies pure virtual
-    * ossimElevationDatabase::open().
-    *
-    * @return true on success, false on error.
-    */   
-   virtual bool open(const ossimString& connectionString);
-
-   /** @brief close method. Unreferences all data. */
-   virtual void close();
-
-   /**
-    * @brief Maps elevation data for region to a grid.
-    *
-    * This uses connectionString passed to open method as starting point.
-    */
-   void mapRegion(const ossimGrect& region);
-
-   /**
-    * @brief Get height above MSL for point.
-    *
-    * Satisfies pure virtual ossimElevSource::getHeightAboveMSL().
-    * 
-    * @return Height above MSL.
-    */
-   virtual double getHeightAboveMSL(const ossimGpt& gpt);
-
-   /**
-    * @brief Get height above ellipsoid for point.
-    *
-    * Satisfies pure virtual ossimElevSource::getHeightAboveMSL().
-    * 
-    * @return Height above MSL.
-    */
-   virtual double getHeightAboveEllipsoid(const ossimGpt&);
-   
-   /**
-    * Satisfies pure virtual ossimElevSource::pointHasCoverage
-    * 
-    * @return true if database has coverage for point.
-    */
-   virtual bool pointHasCoverage(const ossimGpt& gpt) const;
-
-
-   virtual bool getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const;
-
-
-   /**
-    * Statisfies pure virtual ossimElevSource::getAccuracyLE90.
-    * @return The vertical accuracy (90% confidence) in the
-    * region of gpt:
-    */
-   //virtual double getAccuracyLE90(const ossimGpt& gpt) const;
-   
-   /**
-    * Statisfies pure virtual ossimElevSource::getAccuracyCE90.
-    * @return The horizontal accuracy (90% confidence) in the
-    * region of gpt.
-    */
-   //virtual double getAccuracyCE90(const ossimGpt& gpt) const;
-
-   /** @brief Initialize from keyword list. */
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-
-   /** @brief Save the state to a keyword list. */
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix)const;
-
-   /**
-    * @brief Gets the bounding rectangle/coverage of elevation.
-    *
-    * @param rect Rectangle to initialize.
-    */
-   void getBoundingRect(ossimGrect& rect) const;
-
-   /**
-    * @brief ProcessFile method.
-    *
-    * This method is linked to the ossimFileWalker::walk method via a callback
-    * mechanism.  So it is called by the ossimFileWalk (caller).  This class
-    * (callee) sets recurse and return flags accordingly to control
-    * the ossimFileWalker, e.g. don't recurse, stop altogether.
-    * 
-    * @param file to process.
-    */
-   void processFile(const ossimFilename& file);
-   
-protected:
-   /**
-    * @Brief Protected destructor.
-    *
-    * This class is derived from ossimReferenced so users should always use
-    * ossimRefPtr<ossimImageElevationDatabase> to hold instance.
-    */
-   ~ossimImageElevationDatabase();
-
-   virtual ossimRefPtr<ossimElevCellHandler> createCell(const ossimGpt& gpt);
-
-   // virtual ossim_uint64 createId(const ossimGpt& pt) const;
-
-   /**
-    * @brief Gets cell for point.
-    *
-    * This override ossimElevationCellDatabase::getOrCreateCellHandler as we cannot use
-    * the createId as our cells could be of any size.
-    */
-   virtual ossimRefPtr<ossimElevCellHandler> getOrCreateCellHandler(const ossimGpt& gpt);
-
-   /**
-    * @brief Removes an entry from the m_cacheMap and m_entryMap maps.
-    */
-   virtual void remove(ossim_uint64 id);
-
-private:
-
-   // Private container to hold bounding rect and image handler.
-   struct ossimImageElevationFileEntry
-   {
-      /** @brief default constructor */
-      ossimImageElevationFileEntry();
-
-      /** @brief Constructor that takes a file name. */
-      ossimImageElevationFileEntry(const ossimFilename& file);
-
-      /** file name */
-      ossimFilename m_file;
-
-      /** Bounding rectangle in decimal degrees. */
-      ossimGrect m_rect;
-
-      /** True if in ossimElevationCellDatabase::m_cacheMap. */
-      bool m_loadedFlag;
-   };  
-
-   /**
-    * @brief Initializes m_entryMap with all loadable files from
-    * m_connectionString.
-    */
-   void loadFileMap();
-
-   /** Hidden from use copy constructor */
-   ossimImageElevationDatabase(const ossimImageElevationDatabase& copy_this);
-   
-   /** Hidden from use assignment operator */
-   const ossimImageElevationDatabase& operator=(const ossimImageElevationDatabase& rhs);
-
-   std::map<ossim_uint64, ossimImageElevationFileEntry> m_entryMap;
-   ossim_uint64       m_lastMapKey;
-   ossim_uint64       m_lastAccessedId;
-
-   TYPE_DATA 
-};
-
-inline void ossimImageElevationDatabase::remove(ossim_uint64 id)
-{
-   std::map<ossim_uint64, ossimImageElevationFileEntry>::iterator entryIter = m_entryMap.find(id);
-   if ( entryIter != m_entryMap.end() )
-   {
-      (*entryIter).second.m_loadedFlag = false;
-   }
-   ossimElevationCellDatabase::remove(id);
-}
-
-#endif /* ossimImageElevationDatabase_HEADER */
diff --git a/include/ossim/elevation/ossimImageElevationHandler.h b/include/ossim/elevation/ossimImageElevationHandler.h
deleted file mode 100644
index 3d643ba..0000000
--- a/include/ossim/elevation/ossimImageElevationHandler.h
+++ /dev/null
@@ -1,129 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossimImageElevationHandler.h
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: See description for class below.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#ifndef ossimImageElevationHandler_HEADER
-#define ossimImageElevationHandler_HEADER 1
-
-#include <ossim/elevation/ossimElevCellHandler.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageHandler.h>
-
-/**
- * @class ossimImageElevationHandler
- *
- * Elevation source for a generic image opened via ossimImageHandler.
- */
-class OSSIM_DLL ossimImageElevationHandler : public ossimElevCellHandler
-{
-public:
-
-   /** default constructor */
-   ossimImageElevationHandler();
-
-   /**
-    * METHOD: getHeightAboveMSL
-    * Height access methods.
-    */
-   virtual double getHeightAboveMSL(const ossimGpt&);
-
-   /**
-    *  METHOD:  getSizeOfElevCell
-    *  Returns the number of post in the cell.  Satisfies pure virtual.
-    *  Note:  x = longitude, y = latitude
-    */
-   virtual ossimIpt getSizeOfElevCell() const;
-      
-   /**
-    *  METHOD:  getPostValue
-    *  Returns the value at a given grid point as a double.
-    *  Satisfies pure virtual.
-    */
-   virtual double getPostValue(const ossimIpt& gridPt) const;
-
-   /** @return True if open, false if not. */
-   virtual bool isOpen()const;
-   
-   /**
-    * Opens a stream to the srtm cell.
-    *
-    * @return Returns true on success, false on error.
-    */
-   virtual bool open(const ossimFilename& file);
-
-   /** @brief Closes the stream to the file. */
-   virtual void close();
-
-   /**
-    * @brief pointHasCoverage(gpt)
-    *
-    * Overrides ossimElevCellHandler::pointHasCoverage
-    * @return TRUE if coverage exists over gpt.
-    */
-   virtual bool pointHasCoverage(const ossimGpt&) const;
-
-protected:
-   /**
-    * @Brief Protected destructor.
-    *
-    * This class is derived from ossimReferenced so users should always use
-    * ossimRefPtr<ossimImageElevationHandler> to hold instance.
-    */
-   virtual ~ossimImageElevationHandler();
-   
-private:
-
-   /** Hidden from use copy constructor */
-   ossimImageElevationHandler(const ossimImageElevationHandler&);
-   
-   /** Hidden from use assignment operator */
-   const ossimImageElevationHandler& operator=
-      (const ossimImageElevationHandler& rhs);
-
-
-   /** Pointers to links in chain. */
-   ossimRefPtr<ossimImageHandler>      m_ih;
-   ossimRefPtr<ossimImageGeometry>     m_geom;
-
-   /** Image space rect stored as drect for inlined pointHasCoverage method. */
-   ossimDrect                          m_rect;
-
-   TYPE_DATA
-};
-
-inline bool ossimImageElevationHandler::isOpen() const
-{
-   return m_ih.valid();
-}
-
-inline void ossimImageElevationHandler::close()
-{
-   m_geom  = 0;
-   m_ih    = 0;
-}
-
-inline bool ossimImageElevationHandler::pointHasCoverage(const ossimGpt& gpt) const
-{
-   if ( m_geom.valid() )
-   {
-      ossimDpt dpt;
-      m_geom->worldToLocal(gpt, dpt);
-      return m_rect.pointWithin(dpt);
-   }
-   return false;
-}
-
-#endif /* ossimImageElevationHandler_HEADER */
diff --git a/include/ossim/elevation/ossimSrtmElevationDatabase.h b/include/ossim/elevation/ossimSrtmElevationDatabase.h
deleted file mode 100644
index 74356a4..0000000
--- a/include/ossim/elevation/ossimSrtmElevationDatabase.h
+++ /dev/null
@@ -1,78 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-//----------------------------------------------------------------------------
-// $Id$
-
-#ifndef ossimSrtmElevationDatabase_HEADER
-#define ossimSrtmElevationDatabase_HEADER 1
-#include "ossimElevationDatabase.h"
-#include <ossim/base/ossimFilename.h>
-#include <ossim/elevation/ossimSrtmHandler.h>
-#include <OpenThreads/Mutex>
-
-class OSSIM_DLL ossimSrtmElevationDatabase : public ossimElevationCellDatabase
-{
-public:
-   typedef std::vector<ossimRefPtr<CellInfo> > DirectMap; // 360x180 cell grid
-   ossimSrtmElevationDatabase()
-   :ossimElevationCellDatabase()
-   {
-   }
-   ossimSrtmElevationDatabase(const ossimSrtmElevationDatabase& rhs)
-   :ossimElevationCellDatabase(rhs)
-   {
-   }
-   virtual ~ossimSrtmElevationDatabase()
-   {
-   }
-   ossimObject* dup()const
-   {
-      return new ossimSrtmElevationDatabase(*this);
-   }
-   virtual bool open(const ossimString& connectionString);
-   bool getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& /*gpt*/) const;
-   virtual bool pointHasCoverage(const ossimGpt& gpt) const
-   {
-      ossimFilename filename;
-      createFullPath(filename, gpt);
-      
-      return filename.exists();
-   }
-   virtual double getHeightAboveMSL(const ossimGpt&);
-   virtual double getHeightAboveEllipsoid(const ossimGpt& gpt);
-   virtual ossim_uint64 createId(const ossimGpt& pt)const
-   {
-      ossim_uint64 y = static_cast<ossim_uint64>(ossim::wrap(pt.latd(), -90.0, 90.0)+90.0);
-      ossim_uint64 x = static_cast<ossim_uint64>(ossim::wrap(pt.lond(),-180.0,180.0)+180.0);
-      // map the extreme edge to the same ID ax the 179 west cell and the same for the 89
-      // degree north cell.
-      //
-      x = x==360?359:x;
-      y = y==180?179:y;
-      // Srtm databases are 1x1 degree cells and we will use a world 
-      // grid for id generation.
-      //
-      return (y*360+x);
-   }
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix = 0);
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix = 0)const;
-   
-protected:
-   bool openSrtmDirectory(const ossimFilename& dir);
-   void createRelativePath(ossimFilename& file, const ossimGpt& gpt)const;
-   void createFullPath(ossimFilename& file, const ossimGpt& gpt)const
-   {
-      ossimFilename relativeFile;
-      createRelativePath(relativeFile, gpt);
-      file = ossimFilename(m_connectionString).dirCat(relativeFile);
-   }
-
-   ossimRefPtr<ossimElevCellHandler> createCell(const ossimGpt& gpt);
-
-   TYPE_DATA
-};
-#endif
diff --git a/include/ossim/elevation/ossimSrtmFactory.h b/include/ossim/elevation/ossimSrtmFactory.h
deleted file mode 100644
index 026bc95..0000000
--- a/include/ossim/elevation/ossimSrtmFactory.h
+++ /dev/null
@@ -1,57 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (c) 2005, David Burken, all rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-// 
-// Shuttle Radar Topography Mission (SRTM) factory to return an
-// ossimSrtmElevSource given a ground point.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimSrtmFactory.h 13269 2008-07-25 14:27:36Z dburken $
-#ifndef ossimSrtmFactory_HEADER
-#define ossimSrtmFactory_HEADER
-
-#include <ossim/elevation/ossimElevSourceFactory.h>
-
-/**
- * @class ossimSrtmFactory Used by the elevation manager, this class returns
- * an ossimSrtmElevSource given a ground point and some directory with srtm
- * files in it.
- */
-class OSSIM_DLL ossimSrtmFactory : public ossimElevSourceFactory
-{
-public:
-
-   /** default constructor */
-   ossimSrtmFactory();
-
-   /** Constructor that takes a directory name. */
-   ossimSrtmFactory(const ossimFilename& dir);
-
-   /** destructor */
-   virtual ~ossimSrtmFactory();
-
-   /**
-    * Open the appropriate ossimSrtmElevSource that covers given a
-    * ground point.
-    *
-    * @param gpt Ground point that an elevation source is need for.
-    *
-    * @return Returns a pointer to an ossimElevSource if an srtm file is found
-    * that can cover the ground point.  Returns NULL if no cell is found
-    * for the point.
-    */
-   virtual ossimElevSource* getNewElevSource(const ossimGpt& gpt) const;
-   
-protected:
-
-TYPE_DATA
-};
-
-#endif /* End of "#ifndef ossimSrtmFactory_HEADER" */
diff --git a/include/ossim/elevation/ossimSrtmHandler.h b/include/ossim/elevation/ossimSrtmHandler.h
deleted file mode 100644
index 4ffa236..0000000
--- a/include/ossim/elevation/ossimSrtmHandler.h
+++ /dev/null
@@ -1,105 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See tope level LICENSE.txt file.
-//
-// Author:  David Burken
-//
-// Description:
-// 
-// Shuttle Radar Topography Mission (SRTM) elevation source.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimSrtmHandler.h 17195 2010-04-23 17:32:18Z dburken $
-#ifndef ossimSrtmHandler_HEADER
-#define ossimSrtmHandler_HEADER
-
-#include <ossim/base/ossimIoStream.h>
-//#include <fstream>
-
-#include <ossim/base/ossimString.h>
-#include <ossim/elevation/ossimElevCellHandler.h>
-#include <ossim/support_data/ossimSrtmSupportData.h>
-
-class ossimEndian;
-
-/**
- * @class ossimSrtmHandler Elevation source for an srtm file.
- */
-class OSSIMDLLEXPORT ossimSrtmHandler : public ossimElevCellHandler
-{
-public:
-
-   /** Constructor that takes a file name. */
-   ossimSrtmHandler();
-   const ossimSrtmHandler& operator=(const ossimSrtmHandler& rhs);
-   ossimSrtmHandler(const ossimSrtmHandler&);
-
-
-   enum
-   {
-      NULL_POST = -32768 // Fixed by SRTM specification.
-   };
-
-   /**
-    * METHOD: getHeightAboveMSL
-    * Height access methods.
-    */
-   virtual double getHeightAboveMSL(const ossimGpt&);
-
-   /**
-    *  METHOD:  getSizeOfElevCell
-    *  Returns the number of post in the cell.  Satisfies pure virtual.
-    *  Note:  x = longitude, y = latitude
-    */
-   virtual ossimIpt getSizeOfElevCell() const;
-      
-   /**
-    *  METHOD:  getPostValue
-    *  Returns the value at a given grid point as a double.
-    *  Satisfies pure virtual.
-    */
-   virtual double getPostValue(const ossimIpt& gridPt) const;
-
-   virtual bool isOpen()const;
-   
-   /**
-    * Opens a stream to the srtm cell.
-    *
-    * @return Returns true on success, false on error.
-    */
-   virtual bool open(const ossimFilename& file, bool memoryMapFlag=false);
-
-   /**
-    * Closes the stream to the file.
-    */
-   virtual void close();
-   
-protected:
-   /** destructor */
-   virtual ~ossimSrtmHandler();
-   ossimSrtmSupportData m_supportData;
-   mutable OpenThreads::Mutex m_fileStrMutex;
-   std::ifstream m_fileStr;
-
-   /** @brief true if stream is open. */
-   bool          m_streamOpen;
-   
-   ossim_int32      m_numberOfLines;
-   ossim_int32      m_numberOfSamples;
-   ossim_int32      m_srtmRecordSizeInBytes;
-   double           m_latSpacing;   // degrees
-   double           m_lonSpacing;   // degrees
-   ossimDpt         m_nwCornerPost; // cell origin;
-   ossimEndian*     m_swapper;
-   ossimScalarType  m_scalarType;
-   
-   mutable std::vector<ossim_int8> m_memoryMap;
-   
-   template <class T>
-   double getHeightAboveMSLFileTemplate(T dummy, const ossimGpt& gpt);
-   template <class T>
-   double getHeightAboveMSLMemoryTemplate(T dummy, const ossimGpt& gpt);
-   TYPE_DATA
-};
-
-#endif /* End of "#ifndef ossimSrtmHandler_HEADER" */
diff --git a/include/ossim/elevation/ossimTiledElevationDatabase.h b/include/ossim/elevation/ossimTiledElevationDatabase.h
deleted file mode 100644
index 57b5af2..0000000
--- a/include/ossim/elevation/ossimTiledElevationDatabase.h
+++ /dev/null
@@ -1,213 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossimTiledElevationDatabase.h
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: See description for class below.
-//
-//----------------------------------------------------------------------------
-// $Id$
-
-#ifndef ossimTiledElevationDatabase_HEADER
-#define ossimTiledElevationDatabase_HEADER 1
-
-#include <ossim/elevation/ossimElevationDatabase.h>
-
-#include <ossim/base/ossimGrect.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimRtti.h>
-
-#include <vector>
-
-class ossimDblGrid;
-class ossimFilename;
-class ossimFileWalker;
-class ossimImageData;
-class ossimImageGeometry;
-class ossimImageHandler;
-class ossimProjection;
-class ossimSingleImageChain;
-class ossimString;
-
-/**
- * @class ossimTiledElevationDatabase
- *
- * Elevation source used for working with generic images opened by an
- * ossimImageHandler.  This class supplies a mapRegion method used to map a
- * region of elevation to a grid.  The grid in turn is used for the
- * getHeightAboveMSL.  This class is for applications that know their region
- * of interest up front and want to bypass the ossimElevManager and grid the
- * elevation prior to processing for speed.  Can work on a file or a
- * directory of files.
- */
-class OSSIM_DLL ossimTiledElevationDatabase : public ossimElevationDatabase
-{
-public:
-
-   /** default constructor */
-   ossimTiledElevationDatabase();
-
-   /**
-    * @brief Open a connection to a database.
-    *
-    * @param connectionString File or directory to open.  In most cases this
-    * will point to a directory containing DEMs. Satisfies pure virtual
-    * ossimElevationDatabase::open().
-    *
-    * @return true on success, false on error.
-    */   
-   virtual bool open(const ossimString& connectionString);
-
-   /** @brief close method. Unreferences all data. */
-   virtual void close();
-
-   /**
-    * @brief Maps elevation data for region to a grid.
-    *
-    * This uses connectionString passed to open method as starting point.
-    */
-   void mapRegion(const ossimGrect& region);
-
-   /**
-    * @brief Get height above MSL for point.
-    *
-    * Satisfies pure virtual ossimElevSource::getHeightAboveMSL().
-    * 
-    * @return Height above MSL.
-    */
-   virtual double getHeightAboveMSL(const ossimGpt& gpt);
-
-   /**
-    * @brief Get height above ellipsoid for point.
-    *
-    * Satisfies pure virtual ossimElevSource::getHeightAboveMSL().
-    * 
-    * @return Height above MSL.
-    */
-   virtual double getHeightAboveEllipsoid(const ossimGpt&);
-   
-   /**
-    * Satisfies pure virtual ossimElevSource::pointHasCoverage
-    * 
-    * @return true if database has coverage for point.
-    */
-   virtual bool pointHasCoverage(const ossimGpt& gpt) const;
-
-
-   /** @brief Initialize from keyword list. */
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-
-   /** @brief Save the state to a keyword list. */
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix)const;
-   
-    bool getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& /*gpt*/) const
-    {
-       info.makeNan();
-
-       return false;
-    }
-   /**
-    * @brief ProcessFile method.
-    *
-    * This method is linked to the ossimFileWalker::walk method via a callback
-    * mechanism.  So it is called by the ossimFileWalk (caller).  This class
-    * (callee) sets recurse and return flags accordingly to control
-    * the ossimFileWalker, e.g. don't recurse, stop altogether.
-    * 
-    * @param file to process.
-    */
-   void processFile(const ossimFilename& file);
-   
-protected:
-   /** Protected destructor as this is derived from ossimRefenced. */
-   ~ossimTiledElevationDatabase();
-
-private:
-
-   // Private container to hold bounding rect and image handler.
-   struct ossimTiledElevationEntry
-   {
-      /** @brief default constructor */
-      ossimTiledElevationEntry();
-
-      /** @brif Constructor that takes rectangle and chain. */
-      ossimTiledElevationEntry(const ossimGrect& rect,
-                               ossimRefPtr<ossimSingleImageChain> sic );
-
-      /** Bounding rectangle in decimal degrees. */
-      ossimGrect m_rect;
-
-      /** Hold pointer to single image chain. */
-      ossimRefPtr<ossimSingleImageChain> m_sic;
-   };
-
-   /**
-    * @brief adds entry to the list checking for duplicates.
-    */
-   void addEntry(const ossimTiledElevationEntry& entry);
-
-   /**
-    * @brief Initializes m_referenceProj from the first entry.
-    */
-   void initializeReferenceProjection();
-
-   /**
-    * @return true if file is a directory based image and the stager should go
-    * on to next directory; false if stager should continue with directory.
-    */
-   bool isDirectoryBasedImage(ossimRefPtr<ossimImageHandler> ih);
-
-   /**
-    * @brief Check for match of the following against the first entry of:
-    *  bands, projection, scalar type and scale.
-    * @returns true if good, false if not the same.
-    */
-   bool isCompatible(ossimImageHandler* ih,
-                     ossimImageGeometry* geom,
-                     ossimProjection* proj) const;
-
-   /**
-    * @brief Initialize bounding rectangle from image handler.
-    *
-    * Sets boundingRect to nan if ossimImageGeometry::getCornerGpts returns false.
-    * 
-    * @param ih Image handler.
-    * @param boundingRect Initialized by method.
-    */
-   void getBoundingRect(ossimRefPtr<ossimImageGeometry> geom, ossimGrect& boundingRect) const;
-
-   /** @brief Loads m_requestedRect into m_grid from m_entries. */
-   void mapRegion();
-
-   /** @brief Templated fill grid method. */
-   template <class T> void fillGrid(T dummyTemplate, ossimRefPtr<ossimImageData> data);
-
-   /** Hidden from use copy constructor */
-   ossimTiledElevationDatabase(const ossimTiledElevationDatabase& copy_this);
-
-   /** Hidden from use assignment operator */
-   const ossimTiledElevationDatabase& operator=(const ossimTiledElevationDatabase& rhs);
-
-   std::vector<ossimTiledElevationEntry> m_entries;
-
-   /** Hold region of elevation. */
-   ossimDblGrid* m_grid;
-
-   /** Projection of the first entry.  Stored for convenience. */
-   ossimRefPtr<ossimProjection> m_referenceProj;
-
-   ossimGrect m_requestedRect;
-   ossimGrect m_entryListRect;
-   ossimGrect m_mappedRect; // Requested expanded to even post boundary.
-
-   ossimFileWalker* m_fileWalker;
-
-   TYPE_DATA 
-};
-
-#endif /* ossimTiledElevationDatabase_HEADER */
diff --git a/include/ossim/font/ossimFontFactoryBase.h b/include/ossim/font/ossimFontFactoryBase.h
deleted file mode 100644
index 014a6f1..0000000
--- a/include/ossim/font/ossimFontFactoryBase.h
+++ /dev/null
@@ -1,41 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-//********************************************************************
-// $Id: ossimFontFactoryBase.h 9094 2006-06-13 19:12:40Z dburken $
-#ifndef ossimFontFactoryBase_HEADER
-#define ossimFontFactoryBase_HEADER
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimFontInformation.h>
-class ossimFont;
-
-class ossimFontFactoryBase
-{
-public:
-
-   virtual ~ossimFontFactoryBase(){}
-   
-   /*!
-    * Will find the best font for the passed in infromation.
-    * If none is found a default font should be returned.
-    */
-   virtual ossimFont* createFont(const ossimFontInformation& information)const=0;
-
-   /*!
-    * Usually for trutype fonts but any font stored in a file it
-    * will try to create a font from it.
-    */
-   virtual ossimFont* createFont(const ossimFilename& file)const=0;
-
-   virtual void getFontInformation(std::vector<ossimFontInformation>& informationList)const=0;
-
-};
-
-#endif
diff --git a/include/ossim/imaging/ossim3x3ConvolutionFilter.h b/include/ossim/imaging/ossim3x3ConvolutionFilter.h
deleted file mode 100644
index 63637ba..0000000
--- a/include/ossim/imaging/ossim3x3ConvolutionFilter.h
+++ /dev/null
@@ -1,97 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossim3x3ConvolutionFilter.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossim3x3ConvolutionFilter_HEADER
-#define ossim3x3ConvolutionFilter_HEADER
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-
-class ossim3x3ConvolutionFilter : public ossimImageSourceFilter
-{
-public:
-   ossim3x3ConvolutionFilter(ossimObject* owner=NULL);
-
-   virtual ossimString getShortName()const{return ossimString("3x3 Convolution");}
-   virtual ossimString getLongName()const{return ossimString("Convolves the input image with a 3x3 kernel");}
-
-   virtual void getKernel(double kernel[3][3]);
-   
-   virtual void setKernel(double kernel[3][3]);
-
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-
-   virtual void initialize();
-
-   virtual double getNullPixelValue(ossim_uint32 band=0) const;
-   virtual double getMinPixelValue(ossim_uint32 band=0)  const;
-   virtual double getMaxPixelValue(ossim_uint32 band=0)  const;
-
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix = 0);
-   
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix = 0)const;
-   
-protected:
-   virtual ~ossim3x3ConvolutionFilter();
-
-   /**
-    * Allocates theTile.
-    */
-   void allocate();
-
-   /**
-    * Clears data members theNullPixValue, theMinPixValue, and
-    * theMaxPixValue.
-    */
-   void clearNullMinMax();
-
-   /**
-    * Computes null, min, and max considering input connection and theKernel.
-    */
-   void computeNullMinMax();
-   
-   ossimRefPtr<ossimImageData> theTile;
-   double theKernel[3][3];
-
-   vector<double> theNullPixValue;
-   vector<double> theMinPixValue;
-   vector<double> theMaxPixValue;   
-   
-   /*!
-    * Convolve full means that the input data is full and has
-    * no null data.  We don't have to compare for nulls here
-    */
-   template<class T>
-   void convolveFull(T,
-                     ossimRefPtr<ossimImageData> inputData,
-                     ossimRefPtr<ossimImageData> outputData);
-   
-   /*!
-    * Convolve partial means that the input data is has some
-    * null data.  We will have to compare nulls
-    */
-   template<class T>
-   void convolvePartial(T,
-                        ossimRefPtr<ossimImageData> inputData,
-                        ossimRefPtr<ossimImageData> outputData);
-                       
-
-TYPE_DATA
-};
-
-#endif /* #ifndef ossim3x3ConvolutionFilter_HEADER */
diff --git a/include/ossim/imaging/ossimAOD.h b/include/ossim/imaging/ossimAOD.h
deleted file mode 100644
index 074c555..0000000
--- a/include/ossim/imaging/ossimAOD.h
+++ /dev/null
@@ -1,66 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2002 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Kathy Minear
-//
-// Description:
-// 
-// Class to compute Aerosol Optical Depth (AOD) for with atmospheric
-// correction.
-//
-//*************************************************************************
-// $Id: ossimAOD.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimAOD_HEADER
-#define ossimAOD_HEADER
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-class ossimAOD : public ossimImageSourceFilter
-{
-public:
-
-   ossimAOD(ossimObject* owner=NULL);
-   ossimAOD(ossimImageSource* inputSource);
-   ossimAOD(ossimObject* owner, ossimImageSource* inputSource);
-
-
-   virtual ossimString getShortName() const;
-
-   virtual void initialize();
-
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect,
-                                               ossim_uint32 resLevel=0);
-   
-   /*!
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-   virtual ostream& print(ostream& os) const;
-   friend ostream& operator << (ostream& os,  const ossimAOD& hr);
-
-   static void writeTemplate(ostream& os);
-
-protected:
-   virtual ~ossimAOD();
-
-   void allocate();
-   
-   /*!
-    * Method to set unset the enable flag.
-    */
-   void verifyEnabled();
-
-   ossimRefPtr<ossimImageData> theTile;
-
-   TYPE_DATA
-};
-
-#endif /* #ifndef ossimAOD_HEADER */
-
diff --git a/include/ossim/imaging/ossimAdrgTileSource.h b/include/ossim/imaging/ossimAdrgTileSource.h
deleted file mode 100644
index 0f157bb..0000000
--- a/include/ossim/imaging/ossimAdrgTileSource.h
+++ /dev/null
@@ -1,196 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Ken Melero
-// 
-// Description: This class give the capability to access tiles from an
-//              ADRG file.
-//
-//********************************************************************
-// $Id: ossimAdrgTileSource.h 17932 2010-08-19 20:34:35Z dburken $
-
-#ifndef ossimAdrgTileSource_HEADER
-#define ossimAdrgTileSource_HEADER
-
-#include <fstream>
-
-#include <ossim/imaging/ossimImageHandler.h>
-
-class ossimImageData;
-class ossimAdrgHeader;
-
-class OSSIM_DLL ossimAdrgTileSource : public ossimImageHandler
-{
-public:
-   
-   enum
-   {
-      ADRG_TILE_WIDTH  = 128,
-      ADRG_TILE_HEIGHT = 128,
-      ADRG_TILE_SIZE   = 16384, // 128 * 128,
-      BAND_OFFSET      = 16384, // 8 * 2048,
-      NUMBER_OF_BANDS  = 3
-   };
-   
-   enum ADRG_COLOR
-   {
-      RED_BAND    = 0,  // the ADRG rgb value
-      GREEN_BAND  = 1,
-      BLUE_BAND   = 2
-   };
-      
-   ossimAdrgTileSource();
-
-   virtual ossimString getShortName()const;
-   virtual ossimString getLongName()const;
-
-   /**
-    *  @return Returns true on success, false on error.
-    *
-    *  @note This method relies on the data member ossimImageData::theImageFile
-    *  being set.  Callers should do a "setFilename" prior to calling this
-    *  method or use the ossimImageHandler::open that takes a file name and an
-    *  entry index.
-    */
-   virtual bool open();
-
-   /**
-    *  Returns a pointer to a tile given an origin representing the upper
-    *  left corner of the tile to grab from the image.
-    *  Satisfies pure virtual requirement from TileSource class.
-    */
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
-                                               ossim_uint32 resLevel=0);
-   /**
-    * Method to get a tile.   
-    *
-    * @param result The tile to stuff.  Note The requested rectangle in full
-    * image space and bands should be set in the result tile prior to
-    * passing.  It will be an error if:
-    * result.getNumberOfBands() != this->getNumberOfOutputBands()
-    *
-    * @return true on success false on error.  If return is false, result
-    *  is undefined so caller should handle appropriately with makeBlank or
-    * whatever.
-    */
-   virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);   
-
-   /**
-    *  Returns the number of bands in the image.
-    *  Satisfies pure virtual requirement from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfInputBands() const;
-   
-   virtual ossim_uint32 getNumberOfOutputBands()const;
-
-   /**
-    *  Returns the number of lines in the image.
-    *  Satisfies pure virtual requirement from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level = 0) const;
-   
-   /**
-    *  Returns the number of samples in the image.  
-    *  Satisfies pure virtual requirement from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level = 0) const;
-
-   /**
-    * Returns the zero based image rectangle for the reduced resolution data
-    * set (rrds) passed in.  Note that rrds 0 is the highest resolution rrds.
-    */
-   virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level = 0) const;
-   
-   /**
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-   
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-   /**
-    *  Returns the image geometry object associated with this tile source or NULL if non defined.
-    */
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-   
-   /**
-    * Returns the output pixel type of the tile source.
-    */
-   virtual ossimScalarType getOutputScalarType() const;
-
-   /**
-    * Returns the width of the output tile.
-    */
-   virtual ossim_uint32 getTileWidth() const;
-
-   virtual void close();
-   /**
-    * Returns the height of the output tile.
-    */
-   virtual ossim_uint32 getTileHeight() const;
-
-   virtual bool isOpen()const;
-
-   /**
-    * Returns the tile width of the image or 0 if the image is not tiled.
-    * Note: this is not the same as the ossimImageSource::getTileWidth which
-    * returns the output tile width, which can be different than the
-    * internal image tile width on disk.
-    */
-   virtual ossim_uint32 getImageTileWidth() const;
-
-   /**
-    * Returns the tile width of the image or 0 if the image is not tiled.
-    * Note: this is not the same as the ossimImageSource::getTileHeight which
-    * returns the output tile width which can be different than the internal
-    * image tile width on disk.
-    */
-   virtual ossim_uint32 getImageTileHeight() const;
-
-   /**
-    * @brief Gets a property for matching name.
-    * @param name The name of the property to get.
-    * @return Returns property matching "name".
-    */
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   
-   /**
-    * @brief Gets a list of property names available.
-    * @param propertyNames The list to push back names to.
-    */
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   
-protected:
-   virtual ~ossimAdrgTileSource();
-   
-   /**
-    *  Adjust point to even 128 boundary.  Assumes 0,0 origin.
-    */
-   void adjustToStartOfTile(ossimIpt& pt) const;
-   
-   /**
-    *  Returns true on success, false on error.
-    */
-   bool fillBuffer(const ossimIrect& tile_rect,
-                   const ossimIrect& clip_rect,
-                   ossimImageData* tile);
-   
-   ossimRefPtr<ossimImageData>  m_Tile;
-   ossim_uint8*                 m_TileBuffer;
-   std::ifstream                m_FileStr;
-   ossimAdrgHeader*             m_AdrgHeader;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimAnnotationMultiEllipseObject.h b/include/ossim/imaging/ossimAnnotationMultiEllipseObject.h
deleted file mode 100644
index cc9217d..0000000
--- a/include/ossim/imaging/ossimAnnotationMultiEllipseObject.h
+++ /dev/null
@@ -1,66 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimAnnotationMultiEllipseObject.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimAnnotationMultiEllipseObject_HEADER
-#define ossimAnnotationMultiEllipseObject_HEADER
-#include <ossim/imaging/ossimAnnotationObject.h>
-#include <vector>
-
-class OSSIMDLLEXPORT ossimAnnotationMultiEllipseObject : public ossimAnnotationObject
-{
-public:
-   ossimAnnotationMultiEllipseObject(const std::vector<ossimDpt>& pointList,
-                                     const ossimDpt& widthHeight = ossimDpt(1,1),
-                                     bool enableFill = false,
-                                     unsigned char r = 255,
-                                     unsigned char g = 255,
-                                     unsigned char b = 255,
-                                     long thickness = 1);
-
-   ossimAnnotationMultiEllipseObject(const ossimDpt& widthHeight = ossimDpt(1,1),
-                                     bool enableFill = false,
-                                     unsigned char r = 255,
-                                     unsigned char g = 255,
-                                     unsigned char b = 255,
-                                     long thickness = 1);
-
-   ossimAnnotationMultiEllipseObject(const ossimAnnotationMultiEllipseObject& rhs);
-
-   ossimObject* dup()const;
-
-
-   virtual ossimAnnotationObject* getNewClippedObject(const ossimDrect& rect)const;
-   virtual void applyScale(double x, double y);
-   virtual void draw(ossimRgbImage& anImage)const;
-   virtual bool intersects(const ossimDrect& rect)const;
-   virtual std::ostream& print(std::ostream& out)const;
-   virtual void getBoundingRect(ossimDrect& rect)const;
-   virtual void computeBoundingRect();
-  /*!
-   */
-   virtual bool isPointWithin(const ossimDpt& imagePoint)const;
-   
-   void setFillFlag(bool flag);
-
-   void resize(ossim_uint32 size);
-
-   virtual void setWidthHeight(const ossimDpt& widthHeight);
-
-   ossimDpt& operator[](int i);
-   
-   const ossimDpt& operator[](int i)const;
-   
-protected:
-   virtual ~ossimAnnotationMultiEllipseObject();
-   std::vector<ossimDpt>  thePointList;
-   ossimDpt               theWidthHeight;
-   bool                   theFillFlag;
-   ossimDrect             theBoundingRect;
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimAnnotationObject.h b/include/ossim/imaging/ossimAnnotationObject.h
deleted file mode 100644
index a0a42cc..0000000
--- a/include/ossim/imaging/ossimAnnotationObject.h
+++ /dev/null
@@ -1,105 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  See LICENSE.txt file in the top level directory.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimAnnotationObject.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimAnnotationObject_HEADER
-#define ossimAnnotationObject_HEADER
-#include <iostream>
-
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/imaging/ossimRgbImage.h>
-#include <ossim/base/ossimString.h>
-
-class OSSIMDLLEXPORT ossimAnnotationObject : public ossimObject
-{
-public:
-   ossimAnnotationObject(ossim_uint8 r=255,
-                         ossim_uint8 g=255,
-                         ossim_uint8 b=255,
-                         ossim_uint8 thickness=1);
-   virtual void applyScale(double x,
-                           double y)=0;
-   virtual void applyScale(const ossimDpt& scale);
-   
-   virtual std::ostream& print(std::ostream& out)const;
-
-   virtual void draw(ossimRgbImage& anImage)const=0;
-   virtual bool intersects(const ossimDrect& rect)const=0;
-
-   /*!
-    * Will allocate a new object that is clipped to the passed.
-    * in rect.  Look at derived classes to see if the object is actually
-    * clipped or not.  A new object is returned if it clips to the rect
-    * else NULL should be returned it doesn't clip.
-    */
-   virtual ossimAnnotationObject* getNewClippedObject(const ossimDrect& rect)const=0;
-   
-   virtual void getBoundingRect(ossimDrect& rect)const=0;
-   virtual ossimDrect getBoundingRect()const;
-
-   virtual void computeBoundingRect()=0;
-   
-   virtual void setColor(ossim_uint8 r,
-                         ossim_uint8 g,
-                         ossim_uint8 b);
-
-   void getColor(ossim_uint8 &r,
-                 ossim_uint8 &g,
-                 ossim_uint8 &b)const;
-
-   ossim_uint8  getThickness()const;
-   virtual void setThickness(ossim_uint8 thickness);
-   
-   /*!
-    * This method allows you to pick an object.  It will
-    * return true or false if the point falls somewhere
-    * on an object.  Look at derived classes for further
-    * information.
-    */
-   virtual bool isPointWithin(const ossimDpt& imagePoint) const;
-
-   /**
-    * Saves the current state of this object.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   virtual ossimString getName() const;
-   virtual void setName(const ossimString& name);
-
-  ossim_uint32 getId()const;
-  virtual ossim_uint32 setId();
-
-  static ossim_uint32 getNextId();
-  static void restIdCounter();
-
-protected:
-   virtual ~ossimAnnotationObject();
-   ossim_uint8 theRed;
-   ossim_uint8 theGreen;
-   ossim_uint8 theBlue;
-   ossim_uint8 theThickness;
-
-   ossimString  theName;
-   ossim_uint32 theId;
-
-  static ossim_uint32 theIdCounter;
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimAppFixedTileCache.h b/include/ossim/imaging/ossimAppFixedTileCache.h
deleted file mode 100644
index 9470b4b..0000000
--- a/include/ossim/imaging/ossimAppFixedTileCache.h
+++ /dev/null
@@ -1,117 +0,0 @@
-//******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: This file contains the Application cache algorithm
-//
-//***********************************
-// $Id: ossimAppFixedTileCache.h 20127 2011-10-12 11:27:10Z gpotts $
-#ifndef ossimAppFixedTileCache_HEADER
-#define ossimAppFixedTileCache_HEADER
-#include <map>
-#include <list>
-#include <iostream>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimIrect.h>
-#include <OpenThreads/ReadWriteMutex>
-
-class ossimFixedTileCache;
-class ossimImageData;
-
-class OSSIM_DLL ossimAppFixedTileCache
-{
-public:
-   friend std::ostream& operator <<(std::ostream& out,
-                                    const ossimAppFixedTileCache& rhs);
-   static const ossim_uint32 DEFAULT_SIZE;
-   typedef ossim_int32 ossimAppFixedCacheId;
-   static ossimAppFixedTileCache *instance(ossim_uint32  maxSize   = 0);
-   virtual ~ossimAppFixedTileCache();
-   
-   /*!
-    * Will flush all cache registered
-    */
-   virtual void flush();
-   virtual void flush(ossimAppFixedCacheId cacheId);
-   virtual void deleteCache(ossimAppFixedCacheId cacheId);
-   /*!
-    * Will create a new Tile cache for this application if the tile size is 0,0 it will
-    * use the default tile size.  Will
-    * return 0 if not successful.
-    */
-   ossimAppFixedCacheId newTileCache(const ossimIrect& tileBoundaryRect,
-                                     const ossimIpt& tileSize=ossimIpt(0,0));
-   ossimAppFixedCacheId newTileCache();
-
-   virtual void setRect(ossimAppFixedCacheId cacheId,
-                        const ossimIrect& boundaryTileRect);
-   virtual void setTileSize(ossimAppFixedCacheId cacheId,
-                            const ossimIpt& tileSize);
-   
-   ossimRefPtr<ossimImageData> getTile(ossimAppFixedCacheId cacheId,
-                           const ossimIpt& origin);
-   ossimRefPtr<ossimImageData> addTile(ossimAppFixedCacheId cacheId,
-                                       ossimRefPtr<ossimImageData> data,
-                                       bool duplicateData=true);
-   
-   ossimRefPtr<ossimImageData> removeTile(ossimAppFixedCacheId cacheId,
-                                          const ossimIpt& origin);
-   void deleteTile(ossimAppFixedCacheId cacheId,
-                   const ossimIpt& origin);
-   
-   const ossimIpt& getTileSize(ossimAppFixedCacheId cacheId);
-   
-   virtual void setMaxCacheSize(ossim_uint32 cacheSize);
-   
-protected:
-//    struct ossimAppFixedCacheTileInfo
-//    {
-//    public:
-//       ossimAppFixedCacheTileInfo(ossimAppFixedCacheId appId,
-//                                  const ossimIpt& origin)
-//          :theAppCacheId(appId),
-//           theOrigin(origin)
-//          {}
-//       ossimAppFixedCacheId  theAppCacheId;
-//       ossimIpt       theOrigin;
-      
-//       bool operator ==(const ossimAppFixedCacheTileInfo &rhs)const
-//          {
-//             return (theAppCacheId == rhs.theAppCacheId &&
-//                     theOrigin     == rhs.theOrigin);
-//          } 
-//    };
-   
-   ossimAppFixedTileCache();
-   
-   ossimFixedTileCache* getCache(ossimAppFixedCacheId cacheId);
-
-   void shrinkGlobalCacheSize(ossim_int32 byteCount);
-   void shrinkCacheSize(ossimAppFixedCacheId id,
-                        ossim_int32 byteCount);
-   void shrinkCacheSize(ossimFixedTileCache* cache,
-                        ossim_int32 byteCount);
-   void deleteAll();
-   
-   static ossimAppFixedTileCache *theInstance;
-   
-   /*!
-    * Will hold the current unique Application id.
-    */
-   static ossimAppFixedCacheId    theUniqueAppIdCounter;
-   ossimIpt                       theTileSize;
-   ossim_uint32                   theMaxCacheSize;
-   ossim_uint32                   theMaxGlobalCacheSize;
-   ossim_uint32                   theCurrentCacheSize;
-
-   std::map<ossimAppFixedCacheId, ossimFixedTileCache*> theAppCacheMap;
-
-   OpenThreads::Mutex theMutex;
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimAppTileCache.h b/include/ossim/imaging/ossimAppTileCache.h
deleted file mode 100644
index 382ffe0..0000000
--- a/include/ossim/imaging/ossimAppTileCache.h
+++ /dev/null
@@ -1,170 +0,0 @@
-//******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-// Description: This file contains the Application cache algorithm
-//
-//***********************************
-// $Id: ossimAppTileCache.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimAppTileCache_HEADER
-#define ossimAppTileCache_HEADER
-#include <map>
-#include <list>
-using namespace std;
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimDpt3d.h>
-#include <ossim/base/ossimRefPtr.h>
-// class ossimTile;
-class ossimTileCache;
-class ossimDataObject;
-
-class ossimAppTileCache
-{
-public:
-   static const ossim_uint32 DEFAULT_SIZE;
-
-   static const ossim_uint32 DEFAULT_BUCKET_SIZE;
-
-   typedef ossim_int32 ossimAppCacheId;
-   typedef ossim_int32 ossimTileId;
-   typedef map<ossimAppCacheId, ossimTileCache*>::iterator AppIdIterator;
-
-   ~ossimAppTileCache();
-
-   /*!
-    *  We will force a singleton on this class.
-    */
-   static ossimAppTileCache *instance(ossim_uint32  maxSize   = 0);
-
-   /*!
-    * Will create a new Tile cache for this application.  Will
-    * return 0 if not successful.
-    */
-   ossimAppCacheId newTileCache(ossim_uint32 bucketSize=DEFAULT_BUCKET_SIZE);
-
-   /*!
-    * Will retrieve a tile from the cache.  Will return NULL
-    * if not found.
-    */
-   ossimDataObject *get(ossimAppCacheId id,
-                        const ossimDpt3d &origin,
-                        ossim_uint32 resLevel=0);
-
-   /*!
-    * Will remove a tile completly from the cache.  The
-    * returned tile is no longer owned by the cache.
-    */
-   ossimRefPtr<ossimDataObject> removeTile(ossimAppCacheId id,
-                                           const ossimDpt3d &origin,
-                                           unsigned long resLevel);
-   /*!
-    * Will insert a tile into the cache.
-    */
-   ossimRefPtr<ossimDataObject> insert(ossimAppCacheId id,
-                                       const ossimDpt3d &origin,
-                                       const ossimDataObject* data,
-                                       ossim_uint32 resLevel=0);
-   
-   /*!
-    * This will delete the specified cache. The LRU queue will
-    * be updated accordingly
-    */
-   void deleteCache(ossimAppCacheId appId);
-protected:
-
-   struct ossimAppCacheTileInfo
-   {
-   public:
-      ossimAppCacheTileInfo(ossimAppCacheId appId,
-                       const ossimDpt3d& origin,
-                       ossim_uint32    resLevel)
-         :theAppCacheId(appId),
-          theOrigin(origin),
-          theResLevel(resLevel)
-         {}
-      ossimAppCacheId  theAppCacheId;
-      ossimDpt3d         theOrigin;
-      ossim_uint32     theResLevel;
-
-      bool operator ==(const ossimAppCacheTileInfo &rhs)
-         {
-            return (theAppCacheId == rhs.theAppCacheId &&
-                    theOrigin     == rhs.theOrigin &&
-                    theResLevel   == rhs.theResLevel);
-         } 
-  
-   };
-
-   ossimAppTileCache(ossim_uint32  maxSize   = DEFAULT_SIZE)
-      :
-         theMaxCacheSize(maxSize),
-         theCurrentCacheSize(0)
-      {}
-
-   void deleteAll();
-   /*!
-    * Used to get access to the App cache.
-    */
-  ossimTileCache* get(ossimAppCacheId id);
-
-   /*!
-    * will remove all occurances of the appId from the
-    * queue
-    */
-   void deleteAppCacheFromQueue(ossimAppCacheId appId);
-
-   /*!
-    * Will remove a single instance of a tile from the queue.
-    */
-   void removeTileFromQueue(ossimAppCacheId appId,
-                            const ossimDpt3d &origin,
-                            ossim_uint32 resLevel);
-
-   void adjustQueue(ossimAppCacheId id,
-                    const ossimDpt3d &origin,
-                    ossim_uint32 resLevel);
-   /*!
-    * will pop the queue and remove that tile from its cache
-    * and return it to the caller. This is used by the insert
-    * when the max cache size is exceeded.
-    */
-   ossimRefPtr<ossimDataObject> removeTile();
-
-
-   static ossimAppTileCache *theInstance;
-   /*!
-    * Will hold the current unique Application id.
-    */
-   static ossimAppCacheId                   theUniqueAppIdCounter;
-   /*!
-    * Will hold the list of application caches
-    */
-   map<ossimAppCacheId, ossimTileCache*>  theAppCache;
-
-   /*!
-    * Is the maximum size of the cache.
-    */
-   ossim_uint32                      theMaxGlobalCacheSize;
-   ossim_uint32                      theMaxCacheSize;
-   
-
-   /*!
-    * This holds the current cache size.
-    */
-   ossim_uint32                      theCurrentCacheSize;
-   
-
-   /*!
-    * Is used in an Least recently used algorithm
-    */
-   list<ossimAppCacheTileInfo>      theUsedQueue;
-   
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimAtCorrRemapper.h b/include/ossim/imaging/ossimAtCorrRemapper.h
deleted file mode 100644
index be043a0..0000000
--- a/include/ossim/imaging/ossimAtCorrRemapper.h
+++ /dev/null
@@ -1,88 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2002 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Kathy Minear
-//
-// Description:
-// Takes in DNs for any number of bands
-// Converts DNs to Radiance at the satellite values Lsat
-// Converts Lsat to Surface Reflectance values
-//
-//*************************************************************************
-// $Id: ossimAtCorrRemapper.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimAtCorrRemapper_HEADER
-#define ossimAtCorrRemapper_HEADER
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-class ossimAtCorrRemapper : public ossimImageSourceFilter
-{
-public:
-
-   ossimAtCorrRemapper(ossimObject* owner = NULL,
-                       ossimImageSource* inputSource =  NULL,
-                       const ossimString& sensorType = "");
-
-
-   virtual ossimString getShortName() const;
-
-   virtual void initialize();
-
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect,
-                                               ossim_uint32 resLevel=0);
-   
-   /*!
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-   virtual ostream& print(ostream& os) const;
-   friend ostream& operator << (ostream& os,  const ossimAtCorrRemapper& hr);
-
-   vector<double> getNormMinPixelValues() const;
-   vector<double> getNormMaxPixelValues() const;
-
-   void getNormMinPixelValues(vector<double>& v) const;
-   void getNormMaxPixelValues(vector<double>& v) const;
-
-   const ossimString& getSensorType() const;
-
-   void setSensorType(const ossimString& sensorType);
-
-protected:
-   virtual ~ossimAtCorrRemapper();
-
-   /*!
-    * Method to set unset the enable flag.
-    */
-   void verifyEnabled();
-   virtual void interpolate(const ossimDpt& pt,
-                            int band,
-                            double& a,
-                            double& b,
-                            double& c)const;
-                            
-   ossimRefPtr<ossimImageData> theTile;
-   double*            theSurfaceReflectance;
-   bool               theUseInterpolationFlag;
-   vector<double>     theMinPixelValue;
-   vector<double>     theMaxPixelValue;
-   vector<double>     theXaArray;
-   vector<double>     theXbArray;
-   vector<double>     theXcArray;
-   vector<double>     theBiasArray;
-   vector<double>     theGainArray;
-   vector<double>     theCalCoefArray;
-   vector<double>     theBandWidthArray;
-   ossimString        theSensorType;
-
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimAtCorrRemapper_HEADER */
diff --git a/include/ossim/imaging/ossimBandAverageFilter.h b/include/ossim/imaging/ossimBandAverageFilter.h
deleted file mode 100644
index 2ebf11f..0000000
--- a/include/ossim/imaging/ossimBandAverageFilter.h
+++ /dev/null
@@ -1,110 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimBandAverageFilter.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimBandAverageFilter_HEADER
-#define ossimBandAverageFilter_HEADER
-#include <vector>
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-/**
- * This filter outputs a single band that is the weighted average of all the
- * input bands retrieved from the getTile.  This filter will work with any
- * input scalar type.  Note the OSSIMDLLEXPORT is used for the different
- * compilers that require importing and exporting symbols for shared library
- * support.
- */
-class OSSIMDLLEXPORT ossimBandAverageFilter : public ossimImageSourceFilter
-{
-public:
-   ossimBandAverageFilter();
-   ossimBandAverageFilter(ossimImageSource* input,
-                          const std::vector<double>& weights);
-
-   /**
-    * The data object argument is deprecated and should not be used.
-    * eventually we will remove it from the base classes.  This method will
-    * return 1 if our source is enabled else it calls the base class
-    * getNumberOfOutputBands.
-    */
-   virtual ossim_uint32 getNumberOfOutputBands()const;
-   
-   /**
-    * Since this filter is going to operate in native pixel type we will use
-    * a tmeplate method to do this.  It will check the scalar tpe of the input
-    * and then cat it to set the template variabel to be used within the
-    * template method averageInput.
-    */
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
-                                               ossim_uint32 resLevel=0);
-
-   /**
-    * Since we are merging all bands we will use the null pix of the
-    * first input band as our null pix.  If we are disabled we just
-    * return the input s null
-    */
-   virtual double getNullPixelValue(ossim_uint32 band=0)const;
-
-   /**
-    * We will use the min of all bands as our min.  If we aredisabled
-    * we just return the inputs min
-    */
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   
-   /**
-    * We will use the max of all bands as our max.  If we aredisabled
-    * we just return the inputs max
-    */
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-
-   /**
-    * simple access method to get a weight
-    */
-   double getWeight(ossim_uint32 band)const;
-
-   /**
-    * Sinple access method to set the weight of a band,
-    * We make sure that it is a positive weight
-    */
-   void setWeight(ossim_uint32 band, double weight);
-
-   /**
-    * allocates its tile buffer
-    */
-   virtual void initialize();
-
-   /**
-    * loads its weights to a keywordlist
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   /**
-    * Saves its weights to a keywordlist
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-protected:
-   virtual ~ossimBandAverageFilter();
-   
-  ossimRefPtr<ossimImageData> theTile;
-   std::vector<double>         theWeights;
-
-   void checkWeights();
-   
-   template<class T> void averageInput(
-      T dummyVariable, // used only for template type, value ignored
-      ossimRefPtr<ossimImageData> inputDataObject);
-
-// for Runtime Type Info (RTTI)
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimBandClipFilter.h b/include/ossim/imaging/ossimBandClipFilter.h
deleted file mode 100644
index f925082..0000000
--- a/include/ossim/imaging/ossimBandClipFilter.h
+++ /dev/null
@@ -1,92 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimBandClipFilter.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimBandClipFilter_HEADER
-#define ossimBandClipFilter_HEADER
-#include <vector>
-using namespace std;
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-class ossimBandClipFilter : public ossimImageSourceFilter
-{
-public:
-   /*!
-    * Specifies the type of clipping.  The first will
-    * just clip and 
-    */
-   enum ossimBandClipType
-   {
-      ossimBandClipType_NONE             = 0,
-      ossimBandClipType_CLIP             = 1,
-      ossimBandClipType_CLAMP            = 2,
-      ossimBandClipType_LINEAR_STRETCH   = 3,
-      ossimBandClipType_MEDIAN_STRETCH   = 4 
-   };
-
-   ossimBandClipFilter();
-   ossimBandClipFilter(ossimImageSource*,
-                        const vector<double>& minPix,
-                        const vector<double>& maxPix,
-                        ossimBandClipType clipType=ossimBandClipType_NONE);
-   
-   ossimBandClipFilter(ossimImageSource*,
-                        double minPix,
-                        double maxPix,
-                        ossimBandClipType clipType=ossimBandClipType_NONE);
-
-
-   void setClipType(ossimBandClipType clipType);
-
-   ossimBandClipType getClipType()const;
-
-   virtual ossim_uint32 getNumberOfValues()const;
-
-   void setNumberOfValues(ossim_uint32 size);
-   
-   void setMinMaxPix(const vector<double>& minPix,
-                     const vector<double>& maxPix);
-
-   const std::vector<double>& getMinPixList()const;
-   const std::vector<double>  getMaxPixList()const;
-
-   double getMinPix(ossim_uint32 index)const;
-   double getMaxPix(ossim_uint32 index)const;
-
-   ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
-                                       ossim_uint32 resLevel=0);
-   
-   virtual void initialize();
-   
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix = NULL);
-
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix = NULL)const;
-protected:
-   virtual ~ossimBandClipFilter();
-
-   void runClip();
-   void runClamp();
-   void runLinearStretch();
-   void runMedianStretch();
-
-   std::vector<double> theMinPix; // normalized min
-   std::vector<double> theMaxPix; // normalized max
-   std::vector<double> theMedian; // normalized median.
-
-   ossimBandClipType           theClipType;
-   ossimRefPtr<ossimImageData> theTile;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimBandMergeSource.h b/include/ossim/imaging/ossimBandMergeSource.h
deleted file mode 100644
index cc74f30..0000000
--- a/include/ossim/imaging/ossimBandMergeSource.h
+++ /dev/null
@@ -1,62 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimBandMergeSource.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimBandMergeSource_HEADER
-#define ossimBandMergeSource_HEADER
-#include <ossim/imaging/ossimImageCombiner.h>
-
-class ossimImageSourceConnection;
-class ossimImageSource;
-
-class OSSIM_DLL ossimBandMergeSource : public ossimImageCombiner
-{
-public:
-   ossimBandMergeSource();
-   ossimBandMergeSource(ossimConnectableObject::ConnectableObjectList& inputSources);
-   
-   /**
-    * This will merge all the bands from the input source list
-    * into one contiguous ossimImageData object.  This is very
-    * useful when you want to split off an intesity channel in
-    * HSI and then run some algorithms on it and then merge it back.
-    * You can also try to do fusions by converting to an YCbCr and
-    * replace the Y or intensity channel with maybe a high-pass
-    * convolution on the pan.
-    */
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
-                                               ossim_uint32 resLevel=0);
-
-   virtual void initialize();
-   
-   /**
-    * Returns the number of bands in a tile returned from this TileSource.
-    * Note: we are supporting sources that can have multiple data objects.
-    * If you want to know the scalar type of an object you can pass in the 
-    */
-   virtual ossim_uint32 getNumberOfOutputBands() const;
-
-   virtual double getNullPixelValue(ossim_uint32 band=0)const;
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-   
-protected:
-   virtual ~ossimBandMergeSource();
-   /** Performs allocation of "theTile". */
-   void allocate();
-   
-   ossim_uint32                theNumberOfOutputBands;
-   ossimRefPtr<ossimImageData> theTile;
-   
-   ossim_uint32 computeNumberOfInputBands()const;
-
-TYPE_DATA
-};
-#endif /* #ifndef ossimBandMergeSource_HEADER */
diff --git a/include/ossim/imaging/ossimBandSelector.h b/include/ossim/imaging/ossimBandSelector.h
deleted file mode 100644
index c11fc01..0000000
--- a/include/ossim/imaging/ossimBandSelector.h
+++ /dev/null
@@ -1,158 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  See top level LICENSE.txt.
-// 
-// Author:  Garrett Potts
-//
-// Description:  Contains class declaration for ossimBandSelector.
-// 
-//*******************************************************************
-//  $Id: ossimBandSelector.h 21631 2012-09-06 18:10:55Z dburken $
-#ifndef ossimBandSelector_HEADER
-#define ossimBandSelector_HEADER 1
-
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-#include <vector>
- 
-class ossimImageData;
-class ossimImageHandler;
-
-class OSSIM_DLL ossimBandSelector : public ossimImageSourceFilter
-{
-   
-public:
-   enum ossimBandSelectorWithinRangeFlagState
-   {
-      ossimBandSelectorWithinRangeFlagState_NOT_SET      = 0,
-      ossimBandSelectorWithinRangeFlagState_IN_RANGE     = 1,
-      ossimBandSelectorWithinRangeFlagState_OUT_OF_RANGE = 2,
-
-   };
-
-   ossimBandSelector();
-   virtual ~ossimBandSelector();
-   
-   
-   virtual ossimString getLongName()  const;
-   virtual ossimString getShortName() const;
-
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-
-   /**
-    * Initializes bandList to the zero based order of output bands.
-    */
-   virtual void getOutputBandList(std::vector<ossim_uint32>& bandList) const;
-
-   /**
-    * Sets the output band list.
-    *
-    * @param outputBandList List of zero based bands.
-    *
-    * @note The input connection should be established prior to calling this.
-    *
-    * @note Bands can be duplicated.  So if you have a single band input you
-    * can do a band list like "1, 1, 1".   Any band within the list must be
-    * available from the input.  So if you have a 3 band input bands must be
-    * constrained to zero based bands "0, 1, or 2".
-    *
-    * @note Calling this method does not enable filter so callers should do:
-    * theBandSelector->enableSource();
-    * theBandSelector->setOutputBandList(bandList);
-    */
-   virtual void setOutputBandList(const vector<ossim_uint32>& outputBandList);
-   
-   /**
-    * Returns the number of bands in a tile returned from this TileSource.
-    */
-   virtual ossim_uint32 getNumberOfOutputBands() const;
-
-   /**
-    * @brief Returns the number of input bands.
-    *
-    * Overrides ossimImageSourceFilter::getNumberOfInputBands to check for a
-    * single image chain band selectable image handler on the input.  If one
-    * is present it returns it's number of input bands instead of the number
-    * of the input connection's output bands(our input).  This is needed so
-    * callers, e.g. band selector dialog box can query the number of bands
-    * available.
-    *
-    * @return Number of bands available.
-    */
-   virtual ossim_uint32 getNumberOfInputBands()const;   
-
-   virtual void initialize();
-   
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-   virtual double getNullPixelValue(ossim_uint32 band=0)const;
-   
-
-   /**
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=NULL)const;
-   
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=NULL);
-   /**
-    *   Override base class so that a disableSource event does not
-    *   reinitialize the object and enable itself.
-    */
-   //virtual void propertyEvent(ossimPropertyEvent& event);
-   //virtual void refreshEvent(ossimRefreshEvent& event);   
-
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;						  
-   virtual bool isSourceEnabled()const;
-
-protected:
-
-   /**
-    * Called on first getTile, will initialize all data needed.
-    */
-   void allocate();
-
-   /**
-    * Will check all combinations of the band list to see if its 
-    */
-   void checkPassThrough();
-
-   /**
-    * @return true if all bands in theOutputBandList are less than the
-    * number of input's bands.
-    */
-   bool outputBandsWithinInputRange() const;
-
-   /**
-    * @brief Finds and returns band selectable image handler.
-    *
-    * To get a valid pointer there must be one and only one image handler on
-    * the input connection and it must be a band selector.  In other words,
-    * must be a single image chain input and
-    * ossimImageHandler::isBandSelector() must return true.
-    *
-    * @return Pointer to image handler wrapped in an ossimRefPtr on success;
-    * null, on error.
-    */
-   ossimRefPtr<ossimImageHandler> getBandSelectableImageHandler() const;
-   
-   
-   ossimRefPtr<ossimImageData>           theTile;
-   std::vector<ossim_uint32>             theOutputBandList;
-   ossimBandSelectorWithinRangeFlagState theWithinRangeFlag;
-   bool                                  thePassThroughFlag;
-
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimBandSelector_HEADER */
diff --git a/include/ossim/imaging/ossimBandSeparateHandler.h b/include/ossim/imaging/ossimBandSeparateHandler.h
deleted file mode 100644
index 4beaac3..0000000
--- a/include/ossim/imaging/ossimBandSeparateHandler.h
+++ /dev/null
@@ -1,97 +0,0 @@
-//**************************************************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Oscar Kramer
-// 
-// Description:
-//
-// Image handler used when the multi-band image has each band represented by a different disk file.
-// This is the case for some Ikonos imagery. 
-//
-//**************************************************************************************************
-// $Id: ossimBandSeparateHandler.h 2644 2011-05-26 15:20:11Z oscar.kramer $
-#ifndef ossimBandSeparateHandler_HEADER
-#define ossimBandSeparateHandler_HEADER
-
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/imaging/ossimBandMergeSource.h>
-
-/**
- *  This class defines an abstract Handler which all image handlers(loaders)
- *  should derive from.
- */
-class OSSIMDLLEXPORT ossimBandSeparateHandler : public ossimImageHandler
-{
-public:
-   //!  Constructor (default):
-   ossimBandSeparateHandler();
-   
-   //! Destructor:
-   virtual ~ossimBandSeparateHandler();
-   
-   //! Opens multiple band-files based on info in metadata file.
-   //! @return Returns true on success, false on error.
-   virtual bool open();
-
-   //! Closes all band-files and clears input handler list.
-   virtual void close();
-
-   //! @return true if open, false if not.
-   virtual bool isOpen()const;
-
-   virtual ossim_uint32 getNumberOfInputBands() const;
-   
-   //! @param resLevel Reduced resolution level to return lines of.
-   //! Default = 0
-   //! @return The number of lines for specified reduced resolution level.
-   virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel = 0) const;
-
-   //! @param resLevel Reduced resolution level to return samples of.
-   //! Default = 0
-   //! @return The number of samples for specified reduced resolution level.
-   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel = 0) const;
-   
-   //! Method to save the state of an object to a keyword list.
-   //! Return true if ok or false on error.
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
-
-   //! Method to the load (recreate) the state of an object from a keyword
-   //! list.  Return true if ok or false on error.
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-
-   //! Fills the requested tile by pulling pixels from multiple file tiles as needed.
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect, ossim_uint32 resLevel);
-
-   //! Returns scalar type of first band (should be the same for all bands)
-   virtual ossimScalarType getOutputScalarType() const;
-
-   //! Overrides base connection method to connect output of merge source.
-   virtual bool canConnectMyOutputTo(ossim_int32 index, const ossimConnectableObject* obj);
-
-   //! Returns the geometry of the first band:
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-
-   //! These images are not tiled
-   virtual ossim_uint32 getImageTileWidth()  const { return 0; }
-   virtual ossim_uint32 getImageTileHeight() const { return 0; }
-
-protected:
-   //! Fetches the list of band file names from the header file. The header file name is contained
-   //! in ossimImageHandler::theImageFile.
-   //! NOTE TO PROGRAMMER: This class is presently tailored to the Ikonos metadata file specifying
-   //! the individual band files. If other "metadata" formats are to be supported, then this class
-   //! should be derived from. This method would therefore be pure virtual in this base-class and 
-   //! only this method would need to be implemented in the derived classes.
-   virtual void getBandFileNames(vector<ossimFilename>& file_names);
-
-  vector<ossimRefPtr<ossimImageHandler> > m_bandFiles;
-  ossimRefPtr<ossimBandMergeSource>       m_mergeSource;
-
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimBandSeparateHandler_HEADER */
diff --git a/include/ossim/imaging/ossimBitMaskTileSource.h b/include/ossim/imaging/ossimBitMaskTileSource.h
deleted file mode 100644
index 3799de3..0000000
--- a/include/ossim/imaging/ossimBitMaskTileSource.h
+++ /dev/null
@@ -1,133 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Oscar Kramer
-//
-//*******************************************************************
-//  $Id: ossimBitMaskTileSource.h 2644 2011-05-26 15:20:11Z oscar.kramer $
-
-#ifndef ossimBitMaskTileSource_HEADER
-#define ossimBitMaskTileSource_HEADER
-
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimBitMaskWriter.h>
-
-class ossimImageGeometry;
-
-//*************************************************************************************************
-//! This is the image handler for providing mask pixels to an ossimMaskFilter object.
-//!
-//! This class takes care of reading the custom, bit-compressed OSSIM bit mask file format. 
-//! 
-//! When the developer needs to mask an image, the following needs to be done:
-//!
-//!   Creating the Mask:
-//!   1. A mask file first needs to be created using ossimBitMaskWriter and a source image. The app
-//!      "img2rr --create-mask" directs that program to use ossimBitMaskWriter to generate a mask  
-//!      during overview generation. There is also create-bitmask app that will generate the mask.
-//!   2. An OSSIM ".mask" file should exist on disk after step 0. This is typically the same base 
-//!      name as the source image file being masked.
-//!   
-//!   Using the Mask:
-//!   1. An ossimBitMaskTileSource (derived from ossimImageHandler) needs to be instantiated and
-//!      the mask file name used to open it. 
-//!   3. An ossimMaskFilter (derived from ossimImageCombiner) is the actual filter that combines
-//!      the source image handler and the ossimBitMaskTileSource object to provide the resultant 
-//!      masked tiles.
-//!      
-//! The OSSIM bit mask file contains a small header that consists of:
-//!    magic number,
-//!    starting res level,
-//!    number of res levels
-//!    num columns at starting res level,
-//!    num rows at starting res level, 
-//!    num columns at 2nd res level,
-//!    num rows at 2nd res level, 
-//!    etc., for all res levels
-//!    <space> 
-//!    <compressed binary mask data>
-//!
-//! The number of rows and columns represents the number of bytes in the mask, with each byte
-//! containing 8 alpha mask bits representing 8 pixels in the original image.
-//!
-//! This class functions as an image handler, returning 255 for unmasked pixels, and 0 for masked 
-//! pixels. 
-//! 
-//! For debug purposes, this code initializes the tile to all 128's so that the 
-//! ossimMaskFilter can recognize uninitialized mask data.
-//!
-//*************************************************************************************************
-
-class OSSIM_DLL ossimBitMaskTileSource : public ossimImageHandler
-{
-public:
-
-   ossimBitMaskTileSource();
-
-   //! Return a tile of masks. These are "bit masks", i.e., either 0 (hide) or 1 (show).
-   //! The pixels' remaining 7 bits are cleared and should not be used.
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect, ossim_uint32 rLevel=0);
-   
-   virtual bool         isValidRLevel     (ossim_uint32 res_level)   const;
-   virtual ossim_uint32 getNumberOfLines  (ossim_uint32 res_level=0) const;
-   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 res_level=0) const;
-
-   virtual ossim_uint32    getNumberOfInputBands()  const { return 1; }
-   virtual ossim_uint32    getNumberOfOutputBands() const { return 1; }
-   virtual ossimScalarType getOutputScalarType()    const { return OSSIM_UINT8; }
-   virtual ossim_uint32    getImageTileWidth()      const { return 0; }
-   virtual ossim_uint32    getImageTileHeight()     const { return 0; }   
-
-   virtual bool isOpen() const;
-   virtual bool open();
-   virtual void close();
-
-   virtual double getNullPixelValue(ossim_uint32 /*band=0*/) const { return 0; }
-   virtual double getMinPixelValue (ossim_uint32 /*band=0*/) const { return 0; }
-   virtual double getMaxPixelValue (ossim_uint32 /*band=0*/) const { return 1.0; }
-
-   //! There is no geometry associated with a mask file -- it is pixel-for-pixel mapped to
-   //! an image file. The image file must have the valid geometry.
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-
-   //! Overrides base class implementation.
-   virtual ossim_uint32 getNumberOfDecimationLevels() const;
-
-   //! For backward compatibility with older mask format ("Ming Mask"), provide for associating
-   //! the mask with an image handler:
-   void setAssociatedImageHandler(ossimImageHandler* handler);
-
-   //! This class can be used during overview generation, in which case there will be a simultaneous
-   //! mask writing. Instead of accessing a mask file (which may not yet exist), the mask buffer
-   //! of the writer will be accessed directly instead of our own buffer.
-   void setAssociatedMaskWriter(ossimBitMaskWriter* maskWriter);
-
-protected:
-   virtual ~ossimBitMaskTileSource();
-   
-   //! Returns true if this handler recognizes the file name extension as an OSSIM raster mask file.
-   bool isSupportedExtension();
-
-   virtual void establishDecimationFactors();
-
-   ossimRefPtr<ossimImageData>  m_tile;
-   vector<ossim_uint8*>         m_buffers;
-   vector<ossimIpt>             m_bufferSizes;
-   
-   //! For backward compatibility with older mask format ("Ming Mask"), provide for associating
-   //! the mask with an image handler:
-   ossimRefPtr<ossimImageHandler>  m_handler;
-
-   //! This class can be used during overview generation, in which case there will be a simultaneous
-   //! mask writing. Instead of accessing a mask file (which may not yet exist), the mask buffer
-   //! of the writer will be accessed directly instead of our own buffer.
-   ossimRefPtr<ossimBitMaskWriter>  m_maskWriter;
-
-   TYPE_DATA
-};
-
-#endif
-
diff --git a/include/ossim/imaging/ossimBitMaskWriter.h b/include/ossim/imaging/ossimBitMaskWriter.h
deleted file mode 100644
index 794669f..0000000
--- a/include/ossim/imaging/ossimBitMaskWriter.h
+++ /dev/null
@@ -1,133 +0,0 @@
-//*************************************************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Oscar Kramer
-//
-//*************************************************************************************************
-//  $Id: ossimBitMaskWriter.h 2644 2011-05-26 15:20:11Z oscar.kramer $
-
-#ifndef ossimBitMaskWriter_HEADER
-#define ossimBitMaskWriter_HEADER
-
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimOutputSource.h>
-#include <ossim/imaging/ossimPixelFlipper.h>
-#include <vector>
-
-class ossimFilename;
-class ossimKeywordlist;
-class ossimImageHandler;
-class ossimBitMaskTileSource;
-
-//*************************************************************************************************
-//! 
-//! Class for computing a mask from an input image source and writing the mask file to disk.
-//!
-//! This class takes care of all details associated with computing, writing and reading the custom,
-//! bit-compressed OSSIM bit mask file format. 
-//! 
-//! When the developer needs to mask an image, the following needs to be done:
-//!
-//!   Creating the Mask:
-//!   1. A mask file first needs to be created using ossimBitMaskWriter and a source image. The app
-//!      "img2rr --create-mask" directs that program to use ossimBitMaskWriter to generate a mask  
-//!      during overview generation. There is also create-bitmask app that will generate the mask.
-//!   2. An OSSIM ".mask" file should exist on disk after step 0. This is typically the same base 
-//!      name as the source image file being masked.
-//!   
-//!   Using the Mask:
-//!   1. An ossimBitMaskTileSource (derived from ossimImageHandler) needs to be instantiated and
-//!      the mask file name used to open it. 
-//!   3. An ossimMaskFilter (derived from ossimImageCombiner) is the actual filter that combines
-//!      the source image handler and the ossimBitMaskTileSource object to provide the resultant 
-//!      masked tiles.
-//!      
-//! The OSSIM bit mask file contains a small header that consists of:
-//!    magic number,
-//!    starting res level,
-//!    number of res levels
-//!    num columns at starting res level,
-//!    num rows at starting res level, 
-//!    num columns at 2nd res level,
-//!    num rows at 2nd res level, 
-//!    etc., for all res levels
-//!    <space> 
-//!    <compressed binary mask data>
-//!
-//! The number of rows and columns represents the number of bytes in the mask, with each byte
-//! containing 8 alpha mask bits representing 8 pixels in the original image.
-//!
-//! The mask is computed here using the specified values for bogus pixels. If a pixel in the source
-//! image is in the range of bogus values, a mask of 0 is assigned to that pixel, otherwise 1. 
-//!
-//*************************************************************************************************
-class OSSIM_DLL ossimBitMaskWriter : public ossimOutputSource
-{
-public:
-   static const char* BM_STARTING_RLEVEL_KW;
-   static const char* MASK_FILE_MAGIC_NUMBER;
-
-   //! Default constructor typically used when reading a mask from disk.
-   ossimBitMaskWriter();
-
-   ~ossimBitMaskWriter();
-
-   //! Sets the NULL pixel value to consider when computing mask:
-   void setBogusPixel(double pixel_value);
-
-   //! Sets the range of pixels (inclusive) to be regarded as NULL pixels when computing mask
-   void setBogusPixelRange(double min, double max);
-
-   //! Sets the starting resolution level for the mask.
-   void setStartingResLevel(ossim_uint32 res_level) { m_startingResLevel = res_level; }
-
-   //! Given a source's tile, derives the alpha mask and saves it in buffer for later writing to 
-   //! disk.
-   void generateMask(ossimRefPtr<ossimImageData> tile, ossim_uint32 rLevel);
-
-   //! For imagery that already has overviews built, but with artifact edge pixels (such as JP2-
-   //! compressed data), it is preferred to build the mask overviews directly from the R0 mask.
-   //! This method will build the remaining number of R-levels from the last defined mask buffer
-   //! such that the total number of R-levels (counting R0) are represented. Returns TRUE if successful.
-   bool buildOverviews(ossim_uint32 total_num_rlevels);
-
-   //! Computes and writes the mask file according to the specification in the KWL.
-   //! Returns TRUE if successful.
-   virtual bool loadState(const ossimKeywordlist& spec, const char* prefix=0);
-
-   virtual bool isOpen() const;
-   virtual bool open();
-   virtual void close();
-
-   virtual bool canConnectMyInputTo(ossim_int32 myInputIndex, 
-                                    const ossimConnectableObject* object) const;
-   virtual ossim_int32 connectMyInputTo (ossimConnectableObject *inputObject, 
-                                         bool makeOutputConnection=true, 
-                                         bool createEventFlag=true);
-
-protected:
-   friend class ossimBitMaskTileSource;
-
-   //! Initializes the flipper (used for identifying pixels for masking) to default values
-   void initializeFlipper();
-
-   //! Deletes allocated buffers and resets all values to defaults.
-   void reset();
-
-   //! Since overviews may not yet exist when the mask is being written, we must compute the
-   //! size of the source image based on the original R0 image size.
-   ossimIpt computeImageSize(ossim_uint32 rlevel, ossimImageData* tile) const;
-
-   ossimRefPtr<ossimPixelFlipper>  m_flipper;
-   vector<ossim_uint8*>            m_buffers;
-   vector<ossimIpt>                m_bufferSizes;
-   ossim_uint32                    m_startingResLevel;
-   ossimIpt                        m_imageSize; //!< Size of full res source image
-};
-
-#endif
-
diff --git a/include/ossim/imaging/ossimBlendMosaic.h b/include/ossim/imaging/ossimBlendMosaic.h
deleted file mode 100644
index f9a7bbe..0000000
--- a/include/ossim/imaging/ossimBlendMosaic.h
+++ /dev/null
@@ -1,78 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimBlendMosaic.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimBlendMosaic_HEADER
-#define ossimBlendMosaic_HEADER
-#include <ossim/imaging/ossimImageMosaic.h>
-
-class OSSIMDLLEXPORT ossimBlendMosaic : public ossimImageMosaic
-{
-public:
-   ossimBlendMosaic();
-   ossimBlendMosaic(ossimConnectableObject::ConnectableObjectList& inputSources);
-   virtual void initialize();
-
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
-                                               ossim_uint32 resLevel=0);
-   /**
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=NULL)const;
-
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=NULL);
-
-   void setWeight(ossim_uint32 index, double weight);
-   void setWeights(const std::vector<double>& weights);
-   
-   double getWeight(ossim_uint32 index) const;
-   const std::vector<double>& getWeights()const;
-
-
-   void setNumberOfWeights(ossim_uint32 numberOfWeights);
-   void setAllWeightsTo(double value);
-   
-   /**
-    * Will find the min and max values and then
-    * normalize all weights to be from 0 to 1
-    */
-   void normalizeWeights();
-   void findMinMax(double& minValue, double& maxValue)const;
-   
-protected:
-   virtual ~ossimBlendMosaic();
-   vector<double>              theWeights;
-   ossimRefPtr<ossimImageData> theNormResult;
-   /**
-    * If our inputs have output of different scalar
-    * types then we must normalize so we can blend
-    * different scalar data together.
-    */
-   
-
-   template <class T>
-      ossimRefPtr<ossimImageData> combine(T,
-                                          const ossimIrect& tileRect,
-                                          ossim_uint32);
-   template <class T>
-      ossimRefPtr<ossimImageData> combineNorm(T,
-                                              const ossimIrect& tileRect,
-                                              ossim_uint32);
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimBlendMosaic_HEADER */
diff --git a/include/ossim/imaging/ossimBrightnessMatch.h b/include/ossim/imaging/ossimBrightnessMatch.h
deleted file mode 100644
index 3708f84..0000000
--- a/include/ossim/imaging/ossimBrightnessMatch.h
+++ /dev/null
@@ -1,57 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: A brief description of the contents of the file.
-//
-//*************************************************************************
-// $Id: ossimBrightnessMatch.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimBrightnessMatch_HEADER
-#define ossimBrightnessMatch_HEADER
-#include <ossim/imaging/ossimImageSourceFilter.h>
-#include <ossim/imaging/ossimBrightnessContrastSource.h>
-
-class ossimBrightnessMatch : public ossimImageSourceFilter
-{
-public:
-   ossimBrightnessMatch();
-
-
-
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-
-
-   virtual void initialize();
-   /*---------------------- PROPERTY INTERFACE ---------------------------*/
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   /*--------------------- PROPERTY INTERFACE END ------------------------*/
-
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-protected:
-   virtual ~ossimBrightnessMatch();
-   
-   double          theTargetBrightness;
-   double          theInputBrightness;
-   ossimRefPtr<ossimImageData> theNormTile;
-
-   ossimRefPtr<ossimBrightnessContrastSource> theBrightnessContrastSource;
-   
-   ossimRefPtr<ossimImageData> runBrightnessMatch();
-
-   void computeInputBrightness();
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimBumpShadeTileSource.h b/include/ossim/imaging/ossimBumpShadeTileSource.h
deleted file mode 100644
index d82b893..0000000
--- a/include/ossim/imaging/ossimBumpShadeTileSource.h
+++ /dev/null
@@ -1,281 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimBumpShadeTileSource.h 17932 2010-08-19 20:34:35Z dburken $
-#ifndef ossimBumpShadeTileSource_HEADER
-#define ossimBumpShadeTileSource_HEADER
-#include <ossim/imaging/ossimImageCombiner.h>
-#include <ossim/base/ossimPropertyEvent.h>
-#include <ossim/matrix/newmat.h>
-
-class ossimImageData;
-
-class ossimImageSourceConnection;
-
-/**
- * This uses a derivative of Blinn's bump function to compute a 3-D
- * looking image.  The elevation data can be from Grey Scale image or from
- * a Dted file.  This class can take one or two inputs.  The First input is an
- * elevation input that is used to compute a perturbed Normal which is
- * used in a simple lambertian shading equation.  The second input is some
- * color source (Grey or RGB) that defines the diffuse color used within
- * the illumination equation for each pixel. If the diffuse color input is not
- * supplied then an all white color is used for the color.  There are several
- * adjustable parameters that can be set:
- * 1) the Incident light vector described by the Azimuth and Elevation Angle,
- * 2) the pixel scale used along the x and y direction, and
- * 3) the partial derivative matrix used for the partial derivative
- * computation along the x and y direction.
- *
- * <pre>
- * 
- * Some examples of good values:
- *
- * If we are using dted 90 meters as input for shading then:
- * 1) set pixel scale to 180.  Since the partials do 2*dx and 2*dy then
- *    the scale is 2*90meters = 180.
- * 2) set azimuth angle to 45 and set elevation angle to 45 degrees.  Change
- *    them to see the effects.
- * 3) use the following matrix -1 0 1
- *                             -1 0 1
- *                             -1 0 1
- *                                &
- *                              1  1  1
- *                              0  0  0
- *                             -1 -1 -1
- * 
- *    for the partials along x and y directions respectively.  These matrices
- *
- *    (f(x+dx, y) - f(x-dx, y))/2*dx and
- *    (f(x, y+dy) - f(x, y-dy))/2*dy
- *
- *    for an apprximate derivative about some point x, y
- *
- * If we are using pixel intesity (1 - 255) then set the scales to around
- * 100.
- *
- *  Note: varying the scales will vary the smoothness/roughness of the surface
- *        Smaller the scale the rougher the surface will look.
- *
- * The output of this source is always a 3-band 8-bit image.
- *
- * Keywords:
- *   type:               ossimBumpShadeTileSource
- *   azimuth_angle:      45.000000000000000
- *   elevation_angle:    45.000000000000000
- *   scale_per_pixel_x:  180.000000000000000  // this is the 2*dx defined above
- *   scale_per_pixel_y:  180.000000000000000  // this is the 2*dy defined above
- *
- *   the next set of keywords are optional and the default is as defined above.
- *   these define the matrix.
- *
- *
- * A typical chain would look something like this:
- * 
- * OrthoMosaicOfElevation-->Normals-->Renderer-->|
- *                                               |--> BumpShade-->Output 
- * ColorSource----------------------->Renderer-->|
- *
- * NOTES:
- *
- * 1) "Normals" is an ossimImageToPlaneNormalFilter class
- *
- * 2) The bump map input source is used to bump or shade the input color
- * source.  The input color source currently must be a 1 or 3 band
- * image.  Note that the output of this source is always
- * 3 bands (r, g, b).
- *
- * 3) If no color source (2nd input layer) is present the r,g,b values will be
- * used.  The method setRgbColorSource can be used to control this.
- * 
- * </pre>
- * 
- */
-class OSSIMDLLEXPORT ossimBumpShadeTileSource : public ossimImageCombiner
-{
-public:
-   ossimBumpShadeTileSource();
-
-   ossimString getShortName()const;
-   ossimString getLongName()const;
-
-   ossimRefPtr<ossimImageData> getTile(const  ossimIrect& tileRect,
-                                       ossim_uint32 resLevel=0);
-
-   /**
-    * This should always return 3
-    */
-   virtual ossim_uint32 getNumberOfOutputBands() const;
-
-   /**
-    * The output scalar type should always be 8-bit
-    */
-   virtual ossimScalarType getOutputScalarType() const;
-   
-   /**
-    * the null pixel is 0.0.
-    * \return null pixel value is always 0
-    *
-    */
-   virtual double getNullPixelValue()const;
-
-   /**
-    * the min pixel is 1.0.
-    * \return min pixel value is always 1
-    *
-    */
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-
-   /**
-    * the max pixel is 255.
-    * \return max pixel value is always 255
-    *
-    */
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-
-   /**
-    * \return Returns the rotation of the incident vector..
-    */
-   virtual double getAzimuthAngle()const;
-
-   /**
-    * \return Returns the elevation of the incident vector.
-    */
-   virtual double getElevationAngle()const;
-
-   /**
-    *
-    */
-   virtual void setAzimuthAngle(double angle);
-
-   /**
-    *
-    */
-   virtual void setElevationAngle(double angle);
-
-   /**
-    *
-    */
-   virtual void initialize();
-
-   /**
-    *
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   /**
-    *
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-   
-   /**
-    *
-    */
-   bool canConnectMyInputTo(ossim_int32 inputIndex,
-                            const ossimConnectableObject* object)const;
-      
-   /**
-    *
-    */
-   virtual void connectInputEvent(ossimConnectionEvent& event);
-
-   /**
-    *
-    */
-   virtual void disconnectInputEvent(ossimConnectionEvent& event);
-
-   /**
-    *
-    */
-   virtual void propertyEvent(ossimPropertyEvent& event);
-
-   virtual void refreshEvent(ossimRefreshEvent& event);
-
-   /**
-    * Will re-compute the light direction given the elevation angle and
-    * azimuth angle.
-    */
-   void computeLightDirection();
-
-   /* ------------------- PROPERTY INTERFACE -------------------- */
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   /* ------------------ PROPERTY INTERFACE END ------------------- */
-
-   /**
-    * @brief Set the red, green and blue color source values.
-    *
-    * This sets the rgb value used when no second layer is present.
-    *
-    * The default is: r = 255, g = 255, b = 255
-    *
-    * @param r red
-    * @param g green
-    * @param b blue
-    */
-   void setRgbColorSource(ossim_uint8 r, ossim_uint8 g, ossim_uint8 b);
-
-   /**
-    * Gets the red, green and blue color source values.
-    * @param r red
-    * @param g green
-    * @param b blue
-    */
-   void getRgbColorSource(ossim_uint8& r, ossim_uint8& g, ossim_uint8& b) const;
-   
-protected:
-   virtual ~ossimBumpShadeTileSource();
-   void allocate();
-   /**
-    * The result of the illumination equation is stored in
-    * here.  This is populated on each call to getTile.
-    */
-   ossimRefPtr<ossimImageData> m_tile;
-
-   /**
-    * Used for the light vector computation.
-    */
-   double m_lightSourceElevationAngle;
-
-   /**
-    * Used for the light vector computation.
-    */
-   double m_lightSourceAzimuthAngle;
-
-   /**
-    * This is computed from the elevation and
-    * azimuth angles of the light source.
-    */
-   NEWMAT::ColumnVector m_lightDirection;
-
-   /**
-    * rgb values used when no color source (2nd layer) is present.
-    */
-   ossim_uint8 m_r;
-   ossim_uint8 m_g;
-   ossim_uint8 m_b;
-
-   void computeColor(ossim_uint8& r,
-                     ossim_uint8& g,
-                     ossim_uint8& b,
-                     ossim_float64 normalX,
-                     ossim_float64 normalY,
-                     ossim_float64 normalZ,
-                     ossim_uint8 dr,
-                     ossim_uint8 dg,
-                     ossim_uint8 db)const;
-   
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimCastTileSourceFilter.h b/include/ossim/imaging/ossimCastTileSourceFilter.h
deleted file mode 100644
index 1981010..0000000
--- a/include/ossim/imaging/ossimCastTileSourceFilter.h
+++ /dev/null
@@ -1,93 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimCastTileSourceFilter.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimCastTileSourceFilter_HEADER
-#define ossimCastTileSourceFilter_HEADER
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-class OSSIMDLLEXPORT ossimCastTileSourceFilter : public ossimImageSourceFilter
-{
-public:
-   ossimCastTileSourceFilter(ossimImageSource* inputSource=NULL,
-			     ossimScalarType scalarType=OSSIM_UCHAR);
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-   virtual void initialize();
-   virtual ossimScalarType getOutputScalarType() const;
-
-   virtual ossimString getOutputScalarTypeString()const;
-
-   /**
-    *  Sets the output scalar type.
-    */
-   virtual void setOutputScalarType(ossimScalarType scalarType);
-   virtual void setOutputScalarType(ossimString scalarType);
-   
-   /**
-    *  Sets the current resolution level.  Returns true on success, false
-    *  on error.
-    */
-   virtual double getNullPixelValue(ossim_uint32 band)const;
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-
-   ossimRefPtr<ossimImageData> applyCast(ossimRefPtr<ossimImageData> input);
-   
-   /**
-    *  Method to save the state of an object to a keyword list.
-    *  Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=NULL)const;
-
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=NULL);
-
-   /**
-    *   Override base class so that a disableSource event does not
-    *   reinitialize the object and enable itself.
-    */
-   virtual void propertyEvent(ossimPropertyEvent& event);
-   virtual void refreshEvent(ossimRefreshEvent& event);   
-
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-     
-protected:
-   virtual ~ossimCastTileSourceFilter();
-
-   void allocate(const ossimRefPtr<ossimImageData> inputTile);
-   
-   ossimRefPtr<ossimImageData> theTile;
-   ossimScalarType             theOutputScalarType;
-
-   template<class inType>
-   void castInputToOutput(inType **inBuffer,
-                          const double  *nullPix,
-                          bool   inPartialFlag);
-   
-   template<class inType, class outType>
-   void castInputToOutput(inType *inBuffer[],
-                          const double  *nullInPix,
-                          bool   inPartialFlag,
-                          outType *outBuffer[],
-                          const double  *nullOutPix,
-                          ossim_uint32   numberOfBands);
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimCastTileSourceFilter_HEADER */
diff --git a/include/ossim/imaging/ossimCcfTileSource.h b/include/ossim/imaging/ossimCcfTileSource.h
deleted file mode 100644
index 70e4cd0..0000000
--- a/include/ossim/imaging/ossimCcfTileSource.h
+++ /dev/null
@@ -1,232 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Contains class declaration for CcfTileSource.
-//
-// A ccf (Chip Chunk Format) is a double tiled format.  Image data is
-// arranged in chips and chunks.  Each chip is 32 x 32 pixels.  Each chunk
-// is 8 x 8 chips for a single band image.  Bands are interleaved by chip
-// so a rgb image has a red chip a green chip, then a blue chip which
-// would make the chunk 24 x 8 chips.
-//
-//*******************************************************************
-//  $Id: ossimCcfTileSource.h 16075 2009-12-10 15:46:43Z gpotts $
-
-#ifndef ossimCcfTileSource_HEADER
-#define ossimCcfTileSource_HEADER
-
-#include <fstream>
-
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimCcfHead.h>
-
-class  ossimImageData;
-
-class OSSIM_DLL ossimCcfTileSource : public ossimImageHandler
-{
-public:
-
-   ossimCcfTileSource();
-   
-   virtual ossimString getShortName()const;
-   virtual ossimString getLongName()const;
-
-   /**
-    *  @return Returns true on success, false on error.
-    *
-    *  @note This method relies on the data member ossimImageData::theImageFile
-    *  being set.  Callers should do a "setFilename" prior to calling this
-    *  method or use the ossimImageHandler::open that takes a file name and an
-    *  entry index.
-    */
-   virtual bool open();
-   
-   virtual void close();
-   
-   virtual ossimRefPtr<ossimImageData> getTile(const  ossimIrect& rect,
-                                               ossim_uint32 resLevel=0);
-
-   /**
-    * Method to get a tile.   
-    *
-    * @param result The tile to stuff.  Note The requested rectangle in full
-    * image space and bands should be set in the result tile prior to
-    * passing.  It will be an error if:
-    * result.getNumberOfBands() != this->getNumberOfOutputBands()
-    *
-    * @return true on success false on error.  If return is false, result
-    *  is undefined so caller should handle appropriately with makeBlank or
-    * whatever.
-    */
-   virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);
-   
-    /**
-     *  Returns the number of bands in the image.
-     *  Satisfies pure virtual from ImageHandler class.
-     */
-   virtual ossim_uint32 getNumberOfInputBands() const;
-   virtual ossim_uint32 getNumberOfOutputBands()const;
-
-   /**
-     *  Returns the number of lines in the image.
-     *  Satisfies pure virtual from ImageHandler class.
-     */
-   virtual ossim_uint32 getNumberOfLines(
-      ossim_uint32 reduced_res_level = 0) const;
-   
-   /**
-    *  Returns the number of samples in the image.  
-    *  Satisfies pure virtual from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfSamples(
-      ossim_uint32 reduced_res_level = 0) const;
-
-   /**
-    *  Returns the number of reduced resolution data sets (rrds).
-    *  Note:  The full res image is counted as a data set so an image with no
-    *         reduced resolution data set will have a count of one.
-    */
-   virtual ossim_uint32 getNumberOfDecimationLevels() const;
-   
-   /**
-    *  Returns the zero based image rectangle for the reduced resolution data
-    *  set (rrds) passed in.  Note that rrds 0 is the highest resolution rrds.
-    */
-   virtual ossimIrect getImageRectangle(
-      ossim_uint32 reduced_res_level = 0) const;
-   
-   /**
-    *  Set the output band list.  Use to set the number and order of output
-    *  bands.  Will set an error if out of range.
-    */
-   bool setOutputBandList(const vector<ossim_uint32>& outputBandList);
-
-   /**
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-   
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-      
-   /**
-    * Returns the output pixel type of the tile source.
-    */
-   virtual ossimScalarType getOutputScalarType() const;
-
-   /**
-    * Returns the width of the output tile.
-    */
-   virtual ossim_uint32 getTileWidth() const;
-   
-   /**
-    * Returns the height of the output tile.
-    */
-   virtual ossim_uint32 getTileHeight() const;
-
-   /**
-    * Returns the tile width of the image or 0 if the image is not tiled.
-    * Note: this is not the same as the ossimImageSource::getTileWidth which
-    * returns the output tile width which can be different than the internal
-    * image tile width on disk.
-    */
-   virtual ossim_uint32 getImageTileWidth() const;
-
-   /**
-    * Returns the tile width of the image or 0 if the image is not tiled.
-    * Note: this is not the same as the ossimImageSource::getTileWidth which
-    * returns the output tile width which can be different than the internal
-    * image tile width on disk.
-    */
-   virtual ossim_uint32 getImageTileHeight() const;
-
-   virtual bool isOpen()const;
-
-   /**
-    * @brief Gets a property for matching name.
-    * @param name The name of the property to get.
-    * @return Returns property matching "name".
-    */
-   virtual ossimRefPtr<ossimProperty> getProperty(
-      const ossimString& name)const;
-   
-   /**
-    * @brief Gets a list of property names available.
-    * @param propertyNames The list to push back names to.
-    */
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-	
-   
-protected:
-   virtual ~ossimCcfTileSource();
-
-   void initVerticesFromHeader();
-   
-   // Disallow these...
-   ossimCcfTileSource(const ossimCcfTileSource& source);
-   ossimCcfTileSource& operator=(const ossimCcfTileSource& source); 
-   
-   /**
-    *  Returns true on success, false on error.
-    */
-   bool fillBuffer(const  ossimIrect& tile_rect,
-                   const  ossimIrect& clip_rect,
-                   const  ossimIrect& image_rect,
-                   ossim_uint32 reduced_res_level,
-                   ossimImageData* tile);
-
-   /**
-    *  Returns true on success, false on error.
-    */
-   bool fillUshortBuffer(const  ossimIrect& tile_rect,
-                         const  ossimIrect& clip_rect,
-                         const  ossimIrect& image_rect,
-                         ossim_uint32 reduced_res_level,
-                         ossimImageData* tile);
-   
-   /**
-    *  Returns true on success, false on error.
-    */
-   bool fillUcharBuffer(const  ossimIrect& tile_rect,
-                        const  ossimIrect& clip_rect,
-                        const  ossimIrect& image_rect,
-                        ossim_uint32 reduced_res_level,
-                        ossimImageData* tile);
-
-   /**
-    *  Adjust point to even 256 boundary.  Assumes 0,0 origin.
-    */
-   void adjustToStartOfChunk(ossimIpt& pt) const;
-
-   /**
-    *  Adjust point to even 32 boundary.  Assumes 0,0 origin.
-    */
-   void adjustToStartOfChip(ossimIpt& pt) const;
-
-   bool isEcgGeom(const ossimFilename& filename)const;
-
-   ossimCcfHead                theCcfHead;
-   ossimRefPtr<ossimImageData> theTile;
-   ossim_uint8*                theChipBuffer;
-   ifstream*                   theFileStr;
-   vector<ossim_uint32>        theOutputBandList;
-   ossim_int32                 theByteOrder;
-
-
-TYPE_DATA
-};
-   
-#endif
diff --git a/include/ossim/imaging/ossimClosestToCenterCombiner.h b/include/ossim/imaging/ossimClosestToCenterCombiner.h
deleted file mode 100644
index 03e0b68..0000000
--- a/include/ossim/imaging/ossimClosestToCenterCombiner.h
+++ /dev/null
@@ -1,60 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2005 Garrett Potts. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimClosestToCenterCombiner.h 22162 2013-02-26 01:37:48Z gpotts $
-#ifndef ossimClosestToCenterCombiner_HEADER
-#define ossimClosestToCenterCombiner_HEADER
-#include <vector>
-#include <ossim/imaging/ossimImageMosaic.h>
-/**
-  * This implements a closest to center combiner.
-  *
-  * It will first grab all images overlapping a given rectangle query.  The first non-null
-  * closest pixel to the center of the image is used.  This basically uses only pixels along
-  * the "sweet" spot of the image.  This combiner is typically used when there is overlapping
-  * sensor data.
-  * 
-  */
-class OSSIM_DLL ossimClosestToCenterCombiner : public ossimImageMosaic
-{
-public:
-   ossimClosestToCenterCombiner();
-
-   /**
-    * Executes the ossimClosestToCenterCombiner algorithm. sets the pixels to the closest
-    * Valid value.  This simulates a sweet spot cutter.
-    * 
-    * @param rect The region of interest.
-    * @param resLevel.  For this combiner this is assumed to always be 0
-    */
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
-                                               ossim_uint32 resLevel=0);
-protected:
-   class ossimClosestToCenterCombinerInfo
-   {
-   public:
-      ossimClosestToCenterCombinerInfo(ossimRefPtr<ossimImageData> tile,
-                                       ossim_int32 idx)
-         :theTile(tile),
-         theIndex(idx)
-         {
-         }
-      ossimRefPtr<ossimImageData> theTile;
-      ossim_int32                 theIndex;
-   };
-
-   
-   ossim_int32 findIdx(const std::vector<ossimClosestToCenterCombinerInfo >& normTileList,
-                       const ossimIpt& pt, ossim_uint32 offset)const;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimColorNormalizedFusion.h b/include/ossim/imaging/ossimColorNormalizedFusion.h
deleted file mode 100644
index d9f52a1..0000000
--- a/include/ossim/imaging/ossimColorNormalizedFusion.h
+++ /dev/null
@@ -1,32 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: Color normalized fusion
-//
-//*************************************************************************
-// $Id: ossimColorNormalizedFusion.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimColorNormalizedFusion_HEADER
-#define ossimColorNormalizedFusion_HEADER
-#include <ossim/imaging/ossimFusionCombiner.h>
-
-class ossimColorNormalizedFusion : public ossimFusionCombiner
-{
-public:
-
-   ossimColorNormalizedFusion();
-   ossimColorNormalizedFusion(ossimObject* owner);
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
-                                               ossim_uint32 resLevel=0);
-
-protected:
-   virtual ~ossimColorNormalizedFusion();
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimConvolutionFilter1D.h b/include/ossim/imaging/ossimConvolutionFilter1D.h
deleted file mode 100644
index 3a7f741..0000000
--- a/include/ossim/imaging/ossimConvolutionFilter1D.h
+++ /dev/null
@@ -1,124 +0,0 @@
-//*******************************************************************
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// class ossimImageGaussianFilter : tile source
-// class ossimConvolutionFilter1D
-// one dimensional convolution
-//
-// efficient for gradients & separable convolution kernels (like gaussian)
-//*******************************************************************
-// $Id: ossimConvolutionFilter1D.h 15766 2009-10-20 12:37:09Z gpotts $
-
-#ifndef ossimConvolutionFilter1D_HEADER
-#define ossimConvolutionFilter1D_HEADER
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-/**
- * class for vertical or horizontal convolution
- *
- * PROPERTIES:
- *  -KernelSize   : length of linear kernel (>=1)
-             NOTE - you need to exit the property editor for the kernel to be resized
- *  -Kernel       : Kernel vector (line matrix)
- *  -Horizontal   : boolean, otherwise vertical kernel
- *  -CenterOffset : center pixel position in the kernel, starting at 0
- *  -StrictNoData : controls NODATA use
- *      true  : any NODATA pixel in the convolution will make the center pixel NODATA
- *      false : if center is NODATA, then output center is NODATA,
- *              other NODATA pixels are processed as if they were zero in the convolution
- */
-class OSSIM_DLL ossimConvolutionFilter1D : public ossimImageSourceFilter
-{
-public:
-  /**
-   * own class methods
-   */
-   ossimConvolutionFilter1D(ossimObject* owner=NULL);
-
-   virtual inline const std::vector<ossim_float64>& getKernel()const { return theKernel; }
-   virtual void setKernel(const std::vector<ossim_float64>& aKernel);
-
-   virtual inline bool isHorizontal()const         { return theIsHz; }
-   virtual inline void setIsHorizontal(bool aIsHz) { theIsHz = aIsHz; }
-
-   virtual inline ossim_int32 getCenterOffset()const              { return theCenterOffset; }
-   virtual inline void setCenterOffset(ossim_int32 aCenterOffset) { theCenterOffset = aCenterOffset; }
-   
-   virtual inline bool isStrictNoData()const         { return theStrictNoData; }
-   virtual inline void setStrictNoData(bool aStrict) { theStrictNoData = aStrict; }
-
-  /** 
-   * inherited methods
-   */
-   virtual ossimString getShortName()const{return ossimString("1D Convolution");}
-   virtual ossimString getLongName()const{return ossimString("Convolves the input image with a one dimensional convolution kernel");}
-
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,ossim_uint32 resLevel=0);
-
-   virtual void initialize();
-
-   virtual double getNullPixelValue(ossim_uint32 band=0) const;
-   virtual double getMinPixelValue(ossim_uint32 band=0)  const;
-   virtual double getMaxPixelValue(ossim_uint32 band=0)  const;
-
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-   virtual bool loadState(const ossimKeywordlist& kwl,const char* prefix = 0);
-   virtual bool saveState(ossimKeywordlist& kwl,const char* prefix = 0)const;
-   
-protected:
-   virtual ~ossimConvolutionFilter1D();
-
-   /**
-    * Allocates theTile.
-    */
-   void allocate();
-
-   /**
-    * Clears data members theNullPixValue, theMinPixValue, and
-    * theMaxPixValue.
-    */
-   void clearNullMinMax();
-
-   /**
-    * Computes null, min, and max considering input connection and theKernel.
-    */
-   void computeNullMinMax();
-      
-   /*!
-    * Convolve full means that the input data is full and has
-    * no null data.  We don't have to compare for nulls here
-    */
-   template<class T>
-   void convolveFull(T,
-                     ossimRefPtr<ossimImageData> inputData,
-                     ossimRefPtr<ossimImageData> outputData);
-   
-   /*!
-    * Convolve partial means that the input data is has some
-    * null data.  We will have to compare nulls
-    */
-   template<class T>
-   void convolvePartial(T,
-                        ossimRefPtr<ossimImageData> inputData,
-                        ossimRefPtr<ossimImageData> outputData);
-
-   //! offset of center point in the Kernel
-   ossim_int32                theCenterOffset;
-   ossimRefPtr<ossimImageData> theTile;
-   std::vector<ossim_float64>  theKernel;
-   bool                        theIsHz; //! isHorizontal convolution?
-   bool                        theStrictNoData; //! strictly no NODATA values used
-
-   std::vector<double> theNullPixValue;
-   std::vector<double> theMinPixValue;
-   std::vector<double> theMaxPixValue;
-
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimConvolutionFilter1D_HEADER */
diff --git a/include/ossim/imaging/ossimConvolutionSource.h b/include/ossim/imaging/ossimConvolutionSource.h
deleted file mode 100644
index 597389a..0000000
--- a/include/ossim/imaging/ossimConvolutionSource.h
+++ /dev/null
@@ -1,72 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimConvolutionSource.h 22233 2013-04-15 15:12:54Z gpotts $
-#ifndef ossimConvolutionSource_HEADER
-#define ossimConvolutionSource_HEADER
-#include <vector>
-#include <iostream>
-#include <ossim/matrix/newmat.h>
-using namespace std;
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-class ossimTilePatch;
-class ossimDiscreteConvolutionKernel;
-
-class OSSIM_DLL ossimConvolutionSource : public ossimImageSourceFilter
-{
-public:
-   ossimConvolutionSource();
-   ossimConvolutionSource(ossimImageSource* inputSource,
-                          const NEWMAT::Matrix& convolutionMatix);
-   ossimConvolutionSource(ossimImageSource* inputSource,
-                          const vector<NEWMAT::Matrix>& convolutionList);
-   
-   virtual void setConvolution(const double* kernel, int nrows, int ncols, bool doWeightedAverage=false);
-   virtual void setConvolution(const NEWMAT::Matrix& convolutionMatrix, bool doWeightedAverage=false);
-   virtual void setConvolutionList(const vector<NEWMAT::Matrix>& convolutionList, bool doWeightedAverage=false);
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=NULL)const;
-   
-   /*!
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=NULL);
-
-   ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect, ossim_uint32 resLevel=0);
-   
-   virtual void initialize();
-   
-protected:
-   virtual ~ossimConvolutionSource();
-
-   void allocate();
-   
-   ossimRefPtr<ossimImageData> theTile;
-   ossim_int32                 theMaxKernelWidth;
-   ossim_int32                 theMaxKernelHeight;
-   
-   std::vector<ossimDiscreteConvolutionKernel* > theConvolutionKernelList;
-   virtual void setKernelInformation();
-   virtual void deleteConvolutionList();
-
-   template<class T>
-   void convolve(T dummyVariable,
-                 ossimRefPtr<ossimImageData> inputTile,
-                 ossimDiscreteConvolutionKernel* kernel);
-   
-
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimConvolutionSource_HEADER */
diff --git a/include/ossim/imaging/ossimDespeckleFilter.h b/include/ossim/imaging/ossimDespeckleFilter.h
deleted file mode 100644
index 0385850..0000000
--- a/include/ossim/imaging/ossimDespeckleFilter.h
+++ /dev/null
@@ -1,48 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Oscar Kramer
-//
-//*******************************************************************
-//  $Id: ossimDespeckleFilter.h 2644 2011-05-26 15:20:11Z oscar.kramer $
-#ifndef ossimDespeckleFilter_HEADER
-#define ossimDespeckleFilter_HEADER
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-class ossimDespeckleFilter : public ossimImageSourceFilter
-{
-public:
-   ossimDespeckleFilter();
-   ossimDespeckleFilter(ossimImageSource* inputSource, ossim_uint32 filter_radius=1);
-   
-   virtual void setRadius(ossim_uint32 radius) { theFilterRadius = (ossim_int32) radius; }
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=NULL)const;
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=NULL);
-
-   ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect, ossim_uint32 resLevel=0);
-   
-   virtual void initialize();
-   
-   /* ------------------- PROPERTY INTERFACE -------------------- */
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   /* ------------------ PROPERTY INTERFACE END ------------------- */
-
-protected:
-   virtual ~ossimDespeckleFilter();
-   template<class T> void despeckle(T dummyVariable, ossimRefPtr<ossimImageData> inputTile);
-
-   void allocate();
-   
-   ossimRefPtr<ossimImageData> theTile;
-   ossim_int32                theFilterRadius;
-   
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimDespeckleFilter_HEADER */
diff --git a/include/ossim/imaging/ossimDoqqTileSource.h b/include/ossim/imaging/ossimDoqqTileSource.h
deleted file mode 100644
index 568fdb2..0000000
--- a/include/ossim/imaging/ossimDoqqTileSource.h
+++ /dev/null
@@ -1,58 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimDoqqTileSource.h 17932 2010-08-19 20:34:35Z dburken $
-#ifndef ossimDoqqTileSource_HEADER
-#define ossimDoqqTileSource_HEADER
-#include <ossim/imaging/ossimGeneralRasterTileSource.h>
-#include <ossim/support_data/ossimDoqq.h>
-
-class OSSIM_DLL ossimDoqqTileSource: public ossimGeneralRasterTileSource
-{
-public:
-   ossimDoqqTileSource();
-   
-   ossimString getShortName()const;
-   ossimString getLongName()const;
-   
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix = NULL);
-   
-   //! Returns the image geometry object associated with this tile source or NULL if non defined.
-   //! The geometry contains full-to-local image transform as well as projection (image-to-world)
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-
-   bool open(const ossimFilename& filename);
-   bool open(const ossimGeneralRasterInfo& info);
-
-   ossimString acqdate() const;
-	
-   /**
-    * @brief Gets a property for matching name.
-    * @param name The name of the property to get.
-    * @return Returns property matching "name".
-    */
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   
-   /**
-    * @brief Gets a list of property names available.
-    * @param propertyNames The list to push back names to.
-    */
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-	
-protected:
-   virtual ~ossimDoqqTileSource();
-  ossimRefPtr<ossimDoqq>   theHeaderInformation;
-  ossimString  theAcqDate;
-   
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimDtedTileSource.h b/include/ossim/imaging/ossimDtedTileSource.h
deleted file mode 100644
index 62f0ec8..0000000
--- a/include/ossim/imaging/ossimDtedTileSource.h
+++ /dev/null
@@ -1,259 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: David Burken
-//
-// Description:
-//
-// Contains class declaration of ossimDtedTileSource.  The ossimDtedTileSource
-// class is derived from ossimImageHandler and is intended to be an image
-// handler for DTED files.
-//
-//********************************************************************
-// $Id: ossimDtedTileSource.h 17932 2010-08-19 20:34:35Z dburken $
-
-#ifndef ossimDtedTileSource_HEADER
-#define ossimDtedTileSource_HEADER
-
-#include <fstream>
-
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/support_data/ossimDtedVol.h>
-#include <ossim/support_data/ossimDtedHdr.h>
-#include <ossim/support_data/ossimDtedUhl.h>
-#include <ossim/support_data/ossimDtedDsi.h>
-#include <ossim/support_data/ossimDtedAcc.h>
-
-class ossimImageData;
-
-class OSSIM_DLL ossimDtedTileSource : public ossimImageHandler
-{
-public:
-      
-   ossimDtedTileSource();
-
-   enum
-   {
-      DATA_RECORD_OFFSET_TO_POST = 8,  // bytes
-      DATA_RECORD_CHECKSUM_SIZE  = 4,  // bytes
-      POST_SIZE                  = 2,  // bytes
-      NULL_PIXEL                 = -32767
-   };
-   
-   virtual ossimString getShortName()const;
-   virtual ossimString getLongName()const;
-
-   /**
-    *  Returns true if "theImageFile" can be opened and is a valid adrg file.
-    */
-   virtual bool open();
-   virtual void close();
-
-   virtual ossimRefPtr<ossimImageData> getTile(const  ossimIrect& tile_rect,
-                                               ossim_uint32 resLevel=0);
-   
-  /**
-   * Method to get a tile.   
-   *
-   * @param result The tile to stuff.  Note The requested rectangle in full
-   * image space and bands should be set in the result tile prior to
-   * passing.  It will be an error if:
-   * result.getNumberOfBands() != this->getNumberOfOutputBands()
-   *
-   * @return true on success false on error.  If return is false, result
-   *  is undefined so caller should handle appropriately with makeBlank or
-   * whatever.
-   */
-  virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);
-  
-   /**
-    *  Returns the number of bands in the image.
-    *  Satisfies pure virtual requirement from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfInputBands() const;
-   
-   virtual ossim_uint32 getNumberOfOutputBands()const;
-   
-   /**
-    *  Returns the number of lines in the image.
-    *  Satisfies pure virtual requirement from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfLines(
-      ossim_uint32 reduced_res_level = 0) const;
-   
-   /**
-    *  Returns the number of samples in the image.  
-    *  Satisfies pure virtual requirement from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfSamples(
-      ossim_uint32 reduced_res_level = 0) const;
-
-   virtual double getNullPixelValue(ossim_uint32 band=0)const;
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-
-   /**
-    * Returns the zero based image rectangle for the reduced resolution data
-    * set (rrds) passed in.  Note that rrds 0 is the highest resolution rrds.
-    */
-   virtual ossimIrect getImageRectangle(
-      ossim_uint32 reduced_res_level = 0) const;
-   
-   /**
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-   
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-   //! Returns the image geometry object associated with this tile source or NULL if not defined.
-   //! The geometry contains full-to-local image transform as well as projection (image-to-world)
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-   
-   /**
-    * Returns the output pixel type of the tile source.
-    */
-   virtual ossimScalarType getOutputScalarType() const;
-
-   /**
-    * Returns the width of the output tile.
-    */
-   virtual ossim_uint32 getTileWidth() const;
-
-   /**
-    * Returns the height of the output tile.
-    */
-   virtual ossim_uint32 getTileHeight() const;
-
-   /**
-    * Returns the tile width of the image or 0 if the image is not tiled.
-    * Note: this is not the same as the ossimImageSource::getTileWidth which
-    * returns the output tile width which can be different than the internal
-    * image tile width on disk.
-    */
-   virtual ossim_uint32 getImageTileWidth() const;
-
-   /**
-    * Returns the tile width of the image or 0 if the image is not tiled.
-    * Note: this is not the same as the ossimImageSource::getTileWidth which
-    * returns the output tile width which can be different than the internal
-    * image tile width on disk.
-    */
-   virtual ossim_uint32 getImageTileHeight() const;
-
-   virtual bool isOpen()const;
-
-   /**
-    * Initializes spacing to the post spacing of the cell.
-    *
-    * @param postSpacing ossimDpt to initialize with spacing where
-    * postspacing.x = longitude interval and postspacing.y = latitude interval.
-    */
-   void getPostSpacing(ossimDpt& postSpacing) const;
-
-   /**
-    * @brief Gets a property for name.
-    * @param name Property name to get.
-    * @return ossimRefPtr<ossimProperty> Note that this can be empty if
-    * property for name was not found.
-    */
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   /**
-    * @brief Adds this class's properties to list.
-    * @param propertyNames list to append to.
-    */
-   virtual void getPropertyNames(
-      std::vector<ossimString>& propertyNames)const;
-
-   /**
-    * @brief Sets the min/max.
-    *
-    * looks for an omd or statistics file for min/max.  If not found
-    * calls gatherStatistics method.  Overrides ossimImageHandler::loadMetaData
-    * called by completeOpen.
-    */
-   virtual void loadMetaData();  
-   
-protected:
-   virtual ~ossimDtedTileSource();
-
-   // Disallow operator= and copy constrution...
-   const ossimDtedTileSource& operator=(const  ossimDtedTileSource& rhs);
-   ossimDtedTileSource(const ossimDtedTileSource&);
-
-   /**
-    * Allocated the tiles.
-    */
-   void allocate();
-
-   /**
-    *  Returns true on success, false on error.
-    */
-   bool fillBuffer(const ossimIrect& tile_rect,
-                   const ossimIrect& clip_rect,
-                   ossimImageData* tile);
-
-   
-   /**
-    * @brief Scans for min and max.
-    * @param writeStatsFile If true and statistics file does not exists it
-    * will write one; else, no file will be written.
-    */
-   void gatherStatistics(bool writeStatsFile);
-   
-   ossim_sint16 convertSignedMagnitude(ossim_uint16& s) const;
-   
-   ossimRefPtr<ossimImageData> theTile;
-   mutable std::ifstream      theFileStr;
-   ossim_uint32               theTileWidth;
-   ossim_uint32               theTileHeight;   
-   ossim_uint32               theNumberOfLines;
-   ossim_uint32               theNumberOfSamps;
-   ossim_uint32               theOffsetToFirstDataRecord;
-   ossim_uint32               theDataRecordSize;
-   ossim_sint16               theMinHeight;
-   ossim_sint16               theMaxHeight;
-   ossimDpt                   thePostSpacing;
-   
-   ossimDtedVol m_vol;
-   ossimDtedHdr m_hdr;
-   ossimDtedUhl m_uhl;
-   ossimDtedDsi m_dsi;
-   ossimDtedAcc m_acc;
-   /**
-    *  DTED data is always stored as BIG_ENDIAN.  This flag indicates that
-    *  byte swapping is needed (LITTLE_ENDIAN machine).
-    */
-   bool  theSwapBytesFlag;    
-
-TYPE_DATA
-};
-
-inline ossim_sint16 ossimDtedTileSource::convertSignedMagnitude(ossim_uint16& s) const
-{
-   // DATA_VALUE_MASK 0x7fff = 0111 1111 1111 1111
-   // DATA_SIGN_MASK  0x8000 = 1000 0000 0000 0000
-   
-   // First check to see if the bytes need swapped.
-   s = (theSwapBytesFlag ? ( ((s&0x00ff) << 8) | ((s&0xff00) >> 8) ) : s);
-
-   // If the sign bit is set, mask it out then multiply by negative one.
-   if (s & 0x8000)
-   {
-      return (static_cast<ossim_sint16>(s & 0x7fff) * -1);
-   }
-   
-   return static_cast<ossim_sint16>(s);
-}
-
-#endif
diff --git a/include/ossim/imaging/ossimERSTileSource.h b/include/ossim/imaging/ossimERSTileSource.h
deleted file mode 100644
index c63ec77..0000000
--- a/include/ossim/imaging/ossimERSTileSource.h
+++ /dev/null
@@ -1,56 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Chong-Ket Chuah
-//
-// Description:
-//
-// Contains class definition for the class "ossimERSTileSource".
-//
-//*******************************************************************
-//  $Id: ossimERSTileSource.h 17932 2010-08-19 20:34:35Z dburken $
-
-#ifndef ossimERSTileSource_HEADER
-#define ossimERSTileSource_HEADER
-
-#include <ossim/imaging/ossimGeneralRasterTileSource.h>
-#include <ossim/support_data/ossimERS.h>
-
-
-class OSSIM_DLL ossimERSTileSource : public ossimGeneralRasterTileSource
-{
-public:
-   ossimERSTileSource();
-
-   ossimERSTileSource(const ossimKeywordlist& kwl, const char* prefix=0);
-   
-
-   virtual ossimString getShortName() const;
-   virtual ossimString getLongName() const;
-   virtual ossimString className() const;
-
-   virtual bool open(const ossimFilename& filename);
-  
-   //! Returns the image geometry object associated with this tile source or NULL if not defined.
-   //! The geometry contains full-to-local image transform as well as projection (image-to-world)
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix = NULL);
-protected:
-   virtual ~ossimERSTileSource();
-
-private:
-
-   void openHeader(const ossimFilename& file);
-   
-   ossimERS* theHdr;
-
-   TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimEdgeFilter.h b/include/ossim/imaging/ossimEdgeFilter.h
deleted file mode 100644
index 1e33e49..0000000
--- a/include/ossim/imaging/ossimEdgeFilter.h
+++ /dev/null
@@ -1,83 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimEdgeFilter.h 9094 2006-06-13 19:12:40Z dburken $
-#ifndef ossimEdgeFilter_HEADER
-#define ossimEdgeFilter_HEADER
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-/**
- * class ossimEdgeFilter
- *
- * This has default implementation for the certain filter types.  For the
- * different filter type please see method setFilterType.
- *
- *
- */
-class ossimEdgeFilter : public ossimImageSourceFilter
-{
-public:
-   ossimEdgeFilter(ossimObject* owner=NULL);
-   ossimEdgeFilter(ossimImageSource* inputSource);
-   ossimEdgeFilter(ossimObject* owner,
-                    ossimImageSource* inputSource);
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
-                                               ossim_uint32 resLevel=0);
-   virtual void initialize();
-   virtual void getFilterTypeNames(std::vector<ossimString>& filterNames)const;
-   virtual ossimString getFilterType()const;
-   /**
-    * The filter type can be one of the following strings.  It is
-    * case insensitive for the compares.
-    *
-    *  Sobel
-    *  Laplacian
-    *  Prewitt
-    *  
-    */
-   virtual void setFilterType(const ossimString& filterType);
-
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-   virtual bool saveState(ossimKeywordlist& kwl,const char* prefix=0)const;
-   virtual bool loadState(const ossimKeywordlist& kwl,const char* prefix=0);
-   
-protected:
-   ossimRefPtr<ossimImageData> theTile;
-   ossimString                 theFilterType;
-   
-   void adjustRequestRect(ossimIrect& requestRect)const;
-   
-   template <class T>
-   void runFilter(T dummyVariable,
-                  ossimRefPtr<ossimImageData> inputData);
-   template <class T>
-   void runSobelFilter(T dummyVariable,
-                       ossimRefPtr<ossimImageData> inputData);
-   template <class T>
-   void runPrewittFilter(T dummyVariable,
-                         ossimRefPtr<ossimImageData> inputData);
-   template <class T>
-   void runLaplacianFilter(T dummyVariable,
-                           ossimRefPtr<ossimImageData> inputData);
-   template <class T>
-   void runRobertsFilter(T dummyVariable,
-                           ossimRefPtr<ossimImageData> inputData);
-   template <class T>
-   void runLocalMax8Filter(T dummyVariable,
-                          ossimRefPtr<ossimImageData> inputData);
-   
-TYPE_DATA
-};
-
-
-#endif
diff --git a/include/ossim/imaging/ossimElevImageSource.h b/include/ossim/imaging/ossimElevImageSource.h
deleted file mode 100644
index 92cdb4f..0000000
--- a/include/ossim/imaging/ossimElevImageSource.h
+++ /dev/null
@@ -1,146 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2002 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-// 
-// Description:  Class provides an elevation image source from the elevation
-// manager.
-//
-//********************************************************************
-// $Id: ossimElevImageSource.h 17108 2010-04-15 21:08:06Z dburken $
-
-#ifndef ossimElevImageSource_HEADER
-#define ossimElevImageSource_HEADER
-
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimGrect.h>
-
-class ossimElevSource;
-
-class ossimElevImageSource : public ossimImageSource
-{
-public:
-
-   ossimElevImageSource();
-   ossimElevImageSource(ossimObject* owner);
-   ossimElevImageSource(ossimObject* owner,
-                        const ossimGpt& tie,
-                        double latSpacing,  // decimal degrees
-                        double lonSpacing ,
-                        ossim_uint32 numberLines,
-                        ossim_uint32 numberSamples);
-   ossimElevImageSource(ossimObject* owner,
-                        const ossimKeywordlist& kwl,
-                        const char* prefix=0);
-   
-
-   /*!
-    *  Returns a pointer to a tile given an origin representing the upper left
-    *  corner of the tile to grab from the image.
-    *  Satisfies pure virtual from TileSource class.
-    */
-   virtual ossimRefPtr<ossimImageData> getTile(const  ossimIrect& rect,
-                                   ossim_uint32 resLevel=0);
-
-   /*!
-    *  Populates the keyword list with image geometry information.  This
-    *  method is used to relay projection/model information to users.
-    *  Returns true if geometry info is present, false if not.
-    */
-   virtual bool getImageGeometry(ossimKeywordlist& kwl,
-                                 const char* prefix=0);
-   
-   /*!
-    *  Returns the number of bands in the image.  Alway one for this source.
-    */
-   virtual ossim_uint32 getNumberOfOutputBands()const { return 1; }
-
-
-   /*!
-    * Returns the zero-based (relative) image rectangle for the reduced
-    * resolution data set (rrds) passed in.  Note that rrds 0 is the highest
-    * resolution rrds.
-    */
-   virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level = 0) const; 
-
-   /*!
-    * Returns the absolute bounding rectangle of the image. The upper left
-    * corner may be non-zero if this is a subimage.
-    */
-   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel = 0) const
-      {
-         return getImageRectangle(resLevel);
-      }
-   
-   /*!
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-   /*!
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   bool canConnectMyInputTo(ossim_int32 /* inputIndex */,
-                            const ossimConnectableObject* /* object */ )const
-   {      
-      return false;
-   }
-      
-   virtual void initialize();
-
-   /*!
-    *  Satisfy pure virtuals from base classes...
-    */
-   virtual void getDecimationFactor(ossim_uint32 resLevel, ossimDpt& result) const;
-   virtual void getDecimationFactors(vector<ossimDpt>& decimations) const;
-   virtual ossim_uint32 getNumberOfDecimationLevels()const;
-   virtual ossim_uint32 getNumberOfInputBands() const;
-   virtual ossimScalarType getOutputScalarType() const;
-   virtual ossim_uint32 getTileWidth() const;
-   virtual ossim_uint32 getTileHeight() const;
-   virtual void changeTileSize(const ossimIpt& size);
-
-   // access methods
-   virtual ossimGpt getTiePoint()         const { return theTiePoint; }
-   virtual ossim_float64 getLatitudeSpacing()  const { return theLatSpacing; }
-   virtual ossim_float64 getLongitudeSpacing() const { return theLonSpacing; }
-   virtual ossim_uint32  getNumberOfLines(ossim_uint32 reduced_res_level = 0) const;
-   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level = 0) const;
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-   
-   // set methods
-   virtual void setTiePoint(const ossimGpt& gpt) { theTiePoint = gpt; }
-   virtual void setLatitudeSpacing(ossim_float64 sp) { theLatSpacing = sp; }
-   virtual void setLongitudeSpacing(ossim_float64 sp) { theLonSpacing = sp; }
-   virtual void setNumberOfLines(ossim_uint32 lines) { theNumberOfLines = lines; }
-   virtual void setNumberOfSamples(ossim_uint32 samps) { theNumberOfSamps = samps;}
-   virtual void setMinPixelValue(ossim_float64 min_pix);
-   virtual void setMaxPixelValue(ossim_float64 max_pix);
-   
-protected:
-   virtual ~ossimElevImageSource();
-
-   ossimElevSource*            theElevManager;
-   ossimRefPtr<ossimImageData> theTile;
-   ossimGpt                    theTiePoint;      // upper left tie point
-   ossim_float64               theLatSpacing;    // in decimal degrees
-   ossim_float64               theLonSpacing;    // in decimal degrees
-   ossim_uint32                theNumberOfLines;
-   ossim_uint32                theNumberOfSamps;
-   
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimEnviHeaderFileWriter.h b/include/ossim/imaging/ossimEnviHeaderFileWriter.h
deleted file mode 100644
index b5c599c..0000000
--- a/include/ossim/imaging/ossimEnviHeaderFileWriter.h
+++ /dev/null
@@ -1,78 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (c) 2005, David Burken, all rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-// 
-// Class declaration for ossimEnviHeaderFileWriter.  Meta data class for
-// writing an ENVI (The Environment for Visualizing Images) header file.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimEnviHeaderFileWriter.h 15766 2009-10-20 12:37:09Z gpotts $
-
-#ifndef ossimEnviHeaderFileWriter_H
-#define ossimEnviHeaderFileWriter_H
-
-#include <fstream>
-#include <ossim/imaging/ossimMetadataFileWriter.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/support_data/ossimEnviHeader.h>
-
-/**
- * Class for writing a "ENVI" style header.
- */
-class OSSIMDLLEXPORT ossimEnviHeaderFileWriter : public ossimMetadataFileWriter
-{
-public:
-
-   /** default constructor */
-   ossimEnviHeaderFileWriter();
-
-
-   /**
-    * Initializes the state of the writer.  Users should use this to set
-    * the envi header fields that are not taken from theInputConnection prior
-    * to calling execute.
-    *
-    * @return true on success, false on failure.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix = 0);
-
-   /**
-    * Satisfies pure virtual from ossimMetadataWriter base.
-    *
-    * Appends the writers image types to the "metadatatypeList".
-    * 
-    * @param metadatatypeList stl::vector<ossimString> list to append to.
-    *
-    * @note Appends to the list, does not clear it first.
-    */
-   virtual void getMetadatatypeList(
-      std::vector<ossimString>& metadatatypeList) const;
-
-   /**
-    * Satisfies pure virtual from ossimMetadataWriter base.
-    *
-    * @param imageType string representing image type.
-    *
-    * @return true if "metadataType" is supported by writer.
-    */
-   virtual bool hasMetadataType(const ossimString& metadataType)const;   
-protected:
-   /** virtual destructor */
-   virtual ~ossimEnviHeaderFileWriter();
-
-private:
-   
-   virtual bool writeFile();
-
-   ossimEnviHeader theHdr;
-   
-TYPE_DATA
-};
-#endif /* End of #ifndef ossimEnviHeaderFileWriter_H */
diff --git a/include/ossim/imaging/ossimEnviTileSource.h b/include/ossim/imaging/ossimEnviTileSource.h
deleted file mode 100644
index 472c981..0000000
--- a/include/ossim/imaging/ossimEnviTileSource.h
+++ /dev/null
@@ -1,101 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-// 
-// Image handler class for a raster files with an ENVI header file.
-//
-//----------------------------------------------------------------------------
-// $Id$
-
-#ifndef ossimEnviTileSource_HEADER
-#define ossimEnviTileSource_HEADER 1
-
-#include <ossim/imaging/ossimGeneralRasterTileSource.h>
-#include <ossim/support_data/ossimEnviHeader.h>
-
-
-class OSSIMDLLEXPORT ossimEnviTileSource : public ossimGeneralRasterTileSource
-{
-public:
-
-   /** @brief default constructor */
-   ossimEnviTileSource();
-
-   /** @return "ENVI" */
-   virtual ossimString getShortName() const;
-
-   /** @return "ENVI reader" */
-   virtual ossimString getLongName()  const;
-
-   /** @brief open method. */
-   virtual bool open();
-
-   /**
-    * @return The image geometry object associated with this tile source or
-    * NULL if not defined.  The geometry contains full-to-local image transform
-    * as well as projection (image-to-world).
-    */
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-
-   /**
-    * Method to save the state of an object to a keyword list.
-    * @return true on success, false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.
-    *
-    * @return true on success, false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix = NULL);
-
-   /**
-    * @brief Gets a property.
-    * @param The name of the property to get.
-    * @return The property if found.
-    */
-   virtual ossimRefPtr<ossimProperty> getProperty(
-      const ossimString& name)const;
-
-   /**
-    * @brief Adds property names to array.
-    * @param propertyNames Array to populate with property names.
-    */
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-protected:
-   
-   /** @brief Hidden from use destructor.  This is a ref ptr. */
-   virtual ~ossimEnviTileSource();
-
-private:
-
-   /**
-    * @brief Sets default output band list if we are a band selector and
-    * "default bands" is found in the header file.
-    */
-   void setDefaultBandList();
-
-   /**
-    * @brief Creates geometry from known support data, i.e. envi header,
-    * and so on if found.
-    */
-   ossimRefPtr<ossimImageGeometry> getInternalImageGeometry() const;
-   
-   ossimEnviHeader m_enviHdr;
-   
-TYPE_DATA
-   
-}; // End: class ossimEnviTileSource
-
-#endif /* #ifndef ossimEnviTileSource_HEADER */
diff --git a/include/ossim/imaging/ossimEquationCombiner.h b/include/ossim/imaging/ossimEquationCombiner.h
deleted file mode 100644
index 054def5..0000000
--- a/include/ossim/imaging/ossimEquationCombiner.h
+++ /dev/null
@@ -1,313 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimEquationCombiner.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimEquationCombiner_HEADER
-#define ossimEquationCombiner_HEADER
-#include <ossim/imaging/ossimImageCombiner.h>
-#include <ossim/base/ossimEquTokenizer.h>
-#include <stack>
-
-class ossimCastTileSourceFilter;
-
-/**
- * Will combine the input data based on a supplied equation.
- *
- * This combiner uses the ossimEquTokenizer to create unique id's
- * for all tokens in the formula.  The parser is based on the following
- * rules:
- *
- * <pre>
- * 
- * Prog -> Expr EOF 
- * Expr -> Term RestExpr 
- * RestExpr -> + Term RestExpr | - Term RestExpr | <null> 
- * Term -> Storable RestTerm 
- * RestTerm -> * Factor RestTerm | / Factor RestTerm | <null> 
- * Factor -> number | R | ( Expr )
- *
- *
- * We support the following tokens:
- *
- * sin(x)                 takes the sine of the input
- * sind(x)                takes the sin of the input and assumes degree input
- * cos(x)                 takes cosine of input
- * cosd(x)                takes the cosine of input and assumes input in degrees
- * sqrt(x)                takes square root of input
- * log(x)                 takes the natural log of input
- * log10(x)               takes the log base 10 of the input
- * exp(x)                 takes the e raised to the passed in argument
- * abs(x)                 takes the absolute value of the passed in value
- * min(x1, x2, ... xn)    takes the min of all values in the list
- * max(x1, x2, ... xn)    takes the max of all values in the list.
- *
- * clamp(image_data, min, max)
- *                        will clamp all data to be between the min max values.
- *                        will set anything less than min to min and anythin
- *                        larger than max to max
- *
- * band(image_data, num)  returns a single band image object
- *                        by selecting band num from input image i1.  Note
- *                        the first argument must be an image
- *                        and the second argument must be a number
- *
- * shift(index, num_x, num_y)
- *                        currently, the first argument must be an image
- *                        variable(i1, i2, ... in) and x, and y must b numbers
- *                        indicating the delta in that direction to shift the
- *                        input.
- *
- * blurr(index, rows, cols)
- *                        Will blurr the input image i with a
- *                        rows-by-cols kernel.  All values are equal
- *                        weight.  Note the fist argument must by an image
- *                        variable (ex: i1, i2,....in).
- *
- * conv(index, rows, cols, <row ordered list of values> )
- *                        this allows you to define an arbitrary matrix.  The
- *                        <row ordered list of values> is a comma separated
- *                        list of constant values.
- *
- * assign_band(image_data, num1, data2, num2)
- *                        will take band num2 from image data2 and assign it to
- *                        band num1 in data 1.
- *
- * assign_band(image_data, num1, data2)
- *                        will take band 1 from image data2 and assign it to
- *                        band num1 in data 1.
- *
- * assign_band(image_data, num1, num2)
- *                        will assin to band num1 of data 1 the value of num2
- *
- * x1 * x2                will multiply x1 and x2
- * x1 + x2                will add x1 and x2
- * x1 - x2                will subtract x1 and x2
- * x1 / x2                will divide x1 and x2
- * x1 ^ x2                will do a power, raises x1 to x2
- * x1 | x2                will do a bitwise or operation
- *                        ( will do it in unisgned char precision)
- *
- * x1 & x2                will do a bitwise and operation
- *                        ( will do it in unsigned char precision)
- *
- * ~x1                    will do the ones complement of the input
- *
- * x1 xor x2              will do an xclusive or operation
- *                        (will do it in unsigned char precision)
- *
- * - x1                   will negative of x1
- *
- * Boolean ops: 1=true, 0=false
- * x1 > x2
- * x1 >= x2
- * x1 == x2
- * x1 <= x2
- * x1 < x2
- * x1 <> x2
- *
- * Note:
- *
- * Currently an image input is reference by the variable i followed by
- * the input image index from 1.  So 1 referes to the first image
- * all result are promoted to an image object.
- *
- * Bands are accesible with in[B], B starts from 0
- *
- * Some examples:
- *
- *  (in[0] + in[1])/2
- *  Will take image 1 and add it to image 2 and average them.
- *
- *  exp(sqrt(in[0])/4)
- *  Will take the root of the image and divide by 4 and then raise e to that
- *  amount.
- *
- *  128
- *  Will return a constant value of 128 for all input bands.
- *
- * min(1,in[3],in[4], max(in[2],in[1]))
- *
- * shift(0, 1, 1) - i1
- * Will shift input 0 by 1 pixel along the diagonal  and then subtract it
- * from input 1.
- *
- * assign_band(i1, 1, blurr(i1, 5, 5), 2)
- * Will assign to the first band of i1 the 2nd band of the 5x5 blurr of i1.
- *
- * conv(0, 3, 3, -1, -2, -1, 0, 0, 0, 1, 2, 1)
- * Will convolve the first input connection with a 3x3 matrix.
- * The args are row ordered:
- *                          -1, -2, -1
- *                           0,  0,  0
- *                           1,  2,  1
- *
- * NDVI:
- * N=(in[0]-in[1])/(in[0]+in[1])
- *
- * For indexed-type values,like NDVI, (with limited values) it is better
- * to rescale between 0.0 and 1.0 and use type NormalizedFloat.
- * 
- * Rescaled NDVI between 0 and 1:
- * (N+1)/2 = in[0]/(in[0]+in[1])
- * 
- * </pre>
- */
-class OSSIMDLLEXPORT ossimEquationCombiner : public ossimImageCombiner
-{
-public:
-   ossimEquationCombiner();
-
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
-                                               ossim_uint32 resLevel=0);
-   
-   virtual void initialize();
-
-   virtual void setEquation(const ossimString& equ)
-      {
-         theEquation = equ;
-      }
-   virtual ossimString getEquation()const
-      {
-         return theEquation;
-      }
-   
-   virtual double getNullPixelValue(ossim_uint32 band=0)const;
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-   virtual ossimScalarType getOutputScalarType() const;
-
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   
-   
-   virtual void setOutputScalarType(ossimScalarType scalarType);
-   /*!
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-   /*!
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-   class ossimBinaryOp
-   {
-   public:
-      virtual ~ossimBinaryOp(){}
-      virtual double apply(double v1, double v2)const=0;
-   };
-   class ossimUnaryOp
-   {
-   public:
-      virtual ~ossimUnaryOp(){}
-      virtual double apply(double v)const=0;
-   };
-   
-protected:
-   enum ossimEquValueType
-   {
-      OSSIM_EQU_TYPE_UNKNOWN    = 0,
-      OSSIM_EQU_DOUBLE_TYPE     = 1,
-      OSSIM_EQU_IMAGE_DATA_TYPE = 2
-   };
-   
-   union ossimEquDataType
-   {
-      double           doubleValue;
-      ossimImageData* imageDataValue;
-   };
-   
-   struct ossimEquValue
-   {
-      int              type;
-      ossimEquDataType d;
-   };
-
-   virtual ~ossimEquationCombiner();
-   
-   
-   ossimScalarType             theOutputScalarType;
-   ossimString                 theEquation;
-   mutable ossimEquTokenizer  *theLexer;
-   ossimRefPtr<ossimImageData> theTile;
-   ossimRefPtr<ossimCastTileSourceFilter>  theCastFilter;
-   ossimRefPtr<ossimCastTileSourceFilter> theCastOutputFilter;
-   
-   mutable int                theCurrentId;
-   mutable std::stack<ossimEquValue> theValueStack;
-   ossim_uint32                     theCurrentResLevel;
-   virtual void assignValue();
-   virtual void clearStacks();
-   virtual void clearArgList(vector<ossimEquValue>& argList);
-
-   virtual ossimRefPtr<ossimImageData> getImageData(ossim_uint32 index);
-   virtual ossimRefPtr<ossimImageData> getNewImageData(ossim_uint32 index);
-
-   virtual void deleteArgList(vector<ossimEquValue>& args);
-   virtual bool parseArgList(vector<ossimEquValue>& args,
-                             bool popValueStack = true);
-   
-   virtual ossimRefPtr<ossimImageData> parseEquation();
-  
-   virtual bool parseAssignBand();
-   virtual bool parseExpression();
-   virtual bool parseRestOfExp();
-   virtual bool parseTerm();
-   virtual bool parseRestOfTerm();
-   virtual bool parseFactor();
-   virtual bool parseStdFuncs();
-   virtual bool parseUnaryFactor();
-
-   virtual bool applyClamp(ossimImageData* &result,
-                           const vector<ossimEquValue>& argList);
-                           
-   virtual bool applyConvolution(ossimImageData* &result,
-                                 const vector<ossimEquValue>& argList);
-   
-   virtual bool applyBlurr(ossimImageData* &result,
-                           const vector<ossimEquValue>& argList);
-   
-   virtual bool applyShift(ossimImageData* &result,
-                           const vector<ossimEquValue>& argList);
-   
-   virtual bool applyOp(const ossimBinaryOp& op,
-                        ossimEquValue& result,
-                        ossimEquValue& v1,
-                        ossimEquValue& v2);
-   
-   virtual bool applyOp(const ossimBinaryOp& op,
-                        ossimImageData* v1,
-                        double          v2);
-
-   virtual bool applyOp(const ossimBinaryOp& op,
-                        double          v1,
-                        ossimImageData* v2);
-
-   virtual bool applyOp(const ossimBinaryOp& op,
-                        ossimImageData* v1,
-                        ossimImageData* v2);      
-
-   
-   virtual bool applyOp(const ossimUnaryOp& op,
-                        ossimEquValue& result,
-                        ossimEquValue& v1);
-   
-   virtual bool applyOp(const ossimUnaryOp& op,
-                        ossimImageData* v);
-   
-TYPE_DATA
-};
-#endif
diff --git a/include/ossim/imaging/ossimFeatherMosaic.h b/include/ossim/imaging/ossimFeatherMosaic.h
deleted file mode 100644
index b0fff9a..0000000
--- a/include/ossim/imaging/ossimFeatherMosaic.h
+++ /dev/null
@@ -1,87 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimFeatherMosaic.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimFeatherMosaic_HEADER
-#define ossimFeatherMosaic_HEADER
-#include <vector>
-#include <iterator>
-
-#include <ossim/imaging/ossimImageMosaic.h>
-#include <ossim/base/ossimDpt.h>
-
-
-/**
- * Performs a spatial blend accross overlapping regions
- */
-class OSSIMDLLEXPORT ossimFeatherMosaic : public ossimImageMosaic
-{
-public:
-   ossimFeatherMosaic();
-   ossimFeatherMosaic(ossimConnectableObject::ConnectableObjectList& inputSources);
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
-                                   ossim_uint32 resLevel=0);
-   virtual void initialize();
-       
-protected:
-   virtual ~ossimFeatherMosaic();
-   /**
-    * This is only visible by this class and will remain here
-    * unless we want to move it later.
-    */
-   class ossimFeatherInputInformation
-   {
-      
-   public:
-      ossimFeatherInputInformation(const vector<ossimIpt>& validVertices=vector<ossimIpt>());
-
-      void setVertexList(const vector<ossimIpt>& validVertices);
-      
-      ossimDpt        theCenter;
-      ossimDpt        theAxis1;
-      ossimDpt        theAxis2;
-      double          theAxis1Length;
-      double          theAxis2Length;
-      std::vector<ossimIpt> theValidVertices;
-      
-   };
-
-   friend ostream& operator<<(ostream& out,
-                              const ossimFeatherInputInformation& data);
-   
-
-   /**
-    * will hold an array of input information
-    *
-    */
-   ossimFeatherInputInformation* theInputFeatherInformation;
-   ossimRefPtr<ossimImageData> theAlphaSum;
-   ossimRefPtr<ossimImageData> theResult;
-   
-   /**
-    * Will hold the count for the feather information list.
-    */
-   long                          theFeatherInfoSize;
-
-   /**
-    * The dummy variable is used for the template type.  See the getTile
-    * method for the call.
-    */
-   template <class T>
-   ossimRefPtr<ossimImageData> combine(T dummyVariableNotUsed,
-                                       const ossimIrect& tileRect,
-                                       ossim_uint32 resLevel);
-   
-   virtual double computeWeight(long index,
-                                const ossimDpt& point)const;
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimFeatherMosaic_HEADER */
diff --git a/include/ossim/imaging/ossimFftFilter.h b/include/ossim/imaging/ossimFftFilter.h
deleted file mode 100644
index 49b6f0e..0000000
--- a/include/ossim/imaging/ossimFftFilter.h
+++ /dev/null
@@ -1,86 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimFftFilter.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimFftFilter_HEADER
-#define ossimFftFilter_HEADER
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-class ossimScalarRemapper;
-
-class ossimFftFilter : public ossimImageSourceFilter
-{
-public:
-   enum ossimFftFilterDirectionType
-      {
-         ossimFftFilterDirectionType_FORWARD = 0,
-         ossimFftFilterDirectionType_INVERSE
-      };
-   ossimFftFilter(ossimObject* owner=NULL);
-   ossimFftFilter(ossimImageSource* inputSource);
-   ossimFftFilter(ossimObject* owner,
-                  ossimImageSource* inputSource);
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
-                                   ossim_uint32 resLevel=0);
-   virtual void initialize();
-   virtual ossim_uint32 getNumberOfOutputBands() const;
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-  /*!
-   * Returns the max pixel of the band.
-   */
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-  /*!
-   * Each band has a null pixel associated with it.  The null pixel 
-   * represents an invalid value.
-   */ 
-   virtual double getNullPixelValue(ossim_uint32 band=0)const;
-   
-   virtual ossimScalarType getOutputScalarType() const;
-   
-   void setForward();
-   void setInverse();
-   ossimString getDirectionTypeAsString()const;
-   void setDirectionType(const ossimString& directionType);
-   void setDirectionType(ossimFftFilterDirectionType directionType);
-      
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix = 0);
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix = 0)const;
-protected:
-   virtual ~ossimFftFilter();
-   ossimRefPtr<ossimImageData> theTile;
-   ossimFftFilterDirectionType theDirectionType;
-   ossimRefPtr<ossimScalarRemapper>        theScalarRemapper;
-   template <class T>
-   void runFft(T dummy,
-               ossimRefPtr<ossimImageData>& input,
-               ossimRefPtr<ossimImageData>& output);
-
-   template <class T>
-   void fillMatrixForward(T *realPart,
-                          T nullPix,
-                          NEWMAT::Matrix& real,
-                          NEWMAT::Matrix& img)const;
-   template <class T>
-   void fillMatrixInverse(T *realPart,
-                          T *imgPart,
-                          NEWMAT::Matrix& real,
-                          NEWMAT::Matrix& img)const;
-
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimFgdcFileWriter.h b/include/ossim/imaging/ossimFgdcFileWriter.h
deleted file mode 100644
index 5df2704..0000000
--- a/include/ossim/imaging/ossimFgdcFileWriter.h
+++ /dev/null
@@ -1,157 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (c) 2005, David Burken, all rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:  Class to write out meta data in a Federal Geographic Data
-// Committe (FGDC) format.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimFgdcFileWriter.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimFgdcFileWriter_HEADER
-#define ossimFgdcFileWriter_HEADER
-
-#include <ossim/imaging/ossimMetadataFileWriter.h>
-#include <ossim/base/ossimXmlNode.h>
-#include <ossim/base/ossimXmlDocument.h>
-
-/**
- * Class to write out meta data in a Federal Geographic Data
- * Committe (FGDC) format.
- */
-class OSSIMDLLEXPORT ossimFgdcFileWriter : public ossimMetadataFileWriter
-{
-public:
-   
-   /** constructor */
-   ossimFgdcFileWriter();
-
-   
-   /**
-    * Method to load the state from a keyword list.
-    *
-    * @param kwl Keyword list to load state from.
-    *
-    * @param prefix Prefix to attatch to keyword (like "object1.").
-    * default=NULL
-    *
-    * @return true if ok or false on error.
-    *
-    * Keywords picked up by this loadState:
-    * 
-    * source_image_filename: foo.ntf
-    * tab_string:            "\t"
-    * fgdc_template_doc:     fgdc_template.xml
-    * 
-    */
-   virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0);
-
-   /**
-    * Satisfies pure virtual from ossimMetadataWriter base.
-    *
-    * Appends the writers image types to the "metadatatypeList".
-    * 
-    * @param metadatatypeList stl::vector<ossimString> list to append to.
-    *
-    * @note Appends to the list, does not clear it first.
-    */
-   virtual void getMetadatatypeList(
-      std::vector<ossimString>& metadatatypeList) const;
-
-   /**
-    * Satisfies pure virtual from ossimMetadataWriter base.
-    *
-    * @param imageType string representing image type.
-    *
-    * @return true if "metadataType" is supported by writer.
-    */
-   virtual bool hasMetadataType(const ossimString& metadataType)const;
-
-   
-   /** @return Returns the current indentation level. */
-   ossim_uint32 getIndentionLevel() const;
-
-   /**
-    * Sets the current indentation level.
-    *
-    * @param level Indentation level.  "0" equals no indentation.
-    */
-   void setIndentionLevel(ossim_uint32 level);
-
-   /**
-    * @return The current tab string e.g.: "\t".
-    */
-   ossimString getTabString() const;
-
-   /**
-    * Sets the tab string.  Usually "\t" or spaces "  ".
-    *
-    * @param tabString  String to use for indentation.
-    */
-   void setTabString(const ossimString& tabString);
-
-   /**
-    * @param title Tile of data usually the image file name.
-    */
-   void setTitle(const ossimString& pubDate);
-
-   void setTemplate(const ossimFilename& xmlTemplateFile);
-
-   ossimString find(const ossimString& xpath) const;
-
-   bool writeTemplate(const ossimFilename& file) const;
-
-protected:
-   /** destructor */
-   virtual ~ossimFgdcFileWriter();
-
-   /**
-    * Writes file to disk.
-    *
-    * @return true on success, false on failure.
-    */
-   virtual bool writeFile();
-
-private:
-
-   /**
-    * Writes openning tag adding any indentation and brackets.  Increments
-    * indentation level.
-    *
-    * @param os otream to write to.
-    *
-    * @param tag String representing tag with no brackets, i.e. "metadata".
-    *
-    * @param newLine If true a new line "\n" is added.
-    */
-   void openTag(std::ostream& os,
-                const ossimString& tag,
-                bool newLine) const;
-
-   /**
-    * Closes tag decrementing indentation.
-    * e.g.: <metadata>
-    *
-    * @param os otream to write to.
-    *
-    * @param tag String representing tag with no brackets.
-    *
-    * @param decrementLevel If true indentation level is decremented.
-    */
-   void closeTag(std::ostream& os,
-                 const ossimString& tag,
-                 bool decrementLevel) const;
-   
-   mutable ossim_uint32 theIndentionLevel;
-   ossimString          theTabString;
-   ossimXmlDocument     theTemplate;
-   ossimFilename        theSourceImageFilename;
-
-TYPE_DATA
-};
-
-#endif /* End of "#ifndef ossimFgdcFileWriter_HEADER" */
diff --git a/include/ossim/imaging/ossimFilter.h b/include/ossim/imaging/ossimFilter.h
deleted file mode 100644
index 29cb23c..0000000
--- a/include/ossim/imaging/ossimFilter.h
+++ /dev/null
@@ -1,486 +0,0 @@
-#ifndef ossimFilter_HEADER
-#define ossimFilter_HEADER
-#include <math.h>
-#include <ossim/matrix/newmat.h>
-#include <ossim/base/ossimRtti.h>
-
-
-class ossimFilter
-{
-public:
-   ossimFilter()
-      {}
-   virtual ~ossimFilter() {}
-   
-   virtual double filter (double x, double support)const = 0;
-   /*!
-    * Will call the filter method to create a
-    * convolution matrix.  This matrix will not
-    * have normalized weights.
-    *
-    * Will generate a matrix by creating an outer
-    * product of the 1-D filter array.  This matrix
-    * will be square width-by-width.
-    *
-    * note:  the matrix is a new matrix and needs to
-    *        be destroyed by the caller
-    */
-   virtual NEWMAT::Matrix *newMatrix(long width=3,
-                                     double middle=0.0,
-                                     double scale=0.0)const;
-   virtual void createMatrix(NEWMAT::Matrix& m,
-                             long width=3,
-                             double middle=0.0,
-                             double scale=0.0)const;
-   
-   virtual NEWMAT::RowVector *newVector(long width,
-                                        double middle=0.0,
-                                        double scale = 1.0)const;
-   static double Sinc(double x)
-      {
-         if (x != 0.0)
-         {
-            x*=M_PI;
-            return(sin(x)/x);
-         }
-         
-         return(1.0);
-      }
-   static double Sinc(double x, double /* support */ )
-      {
-         if (x != 0.0)
-         {
-            x*=M_PI;
-            return(sin(x)/x);
-         }
-         
-         return(1.0);
-      }
-
-   virtual double getSupport()const=0;
-   
-TYPE_DATA
-};
-
-class ossimBoxFilter : public ossimFilter
-{
-public:
-   ossimBoxFilter (){}
-   virtual ~ossimBoxFilter() {}
-   
-   virtual double filter (double x, double /* support */ )const
-      {
-         if (x < -0.5)
-            return(0.0);
-         if (x < 0.5)
-            return(1.0);
-         return(0.0);
-      }
-   virtual double getSupport()const
-      {
-         return .5;
-      }
-TYPE_DATA
-};
-
-class ossimSincFilter : public ossimFilter
-{
-public:
-   ossimSincFilter(){}
-   virtual ~ossimSincFilter(){}
-   double filter(double x, double /* support */ )const
-      {
-         x*=M_PI;
-         if (x != 0.0)
-            return(sin(x)/x);
-         return(1.0);
-      }
-   virtual double getSupport()const
-      {
-         return 1.0;
-      }
-TYPE_DATA
-};
-
-class ossimBellFilter : public ossimFilter
-{
-public:
-   ossimBellFilter(){}
-   virtual ~ossimBellFilter(){}
-   virtual double getSupport()const
-      {
-         return 1.5;
-      }
-   virtual double filter(double value, double /* support */ )const
-      {
-         if(value < 0) value = -value;
-         if(value < .5) return(.75 - (value * value));
-         if(value < 1.5) {
-            value = (value - 1.5);
-            return(.5 * (value * value));
-         }
-         return(0.0);
-      }
-TYPE_DATA
-};
-
-class ossimNearestNeighborFilter: public ossimBoxFilter
-{
-public:
-   ossimNearestNeighborFilter (){}
-   virtual ~ossimNearestNeighborFilter() {}
-   
-   virtual double getSupport()const
-      {
-         return 0.0;
-      }
-TYPE_DATA
-};
-
-   
-class ossimBesselOrderOneFilter : public ossimFilter
-{
-public:
-   ossimBesselOrderOneFilter(){}
-   virtual ~ossimBesselOrderOneFilter(){}
-   virtual double filter(double value, double /* support */ )const;
-   virtual double getSupport()const
-      {
-         return 1.0;
-      }
-TYPE_DATA
-};
-class ossimBesselFilter : public ossimFilter
-{
-public:
-   ossimBesselFilter(){}
-   virtual ~ossimBesselFilter(){}
-   virtual double filter(double x, double support)const
-      {
-         if (x == 0.0)
-         {
-            return(M_PI/4.0);
-         }
-         
-         return(ossimBesselOrderOneFilter().filter((M_PI*x)/(2.0*x), support));
-      }
-   virtual double getSupport()const
-      {
-         return 1.0;
-      }
-   
-TYPE_DATA
-};
-
-class ossimBlackmanFilter : public ossimFilter
-{
-public:
-    ossimBlackmanFilter (){}
-    virtual ~ossimBlackmanFilter() {}
-
-    virtual double filter (double x, double /* support */ ) const
-        {
-           return(0.42+0.50*cos(M_PI*x)+0.08*cos(2.0*M_PI*x));
-        }
-   virtual double getSupport()const
-      {
-         return 1.0;
-      }
-TYPE_DATA
-};
-
-class ossimBlackmanSincFilter : public ossimBlackmanFilter
-{
-public:
-    ossimBlackmanSincFilter (){}
-    virtual ~ossimBlackmanSincFilter() {}
-
-    virtual double filter (double x, double support) const
-        {
-           return ((ossimBlackmanFilter::filter(x/support,support))*
-                   (ossimSincFilter().filter(x, support)));
-        }
-   virtual double getSupport()const
-      {
-         return 4.0;
-      }
-TYPE_DATA
-};
-
-class ossimBlackmanBesselFilter : public ossimBlackmanFilter
-{
-public:
-    ossimBlackmanBesselFilter(){}
-    virtual ~ossimBlackmanBesselFilter() {}
-
-    virtual double filter (double x, double support) const
-        {
-           return ((ossimBlackmanFilter::filter(x/support,support))*
-                   (ossimBesselFilter().filter(x, support)));
-        }
-   virtual double getSupport()const
-      {
-         return 3.2383;
-      }
-TYPE_DATA
-};
-
-
-class ossimCatromFilter : public ossimFilter
-{
-public:
-   ossimCatromFilter(){}
-   virtual ~ossimCatromFilter(){}
-   double filter(double x, double /* support */ )const
-      {
-         if (x < -2.0)
-            return(0.0);
-         if (x < -1.0)
-            return(0.5*(4.0+x*(8.0+x*(5.0+x))));
-         if (x < 0.0)
-            return(0.5*(2.0+x*x*(-5.0-3.0*x)));
-         if (x < 1.0)
-            return(0.5*(2.0+x*x*(-5.0+3.0*x)));
-         if (x < 2.0)
-            return(0.5*(4.0+x*(-8.0+x*(5.0-x))));
-         return(0.0);
-      }
-   virtual double getSupport()const
-      {
-         return 2.0;
-      }
-TYPE_DATA
-};
-
-class ossimCubicFilter : public ossimFilter
-{
-public:
-   ossimCubicFilter(){}
-   virtual ~ossimCubicFilter(){}
-   double filter(double x, double /* support */ )const
-      {
-         if (x < -2.0)
-            return(0.0);
-         if (x < -1.0)
-            return((2.0+x)*(2.0+x)*(2.0+x)/6.0);
-         if (x < 0.0)
-            return((4.0+x*x*(-6.0-3.0*x))/6.0);
-         if (x < 1.0)
-            return((4.0+x*x*(-6.0+3.0*x))/6.0);
-         if (x < 2.0)
-            return((2.0-x)*(2.0-x)*(2.0-x)/6.0);
-         return(0.0);
-      }
-   virtual double getSupport()const
-      {
-         return 2.0;
-      }
-TYPE_DATA
-};
-
-class ossimBSplineFilter : public ossimFilter
-{
-public:
-   ossimBSplineFilter(){}
-   virtual ~ossimBSplineFilter(){}
-   virtual double filter(double value, double /* support */ )const
-      {
-	double tt;
-
-	if(value < 0) value = -value;
-	if(value < 1) {
-		tt = value * value;
-		return((.5 * tt * value) - tt + (2.0 / 3.0));
-	} else if(value < 2) {
-		value = 2 - value;
-		return((1.0 / 6.0) * (value * value * value));
-	}
-	return(0.0);
-      }
-   virtual double getSupport()const
-      {
-         return 2.0;
-      }
-TYPE_DATA
-};
-
-class ossimGaussianFilter : public ossimFilter
-{
-public:
-    ossimGaussianFilter (){}
-    virtual ~ossimGaussianFilter() {}
-
-    virtual double filter (double x, double /* support */ ) const
-        {
-           return(exp(-2.0*x*x)*sqrt(2.0/M_PI));
-        }
-   virtual double getSupport()const
-      {
-         return 1.25;
-      }
-TYPE_DATA
-};
-
-class ossimHanningFilter : public ossimFilter
-{
-public:
-   ossimHanningFilter(){}
-   virtual ~ossimHanningFilter(){}
-   double filter(double x, double /* support */ )const
-      {
-         return(0.5+0.5*cos(M_PI*x));
-      }
-   virtual double getSupport()const
-      {
-         return 1.0;
-      }
-TYPE_DATA
-};
-
-class ossimHammingFilter : public ossimFilter
-{
-public:
-    ossimHammingFilter (){}
-    virtual ~ossimHammingFilter() {}
-
-    virtual double filter (double x, double /* support */ ) const
-        {
-           return(0.54+0.46*cos(M_PI*x));
-        }
-   virtual double getSupport()const
-      {
-         return 1.0;
-      }
-TYPE_DATA
-};
-
-class ossimHermiteFilter : public ossimFilter
-{
-public:
-   ossimHermiteFilter(){}
-   virtual ~ossimHermiteFilter(){}
-   double filter(double x, double /* support */ )const
-      {
-         if (x < -1.0)
-            return(0.0);
-         if (x < 0.0)
-            return((2.0*(-x)-3.0)*(-x)*(-x)+1.0);
-         if (x < 1.0)
-            return((2.0*x-3.0)*x*x+1.0);
-         return(0.0);
-      }
-   virtual double getSupport()const
-      {
-         return 1.0;
-      }
-TYPE_DATA
-};
-
-
-class ossimLanczosFilter : public ossimFilter
-{
-public:
-   ossimLanczosFilter(){}
-   virtual ~ossimLanczosFilter(){}
-   double filter(double x, double /* support */ )const
-      {
-         if (x < -3.0)
-            return(0.0);
-         if (x < 0.0)
-            return(Sinc(-x,getSupport())*Sinc(-x/3.0,getSupport()));
-         if (x < 3.0)
-            return(Sinc(x,getSupport())*Sinc(x/3.0,getSupport()));
-         return(0.0);
-      }
-   virtual double getSupport()const
-      {
-         return 3.0;
-      }
-TYPE_DATA
-};
-
-class ossimMitchellFilter : public ossimFilter
-{
-public:
-   ossimMitchellFilter(){}
-   virtual ~ossimMitchellFilter(){}
-   double filter(double x, double /* support */ )const
-      {
-#define MITCHELL_B   (1.0/3.0)
-#define MITCHELL_C   (1.0/3.0)
-#define MITCHELL_P0  ((  6.0- 2.0*MITCHELL_B       )/6.0)
-#define MITCHELL_P2  ((-18.0+12.0*MITCHELL_B+ 6.0*MITCHELL_C)/6.0)
-#define MITCHELL_P3  (( 12.0- 9.0*MITCHELL_B- 6.0*MITCHELL_C)/6.0)
-#define MITCHELL_Q0  ((       8.0*MITCHELL_B+24.0*MITCHELL_C)/6.0)
-#define MITCHELL_Q1  ((     -12.0*MITCHELL_B-48.0*MITCHELL_C)/6.0)
-#define MITCHELL_Q2  ((       6.0*MITCHELL_B+30.0*MITCHELL_C)/6.0)
-#define MITCHELL_Q3  ((     - 1.0*MITCHELL_B- 6.0*MITCHELL_C)/6.0)
-         
-         if (x < -2.0)
-            return(0.0);
-         if (x < -1.0)
-            return(MITCHELL_Q0-x*(MITCHELL_Q1-x*(MITCHELL_Q2-x*MITCHELL_Q3)));
-         if (x < 0.0)
-            return(MITCHELL_P0+x*x*(MITCHELL_P2-x*MITCHELL_P3));
-         if (x < 1.0)
-            return(MITCHELL_P0+x*x*(MITCHELL_P2+x*MITCHELL_P3));
-         if (x < 2.0)
-            return(MITCHELL_Q0+x*(MITCHELL_Q1+x*(MITCHELL_Q2+x*MITCHELL_Q3)));
-         return(0.0);
-      }
-   virtual double getSupport()const
-      {
-         return 2.0;
-      }
-TYPE_DATA
-};
-
-class ossimQuadraticFilter : public ossimFilter
-{
-public:
-   ossimQuadraticFilter(){}
-   virtual ~ossimQuadraticFilter(){}
-   double filter(double x, double /* support */ )const
-      {
-         if (x < -1.5)
-            return(0.0);
-         if (x < -0.5)
-            return(0.5*(x+1.5)*(x+1.5));
-         if (x < 0.5)
-            return(0.75-x*x);
-         if (x < 1.5)
-            return(0.5*(x-1.5)*(x-1.5));
-         return(0.0);
-      }
-   double getSupport()const
-      {
-         return 1.5;
-      }
-TYPE_DATA
-};
-
-class ossimTriangleFilter : public ossimFilter
-{
-public:
-   ossimTriangleFilter(){}
-   virtual ~ossimTriangleFilter() {}
-   
-   virtual double filter (double x, double /* support */ )const
-      {
-         if (x < -1.0)
-            return(0.0);
-         if (x < 0.0)
-            return(1.0+x);
-         if (x < 1.0)
-            return(1.0-x);
-         return(0.0);
-      }
-   virtual double getSupport()const
-      {
-         return 1.0;
-      }
-TYPE_DATA
-};
-
-
-#endif
diff --git a/include/ossim/imaging/ossimFilterResampler.h b/include/ossim/imaging/ossimFilterResampler.h
deleted file mode 100644
index a9db9c8..0000000
--- a/include/ossim/imaging/ossimFilterResampler.h
+++ /dev/null
@@ -1,150 +0,0 @@
-//*******************************************************************
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-// Contributor:
-//         David A. Horner (DAH) http://dave.thehorners.com
-//
-//*************************************************************************
-// $Id: ossimFilterResampler.h 9696 2006-10-11 17:51:26Z gpotts $
-#ifndef ossimFilterResampler_HEADER
-#define ossimFilterResampler_HEADER
-
-#include <vector>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimFilter.h>
-#include <ossim/imaging/ossimFilterTable.h>
-
-class OSSIMDLLEXPORT ossimFilterResampler
-{
-public:
-   enum ossimFilterResamplerType
-   {
-      ossimFilterResampler_NEAREST_NEIGHBOR = 0,
-      ossimFilterResampler_BOX              = 1,
-      ossimFilterResampler_GAUSSIAN         = 2,
-      ossimFilterResampler_CUBIC            = 3,
-      ossimFilterResampler_HANNING          = 4,
-      ossimFilterResampler_HAMMING          = 5,
-      ossimFilterResampler_LANCZOS          = 6,
-      ossimFilterResampler_MITCHELL         = 7,
-      ossimFilterResampler_CATROM           = 8,
-      ossimFilterResampler_BLACKMAN         = 9,
-      ossimFilterResampler_BLACKMAN_SINC    = 10,
-      ossimFilterResampler_BLACKMAN_BESSEL  = 11,
-      ossimFilterResampler_QUADRATIC        = 12,
-      ossimFilterResampler_TRIANGLE         = 13,
-      ossimFilterResampler_BILINEAR         = 13,
-      ossimFilterResampler_HERMITE          = 14,
-      ossimFilterResampler_BELL             = 15,
-      ossimFilterResampler_BSPLINE          = 16
-      
-   };
-   ossimFilterResampler();
-   virtual ~ossimFilterResampler();
-
-  virtual void resample(const ossimRefPtr<ossimImageData>& input,
-			ossimRefPtr<ossimImageData>& output,
-			const ossimDpt& ul,
-			const ossimDpt& ur,
-			const ossimDpt& deltaUl,
-			const ossimDpt& deltaUr,
-			const ossimDpt& length);
-
-  virtual void resample(const ossimRefPtr<ossimImageData>& input,
-			ossimRefPtr<ossimImageData>& output,
-			const ossimIrect& outputSubRect,
-			const ossimDpt& ul,
-			const ossimDpt& ur,
-			const ossimDpt& deltaUl,
-			const ossimDpt& deltaUr,
-			const ossimDpt& length);
-
-  void setFilterType(ossimFilterResamplerType filterType);
-  void setFilterType(ossimFilterResamplerType minifyFilterType,
-		     ossimFilterResamplerType magnifyFilterType);
-  void setFilterType(const ossimString& type);
-  void setFilterType(const ossimString& minifyType,
-		     const ossimString& magnifyType);
-
-  void setMinifyFilterType(const ossimString& minifyType);
-  void setMagnifyFilterType(const ossimString& magnifyType);
-  void setMinifyFilterType(ossimFilterResamplerType filterType);
-  void setMagnifyFilterType(ossimFilterResamplerType filterType);
-  ossimString getMinifyFilterTypeAsString()const;
-  ossimString getMagnifyFilterTypeAsString()const;
-  void setScaleFactor(const ossimDpt& scale);
-  void setBlurFactor(ossim_float64 blur);
-
-  void setBoundingInputRect(const ossimIrect& rect)
-  {
-    theInputRect = rect;
-  }
-  ossimIrect getBoundingInputRect()const
-  {
-    return theInputRect;
-  }
-
-  ossim_float64 getBlurFactor()const;
-
-  const ossimDpt& getScaleFactor()const
-  {
-    return theScaleFactor;
-  }
-  /*!
-   * Saves the state of this object.
-   */
-  virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
-  
-  /*!
-   * Loads the state of this object.
-   */
-  virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-  
-  virtual void getKernelSupport(double& x,
-				double & y)const;
-
-  virtual void getFilterTypes(std::vector<ossimString>& filterTypes)const;
-
-private:
-  const ossimFilter* getHorizontalFilter()const;
-  const ossimFilter* getVerticalFilter()const;
-
-  template <class T>
-  void resampleBilinearTile(T dummy,
-			    const ossimRefPtr<ossimImageData>& input,
-			    ossimRefPtr<ossimImageData>& output,
-			    const ossimIrect& outputSubRect,
-			    const ossimDpt& inputUl,
-			    const ossimDpt& inputUr,
-			    const ossimDpt& deltaUl,
-			    const ossimDpt& deltaUr,
-			    const ossimDpt& outLength);
-  
-   void computeTable();
-   ossimString getFilterTypeAsString(ossimFilterResamplerType type)const;
-   ossimFilterResamplerType getFilterType(const ossimString& type)const;
-   ossimFilter* createNewFilter(ossimFilterResamplerType filterType,
-                                ossimFilterResamplerType& result);
-
-
-   ossimFilter*             theMinifyFilter;
-   ossimFilter*             theMagnifyFilter;
-   ossimFilterTable         theFilterTable;
-   
-   ossimFilterResamplerType theMinifyFilterType;
-   ossimFilterResamplerType theMagnifyFilterType;
-   ossimDpt                 theScaleFactor;
-   ossimDpt                 theInverseScaleFactor;
-   
-   ossimIrect               theInputRect;
-   ossim_float64            theBlurFactor;
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimFilterTable.h b/include/ossim/imaging/ossimFilterTable.h
deleted file mode 100644
index 23d1930..0000000
--- a/include/ossim/imaging/ossimFilterTable.h
+++ /dev/null
@@ -1,97 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimFilterTable.h 9094 2006-06-13 19:12:40Z dburken $
-#ifndef ossimFilterTable_HEADER
-#define ossimFilterTable_HEADER
-
-#include <cmath>
-#include <ossim/base/ossimConstants.h>
-
-class ossimFilter;
-
-class ossimFilterTable
-{
-public:
-   /** default constructor */
-   ossimFilterTable();
-
-   /** destructor */
-   ~ossimFilterTable();
-
-   /** Builds a table with filter being used in both x and y direction. */
-   void buildTable(ossim_uint32  filterSteps,
-                   const ossimFilter& filter);
-
-   /** Builds a table. */
-   void buildTable(ossim_uint32  filterSteps,
-                   const ossimFilter& xFilter,
-                   const ossimFilter& yFilter);
-
-   /** @return theWidth*theHeight */
-   ossim_uint32 getWidthByHeight() const;
-
-   /** @return theXSupport */
-   ossim_uint32 getXSupport()      const;
-
-   /** @return theYSupport */
-   ossim_uint32 getYSupport()      const;
-
-   /** @return theWidth */
-   ossim_uint32 getWidth()         const;
-
-   /** @return theHeight */
-   ossim_uint32 getHeight()        const;
-
-   /**
-    * Inlined below.
-    *
-    * @return const double* to the closest weight of x and y.
-    */
-   const double* getClosestWeights(const double& x, const double& y)const;
-
-protected:
-
-   /**
-    * Creates the weight array "theWeights".  Will delete if previously
-    * allocated.
-    */
-   void allocateWeights();
-
-   double*      theWeights;
-   ossim_uint32 theWidth;
-   ossim_uint32 theHeight;
-   ossim_uint32 theWidthHeight;
-   ossim_uint32 theXSupport;
-   ossim_uint32 theYSupport;
-   ossim_uint32 theFilterSteps;
-};
-
-/**
- * Method inlined for speed as it is used in the inner pixel loop of
- * ossimFilterResampler::resampleBilinearTile method.
- */
-inline const double* ossimFilterTable::getClosestWeights(const double& x,
-                                                         const double& y)const
-{
-   // Extract the decimal part of x and y.
-   double intPartDummy;
-   double decimalPrecisionX = fabs(modf(x, &intPartDummy));
-   double decimalPrecisionY = fabs(modf(y, &intPartDummy));
-   
-   ossim_int32 kernelLine =
-      (ossim_int32)(theFilterSteps*decimalPrecisionY);
-   ossim_int32 kernelSamp =
-      (ossim_int32)(theFilterSteps*decimalPrecisionX);
-  
-  return &theWeights[(kernelLine*theFilterSteps +
-                      kernelSamp)*theWidthHeight];
-}
-
-#endif /* End of "#ifndef ossimFilterTable_HEADER" */
diff --git a/include/ossim/imaging/ossimFixedTileCache.h b/include/ossim/imaging/ossimFixedTileCache.h
deleted file mode 100644
index 2560719..0000000
--- a/include/ossim/imaging/ossimFixedTileCache.h
+++ /dev/null
@@ -1,146 +0,0 @@
-//******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: This file contains the Application cache algorithm
-//
-//***********************************
-// $Id: ossimFixedTileCache.h 16276 2010-01-06 01:54:47Z gpotts $
-#ifndef ossimFixedTileCache_HEADER
-#define ossimFixedTileCache_HEADER
-#include <map>
-#include <list>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimReferenced.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <OpenThreads/Mutex>
-
-class  ossimFixedTileCacheInfo
-{
-public:
-   ossimFixedTileCacheInfo(ossimRefPtr<ossimImageData>& tile,
-                           ossim_int32 tileId=-1)
-      :theTile(tile),
-      theTileId(tileId)
-      {
-      }
-   
-   bool operator <(const ossimFixedTileCacheInfo& rhs)const
-      {
-         return (theTileId < rhs.theTileId);
-      }
-   bool operator <(ossim_int32 tileId)const
-      {
-         return (theTileId < tileId);
-      }
-   bool operator >(const ossimFixedTileCacheInfo& rhs)const
-      {
-         return (theTileId > rhs.theTileId);
-      }
-   bool operator >(ossim_int32 tileId)const
-      {
-         return (theTileId > tileId);
-      }
-   bool operator ==(const ossimFixedTileCacheInfo& rhs)const
-      {
-         return (theTileId == rhs.theTileId);
-      }
-   bool operator ==(ossim_int32 tileId)const
-      {
-         return (theTileId == tileId);
-      }
-   
-   ossimRefPtr<ossimImageData> theTile;
-   ossim_int32 theTileId;
-};
-
-class ossimFixedTileCache : public ossimReferenced
-{
-public:
-   ossimFixedTileCache();
-   virtual void setRect(const ossimIrect& rect);
-   virtual void setRect(const ossimIrect& rect,
-                        const ossimIpt& tileSize);
-   void keepTilesWithinRect(const ossimIrect& rect);
-   virtual ossimRefPtr<ossimImageData> addTile(ossimRefPtr<ossimImageData> imageData,
-                                               bool duplicateData=true);
-   virtual ossimRefPtr<ossimImageData> getTile(ossim_int32 id);
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIpt& origin)
-      {
-         return getTile(computeId(origin));
-      }
-   virtual void setUseLruFlag(bool flag)
-      {
-         theUseLruFlag = flag;
-      }
-   virtual bool getUseLruFlag()const
-      {
-         return theUseLruFlag;
-      }
-   virtual void flush();
-   virtual void deleteTile(const ossimIpt& origin)
-      {
-         deleteTile(computeId(origin));
-      }
-   virtual void deleteTile(ossim_int32 tileId);
-   virtual ossimRefPtr<ossimImageData> removeTile(const ossimIpt& origin)
-      {
-         return removeTile(computeId(origin));
-      }
-   virtual ossimRefPtr<ossimImageData> removeTile(ossim_int32 tileId);
-   virtual const ossimIrect& getTileBoundaryRect()const
-      {
-         return theTileBoundaryRect;
-      }
-   virtual ossim_uint32 getNumberOfTiles()const
-      {
-         return (ossim_uint32)theTileMap.size();
-      }
-   virtual const ossimIpt& getTileSize()const
-      {
-         return theTileSize;
-      }
-   virtual ossim_uint32 getCacheSize()const
-      {
-         return theCacheSize;
-      }
-   virtual void deleteTile();
-   virtual ossimRefPtr<ossimImageData> removeTile();
-   
-   virtual void setMaxCacheSize(ossim_uint32 cacheSize)
-      {
-         theMaxCacheSize = cacheSize;
-      }
-
-   ossim_uint32 getMaxCacheSize()const
-      {
-         return theMaxCacheSize;
-      }
-   
-   virtual ossimIpt getTileOrigin(ossim_int32 tileId);
-   virtual ossim_int32 computeId(const ossimIpt& tileOrigin)const;
-   virtual void setTileSize(const ossimIpt& tileSize);
-protected:
-   virtual ~ossimFixedTileCache();
-   OpenThreads::Mutex theMutex;
-   ossimIrect   theTileBoundaryRect;
-   ossimIpt     theTileSize;
-   ossimIpt     theBoundaryWidthHeight;
-   ossim_uint32 theTilesHorizontal;
-   ossim_uint32 theTilesVertical;
-   ossim_uint32 theCacheSize;
-   ossim_uint32 theMaxCacheSize;
-   std::map<ossim_int32, ossimFixedTileCacheInfo> theTileMap;
-   std::list<ossim_int32> theLruQueue;
-   bool                   theUseLruFlag;
-   virtual void eraseFromLru(ossim_int32 id);
-   void adjustLru(ossim_int32 id);
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimFusionCombiner.h b/include/ossim/imaging/ossimFusionCombiner.h
deleted file mode 100644
index d08aff4..0000000
--- a/include/ossim/imaging/ossimFusionCombiner.h
+++ /dev/null
@@ -1,47 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: Implementation for Base fusion.
-//              This base class assumes two inputs where the second input is
-//              the intensity source.
-//
-//*************************************************************************
-// $Id: ossimFusionCombiner.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimFusionCombiner_HEADER
-#define ossimFusionCombiner_HEADER
-
-#include <ossim/imaging/ossimImageCombiner.h>
-
-class OSSIMDLLEXPORT ossimFusionCombiner : public ossimImageCombiner
-{
-public:
-  ossimFusionCombiner();
-  ossimFusionCombiner(ossimObject* owner);
-  virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const;
-  bool canConnectMyInputTo(ossim_int32 inputIndex,
-			   const ossimConnectableObject* object)const;
-   ossimScalarType getOutputScalarType() const;
-   
-  virtual void initialize();
-protected:
-   virtual ~ossimFusionCombiner();   
-  ossimRefPtr<ossimImageData> theTile;
-  ossimRefPtr<ossimImageData> theNormTile;
-  ossimRefPtr<ossimImageData> theNormIntensity;
-  ossimImageSource*  theInputConnection;
-  ossimImageSource*  theIntensityConnection;
-  
-  ossimRefPtr<ossimImageData> getNormIntensity(const ossimIrect& rect,
-                                               ossim_uint32 resLevel);
-  ossimRefPtr<ossimImageData> getNormTile(const ossimIrect& rect,
-                                          ossim_uint32 resLevel);
-TYPE_DATA  
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimGammaRemapper.h b/include/ossim/imaging/ossimGammaRemapper.h
deleted file mode 100644
index 95b6a96..0000000
--- a/include/ossim/imaging/ossimGammaRemapper.h
+++ /dev/null
@@ -1,71 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2002 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Kathy Minear
-//
-// Description:
-//
-// Gamma remapper.
-//
-//*************************************************************************
-// $Id: ossimGammaRemapper.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimGammaRemapper_HEADER
-#define ossimGammaRemapper_HEADER
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-class ossimGammaRemapper : public ossimImageSourceFilter
-{
-public:
-
-   ossimGammaRemapper(ossimObject* owner=NULL);
-   ossimGammaRemapper(ossimImageSource* inputSource);
-   ossimGammaRemapper(ossimObject* owner, ossimImageSource* inputSource);
-
-
-   virtual ossimString getShortName()const;
-
-   virtual void initialize();
-
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect,
-                                   ossim_uint32 resLevel=0);
-   
-   /*!
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-   virtual ostream& print(ostream& os) const;
-   friend ostream& operator<< (ostream& os,  const ossimGammaRemapper& hr);
-
-   void setMinMaxPixelValues(const vector<double>& v_min,
-                             const vector<double>& v_max);
-
-   virtual void enableSource();
-   
-protected:
-   virtual ~ossimGammaRemapper();
-
-   /*!
-    * Method to set unset the enable flag.
-    */
-
-   void verifyEnabled();
-
-   ossimRefPtr<ossimImageData> theTile;
-   double*         theBuffer;
-   vector<double>  theMinPixelValue;
-   vector<double>  theMaxPixelValue;
-   vector<double>  theGamma;
-   bool            theUserDisabledFlag;
-
-   TYPE_DATA
-};
-
-#endif /* #ifndef ossimGammaRemapper_HEADER */
diff --git a/include/ossim/imaging/ossimGeneralRasterInfo.h b/include/ossim/imaging/ossimGeneralRasterInfo.h
deleted file mode 100644
index 6bec188..0000000
--- a/include/ossim/imaging/ossimGeneralRasterInfo.h
+++ /dev/null
@@ -1,431 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Contains class declaration for ossimGeneralRasterInfo
-//*******************************************************************
-//  $Id: ossimGeneralRasterInfo.h 22197 2013-03-12 02:00:55Z dburken $
-
-#ifndef ossimGeneralRasterInfo_HEADER
-#define ossimGeneralRasterInfo_HEADER 1
-
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimErrorContext.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/imaging/ossimImageMetaData.h>
-#include <vector>
-
-//---
-// Forward class declarations.
-//---
-class ossimEnviHeader;
-class ossimKeywordlist;
-
-/**
- * @class ossimGeneralRasterInfo
- *
- */
-class OSSIMDLLEXPORT ossimGeneralRasterInfo : public ossimObject
-{
-public:
-
-   enum ossimFillMode
-   {
-      NONE,
-      ZEROES_TO_MIN,
-      ZEROES_TO_NULL_EDGES_ONLY
-   };
-
-   enum
-   {
-      UNKNOWN = -1
-   };
-
-   /* @brief default constructor */
-   ossimGeneralRasterInfo();
-   
-   ossimGeneralRasterInfo(const std::vector<ossimFilename>& imageFileList,
-                          ossimScalarType      pixelType,
-                          ossimInterleaveType  il_type,
-                          ossim_int32          numberOfBands,
-                          ossim_int32          lines,
-                          ossim_int32          samples,
-                          ossim_int32          headerSize,
-                          ossimFillMode        nullsMode,
-                          ossim_int32          pixelsToChop);
-   
-   ossimGeneralRasterInfo(const ossimKeywordlist& kwl, const char* prefix=0);
-
-   /* @brief copy constructor */
-   ossimGeneralRasterInfo( const ossimGeneralRasterInfo& obj );
-
-   /** @brief Assignment operator=. */
-   const ossimGeneralRasterInfo& operator=( const ossimGeneralRasterInfo& rhs );
-   
-   virtual ~ossimGeneralRasterInfo ();
-
-   /**
-    *  Zero based rectangle of the valid image.
-    */
-   const ossimIrect& imageRect() const;
-
-   /**
-    *  Returns the rectangle of where the image is within the raster file.
-    *  In most cases this will be the same as the rawImageRect. (zero based)
-    */
-   const ossimIrect& validImageRect() const;
-
-   /**
-    *  Zero based rectangle of the raw image.
-    */
-   const ossimIrect& rawImageRect() const;
-
-   /**
-    * Returns the offset of this image's origin to a full-image's origin, in
-    * the case where this image is a sub-image of a larger full-image.
-    */
-   const ossimIpt& subImageOffset() const;
-
-   /**
-    *  Returns the size of header in bytes.
-    */
-   ossim_int32 headerSize() const;
-
-   /**
-    *  Returns the fill mode.  This is used to flip values on ingest.
-    *  Valid Mode Enumerations:
-    *  - 0  Do nothing to the pixels on ingest.
-    *  - 1  Flip all zeroes to the minimum pixel value.
-    *  - 2  Flip zeroes within the image line to minimum pixel value.
-    *       This is used by edge walking code.
-    */
-   ossim_uint32 fillToNullsMode() const;
-
-   /**
-    *  Sets theSetNullsMode.
-    */
-   void setFillToNullsMode(ossim_uint32 mode);
-
-   /**
-    * @brief Number of bands. Inlined below.
-    * @return Number of bands from theMetaData class member cast to an int32.
-    */
-   inline ossim_int32 numberOfBands() const;
-   
-   /**
-    * @brief Bytes per pixel.  Inlined below.
-    * @return Bytes per pixel from theMetaData class member cast to an int32.
-    */   
-   inline ossim_int32 bytesPerPixel() const;
-   
-   /**
-    *  Returns the number of pixels from the edge of a line
-    *  to set to the fill value.  This can be used to eliminate
-    *  resampling error on the edge of an image and still keep
-    *  the image demensions relative to the geometry file.
-    */
-   ossim_int32 pixelsToChop() const;
-   
-   /**
-    *  Enumerated in InterleaveTypeLUT. Should be either bip,
-    *  bil or bsq.  Defaulted to bip.
-    */
-   ossimInterleaveType interleaveType() const;
-
-   /**
-    *  Returns the number of lines within "theValidImageRect".
-    */
-   inline ossim_int32 validLines() const;
-
-   /**
-    *  Returns the number of lines within "theRawImageRect".
-    */
-   inline ossim_int32 rawLines() const;
-
-   /**
-    *  Returns the number of bytes in a raw line.
-    */
-   inline ossim_int32 bytesPerRawLine() const;
-
-   /**
-    *  Returns the number of bytes in a valid line.
-    */
-   inline ossim_int32 bytesPerValidLine() const;
-
-   /**
-    *  Returns the number of samples within "theValidImageRect".
-    */
-   inline ossim_int32 validSamples() const;
-
-   /**
-    *  Returns the number of samples within "theRawImageRect".
-    */
-   inline ossim_int32 rawSamples() const;
-
-   /**
-    *  Returns the offset in bytes to the first valid sample in the image.
-    */
-   inline std::streamoff offsetToFirstValidSample() const;
-   
-   const std::vector<ossimFilename>& getImageFileList() const;
-
-   void setImageFileList(const std::vector<ossimFilename>& list);
-
-   /**
-    * @brief Sets the image file list to file.  Performs a clear, prior to
-    * setting.
-    * @param file Image file.
-    */
-   void setImageFile(const ossimFilename& file);
-
-   void setHeaderSize(ossim_int32 headerSize);
-   
-   void setInterleaveType(ossimInterleaveType il_type);
-
-   virtual std::ostream& print(std::ostream& out) const;
-
-   void setImageRect(const ossimIrect& imageRect);
-   
-   void setValidImageRect(const ossimIrect &imageRect);
-
-   void setRawImageRect(const ossimIrect &imageRect);
-
-   void setSubImageOffset(const ossimIpt& d);
-
-   ossimByteOrder getImageDataByteOrder() const;
-
-   void setImageDataByteOrder(ossimByteOrder byteOrder);
-   /**
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0) const;
-
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   /**
-    * @brief Takes image file and attempts to derive/find header file to
-    * parse for general raster data, i.e. lines, samples, bands and so on.
-    * @param image file.
-    * @return true on success, false on error.
-    */
-   bool open( const ossimFilename& imageFile );
-
-   /** @return Const reference to theMetaData class member. */
-   inline const ossimImageMetaData& getImageMetaData() const;
-
-   /** @return Reference to theMetaData class member. */
-   inline ossimImageMetaData& getImageMetaData();
-
-   /**
-    * @brief Initialize from envi header file.
-    * @param enviHeader
-    * @return true on success, false on error.
-    */  
-   bool initializeFromEnviHdr( const ossimEnviHeader& enviHdr );
-
-private:
-
-   /**
-    * @brief Initialize from header file.
-    * @param headerFile
-    * @return true on success, false on error.
-    */
-   bool initializeFromHdr( const ossimFilename& imageFile,
-                           const ossimFilename& headerFile );
-
-   /**
-    * @brief Initialize from envi header file.
-    * @param headerFile
-    * @return true on success, false on error.
-    */  
-   bool initializeFromEnviHdr( const ossimFilename& headerFile );
-
-   /**
-    * @brief Initialize from omd file.
-    * @param file
-    * @return true on success, false on error.
-    */  
-   bool initializeFromXml( const ossimFilename& imageFile,
-                           const ossimFilename& headerFile );
-
-   /**
-    * @brief Private method to get bits per pixel from file size,
-    * lines, samples and bands.  Method created to avoid duplicate code
-    * in "initizeFrom" methods.
-    *
-    * This assumes that "theRawImageRect" and "theNumberOfBands" has been
-    * set.
-    *
-    * @param imageFile This image file.
-    * @param Calculated bits per pixel.
-    * @return bits per pixel or 0 on error.
-    */
-   ossim_int32 getBitsPerPixel( const ossimFilename& imageFile ) const;
-
-   /** @brief Clears data members. */
-   void clear();
-   
-   ossimImageMetaData          theMetaData;
-   std::vector<ossimFilename>  theImageFileList;
-   ossimInterleaveType         theInterleaveType;
-
-   /**
-    *  The zero based rectangle of the entire image not including any header.
-    */
-   ossimIrect theRawImageRect;
-
-   /**
-    *  The rectangle representing where the valid part of the image lies
-    *  within "theRawImageRect".
-    */
-   ossimIrect theValidImageRect;
-
-   /**
-    *  The valid image rectangle normalized to be zero based.
-    */
-   ossimIrect theImageRect;
-
-   /**
-    *  The offset from the full-image origin to this image's origin
-    */
-   ossimIpt theSubImageOffset;
-
-   /**
-    *  Size of header in bytes.
-    */
-   ossim_int32 theHeaderSize;
-
-   /**
-    *  Mode of how to handle pixels on import.
-    *   0 = Do nothing the pixels.
-    *   1 = Set any zeroes to min value of radiometry.
-    *   2 = Set zeroes on line edges only to nulls; any other zeroes are
-    *       set to min value of radiometry.
-    */
-   ossimFillMode theSetNullsMode;
-
-   /**
-    *  Amount of pixels to chop for each line edge.
-    */
-   ossim_int32 thePixelsToChop;
-
-   /**
-    *  The byte order the image data is stored in.
-    */
-  ossimByteOrder theImageDataByteOrder;
-};
-
-
-//---
-// Inlines:
-// 
-// These methods are used throughout raster read/write code; hence, inlines.
-// Note that most of these are used in calculating std::streamoff which is
-// a signed 64 bit integer on most machines; hence, the cast to an int from
-// an unsigned int for convenience.
-//---
-inline const ossimImageMetaData& ossimGeneralRasterInfo::getImageMetaData() const
-{
-   return theMetaData;
-}
-
-inline ossimImageMetaData& ossimGeneralRasterInfo::getImageMetaData()
-{
-   return theMetaData;
-}
-
-inline ossim_int32 ossimGeneralRasterInfo::numberOfBands() const
-{
-   return static_cast<ossim_int32>( theMetaData.getNumberOfBands() );
-}
-
-inline ossim_int32 ossimGeneralRasterInfo::bytesPerPixel() const
-{
-   return static_cast<ossim_int32>( theMetaData.getBytesPerPixel() );
-}
-
-inline ossim_int32 ossimGeneralRasterInfo::validLines() const
-{
-   return static_cast<ossim_int32>(theValidImageRect.height());
-}
-
-inline ossim_int32 ossimGeneralRasterInfo::rawLines() const
-{
-   return static_cast<ossim_int32>(theRawImageRect.height());
-}
-
-inline ossim_int32 ossimGeneralRasterInfo::bytesPerRawLine() const
-{
-   if (interleaveType() == OSSIM_BIP)
-   {
-      return rawSamples() * bytesPerPixel() * numberOfBands();
-   }
-   else
-   {
-      return rawSamples() * bytesPerPixel();
-   }
-}
-
-inline ossim_int32 ossimGeneralRasterInfo::bytesPerValidLine() const
-{
-   if (interleaveType() == OSSIM_BIP)
-   {
-      return validSamples() * bytesPerPixel() * numberOfBands();
-   }
-   else
-   {
-      return validSamples() * bytesPerPixel();
-   }
-}
-
-inline ossim_int32 ossimGeneralRasterInfo::validSamples() const
-{
-   return static_cast<ossim_int32>(theValidImageRect.width());
-}
-
-inline ossim_int32 ossimGeneralRasterInfo::rawSamples() const
-{
-   return static_cast<ossim_int32>(theRawImageRect.width());
-}
-
-inline std::streamoff ossimGeneralRasterInfo::offsetToFirstValidSample() const
-{
-   if (interleaveType() == OSSIM_BIP)
-   {
-      return headerSize() +
-         ( bytesPerRawLine() * validImageRect().ul().y ) +
-         ( validImageRect().ul().x * numberOfBands() * bytesPerPixel() );
-   }
-   else if (interleaveType() == OSSIM_BIL)
-   {
-      return headerSize() +
-         ( bytesPerRawLine() * validImageRect().ul().y * numberOfBands() ) +
-         ( validImageRect().ul().x * bytesPerPixel() );
-   }
-   else // BSQ
-   {
-      return headerSize() +
-         ( bytesPerRawLine() * validImageRect().ul().y ) +
-         ( validImageRect().ul().x * bytesPerPixel() );
-   }
-}
-
-#endif
diff --git a/include/ossim/imaging/ossimGeneralRasterTileSource.h b/include/ossim/imaging/ossimGeneralRasterTileSource.h
deleted file mode 100644
index fe102b7..0000000
--- a/include/ossim/imaging/ossimGeneralRasterTileSource.h
+++ /dev/null
@@ -1,212 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Contains class declaration for ossimGeneralRasterTileSource.
-// ossimGeneralRasterTileSource is derived from ImageHandler which is
-// derived from ossimTileSource.
-//*******************************************************************
-//  $Id: ossimGeneralRasterTileSource.h 21631 2012-09-06 18:10:55Z dburken $
-
-#ifndef ossimGeneralRasterTileSource_HEADER
-#define ossimGeneralRasterTileSource_HEADER 1
-
-
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/base/ossimIoStream.h>
-#include <ossim/imaging/ossimGeneralRasterInfo.h>
-#include <vector>
-  
-
-class  ossimImageData;
-
-class OSSIM_DLL ossimGeneralRasterTileSource : public ossimImageHandler
-{
-public:
-
-   ossimGeneralRasterTileSource();
-
-   virtual ossimString getShortName()const;
-   virtual ossimString getLongName()const;
-   
-   /**
-    *  Returns a pointer to a tile given an origin representing the upper
-    *  left corner of the tile to grab from the image.
-    *  Satisfies pure virtual from TileSource class.
-    */
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect,
-                                               ossim_uint32 resLevel=0);
-
-   /**
-    * Method to get a tile.   
-    *
-    * @param result The tile to stuff.  Note The requested rectangle in full
-    * image space and bands should be set in the result tile prior to
-    * passing.  It will be an error if:
-    * result.getNumberOfBands() != this->getNumberOfOutputBands()
-    *
-    * @return true on success false on error.  If return is false, result
-    *  is undefined so caller should handle appropriately with makeBlank or
-    * whatever.
-    */
-   virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);   
-   
-   /**
-    *  Returns the number of bands in the image.
-    *  Satisfies pure virtual from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfInputBands() const;
-   
-   /**
-    * Returns the number of bands in a tile returned from this TileSource.
-    * Note: we are supporting sources that can have multiple data objects.
-    * If you want to know the scalar type of an object you can pass in the 
-    */
-   virtual ossim_uint32 getNumberOfOutputBands() const;
-   
-   /**
-    *  Returns the number of lines in the image.
-    *  Satisfies pure virtual from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level = 0) const;
-   
-   /**
-    *  Returns the number of samples in the image.  
-    *  Satisfies pure virtual from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level = 0) const;
-
-   /**
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-   
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-   /**
-    * Returns the output pixel type of the tile source.
-    */
-   virtual ossimScalarType getOutputScalarType() const;
-
-   /**
-    * Returns the width of the output tile.
-    */
-   virtual ossim_uint32    getTileWidth() const;
-   
-   /**
-    * Returns the height of the output tile.
-    */
-   virtual ossim_uint32    getTileHeight() const;
-
-   /**
-    * Returns the tile width of the image or 0 if the image is not tiled.
-    * Note: this is not the same as the ossimImageSource::getTileWidth which
-    * returns the output tile width which can be different than the internal
-    * image tile width on disk.
-    * Note:  This handler will always return 0 for this method.
-    */
-   virtual ossim_uint32 getImageTileWidth() const;
-
-   /**
-    * Returns the tile width of the image or 0 if the image is not tiled.
-    * Note: this is not the same as the ossimImageSource::getTileWidth which
-    * returns the output tile width which can be different than the internal
-    * image tile width on disk.
-    * Note:  This handler will always return 0 for this method.
-    */
-   virtual ossim_uint32 getImageTileHeight() const;   
-   
-   bool isValidRLevel(ossim_uint32 reduced_res_level) const;
-   
-   virtual void close();
-   virtual bool isOpen() const;
-   virtual bool open();
-   virtual bool open(const ossimGeneralRasterInfo& info);
-   
-   /**
-    * Override base getXXXXPixValue methods since the null/min/max can be set
-    * to something different.  Currently returns the same value for all bands.
-    */
-   virtual double getNullPixelValue(ossim_uint32 band=0)const;
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-
-   /**
-    * @brief Indicates whether or not the image handler can control output
-    * band selection via the setOutputBandList method.
-    *
-    * Overrides: ossimImageHandler::isBandSelector
-    *
-    * @return true
-    */
-   virtual bool isBandSelector() const;
-
-   /**
-    * @brief If the image handler "isBandSeletor()" then the band selection
-    * of the output chip can be controlled.
-    *
-    * Overrides: ossimImageHandler::setOutputBandList
-    * 
-    * @return true on success, false on error.
-    */
-   virtual bool setOutputBandList(const std::vector<ossim_uint32>& band_list);
-
-   /** @brief Initializes bandList to the zero based order of output bands. */
-   virtual void getOutputBandList(std::vector<ossim_uint32>& bandList) const;
-
-protected:
-   virtual ~ossimGeneralRasterTileSource();
-   /**
-    *  Methods return true on succes false on error.
-    */
-   virtual bool fillBuffer(const ossimIpt& origin, const ossimIpt& size);
-   virtual bool fillBIP(const ossimIpt& origin, const ossimIpt& size);
-   virtual bool fillBIL(const ossimIpt& origin, const ossimIpt& size);
-   virtual bool fillBSQ(const ossimIpt& origin, const ossimIpt& size);
-   virtual bool fillBsqMultiFile(const ossimIpt& origin, const ossimIpt& size);
-
-   virtual ossimKeywordlist getHdrInfo(ossimFilename hdrFile);
-   virtual ossimKeywordlist getXmlInfo(ossimFilename xmlFile);
-
-   bool initializeHandler();
-   
-   ossimRefPtr<ossimImageData>              m_tile;
-   ossim_uint8*                             m_buffer;
-   ossim_uint8*                             m_lineBuffer;
-   ossimInterleaveType                      m_bufferInterleave;
-   std::vector<ossimRefPtr<ossimIFStream> > m_fileStrList;
-   // std::vector< std::ifstream* >            m_fileStrList;   
-   ossimGeneralRasterInfo                   m_rasterInfo;
-   ossimIrect                               m_bufferRect;
-   bool                                     m_swapBytesFlag;
-   ossim_uint32                             m_bufferSizeInPixels;
-   std::vector<ossim_uint32>                m_outputBandList;
-
-private:
-   
-   /** @brief Allocates m_tile. */
-   void allocateTile();
-
-   /** @brief Allocates m_buffer */
-   void allocateBuffer( const ossimImageData* tile );
-   
-
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimGeneralRasterTileSource_HEADER */
diff --git a/include/ossim/imaging/ossimGeoAnnotationBitmap.h b/include/ossim/imaging/ossimGeoAnnotationBitmap.h
deleted file mode 100644
index f32820e..0000000
--- a/include/ossim/imaging/ossimGeoAnnotationBitmap.h
+++ /dev/null
@@ -1,54 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimGeoAnnotationBitmap.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimGeoAnnotationBitmap_HEADER
-#define ossimGeoAnnotationBitmap_HEADER
-#include <ossim/imaging/ossimGeoAnnotationObject.h>
-
-class OSSIMDLLEXPORT ossimGeoAnnotationBitmap: public ossimGeoAnnotationObject
-{
-public:
-
-   ossimGeoAnnotationBitmap(const ossimGpt& center= ossimGpt(0,0,0),
-                            ossimRefPtr<ossimImageData> imageData=0,
-                            unsigned char r = 255,
-                            unsigned char g = 255,
-                            unsigned char b = 255);
-   
-   ossimGeoAnnotationBitmap(const ossimGeoAnnotationBitmap& rhs);
-   
-   virtual ossimObject* dup()const;
-
-   virtual bool intersects(const ossimDrect& rect) const;
-
-   virtual ossimGeoAnnotationBitmap* getNewClippedObject(const ossimDrect& rect)const;
-
-   virtual void applyScale(double x, double y);
-
-   virtual std::ostream& print(std::ostream& out)const;
-   virtual void draw(ossimRgbImage& anImage)const;
-   virtual void getBoundingRect(ossimDrect& rect)const;
-   virtual void transform(ossimImageGeometry* projection);
-
-   virtual void setImageData(ossimRefPtr<ossimImageData>& imageData);
-   virtual void computeBoundingRect();
-
-protected:
-   virtual ~ossimGeoAnnotationBitmap();
-   
-   ossimGpt                    theCenterPoint;
-   ossimDpt                    theProjectedPoint;
-   ossimRefPtr<ossimImageData> theImageData;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimGeoAnnotationMultiEllipseObject.h b/include/ossim/imaging/ossimGeoAnnotationMultiEllipseObject.h
deleted file mode 100644
index cd3341c..0000000
--- a/include/ossim/imaging/ossimGeoAnnotationMultiEllipseObject.h
+++ /dev/null
@@ -1,69 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimGeoAnnotationMultiEllipseObject.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimGeoAnnotationMultiEllipseObject_HEADER
-#define ossimGeoAnnotationMultiEllipseObject_HEADER
-#include <ossim/imaging/ossimGeoAnnotationObject.h>
-#include <vector>
-class ossimAnnotationMultiEllipseObject;
-class OSSIM_DLL ossimGeoAnnotationMultiEllipseObject : public ossimGeoAnnotationObject
-{
-public:
-   ossimGeoAnnotationMultiEllipseObject();
-   ossimGeoAnnotationMultiEllipseObject(const std::vector<ossimGpt>& centerPoints,
-                                        const ossimDpt& widthHeight,
-                                        bool enableFill = false,
-                                        unsigned char r = 255,
-                                        unsigned char g = 255,
-                                        unsigned char b = 255,
-                                        long thickness = 1);
-   ossimGeoAnnotationMultiEllipseObject(const ossimDpt& widthHeight,
-                                        bool enableFill = false,
-                                        unsigned char r = 255,
-                                        unsigned char g = 255,
-                                        unsigned char b = 255,
-                                        long thickness = 1);
-   ossimGeoAnnotationMultiEllipseObject(const ossimGeoAnnotationMultiEllipseObject& rhs);
-   
-   virtual ossimObject* dup()const;
-
-   virtual ossimAnnotationObject* getNewClippedObject(const ossimDrect& rect)const;
-
-   virtual void transform(ossimImageGeometry* projection);
-   
-   virtual void applyScale(double x, double y);
-
-   virtual void draw(ossimRgbImage& anImage)const;
-   virtual bool intersects(const ossimDrect& rect)const;
-   
-   virtual void addPoint(const ossimGpt& point);
-
-   virtual void setColor(unsigned char r,
-                         unsigned char g,
-                         unsigned char b);
-   virtual void setThickness(ossim_uint8 thickness);
-   
-   virtual void setPoint(int i, const ossimGpt& point);
-
-   virtual void setWidthHeight(const ossimDpt& widthHeight);
-   virtual void resize(ossim_uint32 newSize);
-
-   virtual void setFillFlag(bool fillFlag);
-   virtual std::ostream& print(std::ostream& out)const;
-   virtual void getBoundingRect(ossimDrect& rect)const;
-   virtual void computeBoundingRect();
-   
-protected:
-   ossimAnnotationMultiEllipseObject* theProjectedObject;
-   
-   std::vector<ossimGpt> thePointList;
-   ossimDpt              theWidthHeight;
-   bool                  theFillFlag;
-};
-
-#endif /* #ifndef ossimGeoAnnotationMultiEllipseObject_HEADER */
diff --git a/include/ossim/imaging/ossimGeoPolyCutter.h b/include/ossim/imaging/ossimGeoPolyCutter.h
deleted file mode 100644
index ce4012b..0000000
--- a/include/ossim/imaging/ossimGeoPolyCutter.h
+++ /dev/null
@@ -1,233 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author: Garrett Potts (gpotts at imagelinks)
-//
-//*************************************************************************
-// $Id: ossimGeoPolyCutter.h 19907 2011-08-05 19:55:46Z dburken $
-#ifndef ossimGeoPolyCutter_HEADER
-#define ossimGeoPolyCutter_HEADER
-#include <ossim/imaging/ossimPolyCutter.h>
-#include <ossim/base/ossimViewInterface.h>
-#include <ossim/base/ossimGeoPolygon.h>
-#include <vector>
-
-class ossimImageData;
-class ossimProjection;
-
-/*!
- * ossimGeoPolyCutter.
- *
- * This classes overrides the 2-d counter part ossimPolyCutter. It will automatically
- * map 2-D to 3-D (ground) polygons if you add 2-D polygons and will automatically
- * compute the forward transform when adding a ground polygon.
- *
- * you can set the view trough the ossimViewInterface by calling setView(object, true);
- * it will cast to an ossimProjection and use that as the transformation.  For igen this is
- * set automatically and does not need to be set by the user.
- *
- * This class has no keywords but does use 2 prefix values to store out the view
- * and the ground polygon for example if we have only one polygon then here is a sample
- * keyword list for the polygons: NOTE we can have any number of polygons just increment
- * the geo_polygon0 to geo_polygon1 .. geo_polygonN for the Nth one
- *
- * <pre>
- *
- * geo_polygon0.datum:  WGE
- * geo_polygon0.number_vertices:  18
- * geo_polygon0.type:  ossimGeoPolygon
- * geo_polygon0.v0:  38.023634368488452 -122.542245818545709 nan
- * geo_polygon0.v1:  38.016619667868909 -122.548990722987568 nan
- * geo_polygon0.v2:  38.018238444934966 -122.546292761210807 nan
- * geo_polygon0.v3:  38.012932453440698 -122.547911538276864 nan
- * geo_polygon0.v4:  38.014731094625191 -122.542065954427244 nan
- * geo_polygon0.v5:  38.007446597827986 -122.541796158249582 nan
- * geo_polygon0.v6:  38.009694899308606 -122.537569351466018 nan
- * geo_polygon0.v7:  38.005108364288141 -122.537119691169892 nan
- * geo_polygon0.v8:  38.008255986361007 -122.532353292030976 nan
- * geo_polygon0.v9:  38.003039926925965 -122.531274107320272 nan
- * geo_polygon0.v10:  38.013292181677599 -122.529565398195004 nan
- * geo_polygon0.v11:  38.009874763427050 -122.526867436418243 nan
- * geo_polygon0.v12:  38.019587425823332 -122.528306349365849 nan
- * geo_polygon0.v13:  38.023904164666128 -122.537299555288328 nan
- * geo_polygon0.v14:  38.024983349376825 -122.544584052085540 nan
- * geo_polygon0.v15:  38.023904164666128 -122.548720926809878 nan
- * geo_polygon0.v16:  38.022195455540853 -122.562210735693611 nan
- * geo_polygon0.v17:  38.019317629645663 -122.562930192167400 nan
- *
- *
- * the example for the view information is
- *
- * view.central_meridian:  -123.000000000000000
- * view.datum:  WGE
- * view.decimal_degrees_per_pixel_lat:  0.000089932059225
- * view.decimal_degrees_per_pixel_lon:  0.000089932059225
- * view.ellipse_code:  WE
- * view.ellipse_name:  WGS 84
- * view.false_easting:  0.000000000000000
- * view.false_northing:  0.000000000000000
- * view.major_axis:  6378137.000000000000000
- * view.meters_per_pixel_x:  10.000000000000000
- * view.meters_per_pixel_y:  10.000000000000000
- * view.minor_axis:  6356752.314199999906123
- * view.origin_latitude:  0.000000000000000
- * view.rotation:  0.000000000000000
- * view.scale_x:  1.000000000000000
- * view.scale_y:  1.000000000000000
- * view.tie_point_easting:  0.000000000000000
- * view.tie_point_lat:  0.000000000000000
- * view.tie_point_lon:  -123.000000000000000
- * view.tie_point_northing:  0.000000000000000
- * view.translation_x:  0.000000000000000
- * view.translation_y:  0.000000000000000
- * view.type:  ossimEquDistCylProjection
- *
- * </pre> 
- */
-class OSSIM_DLL ossimGeoPolyCutter : public ossimPolyCutter,
-                                     public ossimViewInterface
-{
-public:
-   ossimGeoPolyCutter();
-
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-   
-   /*!
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   /*!
-    * Sets the polygon to the specified polygon index.
-    * /param polygon A vector of points in projected 2-D.
-    * /param i index of the polygon to change.
-    */
-   virtual void setPolygon(const vector<ossimDpt>& polygon,
-                           ossim_uint32 i = 0);
-   
-   /*!
-    * Sets the polygon to the specified polygon index.
-    * /param polygon A vector of points in projected 2-D.
-    * /param i index of the polygon to change.
-    */
-   virtual void setPolygon(const vector<ossimIpt>& polygon,
-                           ossim_uint32 i = 0);
-
-   /*!
-    * Sets the polygon to the specified polygon index.
-    * /param polygon A Ground polygon.
-    * /param i index of the polygon to change.
-    */
-    virtual void setPolygon(const vector<ossimGpt>& polygon,
-                            ossim_uint32 i = 0);
-
-   virtual void setPolygon(const ossimGeoPolygon& polygon,
-                           ossim_uint32 i = 0);
-   /*!
-    * Will invert this polygon out to world space and add it to the
-    * polygon list
-    */
-   virtual void addPolygon(const vector<ossimIpt>& polygon);
-
-   /*!
-    * Will invert the passed in polygon to world space and add to the
-    * polygon list
-    */
-   virtual void addPolygon(const vector<ossimDpt>& polygon);
-
-   /*!
-    * Will add the ground polygon to the list
-    */
-   virtual void addPolygon(const vector<ossimGpt>& polygon);
-
-   /*!
-    * Will invert te polygon to ground and add.
-    */
-   virtual void addPolygon(const ossimPolygon& polygon);
-
-   /*!
-    * Will add the passed in polygon.
-    */
-   virtual void addPolygon(const ossimGeoPolygon& polygon);
-
-   /*!
-    * Will set the number of polygons and will call the base
-    * class set number of polygons.
-    */
-   virtual void setNumberOfPolygons(ossim_uint32 count)
-      {
-         if(!count)
-         {
-            theGeoPolygonList.clear();
-         }
-         else
-         {
-            theGeoPolygonList.resize(count);
-         }
-         ossimPolyCutter::setNumberOfPolygons(count);
-      }
-   /*!
-    * This should only be used for informational uses only.  If updates
-    * are to be made please go through the access methods that change
-    * the polygon data.
-    */
-   virtual std::vector<ossimGeoPolygon>& getGeoPolygonList()
-      {
-         return theGeoPolygonList;
-      }
-   virtual const std::vector<ossimGeoPolygon>& getGeoPolygonList()const
-      {
-         return theGeoPolygonList;
-      }
-
-   /*!
-    * Will set the view to the passed in object.  Once set it will project the
-    * ground polygon relative to the passed in view.
-    */
-   virtual bool setView(ossimObject* baseObject);
-
-   /*!
-    * \return The current view for this object.
-    */
-   virtual ossimObject* getView();
-   
-   /*!
-    * \return The constant pointer to the current view for this object.
-    */
-   virtual const ossimObject* getView()const;
-   
-protected:
-   virtual ~ossimGeoPolyCutter();
-   
-   /*!
-    * The view projection used to project the ground coordinates.
-    */
-   ossimRefPtr<ossimImageGeometry> theViewProjection;
-
-   std::vector<ossimGeoPolygon> theGeoPolygonList;
-
-   /*!
-    * Utility method used to invert any passed in projected polygons to
-    * be changed or added to the list.
-    * \param polygonNumber the index of the polygon to invert to ground.
-    */ 
-   void invertPolygon(int polygonNumber);
-
-   /*!
-    * Transforms all vertices based on the current theViewProjection.
-    */
-   void transformVertices();
-
-   /*!
-    * Transforms the specified polygon index.
-    * \param i The polygon index to project.
-    */
-   void transformVertices(int i);
-   
-TYPE_DATA  
-};
-#endif
diff --git a/include/ossim/imaging/ossimGeomFileWriter.h b/include/ossim/imaging/ossimGeomFileWriter.h
deleted file mode 100644
index 3b273e5..0000000
--- a/include/ossim/imaging/ossimGeomFileWriter.h
+++ /dev/null
@@ -1,57 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2003 Storage Area Networks, Inc.
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Kenneth Melero (kmelero at sanz.com)
-//
-//*******************************************************************
-//  $Id: ossimGeomFileWriter.h 15766 2009-10-20 12:37:09Z gpotts $
-
-#ifndef ossimGeomFileWriter_H
-#define ossimGeomFileWriter_H
-
-#include <ossim/imaging/ossimMetadataFileWriter.h>
-
-/** ossimGeomFileWriter */
-class OSSIMDLLEXPORT ossimGeomFileWriter : public ossimMetadataFileWriter
-{
-public:
-   /** default constructor */
-   ossimGeomFileWriter();
-
-
-   /**
-    * Satisfies pure virtual from ossimMetadataWriter base.
-    *
-    * Appends the writers image types to the "metadatatypeList".
-    * 
-    * @param metadatatypeList stl::vector<ossimString> list to append to.
-    *
-    * @note Appends to the list, does not clear it first.
-    */
-   virtual void getMetadatatypeList(
-      std::vector<ossimString>& metadatatypeList) const;
-
-   /**
-    * Satisfies pure virtual from ossimMetadataWriter base.
-    *
-    * @param imageType string representing image type.
-    *
-    * @return true if "metadataType" is supported by writer.
-    */
-   virtual bool hasMetadataType(const ossimString& metadataType)const;
-
-protected:
-   /** virtual destructor */
-   virtual ~ossimGeomFileWriter();
-
-   /** Write a geometry file to "theFilename". */
-   virtual bool writeFile();
-   
-TYPE_DATA
-};
-
-#endif /* End of #ifndef ossimGeomFileWriter_H */
diff --git a/include/ossim/imaging/ossimGridRemapEngine.h b/include/ossim/imaging/ossimGridRemapEngine.h
deleted file mode 100644
index a2d26c7..0000000
--- a/include/ossim/imaging/ossimGridRemapEngine.h
+++ /dev/null
@@ -1,70 +0,0 @@
-//*****************************************************************************
-// FILE: ossimGridRemapEngine.h
-//
-// Copyright (C) 2001 ImageLinks, Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Contains declaration of class 
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimGridRemapEngine.h 15766 2009-10-20 12:37:09Z gpotts $
-
-#ifndef ossimGridRemapEngine_HEADER
-#define ossimGridRemapEngine_HEADER
-
-#include <vector>
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimRefPtr.h>
-
-class ossimDpt;
-class ossimGridRemapSource;
-class ossimImageData;
-class ossimAtbPointSource;
-
-/*!****************************************************************************
- *
- * CLASS: ossimGridRemapEngine 
- *
- *****************************************************************************/
-class ossimGridRemapEngine : public ossimObject
-{
-public:
-   virtual ossimObject* dup() const = 0;
-   
-   virtual void remapTile(const ossimDpt&       origin_point,
-                          ossimGridRemapSource* remapper,
-                          ossimRefPtr<ossimImageData>& tile) = 0;
-
-   virtual void assignRemapValues(std::vector<ossimAtbPointSource*>& sources)=0;
-
-   virtual void computeSourceValue(ossimRefPtr<ossimImageData>& source,
-                                   void* result) = 0;
-
-   int  getNumberOfParams() const { return theNumberOfParams; }
-   
-   int  getNumberOfBands()  const { return theNumberOfBands; }
-   
-protected:
-   ossimGridRemapEngine(int numParams, int numBands)
-      : theNumberOfParams(numParams), theNumberOfBands(numBands) {}
-
-   ossimGridRemapEngine() {}
-   virtual ~ossimGridRemapEngine() {}
-
-   virtual void computeRemapNode(ossimAtbPointSource*  point_source,
-                                 void*                 source_value,
-                                 void*                 target_value) = 0;
-   int  theNumberOfParams;
-   int  theNumberOfBands;
-
-   TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimGridRemapEngineFactory.h b/include/ossim/imaging/ossimGridRemapEngineFactory.h
deleted file mode 100644
index f5cf9cf..0000000
--- a/include/ossim/imaging/ossimGridRemapEngineFactory.h
+++ /dev/null
@@ -1,37 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// AUTHOR: Oscar Kramer (okramer at imagelinks.com)
-//
-// DESCRIPTION: Contains declaration of class ossimGridRemapEngineFactory
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimGridRemapEngineFactory.h 9968 2006-11-29 14:01:53Z gpotts $
-
-#ifndef ossimGridRemapEngineFactory_HEADER
-#define ossimGridRemapEngineFactory_HEADER
-
-class ossimGridRemapEngine;
-
-/*!****************************************************************************
- *
- * CLASS:  ossimGridRemapEngineFactory (SIMPLETON)
- *
- *****************************************************************************/
-class ossimGridRemapEngineFactory
-{
-public:
-   /*!
-    * Attempts to create an instance of the Product given a Specifier. Returns
-    * successfully constructed product or NULL.
-    */
-   static ossimGridRemapEngine* create(const char* spec);
-   
-protected:
-   ossimGridRemapEngineFactory() {}
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimGridRemapSource.h b/include/ossim/imaging/ossimGridRemapSource.h
deleted file mode 100644
index b3eb061..0000000
--- a/include/ossim/imaging/ossimGridRemapSource.h
+++ /dev/null
@@ -1,144 +0,0 @@
-//*****************************************************************************
-// FILE: ossimGridRemapSource.h
-//
-// Copyright (C) 2001 ImageLinks, Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Contains declaration of class ossimGridRemapSource. This is
-//   a spacially variant remapper that utilizes a grid for interpolating the
-//   remap value given an image x, y. 
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimGridRemapSource.h 15766 2009-10-20 12:37:09Z gpotts $
-
-#ifndef ossimGridRemapSource_HEADER
-#define ossimGridRemapSource_HEADER
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-#include <vector>
-#include <ossim/imaging/ossimGridRemapEngine.h>
-#include <ossim/base/ossimFilename.h>
-
-class ossimDblGrid;
-class ossimDrect;
-class ossimDpt;
-class ossimImageData;
-
-/*!****************************************************************************
- *
- * CLASS:  ossimGridRemapSource
- *
- *****************************************************************************/
-class ossimGridRemapSource : public ossimImageSourceFilter
-{
-public:
-   /*!
-    * Constructors: 
-    */
-   ossimGridRemapSource();
-   ossimGridRemapSource(ossimImageSource* inputSource,
-                        ossimGridRemapEngine* engine);
-
-   /*!ossimAtbPointSource
-    * Initializes the remap engine. This object implements specific algorithms
-    * for interpreting the grids owned by this remapper. It actually performs
-    * the remapping.
-    */
-   void setRemapEngine(ossimGridRemapEngine* engine);
-   
-   /*!
-    * Provides access to the remap engine:
-    */
-   ossimGridRemapEngine* getRemapEngine() { return theRemapEngine; }
-   
-   /*!
-    * Permits initializing the remap grid after construction. 
-    */
-   virtual void initialize(const ossimDrect& uv_rect,
-			   const ossimDpt&   grid_spacing);
-
-  /*!
-   * Sets a node of the member grid to the value specified. The grid is flagged
-   * as unfilled.
-   */
-  void setGridNode(const ossimDpt& view_pt,
-		   const double*    value);
-  
-   /*!
-    * Implementation of virtual method to return remapped tile.
-    */
-   virtual ossimRefPtr<ossimImageData> getTile(const  ossimIrect& origin,
-                                   ossim_uint32 resLevel=0);
-
-   /*!
-    * Restore the state of the object from a keywordlist.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   /*!
-    * Save the state of the object to a keywordlist.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-   /*!
-    * Locks the image to prevent grid adjustment. The remapper continues to
-    * remap given the current grid (if enabled), but all target values computed
-    * are such that no change in the grids will occur in an adjsutment. If more
-    * than one overlapping image is locked, the target will may be influenced
-    * by all locked images, but the remap grids will not be updated.
-    */
-   void lock() { theRemapIsLockedFlag = true; }
-
-   /*!
-    * Unlocks the grids for adjustment.
-    */
-   void unlock() { theRemapIsLockedFlag = false; }
-   
-   /*!
-    * Returns the status of the lock flag.
-    */
-   bool isLocked() const { return theRemapIsLockedFlag; }
-
-   /*!
-    * Provides access to individual grids (pointer) given an index. Null pointer
-    * returned if index out of range.
-    */
-   ossimDblGrid* getGrid(unsigned int index);
-
-   /*!
-    * Returns grid filename (may be empty)
-    */
-   const ossimFilename& getGridFilename() const { return theGridFilename; }
-
-   /*!
-    * Sets the grid filename and initiates read.
-    */
-   void setGridFilename(const ossimFilename& grid_filename);
-   
-protected:
-   virtual ~ossimGridRemapSource();
-
-   /*!
-    * Deallocates grid memory.
-    */
-   void deallocateGrids();
-   
-   vector<ossimDblGrid*> theGrids;
-   ossimFilename         theGridFilename;
-   ossimGridRemapEngine* theRemapEngine;
-   bool                  theRemapIsLockedFlag;
-   bool                  theGridIsFilled;
-   
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimHistoMatchRemapper.h b/include/ossim/imaging/ossimHistoMatchRemapper.h
deleted file mode 100644
index 707e092..0000000
--- a/include/ossim/imaging/ossimHistoMatchRemapper.h
+++ /dev/null
@@ -1,96 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimHistoMatchRemapper.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimHistoMatchRemapper_HEADER
-#define ossimHistoMatchRemapper_HEADER
-#include <vector>
-using namespace std;
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-class ossimHistoMatchRemapper: public ossimImageSourceFilter
-{
-public:
-   ossimHistoMatchRemapper();
-   ossimHistoMatchRemapper(ossimImageSource* inputSource,
-                           const vector<double>& targetMeanPerBand  = vector<double>(),
-                           const vector<double>& targetSigmaPerBand = vector<double>(),
-                           const vector<double>& inputMeanPerBand   = vector<double>(),
-                           const vector<double>& inputSigmaPerBand  = vector<double>()
-                           );
-
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-   virtual void initialize();
-   
-   const vector<double>& getInputMeanValues()const;
-   const vector<double>& getInputSigmaValues()const;
-   const vector<double>& getTargetMeanValues()const;
-   const vector<double>& getTargetSigmaValues()const;
-
-   void setInputMeanValues(const vector<double>& newValues);
-   void setInputSigmaValues(const vector<double>& newValues);
-   void setTargetMeanValues(const vector<double>& newValues);
-   void setTargetSigmaValues(const vector<double>& newValues);
-   
-
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=NULL);
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=NULL);
-
-protected:
-   virtual ~ossimHistoMatchRemapper();
-   
-   ossimRefPtr<ossimImageData> theBlankTile;
-   
-   vector<double> theTargetMeanPerBand;
-   vector<double> theTargetSigmaPerBand;
-   vector<double> theInputMeanPerBand;
-   vector<double> theInputSigmaPerBand;
-
-   /**
-    * transLean
-    * @param vIn input value to be transformed
-    * @param vBias bias value to be removed
-    * @param vTarget value that will replace bias
-    * @param vMin minimum valid value of vIn (inclusive)
-    * @param vMax maximum valid value of vIn (inclusive)
-    * @return vOut
-    */
-   double transLean(double vIn,
-                    double vBias,
-                    double vTarget,
-                    double vMin,
-                    double vMax);
-
-   /**
-    * transLeanStretch
-    * @param vin Input value to be transformed.
-    * @param vBias Bias value to be removed.
-    * @param vBiasStretch dispersion (+/-) about vBias
-    * @param vTarget value that will replace bias
-    * @param vTargetStretch dispersion (+/-) about vTarget
-    * @param vMin minimum valid value of vIn (inclusive)
-    * @param vMax maximum valid value of vIn (inclusive)
-    * @return vOut
-    */
-   double transLeanStretch(double vIn,
-                           double vBias,
-                           double vBiasStretch,
-                           double vTarget,
-                           double vTargetStretch,
-                           double vMin,
-                           double vMax);
-   
-};
-
-#endif /* #ifndef ossimHistoMatchRemapper_HEADER */
diff --git a/include/ossim/imaging/ossimHistogramEqualization.h b/include/ossim/imaging/ossimHistogramEqualization.h
deleted file mode 100644
index cee88f8..0000000
--- a/include/ossim/imaging/ossimHistogramEqualization.h
+++ /dev/null
@@ -1,99 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimHistogramEqualization.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimHistogramEqualization_HEADER
-#define ossimHistogramEqualization_HEADER
-#include <ossim/imaging/ossimImageSourceHistogramFilter.h>
-
-class OSSIMDLLEXPORT ossimHistogramEqualization : public ossimImageSourceHistogramFilter
-{
-public:
-   ossimHistogramEqualization();
-   ossimHistogramEqualization(ossimImageSource* inputSource,
-                              ossimRefPtr<ossimMultiResLevelHistogram> histogram);
-   ossimHistogramEqualization(ossimImageSource* inputSource,
-                              ossimRefPtr<ossimMultiResLevelHistogram> histogram,
-                              bool inverseFlag);
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-
-   virtual void setHistogram(ossimRefPtr<ossimMultiResLevelHistogram> histogram);
-   virtual bool setHistogram(const ossimFilename& filename);
-
-   virtual bool getInverseFlag()const;
-   virtual void initialize();
-   virtual void setInverseFlag(bool inverseFlag);
-   
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=NULL);
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=NULL)const;
-
-   virtual std::ostream& print(std::ostream& out) const;
-
-protected:
-   virtual ~ossimHistogramEqualization();
-
-   /**
-    * Called on first getTile, will initialize all data needed.
-    */
-   void allocate();
-   
-  ossimRefPtr<ossimImageData> theTile;
-   /*!
-    * This will be used in some of the histogram
-    * based operations.
-    */
-   ossimRefPtr<ossimMultiResLevelHistogram> theAccumulationHistogram;
-
-   /*!
-    * Indicates if you should equalize or unequalize an input stream.
-    * If the inverse flag is true then it will indicate that we should
-    * assume that the input stream is already equalized and we should
-    * invert based on the current accumulation histogram.
-    *
-    *
-    * This flag is defaulted to false.
-    */
-   bool                         theInverseFlag;
-   /*!
-    * We will create a LUT for each band that directly maps
-    * an input value to an equalized output.
-    */
-   vector<double*> theForwardLut;
-   
-   /*!
-    * We will create a LUT for each band that directly maps
-    * an input value to an un-equalized output.
-    */
-   vector<double*> theInverseLut;
-
-   
-  std::vector<ossim_uint32> theBandList;
-   virtual void computeAccumulationHistogram();
-
-  template<class T>
-  ossimRefPtr<ossimImageData> runEqualizationAlgorithm(T dummyVariable,
-                                                       ossimRefPtr<ossimImageData> tile);
-
-   /*!
-    * We will pre-compute the luts for the forward and inverse
-    * equalization.  Note: the inverse is a little more tricky
-    * and since we must fill the empty spots missed by the
-    * inverse.  We use a linear interpolation between valid
-    * values for this.
-    */
-   virtual void initializeLuts();
-   virtual void deleteLuts();
-
-TYPE_DATA
-};
-#endif /* #ifndef ossimHistogramEqualization_HEADER */
diff --git a/include/ossim/imaging/ossimHistogramRemapper.h b/include/ossim/imaging/ossimHistogramRemapper.h
deleted file mode 100644
index bcedbee..0000000
--- a/include/ossim/imaging/ossimHistogramRemapper.h
+++ /dev/null
@@ -1,571 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Histogram remapper class declaration.  Derived from ossimTableRemapper.
-//
-// Remaps a tile based on mode and histogram clip points.  This object uses
-// a precomputed remap table for speed; hence, derived from the
-// ossimTableRemapper
-//
-// NOTE on bands:
-// 
-// - All methods take zero based bands.  In other words the first
-//   band is band "0".  
-//
-// - This objects band 0 is the same band 0 as it's input connection.  If
-//   the band order was changed by a ossimBandSelector then this band 0 will
-//   not map to the histogram files band 0.  To handle this,
-//   the "getOutputBandList()" method is used to get the correct histogram for
-//   the input band.
-//   
-// - The "get" methods that do not take a band, simply return the average of
-//   all bands.  This really only makes sense if all bands are the same
-//   but is provided for convenience.
-//   
-//*************************************************************************
-// $Id: ossimHistogramRemapper.h 21787 2012-09-30 21:27:09Z gpotts $
-#ifndef ossimHistogramRemapper_HEADER
-#define ossimHistogramRemapper_HEADER
-
-#include <ossim/imaging/ossimTableRemapper.h>
-#include <ossim/base/ossimMultiResLevelHistogram.h>
-
-
-class OSSIMDLLEXPORT ossimHistogramRemapper : public ossimTableRemapper
-{
-public:
-   enum StretchMode
-   {
-      LINEAR_ONE_PIECE      = 0,
-      LINEAR_1STD_FROM_MEAN = 1,
-      LINEAR_2STD_FROM_MEAN = 2,
-      LINEAR_3STD_FROM_MEAN = 3,
-      LINEAR_AUTO_MIN_MAX   = 4,
-      STRETCH_UNKNOWN = 5 // Alway last as used for number of modes method.
-   };
-
-   /** default constructor */
-   ossimHistogramRemapper();
-
-
-   virtual ossimString getLongName()  const;
-   virtual ossimString getShortName() const;
-
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect,
-                                               ossim_uint32 resLevel=0);
-
-   virtual void initialize();
-   /**
-    * - Disables this source.
-    * - Sets all clip points to default.
-    * - Removes current table.
-    */
-   void reset();
-   
-   /**
-    * Sets remap mode to mode.  If rebuildTableFlag is true, the table will
-    * be built at this time; else just the dirty flag is set.
-    *
-    * @param mode The stretch mode.
-    * 
-    * @param rebuildTableFlag If the true the table will be rebuilt; else,
-    * just the dirty flag will be set.
-    */
-   void setStretchMode(StretchMode mode, bool rebuildTableFlag=false);
-
-   /**
-    * Stretch mode values can be linear_one_piece, linear_1std_from_mean,
-    * linear_2std_from_mean, linear_3std_from_mean, linear_auto_min_max,
-    * If rebuildTableFlag is true, the table will
-    * be built at this time; else just the dirty flag is set.
-    *
-    * @param mode The stretch mode.
-    * 
-    * @param rebuildTableFlag If the true the table will be rebuilt; else,
-    * just the dirty flag will be set.
-    */
-   void setStretchModeAsString(const ossimString& mode,
-                               bool rebuildTableFlag=false);
-   
-   /**
-    * Returns the current enumerated node.
-    */
-   StretchMode   getStretchMode() const;
-
-   /**
-    * Returns the string for current remap mode.
-    */
-   ossimString getStretchModeString() const;
-
-   /**
-    * Returns the number of stretch modes.
-    */
-   ossim_uint32 getNumberOfStretchModes() const;
-
-   /**
-    * Returns the mode string for a given index.
-    * Returns "stretch_unknown" if index is out of range.
-    * 
-    * NOTE:
-    * - If you're building gui buttons you can:
-    *   // pseudo code...
-    *   ossim_uint32 number_of_modes = remapper->getNumberOfModes()
-    *   for (ossim_uint32 i = 0; i < number_of_modes; ++i)
-    *   {
-    *      addButton(getModeString(i).c_str());
-    *   }
-    */
-   ossimString getStretchModeString(ossim_uint32 index) const;
-   
-   /**
-    * Sets the low clip point.
-    *
-    * Note on null bin:
-    * - The null bin is ignored when considering a percent of penetration from
-    *   the low end.
-    *
-    * Notes on clip point:
-    * - If input chip source is mutiband this will set all band to same
-    *   percentage of clip.
-    * - Clip points should be normalized between zero and one.
-    * - A low clip point of 0.0 means no penetration.
-    * - A low clip point of 0.02 means penetrate in two percent.
-    */
-   void setLowNormalizedClipPoint(const ossim_float64& clip);
-
-   /**
-    * Sets the low clip point for band.
-    *
-    * Note on null bin:
-    * - The null bin is ignored when considering a percent of penetration from
-    *   the low end.
-    *
-    * Notes on clip points:
-    * - Clip point should be normalized between zero and one.
-    * - A low clip point of 0.0 means no penetration.
-    * - A low clip point of 0.02 means penetrate in two percent.
-    */
-   void setLowNormalizedClipPoint(const ossim_float64& clip,
-                                  ossim_uint32 zero_based_band);
-
-   /**
-    * Sets the high clip point.
-    * 
-    * Notes on clip points:
-    * - If input chip source is mutiband this will set all band to same
-    *   percentage of clip.
-    * - Clip point should be normalized between zero and one.
-    * - A high clip point of 1.0 means no penetration.
-    * - A high clip point of .98 mean a 2 % penetration from the high end.
-    */
-   void setHighNormalizedClipPoint(const ossim_float64& clip);
-
-   /**
-    * Sets the high clip point.
-    *
-    * Notes on clip points:
-    * - Clip point should be normalized between zero and one.
-    * - A high clip point of 1.0 means no penetration.
-    * - A high clip point of .98 mean a 2 % penetration from the high end.
-    */
-   void setHighNormalizedClipPoint(const ossim_float64& clip,
-                                   ossim_uint32 zero_based_band);
-
-   /**
-    * Sets the low clip point.
-    *
-    * Notes on clip point:
-    * - If input chip source is mutiband this will set all band to same
-    *   percentage of clip.
-    * - Clip points are in DN values.
-    * - If histogram is not set no action is taken. 
-    */
-   void setLowClipPoint(const ossim_float64& clip);
-
-   /**
-    * Sets the low clip point for band.
-    *
-    * Notes on clip points:
-    * - Clip points are DN values.
-    * - If histogram is not set no action is taken. 
-    */
-   void setLowClipPoint(const ossim_float64& clip,
-                        ossim_uint32 zero_based_band);
-
-   /**
-    * Sets the high clip point.
-    * 
-    * Notes on clip points:
-    * - If input chip source is mutiband this will set all band to same
-    *   percentage of clip.
-    * - Clip points are DN values.
-    * - If histogram is not set no action is taken. 
-    */
-   void setHighClipPoint(const ossim_float64& clip);
-
-   /**
-    * Sets the high clip point.
-    *
-    * Notes on clip points:
-    * - Clip points are DN values.
-    * - If histogram is not set no action is taken. 
-    */
-   void setHighClipPoint(const ossim_float64& clip,
-                         ossim_uint32 zero_based_band);
-
-   /**
-    * Sets the mid clip point.
-    * 
-    * Notes on clip points:
-    * - If input chip source is mutiband this will set all band to same
-    *   percentage of clip.
-    */
-   void setMidPoint(const ossim_float64& value);
-
-   /**
-    * Sets the mid clip point for band.
-    */
-   void setMidPoint(const ossim_float64& value,
-                    ossim_uint32 zero_based_band);
-
-   /**
-    * Sets the min output value.
-    * 
-    * Notes on clip points:
-    * - If input chip source is mutiband this will set all band to same
-    *   percentage of clip.
-    */
-   void setMinOutputValue(const ossim_float64& value);
-
-   /**
-    * Sets the min output value for band.
-    */
-   void setMinOutputValue(const ossim_float64& value,
-                          ossim_uint32 zero_based_band);
-
-   /**
-    * Sets the max output value.
-    * 
-    * Notes on clip points:
-    * - If input chip source is mutiband this will set all band to same
-    *   percentage of clip.
-    */
-   void setMaxOutputValue(const ossim_float64& value);
-
-   /**
-    * Sets the min output value for band.
-    */
-   void setMaxOutputValue(const ossim_float64& value,
-                          ossim_uint32 zero_based_band);
-   
-   /**
-    * Returns the normalized low clip point for band.
-    * Will return OSSIM_DBL_NAN if:
-    * - Band is out of range.
-    * - Connection is not complete.
-    * - Histogram has not been set.
-    */
-   ossim_float64 getLowNormalizedClipPoint(ossim_uint32 zero_based_band) const;
-
-   /**
-    * Returns the normalized low clip point which is the average of all bands.
-    * 
-    * Will return OSSIM_DBL_NAN if:
-    * - Band is out of range.
-    * - Connection is not complete.
-    * - Histogram has not been set.
-    */
-   ossim_float64 getLowNormalizedClipPoint() const;
-
-   /**
-    * Returns the normalized high clip point for band.
-    *
-    * Will return OSSIM_DBL_NAN if:
-    * - Band is out of range.
-    * - Connection is not complete.
-    * - Histogram has not been set.
-    */
-   ossim_float64 getHighNormalizedClipPoint(ossim_uint32 zero_based_band) const;
-   /**
-    * Returns the normalized High clip point which is the average of all bands.
-    * 
-    * Will return OSSIM_DBL_NAN if:
-    * - Band is out of range.
-    * - Connection is not complete.
-    * - Histogram has not been set.
-    */
-   ossim_float64 getHighNormalizedClipPoint() const;
-
-   /**
-    * Returns the low clip point for band.
-    * Clip points are DN values relative to the scalar type.
-    *
-    * Will return OSSIM_DBL_NAN if:
-    * - Band is out of range.
-    * - Connection is not complete.
-    * - Histogram has not been set.
-    */
-   ossim_float64 getLowClipPoint(ossim_uint32 zero_based_band) const;
-
-   /**
-    * Returns the low clip point which is the average of all bands.
-    * 
-    * Will return OSSIM_DBL_NAN if:
-    * - Band is out of range.
-    * - Connection is not complete.
-    * - Histogram has not been set.
-    */
-   ossim_float64 getLowClipPoint() const;
-
-   /**
-    * Returns the high clip point for band.
-    * Clip points are DN values relative to the scalar type.
-    *
-    * Will return OSSIM_DBL_NAN if:
-    * - Band is out of range.
-    * - Connection is not complete.
-    * - Histogram has not been set.
-    */
-   ossim_float64 getHighClipPoint(ossim_uint32 zero_based_band) const;
-
-   /**
-    * Returns the high clip point which is the average of all bands.
-    * 
-    * Will return OSSIM_DBL_NAN if:
-    * - Band is out of range.
-    * - Connection is not complete.
-    * - Histogram has not been set.
-    */
-   ossim_float64 getHighClipPoint() const;
-
-   
-   /**
-    * Returns the mid point for band
-    * 
-    * Will return OSSIM_DBL_NAN if:
-    * - Band is out of range.
-    * - Connection is not complete.
-    * - Histogram has not been set.
-    */
-   ossim_float64 getMidPoint(ossim_uint32 zero_based_band) const;
-   
-   /**
-    * Returns the mid clip point which is the average of all bands.
-    * 
-    * Will return OSSIM_DBL_NAN if:
-    * - Band is out of range.
-    * - Connection is not complete.
-    * - Histogram has not been set.
-    */
-   ossim_float64 getMidPoint() const;
-   
-   /**
-    * Returns the minimum output value for band.
-    * 
-    * Will return OSSIM_DBL_NAN if:
-    * - Band is out of range.
-    * - Connection is not complete.
-    */
-   ossim_float64 getMinOutputValue(ossim_uint32 zero_based_band) const;
-
-   /**
-    * Returns the minimum output value which is the average of all bands.
-    * 
-    * Will return OSSIM_DBL_NAN if:
-    * - Band is out of range.
-    * - Connection is not complete.
-    */
-   ossim_float64 getMinOutputValue() const;
-
-   /**
-    * Returns the maximum output value for band.
-    * 
-    * Will return OSSIM_DBL_NAN if:
-    * - Band is out of range.
-    * - Connection is not complete.
-    */
-   ossim_float64 getMaxOutputValue(ossim_uint32 zero_based_band) const;
-
-   /**
-    * Returns the maximum output value which is the average of all bands.
-    * 
-    * Will return OSSIM_DBL_NAN if:
-    * - Band is out of range.
-    * - Connection is not complete.
-    */
-   ossim_float64 getMaxOutputValue() const;
-   
-   /**
-    * Sets the histogram.
-    * If (own_histogram == true) this object will delete theHistogram
-    * on destruction.
-    */
-   void setHistogram(ossimRefPtr<ossimMultiResLevelHistogram> histogram);
-   
-   ossimRefPtr<ossimMultiResLevelHistogram> getHistogram();
-   ossimRefPtr<const ossimMultiResLevelHistogram> getHistogram()const;
-   
-   
-   /**
-    * Returns pointer to histogram for band and reduced res level.
-    * - Band is zero based relative to the input connection.  This will be
-    *   remapped to the histogram band using the "getOutputBandList()" to
-    *   get the correct histogram band.
-    *   
-    * Will return NULL if:
-    * - band is out range
-    * - res_level is out of range
-    * - theHistogram has not been initialized yet.
-    */
-   ossimRefPtr<ossimHistogram> getHistogram(ossim_uint32 zero_based_band,
-                                ossim_uint32 res_level=0) const;
-
-   /**
-    * Open the histogram file.
-    * With this method the histogram is owned by this object.
-    * Returns true on success, false on error.
-    */
-   bool openHistogram(const ossimFilename& histogram_file);
-
-   /**
-    * Returns the currently opened histogram.
-    * Returns ossimFilename::NIL if no histogram is loaded.
-    */
-   ossimFilename getHistogramFile() const;
-   
-   /**
-    * Method to the save the state to a keyword list.
-    * Returns true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-   void buildTable();
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.
-    * Returns true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-   
-   virtual ostream& print(ostream& os) const;
-
-   friend ostream& operator <<(ostream& os, const ossimHistogramRemapper& hr);
-   /**
-    * Returns the min pixel of the band.
-    */
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   
-   /**
-    * Returns the max pixel of the band.
-    */
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-
-   /**
-    * Will test for the input being a ossimHistogramSource and allow pulling the histogram
-    * from a histogram source.
-    */
-   bool canConnectMyInputTo(ossim_int32 inputIndex,
-                            const ossimConnectableObject* object)const;
-
-
-protected:
-   /** virtual destructor */
-   virtual ~ossimHistogramRemapper();
-
-private:
-   // Do not allow copy constructor, operator=.
-   ossimHistogramRemapper(const ossimHistogramRemapper& hr);
-   ossimHistogramRemapper& operator=(const ossimHistogramRemapper& hr);
-
-   void buildLinearTable();
-   void buildAutoLinearMinMaxTable();
-   template <class T> void buildLinearTable(T dummy);
-   template <class T> void buildAutoLinearMinMaxTableTemplate(T dummy);
-
-   /**
-    * Sets clip points using mean and standard deviations then calls
-    * buildLinearTable method.
-    */
-   void buildLinearTableStdFromMean();
-   
-   /**
-    * Uses getNumberOfInputBands() to determine BANDS then calls
-    * initializeClips(BANDS)
-    */
-   void initializeClips();
-
-   /**
-    * Initializes data members to some default state and size.
-    */
-   void initializeClips(ossim_uint32 bands);
-
-   /*
-    * Sets the count of the null bin to 0 so that clips from the low end
-    * ignore the null bin.
-    */
-   void setNullCount();
-
-   void initializeMinMaxOutput();
-   
-   /**
-    * Initialized base class (ossimTableRemapper) values:
-    * - theTableBinCount
-    * - theTableBandCount
-    * - theTableType
-    * - theTable (resizes if not correct size.
-    */
-   void setupTable();
-
-   /**
-    * This set theBypassFlag.  This is an internally used flag to signal that
-    * there is nothing to do in this filter; hence, bypass.
-    */
-   void verifyEnabled();
-
-   /**
-    * Returns the histogram band that maps to the input band.
-    * Note:
-    * - This uses the current band list from "getOutputBandList()".
-    */
-   ossim_uint32 getHistogramBand(ossim_uint32 input_band) const;
-
-   /**
-    * Sets theBypassFlag.  If the start changes from bypassed to not bypassed
-    * this will set theDirtyFlag to true.
-    */
-   void setBypassFlag(bool flag);
-
-   /**
-   * If we are dirty then it will init what it needs and then set
-   * the dirty back to false;
-   */
-   void makeClean();
-
-   StretchMode                   theStretchMode;
-   bool                          theDirtyFlag;
-   mutable ossimRefPtr<ossimMultiResLevelHistogram>  theHistogram;
-   vector<ossim_float64>         theNormalizedLowClipPoint;
-   vector<ossim_float64>         theNormalizedHighClipPoint;
-   vector<ossim_float64>         theMidPoint;
-   vector<ossim_float64>         theMinOutputValue;
-   vector<ossim_float64>         theMaxOutputValue;
-
-   // Maps zero based band to histogram band.
-   vector<ossim_uint32>          theBandList;
-
-   // Internally bypassed flag.
-   bool theBypassFlag;
-   bool theResetBandIndicesFlag;
-
-   TYPE_DATA
-};
-
-#endif  /* #ifndef ossimHistogramRemapper_HEADER */
diff --git a/include/ossim/imaging/ossimHistogramThreshholdFilter.h b/include/ossim/imaging/ossimHistogramThreshholdFilter.h
deleted file mode 100644
index 9d8121e..0000000
--- a/include/ossim/imaging/ossimHistogramThreshholdFilter.h
+++ /dev/null
@@ -1,51 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimHistogramThreshholdFilter.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimHistogramThreshholdFilter_HEADER
-#define ossimHistogramThreshholdFilter_HEADER
-#include <ossim/imaging/ossimImageSourceHistogramFilter.h>
-
-class ossimHistogramThreshholdFilter : public ossimImageSourceHistogramFilter
-{
-public:
-   ossimHistogramThreshholdFilter();
-   ossimHistogramThreshholdFilter(double minValuePercent,
-                                  double maxValuePercent,
-                                  ossimImageSource* inputSource,
-                                  ossimMultiResLevelHistogram* histogram);
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-   
-   virtual void setMinValuePercent(double minValue);
-   virtual void setMaxValuePercent(double maxValue);
-   
-   virtual double getMinValuePercent()const;
-   virtual double getMaxValuePercent()const;
-
-   virtual void initialize();
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-   
-protected:
-   virtual ~ossimHistogramThreshholdFilter();
-   
-   double theMinValuePercent;
-   double theMaxValuePercent;
-   template <class T>
-   ossimRefPtr<ossimImageData> runThreshholdStretchAlgorithm(
-      T dummyVariable,
-      ossimRefPtr<ossimImageData>& tile);
-   
-TYPE_DATA
-};
-#endif
diff --git a/include/ossim/imaging/ossimHsiRemapper.h b/include/ossim/imaging/ossimHsiRemapper.h
deleted file mode 100644
index 172fcfd..0000000
--- a/include/ossim/imaging/ossimHsiRemapper.h
+++ /dev/null
@@ -1,256 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2002 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Remapper to adjust hue, saturation and intensity.
-//
-//*************************************************************************
-// $Id: ossimHsiRemapper.h 19689 2011-05-31 15:55:21Z gpotts $
-
-#ifndef ossimHsiRemapper_HEADER
-#define ossimHsiRemapper_HEADER
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-class OSSIMDLLEXPORT ossimHsiRemapper : public ossimImageSourceFilter
-{
-public:
-   enum
-   {
-      RED      = 0,
-      YELLOW   = 1,
-      GREEN    = 2,
-      CYAN     = 3,      
-      BLUE     = 4,
-      MAGENTA  = 5,
-      ALL      = 6
-   };
-   
-   ossimHsiRemapper();
-
-   virtual ossimString getLongName()  const;
-   virtual ossimString getShortName() const;
-
-   virtual void initialize();
-   /*---------------------- PROPERTY INTERFACE ---------------------------*/
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   /*---------------------- END PROPERTY INTERFACE ---------------------------*/
-   
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect,
-                                   ossim_uint32 resLevel=0);
-
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-   
-   /*!
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-   
-   ossim_uint32 getNumberOfOutputBands() const;
-
-   virtual ostream& print(ostream& os) const;
-
-   friend ostream& operator << (ostream& os,  const ossimHsiRemapper& hr);
-   
-   void setHueOffset               (int color_group, double offset);
-   void setHueLowRange             (int color_group, double range);
-   void setHueHighRange            (int color_group, double range);
-   void setHueBlendRange           (int color_group, double range);
-   void setSaturationOffset        (int color_group, double offset);
-   void setIntensityOffset         (int color_group, double offset);
-   
-   void setMasterHueOffset         (double offset);
-   void setMasterSaturationOffset  (double offset);
-   void setMasterIntensityOffset   (double offset);
-   void setMasterIntensityLowClip  (double clip);
-   void setMasterIntensityHighClip (double clip);
-
-   void setRedHueOffset            (double offset);
-   void setRedHueLowRange          (double range);
-   void setRedHueHighRange         (double range);
-   void setRedHueBlendRange        (double range);
-   void setRedSaturationOffset     (double offset);
-   void setRedIntensityOffset      (double offset);
-
-   void setYellowHueOffset         (double offset);
-   void setYellowHueLowRange       (double range);
-   void setYellowHueHighRange      (double range);
-   void setYellowHueBlendRange     (double range);
-   void setYellowSaturationOffset  (double offset);
-   void setYellowIntensityOffset   (double offset);
-
-   void setGreenHueOffset          (double offset);
-   void setGreenHueLowRange        (double range);
-   void setGreenHueHighRange       (double range);
-   void setGreenHueBlendRange      (double range);
-   void setGreenSaturationOffset   (double offset);
-   void setGreenIntensityOffset    (double offset);
-
-   void setCyanHueOffset           (double offset);
-   void setCyanHueLowRange         (double range);
-   void setCyanHueHighRange        (double range);
-   void setCyanHueBlendRange       (double range);
-   void setCyanSaturationOffset    (double offset);
-   void setCyanIntensityOffset     (double offset);
-
-   void setBlueHueOffset           (double offset);
-   void setBlueHueLowRange         (double range);
-   void setBlueHueHighRange        (double range);
-   void setBlueHueBlendRange       (double range);
-   void setBlueSaturationOffset    (double offset);
-   void setBlueIntensityOffset     (double offset);
-
-   void setMagentaHueOffset        (double offset);
-   void setMagentaHueLowRange      (double range);
-   void setMagentaHueHighRange     (double range);
-   void setMagentaHueBlendRange    (double range);
-   void setMagentaSaturationOffset (double offset);
-   void setMagentaIntensityOffset  (double offset);
-
-   double getHueOffset             (int color_group) const;
-   double getHueLowRange           (int color_group) const;
-   double getHueHighRange          (int color_group) const;
-   double getHueBlendRange         (int color_group) const;
-   double getSaturationOffset      (int color_group) const;
-   double getIntensityOffset       (int color_group) const;
-   
-   double getMasterHueOffset          () const;
-   double getMasterSaturationOffset   () const;
-   double getMasterIntensityOffset    () const;
-   double getMasterIntensityLowClip   () const;
-   double getMasterIntensityHighClip  () const;
-   
-   double getRedHueOffset             () const;
-   double getRedHueLowRange           () const;
-   double getRedHueHighRange          () const;
-   double getRedHueBlendRange         () const;
-   double getRedSaturationOffset      () const;
-   double getRedIntensityOffset       () const;
-
-   double getYellowHueOffset          () const;
-   double getYellowHueLowRange        () const;
-   double getYellowHueHighRange       () const;
-   double getYellowHueBlendRange      () const;
-   double getYellowSaturationOffset   () const;
-   double getYellowIntensityOffset    () const;
-
-   double getGreenHueOffset           () const;
-   double getGreenHueLowRange         () const;
-   double getGreenHueHighRange        () const;
-   double getGreenHueBlendRange       () const;
-   double getGreenSaturationOffset    () const;
-   double getGreenIntensityOffset     () const;
-
-   double getCyanHueOffset            () const;
-   double getCyanHueLowRange          () const;
-   double getCyanHueHighRange         () const;
-   double getCyanHueBlendRange        () const;
-   double getCyanSaturationOffset     () const;
-   double getCyanIntensityOffset      () const;
-
-   double getBlueHueOffset            () const;
-   double getBlueHueLowRange          () const;
-   double getBlueHueHighRange         () const;
-   double getBlueHueBlendRange        () const;
-   double getBlueSaturationOffset     () const;
-   double getBlueIntensityOffset      () const;
-
-   double getMagentaHueOffset         () const;
-   double getMagentaHueLowRange       () const;
-   double getMagentaHueHighRange      () const;
-   double getMagentaHueBlendRange     () const;
-   double getMagentaSaturationOffset  () const;
-   double getMagentaIntensityOffset   () const;
-
-   void   setWhiteObjectClip          (double clip);
-   double getWhiteObjectClip          () const;
-   void   resetWhiteObjectClip        ();
-
-   void resetGroup(int color_group);
-   void resetAll();
-   void resetMaster();
-   void resetRed();
-   void resetYellow();
-   void resetGreen();
-   void resetCyan();
-   void resetBlue();
-   void resetMagenta();
-   
-protected:
-   virtual ~ossimHsiRemapper();
-   void   allocate(const ossimIrect& rect);
-   void   verifyEnabled();
-   double calculateMinNormValue();
-
-   bool theValidFlag;
-   ossimRefPtr<ossimImageData> theTile;
-   double*                     theBuffer;
-   double                      theNormalizedMinPix;
-
-   double theMasterHueOffset;
-   double theMasterSaturationOffset;
-   double theMasterIntensityOffset;
-   double theMasterIntensityLowClip;
-   double theMasterIntensityHighClip;
-
-   double theRedHueOffset;
-   double theRedHueLowRange;
-   double theRedHueHighRange;
-   double theRedHueBlendRange;
-   double theRedSaturationOffset;
-   double theRedIntensityOffset;
-
-   double theYellowHueOffset;
-   double theYellowHueLowRange;
-   double theYellowHueHighRange;
-   double theYellowHueBlendRange;
-   double theYellowSaturationOffset;
-   double theYellowIntensityOffset;
-
-   double theGreenHueOffset;
-   double theGreenHueLowRange;
-   double theGreenHueHighRange;
-   double theGreenHueBlendRange;
-   double theGreenSaturationOffset;
-   double theGreenIntensityOffset;
-
-   double theCyanHueOffset;
-   double theCyanHueLowRange;
-   double theCyanHueHighRange;
-   double theCyanHueBlendRange;
-   double theCyanSaturationOffset;
-   double theCyanIntensityOffset;
-
-   double theBlueHueOffset;
-   double theBlueHueLowRange;
-   double theBlueHueHighRange;
-   double theBlueHueBlendRange;
-   double theBlueSaturationOffset;
-   double theBlueIntensityOffset;
-
-   double theMagentaHueOffset;
-   double theMagentaHueLowRange;
-   double theMagentaHueHighRange;
-   double theMagentaHueBlendRange;
-   double theMagentaSaturationOffset;
-   double theMagentaIntensityOffset;
-
-   double theWhiteObjectClip;
-
-   TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimHsiToRgbSource.h b/include/ossim/imaging/ossimHsiToRgbSource.h
deleted file mode 100644
index 4cdc91e..0000000
--- a/include/ossim/imaging/ossimHsiToRgbSource.h
+++ /dev/null
@@ -1,49 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimHsiToRgbSource.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimHsiToRgbSource_HEADER
-#define ossimHsiToRgbSource_HEADER
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-class ossimHsiToRgbSource : public ossimImageSourceFilter
-{
-public:
-   ossimHsiToRgbSource();
-   ossimHsiToRgbSource(ossimImageSource* inputSource);
-   virtual ossimRefPtr<ossimImageData> getTile(const  ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-
-   virtual ossimScalarType getOutputScalarType() const;
-
-   virtual double getNullPixelValue()const;
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-
-   virtual void initialize();
-protected:
-   virtual ~ossimHsiToRgbSource();
-
-   /**
-    * Called on first getTile, will initialize all data needed.
-    */
-   void allocate();
-   
-   ossimRefPtr<ossimImageData> theBlankTile;
-   ossimRefPtr<ossimImageData> theTile;
-
-   void initializeBuffers(ossimRefPtr<ossimImageData>& data);
-   
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimHsiToRgbSource_HEADER */
-
diff --git a/include/ossim/imaging/ossimHsvGridRemapEngine.h b/include/ossim/imaging/ossimHsvGridRemapEngine.h
deleted file mode 100644
index 1d5d605..0000000
--- a/include/ossim/imaging/ossimHsvGridRemapEngine.h
+++ /dev/null
@@ -1,54 +0,0 @@
-//*****************************************************************************
-// FILE: ossimHsvGridRemapEngine.h
-//
-// Copyright (C) 2001 ImageLinks, Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Contains declaration of class ossimHsvGridRemapEngine
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimHsvGridRemapEngine.h 9094 2006-06-13 19:12:40Z dburken $
-
-#ifndef ossimHsvGridRemapEngine_HEADER
-#define ossimHsvGridRemapEngine_HEADER
-
-#include <ossim/imaging/ossimGridRemapEngine.h>
-
-/*!****************************************************************************
- *
- * CLASS: ossimHsvGridRemapEngine 
- *
- *****************************************************************************/
-class ossimHsvGridRemapEngine : public ossimGridRemapEngine
-{
-public:
-   ossimHsvGridRemapEngine()
-      : ossimGridRemapEngine(3, 3) {}
-   
-   virtual ossimObject* dup() const;
-   
-   virtual void remapTile(const ossimDpt& origin_point,
-                          ossimGridRemapSource* remapper,
-                          ossimRefPtr<ossimImageData>& tile);
-
-   virtual void assignRemapValues(std::vector<ossimAtbPointSource*>& sources);
-
-   virtual void computeSourceValue(ossimRefPtr<ossimImageData>& source,
-                                   void* result);
-
-protected:
-   virtual void computeRemapNode(ossimAtbPointSource*  point_source,
-                                 void*                 source_value,
-                                 void*                 target_value);
-
-   TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimHsvToRgbSource.h b/include/ossim/imaging/ossimHsvToRgbSource.h
deleted file mode 100644
index 92dd14b..0000000
--- a/include/ossim/imaging/ossimHsvToRgbSource.h
+++ /dev/null
@@ -1,42 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimHsvToRgbSource.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimHsvToRgbSource_HEADER
-#define ossimJpegRgbToYCbCrSource_HEADER
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-class ossimHsvToRgbSource : public ossimImageSourceFilter
-{
-public:
-   ossimHsvToRgbSource();
-   ossimHsvToRgbSource(ossimImageSource* inputSource);
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-
-   virtual ossimScalarType getOutputScalarType() const;
-   virtual double          getNullPixelValue()const;
-   virtual double          getMinPixelValue(ossim_uint32 band=0)const;
-   virtual double          getMaxPixelValue(ossim_uint32 band=0)const;
-
-   virtual void initialize();
-
-protected:
-   virtual ~ossimHsvToRgbSource();
-
-   virtual void allocate();
-
-   ossimRefPtr<ossimImageData> theBlankTile;
-   ossimRefPtr<ossimImageData> theTile;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimImageChain.h b/include/ossim/imaging/ossimImageChain.h
deleted file mode 100644
index e5ee2b9..0000000
--- a/include/ossim/imaging/ossimImageChain.h
+++ /dev/null
@@ -1,416 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimImageChain.h 20316 2011-12-02 15:56:38Z oscarkramer $
-#ifndef ossimImageChain_HEADER
-#define ossimImageChain_HEADER
-#include <vector>
-#include <map>
-using namespace std;
-
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/base/ossimConnectableObjectListener.h>
-#include <ossim/base/ossimId.h>
-#include <ossim/base/ossimConnectableContainerInterface.h>
-
-class OSSIMDLLEXPORT ossimImageChain : public ossimImageSource,
-                                       public ossimConnectableObjectListener,
-                                       public ossimConnectableContainerInterface
-{
-public:
-   ossimImageChain();
-   virtual ~ossimImageChain();
-
-   ossimConnectableObject::ConnectableObjectList& getChainList(){return theImageChainList;}
-   const ossimConnectableObject::ConnectableObjectList& getChainList()const{return theImageChainList;}
-   
-   /**
-    * @param index Index of object to get.
-    *
-    * @see getNumberOfObjects(false) to get the number of objects inside
-    * the container.
-    *
-    * @return Container's object at that index or NULL if out of range.
-    */
-   ossimConnectableObject* operator[](ossim_uint32 index);
-
-   /**
-    * Same as operator[](ossim_uint32 i)
-    * 
-    * @param index Index of object to get.
-    *
-    * @see getNumberOfObjects(false) to get the number of objects inside
-    * the container.
-    *
-    * @return Container's object at that index or NULL if out of range.
-    *
-    * @note This does not recurse into other containers.
-    */
-   virtual ossimConnectableObject* getConnectableObject(ossim_uint32 index);
-   
-   virtual ossim_int32 indexOf(ossimConnectableObject* obj)const;
-   /**
-    * Return the first source which is the one that first receives the
-    * getTile request
-    */
-   virtual ossimImageSource* getFirstSource();
-   virtual const ossimImageSource* getFirstSource() const;
-   
-   virtual ossimObject* getFirstObject();
-
-   /**
-    * Return the last source which is the one that last receives the
-    * getTile request.
-    */
-   virtual ossimImageSource* getLastSource();
-   virtual const ossimImageSource* getLastSource() const;
-   
-   virtual ossimObject* getLastObject();
-
-
-   /**
-    * Adds it to the start of the chain.  This is the first one to receive
-    * the getTile request.  This basically inserts it to the right of the
-    * right most filter.
-    * Returns true on success, false on error.
-    */
-   bool addFirst(ossimConnectableObject* obj);
-
-   /**
-    * Adds it to the end.  this is the last one to receive the getTile
-    * request.  This basically inserts it to the left of the left most filter.
-    * Returns true on success, false on error.
-    */
-   bool addLast(ossimConnectableObject* obj);
-   
-   /**
-    * Deletes the first object.
-    * Note this is really most right of the chain.
-    * Returns true if deletion occurred, false if the chain is empty.
-    */
-   bool deleteFirst();
-
-   /**
-    * Deletes the last object.
-    * Note this is really most left of the chain.
-    * Returns true if deletion occurred, false if the chain is empty.
-    */
-   bool deleteLast();
-
-   /**
-    * 
-    */
-   bool insertRight(ossimConnectableObject* newObj,
-                    ossimConnectableObject* rightOfThisObj);
-
-   /**
-    *
-    */
-   bool insertRight(ossimConnectableObject* newObj,
-                    const ossimId& id);
-
-   /**
-    *
-    */
-   bool insertLeft(ossimConnectableObject* newObj,
-                   const ossimId& id);
-   /**
-    *
-    */
-   bool insertLeft(ossimConnectableObject* newObj,
-                   ossimConnectableObject* leftOfThisObj);
-   
-   bool replace(ossimConnectableObject* newObj,
-                ossimConnectableObject* oldObj);
-   /**
-    * Will return true or false if an image source was
-    * added to the chain.  It will add and do a connection
-    * to the previous source automatically.  This is a
-    * chain and the order of insertion matters. It adds it to the beginning
-    * of the list.  The last one added is the first one to receive
-    * the getTile.  Basically inserts to the right of the rightmost filter
-    *
-    */
-   virtual bool add(ossimConnectableObject* source);
-
-   /**
-    * Within the image chain will pass the head of the
-    * list.
-    */
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-   
-   /**
-    * this call is passed to the head of the list.
-    */
-   virtual ossim_uint32 getNumberOfInputBands() const;
-   
-   /**
-    * This call is passed to the head of the list.
-    */
-   virtual ossimScalarType getOutputScalarType() const;
-
-   virtual double getNullPixelValue(ossim_uint32 band=0)const;
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-   
-   virtual void getOutputBandList(std::vector<ossim_uint32>& bandList) const;
-
-   /**
-    * This call is passed to the head of the list.
-    */
-   virtual ossim_uint32 getTileWidth()const;
-
-   /**
-    * This call is passed to the head of the list.
-    */
-   virtual ossim_uint32 getTileHeight()const;
-   
-   /**
-    * Will pass this call to the head of the list.
-    */
-   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
-   virtual void getValidImageVertices(vector<ossimIpt>& validVertices,
-                                      ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER,
-                                      ossim_uint32 resLevel=0)const;
-   
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-
-   virtual void getDecimationFactor(ossim_uint32 resLevel,
-                                    ossimDpt& result) const;
-   virtual void getDecimationFactors(vector<ossimDpt>& decimations) const;
-   virtual ossim_uint32 getNumberOfDecimationLevels()const;
-   
-   /**
-    * Will save the state of the chain.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=NULL)const;
-
-   /**
-    * Will load the state.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=NULL);
-   
-   virtual void initialize();
-   virtual void enableSource();
-   virtual void disableSource();
-   
-   bool canConnectMyInputTo(ossim_int32 myInputIndex,
-                            const ossimConnectableObject* object)const
-      {
-         if(theImageChainList.size()&&
-            theImageChainList[theImageChainList.size()-1].valid())
-         {
-            ossimConnectableObject* obj = PTR_CAST(ossimConnectableObject, theImageChainList[theImageChainList.size()-1].get());
-            if(obj)
-            {
-               return obj->canConnectMyInputTo(myInputIndex,
-                                               object);
-            }
-         }
-         else if(!theImageChainList.size())
-         {
-            return true;
-         }
-         return false;
-      }
-      
-//    bool canConnectMyOutputTo(int32 myOutputIndex,
-//                              const ossimConnectableObject* object)const
-//       {
-//          if(theImageChainList.size()&&theImageChainList[0])
-//          {
-// 	   ossimConnectableObject* obj = PTR_CAST(ossimConnectableObject, theImageChainList[0]);
-// 	   if(obj)
-// 	     {
-// 	       return obj->canConnectMyOutputTo(myOutputIndex,
-// 						object);
-// 	     }
-//          }
-         
-//          return false;
-//       }
-   
-   // ________________________CONNECTABLE CONTAINER DEFINTIONS_________________
-   //
-   
-   /*!
-    * These methods are now deprecated.  You can achieve the same thing by using the new visitor design pattern.  If this does not 
-    * achieve exactly what you want then you can derive new rules by overriding the virtual visit method in ossimVisitor
-    *
-    * <pre>
-    *    ossimTypeIdVisitor visitor(tyeId, false, ossimVisitor::VISIT_CHILDREN);
-    *    connectableObject->accept(visitor);
-    *    ossimCollectionVisitor::List& collection = visitor.getObjects();
-    * </pre>
-    */
-   OSSIM_DEPRECATE_METHOD( virtual ossimConnectableObject::ConnectableObjectList findAllObjectsOfType(const RTTItypeid& typeInfo,
-                                                                     bool recurse=true));
-   /*!
-    * These methods are now deprecated.  You can achieve the same thing by using the new visitor design pattern.  If this does not 
-    * achieve exactly what you want then you can derive new rules by overriding the virtual visit method in ossimVisitor
-    *
-    * <pre>
-    *    ossimTypeNameVisitor visitor(typeName, false, ossimVisitor::VISIT_CHILDREN);
-    *    connectableObject->accept(visitor);
-    *    ossimCollectionVisitor::List& collection = visitor.getObjects();
-    * </pre>
-    */
-   OSSIM_DEPRECATE_METHOD(virtual ossimConnectableObject::ConnectableObjectList findAllObjectsOfType(const ossimString& className,
-                                                                     bool recurse=true));
-
-   /*!
-    * These methods are now deprecated.  You can achieve the same thing by using the new visitor design pattern.  If this does not 
-    * achieve exactly what you want then you can derive new rules by overriding the virtual visit method in ossimVisitor
-    *
-    * <pre>
-    *    ossimTypeIdVisitor visitor(tyeId, true, ossimVisitor::VISIT_CHILDREN);
-    *    connectableObject->accept(visitor);
-    *    ossimRefPtr<ossimConnectableObject> obj = visitor.getObject();
-    * </pre>
-    */
-   OSSIM_DEPRECATE_METHOD(virtual ossimConnectableObject* findFirstObjectOfType(const RTTItypeid& typeInfo,
-                                                         bool recurse=true));
-   /*!
-    * These methods are now deprecated.  You can achieve the same thing by using the new visitor design pattern.  If this does not 
-    * achieve exactly what you want then you can derive new rules by overriding the virtual visit method in ossimVisitor
-    *
-    * <pre>
-    *    ossimTypeNameVisitor visitor(className, true, ossimVisitor::VISIT_CHILDREN);
-    *    connectableObject->accept(visitor);
-    *    ossimRefPtr<ossimConnectableObject> obj = visitor.getObject();
-    * </pre>
-    */
-   OSSIM_DEPRECATE_METHOD(virtual ossimConnectableObject* findFirstObjectOfType(const ossimString& className,
-                                                         bool recurse=true));
-
-   /*!
-    * These methods are now deprecated.  You can achieve the same thing by using the new visitor design pattern.  If this does not 
-    * achieve exactly what you want then you can derive new rules by overriding the virtual visit method in ossimVisitor
-    *
-    * <pre>
-    *    ossimIdVisitor visitor(tyeId, true, ossimVisitor::VISIT_CHILDREN);
-    *    connectableObject->accept(visitor);
-    *    ossimRefPtr<ossimConnectableObject> obj = visitor.getObject();
-    * </pre>
-    */
-   OSSIM_DEPRECATE_METHOD(virtual ossimConnectableObject* findObject(const ossimId& id,
-                                              bool recurse=true));
-
-   OSSIM_DEPRECATE_METHOD(virtual ossimConnectableObject* findObject(const ossimConnectableObject* obj,
-                                              bool recurse=true));
-
-   /**
-    * Will cycle through all sources setting their ids. the idLast wlil
-    * be updated
-    * so we can recurse into other containers.
-    */
-   virtual void makeUniqueIds();
-
-   /**
-    * Returns the number of objects within this container and all child
-    * containers.
-    *
-    * @param recurse If true and object is a contains containers; all objects
-    * will be conter.  If false only the objects of this container will be
-    * counted (theImageChainList.size()).
-    */
-   virtual ossim_uint32 getNumberOfObjects(bool recurse=true)const;
-
-   /**
-    * Deprecated! Please use getNumberOfObjects(false).
-    *
-    * @return The number of objects in this container or
-    * (theImageChainList.size()).
-    */
-   virtual ossim_uint32 getNumberOfSources() const;
-   
-   /**
-    * Will add an object to the container and then set the added objects owner
-    * to this.
-    */
-   virtual bool addChild(ossimConnectableObject* attachableObject);
-
-   /**
-    * Will remove the child from the container.  Changes the owner of the
-    * child to be NULL;
-    */
-   virtual bool removeChild(ossimConnectableObject* object);
-   virtual ossimConnectableObject* removeChild(const ossimId& id);
-   
-   virtual void getChildren(vector<ossimConnectableObject*>& children,
-                            bool immediateChildrenOnlyFlag);
-   //______________END CONNECTABLE CONTAINER INTERFACE____________
-   
-   virtual void disconnectInputEvent(ossimConnectionEvent& event);
-   virtual void disconnectOutputEvent(ossimConnectionEvent& event);
-   virtual void connectInputEvent(ossimConnectionEvent& event);
-   virtual void connectOutputEvent(ossimConnectionEvent& event);
-   virtual void objectDestructingEvent(ossimObjectDestructingEvent& event);
-
-   virtual void propagateEventToOutputs(ossimEvent& event);
-   virtual void propagateEventToInputs(ossimEvent& event);
- 
-   virtual void processEvent(ossimEvent& event);
-
-   virtual void accept(ossimVisitor& visitor);
-   void deleteList();
-
-   /**
-    * These access methods greatly facilitate the implementation of an image chain adaptor class.
-    * They shouldn't be accessed directly by any other classes.  These methods really should be 
-    * "protected" but the compiler complains if this base class' declarations are "protected".
-    */
-   virtual ossimConnectableObject::ConnectableObjectList& imageChainList() { return theImageChainList; }
-   virtual const ossimConnectableObject::ConnectableObjectList& imageChainList() const { return theImageChainList; }
-   
-   /**
-    * Inserts all of this object's children and inputs into the container provided. Since this is
-    * itself a form of container, this method will consolidate this chain with the argument
-    * container. Consequently, this chain object will not be represented in the container, but its
-    * children will be, with correct input and output connections to external objects. Ownership
-    * of children will pass to the argument container.
-    * @return Returns TRUE if successful.
-    */
-   virtual bool fillContainer(ossimConnectableContainer& container);
-
-protected:
-   void prepareForRemoval(ossimConnectableObject* connectableObject);
-   
-  /**
-    * This will hold a sequence of image sources.
-    * theFirst one in the list will be the head of the
-    * list and the last one is the tail.
-    */
-   ossimConnectableObject::ConnectableObjectList theImageChainList;
-   
-   ossimRefPtr<ossimImageData>     theBlankTile;
-  // mutable bool                    thePropagateEventFlag;
-   mutable bool                    theLoadStateFlag;
-   /**
-    * For dynamic loading to take place we must allocate all objects first and
-    * then assign id's later.  We must remember the id's so we can do this.
-    * we will create a map that takes the id of the source as a key and a
-    * vector of input id's to connect it's inputs to.
-    */
-   bool addAllSources(map<ossimId, vector<ossimId> >& idMapping,
-                      const ossimKeywordlist& kwl,
-                      const char* prefix = NULL);
-   void findInputConnectionIds(vector<ossimId>& result,
-                               const ossimKeywordlist& kwl,
-                               const char* prefix=NULL);
-   bool connectAllSources(const map<ossimId, vector<ossimId> >& idMapping);
-   
-   
-TYPE_DATA
-};
-#endif /* #ifndef ossimImageChain_HEADER */
diff --git a/include/ossim/imaging/ossimImageCombiner.h b/include/ossim/imaging/ossimImageCombiner.h
deleted file mode 100644
index ee1d783..0000000
--- a/include/ossim/imaging/ossimImageCombiner.h
+++ /dev/null
@@ -1,135 +0,0 @@
-//*******************************************************************
-//
-// License:  See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimImageCombiner.h 17932 2010-08-19 20:34:35Z dburken $
-#ifndef ossimImageCombiner_HEADER
-#define ossimImageCombiner_HEADER
-#include <vector>
-
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/base/ossimConnectableObjectListener.h>
-#include <ossim/base/ossimPropertyEvent.h>
-
-/**
- * This will be a base for all combiners.  Combiners take N inputs and
- * will produce a single output.
- */
-class OSSIMDLLEXPORT ossimImageCombiner : public ossimImageSource,
-                                          public ossimConnectableObjectListener
-{
-public:
-   ossimImageCombiner();
-   ossimImageCombiner(ossimObject* owner,
-                      int numberOfInputs,
-                      int numberOfOutputs,
-                      bool inputListIsFixedFlag,
-                      bool outputListIsFixedFlag);
-   
-   ossimImageCombiner(ossimConnectableObject::ConnectableObjectList& inputSources);
-
-   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const;
-
-   virtual void initialize();
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=NULL);
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=NULL)const;
-
-   /**
-    * This will go through and precompute the
-    * bounding rects of each input image.
-    */
-   virtual void updateRects();
-
-   /**
-    * Returns the number of bands available from the input.
-    */
-   virtual ossim_uint32 getNumberOfInputBands()const;   
-   virtual ossimScalarType getOutputScalarType() const;
-   virtual ossim_uint32 getTileWidth()const;  
-   virtual ossim_uint32 getTileHeight()const;
-
-   virtual double getNullPixelValue(ossim_uint32 band=0)const;
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-
-  /**
-   * Used to retrieve the number of overlapping images withint the given
-   * rect.
-   */
-  virtual ossim_uint32 getNumberOfOverlappingImages(const ossimIrect& rect,
-                                                    ossim_uint32 resLevel=0)const;
-
-  /**
-   * Used to populate the result with the index of the overlapping images.
-   */
-  virtual void getOverlappingImages(std::vector<ossim_uint32>& result,
-				    const ossimIrect& rect,
-                                    ossim_uint32 resLevel=0)const;
-   
-   
-/*    virtual ossimRefPtr<ossimImageData> getNextTile(ossim_uint32& returnedIdx, */
-/*                                                    ossim_uint32 startIdx, */
-/*                                                    const ossimIpt& origin, */
-/*                                                    ossim_uint32 resLevel=0); */
-   
-/*    virtual ossimRefPtr<ossimImageData> getNextTile(ossim_uint32& returnedIdx, */
-/*                                                    const ossimIpt& origin, */
-/*                                                    ossim_uint32 resLevel=0); */
-   
-   virtual ossimRefPtr<ossimImageData> getNextTile(ossim_uint32& returnedIdx,
-                                                   const ossim_uint32 startIdx,
-                                                   const ossimIrect& tileRect,
-                                                   ossim_uint32 resLevel=0);
-
-   virtual ossimRefPtr<ossimImageData> getNextTile(ossim_uint32& returnedIdx,
-                                                   const ossimIrect& tileRect,
-                                                   ossim_uint32 resLevel=0);
-
-   
-   virtual ossimRefPtr<ossimImageData> getNextNormTile(ossim_uint32& returnedIdx,
-                                                       const ossim_uint32 index,
-                                                       const ossimIrect& tileRect,
-                                                       ossim_uint32 resLevel=0);
-   
-   virtual ossimRefPtr<ossimImageData> getNextNormTile(ossim_uint32& returnedIdx,
-                                                       const ossimIrect& tileRect,
-                                                       ossim_uint32 resLevel=0);
-   
-/*    virtual ossimRefPtr<ossimImageData> getNextNormTile(ossim_uint32& returnedIdx, */
-/*                                                        ossim_uint32 index, */
-/*                                                        const ossimIpt& origin, */
-/*                                                        ossim_uint32 resLevel=0); */
-/*    virtual ossimRefPtr<ossimImageData> getNextNormTile(ossim_uint32& returnedIdx, */
-/*                                                        const ossimIpt& origin, */
-/*                                                        ossim_uint32 resLevel=0); */
-   
-   
-   virtual bool canConnectMyInputTo(ossim_int32 inputIndex,
-                                    const ossimConnectableObject* object)const;
-         
-   virtual void connectInputEvent(ossimConnectionEvent& event);
-   virtual void disconnectInputEvent(ossimConnectionEvent& event);
-   virtual void propertyEvent(ossimPropertyEvent& event);
-   virtual void refreshEvent(ossimRefreshEvent& event);
-   virtual bool hasDifferentInputs()const;
-
-   
-protected:
-   virtual ~ossimImageCombiner();   
-   void precomputeBounds()const;
-
-   ossim_uint32                theLargestNumberOfInputBands;
-   ossim_uint32                theInputToPassThrough;
-   bool                        theHasDifferentInputs;
-   ossimRefPtr<ossimImageData> theNormTile;
-   mutable std::vector<ossimIrect>     theFullResBounds;
-   mutable bool                theComputeFullResBoundsFlag;
-   ossim_uint32                theCurrentIndex;
-   
-TYPE_DATA  
-};
-
-#endif /* #ifndef ossimImageCombiner_HEADER */
diff --git a/include/ossim/imaging/ossimImageData.h b/include/ossim/imaging/ossimImageData.h
deleted file mode 100644
index db9dfe3..0000000
--- a/include/ossim/imaging/ossimImageData.h
+++ /dev/null
@@ -1,1236 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: Container class for a tile of image data.
-//
-//*******************************************************************
-// $Id: ossimImageData.h 22366 2013-08-09 12:13:24Z gpotts $
-#ifndef ossimImageData_HEADER
-#define ossimImageData_HEADER 1
-
-#include <vector>
-#include <iosfwd> /* for ostream */
-
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimRectilinearDataObject.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimRefPtr.h>
-
-class ossimMultiBandHistogram;
-
-class OSSIMDLLEXPORT ossimImageData : public ossimRectilinearDataObject
-{
-public:
-
-   /** Definitions for the unloadBand routines. */
-   enum OverwriteBandRule
-   {
-      /*
-       * The COLOR_DISCREPANCY rule directs that the selected band of a pixel
-       * of the destination buffer is to be overwritten if *any* one of the
-       * other bands of the same destination pixel have color values that 
-       * deviate from its color. 
-       * Deprecated in favor of COLOR_DISCREPANCY_OF_ANY_FROM_DEST.
-       */
-      COLOR_DISCREPANCY = 0,
-
-      /*
-       * The COLOR_DISCREPANCY_OF_ANY_FROM_DEST rule directs that the selected 
-       * band of a pixel of the destination buffer is to be overwritten if 
-       * *any* one of the other bands of the same destination pixel have color 
-       * values that deviate from its color. 
-       * Same as the deprecated COLOR_DISCREPANCY.
-       */
-      COLOR_DISCREPANCY_OF_ANY_FROM_DEST = 1,
-
-      /*
-       * The COLOR_DISCREPANCY_OF_ALL_FROM_DEST rule directs that the selected 
-       * band of a pixel of the destination buffer is to be overwritten only if 
-       * *all* of the other bands of the same destination pixel have color 
-       * values that deviate from its color. 
-       */
-      COLOR_DISCREPANCY_OF_ALL_FROM_DEST = 2,
-
-      /*
-       * The COLOR_EQUALITY_OF_ANY_TO_SRC rule directs that the selected 
-       * band of a pixel of the destination buffer is to be overwritten if 
-       * *any* one of the other bands of the same destination pixel have color 
-       * values that are equal to the color of the selected band of the source
-       * pixel. 
-       */
-      COLOR_EQUALITY_OF_ANY_TO_SRC = 3,
-
-      /*
-       * The COLOR_EQUALITY_OF_ALL_TO_SRC rule directs that the selected 
-       * band of a pixel of the destination buffer is to be overwritten only if 
-       * *all* of the other bands of the same destination pixel have color 
-       * values that are equal to the color of the selected band of the source
-       * pixel. 
-       */
-      COLOR_EQUALITY_OF_ALL_TO_SRC = 4,
-
-      /*
-       * The selected band of the destination buffer is to be overwritten 
-       * by the selected band of the source image data (no questions asked).
-       */
-      NULL_RULE = 5
-   };
-
-   /** @brief copy constructor */
-   ossimImageData(const ossimImageData &rhs);
-   
-   ossimImageData();
-
-   /**
-    * @brief Constructor
-    * @param source The owner.  This can be null.
-    * @param scalar The Scalar type like OSSIM_UINT8, OSSIM_UINT16...
-    * @param bands  The number of bands.
-    * 
-    * @note This does not initialize the undelying data buffer.
-    *       Call the initialize method to allocate storage.
-    */
-   ossimImageData(ossimSource* source,
-                  ossimScalarType scalar,
-                  ossim_uint32 bands = 1);
-
-   /**
-    * @brief Constructor
-    * @param source The owner.  This can be null.
-    * @param scalar The Scalar type like OSSIM_UINT8, OSSIM_UINT16...
-    * @param bands  The number of bands.
-    * @param width  The width or number of samples in the buffer.
-    * @param height The height or numer of lines in the buffer.
-    * 
-    * @note This does not initialize the undelying data buffer.
-    *       Call the initialize method to allocate storage.
-    */
-   ossimImageData(ossimSource* source,
-                  ossimScalarType scalar,
-                  ossim_uint32 bands,
-                  ossim_uint32 width,
-                  ossim_uint32 height);
-
-   /** @brief virtual destructor */
-   virtual ~ossimImageData();
-
-   /**
-    * @brief assignment operator=
-    * @param rhs The data to assign from.
-    * @param A reference to this object.
-    */
-   virtual const ossimImageData& operator=(const ossimImageData &rhs);
-
-
-   /**
-    * @return The width of the data object.
-    */
-   virtual ossim_uint32 getWidth()const;
-
-   /**
-    * @return The height of the data object.
-    */
-   virtual ossim_uint32 getHeight()const;
-
-   /**
-    * @return The image rectangle relative to origin, height and width.
-    */
-   virtual ossimIrect getImageRectangle() const;
-   virtual void getWidthHeight(ossim_uint32& w, ossim_uint32& h);
-   virtual void setWidth(ossim_uint32 width);
-   virtual void setHeight(ossim_uint32 height);
-   virtual void setWidthHeight(ossim_uint32 w, ossim_uint32 h);
-   virtual void setImageRectangleAndBands(const ossimIrect& rect,
-                                          ossim_uint32 numberOfBands);
-   virtual void setImageRectangle(const ossimIrect& rect);
-   virtual void setOrigin(const ossimIpt& origin);   
-                                    
-   virtual void assign(const ossimDataObject* data);
-   virtual void assign(const ossimImageData* data);
-   virtual void assignBand(const ossimImageData* data,
-                           ossim_uint32 source_band,
-                           ossim_uint32 output_band);
-   
-   virtual ossimObject* dup() const;
-
-  /**
-   * Uses prime numbers as coefficients for this summation.  
-   * Take the the fours bytes of each origin and multiply 
-   * by the prime numbers and sum together.  This has
-   * been proven by others to give nicely distributed 
-   * id number.
-   */
-   virtual ossim_uint32 getHashId()const;
-   
-   virtual void setNullPix(ossim_float64 null_pix);
-   virtual void setNullPix(ossim_float64 null_pix, ossim_uint32 band);
-   virtual void setNullPix(const ossim_float64* nullPixArray,
-                           ossim_uint32 numberOfValues);
-   virtual void setMinPix(ossim_float64 min_pix);
-   virtual void setMinPix(ossim_float64 min_pix, ossim_uint32 band);
-   virtual void setMinPix(const ossim_float64* minPixArray,
-                          ossim_uint32 numberOfValues);
-   virtual void setMaxPix(ossim_float64 max_pix);
-   virtual void setMaxPix(ossim_float64 max_pix, ossim_uint32 band);
-   virtual void setMaxPix(const ossim_float64* maxPixArray,
-                          ossim_uint32 numberOfValues);
-
-   virtual const ossimIpt& getOrigin()const{return m_origin;}
-
-   /**
-    * If the minBands and maxBands are empty or not equal to the imageData's
-    * current number of bands it will erase the contents, resize, and then
-    * replace the values in the passed in array with this objects min max
-    * values.  If the arrays are the same size as this objects number of
-    * bands it will just update the values and use the current values in the
-    * arrays as initial min max values.
-    *
-    * If the status of this object(getDataObjectStatus()) is OSSIM_NULL or
-    * OSSIM_EMPTY no action is performed.
-    */
-   virtual void computeMinMaxPix(std::vector<ossim_float64>& minBands,
-                                 std::vector<ossim_float64>& maxBands) const;
-
-   /**
-    * @brief Scans tile for min, max, nulls.
-    * 
-    * If the nullBands, minBands and maxBands are empty or not equal to the
-    * imageData's current number of bands it will erase the contents, resize,
-    * and then replace the values in the passed in array with this objects
-    * min max values.  If the arrays are the same size as this objects number
-    * of bands it will just update the values and use the current values in the
-    * arrays as initial min max values.
-    *
-    * If the status of this object(getDataObjectStatus()) is OSSIM_NULL no
-    * action is performed.
-    */
-   virtual void computeMinMaxNulPix(
-      std::vector<ossim_float64>& minBands,
-      std::vector<ossim_float64>& maxBands,
-      std::vector<ossim_float64>& nulBands) const;
-   
-   virtual const ossim_float64* getNullPix()const;
-   virtual const ossim_float64* getMinPix()const;
-   virtual const ossim_float64* getMaxPix()const;
-   virtual ossim_float64        getNullPix(ossim_uint32 band) const;
-   virtual ossim_float64        getMinPix(ossim_uint32 band)  const;
-   virtual ossim_float64        getMaxPix(ossim_uint32 band)  const;
-
-   /**
-    * returns normalized minimum pixel value of band zero.
-    */
-   virtual ossim_float64   getMinNormalizedPix() const;
-   virtual ossimString     getScalarTypeAsString()const;
-   virtual ossim_uint32    getNumberOfBands() const;
-   virtual void            setNumberOfBands(ossim_uint32 bands,
-                                            bool reallocate=false);
-
-   /**
-    * Will return the pixel at location position.  Note it will first get
-    * the passed in position relative to the origin or upper left
-    * corner of this tile and then return the result.
-    */
-   virtual ossim_float64 getPix(const ossimIpt& position,
-                                ossim_uint32 band=0) const;
-
-   /**
-    * Will return the pixel at offset and band number.
-    */
-   virtual ossim_float64 getPix(ossim_uint32 offset,
-                                ossim_uint32 band = 0) const;
-   
-   /**
-    * will fill the entire band with
-    * the value.
-    */
-   void fill(ossim_uint32 band, ossim_float64 value);
-
-   /**
-    * will fill all bands with the passed in
-    * value.
-    */
-   void fill(ossim_float64 value);
-   bool isNull(ossim_uint32 offset)const;
-   bool isNull(ossim_uint32 offset, ossim_uint32 band)const;
-   void setNull(ossim_uint32 offset);
-   void setNull(ossim_uint32 offset, ossim_uint32 band);
-
-   bool isNull(const ossimIpt& pt)const;
-   void setNull(const ossimIpt& pt);
-   bool isNull(const ossimIpt& pt, ossim_uint32 band)const;
-   void setNull(const ossimIpt& pt, ossim_uint32 band);
-   
-   virtual bool   isValidBand(ossim_uint32 band) const;
-   virtual ossimDataObjectStatus validate() const;
-
-   /**
-    * Will take this tile and normalize it to a newly
-    * allocated floating point tile.
-    */
-   virtual ossimRefPtr<ossimImageData> newNormalizedFloat()const;
-
-   /**
-    * will go to the band and offset and compute the
-    * normalized float and return it back to the
-    * caller through the result argument.
-    */
-   virtual void getNormalizedFloat(ossim_uint32 offset,
-                                   ossim_uint32 bandNumber,
-                                   ossim_float32& result)const;
-
-   /**
-    * This will assign to this object a normalized
-    * value by unnormalizing to its native type.
-    */
-   virtual void setNormalizedFloat(ossim_uint32 offset,
-                                   ossim_uint32 bandNumber,
-                                   ossim_float32 input);
-
-   /**
-    * Will use the memory that you pass in to normalize
-    * this data object.
-    */
-   virtual void convertToNormalizedFloat(ossimImageData* result)const;
-
-   /**
-    * Will take this tile and normalize it to a newly
-    * allocated double point tile.
-    */
-   virtual ossimImageData* newNormalizedDouble()const;
-
-   /**
-    * Will use the memory that you pass in to normalize
-    * this data object.
-    */
-   virtual void convertToNormalizedDouble(ossimImageData* result)const;
-
-   /**
-    * Will take the normalized input and convert it
-    * to this tile's data type.  Example:  if this
-    * tile is of type UCHAR and its input is of type
-    * NORALIZED_FLOAT it will unnormalize the data by
-    * doing:
-    *
-    * minPix + normalizedInput*(maxPix-minPix)
-    *
-    * on a per band basis.
-    */
-   virtual void unnormalizeInput(ossimImageData* normalizedInput);
-
-   /**
-    * This will compute the average value for the band.
-    */
-   virtual ossim_float64 computeAverageBandValue(
-      ossim_uint32 bandNumber = 0) const;
-
-   /**
-    * This will call the compute average band value and then
-    * use that in the calculation of:
-    
-    * It will then do a SUM[(Mean - Actual)^2]/width*height.
-    *
-    * This is the average variance from the passed in
-    * mean.  
-    */
-   virtual ossim_float64 computeMeanSquaredError(
-      ossim_float64 meanValue,
-      ossim_uint32 bandNumber = 0) const;
-  
-   virtual void populateHistogram(ossimRefPtr<ossimMultiBandHistogram> histo);
-
-   /**
-    * @return true if alpha channel is initialized, false if not.
-    */
-   virtual bool hasAlpha() const;
-   
-   /**
-    * @return const ossim_uint8* to the alpha channel or null if the alpha
-    * channel was not computed.
-    */
-   virtual const ossim_uint8* getAlphaBuf() const;
-
-   /**
-    * @return ossim_uint8* to the alpha channel or null if the alpha channel
-    * was not computed.
-    */
-   virtual ossim_uint8* getAlphaBuf();
-
-   /**
-    * @return const void* to theDataBuffer
-    */
-   virtual const void* getBuf() const;
-   
-   /**
-    * @return const ossim_uint8* to theDataBuffer if scalar is of type
-    * OSSIM_UCHAR; else, NULL.
-    */
-   virtual const ossim_uint8*    getUcharBuf()  const;
-
-   /**
-    * @return const ossim_uint16* to theDataBuffer if scalar is of type
-    * OSSIM_USHORT16 or USHORT11; else, NULL.
-    */
-   virtual const ossim_uint16*   getUshortBuf() const;
-
-   /**
-    * @return const ossim_sint16* to theDataBuffer if scalar is of type
-    * OSSIM_SSHORT16; else, NULL.
-    */
-   virtual const ossim_sint16*   getSshortBuf() const;
-
-   /**
-    * @return const ossim_float32* to theDataBuffer if scalar is of type
-    * OSSIM_FLOAT or OSSIM_NORMALIZED_FLOAT; else, NULL.
-    */
-   virtual const ossim_float32*  getFloatBuf()  const;
-
-   /**
-    * @return const ossim_float64* to theDataBuffer if scalar is of type
-    * OSSIM_DOUBLE or OSSIM_NORMALIZED_DOUBLE; else, NULL.
-    */
-   virtual const ossim_float64*  getDoubleBuf() const;
-
-   /**
-    * @return void* to theDataBuffer
-    */
-   virtual void* getBuf();
-   
-   /**
-    * @return ossim_uint8* to theDataBuffer if scalar is of type
-    * OSSIM_UCHAR; else, NULL.
-    */
-   virtual ossim_uint8*    getUcharBuf();
-   
-   /**
-    * @return ossim_uint16* to theDataBuffer if scalar is of type
-    * OSSIM_USHORT16 or OSSIM_USHORT11; else, NULL.
-    */
-   virtual ossim_uint16*   getUshortBuf();
-   
-   /**
-    * @return ossim_sint16* to theDataBuffer if scalar is of type
-    * OSSIM_SSHORT16; else, NULL.
-    */
-   virtual ossim_sint16*   getSshortBuf();
-
-   /**
-    * @return ossim_float32* to theDataBuffer if scalar is of type
-    * OSSIM_FLOAT or OSSIM_NORMALIZED_FLOAT; else, NULL.
-    */
-   virtual ossim_float32*  getFloatBuf();
-   
-   /**
-    * @return float64* to theDataBuffer if scalar is of type OSSIM_DOUBLE or
-    * OSSIM_NORMALIZED_DOUBLE; else, NULL.
-    */
-   virtual ossim_float64*  getDoubleBuf();
-
-   /**
-    * @param band (zero based)
-    * @return void* to theDataBuffer positioned at band.
-    */
-   virtual const void*           getBuf(ossim_uint32 band) const;
-   
-   /**
-    * @param band (zero based)
-    * @return ossim_uint8* to theDataBuffer positioned at band if scalar is
-    * of type OSSIM_UCHAR; else, NULL.
-    */
-   virtual const ossim_uint8*    getUcharBuf(ossim_uint32 band) const;
-
-   /**
-    * @param band (zero based)
-    * @return ossim_uint16* to theDataBuffer positioned at band if scalar is
-    * of type OSSIM_USHORT16 or OSSIM_USHORT11; else, NULL.
-    */
-   virtual const ossim_uint16*   getUshortBuf(ossim_uint32 band) const;
-   
-   /**
-    * @param band (zero based)
-    * @return ossim_sint16* to theDataBuffer positioned at band if scalar is
-    * of type OSSIM_SSHORT16; else, NULL.
-    */
-   virtual const ossim_sint16*   getSshortBuf(ossim_uint32 band) const;
-   
-   /**
-    * @param band (zero based)
-    * @return ossim_float32* to theDataBuffer positioned at band if scalar is
-    * of type OSSIM_FLOAT or OSSIM_NORMALIZED_FLOAT; else, NULL.
-    */
-   virtual const ossim_float32*  getFloatBuf(ossim_uint32 band) const;
-   
-   /**
-    * @param band (zero based)
-    * @return ossim_float64* to theDataBuffer positioned at band if scalar is
-    * of type OSSIM_DOUBLE or OSSIM_NORMALIZED_DOUBLE; else, NULL.
-    */
-   virtual const ossim_float64*  getDoubleBuf(ossim_uint32 band) const;
-
-   /**
-    * @param band (zero based)
-    * @return void* to theDataBuffer positioned at band.
-    */
-   virtual void*           getBuf(ossim_uint32 band);
-   
-   /**
-    * @param band (zero based)
-    * @return ossim_uint8* to theDataBuffer positioned at band if scalar is
-    * of type OSSIM_UCHAR; else, NULL.
-    */
-   virtual ossim_uint8*    getUcharBuf(ossim_uint32 band);
-   
-   /**
-    * @param band (zero based)
-    * @return ossim_uint16* to theDataBuffer positioned at band if scalar is
-    * of type OSSIM_USHORT16 or OSSIM_USHORT11; else, NULL.
-    */
-   virtual ossim_uint16*   getUshortBuf(ossim_uint32 band);
-   
-   /**
-    * @param band (zero based)
-    * @return ossim_sint16* to theDataBuffer positioned at band if scalar is
-    * of type OSSIM_SSHORT16; else, NULL.
-    */
-   virtual ossim_sint16*   getSshortBuf(ossim_uint32 band);
-   
-   /**
-    * @param band (zero based)
-    * @return ossim_float32* to theDataBuffer positioned at band if scalar is
-    * of type OSSIM_FLOAT or OSSIM_NORMALIZED_FLOAT; else, NULL.
-    */
-   virtual ossim_float32*  getFloatBuf(ossim_uint32 band);
-   
-   /**
-    * @param band (zero based)
-    * @return ossim_float64* to theDataBuffer positioned at band if scalar is
-    * of type OSSIM_DOUBLE or OSSIM_NORMALIZED_DOUBLE; else, NULL.
-    */
-   virtual ossim_float64*  getDoubleBuf(ossim_uint32 band);
-   
-   /**
-    *  Returns the total number of pixels in a tile for all bands.
-    *  Note:  This is not in bytes but in pixels.
-    */
-   virtual ossim_uint32 getSize() const;
-
-   /**
-    *  Returns the number of pixels in a single band in a tile.
-    *  Note:  This is not in bytes but in pixels.
-    */
-   virtual ossim_uint32 getSizePerBand()const;
-
-   /**
-    *  Returns the number of bytes in single band of the tile.
-    */
-   virtual ossim_uint32 getSizePerBandInBytes() const;
-
-   virtual ossim_uint32 getDataSizeInBytes()const;
-
-   /**
-    * Returns the total number of bytes for all bands.
-    */
-   virtual ossim_uint32  getSizeInBytes() const;
-
-   /**
-    *  Initializes data to null pixel values.
-    */
-   virtual void makeBlank();
-
-   /**
-    *  Initialize the data buffer.
-    */
-   virtual void initialize();
-
-   /**
-    * @brief Writes tile to stream.
-    *
-    * This will write the buffer to file with an associated header file.
-    * Assuming a contiguous buffer in BSQ format.  Currently does not
-    * support converting to BIP or BIL or byte swapping but probably
-    * should add at some point.
-    *
-    * @param f File to write.
-    *
-    * @return true on success, false on error.
-    */
-   virtual bool write(const ossimFilename& f) const;
-
-   /**
-    * Copies entire tile to buf passed in.  Data put in buf is normalized.
-    * The "buf" passed to method is assumed to be at least as big as:
-    * "getSize() * sizeof(double)"
-    */
-   virtual void copyTileToNormalizedBuffer(ossim_float64* buf) const;
-   virtual void copyTileToNormalizedBuffer(ossim_float32* buf)const;
-
-   /**
-    * Will copy this tiles specified band number to the normalized buffer.
-    * if the band is out of range then nothing is done and returns.
-    *
-    * @param band Zero based band to copy.
-    *
-    * @param buf Buffer to copy to.
-    */
-   virtual void copyTileBandToNormalizedBuffer(ossim_uint32 band,
-                                               ossim_float64* buf) const;
-   
-   /**
-    * Will copy this tiles specified band number to the normalized buffer.
-    * if the band is out of range then nothing is done and returns.
-    *
-    * @param band Zero based band to copy.
-    *
-    * @param buf Buffer to copy to.
-    */
-   virtual void copyTileBandToNormalizedBuffer(ossim_uint32 band,
-                                               ossim_float32* buf)const;
-
-   /**
-    * Copies buf passed in to tile.  Data is unnormalized to the tile's
-    * scalar type.
-    * The "buf" passed to method is assumed to be at least as big as the tiles:
-    * "getSize() * sizeof(double)"
-    */
-   virtual void copyNormalizedBufferToTile(ossim_float64* buf);
-   virtual void copyNormalizedBufferToTile(ossim_float32* buf);
-
-   /**
-    * Will copy the normalized buffer to this tiles
-    * specified band.  If band is out of range then nothing
-    *
-    * is done and returns.
-    */
-   virtual void copyNormalizedBufferToTile(ossim_uint32 band,
-                                           ossim_float64* buf);
-   virtual void copyNormalizedBufferToTile(ossim_uint32 band,
-                                           ossim_float32* buf);
-
-   virtual bool isWithin(ossim_int32 x, ossim_int32 y);
-   virtual void setValue(ossim_int32 x, ossim_int32 y, ossim_float64 color);
-
-   virtual void loadBand(const void* src,
-                         const ossimIrect& src_rect,
-                         ossim_uint32 band);
-
-   virtual void loadBand(const void* src,
-                         const ossimIrect& src_rect,
-                         const ossimIrect& clip_rect,
-                         ossim_uint32 band);
-   
-   virtual void loadTile(const void* src,
-                         const ossimIrect& src_rect,
-                         ossimInterleaveType il_type);
-
-   virtual void loadTile(const void* src,
-                         const ossimIrect& src_rect,
-                         const ossimIrect& clip_rect,                         
-                         ossimInterleaveType il_type);
-
-   virtual void nullTileAlpha(const ossim_uint8* src,
-                              const ossimIrect& src_rect,
-                              bool mutliplyAlphaFlag=false);
-   virtual void nullTileAlpha(const ossim_uint8* src,
-                              const ossimIrect& src_rect,
-                              const ossimIrect& clip_rect,
-                              bool multiplyAlphaFlag=false);
-   /**
-    * Will load a tile of different types.  If they
-    * are the same then it will call loadTile(void*...)
-    * method.  Note if they are of different types we
-    * will have to go through a much slower assign
-    * process by normalizing the right side and then
-    * unnormalizing to the destination type. For this
-    * method to work they both must have the same
-    * number of bands.
-    */
-   virtual void loadTile(const ossimImageData* src);
-   
-   virtual void loadTileFrom1Band(const ossimImageData* data);
-
-   virtual void loadTileFrom1Band(const void* src,
-                                  const ossimIrect& src_rect);
-   /**
-    * Specialized to load a tile from a short (16 bit scalar type) buffer.
-    * Performs byte swapping if swap_bytes is set to true.
-    */
-   virtual void loadShortBand(const void* src,
-                              const ossimIrect& src_rect,
-                              ossim_uint32 band,
-                              bool swap_bytes=false);
-
-   /**
-    * This routine is designed for overwriting a selected band of the 
-    * destination buffer 'dest' by an independent selected band of the
-    * source buffer according to a user-selected rule, defined by 
-    * OverwriteBandRule.
-    *
-    * Currently the rules available in OverwriteBandRule are: 
-    *
-    * The COLOR_DISCREPANCY_OF_ANY_FROM_DEST rule directs that the selected 
-    * band of a pixel of the destination buffer is to be overwritten if *any* 
-    * one of the other bands of the same destination pixel have color values 
-    * that deviate from its color. Same as the deprecated COLOR_DISCREPANCY.
-    *
-    * The COLOR_DISCREPANCY_OF_ALL_FROM_DEST rule directs that the selected 
-    * band of a pixel of the destination buffer is to be overwritten only if 
-    * *all* of the other bands of the same destination pixel have color values
-    * that deviate from its color. 
-    *
-    * The COLOR_EQUALITY_OF_ANY_TO_SRC rule directs that the selected 
-    * band of a pixel of the destination buffer is to be overwritten if 
-    * *any* one of the other bands of the same destination pixel have color 
-    * values that are equal to the color of the selected band of the source
-    * pixel. 
-    *
-    * The COLOR_EQUALITY_OF_ALL_TO_SRC rule directs that the selected 
-    * band of a pixel of the destination buffer is to be overwritten only if 
-    * *all* of the other bands of the same destination pixel have color 
-    * values that are equal to the color of the selected band of the source
-    * pixel. 
-    *
-    * The NULL_RULE rule directs that the selected band of the 
-    * destination buffer is to be overwritten by the selected band of the 
-    * source image data (no questions asked).
-    *
-    * @note: The 'dest' buffer should have at least the same number of bands 
-    * as the 'src' object. 
-    *
-    * Currently this routine is only implemented for il_type set to OSSIM_BSQ.
-    *
-    * @param dest      The destination buffer, which should have at least the 
-    * same number of bands as the 'src' object.
-    * @param src_band  The 0-based band of the source image data.
-    * @param dest_band The 0-based band of the dest buffer.
-    * @param dest_rect The rectangle of the destination buffer.
-    * @param il_type   The interleave type. Only OSSIM_BSQ available.
-    * @param ow_type   The rule for overwriting the destination buffer.
-    */
-   virtual void unloadBand( void* dest,
-                            ossim_uint32 src_band,
-                            ossim_uint32 dest_band,
-                            const ossimIrect& dest_rect,
-                            ossimInterleaveType il_type=OSSIM_BSQ,
-                            OverwriteBandRule ow_type=NULL_RULE ) const;
-
-   /**
-    * This routine is designed for overwriting a selected band of the 
-    * destination buffer 'dest' by an independent selected band of the
-    * source buffer according to a user-selected rule, defined by 
-    * OverwriteBandRule.
-    *
-    * Currently the rules available in OverwriteBandRule are: 
-    *
-    * The COLOR_DISCREPANCY_OF_ANY_FROM_DEST rule directs that the selected 
-    * band of a pixel of the destination buffer is to be overwritten if *any* 
-    * one of the other bands of the same destination pixel have color values 
-    * that deviate from its color. Same as the deprecated COLOR_DISCREPANCY.
-    *
-    * The COLOR_DISCREPANCY_OF_ALL_FROM_DEST rule directs that the selected 
-    * band of a pixel of the destination buffer is to be overwritten only if 
-    * *all* of the other bands of the same destination pixel have color values
-    * that deviate from its color. 
-    *
-    * The COLOR_EQUALITY_OF_ANY_TO_SRC rule directs that the selected 
-    * band of a pixel of the destination buffer is to be overwritten if 
-    * *any* one of the other bands of the same destination pixel have color 
-    * values that are equal to the color of the selected band of the source
-    * pixel. 
-    *
-    * The COLOR_EQUALITY_OF_ALL_TO_SRC rule directs that the selected 
-    * band of a pixel of the destination buffer is to be overwritten only if 
-    * *all* of the other bands of the same destination pixel have color 
-    * values that are equal to the color of the selected band of the source
-    * pixel. 
-    *
-    * The NULL_RULE rule directs that the selected band of the 
-    * destination buffer is to be overwritten by the selected band of the 
-    * source image data (no questions asked).
-    *
-    * @note: The 'dest' buffer should have at least the same number of bands 
-    * as the 'src' object. 
-    *
-    * Currently this routine is only implemented for il_type set to OSSIM_BSQ.
-    *
-    * @param dest      The destination buffer, which should have at least the 
-    * same number of bands as the 'src' object.
-    * @param src_band  The 0-based band of the source image data.
-    * @param dest_band The 0-based band of the dest buffer.
-    * @param dest_rect The rectangle of the destination buffer.
-    * @param clip_rect Only data within will be copied.
-    * @param il_type   The interleave type. Only OSSIM_BSQ available.
-    * @param ow_type   The rule for overwriting the destination buffer.
-    */
-   virtual void unloadBand( void* dest,
-                            ossim_uint32 src_band,
-                            ossim_uint32 dest_band,
-                            const ossimIrect& dest_rect,
-                            const ossimIrect& clip_rect,
-                            ossimInterleaveType il_type=OSSIM_BSQ,
-                            OverwriteBandRule ow_type=NULL_RULE ) const;
-
-   /**
-    * @param dest The destination buffer.  It is assumed this is a single band
-    * and the size of dest_rect.
-    * @param dest_rect The rectangle of the destination buffer.
-    * @param src_band The band to copy (unload) from the tile.
-    */
-   virtual void unloadBand(void* dest,
-                           const ossimIrect& dest_rect,
-                           ossim_uint32 src_band) const;
-
-   /**
-    * @param dest The destination buffer.  It is assumed this is a single band
-    * and the size of dest_rect.
-    * @param dest_rect The rectangle of the destination buffer.
-    * param clip_rect Only data within the clip_rect will be copied.
-    * @param src_band The band to copy (unload) from the tile.
-    */
-   virtual void unloadBand(void* dest,
-                           const ossimIrect& dest_rect,
-                           const ossimIrect& clip_rect,
-                           ossim_uint32 src_band) const;
-   
-   virtual void unloadTile(void* dest,
-                           const ossimIrect& dest_rect,
-                           ossimInterleaveType il_type ) const;
-
-   virtual void unloadTile(void* dest,
-                           const ossimIrect& dest_rect,
-                           const ossimIrect& clip_rect,
-                           ossimInterleaveType il_type) const;
-
-   /**
-    * @param dest The destination buffer.
-    * @param dest_rect The rectangle of the destination buffer.
-    * param clip_rect Only data within the clip_rect will be copied.
-    * @param src_band The band to copy (unload) from the tile.
-    */
-   virtual void unloadTileToBipAlpha(void* dest,
-                                     const ossimIrect& dest_rect,
-                                     const ossimIrect& clip_rect) const;
-   
-   virtual bool isPointWithin(const ossimIpt& point)const;
-   virtual bool isPointWithin(ossim_int32 x,
-                              ossim_int32 y)const;
-
-   virtual std::ostream& print(std::ostream& out) const;
-
-   /**
-    * @brief Performs linear stretch on tile data from min/max to limits of
-    * scalar type.
-    */
-   virtual void stretchMinMax();
-
-   /**
-    * @brief Computes the alpha channel.
-    *
-    * For each pixel if any band value is not null then alpha will be 255;
-    * else, 0.
-    */
-   virtual void computeAlphaChannel();
-
-   /**
-    * @brief Method to copy a single line to the tile.
-    *
-    * This will copy a line to the tile.  It is assumed that all bands are in
-    * the buffer "src".  Only pixels within the tile rect will be copied.
-    * Note that all coordinates are relative to the tile coordinates.
-    * Clipping will be performed on pixels outside of the tile rectangle.
-    * No fill is added if a partial tile line is copied so callers
-    * should do a ossimImageData::makeBlank if the whole tile is not to be
-    * stuffed.  ossimImageData::validate should be called after all lines
-    * are copied if in doubt of a full tile.
-    *
-    * @param src The source buffer or line to copy containing all bands.
-    *
-    * @param lineNumber Line number to copy.
-    *
-    * @param lineStartSample The start sample of the source buffer relative
-    * to tile coordinates.
-    *
-    * @param lineStopSample The stop sample of the source buffer relative
-    * to tile coordinates.
-    *
-    * @param lineInterleave Interleave of src buffer.  If OSSIM_BIP assumed
-    * rgbrgbrgb; else, red row, green row, blue row.
-    *
-    * Usage example in method: ossimTiffTileSource::loadFromScanLine
-    */
-   virtual void copyLine(const void* src,
-                         ossim_int32 lineNumber,
-                         ossim_int32 lineStartSample,
-                         ossim_int32 lineStopSample,
-                         ossimInterleaveType lineInterleave);
-
-   /**
-    * @brief Sets the indexed flag.
-    *
-    * This indicates the data contains palette indexes.  Default is false.
-    * 
-    * @param flag If true data is indexed.
-    */
-   void setIndexedFlag(bool flag);
-
-   /** @return The indexed flag. */
-   bool getIndexedFlag() const;
-   
-   
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-protected:
-   /** @brief Templated copy line method. */
-   template <class T> void copyLineTemplate(T dummyTemplate,
-                                            const void* src,
-                                            ossim_int32 lineNumber,
-                                            ossim_int32 lineStartSample,
-                                            ossim_int32 lineStopSample,
-                                            ossimInterleaveType lineInterleave);
-   
-   /**
-    * @brief Templated stretch method.
-    *
-    * Performs linear stretches on tile data from min/max to limits of
-    * scalar type.
-    */
-   template <class T> void stretchMinMax(T dummyTemplate);
-
-   /**
-    * @brief Templated compute alpha channel.
-    *
-    * For each pixel if any band value is not null then alpha will be 255;
-    * else, 0.
-    */
-   template <class T> void computeAlphaChannel(T dummyTemplate);   
-
-   /**
-    * Templated validate method.
-    *
-    * @return The status of the ossimImageDataMethod.
-    *
-    * @note See ossimConstants.h for ossimDataObjectStatus enumerations.
-    */
-   template <class T> ossimDataObjectStatus validate(T dummyTemplate) const;
-
-   /**
-    * Templated makeBlank method.
-    */
-   template <class T> void makeBlank(T dummyTemplate);
-
-   /**
-    * Templated computeMeanSquaredError method.
-    */
-   template <class T>
-      ossim_float64 computeMeanSquaredError(T dummyTemplate,
-                                            ossim_float64 meanValue,
-                                            ossim_uint32 bandNumber) const;
-
-   /**
-    * Templated computeAverageBandValue method.
-    */
-   template <class T>
-      ossim_float64 computeAverageBandValue(T dummyTemplate,
-                                            ossim_uint32 bandNumber) const;
-   
-   void loadTileFromBip(const void* src, const ossimIrect& src_rect);
-   void loadTileFromBil(const void* src, const ossimIrect& src_rect);
-   void loadTileFromBsq(const void* src, const ossimIrect& src_rect);
-
-   void loadTileFromBip(const void* src,
-                        const ossimIrect& src_rect,
-                        const ossimIrect& clip_rect);
-   void loadTileFromBil(const void* src,
-                        const ossimIrect& src_rect,
-                        const ossimIrect& clip_rect);
-   void loadTileFromBsq(const void* src,
-                        const ossimIrect& src_rect,
-                        const ossimIrect& clip_rect);
-
-   void unloadTileToBip(void* dest,
-                        const ossimIrect& dest_rect,
-                        const ossimIrect& clip_rect) const;
-   void unloadTileToBil(void* dest,
-                        const ossimIrect& dest_rect,
-                        const ossimIrect& clip_rect) const;
-   void unloadTileToBsq(void* dest,
-                        const ossimIrect& dest_rect,
-                        const ossimIrect& clip_rect) const;
-
-   /**
-    * Called from public unloadBand() routines that have an 
-    * OverwriteBandRule interface.
-    *
-    * @param dest      The destination buffer.
-    * @param src_band  The 0-based band of the source image data.
-    * @param dest_band The 0-based band of the destination buffer.
-    * @param dest_rect The rectangle of the destination buffer.
-    * @param clip_rect Only data within will be copied.
-    * @param ow_type   The rule for overwriting the destination buffer.
-    */
-   virtual void unloadBandToBsq( void* dest,
-                                 ossim_uint32 src_band,
-                                 ossim_uint32 dest_band,
-                                 const ossimIrect& dest_rect,
-                                 const ossimIrect& clip_rect,
-                                 OverwriteBandRule ow_type=NULL_RULE ) const;
-
-   /**
-    * Copies entire tile to buf passed in.  Data put in buf is normalized.
-    * The "buf" passed to method is assumed to be at least as big as:
-    * "getSize() * sizeof(double)"
-    */
-   template <class T>
-   void copyTileToNormalizedBuffer(T dummyTemplate,
-                                   ossim_float64* buf) const;
-   template <class T>
-   void copyTileToNormalizedBuffer(T dummyTemplate,
-                                   ossim_float32* buf)const;
-
-   /**
-    * Will copy this tiles specified band number to the normalized buffer.
-    * if the band is out of range then nothing is done and returns.
-    */
-   template <class T>
-   void copyTileToNormalizedBuffer(T dummyTemplate,
-                                   ossim_uint32 band, ossim_float64* buf) const;
-   template <class T>
-   void copyTileToNormalizedBuffer(T dummyTemplate,
-                                   ossim_uint32 band, ossim_float32* buf)const;
-
-   /**
-    * Copies buf passed in to tile.  Data is unnormalized to the tile's
-    * scalar type.
-    * The "buf" passed to method is assumed to be at least as big as the tiles:
-    * "getSize() * sizeof(double)"
-    */
-   template <class T>
-   void copyNormalizedBufferToTile(T dummyTemplate,
-                                   ossim_float64* buf);
-   template <class T>
-   void copyNormalizedBufferToTile(T dummyTemplate,
-                                   ossim_float32* buf);
-   template <class T>
-   void copyNormalizedBufferToTile(T dummyTemplate,
-                                   ossim_uint32 band,
-                                   ossim_float64* buf);
-   template <class T>
-   void copyNormalizedBufferToTile(T dummyTemplate,
-                                   ossim_uint32 band,
-                                   ossim_float32* buf);
-
-   
-   template <class T>
-   void computeMinMaxPix(T dummyValue,
-                         std::vector<ossim_float64>& minBands,
-                         std::vector<ossim_float64>& maxBands) const;
-
-   template <class T>
-   void computeMinMaxNulPix(T dummyValue,
-                            std::vector<ossim_float64>& minBands,
-                            std::vector<ossim_float64>& maxBands,
-                            std::vector<ossim_float64>& nulBands) const;
-   
-   template <class T> void loadBandTemplate(T, // dummy template variable
-                                            const void* src,
-                                            const ossimIrect& src_rect,
-                                            ossim_uint32 band);
-
-   template <class T> void loadBandTemplate(T, // dummy template variable
-                                            const void* src,
-                                            const ossimIrect& src_rect,
-                                            const ossimIrect& clip_rect,
-                                            ossim_uint32 band);
-
-   template <class T> void nullTileAlphaTemplate(T,
-                                                 const ossim_uint8* src,
-                                                 const ossimIrect& src_rect,
-                                                 const ossimIrect& clip_rect,
-                                                 bool multiplyAlphaFlag=false);
-   
-   template <class T> void loadTileFromBipTemplate(T, // dummy template variable
-                                                   const void* src,
-                                                   const ossimIrect& src_rect);
-
-   template <class T> void loadTileFromBipTemplate(T, // dummy template variable
-                                                   const void* src,
-                                                   const ossimIrect& src_rect,
-                                                   const ossimIrect& clip_rect);
-   
-   template <class T> void loadTileFromBilTemplate(T, // dummy template variable
-                                                   const void* src,
-                                                   const ossimIrect& src_rect);
-   
-   template <class T> void loadTileFromBilTemplate(T, // dummy template variable
-                                                   const void* src,
-                                                   const ossimIrect& src_rect,
-                                                   const ossimIrect& clip_rect);
-   
-   template <class T> void loadTileFromBsqTemplate(T, // dummy template variable
-                                                   const void* src,
-                                                   const ossimIrect& src_rect);
-   
-   template <class T> void loadTileFromBsqTemplate(T, // dummy template variable
-                                                   const void* src,
-                                                   const ossimIrect& src_rect,
-                                                   const ossimIrect& clip_rect);
-   
-   template <class T> void unloadTileToBipTemplate(T, // dummy template variable
-                                                   void* dest,
-                                                   const ossimIrect& dest_rect,
-                                                   const ossimIrect& clip_rect) const;
-
-   template <class T> void unloadTileToBipAlphaTemplate(T, // dummy template variable
-                                                        void* dest,
-                                                        const ossimIrect& dest_rect,
-                                                        const ossimIrect& clip_rect) const;
-
-   template <class T> void unloadTileToBilTemplate(T, // dummy template variable
-                                                   void* dest,
-                                                   const ossimIrect& dest_rect,
-                                                   const ossimIrect& clip_rect) const;
-
-   template <class T> void unloadTileToBsqTemplate(T, // dummy template variable
-                                                   void* dest,
-                                                   const ossimIrect& dest_rect,
-                                                   const ossimIrect& clip_rect) const;
-
-   template <class T> void unloadBandTemplate(T, // dummy template variable
-                                              void* dest,
-                                              const ossimIrect& dest_rect,
-                                              const ossimIrect& clip_rect,
-                                              ossim_uint32 band) const;
-
-   template <class T> void unloadBandToBsqTemplate(T, // dummy template variable
-                                                   void* dest,
-                                                   ossim_uint32 src_band,
-                                                   ossim_uint32 dest_band,
-                                                   const ossimIrect& dest_rect,
-                                                   const ossimIrect& clip_rect,
-                                                   OverwriteBandRule ow_type=NULL_RULE) const;
-
-   /**
-    * @brief initializeDefaults() Resizes and sets min/max/null arrays to
-    * number of bands and some default value for scalar type.
-    */
-   virtual void initializeDefaults();
-
-   /**
-    * @brief initializeMinDefault() Resizes theMinPixelValue array to number
-    * of bands and initializes to the default min for scalar type.
-    */
-   virtual void initializeMinDefault();
-
-   /**
-    * @brief initializeMaxDefault() Resizes theMaxPixelValue array to number
-    * of bands and initializes to the default max for scalar type.
-    */
-   virtual void initializeMaxDefault();
-
-   /**
-    * @brief initializeNullDefault() Resizes theNullPixelValue array to number
-    * of bands and initializes to the default null for scalar type.
-    */
-   virtual void initializeNullDefault();
-
-   virtual bool isEqualTo(const ossimDataObject& rhs,
-                          bool deepTest=false)const;
-   
-   bool hasSameDimensionsAs(ossimImageData* data)const
-   {
-      bool result = false;
-      if(data)
-      {
-         result = ((m_spatialExtents.size() ==
-                    data->m_spatialExtents.size())&&
-                   (m_spatialExtents[0] == data->m_spatialExtents[0])&&
-                   (m_spatialExtents[1] == data->m_spatialExtents[1])&&
-                   (m_scalarType == data->m_scalarType));
-      }
-      return result;
-   }
-   
-   /**  Null pixel value for each band. */
-   std::vector<ossim_float64> m_nullPixelValue;
-
-   /** Min pixel value for each band. */
-   std::vector<ossim_float64> m_minPixelValue;
-
-   /** Max pixel value for each band. */
-   std::vector<ossim_float64> m_maxPixelValue;
-
-   /** Alpha channel */
-   std::vector<ossim_uint8> m_alpha;
-   
-   ossimIpt m_origin;
-
-   /** Indicates data contains palette indexes. */
-   bool m_indexedFlag;
-
-private:
-
-   
-TYPE_DATA
-};
-
-inline bool ossimImageData::hasAlpha() const
-{
-   return (m_alpha.size()?true:false);
-}
-
-inline ossimIrect ossimImageData::getImageRectangle() const
-{
-   ossimIpt lr(m_origin.x + getWidth()  - 1,
-               m_origin.y + getHeight() - 1);
-   
-   return ossimIrect(m_origin, lr);
-}
-
-inline const ossim_float64* ossimImageData::getNullPix()const
-{
-   return ( m_nullPixelValue.size() > 0 ? &m_nullPixelValue.front() : 0 );
-}
-
-inline const ossim_float64* ossimImageData::getMinPix()const
-{
-   return ( m_minPixelValue.size() > 0 ? &m_minPixelValue.front() : 0 );
-}
-
-inline const ossim_float64* ossimImageData::getMaxPix()const
-{
-   return ( m_maxPixelValue.size() > 0 ? &m_maxPixelValue.front() : 0 );
-}
-
-inline ossim_float64 ossimImageData::getNullPix(ossim_uint32 band) const
-{
-   return ( band < m_nullPixelValue.size() ? m_nullPixelValue[band] :
-            ossim::defaultNull( getScalarType() ) );
-}
-      
-inline ossim_float64 ossimImageData::getMinPix(ossim_uint32 band) const
-{
-   return ( band < m_minPixelValue.size() ? m_minPixelValue[band] :
-            ossim::defaultMin( getScalarType() ) );
-}
-
-inline ossim_float64 ossimImageData::getMaxPix(ossim_uint32 band) const
-{
-   return ( band < m_maxPixelValue.size() ? m_maxPixelValue[band] :
-            ossim::defaultMax( getScalarType() ) );
-}
-
-inline ossim_uint32 ossimImageData::getHashId()const
-{
-   const unsigned char *bufx = (unsigned char*)(&m_origin.x);
-   const unsigned char *bufy = (unsigned char*)(&m_origin.y);
-   return (ossim_uint32)(bufx[0]*101 + bufx[1]*103 +
-                         bufx[2]*107 + bufx[3]*109 +
-                         bufy[0]*139 + bufy[1]*149 +
-                         bufy[2]*151 + bufy[3]*157);
-}
-
-#endif
diff --git a/include/ossim/imaging/ossimImageDataFactory.h b/include/ossim/imaging/ossimImageDataFactory.h
deleted file mode 100644
index d04110c..0000000
--- a/include/ossim/imaging/ossimImageDataFactory.h
+++ /dev/null
@@ -1,63 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description:
-//
-//*************************************************************************
-// $Id: ossimImageDataFactory.h 13474 2008-08-22 14:20:42Z gpotts $
-#ifndef ossimImageDataFactory_HEADER
-#define ossimImageDataFactory_HEADER
-
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <OpenThreads/Mutex>
-class ossimSource;
-class ossimImageSource;
-
-
-/*!
- * This factory should be called by all image source producers to allocate
- * an image tile.
- */
-class OSSIM_DLL ossimImageDataFactory
-{
-public:
-   virtual ~ossimImageDataFactory();
-   static ossimImageDataFactory* instance();
-
-   virtual ossimRefPtr<ossimImageData> create(ossimSource* owner,
-                                              ossimScalarType scalar,
-                                              ossim_uint32 bands = 1)const;
-
-   virtual ossimRefPtr<ossimImageData> create(ossimSource* owner,
-                                              ossimScalarType scalar,
-                                              ossim_uint32 bands,
-                                              ossim_uint32 width,
-                                              ossim_uint32 height)const;
-   
-   virtual ossimRefPtr<ossimImageData> create(
-      ossimSource* owner,
-      ossim_uint32 bands,
-      ossimImageSource* inputSource)const;
-   
-   
-   virtual ossimRefPtr<ossimImageData> create(
-      ossimSource* owner,
-      ossimImageSource* inputSource)const;
-   
-protected:
-   ossimImageDataFactory(); // hide
-   ossimImageDataFactory(const ossimImageDataFactory&){}//hide
-   void operator = (ossimImageDataFactory&){}// hide
-   
-   static ossimImageDataFactory* theInstance;
-   static OpenThreads::Mutex theInstanceMutex;
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimImageDataHelper.h b/include/ossim/imaging/ossimImageDataHelper.h
deleted file mode 100644
index a8a1f77..0000000
--- a/include/ossim/imaging/ossimImageDataHelper.h
+++ /dev/null
@@ -1,101 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author: Garrett Potts (gpotts at imagelinks)
-//
-//*************************************************************************
-// $Id: ossimImageDataHelper.h 9968 2006-11-29 14:01:53Z gpotts $
-#ifndef ossimImageDataHelper_HEADER
-#define ossimImageDataHelper_HEADER
-
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/base/ossimPolyArea2d.h>
-#include <ossim/base/ossimRgbVector.h>
-
-class ossimImageDataHelper
-{
-public:
-   /*!
-    * This must be a valid image data object
-    */
-   ossimImageDataHelper(ossimImageData* imageData=0);
-
-   void setImageData(ossimImageData* imageData);
-
-   void fill(const double* values,
-             const ossimIrect& rect,
-             bool clipPoly=true);
-
-   void fill(const double* values,
-             std::vector<ossimPolygon>& regionList,
-             bool clipPoly=true);
-   
-   void fill(const ossimRgbVector& color,
-             std::vector<ossimPolygon>& regionList,
-             bool clipPoly=true);
-   
-   void fill(const ossimRgbVector& color,
-             const ossimIrect& rect,
-             bool clipPoly=true);
-   /*!
-    * Values must be of the same type as the image data that
-    * we are writing to.
-    */
-   void fill(const double*  values,
-             const ossimPolygon& region,
-             bool clipPoly=true);
-
-   void fill(const ossimRgbVector& color,
-             const ossimPolygon& region,
-             bool clipPoly=true);
-   /*!
-    * The input is assumed to have the same origin, size and scalar
-    * as this object.  This will implement a selection
-    */
-   void copyInputToThis(const void* input,
-                        const ossimPolygon& region,
-                        bool clipPoly=true);
-
-   ossimImageData* theImageData;
-   
-
-protected:
-   ossimIpt        theOrigin;
-   ossimIrect      theImageRectangle;
-   ossimPolyArea2d thePolyImageRectangle;
-   
-   template <class T>
-   void fill(T dummyVariable,
-             const double* values,
-             const ossimPolygon& region,
-             bool clipPoly);
-
-   template <class T>
-   void fill(T dummyVariable,
-             const double* values,
-             const ossimIrect& region,
-             bool clipPoly);
-   
-   template <class T>
-   void copyInputToThis(const T* inputBuf,
-                        const ossimPolygon& region,
-                        bool clipPoly);
-
-   template <class T>
-   void fill(T dummyVariable,
-             const double* values,
-             const ossimPolygon& region);
-   template <class T>
-   void fill(T dummyVariable,
-             const double* values,
-             const ossimIrect& region);
-   
-   template <class T>
-   void copyInputToThis(const T* inputBuf,
-                        const ossimPolygon& region);
-
-   
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimImageGaussianFilter.h b/include/ossim/imaging/ossimImageGaussianFilter.h
deleted file mode 100644
index cd55cfb..0000000
--- a/include/ossim/imaging/ossimImageGaussianFilter.h
+++ /dev/null
@@ -1,80 +0,0 @@
-//*******************************************************************
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// class ossimImageGaussianFilter : tile source
-//*******************************************************************
-// $Id: ossimImageGaussianFilter.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimImageGaussianFilter_HEADER
-#define ossimImageGaussianFilter_HEADER
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-#include <ossim/imaging/ossimConvolutionFilter1D.h>
-
-/**
- * class for symmetric Gaussian filtering
- * implemented as two separable horizontal/vertical gaussian filters
- *
- * PROPERTIES:
- * -GaussStd is the standard deviation of the gaussian
- *  (filter widths are equal to 2*floor(2.5*GaussStd+0.5)+1)
- * -strictNoData selects the behaviour for NODATA pixels
- *   true  : any NODATA pixels in the convolution will Nullify the center pixel
- *   false : center pixel will be NODATA only if it was NODATA before 
- *     other NODATA pixels are processed as zero in the convolution calculation
- */
-class OSSIM_DLL ossimImageGaussianFilter : public ossimImageSourceFilter
-{
-public:
-  /** 
-   * own methods
-   */
-   ossimImageGaussianFilter();
-
-   inline ossim_float64 getGaussStd()const { return theGaussStd; }
-   void setGaussStd(const ossim_float64& v);
-
-   inline bool isStrictNoData()const { return theStrictNoData; }
-   void setStrictNoData(bool aStrict);
-
-  /** 
-   * inherited methods
-   */
-   virtual void initialize();
-   
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect &tileRect,ossim_uint32 resLevel=0);
-
-   virtual void connectInputEvent(ossimConnectionEvent &event);
-   virtual void disconnectInputEvent(ossimConnectionEvent &event);
-
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-   virtual bool loadState(const ossimKeywordlist& kwl,const char* prefix = 0);   
-   virtual bool saveState(ossimKeywordlist& kwl,const char* prefix = 0)const;
-   
-protected:
-   virtual ~ossimImageGaussianFilter();
-  /**
-   * protected methods
-   */
-   void initializeProcesses();
-   void updateKernels();
-
-  /**
-   * parameters
-   */
-   ossim_float64 theGaussStd;
-   bool          theStrictNoData;
-
-  /**
-   * subprocesses
-   */
-   ossimRefPtr<ossimConvolutionFilter1D> theHF; //horizontal filter
-   ossimRefPtr<ossimConvolutionFilter1D> theVF; //vertical filter
-
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimImageGaussianFilter_HEADER */
diff --git a/include/ossim/imaging/ossimImageGeometry.h b/include/ossim/imaging/ossimImageGeometry.h
deleted file mode 100644
index a50e01d..0000000
--- a/include/ossim/imaging/ossimImageGeometry.h
+++ /dev/null
@@ -1,443 +0,0 @@
-//***********************************************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Oscar Kramer (oscarkramer at yahoo.com)
-//
-// Description: Class declaration of ossimImageGeometry.
-//
-//***********************************************************************************************
-// $Id: ossimImageGeometry.h 3102 2012-01-18 15:30:20Z oscar.kramer $
-
-#ifndef ossimImageGeometry_HEADER
-#define ossimImageGeometry_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimRtti.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/base/ossim2dTo2dTransform.h>
-#include <vector>
-#include <ossim/matrix/newmat.h>
-#include <ossim/base/ossimDpt3d.h>
-#include <ossim/base/ossimAdjustableParameterInterface.h>
-
-// Forward class declarations:
-class ossimDrect;
-class ossimIrect;
-
-//***********************************************************************************************
-//! Container class that holds both 2D transform and 3D projection information for an image
-//! Only one instance of this is alive per image. This is  the object that is returned from
-//! a call to ossimImageSource::getImageGeometry()
-//! 
-//! All images in OSSIM have at least a 2D transformation from local (relative to start of file)
-//! to full-image coordinates. Often this transform is an identity transform (does nothing). In 
-//! some cases however, the first pixel in the file does not correspond to the upper-left pixel of
-//! the original, full image. Since the image's sensor model may only apply to full-image pixel 
-//! coordinates, it is necessary to reference the latter when making computing ground point 
-//! location.  Also the local image could be a reduced resolution level of the full image.  So
-//! the image could be a decimated sub image of the full image.
-//!
-//! Additionally, images typically are accompanied by some form of metadata that defines the mapping
-//! from 2D image coordinates to 3D world coordinates. This mapping may be in the form of a map
-//! projection for orthorectified images, or a perspective projection such as a sensor model.
-//! 
-//! This object class maintains both 2D transform and 3D projection information for the associated
-//! image. This object will typically be created and "owned" by the image handler object. Therefore,
-//! only one copy per image will exist at a time.
-//!
-//! Notes:
-//! 1) Shifts are relative to "full image space".  So if you have a sub image from r2 the shift
-//!    given to the transform should be relative to "full image space".
-//
-//! 2) A decimation of 1.0 is the full image.  This may or may not be r0 as r0 can be decimated.
-//!
-//***********************************************************************************************
-class OSSIM_DLL ossimImageGeometry : public ossimObject
-{
-public:
-   typedef std::vector<ossim_float64> DeltaParamList;
-   
-   //! Default constructor defaults to unity transform with no projection.
-   ossimImageGeometry();
-   virtual ~ossimImageGeometry();
-   
-   //! Copy constructor -- performs a deep copy. This is needed when an imageSource in the chain
-   //! needs to modify the image geometry at that point in the chain. The image geometry to the 
-   //! left of that imageSource must remain unchanged. This constructor permits that imageSource to 
-   //! maintain its own geometry based on the input geometry. All chained objects to the right
-   //! would see this alternate geometry. See ossimScaleFilter for an example of this case.
-   ossimImageGeometry(const ossimImageGeometry& copy_this);
-
-   //! Constructs with projection and transform objects available for referencing. Either pointer
-   //! can be NULL -- the associated mapping would be identity.
-   ossimImageGeometry(ossim2dTo2dTransform* transform, ossimProjection* projection);
-
-   //! rnToRn is a utility method that takes a rn resolution image point and maps it to the another
-   //! rn resolution image point.
-   //!
-   //! @param inRnPt Is a point in resolution n.
-   //! @param inResolutionLevel Is the resolution of the point inRnPt.
-   //! @param outResolutionLevel Is the resolution of the point outRnPt.
-   //! @param outRnPt Is the result of the transform.
-   //!
-   void rnToRn(const ossimDpt& inRnPt, ossim_uint32 inResolutionLevel,
-               ossim_uint32 outResolutionLevel,ossimDpt& outRnPt) const;
-   
-   //! rnToFull is a utility method that takes a rn resolution image point and maps it to the full
-   //! image point.
-   //!
-   //! @param rnPt Is a point in resolution n.
-   //! @param resolutionLevel Is the resolution of the point rnPt.  a value of 0 is the local image
-   //! @param fullPt Is the result of the transform
-   //!
-   void rnToFull(const ossimDpt& rnPt, ossim_uint32 resolutionLevel, ossimDpt& fullPt) const;
-
-   //! @brief fullToRn is a utility method that takes a full image point and maps it to a rn
-   //! resolution image point.
-   //! 
-   //! @param fullPt Is a point in full image space.
-   //! @param resolutionLevel Is the resolution of the point rnPt. A value of 0 is the local image.
-   //! @param fullPt Is the result of the transform
-   void fullToRn(const ossimDpt& fullPt, ossim_uint32 resolutionLevel, ossimDpt& rnPt) const;
-
-   //! rnToWorld is a utility method that takes a rn resolution image point and maps it to the 
-   //! world point.
-   //!
-   //! @param rnPt Is a point in resolution n.
-   //! @param resolutionLevel Is the resolution of the point rnPt.  a value of 0 is the local image
-   //! @param wpt Is the result of the transform
-   //!
-   void rnToWorld(const ossimDpt& rnPt, ossim_uint32 resolutionLevel, ossimGpt& wpt) const;
-   
-   //! worldToRn is a utility method that takes a world point allows one to transform all the way back to
-   //! an rn point.
-   //!
-   //! @param wpt Ground point.
-   //! @param resolutionLevel Is the resolution of the point rnPt.  a value of 0 is the local image
-   //! @param rnPt Is the resoltion point.
-   //!
-   void worldToRn(const ossimGpt& wpt, ossim_uint32 resolutionLevel, ossimDpt& rnPt) const;
-
-   //! Exposes the 3D projection from image to world coordinates. The caller should verify that
-   //! a valid projection exists before calling this method. Returns TRUE if a valid ground point
-   //! is available in the ground_pt argument. This method depends on the existence of elevation
-   //! information. If no DEM is available, the results will be incorrect or inaccurate.
-   bool localToWorld(const ossimDpt& local_pt, ossimGpt& world_pt) const;
-
-   //! Exposes the 3D projection from image to world coordinates given a constant height above 
-   //! ellipsoid. The caller should verify that a valid projection exists before calling this
-   //! method. Returns TRUE if a valid ground point is available in the ground_pt argument.
-   bool localToWorld(const ossimDpt& local_pt, const double& h_ellipsoid, ossimGpt& world_pt) const;
-
-   //! Exposes the 3D world-to-local image coordinate reverse projection. The caller should verify 
-   //! that a valid projection exists before calling this method. Returns TRUE if a valid image 
-   //! point is available in the local_pt argument.
-   bool worldToLocal(const ossimGpt& world_pt, ossimDpt& local_pt) const;
-
-   //! Sets the transform to be used for local-to-full-image coordinate transformation
-   void setTransform(ossim2dTo2dTransform* transform);
-
-   //! Sets the projection to be used for local-to-world coordinate transformation
-   void setProjection(ossimProjection* projection);
-
-   //! Access methods for transform (may be NULL pointer).
-   const ossim2dTo2dTransform* getTransform() const { return m_transform.get(); }
-   ossim2dTo2dTransform*       getTransform()       { return m_transform.get(); }
-
-   //! Access methods for projection (may be NULL pointer).
-   const ossimProjection* getProjection() const { return m_projection.get(); }
-   ossimProjection*       getProjection()       { return m_projection.get(); }
-
-   /**
-    * @return const ossimMapProjection* or NULL if projection not set or not
-    * derived from ossimMapProjection.
-    */
-   const ossimMapProjection* getAsMapProjection() const
-   { return dynamic_cast<const ossimMapProjection*>( m_projection.get() ); }
-
-   /**
-    * @return ossimMapProjection* or NULL if projection not set or not
-    * derived from ossimMapProjection.
-    */
-   ossimMapProjection*       getAsMapProjection()
-   { return dynamic_cast<ossimMapProjection*>( m_projection.get() ); }
-
-   //! Returns TRUE if valid projection defined
-   bool hasProjection() const { return m_projection.valid(); }
-   
-   //! Returns TRUE if valid transform defined
-   bool hasTransform() const { return m_transform.valid(); }
-
-   //! Returns TRUE if this geometry is sensitive to elevation
-   bool isAffectedByElevation() const;
-
-   //! Returns the GSD associated with this image in the active projection. Note that this only
-   //! makes sense if there is a projection associated with the image. Returns NaNs if no 
-   //! projection defined.
-   ossimDpt getMetersPerPixel() const;
-
-   /**
-    * @brief Get the ground sample distance(GSD) associated with this image
-    * in the active projection.
-    *
-    * GSD is taken from projection if there is no transform set; else,
-    * taken from three localToWorld calls (one pixel apart) at the image
-    * center.  If the projection or the image size(if needed) is not set the
-    * point will be set to NaNs.
-    * 
-    * @param gsd Point to intialize with GSD.
-    * 
-    * @note This only makes sense if there is a projection associated with
-    * the image.
-    *
-    * @note Result should be checked for NaNs after call.
-    */
-   void getMetersPerPixel( ossimDpt& gsd ) const;
-
-   //! Returns the resolution of this image in degrees/pixel. Note that this only
-   //! makes sense if there is a projection associated with the image. Returns NaNs if no 
-   //! projection defined.
-   ossimDpt getDegreesPerPixel() const;
-
-   /**
-    * @brief Get the resolution of this image in degrees/pixel.
-    *
-    * Degrees/pixel is taken from projection if there is no transform set;
-    * else, taken from three localToWorld calls (one pixel apart) at the image
-    * center.  If the projection or the image size(if needed) is not set the
-    * point will be set to NaNs.
-    * 
-    * @param dpp Point to intialize with degrees/pixel.
-    * 
-    * @note This only makes sense if there is a projection associated with
-    * the image.
-    *
-    * @note Result should be checked for NaNs after call.
-    */
-   void getDegreesPerPixel( ossimDpt& dpp ) const;
-
-   //! Assigns the ossimGpts with the ground coordinates of the four corresponding image 
-   //! corner points. Returns true if points are valid.
-   bool getCornerGpts(ossimGpt& ul, ossimGpt& ur, ossimGpt& lr, ossimGpt& ll) const;
-
-   /**
-    * @brief Get the latitude, longitude of the tie point.
-    *
-    * This is the bounding upper left point of the image which is not
-    * necessarily the image (0, 0) point.
-    * 
-    * @param tie ossimGpt to assign.
-    *
-    * @param edge If true the tie point is shifted up and to the right by
-    * half the gsd.
-    *
-    * @note Requires projection and image size to be initialized or the
-    * latitude and longitue will be set to nan.
-    *
-    * @note The height parameter of the ossimGpt is not touched by this method.
-    */
-   void getTiePoint(ossimGpt& tie, bool edge) const;
-
-   /**
-    * @brief Get the easting, northing of the tie point.
-    *
-    * This is the bounding upper left point of the image which is not
-    * necessarily the image (0, 0) point.
-    * 
-    * @param tie ossimDpt to assign.
-    *
-    * @param edge If true the tie point is shifted up and to the right by
-    * half the gsd.
-    * 
-    * @note Requires projection and image size to be initialized or the
-    * easting and northing will be set to nan.
-    */
-   void getTiePoint(ossimDpt& tie, bool edge) const;
-
-   //! Prints contents to output stream.
-   std::ostream& print(std::ostream& out) const;
-
-   //! Returns TRUE if argument geometry has exactly the same instances for transform and 
-   //! m_projection. This should be expanded to permit different instances of same transforms
-   bool operator==(const ossimImageGeometry& compare_this) const;
-
-   //! Replaces any existing transform and projection with those in the copy_this object
-   const ossimImageGeometry& operator=(const ossimImageGeometry& copy_this);
-
-   //! Returns the decimation factor from R0 for the resolution level specified. For r_index=0, the 
-   //! decimation factor is by definition 1.0. For the non-discrete case, r_index=1 returns a 
-   //! decimation of 0.5. If the vector of discrete decimation factors (m_decimationFactors) is 
-   //! empty, the factor will be computed as f=1/2^n
-   ossimDpt decimationFactor(ossim_uint32 r_index) const;
-
-   /**
-    * @brief Method to get the decimation factor for a given resolution
-    * level.
-    *
-    * If the array of decimations is not initialized by owner, the default is:
-    * r_index=0 is by definition 1.0.
-    * r_index=n Where n is some level the factor will be computed as f=1/2^n.
-    *
-    * @param resLevel Reduced resolution set for requested decimation.
-    *
-    * @param result ossimDpt to initialize with requested decimation.
-    */
-   void decimationFactor(ossim_uint32 r_index, ossimDpt& result) const;
-
-   /**
-    * @brief Gets array of all decimation levels.
-    * @param decimations Array to initialiaze.
-    */
-   void decimationFactors(std::vector<ossimDpt>& decimations) const;
-
-   //! Sets the decimation scheme to a discrete list of decimation factors.
-   void setDiscreteDecimation(const std::vector<ossimDpt>& decimation_list) 
-      { m_decimationFactors = decimation_list; }
-
-   //! @return The number of decimation factors
-   ossim_uint32 getNumberOfDecimations()const
-   {
-      return (ossim_uint32)m_decimationFactors.size();
-   }
-   void setImageSize(const ossimIpt& size)
-   {
-      m_imageSize = size;
-   }
-   const ossimIpt& getImageSize()const
-   {
-      return m_imageSize;
-   }
-
-   /**
-    * @brief Get the bounding rect of (0, 0) to (imageSize.x-1, imageSize.y-1).
-    *
-    * Relies on image size being initialized.
-    *
-    * @param bounding_rect Initialized by this method.  Will do a
-    * ossimIrect::makeNan() if the image size is not initialized.
-    */
-   void getBoundingRect(ossimIrect& bounding_rect) const;
-   void getBoundingRect(ossimDrect& bounding_rect) const; // Overloaded for drect.
-   
-   //! Creates a new instance of ossimImageGeometry with the same transform and projection.
-   //! Overrides base-class version requiring loadState() and saveState() (not implemented yet)
-   virtual ossimObject* dup() const { return new ossimImageGeometry(*this); }
-
-   //! Attempts to initialize a transform and a projection given the KWL. Returns TRUE if no
-   //! error encountered.
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-
-   //! Saves the transform (if any) and projection (if any) states to the KWL.
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0) const;
-
-   /**
-    * @brief Set m_targetRrds data member.
-    *
-    * This is used by methods worldToRn and localToWorld that do not take a rrds
-    * argument and methods rnToWorld and worldToRn.  If the target rrds is set to 2,
-    * then the resulting point from worldToLocal is relative to reduced
-    * resolution level 2.  Vice versa for localToWorld it is assumed the local
-    * point is relative to the target
-    * reduced resolution data set.
-    *
-    * @param rrds Target (zero based) reduced resolution data set.
-    */
-   void setTargetRrds(ossim_uint32 rrds);
-
-   /**
-    * @return The target zero based reduced resolution data set used for localToWorld and
-    * worldToLocal.
-    * @see setTargetRrds 
-    */
-   ossim_uint32 getTargetRrds() const;
-
-   //! @brief  Changes the GSD and image size to reflect the scale provided.
-   //! @param scale  The scale to be applied in x and y directions
-   //! @param recenterTiePoint If true the will adjust the tie point by shifting the original tie 
-   //! to the upper left corner, applying scale, then shifting back by half of either the new
-   //! theDeltaLat/lon or theMetersPerPixel depending on if underlying projection isGeographic.
-   void applyScale(const ossimDpt& scale, bool recenterTiePoint);
-
-   virtual bool isEqualTo(const ossimObject& obj, ossimCompareType compareType = OSSIM_COMPARE_FULL)const;
-
-
-
-   // If we have an adjustable parameter interface return one.
-   //
-   // @return a pointer to an ossimAdjustableParameterInterface or NULL if no
-   //         adjustable paramters exist
-   //
-   virtual ossimAdjustableParameterInterface* getAdjustableParameterInterface();
-   virtual const ossimAdjustableParameterInterface* getAdjustableParameterInterface()const;
-   
-   
-   // Compute partials from image to ground with respect to the adjustable parameters.
-   //
-   //
-   bool computeImageToGroundPartialsWRTAdjParam(ossimDpt& result,
-                                                          const ossimGpt& gpt,
-                                                          ossim_uint32 idx,
-                                                          ossim_float64 paramDelta=1.0);
-   bool computeImageToGroundPartialsWRTAdjParams(NEWMAT::Matrix& result,
-                                                           const ossimGpt& gpt,
-                                                           ossim_float64 paramDelta=1.0);
-   bool computeImageToGroundPartialsWRTAdjParams(NEWMAT::Matrix& result,
-                                                           const ossimGpt& gpt,
-                                                           const DeltaParamList& deltas);
-   
-   bool computeGroundToImagePartials(NEWMAT::Matrix& result,
-                                     const ossimGpt& gpt,
-                                     const ossimDpt3d& deltaLlh);
-   
-   bool computeGroundToImagePartials(NEWMAT::Matrix& result,
-                                     const ossimGpt& gpt);
-
-   /**
-    * @return Returns the angle to "up is up" in decimal degrees, 0.0 if image
-    * is not affected by elevation, ossim::nan on error.
-    */
-   ossim_float64 upIsUpAngle() const;
-
-   /**
-    * @return Returns the angle to "north up" in decimal degrees, ossim::nan
-    * on error.
-    */
-   ossim_float64 northUpAngle() const;
-   
-protected:
-   //! @brief Method to back out decimation of a point.
-   //! @param rnPt Is a point in resolution n.
-   //! @param resolutionLevel Is the resolution of the point rnPt.
-   //! @param outPt Is the result of the transform a non-decimated point.
-   void undecimatePoint(const ossimDpt& rnPt,
-                        ossim_uint32 resolutionLevel,
-                        ossimDpt& outPt) const;
-
-   //! @brief Method to apply decimation of a point.
-   //! @param inPt Is a point with no decimation.
-   //! @param resolutionLevel Is the resolution of the point rnPt.
-   //! @param rnPt Is the result of the transform
-   void decimatePoint(const ossimDpt& inPt,
-                      ossim_uint32 resolutionLevel,
-                      ossimDpt& rnPt) const;
-
-   ossimRefPtr<ossim2dTo2dTransform> m_transform;   //!< Maintains local_image-to-full_image transformation 
-   ossimRefPtr<ossimProjection>      m_projection;  //!< Maintains full_image-to-world_space transformation
-   std::vector<ossimDpt>             m_decimationFactors; //!< List of decimation factors for R-levels
-   ossimIpt                          m_imageSize; // Image width and height
-
-   /** @brief Target rrds for localToWorld and worldToLocal methods. */
-   ossim_uint32                      m_targetRrds; 
-
-   TYPE_DATA
-};
-
-#endif /* #ifndef ossimImageGeometry_HEADER */
diff --git a/include/ossim/imaging/ossimImageGeometryFactory.h b/include/ossim/imaging/ossimImageGeometryFactory.h
deleted file mode 100644
index 4c20353..0000000
--- a/include/ossim/imaging/ossimImageGeometryFactory.h
+++ /dev/null
@@ -1,53 +0,0 @@
-//*****************************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description: Class declaration of ossimImageGeometryFactory.
-//
-//*****************************************************************************
-// $Id$
-#ifndef ossimImageGeometryFactory_HEADER
-#define ossimImageGeometryFactory_HEADER 1
-
-#include <ossim/imaging/ossimImageGeometryFactoryBase.h>
-
-class ossim2dTo2dTransform;
-class ossimNitfTileSource;
-class ossimProjection;
-
-class OSSIM_DLL ossimImageGeometryFactory : public ossimImageGeometryFactoryBase
-{
-public:
-   static ossimImageGeometryFactory* instance();
-   virtual ossimImageGeometry* createGeometry(const ossimString& typeName)const;
-   virtual ossimImageGeometry* createGeometry(const ossimKeywordlist& kwl,
-                                              const char* prefix=0)const;
-   virtual ossimImageGeometry* createGeometry(const ossimFilename& filename,
-                                              ossim_uint32 entryIdx)const;
-   virtual bool extendGeometry(ossimImageHandler* handler)const;
-   
-   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
-   
-   /**
-    * This is a utility method used by crateGeoemtry that takes an image handler
-    */
-   virtual ossim2dTo2dTransform* createTransform(ossimImageHandler* handler)const;
-
-   /**
-    * @brief Utility method to create a projection from an image handler.
-    * @param handler The image handler to create projection from.
-    * @return Pointer to an ossimProjection on success, null on error.
-    */
-   virtual ossimProjection* createProjection(ossimImageHandler* handler) const;
-   
-protected:
-   ossimImageGeometryFactory();
-
-   virtual ossim2dTo2dTransform* createTransformFromNitf(ossimNitfTileSource* handler)const;
-   
-   static ossimImageGeometryFactory* m_instance;
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimImageGeometryFactoryBase.h b/include/ossim/imaging/ossimImageGeometryFactoryBase.h
deleted file mode 100644
index 1f732de..0000000
--- a/include/ossim/imaging/ossimImageGeometryFactoryBase.h
+++ /dev/null
@@ -1,44 +0,0 @@
-//**************************************************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description: Class declaration of ossimImageGeometryFactoryBase. See .h file for class documentation.
-//
-//**************************************************************************************************
-// $Id$
-#ifndef ossimImageGeometryFactoryBase_HEADER
-#define ossimImageGeometryFactoryBase_HEADER
-#include <ossim/base/ossimBaseObjectFactory.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-
-class ossimImageHandler;
-class OSSIM_DLL ossimImageGeometryFactoryBase : public ossimBaseObjectFactory
-{
-public: 
-   /**
-    * Creates an object given a type name.
-    */
-   virtual ossimObject* createObject(const ossimString& typeName)const
-   {
-      return createGeometry(typeName);
-   }
-   
-   /**
-    * Creates and object given a keyword list.
-    */
-   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
-                                     const char* prefix=0)const
-   {
-      return createGeometry(kwl, prefix);
-   }
-   
-   virtual ossimImageGeometry* createGeometry(const ossimString& typeName)const=0;
-   virtual ossimImageGeometry* createGeometry(const ossimKeywordlist& kwl,
-                                              const char* prefix=0)const=0;
-   virtual ossimImageGeometry* createGeometry(const ossimFilename& filename,
-                                              ossim_uint32 entryIdx)const = 0;
-   virtual bool extendGeometry(ossimImageHandler* handler)const=0;
-};
-#endif
diff --git a/include/ossim/imaging/ossimImageGeometryRegistry.h b/include/ossim/imaging/ossimImageGeometryRegistry.h
deleted file mode 100644
index 5ae90ca..0000000
--- a/include/ossim/imaging/ossimImageGeometryRegistry.h
+++ /dev/null
@@ -1,74 +0,0 @@
-//**************************************************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description: Class declaration of ossimImageGeometryRegistry. See .h file for class documentation.
-//
-//**************************************************************************************************
-// $Id$
-#ifndef ossimImageGeometryRegistry_HEADER
-#define ossimImageGeometryRegistry_HEADER
-#include <ossim/base/ossimConstants.h>
-#include <ossim/imaging/ossimImageGeometryFactoryBase.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/base/ossimFactoryListInterface.h>
-class OSSIM_DLL ossimImageGeometryRegistry : public ossimImageGeometryFactoryBase,
-                                             public ossimFactoryListInterface<ossimImageGeometryFactoryBase,
-                                                                              ossimImageGeometry>
-{
-public:
-   virtual ~ossimImageGeometryRegistry(){m_instance=0;}
-   static ossimImageGeometryRegistry* instance();
-   
-   
-   virtual ossimImageGeometry* createGeometry(const ossimString& typeName)const;
-   virtual ossimImageGeometry* createGeometry(const ossimKeywordlist& kwl,
-                                              const char* prefix=0)const;
-   virtual ossimImageGeometry* createGeometry(const ossimFilename& filename,
-                                              ossim_uint32 entryIdx)const;
-#if 0
-   /*!
-    * Creates an object given a type name.
-    */
-   virtual ossimObject* createObject(const ossimString& typeName)const
-   {
-      return createObjectFromRegistry(typeName);
-   }
-   
-   /*!
-    * Creates and object given a keyword list.
-    */
-   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
-                                     const char* prefix=0)const
-   {
-      return createObjectFromRegistry(kwl, prefix);
-   }
-#endif
-   virtual bool extendGeometry(ossimImageHandler* handler)const;
-   
-   /*!
-    * This should return the type name of all objects in all factories.
-    * This is the name used to construct the objects dynamially and this
-    * name must be unique.
-    */
-   virtual void getTypeNameList(std::vector<ossimString>& typeList)const
-   {
-      getAllTypeNamesFromRegistry(typeList);
-   }
-   
-protected:
-   ossimImageGeometryRegistry()
-   :ossimImageGeometryFactoryBase()
-   {}
-   
-   ossimImageGeometryRegistry( const ossimImageGeometryRegistry& rhs )
-   :ossimImageGeometryFactoryBase(rhs)
-   {}
-   void operator =(const ossimImageGeometryRegistry&){}
-   static ossimImageGeometryRegistry* m_instance;
-   
-   TYPE_DATA
-};
-#endif
diff --git a/include/ossim/imaging/ossimImageHandler.h b/include/ossim/imaging/ossimImageHandler.h
deleted file mode 100644
index 929c8b6..0000000
--- a/include/ossim/imaging/ossimImageHandler.h
+++ /dev/null
@@ -1,778 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description:
-//
-// This class defines an abstract image handler which all loaders should
-// derive from.
-//
-//********************************************************************
-// $Id: ossimImageHandler.h 22187 2013-03-07 20:29:00Z dburken $
-#ifndef ossimImageHandler_HEADER
-#define ossimImageHandler_HEADER 1
-
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimNBandLutDataObject.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/imaging/ossimFilterResampler.h>
-#include <ossim/imaging/ossimImageMetaData.h>
-
-/**
- *  This class defines an abstract Handler which all image handlers(loaders)
- *  should derive from.
- */
-class OSSIMDLLEXPORT ossimImageHandler : public ossimImageSource
-{
-public:
-
-   enum ossimImageHandlerOverviewCompressionType
-   {
-      OSSIM_OVERVIEW_COMPRESSION_NONE= 0,
-      OSSIM_OVERVIEW_COMPRESSION_JPEG,
-      OSSIM_OVERVIEW_COMPRESSION_LZW,
-      OSSIM_OVERVIEW_COMPRESSION_DEFLATE,
-      OSSIM_OVERVIEW_COMPRESSION_PACKBITS
-   };
-
-   /** Constructor (default): */
-   ossimImageHandler();
-   
-   /**
-    * Destructor:
-    * Derived classes should implement.
-    */
-   virtual ~ossimImageHandler();
-   
-   /**
-    * initialize
-    * Does nothing in this class.  Implemented to satisfy pure virtual.
-    */
-   virtual void initialize();
-   
-   /**
-    *  Searches for an overview.  Uses theImageFile as a key.
-    *  If theImageFile = "foo.tif" it will look for "foo.ovr" first,
-    *  then "foo_ovr.tif" next.
-    *  Calls openOverview(const ossimFilename& overview_file)
-    *  @return true on success, false on error.
-    *  @see openOverview(const ossimFilename& overview_file)
-    */
-   virtual bool openOverview();
-
-   /**
-    *  Calls closeOverview(), then attempts to open the overview_file.
-    *  On success, theOverviewFile will be set and theOverview will be
-    *  initialized.  On failure, theOverviewFile will be cleared and
-    *  theOverview deleted and set to NULL.
-    *  @param overview_file ossimFilename representing overview file.
-    *  @return true on success, false on error.
-    *  @see closeOverview()
-    */
-   virtual bool openOverview(const ossimFilename& overview_file);
-
-   /**
-    *  If theOverview is initialized it will be deleted and set to NULL. Also
-    *  clears theOverviewFile.
-    *  @return void
-    */
-   virtual void closeOverview();
-   
-   /**
-    *  @return the image handler of the overview, if it has been
-    *  successfully opened.
-    */
-   virtual const ossimImageHandler* getOverview() const;
-
-   /**
-    *  @return true if getNumberOfReducedResSets > 1, false if not.
-    *  @see getNumberOfReducedResSets()
-    */
-   virtual bool hasOverviews() const;
-
-   /**
-    *  @return ossimFilename represents an external OSSIM overview filename.
-    */
-   virtual ossimFilename createDefaultOverviewFilename() const;
-   
-   /**
-    *  @return ossimFilename represents an external OSSIM geometry filename.
-    */
-   virtual ossimFilename createDefaultGeometryFilename() const;
-
-   /**
-    *  @return ossimFilename represents an external OSSIM metadata filename.
-    */
-   virtual ossimFilename createDefaultMetadataFilename() const;
-
-   /**
-    *  @return ossimFilename represents an external OSSIM histogram filename.
-    */
-   virtual ossimFilename createDefaultHistogramFilename() const;
-
-   /**
-    *  @return ossimFilename represents an external OSSIM valid vertices filename.
-    */
-   virtual ossimFilename createDefaultValidVerticesFilename() const;
-   
-   /**
-    *  Outputs vertices to file and updates the internal vertex
-    *  array variable "theValidImageVertices".
-    *  @param vertices Array of ossimIpts to write.
-    *  @param file Name of output file to write to.  If file is empty, the
-    *  output file will be the image file with no extension + _vertices.kwl.
-    *  So if the image is "foo.tif" you'll get "foo_vertices.kwl".
-    *  @return true on success, false on error.
-    */
-   virtual bool writeValidImageVertices(const std::vector<ossimIpt>& vertices, 
-					const ossimFilename& file=ossimFilename(""));
-
-   /**
-    *  Opens the valid image vertices file and sets theValidImageVerticesFile
-    *  variable.
-    *  @param vertices_file File name containing valid vertices for image.
-    *  @return true on success, false on error.
-    */
-   virtual bool openValidVertices(const ossimFilename& vertices_file);
-
-   /**
-    *  Creates vertices file name based on image, then tries to open.
-    *  If theImageFile = "foo.tif" it will look for "foo_vertices.kwl".
-    *  @return true on success, false on error.
-    */
-   virtual bool openValidVertices();
-
-   /**
-    *  Pure virtual open.  Derived classes must implement.
-    *  
-    *  @return Returns true on success, false on error.
-    *
-    *  @note This method relies on the data member ossimImageData::theImageFile
-    *  being set.  Callers should do a "setFilename" prior to calling this
-    *  method or use the ossimImageHandler::open that takes a file name and an
-    *  entry index.
-    */
-   virtual bool open() = 0;
-
-   /**
-    *  Opens the image file.
-    *  
-    *  @param imageFile File to open.
-    *
-    *  @param entryIndex
-    *  @return true on success, false on error.
-    */
-   virtual bool open(const ossimFilename& imageFile,
-                     ossim_uint32 entryIndex);
-
-   virtual bool open(const ossimFilename& imageFile);
-
-   /**
-    *  Deletes the overview and clears the valid image vertices.  Derived
-    *  classes should implement.
-    */
-   virtual void close();
-
-   /**
-    *  Derived classes must implement this method to be concrete.
-    *
-    *  @return true if open, false if not.
-    */
-   virtual bool isOpen()const=0;
-
-   /**
-    *  Build a histogram for image file.
-    *
-    *  @param numberOfRLevels sets the maximum number of reduced resolution
-    *  level to compute histogram for.
-    *
-    *  @return true on success, false if not open.
-    */
-   virtual bool buildHistogram(int numberOfRLevels=0);
-   
-   
-   /**
-    *  Build a histograms for all image entries.
-    *
-    *  @param numberOfRLevels sets the maximum number of reduced resolution
-    *  level to compute histogram for.
-    *
-    *  @return true on success, false if not open.
-    */
-   virtual bool buildAllHistograms(int numberOfRLevels=0);
-   
-   /**
-    *  Will build over file for theImageFile.
-    *
-    *  @param includeFullResFlag if true the full resolution layer will also
-    *  be put in the overview format.  This is handly for inefficeint formats.
-    */
-   virtual bool buildOverview(ossimImageHandlerOverviewCompressionType compressionType = OSSIM_OVERVIEW_COMPRESSION_NONE,
-                              ossim_uint32 quality = 75,
-                              ossimFilterResampler::ossimFilterResamplerType resampleType = ossimFilterResampler::ossimFilterResampler_BOX,
-                              bool includeFullResFlag=false);
-
-   /**
-    *  Will build over file for all image entries.
-    *
-    *  @param includeFullResFlag if true the full resolution layer will also
-    *  be put in the overview format.  This is handly for inefficeint formats.
-    */
-   virtual bool buildAllOverviews(ossimImageHandlerOverviewCompressionType compressionType = OSSIM_OVERVIEW_COMPRESSION_NONE,
-                                  ossim_uint32 quality = 75,
-                                  ossimFilterResampler::ossimFilterResamplerType resampleType = ossimFilterResampler::ossimFilterResampler_BOX,
-                                  bool includeFullResFlag=false);
-   
-   /**
-    *  Will build an over file for filename.
-    *  @param filename Name of image file.
-    *
-    *  @param includeFullResFlag if true the full resolution layer will also
-    *  be put in the overview format.  This is handly for inefficeint formats.
-    */
-   virtual bool buildOverview(const ossimFilename& filename,
-                              ossimImageHandlerOverviewCompressionType compressionType = OSSIM_OVERVIEW_COMPRESSION_NONE,
-                              ossim_uint32 quality = 75,
-                              ossimFilterResampler::ossimFilterResamplerType resampleType = ossimFilterResampler::ossimFilterResampler_BOX,
-                              bool includeFullResFlag=false);
-   
-   /**
-    * Returns the image geometry object associated with this tile source or
-    * NULL if non defined.  The geometry contains full-to-local image
-    * transform as well as projection (image-to-world).
-    */
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-   
-   /**
-    * Sets the image geometry object.
-    *
-    * @note Callers should note that this will override any existing
-    *       geometry.
-    *
-    * @note This does not write the geometry to disk, to do so call
-    *       one of the saveImageGeometry methods. 
-    */
-   virtual void setImageGeometry(ossimImageGeometry* geom);
-
-   /**
-    * Saves the image geometry to a file that will be made based on the image
-    * file name.
-    */
-   virtual void saveImageGeometry() const;
-   
-   /**
-    * Saves the image geometry to a file that will be made based on the image
-    * file name.
-    */
-   virtual void saveImageGeometry(const ossimFilename& geometry_file) const;   
-   
-   /**
-    *  Pure virtual, derived classes must implement.
-    *
-    *  @param resLevel Reduced resolution level to return lines of.
-    *  Default = 0
-    *
-    *  @return The number of lines for specified reduced resolution level.
-    */
-   virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel = 0) const = 0;
-
-   /**
-    *  Pure virtual, derived classes must implement.
-    *
-    *  @param resLevel Reduced resolution level to return samples of.
-    *  Default = 0
-    *
-    *  @return The number of samples for specified reduced resolution level.
-    */
-   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel = 0) const = 0;
-   
-   /**
-    * @brief Returns zero-based bounding rectangle of the image.
-    * Note sub-image offset now in ossimImageGeometry class.
-    * 
-    * @param resLevel Reduced resolution level for rectangle.
-    *
-    * @return Rectangle of reduced resolution level.
-    */
-   virtual ossimIrect getImageRectangle(ossim_uint32 resLevel = 0) const; 
-
-   /**
-    * @brief Returns zero-based bounding rectangle of the image.
-    * Same as getImageRectangle() call.  Note sub-image offset now
-    * in ossimImageGeometry class.
-    * 
-    * @param resLevel Reduced resolution level for rectangle.
-    *
-    * @return Rectangle of reduced resolution level.
-    */
-   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel = 0) const;
-
-   /**
-    * @param resLevel Reduced resolution set for requested decimation.
-    *
-    * @param result ossimDpt to initialize with requested decimation.
-    * 
-    * @note Initialized "result" with the decimation factor for the passed in
-    * resLevel.
-    * Most of the time the returned factor is a square decimation along x
-    * and y indicated by result.x and .y  = 1.0/(resLevel^2) where ^
-    * means rasing to the power of.  If the resLevel is 1 then the return
-    * decimation .5, .5. this is not the decimation to each resolution
-    * level but the total decimation from res level 0.
-    * So if resLevel is 2 then the return is .25, .25.
-    *
-    * @note Derived classes should override if the decimation is anything other
-    * than a power of two change in each direction per res level.
-    */
-   virtual void getDecimationFactor(ossim_uint32 resLevel, ossimDpt& result) const;
-
-   /**
-    * This returns all decimation for all levels.
-    */
-   virtual void getDecimationFactors(vector<ossimDpt>& decimations) const;
-
-   /**
-    * This returns the total number of decimation levels.  It is important to
-    * note that res level 0 or full resolution is included in the list and has
-    * decimation values 1.0, 1.0
-    */
-   virtual ossim_uint32 getNumberOfDecimationLevels() const;
-
-   /**
-    * This method is obsolete.  Please use getNumberOfDecimationLevels.
-    *
-    * For backwards compatibility this calls getNumberOfDecimationLevels.
-    */
-   virtual ossim_uint32 getNumberOfReducedResSets()const;
-   
-   /**
-    * Sets the filename
-    */
-   virtual void setFilename(const ossimFilename& filename);
-
-   /**
-    * Returns the filename
-    */
-   virtual const ossimFilename& getFilename()const;
-   
-   /**
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   /**
-    * @brief Determines if the passed in reslution level is valid.
-    *
-    * If this reader is used as an overview the caller should pass in a
-    * resLevel relative to the full image.
-    * 
-    * @param resLevel zero base resolution level.
-    * @return true on success, false on error.
-    */
-   virtual bool isValidRLevel(ossim_uint32 resLevel) const;
-
-   /**
-    * Connection rule.  Since image handler currently don't have any
-    * inputs this will just return false saying we can't connect anything
-    * to an image handler.
-    */
-   bool canConnectMyInputTo(ossim_int32 inputIndex,
-                            const ossimConnectableObject* object) const;
-      
-   /**
-    * ordering specifies how the vertices should be arranged.
-    * valid image vertices is basically the tightly fit convex hull
-    * of the image.  Usually an image has NULL values and are
-    * internally not upright rectangular.  This can cause
-    * problems some spatial filters.
-    *
-    * The default implementation is to return the bounding rect.
-    */
-   virtual void getValidImageVertices(vector<ossimIpt>& validVertices,
-                                      ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER,
-                                      ossim_uint32 resLevel=0)const;
-
-   /**
-    * @brief Indicates whether or not the image handler can control output
-    * band selection via the setOutputBandList method.
-    * @return true if band selector; false, if not.
-    */
-   virtual bool isBandSelector() const;
-
-   /**
-    * @brief If the image handler "isBandSeletor()" then the band selection
-    * of the output chip can be controlled.
-    *
-    * This method returns false. Derived classes that are band selectors should
-    * override.
-    *
-    * @param band_list Requested bands.
-    * 
-    * @return true on success, false on error.
-    */
-   virtual bool setOutputBandList(const std::vector<ossim_uint32>& band_list);
- 
-   /**
-    * @brief If the image handler "isBandSeletor()" then the band selection
-    * of the output are set to input or identity.  Does nothing and returns
-    * false if not a band selector.
-    * 
-    * @return If band selector, returns the output of setOutputBandList; if
-    * not, returns false.
-    */
-   virtual bool setOutputToInputBandList();
- 
-   /**
-    * @brief Convenience method to see if band list is identity.
-    * @param bandList List to check.
-    * @return true if band selector; false, if not.
-    */
-   virtual bool isIdentityBandList( const std::vector<ossim_uint32>& bandList ) const;
-   
-   /**
-    * Indicates whether or not the image is tiled internally.
-    * This implementation returns true if (getImageTileWidth() &&
-    * getImageTileHeight()) are both non zero.
-    * Override in the image handler if something else is desired.
-    * Returns true if tiled, false if not.
-    */
-   virtual bool isImageTiled() const;
-
-   /**
-    * Returns the tile width of the image or 0 if the image is not tiled.
-    * Note: this is not the same as the ossimImageSource::getTileWidth which
-    * returns the output tile width which can be different than the internal
-    * image tile width on disk.
-    */
-   virtual ossim_uint32 getImageTileWidth() const = 0;
-
-   /**
-    * Returns the tile width of the image or 0 if the image is not tiled.
-    * Note: this is not the same as the ossimImageSource::getTileWidth which
-    * returns the output tile width which can be different than the internal
-    * image tile width on disk.
-    */
-   virtual ossim_uint32 getImageTileHeight() const = 0;
-
-   virtual bool hasMetaData() const;
-
-   virtual ossimRefPtr<ossimNBandLutDataObject> getLut()const;
-
-   virtual bool hasLut() const;
-   
-   /**
-    * There is an external file with an omd extension.  this file contains
-    * additional information about the image such as the null pixel, min and
-    * max values.
-    * For general raster it will contain much more than that.
-    */
-   virtual void loadMetaData();
-
-   /**
-    * Retuns the min pixel value.  If there was an external eta data file
-    * then use the meta data from that file.  If not given then we will
-    * return the default min
-    */
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-   virtual double getNullPixelValue(ossim_uint32 band=0)const;
-
-   /**
-    * @brief convenience method to set min pixel value.
-    *
-    * Added for overview readers so that the image handler that owns the
-    * overview reader can pass on it's min value.
-    *
-    * @param band Zero based band to set.
-    *
-    * @param pix Min pixel value.
-    */
-   virtual void setMinPixelValue(ossim_uint32 band, const ossim_float64& pix);
-
-   /**
-    * @brief convenience method to set max pixel value.
-    *
-    * Added for overview readers so that the image handler that owns the
-    * overview reader can pass on it's max value.
-    *
-    * @param band Zero based band to set.
-    *
-    * @param pix Max pixel value.
-    */
-   virtual void setMaxPixelValue(ossim_uint32 band, const ossim_float64& pix);
-
-   /**
-    * @brief convenience method to set null pixel value.
-    *
-    * Added for overview readers so that the image handler that owns the
-    * overview reader can pass on it's max value.
-    *
-    * @param band Zero based band to set.
-    *
-    * @param pix Null pixel value.
-    */
-   virtual void setNullPixelValue(ossim_uint32 band, const ossim_float64& pix);
-    
-   /**
-    * @return The current entry number.
-    *
-    * @note This implementation returns 0.  Derived classes should override
-    * if of multiple entry image type.
-    */
-   virtual ossim_uint32 getCurrentEntry()const;
-   
-   /**
-    * @return The number of entries (images) in the image file.
-    */
-   virtual ossim_uint32 getNumberOfEntries()const;
-
-   /**
-    * @brief Get the name of entry as a string.
-    *
-    * This implementation clears name. Derived classes that support multiple
-    * entries and have "named" entries should re-implement to provide entry
-    * names.  Example given from HDF5 file:
-    * 
-    * entry_name: /All_Data/VIIRS-IMG-GTM-EDR-GEO_All/QF1_VIIRSGTMGEO
-    *
-    * @param entryIdx Zero based entry index. If out of range name will
-    * be cleared.
-    * 
-    * @param name Initialized by this.
-    */
-   virtual void getEntryName( ossim_uint32 entryIdx,
-                              std::string& name ) const;
-   
-   /**
-    * @param entryList This is the list to initialize with entry indexes.
-    *
-    * @note This implementation returns puts one entry "0" in the list.
-    */
-   virtual void getEntryList(std::vector<ossim_uint32>& entryList) const;
-   
-   /**
-    * @param entryStringList List to initialize with strings associated with
-    * entries.
-    *
-    * @note This implementation calls getEntryList and converts entries in
-    * the list to strings.  Derived classes that support multiple entries
-    * with associated strings should re-implement.
-    */
-   virtual void getEntryStringList(
-      std::vector<ossimString>& entryStringList) const;
-
-   /**
-    * @brief Convenience method to determine if entry index should be used for
-    * support files, e.g. file.his or file_e1.his.
-    * 
-    * @returns true if file is open, &&
-    * ( (entryList.size() > 1) || (entryList[0] != 0) )
-    * false otherwise.
-    *
-    * @note This is just a hint.  Put here as code was duplicated everywhere.
-    * Callers can do what they wish.
-    */
-   bool useEntryIndex() const;
-   
-   ossimFilename getOverviewFile()const;
-
-   /**
-    * @param entryIdx Entry number to select.
-    *
-    * @note The implementation does nothing.  Derived classes that handle
-    * multiple images should override.
-    *
-    * @return true if it was able to set the current entry and false otherwise.
-    */
-   virtual bool setCurrentEntry(ossim_uint32 entryIdx);
-   
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   
-   /**
-    * Returns the image file with extension set.
-    *
-    * Examples:
-    * 
-    * - theImageFile          = "foo.hdf"
-    * - The number of entries = 1
-    * - ext parameter         = "geom"
-    * - return of method will = "foo.geom"
-    *
-    * - theImageFile          = "foo.hdf"
-    * - The number of entries = 12
-    * - The current entry     = 3
-    * - ext parameter         = "geom"
-    * - return of method will = "foo_e3.geom"
-    *
-    * @param ext Extension to tack onto file.  Can have or have not ".", it
-    * will be added if "." is not the first character.
-    *
-    * @param set_e0_prefix If true and the number of entries = 1 then
-    * "foo.geom" would come out "foo_e0.geom" instead. Default = false.
-    * 
-    * @return theImageFile with sent extension.
-    */
-   ossimFilename getFilenameWithThisExtension(const ossimString& ext,
-                                              bool set_e0_prefix=false) const;
-   
-   ossim_uint32 getStartingResLevel() const;
-   
-   void setStartingResLevel(ossim_uint32 level);
-
-   /** @return theOpenOverviewFlag */
-   bool getOpenOverviewFlag() const;
-
-   /**
-    * @brief Sets theOpenOverviewFlag.
-    *
-    * If true opening of overviews will be attempted on normal open.  If
-    * false only the base image will be opened (shallow open).
-    * Defaulted to true in constructor.
-    */
-   void setOpenOverviewFlag(bool flag);
-   
-   /**
-    * Sets the supplementary directory
-    */
-   virtual void setSupplementaryDirectory(const ossimFilename& dir);
-   
-   /**
-    * Returns the supplementary directory
-    */
-   virtual const ossimFilename& getSupplementaryDirectory()const;
-   
-  //! Fetches the image ID. This is initialized to -1 in the constructor but is searched for in 
-  //! loadState():
-  const ossimString& getImageID() const { return theImageID; }
-
-  //! Sets the image ID in case it is externally generated
-  void setImageID(const ossimString&  id) { theImageID = id; }
-
-  //! Returns the raster pixel alignment type. OSSIM treats all alignments internally as
-  //! pixel-is-point. This is only a flag to identify the source's alignment type.
-  ossimPixelType getPixelType() const { return thePixelType; }
-
-protected:
-   
-   /**
-    * Returns the image geometry object associated with this tile source or
-    * NULL if non defined.  The geometry contains full-to-local image
-    * transform as well as projection (image-to-world).
-    *
-    * This method just looks for external .geom style override only.
-    * If you want to go through a registry then call getImageGeometry().
-    */
-   virtual ossimRefPtr<ossimImageGeometry> getExternalImageGeometry() const;
-   
-   virtual ossimRefPtr<ossimImageGeometry> getInternalImageGeometry() const;
-   
-   /**
-    * @brief Method to get an overview tile.  Derived classes should override if
-    * they have built in overviews or something different than the standard
-    * external overview file.  Image handlers can call this method from getTile
-    * in place of inlining code or if derived class needs to override this
-    * method.
-    *
-    * @param resLevel The resolution level to pull from with resLevel 0 being
-    * full res.
-    * 
-    * @param result The tile to stuff. 
-    * passing. 
-    *
-    * @return true on success false on error.  Typically this will return false
-    * if resLevel==0 unless the overview has r0.  If return is false, result
-    * is undefined so caller should handle appropriately with makeBlank or
-    * whatever.
-    */
-   virtual bool getOverviewTile(ossim_uint32 resLevel, ossimImageData* result);  
-   
-   /**
-    *  Opens file and attempts to initialize the valid image vertices.
-    *  Returns true on success, false on error.
-    */
-   bool initVertices(const char* file);
-   
-   /**
-    * Will complete the opening process.  
-    * If there are overviews it will open them. 
-    * If there is meta data it will open that and if there
-    * is valid vertices it will open that.
-    */
-   virtual void completeOpen();
-   
-   /**
-    * @brief Convenience method to set things needed in the image geometry from
-    * the image handler.  At time of writing sets the decimation and image size.
-    * @param geom ossimImageGeometry to initiale.
-    */
-   void initImageParameters(ossimImageGeometry* geom) const;
-   
-   /**
-    * @brief Virtual method determines the decimation factors at each resolution level. This
-    * base class implementation computes the decimation by considering the ratios in image size
-    * between resolution levels, with fuzzy logic for rounding ratios to the nearest power of 2
-    * if possible. Derived classes need to override this method if the decimations are provided
-    * as part of the image metadata.
-    */
-   virtual void establishDecimationFactors();
-
-   /**
-    * @brief Convenience method to set output band list.
-    *
-    * This performs range checking and calls theOverview->setOutputBandList
-    * on success.
-    * 
-    * @param inBandList The new band list.
-    * @param outBandList Band list to initialize.
-    * @return true on success, false on error.
-    */
-   virtual bool setOutputBandList(const std::vector<ossim_uint32>& inBandList,
-                                  std::vector<ossim_uint32>& outBandList);
-
-
-   ossimFilename theImageFile;
-   ossimFilename theOverviewFile;
-   ossimFilename theSupplementaryDirectory;
-   ossimRefPtr<ossimImageHandler> theOverview;
-   vector<ossimIpt> theValidImageVertices;
-   ossimImageMetaData theMetaData;
-   mutable ossimRefPtr<ossimImageGeometry> theGeometry;
-   ossimRefPtr<ossimNBandLutDataObject> theLut;
-   std::vector<ossimDpt> theDecimationFactors;
-   ossimString theImageID;
-
-   /**
-    * theStartingResLevel If set to something other than zero(default) this is
-    * indicative that the reader is an overview.
-    */
-   ossim_uint32 theStartingResLevel; // 0 being full or highest res.
-
-   /**
-    * If true opening of overviews will be attempted.  If false only the base
-    * image will be opened (shallow open). Defaulted to true in constructor.
-    */
-   bool theOpenOverviewFlag;
-   mutable ossimPixelType thePixelType; // pixel-is-point or pixel-is-area
-   
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimImageHandler_HEADER */
diff --git a/include/ossim/imaging/ossimImageHandlerFactoryBase.h b/include/ossim/imaging/ossimImageHandlerFactoryBase.h
deleted file mode 100644
index af19abf..0000000
--- a/include/ossim/imaging/ossimImageHandlerFactoryBase.h
+++ /dev/null
@@ -1,90 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimImageHandlerFactoryBase.h 22228 2013-04-12 14:11:45Z dburken $
-
-#ifndef ossimImageHandlerFactoryBase_HEADER
-#define ossimImageHandlerFactoryBase_HEADER 1
-
-#include <algorithm>
-
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/base/ossimObjectFactory.h>
-
-class ossimFilename;
-class ossimKeywordlist;
-
-class OSSIM_DLL ossimImageHandlerFactoryBase : public ossimObjectFactory
-{
-public:
-   template <class T> class UniqueList
-   {
-   public:
-      
-      void push_back(const T& value)
-      {
-         if(std::find(theList.begin(),theList.end(), value) == theList.end())
-         {
-            theList.push_back(value);
-         }
-      }
-
-      const std::vector<T>& getList()const
-      {
-         return theList;
-      }
-      ossim_uint32 size()const
-      {
-         return theList.size();
-      }
-      const T& operator[](ossim_uint32 idx)const
-      {
-         return theList[idx];
-      }
-      T& operator[](ossim_uint32 idx)
-      {
-         return theList[idx];
-      }
-   protected:
-      std::vector<T> theList;
-   };
-   
-   typedef UniqueList<ossimString> UniqueStringList;
-   typedef std::vector<ossimRefPtr<ossimImageHandler> > ImageHandlerList;
-   
-   virtual ossimImageHandler* open(const ossimFilename& fileName,
-                                   bool openOverview=true)const = 0;
-   virtual ossimImageHandler* open(const ossimKeywordlist& kwl,
-                                   const char* prefix=0)const = 0;
-
-   /**
-    * @brief Open overview that takes a file name.
-    *
-    * This default implementation returns a null ref pointer.
-    * Derived factories that have overview readers should override.
-    * 
-    * @param file File to open.
-    *
-    * @return This default implementation returns a null ref pointer.
-    */
-   virtual ossimRefPtr<ossimImageHandler> openOverview(
-      const ossimFilename& file ) const;
-
-   virtual void getImageHandlersBySuffix(ImageHandlerList& result,
-                                         const ossimString& ext)const;
-
-   virtual void getImageHandlersByMimeType(ImageHandlerList& result,
-                                           const ossimString& mimeType)const;
-
-   virtual void getSupportedExtensions(ossimImageHandlerFactoryBase::UniqueStringList& extensionList)const=0;
-   
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimImageHandlerRegistry.h b/include/ossim/imaging/ossimImageHandlerRegistry.h
deleted file mode 100644
index 5f7b0dd..0000000
--- a/include/ossim/imaging/ossimImageHandlerRegistry.h
+++ /dev/null
@@ -1,137 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author:  Garrett Potts
-//
-// Description:  Contains class definition for the class
-//               ImageHandlerRegistry.
-//
-//*******************************************************************
-//  $Id: ossimImageHandlerRegistry.h 22228 2013-04-12 14:11:45Z dburken $
-
-#ifndef ossimImageHandlerRegistry_HEADER
-#define ossimImageHandlerRegistry_HEADER 1
-
-#include <ossim/base/ossimObjectFactory.h>
-#include <ossim/base/ossimRtti.h>
-#include <ossim/imaging/ossimImageHandlerFactoryBase.h>
-#include <ossim/base/ossimFactoryListInterface.h>
-#include <vector>
-
-class ossimImageHandler;
-class ossimFilename;
-class ossimKeywordlist;
-
-class OSSIMDLLEXPORT ossimImageHandlerRegistry : public ossimObjectFactory,
-                                                public ossimFactoryListInterface<ossimImageHandlerFactoryBase, ossimImageHandler>
-{
-public:
-   virtual ~ossimImageHandlerRegistry();
-   
-   static ossimImageHandlerRegistry* instance();
-   
-
-   /**
-    * @brief open that takes a filename.
-    * @param fileName File to open.
-    * @param trySuffixFirst If true calls code to try to open by suffix first,
-    * then goes through the list of available handlers. default=true.
-    * @param openOverview If true image handler will attempt to open overview.
-    * default = true
-    * @return Pointer to image handler or null if cannot open.
-    */
-   virtual ossimImageHandler* open(const ossimFilename& fileName,
-                                   bool trySuffixFirst=true,
-                                   bool openOverview=true)const;
-   
-   /**
-    *  Given a keyword list return a pointer to an ImageHandler.  Returns
-    *  null if a valid handler cannot be found.
-    */
-   virtual ossimImageHandler* open(const ossimKeywordlist& kwl,
-                                   const char* prefix=0)const;
-   
-   /**
-    * @brief Open overview that takes a file name.
-    *
-    * This will only check readers that can be overview handlers.
-    * 
-    * @param file File to open.
-    * 
-    * @return ossimRefPtr to image handler on success or null on failure.
-    */
-   virtual ossimRefPtr<ossimImageHandler> openOverview(
-      const ossimFilename& file ) const;
-
-   /*!
-    * Creates an object given a type name.
-    */
-   virtual ossimObject* createObject(const ossimString& typeName) const;
-   
-   /*!
-    * Creates and object given a keyword list.
-    */
-   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
-                                     const char* prefix=0)const;
-
-   /**
-    * openBySuffix will call the mthod getImageHandlersBySuffix and go through
-    * each handler to try and open the file.  This should be a faster open
-    * for we do not have to do a magic number compare on all prior files and
-    * keep opening and closing files.
-    * @param openOverview If true image handler will attempt to open overview.
-    * default = true
-    */
-   virtual ossimRefPtr<ossimImageHandler> openBySuffix(const ossimFilename& file,
-                                                       bool openOverview=true)const; 
-   
-   /**
-    *
-    * Will add to the result list any handler that supports the passed in extensions
-    *
-    */
-   virtual void getImageHandlersBySuffix(ossimImageHandlerFactoryBase::ImageHandlerList& result,
-                                         const ossimString& ext)const;
-   /**
-    *
-    * Will add to the result list and handler that supports the passed in mime type
-    *
-    */
-   virtual void getImageHandlersByMimeType(ossimImageHandlerFactoryBase::ImageHandlerList& result,
-                                           const ossimString& mimeType)const;
-   
-   /*!
-    * This should return the type name of all objects in all factories.
-    * This is the name used to construct the objects dynamially and this
-    * name must be unique.
-    */
-   virtual void getTypeNameList( std::vector<ossimString>& typeList ) const;
-
-   virtual void getSupportedExtensions(
-      ossimImageHandlerFactoryBase::UniqueStringList& extensionList)const;
-
-   /**
-    * @brief Prints list of readers and properties.
-    * @param  out Stream to print to.
-    * @return std::ostream&
-    */
-   std::ostream& printReaderProps(std::ostream& out) const;
-   
-protected:
-   ossimImageHandlerRegistry();
-   ossimImageHandlerRegistry(const ossimImageHandlerRegistry& rhs);
-   const ossimImageHandlerRegistry&
-      operator=(const ossimImageHandlerRegistry& rhs);
-   
-   //static ossimImageHandlerRegistry*            theInstance;
-   
-TYPE_DATA
-};
-
-extern "C"
-{
-   OSSIM_DLL  void* ossimImageHandlerRegistryGetInstance();
-}
-
-#endif /* #ifndef ossimImageHandlerRegistry_HEADER */
diff --git a/include/ossim/imaging/ossimImageHistogramSource.h b/include/ossim/imaging/ossimImageHistogramSource.h
deleted file mode 100644
index e79d602..0000000
--- a/include/ossim/imaging/ossimImageHistogramSource.h
+++ /dev/null
@@ -1,105 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimImageHistogramSource.h 17194 2010-04-23 15:05:19Z dburken $
-#ifndef ossimImageHistogramSource_HEADER
-#define ossimImageHistogramSource_HEADER
-#include <ossim/base/ossimHistogramSource.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/base/ossimProcessInterface.h>
-#include <ossim/base/ossimConnectableObjectListener.h>
-#include <ossim/base/ossimObjectEvents.h>
-#include <ossim/base/ossimIrect.h>
-
-/*!
- * This source expects as input an ossimImageSource.
- * it will slice up the requested region into tiles and compute
- * the histogram of the passed in rectangle.
- */
-class OSSIMDLLEXPORT ossimImageHistogramSource : public ossimHistogramSource,
-                                                 public ossimConnectableObjectListener,
-                                                 public ossimProcessInterface
-{
-public:
-
-   ossimImageHistogramSource(ossimObject* owner = 0);
-   
-   virtual ossimObject* getObject();
-   virtual const ossimObject* getObject()const;
-
-   void setAreaOfInterest(const ossimIrect& rect);
-
-   ossimIrect getAreaOfInterest()const;
-
-   void getAreaOfInterest(ossimIrect& rect)const;
-
-   virtual ossim_uint32 getMaxNumberOfRLevels()const;
-
-   virtual void setMaxNumberOfRLevels(ossim_uint32 number);
-
-   /*!
-    * The first argument is the region of interest that you wish to
-    * use for the histogram.  If the region is different than
-    * what it has already computed before then the histogram is considered
-    * dirty and will be re-computed.  The returned object is a
-    * multi-reslevel histogram
-    */
-   virtual ossimRefPtr<ossimMultiResLevelHistogram> getHistogram(const ossimIrect& rect);
-
-   virtual ossimRefPtr<ossimMultiResLevelHistogram> getHistogram();
-   virtual bool execute();
-   
-   virtual bool canConnectMyInputTo(ossim_int32 myInputIndex,
-                                    const ossimConnectableObject* object)const;
-
-   void setNumberOfBinsOverride(ossim_int32 numberOfBinsOverride);
-
-   void setMinValueOverride(ossim_float32 minValueOverride);
-
-   void setMaxValueOverride(ossim_float32 maxValueOverride);
-
-   ossimHistogramMode getComputationMode()const;
-   void setComputationMode(ossimHistogramMode mode);
-	
-   virtual void propertyEvent(ossimPropertyEvent& event);
-   
-   virtual void connectInputEvent(ossimConnectionEvent& event);
-   
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-	
-protected:
-   virtual ~ossimImageHistogramSource();
-
-   void getBinInformation(ossim_uint32& numberOfBins,
-                          ossim_float64& minValue,
-                          ossim_float64& maxValue)const;
-   virtual void computeNormalModeHistogram();
-   virtual void computeFastModeHistogram();
-   
-   /*!
-    * Initialized to ossimNAN'S
-    */
-   ossimIrect theAreaOfInterest;
-   bool       theHistogramRecomputeFlag;
-   
-   /*!
-    * Will default to 1.  This means it will use up to max
-    * number of res levels for the histogram.
-    */
-   ossim_uint32       theMaxNumberOfResLevels; 
-   ossim_float64      theMinValueOverride;
-   ossim_float64      theMaxValueOverride;
-   ossim_int32        theNumberOfBinsOverride;
-   ossimHistogramMode theComputationMode;
-   ossim_uint32       theNumberOfTilesToUseInFastMode;
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimImageMetaData.h b/include/ossim/imaging/ossimImageMetaData.h
deleted file mode 100644
index 81e431d..0000000
--- a/include/ossim/imaging/ossimImageMetaData.h
+++ /dev/null
@@ -1,138 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-// Contains class declaration for ossimImageMetaData.
-// 
-//*******************************************************************
-//  $Id: ossimImageMetaData.h 21527 2012-08-26 16:50:49Z dburken $
-#ifndef ossimImageMetaData_HEADER
-#define ossimImageMetaData_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-#include <iosfwd>
-#include <string>
-
-class ossimKeywordlist;
-
-class OSSIM_DLL ossimImageMetaData
-{
-public:
-   ossimImageMetaData();
-   ossimImageMetaData(ossimScalarType aType,
-                      ossim_uint32 numberOfBands);
-   ossimImageMetaData(const ossimImageMetaData& rhs);
-
-   const ossimImageMetaData& operator=(const ossimImageMetaData& rhs);
-   
-   ~ossimImageMetaData();
-   
-   void clear();
-
-   void setDefaultsForArrays();
-   
-   void setNumberOfBands(ossim_uint32 numberOfBands);
-   
-   ossim_uint32 getNumberOfBands()const;
-   
-   void setScalarType(ossimScalarType aType);
-   
-   ossimScalarType getScalarType()const;
-
-   /** @return The bytes per pixel. This is for a single band. */
-   ossim_uint32 getBytesPerPixel() const;
-   
-   double getMinPix(ossim_uint32 band)const;
-   
-   void setMinPix(ossim_uint32 band, double pix);
-   
-   void setMaxPix(ossim_uint32 band, double pix);
-   
-   void setNullPix(ossim_uint32 band, double pix);
-   
-   double getMaxPix(ossim_uint32 band)const;
-   
-   double getNullPix(ossim_uint32 band)const;
-   
-   const double* getMinPixelArray()const;
-   
-   const double* getMaxPixelArray()const;
-   
-   const double* getNullPixelArray()const;
-
-   void setMinValuesValid(bool flag);
-   
-   void setMaxValuesValid(bool flag);
-   
-   void setNullValuesValid(bool flag);
-
-   bool getMinValuesValidFlag()const;
-
-   bool getMaxValuesValidFlag()const;
-
-   bool getNullValuesValidFlag()const;
-
-   bool isValid()const;
-   
-   bool loadState(const ossimKeywordlist& kwl,
-                  const char* prefix=0);
-   bool saveState(ossimKeywordlist& kwl,
-                  const char* prefix=0)const;
-
-   /**
-    * @brief Method to update band values.
-    *
-    * Assumes a previous initialization and does not error out if band data is
-    * not found.  This does NOT clear the object prior to loading like the
-    * loadState(...) method.  Can be used to update min/max values from a
-    * "compute min max".  
-    *
-    * @param kwl Keyword list to initialize from.
-    *
-    * @param prefix Prefix, e.g. "image0.".
-    */
-   void updateMetaData( const ossimKeywordlist& kwl,
-                        const std::string& prefix );
-
-   /**
-    * @brief Print method.
-    * @return std::ostream&
-    */
-   std::ostream& print(std::ostream& out) const;
-
-   /**
-    * @note  Since the print method is virtual, derived classes only need
-    *        to implement that, not an addition operator<<.
-    */
-   friend OSSIM_DLL std::ostream& operator<<(std::ostream& out,
-                                             const ossimImageMetaData& obj);
-   
-private:
-
-   /**
-    * Looks for ossimKeywordNames::NUMBER_BANDS_KW, if not found looks for.
-    */
-   ossim_uint32 getBandCount(const ossimKeywordlist& kwl,
-                             const std::string& prefix) const;
-   
-   double*         theNullPixelArray;
-   double*         theMinPixelArray;
-   double*         theMaxPixelArray;
-  
-   bool            theMinValuesValidFlag;
-   bool            theMaxValuesValidFlag;
-   bool            theNullValuesValidFlag;
-   
-   ossimScalarType theScalarType;
-   ossim_uint32    theBytesPerPixel;
-   ossim_uint32    theNumberOfBands;
-};
-
-#endif /* #ifndef ossimImageMetaData_HEADER */
diff --git a/include/ossim/imaging/ossimImageMetaDataWriterFactory.h b/include/ossim/imaging/ossimImageMetaDataWriterFactory.h
deleted file mode 100644
index e9493e8..0000000
--- a/include/ossim/imaging/ossimImageMetaDataWriterFactory.h
+++ /dev/null
@@ -1,87 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2003 Storage Area Networks, Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Kenneth Melero (kmelero at sanz.com)
-//
-//*******************************************************************
-//  $Id: ossimImageMetaDataWriterFactory.h 9094 2006-06-13 19:12:40Z dburken $
-
-#ifndef ossimImageMetaDataWriterFactory_HEADER
-#define ossimImageMetaDataWriterFactory_HEADER
-
-#include <ossim/imaging/ossimImageMetaDataWriterFactoryBase.h>
-#include <ossim/base/ossimRefPtr.h>
-
-class ossimMetadataFileWriter;
-
-class OSSIMDLLEXPORT ossimImageMetaDataWriterFactory:
-   public ossimImageMetaDataWriterFactoryBase
-{
-public:
-   ~ossimImageMetaDataWriterFactory();
-
-   static ossimImageMetaDataWriterFactory* instance();
-   virtual ossimObject* createObject(const ossimString& typeName)const;
-   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
-                                     const char* prefix=0)const;
-
-   /**
-    * Creates a writer from either a class name or a string representing the
-    * meta data type like "tiff_world_file".
-    *
-    * @return ossimRefPtr<ossimMetadataFileWriter>
-    *
-    * @note Return can have a null pointer if type is not found in a factory so
-    * the caller should always check the pointer like:
-    * ossimRefPtr<ossimMetadataFileWriter> mw =
-    *    ossimImageMetaDataWriterRegistry::instance("ossim_readme");
-    * if (!mw.valid())
-    * {
-    *    // not in factory
-    * }
-    */
-   virtual ossimRefPtr<ossimMetadataFileWriter> createWriter(
-      const ossimString& type)const;
-
-   /**
-    * This should return the type name of all objects in all factories.
-    * This is the name used to construct the objects dynamially and this
-    * name must be unique.
-    */
-   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
-
-   /**
-    * Satisfies pure virtual from ossimImageMetaDataWriterFactoryBase.
-    * 
-    * Appends the meta data writers types from each of the supported meta
-    * data writers in this factor to the "metadatatypeList".
-    * 
-    * This is the actual metadata type name like:
-    *   ossim_geometry
-    *   envi_header
-    *   tiff_world_file
-    *   jpeg_world_file
-    *   
-    * @param metadatatypeList stl::vector<ossimString> List to append to.
-    */
-   virtual void getMetadatatypeList(
-      std::vector<ossimString>& metadatatypeList) const;
- 
-protected:
-   static ossimImageMetaDataWriterFactory* theInstance;
-
-   ossimImageMetaDataWriterFactory();
-
-   ossimImageMetaDataWriterFactory(const ossimImageMetaDataWriterFactory& rhs);
-
-   const ossimImageMetaDataWriterFactory& operator =(
-      const ossimImageMetaDataWriterFactory& rhs);
-   
-TYPE_DATA 
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimImageMetaDataWriterFactoryBase.h b/include/ossim/imaging/ossimImageMetaDataWriterFactoryBase.h
deleted file mode 100644
index cb1013d..0000000
--- a/include/ossim/imaging/ossimImageMetaDataWriterFactoryBase.h
+++ /dev/null
@@ -1,67 +0,0 @@
-//----------------------------------------------------------------------------
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//----------------------------------------------------------------------------
-// $Id: ossimImageMetaDataWriterFactoryBase.h 9094 2006-06-13 19:12:40Z dburken $
-#ifndef ossimImageMetaDataWriterFactoryBase_HEADER
-#define ossimImageMetaDataWriterFactoryBase_HEADER
-#include <ossim/base/ossimObjectFactory.h>
-#include <ossim/base/ossimRefPtr.h>
-
-class ossimMetadataFileWriter;
-
-class ossimImageMetaDataWriterFactoryBase : public ossimObjectFactory
-{
-public:
-   /**
-    * Pure virtual.  All ossimImageMetaDataWriterFactories must implement.
-    * 
-    * Creates a writer from either a class name or a string representing the
-    * meta data type like "tiff_world_file".
-    *
-    * @return ossimRefPtr<ossimMetadataFileWriter>
-    *
-    * @note Return can have a null pointer if type is not found in a factory so
-    * the caller should always check the pointer like:
-    * ossimRefPtr<ossimMetadataFileWriter> mw =
-    *    ossimImageMetaDataWriterRegistry::instance("ossim_readme");
-    * if (!mw.valid())
-    * {
-    *    // not in factory
-    * }
-    */
-   virtual ossimRefPtr<ossimMetadataFileWriter> createWriter(
-      const ossimString& type)const=0;
-
-   /**
-    * Pure virtual.  All ossimImageMetaDataWriterFactories must implement.
-    * 
-    * Appends the meta data writers types to the "metadatatypeList".
-    * 
-    * This is the actual metadata type name like:
-    *   ossim_geometry
-    *   envi_header
-    *   tiff_world_file
-    *   jpeg_world_file
-    *   
-    * @param metadatatypeList stl::vector<ossimString> List to append to.
-    *
-    * @note All writers should append to the list, not, clear it and then add
-    * their types.
-    */
-   virtual void getMetadatatypeList(
-      std::vector<ossimString>& metadatatypeList) const=0;
-
-protected:
-   ossimImageMetaDataWriterFactoryBase();
-   
-   ossimImageMetaDataWriterFactoryBase(
-      const ossimImageMetaDataWriterFactoryBase&);
-   
-   const ossimImageMetaDataWriterFactoryBase& operator=(
-      const ossimImageMetaDataWriterFactoryBase&);
-
-TYPE_DATA
-};
-#endif
diff --git a/include/ossim/imaging/ossimImageMetaDataWriterRegistry.h b/include/ossim/imaging/ossimImageMetaDataWriterRegistry.h
deleted file mode 100644
index ea62f65..0000000
--- a/include/ossim/imaging/ossimImageMetaDataWriterRegistry.h
+++ /dev/null
@@ -1,98 +0,0 @@
-//----------------------------------------------------------------------------
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//----------------------------------------------------------------------------
-// $Id: ossimImageMetaDataWriterRegistry.h 13508 2008-08-27 15:51:38Z gpotts $
-
-#ifndef ossimImageMetaDataWriterRegistry_HEADER
-#define ossimImageMetaDataWriterRegistry_HEADER
-#include <ossim/imaging/ossimImageMetaDataWriterFactoryBase.h>
-#include <ossim/base/ossimRefPtr.h>
-
-class ossimMetadataFileWriter;
-
-class OSSIMDLLEXPORT ossimImageMetaDataWriterRegistry :
-   public ossimImageMetaDataWriterFactoryBase
-{
-public:
-   ~ossimImageMetaDataWriterRegistry();
-   
-   static ossimImageMetaDataWriterRegistry* instance();
-   
-   void registerFactory(ossimImageMetaDataWriterFactoryBase* factory);
-   void unregisterFactory(ossimImageMetaDataWriterFactoryBase* factory);
-   bool findFactory(ossimImageMetaDataWriterFactoryBase* factory)const;
-   /**
-    * Creates an object given a type name.
-    */
-   virtual ossimObject* createObject(const ossimString& typeName)const;
-
-   /**
-    * Creates and object given a keyword list.
-    */
-   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
-                                     const char* prefix=0)const;
-
-   /**
-    * Creates a writer from either a class name or a string representing the
-    * meta data type like "tiff_world_file".
-    *
-    * @return ossimRefPtr<ossimMetadataFileWriter>
-    *
-    * @note Return can have a null pointer if type is not found in a factory so
-    * the caller should always check the pointer like:
-    * ossimRefPtr<ossimMetadataFileWriter> mw =
-    *    ossimImageMetaDataWriterRegistry::instance("ossim_readme");
-    * if (!mw.valid())
-    * {
-    *    // not in factory
-    * }
-    */
-   virtual ossimRefPtr<ossimMetadataFileWriter> createWriter(
-      const ossimString& type)const;
-   
-   /**
-    * This should return the type name of all objects in all factories.
-    * This is the name used to construct the objects dynamially and this
-    * name must be unique.
-    */
-   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
-
-   /**
-    * Initializes list with meta data types from all registered
-    * metadata factories.
-    * 
-    * This is the actual image type name like:
-    *   ossim_geometry
-    *   envi_header
-    *   tiff_world_file
-    *   jpeg_world_file
-    *   
-    * @param metadatatypeList stl::vector<ossimString> list to append to.
-    *
-    * @note Since this is the master registry for all meta data factories
-    * this method starts by clearing the metadatatypeList.
-    */
-   virtual void getMetadatatypeList(
-      std::vector<ossimString>& metadatatypeList)const;
-   
-protected:
-   ossimImageMetaDataWriterRegistry();
-
-   ossimImageMetaDataWriterRegistry(
-      const ossimImageMetaDataWriterRegistry& rhs);
-   
-   const ossimImageMetaDataWriterRegistry& operator=(
-      const ossimImageMetaDataWriterRegistry &rhs);
-
-  // static ossimImageMetaDataWriterRegistry* theInstance;
-   std::vector<ossimImageMetaDataWriterFactoryBase*> theFactoryList;
-};
-
-
-extern "C"
-{
-   OSSIMDLLEXPORT void* ossimImageMetaDataWriterRegistryGetInstance();
-}
-#endif
diff --git a/include/ossim/imaging/ossimImageModel.h b/include/ossim/imaging/ossimImageModel.h
deleted file mode 100644
index 3ab9c98..0000000
--- a/include/ossim/imaging/ossimImageModel.h
+++ /dev/null
@@ -1,189 +0,0 @@
-//-----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Class declaration of ossimImageModel.
-//
-//-----------------------------------------------------------------------------
-// $Id$
-
-#ifndef ossimImageModel_HEADER
-#define ossimImageModel_HEADER 1
-
-#include <vector>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimRtti.h>
-
-class ossimDrect;
-class ossimImageHandler;
-
-/**
- * @brief Class to handle transforming image points, rectangles, and offsets
- * from one reduced resolution data set (rrds) level to another.
- *
- * Derived from ossimObject only so users can pass via the
- * ossimViewInterface::setView method.
- */
-class OSSIM_DLL ossimImageModel : public ossimObject
-{
-public:
-   
-   /** @brief default constructor */
-   ossimImageModel();
-
-
-   /**
-    * @brief Method to initialize class from an image handler.
-    *
-    * @param ih Image handler.
-    */
-   virtual void initialize(const ossimImageHandler& ih);
-
-   /**
-    * @brief Get r0 point from rn point.
-    * 
-    * @param rrds Source (rnPt) reduced resolution data set.
-    *
-    * @param rnPt The image point to tranform.
-    *
-    * @param r0Pt the Point to initialize.
-    *
-    * @note Throws ossimException on out of range rrds.
-    */
-   void rnToR0(ossim_uint32 rrds,
-               const ossimDpt& rnPt,
-               ossimDpt& r0Pt) const;
-
-   /**
-    * @brief Get r0 point from rn point.
-    *
-    * This requires calling setTargetRrds(ossim_uint32 rrds) to the level
-    * for rnPt.
-    * 
-    * @param rnPt The image point to tranform.
-    *
-    * @param r0Pt the Point to initialize.
-    *
-    * @note Throws ossimException on out of range rrds.
-    *
-    * @see setTargetRrds
-    */
-   void rnToR0(const ossimDpt& rnPt, ossimDpt& r0Pt) const;
-   
-   /**
-    * @brief Get rn point from r0 point.
-    * 
-    * @param rrds Target (rnPt) reduced resolution data set.
-    *
-    * @param r0Pt The image point to tranform.
-    *
-    * @param rnPt the Point to initialize.
-    *
-    * @note Throws ossimException on out of range rrds.
-    */
-   void r0ToRn(ossim_uint32 rrds,
-               const ossimDpt& r0Pt,
-               ossimDpt& rnPt) const;
-
-   /**
-    * @brief Get rn point from r0 point.
-    *
-    * This requires calling setTargetRrds(ossim_uint32 rrds) to the level
-    * for rnPt.
-    * 
-    * @param r0Pt The image point to tranform.
-    *
-    * @param rnPt the Point to initialize.
-    *
-    * @note Throws ossimException on out of range rrds.
-    *
-    * @see setTargetRrds
-    */
-   void r0ToRn(const ossimDpt& r0Pt,
-               ossimDpt& rnPt) const;
-
-   /**
-    * @brief Get the sub image offset for a given resolution level.
-    * 
-    * @param rrds The reduced resolution data set.
-    *
-    * @param offset the Point to initialize.
-    *
-    * @note Throws ossimException on out of range rrds.
-    */
-   void getSubImageOffset(ossim_uint32 rrds, ossimDpt& offset) const;
-
-   /**
-    * @brief Gets the zero-based image rectangle for a given reduced resolution
-    * data set.
-    *
-    * @param rrds The reduced resolution data set.
-    *
-    * @param rect Initialized with image rectangle for rrds.
-    *
-    * @note Throws ossimException on out of range rrds.
-    */
-   void getImageRectangle(ossim_uint32 rrds, ossimDrect& rect) const; 
-   
-   /**
-    * @brief Gets the model-based image rectangle for a given reduced
-    * resolution data set.
-    *
-    * If this image is a sub image the offset is applied.  So if the image
-    * has a sub image offset of (1024, 1024), and has 1024 lines and 1024
-    * samples the rectangle for r0 will be:  (1024, 1024) (2047, 2047)
-    *
-    * @param rrds The reduced resolution data set.
-    *
-    * @param rect Initialized with image rectangle for rrds.
-    *
-    * @note Throws ossimException on out of range rrds.
-    */
-   void getBoundingRectangle(ossim_uint32 rrds, ossimDrect& rect) const;
-
-   /**
-    * @return This returns the total number of decimation levels.
-    */
-   ossim_uint32 getNumberOfDecimationLevels()const;
-
-   /**
-    * @brief Set theTargetRrds data member.
-    *
-    * This is used by methods rnToR0 and r0ToRn that do not take a rrds
-    * argument.
-    *
-    * @param rrds Target reduced resolution data set.
-    */
-   void setTargetRrds(ossim_uint32 rrds);
-
-   /**
-    * @return The target reduced resolution data set.
-    */
-   ossim_uint32 getTargetRrds() const;
-   
- 
-
-protected:
-   /** @brief virtual destructor */
-   virtual ~ossimImageModel();
-
-   /** Offset from the full image. */
-   ossimDpt theSubImageOffset;
-
-   /** Decimation factors for each rrds level. */
-   std::vector<ossimDpt> theDecimationFactors;
-
-   ossim_uint32 theLines;
-   ossim_uint32 theSamples;
-   ossim_uint32 theTargetRrds;
-
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimImageModel_HEADER */
diff --git a/include/ossim/imaging/ossimImageMosaic.h b/include/ossim/imaging/ossimImageMosaic.h
deleted file mode 100644
index e5afb34..0000000
--- a/include/ossim/imaging/ossimImageMosaic.h
+++ /dev/null
@@ -1,73 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimImageMosaic.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimImageMosaic_HEADER
-#define ossimImageMosaic_HEADER
-#include <vector>
-using namespace std;
-
-#include <ossim/imaging/ossimImageCombiner.h>
-
-
-/**
- * An image mosaic is a simple combiner that will
- * just do a simple mosaic.  It just checks NULL pix values until it finds a
- * pixel that is not empty and copies it out to the output.  The list will
- * have same size tiles and have the same number of bands.
- */
-class OSSIMDLLEXPORT ossimImageMosaic : public ossimImageCombiner
-{
-public:
-   ossimImageMosaic();
-   ossimImageMosaic(ossimConnectableObject::ConnectableObjectList& inputSources);
-   
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
-                                               ossim_uint32 resLevel=0);
-   
-   virtual void initialize();
-   
-   /**
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-protected:
-   virtual ~ossimImageMosaic();
-
-   /**
-    * Called on first getTile, will initialize all data needed.
-    */
-   void allocate();
-   
-   ossimRefPtr<ossimImageData> theTile;
-
-   template <class T> ossimRefPtr<ossimImageData> combine(
-      T, // dummy template variable not used
-      const ossimIrect& tileRect,
-      ossim_uint32 resLevel=0);
-   template <class T> ossimRefPtr<ossimImageData> combineNorm(
-      T, // dummy template variable not used
-      const ossimIrect& tileRect,
-      ossim_uint32 resLevel=0);
-
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimImageMosaic_HEADER */
diff --git a/include/ossim/imaging/ossimImageRenderer.h b/include/ossim/imaging/ossimImageRenderer.h
deleted file mode 100644
index c484d3c..0000000
--- a/include/ossim/imaging/ossimImageRenderer.h
+++ /dev/null
@@ -1,460 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2001 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*******************************************************************
-// $Id: ossimImageRenderer.h 20236 2011-11-09 15:36:38Z dburken $
-
-#ifndef ossimImageRenderer_HEADER
-#define ossimImageRenderer_HEADER
-#include <ossim/imaging/ossimImageSourceFilter.h>
-#include <ossim/projection/ossimImageViewTransform.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimViewInterface.h>
-#include <ossim/base/ossimRationalNumber.h>
-
-class ossimImageData;
-class ossimDiscreteConvolutionKernel;
-class ossimFilterResampler;
-
-class OSSIMDLLEXPORT ossimImageRenderer : public ossimImageSourceFilter,
-                                          public ossimViewInterface
-{
-public:
-   ossimImageRenderer();
-   ossimImageRenderer(ossimImageSource* inputSource,
-                      ossimImageViewTransform* imageViewTrans = NULL);
-
-   virtual ossimString getLongName()  const;
-   virtual ossimString getShortName() const;
-
-   /**
-    * the resampler will need the tile request to come from the view.
-    * It will use the view to transoform this to world and then use the
-    * image's projection to get it into final line sample.  This way
-    * the resampler can fill a tile width by height on the screen
-    * correctly.
-    */
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
-                                               ossim_uint32 resLevel=0);
-
-   virtual void initialize();
-
-   /**
-    * m_Resampler will adjust the rect to whatever the view is.  So it
-    * will project the full image rect onto the view and return the upright
-    * bounding rect.
-    */
-   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
-
-   /**
-    * @brief Gets the bounding rectangle of the source.
-    *
-    * This is the output view bounds.
-    * 
-    * @param rect Initialized with bounding rectangle by this.
-    * @param resLevel Reduced resolution level if applicable.
-    */
-   virtual void getBoundingRect(ossimIrect& rect,
-                                ossim_uint32 resLevel=0) const;
-
-   /**
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-   
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   void setImageViewTransform(ossimImageViewTransform* transform);
-   ossimImageViewTransform* getImageViewTransform() { return m_ImageViewTransform.get(); }
-
-   //! Returns instance to the input image geometry. This may be a NULL pointer.
-   //! This is only valid if the IVT is a projection type IVT (IVPT) 
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-
-   virtual bool setView(ossimObject* baseObject);
-   ossimFilterResampler* getResampler() { return m_Resampler; }
-   virtual ossimObject* getView();
-   virtual const ossimObject* getView()const;
-
-   virtual void getDecimationFactor(ossim_uint32 resLevel, ossimDpt& result)const;
-  virtual void getDecimationFactors(vector<ossimDpt>& decimations)const;
-  virtual ossim_uint32 getNumberOfDecimationLevels()const;
-  
-   virtual void setAutoUpdateInputTransformFlag(bool flag){ m_AutoUpdateInputTransform = flag; }
-   
-   /**
-    * ordering specifies how the vertices should be arranged.
-    * valid image vertices is basically the tightly fit convex hull
-    * of the image.  Usually an image has NULL values and are
-    * internally not upright rectangular.  This can cause
-    * problems some spatial filters.
-    *
-    * We need to make sure that the resampler overrides this method.
-    * it needs to transform the vertices to the view's side.
-    */
-   virtual void getValidImageVertices(vector<ossimIpt>& validVertices,
-                                      ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER,
-                                      ossim_uint32 resLevel=0)const;
-
-   void setMaxLevelsToCompute(ossim_uint32 maxLevels);
-   ossim_uint32 getMaxLevelsToCompute()const;
-   
-   void connectInputEvent(ossimConnectionEvent& event);
-   void disconnectInputEvent(ossimConnectionEvent& event);
-   void propertyEvent(ossimPropertyEvent& event);
-   virtual void refreshEvent(ossimRefreshEvent& event);
-   
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-   /**
-    * @brief Enables source.
-    *
-    * Overrides ossimSource::enableSource so bounding rects are recomputed on
-    * state change.
-    */
-   virtual void enableSource();
-
-   /**
-    * @brief Disables source.
-    *
-    * Overrides ossimSource::disableSource so bounding rects are recomputed on
-    * state change.
-    */
-   virtual void disableSource();
-
-   /**
-    * @brief Sets the enable flag.
-    *
-    * @param flag True to enable, false to disable.
-    * 
-    * Overrides ossimSource::setEnableFlag so bounding rects are recomputed on
-    * state change.
-    */
-   virtual void setEnableFlag(bool flag);
-
-   
-protected:
-   virtual ~ossimImageRenderer();
-
-private:
-   
-   class ossimRendererSubRectInfo
-   {
-   public:
-      friend std::ostream& operator <<(std::ostream& out, const ossimRendererSubRectInfo& rhs)
-      {
-         return out << "vul:   " << rhs.m_Vul << endl
-            << "vur:   " << rhs.m_Vur << endl
-            << "vlr:   " << rhs.m_Vlr << endl
-            << "vll:   " << rhs.m_Vll << endl
-            << "iul:   " << rhs.m_Iul << endl
-            << "iur:   " << rhs.m_Iur << endl
-            << "ilr:   " << rhs.m_Ilr << endl
-            << "ill:   " << rhs.m_Ill << endl
-            << "scale: " << rhs.m_ViewToImageScale << endl;
-
-      }
-
-      ossimRendererSubRectInfo();
-      ossimRendererSubRectInfo(const ossimDpt& vul,
-                               const ossimDpt& vur,
-                               const ossimDpt& vlr,
-                               const ossimDpt& vll);
-         
-      bool imageHasNans()const;
-      bool imageIsNan()const;
-      bool viewHasNans()const;
-      bool viewIsNan()const;
-      void splitView(ossimImageViewTransform* transform,
-                     ossimRendererSubRectInfo& ulRect,
-                     ossimRendererSubRectInfo& urRect,
-                     ossimRendererSubRectInfo& lrRect,
-                     ossimRendererSubRectInfo& llRect)const;
-      
-      void transformViewToImage(ossimImageViewTransform* transform);
-      void transformImageToView(ossimImageViewTransform* transform);
-      
-      void roundToInteger();
-      void stretchImageOut(bool enableRound=false);
-      ossimDrect getViewRect()const;
-      ossimDrect getImageRect()const;
-      void roundImageToInteger();
-      void roundViewToInteger();
-      bool isViewEqual(const ossimRendererSubRectInfo& infoRect)const;
-      bool isViewEqual(const ossimDrect& viewRect)const;
-      ossimDpt getAbsValueViewToImageScales()const;
-      ossimDpt getAbsValueImageToViewScales()const;
-      bool isViewAPoint()const;
-      bool isIdentity()const;
-      bool canBilinearInterpolate(ossimImageViewTransform* transform, double error)const;
-
-      ossimDpt getParametricCenter(const ossimDpt& ul, const ossimDpt& ur, 
-				    const ossimDpt& lr, const ossimDpt& ll)const;
-
-     void getViewMids(ossimDpt& upperMid,
-		      ossimDpt& rightMid,
-		      ossimDpt& bottomMid,
-		      ossimDpt& leftMid,
-		      ossimDpt& center)const;
-
-     void getImageMids(ossimDpt& upperMid,
-		       ossimDpt& rightMid,
-		       ossimDpt& bottomMid,
-		       ossimDpt& leftMid,
-		       ossimDpt& center)const;
-
-      ossimDpt m_Iul;
-      ossimDpt m_Iur;
-      ossimDpt m_Ilr;
-      ossimDpt m_Ill;
-
-      ossimIpt m_Vul;
-      ossimIpt m_Vur;
-      ossimIpt m_Vlr;
-      ossimIpt m_Vll;
-
-      ossimDpt m_ViewToImageScale;
-      ossimDpt m_ImageToViewScale;
-      
-   };
-
-   void recursiveResample(ossimRefPtr<ossimImageData> outputData,
-                          const ossimRendererSubRectInfo& rectInfo,
-			  ossim_uint32 level);
-   
-
-   void fillTile(ossimRefPtr<ossimImageData> outputData,
-                 const ossimRendererSubRectInfo& rectInfo);
-                 
-   ossimIrect getBoundingImageRect()const;
-
-   
-   //! this is called on a property event and on input connection changes.
-   void checkIVT();
-
-   /**
-    * @brief Initializes m_inputR0Rect and m_viewBoundingRect and sets
-    * m_rectsDirty appropriately.
-    */
-   void initializeBoundingRects();
-
-   ossimRefPtr<ossimImageData> getTileAtResLevel(const ossimIrect& boundingRect,
-                                     ossim_uint32 resLevel);
-  template <class T>
-  void resampleTileToDecimation(T dummyVariable,
-				ossimRefPtr<ossimImageData> result,
-				ossimRefPtr<ossimImageData> tile,
-				ossim_uint32 multiplier);
-
-   long computeClosestResLevel(const std::vector<ossimDpt>& decimationFactors,
-                               double scale)const;
-   void stretchQuadOut(const ossimDpt& amount,
-                       ossimDpt& ul,
-                       ossimDpt& ur,
-                       ossimDpt& lr,
-                       ossimDpt& ll);
-
-   /**
-    * Called on first getTile, will initialize all data needed.
-    */
-   void allocate();
-
-   /**
-    *  Deletes all allocated tiles.
-    */
-   void deallocate();
-
-   ossimFilterResampler*       m_Resampler;
-   ossimRefPtr<ossimImageData> m_BlankTile;
-   ossimRefPtr<ossimImageData> m_Tile;
-   ossimRefPtr<ossimImageData> m_TemporaryBuffer;
-
-   /**
-    * This is going to allow us to chain multiple
-    * renderers together.  So if we have one
-    * renderer doing a scale and they pass an r-level
-    * down and we have another renderer within the
-    * chain he will be starting at a different r-level.
-    * The default will be r-level 0 request coming
-    * from the right.
-    */
-   ossim_uint32             m_StartingResLevel;
-   ossimRefPtr<ossimImageViewTransform> m_ImageViewTransform;
-
-   ossimIrect               m_inputR0Rect;
-   ossimIrect               m_viewRect;
-   bool                     m_rectsDirty;
-
-   ossim_uint32             m_MaxRecursionLevel;
-   bool                     m_AutoUpdateInputTransform;
-   ossim_uint32             m_MaxLevelsToCompute;
-   
-TYPE_DATA
-};
-
-inline ossimImageRenderer::ossimRendererSubRectInfo::ossimRendererSubRectInfo()
-{
-   m_Vul.makeNan();
-   m_Vur.makeNan();
-   m_Vlr.makeNan();
-   m_Vll.makeNan();
-   m_Iul.makeNan();
-   m_Iur.makeNan();
-   m_Ilr.makeNan();
-   m_Ill.makeNan();
-   m_ViewToImageScale.makeNan();
-   m_ImageToViewScale.makeNan();            
-}
-
-inline ossimImageRenderer::ossimRendererSubRectInfo::ossimRendererSubRectInfo(const ossimDpt& vul,
-                         const ossimDpt& vur,
-                         const ossimDpt& vlr,
-                         const ossimDpt& vll)
-                         :m_Vul(vul),
-                         m_Vur(vur),
-                         m_Vlr(vlr),
-                         m_Vll(vll)
-{
-   m_Iul.makeNan();
-   m_Iur.makeNan();
-   m_Ilr.makeNan();
-   m_Ill.makeNan();
-   m_ViewToImageScale.makeNan();
-   m_ImageToViewScale.makeNan();            
-}
-
-inline bool ossimImageRenderer::ossimRendererSubRectInfo::imageHasNans()const
-{
-   return ( m_Iul.hasNans()||
-      m_Iur.hasNans()||
-      m_Ilr.hasNans()||
-      m_Ill.hasNans());
-}
-
-inline bool ossimImageRenderer::ossimRendererSubRectInfo::imageIsNan()const
-{
-   return ( m_Iul.hasNans()&&
-      m_Iur.hasNans()&&
-      m_Ilr.hasNans()&&
-      m_Ill.hasNans());
-}
-
-inline bool ossimImageRenderer::ossimRendererSubRectInfo::viewHasNans()const
-{
-   return ( m_Vul.hasNans()||
-      m_Vur.hasNans()||
-      m_Vlr.hasNans()||
-      m_Vll.hasNans());
-}
-
-inline bool ossimImageRenderer::ossimRendererSubRectInfo::viewIsNan()const
-{
-   return ( m_Vul.hasNans()&&
-      m_Vur.hasNans()&&
-      m_Vlr.hasNans()&&
-      m_Vll.hasNans());
-}
-
-inline void ossimImageRenderer::ossimRendererSubRectInfo::roundToInteger()
-{
-   m_Iul = ossimIpt(m_Iul);
-   m_Iur = ossimIpt(m_Iur);
-   m_Ilr = ossimIpt(m_Ilr);
-   m_Ill = ossimIpt(m_Ill);
-
-   m_Vul = ossimIpt(m_Vul);
-   m_Vur = ossimIpt(m_Vur);
-   m_Vlr = ossimIpt(m_Vlr);
-   m_Vll = ossimIpt(m_Vll);
-}
-
-inline ossimDrect ossimImageRenderer::ossimRendererSubRectInfo::getViewRect()const
-{
-   return ossimDrect(m_Vul,
-      m_Vur,
-      m_Vlr,
-      m_Vll);            
-}
-
-inline ossimDrect ossimImageRenderer::ossimRendererSubRectInfo::getImageRect()const
-{
-   return ossimDrect(m_Iul,
-      m_Iur,
-      m_Ilr,
-      m_Ill);
-}
-
-inline void ossimImageRenderer::ossimRendererSubRectInfo::roundImageToInteger()
-{
-   m_Iul = ossimIpt(m_Iul);
-   m_Iur = ossimIpt(m_Iur);
-   m_Ilr = ossimIpt(m_Ilr);
-   m_Ill = ossimIpt(m_Ill);
-}
-
-inline void ossimImageRenderer::ossimRendererSubRectInfo::roundViewToInteger()
-{
-   m_Vul = ossimIpt(m_Vul);
-   m_Vur = ossimIpt(m_Vur);
-   m_Vlr = ossimIpt(m_Vlr);
-   m_Vll = ossimIpt(m_Vll);
-}
-
-inline bool ossimImageRenderer::ossimRendererSubRectInfo::isViewEqual(const ossimRendererSubRectInfo& infoRect)const
-{
-   return ( (m_Vul == infoRect.m_Vul)&&
-      (m_Vur == infoRect.m_Vur)&&
-      (m_Vlr == infoRect.m_Vlr)&&
-      (m_Vll == infoRect.m_Vll));
-}
-
-inline bool ossimImageRenderer::ossimRendererSubRectInfo::isViewEqual(const ossimDrect& viewRect)const
-{
-   return ( (m_Vul == viewRect.ul())&&
-      (m_Vur == viewRect.ur())&&
-      (m_Vlr == viewRect.lr())&&
-      (m_Vll == viewRect.ll()));
-}
-
-inline ossimDpt ossimImageRenderer::ossimRendererSubRectInfo::getAbsValueViewToImageScales()const
-{
-   if(m_ViewToImageScale.hasNans())
-   {
-      return m_ImageToViewScale;
-   }
-   return ossimDpt(fabs(m_ViewToImageScale.x), fabs(m_ViewToImageScale.y));
-}
-
-inline ossimDpt ossimImageRenderer::ossimRendererSubRectInfo::getAbsValueImageToViewScales()const
-{
-   if(m_ImageToViewScale.hasNans())
-   {
-      return m_ImageToViewScale;
-   }
-
-   return ossimDpt(fabs(m_ImageToViewScale.x), fabs(m_ImageToViewScale.y));
-}
-
-inline bool ossimImageRenderer::ossimRendererSubRectInfo::isViewAPoint()const
-{
-   return ((m_Vul == m_Vur)&&
-      (m_Vul == m_Vlr)&&
-      (m_Vul == m_Vll));
-}
-
-#endif
diff --git a/include/ossim/imaging/ossimImageSharpenFilter.h b/include/ossim/imaging/ossimImageSharpenFilter.h
deleted file mode 100644
index efbce71..0000000
--- a/include/ossim/imaging/ossimImageSharpenFilter.h
+++ /dev/null
@@ -1,83 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimImageSharpenFilter.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimImageSharpenFilter_HEADER
-#define ossimImageSharpenFilter_HEADER
-#include <ossim/imaging/ossimImageSourceFilter.h>
-#include <ossim/imaging/ossimConvolutionSource.h>
-class OSSIMDLLEXPORT ossimImageSharpenFilter : public ossimImageSourceFilter
-{
-public:
-   ossimImageSharpenFilter(ossimObject* owner=NULL);
-
-   virtual ossimString getShortName()const;
-   virtual ossimString getLongName()const;
-   
-   ossim_uint32 getWidth()const;
-   ossim_float64 getSigma()const;
-   void setWidthAndSigma(ossim_uint32 w, ossim_float64 sigma);
-   
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-   
-   virtual void initialize();
-   
-   virtual void connectInputEvent(ossimConnectionEvent &event);
-   virtual void disconnectInputEvent(ossimConnectionEvent &event);
-   
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-protected:
-   virtual ~ossimImageSharpenFilter();
-   inline double laplacianOfGaussian(double x, double y, double sigma)
-   {
-      double r2 = x*x+y*y;
-      double sigma2 = sigma*sigma;
-      return ((1.0/(M_PI*sigma2*sigma2))*
-              (1.0-r2/(2.0*sigma2))*
-              (exp(-r2/(2.0*sigma2))));
-      
-   }
-   
-   void buildConvolutionMatrix();
-   
-
-   /*!
-    * Convolve full means that the input data is full and has
-    * no null data.  We don't have to compare for nulls here
-    */
-   template<class T>
-   void sharpenFull(T,
-                    const ossimRefPtr<ossimImageData>& inputData,
-                    ossimRefPtr<ossimImageData>& outputData);
-   
-   /*!
-    * Convolve partial means that the input data is has some
-    * null data.  We will have to compare nulls
-    */
-   template<class T>
-   void sharpenPartial(T,
-                       const ossimRefPtr<ossimImageData>& inputData,
-                       ossimRefPtr<ossimImageData>& outputData);
-
-   ossimRefPtr<ossimConvolutionSource> theConvolutionSource;
-   ossim_uint32 theWidth;
-   ossim_float64 theSigma;
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimImageSharpenFilter_HEADER */
diff --git a/include/ossim/imaging/ossimImageSource.h b/include/ossim/imaging/ossimImageSource.h
deleted file mode 100644
index e45bb6b..0000000
--- a/include/ossim/imaging/ossimImageSource.h
+++ /dev/null
@@ -1,246 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimImageSource.h 21637 2012-09-06 21:17:57Z dburken $
-#ifndef ossimImageSource_HEADER
-#define ossimImageSource_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimSource.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-
-class ossimDpt;
-
-class OSSIMDLLEXPORT ossimImageSource : public ossimSource
-{
-public:
-   ossimImageSource(ossimObject* owner = 0);
-   ossimImageSource(ossimObject* owner,
-                    ossim_uint32 inputListSize,
-                    ossim_uint32 outputListSize,
-                    bool inputListIsFixedFlag=true,
-                    bool outputListIsFixedFlag=true);
-   virtual ~ossimImageSource();
-
-   /**
-    * @return from origin out to tile_width-1, and tile_height-1.
-    */
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIpt& origin,
-                                               ossim_uint32 resLevel=0);
-   
-  /**
-   * @return the requested region of interest
-   */
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
-                                               ossim_uint32 resLevel=0);
-
-   /**
-    * Method to get a tile.   
-    *
-    * @param result The tile to stuff.  Note The requested rectangle in full
-    * image space and bands should be set in the result tile prior to
-    * passing.
-    *
-    * @return true on success false on error.  If return is false, result
-    *  is undefined so caller should handle appropriately with makeBlank or
-    * whatever.
-    *
-    * @note Derived classes should override this method to most efficiently
-    * stuff result.
-    */
-   virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);
-   
-  /**
-   * For RTTI support. overrides ossimImageSource
-   * get object to return the correct casted base pointer
-   * for RTTI casting
-   */
-   virtual ossimObject* getObject() { return this; }
-   
-   /**
-    * For RTTI support. overrides ossimImageSource
-    * get object to return the correct casted base pointer
-    * for RTTI casting
-    */
-   virtual const ossimObject* getObject() const { return this; }
-
- 
-  /**
-   * Will return the decimation factor for the given resolution 
-   * level.  the decimation is the scale from Resolution 0 or full 
-   * res.  Usually this is a power of 2 decimation where
-   * the decimation result is 1.0/2^resoltion.
-   */
-   virtual void getDecimationFactor(ossim_uint32 resLevel,
-                                    ossimDpt& result)const;
-  
-   /**
-    * Will return an array of all decimations for each resolution level.
-    */
-   virtual void getDecimationFactors(std::vector<ossimDpt>& decimations) const;
-
-   /**
-    * Will return the number of resolution levels.  Note: resolution
-    * level 0 is included in the return count.
-    */
-   virtual ossim_uint32 getNumberOfDecimationLevels() const;
-   
-   /*!
-    * Returns the number of bands available from the input.
-    */
-   virtual ossim_uint32 getNumberOfInputBands() const = 0;
-   
-   /**
-    * Returns the number of bands in a tile returned from this TileSource.
-    */
-   virtual ossim_uint32 getNumberOfOutputBands() const;
-
-   /**
-    * @brief Initializes bandList.
-    * 
-    * This implementation initializes to the zero based order of input bands.
-    * Derived classes that are band selectors should override.
-    *
-    * @param bandList Initialized by this.
-    */
-   virtual void getOutputBandList( std::vector<ossim_uint32>& bandList ) const;
-
-   /**
-    * This will be used to query the output pixel type of the tile source.
-    * Please ignore the argument.  It will soon be removed.
-    */
-   virtual ossimScalarType getOutputScalarType() const;
-
-   /**
-    * Returns the default processing tile width
-    */
-   virtual ossim_uint32 getTileWidth() const;
-
-   /**
-    * Returns the default processing tile height
-    */
-   virtual ossim_uint32 getTileHeight() const;
-
-   /**
-    * Each band has a null pixel associated with it.  The null pixel 
-    * represents an invalid value.
-    */ 
-   virtual double getNullPixelValue(ossim_uint32 band=0)const;
-   
-   /**
-    * Returns the min pixel of the band.
-    */
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   
-   /**
-    * Returns the max pixel of the band.
-    */
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-   
-   /**
-    * This will return the bounding rect of the source.  We can have several
-    * sources which are in a chain to modify the bounding image rect.
-    * lets say you are next to an image handler then it will return the
-    * bounding rect for that image.  If you are at the right side of a
-    * resampler then you will get a bounding rect along the image view plane.
-    * This is going to be a very import method for both image writers,
-    * mosaics or anything that needs to operate only within the bounds of an
-    * image.
-    */
-   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const;
-   
-   /**
-    * @brief Gets the bounding rectangle of the source.
-    *
-    * This default implementation calls the getBoundingRect interface that
-    * returns a rectangle.  Derived classes should override as needed.
-    * 
-    * @param rect Initialized with bounding rectangle by this.
-    * @param resLevel Reduced resolution level if applicable.
-    */
-   virtual void getBoundingRect(ossimIrect& rect,
-                                ossim_uint32 resLevel=0) const;
-   
-   /**
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   /**
-    * ordering specifies how the vertices should be arranged.
-    * valid image vertices is basically the tightly fit convex hull
-    * of the image.  Usually an image has NULL values and are
-    * internally not upright rectangular.  This can cause
-    * problems some spatial filters.
-    *
-    * The default implementation is to return the bounding rect.
-    */
-   virtual void getValidImageVertices(
-      std::vector<ossimIpt>& validVertices,
-      ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER,
-      ossim_uint32 resLevel=0)const;
-
-   /**
-    * Returns the image geometry object associated with this tile source or
-    * NULL if not defined. The geometry contains full-to-local image transform
-    * as well as projection (image-to-world). Default implementation returns
-    * the image geometry object associated with the next  
-    * (left) input source (if any) connected to this source in the chain, or
-    * NULL.
-    */
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-
-   /**
-    * Default implementation sets geometry of the first input to the geometry
-    * specified.
-    */
-   virtual void setImageGeometry(const ossimImageGeometry* geom);
-       
-   /** Default method to call input's saveImageGeometry. */
-   virtual void saveImageGeometry() const;
-   
-   /** Default method to call input's saveImageGeometry. */
-   virtual void saveImageGeometry(const ossimFilename& geometry_file) const;
-   
-   virtual void initialize()=0;
-   
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-   /**
-    * @return Flag indicating the data contains pallete indexes.
-    *
-    * This should be replaced by a getPhotoInterpretation().
-    */
-   virtual bool isIndexedData() const;
-   
-protected:
-
-   ossimImageSource (const ossimImageSource& rhs);
-   const ossimImageSource& operator= (const ossimImageSource&);
-
-private:
-
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimImageSource_HEADER */
diff --git a/include/ossim/imaging/ossimImageSourceFilter.h b/include/ossim/imaging/ossimImageSourceFilter.h
deleted file mode 100644
index 41809ae..0000000
--- a/include/ossim/imaging/ossimImageSourceFilter.h
+++ /dev/null
@@ -1,66 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-//*******************************************************************
-//  $Id: ossimImageSourceFilter.h 17932 2010-08-19 20:34:35Z dburken $
-#ifndef ossimImageSourceFilter_HEADER
-#define ossimImageSourceFilter_HEADER
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/base/ossimConnectableObjectListener.h>
-#include <ossim/base/ossimConnectionEvent.h>
-
-class OSSIMDLLEXPORT ossimImageSourceFilter : public ossimImageSource,
-     public ossimConnectableObjectListener
-{
-public:
-   ossimImageSourceFilter(ossimObject* owner=NULL);
-   ossimImageSourceFilter(ossimImageSource* inputSource);
-   ossimImageSourceFilter(ossimObject* owner,
-                          ossimImageSource* inputSource);
-
-   /*!
-    * Returns the input connection's output band list.
-    * If not connected calls ossimImageSource::getOutputBandList.
-    */
-   virtual void getOutputBandList(std::vector<ossim_uint32>& bandList) const;
-   
-   /*!
-    * Returns the number of bands available from the input.
-    */
-   virtual ossim_uint32 getNumberOfInputBands()const;   
-
-   virtual void initialize();
-
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-   bool canConnectMyInputTo(ossim_int32 inputIndex,
-                            const ossimConnectableObject* object)const;
-   virtual void connectInputEvent(ossimConnectionEvent& event);
-   virtual void disconnectInputEvent(ossimConnectionEvent& event);
-   virtual void propertyEvent(ossimPropertyEvent& event);
-   virtual void refreshEvent(ossimRefreshEvent& event);
-   
-
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   
-protected:
-   virtual ~ossimImageSourceFilter();
-   ossimImageSource* theInputConnection;
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimImageSourceFilter_HEADER */
diff --git a/include/ossim/imaging/ossimImageSourceSequencer.h b/include/ossim/imaging/ossimImageSourceSequencer.h
deleted file mode 100644
index 0a1b3fd..0000000
--- a/include/ossim/imaging/ossimImageSourceSequencer.h
+++ /dev/null
@@ -1,168 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimImageSourceSequencer.h 20302 2011-11-29 14:21:12Z dburken $
-#ifndef ossimImageSourceSequencer_HEADER
-#define ossimImageSourceSequencer_HEADER
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimConnectableObjectListener.h>
-
-
-class OSSIMDLLEXPORT ossimImageSourceSequencer
-   :
-      public ossimImageSource,
-      public ossimConnectableObjectListener
-{
-public:
-   ossimImageSourceSequencer(ossimImageSource* inputSource=NULL,
-                             ossimObject* owner=NULL);
-
-   virtual ~ossimImageSourceSequencer();
-  /*!
-    * This will return the number of tiles within the
-    * area of interest.
-    */
-   ossim_uint32 getNumberOfTiles()const;
-
-   /*!
-    * Will return the number of tiles along the
-    * x or horizontal direction.
-    */
-   ossim_uint32 getNumberOfTilesHorizontal()const;
-
-   /*!
-    * Will return the number of tiles along the
-    * y or vertical direction.
-    */
-   ossim_uint32 getNumberOfTilesVertical()const;
-
-   /*!
-    * This must be called.  We can only initialize this
-    * object completely if we know all connections
-    * are valid.  Some other object drives this and so the
-    * connection's initialize will be called after.  The job
-    * of this connection is to set up the sequence.  It will
-    * default to the bounding rect.  The area of interest can be
-    * set to some other rectagle (use setAreaOfInterest).
-    */
-   virtual void initialize();
-
-   /*!
-    * Will set the current area of interest.
-    */
-   virtual void setAreaOfInterest(const ossimIrect& areaOfInterest);
-
-   /*!
-    * Just returns the current area of interest.
-    */
-   const ossimIrect& getAreaOfInterest()const;
-
-   /*!
-    * Will set the internal pointers to the upperleft
-    * tile number.  To go to the next tile in the sequence
-    * just call getNextTile.
-    */
-   virtual void setToStartOfSequence();
-
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
-                                               ossim_uint32 resLevel=0);
-
-   /*!
-    * Will allow you to get the next tile in the sequence.
-    * Note the last tile returned will be an invalid
-    * ossimRefPtr<ossimImageData>.  Callers should be able to do:
-    * 
-    * ossimRefPtr<ossimImageData> id = sequencer->getNextTile();
-    * while (id.valid())
-    * {
-    *    doSomething;
-    *    id = sequencer->getNextTile();
-    * }
-    * 
-    */
-   virtual ossimRefPtr<ossimImageData> getNextTile(ossim_uint32 resLevel=0);
-
-   virtual bool getTileOrigin(ossim_int32 id, ossimIpt& origin)const;
-
-   /*!
-    * @brief Establishes a tile rect given tile ID.
-    * @param tile_id
-    * @param rect Rectangle to initialize.
-    * @return true if valid; else, false.
-    */
-   bool getTileRect(ossim_uint32 tile_id, ossimIrect& rect) const;
-
-   virtual ossimRefPtr<ossimImageData> getTile(ossim_int32 id,
-                                               ossim_uint32 resLevel=0);
-
-   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
-   virtual void getDecimationFactor(ossim_uint32 resLevel,
-                                    ossimDpt& result) const;
-   virtual void getDecimationFactors(vector<ossimDpt>& decimations) const;
-   virtual ossim_uint32 getNumberOfDecimationLevels()const;
-   
-   /*!
-    * Returns the number of bands available from the input.
-    */
-   virtual ossim_uint32 getNumberOfInputBands()const;   
-
-   virtual ossimScalarType getOutputScalarType() const;
-      
-   virtual ossim_uint32 getTileWidth()const  { return theTileSize.x; }
-   virtual ossim_uint32 getTileHeight()const { return theTileSize.y; }
-   
-   virtual void slaveProcessTiles()
-      {
-         return;
-      }
-   virtual bool isMaster()const
-      {
-         return true;
-      }
-
-   virtual ossimIpt getTileSize()const;
-   virtual void setTileSize(const ossimIpt& tileSize);
-   virtual void setTileSize(int width, int height);
-   
-   virtual void connectInputEvent(ossimConnectionEvent& event);
-   virtual void disconnectInputEvent(ossimConnectionEvent& event);
-   
-   virtual bool canConnectMyInputTo(ossim_int32 inputIndex,
-                                    const ossimConnectableObject* object)const;
-   
-   virtual double getNullPixelValue(ossim_uint32 band=0)const;
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-   
-protected:
-   ossimImageSource*  theInputConnection;
-   ossimRefPtr<ossimImageData> theBlankTile;
-   /*!
-    * Is the area of interest.  The default will
-    * 
-    */
-   ossimIrect theAreaOfInterest;
-
-   /*!
-    * Called during initialize.
-    */
-   ossimIpt theTileSize;
-   
-   ossim_uint32 theNumberOfTilesHorizontal;
-   ossim_uint32 theNumberOfTilesVertical;
-   ossim_uint32 theCurrentTileNumber;
-
-   virtual void updateTileDimensions();
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimImageToPlaneNormalFilter.h b/include/ossim/imaging/ossimImageToPlaneNormalFilter.h
deleted file mode 100644
index 4de7145..0000000
--- a/include/ossim/imaging/ossimImageToPlaneNormalFilter.h
+++ /dev/null
@@ -1,74 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimImageToPlaneNormalFilter.h 20078 2011-09-09 12:25:50Z gpotts $
-#ifndef ossimImageToPlaneNormalFilter_HEADER
-#define ossimImageToPlaneNormalFilter_HEADER
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-class OSSIMDLLEXPORT ossimImageToPlaneNormalFilter : public ossimImageSourceFilter
-{
-public:
-   ossimImageToPlaneNormalFilter();
-   ossimImageToPlaneNormalFilter(ossimImageSource* inputSource);
-
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-   
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-
-   virtual ossimScalarType getOutputScalarType() const;
-   virtual ossim_uint32    getNumberOfOutputBands() const;
-   
-   void setXScale(const double& scale);
-   void setYScale(const double& scale);
-   
-   double getXScale()const;
-   double getYScale()const;
-
-   void setTrackScaleFlag(bool flag);
-   bool getTrackScaleFlag()const;
-   
-   void   setSmoothnessFactor(double value);
-   double getSmoothnessFactor()const;
-   
-   bool loadState(const ossimKeywordlist& kwl,
-                  const char* prefix);
-   bool saveState(ossimKeywordlist& kwl,
-                  const char* prefix)const;
-   virtual void initialize();
-   /* ------------------- PROPERTY INTERFACE -------------------- */
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   /* ------------------ PROPERTY INTERFACE END ------------------- */
-   
-protected:
-   ossimRefPtr<ossimImageData> theTile;
-   ossimRefPtr<ossimImageData> theBlankTile;
-   ossimIrect      theInputBounds;
-   bool            theTrackScaleFlag;
-   double          theXScale;
-   double          theYScale;
-   double          theSmoothnessFactor;
-   
-   void initializeTile();
-   virtual void computeNormals(ossimRefPtr<ossimImageData>& inputTile,
-                               ossimRefPtr<ossimImageData>& outputTile);
-
-   template <class T>
-   void computeNormalsTemplate(T inputScalarTypeDummy,
-                               ossimRefPtr<ossimImageData>& inputTile,
-                               ossimRefPtr<ossimImageData>& outputTile);
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimImageWriterFactory.h b/include/ossim/imaging/ossimImageWriterFactory.h
deleted file mode 100644
index 3d50792..0000000
--- a/include/ossim/imaging/ossimImageWriterFactory.h
+++ /dev/null
@@ -1,63 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Frank Warmerdam (warmerda at home.com)
-//
-//*******************************************************************
-//  $Id: ossimImageWriterFactory.h 18002 2010-08-30 18:01:10Z gpotts $
-
-#ifndef ossimImageWriterFactory_HEADER
-#define ossimImageWriterFactory_HEADER
-#include <ossim/imaging/ossimImageWriterFactoryBase.h>
-
-class ossimImageWriter;
-class ossimKeywordlist;
-
-class ossimImageWriterFactory: public ossimImageWriterFactoryBase
-{   
-public:
-   virtual ~ossimImageWriterFactory();
-   static ossimImageWriterFactory* instance();
-   
-   ossimImageFileWriter *createWriterFromExtension(const ossimString& fileExtension)const;
-   virtual ossimImageFileWriter* createWriter(const ossimKeywordlist& kwl,
-                                              const char *prefix=0)const;
-   virtual ossimImageFileWriter* createWriter(const ossimString& typeName)const;
-   
-   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
-                                     const char *prefix=0)const;
-   virtual ossimObject* createObject(const ossimString& typeName)const;
-   
-   virtual void getExtensions(std::vector<ossimString>& result)const;
-   
-   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
-   
-   /*!
-    * getImageTypeList.  This is the actual image type name.  So for
-    * example, ossimTiffWriter has several image types.  Some of these
-    * include TIFF_TILED, TIFF_TILED_BAND_SEPARATE ... etc.  The
-    * ossimGdalWriter
-    * may include GDAL_IMAGINE_HFA, GDAL_RGB_NITF, GDAL_JPEG20000, ... etc
-    * A writer should be able to be instantiated by this name as well as a
-    * class name
-    */
-   virtual void getImageTypeList(std::vector<ossimString>& imageTypeList)const;
-   
-   virtual void getImageFileWritersBySuffix(ossimImageWriterFactoryBase::ImageFileWriterList& result,
-                                            const ossimString& ext)const;
-   virtual void getImageFileWritersByMimeType(ossimImageWriterFactoryBase::ImageFileWriterList& result,
-                                              const ossimString& mimeType)const;
-protected:
-   ossimImageWriterFactory() {}
-
-   static ossimImageWriterFactory* theInstance;
-
-	ossimImageFileWriter* createFromMimeType(const ossimString& mimeType)const;
-   bool isImageTypeName(const ossimString& name)const;
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimImageWriterFactoryRegistry.h b/include/ossim/imaging/ossimImageWriterFactoryRegistry.h
deleted file mode 100644
index 1d4d68f..0000000
--- a/include/ossim/imaging/ossimImageWriterFactoryRegistry.h
+++ /dev/null
@@ -1,89 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Frank Warmerdam (warmerda at home.com)
-//
-//*******************************************************************
-//  $Id: ossimImageWriterFactoryRegistry.h 19907 2011-08-05 19:55:46Z dburken $
-
-#ifndef ossimImageWriterFactoryRegistry_HEADER
-#define ossimImageWriterFactoryRegistry_HEADER
-#include <ossim/base/ossimObjectFactory.h>
-#include <ossim/imaging/ossimImageWriterFactoryBase.h>
-#include <ossim/base/ossimFactoryListInterface.h>
-#include <vector>
-#include <iosfwd>
-
-class ossimImageFileWriter;
-class ossimKeywordlist;
-
-class OSSIMDLLEXPORT ossimImageWriterFactoryRegistry :
-   public ossimObjectFactory,
-   public ossimFactoryListInterface<ossimImageWriterFactoryBase, ossimImageFileWriter>
-{   
-public:
-   static ossimImageWriterFactoryRegistry* instance();
-
-   ossimImageFileWriter *createWriter(const ossimFilename& filename)const;
-   ossimImageFileWriter *createWriterFromExtension(const ossimString& fileExtension)const;
-   ossimImageFileWriter *createWriter(const ossimKeywordlist &kwl,
-                                      const char *prefix=0)const;
-   ossimImageFileWriter* createWriter(const ossimString& typeName)const;
-   
-   ossimObject* createObject(const ossimKeywordlist &kwl,
-                             const char *prefix=0)const;
-
-   ossimObject* createObject(const ossimString& typeName)const;
-   
-   /**
-    * getTypeNameList.  This should return the class type of the object being
-    * used to perform the writting.
-    */
-   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
-   
-   /**
-    * getImageTypeList.  This is the actual image type name.  So for
-    * example, ossimTiffWriter has several image types.  Some of these
-    * include TIFF_TILED, TIFF_TILED_BAND_SEPARATE ... etc.
-    * The ossimGdalWriter
-    * may include GDAL_IMAGINE_HFA, GDAL_RGB_NITF, GDAL_JPEG20000, ... etc
-    * A writer should be able to be instantiated by this name as well as a
-    * class name
-    */
-   virtual void getImageTypeList(std::vector<ossimString>& imageTypeList)const;
-
-   virtual void getImageFileWritersBySuffix(ossimImageWriterFactoryBase::ImageFileWriterList& result,
-                                            const ossimString& ext)const;
-   virtual void getImageFileWritersByMimeType(ossimImageWriterFactoryBase::ImageFileWriterList& result,
-                                              const ossimString& mimeType)const;
-   /**
-    * @brief Prints list of writers from getImageTypeList.
-    * @param  out Stream to print to.
-    * @return std::ostream&
-    */
-   std::ostream& printImageTypeList(std::ostream& out)const;
-
-   /**
-    * @brief Prints list of writers from getImageTypeList.
-    * @param  out Stream to print to.
-    * @return std::ostream&
-    */
-   std::ostream& printWriterProps(std::ostream& out)const;
-   
-protected:
-   ossimImageWriterFactoryRegistry();
-   ossimImageWriterFactoryRegistry(const ossimImageWriterFactoryRegistry&);
-   void operator=(const ossimImageWriterFactoryRegistry&);
-   
-   static ossimImageWriterFactoryRegistry*    theInstance;
-};
-
-extern "C"
-{
-  OSSIMDLLEXPORT void* ossimImageWriterFactoryRegistryGetInstance();
-}
-#endif
diff --git a/include/ossim/imaging/ossimIndexToRgbLutFilter.h b/include/ossim/imaging/ossimIndexToRgbLutFilter.h
deleted file mode 100644
index 218e6f9..0000000
--- a/include/ossim/imaging/ossimIndexToRgbLutFilter.h
+++ /dev/null
@@ -1,205 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimIndexToRgbLutFilter.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimIndexToRgbLutFilter_HEADER
-#define ossimIndexToRgbLutFilter_HEADER
-#include <ossim/base/ossimRgbVector.h>
-#include <ossim/base/ossimRgbLutDataObject.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/imaging/ossimImageSourceFilter.h>
-#include <vector>
-
-class ossimImageData;
-
-/**
- * The output is an 8-bit pseudo color of the input
- * data.  This class implements a generic way to color code
- * any form of input data.  It will use theMinValue
- * theMaxValue to color code the input data.  Note
- * this class only operates on one input band since
- * it assumes the input is an index.  It also uses
- * an ossimRgbLutDataObject that is an array of color
- * data or ossimRgbVector data.  It will convert
- * the input into normalized form and then map
- * it uniformly to the color in the RGB Lut (Lookup Table).
- * <pre>
- *
- * Note:  You can tell this filter if it should use the
- *        nearest entry for the output color or linearly
- *        interpolate the entries for smooth coloring.
- *
- * Example keyword list:
- *
- * type:  ossimIndexToRgbLutFilter
- * // if the max_value and min_value is given it will use these for normalizing the
- * // input data to be between 0 and 1.  If not given it will query the min max
- * // from the input
- *
- * max_value:  2164.000000000000000
- * min_value:  -3.000000000000000
- *
- * // it owns an ossimRgbLutDataObject and has prefix value lut.
- *
- * // the value can be nearest or linear.  This describes how the
- * // color value is computed.  If it falls bewteen 2 color values
- * // for example, 1.4 it will go to entries 1 and 2 and interpolate
- * // if linear is set else it will return the color at entry 1 if
- * // nearest is set.
- * 
- * interpolation_type:  linear 
- *
- * // the rest of the keywords is the lookup table.
- * // NOTE: you do not have to have the same number of entries as you do
- * //       input range indices.  Just know that the lowest value is mapped
- * //       to 0 and the highest value is mapped to number of entires -1.
- *
- * If you want to load from a file then just do:
- *
- * lut.lut_file: <full path to lut file>
- *
- * If you have the lut table in line then it must look like this:
- *
- * lut.entry0.b:  204
- * lut.entry0.g:  102
- * lut.entry0.r:  1
- * lut.entry1.b:  255
- * lut.entry1.g:  204
- * lut.entry1.r:  153
- * lut.entry2.b:  204
- * lut.entry2.g:  204
- * lut.entry2.r:  51
- * lut.entry3.b:  255
- * lut.entry3.g:  1
- * lut.entry3.r:  1
- * lut.entry4.b:  204
- * lut.entry4.g:  1
- * lut.entry4.r:  204
- * lut.entry5.b:  204
- * lut.entry5.g:  51
- * lut.entry5.r:  255
- * lut.entry6.b:  51
- * lut.entry6.g:  1
- * lut.entry6.r:  102
- * lut.entry7.b:  255
- * lut.entry7.g:  255
- * lut.entry7.r:  255
- * lut.number_of_entries:  8
- * lut.type:  ossimRgbLutDataObject
- *
- *
- * 
- * </pre>
- */
-class OSSIM_DLL ossimIndexToRgbLutFilter : public ossimImageSourceFilter
-{
-public:
-   enum ossimIndexToRgbLutFilterInterpolationType
-   {
-      ossimIndexToRgbLutFilter_NEAREST = 0,
-      ossimIndexToRgbLutFilter_LINEAR  = 1
-   };
-   /**
-    * Initializes the min value to 0 and the max value to 4000.
-    */
-   ossimIndexToRgbLutFilter();
-   ossimIndexToRgbLutFilter(ossimImageSource* inputSource,
-                           const ossimRgbLutDataObject& rgbLut,
-                           double minValue,
-                           double maxValue,
-                           ossimIndexToRgbLutFilterInterpolationType interpolationType);
-   
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
-                                               ossim_uint32 resLevel=0);
-   
-   ossim_uint32 getNumberOfOutputBands() const;
-   
-   virtual ossimScalarType getOutputScalarType() const;
-   
-   void           setLut(ossimRgbLutDataObject& lut);
-   void           setLut(const ossimFilename& file);
-   
-   ossimFilename  getLutFile()const;
-   
-   double         getMinValue()const;
-   double         getMaxValue()const;
-   
-   void           setMinValue(double value);
-   void           setMaxValue(double value);
-   
-   virtual double getNullPixelValue()const;
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-
-   ossimIndexToRgbLutFilterInterpolationType getInterpolationType()const;
-   void setInterpolationType(ossimIndexToRgbLutFilterInterpolationType type);
-
-   virtual void initialize();
-
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   
-   /**
-    * Saves the state of this object.
-    *
-    * Keywords are:    min_value 
-    *                  max_value
-    *                  lut.<lut keywords> -> look at the
-    *                  ossimRgbLutDataObject for the keywords that
-    *                                         follow after the "." .
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=NULL)const;
-
-   /**
-    * Loads the state of this object.
-    *
-    * looks for keywords:
-    *                  min_value 
-    *                  max_value
-    *                  lut.<lut keywords> -> look at the
-    *                  ossimRgbLutDataObject for the keywords that
-    *                                         follow after the "." .
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=NULL);
-protected:
-   virtual ~ossimIndexToRgbLutFilter();
-
-   /**
-    * Called on first getTile, will initialize all data needed.
-    */
-   void allocate();
-   
-   ossimRefPtr<ossimRgbLutDataObject> theLut;
-   double theMinValue;
-   double theMaxValue;
-   double theMinMaxDeltaLength;
-   bool theMinValueOverride;
-   bool theMaxValueOverride;
-      
-   ossimIndexToRgbLutFilterInterpolationType theInterpolationType;
-   ossimRefPtr<ossimImageData> theTile;
-   ossimFilename   theLutFile;
-   
-   virtual void normalizeValue(double value,
-                               double& normalizedValue);
-   virtual void getColorNormIndex(double index, ossimRgbVector& result);
-   virtual void getColor(double index, ossimRgbVector& result);
-   virtual ossimRefPtr<ossimImageData> convertInputTile(const ossimRefPtr<ossimImageData>& tile);
-   /**
-    * Precomputed from the theMaxValue - theMinValue
-    */
-   
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimIndexToRgbLutFilter_HEADER */
diff --git a/include/ossim/imaging/ossimIntensityAdjustmentFilter.h b/include/ossim/imaging/ossimIntensityAdjustmentFilter.h
deleted file mode 100644
index 6b83809..0000000
--- a/include/ossim/imaging/ossimIntensityAdjustmentFilter.h
+++ /dev/null
@@ -1,74 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-// $Id: ossimIntensityAdjustmentFilter.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimIntensityAdjustmentFilter_HEADER
-#define ossimIntensityAdjustmentFilter_HEADER
-#include <ossim/imaging/ossimImageSourceFilter.h>
-#include <ossim/base/ossimDblGrid.h>
-
-class ossimIntensityAdjustmentFilter : public ossimImageSourceFilter
-{
-public:
-   ossimIntensityAdjustmentFilter();
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
-                                               ossim_uint32 resLevel=0);
-
-   const ossimIrect& getGridBounds()const
-      {
-         return theGridBounds;
-      }
-   virtual void setIntensityGrid(const ossimDblGrid& grid)
-      {
-         theMeanIntensityGrid = grid;
-      }
-   void setMeanIntensityTarget(double targetMean)
-      {
-         theMeanIntensityTarget = targetMean;
-      }
-   double getMeanIntensityTarget()const
-      {
-         return theMeanIntensityTarget;
-      }
-   ossimDblGrid& getMeanIntensityGrid()
-      {
-         return theMeanIntensityGrid;
-      }
-   const ossimDblGrid& getMeanIntensityGrid()const
-      {
-         return theMeanIntensityGrid;
-      }
-   void createAndPopulateGrid(const ossimIpt& spacing, double targetMean = .5);
-   
-   virtual void initialize();
-protected:
-   virtual ~ossimIntensityAdjustmentFilter();
-
-   virtual void allocate();
-   
-   ossimDblGrid                theMeanIntensityGrid;
-   double                      theMeanIntensityTarget;
-   ossimRefPtr<ossimImageData> theNormTile;
-   ossimRefPtr<ossimImageData> theTile;
-   ossimRefPtr<ossimImageData> theBlankTile;
-
-   ossimIrect   theGridBounds;
-
-   double computeMeanIntensity(ossimRefPtr<ossimImageData>& data);
-   void loadNormTile(ossimRefPtr<ossimImageData>& data);
-   double matchTargetMean(double inputValue,
-                          double meanValue,
-                          double targetMean,
-                          double minValue,
-                          double maxValue);
-   
-TYPE_DATA
-};
-#endif
diff --git a/include/ossim/imaging/ossimJpegDefaultTable.h b/include/ossim/imaging/ossimJpegDefaultTable.h
deleted file mode 100644
index a49fe6f..0000000
--- a/include/ossim/imaging/ossimJpegDefaultTable.h
+++ /dev/null
@@ -1,162 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Mingjie Su
-// 
-// Description: Default JPEG Huffman tables. Values from: MIL-STD-188-198, APPENDIX B
-//              Default JPEG quantization tables. Values from: MIL-STD-188-198, APPENDIX A
-//
-//********************************************************************
-// $Id: ossimJpegDefaultTable.h 958 2010-06-03 23:00:32Z ming.su $
-
-#ifndef ossimJpegDefaultTable_HEADER
-#define ossimJpegDefaultTable_HEADER
-
-static const int AC_BITS[16] = 
-{
-  0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125
-};
-
-static const int DC_BITS[16] = 
-{
-  0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0
-};
-
-static const int AC_HUFFVAL[256] =
-{
-  0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12,          
-  0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07,
-  0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xA1, 0x08,
-  0x23, 0x42, 0xB1, 0xC1, 0x15, 0x52, 0xD1, 0xF0,
-  0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0A, 0x16,
-  0x17, 0x18, 0x19, 0x1A, 0x25, 0x26, 0x27, 0x28,
-  0x29, 0x2A, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
-  0x3A, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
-  0x4A, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
-  0x5A, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
-  0x6A, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
-  0x7A, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,
-  0x8A, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98,
-  0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7,
-  0xA8, 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6,
-  0xB7, 0xB8, 0xB9, 0xBA, 0xC2, 0xC3, 0xC4, 0xC5,
-  0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xD2, 0xD3, 0xD4,
-  0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE1, 0xE2,
-  0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA,
-  0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8,
-  0xF9, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-static const int DC_HUFFVAL[256] =
-{
-  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-  0x08, 0x09, 0x0A, 0x0B, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-const static int Q1table[64] = 
-{
-  8,    72,  72,  72,  72,  72,  72,  72, // 0 - 7
-  72,   72,  78,  74,  76,  74,  78,  89, // 8 - 15
-  81,   84,  84,  81,  89, 106,  93,  94, // 16 - 23
-  99,   94,  93, 106, 129, 111, 108, 116, // 24 - 31
-  116, 108, 111, 129, 135, 128, 136, 145, // 32 - 39
-  136, 128, 135, 155, 160, 177, 177, 160, // 40 - 47
-  155, 193, 213, 228, 213, 193, 255, 255, // 48 - 55
-  255, 255, 255, 255, 255, 255, 255, 255  // 56 - 63
-};
-
-const static int Q2table[64] = 
-{ 
-  8,   36,  36,  36,  36,  36,  36,  36, // 0 - 7
-  36,   36,  39,  37,  38,  37,  39,  45, // 8 - 15
-  41,   42,  42,  41,  45,  53,  47,  47, // 16 -23
-  50,   47,  47,  53,  65,  56,  54,  59, // 24 - 31
-  59,   54,  56,  65,  68,  64,  69,  73, // 32 - 39
-  69,   64,  68,  78,  81,  89,  89,  81, // 40 - 47
-  78,   98, 108, 115, 108,  98, 130, 144, // 48 - 55
-  144, 130, 178, 190, 178, 243, 243, 255  // 56 - 63
-};
-
-const static int Q3table[64] = 
-{ 
-  8,  10, 10, 10, 10, 10, 10, 10,  // 0 - 7
-  10, 10, 11, 10, 11, 10, 11, 13,  // 8 - 15
-  11, 12, 12, 11, 13, 15, 13, 13,  // 16 - 23
-  14, 13, 13, 15, 18, 16, 15, 16,  // 24 - 31
-  16, 15, 16, 18, 19, 18, 19, 21,  // 32 - 39
-  19, 18, 19, 22, 23, 25, 25, 23,  // 40 - 47
-  22, 27, 30, 32, 30, 27, 36, 40,  // 48 - 56
-  40, 36, 50, 53, 50, 68, 68, 91   // 57 - 63
-};
-
-const static int Q4table[64] = 
-{
-  8,   7,  7,  7,  7,  7,  7,  7, // 0 - 7
-  7,   7,  8,  7,  8,  7,  8,  9, // 8 - 15
-  8,   8,  8,  8,  9, 11,  9,  9, // 16 - 23
-  10,  9,  9, 11, 13, 11, 11, 12, // 24 - 31
-  12, 11, 11, 13, 14, 13, 14, 15, // 32 - 39
-  14, 13, 14, 16, 16, 18, 18, 16, // 40 - 47
-  16, 20, 22, 23, 22, 20, 26, 29, // 48 - 55
-  29, 26, 36, 38, 36, 49, 49, 65  // 56 - 63
-};
-
-const static int Q5table[64] = 
-{
-  4,   4,  4,  4,  4,  4,  4,  4, // 0 - 7
-  4,   4,  4,  4,  4,  4,  4,  5, // 8 - 15
-  5,   5,  5,  5,  5,  6,  5,  5, // 16 - 23
-  6,   5,  5,  6,  7,  6,  6,  6, // 24 - 31
-  6,   6,  6,  7,  8,  7,  8,  8, // 32 - 39
-  8,   7,  8,  9,  9, 10, 10,  9, // 40 - 47
-  9,  11, 12, 13, 12, 11, 14, 16, // 48 - 55
-  16, 14, 20, 21, 20, 27, 27, 36  // 56 - 63
-};
-
-const static int* QTABLE_ARRAY[5]={Q1table,Q2table,Q3table,Q4table,Q5table};
-
-#endif
diff --git a/include/ossim/imaging/ossimJpegMemDest.h b/include/ossim/imaging/ossimJpegMemDest.h
deleted file mode 100644
index 4f54786..0000000
--- a/include/ossim/imaging/ossimJpegMemDest.h
+++ /dev/null
@@ -1,36 +0,0 @@
-//----------------------------------------------------------------------------
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Oscar Kramer, original code from Thomas G. Lane
-//
-// Most of code and comments below are from jpeg-6b "example.c" file. See 
-// http://www4.cs.fau.de/Services/Doc/graphics/doc/jpeg/libjpeg.html
-//
-// Description:
-// Code interfaces to use with jpeg-6b library to write a jpeg image from memory.
-//----------------------------------------------------------------------------
-// $Id$
-#ifndef ossimJpegMemSrc_HEADER
-#define ossimJpegMemSrc_HEADER 1
-
-#include <ostream>                     /** for std::ostream */
-#include <ossim/base/ossimConstants.h> /** for OSSIM_DLL export macro */
-#include <cstdio>                      /** for size_t  */
-#include <csetjmp>                     /** for jmp_buf */
-extern "C"
-{
-#if defined(_MSC_VER) || defined(__MINGW32__)
-#  ifndef XMD_H
-#    define XMD_H
-#  endif
-#endif
-#include <jpeglib.h> /** for jpeg stuff */
-}
-
-/**
- * @brief Method which uses memory instead of a FILE* to write to.
- * @note Used in place of "jpeg_stdio_dest(&cinfo, outfile)".
- */
-OSSIM_DLL void jpeg_cpp_stream_dest (j_compress_ptr cinfo, std::ostream& stream);
-
-#endif 
diff --git a/include/ossim/imaging/ossimJpegMemSrc.h b/include/ossim/imaging/ossimJpegMemSrc.h
deleted file mode 100644
index 05dd937..0000000
--- a/include/ossim/imaging/ossimJpegMemSrc.h
+++ /dev/null
@@ -1,43 +0,0 @@
-//----------------------------------------------------------------------------
-// License:  See top level LICENSE.txt file.
-//
-// Author:  David Burken, original code from Thomas G. Lane
-//
-// Description:
-// Code interfaces to use with jpeg-6b library to read a jpeg image from
-// memory.
-//----------------------------------------------------------------------------
-// $Id$
-#ifndef ossimJpegMemSrc_HEADER
-#define ossimJpegMemSrc_HEADER
-
-#include <ossim/base/ossimConstants.h> /** for OSSIM_DLL export macro */
-extern "C"
-{
-#include <cstdio>                      /** for size_t  */
-#include <csetjmp>                     /** for jmp_buf */
-#include <jpeglib.h>                   /** for jpeg stuff */
-
-
-/** @brief Extended error handler struct. */
-struct OSSIM_DLL ossimJpegErrorMgr
-{
-  struct jpeg_error_mgr pub;	/* "public" fields */
-  jmp_buf setjmp_buffer;	/* for return to caller */
-};
-typedef struct ossimJpegErrorMgr* ossimJpegErrorPtr;
-
-/**
- * @brief Error routine that will replace jpeg's standard error_exit method.
- */
-OSSIM_DLL void ossimJpegErrorExit (j_common_ptr cinfo);
-
-/**
- * @brief Method which uses memory instead of a FILE* to read from.
- * @note Used in place of "jpeg_stdio_src(&cinfo, infile)".
- */
-OSSIM_DLL void ossimJpegMemorySrc (j_decompress_ptr cinfo,
-                                   const JOCTET * buffer,
-                                   std::size_t bufsize);
-}
-#endif /* #ifndef ossimJpegMemSrc_HEADER */
diff --git a/include/ossim/imaging/ossimJpegTileSource.h b/include/ossim/imaging/ossimJpegTileSource.h
deleted file mode 100644
index a12fa7d..0000000
--- a/include/ossim/imaging/ossimJpegTileSource.h
+++ /dev/null
@@ -1,215 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Contains class declaration for JpegTileSource.
-// JpegTileSource is derived from ImageHandler which is derived from
-// TileSource.
-//*******************************************************************
-//  $Id: ossimJpegTileSource.h 22117 2013-01-18 21:04:23Z dburken $
-
-#ifndef ossimJpegTileSource_HEADER
-#define ossimJpegTileSource_HEADER
-
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimAppFixedTileCache.h>
-
-class  ossimImageData;
-
-class OSSIM_DLL ossimJpegTileSource : public ossimImageHandler
-{
-public:
-
-   ossimJpegTileSource();
-
-   ossimJpegTileSource(const ossimKeywordlist& kwl,
-                       const char* prefix=0);
-
-   ossimJpegTileSource(const char* jpeg_file);
-
-
-   virtual ossimString getShortName() const;
-   virtual ossimString getLongName()  const;
-
-   /**
-    *  Returns a pointer to a tile given an origin representing the upper
-    *  left corner of the tile to grab from the image.
-    *  Satisfies pure virtual from TileSource class.
-    */
-   virtual ossimRefPtr<ossimImageData> getTile(const  ossimIrect& rect,
-                                               ossim_uint32 resLevel=0);
-
-   /**
-    * Method to get a tile.   
-    *
-    * @param result The tile to stuff.  Note The requested rectangle in full
-    * image space and bands should be set in the result tile prior to
-    * passing.  It will be an error if:
-    * result.getNumberOfBands() != this->getNumberOfOutputBands()
-    *
-    * @return true on success false on error.  If return is false, result
-    *  is undefined so caller should handle appropriately with makeBlank or
-    * whatever.
-    */
-   virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);
-
-   /**
-     *  Returns the number of bands in the image.
-     *  Satisfies pure virtual from ImageHandler class.
-     */
-   virtual ossim_uint32 getNumberOfInputBands() const;
-
-   /**
-    * Returns the number of bands in a tile returned from this TileSource.
-    * Note: we are supporting sources that can have multiple data objects.
-    * If you want to know the scalar type of an object you can pass in the
-    */
-   virtual ossim_uint32 getNumberOfOutputBands()const;
-
-   /**
-     *  Returns the number of lines in the image.
-     *  Satisfies pure virtual from ImageHandler class.
-     */
-   virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level = 0) const;
-
-   /**
-    *  Returns the number of samples in the image.
-    *  Satisfies pure virtual from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level = 0) const;
-
-   /**
-    * Returns the zero based image rectangle for the reduced resolution data
-    * set (rrds) passed in.  Note that rrds 0 is the highest resolution rrds.
-    */
-   virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level = 0) const;
-
-   /**
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   /**
-    * Returns the output pixel type of the tile source.
-    */
-   virtual ossimScalarType getOutputScalarType() const;
-
-   /**
-    * Returns the width of the output tile.
-    */
-   virtual ossim_uint32    getTileWidth() const;
-
-   /**
-    * Returns the height of the output tile.
-    */
-   virtual ossim_uint32    getTileHeight() const;
-
-   /**
-    * Returns the tile width of the image or 0 if the image is not tiled.
-    * Note: this is not the same as the ossimImageSource::getTileWidth which
-    * returns the output tile width which can be different than the internal
-    * image tile width on disk.
-    */
-   virtual ossim_uint32 getImageTileWidth() const;
-
-   /**
-    * Returns the tile width of the image or 0 if the image is not tiled.
-    * Note: this is not the same as the ossimImageSource::getTileWidth which
-    * returns the output tile width which can be different than the internal
-    * image tile width on disk.
-    */
-   virtual ossim_uint32 getImageTileHeight() const;
-
-   bool isValidRLevel(ossim_uint32 reduced_res_level) const;
-
-
-   bool isOpen()const;
-   /**
-    *  Returns true if the image_file can be opened and is a valid tiff file.
-    */
-   bool open(const ossimFilename& jpeg_file);
-   virtual void close();
-
-   /**
-    * @brief Gets a property for matching name.
-    * @param name The name of the property to get.
-    * @return Returns property matching "name".
-    */
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   
-   /**
-    * @brief Gets a list of property names available.
-    * @param propertyNames The list to push back names to.
-    */
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-   /**
-    * Returns the image geometry object associated with this tile source or
-    * NULL if non defined.  The geometry contains full-to-local image
-    * transform as well as projection (image-to-world).
-    */
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-   
-protected:
-
-   /**
-    * @param Method to get geometry from the xml file or internal geotiff
-    * tags.
-    */
-   virtual ossimRefPtr<ossimImageGeometry> getInternalImageGeometry() const; 
-   
-   virtual ~ossimJpegTileSource();
-	class PrivateData;
-   /**
-    *  Returns true if no errors initializing object.
-    *
-    *  Notes:
-    *  - Callers of this method must ensure "theTiffPtr" data member
-    *    is initialized.
-    *  - This method was added to consolidate object initialization code
-    *    between constructor and public open method.
-    */
-   virtual bool open();
-
-   void allocate();
-   void destroy();
-   void restart();
-
-   /**
-    * @note this method assumes that setImageRectangle has been called on
-    * theTile.
-    */
-   void fillTile(const ossimIrect& clip_rect, ossimImageData* tile);
-
-   ossimRefPtr<ossimImageData>  theTile;
-   ossimRefPtr<ossimImageData>  theCacheTile;
-   ossim_uint8*                 theLineBuffer;
-   FILE*                        theFilePtr;
-   ossimIrect                   theBufferRect;
-   ossimIrect                   theImageRect;
-   ossim_uint32                 theNumberOfBands;
-   ossimIpt                     theCacheSize;
-
-   PrivateData*                 thePrivateData;
-
-   ossimAppFixedTileCache::ossimAppFixedCacheId theCacheId;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimJpegYCbCrToRgbSource.h b/include/ossim/imaging/ossimJpegYCbCrToRgbSource.h
deleted file mode 100644
index 6436edd..0000000
--- a/include/ossim/imaging/ossimJpegYCbCrToRgbSource.h
+++ /dev/null
@@ -1,37 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimJpegYCbCrToRgbSource.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimJpegYCbCrToRgbSource_HEADER
-#define ossimJpegYCbCrToRgbSource_HEADER
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-class ossimJpegYCbCrToRgbSource : public ossimImageSourceFilter
-{
-public:
-   ossimJpegYCbCrToRgbSource();
-   ossimJpegYCbCrToRgbSource(ossimImageSource* inputSource);
-   
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
-                                               ossim_uint32 resLevel=0);
-
-   virtual void initialize();
-       
-protected:
-   virtual ~ossimJpegYCbCrToRgbSource();
-
-   virtual void allocate();
-   
-   ossimRefPtr<ossimImageData> theBlankTile;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimMapCompositionSource.h b/include/ossim/imaging/ossimMapCompositionSource.h
deleted file mode 100644
index eae1552..0000000
--- a/include/ossim/imaging/ossimMapCompositionSource.h
+++ /dev/null
@@ -1,336 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimMapCompositionSource.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimMapCompositionSource_HEADER
-#define ossimMapCompositionSource_HEADER
-#include <ossim/imaging/ossimAnnotationSource.h>
-#include <ossim/base/ossimRgbVector.h>
-#include <ossim/base/ossimPolyArea2d.h>
-#include <ossim/font/ossimFont.h>
-#include <ossim/base/ossimFontInformation.h>
-
-class ossimFont;
-class ossimMapProjection;
-class ossimU8ImageData;
-
-class ossimMapCompositionSource : public ossimAnnotationSource
-{
-public:
-   enum ossimGridLineType
-   {
-      OSSIM_GRID_NONE    = 0,
-      OSSIM_GRID_LINE    = 1,
-      OSSIM_GRID_RESEAUX = 2
-   };
-
-   ossimMapCompositionSource();
-   
-   virtual ossimScalarType getOutputScalarType() const;
-   virtual ossim_uint32    getNumberOfOutputBands() const;
-   
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-
-
-   ossimIpt getViewWidthHeight()const;
-
-   void getViewWidthHeight(ossimIpt& widthHeight)const;
-   
-   void setViewWidthHeight(const ossimIpt& widthHeight);
-   
-   // all borders here
-   virtual ossim_int32 getTopBorderLength()const;
-   virtual ossim_int32 getBottomBorderLength()const;
-   virtual ossim_int32 getLeftBorderLength()const;
-   virtual ossim_int32 getRightBorderLength()const;
-
-   virtual void setTopBorderLength(ossim_int32 length);
-   virtual void setBottomBorderLength(ossim_int32 length);
-   virtual void setLeftBorderLength(ossim_int32 length);
-   virtual void setRightBorderLength(ossim_int32 length);
-
-   //all spacing here
-   void setGeographicSpacingLat(double value);
-   void setGeographicSpacingLon(double value);
-   void setMeterSpacingX(double value);
-   void setMeterSpacingY(double value);
-   void setMeterSpacing(double x, double y);
-   void setGeographicSpacing(double lat, double lon);
-
-   ossimDpt getGeographicSpacing()const;
-   ossimDpt getMeterSpacing()const;
-   
-   // All geographic formatting here
-   virtual ossimString getTopGeographicLabelFormat()const;
-   virtual ossimString getBottomGeographicLabelFormat()const;
-   virtual ossimString getLeftGeographicLabelFormat()const;
-   virtual ossimString getRightGeographicLabelFormat()const;
-
-   virtual void setGeographicLabelFormat(const ossimString format);
-   virtual void setTopGeographicLabelFormat(const ossimString& format);
-   virtual void setBottomGeographicLabelFormat(const ossimString& format);
-   virtual void setLeftGeographicLabelFormat(const ossimString& format);
-   virtual void setRightGeographicLabelFormat(const ossimString& format);
-   
-   // All font funtions here.
-   virtual ossimString    getTitle()const;
-   virtual ossimRgbVector getTitleColor()const;
-
-   virtual void setTitleFont(const ossimFontInformation& fontInfo);
-   virtual void setTitleColor(const ossimRgbVector& color);
-   virtual void setTitle(const ossimString& s);
-   virtual void setGeographicTopLabelFont(const ossimFontInformation& fontInfo);
-   virtual void setGeographicBottomLabelFont(const ossimFontInformation& fontInfo);
-   virtual void setGeographicLeftLabelFont(const ossimFontInformation& fontInfo);
-   virtual void setGeographicRightLabelFont(const ossimFontInformation& fontInfo);
-
-   virtual void setMeterTopLabelFont(const ossimFontInformation& fontInfo);
-   virtual void setMeterBottomLabelFont(const ossimFontInformation& fontInfo);
-   virtual void setMeterLeftLabelFont(const ossimFontInformation& fontInfo);
-   virtual void setMeterRightLabelFont(const ossimFontInformation& fontInfo);
-
-   virtual ossimFontInformation getTitleFont()const;
-   virtual ossimFontInformation getGeographicTopLabelFontInfo()const;
-   virtual ossimFontInformation getGeographicBottomLabelFontInfo()const;
-   virtual ossimFontInformation getGeographicLeftLabelFontInfo()const;
-   virtual ossimFontInformation getGeographicRightLabelFontInfo()const;
-   virtual ossimFontInformation getMeterTopLabelFontInfo()const;
-   virtual ossimFontInformation getMeterBottomLabelFontInfo()const;
-   virtual ossimFontInformation getMeterLeftLabelFontInfo()const;
-   virtual ossimFontInformation getMeterRightLabelFontInfo()const;
-
-   // All color funtions here
-   virtual ossimRgbVector getBorderColor()const;
-   virtual void setBorderColor(const ossimRgbVector& color);
-
-   virtual ossimRgbVector getGeographicGridColor()const;
-   virtual ossimRgbVector getMeterGridColor()const;
-   virtual ossimRgbVector getTopGeographicLabelColor()const;
-   virtual ossimRgbVector getBottomGeographicLabelColor()const;
-   virtual ossimRgbVector getLeftGeographicLabelColor()const;
-   virtual ossimRgbVector getRightGeographicLabelColor()const;
-
-   virtual void setGeographicGridColor(const ossimRgbVector& color);
-   virtual void setTopGeographicLabelColor(const ossimRgbVector& color);
-   virtual void setBottomGeographicLabelColor(const ossimRgbVector& color);
-   virtual void setLeftGeographicLabelColor(const ossimRgbVector& color);
-   virtual void setRightGeographicLabelColor(const ossimRgbVector& color);
-   virtual void setGeographicLabelColor(const ossimRgbVector& color);
-
-   virtual ossimRgbVector getTopMeterLabelColor()const;
-   virtual ossimRgbVector getBottomMeterLabelColor()const;
-   virtual ossimRgbVector getLeftMeterLabelColor()const;
-   virtual ossimRgbVector getRightMeterLabelColor()const;
-   
-   virtual void setTopMeterLabelColor(const ossimRgbVector& color);
-   virtual void setBottomMeterLabelColor(const ossimRgbVector& color);
-   virtual void setLeftMeterLabelColor(const ossimRgbVector& color);
-   virtual void setRightMeterLabelColor(const ossimRgbVector& color);
-   virtual void setMeterLabelColor(const ossimRgbVector& color);
-   virtual void setMeterGridColor(const ossimRgbVector& color);
-
-   // All grid types here
-   virtual void setMeterGridType(ossimGridLineType gridType);
-   virtual void setGeographicGridType(ossimGridLineType gridType);
-   virtual void setBorderColor(ossimRgbVector& color);
-
-   virtual ossimGridLineType getGeographicGridType()const;
-   virtual ossimGridLineType getMeterGridType()const;
-   
-   // all grid flags here
-   void setGeographicTickMarkFlag(bool flag);
-   void setTopGeographicTickMarkFlag(bool flag);
-   void setBottomGeographicTickMarkFlag(bool flag);
-   void setLeftGeographicTickMarkFlag(bool flag);
-   void setRightGeographicTickMarkFlag(bool flag);
-   void setTopGeographicLabelFlag(bool flag);
-   void setBottomGeographicLabelFlag(bool flag);
-   void setLeftGeographicLabelFlag(bool flag);
-   void setRightGeographicLabelFlag(bool flag);
-
-   virtual bool getTopGeographicTickMarkFlag()const;
-   virtual bool getBottomGeographicTickMarkFlag()const;
-   virtual bool getLeftGeographicTickMarkFlag()const;
-   virtual bool getRightGeographicTickMarkFlag()const;
-   virtual bool getTopGeographicLabelFlag()const;
-   virtual bool getBottomGeographicLabelFlag()const;
-   virtual bool getLeftGeographicLabelFlag()const;
-   virtual bool getRightGeographicLabelFlag()const;
-
-   void setMeterTickMarkFlag(bool flag);
-   virtual void setTopMeterTickMarkFlag(bool flag);
-   virtual void setBottomMeterTickMarkFlag(bool flag);
-   virtual void setLeftMeterTickMarkFlag(bool flag);
-   virtual void setRightMeterTickMarkFlag(bool flag);
-   virtual void setTopMeterLabelFlag(bool flag);
-   virtual void setBottomMeterLabelFlag(bool flag);
-   virtual void setLeftMeterLabelFlag(bool flag);
-   virtual void setRightMeterLabelFlag(bool flag);
-   
-   virtual bool getTopMeterTickMarkFlag()const;
-   virtual bool getBottomMeterTickMarkFlag()const;
-   virtual bool getLeftMeterTickMarkFlag()const;
-   virtual bool getRightMeterTickMarkFlag()const;
-   virtual bool getTopMeterLabelFlag()const;
-   virtual bool getBottomMeterLabelFlag()const;
-   virtual bool getLeftMeterLabelFlag()const;
-   virtual bool getRightMeterLabelFlag()const;
-   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
-
-   virtual void initialize();
-
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-
-protected:
-   virtual ~ossimMapCompositionSource();
-   ossimIpt            theViewWidthHeight;
-   ossimGridLineType   theMeterGridType;
-   ossimGridLineType   theGeographicGridType;
-   
-   ossim_uint32        theTopBorderLength;
-   ossim_uint32        theBottomBorderLength;
-   ossim_uint32        theLeftBorderLength;
-   ossim_uint32        theRightBorderLength;
-   
-   ossimRgbVector      theBorderColor;
-
-   ossimRgbVector      theGeographicGridColor;
-   ossimRgbVector      theMeterGridColor;
-
-   // title info
-   //
-   ossimString          theTitleString;
-   ossimRefPtr<ossimFont>           theTitleFont;
-   ossimFontInformation theTitleFontInfo;
-   ossimRgbVector       theTitleColor;
-   
-   // grid label colors
-   //
-   ossimRgbVector      theTopGeographicLabelColor;
-   ossimRgbVector      theBottomGeographicLabelColor;
-   ossimRgbVector      theLeftGeographicLabelColor;
-   ossimRgbVector      theRightGeographicLabelColor;
-   ossimRgbVector      theTopMeterLabelColor;
-   ossimRgbVector      theBottomMeterLabelColor;
-   ossimRgbVector      theLeftMeterLabelColor;
-   ossimRgbVector      theRightMeterLabelColor;
-
-   // grid label font
-   //
-   ossimFontInformation theGeographicTopLabelFontInfo;
-   ossimRefPtr<ossimFont>           theGeographicTopLabelFont;
-   ossimFontInformation theGeographicBottomLabelFontInfo;
-   ossimRefPtr<ossimFont>           theGeographicBottomLabelFont;
-   ossimFontInformation theGeographicLeftLabelFontInfo;
-   ossimRefPtr<ossimFont>           theGeographicLeftLabelFont;
-   ossimFontInformation theGeographicRightLabelFontInfo;
-   ossimRefPtr<ossimFont>           theGeographicRightLabelFont;
-
-   ossimFontInformation theMeterTopLabelFontInfo;
-   ossimRefPtr<ossimFont>           theMeterTopLabelFont;
-   ossimFontInformation theMeterBottomLabelFontInfo;
-   ossimRefPtr<ossimFont>           theMeterBottomLabelFont;
-   ossimFontInformation theMeterLeftLabelFontInfo;
-   ossimRefPtr<ossimFont>           theMeterLeftLabelFont;
-   ossimFontInformation theMeterRightLabelFontInfo;
-   ossimRefPtr<ossimFont>           theMeterRightLabelFont;
-   
-   // grid label dms format strings
-   //
-   ossimString         theTopGeographicFormat;
-   ossimString         theBottomGeographicFormat;
-   ossimString         theLeftGeographicFormat;
-   ossimString         theRightGeographicFormat;
-
-   // grid label flag
-   //
-   bool                theTopGeographicLabelFlag;
-   bool                theBottomGeographicLabelFlag;
-   bool                theLeftGeographicLabelFlag;
-   bool                theRightGeographicLabelFlag;
-
-   bool                theTopGeographicTickFlag;
-   bool                theBottomGeographicTickFlag;
-   bool                theLeftGeographicTickFlag;
-   bool                theRightGeographicTickFlag;
-
-   bool                theTopMeterLabelFlag;
-   bool                theBottomMeterLabelFlag;
-   bool                theLeftMeterLabelFlag;
-   bool                theRightMeterLabelFlag;
-
-   bool                theTopMeterTickFlag;
-   bool                theBottomMeterTickFlag;
-   bool                theLeftMeterTickFlag;
-   bool                theRightMeterTickFlag;
-   
-   
-   ossimIrect          theTopBorder;
-   ossimIrect          theBottomBorder;
-   ossimIrect          theLeftBorder;
-   ossimIrect          theRightBorder;
-
-   // geo-tick spacing in lat lon
-   ossimDpt            theGeographicSpacing;
-
-   //  tick spacing in meter units
-   ossimDpt            theMeterSpacing;
-   
-   ossimAnnotationSource::AnnotationObjectListType theFixedAnnotationList;
-
-   /*!
-    * Override base classes drawAnnotations so we can layout
-    * any fixed annotations first.
-    */
-   virtual void drawAnnotations(ossimRefPtr<ossimImageData> tile);
-   
-   virtual void computeBorderRects();
-   virtual void drawBorders();
-   virtual void addGridLabels();
-   
-   virtual void addGeographicTopGridLabels();
-   virtual void addGeographicBottomGridLabels();
-   virtual void addGeographicLeftGridLabels();
-   virtual void addGeographicRightGridLabels();
-
-   virtual void addGeographicGridLines();
-   virtual void addGeographicGridReseaux();
-   
-   virtual void addMeterGridLabels();
-   
-   virtual void addMeterGridLines();
-   virtual void addMeterGridReseaux();
-
-   
-   virtual void addTitle();
-   
-   virtual void layoutAnnotations();
-
-   virtual void addFixedAnnotation(ossimAnnotationObject* obj);
-      
-   virtual void deleteFixedAnnotations();
-   
-   ossimIrect getViewingRect()const;
-   
-   //! Fetches the input connection's image geometry and verifies that it is a map projection.
-   //! Returns NULL if no valid projection found.
-   const ossimMapProjection* inputMapProjection() const;
-
-// For RTTI
-TYPE_DATA
-};
-#endif /* #ifndef ossimMapCompositionSource_HEADER */
-
diff --git a/include/ossim/imaging/ossimMaskFilter.h b/include/ossim/imaging/ossimMaskFilter.h
deleted file mode 100644
index d0a90aa..0000000
--- a/include/ossim/imaging/ossimMaskFilter.h
+++ /dev/null
@@ -1,266 +0,0 @@
-//*******************************************************************
-  // Copyright (C) 2000 ImageLinks Inc. 
-  //
-  // License:  LGPL
-  // 
-  // See LICENSE.txt file in the top level directory for more details.
-  //
-  // Author: Garrett Potts
-  // Modified by: Elan Sharghi (1/20/2009)
-  // Description: Class declaration for ossimMaskFilter.
-  //
-  //*************************************************************************
-    // $Id: ossimMaskFilter.h 20409 2011-12-22 16:57:05Z dburken $
-#ifndef  ossimMaskFilter_HEADER
-#define  ossimMaskFilter_HEADER 1
-#include <ossim/imaging/ossimImageSource.h>
-
-    /**
-     * <pre>
-     * class ossimMaskFilter
-     *
-     *    Requires 2 inputs.  The first input is assumed to be the image input
-     *    and the second input is assumed to be the mask data.  It will only
-     *    use one band of the mask and multi band masks are not supported.
-     *
-     *    the number of bands, min pix, max pix, null pix ...etc are mapped
-     *    to the first input.
-     *
-     * Keywords:
-     *    mask_type:
-     *
-     * keywords description: This keyword can have the following values:
-     *    select, select_clamp, invert, weighted, binary, or binary_inverse
-     *         
-     *    - select will use the input data and every where
-     *      the mask is greater than 0 it will copy the input to the output.
-     *
-     *    - select_clamp_min If mask pixel is non zero, output pixel is input
-     *      pixel; else, null pixel value. Differs from select in that output
-     *      pixel is clamped to min pixel if input pixel is used. 
-     *      
-     *    - invert will use the input data and every where the mask is 0 it
-     *      will copy the input to the output else it will place a null in
-     *      the output.
-     *      
-     *    - weighted will normalize the mask between 0 and 1 and then multiply
-     *      the input by that normalized value and copy to the output.
-     *
-     *    - binary If mask pixel is non zero, output pixel is max pixel value;
-     *      else, null.
-     *
-     *    - binary_inverse If mask pixel is non zero, output pixel is max pixel
-     *      value; else, null pixel value. 
-     *    
-     * example of keywords:
-     *
-     *      mask_type: select
-     *
-     * </pre>
-     */
-class OSSIMDLLEXPORT ossimMaskFilter : public ossimImageSource
-{
-public:
-   /**
-    * Enumeration used to identify what the selection type for this mask is to
-    * be used:
-    * 
-    * - OSSIM_MASK_TYPE_SELECT
-    *   If the mask is non zero then the input is kept if it's 0 then the input
-    *   is nulled out.
-    * - OSSIM_MASK_TYPE_INVERT
-    *   If the input is non zero then the output is nulled else the input is kept
-    * - OSSIM_MASK_TYPE_WEIGHTED
-    *   works as a multiplier of the input data.  The mask is normalized to be
-    *   between 0 and 1 and multiplies the input by that normalized value.
-    * - OSSIM_MASK_TYPE_BINARY
-    *   If mask pixel is non zero, output pixel is null pixel value; else, max
-    *   pixel value.
-    * - OSSIM_MASK_TYPE_BINARY_INVERSE
-    *   If mask pixel is non zero, output pixel is max pixel value; else, null
-    *   pixel value.
-    * - OSSIM_MASK_TYPE_SELECT_CLAMP_MIN
-    *   If mask pixel is non zero, output pixel is input pixel; else, null pixel
-    *   value. Differs from OSSIM_MASK_TYPE_SELECT in that output pixel is
-    *   clamped to min pixel if input pixel is used. The clampling has the
-    *   affect of flipping null pixels to min pixel value if the mask pixel is
-    *   non zero and input pixel is a null.
-    */
-  enum ossimFileSelectionMaskType
-  {
-     /**< standard select if mask is true then keep */
-     OSSIM_MASK_TYPE_SELECT         = 1,
-     /**< standard invert if mask is true the don't keep */
-     OSSIM_MASK_TYPE_INVERT         = 2,
-     /**< weighted operation.  Normalize the mask and multiply the input */
-     OSSIM_MASK_TYPE_WEIGHTED       = 3,
-     /**< binary image> */
-     OSSIM_MASK_TYPE_BINARY         = 4,
-     /**< inverse binary image> */
-     OSSIM_MASK_TYPE_BINARY_INVERSE = 5,
-     /**< Standard select if mask is true then keep with min. */
-     OSSIM_MASK_TYPE_SELECT_CLAMP_MIN = 6,
-  };
-
-   /**
-    * Default Constructor.
-    */
-   ossimMaskFilter(ossimObject* owner=NULL);
-
-   /**
-    * This set method is necessary when this object is being added to an ossimImageChain because
-    * ossimImageChain::addLast() performs a disconnect of all the input sources, thus losing the
-    * assignments made via constructor accepting source pointers. If the intent is to insert this
-    * object in place of the image handler in a chain, First remove the handler from the chain, then
-    * add a default-constructed mask filter object, then call this method to assign the inputs.
-    */
-   void setMaskSource(ossimImageSource* maskSource);
-
-   /**
-    * Sets the mask type.
-    * @param type The mask algorithm type to be used.
-    * see ossimFileSelectionMaskType
-    */
-   virtual void setMaskType(ossimFileSelectionMaskType type);
-   
-   /**
-    * @brief Sets the mask type from string.
-    *
-    * Valid strings are:  "select", "invert" and "weighted".
-    * 
-    * @param type The mask algorithm type to be used.
-    */
-   virtual void setMaskType(const ossimString& type);
-
-   /**
-    * Returns the current mask algorithm used.
-    * \return the current ossimFileSelectionMaskType used.
-    */
-   virtual ossimFileSelectionMaskType getMaskType() const;
-
-   /**
-    * @brief Returns the current mask algorithm used as a string.
-    * @return the current ossimFileSelectionMaskType used.
-    */
-   virtual ossimString getMaskTypeString() const;
-
-   /**
-    * Main entry point for the algorithm.
-    * \param rect 
-    *
-    */
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
-                                               ossim_uint32 resLevel=0);
-
-   virtual void initialize();
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-   
-   virtual bool canConnectMyInputTo(ossim_int32 index, const ossimConnectableObject* object)const;
-   
-   virtual ossim_uint32 getNumberOfInputBands() const;
-   
-
-   virtual ossimRefPtr<ossimImageData> executeMaskFilter(
-      ossimRefPtr<ossimImageData> imageSourceData,
-      ossimRefPtr<ossimImageData> maskSourceData);
-
-   /** @brief Interface to set the mask type. */
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-
-   /** @return "mask_type" property. */
-   virtual ossimRefPtr<ossimProperty> getProperty(
-      const ossimString& name)const;
-
-   /** @brief Adds "mask_type" to list. */
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-protected:
-   /**
-    * Will delete its owned tile.
-    */
-   virtual ~ossimMaskFilter();
-   
-   void allocate();
-   
-   /**
-    * will execute the section algorithm.  everywhere the mask is not 0 it
-    * copies the input data to the output and everywhere the input is null it
-    * writes a null pixel to the output.
-    */
-   ossimRefPtr<ossimImageData> executeMaskFilterSelect(
-      ossimRefPtr<ossimImageData> imageSourceData,
-      ossimRefPtr<ossimImageData> maskSourceData);
-
-   /**
-    * will execute the invert selection algorithm.  everywhere the mask is 0
-    * it copies the input data to the output else it outputs null.
-    */
-   ossimRefPtr<ossimImageData> executeMaskFilterInvertSelect(
-      ossimRefPtr<ossimImageData> imageSourceData,
-      ossimRefPtr<ossimImageData> maskSourceData);
-
-   /**
-    * will execute the weighted algorithm.  It normalizes the mask value to
-    * be between 0 and 1 and multiplies the input data by that value and
-    * outputs it.  
-    */
-   ossimRefPtr<ossimImageData> executeMaskFilterWeighted(
-      ossimRefPtr<ossimImageData> imageSourceData,
-      ossimRefPtr<ossimImageData> maskSourceData);
-
-   /**
-    * Will execute the binary algorithm. Copies the values in the mask to each 
-    * tile. Values will be either NULL or MAX pixel value, typically 0 or 255.
-    */
-   ossimRefPtr<ossimImageData> executeMaskFilterBinary(
-      ossimRefPtr<ossimImageData> imageSourceData,
-      ossimRefPtr<ossimImageData> maskSourceData);
-   
-   template <class inputT, class maskT>
-      ossimRefPtr<ossimImageData> executeMaskFilterSelection(
-         inputT dummyInput,
-         maskT  dummyMask,
-         ossimRefPtr<ossimImageData> imageSourceData,
-         ossimRefPtr<ossimImageData> maskSourceData);
-   
-   template <class inputT, class maskT>
-      ossimRefPtr<ossimImageData> executeMaskFilterInvertSelection(
-         inputT dummyInput,
-         maskT  dummyMask,
-         ossimRefPtr<ossimImageData> imageSourceData,
-         ossimRefPtr<ossimImageData> maskSourceData);
-   
-   template <class inputT, class maskT>
-      ossimRefPtr<ossimImageData> executeMaskFilterWeighted(
-         inputT dummyInput,
-         maskT  dummyMask,
-         ossimRefPtr<ossimImageData> imageSourceData,
-         ossimRefPtr<ossimImageData> maskSourceData);
-
-   template <class inputT, class maskT>
-   ossimRefPtr<ossimImageData> executeMaskFilterBinarySelection(
-      inputT dummyInput,
-      maskT  dummyMask,
-      ossimRefPtr<ossimImageData> imageSourceData,
-      ossimRefPtr<ossimImageData> maskSourceData);
-
-   /**
-    * Member variable that holds the algorithm type to run on the calls to getTile.
-    */
-   ossimFileSelectionMaskType  theMaskType;
-
-   /**
-    * Member used to store the result of the applied algorithm type.  This is returned
-    * from the call to getTile.
-    */
-   ossimRefPtr<ossimImageData> theTile;
-   ossimRefPtr<ossimImageSource> theMaskSource;
-
-   TYPE_DATA
-};
-
-#endif /* #ifndef ossimMaskFilter_HEADER */
diff --git a/include/ossim/imaging/ossimMaxMosaic.h b/include/ossim/imaging/ossimMaxMosaic.h
deleted file mode 100644
index af13fd1..0000000
--- a/include/ossim/imaging/ossimMaxMosaic.h
+++ /dev/null
@@ -1,78 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2005 SANZ Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Kenneth Melero (kmelero at sanz.com)
-//
-// Description: This combiner is designed to "float" the maximum pixel value
-//              of all inputs to the top of the mosaic output. 
-//
-//*************************************************************************
-// $Id: ossimMaxMosaic.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimMaxMosaic_HEADER
-#define ossimMaxMosaic_HEADER
-
-#include <vector>
-#include <ossim/imaging/ossimImageCombiner.h>
-
-
-/**
- * An image mosaic is a simple combiner that will
- * just do a simple mosaic.  It just checks NULL pix values until it finds a
- * pixel that is not empty and copies it out to the output.  The list will
- * have same size tiles and have the same number of bands.
- */
-class OSSIMDLLEXPORT ossimMaxMosaic : public ossimImageCombiner
-{
-public:
-   ossimMaxMosaic();
-   ossimMaxMosaic(ossimConnectableObject::ConnectableObjectList& inputSources);
-   
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
-                                               ossim_uint32 resLevel=0);
-   
-   virtual void initialize();
-   
-   /**
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   virtual ossimString getShortName() const;
-   virtual ossimString getLongName()  const;
-   virtual ossimString getDescription()const;
-
-protected:
-   virtual ~ossimMaxMosaic();
-   /**
-    * Called on first getTile, will initialize all data needed.
-    */
-   void allocate();
-   
-   ossimRefPtr<ossimImageData> theTile;
-
-   template <class T> ossimRefPtr<ossimImageData> combine(
-      T, // dummy template variable not used
-      const ossimIrect& tileRect,
-      ossim_uint32 resLevel=0);
-   template <class T> ossimRefPtr<ossimImageData> combineNorm(
-      T, // dummy template variable not used
-      const ossimIrect& tileRect,
-      ossim_uint32 resLevel=0);
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimMeanMedianFilter.h b/include/ossim/imaging/ossimMeanMedianFilter.h
deleted file mode 100644
index 9e50e9b..0000000
--- a/include/ossim/imaging/ossimMeanMedianFilter.h
+++ /dev/null
@@ -1,129 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimMeanMedianFilter.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimMeanMedianFilter_HEADER
-#define ossimMeanMedianFilter_HEADER
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-/*!
- * class ossimMeanMedianFilter
- *
- * Allows you to change between a median or mean filter.  You can
- * also specify a window size which the median or mean is computed and
- * the center pixel is replaced.
- *
- */
-class OSSIM_DLL ossimMeanMedianFilter : public ossimImageSourceFilter
-{
-public:
-
-   enum ossimMeanMedianFilterType
-   {
-      /** Applies filter to any non-null center pixel. */
-      OSSIM_MEDIAN                  = 0,
-
-      /** Applies filter to all pixels including null center pixels. */
-      OSSIM_MEDIAN_FILL_NULLS       = 1,
-
-      /** Applies filter to only null center pixels. */
-      OSSIM_MEDIAN_NULL_CENTER_ONLY = 2,
-
-      /** Applies filter to any non-null center pixel. */
-      OSSIM_MEAN                    = 3,
-
-      /* Applies filter to all pixels including null center pixels. */
-      OSSIM_MEAN_FILL_NULLS         = 4,
-
-      /** Applies filter to only null center pixels. */
-      OSSIM_MEAN_NULL_CENTER_ONLY   = 5
-   };
-
-   ossimMeanMedianFilter(ossimObject* owner=NULL);
-
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
-                                               ossim_uint32 resLevel=0);
-   virtual void initialize();
-
-   void setWindowSize(ossim_uint32 windowSize);
-   ossim_uint32 getWindowSize()const;
-
-   /**
-    * @param flag Set "theAutoGrowRectFlag".  This only affects filter types
-    * that set nulls.  Will have a growing affect on the edges.
-    */
-   void setAutoGrowRectFlag(bool flag);
-   bool getAutoGrowRectFlag() const;
-
-   void setFilterType(ossimMeanMedianFilterType type);
-   void setFilterType(const ossimString& type);
-   ossimString getFilterTypeString() const;
-   void getFilterTypeList(std::vector<ossimString>& list) const;
-   
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   
-   /**
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   /**
-    * @return Returns the bounding rectangle which is the input bounding
-    * rectangle with any expansion (from autogrow) added in.
-    */
-   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
-
-protected:
-   virtual ~ossimMeanMedianFilter();
-   
-   ossimRefPtr<ossimImageData> theTile;
-   ossimMeanMedianFilterType   theFilterType;
-   ossim_uint32                theWindowSize;
-
-   /** Used by applyMean and applyMedian for "fill null" modes. */
-   bool theEnableFillNullFlag;
-
-   /**
-    * If true rectangle is expanded by half filter in each direction if the
-    * theFilterType fills nulls.
-    */
-   bool theAutoGrowRectFlag;
-
-   void applyFilter(ossimRefPtr<ossimImageData>& input);
-
-   template <class T>
-      void applyMean(T dummyVariable,
-                     ossimRefPtr<ossimImageData>& inputData);
-   template <class T>
-      void applyMeanNullCenterOnly(T dummyVariable,
-                                   ossimRefPtr<ossimImageData>& inputData);
-
-   template <class T>
-      void applyMedian(T dummyVariable,
-                       ossimRefPtr<ossimImageData>& inputData);
-   template <class T>
-      void applyMedianNullCenterOnly(T dummyVariable,
-                                     ossimRefPtr<ossimImageData>& inputData);
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimMemoryImageSource.h b/include/ossim/imaging/ossimMemoryImageSource.h
deleted file mode 100644
index f5114ed..0000000
--- a/include/ossim/imaging/ossimMemoryImageSource.h
+++ /dev/null
@@ -1,96 +0,0 @@
-//*******************************************************************. 
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-//
-#ifndef ossimMemoryImageSource_HEADER
-#define ossimMemoryImageSource_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageSource.h>
-
-class OSSIM_DLL ossimMemoryImageSource : public ossimImageSource
-{
-public:
-   ossimMemoryImageSource();
-   ossimMemoryImageSource(const ossimMemoryImageSource& src)
-   :ossimImageSource(src),
-   m_image(src.m_image.valid()?(ossimImageData*)src.m_image->dup():(ossimImageData*)0),
-   m_result(0),
-   m_geometry(m_geometry.valid()?(ossimImageGeometry*)src.m_geometry->dup():(ossimImageGeometry*)0),
-   m_boundingRect(src.m_boundingRect)
-   {
-   }
-   ossimMemoryImageSource* dup()const
-   {
-      return new ossimMemoryImageSource(*this);
-   }
-   void setImage(ossimRefPtr<ossimImageData> image);
-   void setImage(ossimScalarType scalarType,
-                 ossim_uint32 numberOfBands,
-                 ossim_uint32 width,
-                 ossim_uint32 height);
-   void setRect(ossim_uint32 ulx,
-                ossim_uint32 uly,
-                ossim_uint32 width,
-                ossim_uint32 height);
-   virtual ossim_uint32 getNumberOfInputBands() const;
-   virtual ossim_uint32 getNumberOfOutputBands() const;
-   virtual ossimScalarType getOutputScalarType() const;
-   virtual double getNullPixelValue(ossim_uint32 band=0)const;
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-   
-   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
-   
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
-                                               ossim_uint32 resLevel=0);
-   
-   virtual bool canConnectMyInputTo(ossim_int32 myInputIndex,
-                                    const ossimConnectableObject* object)const;
-   
-   virtual void initialize();
-	virtual ossim_uint32 getNumberOfDecimationLevels() const;
-   virtual void getDecimationFactor(ossim_uint32 resLevel,
-                                    ossimDpt& result) const;
-   virtual void getDecimationFactors(std::vector<ossimDpt>& decimations)const;
-   
-   //! Returns the image geometry object associated with this tile source or NULL if not defined.
-   //! The geometry contains full-to-local image transform as well as projection (image-to-world)
-   //! Default implementation returns the image geometry object associated with the next  
-   //! (left) input source (if any) connected to this source in the chain, or NULL.
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry()
-   {
-      return m_geometry;
-   }
-   
-   //! Default implementation sets geometry of the first input to the geometry specified.
-   virtual void setImageGeometry(ossimImageGeometry* geom)
-   {
-      m_geometry = geom;
-   }
-   
-   /**
-    *  save state is not implemented for this source and only passes to the base.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
-   
-   /**
-    * loadState is here so one can construct a memory source as a blank tile.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-   
-protected:
-   ossimRefPtr<ossimImageData> m_image;
-   ossimRefPtr<ossimImageData> m_result;
-   ossimRefPtr<ossimImageGeometry> m_geometry;
-   ossimIrect m_boundingRect;
-   TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimMetadataFileWriter.h b/include/ossim/imaging/ossimMetadataFileWriter.h
deleted file mode 100644
index 04d44ec..0000000
--- a/include/ossim/imaging/ossimMetadataFileWriter.h
+++ /dev/null
@@ -1,176 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2003 Storage Area Networks, Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Kenneth Melero (kmelero at sanz.com)
-//
-//*******************************************************************
-//  $Id: ossimMetadataFileWriter.h 15766 2009-10-20 12:37:09Z gpotts $
-
-#ifndef ossimMetadataFileWriter_H
-#define ossimMetadataFileWriter_H
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimConnectableObject.h>
-#include <ossim/base/ossimProcessInterface.h>
-#include <ossim/base/ossimConnectableObjectListener.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimObjectEvents.h>
-#include <ossim/base/ossimProcessProgressEvent.h>
-
-class ossimImageSource;
-
-/**
- * ossimMetadataFileWriter
- *
- * Typical usage something like this:
- *
- * ossimObject* obj = ossimImageMetaDataWriterRegistry::instance()->
- *     createObject(ossimString("ossimReadmeFileWriter"));
- * if (!obj)
- * {
- *    return;
- * }
- * ossimMetadataFileWriter* mw = PTR_CAST(ossimMetadataFileWriter, obj);
- * if (!mw)
- * {
- *    return;
- * }
- * 
- * mw->setFilename(xmlFile);
- * mw->loadState(kwl);
- * mw->connectMyInputTo(ih.get());
- * mw->execute();
- * delete mw;
- */
-class OSSIMDLLEXPORT ossimMetadataFileWriter :
-   public ossimConnectableObject,
-   public ossimProcessInterface,
-   public ossimConnectableObjectListener
-{   
-public:
-   ossimMetadataFileWriter();
-   
-
-   virtual ossimObject*       getObject();
-   virtual const ossimObject* getObject() const;
-
-   virtual void initialize();
-   
-   virtual bool execute();
-   
-   virtual void setPercentComplete(double percentComplete);
-   
-   virtual void setFilename(const ossimFilename& file);
-   
-   const ossimFilename& getFilename()const;
-
-   /**
-    * Load state method:
-    *
-    * This method call base class ossimConnectableObject::loadState then
-    * looks for its keywords.
-    *
-    * @param kwl Keyword list to initialize from.
-    *
-    * @param prefix Usually something like: "object1."
-    *
-    * @return This method will alway return true as it is intended to be
-    * used in conjuction with the set methods.
-    *
-    * Keywords picked up by loadState:
-    *
-    * filename: foo.tfw
-    *
-    * (pixel_type should be area or point)
-    * 
-    * pixel_type: area
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix = 0);
-   
-   bool canConnectMyInputTo(ossim_int32 inputIndex,
-                            const ossimConnectableObject* object) const;
-   
-   virtual void disconnectInputEvent(ossimConnectionEvent& event);
-   virtual void connectInputEvent(ossimConnectionEvent& event);
-   virtual void propertyEvent(ossimPropertyEvent& event);
-
-   /**
-    * Ossim uses a concept of "pixel is point" internally.
-    * 
-    * This means that if you say a tie point is 30.0N -81.0W, the center of
-    * the pixel at the tie point is 30.0N -81.0W.
-    *
-    */ 
-   virtual void setPixelType(ossimPixelType pixelType);
-   virtual ossimPixelType getPixelType() const;
-
-   /**
-    * Sets the area of interest to write the meta data for.
-    * 
-    * @param areaOfInterest Sets theAreaOfInterest.
-    *
-    * @note By default the writers will use
-    * "theInputConnection->getBoundingRect()" if theAreaOfInterest has nans.
-    */
-   virtual void setAreaOfInterest(const ossimIrect& areaOfInterest);
-
-   /**
-    * @returns theAreaOfInterest.
-    */
-   virtual ossimIrect getAreaOfInterest() const;
-
-   /**
-    * void getMetadatatypeList(std::vector<ossimString>& metadatatypeList)const
-    *
-    * pure virtual
-    * 
-    * Appends the writers metadata types to the "metadatatypeList".
-    * 
-    * This is the actual image type name.  So for
-    * example, ossimTiffWorldFileWriter has tiff_world_file type.
-    *
-    * @param metadatatypeList stl::vector<ossimString> list to append to.
-    *
-    * @note All writers should append to the list, not, clear it and then add
-    * their types.
-    */
-   virtual void getMetadatatypeList(
-      std::vector<ossimString>& metadatatypeList)const=0;
-
-   /**
-    * bool hasMetadataType(const ossimString& metadataType) const
-    *
-    * @param imageType string representing image type.
-    *
-    * @return true if "metadataType" is supported by writer.
-    */
-   virtual bool hasMetadataType(const ossimString& metadataType)const=0;
-   
-   /*!
-    * property interface
-    */
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-protected:
-   virtual ~ossimMetadataFileWriter();
-   /**
-    * Write out the file.
-    * @return true on success, false on error.
-    */
-   virtual bool writeFile() = 0;
-
-   ossimImageSource* theInputConnection;
-   ossimFilename              theFilename;
-   ossimPixelType             thePixelType;
-   ossimIrect                 theAreaOfInterest;
-   
-TYPE_DATA
-};
-
-#endif /* End of #ifndef ossimMetadataFileWriter_H */
diff --git a/include/ossim/imaging/ossimMonoGridRemapEngine.h b/include/ossim/imaging/ossimMonoGridRemapEngine.h
deleted file mode 100644
index 78385da..0000000
--- a/include/ossim/imaging/ossimMonoGridRemapEngine.h
+++ /dev/null
@@ -1,54 +0,0 @@
-//*****************************************************************************
-// FILE: ossimMonoGridRemapEngine.h
-//
-// Copyright (C) 2001 ImageLinks, Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Contains declaration of class ossimMonoGridRemapEngine
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimMonoGridRemapEngine.h 9094 2006-06-13 19:12:40Z dburken $
-
-#ifndef ossimMonoGridRemapEngine_HEADER
-#define ossimMonoGridRemapEngine_HEADER
-
-#include <ossim/imaging/ossimGridRemapEngine.h>
-
-/*!****************************************************************************
- *
- * CLASS: ossimMonoGridRemapEngine 
- *
- *****************************************************************************/
-class ossimMonoGridRemapEngine : public ossimGridRemapEngine
-{
-public:
-   ossimMonoGridRemapEngine()
-      : ossimGridRemapEngine(1, 1) {}
-   
-   virtual ossimObject* dup() const;
-   
-   virtual void remapTile(const ossimDpt& origin_point,
-                          ossimGridRemapSource* remapper,
-                          ossimRefPtr<ossimImageData>& tile);
-
-   virtual void assignRemapValues(std::vector<ossimAtbPointSource*>& sources);
-
-   virtual void computeSourceValue(ossimRefPtr<ossimImageData>& source,
-                                   void* result);
-
-protected:
-   virtual void computeRemapNode(ossimAtbPointSource*  point_source,
-                                 void*                 source_value,
-                                 void*                 target_value);
-
-   TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimNBandToIndexFilter.h b/include/ossim/imaging/ossimNBandToIndexFilter.h
deleted file mode 100644
index 0ec580d..0000000
--- a/include/ossim/imaging/ossimNBandToIndexFilter.h
+++ /dev/null
@@ -1,129 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2005 Garrett Potts
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimNBandToIndexFilter.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimNBandToIndexFilter_HEADER
-#define ossimNBandToIndexFilter_HEADER
-#include <ossim/base/ossimNBandLutDataObject.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/imaging/ossimImageSourceFilter.h>
-#include <vector>
-
-class ossimImageData;
-
-/*!
- * It will map the input data to an 8-bit index table.  The table
- * <pre>
- *
- * Example keyword list:
- *
- * type:  ossimNBandToIndexFilter
- *
- * If you want to load from a file then just do:
- *
- * lut.filename: <full path to lut file>
- *
- * If you have the lut table in line then it must look like this:
- *
- * lut.entry0:  204 102 1
- * lut.entry1:  255 204 153
- * lut.entry2:  51 204 204
- * lut.number_of_entries:  3
- * lut.type:  ossimNBandLutDataObject
- *
- * </pre>
- */
-class OSSIM_DLL ossimNBandToIndexFilter : public ossimImageSourceFilter
-{
-public:
-   /*!
-    * Initializes the min value to 0 and the max value to 4000.
-    */
-   ossimNBandToIndexFilter();
-   
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
-                                               ossim_uint32 resLevel=0);
-   
-   virtual ossim_uint32 getNumberOfOutputBands() const;
-   
-   virtual ossimScalarType getOutputScalarType() const;
-   
-   void setLut(ossimNBandLutDataObject& lut);
-
-   void setLut(const ossimFilename& file);
-
-   virtual bool isSourceEnabled()const;
-   virtual void disableSource();
-   
-   virtual double getNullPixelValue(ossim_uint32 band=0)const;
-
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-   
-   virtual void initialize();
-
-   /*!
-    * Saves the state of this object.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
-
-   /*!
-    * Loads the state of this object.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-
-   /**
-    * Will set the property whose name matches the argument
-    * "property->getName()".
-    *
-    * @param property Object containing property to set.
-    */
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-
-   /**
-    * @param name Name of property to return.
-    * 
-    * @returns A pointer to a property object which matches "name".  Returns
-    * NULL if no match is found.
-    */
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-
-   /**
-    * Pushes this's names onto the list of property names.
-    *
-    * @param propertyNames array to add this's property names to.
-    */
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   
-protected:
-   virtual ~ossimNBandToIndexFilter();
-   void allocate();
-
-   
-   virtual ossimRefPtr<ossimImageData> convertInputTile(ossimImageData* inputTile);
-
-   template <class T> ossimRefPtr<ossimImageData> convertOutputTileTemplate(T inputDummy,
-                                                                            ossimImageData* inputTile);
-   template <class T1, class T2> ossimRefPtr<ossimImageData> convertInputTileToOutputTemplate(T1 inputDummy,
-                                                                                              T2 outputDummy,
-                                                                                              ossimImageData* inputTile);
-   
-   ossimRefPtr<ossimNBandLutDataObject> theLut;
-   ossimRefPtr<ossimImageData>          theTile;
-   ossimFilename                        theLutFilename;
-   bool                                 theKeepQuantizedValueFlag;
-   std::vector<ossimNBandLutDataObject::LUT_ENTRY_TYPE> theMinValues;
-   std::vector<ossimNBandLutDataObject::LUT_ENTRY_TYPE> theMaxValues;
-   std::vector<ossimNBandLutDataObject::LUT_ENTRY_TYPE> theNullValues;
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimNitf20Writer.h b/include/ossim/imaging/ossimNitf20Writer.h
deleted file mode 100644
index c26ba01..0000000
--- a/include/ossim/imaging/ossimNitf20Writer.h
+++ /dev/null
@@ -1,135 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimNitfWriter.h 9256 2006-07-14 15:28:19Z dburken $
-#ifndef ossimNitf20Writer_HEADER
-#define ossimNitf20Writer_HEADER
-
-#include <iosfwd>
-#include <ossim/imaging/ossimImageFileWriter.h>
-#include <ossim/imaging/ossimNitfWriterBase.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/projection/ossimMapProjectionInfo.h>
-#include <ossim/base/ossimRgbLutDataObject.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/support_data/ossimNitfFileHeaderV2_0.h>
-#include <ossim/support_data/ossimNitfImageHeaderV2_0.h>
-
-class ossimProjection;
-
-class OSSIM_DLL ossimNitf20Writer : public ossimNitfWriterBase
-{
-public:
-   ossimNitf20Writer(const ossimFilename& filename=ossimFilename(""),
-                   ossimImageSource* inputSource = (ossimImageSource*)NULL);
-   virtual ~ossimNitf20Writer();
-   virtual bool isOpen()const;
-   virtual bool open();
-   virtual void close();
-   
-   /**
-    * void getImageTypeList(std::vector<ossimString>& imageTypeList)const
-    *
-    * Appends this writer image types to list "imageTypeList".
-    *
-    * This writer has the following types:
-    * nitf_block_band_separate
-    * nitf_block_band_sequential
-    *
-    * @param imageTypeList stl::vector<ossimString> list to append to.
-    */   
-   virtual void getImageTypeList(std::vector<ossimString>& imageTypeList)const;
-   
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(
-      const ossimString& name)const;
-
-   /**
-    * @param propertyNames Array to populate with property names.
-    *
-    * @note The following names are handled:
-    *  file_header
-    *  image_header
-    */
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   
-   void addRegisteredTag(ossimRefPtr<ossimNitfRegisteredTag> registeredTag);
-
-   /**
-    * Saves the state of the writer to kwl with prefix then calls
-    * base class ossimImageFileWriter::saveState
-    *
-    * @param kwl Keyword list to save to.
-    *
-    * @param prefix Usually something like: "object2."
-
-    * @return true on success, false on failure.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0) const;
-
-   /**
-    * Initializes the state of the writer from kwl with prefix then calls
-    * base class ossimImageFileWriter::loadState
-    *
-    * @param kwl Keyword list to initialize from.
-    *
-    * @param prefix Usually something like: "object2."
-
-    * @return true on success, false on failure.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-
-protected:
-   
-   /**
-    * @return true on success false on error.
-    */
-   virtual bool writeFile();
-   
-   /**
-    * write out block band separate
-    * 
-    * @return true on success and false on error
-    */
-   virtual bool writeBlockBandSeparate();
-   
-   /**
-    * Outputs in band sequential format.  Band 1 is followed by band
-    * 2, ... etc.
-    */
-   virtual bool writeBlockBandSequential();
-
-   void addTags();
-
-   std::ofstream* theOutputStream;
-   
-   ossimRefPtr<ossimNitfFileHeaderV2_0>  theFileHeader;
-   ossimRefPtr<ossimNitfImageHeaderV2_0> theImageHeader;
-
-   /** If true user wants to set RPC00B tag. (DEFAULT = false) */
-   bool theEnableRpcbTagFlag;
-
-   /**
-    * If true user wants to set BLOCKA tag. (DEFAULT = true)
-    * Currently only valid for map projected images.
-    */
-   bool theEnableBlockaTagFlag;
-
-   /**
-    *
-    * If true this will enable searching the input connnection for another NITF handler and 
-    * bring the fields to this writers output fields and will maintin as many field values as possible
-    *
-    */
-   bool theCopyFieldsFlag;
-   
-TYPE_DATA   
-};
-
-#endif /* #ifndef ossimNitfWriter_HEADER */
diff --git a/include/ossim/imaging/ossimNitfTileSource.h b/include/ossim/imaging/ossimNitfTileSource.h
deleted file mode 100644
index 1d97446..0000000
--- a/include/ossim/imaging/ossimNitfTileSource.h
+++ /dev/null
@@ -1,532 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Contains class declaration for NitfTileSource.
-//
-//*******************************************************************
-//  $Id: ossimNitfTileSource.h 21445 2012-08-03 20:30:10Z dburken $
-
-#ifndef ossimNitfTileSource_HEADER
-#define ossimNitfTileSource_HEADER 1
-
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimAppFixedTileCache.h>
-#include <ossim/support_data/ossimNitfFile.h>
-#include <ossim/support_data/ossimNitfFileHeader.h>
-#include <ossim/support_data/ossimNitfImageHeader.h>
-#include <fstream>
-
-struct jpeg_decompress_struct;
-
-class OSSIM_DLL ossimNitfTileSource : public ossimImageHandler
-{
-public:
-
-   enum ReadMode
-   {
-      READ_MODE_UNKNOWN = 0,
-      
-      /** IMODE = B "Band Interleaved By Block or a single band" */
-      READ_BIB_BLOCK = 1,
-
-      /** IMODE = P "Band Interleaved By Pixel" */
-      READ_BIP_BLOCK = 2,
-
-      /** IMODE = R "Band Interleaved By Row" */
-      READ_BIR_BLOCK = 3,
-
-      /** IMODE = S "Band Sequential" */
-      READ_BSQ_BLOCK = 4,
-
-      /** IMODE = B of S "single block or one block for each band" */
-      READ_BIB       = 5,
-
-      /** IMODE = P "single block Band Interleaved By Pixel" */
-      READ_BIP       = 6,
-
-      /** IMODE = R "single block Band Interleaved By Row" */
-      READ_BIR       = 7,
-
-      /** IMODE = B, IC = C3 "JPEG compressed blocks" */
-      READ_JPEG_BLOCK = 8
-   };
-
-   ossimNitfTileSource();
-   
-   
-   virtual ossimString getShortName() const;
-   virtual ossimString getLongName()  const;
-
-   /**
-    *  Returns true if the image_file can be opened and is a valid nitf file.
-    */
-   virtual bool open();
-
-   /**
-    * Closes file and destroys all memory allocated.
-    */
-   virtual void close();
-
-   /**
-    * @param tileRect Requested rectangle.
-    *
-    * @param resLevel Reduced resolution level to grab tileRect from.
-    * Default = 0 or the full resolution data set.
-    *
-    * @return Returns an image data object with requested rectangle from the
-    * image.  Depending on the overlap of tileRect with respect to the image
-    * rectangle, the returned tile could be full, partial, or an empty(blank)
-    * tile.
-    */
-   virtual ossimRefPtr<ossimImageData> getTile(const  ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-
-    /**
-     * @return Returns the number of bands in the image.
-     * Satisfies pure virtual from ImageHandler class.
-     */
-   virtual ossim_uint32 getNumberOfInputBands() const;
-
-   /**
-    * @return Number of output bands.
-    */
-   virtual ossim_uint32 getNumberOfOutputBands() const;
-
-   /**
-     *  Returns the number of lines in the image.
-     *  Satisfies pure virtual from ImageHandler class.
-     */
-   virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel = 0) const;
-   
-   /**
-    *  Returns the number of samples in the image.  
-    *  Satisfies pure virtual from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel = 0) const;
-   
-   /**
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-   
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   /**
-    * Returns the output pixel type of the tile source.
-    */
-   virtual ossimScalarType getOutputScalarType() const;
-
-   /**
-    * Returns the width of the output tile.
-    */
-   virtual ossim_uint32 getTileWidth() const;
-   
-   /**
-    * Returns the height of the output tile.
-    */
-   virtual ossim_uint32 getTileHeight() const;
-
-   /**
-    * Returns the tile width of the image or 0 if the image is not tiled.
-    * Note: this is not the same as the ossimImageSource::getTileWidth which
-    * returns the output tile width which can be different than the internal
-    * image tile width on disk.
-    */
-   virtual ossim_uint32 getImageTileWidth() const;
-
-   /**
-    * Returns the tile width of the image or 0 if the image is not tiled.
-    * Note: this is not the same as the ossimImageSource::getTileWidth which
-    * returns the output tile width which can be different than the internal
-    * image tile width on disk.
-    */
-   virtual ossim_uint32 getImageTileHeight() const;   
-
-   virtual bool isOpen()const;
-
-   /**
-    * @return The current entry number.
-    *
-    * @note NITF's can contain multiple images in a single file.  This returns
-    * the index of the current image being read.
-    */
-   virtual ossim_uint32 getCurrentEntry() const;
-
-   /**
-    * @param entryList This is the list to initialize with entry indexes.
-    */
-   virtual void getEntryList(std::vector<ossim_uint32>& entryList) const;
-
-   /**
-    * @return Returns the number of entries (or images) within the nitf
-    * file.
-    */
-   ossim_uint32 getNumberOfEntries() const;
-   
-   /**
-    * @param entryIdx Zero base entry number to select.  Sets data member
-    * "theCurrentEntry".
-    *
-    * @note "theCurrentEntry" will not be set if "entryIdx" is out of range.
-    */
-   virtual bool setCurrentEntry(ossim_uint32 entryIdx);
-
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-   ossimString getSecurityClassification()const;
-   
-   /**
-    * @return Returns theCacheEnabledFlag.
-    */
-   bool getCacheEnabledFlag() const;
-
-   /**
-    * @param flag Sets theCacheEnabledFlag and disables/enables caching
-    * accordingly.  If cache is disabled it is also flushed at the same time.
-    * If cache is enabled, blocks read from the image will be cached.
-    */
-   void setCacheEnabledFlag(bool flag);
-
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-   virtual double getNullPixelValue(ossim_uint32 band=0)const;
-
-   const ossimNitfFileHeader* getFileHeader()const;
-   ossimNitfFileHeader* getFileHeader();
-   /**
-    * @return The image header for the current entry.
-    */
-   const ossimNitfImageHeader* getCurrentImageHeader() const;
-   ossimNitfImageHeader* getCurrentImageHeader();
-
-protected:
-   virtual ~ossimNitfTileSource();
-
-   /**
-    * @param imageRect The full resolution image rectangle.
-    *
-    * @note Should contain offsets if there are any.
-    */
-   void setBoundingRectangle(const ossimIrect& imageRect);
-   
-   /** Copy constructor, disallow... */
-   ossimNitfTileSource(const ossimNitfTileSource& obj);
-
-   /** Operator=, disallow... */
-   ossimNitfTileSource& operator=(const ossimNitfTileSource& rhs); 
-
-   /**
-    *  Returns true on success, false on error.
-    */
-   bool loadTile(const ossimIrect& clipRect);
-
-   /**
-    * @return Returns the block number given an origin.
-    */
-   ossim_uint32 getBlockNumber(const ossimIpt& block_origin) const;
-
-   /**
-    * Deletes all memory allocated by this object.
-    */
-   void destroy();
-
-   /**
-    * @brief Parses "theImageFile" and initializes all nitf headers.
-    * @return true on success, false on error.
-    */
-   virtual bool parseFile();
-
-   /**
-    * @brief Allocates everything for current entry.
-    *
-    * This is called on an open() or a entry change to an already open nitf
-    * file.
-    *
-    * This does not allocate buffers and tiles to keep open and
-    * setCurrentEntry times to a minimum.  Buffers are allocated on first
-    * grab of pixel data by allocatBuffers method.
-    * 
-    * @return True on success, false on error.
-    */
-   virtual bool allocate();
-
-   /**
-    * @brief Allocates buffers for current entry.
-    *
-    * This is called on first getTile().
-    * 
-    * @return True on success, false on error.
-    */
-   virtual bool allocateBuffers();
-
-   /**
-    * @param hdr Pointer to image header.
-    * @return true if reader can uncompress nitf.
-    * */
-   virtual bool canUncompress(const ossimNitfImageHeader* hdr) const;
-
-   /**
-    * Initializes the data member "theScalarType" from the current entry.
-    */
-   virtual void initializeScalarType();
-
-   /**
-    * Initializes the data member "theSwapBytesFlag" from the current entry.
-    */
-   virtual void initializeSwapBytesFlag();
-   
-   /**
-    * Initializes the data member "theReadMode" from the current entry.
-    */
-   virtual void initializeReadMode();
-
-   /**
-    * Initializes the data member "theNumberOfBands" from the current entry.
-    */
-   void initializeBandCount();
-
-   /**
-    * Initializes the data member "theBlockSize" from the current entry.
-    *
-    * @note This should be performed after setting the read mode and
-    * band count.
-    *
-    * @note This is the size of a single block read.  So if the bands are
-    * separated by block, a read of this size will get one block.
-    *
-    * @return true on success, false on error.
-    */
-   bool initializeBlockSize();
-
-   /**
-    * Initializes the data members "theImageRect" and "theBlockRect"
-    * from the current entry.
-    *
-    * @return true on success, false on error.
-    */
-   virtual bool initializeImageRect();
-
-   /**
-    * Initializes the data member "theCacheSize".
-    */
-   void initializeCacheSize();
-
-   /**
-    * Initializes the data member "theCacheTileInterLeaveType".
-    */
-   virtual void initializeCacheTileInterLeaveType();
-   
-   /**
-    * Initializes the cache tile size(width and height).  For block images
-    * this will be the size of one block.  For images that are a single block,
-    * this will be the image width by the height of one tile.
-    */
-   void initializeCacheTile();
-
-   /**
-    * Initializes the data member theCompressedBuf.
-    */
-   virtual void initializeCompressedBuf();
-
-   /**
-    * Initializes the output tile size(width and height).
-    */
-   virtual void initializeOutputTile();
-
-   /**
-    * @brief Initializes "theLut" if applicable.
-    */
-   void initializeLut();
-
-   /**
-    * Loads a block of data to theCacheTile.
-    * 
-    * @param x Starting x position of block to load.
-    *
-    * @param y Starting y position of block to load.
-    *
-    * @return true on success, false on error.
-    *
-    * @note x and y are zero based relative to the upper left corner so any
-    * sub image offset should be subtracted off.
-    */
-   bool loadBlockFromCache(ossim_uint32 x, ossim_uint32 y,
-                           const ossimIrect& clipRect);
-
-   /**
-    * Loads a block of data to theCacheTile.
-    * 
-    * @param x Starting x position of block to load.
-    *
-    * @param y Starting y position of block to load.
-    *
-    * @return true on success, false on error.
-    *
-    * @note x and y are zero based relative to the upper left corner so any
-    * sub image offset should be subtracted off.
-    */
-   virtual bool loadBlock(ossim_uint32 x, ossim_uint32 y);
-
-   /**
-    * @param x Horizontal upper left pixel position of the requested block.
-    *
-    * @param y Vertical upper left pixel position of the requested block.
-    *
-    * @param band Band of block.  Only relative with IMODES that have bands
-    * in separate blocks.
-    *
-    * @return true if the stream offset was settable and false otherwise.
-    */
-   bool getPosition(std::streamoff& position,
-                    ossim_uint32 x,
-                    ossim_uint32 y,
-                    ossim_uint32 band) const;
-
-   /**
-    * @return the total number of blocks for the current entry.
-    *
-    * @note For band separated blocks, all bands will be counted as on block.
-    */
-   ossim_uint32 getNumberOfBlocks() const;
-
-   /**
-    * @return The number of bytes to get from one block band to the next band.
-    */
-   std::streampos getBandOffset() const;
-
-   /**
-    * @return The number of bytes to get from one block to the next block.
-    */
-   std::streampos getBlockOffset() const;
-   
-
-   void explodePackedBits(ossimRefPtr<ossimImageData> packedBuffer)const;
-
-   void convertTransparentToNull(ossimRefPtr<ossimImageData> tile)const;
-   
-   ossim_uint32 getPartialReadSize(const ossimIpt& blockOrigin)const;
-   bool isVqCompressed(const ossimString& compressionCode)const;
-
-   /**
-    * @brief Uncompresses Vector Quantization unmasked image data.
-    * IC field = C4
-    * @param destination tile to stuff.
-    * @param source Pointer to compressed data.
-    */
-   void vqUncompressC4(ossimRefPtr<ossimImageData> destination,
-                       ossim_uint8* source);
-   
-   /**
-    * @brief Uncompresses Vector Quantization masked image data.
-    * IC field = M4
-    * @param destination tile to stuff.
-    * @param source Pointer to compressed data.
-    */
-   void vqUncompressM4(ossimRefPtr<ossimImageData> destination,
-                       ossim_uint8* source);
-
-   void lutUncompress(ossimRefPtr<ossimImageData> destination,
-                     ossim_uint8* source);
-
-   /**
-    * @brief scans the file storing in offsets in "theNitfBlockOffset" and
-    * block sizes in "theNitfBlockSize".
-    * @return true on success, false on error.  This checks for arrays being
-    * the same size as number of blocks.
-    */
-   virtual bool scanForJpegBlockOffsets();
-
-   /**
-    * @brief Uncompresses a jpeg block using the jpeg-6b library.
-    * @param x sample location in image space.
-    * @param y line location in image space.
-    * @return true on success, false on error.
-    */
-   virtual bool uncompressJpegBlock(ossim_uint32 x, ossim_uint32 y);
-
-   /**
-    * @brief Loads one of the default tables based on COMRAT value.
-    *
-    * @return true if comrat had valid table value(1-5) and table was loaded,
-    * false if COMRAT value did not contain a valid value.  Will also return
-    * false if there is already a table loaded.
-    * 
-    * @note COMRAT is nitf compression rate code field:
-    * -  "00.2" == default compression table 2
-    * -  "00.5" == default compression table 5 and so on.
-    */
-   bool loadJpegQuantizationTables(jpeg_decompress_struct& cinfo) const;
-
-   /**
-    * @brief Loads default huffman tables.
-    *
-    * @return true success, false on error.
-    */
-   bool loadJpegHuffmanTables(jpeg_decompress_struct& cinfo) const;
-   
-   /**
-   * @brief Virtual method determines the decimation factors at each resolution level. 
-   * This method derives the decimations from the image metadata.
-   */
-   virtual void establishDecimationFactors();
-
-   ossimRefPtr<ossimImageData>   theTile;
-   ossimRefPtr<ossimImageData>   theCacheTile;
-   ossimRefPtr<ossimNitfFile>    theNitfFile;
-   std::vector<ossimRefPtr<ossimNitfImageHeader> > theNitfImageHeader;
-   ReadMode                      theReadMode;
-   ossimScalarType               theScalarType;
-   bool                          theSwapBytesFlag;
-   ossim_uint32                  theNumberOfInputBands;
-   ossim_uint32                  theNumberOfOutputBands;
-   ossim_uint32                  theBlockSizeInBytes;
-   ossim_uint32                  theReadBlockSizeInBytes;
-   ossim_uint32                  theNumberOfImages;
-   ossim_uint32                  theCurrentEntry;
-   ossimIrect                    theImageRect;
-   std::ifstream                 theFileStr;   
-   std::vector<ossim_uint32>     theOutputBandList;
-   ossimIpt                      theCacheSize;
-   ossimInterleaveType           theCacheTileInterLeaveType;
-   bool                          theCacheEnabledFlag;
-   std::vector<ossim_uint32>     theEntryList;
-   ossimAppFixedTileCache::ossimAppFixedCacheId theCacheId;
-   bool                          thePackedBitsFlag;
-   ossimIrect                    theBlockImageRect;
-   std::vector<ossim_uint8>      theCompressedBuf;
-
-   //---
-   // Have compressed jpeg blocks of variable length so we must scan and
-   // capture the offsetts and block sizes for reading.
-   //---
-   std::vector<std::streamoff>   theNitfBlockOffset;
-   std::vector<ossim_uint32>     theNitfBlockSize;
-   
-   bool m_isJpeg12Bit;
-
-   //---
-   // If set to true indicates scanForJpegBlockOffsets() needs to be called
-   // prior to grabbing a block.
-   //---
-   bool m_jpegOffsetsDirty;
-   
-TYPE_DATA
-};
-   
-#endif /* #ifndef ossimNitfTileSource_HEADER */
diff --git a/include/ossim/imaging/ossimNitfTileSource_12.h b/include/ossim/imaging/ossimNitfTileSource_12.h
deleted file mode 100644
index df5965d..0000000
--- a/include/ossim/imaging/ossimNitfTileSource_12.h
+++ /dev/null
@@ -1,41 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Mingjie Su
-//
-// Description:
-//
-// Contains class declaration for NitfTileSource_12.
-//
-//*******************************************************************
-//  $Id: ossimNitfTileSource_12.h 958 2010-06-03 23:00:32Z ming.su $
-#ifndef ossimNitfTileSource_12_HEADER
-#define ossimNitfTileSource_12_HEADER
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/support_data/ossimNitfImageHeader.h>
-
-class OSSIM_DLL ossimNitfTileSource_12 
-{
-public:
-  static bool uncompressJpeg12Block(ossim_uint32 x, 
-                                    ossim_uint32 y,
-                                    ossimRefPtr<ossimImageData> cacheTile,
-                                    ossimNitfImageHeader* hdr,
-                                    ossimIpt cacheSize,
-                                    std::vector<ossim_uint8> compressedBuf,
-                                    ossim_uint32 readBlockSizeInBytes,
-                                    ossim_uint32 bands);
-
-
-  static bool loadJpegQuantizationTables(ossimNitfImageHeader* hdr,
-                                         jpeg_decompress_struct& cinfo);
-
-  static bool loadJpegHuffmanTables(jpeg_decompress_struct& cinfo);
-};
-   
-#endif /* #ifndef ossimNitfTileSource_12_HEADER */
diff --git a/include/ossim/imaging/ossimNitfWriter.h b/include/ossim/imaging/ossimNitfWriter.h
deleted file mode 100644
index 5230bde..0000000
--- a/include/ossim/imaging/ossimNitfWriter.h
+++ /dev/null
@@ -1,137 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimNitfWriter.h 18674 2011-01-11 16:24:12Z dburken $
-#ifndef ossimNitfWriter_HEADER
-#define ossimNitfWriter_HEADER
-
-#include <iosfwd>
-#include <ossim/imaging/ossimNitfWriterBase.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/projection/ossimMapProjectionInfo.h>
-#include <ossim/base/ossimRgbLutDataObject.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/support_data/ossimNitfFileHeaderV2_1.h>
-#include <ossim/support_data/ossimNitfImageHeaderV2_1.h>
-#include <ossim/support_data/ossimNitfTextHeaderV2_0.h>
-#include <ossim/support_data/ossimNitfTextHeaderV2_1.h>
-
-class ossimProjection;
-
-class OSSIM_DLL ossimNitfWriter : public ossimNitfWriterBase
-{
-public:
-   ossimNitfWriter(const ossimFilename& filename=ossimFilename(""),
-                   ossimImageSource* inputSource = (ossimImageSource*)NULL);
-   virtual ~ossimNitfWriter();
-   virtual bool isOpen()const;
-   virtual bool open();
-   virtual void close();
-   
-   /**
-    * void getImageTypeList(std::vector<ossimString>& imageTypeList)const
-    *
-    * Appends this writer image types to list "imageTypeList".
-    *
-    * This writer has the following types:
-    * nitf_block_band_separate
-    * nitf_block_band_sequential
-    *
-    * @param imageTypeList stl::vector<ossimString> list to append to.
-    */   
-   virtual void getImageTypeList(std::vector<ossimString>& imageTypeList)const;
-   
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-
-   /**
-    * @param propertyNames Array to populate with property names.
-    *
-    * @note The following names are handled:
-    *  file_header
-    *  image_header
-    */
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   
-   void addRegisteredTag(ossimRefPtr<ossimNitfRegisteredTag> registeredTag);
-
-   /**
-    * Saves the state of the writer to kwl with prefix then calls
-    * base class ossimImageFileWriter::saveState
-    *
-    * @param kwl Keyword list to save to.
-    *
-    * @param prefix Usually something like: "object2."
-
-    * @return true on success, false on failure.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0) const;
-
-   /**
-    * Initializes the state of the writer from kwl with prefix then calls
-    * base class ossimImageFileWriter::loadState
-    *
-    * @param kwl Keyword list to initialize from.
-    *
-    * @param prefix Usually something like: "object2."
-
-    * @return true on success, false on failure.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-
-   virtual bool addTextToNitf(std::string& inputText);
-
-   /** @brief Gets the block size. */
-   virtual void getTileSize(ossimIpt& size) const;
-
-   /**
-    * Sets the nitf output block size.  Must be divisible by 16.
-    *
-    * Note:  This is not called setBlockSize just because there was already
-    * a virtual setTileSize.
-    *
-    * @param tileSize Block size.
-    */
-   virtual void setTileSize(const ossimIpt& tileSize);
-
-protected:
-   
-   /**
-    * @return true on success false on error.
-    */
-   virtual bool writeFile();
-   
-   /**
-    * write out block band separate
-    * 
-    * @return true on success and false on error
-    */
-   virtual bool writeBlockBandSeparate();
-   
-   /**
-    * Outputs in band sequential format.  Band 1 is followed by band
-    * 2, ... etc.
-    */
-   virtual bool writeBlockBandSequential();
-
-   /** Currently disabled... */
-   // virtual void addStandardTags();
-
-   std::ofstream*                        m_outputStream;
-   ossimRefPtr<ossimNitfFileHeaderV2_1>  m_fileHeader;
-   ossimRefPtr<ossimNitfImageHeaderV2_1> m_imageHeader;
-   ossimRefPtr<ossimNitfTextHeaderV2_1>  m_textHeader;
-   std::string                           m_textEntry;
-   ossimIpt                              m_blockSize;
-
-TYPE_DATA   
-};
-
-#endif /* #ifndef ossimNitfWriter_HEADER */
diff --git a/include/ossim/imaging/ossimNitfWriterBase.h b/include/ossim/imaging/ossimNitfWriterBase.h
deleted file mode 100644
index 32d9639..0000000
--- a/include/ossim/imaging/ossimNitfWriterBase.h
+++ /dev/null
@@ -1,183 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: OSSIM nitf writer base class to hold methods common to
-// all nitf writers.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimNitfWriterBase.h 2981 2011-10-10 21:14:02Z david.burken $
-#ifndef ossimNitfWriterBase_HEADER
-#define ossimNitfWriterBase_HEADER
-
-#include <ossim/imaging/ossimImageFileWriter.h>
-
-class ossimFilename;
-class ossimImageSourceSequencer;
-class ossimMapProjectionInfo;
-class ossimNitfFileHeaderV2_X;
-class ossimNitfImageHeaderV2_X;
-class ossimProjection;
-
-/**
- * @brief OSSIM nitf writer base class to hold methods common to
- * all nitf writers.
- */
-class OSSIM_DLL ossimNitfWriterBase : public ossimImageFileWriter
-{
-public:
-
-   /** @brief default constructor */
-   ossimNitfWriterBase();
-
-   /**
-    * @brief Constructor that takes filename and input source.
-    * @param filename The output file name.
-    * @param inputSource The input source to write to file.
-    */
-   ossimNitfWriterBase(const ossimFilename& filename,
-                       ossimImageSource* inputSource);
-
-   /* @brief virtual destructor */
-   virtual ~ossimNitfWriterBase();
-
-   /**
-    * @brief Set the properties.
-    * @param property The property to set.
-    */
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-
-   /**
-    * @brief Gets a property.
-    * @param The name of the property to get.
-    * @return The property if found.
-    */
-   virtual ossimRefPtr<ossimProperty> getProperty(
-      const ossimString& name)const;
-
-   /**
-    * @param propertyNames Array to populate with property names.
-    *
-    * @note The following names are handled:
-    *  enable_rpcb_tag
-    *  enable_blocka_tag
-    */
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
- 
-
-   /**
-    * Saves the state of the writer to kwl with prefix then calls
-    * base class ossimImageFileWriter::saveState
-    *
-    * @param kwl Keyword list to save to.
-    *
-    * @param prefix Usually something like: "object2."
-
-    * @return true on success, false on failure.
-    *
-    * Keywords saved by saveState:
-    * 
-    * enable_rpcb_tag: true
-    *
-    * enable_blocka_tag: true
-    */
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0) const;
-
-   /**
-    * Initializes the state of the writer from kwl with prefix then calls
-    * base class ossimImageFileWriter::loadState
-    *
-    * @param kwl Keyword list to initialize from.
-    *
-    * @param prefix Usually something like: "object2."
-
-    * @return true on success, false on failure.
-    *
-    * Keywords picked up by loadState:
-    * 
-    * enable_rpcb_tag: true
-    *
-    * enable_blocka_tag: true
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-
-   /**
-    * Returns a 3-letter extension from the image type descriptor 
-    * (theOutputImageType) that can be used for image file extensions.
-    *
-    * @param imageType string representing image type.
-    *
-    * @return the 3-letter string extension.
-    */
-   virtual ossimString getExtension() const;
-
-protected:
-
-   /**
-    * @brief Populates tags with geometry info from projection.  Will write an
-    * rpcb tag if theEnableRpcbTagFlag if set to true.
-    * @param hdr The header to write to.
-    * @param seq The input connection or image source.
-    */
-   void writeGeometry(ossimNitfImageHeaderV2_X* hdr,
-                      ossimImageSourceSequencer* seq);
-
-   /**
-    * @brief Adds the BLOCKA tag.
-    *
-    * @param mapInfo ossimMapProjectionInfo to use to set tag with.
-    * @param hdr The header to write to.
-    *
-    * @note Currently only used with map projected images.
-    */
-   void addBlockaTag(ossimMapProjectionInfo& mapInfo,
-                     ossimNitfImageHeaderV2_X* hdr);
-
-   /**
-    * @brief Adds the RPC00B tag.
-    *
-    * @param rect Requested rectangle of image to write.
-    *
-    * @param proj The output projection.
-    */
-   void addRpcbTag(const ossimIrect& rect,
-                   ossimProjection* proj,
-                   ossimNitfImageHeaderV2_X* hdr);
-
-   /**
-    * @brief Sets the complexity level of theFileHeader.
-    *
-    * @param endPosition This should be the end seek position of the file.
-    */
-   void setComplexityLevel(std::streamoff,
-                           ossimNitfFileHeaderV2_X* hdr);
-
-   /**
-    * @brief Sets file header and image header defaults from config file if
-    * found in preferences.
-    */
-   virtual void initializeDefaultsFromConfigFile(
-      ossimNitfFileHeaderV2_X* fileHdr,
-      ossimNitfImageHeaderV2_X* imgHdr );   
-
-   /** @brief If true user wants to set RPC00B tag. (DEFAULT = false) */
-   bool theEnableRpcbTagFlag;
-   
-   /**
-    * @brief If true user wants to set BLOCKA tag. (DEFAULT = true)
-    * Currently only valid for map projected images.
-    */
-   bool theEnableBlockaTagFlag;
-
-   
-
-private:
-
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimKakaduNitfVoid Writer_HEADER */
diff --git a/include/ossim/imaging/ossimNormalizedRemapTable.h b/include/ossim/imaging/ossimNormalizedRemapTable.h
deleted file mode 100644
index 88b6e6d..0000000
--- a/include/ossim/imaging/ossimNormalizedRemapTable.h
+++ /dev/null
@@ -1,84 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Description:
-//
-// Contains class declaration for base class ossimNormalizedRemapTable.
-// 
-//*******************************************************************
-//  $Id: ossimNormalizedRemapTable.h 15742 2009-10-17 12:59:43Z dburken $
-
-
-#ifndef ossimNormalizedRemapTable_HEADER
-#define ossimNormalizedRemapTable_HEADER
-
-#include <ossim/base/ossimConstants.h>
-
-/**
- * @class ossimNormalizedRemapTable
- *
- * @brief Base class implemetation of normalized remap tables to go to/from
- * normalized value to pixel value.
- */
-class OSSIM_DLL ossimNormalizedRemapTable
-{
-public:
-
-   /** default constructor */
-   ossimNormalizedRemapTable();
-
-   /** virtual destructor */
-   virtual ~ossimNormalizedRemapTable();
-
-   /**
-    *  @brief Gets a normalized value (between '0.0' and '1.0') from
-    *  a pixel value.
-    *
-    *  @return Value between 0.0 and 1.0.
-    */
-   virtual ossim_float64 operator[](ossim_int32 pix) const = 0;
-
-   /**
-    *  @brief Gets a normalized value (between '0.0' and '1.0') from
-    *  a pixel value.
-    *
-    *  @return Value between 0.0 and 1.0.
-    */
-   virtual ossim_float64 normFromPix(ossim_int32 pix) const = 0;
-
-   /**
-    * @brief Returns an pixel value as an int from a normalized value.
-    *
-    * @return Value between scalar range of remap table.
-    */
-   virtual ossim_int32 pixFromNorm(ossim_float64 normPix) const = 0;
-
-   /**
-    * @brief Pure virtual method to get the number of table entries.
-    * @return The number of entries in a table.
-    */
-   virtual ossim_int32 getEntries() const = 0;
-
-   /**
-    * @brief Get the value used to normalize and un-normalize table entries.
-    * @return Value used to normalize and un-normalize table entries.
-    */
-   virtual ossim_float64 getNormalizer() const;
-
-private:
-
-   // Forbid copy constructor and asignment operator.
-   ossimNormalizedRemapTable(const ossimNormalizedRemapTable& source);
-   ossimNormalizedRemapTable& operator=(const ossimNormalizedRemapTable&);  
-
- };
-
-inline ossim_float64 ossimNormalizedRemapTable::getNormalizer() const
-{
-   return static_cast<ossim_float64>(getEntries()-1);
-}
-
-#endif
diff --git a/include/ossim/imaging/ossimNormalizedS16RemapTable.h b/include/ossim/imaging/ossimNormalizedS16RemapTable.h
deleted file mode 100644
index ce87f86..0000000
--- a/include/ossim/imaging/ossimNormalizedS16RemapTable.h
+++ /dev/null
@@ -1,146 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Description:
-//
-// Contains class declaration for  ossimNormalizedS16RemapTable.  Table for
-// normalizing signed 16 bit data.
-// 
-//*******************************************************************
-//  $Id: ossimNormalizedS16RemapTable.h 10456 2007-02-08 14:17:50Z gpotts $
-
-#ifndef ossimNormalizedS16RemapTable_HEADER
-#define ossimNormalizedS16RemapTable_HEADER
-
-#include <ossim/imaging/ossimNormalizedRemapTable.h>
-#include <ossim/base/ossimCommon.h> /* for round */
-
-/**
- * @class ossimNormalizedS16RemapTable
- *
- * @brief Signed 16 bit normalized remap tables to go to/from
- * normalized value to pixel value.
- */
-class OSSIM_DLL ossimNormalizedS16RemapTable : public ossimNormalizedRemapTable
-{
-public:
-   
-   /** @brief default constructor */
-   ossimNormalizedS16RemapTable();
-
-   /** @brief virtual destructor */
-   virtual ~ossimNormalizedS16RemapTable();
-
-   enum
-   {
-      TABLE_ENTRIES  = 65536,  // 2^16 32767-(-32768)+1
-      OFFSET_TO_ZERO = 32768,  // Gets -32768 to zero.
-      NULL_PIX       = -32768,
-      MIN_PIX        = -32767 
-   };
-
-   /**
-    * @brief Gets the number of table entries.
-    * @return The number of entries in a table.
-    */
-   virtual ossim_int32 getEntries() const;
-
-   /**
-    * @brief Gets normalized value (between '0.0' and '1.0') from an
-    * int which should in scalar range of a signed 16 bit.
-    *
-    * @note This table is specialized to map both -32768 and -32767 to 0 since
-    * dted data has a null of -32767.
-    * 
-    * @return Value between 0.0 and 1.0.
-    */
-   virtual ossim_float64 operator[](ossim_int32 pix) const;
-
-   /**
-    * @brief Gets normalized value (between '0.0' and '1.0') from an
-    * int which should in scalar range of a signed 16 bit.
-    *
-    * @note This table is specialized to map both -32768 and -32767 to 0 since
-    * dted data has a null of -32767.
-    *
-    * @return Value between 0.0 and 1.0.
-    */
-   virtual ossim_float64 normFromPix(ossim_int32 pix) const;
-
-   /**
-    * @brief Gets pixel value from normalized value.
-    *
-    * Valid returns range is signed 16 bit range or -32768 to 32767.
-    *
-    * @return Value between -32768 to 32767.
-    */
-   virtual ossim_int32 pixFromNorm(ossim_float64 normPix) const;
-
-private:
-
-   static ossim_float64  theTable[TABLE_ENTRIES];
-   static bool theTableIsInitialized;
-
-};
-
-inline ossim_int32 ossimNormalizedS16RemapTable::getEntries() const
-{
-   return TABLE_ENTRIES;
-}
-
-inline ossim_float64 ossimNormalizedS16RemapTable::operator[](
-   ossim_int32 pix) const
-{
-   ossim_float64 result = 0;
-
-   // Move pix into table range.  This will take -32768 to 0.
-   ossim_int32 p = pix + OFFSET_TO_ZERO;
-
-   result = (p < TABLE_ENTRIES ? ( p >= 0 ? theTable[p] : 0.0) : 1.0);
-
-   return result;
-}
-
-inline ossim_float64 ossimNormalizedS16RemapTable::normFromPix(
-   ossim_int32 pix) const
-{
-   ossim_float64 result = 0;
-
-   // Move pix into table range.  This will take -32768 to 0.
-   ossim_int32 p = pix + OFFSET_TO_ZERO;
-
-   result = (p < TABLE_ENTRIES ? ( p >= 0 ? theTable[p] : 0.0) : 1.0);
-
-   return result;
-}
-
-inline ossim_int32 ossimNormalizedS16RemapTable::pixFromNorm(
-   ossim_float64 normPix) const
-{
-   if(normPix <= 0.0) return NULL_PIX;
-   
-   // Clamp between 0 and 1 on the way in.
-   ossim_float64 p = (normPix<1.0) ? ( (normPix>0.0) ? normPix : 0.0) : 1.0;
-
-   // Un-normalize.
-   p = p * getNormalizer(); // TABLE_ENTRIES - 1;
-
-   //---
-   // Move pixel into sign range then round it.  This will take  65535 to
-   // 32767 which is the max pixel for this scalar type.
-   //---
-   p = ossim::round<ossim_int32>(p - OFFSET_TO_ZERO);
-
-   if (p == NULL_PIX)
-   {
-      // norm pixel came in just above zero so should be at least min.
-      p = MIN_PIX; 
-   }
-
-   return static_cast<ossim_int32>(p);
-}
-
-#endif
diff --git a/include/ossim/imaging/ossimNormalizedU11RemapTable.h b/include/ossim/imaging/ossimNormalizedU11RemapTable.h
deleted file mode 100644
index e5a6ded..0000000
--- a/include/ossim/imaging/ossimNormalizedU11RemapTable.h
+++ /dev/null
@@ -1,117 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Description:
-//
-// Contains class declaration for  ossimNormalizedU11RemapTable.  Table for
-// normalizing unsigned 11 bit data.
-//
-//*******************************************************************
-//  $Id: ossimNormalizedU11RemapTable.h 16034 2009-12-03 14:49:25Z dburken $
-
-#ifndef ossimNormalizedU11RemapTable_HEADER
-#define ossimNormalizedU11RemapTable_HEADER
-
-#include <ossim/imaging/ossimNormalizedRemapTable.h>
-#include <ossim/base/ossimCommon.h> /* for round */
-
-/**
- * @class ossimNormalizedU11RemapTable
- *
- * @brief Eleven bit normalized remap table to go to/from normalized value
- * to pixel value.
- */
-class OSSIM_DLL ossimNormalizedU11RemapTable : public ossimNormalizedRemapTable
-{
-public:
-
-   /** @brief default constructor */
-   ossimNormalizedU11RemapTable();
-   /** @brief virtual destructor */
-   virtual ~ossimNormalizedU11RemapTable();
-
-
-   enum
-   {
-      TABLE_ENTRIES = 2048 //  2^11
-   };
-
-   /**
-    * @brief Gets the number of table entries.
-    * @return The number of entries in a table.
-    */
-   virtual ossim_int32 getEntries() const;
-
-   /**
-    *  @brief Gets a normalized value (between '0.0' and '1.0') from
-    *  a pixel value.
-    *
-    *  @return Value between 0.0 and 1.0.
-    */
-   virtual ossim_float64 operator[](ossim_int32 pix) const;
-
-   /**
-    *  @brief Gets a normalized value (between '0.0' and '1.0') from
-    *  a pixel value.
-    *
-    *  @return Value between 0.0 and 1.0.
-    */
-   virtual ossim_float64 normFromPix(ossim_int32 pix) const;
-
-   /**
-    * @brief Returns an pixel value as an int from a normalized value.
-    *
-    * @return Value between scalar range of remap table.
-    */
-   virtual ossim_int32 pixFromNorm(ossim_float64 normPix) const;   
-
-private:
-
-   static ossim_float64  theTable[TABLE_ENTRIES];
-   static bool theTableIsInitialized;
-   
-};
-
-inline ossim_int32 ossimNormalizedU11RemapTable::getEntries() const
-{
-   return TABLE_ENTRIES;
-}
-
-inline ossim_float64 ossimNormalizedU11RemapTable::operator[](
-   ossim_int32 pix) const
-{
-   return ( (pix < TABLE_ENTRIES) ? (pix >= 0 ? theTable[pix] : 0.0) : 1.0);  
-}
-
-inline ossim_float64 ossimNormalizedU11RemapTable::normFromPix(
-   ossim_int32 pix) const
-{
-   return ( (pix < TABLE_ENTRIES) ? (pix >= 0 ? theTable[pix] : 0.0) : 1.0);
-}
-
-inline ossim_int32 ossimNormalizedU11RemapTable::pixFromNorm(
-   ossim_float64 normPix) const
-{
-   if(normPix <= 0.0) return 0;
-   
-   // un-normalize...
-   ossim_float64 p = normPix * getNormalizer();
-
-   // Ensure pixel is in range.
-   p = ( (p < TABLE_ENTRIES) ? (p >= 0.0 ? p : 0.0) : getNormalizer());
-
-   // Since going from double to int round...
-   p = ossim::round<ossim_int32>(p);
-
-   if(p == 0.0)
-   {
-      p = 1.0;
-   }
-   
-   return static_cast<ossim_int32>(p);
-}
-
-#endif
diff --git a/include/ossim/imaging/ossimNormalizedU16RemapTable.h b/include/ossim/imaging/ossimNormalizedU16RemapTable.h
deleted file mode 100644
index 5435a66..0000000
--- a/include/ossim/imaging/ossimNormalizedU16RemapTable.h
+++ /dev/null
@@ -1,116 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Description:
-//
-// Contains class declaration for  ossimNormalizedU16RemapTable.  Table for
-// normalizing unsigned 16 bit data.
-// 
-//*******************************************************************
-//  $Id: ossimNormalizedU16RemapTable.h 16034 2009-12-03 14:49:25Z dburken $
-
-#ifndef ossimNormalizedU16RemapTable_HEADER
-#define ossimNormalizedU16RemapTable_HEADER
-
-#include <ossim/imaging/ossimNormalizedRemapTable.h>
-#include <ossim/base/ossimCommon.h> /* for round */
-
-/**
- * @class ossimNormalizedU16RemapTable
- *
- * @brief Unsigned 16 bit normalized remap table to go to/from normalized value
- * to pixel value.
- */
-class OSSIM_DLL ossimNormalizedU16RemapTable : public ossimNormalizedRemapTable
-{
-public:
-
-   /** @brief default constructor */
-   ossimNormalizedU16RemapTable();
-   /** @brief virtual destructor */
-   virtual ~ossimNormalizedU16RemapTable();
-
-   enum
-   {
-      TABLE_ENTRIES   = 65536 // 2^16
-   };
-
-   /**
-    * @brief Gets the number of table entries.
-    * @return The number of entries in a table.
-    */
-   virtual ossim_int32 getEntries() const;
-   
-   /**
-    *  @brief Gets a normalized value (between '0.0' and '1.0') from
-    *  a pixel value.
-    *
-    *  @return Value between 0.0 and 1.0.
-    */
-   virtual ossim_float64 operator[](ossim_int32 pix) const;
-
-   /**
-    *  @brief Gets a normalized value (between '0.0' and '1.0') from
-    *  a pixel value.
-    *
-    *  @return Value between 0.0 and 1.0.
-    */
-   virtual ossim_float64 normFromPix(ossim_int32 pix) const;
-
-   /**
-    * @brief Returns an pixel value as an int from a normalized value.
-    *
-    * @return Value between scalar range of remap table.
-    */
-   virtual ossim_int32 pixFromNorm(ossim_float64 normPix) const;
-   
-protected:
-
-   static ossim_float64  theTable[TABLE_ENTRIES];
-   static bool theTableIsInitialized;
-   
-};
-
-inline ossim_int32 ossimNormalizedU16RemapTable::getEntries() const
-{
-   return TABLE_ENTRIES;
-}
-
-inline ossim_float64 ossimNormalizedU16RemapTable::operator[](
-   ossim_int32 pix) const
-{
-   return ( (pix < TABLE_ENTRIES) ? (pix >= 0 ? theTable[pix] : 0.0) : 1.0);  
-}
-
-inline ossim_float64 ossimNormalizedU16RemapTable::normFromPix(
-   ossim_int32 pix) const
-{
-   return ( (pix < TABLE_ENTRIES) ? (pix >= 0 ? theTable[pix] : 0.0) : 1.0);
-}
-
-inline ossim_int32 ossimNormalizedU16RemapTable::pixFromNorm(
-   ossim_float64 normPix) const
-{
-   if(normPix <= 0.0) return 0;
-   
-   // un-normalize...
-   ossim_float64 p = normPix * getNormalizer();
-
-   // Ensure pixel is in range.
-   p = ( (p < TABLE_ENTRIES) ? (p >= 0.0 ? p : 0.0) : getNormalizer());
-
-   // Since going from double to int round...
-   p = ossim::round<ossim_int32>(p);
-       
-   if(p == 0.0)
-   {
-      p = 1.0;
-   }
-   
-   return static_cast<ossim_int32>(p);
-}
-
-#endif
diff --git a/include/ossim/imaging/ossimNormalizedU8RemapTable.h b/include/ossim/imaging/ossimNormalizedU8RemapTable.h
deleted file mode 100644
index 050b1cf..0000000
--- a/include/ossim/imaging/ossimNormalizedU8RemapTable.h
+++ /dev/null
@@ -1,116 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Description:
-//
-// Contains class declaration for  ossimNormalizedU8RemapTable.  Table for
-// normalizing unsigned 8 bit data.
-// 
-//*******************************************************************
-//  $Id: ossimNormalizedU8RemapTable.h 16034 2009-12-03 14:49:25Z dburken $
-
-#ifndef ossimNormalizedU8RemapTable_HEADER
-#define ossimNormalizedU8RemapTable_HEADER
-
-#include <ossim/imaging/ossimNormalizedRemapTable.h>
-#include <ossim/base/ossimCommon.h> /* for round */
-
-/**
- * @class ossimNormalizedU8RemapTable
- *
- * @brief Eight bit normalized remap table to go to/from normalized value
- * to pixel value.
- */
-class OSSIM_DLL ossimNormalizedU8RemapTable : public ossimNormalizedRemapTable
-{
-public:
-
-   /** @brief default constructor */
-   ossimNormalizedU8RemapTable();
-   /** @brief virtual destructor */
-   virtual ~ossimNormalizedU8RemapTable();
-
- 
-   enum
-   {
-      TABLE_ENTRIES = 256 // 2^8
-   };
-
-   /**
-    * @brief Gets the number of table entries.
-    * @return The number of entries in a table.
-    */
-   virtual ossim_int32 getEntries() const;
-
-   /**
-    *  @brief Gets a normalized value (between '0.0' and '1.0') from
-    *  a pixel value.
-    *
-    *  @return Value between 0.0 and 1.0.
-    */
-   virtual ossim_float64 operator[](ossim_int32 pix) const;
-
-   /**
-    *  @brief Gets a normalized value (between '0.0' and '1.0') from
-    *  a pixel value.
-    *
-    *  @return Value between 0.0 and 1.0.
-    */
-   virtual ossim_float64 normFromPix(ossim_int32 pix) const;
-
-   /**
-    * @brief Returns an pixel value as an int from a normalized value.
-    *
-    * @return Value between scalar range of remap table.
-    */
-   virtual ossim_int32 pixFromNorm(ossim_float64 normPix) const;
-
-protected:
-
-   static ossim_float64 theTable[TABLE_ENTRIES];
-   static bool theTableIsInitialized;
-
-};
-
-inline ossim_int32 ossimNormalizedU8RemapTable::getEntries() const
-{
-   return TABLE_ENTRIES;
-}
-
-inline ossim_float64 ossimNormalizedU8RemapTable::operator[](
-   ossim_int32 pix) const
-{
-   return ( (pix < TABLE_ENTRIES) ? (pix >= 0 ? theTable[pix] : 0.0) : 1.0);  
-}
-
-inline ossim_float64 ossimNormalizedU8RemapTable::normFromPix(
-   ossim_int32 pix) const
-{
-   return ( (pix < TABLE_ENTRIES) ? (pix >= 0 ? theTable[pix] : 0.0) : 1.0);
-}
-
-inline ossim_int32 ossimNormalizedU8RemapTable::pixFromNorm(
-   ossim_float64 normPix) const
-{
-   if(normPix <= 0.0) return 0;
-   
-   ossim_float64 p = normPix * getNormalizer();
-
-   // Ensure pixel is in range.
-   p = ( (p < TABLE_ENTRIES) ? (p >= 0.0 ? p : 0.0) : getNormalizer());
-
-   // Since going from double to int round...
-   p = ossim::round<ossim_int32>(p);
-       
-   if(p == 0.0)
-   {
-      p = 1;
-   }
-   
-   return static_cast<ossim_int32>(p);
-}
-
-#endif
diff --git a/include/ossim/imaging/ossimOrthoImageMosaic.h b/include/ossim/imaging/ossimOrthoImageMosaic.h
deleted file mode 100644
index be01411..0000000
--- a/include/ossim/imaging/ossimOrthoImageMosaic.h
+++ /dev/null
@@ -1,61 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimOrthoImageMosaic.h 17932 2010-08-19 20:34:35Z dburken $
-#ifndef ossimOrthoImageMosaic_HEADER
-#define ossimOrthoImageMosaic_HEADER
-
-#include <ossim/imaging/ossimImageMosaic.h>
-
-class OSSIMDLLEXPORT ossimOrthoImageMosaic : public ossimImageMosaic
-{
-public:
-   ossimOrthoImageMosaic();
-   ossimOrthoImageMosaic(ossimConnectableObject::ConnectableObjectList& inputSources);
-   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const;
-   virtual void initialize();
-
-   //! Returns the geometry associated with the full mosaic. This object maintains it's own 
-   //! geometry instance.
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-
-   //! Used to retrieve the number of overlapping images withint the given rect.
-   virtual ossim_uint32 getNumberOfOverlappingImages(const ossimIrect& rect, ossim_uint32 resLevel=0)const;
-
-   //! Used to populate the result with the index of the overlapping images.
-   virtual void getOverlappingImages(std::vector<ossim_uint32>& result,
-                                     const ossimIrect& rect,
-                                     ossim_uint32 resLevel=0)const;
-   
-   virtual ossimRefPtr<ossimImageData> getNextTile(ossim_uint32& returnedIdx,
-                                                   const ossimIrect& origin,
-                                                   ossim_uint32 resLevel=0);
-   
-   ossimIrect getRelativeRect(ossim_uint32 index,
-                              ossim_uint32 resLevel = 0)const;
-protected:
-   virtual ~ossimOrthoImageMosaic();   
-   void computeBoundingRect(ossim_uint32 resLevel=0);
-   
-   //! If this object is maintaining an ossimImageGeometry, this method needs to be called after 
-   //! each time the contents of the mosaic changes.
-   void updateGeometry();
-
-   std::vector<ossimDpt>  m_InputTiePoints;
-   ossimDpt    m_Delta; //!< Holds R0 delta and will be scaled for different r-level requests
-   ossimDpt    m_UpperLeftTie; //!< Will hold the upper left tie of the mosaic.
-   ossimIrect  m_BoundingRect;
-   ossimString m_Units;
-   ossimRefPtr<ossimImageGeometry> m_Geometry; //!< The input image geometry, altered by the map tiepoint
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimOverviewBuilderBase.h b/include/ossim/imaging/ossimOverviewBuilderBase.h
deleted file mode 100644
index 8731981..0000000
--- a/include/ossim/imaging/ossimOverviewBuilderBase.h
+++ /dev/null
@@ -1,240 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:  Base class for overview builders.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimOverviewBuilderBase.h 21653 2012-09-07 15:03:08Z dburken $
-#ifndef ossimOverviewBuilderBase_HEADER
-#define ossimOverviewBuilderBase_HEADER 1
-
-#include <ossim/base/ossimSource.h>
-#include <ossim/base/ossimProcessInterface.h>
-#include <ossim/base/ossimConnectableObjectListener.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/base/ossimRtti.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/imaging/ossimBitMaskWriter.h>
-#include <ossim/imaging/ossimMaskFilter.h>
-#include <vector>
-
-class ossimImageFileWriter;
-class ossimFilename;
-
-class OSSIM_DLL ossimOverviewBuilderBase
-   :
-      public ossimSource,
-      public ossimProcessInterface,
-      public ossimConnectableObjectListener
-{
-public:
-
-   /** default constructor */
-   ossimOverviewBuilderBase();
-
-   /**
-    * @brief Sets an optional file writer to the builder.
-    * Currently used by the virtual overview builder.
-    * 
-    * @param outputWriter The file writer of the builder.
-    * 
-    * @return True on successful initialization, false on error.
-    */
-   virtual bool setOutputWriter(ossimImageFileWriter* outputWriter);
-
-   /**
-    * @brief Sets the input to the builder.
-    * 
-    * @param imageSource The input to the builder.
-    * 
-    * @return True on successful initialization, false on error.
-    */
-   virtual bool setInputSource(ossimImageHandler* imageSource);
-
-   /**
-    * @brief Sets the output file name. (pure virtual)
-    * @prama file This will be the output file name like foo.ovr
-    */
-   virtual void setOutputFile(const ossimFilename& file)=0;
-
-   /**
-    * @brief Gets the output file name. (pure virtual)
-    *
-    * @return The output file name or ossimFilename::NIL if it was not set
-    * yet and the image handle has not been initialized.
-    *
-    * @note This will return ossimFilename::NIL unless one of was called,
-    * setInputSource or setOutputFile.
-    */
-   virtual ossimFilename getOutputFile() const=0;
-
-   /**
-    * @brief Sets the overview output type. (pure virtual)
-    * @param type This should be the string representing the type.  This method
-    * will do nothing if type is not handled and return false.
-    * @return true if type is handled, false if not.
-
-    * @note Currently handled types are 
-    */
-   virtual bool setOverviewType(const ossimString& type)=0;
-
-   /**
-    * @brief Gets the overview type. (pure virtual)
-    * @return The overview output type as a string. */
-   virtual ossimString getOverviewType() const=0;
-
-   /**
-    * @brief Method to check if builder can handle type.
-    * @return true if type is handled by builder, false if not.
-    */
-   virtual bool hasOverviewType(const ossimString& type) const;
-
-   /**
-    * @brief Method to populate class supported types. (pure virtual)
-    * Example:
-    * ossimTiffOverviewNearest
-    * ossimTiffOverviewBox
-    *
-    * @param typeList List of ossimStrings to add to.
-    */
-   virtual void getTypeNameList(std::vector<ossimString>& typeList)const=0;
-
-   /**
-    * @brief Get the overview stop dimension.
-    * @return The overview stop dimension.
-    */
-   virtual ossim_uint32 getOverviewStopDimension() const;
-
-   /**
-    * @brief Sets the overview stop dimension.
-    *
-    * This controls how many layers will be built. If set to 64 then the
-    * builder will stop when height and width for current level are less
-    * than or equal to 64.  Note a default can be set in the ossim preferences
-    * file, setting the keyword "overview_stop_dimension".
-    * 
-    * @param dim The overview stop dimension
-    */
-   virtual void setOverviewStopDimension(ossim_uint32 dim);
-
-   /**
-    * @brief Gets the histogram accumulation mode.
-    * @return mode NONE, NORMAL or FAST.
-    */
-   ossimHistogramMode getHistogramMode() const;
-
-   /**
-    * @brief Sets the histogram accumulation mode.
-    * @param mode NONE, NORMAL or FAST.
-    */
-   void setHistogramMode(ossimHistogramMode mode);
- 
-   /**
-    * @brief Builds the overviews. (pure virtual)
-    *
-    * @return true on success, false on error.
-    */
-   virtual bool execute()=0;
-
-   /**
-    * @brief Finalize method.  Should be called at end of execute.
-    *
-    * This implementation will reset the the output band list if the source
-    * image handler is a band selector.
-    */
-   virtual void finalize();
-
-   /**
-    * @brief Specifies parameters (in KWL) for generation of an alpha (bit)
-    * mask such that any full or partial null pixels will be masked out. A
-    * mask file will be written to the source image directory with the image
-    * file name and extension ".mask". 
-    */
-   void setBitMaskSpec(const ossimKeywordlist& bit_mask_spec);
-
-   /**
-    * @brief Turn on/off scan for min max flag.
-    * This method assumes the null is known.
-    * @param flag true turns scan on, false off. Default=off.
-    */
-   void setScanForMinMax(bool flag);
-
-   /** @return scan for min max flag. */
-   bool getScanForMinMax() const;
-
-   /**
-    * @brief Turn on/off scan for min, max, null flag.
-    * Attempts to find null, min and max where null is the minimum value found,
-    * min is the second most min and max is max.
-    * @param flag true turns scan on, false off. Default=off.
-    */
-   void setScanForMinMaxNull(bool flag);
-
-   /** @return scan for min max flag. */
-   bool getScanForMinMaxNull() const;
-
-protected:
-   /** virtual destructor */
-   virtual ~ossimOverviewBuilderBase();
-
-   /**
-    *  @brief Gets the required number of res levels.
-    *
-    *  Convenience method to get the required number of reduced resolution
-    *  data sets to get to the smallest dimension of the output tile size.
-    *  Note that this include r0.
-    *
-    *  @param ih Pointer to the image handler.
-    *
-    *  @return number of res levels.
-    */
-   ossim_uint32 getRequiredResLevels(const ossimImageHandler* ih) const;
-  
-   /**
-    * @brief Initializes preference settings.
-    *
-    * Currently:
-    *
-    * 1) Gets the default stop dimension.
-    *
-    * Looks for overview_stop_dimension, then will use minimum default tile
-    * size if that is not found.
-    * 
-    * 2) Set scan float data flag.
-    *
-    * Looks for overview_builder.scan_for_min_max_null_if_float.
-    *
-    * If true this will turn the m_scanForMinMaxNull on if the scalar type of
-    * image handler is float.
-    */
-   void initializePreferenceSettings();
-
-   /**
-    * @brief Checks scalar type and turns on scanning for min, max, nulls if
-    * needed.
-    */
-   void initializeScanOptions();
-   
-   ossim_uint32 m_overviewStopDimension;
-   ossimHistogramMode m_histoMode; 
-   ossimKeywordlist m_bitMaskSpec;
-   ossimRefPtr<ossimImageHandler>  m_imageHandler;
-   std::vector<ossim_uint32>       m_originalBandList;
-   ossimRefPtr<ossimBitMaskWriter> m_maskWriter;
-   ossimRefPtr<ossimMaskFilter>    m_maskFilter;
-   ossimFilename                   m_outputFile;
-   bool                            m_scanForMinMax;
-   bool                            m_scanForMinMaxNull;
-   bool                            m_scanFloatData;
-
-   /** for rtti stuff */
-   TYPE_DATA
-};
-
-#endif /* End of "#ifndef ossimOverviewBuilderBase_HEADER" */
diff --git a/include/ossim/imaging/ossimPixelFlipper.h b/include/ossim/imaging/ossimPixelFlipper.h
deleted file mode 100644
index 5659834..0000000
--- a/include/ossim/imaging/ossimPixelFlipper.h
+++ /dev/null
@@ -1,272 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2002 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Class to scan pixels and flip target dn pixel value to new dn pixel value.
-// This was written to fix partial null pixels.
-// 
-//*************************************************************************
-// $Id: ossimPixelFlipper.h 19728 2011-06-06 21:31:17Z dburken $
-#ifndef ossimPixelFlipper_HEADER
-#define ossimPixelFlipper_HEADER
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-#include <ossim/base/ossimPolygon.h>
-#include <OpenThreads/ReentrantMutex>
-
-/**
- *  Class to scan pixels and flip target dn value to a replacement dn
- *  value.
- *
- *  This was written to fix problems with null pixels, i.e. an image has a
- *  digital number(dn) of 255 for null and it is desired to use a dn of 0 as
- *  a null.  This can really be used to flip any pixel value to another.
- *
- *  @note This filter currently works on the input tile directly and does
- *  not copy the data.
- *
- *  @see theReplacementMode data member documentation for more info.
- */
-class OSSIM_DLL ossimPixelFlipper : public ossimImageSourceFilter
-{
-public:
-   static const char PF_TARGET_VALUE_KW[];     
-   static const char PF_TARGET_RANGE_KW[];     
-   static const char PF_REPLACEMENT_VALUE_KW[];
-   static const char PF_REPLACEMENT_MODE_KW[];
-   static const char PF_CLAMP_VALUE_KW[];
-   static const char PF_CLAMP_VALUE_LO_KW[];   
-   static const char PF_CLAMP_VALUE_HI_KW[];   
-   static const char PF_CLIP_MODE_KW[];
-
-   /**
-    * Target Replacement Mode:
-    * 
-    * Examples given for 3-band pixel values as (R, G, B) with target = 0, and replacement = 1
-
-    * If mode is REPLACE_BAND_IF_TARGET (default):
-    * Any pixel band with value of target will be replaced.
-    * (0, 0, 0) becomes (1, 1, 1)
-    * (0, 3, 2) becomes (1, 3, 2)
-    *
-    * If mode is REPLACE_BAND_IF_PARTIAL_TARGET:
-    * A band with target value will be replaced only if at least one other band in the pixel does 
-    * not have the target.
-    * (0, 0, 0) remains (0, 0, 0)
-    * (0, 3, 2) becomes (1, 3, 2)
-    *
-    * If mode is REPLACE_ALL_BANDS_IF_PARTIAL_TARGET:
-    * All bands of the pixel will be replaced if any but not all bands in the pixel have the
-    * target value.
-    * (0, 0, 0) remains (0, 0, 0)
-    * (0, 3, 2) becomes (1, 1, 1)
-    *
-    * If mode is REPLACE_ONLY_FULL_TARGETS:
-    * All bands in the pixel will be replaced only if they all have the target.
-    * (0, 0, 0) becomes (1, 1, 1)
-    * (0, 3, 2) remains (0, 3, 2)
-    *
-    * If mode is REPLACE_ALL_BANDS_IF_ANY_TARGET:
-    * All bands in the pixel will be replaced if even one band has the target.
-    * (0, 0, 0) becomes (1, 1, 1)
-    * (0, 3, 2) remains (1, 1, 1)
-    */
-   enum ReplacementMode
-   {
-      REPLACE_BAND_IF_TARGET               = 0,
-      REPLACE_BAND_IF_PARTIAL_TARGET       = 1,
-      REPLACE_ALL_BANDS_IF_PARTIAL_TARGET  = 2,
-      REPLACE_ONLY_FULL_TARGETS            = 3,
-      REPLACE_ALL_BANDS_IF_ANY_TARGET      = 4,
-   };
-
-   /** 
-    * When either a lo and/or hi clamp value is set, the clamping mode will be enabled accordingly
-    * and override any target replacement defined
-    */
-   enum ClampingMode
-   {
-      DISABLED                           = 0,
-      CLAMPING_LO                        = 1,
-      CLAMPING_HI                        = 2,
-      CLAMPING_LO_AND_HI                 = 3,
-   };
-
-   enum ClipMode
-   {
-      NONE = 0,
-      BOUNDING_RECT  = 1,
-      VALID_VERTICES = 2
-   };
-
-   /** default constructor */
-   ossimPixelFlipper(ossimObject* owner=NULL);
-
-
-   /** @return "Pixel flipper" as an ossimString. */
-   virtual ossimString getShortName()const;
-
-   /** Initializes the state of the object from theInputConnection. */
-   virtual void initialize();
-
-   /**
-    * @param tile_rect Rectangle to fill tile with.
-    * 
-    * @param resLevel Reduced resolution level to grab from.
-    * 
-    * @return ossimRefPtr<ossimImageData> This is tile that was filled with
-    * tile_rect.
-    *
-    * @note Callers should check the ossimRefPtr::valid method.
-    * The internal pointer of the ossimRefPtr<ossimImageData> can be
-    * null if the tile_rect did not intersect the input connection's
-    * bounding rectangle.
-    */
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect,
-                                               ossim_uint32 resLevel=0);
-
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-   
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-   virtual ossimScalarType getOutputScalarType() const;
-   virtual ossim_float64 getMaxPixelValue (ossim_uint32 band = 0 ) const;
-   virtual ossim_float64 getMinPixelValue (ossim_uint32 band = 0 ) const;
-      
-   virtual std::ostream& print(std::ostream& out) const;
-
-   /** 
-    * @param target_value This is the value to flip. 
-    * @note If clamping is specified, it will take precedence over any target value (or range) test
-    */
-   void setTargetValue(ossim_float64 target_value);
-
-   /** 
-    * Instead of a single value for a target, this method allows for specifying a range of values
-    * to flip to the replacement. The replacement mode is still referenced.
-    * @param  This is the value to flip. 
-    * @note If clamping is specified, it will take precedence over any target range test.
-    */
-   void setTargetRange(ossim_float64 target_min, ossim_float64 target_max);
-
-   /**
-    * @param replacement_value This is the value to flip target to.
-    * @note If clamping is specified, it will take precedence over any target replacement.
-    */
- void setReplacementValue(ossim_float64 replacement_value);
-
-   /**
-    * @param clamp_value If set all pixel values above this range will (or below if clamp_max_value
-    * = false) be clamped to clamp_value. Must be less than max pixel (or greater than the min 
-    * pixel) value of the input and cannot be null. 
-    * @note If any clamp limit is defined, it will take precedence over any target value (or range)
-    * replacement. The replacement mode is referenced when deciding whether a pixel should be 
-    * clamped or left alone.
-    */
-   void setClampValue(ossim_float64 clamp_value, bool is_high_clamp_value=true);
-   void setClampValues(ossim_float64 clamp_value_lo, ossim_float64 clamp_value_hi);
-
-   /** @see enum ReplacementMode */
-   void setReplacementMode(ossimPixelFlipper::ReplacementMode mode);
-
-   /** Accepts a string that must match the enumerator's label (can be lower case) and sets the 
-    * replacement mode accordingly. If the string is not understood, the mode remains unchanged and
-    * FALSE is returned. */
-   bool setReplacementMode(const ossimString& modeString);
-
-   /** 
-    * Clipping here refers to bounding rect or valid polygon (spacial) clipping, where all pixels
-    * outside the valid area are mapped to the replacement value.
-    */
-   void setClipMode(const ossimString& modeString);
-   void setClipMode(ClipMode mode);
-
-   //ossim_float64 getTargetValue()      const;
-   ossim_float64 getReplacementValue() const;
-   //ossim_float64 getClampValue() const;
-   ossimPixelFlipper::ReplacementMode getReplacementMode()  const;
-   ossimString getReplacementModeString() const;
-   ossimString getClipModeString() const;
-   ClipMode getClipMode() const;
-
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   
-   //! This object can be used outside of an image chain for offline processing of existing tile.
-   template <class T> void flipPixels(T dummy, ossimImageData* inpuTile, ossim_uint32 resLevel);
-
-protected:
-   /** destructor */
-   virtual ~ossimPixelFlipper();
-   template <class T> void clipTile(T dummy,
-                                    ossimImageData* inpuTile,
-                                    ossim_uint32 resLevel);
-
-   /**
-    * Verifies pixel is in range.
-    * @return Returns true if in range else false.
-    */
-   bool inRange(ossim_float64 value) const;
-
-   void allocateClipTileBuffer(ossimRefPtr<ossimImageData> inputImage);
-   
-   /** The value range to replace. For a single value replacement, both Lo and Hi are equal. Any
-    * pixel within this range will be remapped to the replacement value */
-   ossim_float64 theTargetValueLo;
-   ossim_float64 theTargetValueHi;
-
-    /** When target values are defined, this is the value the pixel will assume if the pixel falls 
-     *  within the target range (according to the rules for replacement mode) */
-   ossim_float64 theReplacementValue;
-   ReplacementMode theReplacementMode; //!< See documentation for ReplacementMode enum above
-
-  /** The range of desired pixel values. Any pixels outside this range are set to the corresponding
-    * clamp value. Note that theReplacementValue is not referenced when clamping. */
-   ossim_float64 theClampValueLo;
-   ossim_float64 theClampValueHi;
-   ClampingMode  theClampingMode;
-
-   /**
-    * Border Clip mode
-    *
-    * This will flip to nulls any pixel value outside the specified mode.
-    *
-    * Valid modes are:
-    *
-    * none
-    * bounding_rect
-    * valid_vertices
-    *
-    * if the mode is "none" then nothing is done.
-    * if the mode is "bounding_rect" then the bounding rect for the requested rlevel
-    *                is used and every pixel outside that   
-    */
-   ClipMode        theClipMode;
-   
-   /** For lock and unlock. */
-   mutable OpenThreads::ReentrantMutex      theMutex;
-
-   mutable std::vector<ossimPolygon> theValidVertices;
-   mutable std::vector<ossimIrect>   theBoundingRects;
-
-   ossimRefPtr<ossimImageData> theClipTileBuffer;
-   
-   TYPE_DATA
-};
-
-
-#endif
diff --git a/include/ossim/imaging/ossimPolyCutter.h b/include/ossim/imaging/ossimPolyCutter.h
deleted file mode 100644
index a0afc16..0000000
--- a/include/ossim/imaging/ossimPolyCutter.h
+++ /dev/null
@@ -1,108 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimPolyCutter.h 19907 2011-08-05 19:55:46Z dburken $
-#ifndef ossimPolyCutter_HEADER
-#define ossimPolyCutter_HEADER
-#include <ossim/imaging/ossimImageSourceFilter.h>
-#include <ossim/base/ossimPolygon.h>
-#include <ossim/imaging/ossimImageDataHelper.h>
-#include <vector>
-
-//class ossimPolyArea2d;
-class ossimImageData;
-
-class OSSIMDLLEXPORT ossimPolyCutter : public ossimImageSourceFilter
-{
-public:
-   enum ossimPolyCutterCutType
-   {
-      OSSIM_POLY_NULL_INSIDE  = 0,
-      OSSIM_POLY_NULL_OUTSIDE = 1
-   };
-   
-   ossimPolyCutter();
-    ossimPolyCutter(ossimImageSource* inputSource,
-                    const ossimPolygon& polygon);
-
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-   
-   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
-
-   virtual void initialize();
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-   
-   /*!
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   virtual void setPolygon(const vector<ossimDpt>& polygon,
-                           ossim_uint32 i = 0);
-   
-   virtual void setPolygon(const vector<ossimIpt>& polygon,
-                           ossim_uint32 i = 0);
-   
-   virtual void addPolygon(const vector<ossimIpt>& polygon);
-   virtual void addPolygon(const vector<ossimDpt>& polygon);
-   virtual void addPolygon(const ossimPolygon& polygon);
-   
-   virtual void setNumberOfPolygons(ossim_uint32 count);
-   
-   virtual std::vector<ossimPolygon>& getPolygonList();
-
-   virtual const std::vector<ossimPolygon>& getPolygonList()const;
-   
-   void setCutType(ossimPolyCutterCutType cutType);
-   
-   ossimPolyCutterCutType getCutType()const;
-
-   void clear();
-
-   const ossimIrect& getRectangle() const;
-
-   void setRectangle(const ossimIrect& rect);
-   
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-protected:
-   virtual ~ossimPolyCutter();
-
-   /**
-    * Called on first getTile, will initialize all data needed.
-    */
-   void allocate();
-   void computeBoundingRect();
-
-   ossimRefPtr<ossimImageData> theTile;
-
-   /*!
-    * Will hold a pre-computed bounding rect of the
-    * polygon data.
-    */
-   ossimIrect theBoundingRect;
-
-   std::vector<ossimPolygon> thePolygonList;
-
-   /*!
-    * theDefault fill will be outside.
-    */
-   ossimPolyCutterCutType theCutType;
-   ossimImageDataHelper theHelper;
-   bool m_boundingOverwrite;
-
-TYPE_DATA  
-};
-#endif /* #ifndef ossimPolyCutter_HEADER */
diff --git a/include/ossim/imaging/ossimQbTileFilesHandler.h b/include/ossim/imaging/ossimQbTileFilesHandler.h
deleted file mode 100644
index 5fa1484..0000000
--- a/include/ossim/imaging/ossimQbTileFilesHandler.h
+++ /dev/null
@@ -1,44 +0,0 @@
-//**************************************************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Oscar Kramer
-// 
-//**************************************************************************************************
-// $Id: ossimQbTileFilesHandler.h 2669 2011-06-06 12:28:20Z oscar.kramer $
-#ifndef ossimQbTileFilesHandler_HEADER
-#define ossimQbTileFilesHandler_HEADER
-
-#include <ossim/imaging/ossimTiledImageHandler.h>
-
-// Enable this flag to utilize the system of separate overviews for each tile-file
-#define USING_SUB_OVRS 0
-
-//! Image handler used for tiled Quickbird imagery. 
-class OSSIMDLLEXPORT ossimQbTileFilesHandler : public ossimTiledImageHandler
-{
-public:
-   //!  Constructor (default):
-   ossimQbTileFilesHandler();
-   
-   //! Destructor:
-   virtual ~ossimQbTileFilesHandler();
-   
-   //! @return Returns true on success, false on error.
-   //! @note This method relies on the data member ossimImageData::theImageFile being set.  
-   virtual bool open();
-
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-   
-protected:
-
-   //! Initializes tile image rects by considering adjacent row/col offsets. Called when TIL
-   //! doesn't contain the info. Returns true if successful.
-   bool computeImageRects();
-
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimQbTileFilesHandler_HEADER */
diff --git a/include/ossim/imaging/ossimQuickbirdNitfTileSource.h b/include/ossim/imaging/ossimQuickbirdNitfTileSource.h
deleted file mode 100644
index d32f69f..0000000
--- a/include/ossim/imaging/ossimQuickbirdNitfTileSource.h
+++ /dev/null
@@ -1,30 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts (gpotts at imagelinks.com)
-//
-// Description:
-//
-//*******************************************************************
-//  $Id: ossimQuickbirdNitfTileSource.h 17932 2010-08-19 20:34:35Z dburken $
-#ifndef ossimQuickbirdNitfTileSource_HEADER
-#define ossimQuickbirdNitfTileSource_HEADER
-#include <ossim/imaging/ossimNitfTileSource.h>
-#include <ossim/base/ossim2dTo2dTransform.h>
-
-class ossimQuickbirdNitfTileSource : public ossimNitfTileSource
-{
-public:
-   virtual bool open();
-
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-   
-protected:
-   ossimRefPtr<ossim2dTo2dTransform> m_transform;
-TYPE_DATA   
-};
-#endif
diff --git a/include/ossim/imaging/ossimQuickbirdTiffTileSource.h b/include/ossim/imaging/ossimQuickbirdTiffTileSource.h
deleted file mode 100644
index 6e9bd90..0000000
--- a/include/ossim/imaging/ossimQuickbirdTiffTileSource.h
+++ /dev/null
@@ -1,36 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (c) 2005, David Burken, all rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-// 
-// Copied from ossimQuickbirdNitfTileSource written by Garrett Potts.
-//
-// Description:
-//
-// Class declaration for specialized image handler to pick up offsets from
-// Quick Bird ".TIL" files.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimQuickbirdTiffTileSource.h 17932 2010-08-19 20:34:35Z dburken $
-#ifndef ossimQuickbirdTiffTileSource_HEADER
-#define ossimQuickbirdTiffTileSource_HEADER
-
-#include <ossim/imaging/ossimTiffTileSource.h>
-#include <ossim/base/ossim2dTo2dShiftTransform.h>
-
-class OSSIM_DLL ossimQuickbirdTiffTileSource : public ossimTiffTileSource
-{
-public:
-   virtual bool open();
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-   
-protected:
-   ossimFilename m_tileInfoFilename;
-   
-TYPE_DATA   
-};
-#endif
diff --git a/include/ossim/imaging/ossimRLevelFilter.h b/include/ossim/imaging/ossimRLevelFilter.h
deleted file mode 100644
index 9a3319f..0000000
--- a/include/ossim/imaging/ossimRLevelFilter.h
+++ /dev/null
@@ -1,99 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimRLevelFilter.h 17932 2010-08-19 20:34:35Z dburken $
-#ifndef ossimRLevelFilter_HEADER
-#define ossimRLevelFilter_HEADER
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-/*!
- * This filter is used to adjust the RLevel.  If you would like to
- * continually change between RLevels or Reslolutions then you can use this
- * filter to do so.  You can also specify whether or not the rLevel
- * passed in from the getTile request is added to this classes current
- * Rlevel.  This is so if you concatenate multiple filters that reduce
- * the RLevels then it will keep reducing.  For example if I have
- * 2 filters that both go to RLevel 1 then it actually will go to
- * 2 since there are 2 decimations happening.  This can be turned off
- * by specifying the Rlevel not to be additive.
- */
-class OSSIMDLLEXPORT ossimRLevelFilter : public ossimImageSourceFilter
-{
-public:
-
-   /** @brief default constructor */
-   ossimRLevelFilter();
-
-
-   virtual void getDecimationFactor(ossim_uint32 resLevel,
-                                    ossimDpt& result)const;
-
-   //! Returns a pointer reference to the active image geometry at this filter. The input source
-   //! geometry is modified, so we need to maintain our own geometry object as a data member.
-   ossimRefPtr<ossimImageGeometry> getImageGeometry();
-
-   virtual void setCurrentRLevel(ossim_uint32 rlevel);
-
-   virtual ossim_uint32 getCurrentRLevel()const;
-
-   /*!
-    * Get/set of the data member "theOverrideGeometryFlag".
-    * If set this will override the "getImageGeometry" method and adjust
-    * the getMetersPerPixel or the getDecimalDegreesPerPixel.
-    * Default behavior is to not override method.
-    */
-   virtual bool getOverrideGeometryFlag() const;
-   virtual void setOverrideGeometryFlag(bool override);
-
-   /**
-    * @brief Returns the bounding rectangle.
-    *
-    * @param resLevel This argument is only passed onto the input connection
-    * if this filter is disabled.  @see disableSource().
-    *
-    * To get the bounding rectangle of an rlevel when source is enabled do:
-    * myRLevelFilter->setCurrentRLevel(level);
-    * myRLevelFilter->getBoundingRect();
-    *
-    * @return Rectangle of the current rlevel if enabled; else, the rectangle
-    * of the input connection for resLevel.
-    */
-   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const;
-
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-protected:
-   /** @brief virtual destructor. */
-   virtual ~ossimRLevelFilter();
-   
-   /*!
-    * Initializes result with the sum of decimations from rlevel one to
-    * theCurrentRLevel.
-    */
-   void getSummedDecimation(ossimDpt& result) const;
-   
-   //! If this object is maintaining an ossimImageGeometry, this method needs to be called after 
-   //! a scale change so that the geometry's projection is modified accordingly.
-   void updateGeometry();
-
-   ossim_uint32 theCurrentRLevel;
-   bool         theOverrideGeometryFlag;
-   ossimRefPtr<ossimImageGeometry> m_ScaledGeometry; //!< The input image geometry, altered by the scale
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimReadmeFileWriter.h b/include/ossim/imaging/ossimReadmeFileWriter.h
deleted file mode 100644
index a02a1ba..0000000
--- a/include/ossim/imaging/ossimReadmeFileWriter.h
+++ /dev/null
@@ -1,57 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2003 Storage Area Networks, Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Kenneth Melero (kmelero at sanz.com)
-//
-//*******************************************************************
-//  $Id: ossimReadmeFileWriter.h 15766 2009-10-20 12:37:09Z gpotts $
-
-#ifndef ossimReadmeFileWriter_H
-#define ossimReadmeFileWriter_H
-
-#include <fstream>
-#include <ossim/imaging/ossimMetadataFileWriter.h>
-
-/** ossimReadmeFileWriter */
-class OSSIMDLLEXPORT ossimReadmeFileWriter : public ossimMetadataFileWriter
-{
-public:
-
-   /** default constructor */
-   ossimReadmeFileWriter();
-
-
-   /**
-    * Satisfies pure virtual from ossimMetadataWriter base.
-    *
-    * Appends the writers image types to the "metadatatypeList".
-    * 
-    * @param metadatatypeList stl::vector<ossimString> list to append to.
-    *
-    * @note Appends to the list, does not clear it first.
-    */
-   virtual void getMetadatatypeList(
-      std::vector<ossimString>& metadatatypeList) const;
-
-   /**
-    * Satisfies pure virtual from ossimMetadataWriter base.
-    *
-    * @param imageType string representing image type.
-    *
-    * @return true if "metadataType" is supported by writer.
-    */
-   virtual bool hasMetadataType(const ossimString& metadataType)const;
-   
-protected:
-   /** virtual destructor */
-   virtual ~ossimReadmeFileWriter();
-   virtual bool writeFile();
-   
-TYPE_DATA
-};
-
-#endif /* End of #ifndef ossimReadmeFileWriter_H */
diff --git a/include/ossim/imaging/ossimRectangleCutFilter.h b/include/ossim/imaging/ossimRectangleCutFilter.h
deleted file mode 100644
index a831cb2..0000000
--- a/include/ossim/imaging/ossimRectangleCutFilter.h
+++ /dev/null
@@ -1,57 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimRectangleCutFilter.h 9094 2006-06-13 19:12:40Z dburken $
-#ifndef ossimRectangleCutFilter_HEADER
-#define ossimRectangleCutFilter_HEADER
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-class OSSIM_DLL ossimRectangleCutFilter : public ossimImageSourceFilter
-{
-public:
-   enum ossimRectangleCutType
-   {
-      OSSIM_RECTANGLE_NULL_INSIDE  = 0,
-      OSSIM_RECTANGLE_NULL_OUTSIDE = 1
-   };
-
-   ossimRectangleCutFilter(ossimObject* owner,
-                     ossimImageSource* inputSource=NULL);
-   ossimRectangleCutFilter(ossimImageSource* inputSource=NULL);
-
-   void setRectangle(const ossimIrect& rect);
-
-   const ossimIrect&     getRectangle()const;
-   ossimRectangleCutType getCutType()const;
-   void                  setCutType(ossimRectangleCutType cutType);
-   
-   ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
-   virtual void getValidImageVertices(vector<ossimIpt>& validVertices,
-                                      ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER,
-                                      ossim_uint32 resLevel=0)const;
-
-   ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
-                                       ossim_uint32 resLevel=0);
-
-   virtual void initialize();
-   
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=NULL)const;
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=NULL);
-   
-protected:
-   ossimIrect            theRectangle;
-   ossimRectangleCutType theCutType;
-   vector<ossimDpt>      theDecimationList;
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimRectangleCutFilter_HEADER */
diff --git a/include/ossim/imaging/ossimRgbGridRemapEngine.h b/include/ossim/imaging/ossimRgbGridRemapEngine.h
deleted file mode 100644
index e0a1d04..0000000
--- a/include/ossim/imaging/ossimRgbGridRemapEngine.h
+++ /dev/null
@@ -1,54 +0,0 @@
-//*****************************************************************************
-// FILE: ossimRgbGridRemapEngine.h
-//
-// Copyright (C) 2001 ImageLinks, Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Contains declaration of class ossimRgbGridRemapEngine
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimRgbGridRemapEngine.h 9094 2006-06-13 19:12:40Z dburken $
-
-#ifndef ossimRgbGridRemapEngine_HEADER
-#define ossimRgbGridRemapEngine_HEADER
-
-#include <ossim/imaging/ossimGridRemapEngine.h>
-
-/*!****************************************************************************
- *
- * CLASS: ossimRgbGridRemapEngine 
- *
- *****************************************************************************/
-class ossimRgbGridRemapEngine : public ossimGridRemapEngine
-{
-public:
-   ossimRgbGridRemapEngine()
-      : ossimGridRemapEngine(3, 3) {}
-   
-   virtual ossimObject* dup() const;
-   
-   virtual void remapTile(const ossimDpt& origin_point,
-                          ossimGridRemapSource* remapper,
-                          ossimRefPtr<ossimImageData>& tile);
-
-   virtual void assignRemapValues(std::vector<ossimAtbPointSource*>& sources);
-
-   virtual void computeSourceValue(ossimRefPtr<ossimImageData>& source,
-                                   void* result);
-
-protected:
-   virtual void computeRemapNode(ossimAtbPointSource*  point_source,
-                                 void*                 source_value,
-                                 void*                 target_value);
-
-   TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimRgbToGreyFilter.h b/include/ossim/imaging/ossimRgbToGreyFilter.h
deleted file mode 100644
index a274034..0000000
--- a/include/ossim/imaging/ossimRgbToGreyFilter.h
+++ /dev/null
@@ -1,70 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimRgbToGreyFilter.h 20197 2011-11-03 13:22:02Z dburken $
-#ifndef ossimRgbToGreyFilter_HEADER
-#define ossimRgbToGreyFilter_HEADER
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-class OSSIMDLLEXPORT ossimRgbToGreyFilter : public ossimImageSourceFilter
-{
-public:
-   ossimRgbToGreyFilter(ossimObject* owner=NULL);
-   ossimRgbToGreyFilter(ossimImageSource* inputSource,
-                        double c1 = 1.0/3.0,
-                        double c2 = 1.0/3.0,
-                        double c3 = 1.0/3.0);
-   ossimRgbToGreyFilter(ossimObject* owner,
-                        ossimImageSource* inputSource,
-                        double c1 = 1.0/3.0,
-                        double c2 = 1.0/3.0,
-                        double c3 = 1.0/3.0);
-   
-   virtual ossimString getShortName()const;
-   virtual ossimString getLongName()const;
-   
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-   
-   virtual void initialize();
-   
-   virtual ossimScalarType getOutputScalarType() const;
-   
-   ossim_uint32 getNumberOfOutputBands() const;
- 
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-   
-   /*!
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-protected:
-   virtual ~ossimRgbToGreyFilter();
-
-   /**
-    * Called on first getTile, will initialize all data needed.
-    */
-   void allocate();
-   
-   ossimRefPtr<ossimImageData> theBlankTile;
-   ossimRefPtr<ossimImageData> theTile;
-   void runUcharTransformation(ossimRefPtr<ossimImageData>& tile);
-   double theC1;
-   double theC2;
-   double theC3;
-
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimRgbToGreyFilter_HEADER */
diff --git a/include/ossim/imaging/ossimRgbToHsiSource.h b/include/ossim/imaging/ossimRgbToHsiSource.h
deleted file mode 100644
index 5105111..0000000
--- a/include/ossim/imaging/ossimRgbToHsiSource.h
+++ /dev/null
@@ -1,47 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimRgbToHsiSource.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimRgbToHsiSource_HEADER
-#define ossimRgbToHsiSource_HEADER
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-class ossimRgbToHsiSource : public ossimImageSourceFilter
-{
-public:
-   ossimRgbToHsiSource();
-   ossimRgbToHsiSource(ossimImageSource* inputSource);
-
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-   
-   virtual ossimScalarType getOutputScalarType() const;
-   virtual ossim_uint32    getNumberOfOutputBands()const;
-   virtual double          getNullPixelValue()const;
-   virtual double          getMinPixelValue(ossim_uint32 band=0)const;
-   virtual double          getMaxPixelValue(ossim_uint32 band=0)const;
-
-   virtual void initialize();
-
-protected:
-   virtual ~ossimRgbToHsiSource();
-
-   /**
-    * Called on first getTile, will initialize all data needed.
-    */
-   void allocate();
-   
-   ossimRefPtr<ossimImageData> theBlankTile;
-   ossimRefPtr<ossimImageData> theTile;
-
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimRgbToHsiSource_HEADER */
diff --git a/include/ossim/imaging/ossimRgbToHsvSource.h b/include/ossim/imaging/ossimRgbToHsvSource.h
deleted file mode 100644
index 82c719b..0000000
--- a/include/ossim/imaging/ossimRgbToHsvSource.h
+++ /dev/null
@@ -1,47 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimRgbToHsvSource.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimRgbToHsvSource_HEADER
-#define ossimJpegRgbToYCbCrSource_HEADER
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-class ossimRgbToHsvSource : public ossimImageSourceFilter
-{
-public:
-   ossimRgbToHsvSource();
-   ossimRgbToHsvSource(ossimImageSource* inputSource);
-   
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-   
-   virtual ossimScalarType getOutputScalarType() const;
-   virtual ossim_uint32    getNumberOfOutputBands()const;
-   virtual double getNullPixelValue()const;
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-
-   virtual void initialize();
-       
-protected:
-   virtual ~ossimRgbToHsvSource();
-
-   /**
-    * Called on first getTile, will initialize all data needed.
-    */
-   void allocate();
-   
-   ossimRefPtr<ossimImageData> theBlankTile;
-   ossimRefPtr<ossimImageData> theTile;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimRgbToIndexFilter.h b/include/ossim/imaging/ossimRgbToIndexFilter.h
deleted file mode 100644
index d66c192..0000000
--- a/include/ossim/imaging/ossimRgbToIndexFilter.h
+++ /dev/null
@@ -1,96 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimRgbToIndexFilter.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimRgbToIndexFilter_HEADER
-#define ossimRgbToIndexFilter_HEADER
-#include <ossim/base/ossimRgbVector.h>
-#include <ossim/base/ossimRgbLutDataObject.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/imaging/ossimImageSourceFilter.h>
-#include <vector>
-
-class ossimImageData;
-
-/*!
- * It will map the input data to an 8-bit index table.  The table
- * <pre>
- *
- * Example keyword list:
- *
- * type:  ossimRgbToIndexFilter
- *
- * If you want to load from a file then just do:
- *
- * lut.filename: <full path to lut file>
- *
- * If you have the lut table in line then it must look like this:
- *
- * lut.entry0:  204 102 1
- * lut.entry1:  255 204 153
- * lut.entry2:  51 204 204
- * lut.number_of_entries:  3
- * lut.type:  ossimRgbLutDataObject
- *
- * </pre>
- */
-class ossimRgbToIndexFilter : public ossimImageSourceFilter
-{
-public:
-   /*!
-    * Initializes the min value to 0 and the max value to 4000.
-    */
-   ossimRgbToIndexFilter();
-   ossimRgbToIndexFilter(ossimImageSource* inputSource,
-                           const ossimRgbLutDataObject& rgbLut);
-   
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
-                                               ossim_uint32 resLevel=0);
-   
-   virtual ossim_uint32 getNumberOfOutputBands() const;
-   
-   virtual ossimScalarType getOutputScalarType() const;
-   
-   void setLut(ossimRgbLutDataObject& lut);
-
-   void setLut(const ossimFilename& file);
-
-   virtual void disableSource();
-   
-   virtual double getNullPixelValue(ossim_uint32 band=0)const;
-
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-   
-   virtual void initialize();
-
-   /*!
-    * Saves the state of this object.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
-
-   /*!
-    * Loads the state of this object.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-protected:
-   virtual ~ossimRgbToIndexFilter();
-   void allocate();
-   
-   virtual ossimRefPtr<ossimImageData> convertInputTile(ossimRefPtr<ossimImageData>& tile);
-
-   ossimRefPtr<ossimRgbLutDataObject>       theLut;
-   ossimRefPtr<ossimImageData> theTile;
-   
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimRgbToJpegYCbCrSource.h b/include/ossim/imaging/ossimRgbToJpegYCbCrSource.h
deleted file mode 100644
index 2422b80..0000000
--- a/include/ossim/imaging/ossimRgbToJpegYCbCrSource.h
+++ /dev/null
@@ -1,32 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimRgbToJpegYCbCrSource.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimRgbToJpegYCbCrSource_HEADER
-#define ossimRgbToJpegYCbCrSource_HEADER
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-class ossimRgbToJpegYCbCrSource : public ossimImageSourceFilter
-{
-public:
-   
-   ossimRgbToJpegYCbCrSource();
-   ossimRgbToJpegYCbCrSource(ossimImageSource* inputSource);
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-       
-protected:
-   virtual ~ossimRgbToJpegYCbCrSource();
-   ossimRefPtr<ossimImageData> theBlankTile;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimS16ImageData.h b/include/ossim/imaging/ossimS16ImageData.h
deleted file mode 100644
index 2df4e18..0000000
--- a/include/ossim/imaging/ossimS16ImageData.h
+++ /dev/null
@@ -1,184 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2001 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Class declaration of ossimS16ImageData.  Specialized image data object for
-// signed short data.
-//
-//*************************************************************************
-// $Id: ossimS16ImageData.h 16052 2009-12-08 22:20:40Z dburken $
-
-#ifndef ossimS16ImageData_HEADER
-#define ossimS16ImageData_HEADER
-
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimNormalizedS16RemapTable.h>
-
-class OSSIMDLLEXPORT ossimS16ImageData : public ossimImageData
-{
-public:
-   ossimS16ImageData(ossimSource* source,
-                     ossim_uint32 bands = 1);
-
-   ossimS16ImageData(ossimSource* source,
-                    ossim_uint32 bands,
-                    ossim_uint32 width,
-                    ossim_uint32 height);
-
-   ossimS16ImageData(const ossimS16ImageData &rhs);
-   
-
-   /*!
-    * Perform object duplication.
-    */
-   virtual ossimObject* dup()const;
-
-   /*!
-    * will fill the entire band with
-    * the value.
-    */
-   void fill(ossim_uint32 band, double value);
-
-
-   bool isNull(ossim_uint32 offset)const;
-   void setNull(ossim_uint32 offset);
-
-   virtual ossimDataObjectStatus validate() const;
-
-   /*!
-    * will go to the band and offset and compute the
-    * normalized float and return it back to the
-    * caller through the result argument.
-    */
-   virtual void getNormalizedFloat(ossim_uint32 offset,
-                                   ossim_uint32 bandNumber,
-                                   float& result)const;
-
-   /*!
-    * This will assign to this object a normalized
-    * value by unnormalizing to its native type.
-    */
-   virtual void setNormalizedFloat(ossim_uint32 offset,
-                                   ossim_uint32 bandNumber,
-                                   float input);
-   
-   /*!
-    * Will use the memory that you pass in to normalize
-    * this data object.
-    */
-   virtual void convertToNormalizedFloat(ossimImageData* result)const;
-   
-   /*!
-    * Will use the memory that you pass in to normalize
-    * this data object.
-    */
-   virtual void convertToNormalizedDouble(ossimImageData* result)const;
-
-   /*!
-    * Will take the normalized input and convert it
-    * to this tile's data type.  Example:  if this
-    * tile is of type UCHAR and its input is of type
-    * NORALIZED_FLOAT it will unnormalize the data by
-    * doing:
-    *
-    * minPix + normalizedInput*(maxPix-minPix)
-    *
-    * on a per band basis.
-    */
-   virtual void unnormalizeInput(ossimImageData* normalizedInput);
-
-   /*!
-    * This will compute the average value for the band.
-    */
-   virtual double computeAverageBandValue(ossim_uint32 bandNumber = 0);
-
-   /*!
-    * This will call the compute average band value and then
-    * use that in the calculation of:
-    
-    * It will then do a SUM[(Mean - Actual)^2]/width*height.
-    *
-    * This is the average variance from the passed in
-    * mean.  Basically think of the mean as a completely
-    * grey image and we would like to see how this
-    * image varies from the passed in mean.
-    */
-   virtual double computeMeanSquaredError(double meanValue,
-                                          ossim_uint32 bandNumber = 0);
-  
-   virtual void setValue(ossim_int32 x, ossim_int32 y, double color);
-
-   /*!
-    * Copies entire tile to buf passed in.  Data put in buf is normalized.
-    * The "buf" passed to method is assumed to be at least as big as:
-    * "getSize() * sizeof(double)"
-    */
-   virtual void copyTileToNormalizedBuffer(double* buf) const;
-   
-   /*!
-    * Copies buf passed in to tile.  Data is unnormalized to the tile's
-    * scalar type.
-    * The "buf" passed to method is assumed to be at least as big as the tiles:
-    * "getSize() * sizeof(double)"
-    */
-   virtual void copyNormalizedBufferToTile(double* buf);
-
-   /*!
-    * Will copy this tiles specified band number to the normalized buffer.
-    * if the band is out of range then nothing is done and returns.
-    */
-   virtual void copyTileToNormalizedBuffer(ossim_uint32 band, double* buf) const;
-   virtual void copyTileToNormalizedBuffer(ossim_uint32 band, float* buf)const;
-   
-   /*!
-    * Copies entire tile to buf passed in.  Data put in buf is normalized.
-    * The "buf" passed to method is assumed to be at least as big as:
-    * "getSize() * sizeof(double)"
-    */
-   virtual void copyTileToNormalizedBuffer(float* buf) const;
-   
-   /*!
-    * Copies buf passed in to tile.  Data is unnormalized to the tile's
-    * scalar type.
-    * The "buf" passed to method is assumed to be at least as big as the tiles:
-    * "getSize() * sizeof(double)"
-    */
-   virtual void copyNormalizedBufferToTile(float* buf);
-   
-   /*!
-    * Will copy the normalized buffer to this tiles
-    * specified band.  If band is out of range then nothing
-    * is done and returns.
-    */
-   virtual void copyNormalizedBufferToTile(ossim_uint32 band,
-                                           double* buf);
-   virtual void copyNormalizedBufferToTile(ossim_uint32 band,
-                                           float* buf);
-
-   /** @return The first non-null index of the normalized remap table. */
-   virtual ossim_float64 getMinNormalizedPix() const;
-   
-protected:
-   virtual ~ossimS16ImageData();
-   ossimS16ImageData();
-
-private:
-
-   static const ossimNormalizedS16RemapTable m_remapTable;
-
-TYPE_DATA
-};
-
-inline ossim_float64 ossimS16ImageData::getMinNormalizedPix() const
-{
-   return m_remapTable[1];
-}
-
-#endif
diff --git a/include/ossim/imaging/ossimSFIMFusion.h b/include/ossim/imaging/ossimSFIMFusion.h
deleted file mode 100644
index eef34a9..0000000
--- a/include/ossim/imaging/ossimSFIMFusion.h
+++ /dev/null
@@ -1,86 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2005 Garrett Potts
-//
-// LICENSE:  See top level LICENSE.txt
-// 
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimSFIMFusion.h 19827 2011-07-15 19:47:30Z gpotts $
-#ifndef ossimSFIMFusion_HEADER
-#define ossimSFIMFusion_HEADER
-#include <ossim/imaging/ossimFusionCombiner.h>
-#include <ossim/imaging/ossimConvolutionSource.h>
-#include <ossim/imaging/ossimImageGaussianFilter.h>
-#include <ossim/base/ossimAdjustableParameterInterface.h>
-
-/**
- * This class imlements the fusion algorithm from the paper:
- *
- * "Smoothing Filter-based Intesity Modulation: a spectral preserve
- *  image fusion technique for improving spatial details"
- *
- *  Pulished in INT. J. Remote Sensing, 2000, Vol. 21 NO. 18, 3461-3472
- *
- *  By J. G. LIU
- *
- *
- * Auther: Garrett Potts
- * LICENSE: LGPL
- */
-class OSSIM_DLL ossimSFIMFusion : public ossimFusionCombiner,
-                                  public ossimAdjustableParameterInterface
-{
-public:
-   ossimSFIMFusion();
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
-                                               ossim_uint32 resLevel=0);
-   virtual void initialize();
-
-   virtual ossimObject* getBaseObject()
-   {
-      return this;
-   }
-   virtual const ossimObject* getBaseObject()const
-   {
-      return this;
-   }
-   virtual void initAdjustableParameters();
-   virtual void adjustableParametersChanged();
-   
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0) const;
-
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-protected:
-   virtual ~ossimSFIMFusion();
-   void setFilters();
-   bool computeRegression(ossim_float64& slopeResult,
-                          const ossimIpt& origin,
-                          ossimRefPtr<ossimImageData> panData,
-                          ossimRefPtr<ossimImageData> colorData,
-                          ossim_uint32 colorBandIdx);
-   
-   ossim_float64 theLowPassKernelWidth;
-   ossim_uint32 theHighPassKernelWidth;
-   // These are low and high pass filters for the single pan band
-   //
-   ossimRefPtr<ossimImageGaussianFilter> theLowPassFilter;
-   ossimRefPtr<ossimConvolutionSource>   theHighPassFilter;
-   ossimRefPtr<ossimImageData>           theNormLowPassTile;
-   ossimRefPtr<ossimImageData>           theNormHighPassTile;
-   ossimRefPtr<ossimImageData>           theNormColorData;
-
-   NEWMAT::Matrix                        theHighPassMatrix;
-   bool                                  theAutoAdjustScales;
-
-TYPE_DATA   
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimScaleFilter.h b/include/ossim/imaging/ossimScaleFilter.h
deleted file mode 100644
index 9c52c1b..0000000
--- a/include/ossim/imaging/ossimScaleFilter.h
+++ /dev/null
@@ -1,184 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimScaleFilter.h 17932 2010-08-19 20:34:35Z dburken $
-#ifndef ossimScaleFilter_HEADER
-#define ossimScaleFilter_HEADER
-#include <vector>
-#include <ossim/imaging/ossimImageSourceFilter.h>
-#include <ossim/matrix/newmat.h>
-#include <ossim/matrix/newmatio.h>
-#include <ossim/imaging/ossimFilter.h>
-
-/*!
- */
-class ossimScaleFilter : public ossimImageSourceFilter
-{
-public:
-   enum ossimScaleFilterType
-   {
-      ossimScaleFilter_NEAREST_NEIGHBOR = 0,
-      ossimScaleFilter_BOX              = 1,
-      ossimScaleFilter_GAUSSIAN         = 2,
-      ossimScaleFilter_CUBIC            = 3,
-      ossimScaleFilter_HANNING          = 4,
-      ossimScaleFilter_HAMMING          = 5,
-      ossimScaleFilter_LANCZOS          = 6,
-      ossimScaleFilter_MITCHELL         = 7,
-      ossimScaleFilter_CATROM           = 8,
-      ossimScaleFilter_BLACKMAN         = 9,
-      ossimScaleFilter_BLACKMAN_SINC    = 10,
-      ossimScaleFilter_BLACKMAN_BESSEL  = 11,
-      ossimScaleFilter_QUADRATIC        = 12,
-      ossimScaleFilter_TRIANGLE         = 13,
-      ossimScaleFilter_HERMITE          = 14
-   };
-   
-   ossimScaleFilter();
-   ossimScaleFilter(ossimImageSource* inputSource,
-                    const ossimDpt& scaleFactor);
-   
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                   ossim_uint32 resLevel=0);
-   
-   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
-
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-   virtual void initialize();
-   virtual void getDecimationFactor(ossim_uint32 resLevel,
-                                    ossimDpt& result)const
-      {
-         result.makeNan();
-
-         if(resLevel == 0)
-         {
-            result.x = 1.0;
-            result.y = 1.0;
-         }
-      }
-   virtual void getDecimationFactors(vector<ossimDpt>& decimations)const
-      {
-         decimations.push_back(ossimDpt(1.0, 1.0));
-      }
-   virtual ossim_uint32 getNumberOfDecimationLevels()const
-      {
-         // only full res output since we are scaling
-         //
-         return 1;
-      }
-   void setFilterType(ossimScaleFilterType filterType);
-   void setFilterType(ossimScaleFilterType minifyFilterType,
-                      ossimScaleFilterType magnifyFilterType);
-   
-   void setFilterType(const ossimString& minifyType,
-                      const ossimString& magnifyType)
-      {
-         setFilterType(getFilterType(minifyType),
-                       getFilterType(magnifyType));
-      }
-   void setMinifyFilterType(const ossimString& minifyType)
-      {
-         setMinifyFilterType(getFilterType(minifyType));
-      }
-   void setMagnifyFilterType(const ossimString& magnifyType)
-      {
-         setMagnifyFilterType(getFilterType(magnifyType));
-      }
-   void setMinifyFilterType(ossimScaleFilterType filterType)
-      {
-         setFilterType(filterType,
-                       m_MagnifyFilterType);
-      }
-   void setMagnifyFilterType(ossimScaleFilterType filterType)
-      {
-         setFilterType(m_MinifyFilterType,filterType);
-      }
-   ossimString getMinifyFilterTypeAsString()const
-      {
-         return getFilterTypeAsString(m_MinifyFilterType);
-      }
-   ossimString getMagnifyFilterTypeAsString()const
-      {
-         return getFilterTypeAsString(m_MagnifyFilterType);
-      }
-   void setScaleFactor(const ossimDpt& scale);
-   void setBlurFactor(ossim_float64 blur)
-      {
-         m_BlurFactor = blur;
-      }
-   ossim_float64 getBlurFactor()const
-      {
-         return m_BlurFactor;
-      }
-   const ossimDpt& getScaleFactor()const
-      {
-         return m_ScaleFactor;
-      }
-   /*!
-    * Saves the state of this object.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
-
-   /*!
-    * Loads the state of this object.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-   
-protected:
-   virtual ~ossimScaleFilter();
-  void allocate();
-
-   //! If this object is maintaining an ossimImageGeometry, this method needs to be called after 
-   //! a scale change so that the geometry's projection is modified accordingly.
-   void updateGeometry();
-   
-   ossimRefPtr<ossimImageData> m_BlankTile;
-   ossimRefPtr<ossimImageData> m_Tile;
-   ossimFilter*                m_MinifyFilter;
-   ossimFilter*                m_MagnifyFilter;
-   ossimScaleFilterType        m_MinifyFilterType;
-   ossimScaleFilterType        m_MagnifyFilterType;
-   ossimDpt                    m_ScaleFactor;
-   ossimDpt                    m_InverseScaleFactor;
-   ossimIpt                    m_TileSize;
-   ossimIrect                  m_InputRect;
-   ossim_float64               m_BlurFactor;
-   ossimRefPtr<ossimImageGeometry> m_ScaledGeometry; //!< The input image geometry, altered by the scale
-
-   template <class T>
-   void runFilterTemplate(T dummy,
-                          const ossimIrect& imageRect,
-                          const ossimIrect& viewRect);
-   template <class T>
-   void runHorizontalFilterTemplate(T dummy,
-                                    const ossimRefPtr<ossimImageData>& input,
-                                    ossimRefPtr<ossimImageData>& output);
-   template <class T>
-   void runVerticalFilterTemplate(T dummy,
-                                  const ossimRefPtr<ossimImageData>& input,
-                                  ossimRefPtr<ossimImageData>& output);
-    void runFilter(const ossimIrect& imageRect,
-                   const ossimIrect& viewRect);
-
-   void getSupport(double& x, double& y);
-   const ossimFilter* getHorizontalFilter()const;
-   const ossimFilter* getVerticalFilter()const;
-   
-   ossimString getFilterTypeAsString(ossimScaleFilterType type)const;
-   ossimScaleFilterType getFilterType(const ossimString& type)const;
-   
-   ossimIrect scaleRect(const ossimIrect input,
-                        const ossimDpt& scaleFactor)const;
-   ossimFilter* createNewFilter(ossimScaleFilterType filterType,
-                                ossimScaleFilterType& result);
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimSingleImageChain.h b/include/ossim/imaging/ossimSingleImageChain.h
deleted file mode 100644
index f4f52f6..0000000
--- a/include/ossim/imaging/ossimSingleImageChain.h
+++ /dev/null
@@ -1,470 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Utility class declaration for a single image chain.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-#ifndef ossimSingleImageChain_HEADER
-#define ossimSingleImageChain_HEADER 1
-
-#include <vector>
-
-#include <ossim/base/ossimConstants.h> /* OSSIM_DLL */
-#include <ossim/imaging/ossimBandSelector.h>
-#include <ossim/imaging/ossimCacheTileSource.h>
-#include <ossim/imaging/ossimHistogramRemapper.h>
-#include <ossim/imaging/ossimImageChain.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageRenderer.h>
-#include <ossim/imaging/ossimScalarRemapper.h>
-
-
-// Forward class declarations:
-class ossimFilename;
-class ossimSrcRecord;
-
-/**
- * @class ossimSingleImageChain
- * 
- * @brief Single image chain class.
- *
- * Convenience class for a single image chain.
- * 
- * For code example see: ossim/src/test/ossim-single-image-chain-test.cpp  
- *
- * Just a clarification on "start of chain" versus "end of chain" in this
- * file.
- *
- * Given chain of:
- * 1) image handler
- * 2) band selector (optional)
- * 3) histogram remapper(optional)
- * 4) scalar remapper (optional)
- * 5) resampler cache
- * 6) resampler
- * 7) band selector (optional when going one band to three)
- * 8) chain cache
- *
- * The "image handle" is the "start of chain".
- * The "chain cache" is the "end of chain".
- */
-class OSSIM_DLL ossimSingleImageChain : public ossimImageChain
-{
-public:
-
-   /** default constructor */
-   ossimSingleImageChain();
-
-   /** Constructor that takes flags.*/
-   ossimSingleImageChain(bool addHistogramFlag,
-                         bool addResamplerCacheFlag,
-                         bool addChainCacheFlag,
-                         bool remapToEightBitFlag,
-                         bool threeBandFlag,
-                         bool threeBandReverseFlag);
-   
-   /** virtual destructor */
-   virtual ~ossimSingleImageChain();
-
-   /**
-    * @brief reset method
-    * This deletes all links in the chain, zero's out all data members, and
-    * sets all flags back to default.
-    */
-   void reset();
-   
-   /**
-    * @brief open method that takes an image file.
-    *
-    * Opens file and creates a simple chain with ossimImageHandler.
-    *
-    * @param file File to open.
-
-    * @param openOverview If true image handler will attempt to open overview.
-    * Note that if you are planning on doing a rendered chain or want to go
-    * between res levels you should set this to true.  default = true
-    *
-    * @return true on success, false on error.
-    *
-    * @note This will close previous chain if one was opened.
-    */
-   bool open(const ossimFilename& file, bool openOverview=true);
-
-   /**
-    * @brief open method that takes an ossimSrcRecord.
-    *
-    * Opens file and creates a simple chain with ossimImageHandler.
-    *
-    * @return true on success, false on error.
-    *
-    * @note This will close previous chain if one was opened.
-    */
-   bool open(const ossimSrcRecord& src);
-   
-   /** @return true if image handler is opened. */
-   bool isOpen() const;
-
-   /** @brief close method to delete the image handler. */
-   void close();
-
-   /** @return The filename of the image. */
-   ossimFilename getFilename() const;
-
-   /**
-    * @brief Create a rendered image chain.
-    *
-    * Typical usage is to call this after "open" method returns true like:
-    * if ( myChain->open(myFile) == true )
-    * {
-    *    myChain->createRenderedChain();
-    *    code-goes-here();
-    * }
-    *
-    * Typical chain is:
-    * 
-    * 1) image handler
-    * 2) band selector (optional)
-    * 3) histogram remapper(optional)
-    * 4) scalar remapper (optional)
-    * 5) resampler cache
-    * 6) resampler
-    * 7) band selector (optional when going one band to three)
-    * 8) chain cache
-    *
-    * NOTES:
-    * 1) Cache on left hand side of resampler is critical to speed if you
-    *    have the ossimImageRender enabled.
-    *    
-    * 2) If doing a sequential write where tiles to the right of the
-    *    resampler will not be revisited the chain cache could be
-    *    disabled to save memory.
-    */
-   void createRenderedChain();
-
-   /**
-    * @brief Create a rendered image chain that takes an ossimSrcRecord.
-    */
-   void createRenderedChain(const ossimSrcRecord& src);
-
-   /**
-    * @brief Adds an image handler for file.
-    * 
-    * @param file File to open.
-    *
-    * @param openOverview If true image handler will attempt to open overview.
-    * Note that if you are planning on doing a rendered chain or want to go
-    * between res levels you should set this to true. default = true
-    *
-    * @return true on success, false on error.
-    */
-   bool addImageHandler(const ossimFilename& file,
-                        bool openOverview=true);
-
-   /**
-    * @brief Adds an image handler from src record.
-    *
-    * This take an ossimSrcRecord which can contain a supplemental directory
-    * to look for overviews.
-    * 
-    * @param rec Record to open.
-    * @return true on success, false on error.
-    */
-   bool addImageHandler(const ossimSrcRecord& src);
-   
-   /** @brief Adds a band selector to the end of the chain. */
-   void addBandSelector();
-
-   /**
-    * @brief Adds a band selector.
-    *
-    * This takes an ossimSrcRecord which can contain a band selection list.
-    * 
-    * @param src Record to initialize band selector from.
-    * 
-    */
-   void addBandSelector(const ossimSrcRecord& src);
-
-   /** @brief Adds histogram remapper to the chain. */
-   void addHistogramRemapper();
-
-   /**
-    * @brief Adds a band selector.
-    *
-    * This takes an ossimSrcRecord which can contain a histogram
-    * operation to be performed.
-    * 
-    * @param src Record to initialize band selector from.
-    */
-   void addHistogramRemapper(const ossimSrcRecord& src);
-
-   /**
-    * @brief Adds a new cache to the current end of the chain.
-    * @return Pointer to cache.
-    */
-   ossimRefPtr<ossimCacheTileSource> addCache();
-
-   /** @brief Adds a resampler to the end of the chain. */ 
-   void addResampler();
-
-   /**
-    * @brief Adds scalar remapper either to the left of the resampler cache
-    * or at the end of the chain if not present.
-    */
-   void addScalarRemapper();
-
-   /**
-    * @return ossimRefPtr containing the image handler.
-    * @note Can contain a null pointer so callers should validate.
-    */
-   ossimRefPtr<ossimImageHandler> getImageHandler() const;
-
-   /**
-    * @return ossimRefPtr containing the image handler.
-    * @note Can contain a null pointer so callers should validate.
-    */
-   ossimRefPtr<ossimImageHandler> getImageHandler();
-
-   /**
-    * @return ossimRefPtr containing  the band selector.
-    * @note Can contain a null pointer so callers should validate.
-    */
-   ossimRefPtr<ossimBandSelector> getBandSelector() const;
-
-   /**
-    * @return ossimRefPtr containing  the band selector.
-    * @note Can contain a null pointer so callers should validate.
-    */
-   ossimRefPtr<ossimBandSelector> getBandSelector();
-
-   /**
-    * @return ossimRefPtr containing the histogram remapper.
-    * @note Can contain a null pointer so callers should validate.
-    */
-   ossimRefPtr<ossimHistogramRemapper> getHistogramRemapper() const;
-
-   /**
-    * @return ossimRefPtr containing the histogram remapper.
-    * @note Can contain a null pointer so callers should validate.
-    */
-   ossimRefPtr<ossimHistogramRemapper> getHistogramRemapper();
-
-   /**
-    * @return  ossimRefPtr containing the resampler cache.
-    * @note Can contain a null pointer so callers should validate.
-    */
-   ossimRefPtr<ossimCacheTileSource> getResamplerCache() const;
-
-   /**
-    * @return  ossimRefPtr containing the resampler cache.
-    * @note Can contain a null pointer so callers should validate.
-    */
-   ossimRefPtr<ossimCacheTileSource> getResamplerCache();
-
-   /**
-    * @return ossimRefPtr containing the resampler.
-    * @note Can contain a null pointer so callers should validate.
-    */
-   ossimRefPtr<ossimImageRenderer> getImageRenderer() const;
-
-   /**
-    * @return ossimRefPtr containing the resampler.
-    * @note Can contain a null pointer so callers should validate.
-    */
-   ossimRefPtr<ossimImageRenderer> getImageRenderer();
-
-   /**
-    * @return ossimRefPtr containing the scalar remapper.
-    * @note Can contain a null pointer so callers should validate.
-    */
-   ossimRefPtr<ossimScalarRemapper> getScalarRemapper() const;
-
-   /**
-    * @return ossimRefPtr containing the scalar remapper.
-    * @note Can contain a null pointer so callers should validate.
-    */
-   ossimRefPtr<ossimScalarRemapper> getScalarRemapper();
-
-   /**
-    * @return ossimRefPtr containing the chain cache.
-    * @note Can contain a null pointer so callers should validate.
-    */
-   ossimRefPtr<ossimCacheTileSource> getChainCache() const;
-
-   /**
-    * @return ossimRefPtr containing the chain cache.
-    * @note Can contain a null pointer so callers should validate.
-    */
-   ossimRefPtr<ossimCacheTileSource> getChainCache();
-
-   /**
-    * @brief If flag is true a histogram will be added to the chain at create time.
-    * @param flag
-    */
-   void setAddHistogramFlag(bool flag);
-
-   /**
-    * @brief Gets the add histogram flag.
-    * @return true or false.
-    */
-   bool getAddHistogramFlag() const;
-
-   /**
-    * @brief If flag is true a resampler cache will be added to the chain at create time.
-    * This is a cache to the left of the resampler.
-    * @param flag
-    */
-   void setAddResamplerCacheFlag(bool flag);
-
-   /**
-    * @brief Gets the add resampler cache flag.
-    * @return true or false.
-    */
-   bool getAddResamplerCacheFlag() const;
-
-   /**
-    * @brief If flag is true a chain cache will be added to the chain at create time.
-    * This is a cache at the end of the chain.
-    * @param flag
-    */
-   void setAddChainCacheFlag(bool flag);
-
-   /**
-    * @brief Gets the add chain cache flag.
-    * @return true or false.
-    */
-   bool getAddChainCacheFlag() const;
-
-   /**
-    * @brief Sets remap to eigth bit flag.
-    * @param flag
-    */
-   void setRemapToEightBitFlag(bool flag);
-
-   /**
-    * @brief Get the remap to eight bit flag.
-    * @return true or false.
-    */
-   bool getRemapToEightBitFlag() const;
-   
-   /**
-    * @brief Sets the three band flag.
-    *
-    * If set will for a three band output.  So if one band it will duplicate
-    * so that rgb = b1,b1,b1.
-    * 
-    * @param flag
-    */
-   void setThreeBandFlag(bool flag);
-
-   /**
-    * @brief Get the three band flag.
-    * @return true or false.
-    */
-   bool getThreeBandFlag() const;
-   
-   /**
-    * @brief Sets the three band reverse flag.
-    *
-    * @param flag
-    */
-   void setThreeBandReverseFlag(bool flag);
-
-   /**
-    * @brief Get the three band reverse flag.
-    * @return true or false.
-    */
-   bool getThreeBandReverseFlag() const;
-
-   /**
-    * @brief Utility method to force 3 band output.
-    *
-    * Set band selector to a three band (rgb) output. If image has less than
-    * three bands it will set to rgb = b1,b1,b1.  If image has three or
-    * more bands the band selector will be see to rgb = b1, b2, b3.
-    *
-    * @note This will not work unless the image handler is initialized.
-    */
-   void setToThreeBands();
-   
-   /**
-    * @brief Utility method to set to 3 bandsand reverse them.  This is
-    * mainly used by NITF and Lndsat color data where the bands are in bgr
-    * format and you want it in rgb combination.  If image has less than
-    * three bands it will set to rgb = b1,b1,b1.  If image has three or
-    * more bands the band selector will be see to rgb = b3, b2, b1.
-    *
-    * @note This will not work unless the image handler is initialized.
-    */
-   void setToThreeBandsReverse();
-
-   /**
-    * @brief method to set band selector.
-    *
-    * This will set the band selection to bandList.  If a band selector is
-    * not in the chain yet it will be added.
-    *
-    * @param bandList The list of bands.
-    */
-   void setBandSelection(const std::vector<ossim_uint32>& bandList);
-
-   /**
-    * @brief Convenience method to return the scalar type of the image handler.
-    * 
-    * @return Scalar type of the image handler.
-    *
-    * This can return OSSIM_SCALAR_UNKNOWN if the image handler has not been
-    * set yet.  Also, this is NOT the same as calling getOutputScalarType
-    * which could have a different scalar type than the image if the
-    * m_remapToEightBitFlag has been set.
-    */
-   ossimScalarType getImageHandlerScalarType() const;
-
-   /**
-    * @brief Convenience method to open the histogram and apply a default
-    * stretch.
-    *
-    * This will only work if the image is open, there is a histogram remapper
-    * in the chain, and there was a histogram created.
-    * 
-    * Valid stretches (from ossimHistogramRemapper.h):
-    *
-    @verbatim
-      ossimHistogramRemapper::LINEAR_ONE_PIECE
-      ossimHistogramRemapper::LINEAR_1STD_FROM_MEAN
-      ossimHistogramRemapper::LINEAR_2STD_FROM_MEAN
-      ossimHistogramRemapper::LINEAR_3STD_FROM_MEAN
-      ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX
-    @endverbatim
-    *
-    * @return true on success, false on error.
-    */
-   bool openHistogram( ossimHistogramRemapper::StretchMode mode );
-
-private:
-
-   /**  Pointers to links in chain. */
-   ossimRefPtr<ossimImageHandler>      m_handler;
-   ossimRefPtr<ossimBandSelector>      m_bandSelector;
-   ossimRefPtr<ossimHistogramRemapper> m_histogramRemapper;
-   ossimRefPtr<ossimCacheTileSource>   m_resamplerCache;
-   ossimRefPtr<ossimImageRenderer>     m_resampler;
-   ossimRefPtr<ossimScalarRemapper>    m_scalarRemapper;
-   ossimRefPtr<ossimCacheTileSource>   m_chainCache;
-
-   /** control flags */
-   bool m_addHistogramFlag;
-   bool m_addResamplerCacheFlag;
-   bool m_addChainCacheFlag;
-   bool m_remapToEightBitFlag;
-   bool m_threeBandFlag;
-   bool m_threeBandReverseFlag;
-
-};
-
-#endif /* #ifndef ossimSingleImageChain_HEADER */
diff --git a/include/ossim/imaging/ossimSrtmTileSource.h b/include/ossim/imaging/ossimSrtmTileSource.h
deleted file mode 100644
index 7ddde03..0000000
--- a/include/ossim/imaging/ossimSrtmTileSource.h
+++ /dev/null
@@ -1,74 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (c) 2005, David Burken, all rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-// 
-// Image handler class for a Shuttle Radar Topography Mission (SRTM) file.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimSrtmTileSource.h 17932 2010-08-19 20:34:35Z dburken $
-#ifndef ossimSrtmTileSource_HEADER
-#define ossimSrtmTileSource_HEADER
-
-#include <ossim/imaging/ossimGeneralRasterTileSource.h>
-#include <ossim/support_data/ossimSrtmSupportData.h>
-
-
-class OSSIMDLLEXPORT ossimSrtmTileSource : public ossimGeneralRasterTileSource
-{
-public:
-   ossimSrtmTileSource();
-
-   virtual ossimString getShortName() const;
-   virtual ossimString getLongName()  const;
-
-   virtual bool open();
-
-   //! Returns the image geometry object associated with this tile source or NULL if not defined.
-   //! The geometry contains full-to-local image transform as well as projection (image-to-world)
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-
-   /**
-    * Method to save the state of an object to a keyword list.
-    * @return true on success, false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.
-    *
-    * @return true on success, false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix = NULL);
-
-   /**
-    * @brief Gets a property.
-    * @param The name of the property to get.
-    * @return The property if found.
-    */
-   virtual ossimRefPtr<ossimProperty> getProperty(
-      const ossimString& name)const;
-
-   /**
-    * @brief Adds property names to array.
-    * @param propertyNames Array to populate with property names.
-    */
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-protected:
-   virtual ~ossimSrtmTileSource();
-   ossimSrtmSupportData m_SrtmSupportData;
-   
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimSubImageTileSource.h b/include/ossim/imaging/ossimSubImageTileSource.h
deleted file mode 100644
index 152a06a..0000000
--- a/include/ossim/imaging/ossimSubImageTileSource.h
+++ /dev/null
@@ -1,90 +0,0 @@
-//*****************************************************************************
-// FILE: ossimSubImageTileSource.h
-//
-// Copyright (C) 2001 ImageLinks, Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Contains declaration of class ossimSubImageTileSource.
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimSubImageTileSource.h 22233 2013-04-15 15:12:54Z gpotts $
-
-#ifndef ossimSubImageTileSource_HEADER
-#define ossimSubImageTileSource_HEADER
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-/*!****************************************************************************
- *
- *  CLASS: ossimSubImageTileSource
- *
- *  This tile source permits specifying an offset that is to be applied to the
- *  tile origin for all getTile() requests. It is intended for converting
- *  a full-image space coordinate to a sub-image coordinate.
- *
- *****************************************************************************/
-class OSSIM_DLL ossimSubImageTileSource : public ossimImageSourceFilter
-{
-public:
-   /*!
-    * Default constructor initializes the sub-image offset to zero.
-    */
-   ossimSubImageTileSource();
-
-   /*!
-    * Constructor accepts an input source pointer. Offset is defaulted to (0,0).
-    */
-   ossimSubImageTileSource(ossimImageSource* inputSource);
-
-   /*!
-    * Constructs with specified input source and offset.
-    */
-   ossimSubImageTileSource(ossimImageSource* inputSource,
-                           const ossimIpt&   offset);
-
-   /*!
-    * Permits setting the image's offset relative to the full image space.
-    */
-   void setSubImageOffset(const ossimIpt& offset) { theSubImageOffset=offset; }
-
-   ossimIpt getSubImageOffset()const{ return theSubImageOffset;}
- 
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
-                                               ossim_uint32  rr_level=0);
-
-   /*!
-    * Fetches the sub-image's bounding rect in FULL-IMAGE SPACE.
-    */
-   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const;
-   
-   /*!
-    * Fetches the sub-image's valid image vertices in FULL-IMAGE SPACE.
-    */
-   virtual void getValidImageVertices(vector<ossimIpt>& validVertices,
-                                      ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER,
-                                      ossim_uint32 resLevel=0)const;
-
-   virtual void initialize();
-   
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-private:
-   virtual ~ossimSubImageTileSource();
-   
-   ossimIpt                    theSubImageOffset;
-   ossimRefPtr<ossimImageData> theTile;
-   TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimTableRemapper.h b/include/ossim/imaging/ossimTableRemapper.h
deleted file mode 100644
index 52fa1f7..0000000
--- a/include/ossim/imaging/ossimTableRemapper.h
+++ /dev/null
@@ -1,141 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author:  David Burken
-//
-// Description:
-//
-// Table remapper class declaration.
-// 
-// Takes input tile, remaps it through a table, then output tile in the desired
-// scalar type.
-//
-// Two modes one that works on native remap tables, that being of the same
-// scalar type (like ossim_uint8) of the input connection, and another that
-// uses a normalized remap table (more scalar independent).
-//
-//*************************************************************************
-// $Id: ossimTableRemapper.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimTableRemapper_HEADER
-#define ossimTableRemapper_HEADER
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-class OSSIMDLLEXPORT ossimTableRemapper : public ossimImageSourceFilter
-{
-public:
-   enum RemapTableType
-   {
-      UKNOWN     = 0,
-      NATIVE     = 1,
-      NORMALIZED = 2
-   };
-
-   /** default constructor */
-   ossimTableRemapper();
-
-   virtual ossimScalarType getOutputScalarType() const;
-    
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect,
-                                               ossim_uint32 resLevel=0);
-
-   virtual void initialize();
-
-
-
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-   
-   virtual ostream& print(ostream& os) const;
-
-   friend ostream& operator << (ostream& os,  const ossimTableRemapper& tr);
-
-protected:
-   /** virtual destructor */
-   virtual ~ossimTableRemapper();
-
-   /**
-    * Method:  setTable
-    * 
-    * @param table      - ossim_uint8* to the table
-    * @param bin_count  - number of bins in the table per band
-    * @param band_count - number of bands in the table
-    * @param table_type - Either ossimTableRemapper::NATIVE or
-    *                     ossimTableRemapper::NORMALIZED  
-    * @param own_table  - If true "this" object will destroy table on
-    *                     destruction. (default == true)
-    *
-    * Note on table:
-    * - It's alway passed in as an "ossim_uint8*" so that on destruction there
-    *   are no complaints.  You can do the math, if your table is really of
-    *   double data type it's:
-    *   "new ossim_uint8[bin_count * band_count * sizeof(double)]"...
-    * - For each band in the table:
-    *   - Table index[0] should always be the null value.
-    *   - Table index[1] should always be the min value.
-    * 
-    * Note on band_count:
-    * - If the "band_count == 1", and the input source has more than one band,
-    *   this implies that the same remap table will be used for all bands.
-    *
-    * Notes on RemapTableType:
-    * - If you want speed, use NATIVE, in which case the remap table scalar
-    *   type should match input source.
-    * - If you want to be able to handle any scalar type with one table, use
-    *   NORMALIZED, in which case, your table values should be
-    *   between 0.0 and 1.0.
-    *
-    * Note on own_table flag:
-    * - If (own_table == true) this object will delete table on destruction.
-    * - If you want to use one table to remap many image chains you might
-    *   build the table and manage the memory yourself; in which case, you
-    *   would set the own_table false; else it will be de
-    */
-   virtual void setTable(const std::vector<ossim_uint8>&    table,
-                         ossim_uint32    table_bin_count,
-                         ossim_uint32    table_band_count,
-                         RemapTableType  table_type,
-                         ossimScalarType output_scalar_type);
-
-   
-   ossimRefPtr<ossimImageData> theTile;
-   ossimRefPtr<ossimImageData> theTmpTile;
-   std::vector<ossim_uint8>    theTable;
-   ossim_float64*  theNormBuf;
-   ossim_uint32    theTableBinCount;
-   ossim_uint32    theTableBandCount;
-   RemapTableType  theTableType;
-   ossimScalarType theInputScalarType;
-   ossimScalarType theOutputScalarType;
-   
-   
-   void allocate(const ossimIrect& rect);
-   void destroy();
-
-   void remapFromNativeTable(ossimRefPtr<ossimImageData>& inputTile);
-
-   template <class T> void remapFromNativeTable(
-      T dummy,
-      ossimRefPtr<ossimImageData>& inputTile);
-
-   void remapFromNormalizedTable(ossimRefPtr<ossimImageData>& inputTile);
-
-   template <class T> void dumpTable(T dummy, ostream& os) const;
-
-   // Do not allow copy constructor, operator=.
-   ossimTableRemapper(const ossimTableRemapper& tr);
-   ossimTableRemapper& operator=(const ossimTableRemapper& tr);
-   
-   TYPE_DATA
-};
-
-#endif  /* #ifndef ossimTableRemapper_HEADER */
diff --git a/include/ossim/imaging/ossimTiffOverviewBuilder.h b/include/ossim/imaging/ossimTiffOverviewBuilder.h
deleted file mode 100644
index fa81b86..0000000
--- a/include/ossim/imaging/ossimTiffOverviewBuilder.h
+++ /dev/null
@@ -1,303 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Contains class declaration for TiffOverviewBuilder.
-//
-//*******************************************************************
-//  $Id: ossimTiffOverviewBuilder.h 22232 2013-04-13 20:06:19Z dburken $
-
-#ifndef ossimTiffOverviewBuilder_HEADER
-#define ossimTiffOverviewBuilder_HEADER
-
-#include <vector>
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimFilename.h>
-
-#include <ossim/imaging/ossimOverviewBuilderBase.h>
-#include <ossim/imaging/ossimFilterResampler.h>
-
-#include <tiffio.h>
-
-class ossimConnectableObject;
-class ossimFilename;
-class ossimImageGeometry;
-
-class OSSIM_DLL ossimTiffOverviewBuilder
-   :
-      public ossimOverviewBuilderBase
-{
-public:
-
-   enum
-   {
-      DEFAULT_COMPRESS_QUALITY=75
-   };
-
-   /** default constructor */
-   ossimTiffOverviewBuilder();
-   
-   /** virtual destructor */
-   virtual ~ossimTiffOverviewBuilder();
-
-   /**
-    * Supports BOX or NEAREST NEIGHBOR.  When indexed you should probably use nearest neighbor
-    */ 
-   void setResampleType(ossimFilterResampler::ossimFilterResamplerType resampleType);
-   
-   /**
-    *  Builds overview file and sets "theOutputFile" to that of
-    *  the overview_file.
-    *
-    *  @param overview_file The overview file name to output.
-    *
-    *  @param copy_all  If set to true the entire image will be
-    *  copied.  This can be used to convert an image to a tiled tif.
-    *  
-    *  @return trueon success, false on error.
-    */
-   bool buildOverview(const ossimFilename& overview_file,
-                      bool copy_all=false);
-
-   /**
-    * Calls buildOverview.  This method uses "theOutputFile" for the file
-    * name.
-    *
-    * If the copy_all flag is set the entire image will be copied.  This can
-    * be used to convert an image to a tiled tif.
-    *
-    * @return true on success, false on error.
-    *
-    * @note If setOutputFile was not called the output name will be derived
-    * from the image name.  If image was "foo.tif" the overview file will
-    * be "foo.ovr".
-    */
-   virtual bool execute();
-
-   /**
-    *  Sets the compression type to use when building overviews.
-    *  
-    *  @param compression_type Current supported types:
-    * - COMPRESSION_JPEG
-    * - COMPRESSION_LZW
-    * - COMPRESSION_DEFLATE
-    * - COMPRESSION_PACKBITS
-    * - COMPRESSION_NONE (default)
-    */
-   void setCompressionType(ossim_uint16 compression_type);
-
-   /**
-    *  Sets the compression quality for use when using a compression type
-    *  of COMPRESSION_JPEG.
-    *
-    *  @param quality Range 1 to 100 with 100 being best quality.
-    */
-   void setJpegCompressionQuality(ossim_int32 quality);
-
-   /**
-    * @brief Method to return copy all flag.
-    * @return The copy all flag.  If true all data will be written to the
-    * overview including R0.
-    */
-   bool getCopyAllFlag() const;
-
-   /**
-    * @brief Sets internal overviews flag.
-    * @param flag If true, and input source is tiff format, overviews will be
-    * built internally.
-    */
-   void setInternalOverviewsFlag(bool flag);
-
-   /** @return The intenal overview flag. */
-   bool getInternalOverviewsFlag() const;
-
-   /**
-    * @brief Sets theCopyAllFlag.
-    * @param flag The flag. If true all data will be written to the
-    * overview including R0.
-    */
-   void setCopyAllFlag(bool flag);
-
-   /** @return ossimObject* to this object. */
-   virtual ossimObject* getObject();
-
-   /**
-    * @return const ossimObject* to this object.
-    */
-   virtual const ossimObject* getObject() const;
-
-   /**
-    * @return true if input is an image handler.
-    */
-   virtual bool canConnectMyInputTo(ossim_int32 index,
-                                    const ossimConnectableObject* obj) const;
-
-   /**
-    * @brief Sets the input to the builder. Satisfies pure virtual from
-    * ossimOverviewBuilderBase.
-    *
-    * @param imageSource The input to the builder.
-    *
-    * @return True on successful initializion, false on error.
-    */
-   virtual bool setInputSource(ossimImageHandler* imageSource);
-   
-   /**
-    * @brief Sets the output filename.
-    * Satisfies pure virtual from ossimOverviewBuilderBase.
-    * @param file The output file name.
-    */
-   virtual void  setOutputFile(const ossimFilename& file);
-
-   /**
-    * @brief Gets the output file name. (pure virtual)
-    *
-    * @return The output file name or ossimFilename::NIL if it was not set
-    * yet and the image handle has not been initialized.
-    *
-    * @note This is non-const as a call to this may force initialization of
-    * overview builder output file name if the it was not set already.
-    *
-    * @note This will return ossimFilename::NIL unless one of was called,
-    * setInputSource or setOutputFile.
-    */
-   virtual ossimFilename getOutputFile() const;
-
-   void setOutputTileSize(const ossimIpt& tileSize);
-
-   /**
-    * @brief Sets the overview output type.
-    *
-    * Satisfies pure virtual from ossimOverviewBuilderBase.
-    * 
-    * Currently handled types are:
-    * "ossim_tiff_nearest" and "ossim_tiff_box"
-    *
-    * @param type This should be the string representing the type.  This method
-    * will do nothing if type is not handled and return false.
-    *
-    * @return true if type is handled, false if not.
-    */
-   virtual bool setOverviewType(const ossimString& type);
-
-   /**
-    * @brief Gets the overview type.
-    * Satisfies pure virtual from ossimOverviewBuilderBase.
-    * @return The overview output type as a string.
-    */
-   virtual ossimString getOverviewType() const;
-
-   /**
-    * @brief Method to populate class supported types.
-    * Satisfies pure virtual from ossimOverviewBuilderBase.
-    * @param typeList List of ossimStrings to add to.
-    */
-   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
-
-   /**
-    * @brief Method to set properties.
-    * @param property Property to set.
-    *
-    * @note Currently supported property:
-    * name=levels, value should be list of levels separated by a comma with
-    * no spaces. Example: "2,4,8,16,32,64"
-    */
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-
-   /**
-    * @brief Method to populate the list of property names.
-    * @param propertyNames List to populate.  This does not clear the list
-    * just adds to it.
-    */
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-  
-private:
-
-   /**
-    *  Copy the full resolution image data to the output tif image.
-    */
-  bool writeR0(TIFF* tif);
-
-   /**
-    *  Write reduced resolution data set to the tif file.
-    *
-    *  @param firstRestLevel used to tell method that if a histogram is needed, do it on
-    *  that res level.
-    */
-   bool writeRn(ossimImageHandler* imageHandler,
-                TIFF* tif,
-                ossim_uint32 resLevel,
-                bool firstResLevel);
-   
-   /**
-    *  Set the tiff tags for the appropriate resLevel.  Level zero is the
-    *  full resolution image.
-    *
-    *  @param tif Pointer to the tif file.
-    *  @param outputRect The dimensions (zero based) of res set.
-    *  @param rrds_level The current reduced res level.
-    */
-   bool setTags(TIFF* tif,
-                const ossimIrect& outputRect,
-                ossim_int32 resLevel) const;
-
-   /**
-    *  Writes geotiff tags.
-    *  @param geom
-    *  @param boundingRect
-    *  @param resLevel Zero base, 0 being full res.
-    *  @param tif
-    *  @return true on success, false on error.
-    */
-   bool setGeotiffTags(const ossimImageGeometry* geom,
-                       const ossimDrect& boundingRect,
-                       ossim_uint32 resLevel,
-                       TIFF* tif);
-
-   TIFF* openTiff( const ossimString& filename ) const;
-
-   void closeTiff(TIFF* tif);
-
-   /**
-    * @returns true if m_internalOverviewsFlag and input image supports
-    * building internal overviews.  Currently only tiff reader.
-    */
-   bool buildInternalOverviews() const;
-
-   /**
-    * @return true if m_copyAllFlag is set and build internal overviews is not
-    * set.
-    */
-   bool copyR0() const;
-
-   // Disallow these...
-   ossimTiffOverviewBuilder(const ossimTiffOverviewBuilder& source);
-   ossimTiffOverviewBuilder& operator=(const ossimTiffOverviewBuilder& rhs); 
-
-   std::vector<ossim_uint8>                           m_nullDataBuffer;
-   ossim_int32                                        m_bytesPerPixel;
-   ossim_int32                                        m_bitsPerSample;
-   ossim_int32                                        m_tileWidth;
-   ossim_int32                                        m_tileHeight;
-   ossim_int32                                        m_tileSizeInBytes;
-   ossim_int32                                        m_sampleFormat;
-   ossim_int32                                        m_currentTiffDir;
-   ossim_uint16                                       m_tiffCompressType;
-   ossim_int32                                        m_jpegCompressQuality;
-   ossimFilterResampler::ossimFilterResamplerType     m_resampleType;
-   std::vector<double>                                m_nullPixelValues;
-   bool                                               m_copyAllFlag;
-   bool                                               m_outputTileSizeSetFlag;
-   bool                                               m_internalOverviewsFlag;
-
-TYPE_DATA   
-};
-   
-#endif
diff --git a/include/ossim/imaging/ossimTiffTileSource.h b/include/ossim/imaging/ossimTiffTileSource.h
deleted file mode 100644
index 7eee5fd..0000000
--- a/include/ossim/imaging/ossimTiffTileSource.h
+++ /dev/null
@@ -1,364 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//          Frank Warmerdam (warmerdam at pobox.com)
-//
-// Description:
-//
-// Contains class declaration for ossimTiffTileSource.
-// ossimTiffTileSource  is derived from ImageHandler which is derived from
-// TileSource.
-//*******************************************************************
-//  $Id: ossimTiffTileSource.h 22243 2013-04-20 15:27:22Z dburken $
-
-#ifndef ossimTiffTileSource_HEADER
-#define ossimTiffTileSource_HEADER 1
-
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/base/ossimIrect.h>
-#include <tiffio.h>
-#include <vector>
-
-class ossimImageData;
-class ossimTiffOverviewTileSource;
-
-class OSSIMDLLEXPORT ossimTiffTileSource : public ossimImageHandler
-{
-public:
-
-   enum ReadMethod
-   {
-      UNKNOWN,
-      READ_RGBA_U8_TILE,
-      READ_RGBA_U8_STRIP,
-      READ_RGBA_U8A_STRIP,
-      READ_SCAN_LINE,
-      READ_TILE,
-      READ_U16_STRIP
-   };
-
-   ossimTiffTileSource();
-
-   virtual ossimString getLongName()  const;
-   virtual ossimString getShortName() const;
-
-   /**
-    *  Returns true if the image_file can be opened and is a valid tiff file.
-    */
-   virtual bool open(const ossimFilename& image_file);
-   virtual void close();
-   
-   /**
-    *  Returns a pointer to a tile given an origin representing the upper left
-    *  corner of the tile to grab from the image.
-    *  Satisfies pure virtual from TileSource class.
-    */
-   virtual ossimRefPtr<ossimImageData> getTile(const  ossimIrect& rect,
-                                               ossim_uint32 resLevel=0);
-   
-   /**
-    * Method to get a tile.   
-    *
-    * @param result The tile to stuff.  Note The requested rectangle in full
-    * image space and bands should be set in the result tile prior to
-    * passing.  It will be an error if:
-    * result.getNumberOfBands() != this->getNumberOfOutputBands()
-    *
-    * @return true on success false on error.  If return is false, result
-    *  is undefined so caller should handle appropriately with makeBlank or
-    * whatever.
-    */
-   virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);
-   
-   /**
-    *  Returns the number of bands in the image.
-    *  Satisfies pure virtual from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfInputBands() const;
-   virtual ossim_uint32 getNumberOfOutputBands () const;
-
-   /**
-    * @brief Indicates whether or not the image handler can control output
-    * band selection via the setOutputBandList method.
-    *
-    * Overrides: ossimImageHandler::isBandSelector
-    *
-    * @return true
-    */
-   virtual bool isBandSelector() const;
-
-   /**
-    * @brief If the image handler "isBandSeletor()" then the band selection
-    * of the output chip can be controlled.
-    *
-    * Overrides: ossimImageHandler::setOutputBandList
-    * 
-    * @return true on success, false on error.
-    */
-   virtual bool setOutputBandList(const std::vector<ossim_uint32>& band_list);
-
-   /** @brief Initializes bandList to the zero based order of output bands. */
-   virtual void getOutputBandList(std::vector<ossim_uint32>& bandList) const;
-   
-   /**
-    *  Returns the number of lines in the image.
-    *  Satisfies pure virtual from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel = 0) const;
-   
-   /**
-    *  Returns the number of samples in the image.
-    *  Satisfies pure virtual from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel = 0) const;
-
-   /**
-    *  Returns the number of image file directories in the tiff image.
-    */
-   virtual ossim_uint32 getNumberOfDirectories() const;
-   
-   /**
-    * Returns the number of reduced resolution data sets (rrds).
-    * Notes:
-    *
-    * - The full res image is counted as a data set so an image with no
-    *   reduced resolution data set will have a count of one.
-    * - This method counts R0 as a res set even if it does not have one.
-    *   This was done deliberately so as to not screw up code down the
-    *   line.
-    */
-   virtual ossim_uint32 getNumberOfDecimationLevels() const;
-   
-   /**
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-   
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   virtual bool isOpen()const;
-
-   /**
-    * Returns the output pixel type of the tile source.
-    */
-   virtual ossimScalarType getOutputScalarType() const;
-
-   /**
-    * Returns the width of the output tile.
-    */
-   virtual ossim_uint32 getTileWidth() const;
-   
-   /**
-    * Returns the height of the output tile.
-    */
-   virtual ossim_uint32 getTileHeight() const;
-
-   /**
-    *  Returns true if the first directory of the tiff image did not have
-    *  the reduced resolution file type set.
-    */
-   bool hasR0() const;
-  
-   virtual ossim_float64 getMinPixelValue(ossim_uint32 band=0)const;
-   virtual ossim_float64 getMaxPixelValue(ossim_uint32 band=0)const;
-   virtual ossim_float64 getNullPixelValue(ossim_uint32 band=0)const;
-   
-   virtual bool isValidRLevel(ossim_uint32 resLevel) const;
-
-   /**
-    * @return The tile width of the image or 0 if the image is not tiled.
-    * Note: this is not the same as the ossimImageSource::getTileWidth which
-    * returns the output tile width, which can be different than the
-    * internal image tile width on disk.
-    */
-   virtual ossim_uint32 getImageTileWidth() const;
-
-   /**
-    * @return The tile width of the image or 0 if the image is not tiled.
-    * Note: this is not the same as the ossimImageSource::getTileHeight which
-    * returns the output tile width which can be different than the internal
-    * image tile width on disk.
-    */
-   virtual ossim_uint32 getImageTileHeight() const;
-
-   void setApplyColorPaletteFlag(bool flag);
-   bool getApplyColorPaletteFlag()const;
-
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   bool isColorMapped() const;
-   
-   virtual std::ostream& print(std::ostream& os) const;
-
-   TIFF* tiffPtr()
-   {
-      return theTiffPtr;
-   }
-#if 0
-   /**
-    * @brief Method to get the image geometry object associated with this
-    * image.
-    *
-    * The geometry contains full-to-local image transform as well as
-    * projection (image-to-world).
-    *
-    * @return ossimImageGeometry* or null if not defined.
-    */
-   virtual ossimImageGeometry* getImageGeometry();
-#endif   
-protected:
-   virtual ~ossimTiffTileSource();
-   /**
-    *  Returns true if no errors initializing object.
-    *
-    *  Notes:
-    *  - Callers of this method must ensure "theTiffPtr" data member
-    *    is initialized.
-    *  - This method was added to consolidate object initialization code
-    *    between constructor and public open method.
-    */
-   bool open();
-
-   // Must be protected for derived ossimTerraSarTiffReader.
-   TIFF* theTiffPtr; 
-   
-private:
-
-   /**
-    *  Adjust point to even tile boundary.  Assumes 0,0 origin.
-    *  Shifts in the upper left direction.
-    */
-   void adjustToStartOfTile(ossimIpt& pt) const;
-
-   /**
-    *  If the tiff source has R0 then this returns the current tiff directory
-    *  that the tiff pointer is pointing to; else, it returns the current
-    *  directory + 1.
-    */
-   ossim_uint32 getCurrentTiffRLevel() const;
-   
-   ossimString getReadMethod(ossim_uint32 directory) const;
-   
-   bool loadTile(const ossimIrect& tile_rect,
-                 const ossimIrect& clip_rect,
-                 ossimImageData* result);
-   
-   bool loadFromRgbaU8Tile(const ossimIrect& tile_rect,
-                           const ossimIrect& clip_rect,
-                           ossimImageData* result);
-   
-   bool loadFromRgbaU8Strip(const ossimIrect& tile_rect,
-                            const ossimIrect& clip_rect,
-                            ossimImageData* result);
-   
-   bool loadFromRgbaU8aStrip(const ossimIrect& tile_rect,
-                             const ossimIrect& clip_rect,
-                             ossimImageData* result);
-
-   bool loadFromU16Strip(const ossimIrect& clip_rect,
-                         ossimImageData* result);
-   
-   bool loadFromScanLine(const ossimIrect& clip_rect,
-                         ossimImageData* result);
-
-   bool loadFromTile(const ossimIrect& clip_rect,
-                     ossimImageData* result);
-   
-   void setReadMethod();
-   
-   /**
-    * Change tiff directory and sets theCurrentDirectory.
-    *
-    * @return true on success, false on error.
-    */
-   bool setTiffDirectory(ossim_uint16 directory);
-
-   void populateLut();
-
-   /**
-    * @brief validateMinMaxNull Checks min, max and null to make sure they are not equal
-    * to the scalar type nan or double nan; sets to default min max if so.
-    */
-   void validateMinMaxNull();
-
-   /**
-    * @brief Checks line/samples of level for power of two decimation from the
-    * previous rlevel.
-    *
-    * Used to weed out thumbnail directories being used as a reduced
-    * resolution layer.
-    *
-    * Note this shuts off the thumbnail which someone may
-    * want to see.  We could make this a reader prop if it becomes an issue.
-    * drb - 09 Jan. 2012.
-    *
-    * @param dir The tiff directory index.
-    * 
-    * @return true is so; else, false.  If level is zero returns false.
-    */
-   bool isPowerOfTwoDecimation(ossim_uint32 dir) const;
-
-   /** @brief Allocates theTile. */
-   void allocateTile();
-
-   /**
-    * @brief Allocates theBuffer
-    * @return true on success; false, on error.
-    */
-   bool allocateBuffer();  
-   
-   ossimRefPtr<ossimImageData> theTile;
-   
-   ossim_uint8*         theBuffer;
-   ossim_uint32         theBufferSize;
-   ossimIrect           theBufferRect;
-   ossim_uint32         theBufferRLevel;
-   ossim_uint32         theCurrentTileWidth;
-   ossim_uint32         theCurrentTileHeight;
-
-   ossim_uint16         theSamplesPerPixel;
-   ossim_uint16         theBitsPerSample;
-   ossim_uint16         theSampleFormatUnit;
-
-   ossim_float64        theMaxSampleValue;
-   ossim_float64        theMinSampleValue;
-   ossim_float64        theNullSampleValue;
-
-   ossim_uint16         theNumberOfDirectories;
-   ossim_uint16         theCurrentDirectory;
-   bool                 theR0isFullRes;
-   ossim_uint32         theBytesPerPixel;
-   ossimScalarType      theScalarType;
-   bool                 theApplyColorPaletteFlag;
-
-   // Things we need from each directory as they can be different.
-   std::vector<ossim_uint32> theImageWidth;
-   std::vector<ossim_uint32> theImageLength;
-   std::vector<ReadMethod>   theReadMethod;
-   std::vector<ossim_uint16> thePlanarConfig;
-   std::vector<ossim_uint16> thePhotometric;
-   std::vector<ossim_uint32> theRowsPerStrip;
-   std::vector<ossim_uint32> theImageTileWidth;
-   std::vector<ossim_uint32> theImageTileLength;
-   std::vector<ossim_uint32> theImageDirectoryList;
-   
-   ossim_uint32              theCurrentTiffRlevel;
-   ossim_int32               theCompressionType;
-   std::vector<ossim_uint32> theOutputBandList;
-   
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimTiffTileSource_HEADER */
diff --git a/include/ossim/imaging/ossimTileCache.h b/include/ossim/imaging/ossimTileCache.h
deleted file mode 100644
index e6f1c64..0000000
--- a/include/ossim/imaging/ossimTileCache.h
+++ /dev/null
@@ -1,105 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// License:  See top level LICENSE.txt file.
-// 
-// Author: Garrett Potts
-// Description: This file contains the cache algorithm
-//
-//***********************************
-// $Id: ossimTileCache.h 17207 2010-04-25 23:21:14Z dburken $
-
-#ifndef DataCache_HEADER
-#define DataCache_HEADER
-#include <map>
-#include <stack>
-using namespace std;
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimDpt3d.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimDataObject.h>
-class OSSIM_DLL ossimTileCache
-{
-public:
-   
-   ossimTileCache(long numberOfBuckets  = 10);
-   virtual ~ossimTileCache();
-
-   /*!
-    * This will return a tile if found.  Note this tile is still
-    * owned by the cache.
-    */
-   virtual ossimDataObject* get(const ossimDpt3d &origin,
-                               unsigned long resLevel=0);
-
-   /*!
-    * Will remove the tile from the cache and will not delete.  Note:
-    * the cache no longer owns the tile.
-    */
-   virtual ossimDataObject* remove(const ossimDpt3d &origin,
-                                  unsigned long resLevel=0);
-   /*!
-    * This will not duplicate the tile.  Note the tile is owned
-    * by the cache.
-    */
-   virtual ossimDataObject* insert(const ossimDpt3d &origin,
-                                  ossimDataObject* data,
-                                  unsigned long resLevel=0);
-   /*!
-    * Not implemented
-    */
-   void invalidate();
-   /*!
-    * Not implemented
-    */
-   virtual void invalidate(const ossimDpt3d &origin,
-                           ossim_uint32 resLevel);
-
-
-   
-   virtual long numberOfItems()const{return theCache?(long)theCache->size():(long)0;}
-   virtual void display()const;
-
-   virtual ossim_uint32 sizeInBytes(){return theSizeInBytes;}
-   
-protected:
-
-   struct ossimTileInformation
-   {
-   public:
-      friend ostream& operator <<(ostream &out,
-                                  const ossimTileInformation& /* info */)
-         {
-
-            return out;
-         }
-      ossimTileInformation(ossimDataObject* aTile,
-                           const ossimDpt3d &origin = ossimDpt(0,0),
-                           unsigned long resLevel = 0)
-         : theCachedTile(aTile),
-           theOrigin(origin),
-           theResLevel(resLevel)
-         {}
-      ossimRefPtr<ossimDataObject>    theCachedTile;
-      ossimDpt3d         theOrigin;
-      unsigned long      theResLevel;
-   };
-
-   typedef multimap<ossim_uint32, ossimTileInformation*>::iterator Iterator;
-   typedef ossimTileInformation* CacheDataPtr;
-   typedef ossimTileInformation  CacheData;
-   
-   void deleteAll();
-   virtual ossim_uint32 bucketHash(const ossimDpt3d &aPt);
-   virtual ossim_uint32 tileId(const ossimDpt3d &aPt);
-   
-   multimap<ossim_uint32, ossimTileInformation*>  *theCache;
-   long                                            theNumberOfBuckets;
-   ossim_uint32                                    theSizeInBytes;
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimTilePatch.h b/include/ossim/imaging/ossimTilePatch.h
deleted file mode 100644
index 4f6203e..0000000
--- a/include/ossim/imaging/ossimTilePatch.h
+++ /dev/null
@@ -1,136 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimTilePatch.h 15766 2009-10-20 12:37:09Z gpotts $
-
-#ifndef ossimTilePatch_HEADER
-#define ossimTilePatch_HEADER
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/imaging/ossimDiscreteNearestNeighbor.h>
-#include <ossim/imaging/ossimImageData.h>
-
-class ossimImageSource;
-
-class ossimTilePatch : public ossimObject
-{
-public:
-   ossimTilePatch(ossimImageSource* input);
-   /*!
-    * The rect is assumed up right and all we need
-    * to do is compute the even tile boundary rect
-    */
-   ossimTilePatch(ossimScalarType scalarType = OSSIM_UCHAR,
-                  long numberOfComponents = 1,
-                  long width=128,
-                  long height=128);
-   
-   /*!
-    * return the tile boundary aligned rectangle for this
-    * patch.
-    */
-   virtual ossimIrect getRect()const;
-
-   /*!
-    * The padding is for any convolution that must take
-    * place.  
-    */
-   virtual void setRect(const ossimDpt &p1,
-                        const ossimDpt &p2,
-                        const ossimDpt &p3,
-                        const ossimDpt &p4,
-                        const ossimDpt &tile_size,
-                        const ossimDpt &padding=ossimDpt(0,0));
-
-   virtual void setRect(const ossimDrect &aRect,
-                        const ossimDpt &tile_size,
-                        const ossimDpt &padding=ossimDpt(0,0));
-
-   virtual void setRect(const ossimDpt &center_of_rect,
-                        const ossimDpt &rect_size,
-                        const ossimDpt &tile_size,
-                        const ossimDpt &padding=ossimDpt(0,0));
-
-   /*!
-    * This will fill the tile from the tile patch.
-    */
-   virtual void fillTile(ossimRefPtr<ossimImageData>& aTile)const;
-
-   /*!
-    * This will fill the tile from the tile patch and apply the convolution
-    * kernel.  This is optimized for upright rectangles.  Use the bilinear
-    * fill tile bellow for arbitrary 4-sided polygons.
-    */
-   virtual void fillTile(ossimRefPtr<ossimImageData>& result,
-                         ossimDiscreteConvolutionKernel* kernel)const;
-
-   /*!
-    * We will assume that the patch is already
-    * big enough to satisfy the kernel size.
-    */
-   virtual void fillTile(ossimRefPtr<ossimImageData>& result,
-                         const ossimDpt   &ul,
-                         const ossimDpt   &ur,
-                         const ossimDpt   &deltaUl,
-                         const ossimDpt   &deltaUr,
-                         const ossimDpt   &length)const;
-
-
-   virtual void fillPatch(ossimImageSource *imageSource,
-                          long resLevel = 0);
-   
-   
-   
-//    static ossimIrect alignRectToBoundary(const ossimDrect &aRect,
-//                                          const ossimDpt &tile_size);
-   static ossimDrect findBoundingRect(const ossimDpt &p1,
-                                      const ossimDpt &p2,
-                                      const ossimDpt &p3,
-                                      const ossimDpt &p4);
-   /*!
-    * Do not delete this data.  We give raw access to the buffer
-    * if there are special things you wish to have done.
-    */
-   ossimRefPtr<ossimImageData> getData(){return thePatchData;}
-
-   void setData(ossimRefPtr<ossimImageData>& patchData);
-   /*!
-    *  This will implement an in place convolution.  It will
-    *  allocate a buffer pass it to the convolution algorithm
-    * and then replace the internal buffer.
-    */
-   void convolve(ossimDiscreteConvolutionKernel* kernel);
-   
-protected:
-   virtual ~ossimTilePatch();
-   
-   ossimRefPtr<ossimImageData>         thePatchData;
-   static ossimDiscreteNearestNeighbor nearestNeighborKernel;
-   
-
-
-   template<class T>
-   void fillTileTemplate(T dummyVariable,
-                         ossimRefPtr<ossimImageData>& result,
-                         const ossimDpt   &ul,
-                         const ossimDpt   &ur,
-                         const ossimDpt   &deltaUl,
-                         const ossimDpt   &deltaUr,
-                         const ossimDpt   &length)const;
-   
-   template<class T>
-   void fillTileTemplate(T dummyVariable,
-                         ossimRefPtr<ossimImageData>& result,
-                         ossimDiscreteConvolutionKernel* kernel)const;
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimTiledImageHandler.h b/include/ossim/imaging/ossimTiledImageHandler.h
deleted file mode 100644
index f86d5a2..0000000
--- a/include/ossim/imaging/ossimTiledImageHandler.h
+++ /dev/null
@@ -1,160 +0,0 @@
-//**************************************************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Oscar Kramer
-// 
-// Description:
-//
-// Image handler used  when the full image is distributed across multiple files,
-// As is the case for tiled Quickbird imagery. This is not for use with band-separate formats,
-// but only "spatially-separate" schemes. Throughout, MFT = multiple file tiles, the disk storage
-// scheme handled by this class.
-//
-//**************************************************************************************************
-// $Id: ossimTiledImageHandler.h 2644 2011-05-26 15:20:11Z oscar.kramer $
-#ifndef ossimTiledImageHandler_HEADER
-#define ossimTiledImageHandler_HEADER
-
-#include <ossim/imaging/ossimImageHandler.h>
-
-// Enable this flag to utilize the system of separate overviews for each tile-file
-#define USING_SUB_OVRS 0
-
-/**
- *  This class defines an abstract Handler which all image handlers(loaders)
- *  should derive from.
- */
-class OSSIMDLLEXPORT ossimTiledImageHandler : public ossimImageHandler
-{
-public:
-   //!  Constructor (default):
-   ossimTiledImageHandler();
-   
-   //! Destructor:
-   virtual ~ossimTiledImageHandler();
-   
-   //! @return Returns true on success, false on error.
-   //! @note This method relies on the data member ossimImageData::theImageFile
-   //! being set.  
-   virtual bool open() = 0;
-
-   //! Deletes the overview and clears the valid image vertices.  Derived
-   //! classes should implement. */
-   virtual void close();
-
-   //! Derived classes must implement this method to be concrete.
-   //! @return true if open, false if not.
-   virtual bool isOpen()const;
-
-   virtual ossim_uint32 getNumberOfInputBands() const;
-   
-   //! @param resLevel Reduced resolution level to return lines of.
-   //! Default = 0
-   //! @return The number of lines for specified reduced resolution level.
-   virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel = 0) const;
-
-   //! @param resLevel Reduced resolution level to return samples of.
-   //! Default = 0
-   //! @return The number of samples for specified reduced resolution level.
-   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel = 0) const;
-   
-   //! Method to save the state of an object to a keyword list.
-   //! Return true if ok or false on error.
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
-
-   //! Method to the load (recreate) the state of an object from a keyword
-   //! list.  Return true if ok or false on error.
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-
-   //! Indicates whether or not the image is tiled internally.
-   //! This implementation returns true if (getImageTileWidth() &&
-   //! getImageTileHeight()) are both non zero.
-   //! Override in the image handler if something else is desired.
-   //! Returns true if tiled, false if not.
-   virtual bool isImageTiled() const;
-
-   //! Returns the tile width of the image or 0 if the image is not tiled.
-   //! Note: this is not the same as the ossimImageSource::getTileWidth which
-   //! returns the output tile width which can be different than the internal
-   //! image tile width on disk.
-   virtual ossim_uint32 getImageTileWidth() const;
-
-   //! Returns the tile height of the image or 0 if the image is not tiled.
-   //! Note: this is not the same as the ossimImageSource::getTileHeight which
-   //! returns the output tile height which can be different than the internal
-   //! image tile height on disk.
-   virtual ossim_uint32 getImageTileHeight() const;
-
-   //! Fills the requested tile by pulling pixels from multiple file tiles as needed.
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect, ossim_uint32 resLevel);
-
-   //! Returns scalar type of first tile (should be the same for all tiles)
-   virtual ossimScalarType getOutputScalarType() const;
-
-   //! Returns overall bounding rect in image space.
-   virtual ossimIrect getImageRectangle(ossim_uint32 resLevel = 0) const;
-
-protected:
-
-   //! Class for record of one tile file:
-   class ossimTileFile
-   {
-   public:
-      ossimTileFile() : overviewIsOpen(false) {}
-
-      ossimFilename tileFilename;
-      vector<ossimIrect>  subImageRects; // one rect per resolution level
-      ossimRefPtr<ossimImageHandler> imageHandler;
-      bool overviewIsOpen;
-   };
-
-   //!  Initialize tile buffer to match image datatype.
-   void allocate();
-
-  vector<ossimTileFile> m_tileFiles;
-  ossimRefPtr<ossimImageData> m_tile;
-  ossimRefPtr<ossimImageData> m_blankTile;
-  ossimIrect  m_fullImgRect;
-  ossim_uint32 m_startOvrResLevel;
-
-#if USING_SUB_OVRS
-public:
-   //! Will build over files, one for each tile file.
-   //! @param includeFullResFlag if true the full resolution layer will also
-   //! be put in the overview format.  This is handy for inefficient formats.
-   virtual bool buildOverview(
-      ossimImageHandlerOverviewCompressionType compressionType = OSSIM_OVERVIEW_COMPRESSION_NONE,
-      ossim_uint32 quality = 75,
-      ossimFilterResampler::ossimFilterResamplerType resampleType = ossimFilterResampler::ossimFilterResampler_BOX,
-      bool includeFullResFlag=false);
-
-   virtual bool openOverview();
-   virtual void closeOverview();
-
-   //! This is not an allowed operation since there are many overviews (one per tile) and the
-   //! precise overview being requested is ambiguous:
-   virtual const ossimImageHandler* getOverview() const { return NULL; }
-
-   //!  @return true if getNumberOfReducedResSets > 1, false if not.
-   //!  @see getNumberOfReducedResSets()
-   virtual bool hasOverviews() const;
-   
-   //! Returns the number of decimation (reduced resolution) levels. This is the minimum number
-   //! among all sub-image tile-files.
-   virtual ossim_uint32 getNumberOfDecimationLevels() const;
-
-protected:
-   //! Will complete the opening process. If there are overviews it will open them. 
-   virtual void completeOpen();
-  
-   bool m_lockSubOvrs;
-
-#endif /* #if USING_SUB_OVRS */
-
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimTiledImageHandler_HEADER */
diff --git a/include/ossim/imaging/ossimTiling.h b/include/ossim/imaging/ossimTiling.h
deleted file mode 100644
index 21acd77..0000000
--- a/include/ossim/imaging/ossimTiling.h
+++ /dev/null
@@ -1,200 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2004 Garrett Potts
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: implementation for image generator
-//
-//*************************************************************************
-// $Id: ossimTiling.h 20103 2011-09-17 16:10:42Z dburken $
-#ifndef ossimTiling_HEADER
-#define ossimTiling_HEADER
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/base/ossimRefPtr.h>
-
-class OSSIM_DLL ossimTiling : public ossimObject
-{
-public:
-
-   enum ossimTilingDeltaType
-   {
-      ossimTilingDeltaType_TOTAL_PIXELS,
-      ossimTilingDeltaType_PER_PIXEL
-   };
-
-   ossimTiling();
-
-   bool initialize(const ossimMapProjection& proj,
-                   const ossimIrect& boundingRect);
-
-   bool next(ossimRefPtr<ossimMapProjection>& resultProjection,
-             ossimIrect& resultingBounds,
-             ossimString& resultingName)const;
-   
-   void reset();
-   
-   /**
-    * 
-    * @param tilingDistance Distance in the specified units.
-    * @param unitType Currently only angular unit degrees,
-    *                 and linear unit meters are supported.
-    *                 If unitType is pixel unit then the
-    *                 delta per unit will be set to 1.
-    *                 
-    */
-   void setTilingDistance(const ossimDpt& tilingDistance,
-                          ossimUnitType unitType);
-
-   /**
-    * This sets the pixel delta.  The delta can either be TOTAL_PIXELS or
-    * UNIT_PER_PIXEL.
-    *
-    * If the delta type is TOTAL_PIXELS then the unit per pixel is calculated
-    * from the theTilingDistance.  This is very useful when wanting to be on
-    * even geographic boundaries and would like to have a fixed width and
-    * height for
-    * the pixels.  Flight simulators use this tiling scheme for power of 2
-    * outputs.
-    *
-    * if the delta type is unit per pixel then the total pixels is computed
-    * form the
-    * theTilingDistance.  This is useful when you might want whole number
-    * GSD's and whole numbered tile boundaries.
-    */
-   void setDelta(const ossimDpt& delta,
-                 ossimTilingDeltaType deltaType);
-
-   /**
-    * This sets the tilename mask.  The key tokens that are supported are.
-    *
-    * %r%         Replaces with the row number of the current tile
-    * %c%         Replaces with the column number of the current tile
-    * %i%         Replaces with the current tile id.
-    * %or%        Replaces with the origin of the row
-    * %oc%        Replaces with the origin of the col
-    * %SRTM%      Replaces all filenames with the SRTM file name convention
-    *
-    * 
-    * Examples:
-    *   tile%r%_%c%  assume r = 0 and c = 100 then
-    *              this is replaced with tile0_100
-    *   
-    */
-   void setTileNameMask(const ossimString& mask);
-   ossimString getTileNameMask()const;
-   
-   bool getRowCol(ossim_int64& row,
-                  ossim_int64& col,
-                  ossim_int64 tileId)const;
-   bool getOrigin(ossimDpt& origin,
-                  ossim_int64 tileId)const;
-   bool getOrigin(ossimDpt& origin,
-                  ossim_int64 row,
-                  ossim_int64 col)const;
-   
-   void setPaddingSizeInPixels(const ossimIpt& pizelOverlap);
-   ossimDpt getDeltaPerPixel()const;
-   
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   virtual std::ostream& print(std::ostream& out) const;
-
-protected:
-
-   /**
-    * @return The tiling distance converted to either degrees or meters.
-    */
-   void getConvertedTilingDistance(ossimDpt& pt) const;
-
-   /** The size of a tile in theTilingDistanceUnitType. */
-   ossimDpt             theTilingDistance;
-
-   /** The unit type for "theDelta", and "theTilingDistance". */
-   ossimUnitType        theTilingDistanceUnitType;
-
-   /**
-    * If (theDeltaType == ossimTilingDeltaType_TOTAL_PIXELS) then
-    * this is the size of the tile in pixels like 1024 x 1024.
-    *
-    * If (theDeltaType == ossimTilingDeltaType_PER_PIXEL) then
-    * this is the size of a single pixel like 1.0 meter.
-    */
-   ossimDpt             theDelta;
-
-   /** @see theDelta */
-   ossimTilingDeltaType theDeltaType;
-
-   /**
-    * @brief If set tiling size is controlled by the desired output size in
-    * bytes.  Set by one of output_size_in_bytes, output_size_in_kilo_bytes, or
-    * output_size_in_mega_bytes.  Always stored in bytes.
-    *
-    * @note kilo_byte = 1024 X 1024, mega_byte = 1024 X 1024 X 1024.
-    *
-    * @note If set this relys on theNumberOfBands and theNumberOfBytesPerPixel
-    * need to alse be set correctly.
-    */
-   ossim_int64 theOutputSizeInBytes;
-
-   /**
-    * @brief Output number of bands.  Needed to tile by output size in bytes.
-    *
-    * default = 1
-    *
-    * @see theOutputSizeInBytes
-    */
-   ossim_uint32 theNumberOfBands;
-
-   /**
-    * @brief Output number of bytes per pixel.
-    * Needed to tile by output size in bytes.
-    *
-    * default = 1
-    *
-    * @see theOutputSizeInBytes
-    *
-    * @note This bytes per single pixel, not all bands.
-    */
-   ossim_uint32 theNumberOfBytesPerPixelPerBand;
-   
-   ossimDpt             thePaddingSizeInPixels;
-   mutable ossimRefPtr<ossimMapProjection>  theMapProjection;
-   ossimIrect                       theImageRect;
-   ossimDrect                       theTilingRect;
-   mutable ossim_int64 theTileId;
-   ossim_int64         theTotalHorizontalTiles;
-   ossim_int64         theTotalVerticalTiles;
-   ossim_int64         theTotalTiles;
-   ossimString         theTileNameMask;
-
-   /**
-    * This flags the code to shift the tie point so that the edge of the pixel
-    * falls on the tile boundary.  default=false
-    */
-   bool theEdgeToEdgeFlag; 
-   
-   bool validate()const;
-   bool isAngularUnit(ossimUnitType unitType)const;
-   bool isLinearUnit(ossimUnitType unitType)const;
-   void getTileName(ossimString& resultingName,
-                    ossim_int64 row,
-                    ossim_int64 col,
-                    ossim_int64 id)const;
-   void clampGeographic(ossimDrect& rect)const;
-                    
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimTilingPoly.h b/include/ossim/imaging/ossimTilingPoly.h
deleted file mode 100644
index 295ca53..0000000
--- a/include/ossim/imaging/ossimTilingPoly.h
+++ /dev/null
@@ -1,96 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Mingjie Su
-// 
-// Description: implementation for image generator
-//
-//*************************************************************************
-// $Id: ossimTilingPoly.h 2725 2011-06-15 18:13:07Z david.burken $
-#ifndef ossimTilingPoly_HEADER
-#define ossimTilingPoly_HEADER 1
-
-#include <ossim/imaging/ossimTilingRect.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/imaging/ossimGeoPolyCutter.h>
-
-class OSSIM_DLL ossimTilingPoly : public ossimTilingRect
-{
-public:
-
-   ossimTilingPoly();
-
-   virtual ~ossimTilingPoly();
-
-   virtual bool initialize(const ossimMapProjection& proj,
-                           const ossimIrect& boundingRect);
-
-   virtual bool next(ossimRefPtr<ossimMapProjection>& resultProjection,
-                     ossimIrect& resultingBounds,
-                     ossimString& resultingName);
-
-   virtual bool saveState(ossimKeywordlist& kwl,
-      const char* prefix=0)const;
-
-   virtual bool loadState(const ossimKeywordlist& kwl,
-      const char* prefix=0);
-
-   bool useMbr() const;
-
-   /** return true if exterior cut is initialized. */
-   bool hasExteriorCut() const;
-
-   /** return true if interior cut is initialized. */
-   bool hasInteriorCut() const;
-   
-   ossimRefPtr<ossimGeoPolyCutter>& getExteriorCut();
-   
-   ossimRefPtr<ossimGeoPolyCutter>& getInteriorCut();
-
-   bool isFeatureBoundingIntersect() const;
-
-protected:
-
-   struct ossimShpFeature
-   {
-      ossimShpFeature(ossim_int32 fid,
-         ossim_int32 polyType,
-         std::vector<ossimGpt> polygon,
-         std::vector<ossimGeoPolygon> multiPolys)
-
-         :m_fid(fid),
-         m_polyType(polyType),
-         m_polygon(polygon),
-         m_multiPolys(multiPolys)
-      {}
-
-      ossim_int32 m_fid;
-      ossim_int32 m_polyType;
-      std::vector<ossimGpt> m_polygon;
-      std::vector<ossimGeoPolygon> m_multiPolys;
-   };
-
-   bool parseShpFile();
-
-   bool nextFeature();
-
-   void setRect();
-
-   ossimFilename          m_shpFilename;
-   bool                   m_useMbr;
-   ossim_float64          m_bufferDistance;
-   
-   ossimRefPtr<ossimGeoPolyCutter> m_exteriorCut;
-   ossimRefPtr<ossimGeoPolyCutter> m_interiorCut;
-   
-   std::vector<ossimShpFeature> m_features;
-   bool m_featureBoundingIntersect;
-                    
-TYPE_DATA
-};
-
-#endif
-
diff --git a/include/ossim/imaging/ossimTilingRect.h b/include/ossim/imaging/ossimTilingRect.h
deleted file mode 100644
index 9e451c9..0000000
--- a/include/ossim/imaging/ossimTilingRect.h
+++ /dev/null
@@ -1,67 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Mingjie Su
-// 
-// Description: implementation for image generator
-//
-//*************************************************************************
-// $Id: ossimTilingRect.h 2725 2011-06-15 18:13:07Z david.burken $
-#ifndef ossimTilingRect_HEADER
-#define ossimTilingRect_HEADER 1
-
-#include <ossim/imaging/ossimTiling.h>
-#include <ossim/imaging/ossimGeoPolyCutter.h>
-#include <ossim/imaging/ossimGeoAnnotationPolyObject.h>
-#include <ossim/imaging/ossimGeoAnnotationMultiPolyObject.h>
-
-
-class OSSIM_DLL ossimTilingRect : public ossimTiling
-{
-public:
-
-   ossimTilingRect();
-
-   virtual ~ossimTilingRect();
-
-   virtual bool initialize(const ossimMapProjection& proj,
-                           const ossimIrect& boundingRect);
-
-   virtual bool next(ossimRefPtr<ossimMapProjection>& resultProjection,
-                     ossimIrect& resultingBounds,
-                     ossimString& resultingName);
-
-   virtual bool saveState(ossimKeywordlist& kwl,
-      const char* prefix=0)const;
-
-   virtual bool loadState(const ossimKeywordlist& kwl,
-      const char* prefix=0);
-
-protected:
-
-   bool initializeBase(const ossimMapProjection& proj, 
-                       const ossimIrect& boundingRect,
-                       ossimDpt& convertedTilingDistance);
-
-   void getConvertedDistance(ossimDpt& pt, ossimDpt inputDistance) const;
-
-   ossimDpt getPaddingSize() const;
-
-   bool                   m_clipToAoi;
-   ossim_float64          m_lastWidth;
-   ossim_float64          m_lastHeight;
-   bool                   m_useOffset;
-   ossimDpt               m_offsetInPixels;
-   ossimDpt               m_tilingDistanceInPixels;
-   ossimDpt               m_tilinResolutionDistance;
-   ossimUnitType          m_tilingResolutionUnitType;
-   ossimDpt               m_fractionalPixelMisalignment;
-                    
-TYPE_DATA
-};
-
-#endif
-
diff --git a/include/ossim/imaging/ossimTopographicCorrectionFilter.h b/include/ossim/imaging/ossimTopographicCorrectionFilter.h
deleted file mode 100644
index f137139..0000000
--- a/include/ossim/imaging/ossimTopographicCorrectionFilter.h
+++ /dev/null
@@ -1,224 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimTopographicCorrectionFilter.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimTopographicCorrectionFilter_HEADER
-#define ossimTopographicCorrectionFilter_HEADER
-#include <ossim/imaging/ossimImageCombiner.h>
-#include <ossim/matrix/newmat.h>
-#include <ossim/base/ossimColumnVector3d.h>
-#include <ossim/base/ossimConnectableObjectListener.h>
-#include <ossim/base/ossimPropertyEvent.h>
-#include <ossim/base/ossim2dLinearRegression.h>
-
-class ossimImageData;
-
-class ossimImageSourceConnection;
-class ossimImageToPlaneNormalFilter;
-/*!
- *
- * class ossimTopographicCorrectionFilter
- *
- * This clas is used to execute terrain correction.  I t requires 2 inputs
- * where the first input is a multi band data source to correct and the
- * second is elevation normals used in light incident calculations.
- *
- * A sample chain might look like:
- *
- *  landsatHandler ---> Cache ---> renderer ---> cache ---------------------------------------
- *                                                                                            |--> Topo correction filter ---> Output
- *  ortho mosaic of elevation data----> imageToPlaneNormals --> Cache ---> Renderer -->Cache --
- *
- * the ossimImageToPlaneNormalsFilter is used to take a single band elevation source and compute normals at each post.  I suggest that you
- * set the renderer to use a higher order convolution than just nearest neighbor, maybe Cubic.  This way you have smoother interpolation
- * as you change zoom levels.
- *
- *
- * Correction Types:
- *
- *   Cosine correction:     In order for this to run it does not need any additional informat but the multi band source and
- *                          an normal calculation input.
- *
- *   Cosine-C correction:   In order for this to run it will need theC array populated for each band.  It defaults
- *                          to 0 forcing a default Cosine correction to take place.
- *
- *   Minnaert correction:   In order for this to run it will need theK array populated for each band.  The defaults should work pretty good
- *  
- */
-class OSSIMDLLEXPORT ossimTopographicCorrectionFilter : public ossimImageCombiner
-{
-public:
-   enum ossimTopoCorrectionType
-   {
-      TOPO_CORRECTION_COSINE    = 0,
-      TOPO_CORRECTION_COSINE_C  = 1,
-      TOPO_CORRECTION_MINNAERT  = 2
-   };
-   ossimTopographicCorrectionFilter();
-
-   ossimTopographicCorrectionFilter(ossimImageSource* colorSource,
-                                    ossimImageSource* elevSource);
-   
-   ossimRefPtr<ossimImageData> getTile(const  ossimIrect& tileRect,
-                                       ossim_uint32 resLevel=0);
-   
-   virtual ossim_uint32 getNumberOfOutputBands() const;
-
-   virtual ossimScalarType getOutputScalarType() const;
-
-   virtual double getNullPixelValue(ossim_uint32 band=0)const;
-
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-
-   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
-
-   virtual void getDecimationFactor(ossim_uint32 resLevel,
-                                    ossimDpt& result) const;
-   
-   virtual void getDecimationFactors(vector<ossimDpt>& decimations) const;
-
-   virtual ossim_uint32 getNumberOfDecimationLevels()const;
-
-   virtual double getAzimuthAngle()const;
-
-   virtual double getElevationAngle()const;
-
-   virtual void setAzimuthAngle(double angle);
-
-   virtual void setElevationAngle(double angle);
-
-   virtual void initialize();
-
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-   
-   bool canConnectMyInputTo(ossim_int32 inputIndex,
-                            const ossimConnectableObject* object)const;
-      
-   virtual void connectInputEvent(ossimConnectionEvent& event);
-
-   virtual void disconnectInputEvent(ossimConnectionEvent& event);
-
-   virtual void propertyEvent(ossimPropertyEvent& event);
-
-   virtual void refreshEvent(ossimRefreshEvent& event);
-
-   virtual ossimTopoCorrectionType getTopoCorrectionType()const;
-
-   virtual void setTopoCorrectionType(ossimTopoCorrectionType topoType);
-
-   const std::vector<double>& getGainValues()const;
-
-   void setGainValues(const std::vector<double>& gainValues);
-  
-   const vector<double>& getBiasValues()const;
-
-   void setBiasValues(const std::vector<double>& biasValues);
-
-   const vector<double>& getKValues()const;
-
-   double getK(int idx)const;
-
-   void setK(int idx, double value);
-
-   void setKValues(const vector<double>& kValues);
-
-   double getC(int idx)const;
-
-   void setC(int idx, double value);
-
-   void setCValues(const vector<double>& cValues);
-   
-   void computeLightDirection();
-
-protected:
-   virtual ~ossimTopographicCorrectionFilter();
-   virtual void allocate();
-   
-   /*!
-    * The result of the illumination equation is stored in
-    * here.  This is populated on each call to getTile.
-    */
-   ossimRefPtr<ossimImageData>   theTile;
-
-   std::vector<ossim_uint32> theBandMapping;
-   
-//   ossimImageToPlaneNormalFilter* theNormalFilter;
-//   ossimScalarRemapper*           theScalarRemapper;
-   std::vector<double> theC;
-   std::vector<double> theK;
-   std::vector<double> theBias;
-   std::vector<double> theGain;
-   
-   /*!
-    * Used for the light vector computation.
-    */
-   double theLightSourceElevationAngle;
-
-   /*!
-    * Used for the light vector computation.
-    */
-   double theLightSourceAzimuthAngle;
-
-   /*!
-    * This is computed from the elevation and
-    * azimuth angles of the light source.
-    */
-   double theLightDirection[3];
-
-   double         theJulianDay;
-   mutable bool   theCComputedFlag;
-   ossimTopoCorrectionType theTopoCorrectionType;   
-   double         theNdviLowTest;
-   double         theNdviHighTest;
-   
-   virtual void executeTopographicCorrection(
-      ossimRefPtr<ossimImageData>& outputData,
-      ossimRefPtr<ossimImageData>& colorData,
-      ossimRefPtr<ossimImageData>& normalData);
-
-   template <class T> void executeTopographicCorrectionTemplate(
-      T dummy,
-      ossimRefPtr<ossimImageData>& outputData,
-      ossimRefPtr<ossimImageData>& colorData,
-      ossimRefPtr<ossimImageData>& normalData);
-
-   template <class T> void executeTopographicCorrectionMinnaertTemplate(
-      T dummy,
-      ossimRefPtr<ossimImageData>& outputData,
-      ossimRefPtr<ossimImageData>& colorData,
-      ossimRefPtr<ossimImageData>& normalData);
-  
-//    virtual void computeC();
-
-//    template<class T>
-//    void addRegressionPointsTemplate(T, //dummy
-//                                     std::vector<ossim2dLinearRegression>& regressionPoints,
-//                                     std::vector<int>& cosineIBucketCount,
-//                                     ossim_int32 maxCountPerBucket,
-//                                     ossimImageData* colorData,
-//                                     ossimImageData* normalData);
-   template <class T> bool computeNdvi(T dummy,
-                                       ossim_float64& result,
-                                       ossim_uint32 offset,
-                                       const std::vector<T*>& bands)const;
-
-   void resizeArrays(ossim_uint32 newSize);
-
-   bool setCCmputedFlag();
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimTrimFilter.h b/include/ossim/imaging/ossimTrimFilter.h
deleted file mode 100644
index 2cf239f..0000000
--- a/include/ossim/imaging/ossimTrimFilter.h
+++ /dev/null
@@ -1,71 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimTrimFilter.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimTrimFilter_HEADER
-#define ossimTrimFilter_HEADER
-#include <ossim/imaging/ossimImageSourceFilter.h>
-#include <ossim/imaging/ossimPolyCutter.h>
-
-class ossimTrimFilter : public ossimImageSourceFilter
-{
-public:
-   ossimTrimFilter();
-
-   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
-   virtual void getValidImageVertices(vector<ossimIpt>& validVertices,
-                                      ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER,
-                                      ossim_uint32 resLevel=0)const;
-
-   ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
-                                       ossim_uint32 resLevel=0);
-
-   virtual void initialize();
-   
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=NULL)const;
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=NULL);
-   
-
-   virtual ossimRefPtr<ossimProperty> getProperty(
-      const ossimString& name)const;
-
-   /**
-    * Set property.
-    *
-    * @param property Property to set if property->getName() matches a
-    * property name of this object.
-    */
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-
-   /**
-    * Adds this objects properties to the list.
-    *
-    * @param propertyNames Array to add to.
-    *
-    * @note This method does not clear propertyNames prior to adding it's
-    * names.
-    */
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-protected:
-   virtual ~ossimTrimFilter();
-   double theLeftPercent;
-   double theRightPercent;
-   double theTopPercent;
-   double theBottomPercent;
-   std::vector<ossimIpt>  theValidVertices;
-   ossimRefPtr<ossimPolyCutter> theCutter;
-   
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimTrimFilter_HEADER */
diff --git a/include/ossim/imaging/ossimTwoColorView.h b/include/ossim/imaging/ossimTwoColorView.h
deleted file mode 100644
index c578b38..0000000
--- a/include/ossim/imaging/ossimTwoColorView.h
+++ /dev/null
@@ -1,105 +0,0 @@
-//-------------------------------------------------------------------
-// License:  LGPL.  See top level LICENSE.txt file.
-//
-// Author:  Garrett Potts
-//
-//-------------------------------------------------------------------
-//  $Id$
-#ifndef ossimTwoColorView_HEADER
-#define ossimTwoColorView_HEADER 1
-#include <ossim/base/ossimConstants.h>
-#include <ossim/imaging/ossimImageCombiner.h>
-
-/**
- * This is a 2 color view of the input.  It basically allows for a change detection and by default will take the first input and map
- * it to the blue channel and takes the second input and maps to the red channel.  The unused channel is mapped to a min pixel value.
- */
-class OSSIM_DLL ossimTwoColorView : public ossimImageCombiner
-{
-public:
-
-   /**
-    * @brief Enumerations for mapping inputs to red, green and blue
-    * output channels.
-    */
-   enum ossimTwoColorMultiViewOutputSource
-   {
-      UNKNOWN = 0,
-      MIN     = 1,
-      OLD     = 2,
-      NEW     = 3
-   };
-   
-   ossimTwoColorView();
-   virtual ossim_uint32 getNumberOfOutputBands() const;
-   /**
-    * @return the requested region of interest
-    */
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
-                                               ossim_uint32 resLevel=0);
-   ossimScalarType getOutputScalarType() const;
-   
-   double getNullPixelValue(ossim_uint32 band)const;
-   double getMinPixelValue(ossim_uint32 band)const;
-   double getMaxPixelValue(ossim_uint32 band)const;
-   
-   /**
-    * @brief Sets which bands to use from inputs, and which inputs to use for
-    * output red, green and blue channels.
-    *
-    * This method does no error checking as the inputs may or may not be set
-    * prior to this call.  ossimTwoColorView::initialize() will verify once
-    * inputs are established.  So if an input band is out of range band
-    * 0 (first band) will be used.
-    *
-    * Callers should ensure initialize is called after this.
-    *
-    * @param oldInputBandIndex Zero based band index for old input. Default=0
-    * * 
-    * @param newInputBandIndex Zero based band index for new input. Default=0.
-    * 
-    * @param redOutputSource default=OLD.  Can be:
-    *    ossimTwoColorMultiViewOutputSource::OLD
-    *    ossimTwoColorMultiViewOutputSource::NEW
-    *    ossimTwoColorMultiViewOutputSource::MIN
-    *    
-    * @param grnOutputSource default=NEW.  Can be:
-    *    ossimTwoColorMultiViewOutputSource::OLD
-    *    ossimTwoColorMultiViewOutputSource::NEW
-    *    ossimTwoColorMultiViewOutputSource::MIN
-    *    
-    * @param bluOutputSource default=NEW.  Can be:
-    *    ossimTwoColorMultiViewOutputSource::OLD
-    *    ossimTwoColorMultiViewOutputSource::NEW
-    *    ossimTwoColorMultiViewOutputSource::MIN   
-    */
-   void setBandIndexMapping(
-      ossim_uint32 oldInputBandIndex,
-      ossim_uint32 newInputBandIndex,
-      ossimTwoColorMultiViewOutputSource redOutputSource,
-      ossimTwoColorMultiViewOutputSource grnOutputSource,
-      ossimTwoColorMultiViewOutputSource bluOutputSource);
-
-   virtual void initialize();
-   
-protected:
-   void allocate();
-   void runAlgorithm(ossimImageData* newData, ossimImageData* oldData);
-   void runNative8(ossimImageData* newData,   ossimImageData* oldData);
-   void runNorm(ossimImageData* newData,   ossimImageData* oldData);
-   
-   bool                               m_byPassFlag;
-   bool                               m_nativeFlag;
-   ossimRefPtr<ossimImageData>        m_twoColorTile;
-   ossimRefPtr<ossimImageSource>      m_newInput;
-   ossimRefPtr<ossimImageSource>      m_oldInput;
-   ossim_uint32                       m_newInputBandIndex;
-   ossim_uint32                       m_oldInputBandIndex;
-   ossimTwoColorMultiViewOutputSource m_redSource;
-   ossimTwoColorMultiViewOutputSource m_grnSource;
-   ossimTwoColorMultiViewOutputSource m_bluSource;
-
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimTwoColorView_HEADER */
diff --git a/include/ossim/imaging/ossimU11ImageData.h b/include/ossim/imaging/ossimU11ImageData.h
deleted file mode 100644
index 0e1035d..0000000
--- a/include/ossim/imaging/ossimU11ImageData.h
+++ /dev/null
@@ -1,188 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Class declaration of ossimU16ImageData.  Specialized image data object for
-// unsigned short data with an 11 bit depth.
-//
-// NOTE:  This object is optimized for unsigned short data and assumes the
-//        following:  null pixel value  = 0.0
-//                    min  pixel value  = 1.0
-//                    max  pixel value  = 2047.0  (2^11 - 1)
-//
-//        If you want anything else use the less efficient ossimImageData.
-//
-//*************************************************************************
-// $Id: ossimU11ImageData.h 16052 2009-12-08 22:20:40Z dburken $
-
-#ifndef ossimU11ImageData_HEADER
-#define ossimU11ImageData_HEADER
-
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimNormalizedU11RemapTable.h>
-
-class OSSIMDLLEXPORT ossimU11ImageData : public ossimImageData
-{
-public:
-   ossimU11ImageData(ossimSource* source,
-                     ossim_uint32 bands = 1);
-
-   ossimU11ImageData(ossimSource* source,
-                     ossim_uint32 bands,
-                     ossim_uint32 width,
-                     ossim_uint32 height);
-
-   ossimU11ImageData(const ossimU11ImageData &rhs);
-   
-
-   virtual ossimObject* dup()const;
-
-   /*!
-    * will fill the entire band with
-    * the value.
-    */
-   void fill(ossim_uint32 band, double value);
-
-   bool isNull(ossim_uint32 offset)const;
-   void setNull(ossim_uint32 offset);
-
-   virtual ossimDataObjectStatus validate() const;
-
-   /*!
-    * will go to the band and offset and compute the
-    * normalized float and return it back to the
-    * caller through the result argument.
-    */
-   virtual void getNormalizedFloat(ossim_uint32 offset,
-                                   ossim_uint32 bandNumber,
-                                   float& result)const;
-
-   /*!
-    * This will assign to this object a normalized
-    * value by unnormalizing to its native type.
-    */
-   virtual void setNormalizedFloat(ossim_uint32 offset,
-                                   ossim_uint32 bandNumber,
-                                   float input);
-   
-   /*!
-    * Will use the memory that you pass in to normalize
-    * this data object.
-    */
-   virtual void convertToNormalizedFloat(ossimImageData* result)const;
-   
-   /*!
-    * Will use the memory that you pass in to normalize
-    * this data object.
-    */
-   virtual void convertToNormalizedDouble(ossimImageData* result)const;
-
-   /*!
-    * Will take the normalized input and convert it
-    * to this tile's data type.  Example:  if this
-    * tile is of type UCHAR and its input is of type
-    * NORALIZED_FLOAT it will unnormalize the data by
-    * doing:
-    *
-    * minPix + normalizedInput*(maxPix-minPix)
-    *
-    * on a per band basis.
-    */
-   virtual void unnormalizeInput(ossimImageData* normalizedInput);
-
-   /*!
-    * This will compute the average value for the band.
-    */
-   virtual double computeAverageBandValue(ossim_uint32 bandNumber = 0);
-
-   /*!
-    * This will call the compute average band value and then
-    * use that in the calculation of:
-    
-    * It will then do a SUM[(Mean - Actual)^2]/width*height.
-    *
-    * This is the average variance from the passed in
-    * mean.  Basically think of the mean as a completely
-    * grey image and we would like to see how this
-    * image varies from the passed in mean.
-    */
-   virtual double computeMeanSquaredError(double meanValue,
-                                          ossim_uint32 bandNumber = 0);
-
-   virtual void setValue(long x, long y, double color);
-
-   /*!
-    * Copies entire tile to buf passed in.  Data put in buf is normalized.
-    * The "buf" passed to method is assumed to be at least as big as:
-    * "getSize() * sizeof(double)"
-    */
-   virtual void copyTileToNormalizedBuffer(double* buf) const;
-   
-   /*!
-    * Copies buf passed in to tile.  Data is unnormalized to the tile's
-    * scalar type.
-    * The "buf" passed to method is assumed to be at least as big as the tiles:
-    * "getSize() * sizeof(double)"
-    */
-   virtual void copyNormalizedBufferToTile(double* buf);
-
-   /*!
-    * Will copy this tiles specified band number to the normalized buffer.
-    * if the band is out of range then nothing is done and returns.
-    */
-   virtual void copyTileToNormalizedBuffer(ossim_uint32 band,
-                                           double* buf) const;
-   virtual void copyTileToNormalizedBuffer(ossim_uint32 band,
-                                           float* buf)const;
-
-      /*!
-    * Copies entire tile to buf passed in.  Data put in buf is normalized.
-    * The "buf" passed to method is assumed to be at least as big as:
-    * "getSize() * sizeof(double)"
-    */
-   virtual void copyTileToNormalizedBuffer(float* buf) const;
-   
-   /*!
-    * Copies buf passed in to tile.  Data is unnormalized to the tile's
-    * scalar type.
-    * The "buf" passed to method is assumed to be at least as big as the tiles:
-    * "getSize() * sizeof(double)"
-    */
-   virtual void copyNormalizedBufferToTile(float* buf);
-
-   /*!
-    * Will copy the normalized buffer to this tiles
-    * specified band.  If band is out of range then nothing
-    * is done and returns.
-    */
-   virtual void copyNormalizedBufferToTile(ossim_uint32 band,
-                                           double* buf);
-   virtual void copyNormalizedBufferToTile(ossim_uint32 band,
-                                           float* buf);
-
-   /** @return The first non-null index of the normalized remap table. */
-   virtual ossim_float64 getMinNormalizedPix() const;
-
-protected:
-   virtual ~ossimU11ImageData();
-   ossimU11ImageData();
-
-private:
-
-   static const ossimNormalizedU11RemapTable m_remapTable;
-   
-TYPE_DATA
-};
-
-inline ossim_float64 ossimU11ImageData::getMinNormalizedPix() const
-{
-   return m_remapTable[1];
-}
-
-#endif
diff --git a/include/ossim/imaging/ossimU16ImageData.h b/include/ossim/imaging/ossimU16ImageData.h
deleted file mode 100644
index e1926df..0000000
--- a/include/ossim/imaging/ossimU16ImageData.h
+++ /dev/null
@@ -1,192 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Class declaration of ossimU16ImageData.  Specialized image data object for
-// unsigned short data.
-//
-// NOTE:  This object is optimized for unsigned short data and assumes the
-//        following:  null pixel value  = 0.0
-//                    min  pixel value  = 1.0
-//                    max  pixel value  = 65536.0  (2^16 - 1)
-//
-//        If you want anything else use the less efficient ossimImageData.
-//
-//*************************************************************************
-// $Id: ossimU16ImageData.h 16052 2009-12-08 22:20:40Z dburken $
-
-#ifndef ossimU16ImageData_HEADER
-#define ossimU16ImageData_HEADER
-
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimNormalizedU16RemapTable.h>
-
-class OSSIMDLLEXPORT ossimU16ImageData : public ossimImageData
-{
-public:
-   ossimU16ImageData(ossimSource* source,
-                     ossim_uint32 bands = 1);
-
-   ossimU16ImageData(ossimSource* source,
-                    ossim_uint32 bands,
-                    ossim_uint32 width,
-                    ossim_uint32 height);
-
-   ossimU16ImageData(const ossimU16ImageData &rhs);
-
-
-   /*!
-    * Perform object duplication.
-    */
-   virtual ossimObject* dup()const;
-
-   /*!
-    * will fill the entire band with
-    * the value.
-    */
-   void fill(ossim_uint32 band, double value);
-
-   /*!
-    * will fill all bands with the passed in
-    * value.
-    */
-   void fill(double value);
-
-   virtual ossimDataObjectStatus validate() const;
-
-   /*!
-    * will go to the band and offset and compute the
-    * normalized float and return it back to the
-    * caller through the result argument.
-    */
-   virtual void getNormalizedFloat(ossim_uint32 offset,
-                                   ossim_uint32 bandNumber,
-                                   float& result)const;
-
-   /*!
-    * This will assign to this object a normalized
-    * value by unnormalizing to its native type.
-    */
-   virtual void setNormalizedFloat(ossim_uint32 offset,
-                                   ossim_uint32 bandNumber,
-                                   float input);
-   
-   /*!
-    * Will use the memory that you pass in to normalize
-    * this data object.
-    */
-   virtual void convertToNormalizedFloat(ossimImageData* result)const;
-   
-   /*!
-    * Will use the memory that you pass in to normalize
-    * this data object.
-    */
-   virtual void convertToNormalizedDouble(ossimImageData* result)const;
-
-   /*!
-    * Will take the normalized input and convert it
-    * to this tile's data type.  Example:  if this
-    * tile is of type UCHAR and its input is of type
-    * NORALIZED_FLOAT it will unnormalize the data by
-    * doing:
-    *
-    * minPix + normalizedInput*(maxPix-minPix)
-    *
-    * on a per band basis.
-    */
-   virtual void unnormalizeInput(ossimImageData* normalizedInput);
-
-   /*!
-    * This will compute the average value for the band.
-    */
-   virtual double computeAverageBandValue(ossim_uint32 bandNumber = 0);
-
-   /*!
-    * This will call the compute average band value and then
-    * use that in the calculation of:
-    
-    * It will then do a SUM[(Mean - Actual)^2]/width*height.
-    *
-    * This is the average variance from the passed in
-    * mean.  Basically think of the mean as a completely
-    * grey image and we would like to see how this
-    * image varies from the passed in mean.
-    */
-   virtual double computeMeanSquaredError(double meanValue,
-                                          ossim_uint32 bandNumber = 0);
-
-   virtual void setValue(long x, long y, double color);
-   
-   /*!
-    * Copies entire tile to buf passed in.  Data put in buf is normalized.
-    * The "buf" passed to method is assumed to be at least as big as:
-    * "getSize() * sizeof(double)"
-    */
-   virtual void copyTileToNormalizedBuffer(double* buf) const;
-   
-   /*!
-    * Copies buf passed in to tile.  Data is unnormalized to the tile's
-    * scalar type.
-    * The "buf" passed to method is assumed to be at least as big as the tiles:
-    * "getSize() * sizeof(double)"
-    */
-   virtual void copyNormalizedBufferToTile(double* buf);
-
-   /*!
-    * Will copy this tiles specified band number to the normalized buffer.
-    * if the band is out of range then nothing is done and returns.
-    */
-   virtual void copyTileToNormalizedBuffer(ossim_uint32 band, double* buf) const;
-   virtual void copyTileToNormalizedBuffer(ossim_uint32 band, float* buf)const;
-
-   /*!
-    * Copies entire tile to buf passed in.  Data put in buf is normalized.
-    * The "buf" passed to method is assumed to be at least as big as:
-    * "getSize() * sizeof(double)"
-    */
-   virtual void copyTileToNormalizedBuffer(float* buf) const;
-   
-   /*!
-    * Copies buf passed in to tile.  Data is unnormalized to the tile's
-    * scalar type.
-    * The "buf" passed to method is assumed to be at least as big as the tiles:
-    * "getSize() * sizeof(double)"
-    */
-   virtual void copyNormalizedBufferToTile(float* buf);
-
-   /*!
-    * Will copy the normalized buffer to this tiles
-    * specified band.  If band is out of range then nothing
-    * is done and returns.
-    */
-   virtual void copyNormalizedBufferToTile(ossim_uint32 band,
-                                           double* buf);
-   virtual void copyNormalizedBufferToTile(ossim_uint32 band,
-                                           float* buf);
-
-   /** @return The first non-null index of the normalized remap table. */
-   virtual ossim_float64 getMinNormalizedPix() const;
-   
-protected:
-   virtual ~ossimU16ImageData();
-   ossimU16ImageData();
-
-private:
-
-   static const ossimNormalizedU16RemapTable m_remapTable;
-   
-TYPE_DATA
-};
-
-inline ossim_float64 ossimU16ImageData::getMinNormalizedPix() const
-{
-   return m_remapTable[1];
-}
-
-#endif
diff --git a/include/ossim/imaging/ossimU8ImageData.h b/include/ossim/imaging/ossimU8ImageData.h
deleted file mode 100644
index 70487be..0000000
--- a/include/ossim/imaging/ossimU8ImageData.h
+++ /dev/null
@@ -1,175 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Class declaration of ossimU8ImageData.  Specialized image data object for
-// unsigned char data.
-//
-// NOTE:  This object is optimized for unsigned char data and assumes the
-//        following:  null pixel value  = 0.0
-//                    min  pixel value  = 1.0
-//                    max  pixel value  = 255.0
-//
-//        If you want anything else use the less efficient ossimImageData.
-//
-//*************************************************************************
-// $Id: ossimU8ImageData.h 16052 2009-12-08 22:20:40Z dburken $
-
-#ifndef ossimU8ImageData_HEADER
-#define ossimU8ImageData_HEADER
-
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimNormalizedU8RemapTable.h>
-
-class OSSIMDLLEXPORT ossimU8ImageData : public ossimImageData
-{
-public:
-   ossimU8ImageData(ossimSource* source=NULL,
-                    ossim_uint32 bands = 1);
-   
-   ossimU8ImageData(ossimSource* source,
-                    ossim_uint32 bands,
-                    ossim_uint32 width,
-                    ossim_uint32 height);
-   
-   ossimU8ImageData(const ossimU8ImageData& rhs)
-      :ossimImageData(rhs)
-      {}
-
-
-   virtual ossimObject* dup()const;
-
-   /*!
-    * will fill the entire band with
-    * the value.
-    */
-   void fill(ossim_uint32 band, double value);
-   void fill(double value);
-
-   bool isNull(ossim_uint32 offset)const;
-   void setNull(ossim_uint32 offset);
-
-   virtual ossimDataObjectStatus validate() const;
-
-   /*!
-    * will go to the band and offset and compute the
-    * normalized float and return it back to the
-    * caller through the result argument.
-    */
-   virtual void getNormalizedFloat(ossim_uint32 offset,
-                                   ossim_uint32 bandNumber,
-                                   float& result)const;
-
-   /*!
-    * This will assign to this object a normalized
-    * value by unnormalizing to its native type.
-    */
-   virtual void setNormalizedFloat(ossim_uint32 offset,
-                                   ossim_uint32 bandNumber,
-                                   float input);
-   
-   /*!
-    * Will use the memory that you pass in to normalize
-    * this data object.
-    */
-   virtual void convertToNormalizedFloat(ossimImageData* result)const;
-   
-   /*!
-    * Will use the memory that you pass in to normalize
-    * this data object.
-    */
-   virtual void convertToNormalizedDouble(ossimImageData* result)const;
-
-   /*!
-    * Will take the normalized input and convert it
-    * to this tile's data type.  Example:  if this
-    * tile is of type UCHAR and its input is of type
-    * NORALIZED_FLOAT it will unnormalize the data by
-    * doing:
-    *
-    * minPix + normalizedInput*(maxPix-minPix)
-    *
-    * on a per band basis.
-    */
-   virtual void unnormalizeInput(ossimImageData* normalizedInput);
-
-   /*!
-    * This will compute the average value for the band.
-    */
-   virtual double computeAverageBandValue(ossim_uint32 bandNumber = 0);
-
-   /*!
-    * This will call the compute average band value and then
-    * use that in the calculation of:
-    
-    * It will then do a SUM[(Mean - Actual)^2]/width*height.
-    *
-    * This is the average variance from the passed in
-    * mean.  Basically think of the mean as a completely
-    * grey image and we would like to see how this
-    * image varies from the passed in mean.
-    */
-   virtual double computeMeanSquaredError(double meanValue,
-                                          ossim_uint32 bandNumber = 0);
-  
-   virtual void setValue(ossim_int32 x, ossim_int32 y, double color);
-
-   /*!
-    * Copies entire tile to buf passed in.  Data put in buf is normalized.
-    * The "buf" passed to method is assumed to be at least as big as:
-    * "getSize() * sizeof(double)"
-    */
-   virtual void copyTileToNormalizedBuffer(double* buf) const;
-   virtual void copyTileToNormalizedBuffer(float* buf) const;
-
-   /*!
-    * Will copy this tiles specified band number to the normalized buffer.
-    * if the band is out of range then nothing is done and returns.
-    */
-   virtual void copyTileToNormalizedBuffer(ossim_uint32 band, double* buf) const;
-   virtual void copyTileToNormalizedBuffer(ossim_uint32 band, float* buf)const;
-
-   /*!
-    * Copies buf passed in to tile.  Data is unnormalized to the tile's
-    * scalar type.
-    * The "buf" passed to method is assumed to be at least as big as the tiles:
-    * "getSize() * sizeof(double)"
-    */
-   virtual void copyNormalizedBufferToTile(double* buf);
-   virtual void copyNormalizedBufferToTile(float* buf);
-
-   /*!
-    * Will copy the normalized buffer to this tiles
-    * specified band.  If band is out of range then nothing
-    * is done and returns.
-    */
-   virtual void copyNormalizedBufferToTile(ossim_uint32 band,
-                                           double* buf);
-   virtual void copyNormalizedBufferToTile(ossim_uint32 band,
-                                           float* buf);
-
-   /** @return The first non-null index of the normalized remap table. */   
-   virtual ossim_float64 getMinNormalizedPix() const;
-   
-protected:
-   virtual ~ossimU8ImageData();
-
-private:
-
-   static const ossimNormalizedU8RemapTable m_remapTable;
-   
-TYPE_DATA
-};
-
-inline ossim_float64 ossimU8ImageData::getMinNormalizedPix() const
-{
-   return m_remapTable[1];
-}
-
-#endif
diff --git a/include/ossim/imaging/ossimUsgsDemTileSource.h b/include/ossim/imaging/ossimUsgsDemTileSource.h
deleted file mode 100644
index 7b19497..0000000
--- a/include/ossim/imaging/ossimUsgsDemTileSource.h
+++ /dev/null
@@ -1,194 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description:
-//
-// Contains class declaration of ossimUsgsDemTileSource.
-// The ossimUsgsDemTileSource class is derived from ossimImageHandler and
-// is intended to be an image handler for USGS dem files.
-//
-//********************************************************************
-// $Id: ossimUsgsDemTileSource.h 19640 2011-05-25 15:58:00Z oscarkramer $
-
-#ifndef ossimUsgsDemTileSource_HEADER
-#define ossimUsgsDemTileSource_HEADER
-
-#include <ossim/imaging/ossimImageHandler.h>
-
-class ossimImageData;
-class ossimDemGrid;
-
-class OSSIM_DLL ossimUsgsDemTileSource : public ossimImageHandler
-{
-public:
-      
-   ossimUsgsDemTileSource();
-
-   virtual ossimString getShortName() const;
-   virtual ossimString getLongName()  const;
-
-   /**
-    *  Returns true if the "theImageFile can be opened.
-    *
-    *  If the extension is not equal to ".dem" this will attempt to look for
-    *  an ".omd" file with the keyword pair "dem_type:  usgs_dem" in it.
-    *
-    *  Optionally users can change the scalar type from signed 16 bit to
-    *  float with the keyword pair "scalar_type: ossim_float32"
-    */
-   virtual bool open();
-
-   virtual ossimRefPtr<ossimImageData> getTile(const  ossimIrect& tile_rect,
-                                               ossim_uint32 resLevel=0);
-
-   /**
-    * Method to get a tile.   
-    *
-    * @param result The tile to stuff.  Note The requested rectangle in full
-    * image space and bands should be set in the result tile prior to
-    * passing.  It will be an error if:
-    * result.getNumberOfBands() != this->getNumberOfOutputBands()
-    *
-    * @return true on success false on error.  If return is false, result
-    *  is undefined so caller should handle appropriately with makeBlank or
-    * whatever.
-    */
-   virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);
-   
-   /**
-    *  Returns the number of bands in the image.
-    *  Satisfies pure virtual requirement from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfInputBands()  const;
-   virtual ossim_uint32 getNumberOfOutputBands() const;
-   
-   /**
-    *  Returns the number of lines in the image.
-    *  Satisfies pure virtual requirement from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level = 0) const;
-   
-   /**
-    *  Returns the number of samples in the image.  
-    *  Satisfies pure virtual requirement from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level = 0) const;
-
-   virtual double getNullPixelValue(ossim_uint32 band=0)const;
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-
-   /**
-    * Returns the zero based image rectangle for the reduced resolution data
-    * set (rrds) passed in.  Note that rrds 0 is the highest resolution rrds.
-    */
-   virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level = 0) const;
-   
-   /**
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-   
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    *
-    * Keywords picked up by this method:
-    * dem_type: usgs_dem
-    * scalar_type: ossim_sint16 (default)
-    * or
-    * scalar_type: ossim_float32
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-   
-   /**
-    * Returns the output pixel type of the tile source.
-    */
-   virtual ossimScalarType getOutputScalarType() const;
-
-   /**
-    * Returns the width of the output tile.
-    */
-   virtual ossim_uint32 getTileWidth() const;
-
-   /**
-    * Returns the height of the output tile.
-    */
-   virtual ossim_uint32 getTileHeight() const;
-
-   /**
-    * Returns the tile width of the image or 0 if the image is not tiled.
-    * Note: this is not the same as the ossimImageSource::getTileWidth which
-    * returns the output tile width which can be different than the internal
-    * image tile width on disk.
-    */
-   virtual ossim_uint32 getImageTileWidth() const;
-
-   /**
-    * Returns the tile width of the image or 0 if the image is not tiled.
-    * Note: this is not the same as the ossimImageSource::getTileWidth which
-    * returns the output tile width which can be different than the internal
-    * image tile width on disk.
-    */
-   virtual ossim_uint32 getImageTileHeight() const;   
-
-   virtual bool isOpen()const;
-   
-   /**
-    * Override base-class method to make sure the internal geometry is explored before extending.
-    */
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-
-protected:
-
-   /**
-    * @brief Initializes theGeometry from USGS DEM header.
-    *
-    * This is called by base ossimImageHandler::getImageGeometry if
-    * theGeometry is not set.  External callers should not go through this
-    * method but call "getImageGeometry" instead for efficiency reasons.
-    * 
-    * @return Pointer to geometry or null if header not found.
-    */
-   virtual ossimRefPtr<ossimImageGeometry> getInternalImageGeometry() const;
-   
-   virtual ~ossimUsgsDemTileSource();
-   // Disallow operator= and copy constrution...
-   const ossimUsgsDemTileSource& operator=(const  ossimUsgsDemTileSource& rhs);
-   ossimUsgsDemTileSource(const ossimUsgsDemTileSource&);
-   
-   /**
-    *  Returns true on success, false on error.
-    */
-   template <class T> bool fillBuffer(T, // dummy template variable
-                                      const ossimIrect& tile_rect,
-                                      const ossimIrect& clip_rect,
-                                      ossimImageData* tile);
-
-   void gatherStatistics();
-
-   ossimDemGrid*               theDem;
-   ossimRefPtr<ossimImageData> theTile;
-   ossim_float64               theNullValue;
-   ossim_float64               theMinHeight;
-   ossim_float64               theMaxHeight;
-   bool                        theFeetFlag;  // elevation units = feet
-   bool                        theIsDemFlag;
-
-   /**
-    * This can be either OSSIM_SINT16 or OSSIM_FLOAT32.  Default = OSSIM_SINT16
-    * Can be changed via ".omd" file keyword:
-    */
-   ossimScalarType             theScalarType;
-   
-TYPE_DATA
-};
-
-#endif  // #ifndef ossimUsgsDemTileSource_HEADER
diff --git a/include/ossim/imaging/ossimValueAssignImageSourceFilter.h b/include/ossim/imaging/ossimValueAssignImageSourceFilter.h
deleted file mode 100644
index 40dda54..0000000
--- a/include/ossim/imaging/ossimValueAssignImageSourceFilter.h
+++ /dev/null
@@ -1,102 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimValueAssignImageSourceFilter.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimValueAssignImageSourceFilter_HEADER
-#define ossimValueAssignImageSourceFilter_HEADER
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-/**
- * This allows one to assign a value to a group of bands.  It will test
- * for equality band separate or as group. For example:
- *
- * if we are testing as a group then the assign will not happen unless
- * all values equal theInputValue array
- *
- *  inputValue = <1, 2, 3>
- *  outputValue = <100, 100, 100>
- *
- *  then it will only convert to 100, 100, 100 if the input equals all
- *  values of the output.
- *
- * input <1, 55, 3>  would become <1, 55, 3>
- * input <1, 2, 3>   would become <100, 100, 100>
- *
- *  Now for band separate it means you want to change on a per band and
- *  not as a group.  For example:
- *
- * inputValue = <1, 2, 3>
- * outputValue = <100, 100, 100>
- *
- * input <1, 55, 3>  would become <100, 55, 100>
- *
- */
-class OSSIMDLLEXPORT ossimValueAssignImageSourceFilter : public ossimImageSourceFilter
-{
-public:
-   enum ossimValueAssignType
-   {
-      ossimValueAssignType_SEPARATE = 1,
-      ossimValueAssignType_GROUP    = 2
-   };
-   
-   ossimValueAssignImageSourceFilter(ossimObject* owner=NULL);
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                   ossim_uint32 resLevel=0);
-
-   void setInputOutputValues(const vector<double>& inputValues,
-                             const vector<double>& outputValues);
-
-   const vector<double>& getInputValues()const;
-   const vector<double>& getOutputValues()const;
-   ossimValueAssignType getValueAssignType()const;
-   void setValueAssignType(ossimValueAssignType type);
-
-   virtual void initialize();
-
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=NULL)const;
-   
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=NULL);
-   
-protected:
-   virtual ~ossimValueAssignImageSourceFilter();
-
-   /**
-    * Called on first getTile, will initialize all data needed.
-    */
-   void allocate();
-   
-   vector<double>              theInputValueArray;
-   vector<double>              theOutputValueArray;
-   ossimValueAssignType        theAssignType;
-   ossimRefPtr<ossimImageData> theTile;
-   
-   void validateArrays();
-   
-   template <class T>
-      void executeAssign(T, ossimRefPtr<ossimImageData>& data);
-   
-   template <class T>
-      void executeAssignSeparate(T, ossimRefPtr<ossimImageData>& data);
-   
-   template <class T>
-      void executeAssignGroup(T, ossimRefPtr<ossimImageData>& data);
-
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimValueAssignImageSourceFilter_HEADER */
diff --git a/include/ossim/imaging/ossimVpfAnnotationCoverageInfo.h b/include/ossim/imaging/ossimVpfAnnotationCoverageInfo.h
deleted file mode 100644
index 074f01d..0000000
--- a/include/ossim/imaging/ossimVpfAnnotationCoverageInfo.h
+++ /dev/null
@@ -1,77 +0,0 @@
-//*************************************************************************
-// Copyright (C) 2004 Intelligence Data Systems, Inc.  All rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-//**************************************************************************
-// $Id: ossimVpfAnnotationCoverageInfo.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimVpfAnnotationCoverageInfo_HEADER
-#define ossimVpfAnnotationCoverageInfo_HEADER
-#include <ossim/imaging/ossimVpfAnnotationFeatureInfo.h>
-#include <ossim/vec/ossimVpfCoverage.h>
-class ossimVpfLibrary;
-
-class ossimRgbImage;
-
-class ossimVpfAnnotationCoverageInfo
-{
-public:
-  ossimVpfAnnotationCoverageInfo(const ossimString& name="")
-    :theName(name)
-  {
-    
-  }
-  virtual ~ossimVpfAnnotationCoverageInfo()
-  {
-    deleteAllFeatures();
-  }
-  bool hasRenderableFeature()const;
-  void getEnabledFeatures(std::vector<ossimVpfAnnotationFeatureInfo*>& result);
-  void getAllFeatures(std::vector<ossimVpfAnnotationFeatureInfo*>& result);
-
-  void transform(ossimImageGeometry* geom);
-  ossimIrect getBoundingProjectedRect()const;
-  void buildCoverage();
-  void buildCoverage(const ossimString& feature);
-  void setName(const ossimString& name)
-  {
-    theName = name;
-  }
-  ossimString getName()const
-     {
-        return theName;
-     }
-  void setLibrary(ossimVpfLibrary* library)
-  {
-    theLibrary = library;
-  }
-  ossimVpfLibrary* getLibrary()
-  {
-    return theLibrary;
-  }
-  const ossimVpfLibrary* getLibrary()const
-  {
-    return theLibrary;
-  }
-  void drawAnnotations(ossimRgbImage* tile);
-   void deleteAllFeatures();
-
-  virtual bool saveState(ossimKeywordlist& kwl,
-			 const char* prefix=0)const;
-  virtual bool loadState(const ossimKeywordlist& kwl,
-			 const char* prefix=0);
-protected:
-  ossimString theName;
-
-  /*!
-   * Not owned.
-   */
-  ossimVpfLibrary* theLibrary;
-  std::vector<ossimVpfAnnotationFeatureInfo*>           theFeatureInfoArray;
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimVpfAnnotationFeatureInfo.h b/include/ossim/imaging/ossimVpfAnnotationFeatureInfo.h
deleted file mode 100644
index 6833c32..0000000
--- a/include/ossim/imaging/ossimVpfAnnotationFeatureInfo.h
+++ /dev/null
@@ -1,229 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimVpfAnnotationFeatureInfo.h 19636 2011-05-24 16:48:45Z gpotts $
-#ifndef ossimVpfAnnotationFeatureInfo_HEADER
-#define ossimVpfAnnotationFeatureInfo_HEADER
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimRgbVector.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimGeoPolygon.h>
-#include <ossim/imaging/ossimGeoAnnotationObject.h>
-#include <ossim/vec/ossimVpfCoverage.h>
-#include <ossim/base/ossimFontInformation.h>
-
-class ossimGeoAnnotationObject;
-class ossimVpfCoverage;
-class ossimVpfFeatureClassSchema;
-class ossimPolyLine;
-
-class OSSIMDLLEXPORT ossimVpfAnnotationFeatureInfo : public ossimObject
-{
-public:
-  enum ossimVpfAnnotationFeatureType
-    {
-      ossimVpfAnnotationFeatureType_UNKNOWN  = 0,
-      ossimVpfAnnotationFeatureType_POINT    = 1,
-      ossimVpfAnnotationFeatureType_LINE     = 2,
-      ossimVpfAnnotationFeatureType_POLYGON  = 3,
-      ossimVpfAnnotationFeatureType_TEXT     = 4,
-    };
-
-  ossimVpfAnnotationFeatureInfo(const ossimString& featureName   = "",
-				const ossimRgbVector& penColor   = ossimRgbVector(255,255,255),
-				const ossimRgbVector& brushColor = ossimRgbVector(255,255,255),
-                                const ossimDpt& pointRadius=ossimDpt(1,1),
-                                int   thickness=0,
-				bool enabledFlag = true);
-  ~ossimVpfAnnotationFeatureInfo();
-
-  void setCoverage(const ossimVpfCoverage& coverage)
-  {
-    theCoverage = coverage;
-  }
-
-  const ossimVpfCoverage& getCoverage()const
-  {
-    return theCoverage;
-  }
-  ossimVpfCoverage& getCoverage()
-  {
-    return theCoverage;
-  }
-
-   void setColor(const ossimRgbVector& color)
-      {
-         setPenColor(color);
-         setBrushColor(color);
-      }
-  void setPenColor(const ossimRgbVector& penColor)
-  {
-    thePenColor = penColor;
-  }
-
-  ossimRgbVector getPenColor()const
-  {
-    return thePenColor;
-  }
-
-  void setBrushColor(const ossimRgbVector& brushColor)
-  {
-    theBrushColor = brushColor;
-  }
-
-  ossimRgbVector getBrushColor()const
-  {
-    return theBrushColor;
-  }
-
-  void setFillEnabledFlag(bool flag)
-  {
-     theFillEnabledFlag = flag;
-  }
-  bool getFillEnabledFlag()const
-  {
-     return theFillEnabledFlag;
-  }
-  void setEnabledFlag(bool flag);
-  bool getEnabledFlag()const
-  {
-    return theEnabledFlag;
-  }
-
-  void setThickness(int thickness)
-  {
-     theThickness = thickness;
-  }
-
-  int getThickness()const
-  {
-     return theThickness;
-  }
-  
-  void setName(const ossimString& name)
-  {
-    theName = name;
-  }
-  const ossimString& getName()const
-  {
-    return theName;
-  }
-   
-  bool isPoint()const
-  {
-     return (theFeatureType == ossimVpfAnnotationFeatureType_POINT);
-  }
-  bool isLine()const
-  {
-     return (theFeatureType == ossimVpfAnnotationFeatureType_LINE);
-  }
-  bool isPolygon()const
-  {
-     return (theFeatureType == ossimVpfAnnotationFeatureType_POLYGON);
-  }
-  bool isText()const
-  {
-     return (theFeatureType == ossimVpfAnnotationFeatureType_TEXT);
-  }
-  void getFontInformation(ossimFontInformation& fontInfo)const
-  {
-     fontInfo = theFontInformation;
-  }
-  void setFontInformation(const ossimFontInformation& fontInfo)
-  {
-     theFontInformation = fontInfo;
-  }
-
-  void setPointRadius(const ossimDpt& radius)
-  {
-    thePointRadius = radius;
-  }
-  ossimDpt getPointRadius()const
-  {
-    return thePointRadius;
-  }
-  void setDrawingFeaturesToAnnotation();
-  ossimIrect getBoundingProjectedRect()const;
-  void transform(ossimImageGeometry* proj);
-  void buildFeature();
-  void deleteAllObjects();
-  void drawAnnotations(ossimRgbImage* tile);
-
-  bool saveState(ossimKeywordlist& kwl,
-		 const char* prefix=0)const;
-  bool loadState(const ossimKeywordlist& kwl,
-		 const char* prefix=0);
-  ossimString getFeatureTypeAsString()const;
-  ossimVpfAnnotationFeatureType getFeatureTypeFromString(const ossimString& featureType)const;
-
-private:
-  void readAttributes(ossimPolyLine& polyLine, ossimVpfTable& table, int row);
-  void readAttributes(ossimGeoPolygon& polygon, ossimVpfTable& table, int row);
-
-protected:
-  ossimString                   theName;
-  ossimString                   theDescription;
-  ossimRgbVector                thePenColor;
-  ossimRgbVector                theBrushColor;
-  ossimVpfCoverage              theCoverage;
-  ossimDpt                      thePointRadius;
-  int                           theThickness; 
-  bool                          theFillEnabledFlag;
-  bool                          theEnabledFlag;
-  ossimVpfAnnotationFeatureType theFeatureType;
-  ossimFontInformation          theFontInformation;
-   
-  std::vector<ossimRefPtr<ossimGeoAnnotationObject> > theAnnotationArray;
-
-  void buildTxtFeature(const ossimFilename& table,
-                       const ossimString&   tableKey,
-                       const ossimFilename& primitive,
-                       const ossimString&   primitiveKey);
-   
-  void buildEdgFeature(const ossimFilename& table,
-                       const ossimString&   tableKey,
-		       const ossimFilename& primitive,
-		       const ossimString&   primitiveKey);
-
-  void buildPointFeature(const ossimString& primitiveName,
-			 const ossimFilename& table,
-			 const ossimString&   tableKey,
-			 const ossimFilename& primitive,
-			 const ossimString&   primitiveKey);
-  void buildFaceFeature(const ossimFilename& table,
-                        const ossimString&   tableKey,
-                        const ossimFilename& primitive,
-			const ossimString&   primitiveKey);
-  
-
-  void readEdge(ossimPolyLine& polyLine,
-		int rowNumber,
-		int colPosition,
-		ossimVpfTable& edgeTable);
-  int readTableCellAsInt (int rowNumber, // should replace calls to readRngId, readStartEdgeId with this
-			  int colNumber,
-			  ossimVpfTable& table);
-  int readRngId(int rowNumber,
-		int colNumber,
-		ossimVpfTable& faceTable);
-  int readStartEdgeId(int rowNumber,
-		      int colNumber,
-		      ossimVpfTable& rngTable);
-  void readGeoPolygon(ossimGeoPolygon& polygon,
-		      int faceId,
-		      int startEdgeId,
-		      ossimVpfTable& edgTable);
-
-  ossimDpt* getXy(vpf_table_type table, row_type row, ossim_int32 pos, ossim_int32* count);
-  int getEdgeKeyId (vpf_table_type& table, row_type& row, int col);
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimVpfTileSource.h b/include/ossim/imaging/ossimVpfTileSource.h
deleted file mode 100644
index 23988dd..0000000
--- a/include/ossim/imaging/ossimVpfTileSource.h
+++ /dev/null
@@ -1,164 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (C) 2004 Garrett Potts, all rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-// $Id: ossimVpfTileSource.h 17932 2010-08-19 20:34:35Z dburken $
-//----------------------------------------------------------------------------
-#ifndef ossimVpfTileSource_HEADER
-#define ossimVpfTileSource_HEADER
-
-#include <ossim/imaging/ossimVpfAnnotationSource.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimViewInterface.h>
-
-
-class OSSIMDLLEXPORT ossimVpfTileSource : public ossimImageHandler,
-                                          public ossimViewInterface
-{
-public:
-   
-   ossimVpfTileSource();
-
-   virtual void close();
-
-   /**
-    *  @return Returns true on success, false on error.
-    *
-    *  @note This method relies on the data member ossimImageData::theImageFile
-    *  being set.  Callers should do a "setFilename" prior to calling this
-    *  method or use the ossimImageHandler::open that takes a file name and an
-    *  entry index.
-    */   
-   virtual bool open();
-
-   /*!
-    *  Returns a pointer to a tile given an origin representing the upper
-    *  left corner of the tile to grab from the image.
-    *  Satisfies pure virtual from TileSource class.
-    */
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-
-   /*!
-    *  Returns the number of bands in the image.
-    *  Satisfies pure virtual from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfInputBands() const;
-
-    /*!
-    * Returns the number of bands in a tile returned from this TileSource.
-    * Note: we are supporting sources that can have multiple data objects.
-    * If you want to know the scalar type of an object you can pass in the 
-    */
-   virtual ossim_uint32 getNumberOfOutputBands() const;
-  
-   /*!
-    *  Returns the number of bands in the image.
-    *  Satisfies pure virtual from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level = 0) const;
-
-   /*!
-    *  Returns the number of bands available from an image.
-    *  Satisfies pure virtual from ImageHandler class.
-    */
-   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level = 0) const;
-
-   /*!
-    * Returns the number of reduced resolution data sets (rrds).
-    * Note:  The full res image is counted as a data set so an image with no
-    *        reduced resolution data set will have a count of one.
-    */
-   virtual ossim_uint32 getNumberOfDecimationLevels() const;
-
-   /*!
-    * Returns the zero based image rectangle for the reduced resolution data
-    * set (rrds) passed in.  Note that rrds 0 is the highest resolution rrds.
-    */
-   virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level = 0) const;
-
-   /*!
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-   /*!
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix);
-   
-   //! Returns the image geometry object associated with this tile source or NULL if non defined.
-   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
-
-   /*!
-    * Returns the output pixel type of the tile source.
-    */
-   virtual ossimScalarType getOutputScalarType() const;
-
-   /*!
-    * Returns the width of the output tile.
-    */
-   virtual ossim_uint32 getTileWidth() const;
-   
-   /*!
-    * Returns the height of the output tile.
-    */
-   virtual ossim_uint32 getTileHeight() const;
-
-   /*!
-    * Returns the tile width of the image or 0 if the image is not tiled.
-    * Note: this is not the same as the ossimImageSource::getTileWidth which
-    * returns the output tile width which can be different than the internal
-    * image tile width on disk.
-    */
-   virtual ossim_uint32 getImageTileWidth() const;
-
-   /*!
-    * Returns the tile width of the image or 0 if the image is not tiled.
-    * Note: this is not the same as the ossimImageSource::getTileWidth which
-    * returns the output tile width which can be different than the internal
-    * image tile width on disk.
-    */
-   virtual ossim_uint32 getImageTileHeight() const;
-
-   virtual bool isOpen()const;
-   
-   virtual double getNullPixelValue(ossim_uint32 band=0)const;
-
-   virtual double getMinPixelValue(ossim_uint32 band=0)const;
-      
-   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
-
-   virtual ossimObject* getView();
-
-   virtual const ossimObject* getView()const;
-   
-   virtual bool setView(ossimObject*  baseObject);
-
-   void getAllFeatures(std::vector<ossimVpfAnnotationFeatureInfo*>& featureList);
-  
-   void setAllFeatures(std::vector<ossimVpfAnnotationFeatureInfo*>& featureList);
-
-   void transformObjects();
-
-   void computeBoundingRect();
-
-protected:
-   virtual ~ossimVpfTileSource();
-   ossimRefPtr<ossimVpfAnnotationSource> m_AnnotationSource;
-   
-   
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/imaging/ossimWatermarkFilter.h b/include/ossim/imaging/ossimWatermarkFilter.h
deleted file mode 100644
index 8f7bdf4..0000000
--- a/include/ossim/imaging/ossimWatermarkFilter.h
+++ /dev/null
@@ -1,347 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (c) 2005, David Burken, all rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Class declaration of ossimWatermarkFilter.
-// Applies an image or watermark to image.  Positioning is based on mode.
-// Density is base on alpha weight.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimWatermarkFilter.h 16276 2010-01-06 01:54:47Z gpotts $
-#ifndef ossimWatermarkFilter_HEADER
-#define ossimWatermarkFilter_HEADER
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/imaging/ossimImageSourceFilter.h>
-
-/**
- * class ossimWatermarkFilter
- * Applies an image or watermark to image.
- * Positioning is based on mode.
- * Density is base on alpha weight.
- */
-class OSSIMDLLEXPORT ossimWatermarkFilter : public ossimImageSourceFilter
-{
-public:
-
-   enum WatermarkMode
-   {
-      UPPER_LEFT     = 0,
-      UPPER_CENTER   = 1,
-      UPPER_RIGHT    = 2,
-      CENTER         = 3,
-      LOWER_LEFT     = 4,
-      LOWER_CENTER   = 5,
-      LOWER_RIGHT    = 6,
-      UNIFORM_DENSE  = 7,
-      UNIFORM_SPARSE = 8,
-      END            = 9 //< Number of modes.
-   };
-      
-   /** contructor */
-   ossimWatermarkFilter();
-
-   /** @return Short name of filter. */
-   virtual ossimString getShortName()   const;
-
-   /** @return Long name of filter. */
-   virtual ossimString getLongName()    const;
-
-   /** @return Descriptive name of filter. */
-   virtual ossimString getDescription() const;
-
-   /**
-    * @param tile_rect Rectangle to fill tile with.
-    * 
-    * @param resLevel Reduced resolution level to grab from.
-    * 
-    * @return ossimRefPtr<ossimImageData> This is tile that was filled with
-    * tile_rect.
-    *
-    * @note Callers should check the ossimRefPtr::valid method.
-    * The internal pointer of the ossimRefPtr<ossimImageData> can be
-    * null if the tile_rect did not intersect the input connection's
-    * bounding rectangle.
-    */
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect,
-                                               ossim_uint32 resLevel=0);
-   
-   /**
-    * Initializes state of the object from the input connection.
-    */
-   virtual void initialize();
-
-   /**
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    *
-    * Keywords picked saved by saveState
-    * 
-    * filename: my_colormap_file.jpg
-    *
-    * weight: .25
-    * 
-    * watermark_mode:  upper_left
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-   /**
-    * Method to the load (recreate) the state of the object from a keyword
-    * list.
-    *
-    * @param kwl Keyword list to initialize from.
-    *
-    * @param prefix Usually something like: "object1."
-    *
-    * @return This method will alway return true as it is intended to be
-    * used in conjuction with the set methods.
-    *
-    * Keywords picked up by loadState:
-    * 
-    * filename: my_colormap_file.jpg
-    *
-    * weight: .25
-    * 
-    * watermark_mode:  upper_left
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   /**
-    * @param The property to get as a string like "watermark_mode".
-    *
-    * @return ossimRefPt<ossimProperty> holding pointer to ossimProperty
-    * matching string or null pointer if string does not match.
-    *
-    * @note Internal pointer can be null so callers should check prior to
-    * accessing like:
-    * ossimRefPtr<ossimProperty> p = myFilter->getProperty(ossimString("foo"));
-    * if (p.valid() == NULL)
-    * {
-    *    some_error;
-    * }
-    */
-   virtual ossimRefPtr<ossimProperty> getProperty(
-      const ossimString& name)const;
-
-   /**
-    * Set property.
-    *
-    * @param property Property to set if property->getName() matches a
-    * property name of this object.
-    */
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-
-   /**
-    * Adds this objects properties to the list.
-    *
-    * @param propertyNames Array to add to.
-    *
-    * @note This method does not clear propertyNames prior to adding it's
-    * names.
-    */
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-   /**
-    * @param list List initialized with watermark mode strings.
-    *
-    * @note This method clears the "list" prior to stuffing.
-    */
-   void getModeList(vector<ossimString>& list) const;
-
-   /** @return theMode */
-   ossimWatermarkFilter::WatermarkMode getMode() const;
-
-   /** @return theMode as a string like "upper_left". */
-   ossimString getModeString() const;
-
-   /**
-    * Sets theFilename to file.
-    *
-    * @param file The watermark image file.
-    */
-   void setFilename(const ossimFilename& file);
-
-   /**
-    * Sets the filter mode.
-    *
-    * @param mode String representing mode.
-    */
-   void setMode(const ossimString& mode);
-
-   /**
-    * Sets the weight.
-    *
-    * @param weight Weight to use for watermark pixels normalize between
-    * 0.0 and 1.0.
-    */
-   void setWeight(ossim_float64 weight);
-   
-   /**
-    * Print method.  Called by: friend operator<<
-    * 
-    * @return std::ostream&
-    */
-   virtual std::ostream& print(std::ostream& out) const;
-
-protected:
-   /** destructor */
-   virtual ~ossimWatermarkFilter();
-
-   /**
-    * Allocates / recomputes things that are needed.  Clears theDirtyFlag
-    * by setting it to false on success.
-    *
-    * @return true on success, false on error.
-    */
-   bool allocate();
-
-   /**
-    * Attempts to open "theFilename".  This will load "theWatermark" with
-    * the image converting it to the scalar type of the input connection.
-    *
-    * @return true on success, false if no image handler is found for the
-    * image or theInputConnection has not been established.
-    */
-   bool openWatermarkFile();
-   
-   // void verifyEnable();
-
-   /**
-    * Writes watermark(s) to theTile.
-    * Performs theTile->validate() at the end if theTile was touched.
-    */
-   template <class T> void fill(T dummy);
-
-   /**
-    * Computes the bounding rectangles.  These are the rectangles in image
-    * space of the input connection to paint the watermark(s) on.  The start of
-    * each rectangle will be the start of where "theWatermark" is painted.
-    */
-   void getIntersectingRects(vector<ossimIrect>& rects);
-
-   /**
-    * Addes upper left watermark rectangle to rects if it intersects
-    * theTile rect clipped to input bounding rect.
-    *
-    * @param rects Array to add rect to.
-    */
-   void getUpperLeftRect(vector<ossimIrect>& rects);
-   
-   /**
-    * Addes upper center watermark rectangle to rects if it intersects
-    * theTile rect clipped to input bounding rect.
-    *
-    * @param rects Array to add rect to.
-    */
-   void getUpperCenterRect(vector<ossimIrect>& rects);
-   
-   /**
-    * Addes upper right watermark rectangle to rects if it intersects
-    * theTile rect clipped to input bounding rect.
-    *
-    * @param rects Array to add rect to.
-    */
-   void getUpperRightRect(vector<ossimIrect>& rects);
-
-   /**
-    * Addes center watermark rectangle to rects if it intersects
-    * theTile rect clipped to input bounding rect.
-    *
-    * @param rects Array to add rect to.
-    */
-   void getCenterRect(vector<ossimIrect>& rects);
-
-   /**
-    * Addes lower left watermark rectangle to rects if it intersects
-    * theTile rect clipped to input bounding rect.
-    *
-    * @param rects Array to add rect to.
-    */
-   void getLowerLeftRect(vector<ossimIrect>& rects);
-
-   /**
-    * Addes lower center watermark rectangle to rects if it intersects
-    * theTile rect clipped to input bounding rect.
-    *
-    * @param rects Array to add rect to.
-    */
-   void getLowerCenterRect(vector<ossimIrect>& rects);
-   
-   /**
-    * Addes lower right watermark rectangle to rects if it intersects
-    * theTile rect clipped to input bounding rect.
-    *
-    * @param rects Array to add rect to.
-    */
-   void getLowerRightRect(vector<ossimIrect>& rects);
-   
-   /**
-    * Addes rectangles to rects if it intersects
-    * theTile rect clipped to input bounding rect.
-    *
-    * This will repeat the watermark throughout the input bounding rect.
-    *
-    * @param rects Array to add rect to.
-    */
-   void getUniformDenseRects(vector<ossimIrect>& rects);
-   
-   /**
-    * Addes rectangles to rects if it intersects
-    * theTile rect clipped to input bounding rect.
-    *
-    * This will repeat the watermark sparsly throughout the input bounding
-    * rect.
-    * 
-    * @param rects Array to add rect to.
-    */
-   void getUniformSparceRects(vector<ossimIrect>& rects);
-   
-   /** File name of watermark image. */
-   ossimFilename      theFilename;
-
-   /** Normalized between 0.0 and 1.0. */
-   ossim_float64      theWatermarkWeight;
-
-   /** The returned tile. */
-   ossimRefPtr<ossimImageData> theTile;
-
-   /** Tile storage for watermark image. */
-   ossimRefPtr<ossimImageData> theWatermark;
-
-   /** The number of watermark bands. */
-   ossim_uint32 theWatermarkNumberOfBands;
-
-   /** The filter mode. */
-   WatermarkMode      theMode;
-
-   /** The bounding rectangle of the input connection. */
-   ossimIrect theInputBoundingRect;
-
-   /** The number of input bands. */
-   ossim_uint32 theInputNumberOfBands;
-
-   /** The input scalar type. */
-   ossimScalarType theInputScalarType;
-
-   /**
-    * Set in the initialize method this instructs the getTile that something
-    * has changes and it need to call initialize.
-    */
-   bool theDirtyFlag;
-
-
-TYPE_DATA
-      
-}; // End of class ossimWatermarkFilter.
-
-#endif /* #ifndef ossimWatermarkFilter_HEADER */
diff --git a/include/ossim/kbool/_dl_itr.h b/include/ossim/kbool/_dl_itr.h
deleted file mode 100644
index 058f240..0000000
--- a/include/ossim/kbool/_dl_itr.h
+++ /dev/null
@@ -1,407 +0,0 @@
-/*! \file kbool/include/kbool/_dl_itr.h
-    \author Probably Klaas Holwerda 
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: _dl_itr.h 13215 2008-07-23 18:51:54Z dburken $
-*/
-
-//! author="Klaas Holwerda"
-/*
- * Definitions of classes, for list implementation
- * template list and iterator for any list node type
-*/
-
-#ifndef _DL_Iter_H
-#define _DL_Iter_H
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface
-#endif
-
-#include <stdlib.h>
-#include <ossim/kbool/bool_globals.h>
-
-#ifndef _STATUS_ENUM
-#define _STATUS_ENUM
-//!<enum Error codes for List and iterator class
-enum  Lerror  {
-   NO_MES,              /*!<No Message will be generated */
-   NO_LIST,             /*!<List is not attached to the iterator*/
-   NO_LIST_OTHER,       /*!<no attached list on other iter*/
-   AC_ITER_LIST_OTHER,  /*!<iter not allowed on other list  */
-   SAME_LIST,           /*!<same list not allowed*/
-   NOT_SAME_LIST,       /*!<must be same list*/
-   ITER_GT_1,           /*!<more then one iteriter at root*/
-   ITER_GT_0,           /*!<iter not allowed*/
-   ITER_HITROOT,        /*!<iter at root*/
-   NO_ITEM,             /*!<no item at current*/
-   NO_NEXT,             /*!<no next after current*/
-   NO_PREV,             /*!<no prev before current */
-   EMPTY,               /*!<list is empty*/
-   NOT_ALLOW,           /*!<not allowed*/
-   ITER_NEG             /*!<to much iters deleted*/
-};
-#endif
-
-#define SWAP(x,y,t)((t)=(x),(x)=(y),(y)=(t))
-#define RT _list->_root
-#define HD _list->_root->_next
-#define TL _list->_root->_prev
-#define NB _list->_nbitems
-
-template <class Dtype> class DL_List;
-template <class Dtype> class DL_Iter;
-template <class Dtype> class DL_SortIter;
-
-//!   Template class DL_Node
-template <class Dtype>  class DL_Node
-{
-   friend class DL_List<Dtype>;
-   friend class DL_Iter<Dtype>;
-   friend class DL_SortIter<Dtype>;
-   
-   //!Public members
-public:
-   //!Template constructor no contents
-   //!Construct a node for a list object
-   DL_Node();
-   
-   //!constructor with init of Dtype
-   DL_Node( Dtype n );
-   
-   //!Destructor
-   ~DL_Node();
-   
-   //!Public members
-public:
-   //!data in node
-   Dtype _item;
-   
-   //!pointer to next node
-   DL_Node* _next;
-   
-   //!pointer to previous node
-   DL_Node* _prev;
-};
-
-//!Template class DL_List
-template <class Dtype> class DL_List
-{
-   	friend class DL_Iter<Dtype>;
-   	friend class DL_SortIter<Dtype>;
-
-      public:
-		   //!Constructor
-			//!Construct a list object
-			//!!tcarg class | Dtype | list object
-         DL_List();
-
-		   //!destructor
-         ~DL_List();
-
-		   //!Report off List Errors
-   		void Error(const char* function,Lerror a_error);
-
-		   //!Number of items in the list
-         int  count();
-
-		   //!Empty List?
-         bool empty();
-
-		   //!insert the object given at the end of the list, after tail
-         DL_Node<Dtype>* insend( Dtype n );
-
-		   //!insert the object given at the begin of the list, before head
-         DL_Node<Dtype>* insbegin( Dtype n );
-
-		   //!remove the object at the begin of the list (head)
-         void removehead();
-
-		   //! remove the object at the end of the list (tail)
-         void removetail();
-
-		   //!remove all objects from the list
-         void remove_all( bool deleteObject = false );
-
-		   //!Get the item at the head of the list
-         Dtype headitem();
-
-		   //!Get the item at the tail of the list
-         Dtype tailitem();
-
-         //! to move all objects in a list to this list.
-         void takeover(DL_List<Dtype>* otherlist);
-
-       public:
-		   //!the root node pointer of the list, the first and last node
-         //! in the list are connected to the root node. The root node is used
-         //! to detect the end / beginning of the list while traversing it.
-         DL_Node<Dtype>*  _root;
-
-		   //!the number of items in the list, if empty list it is 0
-         int _nbitems;
-
-         //!number of iterators on the list, Attaching or instantiating an iterator to list,
-         //! will increment this member, detaching and
-         //! destruction of iterator for a list will decrement this number
-         short int _iterlevel;
-};
-
-//!  Template class DL_Iter  for iterator on DL_List
-template <class Dtype>
-class DL_Iter
-{
-	public:
-	   //!Construct an iterator object for a given list of type Dtype
-		DL_Iter(DL_List<Dtype>* newlist);
-
-		//!Constructor of iterator for the same list as another iterator
-		DL_Iter(DL_Iter* otheriter);
-
-		//!Constructor without an attached list
-		DL_Iter();
-
-		//!destructor
-		~DL_Iter();
-
-	   //!Report off Iterator Errors
-		void 	  Error(const char* function,Lerror a_error);
-
-//                bool isAttached()const;
-
-      //!This attaches an iterator to a list of a given type.
-		void    Attach(DL_List<Dtype>* newlist);
-
-      //!This detaches an iterator from a list
-      void    Detach();
-
-      //!execute given function for each item in the list/iterator
-		void 	  foreach_f(void (*fp) (Dtype n) );
-
-		//! list mutations
-
-	   //!insert after tail item
-		DL_Node<Dtype>*  insend(Dtype n);
-
-	   //!insert before head item
-		DL_Node<Dtype>* insbegin(Dtype n);
-
-	   //!insert before current iterator position
-        DL_Node<Dtype>* insbefore(Dtype n);
-
-	   //!insert after current iterator position
-		DL_Node<Dtype>* insafter(Dtype n);
-
-      //!to move all objects in a list to the list of the iterator.
-		void    takeover(DL_List<Dtype>* otherlist);
-
-      //!to move all objects in a list (using iterator of that list) to the list of the iterator
-		void    takeover(DL_Iter* otheriter);
-
-      //! to move maxcount objects in a list (using iterator of that list) to the list of the iterator
-      void    takeover(DL_Iter* otheriter, int maxcount);
-
-      //!remove object at current iterator position from the list.
-		void    remove();
-
-	   //!Remove head item
-		void    removehead();
-
-	   //!Remove tail item
-		void    removetail();
-
-	   //!Remove all items
-		void    remove_all();
-
-
-		/*		void 	  foreach_mf(void (Dtype::*mfp)() ); //call Dtype::mfp for each item */
-
-	   //!is list empty (contains items or not)?
-		bool  empty();
-
-	   //!is iterator at root node (begin or end)?
-		bool  hitroot();
-
-	   //!is iterator at head/first node?
-		bool  athead();
-
-	   //!is iterator at tail/last node?
-		bool  attail();
-
-      //!is given item member of the list
-		bool  has(Dtype otheritem);
-
-	   //!Number of items in the list
-		int count();
-
-		/* cursor movements */
-
-		//!go to last item,  if list is empty goto hite
-      void 	totail();
-
-		//!go to first item, if list is empty goto hite
-      void 	tohead();
-
-		//!set the iterator position to the root (empty dummy) object in the list.
-		void 	toroot();
-
-		//! set the iterator position to next object in the list ( can be the root also).
-		void    operator++      (void);
-
-      //!set iterator to next item (pre fix)
-		void    operator++      (int);
-
-		//!set the iterator position to previous object in the list ( can be the root also)(postfix).
-		void    operator--      (void);
-
-		//!set the iterator position to previous object in the list ( can be the root also)(pre fix).
-		void    operator--      (int);
-
-      //!set the iterator position n objects in the next direction ( can be the root also).
-		void    operator>>      (int);
-
-      //!set the iterator position n objects in the previous direction ( can be the root also).
-		void    operator<<      (int);
-
-      //!set the iterator position to next object in the list, if this would be the root object,
-      //!then set the iterator at the head object
-      void next_wrap();
-
-      //!set the iterator position to previous object in the list, if this would be the root object,
-		//!then set the iterator at the tail object
-      void prev_wrap();
-
-      //!move root in order to make the current node the tail
-      void reset_tail();
-
-      //!move root in order to make the current node the head
-      void reset_head();
-
-      //!put the iterator at the position of the given object in the list.
-		bool toitem(Dtype);
-
-      //!put the iterator at the same position as the given iterator in the list.
-		void toiter(DL_Iter* otheriter);
-
-      //!put the iterator at the position of the given node in the list.
-		bool tonode(DL_Node<Dtype>*);
-
-      //!iterate through all items of the list
-		bool iterate(void);
-
-		//!To get the item at the current iterator position
-		Dtype item();
-
-        //! get node at iterator
-        DL_Node<Dtype>* node();
-
-		//!sort list with mergesort
-		void mergesort(int (*fcmp) (Dtype, Dtype));
-
-		//!sort list with cocktailsort
-        /*! 
-                \return number of swaps done.
-          */
-		int cocktailsort(int (*)(Dtype,Dtype), bool (*)(Dtype,Dtype)=NULL);
-
-	protected:
-
-		//!sort list with mergesort
-		void mergesort_rec(int (*fcmp)(Dtype,Dtype), DL_Node<Dtype> *RT1,int n);
-
-		//!sort list with mergesort
-		void mergetwo(int (*fcmp)(Dtype,Dtype), DL_Node<Dtype> *RT1,DL_Node<Dtype> *RT2);
-
-		//!set the iterator position to next object in the list ( can be the root also).
-		void next();
-
-		//!set the iterator position to previous object in the list ( can be the root also).
-		void prev();
-
-      //!the list for this iterator
-		DL_List<Dtype> *_list;
-
-      //!the current position of the iterator
-		DL_Node<Dtype> *_current;
-};
-
-
-//!  template class DL_StackIter class for stack iterator on DL_List
-template <class Dtype>
-class DL_StackIter :protected DL_Iter<Dtype>
-{
-	public:
-	   //!Constructor of stack iterator for given list
-		DL_StackIter(DL_List<Dtype> *);
-	   //!Constructor of stack iterator no list attached
-		DL_StackIter();
-
-	   //!Destructor of stack iterator
-		~DL_StackIter();
-
-	   //!Remove all items from the stack
-		void remove_all();
-	   //!push given item on the stack
-		void push(Dtype n);
-      //!get last inserted item from stack
-		Dtype pop();
-   	//!is stack empty?
-		bool empty();
-      //!number of items on the stack
-		int count();
-};
-
-//!template class DL_SortIter
-template <class DType> class DL_SortIter :public DL_Iter<DType>
-{
-	public:
-	   //!Constructor of sort iterator for given list and sort function
-		DL_SortIter(DL_List<DType>* nw_list, int (*new_func)(DType ,DType ));
-
-	   //!Constructor of sort iterator with sort function and no list attached
-		DL_SortIter(int (*newfunc)(DType,DType));
-
-	   //!Destructor of sort iterator
-		~DL_SortIter();
-
-      //!insert item in sorted order
-		void insert (DType new_item);
-
-      /*override following functions to give an error */
-	   //!Not allowed
-		void   insend (bool n){sortitererror();};
-	   //!Not allowed
-		void   insbegin (bool n){sortitererror();};
-	   //!Not allowed
-      void   insbefore (bool n){sortitererror();};
-	   //!Not allowed
-		void   insafter (bool n){sortitererror();};
-	   //!Not allowed
-		void   takeover (DL_List<DType>*){sortitererror();};
-	   //!Not allowed
-		void   takeover (DL_Iter<DType>*){sortitererror();};
-	   //!Not allowed
-		void   takeover (DL_Iter<DType>* otheriter, int maxcount){sortitererror();};
-	   //!Not allowed
-      void   next_wrap() {sortitererror();};
-	   //!Not allowed
-      void   prev_wrap() {sortitererror();};
-	   //!Not allowed
-      void   reset_tail() {sortitererror();};
-	   //!Not allowed
-      void   reset_head() {sortitererror();};
-
-	private:
-	   //!Report off Iterator Errors
-      void sortitererror();
-
-		//!comparefunction used to insert items in sorted order
-		int  (*comparef)(DType, DType);
-};
-
-#include <ossim/kbool/_dl_itr.inc>
-
-#endif
diff --git a/include/ossim/kbool/_dl_itr.inc b/include/ossim/kbool/_dl_itr.inc
deleted file mode 100644
index d53d9db..0000000
--- a/include/ossim/kbool/_dl_itr.inc
+++ /dev/null
@@ -1,2448 +0,0 @@
-/*! \file kbool/include/kbool/_dl_itr.cpp
-    \brief Double Linked list with Iterators on list
-    \author Probably Klaas Holwerda
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: _dl_itr.inc 13215 2008-07-23 18:51:54Z dburken $
-*/
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#ifdef __UNIX__
-#include <ossim/kbool/_dl_itr.h>
-#endif
-
-//=======================================================================
-// implementation class DL_Node
-//=======================================================================
-/*! \class DL_Node
-* This class is used in the class DL_List to contain the items of the list. This can be a
-* pointer to an object or the object itself. The class contains a next and a previous pointer
-* to connect the nodes in the list. \n
-* class Dtype | Object stored at the node
-*/
-#include <string>
-
-
-/*!
-Construct a node for a list object
-\param it Item the node will contain
-*/
-template <class Dtype>
-DL_Node<Dtype>::DL_Node(Dtype it)	// + init nodeitem
-:_item(it)
-{}
-
-/*!
- Template constructor no contents
- Construct a node for a list object
-*/
-template <class Dtype>
-DL_Node<Dtype>::DL_Node()
-:_item(0)
-{}
-
-/*!
-Destruct a node object
-*/
-template <class Dtype>
-DL_Node<Dtype>::~DL_Node()
-{
-}
-
-
-//=======================================================================
-// implementation class DL_List
-//=======================================================================
-/*! \class DL_List
-* class is the base class for implementing a double linked list. The Root node marks the begining and end of the list. The
-* lists consists of nodes double linked with a next and previous pointer DL_Node The nodes are cyclic connected to the root
-* node. The list is meant to be used with an iterator class, to traverse the nodes. More then 1 iterator can be attached to the
-* list. The list keeps track of the number of iterators that are attached to it. Depending on this certain operations are allowed
-* are not. For instance a node can only be deleted if there is only one iterator attached to the list.
-* class | Dtype | Object contaning List Nodes
-*/
-
-/*!
-Construct a node object
-\par Example:
-    How to construct a list of type integer:
-\code
-	DL_List<int> * a_list = new DL_List<int>();
-\endcode
-*/
-template <class Dtype>
-DL_List<Dtype>::DL_List()
-   :_nbitems(0), _iterlevel(0) 
-{
-	_root = new DL_Node<Dtype>();
-   _root->_next=_root;
-   _root->_prev=_root;
-}
-
-
-/*!
-//Destruct a list object
-\par Example:
-    How to construct a list of type integer:
-\code
-   DL_List<int> * a_list = new DL_List<int>(); # declaration and allocation
-   delete a_list; #delete it (must have no iterators attached to it)
-\endcode
-*/
-template <class Dtype>
-DL_List<Dtype>::~DL_List()
-{
-// 	if (_iterlevel != 0)
-//       throw Bool_Engine_Error("DL_List::~DL_List()\n_iterlevel > 0 ","list error", 0, 1); 
-
-   if(_root)
-   {
-      remove_all(false);
-      delete _root;
-   }
-   _root=0;_nbitems=0; //reset memory used (no lost pointers)
-}
-
-/*!
-Error report for list error inside DL_List class
-the error function is used internally in the list class to report errors,
-the function will generate a message based on the error code.
-Then an exeption will be generated using the global booleng class instance. \n
-tcarg: class | Dtype | item object in list
-\par Example
-   to call error from inside an DL_List class
-\code
-Error("remove_all",ITER_GT_O);
-\endcode
-\param function string that generated this error
-\param error code to generate a message for
-*/
-template <class Dtype>
-void DL_List<Dtype>::Error(const char* function,Lerror a_error)
-{
-	std::string buf = "DL_List<Dtype>::";
-	buf += ((function?function:""));
-   switch (a_error)
-   {
-		case NO_MES:             buf += ""; break;
-		case EMPTY:              buf += "list is empty"; break;
-		case ITER_GT_0:          buf += "more then zero iter"; break;
-		case NO_LIST:            buf += "no list attached"; break;
-		case SAME_LIST:          buf += "same list not allowed"; break;
-		case AC_ITER_LIST_OTHER: buf += "iter not allowed on other list"; break;
-		default:						 buf += "unhandled error"; break;
-   }
-#if 0	
-   char buf[100];
-   strcpy(buf,"DL_List<Dtype>::");
-   strcat(buf,function);
-   switch (a_error)
-   {
-		case NO_MES:             strcat(buf,""); break;
-		case EMPTY:              strcat(buf,"list is empty"); break;
-		case ITER_GT_0:          strcat(buf,"more then zero iter"); break;
-		case NO_LIST:            strcat(buf,"no list attached"); break;
-		case SAME_LIST:          strcat(buf,"same list not allowed"); break;
-		case AC_ITER_LIST_OTHER: strcat(buf,"iter not allowed on other list"); break;
-		default:						 strcat(buf,"unhandled error"); break;
-   }
-#endif
-	throw Bool_Engine_Error((char*)buf.c_str(),"list error", 0, 1); 
-}
-
-/*!
-is list empty (contains items or not)? \n
-class | Dtype | item object in list
-\return returns true is list is empty else false
-\par Example
-   too see if list is empty
-\code
-kboolDL_List<int> _intlist; #create a list of integers
-
-          if (_intlist.Empty())
-
-                  cout << "empty";
-\endcode
-*/
-template <class Dtype>
-bool DL_List<Dtype>::empty()
-{
-	return(bool)(_nbitems==0);
-}
-
-/*!
-   number of items in list \n
-   class | Dtype | item object in list
-\return return number of items in the list
-\par Example
-   too see if list contains only one object
-\code
-DL_List <int> _intlist; #create a list of integers
-
-          if (_intlist.count() == 1)
-
-                  cout << "one object in list";
-\endcode
-*/
-template <class Dtype>
-int DL_List<Dtype>::count()
-{
-	return _nbitems;
-}
-
-/*!
- remove all objects from the list\n
- class | Dtype | item object in list
-\note
- The objects itself are not deleted, only removed from the list.
- The user is responsible for memory management.
-
-\note
-   The iterator level must be zero to be able to use this function,
-   else an error will be generated
-
-\note
-   Use this function if an iterator is not needed to do more complex things.
-   This will save time, since the iterator does not have to be created.
-\par Example
-   too insert integer a and b into list and remove_all directly
-\code
-   DL_List<int> _intlist; #create a list of integers
-   int a=123;
-
-   int b=345;
-
-   _intlist.insbegin(a);
-
-   _intlist.insbegin(b);
-
-   _intlist.remove_all();
-\endcode
-*/
-template <class Dtype>
-void DL_List<Dtype>::remove_all( bool deleteObject )
-{
-// 	if (_iterlevel > 0 )
-// 		Error("remove_all()",ITER_GT_0);
-   
-   Dtype* obj; 
-   
-   DL_Node<Dtype> *node;
-   for (int i=0; i<_nbitems; i++)
-   {
-      node = _root->_next;
-      _root->_next = node->_next;
-      if ( deleteObject == true )
-      {    
-         obj=(Dtype*)(node->_item);
-         delete obj; 
-      }
-      delete node;
-   }
-   _nbitems=0;_iterlevel=0;  //reset memory used (no lost pointers)
-   _root->_prev=_root;
-}
-
-/*!
-remove the object at the begin of the list (head).
-\note
- The object itself is not deleted, only removed from the list.
- The user is responsible for memory management.
-
-\note
- The iterator level must be zero to be able to use this function, else an error will be generated
-
-\note
- The list must contain objects, else an error will be generated.
-
-\note
-Use this function if an iterator is not needed to do more complex things. This will save time, since the iterator does not
-have to be created.
-
-\par Example:
-    too insert integer a at begin of list and remove it directly.
-\code
-DL_List<int> _intlist; #create a list of integers
-
-         int a=123;
-
-         _intlist.insbegin(a)
-
-         _intlist.removehead();
-
-\endcode
-*/
-template <class Dtype>
-void DL_List<Dtype>::removehead()
-{
-// 	if (_iterlevel > 0 )
-// 		Error("removehead()",ITER_GT_0);
-	if(_nbitems==0)
-		Error("removehead()",EMPTY);
-
-	DL_Node<Dtype>* node=_root->_next;
-
-	node->_prev->_next = node->_next; // update forward link
-	node->_next->_prev = node->_prev; // update backward link
-
-	_nbitems--;
-	delete node;                      // delete list node
-}
-
-
-/*!
-remove the object at the begin of the list (head).
-
-\note
-   - The object itself is not deleted, only removed from the list.
-     The user is responsible for memory management.
-   - The iterator level must be zero to be able to use this function,
-     else an error will be generated
-   - The list must contain objects, else an error will be generated.
-   - Use this function if an iterator is not needed to do more complex things.
-     This will save time, since the iterator does not have to be created.
-
-\par Example:
-    too insert integer a at end of list and remove it directly.
-\code
-DL_List<int> _intlist; #create a list of integers
-
-         int a=123;
-
-         _intlist.insend(a)
-
-         _intlist.removetail();
-
-\endcode
-*/
-template <class Dtype>
-void DL_List<Dtype>::removetail()
-{
-// 	if (_iterlevel > 0)
-// 		Error("removetail()",ITER_GT_0);
-	if (_nbitems==0)
-		Error("removehead()",EMPTY);
-
-	DL_Node<Dtype>* node=_root->_prev;
-
-   node->_prev->_next = node->_next; // update forward link
-   node->_next->_prev = node->_prev; // update backward link
-
-   _nbitems--;
-   delete node;                      // delete list node
-}
-
-/*!
-insert the object given at the end of the list, after tail
-\note
-The iterator level must be zero to be able to use this function,
-else an error will be generated
-
-\note
-Use this function if an iterator is not needed to do more complex things.
-This will save time, since the iterator does not have to be created.
-\par Example:
-too insert integer a at end of list
-\code
-			DL_List<int> _intlist; #create a list of integers
-
-         int a=123;
-
-         _intlist.insend(a)
-\endcode
-\param newitem an object for which the template list was generated
-*/
-template <class Dtype>
-DL_Node<Dtype>* DL_List<Dtype>::insend(Dtype newitem)
-{
-// 	if (_iterlevel > 0)
-// 		Error("insend()",ITER_GT_0);
-
-	DL_Node<Dtype>* newnode = new DL_Node<Dtype>(newitem);
-
-   newnode ->_next = _root;
-   newnode ->_prev = _root->_prev;
-   _root->_prev->_next = newnode;
-   _root->_prev = newnode;
-
-	_nbitems++;
-    
-    return newnode;
-}
-
-/*!
-insert the object given at the begin of the list, before head
-\note
-The iterator level must be zero to be able to use this function,
-else an error will be generated
-
-\note
-Use this function if an iterator is not needed to do more complex things.
-This will save time, since the iterator does not have to be created.
-
-\par Example:
-too insert integer a at begin of list
-\code
-			DL_List<int> _intlist; #create a list of integers
-
-         int a=123;
-
-         _intlist.insbegin(a)
-\endcode
-\param newitem an object for which the template list was generated
-*/
-template <class Dtype>
-DL_Node<Dtype>* DL_List<Dtype>::insbegin(Dtype newitem)
-{
-// 	if (_iterlevel > 0)
-// 		Error("insbegin()",ITER_GT_0);
-
-	DL_Node<Dtype>* newnode = new DL_Node<Dtype>(newitem);
-
-   newnode ->_prev = _root;
-   newnode ->_next = _root->_next;
-   _root->_next->_prev = newnode;
-   _root->_next = newnode;
-
-	_nbitems++;
-    return newnode;
-}
-
-/*!
-get head item
-\return returns the object at the head of the list.
-\par Example:
-   too insert integer a and b into list and make c be the value of b
-   which is at head of list|
-\code
-				DL_List<int> _intlist; #create a list of integers
-
-          int a=123;
-
-          int b=345;
-
-          int c;
-
-          _intlist.insbegin(a)
-
-          _intlist.insbegin(b)
-          c=_intlist.headitem()
-\endcode
-*/
-template <class Dtype>
-Dtype DL_List<Dtype>::headitem()
-{
-	return _root->_next->_item;
-}
-
-/*!
-get tail item
-\return returns the object at the tail/end of the list.
-\par Example:
-   too insert integer a and b into list and make c be the value of b which
-   is at the tail of list
-\code
-				DL_List<int> _intlist; #create a list of integers
-
-          int a=123;
-
-          int b=345;
-
-          int c;
-          _intlist.insbegin(a)
-          _intlist.insbegin(b)
-
-          c=_intlist.headitem()
-\endcode
-*/
-template <class Dtype>
-Dtype DL_List<Dtype>::tailitem()
-{
-	return _root->_prev->_item;
-}
-
-/*!
-* \note
-  The iterator level must be zero to be able to use this function, else an error will be generated
-
-* \note  The list may not be the same list as this list
-* \param otherlist the list to take the items from
-*/
-template <class Dtype>
-void DL_List<Dtype>::takeover(DL_List<Dtype>* otherlist)
-{
-	if (otherlist==0)
-		Error("takeover(DL_List*)",NO_LIST);
-	// no iterators allowed on otherlist
-// 	if (otherlist->_iterlevel > 0)
-// 		Error("takeover(DL_List*)",AC_ITER_LIST_OTHER);
-	// otherlist not this list
-	else if (otherlist == this)
-		Error("takeover(DL_List*)",SAME_LIST);
-
-	if (otherlist->_nbitems == 0)
-		return;
-
-	//link other list into this list at the end
-   _root->_prev->_next=otherlist->_root->_next;
-   otherlist->_root->_next->_prev=_root->_prev;
-   otherlist->_root->_prev->_next=_root;
-   _root->_prev=otherlist->_root->_prev;
-
-	//empty other list
-	_nbitems+=otherlist->_nbitems;
-	otherlist->_nbitems=0;
-	otherlist->_root->_next=otherlist->_root;
-	otherlist->_root->_prev=otherlist->_root;
-}
-
-//=======================================================================
-// implementation class DL_Iter
-//=======================================================================
-/*! \class DL_Iter
- template iterator for any list/node type\n
- This class is the base class to attach/instantiate an iterator on a double linked list. \n
- DL_List The iterator is used to traverse and perform functions on the nodes of a list.  \n
- More then 1 iterator can be attached to a list. The list keeps track of the
- number of iterators that are attached to it. \n
- Depending on this certain operations are allowed are not. For instance a node can
- only be deleted if there is only one iterator attached to the list. \n
- class | Dtype | Object for traversing a DL_List of the same Dtype
-// \par Example
-   to insert integer a and b into list and remove_all directly using an iterator
-\code
-     DL_List<int>* a_list = new DL_List<int>(); // declaration and allocation
-
-     int a=123;
-
-     int b=345;
-
-     {
-
-             DL_Iter<int>*  a_listiter=new DL_Iter<int>(a_list);
-
-             a_listiter->insbegin(a)
-
-             a_listiter->insbegin(b)
-
-             a_listiter->remove_all()
-
-     } //to destruct the iterator before the list is deleted
-
-     delete a_list; #delete it (must have no iterators attached to it)
-\endcode
-*/
-
-/*!
- Error report for list error inside DL_Iter class
- the error function is used internally in the iterator class to report errors,
- the function will generate a message based on the error code.
- Then an exception will be generated using the global booleng class instance.|
- \par Example
- to call error from inside an DL_List class|
- \code
- Error("remove_all",ITER_GT_O);
- \endcode
- \param function: function string that generated this error
- \param a_error:  error code to generate a message for
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::Error(const char* function,Lerror a_error)
-{
-	std::string buf;
-	buf += "DL_Iter<Dtype>::";
-	buf += ((function)?function:"");
-   switch (a_error)
-   {
-		case NO_MES:             break;
-		case NO_LIST:            buf += "no list attached"; break;
-		case NO_LIST_OTHER:      buf += "no list on other iter"; break;
-		case AC_ITER_LIST_OTHER: buf += "iter not allowed on other list"; break;
-		case SAME_LIST:          buf +="same list not allowed"; break;
-		case NOT_SAME_LIST:      buf +="must be same list"; break;
-		case ITER_GT_1:          buf +="more then one iter"; break;
-		case ITER_HITROOT:          buf +="iter at root"; break;
-		case NO_ITEM:            buf +="no item at current"; break;
-		case NO_NEXT:            buf +="no next after current"; break;
-		case NO_PREV:            buf +="no prev before current"; break;
-		case EMPTY:              buf +="list is empty"; break;
-		case NOT_ALLOW:          buf +="not allowed"; break;
-		case ITER_NEG:           buf +="to much iters deleted"; break;
-		default:						 buf +="unhandled error"; break;
-   }
-#if 0
-   char buf[100];
-   strcpy(buf,"DL_Iter<Dtype>::");
-   strcat(buf,function);
-   switch (a_error)
-   {
-		case NO_MES:             strcat(buf,""); break;
-		case NO_LIST:            strcat(buf,"no list attached"); break;
-		case NO_LIST_OTHER:      strcat(buf,"no list on other iter"); break;
-		case AC_ITER_LIST_OTHER: strcat(buf,"iter not allowed on other list"); break;
-		case SAME_LIST:          strcat(buf,"same list not allowed"); break;
-		case NOT_SAME_LIST:      strcat(buf,"must be same list"); break;
-		case ITER_GT_1:          strcat(buf,"more then one iter"); break;
-		case ITER_HITROOT:          strcat(buf,"iter at root"); break;
-		case NO_ITEM:            strcat(buf,"no item at current"); break;
-		case NO_NEXT:            strcat(buf,"no next after current"); break;
-		case NO_PREV:            strcat(buf,"no prev before current"); break;
-		case EMPTY:              strcat(buf,"list is empty"); break;
-		case NOT_ALLOW:          strcat(buf,"not allowed"); break;
-		case ITER_NEG:           strcat(buf,"to much iters deleted"); break;
-		default:						 strcat(buf,"unhandled error"); break;
-   }
-  #endif	
-   throw Bool_Engine_Error((char*)buf.c_str(),"list error", 0, 1); 
-}
-
-/*!
-   Construct an iterator object for a given list of type Dtype \n
-   tcarg: class | Dtype | list item object
-\par Example
-    How to construct a list of type integer and an iterator for it:
-\code
-    DL_List<int>* IntegerList;
-    IntegerList = new DL_List<int>();
-    DL_Iter<int>*  a_listiter=new DL_Iter<int>(IntegerList);
-\endcode
-\param newlist: list for the iterator
-*/
-template <class Dtype>
-DL_Iter<Dtype>:: DL_Iter(DL_List<Dtype>* newlist)
-:_list(newlist), _current(RT)
-{
-//    if(_list)
-//    {
-//       _list->_iterlevel++;                    // add 1 to  DL_Iters on list
-//    }
-}
-
-/*!
-This constructs an iterator for a list using an other iterator on the same list,
-The new iterator will be pointing to the same list item as the other iterator.\n
-tcarg: class | Dtype | list item object
-\par Example
-   How to construct a list of type integer and a second iterator for it:|
-\code
-	DL_List<int>* IntegerList;
-
-  IntegerList = new DL_List<int>();
-
- DL_Iter<int>*  a_listiter=new DL_Iter<int>(IntegerList);
-
- DL_Iter<int>*  a_secondlistiter=new DL_Iter<int>(a_listiter);
-\endcode
-\param otheriter other iterator on same list
-*/
-template <class Dtype>
-DL_Iter<Dtype>:: DL_Iter(DL_Iter* otheriter)
-:_list(0), _current(0)
-{
-   if(otheriter)
-   {
-      if (otheriter->_current==0)
-         Error("DL_Iter(otheriter)",NO_LIST_OTHER);
-      _list=otheriter->_list;
-//       _list->_iterlevel++;                    // add 1 to DL_Iters on List
-      _current=otheriter->_current;
-   }
-   else
-   {
-      _list = 0;
-      _current = 0;
-   }
-}
-
-/*!
-This constructs an iterator for a list of a given type, the list does not have to exist.
-Later on when a list is constructed,the iterator can be attached to it.
-This way an iterator to a specific list can be made static to a class, and can be used
-for several lists at the same time. \n
-tcarg: class | Dtype | list item object
-
-\par Example
-   How to construct an iterator, without having a list first.
-   This constructs an iterator for a list of the given type, but the list thus not yet exist.
-\code
-   DL_Iter<int>*  a_iter=new DL_Iter<int>();
-
-   DL_List<int>* IntegerList;
-
-   IntegerList = new DL_List<int>();
-
-   a_iter.Attach(IntegerList);
-
-   a_iter.insend(123);
-
-   a_iter.Detach();
-\endcode
-*/
-template <class Dtype>
-DL_Iter<Dtype>:: DL_Iter()
-:_list(0), _current(0)
-{
-}
-
-/*!
-destruct an iterator for a list of a given type.
-*/
-template <class Dtype>
-DL_Iter<Dtype>::~DL_Iter()
-{
-   if(_list)
-   {
-      if (_current==0)
-         return;
-//       _list->_iterlevel--;              // decrease iterators
-//       if (_list->_iterlevel < 0)
-//          Error("~DL_Iter()",ITER_NEG);
-   }
-}
-
-
-// template <class Dtype>
-// bool DL_Iter<Dtype>::isAttached()const
-// {
-//    return (_list != 0);
-// }
-
-/*!
-This attaches an iterator to a list of a given type, the list must exist.
-This way an iterator to a specific list can be made
-static to a class, and can be used for several lists at the same time.\n
-!tcarg: class | Dtype | list item object
-\par Example
-   How to construct an iterator, without having a list first, and attach an iterator later:|
-\code
-DL_Iter<int>*  a_iter=new DL_Iter<int>();
-
-DL_List<int>* IntegerList;
-
-IntegerList = new DL_List<int>();
-
-a_iter.Attach(IntegerList);
-
-a_iter.insend(123);
-
-a_iter.Detach();
-\endcode
-\param newlist the list to attached the iterator to
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::Attach(DL_List<Dtype>* newlist)
-{
-//    if (_current!=0)
-//       Error("Attach(list)",NOT_ALLOW);
-   _list=newlist;
-   _current=HD;
-//    _list->_iterlevel++;                    // add 1 to  DL_Iters on list
-}
-
-/*!
-This detaches an iterator from a list of a given type, the list must exist.
-This way an iterator to a specific list can be made static to a class,
-and can be used for several lists at the same time. \n
-!tcarg: class | Dtype | list item object
-\par Example:
-How to construct an iterator, without having a list first, and attach an iterator later:
-\code
-DL_Iter<int>*  a_iter=new DL_Iter<int>();
-
-DL_List<int>* IntegerList;
-
-IntegerList = new DL_List<int>();
-
-a_iter.Attach(IntegerList);
-
-a_iter.insend(123);
-
-a_iter.Detach();
-\endcode
-\param newlist: the list to attached the iterator to
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::Detach()
-{
-//    if(!_list)
-//    {
-//       _current = 0;
-//       return;
-//    }
-//    if (_current==0)
-//       Error("Attach()",NO_LIST);
-//    if(_list->iterlevel > 0)
-//    {
-//        _list->_iterlevel--;                    // subtract 1 from DL_Iters on list
-//    }
-   _list=0;
-   _current=0;
-}
-
-/*
-// copy pointers to items from other list
-template <class Dtype> void DL_Iter<Dtype>::merge(DL_List<Dtype>* otherlist)
-{
-	DL_Node* node=otherlist->HD; //can be 0 if empty
-	for(int i=0; i<otherlist->NB; i++)
-	{
-	  insend(node->new_item);  // insert item at end
-	  node=node->_next;        // next item of otherlist
-	}
-}
-*/
-/*
-//call Dtype::mfp for each item
-template <class Dtype>
-void DL_Iter<Dtype>::foreach_mf(void (Dtype::*mfp)())
-{
-	DL_Node<Dtype>* node=HD; //can be 0 if empty
-   for(int i=0; i< NB; i++)
-   {
-     ((node->_item).*mfp)();
-     node=node->_next;
-   }
-}
-*/
-
-
-/*! call given function for each item*/
-template <class Dtype>
-void DL_Iter<Dtype>::foreach_f(void (*fp) (Dtype n) )
-{
-	DL_Node<Dtype>* node=HD; //can be 0 if empty
-   for(int i=0; i< NB; i++)
-   {
-     fp (node->_item);
-     node=node->_next;
-   }
-}
-
-
-/*!
-to move all objects in a list to the list of the iterator.
-\note
- The iterator level must be one to be able to use this function,
- else an error will be generated
-
-\note
- The list may not be the same list as the iterator list
-\par Example
- to take over all items in _intlist|
-\code
-DL_List<int> _intlist; #create a list of integers
-
-DL_List<int> _intlist2; #create a list of integers
-
-int a=123;
-
-DL_Iter<int>*  a_listiter2=new DL_Iter<int>(&_intlist2);
-
-_intlist->insend(a) // insert at end
-
-a_listiter2->takeover(_intlist)
-\endcode
-\param otherlist  the list to take the items from
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::takeover(DL_List<Dtype>* otherlist)
-{
-	if (_current==0)
-		Error("takeover(DL_List*)",NO_LIST);
-	// no iterators allowed on otherlist
-// 	if (otherlist->_iterlevel > 0)
-// 		Error("takeover(DL_List*)",AC_ITER_LIST_OTHER);
-	// otherlist not this list
-	else if (otherlist == _list)
-		Error("takeover(DL_List*)",SAME_LIST);
-
-	if (otherlist->_nbitems == 0)
-		return;
-
-	//link other list into this list at the end
-   TL->_next=otherlist->_root->_next;
-   otherlist->_root->_next->_prev=TL;
-   otherlist->_root->_prev->_next=RT;
-   TL=otherlist->_root->_prev;
-   
-   //empty other list
-   NB+=otherlist->_nbitems;
-   otherlist->_nbitems=0;
-   otherlist->_root->_next=otherlist->_root;
-   otherlist->_root->_prev=otherlist->_root;
-}
-
-
-/*!
-to move all objects in a list (using iterator of that list) to the list of the iterator.
-\note
-   The iterator level for both iterators must be one to be able to use this function,
-
-\note
-   else an error will be generated
-
-\note
-   The list may not be the same list as the iterator list
-
-\par Example
-   to take over all items in a_listiter1 it's list|
-\code
-DL_List<int> _intlist; #create a list of integers
-
-DL_List<int> _intlist2; #create a list of integers
-
-int a=123;
-
-DL_Iter<int>*  a_listiter1=new DL_Iter<int>(&_intlist);
-
-DL_Iter<int>*  a_listiter2=new DL_Iter<int>(&_intlist2);
-
-a_listiter1->insend(a) // insert at end
-
-a_listiter2->takeover(a_listiter1)
-\\!to move all objects in a list (using iterator of that list) to the list of the iterator
-\endcode
-\param otheriter: the iterator to take the items from
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::takeover(DL_Iter* otheriter)
-{
-	if (otheriter->_current==0)
-		Error(" DL_Iter",NO_LIST_OTHER);
-	if (_current==0)
-		Error(" DL_Iter",NO_LIST);
-
-	// only one iterator allowed on other list?
-// 	if (otheriter->_list->_iterlevel > 1)
-// 		Error("takeover(DL_Iter*)",AC_ITER_LIST_OTHER);
-	// otherlist not this list?
-	else if (otheriter->_list == _list)
-		Error("takeover(DL_Iter*)",SAME_LIST);
-
-	if (otheriter->NB == 0)
-		return;
-
-   //link other list into this list at the end
-   TL->_next=otheriter->HD;
-   otheriter->HD->_prev=TL;
-   otheriter->TL->_next=RT;
-   TL=otheriter->TL;
-
-	//empty other iter & list
-	NB+=otheriter->NB;
-	otheriter->NB=0;
-	otheriter->HD=otheriter->RT;
-	otheriter->TL=otheriter->RT;
-	otheriter->_current=otheriter->RT;
-}
-
-/*!
-to move maxcount objects in a list (using iterator of that list)
-to the list of the iterator.
-\note The iterator level for both iterators must be one to be able to use this function,
-    else an error will be generated
-
-\note The list may not be the same list as the iterator list
-
-\note If less then maxcount objects are available in the source iterator,
-    all of them are taken and no error will accur
-
-\par Example
- to take over 1 item from a_listiter1 it's list
-\code
-DL_List<int> _intlist; #create a list of integers
-
-DL_List<int> _intlist2; #create a list of integers
-
-int a=123;
-
-DL_Iter<int>*  a_listiter1=new DL_Iter<int>(&_intlist);
-
-DL_Iter<int>*  a_listiter2=new DL_Iter<int>(&_intlist2);
-
-a_listiter1->insend(a) // insert at end
-
-a_listiter2->takeover(a_listiter1,1);
-//! to move maxcount objects in a list (using iterator of that list) to the list of the iterator
-\endcode
-\param otheriter the iterator to take the items from
-\param maxcount  maximum number of objects to take over
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::takeover(DL_Iter* otheriter, int maxcount)
-{
-	if (otheriter->_current==0)
-           Error("takeover(DL_Iter*,int)",NO_LIST_OTHER);
-	if (_current==0)
-		Error("takeover(DL_Iter*,int)",NO_LIST);
-
-// 	if (otheriter->_list->_iterlevel > 1)
-// 		Error("takeover(DL_Iter*,int)",AC_ITER_LIST_OTHER);
-	else if (otheriter->_list == _list)
-		Error("takeover(DL_Iter*,int)",SAME_LIST);
-
-	if (maxcount<0)
-		Error("takeover(DL_Iter*,int), maxcount < 0",NO_MES);
-
-	if (otheriter->NB == 0)
-		return;
-
-
-	if (otheriter->NB <= maxcount)
-	{  //take it all
-      //link other list into this list at the end
-      TL->_next=otheriter->HD;
-      otheriter->HD->_prev=TL;
-      otheriter->TL->_next=RT;
-      TL=otheriter->TL;
-
-      //empty other iter & list
-      NB+=otheriter->NB;
-      otheriter->NB=0;
-      otheriter->HD=otheriter->RT;
-      otheriter->TL=otheriter->RT;
-      otheriter->_current=otheriter->RT;
-	}
-	else
-	{  //take maxcount elements from otheriter
-      //set cursor in otherlist to element maxcount
-		DL_Node<Dtype>* node;
-
-  		if (NB/2 < maxcount)
-      {	// this is faster (1st half)
-			node=otheriter->HD;
-         for(int i=1; i<maxcount; i++)
-           node=node->_next;
-		}
-		else
-		{	// no, this is faster (2nd half)
-			node=otheriter->TL;
-         for(int i=NB; i>maxcount+1; i--)
-           node=node->_prev;
-		}
-
-		// link this->tail to other->head
-		if (NB>0)
-		{
-         TL->_next=otheriter->HD;
-         otheriter->HD->_prev=TL;
-		}
-		else	// target is empty
-      {
-			HD=otheriter->HD;
-			otheriter->HD->_prev=RT;
-      }
-
-		// set other root to node-> next (after last to copy)
-		otheriter->HD=node->_next;
-		otheriter->HD->_prev=otheriter->RT;
-
-		// set this->tail to other->item()->prev (last element to be copied)
-		TL=node;
-      node->_next=RT;
-
-		// still need to update element counter
-		NB+=maxcount;
-
-		// update other list
-		otheriter->NB-=maxcount;
-		otheriter->_current=otheriter->HD;	// other->current is moved to this!
-	}
-}
-
-
-/*!
-put the iterator root object before the current iterator position in the list.
-The current object will become the new head of the list.
-\note The iterator level must be one to be able to use this function,
-else an error will be generated
-
-\par Example
- move the root object to make the new head the old tail object|
-\code
-DL_List <int> _intlist; #create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insend(1234);
-a_listiter->insend(2345);
-a_listiter->insend(3456);
-a_listiter->totail();
-a_listiter->reset_head();
-a_listiter->tohead(); //the new head will be at object 3456
-\endcode
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::reset_head()
-{
-	if (_current==0)
-		Error("reset_head()",NO_LIST);
-// 	if (_list->_iterlevel > 1 )
-// 		Error("reset_head()",ITER_GT_1);
-
-	if(_current==RT)
-		Error("reset head()",ITER_HITROOT);
-
-   //link out RT
-   HD->_prev=TL;
-   TL->_next=HD;
-
-   //link in RT before current
-   HD=_current;
-   TL=_current->_prev;
-
-   TL->_next=RT;
-   HD->_prev=RT;
-}
-
-/*!
-put the iterator root object after the current iterator position in the list.
-The current object will become the new tail of the list.
-\note
- The iterator level must be one to be able to use this function,
-  else an error will be generated
-\par Example
- move the root object to make the new tail the old head object
-\code
-DL_List <int> _intlist; #create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insend(1234);
-a_listiter->insend(2345);
-a_listiter->insend(3456);
-a_listiter->tohead();
-a_listiter->reset_tail();
-a_listiter->totail(); //the new tail will be at object 1234
-\endcode
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::reset_tail()
-{
-	if (_current==0)
-		Error("reset_tail()",NO_LIST);
-// 	if (_list->_iterlevel > 1 )
-// 		Error("reset_tail()",ITER_GT_1);
-
-	if(_current==RT)
-		Error("reset head()",ITER_HITROOT);
-
-   //link out RT
-   HD->_prev=TL;
-   TL->_next=HD;
-
-   //link in RT after current
-   TL=_current;
-   HD=_current->_next;
-
-   HD->_prev=RT;
-   TL->_next=RT;
-}
-
-/*!
-is list empty (contains items or not)?
-\return returns true is list is empty else false
-\par exmaple:
-   too see if list is empty
-\code
-DL_List<int> _intlist; #create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-if (a_listiter->Empty())
-   cout << "empty"
-\endcode
-*/
-template <class Dtype>
-bool DL_Iter<Dtype>::empty()
-{
-   if (_current==0)
-      Error("empty()",NO_LIST);
-   
-   return(bool)(NB==0);
-}
-
-/*!
-is the iterator at the root of the list.
-\note Traversing the list in a certain direction using a while loop,
-the end can be tested with this function.
-\return returns true if the iterator is at the root of the list (after the last/tail/head object), else false.
-\par example:
-   to traverse in both directions|
-\code
-DL_List <int> _intlist; #create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->tohead();
-//traverse forwards
-while ( ! a_listiter->hitroot())
-{
-	cout << "The item =" << a_listiter->item();
-	a_listiter++; //goto next object
-}
-
-a_listiter->totail();
-//traverse backwards
-while ( ! a_listiter->hitroot())
-{
- 	cout << "The item =" << a_listiter->item();
- 	a_listiter--; //goto next object
-}
-\endcode
-*/
-template <class Dtype>
-bool DL_Iter<Dtype>::hitroot()
-{
-	if (_current==0)
-		Error("hitroot()",NO_LIST);
-
-	return(bool)(_current == RT);
-}
-
-/*!
-is the iterator at the head of the list.
-\return returns true if the iterator is at the head object of the list, else false.
-\par exmaple:
-   too see the object at the head
-\code
-DL_List <int> _intlist; #create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->tohead();
-if (a_listiter->athead())
-      cout << "at the head The item =" << a_listiter->item();
-\endcode
-*/
-template <class Dtype>
-bool DL_Iter<Dtype>::athead()
-{
-	if (_current==0)
-		Error("athead()",NO_LIST);
-
-	return(bool)(_current == HD);
-}
-
-/*!
-is the iterator at the tail of the list.
-\return returns true if the iterator is at the tail object of the list,
- else false.
-\par Example
- too see the object at the tail|
-\code
-DL_List <int> _intlist; #create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->totail();
-if (a_listiter->attail())
-      cout << "at the tail The item =" << a_listiter->item();
-\endcode
-*/
-template <class Dtype>
-bool DL_Iter<Dtype>::attail()
-{
-	if (_current==0)
-		Error("attail()",NO_LIST);
-
-	return(bool)(_current == TL);
-}
-
-/*!
-does the iterator/list contain the given object
-\return returns true if the iterator/list contains the given object in the list, else false.
-\par Example
-   too see if the object is already in the list
-\code
-DL_List <int> _intlist; #create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-a_listiter->insend(1234);
-
-if (a_listiter->has(1234))
-   cout << "yes it does";
-\endcode
-\param otheritem item to search for
-*/
-template <class Dtype>
-bool DL_Iter<Dtype>::has(Dtype otheritem)
-{
-   if (_current==0)
-      Error("has()",NO_LIST);
-   
-   DL_Node<Dtype>* node=HD; //can be 0 if empty
-   for(int i=0; i<NB; i++)
-   { if (node->_item == otheritem)
-         return true;
-      node=node->_next;
-   }
-   return false;
-}
-
-/*!
-number of items in list
-\return  number of items in the list
-\par Example:
-   to see if a list contains only one object
-\code
-DL_List <int> _intlist; #create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-if (a_listiter->count() == 1)
-      cout << "one object in list";
-\endcode
-*/
-template <class Dtype>
-int DL_Iter<Dtype>::count()
-{
-   if (_current==0)
-      Error("count()",NO_LIST);
-   
-   return NB;
-}
-
-/*!
-go to first item,  if list is empty goto hite
-\par Example
-   set iterator to head of list
-\code
-DL_List <int> _intlist; #create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insend(1234);
-a_listiter->tohead();
-\endcode
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::tohead()
-{
-   if (_current==0)
-      Error("tohead()",NO_LIST);
-   
-   _current=HD;
-}
-
-/*!
-go to last item,  if list is empty goto hite
-\par Example
-   set iterator to tail of list
-\code
-DL_List <int> _intlist; #create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insend(1234);
-a_listiter->totail();
-\endcode
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::totail()
-{
-   if (_current==0)
-      Error("totail()",NO_LIST);
-   
-   _current=TL;
-}
-
-/*!
-set the iterator position to the root (empty dummy) object in the list.
-\par Example
-   set iterator to root of list and iterate
-\code
-DL_List <int> _intlist; #create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insend(1234);
-a_listiter->toroot();
-while (a_listiter->iterate())
-  cout << a_listiter->item();
-\endcode
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::toroot()
-{
-   if (_current==0)
-      Error("toroot()",NO_LIST);
-
-  _current=RT;
-}
-
-/*!
-set the iterator position to next object in the list ( can be the root also)(prefix).
-\par Example
-how to iterate backwards
-\code
-DL_List <int> _intlist; //create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insend(1234);
-a_listiter->tohead();
-while (!a_listiter->hitroot())
-{
-      cout << a_listiter->item();
-      _listiter++;
-}
-\endcode
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::operator++(void)
-{
-   if (_current==0)
-      Error("operator++()",NO_LIST);
-   
-   _current=_current->_next;
-}
-
-/*!
-set the iterator position to next object in the list ( can be the root also)(prefix).
-\par Example
-how to iterate backwards
-\code
-DL_List <int> _intlist; //create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insend(1234);
-a_listiter->tohead();
-while (!a_listiter->hitroot())
-{
-      cout << a_listiter->item();
-      ++_listiter;
-}
-\endcode
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::operator++(int)
-{
-	if (_current==0)
-		Error("operator++(int)",NO_LIST);
-
-	_current=_current->_next;
-}
-
-
-/*!
-set the iterator position to previous object in the list ( can be the root also)(prefix).
-\par Example
-how to iterate backwards
-\code
-DL_List <int> _intlist; //create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insend(1234);
-a_listiter->totail();
-while (!a_listiter->hitroot())
-{
-      cout << a_listiter->item();
-      _listiter--;
-}
-\endcode
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::operator--(void)
-{
-	if (_current==0)
-		Error("operator++()",NO_LIST);
-
-	_current=_current->_prev;
-}
-
-
-/*!
-set the iterator position to previous object in the list ( can be the root also)(prefix).
-\par Example
-how to iterate backwards
-\code
-DL_List <int> _intlist; //create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insend(1234);
-a_listiter->totail();
-while (!a_listiter->hitroot())
-{
-      cout << a_listiter->item();
-      --_listiter;
-}
-\endcode
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::operator--(int)
-{
-	if (_current==0)
-		Error("operator++(int)",NO_LIST);
-
-	_current=_current->_prev;
-}
-
-
-/*!
-set the iterator position n objects in the next direction ( can be the root also).
-\par Example:
-how to set iterator 2 items forward
-\code
-DL_List <int> _intlist; #create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-a_listiter->insend(1234);
-a_listiter->tohead();
-a_listiter>>2;//at root now
-\endcode
-\param n go n places forward
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::operator>>(int n)
-{
-	if (_current==0)
-		Error("operator>>()",NO_LIST);
-
-	for(int i=0; i<n; i++)
- 	   _current=_current->_next;
-}
-
-
-/*!
-set the iterator position n objects in the previous direction ( can be the root also).
-\par Example:
-   how to set iterator 2 items backwards
-\code
-DL_List <int> _intlist; #create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-a_listiter->insend(1234);
-a_listiter->totail();
-a_listiter<<2;//at root now
-\endcode
-\param n go n places back
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::operator<<(int n)
-{
-	if (_current==0)
-		Error("operator<<()",NO_LIST);
-
-	for(int i=0; i<n; i++)
-		_current=_current->_prev;
-}
-
-
-/*!
-put the iterator at the position of the given object in the list.
-\return returns true if the object was in the list, else false
-\par Example:
-  goto element 2345
-\code
-DL_List <int> _intlist; #create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insend(1234);
-a_listiter->insend(2345);
-a_listiter->insend(3456);
-
-a_listiter->toitem(2345); template <class Dtype>
-\endcode
-*/
-template <class Dtype>
-bool DL_Iter<Dtype>::toitem(Dtype item)
-{
-	if (_current==0)
-		Error("toitem(item)",NO_LIST);
-	DL_Node<Dtype>* node=HD; //can be 0 if empty
-	for(int i=0; i<NB; i++)
-	{ if (node->_item == item)
-	  {
-		  _current = node;
-			return true;
-	  }
-	  node=node->_next;
-	}
-	return false;
-}
-
-/*!
-put the iterator at the same position as the given iterator in the list.
-\par Example:
-  goto element 2345 and let a_listiter2 point to the same position
-\code
-DL_List <int> _intlist; #create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-DL_Iter<int>*  a_listiter2=new DL_Iter<int>(&_intlist);
-
-a_listiter->insend(1234);
-a_listiter->insend(2345);
-a_listiter->insend(3456);
-a_listiter->toitem(2345);
-a_listiter2->toiter(a_listiter2);
-\endcode
-\param otheriter other iterator to let this iterator point to.
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::toiter(DL_Iter *otheriter)
-{
-	if (otheriter->_current==0)
-		Error("toiter(otheriter)",NO_LIST);
-	// both iters must have the same list
-	if (_list != otheriter->_list)
-		Error("toiter(otheriter)",NOT_SAME_LIST);
-
-	_current = otheriter->_current;
-}
-
-
-/*!
-put the iterator at the position of the given object in the list.
-\note  DO NOT use this function. Normally you will not be able to address the nodes in a list.
-\return  returns true if the node was in the list, else false
-\param othernode a node to let this iterator point to.
-*/
-template <class Dtype>
-bool DL_Iter<Dtype>::tonode(DL_Node<Dtype> *othernode)
-{
-   DL_Node<Dtype>* node=HD; //can be 0 if empty  //node is a temporary cursor
-   for(int i=0; i<NB; i++)
-   { if (node == othernode)
-      {
-         _current = othernode;
-         return true;
-      }
-      node=node->_next;
-   }
-   return false;
-}
-
-/*!
-advance the iterator one position in the next direction in the list.
-\return  returns true if not at the end/root of the list else false.
-
-\note  This function combines iteration and testing for the end of
-the list in one.
-
-\note  Therefore we do not have to advance the iterator ourselves.
-
-\note
-The iterator is first put to the next object, before testing for the end of the list. |
-This is why we need to start at the root element in general usage.
-
-\par Example
-   iterate through all the items in a list
-\code
-DL_List <int> _intlist; #create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insend(1234);
-a_listiter->insend(2345);
-a_listiter->insend(3456);
-a_listiter->tobegin(2345);
-
-while (a_listiter->iterate())
-{ cout << a_listiter->item(); }
-\endcode
-*/
-template <class Dtype>
-bool DL_Iter<Dtype>::iterate(void)
-{
-   if (_current==0)
-      Error("iterate()",NO_LIST);
-   
-   _current=_current->_next;
-   if (_current==RT)
-      return false;
-   return true;
-}
-
-/*!
-To get the item at the current iterator position
-\return  returns the object where the iterator is pointing to at the moment.
-\note
-If the iterator is at the root of the list an error will be generated,
-since there is no item there.
-\par Example:
-   get the element at the head of the list|
-\code
-DL_List <int> _intlist; //create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insend(1234);
-a_listiter->tohead();
-int theitem=a_listiter->item();
-\endcode
-*/
-template <class Dtype>
-Dtype DL_Iter<Dtype>::item()
-{
-	if (_current==0)
-		Error("item()",NO_LIST);
-	if (_current==RT)
-		Error("item()",NO_ITEM);
-
-	return _current->_item;
-}
-
-//! get the node at iterater position
-template <class Dtype>
-DL_Node<Dtype>* DL_Iter<Dtype>::node()
-{
-	if (_current==0)
-		Error("item()",NO_LIST);
-	if (_current==RT)
-		Error("item()",NO_ITEM);
-
-	return _current;
-}
-
-/*!
-set the iterator position to next object in the list ( can be the root also).
-\note  Use this function inside a new class derived from DL_Iter.
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::next()
-{
-	if (_current==0)
-		Error("item()",NO_LIST);
-
-   _current=_current->_next;
-}
-
-
-/*!
-set the iterator position to next object in the list, if this would be the root object,
-then set the iterator at the head object
-\par Example
-cycle the list twice
-\code
-DL_List <int> _intlist; #create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insend(1234);
-a_listiter->insend(2345);
-a_listiter->tohead();
-
-int count=2*a_listiter->count();
-while (count)
-{
-      cout << a_listiter->item();
-      next_wrap();
-      count--;
-}
-\endcode
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::next_wrap()
-{
-	if (_current==0)
-		Error("item()",NO_LIST);
-
-   _current=_current->_next;
-	if (_current==RT)
-	   _current=_current->_next;
-}
-
-
-/*!
-set the iterator position to previous object in the list ( can be the root also).
-\note  Use this function inside a new class derived from DL_Iter.
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::prev()
-{
-	if (_current==0)
-		Error("item()",NO_LIST);
-
-   _current=_current->_prev;
-}
-
-/*!
-set the iterator position to previous object in the list, if this would be the root object,
-then set the iterator at the tail object
-\par Example
-cycle the list twice
-\code
-DL_List <int> _intlist; #create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insend(1234);
-a_listiter->insend(2345);
-a_listiter->totail();
-
-int count=2*a_listiter->count();
-while (count)
-{
-      cout << a_listiter->item();
-      prev_wrap();
-      count--;
-}
-\endcode
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::prev_wrap()
-{
-	if (_current==0)
-		Error("item()",NO_LIST);
-
-   _current=_current->_prev;
-	if (_current==RT)
-	   _current=_current->_prev;
-}
-
-template <class Dtype>
-void DL_Iter<Dtype>::remove_all()
-{
-	if (_current==0)
-		Error("remove_all()",NO_LIST);
-// 	if (_list->_iterlevel > 1 )
-// 		Error("remove_all()",ITER_GT_1);
-
-// 	_list->_iterlevel--;
-   _list->remove_all();
-// 	_list->_iterlevel++;
-	_current=RT;
-}
-
-/*!
-remove object at current iterator position from the list.
-\note  The object itself is not deleted, only removed from the list. The user is responsible for memory management.
-
-\note  The iterator level must be one to be able to use this function, else an error will be generated
-
-\note  The list must contain an object at the current iterator position, else an error will be generated.
-\par Example:
-   to insert integer a at begin of list and remove it directly
-\code
-DL_List<int> _intlist; #create a list of integers
-
-int a=123;
-
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insbegin(a);
-
-a_listiter->tohead();
-
-a_listiter->remove();
-\endcode
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::remove()
-{
-	if (_current==0)
-		Error("remove()",NO_LIST);
-// 	if (_list->_iterlevel > 1 )
-// 		Error("remove()",ITER_GT_1);
-   if (_current==RT)
-		Error("remove()",ITER_HITROOT);
-
-	DL_Node<Dtype>* node=_current;
-
-	_current=_current->_next;
-
-   node->_prev->_next = node->_next; // update forward link
-   node->_next->_prev = node->_prev; // update backward link
-
-	NB--;
-	delete node;                      // delete list node
-}
-
-/*!
-remove the object at the begin of the list using an iterator
-\note  The object itself is not deleted, only removed from the list. The user is responsible for memory management.
-
-\note  The iterator level must be one to be able to use this function, else an error will be generated
-
-\note  The list must contain objects, else an error will be generated.
-
-\note  Use this function if an iterator is needed to do more complex things. Else use the list member functions directly.
-\par Example:
-   to insert integer a at begin of list and remove it directly|
-\code
-DL_List<int> _intlist; #create a list of integers
-
-int a=123;
-
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insbegin(a);
-a_listiter->removehead();
-\endcode
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::removehead()
-{
-	if (_current==0)
-		Error("removehead()",NO_LIST);
-// 	if (_list->_iterlevel > 1 )
-// 		Error("removehead()",ITER_GT_1);
-	if(NB==0)
-		Error("removehead()",EMPTY);
-
-   if (_current==HD)
-		_current=_current->_next;
-
-// 	_list->_iterlevel--;
-   _list->removehead();
-// 	_list->_iterlevel++;
-}
-
-
-/*!
-//remove the object at the end of the list using an iterator
-\note  The object itself is not deleted, only removed from the list. The user is responsible for memory management.
-
-\note  The iterator level must be one to be able to use this function, else an error will be generated
-
-\note  The list must contain objects, else an error will be generated.
-
-\note  Use this function if an iterator is needed to do more complex things. Else use the list member functions directly.
-\par Example:
-   to insert integer a at end of list and remove it directly
-\code
-DL_List<int> _intlist; #create a list of integers
-
-int a=123;
-
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insend(a);
-a_listiter->removetail();
-\endcode
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::removetail()
-{
-	if (_current==0)
-		Error("removetail()",NO_LIST);
-// 	if (_list->_iterlevel > 1 )
-// 		Error("removetail()",ITER_GT_1);
-	if (NB==0)
-		Error("removehead()",EMPTY);
-
-   if (_current==TL)
-		_current=_current->_prev;
-
-// 	_list->_iterlevel--;
-   _list->removetail();
-// 	_list->_iterlevel++;
-
-}
-
-/*!
-insert the object given at the end of the list
-
-\note  The iterator level must be one to be able to use this function, else an error will be generated
-
-\note  Use this function if an iterator is needed to do more complex things. Else use the list member functions directly.
-\par Example:
-   to insert integer a at end of list|
-\code
-DL_List<int> _intlist; #create a list of integers
-
-int a=123;
-
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insend(a);
-\endcode
-*/
-template <class Dtype>
-DL_Node<Dtype>* DL_Iter<Dtype>::insend(Dtype newitem)
-{
-	if (_current==0)
-		Error("insend()",NO_LIST);
-// 	if (_list->_iterlevel > 1)
-// 		Error("insend()",ITER_GT_1);
-
-// 	_list->_iterlevel--;
-   DL_Node<Dtype>* ret = _list->insend(newitem);
-// 	_list->_iterlevel++;
-    return ret;
-}
-
-
-/*!
-insert the object given at the begin of the list
-\note  The iterator level must be one to be able to use this function, else an error will be generated
-
-\note  Use this function if an iterator is needed to do more complex things. Else use the list member functions directly.
-
-\par Example:
- to insert integer a at begin of list|
-\code
-DL_List<int> _intlist; #create a list of integers
-
-int a=123;
-
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insbegin(a);
-\endcode
-\param newitem an object for which the template list/iterator was generated
-*/
-template <class Dtype>
-DL_Node<Dtype>* DL_Iter<Dtype>::insbegin(Dtype newitem)
-{
-	if (_current==0)
-		Error("insbegin()",NO_LIST);
-// 	if (_list->_iterlevel > 1)
-// 		Error("insbegin()",ITER_GT_1);
-
-// 	_list->_iterlevel--;
-   DL_Node<Dtype>* ret = _list->insbegin(newitem);
-// 	_list->_iterlevel++;
-    return ret;    
-}
-
-/*!
-//insert the object given before the current position of the iterator in list
-\note  The iterator level must be one to be able to use this function, else an error will be generated
-\par Example:
-   to insert integer before the iterator position in the list|
-\code
-DL_List<int> _intlist; #create a list of integers
-
-int a=123;
-
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-a_listiter->totail();
-a_listiter->insbefore(a);   // insert before tail
-\endcode
-\param newitem an object for which the template list/iterator was generated
-*/
-template <class Dtype>
-DL_Node<Dtype>* DL_Iter<Dtype>::insbefore(Dtype newitem)
-{
-   if (_current==0)
-      Error("insbefore()",NO_LIST);
-// 	if (_list->_iterlevel > 1)
-// 		Error("insbefore()",ITER_GT_1);
-   
-   DL_Node<Dtype>* newnode = new DL_Node<Dtype>(newitem);
-   
-   newnode ->_next = _current;
-   _current->_prev->_next = newnode;
-   newnode ->_prev = _current->_prev;
-   _current->_prev = newnode;
-   
-   NB++;
-   return newnode;
-}
-
-
-/*!
-insert the object given after the current position of the iterator in list
-\note  The iterator level must be one to be able to use this function, else an error will be generated
-\par Example:  to insert integer after the iterator position in the list|
-\code
-DL_List<int> _intlist; #create a list of integers
-
-int a=123;
-
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-a_listiter->tohead();
-a_listiter->insafter(a);   // insert after head
-\endcode
-\param newitem an object for which the template list/iterator was generated
-*/
-template <class Dtype>
-DL_Node<Dtype>* DL_Iter<Dtype>::insafter(Dtype newitem)
-{
-   if (_current==0)
-      Error("insafter()",NO_LIST);
-// 	if (_list->_iterlevel > 1)
-// 		Error("insafter()",ITER_GT_1);
-   
-   DL_Node<Dtype>* newnode = new DL_Node<Dtype>(newitem);
-   
-   newnode ->_next = _current->_next;
-   newnode ->_prev = _current;
-   _current->_next->_prev = newnode;
-   _current->_next = newnode;
-   
-   NB++;
-   
-   return newnode;
-}
-
-/*!
-sort all items in the list according to the compare function.
-when items need to be swapped to reach the right order the swap function will be called also.
-\note  There are no restrictions on the internal decision in the compare function when to return -1,0,1.
-
-\note  The swap function can be used to change items when they are swapped.
-       fcmp (function, fcmp)
-\verbatim
-
-          Declaration: int (*fcmp) (Dtype,Dtype)
-
-          compare function pointer, the function takes two objects in the list. It must return -1, 0, 1, to sort the list in upgoing
-          order the function should return:
-
-               -1 is returned if the first object is bigger then the second.
-               0 is returned if the objects are equal.
-               1 is returned if the first object is smaller then the second.
-
-          To sort the list in downgoing order:
-
-               1 is returned if the first object is bigger then the second.
-               0 is returned if the objects are equal.
-               -1 is returned if the first object is smaller then the second.
-
-          fswap (function, fswap)
-
-          Declaration: void (*fswap) (Dtype,Dtype)
-
-          swap function pointer, the function takes two objects in the list. It will be called when the objects are swapped to
-          reach the right order. If it is NULL, it will not be called.
-\endverbatim
-\par Example:  sort the list in upgoing order using cocktailsort and the function numbersorter|
-\code
-int numbersorter(int a,int b)
-{
-      if(a < b) return(1);
-      else
-      if(a == b) return(0);
-      return(-1);
-}
-
-DL_List <int> _intlist; #create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insend(2345);
-a_listiter->insend(3456);
-a_listiter->insend(1234);
-a_listiter->cocktailsort(numbersorter,NULL);
-\endcode
-\param fcmp sortfunction
-\param fswap swapfunction
-*/
-template <class Dtype>
-int DL_Iter<Dtype>::cocktailsort(int (*fcmp) (Dtype, Dtype), bool (*fswap)(Dtype, Dtype))
-{
-   if (_current==0)
-      Error("cocktailsort()",NO_LIST);
-   if (NB <= 1)
-      return 0;
-   
-   DL_Node<Dtype>* cursor;
-   Dtype swap;
-   
-   int swapResult = 0;
-   
-   // boven/ondergrens setten
-   DL_Node<Dtype> *bg = TL, *bgold = TL;
-   DL_Node<Dtype> *og = HD, *ogold = HD;
-   
-   bool swapped = true;
-   
-   // while swaping is done  &  lowerborder upperborder don't touch
-   while (swapped && (og!=bg))
-   {
-      swapped = false;
-      
-      // BUBBELSLAG  lowerborder--->> upperborder
-      cursor=og;
-      while(!(cursor == bgold))
-      {
-         // (current.next < current)?
-         if( fcmp(cursor->_next->_item, cursor->_item)==1)
-         {
-            // user function
-            if ( fswap != NULL )
-               if ( fswap(cursor->_item, cursor->_next->_item) )
-                  swapResult++;
-            // update swap-flag en upperborder
-            swapped = true;
-            bg = cursor;
-            // swap the items of the nodes
-            swap = cursor->_item;
-            cursor->_item = cursor->_next->_item;
-            cursor->_next->_item = swap;
-         }
-         cursor=cursor->_next;
-      }// end bubbelslag
-      bgold = bg;
-      
-      // BRICKSLAG   lowerborder <<---upperborder
-      cursor=bg;
-      while(!(cursor == ogold))
-      {
-         // (current < current.next)?
-         if( fcmp(cursor->_item, cursor->_prev->_item)==1)
-         {
-            // user function
-            if ( fswap != NULL )
-               if (  fswap(cursor->_item, cursor->_prev->_item) )
-                  swapResult++;
-            // update swap-flag and lowerborder
-            swapped = true;
-            og = cursor;
-            // swap de items van de nodes
-            swap = cursor->_item;
-            cursor->_item = cursor->_prev->_item;
-            cursor->_prev->_item = swap;
-         }
-         cursor=cursor->_prev;
-      }// end brickslag
-      ogold = og;
-   }// end while(ongesorteerd)
-   
-   return swapResult;
-}
-
-/*!
-   sort all items in the list according to the compare function.
-
-\note
-   There are no restrictions on the internal decision in the compare function when to return -1,0,1.
-
-\note
-   For the mergesort function the objects will be swapped when the return value is -1.
-
-\note
-\verbatim
-
-      fcmp (function, fcmp)
-
-         Declaration: int (*fcmp) (Dtype,Dtype)
-
-          compare function pointer, the function takes two objects in the list. It must return -1, 0, 1, to sort the list in upgoing
-          order the function should return:
-
-               -1 is returned if the first object is bigger then the second.
-               0 is returned if the objects are equal.
-               1 is returned if the first object is smaller then the second.
-
-          To sort the list in downgoing order:
-
-               1 is returned if the first object is bigger then the second.
-               0 is returned if the objects are equal.
-               -1 is returned if the first object is smaller then the second.
-\endverbatim
-
-!tcarg: class | Dtype | list item object
-\par example
-   sort the list in upgoing order using mergesort and the function numbersorter|
-\code
-int numbersorter(int a,int b)
-{
-      if(a < b) return(1);
-      else
-      if(a == b) return(0);
-      return(-1);
-}
-
-DL_List <int> _intlist; #create a list of integers
-DL_Iter<int>*  a_listiter=new DL_Iter<int>(&_intlist);
-
-a_listiter->insend(2345);
-a_listiter->insend(3456);
-a_listiter->insend(1234);
-a_listiter->mergesort(numbersorter);
-\endcode
-*/
-template <class Dtype>
-void DL_Iter<Dtype>::mergesort(int (*fcmp) (Dtype, Dtype))
-{
-	if (_current==0)
-		Error("mergesort()",NO_LIST);
- 	mergesort_rec(fcmp, RT, NB);
-}
-
-
-template <class Dtype>
-void DL_Iter<Dtype>::mergesort_rec(int (*fcmp)(Dtype,Dtype), DL_Node<Dtype> *RT1, int n1)
-{
-   if (n1 > 1)  //one element left then stop
-   {
-		DL_Node<Dtype>       RT2;
-	   int n2;
-
-      RT2._prev=RT1->_prev;
-      RT2._next=RT1->_next;
-      // goto middle
-      n2=n1;n1>>=1;n2-=n1;
-      for (int i=0; i <n1;i++)
-         RT2._next=RT2._next->_next;
-
-      //RT2 is at half
-      RT1->_prev->_next=&RT2;
-      RT2._prev=RT1->_prev;
-      RT1->_prev=RT2._next->_prev;
-      RT2._next->_prev->_next=RT1;
-
-     	mergesort_rec(fcmp,RT1,n1);
-     	mergesort_rec(fcmp,&RT2,n2);
-     	mergetwo(fcmp,RT1,&RT2);
-   }
-}
-
-template <class Dtype>
-void DL_Iter<Dtype>::mergetwo(int (*fcmp)(Dtype,Dtype), DL_Node<Dtype> *RT1,DL_Node<Dtype> *RT2)
-{
-	DL_Node<Dtype>       *c,*a,*b;
-   a=RT1->_next;b=RT2->_next;
-   c=RT1;
-   do
-   {
-      if (fcmp(a->_item , b->_item) > -1)
-      { c->_next=a;a->_prev=c;c=a;a=a->_next;}
-      else
-      { c->_next=b;b->_prev=c;c=b;b=b->_next;}
-      if (a == RT1)
-      { 	c->_next=
-          b;b->_prev=c; //connect list b to the list made sofar
-         RT1->_prev=RT2->_prev;
-         RT1->_prev->_next=RT1;
-      	break;
-      }
-      if (b == RT2)
-      { 	c->_next=a;a->_prev=c; //connect list a to the list made sofar
-      	break;
-      }
-   }
-   while (true);
-}
-
-
-//=======================================================================
-// implementation class DL_StackIter
-//=======================================================================
-/*! \class DL_StackIter
-*  template class DL_StackIter class for stack iterator on DL_List
-*  template stack iterator for any list/node type \n
-*  This class is the base class to attach/instantiate a stack iterator on a double linked list
-*  DL_List. The stack iterator is used to push and pop objects
-*  to and from the beginning of a list.
-*  class | Dtype | Object for traversing a DL_List of the same Dtype
-*\par Example
-   How to work with a stack iterator for a list of type integer \n
-   to push a and b, pop a into list and remove_all directly using a stack iterator
-*
-*\code     DL_List<int>* a_list = new DL_List<int>();# declaration and allocation
-*
-*     int a=123;
-*
-*     int b=345;
-*
-*     {
-*
-*             DL_StackIter<int>*  a_listiter=new DL_StackIter<int>(a_list);
-*
-*             a_listiter->push(a)
-*
-*             a_listiter->push(b)
-*
-*             a_listiter->pop()
-*
-*             a_listiter->remove_all()
-*
-*     } //to destruct the iterator before the list is deleted
-*
-*     delete a_list; #delete it (must have no iterators attached to it)
-*\endcode
-*/
-
-// constructor
-template <class Dtype>
-DL_StackIter<Dtype>::DL_StackIter(DL_List<Dtype> *newlist)
-:DL_Iter<Dtype>(newlist)  // initialiseer BaseIter
-{}
-
-
-// destructor
-template <class Dtype>
-DL_StackIter<Dtype>::~DL_StackIter()
-{
-}
-
-// plaats nieuw item op stack
-template <class Dtype>
-void DL_StackIter<Dtype>::push(Dtype newitem)
-{
-	DL_Iter<Dtype>::insbegin(newitem);
-}
-// remove current item
-template <class Dtype>
-void DL_StackIter<Dtype>::remove_all()
-{
-	DL_Iter<Dtype>::remove_all();
-}
-
-// is stack leeg?
-template <class Dtype>
-bool DL_StackIter<Dtype>::empty()
-{
-	return DL_Iter<Dtype>::empty();
-}
-
-// aantal items op stack
-template <class Dtype>
-int  DL_StackIter<Dtype>::count()
-{
-	return DL_Iter<Dtype>::count();
-}
-
-// haal bovenste item van stack
-template <class Dtype>
-Dtype DL_StackIter<Dtype>::pop()
-{
-	if(DL_Iter<Dtype>::empty())
-		this->Error("pop()",EMPTY);
-
-	DL_Iter<Dtype>::tohead();
-	Dtype temp = DL_Iter<Dtype>::item();
-	DL_Iter<Dtype>::removehead();
-	return temp;
-}
-
-//=======================================================================
-// implementation class DL_SortIter
-//=======================================================================
-/*! \class DL_SortIter
-* template class DL_SortIter
-* class for sort iterator on DL_List
-* template sort iterator for any list/node type
-* This class is a derived class to attach/instantiate a sorted iterator on a double linked list
-* DL_List. The iterator is used to insert items in sorted order into a list.
-//!tcarg: class | Dtype | Object for traversing a DL_List of the same Dtype
-*/
-
-// constructor
-template <class DType>
-DL_SortIter<DType>::DL_SortIter(DL_List<DType>* nw_list, int (*new_func)(DType ,DType ))
-:DL_Iter<DType>(nw_list), comparef(new_func)
-{}
-
-// destructor
-template <class DType>
-DL_SortIter<DType>::~DL_SortIter()
-{}
-
-// general function to insert item
-template <class DType>
-void DL_SortIter<DType>::insert(DType new_item)
-{
-	DL_Node<DType>* cursor=this->_current; //can be 0 if empty  //node is a temporary cursor
-
-	// if list is empty directly insert
-	if (DL_Iter<DType>::empty())
-	{
-		DL_Iter<DType>::insend(new_item);
-	}
-	else
-	{
-		// put new item left of item
-		DL_Iter<DType>::tohead();
-		while(!DL_Iter<DType>::hitroot())
-		{
-			if (!(*comparef)(DL_Iter<DType>::item(), new_item))
-				break;
-			DL_Iter<DType>::next();
-		}
-
-		//if at root
-		DL_Iter<DType>::insbefore(new_item);
-	}
-
-	this->_current=cursor; //set to old cursor position
-}
-
-template <class DType>
-void DL_SortIter<DType>::sortitererror()
-{
-   this->Error("sortiter()",NOT_ALLOW);
-}
-
-
diff --git a/include/ossim/kbool/_lnk_itr.h b/include/ossim/kbool/_lnk_itr.h
deleted file mode 100644
index 9d2045e..0000000
--- a/include/ossim/kbool/_lnk_itr.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/*! \file kbool/include/kbool/_lnk_itr.h
-    \author Probably Klaas Holwerda
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: _lnk_itr.h 9094 2006-06-13 19:12:40Z dburken $
-*/
-
-//! author="Klaas Holwerda"
-//! version="1.0"
-/*
- * Definitions of classes, for list implementation
- * template list and iterator for any list node type
-*/
-#ifndef _LinkBaseIter_H
-#define _LinkBaseIter_H
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface
-#endif
-
-//! headerfiles="_dl_itr.h stdlib.h misc.h gdsmes.h"
-#include <stdlib.h>
-#include <ossim/kbool/booleng.h>
-
-#define SWAP(x,y,t)((t)=(x),(x)=(y),(y)=(t))
-
-#include <ossim/kbool/_dl_itr.h>
-
-//! codefiles="_dl_itr.cpp"
-
-//!  Template class TDLI
-/*!
- class for iterator on DL_List<void*> that is type casted version of DL_Iter
- \sa DL_Iter for further documentation
-*/
-template<class Type> class TDLI : public DL_Iter<void*>
-{
-	public:
-		//!constructor
-      /*!
-      \param list to iterate on.
-      */
-		TDLI(DL_List<void*>* list);
-
- 		//!constructor
-	   TDLI(DL_Iter<void*>* otheriter);
-
-		//! nolist constructor
-		TDLI();
-
-		//! destructor
-		~TDLI();
-
-		//!call fp for each item
-      void 	  foreach_f(void (*fp) (Type* item) );
-
-      //!call fp for each item
-      void 	  foreach_mf(void (Type::*fp) () );
-
-		/* list mutations */
-
-
-		//! delete all items
-		void    delete_all		();
-
-
-      //! insert at end
-		void    insend		      (Type* n);
-
-      //! insert at begin
-		void    insbegin		   (Type* n);
-
-      //! insert before current
-		void    insbefore       (Type* n);
-
-      //! insert after current
-		void    insafter        (Type* n);
-
-      //! insert at end unsave (works even if more then one iterator is on the list
-      //! the user must be sure not to delete/remove items where other iterators
-      //! are pointing to.
-		void    insend_unsave	 (Type* n);
-
-      //! insert at begin unsave (works even if more then one iterator is on the list
-      //! the user must be sure not to delete/remove items where other iterators
-      //! are pointing to.
-		void    insbegin_unsave	 (Type* n);
-
-      //! insert before iterator position unsave (works even if more then one iterator is on the list
-      //! the user must be sure not to delete/remove items where other iterators
-      //! are pointing to.
-		void    insbefore_unsave (Type* n);
-
-      //! insert after iterator position unsave (works even if more then one iterator is on the list
-      //! the user must be sure not to delete/remove items where other iterators
-      //! are pointing to.
-		void    insafter_unsave  (Type* n);
-
-      //! \sa DL_Iter::takeover(DL_List< Dtype >* otherlist )
-		void    takeover        (DL_List<void*>* otherlist);
-      //! \sa DL_Iter::takeover(DL_Iter* otheriter)
-		void    takeover        (TDLI* otheriter);
-      //! \sa DL_Iter::takeover(DL_Iter* otheriter, int maxcount)
-		void    takeover        (TDLI* otheriter, int maxcount);
-
-      //! \sa DL_Iter::has
-		bool  has             (Type*);
-      //! \sa DL_Iter::toitem
-		bool  toitem          (Type*);
-
-      //!get the item then iterator is pointing at
-      Type*   item            ();
-
-      //! \sa DL_Iter::mergesort
-		void    mergesort             (int (*f)(Type* a,Type* b));
-      //! \sa DL_Iter::cocktailsort
-		int  cocktailsort( int (*) (Type* a,Type* b), bool (*) (Type* c,Type* d) = NULL);
-
-};
-
-//!  Template class TDLIsort
-/*!
-// class for sort iterator on DL_List<void*> that is type casted version of DL_SortIter
-// see also inhereted class DL_SortIter for further documentation
-*/
-template<class Type> class TDLISort : public DL_SortIter<void*>
-{
-	public:
-
-      //!constructor givin a list and a sort function
-		TDLISort(DL_List<void*>* list, int (*newfunc)(void*,void*));
-		~TDLISort();
-
-      //!delete all items from the list
-		void    		 delete_all();
-		bool       has     (Type*);
-		bool       toitem  (Type*);
-		Type* item    ();
-};
-
-//!  Template class TDLIStack
-/*!
- class for iterator on DL_List<void*> that is type casted version of DL_StackIter
- see also inhereted class DL_StackIter for further documentation
-*/
-template<class Type> class TDLIStack : public DL_StackIter<void*>
-{
-   public:
-      //constructor givin a list
-		TDLIStack(DL_List<void*>* list);
-
-		~TDLIStack();
-
-		void            push(Type*);
-		Type*           pop();
-};
-
-#include <ossim/kbool/_lnk_itr.inc>
-
-#endif
diff --git a/include/ossim/kbool/_lnk_itr.inc b/include/ossim/kbool/_lnk_itr.inc
deleted file mode 100644
index 7057ff4..0000000
--- a/include/ossim/kbool/_lnk_itr.inc
+++ /dev/null
@@ -1,269 +0,0 @@
-/*! \file kbool/include/kbool/_lnk_itr.cpp
-    \author Probably Klaas Holwerda
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: _lnk_itr.inc 9094 2006-06-13 19:12:40Z dburken $
-*/
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#ifdef __UNIX__
-#include <ossim/kbool/_lnk_itr.h>
-#endif 
-
-//=======================================================================
-// implementation class LinkBaseIter
-//=======================================================================
-
-template<class Type>
-TDLI<Type>::TDLI(DL_List<void*>* newlist):DL_Iter<void*>(newlist)
-{
-}
-
-template<class Type>
-TDLI<Type>::TDLI(DL_Iter<void*>* otheriter):DL_Iter<void*>(otheriter)
-{
-}
-
-template<class Type>
-TDLI<Type>::TDLI():DL_Iter<void*>()
-{
-}
-
-// destructor TDLI
-template<class Type>
-TDLI<Type>::~TDLI()
-{
-}
-
-template<class Type>
-void TDLI<Type>::delete_all()
-{
-   DL_Node<void*>* node;
-   Type* obj;
-   for (int i=0; i< NB; i++)
-   {
-      node = HD;
-      HD = node->_next;
-      obj=(Type*)(node->_item);
-      delete obj;
-      delete node;
-   }
-   NB=0; //reset memory used (no lost pointers)
-   TL=RT;
-   _current=RT;
-}
-
-template<class Type>
-void TDLI<Type>::foreach_f(void (*fp) (Type* item) )
-{
-   DL_Iter<void*>::foreach_f( (void (*)(void*))fp); //call fp for each item
-}
-
-template<class Type>
-void TDLI<Type>::foreach_mf(void (Type::*mfp) ())
-{
-
-   DL_Node<void*>* node=HD; //can be 0 if empty
-   Type* obj;
-   for(int i=0; i< NB; i++)
-   {
-     obj=(Type*)(node->_item);
-     (obj->*mfp)();
-     node=node->_next;
-   }
-}
-
-template<class Type>
-void TDLI<Type>::takeover(DL_List<void*>* otherlist)
-{
-   DL_Iter<void*>::takeover( (DL_List<void*>*) otherlist);
-}
-
-template<class Type>
-void TDLI<Type>::takeover(TDLI* otheriter)
-{
-   DL_Iter<void*>::takeover( (DL_Iter<void*>*) otheriter);
-}
-
-template<class Type>
-void TDLI<Type>::takeover(TDLI* otheriter,int maxcount)
-{
-   DL_Iter<void*>::takeover( (DL_Iter<void*>*) otheriter,maxcount);
-}
-
-// is item element of the list?
-template<class Type>
-bool TDLI<Type>::has(Type* otheritem)
-{
-   return DL_Iter<void*>::has( (void*) otheritem);
-}
-
-// goto to item
-template<class Type>
-bool TDLI<Type>::toitem(Type* item)
-{
-   return DL_Iter<void*>::toitem( (void*) item);
-}
-
-// get current item
-template<class Type>
-Type*    TDLI<Type>::item()
-{
-   return (Type*) DL_Iter<void*>::item();
-}
-
-template<class Type>
-void TDLI<Type>::insend(Type* newitem)
-{
-   DL_Iter<void*>::insend( (void*) newitem);
-}
-
-template<class Type>
-void TDLI<Type>::insbegin(Type* newitem)
-{
-   DL_Iter<void*>::insbegin( (void*) newitem);
-}
-
-template<class Type>
-void TDLI<Type>::insbefore(Type* newitem)
-{
-   DL_Iter<void*>::insbefore( (void*) newitem);
-}
-
-template<class Type>
-void TDLI<Type>::insafter(Type* newitem)
-{
-   DL_Iter<void*>::insafter( (void*) newitem);
-}
-
-template<class Type>
-void TDLI<Type>::insend_unsave(Type* newitem)
-{
-//    short int iterbackup=_list->_iterlevel;
-//    _list->_iterlevel=0;
-   DL_Iter<void*>::insend( (void*) newitem);
-//    _list->_iterlevel=iterbackup;
-}
-
-template<class Type>
-void TDLI<Type>::insbegin_unsave(Type* newitem)
-{
-//    short int iterbackup=_list->_iterlevel;
-//    _list->_iterlevel=0;
-   DL_Iter<void*>::insbegin( (void*) newitem);
-//    _list->_iterlevel=iterbackup;
-}
-
-template<class Type>
-void TDLI<Type>::insbefore_unsave(Type* newitem)
-{
-//    short int iterbackup=_list->_iterlevel;
-//    _list->_iterlevel=0;
-   DL_Iter<void*>::insbefore( (void*) newitem);
-//    _list->_iterlevel=iterbackup;
-}
-
-template<class Type>
-void TDLI<Type>::insafter_unsave(Type* newitem)
-{
-//    short int iterbackup=_list->_iterlevel;
-//    _list->_iterlevel=0;
-   DL_Iter<void*>::insafter( (void*) newitem);
-//    _list->_iterlevel=iterbackup;
-}
-
-template<class Type>
-void TDLI<Type>::mergesort(int (*f)(Type* a,Type* b))
-{
-   DL_Iter<void*>::mergesort( (int (*)(void*,void*)) f);
-}
-
-template<class Type>
-int TDLI<Type>::cocktailsort(int (*f)(Type* a,Type* b), bool (*f2)(Type* c,Type* d))
-{
-   return DL_Iter<void*>::cocktailsort( (int (*)(void*,void*)) f,( bool(*)(void*,void*)) f2);
-}
-
-template<class Type>
-TDLISort<Type>::TDLISort(DL_List<void*>* lista, int (*newfunc)(void*,void*))
-								 :DL_SortIter<void*>(lista, newfunc)
-{
-}
-
-template<class Type>
-TDLISort<Type>::~TDLISort()
-{
-}
-
-template<class Type>
-void TDLISort<Type>::delete_all()
-{
-   DL_Node<void*>* node;
-   Type* obj;
-   for (int i=0; i< NB; i++)
-   {
-      node = HD;
-      HD = node->_next;
-      obj=(Type*)(node->_item);
-      delete obj;
-      delete node;
-   }
-   NB=0; //reset memory used (no lost pointers)
-   TL=RT;
-   _current=RT;
-}
-
-// is item element of the list?
-template<class Type>
-bool TDLISort<Type>::has(Type* otheritem)
-{
-   return DL_Iter<void*>::has( (void*) otheritem);
-}
-
-// goto to item
-template<class Type>
-bool TDLISort<Type>::toitem(Type* item)
-{
-   return DL_Iter<void*>::toitem( (void*) item);
-}
-
-// get current item
-template<class Type>
-Type*    TDLISort<Type>::item()
-{
-   return (Type*) DL_Iter<void*>::item();
-}
-
-template<class Type>
-TDLIStack<Type>::TDLIStack(DL_List<void*>* newlist):DL_StackIter<void*>(newlist)
-{
-}
-
-// destructor TDLI
-template<class Type>
-TDLIStack<Type>::~TDLIStack()
-{
-}
-
-// plaats nieuw item op stack
-template<class Type>
-void TDLIStack<Type>::push(Type* newitem)
-{
-	DL_StackIter<void*>::push((Type*) newitem);
-}
-
-
-// haal bovenste item van stack
-template<class Type>
-Type* TDLIStack<Type>::pop()
-{
-  return (Type*) DL_StackIter<void*>::pop();
-}
-
-
diff --git a/include/ossim/kbool/bool_globals.h b/include/ossim/kbool/bool_globals.h
deleted file mode 100644
index ade1958..0000000
--- a/include/ossim/kbool/bool_globals.h
+++ /dev/null
@@ -1,143 +0,0 @@
-#ifndef bool_globals_HEADER
-#define bool_globals_HEADER
-
-#include <limits> /* for numeric_limits::min/max */
-#include <string>
-#include <ossim/base/ossimConstants.h>
-
-#ifdef OSSIMMAKINGDLL
-#define A2DKBOOLMAKINGDLL
-#endif
-
-#define A2DKBOOLDLLEXP OSSIM_DLL
-
-#ifdef A2DKBOOLMAKINGDLL
-#define A2DKBOOLDLLEXP_DATA(type) WXEXPORT type
-#define A2DKBOOLDLLEXP_CTORFN
-#else // not making nor using DLL
-#define A2DKBOOLDLLEXP_DATA(type) type
-#define A2DKBOOLDLLEXP_CTORFN
-#endif
-
-#define KBOOL_VERSION "1.8"
-
-#define KBOOL_DEBUG 0
-#define KBOOL_LOG 0
-
-#if OSSIM_SIZEOF_LONG_INT == 8
-#  define KBOOL_INT64 1
-#elif OSSIM_SIZEOF_LONG_LONG == 8
-#  define KBOOL_INT64 1
-#else
-#  define KBOOL_INT64 0
-#endif
-
-#define LINELENGTH 200
-
-#ifdef  MAXDOUBLE
-#undef  MAXDOUBLE
-#endif
-#define MAXDOUBLE 1.7976931348623158e+308
-
-//---
-// .NET 2005 fix...
-// std::numeric_limits<>::max() and std::numeric_limits<>::min() will not work
-// if max and min are defined as macros, undefine them if they are defined.
-//---
-#ifdef max
-#  undef max
-#endif
-
-#ifdef min
-#  undef min
-#endif
-
-#ifdef KBOOL_INT64
-typedef ossim_int64 B_INT;		   // 8 bytes integer
-const B_INT MAXB_INT = std::numeric_limits<ossim_int64>::max();
-const B_INT MINB_INT = std::numeric_limits<ossim_int64>::min();
-#else /* not defined KBOOL_INT64 */
-typedef ossim_int32 B_INT;		   // 8 bytes integer
-const B_INT MAXB_INT = std::numeric_limits<ossim_int32>::max();
-const B_INT MINB_INT = std::numeric_limits<ossim_int32>::min();
-#endif /* end of ifdef KBOOL_INT64 */
-
-B_INT babs(B_INT);
-
-#ifdef  M_PI
-#undef  M_PI
-#endif
-#define M_PI		(3.1415926535897932384626433832795028841972)
-
-#ifdef  M_PI_2
-#undef  M_PI_2
-#endif
-#define M_PI_2      1.57079632679489661923
-
-#ifdef  M_PI_4
-#undef  M_PI_4
-#endif
-#define M_PI_4      0.785398163397448309616
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-//B_INT bmin(B_INT const value1, B_INT const value2);
-//B_INT bmax(B_INT const value1, B_INT const value2);
-
-B_INT bmin(B_INT value1, B_INT value2);
-B_INT bmax(B_INT value1, B_INT value2);
-
-#include <string.h>
-
-
-
-#define KBOOL_LOGFILE "kbool.log"
-
-enum kbEdgeType 
-{ 
-   KB_OUTSIDE_EDGE, /*!< edge of the outside contour of a polygon */
-   KB_INSIDE_EDGE,  /*!< edge of the inside hole a polygon */
-   KB_FALSE_EDGE    /*!< edge to connect holes into polygons */
-} ;
-
-enum GroupType 
-{ 
-   GROUP_A, /*!< to set Group A for polygons */
-   GROUP_B  /*!< to set Group A for polygons */
-};
-
-enum BOOL_OP 
-{ 
-   BOOL_NON, /*!< No operation */
-   BOOL_OR, /*!< boolean OR operation */
-   BOOL_AND, /*!< boolean AND operation */
-   BOOL_EXOR, /*!< boolean EX_OR operation */
-   BOOL_A_SUB_B, /*!< boolean Group A - Group B operation */
-   BOOL_B_SUB_A, /*!< boolean Group B - Group A operation */
-   BOOL_CORRECTION, /*!< polygon correction/offset operation */
-   BOOL_SMOOTHEN, /*!< smooth operation */
-   BOOL_MAKERING /*!< create a ring on all polygons */
-};
-
-//! errors in the boolean algorithm will be thrown using this class
-class A2DKBOOLDLLEXP Bool_Engine_Error
-{
-	public:
-		Bool_Engine_Error(const char* message, const char* header=0, int degree = 9, int fatal = 0);
-		Bool_Engine_Error(const Bool_Engine_Error& a);
-		~Bool_Engine_Error();
-		const char* GetErrorMessage();
-		const char* GetHeaderMessage();
-		int	GetErrorDegree();
-		int	GetFatal();
-
-	protected:
-                std::string _message;
-                std::string _header;
-		int _degree;
-		int _fatal;
-};
-
-#endif
diff --git a/include/ossim/kbool/booleng.h b/include/ossim/kbool/booleng.h
deleted file mode 100644
index 8a99fbf..0000000
--- a/include/ossim/kbool/booleng.h
+++ /dev/null
@@ -1,406 +0,0 @@
-/*! \file kbool/include/kbool/booleng.h
-    \author Probably Klaas Holwerda
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: booleng.h 13215 2008-07-23 18:51:54Z dburken $
-*/
-
-#ifndef BOOLENG_H
-#define BOOLENG_H
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface
-#endif
-
-
-#include <stdio.h>
-#include <limits.h>
-#include <ossim/kbool/bool_globals.h>
-#include <ossim/kbool/_dl_itr.h>
-class KBoolLink;
-class GraphList;
-class Graph;
-class KBoolLink;
-class Node;
-template<class Type> class TDLI;
-
-//! boolean engine to perform operation on two sets of polygons.
-/*
-	First the engine needs to be filled with polygons.
-	The first operand in the operation is called group A polygons, the second group B.
-	The boolean operation ( BOOL_OR, BOOL_AND, BOOL_EXOR, BOOL_A_SUB_B, BOOL_B_SUB_A )
-	are based on the two sets of polygons in group A and B.
-	The other operation on group A only.
-
-    At the end of the operation the resulting polygons can be extracted.
-*/
-class A2DKBOOLDLLEXP Bool_Engine {
-
-  public:
-
-   //! constructor    
-   Bool_Engine();
-   Bool_Engine(const Bool_Engine& rhs);
-   //! destructor   
-   virtual ~Bool_Engine();
-
-   const char* GetVersion() { return KBOOL_VERSION; }
-
-	//! reports progress of algorithm.
-   virtual void SetState( const char* = 0 );
-
-	//! called at an internal error.
-	virtual void error(const char *text, const char *title);
-
-	//! called at an internal generated possible error.
-   virtual void info(const char *text, const char *title);
-
-   bool Do_Operation(BOOL_OP operation);
-
-
-   //! distance within which points and lines will be snapped towards lines and other points
-   /*
-         The algorithm takes into account gaps and inaccuracies caused by rounding to integer coordinates
-         in the original data.
-         Imagine two rectangles one with a side ( 0,0 ) ( 2.0, 17.0 ) 
-         and the other has a side ( 0,0 ) ( 1.0, 8.5 )
-         If for some reason those coordinates where round to ( 0,0 ) ( 2, 17 ) ( 0,0 ) ( 1, 9 ),
-         there will be clearly a gap or overlap that was not intended.
-         Even without rounding this effect takes place since there is always a minimum significant bit
-         also when using doubles.
-
-         If the user used as minimum accuracy 0.001, you need to choose Marge > 0.001
-         The boolean engine scales up the input data with GetDGrid() * GetGrid() and rounds the result to
-         integer, So (assuming GRID = 100 DGRID = 1000)  a vertex of 123.001 in the user data will
-         become 12300100 internal.
-         At the end of the algorithm the internal vertexes are scaled down again with GetDGrid() * GetGrid(),
-         so 12300103 becomes 123.00103 eventually.
-         So indeed the minimum accuracy might increase, you are free to round again if needed.
-   */
-   void SetMarge(double marge);
-   double GetMarge();
-
-   //! input points are scaled up with GetDGrid() * GetGrid()
-   /*
-		Grid makes sure that the integer data used within the algorithm has room for extra intersections
-		smaller than the smallest number within the input data.
-		The input data scaled up with DGrid is related to the accuracy the user has in his input data.
-        Another scaling with Grid is applied on top of it to create space in the integer number for 
-		even smaller numbers. 
-   */
-   void SetGrid(B_INT grid);  
-	
-	//! See SetGrid
-   B_INT GetGrid();
-
-   //! input points are scaled up with GetDGrid() * GetGrid()
-   /*
-      The input data scaled up with DGrid is related to the accuracy the user has in his input data.
-      User data with a minimum accuracy of 0.001, means set the DGrid to 1000.
-      The input data may contain data with a minimum accuracy much smaller, but by setting the DGrid
-      everything smaller than 1/DGrid is rounded.
-
-      DGRID is only meant to make fractional parts of input data which can be
-      doubles, part of the integers used in vertexes within the boolean algorithm.
-      And therefore DGRID bigger than 1 is not usefull, you would only loose accuracy.
-      Within the algorithm all input data is multiplied with DGRID, and the result
-      is rounded to an integer. 
-   */
-   void SetDGrid(double dgrid);
-
-	//! See SetDGrid
-   double GetDGrid();
-
-   //! When doing a correction operation ( also known as process offset )
-	//! this defines the detail in the rounded corners.
-	/*
-		Depending on the round factor the corners of the polygon may be rounding within the correction
-		algorithm. The detail within this rounded corner is set here.
-		It defines the deviation the generated segments in arc like polygon may have towards the ideal
-		rounded corner using a perfect arc.
-    */
-   void SetCorrectionAber(double aber);
-
-	//! see SetCorrectionAber
-   double GetCorrectionAber();
-
-   //! When doing a correction operation ( also known as process offset )
-	//! this defines the amount of correction.
-   /*
-      The correction algorithm can apply positive and negative offset to polygons.
-      It takes into account closed in areas within a polygon, caused by overlapping/selfintersecting
-      polygons. So holes form that way are corrected proberly, but the overlapping parts itself
-      are left alone. An often used trick to present polygons with holes by linking to the outside
-      boundary, is therefore also handled properly.
-      The algoritm first does a boolean OR operation on the polygon, and seperates holes and
-      outside contours.
-      After this it creates a ring shapes on the above holes and outside contours.
-      This ring shape is added or subtracted from the holes and outside contours.
-      The result is the corrected polygon.
-      If the correction factor is > 0, the outside contours will become larger, while the hole contours
-      will become smaller.
-   */
-   void SetCorrectionFactor(double aber);
-
-	//! see SetCorrectionFactor
-   double GetCorrectionFactor();
-
-	//! used within the smooth algorithm to define how much the smoothed curve may deviate
-	//! from the original.
-   void SetSmoothAber(double aber);
-
-	//! see SetSmoothAber
-   double GetSmoothAber();
-
-	//! segments of this size will be left alone in the smooth algorithm.
-   void SetMaxlinemerge(double maxline);
-
-	//! see SetMaxlinemerge
-   double GetMaxlinemerge();
-
-	//! Polygon may be filled in different ways (alternate and winding rule).
-	//! This here defines which method will be assumed within the algorithm.
-   void SetWindingRule(bool rule);
-
-	//! see SetWindingRule
-   bool GetWindingRule();
-
-	//! the smallest accuracy used within the algorithm for comparing two real numbers.
-   double GetAccur();
-
-    //! Used with in correction/offset algorithm.
-	/*
-		When the polygon contains sharp angles ( < 90 ), after a positive correction the
-		extended parrallel constructed offset lines may leed to extreme offsets on the angles.
-		The length of the crossing generated by the parrallel constructed offset lines
-		towards the original point in the polygon is compared to the offset which needs to be applied.
-		The Roundfactor then decides if this corner will be rounded.
-		A Roundfactor of 1 means that the resulting offset will not be bigger then the correction factor
-		set in the algorithm. Meaning even straight 90 degrees corners will be rounded.
-		A Roundfactor of > sqrt(2) is where 90 corners will be left alone, and smaller corners will be rounded.
-	*/
-	void SetRoundfactor(double roundfac);
-
-	//! see SetRoundfactor
-   double GetRoundfactor();
-
-// the following are only be used within the algorithm,
-// since they are scaled with m_DGRID
-
-   //! only used internal.
-   void SetInternalMarge( B_INT marge );
-   //! only used internal.
-   B_INT GetInternalMarge();
-
-   //! only used internal.
-   double GetInternalCorrectionAber();
-
-   //! only used internal.
-   double GetInternalCorrectionFactor();
-
-   //! only used internal.
-   double GetInternalSmoothAber();
-
-   //! only used internal.
-   B_INT GetInternalMaxlinemerge();
-
-   //! in this mode polygons add clockwise, or contours,
-   /*!
-       and polygons added counter clockwise or holes.
-   */
-   void SetOrientationEntryMode( bool orientationEntryMode ) { m_orientationEntryMode = orientationEntryMode; }
-
-	//! see SetOrientationEntryMode()
-   bool GetOrientationEntryMode() { return m_orientationEntryMode; }
-
-   //! if set true holes are linked into outer contours by double overlapping segments.
-   /*!
-       This mode is needed when the software using the boolean algorithm does 
-       not understand hole polygons. In that case a contour and its holes form one
-       polygon. In cases where software understands the concept of holes, contours
-       are clockwise oriented, while holes are anticlockwise oriented.
-       The output of the boolean operations, is following those rules also.
-       But even if extracting the polygons from the engine, each segment is marked such
-       that holes and non holes and linksegments to holes can be recognized.
-   */
-   void SetLinkHoles( bool doLinkHoles ) { m_doLinkHoles = doLinkHoles; }
-
-	//! see SetLinkHoles()
-   bool GetLinkHoles() { return m_doLinkHoles; } 
-
-   //!lof file will be created when set True
-   void SetLog( bool OnOff ); 
-
-   //! used to write to log file
-   void Write_Log(const char *);
-   //! used to write to log file
-   void Write_Log(const char *, const char *);
-   //! used to write to log file
-   void Write_Log(const char *, double);
-   //! used to write to log file
-   void Write_Log(const char *, B_INT);
-
-   FILE* GetLogFile() { return m_logfile; }
-
-    // methods used to add polygons to the eng using points
-
-   //! Start adding a polygon to the engine
-   /*
-      The boolean operation work on two groups of polygons ( group A or B ),
-      other algorithms are only using group A.
-
-      You add polygons like this to the engine.
-
-      // foreach point in a polygon ...
-      if (booleng->StartPolygonAdd(GROUP_A))
-      {
-	      booleng->AddPoint(100,100);
-	      booleng->AddPoint(-100,100); 
-	      booleng->AddPoint(-100,-100); 
-	      booleng->AddPoint(100,-100); 
-      }
-      booleng->EndPolygonAdd(); 
-
-      \param A_or_B defines if the new polygon will be of group A or B
-
-      Holes or added by adding an inside polygons with opposite orientation compared
-      to another polygon added.
-      So the contour polygon ClockWise, then add counterclockwise polygons for holes, and visa versa.
-      BUT only if m_orientationEntryMode is set true, else all polygons are redirected, and become
-      individual areas without holes. 
-      Holes in such a case must be linked into the contour using two extra segments.
-   */
-   bool StartPolygonAdd( GroupType A_or_B );
-
-   //! see StartPolygonAdd
-   bool AddPoint(double x, double y);
-
-   //! see StartPolygonAdd
-   bool EndPolygonAdd();
-
-    // methods used to extract polygons from the eng by getting its points
-
-   //! Use after StartPolygonGet()
-   int GetNumPointsInPolygon() { return m_numPtsInPolygon ; }
-
-	//! get resulting polygons at end of an operation
-	/*!
-		// foreach resultant polygon in the booleng ...
-		while ( booleng->StartPolygonGet() )
-		{
-			// foreach point in the polygon
-			while ( booleng->PolygonHasMorePoints() )
-			{
-				fprintf(stdout,"x = %f\t", booleng->GetPolygonXPoint());
-				fprintf(stdout,"y = %f\n", booleng->GetPolygonYPoint());
-			}
-			booleng->EndPolygonGet();
-		}
-   */
-   
-   bool StartPolygonGet();
-   bool nextPolygon();
-   //! see StartPolygonGet
-   /*!
-      This iterates through the first graph in the graphlist.
-      Setting the current Node properly by following the links in the graph
-      through its nodes. 
-   */
-   bool PolygonHasMorePoints(); 
-
-   //! see StartPolygonGet
-   double GetPolygonXPoint(); 
-
-   //! see StartPolygonGet
-   double GetPolygonYPoint(); 
-
-	//! in the resulting polygons this tells if the current polygon segment is one
-	//! used to link holes into the outer contour of the surrounding polygon
-	bool GetHoleConnectionSegment();
-
-	//! in the resulting polygons this tells if the current polygon segment is part
-	//! of a hole within a polygon.
-	bool GetHoleSegment();
-
-   //! an other way to get the type of segment.
-   kbEdgeType GetPolygonPointEdgeType();
-
-	//! see StartPolygonGet()
-   /*!
-      Removes a graph from the graphlist.
-      Called after an extraction of an output polygon was done.
-   */
-	void EndPolygonGet(); 
-
-        GraphList* graphlist()
-        {
-           return m_graphlist;
-        }
-        const GraphList* graphlist()const
-        {
-           return m_graphlist;
-        }
-  private:
-
-   bool m_doLog;
-
-   //! contains polygons in graph form
-   GraphList* m_graphlist;
-
-   double m_MARGE;
-   B_INT  m_GRID;
-   double m_DGRID;
-   double m_CORRECTIONABER;
-   double m_CORRECTIONFACTOR;
-   double m_SMOOTHABER;
-   double m_MAXLINEMERGE;
-   bool   m_WINDINGRULE;
-   double m_ACCUR;
-   double m_ROUNDFACTOR;
-
-   bool m_orientationEntryMode;
-
-   bool m_doLinkHoles;
-
-   //! used in the StartPolygonAdd, AddPt, EndPolygonAdd sequence
-   Graph*    m_GraphToAdd;
-   //! used in the StartPolygonAdd, AddPt, EndPolygonAdd sequence
-   Node*     m_lastNodeToAdd;
-   //! used in the StartPolygonAdd, AddPt, EndPolygonAdd sequence
-   Node*     m_firstNodeToAdd;
-
-   //! the current group type ( group A or B )
-   GroupType m_groupType;
-
-   //! used in extracting the points from the resultant polygons
-   Graph* m_getGraph;
-   //! used in extracting the points from the resultant polygons
-   KBoolLink* m_getLink;
-   //! used in extracting the points from the resultant polygons
-   Node* m_getNode;
-   //! used in extracting the points from the resultant polygons
-   double m_PolygonXPoint;
-   //! used in extracting the points from the resultant polygons
-   double m_PolygonYPoint;
-   //! used in extracting the points from the resultant polygons
-   int m_numPtsInPolygon;
-   //! used in extracting the points from the resultant polygons
-   int m_numNodesVisited;
-
-   FILE* m_logfile;
-
-   DL_Iter<GraphList*> m_graphiter;
-public:
-
-   //! use in Node to iterate links. 
-/*    TDLI<KBoolLink>* 	_linkiter; */
-
-   //! how many time run intersections fase.
-   unsigned int m_intersectionruns;
-
-};
-
-#endif
diff --git a/include/ossim/kbool/graph.h b/include/ossim/kbool/graph.h
deleted file mode 100644
index ea44ff1..0000000
--- a/include/ossim/kbool/graph.h
+++ /dev/null
@@ -1,211 +0,0 @@
-/*! \file kbool/include/kbool/graph.h
-    \author Probably Klaas Holwerda
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: graph.h 9094 2006-06-13 19:12:40Z dburken $
-*/
-
-/* @@(#) $Source$ $Revision: 9094 $ $Date: 2006-06-13 15:12:40 -0400 (Tue, 13 Jun 2006) $ */
-
-/*
-Program	GRAPH.H
-Purpose	Used to Intercect and other process functions
-Last Update	03-04-1996
-*/
-
-#ifndef GRAPH_H
-#define GRAPH_H
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface
-#endif
-
-#include <ossim/kbool/booleng.h>
-#include <ossim/kbool/_lnk_itr.h>
-#include <ossim/kbool/link.h>
-#include <ossim/kbool/line.h>
-#include <ossim/kbool/scanbeam.h>
-
-class Node;
-
-class GraphList;
-
-//! one graph containing links that cab be connected.
-class A2DKBOOLDLLEXP Graph
-{
-   protected:
-      Bool_Engine* _GC;
-	public:
-
-      Graph(Bool_Engine* GC);
-      Graph(KBoolLink*,Bool_Engine* GC);
-
-      Graph( Graph* other );
-
-      ~Graph();
-
-      bool		 GetBin() 							{ return _bin; };
-      void		 SetBin(bool b) 					{ _bin = b; };
-
-		void 		 Prepare( int intersectionruns );
-		void      RoundInt(B_INT grid);
-		void 		 Rotate(bool plus90);
-
-      //! adds a link to the linklist
-		void		 AddLink(Node *begin,Node *end);
-
-      //! adds a link to the linklist
-		void		 AddLink(KBoolLink *a_link);  
-      
-		bool		 AreZeroLines(B_INT Marge);	
-
-      //! Delete parallel lines
-		void		 DeleteDoubles();             
-
-      //! delete zerolines
-		bool		 DeleteZeroLines(B_INT Marge);
-		bool 		 RemoveNullLinks();
-
-      //! Process found intersections
-		void		 ProcessCrossings();        					
-      //! set flags for operations based on group
-		void      Set_Operation_Flags();                   
-
-		//! Left Right values																		
-		void		 Remove_IN_Links();						
-
-      //! reset bin and mark flags in links.
-      void ResetBinMark();
-
-		// Remove unused links
-		void		 ReverseAllLinks();
-
-      //! Simplify the graph
-		bool		 Simplify( B_INT Marge );			 		
-
-
-      //! Takes over all links of the argument
-		bool 		 Smoothen( B_INT Marge);
-
-		void		 TakeOver(Graph*);                        
-
-		//! function for maximum performance
-
-      //! Get the First link from the graph
-		KBoolLink*	GetFirstLink();
-		Node*			GetTopNode();
-		void			SetBeenHere(bool);
-	   void 			Reset_flags();
-
-      //! Set the group of a graph
-		void			SetGroup(GroupType);					
-
-      //! Set the number of the graph
-		void			SetNumber(int);				
-		void 			Reset_Mark_and_Bin();
-		bool		   GetBeenHere();
-		int			GetGraphNum();
-		int			GetNumberOfLinks();
-
-		void        Boolean(BOOL_OP operation,GraphList* Result);
-		void        Correction(GraphList* Result,double factor);
-		void        MakeRing(GraphList* Result,double factor);
-		void        CreateRing(GraphList *ring,double factor);
-		void        CreateRing_fast(GraphList *ring,double factor);
-		void        CreateArc(Node* center, KBoolLine* incoming, Node* end,double radius,double aber);
-		void        CreateArc(Node* center, Node* begin, Node* end,double radius,bool clock,double aber);
-		void        MakeOneDirection();
-		void        Make_Rounded_Shape(KBoolLink* a_link, double factor);
-		bool 		   MakeClockWise();
-		bool 		   writegraph(bool linked);
-		bool 		   writeintersections();
-      void        WriteKEY( Bool_Engine* GC,  FILE* file = NULL );
-      void        WriteGraphKEY( Bool_Engine* GC );
-   
-	protected:
-
-      //! Extracts partical polygons from the graph
-      /*     
-         Links are sorted in XY at beginpoint. Bin and mark flag are reset.
-         Next start to collect subparts from the graph, setting the links bin for all found parts.
-         The parts are searched starting at a topleft corner NON set bin flag link.
-         Found parts are numbered, to be easily split into to real sperate graphs by Split()
-      
-         \param operation operation to collect for.
-         \param detecthole if you want holes detected, influences also way of extraction.
-         \param foundholes when holes are found this flag is set true, but only if detecthole is set true.
-      */
-		void 	Extract_Simples(BOOL_OP operation, bool detecthole, bool& foundholes );
-
-      //! split graph into small graph, using the numbers in links.
-		void 	Split(GraphList* partlist);
-
-   	//! Collect a graph by starting at argument link
-      /*
-         Called from Extract_Simples, and assumes sorted links with bin flag unset for non extarted piece
-
-         Collect graphs pieces from a total graph, by following links set to a given boolean operation.
-         \param current_node start node to collect
-         \param operation operation to collect for.
-         \param detecthole if you want holes detected, influences also way of extraction.
-         \param graphnumber number to be given to links in the extracted graph piece
-         \param foundholes when holes are found this flag is set true.
-      */
-		void 	CollectGraph(Node *current_node, BOOL_OP operation, bool detecthole,int graphnumber, bool& foundholes );
-
-		void 	CollectGraphLast(Node *current_node, BOOL_OP operation, bool detecthole,int graphnumber, bool& foundholes );
-
-      //! find a link not bin in the top left corner ( links should be sorted already )
-      /*!
-         Last found position is used to find it quickly.
-         Used in ExtractSimples()
-      */
-		Node*	GetMostTopLeft(TDLI<KBoolLink>* _LI);
-
-      //! calculates crossing for all links in a graph, and add those as part of the graph.
-      /*
-         It is not just crossings calculation, snapping close nodes is part of it.
-         This is not done at maximum stability in economic time.
-         There are faster ways, but hardly ever they solve the problems, and they do not snap.
-         Here it is on purpose split into separate steps, to get a better result in snapping, and
-         to reach a better stability.
-
-         \param Marge nodes and lines closer to eachother then this, are merged.
-      */
-		bool CalculateCrossings(B_INT Marge);
-
-      //! equal nodes in position are merged into one.
-		int	Merge_NodeToNode(B_INT Marge);
-
-      //! basic scan algorithm with a sweeping beam are line.
-      /*!
-          \param scantype a different face in the algorithm.
-          \param holes to detect hole when needed.
-      */
-		int ScanGraph2( SCANTYPE scantype, bool& holes );
-
-      //! links not used for a certain operation can be deleted, simplifying extraction
-		void 	DeleteNonCond(BOOL_OP operation);
-
-      //! links not used for a certain operation can be set bin, simplifying extraction
-      void HandleNonCond(BOOL_OP operation);
-
-      //! debug
-	   bool 	checksort();
-
-      //! used in correction/offset algorithm
-		bool 	Small(B_INT howsmall);
-
-
-		bool	_bin;
-
-		DL_List<void*>* _linklist;
-
-};
-
-#endif
-
-
diff --git a/include/ossim/kbool/graphlst.h b/include/ossim/kbool/graphlst.h
deleted file mode 100644
index ffbbda0..0000000
--- a/include/ossim/kbool/graphlst.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*! \file kbool/include/kbool/graphlst.h
-    \author Probably Klaas Holwerda
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: graphlst.h 9094 2006-06-13 19:12:40Z dburken $
-*/
-
-/* @@(#) $Source$ $Revision: 9094 $ $Date: 2006-06-13 15:12:40 -0400 (Tue, 13 Jun 2006) $ */
-
-/*
-Program	GRAPHLST.H
-Purpose	Implements a list of graphs (header)
-Last Update	11-03-1996
-*/
-
-#ifndef GRAPHLIST_H
-#define GRAPHLIST_H
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface
-#endif
-
-#include <ossim/kbool/booleng.h>
-
-#include <ossim/kbool/_lnk_itr.h>
-
-#include <ossim/kbool/graph.h>
-
-class Debug_driver;
-
-
-class A2DKBOOLDLLEXP GraphList: public DL_List<void*>
-{
-protected:
-   Bool_Engine* _GC;
-public:
-   
-   GraphList(Bool_Engine* GC);
-   
-   GraphList( GraphList* other ); 
-   
-   ~GraphList();
-   
-   void clearList();
-   void clearListAndBoolEngine();
-   void	MakeOneGraph(Graph *total);
-   
-   void	Prepare(Graph *total);
-   void MakeRings();
-   void Correction();
-   
-   void	Simplify( double marge);
-   void Smoothen( double marge);
-   void Merge();
-   void Boolean(BOOL_OP operation, int intersectionRunsMax );
-   
-   void WriteGraphs();
-   void WriteGraphsKEY( Bool_Engine* GC );
-   
-protected:
-   void				Renumber();
-   void				UnMarkAll();
-};
-
-
-#endif
-
diff --git a/include/ossim/kbool/line.h b/include/ossim/kbool/line.h
deleted file mode 100644
index eb83e03..0000000
--- a/include/ossim/kbool/line.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*! \file kbool/include/kbool/line.h
-    \brief Mainy used for calculating crossings
-    \author Probably Klaas Holwerda
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: line.h 14798 2009-06-29 19:19:22Z dburken $
-*/
-
-#ifndef LINE_H
-#define LINE_H
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface
-#endif
-
-#include <ossim/kbool/booleng.h>
-#include <ossim/kbool/link.h>
-
-class Bool_Engine;
-
-// Status of a point to a line
-enum PointStatus {LEFT_SIDE, RIGHT_SIDE, ON_AREA, IN_AREA};
-
-class A2DKBOOLDLLEXP Graph;
-
-class A2DKBOOLDLLEXP KBoolLine
-{
-   protected:
-      Bool_Engine* m_GC;
-	public:
-
-		// constructors and destructor
-		KBoolLine(Bool_Engine* GC);
-		KBoolLine(KBoolLink*,Bool_Engine* GC);
-		~KBoolLine();
-
-		void			Set(KBoolLink *);
-		KBoolLink*		GetLink();
-
-      //! Get the beginnode from a line
-		Node*		GetBeginNode();		
-      
-      //! Get the endnode from a line
-		Node*		GetEndNode();   										  	
-
-      //! Check if two lines intersects
-		int					CheckIntersect(KBoolLine*, double Marge);	
-
-      //! Intersects two lines
-		int					Intersect(KBoolLine*, double Marge);    	 
-		int               Intersect_simple(KBoolLine * lijn);
-		bool				   Intersect2(Node* crossing,KBoolLine * lijn);
-
-      //!For an infinite line
-		PointStatus			PointOnLine(Node* a_node, double& Distance, double Marge ); 
-
-      //!For a non-infinite line
-		PointStatus			PointInLine(Node* a_node, double& Distance, double Marge ); 
-
-      //! Caclulate Y if X is known
-      B_INT					Calculate_Y(B_INT X); 								
-		B_INT         		Calculate_Y_from_X(B_INT X);
-		void              Virtual_Point( LPoint *a_point, double distance);
-
-      //! assignment operator
-		KBoolLine& 			operator=(const KBoolLine&); 					
-
-		Node* 				OffsetContour(KBoolLine* const nextline,Node* last_ins, double factor,Graph *shape);
-		Node* 				OffsetContour_rounded(KBoolLine* const nextline,Node* _last_ins, double factor,Graph *shape);
-		bool 				   OkeForContour(KBoolLine* const nextline,double factor,Node* LastLeft,Node* LastRight, LinkStatus& _outproduct);
-		bool				   Create_Ring_Shape(KBoolLine* nextline,Node** _last_ins_left,Node** _last_ins_right,double factor,Graph *shape);
-		void 					Create_Begin_Shape(KBoolLine* nextline,Node** _last_ins_left,Node** _last_ins_right,double factor,Graph *shape);
-		void 					Create_End_Shape(KBoolLine* nextline,Node* _last_ins_left,Node* _last_ins_right,double factor,Graph *shape);
-
-      //! Calculate the parameters if nessecary
-		void  CalculateLineParameters(); 								
-
-      //! Adds a crossing between the intersecting lines
-		void  AddLineCrossing(B_INT , B_INT , KBoolLine *); 		
-
-		void  AddCrossing(Node *a_node);
-		Node* AddCrossing(B_INT X, B_INT Y);
-		bool  ProcessCrossings(TDLI<KBoolLink>* _LI);
-
-// Linecrosslist
-		void	SortLineCrossings();
-		bool	CrossListEmpty();
-		DL_List<void*>*		GetCrossList();
-//		bool	HasInCrossList(Node*);
-
-	private:
-
-      //! Function needed for Intersect
-		int   ActionOnTable1(PointStatus,PointStatus); 							
-      //! Function needed for Intersect
-		int   ActionOnTable2(PointStatus,PointStatus); 						
-
-		double 		m_AA;
-		double		m_BB;
-		double		m_CC;
-		KBoolLink*	m_link;
-		bool		m_valid_parameters;
-
-      //! List with crossings through this link
-		DL_List<void*>	 *linecrosslist;
-};
-
-#endif
diff --git a/include/ossim/kbool/link.h b/include/ossim/kbool/link.h
deleted file mode 100644
index 190c495..0000000
--- a/include/ossim/kbool/link.h
+++ /dev/null
@@ -1,234 +0,0 @@
-/*! \file kbool/include/kbool/link.h
-    \brief Part of a graph, connection between nodes (Header)
-    \author Probably Klaas Holwerda or Julian Smart
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: link.h 9094 2006-06-13 19:12:40Z dburken $
-*/
-
-#ifndef LINK_H
-#define LINK_H
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface
-#endif
-
-#include <ossim/kbool/booleng.h>
-#include <ossim/kbool/_lnk_itr.h>
-
-enum LinkStatus {IS_LEFT,IS_ON,IS_RIGHT};
-
-class LPoint;
-class Node;
-class Record;
-
-//!   segment within a graph 
-/*
-   A Graph contains a list of KBoolLink, the KBoolLink or connected by Node's. 
-   Several KBoolLink can be connected to one Node. 
-   A KBoolLink has a direction defined by its begin and end node.
-   Node do have a list of connected KBoolLink's.
-   So one can walk trough a graph in two ways:
-   1- via its KBoolLink list 
-   2- via the node connected to the KBoolLink's 
-*/
-class A2DKBOOLDLLEXP KBoolLink
-{
-   protected:
-      Bool_Engine* _GC;
-	public:
-
-		//! contructors 
-		KBoolLink(Bool_Engine* GC);
-
-		//! contructors 
-		KBoolLink(int graphnr, Node* begin, Node* end, Bool_Engine* GC);
-
-		//! contructors 
-		KBoolLink(Node *begin, Node *end, Bool_Engine* GC);
-
-		//! destructors
-		~KBoolLink();
-
-
-      //! Merges the other node with argument
-		void MergeNodes(Node* const);      				
-
-      //! outproduct of two links
-      LinkStatus OutProduct(KBoolLink* const two,double accur);              
-		
-      //! link three compared to this and two
-      LinkStatus PointOnCorner(KBoolLink* const, KBoolLink* const);	
-
-      //! Removes argument from the link
-		void Remove(Node*);		
-      
-      //! replaces olddone in the link by newnode
-		void Replace(Node* oldnode, Node* newnode);		
-
-      //!top hole marking
-		void SetTopHole(bool value);
-
-      //!top hole marking
-		bool IsTopHole();
-
-      //! Marking functions
-		void UnMark();
-      //! Marking functions
-		void Mark();
-      //! Marking functions
-		void SetMark(bool);
-      //! Marking functions
-		bool IsMarked();
-
-      //! holelink Marking functions
-      void SetHoleLink(bool val){ m_holelink = val;};
-
-      //! holelink Marking functions
-      bool GetHoleLink(){ return m_holelink;};
-
-      //! Bin functions
-		void SetNotBeenHere();
-      //! Bin functions
-		void SetBeenHere();
-      //! Have you been here ??
-		bool BeenHere();										
-
-      //! Removes all the references to this
-		void	UnLink();												
-
-		//! functions for maximum performance
-		Node*	GetBeginNode();
-
-      //! Datamember access functions
-		Node*	GetEndNode();
-		Node*	GetLowNode();
-		Node*	GetHighNode();
-
-      //! Returns a next link beginning with argument
-		KBoolLink* Forth(Node*);
-      
-		int GetGraphNum();
-		bool GetInc();
-      bool GetLeftA();
-		bool GetLeftB();
-		bool GetRightA();
-		bool GetRightB();
-		void GetLRO(LPoint*, int&, int&, double);
-
-      //! Return a node not equal to arg.
-		Node*	GetOther(const Node* const);
-      //! Is this link unused ?
-		bool IsUnused();									
-
-      //! Used for given operation ?
-		bool IsMarked(BOOL_OP operation);            
-
-      //! return true if Left side is marked true for operation
-		bool IsMarkedLeft(BOOL_OP operation);            
-
-      //! return true if Right side is marked true for operation
-		bool IsMarkedRight(BOOL_OP operation);            
-
-      //! is this a hole link for given operation
-		bool IsHole(BOOL_OP operation);				
-      
-      //! set the hole mark
-      void SetHole(bool);
-
-      //! is the hole mark set?
-		bool GetHole();
-
-      //! Are the nodes on about the same coordinates ?
-		bool IsZero(B_INT marge );		
-		bool ShorterThan(B_INT marge );
-
-      //! Resets the link
-		void Reset(Node* begin, Node* end, int graphnr = 0);	
-		void Set(Node* begin, Node* end);
-		void SetBeginNode(Node*);
-		void SetEndNode(Node*);
-		void SetGraphNum(int);
-		void SetInc(bool);
-      void SetLeftA(bool);
-		void SetLeftB(bool);
-		void SetRightA(bool);
-		void SetRightB(bool);
-		void SetGroup(GroupType);
-		GroupType Group();
-
-      //! Flag calculation (internal only)
-		void SetLineTypes();
-		void Reset();
-		void Reset_flags();
-
-      //!put in this direction
-      void Redirect(Node* a_node); 
-
-      void TakeOverOperationFlags( KBoolLink* link );
-
-      void SetRecordNode( DL_Node<Record*>* recordNode ) { m_record = recordNode; }
-
-      DL_Node<Record*>* GetRecordNode() { return m_record; }
-
-	protected:
-
-      //! The mainitems of a link
-      Node 	*m_beginnode, *m_endnode;
-      //! Marker for walking over the graph
-      bool	m_bin    	: 1;				
-      //! Is this a part of hole ?
-      bool	m_hole     : 1;				
-      //! link that is toplink of hole?
-      bool	m_hole_top : 1;				
-      //! going in one more time in this graph if true  else going out one time
-      bool 	m_Inc   	: 1;    			
-      //! Is left in polygongroup A
-      bool 	m_LeftA 	: 1;    			
-      //! Is right in polygon group A
-      bool 	m_RightA	: 1;    			
-      //! Is left in polygon group B
-      bool 	m_LeftB 	: 1;    			
-      //! Is right in polygongroup B
-      bool	m_RightB	: 1;    			
-      //! General purose marker, internally unused
-      bool	m_mark		: 1;    			
-      //! link for linking holes
-      bool	m_holelink : 1; 
-      
-      //! Marker for Merge Left
-      bool m_merge_L 	: 1;				
-      //! Marker for substract a-b Left
-      bool m_a_substract_b_L: 1;	  		
-      //! Marker for substract b-a Left
-      bool m_b_substract_a_L: 1;	  		
-      //! Marker for intersect Left
-      bool m_intersect_L: 1;				
-      //! Marker for X-OR Left
-      bool m_exor_L: 1;				
-      
-      //! Marker for Merge Right
-      bool m_merge_R 	: 1;				
-      //! Marker for substract a-b Right
-      bool m_a_substract_b_R: 1;	  		
-      //! Marker for substract b-a Right
-      bool m_b_substract_a_R: 1;	  		
-      //! Marker for intersect Right
-      bool m_intersect_R: 1;				
-      //! Marker for X-OR Right
-      bool m_exor_R: 1;				
-      
-      //! belongs to group A or B
-      GroupType m_group : 1;      
-      
-      //! belongs to this polygon part in the graph.
-      int m_graphnum;
-      
-      DL_Node<Record*>* m_record; 
-};
-
-#endif
-
diff --git a/include/ossim/kbool/lpoint.h b/include/ossim/kbool/lpoint.h
deleted file mode 100644
index a918a17..0000000
--- a/include/ossim/kbool/lpoint.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*! \file kbool/include/kbool/lpoint.h
-    \author Probably Klaas Holwerda
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: lpoint.h 9094 2006-06-13 19:12:40Z dburken $
-*/
-
-/* @@(#) $Source$ $Revision: 9094 $ $Date: 2006-06-13 15:12:40 -0400 (Tue, 13 Jun 2006) $ */
-
-/*
-Program	LPOINT.H
-Purpose	Definition of GDSII pointtype structure
-Last Update	12-12-1995
-*/
-
-#ifndef LPOINT_H
-#define LPOINT_H
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface
-#endif
-
-#include <ossim/kbool/booleng.h>
-
-class A2DKBOOLDLLEXP LPoint
-{
-	public:
-		LPoint();
-		LPoint(B_INT const ,B_INT const);
-		LPoint(LPoint* const);
-
-		void		Set(const B_INT,const B_INT);
-		void		Set(const LPoint &);
-
-		LPoint		GetPoint();
-		B_INT		GetX();
-		B_INT		GetY();
-		void 		SetX(B_INT);
-		void		SetY(B_INT);
-		bool		Equal(const LPoint a_point, B_INT Marge );
-		bool		Equal(const B_INT,const B_INT , B_INT Marge);
-		bool		ShorterThan(const LPoint a_point, B_INT marge);
-		bool		ShorterThan(const B_INT X, const B_INT Y, B_INT);
-
-		LPoint	&operator=(const LPoint &);
-		LPoint	&operator+(const LPoint &);
-		LPoint	&operator-(const LPoint &);
-
-		LPoint	&operator*(int);
-		LPoint	&operator/(int);
-
-		int		operator==(const LPoint &) const;
-		int		operator!=(const LPoint &) const;
-
-	protected:
-		B_INT _x;
-		B_INT _y;
-
-};
-
-#endif
diff --git a/include/ossim/kbool/node.h b/include/ossim/kbool/node.h
deleted file mode 100644
index 76f3c0f..0000000
--- a/include/ossim/kbool/node.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*! \file kbool/include/kbool/node.h
-    \brief Holds a GDSII node structure (Header)
-    \author Probably Klaas Holwerda
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: node.h 12629 2008-04-07 17:19:06Z dburken $
-*/
-
-#ifndef NODE_H
-#define NODE_H
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface
-#endif
-
-#include <ossim/kbool/booleng.h>
-
-#include <ossim/kbool/lpoint.h>
-
-#include <ossim/kbool/link.h>
-#include <ossim/kbool/_lnk_itr.h>
-
-enum NodePosition { N_LEFT, N_ON, N_RIGHT};
-
-class A2DKBOOLDLLEXP Node : public LPoint
-{
-	protected:
-      Bool_Engine* _GC;
-	public:
-		// friend must be deleted in the final version!
-		friend class Debug_driver;
-
-		// constructors and destructors
-		Node(Bool_Engine* GC);
-
-		Node(const B_INT, const B_INT, Bool_Engine* GC);
-	
-		Node(LPoint* const a_point, Bool_Engine* GC);
-		Node(Node * const, Bool_Engine* GC);
-		Node& operator=(const Node &other_node);
-		~Node();
-
-		//public member functions
-		void AddLink(KBoolLink*);
-		DL_List<void*>* GetLinklist();
-
-      //! check two link for its operation flags to be the same when coming from the prev link.
-      bool SameSides( KBoolLink* const prev , KBoolLink* const link, BOOL_OP operation );
-
-      //! get the link most right or left to the current link, but with the specific operation
-      /*! flags the same on the sides of the new link.
-      */
-		KBoolLink*  GetMost( KBoolLink* const prev ,LinkStatus whatside, BOOL_OP operation );
-
-      //! get link that is leading to a hole ( hole segment or linking segment )
-      KBoolLink* GetMostHole( KBoolLink* const prev ,LinkStatus whatside, BOOL_OP operation );
-
-      //! get link that is not vertical.
-      KBoolLink* 	GetNotFlat();
-
-      //! get a link to a hole or from a hole.
-      KBoolLink* GetHoleLink( KBoolLink* const prev, bool checkbin, BOOL_OP operation );
-
-		int Merge(Node*);
-		void RemoveLink(KBoolLink*);
-		bool Simplify(Node* First, Node* Second, B_INT Marge );
-
-		//  memberfunctions for maximum performance
-		void        RoundInt(B_INT grid);
-		KBoolLink*	GetIncomingLink();
-
-		int		  GetNumberOfLinks();
-		KBoolLink* GetNextLink();
-		KBoolLink* GetOtherLink(KBoolLink*);
-		KBoolLink* GetOutgoingLink();
-		KBoolLink* GetPrevLink();
-
-		KBoolLink* Follow(KBoolLink* const prev );
-		KBoolLink* GetBinHighest(bool binset);
-
-	protected:
-		DL_List<void*>*		_linklist;
-};
-
-#endif
diff --git a/include/ossim/kbool/record.h b/include/ossim/kbool/record.h
deleted file mode 100644
index b29487a..0000000
--- a/include/ossim/kbool/record.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*! \file kbool/include/kbool/record.h
-    \author Probably Klaas Holwerda
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: record.h 14798 2009-06-29 19:19:22Z dburken $
-*/
-
-#ifndef RECORD_H
-#define RECORD_H
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface
-#endif
-
-class Node;
-#include <ossim/kbool/booleng.h>
-
-#include <ossim/kbool/link.h>
-#include <ossim/kbool/line.h>
-
-enum BEAM_TYPE { NORMAL,FLAT};
-
-enum DIRECTION  {GO_LEFT,GO_RIGHT};
-
-//extern void DeleteRecordPool();
-class Bool_Engine;
-
-class A2DKBOOLDLLEXP Record
-{
-        protected:
-                                        Bool_Engine* _GC;
-	public:
-//					void deletepool();
-
-					Record(KBoolLink* link,Bool_Engine* GC);
-
-					~Record();
-
-//					void* operator new(size_t size);
-
-//					void operator delete(void* recordptr);
-
-					void SetNewLink(KBoolLink* link);
-
-					void Set_Flags();
-
-					void Calc_Ysp(Node* low);
-
-					KBoolLink* GetLink();
-
-					KBoolLine* GetLine();
-
-					B_INT	Ysp();
-
-					void SetYsp(B_INT ysp);
-
-					DIRECTION Direction();
-
-					bool Calc_Left_Right(Record* record_above_me);
-
-					bool Equal(Record*);
-
-	private:
-					KBoolLine   _line;
-
-					B_INT 		_ysp;
-
-               //! going left are right in beam
-					DIRECTION	_dir;    
-
-               //! how far in group_a
-               int         _a;               
-
-               //! how far in group_b
-               int         _b;               
-
-};
-
-#endif 
diff --git a/include/ossim/kbool/scanbeam.h b/include/ossim/kbool/scanbeam.h
deleted file mode 100644
index 5bdfbe4..0000000
--- a/include/ossim/kbool/scanbeam.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*! \file kbool/include/kbool/scanbeam.h
-    \author Probably Klaas Holwerda
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: scanbeam.h 9094 2006-06-13 19:12:40Z dburken $
-*/
-
-#ifndef SCANBEAM_H
-#define SCANBEAM_H
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface
-#endif
-
-#include <ossim/kbool/booleng.h>
-#include <ossim/kbool/_lnk_itr.h>
-
-#include <ossim/kbool/record.h>
-#include <ossim/kbool/link.h>
-
-enum SCANTYPE{NODELINK,LINKLINK,GENLR,LINKHOLES,INOUT};
-
-#if defined(WXUSINGDLL)
-    template class A2DKBOOLDLLEXP DL_Iter<Record*>;
-#endif
-
-class A2DKBOOLDLLEXP ScanBeam : public DL_List<Record*>
-{
-   protected:
-      Bool_Engine* _GC;
-
-	public:
-			ScanBeam(Bool_Engine* GC);
-			~ScanBeam();
-         void SetType(Node* low,Node* high);
-
-			bool  FindNew(SCANTYPE scantype,TDLI<KBoolLink>* _I, bool& holes );
-			bool  RemoveOld(SCANTYPE scantype,TDLI<KBoolLink>* _I, bool& holes );
-
-   private:
-
-			bool  ProcessHoles(bool atinsert,TDLI<KBoolLink>* _LI);
-         int	Process_LinkToLink_Crossings();			// find crossings
-			int 	Process_PointToLink_Crossings();
-			int 	Process_LinkToLink_Flat(KBoolLine* flatline);
-         void	SortTheBeam( bool backangle );
-			bool 	checksort();
-			bool 	writebeam();
-			void	Calc_Ysp();
-			//int 	FindCloseLinksAndCross(TDLI<KBoolLink>* _I,Node* _lowf);
-         void 	Generate_INOUT(int graphnumber);
-
-         Node*				  _low;
-         DL_Iter<Record*> _BI;
-         int 				  lastinserted;
-         BEAM_TYPE		  _type;
-};
-
-#endif 
diff --git a/include/ossim/kbool/valuesvc.h b/include/ossim/kbool/valuesvc.h
deleted file mode 100644
index 0292d6d..0000000
--- a/include/ossim/kbool/valuesvc.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/*! \file kbool/include/kbool/valuesvc.h
-    \author Probably Klaas Holwerda
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: valuesvc.h 8950 2006-03-27 19:19:56Z gpotts $
-*/
diff --git a/include/ossim/matrix/newmat.h b/include/ossim/matrix/newmat.h
deleted file mode 100644
index 8b4bd73..0000000
--- a/include/ossim/matrix/newmat.h
+++ /dev/null
@@ -1,1805 +0,0 @@
-//$$ newmat.h           definition file for new version of matrix package
-
-// Copyright (C) 1991,2,3,4,7,2000,2,3: R B Davies
-
-#ifndef NEWMAT_LIB
-#define NEWMAT_LIB 0
-
-#include <ossim/matrix/include.h>
-
-#include <ossim/matrix/myexcept.h>
-
-
-#ifdef use_namespace
-namespace NEWMAT { using namespace RBD_COMMON; }
-namespace RBD_LIBRARIES { using namespace NEWMAT; }
-namespace NEWMAT {
-#endif
-
-//#define DO_REPORT                     // to activate REPORT
-
-#ifdef NO_LONG_NAMES
-#define UpperTriangularMatrix UTMatrix
-#define LowerTriangularMatrix LTMatrix
-#define SymmetricMatrix SMatrix
-#define DiagonalMatrix DMatrix
-#define BandMatrix BMatrix
-#define UpperBandMatrix UBMatrix
-#define LowerBandMatrix LBMatrix
-#define SymmetricBandMatrix SBMatrix
-#define BandLUMatrix BLUMatrix
-#endif
-
-// ************************** general utilities ****************************/
-
-class GeneralMatrix;
-
-void MatrixErrorNoSpace(const void*);                 // no space handler
-
-class LogAndSign
-// Return from LogDeterminant function
-//    - value of the log plus the sign (+, - or 0)
-{
-   Real log_value;
-   int sign;
-public:
-   LogAndSign() { log_value=0.0; sign=1; }
-   LogAndSign(Real);
-   void operator*=(Real);
-   void PowEq(int k);  // raise to power of k
-   void ChangeSign() { sign = -sign; }
-   Real LogValue() const { return log_value; }
-   int Sign() const { return sign; }
-   Real Value() const;
-   FREE_CHECK(LogAndSign)
-};
-
-// the following class is for counting the number of times a piece of code
-// is executed. It is used for locating any code not executed by test
-// routines. Use turbo GREP locate all places this code is called and
-// check which ones are not accessed.
-// Somewhat implementation dependent as it relies on "cout" still being
-// present when ExeCounter objects are destructed.
-
-#ifdef DO_REPORT
-
-class ExeCounter
-{
-   int line;                                    // code line number
-   int fileid;                                  // file identifier
-   long nexe;                                   // number of executions
-   static int nreports;                         // number of reports
-public:
-   ExeCounter(int,int);
-   void operator++() { nexe++; }
-   ~ExeCounter();                               // prints out reports
-};
-
-#endif
-
-
-// ************************** class MatrixType *****************************/
-
-// Is used for finding the type of a matrix resulting from the binary operations
-// +, -, * and identifying what conversions are permissible.
-// This class must be updated when new matrix types are added.
-
-class GeneralMatrix;                            // defined later
-class BaseMatrix;                               // defined later
-class MatrixInput;                              // defined later
-
-class OSSIM_DLL MatrixType
-{
-public:
-   enum Attribute {  Valid     = 1,
-                     Diagonal  = 2,             // order of these is important
-                     Symmetric = 4,
-                     Band      = 8,
-                     Lower     = 16,
-                     Upper     = 32,
-                     Square    = 64,
-                     Skew      = 128,
-                     LUDeco    = 256,
-                     Ones      = 512 };
-
-   enum            { US = 0,
-                     UT = Valid + Upper + Square,
-                     LT = Valid + Lower + Square,
-                     Rt = Valid,
-                     Sq = Valid + Square,
-                     Sm = Valid + Symmetric + Square,
-                     Sk = Valid + Skew + Square,
-                     Dg = Valid + Diagonal + Band + Lower + Upper + Symmetric
-                        + Square,
-                     Id = Valid + Diagonal + Band + Lower + Upper + Symmetric
-                        + Square + Ones,
-                     RV = Valid,     //   do not separate out
-                     CV = Valid,     //   vectors
-                     BM = Valid + Band + Square,
-                     UB = Valid + Band + Upper + Square,
-                     LB = Valid + Band + Lower + Square,
-                     SB = Valid + Band + Symmetric + Square,
-                     Ct = Valid + LUDeco + Square,
-                     BC = Valid + Band + LUDeco + Square,
-                     Mask = ~Square
-                   };
-
-
-   static int nTypes() { return 12; }          // number of different types
-					       // exclude Ct, US, BC
-public:
-   int attribute;
-   bool DataLossOK;                            // true if data loss is OK when
-                                               // this represents a destination
-public:
-   MatrixType () : DataLossOK(false) {}
-   MatrixType (int i) : attribute(i), DataLossOK(false) {}
-   MatrixType (int i, bool dlok) : attribute(i), DataLossOK(dlok) {}
-   MatrixType (const MatrixType& mt)
-      : attribute(mt.attribute), DataLossOK(mt.DataLossOK) {}
-   void operator=(const MatrixType& mt)
-      { attribute = mt.attribute; DataLossOK = mt.DataLossOK; }
-   void SetDataLossOK() { DataLossOK = true; }
-   int operator+() const { return attribute; }
-   MatrixType operator+(MatrixType mt) const
-      { return MatrixType(attribute & mt.attribute); }
-   MatrixType operator*(const MatrixType&) const;
-   MatrixType SP(const MatrixType&) const;
-   MatrixType KP(const MatrixType&) const;
-   MatrixType operator|(const MatrixType& mt) const
-      { return MatrixType(attribute & mt.attribute & Valid); }
-   MatrixType operator&(const MatrixType& mt) const
-      { return MatrixType(attribute & mt.attribute & Valid); }
-   bool operator>=(MatrixType mt) const
-      { return ( attribute & ~mt.attribute & Mask ) == 0; }
-   bool operator<(MatrixType mt) const         // for MS Visual C++ 4
-      { return ( attribute & ~mt.attribute & Mask ) != 0; }
-   bool operator==(MatrixType t) const
-      { return (attribute == t.attribute); }
-   bool operator!=(MatrixType t) const
-      { return (attribute != t.attribute); }
-   bool operator!() const { return (attribute & Valid) == 0; }
-   MatrixType i() const;                       // type of inverse
-   MatrixType t() const;                       // type of transpose
-   MatrixType AddEqualEl() const               // Add constant to matrix
-      { return MatrixType(attribute & (Valid + Symmetric + Square)); }
-   MatrixType MultRHS() const;                 // type for rhs of multiply
-   MatrixType sub() const                      // type of submatrix
-      { return MatrixType(attribute & Valid); }
-   MatrixType ssub() const                     // type of sym submatrix
-      { return MatrixType(attribute); }        // not for selection matrix
-   GeneralMatrix* New() const;                 // new matrix of given type
-   GeneralMatrix* New(int,int,BaseMatrix*) const;
-                                               // new matrix of given type
-   const char* Value() const;                  // to print type
-   friend bool Rectangular(MatrixType a, MatrixType b, MatrixType c);
-   friend bool Compare(const MatrixType&, MatrixType&);
-                                               // compare and check conv.
-   bool IsBand() const { return (attribute & Band) != 0; }
-   bool IsDiagonal() const { return (attribute & Diagonal) != 0; }
-   bool IsSymmetric() const { return (attribute & Symmetric) != 0; }
-   bool CannotConvert() const { return (attribute & LUDeco) != 0; }
-                                               // used by operator== 
-   FREE_CHECK(MatrixType)
-};
-
-
-// *********************** class MatrixBandWidth ***********************/
-
-class OSSIM_DLL MatrixBandWidth
-{
-public:
-   int lower;
-   int upper;
-   MatrixBandWidth(const int l, const int u) : lower(l), upper (u) {}
-   MatrixBandWidth(const int i) : lower(i), upper(i) {}
-   MatrixBandWidth operator+(const MatrixBandWidth&) const;
-   MatrixBandWidth operator*(const MatrixBandWidth&) const;
-   MatrixBandWidth minimum(const MatrixBandWidth&) const;
-   MatrixBandWidth t() const { return MatrixBandWidth(upper,lower); }
-   bool operator==(const MatrixBandWidth& bw) const
-      { return (lower == bw.lower) && (upper == bw.upper); }
-   bool operator!=(const MatrixBandWidth& bw) const { return !operator==(bw); }
-   int Upper() const { return upper; }
-   int Lower() const { return lower; }
-   FREE_CHECK(MatrixBandWidth)
-};
-
-
-// ********************* Array length specifier ************************/
-
-// This class is introduced to avoid constructors such as
-//   ColumnVector(int)
-// being used for conversions
-
-class OSSIM_DLL ArrayLengthSpecifier
-{
-   int value;
-public:
-   int Value() const { return value; }
-   ArrayLengthSpecifier(int l) : value(l) {}
-};
-
-// ************************* Matrix routines ***************************/
-
-
-class MatrixRowCol;                             // defined later
-class MatrixRow;
-class MatrixCol;
-class MatrixColX;
-
-class GeneralMatrix;                            // defined later
-class AddedMatrix;
-class MultipliedMatrix;
-class SubtractedMatrix;
-class SPMatrix;
-class KPMatrix;
-class ConcatenatedMatrix;
-class StackedMatrix;
-class SolvedMatrix;
-class ShiftedMatrix;
-class NegShiftedMatrix;
-class ScaledMatrix;
-class TransposedMatrix;
-class ReversedMatrix;
-class NegatedMatrix;
-class InvertedMatrix;
-class RowedMatrix;
-class ColedMatrix;
-class DiagedMatrix;
-class MatedMatrix;
-class GetSubMatrix;
-class ReturnMatrix;
-class Matrix;
-class SquareMatrix;
-class nricMatrix;
-class RowVector;
-class ColumnVector;
-class SymmetricMatrix;
-class UpperTriangularMatrix;
-class LowerTriangularMatrix;
-class DiagonalMatrix;
-class CroutMatrix;
-class BandMatrix;
-class LowerBandMatrix;
-class UpperBandMatrix;
-class SymmetricBandMatrix;
-class LinearEquationSolver;
-class GenericMatrix;
-
-
-#define MatrixTypeUnSp 0
-//static MatrixType MatrixTypeUnSp(MatrixType::US);
-//						// AT&T needs this
-
-class OSSIM_DLL BaseMatrix : public RBD_COMMON::Janitor               // base of all matrix classes
-{
-protected:
-   virtual int search(const BaseMatrix*) const = 0;
-						// count number of times matrix
-   						// is referred to
-
-public:
-   virtual GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp) = 0;
-						// evaluate temporary
-   // for old version of G++
-   //   virtual GeneralMatrix* Evaluate(MatrixType mt) = 0;
-   //   GeneralMatrix* Evaluate() { return Evaluate(MatrixTypeUnSp); }
-   AddedMatrix operator+(const BaseMatrix&) const;    // results of operations
-   MultipliedMatrix operator*(const BaseMatrix&) const;
-   SubtractedMatrix operator-(const BaseMatrix&) const;
-   ConcatenatedMatrix operator|(const BaseMatrix&) const;
-   StackedMatrix operator&(const BaseMatrix&) const;
-   ShiftedMatrix operator+(Real) const;
-   ScaledMatrix operator*(Real) const;
-   ScaledMatrix operator/(Real) const;
-   ShiftedMatrix operator-(Real) const;
-   TransposedMatrix t() const;
-//   TransposedMatrix t;
-   NegatedMatrix operator-() const;                   // change sign of elements
-   ReversedMatrix Reverse() const;
-   InvertedMatrix i() const;
-//   InvertedMatrix i;
-   RowedMatrix AsRow() const;
-   ColedMatrix AsColumn() const;
-   DiagedMatrix AsDiagonal() const;
-   MatedMatrix AsMatrix(int,int) const;
-   GetSubMatrix SubMatrix(int,int,int,int) const;
-   GetSubMatrix SymSubMatrix(int,int) const;
-   GetSubMatrix Row(int) const;
-   GetSubMatrix Rows(int,int) const;
-   GetSubMatrix Column(int) const;
-   GetSubMatrix Columns(int,int) const;
-   Real AsScalar() const;                      // conversion of 1 x 1 matrix
-   virtual LogAndSign LogDeterminant() const;
-   Real Determinant() const;
-   virtual Real SumSquare() const;
-   Real NormFrobenius() const;
-   virtual Real SumAbsoluteValue() const;
-   virtual Real Sum() const;
-   virtual Real MaximumAbsoluteValue() const;
-   virtual Real MaximumAbsoluteValue1(int& i) const;
-   virtual Real MaximumAbsoluteValue2(int& i, int& j) const;
-   virtual Real MinimumAbsoluteValue() const;
-   virtual Real MinimumAbsoluteValue1(int& i) const;
-   virtual Real MinimumAbsoluteValue2(int& i, int& j) const;
-   virtual Real Maximum() const;
-   virtual Real Maximum1(int& i) const;
-   virtual Real Maximum2(int& i, int& j) const;
-   virtual Real Minimum() const;
-   virtual Real Minimum1(int& i) const;
-   virtual Real Minimum2(int& i, int& j) const;
-   virtual Real Trace() const;
-   Real Norm1() const;
-   Real NormInfinity() const;
-   virtual MatrixBandWidth BandWidth() const;  // bandwidths of band matrix
-   virtual void CleanUp() {}                   // to clear store
-   void IEQND() const;                         // called by ineq. ops
-//   virtual ReturnMatrix Reverse() const;       // reverse order of elements
-//protected:
-//   BaseMatrix() : t(this), i(this) {}
-
-   friend class GeneralMatrix;
-   friend class Matrix;
-   friend class SquareMatrix;
-   friend class nricMatrix;
-   friend class RowVector;
-   friend class ColumnVector;
-   friend class SymmetricMatrix;
-   friend class UpperTriangularMatrix;
-   friend class LowerTriangularMatrix;
-   friend class DiagonalMatrix;
-   friend class CroutMatrix;
-   friend class BandMatrix;
-   friend class LowerBandMatrix;
-   friend class UpperBandMatrix;
-   friend class SymmetricBandMatrix;
-   friend class AddedMatrix;
-   friend class MultipliedMatrix;
-   friend class SubtractedMatrix;
-   friend class SPMatrix;
-   friend class KPMatrix;
-   friend class ConcatenatedMatrix;
-   friend class StackedMatrix;
-   friend class SolvedMatrix;
-   friend class ShiftedMatrix;
-   friend class NegShiftedMatrix;
-   friend class ScaledMatrix;
-   friend class TransposedMatrix;
-   friend class ReversedMatrix;
-   friend class NegatedMatrix;
-   friend class InvertedMatrix;
-   friend class RowedMatrix;
-   friend class ColedMatrix;
-   friend class DiagedMatrix;
-   friend class MatedMatrix;
-   friend class GetSubMatrix;
-   friend class ReturnMatrix;
-   friend class LinearEquationSolver;
-   friend class GenericMatrix;
-   NEW_DELETE(BaseMatrix)
-};
-
-
-// ***************************** working classes **************************/
-
-class OSSIM_DLL GeneralMatrix : public BaseMatrix         // declarable matrix types
-{
-   virtual GeneralMatrix* Image() const;        // copy of matrix
-protected:
-   int tag;                                     // shows whether can reuse
-   int nrows, ncols;                            // dimensions
-   int storage;                                 // total store required
-   Real* store;                                 // point to store (0=not set)
-   GeneralMatrix();                             // initialise with no store
-   GeneralMatrix(ArrayLengthSpecifier);         // constructor getting store
-   void Add(GeneralMatrix*, Real);              // sum of GM and Real
-   void Add(Real);                              // add Real to this
-   void NegAdd(GeneralMatrix*, Real);           // Real - GM
-   void NegAdd(Real);                           // this = this - Real
-   void Multiply(GeneralMatrix*, Real);         // product of GM and Real
-   void Multiply(Real);                         // multiply this by Real
-   void Negate(GeneralMatrix*);                 // change sign
-   void Negate();                               // change sign
-   void ReverseElements();                      // internal reverse of elements
-   void ReverseElements(GeneralMatrix*);        // reverse order of elements
-   void operator=(Real);                        // set matrix to constant
-   Real* GetStore();                            // get store or copy
-   GeneralMatrix* BorrowStore(GeneralMatrix*, MatrixType);
-                                                // temporarily access store
-   void GetMatrix(const GeneralMatrix*);        // used by = and initialise
-   void Eq(const BaseMatrix&, MatrixType);      // used by =
-   void Eq(const GeneralMatrix&);               // version with no conversion
-   void Eq(const BaseMatrix&, MatrixType, bool);// used by <<
-   void Eq2(const BaseMatrix&, MatrixType);     // cut down version of Eq
-   int search(const BaseMatrix*) const;
-   virtual GeneralMatrix* Transpose(TransposedMatrix*, MatrixType);
-   void CheckConversion(const BaseMatrix&);     // check conversion OK
-   void ReSize(int, int, int);                  // change dimensions
-   virtual short SimpleAddOK(const GeneralMatrix* /* gm */ ) { return 0; }
-             // see bandmat.cpp for explanation
-   virtual void MiniCleanUp() { store = 0; storage = 0; nrows = 0; ncols = 0; tag = -1;}
-             // CleanUp when the data array has already been deleted
-   void PlusEqual(const GeneralMatrix& gm);
-   void MinusEqual(const GeneralMatrix& gm);
-   void PlusEqual(Real f);
-   void MinusEqual(Real f);
-public:
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   virtual MatrixType Type() const = 0;         // type of a matrix
-   int Nrows() const { return nrows; }          // get dimensions
-   int Ncols() const { return ncols; }
-   int Storage() const { return storage; }
-   Real* Store() const { return store; }
-   virtual ~GeneralMatrix();                    // delete store if set
-   void tDelete();                              // delete if tag permits
-   bool reuse();                                // true if tag allows reuse
-   void Protect() { tag=-1; }                   // cannot delete or reuse
-   int Tag() const { return tag; }
-   bool IsZero() const;                         // test matrix has all zeros
-   void Release() { tag=1; }                    // del store after next use
-   void Release(int t) { tag=t; }               // del store after t accesses
-   void ReleaseAndDelete() { tag=0; }           // delete matrix after use
-   void operator<<(const Real*);                // assignment from an array
-   void operator<<(const int*);                // assignment from an array
-   void operator<<(const BaseMatrix& X)
-      { Eq(X,this->Type(),true); }              // = without checking type
-   void Inject(const GeneralMatrix&);           // copy stored els only
-   void operator+=(const BaseMatrix&);
-   void operator-=(const BaseMatrix&);
-   void operator*=(const BaseMatrix&);
-   void operator|=(const BaseMatrix&);
-   void operator&=(const BaseMatrix&);
-   void operator+=(Real);
-   void operator-=(Real r) { operator+=(-r); }
-   void operator*=(Real);
-   void operator/=(Real r) { operator*=(1.0/r); }
-   virtual GeneralMatrix* MakeSolver();         // for solving
-   virtual void Solver(MatrixColX&, const MatrixColX&) {}
-   virtual void GetRow(MatrixRowCol&) = 0;      // Get matrix row
-   virtual void RestoreRow(MatrixRowCol&) {}    // Restore matrix row
-   virtual void NextRow(MatrixRowCol&);         // Go to next row
-   virtual void GetCol(MatrixRowCol&) = 0;      // Get matrix col
-   virtual void GetCol(MatrixColX&) = 0;        // Get matrix col
-   virtual void RestoreCol(MatrixRowCol&) {}    // Restore matrix col
-   virtual void RestoreCol(MatrixColX&) {}      // Restore matrix col
-   virtual void NextCol(MatrixRowCol&);         // Go to next col
-   virtual void NextCol(MatrixColX&);           // Go to next col
-   Real SumSquare() const;
-   Real SumAbsoluteValue() const;
-   Real Sum() const;
-   Real MaximumAbsoluteValue1(int& i) const;
-   Real MinimumAbsoluteValue1(int& i) const;
-   Real Maximum1(int& i) const;
-   Real Minimum1(int& i) const;
-   Real MaximumAbsoluteValue() const;
-   Real MaximumAbsoluteValue2(int& i, int& j) const;
-   Real MinimumAbsoluteValue() const;
-   Real MinimumAbsoluteValue2(int& i, int& j) const;
-   Real Maximum() const;
-   Real Maximum2(int& i, int& j) const;
-   Real Minimum() const;
-   Real Minimum2(int& i, int& j) const;
-   LogAndSign LogDeterminant() const;
-   virtual bool IsEqual(const GeneralMatrix&) const;
-                                                // same type, same values
-   void CheckStore() const;                     // check store is non-zero
-   virtual void SetParameters(const GeneralMatrix*) {}
-                                                // set parameters in GetMatrix
-   operator ReturnMatrix() const;               // for building a ReturnMatrix
-   ReturnMatrix ForReturn() const;
-   virtual bool SameStorageType(const GeneralMatrix& A) const;
-   virtual void ReSizeForAdd(const GeneralMatrix& A, const GeneralMatrix& B);
-   virtual void ReSizeForSP(const GeneralMatrix& A, const GeneralMatrix& B);
-   virtual void ReSize(const GeneralMatrix& A);
-   MatrixInput operator<<(Real);                // for loading a list
-   MatrixInput operator<<(int f);
-//   ReturnMatrix Reverse() const;                // reverse order of elements
-   void CleanUp();                              // to clear store
-
-   friend class Matrix;
-   friend class SquareMatrix;
-   friend class nricMatrix;
-   friend class SymmetricMatrix;
-   friend class UpperTriangularMatrix;
-   friend class LowerTriangularMatrix;
-   friend class DiagonalMatrix;
-   friend class CroutMatrix;
-   friend class RowVector;
-   friend class ColumnVector;
-   friend class BandMatrix;
-   friend class LowerBandMatrix;
-   friend class UpperBandMatrix;
-   friend class SymmetricBandMatrix;
-   friend class BaseMatrix;
-   friend class AddedMatrix;
-   friend class MultipliedMatrix;
-   friend class SubtractedMatrix;
-   friend class SPMatrix;
-   friend class KPMatrix;
-   friend class ConcatenatedMatrix;
-   friend class StackedMatrix;
-   friend class SolvedMatrix;
-   friend class ShiftedMatrix;
-   friend class NegShiftedMatrix;
-   friend class ScaledMatrix;
-   friend class TransposedMatrix;
-   friend class ReversedMatrix;
-   friend class NegatedMatrix;
-   friend class InvertedMatrix;
-   friend class RowedMatrix;
-   friend class ColedMatrix;
-   friend class DiagedMatrix;
-   friend class MatedMatrix;
-   friend class GetSubMatrix;
-   friend class ReturnMatrix;
-   friend class LinearEquationSolver;
-   friend class GenericMatrix;
-   NEW_DELETE(GeneralMatrix)
-};
-
-
-
-class OSSIM_DLL Matrix : public GeneralMatrix             // usual rectangular matrix
-{
-   GeneralMatrix* Image() const;                // copy of matrix
-public:
-   Matrix():GeneralMatrix() {}
-   ~Matrix() {}
-   Matrix(int, int);                            // standard declaration
-   Matrix(const BaseMatrix&);                   // evaluate BaseMatrix
-   void operator=(const BaseMatrix&);
-   void operator=(Real f) { GeneralMatrix::operator=(f); }
-   void operator=(const Matrix& m) { Eq(m); }
-   MatrixType Type() const;
-   Real& operator()(int, int);                  // access element
-   Real& element(int, int);                     // access element
-   Real operator()(int, int) const;            // access element
-   Real element(int, int) const;               // access element
-#ifdef SETUP_C_SUBSCRIPTS
-   Real* operator[](int m) { return store+m*ncols; }
-   const Real* operator[](int m) const { return store+m*ncols; }
-#endif
-   Matrix(const Matrix& gm):GeneralMatrix(gm) { GetMatrix(&gm); }
-   GeneralMatrix* MakeSolver();
-   Real Trace() const;
-   void GetRow(MatrixRowCol&);
-   void GetCol(MatrixRowCol&);
-   void GetCol(MatrixColX&);
-   void RestoreCol(MatrixRowCol&);
-   void RestoreCol(MatrixColX&);
-   void NextRow(MatrixRowCol&);
-   void NextCol(MatrixRowCol&);
-   void NextCol(MatrixColX&);
-   virtual void ReSize(int,int);           // change dimensions
-      // virtual so we will catch it being used in a vector called as a matrix
-   void ReSize(const GeneralMatrix& A);
-   Real MaximumAbsoluteValue2(int& i, int& j) const;
-   Real MinimumAbsoluteValue2(int& i, int& j) const;
-   Real Maximum2(int& i, int& j) const;
-   Real Minimum2(int& i, int& j) const;
-   void operator+=(const Matrix& M) { PlusEqual(M); }
-   void operator-=(const Matrix& M) { MinusEqual(M); }
-   void operator+=(Real f) { GeneralMatrix::Add(f); }
-   void operator-=(Real f) { GeneralMatrix::Add(-f); }
-   friend Real DotProduct(const Matrix& A, const Matrix& B);
-   NEW_DELETE(Matrix)
-};
-
-class OSSIM_DLL SquareMatrix : public Matrix              // square matrix
-{
-   GeneralMatrix* Image() const;                // copy of matrix
-public:
-   SquareMatrix() {}
-   ~SquareMatrix() {}
-   SquareMatrix(ArrayLengthSpecifier);          // standard declaration
-   SquareMatrix(const BaseMatrix&);             // evaluate BaseMatrix
-   void operator=(const BaseMatrix&);
-   void operator=(Real f) { GeneralMatrix::operator=(f); }
-   void operator=(const SquareMatrix& m) { Eq(m); }
-   void operator=(const Matrix& m);
-   MatrixType Type() const;
-   SquareMatrix(const SquareMatrix& gm):Matrix(gm) { GetMatrix(&gm); }
-   SquareMatrix(const Matrix& gm);
-   void ReSize(int);                            // change dimensions
-   virtual void ReSize(int,int);                // change dimensions
-      // virtual so we will catch it being used in a vector called as a matrix
-   void ReSize(const GeneralMatrix& A);
-   void operator+=(const Matrix& M) { PlusEqual(M); }
-   void operator-=(const Matrix& M) { MinusEqual(M); }
-   void operator+=(Real f) { GeneralMatrix::Add(f); }
-   void operator-=(Real f) { GeneralMatrix::Add(-f); }
-   NEW_DELETE(SquareMatrix)
-};
-
-class OSSIM_DLL nricMatrix : public Matrix                // for use with Numerical
-                                                // Recipes in C
-{
-   GeneralMatrix* Image() const;                // copy of matrix
-   Real** row_pointer;                          // points to rows
-   void MakeRowPointer();                       // build rowpointer
-   void DeleteRowPointer();
-public:
-   nricMatrix():Matrix() {}
-   nricMatrix(int m, int n)                     // standard declaration
-      :  Matrix(m,n) { MakeRowPointer(); }
-   nricMatrix(const BaseMatrix& bm)             // evaluate BaseMatrix
-      :  Matrix(bm) { MakeRowPointer(); }
-   void operator=(const BaseMatrix& bm)
-      { DeleteRowPointer(); Matrix::operator=(bm); MakeRowPointer(); }
-   void operator=(Real f) { GeneralMatrix::operator=(f); }
-   void operator=(const nricMatrix& m)
-      { DeleteRowPointer(); Eq(m); MakeRowPointer(); }
-   void operator<<(const BaseMatrix& X)
-      { DeleteRowPointer(); Eq(X,this->Type(),true); MakeRowPointer(); }
-   nricMatrix(const nricMatrix& gm):Matrix(gm) { GetMatrix(&gm); MakeRowPointer(); }
-   void ReSize(int m, int n)               // change dimensions
-      { DeleteRowPointer(); Matrix::ReSize(m,n); MakeRowPointer(); }
-   void ReSize(const GeneralMatrix& A);
-   ~nricMatrix() { DeleteRowPointer(); }
-   Real** nric() const { CheckStore(); return row_pointer-1; }
-   void CleanUp();                                // to clear store
-   void MiniCleanUp();
-   void operator+=(const Matrix& M) { PlusEqual(M); }
-   void operator-=(const Matrix& M) { MinusEqual(M); }
-   void operator+=(Real f) { GeneralMatrix::Add(f); }
-   void operator-=(Real f) { GeneralMatrix::Add(-f); }
-   NEW_DELETE(nricMatrix)
-};
-
-class OSSIM_DLL SymmetricMatrix : public GeneralMatrix
-{
-   GeneralMatrix* Image() const;                // copy of matrix
-public:
-   SymmetricMatrix():GeneralMatrix() {}
-   ~SymmetricMatrix() {}
-   SymmetricMatrix(ArrayLengthSpecifier);
-   SymmetricMatrix(const BaseMatrix&);
-   void operator=(const BaseMatrix&);
-   void operator=(Real f) { GeneralMatrix::operator=(f); }
-   void operator=(const SymmetricMatrix& m) { Eq(m); }
-   Real& operator()(int, int);                  // access element
-   Real& element(int, int);                     // access element
-   Real operator()(int, int) const;             // access element
-   Real element(int, int) const;                // access element
-#ifdef SETUP_C_SUBSCRIPTS
-   Real* operator[](int m) { return store+(m*(m+1))/2; }
-   const Real* operator[](int m) const { return store+(m*(m+1))/2; }
-#endif
-   MatrixType Type() const;
-   SymmetricMatrix(const SymmetricMatrix& gm):GeneralMatrix(gm) { GetMatrix(&gm); }
-   Real SumSquare() const;
-   Real SumAbsoluteValue() const;
-   Real Sum() const;
-   Real Trace() const;
-   void GetRow(MatrixRowCol&);
-   void GetCol(MatrixRowCol&);
-   void GetCol(MatrixColX&);
-   void RestoreCol(MatrixRowCol&) {}
-   void RestoreCol(MatrixColX&);
-	GeneralMatrix* Transpose(TransposedMatrix*, MatrixType);
-   void ReSize(int);                       // change dimensions
-   void ReSize(const GeneralMatrix& A);
-   void operator+=(const SymmetricMatrix& M) { PlusEqual(M); }
-   void operator-=(const SymmetricMatrix& M) { MinusEqual(M); }
-   void operator+=(Real f) { GeneralMatrix::Add(f); }
-   void operator-=(Real f) { GeneralMatrix::Add(-f); }
-   NEW_DELETE(SymmetricMatrix)
-};
-
-class OSSIM_DLL UpperTriangularMatrix : public GeneralMatrix
-{
-   GeneralMatrix* Image() const;                // copy of matrix
-public:
-   UpperTriangularMatrix():GeneralMatrix() {}
-   ~UpperTriangularMatrix() {}
-   UpperTriangularMatrix(ArrayLengthSpecifier);
-   void operator=(const BaseMatrix&);
-   void operator=(const UpperTriangularMatrix& m) { Eq(m); }
-   UpperTriangularMatrix(const BaseMatrix&);
-   UpperTriangularMatrix(const UpperTriangularMatrix& gm):GeneralMatrix(gm) { GetMatrix(&gm); }
-   void operator=(Real f) { GeneralMatrix::operator=(f); }
-   Real& operator()(int, int);                  // access element
-   Real& element(int, int);                     // access element
-   Real operator()(int, int) const;             // access element
-   Real element(int, int) const;                // access element
-#ifdef SETUP_C_SUBSCRIPTS
-   Real* operator[](int m) { return store+m*ncols-(m*(m+1))/2; }
-   const Real* operator[](int m) const { return store+m*ncols-(m*(m+1))/2; }
-#endif
-   MatrixType Type() const;
-   GeneralMatrix* MakeSolver() { return this; } // for solving
-   void Solver(MatrixColX&, const MatrixColX&);
-   LogAndSign LogDeterminant() const;
-   Real Trace() const;
-   void GetRow(MatrixRowCol&);
-   void GetCol(MatrixRowCol&);
-   void GetCol(MatrixColX&);
-   void RestoreCol(MatrixRowCol&);
-   void RestoreCol(MatrixColX& c) { RestoreCol((MatrixRowCol&)c); }
-   void NextRow(MatrixRowCol&);
-   void ReSize(int);                       // change dimensions
-   void ReSize(const GeneralMatrix& A);
-   MatrixBandWidth BandWidth() const;
-   void operator+=(const UpperTriangularMatrix& M) { PlusEqual(M); }
-   void operator-=(const UpperTriangularMatrix& M) { MinusEqual(M); }
-   void operator+=(Real f) { GeneralMatrix::operator+=(f); }
-   void operator-=(Real f) { GeneralMatrix::operator-=(f); }
-   NEW_DELETE(UpperTriangularMatrix)
-};
-
-class OSSIM_DLL LowerTriangularMatrix : public GeneralMatrix
-{
-   GeneralMatrix* Image() const;                // copy of matrix
-public:
-   LowerTriangularMatrix():GeneralMatrix() {}
-   ~LowerTriangularMatrix() {}
-   LowerTriangularMatrix(ArrayLengthSpecifier);
-   LowerTriangularMatrix(const LowerTriangularMatrix& gm):GeneralMatrix(gm) { GetMatrix(&gm); }
-   LowerTriangularMatrix(const BaseMatrix& M);
-   void operator=(const BaseMatrix&);
-   void operator=(Real f) { GeneralMatrix::operator=(f); }
-   void operator=(const LowerTriangularMatrix& m) { Eq(m); }
-   Real& operator()(int, int);                  // access element
-   Real& element(int, int);                     // access element
-   Real operator()(int, int) const;             // access element
-   Real element(int, int) const;                // access element
-#ifdef SETUP_C_SUBSCRIPTS
-   Real* operator[](int m) { return store+(m*(m+1))/2; }
-   const Real* operator[](int m) const { return store+(m*(m+1))/2; }
-#endif
-   MatrixType Type() const;
-   GeneralMatrix* MakeSolver() { return this; } // for solving
-   void Solver(MatrixColX&, const MatrixColX&);
-   LogAndSign LogDeterminant() const;
-   Real Trace() const;
-   void GetRow(MatrixRowCol&);
-   void GetCol(MatrixRowCol&);
-   void GetCol(MatrixColX&);
-   void RestoreCol(MatrixRowCol&);
-   void RestoreCol(MatrixColX& c) { RestoreCol((MatrixRowCol&)c); }
-   void NextRow(MatrixRowCol&);
-   void ReSize(int);                       // change dimensions
-   void ReSize(const GeneralMatrix& A);
-   MatrixBandWidth BandWidth() const;
-   void operator+=(const LowerTriangularMatrix& M) { PlusEqual(M); }
-   void operator-=(const LowerTriangularMatrix& M) { MinusEqual(M); }
-   void operator+=(Real f) { GeneralMatrix::operator+=(f); }
-   void operator-=(Real f) { GeneralMatrix::operator-=(f); }
-   NEW_DELETE(LowerTriangularMatrix)
-};
-
-class OSSIM_DLL DiagonalMatrix : public GeneralMatrix
-{
-   GeneralMatrix* Image() const;                // copy of matrix
-public:
-   DiagonalMatrix():GeneralMatrix() {}
-   ~DiagonalMatrix() {}
-   DiagonalMatrix(ArrayLengthSpecifier);
-   DiagonalMatrix(const BaseMatrix&);
-   DiagonalMatrix(const DiagonalMatrix& gm):GeneralMatrix(gm) { GetMatrix(&gm); }
-   void operator=(const BaseMatrix&);
-   void operator=(Real f) { GeneralMatrix::operator=(f); }
-   void operator=(const DiagonalMatrix& m) { Eq(m); }
-   Real& operator()(int, int);                  // access element
-   Real& operator()(int);                       // access element
-   Real operator()(int, int) const;             // access element
-   Real operator()(int) const;
-   Real& element(int, int);                     // access element
-   Real& element(int);                          // access element
-   Real element(int, int) const;                // access element
-   Real element(int) const;                     // access element
-#ifdef SETUP_C_SUBSCRIPTS
-   Real& operator[](int m) { return store[m]; }
-   const Real& operator[](int m) const { return store[m]; }
-#endif
-   MatrixType Type() const;
-
-   LogAndSign LogDeterminant() const;
-   Real Trace() const;
-   void GetRow(MatrixRowCol&);
-   void GetCol(MatrixRowCol&);
-   void GetCol(MatrixColX&);
-   void NextRow(MatrixRowCol&);
-   void NextCol(MatrixRowCol&);
-   void NextCol(MatrixColX&);
-   GeneralMatrix* MakeSolver() { return this; } // for solving
-   void Solver(MatrixColX&, const MatrixColX&);
-   GeneralMatrix* Transpose(TransposedMatrix*, MatrixType);
-   void ReSize(int);                       // change dimensions
-   void ReSize(const GeneralMatrix& A);
-   Real* nric() const
-      { CheckStore(); return store-1; }         // for use by NRIC
-   MatrixBandWidth BandWidth() const;
-//   ReturnMatrix Reverse() const;                // reverse order of elements
-   void operator+=(const DiagonalMatrix& M) { PlusEqual(M); }
-   void operator-=(const DiagonalMatrix& M) { MinusEqual(M); }
-   void operator+=(Real f) { GeneralMatrix::operator+=(f); }
-   void operator-=(Real f) { GeneralMatrix::operator-=(f); }
-   NEW_DELETE(DiagonalMatrix)
-};
-
-class OSSIM_DLL RowVector : public Matrix
-{
-   GeneralMatrix* Image() const;                // copy of matrix
-public:
-   RowVector():Matrix() { nrows = 1; }
-   ~RowVector() {}
-   RowVector(ArrayLengthSpecifier n) : Matrix(1,n.Value()) {}
-   RowVector(const BaseMatrix&);
-   RowVector(const RowVector& gm):Matrix(gm) { GetMatrix(&gm); }
-   void operator=(const BaseMatrix&);
-   void operator=(Real f) { GeneralMatrix::operator=(f); }
-   void operator=(const RowVector& m) { Eq(m); }
-   Real& operator()(int);                       // access element
-   Real& element(int);                          // access element
-   Real operator()(int) const;                  // access element
-   Real element(int) const;                     // access element
-#ifdef SETUP_C_SUBSCRIPTS
-   Real& operator[](int m) { return store[m]; }
-   const Real& operator[](int m) const { return store[m]; }
-#endif
-   MatrixType Type() const;
-   void GetCol(MatrixRowCol&);
-   void GetCol(MatrixColX&);
-   void NextCol(MatrixRowCol&);
-   void NextCol(MatrixColX&);
-   void RestoreCol(MatrixRowCol&) {}
-   void RestoreCol(MatrixColX& c);
-   GeneralMatrix* Transpose(TransposedMatrix*, MatrixType);
-   void ReSize(int);                       // change dimensions
-   void ReSize(int,int);                   // in case access is matrix
-   void ReSize(const GeneralMatrix& A);
-   Real* nric() const
-      { CheckStore(); return store-1; }         // for use by NRIC
-   void CleanUp();                              // to clear store
-   void MiniCleanUp() { store = 0; storage = 0; nrows = 1; ncols = 0; tag = -1; }
-   // friend ReturnMatrix GetMatrixRow(Matrix& A, int row);
-   void operator+=(const Matrix& M) { PlusEqual(M); }
-   void operator-=(const Matrix& M) { MinusEqual(M); }
-   void operator+=(Real f) { GeneralMatrix::Add(f); }
-   void operator-=(Real f) { GeneralMatrix::Add(-f); }
-   NEW_DELETE(RowVector)
-};
-
-class OSSIM_DLL ColumnVector : public Matrix
-{
-   GeneralMatrix* Image() const;                // copy of matrix
-public:
-   ColumnVector():Matrix() { ncols = 1; }
-   ~ColumnVector() {}
-   ColumnVector(ArrayLengthSpecifier n) : Matrix(n.Value(),1) {}
-   ColumnVector(const BaseMatrix&);
-   ColumnVector(const ColumnVector& gm):Matrix(gm) { GetMatrix(&gm); }
-   void operator=(const BaseMatrix&);
-   void operator=(Real f) { GeneralMatrix::operator=(f); }
-   void operator=(const ColumnVector& m) { Eq(m); }
-   Real& operator()(int);                       // access element
-   Real& element(int);                          // access element
-   Real operator()(int) const;                  // access element
-   Real element(int) const;                     // access element
-#ifdef SETUP_C_SUBSCRIPTS
-   Real& operator[](int m) { return store[m]; }
-   const Real& operator[](int m) const { return store[m]; }
-#endif
-   MatrixType Type() const;
-   GeneralMatrix* Transpose(TransposedMatrix*, MatrixType);
-   void ReSize(int);                       // change dimensions
-   void ReSize(int,int);                   // in case access is matrix
-   void ReSize(const GeneralMatrix& A);
-   Real* nric() const
-      { CheckStore(); return store-1; }         // for use by NRIC
-   void CleanUp();                              // to clear store
-   void MiniCleanUp() { store = 0; storage = 0; nrows = 0; ncols = 1; tag = -1; }
-//   ReturnMatrix Reverse() const;                // reverse order of elements
-   void operator+=(const Matrix& M) { PlusEqual(M); }
-   void operator-=(const Matrix& M) { MinusEqual(M); }
-   void operator+=(Real f) { GeneralMatrix::Add(f); }
-   void operator-=(Real f) { GeneralMatrix::Add(-f); }
-   NEW_DELETE(ColumnVector)
-};
-
-class OSSIM_DLL CroutMatrix : public GeneralMatrix        // for LU decomposition
-{
-   int* indx;
-   bool d;
-   bool sing;
-   void ludcmp();
-   void operator=(const CroutMatrix& /* m */) {}     // not allowed
-public:
-   CroutMatrix(const BaseMatrix&);
-   MatrixType Type() const;
-   void lubksb(Real*, int=0);
-   ~CroutMatrix();
-   GeneralMatrix* MakeSolver() { return this; } // for solving
-   LogAndSign LogDeterminant() const;
-   void Solver(MatrixColX&, const MatrixColX&);
-   void GetRow(MatrixRowCol&);
-   void GetCol(MatrixRowCol&);
-   void GetCol(MatrixColX& c) { GetCol((MatrixRowCol&)c); }
-   void CleanUp();                                // to clear store
-   void MiniCleanUp();
-   bool IsEqual(const GeneralMatrix&) const;
-   bool IsSingular() const { return sing; }
-   NEW_DELETE(CroutMatrix)
-};
-
-// ***************************** band matrices ***************************/
-
-class OSSIM_DLL BandMatrix : public GeneralMatrix         // band matrix
-{
-   GeneralMatrix* Image() const;                // copy of matrix
-protected:
-   void CornerClear() const;                    // set unused elements to zero
-   short SimpleAddOK(const GeneralMatrix* gm);
-public:
-   int lower, upper;                            // band widths
-   BandMatrix():GeneralMatrix() { lower=0; upper=0; CornerClear(); }
-   ~BandMatrix() {}
-   BandMatrix(int n,int lb,int ub) { ReSize(n,lb,ub); CornerClear(); }
-                                                // standard declaration
-   BandMatrix(const BaseMatrix&);               // evaluate BaseMatrix
-   void operator=(const BaseMatrix&);
-   void operator=(Real f) { GeneralMatrix::operator=(f); }
-   void operator=(const BandMatrix& m) { Eq(m); }
-   MatrixType Type() const;
-   Real& operator()(int, int);                  // access element
-   Real& element(int, int);                     // access element
-   Real operator()(int, int) const;             // access element
-   Real element(int, int) const;                // access element
-#ifdef SETUP_C_SUBSCRIPTS
-   Real* operator[](int m) { return store+(upper+lower)*m+lower; }
-   const Real* operator[](int m) const { return store+(upper+lower)*m+lower; }
-#endif
-   BandMatrix(const BandMatrix& gm):GeneralMatrix(gm) { GetMatrix(&gm); }
-   LogAndSign LogDeterminant() const;
-   GeneralMatrix* MakeSolver();
-   Real Trace() const;
-   Real SumSquare() const { CornerClear(); return GeneralMatrix::SumSquare(); }
-   Real SumAbsoluteValue() const
-      { CornerClear(); return GeneralMatrix::SumAbsoluteValue(); }
-   Real Sum() const
-      { CornerClear(); return GeneralMatrix::Sum(); }
-   Real MaximumAbsoluteValue() const
-      { CornerClear(); return GeneralMatrix::MaximumAbsoluteValue(); }
-   Real MinimumAbsoluteValue() const
-      { int i, j; return GeneralMatrix::MinimumAbsoluteValue2(i, j); }
-   Real Maximum() const { int i, j; return GeneralMatrix::Maximum2(i, j); }
-   Real Minimum() const { int i, j; return GeneralMatrix::Minimum2(i, j); }
-   void GetRow(MatrixRowCol&);
-   void GetCol(MatrixRowCol&);
-   void GetCol(MatrixColX&);
-   void RestoreCol(MatrixRowCol&);
-   void RestoreCol(MatrixColX& c) { RestoreCol((MatrixRowCol&)c); }
-   void NextRow(MatrixRowCol&);
-   virtual void ReSize(int, int, int);             // change dimensions
-   void ReSize(const GeneralMatrix& A);
-   bool SameStorageType(const GeneralMatrix& A) const;
-   void ReSizeForAdd(const GeneralMatrix& A, const GeneralMatrix& B);
-   void ReSizeForSP(const GeneralMatrix& A, const GeneralMatrix& B);
-   MatrixBandWidth BandWidth() const;
-   void SetParameters(const GeneralMatrix*);
-   MatrixInput operator<<(Real);                // will give error
-   MatrixInput operator<<(int f);
-   void operator<<(const Real* r);              // will give error
-   void operator<<(const int* r);               // will give error
-      // the next is included because Zortech and Borland
-      // cannot find the copy in GeneralMatrix
-   void operator<<(const BaseMatrix& X) { GeneralMatrix::operator<<(X); }
-   NEW_DELETE(BandMatrix)
-};
-
-class OSSIM_DLL UpperBandMatrix : public BandMatrix       // upper band matrix
-{
-   GeneralMatrix* Image() const;                // copy of matrix
-public:
-   UpperBandMatrix():BandMatrix() {}
-   ~UpperBandMatrix() {}
-   UpperBandMatrix(int n, int ubw)              // standard declaration
-      : BandMatrix(n, 0, ubw) {}
-   UpperBandMatrix(const BaseMatrix&);          // evaluate BaseMatrix
-   void operator=(const BaseMatrix&);
-   void operator=(Real f) { GeneralMatrix::operator=(f); }
-   void operator=(const UpperBandMatrix& m) { Eq(m); }
-   MatrixType Type() const;
-   UpperBandMatrix(const UpperBandMatrix& gm):BandMatrix(gm) { GetMatrix(&gm); }
-   GeneralMatrix* MakeSolver() { return this; }
-   void Solver(MatrixColX&, const MatrixColX&);
-   LogAndSign LogDeterminant() const;
-   void ReSize(int, int, int);             // change dimensions
-   void ReSize(int n,int ubw)              // change dimensions
-      { BandMatrix::ReSize(n,0,ubw); }
-   void ReSize(const GeneralMatrix& A) { BandMatrix::ReSize(A); }
-   Real& operator()(int, int);
-   Real operator()(int, int) const;
-   Real& element(int, int);
-   Real element(int, int) const;
-#ifdef SETUP_C_SUBSCRIPTS
-   Real* operator[](int m) { return store+upper*m; }
-   const Real* operator[](int m) const { return store+upper*m; }
-#endif
-   NEW_DELETE(UpperBandMatrix)
-};
-
-class OSSIM_DLL LowerBandMatrix : public BandMatrix       // upper band matrix
-{
-   GeneralMatrix* Image() const;                // copy of matrix
-public:
-   LowerBandMatrix():BandMatrix() {}
-   ~LowerBandMatrix() {}
-   LowerBandMatrix(int n, int lbw)              // standard declaration
-      : BandMatrix(n, lbw, 0) {}
-   LowerBandMatrix(const BaseMatrix&);          // evaluate BaseMatrix
-   void operator=(const BaseMatrix&);
-   void operator=(Real f) { GeneralMatrix::operator=(f); }
-   void operator=(const LowerBandMatrix& m) { Eq(m); }
-   MatrixType Type() const;
-   LowerBandMatrix(const LowerBandMatrix& gm):BandMatrix(gm) { GetMatrix(&gm); }
-   GeneralMatrix* MakeSolver() { return this; }
-   void Solver(MatrixColX&, const MatrixColX&);
-   LogAndSign LogDeterminant() const;
-   void ReSize(int, int, int);             // change dimensions
-   void ReSize(int n,int lbw)             // change dimensions
-      { BandMatrix::ReSize(n,lbw,0); }
-   void ReSize(const GeneralMatrix& A) { BandMatrix::ReSize(A); }
-   Real& operator()(int, int);
-   Real operator()(int, int) const;
-   Real& element(int, int);
-   Real element(int, int) const;
-#ifdef SETUP_C_SUBSCRIPTS
-   Real* operator[](int m) { return store+lower*(m+1); }
-   const Real* operator[](int m) const { return store+lower*(m+1); }
-#endif
-   NEW_DELETE(LowerBandMatrix)
-};
-
-class OSSIM_DLL SymmetricBandMatrix : public GeneralMatrix
-{
-   GeneralMatrix* Image() const;                // copy of matrix
-   void CornerClear() const;                    // set unused elements to zero
-   short SimpleAddOK(const GeneralMatrix* gm);
-public:
-   int lower;                                   // lower band width
-   SymmetricBandMatrix():GeneralMatrix() { lower=0; CornerClear(); }
-   ~SymmetricBandMatrix() {}
-   SymmetricBandMatrix(int n, int lb) { ReSize(n,lb); CornerClear(); }
-   SymmetricBandMatrix(const BaseMatrix&);
-   void operator=(const BaseMatrix&);
-   void operator=(Real f) { GeneralMatrix::operator=(f); }
-   void operator=(const SymmetricBandMatrix& m) { Eq(m); }
-   Real& operator()(int, int);                  // access element
-   Real& element(int, int);                     // access element
-   Real operator()(int, int) const;             // access element
-   Real element(int, int) const;                // access element
-#ifdef SETUP_C_SUBSCRIPTS
-   Real* operator[](int m) { return store+lower*(m+1); }
-   const Real* operator[](int m) const { return store+lower*(m+1); }
-#endif
-   MatrixType Type() const;
-   SymmetricBandMatrix(const SymmetricBandMatrix& gm):GeneralMatrix(gm) { GetMatrix(&gm); }
-   GeneralMatrix* MakeSolver();
-   Real SumSquare() const;
-   Real SumAbsoluteValue() const;
-   Real Sum() const;
-   Real MaximumAbsoluteValue() const
-      { CornerClear(); return GeneralMatrix::MaximumAbsoluteValue(); }
-   Real MinimumAbsoluteValue() const
-      { int i, j; return GeneralMatrix::MinimumAbsoluteValue2(i, j); }
-   Real Maximum() const { int i, j; return GeneralMatrix::Maximum2(i, j); }
-   Real Minimum() const { int i, j; return GeneralMatrix::Minimum2(i, j); }
-   Real Trace() const;
-   LogAndSign LogDeterminant() const;
-   void GetRow(MatrixRowCol&);
-   void GetCol(MatrixRowCol&);
-   void GetCol(MatrixColX&);
-   void RestoreCol(MatrixRowCol&) {}
-   void RestoreCol(MatrixColX&);
-   GeneralMatrix* Transpose(TransposedMatrix*, MatrixType);
-   void ReSize(int,int);                       // change dimensions
-   void ReSize(const GeneralMatrix& A);
-   bool SameStorageType(const GeneralMatrix& A) const;
-   void ReSizeForAdd(const GeneralMatrix& A, const GeneralMatrix& B);
-   void ReSizeForSP(const GeneralMatrix& A, const GeneralMatrix& B);
-   MatrixBandWidth BandWidth() const;
-   void SetParameters(const GeneralMatrix*);
-   void operator<<(const Real* r);              // will give error
-   void operator<<(const int* r);               // will give error
-   void operator<<(const BaseMatrix& X) { GeneralMatrix::operator<<(X); }
-   NEW_DELETE(SymmetricBandMatrix)
-};
-
-class OSSIM_DLL BandLUMatrix : public GeneralMatrix
-// for LU decomposition of band matrix
-{
-   int* indx;
-   bool d;
-   bool sing;                                   // true if singular
-   Real* store2;
-   int storage2;
-   void ludcmp();
-   int m1,m2;                                   // lower and upper
-   void operator=(const BandLUMatrix& /* m */) {}     // no allowed
-public:
-   BandLUMatrix(const BaseMatrix&);
-   MatrixType Type() const;
-   void lubksb(Real*, int=0);
-   ~BandLUMatrix();
-   GeneralMatrix* MakeSolver() { return this; } // for solving
-   LogAndSign LogDeterminant() const;
-   void Solver(MatrixColX&, const MatrixColX&);
-   void GetRow(MatrixRowCol&);
-   void GetCol(MatrixRowCol&);
-   void GetCol(MatrixColX& c) { GetCol((MatrixRowCol&)c); }
-   void CleanUp();                                // to clear store
-   void MiniCleanUp();
-   bool IsEqual(const GeneralMatrix&) const;
-   bool IsSingular() const { return sing; }
-   NEW_DELETE(BandLUMatrix)
-};
-
-// ************************** special matrices ****************************
-
-class OSSIM_DLL IdentityMatrix : public GeneralMatrix
-{
-   GeneralMatrix* Image() const;          // copy of matrix
-public:
-   IdentityMatrix():GeneralMatrix() {}
-   ~IdentityMatrix() {}
-   IdentityMatrix(ArrayLengthSpecifier n) : GeneralMatrix(1)
-      { nrows = ncols = n.Value(); *store = 1; }
-   IdentityMatrix(const IdentityMatrix& gm):GeneralMatrix(gm) { GetMatrix(&gm); }
-   IdentityMatrix(const BaseMatrix&);
-   void operator=(const BaseMatrix&);
-   void operator=(const IdentityMatrix& m) { Eq(m); }
-   void operator=(Real f) { GeneralMatrix::operator=(f); }
-   MatrixType Type() const;
-
-   LogAndSign LogDeterminant() const;
-   Real Trace() const;
-   Real SumSquare() const;
-   Real SumAbsoluteValue() const;
-   Real Sum() const { return Trace(); }
-   void GetRow(MatrixRowCol&);
-   void GetCol(MatrixRowCol&);
-   void GetCol(MatrixColX&);
-   void NextRow(MatrixRowCol&);
-   void NextCol(MatrixRowCol&);
-   void NextCol(MatrixColX&);
-   GeneralMatrix* MakeSolver() { return this; } // for solving
-   void Solver(MatrixColX&, const MatrixColX&);
-   GeneralMatrix* Transpose(TransposedMatrix*, MatrixType);
-   void ReSize(int n);
-   void ReSize(const GeneralMatrix& A);
-   MatrixBandWidth BandWidth() const;
-//   ReturnMatrix Reverse() const;                // reverse order of elements
-   NEW_DELETE(IdentityMatrix)
-};
-
-
-
-
-// ************************** GenericMatrix class ************************/
-
-class OSSIM_DLL GenericMatrix : public BaseMatrix
-{
-   GeneralMatrix* gm;
-   int search(const BaseMatrix* bm) const;
-   friend class BaseMatrix;
-public:
-   GenericMatrix() : gm(0) {}
-   GenericMatrix(const BaseMatrix& bm)
-      { gm = ((BaseMatrix&)bm).Evaluate(); gm = gm->Image(); }
-   GenericMatrix(const GenericMatrix& bm) : BaseMatrix(bm)
-      { gm = bm.gm->Image(); }
-   void operator=(const GenericMatrix&);
-   void operator=(const BaseMatrix&);
-   void operator+=(const BaseMatrix&);
-   void operator-=(const BaseMatrix&);
-   void operator*=(const BaseMatrix&);
-   void operator|=(const BaseMatrix&);
-   void operator&=(const BaseMatrix&);
-   void operator+=(Real);
-   void operator-=(Real r) { operator+=(-r); }
-   void operator*=(Real);
-   void operator/=(Real r) { operator*=(1.0/r); }
-   ~GenericMatrix() { delete gm; }
-   void CleanUp() { delete gm; gm = 0; }
-   void Release() { gm->Release(); }
-   GeneralMatrix* Evaluate(MatrixType = MatrixTypeUnSp);
-   MatrixBandWidth BandWidth() const;
-   NEW_DELETE(GenericMatrix)
-};
-
-// *************************** temporary classes *************************/
-
-class OSSIM_DLL MultipliedMatrix : public BaseMatrix
-{
-protected:
-   // if these union statements cause problems, simply remove them
-   // and declare the items individually
-   union { const BaseMatrix* bm1; GeneralMatrix* gm1; };
-						  // pointers to summands
-   union { const BaseMatrix* bm2; GeneralMatrix* gm2; };
-   MultipliedMatrix(const BaseMatrix* bm1x, const BaseMatrix* bm2x)
-      : bm1(bm1x),bm2(bm2x) {}
-   int search(const BaseMatrix*) const;
-   friend class BaseMatrix;
-   friend class GeneralMatrix;
-   friend class GenericMatrix;
-public:
-   ~MultipliedMatrix() {}
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   MatrixBandWidth BandWidth() const;
-   NEW_DELETE(MultipliedMatrix)
-};
-
-class OSSIM_DLL AddedMatrix : public MultipliedMatrix
-{
-protected:
-   AddedMatrix(const BaseMatrix* bm1x, const BaseMatrix* bm2x)
-      : MultipliedMatrix(bm1x,bm2x) {}
-
-   friend class BaseMatrix;
-   friend class GeneralMatrix;
-   friend class GenericMatrix;
-public:
-   ~AddedMatrix() {}
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   MatrixBandWidth BandWidth() const;
-   NEW_DELETE(AddedMatrix)
-};
-
-class OSSIM_DLL SPMatrix : public AddedMatrix
-{
-protected:
-   SPMatrix(const BaseMatrix* bm1x, const BaseMatrix* bm2x)
-      : AddedMatrix(bm1x,bm2x) {}
-
-   friend class BaseMatrix;
-   friend class GeneralMatrix;
-   friend class GenericMatrix;
-public:
-   ~SPMatrix() {}
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   MatrixBandWidth BandWidth() const;
-
-   friend SPMatrix SP(const BaseMatrix&, const BaseMatrix&);
-
-   NEW_DELETE(SPMatrix)
-};
-
-class OSSIM_DLL KPMatrix : public MultipliedMatrix
-{
-protected:
-   KPMatrix(const BaseMatrix* bm1x, const BaseMatrix* bm2x)
-      : MultipliedMatrix(bm1x,bm2x) {}
-
-   friend class BaseMatrix;
-   friend class GeneralMatrix;
-   friend class GenericMatrix;
-public:
-   ~KPMatrix() {}
-   MatrixBandWidth BandWidth() const;
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   friend KPMatrix KP(const BaseMatrix&, const BaseMatrix&);
-   NEW_DELETE(KPMatrix)
-};
-
-class OSSIM_DLL ConcatenatedMatrix : public MultipliedMatrix
-{
-protected:
-   ConcatenatedMatrix(const BaseMatrix* bm1x, const BaseMatrix* bm2x)
-      : MultipliedMatrix(bm1x,bm2x) {}
-
-   friend class BaseMatrix;
-   friend class GeneralMatrix;
-   friend class GenericMatrix;
-public:
-   ~ConcatenatedMatrix() {}
-   MatrixBandWidth BandWidth() const;
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   NEW_DELETE(ConcatenatedMatrix)
-};
-
-class OSSIM_DLL StackedMatrix : public ConcatenatedMatrix
-{
-protected:
-   StackedMatrix(const BaseMatrix* bm1x, const BaseMatrix* bm2x)
-      : ConcatenatedMatrix(bm1x,bm2x) {}
-
-   friend class BaseMatrix;
-   friend class GeneralMatrix;
-   friend class GenericMatrix;
-public:
-   ~StackedMatrix() {}
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   NEW_DELETE(StackedMatrix)
-};
-
-class OSSIM_DLL SolvedMatrix : public MultipliedMatrix
-{
-   SolvedMatrix(const BaseMatrix* bm1x, const BaseMatrix* bm2x)
-      : MultipliedMatrix(bm1x,bm2x) {}
-   friend class BaseMatrix;
-   friend class InvertedMatrix;                        // for operator*
-public:
-   ~SolvedMatrix() {}
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   MatrixBandWidth BandWidth() const;
-   NEW_DELETE(SolvedMatrix)
-};
-
-class OSSIM_DLL SubtractedMatrix : public AddedMatrix
-{
-   SubtractedMatrix(const BaseMatrix* bm1x, const BaseMatrix* bm2x)
-      : AddedMatrix(bm1x,bm2x) {}
-   friend class BaseMatrix;
-   friend class GeneralMatrix;
-   friend class GenericMatrix;
-public:
-   ~SubtractedMatrix() {}
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   NEW_DELETE(SubtractedMatrix)
-};
-
-class OSSIM_DLL ShiftedMatrix : public BaseMatrix
-{
-protected:
-   union { const BaseMatrix* bm; GeneralMatrix* gm; };
-   Real f;
-   ShiftedMatrix(const BaseMatrix* bmx, Real fx) : bm(bmx),f(fx) {}
-   int search(const BaseMatrix*) const;
-   friend class BaseMatrix;
-   friend class GeneralMatrix;
-   friend class GenericMatrix;
-public:
-   ~ShiftedMatrix() {}
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   friend ShiftedMatrix operator+(Real f, const BaseMatrix& BM);
-   NEW_DELETE(ShiftedMatrix)
-};
-
-class OSSIM_DLL NegShiftedMatrix : public ShiftedMatrix
-{
-protected:
-   NegShiftedMatrix(Real fx, const BaseMatrix* bmx) : ShiftedMatrix(bmx,fx) {}
-   friend class BaseMatrix;
-   friend class GeneralMatrix;
-   friend class GenericMatrix;
-public:
-   ~NegShiftedMatrix() {}
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   friend NegShiftedMatrix operator-(Real, const BaseMatrix&);
-   NEW_DELETE(NegShiftedMatrix)
-};
-
-class OSSIM_DLL ScaledMatrix : public ShiftedMatrix
-{
-   ScaledMatrix(const BaseMatrix* bmx, Real fx) : ShiftedMatrix(bmx,fx) {}
-   friend class BaseMatrix;
-   friend class GeneralMatrix;
-   friend class GenericMatrix;
-public:
-   ~ScaledMatrix() {}
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   MatrixBandWidth BandWidth() const;
-   friend ScaledMatrix operator*(Real f, const BaseMatrix& BM);
-   NEW_DELETE(ScaledMatrix)
-};
-
-class OSSIM_DLL NegatedMatrix : public BaseMatrix
-{
-protected:
-   union { const BaseMatrix* bm; GeneralMatrix* gm; };
-   NegatedMatrix(const BaseMatrix* bmx) : bm(bmx) {}
-   int search(const BaseMatrix*) const;
-private:
-   friend class BaseMatrix;
-public:
-   ~NegatedMatrix() {}
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   MatrixBandWidth BandWidth() const;
-   NEW_DELETE(NegatedMatrix)
-};
-
-class OSSIM_DLL TransposedMatrix : public NegatedMatrix
-{
-   TransposedMatrix(const BaseMatrix* bmx) : NegatedMatrix(bmx) {}
-   friend class BaseMatrix;
-public:
-   ~TransposedMatrix() {}
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   MatrixBandWidth BandWidth() const;
-   NEW_DELETE(TransposedMatrix)
-};
-
-class OSSIM_DLL ReversedMatrix : public NegatedMatrix
-{
-   ReversedMatrix(const BaseMatrix* bmx) : NegatedMatrix(bmx) {}
-   friend class BaseMatrix;
-public:
-   ~ReversedMatrix() {}
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   NEW_DELETE(ReversedMatrix)
-};
-
-class OSSIM_DLL InvertedMatrix : public NegatedMatrix
-{
-   InvertedMatrix(const BaseMatrix* bmx) : NegatedMatrix(bmx) {}
-public:
-   ~InvertedMatrix() {}
-   SolvedMatrix operator*(const BaseMatrix&) const;       // inverse(A) * B
-   ScaledMatrix operator*(Real t) const { return BaseMatrix::operator*(t); }
-   friend class BaseMatrix;
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   MatrixBandWidth BandWidth() const;
-   NEW_DELETE(InvertedMatrix)
-};
-
-class OSSIM_DLL RowedMatrix : public NegatedMatrix
-{
-   RowedMatrix(const BaseMatrix* bmx) : NegatedMatrix(bmx) {}
-   friend class BaseMatrix;
-public:
-   ~RowedMatrix() {}
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   MatrixBandWidth BandWidth() const;
-   NEW_DELETE(RowedMatrix)
-};
-
-class OSSIM_DLL ColedMatrix : public NegatedMatrix
-{
-   ColedMatrix(const BaseMatrix* bmx) : NegatedMatrix(bmx) {}
-   friend class BaseMatrix;
-public:
-   ~ColedMatrix() {}
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   MatrixBandWidth BandWidth() const;
-   NEW_DELETE(ColedMatrix)
-};
-
-class OSSIM_DLL DiagedMatrix : public NegatedMatrix
-{
-   DiagedMatrix(const BaseMatrix* bmx) : NegatedMatrix(bmx) {}
-   friend class BaseMatrix;
-public:
-   ~DiagedMatrix() {}
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   MatrixBandWidth BandWidth() const;
-   NEW_DELETE(DiagedMatrix)
-};
-
-class OSSIM_DLL MatedMatrix : public NegatedMatrix
-{
-   int nr, nc;
-   MatedMatrix(const BaseMatrix* bmx, int nrx, int ncx)
-      : NegatedMatrix(bmx), nr(nrx), nc(ncx) {}
-   friend class BaseMatrix;
-public:
-   ~MatedMatrix() {}
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   MatrixBandWidth BandWidth() const;
-   NEW_DELETE(MatedMatrix)
-};
-
-class OSSIM_DLL ReturnMatrix : public BaseMatrix    // for matrix return
-{
-   GeneralMatrix* gm;
-   int search(const BaseMatrix*) const;
-public:
-   ~ReturnMatrix() {}
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   friend class BaseMatrix;
-   ReturnMatrix(const ReturnMatrix& tm) :BaseMatrix(tm), gm(tm.gm) {}
-   ReturnMatrix(const GeneralMatrix* gmx) : gm((GeneralMatrix*&)gmx) {}
-//   ReturnMatrix(GeneralMatrix&);
-   MatrixBandWidth BandWidth() const;
-   NEW_DELETE(ReturnMatrix)
-};
-
-
-// ************************** submatrices ******************************/
-
-class OSSIM_DLL GetSubMatrix : public NegatedMatrix
-{
-   int row_skip;
-   int row_number;
-   int col_skip;
-   int col_number;
-   bool IsSym;
-
-   GetSubMatrix
-      (const BaseMatrix* bmx, int rs, int rn, int cs, int cn, bool is)
-      : NegatedMatrix(bmx),
-      row_skip(rs), row_number(rn), col_skip(cs), col_number(cn), IsSym(is) {}
-   void SetUpLHS();
-   friend class BaseMatrix;
-
-public:
-
-   GetSubMatrix(const GetSubMatrix& g)
-      : NegatedMatrix(g.bm), row_skip(g.row_skip), row_number(g.row_number),
-      col_skip(g.col_skip), col_number(g.col_number), IsSym(g.IsSym) {}
-
-   ~GetSubMatrix() {}
-   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
-   void operator=(const BaseMatrix&);
-   void operator+=(const BaseMatrix&);
-   void operator-=(const BaseMatrix&);
-   void operator=(const GetSubMatrix& m) { operator=((const BaseMatrix&)m); }
-   void operator<<(const BaseMatrix&);
-   void operator<<(const Real*);                // copy from array
-   void operator<<(const int*);                 // copy from array
-   MatrixInput operator<<(Real);                // for loading a list
-   MatrixInput operator<<(int f);
-   void operator=(Real);                        // copy from constant
-   void operator+=(Real);                       // add constant
-   void operator-=(Real r) { operator+=(-r); }  // subtract constant
-   void operator*=(Real);                       // multiply by constant
-   void operator/=(Real r) { operator*=(1.0/r); } // divide by constant
-   void Inject(const GeneralMatrix&);           // copy stored els only
-   MatrixBandWidth BandWidth() const;
-   NEW_DELETE(GetSubMatrix)
-};
-
-// ******************** linear equation solving ****************************/
-
-class OSSIM_DLL LinearEquationSolver : public BaseMatrix
-{
-   GeneralMatrix* gm;
-   int search(const BaseMatrix*) const { return 0; }
-   friend class BaseMatrix;
-public:
-   LinearEquationSolver(const BaseMatrix& bm);
-   ~LinearEquationSolver() { delete gm; }
-   void CleanUp() { delete gm; } 
-   GeneralMatrix* Evaluate(MatrixType) { return gm; }
-   // probably should have an error message if MatrixType != UnSp
-   NEW_DELETE(LinearEquationSolver)
-};
-
-// ************************** matrix input *******************************/
-
-class OSSIM_DLL MatrixInput // for reading a list of values into a matrix
-                           // the difficult part is detecting a mismatch
-                           // in the number of elements
-{
-   int n;                  // number values still to be read
-   Real* r;                // pointer to next location to be read to
-public:
-   MatrixInput(const MatrixInput& mi) : n(mi.n), r(mi.r) {}
-   MatrixInput(int nx, Real* rx) : n(nx), r(rx) {}
-   ~MatrixInput();
-   MatrixInput operator<<(Real);
-   MatrixInput operator<<(int f);
-   friend class GeneralMatrix;
-};
-
-
-
-// **************** a very simple integer array class ********************/
-
-// A minimal array class to imitate a C style array but giving dynamic storage
-// mostly intended for internal use by newmat
-
-class OSSIM_DLL SimpleIntArray : public RBD_COMMON::Janitor
-{
-protected:
-   int* a;                    // pointer to the array
-   int n;                     // length of the array
-public:
-   SimpleIntArray(int xn);    // build an array length xn
-   ~SimpleIntArray();         // return the space to memory
-   int& operator[](int i);    // access element of the array - start at 0
-   int operator[](int i) const;
-			      // access element of constant array
-   void operator=(int ai);    // set the array equal to a constant
-   void operator=(const SimpleIntArray& b);
-			      // copy the elements of an array
-   SimpleIntArray(const SimpleIntArray& b);
-			      // make a new array equal to an existing one
-   int Size() const { return n; }
-			      // return the size of the array
-   int* Data() { return a; }  // pointer to the data
-   const int* Data() const { return a; }
-			      // pointer to the data
-   void ReSize(int i, bool keep = false);
-                              // change length, keep data if keep = true
-   void CleanUp() { ReSize(0); }
-   NEW_DELETE(SimpleIntArray)
-};
-
-// *************************** exceptions ********************************/
-
-class OSSIM_DLL NPDException : public Runtime_error     // Not positive definite
-{
-public:
-   static unsigned long Select;          // for identifying exception
-   NPDException(const GeneralMatrix&);
-};
-
-class OSSIM_DLL ConvergenceException : public Runtime_error
-{
-public:
-   static unsigned long Select;          // for identifying exception
-   ConvergenceException(const GeneralMatrix& A);
-   ConvergenceException(const char* c);
-};
-
-class OSSIM_DLL SingularException : public Runtime_error
-{
-public:
-   static unsigned long Select;          // for identifying exception
-   SingularException(const GeneralMatrix& A);
-};
-
-class OSSIM_DLL OverflowException : public Runtime_error
-{
-public:
-   static unsigned long Select;          // for identifying exception
-   OverflowException(const char* c);
-};
-
-class OSSIM_DLL ProgramException : public Logic_error
-{
-protected:
-   ProgramException();
-public:
-   static unsigned long Select;          // for identifying exception
-   ProgramException(const char* c);
-   ProgramException(const char* c, const GeneralMatrix&);
-   ProgramException(const char* c, const GeneralMatrix&, const GeneralMatrix&);
-   ProgramException(const char* c, MatrixType, MatrixType);
-};
-
-class OSSIM_DLL IndexException : public Logic_error
-{
-public:
-   static unsigned long Select;          // for identifying exception
-   IndexException(int i, const GeneralMatrix& A);
-   IndexException(int i, int j, const GeneralMatrix& A);
-   // next two are for access via element function
-   IndexException(int i, const GeneralMatrix& A, bool);
-   IndexException(int i, int j, const GeneralMatrix& A, bool);
-};
-
-class OSSIM_DLL VectorException : public Logic_error    // cannot convert to vector
-{
-public:
-   static unsigned long Select;          // for identifying exception
-   VectorException();
-   VectorException(const GeneralMatrix& A);
-};
-
-class OSSIM_DLL NotSquareException : public Logic_error
-{
-public:
-   static unsigned long Select;          // for identifying exception
-   NotSquareException(const GeneralMatrix& A);
-   NotSquareException();
-};
-
-class OSSIM_DLL SubMatrixDimensionException : public Logic_error
-{
-public:
-   static unsigned long Select;          // for identifying exception
-   SubMatrixDimensionException();
-};
-
-class OSSIM_DLL IncompatibleDimensionsException : public Logic_error
-{
-public:
-   static unsigned long Select;          // for identifying exception
-   IncompatibleDimensionsException();
-   IncompatibleDimensionsException(const GeneralMatrix&, const GeneralMatrix&);
-};
-
-class OSSIM_DLL NotDefinedException : public Logic_error
-{
-public:
-   static unsigned long Select;          // for identifying exception
-   NotDefinedException(const char* op, const char* matrix);
-};
-
-class OSSIM_DLL CannotBuildException : public Logic_error
-{
-public:
-   static unsigned long Select;          // for identifying exception
-   CannotBuildException(const char* matrix);
-};
-
-
-class OSSIM_DLL InternalException : public Logic_error
-{
-public:
-   static unsigned long Select;          // for identifying exception
-   InternalException(const char* c);
-};
-
-// ************************ functions ************************************ //
-
-bool operator==(const GeneralMatrix& A, const GeneralMatrix& B);
-bool operator==(const BaseMatrix& A, const BaseMatrix& B);
-inline bool operator!=(const GeneralMatrix& A, const GeneralMatrix& B)
-   { return ! (A==B); }
-inline bool operator!=(const BaseMatrix& A, const BaseMatrix& B)
-   { return ! (A==B); }
-
-   // inequality operators are dummies included for compatibility
-   // with STL. They throw an exception if actually called.
-inline bool operator<=(const BaseMatrix& A, const BaseMatrix&)
-   { A.IEQND(); return true; }
-inline bool operator>=(const BaseMatrix& A, const BaseMatrix&)
-   { A.IEQND(); return true; }
-inline bool operator<(const BaseMatrix& A, const BaseMatrix&)
-   { A.IEQND(); return true; }
-inline bool operator>(const BaseMatrix& A, const BaseMatrix&)
-   { A.IEQND(); return true; }
-
-bool IsZero(const BaseMatrix& A);
-
-Matrix CrossProduct(const Matrix& A, const Matrix& B);
-ReturnMatrix CrossProductRows(const Matrix& A, const Matrix& B);
-ReturnMatrix CrossProductColumns(const Matrix& A, const Matrix& B);
-
-
-// ********************* inline functions ******************************** //
-
-
-inline LogAndSign LogDeterminant(const BaseMatrix& B)
-   { return B.LogDeterminant(); }
-inline Real Determinant(const BaseMatrix& B)
-   { return B.Determinant(); }
-inline Real SumSquare(const BaseMatrix& B) { return B.SumSquare(); }
-inline Real NormFrobenius(const BaseMatrix& B) { return B.NormFrobenius(); }
-inline Real Trace(const BaseMatrix& B) { return B.Trace(); }
-inline Real SumAbsoluteValue(const BaseMatrix& B)
-   { return B.SumAbsoluteValue(); }
-inline Real Sum(const BaseMatrix& B)
-   { return B.Sum(); }
-inline Real MaximumAbsoluteValue(const BaseMatrix& B)
-   { return B.MaximumAbsoluteValue(); }
-inline Real MinimumAbsoluteValue(const BaseMatrix& B)
-   { return B.MinimumAbsoluteValue(); }
-inline Real Maximum(const BaseMatrix& B) { return B.Maximum(); }
-inline Real Minimum(const BaseMatrix& B) { return B.Minimum(); }
-inline Real Norm1(const BaseMatrix& B) { return B.Norm1(); }
-inline Real Norm1(RowVector& RV) { return RV.MaximumAbsoluteValue(); }
-inline Real NormInfinity(const BaseMatrix& B) { return B.NormInfinity(); }
-inline Real NormInfinity(ColumnVector& CV)
-   { return CV.MaximumAbsoluteValue(); }
-inline bool IsZero(const GeneralMatrix& A) { return A.IsZero(); }
-
-
-inline MatrixInput MatrixInput::operator<<(int f) { return *this << (Real)f; }
-inline MatrixInput GeneralMatrix::operator<<(int f) { return *this << (Real)f; }
-inline MatrixInput BandMatrix::operator<<(int f) { return *this << (Real)f; }
-inline MatrixInput GetSubMatrix::operator<<(int f) { return *this << (Real)f; }
-
-
-
-#ifdef use_namespace
-}
-#endif
-
-
-#endif
-
-// body file: newmat1.cpp
-// body file: newmat2.cpp
-// body file: newmat3.cpp
-// body file: newmat4.cpp
-// body file: newmat5.cpp
-// body file: newmat6.cpp
-// body file: newmat7.cpp
-// body file: newmat8.cpp
-// body file: newmatex.cpp
-// body file: bandmat.cpp
-// body file: submat.cpp
-
-
-
-
-
-
-
diff --git a/include/ossim/matrix/newmatap.h b/include/ossim/matrix/newmatap.h
deleted file mode 100644
index f0ebe5c..0000000
--- a/include/ossim/matrix/newmatap.h
+++ /dev/null
@@ -1,201 +0,0 @@
-//$$ newmatap.h           definition file for matrix package applications
-
-// Copyright (C) 1991,2,3,4,8: R B Davies
-
-#ifndef NEWMATAP_LIB
-#define NEWMATAP_LIB 0
-
-#include <ossim/matrix/newmat.h>
-
-#ifdef use_namespace
-namespace NEWMAT {
-#endif
-
-
-// ************************** applications *****************************/
-
-
-void QRZT(Matrix&, LowerTriangularMatrix&);
-
-void QRZT(const Matrix&, Matrix&, Matrix&);
-
-void QRZ(Matrix&, UpperTriangularMatrix&);
-
-void QRZ(const Matrix&, Matrix&, Matrix&);
-
-inline void HHDecompose(Matrix& X, LowerTriangularMatrix& L)
-{ QRZT(X,L); }
-
-inline void HHDecompose(const Matrix& X, Matrix& Y, Matrix& M)
-{ QRZT(X, Y, M); }
-
-void UpdateQRZT(Matrix& X, LowerTriangularMatrix& L);
-
-void UpdateQRZ(Matrix& X, UpperTriangularMatrix& U);
-
-
-ReturnMatrix Cholesky(const SymmetricMatrix&);
-
-ReturnMatrix Cholesky(const SymmetricBandMatrix&);
-
-
-// produces the Cholesky decomposition of A + x.t() * x where A = chol.t() * chol
-// and x is a RowVector
-void UpdateCholesky(UpperTriangularMatrix &chol, RowVector r1Modification);
-
-// produces the Cholesky decomposition of A - x.t() * x where A = chol.t() * chol
-// and x is a RowVector
-void DowndateCholesky(UpperTriangularMatrix &chol, RowVector x);
-
-// a RIGHT circular shift of the rows and columns from
-// 1,...,k-1,k,k+1,...l,l+1,...,p to
-// 1,...,k-1,l,k,k+1,...l-1,l+1,...p
-void RightCircularUpdateCholesky(UpperTriangularMatrix &chol, int k, int l);
-
-// a LEFT circular shift of the rows and columns from
-// 1,...,k-1,k,k+1,...l,l+1,...,p to
-// 1,...,k-1,k+1,...l,k,l+1,...,p to
-void LeftCircularUpdateCholesky(UpperTriangularMatrix &chol, int k, int l); 
-
-
-void SVD(const Matrix&, DiagonalMatrix&, Matrix&, Matrix&,
-    bool=true, bool=true);
-
-void SVD(const Matrix&, DiagonalMatrix&);
-
-inline void SVD(const Matrix& A, DiagonalMatrix& D, Matrix& U,
-   bool withU = true) { SVD(A, D, U, U, withU, false); }
-
-void SortSV(DiagonalMatrix& D, Matrix& U, bool ascending = false);
-
-void SortSV(DiagonalMatrix& D, Matrix& U, Matrix& V, bool ascending = false);
-
-void Jacobi(const SymmetricMatrix&, DiagonalMatrix&);
-
-void Jacobi(const SymmetricMatrix&, DiagonalMatrix&, SymmetricMatrix&);
-
-void Jacobi(const SymmetricMatrix&, DiagonalMatrix&, Matrix&);
-
-void Jacobi(const SymmetricMatrix&, DiagonalMatrix&, SymmetricMatrix&,
-   Matrix&, bool=true);
-
-void EigenValues(const SymmetricMatrix&, DiagonalMatrix&);
-
-void EigenValues(const SymmetricMatrix&, DiagonalMatrix&, SymmetricMatrix&);
-
-void EigenValues(const SymmetricMatrix&, DiagonalMatrix&, Matrix&);
-
-class SymmetricEigenAnalysis
-// not implemented yet
-{
-public:
-   SymmetricEigenAnalysis(const SymmetricMatrix&);
-private:
-   DiagonalMatrix diag;
-   DiagonalMatrix offdiag;
-   SymmetricMatrix backtransform;
-   FREE_CHECK(SymmetricEigenAnalysis)
-};
-
-void SortAscending(GeneralMatrix&);
-
-void SortDescending(GeneralMatrix&);
-
-
-// class for deciding which fft to use and containing new fft function
-class FFT_Controller
-{
-public:
-   static bool OnlyOldFFT;
-   static bool ar_1d_ft (int PTS, Real* X, Real *Y);
-   static bool CanFactor(int PTS);
-};
-
-void FFT(const ColumnVector&, const ColumnVector&,
-   ColumnVector&, ColumnVector&);
-
-void FFTI(const ColumnVector&, const ColumnVector&,
-   ColumnVector&, ColumnVector&);
-
-void RealFFT(const ColumnVector&, ColumnVector&, ColumnVector&);
-
-void RealFFTI(const ColumnVector&, const ColumnVector&, ColumnVector&);
-
-void DCT_II(const ColumnVector&, ColumnVector&);
-
-void DCT_II_inverse(const ColumnVector&, ColumnVector&);
-
-void DST_II(const ColumnVector&, ColumnVector&);
-
-void DST_II_inverse(const ColumnVector&, ColumnVector&);
-
-void DCT(const ColumnVector&, ColumnVector&);
-
-void DCT_inverse(const ColumnVector&, ColumnVector&);
-
-void DST(const ColumnVector&, ColumnVector&);
-
-void DST_inverse(const ColumnVector&, ColumnVector&);
-
-void FFT2(const Matrix& U, const Matrix& V, Matrix& X, Matrix& Y);
-
-void FFT2I(const Matrix& U, const Matrix& V, Matrix& X, Matrix& Y);
-
-
-// This class is used by the new FFT program
-
-// Suppose an integer is expressed as a sequence of digits with each
-// digit having a different radix.
-// This class supposes we are counting with this multi-radix number
-// but also keeps track of the number with the digits (and radices)
-// reversed.
-// The integer starts at zero
-// operator++() increases it by 1
-// Counter gives the number of increments
-// Reverse() gives the value with the digits in reverse order
-// Swap is true if reverse is less than counter
-// Finish is true when we have done a complete cycle and are back at zero
-
-class MultiRadixCounter
-{
-   const SimpleIntArray& Radix;
-                              // radix of each digit
-                              // n-1 highest order, 0 lowest order
-   SimpleIntArray& Value;     // value of each digit
-   const int n;               // number of digits
-   int reverse;               // value when order of digits is reversed
-   int product;               // product of radices
-   int counter;               // counter
-   bool finish;               // true when we have gone over whole range
-public:
-   MultiRadixCounter(int nx, const SimpleIntArray& rx,
-      SimpleIntArray& vx);
-   void operator++();         // increment the multi-radix counter
-   bool Swap() const { return reverse < counter; }
-   bool Finish() const { return finish; }
-   int Reverse() const { return reverse; }
-   int Counter() const { return counter; }
-};
-
-
-#ifdef use_namespace
-}
-#endif
-
-
-
-#endif
-
-// body file: cholesky.cpp
-// body file: evalue.cpp
-// body file: fft.cpp
-// body file: hholder.cpp
-// body file: jacobi.cpp
-// body file: newfft.cpp
-// body file: sort.cpp
-// body file: svd.cpp
-
-
-
-
-
diff --git a/include/ossim/matrix/newmatrc.h b/include/ossim/matrix/newmatrc.h
deleted file mode 100644
index 806412d..0000000
--- a/include/ossim/matrix/newmatrc.h
+++ /dev/null
@@ -1,171 +0,0 @@
-//$$ newmatrc.h              definition file for row/column classes
-
-// Copyright (C) 1991,2,3,4,7: R B Davies
-
-#ifndef NEWMATRC_LIB
-#define NEWMATRC_LIB 0
-
-#ifdef use_namespace
-namespace NEWMAT {
-#endif
-
-#include <ossim/matrix/controlw.h>
-
-
-/************** classes MatrixRowCol, MatrixRow, MatrixCol *****************/
-
-// Used for accessing the rows and columns of matrices
-// All matrix classes must provide routines for calculating matrix rows and
-// columns. Assume rows can be found very efficiently.
-
-enum LSF { LoadOnEntry=1,StoreOnExit=2,DirectPart=4,StoreHere=8,HaveStore=16 };
-
-
-class LoadAndStoreFlag : public ControlWord
-{
-public:
-   LoadAndStoreFlag() {}
-   LoadAndStoreFlag(int i) : ControlWord(i) {}
-   LoadAndStoreFlag(LSF lsf) : ControlWord(lsf) {}
-   LoadAndStoreFlag(const ControlWord& cwx) : ControlWord(cwx) {}
-};
-
-class MatrixRowCol
-// the row or column of a matrix
-{
-public:                                        // these are public to avoid
-                                               // numerous friend statements
-   int length;                                 // row or column length
-   int skip;                                   // initial number of zeros
-   int storage;                                // number of stored elements
-   int rowcol;                                 // row or column number
-   GeneralMatrix* gm;                          // pointer to parent matrix
-   Real* data;                                 // pointer to local storage
-   LoadAndStoreFlag cw;                        // Load? Store? Is a Copy?
-   void IncrMat() { rowcol++; data += storage; }   // used by NextRow
-   void IncrDiag() { rowcol++; skip++; data++; }
-   void IncrId() { rowcol++; skip++; }
-   void IncrUT() { rowcol++; data += storage; storage--; skip++; }
-   void IncrLT() { rowcol++; data += storage; storage++; }
-
-public:
-   void Zero();                                // set elements to zero
-   void Add(const MatrixRowCol&);              // add a row/col
-   void AddScaled(const MatrixRowCol&, Real);  // add a multiple of a row/col
-   void Add(const MatrixRowCol&, const MatrixRowCol&);
-                                               // add two rows/cols
-   void Add(const MatrixRowCol&, Real);        // add a row/col
-   void NegAdd(const MatrixRowCol&, Real);     // Real - a row/col
-   void Sub(const MatrixRowCol&);              // subtract a row/col
-   void Sub(const MatrixRowCol&, const MatrixRowCol&);
-					       // sub a row/col from another
-   void RevSub(const MatrixRowCol&);           // subtract from a row/col
-   void ConCat(const MatrixRowCol&, const MatrixRowCol&);
-                                               // concatenate two row/cols
-   void Multiply(const MatrixRowCol&);         // multiply a row/col
-   void Multiply(const MatrixRowCol&, const MatrixRowCol&);
-                                               // multiply two row/cols
-   void KP(const MatrixRowCol&, const MatrixRowCol&);
-                                               // Kronecker Product two row/cols
-   void Copy(const MatrixRowCol&);             // copy a row/col
-   void CopyCheck(const MatrixRowCol&);        // ... check for data loss
-   void Check(const MatrixRowCol&);            // just check for data loss
-   void Check();                               // check full row/col present
-   void Copy(const Real*&);                    // copy from an array
-   void Copy(const int*&);                     // copy from an array
-   void Copy(Real);                            // copy from constant
-   void Add(Real);                             // add a constant
-   void Multiply(Real);                        // multiply by constant
-   Real SumAbsoluteValue();                    // sum of absolute values
-   Real MaximumAbsoluteValue1(Real r, int& i); // maximum of absolute values
-   Real MinimumAbsoluteValue1(Real r, int& i); // minimum of absolute values
-   Real Maximum1(Real r, int& i);              // maximum
-   Real Minimum1(Real r, int& i);              // minimum
-   Real Sum();                                 // sum of values
-   void Inject(const MatrixRowCol&);           // copy stored els of a row/col
-   void Negate(const MatrixRowCol&);           // change sign of a row/col
-   void Multiply(const MatrixRowCol&, Real);   // scale a row/col
-   friend Real DotProd(const MatrixRowCol&, const MatrixRowCol&);
-                                               // sum of pairwise product
-   Real* Data() { return data; }
-   int Skip() { return skip; }                 // number of elements skipped
-   int Storage() { return storage; }           // number of elements stored
-   int Length() { return length; }             // length of row or column
-   void Skip(int i) { skip=i; }
-   void Storage(int i) { storage=i; }
-   void Length(int i) { length=i; }
-   void SubRowCol(MatrixRowCol&, int, int) const;
-					       // get part of a row or column
-   MatrixRowCol() {}                           // to stop warning messages
-   ~MatrixRowCol();
-   FREE_CHECK(MatrixRowCol)
-};
-
-class MatrixRow : public MatrixRowCol
-{
-public:
-   // bodies for these are inline at the end of this .h file
-   MatrixRow(GeneralMatrix*, LoadAndStoreFlag, int=0);
-                                               // extract a row
-   ~MatrixRow();
-   void Next();                                // get next row
-   FREE_CHECK(MatrixRow)
-};
-
-class MatrixCol : public MatrixRowCol
-{
-public:
-   // bodies for these are inline at the end of this .h file
-   MatrixCol(GeneralMatrix*, LoadAndStoreFlag, int=0);
-                                               // extract a col
-   MatrixCol(GeneralMatrix*, Real*, LoadAndStoreFlag, int=0);
-                                               // store/retrieve a col
-   ~MatrixCol();
-   void Next();                                // get next row
-   FREE_CHECK(MatrixCol)
-};
-
-// MatrixColX is an alternative to MatrixCol where the complete
-// column is stored externally
-
-class MatrixColX : public MatrixRowCol
-{
-public:
-   // bodies for these are inline at the end of this .h file
-   MatrixColX(GeneralMatrix*, Real*, LoadAndStoreFlag, int=0);
-                                               // store/retrieve a col
-   ~MatrixColX();
-   void Next();                                // get next row
-   Real* store;                                // pointer to local storage
-                                               //    less skip
-   FREE_CHECK(MatrixColX)
-};
-
-/**************************** inline bodies ****************************/
-
-inline MatrixRow::MatrixRow(GeneralMatrix* gmx, LoadAndStoreFlag cwx, int row)
-{ gm=gmx; cw=cwx; rowcol=row; gm->GetRow(*this); }
-
-inline void MatrixRow::Next() { gm->NextRow(*this); }
-
-inline MatrixCol::MatrixCol(GeneralMatrix* gmx, LoadAndStoreFlag cwx, int col)
-{ gm=gmx; cw=cwx; rowcol=col; gm->GetCol(*this); }
-
-inline MatrixCol::MatrixCol(GeneralMatrix* gmx, Real* r,
-   LoadAndStoreFlag cwx, int col)
-{ gm=gmx; data=r; cw=cwx+StoreHere; rowcol=col; gm->GetCol(*this); }
-
-inline MatrixColX::MatrixColX(GeneralMatrix* gmx, Real* r,
-   LoadAndStoreFlag cwx, int col)
-{ gm=gmx; store=data=r; cw=cwx+StoreHere; rowcol=col; gm->GetCol(*this); }
-
-
-inline void MatrixCol::Next() { gm->NextCol(*this); }
-
-inline void MatrixColX::Next() { gm->NextCol(*this); }
-
-#ifdef use_namespace
-}
-#endif
-
-#endif
diff --git a/include/ossim/parallel/ossimIgen.h b/include/ossim/parallel/ossimIgen.h
deleted file mode 100644
index b25cc19..0000000
--- a/include/ossim/parallel/ossimIgen.h
+++ /dev/null
@@ -1,71 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: Class declaration for image generator.
-//
-//*************************************************************************
-// $Id: ossimIgen.h 20303 2011-11-29 16:11:46Z oscarkramer $
-#ifndef ossimIgen_HEADER
-#define ossimIgen_HEADER
-
-#include <iostream>
-#include <list>
-#include <fstream>
-
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimConnectableContainer.h>
-#include <ossim/imaging/ossimTiling.h>
-
-class ossimImageChain;
-class ossimImageFileWriter;
-class ossimMapProjection;
-class ossimImageViewTransform;
-class ossimImageSource;
-class ossimImageMpiMWriterSequenceConnection;
-class ossimImageMpiSWriterSequenceConnection;
-class ossimObject;
-class ossimArgumentParser;
-
-class OSSIM_DLL ossimIgen : public ossimReferenced
-{
-public:
-   ossimIgen();
-   virtual ~ossimIgen();
-
-   virtual void initialize(const ossimKeywordlist& kwl);
-   virtual void outputProduct();
-   
-protected:
-   void initializeAttributes();
-   void slaveSetup();
-   bool loadProductSpec();
-   void setView();
-   void initThumbnailProjection();
-   void initializeChain();
-   bool writeToFile(ossimImageFileWriter* writer);
-
-   ossimRefPtr<ossimConnectableContainer> theContainer;
-   ossimRefPtr<ossimMapProjection>  theProductProjection;
-   ossimRefPtr<ossimImageChain>  theProductChain;
-   ossimRefPtr<ossimTiling>      theTiling;
-   ossimDrect        theOutputRect;
-   bool              theBuildThumbnailFlag;
-   ossimIpt          theThumbnailSize;
-   long              theNumberOfTilesToBuffer;
-   ossimKeywordlist  theKwl;
-   bool              theTilingEnabled;
-   bool              theProgressFlag;
-   bool              theStdoutFlag;
-   ossim_uint32      theThreadCount;
-
-};
-
-#endif
diff --git a/include/ossim/parallel/ossimImageChainMtAdaptor.h b/include/ossim/parallel/ossimImageChainMtAdaptor.h
deleted file mode 100644
index 6887a6b..0000000
--- a/include/ossim/parallel/ossimImageChainMtAdaptor.h
+++ /dev/null
@@ -1,122 +0,0 @@
-//*************************************************************************************************
-//                                            OSSIM
-//
-// License:  LGPL -- See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Oscar Kramer
-//
-//*************************************************************************************************
-// $Id$
-#ifndef ossimImageChainMtAdaptor_HEADER
-#define ossimImageChainMtAdaptor_HEADER
-
-#include <vector>
-#include <ossim/imaging/ossimImageChain.h>
-#include <ossim/parallel/ossimImageHandlerMtAdaptor.h>
-#include <ossim/base/ossimId.h>
-#include <ossim/base/ossimConnectableContainer.h>
-
-//*************************************************************************************************
-//! This class supports multi-threading of image chain getTile() requests and associated chain
-//! updating. It accepts an original ossimImageChain object which is then cloned (replicated). 
-//! One clone per thread is created, counting the original as clone(0), with all clones
-//! sharing a common input handler (if directed) so that disk access is serialized and thread-safe.
-//*************************************************************************************************
-class OSSIMDLLEXPORT ossimImageChainMtAdaptor : public ossimImageChain
-{
-   friend class ossimMultiThreadSequencer; //### FOR DEBUG ONLY
-
-public:
-   ossimImageChainMtAdaptor();
-
-   //! Full constructor accepts the original image chain to clone. 
-   //! @param num_threads  Total number of cloned chains to make available.
-   //! 
-   ossimImageChainMtAdaptor(ossimImageChain* original, ossim_uint32 num_threads=0);
-   ~ossimImageChainMtAdaptor();
-
-   //! Alternate way of specifying number of threads to support. This is the same as the number of 
-   //! clones that will be available after replicating the original chain. 
-   //! @param num_threads  Total number of cloned chains to make available.
-   void setNumberOfThreads(ossim_uint32 num_threads);
-
-   //! Alternate way of specifying the original chain being adapted for multi-threading.
-   //! @param original  Image chain to be adapted.
-   void setOriginalChain(ossimImageChain* original);
-
-   //! Intercepts the getTile because it should never be called directly. The tile request must go
-   //! to the specific chain clone.
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
-                                               ossim_uint32 resLevel=0);
-   
-   //! Adapts call to original chain so that all clones are initialized.
-   virtual void initialize();
-
-   //! Adapts call to original chain so that clones are replicated after original's loadState.
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=NULL);
-
-   //! Adapts call to original chain so that adapter-specific keywords can be added to KWL.
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=NULL)const;
-
-   //! Adapts the image chain event handler. If the event involves a change to the original image 
-   //! chain, then the clones will need to be regenerated here.
-   virtual void processEvent(ossimEvent& event);
-
-   //! Returns pointer to a specific clone image chain, or NULL if index exceeds the max available.
-   //! The clone at index=0 corresponds to the original, though this detail should be ignored.
-   ossimImageSource* getClone(ossim_uint32 index);
-
-   //! Returns the number of clones available. The original chain always counts as the first clone.
-   ossim_uint32 getNumberOfClones() const { return (ossim_uint32) m_clones.size(); }
-
-   //! These overriding access methods greatly facilitate the implementation of an image chain
-   //! adapter class operating on the member original chain. These methods really should be 
-   //! "protected" but the compiler complains if the base class declarations are "protected".
-   virtual ossimConnectableObject::ConnectableObjectList& imageChainList();
-   virtual const ossimConnectableObject::ConnectableObjectList& imageChainList() const;
-
-   //! Overrides base class implementation in order to make the connection to each clone. This 
-   //! connection is typically to the multi-thread sequencer object.
-   virtual ossim_int32 connectMyOutputTo(ossimConnectableObject* outputObject,
-                                         bool makeInputConnection=true,
-                                         bool createEventFlag=true);
-
-protected:
-   //! Deletes instances of all replicas from the clone list and leaves only the original.
-   void deleteReplicas();
-
-   //! Creates clones of original and pushes them onto the clone list. Returns TRUE if successful.
-   bool replicate();
-
-   //! Manages reconnecting shared image handlers to a cloned image chain (identified by index)
-   //! after its creation. This is in support of shared image handlers. Returns TRUE if successful.
-   bool connectSharedHandlers(ossim_uint32 index);
-
-   //! This is the adaptee image chain.
-   ossimRefPtr<ossimImageChain> m_adaptedChain;
-
-   //! List of replicated child chains' first source (the one receiving the getTile call). The
-   //! first in the list is always the original (adaptee) source. These are owned by the 
-   //! m_chainContainers that are maintained here.
-   std::vector< ossimRefPtr<ossimImageSource> > m_clones;
-   
-   //! The container objects must be kept alive in this vector while their child chains in
-   //! m_clones are used. Containers are used because they are the only way of "duping" a complete 
-   //! chain with all connections properly done. The containers need to persist in order for the 
-   //! chain connections to be maintained (apparent bug in connectable object code). I found it 
-   //! impossible to dissociate the chain from its container. As soon as the container disappeared,
-   //! the chain's internal connections would be disrupted. (OLK 11/11)
-   std::vector< ossimRefPtr<ossimConnectableContainer> > m_chainContainers;
-
-   //! List of handlers that are being shared among all clones (if requested). It is a list since 
-   //! the original chain may involve a combiner with multiple image inputs.
-   typedef std::vector<ossimRefPtr<ossimImageHandlerMtAdaptor> > SharedHandlerList;
-   SharedHandlerList m_sharedHandlers;
-
-   ossim_uint32 m_numThreads;
-
-   bool d_useSharedHandlers;
-   bool d_debugEnabled;
-
-};
-#endif /* #ifndef ossimImageChain_HEADER */
diff --git a/include/ossim/parallel/ossimImageMpiMWriterSequenceConnection.h b/include/ossim/parallel/ossimImageMpiMWriterSequenceConnection.h
deleted file mode 100644
index 52bcc21..0000000
--- a/include/ossim/parallel/ossimImageMpiMWriterSequenceConnection.h
+++ /dev/null
@@ -1,60 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-// This class is specific to the Master connection and is optimized
-// for the writer sequence and batch processing chain.  For the Slave
-// implementation look for the ossimImageMpiSWriterSequenceConnection.cc and .h
-// files.  The Master connection is currently implemented to allways do
-// a recieve and does no processing itself.  The slave connection does
-// all the actual work and processing.
-//
-//*******************************************************************
-//  $Id: ossimImageMpiMWriterSequenceConnection.h 9094 2006-06-13 19:12:40Z dburken $
-#ifndef ossimImageMpiMWriterSequenceConnection_HEADER
-#define ossimImageMpiMWriterSequenceConnection_HEADER
-#include <ossim/imaging/ossimImageSourceSequencer.h>
-class ossimImageData;
-class ossimImageMpiMWriterSequenceConnection : public ossimImageSourceSequencer
-{
-public:
-   ossimImageMpiMWriterSequenceConnection(ossimObject* owner=NULL);
-   ossimImageMpiMWriterSequenceConnection(ossimImageSource* inputSource,
-                                          ossimObject* owner=NULL);
-  virtual ~ossimImageMpiMWriterSequenceConnection();
-
-   /*!
-    * This is a virtual method that can be overriden
-    * by derived classes (MPI, or PVM or other
-    * parallel connections.  This method is to indicate
-    * whether or not this connection is the master/
-    * controlling connection.
-    */
-   virtual void initialize();
-   virtual void setToStartOfSequence();
-
-   virtual bool isMaster()const
-      {
-         return true;
-      }
-   /*!
-    * Will allow you to get the next tile in the sequence.
-    */
-   virtual ossimRefPtr<ossimImageData> getNextTile(ossim_uint32 resLevel=0);
-protected:
-   int theNumberOfProcessors;
-   int theRank;
-   bool theNeedToSendRequest;
-   ossimRefPtr<ossimImageData> theOutputTile;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/parallel/ossimImageMpiSWriterSequenceConnection.h b/include/ossim/parallel/ossimImageMpiSWriterSequenceConnection.h
deleted file mode 100644
index f15f84d..0000000
--- a/include/ossim/parallel/ossimImageMpiSWriterSequenceConnection.h
+++ /dev/null
@@ -1,53 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimImageMpiSWriterSequenceConnection.h 9094 2006-06-13 19:12:40Z dburken $
-#ifndef ossimImageMpiSWriterSequenceConnection_HEADER
-#define ossimImageMpiSWriterSequenceConnection_HEADER
-#include <ossim/imaging/ossimImageSourceSequencer.h>
-class ossimImageData;
-class ossimImageMpiSWriterSequenceConnection : public ossimImageSourceSequencer
-{
-public:
-   ossimImageMpiSWriterSequenceConnection(ossimObject* owner=NULL,
-                                          long numberOfTilesToBuffer = 2);
-   
-   ossimImageMpiSWriterSequenceConnection(ossimImageSource* inputSource,
-                                          ossimObject* owner=NULL,
-                                          long numberOfTilesToBuffer = 2);
-   
-  virtual ~ossimImageMpiSWriterSequenceConnection();
-   virtual bool isMaster()const
-      {
-         return false;
-      }
-
-   virtual void initialize();
-   virtual void setToStartOfSequence();
-   /*!
-    * Will allow you to get the next tile in the sequence.
-    */
-   virtual ossimRefPtr<ossimImageData> getNextTile(ossim_uint32 resLevel=0);
-
-   virtual void slaveProcessTiles();
-   
-protected:
-   int theNumberOfProcessors;
-   int theRank;
-   int theNumberOfTilesToBuffer;
-   
-   ossimRefPtr<ossimImageData>* theOutputTile;
-
-   void deleteOutputTiles();
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/parallel/ossimOrthoIgen.h b/include/ossim/parallel/ossimOrthoIgen.h
deleted file mode 100644
index 93effe1..0000000
--- a/include/ossim/parallel/ossimOrthoIgen.h
+++ /dev/null
@@ -1,249 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: Class declaration for ortho-image generator.
-//
-//*************************************************************************
-// $Id: ossimOrthoIgen.h 20936 2012-05-18 14:45:00Z oscarkramer $
-
-#ifndef ossimOrthoIgen_HEADER
-#define ossimOrthoIgen_HEADER
-
-#include <ossim/parallel/ossimIgen.h>
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimConnectableContainer.h>
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/imaging/ossimImageChain.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/support_data/ossimSrcRecord.h>
-#include <map>
-
-class ossimConnectableObject;
-class ossimMapProjection;
-class ossimImageSource;
-class ossimImageHandler;
-class ossimImageCombiner;
-
-class OSSIM_DLL ossimOrthoIgen : public ossimIgen
-{
-public:
-   enum ossimOrthoIgenProjectionType
-   {
-      OSSIM_UNKNOWN_PROJECTION = 0,
-      OSSIM_UTM_PROJECTION,
-      OSSIM_SRS_PROJECTION,
-      OSSIM_GEO_PROJECTION,
-      OSSIM_INPUT_PROJECTION,
-      OSSIM_EXTERNAL_PROJECTION
-   };
-   enum OriginType
-   {
-      OSSIM_CENTER_ORIGIN     = 0,
-      OSSIM_UPPER_LEFT_ORIGIN = 1
-   };
-   typedef std::map<ossimString,ossimString, ossimStringLtstr> PropertyMap;
-   
-   ossimOrthoIgen();
-
-   /**
-    * Will add command line arguments to initialize this object from a command line application
-    *
-    * <pre>
-    * Command Line Arguments:
-    *
-    * -t or --thumbnail  Takes an integer argument that is used to set both width
-    *                    and height.
-    *                    example: -t 1024 will produce an image that is 1024x1024
-    * --meters           Takes a double precision argument that is used for meters per pixel
-    *                    override.
-    *                    example: --meters 5 will create a 5 meter product.
-    * --slave-buffers    Takes an integer as an argument that specifies the number of slave tile buffers per
-    *                    slave node.  The slave nodes are suppose to be asynch send.  It will
-    *                    not wait for the send to finish.  It will got to the next buffer and check to
-    *                    see if it's been sent and if not it will then wait for the buffer to be free.
-    *                    example: --slave-buffers 10  will create 10 buffers per slave node.
-    * --chain-template   Takes a file name that is a kewyord list that is used as a template for every
-    *                    input file.
-    *                    example:
-    * 
-    * @param argumentParser Argument parser object to add command line options to
-    *
-    */ 
-   void addArguments(ossimArgumentParser& argumentParser);
-   virtual void initialize(ossimArgumentParser& argumentParser);
-   void addFiles(ossimArgumentParser& argumentParser,
-                 bool withDecoding,
-                 ossim_uint32 startIdx = 1);
-   void clearFilenameList();
-
-   //! Parses the .src file specified in the command line. These contain an alternate specification
-   //! of input file and associated attributes as a KWL.
-   void addSrcFile(const ossimFilename& fileName);
-
-   bool execute();
-   void setDefaultValues();
-
-protected:
-   //! Used to parse command line filename specs with piped switches (in lieu of *.src file).
-   //! Returns TRUE if successful.
-   bool parseFilename(const ossimString& file_spec, bool decodeEntry);
-
-   //! Determines the UL corner tiepoint of the product projection as the overall UL corner of the
-   //! mosaic.
-   void establishMosaicTiePoint();
-
-   ossimUnitType theDeltaPerPixelUnit;
-   ossimDpt      theDeltaPerPixelOverride;
-   ossimOrthoIgenProjectionType theProjectionType;
-   ossimString   theProjectionName;
-   ossimString   theCrsString;
-   ossim_float64 theGeoScalingLatitude;
-   ossimString   theCombinerType;
-   ossimString   theResamplerType;
-   ossimString   theWriterType;
-   ossimFilename theTemplateView;
-   ossimFilename theTilingTemplate;
-   ossimFilename theTilingFilename;
-   ossimFilename theChainTemplate;
-   ossimFilename theCombinerTemplate;
-   ossimFilename theAnnotationTemplate;
-   ossimFilename theWriterTemplate;
-   ossimFilename theSupplementaryDirectory;
-   ossimString   theSlaveBuffers;
-   OriginType    theCutOriginType;
-   ossimDpt      theCutOrigin;
-   ossimDpt      theCutDxDy;
-   ossimUnitType theCutOriginUnit;
-   ossimUnitType theCutDxDyUnit;
-   ossim_float64 theLowPercentClip;
-   ossim_float64 theHighPercentClip;
-   ossim_int32   theStdDevClip;
-   bool          theUseAutoMinMaxFlag;
-   bool          theClipToValidRectFlag;
-   PropertyMap   theReaderProperties;
-   PropertyMap   theWriterProperties;   
-   ossimFilename theTargetHistoFileName;
-   std::vector<ossimSrcRecord> theSrcRecords;
-   ossimFilename theProductFilename;
-   ossimRefPtr<ossimProjection> theReferenceProj;
-   ossimFilename theMaskShpFile;
-   bool          theCacheExcludedFlag;
-   ossimString   thePixelReplacementMode;
-   ossim_float64 theClampPixelMin;
-   ossim_float64 theClampPixelMax;
-   ossim_float64 theClipPixelMin;
-   ossim_float64 theClipPixelMax;
-   ossimString   theOutputRadiometry;
-   ossimPixelType thePixelAlignment;
-
-   /**
-   * @brief Sets up the igen keyword list for the process.
-   *
-   * This throws ossimException on error.
-   */
-   void setupIgenChain();
-
-   bool setupTiling();
-   void setupCutter();
-
-   /** 
-   * Checks for the presence of a raster mask file alongside the image, and inserts the mask 
-   * filter in the chain if mask file exists. Returns with current_src pointing to masker object 
-   */
-   ossimImageSource* setupRasterMask(ossimImageChain* single_image_chain,
-                        const ossimSrcRecord& src_record);
-
-   /**
-   * Insert a partial-pixel flipper to remap null-valued pixels to min according to info in the
-   * source record and/or command line. Returns with current_src pointing to flipper object.
-   */
-   ossimImageSource* setupPixelFlipper(ossimImageChain* single_image_chain, 
-                          const ossimSrcRecord& src_record);
-
-   /**
-    * @brief Set up the writer for the process.
-    * This throws ossimException on error.
-    */
-   void setupWriter();
-
-   /**
-    * @brief Set up the output projection for the process.
-    * This throws ossimException on error.
-    */
-   void setupProjection();
-
-   /**
-    * Sets up any annotation from --annotate option.
-    * @note This must be called after "setupView" as it needs a projection.
-    */
-   void setupAnnotation();
-
-   void addFiles(ossimString fileInfoStr, 
-                 std::vector<ossimString> fileInfos,
-                 bool withEncodedEntry);
-
-   /**
-   * Consolidates specification of bounding rect given various ways of specifying on the command
-   * line. This avoids multiple, redundant checks scattered throughout the code.
-   */
-   void consolidateCutRectSpec();
-
-   /**
-   * Called when histogram operation is requested. Sets up additional filters in image chain
-   * for performing matching, stretching or clipping. If chain=0,
-   * this implies that the target histogram is being enabled for the output mosaic. */
-   void setupHistogram(ossimImageChain* chain=0, const ossimSrcRecord& src_record=ossimSrcRecord());
-
-   //! Utility method for creating a histogram for an input image. Returns TRUE if successful.
-   bool createHistogram(ossimImageChain* chain, const ossimFilename& histo_filename);
-
-   /**
-    * @brief Adds cache to the left of resampler.
-    * @param chain The chain to add to.
-    */
-   void addChainCache(ossimImageChain* chain) const;
-
-   /**
-   * @brief Generates a log KWL file that could be fed directly to Igen. Used for verifying chain.
-   */
-   void generateLog();
-  
-   /**
-   * @brief Adds a scalar remapper to the extreme right of the chain is specified by the 
-   * --output-radiometry option.
-   */
-   void setupOutputRadiometry();
-
-   /**
-    * @brief Checks all input image projections to see if elevation is needed.
-    * @return true if affected, false if not.
-    */
-   bool isAffectedByElevation();
-
-   /**
-    * @brief Recomputes image gsds.
-    *
-    * Calls ossimImageGeometry::computeGsd() on all image handlers
-    * that have projections affected by elevation.  Used to recompute after a
-    * delayed load of elevation.
-    */
-   void reComputeChainGsds();
-
-   /**
-    * GSD Determination is nontrivial since there are various command-line options that control
-    * this quantity. This method considers all information before setting the product's GSD.
-    */
-   void setProductGsd();
-};
-#endif
diff --git a/include/ossim/plugin/ossimDynamicLibrary.h b/include/ossim/plugin/ossimDynamicLibrary.h
deleted file mode 100644
index fec12d6..0000000
--- a/include/ossim/plugin/ossimDynamicLibrary.h
+++ /dev/null
@@ -1,63 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// LICENSE: LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimDynamicLibrary.h 20694 2012-03-19 12:22:05Z dburken $
-#ifndef ossimDynamicLibrary_HEADER
-#define ossimDynamicLibrary_HEADER 1
-
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimReferenced.h>
-#include <ossim/ossimConfig.h>
-
-#if defined(_WIN32) || defined(__WIN32__)
-#include <windows.h>
-#else 
-#include <dlfcn.h>
-#endif
-
-class ossimDynamicLibrary : public ossimReferenced
-{
-public:
-   ossimDynamicLibrary();
-   ossimDynamicLibrary(const ossimString& name);
-   virtual ~ossimDynamicLibrary();
-   // return TRUE if the library was loaded successfully
-   bool isLoaded() const { return theLibrary != 0; }
-
-   // load the library with the given name (full or not), return TRUE on
-   // success
-   bool load(const ossimString& name);
-
-   bool load();
-   // unload the library, also done automatically in dtor
-   void unload();
-
-   // load a symbol from the library, return NULL if an error occured or
-   // symbol wasn't found
-   void *getSymbol(const ossimString& name) const;
-
-   const ossimString& getName()const
-   {
-      return theLibraryName;
-   }
-   
-protected:
-   // the handle to DLL or NULL
-#if defined(_WIN32)
-   HINSTANCE theLibrary;
-#else
-   void* theLibrary;
-#endif
-   ossimString theLibraryName;
-
-};
-
-#endif
-
diff --git a/include/ossim/projection/ossimAdjMapModel.h b/include/ossim/projection/ossimAdjMapModel.h
deleted file mode 100644
index 0637f46..0000000
--- a/include/ossim/projection/ossimAdjMapModel.h
+++ /dev/null
@@ -1,137 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (c) 2005, Oscar Kramer, all rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Oscar Kramer
-//
-// Description:
-// 
-// Special "sensor model" that provides a conventional map projection but
-// with additional capability for adjusting the map x,y coordinates with
-// offset, scale, and rotation transform.  Funtions to control notifications,
-// information and error output.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimAdjMapModel.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimAdjMapModel_HEADER
-#define ossimAdjMapModel_HEADER
-
-#include <ossim/matrix/newmat.h>
-#include <ossim/projection/ossimSensorModel.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimRefPtr.h>
-
-using namespace NEWMAT;
-
-class ossimMapProjection;
-
-//----------------------------------------------------------------------------
-//  CLASS DESCRIPTION: ossimAdjMapModel
-//! Special "sensor model" that provides a conventional map projection but with
-//  additional
-//! capability for adjusting the map x,y coordinates with offset, scale, and
-//  rotation transform.
-//----------------------------------------------------------------------------
-class OSSIMDLLEXPORT ossimAdjMapModel : public ossimSensorModel
-{
-public:
-   //! Constructs to uninitialized state (needed by factory).
-   ossimAdjMapModel();
-
-   //! Constructs with map projection and image rectangle size.
-   ossimAdjMapModel(ossimMapProjection* map_proj, const ossimIpt& image_size);
-
-   //! Copy constructor
-   ossimAdjMapModel(const ossimAdjMapModel& copy_this);
-
-   //! Constructs given geom KWL.
-   ossimAdjMapModel(const ossimKeywordlist& kwl, const char* prefix);
-
-   //! Constructs given geom filename.
-   ossimAdjMapModel(const ossimFilename& geom_filename);
-
-   //! Initializes base class data members after map model established.
-   //  Returns TRUE if all's well.
-   bool initializeFromMap();
-
-   //! Returns pointer to a new instance, copy of this.
-   virtual ossimObject* dup() const;
-   
-   //! Extends base-class implementation. Dumps contents of object to ostream.
-   virtual std::ostream& print(std::ostream& out) const;
-   
-   //! Fulfills ossimObject base-class pure virtuals. Loads and saves geometry
-   //! KWL files. Returns true if successful.
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0) const;
-   
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-   
-   //! Writes a template of geom keywords processed by loadState and saveState
-   //  to output stream.
-   static void writeGeomTemplate(ostream& os);
-   
-   //! Overrides base class pure virtual.
-   virtual void lineSampleHeightToWorld(const ossimDpt& image_point,
-                                        const double&   heightEllipsoid,
-                                        ossimGpt&       worldPoint) const;
-   
-   //! Overrides base class virtual.
-   virtual void lineSampleToWorld(const ossimDpt& image_point,
-                                  ossimGpt&       worldPoint) const;
-   
-   //! Rigorous inverse transform implented, overrides base-class' iterative
-   //  solution.
-   virtual void worldToLineSample(const ossimGpt& world_point,
-                                  ossimDpt&       image_point) const;
-      
-   //! Following a change to the adjustable parameter set, this virtual is
-   //  called to permit 
-   //! instances to compute derived quantities after parameter change.
-   virtual void updateModel();
-
-   //! Initializes adjustable parameters to their default values.
-   //! Overrides ossimAdjustableParameterInterface virtual method.
-   virtual void initAdjustableParameters();
-
-   //! Fetches the GSD from the internal map projection.
-   virtual ossimDpt 	getMetersPerPixel () const;
-
-   //! Enumeration for adjustable parameter positions in theAdjParams vector
-   enum AdjParamIndex
-   {
-      OFFSET_X = 0,         // meters
-      OFFSET_Y,             // meters
-      ROTATION,             // degrees CCW
-      SCALE_X,              // ratio
-      SCALE_Y,              // ratio
-      NUM_ADJ_PARAMS // not an index
-   };
-
-   /*!
-    * ossimOptimizableProjection
-    */
-   inline virtual bool useForward()const {return true;} //!ground to image faster (you don't need DEM)
-
-private:
-   //! Destructor only deletes the map projection.
-   virtual ~ossimAdjMapModel();
-   
-   //! This is the vector of UNNORMALIZED, BIASED parameters as used in the
-   //! model. The collection of normalized, 0-biased, parameters used in
-   //! registration are found in the
-   //! ossimAdjustableParameterInterface and related classes.
-   //!  The quantities here are computed given the base class quantities.
-   ColumnVector                    theAdjParams;
-
-   ossimRefPtr<ossimMapProjection> theMapProjection;
-   double                          theCosTheta;
-   double                          theSinTheta;
-
-TYPE_DATA
-};
-
-#endif /* End of "#ifndef ossimAdjMapModel_HEADER" */
diff --git a/include/ossim/projection/ossimApplanixEcefModel.h b/include/ossim/projection/ossimApplanixEcefModel.h
deleted file mode 100644
index 2c8ac0d..0000000
--- a/include/ossim/projection/ossimApplanixEcefModel.h
+++ /dev/null
@@ -1,102 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2005 Garrett Potts
-//
-// LGPL
-// 
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimApplanixEcefModel.h 20496 2012-01-25 17:15:43Z gpotts $
-#ifndef ossimApplanixEcefModel_HEADER
-#define ossimApplanixEcefModel_HEADER
-#include <ossim/projection/ossimFcsiModel.h>
-#include <ossim/projection/ossimMeanRadialLensDistortion.h>
-#include <ossim/base/ossimDpt3d.h>
-
-class OSSIM_DLL ossimApplanixEcefModel : public ossimSensorModel
-{
-public:
-   ossimApplanixEcefModel();
-   ossimApplanixEcefModel(const ossimDrect& imageRect, // center in image space
-                          const ossimGpt& platformPosition,
-                          double roll,
-                          double pitch,
-                          double heading,
-                          const ossimDpt& principalPoint, // in millimeters
-                          double focalLength, // in millimeters
-                          const ossimDpt& pixelSize); // in millimeters
-   ossimApplanixEcefModel(const ossimApplanixEcefModel& src);
-   virtual ossimObject* dup()const;
-   
-   virtual void imagingRay(const ossimDpt& image_point,
-                           ossimEcefRay&   image_ray) const;
-
-   void lineSampleToWorld(const ossimDpt& image_point,
-                          ossimGpt&       gpt) const;
-  
-   
-   virtual void lineSampleHeightToWorld(const ossimDpt& image_point,
-                                        const double&   heightEllipsoid,
-                                        ossimGpt&       worldPoint) const;
-   virtual void worldToLineSample(const ossimGpt& world_point,
-                                  ossimDpt&       image_point) const;
-   
-   virtual void updateModel();
-
-   void setPrincipalPoint(ossimDpt principalPoint);
-
-   virtual bool insideImage(const ossimDpt& p) const
-   {
-      /*          return( (p.u>=(0.0-FLT_EPSILON)) && */
-      /*                  (p.u<=(double)(theImageSize.u-(1-FLT_EPSILON))) && */
-      /*                  (p.v>=(0.0-FLT_EPSILON)) && */
-      /*                  (p.v<=(double)(theImageSize.v-(1-FLT_EPSILON))) ); */
-      // if it's close to the edge we will consider it inside the image
-      //
-      return theImageClipRect.pointWithin(p, theImageClipRect.width());
-   }
-
-
-   void setRollPitchHeading(double roll,
-                            double pitch,
-                            double heading);
-   
-   void setPixelSize(const ossimDpt& pixelSize);
-   void setImageRect(const ossimDrect& rect);
-   void setFocalLength(double focalLength);
-   void setPlatformPosition(const ossimGpt& gpt);
-
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0) const;
-   
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   virtual void initAdjustableParameters();
-   
-   /*!
-    * ossimOptimizableProjection
-    */
-//   inline virtual bool useForward()const {return true;} //!ground to image faster (you don't need DEM)
-   inline virtual bool useForward()const {return false;} //!ground to image faster (you don't need DEM)
-   virtual bool setupOptimizer(const ossimString& init_file); //!uses file path to init model
-
-protected:
-   
-   NEWMAT::Matrix theCompositeMatrix;
-   NEWMAT::Matrix theCompositeMatrixInverse;
-   double         theRoll;
-   double         thePitch;
-   double         theHeading;
-   ossimDpt       thePrincipalPoint;
-   ossimDpt       thePixelSize;
-   double         theFocalLength;
-   ossimEcefPoint theEcefPlatformPosition;
-   ossimRefPtr<ossimMeanRadialLensDistortion> theLensDistortion;
-
-
-   ossimEcefPoint theAdjEcefPlatformPosition;
-   
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/projection/ossimApplanixUtmModel.h b/include/ossim/projection/ossimApplanixUtmModel.h
deleted file mode 100644
index 21b01ad..0000000
--- a/include/ossim/projection/ossimApplanixUtmModel.h
+++ /dev/null
@@ -1,83 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2005 Garrett Potts
-//
-// LGPL
-// 
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimApplanixUtmModel.h 9094 2006-06-13 19:12:40Z dburken $
-#ifndef ossimApplanixUtmModel_HEADER
-#define ossimApplanixUtmModel_HEADER
-#include <ossim/projection/ossimFcsiModel.h>
-#include <ossim/projection/ossimMeanRadialLensDistortion.h>
-#include <ossim/base/ossimDpt3d.h>
-
-class OSSIM_DLL ossimApplanixUtmModel : public ossimSensorModel
-{
-public:
-   ossimApplanixUtmModel();
-   ossimApplanixUtmModel(const ossimApplanixUtmModel& src);
-   virtual ossimObject* dup()const;
-   
-   virtual void imagingRay(const ossimDpt& image_point,
-                           ossimEcefRay&   image_ray) const;
-
-   void lineSampleToWorld(const ossimDpt& image_point,
-                          ossimGpt&       gpt) const;
-  
-   virtual void lineSampleHeightToWorld(const ossimDpt& image_point,
-                                        const double&   heightEllipsoid,
-                                        ossimGpt&       worldPoint) const;
-   virtual void worldToLineSample(const ossimGpt& world_point,
-                                  ossimDpt&       image_point) const;
-   
-   virtual void updateModel();
-
-   void setPrincipalPoint(ossimDpt principalPoint);
-
-   void setPixelSize(const ossimDpt& pixelSize);
-   void setImageRect(const ossimDrect& rect);
-   void setFocalLength(double focalLength);
-   void setPlatformPosition(const ossimGpt& gpt);
-
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0) const;
-   
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   virtual void initAdjustableParameters();
-   
-   /*!
-    * ossimOptimizableProjection
-    */
-//   inline virtual bool useForward()const {return false;} 
-   inline virtual bool useForward()const {return true;} //!ground to image faster (you don't need DEM) //TBC
-   virtual bool setupOptimizer(const ossimString& init_file); //!uses file path to init model
-
-protected:
-   NEWMAT::Matrix theCompositeMatrix;
-   NEWMAT::Matrix theCompositeMatrixInverse;
-   double         theOmega;
-   double         thePhi;
-   double         theKappa;
-   double         theBoreSightTx;
-   double         theBoreSightTy;
-   double         theBoreSightTz;
-   ossimDpt       thePrincipalPoint;
-   ossimDpt       thePixelSize;
-   double         theFocalLength;
-   ossimEcefPoint theEcefPlatformPosition;
-   ossimGpt       thePlatformPosition;
-   ossim_int32    theUtmZone;
-   ossim_int8     theUtmHemisphere;
-   ossimDpt3d     theUtmPlatformPosition;
-   ossimEcefVector theShiftValues;
-   
-   ossimRefPtr<ossimMeanRadialLensDistortion> theLensDistortion;
-   ossimEcefPoint theAdjEcefPlatformPosition;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/projection/ossimBuckeyeSensor.h b/include/ossim/projection/ossimBuckeyeSensor.h
deleted file mode 100644
index 9a79062..0000000
--- a/include/ossim/projection/ossimBuckeyeSensor.h
+++ /dev/null
@@ -1,134 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-// 
-//*******************************************************************
-//  $Id$
-#ifndef ossimBuckeyeSensor_HEADER
-#define ossimBuckeyeSensor_HEADER
-/**
- * The Buckey sensor has a set of simple orientation paramters.  For this model we are using the
- * orientation paramters found in the MetaData_GSTI.txt file typically found in the directory where the
- * imagery sits.
- *
- * There are 2 forms the class takes for keyword lists.  The first allows one to point
- * to a file containing the frame numbers and all the orientation paramters. You will still
- * need to define the Camera information and callibrartion paramters.  The pixel_size, 
- * focal_length and principal point are all in millimeters. 
- *
- * <pre>
- * EXAMPLE 1:
- *
- * type: ossimBuckeyeSensor
- * framemeta_gsti: /data/buckey/01-31 at 09/01-31 at 09/10-39-48/FrameMeta_GSTI.txt
- * frame_number: 10001
- * pixel_size: (0.0068,0.0068)
- * focal_length: 211.0211
- * principal_point: (-0.1853,1.2428)
- * smac_radial: -.2165e-3 .4230e-7 -.1652e-11 .2860e-19 .5690e-26
- * smac_decent: -.1483e-6 .1558e-6 -.1464e-18 .1233e-38
- * rect: 0 0 7239 5432
- *
- *
- * EXAMPLE 2:
- * roll: 0.074405
- * pitch: 2.849851
- * yaw: 269.517649
- * platform_position: (34.927014,69.353684,3757.12,WGE)
- * pixel_size: (0.0068,0.0068)
- * focal_length: 211.0211
- * principal_point: (-0.1853,1.2428)
- * smac_radial: -.2165e-3 .4230e-7 -.1652e-11 .2860e-19 .5690e-26
- * smac_decent: -.1483e-6 .1558e-6 -.1464e-18 .1233e-38
- * rect: 0 0 7239 5432
- */
-#include <ossim/projection/ossimFcsiModel.h>
-#include <ossim/base/ossimDpt3d.h>
-#include "ossimSmacCallibrationSystem.h"
-
-class OSSIM_DLL ossimBuckeyeSensor : public ossimSensorModel
-{
-public:
-   ossimBuckeyeSensor();
-   ossimBuckeyeSensor(const ossimDrect& imageRect, // center in image space
-                          const ossimGpt& platformPosition,
-                          double roll,
-                          double pitch,
-                          double heading,
-                          const ossimDpt& principalPoint, // in millimeters
-                          double focalLength, // in millimeters
-                          const ossimDpt& pixelSize); // in millimeters
-   ossimBuckeyeSensor(const ossimBuckeyeSensor& src);
-   virtual ossimObject* dup()const;
-   
-   virtual void imagingRay(const ossimDpt& image_point,
-                           ossimEcefRay&   image_ray) const;
-
-   void lineSampleToWorld(const ossimDpt& image_point,
-                          ossimGpt&       gpt) const;
-  
-   
-   virtual void lineSampleHeightToWorld(const ossimDpt& image_point,
-                                        const double&   heightEllipsoid,
-                                        ossimGpt&       worldPoint) const;
-   virtual void worldToLineSample(const ossimGpt& world_point,
-                                  ossimDpt&       image_point) const;
-   
-   virtual void updateModel();
-
-   void setPrincipalPoint(ossimDpt principalPoint);
-
-   virtual bool insideImage(const ossimDpt& p) const
-   {
-      return theImageClipRect.pointWithin(p, theImageClipRect.width());
-   }
-
-
-   void setRollPitchHeading(double roll,
-                            double pitch,
-                            double heading);
-   
-   void setPixelSize(const ossimDpt& pixelSize);
-   void setImageRect(const ossimDrect& rect);
-   void setFocalLength(double focalLength);
-   void setPlatformPosition(const ossimGpt& gpt);
-
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0) const;
-   
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   virtual void initAdjustableParameters();
-   
-   /*!
-    * ossimOptimizableProjection
-    */
-//   inline virtual bool useForward()const {return true;} //!ground to image faster (you don't need DEM)
-   inline virtual bool useForward()const {return false;} //!ground to image faster (you don't need DEM)
-   virtual bool setupOptimizer(const ossimString& init_file); //!uses file path to init model
-
-protected:
-   
-   NEWMAT::Matrix theCompositeMatrix;
-   NEWMAT::Matrix theCompositeMatrixInverse;
-   double         theRoll;
-   double         thePitch;
-   double         theHeading;
-   ossimDpt       thePrincipalPoint;
-   ossimDpt       thePixelSize;
-   double         theFocalLength;
-   ossimEcefPoint theEcefPlatformPosition;
-   ossimRefPtr<ossimSmacCallibrationSystem> theLensDistortion;
-
-
-   ossimEcefPoint theAdjEcefPlatformPosition;
-   
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/projection/ossimCadrgProjection.h b/include/ossim/projection/ossimCadrgProjection.h
deleted file mode 100644
index 38048cb..0000000
--- a/include/ossim/projection/ossimCadrgProjection.h
+++ /dev/null
@@ -1,90 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimCadrgProjection.h 17815 2010-08-03 13:23:14Z dburken $
-#ifndef ossimCadrgProjection_HEADER
-#define ossimCadrgProjection_HEADER
-#include <ossim/projection/ossimMapProjection.h>
-
-class OSSIM_DLL ossimCadrgProjection : public ossimMapProjection
-{
-public:
-   ossimCadrgProjection();
-
-                       
-   virtual ossimObject *dup()const;
-   virtual ossimGpt inverse(const ossimDpt &eastingNorthing)const;
-   virtual ossimDpt forward(const ossimGpt &latLon)const;
-   
-   virtual ossimDpt worldToLineSample(const ossimGpt &worldPoint)    const;
-   virtual ossimGpt lineSampleToWorld(const ossimDpt &projectedPoint)const;
-   virtual void worldToLineSample(const ossimGpt &worldPoint,
-                                  ossimDpt&       lineSample)const;
-   virtual void lineSampleToWorld(const ossimDpt &projectedPoint,
-                                  ossimGpt& gpt)const;
-
-   double computeXPixConstant(double scale, long zone)const;
-   double computeYPixConstant(double scale)const;
-   /*!
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-   /*!
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   
-   ossimString getProjectionName()const
-      {
-         return getClassName();
-      }
-      
-   //! Returns TRUE if principal parameters are within epsilon tolerance.
-   virtual bool operator==(const ossimProjection& projection) const;
-
-protected:
-   virtual ~ossimCadrgProjection();
-   /*
-    * Are from the ADRG Mil spec for 1:1,000,000 and
-    * are scales for each zone.
-    */
-   static double theCadrgArcA[8];
-   
-
-   static double theOldZoneExtents[10];
-
-   static double theNorthLimit;
-   static double theSouthLimit;
-
-   ossim_int32   theCadrgZone;
-
-   ossimDpt thePixelConstant;
-   double   theMapScale;
-
-   double theWidth;
-   double theHeight;
-
-   ossimDpt theUlLineSample;
-
-   ossimGpt theUlGpt;
-   ossimGpt theLlGpt;
-   ossimGpt theLrGpt;
-   ossimGpt theUrGpt;
-   
-   void computeParameters();
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/projection/ossimCoarseGridModel.h b/include/ossim/projection/ossimCoarseGridModel.h
deleted file mode 100644
index eef717b..0000000
--- a/include/ossim/projection/ossimCoarseGridModel.h
+++ /dev/null
@@ -1,178 +0,0 @@
-//*****************************************************************************
-// FILE: ossimCoarseGridModel.h
-//
-// Copyright (C) 2001 ImageLinks, Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION:
-//   Contains declaration of class ossimCoarseGridModel. This is an
-//   implementation of an interpolation sensor model.
-//
-//*****************************************************************************
-//  $Id: ossimCoarseGridModel.h 18693 2011-01-17 18:49:15Z dburken $
-
-#ifndef ossimCoarseGridModel_HEADER
-#define ossimCoarseGridModel_HEADER
-
-#include <ossim/projection/ossimSensorModel.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimDblGrid.h>
-#include <ossim/base/ossimFilename.h>
-
-class ossimImageGeometry;
-
-/******************************************************************************
- *
- * CLASS:  ossimCoarseGridModel
- *
- *****************************************************************************/
-class OSSIMDLLEXPORT ossimCoarseGridModel : public ossimSensorModel
-{
-public:
-   /**
-    * CONSTRUCTORS:
-    */
-   ossimCoarseGridModel();
-   ossimCoarseGridModel(const ossimCoarseGridModel& copy_this);
-
-   /**
-    * CONSTRUCTOR (filename)
-    * Accepts name of geometry file. This can be either MET ECG geom file, or
-    * OSSIM keywordlist geometry file.
-    */
-   ossimCoarseGridModel(const ossimFilename& geom_file);
-
-   /**
-    * CONSTRUCTOR (keywordlist)
-    * Accepts OSSIM keywordlist geometry file.
-    */
-   ossimCoarseGridModel(const ossimKeywordlist& geom_kwl);
-   
-   ~ossimCoarseGridModel();
-
-   /**
-    * This method will build a grid from any projector.
-    * The first argument must be the image space bounds for
-    * the projection.  The second argument is the projector
-    * that will be used to approximate a bilinear grid over.
-    *
-    * The accuracy of the grid can be controlled by the static method
-    * setInterpolationError.
-    */
-   virtual void buildGrid(const ossimDrect& imageBounds,
-                          ossimProjection* proj,
-                          double heightDelta=500.0,
-                          bool enableHeightFlag=false,
-                          bool makeAdjustableFlag=true);
-   virtual void buildGrid(const ossimDrect& imageBounds,
-                          ossimImageGeometry* geom,
-                          double heightDelta=500.0,
-                          bool enableHeightFlag=false,
-                          bool makeAdjustableFlag=true);
-   
-   /**
-    *  This is used when building a grid from a projector.
-    *  You can set the interpolation error.  The default is
-    *  subpixel accuracy (within .1 of a pixel).
-    */
-   static void setInterpolationError(double error=.1);
-   static void setMinGridSpacing(ossim_int32 minSpacing = 100);
-   /**
-    * METHOD: print()
-    * Extends base-class implementation. Dumps contents of object to ostream.
-    */
-   virtual std::ostream& print(std::ostream& out) const;
-   
-   /**
-    * METHODS:  saveState, loadState
-    * Fulfills ossimObject base-class pure virtuals. Loads and saves geometry
-    * KWL files. Returns true if successful.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0) const;
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-
-   /**
-    * STATIC METHOD: writeGeomTemplate(ostream)
-    * Writes a template of geometry keywords processed by loadState and
-    * saveState to output stream.
-    */
-   static void writeGeomTemplate(ostream& os);
-
-   /**
-    * METHOD: dup()
-    * Returns pointer to a new instance, copy of this.
-    */
-   virtual ossimObject* dup() const
-      { return new ossimCoarseGridModel(*this); }
-   
-   /**
-    * METHOD: saveCoarseGrid(), loadCoarseGrid()
-    * Saves/loads the coarse grid to/from the specified file. Returns true if
-    * successful.
-    */
-   bool saveCoarseGrid(const ossimFilename& cgFileName) const;
-   bool loadCoarseGrid(const ossimFilename& cgFileName);
-
-   virtual void imagingRay(const ossimDpt& image_point,
-                           ossimEcefRay&   image_ray) const;
-
-   
-   virtual void lineSampleToWorld(const ossimDpt& image_point,
-                                  ossimGpt&       gpt) const;
-   /**
-    * METHOD: lineSampleHeightToWorld(image_point, height, &ground_point)
-    * This is the virtual that performs the actual work of projecting
-    * the image point to the earth at some specified elevation.
-    */
-   virtual void lineSampleHeightToWorld(const ossimDpt& image_point,
-                                        const double&   heightEllipsoid,
-                                        ossimGpt&       world_pt) const;
-
-
-   virtual void initAdjustableParameters();
-
-   /*!
-    * ossimOptimizableProjection
-    */
-   inline virtual bool useForward()const {return false;} //!image to ground faster
-
-   
-protected:
-   /**
-    * METHOD: reallocateGrid()
-    * Deletes existing allocated memory and reallocates
-    * new space. This may happen if a new grid is loaded over an existing one.
-    */
-   void reallocateGrid(const ossimIpt& size);
-   
-   //! Initializes base class data members after grids have been assigned.
-   void initializeModelParams(ossimIrect irect);
-
-   //! Implements its own extrapolation since this can be handled by ossimDblGrid.
-   virtual ossimGpt extrapolate (const ossimDpt& imgPt, const double& height=ossim::nan()) const;
-
-   /**
-    * Data Members:
-    */
-   mutable ossimFilename theGridFilename;
-   ossimDblGrid  theLatGrid;         // degrees
-   ossimDblGrid  theLonGrid;         // degrees
-   ossimDblGrid  theDlatDhGrid;      // degrees/meter
-   ossimDblGrid  theDlonDhGrid;      // degrees/meter
-   ossimDblGrid* theDlatDparamGrid;  // degrees/(units-of-param)
-   ossimDblGrid* theDlonDparamGrid;  // degrees/(units-of-param)
-
-   static double       theInterpolationError;
-   static ossim_int32  theMinGridSpacing;
-   ossimAdjustmentInfo theInitialAdjustment;
-   bool                theHeightEnabledFlag;
-   
-   TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/projection/ossimEpsgProjectionDatabase.h b/include/ossim/projection/ossimEpsgProjectionDatabase.h
deleted file mode 100644
index d07b7d3..0000000
--- a/include/ossim/projection/ossimEpsgProjectionDatabase.h
+++ /dev/null
@@ -1,132 +0,0 @@
-//*************************************************************************************************
-//                          OSSIM -- Open Source Software Image Map
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Oscar Kramer
-//
-//*************************************************************************************************
-//  $Id: ossimEpsgProjectionDatabase.h 21511 2012-08-21 22:00:11Z dburken $
-
-#ifndef ossimEpsgProjectionDatabase_HEADER
-#define ossimEpsgProjectionDatabase_HEADER 1
-
-#include <ossim/projection/ossimProjectionFactoryBase.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <OpenThreads/Mutex>
-#include <fstream>
-
-
-class ossimProjection;
-class ossimString;
-class ossimEpsgProjectionFactory;
-class ossimUtmProjection;
-
-//*************************************************************************************************
-//! Projection Database for coded projections defined in database files and specified via some 
-//! coordinate reference system group:code, such as EPSG:26715.
-//*************************************************************************************************
-class OSSIMDLLEXPORT ossimEpsgProjectionDatabase : public ossimReferenced
-{
-   friend class ossimEpsgProjectionFactory;
-
-public:
-   //! Instantiates singleton instance of this class:
-   static ossimEpsgProjectionDatabase* instance();
-
-   //! Destructor
-   virtual ~ossimEpsgProjectionDatabase();
-
-   //! Returns a projection corresponding to the projection specified, or NULL if no entry found.
-   //! Normally <proj_spec> takes the form of <group>:<code> (e.g., "EPSG:26715"). Other forms 
-   //! accepted are <code> (assumed EPSG), or <proj_name> to match a name in the database.
-   ossimProjection* findProjection(const ossimString& proj_spec) const;
-
-   //! Returns a projection corresponding to the epsg code specified, or NULL if no entry found.
-   ossimProjection* findProjection(ossim_uint32 epsg_code) const;
-
-   //! Given a projection name, assigns the group (e.g., "EPSG") and code of the projection. 
-   //! Returns integer EPSG code if match was found or 0 if not found.
-   ossim_uint32 findProjectionCode(const ossimString& projection_name) const;
-
-   //! Given a projection instance, this method determines the corresponding EPSG code. Obviously
-   //! this is only needed if the projection does not have its PCS code assigned (it is NULL). This
-   //! happens when the projection was constructed with full parameters instead of the EPSG code.
-   //! Returns integer EPSG code if match was found or 0 if not found.
-   ossim_uint32 findProjectionCode(const ossimMapProjection& lost_proj) const;
-
-   //! ### NECESSARY HACK ### (originally implemented by ESH)
-   //! ArcMap (9.2 and less) doesn't understand the non-meters HARN codes.  
-   //! This method provides acess to the projection name given the EPSG code. The name provides 
-   //! enough info for recognizing a non-meters HARN-based projection. 
-   ossimString findProjectionName(ossim_uint32 epsg_code) const;
-
-   //! Populates caller's list with all projections currently represented in the database.
-   //! The format is: 
-   //!    EPSG:<code>  "<Name as appears in Db>"
-   //! There may be duplicate entries if the projection is duplicated in the various Db files.
-   void getProjectionsList(std::vector<ossimString>& typeList) const;
-
-   //! ENGINEERING CODE. Used for testing
-   size_t numRecords() const { return m_projDatabase.size(); }
-
-protected:
-   enum RecordFormat
-   {  
-      NOT_ASSIGNED=0,
-      FORMAT_A,
-      FORMAT_B,
-      FORMAT_C,
-      CUSTOM
-   };
-
-   //! Type for database record consists of EPSG code and serialized form of corresponding OSSIM 
-   //! projection (as a keywordlist)
-   class ProjDbRecord : public ossimReferenced
-   {
-   public:
-      ProjDbRecord() : 
-            code(0), 
-            name(""), 
-            datumValid(false), 
-            csvFormat(NOT_ASSIGNED), 
-            proj(0) {}
-
-      ossim_uint32     code;
-      ossimString      name;
-      bool             datumValid; //!< FALSE if the datum code was not parsed and WGS84 defaulted
-      RecordFormat     csvFormat;
-      std::vector<ossimString>        csvRecord;
-      ossimRefPtr<ossimMapProjection> proj;
-   };
-
-   //! Constructor loads all Db files specified in the ossim prefs. Protected as part of
-   //! singleton implementation.
-   ossimEpsgProjectionDatabase();
-
-   //! Parses the "Spadac EPSG" Db record format and produces a projection (or NULL if invalid)   
-   ossimMapProjection* createProjFromFormatARecord(ProjDbRecord* record) const;
-
-   //! Parses the State Plane Db record format and produce a projection (or NULL if invalid)
-   ossimMapProjection* createProjFromFormatBRecord(ProjDbRecord* record) const;
-
-   //!  ### HACK ###
-   //! UTM projections as specified in the EPSG are indistinguishable from regular TM.
-   //! Unfortunately OSSIM does make a distinction. For the time being, parse the code and
-   //! programmatically arrives at the UTM projection.
-   ossimMapProjection* createProjFromUtmCode(ossim_uint32 code) const;
-
-   //! Given UTM projection, derives the associated EPSG code. This is faster than a Db lookup.
-   ossim_uint32 getCodeFromUtmProj(const ossimUtmProjection* proj) const;
-
-   //! Populates the database with contents of DB files as specified in ossim_preferences.
-   void initialize();
-
-   mutable std::multimap<ossim_uint32, ossimRefPtr<ProjDbRecord> > m_projDatabase;
-   mutable OpenThreads::Mutex m_mutex;
-   static ossimEpsgProjectionDatabase*  m_instance; //!< Singleton implementation
-   
-};
-
-#endif
diff --git a/include/ossim/projection/ossimEpsgProjectionFactory.h b/include/ossim/projection/ossimEpsgProjectionFactory.h
deleted file mode 100644
index b1dcf51..0000000
--- a/include/ossim/projection/ossimEpsgProjectionFactory.h
+++ /dev/null
@@ -1,77 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author:  Oscar Kramer
-//
-//*******************************************************************
-//  $Id: ossimEpsgProjectionFactory.h 12081 2007-11-26 21:44:18Z dburken $
-
-#ifndef ossimEpsgProjectionFactory_HEADER
-#define ossimEpsgProjectionFactory_HEADER
-
-#include <ossim/projection/ossimEpsgProjectionDatabase.h>
-#include <ossim/projection/ossimProjectionFactoryBase.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimRefPtr.h>
-
-class ossimProjection;
-class ossimString;
-class ossimMapProjection;
-
-//*************************************************************************************************
-//! Projection Factory for coded projections defined in database. These are projections
-//! that are fully defined in database files and specified via a projection coordinate system (PCS)
-//! code, such as EPSG codes.
-//*************************************************************************************************
-class OSSIMDLLEXPORT ossimEpsgProjectionFactory : public ossimProjectionFactoryBase
-{
-public:
-   /*!
-    * METHOD: instance()
-    * Instantiates singleton instance of this class:
-    */
-   static ossimEpsgProjectionFactory* instance();
-
-   virtual ossimProjection* createProjection(const ossimFilename& filename,
-                                             ossim_uint32 entryIdx) const;
-
-   //! This is the principal factory method. It accepts a string in one of three formats:
-   //!
-   //!   1. <group>:<code>, for example "EPSG:32615"
-   //!   2. <code>, for example "32615", this is the CRS code ID for the projerection.
-   //!   3. AUTO:<comma-separated spec>, for specifying custom user-defined codes.
-   //!
-   //! Both projected and geographic (Platte Carre) codes are handled.
-   virtual ossimProjection* createProjection(const ossimString& name) const;
-
-   //! Looks for presence of "pcs_code" keyword with the value in the format <group>:<code>,
-   //! for example "EPSG:32615" (EPSG and AUTO--see above-- are presently supported).
-   //! If only an integer is specified, EPSG code is assumed.
-   virtual ossimProjection* createProjection(const ossimKeywordlist& kwl,
-                                             const char* prefix = 0)const;
-
-   virtual ossimObject* createObject(const ossimString& typeName)const;
-   virtual ossimObject* createObject(const ossimKeywordlist& kwl, const char* prefix=0)const;
-   
-    //! This returns the type name of all objects in all factories. This is the name used to 
-    //! construct the objects dynamically and this name must be unique.
-   virtual void getTypeNameList(std::vector<ossimString>& typeList) const;
-
-protected:
-   //! Constructor loads all SRS CSV files specified in the ossim prefs. Protected as part of
-   //! singleton implementation.
-   ossimEpsgProjectionFactory();
-
-   //! When the CRS is specified with the "AUTO:<spec>" code format, this method is invoked to
-   //! parse the <spec> and produce a projection (or NULL if spec invalid):
-   //! This really shouldn't be in this class but nobody else is parsing for it, so leave it here 
-   //! for now.
-   ossimMapProjection* createProjFromAutoCode(const std::vector<ossimString>& spec) const;
-
-   ossimRefPtr<ossimEpsgProjectionDatabase>    m_projDatabase;
-   static ossimEpsgProjectionFactory*  m_instance; //!< Singleton implementation
- 
-};
-
-#endif
diff --git a/include/ossim/projection/ossimEquDistCylProjection.h b/include/ossim/projection/ossimEquDistCylProjection.h
deleted file mode 100644
index 92483a2..0000000
--- a/include/ossim/projection/ossimEquDistCylProjection.h
+++ /dev/null
@@ -1,217 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author:  Garrett Potts
-//
-// Description:
-//
-// Calls Geotrans Equidistant Cylinder projection code.  
-//*******************************************************************
-//  $Id: ossimEquDistCylProjection.h 20352 2011-12-12 17:24:52Z dburken $
-
-#ifndef ossimEquDistCylProjection_HEADER
-#define ossimEquDistCylProjection_HEADER
-
-#include <ossim/projection/ossimLlxyProjection.h>
-
-class ossimIpt;
-
-class OSSIMDLLEXPORT ossimEquDistCylProjection : public ossimMapProjection//public ossimLlxyProjection
-{
-public:
-   ossimEquDistCylProjection(const ossimEllipsoid& ellipsoid = ossimEllipsoid(),
-                             const ossimGpt& origin = ossimGpt());
-   ossimEquDistCylProjection(const ossimEllipsoid& ellipsoid,
-                             const ossimGpt& origin,
-                             double falseEasting,
-                             double falseNorthing);
-   
-   ossimEquDistCylProjection(const ossimEquDistCylProjection& rhs)
-     :ossimMapProjection(rhs)
-     //      :ossimLlxyProjection(rhs)
-      {
-         *this = rhs;
-      }
-   
-   ~ossimEquDistCylProjection(){}
-   virtual ossimObject *dup()const
-      {
-         return new ossimEquDistCylProjection(*this);
-      }
-   
-   virtual ossimGpt inverse(const ossimDpt &eastingNorthing)const;
-   virtual ossimDpt forward(const ossimGpt &latLon)const;
-   virtual void update();
-
-   /*!
-    * SetFalseEasting.  The value is in meters.
-    * Update is then called so we can pre-compute paramters
-    */
-   void setFalseEasting(double falseEasting);
-
-   /*!
-    * SetFalseNorthing.  The value is in meters.
-    * Update is then called so we can pre-compute paramters
-    */
-   void setFalseNorthing(double falseNorthing);
-
-   /*!
-    * Sets both false easting and northing values.  The values are
-    * expected to be in meters.
-    * Update is then called so we can pre-compute paramters
-    */
-   void setFalseEastingNorthing(double falseEasting, double falseNorthing);
-
-   double getFalseEasting()const{return Eqcy_False_Easting;}
-   double getFalseNorthing()const{return Eqcy_False_Northing;}
-   
-   virtual void lineSampleHeightToWorld(const ossimDpt& lineSampPt,
-                                        const double&   heightAboveEllipsoid,
-                                        ossimGpt&       worldPt) const;
-   virtual void     worldToLineSample(const ossimGpt &worldPoint,
-                                      ossimDpt&       lineSample)const;
-
-   /**
-    * @brief Specialized worldToLineSample.
-    * 
-    * Takes into consideration the image size and crossing the date line.
-    * Also makes local points outside of image negative or positive based on
-    * there relative closeness to left or right edge.
-    *
-    * @param worldPoint Ground point to convert to line sample.
-    * @param imageSize Size of image in pixels.
-    * @param lineSample Initialized by this.
-    */
-   void worldToLineSample( const ossimGpt& worldPoint,
-                           const ossimIpt& imageSize,
-                           ossimDpt&       lineSample ) const;
-   
-   virtual bool isGeographic()const
-   {
-      return true;
-   }
-   void setDefaults();
-
-   /*!
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-   /*!
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-private:   
-   //---------------------GEOTRANS-------------------------------
-   mutable double Eqcy_a;                  /* Semi-major axis of ellipsoid in meters */
-   mutable double Eqcy_f;          /* Flattening of ellipsoid */
-   mutable double es2;         /* Eccentricity (0.08181919084262188000) squared         */
-   mutable double es4;          /* es2 * es2	 */
-   mutable double es6;          /* es4 * es2  */
-   mutable double Ra;                /* Spherical Radius  */
-   
-/* Equidistant Cylindrical projection Parameters */
-   mutable double Eqcy_Std_Parallel;             /* Latitude of standard parallel in radians     */
-   mutable double Cos_Eqcy_Std_Parallel;         /* cos(Eqcy_Std_Parallel)  */
-   mutable double Eqcy_Origin_Long;              /* Longitude of origin in radians    */
-   mutable double Eqcy_False_Easting;
-   mutable double Eqcy_False_Northing;
-   mutable double Eqcy_Delta_Northing;
-   mutable double Eqcy_Max_Easting;
-   mutable double Eqcy_Min_Easting;
-   mutable double Ra_Cos_Eqcy_Std_Parallel; /* Ra * Cos_Eqcy_Std_Parallel */
-
-/*!
- * The function Set_Equidistant_Cyl_Parameters receives the ellipsoid parameters and
- * projection parameters as inputs, and sets the corresponding state
- * variables.  It also calculates the spherical radius of the sphere having 
- * the same area as the ellipsoid.  If any errors occur, the error code(s) 
- * are returned by the function, otherwise EQCY_NO_ERROR is returned.
- *
- *    a                 : Semi-major axis of ellipsoid, in meters   (input)
- *    f                 : Flattening of ellipsoid						        (input)
- *    Std_Parallel      : Latitude in radians at which the          (input)
- *                          point scale factor is 1.0
- *    Central_Meridian  : Longitude in radians at the center of     (input)
- *                          the projection
- *    False_Easting     : A coordinate value in meters assigned to the
- *                          central meridian of the projection.     (input)
- *    False_Northing    : A coordinate value in meters assigned to the
- *                          standard parallel of the projection     (input)
- */
-  long Set_Equidistant_Cyl_Parameters(double a,
-                                      double f,
-                                      double Std_Parallel,
-                                      double Central_Meridian,
-                                      double False_Easting,
-                                      double False_Northing);
-
-
-/*!
- * The function Get_Equidistant_Cyl_Parameters returns the current ellipsoid
- * parameters and Equidistant Cylindrical projection parameters.
- *
- *    a                 : Semi-major axis of ellipsoid, in meters   (output)
- *    f                 : Flattening of ellipsoid						        (output)
- *    Std_Parallel      : Latitude in radians at which the          (output)
- *                          point scale factor is 1.0
- *    Central_Meridian  : Longitude in radians at the center of     (output)
- *                          the projection
- *    False_Easting     : A coordinate value in meters assigned to the
- *                          central meridian of the projection.     (output)
- *    False_Northing    : A coordinate value in meters assigned to the
- *                          standard parallel of the projection     (output)
- */
-  void Get_Equidistant_Cyl_Parameters(double *a,
-                                      double *f,
-                                      double *Std_Parallel,
-                                      double *Central_Meridian,
-                                      double *False_Easting,
-                                      double *False_Northing)const;
-
-
-/*!
- * The function Convert_Geodetic_To_Equidistant_Cyl converts geodetic (latitude and
- * longitude) coordinates to Equidistant Cylindrical projection easting, and northing
- * coordinates, according to the current ellipsoid and Equidistant Cylindrical projection
- * parameters.  If any errors occur, the error code(s) are returned by the
- * function, otherwise EQCY_NO_ERROR is returned.
- *
- *    Latitude          : Latitude (phi) in radians           (input)
- *    Longitude         : Longitude (lambda) in radians       (input)
- *    Easting           : Easting (X) in meters               (output)
- *    Northing          : Northing (Y) in meters              (output)
- */
-  long Convert_Geodetic_To_Equidistant_Cyl (double Latitude,
-                                            double Longitude,
-                                            double *Easting,
-                                            double *Northing)const;
-
-
-/*!
- * The function Convert_Equidistant_Cyl_To_Geodetic converts Equidistant Cylindrical projection
- * easting and northing coordinates to geodetic (latitude and longitude)
- * coordinates, according to the current ellipsoid and Equidistant Cylindrical projection
- * coordinates.  If any errors occur, the error code(s) are returned by the
- * function, otherwise EQCY_NO_ERROR is returned.
- *
- *    Easting           : Easting (X) in meters                  (input)
- *    Northing          : Northing (Y) in meters                 (input)
- *    Latitude          : Latitude (phi) in radians              (output)
- *    Longitude         : Longitude (lambda) in radians          (output)
- */
-  long Convert_Equidistant_Cyl_To_Geodetic(double Easting,
-                                           double Northing,
-                                           double *Latitude,
-                                           double *Longitude)const;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/projection/ossimIkonosRpcModel.h b/include/ossim/projection/ossimIkonosRpcModel.h
deleted file mode 100644
index 3943aa3..0000000
--- a/include/ossim/projection/ossimIkonosRpcModel.h
+++ /dev/null
@@ -1,76 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Contains declaration of class ossimIkonosRpcModel. This 
-//    derived class implements the capability of reading Ikonos RPC support
-//    data.
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimIkonosRpcModel.h 20606 2012-02-24 12:29:52Z gpotts $
-
-#ifndef ossimIkonosRpcModel_HEADER
-#define ossimIkonosRpcModel_HEADER
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/projection/ossimRpcModel.h>
-#include <ossim/support_data/ossimIkonosMetaData.h>
-
-class ossimFilename;
-
-/*!****************************************************************************
- *
- * CLASS:  ossimIkonosRpcModel
- *
- *****************************************************************************/
-class OSSIM_DLL ossimIkonosRpcModel : public ossimRpcModel
-{
-public:
-  ossimIkonosRpcModel();
-   ossimIkonosRpcModel(const ossimFilename& geom_file);
-
-   ossimIkonosRpcModel(const ossimFilename& metadata,
-                       const ossimFilename& rpcdata);
-
-  virtual bool saveState(ossimKeywordlist& kwl,
-			 const char* prefix=0)const;
-
-  /**
-    * @brief loadState
-    * Fulfills ossimObject base-class pure virtuals. Loads and saves geometry
-    * KWL files. Returns true if successful.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-  
-   /*!
-    * STATIC METHOD: writeGeomTemplate(ostream)
-    * Writes a template of an ossimIkonosRpcModel geometry file.
-    */
-   static void writeGeomTemplate(ostream& os);
-
-   virtual bool parseFile(const ossimFilename& file);
-   
-protected:
-   virtual ~ossimIkonosRpcModel();
-   void finishConstruction();
-   void parseMetaData(const ossimFilename& metadata);
-   void parseRpcData (const ossimFilename& rpcdata);
-
-   bool isNitf(const ossimFilename& filename);
-   bool parseTiffFile(const ossimFilename& filename);
-/*    bool parseNitfFile(const ossimFilename& geom_file); */
-   bool parseHdrData(const ossimFilename& data_file);
-
-   ossimRefPtr<ossimIkonosMetaData> theSupportData;
-
-   TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/projection/ossimImageProjectionModel.h b/include/ossim/projection/ossimImageProjectionModel.h
deleted file mode 100644
index 4ce5f86..0000000
--- a/include/ossim/projection/ossimImageProjectionModel.h
+++ /dev/null
@@ -1,61 +0,0 @@
-//-----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Class declaration of ossimImageProjectionModel.
-//
-//-----------------------------------------------------------------------------
-// $Id$
-
-#ifndef ossimImageProjectionModel_HEADER
-#define ossimImageProjectionModel_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimRtti.h>
-#include <ossim/imaging/ossimImageModel.h>
-
-class ossimProjection;
-
-/**
- * @brief Class derived from ossimImageModel, this adds an image projection
- * for lineSampleToWorld and worldToLineSample.
- *
- * Note that image points fed to projection methods should be full
- * resolution with any sub image offset applied.
- */
-class OSSIM_DLL ossimImageProjectionModel : public ossimImageModel
-{
-public:
-   
-   /** @brief default constructor */
-   ossimImageProjectionModel();
-
-
-   /**
-    * @brief Method to initialize class from an image handler.
-    *
-    * @param ih Image handler.
-    */
-   virtual void initialize(const ossimImageHandler& ih);
-
-   /**
-    * @brief Method to get projection.
-    *
-    * @return Constant pointer to projection or 0 if not initialized.
-    */
-   const ossimProjection* getProjection() const;
-
-protected:
-   /** @brief virtual destructor */
-   virtual ~ossimImageProjectionModel();
-
-   ossimProjection* theProjection;
-
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimImageProjectionModel_HEADER */
diff --git a/include/ossim/projection/ossimImageViewAffineTransform.h b/include/ossim/projection/ossimImageViewAffineTransform.h
deleted file mode 100644
index 2a06aa3..0000000
--- a/include/ossim/projection/ossimImageViewAffineTransform.h
+++ /dev/null
@@ -1,167 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimImageViewAffineTransform.h 19803 2011-07-11 11:08:32Z gpotts $
-#ifndef ossimImageViewAffineTransform_HEADER
-#define ossimImageViewAffineTransform_HEADER
-#include <ossim/projection/ossimImageViewTransform.h>
-#include <ossim/matrix/newmat.h>
-
-class OSSIMDLLEXPORT ossimImageViewAffineTransform: public ossimImageViewTransform
-{
-public:
-   ossimImageViewAffineTransform(double rotateDegrees = 0,
-                                 double scaleXValue = 1,
-                                 double scaleYValue = 1,
-                                 double translateXValue = 0,
-                                 double translateYValue = 0,
-                                 double pivotXValue = 0,
-                                 double pivotYValue = 0);
-   virtual ~ossimImageViewAffineTransform();
-   
-   ossimImageViewAffineTransform(const ossimImageViewAffineTransform& src)
-   :ossimImageViewTransform(src),
-   m_transform(src.m_transform),
-   m_inverseTransform(src.m_inverseTransform),
-   m_rotation(src.m_rotation),
-   m_scale(src.m_scale),
-   m_translate(src.m_translate),
-   m_pivot(src.m_pivot)
-   {
-   }
-   virtual ossimObject* dup()const
-   {
-      return new ossimImageViewAffineTransform(*this);
-   }
-//   virtual void inverse(const ossimDpt& input,
-//                        ossimDpt&       output) const
-//   {
-//      viewToImage(input, output);
- //  }
-   
-   virtual void imageToView(const ossimDpt& imagePoint,
-                            ossimDpt&       viewPoint)const;
-   virtual void viewToImage(const ossimDpt& viewPoint,
-                            ossimDpt&       imagePoint)const;
-   void setMatrix(NEWMAT::Matrix& matrix);
-   const NEWMAT::Matrix& getMatrix()const;
-   
-   virtual bool isIdentity()const
-   {
-      return ((m_transform[0][0] == 1.0)&&
-              (m_transform[0][1] == 0.0)&&
-              (m_transform[0][2] == 0.0)&&
-              (m_transform[1][0] == 0.0)&&
-              (m_transform[1][1] == 1.0)&&
-              (m_transform[1][2] == 0.0)&&
-              (m_transform[2][0] == 0.0)&&
-              (m_transform[2][1] == 0.0)&&
-              (m_transform[2][2] == 1.0));
-   }
-
-   virtual bool isValid()const;
-   virtual bool setView(ossimObject* obj);
-   virtual ossimObject* getView();
-   virtual const ossimObject* getView()const;
-   
-   /** @return (1, 1) ???????(drb) */
-   virtual ossimDpt getInputMetersPerPixel()const;
-
-   /** @return (nan, nan) ????????? (drb) */
-   virtual ossimDpt getOutputMetersPerPixel()const;
-   
-   /*!
-    * Translate in the x and y direction.
-    */ 
-   virtual void translate(double deltaX, double deltaY);
-   
-   /*!
-    * Translate in the x direction.
-    */
-   virtual void translateX(double deltaX);
-   
-   /*!
-    * Translate in the Y direction.
-    */
-   virtual void translateY(double deltaY);
-   
-   /*!
-    * Translate the origin for rotation in the x and y direction.
-    */
-   virtual void pivot(double originX, double originY);
-   
-   /*!
-    * Translate the origin for rotation in the x direction.
-    */
-   virtual void pivotX(double originX);
-   
-   /*!
-    * Translate the origin for rotation in the y direction.
-    */
-   virtual void pivotY(double originY);
-   
-   /*!
-    * will allow you to specify a scale
-    * for both the x and y direction.
-    */
-   virtual void scale(double x, double y);
-   
-   /*!
-    * will alow you to specify a scale
-    * along the X direction.
-    */
-   virtual void scaleX(double x);
-   
-   /*!
-    * Will allow you to scale along the Y
-    * direction.
-    */
-   virtual void scaleY(double y);
-   
-   /*!
-    * Will apply a rotation
-    */
-   virtual void rotate(double degrees);
-   
-   ossim_float64 getRotation()const{return m_rotation;}
-   const ossimDpt& getScale()const{return m_scale;}
-   const ossimDpt& getTranslate()const{return m_translate;}
-   const ossimDpt& getPivot()const{return m_pivot;}
-   
-   
-   virtual bool isEqualTo(const ossimObject& obj, ossimCompareType compareType = OSSIM_COMPARE_FULL)const;
-   
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix =0);
-   
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix =0)const;
-   
-   
-protected:
-   void buildCompositeTransform();
-   
-   /*!
-    * This is the transformation from image to
-    * viewing coordinates.  If this matrix is
-    * changed it will perform an inverse to solve
-    * the inverse transform.
-    */
-   NEWMAT::Matrix m_transform;
-   NEWMAT::Matrix m_inverseTransform;
-   ossim_float64 m_rotation;
-   ossimDpt      m_scale;
-   ossimDpt      m_translate;
-   ossimDpt      m_pivot;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/projection/ossimLensDistortion.h b/include/ossim/projection/ossimLensDistortion.h
deleted file mode 100644
index 6875cd7..0000000
--- a/include/ossim/projection/ossimLensDistortion.h
+++ /dev/null
@@ -1,52 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// LGPL
-// 
-// Author:  Garrett Potts (gpotts at imagelinks.com)
-//
-// Description:
-//
-// ossimLensDistortion
-//*******************************************************************
-//  $Id: ossimLensDistortion.h 15929 2009-11-16 18:20:46Z gpotts $
-
-#ifndef ossimLensDistortion_HEADER
-#define ossimLensDistortion_HEADER
-#include <ossim/base/ossim2dTo2dTransform.h>
-class OSSIM_DLL ossimLensDistortion : public ossim2dTo2dTransform
-{
-public:
-   ossimLensDistortion(const ossimDpt& callibratedCenter=ossimDpt(0,0))
-      :theCenter(callibratedCenter)
-   {
-   }
-   void setCenter(const ossimDpt& center)
-   {
-      theCenter = center;
-   }
-   virtual void forward(const ossimDpt& input,
-                        ossimDpt& output) const
-   {
-      distort(input, output);
-   }
-   virtual void inverse(const ossimDpt& input,
-                        ossimDpt& output)
-   {
-      undistort(input, output);
-   }
-   virtual void distort(const ossimDpt& input, ossimDpt& output)const;
-   virtual void undistort(const ossimDpt& input, ossimDpt& output)const=0;
-
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix = 0)const;
-   
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix = 0);
-   
-protected:
-   ossimDpt theCenter;
-
-TYPE_DATA   
-};
-#endif
diff --git a/include/ossim/projection/ossimMapProjection.h b/include/ossim/projection/ossimMapProjection.h
deleted file mode 100644
index 9980168..0000000
--- a/include/ossim/projection/ossimMapProjection.h
+++ /dev/null
@@ -1,367 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-// Base class for all map projections.
-// 
-//*******************************************************************
-//  $Id: ossimMapProjection.h 20133 2011-10-12 19:03:47Z oscarkramer $
-
-#ifndef ossimMapProjection_HEADER
-#define ossimMapProjection_HEADER 1
-
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimKeyword.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimEllipsoid.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimDrect.h>
-#include <iostream>
-
-#include <ossim/base/ossimMatrix4x4.h>
-
-class ossimKeywordlist;
-
-class OSSIMDLLEXPORT ossimMapProjection : public ossimProjection
-{
-public:
-   ossimMapProjection(const ossimEllipsoid& ellipsoid = ossimEllipsoid(),
-                      const ossimGpt& origin=ossimGpt());
-
-   ossimMapProjection(const ossimMapProjection& src);
-
-   virtual ossimGpt origin()const;
-
-   /**
-    * All map projections will convert the world coordinate to an easting
-    * northing (Meters).
-    */
-   virtual ossimDpt forward(const ossimGpt &worldPoint) const = 0;
-
-   /**
-    * Will take a point in meters and convert it to ground.
-    */
-   virtual ossimGpt inverse(const ossimDpt &projectedPoint)const = 0;
-
-   virtual ossimDpt worldToLineSample(const ossimGpt &worldPoint)const;
-   virtual void     worldToLineSample(const ossimGpt &worldPoint,
-                                      ossimDpt&       lineSample)const;
-   
-   virtual ossimGpt lineSampleToWorld(const ossimDpt &projectedPoint)const;
-   virtual void     lineSampleToWorld(const ossimDpt &projectedPoint,
-                                      ossimGpt& gpt)const;
-   /**
-    * This is the pure virtual that projects the image point to the given
-    * elevation above ellipsoid, thereby bypassing reference to a DEM. Useful
-    * for projections that are sensitive to elevation.
-    */
-   virtual void lineSampleHeightToWorld(const ossimDpt& lineSampPt,
-                                        const double&   heightAboveEllipsoid,
-                                        ossimGpt&       worldPt) const;
-
-   virtual void lineSampleToEastingNorthing(const ossimDpt& liineSample,
-                                            ossimDpt& eastingNorthing)const;
-
-   virtual void eastingNorthingToLineSample(const ossimDpt& eastingNorthing,
-                                            ossimDpt&       lineSample)const;
-
-   virtual void eastingNorthingToWorld(const ossimDpt& eastingNorthing,
-                                       ossimGpt&       worldPt)const;
-
-   
-   /** @return The false easting. */
-   virtual double getFalseEasting() const;
-
-   /** @return The false northing. */
-   virtual double getFalseNorthing() const;
-   
-   /**
-    * Derived classes should implement as needed.
-    * This implementation returns 0.0.
-    * 
-    * @return The first standard parallel.
-    */
-   virtual double getStandardParallel1() const;
-
-   /**
-    * Derived classes should implement as needed.
-    * This implementation returns 0.0.
-    * 
-    * @return The second standard parallel.
-    */
-   virtual double getStandardParallel2() const;
-   
-   virtual void update();
-
-   virtual void setPcsCode(ossim_uint32 pcsCode);
-
-   //! Returns the EPSG PCS code or 32767 if the projection is a custom (non-EPSG) projection
-   virtual ossim_uint32 getPcsCode()const;
-
-   /**
-    *  Returns the projection name.
-    */
-   virtual ossimString getProjectionName() const;
-   
-   /**
-    * ACCESS METHODS: 
-    */
-   virtual double getA() const;
-   virtual double getB() const;
-   virtual double getF() const;
-   
-   virtual ossimDpt getMetersPerPixel() const;
-
-   /**
-    * Returns decimal degrees per pixel as an ossimDpt with
-    * "x" representing longitude and "y" representing latitude.
-    */
-   virtual const ossimDpt& getDecimalDegreesPerPixel() const;
-   
-   virtual const ossimDpt&   getUlEastingNorthing() const;
-   virtual const ossimGpt&   getUlGpt() const;
-   virtual const ossimDatum* getDatum() const;
-   const ossimEllipsoid&     getEllipsoid() const { return theEllipsoid; }
-   const ossimGpt& getOrigin() const;
-   virtual bool isGeographic()const;
-
-   /**
-    * Applies scale to theDeltaLonPerPixel, theDeltaLatPerPixel and
-    * theMetersPerPixel data members (eg: theDeltaLonPerPixel *= scale.x).
-    *
-    * @param scale Multiplier to be applied to theDeltaLonPerPixel,
-    * theDeltaLatPerPixel and theMetersPerPixel
-    *
-    * @param recenterTiePoint If true the will adjust the tie point by
-    * shifting the original tie to the upper left corner, applying scale,
-    * then shifting back by half of either the new
-    * theDeltaLat/lon or theMetersPerPixel depending on if projection
-    * isGeographic.
-    */
-   virtual void applyScale(const ossimDpt& scale, bool recenterTiePoint);
-   
-   /**
-    * SET METHODS: 
-    */
-   virtual void setEllipsoid(const ossimEllipsoid& ellipsoid);
-   virtual void setAB(double a, double b);
-
-   /**
-    * Sets theDatum to datum.
-    * Sets theEllipsiod to datum's ellipsiod.
-    * Calls update().
-    */
-   virtual void setDatum(const ossimDatum* datum);
-
-   /**
-    * Sets theOrigin to origin.
-    * Sets theDatum to origin's datum.
-    * Sets theEllipsiod to datum's ellipsiod.
-    * Calls update().
-    *
-    * @param origin The projection origin.
-    */
-   virtual void setOrigin(const ossimGpt& origin);
-   
-   virtual void setMetersPerPixel(const ossimDpt& gsd);
-   virtual void setDecimalDegreesPerPixel(const ossimDpt& gsd);
-   virtual void setUlTiePoints(const ossimGpt& gpt);
-   virtual void setUlTiePoints(const ossimDpt& eastingNorthing);
-   virtual void setUlEastingNorthing(const  ossimDpt& ulEastingNorthing);
-   virtual void setUlGpt(const  ossimGpt& ulGpt);
-   virtual void assign( const  ossimProjection &aProjection);
-   
-   /**
-    * Method to save the state of an object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0) const;
-
-   /**
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   /**
-    * Prints data members to stream.  Returns stream&.
-    */
-   virtual std::ostream& print(std::ostream& out) const;
-
-   //! Compares this to arg projection and returns TRUE if the same. 
-   //! NOTE: As currently implemented in OSSIM, map projections also contain image geometry 
-   //! information like tiepoint and scale. This operator is only concerned with the map 
-   //! specification and ignores image geometry differences.
-   virtual bool operator==(const ossimProjection& projection) const;
-
-   //! Computes the approximate resolution in degrees/pixel
-   virtual void computeDegreesPerPixel();
-
-   
-   /**
-    * This will go from the ground point and give
-    * you an approximate meters per pixel. the Delta Lat
-    * and delta lon will be in degrees.
-    */
-   virtual void computeMetersPerPixel();
-
-   void setMatrix(double rotation,
-                  const ossimDpt& scale,
-                  const ossimDpt& translation);
-   
-   void setMatrixScale(const ossimDpt& scale);
-   
-   void setMatrixRotation(double rotation);
-
-   void setMatrixTranslation(const ossimDpt& translation);
-
-   /**
-    * Utility method to snap the tie point to some multiple.
-    *
-    * This is used to overcome inaccuracies in formats like NITF's rpc tag
-    * witch has a four digit decimal degree precision for the lat/lon offset.
-    *
-    * @param multiple Value to snap tie point to like 1.0.
-    *
-    * @param unitType OSSIM_METERS or OSSIM_DEGREES.
-    *
-    * EXAMPLE1:
-    * projection:    ossimUtmProjection
-    * tie point is:  551634.88, 4492036.16
-    * multiple:      1.0
-    * unitType:      OSSIM_METERS
-    * new tie point: 551635.00, 4492036.00
-    *
-    * EXAMPLE2:
-    * projection:    ossimEquDistCylProjection
-    * tie point is:  -90.3246343      42.0297589
-    * multiple:      0.0001
-    * unitType:      OSSIM_DEGREES
-    * new tie point: -90.3246 42.0298
-    */
-   void snapTiePointTo(ossim_float64 multiple, ossimUnitType unitType);
-   void snapTiePointToOrigin();
-                      
-   void setElevationLookupFlag(bool flag);
-   bool getElevationLookupFlag()const;
-   ossimUnitType getModelTransformUnitType()const
-   {
-      return theModelTransformUnitType;
-   }
-   void setModelTransformUnitType(ossimUnitType unit)
-   {
-      theModelTransformUnitType = unit;
-   }
-   bool hasModelTransform()const
-   {
-      return (theModelTransformUnitType != OSSIM_UNIT_UNKNOWN);
-   }
-
-   /**
-    * @brief Implementation of pure virtual
-    * ossimProjection::isAffectedByElevation method.
-    * @return false.
-    */
-   virtual bool isAffectedByElevation() const { return false; }
-   
-   void setProjectionUnits(ossimUnitType units) { theProjectionUnits = units; }
-   ossimUnitType getProjectionUnits() const { return theProjectionUnits; }
-   
-   virtual bool isEqualTo(const ossimObject& obj, ossimCompareType compareType = OSSIM_COMPARE_FULL)const;
-
-
-protected:
-   
-   virtual ~ossimMapProjection();
-
-   //---
-   // If theModelTransform is set this updates:
-   // theDegreesPerPixel
-   // theMetersPerPixel
-   // theUlEastingNorthing
-   // theUlGpt
-   //---
-   void updateFromTransform();
-
-   /**
-    * This method verifies that the projection parameters match the current
-    * pcs code.  If not this will set the pcs code to 0.
-    *
-    * @return true if match, false if not.
-    */
-   //bool verifyPcsCodeMatches() const;
-   
-   ossimEllipsoid   theEllipsoid;
-   ossimGpt         theOrigin;
-
-   /**
-    * This is only set if we want to have built in datum shifting
-    */
-   const ossimDatum* theDatum;
-   
-   /**
-    * Holds the number of meters per pixel.
-    * x = easting
-    * y = northing
-    */
-   ossimDpt          theMetersPerPixel;
-
-   /**
-    * Hold the decimal degrees per pixel.
-    * x = longitude
-    * y = latitude
-    */
-   ossimDpt          theDegreesPerPixel;
-
-   /** Hold tie point in decimal degrees. */
-   ossimGpt          theUlGpt;
-
-   /**
-    * Hold tie point as easting northing.
-    * x = easting,
-    * y = northing
-    */
-   ossimDpt          theUlEastingNorthing;
-
-   /**
-    * Hold the false easting northing.
-    * x = false easting,
-    * y = false northing
-    */
-   ossimDpt          theFalseEastingNorthing;
-
-   //! Projection Coordinate System(PCS) code. Mutable because they may update automatically
-   //! after the projection is initialized, even in a const method. Normally set to 0 until the
-   //! corresponding EPSG code can be determined. If the projection is NOT represented by any
-   //! EPSG code, then the PCS is set to 32767.
-   mutable ossim_uint32      thePcsCode;
-
-   bool              theElevationLookupFlag;
-
-   // Will always be a 4x4 matrix.
-   // note:  only the first 2 dimensions will be used.
-   // if the size is 0 then it will not be used
-   //
-   ossimMatrix4x4 theModelTransform; // goes from image to model
-   ossimMatrix4x4 theInverseModelTransform; //goes from model back to image
-
-   // Output Units of the transform
-   //
-   ossimUnitType theModelTransformUnitType;
-
-   //! Linear units of the projection as indicated in the projection's specification:
-   ossimUnitType theProjectionUnits;
-
-TYPE_DATA
-};
-
-
-#endif
diff --git a/include/ossim/projection/ossimMapProjectionFactory.h b/include/ossim/projection/ossimMapProjectionFactory.h
deleted file mode 100644
index 38b1d26..0000000
--- a/include/ossim/projection/ossimMapProjectionFactory.h
+++ /dev/null
@@ -1,66 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author:  Garrett Potts
-//
-// Description:
-//
-// class ossimProjectionFactory maintains a static list of projection
-// makers.  If a user wants to create a projection they can pass in
-// a projection name and a datum if desired.  Currently the default
-// datum will be WGS84.
-//*******************************************************************
-//  $Id: ossimMapProjectionFactory.h 15766 2009-10-20 12:37:09Z gpotts $
-
-#ifndef ossimMapProjectionFactory_HEADER
-#define ossimMapProjectionFactory_HEADER
-
-#include <ossim/projection/ossimProjectionFactoryBase.h>
-
-class ossimProjection;
-class ossimString;
-
-class OSSIMDLLEXPORT ossimMapProjectionFactory : public ossimProjectionFactoryBase
-{
-public:
-   /*!
-    * METHOD: instance()
-    * Instantiates singleton instance of this class:
-    */
-   static ossimMapProjectionFactory* instance();
-
-   virtual ossimProjection* createProjection(const ossimFilename& filename,
-                                             ossim_uint32 entryIdx)const;
-   /*!
-    * METHOD: create()
-    * Attempts to create an instance of the projection specified by name.
-    * Returns successfully constructed projection or NULL.
-    */
-   virtual ossimProjection* createProjection(const ossimString& name)const;
-   virtual ossimProjection* createProjection(const ossimKeywordlist& kwl,
-                                             const char* prefix = 0)const;
-   virtual ossimObject* createObject(const ossimString& typeName)const;
-
-   /*!
-    * Creates and object given a keyword list.
-    */
-   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
-                                     const char* prefix=0)const;
-   
-   /*!
-    * This should return the type name of all objects in all factories.
-    * This is the name used to construct the objects dynamially and this
-    * name must be unique.
-    */
-   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
-
-protected:
-   ossimMapProjectionFactory() {}
-   static ossimMapProjectionFactory*  theInstance;
- 
-};
-
-#endif
diff --git a/include/ossim/projection/ossimMapProjectionInfo.h b/include/ossim/projection/ossimMapProjectionInfo.h
deleted file mode 100644
index f2e2a6b..0000000
--- a/include/ossim/projection/ossimMapProjectionInfo.h
+++ /dev/null
@@ -1,276 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2001 ImageLinks Inc.
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-// Class for encapsulate projection info given a projection, datum, and
-// output rectangle.
-//
-// NOTE:
-// - Output rectangle should be relative to the center of pixels.
-//   Shifts will be made for "pixel is area" internally.
-//
-//*******************************************************************
-//  $Id: ossimMapProjectionInfo.h 11959 2007-10-31 19:22:56Z gpotts $
-
-#ifndef ossimMapProjectionInfo_HEADER
-#define ossimMapProjectionInfo_HEADER
-
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimString.h>
-
-class ossimMapProjection;
-class ossimImageChain;
-
-class OSSIMDLLEXPORT ossimMapProjectionInfo : public ossimObject
-{
-public:
-
-   ossimMapProjectionInfo(const ossimMapProjection* proj,
-                          const ossimDrect& output_rect);
-
-   virtual ~ossimMapProjectionInfo();
-
-   /**
-    *  Returns true on error false if ok.
-    */
-   bool errorStatus() const;
-
-   /**
-    * Adds tie point to keyword list.  This will be latitude, longitude if
-    * projection is geographic; else, easting, northing.
-    */
-   void getGeom(ossimKeywordlist& kwl, const char* prefix=0)const;
-
-   /**
-    *  Returns the pixel size in meters.
-    *  x = sample direction
-    *  y = line direction
-    */
-   ossimDpt getMetersPerPixel() const;
-   
-   /**
-    *  Returns the pixel size in U.S. Survey feet.
-    *  x = sample direction
-    *  y = line direction
-    *
-    *  NOTE:
-    *  The US survey feet per meter converion (0.3048006096 feet per meter)
-    *  is NOT the same as the standard feet per meter conversion
-    *  (0.3048 feet per meter).
-    */
-   ossimDpt getUsSurveyFeetPerPixel() const;
-
-   /**
-    *  Returns the decimal degrees per pixel.
-    *  x = sample direction
-    *  y = line direction
-    */
-   ossimDpt getDecimalDegreesPerPixel() const;
-   
-   /**
-    *  Returns the upper left easting and northing as a ossimDpt.
-    *  The easting is "u" and the northing is "v". Units are in meters.
-    */
-   ossimDpt ulEastingNorthingPt() const;
-
-   /**
-    *  Returns the upper right easting and northing as a ossimDpt.
-    *  The easting is "u" and the northing is "v". Units are in meters.
-    */
-   ossimDpt urEastingNorthingPt() const;
-
-   /**
-    *  Returns the lower right easting and northing as a ossimDpt.
-    *  The easting is "u" and the northing is "v". Units are in meters.
-    */
-   ossimDpt lrEastingNorthingPt() const;
-
-   /**
-    *  Returns the lower left easting and northing as a ossimDpt.
-    *  The easting is "u" and the northing is "v". Units are in meters.
-    */
-   ossimDpt llEastingNorthingPt() const;
-   
-   /**
-    *  Returns the upper left easting and northing as a ossimDpt.
-    *  The easting is "u" and the northing is "v".
-    *  Units are in U.S. Survey feet.
-    */
-   ossimDpt ulEastingNorthingPtInFt() const;
-
-   /**
-    *  Returns the upper right easting and northing as a ossimDpt.
-    *  The easting is "u" and the northing is "v".
-    *  Units are in U.S. Survey feet.
-    */
-   ossimDpt urEastingNorthingPtInFt() const;
-
-   /**
-    *  Returns the lower right easting and northing as a ossimDpt.
-    *  The easting is "u" and the northing is "v".
-    *  Units are in U.S. Survey feet.
-    */
-   ossimDpt lrEastingNorthingPtInFt() const;
-
-   /**
-    *  Returns the lower left easting and northing as a ossimDpt.
-    *  The easting is "u" and the northing is "v". 
-    *  Units are in U.S. Survey feet.
-    */
-   ossimDpt llEastingNorthingPtInFt() const;
-   
-   /**
-    * Returns the upper left ground point.
-    */
-   ossimGpt ulGroundPt() const;
-
-   /**
-    * Returns the upper right ground point.
-    */
-   ossimGpt urGroundPt() const;
-
-   /**
-    * Returns the lower right ground point.
-    */
-   ossimGpt lrGroundPt() const;
- 
-   /**
-    * Returns the lower left ground point.
-    */
-   ossimGpt llGroundPt() const;
-
-   /**
-    * Returns the center ground point.
-    */
-   ossimGpt centerGroundPt() const;
-
-   /** @return The center ground point. */
-   ossimDpt centerEastingNorthingPt() const;
-
-   /** @return The lines per image. */
-   ossim_int32 linesPerImage() const;
-
-   /** @return The pixels per line (samples). */
-   ossim_int32 pixelsPerLine() const;
-
-   /**
-    * Formatted print of data members.  Used by operator <<.
-    */
-   std::ostream& print(std::ostream& os) const;
-
-   /**
-    *  Sets the data member "thePixelType".
-    *  NOTE:
-    *  PIXEL_IS_POINT (ennumerated to a "0"):
-    *  Corner coordinates are relative to the center of pixel.
-    *  PIXEL_IS_AREA (ennumerated to a "1"):
-    *  Corner coordinates are relative to the outer edge of the pixel.
-    */
-   void setPixelType (ossimPixelType type);
-
-   /**
-    *  Returns data member "thePixelType".
-    *  NOTE:
-    *  OSSIM_PIXEL_IS_POINT (ennumerated to a "0"):
-    *  Corner coordinates are relative to the center of pixel.
-    *  OSSIM_PIXEL_IS_AREA (ennumerated to a "1"):
-    *  Corner coordinates are relative to the outer of the pixel.
-    */
-   ossimPixelType  getPixelType () const;
-
-   /**
-    * Sets the data member "theOutputInfoInFeetFlag".
-    */
-   void setOutputFeetFlag (bool flag);
-
-   /**
-    *  Returns the data member "theOutputInfoInFeetFlag".
-    *  True = feet, false = meters.
-    */
-   bool unitsInFeet() const;
-
-   /**
-    * Returns theImageInfoString.
-    */
-   ossimString getImageInfoString () const;
-
-   /**
-    *  Used to set data member "theImageInfoString".  This will be output
-    *  in the "Image: " field of the README file.
-    */
-   void setImageInfoString (const ossimString& string);
-
-   /**
-    * Returns reference to "theProjection".
-    */
-   const ossimMapProjection* getProjection() const;
-
-   //****
-   // Keywords for getStateFrom/saveStateTo.
-   //***
-   static const char* README_IMAGE_STRING_KW;
-   static const char* PIXEL_TYPE_KW;
-   static const char* OUTPUT_US_FT_INFO_KW;
-   
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix = 0);
-   
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix = 0) const;
-   
-private:
-
-   // Do not permit construction with void args.
-   ossimMapProjectionInfo();
-   ossimMapProjectionInfo& operator=(const ossimMapProjectionInfo&);
-   
-   void initializeMembers(const ossimDrect& output_rect);
-   
-   const ossimMapProjection* theProjection;
-   mutable bool              theErrorStatus;
-   int                       theLinesPerImage;
-   int                       thePixelsPerLine;
-   ossimGpt                  theCornerGroundPt[4];
-   ossimDpt                  theCornerEastingNorthingPt[4];
-   ossimGpt                  theCenterGroundPt;
-   ossimDpt                  theCenterEastingNorthingPt;
-   ossimDrect                theBoundingRect;
-   
-   /**
-    *   "thePixelType" defines whether the tie point coordinates are
-    *   relative to the center of the pixel(which is PIXEL_IS_POINT) or
-    *   the upper left corner of the pixel(PIXEL_IS_AREA).  The default
-    *   pixle type is PIXEL_IS_POINT.
-    */
-   ossimPixelType                 thePixelType;
-
-   /**
-    *   If "theOutputInfoInFeetFlag" is true the readme file tie point
-    *   info will be output in both meters and U.S. feet.
-    *   NOTE:
-    *   U.S. feet conversion is "meters/0.3048006096" not the standard
-    *   "meters/0.3048".
-    *   Reference for U.S. feet value:
-    *   U.S.G.S. "Map Projections - A Working Manual" USGS Professional
-    *   paper 1395 page 51.
-    */
-   bool                      theOutputInfoInFeetFlag;
-
-   /**
-    *   "theImageInfoString" goes in the README file "Image:" field
-    *   to identify the image.
-    */
-   ossimString               theImageInfoString;
-};
-
-#endif /* End of #ifndef ossimMapProjectionInfo_HEADER */
diff --git a/include/ossim/projection/ossimMeanRadialLensDistortion.h b/include/ossim/projection/ossimMeanRadialLensDistortion.h
deleted file mode 100644
index 46449c6..0000000
--- a/include/ossim/projection/ossimMeanRadialLensDistortion.h
+++ /dev/null
@@ -1,119 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// LGPL
-// 
-// Author:  Garrett Potts (gpotts at imagelinks.com)
-//
-// Description:
-//
-// MeanRadialLensDistortion
-//*******************************************************************
-//  $Id: ossimMeanRadialLensDistortion.h 15929 2009-11-16 18:20:46Z gpotts $
-#ifndef ossimMeanRadialLensDistortion_HEADER
-#define ossimMeanRadialLensDistortion_HEADER
-#include <vector>
-#include <ossim/matrix/newmat.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/projection/ossimLensDistortion.h>
-class ossimMeanRadialLensDistortion : public ossimLensDistortion
-{
-public:
-   ossimMeanRadialLensDistortion()
-   {
-      theCoefficients.resize(4);
-      theCoefficients[0] = 0.0;
-      theCoefficients[1] = 0.0;
-      theCoefficients[2] = 0.0;
-      theCoefficients[3] = 0.0;
-   }
-
-  /*!
-   * Instantiate a ossimMeanRadialLens with the calibrated data.
-   * The data consists of the Principal point,
-   * focal distance, radialDistance measures for the distortion
-   * deltas, the radial distortion values.
-   * 
-   * example of construction:
-   *
-   * lets say we have the following:
-   *
-   * principal point = (.008 , -.001) mm
-   *
-   * and
-   *
-   * field angle       radial distance       deltaR (distortion)
-   *_____________________________________________________________
-   *  7.5 deg.             .004 mm             .0202 mm
-   *  15 deg.              .007 mm             .0411 mm
-   *  22.5 deg.            .007 mm             .0635 mm
-   *  :
-   *  :
-   *  :
-   *
-   * then construct the ossimMeanRadialLensDistortion class to construct the
-   * given focal length and principal point and the middle column as
-   * the radial distance column vector and the third column as the
-   * distortion values.
-   */
-/*    ossimMeanRadialLensDistortion(ossimDpt    calibratedPrincipalPoint, */
-/*                                  const NEWMAT::ColumnVector &radialDistance, */
-/*                                  const NEWMAT::ColumnVector &radialDistortion) */
-   ossimMeanRadialLensDistortion(ossimDpt    calibratedPrincipalPoint,
-                                 const NEWMAT::ColumnVector &radialDistance,
-                                 const NEWMAT::ColumnVector &radialDistortion)
-      :ossimLensDistortion(calibratedPrincipalPoint)
-  {
-     theCoefficients.resize(4);
-     solveCoefficients(radialDistance, radialDistortion);
-  }
-      
-  /*!
-   * Returns the coefficients (k1, k2, k3, k4) for the deltaR polynomial:
-   *
-   *    deltaR = k1*r + k2*r^3 + k3*r^5 + k4*r^7
-   */
-  const std::vector<double>& getCoefficients()const{return theCoefficients;}
-  std::vector<double>& getCoefficients(){return theCoefficients;}
-
-
-//  ossimDpt adjustPoint(const ossimDpt &position)const;
-  virtual std::ostream& print(std::ostream& out) const
-  {return out;}
-
-  /*!
-   * dletaR computes how much we should adjust r.  The
-   * return value is the adjustment amount.  This method is used
-   * by adjustPoint.
-   */
-  double deltaR(double r)const;
-
-  virtual void undistort(const ossimDpt& input, ossimDpt& output)const;
-  
-  /*!
-   * solves the coefficients given the radial distances and distortion
-   * for each distance.
-   */
-  void solveCoefficients(const NEWMAT::ColumnVector &radialDistance,
-			 const NEWMAT::ColumnVector &radialDistortion);
-  /*!
-   * solves the coefficients given the radial distances and distortion
-   * for each distance.
-   */
-  void solveCoefficients(const std::vector<double>& radialDistance,
-			 const std::vector<double>& radialDistortion);
-  
-  virtual bool saveState(ossimKeywordlist& kwl,
-                         const char* prefix = 0)const;
-  
-  virtual bool loadState(const ossimKeywordlist& kwl,
-                         const char* prefix = 0);
-  
-protected:
-  std::vector<double> theCoefficients;
-  
-TYPE_DATA  
-};
-
-
-#endif
diff --git a/include/ossim/projection/ossimNitfRpcModel.h b/include/ossim/projection/ossimNitfRpcModel.h
deleted file mode 100644
index 9f6ed16..0000000
--- a/include/ossim/projection/ossimNitfRpcModel.h
+++ /dev/null
@@ -1,115 +0,0 @@
-//*****************************************************************************
-// FILE: ossimNitfRpcModel.h
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Contains declaration of class ossimNitfRpcModel. This 
-//    derived class implements the capability of reading Nitf RPC support
-//    data.
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimNitfRpcModel.h 15766 2009-10-20 12:37:09Z gpotts $
-
-#ifndef ossimNitfRpcModel_HEADER
-#define ossimNitfRpcModel_HEADER
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/projection/ossimRpcModel.h>
-
-class ossimFilename;
-class ossimNitfImageHeader;
-
-/*!****************************************************************************
- *
- * CLASS:  ossimNitfRpcModel
- *
- *****************************************************************************/
-class OSSIM_DLL ossimNitfRpcModel : public ossimRpcModel
-{
-public:
-   ossimNitfRpcModel();
-   ossimNitfRpcModel(const ossimNitfRpcModel& rhs);
-   ossimNitfRpcModel(const ossimFilename& nitfFile);
-   virtual ossimObject* dup() const;
-
-   /**
-    * @brief worldToLineSample()
-    * Calls ossimRpcModel::worldToLineSample(), then applies (if needed)
-    * decimation.
-    * This is a temp work around for decimation RPC NITFs.
-    */
-   virtual void  worldToLineSample(const ossimGpt& world_point,
-                                   ossimDpt&       image_point) const;
-
-   /**
-    * @brief lineSampleHeightToWorld()
-    * Backs out decimation of image_point (if needed) then calls:
-    * ossimRpcModel::lineSampleHeightToWorld
-    * This is a temp work around for decimation RPC NITFs.
-    */
-   virtual void lineSampleHeightToWorld(const ossimDpt& image_point,
-                                        const double&   heightEllipsoid,
-                                        ossimGpt&       worldPoint) const;
-
-   /**
-    * @brief Saves "decimation".  Then calls ossimRpcModel::saveState.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0) const;
-
-   /**
-    * @brief Looks for decimation. Then calls ossimRpcModel::loadState.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   /**
-    * @brief Method to parse an nitf file and initialize model.
-    * @param entryIndex The entry to get model for.  Note the nitf's can have
-    * multiple entries; each with a different projection.
-    * @return true on success, false on error.
-    */
-   virtual bool parseFile(const ossimFilename& nitfFile,
-                          ossim_uint32 entryIndex=0);
-   
-   virtual bool parseImageHeader(const ossimNitfImageHeader* ih);
-private:
-
-   /**
-    * Attempts to get gsd from nitf tags and initialize
-    * ossimSensorModel::theGsd.
-    * 
-    * If unsuccessful  theGsd will be initialized to OSSIM_DBL_NAN.
-    */
-   void getGsd(const ossimNitfImageHeader* ih);
-
-   /**
-    * Attempts to get sensor ID from nitf tags and initialize
-    * ossimSensorModel::theSensorID.
-    * 
-    * If unsuccessful  theGsd will be initialized to UNKNOWN.
-    */
-   void getSensorID(const ossimNitfImageHeader* ih);
-
-   /**
-    * Get model information from either the RPC00A or RPC00B tag.
-    * @return true on success, false on error.
-    */
-   bool getRpcData(const ossimNitfImageHeader* ih);
-
-   /**
-    * Stored from header field "IMAG".  This is a temp work around to handle
-    * decimated rpc nitf's.
-    */
-   ossim_float64 theDecimation;
-
-   TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/projection/ossimProjection.h b/include/ossim/projection/ossimProjection.h
deleted file mode 100644
index b8a0d0b..0000000
--- a/include/ossim/projection/ossimProjection.h
+++ /dev/null
@@ -1,146 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author:  Garrett Potts (gpotts at imagelinks.com)
-//
-// Description: Base class for all projections (2D-to-3D transform)
-//
-//*******************************************************************
-//  $Id: ossimProjection.h 19793 2011-06-30 13:26:56Z gpotts $
-#ifndef ossimProjection_HEADER
-#define ossimProjection_HEADER
-#include <iostream>
-
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimErrorStatusInterface.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimKeyword.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimGeoPolygon.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimRefPtr.h>
-class OSSIMDLLEXPORT ossimProjection : public ossimObject, public ossimErrorStatusInterface
-{
-public:
-   /*!
-    * Constructors, Destructor:
-    */
-   ossimProjection();
-   virtual ~ossimProjection() {}
-
-   virtual ossimObject *dup()const=0;
-
-   /*!
-    * METHOD: origin()
-    * Returns projection's ground point origin. That is the GP corresponding
-    * to line=0, sample=0.
-    */
-   virtual ossimGpt origin()const=0;
-
-   /*!
-    * METHODS: forward(), reverse() 
-    * OBSOLETE -- provided for existing GUI code only. Bogus return value.
-    */
-   virtual ossimDpt forward(const ossimGpt &wp) const;  //inline below
-   virtual ossimGpt inverse(const ossimDpt &pp) const;  //inline below
-
-   /*!
-    * METHOD: worldToLineSample()
-    * Performs the forward projection from ground point to line, sample.
-    */
-   virtual void worldToLineSample(const ossimGpt& worldPoint,
-                                  ossimDpt&       lineSampPt) const = 0;
-
-   /*!
-    * METHOD: lineSampleToWorld()
-    * Performs the inverse projection from line, sample to ground (world):
-    */
-   virtual void lineSampleToWorld(const ossimDpt& lineSampPt,
-                                  ossimGpt&       worldPt) const = 0;
-   
-   /*!
-    * METHOD: lineSampleHeightToWorld
-    * This is the pure virtual that projects the image point to the given
-    * elevation above ellipsoid, thereby bypassing reference to a DEM. Useful
-    * for projections that are sensitive to elevation (such as sensor models).
-    */
-   virtual void lineSampleHeightToWorld(const ossimDpt& lineSampPt,
-                                        const double&   heightAboveEllipsoid,
-                                        ossimGpt&       worldPt) const = 0;
-
-   virtual void getRoundTripError(const ossimDpt& imagePoint,
-                                  ossimDpt& errorResult)const;
-
-   virtual void getRoundTripError(const ossimGpt& groundPoint,
-                                  ossimDpt& errorResult)const;
-   
-   virtual std::ostream& print(std::ostream& out) const;
-
-   virtual void getGroundClipPoints(ossimGeoPolygon& gpts)const;
-   /*!
-    * METHODS:  saveState, loadState
-    * Fulfills ossimObject base-class pure virtuals.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   virtual bool isEqualTo(const ossimObject& obj, ossimCompareType compareType = OSSIM_COMPARE_FULL)const
-   {
-      return ossimObject::isEqualTo(obj, compareType);
-   }
-   
-   /*!
-    * OPERATOR: ==
-    * Compares this instance with arg projection.
-    */
-   virtual bool operator==(const ossimProjection& projection) const=0;
-   virtual bool operator!=(const ossimProjection& projection) const {return !(*this == projection);}
-
-   /*!
-    * ACCESS METHODS: 
-    */
-   virtual ossimDpt getMetersPerPixel() const=0;
-
-   /**
-    * @brief Pure virtual method to query if projection is affected by
-    * elevation.
-    * @return true if affected, false if not.
-    */
-   virtual bool isAffectedByElevation() const=0;
-   
-protected:
-  
-
-   TYPE_DATA
-};
-
-//====================== BEGIN INLINE DEFINITIONS ===========================
-
-//*****************************************************************************
-//  INLINE METHOD: ossimProjection::forward()
-//  Projects ground point to 2D plane.
-//*****************************************************************************
-inline ossimDpt ossimProjection::forward(const ossimGpt &wp) const
-{
-   ossimDpt p;
-   worldToLineSample(wp, p);
-   return p;
-}
-
-//*****************************************************************************
-//  INLINE METHOD: ossimProjection::inverse()
-//  Inverse projection from 2D plane to ground point.
-//*****************************************************************************
-inline ossimGpt ossimProjection::inverse(const ossimDpt &pp) const
-{
-   ossimGpt g;
-   lineSampleToWorld(pp, g);
-   return g;
-}
-
-#endif
diff --git a/include/ossim/projection/ossimProjectionFactoryRegistry.h b/include/ossim/projection/ossimProjectionFactoryRegistry.h
deleted file mode 100644
index 736594a..0000000
--- a/include/ossim/projection/ossimProjectionFactoryRegistry.h
+++ /dev/null
@@ -1,82 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimProjectionFactoryRegistry.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimProjectionFactoryRegistry_HEADER
-#define ossimProjectionFactoryRegistry_HEADER
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimObjectFactory.h>
-#include <ossim/base/ossimFactoryListInterface.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/projection/ossimProjectionFactoryBase.h>
-
-class ossimImageHandler;
-class OSSIM_DLL ossimProjectionFactoryRegistry : public ossimObjectFactory,
-                                                 public ossimFactoryListInterface<ossimProjectionFactoryBase,
-                                                                                 ossimProjection>
-{
-public:
-
-   virtual ~ossimProjectionFactoryRegistry();
-   
-   static ossimProjectionFactoryRegistry* instance();
-
-   
-   ossimProjection* createProjection(const ossimFilename& filename,
-                                     ossim_uint32 entryIdx)const;
-   ossimProjection* createProjection(const ossimString& name)const
-   {
-      return createNativeObjectFromRegistry(name);
-   }
-   ossimProjection* createProjection(const ossimKeywordlist& kwl,
-                                     const char* prefix=NULL)const;
-   
-   virtual ossimProjection* createProjection(ossimImageHandler* handler)const;
-   /*!
-    * Creates an object given a type name.
-    */
-   virtual ossimObject* createObject(const ossimString& typeName)const
-   {
-      return createObjectFromRegistry(typeName);
-   }
-   
-   /*!
-    * Creates and object given a keyword list.
-    */
-   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
-                                     const char* prefix=0)const
-   {
-      return createObjectFromRegistry(kwl, prefix);
-   }
-   
-   /**
-    * This should return the type name of all objects in all factories.
-    * This is the name used to construct the objects dynamially and this
-    * name must be unique.
-    */
-   virtual void getTypeNameList(std::vector<ossimString>& typeList)const
-   {
-      getAllTypeNamesFromRegistry(typeList);
-   }
-      
-protected:
-   ossimProjectionFactoryRegistry();
-   ossimProjectionFactoryRegistry(const ossimProjectionFactoryRegistry& rhs);
-   void operator = (const ossimProjectionFactoryRegistry&);
-
-   static ossimProjectionFactoryRegistry* m_instance;
-   void initializeDefaults();
-};
-
-extern "C"
-{
-  OSSIMDLLEXPORT void* ossimProjectionFactoryRegistryGetInstance();
-}
-
-#endif
diff --git a/include/ossim/projection/ossimQuickbirdRpcModel.h b/include/ossim/projection/ossimQuickbirdRpcModel.h
deleted file mode 100644
index 736e346..0000000
--- a/include/ossim/projection/ossimQuickbirdRpcModel.h
+++ /dev/null
@@ -1,85 +0,0 @@
-//*****************************************************************************
-// FILE: ossimQuickbirdRpcModel.h
-//
-// Copyright (C) 2001 ImageLinks, Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// DESCRIPTION: Contains declaration of class ossimQuickbirdRpcModel. This 
-//    derived class implements the capability of reading Quickbird RPC support
-//    data.
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimQuickbirdRpcModel.h 20606 2012-02-24 12:29:52Z gpotts $
-#ifndef ossimQuickbirdRpcModel_HEADER
-#define ossimQuickbirdRpcModel_HEADER
-
-#include <ossim/projection/ossimRpcModel.h>
-#include <ossim/support_data/ossimQuickbirdMetaData.h>
-
-class ossimFilename;
-class ossimQuickbirdMetaData;
-class ossimQbTileFilesHandler;
-
-/*!****************************************************************************
- *
- * CLASS:  ossimQuickbirdRpcModel
- *
- *****************************************************************************/
-class ossimQuickbirdRpcModel : public ossimRpcModel
-{
-public:
-   ossimQuickbirdRpcModel();
-   ossimQuickbirdRpcModel(const ossimQuickbirdRpcModel& rhs);
-
-   //! Initializes
-   ossimQuickbirdRpcModel(const ossimQbTileFilesHandler* handler);
-   ~ossimQuickbirdRpcModel();
-
-   virtual ossimObject* dup() const;
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0) const;
-
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   virtual bool parseFile(const ossimFilename& file);
-   
-   void setSupportData(ossimQuickbirdMetaData* supportData)
-   {
-      theSupportData = supportData;
-   }
-   ossimQuickbirdMetaData* getSupportData()
-   {
-      return theSupportData.get();
-   }
-   const ossimQuickbirdMetaData* getSupportData()const
-   {
-      return theSupportData.get();
-   }
-protected:
-   bool parseNitfFile(const ossimFilename& file);
-   bool parseTiffFile(const ossimFilename& file);
-   bool parseMetaData(const ossimFilename& file);
-   bool parseRpcData (const ossimFilename& file);
-   bool parseTileData(const ossimFilename& file);
-
-   //! Given an initial filename with case-agnostic extension, this method searches first for an
-   //! image-specific instance of that file (i.e., with _R*C* in the filename) before considering
-   //! the mosaic-global support file (_R*C* removed). If a file is found, the argument is modified 
-   //! to match the actual filename and TRUE is returned. Otherwise, argument filename is left 
-   //! unchanged and FALSE is returned.
-   bool findSupportFile(ossimFilename& file) const;
-
-void finishConstruction();
-
-   ossimRefPtr<ossimQuickbirdMetaData> theSupportData;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/projection/ossimRadialDecentLensDistortion.h b/include/ossim/projection/ossimRadialDecentLensDistortion.h
deleted file mode 100644
index 4dfc8da..0000000
--- a/include/ossim/projection/ossimRadialDecentLensDistortion.h
+++ /dev/null
@@ -1,159 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author:  Garrett Potts (gpotts at imagelinks.com)
-//
-// Description: Modeling for lens radial and decentering distortion.
-//
-//   The default implementation is:
-//  
-//   Let X and Y be coordinates relative to the center. Let
-//   Xc and Yc be the adjusted point so that:
-//  
-//   Xc = X + delta1X + delta2X
-//   Yc = Y + delta1Y + delta2Y
-//  
-//   
-//   delta1X = X*(k0 + k1*r^2 + k2*r^4 + k3*r^6 + k4*r^8)
-//   delta1Y = Y*(k0 + k1*r^2 + k2*r^4 + k3*r^6 + k4*r^8)
-//   
-//   delta2X = (1 + p3*r^2 + p4*r^4)[p1*(r^2 + 2*X^2) + 2*p2*X*Y]
-//   delta2Y = (1 + p3*r^2 + p4*r^4)[2*p1*X*Y  + p2*(r^2 + 2*Y^2) ]
-//  
-//  
-//   Note the point that is passed in we will compute:
-//        <X, Y> =  position - calibratedPrincipalPoint.
-//  
-//        so if you compute the delta then make sure that
-//        this class is constructed with principal point
-//        at 0,0
-//  
-//   Reference book: Elements of Photogrammetry Paul Wolf
-//   
-//*******************************************************************
-//  $Id: ossimRadialDecentLensDistortion.h 17195 2010-04-23 17:32:18Z dburken $
-#ifndef ossimRadialDecentLensDistortion_HEADER
-#define ossimRadialDecentLensDistortion_HEADER
-#include <iostream>
-using namespace std;
-
-#include <ossim/matrix/newmat.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossim2dTo2dTransform.h>
-
-//*****************************************************************************
-//  CLASS
-//*****************************************************************************
-class OSSIMDLLEXPORT ossimRadialDecentLensDistortion
-   : public ossim2dTo2dTransform
-{
-public:
-   ossimRadialDecentLensDistortion() {}
-   ossimRadialDecentLensDistortion
-      (const ossimDpt& calibratedPrincipalPoint,
-       const NEWMAT::ColumnVector &radialDistortionParameters,
-       const NEWMAT::ColumnVector &decentDistortionParameters)
-      : theCalibratedPrincipalPoint(calibratedPrincipalPoint),
-        theRadialDistortionParameters(radialDistortionParameters),
-        theDecentDistortionParameters(decentDistortionParameters)
-      {  }
-
-   ossimRadialDecentLensDistortion(const ossimRadialDecentLensDistortion& copy)
-      : theCalibratedPrincipalPoint (copy.theCalibratedPrincipalPoint),
-        theRadialDistortionParameters (copy.theRadialDistortionParameters),
-        theDecentDistortionParameters (copy.theDecentDistortionParameters) { }
-
-   ossimRadialDecentLensDistortion(const ossimKeywordlist& kwl,
-                                   const char* prefix);
-
-   virtual ~ossimRadialDecentLensDistortion(){}
-   
-   /*!
-    * Implementation of base class 2D-to-2D transformation. The "forward"
-    * transformation is defined here as going from an undistorted ideal point to
-    * a distorted real point, i.e., adding distortion.
-    * 
-    * Also available (implemented in the base class) are:
-    *   inverse(distorted_point_in, undistorted_pt_out)
-    *   inverse(undistort_this_pt)
-    */
-   virtual void forward(const ossimDpt& undistorted_point_in,
-                        ossimDpt&       distorted_point_out) const;
-
-   virtual void forward(ossimDpt&  modify_this) const 
-      {
-         ossimDpt output;
-         forward(modify_this, output);
-         modify_this = output;
-      }
-      
-   
-   /*!
-    * Method to save the state of the object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0) const;
-
-   /*!
-    * Method to the load (recreate) the state of the object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   /*!
-    * Set methods provide alternative initialization scheme to loadState:
-    */
-   void setPrincipalPoint(const ossimDpt pp);
-   void setRadialDistortionParams(const NEWMAT::ColumnVector& params);
-   void setDecentDistortionParams(const NEWMAT::ColumnVector& params);
-   /*!
-    * Dumps contents of object to ostream.
-    */
-   virtual std::ostream& print(std::ostream& out) const;
-   
-   static const char* PRINCIPAL_POINT_X_KW;
-   static const char* PRINCIPAL_POINT_Y_KW;
-   static const char* RADIAL_DISTORTION_COEFF_KW;
-   static const char* DECENT_DISTORTION_COEFF_KW;
-   
-private:
-   /*!
-    * default implementation Will solve the polynomial:
-    *
-    * k0 + k1*r^2 + k2*r^4 + k3*r^6 + k4*r^8
-    */
-   virtual double deltaR(double radius)const;
-   
-   ossimDpt     theCalibratedPrincipalPoint;
-   NEWMAT::ColumnVector theRadialDistortionParameters;
-   NEWMAT::ColumnVector theDecentDistortionParameters;  
-
-   TYPE_DATA
-};
-
-//*****************************************************************************
-//  INLINE METHODS
-//*****************************************************************************
-inline void
-ossimRadialDecentLensDistortion::setPrincipalPoint(const ossimDpt pp)
-{
-   theCalibratedPrincipalPoint = pp;
-}
-
-inline void ossimRadialDecentLensDistortion::setRadialDistortionParams
-   (const NEWMAT::ColumnVector& params)
-{
-   theRadialDistortionParameters = params;
-}
-
-inline void ossimRadialDecentLensDistortion::setDecentDistortionParams
-   (const NEWMAT::ColumnVector& params)
-{
-   theDecentDistortionParameters = params;
-}
-
-
-#endif
diff --git a/include/ossim/projection/ossimRpcProjection.h b/include/ossim/projection/ossimRpcProjection.h
deleted file mode 100644
index 4e32397..0000000
--- a/include/ossim/projection/ossimRpcProjection.h
+++ /dev/null
@@ -1,238 +0,0 @@
-//*****************************************************************************
-// FILE: ossimRpcProjection.h
-//
-// LGPL
-//
-// DESCRIPTION: Contains declaration of class ossimRpcProjection.
-//   This is a replacement model utilizing the Rational Polynomial Coefficients
-//   (RPC), a.k.a. Rapid Positioning Capability, and Universal Sensor Model
-//   (USM).
-//
-//*****************************************************************************
-//  $Id: ossimRpcProjection.h 11805 2007-10-05 14:54:28Z dburken $
-
-#ifndef ossimRpcProjection_HEADER
-#define ossimRpcProjection_HEADER
-
-#include <ossim/projection/ossimOptimizableProjection.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/base/ossimAdjustableParameterInterface.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/matrix/newmat.h>
-
-/*!****************************************************************************
- *
- * CLASS:  ossimRpcProjection
- *
- *****************************************************************************/
-class OSSIM_DLL ossimRpcProjection : public ossimProjection,
-                                     public ossimOptimizableProjection,
-                                     public ossimAdjustableParameterInterface
-{
-public:
-   //***
-   // Enumeration of supported RPC polynomial formats:
-   //***
-   enum PolynomialType
-   {
-      A='A',  // corresponds to "RPC00A"
-      B='B'   // corresponds to "RPC00B"
-   };
-   
-   /*!
-    * CONSTRUCTORS:
-    */
-   ossimRpcProjection();
-   ossimRpcProjection(const ossimRpcProjection& copy_this);
-   ~ossimRpcProjection();
-
-   ossimRpcProjection& operator=(const ossimRpcProjection& source);
-
-   void initAdjustableParameters();
-   virtual void adjustableParametersChanged();
-   
-   virtual ossimObject* getBaseObject();
-   virtual const ossimObject* getBaseObject()const;
-   
-   void setAttributes(ossim_float64 theSampleOffset,
-                      ossim_float64 theLineOffset,
-                      ossim_float64 theSampleScale,
-                      ossim_float64 theLineScale,
-                      ossim_float64 theLatOffset,
-                      ossim_float64 theLonOffset,
-                      ossim_float64 theHeightOffset,
-                      ossim_float64 theLatScale,
-                      ossim_float64 theLonScale,
-                      ossim_float64 theHeightScale,
-                      const std::vector<double>& xNumeratorCoeffs,
-                      const std::vector<double>& xDenominatorCoeffs,
-                      const std::vector<double>& yNumeratorCoeffs,
-                      const std::vector<double>& yDenominatorCoeffs,
-                      PolynomialType polyType = B);
-                      
-   /*!
-    * METHOD: worldToLineSample()
-    * Overrides base class implementation. Directly computes line-sample from
-    * the polynomials.
-    */
-   virtual void  worldToLineSample(const ossimGpt& world_point,
-                                   ossimDpt&       image_point) const;
-   /*!
-    * METHOD: print()
-    * Extends base-class implementation. Dumps contents of object to ostream.
-    */
-   virtual std::ostream& print(std::ostream& out) const;
-
-   /*!
-    * METHODS:  saveState, loadState
-    * Fulfills ossimObject base-class pure virtuals. Loads and saves geometry
-    * KWL files. Returns true if successful.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0) const;
-
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   virtual void  lineSampleToWorld(const ossimDpt& image_point,
-                                   ossimGpt&       world_point) const;
-   //***
-   // METHOD: lineSampleHeightToWorld()
-   // Overrides base class pure virtual. Height understood to be relative to
-   // standard ellipsoid.
-   //***
-   virtual void lineSampleHeightToWorld(const ossimDpt& image_point,
-                                        const double&   heightEllipsoid,
-                                        ossimGpt&       worldPoint) const;
-
-   /*!
-    * METHOD: dup()
-    * Returns pointer to a new instance, copy of this.
-    */
-   virtual ossimObject* dup() const { return new ossimRpcProjection(*this); }
-
-   virtual ossimGpt origin()const;
-   virtual ossimDpt getMetersPerPixel() const;
-   virtual bool operator==(const ossimProjection& projection) const;
-   
-   /*
-    * optimizable interface
-    */
-    virtual bool setupOptimizer(const ossimString& setup);
-    inline virtual bool useForward()const {return true;}
-    virtual ossim_uint32 degreesOfFreedom()const;
-    virtual double optimizeFit(const ossimTieGptSet& tieSet, double* targetVariance=NULL);
-   /*!
-    * METHOD: getForwardDeriv()
-    * gives forward() partial derivative regarding parameter parmIdx (>=0)
-    * default implementation is centered finite difference
-    * -should be reimplemented with formal derivative in child class
-    */
-   virtual ossimDpt getForwardDeriv(int parmIdx, const ossimGpt& gpos, double hdelta=1e-11);
-
-   /*!
-    * METHOD: getInverseDeriv()
-    * gives inverse() partial derivative regarding parameter parmIdx (>=0)
-    * default implementation is centered finite difference
-    * -should be reimplemented with formal derivative in child class
-    */
-   virtual ossimGpt getInverseDeriv(int parmIdx, const ossimDpt& ipos, double hdelta=1e-11);
-
-   /**
-    * @brief Implementation of pure virtual
-    * ossimProjection::isAffectedByElevation method.
-    * @return true.
-    */
-   virtual bool isAffectedByElevation() const { return true; }
-
-protected:
-   //***
-   // Methods for computing RPC polynomial and its derivatives:
-   //***
-   double polynomial(const double& nlat,
-                     const double& nlon,
-                     const double& nhgt,
-                     const double* coeffs) const;
-   double dPoly_dLat(const double& nlat,
-                     const double& nlon,
-                     const double& nhgt,
-                     const double* coeffs) const;
-   double dPoly_dLon(const double& nlat,
-                     const double& nlon,
-                     const double& nhgt,
-                     const double* coeffs) const;
-   
-   /*!
-    * METHOD: buildNormalEquation
-    * builds linearized system  (LMS equivalent)
-    * A*dp = projResidue
-    * 
-    * A: symetric matrix = tJ*J
-    * dp: system parameter shift that we want to estimate
-    * projResidue = tJ * residue
-    *
-    * t: transposition operator
-    * J = jacobian of transform relative to parameters p, transform can be forward() or inverse()
-    * jacobian is obtained via finite differences
-    * residue can be image (2D) or ground residue(3D)
-    *
-    * TODO: use image/ground points covariance matrices
-    */
-   void buildNormalEquation(const ossimTieGptSet& tieSet,
-                                      NEWMAT::SymmetricMatrix& A,
-                                      NEWMAT::ColumnVector& residue,
-                                      NEWMAT::ColumnVector& projResidue,
-                                      double pstep_scale);
-
-   /*!
-    * METHOD: getResidue()
-    * returns ground opr image residue
-    */
-   NEWMAT::ColumnVector getResidue(const ossimTieGptSet& tieSet);
-
-   NEWMAT::ColumnVector solveLeastSquares(NEWMAT::SymmetricMatrix& A,  NEWMAT::ColumnVector& r)const;
-
-   /*!
-    * stable invert stolen from ossimRpcSolver
-    */
-   NEWMAT::Matrix invert(const NEWMAT::Matrix& m)const;
-
-   PolynomialType thePolyType;
-   //***
-   // Quantities for zero-biasing and normalizing the image point and
-   // ground point coordinates referenced in the polynomials:
-   //***
-   double theLineScale;
-   double theSampScale;
-   double theLatScale;
-   double theLonScale;
-   double theHgtScale;
-   double theLineOffset;
-   double theSampOffset;
-   double theLatOffset;
-   double theLonOffset;
-   double theHgtOffset;
-
-   //***
-   // Coefficients:
-   //***
-   double theLineNumCoef[20];
-   double theLineDenCoef[20];
-   double theSampNumCoef[20];
-   double theSampDenCoef[20];
-
-   //*
-   // Quantities derived from the adjustable parameters:
-   //*
-   double theIntrackOffset;
-   double theCrtrackOffset;
-   double theIntrackScale;
-   double theCrtrackScale;
-   double theYawSkew;  // = sin(theYawOffset)
-   double theCosMapRot;
-   double theSinMapRot;
-   
-   TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/projection/ossimRpcSolver.h b/include/ossim/projection/ossimRpcSolver.h
deleted file mode 100644
index 2a281f3..0000000
--- a/include/ossim/projection/ossimRpcSolver.h
+++ /dev/null
@@ -1,243 +0,0 @@
-//*****************************************************************************
-// FILE: ossimRpcModel.h
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// AUTHOR: Garrett Potts
-//
-//*****************************************************************************
-//  $Id: ossimRpcSolver.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimRpcSolver_HEADER
-#define ossimRpcSolver_HEADER
-
-#include <vector>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimReferenced.h>
-#include <ossim/matrix/newmat.h>
-#include <ossim/projection/ossimRpcModel.h>
-#include <ossim/projection/ossimRpcProjection.h>
-
-class ossimProjection;
-class ossimImageGeometry;
-class ossimNitfRegisteredTag;
-
-/**
- * This currently only support Rational poilynomial B format.  This can be
- * found in the NITF registered commercial tag document.
- *
- * @note x=longitude, y=latitude, z=height
- * 
- * <pre>
- * Format is:
- *  coeff[ 0]       + coeff[ 1]*x     + coeff[ 2]*y     + coeff[ 3]*z     +
- *  coeff[ 4]*x*y   + coeff[ 5]*x*z   + coeff[ 6]*y*z   + coeff[ 7]*x*x   +
- *  coeff[ 8]*y*y   + coeff[ 9]*z*z   + coeff[10]*x*y*z + coeff[11]*x*x*x +
- *  coeff[12]*x*y*y + coeff[13]*x*z*z + coeff[14]*x*x*y + coeff[15]*y*y*y +
- *  coeff[16]*y*z*z + coeff[17]*x*x*z + coeff[18]*y*y*z + coeff[19]*z*z*z;
- *
- *       where coeff is one of XNum, XDen, YNum, and YDen.  So there are 80
- *       coefficients all together.
- *
- *       
- * Currently we use a linear least squares fit to solve the coefficients.
- * This is the simplest to implement.  We probably relly need a nonlinear
- * minimizer to fit the coefficients but I don't have time to experiment.
- * Levenberg Marquardt might be a solution to look into.
- *
- *
- * 
- * HOW TO USE:
- * 
- *        ossimRpcSolver solver;
- *        solver.solveCoefficients(rect,
- *                                 *proj.get());
- *                                 
- * We can also call solve coefficients with a list of ground control points.
- * First is the list of image points followed by the ground points.
- * NOTE: Thes must be equal in size.
- * 
- *        solver.solveCoefficients(imagePoints,
- *                                 groundPoints);
- *                                 
- *                                 
- * Once you call solveCoefficients you can create the projector:
- *                                 
- *        ossimRefPtr<ossimRpcProjection> rpc = solver.createRpcProjection();
- *
- * </pre>
- * 
- */ 
-class OSSIM_DLL ossimRpcSolver : public ossimReferenced
-{
-public:
-   /**
-    * The use elvation flag will deterimne if we force the height t be 0.
-    * If the elevation is enabled then we use the height field of the control
-    * points to determine the coefficients of the RPC00 polynomial.  If its
-    * false then we will ignore the height by setting the height field to 0.0.
-    *
-    * Note:  even if the elevation is enabled all NAN heights are set to 0.0.
-    */
-   ossimRpcSolver(bool useElevation=false,
-                  bool useHeightAboveMSLFlag=false);
-
-   
-   /**
-    * This will convert any projector to an RPC model
-    */
-   void solveCoefficients(const ossimDrect& imageBouunds,
-                          ossimProjection* imageProj,
-                          ossim_uint32 xSamples=8,
-                          ossim_uint32 ySamples=8,
-                          bool shiftTo0Flag=true);
-   
-   void solveCoefficients(const ossimDrect& imageBouunds,
-                          ossimImageGeometry* geom,
-                          ossim_uint32 xSamples=8,
-                          ossim_uint32 ySamples=8,
-                          bool shiftTo0Flag=true);
-   
-   /**
-    * takes associated image points and ground points
-    * and solves the coefficents for the rational polynomial for
-    * line and sample calculations from world points.
-    *
-    * Note: All data will be normalized between -1 and 1 for
-    *       numerical robustness.
-    */ 
-   void solveCoefficients(const std::vector<ossimDpt>& imagePoints,
-                          const std::vector<ossimGpt>& groundControlPoints,
-                          const ossimDpt& imageShift = ossimDpt(0.0,0.0));
-
-   /**
-    * Creates and Rpc model from the coefficients
-    */
-   ossimImageGeometry* createRpcModel()const;
-
-   /**
-    * Create a simple rpc projection which is a dumbed down
-    * rpc model.
-    */
-   ossimImageGeometry* createRpcProjection()const;
-
-
-   /**
-    * Gives access to the solved coefficients.  For the image
-    * X numerator
-    */
-   const std::vector<double>& getImageXNumCoefficients()const;
-
-   /**
-    * Gives access to the solved coefficients.  For the image
-    * X denominator
-    */
-   const std::vector<double>& getImageXDenCoefficients()const;
-
-   /**
-    * Gives access to the solved coefficients.  For the image
-    * Y numerator
-    */
-   const std::vector<double>& getImageYNumCoefficients()const;
-
-   /**
-    * Gives access to the solved coefficients. For the image
-    * Y denominator
-    */
-   const std::vector<double>& getImageYDenCoefficients()const;
-
-   
-   double getImageXOffset()const;
-   double getImageYOffset()const;
-   double getLatOffset()const;
-   double getLonOffset()const;
-   double getHeightOffset()const;
-   double getImageXScale()const;
-   double getImageYScale()const;
-   double getLatScale()const;
-   double getLonScale()const;
-   double getHeightScale()const;
-
-   double getRmsError()const;
-
-   /**
-    * @return ossimRefPtr<ossimNitfRegisteredTag>
-    *
-    * @note one of the solve methods should have been called prior to this.
-    */
-   ossimRefPtr<ossimNitfRegisteredTag> getNitfRpcBTag() const;
-   
-protected:
-	virtual ~ossimRpcSolver(){}
-   
-   virtual void solveInitialCoefficients(NEWMAT::ColumnVector& coeff,
-                                         const std::vector<double>& f,
-                                         const std::vector<double>& x,
-                                         const std::vector<double>& y,
-                                         const std::vector<double>& z)const;
-                                         
-   virtual void solveCoefficients(NEWMAT::ColumnVector& coeff,
-                                  const std::vector<double>& f,
-                                  const std::vector<double>& x,
-                                  const std::vector<double>& y,
-                                  const std::vector<double>& z)const;
-   
-   double eval(const std::vector<double>& coeff,
-               double x,
-               double y,
-               double z)const;
-
-   /**
-    * Inverts using the SVD method
-    */
-   NEWMAT::Matrix invert(const NEWMAT::Matrix& m)const;
-   
-   void setupSystemOfEquations(NEWMAT::Matrix& equations,
-                               const NEWMAT::ColumnVector& f,
-                               const std::vector<double>& x,
-                               const std::vector<double>& y,
-                               const std::vector<double>& z)const;
-
-   void setupWeightMatrix(NEWMAT::DiagonalMatrix& result, // holds the resulting weights
-                          const NEWMAT::ColumnVector& coefficients,
-                          const NEWMAT::ColumnVector& f,
-                          const std::vector<double>& x,
-                          const std::vector<double>& y,
-                          const std::vector<double>& z)const;
-
-   bool theUseElevationFlag;
-   bool theHeightAboveMSLFlag;
-   ossimDpt      theImageOffset;
-   ossimGpt      theGroundOffset;
-   ossimDpt      theImageScale;
-   ossim_float64 theLatScale;
-   ossim_float64 theLonScale;
-   ossim_float64 theHeightScale;
-   ossim_float64 theError;
-   /**
-    * there are 20 coefficients in the cubic RPC model
-    */ 
-   std::vector<ossim_float64> theXNumCoeffs;
-
-   /**
-    * there are 20 coefficients in the cubic RPC model
-    */ 
-   std::vector<ossim_float64> theXDenCoeffs;
-
-   /**
-    * there are 20 coefficients in the cubic RPC model
-    */ 
-   std::vector<ossim_float64> theYNumCoeffs;
-
-   /**
-    * there are 20 coefficients in the cubic RPC model
-    */ 
-   std::vector<ossim_float64> theYDenCoeffs;
-   
-};
-
-#endif
diff --git a/include/ossim/projection/ossimSensorModel.h b/include/ossim/projection/ossimSensorModel.h
deleted file mode 100644
index b23f780..0000000
--- a/include/ossim/projection/ossimSensorModel.h
+++ /dev/null
@@ -1,378 +0,0 @@
-//*****************************************************************************
-// FILE: ossimSensorModel.h
-//
-// License:  See top level LICENSE.txt file.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION:
-//   Contains declaration of class ossimSensorModel. This is the base class to
-//   all sensor model-related projections including replacement models such as
-//   coarse grids and polynomial models. This base class supports adjustable
-//   parameters for registration adjustment.
-//
-//   Important note to sensor model implementors: In order to avoid a separate
-//   set of "initial adjustable parameters," this design assumes ALL initial
-//   values are 0. When designing the derived-class model, insure that the
-//   adjustable parameters are 0-based. This applies to theAdjustableParams
-//   array declared in this base class only. The derived classes can declare
-//   their own adjstable params that are more descriptive and that can be
-//   assigned an initial value that is non-zero, but that are linearly related
-//   to the adjustable params of this class. In that case, the updateModel()
-//   method will compute the derived-class's parameters based on
-//   theAdjustableParams array, after an adjustment is made.
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimSensorModel.h 21807 2012-10-05 14:22:02Z dhicks $
-
-#ifndef ossimSensorModel_HEADER
-#define ossimSensorModel_HEADER
-
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/projection/ossimBilinearProjection.h>
-#include <ossim/projection/ossimOptimizableProjection.h>
-#include <ossim/base/ossimEcefRay.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimPolygon.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimCommon.h> /* for ossim::nan() */
-#include <ossim/elevation/ossimElevSource.h>
-#include <ossim/base/ossimAdjustableParameterInterface.h>
-#include <ossim/matrix/newmat.h>
-#include <ossim/matrix/newmatap.h>
-#include <ossim/base/ossimException.h>
-class ossimKeywordlist;
-class ossimTieGptSet;
-
-/*!****************************************************************************
- *
- * CLASS:  ossimSensorModel
- *
- *****************************************************************************/
-class OSSIMDLLEXPORT ossimSensorModel : public ossimProjection,
-                                        public ossimOptimizableProjection,
-                                        public ossimAdjustableParameterInterface
-{
-public:
-
-   enum CovMatStatus
-   {
-      COV_INVALID = 0,
-      COV_PARTIAL = 1,
-      COV_FULL    = 2
-   };
-
-   enum DeriveMode
-   {
-      OBS_INIT =-99,
-      EVALUATE =-98,
-      P_WRT_X = -1,
-      P_WRT_Y = -2,
-      P_WRT_Z = -3
-   };
-   
-   /*!
-    * CONSTRUCTORS:
-    */
-   ossimSensorModel();
-   ossimSensorModel(const ossimSensorModel& copy_this);
-   ossimSensorModel(const ossimKeywordlist& geom_kwl);
-
-   virtual ossimObject* getBaseObject();
-   virtual const ossimObject* getBaseObject()const;
-   
-   /*!
-    * ACCESS METHODS:
-    */
-   virtual ossimGpt origin()            const {return theRefGndPt; }
-   virtual ossimDpt getMetersPerPixel() const {return ossimDpt(fabs(theGSD.x),
-                                                               fabs(theGSD.y));}
-   
-   //! Returns the estimated Absolute horizontal position error (CE90) of the sensor model.
-   virtual const double& getNominalPosError() const { return theNominalPosError; }
-
-   //! Returns the estimated RELATIVE horizontal position error (CE90) of the sensor model.
-   virtual const double& getRelativePosError() const { return theRelPosError; }
-
-   //! Assigns the absolute image position error uncertainty (abs CE90)
-   virtual void setNominalPosError(const double& ce90) { theNominalPosError = ce90; }
-
-   //! Assigns the relative image position error uncertainty (rel CE90)
-   virtual void setRelativePosError(const double& ce90) { theRelPosError = ce90; }
-
-   /*!
-    * Implementation of base-class pure virtual projection methods. These
-    * methods may be overriden by derived classes if those have more efficient
-    * schemes. The implementations here are iterative (relatively slow). Both
-    * depend on calls to the pure virtual lineSampleHeightToWorld() method.
-    */
-   virtual void  lineSampleToWorld(const ossimDpt& image_point,
-                                   ossimGpt&       world_point) const;
-   virtual void  worldToLineSample(const ossimGpt& world_point,
-                                   ossimDpt&       image_point) const;
-
-   /*!
-    * METHOD: lineSampleHeightToWorld
-    * This is the pure virtual that performs the actual work of projecting
-    * the image point to the given elevation above Ellipsoid. 
-    */
-   virtual void lineSampleHeightToWorld(const ossimDpt& lineSampPt,
-                                        const double&   heightEllipsoid,
-                                        ossimGpt&       worldPt) const = 0;
-   /*!
-    * METHOD: imagingRay(image_point, &ossimEcefRay)
-    * Given an image point, returns a ray originating at some arbitrarily high
-    * point (ideally at the sensor position) and pointing towards the target.
-    * Implemented here but should be overriden for more efficient solution.
-    */
-   virtual void imagingRay(const ossimDpt& image_point,
-                           ossimEcefRay&   image_ray) const;
-
-   /*!
-    * METHOD: print()
-    * Fulfills base-class pure virtual. Dumps contents of object to ostream.
-    */
-   virtual std::ostream& print(std::ostream& out) const;
-
-   /**
-    * @brief Sets the center line sampe of the image.
-    *
-    * @param pt Image center point (x = sample, y = line).
-    */
-   void setRefImgPt(const ossimDpt& pt);
-
-   /**
-    * @brief Sets the center latitude, longitude, height of the image.
-    *
-    * @param pt Image center point.
-    */
-   void setRefGndPt(const ossimGpt& pt);
-   
-
-   void setImageRect(const ossimDrect& imageRect);
-   void setGroundRect(const ossimGpt& ul,
-                      const ossimGpt& ur,
-                      const ossimGpt& lr,
-                      const ossimGpt& ll);
-   /*!
-    * METHOD: imageSize()
-    * Returns the maximum line/sample rigorously defined by this model.
-    */
-   ossimDpt imageSize() const { return theImageSize; }
-   void setImageSize(const ossimDpt& size){theImageSize = size;}
-   /*!
-    * This is from the adjustable parameter interface.  It is
-    * called when a paraemter adjustment is made.
-    */
-   virtual void adjustableParametersChanged()
-      {
-         updateModel();
-      }
-   /*!
-    * VIRTUAL METHOD: updateModel()
-    * Following a change to the adjustable parameter set, this virtual
-    * is called to permit instances to compute derived quantities after
-    * parameter change.
-    */
-   virtual void updateModel() {}
-
-   /*!
-    * METHODS:  saveState, loadState
-    * Fulfills ossimObject base-class pure virtuals. Loads and saves geometry
-    * KWL files.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0) const;
-
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-   /*!
-    * METHOD: insideImage(image_point)
-    * Returns true if the image_point lies inside the image rectangle.
-    */
-   virtual bool insideImage(const ossimDpt& p) const
-      {
-/*          return( (p.u>=(0.0-FLT_EPSILON)) && */
-/*                  (p.u<=(double)(theImageSize.u-(1-FLT_EPSILON))) && */
-/*                  (p.v>=(0.0-FLT_EPSILON)) && */
-/*                  (p.v<=(double)(theImageSize.v-(1-FLT_EPSILON))) ); */
-         // if it's close to the edge we will consider it inside the image
-         //
-         return theImageClipRect.pointWithin(p, 2.0);
-      }
-
-   /*!
-    * STATIC METHOD: writeGeomTemplate(ostream)
-    * Writes a template of keywords processed by loadState and saveState to
-    * output stream.
-    */
-   static void writeGeomTemplate(ostream& os);
-
-   /*!
-    * OPERATORS: 
-    */
-   virtual bool operator==(const ossimProjection& proj) const; //inline below
-
-    //! Access methods:
-    const ossimString&   getImageID()               const { return theImageID; }
-    const ossimDrect&    getImageClipRect()         const { return theImageClipRect; }
-
-   /*!
-    * optimizableProjection implementation
-    */
-   virtual ossim_uint32 degreesOfFreedom()const;
-   inline virtual bool needsInitialState()const {return true;}
-   virtual double optimizeFit(const ossimTieGptSet& tieSet,
-                              double* targetVariance=0);
-
-   /*!
-    * METHOD: getForwardDeriv()
-    * gives forward() partial derivative regarding parameter parmIdx (>=0)
-    * default implementation is centered finite difference
-    * -should be reimplemented with formal derivative in child class
-    */
-   virtual ossimDpt getForwardDeriv(int parmIdx, const ossimGpt& gpos, double hdelta=1e-11);
-
-   /*!
-    * METHOD: getInverseDeriv()
-    * gives inverse() partial derivative regarding parameter parmIdx (>=0)
-    * default implementation is centered finite difference
-    * -should be reimplemented with formal derivative in child class
-    */
-   virtual ossimGpt getInverseDeriv(int parmIdx, const ossimDpt& ipos, double hdelta=1e-11);
-
-   /*!
-    * METHOD: getObsCovMat()
-    * @brief Gives 2X2 covariance matrix of observations
-    */
-   virtual ossimSensorModel::CovMatStatus getObsCovMat(
-      const ossimDpt& ipos, NEWMAT::SymmetricMatrix& Cov,
-      const ossim_float64 defPointingSigma = 0.5);
-
-   /**
-    * @brief Implementation of pure virtual
-    * ossimProjection::isAffectedByElevation method.
-    * @return true.
-    */
-   virtual bool isAffectedByElevation() const { return true; }
-
-   /**
-    * This method computes the ground sample distance(gsd) and sets class
-    * attributes theGSD and theMeanGSD by doing a lineSampleHeightToWorld on
-    * four points and calculating the distance from them.
-    *
-    * @return Nothing but throws ossimException on error.
-    */
-   void computeGsd();
-
-protected:
-   virtual ~ossimSensorModel();
-
-   
-   /*!
-    * METHOD: extrapolate()
-    * Extrapolates solutions for points outside of the image. The second
-    * version accepts a height value -- if left at the default, the elevation
-    * will be looked up via theElevation object.
-    */
-   virtual ossimDpt extrapolate (const ossimGpt& gp) const;
-   virtual ossimGpt extrapolate (const ossimDpt& ip,
-				 const double& height=ossim::nan()) const;
-
-   /*!
-    * METHOD: buildNormalEquation
-    * builds linearized system  (LMS equivalent)
-    * A*dp = projResidue
-    * 
-    * A: symetric matrix = tJ*J
-    * dp: system parameter shift that we want to estimate
-    * projResidue = tJ * residue
-    *
-    * t: transposition operator
-    * J = jacobian of transform relative to parameters p, transform can be forward() or inverse()
-    * jacobian is obtained via finite differences
-    * residue can be image (2D) or ground residue(3D)
-    *
-    * TODO: use image/ground points covariance matrices
-    */
-   void buildNormalEquation(const ossimTieGptSet& tieSet,
-                                      NEWMAT::SymmetricMatrix& A,
-                                      NEWMAT::ColumnVector& residue,
-                                      NEWMAT::ColumnVector& projResidue,
-                                      double pstep_scale);
-
-   /*!
-    * METHOD: getResidue()
-    * returns ground opr image residue
-    */
-   NEWMAT::ColumnVector getResidue(const ossimTieGptSet& tieSet);
-
-   NEWMAT::ColumnVector solveLeastSquares(NEWMAT::SymmetricMatrix& A,  NEWMAT::ColumnVector& r)const;
-
-   /*!
-    * stable invert stolen from ossimRpcSolver
-    */
-   NEWMAT::Matrix invert(const NEWMAT::Matrix& m)const;
-
-   ossimIpt       theImageSize;       // pixels
-
-   /*!
-    * Support sub-image of larger full image by maintaining offset to UL corner
-    */
-   ossimDpt       theSubImageOffset;  // pixels
-   
-   ossimString    theImageID;
-   ossimString    theSensorID;
-   ossimDpt       theGSD;             // meters
-   ossim_float64  theMeanGSD;         // meters
-   ossimGpt       theRefGndPt;        // should be image center
-   ossimDpt       theRefImgPt;        // should be image center
-   ossimPolygon   theBoundGndPolygon;
-   ossimDrect     theImageClipRect;
-   ossim_float64  theRelPosError; 	// meters, relative to other models in the set
-   ossim_float64  theNominalPosError; // meters
-
-   /** Partials for current point */
-   ossimDpt theParWRTx;
-   ossimDpt theParWRTy;
-   ossimDpt theParWRTz;
-   
-   /** Observations & residuals for current point */
-   ossimDpt theObs;
-   ossimDpt theResid;
-
-   /**
-    * Used as an initial guess for iterative solutions and a guess for points outside the support
-    * bounds.
-    */ 
-   ossimRefPtr<ossimProjection> theSeedFunction;
-   
-   mutable bool theExtrapolateImageFlag;
-   mutable bool theExtrapolateGroundFlag;
-   
-TYPE_DATA
-};
-
-//================= BEGIN INLINE DEFINITIONS =================================
-
-//*****************************************************************************
-//  OPERATOR == 
-//*****************************************************************************
-inline bool ossimSensorModel::operator==(const ossimProjection& proj) const
-{
-   const  ossimSensorModel* model
-      = PTR_CAST(ossimSensorModel, (const ossimProjection*) &proj);
-    
-   if ( (!model) ||
-	(theSensorID != model->theSensorID) ||
-	(theImageID != model->theImageID) ||
-	(theSubImageOffset != model->theSubImageOffset) )
-      return false;
-
-   return true;
-}
-
-#endif
diff --git a/include/ossim/projection/ossimSensorModelFactory.h b/include/ossim/projection/ossimSensorModelFactory.h
deleted file mode 100644
index e93dfd6..0000000
--- a/include/ossim/projection/ossimSensorModelFactory.h
+++ /dev/null
@@ -1,64 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Oscar Kramer
-//
-// Description: Factory for all ossim sensor models.
-// 
-//*******************************************************************
-//  $Id: ossimSensorModelFactory.h 12081 2007-11-26 21:44:18Z dburken $
-#ifndef ossimSensorModelFactory_HEADER
-#define ossimSensorModelFactory_HEADER
-#include <ossim/projection/ossimProjectionFactoryBase.h>
-
-class ossimProjection;
-class ossimString;
-class ossimFilename;
-
-class OSSIM_DLL ossimSensorModelFactory : public ossimProjectionFactoryBase
-{
-public:
-   /*!
-    * METHOD: instance()
-    * For accessing static instance of concrete factory.
-    */
-   static ossimSensorModelFactory* instance();
-   
-   virtual ossimProjection* createProjection(const ossimFilename& filename,
-                                             ossim_uint32 entryIdx)const;
-   /*!
-    * METHOD: create()
-    * Attempts to create an instance of the Product given a Specifier or
-    * keywordlist. Returns successfully constructed product or NULL.
-    */
-   virtual ossimProjection* createProjection(const ossimString& spec)     const;
-   virtual ossimProjection* createProjection(const ossimKeywordlist& kwl,
-                                             const char* prefix = 0)      const;
-
-   virtual ossimObject* createObject(const ossimString& typeName)const;
-
-   /*!
-    * Creates and object given a keyword list.
-    */
-   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
-                                     const char* prefix=0)const;
-   
-   /*!
-    * This should return the type name of all objects in all factories.
-    * This is the name used to construct the objects dynamially and this
-    * name must be unique.
-    */
-   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
-   
-protected:
-   ossimSensorModelFactory() {}
-   
-   static ossimSensorModelFactory*  theInstance;
-   bool isNitf(const ossimFilename& filename)const;
-   bool isLandsat(const ossimFilename& filename)const;
-   void findCoarseGrid(ossimFilename& result,
-                       const ossimFilename& geomFile)const;
-};
-
-#endif
diff --git a/include/ossim/projection/ossimStatePlaneProjectionInfo.h b/include/ossim/projection/ossimStatePlaneProjectionInfo.h
deleted file mode 100644
index 667439b..0000000
--- a/include/ossim/projection/ossimStatePlaneProjectionInfo.h
+++ /dev/null
@@ -1,105 +0,0 @@
-//*******************************************************************
-//
-// License:  See top LICENSE.txt file.
-//
-// Author: Garrett Potts
-//*******************************************************************
-//  $Id: ossimStatePlaneProjectionInfo.h 17815 2010-08-03 13:23:14Z dburken $
-#ifndef ossimStatePlaneProjectionInfo_HEADER
-#define ossimStatePlaneProjectionInfo_HEADER
-
-#include <ostream>
-
-#include <ossim/base/ossimConstants.h> /* for OSSIM_DLL macro */
-#include <ossim/base/ossimDms.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimString.h>
-
-class ossimDatum;
-class ossimMapProjection;
-class ossimKeywordlist;
-
-class OSSIM_DLL ossimStatePlaneProjectionInfo
-{
-
-   friend std::ostream& operator<<(std::ostream&,
-                                   const ossimStatePlaneProjectionInfo&);
-
-public:
-
-   ossimStatePlaneProjectionInfo(const std::string&  name,
-                                 int                 pcsCode,
-                                 const std::string&  projCode,
-                                 const std::string&  param1,
-                                 const std::string&  param2,
-                                 const std::string&  param3,
-                                 const std::string&  param4,
-                                 double              falseEast,
-                                 double              falseNorth,
-                                 const std::string&  units,
-                                 const std::string&  datumName);
-  
-   int                code()                  const;
-   const ossimString& name()                  const;
-   const ossimString& projName()              const;
-   double             originLat()             const;
-   double             originLon()             const;
-   const ossimDatum*  datum()                 const;
-   ossimGpt           origin()                const;
-   double             parallel1()             const;
-   double             parallel2()             const;
-   double             falseEasting()          const;
-   double             falseNorthing()         const;
-   double             falseEastingInMeters()  const;
-   double             falseNorthingInMeters() const;
-   double             scaleFactor()           const;
-
-   /** Not stored as string; hence, returned by value. */
-   ossimString        units()                 const;
-
-   /**
-    * 
-    * @return ossimUnitType
-    */
-   ossimUnitType getUnitType() const;
-
-   /**
-    * Checks parameters of projection against this.
-    *
-    * @return true if projection parameters match this, false if not.
-    */
-   bool matchesProjection(const ossimMapProjection* proj) const;
-   
-   bool               isSameCode( int Code )  const;
-
-   void populateProjectionKeywords(ossimKeywordlist& kwl,
-                                   const char* prefix=0)const;
-private:
-   
-   int                  thePcsCode;       // The Geotiff code 
-   ossimString          theName;          // Descriptive PCS name
-   
-   /*!
-    * ossimLambertConformalConicProjection or
-    * ossimTransMercatorProjection
-    */
-   ossimString          theProjectionName;
-   
-   const ossimDatum*    theDatum; // Either NAD83 or NAD27  based on name
-   
-   ossimDms             theOriginLat;
-   ossimDms             theOriginLon;
-   ossimGpt             theOrigin;
-   
-   double               theParameter3;      // parallel 1   or   Scale factor
-   double               theParameter4;      // parallel 2   or      0
-   
-   double               theFalseEasting;
-   double               theFalseNorthing;
-   
-   double               theScaleFactor;
-   
-   ossimUnitType        theUnits;        // "us_survey_ft" "feet" or "meters"
-};
-
-#endif /* #ifndef ossimStatePlaneProjectionInfo_HEADER */
diff --git a/include/ossim/projection/ossimTiffProjectionFactory.h b/include/ossim/projection/ossimTiffProjectionFactory.h
deleted file mode 100644
index 3e3f075..0000000
--- a/include/ossim/projection/ossimTiffProjectionFactory.h
+++ /dev/null
@@ -1,67 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-// class ossimProjectionFactory maintains a static list of projection
-// makers.  If a user wants to create a projection they can pass in
-// a projection name and a datum if desired.  Currently the default
-// datum will be WGS84.
-//*******************************************************************
-//  $Id: ossimTiffProjectionFactory.h 15766 2009-10-20 12:37:09Z gpotts $
-
-#ifndef ossimTiffProjectionFactory_HEADER
-#define ossimTiffProjectionFactory_HEADER
-
-#include <ossim/projection/ossimProjectionFactoryBase.h>
-
-class ossimProjection;
-class ossimString;
-
-class ossimTiffProjectionFactory : public ossimProjectionFactoryBase
-{
-public:
-   /*!
-    * METHOD: instance()
-    * Instantiates singleton instance of this class:
-    */
-   static ossimTiffProjectionFactory* instance();
-
-   virtual ossimProjection* createProjection(const ossimFilename& filename,
-                                             ossim_uint32 entryIdx)const;
-   /*!
-    * METHOD: create()
-    * Attempts to create an instance of the projection specified by name.
-    * Returns successfully constructed projection or NULL.
-    */
-   virtual ossimProjection* createProjection(const ossimString& name)const;
-   virtual ossimProjection* createProjection(const ossimKeywordlist& kwl,
-                                             const char* prefix = 0)const;
-   ossimProjection* createProjection(ossimImageHandler* handler)const;
-
-   virtual ossimObject* createObject(const ossimString& typeName)const;
-
-   /*!
-    * Creates and object given a keyword list.
-    */
-   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
-                                     const char* prefix=0)const;
-   
-   /*!
-    * This should return the type name of all objects in all factories.
-    * This is the name used to construct the objects dynamially and this
-    * name must be unique.
-    */
-   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
-
-protected:
-   ossimTiffProjectionFactory() {}
-   static ossimTiffProjectionFactory*  theInstance;
-
-   bool isTiff(const ossimFilename& filename)const;
-};
-
-#endif
diff --git a/include/ossim/projection/ossimUpspt.h b/include/ossim/projection/ossimUpspt.h
deleted file mode 100644
index d71b338..0000000
--- a/include/ossim/projection/ossimUpspt.h
+++ /dev/null
@@ -1,42 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author:  Garrett Potts(gpotts at imagelinks.com)
-//
-// Description:
-//
-// This is the Universal Polar Stereographic (UPS) point.  Allows
-// easy onversion between different coordinates.
-//*******************************************************************
-//  $Id: ossimUpspt.h 9968 2006-11-29 14:01:53Z gpotts $
-
-#ifndef ossimUpspt_HEADER
-#define ossimUpspt_HEADER
-
-class ossimUtmpt;
-class ossimGpt;
-class ossimEcefPoint;
-class ossimDatum;
-
-class ossimUpspt
-{
-public:
-   ossimUpspt(const ossimGpt &aPt);
-   ossimUpspt(const ossimEcefPoint &aPt);
-
-   char hemisphere()const{return theHemisphere;}
-   double easting()const {return theEasting;}
-   double northing()const{return theNorthing;}
-   const ossimDatum* datum()const{return theDatum;}
-   
-private:
-   char    theHemisphere;
-   double  theEasting;
-   double  theNorthing;
-   ossimDatum  *theDatum;
-
-   void convertFromGeodetic(const ossimGpt &aPt);
-};
-
-#endif
diff --git a/include/ossim/projection/ossimUtm.h b/include/ossim/projection/ossimUtm.h
deleted file mode 100644
index adcb783..0000000
--- a/include/ossim/projection/ossimUtm.h
+++ /dev/null
@@ -1,178 +0,0 @@
-#ifndef UTM_H
-  #define UTM_H
-/***************************************************************************/
-/* RSC IDENTIFIER: UTM
- *
- * ABSTRACT
- *
- *    This component provides conversions between geodetic coordinates 
- *    (latitude and longitudes) and Universal Transverse Mercator (UTM)
- *    projection (zone, hemisphere, easting, and northing) coordinates.
- *
- * ERROR HANDLING
- *
- *    This component checks parameters for valid values.  If an invalid value
- *    is found, the error code is combined with the current error code using 
- *    the bitwise or.  This combining allows multiple error codes to be
- *    returned. The possible error codes are:
- *
- *          UTM_NO_ERROR           : No errors occurred in function
- *          UTM_LAT_ERROR          : Latitude outside of valid range
- *                                    (-80.5 to 84.5 degrees)
- *          UTM_LON_ERROR          : Longitude outside of valid range
- *                                    (-180 to 360 degrees)
- *          UTM_EASTING_ERROR      : Easting outside of valid range
- *                                    (100,000 to 900,000 meters)
- *          UTM_NORTHING_ERROR     : Northing outside of valid range
- *                                    (0 to 10,000,000 meters)
- *          UTM_ZONE_ERROR         : Zone outside of valid range (1 to 60)
- *          UTM_HEMISPHERE_ERROR   : Invalid hemisphere ('N' or 'S')
- *          UTM_ZONE_OVERRIDE_ERROR: Zone outside of valid range
- *                                    (1 to 60) and within 1 of 'natural' zone
- *          UTM_A_ERROR            : Semi-major axis less than or equal to zero
- *          UTM_INV_F_ERROR        : Inverse flattening outside of valid range
- *								  	                (250 to 350)
- *
- * REUSE NOTES
- *
- *    UTM is intended for reuse by any application that performs a Universal
- *    Transverse Mercator (UTM) projection or its inverse.
- *    
- * REFERENCES
- *
- *    Further information on UTM can be found in the Reuse Manual.
- *
- *    UTM originated from :  U.S. Army Topographic Engineering Center
- *                           Geospatial Information Division
- *                           7701 Telegraph Road
- *                           Alexandria, VA  22310-3864
- *
- * LICENSES
- *
- *    None apply to this component.
- *
- * RESTRICTIONS
- *
- *    UTM has no restrictions.
- *
- * ENVIRONMENT
- *
- *    UTM was tested and certified in the following environments:
- *
- *    1. Solaris 2.5 with GCC, version 2.8.1
- *    2. MSDOS with MS Visual C++, version 6
- *
- * MODIFICATIONS
- *
- *    Date              Description
- *    ----              -----------
- *    10-02-97          Original Code
- *
- */
-
-
-/***************************************************************************/
-/*
- *                              DEFINES
- */
-#include <ossim/base/ossimConstants.h>
-
-  #define UTM_NO_ERROR            0x0000
-  #define UTM_LAT_ERROR           0x0001
-  #define UTM_LON_ERROR           0x0002
-  #define UTM_EASTING_ERROR       0x0004
-  #define UTM_NORTHING_ERROR      0x0008
-  #define UTM_ZONE_ERROR          0x0010
-  #define UTM_HEMISPHERE_ERROR    0x0020
-  #define UTM_ZONE_OVERRIDE_ERROR 0x0040
-  #define UTM_A_ERROR             0x0080
-  #define UTM_INV_F_ERROR         0x0100
-
-
-/***************************************************************************/
-/*
- *                              FUNCTION PROTOTYPES
- *                                for UTM.C
- */
-
-/* ensure proper linkage to c++ programs */
-  #ifdef __cplusplus
-extern "C" {
-  #endif
-
-  long OSSIM_DLL Set_UTM_Parameters(double a,      
-                          double f,
-                          long   override);
-/*
- * The function Set_UTM_Parameters receives the ellipsoid parameters and
- * UTM zone override parameter as inputs, and sets the corresponding state
- * variables.  If any errors occur, the error code(s) are returned by the 
- * function, otherwise UTM_NO_ERROR is returned.
- *
- *    a                 : Semi-major axis of ellipsoid, in meters       (input)
- *    f                 : Flattening of ellipsoid                       (input)
- *    override          : UTM override zone, zero indicates no override (input)
- */
-
-
-  void OSSIM_DLL Get_UTM_Parameters(double *a,
-                          double *f,
-                          long   *override);
-/*
- * The function Get_UTM_Parameters returns the current ellipsoid
- * parameters and UTM zone override parameter.
- *
- *    a                 : Semi-major axis of ellipsoid, in meters       (output)
- *    f                 : Flattening of ellipsoid                       (output)
- *    override          : UTM override zone, zero indicates no override (output)
- */
-
-
-  long OSSIM_DLL Convert_Geodetic_To_UTM (double Latitude,
-                                double Longitude,
-                                long   *Zone,
-                                char   *Hemisphere,
-                                double *Easting,
-                                double *Northing); 
-/*
- * The function Convert_Geodetic_To_UTM converts geodetic (latitude and
- * longitude) coordinates to UTM projection (zone, hemisphere, easting and
- * northing) coordinates according to the current ellipsoid and UTM zone
- * override parameters.  If any errors occur, the error code(s) are returned
- * by the function, otherwise UTM_NO_ERROR is returned.
- *
- *    Latitude          : Latitude in radians                 (input)
- *    Longitude         : Longitude in radians                (input)
- *    Zone              : UTM zone                            (output)
- *    Hemisphere        : North or South hemisphere           (output)
- *    Easting           : Easting (X) in meters               (output)
- *    Northing          : Northing (Y) in meters              (output)
- */
-
-
-  long OSSIM_DLL Convert_UTM_To_Geodetic(long   Zone,
-                               char   Hemisphere,
-                               double Easting,
-                               double Northing,
-                               double *Latitude,
-                               double *Longitude);
-/*
- * The function Convert_UTM_To_Geodetic converts UTM projection (zone, 
- * hemisphere, easting and northing) coordinates to geodetic(latitude
- * and  longitude) coordinates, according to the current ellipsoid
- * parameters.  If any errors occur, the error code(s) are returned
- * by the function, otherwise UTM_NO_ERROR is returned.
- *
- *    Zone              : UTM zone                               (input)
- *    Hemisphere        : North or South hemisphere              (input)
- *    Easting           : Easting (X) in meters                  (input)
- *    Northing          : Northing (Y) in meters                 (input)
- *    Latitude          : Latitude in radians                    (output)
- *    Longitude         : Longitude in radians                   (output)
- */
-
-  #ifdef __cplusplus
-}
-  #endif
-
-#endif /* UTM_H */
diff --git a/include/ossim/projection/ossimUtmpt.h b/include/ossim/projection/ossimUtmpt.h
deleted file mode 100644
index dcbd93d..0000000
--- a/include/ossim/projection/ossimUtmpt.h
+++ /dev/null
@@ -1,89 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-// This is the Universal Transverse Mercator (UTM) point.  Allows
-// easy onversion between different coordinates.
-//*******************************************************************
-//  $Id: ossimUtmpt.h 9094 2006-06-13 19:12:40Z dburken $
-#ifndef ossimUtmpt_HEADER
-#define ossimUtmpt_HEADER
-
-#include <ossim/base/ossimConstants.h>
-
-class ossimGpt;
-class ossimEcefPoint;
-class ossimUpspt;
-class ossimDatum;
-
-class OSSIMDLLEXPORT ossimUtmpt
-{
-public:
-   ossimUtmpt(const ossimGpt &aPt);
-   ossimUtmpt(const ossimEcefPoint &aPt);
-   ossimUtmpt(long         zone,
-              char         hemisphere,  // N or S
-              double       easting,
-              double       northing,
-              const ossimDatum* datum);
-   
-   // ossimUtmpt(const ossimUpspt &aPt);
-
-   /**
-    * Return the zone for this utm point.
-    */
-   long zone() const { return theZone; }
-
-   /**
-    * Return the hemisphere ( Northern or Southern).
-    * We store this as a char value N or S.  We store it
-    * like this because we are interfacing to geotrans
-    * and geotrans stores their values in this manner.
-    */
-   char hemisphere() const { return theHemisphere; }
-
-   /**
-    * return the easting value in meters.
-    */
-   double easting() const { return theEasting; }
-
-   /**
-    * return the northing value in meters.
-    */
-   double northing() const { return theNorthing; }
-
-   /**
-    * return the reference datum for this point.
-    */
-   const ossimDatum* datum() const { return theDatum; }
-
-   /**
-    * Initializes this point to utm coordinates for the ground point.
-    *
-    * @param aPt Ground point to initialize from.
-    */
-   void convertFromGround(const ossimGpt &aPt);
-
-   /**
-    * Initializes the ground point from the utm coordinates of this point.
-    *
-    * @param aPt Ground point to initialize.
-    */
-   void convertToGround(ossimGpt &aPt);
-   
-private:
-   long               theZone;
-   char               theHemisphere;
-   double             theEasting;
-   double             theNorthing;
-   const ossimDatum*  theDatum;
-};
-
-#endif
diff --git a/include/ossim/projection/ossimWktProjectionFactory.h b/include/ossim/projection/ossimWktProjectionFactory.h
deleted file mode 100644
index ea9bc41..0000000
--- a/include/ossim/projection/ossimWktProjectionFactory.h
+++ /dev/null
@@ -1,71 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author:  Oscar Kramer
-//
-//*******************************************************************
-//  $Id: ossimWktProjectionFactory.h 19879 2011-07-30 16:21:50Z dburken $
-
-#ifndef ossimWktProjectionFactory_HEADER
-#define ossimWktProjectionFactory_HEADER
-
-#include <ossim/projection/ossimProjectionFactoryBase.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimRefPtr.h>
-
-class ossimProjection;
-class ossimString;
-class ossimMapProjection;
-
-//*************************************************************************************************
-//! Projection Factory for coded projections defined in database. These are projections
-//! that are fully defined in database files and specified via a projection coordinate system (PCS)
-//! code, such as EPSG codes.
-//*************************************************************************************************
-class OSSIMDLLEXPORT ossimWktProjectionFactory : public ossimProjectionFactoryBase
-{
-public:
-   /*!
-    * METHOD: instance()
-    * Instantiates singleton instance of this class:
-    */
-   static ossimWktProjectionFactory* instance();
-
-   virtual ossimProjection* createProjection(const ossimFilename& filename,
-                                             ossim_uint32 entryIdx) const;
-
-   //! This is the principal factory method. It accepts a WKT string, for example 
-   //! "Anguilla_1957_British_West_Indies_Grid"
-   virtual ossimProjection* createProjection(const ossimString& name) const;
-
-   //! Looks for presence of "projection" keyword with the value in WKT format,
-   //! for example "Anguilla_1957_British_West_Indies_Grid" 
-   virtual ossimProjection* createProjection(const ossimKeywordlist& kwl,
-                                             const char* prefix = 0)const;
-
-   virtual ossimObject* createObject(const ossimString& typeName)const;
-   virtual ossimObject* createObject(const ossimKeywordlist& kwl, const char* prefix=0)const;
-   
-    //! This returns the type name of all objects in all factories. This is the name used to 
-    //! construct the objects dynamically and this name must be unique.
-   virtual void getTypeNameList(std::vector<ossimString>& typeList) const;
-
-protected:
-   //! Constructor loads the WKT CSV file specified in the ossim prefs with "wkt_database_file"
-   //! keyword.
-   ossimWktProjectionFactory();
-
-   struct WktProjRecord : public ossimReferenced
-   {
-      WktProjRecord() : epsgCode(0), wktString(""), proj(0) {}
-      ossim_uint32     epsgCode;
-      ossimString      wktString;
-      ossimRefPtr<ossimMapProjection> proj;
-   };
-
-   static ossimWktProjectionFactory*  m_instance; //!< Singleton implementation
-   mutable std::vector<ossimRefPtr<WktProjRecord> > m_wktProjRecords;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimApplanixEOFile.h b/include/ossim/support_data/ossimApplanixEOFile.h
deleted file mode 100644
index 89f0a58..0000000
--- a/include/ossim/support_data/ossimApplanixEOFile.h
+++ /dev/null
@@ -1,211 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2005 Garrett Potts
-//
-// LGPL
-// 
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimApplanixEOFile.h 20483 2012-01-21 15:42:22Z dburken $
-#ifndef ossimApplanixEOFile_HEADER
-#define ossimApplanixEOFile_HEADER 1
-
-#include <ossim/base/ossimReferenced.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimString.h>
-#include <iostream>
-#include <map>
-#include <vector>
-
-class OSSIM_DLL ossimApplanixEORecord : public ossimReferenced
-{
-public:
-
-   OSSIM_DLL friend std::ostream& operator <<(std::ostream& out, const ossimApplanixEORecord& src);
-   ossimApplanixEORecord(const ossimApplanixEORecord& src)
-      :theField(src.theField)
-   {
-   }
-   ossimApplanixEORecord(ossim_uint32 size=0)
-   {
-      setSize(size);
-   }
-
-   void setSize(ossim_uint32 size)
-   {
-      theField.resize(size);
-   }
-   const ossimString& operator [](ossim_uint32 idx)const
-   {
-      return theField[idx];
-   }
-   ossimString& operator [](ossim_uint32 idx)
-   {
-      return theField[idx];
-   }
-
-   std::vector<ossimString> theField;
-};
-
-class OSSIM_DLL ossimApplanixEOFile : public ossimReferenced
-{
-public:
-   OSSIM_DLL friend std::ostream& operator <<(std::ostream& out, const ossimApplanixEOFile& src);
-   ossimApplanixEOFile();
-
-   /**
-    * Will parse the entire Exterior orientation file and then index any record
-    * ID's found.  This calls the parseStream method.
-    *
-    * @param file  The exterior orientation file
-    */ 
-   bool parseFile(const ossimFilename& file);
-
-   /**
-    * Will parse the stream and set internal queriable parameters.
-    * @param inThe input stream containing the Applanix format exterior orientation file
-    * 
-    */
-   bool parseStream(std::istream& in);
-   
-
-   /**
-    * Utility method that just checks for an APPlanix exterior orientation header.
-    * Will call the isEOFile(istream) method.
-    *
-    * @param file theExterior orientation file.
-    */ 
-   bool isEOFile(const ossimFilename& file)const;
-
-   /**
-    * Utility method that just checks for an APPlanix exterior orientation header.
-    */ 
-   bool isEOFile(std::istream& in)const;
-
-   /**
-    * Parses the header of the exterior orientation file.
-    * Calls the parseHeader(istream, header) method.
-    *
-    * @param file The filename that is an Applanix Exterior orientation file.
-    * @param header The resulting header that was parsed out.
-    */
-   bool parseHeader(const ossimFilename& file,
-                    ossimString& header)const;
-
-   /**
-    * Parses the header of the exterior orientation file.
-    * Calls the parseHeader(istream, header) method.
-    *
-    * @param in The input stream That contains an exterior orientation 
-    * @param header The resulting header that was parsed out.
-    */
-   bool parseHeader(std::istream& in,
-                    ossimString& header)const;
-
-   /**
-    * Is a case insensitive parse of the column names for the orientation
-    * record.  Note this will check to see if the search key is contained
-    * within any column heading.  So if a Heading has something like
-    * "ID MORE TEXT"  then you can call this with just "ID" and get a match
-    *
-    * @param searchKey  the substring to search for
-    * @return The id of the column or -1 if can't find the column
-    */
-   ossim_int32 getFieldIdxLike(const ossimString& searchKey)const;
-   
-   
-   /**
-    * Is a case insensitive parse of the column names for the orientation
-    * record.  Note this will check to see if the search key exactly matches
-    * a column heading.  So if a Heading has something like
-    * "ID MORE TEXT"  then you can call this with just "ID MORE TEXT" to have a match
-    *
-    * @param searchKey  the substring to search for
-    *
-    * @return The id of the column or -1 if can't find the column
-    */
-   ossim_int32 getFieldIdx(const ossimString& searchKey)const;
-   
-   /** 
-    * Will index all records based on the "ID #" field for fast searching.
-    */ 
-   void indexRecordIds();
-
-   /**
-    *  Given an ID it will search and find an EO record that matches the ID.
-    *
-    *  If the records are not indexed it will do a linear search on the record array.
-    *
-    *  @param id  The id of the record to find.
-    *  
-    *  @return The exterior orientation for that record.
-    */
-   const ossimRefPtr<ossimApplanixEORecord> getRecordGivenId(const ossimString& id)const;
-
-   ossim_uint32 getNumberOfRecords()const;
-   const ossimRefPtr<ossimApplanixEORecord> getRecord(ossim_uint32 idx)const;
-      
-   bool isHeightAboveMSL()const;
-   bool isEcefModel()const;
-   bool isUtmFrame()const;
-   ossim_int32 getUtmZone()const;
-   ossimString getUtmHemisphere()const;
-
-   ossimString getSbetField()const;
-   double getBoreSightTx()const;
-   double getBoreSightTy()const;
-   double getBoreSightTz()const;
-   double getLeverArmLx()const;
-   double getLeverArmLy()const;
-   double getLeverArmLz()const;
-   double getKardinalKappa()const;
-   double getShiftValuesX()const;
-   double getShiftValuesY()const;
-   double getShiftValuesZ()const;
-
-   ossimString getMappingFrameDatum()const;
-   ossimString getMappingFrameProjection()const;
-   double getMappingFrameCentralMeridian()const;
-   double getMappingFrameOriginLatitude()const;
-   double getMappingFrameGridScaleFactor()const;
-   double getMappingFrameFalseEasting()const;
-   double getMappingFrameFalseNorthing()const;
-
-   ossimString convertToOssimDatumCode(const ossimString& datum)const;
-   
-protected:
-   ossimString theHeader;
-   ossimString theVersion;
-   ossimString theBoreSightTx;
-   ossimString theBoreSightTy;
-   ossimString theBoreSightTz;
-   ossimString theKappaCardinal;
-   ossimString theLeverArmLx;
-   ossimString theLeverArmLy;
-   ossimString theLeverArmLz;
-   ossimString theShiftValuesX;
-   ossimString theShiftValuesY;
-   ossimString theShiftValuesZ;
-   ossimString theSbetField;
-
-   ossimString theMappingFrameDatum;
-   ossimString theMappingFrameProjection;
-   ossimString theCentralMeridian;
-   ossimString theOriginLatitude;
-   ossimString theGridScaleFactor;
-   ossimString theFalseEasting;
-   ossimString theFalseNorthing;
-   ossimString theUtmZone;
-   ossimString theUtmHemisphere;
-
-   ossim_float64 theMinLat;
-   ossim_float64 theMinLon;
-   ossim_float64 theMaxLat;
-   ossim_float64 theMaxLon;
-   std::vector<ossimString> theRecordFormat;
-   std::vector< ossimRefPtr<ossimApplanixEORecord> > theApplanixRecordList;
-   std::map<ossimString, ossimRefPtr<ossimApplanixEORecord>, ossimStringLtstr> theRecordIdMap;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimAuxFileHandler.h b/include/ossim/support_data/ossimAuxFileHandler.h
deleted file mode 100644
index d28cbba..0000000
--- a/include/ossim/support_data/ossimAuxFileHandler.h
+++ /dev/null
@@ -1,230 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: SPADAC Inc
-//         Adaptd from the GDAL package hfa dataset
-// Description: This class provides some simple utilities for aux file.
-//
-//********************************************************************
-// $Id: ossimAuxFileHandler.h 2644 2011-05-26 15:20:11Z oscar.kramer $
-
-#ifndef ossimAuxFileHandler_HEADER
-#define ossimAuxFileHandler_HEADER
-
-#include <cstring>
-#include <cstdlib>
-#include <string>
-#include <iostream>
-#include <fstream>
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimString.h>
-
-#define EPT_u1	0
-#define EPT_u2	1
-#define EPT_u4	2
-#define EPT_u8	3
-#define EPT_s8	4
-#define EPT_u16	5
-#define EPT_s16	6
-#define EPT_u32	7
-#define EPT_s32	8
-#define EPT_f32	9
-#define EPT_f64	10
-#define EPT_c64	11
-#define EPT_c128 12
-
-class ossimFilename;
-class ossimAuxEntry;
-class ossimAuxType;
-class ossimAuxDictionary;
-
-class ossimAuxInfo{
-
-public:
-  ossimAuxInfo();
-
-  virtual ~ossimAuxInfo();   
-
-  FILE *fp;
-
-  ossim_uint32  nEndOfFile;
-  ossim_uint32	nRootPos;
-  ossim_uint32	nDictionaryPos;
-
-  ossim_int16	nEntryHeaderLength;
-  ossim_int32	nVersion;
-
-  ossimAuxEntry* m_Root;
-
-  ossimAuxDictionary*  m_Dictionary;
-  char* dictionaryData;
-};
-
-
-class ossimAuxEntry
-{
-  ossim_uint32	nFilePos;
-
-  ossimAuxInfo*   m_auxInfo;
-  ossimAuxEntry*  m_Parent;
-  ossimAuxEntry*  m_Prev;
-  ossimAuxEntry*  m_Next;
-  ossimAuxEntry*  m_Child;
-
-  ossim_uint32	  nNextPos;
-  ossim_uint32	  nChildPos;
-  
-  char	entryNodeName[64];
-  char	entryType[32];
-
-  ossimAuxType* m_Type;
-  ossim_uint32	nDataPos;
-  ossim_uint32	nDataSize;
-  char*  entryData;
-
-  void	     loadData();
-
-  int 	     getFieldValue(const char* auxFieldPath,
-                           char chReqType, void *reqReturn);
-
-public:
-  ossimAuxEntry( ossimAuxInfo* auxInfoIn, ossim_uint32 nPos,
-    ossimAuxEntry* parentIn, ossimAuxEntry* prevIn);
-
-  virtual     ~ossimAuxEntry();                
-
-  ossim_uint32	getFilePos() { return nFilePos; }
-
-  const char*   getName() { return entryNodeName; }
-  void          setName( const char *nodeName );
-
-  const char*   getType() { return entryType; }
-
-  char*  getData() { loadData(); return entryData; }
-  ossim_uint32	getDataPos() { return nDataPos; }
-  ossim_uint32	getDataSize() { return nDataSize; }
-
-  ossimAuxEntry*     getChild();
-  ossimAuxEntry*     getNext();
-  ossimAuxEntry*     getNamedChild( const char * name);
-
-  ossim_int16	  getIntField( const char * auxFieldPath);
-  const char*   getStringField( const char * auxFieldPath);
-
-};
-
-class ossimAuxField
-{
-public:
-  int		nBytes;
-
-  int		nItemCount;
-  char	chPointer; 	/* '\0', '*' or 'p' */
-  char	chItemType;	/* 1|2|4|e|... */
-
-  char	*itemObjectType; /* if chItemType == 'o' */
-  ossimAuxType* m_auxItemObjectType;
-
-  char** enumNames; /* normally NULL if not an enum */
-
-  char	*fieldName;
-
-  ossimAuxField();
-  ~ossimAuxField();
-
-  int 	extractInstValue( const char * auxField, int nIndexValue,
-    char *entryData, ossim_uint32 nDataOffset, int nDataSize,
-    char chReqType, void *reqReturn );
-
-  int		getInstCount( char * entryData, int nDataSize );
-
-  int   getInstBytes( char *entryData, int nDataSize );
-
-  const char* initialize( const char * fieldInput );
-
-  void completeDefn( ossimAuxDictionary * auxDict );
-};
-
-
-class ossimAuxType
-{
-public:
-  int		nBytes;
-  int		nFields;
-
-  ossimAuxField** m_auxFields;
-
-  char* auxTypeName;
-
-  ossimAuxType();
-  ~ossimAuxType();
-
-  const char* initialize( const char * typeInput);
-
-  void	completeDefn( ossimAuxDictionary * auxDict);
-
-  int		getInstBytes(char *entryData, int nDataSize );
-
-  int   extractInstValue( const char * auxField,
-    char *entryData, ossim_uint32 nDataOffset, int nDataSize,
-    char chReqType, void *reqReturn );
-};
-
-class ossimAuxDictionary
-{
-public:
-  int		nTypes;
-  int   nTypesMax;
-  ossimAuxType**  m_auxTypes;
-
-  ossimAuxDictionary(const char *auxDictStr);
-  ~ossimAuxDictionary();
-
-  ossimAuxType* findType( const char * name);
-  void          addType( ossimAuxType * type);
-
-  static int	  getItemSize( char chType);
-};
-
-
-class OSSIM_DLL ossimAuxFileHandler
-{
-public:
-
-
-  ossimAuxFileHandler();
-  virtual ~ossimAuxFileHandler();
-  /**
-  * @read .aux file
-  */
-  bool isAuxFile(const ossimFilename& file);
-
-  /**
-  * @open the file for reading
-  */
-  bool open(const ossimFilename& file);
-
-  /**
-  *  Reads a single record from a aux file.
-  *  Returns true if succesful. Returns false if EOF or error.
-  */
-  const ossimString& getProjectionName() const { return m_projName; }
-
-  const ossimString& getDatumName() const { return m_datumName; }
-
-  const ossimString& getUnitType() const { return m_unitsType; }
-
-private:
-
-  ossimAuxInfo* m_auxInfo;
-  ossimString m_projName;
-  ossimString m_datumName;
-  ossimString m_unitsType;
-};
-
-#endif  // #ifndef ossimAuxFileHandlerl_HEADER
diff --git a/include/ossim/support_data/ossimCcfInfo.h b/include/ossim/support_data/ossimCcfInfo.h
deleted file mode 100644
index bd0400e..0000000
--- a/include/ossim/support_data/ossimCcfInfo.h
+++ /dev/null
@@ -1,60 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: CCF Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-#ifndef ossimCcfInfo_HEADER
-#define ossimCcfInfo_HEADER
-
-#include <iosfwd>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/support_data/ossimInfoBase.h>
-#include <ossim/base/ossimFilename.h>
-
-class ossimNitfFile;
-
-/**
- * @brief NITF info class.
- *
- * Encapsulates the dumpnitf functionality.
- */
-class OSSIM_DLL ossimCcfInfo : public ossimInfoBase
-{
-public:
-   
-   /** default constructor */
-   ossimCcfInfo();
-
-   /** virtual destructor */
-   virtual ~ossimCcfInfo();
-
-   /**
-    * @brief open method.
-    *
-    * @param file File name to open.
-    *
-    * @return true on success false on error.
-    */
-   virtual bool open(const ossimFilename& file);
-   
-   /**
-    * Print method.
-    *
-    * @param out Stream to print to.
-    * 
-    * @return std::ostream&
-    */
-   virtual std::ostream& print(std::ostream& out) const;
-
-private:
-   ossimFilename theFile;
-};
-
-#endif /* End of "#ifndef ossimCcfInfo_HEADER" */
diff --git a/include/ossim/support_data/ossimDemHeader.h b/include/ossim/support_data/ossimDemHeader.h
deleted file mode 100644
index 3684e97..0000000
--- a/include/ossim/support_data/ossimDemHeader.h
+++ /dev/null
@@ -1,383 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Ken Melero
-//         Orginally written by Jamie Moyers (jmoyers at geeks.com)
-//         Adapted from the package KDEM.
-// Description: This class parses a DEM header.
-//
-//********************************************************************
-// $Id: ossimDemHeader.h 15309 2009-09-01 15:47:15Z dburken $
-
-#ifndef ossimDemHeader_HEADER
-#define ossimDemHeader_HEADER
-
-#include <string>
-#include <iosfwd>
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/support_data/ossimDemPoint.h>
-
-class ossimFilename;
-class ossimString;
-class ossimKeywordlist;
-
-class OSSIM_DLL ossimDemHeader
-{
-public:
-   
-   ossimDemHeader();
-   
-   friend OSSIM_DLL std::ostream& operator<<(std::ostream& s,
-                                             const ossimDemHeader& header);
-   friend OSSIM_DLL std::istream& operator>>(std::istream& s,
-                                             ossimDemHeader& header);
-
-   /**
-    * @brief open method that takes a file.
-    *
-    * @param file File name to open.
-    *
-    * @return true on success false on error.
-    */
-   bool open(const ossimFilename& file);
-
-   /**
-    * @brief open method that takes a stream.
-    *
-    * @param is The input stream to read from.
-    *
-    * @return stream
-    */
-   std::istream& open(std::istream& is);
-
-   /**
-    * Print method.
-    *
-    * @param out Stream to print to.
-    * 
-    * @return std::ostream&
-    */   
-   std::ostream& print(std::ostream& out) const;
-   
-   // Accessors
-
-   /*! Quadrangle name. */
-   std::string const& getQuadName() const;
-
-   /*! Free format desciptor field containing process information. */
-   std::string const& getProcessInfo () const;
-
-   /*!
-    *  SE geographic corner orderd as:
-    *  x == Longitude == SDDDMMSS.SSSS
-    *  (neg sign (s) right justified, no leading zeros,
-    *  plus sign (s) implied
-    */
-   double getSEGeoCornerX () const;
-
-   /*!
-    *  SE geographic corner orderd as:
-    *  y == Latitude == SDDMMSS.SSSS
-    *  (neg sign (s) right justified, no leading zeros,
-    *  plus sign (s) implied
-    */
-   double getSEGeoCornerY () const;
-
-   /*!
-    *  1 == Autocorrelation resample simple bilinear
-    *  2 == Manual profile GRIDEM simple bilinear
-    *  3 == DLG/hypsography CTOG 8-direction bilinear
-    *  4 == Interpolation from photogrammetic system contours DCASS 
-    *  4-direction bilinear
-    *  5 == DLG/hypsography LINETRACE, LT4X complex linear
-    *  6 == DLG/hypsography CPS-3, ANUDEM, GRASS complex polynomial
-    *  7 == Electronic imaging (non-photogrammetric), active or passive
-    *  sensor systems
-    */
-   ossim_int32 getProcessCode () const;
-
-   /*!
-    *  Used for 30 minute DEMs - Identifies 1:100,000 scale sections
-    *  Formatted as XNN, wher X is "S" == 7.5 min. & "F" == 15 min.
-    *  NN is a two digit sequence number
-    */
-   std::string const& getSectionIndicator() const;
-
-   /*!
-    *  Mapping Center origin code. "EMC","WMC","MCMC","RMMC","FS" and "GPM2"
-    */
-   std::string const& getMappingCenterCode() const;
-
-   /*!
-    *  1 == DEM-1
-    *  2 == DEM-2
-    *  3 == DEM-3
-    */
-   ossim_int32 getLevelCode() const;
-
-   /*!
-    *  1 == Regular
-    *  2 == Random (reserved for future use).
-    */
-   ossim_int32 getElevPattern() const;
-
-   /*!
-    *  Code defining ground planimetric reference system.
-    *  0 == Geographic
-    *  1 == UTM
-    *  2 == State Plane
-    */
-   ossim_int32 getGroundRefSysCode() const;
-
-   /*!
-    * @return The projection type as a string.
-    */
-   ossimString getProjectionType() const;
-
-   /*!
-    *  Code defining zone in ground planimetric reference system.
-    */
-   ossim_int32 getGroundRefSysZone() const;
-
-   /*!
-    *  Code defining unit of measure for ground planimetric coordinates
-    *  used throughout the file.
-    *  0 == Radians
-    *  1 == Feet
-    *  2 == Meters
-    *  3 == Arc Seconds
-    */
-   ossim_int32 getGroundRefSysUnits() const;
-
-   /*!
-    *  Code defining unit of measure for elevation coordinates used
-    *  throughout the file.
-    *  1 == Feet
-    *  2 == Meters
-    */
-   ossim_int32 getElevationUnits() const;
-
-   /*!
-    *  Set n == 4
-    */
-   ossim_int32 getNumPolySides() const;
-
-   /*!
-    *  The coordinates of the quadrangle corners are ordered in a clockwise
-    *  direction beginning with the southwest corner.
-    */
-   const ossimDemPointVector& getDEMCorners() const;
-
-   /*!
-    *  In Radians the counterclockwise angle from the primary axis of ground
-    *  planimetric reference to the primary axis of the DEM local reference
-    *  system. Set to 0 to align with the coordinate system
-    */
-   double getCounterclockAngle() const;
-
-   /*!
-    *  0 == unknown accuracy
-    *  1 == accuracy info is given in logical record type C
-    */
-   ossim_int32 getElevAccuracyCode() const;
-
-   /*!
-    *  Minimum elevation in the DEM.
-    */
-   double getMinimumElev() const;
-
-   /*!
-    *  Maximum elevation in the DEM.
-    */
-   double getMaximumElev() const;
-
-   double getSpatialResX() const;
-   double getSpatialResY() const;
-   double getSpatialResZ() const;
-
-   /*!
-    *  The number of rows and columns in profiles in the DEM. 
-    *  NOTE: When profile rows == 1, profile columns is the number of profiles
-    *  in the DEM.
-    */
-   ossim_int32 getProfileRows() const;
-   ossim_int32 getProfileColumns() const;      
-
-   /*!
-    *  Present only if two or more primary intervals exist (level 2 DEM's only)
-    */
-   ossim_int32 getLargeContInt() const;
-
-   /*!
-    *  0 == NA
-    *  1 == feet
-    *  2 == meters
-    *  (level two DEM's only)
-    */
-   ossim_int32 getMaxSourceUnits() const;
-
-   /*!
-    *  Smallest or only primary contour interval (level 2 DEM's only)
-    */
-   ossim_int32 getSmallContInt() const;
-
-   /*!
-    *  1 == feet
-    *  2 == meters
-    */
-   ossim_int32 getMinSourceUnits() const;
-
-   /*!
-    *  YYY
-    */
-   ossim_int32 getSourceDate() const;
-
-   /*!
-    *  YYY
-    */
-   ossim_int32 getInspRevDate() const;
-
-   /*!
-    *  "I" indicates all processes of part3, Quality Control have been
-    *  performed.
-    */
-   std::string const& getInspFlag() const;
-
-   /*!
-    *  0 == No Validation
-    *  1 == RSME computed from test points, no quantative test or interactive
-    *       editing/review
-    *  2 == Batch process water body edit and RSME computed from test points
-    *  3 == Review and edit, including water edit. No RSME computed from test
-    *       points
-    *  4 == Level 1 DEM's reviewed & edited. RSME computed from test points
-    *  5 == Level 2 & 3 DEM's reviewed & edited. RSME computed from test points
-    */
-   ossim_int32 getDataValFlag() const;
-
-   /*!
-    *  0 == none
-    *  1 == suspect areas
-    *  2 == void areas
-    *  3 == suspect & void areas
-    */
-   ossim_int32 getSuspectVoidFlag() const;
-
-   /*!
-    *  1 == local mean sea level
-    *  2 == National Geodetic Vertical Datum 1929
-    *  3 == North American Vertical Datum 1988
-    */
-   ossim_int32 getVertDatum() const;
-
-   /*!
-    *  1 == North Amercian Datum 1927 (NAD 27)
-    *  2 == World Geoditic System 1972 (WGS 72)
-    *  3 == WGS 84
-    *  4 == NAD 83
-    *  5 == Old Hawaii Datum
-    *  6 == Puerto Rico Datum
-    */
-   ossim_int32 getHorizDatum() const;
-
-   /**
-    * @return The ossim datum code as a string.
-    */
-   ossimString getHorizDatumCode() const;
-
-   /*!
-    *  01-99 Primarily a DMA specfic field. (For USGS use set to 01)
-    */
-   ossim_int32 getDataEdition() const;
-
-   /*!
-    *  Contains the percentage of nodes in the file set to void
-    */
-   ossim_int32 getPerctVoid() const;
-
-   /*!
-    *  West edge match status flag
-    */
-   ossim_int32 getWestEdgeFlag() const;
-
-   /*!
-    *  North edge match status flag
-    */
-   ossim_int32 getNorthEdgeFlag() const;
-
-   /*!
-    *  East edge match staus flag
-    */
-   ossim_int32 getEastEdgeFlag() const;
-
-   /*!
-    *  South edge match status flag
-    */
-   ossim_int32 getSouthEdgeFlag() const;
-
-   /*!
-    *  Vertical datum shift - value is in the form of SFFF.DD Value is
-    *  the average shift value for the four quadrangle corners obtained
-    *  from program VERTCOM.
-    */
-   double getVertDatumShift() const;
-
-   /*!
-    * Populates keyword list with geometry info.
-    * 
-    * @return true on success, false on error.
-    */
-   bool getImageGeometry(ossimKeywordlist& kwl,
-                         const char* prefix=NULL) const;
-	 
-private:
-
-   std::string _quadName;
-   std::string _processInfo;
-   double _seGeoCornerX;
-   double _seGeoCornerY;
-   ossim_int32 _processCode;
-   std::string _sectionIndicator;
-   std::string _mapCenterCode;
-   ossim_int32 _levelCode;
-   ossim_int32 _elevPattern;
-   ossim_int32 _groundRefSysCode;
-   ossim_int32 _groundRefSysZone;
-   ossim_int32 _groundRefSysUnits;
-   ossim_int32 _elevUnits;
-   ossim_int32 _numPolySides;
-   ossimDemPointVector _demCorners;
-   double _counterclockAngle;
-   ossim_int32 _elevAccuracyCode;
-   double _minElevation;
-   double _maxElevation;
-   double _spatialResX;
-   double _spatialResY;
-   double _spatialResZ;
-   ossim_int32 _profileRows;
-   ossim_int32 _profileColumns;
-   ossim_int32 _largeContInt;
-   ossim_int32 _maxSourceUnits;
-   ossim_int32 _smallContInt;
-   ossim_int32 _minSourceUnits;
-   ossim_int32 _sourceDate;
-   ossim_int32 _inspRevDate;
-   std::string _inspFlag;
-   ossim_int32 _valFlag;
-   ossim_int32 _suspectVoidFlg;
-   ossim_int32 _vertDatum;
-   ossim_int32 _horizDatum;
-   ossim_int32 _dataEdition;
-   ossim_int32 _perctVoid;
-   ossim_int32 _westEdgeFlag;
-   ossim_int32 _northEdgeFlag;
-   ossim_int32 _eastEdgeFlag;
-   ossim_int32 _southEdgeFlag;
-   double _vertDatumShift;
-};
-
-#endif  // #ifndef ossimDemHeader_HEADER
diff --git a/include/ossim/support_data/ossimDemInfo.h b/include/ossim/support_data/ossimDemInfo.h
deleted file mode 100644
index 43acf98..0000000
--- a/include/ossim/support_data/ossimDemInfo.h
+++ /dev/null
@@ -1,58 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: USGS DEM Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-#ifndef ossimDemInfo_HEADER
-#define ossimDemInfo_HEADER
-
-#include <iosfwd>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/support_data/ossimInfoBase.h>
-
-/**
- * @brief USGS DEM info class.
- *
- * Encapsulates the dumpnitf functionality.
- */
-class OSSIM_DLL ossimDemInfo : public ossimInfoBase
-{
-public:
-   
-   /** default constructor */
-   ossimDemInfo();
-
-   /** virtual destructor */
-   virtual ~ossimDemInfo();
-
-   /**
-    * @brief open method.
-    *
-    * @param file File name to open.
-    *
-    * @return true on success false on error.
-    */
-   virtual bool open(const ossimFilename& file);
-   
-   /**
-    * Print method.
-    *
-    * @param out Stream to print to.
-    * 
-    * @return std::ostream&
-    */
-   virtual std::ostream& print(std::ostream& out) const;
-
-private:
-   ossimFilename theFile;
-};
-
-#endif /* End of "#ifndef ossimDemInfo_HEADER" */
diff --git a/include/ossim/support_data/ossimDemProfile.h b/include/ossim/support_data/ossimDemProfile.h
deleted file mode 100644
index 6e957c5..0000000
--- a/include/ossim/support_data/ossimDemProfile.h
+++ /dev/null
@@ -1,96 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Ken Melero
-//         Orginally written by Jamie Moyers (jmoyers at geeks.com)
-//         Adapted from the package KDEM.
-// Description: This class defines a DEM profile.
-//
-//********************************************************************
-// $Id: ossimDemProfile.h 9094 2006-06-13 19:12:40Z dburken $
-
-#ifndef ossimDemProfile_HEADER
-#define ossimDemProfile_HEADER
-
-#include <vector>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/support_data/ossimDemPoint.h>
-
-typedef std::vector<ossim_int32> ossimDemElevationVector;
-
-class ossimDemProfile
-{
-public:
-
-   ossimDemProfile();
-   ossimDemProfile(ossimDemProfile const& right);
-   ossimDemProfile const& operator=(ossimDemProfile const& right);
-
-   friend std::ostream& operator<<(std::ostream& s, ossimDemProfile& demp);
-   friend std::istream& operator>>(std::istream& s, ossimDemProfile& demp);
-
-   // Accessors
-
-   /*!
-    *  Row identification number. Typically set to 1.
-    */
-   ossim_int32 getRowNumber() const;
-
-   /*!
-    *  Column identification number. This is the profile sequence number.
-    */
-   ossim_int32 getColumnNumber() const;
-
-   /*!
-    *  Number of elevations in this profile.
-    */
-   ossim_int32 getNumberOfElevations() const;
-
-   /*!
-    *  Location (in ground planimetric coordinates) of the first
-    */
-   ossimDemPoint const& getProfileLocation() const;
-
-   /*!
-    *  Elevation of local datum for the profile.
-    *  Value is in units of measure given by the Elevation Units field
-    *  found in the DEM header.
-    */
-   double getLocalDatumElevation() const;
-
-   /*!
-    *  Minimum elevation for this profile.
-    */
-   double getMinimumElev() const;
-
-   /*!
-    *  Maximum elevation for this profile.
-    */
-   double getMaximumElev() const;
-
-   /*!
-   *  Elevation values.
-   *  From the DEM standard:
-   *  "A value in this array would be multiplied by the spatial resolution
-   *  value and added to the elevation of the local elevation datum for the
-   *  element profile to obtain the elevation for the point."
-   */
-   ossimDemElevationVector const& getElevations() const;
-
-private:
-
-   ossim_int32 _row;
-   ossim_int32 _column;
-   ossim_int32 _numberElevations;
-   ossimDemPoint _profileLocation;
-   double _locDatumElev;
-   double _minElev;
-   double _maxElev;
-   ossimDemElevationVector _elevations;
-};
-
-#endif  // #ifndef ossimDemProfile_HEADER
diff --git a/include/ossim/support_data/ossimDemStats.h b/include/ossim/support_data/ossimDemStats.h
deleted file mode 100644
index f678e74..0000000
--- a/include/ossim/support_data/ossimDemStats.h
+++ /dev/null
@@ -1,88 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Ken Melero
-//         Orginally written by Jamie Moyers (jmoyers at geeks.com)
-//         Adapted from the package KDEM.
-// Description: This class provides some statistics for DEMs.
-//
-//********************************************************************
-// $Id: ossimDemStats.h 7174 2005-01-11 18:10:38Z dburken $
-
-#ifndef ossimDemStats_HEADER
-#define ossimDemStats_HEADER
-
-#include <iostream>
-
-class ossimDemStats
-{
-public:
-
-   ossimDemStats();
-   ~ossimDemStats();
-
-   friend std::ostream& operator<<(std::ostream& s,
-                                   ossimDemStats const& stats);
-   friend std::istream& operator>>(std::istream& s, ossimDemStats& stats);
-
-   //Accessors
-
-   /*!
-    *  1 = available
-    *  2 = unavailable
-    *  The code defines the availability of statics
-    */
-   long getAvailCodeDE2() const;
-
-   long getRSMEDE2x () const;
-
-   long getRSMEDE2y () const;
-
-   long getRSMEDE2z () const;
-
-   /*!
-    *  This code defines the sample size use
-    *  to compute the accuracy, if 0 then the
-    *  accuracy is estimated.
-    */
-   long getSampleSizeDE2() const;
-
-   /*!
-    *  1 = available
-    *  2 = unavailable
-    *  The code defines the availability of statics
-    */
-   long getAvailCodeDE5() const;
-
-   long getRSMEDE5x () const;
-
-   long getRSMEDE5y () const;
-
-   long getRSMEDE5z () const;
-	
-   /*!
-    *  This code defines the sample size use
-    *  to compute the accuracy, if 0 then the
-    *  accuracy is estimated.
-    */
-   long getSampleSizeDE5() const;
-
-private:
-
-   long _availCodeDE2;
-   long _rsmeDE2x;
-   long _rsmeDE2y;
-   long _rsmeDE2z;
-   long _sampleSizeDE2;
-   long _availCodeDE5;
-   long _rsmeDE5x;
-   long _rsmeDE5y;
-   long _rsmeDE5z;
-   long _sampleSizeDE5;
-};
-
-#endif // #ifndef ossimDemStats_HEADER
diff --git a/include/ossim/support_data/ossimDemUtil.h b/include/ossim/support_data/ossimDemUtil.h
deleted file mode 100644
index de8053b..0000000
--- a/include/ossim/support_data/ossimDemUtil.h
+++ /dev/null
@@ -1,82 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Ken Melero
-//         Orginally written by Jamie Moyers (jmoyers at geeks.com)
-//         Adapted from the package KDEM.
-// Description: This class provides some simple utilities for DEMs.
-//
-//********************************************************************
-// $Id: ossimDemUtil.h 15307 2009-09-01 15:41:07Z dburken $
-
-#ifndef ossimDemUtil_HEADER
-#define ossimDemUtil_HEADER
-
-#include <cstring>
-#include <cstdlib>
-#include <string>
-#include <iostream>
-#include <fstream>
-
-class ossimFilename;
-
-class ossimDemUtil
-{
-public:
-
-   /**
-    * @brief Does basic sanity checks to see if file is a dem.
-    *
-    * 1) Check extension for .dem
-    *
-    * 2) Look for file.omd (ossim meta data) file containing keyword
-    *    "dem_type" with value of "usgs_dem".
-    *
-    * 3) Check 512 bytes and make sure there is no binary data.
-    *
-    * @note
-    * There is a keyword list template stored in the templates directory:
-    * "ossim/etc/templates/usgs_dem_template.kwl"
-    *
-    * @param file The file to check.
-    *
-    * @return true on success, false on error.
-    */
-   static bool isUsgsDem(const ossimFilename& file);
-
-   /**
-    *  Reads a single record from a DEM.
-    *  Returns true if succesful. Returns false if EOF or error.
-    */
-   static bool getRecord(std::istream& s, std::string& strbuf, long reclength = 1024);
-
-   /**
-    *  Same as getRecord above. buf should be at least reclength+1 in size.
-    */
-   static bool getRecord(std::istream& s, char* buf, long reclength = 1024);
-
-   static long getLong(char* const strbuf, // string to extract long from
-                       long const startpos,  // starting position of field
-                       long const width)     // width of field
-      {
-         char temp[1024];
-         strncpy(temp,strbuf+startpos,width);
-         temp[width] = '\0';
-         return atol(temp);
-      }
-
-   static bool getDouble(std::string const& strbuf, // string to extract double from
-                         long const startpos,  // starting position of field
-                         long const width,     // width of field
-                         double& val);         // value extracted from field.
-
-private:
-
-   ossimDemUtil();
-};
-
-#endif  // #ifndef ossimDemUtil_HEADER
diff --git a/include/ossim/support_data/ossimDoqq.h b/include/ossim/support_data/ossimDoqq.h
deleted file mode 100644
index 0365617..0000000
--- a/include/ossim/support_data/ossimDoqq.h
+++ /dev/null
@@ -1,126 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Ken Melero
-//
-// Description: This class parses a Digital Ortho Quarter Quad (DOQQ)
-//              header.
-//
-//********************************************************************
-// $Id: ossimDoqq.h 19900 2011-08-04 14:19:57Z dburken $
-
-#ifndef ossimDoqq_HEADER
-#define ossimDoqq_HEADER
-
-//#include <iostream>
-#include <stdlib.h>
-#include <stdio.h>
-#include <fstream>
-#include <iostream>
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/support_data/ossimInfoBase.h>
-
-class OSSIM_DLL ossimDoqq : public ossimInfoBase
-{
-public:
-   ossimDoqq();
-   ossimDoqq(ossimFilename file);
-   ~ossimDoqq();
-   
-   enum ossimErrorStatus
-   {
-      OSSIM_OK    = 0,
-      OSSIM_ERROR = 1
-   };
-
-   enum
-   {
-      GSD_X_OFFSET            = 59,
-      GSD_Y_OFFSET            = 59,
-      DATA_ORDER_OFFSET       = 142,      
-      LINE_OFFSET             = 145,
-      SAMPLE_OFFSET           = 151,
-      PROJECTION_OFFSET       = 196,
-      RGB_OFFSET              = 157,
-      UL_EASTING_OFFSET       = 288,
-      UL_NORTHING_OFFSET      = 312,
-      UTM_ZONE_OFFSET         = 199,
-      DATUM_OFFSET            = 168,
-
-      DATA_ORDER_SIZE         = 3,
-      LINE_SIZE               = 8,
-      SAMPLE_SIZE             = 8,  
-      PROJECTION_SIZE         = 3,
-      RGB_SIZE                = 3,
-      MARKING_U_SIZE          = 5,
-      MARKING_V_SIZE          = 5,
-      UL_EASTING_SIZE         = 24,
-      UL_NORTHING_SIZE        = 24,
-      UTM_ZONE_SIZE           = 6,
-      DATUM_SIZE              = 2,
-      RADIOMETRY_SIZE         = 3,
-      GSD_SIZE              = 12
-   };
-
-   //! Implementation of ossimInfoBase class pure virtual.
-   virtual bool open(const ossimFilename& file);
-
-   //! Implementation of ossimInfoBase class pure virtual.
-   virtual std::ostream& print(std::ostream& out) const;
-
-   ossimString theProjection;
-   ossimString theDatum;
-   ossimString theQuadName;
-   ossimString theQuad;
-   ossimString theNation;
-   ossimString theState;
-   ossimString theDataOrder;
-   ossimString theMarkU;
-   ossimString theMarkV;
-   ossimString theImageSource;
-   ossimString theSourceImageID;
-
-   ossim_int32 theUtmZone;
-   ossim_int32 theLine;
-   ossim_int32 theSample;
-   ossim_int32 theRgb;
-
-   ossimString theAcqYear;
-   ossimString theAcqMonth;
-   ossimString theAcqDay;
-   ossimString theAcqYearMonthDay;
-
-   ossim_float64 theRMSE;
-
-   ossim_float64   theEasting;
-   ossim_float64   theNorthing;
-   ossim_float64   theUN;
-   ossim_float64   theUE;
-   ossim_float64   theLN;
-   ossim_float64   theLE;
-   ossimDpt        theGsd;
-   ossim_int32     theHeaderSize;
-   ossim_int32     theRecordSize;
-
-   ossim_int32 errorStatus() const { return theErrorStatus; }
-   
-private:
-
-   std::ifstream           theDoqFile;
-   ossimErrorStatus   theErrorStatus;
-   
-   ossim_float64 convertStr(const char* str) const;
-
-   void ldstr_v1(std::istream& in);
-   void ldstr_v2(std::istream& in);
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimDtedAcc.h b/include/ossim/support_data/ossimDtedAcc.h
deleted file mode 100644
index 89feb32..0000000
--- a/include/ossim/support_data/ossimDtedAcc.h
+++ /dev/null
@@ -1,134 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Ken Melero
-// 
-// Description:  This class gives access to the Accuracy Description
-//               (ACC) of a DTED Level 1 file.
-//
-//********************************************************************
-// $Id: ossimDtedAcc.h 16104 2009-12-17 18:09:59Z gpotts $
-
-#ifndef ossimDtedAcc_H
-#define ossimDtedAcc_H
-#include <iosfwd>
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimErrorStatusInterface.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimRefPtr.h>
-
-class ossimProperty;
-
-class OSSIM_DLL ossimDtedAcc : public ossimErrorStatusInterface
-{
-public:
-   ossimDtedAcc(const ossimFilename& dted_file="", ossim_int32 offset=0);
-   ossimDtedAcc(std::istream& in);
-   enum
-   {
-      ACC_LENGTH = 2700,
-      ACC_ABSOLUTE_CE = 4,
-      ACC_ABSOLUTE_LE = 8,
-      ACC_RELATIVE_CE = 12,
-      ACC_RELATIVE_LE = 16,
-      ACC_RESERVED_1 = 20,
-      ACC_RESERVED_2 = 24,
-      ACC_RESERVED_3 = 25,
-      ACC_MULTIPLE_FLAG = 56,
-      ACC_RESERVED = 58,
-      FIELD1_SIZE           = 3,
-      FIELD2_SIZE           = 4,
-      FIELD3_SIZE           = 4,
-      FIELD4_SIZE           = 4,
-      FIELD5_SIZE           = 4,
-      FIELD6_SIZE           = 4,
-      FIELD7_SIZE           = 1,
-      FIELD8_SIZE           = 31,
-      FIELD9_SIZE           = 2,
-      FIELD10_SIZE          = 4,
-      FIELD11_SIZE          = 4,
-      FIELD12_SIZE          = 4,
-      FIELD13_SIZE          = 4,
-      FIELD14_SIZE          = 2,
-      FIELD15_SIZE          = 9,
-      FIELD16_SIZE          = 10,
-      FIELD17_SIZE          = 18,
-      FIELD18_SIZE          = 69
-   };
-
-   // The Recoginition Sentinel signifies if the ACC record exists.
-
-   ossim_int32 absCE() const;
-   ossim_int32 absLE() const;
-   ossim_int32 relCE() const;
-   ossim_int32 relLE() const;
-   
-   ossim_int32 startOffset() const;
-   ossim_int32 stopOffset()  const;
-   
-   friend OSSIM_DLL std::ostream& operator<<( std::ostream& os,
-                                              const ossimDtedAcc& acc);
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out String to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
-    * "nitf.file_name:"
-    * @return output stream.
-    */
-   std::ostream& print(std::ostream& out,
-                       const std::string& prefix) const;
-   
-   void parse(std::istream& in);
-
-   void clearFields();
-
-   /**
-    * @brief Gets a property for name.
-    * @param name Property name to get.
-    * @return ossimRefPtr<ossimProperty> Note that this can be empty if
-    * property for name was not found.
-    */
-   ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-
-   /**
-    * @brief Adds this class's properties to list.
-    * @param propertyNames list to append to.
-    */
-   void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-private:
-   // Do not allow...
-   ossimDtedAcc(const ossimDtedAcc& source);
-   const ossimDtedAcc& operator=(const ossimDtedAcc& rhs);
-
-   
-   char theRecSen[FIELD1_SIZE+1];
-   char theAbsoluteCE[FIELD2_SIZE+1];
-   char theAbsoluteLE[FIELD3_SIZE+1];
-   char theRelativeCE[FIELD4_SIZE+1];
-   char theRelativeLE[FIELD5_SIZE+1];
-   char theField6[FIELD6_SIZE+1];
-   char theField7[FIELD7_SIZE+1];
-   char theField8[FIELD8_SIZE+1];
-   char theField9[FIELD9_SIZE+1];
-   char theField10[FIELD10_SIZE+1];
-   char theField11[FIELD11_SIZE+1];
-   char theField12[FIELD12_SIZE+1];
-   char theField13[FIELD13_SIZE+1];
-   char theField14[FIELD14_SIZE+1];
-   char theField15[FIELD15_SIZE+1];
-   char theField16[FIELD16_SIZE+1];
-   char theField17[FIELD17_SIZE+1];
-   
-   ossim_int32 theStartOffset;
-   ossim_int32 theStopOffset;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimDtedDsi.h b/include/ossim/support_data/ossimDtedDsi.h
deleted file mode 100644
index 2cc9b99..0000000
--- a/include/ossim/support_data/ossimDtedDsi.h
+++ /dev/null
@@ -1,237 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Ken Melero
-// 
-// Description:  This class gives access to the Data Set Identification
-//               (DSI) of a DTED Level 1 file.
-//
-//********************************************************************
-// $Id: ossimDtedDsi.h 16104 2009-12-17 18:09:59Z gpotts $
-
-#ifndef ossimDtedDsi_H
-#define ossimDtedDsi_H
-#include <iosfwd>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimErrorStatusInterface.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimRefPtr.h>
-
-class ossimProperty;
-
-class OSSIM_DLL ossimDtedDsi : public ossimErrorStatusInterface
-{
-public:
-   ossimDtedDsi(const ossimFilename& dted_file="", ossim_int32 offset=0);
-   ossimDtedDsi(std::istream& in);
-
-   enum
-   {
-      DSI_LENGTH = 648,
-      DSI_SECURITY_CODE = 4,
-      DSI_SECURITY_CONTROL = 5,
-      DSI_SECURITY_HANDLING = 7,
-      DSI_RESERVED_1 = 34,
-      DSI_DMA_SERIES = 60,
-      DSI_RESERVED_2 = 65,
-      DSI_RESERVED_3 = 80,
-      DSI_DATA_EDITION = 88,
-      DSI_MATCH_MERGE_VERSION = 90,
-      DSI_MAINTENANCE_DATE = 91,
-      DSI_MATCH_MERGE_DATE = 95,
-      DSI_MAINTENANCE_CODE = 99,
-      DSI_PRODUCER_CODE = 103,
-      DSI_RESERVED_4 = 111,
-      DSI_PRODUCT_SPEC_STOCK_NUMBER = 127, 
-      DSI_PRODUCT_SPEC_NUMBER = 136,
-      DSI_PRODUCT_SPEC_DATE = 138,
-      DSI_VERTICAL_DATUM = 142,
-      DSI_HORIZ_DATUM = 145,
-      DSI_DIGITIZING_SYSTEM = 150,
-      DSI_COMPILATION_DATE = 160,
-      DSI_RESERVED_5 = 164,
-      DSI_LAT_ORIGIN = 186,
-      DSI_LON_ORIGIN = 195,
-      DSI_LAT_SW = 205,
-      DSI_LON_SW = 212,
-      DSI_LAT_NW = 220,
-      DSI_LON_NW = 227,
-      DSI_LAT_NE = 235,
-      DSI_LON_NE = 242,
-      DSI_LAT_SE = 250,
-      DSI_LON_SE = 257,
-      DSI_ORIENTATION = 265,
-      DSI_LAT_INTERVAL = 274,
-      DSI_LON_INTERVAL = 278,
-      DSI_NUM_LAT_LINES = 282,
-      DSI_NUM_LON_LINES = 286,
-      DSI_PARTIAL_CELL_INDICATOR = 290,
-      DSI_RESERVED = 292,
-      FIELD1_SIZE           = 3,
-      FIELD2_SIZE           = 1,
-      FIELD3_SIZE           = 2,
-      FIELD4_SIZE           = 27,
-      FIELD5_SIZE           = 26,
-      FIELD6_SIZE           = 5,
-      FIELD7_SIZE           = 15,
-      FIELD8_SIZE           = 8,
-      FIELD9_SIZE           = 2,
-      FIELD10_SIZE          = 1,
-      FIELD11_SIZE          = 4,
-      FIELD12_SIZE          = 4,
-      FIELD13_SIZE          = 4,
-      FIELD14_SIZE          = 8,
-      FIELD15_SIZE          = 16,
-      FIELD16_SIZE          = 9,
-      FIELD17_SIZE          = 2,
-      FIELD18_SIZE          = 4,
-      FIELD19_SIZE          = 3,
-      FIELD20_SIZE          = 5,
-      FIELD21_SIZE          = 10,
-      FIELD22_SIZE          = 4,
-      FIELD23_SIZE          = 22,
-      FIELD24_SIZE          = 9,
-      FIELD25_SIZE          = 10,
-      FIELD26_SIZE          = 7,
-      FIELD27_SIZE          = 8,
-      FIELD28_SIZE          = 7,
-      FIELD29_SIZE          = 8,
-      FIELD30_SIZE          = 7,
-      FIELD31_SIZE          = 8,
-      FIELD32_SIZE          = 7,
-      FIELD33_SIZE          = 8,
-      FIELD34_SIZE          = 9,
-      FIELD35_SIZE          = 4,
-      FIELD36_SIZE          = 4,
-      FIELD37_SIZE          = 4,
-      FIELD38_SIZE          = 4,
-      FIELD39_SIZE          = 2,
-      FIELD40_SIZE          = 101,
-      FIELD41_SIZE          = 100,
-      FIELD42_SIZE          = 156
-   };
-
-   // The Recognition Sentinel signifies if the DSI record exists.
-   ossimString recognitionSentinel() const;
-
-   ossimString securityCode()           const;
-   ossimString productLevel()           const;
-   ossimString edition()                const;
-   ossimString matchMergeVersion()      const;
-   ossimString maintanenceDate()        const;
-   ossimString matchMergeDate()         const;
-   ossimString maintenanceCode()        const;
-   ossimString producerCode()           const;
-   ossimString productStockSpecNumber() const;
-   ossimString productSpecNumber()      const;
-   ossimString productSpecDate()        const;
-   ossimString verticalDatum()          const;
-   ossimString horizontalDatum()        const;
-   ossimString compilationDate()        const;
-   ossimString latOrigin()              const;
-   ossimString lonOrigin()              const;
-   ossimString latSW()                  const;
-   ossimString lonSW()                  const;
-   ossimString latNW()                  const;
-   ossimString lonNW()                  const;
-   ossimString latNE()                  const;
-   ossimString lonNE()                  const;
-   ossimString latSE()                  const;
-   ossimString lonSE()                  const;
-
-   ossimString orientation()    const;
-   ossimString latInterval()    const;
-   ossimString lonInterval()    const;
-   ossim_int32 numLatPoints()   const;
-   ossim_int32 numLonLines()    const;
-   ossim_int32 cellIndicator()  const;
-   ossim_int32 startOffset()    const;
-   ossim_int32 stopOffset()     const;
-   
-   friend OSSIM_DLL std::ostream& operator<<( std::ostream& os,
-                                              const ossimDtedDsi& dsi);
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out String to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
-    * "nitf.file_name:"
-    * @return output stream.
-    */
-   std::ostream& print(std::ostream& out,
-                       const std::string& prefix) const;   
-   
-   void parse(std::istream& in);
-
-   /**
-    * @brief Gets a property for name.
-    * @param name Property name to get.
-    * @return ossimRefPtr<ossimProperty> Note that this can be empty if
-    * property for name was not found.
-    */
-   ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   
-   /**
-    * @brief Adds this class's properties to list.
-    * @param propertyNames list to append to.
-    */
-   void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-private:
-   // Do not allow...
-   ossimDtedDsi(const ossimDtedDsi& source);
-   const ossimDtedDsi& operator=(const ossimDtedDsi& rhs);
-
-   
-   char theRecSen[FIELD1_SIZE+1];
-   char theSecurityCode[FIELD2_SIZE+1];
-   char theField3[FIELD3_SIZE+1];
-   char theField4[FIELD4_SIZE+1];
-   char theProductLevel[FIELD6_SIZE+1];
-   char theField7[FIELD7_SIZE+1];
-   char theField8[FIELD8_SIZE+1];
-   char theEdition[FIELD9_SIZE+1];
-   char theMatchMergeVersion[FIELD10_SIZE+1];
-   char theMaintenanceDate[FIELD11_SIZE+1];
-   char theMatchMergeDate[FIELD12_SIZE+1];
-   char theMaintenanceCode[FIELD13_SIZE+1];
-   char theProducerCode[FIELD14_SIZE+1];
-   char theField15[FIELD15_SIZE+1];
-   char theProductStockSpecNumber[FIELD16_SIZE+1];
-   char theProductSpecNumber[FIELD17_SIZE+1];
-   char theProductSpecDate[FIELD18_SIZE+1];
-   char theVerticalDatum[FIELD19_SIZE+1];
-   char theHorizontalDatum[FIELD20_SIZE+1];
-   char theField21[FIELD21_SIZE+1];
-   char theCompilationDate[FIELD22_SIZE+1];
-   char theField23[FIELD23_SIZE+1];
-   char theLatOrigin[FIELD24_SIZE+1];
-   char theLonOrigin[FIELD25_SIZE+1];
-   char theLatSW[FIELD26_SIZE+1];
-   char theLonSW[FIELD27_SIZE+1];
-   char theLatNW[FIELD28_SIZE+1];
-   char theLonNW[FIELD29_SIZE+1];
-   char theLatNE[FIELD30_SIZE+1];
-   char theLonNE[FIELD31_SIZE+1];
-   char theLatSE[FIELD32_SIZE+1];
-   char theLonSE[FIELD33_SIZE+1];
-   char theOrientation[FIELD34_SIZE+1];
-   char theLatInterval[FIELD35_SIZE+1];
-   char theLonInterval[FIELD36_SIZE+1];
-   char theNumLatPoints[FIELD37_SIZE+1];
-   char theNumLonLines[FIELD38_SIZE+1];
-   char theCellIndicator[FIELD39_SIZE+1];
-   char theField40[FIELD40_SIZE+1];
-   char theField41[FIELD41_SIZE+1];
-   char theField42[FIELD42_SIZE+1];
-   
-   ossim_int32       theStartOffset;
-   ossim_int32       theStopOffset;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimDtedHdr.h b/include/ossim/support_data/ossimDtedHdr.h
deleted file mode 100644
index ed05c40..0000000
--- a/include/ossim/support_data/ossimDtedHdr.h
+++ /dev/null
@@ -1,127 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Ken Melero
-// 
-// Description:  This class gives access to the File Header Label
-//               (HDR) of a DTED Level 1 file.
-//
-//********************************************************************
-// $Id: ossimDtedHdr.h 16104 2009-12-17 18:09:59Z gpotts $
-
-#ifndef ossimDtedHdr_H
-#define ossimDtedHdr_H
-#include <iosfwd>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimErrorStatusInterface.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimRefPtr.h>
-
-class ossimProperty;
-
-class OSSIM_DLL ossimDtedHdr : public ossimErrorStatusInterface
-{
-public:
-   ossimDtedHdr(const ossimFilename& dted_file="", ossim_int32 offset=0);
-   ossimDtedHdr(std::istream& in);
-
-   enum
-   {
-      HDR_LENGTH            = 80,
-      HDR_ONE_LABEL_1       =  4,
-      HDR_FILENAME          =  5,
-      HDR_UNIVAC            = 22,
-      HDR_REEL              = 28,
-      HDR_FILE_NUM          = 32,
-      HDR_GENERATION_NUM    = 36,
-      HDR_VERSION_NUM       = 40,
-      HDR_CREATION_DATE     = 42,
-      HDR_EXPIRATION_DATE   = 48,
-      HDR_ACCESS            = 54,
-      HDR_BLOCK_COUNT       = 55,
-      HDR_QUALIFIER         = 61,
-      HDR_BLANKS            = 74,
-      FIELD1_SIZE           = 3,
-      FIELD2_SIZE           = 1,
-      FIELD3_SIZE           = 17,
-      FIELD4_SIZE           = 6,
-      FIELD5_SIZE           = 4,
-      FIELD6_SIZE           = 4,
-      FIELD7_SIZE           = 4,
-      FIELD8_SIZE           = 2,
-      FIELD9_SIZE           = 6,
-      FIELD10_SIZE          = 6,
-      FIELD11_SIZE          = 1,
-      FIELD12_SIZE          = 6,
-      FIELD13_SIZE          = 13,
-      FIELD14_SIZE          = 7
-   };
-
-   // The Recognition Sentinel signifies if the HDR record exists.
-   ossimString recognitionSentinel() const;
-
-   ossimString fileName()     const;
-   ossimString version()      const;
-   ossimString creationDate() const;
-   ossim_int32 startOffset()  const;
-   ossim_int32 stopOffset()   const;
-
-   friend OSSIM_DLL std::ostream& operator<<( std::ostream& os,
-                                              const ossimDtedHdr& hdr);
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out String to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
-    * "nitf.file_name:"
-    * @return output stream.
-    */
-   std::ostream& print(std::ostream& out,
-                       const std::string& prefix) const;
-
-   void parse(std::istream& in);
-
-   /**
-    * @brief Gets a property for name.
-    * @param name Property name to get.
-    * @return ossimRefPtr<ossimProperty> Note that this can be empty if
-    * property for name was not found.
-    */
-   ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-
-   /**
-    * @brief Adds this class's properties to list.
-    * @param propertyNames list to append to.
-    */
-   void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   
-private:
-   // Do not allow...
-   ossimDtedHdr(const ossimDtedHdr& source);
-   const ossimDtedHdr& operator=(const ossimDtedHdr& rhs);
-   
-   char theRecSen[FIELD1_SIZE+1];
-   char theField2[FIELD2_SIZE+1];
-   char theFilename[FIELD3_SIZE+1];
-   char theField4[FIELD4_SIZE+1];
-   char theField5[FIELD5_SIZE+1];
-   char theField6[FIELD6_SIZE+1];
-   char theVersion[FIELD7_SIZE+1];
-   char theCreationDate[FIELD8_SIZE+1];
-   char theField9[FIELD9_SIZE+1];
-   char theField10[FIELD10_SIZE+1];
-   char theField11[FIELD11_SIZE+1];
-   char theField12[FIELD12_SIZE+1];
-   char theField13[FIELD13_SIZE+1];
-   char theField14[FIELD14_SIZE+1];
-   
-   ossim_int32 theStartOffset;
-   ossim_int32 theStopOffset;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimDtedInfo.h b/include/ossim/support_data/ossimDtedInfo.h
deleted file mode 100644
index bfd535b..0000000
--- a/include/ossim/support_data/ossimDtedInfo.h
+++ /dev/null
@@ -1,77 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: DTED Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-#ifndef ossimDtedInfo_HEADER
-#define ossimDtedInfo_HEADER
-
-#include <iosfwd>
-#include <vector>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/support_data/ossimInfoBase.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimRefPtr.h>
-
-class ossimNitfFile;
-class ossimProperty;
-
-/**
- * @brief DTED Info class.
- *
- * Encapsulates the dtedInfo functionality.
- */
-class OSSIM_DLL ossimDtedInfo : public ossimInfoBase
-{
-public:
-   
-   /** default constructor */
-   ossimDtedInfo();
-
-   /** virtual destructor */
-   virtual ~ossimDtedInfo();
-
-   /**
-    * @brief open method.
-    *
-    * @param file File name to open.
-    *
-    * @return true on success false on error.
-    */
-   virtual bool open(const ossimFilename& file);
-   
-   /**
-    * Print method.
-    *
-    * @param out Stream to print to.
-    * 
-    * @return std::ostream&
-    */
-   virtual std::ostream& print(std::ostream& out) const;
-
-   /**
-    * @brief Gets a property for name.
-    * @param name Property name to get.
-    * @return ossimRefPtr<ossimProperty> Note that this can be empty if
-    * property for name was not found.
-    */
-   ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   
-   /**
-    * @brief Adds this class's properties to list.
-    * @param propertyNames list to append to.
-    */
-   void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-private:
-   ossimFilename theFile;
-};
-
-#endif /* End of "#ifndef ossimDtedInfo_HEADER" */
diff --git a/include/ossim/support_data/ossimDtedRecord.h b/include/ossim/support_data/ossimDtedRecord.h
deleted file mode 100644
index 9772b23..0000000
--- a/include/ossim/support_data/ossimDtedRecord.h
+++ /dev/null
@@ -1,164 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Ken Melero
-// 
-// Description:  This class gives access to the Data Record Description
-//               of a DTED Level 1 file.
-//
-// Notes:  Each elevation is a true value referenced to meas sea level
-//         (MSL) datum recorded to the nearest meter.  The horizontal
-//         position is referenced to precise longitude-latitiude
-//         locations in terms of the current World Geodetic System
-//         (WGS84) determined for each file by reference to the origin
-//         at the southwest corner.  The elevations are evenly spaced
-//         in latitude and longitude at the interval designated in the
-//         User Header Label (UHL) in South to North profile sequence.
-//
-//********************************************************************
-// $Id: ossimDtedRecord.h 14248 2009-04-08 19:38:11Z dburken $
-#ifndef ossimDtedRecord_H
-#define ossimDtedRecord_H
-#include <iosfwd>
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimErrorStatusInterface.h>
-
-class OSSIM_DLL ossimDtedRecord : public ossimErrorStatusInterface
-{
-public:
-   ossimDtedRecord(std::istream& in,
-                   ossim_int32 offest,
-                   ossim_int32 num_points);
-   // NOTE:  When using this class be sure that as you cycle through
-   //        all the points within a record, that you verify they are
-   //        sequential.  According to the DTED Specification
-   //        (MIL-PRF-89020A) issued in 19 April 1996, page 22 all
-   //        records must be sequential.  If not, file may be corrupt.
-   //
-   //        To verify this, you can do the following:
-   //
-   //        int count = 0;
-   //        for(int i = 0; i < num_lon_lines; i++)
-   //          rec[i] = new ossimDtedRecord(theFileDesc, offset,
-   //                       num_lat_points);
-   //          if(count != (rec[i]->dataBlockCount() + 1))
-   //             ERROR -- Records are not sequential
-   //          count = rec[i]->dataBlockCount();
-
-   ~ossimDtedRecord();
-   
-   enum
-   {
-      DATA_LENGTH = 12,
-      DATA_BLOCK_COUNT = 2,
-      DATA_LON_COUNT = 4,
-      DATA_LAT_COUNT = 6,
-      DATA_ELEV_START = 8,
-      DATA_BYTES_PER_POINT = 2,
-   };
-
-   // The Recognition Sentinel signifies if the Data Record exists.
-   ossimString recognitionSentinel() const;
-
-   ossim_int32  dataBlockCount()   const;
-   ossim_int32  lonCount()         const;
-   ossim_int32  latCount()         const;
-   ossim_uint32 checkSum()         const;
-   ossim_uint32 computedCheckSum() const;
-   ossim_int32  numPoints()        const;
-
-   // Access methods for the elevation data
-   ossim_int32   getPoint(ossim_int32 i)     const;
-   ossim_uint16  getPointData(ossim_int32 i) const;
-   ossim_int32*  points()                    const;
-   ossim_uint16* pointsData()                const;
-   
-   ossim_int32 startOffset() const;
-   ossim_int32 stopOffset()  const;
-
-   friend OSSIM_DLL std::ostream& operator<<( std::ostream& os,
-                                              const ossimDtedRecord& rec);
-   void parse(std::istream& in);
-
-private:
-   // prevent use
-   ossimDtedRecord(const ossimDtedRecord& source);
-
-   ossim_int32  theFile;
-
-   /*!
-    * 252 (8 bit)
-    */
-   ossimString theRecSen;
-
-   /*!
-    *  Sequential count of the block within the file.
-    */
-   ossim_int32  theDataBlockCount;
-
-   /*!
-    *  Count of the meridian.
-    *  True longitude = longitude count x data interval + origin
-    *  (Offset from the SW corner longitude)
-    */
-   ossim_int32  theLonCount;
-
-   /*!
-    *  Count of the parallel.
-    *  True latitude = latitude count x data interval + origin
-    *  (Offset from the SW corner latitude)
-    */
-   ossim_int32  theLatCount;
-
-   /*!
-    *  Algebraic addition of contents of block.
-    *  The checksum is computed algebraically using integer arithmetic by
-    *  summing all header and elevation bytes contained int the record as
-    *  8-bit values.  Each byte is considered an unsigned, 8-bit value for
-    *  checksum calculation.
-    */
-   ossim_uint32  theCheckSum;
-
-   /*!
-    *  All the elevation points in a Data Record as ints.
-    *  (ie. all the latitudal points in a longitudinal line)
-    */
-   ossim_int32* thePoints;
-
-   /*!
-    *  All the elevation points in a Data Record as unsigned shorts.
-    *  (ie. all the latitudal points in a longitudinal line)
-    */
-   ossim_uint16* thePointsData;
-
-   /*!
-    *  Our computed check sum.  This should match the checksum
-    *  at the end of the Data Record.
-    */
-   ossim_uint32  theComputedCheckSum;
-
-   /*!
-    *  The number of points in a longitudinal line.
-    */
-   ossim_int32  theNumPoints;
-
-   ossim_int32  theStartOffset;
-   ossim_int32  theStopOffset;
-
-   /*!
-    *  Compute the check sum for the Data Record and compare against
-    *  the parsed check sum from the data record. This must be correct
-    *  to be a valid data record. If not, there is a chance of a
-    *  corrupted elevation cell.
-    *
-    *  @return true if check sum validates, false if not.
-    */
-   bool validateCheckSum(std::istream& in);
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimDtedUhl.h b/include/ossim/support_data/ossimDtedUhl.h
deleted file mode 100644
index e219f74..0000000
--- a/include/ossim/support_data/ossimDtedUhl.h
+++ /dev/null
@@ -1,130 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Ken Melero
-// 
-// Description:  This class gives access to the User Header Label
-//               (UHL) of a DTED Level 1 file.
-//
-//********************************************************************
-// $Id: ossimDtedUhl.h 16104 2009-12-17 18:09:59Z gpotts $
-#ifndef ossimDtedUhl_H
-#define ossimDtedUhl_H
-#include <iosfwd>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimErrorStatusInterface.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimRefPtr.h>
-
-class ossimProperty;
-
-class OSSIM_DLL ossimDtedUhl : public ossimErrorStatusInterface
-{
-public:
-   ossimDtedUhl(const ossimFilename& dted_file="", ossim_int32 offset=0);
-   ossimDtedUhl(std::istream& in);
-
-   enum
-   {
-      UHL_LENGTH        = 80,
-      UHL_LON_ORIGIN    =  5,
-      UHL_LAT_ORIGIN    = 13,
-      UHL_LON_INTERVAL  = 21,
-      UHL_LAT_INTERVAL  = 25,
-      UHL_ABSOLUTE_LE   = 29,
-      UHL_SECURITY_CODE = 33,
-      UHL_REFERENCE_NUM = 33,
-      UHL_NUM_LON_LINES = 48,
-      UHL_NUM_LAT_LINES = 52,
-      UHL_MULTIPLE_ACC  = 56,
-      UHL_RESERVED      = 57,
-      FIELD1_SIZE       = 3,
-      FIELD2_SIZE       = 1,
-      FIELD3_SIZE       = 8,
-      FIELD4_SIZE       = 8,
-      FIELD5_SIZE       = 4,
-      FIELD6_SIZE       = 4,
-      FIELD7_SIZE       = 4,
-      FIELD8_SIZE       = 3,
-      FIELD9_SIZE       = 12,
-      FIELD10_SIZE      = 4,
-      FIELD11_SIZE      = 4,
-      FIELD12_SIZE      = 1,
-      FIELD13_SIZE      = 24
-   };
-   
-   // The Recognition Sentinel signifies if the UHL record exists.
-   ossimString recognitionSentinel() const;
-
-   double      lonOrigin()        const;
-   double      latOrigin()        const;
-   double      lonInterval()      const;
-   double      latInterval()      const;
-   double      absoluteLE()       const;
-   ossimString securityCode()     const;
-   ossim_int32 numLonLines()      const;
-   ossim_int32 numLatPoints()     const;
-   ossim_int32 mulitpleAccuracy() const;
-   ossim_int32 startOffset()      const;
-   ossim_int32 stopOffset()       const;
-   
-   friend OSSIM_DLL std::ostream& operator<<( std::ostream& out,
-                                              const ossimDtedUhl& uhl);
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out String to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
-    * "nitf.file_name:"
-    * @return output stream.
-    */
-   std::ostream& print(std::ostream& out,
-                       const std::string& prefix) const;
-
-   void parse(std::istream& in);
-
-   /**
-    * @brief Gets a property for name.
-    * @param name Property name to get.
-    * @return ossimRefPtr<ossimProperty> Note that this can be empty if
-    * property for name was not found.
-    */
-   ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-
-   /**
-    * @brief Adds this class's properties to list.
-    * @param propertyNames list to append to.
-    */
-   void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   
-private:
-   // Do not allow...
-   ossimDtedUhl(const ossimDtedUhl& source);
-   const ossimDtedUhl& operator=(const ossimDtedUhl& rhs);
-
-   double degreesFromString(const char* str) const;
-   double spacingFromString(const char* str) const;
-   
-   char theRecSen[FIELD1_SIZE+1];
-   char theField2[FIELD2_SIZE+1];
-   char theLonOrigin[FIELD3_SIZE+1];
-   char theLatOrigin[FIELD4_SIZE+1];
-   char theLonInterval[FIELD5_SIZE+1];
-   char theLatInterval[FIELD6_SIZE+1];
-   char theAbsoluteLE[FIELD7_SIZE+1];
-   char theSecurityCode[FIELD8_SIZE+1];
-   char theField9[FIELD9_SIZE+1];
-   char theNumLonLines[FIELD10_SIZE+1];
-   char theNumLatPoints[FIELD11_SIZE+1];
-   char theMultipleAccuracy[FIELD12_SIZE+1];
-   
-   ossim_int32 theStartOffset;
-   ossim_int32 theStopOffset;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimDtedVol.h b/include/ossim/support_data/ossimDtedVol.h
deleted file mode 100644
index f2ed39a..0000000
--- a/include/ossim/support_data/ossimDtedVol.h
+++ /dev/null
@@ -1,109 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Ken Melero
-// 
-// Description:  This class gives access to the Volume Header Label
-//               (VOL) of a DTED Level 1 file.
-//
-//********************************************************************
-// $Id: ossimDtedVol.h 16104 2009-12-17 18:09:59Z gpotts $
-
-#ifndef ossimDtedVol_H
-#define ossimDtedVol_H
-
-#include <iosfwd>
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimErrorStatusInterface.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimRefPtr.h>
-
-class ossimProperty;
-
-class OSSIM_DLL ossimDtedVol : public ossimErrorStatusInterface
-{
-public:
-   ossimDtedVol(const ossimFilename& dted_file="",
-                ossim_int32 offset=0);
-   ossimDtedVol(std::istream& in);
-
-   enum
-   {
-      VOL_LENGTH            = 80,
-      VOL_ONE_LABEL_1       =  4,
-      VOL_REEL_NUMBER       =  5,
-      VOL_REEL_ACCESS       = 11,
-      VOL_SPACE             = 12,
-      VOL_ACCOUNT_NUMBER    = 38,
-      VOL_BLANKS            = 52,
-      VOL_ONE_LABEL_2       = 80,
-      FIELD1_SIZE           = 3,
-      FIELD2_SIZE           = 1,
-      FIELD3_SIZE           = 6,
-      FIELD4_SIZE           = 1,
-      FIELD5_SIZE           = 26,
-      FIELD6_SIZE           = 14,
-      FIELD7_SIZE           = 28,
-      FIELD8_SIZE           = 1
-   };
-   
-   // The Recognition Sentinel signifies if the VOL record exists.
-   ossimString getRecognitionSentinel() const;
-   ossimString getReelNumber()           const;
-   ossimString getAccountNumber()        const;
-   ossim_int32 startOffset()             const;
-   ossim_int32 stopOffset()              const;
-   
-   friend OSSIM_DLL std::ostream& operator<<( std::ostream& os,
-                                              const ossimDtedVol& vol);
-   
-   void parse(std::istream& in);
-
-   /**
-    * @brief Gets a property for name.
-    * @param name Property name to get.
-    * @return ossimRefPtr<ossimProperty> Note that this can be empty if
-    * property for name was not found.
-    */
-   ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-
-   /**
-    * @brief Adds this class's properties to list.
-    * @param propertyNames list to append to.
-    */
-   void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out String to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
-    * "nitf.file_name:"
-    * @return output stream.
-    */
-   std::ostream& print(std::ostream& out,
-                       const std::string& prefix) const;
-private:
-   // Do not allow...
-   ossimDtedVol(const ossimDtedVol& source);
-   const ossimDtedVol& operator=(const ossimDtedVol& rhs);
-
-   char theRecSen[FIELD1_SIZE+1];
-   char theField2[FIELD2_SIZE+1];
-   char theReelNumber[FIELD3_SIZE+1];
-   char theField4[FIELD4_SIZE+1];
-   char theField5[FIELD5_SIZE+1];
-   char theAccountNumber[FIELD6_SIZE+1];
-   char theField7[FIELD7_SIZE+1];
-   char theField8[FIELD8_SIZE+1];
-  
-   ossim_int32 theStartOffset;
-   ossim_int32 theStopOffset;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimEnviHeader.h b/include/ossim/support_data/ossimEnviHeader.h
deleted file mode 100644
index 7199f0b..0000000
--- a/include/ossim/support_data/ossimEnviHeader.h
+++ /dev/null
@@ -1,415 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  David Burken
-//
-// Description:
-// 
-// Class for reading and writing an ENVI (The Environment for Visualizing
-// Images) header file.  This parses envi header and places in a keyword
-// list.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimEnviHeader.h 22356 2013-08-05 13:47:11Z gpotts $
-
-#ifndef ossimEnviHeader_HEADER
-#define ossimEnviHeader_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimReferenced.h>
-#include <iosfwd>
-
-/**
- * Class for reading and writing an ENVI (The Environment for Visualizing
- * Images) header file.
- */
-class OSSIM_DLL ossimEnviHeader : public ossimReferenced
-{
-public:
-   /** default construtor */
-   ossimEnviHeader();
-
-   /** virtual destructor */
-   virtual ~ossimEnviHeader();
-
-   virtual void reset();
-
-   /** @return Const reference to map. */
-   const ossimKeywordlist& getMap() const;
-   
-   /** @return Reference to map. */
-   ossimKeywordlist& getMap();
-
-   /**
-    * @brief Gets value for key.
-    * @param key To search for.
-    * @param value Initialized by this.
-    * @return true on success, false on error. This will return true if key is
-    * found, even if value is empty.
-    */
-   bool getValue( const ossimString& key, ossimString& value ) const;
-
-   /**
-    * @brief Gets value for key.
-    * @param key
-    * @param value
-    * @return true if key is in map even if value is empty; false, if not.
-    */
-   bool findCaseInsensitive( const ossimString& key,
-                             ossimString& value ) const;
-
-   /**
-    * @brief Gets value for key.
-    * @param key
-    * @param value
-    * @return true if key is in map even if value is empty; false, if not.
-    */
-   bool findSubStringCaseInsensitive( const ossimString& key,
-                                      ossimString& value) const;
-
-   /**
-    * Opens an envi header.
-    * 
-    * @return true on success, false on error.
-    */
-   bool open(const ossimFilename& file);
-
-   /**
-    * Writes header to file in a standard envi format.
-    *
-    * @param file File to write to.
-    *
-    * @return true on success, false on error.
-    */
-   bool writeFile(const ossimFilename& file);
-   
-   /**
-    * Prints header to out in a standard envi format.
-    *
-    * @param out Stream to write to.
-    *
-    * @return Reference to the stream passed.
-    */
-   std::ostream& print(std::ostream& out) const;
-
-   /** @brief friend operator<< */
-   friend OSSIM_DLL std::ostream& operator<<(std::ostream& out,
-                                             const ossimEnviHeader& obj);
-
-   /**
-    * @return The description of the file.
-    */
-   ossimString getDescription() const;
-
-   /**
-    * @param description The description of the file.
-    */
-   void setDescription(const ossimString& description);
-
-   /**
-    * @return The number of samples.
-    */
-   ossim_uint32 getSamples() const;
-
-   /**
-    * Sets the number of samples.
-    * 
-    * @param samples The number of samples.
-    */
-   void setSamples(ossim_uint32 samples);
-
-   /**
-    * @return The number of lines.
-    */
-   ossim_uint32 getLines() const;
-
-   /**
-    * Sets the number of lines.
-    * 
-    * @param lines The number of lines.
-    */
-   void setLines(ossim_uint32 lines);
-
-   /**
-    * @return The number of bands.
-    */
-   ossim_uint32 getBands() const;
-
-   /**
-    * Sets the number of bands.
-    * 
-    * @param bands The number of bands.
-    */
-   void setBands(ossim_uint32 bands);
-
-   /**
-    * @brief Gets default bands if "default bands" keyword is present.
-    * @param bands Initialized by this.
-    * @return true on success, false if keyword not found. "bands" will be
-    * zeroed out on failure. 
-    */
-   bool getDefaultBands( std::vector<ossim_uint32>& bands ) const;
-
-   /**
-    * @brief Gets rgb bands if "wavelength" keyword is present.
-    * @param bands Initialized by this.
-    * @return true on success, false if keyword not found.  "bands" will be
-    * zeroed out on failure.
-    */   
-   bool getRgbBandsFromWaveLength( std::vector<ossim_uint32>& bands ) const;
-
-   /**
-    * @return The number of header offset in bytes.
-    */
-   ossim_uint32 getHeaderOffset() const;
-
-   /**
-    * Sets the header offset in bytes.
-    * 
-    * @param headerOffset The number of header offset in bytes.
-    */
-   void setHeaderOffset(ossim_uint32 headerOffset);
-
-   /**
-    * @return The file type
-    */
-   ossimString getFileType() const;
-
-   /**
-    * Sets the file type.
-    * 
-    * @param fileType The sensor type as a string.
-    */
-   void setFileType(const ossimString& fileType);
-
-   /**
-    * @return The envi data type..
-    */
-   ossim_uint32 getDataType() const;
-
-   /**
-    * @return The ossimScalarType from the envi data type..
-    */
-   ossimScalarType getOssimScalarType() const;
-
-   /**
-    * Sets the envi data type based on the ossimScalarType.
-    * 
-    * @param scalar The ossimScalarType of the image.
-    */
-   void setDataType(ossimScalarType scalar);
-
-   /**
-    * @return The envi interleave type.
-    */
-   ossimString getInterleaveType() const;
-
-   /**
-    * @return The ossimInterleaveType from the envi interleave..
-    */
-   ossimInterleaveType getOssimInterleaveType() const;
-
-   /**
-    * Sets the envi interleave type string based on the ossimInterleaveType.
-    * 
-    * @param interleave The ossimInterleaveType of the image.
-    */
-   void setInterleaveType(ossimInterleaveType interleave);
-
-   /**
-    * @return The sensor type..
-    */
-   ossimString getSensorType() const;
-
-   /**
-    * Sets the envi sensor type string.
-    * 
-    * @param sensorType The sensor type as a string.
-    */
-   void setSensorType(const ossimString& sensorType);
-
-   /**
-    * @return If key "byte order" found returns the envi byte order; else,
-    * system byte order.  
-    *
-    * @note (Same as the ossimByteOrder enumeration):
-    * 0 = LITTLE_ENDIAN,
-    * 1 = BIG_ENDIAN
-    */
-   ossimByteOrder getByteOrder() const;
-   
-   /**
-    * Sets the envi byte order from the ossimByteOrder.
-    * 
-    * @param byteorder The ossimByteOrder of the image.
-    */
-   void setByteorder(ossimByteOrder byteOrder);
-   
-   /**
-    * @return The x start.
-    */
-   ossim_int32 getXStart() const;
-   
-   /**
-    * Sets the x start.
-    * 
-    * @param xStart
-    */
-   void setXStart(ossim_int32 xstart);
-   
-   /**
-    * @return The x start.
-    */
-   ossim_int32 getYStart() const;
-   
-   /**
-    * Sets the y start.
-    * 
-    * @param ystart
-    */
-   void setYStart(ossim_int32 ystart);
-
-   /**
-    * @return The envi map info string.
-    */
-   ossimString getMapInfo() const;
-
-   /**
-    * Sets the envi map info string.
-    * 
-    * @param mapInfo envi map info string.
-    */
-   void setMapInfo(const ossimString& mapInfo);
-
-   /**
-    * Sets the envi map info string from a keyword list containing geometry
-    * information.
-    * 
-    * @param kwl Keyword list containing geometry information.
-    */
-   void setMapInfo(const ossimKeywordlist& kwl,  const char* prefix=0);
-
-   /**
-    * @return The env wavelength units..
-    */
-   ossimString getWavelengthUnits() const;
-
-   /**
-    * Sets the envi wavelength units string.
-    * 
-    * @param wavelengthUnits envi wavelength units string.
-    */
-   void setWavelengthUnits(const ossimString& wavelenghtUnits);
-
-   /**
-    * @param bandNames Vector of strings to initialize with band names.
-    */
-   void getBandNames(std::vector<ossimString>& bandNames) const;
-
-   /**
-    * Sets the band name string vector.
-    * 
-    * @param bandNames Vector of band name strings.
-    */
-   void setBandNames(const std::vector<ossimString>& bandNames);
-
-   /**
-    * @param wavelengths Vector of strings to initialize with wave lengths.
-    */
-   void getWavelengths(std::vector<ossimString>& wavelengths) const;
-
-   /**
-    * Sets the envi band name string.
-    * 
-    * @param wavelengths Vector of band name strings.
-    */
-   void setWavelengths(const std::vector<ossimString>& wavelengths);
-
-   /**
-    * Method to the load (recreate) the state of the object from a keyword
-    * list.
-    *
-    * @param kwl Keyword list to initialize from.
-    *
-    * @param prefix Usually something like: "object1."
-    *
-    * @return This method will alway return true as it is intended to be
-    * used in conjuction with the set methods.
-    *
-    * Keywords picked up by loadState:
-    * 
-    * description: My_file
-    *
-    * number_samples: 1024
-    *
-    * number_lines: 512
-    *
-    * number_bands: 3
-    *
-    * header_offset: 0
-    *
-    * file_type: ENVI Standard
-    *
-    * data_type: 1
-    *
-    * interleave_type: bil
-    *
-    * sensor_type:  Unknown
-    *
-    * (little_endian or big_endian)
-    * byte_order: little_endian
-    * 
-    * map_info: Unkown
-    *
-    * wavelength_units: 
-    *
-    * band_name0: Red band
-    * band_name1: Green band
-    * band_name2: Blue band
-    *
-    * wavelength0:  620.25
-    * wavelength1:  514.5
-    * wavelength2:  470.0
-    */
-   bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-
-   /**
-    * @brief Global method to test first line of file for "ENVI".
-    * @return true on success, false on error.
-    */
-   static bool isEnviHeader( const ossimFilename& file );
-
-   /**
-    * @brief Global method to test first line of stream for "ENVI".
-    * @return true on success, false on error.
-    */
-   static bool isEnviHeader( std::istream& in );
-
-   /** @return Path to envi header file. */
-   const ossimFilename& getFile() const;
-   
-private:
-
-   /**
-    * @brief Check band list to see if any are outside of range of bands.
-    * Bands should be zero base.
-    * @return true if all bands are less than number of bands; false, if
-    * outside range or if "bands" key is not found.
-    */
-   bool rangeCheckBands( const std::vector<ossim_uint32>& bands ) const;
-
-   /**
-    * @brief Parses stream.
-    * @return true on success, false on error.
-    */
-   bool readStream(std::istream& in);
-   
-   ossimFilename       m_file; // Name of header file.
-   ossimKeywordlist    m_keywords;
-};
-#endif /* #ifndef ossimEnviHeader_HEADER */
-
diff --git a/include/ossim/support_data/ossimEnviInfo.h b/include/ossim/support_data/ossimEnviInfo.h
deleted file mode 100644
index 3de69f0..0000000
--- a/include/ossim/support_data/ossimEnviInfo.h
+++ /dev/null
@@ -1,54 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: ENVI Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-#ifndef ossimEnviInfo_HEADER
-#define ossimEnviInfo_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/support_data/ossimInfoBase.h>
-#include <ossim/base/ossimFilename.h>
-
-/** @brief ENVI info class. */
-class OSSIM_DLL ossimEnviInfo : public ossimInfoBase
-{
-public:
-   
-   /** default constructor */
-   ossimEnviInfo();
-
-   /** virtual destructor */
-   virtual ~ossimEnviInfo();
-
-   /**
-    * @brief open method.
-    *
-    * @param file File name to open.
-    *
-    * @return true on success false on error.
-    */
-   virtual bool open(const ossimFilename& file);
-
-   /**
-    * Print method.
-    *
-    * @param out Stream to print to.
-    * 
-    * @return std::ostream&
-    */
-   virtual std::ostream& print(std::ostream& out) const;
-
-private:
-
-   ossimFilename m_file;
-};
-
-#endif /* End of "#ifndef ossimEnviInfo_HEADER" */
diff --git a/include/ossim/support_data/ossimFgdcTxtDoc.h b/include/ossim/support_data/ossimFgdcTxtDoc.h
deleted file mode 100644
index 19a603f..0000000
--- a/include/ossim/support_data/ossimFgdcTxtDoc.h
+++ /dev/null
@@ -1,129 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File ossimFgdcTxtDoc.h
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: ossimFgdcTxtDoc class declaration.
-//
-// FGDC = "Federal Geographic Data Committee"
-//
-// See: http://www.fgdc.gov/
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimFgdcTxtDoc.h 2673 2011-06-06 14:57:24Z david.burken $
-#ifndef ossimFgdcTxtDoc_HEADER
-#define ossimFgdcTxtDoc_HEADER 1
-
-#include <ossim/base/ossimReferenced.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/projection/ossimProjection.h>
-
-/**
- * @class ossimFgdcTxtDoc
- * @brief Support data container for FGDC in text format.
- *
- * Has minimum parse support to get Spatial_Reference_Information section to
- * extract projection information.
- *
- * TODO: Make an ossimFgdcBase and consolidate code from
- * ossimFgdcXmlDoc and this class. (drb - 15 Aug. 2011)
- */
-class OSSIM_DLL ossimFgdcTxtDoc : public ossimReferenced
-{
-public:
-
-   /** default constructor */
-   ossimFgdcTxtDoc();
-
-   /** virtual destructor */
-   virtual ~ossimFgdcTxtDoc();
-
-   /**
-    * @brief open method.
-    *
-    * @param file File name to open.
-    *
-    * @return true on success false on error.
-    */
-   bool open(const ossimFilename& file);
-
-   /**
-    * @brief Close method.
-    *
-    * This doesn't really do anything.  Here only because I think every open()
-    * should have a matching close().
-    */
-   void close();
-
-   /**
-    * @brief Gets projection from Spatial_Reference_Information block.
-    * @param proj Intialized by this method.  Set to null on projection cannot
-    * be created.
-    */   
-   void getProjection(ossimRefPtr<ossimProjection>& proj);
-
-   /**
-    * @brief Gets units from Altitude_Distance_Units.
-    * @return Units if found, OSSIM_UNIT_UNKNOWN if not.
-    */
-   void getAltitudeDistanceUnits(std::string& units) const;
-
-private:
-
-   /**
-    * @brief Gets projection from Spatial_Reference_Information block for
-    * version FGDC-STD-001-1998.
-    * @param str Stream to read from.
-    * @param proj Intialized by this method.  Set to null on projection cannot
-    * be created.
-    */ 
-   void getProjectionV1(std::ifstream& str,
-                        ossimRefPtr<ossimProjection>& proj);
-
-   /**
-    * @brief Finds key and returns true if present.
-    *
-    * Leaves stream at position of last getline.
-    * 
-    * @param str Stream to read from.
-    * @param key Key to find.
-    * @return true if present false if not.
-    */
-   bool findKey( std::ifstream& str, const std::string& key);
-
-   /**
-    * @brief Finds key and returns and intializes value if present.
-    *
-    * Stream position at end of call is dependent on seekBack flag.
-    * 
-    * @param str Stream to read from.
-    * @param seekBack If true the stream will be repositioned to original
-    * position at beginning of the call.
-    * @param key Key to find.
-    * @param value Intialized with value if key is found.
-    * @return true if present false if not.
-    */
-   bool findKey( std::ifstream& str,
-                 bool seekBack,
-                 const std::string& key,
-                 std::string& value);
-
-   /**
-    * Gets ossim datum string from fgdc datum string.
-    */
-   void getOssimDatum( const std::string& fgdcDatumString,
-                       std::string& ossimDatumCode ) const;
-
-   // Container for relevant data from FGDC file.
-   ossimRefPtr<ossimKeywordlist> m_kwl;
-   
-}; // End: class ossimFgdcTxtDoc
-
-#endif /* #ifndef ossimFgdcTxtDoc_HEADER */
diff --git a/include/ossim/support_data/ossimFgdcXmlDoc.h b/include/ossim/support_data/ossimFgdcXmlDoc.h
deleted file mode 100644
index a28896f..0000000
--- a/include/ossim/support_data/ossimFgdcXmlDoc.h
+++ /dev/null
@@ -1,188 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Mingjie Su
-//
-// Description: Utility class to encapsulate parsing projection info in the xml file.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimFgdcXmlDoc.h 2063 2011-01-19 19:38:12Z ming.su $
-#ifndef ossimFgdcXmlDoc_HEADER
-#define ossimFgdcXmlDoc_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimXmlDocument.h>
-#include <ossim/projection/ossimProjection.h>
-
-class ossimDatum;
-class ossimDrect;
-
-/** @brief Class for FGDC XML doc parsing. */
-class OSSIMDLLEXPORT ossimFgdcXmlDoc
-{
-public:
-   /** @brief default constructor */
-   ossimFgdcXmlDoc();
-   
-   /** @brief destructor */
-   ~ossimFgdcXmlDoc();
-
-   /**
-    * @brief Open method.
-    * @return true on success, false on error.
-    */
-   bool open(const ossimFilename& xmlFileName);
-
-   /** @return true if m_xmlDocument is open; false if not. */
-   bool isOpen() const;
-
-   /** @brief close method. */
-   void close();
-
-   /** @brief Gets projection from document. */
-   ossimRefPtr<ossimProjection> getProjection();
-
-   /** @return Unit type. Note meters is the default if not found in doc. */
-   ossimUnitType getUnitType() const;
-
-   /**
-    * @return text for path "/metadata/spref/horizsys/cordsysn/geogcsn"
-    */
-   bool getGeoCsn(ossimString& s) const;
-
-   /**
-    * @return text for path "/metadata/spref/horizsys/cordsysn/projcsn"
-    */
-   bool getProjCsn(ossimString& s) const;
-
-   /**
-    * @brief Get the Altitude Distance Units
-    *
-    * Path: "/metadata/spref/vertdef/altsys/altunits"
-    *
-    * Domain: "meters" "feet"
-    * 
-    * @return Text for path.
-    */
-   bool getAltitudeDistantUnits(ossimString& s) const;
-
-   /**
-    * @brief Get the Grid Coordinate system
-    *
-    * Path: "/metadata/spref/horizsys/planar/gridsys/gridsysn"
-    *
-    * @return Text for path.
-    */
-   bool getGridCoordinateSystem(ossimString& s) const;
-
-   /**
-    * @brief Gets projection from Grid Coordinate system node.
-    *
-    * Throws ossimException on error.
-    *
-    * @return Refptr with projection pointer.  Underlying pointer may be null.
-    */
-   ossimRefPtr<ossimProjection> getGridCoordSysProjection();
-
-   /**
-    * @brief Get the Grid Coordinate system
-    *
-    * Path: "/metadata/spref/horizsys/planar/gridsys/gridsysn"
-    *
-    * @return Text for path.
-    */
-   bool getHorizontalDatum(ossimString& s) const;
-
-   /**
-    * @brief Get the Planar Distant Units
-    * 
-    * Path: "/metadata/spref/horizsys/planar/planci/plandu"
-    *
-    * Domain: "meters" "international feet" "survey feet"
-    *
-    * @return Text for path.
-    */
-   bool getPlanarDistantUnits(ossimString& s) const;
-
-   /**
-    * @brief Get UTM false Northing.
-    * 
-    * Path: "/metadata/spref/horizsys/planar/gridsys/utm/transmer/fnorth"
-    *
-    * @return Text for path.
-    */
-   bool getUtmFalseNorthing(ossimString& s) const;
-   
-   /**
-    * @brief Get UTM zone.
-    * 
-    * Path: "/metadata/spref/horizsys/planar/gridsys/utm/utmzone"
-    *
-    * Domain: 1 <= UTM Zone Number <= 60 for the northern hemisphere;
-    * -60 <= UTM Zone Number <= -1 for the southern hemisphere
-     *
-    * @return Text for path.
-    */
-   bool getUtmZone(ossimString& s) const;
-
-   /**
-    * @brief Get Bands.
-    * 
-    * Path: "/metadata/spdoinfo/rastinfo/vrtcount"
-    *
-    * the maximum number of raster objects along the vertical (z) axis. 
-    * For use with rectangular volumetric raster objects (voxels). 
-     *
-    * @return int for path.
-    */
-   ossim_uint32 getNumberOfBands();
-
-    /**
-    * @brief Gets path from doc and initializes string.
-    *
-    * This method errors if multiple nodes are found for path.
-    * 
-    * @param path Xml path to look for.
-    * @param s String to initialize.
-    * @return true on success and false if path is not found or if there
-    * are more than one of path.
-    */
-   bool getPath(const ossimString& path, ossimString& s) const;
-
-   bool getImageSize(ossimIpt& size) const;
-
-private:
-
-   bool getXRes(ossim_float64& v) const;
-   
-   bool getYRes(ossim_float64& v) const;
-
-   void getBoundingBox(ossimDrect& rect) const;
-
-   /**
-    * @brief Gets path from doc and initializes string.
-    * @param path Xml path to look for.
-    * @param v Value to initialize.
-    * @return true on success and false if path is not found or if there
-    * are more than one of path.
-    */
-   bool getPath(const ossimString& path, ossim_float64& v) const;
-
-   /**
-    * Gets the ossimDatum from string.
-    */
-   const ossimDatum* createOssimDatum(const ossimString& s) const;
-   
-   ossimFilename                 m_xmlFilename;
-   ossimRefPtr<ossimXmlDocument> m_xmlDocument;
-   ossimRefPtr<ossimProjection>  m_projection;
-   mutable bool                  m_boundInDegree;
-};
-
-#endif /* matches: #ifndef ossimFgdcXmlDoc */
diff --git a/include/ossim/support_data/ossimIkonosMetaData.h b/include/ossim/support_data/ossimIkonosMetaData.h
deleted file mode 100644
index d6aae7b..0000000
--- a/include/ossim/support_data/ossimIkonosMetaData.h
+++ /dev/null
@@ -1,120 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Class declaration for ossimIkonosMetaData.
-// 
-// This class parses a Space Imaging Ikonos meta data file.
-//
-//********************************************************************
-// $Id: ossimIkonosMetaData.h 15828 2009-10-28 13:11:31Z dburken $
-
-#ifndef ossimIkonosMetaData_HEADER
-#define ossimIkonosMetaData_HEADER
-
-#include <iosfwd>
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimString.h>
-
-class ossimFilename;
-class ossimKeywordlist;
-
-
-class OSSIMDLLEXPORT ossimIkonosMetaData : public ossimObject
-{
-public:
-
-   /** @brief default constructor */
-   ossimIkonosMetaData();
-
-
-   /**
-    * @brief Open method that takes the image file, derives the metadata,
-    * header and rpc files, then calls parse methods parseMetaData,
-    * parseHdrData, and parseRpcData.
-    *
-    * @param imageFile Usually in the form of "po_2619900_pan_0000000.tif".
-    *
-    * @return true on success, false on error.
-    */
-   bool open(const ossimFilename& imageFile);
-
-   void clearFields();
-   
-   ossimString   getSensorID() const;
-
-   //---
-   // Convenient method to print important image info:
-   //---
-   virtual std::ostream& print(std::ostream& out) const;
-
-   /**
-    * Method to save the state of the object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix = 0) const;
-   
-   /**
-    * Method to the load (recreate) the state of the object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix = 0);
-
-   /**
-    * @brief Method to parse Ikonos metadata file.
-    *
-    * @param metadata File name usually in the form of
-    * "po_149875_metadata.txt."
-    *
-    * @return true on success, false on error.
-    */
-   bool parseMetaData(const ossimFilename& metadata);
-
-   /**
-    * @brief Method to parse Ikonos header file.
-    *
-    * @param metadata File name usually in the form of
-    * "po_149875_pan_0000000.hdr"
-    *
-    * @return true on success, false on error.
-    */
-   bool parseHdrData(const ossimFilename& data_file);
-
-   /**
-    * @brief Method to parse Ikonos rpc file.
-    *
-    * @param metadata File name usually in the form of
-    * "po_149875_pan_0000000_rpc.txt"
-    *
-    * @return true on success, false on error.
-    *
-    * @note Currently NOT implemented.
-    */
-   bool parseRpcData(const ossimFilename& data_file);
-
-protected:
-   /** virtual destructor */
-   virtual ~ossimIkonosMetaData();
-
-private:
-   ossim_float64 theNominalCollectionAzimuth;
-   ossim_float64 theNominalCollectionElevation;
-   ossim_float64 theSunAzimuth;
-   ossim_float64 theSunElevation;
-   ossim_uint32  theNumBands;
-   ossimString   theBandName;
-   ossimString   theProductionDate;
-   ossimString   theAcquisitionDate;
-   ossimString   theAcquisitionTime;
-   ossimString   theSensorID;
-   
-TYPE_DATA   
-};
-
-#endif /* #ifndef ossimIkonosMetaData_HEADER */
diff --git a/include/ossim/support_data/ossimInfoBase.h b/include/ossim/support_data/ossimInfoBase.h
deleted file mode 100644
index 30c1d23..0000000
--- a/include/ossim/support_data/ossimInfoBase.h
+++ /dev/null
@@ -1,83 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Base class for Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-#ifndef ossimInfoBase_HEADER
-#define ossimInfoBase_HEADER
-
-#include <iosfwd>
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimReferenced.h>
-
-class ossimFilename;
-class ossimKeywordlist;
-
-/**
- * @brief Info Base.
- *
- * This is the base class for all info objects.  The purpose of an Info object
- * is to dump whatever info is available for a given file name to user.
- */
-class OSSIM_DLL ossimInfoBase : public ossimReferenced
-{
-public:
-   
-   /** default constructor */
-   ossimInfoBase();
-
-
-   /**
-    * @brief open method.
-    *
-    * @param file File name to open.
-    *
-    * @return true on success false on error.
-    */
-   virtual bool open(const ossimFilename& file) = 0;
-
-   /**
-    * Print method.
-    *
-    * @param out Stream to print to.
-    * 
-    * @return std::ostream&
-    */
-   virtual std::ostream& print(std::ostream& out) const = 0;
-
-   /**
-    * @brief Sets the overview flag.
-    * @param flag If true overview info is processed also.
-    */
-   void setProcessOverviewFlag(bool flag);
-   
-   /**
-    * @brief Method to get the overview flag.
-    * @return The overview flag.
-    */
-   bool getProcessOverviewFlag() const;
-
-   /**
-    * @brief Method to dump info to a keyword list.
-    * @param kwl The keyword list to initialize.
-    * @return true on success, false on error.
-    */
-   virtual bool getKeywordlist(ossimKeywordlist& kwl)const;
-
-protected:
-   /** virtual destructor */
-   virtual ~ossimInfoBase();
-   
-   bool theOverviewFlag; // If true overview information should be processed.
-   
-};
-
-#endif /* End of "#ifndef ossimInfoBase_HEADER" */
diff --git a/include/ossim/support_data/ossimInfoFactory.h b/include/ossim/support_data/ossimInfoFactory.h
deleted file mode 100644
index fd04c38..0000000
--- a/include/ossim/support_data/ossimInfoFactory.h
+++ /dev/null
@@ -1,59 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Factory for info objects.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimInfoFactory.h 20125 2011-10-11 19:47:19Z dburken $
-#ifndef ossimInfoFactory_HEADER
-#define ossimInfoFactory_HEADER
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/support_data/ossimInfoFactoryInterface.h>
-
-class ossimFilename;
-class ossimInfoBase;
-
-/**
- * @brief Info factory.
- */
-class OSSIM_DLL ossimInfoFactory : public ossimInfoFactoryInterface
-{
-public:
-
-   /** virtual destructor */
-   virtual ~ossimInfoFactory();
-
-   static ossimInfoFactory* instance();
-
-   /**
-    * @brief create method.
-    *
-    * @param file Some file you want info for.
-    *
-    * @return ossimInfoBase* on success 0 on failure.  Caller is responsible
-    * for memory.
-    */
-   virtual ossimInfoBase* create(const ossimFilename& file) const;
-   
-private:
-   
-   /** hidden from use default constructor */
-   ossimInfoFactory();
-
-   /** hidden from use copy constructor */
-   ossimInfoFactory(const ossimInfoFactory& obj);
-
-   /** hidden from use operator = */
-   const ossimInfoFactory& operator=(const ossimInfoFactory& rhs);
-
-   /** The single instance of this class. */
-   static ossimInfoFactory* theInstance;
-};
-
-#endif /* End of "#ifndef ossimInfoFactory_HEADER" */
diff --git a/include/ossim/support_data/ossimInfoFactoryInterface.h b/include/ossim/support_data/ossimInfoFactoryInterface.h
deleted file mode 100644
index f36df89..0000000
--- a/include/ossim/support_data/ossimInfoFactoryInterface.h
+++ /dev/null
@@ -1,80 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Interface for info factories.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-#ifndef ossimInfoFactoryInterface_HEADER
-#define ossimInfoFactoryInterface_HEADER
-
-#include <ossim/base/ossimConstants.h>
-// #include <ossim/base/ossimObjectFactory.h>
-
-class ossimFilename;
-class ossimInfoBase;
-
-//---
-// Note: Deriving from ossimObjectFactory is being backed out as no
-// ossimObjectFactory interfaces were ever called and it introduces warning in
-// the header file so anyone who #includes this gets warnings...
-//
-// We can add back if there is a interface from ossimObjectFactory needed;
-// else, please leave out.
-// 
-// drb 20120518
-//---
-
-/**
- * @brief Info factory.
- */
-class OSSIM_DLL ossimInfoFactoryInterface // : public ossimObjectFactory
-{
-public:
-
-   /** default constructor */
-   ossimInfoFactoryInterface(){}
-
-   /** virtual destructor */
-   virtual ~ossimInfoFactoryInterface(){}
-
-   /**
-    * @brief Pure virtual create method.  Derived classes must implement to
-    * be concrete.
-    *
-    * @param file Some file you want info for.
-    *
-    * @return ossimInfoBase* on success 0 on failure.  Caller is responsible
-    * for memory.
-    */
-   virtual ossimInfoBase* create(const ossimFilename& file) const = 0;
-
-#if 0
-   virtual ossimObject* createObject(const ossimString& typeName)const
-   {
-      return 0;
-   }
-   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
-                                     const char* prefix=0)const
-   {
-      return 0;
-   }
-   /*!
-    * This should return the type name of all objects in all factories.
-    * This is the name used to construct the objects dynamially and this
-    * name must be unique.
-    */
-   virtual void getTypeNameList(std::vector<ossimString>& typeList)const
-   {
-      
-   }
-#endif
-   
-};
-
-#endif /* End of "#ifndef ossimInfoFactoryInterface_HEADER" */
diff --git a/include/ossim/support_data/ossimJ2kCodRecord.h b/include/ossim/support_data/ossimJ2kCodRecord.h
deleted file mode 100644
index e915f1d..0000000
--- a/include/ossim/support_data/ossimJ2kCodRecord.h
+++ /dev/null
@@ -1,75 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Container class for J2K Coding style default (COD) record.
-//
-// See document BPJ2K01.00 Table 7-7 Image and tile size (15444-1 Annex A5.1)
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimJ2kCodRecord.h,v 1.5 2005/10/13 21:24:47 dburken Exp $
-#ifndef ossimJ2kCodRecord_HEADER
-#define ossimJ2kCodRecord_HEADER
-
-#include <iosfwd>
-#include <string>
-
-#include <ossim/base/ossimConstants.h>
-
-class OSSIM_DLL ossimJ2kCodRecord
-{
-public:
-   
-   /** default constructor */
-   ossimJ2kCodRecord();
-
-   /** destructor */
-   ~ossimJ2kCodRecord();
-
-   /**
-    * Parse method.  Performs byte swapping as needed.
-    *
-    * @param in Stream to parse.
-    *
-    * @note COD Marker (0xff52) is not read.
-    */
-   void parseStream(std::istream& in);
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out String to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "j2k." and key is "file_name" key becomes:
-    * "nitf.file_name:"
-    * @return output stream.
-    */
-   std::ostream& print(std::ostream& out,
-                       const std::string& prefix=std::string()) const;
-
-   /** operator<< */
-   friend OSSIM_DLL std::ostream& operator<<(
-      std::ostream& out, const ossimJ2kCodRecord& obj);
-
-   /** segmet marker 0xff52 (big endian) */
-   ossim_uint16 theMarker;
-
-   /** length of segment minus marker */
-   ossim_uint16 theLcod;
-
-   /** Coding style */
-   ossim_uint8 theScod;
-
-   /** Progression order, Number of layers, Multiple component transform. */
-   ossim_uint32 theSGcod;
-
-   /** Code-block style */
-   ossim_uint8 theSPcod;
-
-};
-
-#endif /* End of "#ifndef ossimJ2kCodRecord_HEADER" */
diff --git a/include/ossim/support_data/ossimJ2kInfo.h b/include/ossim/support_data/ossimJ2kInfo.h
deleted file mode 100644
index f6ee298..0000000
--- a/include/ossim/support_data/ossimJ2kInfo.h
+++ /dev/null
@@ -1,124 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: J2K Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-#ifndef ossimJ2kInfo_HEADER
-#define ossimJ2kInfo_HEADER
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/support_data/ossimInfoBase.h>
-#include <ossim/base/ossimFilename.h>
-
-class ossimEndian;
-
-/**
- * @brief TIFF info class.
- *
- * Encapsulates the listgeo functionality.
- */
-class OSSIM_DLL ossimJ2kInfo : public ossimInfoBase
-{
-public:
-   
-   /** default constructor */
-   ossimJ2kInfo();
-
-   /** virtual destructor */
-   virtual ~ossimJ2kInfo();
-
-   /**
-    * @brief open method.
-    *
-    * @param file File name to open.
-    *
-    * @return true on success false on error.
-    */
-   virtual bool open(const ossimFilename& file);
-   
-   /**
-    * Print method.
-    *
-    * @param out Stream to print to.
-    * 
-    * @return std::ostream&
-    */
-   virtual std::ostream& print(std::ostream& out) const;
-
-private:
-
-/** Initializes s reference.  Does byte swapping as needed. */
-   void readShort(ossim_uint16& s, std::ifstream& str) const;
-
-   /**
-    * @brief Prints 0xff52 COD_MARKER (0xff52).
-    * @param out Stream to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "j2k." and key is "file_name" key becomes:
-    * "j2k.file_name:"
-    * @param str Input stream to pass to j2k record for parsing.  Should be
-    * just pass the marker.
-    * @return output stream.
-    */
-   std::ostream& printCodMarker(std::ostream& out,
-                                const std::string& prefix,
-                                std::ifstream& str) const;
-
-   /**
-    * @brief Prints 0xff51 SIZ_MARKER (0xff51).
-    * @param out Stream to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "j2k." and key is "file_name" key becomes:
-    * "j2k.file_name:"
-    * @param str Input stream to pass to j2k record for parsing.  Should be
-    * just pass the marker.
-    * @return output stream.
-    */
-   std::ostream& printSizMarker(std::ostream& out,
-                                const std::string& prefix,
-                                std::ifstream& str) const;
-
-   /**
-    * @brief Prints 0xff90 SOT_MARKER (0xff90)
-    * @param out Stream to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "j2k." and key is "file_name" key becomes:
-    * "j2k.file_name:"
-    * @param str Input stream to pass to j2k record for parsing.  Should be
-    * just pass the marker.
-    * @return output stream.
-    */
-   std::ostream& printSotMarker(std::ostream& out,
-                                const std::string& prefix,
-                                std::ifstream& str) const;
-
-   /**
-    * @brief Prints unhandle segment.  This will only print the marker and
-    * record lenght.
-    * @param out Stream to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "j2k." and key is "file_name" key becomes:
-    * "j2k.file_name:"
-    * @param str Input stream to pass to j2k record for parsing.  Should be
-    * just pass the marker.
-    * @param marker.  The marker.
-    * @return output stream.
-    */
-   std::ostream& printUnknownMarker(std::ostream& out,
-                                    const std::string& prefix,
-                                    std::ifstream& str,
-                                    ossim_uint16 marker) const;
-
-   
-   ossimFilename  theFile;
-   ossimEndian*   theEndian;
-};
-
-#endif /* End of "#ifndef ossimJ2kInfo_HEADER" */
diff --git a/include/ossim/support_data/ossimJ2kSizRecord.h b/include/ossim/support_data/ossimJ2kSizRecord.h
deleted file mode 100644
index 47d0e85..0000000
--- a/include/ossim/support_data/ossimJ2kSizRecord.h
+++ /dev/null
@@ -1,130 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Container class for J2K Image and tile size (SIZ) record.
-//
-// See document BPJ2K01.00 Table 7-6 Image and tile size (15444-1 Annex A5.1)
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimJ2kSizRecord.h,v 1.5 2005/10/13 21:24:47 dburken Exp $
-#ifndef ossimJ2kSizRecord_HEADER
-#define ossimJ2kSizRecord_HEADER
-
-#include <iosfwd>
-#include <string>
-
-#include <ossim/base/ossimConstants.h>
-
-class OSSIM_DLL ossimJ2kSizRecord
-{
-public:
-   
-   /** default constructor */
-   ossimJ2kSizRecord();
-
-   /** destructor */
-   ~ossimJ2kSizRecord();
-
-   /**
-    * Parse method.  Performs byte swapping as needed.
-    *
-    * @param in Stream to parse.
-    *
-    * @note SIZ Marker (0xff51) is not read.
-    */
-   void parseStream(std::istream& in);
-
-   /** @return scalar type based on bit depth and signed bit from theSsiz. */
-   ossimScalarType getScalarType() const;
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out String to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
-    * "nitf.file_name:"
-    * @return output stream.
-    */
-   std::ostream& print(std::ostream& out,
-                       const std::string& prefix=std::string()) const;
-
-   /** operator<< */
-   friend OSSIM_DLL std::ostream& operator<<(
-      std::ostream& out, const ossimJ2kSizRecord& obj);
-
-   /** segmet marker 0xff51 (big endian) */
-   ossim_uint16 theMarker;
-
-   /** length of segment minus marker */
-   ossim_uint16 theLsiz;
-
-   /** profile */
-   ossim_uint16 theRsiz;
-
-   /** width of reference grid */
-   ossim_uint32 theXsiz;
-
-   /** height of reference grid */
-   ossim_uint32 theYsiz;
-
-   /**
-    * Horizontal offset from the orgin of reference grid to the left side
-    * of image.
-    */
-   ossim_uint32 theXOsiz;
-
-   /**
-    * Vertical offset from the orgin of reference grid to the top
-    * of image.
-    */
-   ossim_uint32 theYOsiz;
-
-   /** width of one reference tile */
-   ossim_uint32 theXTsiz;
-   
-   /** height of one reference tile */   
-   ossim_uint32 theYTsiz;
-
-   /**
-    * Horizontal offset from the orgin of reference grid to the left edge
-    * of first tile.
-    */
-   ossim_uint32 theXTOsiz;
-
-   /**
-    * Vertical offset from the orgin of reference grid to the top
-    * edge of first tile.
-    */
-   ossim_uint32 theYTOsiz;
-
-   /** number of component in the image */
-   ossim_uint16 theCsiz;
-
-   /**
-    * sign bit and bit depth of data
-    * unsigned = 0xxx xxxx (msb == 0)
-    * signed   = 1xxx xxxx (msb == 1)
-    * bit depth = x000 0000 + 1 (first seven bits plus one)
-    */
-   ossim_uint8  theSsiz;
-
-   /**
-    * Horizontal separation of a sample of the component with respect to the
-    * reference grid.
-    */
-   ossim_uint8  theXRsiz;
-
-   /**
-    * Vertical separation of a sample of the component with respect to the
-    * reference grid.
-    */
-   ossim_uint8  theYRsiz;
-};
-
-#endif /* End of "#ifndef ossimJ2kSizRecord_HEADER" */
diff --git a/include/ossim/support_data/ossimJ2kSotRecord.h b/include/ossim/support_data/ossimJ2kSotRecord.h
deleted file mode 100644
index 9b4cdf7..0000000
--- a/include/ossim/support_data/ossimJ2kSotRecord.h
+++ /dev/null
@@ -1,84 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Container class for J2K "Start Of Tile" (SOT) record.
-//
-// See document BPJ2K01.00 Table 7-3 Image and tile size (15444-1 Annex A.4.2)
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimJ2kSotRecord.h,v 1.5 2005/10/13 21:24:47 dburken Exp $
-#ifndef ossimJ2kSotRecord_HEADER
-#define ossimJ2kSotRecord_HEADER
-
-#include <iosfwd>
-#include <string>
-
-#include <ossim/base/ossimConstants.h>
-
-class OSSIM_DLL ossimJ2kSotRecord
-{
-public:
-   
-   /** default constructor */
-   ossimJ2kSotRecord();
-
-   /** destructor */
-   ~ossimJ2kSotRecord();
-
-   /**
-    * Parse method.  Performs byte swapping as needed.
-    *
-    * @param in Stream to parse.
-    *
-    * @note Marker is not read.
-    */
-   void parseStream(std::istream& in);
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out String to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
-    * "nitf.file_name:"
-    * @return output stream.
-    */
-   std::ostream& print(std::ostream& out,
-                       const std::string& prefix=std::string()) const;
-   
-   /**
-    * operator<<.
-    */
-   friend OSSIM_DLL std::ostream& operator<<(
-      std::ostream& out, const ossimJ2kSotRecord& obj);
-
-   /** Start of tile-part marker code. 0xff90 */
-   ossim_uint16 theMarker;
-   
-   /** Length in bytes of the marker segment. */
-   ossim_uint16 theLsot;
-
-   /** Tile index. Tiles are in raster order starting at 0. */
-   ossim_uint16 theIsot;
-
-   /** The length in bytes of this record including the SOT marker. */
-   ossim_uint32 thePsot;
-
-   /** Tile-Part index. */
-   ossim_uint8  theTpsot;
-
-   /**
-    * 0 = Number of tile-parts of this tile in the codestream is not defined
-    * in this header.
-    *
-    * 1-255 number of tile-parts of this tile in the codestream.
-    */
-   ossim_uint8  theTnsot;
-};
-
-#endif /* End of "#ifndef ossimJ2kSotRecord_HEADER" */
diff --git a/include/ossim/support_data/ossimJp2Info.h b/include/ossim/support_data/ossimJp2Info.h
deleted file mode 100644
index 7788725..0000000
--- a/include/ossim/support_data/ossimJp2Info.h
+++ /dev/null
@@ -1,63 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: JP2 Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimJp2Info.h 20125 2011-10-11 19:47:19Z dburken $
-#ifndef ossimJp2Info_HEADER
-#define ossimJp2Info_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/support_data/ossimInfoBase.h>
-#include <ossim/base/ossimFilename.h>
-
-/**
- * @brief JP2 info class.
- */
-class OSSIM_DLL ossimJp2Info : public ossimInfoBase
-{
-public:
-
-   /** Anonymous enumerations: */
-   enum
-   {
-      SIGNATURE_BOX_SIZE = 12,
-      GEOTIFF_UUID_SIZE  = 16
-   };
-   
-   /** default constructor */
-   ossimJp2Info();
-
-   /** virtual destructor */
-   virtual ~ossimJp2Info();
-
-   /**
-    * @brief open method.
-    *
-    * @param file File name to open.
-    *
-    * @return true on success false on error.
-    */
-   virtual bool open(const ossimFilename& file);
-
-   /**
-    * Print method.
-    *
-    * @param out Stream to print to.
-    * 
-    * @return std::ostream&
-    */
-   virtual std::ostream& print(std::ostream& out) const;
-
-private:
-
-   ossimFilename m_file;
-};
-
-#endif /* End of "#ifndef ossimJp2Info_HEADER" */
diff --git a/include/ossim/support_data/ossimJpipMessage.h b/include/ossim/support_data/ossimJpipMessage.h
deleted file mode 100644
index 88838de..0000000
--- a/include/ossim/support_data/ossimJpipMessage.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*********************************************************************************************
- *
- * License: LGPL Please see the top level LICENSE.txt
- *
- * Author: Garrett Potts
- * 
- *********************************************************************************************/
-#ifndef ossimJpipMessage_HEADER
-#define ossimJpipMessage_HEADER
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimReferenced.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/support_data/ossimJpipMessageHeader.h>
-#include <vector>
-class OSSIM_DLL ossimJpipMessage : public ossimReferenced
-{
-public:
-    typedef std::vector<ossim_uint8> MessageBodyType;
-    
-    ossimJpipMessage();
-    void reset();
-    void setHeaderLength(ossim_uint64 length){m_headerLength = length;}
-    ossimJpipMessageHeader* header(){return m_header.get();}
-    const ossimJpipMessageHeader* header()const{return m_header.get();}
-    MessageBodyType& messageBody(){return m_messageBody;}
-    const MessageBodyType& messageBody()const{return m_messageBody;}
-    void dumpBodyAsHex(std::ostream& out)const;
-    void dumpBodyAsText(std::ostream& out)const;
-    
-protected:
-    ossimRefPtr<ossimJpipMessageHeader> m_header;
-    ossim_uint64             m_headerLength;
-    MessageBodyType m_messageBody;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimLasHdr.h b/include/ossim/support_data/ossimLasHdr.h
deleted file mode 100644
index f033392..0000000
--- a/include/ossim/support_data/ossimLasHdr.h
+++ /dev/null
@@ -1,176 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossimLasHdr.h
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Container class for LAS LIDAR format public header block.
-//
-//----------------------------------------------------------------------------
-// $Id$
-#ifndef ossimLasHdr_HEADER
-#define ossimLasHdr_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-
-#include <istream>
-#include <ostream>
-
-class ossimKeywordlist;
-
-class OSSIM_DLL ossimLasHdr
-{
-public:
-   
-   /* @brief default constructor */
-   ossimLasHdr();
-
-   /* @brief copy constructor */
-   ossimLasHdr(const ossimLasHdr& hdr);
-
-   /* @brief assignment operator= */
-   const ossimLasHdr& operator=(const ossimLasHdr& copy_this);
-
-   /* destructor */
-   ~ossimLasHdr();
-
-   /**
-    * @brief Checks for LASF in first four bytes.
-    * @return true if first four bytes are LASF.
-    */
-   bool checkSignature(std::istream& in) const;   
-
-   /**
-    * @brief Method to initialize from input stream.
-    * @param in Stream to read from.
-    * @note The first four bytes are not read in so stream should be
-    * positioned at the 5th byte.
-    */
-   void readStream(std::istream& in);
-
-   /** @brief Writes header to stream. */
-   void writeStream(std::ostream& out);
-
-   /**
-    * @brief print method.
-    * @return std::ostream&
-    */
-   std::ostream& print(std::ostream& out) const;
-
-   /** @brief Convenience operator<< method. */
-   friend OSSIM_DLL std::ostream& operator<<(std::ostream& out, const ossimLasHdr& hdr);
-   
-   void getKeywordlist(ossimKeywordlist& kwl) const;
-
-   /** @return True if bit 0 of m_globalEncoding is set, false if not. */
-   bool getGpsTimeTypeBit() const;
-
-   /** @return True if bit 1 of m_globalEncoding is set, false if not. */
-   bool getWaveforDataPacketsInternalBit() const;
-
-   /** @return True if bit 2 of m_globalEncoding is set, false if not. */
-   bool getWaveforDataPacketsExternalBit() const;
-   
-   /** @return True if bit 3 of m_globalEncoding is set, false if not. */
-   bool getReturnsSyntheticallyGeneratedBit() const;
-   
-   /**
-    * @return The project ID GUID data, e.g.: 55b44da7-7c23-4f86-a54ec39e8f1d1ea1
-    */
-   std::string getProjectIdGuid() const;
-
-   /** @return The major and minor version, e.g.: 1.2 */
-   std::string getVersion() const;
-
-   /** @return The system identifier string. */
-   std::string  getSystemIndentifier() const;
-
-   /** @return The generating software string. */
-   std::string  getGeneratingSoftware() const;
-
-   /** @return Size of this header in bytes. */
-   ossim_uint16 getHeaderSize() const;
-
-   /** @return Offset to point data. */
-   ossim_uint32 getOffsetToPointData() const;
-
-   /** @return The number fo variable length records. */
-   ossim_uint32 getNumberOfVlrs() const;
-
-   /** @return Point data format ID */
-   ossim_uint8 getPointDataFormatId() const;
-
-   /** @return The number of total points. */
-   ossim_uint32 getNumberOfPoints() const;
-
-   /**
-    * @brief Gets number of points for entry where entry is synonymous returns.
-    * @return The number of points for entries 0 through 4.
-    */
-   ossim_uint32 getNumberOfPoints(ossim_uint32 entry) const;
-
-   const ossim_float64& getScaleFactorX() const;
-   const ossim_float64& getScaleFactorY() const;
-   const ossim_float64& getScaleFactorZ() const;
-   const ossim_float64& getOffsetX() const;
-   const ossim_float64& getOffsetY() const;
-   const ossim_float64& getOffsetZ() const;
-   const ossim_float64& getMinX() const;
-   const ossim_float64& getMinY() const;
-   const ossim_float64& getMinZ() const;
-   const ossim_float64& getMaxX() const;
-   const ossim_float64& getMaxY() const;
-   const ossim_float64& getMaxZ() const;
-   
-   
-private:
-
-   /** @brief Performs a swap if system byte order is not little endian. */
-   void swap();
-
-   char          m_fileSignature[4];
-   ossim_uint16  m_fileSourceId;
-   ossim_uint16  m_globalEncoding;
-   ossim_uint32  m_projectIdGuidData1;
-   ossim_uint16  m_projectIdGuidData2;
-   ossim_uint16  m_projectIdGuidData3;
-   ossim_uint8   m_projectIdGuidData4[8];
-   ossim_uint8   m_versionMajor;
-   ossim_uint8   m_versionMinor;
-   char          m_systemIndentifier[32];
-   char          m_generatingSoftware[32];
-   ossim_uint16  m_fileCreationDay;
-   ossim_uint16  m_fileCreateionYear;
-   ossim_uint16  m_headerSize;
-   ossim_uint32  m_offsetToPointData;
-   ossim_uint32  m_numberOfVariableLengthRecords;
-   ossim_uint8   m_pointDataFormatId;
-   ossim_uint16  m_pointDataRecordLength;
-   ossim_uint32  m_numberOfPointRecords;
-   ossim_uint32  m_numberOfPointsReturn1;
-   ossim_uint32  m_numberOfPointsReturn2;
-   ossim_uint32  m_numberOfPointsReturn3;
-   ossim_uint32  m_numberOfPointsReturn4;
-   ossim_uint32  m_numberOfPointsReturn5;
-   ossim_float64 m_xScaleFactor;
-   ossim_float64 m_yScaleFactor;
-   ossim_float64 m_zScaleFactor;
-   ossim_float64 m_xOffset;
-   ossim_float64 m_yOffset;
-   ossim_float64 m_zOffset;
-   ossim_float64 m_maxX;
-   ossim_float64 m_minX;
-   ossim_float64 m_maxY;
-   ossim_float64 m_minY;
-   ossim_float64 m_maxZ;
-   ossim_float64 m_minZ;
-   ossim_uint64  m_startOfWaveformData;
-};
-
-
-
-#endif /* End of "#ifndef ossimLasHdr_HEADER" */
diff --git a/include/ossim/support_data/ossimLasInfo.h b/include/ossim/support_data/ossimLasInfo.h
deleted file mode 100644
index 5a542de..0000000
--- a/include/ossim/support_data/ossimLasInfo.h
+++ /dev/null
@@ -1,57 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossimLibLasInfo.h
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: LAS LIDAR info object.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-#ifndef ossimLasInfo_HEADER
-#define ossimLasInfo_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/support_data/ossimInfoBase.h>
-#include <ossim/base/ossimFilename.h>
-
-#include <iosfwd>
-
-/** @brief LAS LIDAR info object. */
-class OSSIM_DLL ossimLasInfo : public ossimInfoBase
-{
-public:
-   
-   /** default constructor */
-   ossimLasInfo();
-
-   /** virtual destructor */
-   virtual ~ossimLasInfo();
-
-   /**
-    * @brief open method.
-    *
-    * @param file File name to open.
-    *
-    * @return true on success false on error.
-    */
-   virtual bool open(const ossimFilename& file);
-
-   /**
-    * Print method.
-    *
-    * @param out Stream to print to.
-    * 
-    * @return std::ostream&
-    */
-   virtual std::ostream& print(std::ostream& out) const;
-
-private:
-   ossimFilename m_file;
-};
-
-#endif /* End of "#ifndef ossimLasInfo_HEADER" */
diff --git a/include/ossim/support_data/ossimNitfAcftbTag.h b/include/ossim/support_data/ossimNitfAcftbTag.h
deleted file mode 100644
index 3687135..0000000
--- a/include/ossim/support_data/ossimNitfAcftbTag.h
+++ /dev/null
@@ -1,403 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: ACFTB - Aircraft Infomation Extension Format tag class
-// declaration.
-//
-// See document STDI-0002 (version 3), Appendix E, Table E-6 for more info.
-// 
-//----------------------------------------------------------------------------
-// $Id
-
-#ifndef ossimNitfAcftbTag_HEADER
-#define ossimNitfAcftbTag_HEADER
-
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-
-class OSSIM_DLL ossimNitfAcftbTag : public ossimNitfRegisteredTag
-{
-public:
-
-   enum 
-   {
-      CEL_SIZE               = 207,
-      AC_MSN_ID_SIZE         = 20,
-      AC_TAIL_NO_SIZE        = 10,
-      AC_TO_SIZE             = 12,
-      SENSOR_ID_TYPE_SIZE    = 4,
-      SENSOR_ID_SIZE         = 6,
-      SCENE_SOURCE_SIZE      = 1,
-      SCNUM_SIZE             = 6,
-      PDATE_SIZE             = 8,
-      IMHOSTNO_SIZE          = 6,
-      IMREQID_SIZE           = 5,
-      MPLAN_SIZE             = 3,
-      ENTLOC_SIZE            = 25,
-      LOC_ACCY_SIZE          = 6,
-      ENTELV_SIZE            = 6,
-      ELV_UNIT_SIZE          = 1,
-      EXITLOC_SIZE           = 25,
-      EXITELV_SIZE           = 6,
-      TMAP_SIZE              = 7,
-      ROW_SPACING_SIZE       = 7,
-      ROW_SPACING_UNITS_SIZE = 1,
-      COL_SPACING_SIZE       = 7,
-      COL_SPACING_UINTS_SIZE = 1,
-      FOCAL_LENGTH_SIZE      = 6,
-      SENSERIAL_SIZE         = 6,
-      ABSWVER_SIZE           = 7,
-      CAL_DATE_SIZE          = 8,
-      PATCH_TOT_SIZE         = 4,
-      MTI_TOT_SIZE           = 3
-   };
-   
-   /** @brief default constructor */
-   ossimNitfAcftbTag();
-
-   /** @brief destructor */
-   virtual ~ossimNitfAcftbTag();
-
-   /** @brief Method to parse data from stream. */
-   virtual void parseStream(std::istream& in);
-
-   /** @brief Method to write data to stream. */
-   virtual void writeStream(std::ostream& out);
-
-   /** @brief Method to clear all fields including null terminating. */
-   virtual void clearFields();
-
-   ossimString getFocalLength()const;
-   ossimString getColumnSpacing()const;
-   ossimString getColumnSpacingUnits()const;
-   ossimString getRowSpacing()const;
-   ossimString getRowSpacingUnits()const;
-   /**
-    * @brief Print method that outputs a key/value type format
-    * adding prefix to keys.
-    * @param out Stream to output to.
-    * @param prefix Prefix added to key like "image0.";
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix=std::string()) const;
-   
-protected:
-
-   /** Type R = Required Type <R> = BCS spaces allowed for entire field */
-   
-   /**
-    * FIELD: AC_MSN_ID
-    *
-    * TYPE: R
-    * 
-    * 20 byte field
-    *
-    * Aircraft Mission Identification
-    */
-   char theAcMsnId[AC_MSN_ID_SIZE+1];
-
-   /**
-    * FIELD: AC_TAIL_NO
-    *
-    * TYPE: <R>
-    * 
-    * 10 byte field
-    *
-    * Aircraft Tail Number
-    */
-   char theAcTailNo[AC_TAIL_NO_SIZE+1];
-   
-   /**
-    * FIELD: AC_TO
-    *
-    * TYPE: <R>
-    * 
-    * 12 byte field
-    *
-    * Aircraft Take-off, CCYYMMDDhhmm
-    */
-   char theAcTo[AC_TO_SIZE+1];
-
-   /**
-    * FIELD: SENSOR_ID_TYPE
-    *
-    * TYPE: R
-    * 
-    * 4 byte field
-    *
-    * Sensor ID Type
-    */
-   char theSensorIdType[SENSOR_ID_TYPE_SIZE+1];
-   
-   /**
-    * FIELD: SENSOR_ID
-    *
-    * TYPE: R
-    * 
-    * 6 byte field
-    *
-    * Sensor ID 
-    */
-   char theSensorId[SENSOR_ID_SIZE+1];
-
-   /**
-    * FIELD: SCENE_SOURCE
-    *
-    * TYPE: <R>
-    * 
-    * 1 byte field
-    *
-    * Scene Source, 0 to 9
-    */
-   char theSceneSource[SCENE_SOURCE_SIZE+1];
-   
-   /**
-    * FIELD: SCNUM
-    *
-    * TYPE: R
-    * 
-    * 6 byte field
-    *
-    * Scene Number, 000000 to 999999
-    */
-   char theScNum[SCNUM_SIZE+1];
-
-   /**
-    * FIELD: PDATE
-    *
-    * TYPE: R
-    * 
-    * 8 byte field
-    *
-    * Processing Date, CCYYMMDD
-    */
-   char thePDate[PDATE_SIZE+1];
-   
-   /**
-    * FIELD: IMHOSTNO
-    *
-    * TYPE: R
-    * 
-    * 6 byte field
-    *
-    * Immediate Scene Host
-    */
-   char theImHostNo[IMHOSTNO_SIZE+1];
-
-   /**
-    * FIELD: IMREQID
-    *
-    * TYPE: R
-    * 
-    * 5 byte field
-    *
-    * Immediate Scene Request ID, 00000, 00001 to 99999
-    */
-   char theImReqID[IMREQID_SIZE+1];
-   
-   /**
-    * FIELD: MPLAN
-    *
-    * TYPE: R
-    * 
-    * 3 byte field
-    *
-    * Mission Plan Mode, 001 to 999
-    */
-   char theMPlan[MPLAN_SIZE+1];
-
-   /**
-    * FIELD: ENTLOC
-    *
-    * TYPE: <R>
-    * 
-    * 25 byte field
-    *
-    * Entry Location
-    */
-   char theEntLoc[ENTLOC_SIZE+1];
-
-   /**
-    * FIELD: LOC_ACCY
-    *
-    * TYPE: R
-    * 
-    * 6 byte field
-    *
-    * Location Accuracy, feet, 000.01 to 999.99, 000000, 000.00
-    */
-   char theLocAccy[LOC_ACCY_SIZE+1];
-   
-   /**
-    * FIELD: ENTELV
-    *
-    * TYPE: <R>
-    * 
-    * 6 byte field
-    *
-    * Entry Elevation, feet or meters, -01000 to +30000
-    */
-   char theEntelv[ENTELV_SIZE+1];
-
-   /**
-    * FIELD: ELV_UNIT
-    *
-    * TYPE: <R>
-    * 
-    * 1 byte field
-    *
-    * Unit of Elevation, f or m
-    */
-   char theElvUnit[ELV_UNIT_SIZE+1];
-   
-   /**
-    * FIELD: EXITLOC
-    *
-    * TYPE: <R>
-    * 
-    * 25 byte field
-    *
-    * Exit Location
-    */
-   char theExitLoc[EXITLOC_SIZE+1];
-
-   /**
-    * FIELD: EXITELV
-    *
-    * TYPE: <R>
-    * 
-    * 6 byte field
-    *
-    * Exit Elevation
-    */
-   char theExitElev[EXITELV_SIZE+1];
-   
-   /**
-    * FIELD: TMAP
-    *
-    * TYPE: <R>
-    * 
-    * 7 byte field
-    *
-    * True Map Angle, degrees, 000.000 to 180.000
-    */
-   char theTMap[TMAP_SIZE+1];
-
-   /**
-    * FIELD: ROW_SPACING
-    *
-    * TYPE: R
-    * 
-    * 7 byte field
-    *
-    * Row Spacing, feet, meters, rads. 
-    */
-   char theRowSpacing[ROW_SPACING_SIZE+1];
-
-   /**
-    * FIELD: ROW_SPACING_UNITS
-    *
-    * TYPE: R
-    * 
-    * 1 byte field
-    *
-    * Unit of Row Spacing, f, m, r or u
-    */
-   char theRowSpacingUnits[ROW_SPACING_UNITS_SIZE+1];
-
-   /**
-    * FIELD: COL_SPACING
-    *
-    * TYPE: R
-    * 
-    * 7 byte field
-    *
-    * Column Spacing
-    */
-   char theColSpacing[COL_SPACING_SIZE+1];
-
-   /**
-    * FIELD: COL_SPACING_UINTS
-    *
-    * TYPE: R
-    * 
-    * 1 byte field
-    *
-    * Unit of Column Spacing
-    */
-   char theColSpacingUnits[COL_SPACING_UINTS_SIZE+1];
-   
-   /**
-    * FIELD: FOCAL_LENGTH
-    *
-    * TYPE: R
-    * 
-    * 6 byte field
-    *
-    * Sensor Focal Length, cm, 000.01 to 899.99, 999.99
-    */
-   char theFocalLength[FOCAL_LENGTH_SIZE+1];
-
-   /**
-    * FIELD: SENSERIAL
-    *
-    * TYPE: <R>
-    * 
-    * 6 byte field
-    *
-    * Sensor vendor's serial number, 000001 to 999999
-    */
-   char theSenserial[SENSERIAL_SIZE+1];
-   
-   /**
-    * FIELD: ABSWVER
-    *
-    * TYPE: <R>
-    * 
-    * 7byte field
-    *
-    * Airborne Software Version
-    */
-   char theAbSwVer[ABSWVER_SIZE+1];
-
-   /**
-    * FIELD: CAL_DATE
-    *
-    * TYPE: <R>
-    * 
-    * 8 byte field
-    *
-    * Calibration Date, CCYYMMDD
-    */
-   char theCalDate[CAL_DATE_SIZE+1];
-   
-   /**
-    * FIELD: PATCH_TOT
-    *
-    * TYPE: R
-    * 
-    * 4 byte field
-    *
-    * Patch Total
-    */
-   char thePatchTot[PATCH_TOT_SIZE+1];
-
-   /**
-    * FIELD: MTI_TOT
-    *
-    * TYPE: R
-    * 
-    * 3 byte field
-    *
-    * MTI Total, SAR: 000 to 999, EO-IR: 000
-    */
-   char theMtiTot[MTI_TOT_SIZE+1];
-   
-TYPE_DATA   
-};
-
-#endif /* matches #ifndef ossimNitfAcftbTag_HEADER */
diff --git a/include/ossim/support_data/ossimNitfAimidbTag.h b/include/ossim/support_data/ossimNitfAimidbTag.h
deleted file mode 100644
index 73aaeae..0000000
--- a/include/ossim/support_data/ossimNitfAimidbTag.h
+++ /dev/null
@@ -1,278 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: AIMIDB - Additional Image ID Extension Format
-// tag class declaration.
-//
-// See document STDI-0002 (version 3), Appendix E, Table E-3 for more info.
-// 
-//----------------------------------------------------------------------------
-// $Id
-
-#ifndef ossimNitfAimidbTag_HEADER
-#define ossimNitfAimidbTag_HEADER 1
-
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-
-class OSSIM_DLL ossimNitfAimidbTag : public ossimNitfRegisteredTag
-{
-public:
-
-   enum 
-   {
-      CEL_SIZE                    = 89,
-      ACQUISITION_DATE_SIZE       = 14,
-      MISSION_NO_SIZE             = 4,
-      MISSION_IDENTIFICATION_SIZE = 10,
-      FLIGHT_NO_SIZE              = 2,
-      OP_NUM_SIZE                 = 3,
-      CURRENT_SEGMENT_SIZE        = 2,
-      REPRO_NUM_SIZE              = 2,
-      REPLAY_SIZE                 = 3,
-      RESERVED_1_SIZE             = 1,
-      START_TILE_COLUMN_SIZE      = 3,
-      START_TILE_ROW_SIZE         = 5,
-      END_SEGMENT_SIZE            = 2,
-      END_TILE_COLUMN_SIZE        = 3,
-      END_TILE_ROW_SIZE           = 5,
-      COUNTRY_SIZE                = 2,
-      RESERVED_2_SIZE             = 4,
-      LOCATION_SIZE               = 11,
-      RESERVED_3_SIZE             = 13
-    };
-   
-   /** @brief default constructor */
-   ossimNitfAimidbTag();
-
-   /** @brief destructor */
-   virtual ~ossimNitfAimidbTag();
-
-   /** @brief Method to parse data from stream. */
-   virtual void parseStream(std::istream& in);
-
-   /** @brief Method to write data to stream. */
-   virtual void writeStream(std::ostream& out);
-
-   /** @brief Method to clear all fields including null terminating. */
-   virtual void clearFields();
-
-   /**
-    * @brief Print method that outputs a key/value type format
-    * adding prefix to keys.
-    * @param out Stream to output to.
-    * @param prefix Prefix added to key like "image0.";
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix=std::string()) const;
-   
-protected:
-
-   /** Type R = Required Type <R> = BCS spaces allowed for entire field */
-   
-   /**
-    * FIELD: ACQUISITION_DATE
-    *
-    * TYPE: R
-    * 
-    * 14 byte field
-    *
-    * CCYYMMDDhhmmss
-    */
-   char theAcquisitionDate[ACQUISITION_DATE_SIZE+1];
-
-   /**
-    * FIELD: MISSION_NO
-    *
-    * TYPE: R
-    *
-    * 4 byte field
-    *
-    * Mission Number
-    */
-   char theMissionNumber[MISSION_NO_SIZE+1];
-
-   /**
-    * FIELD: MISSION_IDENTIFICATION
-    *
-    * TYPE: R
-    *
-    * 10 byte field
-    *
-    * Name of the Mission.
-    */
-   char theMissionIdentification[MISSION_IDENTIFICATION_SIZE+1];
-   
-   /**
-    * FIELD: FLIGHT_NO
-    *
-    * TYPE: R
-    *
-    * 2 byte field
-    *
-    * Flight Number
-    */
-   char theFlightNo[FLIGHT_NO_SIZE+1];
-
-   /**
-    * FIELD: OP_NUM
-    *
-    * TYPE: R
-    *
-    * 3 byte field
-    *
-    * Image Operation Number 000 to 999
-    */
-   char theOpNum[OP_NUM_SIZE+1];
-   
-   /**
-    * FIELD: CURRENT_SEGMENT
-    *
-    * TYPE: R
-    *
-    * 2 byte field
-    *
-    * Current Segment ID, AA to ZZ
-    */
-   char theCurrentSegment[CURRENT_SEGMENT_SIZE+1];
-
-   /**
-    * FIELD: REPRO_NUM
-    *
-    * TYPE: R
-    *
-    * 2 byte field
-    *
-    * Reprocess Number, 00 to 99
-    */
-   char theReproNum[REPRO_NUM_SIZE+1];
-   
-   /**
-    * FIELD: REPLAY
-    *
-    * TYPE: <R>
-    *
-    * 3 byte field
-    *
-    * Replay
-    */
-   char theReplay[REPLAY_SIZE+1];
-
-   /**
-    * FIELD: RESERVED_1
-    *
-    * TYPE: R
-    *
-    * 1 byte field
-    *
-    * 1 space
-    */
-   char theReserved1[RESERVED_1_SIZE+1];
-   
-   /**
-    * FIELD: START_TILE_COLUMN
-    *
-    * TYPE: R
-    *
-    * 3 byte field
-    *
-    * Starting Tile Column Number, 001 to 099
-    */
-   char theStartTileColumn[START_TILE_COLUMN_SIZE+1];
-
-   /**
-    * FIELD: START_TILE_ROW
-    *
-    * TYPE: R
-    *
-    * 5 byte field
-    *
-    * Starting Tile Row Number, 00001 to 99999
-    */
-   char theStartTileRow[START_TILE_ROW_SIZE+1];
-   
-   /**
-    * FIELD: END_SEGMENT
-    *
-    * TYPE: R
-    *
-    * 2 byte field
-    *
-    * Ending Segment, 00, AA to ZZ
-    */
-   char theEndSegment[END_SEGMENT_SIZE+1];
-
-   /**
-    * FIELD: END_TILE_COLUMN
-    *
-    * TYPE: R
-    *
-    * 3 byte field
-    *
-    * Ending Tile Column Number, 001 to 099
-    */
-   char theTileColumn[END_TILE_COLUMN_SIZE+1];
-   
-   /**
-    * FIELD: END_TILE_ROW
-    *
-    * TYPE: R
-    *
-    * 5 byte field
-    *
-    * Ending Tile Row Number, 00001 to 99999
-    */
-   char theTileRow[END_TILE_ROW_SIZE+1];
-
-   /**
-    * FIELD: COUNTRY
-    *
-    * TYPE: <R>
-    *
-    * 2 byte field
-    *
-    * Country Code, AA to ZZ
-    */
-   char theCountry[COUNTRY_SIZE+1];
-   
-   /**
-    * FIELD: RESERVED_2
-    *
-    * TYPE: R
-    *
-    * 4 byte field
-    *
-    * 4 spaces
-    */
-   char theReserved2[RESERVED_2_SIZE+1];
-
-   /**
-    * FIELD: LOCATION
-    *
-    * TYPE: <R>
-    *
-    * 11 byte field
-    *
-    * Location, ddmmXdddmmY, spaces
-    */
-   char theLocation[LOCATION_SIZE+1];
-
-   /**
-    * FIELD: RESERVED_3
-    *
-    * TYPE: R
-    *
-    * 13 byte field
-    *
-    * 13 spaces
-    */
-   char theReserved3[RESERVED_3_SIZE+1];
-   
-TYPE_DATA   
-};
-
-#endif /* matches #ifndef ossimNitfAimidbTag_HEADER */
diff --git a/include/ossim/support_data/ossimNitfBlockaTag.h b/include/ossim/support_data/ossimNitfBlockaTag.h
deleted file mode 100644
index bc53cc8..0000000
--- a/include/ossim/support_data/ossimNitfBlockaTag.h
+++ /dev/null
@@ -1,334 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: BLOCKA tag class declaration.
-//
-// See document STDI-0002 Table 8-9 for more info.
-// 
-// http://164.214.2.51/ntb/baseline/docs/stdi0002/final.pdf
-//
-//----------------------------------------------------------------------------
-// $Id: ossimNitfBlockaTag.h 22013 2012-12-19 17:37:20Z dburken $
-#ifndef ossimNitfBlockaTag_HEADER
-#define ossimNitfBlockaTag_HEADER
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-
-class ossimDpt;
-
-class OSSIM_DLL ossimNitfBlockaTag : public ossimNitfRegisteredTag
-{
-public:
-   enum 
-   {
-      BLOCK_INSTANCE_SIZE = 2,
-      N_GRAY_SIZE         = 5,
-      L_LINES_SIZE        = 5,
-      LAYOVER_ANGLE_SIZE  = 3,
-      SHADOW_ANGLE_SIZE   = 3,
-      FIELD_6_SIZE        = 16, // reserved
-      FRLC_LOC_SIZE       = 21,
-      LRLC_LOC_SIZE       = 21,
-      LRFC_LOC_SIZE       = 21,
-      FRFC_LOC_SIZE       = 21,
-      FIELD_11_SIZE       = 5,  // reserved
-      //                -----
-      //                  123
-   };
-   
-   /** default constructor */
-   ossimNitfBlockaTag();
-  
-   /**
-    * Parse method.
-    *
-    * @param in Stream to parse.
-    */
-   virtual void parseStream(std::istream& in);
-   
-   /**
-    * Write method.
-    *
-    * @param out Stream to write to.
-    */
-   virtual void writeStream(std::ostream& out);
-   
-   /**
-    * Clears all string fields within the record to some default nothingness.
-    */
-   virtual void clearFields();
-
-   /**
-    * @brief Print method that outputs a key/value type format
-    * adding prefix to keys.
-    * @param out Stream to output to.
-    * @param prefix Prefix added to key like "image0.";
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix) const;
-
-   /** @param block number to set block instance to.  Valid range 01 to 99. */
-   void setBlockInstance(ossim_uint32 block);
-
-   
-   /** @return theBlockInstance as a string. */
-   ossimString getBlockInstance() const;
-   
-   /**
-    * @param grayCount Count of gray fill.
-    *
-    * Valid range:  0 to 99999
-    */
-   void setNGray(ossim_uint32 grayCount);
-   
-   /** @return theNGray as a string. */
-   ossimString getNGray() const;
-   
-   /**
-    * @param lines Number of rows.
-    *
-    * Valid range:  0 to 99999
-    */
-   void setLLines(ossim_uint32 lines);
-   
-   /** @return theLLines as a string. */
-   ossimString getLLines() const;
-   
-   /**
-    * @param angle Value to set theLayoverAngle to.
-    *
-    * Valid range: 000 to 359 or spaces
-    */
-   void setLayoverAngle(ossim_uint32 angle);
-   
-   /** @return theLayoverAngle as a string. */
-   ossimString getLayoverAngle() const;
-   
-   /**
-    * @param angle Value to set theLayoverAngle to.
-    *
-    * Valid range: 000 to 359 or spaces
-    */
-   void setShadowAngle(ossim_uint32 angle);
-   
-   /** @return theLayoverAngle as a string. */
-   ossimString getShadowAngle() const;
-   
-   /**
-    * Convert latitude and logitude to theFrlcLoc string.
-    * 
-    * @param pt Ground point of first row, last column.
-    *
-    * @param longitude Longitude portion in decimal degrees.
-    */
-   void setFrlcLoc(const ossimDpt& pt);
-   
-   /** @return theFrlcLoc as a string. */
-   ossimString getFrlcLoc() const;
-   
-   /** @param pt Ground point to initialize with location. */
-   void getFrlcLoc(ossimDpt& pt) const;
-
-   /**
-    * Convert latitude and logitude to theLrlcLoc string.
-    * 
-    * @param pt Ground point of last row, last column.
-    *
-    * @param longitude Longitude portion in decimal degrees.
-    */
-   void setLrlcLoc(const ossimDpt& pt);
-   
-   /** @return theLrlcLoc as a string. */
-   ossimString getLrlcLoc() const;
-   
-   /** @param pt Ground point to initialize with location. */
-   void getLrlcLoc(ossimDpt& pt) const;
-
-      /**
-    * Convert latitude and logitude to theLrfcLoc string.
-    * 
-    * @param pt Ground point of last row, first column.
-    *
-    * @param longitude Longitude portion in decimal degrees.
-    */
-   void setLrfcLoc(const ossimDpt& pt);
-   
-   /** @return theLrfcLoc as a string. */
-   ossimString getLrfcLoc() const;
-   
-   /** @param pt Ground point to initialize with location. */
-   void getLrfcLoc(ossimDpt& pt) const;
-
-   /**
-    * Convert latitude and logitude to theFrfcLoc string.
-    * 
-    * @param pt Ground point of first row, first column.
-    *
-    * @param longitude Longitude portion in decimal degrees.
-    */
-   void setFrfcLoc(const ossimDpt& pt);
-   
-   /** @return theFrfcLoc as a string. */
-   ossimString getFrfcLoc() const;
-   
-   /** @param pt Ground point to initialize with location. */
-   void getFrfcLoc(ossimDpt& pt) const;
-   
-protected:
-
-   /**
-    * Parses location string and initializes pt with result.
-    *
-    * @param locationString String to parse.
-    *
-    * @param pt Point to initialize.
-    */
-   void converLocStringToPt(const ossimString& locationString,
-                            ossimDpt& pt) const;
-                            
-   
-   /**
-    * FIELD: BLOCK_INSTANCE
-    *
-    * required 2 byte field
-    *
-    * 01 to 99
-    * 
-    * Block number of the image.
-    */
-   char theBlockInstance[BLOCK_INSTANCE_SIZE+1];
-   
-   /**
-    * FIELD: N_GRAY
-    *
-    * required 5 byte field
-    *
-    * 00000 to 99999
-    *
-    * SAR The number of gray fill pixels.
-    *
-    * EO-IR: 00000
-    */
-   char theNGray[N_GRAY_SIZE+1];
-   
-   /**
-    * FIELD: L_LINES
-    *
-    * required 5 byte field
-    *
-    * 00000 to 99999
-    *
-    * Row count.
-    */
-   char theLLines[L_LINES_SIZE+1];
-   
-   /**
-    * FIELD: LAYOVER_ANGLE
-    *
-    * required 3 byte field
-    *
-    * 000 to 359 or spaces
-    * 
-    * SAR: Angle between the first row of pixels and the layover direction in
-    * the image, measured in a clockwise direction.
-    *
-    * EO-IR: spaces
-    */
-   char theLayoverAngle[LAYOVER_ANGLE_SIZE+1];
-   
-   /**
-    * FIELD: SHADOW_ANGLE
-    *
-    * required 3 byte field
-    *
-    * 000 to 359 or spaces
-    *
-    * SAR: Angle between the first row of pixels and the radar shadow in
-    * the image, measured in a clockwase direction.
-    *
-    * EO-IR: spaces
-    */
-   char theShadowAngle[SHADOW_ANGLE_SIZE+1];
-   
-   /**
-    * FIELD: FIELD_6
-    *
-    * Reserved field of 16 spaces.
-    */
-   char theField6[FIELD_6_SIZE+1];
-   
-   /**
-    * FIELD: FRLC_LOC
-    *
-    * required 21 byte field
-    *
-    * XDDMMSS.SSYDDDMMSS.SS
-    * OR
-    * +-dd.dddddd+-ddd.dddddd
-    * OR
-    * 21 spaces
-    *
-    * Location of the first row, last column of the image block.
-    */
-   char theFrlcLoc[FRLC_LOC_SIZE+1];
-   
-   /**
-    * FIELD: LRLC_LOC
-    *
-    * required 21 byte field
-    *
-    * XDDMMSS.SSYDDDMMSS.SS
-    * OR
-    * +-dd.dddddd+-ddd.dddddd
-    * OR
-    * 21 spaces
-    *
-    * Location of the last row, last column of the image block.
-    */
-   char theLrlcLoc[LRLC_LOC_SIZE+1];
-   
-   /**
-    * FIELD: LRFC_LOC
-    *
-    * required 21 byte field
-    *
-    * XDDMMSS.SSYDDDMMSS.SS
-    * OR
-    * +-dd.dddddd+-ddd.dddddd
-    * OR
-    * 21 spaces
-    *
-    * Location of the last row, first column of the image block.
-    */
-   char theLrfcLoc[LRFC_LOC_SIZE+1];
-   
-   /**
-    * FIELD: FRFC_LOC
-    *
-    * required 21 byte field
-    *
-    * XDDMMSS.SSYDDDMMSS.SS
-    * OR
-    * +-dd.dddddd+-ddd.dddddd
-    * OR
-    * 21 spaces
-    *
-    * Location of the first row, first column of the image block.
-    */
-   char theFrfcLoc[FRFC_LOC_SIZE+1];
-   
-   /**
-    * FIELD: FIELD_11
-    *
-    * Reserved field of 5 bytes containing: 010.0 
-    */
-   char theField11[FIELD_11_SIZE+1];
-   
-TYPE_DATA   
-};
-
-#endif /* End of "#ifndef ossimNitfBlockaTag_HEADER" */
diff --git a/include/ossim/support_data/ossimNitfCommon.h b/include/ossim/support_data/ossimNitfCommon.h
deleted file mode 100644
index d3b4102..0000000
--- a/include/ossim/support_data/ossimNitfCommon.h
+++ /dev/null
@@ -1,182 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Utility class for global nitf methods.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimNitfCommon.h 15410 2009-09-11 19:45:38Z dburken $
-#ifndef ossimNitfCommon_HEADER
-#define ossimNitfCommon_HEADER
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimString.h>
-#include <iostream>
-
-class ossimDpt;
-class ossimIrect;
-
-/** class ossimNitfCommon for global utility methods */   
-class OSSIM_DLL ossimNitfCommon
-{
-public:
-
-   /** default constructor */
-   ossimNitfCommon();
-
-   /** destructor */
-   ~ossimNitfCommon();
-
-   /**
-    * This method takes a value and a size(or width) and converts it to a
-    * scientific notation sting in the format: ±0.999999E±9
-    *
-    * @note If the value is positive, currently there is no + added to the
-    * front.
-    *
-    * @param aValue Value to convert to string.
-    *
-    * @param size total size of the string.  This must be at least 7 if
-    * aValue is positive and at least 8 if aValue is negative; else,
-    * no action is taken and an empty string is returned.
-    */
-   static ossimString convertToScientificString(const ossim_float64& aValue,
-                                                ossim_uint32 size);
-
-   /**
-    * This method takes a value and converts to a string of size with
-    * requested precision with a '0' fill.
-    *
-    * Format example: 00925.00
-    * 
-    * @param aValue Value to convert to string.
-    *
-    * @param precision The floating point precision.
-    *
-    * @param size total size of the string.
-    */
-   static ossimString convertToDoubleString(const ossim_float64& aValue,
-                                            ossim_uint32 precision,
-                                            ossim_uint32 size);
-
-   /**
-    * This method takes a value and converts to a string of size with
-    * with a '0' fill.
-    *
-    * Format example: 00925
-
-    * @param aValue Value to convert to string.
-    *
-    * @param size total size of the string.
-    */
-   static ossimString convertToUIntString(ossim_uint32 aValue,
-                                          ossim_uint32 size);
-   
-   /**
-    * Just like convertToUIntString only takes a signed value.
-    * 
-    * This method takes a value and converts to a string of size with
-    * with a '0' fill.
-    *
-    * Format example: 00925
-
-    * @param aValue Value to convert to string.
-    *
-    * @param size total size of the string.
-    */
-   static ossimString convertToIntString(ossim_int32 aValue,
-                                         ossim_uint32 size);
-
-   /**
-    * Converts pt to a decimal degrees latitude longitude location string.
-    *
-    * Format example: +-dd.dddddd+-ddd.dddddd
-    *
-    * @param pt Point to convert where pt.x = longitude and pt.y = latitude.
-    *
-    * @param  precision The floating point precision. This will determine the
-    * size of the string.
-    */
-   static ossimString convertToDdLatLonLocString(const ossimDpt& pt,
-                                                 ossim_uint32 precision);
-
-   /**
-    * Sets a field with a given string, width, and IOS flags.
-    *
-    * @param fieldDestination
-    *        The member NITF field to set.
-    * @param src
-    *        The source string.
-    * @param width
-    *        The number of characters in fieldDestination to copy from the
-    *        source string.
-    * @param ioflags
-    *        Formatting flags for the destination string.
-    * @param fill
-    *        If the size of the string is smaller than the field size,
-    *        this character specifies what the excess character values are.
-    */
-   static void setField(void* fieldDestination,
-                        const ossimString& src,
-                        std::streamsize width,
-                        std::ios_base::fmtflags ioflags = std::ios::left,
-                        char fill = ' ');
-   /**
-    * This will encode a 60 character IGEOLO field.
-    */
-   static ossimString encodeUtm(
-                                ossim_uint32 zone,
-                                const ossimDpt& ul,
-                                const ossimDpt& ur,
-                                const ossimDpt& lr,
-                                const ossimDpt& ll);
-   static ossimString encodeGeographicDms(
-                                          const ossimDpt& ul,
-                                          const ossimDpt& ur,
-                                          const ossimDpt& lr,
-                                          const ossimDpt& ll);
-   static ossimString encodeGeographicDecimalDegrees(
-                                                     const ossimDpt& ul,
-                                                     const ossimDpt& ur,
-                                                     const ossimDpt& lr,
-                                                     const ossimDpt& ll);
-
-   /**
-    * @brief Get the nitf pixel type string from scalar type.
-    *
-    * @param scalarType The scalar type.
-    *
-    * @return Pixel type as string, e.g.: "INT", "SI", "R"
-    */
-   static ossimString getNitfPixelType(ossimScalarType scalarType);
-
-   /**
-    * @brief Get compression rate (COMRAT) which is bits perpixel per band.
-    *
-    * This corresponds to the nitf image header COMRAT field.  Return is in
-    * the form of Nxyz "N" for numerically lossles, where "xyz"
-    * indicates the expected achieved bit rate (in bits per pixel per band)
-    * for the final layer of each tile. The decimal point is implicit and
-    * assumed to be one digit from the right (i.e. xy.z).
-    * 
-    * @param rect Image rectangles.
-    * @param bands
-    * @param scalar
-    * @param lengthInBytes Compressed length of image pixels.
-    * @return Approximate number of bits per pixel for the compressed image as
-    * a string which follows the nitf comrat field convention.  This will
-    * return an empty string if comrat is bigger than three digits.
-    */
-   static ossimString getCompressionRate(const ossimIrect& rect,
-                                         ossim_uint32 bands,
-                                         ossimScalarType scalar,
-                                         ossim_uint64 lengthInBytes);
-   
-   
-}; // End of class ossimNitfCommon.
-   
-#endif /* #ifndef ossimNitfCommon_HEADER */
diff --git a/include/ossim/support_data/ossimNitfCompressionHeader.h b/include/ossim/support_data/ossimNitfCompressionHeader.h
deleted file mode 100644
index 5c65e78..0000000
--- a/include/ossim/support_data/ossimNitfCompressionHeader.h
+++ /dev/null
@@ -1,36 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2004 Garrett Potts
-//
-// LICENSE: LGPL see top level LICENSE.txt for more details
-// 
-// Author: Garrett Potts
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfCompressionHeader.h 18415 2010-11-11 20:02:44Z gpotts $
-#ifndef ossimNitfCompressionHeader_HEADER
-#define ossimNitfCompressionHeader_HEADER
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimString.h>
-
-#include <iosfwd>
-#include <string>
-
-class OSSIM_DLL ossimNitfCompressionHeader : public ossimObject
-{
-public:
-   virtual void parseStream(std::istream& in) = 0;
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix) const=0;
-   
-   virtual bool saveState(ossimKeywordlist& kwl, const ossimString& prefix="")const;
-protected:
-
-TYPE_DATA;   
-};
-#endif
diff --git a/include/ossim/support_data/ossimNitfCscrnaTag.h b/include/ossim/support_data/ossimNitfCscrnaTag.h
deleted file mode 100644
index 07eb738..0000000
--- a/include/ossim/support_data/ossimNitfCscrnaTag.h
+++ /dev/null
@@ -1,184 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: CSCRNA tag class declaration.
-//
-// Corner Footprint TRE.
-//
-// See document STDI-0006-NCDRD Table 3.2-13 for more info.
-// 
-//----------------------------------------------------------------------------
-// $Id
-
-#ifndef ossimNitfCscrnaTag_HEADER
-#define ossimNitfCscrnaTag_HEADER 1
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-
-class OSSIM_DLL ossimNitfCscrnaTag : public ossimNitfRegisteredTag
-{
-public:
-   /** @brief default constructor */
-   ossimNitfCscrnaTag();
-
-   /** @brief destructor */
-   virtual ~ossimNitfCscrnaTag();
-
-   /** @brief Method to parse data from stream. */
-   virtual void parseStream(std::istream& in);
-
-   /** @brief Method to write data to stream. */
-   virtual void writeStream(std::ostream& out);
-
-   /** @brief Method to clear all fields including null terminating. */
-   virtual void clearFields();
-
-   /**
-    * @brief Print method that outputs a key/value type format
-    * adding prefix to keys.
-    * @param out Stream to output to.
-    * @param prefix Prefix added to key like "image0.";
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix) const;
-   
-protected:
-
-   //---
-   // NOTE:  Spec says corner points are project from image plane to
-   // reference ellipsoid NOT ellipsoid + height.
-   //---
-
-   /**
-    * FIELD: PREDICT_CORNERS
-    * 
-    * 1 byte field BCS-A
-    *
-    * Y = predicted, N = actual
-    */
-   char thePredictedCornerFlag[2];
-
-   /**
-    * FIELD: ULCRN_LAT
-    *
-    * 9 byte field BCS-N Degrees
-    *
-    * -90.000000 ti +90.000000
-    */
-   char theUlLat[10];
-
-   /**
-    * FIELD: ULCRN_LON
-    *
-    * 10 byte field BCS-N Degrees
-    *
-    * -179.999999 ti +180.000000
-    */
-   char theUlLon[11];
-
-   /**
-    * FIELD: ULCRN_HT
-    *
-    * 8 byte field BCS-N Meters
-    *
-    * Height referenced to the reference ellipsoid.
-    *
-    * -00610.0 to +10668.0
-    */
-   char theUlHt[9];
-
-    /**
-    * FIELD: URCRN_LAT
-    *
-    * 9 byte field BCS-N Degrees
-    *
-    * -90.000000 ti +90.000000
-    */
-   char theUrLat[10];
-
-   /**
-    * FIELD: URCRN_LON
-    *
-    * 10 byte field BCS-N Degrees
-    *
-    * -179.999999 ti +180.000000
-    */
-   char theUrLon[11];
-
-   /**
-    * FIELD: URCRN_HT
-    *
-    * 8 byte field BCS-N Meters
-    *
-    * Height referenced to the reference ellipsoid.
-    *
-    * -00610.0 to +10668.0
-    */
-   char theUrHt[9];
-
-   /**
-    * FIELD: LRCRN_LAT
-    *
-    * 9 byte field BCS-N Degrees
-    *
-    * -90.000000 ti +90.000000
-    */
-   char theLrLat[10];
-
-   /**
-    * FIELD: LRCRN_LON
-    *
-    * 10 byte field BCS-N Degrees
-    *
-    * -179.999999 ti +180.000000
-    */
-   char theLrLon[11];
-
-   /**
-    * FIELD: LRCRN_HT
-    *
-    * 8 byte field BCS-N Meters
-    *
-    * Height referenced to the reference ellipsoid.
-    *
-    * -00610.0 to +10668.0
-    */
-   char theLrHt[9];
-
-   /**
-    * FIELD: LLCRN_LAT
-    *
-    * 9 byte field BCS-N Degrees
-    *
-    * -90.000000 ti +90.000000
-    */
-   char theLlLat[10];
-
-   /**
-    * FIELD: LLCRN_LON
-    *
-    * 10 byte field BCS-N Degrees
-    *
-    * -179.999999 ti +180.000000
-    */
-   char theLlLon[11];
-
-   /**
-    * FIELD: LLCRN_HT
-    *
-    * 8 byte field BCS-N Meters
-    *
-    * Height referenced to the reference ellipsoid.
-    *
-    * -00610.0 to +10668.0
-    */
-   char theLlHt[9];
-   
-TYPE_DATA   
-};
-
-#endif /* matches #ifndef ossimNitfCscrnaTag_HEADER */
diff --git a/include/ossim/support_data/ossimNitfCsdidaTag.h b/include/ossim/support_data/ossimNitfCsdidaTag.h
deleted file mode 100644
index 661e11b..0000000
--- a/include/ossim/support_data/ossimNitfCsdidaTag.h
+++ /dev/null
@@ -1,209 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: CSDIDA tag class declaration.
-//
-// Dataset Indentification TRE.
-//
-// See document STDI-0006-NCDRD Table 3.3-14 for more info.
-// 
-//----------------------------------------------------------------------------
-// $Id
-
-#ifndef ossimNitfCsdidaTag_HEADER
-#define ossimNitfCsdidaTag_HEADER 1
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-
-class OSSIM_DLL ossimNitfCsdidaTag : public ossimNitfRegisteredTag
-{
-public:
-   /** @brief default constructor */
-   ossimNitfCsdidaTag();
-
-   /** @brief destructor */
-   virtual ~ossimNitfCsdidaTag();
-
-   /** @brief Method to parse data from stream. */
-   virtual void parseStream(std::istream& in);
-
-   /** @brief Method to write data to stream. */
-   virtual void writeStream(std::ostream& out);
-
-   /** @brief Method to clear all fields including null terminating. */
-   virtual void clearFields();
-
-   /**
-    * @brief Print method that outputs a key/value type format
-    * adding prefix to keys.
-    * @param out Stream to output to.
-    * @param prefix Prefix added to key like "image0.";
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix) const;
-   
-protected:
-
-   /**
-    * FIELD: DAY
-    * 
-    * 2 byte field BCS-N
-    *
-    * 01 TO 31 (UTC)
-    */
-   char theDay[3];
-
-   /**
-    * FIELD: MONTH
-    *
-    * 3 byte field BCS-A
-    *
-    * JAN to DEC (UTC)
-    */
-   char theMonth[4];
-
-
-   /**
-    * FIELD: YEAR
-    *
-    * 4 byte field BCS-N
-    * 
-    * 0000 to 9999 (UTC)
-    */
-   char theYear[5];
-
-   /**
-    * FIELD: PLATFORM CODE
-    *
-    * 2 byte field BCS-A
-    * 
-    * QB, IK, OV, WV ...
-    */
-   char thePlatformCode[3];
-
-   /**
-    * FIELD: VEHICLE ID
-    *
-    * 2 byte field BCS-N
-    * 
-    * 00 TO 99
-    */
-   char theVehicleId[3];
-
-   /**
-    * FIELD: PASS
-    *
-    * 2 byte field BCS-N
-    * 
-    * 01 to 99
-    */
-   char thePass[3];
-
-   /**
-    * FIELD: OPERATION
-    *
-    * 3 byte field BCS-N
-    * 
-    * 001 to 999
-    */
-   char theOperation[4];
-
-   /**
-    * FIELD: SENSOR_ID
-    * 
-    * 2 byte field BCS-A
-    * 
-    * AA = pan only, GA = multispectral and pan sharpened only, NA =
-    * panchroomatic & multispectral together.
-    */
-   char theSensorId[3];
-
-   /**
-    * FIELD: PRODUCT_ID
-    *
-    * 2 byte field BCS-A
-    * 
-    * See table 2.1-7 
-    */
-   char theProductId[3];
-
-   /**
-    * FIELD: Reserved
-    * 
-    * 4 bytes BCS-A
-    *
-    * fill "00  "
-    */
-   char theReservedField1[5];
-
-   /**
-    * FIELD: TIME
-    *
-    * 14 byte field BCS-N
-    * 
-    * Image start time (UTC) YYYYMMDDhhmmss Corresponds to ACQUISITION_DATE
-    * in STDI-0002
-    */
-   char theTime[15];
-
-   /**
-    * FIELD: PROCESS_TIME
-    *
-    * 14 byte field BCS-N
-    * 
-    * Image start time (UTC) YYYYMMDDhhmmss
-    */
-   char theProcessTime[15];
-
-   /** FIELD: Reserved
-    *
-    * 2 bytes BCS-N
-    * 
-    * Fill "00"
-    */
-   char theReservedField2[3];
-
-   /**
-    * FIELD: Reserved
-    *
-    * 2 bytes BCS-N 
-    *
-    * Fill "01"
-    */
-   char theReservedField3[3];
-
-   /**
-    * FIELD: Reserved
-    *
-    * 1 byte BCS-A
-    *
-    * Fill "N"
-    */
-   char theReservedField4[1];
-
-   /**
-    * FIELD: Reserved
-    *
-    * 1 byte BCS-A
-    *
-    * BCS-A "N"
-    */
-   char theReservedField5[1];
-
-   /**
-    * FIELD: SOFTWARE_VERSION_NUMBER
-    *
-    * 10 byte field BCS-A
-    * 
-    * Software version used.
-    */
-   char theSoftwareVersionNumber[11]; 
-   
-TYPE_DATA   
-};
-
-#endif /* matches #ifndef ossimNitfCsdidaTag_HEADER */
diff --git a/include/ossim/support_data/ossimNitfCsexraTag.h b/include/ossim/support_data/ossimNitfCsexraTag.h
deleted file mode 100644
index 3c97b9a..0000000
--- a/include/ossim/support_data/ossimNitfCsexraTag.h
+++ /dev/null
@@ -1,477 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: CSEXRA tag class declaration.
-//
-// Exploitation Reference Data TRE.
-//
-// See document STDI-0006-NCDRD Table 3.5-16 for more info.
-// 
-//----------------------------------------------------------------------------
-// $Id
-
-#ifndef ossimNitfCsexraTag_HEADER
-#define ossimNitfCsexraTag_HEADER 1
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-
-class OSSIM_DLL ossimNitfCsexraTag : public ossimNitfRegisteredTag
-{
-public:
-   /** @brief default constructor */
-   ossimNitfCsexraTag();
-
-   /** @brief destructor */
-   virtual ~ossimNitfCsexraTag();
-
-   /** @brief Method to parse data from stream. */
-   virtual void parseStream(std::istream& in);
-
-   /** @brief Method to write data to stream. */
-   virtual void writeStream(std::ostream& out);
-
-   /** @brief Method to clear all fields including null terminating. */
-   virtual void clearFields();
-
-   /**
-    * @brief Print method that outputs a key/value type format
-    * adding prefix to keys.
-    * @param out Stream to output to.
-    * @param prefix Prefix added to key like "image0.";
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix) const;
-   
-   /**
-    * @brief Get the SENSOR field.
-    * @return The SENSOR field as a string.
-    */
-   ossimString getSensor() const;
-   
-   /**
-    * @brief Get the TIME_FIRST_LINE_IMAGE field.
-    * @return The TIME_FIRST_LINE_IMAGE field as a string.
-    */
-   ossimString getTimeFirstLineImage() const;
-   
-   /**
-    * @brief Get the TIME_IMAGE_DURATION field.
-    * @return The TIME_IMAGE_DURATION field as a string.
-    */
-   ossimString getTimeImageDuration() const;
-   
-   /**
-    * @brief Get the MAX_GSDfield.
-    * @return The MAX_GSD field as a string.
-    */
-   ossimString getMaxGsd() const;
-   
-   /**
-    * @brief Get the ALONG_SCAN_GSD field.
-    * @return The ALONG_SCAN_GSD field as a string.
-    */
-   ossimString getAlongScanGsd() const;
-   
-   /**
-    * @brief Get the CROSS_SCAN_GSD field.
-    * @return TheCROSS_SCAN_GSD field as a string.
-    */
-   ossimString getCrossScanGsd() const;
-   
-   /**
-    * @brief Get the GEO_MEAN_GSD field.
-    * @return The GEO_MEAN_GSD field as a string.
-    */
-   ossimString getGeoMeanGsd() const;
-   
-   /**
-    * @brief Get the A_S_VERT_GSD field.
-    * @return The A_S_VERT_GSD field as a string.
-    */
-   ossimString getAlongScanVerticalGsd() const;
-   
-   /**
-    * @brief Get the C_S_VERT_GSD field.
-    * @return The C_S_VERT_GSD field as a string.
-    */
-   ossimString getCrossScanVerticalGsd() const;
-
-   /**
-    * @brief Get the GEO_MEAN_VERT_GSD field.
-    * @return The GEO_MEAN_VERT_GSD field as a string.
-    */
-   ossimString getGeoMeanVerticalGsd() const;
-   
-   /**
-    * @brief Get the GEO_BETA_ANGLEfield.
-    * @return The GEO_BETA_ANGLE field as a string.
-    */
-   ossimString getGeoBetaAngle() const;
-
-   /**
-    * @brief Get the DYNAMIC_RANGE field.
-    * @return The DYNAMIC_RANGE field as a string.
-    */
-   ossimString getDynamicRange() const;
-   
-   /**
-    * @brief Get the NUM_LINES field.
-    * @return The NUM_LINES field as a string.
-    */
-   ossimString getNumLines() const;
-   
-   
-   /**
-    * @brief Get the NUM_SAMPLES field.
-    * @return The NUM_SAMPLES field as a string.
-    */
-   ossimString getNumSamples() const;
-   
-   /**
-    * @brief Get the ANGLE_TO_NORTH field.
-    * @return The ANGLE_TO_NORTH field as a string.
-    */
-   ossimString getAngleToNorth() const;
-   
-   /**
-    * @brief Get the OBLIQUITY_ANGLE field.
-    * @return The OBLIQUITY_ANGLE field as a string.
-    */
-   ossimString getObliquityAngle() const;
-
-   /**
-    * @brief Get the AZ_OF_OBLIQUITY field.
-    * @return The AZ_OF_OBLIQUITY field as a string.
-    */
-   ossimString getAzimuthOfObliquity() const;
-   
-   /**
-    * @brief Get the GRD_COVER field.
-    * @return The GRD_COVER field as a string.
-    */
-   ossimString getGroundCover() const;
-
-   /**
-    * @brief Get the SNOW_DEPTH_CAT field.
-    * @return The SNOW_DEPTH_CAT field as a string.
-    */
-   ossimString getSnowDepth() const;
-   
-   /**
-    * @brief Get the SUN_AZIMUTH field.
-    * @return The SUN_AZIMUTH field as a string.
-    */
-   ossimString getSunAzimuth() const;
-
-   /**
-    * @brief Get the SUN_ELEVATION field.
-    * @return The SUN_ELEVATION field as a string.
-    */
-   ossimString getSunElevation() const;
-
-   /**
-    * @brief Get the PREDICTED_NIIRS field.
-    * @return The PREDICTED_NIIRS field as a string.
-    */
-   ossimString getPredictedNiirs() const;
-   
-   /**
-    * @brief Get the CIRCL_ERR field.
-    * @return The CIRCL_ERR field as a string.
-    */
-   ossimString getCE90() const;
-
-   /**
-    * @brief Get the LINEAR_ERR field.
-    * @return The LINEAR_ERR field as a string.
-    */
-   ossimString getLE90() const;
-
-protected:
-
-   /**
-    * FIELD: SENSOR
-    * 
-    * 6 byte field BCS-A
-    *
-    * PAN MS
-    */
-   char theSensor[7];
-
-   /**
-    * FIELD: TIME_FIRST_LINE_IMAGE
-    *
-    * 12 byte field BCS-N Seconds (UTC)
-    *
-    * Time in seconds from midnight for the first line, synthetic array,
-    * of the Dataset collection.
-    * 
-    * 00000.000000 to 86400.000000
-    */
-   char theTileFirstLine[13];
-
-   /**
-    * FIELD: TIME_IMAGE_DURATION
-    *
-    * 12 byte field BCS-N Seconds (UTC)
-    *
-    * Time Difference in seconds between the first line, synthetic array,
-    * and the last line, synthetic array.
-    * 
-    * 00000.000000 to 86400.000000
-    */
-   char theImageTimeDuration[13];
-
-   /**
-    * FIELD: MAX_GSD
-    *
-    * 5 byte field BCS-N inches
-    *
-    * Predicted maximum mean ground sample distance (GSD)for the primary
-    * target.
-    *
-    * 000.0 to 999.9
-    */
-   char theMaxGsd[6];
-
-   /**
-    * FIELD: ALONG_SCAN_GSD
-    *
-    * 5 byte field BCS-A inches
-    *
-    * Measured along scan GSD for the primary target.
-    *
-    * 000.0 to 999.9 or N/A
-    */
-   char theAlongScanGsd[6];
-
-   /**
-    * FIELD: CROSS_SCAN_GSD
-    *
-    * 5 byte field BCS-A inches
-    *
-    * Measured cross scan GSD for the primary target.
-    *
-    * 000.0 to 999.9 or N/A
-    */
-   char theCrossScanGsd[6];
-
-   /**
-    * FIELD: GEO_MEAN_GSD
-    *
-    * 5 byte field BCS-A inches
-    *
-    * Measured mean GSD for the primary target.
-    *
-    * 000.0 to 999.9 or N/A
-    */
-   char theGeoMeanGsd[6];
-
-   /**
-    * FIELD: A_S_VERT_GSD
-    *
-    * 5 byte field BCS-A inches
-    *
-    * Measured along scan vertical GSD for the primary target.
-    *
-    * 000.0 to 999.9 or N/A
-    */
-   char theAlongScanVertGsd[6];
-
-   /**
-    * FIELD: C_S_VERT_GSD
-    *
-    * 5 byte field BCS-A inches
-    *
-    * Measured cross scan vertical GSD for the primary target.
-    *
-    * 000.0 to 999.9 or N/A
-    */
-   char theCrossScanVertGsd[6];
-
-   /**
-    * FIELD: GEO_MEAN_VERT_GSD
-    *
-    * 5 byte field BCS-A inches
-    *
-    * Measured mean vertical GSD for the primary target.
-    *
-    * 000.0 to 999.9 or N/A
-    */
-   char theGeoMeanVertGsd[6];
-
-   /**
-    * FIELD: GEO_BETA_ANGLE
-    *
-    * 5 byte field BCS-A Degrees
-    *
-    * Angle on ground (Earth tangent plane) between along scan and cross scan
-    * directions.
-    *
-    * 00.0 to 180.0 or N/A
-    */
-   char theGeoBetaAngle[6];
-   
-   /**
-    * FIELD: DYNAMIC_RANGE
-    *
-    * 5 byte field BCS-N
-    *
-    * Dynamic range extent of pixel values in the image.
-    *
-    * 00000 to 02047 for PAN and MS.
-    */
-   char theDynamicRange[6];  
-
-   /**
-    * FIELD: NUM_LINES
-    *
-    * 7 byte field BCS-N
-    *
-    * 0000101 to 9999999
-    */
-   char theLine[8];
-   
-   /**
-    * FIELD: NUM_SAMPLES
-    *
-    * 5 byte field BCS-N
-    *
-    * 00101 to 99999
-    */
-   char theSamples[6];  
-
-   /**
-    * FIELD: ANGLE_TO_NORTH
-    *
-    * 7 byte field BCS-N Degrees
-    *
-    * Angle in degrees measured clockwise from the first row of the image to
-    * true North at image start time.
-    * 
-    * 000.000 to 360.000
-    */
-   char theAngleToNorth[8];
-
-   /**
-    * FIELD: OBLIQUITY_ANGLE
-    *
-    * 6 byte field BCS-N Degrees
-    *
-    * Obliquity angle measured from target local vertical.  I.e., the angle
-    * betweent the local North-Earth-Down (NED) horizontal and the optical
-    * axis of the image at the time of closest approach.
-    * 
-    * 00.000 to 90.000
-    */
-   char theObliquityAngle[7];
-
-   /**
-    * FIELD: AZ_OF_OBLIQUITY
-    *
-    * 7 byte field BCS-N Degrees
-    *
-    * Azimuth of the target-SV line-of-sight vectory projected in the target
-    * local horizontal plane, measured clockwise from True North, computed
-    * at Image Start Time.  The Velocity Control Point on the focal plane
-    * is projected to this azimuth projection in the target local
-    * horizontal plane.
-    * 
-    * 000.000 to 360.000
-    */
-   char theAzOfObliquity[8];
-   
-   /**
-    * FIELD: GRD_COVER
-    *
-    * 1 byte field BCS-N
-    *
-    * Snow or no snow
-    *
-    * 1 = snow, 0 = no snow, 9 = not available.
-    */
-   char theGrdCover[2];
-
-    /**
-    * FIELD: SNOW_DEPTH_CAT
-    *
-    * 1 byte field BCS-N
-    *
-    * Provides the weighted average of the snow depth values for all of
-    * the grids that overlap the tasked image area.
-    *
-    * 0 = 0 inches,
-    * 1 = 1-8 inches or ice,
-    * 2 = 9-17 inches,
-    * 3 = greater than 17 inches
-    * 9 = Not Available
-    */
-   char theSnowDepthCategory[2];
-
-   /**
-    * FIELD: SUN_AZIMUTH   
-    *
-    * 7 byte field BCS-N Degrees
-    *
-    * Azimuth of the target-sun line-of-sight vector projected in the
-    * target local horizontal plane, measured clockwise from True North,
-    * calculated at Image Start Time.
-    * 
-    * 000.000 to 360.000
-    */
-   char theSunAzimuth[8];
-
-   /**
-    * FIELD: SUN_ELEVATION  
-    *
-    * 7 byte field BCS-N Degrees
-    *
-    * The sun elevation angle from the local target plane to the sun
-    * calculated at Image_Start_Time, where the local target plane is
-    * referenced by the Target Centered - Earth Fixed, ST coordinate frame.
-    * 
-    * -90.000 to +90.000
-    */
-   char theSunElevation[8];
-   
-   /**
-    * FIELD: PREDICTED_NIIRS
-    *
-    * 3 byte field BCS-A
-    *
-    * Imagery NIIRS value. 
-    *
-    * 0.0 to 9.0 or N/A
-    */
-   char thePredictedNiirs[4];
-
-   /**
-    * FIELD: CIRCL_ERR
-    *
-    * 3 byte field BCS-N Feet
-    *
-    * Predicted CE/90 in the geolocation in the scene.
-    *
-    * 000 to 999
-    */
-   char theCircularError[4];
-
-   /**
-    * FIELD: LINEAR_ERR
-    *
-    * 3 byte field BCS-N Feet
-    *
-    * Predicted LE/90 in the geolocation in the scene
-    *
-    * 000 to 999
-    */
-   char theLinearError[4];
-   
-TYPE_DATA   
-};
-
-#endif /* matches #ifndef ossimNitfCsexraTag_HEADER */
diff --git a/include/ossim/support_data/ossimNitfDataExtensionSegment.h b/include/ossim/support_data/ossimNitfDataExtensionSegment.h
deleted file mode 100644
index b3636c2..0000000
--- a/include/ossim/support_data/ossimNitfDataExtensionSegment.h
+++ /dev/null
@@ -1,34 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfDataExtensionSegment.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimNitfDataExtensionSegment_HEADER
-#define ossimNitfDataExtensionSegment_HEADER
-
-#include <iosfwd>
-#include <ossim/base/ossimObject.h>
-class ossimNitfTagInformation;
-
-class OSSIMDLLEXPORT ossimNitfDataExtensionSegment : public ossimObject
-{
-public:
-   friend std::ostream& operator <<(std::ostream &out,
-                                    const ossimNitfDataExtensionSegment &data);
-   ossimNitfDataExtensionSegment(){}
-   virtual void parseStream(std::istream &in)=0;
-   virtual const ossimNitfTagInformation&  getTagInformation()const=0;
-
-protected:
-   virtual ~ossimNitfDataExtensionSegment(){}
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfDataExtensionSegmentV2_0.h b/include/ossim/support_data/ossimNitfDataExtensionSegmentV2_0.h
deleted file mode 100644
index 866da5f..0000000
--- a/include/ossim/support_data/ossimNitfDataExtensionSegmentV2_0.h
+++ /dev/null
@@ -1,72 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfDataExtensionSegmentV2_0.h 15766 2009-10-20 12:37:09Z gpotts $
-#ifndef ossimNitfDataExtensionSegmentV2_0_HEADER
-#define ossimNitfDataExtensionSegmentV2_0_HEADER
-#include <ossim/support_data/ossimNitfDataExtensionSegment.h>
-#include <ossim/support_data/ossimNitfTagInformation.h>
-
-struct ossimNitfDataExtIdentSecurityChunkV2_0
-{
-   friend std::ostream& operator <<(std::ostream& out,
-                                    const ossimNitfDataExtIdentSecurityChunkV2_0& data);
-   char theFilePartType[3]; // 2 byte alpha
-   char theUniqueDataExtTypeId[26]; // 25 byte alpha numeric
-   char theVersionDataFieldDef[3]; // 2 byte numeric
-   char theDataExtSecurityClass[2]; // 1 byte alpha
-   char theDataExtCodewords[41];    // 40 byte alpha numeric
-   char theDataExtControlAndHand[41]; // 40 byte alpha numeric
-   char theDataExtReleasingInst[41]; // 40 byte alpha numeric
-   char theDataExtClassAuthority[21]; // 20 byte alph num
-   char theDataExtSecurityConNum[21]; // 20 byte alpha num
-   char theDataExtSecuityDowngrade[7]; // 6 byte alpha num
-   char theDataExtDowngradingEvent[41]; // 40 byte alpha num
-};
-
-class OSSIMDLLEXPORT ossimNitfDataExtensionSegmentV2_0 : public ossimNitfDataExtensionSegment
-{
-public:
-   ossimNitfDataExtensionSegmentV2_0();
-   virtual void parseStream(std::istream &in);
-   virtual std::ostream& print(std::ostream& out)const;
-   virtual const ossimNitfTagInformation&  getTagInformation()const
-      {
-         return theTag;
-      }
-protected:
-   virtual ~ossimNitfDataExtensionSegmentV2_0();
-
-private:
-   void clearFields();
-   
-   ossimNitfDataExtIdentSecurityChunkV2_0 theIdentSecurityChunk;
-   
-   /*!
-    * This is a 6 byte field
-    */
-   char theOverflowedHeaderType[7];
-
-   /*!
-    * This is a 3 byte field
-    */
-   char theDataItemOverflowed[4];
-
-   /*!
-    * This is a 4 byte field.
-    */
-   char theLengthOfUserDefinedSubheaderFields[5];
-   
-   ossimNitfTagInformation                theTag;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfEmbeddedRpfDes.h b/include/ossim/support_data/ossimNitfEmbeddedRpfDes.h
deleted file mode 100644
index b9edb5c..0000000
--- a/include/ossim/support_data/ossimNitfEmbeddedRpfDes.h
+++ /dev/null
@@ -1,43 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfEmbeddedRpfDes.h 22013 2012-12-19 17:37:20Z dburken $
-#ifndef ossimNitfEmbeddedRpfDes_HEADER
-#define ossimNitfEmbeddedRpfDes_HEADER 1
-
-#include <iosfwd>
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-class ossimNitfFileHeader;
-
-class OSSIMDLLEXPORT ossimNitfEmbeddedRpfDes : public ossimNitfRegisteredTag
-{
-public:
-   ossimNitfEmbeddedRpfDes();
-   
-   virtual void parseStream(std::istream &in);
-
-   /**
-    * @brief Print method that outputs a key/value type format
-    * adding prefix to keys.
-    * @param out Stream to output to.
-    * @param prefix Prefix added to key like "image0.";
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix=std::string()) const;
-protected:
-   virtual ~ossimNitfEmbeddedRpfDes();
-
-TYPE_DATA
-private:
-
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfEngrdaTag.h b/include/ossim/support_data/ossimNitfEngrdaTag.h
deleted file mode 100644
index 2166955..0000000
--- a/include/ossim/support_data/ossimNitfEngrdaTag.h
+++ /dev/null
@@ -1,148 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: ENGRDA - Engineering Data tag class declaration.
-//
-// See document STDI-0002 (version 3), Appendix N for more info.
-// 
-//----------------------------------------------------------------------------
-// $Id
-
-#ifndef ossimNitfEngrdaTag_HEADER
-#define ossimNitfEngrdaTag_HEADER 1
-
-#include <string>
-#include <vector>
-
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-
-class OSSIM_DLL ossimNitfEngrdaTag : public ossimNitfRegisteredTag
-{
-public:
-
-   enum 
-   {
-      RESRC_SIZE   = 20,
-      RECNT_SIZE   = 3,
-      ENGLN_SIZE   = 2,
-      ENGMTXC_SIZE = 4,
-      ENGMTXR_SIZE = 4,
-      ENGTYP_SIZE  = 1,
-      ENGDTS_SIZE  = 1,
-      ENGDATU_SIZE = 2,
-      ENGDATC_SIZE = 8,
-      TMP_BUF_SIZE = 128
-   };
-   
-   /** @brief default constructor */
-   ossimNitfEngrdaTag();
-
-   /** @brief destructor */
-   virtual ~ossimNitfEngrdaTag();
-
-   /** @brief Method to parse data from stream. */
-   virtual void parseStream(std::istream& in);
-
-   /** @brief Method to write data to stream. */
-   virtual void writeStream(std::ostream& out);
-
-   /** @brief Method to clear all fields including null terminating. */
-   virtual void clearFields();
-
-   /**
-    * @brief Print method that outputs a key/value type format
-    * adding prefix to keys.
-    * @param out Stream to output to.
-    * @param prefix Prefix added to key like "image0.";
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix=std::string()) const;
-   
-protected:
-
-   /** @brief Container class for an Engineering Data Element Record. */
-   class ossimEngDataElement
-   {
-   public:
-      /** ENGLBL - label */
-      std::string theEngLbl;
-
-      /** ENGMTXC - column count */
-      ossim_uint16 theEngMtxC;
-
-      /** ENGMTXR - row count */
-      ossim_uint16 theEngMtxR;
-
-      /** ENGTYP - data type */
-      ossim_int8  theEngTyp;
-
-      /** ENGDTS - data size in bytes */
-      ossim_uint8 theEngDts;
-
-      /** ENGDATU - units */
-      std::string theEngDatU;
-
-      /** ENGDATA - data */
-      std::vector<ossim_uint8> theEngDat;
-   };
-
-   /**
-    * @brief Method to print out a ossimEngDataElement object.
-    * @param out Stream to print to.
-    * @param element The element to print.
-    * @param elIndex The index of the element array index.
-    * @param prefix  The prefix to add to key.
-    */
-   std::ostream& printData(std::ostream& out,
-                           const ossimEngDataElement& element,
-                           ossim_uint32 elIndex,
-                           const std::string& prefix) const;
-
-   /**
-    * @brief Method to convert value to a string, padding with zero's,
-    * left justified.
-    * @param v The value to convert.
-    * @param w The width of the string field.
-    * @param s The string to stuff.
-    */
-   template <class T> void getValueAsString(T v,
-                                            ossim_uint16 w,
-                                            std::string& s) const;
-
-   /** Type R = Required Type <R> = BCS spaces allowed for entire field */
-   
-   /**
-    * FIELD: RESRC
-    *
-    * TYPE: R
-    * 
-    * 20 byte field
-    *
-    * Unique Source System Name.
-    */
-   char theReSrc[RESRC_SIZE+1];
-   
-   /**
-    * FIELD: RECNT
-    *
-    * TYPE: R
-    * 
-    * 20 byte field
-    *
-    * Unique Source System Name.
-    */
-   char theReCnt[RECNT_SIZE+1];
-
-   std::vector<ossimEngDataElement> theData;
-
-   ossim_uint32 theTreLength;
-   
-TYPE_DATA   
-};
-
-#endif /* matches #ifndef ossimNitfEngrdaTag_HEADER */
diff --git a/include/ossim/support_data/ossimNitfFile.h b/include/ossim/support_data/ossimNitfFile.h
deleted file mode 100644
index 54b94fe..0000000
--- a/include/ossim/support_data/ossimNitfFile.h
+++ /dev/null
@@ -1,92 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfFile.h 19583 2011-05-13 10:58:10Z gpotts $
-#ifndef ossimNitfFile_HEADER
-#define ossimNitfFile_HEADER
-
-#include <iosfwd>
-#include <vector>
-
-#include <ossim/base/ossimReferenced.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/support_data/ossimNitfFileHeader.h>
-
-class ossimNitfImageHeader;
-class ossimNitfSymbolHeader;
-class ossimNitfLabelHeader;
-class ossimNitfTextHeader;
-class ossimNitfDataExtensionSegment;
-class ossimFilename;
-class ossimNitfRegisteredTag;
-class ossimNitfTagInformation;
-
-class OSSIMDLLEXPORT ossimNitfFile : public ossimReferenced
-{
-public:
-   friend OSSIMDLLEXPORT std::ostream& operator <<(std::ostream& out,
-                                                   const ossimNitfFile &data);
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out Stream to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
-    * "nitf.file_name:"
-    * @param printOverviews If true overview, if present(e.g. rpf's) will be
-    * printed.
-    * @return output stream.
-    */
-   std::ostream& print(std::ostream& out,
-                       const std::string& prefix=std::string(),
-                       bool printOverviews=false) const;
-   
-   ossimNitfFile();
-   virtual ~ossimNitfFile();
-
-   /*!
-    *  Opens the nitf file and attempts to parse.
-    *  Returns true on success, false on error.
-    */
-   bool parseFile(const ossimFilename &file);
-
-   /*!
-    * Will return the header.
-    */
-   const ossimNitfFileHeader* getHeader()const;
-   ossimNitfFileHeader* getHeader();
-   ossimIrect getImageRect()const;
-   
-   ossimNitfImageHeader*  getNewImageHeader(ossim_uint32 imageNumber)const;
-   ossimNitfSymbolHeader* getNewSymbolHeader(ossim_uint32 symbolNumber)const;
-   ossimNitfLabelHeader*  getNewLabelHeader(ossim_uint32 labelNumber)const;
-   ossimNitfTextHeader*   getNewTextHeader(ossim_uint32 textNumber)const;
-   ossimNitfDataExtensionSegment* getNewDataExtensionSegment(ossim_uint32 dataExtNumber)const;
-   
-   ossimString getVersion()const;
-
-   /** @return The filename parsed by this object. */
-   ossimFilename getFilename() const;
-   
-   virtual bool saveState(ossimKeywordlist& kwl, const ossimString& prefix)const;
-
-protected:
-   ossimNitfImageHeader* allocateImageHeader()const;
-   
-   ossimFilename                    theFilename;
-   ossimRefPtr<ossimNitfFileHeader> theNitfFileHeader;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfFileHeader.h b/include/ossim/support_data/ossimNitfFileHeader.h
deleted file mode 100644
index 02c5fda..0000000
--- a/include/ossim/support_data/ossimNitfFileHeader.h
+++ /dev/null
@@ -1,203 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfFileHeader.h 18413 2010-11-11 19:56:22Z gpotts $
-#ifndef ossimNitfFileHeader_HEADER
-#define ossimNitfFileHeader_HEADER
-
-#include <iosfwd>
-#include <vector>
-#include <iterator>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimPropertyInterface.h>
-#include <ossim/base/ossimProperty.h>
-#include <ossim/support_data/ossimNitfTagInformation.h>
-
-class ossimNitfImageHeader;
-class ossimNitfSymbolHeader;
-class ossimNitfTextHeader;
-class ossimNitfLabelHeader;
-class ossimNitfDataExtensionSegment;
-// These structures are just data holders and will
-// not be used directly by outside users.  This is for internal use
-//
-class OSSIM_DLL ossimNitfImageOffsetInformation : public ossimObject
-{
-public:
-   virtual std::ostream& print(std::ostream& out) const;
-
-   ossimNitfImageOffsetInformation(ossim_uint64 headerOffset,
-                                   ossim_uint64 dataOffset)
-      :theImageHeaderOffset(headerOffset),
-       theImageDataOffset(dataOffset)
-      {
-      }
-   
-   ossim_uint64 theImageHeaderOffset;
-   ossim_uint64 theImageDataOffset;
-};
-
-
-class OSSIMDLLEXPORT ossimNitfSymbolOffsetInformation : public ossimObject
-{
-public:
-   ossimNitfSymbolOffsetInformation(ossim_uint64 headerOffset,
-                                    ossim_uint64 dataOffset)
-      :theSymbolHeaderOffset(headerOffset),
-       theSymbolDataOffset(dataOffset)
-      {
-      }
-   
-   ossim_uint64 theSymbolHeaderOffset;
-   ossim_uint64 theSymbolDataOffset;
-};
-
-class OSSIMDLLEXPORT ossimNitfLabelOffsetInformation : public ossimObject
-{
-public:
-   ossimNitfLabelOffsetInformation(ossim_uint64 headerOffset,
-                                   ossim_uint64 dataOffset)
-      :theLabelHeaderOffset(headerOffset),
-       theLabelDataOffset(dataOffset)
-      {
-      }
-   
-   ossim_uint64 theLabelHeaderOffset;
-   ossim_uint64 theLabelDataOffset;
-};
-
-class OSSIMDLLEXPORT ossimNitfTextOffsetInformation : public ossimObject
-{
-public:
-   ossimNitfTextOffsetInformation(ossim_uint64 headerOffset,
-                                  ossim_uint64 dataOffset)
-      :theTextHeaderOffset(headerOffset),
-       theTextDataOffset(dataOffset)
-      {
-      }
-   
-   ossim_uint64 theTextHeaderOffset;
-   ossim_uint64 theTextDataOffset;
-   
-};
-
-class OSSIMDLLEXPORT ossimNitfDataExtSegOffsetInformation : public ossimObject
-{
-public:
-   ossimNitfDataExtSegOffsetInformation(ossim_uint64 headerOffset,
-                                        ossim_uint64 dataOffset)
-      :theDataExtSegHeaderOffset(headerOffset),
-       theDataExtSegDataOffset(dataOffset)
-      {
-      }
-   
-   ossim_uint64 theDataExtSegHeaderOffset;
-   ossim_uint64 theDataExtSegDataOffset;   
-};
-
-class OSSIM_DLL ossimNitfFileHeader : public ossimObject,
-                                      public ossimPropertyInterface
-{
-public:
-   friend class ossimNitfFile;
-
-   ossimNitfFileHeader();
-   virtual ~ossimNitfFileHeader();
-
-   virtual void parseStream(std::istream &in)= 0;
-   virtual void writeStream(std::ostream &out)=0;
-   
-   virtual bool isEncrypted()const=0;
-   virtual ossim_int32 getNumberOfImages()const=0;
-   virtual ossim_int32 getNumberOfLabels()const=0;
-   virtual ossim_int32 getNumberOfSymbols()const=0;
-   virtual ossim_int32 getNumberOfGraphics()const=0;
-   virtual ossim_int32 getNumberOfTextSegments()const=0;
-   virtual ossim_int32 getNumberOfDataExtSegments()const=0;
-   virtual ossim_int32 getHeaderSize()const=0;
-   
-   void addTag(const ossimNitfTagInformation& tag);
-   virtual void removeTag(const ossimString& tagName);
-   virtual bool  getTagInformation(ossimNitfTagInformation& tag,
-                                   int idx)const;
-
-   virtual int getNumberOfTags()const;
-
-   virtual bool getTag(ossimNitfTagInformation& tagInfo,
-                       const ossimString& tagName)const;
-   
-   virtual ossim_int64 getFileSize()const=0;
-   virtual const char* getVersion()const=0;
-   virtual const char* getDateTime()const=0;
-   virtual ossimDrect getImageRect()const=0;
-   virtual ossimString getSecurityClassification()const=0;
-   
-   bool hasImages()const;
-   bool hasSymbols()const;
-   bool hasGraphics()const;
-   bool hasText()const;
-   bool hasLabels()const;
-   bool hasDataExtSegments()const;
-
-   virtual ossimNitfImageHeader* getNewImageHeader(ossim_uint32 imageNumber,
-                                                   std::istream& in)const=0;
-   virtual ossimNitfSymbolHeader* getNewSymbolHeader(ossim_uint32 symbolNumber,
-                                                    std::istream& in)const=0;
-   virtual ossimNitfLabelHeader* getNewLabelHeader(ossim_uint32 labelNumber,
-                                                   std::istream& in)const=0;
-   virtual ossimNitfTextHeader* getNewTextHeader(ossim_uint32 textNumber,
-                                                std::istream& in)const=0;
-   virtual ossimNitfDataExtensionSegment* getNewDataExtensionSegment(
-      ossim_uint32 dataExtNumber, std::istream& in)const=0;
-   
-   virtual ossimNitfImageHeader*    allocateImageHeader()const=0;
-   virtual ossimNitfSymbolHeader*   allocateSymbolHeader()const=0;
-   virtual ossimNitfLabelHeader*    allocateLabelHeader()const=0;
-   virtual ossimNitfTextHeader*     allocateTextHeader()const=0;
-   virtual ossimNitfDataExtensionSegment *allocateDataExtSegment()const=0;
-
-   virtual ossim_uint32 getTotalTagLength()const;
-
-   /** @brief Sets file length (FL) field. */
-   virtual void setFileLength(ossim_uint64 fileLength) = 0;
-
-   /** @brief Sets header length (HL) field. */
-   virtual void setHeaderLength(ossim_uint64 headerLength) = 0;
-
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-   /**
-    * @brief Print method that outputs a key/value type format
-    * adding prefix to keys.
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix=std::string()) const;
-   
-   /**
-    * @brief print tags method that outputs a key/value type format adding
-    * prefix to keys.
-    */
-   virtual std::ostream& printTags(
-      std::ostream& out,
-      const std::string& prefix=std::string()) const;
-   
-   virtual bool saveState(ossimKeywordlist& kwl, const ossimString& prefix="")const;
-   
-protected:
-   std::vector<ossimNitfTagInformation> theTagList;
-   
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfFileHeaderV2_0.h b/include/ossim/support_data/ossimNitfFileHeaderV2_0.h
deleted file mode 100644
index 70b7246..0000000
--- a/include/ossim/support_data/ossimNitfFileHeaderV2_0.h
+++ /dev/null
@@ -1,605 +0,0 @@
-//*******************************************************************
-//
-//  License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfFileHeaderV2_0.h 18413 2010-11-11 19:56:22Z gpotts $
-#ifndef ossimNitfFileHeaderV2_0_HEADER
-#define ossimNitfFileHeaderV2_0_HEADER
-
-#include <iosfwd>
-#include <ossim/support_data/ossimNitfFileHeaderV2_X.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/support_data/ossimNitfTagInformation.h>
-
-class ossimNitfRegisteredTag;
-
-class ossimNitfImageInfoRecordV2_0
-{
-public:
-   friend std::ostream& operator <<(std::ostream& out,
-                                    const ossimNitfImageInfoRecordV2_0 &data);
-
-   ossim_uint32 getHeaderLength()const;
-   ossim_uint64 getImageLength()const;
-   ossim_uint64 getTotalLength()const;
-   void setSubheaderLength(ossim_uint32 length);
-   void setImageLength(ossim_uint64 length);
-
-   /*!
-    * Is a 6 byte numeric 0-999999
-    */
-   char theImageSubheaderLength[7];
-
-   /*!
-    * Is a 10 byte numeric 0-999999999
-    */
-   char theImageLength[11];
-};
-
-struct ossimNitfSymbolInfoRecordV2_0
-{
-public:
-   friend std::ostream& operator <<(std::ostream& out,
-                               const ossimNitfSymbolInfoRecordV2_0 &data);
-
-   ossim_int32 getHeaderLength()const;
-   ossim_int32 getImageLength()const;
-   ossim_int32 getTotalLength()const;
-   
-   /*!
-    * Is a 4 byte numeric 0-9999
-    */
-   char theSymbolSubheaderLength[5];
-
-   /*!
-    * Is a 6 byte numeric 0-999999
-    */
-   char theSymbolLength[7];
-};
-
-struct ossimNitfLabelInfoRecordV2_0
-{
-public:
-   friend std::ostream& operator <<(std::ostream& out,
-                               const ossimNitfLabelInfoRecordV2_0 &data);
-
-   ossim_int32 getHeaderLength()const;
-   ossim_int32 getImageLength()const;
-   ossim_int32 getTotalLength()const;
-   
-   /*!
-    * Is a 4 byte numeric 0-9999
-    */
-   char theLabelSubheaderLength[5];
-
-   /*!
-    * Is a 3 byte numeric 0-320
-    */
-   char theLabelLength[4];
-};
-
-struct ossimNitfTextInfoRecordV2_0
-{
-public:
-   friend std::ostream& operator <<(std::ostream& out,
-                               const ossimNitfTextInfoRecordV2_0 &data);
-
-   ossim_int32 getHeaderLength()const;
-   ossim_int32 getImageLength()const;
-   ossim_int32 getTotalLength()const;
-   /*!
-    * Is a 4 byte numeric 0-9999
-    */
-   char theTextSubheaderLength[5];
-
-   /*!
-    * Is a 5 byte numeric 0-99999
-    */
-   char theTextLength[6];
-};
-
-struct ossimNitfDataExtSegInfoRecordV2_0
-{
-public:
-   friend std::ostream& operator <<(std::ostream& out,
-                               const ossimNitfDataExtSegInfoRecordV2_0 &data);
-
-   ossim_int32 getHeaderLength()const;
-   ossim_int32 getImageLength()const;
-   ossim_int32 getTotalLength()const;
-   /*!
-    * Is a 4 byte numeric 0-9999
-    */
-   char theDataExtSegSubheaderLength[5];
-
-   /*!
-    * Is a 9 byte numeric 0-999999999
-    */
-   char theDataExtSegLength[10];
-};
-
-struct ossimNitfResExtSegInfoRecordV2_0
-{
-public:
-   friend std::ostream& operator <<(std::ostream& out,
-                               const ossimNitfResExtSegInfoRecordV2_0 &data);
-
-   /*!
-    * Is a 4 byte numeric 0-9999
-    */
-   char theResExtSegSubheaderLength[5];
-
-   /*!
-    * Is a 7 byte numeric 0-9999999
-    */
-   char theResExtSegLength[8];
-};
-
-class OSSIMDLLEXPORT ossimNitfFileHeaderV2_0 : public ossimNitfFileHeaderV2_X
-{
-public:
-   
-   ossimNitfFileHeaderV2_0();
-   virtual ~ossimNitfFileHeaderV2_0();
-
-   /**
-    * @brief parse method.
-    * @return This method returns void but will throw an std::exception in
-    * certain instances if the stream goes bad on seeks.
-    */
-   virtual void parseStream(std::istream &in);
-   
-   virtual void writeStream(std::ostream &out);
-   
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix=std::string()) const;
-   
-   virtual bool isEncrypted()const;
-   virtual ossim_int32 getNumberOfImages()const;
-   virtual ossim_int32 getNumberOfLabels()const;
-   virtual ossim_int32 getNumberOfSymbols()const;
-   virtual ossim_int32 getNumberOfGraphics()const;
-   virtual ossim_int32 getNumberOfTextSegments()const;
-   virtual ossim_int32 getNumberOfDataExtSegments()const;
-   virtual ossim_int32 getHeaderSize()const;
-   virtual ossim_int64 getFileSize()const;
-   virtual ossimString getSecurityClassification()const;
-   
-   virtual const char* getDateTime()const;
-   virtual const char* getVersion()const;
-
-   virtual ossimDrect getImageRect()const;
-  
-   virtual void addImageInfoRecord(const ossimNitfImageInfoRecordV2_0& recordInfo);
-   virtual void replaceImageInfoRecord(ossim_uint32 i, const ossimNitfImageInfoRecordV2_0& recordInfo);
-
-   virtual ossimNitfImageHeader*  getNewImageHeader(ossim_uint32 imageNumber,
-                                                    std::istream& in)const;
-   virtual ossimNitfSymbolHeader* getNewSymbolHeader(ossim_uint32 symbolNumber,
-                                                     std::istream& in)const;
-   virtual ossimNitfLabelHeader* getNewLabelHeader(ossim_uint32 labelNumber,
-                                                   std::istream& in)const;
-   virtual ossimNitfTextHeader*   getNewTextHeader(ossim_uint32 textNumber,
-                                                   std::istream& in)const;
-   virtual ossimNitfDataExtensionSegment* getNewDataExtensionSegment(
-      ossim_uint32 dataExtNumber, std::istream& in)const;
-   
-   virtual ossimNitfImageHeader*  allocateImageHeader()const;
-   virtual ossimNitfSymbolHeader* allocateSymbolHeader()const;
-   virtual ossimNitfLabelHeader*  allocateLabelHeader()const;
-   virtual ossimNitfTextHeader*   allocateTextHeader()const;
-   virtual ossimNitfDataExtensionSegment *allocateDataExtSegment()const;
-
-   virtual void setCodeWords(const ossimString& codeWords);
-   virtual void setControlAndHandling(const ossimString& controlAndHandling);
-   virtual void setReleasingInstructions(const ossimString& releasingInstructions);
-   virtual void setClassificationAuthority(const ossimString& classAuth);
-   virtual void setSecurityControlNumber(const ossimString& controlNo);
-   virtual void setOriginatorsName(const ossimString& originatorName);
-   virtual void setOriginatorsPhone(const ossimString& origniatorPhone);
-
-   virtual ossimString getCodeWords()const;
-   virtual ossimString getControlAndHandling()const;
-   virtual ossimString getReleasingInstructions()const;
-   virtual ossimString getClassificationAuthority()const;
-   virtual ossimString getSecurityControlNumber()const;
-   virtual ossimString getOriginatorsName()const;
-   virtual ossimString getOriginatorsPhone()const;
-
-   ossimString getComplianceLevel()const;
-   ossimString getSecurityDowngrade()const;
-   ossimString getDowngradingEvent()const;
-
-   void setComplianceLevel(const ossimString& complianceLevel);
-   void setSecurityDowngrade(const ossimString& securityDowngrade);
-   void setDowngradingEvent(const ossimString& downgradeEvent);
-
-   virtual void setFileLength(ossim_uint64 fileLength);
-   virtual void setHeaderLength(ossim_uint64 headerLength);
-   /**
-    * Properties of a NITF 2.0 Header file. See MIL-STD-2500A for details.
-    *
-    * To access these, pass the constant to getProperty().
-    */
-   static const ossimString FSDWNG_KW;
-   static const ossimString FSDEVT_KW;
-
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-   
-   virtual bool saveState(ossimKeywordlist& kwl, const ossimString& prefix="")const;
-TYPE_DATA
-private:
-
-   struct ossimNitfDisplayInfo
-   {
-   public:
-      ossimNitfDisplayInfo(const ossimString &filePartType,
-                           ossim_int32 displayLevel,
-                           ossim_int32 indexIntoList)
-         :theFilePartType(filePartType),
-          theDisplayLevel(displayLevel),
-          theIndex(indexIntoList)
-         {
-         }
-      
-      /*!
-       * Since NITF already has unique ids for the file
-       * part types we will just use them.
-       *
-       *  IM  indicates image part
-       *  LA  indicates a label part
-       *  SY   indicates a symbol part
-       */
-      ossimString theFilePartType;
-
-      /*!
-       * This is the display level of the renderable data.  Note the
-       * display level is like a painters algorithm.  The lowest level
-       * is drawn first followed by the next level.
-       */
-      ossim_int32        theDisplayLevel;
-
-      /*!
-       * This is an index into the array that has all the offsets
-       * pre-computed.
-       */
-      ossim_int32        theIndex;
-      
-   };
-
-   void clearFields();
-   /**
-    * Sets the number of image records in the NITF 2.0 File Header.
-    *
-    * @param num
-    *        The number of image records for the entire NITF 2.0 file.
-    *
-    * @throw std::out_of_range
-    */
-   void setNumberOfImageInfoRecords(ossim_uint64 num);
-   
-  /*!
-    * This method will be used to setup information about the file.
-    * Example: NITF files have display levels where the lowest number is the
-    * back most image and the highes number is the front most image.  We
-    * are not guranteed that they will be in order in the file so we must
-    * parse the file and sort the images.  The images include image data,
-    * symbols and labels.  Each of these are renderable.  The lowest
-    * display level should have the larges rect and this will be used
-    * to send back to the user an image rect.  During rasterization we must
-    * know the order to draw the data.
-    */
-   void precomputeValues();
-   
-   void readImageInfoRecords(std::istream &in);
-   void readSymbolInfoRecords(std::istream &in);
-   void readLabelInfoRecords(std::istream &in);
-   void readTextFileInfoRecords(std::istream &in);
-   void readDataExtSegInfoRecords(std::istream &in);
-   void readResExtSegInfoRecords(std::istream &in);
-   /*!
-    * If the header was parsed this method will initialize the offsets
-    * to whare all data resides within the file.  Example:  NITF files
-    * have several sections (Image, Symbol, Labels, Text and Extended data) and
-    * each of these sections have subsections.  The offsets stored are just offsets
-    * from the start of the file to each major section and eqach subsection.
-    */
-   void initializeAllOffsets();
-
-   /*!
-    * This method will be called after the header is read
-    * in and the offsets have been initialized.  It will
-    * sort in order all renderable data based on their
-    * display level.
-    */
-   void initializeDisplayLevels(std::istream& in);
-
-   void insertIntoDisplayInfoList(const ossimNitfDisplayInfo &displayInformation);
-
-   
-   /*!
-    * This is the current file we are operating on.
-    */
-   ossimFilename theFilename;
-   
-   /*!
-    * This will be pre-computed when the header file is opened.  This is computed
-    * after we have found the display order.  We will use the rectangle of the
-    * smallest display number.
-    */
-   ossimDrect theImageRect;
-   
-   /*!
-    * This will hold some pre-computed information about the display
-    * order of the images.  It will be populated by scanning the
-    * file and sorting display levels.
-    */
-   std::vector<ossimNitfDisplayInfo>             theDisplayInformationList;
-   
-   /*!
-    * This will hold pre-computed offsets to the start of all image headers
-    * and start to their data.
-    */
-   std::vector<ossimNitfImageOffsetInformation>  theImageOffsetList;
-
-   /*!
-    * This will hold pre-computed offsets to the start of all symbol headers
-    * and start to their data.
-    */
-   std::vector<ossimNitfSymbolOffsetInformation> theSymbolOffsetList;
-
-   /*!
-    * This will hold pre-computed offsets to the start of all Label headers
-    * and start to their data.
-    */
-   std::vector<ossimNitfLabelOffsetInformation>  theLabelOffsetList;
-
-   /*!
-    * This will hold pre-computed offsets to the start of all text headers
-    * and start to their data.
-    */
-   std::vector<ossimNitfTextOffsetInformation>   theTextOffsetList;
-
-   /*!
-    * This will hold pre-coputed offsets to the start of all the data
-    * extension segments.
-    */
-   std::vector<ossimNitfDataExtSegOffsetInformation> theDataExtSegOffsetList;
-
-
-
-   
-   // Note: these are work variables and not part of the
-   // ossimNitf header.  These variables will be used to quickly
-   // access various parts of the file.
-   /*!
-    * This is not part of the NITF file header.  This will be
-    * computed since somethimes the header size will not be
-    * given in the header field.  This value will hold a count of
-    * all the bytes read for the header portion.  This can be used
-    * to skip past the header data.
-    */
-   ossim_int32 theHeaderSize;
-   
-   /*!
-    * FSCODE: This is a 40 byte Alphanumeric field
-    */
-   char theCodewords[41]; 
-
-   /*!
-    * FSCTLH: This is a 40 byte Alphanumeric field.
-    */
-   char theControlAndHandling[41]; 
-
-   /*!
-    * FSREL: This is a 40 byte Alphanumeric field.
-    */
-   char theReleasingInstructions[41]; 
-
-   /*!
-    * FSCAUT: This is a 20 byte alphanumeric field.
-    */ 
-   char theClassificationAuthority[21];
-
-   /*!
-    * FSCTLN: This is a 20 byte Alphanumeric field.
-    */
-   char theSecurityControlNumber[21]; 
-
-   /*!
-    * FSDWNG:
-    *
-    * This is a 6 byte Alphanumeric.  If this field
-    * is not blank then it will have the form:
-    *
-    *   YYMMDD
-    *
-    *   Where YY is the last 2 chars of the year and will be
-    *            00 to 59 represents 2000 to 2059
-    *            60 to 99 represents 1960 to 1999
-    *
-    *
-    *   if the field is 999999 then the Originating agency field
-    *   is required. If te field is 999998 then the downgrade event
-    *   is required
-    */
-   char theSecurityDowngrade[7];
-
-   /**
-    * FSDEVT:
-    * This is a conditional field and is a 40 byte
-    * Alphanumeric field.  This field exists if the
-    * security downgrade is 999998.
-    */
-   char theDowngradingEvent[41];
-
-   /**
-    * ONAME:
-    *
-    * This is a 27 byte Alphanumeric number
-    */
-   char theOriginatorsName[28];
-
-   /*!
-    * OPHONE:
-    * This is an 18 byte Alphanumeric value. 
-    */
-   char theOriginatorsPhone[19]; 
-
-   /*!
-    * FL:
-    *
-    * This is a required field.
-    *
-    * Is a 12 byte number of the form
-    * 000000000388-999999999998 indicates the
-    * file length and a value of 999999999999
-    * indicates that the file length was not
-    * available.
-    */
-   char theFileLength[13];
-
-   /**
-    * HL:
-    *
-    * This is a reqired field.
-    *
-    * Will hold the header length. The values
-    * range up to 999998 and a value of
-    * 999999 indicates that the length of the
-    * header was not available upon creation.
-    */
-   char theHeaderLength[7];
-
-   /**
-    * NUMI:
-    *
-    * This is a 3 byte field that specifies the number
-    * of images in the file.  0-999
-    */
-   char theNumberOfImageInfoRecords[4];
-
-   /*!
-    * This information is conditional on the number of image
-    * info records field.  If the field is greater than 0 then
-    * the record information is read in up to the indicated number
-    */
-   std::vector<ossimNitfImageInfoRecordV2_0> theNitfImageInfoRecords;
-
-   /*!
-    * This is a 3 byte numeric 0-999.
-    */
-
-   char theNumberOfSymbolInfoRecords[4];
-   /*!
-    * This information is conditional on the number of symbol
-    * info records field.  If the field is greater than 0 then
-    * the record information is read in up to the indicated number
-    */
-   std::vector<ossimNitfSymbolInfoRecordV2_0> theNitfSymbolInfoRecords;
-
-   /**
-    * NUML
-    *
-    * This is a 3 byte numeric 0-999.
-    */
-
-   char theNumberOfLabelInfoRecords[4];
-   
-   /*!
-    * This information is conditional on the number of label
-    * info records field.  If the field is greater than 0 then
-    * the record information is read in up to the indicated number
-    */
-   std::vector<ossimNitfLabelInfoRecordV2_0> theNitfLabelInfoRecords;
-
-   /**
-    * NUMT:
-    *
-    * This is a 3 byte numeric 0-999.
-    */
-   char theNumberOfTextFileInfoRecords[4];
-
-   /*!
-    * This information is conditional on the number of text file
-    * info records field.  If the field is greater than 0 then
-    * the record information is read in up to the indicated number
-    */
-   std::vector<ossimNitfTextInfoRecordV2_0> theNitfTextInfoRecords;
-
-   /**
-    * NUMDES:
-    *
-    * This is a 3 byte numeric 0-999.
-    */
-   char theNumberOfDataExtSegInfoRecords[4];
-
-   /*!
-    * This information is conditional on the number of 
-    * info records field.  If the field is greater than 0 then
-    * the record information is read in up to the indicated number
-    */
-   std::vector<ossimNitfDataExtSegInfoRecordV2_0> theNitfDataExtSegInfoRecords;
-
-   /**
-    * NUMRES:
-    *
-    * This is a 3 byte numeric 0-999. Reserved Extension Segments
-    */
-   char theNumberOfResExtSegInfoRecords[4];
-
-   /*!
-    * This information is conditional on the number of Res Ext Seg
-    * info records field.  If the field is greater than 0 then
-    * the record information is read in up to the indicated number
-    */
-   std::vector<ossimNitfResExtSegInfoRecordV2_0> theNitfResExtSegInfoRecords;
-
-   /**
-    * UDHDL:
-    * 
-    * This is a required field and is a 5 byte numeric ranging
-    * from 0-99999.  This is 0 if there is no data.
-    */
-   char theUserDefinedHeaderDataLength[6];
-
-   /*!
-    * This is a conditional field.  It will exist if the
-    * user defined header length is not 0.  If it exists
-    * then it may contain an overflow into one of the data
-    * extension segments above and will hold the number of that
-    * segment.
-    */
-   char theUserDefinedHeaderOverflow[4];
-
-   /**
-    * XHDL:
-    *
-    * This is a required field.  It is 5 bytes long and
-    * ranges from 0-99999.  0 means there is no data
-    */
-   char theExtendedHeaderDataLength[6];
-
-   /*!
-    * This is a required field.  It is 5 bytes long and
-    * ranges from 0-99999.  0 means there is no data
-    */
-   char theExtendedHeaderOverflow[4];
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfFileHeaderV2_1.h b/include/ossim/support_data/ossimNitfFileHeaderV2_1.h
deleted file mode 100644
index 127ca44..0000000
--- a/include/ossim/support_data/ossimNitfFileHeaderV2_1.h
+++ /dev/null
@@ -1,616 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfFileHeaderV2_1.h 20123 2011-10-11 17:55:44Z dburken $
-#ifndef ossimNitfFileHeaderV2_1_HEADER
-#define ossimNitfFileHeaderV2_1_HEADER
-
-#include <iosfwd>
-
-#include <ossim/support_data/ossimNitfFileHeaderV2_X.h>
-#include <ossim/base/ossimDate.h>
-#include <ossim/base/ossimKeywordlist.h>
-
-class OSSIMDLLEXPORT ossimNitfImageInfoRecordV2_1
-{
-public:
-   friend std::ostream& operator <<(std::ostream& out,
-                                    const ossimNitfImageInfoRecordV2_1 &data);
-   
-   ossim_uint32 getHeaderLength()const;
-   ossim_uint64 getImageLength()const;
-   ossim_uint64 getTotalLength()const;
-   
-   void setSubheaderLength(ossim_uint32 length);
-   void setImageLength(ossim_uint64 length);
-   
-   /**
-    * Is a 6 byte numeric 000439-999999
-    */
-   char theImageSubheaderLength[7];
-   
-   /**
-    * Is a 10 byte numeric 0000000001-9999999999
-    */
-   char theImageLength[11];
-};
-
-
-struct ossimNitfGraphicInfoRecordV2_1
-{
-public:
-   friend std::ostream& operator <<(std::ostream& out,
-                                    const ossimNitfGraphicInfoRecordV2_1 &data);
-   
-   /**
-    * Is a 4 byte numeric 0258-9999
-    */
-   char theGraphicSubheaderLength[5];
-   
-   /**
-    * Is a 6 byte numeric 0000001-9999999
-    */
-   char theGraphicLength[7];
-};
-
-
-class OSSIMDLLEXPORT ossimNitfTextFileInfoRecordV2_1
-{
-public:
-   friend std::ostream& operator<<(std::ostream& out,
-                                   const ossimNitfTextFileInfoRecordV2_1 &data);
-
-
-   ossim_uint32 getHeaderLength()const;
-   ossim_uint32 getTextLength()const;
-   ossim_uint32 getTotalLength()const;
-
-   void setSubheaderLength(ossim_uint32 length);
-   void setTextLength(ossim_uint64 length);
-   
-   /**
-    * Is a 4 byte numeric 0282-9999
-    */
-   char theTextFileSubheaderLength[5];
-
-   /**
-    * Is a 5 byte numeric 0-99999
-    */
-   char theTextFileLength[6];
-};
-
-struct ossimNitfDataExtSegInfoRecordV2_1
-{
-public:
-   friend std::ostream& operator<<(std::ostream& out,
-                                   const ossimNitfDataExtSegInfoRecordV2_1 &data);
-
-   /**
-    * Is a 4 byte numeric 200-9999
-    */
-   char theDataExtSegSubheaderLength[5];
-
-   /**
-    * Is a 9 byte numeric 0-999999999
-    */
-   char theDataExtSegLength[10];
-};
-
-struct ossimNitfResExtSegInfoRecordV2_1
-{
-public:
-   friend std::ostream& operator<<(std::ostream& out,
-                                   const ossimNitfResExtSegInfoRecordV2_1 &data);
-
-   /**
-    * Is a 4 byte numeric 0-9999
-    */
-   char theResExtSegSubheaderLength[5];
-
-   /**
-    * Is a 7 byte numeric 0-9999999
-    */
-   char theResExtSegLength[8];
-};
-
-class OSSIMDLLEXPORT ossimNitfFileHeaderV2_1 : public ossimNitfFileHeaderV2_X
-{
-public:
-   
-   ossimNitfFileHeaderV2_1();
-   virtual ~ossimNitfFileHeaderV2_1();
-   virtual void parseStream(std::istream &in);
-   virtual void writeStream(std::ostream &out);
-   virtual bool isEncrypted()const;
-   virtual ossim_int32 getNumberOfImages()const;
-   virtual ossim_int32 getNumberOfLabels()const;
-   virtual ossim_int32 getNumberOfSymbols()const;
-   virtual ossim_int32 getNumberOfGraphics()const;
-   virtual ossim_int32 getNumberOfTextSegments()const;
-   virtual ossim_int32 getNumberOfDataExtSegments()const;
-   virtual ossim_int32 getHeaderSize()const;
-   virtual ossim_int64 getFileSize()const;
-   virtual const char* getVersion()const;
-   virtual const char* getDateTime()const;
-   virtual ossimDrect getImageRect()const;
-
-   virtual void addImageInfoRecord(const ossimNitfImageInfoRecordV2_1& recordInfo);
-   virtual void addTextInfoRecord(const ossimNitfTextFileInfoRecordV2_1& recordInfo);
-	virtual void addDataExtSegInfoRecord(const ossimNitfDataExtSegInfoRecordV2_1& recordInfo);
-
-   virtual void replaceImageInfoRecord(int i, const ossimNitfImageInfoRecordV2_1& recordInfo);
-   
-   virtual ossimNitfImageHeader*  getNewImageHeader(ossim_uint32 imageNumber,
-                                                    std::istream& in)const;
-   virtual ossimNitfSymbolHeader* getNewSymbolHeader(ossim_uint32 symbolNumber,
-                                                     std::istream& in)const;
-   virtual ossimNitfLabelHeader* getNewLabelHeader(ossim_uint32 labelNumber,
-                                                   std::istream& in)const;
-   virtual ossimNitfTextHeader* getNewTextHeader(ossim_uint32 textNumber,
-                                                   std::istream& in)const;
-   virtual ossimNitfDataExtensionSegment* getNewDataExtensionSegment(
-      ossim_uint32 dataExtNumber, std::istream& in)const;
-
-   virtual ossimNitfImageHeader*  allocateImageHeader()const;
-   virtual ossimNitfSymbolHeader* allocateSymbolHeader()const;
-   virtual ossimNitfLabelHeader*  allocateLabelHeader()const;
-   virtual ossimNitfTextHeader*   allocateTextHeader()const;
-   virtual ossimNitfDataExtensionSegment *allocateDataExtSegment()const;
-
-   virtual ossimString getSecurityClassificationSys()const;
-   virtual ossimString getCodeWords()const;
-   virtual ossimString getControlAndHandling()const;
-   virtual ossimString getReleasingInstructions()const;
-   virtual ossimString getDeclassificationType()const;
-   virtual ossimString getDeclassificationDate()const;
-   virtual ossimString getDeclassificationExemption()const;
-   virtual ossimString getDowngrade()const;
-   virtual ossimString getDowngradingDate()const;
-   virtual ossimString getClassificationText()const;
-   virtual ossimString getClassificationAuthorityType()const;
-   virtual ossimString getClassificationAuthority()const;
-   virtual ossimString getClassificationReason()const;
-   virtual ossimString getSecuritySourceDate()const;
-   virtual ossimString getSecurityControlNumber()const;
-   virtual void getBackgroundColor(ossim_uint8& r,
-                                   ossim_uint8& g,
-                                   ossim_uint8& b)const;
-   virtual ossimString getOriginatorsName()const;
-   virtual ossimString getOriginatorsPhone()const;
-   
-   virtual void setFileLength(ossim_uint64 fileLength);
-   virtual void setHeaderLength(ossim_uint64 headerLength);
-   
-   virtual void setSecurityClassificationSys(const ossimString& value);
-   virtual void setCodeWords(const ossimString& codeWords);
-   virtual void setControlAndHandling(const ossimString& controlAndHandling);
-   virtual void setReleasingInstructions(const ossimString& releasingInstructions);
-   virtual void setDeclassificationType(const ossimString& declassType);
-   virtual void setDeclassificationDate(const ossimLocalTm& declassDate);
-   virtual void setDeclassificationDate(const ossimString& declassDate);
-   virtual void setDeclassificationExemption(const ossimString& exemption);
-   virtual void setDowngrade(const ossimString& downgrade);
-   virtual void setDowngradingDate(const ossimLocalTm& date);
-   virtual void setDowngradingDate(const ossimString& date);
-   virtual void setClassificationText(const ossimString& classificationText);
-   virtual void setClassificationAuthorityType(const ossimString& authorityType);
-   virtual void setClassificationAuthority(const ossimString& authorityType);
-   virtual void setClassificationReason(const ossimString& reason);
-   virtual void setSecuritySourceDate(const ossimLocalTm& date);
-   virtual void setSecuritySourceDate(const ossimString& date);
-   virtual void setSecurityControlNumber(const ossimString& number);
-   virtual void setFileBackgroundColor(ossim_uint8 r,
-                                       ossim_uint8 g,
-                                       ossim_uint8 b);
-   virtual void setOriginatorsName(const ossimString& name);
-   virtual void setOriginatorsPhone(const ossimString& phone);
-   
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-   /*!
-    * @brief Method to set fields from a keyword list.
-    *
-    * This is not a true loadState as it does not lookup/initialize all class
-    * members.  This was added to allow defaults, e.g OSTAID, to be set via a
-    * site configuration file.
-    * Code does not return false if a field(key) is not found..
-    *
-    * @return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-
-   /**
-    * Properties of a NITF 2.1 Header file. See MIL-STD-2500B for details.
-    *
-    * To access these, pass the constant to getProperty().
-    */
-   static const ossimString FSCLSY_KW;
-   static const ossimString FSDCTP_KW;
-   static const ossimString FSDCDT_KW;
-   static const ossimString FSDCXM_KW;
-   static const ossimString FSDG_KW;
-   static const ossimString FSDGDT_KW;
-   static const ossimString FSCLTX_KW;
-   static const ossimString FSCATP_KW;
-   static const ossimString FSCRSN_KW;
-   static const ossimString FSSRDT_KW;
-   static const ossimString FBKGC_KW;
-   
-   void clearFields();
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix=std::string()) const;
-   
-private:
-   /**
-    * Sets the number of image records in the NITF 2.1 File Header.
-    *
-    * @param num
-    *        The number of image records for the entire NITF 2.1 file.
-    *
-    * @throw std::out_of_range
-    */
-   void setNumberOfImageInfoRecords(ossim_uint64 num);
-   void setNumberOfTextInfoRecords(ossim_uint64 num);
-   void setNumberOfGraphicInfoRecords(ossim_uint64 num);
-   void setNumberOfDataExtSegInfoRecords(ossim_uint64 num);
-
-   void readImageInfoRecords(std::istream &in);
-   void readGraphicInfoRecords(std::istream &in);
-   void readTextFileInfoRecords(std::istream &in);
-   void readDataExtSegInfoRecords(std::istream &in);
-   void readResExtSegInfoRecords(std::istream &in);
-
-   /**
-    * If the header was parsed this method will initialize the offsets
-    * to whare all data resides within the file.  Example:  NITF files
-    * have several sections (Image, Symbol, Labels, Text and Extended data) and
-    * each of these sections have subsections.  The offsets stored are just offsets
-    * from the start of the file to each major section and eqach subsection.
-    */
-   void initializeAllOffsets();
-   
-   // Note: these are work variables and not part of the
-   // Nitf header.  These variables will be used to quickly
-   // access various parts of the file.
-   /**
-    * This is not part of the NITF file header.  This will be
-    * computed since somethimes the header size will not be
-    * given in the header field.  This value will hold a count of
-    * all the bytes read for the header portion.  This can be used
-    * to skip past the header data.
-    */
-   ossim_uint32 theHeaderSize;
-
-   /**
-    * This will be pre-computed when the header file is opened.  This is
-    * computed after we have found the display order.  We will use the
-    * rectangle of the smallest display number.
-    */
-   ossimDrect theImageRect;
-   
-   /**
-    * This will hold pre-computed offsets to the start of all image headers
-    * and start to their data.
-    */
-   std::vector<ossimNitfImageOffsetInformation>  theImageOffsetList;
-   
-   // START Of header variables
-   /**
-    * Field: FSCLSY
-    * 
-    * Is a 2 byte field.  Required but can be blank:
-    *
-    */
-   char theSecurityClassificationSys[3];
-
-   /**
-    * Field: FSCODE
-    * 
-    * This is a 11 byte Alphanumeric field
-    */
-   char theCodewords[12]; 
-
-   /**
-    * Field: FSCTLH
-    * 
-    * This is a 2 byte Alphanumeric field.
-    */
-   char theControlAndHandling[3]; 
-
-   /**
-    * Field: FSREL
-    * 
-    * This is a 20 byte Alphanumeric field.
-    */
-   char theReleasingInstructions[21]; 
-
-   /**
-    * Field: FSDCTP
-    * 
-    * This is a 2 byte alphanumeric field.
-    * 
-    * DD    declassify on a specific date
-    * DE    declassify upon occurrence of an event
-    * GD    downgrade to a specified level on a specific date)
-    * GE    downgrade to a specified level upon occurrence of an event)
-    * O     OADR
-    * X     exempt from automatic declassification
-    *
-    * NOTE: If this field is all BCS spaces (0x20), it shall imply that no
-    *       file security declassification or
-    */ 
-   char theDeclassificationType[3];
-
-   /**
-    * Field: FSDCDT
-    * 
-    * This is a 8 byte field and has the form
-    * CCYYMMDD where:
-    *
-    * CC is the firs 2 chars of the year 00-99
-    * YY is the second 2 chars of the year 00-99
-    * MM is the month 01-12
-    * DD is the day 01-31
-    */
-   char theDeclassificationDate[9]; 
-
-   /**
-    * Field: FSDCXM
-    * 
-    * Is a 4 byte field
-    */
-   char theDeclassificationExemption[5];
-   
-   /**
-    * Field: FSDG
-    * 
-    * Can be blank.  Is a 1 byte field valid
-    * values are:
-    *
-    * S = secret
-    * C = Confidential
-    * R = Restricted
-    * 0x20 or BCS spaces.
-    *
-    * if spaces then security downgrading does not apply.
-    */
-   char theDowngrade[2];
-
-   /**
-    * Field: FSDGDT
-    * 
-    * Is an 8 byte field of the form
-    * CCYYMMDD.
-    */
-   char theDowngradingDate[9];
-
-   /**
-    * Field: FSCLTX
-    * 
-    * Is a 43 byte field and can contain BCS spaces (0x20).
-    */
-   char theClassificationText[44];
-
-   /**
-    * Field: FSCATP
-    *
-    * Values can be:
-    * 
-    * O  Original classification authority
-    * D  derivative from a single source
-    * M  derivative from multiple sources
-    * 
-    * Is a 1 byte field and can contain BCS spaces (0x20).
-    */
-   char theClassificationAuthorityType[2];
-
-   /**
-    * Field: FSCAUT
-    * 
-    * Is a 40 byte field and can contain BCS spaces (0x20).
-    */
-   char theClassificationAuthority[41];
-
-   /**
-    * Field: FSCRSN
-    * 
-    * Is a 1 byte field and can contain BCS spaces (0x20).
-    *
-    * Valid values are A-G
-    */
-   char theClassificationReason[2];
-
-   /**
-    * Field: FSSRDT
-    * 
-    * Is a 8 byte field of the form CCYYMMDD and can be
-    * BCS space (0x20).
-    */
-   char theSecuritySourceDate[9];
-
-   /**
-    * Field: FSCTLN
-    * 
-    * Is a 15 byte field and can be blank (0x20)
-    */
-   char theSecurityControlNumber[16];
-   
-   /**
-    * Field: FBKGC
-    * 
-    * Required.  Is a 3 byte field and is reuqired.  Note:  This
-    * field is binary and has range
-    *
-    *      (0x00-0xff, 0x00-0xff, 0x00-0xff)
-    *
-    * each byte can range from 0 to 255 binary
-    */
-   ossim_uint8 theFileBackgroundColor[3];
-   
-   /**
-    * Field: ONAME
-    * 
-    * This is a 24 byte Alphanumeric number
-    */
-   char theOriginatorsName[25];
-
-   /**
-    * Field: OPHONE
-    * 
-    * This is an 18 byte Alphanumeric value. 
-    */
-   char theOriginatorsPhone[19]; 
-
-   /**
-    * Field: FL
-    * 
-    * This is a required field.
-    *
-    * Is a 12 byte number of the form
-    * 000000000388-999999999998 indicates the
-    * file length and a value of 999999999999
-    * indicates that the file length was not
-    * available.
-    */
-   char theFileLength[13];
-
-   /**
-    * Field: HL
-    * 
-    * This is a reqired field.
-    *
-    * ranges from 000388-999999.
-    */
-   char theHeaderLength[7];
-
-   /**
-    * Field: NUMI
-    * 
-    * This is a 3 byte field that specifies the number
-    * of images in the file.  0-999
-    */
-   char theNumberOfImageInfoRecords[4];
-
-   /**
-    * This information is conditional on the number of image
-    * info records field.  If the filed is greater than 0 then
-    * the record information is read in up t the indicated number
-    */
-   std::vector<ossimNitfImageInfoRecordV2_1> theNitfImageInfoRecords;
-
-   /**
-    * Field: NUMS
-    * 
-    * This info is required and ranges from 000-999.
-    */
-   char theNumberOfGraphicInfoRecords[4];
-
-   /**
-    * This is an optional field and will depend on
-    * theNumberOfGraphicInfoRecords.  If 0 then does not exist.
-    */
-   std::vector<ossimNitfGraphicInfoRecordV2_1> theNitfGraphicInfoRecords;
-
-   /**
-    * Field: NUMX
-    * 
-    * Is a 3 byte field and is reserved for future use.
-    */
-   char theReservedForFutureUse1[4];
-   
-   /**
-    * Field: NUMT
-    * 
-    * This is a 3 byte numeric 0-999.
-    */
-   char theNumberOfTextFileInfoRecords[4];
-
-   /**
-    * This information is conditional on the number of text file
-    * info records field.  If the filed is greater than 0 then
-    * the record information is read in up t the indicated number
-    */
-   std::vector<ossimNitfTextFileInfoRecordV2_1> theNitfTextFileInfoRecords;
-
-   /**
-    * Field: NUMDES
-    * 
-    * This is a 3 byte numeric 0-999.
-    */
-   char theNumberOfDataExtSegInfoRecords[4];
-
-   /**
-    * This information is conditional on the number of 
-    * info records field.  If the filed is greater than 0 then
-    * the record information is read in up t the indicated number
-    */
-   std::vector<ossimNitfDataExtSegInfoRecordV2_1> theNitfDataExtSegInfoRecords;
-
-   /**
-    * Field: NUMRES
-    * 
-    * This is a 3 byte numeric 0-999. Reserved Extension Segments
-    */
-   char theNumberOfResExtSegInfoRecords[4];
-
-   /**
-    * This information is conditional on the number of Res Ext Seg
-    * info records field.  If the filed is greater than 0 then
-    * the record information is read in up t the indicated number
-    */
-   std::vector<ossimNitfResExtSegInfoRecordV2_1> theNitfResExtSegInfoRecords;
-
-   /**
-    * Field: UDHDL
-    * 
-    * This is a required field and is a 5 byte numeric ranging
-    * from 0-99999.  This is 0 if there is no data.  Valid values
-    * are 00000 or 00003-99999
-    */
-   char theUserDefinedHeaderDataLength[6];
-
-   /**
-    * Field: UDHOFL
-    * 
-    * This exists if theUserDefinedHeaderDataLength is not 0.
-    */
-   char theUserDefinedHeaderOverflow[4];
-
-   /**
-    * Field: XHDL
-    * 
-    * This is a required field.  It is 5 bytes long and
-    * ranges from 0-99999.  0 means there is no data
-    */
-   char theExtendedHeaderDataLength[6];
-
-   /**
-    * Field: XHDLOFL
-    * 
-    * This is conditional on theExtendedHeaderDataLength.  If
-    * that field is 0 then this does not exist.  This is a 3
-    * byte field.
-    */
-   char theExtendedHeaderDataOverflow[4];
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfFileHeaderV2_X.h b/include/ossim/support_data/ossimNitfFileHeaderV2_X.h
deleted file mode 100644
index ee1c473..0000000
--- a/include/ossim/support_data/ossimNitfFileHeaderV2_X.h
+++ /dev/null
@@ -1,254 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimNitfFileHeaderV2_X.h 20123 2011-10-11 17:55:44Z dburken $
-
-#ifndef ossimNitfFileHeaderV2_X_HEADER
-#define ossimNitfFileHeaderV2_X_HEADER
-#include <ossim/base/ossimConstants.h>
-#include <ossim/support_data/ossimNitfFileHeader.h>
-
-class ossimKeywordlist;
-class ossimLocalTm;
-
-class OSSIM_DLL ossimNitfFileHeaderV2_X : public ossimNitfFileHeader
-{
-public:
-   ossimNitfFileHeaderV2_X();
-
-   static ossimString formatDate(const ossimString& version,
-                                 const ossimLocalTm& d);
-
-   virtual void setCodeWords(const ossimString& codeWords) = 0;
-   virtual void setControlAndHandling(const ossimString& controlAndHandling) = 0;
-   virtual void setReleasingInstructions(const ossimString& releasingInstructions) = 0;
-   virtual void setClassificationAuthority(const ossimString& classAuth) = 0;
-   virtual void setSecurityControlNumber(const ossimString& controlNo) = 0;
-   virtual void setOriginatorsName(const ossimString& originatorName) = 0;
-   virtual void setOriginatorsPhone(const ossimString& origniatorPhone) = 0;
-
-   virtual ossimString getCodeWords()const = 0;
-   virtual ossimString getControlAndHandling()const = 0;
-   virtual ossimString getReleasingInstructions()const = 0;
-   virtual ossimString getClassificationAuthority()const = 0;
-   virtual ossimString getSecurityControlNumber()const = 0;
-   virtual ossimString getOriginatorsName()const = 0;
-   virtual ossimString getOriginatorsPhone()const = 0;
-
-   virtual ossimString getSecurityClassification()const;
-   void setComplexityLevel(const ossimString& level);
-   void setSystemType(const ossimString& systemType);
-   void setOriginatingStationId(const ossimString& originationId);
-
-   /**
-    * @brief Sets field FDT.
-    *
-    * Version 2.0 format: DDHHMMSSZMONYY
-    * Version 2.1 format: CCYYMMDDhhmmss
-    *
-    * @param ossimLocalTm Local time.  Note that this will be converted to
-    * GMT(ZULU).
-    */
-   void setDate(const ossimLocalTm& d);
-
-   
-   /**
-    * @brief Sets field FDT.
-    *
-    * @param d Date string to copy to FDT field.
-    *
-    * @note No conversions performed. 
-    */
-   void setDate(const ossimString& d);
-
-   /**
-    * @brief Sets field FDT to current time converted to GMT(ZULU).
-    *
-    * Version 2.0 format: DDHHMMSSZMONYY
-    * Version 2.1 format: CCYYMMDDhhmmss
-    */
-   virtual void setDate();
-
-   void setTitle(const ossimString& title);
-   void setFileSecurityClassification(const ossimString& securityClassification);
-   void setCopyNumber(const ossimString& copyNumber);
-   void setNumberOfCopies(const ossimString& numberOfCopies);
-   void setEncryption(const ossimString& encryption);
-
-   ossimString getComplexityLevel()const;
-   ossimString getSystemType()const;
-   ossimString getOriginatingStationId()const;
-   ossimString getDate()const;
-   ossimString getTitle()const;
-   ossimString getCopyNumber()const;
-   ossimString getNumberOfCopies()const;
-   ossimString getEncryption()const;
-
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-   bool saveState(ossimKeywordlist& kwl, const ossimString& prefix="")const;
-
-   /*!
-    * @brief Method to set fields from a keyword list.
-    *
-    * This is not a true loadState as it does not lookup/initialize all class
-    * members.  This was added to allow defaults, e.g OSTAID, to be set via a
-    * site configuration file.
-    * Code does not return false if a field(key) is not found..
-    *
-    * @return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-   /**
-    * Properties of a NITF 2.x Header file. See MIL-STD-2500A or
-    * MIL-STD-2500B for details.
-    *
-    * To access these, pass the constant to getProperty().
-    */
-   static const ossimString FILE_TYPE_KW;
-   static const ossimString FHDR_KW;
-   static const ossimString VERSION_KW;
-   static const ossimString CLEVEL_KW;
-   static const ossimString STYPE_KW;
-   static const ossimString OSTAID_KW;
-   static const ossimString FDT_KW;
-   static const ossimString FTITLE_KW;
-   static const ossimString FSCLAS_KW;
-   static const ossimString FSCODE_KW;
-   static const ossimString FSCTLH_KW;
-   static const ossimString FSREL_KW;
-   static const ossimString FSCAUT_KW;
-   static const ossimString FSCTLN_KW;
-   static const ossimString FSCOP_KW;
-   static const ossimString FSCPYS_KW;
-   static const ossimString ENCRYP_KW;
-   static const ossimString ONAME_KW;
-   static const ossimString OPHONE_KW;
-
-protected:
-
-   /**
-    * Field: FHDR
-    * Required field for NITF and is a 9 byte value
-    *
-    * format is NITFNN.NN where NN.NN is the version
-    * number. The valid version number for this class
-    * is NITF02.10.
-    *
-    * NOTE: This field may contain NSIF01.00 which is also the same as NITF02.10
-    * 
-    */
-   char  theFileTypeVersion[10]; // nine bytes
-
-   /**
-    * Field: CLEVEL
-    * 
-    * Required field. 2 byte field ranges from 01-99
-    */
-   char  theComplexityLevel[3];  // 2 bytes
-
-   /**
-    * Field: STYPE
-    * 
-    * Required field. 4 bytes
-    */
-   char  theSystemType[5];      // four bytes
-
-   /**
-    * Field: OSTAID
-    * 
-    * Is required 10 byte field and can't be blank
-    * 
-    */
-   char  theOriginatingStationId[11]; // ten bytes
-
-   /**
-    * Field: FDT
-    * 
-    * for NITF 2.1 format we have
-    *
-    * Has the form CCYYMMDDhhmmss and is a required field
-    *
-    * where CC is the first two digits of the year 00-99
-    *       YY is the last 2 digits of the year 00-99
-    *       MM is the month 01-12
-    *       DD is the day 01-31
-    *       hh is the hour 00-23
-    *       mm is the minutes 00-59
-    *       ss is the seconds 00-59
-    *
-    * For NITF 2.0 format we have
-    *
-    * DDHHMMSSZMONYY
-    *
-    * where  DD is the day
-    *        HH is the hour
-    *        MM is the minutes
-    *        SS is the seconds
-    *        MON is the first 3 characters of the month
-    *        YY is the 2 digit year
-    */
-   char  theDateTime[15];  // 14 bytes
-
-   /**
-    * Field: FTITLE
-    * 
-    * Is a required field and is an 80 byte
-    * Alphanumeric value this can be all BCS spaces.
-    */
-   char  theFileTitle[81]; // 80 bytes
-
-   /**
-    * Field: FSCLAS
-    * 
-    * This is a reqired field and is 1 byte long and
-    * can contain one of the following:
-    *
-    *  T      Top secret
-    *  S      Secret
-    *  C      Confidential
-    *  R      Restricted
-    *  U      Unclassified
-    */
-   char theSecurityClassification[2];
-
-   /**
-    * Field: FSCOP
-    * 
-    * This is the copy number and is a 5 byte
-    * numeric of the form 00000-99999.  This field
-    * is required.
-    */
-   char theCopyNumber[6];
-
-   /**
-    * Field: FSCOPYS
-    * 
-    * This is the total number of copies that exist.
-    * This is a 5 byte numeric of the form 00000-99999.  This
-    * field is required.
-    */
-   char theNumberOfCopies[6];
-
-   /**
-    * Field: ENCRYP
-    * 
-    * This is a reqired field and is a 1 byte numeric
-    * where 0 is not encrypted and 1 is encrypted.  This field
-    * is reuqired.
-    */
-   char theEncryption[2];
-
-TYPE_DATA
-};
-
-#endif
-
diff --git a/include/ossim/support_data/ossimNitfGeoPositioningTag.h b/include/ossim/support_data/ossimNitfGeoPositioningTag.h
deleted file mode 100644
index dbf5c84..0000000
--- a/include/ossim/support_data/ossimNitfGeoPositioningTag.h
+++ /dev/null
@@ -1,229 +0,0 @@
-//********************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author:      Garrett Potts
-// 
-// Description: Nitf support class
-//
-// Documentation reference:
-// DIGEST Part 2 Annex D - Appendix 1, Table D1-3
-// 
-//********************************************************************
-// $Id: ossimNitfGeoPositioningTag.h 22013 2012-12-19 17:37:20Z dburken $
-//
-#ifndef ossimNitfGeoPositioningTag_HEADER
-#define ossimNitfGeoPositioningTag_HEADER 1
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-
-class OSSIM_DLL ossimNitfGeoPositioningTag : public ossimNitfRegisteredTag
-{
-public:
-   ossimNitfGeoPositioningTag();
-   virtual ~ossimNitfGeoPositioningTag();
-
-   virtual void parseStream(std::istream& in);
-   virtual void writeStream(std::ostream& out);
-
-   virtual void clearFields();
-
-   /**
-    * @brief Print method that outputs a key/value type format
-    * adding prefix to keys.
-    * @param out Stream to output to.
-    * @param prefix Prefix added to key like "image0.";
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix=std::string()) const;
-   
-protected:
-   /**
-    * FIELD: TYP
-    *
-    * required 3 byte field.
-    * 
-    * Coordinate System Type
-    *
-    * This field shall contain the type of coordinate system to which the Image
-    * Segment refers.  Valid values are GEO for a geographic coordinate
-    * system (longitude & latitude), MAP for a cartographic (grid)
-    * coordinate system (easting & northing) and DIG for a geographic or
-    * cartographic coordinate system registered through location grids or
-    * registration points.
-    * See clause D1.2.2 for details.
-    * The default value is MAP.
-    *
-    *
-    * Values: MAP, GEO or DIG 
-    */
-   char theType[4];
-
-   /**
-    * FIELD: UNI
-    *
-    * required 3 byte field.
-    *
-    * Coordinate Units This field shall contain the units of measure to which
-    * the Image Segment refers.  Valid values are SEC (Decimal seconds of arc),
-    * DEG (Decimal degrees) and M (Metres).  The value must be consistent with
-    * the coordinate system type.  SEC and DEG are not allowed when the
-    * coordinate system type is MAP.  M is not allowed when the coordinate system
-    * type is GEO.  The PRJPS extension is expected when the value is M.
-    * The default value is M.
-    */
-   char theCoordinateUnits[4];
-
-
-   /**
-    * FIELD: DAG
-    * 
-    * required 80 byte field.
-    * 
-    * Geodetic Datum Name
-    *
-    * This field shall contain the name of the geodetic datum to which the
-    * Image Segment refers.
-    * The default value is World Geodetic System 1984.
-    * 
-    */
-   char theGeodeticDatumName[81];
-
-   /**
-    * FIELD: DCD
-    *
-    * required 4 byte field.
-    * 
-    * Geodetic Datum Code This field shall contain the code of the geodetic
-    * datum to which the Image Segment refers. The default value is WGE.
-    * 
-    */
-   char theGeodeticDatumCode[5];
-
-   /**
-    * FIELD: ELL
-    *
-    * required 80 byte field.
-    *
-    * Ellipsoid Name
-    *
-    * This field shall contain the name of the ellipsoid to which the
-    * Image Segment refers. The default value is World Geodetic System 1984.
-    * 
-    */
-   char theEllipsoidName[81];
-
-   /**
-    * FIELD: ELC
-    *
-    * required 3 byte field.
-    *
-    * Ellipsoid Code This field shall contain the code of the ellipsoid to
-    * which the Image Segment refers.
-    * The default value is WE.
-    * 
-    */
-   char theEllipsoidCode[4];
-
-   /**
-    * FIELD: DVR
-    *
-    * required 80 byte field.
-    *
-    * Vertical Datum Reference This field shall contain the name of the vertical
-    * datum reference to which the Image Segment refers, or BCS Spaces if no elevation value
-    * appears in the Image Segment. The default name is Geodetic. 
-    */
-   char theVerticalDatumReference[81];
-
-   /**
-    * FIELD: VDCDVR
-    *
-    * required 4 byte field.
-    * 
-    * Code (Category) of Vertical Reference This field shall contain the code
-    * (or category) of the vertical reference to which the Image Segment
-    * refers, or BCS Spaces if no elevation value appears in the Image Segment.
-    * The default code is GEOD.
-    * 
-    */
-   char theVerticalReferenceCode[5];
-
-   /**
-    * FIELD: SDA
-    *
-    * required 80 byte field.
-    * 
-    * Sounding Datum Name This field shall contain the name of the sounding datum
-    * to which the Image Segment refers, or BCS Spaces i
-    * f no sounding appears in the Image Segment.
-    * The default value is Mean Sea.
-    */
-   char theSoundingDatumName[81];
-
-   /**
-    * FIELD: VDCSDA
-    *
-    * required 4 byte field.
-    * 
-    * Code for  Sounding Datum This field shall contain the code of the
-    * sounding datum to which the Image Segment refers, or BCS Spaces
-    * if no sounding appears in the Image Segment.
-    * The default valid code is MSL. 4BCS-A See Part 3-6 <R> 
-    */
-   char theSoundingDatumCode[5];
-
-   /**
-    * FIELD ZOR
-    *
-    * required 15 byte field
-    *
-    * Z values False Origin
-    *
-    * This field shall contain the elevation and depth false origin for Z values
-    * to which the Image Segment refers. The default value is 000000000000000,
-    * which implies that there is no projection false Z origin. 15 BCS-N positive integer
-    * 
-    */
-   char theZFalseOrigin[16];
-
-   /**
-    * FIELD: GRD
-    *
-    * required 3 byte field.
-    * 
-    * Grid Code This field shall contain the identification code of the grid system
-    * to which the Image Segment refers, or BCS Spaces. The default value is
-    * BCS Spaces. 3BCS-A See Part 3-6 <R> 
-    */
-   char theGridCode[4];
-
-   /**
-    * FIELD: GRN
-    *
-    * required 80 byte field.
-    *
-    * Grid Description If the GRD Field value is not BCS Spaces, this field can
-    * contain a text description of the grid system.
-    * The default value is BCS Spaces. 80 BCS-A <R> 
-    */
-   char theGridDescription[81];
-
-   /**
-    * FIELD: ZNA
-    *
-    * required 4 byte field.
-    *
-    * Grid Zone number This field shall contain the zone number when the GRD
-    * Field contains a significant grid code and the corresponding grid system
-    * comprises more than one zone. Defaulted to 0000 otherwise.
-    * 4 BCS-N integer See Part 3-6 R 
-    */
-   char theGridZoneNumber[5];
-
-   
-TYPE_DATA   
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfImageBand.h b/include/ossim/support_data/ossimNitfImageBand.h
deleted file mode 100644
index dbb6388..0000000
--- a/include/ossim/support_data/ossimNitfImageBand.h
+++ /dev/null
@@ -1,47 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfImageBand.h 14244 2009-04-07 20:36:40Z dburken $
-#ifndef ossimNitfImageBand_HEADER
-#define ossimNitfImageBand_HEADER
-#include <iosfwd>
-#include <string>
-#include <ossim/support_data/ossimNitfImageLut.h>
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimRefPtr.h>
-
-class ossimNitfImageBand : public ossimObject
-{
-public:
-   ossimNitfImageBand();
-   virtual ~ossimNitfImageBand();
-   virtual void parseStream(std::istream& in)=0;
-   virtual void writeStream(std::ostream& out)=0;
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out Stream to output to.
-    * @param prefix Like "image0."
-    * @param band zero based band.
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix,
-                               ossim_uint32 band)const=0;
-
-   virtual ossim_uint32 getNumberOfLuts()const=0;
-   virtual const ossimRefPtr<ossimNitfImageLut> getLut(ossim_uint32 idx)const=0;
-   virtual ossimRefPtr<ossimNitfImageLut> getLut(ossim_uint32 idx)=0;
-
-TYPE_DATA;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfImageBandV2_0.h b/include/ossim/support_data/ossimNitfImageBandV2_0.h
deleted file mode 100644
index 9702655..0000000
--- a/include/ossim/support_data/ossimNitfImageBandV2_0.h
+++ /dev/null
@@ -1,112 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfImageBandV2_0.h 15416 2009-09-11 20:58:51Z dburken $
-#ifndef ossimNitfImageBandV2_0_HEADER
-#define ossimNitfImageBandV2_0_HEADER
-
-#include <string>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/support_data/ossimNitfImageBand.h>
-#include <ossim/support_data/ossimNitfImageLutV2_0.h>
-
-class OSSIM_DLL ossimNitfImageBandV2_0 : public ossimNitfImageBand
-{
-public:
-   
-   /** default constructor */
-   ossimNitfImageBandV2_0();
-
-   /** virtual destructory */
-   virtual ~ossimNitfImageBandV2_0();
-   
-   virtual void parseStream(std::istream& in);
-   virtual void writeStream(std::ostream& out);
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out Stream to output to.
-    * @param prefix Like "image0."
-    * @param band zero based band.
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix=std::string(),
-                               ossim_uint32 band=0) const;   
-   
-   virtual ossim_uint32 getNumberOfLuts()const;
-   virtual const ossimRefPtr<ossimNitfImageLut> getLut(ossim_uint32 idx)const;
-   virtual ossimRefPtr<ossimNitfImageLut> getLut(ossim_uint32 idx);
-
-   /** @return The band representation as an ossimString. */
-   virtual ossimString getBandRepresentation()const;
-
-   /**
-    * Sets the band representation.
-    *
-    * @param rep The band representation.
-    */
-   virtual void setBandRepresentation(const ossimString& rep);
-
-   /** @return The band significance as an ossimString. */
-   virtual ossimString getBandSignificance()const;
-
-   /**
-    * Sets the band significance.
-    *
-    * @param rep The band significance.
-    */
-   virtual void setBandSignificance(const ossimString& rep);
-
-protected:
-   void clearFields();
-   void printLookupTables(std::ostream& out)const;
-   /*!
-    * FIELD: IREPBAND,,
-    * Is a required 2 byte field.  When theNumberOfBands is
-    * 1 this field will contain all spaces.
-    */
-   char theBandRepresentation[3];
-
-   /*!
-    * FIELD:  ISUBCATnn
-    * Is a required 6 byte field.
-    */
-   char theBandSignificance[7];
-
-   /*!
-    * FIELD:  IFCnn
-    * Is an required 1 byte field.  Will be N
-    */
-   char theBandImageFilterCondition[2];
-
-   /*!
-    * FIELD:  IMFLTnn
-    * is a required 3 byte field.  This is a reserved field
-    */
-   char theBandStandardImageFilterCode[4];
-
-   /*!
-    * FIELD:  NLUTSnn
-    * This is a required 1 byte field.  Has value 0-4
-    */
-   char theBandNumberOfLuts[2];
-
-   /*!
-    * NELUTnn
-    * This is a conditional field.
-    */
-   char theBandNumberOfLutEntries[6];
-
-   std::vector<ossimRefPtr<ossimNitfImageLut> > theLookupTables;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfImageBandV2_1.h b/include/ossim/support_data/ossimNitfImageBandV2_1.h
deleted file mode 100644
index f782c61..0000000
--- a/include/ossim/support_data/ossimNitfImageBandV2_1.h
+++ /dev/null
@@ -1,27 +0,0 @@
-//*******************************************************************
-//
-// LICENSE: LGPL see top level directory for more details
-//
-// Author:  David Burken <dburken at imagelinks.com>
-//
-//********************************************************************
-// $Id: ossimNitfImageBandV2_1.h 15416 2009-09-11 20:58:51Z dburken $
-
-#ifndef ossimNitfImageBandV2_1_HEADER
-#define ossimNitfImageBandV2_1_HEADER
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/support_data/ossimNitfImageBandV2_0.h>
-
-class OSSIM_DLL ossimNitfImageBandV2_1 : public ossimNitfImageBandV2_0
-{
-public:
-
-   /** default constructor */
-   ossimNitfImageBandV2_1();
-
-   /** virtual destructory */
-   virtual ~ossimNitfImageBandV2_1();
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfImageHeader.h b/include/ossim/support_data/ossimNitfImageHeader.h
deleted file mode 100644
index 91ba02d..0000000
--- a/include/ossim/support_data/ossimNitfImageHeader.h
+++ /dev/null
@@ -1,180 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfImageHeader.h 18413 2010-11-11 19:56:22Z gpotts $
-#ifndef ossimNitfImageHeader_HEADER
-#define ossimNitfImageHeader_HEADER
-
-#include <vector>
-
-#include <ossim/base/ossimNBandLutDataObject.h>
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimPropertyInterface.h>
-#include <ossim/support_data/ossimNitfTagInformation.h>
-#include <ossim/support_data/ossimNitfCompressionHeader.h>
-#include <ossim/support_data/ossimNitfImageBand.h>
-
-class ossimString;
-class ossimDpt;
-class ossimIpt;
-class ossimIrect;
-
-class OSSIMDLLEXPORT ossimNitfImageHeader : public ossimObject,
-                                            public ossimPropertyInterface
-{
-public:
-   ossimNitfImageHeader();
-   virtual ~ossimNitfImageHeader();
-
-   virtual bool getTagInformation(ossimNitfTagInformation& tagInfo,
-                                  ossim_uint32 idx) const;
-   
-   virtual bool getTagInformation(ossimNitfTagInformation& tagInfo,
-                                  const ossimString& tagName) const;
-
-   ossimRefPtr<ossimNitfRegisteredTag> getTagData(const ossimString& tagName);
-   
-   const ossimRefPtr<ossimNitfRegisteredTag> getTagData(
-      const ossimString& tagName) const;
-   
-   virtual ossim_uint32 getNumberOfTags()const;
-
-   virtual void addTag(const ossimNitfTagInformation& tag);
-   virtual void removeTag(const ossimString& tagName);
-   
-   virtual void parseStream(std::istream &in)= 0;
-   virtual void writeStream(std::ostream &out)= 0;
-
-   virtual bool isCompressed()const=0;
-   virtual bool isEncrypted()const=0;
-
-   virtual ossimString getCompressionCode()const=0;
-   virtual ossimString getCompressionRateCode()const=0;
-   virtual ossim_uint32 getDisplayLevel()const=0;
-   virtual ossim_uint32 getAttachmentLevel()const=0;
-   
-   virtual ossim_int32 getNumberOfRows()const=0;
-   virtual ossim_int32 getNumberOfBands()const=0;
-   virtual ossim_int32 getNumberOfCols()const=0;
-   virtual ossim_int32 getNumberOfBlocksPerRow()const=0;
-   virtual ossim_int32 getNumberOfBlocksPerCol()const=0;
-   virtual ossim_int32 getNumberOfPixelsPerBlockHoriz()const=0;
-   virtual ossim_int32 getNumberOfPixelsPerBlockVert()const=0;
-   virtual ossimString getImageId()const=0;
-   virtual ossimString getTitle()const=0;
-   virtual ossim_int32 getActualBitsPerPixelPerBand()const=0;
-   virtual ossim_int32 getBitsPerPixelPerBand()const=0;
-   virtual ossimIrect  getImageRect()const=0;
-   /**
-    * Blocks might not be the same size as the significant rows and cols used
-    * by the getImageRect.
-    */
-   virtual ossimIrect   getBlockImageRect()const=0;
-   virtual ossimString  getIMode()const=0;
-   virtual ossim_uint64 getDataLocation()const=0;
-
-   /** @return The IDATIM field unparsed. */
-   virtual ossimString  getImageDateAndTime() const=0;
-   
-   virtual ossimString  getAcquisitionDateMonthDayYear(ossim_uint8 separationChar='-')const=0;
-   virtual ossimString  getSecurityClassification()const=0;
-   virtual ossimString  getCategory()const=0;
-   virtual ossimString  getImageSource()const=0;
-   virtual ossimString  getRepresentation()const=0;
-   virtual ossimString  getCoordinateSystem()const=0;
-   virtual ossimString  getGeographicLocation()const=0;
-   virtual ossimString  getPixelValueType()const=0;
-
-   /** @return IMAG field */
-   virtual ossimString  getImageMagnification()const=0;
-
-   /**
-    * @brief Gets the ILOC field as an ossimIpt.
-    * @param loc Initialized with the field.
-    * @note: Do not confuse with "data location".
-    */
-   virtual void getImageLocation(ossimIpt& loc)const=0;
-
-   /**
-    * @brief Convenience method to get the decimation factor as a double from
-    * the string returned be the getImageMagnification() method.
-    *
-    * @param result Initialized with the decimation factor as a double.
-    * Will return an ossim::nan() if something bad happens like the string is
-    * empty so callers should check result with ossim::isnan(result).
-    */
-   virtual void getDecimationFactor(ossim_float64& result) const;
-   
-   virtual bool hasBlockMaskRecords()const=0;
-   virtual bool hasPadPixelMaskRecords()const=0;
-   virtual bool hasTransparentCode()const=0;
-   virtual ossim_uint32 getTransparentCode()const=0;
-   virtual ossim_uint32 getBlockMaskRecordOffset(ossim_uint32 blockNumber,
-                                                 ossim_uint32 bandNumber)const=0;
-   
-   virtual ossim_uint32 getPadPixelMaskRecordOffset(ossim_uint32 blockNumber,
-                                                    ossim_uint32 bandNumber)const=0;
-   virtual const ossimRefPtr<ossimNitfCompressionHeader> getCompressionHeader()const=0;
-   virtual const ossimRefPtr<ossimNitfImageBand> getBandInformation(ossim_uint32 idx)const=0;
-   bool hasLut()const;
-   ossimRefPtr<ossimNBandLutDataObject> createLut(ossim_uint32 bandIdx)const;
-   virtual bool isSameAs(const ossimNitfImageHeader* hdr) const;
-   
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-   virtual ossim_uint32 getTotalTagLength()const;
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    */
-   virtual std::ostream& printTags(
-      std::ostream& out, const std::string& prefix=std::string()) const;
-   
-   /**
-    * @brief Populates keyword list with metadata.
-    * expample:  country_code: US
-    * 
-    * @param kwl Keywordlist to populate with metadata.
-    *
-    * @param prefix Optional prefix to put in front of key, like: "image1.".
-    */
-   virtual void getMetadata(ossimKeywordlist& kwl,
-                            const char* prefix=0) const;
-
-   /**
-    * @brief pure virtual print method that outputs a key/value type format
-    * adding prefix to keys.
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix) const = 0;
-
-   virtual bool saveState(ossimKeywordlist& kwl, const ossimString& prefix="")const;
-protected:
-
-   /**
-    * Method to check tie point to see if it will be truncated in field
-    * IGEOLO which has only arc second resolution.
-    * 
-    * Spits out warning if tie does not evenly divide by an arc second.
-    *
-    * @param tie Tie point to check.
-    */
-   void checkForGeographicTiePointTruncation(const ossimDpt& tie) const;
-   
-   std::vector<ossimNitfTagInformation> theTagList;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfImageHeaderV2_0.h b/include/ossim/support_data/ossimNitfImageHeaderV2_0.h
deleted file mode 100644
index 6e87e16..0000000
--- a/include/ossim/support_data/ossimNitfImageHeaderV2_0.h
+++ /dev/null
@@ -1,164 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfImageHeaderV2_0.h 18413 2010-11-11 19:56:22Z gpotts $
-#ifndef ossimNitfImageHeaderV2_0_HEADER
-#define ossimNitfImageHeaderV2_0_HEADER
-#include <ossim/support_data/ossimNitfImageHeaderV2_X.h>
-#include <ossim/support_data/ossimNitfImageBandV2_0.h>
-#include <iterator>
-
-class OSSIMDLLEXPORT ossimNitfImageHeaderV2_0 : public ossimNitfImageHeaderV2_X
-{
-public:
-   ossimNitfImageHeaderV2_0();
-   virtual ~ossimNitfImageHeaderV2_0();
-
-   virtual void parseStream(std::istream &in);
-   virtual void writeStream(std::ostream &out);
-   
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix=std::string()) const;
-   
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   
-   virtual bool        isCompressed()const;
-   virtual bool        isEncrypted()const;
-
-   virtual ossim_int32  getNumberOfBands()const;
-   virtual ossim_int32  getNumberOfRows()const;
-   virtual ossim_int32  getNumberOfCols()const;
-   virtual ossim_int32  getNumberOfBlocksPerRow()const;
-   virtual ossim_int32  getNumberOfBlocksPerCol()const;
-   virtual ossim_int32  getNumberOfPixelsPerBlockHoriz()const;
-   virtual ossim_int32  getNumberOfPixelsPerBlockVert()const;
-   virtual ossimString  getImageId()const;
-   virtual ossim_int32  getBitsPerPixelPerBand()const;
-   virtual ossim_int32  getActualBitsPerPixelPerBand()const;
-   virtual ossimString  getIMode()const;
-   virtual ossimString  getSecurityClassification()const;
-
-   /** @return The IDATIM field unparsed. */
-   virtual ossimString  getImageDateAndTime() const;
-   virtual ossimString  getAcquisitionDateMonthDayYear(
-      ossim_uint8 separationChar='-')const;
-   virtual ossimString  getCategory()const;
-   virtual ossimString  getImageSource()const;
-   virtual ossimString  getRepresentation()const;
-   virtual ossimString  getCoordinateSystem()const;
-
-   virtual ossimString  getPixelValueType()const;
-   virtual bool         hasBlockMaskRecords()const;
-   virtual bool         hasPadPixelMaskRecords()const;
-   virtual bool         hasTransparentCode()const;
-   virtual ossim_uint32 getTransparentCode()const;
-   virtual ossim_uint32 getBlockMaskRecordOffset(ossim_uint32 blockNumber,
-                                                 ossim_uint32 bandNumber)const;
-   virtual ossim_uint32 getPadPixelMaskRecordOffset(ossim_uint32 blockNumber,
-                                                    ossim_uint32 bandNumber)const;
-   
-   virtual const ossimRefPtr<ossimNitfCompressionHeader> getCompressionHeader()const;
-   virtual const ossimRefPtr<ossimNitfImageBand> getBandInformation(ossim_uint32 idx)const;
-
-   virtual void setNumberOfBands(ossim_uint32 nbands);
-   virtual void setBandInfo(ossim_uint32 idx,
-                            const ossimNitfImageBandV2_0& info);
-   virtual void setNumberOfRows(ossim_uint32 rows);
-   virtual void setNumberOfCols(ossim_uint32 cols);
-   virtual bool saveState(ossimKeywordlist& kwl, const ossimString& prefix="")const;
-   
-   static const ossimString ISCODE_KW;
-   static const ossimString ISCTLH_KW;
-   static const ossimString ISREL_KW;
-   static const ossimString ISCAUT_KW;
-   static const ossimString CTLN_KW;
-   static const ossimString ISDWNG_KW;
-   static const ossimString ISDEVT_KW;
-   
-TYPE_DATA
-private:
-   //
-   
-   void clearFields();
-
-   /*!
-    * FIELD ISCODE:
-    * is a 40 byte field
-    */
-   char theCodewords[41];
-
-   /*!
-    * FIELD ISCTLH:
-    * is a 40 byte field
-    */
-   char theControlAndHandling[41];
-
-   /*!
-    * FIELD ISREL:
-    * Is a 40 byte field.
-    */
-   char theReleasingInstructions[41];
-
-   /*!
-    * FIELD ISCAUT:
-    * Is a 20 byte field
-    */
-   char theClassificationAuthority[21];
-
-   /*!
-    * FIELD CTLN:
-    */
-   char theSecurityControlNumber[21];
-
-   /*!
-    * FIELD ISDWNG:
-    * Is a 6 byte field with form:
-    *
-    *  YYMMDD.  Year month day
-    *
-    * 999999 indicates that he Originating
-    *        agencies determination is required
-    *        (OADR)
-    * 999998 downgrade event will specify at what
-    *        point and time the declassification
-    *        or downgrading is to take place.
-    */
-   char theSecurityDowngrade[7];
-
-   /*!
-    * FIELD ISDEVT:
-    * This is a conditional field and is present
-    * if the Security downgrade is 999998.
-    */
-   char theDowngradingEvent[41];
-
-   /**
-    * Will contain also the field NBANDS and we will have to recreate the prefix for
-    * 
-    * Container for repetitive fields:
-    * IREPBAND
-    * ISUBCAT
-    * IFC
-    * IMFLT
-    * NLUTS
-    * NELUT1
-    * LUTD
-    */ 
-   std::vector<ossimRefPtr<ossimNitfImageBandV2_0> > theImageBands;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfImageHeaderV2_1.h b/include/ossim/support_data/ossimNitfImageHeaderV2_1.h
deleted file mode 100644
index bcdee68..0000000
--- a/include/ossim/support_data/ossimNitfImageHeaderV2_1.h
+++ /dev/null
@@ -1,395 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// LICENSE: See top level LICENSE.txt file.
-// 
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfImageHeaderV2_1.h 20123 2011-10-11 17:55:44Z dburken $
-
-#ifndef ossimNitfImageHeaderV2_1_HEADER
-#define ossimNitfImageHeaderV2_1_HEADER
-
-#include <stdexcept>
-
-#include <ossim/support_data/ossimNitfImageHeaderV2_X.h>
-#include <ossim/support_data/ossimNitfImageBandV2_1.h>
-
-class OSSIMDLLEXPORT ossimNitfImageHeaderV2_1 : public ossimNitfImageHeaderV2_X
-{
-public:
-   ossimNitfImageHeaderV2_1();
-   virtual ~ossimNitfImageHeaderV2_1();
-
-   virtual void parseStream(std::istream &in);
-   virtual void writeStream(std::ostream &out);
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix) const;
-   
-   virtual bool        isCompressed()const;
-   virtual bool        isEncrypted()const;
-
-   virtual ossim_int32 getNumberOfBands()const;
-   virtual ossim_int32 getNumberOfRows()const;
-   virtual ossim_int32 getNumberOfCols()const;
-   virtual ossim_int32 getNumberOfBlocksPerRow()const;
-   virtual ossim_int32 getNumberOfBlocksPerCol()const;
-   virtual ossim_int32 getNumberOfPixelsPerBlockHoriz()const;
-   virtual ossim_int32 getNumberOfPixelsPerBlockVert()const;
-   virtual ossimString getImageId()const;
-   virtual ossim_int32 getBitsPerPixelPerBand()const;
-   virtual ossim_int32 getActualBitsPerPixelPerBand()const;
-   virtual ossimString getIMode()const;
-
-   /** @return The IDATIM field unparsed. */
-   virtual ossimString  getImageDateAndTime() const;
-   
-   virtual ossimString getAcquisitionDateMonthDayYear(ossim_uint8 separationChar='-')const;
-   virtual ossimString getSecurityClassification()const;
-   virtual ossimString getCategory()const;
-   virtual ossimString getRepresentation()const;
-   virtual ossimString getCoordinateSystem()const;
-   virtual ossimString getPixelValueType()const;
-
-
-   virtual bool hasBlockMaskRecords()const;
-   virtual bool hasPadPixelMaskRecords()const;
-   virtual bool hasTransparentCode()const;
-   virtual ossim_uint32 getTransparentCode()const;
-   virtual ossim_uint32 getBlockMaskRecordOffset(ossim_uint32 blockNumber,
-                                                 ossim_uint32 bandNumber)const;
-   virtual ossim_uint32 getPadPixelMaskRecordOffset(ossim_uint32 blockNumber,
-                                                    ossim_uint32 bandNumber)const;
-   
-   virtual void setNumberOfBands(ossim_uint32 nbands);
-   virtual void setBandInfo(ossim_uint32 idx,
-                            const ossimNitfImageBandV2_1& info);
-   
-   virtual void setNumberOfRows(ossim_uint32 rows);
-   virtual void setNumberOfCols(ossim_uint32 cols);
-
-   virtual void setSecurityClassificationSystem(const ossimString& value);
-   virtual void setCodewords(const ossimString& value);
-   virtual void setControlAndHandling(const ossimString& value);
-   virtual void setReleasingInstructions(const ossimString& value);
-   virtual void setDeclassificationType(const ossimString& value);
-   virtual void setDeclassificationDate(const ossimString& value);
-   virtual void setDeclassificationExempt(const ossimString& value);
-   virtual void setDowngrade(const ossimString& value);
-   virtual void setDowngradeDate(const ossimString& value);
-   virtual void setClassificationText(const ossimString& value);
-   virtual void setClassificationAuthorityType(const ossimString& value);
-   virtual void setClassificationAuthority(const ossimString& value);
-   virtual void setClassificationReason(const ossimString& value);
-   virtual void setSecuritySourceDate(const ossimString& value);
-   virtual void setSecurityControlNumber(const ossimString& value);
-   virtual void setImageMagnification(const ossimString& value);
-   
-   virtual ossimString getImageSource()const; 
-   
-   virtual const ossimRefPtr<ossimNitfCompressionHeader> getCompressionHeader()const;
-   virtual const ossimRefPtr<ossimNitfImageBand> getBandInformation(ossim_uint32 idx)const;
-   
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-   virtual bool saveState(ossimKeywordlist& kwl, const ossimString& prefix="")const;
-
-   /*!
-    * @brief Method to set fields from a keyword list.
-    *
-    * This is not a true loadState as it does not lookup/initialize all class
-    * members.  This was added to allow defaults, e.g ISCLAS, to be set via a
-    * site configuration file.
-    * Code does not return false if a field(key) is not found..
-    *
-    * @return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-   static const ossimString ISCLSY_KW;
-   static const ossimString ISCODE_KW;
-   static const ossimString ISCTLH_KW;
-   static const ossimString ISREL_KW;
-   static const ossimString ISDCTP_KW;
-   static const ossimString ISDCDT_KW;
-   static const ossimString ISDCXM_KW;
-   static const ossimString ISDG_KW;
-   static const ossimString ISDGDT_KW;
-   static const ossimString ISCLTX_KW;
-   static const ossimString ISCATP_KW;
-   static const ossimString ISCAUT_KW;
-   static const ossimString ISCRSN_KW;
-   static const ossimString ISSRDT_KW;
-   static const ossimString ISCTLN_KW;
-   static const ossimString XBANDS_KW;
-
-private:
-   void clearFields();
-
-   /**
-    * FIELD: ISCLSY
-    * 
-    * Is a required 2 byte field.
-    *
-    * Image Security Classification System.
-    *
-    * This field shall contain valid values indicating the
-    * national or multinational security system used to classify the image.
-    * Country Codes per FIPS 10-4 shall be used to indicate national security
-    * systems; codes found in DIAM 65-19
-    * shall be used to indicate multinational security systems.
-    * If this field is all BCS spaces (0x20), it shall imply that no security
-    * classification system applies to the image. 
-    */
-   char theSecurityClassificationSys[3];
-
-   /**
-    * FIELD: ISCODE
-    * 
-    * is a 11 byte field
-    *
-    * Image Codewords.
-    *
-    * This field shall contain a valid indicator of the security compartments
-    * associated with the image. Values include one or more of the
-    * tri/digraphs found
-    * in DIAM 65-19 and/or Table A-4. Multiple entries shall be separated by
-    * single
-    * BCS spaces (0x20): The selection of a relevant set of codewords is
-    * application
-    * specific.  If this field is all BCS spaces (0x20), it shall imply that no
-    * codewords apply to the image.
-    */
-   char theCodewords[12];
-
-   /**
-    * FIELD: ISCTLH
-    * 
-    * is a 2 byte field.
-    *
-    * Image Control and Handling.  This field shall contain valid additional
-    * security control and/or handling instructions (caveats) associated with
-    * the image.
-    * Values include digraphs found in DIAM 65-19 and/or Table A4.
-    * The digraph may indicate single or multiple caveats. The selection of a
-    * relevant caveat(s) is application specific.  If this field is all BCS
-    * spaces (0x20),
-    * it shall imply that no additional control and handling instructions
-    * apply to the image. 
-    */
-   char theControlAndHandling[3];
-
-   /**
-    * FIELD: ISREL
-    * 
-    * Is a 20 byte field.
-    *
-    * Image Releasing Instructions.  This field shall contain a valid list of
-    * country and/or multilateral entity codes to which countries and/or
-    * multilateral entities the image is authorized for release.  Valid items
-    * in the list are one or
-    * more country codes as found in FIPS 10-4 and/or codes identifying
-    * multilateral
-    * entities as found in DIAM 65-19. If this field is all BCS spaces (0x20),
-    * it shall imply that no image release instructions apply.
-    */
-   char theReleasingInstructions[21];
-
-
-   /**
-    * FIELD: ISDCTP
-    * 
-    * Is a required 2 byte field.  The valid
-    * values are
-    * DD = declassify on a specific date
-    * DE = Declassify upon occurence of an event
-    * GD = downgrade to a specified level upon
-    *      occurence of an event
-    * O  = OADR
-    * X  = exempt from automatic declassification
-    * spaces = no image security declassification or
-    *          downgrade instruction apply.
-    */
-   char theDeclassificationType[3];
-   
-
-   /**
-    * FIELD: ISDCDT
-    * 
-    * Is a required 8 byte field.
-    *  CCYYMMDD
-    *
-    * CC   is the first 2 chars of the year 00-99
-    * YY   is the second 2 chars of the year 00-99
-    * MM   is the month 01-12
-    * DD   is the day 00-31
-    */
-   char theDeclassificationDate[9];
-
-   /**
-    * FIELD: ISDCXM
-    * 
-    * is a required 4 byte field.
-    * 
-    * Image Declassification Exemption.
-    *
-    * This field shall indicate the reason the image is exempt from automatic
-    * declassification if the value in Image Declassification Type is X. Valid
-    * values are X1 through X8 and X251 through X259. X1 through X8 correspond
-    * to the declassification exemptions found in DOD 5200.1-R, paragraphs
-    * 4-202b(1) through (8) for material exempt from the 10-year rule.
-    * X251 through X259 correspond to the declassification exemptions found in
-    * DOD 5200.1-R, paragraphs 4-301a(1) through (9) for permanently valuable
-    * material exempt from the 25-year declassification system. If this field is
-    * all BCS spaces (0x20), it shall imply that a image declassification exemption
-    * does not apply. 
-    */
-   char theDeclassificationExempt[5];
-   
-   /**
-    * FIELD: ISDG
-    * 
-    * Is a required 1 byte field with form:
-    *
-    *
-    * Image Downgrade.  This field shall indicate the classification level
-    * to which a image is to be downgraded if the values in Image Declassification Type
-    * are GD or GE.
-    *
-    * Valid values are
-    *    S (=Secret),
-    *    C (=Confidential),
-    *    R (= Restricted).
-    *
-    * If this field is all BCS spaces (0x20), it shall imply that image security
-    * downgrading does not apply.  
-    */
-   char theDowngrade[2];
-
-   /**
-    * FIELD: ISDGDT
-    * 
-    * is a required 8 byte field
-    *
-    * CCYYMMDD
-    *
-    * CC   is the first 2 chars of the year 00-99
-    * YY   is the second 2 chars of the year 00-99
-    * MM   is the month 01-12
-    * DD   is the day 00-31
-    */
-   char theDowngradeDate[9];
-
-   /**
-    * FIELD: ISCLTX
-    * 
-    * is a required 43 byte field.
-    *
-    * Image Classification Text.
-    *
-    * This field shall be used to provide additional information
-    * about image classification to include identification of a declassification or downgrading
-    * event if the values in Image Declassification Type are DE or GE.. It may also be used
-    * to identify multiple classification sources and/or any other special handling rules.
-    * Values are user defined free text. If this field is all BCS spaces (0x20), it shall
-    * imply that additional information about image classification does not apply. 
-    */
-   char theClassificationText[44];
-
-   /**
-    * FIELD: ISCATP
-    * 
-    * Is a required 1 byte field.
-    *
-    * O  = original classification Authority
-    * D  = derivative from a single source
-    * M  = derivative from multiple sources
-    * 
-    */
-   char theClassificationAuthType[2];
-
-   /**
-    * FIELD: ISCAUT
-    * 
-    * Is a required 40 byte field.
-    *
-    * Image Classification Authority.
-    *
-    * This field shall identify the classification authority for the image dependent upon the
-    * value in Image Classification Authority Type. Values are user defined free text which
-    * should contain the following information: original classification authority name and
-    * position or personal identifier if the value in Image Classification Authority Type is O;
-    * title of the document or security classification guide used to classify the image
-    * if the value in Image Classification Authority Type is D;
-    * and Derive-Multiple if the image classification was derived from multiple sources.
-    * In the latter case, the image originator will maintain a record of the sources used
-    * in accordance with existing security directives. One of the multiple sources may also
-    * be identified in Image Classification Text if desired. If this field is all BCS spaces
-    * (0x20), it shall imply that no image classification authority applies.
-    */
-   char theClassificationAuthority[41];
-
-   /**
-    * FIELD: ISCRSN
-    * 
-    * This is a required 1 byte field and indicates
-    * the classification reason.
-    *
-    * Image Classification Reason.
-    *
-    * This field shall contain values indicating the reason for classifying the image.
-    * Valid values are A through G. These correspond to the reasons for
-    * original classification per E.O. 12958, Section 1.5.(a) through (g).
-    * If this field is all BCS spaces (0x20), it shall imply that no image classification
-    * reason applies. 
-    */
-   char theClassificationReason[2];
-
-   /**
-    * FIELD: ISSRDT
-    * 
-    * This is a required 8 byte field.
-    *
-    * CCYYMMDD
-    *
-    * CC   is the first 2 chars of the year 00-99
-    * YY   is the second 2 chars of the year 00-99
-    * MM   is the month 01-12
-    * DD   is the day 00-31
-    *
-    */
-   char theSecuritySourceDate[9];
-
-   /**
-    * FIELD: ISCTLN
-    * 
-    * is a required 15 byte field.
-    */
-   char theSecurityControlNumber[16];
-
-  
-   /**
-    * FIELD: XBANDS
-    * 
-    * This is a conditional 5 byte field and ranges from
-    * 00010-99999.  This exists if theNumberOfBands is 0.
-    */
-   char theNumberOfMultispectralBands[6];
-
-   std::vector<ossimRefPtr<ossimNitfImageBandV2_1> > theImageBands;
-
-TYPE_DATA   
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfInfo.h b/include/ossim/support_data/ossimNitfInfo.h
deleted file mode 100644
index bf42dba..0000000
--- a/include/ossim/support_data/ossimNitfInfo.h
+++ /dev/null
@@ -1,59 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description: NITF Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-#ifndef ossimNitfInfo_HEADER
-#define ossimNitfInfo_HEADER
-
-#include <iosfwd>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/support_data/ossimInfoBase.h>
-#include <ossim/support_data/ossimNitfFile.h>
-
-/**
- * @brief NITF info class.
- *
- * Encapsulates the dumpnitf functionality.
- */
-class OSSIM_DLL ossimNitfInfo : public ossimInfoBase
-{
-public:
-   
-   /** default constructor */
-   ossimNitfInfo();
-
-   /** virtual destructor */
-   virtual ~ossimNitfInfo();
-
-   /**
-    * @brief open method.
-    *
-    * @param file File name to open.
-    *
-    * @return true on success false on error.
-    */
-   virtual bool open(const ossimFilename& file);
-   
-   /**
-    * Print method.
-    *
-    * @param out Stream to print to.
-    * 
-    * @return std::ostream&
-    */
-   virtual std::ostream& print(std::ostream& out) const;
-
-   virtual bool getKeywordlist(ossimKeywordlist& kwl)const;
-   
-private:
-   ossimRefPtr<ossimNitfFile> m_nitfFile;
-};
-
-#endif /* End of "#ifndef ossimNitfInfo_HEADER" */
diff --git a/include/ossim/support_data/ossimNitfJ2klraTag.h b/include/ossim/support_data/ossimNitfJ2klraTag.h
deleted file mode 100644
index acfc6fb..0000000
--- a/include/ossim/support_data/ossimNitfJ2klraTag.h
+++ /dev/null
@@ -1,176 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossimNitfJ2klraTag.h
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: NITF J2KLRA tag.
-//
-// See:  ISO/IEC BIIF Profile BPJ2K01.00 Table 9-3.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-#ifndef ossimNitfJ2klraTag_HEADER
-#define ossimNitfJ2klraTag_HEADER 1
-
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-#include <ossim/base/ossimConstants.h>
-
-#include <iosfwd>
-#include <vector>
-
-class OSSIM_DLL ossimNitfJ2klraTag : public ossimNitfRegisteredTag
-{
-public:
-   enum 
-   {
-      ORIG_SIZE      = 1,
-      NLEVELS_O_SIZE = 2,
-      NBANDS_O_SIZE  = 5,
-      NLAYERS_O_SIZE = 3,
-      
-      LAYER_ID_SIZE  = 3, // repeating
-      BITRATE_SIZE   = 9, // repeating
-
-      NLEVELS_I_SIZE = 2, // conditional
-      NBANDS_I_SIZE  = 5, // conditional
-      NLAYERS_I_SIZE = 3  // conditional
-   };
-   
-   /** default constructor */
-   ossimNitfJ2klraTag();
-  
-   /**
-    * Parse method.
-    *
-    * @param in Stream to parse.
-    */
-   virtual void parseStream(std::istream& in);
-   
-   /**
-    * Write method.
-    *
-    * @param out Stream to write to.
-    */
-   virtual void writeStream(std::ostream& out);
-   
-   /** @return The size of this record in bytes (123) within a nitf file. */
-   virtual ossim_uint32 getSizeInBytes()const;
-   
-   /**
-    * Clears all string fields within the record to some default nothingness.
-    */
-   virtual void clearFields();
-
-   /**
-    * @brief Print method that outputs a key/value type format
-    * adding prefix to keys.
-    * @param out Stream to output to.
-    * @param prefix Prefix added to key like "image0.";
-    */
-   virtual std::ostream& print(std::ostream& out, const std::string& prefix) const;
-
-   /** @return ORIG field as a number. */
-   ossim_uint32 getOriginNumber() const;
-
-   /** @return NLAYERS_O field as a number. */
-   ossim_uint32 getNumberOfLayersOriginal() const;
-
-protected:
-
-   // Container for repeating fields.
-   class ossimJ2klraLayer
-   {
-   public:
-      /**
-       * FIELD: LAYER_ID
-       * required 3 byte field
-       * 000 - 999
-       * Layer ID Number. Repeating.
-       */
-      char m_layer_id[LAYER_ID_SIZE+1];
-      
-      /**
-       * FIELD: BITRATE
-       * required 9 byte
-       * 00.000000 – 37.000000
-       * Bitrate
-       */
-      char m_bitrate[BITRATE_SIZE+1];
-   };
-
-   /**
-    * FIELD: ORIG
-    *
-    * Required 1 byte.
-    *
-    * 0 - Original NPJE
-    * 1 – Parsed NPJE
-    * 2 – Original EPJE*
-    * 3 – Parsed EPJE*
-    * 8 – Original other
-    * 9 – Parsed other
-    *
-    * Original compressed data.
-    */
-   char m_orig[ORIG_SIZE+1];
-   
-   /**
-    * FIELD: NLEVELS_O
-    * required 2 bytes
-    * 00 - 32
-    * Number of wavelet levels in original image.
-    */
-   char m_levels_o[NLEVELS_O_SIZE+1];
-   
-   /**
-    * FIELD: NBANDS_O
-    * required 5 bytes
-    * 00000 - 16384
-    * Number of bands in original image.
-    */
-   char m_bands_o[NBANDS_O_SIZE+1];
-   
-   /**
-    * FIELD: NLAYERS_O
-    * required 3 bytes
-    * 000 - 999
-    * Number of layers in original image.
-    */
-   char m_layers_o[NLAYERS_O_SIZE+1];
-
-   /** repeating fields */
-   std::vector<ossimJ2klraLayer> m_layer;
-   
-   /**
-    * FIELD: NLEVELS_I
-    * Conditional 2 bytes if ORIG=1, 3, or 9.
-    * 00 - 32
-    * Number of wavelet levels in this image.
-    */
-   char m_nlevels_i[NLEVELS_I_SIZE+1];
-   
-   /**
-    * FIELD: NBANDS_I
-    * Conditional 5 bytes if ORIG=1, 3,or 9.
-    * 00000 = 16384
-    * Number of bands in this image.
-    */
-   char m_nbands_i[NBANDS_I_SIZE+1];
-   
-   /**
-    * FIELD: NLAYERS_I
-    * Conditional 3 bytes if ORIG=1, 3, or 9.
-    * 000 - 999
-    * Number of Layers in this image.
-    */
-   char m_nlayers_i[NLAYERS_I_SIZE+1];
-   
-TYPE_DATA   
-};
-
-#endif /* End of "#ifndef ossimNitfJ2klraTag_HEADER_HEADER" */
diff --git a/include/ossim/support_data/ossimNitfLocalGeographicTag.h b/include/ossim/support_data/ossimNitfLocalGeographicTag.h
deleted file mode 100644
index 4b0cf85..0000000
--- a/include/ossim/support_data/ossimNitfLocalGeographicTag.h
+++ /dev/null
@@ -1,81 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2004 Intelligence Data Systems. 
-//
-// LICENSE: LGPL
-//
-// see top level LICENSE.txt
-// 
-// Author: Garrett Potts
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfLocalGeographicTag.h 22013 2012-12-19 17:37:20Z dburken $
-#ifndef ossimNitfLocalGeographicTag_HEADER
-#define ossimNitfLocalGeographicTag_HEADER
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-
-class OSSIM_DLL ossimNitfLocalGeographicTag : public ossimNitfRegisteredTag
-{
-public:
-   ossimNitfLocalGeographicTag();
-   virtual ~ossimNitfLocalGeographicTag();
-
-   virtual void parseStream(std::istream& in);
-   virtual void writeStream(std::ostream& out);
-
-   virtual void clearFields();
-
-   virtual void setDegreesPerPixelLat(double deltaLat);
-   virtual void setDegreesPerPixelLon(double deltaLon);
-   virtual void setLatOrigin(double origin);
-   virtual void setLonOrigin(double origin);
-   
-protected:
-   /**
-    * FIELD: ARV
-    *
-    * required 9 byte field
-    *
-    * Longitude density
-    *
-    * This field shall contain the pixel ground spacing in E/W direction that is
-    * the number of pixels or elements intervals in 360 degrees.
-    * 9 BCS-N positive integer 000000002 to 999999999. 
-    */
-   char theLonDensity[10];
-
-   /**
-    * FIELD: BRV
-    *
-    * required 9 byte field
-    *
-    * Latitude density
-    *
-    * This field shall contain the pixel ground spacing in N/S direction that is the number of
-    * pixels or elements intervals in 360 degrees. 9 BCS-N positive integer 000000002 to 999999999 R 
-    */ 
-   char theLatDensity[10];
-
-   /**
-    * FIELD: LSO
-    * 
-    * required 15 byte field
-    *
-    * Longitude of Reference Origin This field shall contain the longitude of the origin pixel
-    * (row number 0, column number 0) in the absolute coordinate system. 15 BCS-N R 
-    */
-   char theLonOrigin[16];
-
-   /**
-    * FIELD: PSO
-    *
-    * required 15 byte field
-    *
-    * Latitude of Reference Origin This field shall contain the latitude of the origin
-    * pixel (row number 0, column number 0) in the absolute coordinate system. 15 BCS-N R 
-    */
-   char theLatOrigin[15];
-
-TYPE_DATA   
-};
-#endif
diff --git a/include/ossim/support_data/ossimNitfMstgtaTag.h b/include/ossim/support_data/ossimNitfMstgtaTag.h
deleted file mode 100644
index b1e8e4a..0000000
--- a/include/ossim/support_data/ossimNitfMstgtaTag.h
+++ /dev/null
@@ -1,217 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: MSTGTA Mission Target Information Extension Format
-// tag class declaration.
-//
-// See document STDI-0002 Table 8-16 for more info.
-// 
-//----------------------------------------------------------------------------
-// $Id
-
-#ifndef ossimNitfMstgtaTag_HEADER
-#define ossimNitfMstgtaTag_HEADER 1
-
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-
-class OSSIM_DLL ossimNitfMstgtaTag : public ossimNitfRegisteredTag
-{
-public:
-
-   enum 
-   {
-      TGT_NUM_SIZE       = 5,
-      TGT_ID_SIZE        = 12,
-      TGT_BE_SIZE        = 15,
-      TGT_PRI_SIZE       = 3,
-      TGT_REQ_SIZE       = 12,
-      TGT_LTIOV_SIZE     = 12,
-      TGT_TYPE_SIZE      = 1,
-      TGT_COLL_SIZE      = 1,
-      TGT_CAT_SIZE       = 5,
-      TGT_UTC_SIZE       = 7,
-      TGT_ELEV_SIZE      = 6,
-      TGT_ELEV_UNIT_SIZE = 1,
-      TGT_LOC_SIZE       = 21
-    };
-   
-   /** @brief default constructor */
-   ossimNitfMstgtaTag();
-
-   /** @brief destructor */
-   virtual ~ossimNitfMstgtaTag();
-
-   /** @brief Method to parse data from stream. */
-   virtual void parseStream(std::istream& in);
-
-   /** @brief Method to write data to stream. */
-   virtual void writeStream(std::ostream& out);
-
-   /** @brief Method to clear all fields including null terminating. */
-   virtual void clearFields();
-
-   /**
-    * @brief Print method that outputs a key/value type format
-    * adding prefix to keys.
-    * @param out Stream to output to.
-    * @param prefix Prefix added to key like "image0.";
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix=std::string()) const;
-   
-protected:
-
-   /** Type R = Required Type <R> = BCS spaces allowed for entire field */
-   
-   /**
-    * FIELD: TGT_NUM
-    *
-    * TYPE: R
-    * 
-    * 5 byte field
-    *
-    * 00001 ti 99999
-    */
-   char theTgtNum[TGT_NUM_SIZE+1];
-
-   /**
-    * FIELD: TGT_ID
-    *
-    * TYPE: <R>
-    *
-    * 12 byte field
-    *
-    * Disignator of Target, alphnumeric.
-    */
-   char theTgtId[TGT_ID_SIZE+1];
-
-   /**
-    * FIELD: TGT_BE
-    *
-    * TYPE: <R>
-    * 
-    * 15 byte field
-    * 
-    * alphnumeric
-    */
-   char theTgtBe[TGT_BE_SIZE+1];
-
-   /**
-    * FIELD: TGT_PRI
-    *
-    * TYPE: <R>
-    *
-    * 3 byte field
-    * 
-    * Target priority, 1 = top, 2 = 2nd...  001 to 999
-    */
-   char theTgtPri[TGT_PRI_SIZE+1];
-
-   /**
-    * FIELD: TGT_REQ
-    *
-    * TYPE: <R>
-    *
-    * 12 byte field
-    * 
-    * Target requester. alphnumeric 
-    */
-   char theTgtReq[TGT_REQ_SIZE+1];
-
-   /**
-    * FIELD: TGT_LTIOV
-    *
-    * TYPE: <R>
-    * 
-    * 12 byte field
-    * 
-    * Latest Time Information of Value CCYYMMDDhhmm
-    */
-   char theTgtLtiov[TGT_LTIOV_SIZE+1];
-
-   /**
-    * FIELD: TGT_TYPE
-    *
-    * TYPE: <R>
-    *
-    * 1 byte field
-    * 
-    * Pre-Planned Target Type: 0 = point, 1 = strip, 2 = area, 0 to 9.
-    */
-   char theTgtType[TGT_TYPE_SIZE+1];
-
-   /**
-    * FIELD: TGT_COLL
-    *
-    * TYPE: R
-    * 
-    * 1 byte field
-    * 
-    * Pre-Planned Collection Technique: 0 to 9
-    */
-   char theTgtColl[TGT_COLL_SIZE+1];
-
-   /**
-    * FIELD: TGT_CAT
-    *
-    * TYPE: <R>
-    *
-    * 5 byte field
-    * 
-    * Target Functional Category Code 10000 to 99999
-    */
-   char theTgtCat[TGT_CAT_SIZE+1];
-
-   /**
-    * FIELD: TGT_UTC
-    *
-    * TYPE: <R>
-    * 
-    * 7 byte field
-    *
-    * Planned Time at Target hhmmssZ
-    */
-   char theTgtUtc[TGT_UTC_SIZE+1];
-
-   /**
-    * FIELD: TGT_ELEV
-    *
-    * TYPE: <R>
-    * 
-    * 6 byte field
-    * 
-    * Target Elevation -01000 to +30000 feet or meters
-    */
-   char theTgtElev[TGT_ELEV_SIZE+1];
-
-   /**
-    * FIELD: TGT_ELEV_UNIT
-    *
-    * TYPE: <R>
-    * 
-    * 1 byte field
-    * 
-    * Unit of Target Elevation, f = feet, m = meters
-    */
-   char theTgtElevUnit[TGT_ELEV_UNIT_SIZE+1];
-
-   /**
-    * FIELD: TGT_LOC
-    *
-    * TYPE: R
-    *
-    * 21 byte field
-    * 
-    * Target Location
-    */
-   char theTgtLoc[TGT_LOC_SIZE+1];
-   
-TYPE_DATA   
-};
-
-#endif /* matches #ifndef ossimNitfMstgtaTag_HEADER */
diff --git a/include/ossim/support_data/ossimNitfNameConversionTables.h b/include/ossim/support_data/ossimNitfNameConversionTables.h
deleted file mode 100644
index cad4d09..0000000
--- a/include/ossim/support_data/ossimNitfNameConversionTables.h
+++ /dev/null
@@ -1,29 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2004 Garrett Potts.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimNitfNameConversionTables.h 9094 2006-06-13 19:12:40Z dburken $
-#ifndef ossimNitfNameConversionTables_HEADER
-#define ossimNitfNameConversionTables_HEADER
-#include <ossim/base/ossimConstants.h>
-
-class ossimString;
-
-class OSSIM_DLL ossimNitfNameConversionTables
-{
-public:
-   ossimNitfNameConversionTables();
-
-   ossimString convertMapProjectionNameToNitfCode(const ossimString& mapProjectionName)const;
-   ossimString convertNitfCodeToOssimProjectionName(const ossimString& nitfProjectionCode)const;
-   ossimString convertNitfCodeToNitfProjectionName(const ossimString& nitfProjectionCode)const;
-   ossimString convertNitfProjectionNameToNitfCode(const ossimString& nitfProjectionName)const;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfPiaimcTag.h b/include/ossim/support_data/ossimNitfPiaimcTag.h
deleted file mode 100644
index df30dce..0000000
--- a/include/ossim/support_data/ossimNitfPiaimcTag.h
+++ /dev/null
@@ -1,427 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: PIAIMC tag class declaration.
-// 
-// "Profile for Imagery Access Image Support Extensions"
-//
-// See document STDI-0002 Table 6-1 for more info.
-// 
-// http://164.214.2.51/ntb/baseline/docs/stdi0002/final.pdf
-//
-//----------------------------------------------------------------------------
-// $Id: ossimNitfPiaimcTag.h 22013 2012-12-19 17:37:20Z dburken $
-#ifndef ossimNitfPiaimcTag_HEADER
-#define ossimNitfPiaimcTag_HEADER
-
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-#include <ossim/base/ossimConstants.h>
-
-class ossimString;
-
-class OSSIM_DLL ossimNitfPiaimcTag : public ossimNitfRegisteredTag
-{
-public:
-   enum 
-   {
-      CLOUDCVR_SIZE   =   3,
-      SRP_SIZE        =   1,
-      SENSMODE_SIZE   =  12,
-      SENSNAME_SIZE   =  18,
-      SOURCE_SIZE     = 255,
-      COMGEN_SIZE     =   2,
-      SUBQUAL_SIZE    =   1,
-      PIAMSNNUM_SIZE  =   7,
-      CAMSPECS_SIZE   =  32,
-      PROJID_SIZE     =   2,
-      GENERATION_SIZE =   1,
-      ESD_SIZE        =   1,
-      OTHERCOND_SIZE  =   2,
-      MEANGSD_SIZE    =   7,
-      IDATUM_SIZE     =   3,
-      IELLIP_SIZE     =   3,
-      PREPROC_SIZE    =   2,
-      IPROJ_SIZE      =   2,
-      SATTRACK_SIZE   =   8
-      //             -------
-      //                362
-   };
-   
-   /** default constructor */
-   ossimNitfPiaimcTag();
-  
-   /**
-    * Parse method.
-    *
-    * @param in Stream to parse.
-    */
-   virtual void parseStream(std::istream& in);
-   
-   /**
-    * Write method.
-    *
-    * @param out Stream to write to.
-    */
-   virtual void writeStream(std::ostream& out);
-   
-   /**
-    * Clears all string fields within the record to some default nothingness.
-    */
-   virtual void clearFields();
-   
-   /**
-    * @brief Print method that outputs a key/value type format
-    * adding prefix to keys.
-    * @param out Stream to output to.
-    * @param prefix Prefix added to key like "image0.";
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix) const;
-   /**
-    * @return CLOUDCVR field as an ossimString.
-    */
-   ossimString getCloudcvrString() const;
-
-   /**
-    * @return SRP field as an ossimString.
-    */
-   ossimString getSrpString() const;
-   
-   /**
-    * @return SENSMODE field as an ossimString.
-    */
-   ossimString getSensmodeString() const;
-   
-   /**
-    * @return SENSNAME field as an ossimString.
-    */
-   ossimString getSensnameString() const;
-   
-    /**
-    * @return SOURCE field as an ossimString.
-    */
-   ossimString getSourceString() const;
-  
-   /**
-    * @return COMGEN field as an ossimString.
-    */
-   ossimString getComgenString() const;
-   
-   /**
-    * @return SUBQUAL field as an ossimString.
-    */
-   ossimString getSubqualString() const;
-
-   /**
-    * @return PIAMSNNUM field as an ossimString.
-    */
-   ossimString getPiamsnnumString() const;
-
-   /**
-    * @return field as an ossimString.
-    */
-   ossimString getString() const;
-
-   /**
-    * @return CAMSPECS field as an ossimString.
-    */
-   ossimString getCamspecsString() const;
-
-   /**
-    * @return PROJID field as an ossimString.
-    */
-   ossimString getProjidString() const;
-
-   /**
-    * @return GENERATION field as an ossimString.
-    */
-   ossimString getGenerationString() const;
-
-   /**
-    * @return ESD field as an ossimString.
-    */
-   ossimString getEsdString() const;
-   
-   /**
-    * @return OTHERCONDfield as an ossimString.
-    */
-   ossimString getOthercondString() const;
-
-   /**
-    * @return MEANGSD field as an ossimString.
-    */
-   ossimString getMeadGsdString() const;
-
-   /**
-    * @return MEANGSD field as a double converted to meters.
-    *
-    * @note Conversion used: gsd_in_meters = gsd / 12.0 * MTRS_PER_FT
-    */
-   ossim_float64 getMeanGsdInMeters() const;
-
-   /**
-    * @return IDATUM field as an ossimString.
-    */
-   ossimString getIdatumString() const;
-   
-   /**
-    * @return IELLIP field as an ossimString.
-    */
-   ossimString getIellipString() const;
-   
-   /**
-    * @return PREPROC field as an ossimString.
-    */
-   ossimString getPreprocString() const;
-   
-   /**
-    * @return IPROJ field as an ossimString.
-    */
-   ossimString getIprojString() const;
-   
-   /**
-    * @return SATTRACK field as an ossimString.
-    */
-   ossimString getSattrackString() const;
-   
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-protected:
-
-   /**
-    * FIELD: CLOUDCVR
-    *
-    * 3 byte field
-    *
-    * Indicates the precentage of the image that is obscured by cloud. A value
-    * os 999 indicates an unknown condition.
-    *
-    * 000 to 100, or 999
-    */
-   char theCloudcvr[CLOUDCVR_SIZE+1];
-   
-   /**
-    * FIELD: SRP
-    *
-    * 1 byte field
-    *
-    * Indicates whether or not standard radiometric product data is available.
-    *
-    * Y,N
-    */
-   char theSrp[SRP_SIZE+1];
-   
-   /**
-    * FIELD: SENSMODE
-    *
-    * 12 byte field
-    *
-    * Indentifies the sensor mode used in capturing the image.
-    *
-    * WHISKBROOM, PUSHROOM, FRAMING, SPOT, SWATH, TBD
-    */
-   char thesSensmode[SENSMODE_SIZE+1];
-   
-   /**
-    * FIELD: SENSNAME
-    *
-    * 18 byte field
-    *
-    * Indentifies the name of sensor used in capturing the image.
-    *
-    * USIGS DM, SENSORTYPE Name
-    */
-   char theSensname[SENSNAME_SIZE+1];
-   
-   /**
-    * FIELD: SOURCE
-    *
-    * 18 byte field
-    *
-    * Indicated where the image came from.
-    *
-    * alphanumeric
-    */
-   char theSource[SOURCE_SIZE+1];
-   
-   /**
-    * FIELD: COMGEN
-    *
-    * 2 byte field
-    *
-    * Compression Generation.
-    *
-    * 00 to 99
-    */
-   char theComgen[COMGEN_SIZE+1];
-   
-   /**
-    * FIELD: SUBQUAL
-    *
-    * 1 byte field
-    *
-    * Subjective Quality
-    *
-    * P-Poor, G-Good, E-Excellent, F-Fair
-    */
-   char theSubqual[SUBQUAL_SIZE+1];
-   
-   /**
-    * FIELD: PIAMSNNUM
-    *
-    * 7 byte field
-    *
-    * Indicates the mission number assigned to the reconnaissance mission.
-    *
-    * EARS 1.1 page 4-28
-    */
-   char thePiamsnnum[PIAMSNNUM_SIZE+1];
-   
-   /**
-    * FIELD: CAMSPECS
-    *
-    * 32 byte field
-    *
-    * Specifies the brand name of the camera used and the focal length of the
-    * lens.
-    *
-    * alphanumeric
-    */
-   char theCamspecs[CAMSPECS_SIZE+1];
-   
-   /**
-    * FIELD: PROJID
-    *
-    * 2 byte field
-    *
-    * Indentifies collection platform project identifier code.
-    *
-    * EARS Appendix 9
-    */
-   char theProjid[PROJID_SIZE+1];
-   
-   /**
-    * FIELD: GENERATION
-    *
-    * 1 byte field
-    *
-    * Specifies the number of image generations of the product.  The number(0)
-    * is reserved for the original product.
-    *
-    * 0 to 9
-    */
-   char theGeneration[GENERATION_SIZE+1];
-
-   /**
-    * FIELD: ESD
-    *
-    * 1 byte field
-    *
-    * Indicates whether or not Exploitation Support Data is available and
-    * contained withing the product data.
-    *
-    * Y,N
-    */
-   char theEsd[ESD_SIZE+1];
-
-   /**
-    * FIELD: OTHERCOND
-    *
-    * 2 byte field
-    *
-    * Indicates other conditions that affect the imagery over the target.
-    *
-    * EARS 1.1 page 4 to 28
-    */
-   char theOthercond[OTHERCOND_SIZE+1];
-
-   /**
-    * FIELD: MEANGSD
-    *
-    * 7 byte field
-    *
-    * The geometric mean of the across and along scan center-to-center distance
-    * between contiguous ground samples.
-    *
-    * 00000.0 to 99999.9 Expressed in inches, accuracy=10%
-    */
-   char theMeanGsd[MEANGSD_SIZE+1];
-
-   /**
-    * FIELD: IDATUM
-    *
-    * 3 byte field
-    *
-    * Identifies the mathematical representation of the earth used to
-    * geo-correct/or to rectify the image.
-    * (Identifies the Datum assiciated with IGEOLO.)
-    *
-    * Horizontal_Reference_Datum_Code(refer to DDDS element)
-    */
-   char theIdatum[IDATUM_SIZE+1];
-
-   /**
-    * FIELD: IELLIP
-    *
-    * 3 byte field
-    *
-    * Identifies the mathematical representation of the earth used to
-    * geo-correct/or to rectify the image.
-    * (Identifies the Ellipsoid assiciated with IGEOLO.)
-    */
-   char theIellip[IELLIP_SIZE+1];
-  
-   /**
-    * FIELD: PREPROC
-    *
-    * 2 byte field
-    *
-    * Identifies the level of radiometric and geometric processing applied to
-    * the product by the commercial vendor.
-    *
-    * USIGS DM, IMAGEDATASET Processing Level Code.
-    */
-   char thePreproc[PREPROC_SIZE+1];
-  
-   /**
-    * FIELD: IPROJ
-    *
-    * 2 byte field
-    *
-    * Identifies the 2D-map projection used by commercial vendors to
-    * geo-correct/or to rectify the image.
-    *
-    * DIGEST, Part 3 table 6-1
-    */
-   char theIproj[IPROJ_SIZE+1];
-
-   /**
-    * FIELD: SATTRACK
-    *
-    * 8 byte field
-    *
-    * Identifies location of an image acquired by LANDSAT or SPOT (only) along
-    * the satellite path.
-    *
-    * Minimum values:
-    *  PATH(J)=0001
-    *  ROW(K) =0001
-    * Maximum values:
-    *  PATH(J)=9999
-    *  ROW(K) =9999
-    *
-    *  Recorded as PATH/ROW 00010001
-    */
-   char theSattrack[SATTRACK_SIZE+1];
-   
-TYPE_DATA   
-};
-
-#endif /* End of "#ifndef ossimNitfPiaimcTag_HEADER" */
diff --git a/include/ossim/support_data/ossimNitfProjectionParameterTag.h b/include/ossim/support_data/ossimNitfProjectionParameterTag.h
deleted file mode 100644
index 283aaea..0000000
--- a/include/ossim/support_data/ossimNitfProjectionParameterTag.h
+++ /dev/null
@@ -1,332 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfProjectionParameterTag.h 22013 2012-12-19 17:37:20Z dburken $
-
-#ifndef ossimNitfProjectionParameterTag_HEADER
-#define ossimNitfProjectionParameterTag_HEADER
-#include <vector>
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-
-class OSSIM_DLL ossimNitfProjectionParameterTag : public ossimNitfRegisteredTag
-{
-public:
-   ossimNitfProjectionParameterTag();
-   virtual ~ossimNitfProjectionParameterTag();
-
-   virtual void parseStream(std::istream& in);
-   virtual void writeStream(std::ostream& out);
-
-   /**
-    * @brief Print method that outputs a key/value type format
-    * adding prefix to keys.
-    * @param out Stream to output to.
-    * @param prefix Prefix added to key like "image0.";
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix=std::string()) const;
-
-   virtual ossim_uint32 getSizeInBytes()const;
-   virtual void clearFields();
-   virtual void clearParameters();
-   virtual void addParameter(const ossimString& param);
-   virtual void addParameter(const ossim_float64& param);
-   void setName(const ossimString& name);
-   void setCode(const ossimString& code);
-   ossimString getName()const;
-   ossimString getCode()const;
-   void setFalseX(double falseX);
-   void setFalseY(double falseY);
-   double getFalseX()const;
-   double getFalseY()const;
-   
-protected:
-   /**
-    * FIELD: PRN
-    *
-    * required 80 byte field.
-    * 
-    * Projection Name
-    *
-    * This field shall contain the name of the projection to which the Image Segment refers.
-    * The default value is Transverse Mercator.
-    */
-   char theProjectionName[81];
-
-   /**
-    *
-    * FIELD: PCO
-    *
-    * required 2 byte field.
-    * 
-    * Projection Code
-    *
-    * This field shall contain the code of the projection to which the Image Segment refers.
-    * The default value is TC.
-    *
-    * Code values:
-    *
-    * AC           Albers Equal-Area Conic
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. std. parallel nearer to equator
-    *                3. std parallel farther from equator
-    *                4. latitude of origin
-    *              
-    * AK           (Lambert) Azimuthal Equal-Area
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. Latitude of origin
-    *              
-    * AL           Azimuthal Equidistant
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. Latitude of origin
-    * 
-    * BF           Bonne
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. Latitude of origin
-    *                3. Scale factor at projection origin
-    *                
-    * CC           Equidistant Conic with 1 Standard Parallel
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. Latitude of origin
-    *                3. Latitude of Std. Parallel
-    *                
-    * CP           Equirectangular
-    *              Parameters:
-    *                1. Longitude of central meridian 
-    *                2. Latitude of true scale
-    *                3. Radius of sphere
-    *                
-    * CS           Cassini-Soldner
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. Latitude of origin
-    *            
-    * ED           Eckert VI
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. Radius of sphere
-    * 
-    * EF           Eckert IV
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. Radius of sphere
-    * 
-    * GN           Gnomonic
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. Latitude of origin
-    * 
-    * HX           Hotine Oblique Mercator based on 2 Points 
-    *              Parameters:
-    *                1. Scale factor at projection origin
-    *                2. latitude of projection origin
-    *                3. longitude of first point defining center line
-    *                4. latitude of fist point defining center line
-    *                
-    * KA           Equidistant Conic with 2 Standard Parallels 
-    *              Parameters:
-    *                1. Longitude of central meridian
-    *                2. Latitude of origin
-    *                3. Latitude of standard parallel Nearer to equator
-    *                4. Latitude of standard parallel farther from equator
-    *
-    * LA           Laborde
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. Latitude of origin
-    *                3. Scale factor at proj origin
-    *                4. Azimuth at origin of axis of constant scale
-    * 
-    * LE           Lambert Conformal Conic
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. std. parallel nearer to equator
-    *                3. std. parallel farther from equator
-    *                4. Latitude of origin
-    * 
-    * LI           Cylindrical Equal Area
-    *              Parameters:
-    *                1. Longitude of central meridian
-    *                2. Latitude of origin
-    *                
-    * LJ           Lambert Equal-Area Meridional
-    *              Parameters:
-    *                1. Longitude of central meridian
-    *                2. Latitude of origin
-    *                
-    * MC           Mercator
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. Latitude of true scale
-    *                3. Latitude of reference origin
-    *                
-    * MH           Miller Cylindrical
-    *              Parameters:
-    *                1. Longitude of central meridian
-    *                2. Radius of sphere
-    *                
-    * MJ           French Lambert
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. Latitude of origin
-    *                3. Scale factor at proj origin
-    *                
-    * MP           Mollweide
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. Radius of sphere
-    *                
-    * NT           New Zealand Map Grid
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. Latitude of origin
-    *                
-    * OC           Oblique Mercator
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. Latitude of origin
-    *                3. Azimuth
-    *                4. radius of sphere
-    *                
-    * OD           Orthographic
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. Latitude of origin
-    *                3. Radius of sphere
-    *                
-    * PG           Polar Stereographic
-    *              Parameters:
-    *                1. Latitude of true scale
-    *                
-    * PH           Polyconic
-    *              Parameters:
-    *                1. Longitude of central meridian
-    *                2. Latitude of origin
-    *                
-    * RS or RB     Hotine Oblique Mercator (Rectified Skew Orthomorphic)
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. Latitude of origin
-    *                3. Azimuth East of North for Central Line (Skew X-Axis at Proj. origin)
-    *                4. Scale factor at proj origin
-    *                
-    * RX           Robinson
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. Radius of sphere
-    *                
-    * SA           Sinusoidal
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. Radius of sphere
-    *               
-    * SD           Oblique Stereographic
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. Latitude of origin
-    *                3. Scale factor at origin
-    *                
-    * SX           Space Oblique Mercator
-    *              Parameters:
-    *                1. Application code:
-    *                     1 = Landsat, USGS equations
-    *                     2 = Landsat, EOSAT equations
-    *                2. Vehicle number
-    *                3. Orbital path number
-    *                
-    * TC           Transverse Mercator
-    *              Parameters:
-    *                1. Longitude of central meridian
-    *                2. Central Scale Factor
-    *                3. Latitude of origin
-    *                
-    * TX           Transverse Cylindrical Equal Area
-    *              Parameters:
-    *                1. Longitude of central meridian
-    *                2. Latitude of origin
-    *                3. Scale factor along central meridian
-    *                
-    * VA           Van der Grinten
-    *              Parameters:
-    *                1. Longitude of central meridian
-    *                2. Radius of sphere
-    * 
-    * VX           General Vertical NearSide Perspective
-    *              Parameters:
-    *                1. Longitude of origin
-    *                2. Latitude of origin
-    *                3. Heigh of perspective map above surface
-    *
-    * ZY           Other Known Projection
-    */
-   char theProjectionCode[3];
-
-   /**
-    * FIELD: NUM_PRJ
-    *
-    * required 1 byte field ranging from 0-9
-    * 
-    * Number of Projection Parameters
-    *
-    * This field shall contain the number of projection parameters.
-    * The PRJ Field should be repeated as necessary depending on the
-    * projection code (see Part 3-6).  If the number of projection parameters
-    * provided is lower than specified in Part 3-6, the
-    * missing parameters value is 0.
-    *
-    */
-   char              theNumberOfParameters[2];
-   
-   /**
-    * FIELD(S): PRJn
-    *
-    * Conditional 15 byte field each.
-    *
-    * Projection Parameter Each occurrence of this field provides an appropriate
-    * parameter to accurately describe the projection.  See Part 3-6 to know the
-    * kind of parameters needed for each projection code. 15 BCS-N C 
-    */
-   std::vector<ossimString> theProjectionParameters;
-   
-   /**
-    * FIELD: XOR
-    *
-    * required  15 byte field.
-    * 
-    * Projection False X (Easting) Origin
-    *
-    * This field shall contain the projection false X (easting) origin.
-    * The default value is 000000000000000, which implies that there is no projection false X origin.
-    * 
-    */
-   char theFalseXOrigin[16];
-
-
-   /**
-    * FIELD: YOR
-    *
-    * required 15 byte field.
-    *
-    * Projection False Y (Northing) Origin
-    *
-    * This field shall contain the projection false Y (northing) origin.
-    * The default value is 000000000000000, which implies that there is
-    * no projection false Y origin.
-    * 
-    */
-   char theFalseYOrigin[16];
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfRegisteredTag.h b/include/ossim/support_data/ossimNitfRegisteredTag.h
deleted file mode 100644
index 54fd1aa..0000000
--- a/include/ossim/support_data/ossimNitfRegisteredTag.h
+++ /dev/null
@@ -1,124 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfRegisteredTag.h 22013 2012-12-19 17:37:20Z dburken $
-#ifndef ossimNitfRegisteredTag_HEADER
-#define ossimNitfRegisteredTag_HEADER 1
-
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimPropertyInterface.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <string>
-
-class ossimKeywordlist;
-class ossimString;
-
-class OSSIM_DLL ossimNitfRegisteredTag : public ossimObject ,
-                                         public ossimPropertyInterface
-{
-public:
-   /** @brief default constructor */
-   ossimNitfRegisteredTag();
-   
-   /** @brief Constructor that takes name and size. */
-   ossimNitfRegisteredTag(const std::string& tagName, ossim_uint32 tagLength);
-
-   /** @brief destructor */
-   virtual ~ossimNitfRegisteredTag();
-   
-   /**
-    * @brief This will return the name of the registered tag for this user
-    * defined header.
-    *
-    * @note Deprecated - Use getTagName()
-    */
-   virtual std::string getRegisterTagName() const;
-   
-   /**
-    * @brief This will return the name of the registered tag for this user
-    * defined header.
-    */
-   virtual const std::string& getTagName() const;
-
-   /**
-    * @param tagName Name of tag.
-    *
-    * @note Users should set tag name as this is an unknown tag.
-    */
-   virtual void setTagName(const std::string& tagName);
- 
-   /**
-    * @brief Returns the length in bytes of the tag from the CEL or REL field.
-    * 
-    * @note Depricated use: getTagLength()
-    *
-    * The entire TRE length is 11 plus this(the size of the CEL or REL field).
-    *
-    * @return Length of REDATA or CEDATA.
-    */
-   virtual ossim_uint32 getSizeInBytes()const;
-
-  /**
-    * @brief Returns the length in bytes of the tag from the CEL or REL field.
-    *
-    * The entire TRE length is 11 plus this(the size of the CEL or REL field).
-    *
-    * @return Length of REDATA or CEDATA.
-    */
-   virtual ossim_uint32 getTagLength()const;
-
-  /**
-    * @brief Set the tag length.
-    *
-    * @param length Length of tag.
-    */
-   virtual void setTagLength(ossim_uint32 length);
-    
-   /**
-    * This will allow the user defined data to parse the stream.
-    */
-   virtual void parseStream(std::istream& in)=0;
-   virtual void writeStream(std::ostream& out)=0;
-
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-   /**
-    * @brief Default interface to populate keyword list with metadata.
-    * expample:  country_code: US
-    * This implementation does nothing.  Derived classes should implement as
-    * they see fit.
-    * 
-    * @param kwl Keywordlist to populate with metadata.
-    *
-    * @param prefix Optional prefix to put in front of key, like: "image1.".
-    */
-   virtual void getMetadata(ossimKeywordlist& kwl,
-                            const char* prefix=0) const;
-
-   /**
-    * @brief Pure virtual print method that outputs a key/value type format
-    * adding prefix to keys.
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix=std::string()) const;
-   
-   virtual bool saveState(ossimKeywordlist& kwl, const ossimString& prefix)const;
-   
-protected:
-   std::string  m_tagName;
-   ossim_uint32 m_tagLength;
-   
-TYPE_DATA
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfRegisteredTagFactory.h b/include/ossim/support_data/ossimNitfRegisteredTagFactory.h
deleted file mode 100644
index 1db0fa8..0000000
--- a/include/ossim/support_data/ossimNitfRegisteredTagFactory.h
+++ /dev/null
@@ -1,29 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// LICENSE: LGPL see top level LICENSE.txt
-// 
-// Author: Garrett Potts (gpotts at imagelinks.com)
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfRegisteredTagFactory.h 9094 2006-06-13 19:12:40Z dburken $
-#ifndef ossimNitfRegisteredTagFactory_HEADER
-#define ossimNitfRegisteredTagFactory_HEADER
-#include <ossim/support_data/ossimNitfTagFactory.h>
-
-class ossimNitfRegisteredTagFactory : public ossimNitfTagFactory
-{
-public:
-   ossimNitfRegisteredTagFactory();
-   virtual ~ossimNitfRegisteredTagFactory();
-   static ossimNitfRegisteredTagFactory* instance();
-   
-   virtual ossimRefPtr<ossimNitfRegisteredTag> create(const ossimString &tagName)const;
-
-protected:
-   static ossimNitfRegisteredTagFactory* theInstance;
-TYPE_DATA   
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfRpcATag.h b/include/ossim/support_data/ossimNitfRpcATag.h
deleted file mode 100644
index f95f166..0000000
--- a/include/ossim/support_data/ossimNitfRpcATag.h
+++ /dev/null
@@ -1,35 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 Intelligence Data Systems. 
-//
-// LICENSE: LGPL
-//
-// see top level LICENSE.txt
-// 
-// Author: Garrett Potts
-//
-// Description: Nitf support class for RPC00A -
-// Rational Polynomial Coefficient extension.
-//
-//********************************************************************
-// $Id: ossimNitfRpcATag.h 22013 2012-12-19 17:37:20Z dburken $
-#ifndef ossimNitfRpcATag_HEADER
-#define ossimNitfRpcATag_HEADER 1
-
-#include <ossim/support_data/ossimNitfRpcBase.h>
-
-/**
- * The layout of RPC00B is the same as RPC00A.  The difference is how the
- * coefficients are used; hence, all the code is in the ossimNitfRpcBase class.
- */
-class OSSIM_DLL ossimNitfRpcATag : public ossimNitfRpcBase
-{
-public:
-   
-   ossimNitfRpcATag();
-   
-protected:
-   
-TYPE_DATA   
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfRpcBTag.h b/include/ossim/support_data/ossimNitfRpcBTag.h
deleted file mode 100644
index f792086..0000000
--- a/include/ossim/support_data/ossimNitfRpcBTag.h
+++ /dev/null
@@ -1,30 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 Intelligence Data Systems. 
-//
-// LICENSE: LGPL
-//
-// see top level LICENSE.txt
-// 
-// Author: Garrett Potts
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfRpcBTag.h 22013 2012-12-19 17:37:20Z dburken $
-#ifndef ossimNitfRpcBTag_HEADER
-#define ossimNitfRpcBTag_HEADER 1
-
-#include <ossim/support_data/ossimNitfRpcBase.h>
-
-/**
- * The layout of RPC00B is the same as RPC00A.  The difference is how the
- * coefficients are used; hence, all the code is in the ossimNitfRpcBase class.
- */
-class OSSIM_DLL ossimNitfRpcBTag : public ossimNitfRpcBase
-{
-public:
-   ossimNitfRpcBTag();
-
-TYPE_DATA   
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfRpcBase.h b/include/ossim/support_data/ossimNitfRpcBase.h
deleted file mode 100644
index c83ef17..0000000
--- a/include/ossim/support_data/ossimNitfRpcBase.h
+++ /dev/null
@@ -1,543 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-//
-// Description: Nitf base support data class for RPC tags.
-// 
-// Rational Polynomial Coefficient extension.
-//
-// See: http://164.214.2.51/ntb/baseline/docs/stdi0002/final.pdf
-//
-//********************************************************************
-// $Id: ossimNitfRpcBase.h 22013 2012-12-19 17:37:20Z dburken $
-#ifndef ossimNitfRpcBase_HEADER
-#define ossimNitfRpcBase_HEADER 1
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-
-class OSSIM_DLL ossimNitfRpcBase : public ossimNitfRegisteredTag
-{
- public:
-  enum 
-  {
-    SUCCESS_SIZE                         = 1,
-    ERROR_BIAS_SIZE                      = 7,
-    ERR_RAND_SIZE                        = 7,
-    LINE_OFFSET_SIZE                     = 6,
-    SAMPLE_OFFSET_SIZE                   = 5,
-    GEODETIC_LAT_OFFSET_SIZE             = 8,
-    GEODETIC_LON_OFFSET_SIZE             = 9,
-    GEODETIC_HEIGHT_OFFSET_SIZE          = 5,
-    LINE_SCALE_SIZE                      = 6,
-    SAMPLE_SCALE_SIZE                    = 5,
-    GEODETIC_LAT_SCALE_SIZE              = 8,
-    GEODETIC_LON_SCALE_SIZE              = 9,
-    GEODETIC_HEIGHT_SCALE_SIZE           = 5,
-    LINE_NUMERATOR_COEFFICIENT_SIZE      = 12,
-    LINE_NUMERATOR_COEFFICIENT_COUNT     = 20,
-    LINE_DENOMINATOR_COEFFICIENT_SIZE    = 12,
-    LINE_DENOMINATOR_COEFFICIENT_COUNT   = 20,
-    SAMPLE_NUMERATOR_COEFFICIENT_SIZE    = 12,
-    SAMPLE_NUMERATOR_COEFFICIENT_COUNT   = 20,
-    SAMPLE_DENOMINATOR_COEFFICIENT_SIZE  = 12,
-    SAMPLE_DENOMINATOR_COEFFICIENT_COUNT = 20
-    //                                  -----
-    //                                   1041
-  };
-
-  /** default constructor */
-  ossimNitfRpcBase();
-
-  /**
-   * Parse method.
-   *
-   * @param in Stream to parse.
-   */
-  virtual void parseStream(std::istream& in);
-
-  /**
-   * Write method.
-   *
-   * @param out Stream to write to.
-   */
-  virtual void writeStream(std::ostream& out);
-
-  /**
-   * Clears all string fields within the record to some default nothingness.
-   */
-  virtual void clearFields();
-
-  /**
-   * @return The success record as a boolean.
-   */
-  bool getSuccess()const;
-
-  /** @param success Sets data member theSuccess to success. */
-  void setSuccess(bool success);
-
-  /** @return theErrorBias as a string. */
-  ossimString getErrorBias()const;
-
-  //---
-  // The set methods below taking ossimString args will truncate and
-  // pad with spaces, as necessary, to match enumed size.
-  //---
-
-  /**
-   * @param errorBias Error bias to set theErrorBias to.  This will be
-   * converted to a string with two digit precision.
-   */
-  void setErrorBias(const ossim_float64& errorBias);
-
-  /** @param errorBias bias string to set theErrorBias to. */
-  void setErrorBias(const ossimString& errorBias);
-
-  /** @return theErrorBias as a string. */
-  ossimString getErrorRand()const;
-
-  /**
-   * @param errorRand The random error to set theErrRand to.  This will be
-   * converted to a string with two digit precision.
-   */
-  void setErrorRand(const ossim_float64& errorRand);
-
-  
-  /** @param errorRand error random  string to set theErrorRand to. */
-  void setErrorRand(const ossimString& errorRand);
-
-  /** @return The line offset as a string. */
-  ossimString getLineOffset()const;
-
-  /**
-   * @param lineOffset Sets the line offset to a string truncated to an int.
-   */
-  void setLineOffset(ossim_uint32 lineOffset);
-
-  /**
-   * @param lineOffset Sets theLineOffset to lineOffset string.
-   */
-  void setLineOffset(const ossimString& lineOffset);
-
-  /** @return The sample offset as a string. */
-  ossimString getSampleOffset()const;
-
-  /**
-   * @param sampleOffset Sets the sample offset to a string truncated to an
-   * int.
-   */
-  void setSampleOffset(ossim_uint32 sampleOffset);
-
-  /** @param sampleOffset Sets the sample offset to a string. */
-  void setSampleOffset(const ossimString& sampleOffset);
-
-  /** @return Geodetic latitude offset as a string. */
-  ossimString getGeodeticLatOffset()const;
-
-  /**
-   * @param geodeticLatOffset Value to Set the geodedic latitude offset to.
-   * Converted to a string with four digit precision.
-   */
-  void setGeodeticLatOffset(const ossim_float64& geodeticLatOffset);
-
-  /**
-   * @param geodeticLatOffset geodedic latitude offset string to set
-   * theGeodeticLatOffset to.
-   */
-  void setGeodeticLatOffset(const ossimString& geodeticLatOffset);
-
-  /** @return Geodetic longitude offset as a string. */
-  ossimString getGeodeticLonOffset()const;
-
-  /**
-   * @param geodeticLonOffset Value to Set the geodedic longitude offset to.
-   * Converted to a string with four digit precision.
-   */
-  void setGeodeticLonOffset(const ossim_float64& geodeticLonOffset);
-
-  /**
-   * @param geodeticLonOffset Value to Set the geodedic longitude offset to.
-   */
-  void setGeodeticLonOffset(const ossimString& geodeticLonOffset);
-
-  /** @return Geodetic height offset as a string. */
-  ossimString getGeodeticHeightOffset()const;
-
-  /**
-   * @param geodeticHeightOffset value to Set the height offset to.
-   * Converted to a string truncated to an int.
-   */
-  void setGeodeticHeightOffset(ossim_int32 geodeticHeightOffset);
-  
-  /** @param geodeticHeightOffset value to Set the height offset to. */
-  void setGeodeticHeightOffset(const ossimString& geodeticHeightOffset);
-
-  /** @return The line scale as a string. */
-  ossimString getLineScale()const;
-  
-  /**
-   * @param lineScale The value to set the line scale to.
-   * Converted to a string.
-   */
-  void setLineScale(ossim_uint32 lineScale);
-
-  /**
-   * @param lineScale The value to set the line scale to.
-   */
-  void setLineScale(const ossimString& lineScale);
-
-  /**
-   * @return the sample scale as a string.
-   */
-  ossimString getSampleScale()const;
-
-  /**
-   * @param sampleScale The value to set the sample scale to.
-   * Converted to a string truncated to an int.
-   */
-  void setSampleScale(ossim_uint32 sampleScale);
-
-  /**
-   * @param sampleScale The value to set the sample scale to.
-   */
-  void setSampleScale(const ossimString& sampleScale);
-
-  /** @return The Geodetic latitude scale as a string. */
-  ossimString getGeodeticLatScale()const;
-
-  /**
-   * @param geodeticLatScale The value to set the geodedic latitude scale to.
-   * Converted to a string with four digit precision.
-   */
-  void setGeodeticLatScale(const ossim_float64& geodeticLatScale);
-
-  /**
-   * @param geodeticLatScale The value to set the geodedic latitude scale to.
-   */
-  void setGeodeticLatScale(const ossimString& geodeticLatScale);
-
-  /** @return Geodetic longitude scale as a string. */
-  ossimString getGeodeticLonScale()const;
-
-  /**
-   * @param geodeticLonScale The value to set the geodedic longitude scale to.
-   * Converted to a string with four digit precision.
-   */
-  void setGeodeticLonScale(const ossim_float64& geodeticLonScale);
-
-  /**
-   * @param geodeticLonScale The value to set the geodedic longitude scale to.
-   */
-  void setGeodeticLonScale(const ossimString& geodeticLonScale);
-
-  /** @return The geodetic height scale as a string. */
-  ossimString getGeodeticHeightScale()const;
-
-  /**
-   * @param geodeticHeightScale The value to set the height scale to.
-   * Converted to a string truncated to an int.
-   */
-  void setGeodeticHeightScale(ossim_int32 geodeticHeightScale);
-  
-  /**
-   * @param geodeticHeightScale The value to set the height scale to.
-   */
-  void setGeodeticHeightScale(const ossimString& geodeticHeightScale);
-
-  /**
-   * @param idx Index of line numerator coefficient to get.
-   * Range: 0 - 19
-   *
-   * @return The line numerator coefficient as a string.
-   */
-  ossimString getLineNumeratorCoeff(ossim_uint32 idx)const;
-
-  /**
-   * @param coeff This should be an array of 20 line numerator coefficients.
-   * Coefficients will be converted to a scientific string to conform to
-   * specification.
-   *
-   * @note if (coeff.size() != 20) no action is taken.
-   */  
-  void setLineNumeratorCoeff(const std::vector<ossim_float64>& coeff);
-  
-  /**
-   * @param idx index of line numerator coefficient to set.
-   * Range: 0 - 19
-   *
-   * @param coeff Value to set line numerator coefficient to for
-   * idx or index.
-   */  
-  void setLineNumeratorCoeff(ossim_uint32 idx,
-                             const ossimString& coeff);
-
-  /**
-   * @param idx index of line denominator coefficient to get.
-   * Range: 0 - 19
-   *
-   * @return line  denominator coefficient as a string.
-   */
-  ossimString getLineDenominatorCoeff(ossim_uint32 idx)const;
-  
-  /**
-   * @param coeff This should be an array of 20 line denominator coefficients.
-   * Coefficients will be converted to a scientific string to conform to
-   * specification.
-   *
-   * @note if (coeff.size() != 20) no action is taken.
-   */  
-  void setLineDenominatorCoeff(const std::vector<ossim_float64>& coeff);
-  
-  /**
-   * @param idx index of line denominator coefficient to set.
-   * Range: 0 - 19
-   *
-   * @param lineDenominatorCoeff Value to set line denominator coefficient
-   * to for idx or index.
-   */  
-  void setLineDenominatorCoeff(ossim_uint32 idx,
-                               const ossimString& coeff);
-
-  /**
-   * @param idx Index of sample numerator coefficient to get.
-   * Range: 0 - 19
-   *
-   * @return The sample numerator coefficient as a string.
-   */
-  ossimString getSampleNumeratorCoeff(ossim_uint32 idx)const;
-
-  /**
-   * @param coeff This should be an array of 20 sample numerator coefficients.
-   * Coefficients will be converted to a scientific string to conform to
-   * specification.
-   *
-   * @note if (coeff.size() != 20) no action is taken.
-   */  
-  void setSampleNumeratorCoeff(const std::vector<ossim_float64>& coeff);
-  
-  /**
-   * @param idx index of sample numerator coefficient to set.
-   * Range: 0 - 19
-   *
-   * @param coeff Value to set sample numerator coefficient to for
-   * idx or index.
-   */  
-  void setSampleNumeratorCoeff(ossim_uint32 idx,
-                             const ossimString& coeff);
-
-  /**
-   * @param idx index of sample denominator coefficient to get.
-   * Range: 0 - 19
-   *
-   * @return sample  denominator coefficient as a string.
-   */
-  ossimString getSampleDenominatorCoeff(ossim_uint32 idx)const;
-  
-  /**
-   * @param coeff This should be an array of 20 sample denominator coefficients.
-   * Coefficients will be converted to a scientific string to conform to
-   * specification.
-   *
-   * @note if (coeff.size() != 20) no action is taken.
-   */  
-  void setSampleDenominatorCoeff(const std::vector<ossim_float64>& coeff);
-  
-  /**
-   * @param idx index of sample denominator coefficient to set.
-   * Range: 0 - 19
-   *
-   * @param sampleDenominatorCoeff Value to set sample denominator coefficient
-   * to for idx or index.
-   */  
-  void setSampleDenominatorCoeff(ossim_uint32 idx,
-                               const ossimString& coeff);
-
-   /**
-    * @brief Print method that outputs a key/value type format
-    * adding prefix to keys.
-    * @param out Stream to output to.
-    * @param prefix Prefix added to key like "image0.";
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix=std::string()) const;
-
-  virtual void setProperty(ossimRefPtr<ossimProperty> property);
-  virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-  virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-protected:
-
-  /**
-   * FIELD: SUCCESS
-   *
-   * Required 1 byte field.
-   * 
-   * Value is 1
-   * 
-   */
-  char theSuccess[SUCCESS_SIZE+1];
-   
-  /**
-   * FIELD: ERR_BIAS
-   *
-   * required 7 byte field
-   * 
-   * Error - Bias. 68% non time-varying error estimate assumes
-   * correlated images.
-   *
-   * Values range from 0000.00 to 9999.99 meters
-   */
-  char theErrorBias[ERROR_BIAS_SIZE+1];
-
-  /**
-   * FIELD ERR_RAND
-   *
-   * Required 7 byte field
-   * 
-   * Error - Random. 68% time-varying error estimate assumes
-   * correlated images. 0000.00 to 9999.99 meters
-   */
-  char theErrRand[ERR_RAND_SIZE+1];
-
-  /**
-   * FIELD: LINE_OFF
-   *
-   * required 6 byte field.
-   * 
-   * value is in pixels and ranges from 000000-999999
-   */
-  char theLineOffset[LINE_OFFSET_SIZE+1];
-
-  /**
-   * FIELD: SAMP_OFF
-   *
-   * required 5 byte field.
-   *
-   * value is in pixels and ranges from 00000-99999
-   */
-  char theSampleOffset[SAMPLE_OFFSET_SIZE+1];
-
-  /**
-   * FIELD: LAT_OFF
-   *
-   * required 8 byte field.
-   *
-   * Holds the lat offset in degrees and ranges from +-90.0000
-   */
-  char theGeodeticLatOffset[GEODETIC_LAT_OFFSET_SIZE+1];
-
-  /**
-   * FIELD: LONG_OFF
-   *
-   * required 9 byte field.
-   *
-   * holds the lon offset in degrees and ranges from +-180.0000
-   */
-  char theGeodeticLonOffset[GEODETIC_LON_OFFSET_SIZE+1];
-
-  /**
-   * FIELD: HEIGHT_OFF
-   *
-   * required 5 byte field.
-   *
-   * holds the height offset in meters and ranges from +-9999
-   */
-  char theGeodeticHeightOffset[GEODETIC_HEIGHT_OFFSET_SIZE+1];
-
-  /**
-   * FIELD: LINE_SCALE
-   *
-   * required 6 byte field.
-   *
-   * holds the line scale in pixels and ranges from 000001-999999
-   * 
-   */
-  char theLineScale[LINE_SCALE_SIZE+1];
-
-  /**
-   * FIELD: SAMP_SCALE
-   *
-   * required 5 byte field.
-   *
-   * holds the line scale in pixels and ranges from 00001-99999
-   * 
-   */
-  char theSampleScale[SAMPLE_SCALE_SIZE+1];
-
-  /**
-   * FIELD: LAT_SCALE
-   *
-   * required 8 byte field
-   *
-   * holds the lat scale in degrees and ranges from +-90.0000 degrees
-   */
-  char theGeodeticLatScale[GEODETIC_LAT_SCALE_SIZE+1];
-
-  /**
-   * FIELD: LON_SCALE
-   *
-   * required 9 byte field
-   *
-   * holds the lon scale in degrees and ranges from +-180.0000 degrees
-   */
-  char theGeodeticLonScale[GEODETIC_LON_SCALE_SIZE+1];
-
-  /**
-   * FIELD: HEIGHT_SCALE
-   *
-   * required 5 byte field
-   *
-   * holds the geodetic height scale and ranges from +-9999 meters.
-   */
-  char theGeodeticHeightScale[GEODETIC_HEIGHT_SCALE_SIZE+1];
-
-  /**
-   * FIELD: LINE_NUM_COEFF_1 through LINE_NUM_COEFF_20
-   *
-   * Line Numerator Coefficients.
-   *
-   * required 12 byte field ranging �0.999999E�9 Twenty coefficients for the
-   * polynomial
-   *
-   */     
-  std::vector<ossimString> theLineNumeratorCoefficient;
-
-  /**
-   * FIELD: LINE_DEN_COEFF_1 through LINE_DEN_COEFF_20
-   *
-   * Line Denominato Coefficients.
-   *
-   * required 12 byte field ranging �0.999999E�9 Twenty coefficients for the
-   * polynomial
-   *
-   */     
-  std::vector<ossimString> theLineDenominatorCoefficient;
-
-  /**
-   * FIELD: SAMP_NUM_COEFF_1 through SAMP_NUM_COEFF_20
-   *
-   * samp Numerator Coefficients.
-   *
-   * required 12 byte field ranging �0.999999E�9 Twenty coefficients for the
-   * polynomial
-   *
-   */     
-  std::vector<ossimString> theSampleNumeratorCoefficient;
-
-  /**
-   * FIELD: SAMP_DEN_COEFF_1 through SAMP_DEN_COEFF_20
-   *
-   * samp Denominator Coefficients.
-   *
-   * required 12 byte field ranging �0.999999E�9 Twenty coefficients for the
-   * polynomial
-   *
-   */     
-  std::vector<ossimString> theSampleDenominatorCoefficient;
-
-TYPE_DATA   
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfRpfTagFactory.h b/include/ossim/support_data/ossimNitfRpfTagFactory.h
deleted file mode 100644
index e996e88..0000000
--- a/include/ossim/support_data/ossimNitfRpfTagFactory.h
+++ /dev/null
@@ -1,39 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// LICENSE: LGPL  see top level LICENSE.txt
-// 
-// Author: Garrett Potts (gpotts at imagelinks.com)
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfRpfTagFactory.h 17207 2010-04-25 23:21:14Z dburken $
-#ifndef ossimNitfRpfTagFactory_HEADER
-#define ossimNitfRpfTagFactory_HEADER
-#include <ossim/support_data/ossimNitfTagFactory.h>
-class ossimNitfRegisteredTag;
-
-class ossimNitfRpfTagFactory : public ossimNitfTagFactory
-{
-public:
-   virtual ~ossimNitfRpfTagFactory();
-   static ossimNitfRpfTagFactory* instance();
-   virtual ossimRefPtr<ossimNitfRegisteredTag> create(const ossimString &tagName)const;
-   
-protected:
-   ossimNitfRpfTagFactory();
-
-private:
-   static ossimNitfRpfTagFactory* theInstance;
-   /*!
-    * Hide this.
-    */
-   ossimNitfRpfTagFactory(const ossimNitfRpfTagFactory & /* rhs */){}
-
-   /*!
-    * Hide this.
-    */ 
-   ossimNitfRpfTagFactory& operator =(const ossimNitfRpfTagFactory & /* rhs */){return *this;}
-TYPE_DATA
-};
-#endif
diff --git a/include/ossim/support_data/ossimNitfSensraTag.h b/include/ossim/support_data/ossimNitfSensraTag.h
deleted file mode 100644
index 5e159ab..0000000
--- a/include/ossim/support_data/ossimNitfSensraTag.h
+++ /dev/null
@@ -1,268 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Walt Bunch
-//
-// Description: Nitf support class for SENSRA - Sensor parameters extension.
-// 
-//********************************************************************
-// $Id: ossimNitfSensraTag.h 22013 2012-12-19 17:37:20Z dburken $
-#ifndef ossimNitfSensraTag_HEADER
-#define ossimNitfSensraTag_HEADER
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-
-class OSSIM_DLL ossimNitfSensraTag : public ossimNitfRegisteredTag
-{
-public:
-
-   enum
-   {
-      REF_ROW_SIZE         = 8,
-      REF_COL_SIZE         = 8,
-      SENSOR_MODEL_SIZE    = 6,
-      SENSOR_MOUNT_SIZE    = 3,
-      SENSOR_LOC_SIZE      = 21,
-      SENSOR_ALT_SRC_SIZE  = 1,
-      SENSOR_ALT_SIZE      = 6,
-      SENSOR_ALT_UNIT_SIZE = 1,
-      SENSOR_AGL_SIZE      = 5,
-      SENSOR_PITCH_SIZE    = 7,
-      SENSOR_ROLL_SIZE     = 8,
-      SENSOR_YAW_SIZE      = 8,
-      PLATFORM_PITCH_SIZE  = 7,
-      PLATFORM_ROLL_SIZE   = 8,
-      PLATFORM_HDG_SIZE    = 5,
-      GROUND_SPD_SRC_SIZE  = 1,
-      GROUND_SPEED_SIZE    = 6,
-      GROUND_SPD_UNIT_SIZE = 1,
-      GROUND_TRACK_SIZE    = 5,
-      VERTICAL_VEL_SIZE    = 5,
-      VERT_VEL_UNIT_SIZE   = 1,
-      SWATH_FRAMES_SIZE    = 4,
-      N_SWATHS_SIZE        = 4,
-      SPOT_NUM_SIZE        = 3
-      //                  -----
-      //                   132
-   };
-
-   ossimNitfSensraTag();
-   virtual ~ossimNitfSensraTag();
-
-   virtual void parseStream(std::istream& in);
-   virtual void writeStream(std::ostream& out);
-
-   virtual void clearFields();
-
-   /**
-    * @brief Print method that outputs a key/value type format
-    * adding prefix to keys.
-    * @param out Stream to output to.
-    * @param prefix Prefix added to key like "image0.";
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix) const;
-   
-  // The set methods below taking ossimString args will truncate and
-  // pad with spaces, as necessary, to match enumed size
-   void setRefRow(ossimString refRow);
-   ossimString getRefRow()const;
-   void setRefCol(ossimString refCol);
-   ossimString getRefCol()const;
-   void setSensorModel(ossimString sensorModel);
-   ossimString getSensorModel()const;
-   void setSensorMount(ossimString sensorMount);
-   ossimString getSensorMount()const;
-   void setSensorLoc(ossimString sensorLoc);
-   ossimString getSensorLoc()const;
-   void setSensorAltSrc(ossimString sensorAltSrc);
-   ossimString getSensorAltSrc()const;
-   void setSensorAlt(ossimString sensorAlt);
-   ossimString getSensorAlt()const;
-   void setSensorAltUnit(ossimString sensorAltUnit);
-   ossimString getSensorAltUnit()const;
-   void setSensorAgl(ossimString sensorAgl);
-   ossimString getSensorAgl()const;
-   void setSensorPitch(ossimString sensorPitch);
-   ossimString getSensorPitch()const;
-   void setSensorRoll(ossimString sensorRoll);
-   ossimString getSensorRoll()const;
-   void setSensorYaw(ossimString sensorYaw);
-   ossimString getSensorYaw()const;
-   void setPlatformPitch(ossimString platformPitch);
-   ossimString getPlatformPitch()const;
-   void setPlatformRoll(ossimString platformRoll);
-   ossimString getPlatformRoll()const;
-   void setPlatformHdg(ossimString platformHdg);
-   ossimString getPlatformHdg()const;
-   void setGroundSpdSrc(ossimString groundSpdSrc);
-   ossimString getGroundSpdSrc()const;
-   void setGroundSpeed(ossimString groundSpeed);
-   ossimString getGroundSpeed()const;
-   void setGroundSpdUnit(ossimString groundSpdUnit);
-   ossimString getGroundSpdUnit()const;
-   void setGroundTrack(ossimString groundTrack);
-   ossimString getGroundTrack()const;
-   void setVerticalVel(ossimString verticalVel);
-   ossimString getVerticalVel()const;
-   void setVertVelUnit(ossimString vertVelUnit);
-   ossimString getVertVelUnit()const;
-   void setSwathFrames(ossimString swathFrames);
-   ossimString getSwathFrames()const;
-   void setNSwaths(ossimString nSwaths);
-   ossimString getNSwaths()const;
-   void setSpotNum(ossimString spotNum);
-   ossimString getSpotNum()const;
-
-protected:
-
-   /**
-    * FIELD: REFROW
-    *
-    */
-   char theRefRow[REF_ROW_SIZE+1];
-
-   /**
-    * FIELD: REFCOL
-    *
-    */
-   char theRefCol[REF_COL_SIZE+1];
-
-   /**
-    * FIELD: SENSORMODEL
-    *
-    */
-   char theSensorModel[SENSOR_MODEL_SIZE+1];
-
-   /**
-    * FIELD: SENSORMOUNT
-    *
-    */
-   char theSensorMount[SENSOR_MOUNT_SIZE+1];
-
-   /**
-    * FIELD: SENSORLOC
-    *
-    */
-   char theSensorLoc[SENSOR_LOC_SIZE+1];
-
-   /**
-    * FIELD: SENSORALTSRC
-    *
-    */
-   char theSensorAltSrc[SENSOR_ALT_SRC_SIZE+1];
-
-   /**
-    * FIELD: SENSORALT
-    *
-    */
-   char theSensorAlt[SENSOR_ALT_SIZE+1];
-
-   /**
-    * FIELD: SENSORALTUNIT
-    *
-    */
-   char theSensorAltUnit[SENSOR_ALT_UNIT_SIZE+1];
-
-   /**
-    * FIELD: SENSORAGL
-    *
-    */
-   char theSensorAgl[SENSOR_AGL_SIZE+1];
-
-   /**
-    * FIELD: SENSORPITCH
-    *
-    */
-   char theSensorPitch[SENSOR_PITCH_SIZE+1];
-
-   /**
-    * FIELD: SENSORROLL
-    *
-    */
-   char theSensorRoll[SENSOR_ROLL_SIZE+1];
-
-   /**
-    * FIELD: SENSORYAW
-    *
-    */
-   char theSensorYaw[SENSOR_YAW_SIZE+1];
-
-   /**
-    * FIELD: PLATFORMPITCH
-    *
-    */
-   char thePlatformPitch[PLATFORM_PITCH_SIZE+1];
-
-   /**
-    * FIELD: PLATFORMROLL
-    *
-    */
-   char thePlatformRoll[PLATFORM_ROLL_SIZE+1];
-
-   /**
-    * FIELD: PLATFORMHDG
-    *
-    */
-   char thePlatformHdg[PLATFORM_HDG_SIZE+1];
-
-   /**
-    * FIELD: GROUNDSPDSRC
-    *
-    */
-   char theGroundSpdSrc[GROUND_SPD_SRC_SIZE+1];
-
-   /**
-    * FIELD: GROUNDSPEED
-    *
-    */
-   char theGroundSpeed[GROUND_SPEED_SIZE+1];
-
-   /**
-    * FIELD: GROUNDSPDUNIT
-    *
-    */
-   char theGroundSpdUnit[GROUND_SPD_UNIT_SIZE+1];
-
-   /**
-    * FIELD: GROUNDTRACK
-    *
-    */
-   char theGroundTrack[GROUND_TRACK_SIZE+1];
-
-   /**
-    * FIELD: VERTICALVEL
-    *
-    */
-   char theVerticalVel[VERTICAL_VEL_SIZE+1];
-
-   /**
-    * FIELD: VERTVELUNIT
-    *
-    */
-   char theVertVelUnit[VERT_VEL_UNIT_SIZE+1];
-
-   /**
-    * FIELD: SWATHFRAMES
-    *
-    */
-   char theSwathFrames[SWATH_FRAMES_SIZE+1];
-
-   /**
-    * FIELD: NSWATHS
-    *
-    */
-   char theNSwaths[N_SWATHS_SIZE+1];
-
-   /**
-    * FIELD: SPOTNUM
-    *
-    */
-   char theSpotNum[SPOT_NUM_SIZE+1];
-
-TYPE_DATA   
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfStdidcTag.h b/include/ossim/support_data/ossimNitfStdidcTag.h
deleted file mode 100644
index 2eb681c..0000000
--- a/include/ossim/support_data/ossimNitfStdidcTag.h
+++ /dev/null
@@ -1,203 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author:  Walt Bunch
-// 
-// Description:   NITF support data class for STDIDC - Standard ID extension.
-//
-// See:  STDI-000_v2.1 Table 7-3 for detailed description.
-// 
-//********************************************************************
-// $Id: ossimNitfStdidcTag.h 22013 2012-12-19 17:37:20Z dburken $
-#ifndef ossimNitfStdidcTag_HEADER
-#define ossimNitfStdidcTag_HEADER 1
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-
-class OSSIM_DLL ossimNitfStdidcTag : public ossimNitfRegisteredTag
-{
-public:
-
-   enum
-   {
-      ACQ_DATE_SIZE         = 14,
-      MISSION_SIZE          = 14,
-      PASS_SIZE             = 2,
-      OP_NUM_SIZE           = 3,
-      START_SEGMENT_SIZE    = 2,
-      REPRO_NUM_SIZE        = 2,
-      REPLAY_REGEN_SIZE     = 3,
-      BLANK_FILL_SIZE       = 1,
-      START_COLUMN_SIZE     = 3,
-      START_ROW_SIZE        = 5,
-      END_SEGMENT_SIZE      = 2,
-      END_COLUMN_SIZE       = 3,
-      END_ROW_SIZE          = 5,
-      COUNTRY_SIZE          = 2,
-      WAC_SIZE              = 4,
-      LOCATION_SIZE         = 11,
-      FIELD17_SIZE          = 5,
-      FIELD18_SIZE          = 8
-      //                   -----
-      //                     89 bytes
-   };
-      
-   ossimNitfStdidcTag();
-   virtual ~ossimNitfStdidcTag();
-
-   virtual void parseStream(std::istream& in);
-   virtual void writeStream(std::ostream& out);
-
-   virtual void clearFields();
-
-  // The set methods below taking ossimString args will truncate and
-  // pad with spaces, as necessary, to match enumed size
-   void setAcqDate(ossimString acqDate);
-   ossimString getAcqDate()const;
-   void setMission(ossimString mission);
-   ossimString getMission()const;
-   void setPass(ossimString pass);
-   ossimString getPass()const;
-   void setOpNum(ossimString opNum);
-   ossimString getOpNum()const;
-   void setStartSegment(ossimString startSegment);
-   ossimString getStartSegment()const;
-   void setReproNum(ossimString reproNum);
-   ossimString getReproNum()const;
-   void setReplayRegen(ossimString replayRegen);
-   ossimString getReplayRegen()const;
-   void setBlankFill(ossimString blankFill);
-   ossimString getBlankFill()const;
-   void setStartColumn(ossimString startColumn);
-   ossimString getStartColumn()const;
-   void setStartRow(ossimString startRow);
-   ossimString getStartRow()const;
-   void setEndSegment(ossimString endSegment);
-   ossimString getEndSegment()const;
-   void setEndColumn(ossimString endColumn);
-   ossimString getEndColumn()const;
-   void setEndRow(ossimString endRow);
-   ossimString getEndRow()const;
-   void setCountry(ossimString country);
-   ossimString getCountry()const;
-   void setWac(ossimString wac);
-   ossimString getWac()const;
-   void setLocation(ossimString location);
-   ossimString getLocation()const;
-   void setField17(ossimString field17);
-   ossimString getField17()const;
-   void setField18(ossimString field18);
-   ossimString getField18()const;
-
-   /**
-    * @brief Print method that outputs a key/value type format
-    * adding prefix to keys.
-    * @param out Stream to output to.
-    * @param prefix Prefix added to key like "image0.";
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix=std::string()) const;
-   
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-
-
-protected:
-
-   /**
-    * FIELD: ACQDATE
-    */
-   char theAcqDate[ACQ_DATE_SIZE+1];
-   
-   /**
-    * FIELD: MISSION
-    */
-   char theMission[MISSION_SIZE+1];
-   
-   /**
-    * FIELD: PASS
-    */
-   char thePass[PASS_SIZE+1];
-   
-   /**
-    * FIELD: OPNUM
-    */
-   char theOpNum[OP_NUM_SIZE+1];
-   
-   /**
-    * FIELD: STARTSEGMENT
-    */
-   char theStartSegment[START_SEGMENT_SIZE+1];
-   
-   /**
-    * FIELD: REPRONUM
-    */
-   char theReproNum[REPRO_NUM_SIZE+1];
-   
-   /**
-    * FIELD: REPLAYREGEN
-    */
-   char theReplayRegen[REPLAY_REGEN_SIZE+1];
-   
-   /**
-    * FIELD: BLANKFILL
-    */
-   char theBlankFill[BLANK_FILL_SIZE+1];
-   
-   /**
-    * FIELD: STARTCOLUMN
-    */
-   char theStartColumn[START_COLUMN_SIZE+1];
-   
-   /**
-    * FIELD: STARTROW
-    */
-   char theStartRow[START_ROW_SIZE+1];
-   
-   /**
-    * FIELD: ENDSEGMENT
-    */
-   char theEndSegment[END_SEGMENT_SIZE+1];
-   
-   /**
-    * FIELD: ENDCOLUMN
-    */
-   char theEndColumn[END_COLUMN_SIZE+1];
-   
-   /**
-    * FIELD: ENDROW
-    */
-   char theEndRow[END_ROW_SIZE+1];
-   
-   /**
-    * FIELD: COUNTRY
-    */
-   char theCountry[COUNTRY_SIZE+1];
-   
-   /**
-    * FIELD: WAC
-    */
-   char theWac[WAC_SIZE+1];
-   
-   /**
-    * FIELD: LOCATION
-    */
-   char theLocation[LOCATION_SIZE+1];
-   
-   /**
-    * FIELD: FIELD17
-    */
-   char theField17[FIELD17_SIZE+1];
-   
-   /**
-    * FIELD: FIELD18
-    */
-   char theField18[FIELD18_SIZE+1];
-
-TYPE_DATA   
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfTagFactoryRegistry.h b/include/ossim/support_data/ossimNitfTagFactoryRegistry.h
deleted file mode 100644
index 52f7b69..0000000
--- a/include/ossim/support_data/ossimNitfTagFactoryRegistry.h
+++ /dev/null
@@ -1,51 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfTagFactoryRegistry.h 10291 2007-01-17 19:20:23Z dburken $
-#ifndef ossimNitfTagFactoryRegistry_HEADER
-#define ossimNitfTagFactoryRegistry_HEADER
-
-#include <vector>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-
-class ossimString;
-class ossimNitfTagFactory;
-
-class OSSIM_DLL ossimNitfTagFactoryRegistry
-{
-public:
-   virtual ~ossimNitfTagFactoryRegistry();
-   void registerFactory(ossimNitfTagFactory* aFactory);
-   void unregisterFactory(ossimNitfTagFactory* aFactory);
-   
-   static ossimNitfTagFactoryRegistry* instance();
-   
-   ossimRefPtr<ossimNitfRegisteredTag> create(const ossimString &tagName)const;
-   bool exists(ossimNitfTagFactory* factory)const;
-   
-protected:
-   ossimNitfTagFactoryRegistry();
-
-private:
-   /** hidden copy constructory */
-   ossimNitfTagFactoryRegistry(const ossimNitfTagFactoryRegistry& factory);
-
-   /** hidden operator= */
-   const ossimNitfTagFactoryRegistry& operator=(
-      const ossimNitfTagFactoryRegistry& factory);
-
-   void initializeDefaults();
-
-   static ossimNitfTagFactoryRegistry* theInstance;
-   
-   std::vector<ossimNitfTagFactory*> theFactoryList;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfTagInformation.h b/include/ossim/support_data/ossimNitfTagInformation.h
deleted file mode 100644
index 2a7028f..0000000
--- a/include/ossim/support_data/ossimNitfTagInformation.h
+++ /dev/null
@@ -1,86 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfTagInformation.h 16997 2010-04-12 18:53:48Z dburken $
-#ifndef ossimNitfTagInformation_HEADER
-#define ossimNitfTagInformation_HEADER
-
-#include <ossim/base/ossimObject.h>
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-
-class ossimString;
-
-class OSSIMDLLEXPORT ossimNitfTagInformation : public ossimObject
-{
-public:
-   ossimNitfTagInformation(ossimRefPtr<ossimNitfRegisteredTag> tagData = 0);
-   virtual ~ossimNitfTagInformation();
-   
-   virtual void parseStream(std::istream& in);
-   virtual void writeStream(std::ostream& out);
-
-   void setTagName(const ossimString& tagName);
-   void setTagLength(ossim_uint32 tagLength);
-
-   /**
-    * Length of the 5 byte tag length the 6 byte tag name and
-    * the data length.
-    * So we have Data length + 11 bytes.
-    */
-   ossim_uint32 getTotalTagLength()const;
-
-   /**
-    * Should return the value of theTagLength which is the length of
-    * the data in bytes.
-    */
-   ossim_uint32 getTagLength()const;
-   ossim_uint64 getTagOffset()const;
-   ossim_uint64 getTagDataOffset()const;
-   
-   ossimString   getTagName()const;
-   virtual std::ostream& print(std::ostream& out)const;
-   void clearFields();
-   
-   ossimRefPtr<ossimNitfRegisteredTag> getTagData();
-   const ossimRefPtr<ossimNitfRegisteredTag> getTagData()const;
-   void setTagData(ossimRefPtr<ossimNitfRegisteredTag> tagData);
-   
-private:
-
-   /**
-    * This is a 6 byte field
-    */
-   char          theTagName[7];
-
-   /**
-    * This is a 5 byte field
-    */
-   char           theTagLength[6];
-
-   /**
-    * This will hold the offset to the start of the above information
-    * This is just a work variable.
-    */
-   ossim_uint64 theTagOffset;
-
-   /**
-    * This will hold the start to the data.  This is just the
-    * position in the file just past the tag length field.
-    * This is just a work variable
-    */
-   ossim_uint64 theTagDataOffset;
-
-   /**
-    * Used to hold the tag data.
-    */
-   ossimRefPtr<ossimNitfRegisteredTag> theTagData;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfUnknownTag.h b/include/ossim/support_data/ossimNitfUnknownTag.h
deleted file mode 100644
index 374c7fd..0000000
--- a/include/ossim/support_data/ossimNitfUnknownTag.h
+++ /dev/null
@@ -1,83 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Unknown tag class declaration.
-//
-// Note: By "unknown" this means that the tag name was not found in any of
-// the tag factories.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimNitfUnknownTag.h 22013 2012-12-19 17:37:20Z dburken $
-#ifndef ossimNitfUnknownTag_HEADER
-#define ossimNitfUnknownTag_HEADER 1
-
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-
-class OSSIM_DLL ossimNitfUnknownTag : public ossimNitfRegisteredTag
-{
-public:
-   /** default constructor */
-   ossimNitfUnknownTag();
-
-   /** destructor */
-   virtual ~ossimNitfUnknownTag();
-  
-   /**
-    * Parse method.
-    *
-    * @param in Stream to parse.  This will read the entire tag length into
-    * an array.
-    */
-   virtual void parseStream(std::istream& in);
-   
-   /**
-    * Write method.
-    *
-    * @param out Stream to write to.
-    */
-   virtual void writeStream(std::ostream& out);
-   
-   /**
-    * Clears all string fields within the record to some default nothingness.
-    */
-   virtual void clearFields();
-   
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix=std::string()) const;
-
-   /**
-    * @param length Length of tag.
-    *
-    * @note The tag length must be set prior to calling "parseStream".
-    *
-    * @note Since you must have a length to read theTagData, if theTagData
-    * exist it will be deleted by this method.
-    * Subsequent "parseStream" calls will allocate theTagData as needed.
-    */
-   virtual void setTagLength(ossim_uint32 length);
-   
-protected:
-
-   /**
-    * @return true if all characters in theTagData are printable.
-    */
-   bool tagDataIsAscii() const;
-
-   /**
-    * Holds entire tag data(theTagLength) plus one byte for null terminator.
-    */
-   char* m_tagData;
-   
-TYPE_DATA   
-};
-
-#endif /* End of "#ifndef ossimNitfUnknownTag_HEADER" */
diff --git a/include/ossim/support_data/ossimNitfUse00aTag.h b/include/ossim/support_data/ossimNitfUse00aTag.h
deleted file mode 100644
index cdbcfb9..0000000
--- a/include/ossim/support_data/ossimNitfUse00aTag.h
+++ /dev/null
@@ -1,282 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Walt Bunch
-//
-// Description: Nitf support class for USE00A -
-// Exploitation Usability extension.
-// 
-//********************************************************************
-// $Id: ossimNitfUse00aTag.h 22013 2012-12-19 17:37:20Z dburken $
-#ifndef ossimNitfUse00aTag_HEADER
-#define ossimNitfUse00aTag_HEADER
-
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-
-class OSSIM_DLL ossimNitfUse00aTag : public ossimNitfRegisteredTag
-{
-public:
-   
-   enum
-   {
-      ANGLE_TO_NORTH_SIZE  = 3,
-      MEAN_GSD_SIZE        = 5,
-      FIELD3_SIZE          = 1,
-      DYNAMIC_RANGE_SIZE   = 5,
-      FIELD5_SIZE          = 3,
-      FIELD6_SIZE          = 1,
-      FIELD7_SIZE          = 3,
-      OBL_ANG_SIZE         = 5,
-      ROLL_ANG_SIZE        = 6,
-      FIELD10_SIZE         = 12,
-      FIELD11_SIZE         = 15,
-      FIELD12_SIZE         = 4,
-      FIELD13_SIZE         = 1,
-      FIELD14_SIZE         = 3,
-      FIELD15_SIZE         = 1,
-      FIELD16_SIZE         = 1,
-      N_REF_SIZE           = 2,
-      REV_NUM_SIZE         = 5,
-      N_SEG_SIZE           = 3,
-      MAX_LP_SEG_SIZE      = 6,
-      FIELD20_SIZE         = 6,
-      FIELD21_SIZE         = 6,
-      SUN_EL_SIZE          = 5,
-      SUN_AZ_SIZE          = 5
-      //                  -----
-      //                  107 bytes
-   };
-   
-   ossimNitfUse00aTag();
-   virtual ~ossimNitfUse00aTag();
-
-   virtual void parseStream(std::istream& in);
-   virtual void writeStream(std::ostream& out);
-
-   virtual void clearFields();
-   
-  // The set methods below taking ossimString args will truncate and
-  // pad with spaces, as necessary, to match enumed size
-   void setAngleToNorth(const ossimString& angleToNorth);
-   ossimString getAngleToNorth()const;
-   void setMeanGsd(const ossimString& meanGsd);
-   ossimString getMeanGsd()const;
-
-   /**
-    * @return MEANGSD field as a double converted to meters.
-    *
-    * @note Conversion used: gsd_in_meters = gsd / 12.0 * MTRS_PER_FT
-    */
-   ossim_float64 getMeanGsdInMeters() const;
-
-   void setField3(const ossimString& field3);
-   ossimString getField3()const;
-   void setDynamicRange(const ossimString& dynamicRange);
-   ossimString getDynamicRange()const;
-   void setField5(const ossimString& field5);
-   ossimString getField5()const;
-   void setField6(const ossimString& field6);
-   ossimString getField6()const;
-   void setField7(const ossimString& field7);
-   ossimString getField7()const;
-   void setOblAng(const ossimString& oblAng);
-   ossimString getOblAng()const;
-   void setRollAng(const ossimString& rollAng);
-   ossimString getRollAng()const;
-   void setField10(const ossimString& field10);
-   ossimString getField10()const;
-   void setField11(const ossimString& field11);
-   ossimString getField11()const;
-   void setField12(const ossimString& field12);
-   ossimString getField12()const;
-   void setField13(const ossimString& field13);
-   ossimString getField13()const;
-   void setField14(const ossimString& field14);
-   ossimString getField14()const;
-   void setField15(const ossimString& field15);
-   ossimString getField15()const;
-   void setField16(const ossimString& field16);
-   ossimString getField16()const;
-   void setNRef(const ossimString& nRef);
-   ossimString getNRef()const;
-   void setRevNum(const ossimString& revNum);
-   ossimString getRevNum()const;
-   void setNSeg(const ossimString& nSeg);
-   ossimString getNSeg()const;
-   void setMaxLpSeg(const ossimString& maxLpSeg);
-   ossimString getMaxLpSeg()const;
-   void setField20(const ossimString& field20);
-   ossimString getField20()const;
-   void setField21(const ossimString& field21);
-   ossimString getField21()const;
-   void setSunEl(const ossimString& sunEl);
-   ossimString getSunEl()const;
-   void setSunAz(const ossimString& sunAz);
-   ossimString getSunAz()const;
-
-   /**
-    * @brief Print method that outputs a key/value type format
-    * adding prefix to keys.
-    * @param out Stream to output to.
-    * @param prefix Prefix added to key like "image0.";
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix=std::string()) const;
-   
-   virtual void setProperty(ossimRefPtr<ossimProperty> property);
-   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
-   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
-   
-protected:
-   
-   /**
-    * FIELD: ANGLETONORTH
-    *
-    */
-   char theAngleToNorth[ANGLE_TO_NORTH_SIZE+1];
-   
-   /**
-    * FIELD: MEANGSD
-    *
-    */
-   char theMeanGsd[MEAN_GSD_SIZE+1];
-   
-   /**
-    * FIELD: FIELD3
-    *
-    */
-   char theField3[FIELD3_SIZE+1];
-
-   /**
-    * FIELD: DYNAMICRANGE
-    *
-    */
-   char theDynamicRange[DYNAMIC_RANGE_SIZE+1];
-
-   /**
-    * FIELD: FIELD5
-    *
-    */
-   char theField5[FIELD5_SIZE+1];
-
-   /**
-    * FIELD: FIELD6
-    *
-    */
-   char theField6[FIELD6_SIZE+1];
-
-   /**
-    * FIELD: FIELD7
-    *
-    */
-   char theField7[FIELD7_SIZE+1];
-
-   /**
-    * FIELD: OBLANG
-    *
-    */
-   char theOblAng[OBL_ANG_SIZE+1];
-
-   /**
-    * FIELD: ROLLANG
-    *
-    */
-   char theRollAng[ROLL_ANG_SIZE+1];
-
-   /**
-    * FIELD: FIELD10
-    *
-    */
-   char theField10[FIELD10_SIZE+1];
-
-   /**
-    * FIELD: FIELD11
-    *
-    */
-   char theField11[FIELD11_SIZE+1];
-
-   /**
-    * FIELD: FIELD12
-    *
-    */
-   char theField12[FIELD12_SIZE+1];
-
-   /**
-    * FIELD: FIELD13
-    *
-    */
-   char theField13[FIELD13_SIZE+1];
-
-   /**
-    * FIELD: FIELD14
-    *
-    */
-   char theField14[FIELD14_SIZE+1];
-
-   /**
-    * FIELD: FIELD15
-    *
-    */
-   char theField15[FIELD15_SIZE+1];
-
-   /**
-    * FIELD: FIELD16
-    *
-    */
-   char theField16[FIELD16_SIZE+1];
-
-   /**
-    * FIELD: NREF
-    *
-    */
-   char theNRef[N_REF_SIZE+1];
-
-   /**
-    * FIELD: REVNUM
-    *
-    */
-   char theRevNum[REV_NUM_SIZE+1];
-
-   /**
-    * FIELD: NSEG
-    *
-    */
-   char theNSeg[N_SEG_SIZE+1];
-
-   /**
-    * FIELD: MAXLPSEG
-    *
-    */
-   char theMaxLpSeg[MAX_LP_SEG_SIZE+1];
-
-   /**
-    * FIELD: FIELD20
-    *
-    */
-   char theField20[FIELD20_SIZE+1];
-
-   /**
-    * FIELD: FIELD21
-    *
-    */
-   char theField21[FIELD21_SIZE+1];
-
-   /**
-    * FIELD: SUNEL
-    *
-    */
-   char theSunEl[SUN_EL_SIZE+1];
-
-   /**
-    * FIELD: SUNAZ
-    *
-    */
-   char theSunAz[SUN_AZ_SIZE+1];
-
-TYPE_DATA   
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNitfVqCompressionHeader.h b/include/ossim/support_data/ossimNitfVqCompressionHeader.h
deleted file mode 100644
index da09281..0000000
--- a/include/ossim/support_data/ossimNitfVqCompressionHeader.h
+++ /dev/null
@@ -1,79 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2004 Garrett Potts
-//
-// LICENSE: LGPL see top level LICENSE.txt for more details
-// 
-// Author: Garrett Potts
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfVqCompressionHeader.h 18413 2010-11-11 19:56:22Z gpotts $
-#ifndef ossimNitfVqCompressionHeader_HEADER
-#define ossimNitfVqCompressionHeader_HEADER
-
-#include <vector>
-#include <ossim/support_data/ossimNitfCompressionHeader.h>
-
-class OSSIM_DLL ossimNitfVqCompressionOffsetTableData
-{
-public:
-
-   ossimNitfVqCompressionOffsetTableData();
-   ossimNitfVqCompressionOffsetTableData(const ossimNitfVqCompressionOffsetTableData& rhs);
-   ~ossimNitfVqCompressionOffsetTableData();
-   const ossimNitfVqCompressionOffsetTableData& operator =(const ossimNitfVqCompressionOffsetTableData& rhs);
-   ossim_uint32 getDataLengthInBytes()const;
-   void clearFields();
-   void parseStream(std::istream& in);
-   
-   ossim_uint16 theTableId;
-   ossim_uint32 theNumberOfCompressionLookupRecords;
-   ossim_uint16 theNumberOfValuesPerCompressionLookup;
-   ossim_uint16 theCompressionLookupValueBitLength;
-   ossim_uint32 theCompressionLookupTableOffset;
-   ossim_uint8* theData;
-};
-
-class OSSIM_DLL ossimNitfVqCompressionHeader : public ossimNitfCompressionHeader
-{
-public:
-   ossimNitfVqCompressionHeader();
-   virtual void parseStream(std::istream &in);
-
-   virtual std::ostream& print(std::ostream& out) const;
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    */
-   virtual std::ostream& print(std::ostream& out,
-                               const std::string& prefix) const;  
-
-   virtual bool saveState(ossimKeywordlist& kwl, const ossimString& prefix="")const;
-   virtual ossim_uint32 getBlockSizeInBytes()const;
-   virtual ossim_uint32 getNumberOfImageRows()const;
-   virtual ossim_uint32 getNumberOfImageCodesPerRow()const;
-   virtual ossim_uint32 getCompressionAlgorithmId()const;
-   virtual ossim_uint32 getImageCodeBitLength()const;
-   virtual ossim_uint32 getNumberOfTables()const;
-   const std::vector<ossimNitfVqCompressionOffsetTableData>& getTable()const;
-   
-protected:
-   ossim_uint32 theNumberOfImageRows;
-   ossim_uint32 theNumberOfImageCodesPerRow;
-   ossim_uint8  theImageCodeBitLength;
-
-   ossim_uint16 theCompressionAlgorithmId;
-   ossim_uint16 theNumberOfCompressionLookupOffsetRecords;
-   ossim_uint16 theNumberOfCompressionParameterOffsetRecords;
-
-   ossim_uint32 theCompressionLookupOffsetTableOffset;
-   ossim_uint16 theCompressionLookupTableOffsetRecordLength;
-
-   std::vector<ossimNitfVqCompressionOffsetTableData> theTable;
-   void clearFields();
-
-TYPE_DATA   
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimNmeaMessage.h b/include/ossim/support_data/ossimNmeaMessage.h
deleted file mode 100644
index 51223a6..0000000
--- a/include/ossim/support_data/ossimNmeaMessage.h
+++ /dev/null
@@ -1,86 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL See top level LICENSE.txt file.
-//
-// File: ossimNmeaMessage.h
-//
-// Author:  Garrett Potts
-//
-// Description: Contains a general parser for NMEA messages.
-//
-//
-// $Id$
-//----------------------------------------------------------------------------
-#ifndef ossimNmeaMessage_HEADER
-#define ossimNmeaMessage_HEADER
-
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimReferenced.h>
-#include <ossim/base/ossimException.h>
-#include <iostream>
-#include <algorithm>
-#include <vector>
-
-
-class OSSIM_DLL ossimNmeaMessage : public ossimReferenced
-{
-public:
-   typedef std::vector<ossimString> FieldListType;
-   
-   ossimNmeaMessage(const std::string& acceptedStartingCharacters="!$"):m_startChars(acceptedStartingCharacters){}
-   
-   /**
-    * Parses a standard formatted NMEA message.  No exceptions are created for checksums.  The checksum needs
-    * to be checked after parsing by calling validCheckSum().
-    */
-   virtual void parseMessage(std::istream& in)throw(ossimException);
-   
-   virtual bool valid()const{return validCheckSum();}
-   bool validCheckSum()const{return m_validCheckSum;}
-   
-   
-   ossim_uint32 numberOfFields()const{return m_fields.size();}
-   
-   const std::string& getField(ossim_uint32 idx)
-   {
-      static ossimString empty="";
-      
-      if(idx < m_fields.size()) return m_fields[idx];
-      
-      return empty;
-   }
-   const std::string& operator [](int idx)const
-   {
-      static ossimString empty="";
-      
-      if ( idx < static_cast<int>( m_fields.size() ) ) return m_fields[idx];
-      
-      return empty;
-   }
-   void setStartChars(const std::string& acceptedStartingCharacters="!$"){m_startChars = acceptedStartingCharacters;}
-   
-   virtual void reset()
-   {
-      m_fields.clear();
-      m_message = "";
-      m_validCheckSum = false;
-   }
-   const std::string& message()const{return m_message;}
-   
-   static ossim_uint32 checksum(std::string::const_iterator start, std::string::const_iterator end);
-   
-protected:
-   virtual void setFields(std::string::const_iterator start, std::string::const_iterator end);
-   
-   bool isValidStartChar(char c)const;
-   
-   std::string m_message;
-   FieldListType m_fields;
-   
-   bool m_validCheckSum;
-   std::string m_startChars;
-};
-
-#endif
-
diff --git a/include/ossim/support_data/ossimQuickbirdMetaData.h b/include/ossim/support_data/ossimQuickbirdMetaData.h
deleted file mode 100644
index f0a781a..0000000
--- a/include/ossim/support_data/ossimQuickbirdMetaData.h
+++ /dev/null
@@ -1,129 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Class declaration for ossimQuickbirdMetaData.
-// 
-// This class parses a Space Imaging Quickbird meta data file.
-//
-//********************************************************************
-// $Id: ossimQuickbirdMetaData.h 14412 2009-04-27 16:58:46Z dburken $
-
-#ifndef ossimQuickbirdMetaData_HEADER
-#define ossimQuickbirdMetaData_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimString.h>
-
-#include <iosfwd>
-
-class ossimFilename;
-class ossimKeywordlist;
-
-class OSSIMDLLEXPORT ossimQuickbirdMetaData : public ossimObject
-{
-public:
-
-   /** @brief default constructor */
-   ossimQuickbirdMetaData();
-
-   /** virtual destructor */
-   virtual ~ossimQuickbirdMetaData();
-
-   /**
-    * @brief Open method that takes the image file, derives the metadata,
-    * header and rpc files, then calls parse methods parseMetaData,
-    * parseHdrData, and parseRpcData.
-    *
-    * @param imageFile Usually in the form of "po_2619900_pan_0000000.tif".
-    *
-    * @return true on success, false on error.
-    */
-   bool open(const ossimFilename& imageFile);
-
-   void clearFields();
-
-   //---
-   // Convenient method to print important image info:
-   //---
-   virtual std::ostream& print(std::ostream& out) const;
-
-   /**
-    * Method to save the state of the object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix = 0) const;
-   
-   /**
-    * Method to the load (recreate) the state of the object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix = 0);
-
-   /**
-    * @brief Method to parse Quickbird metadata file.
-    *
-    * @param metadata File name usually in the form of
-    * ".IMD."
-    *
-    * @return true on success, false on error.
-    */
-   bool parseMetaData(const ossimFilename& metadata);
-
-   /**
-    * @brief Method to parse Quickbird rpc file.
-    *
-    * @param metadata File name usually in the form of
-    * ".GEO.txt"
-    *
-    * @return true on success, false on error.
-    *
-    * @note Currently NOT implemented.
-    */
-   bool parseGEOData(const ossimFilename& data_file);
-
-   bool parseATTData(const ossimFilename& data_file);
-
-   bool parseEPHData(const ossimFilename& data_file);
-
-   /** @return theSatID */
-   ossimString getSatID() const;
-
-   bool getEndOfLine( char * fileBuf,
-                      ossimString lineBeginning,
-                      const char * format,
-                      ossimString & name );
-
-   const ossimIpt& getImageSize() const;
-
-/*****************************************
-*parseATTData EPH GEO IMD RPB TIL
-*
-****************************************/
-   
-private:
-
-   ossimString         theGenerationDate;
-   ossimString         theBandId;
-   int                 theBitsPerPixel;	
-   ossimString         theSatID;
-   ossimString         theTLCDate;
-   ossim_float64       theSunAzimuth;
-   ossim_float64       theSunElevation;
-   ossim_float64       theSatAzimuth;
-   ossim_float64       theSatElevation;
-   int                 theTDILevel;
-   std::vector<double> theAbsCalFactors;
-   ossimString         theBandNameList;
-   ossimIpt            theImageSize;
-
-TYPE_DATA
-};
-
-#endif /* #ifndef ossimQuickbirdMetaData_HEADER */
diff --git a/include/ossim/support_data/ossimRpfAttributes.h b/include/ossim/support_data/ossimRpfAttributes.h
deleted file mode 100644
index 6cb64b0..0000000
--- a/include/ossim/support_data/ossimRpfAttributes.h
+++ /dev/null
@@ -1,370 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimRpfAttributes.h 14241 2009-04-07 19:59:23Z dburken $
-
-#ifndef ossimRpfAttributes_HEADER
-#define ossimRpfAttributes_HEADER
-#include <map>
-
-#include <ossim/base/ossimString.h>
-
-class OSSIM_DLL ossimRpfAttributes
-{
-
-public:
-   friend OSSIM_DLL std::ostream& operator<<(std::ostream& out,
-                                             const ossimRpfAttributes& data);
-   ossimRpfAttributes();
-   ~ossimRpfAttributes();
-
-   void setAttributeFlag(ossim_uint32 id,
-                         bool flag);
-   bool getAttributeFlag(ossim_uint32 id)const;
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out String to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
-    * "nitf.file_name:"
-    * @return output stream.
-    */
-   std::ostream& print(std::ostream& out,
-                       const std::string& prefix=std::string()) const;
-   
-   bool isEmpty()const;
-   void clearFields();
-   
-   /*!
-    * The attribute Id.  The Id and descriptions are taken from
-    * MIL-STD-2411-1 and can have one of the following values:
-    * _________________________________________________________________
-    * 1      Currency Date, 1 parameter:
-    *          1. Date of most recent revision to the RPF
-    *             YYYYMMDD
-    *             8 byte ascii value
-    */
-   ossimString theCurrencyDate;
-
-   /*! 2      Production Date, 1 parameter:
-    *          1. Date the source data was transformed to RPF format
-    *             YYYYMMDD
-    *             8 byte ascii value
-    */
-   ossimString theProductionDate;
-   
-   /*! 3      Significant Date, 1 parameter:
-    *          1. Most accurately describes the date of
-    *             the source data.
-    *             YYYYMMDD
-    *             8 byte ascii value
-    */
-   ossimString theSignificantDate;
-   
-   /*!
-    * 4      Map/Chart source, 4 parameters:
-    *          1. Short title for the id of a group of
-    *             products.  ex: JOG 1501A ...
-    *             10 byte ascii value
-    *          2. The designation of the hardcopy source
-    *             8 byte ascii value
-    *          3. Old horizontal datum code.  Original
-    *             horizontal datum of the hardcopy product
-    *             4 byte ascii value
-    *          4. Edition number of the source graphic
-    *             7 byte ascii value.
-    */
-   ossimString theChartSeriesCode; 
-   ossimString theMapDesignationCode; 
-   ossimString theOldHorDatum;   
-   ossimString theEdition;
-   
-   /*!
-    * 5      Projection Systemd, 5 parameters: p. 38 of MIL-STD-2411-1
-    *          1. Projection Code. 2 byte ascii value
-    *             AC    Albers Equal area
-    *                   Requires Parameters A B C D
-    *             AL    Azimuthal Equal Dist.
-    *                   Requires Parameters A B
-    *             RB    Hotline Oblique Mercator
-    *                   Requires Parameters A B C 
-    *             LE    Lambert Conformal Conic
-    *                   Requires Parameters A B C D
-    *             MC    Mercator
-    *                   Requires Parameters A B
-    *             OC    Oblique Mercator
-    *                   Requires Parameters A B C
-    *             OD    Orthographic
-    *                   Requires Parameters A B
-    *             PG    Polar Stereo-graphic
-    *                   Requires Parameters A B C D
-    *             PH    Poly conic
-    *                   Requires Parameters A B
-    *             TC    Transverse Mercator
-    *                   Requires Parameters A B C
-    *             UT    Universal Transverse Mercator
-    *                   Requires Parameters A
-    *          2. Projection Param A: real 4 byte value
-    *          3. Projeciton Param B: real 4 byte value
-    *          4. Projection Param C: real 4 byte value
-    *          5. Projection Param D: real 4 byte value
-    */
-   ossimString theProjectionCode;
-   float theProjectionA;
-   float theProjectionB;
-   float theProjectionC;
-   float theProjectionD;
-
-   /*!
-    * 6      Vertical Datum (1 parameter) p. 37 MIL-STD-2411-1
-    *         4 byte ascii
-    *
-    *          MSL     Mean Sea Level.  All elevations in th data set
-    *                  are referenced to the geoid of the specified datum
-    *          GEOD    Geodetic (All elevations in the data set
-    *                  are referenced to the ellipsoid of the specified
-    *                  datum
-    */
-   ossimString theVertDatumCode;
-
-   /*!
-    * 7      Horizontal Datum (1 parameter)
-    *        4 byte ascii
-    *
-    *            Look on p.33 of MIL-STD-2411-1.  Too big to list
-    *            we will need a translation table for these
-    *            codes
-    */
-   ossimString theHorDatumCode;
-   
-   /*!
-    * 8      Vertical Absolute Accurracy (2 parameters)
-    *        1. vertical absolute accuracy: 4 byte unsigned int
-    *        2. Accuracy units of measure:  2 byte value 
-    *             0   unknown
-    *             1   meters (Length area Volume)
-    *             2   Kilopounds
-    *             3   Seconds (of time)
-    *             4   Meters/Second (speed)
-    *             5   Cubic Meters per second (Flow)
-    *             6   Volt (Electrical potential)
-    *             7   Watt (Ten to 6 electirical power)
-    *             8   Hertz
-    *             9   +- DD MM SS.S (Angular)
-    *             10  +- HH MM SS.S (Time)
-    *             11  International Nautical Mile (1852 meters)
-    *             12  knot
-    *             13  Nautical mile per day
-    *             14  Feet
-    *             15  Fathom
-    *             16  Micrometers (microns)
-    *             17  Mils
-    *             18  Seconds of Arc
-    *             19  Minutes of Arc
-    *             20  Degrees of arc
-    *             999 Other
-    */
-   ossim_uint32  theVertAbsAccuracy;
-   ossim_uint16 theVertAbsUnits;
-   
-   /*!
-    * 9      Horizontal Absolute Accuracy (2 parameters)
-    *        1. Horizontal absolute accuracy: 4 byte unsigned int
-    *        2. Accuracy units of measure:  2 byte value 
-    *             0   unknown
-    *             1   meters (Length area Volume)
-    *             2   Kilopounds
-    *             3   Seconds (of time)
-    *             4   Meters/Second (speed)
-    *             5   Cubic Meters per second (Flow)
-    *             6   Volt (Electrical potential)
-    *             7   Watt (Ten to 6 electirical power)
-    *             8   Hertz
-    *             9   +- DD MM SS.S (Angular)
-    *             10  +- HH MM SS.S (Time)
-    *             11  International Nautical Mile (1852 meters)
-    *             12  knot
-    *             13  Nautical mile per day
-    *             14  Feet
-    *             15  Fathom
-    *             16  Micrometers (microns)
-    *             17  Mils
-    *             18  Seconds of Arc
-    *             19  Minutes of Arc
-    *             20  Degrees of arc
-    *             999 Other
-    */
-   ossim_uint32  theHorAbsAccuracy;
-   ossim_uint16 theHorAbsUnits;
-   
-   /*!
-    * 10     Vertical Relative Accuracy (2 parameters)
-    *        1. Vertical relative accuracy: 4 byte unsigned int
-    *        2. Accuracy units of measure:  2 byte value 
-    *             0   unknown
-    *             1   meters (Length area Volume)
-    *             2   Kilopounds
-    *             3   Seconds (of time)
-    *             4   Meters/Second (speed)
-    *             5   Cubic Meters per second (Flow)
-    *             6   Volt (Electrical potential)
-    *             7   Watt (Ten to 6 electirical power)
-    *             8   Hertz
-    *             9   +- DD MM SS.S (Angular)
-    *             10  +- HH MM SS.S (Time)
-    *             11  International Nautical Mile (1852 meters)
-    *             12  knot
-    *             13  Nautical mile per day
-    *             14  Feet
-    *             15  Fathom
-    *             16  Micrometers (microns)
-    *             17  Mils
-    *             18  Seconds of Arc
-    *             19  Minutes of Arc
-    *             20  Degrees of arc
-    *             999 Other
-    */
-   ossim_uint32  theVertRelAccuracy;
-   ossim_uint16 theVertRelUnits;
-   
-   /*!
-    * 11     Horizontal Relative Accuracy (2 parameters)
-    *        1. Horizontal relative accuracy: 4 byte unsigned int
-    *        2. Accuracy units of measure:  2 byte value 
-    *             0   unknown
-    *             1   meters (Length area Volume)
-    *             2   Kilopounds
-    *             3   Seconds (of time)
-    *             4   Meters/Second (speed)
-    *             5   Cubic Meters per second (Flow)
-    *             6   Volt (Electrical potential)
-    *             7   Watt (Ten to 6 electirical power)
-    *             8   Hertz
-    *             9   +- DD MM SS.S (Angular)
-    *             10  +- HH MM SS.S (Time)
-    *             11  International Nautical Mile (1852 meters)
-    *             12  knot
-    *             13  Nautical mile per day
-    *             14  Feet
-    *             15  Fathom
-    *             16  Micrometers (microns)
-    *             17  Mils
-    *             18  Seconds of Arc
-    *             19  Minutes of Arc
-    *             20  Degrees of arc
-    *             999 Other
-    */
-   ossim_uint32  theHorRelAccuracy;
-   ossim_uint16 theHorRelUnits; 
-
-   /*!
-    * 12     Ellipsoid, 1 parameter:
-    *        1. Ellipsoid code.  3 byte ascii
-    *           See p. 40 of MIL-STD-2411-1
-    */
-   ossimString ellipsoidCode;
-
-   /*!
-    * 13     Sounding Datumm, 1 parameter: 4 byte ascii
-    *        See p. 33 MIL-STD-2411-1 5.3.2.2
-    */
-   ossimString theSoundingDatumCode;
-   
-   /*!
-    * 14     Navigation System, 1 parameter: 
-    *        1. Navigation code. 2 byte unsigned int
-    *           See MIL-STD-2411-1 5.3.2.4
-    */
-   ossim_uint16 theNavSystemCode; 
-
-   /*!
-    * 15     Grid, 1 parameter:
-    *        1. Grid code. 2 byte ascii
-    *           See MIL-STD-2411-1 5.3.2.7
-    */
-   ossimString theGridCode;
-
-   /*!
-    * 16     Easterly Annual Magnetic Change, 2 parameters:
-    *        1. Easterly annual magnetic change. 4 byte real
-    *        2. Units of the change.  See 5.3.2.6 of MIL-STD-2411-1
-    */
-   float          theEeasterlyMagChange; 
-   ossim_uint16 theEasterlyMagChangeUnits;
-
-   /*!
-    * 17     Westerly Annual Magnetic Change, 2 parameters:
-    *        1. Westerly annual magnetic change. 4 byte real
-    *        2. Units of the change.  See 5.3.2.6 of MIL-STD-2411-1
-    */
-   float          theWesterlyMagChange;
-   ossim_uint16 theWesterlyMagChangeUnits;
-
-   /*!
-    * 18     Grid North Magnetic North ANgle, 2 paramters:
-    *        1. Grid North - Magnetic North.  4 byte real
-    *        2. Units of angle. 2 byte unsigned int
-    *           see 5.3.2.6
-    */
-   float          theMagAngle; 
-   ossim_uint16 theMagAngleUnits;
-
-   /*!
-    * 19     Grid convergence angle, 2 parameters:
-    *        1. Grid convergence angle.  4 byte Real
-    *        2. Units of angle. 2 byte unsigned int 5.3.2.6
-    */
-   float          theGridConver; 
-   ossim_uint16 theGridConverUnits;
-
-   /*!
-    * 20     Highest known elevation (4 parameters)
-    *        1. Highest known elevation: 8 byte real
-    *        2. Units of elevation: See 5.3.2.6 of MIL-STD-2411-1
-    *        3. Lat of elevation: 8 byte real in decimal degrees
-    *        4. Lon of elevation: 8 byte real in decimal degrees
-    */
-   double         theHighElevation;
-   ossim_uint16   theHighElevationUnits;
-   double         theHighLat;
-   double         theHighLon;
-
-   /*! 21     Multiple legend, 1 paraemter:
-    *        1. Name of legend file that applies to this
-    *           12 byte ascii
-    */
-   ossimString theLegendFileName;
-   
-   /*!
-    * 22     Image source, 2 parameters:
-    *        1. Source of data from which this
-    *           RPF was derived. ex: SPOT. Landsat7, Landsat4.
-    *           for CDTED: "imagery, "carto"
-    *           12 byte ascii
-    *
-    *        2. GSD.  Ground sample or post distance.
-    *           4 byte unsigned int
-    */
-    ossimString theDataSource; // [12];
-    ossim_uint32 theGsd; // uint
-
-   /*!
-    * 23     Data Level, 1 parameter:
-    *        1. The level of the source.  For example:
-    *           if this is a DTED or CDTED it would
-    *           distinguish between level 1 and 2
-    */
-   ossim_uint16 theDataLevel; // ushort
-
-protected:
-   std::map<ossim_uint32, bool> theAttributeIdBoolMap;
-   
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimRpfCoverageSection.h b/include/ossim/support_data/ossimRpfCoverageSection.h
deleted file mode 100644
index d0cd294..0000000
--- a/include/ossim/support_data/ossimRpfCoverageSection.h
+++ /dev/null
@@ -1,162 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-// 
-// Description: Rpf support class
-// 
-//********************************************************************
-// $Id: ossimRpfCoverageSection.h 16997 2010-04-12 18:53:48Z dburken $
-#ifndef ossimRpfCoverageSection_HEADER
-#define ossimRpfCoverageSection_HEADER
-
-#include <iosfwd>
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/support_data/ossimRpfConstants.h>
-#include <ossim/base/ossimErrorCodes.h>
-
-class ossimRpfCoverageSection
-{
-public:
-   friend std::ostream& operator <<(std::ostream &out,
-                                    const ossimRpfCoverageSection &data);
-   
-   ossimRpfCoverageSection();
-   ossimRpfCoverageSection(const ossimRpfCoverageSection& obj);
-   const ossimRpfCoverageSection& operator=(const ossimRpfCoverageSection& rhs);
-   
-   ~ossimRpfCoverageSection(){}
-
-   ossimErrorCode parseStream(std::istream &in, ossimByteOrder byteOrder);
-
-   /**
-    * @brief Write method.
-    *
-    * @param out Stream to write to.
-    */
-   void writeStream(std::ostream& out);
-
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out String to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
-    * "nitf.file_name:"
-    * @return output stream.
-    */
-   std::ostream& print(std::ostream& out,
-                       const std::string& prefix=std::string()) const;
-   
-   void clearFields();
-
-   bool isGeographicRectNull()const
-   {
-      return ((theUpperLeftLat  == OSSIM_RPF_ULONG_NULL) &&
-              (theUpperLeftLon  == OSSIM_RPF_ULONG_NULL) &&
-              (theLowerLeftLat  == OSSIM_RPF_ULONG_NULL) &&
-              (theLowerLeftLon  == OSSIM_RPF_ULONG_NULL) &&
-              (theLowerRightLat == OSSIM_RPF_ULONG_NULL) &&
-              (theLowerRightLon == OSSIM_RPF_ULONG_NULL) &&
-              (theUpperRightLat == OSSIM_RPF_ULONG_NULL) &&
-              (theUpperRightLon == OSSIM_RPF_ULONG_NULL));
-   }
-   bool isIntervalNull()const
-   {
-      return ((theVerticalInterval   == OSSIM_RPF_ULONG_NULL)&&
-              (theHorizontalInterval == OSSIM_RPF_ULONG_NULL));
-   }
-
-   ossim_float64 getUlLat()const{return theUpperLeftLat;}
-   ossim_float64 getUlLon()const{return theUpperLeftLon;}
-   ossim_float64 getLlLat()const{return theLowerLeftLat;}
-   ossim_float64 getLlLon()const{return theLowerLeftLon;}
-   ossim_float64 getLrLat()const{return theLowerRightLat;}
-   ossim_float64 getLrLon()const{return theLowerRightLon;}
-   ossim_float64 getUrLat()const{return theUpperRightLat;}
-   ossim_float64 getUrLon()const{return theUpperRightLon;}
-
-   ossim_float64 getVerticalResolution()const{return theVerticalResolution;}
-   ossim_float64 getHorizontalResolution()const{return theHorizontalResolution;}
-
-   /*!
-    * This indicates the lat increment per pixel in degrees.
-    */
-   ossim_float64 getVerticalInterval()const{return theVerticalInterval;}
-
-   /*!
-    * This indicates the lon increment per pixel in degrees.
-    */
-   ossim_float64 getHorizontalInterval()const{return theHorizontalInterval;}
-
-   /** @brief Sets theUpperLeftLat to value. */
-   void setUlLat(ossim_float64 value);
-
-   /** @brief Sets theUpperLeftLon to value. */
-   void setUlLon(ossim_float64 value);
-
-   /** @brief Sets theLowerLeftLat to value. */
-   void setLlLat(ossim_float64 value);
-
-   /** @brief Sets theLowerLeftLon to value. */
-   void setLlLon(ossim_float64 value);
-   
-   /** @brief Sets theLowerRightLat to value. */
-   void setLrLat(ossim_float64 value);
-   
-   /** @brief Sets theLowerRightLon to value. */
-   void setLrLon(ossim_float64 value);
-
-   /** @brief Sets theUpperRightLat to value. */
-   void setUrLat(ossim_float64 value);
-
-   /** @brief Sets theUpperRightLon to value. */
-   void setUrLon(ossim_float64 value);
-
-   /** @brief Sets theVerticalResolution to value. */
-   void setVerticalResolution(ossim_float64 value);
-
-   /** @brief Sets theHorizontalResolution to value. */
-   void setHorizontalResolution(ossim_float64 value);
-   
-   /** @brief Sets theVerticalInterval to value. */
-   void setVerticalInterval(ossim_float64 value);
-   
-   /** @brief Sets theHorizontalInterval to value. */
-   void setHorizontalInterval(ossim_float64 value);
-   
-private:   
-   /*!
-    * 8 byte ossim_float64 and is the upper left lat or
-    * North West portion of the image.
-    */
-   ossim_float64 theUpperLeftLat;
-
-   /*!
-    * 8 byte ossim_float64 and is the upper left lon
-    * (North west)
-    */
-   ossim_float64 theUpperLeftLon;
-
-   ossim_float64 theLowerLeftLat;
-   ossim_float64 theLowerLeftLon;
-
-   ossim_float64 theUpperRightLat;
-   ossim_float64 theUpperRightLon;
-
-   ossim_float64 theLowerRightLat;
-   ossim_float64 theLowerRightLon;
-
-   ossim_float64 theVerticalResolution;
-   ossim_float64 theHorizontalResolution;
-
-   ossim_float64 theVerticalInterval;
-   ossim_float64 theHorizontalInterval;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimRpfFrame.h b/include/ossim/support_data/ossimRpfFrame.h
deleted file mode 100644
index 0629955..0000000
--- a/include/ossim/support_data/ossimRpfFrame.h
+++ /dev/null
@@ -1,207 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-// 
-// Description: This class give the capability to access tiles from an
-//              rpf file.
-//
-//********************************************************************
-// $Id: ossimRpfFrame.h 20324 2011-12-06 22:25:23Z dburken $
-
-#ifndef ossimRpfFrame_HEADER
-#define ossimRpfFrame_HEADER 1
-
-#include <ossim/base/ossimReferenced.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimErrorCodes.h>
-#include <ossim/support_data/ossimNitfFile.h>
-#include <ossim/support_data/ossimRpfColorGrayscaleTable.h>
-#include <ossim/support_data/ossimRpfReplaceUpdateTable.h>
-#include <iosfwd>
-#include <vector>
-
-class ossimRpfHeader;
-class ossimRpfAttributes;
-class ossimRpfCoverageSection;
-class ossimRpfImageDescriptionSubheader;
-class ossimRpfImageDisplayParameterSubheader;
-class ossimRpfMaskSubheader;
-class ossimRpfCompressionSection;
-class ossimRpfColorGrayscaleSubheader;
-class ossimRpfColorConverterSubsection;
-
-class OSSIM_DLL ossimRpfFrame : public ossimReferenced
-{
-public:
-   friend std::ostream& operator <<(std::ostream& out,
-                                    const ossimRpfFrame& data);
-   ossimRpfFrame();
-   ~ossimRpfFrame();
-   
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out String to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
-    * "nitf.file_name:"
-    * @return output stream.
-    */
-   std::ostream& print(std::ostream& out,
-                       const std::string& prefix=std::string()) const;  
-
-   ossimErrorCode parseFile(const ossimFilename& filename,
-                            bool minimalParse = false);
-   
-   const ossimRpfHeader* getRpfHeader()const{return theHeader;}
-
-   bool hasSubframeMaskTable()const;
-
-   const vector< vector<ossim_uint32> >& getSubFrameMask(
-      ossim_uint32 spectralGroup)
-   {
-      return theSubframeMaskTable[spectralGroup];
-   }
-   
-   bool fillSubFrameBuffer(ossim_uint8* buffer,
-                           ossim_uint32 spectralGroup,
-                           ossim_uint32 row,
-                           ossim_uint32 col)const;
-   
-   const ossimRpfCompressionSection* getCompressionSection()const
-   {
-      return theCompressionSection;
-   }
-   const vector<ossimRpfColorGrayscaleTable>& getColorGrayscaleTable()const
-   {
-      return theColorGrayscaleTable;
-   }
-   const ossimRpfColorConverterSubsection* getColorConverterSubsection()const
-   {
-      return theColorConverterSubsection;
-   }
-   const ossimRpfAttributes* getAttributes()const
-   {
-      return theAttributes;
-   }
-   const ossimNitfFile* getNitfFile()const
-   {
-      return theNitfFile.get();
-   }
-
-   /**
-    * @return The RPF replace / update table.  The ossimRefPtr can have a null
-    * internal pointer if record was not found. Callers should check
-    * ossimRefPtr<ossimRpfReplaceUpdateTable>::valid() before using pointer.
-    */
-   ossimRefPtr<ossimRpfReplaceUpdateTable> getRpfReplaceUpdateTable() const;
-
-private:
-   void clearFields();
-   void deleteAll();
-   ossimErrorCode populateCoverageSection(std::istream& in);
-   ossimErrorCode populateCompressionSection(std::istream& in);
-   ossimErrorCode populateImageSection(std::istream& in);
-   ossimErrorCode populateAttributeSection(std::istream& in);
-   ossimErrorCode populateColorGrayscaleSection(std::istream& in);
-   ossimErrorCode populateMasks(std::istream& in);
-   ossimErrorCode populateReplaceUpdateTable(std::istream& in);
-
-   /*!
-    * The header will be instantiated during the opening of the
-    * frame file.
-    */
-   ossimRpfHeader *theHeader;
-
-   /*!
-    * The filename is set if its a successful open.
-    */
-   ossimFilename   theFilename;
-
-   /*!
-    * This will hold the coverage.
-    */
-   ossimRpfCoverageSection* theCoverage;
-
-   /*!
-    * This will hold the attributes of this frame.
-    */
-   ossimRpfAttributes *theAttributes;
-
-   /*!
-    * This is the subheader for the image.  It will have
-    * some general information about the image.
-    */
-   ossimRpfImageDescriptionSubheader* theImageDescriptionSubheader;
-
-   /*!
-    * This is the mask subheader.
-    */
-   ossimRpfMaskSubheader* theMaskSubheader;
-   
-   /*!
-    * This is the subheader for the display parameters
-    * for this frame.
-    */
-   ossimRpfImageDisplayParameterSubheader* theImageDisplayParameterSubheader;
-
-   /*!
-    * Will hold a pointer to the compression information section.
-    */
-   ossimRpfCompressionSection*             theCompressionSection;
-   
-   /*!
-    * If present, it will hold the color grayscale subheader.
-    */
-   ossimRpfColorGrayscaleSubheader*        theColorGrayscaleSubheader;
-
-   /*!
-    * 
-    */
-   ossimRpfColorConverterSubsection*       theColorConverterSubsection;
-
-   /*!
-    * 
-    */
-   vector<ossimRpfColorGrayscaleTable>     theColorGrayscaleTable;
-
-   /*!
-    * 
-    */
-   ossimRefPtr<ossimNitfFile>              theNitfFile;
-
-   /*!
-    * We have a 3-D array.  For the most part the numberof spectral groups
-    * should be one.  The indexes are as follows:
-    *
-    * theSubframeMasKTable[spectralGroup][row][col]
-    *
-    *  It will hold RPF_NULL(0xffffffff) if the subframe does not exist
-    *  and it will hold an offset value from the start of the
-    * [spatial data section] to the first byte of the subframe table.
-    */
-   vector< vector< vector< ossim_uint32> > > theSubframeMaskTable;
-
-   /*!
-    * We have a 3-D array.  For the most part the numberof spectral groups
-    * should be one.  The indexes are as follows:
-    *
-    * theSubframeTransparencyMaskTable[spectralGroup][row][col]
-    *
-    *  It will hold RPF_NULL(0xffffffff) if the subframe does not exist
-    *  and it will hold an offset value from the start of the
-    * [spatial data section] to the first byte of the subframe table.
-    */
-   vector< vector< vector< ossim_uint32> > > theSubframeTransparencyMaskTable;
-
-   /** Holds table of "replace / update" records if present. */
-   ossimRefPtr<ossimRpfReplaceUpdateTable> theReplaceUpdateTable;
-
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimRpfFrameEntry.h b/include/ossim/support_data/ossimRpfFrameEntry.h
deleted file mode 100644
index e0bce54..0000000
--- a/include/ossim/support_data/ossimRpfFrameEntry.h
+++ /dev/null
@@ -1,61 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-//
-// Description: Rpf support class
-// 
-//********************************************************************
-// $Id: ossimRpfFrameEntry.h 18052 2010-09-06 14:33:08Z dburken $
-#ifndef ossimRpfFrameEntry_HEADER
-#define ossimRpfFrameEntry_HEADER
-
-#include <iosfwd>
-#include <ossim/base/ossimFilename.h>
-
-class ossimRpfFrameEntry
-{
-public:
-   friend std::ostream& operator<<(std::ostream& out,
-                                   const ossimRpfFrameEntry& data);
-   ossimRpfFrameEntry(const ossimFilename& rootDirectory=ossimFilename(""),
-                      const ossimFilename& pathToFrameFileFromRoot=ossimFilename(""));
-
-   /** @brief copy constructor */
-   ossimRpfFrameEntry(const ossimRpfFrameEntry& obj);
-
-   /** @brief operator= */
-   const ossimRpfFrameEntry& operator=(const ossimRpfFrameEntry& rhs);
-   
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out String to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
-    * "nitf.file_name:"
-    * @return output stream.
-    */
-   std::ostream& print(std::ostream& out,
-                       const std::string& prefix=std::string()) const;  
-
-   bool exists() const;
-   
-   void setEntry(const ossimFilename& rootDirectory,
-                 const ossimFilename& pathToFrameFileFromRoot);
-   
-   const ossimFilename& getFullPath() const;
-   const ossimString&   getRootDirectory() const;
-   const ossimString    getPathToFrameFileFromRoot() const;
-   
-private:
-   bool          m_exists;
-   ossimFilename m_rootDirectory;
-   ossimFilename m_pathToFrameFileFromRoot;
-   ossimFilename m_fullValidPath;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimRpfHeader.h b/include/ossim/support_data/ossimRpfHeader.h
deleted file mode 100644
index 502fccd..0000000
--- a/include/ossim/support_data/ossimRpfHeader.h
+++ /dev/null
@@ -1,181 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-//
-// Description: Rpf support class
-// 
-//********************************************************************
-// $Id: ossimRpfHeader.h 22013 2012-12-19 17:37:20Z dburken $
-#ifndef ossimRpfHeader_HEADER
-#define ossimRpfHeader_HEADER 1
-
-#include <iosfwd>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-#include <ossim/support_data/ossimRpfConstants.h>
-
-class ossimRpfLocationSection;
-class ossimRpfCoverageSection;
-class ossimRpfBoundaryRectTable;
-class ossimRpfBoundaryRectSectionSubheader;
-class ossimRpfFrameFileIndexSectionSubheader;
-class ossimRpfFrameFileIndexSubsection;
-class ossimRpfColorTableIndexSectionSubheader;
-class ossimRpfImageDescriptionSubheader;
-class ossimRpfMaskSubsection;
-class ossimRpfAttributeSectionSubheader;
-class ossimRpfImageDisplayParameterSubheader;
-class ossimRpfCompressionSection;
-class ossimRpfCompressionSectionSubheader;
-class ossimRpfColorGrayscaleSubheader;
-
-class ossimRpfHeader : public ossimNitfRegisteredTag
-{
-public:
-
-   /** default constructor */
-   ossimRpfHeader();
-
-   /** copy constructor */
-   ossimRpfHeader(const ossimRpfHeader& obj);
-
-   /** assignment operator */
-   const ossimRpfHeader& operator=(const ossimRpfHeader& rhs);
-
-   virtual ~ossimRpfHeader();
-
-   /**
-    * @brief Parse method.
-    *
-    * @param in Stream to parse.
-    */
-   virtual void parseStream(std::istream& in);
-
-   /**
-    * @brief Write method.
-    *
-    * @param out Stream to write to.
-    */
-   virtual void writeStream(std::ostream& out);
-   
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out String to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
-    * "nitf.file_name:"
-    * @return output stream.
-    */
-   std::ostream& print(std::ostream& out,
-                       const std::string& prefix=std::string()) const;
-
-   virtual ossimByteOrder getByteOrder()const;
-   
-   const ossimRpfLocationSection* getLocationSection() const;
-
-   ossimRpfLocationSection* getLocationSection();
-
-   bool hasComponent(ossimRpfComponentId componentId)const;
-   ossimString getSecurityClassification()const;
-   
-   /*!
-    * This will return a new coverage section.  It will return NULL if
-    * one does not exist.
-    */
-   ossimRpfCoverageSection*
-      getNewCoverageSection(const ossimFilename& file)const;
-   ossimRpfCoverageSection*
-      getNewCoverageSection(std::istream& in)const;
-
-   ossimRpfColorGrayscaleSubheader*
-      getNewColorGrayscaleSubheader(std::istream& in)const;
-   ossimRpfCompressionSection*
-      getNewCompressionSection(std::istream& in)const;
-   ossimRpfCompressionSectionSubheader*
-      getNewCompressionSectionSubheader(std::istream& in)const;
-   ossimRpfImageDisplayParameterSubheader*
-      getNewImageDisplayParameterSubheader(std::istream& in)const;
-   ossimRpfAttributeSectionSubheader*
-      getNewAttributeSectionSubheader(std::istream& in)const;
-   ossimRpfImageDescriptionSubheader*
-      getNewImageDescriptionSubheader(std::istream& in)const;
-   ossimRpfMaskSubsection*
-      getNewMaskSubsection(std::istream& in)const;
-   ossimRpfBoundaryRectSectionSubheader*
-      getNewBoundaryRectSectSubheader(std::istream& in)const;
-   ossimRpfBoundaryRectTable*
-      getNewBoundaryRectTable(std::istream& in)const;
-   ossimRpfFrameFileIndexSectionSubheader*
-      getNewFrameFileIndexSectionSubheader(std::istream& in)const;
-   ossimRpfFrameFileIndexSubsection*
-      getNewFileIndexSubsection(std::istream& in)const;
-   ossimRpfColorTableIndexSectionSubheader*
-      getNewColorTableIndexSectionSubheader(std::istream& in)const;
-
-   ossimRpfCompressionSection*
-      getNewCompressionSection(const ossimFilename& file)const;
-   ossimRpfBoundaryRectSectionSubheader*
-      getNewBoundaryRectSectSubheader(const ossimFilename& file)const;
-   ossimRpfBoundaryRectTable*
-      getNewBoundaryRectTable(const ossimFilename& file)const;
-   ossimRpfFrameFileIndexSectionSubheader*
-      getNewFrameFileIndexSectionSubheader(const ossimFilename& file)const;
-   ossimRpfFrameFileIndexSubsection*
-      getNewFileIndexSubsection(const ossimFilename& file)const;
-   ossimRpfColorTableIndexSectionSubheader*
-      getNewColorTableIndexSectionSubheader(const ossimFilename& file)const;
-
-   ossimString getDate()const;
-
-   /** @brief returns the byte position of the location section. */
-   ossim_uint32 getLocationSectionLocation() const;
-   
-   void setFilename(const ossimString& file);
-   void setNewRepUpIndicator(const ossimString& s);
-   void setGovSpecNumber(const ossimString& s);
-   void setGovSpecDate(const ossimString& s);
-   void setSecurityClassification(const ossimString& s);
-   void setCountryCode(const ossimString& s);
-   void setSecurityReleaseMarking(const ossimString& s);
-   void setLocationSectionPos(std::streamoff off);
-
-   /*!
-    * Method to the load (recreate) the state of the object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
-
-private:
-
-   /** 0x00 = big, 0xff = little */
-   ossim_uint8  m_littleBigEndianIndicator; // 1 byte bool
-   ossim_uint16 m_headerSectionLength;      // 2 bytes uint
-   char         m_fileName[13];             // 12 byte ascii
-   ossim_uint8  m_newRepUpIndicator;        // 1 byte unsigned int
-   char         m_govSpecNumber[16];        // 15 byte ascii
-   char         m_govSpecDate[9];           // 8 byte ascii
-   /**
-    * 1 byte field that can have the values
-    *
-    * U   Unclassified
-    * R   Restricted
-    * C   Confidential
-    * S   Secret
-    * T   Top Secret
-    */ 
-   char         m_securityClassification[2]; // 1 byte ascii
-   char         m_countryCode[3];            // 2 byte ascii
-   char         m_securityReleaseMarking[3]; // 2 byte ascii
-   ossim_uint32 m_locSectionLoc;             // 4 byte unsigned int
-   
-   ossimRpfLocationSection* m_locationSection;
-};
-
-#endif
- 
diff --git a/include/ossim/support_data/ossimRpfImageDescriptionSubheader.h b/include/ossim/support_data/ossimRpfImageDescriptionSubheader.h
deleted file mode 100644
index 1ed8554..0000000
--- a/include/ossim/support_data/ossimRpfImageDescriptionSubheader.h
+++ /dev/null
@@ -1,127 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-// 
-// Description: Rpf support class
-// 
-//********************************************************************
-// $Id: ossimRpfImageDescriptionSubheader.h 14241 2009-04-07 19:59:23Z dburken $
-#ifndef ossimRpfImageDescriptionSubheader_HEADER
-#define ossimRpfImageDescriptionSubheader_HEADER
-
-#include <iosfwd>
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/support_data/ossimRpfConstants.h>
-#include <ossim/base/ossimErrorContext.h>
-
-class ossimRpfImageDescriptionSubheader
-{
-public:
-   friend std::ostream& operator <<(
-      std::ostream& out, const ossimRpfImageDescriptionSubheader& data);
-
-   ossimRpfImageDescriptionSubheader();
-   ~ossimRpfImageDescriptionSubheader(){}
-
-   ossimErrorCode parseStream(std::istream& in, ossimByteOrder byteOrder);
-   
-   ossim_uint32 getStartOffset()const{return theStartOffset;}
-   ossim_uint32 getEndOffset()const{return theEndOffset;}
-
-   bool isSubframeMaskTableOffsetNull()const
-   {
-      return (theSubframeMaskTableOffset == OSSIM_RPF_ULONG_NULL);
-   }
-   bool isTransparencyMaskTableOffsetNull()const
-   {
-      return (theTransparencyMaskTableOffset == OSSIM_RPF_ULONG_NULL);
-   }
-   ossim_uint16 getNumberOfSpectralGroups()const
-   {
-      return theNumberOfSpectralGroups;
-   }
-   ossim_uint16 getNumberOfSubframeTables()const
-   {
-      return theNumberOfSubframeTables;
-   }
-   ossim_uint16 getNumberOfSpectralBandTables()const
-   {
-      return theNumberOfSpectralBandTables;
-   }
-   ossim_uint16 getNumberOfSpectralBandLinesPerImageRow()const
-   {
-      return theNumberOfSpectralBandLinesPerImageRow;
-   }
-   ossim_uint16 getNumberOfSubframesHorizontal()const
-   {
-      return theNumberOfSubframesHorizontal;
-   }
-   ossim_uint16 getNumberOfSubframesVertical()const
-   {
-      return theNumberOfSubframesVertical;
-   }
-   ossim_uint32  getNumberOfOutputColumnsPerSubframe()const
-   {
-      return theNumberOfOutputColumnsPerSubframe;
-   }
-   ossim_uint32  getNumberOfOutputRowsPerSubframe()const
-   {
-      return theNumberOfOutputRowsPerSubframe;
-   }
-   ossim_uint32  getSubframeMaskTableOffset()const
-   {
-      return theSubframeMaskTableOffset;
-   }
-   ossim_uint32  getTransparencyMaskTableOffset()const
-   {
-      return theTransparencyMaskTableOffset;
-   }
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out String to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
-    * "nitf.file_name:"
-    * @return output stream.
-    */
-   std::ostream& print(std::ostream& out,
-                       const std::string& prefix=std::string()) const;
-   
-private:
-   void clearFields();
-   // work variables to store useful information.
-   ossim_uint32 theStartOffset;
-   ossim_uint32 theEndOffset;
-
-   ossim_uint16 theNumberOfSpectralGroups;
-   ossim_uint16 theNumberOfSubframeTables;
-   ossim_uint16 theNumberOfSpectralBandTables;
-   ossim_uint16 theNumberOfSpectralBandLinesPerImageRow;
-
-   /*!
-    * Each frame file could be divided into sub frames.
-    * This identifies the number of subframes in the
-    * horizontal direction.
-    */
-   ossim_uint16 theNumberOfSubframesHorizontal;
-
-   /*!
-    * Each frame file could be divided into sub frames.
-    * This identifies the number of subframes in the
-    * vertical direction.
-    */
-   ossim_uint16 theNumberOfSubframesVertical;
-   ossim_uint32 theNumberOfOutputColumnsPerSubframe;
-   ossim_uint32 theNumberOfOutputRowsPerSubframe;
-   ossim_uint32 theSubframeMaskTableOffset;
-   ossim_uint32 theTransparencyMaskTableOffset;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimRpfInfo.h b/include/ossim/support_data/ossimRpfInfo.h
deleted file mode 100644
index 290924d..0000000
--- a/include/ossim/support_data/ossimRpfInfo.h
+++ /dev/null
@@ -1,62 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Mingjie Su
-//
-// Description: Rpf Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimRpfInfo.h 1236 2010-08-05 19:45:44Z ming.su $
-#ifndef ossimRpfInfo_HEADER
-#define ossimRpfInfo_HEADER
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/support_data/ossimInfoBase.h>
-#include <ossim/base/ossimFilename.h>
-
-class ossimKeywordlist;
-/**
- * @brief HDF info class.
- *
- * Encapsulates the HDF functionality.
- */
-class ossimRpfInfo : public ossimInfoBase
-{
-public:
-
-   /** default constructor */
-   ossimRpfInfo();
-
-   /** virtual destructor */
-   virtual ~ossimRpfInfo();
-
-   /**
-    * @brief open method.
-    *
-    * @param file File name to open.
-    * @return true on success false on error.
-    */
-   virtual bool open(const ossimFilename& file);
-
-   /**
-    * Print method.
-    *
-    * @param out Stream to print to.
-    * 
-    * @return std::ostream&
-    */
-   virtual std::ostream& print(std::ostream& out) const;
-
-   bool isOpen();
-
-   private: 
-   
-     ossimFilename                       theFile;
-     ossimFilename                       m_infoFile;
-};
-
-#endif /* End of "#ifndef ossimRpfInfo_HEADER" */
diff --git a/include/ossim/support_data/ossimRpfLocationSection.h b/include/ossim/support_data/ossimRpfLocationSection.h
deleted file mode 100644
index a1eeaaf..0000000
--- a/include/ossim/support_data/ossimRpfLocationSection.h
+++ /dev/null
@@ -1,167 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-// 
-// Description: Rpf support class
-// 
-//********************************************************************
-// $Id: ossimRpfLocationSection.h 16997 2010-04-12 18:53:48Z dburken $
-#ifndef ossimRpfLocationSection_HEADER
-#define ossimRpfLocationSection_HEADER
-
-#include <iosfwd>
-#include <vector>
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/support_data/ossimRpfConstants.h>
-#include <ossim/base/ossimErrorCodes.h>
-
-//  10 byte record
-class ossimRpfComponentLocationRecord
-{
-public:
-   friend std::ostream& operator<<(
-      std::ostream& out, const ossimRpfComponentLocationRecord& data);
-
-   /** default constructor */
-   ossimRpfComponentLocationRecord();
-
-   /** copy constructor */
-   ossimRpfComponentLocationRecord(const ossimRpfComponentLocationRecord& record);
-
-   /** assignment operator */
-   const ossimRpfComponentLocationRecord& operator=(const ossimRpfComponentLocationRecord& rhs);
-   
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out String to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
-    * "nitf.file_name:"
-    * @return output stream.
-    */
-   std::ostream& print(std::ostream& out,
-                       const std::string& prefix=std::string()) const;
-
-   ossimErrorCode parseStream(std::istream& in, ossimByteOrder endianOrder);
-
-   /**
-    * @brief Write method.
-    *
-    * @param out Stream to write to.
-    */
-   void writeStream(std::ostream& out);
-
-   /*!
-    * The component is a 2-Byte unsigned value which
-    * identitfies a level-2 component.  The table can be
-    * found in MIL-STD-2411-1 in section 5.1.1 and in ossimRpfConstants.h.
-    */
-   ossim_uint16 m_componentId;
-
-   /*!
-    * Is a 4 byte unsigned integer indicating the length in
-    * bytes of the component.
-    */
-   ossim_uint32  m_componentLength;
-
-   /*!
-    * Is a 4 byte value defining the absolute address (byte number)
-    * of the first byte of the component measured
-    * from the beginning of the RPF Frame file.
-    */ 
-   ossim_uint32  m_componentLocation;
-};
-
-class ossimRpfLocationSection
-{
-public:
-   friend std::ostream& operator <<(std::ostream& out,
-                                    const ossimRpfLocationSection &data);
-   ossimRpfLocationSection();
-   virtual ~ossimRpfLocationSection(){}
-
-   virtual ossimErrorCode parseStream(std::istream& in,
-                                      ossimByteOrder endianOrder);
-
-   /**
-    * @brief Write method.
-    *
-    * @param out Stream to write to.
-    */
-   void writeStream(std::ostream& out);
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out String to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
-    * "nitf.file_name:"
-    * @return output stream.
-    */
-   std::ostream& print(std::ostream& out,
-                       const std::string& prefix=std::string()) const;
-
-   /*!
-    * Will let you know if a component exists within the location section.
-    * these component Ids' are defined in the MIL-STD-2411-1 standards doc.
-    * the ossimRpfComponentId is in ossimRpfConstants.h
-    */
-   bool hasComponent(ossimRpfComponentId componentId)const;
-
-   bool getComponent(ossimRpfComponentId componentId,
-                     ossimRpfComponentLocationRecord& result)const;
-
-   /**
-    * @brief Method to add a component location record.
-    *
-    * This will push the record onto the back of theComponentLocationList array.
-    *
-    * @param record Record to add to array.
-    */
-   void addComponentRecord(const ossimRpfComponentLocationRecord& record);
-
-   void setLocationSectionLength(ossim_uint16 length);
-   void setLocationTableOffset(ossim_uint32 offset);
-   void setNumberOfComponentLocationRecords(ossim_uint16 count);
-   void setLocationRecordLength(ossim_uint16 length);
-   void setComponentAggregateLength(ossim_uint32 length);
-
-   /** @brief Clears records and fields. Public interface to clearFields. */
-   void clearFields();
-
-   /** Brief Direct access to the list of records. */
-   std::vector<ossimRpfComponentLocationRecord>& getLocationRecordList();
-   
-private:
-
-   /*!
-    * This is a 2 byte unsigned short >= 34 indicatin
-    * the length in bytes of the entire location section
-    */
-   ossim_uint16 m_locationSectionLength;
-
-   ossim_uint32 m_locationTableOffset;
-
-   ossim_uint16 m_numberOfComponentLocationRecords;
-
-   ossim_uint16 m_locationRecordLength;
-
-   ossim_uint32 m_componentAggregateLength;
-
-   /*!
-    * Since there are not very many components within an Rpf file
-    * it would be overkill to sort these components into an stl
-    * map.  We will just use an array (stl vector) and do linear searches
-    * for components when we need to.
-    */
-   std::vector<ossimRpfComponentLocationRecord> m_componentLocationList;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimRpfToc.h b/include/ossim/support_data/ossimRpfToc.h
deleted file mode 100644
index 0a205ef..0000000
--- a/include/ossim/support_data/ossimRpfToc.h
+++ /dev/null
@@ -1,229 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimRpfToc.h 18044 2010-09-06 14:20:52Z dburken $
-#ifndef osimRpfToc_HEADER
-#define osimRpfToc_HEADER
-
-#include <vector>
-#include <iosfwd>
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimErrorCodes.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimReferenced.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/support_data/ossimNitfFileHeader.h>
-#include <ossim/support_data/ossimRpfHeader.h>
-
-class ossimRpfFrameFileIndexSubsection;
-class ossimRpfTocEntry;
-class ossimRpfFrameEntry;
-
-class OSSIM_DLL ossimRpfToc : public ossimReferenced
-{
-public:
-   friend OSSIM_DLL std::ostream& operator <<(std::ostream& out,
-                                              const ossimRpfToc& data);
-   ossimRpfToc();
-
-   virtual ~ossimRpfToc();
-
-   /**
-    * @brief Parses a.toc file.
-    * @param fileName File to parse.
-    * @param keepFileHeader If true the ossimNitfFileHeader will be kept.
-    * @return ossimErrorCodes::OSSIM_OK on success, ossimErrorCodes::OSSIM_ERROR on error.
-    */
-   ossimErrorCode parseFile(const ossimFilename &fileName,
-                            bool keepFileHeader = false);
-
-   /**
-    * @brief Creates a new a.toc file from list of rpf frames in output directory.
-    *
-    * @param dotRpfFile File containing list of rpf frames wanted.
-    *
-    * @param outputDir Directory to write a.toc file and rpf frames to.
-    *
-    * @see ossim-rpf application usage for dotRpfFile format.
-    *
-    * @note Throws ossimException on error.
-    */
-   void createTocAndCopyFrames( const ossimFilename& dotRpfFile,
-                                const ossimFilename& outputDir);
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out String to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
-    * "nitf.file_name:"
-    * @return output stream.
-    */
-   std::ostream& print(std::ostream& out,
-                       const std::string& prefix=std::string(),
-                       bool printOverviews=false) const;
-   
-   ossim_uint32 getNumberOfEntries()const;
-   
-   const ossimRpfTocEntry* getTocEntry(ossim_uint32 index)const;
-
-   /**
-    * Returns -1 if not found.
-    */
-   ossim_int32 getTocEntryIndex(const ossimRpfTocEntry* entry);
-
-   /**
-    * @brief Get the nitf file header.
-    *
-    * @return The nitf file header or 0 if not set.
-    */
-   const ossimNitfFileHeader* getNitfFileHeader()const;
-   
-   const ossimRpfHeader* getRpfHeader() const;
-
-   /**
-    * For the given entry index, this routine returns the number of 
-    * frames that exist in the horizontal direction. If the entry index
-    * is invalid, 0 frames are returned.
-    *
-    * @param idx the entry index.
-    * @return number of frames in the horizontal direction
-    */
-   ossim_uint32 getNumberOfFramesHorizontal(ossim_uint32 idx)const;
-
-   /**
-    * For the given entry index, this routine returns the number of 
-    * frames that exist in the vertical direction. If the entry index
-    * is invalid, 0 frames are returned.
-    *
-    * @param idx the entry index.
-    * @return number of frames in the vertical direction
-    */
-   ossim_uint32 getNumberOfFramesVertical(ossim_uint32 idx)const;
-
-   /**
-    * For the given entry index, frame row, and frame column, this 
-    * routine returns the corresponding ossimRpfFrameEntry instance. 
-    *
-    * @param entryIdx the entry index.
-    * @param row the frame row.
-    * @param col the frame col.
-    * @return true if successful
-    */
-   bool getRpfFrameEntry(ossim_uint32 entryIdx, 
-                         ossim_uint32 row,
-                         ossim_uint32 col,
-                         ossimRpfFrameEntry& result)const;
-
-   /**
-    * For the given entry index, frame row, and frame column, this 
-    * routine returns the corresponding name of the frame image
-    * with respect to the location of the toc file. 
-    *
-    * @param entryIdx the entry index.
-    * @param row the frame row.
-    * @param col the frame col.
-    * @return the name of the frame image
-    */
-   const ossimString getRelativeFramePath( ossim_uint32 entryIdx,
-                                           ossim_uint32 row,
-                                           ossim_uint32 col)const;
-
-   /**
-    * @brief Method to get the root directory from the a.toc file name.
-    * @param dir This initializes dir.
-    */
-   void getRootDirectory(ossimFilename& dir) const;
-
-private:
-   void deleteAll();
-   void clearAll();
-   void deleteTocEntryList();
-   void buildTocEntryList(ossimRpfHeader* rpfHeader);
-   void allocateTocEntryList(ossim_uint32 numberOfEntries);
-
-   /** @brief Walks through frames to find the first entry that exists... */
-   void getFirstEntry(const ossimRpfTocEntry* rpfTocEntry,
-                      ossimRpfFrameEntry& frameEntry) const;
-
-   /**
-    * @brief Writes the frame file sub section of an a.toc.
-    * 
-    * This is a utility method for createTocAndCopyFrames method. 
-    */
-   void writeFrameFileIndexSection(ossimRpfFrameFileIndexSubsection* frameFileSubSection,
-                                   std::ifstream& dotRpfStr,
-                                   std::ofstream& dotTocStr);
-
-   /**
-    * @brief Copies frame to output directory.
-    * 
-    * This is a utility method for createTocAndCopyFrames method. 
-    */
-   void copyFrames(std::ifstream& dotRpfStr, const ossimFilename& outputDir);
-
-   
-
-   /**
-    * @brief Get the number of frames from the dot rpf file.
-    * This is a utility method for createTocAndCopyFrames method.
-    */
-   ossim_uint32 getNumberOfFrames(std::ifstream& dotRpfStr) const;
-
-   /**
-    * @brief Get a.toc file from the dot rpf file.
-    * This is a utility method for createTocAndCopyFrames method.
-    */
-   ossimFilename getSourceTocFile(std::ifstream& dotRpfStr) const;
-
-   /**
-    * @brief Gets the zero based entry number for the first file in the dot rpf file.
-    * This is a utility method for createTocAndCopyFrames method.
-    */
-   bool getCorespondingEntry(ossimRpfFrameFileIndexSubsection* frameFileSubSection,
-                             std::ifstream& dotRpfStr,
-                             ossim_uint32& entry) const;
-   
-   /**
-    * @brief Gets the filename from line in.
-    *
-    * Line format:
-    *
-    * /data/spadac/rpf-frame-test/t1/N03E030/005FNU1B.I21|30.9141787715578,3.03831480449669|30.9889225265623,3.10741371349693
-    *
-    * @param line Line to extract filename from.
-    *
-    * @param out Filename to initialize.
-    *
-    * This is a utility method for createTocAndCopyFrames method.
-    */
-   bool getFile(const std::string& line, ossimFilename& file) const;
-
-   /*!
-    * This will hold a list of table of content entries.  There is one entry
-    * per directory.  Each entry will have its geographic coverage.
-    * Each directory is then divided into frames.  There could be 30 or
-    * more frame images that make up an entire image.
-    */
-   std::vector<ossimRpfTocEntry*> m_tocEntryList;
-   
-   /*!
-    * We will remember the file that we opened
-    */
-   ossimFilename m_filename;
-
-   ossimRefPtr<const ossimNitfFileHeader> m_nitfFileHeader;
-   
-   ossimRefPtr<ossimRpfHeader> m_rpfHeader;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimRpfTocEntry.h b/include/ossim/support_data/ossimRpfTocEntry.h
deleted file mode 100644
index 9debe6c..0000000
--- a/include/ossim/support_data/ossimRpfTocEntry.h
+++ /dev/null
@@ -1,113 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-// 
-// Description: Rpf support class
-// 
-//********************************************************************
-// $Id: ossimRpfTocEntry.h 19900 2011-08-04 14:19:57Z dburken $
-#ifndef ossimRpfTocEntry_HEADER
-#define ossimRpfTocEntry_HEADER
-
-#include <vector>
-#include <iosfwd>
-
-#include <ossim/support_data/ossimRpfBoundaryRectRecord.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimErrorContext.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/support_data/ossimRpfFrameEntry.h>
-
-class ossimIrect;
-
-class OSSIMDLLEXPORT ossimRpfTocEntry
-{
-public:
-   friend std::ostream& operator <<(std::ostream& out,
-                                    const ossimRpfTocEntry& data);
-   ossimRpfTocEntry();
-   ossimErrorCode parseStream(std::istream &in, ossimByteOrder byteOrder);
-
-   /**
-    * @brief print method that outputs a key/value type format adding prefix
-    * to keys.
-    * @param out String to output to.
-    * @param prefix This will be prepended to key.
-    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
-    * "nitf.file_name:"
-    * @return output stream.
-    */
-   std::ostream& print(std::ostream& out,
-                       const std::string& prefix=std::string()) const;
-   
-   void setEntry(const ossimRpfFrameEntry& entry,
-                 long row,
-                 long col);
-
-   bool getEntry(long row,
-                 long col,
-                 ossimRpfFrameEntry& result)const;
-
-   ossimString getProductType() const;
-   
-   /*!
-    * returns how many subimges or frames exist in the horizontal
-    * direction.
-    */
-   ossim_uint32 getNumberOfFramesHorizontal()const;
-
-   /*!
-    * returns how many subimges or frames exist in the vertical
-    * direction.
-    */
-   ossim_uint32 getNumberOfFramesVertical()const;
-
-   /** @return The number of lines (frames vertical * 1536). */
-   ossim_uint32 getNumberOfLines() const;
-
-   /** @return The number of samples (frames horizontal * 1536). */
-   ossim_uint32 getNumberOfSamples() const;
-
-   /** @return Number of bands. */
-   ossim_uint32 getNumberOfBands() const;
-   
-   /**
-    * @brief Get the bounding rect of entry.
-    * @param rect Gets initialized with rect.
-    */
-   void getBoundingRect(ossimIrect& rect) const;
-   
-   const ossimRpfBoundaryRectRecord& getBoundaryInformation()const;
-
-   /*!
-    * If there is an entry and all the files don't exist we will return
-    * true.
-    */
-   bool isEmpty()const;
-
-   /**
-    * Returns the image geometry object associated with this tile source or
-    * NULL if non defined.  The geometry contains full-to-local image
-    * transform as well as projection (image-to-world).
-    */
-   ossimRefPtr<ossimImageGeometry> getImageGeometry() const;
-
-   /** @brief Get the scale in decimal degrees per pixel. */
-   void getDecimalDegreesPerPixel(ossimDpt& scale) const;
-
-   /** @brief Get the scale in meters per pixel. */
-   void getMetersPerPixel(ossimDpt& scale) const;
-   
-private:
-   void allocateFrameEntryArray();
-   
-   ossimRpfBoundaryRectRecord theBoundaryInformation;
-   ossim_uint32  theNumSamples; //!> May be less than actual image width in case of > 360 deg wrap condition. (OLK 10/10)
-   std::vector< std::vector<ossimRpfFrameEntry> > theFrameEntryArray;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimSrtmSupportData.h b/include/ossim/support_data/ossimSrtmSupportData.h
deleted file mode 100644
index 2329484..0000000
--- a/include/ossim/support_data/ossimSrtmSupportData.h
+++ /dev/null
@@ -1,203 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (c) 2005, David Burken, all rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-// 
-// Support data class for a Shuttle Radar Topography Mission (SRTM) file.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimSrtmSupportData.h 17602 2010-06-20 19:12:24Z dburken $
-#ifndef ossimSrtmSupportData_HEADER
-#define ossimSrtmSupportData_HEADER
-
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimIoStream.h>
-#include <ossim/projection/ossimProjection.h>
-
-/**
- * @class ossimStrmSupportData
- * Support data class for a Shuttle Radar Topography Mission (SRTM) file.
- * Provides lines, samples, post spacing and geometry info given a valid
- * srtm file.  This class will set an error if the file is not deemed to
- * be valid.
- */
-class OSSIMDLLEXPORT ossimSrtmSupportData : public ossimObject
-{
-public:
-   /** default constructor */
-   ossimSrtmSupportData();
-
-   /** destructor */
-   virtual ~ossimSrtmSupportData();
-
-   /**
-    * Initializes object from file.  File is expected to be in a format like
-    * N27W081.hgt or n27w081.hgt where "N27" is the South West latitude of
-    * the cell and "W081" is the South West longitude of the cell.
-    *
-    * @param srtmFile File to set.
-    *
-    * @param scanForMinMax If true and there is no ossim meta data file with
-    * the min and max keywords in it, this will call computeMinMax which will
-    * scan the file for min and max.
-    *
-    * @return Returns true if file is deemed to be an srtm, false if not.
-    *
-    * @note This will write an ossim meta data (.omd) if one does not exists.
-    */
-   bool setFilename(const ossimFilename& srtmFile,
-                    bool scanForMinMax = false);
-
-   /** @return Returns the srtm file name. */
-   ossimFilename getFilename() const;
-
-   /**
-    * @return Returns the number of lines or rows.  Returns  OSSIM_UINT_NAN
-    * if not initialized or file was invalid.
-    */
-   ossim_uint32 getNumberOfLines() const;
-   
-   /**
-    * @return Returns the number of samples or columns. Returns
-    * OSSIM_UINT_NAN if not initialized or file was invalid.
-    */
-   ossim_uint32 getNumberOfSamples() const;
-
-   /**
-    *  Populates the keyword list with image geometry information.  This
-    *  method is used to relay projection information to users.
-    *
-    *  @param kwl Keyword list that will be initialized with geometry info.
-    *  Returns true if geometry info is present, false if not.
-    *
-    *  @param prefix The prefix is added to the resulting keyword list
-    *  keywords.  So is you if you pass in a prefix of "image01.", the
-    *  keyword ul_lat will be like:  "image01.ul_lat:  -40.00000"
-    */
-   virtual bool getImageGeometry(ossimKeywordlist& kwl, const char* prefix=0);
-
-   /**
-    * @brief Gets the projection for srtm cell.
-    * @return  The projection for srtm cell.
-    */
-   ossimRefPtr<ossimProjection> getProjection() const;
-
-   /**
-    * Method to save the state of the object to a keyword list.
-    * Return true if ok or false on error.
-    */
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0) const;
-   
-   /**
-    * Method to the load (recreate) the state of the object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-   
-   /**
-    * @return Returns the Southwest latitude in decimal degrees. Returns
-    * OSSIM_DBL_NAN if not initialized or file was invalid.
-    */
-   ossim_float64 getSouthwestLatitude() const;
-
-   /**
-    * @return Returns the Southwest longitude in decimal degrees.  Returns
-    * OSSIM_DBL_NAN if not initialized or file was invalid.
-    */
-   ossim_float64 getSouthwestLongitude() const;
-   
-   /**
-    * @return Returns the latitude spacing in decimal degrees. Returns
-    * OSSIM_DBL_NAN if not initialized or file was invalid.
-    */
-   ossim_float64 getLatitudeSpacing() const;
-
-   /**
-    * @return Returns the longitude spacing in decimal degrees.  Returns
-    * OSSIM_DBL_NAN if not initialized or file was invalid.
-    */
-   ossim_float64 getLongitudeSpacing() const;
-
-   /**
-    * @return Returns the minimum pixel value.  This is also
-    * the minimum height above sea level.  Returns
-    * OSSIM_SSHORT_NAN if not initialized or file was invalid.
-    */
-   ossim_float64 getMinPixelValue() const;
-
-   /**
-    * @return Returns the maximum pixel value.  This is also
-    * the minimum height above sea level.  Returns
-    * OSSIM_SSHORT_NAN if not initialized or file was invalid.
-    */
-   ossim_float64 getMaxPixelValue() const;
-
-   ossimScalarType getScalarType()const;
-   /**
-    * Prints data members for debug.
-    * 
-    * @return std::ostream&
-    */
-   virtual std::ostream& print(std::ostream& out) const;
-
-private:
-
-   /**
-    * This is a loadState called by setFilename that does not reset "theFile".
-    */
-   bool loadOmd(const ossimKeywordlist& kwl, const char* prefix=0);
-
-   /** Sets all data members to an unitialized state. */
-   void clear();
-
-   /**
-    * Sets corner points from "theFile".
-    *
-    * @return true on success, false on error.
-    */
-   bool setCornerPoints();
-   
-   /**
-    * Sets lines and samples from "theFile" size.
-    *
-    * @return true on success, false on error.
-    */
-   bool setSize();
-
-   /**
-    * Scans file for min and max pixels.
-    *
-    * @retun true on success, false on error.
-    */
-   bool computeMinMax();
-  
-   ossimFilename theFile;
-   ossim_uint32  theNumberOfLines;
-   ossim_uint32  theNumberOfSamples;
-   ossim_float64 theSouthwestLatitude;  //< decimal degrees
-   ossim_float64 theSouthwestLongitude; //< decimal degrees
-   ossim_float64 theLatSpacing;         //< decimal degrees
-   ossim_float64 theLonSpacing;         //< decimal degrees
-   ossim_float64 theMinPixelValue;      //< meters
-   ossim_float64 theMaxPixelValue;      //< meters
-
-   ossimScalarType theScalarType;
-
-   mutable ossimRefPtr<ossimIFStream> theFileStream;
-   template <class T>
-   bool computeMinMaxTemplate(T dummy,
-                              double defaultNull);
-};
-
-#endif /* #ifndef ossimSrtmSupportData */
diff --git a/include/ossim/support_data/ossimSupportFilesList.h b/include/ossim/support_data/ossimSupportFilesList.h
deleted file mode 100644
index 0a46e38..0000000
--- a/include/ossim/support_data/ossimSupportFilesList.h
+++ /dev/null
@@ -1,44 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Oscar Kramer
-// 
-//********************************************************************
-// $Id$
-#ifndef ossimSupportFilesList_HEADER
-#define ossimSupportFilesList_HEADER
-
-#include <vector>
-#include <ossim/base/ossimFilename.h>
-
-class ossimKeywordlist;
-
-//*************************************************************************************************
-//! Singleton class for logging all support data files opened during a session.
-//*************************************************************************************************
-class OSSIMDLLEXPORT ossimSupportFilesList
-{
-public:
-   static ossimSupportFilesList* instance();
-
-   //! Add support data filename to the list:
-   void add(const ossimFilename& f) { m_list.push_back(f); }
-
-   //! Output list to the kwl.
-   void save(ossimKeywordlist& kwl, const char* prefix) const;
-   
-   //! Clears the list to ready for new accumulation:
-   void clear() { m_list.clear(); }
-
-private:
-   ossimSupportFilesList()  { }
-   ~ossimSupportFilesList() { m_instance=0; }
-
-   std::vector<ossimFilename>       m_list;
-   static ossimSupportFilesList*    m_instance;
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimTiffInfo.h b/include/ossim/support_data/ossimTiffInfo.h
deleted file mode 100644
index 27cdb89..0000000
--- a/include/ossim/support_data/ossimTiffInfo.h
+++ /dev/null
@@ -1,771 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: TIFF Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimTiffInfo.h 2673 2011-06-06 14:57:24Z david.burken $
-#ifndef ossimTiffInfo_HEADER
-#define ossimTiffInfo_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/support_data/ossimInfoBase.h>
-#include <ossim/base/ossimFilename.h>
-
-#include <iosfwd>
-#include <string>
-#include <vector>
-
-class ossimDpt;
-class ossimEndian;
-class ossimKeywordlist;
-class ossimTieGptSet;
-
-/**
- * @brief TIFF info class.
- *
- * Encapsulates the listgeo functionality.
- */
-class OSSIM_DLL ossimTiffInfo : public ossimInfoBase
-{
-public:
-   
-   /** default constructor */
-   ossimTiffInfo();
-
-   /** virtual destructor */
-   virtual ~ossimTiffInfo();
-
-   /**
-    * Anonymous enumerations.  Note prefixed with 'O' to avoid conflict with
-    * libtiff.
-    */
-   enum
-   {
-      UNDEFINED                           = 0,
-      OPIXEL_IS_AREA                      = 1,
-      OPIXEL_IS_POINT                     = 2,
-      OTIFFTAG_SUBFILETYPE                = 254,
-      OTIFFTAG_IMAGEWIDTH                 = 256,
-      OTIFFTAG_IMAGELENGTH                = 257,
-      OTIFFTAG_BITSPERSAMPLE              = 258,
-      OTIFFTAG_COMPRESSION                = 259,
-      OTIFFTAG_PHOTOMETRIC                = 262,
-      OTIFFTAG_FILLORDER                  = 266,
-      OTIFFTAG_IMAGEDESCRIPTION           = 270,
-      OTIFFTAG_MODEL                      = 272,
-      OTIFFTAG_STRIPOFFSETS               = 273,
-      OTIFFTAG_ORIENTATION                = 274,
-      OTIFFTAG_SAMPLESPERPIXEL            = 277,
-      OTIFFTAG_ROWSPERSTRIP               = 278,
-      OTIFFTAG_STRIPBYTECOUNTS            = 279,
-      OTIFFTAG_MINSAMPLEVALUE             = 280,
-      OTIFFTAG_MAXSAMPLEVALUE             = 281,
-      OTIFFTAG_XRESOLUTION                = 282,
-      OTIFFTAG_YRESOLUTION                = 283,
-      OTIFFTAG_PLANARCONFIG               = 284,
-      OTIFFTAG_RESOLUTIONUNIT             = 296,
-      OTIFFTAG_PAGENUMBER                 = 297,
-      OTIFFTAG_SOFTWARE                   = 305,
-      OTIFFTAG_DATETIME                   = 306,  // FORMAT is YYYY:MM:DD HH:MM:SS
-      OTIFFTAG_ARTIST                     = 315,
-      OTIFFTAG_TILEWIDTH                  = 322,
-      OTIFFTAG_TILELENGTH                 = 323,
-      OTIFFTAG_TILEOFFSETS                = 324,
-      OTIFFTAG_TILEBYTECOUNTS             = 325,
-      OTIFFTAG_EXTRASAMPLES               = 338,
-      OTIFFTAG_SAMPLEFORMAT               = 339,
-      OTIFFTAG_SMINSAMPLEVALUE            = 340,
-      OTIFFTAG_SMAXSAMPLEVALUE            = 341,
-      OSAMPLEFORMAT_UINT                  = 1,
-      OSAMPLEFORMAT_INT                   = 2,
-      OSAMPLEFORMAT_IEEEFP                = 3,
-      OSAMPLEFORMAT_VOID                  = 4,
-      OSAMPLEFORMAT_COMPLEXINT            = 5,
-      OSAMPLEFORMAT_COMPLEXIEEEFP         = 6,
-      OTIFFTAG_SUBIFD                     = 330,
-      OGT_MODEL_TYPE_GEO_KEY              = 1024,
-      OGT_RASTER_TYPE_GEO_KEY             = 1025,
-      OGT_CITATION_GEO_KEY                = 1026,
-      OGEOGRAPHIC_TYPE_GEO_KEY            = 2048,
-      OGEOG_CITATION_GEO_KEY              = 2049,
-      OGEOG_GEODETIC_DATUM_GEO_KEY        = 2050,
-      OGEOG_PRIME_MERIDIAN_GEOKEY         = 2051,
-      OGEOG_LINEAR_UNITS_GEO_KEY          = 2052,
-      OGEOG_ANGULAR_UNITS_GEO_KEY         = 2054,
-      OGEOG_ANGULAR_UNIT_SIZE_GEO_KEY     = 2055,
-      OGEOG_ELLIPSOID_GEO_KEY             = 2056,
-      OGEOG_SEMI_MAJOR_AXIS               = 2057,
-      OGEOG_SEMI_MINOR_AXIS               = 2058,
-      OGEOG_INV_FLATTENING_GEO_KEY        = 2059,
-      OGEOG_PRIME_MERIDIAN_LONG_GEO_KEY   = 2061,
-      OPROJECTED_CS_TYPE_GEO_KEY          = 3072,
-      OPCS_CITATION_GEO_KEY               = 3073,
-      OPROJECTION_GEO_KEY                 = 3074,
-      OPROJ_COORD_TRANS_GEO_KEY           = 3075,
-      OPROJ_LINEAR_UNITS_GEO_KEY          = 3076,
-      OPROJ_LINEAR_UNIT_SIZE_GEO_KEY      = 3077,
-      OPROJ_STD_PARALLEL1_GEO_KEY         = 3078,
-      OPROJ_STD_PARALLEL2_GEO_KEY         = 3079,
-      OPROJ_NAT_ORIGIN_LONG_GEO_KEY       = 3080,
-      OPROJ_NAT_ORIGIN_LAT_GEO_KEY        = 3081,
-      OPROJ_FALSE_EASTING_GEO_KEY         = 3082,
-      OPROJ_FALSE_NORTHING_GEO_KEY        = 3083,
-      OPROJ_FALSE_ORIGIN_LONG_GEO_KEY     = 3084,
-      OPROJ_FALSE_ORIGIN_LAT_GEO_KEY      = 3085,
-      OPROJ_FALSE_ORIGIN_EASTING_GEO_KEY  = 3086,
-      OPROJ_FALSE_ORIGIN_NORTHING_GEO_KEY = 3087,
-      OPROJ_CENTER_LONG_GEO_KEY           = 3088,
-      OPROJ_CENTER_LAT_GEO_KEY            = 3089,
-      OPROJ_SCALE_AT_NAT_ORIGIN_GEO_KEY   = 3092,
-      OPROJ_SCALE_AT_CENTER_GEO_KEY       = 3093,
-      OVERTICAL_Cs_TYPE_GEO_KEY           = 4096,
-      OVERTICAL_CITATION_GEO_KEY          = 4097,
-      OVERTICAL_DATUM_GEO_KEY             = 4098,
-      OVERTICAL_UNITS_GEO_KEY             = 4099,
-      OLINEAR_METER                       = 9001,
-      OLINEAR_FOOT                        = 9002,
-      OLINEAR_FOOT_US_SURVEY              = 9003,
-      OANGULAR_DEGREE                     = 9102,
-      OANGULAR_ARC_MINUTE                 = 9103,
-      OANGULAR_ARC_SECOND                 = 9104,
-      OANGULAR_GRAD                       = 9105,
-      OANGULAR_GON                        = 9106,
-      OANGULAR_DMS                        = 9107,
-      OANGULAR_DMS_HEMISPHERE             = 9108,
-      OPCS_BRITISH_NATIONAL_GRID          = 27700,
-      OUSER_DEFINED                       = 32767,
-      OTIFFTAG_COPYRIGHT                  = 33432,
-      OMODEL_PIXEL_SCALE_TAG              = 33550,
-      OMODEL_TIE_POINT_TAG                = 33922,
-      OMODEL_TRANSFORM_TAG                = 34264,
-      OTIFFTAG_PHOTOSHOP                  = 34377,
-      OGEO_KEY_DIRECTORY_TAG              = 34735,
-      OGEO_DOUBLE_PARAMS_TAG              = 34736,
-      OGEO_ASCII_PARAMS_TAG               = 34737,
-      OGDAL_METADATA_TAG                  = 42112,
-      OGDAL_NODATA                        = 42113
-   };
-
-   enum CompressType
-   {
-      NOT_COMPRESSED = 0,
-      COMPRESSED     = 1
-   };
- 
-   enum PhotoInterpretation
-   {
-      OPHOTO_MINISWHITE  = 0,   // min value is white 
-      OPHOTO_MINISBLACK  = 1,   // min value is black 
-      OPHOTO_RGB         = 2,   // RGB color model 
-      OPHOTO_PALETTE     = 3,   // color map indexed 
-      OPHOTO_MASK        = 4,   // $holdout mask 
-      OPHOTO_SEPARATED   = 5,   // !color separations 
-      OPHOTO_YCBCR       = 6,   // !CCIR 601 
-      OPHOTO_CIELAB      = 8    // !1976 CIE L*a*b*
-   };
-
-   enum ModelType
-   {
-      UNKNOWN                = 0,
-      OMODEL_TYPE_PROJECTED  = 1,  // Projection Coordinate System
-      OMODEL_TYPE_GEOGRAPHIC = 2,  // Geographic latitude-longitude System 
-      OMODEL_TYPE_GEOCENTRIC = 3
-   };
-
-   enum WordType
-   {
-      TWO_OR_EIGHT  = 0,
-      FOUR_OR_EIGHT = 1
-   };
-
-   enum
-   {
-      OTIFF_NOTYPE = 0,      /* placeholder */
-      OTIFF_BYTE = 1,        /* 8-bit unsigned integer */
-      OTIFF_ASCII = 2,       /* 8-bit bytes w/ last byte null */
-      OTIFF_SHORT = 3,       /* 16-bit unsigned integer */
-      OTIFF_LONG = 4,        /* 32-bit unsigned integer */
-      OTIFF_RATIONAL = 5,    /* 64-bit unsigned fraction */
-      OTIFF_SBYTE = 6,       /* !8-bit signed integer */
-      OTIFF_UNDEFINED = 7,   /* !8-bit untyped data */
-      OTIFF_SSHORT = 8,      /* !16-bit signed integer */
-      OTIFF_SLONG = 9,       /* !32-bit signed integer */
-      OTIFF_SRATIONAL = 10,  /* !64-bit signed fraction */
-      OTIFF_FLOAT = 11,      /* !32-bit IEEE floating point */
-      OTIFF_DOUBLE = 12,     /* !64-bit IEEE floating point */
-      OTIFF_IFD = 13,        /* %32-bit unsigned integer (offset) */
-      OTIFF_LONG8 = 16,      /* BigTIFF 64-bit unsigned integer */
-      OTIFF_SLONG8 = 17,     /* BigTIFF 64-bit signed integer */
-      OTIFF_IFD8 = 18        /* BigTIFF 64-bit unsigned integer (offset) */
-   };
-
-   /**
-    * @brief open method.
-    *
-    * @param file File name to open.
-    *
-    * @return true on success false on error.
-    */
-   virtual bool open(const ossimFilename& file);
-
-   /**
-    * Print method.
-    *
-    * @param out Stream to print to.
-    * 
-    * @return std::ostream&
-    */
-   virtual std::ostream& print(std::ostream& out) const;
-
-   /**
-    * @brief Print method.
-    * 
-    * Print method that takes a stream that should be positions at the start
-    * of tiff stream. This was added to see embedded information on embedded
-    * geotiff's in a geojp2 file.
-    *
-    * @param out Stream to print to.
-    * 
-    * @return std::ostream&
-    */
-   virtual std::ostream& print(std::istream& inStr,
-                               std::ostream& outStr) const;
-
-   /**
-    *  @brief Extracts geometry info to keyword list.  This method assumes
-    *  that open has been called and theFile is set.
-    *  
-    *  Populates the keyword list with image geometry information.  This
-    *  method is used to relay projection/model information to users.
-    *
-    *  @param geomKwl Keyword list that will be initialized with geometry info.
-    *  Returns true if geometry info is present, false if not.
-    *
-    *  @param entryIndex Entry to get geometry from. 
-    */
-   bool getImageGeometry(ossimKeywordlist& geomKwl,
-                         ossim_uint32 entryIndex) const;
-
-   /**
-    *  @brief Extracts geometry info from stream to keyword list.
-    *  
-    *  Populates the keyword list with image geometry information.  This
-    *  method is used to relay projection/model information to users.
-    *
-    *  @note The str should be position at start of tiff portion. This
-    *  was written to allow passing a stream positioned at an embedded tiff
-    *  image in a jp2 file.
-    *
-    *  @param str Stream position at start of tiff image.
-    *
-    *  @param geomKwl Keyword list that will be initialized with geometry info.
-    *  Returns true if geometry info is present, false if not.
-    *
-    *  @param entryIndex Entry to get geometry from. 
-    */
-   bool getImageGeometry(std::istream& str,
-                         ossimKeywordlist& geomKwl,
-                         ossim_uint32 entryIndex) const;
-
-   /**
-    * @brief Extracts geometry info from geotiff keys to keyword list.
-    *
-    * Helper method used to extract keywords from geotiff keys embedded in
-    * files, e.g. LAS data.  Because this is just the geotiff keys, the output
-    * will be missing the image part, i.e. line, samples, radiometry...
-    *
-    * This output is intended to be usable to get a projection from a call to
-    * ossimProjectionFactoryRegistry::createProjection(kwl).
-    *
-    * Internally calls printGeoKeys and then the private getImageGeometry.
-    *
-    * @param geoKeyLength Length of geoKeyBlock.
-    * @param geoKeyBlock Pointer to array of keys.
-    * @param geoDoubleLength Length of geoDoubleBlock.
-    * @param geoDoubleBlock Pointer to array of double values.
-    * @param geoAsciiLength Length of geoAsciiBlock.
-    * @param geoAsciiBlock Pointer to array of ascii values.
-    * @param projKwl The keyword list to initialize.
-    *
-    * @return Because the resulting keyword list (geomKwl) is not complete
-    * there will be no return.
-    */
-   void getImageGeometry(ossim_uint64   geoKeyLength,
-                         ossim_uint16*  geoKeyBlock,
-                         ossim_uint64   geoDoubleLength,
-                         ossim_float64* geoDoubleBlock,
-                         ossim_uint64   geoAsciiLength,
-                         ossim_int8*    geoAsciiBlock,
-                         ossimKeywordlist& geomKwl) const;
-
-   /**
-    * @brief Prints geo keys to stream.
-    *
-    * Helper method used to extract keywords from geotiff keys embedded in
-    * files, e.g. LAS data.  Because this is just the geotiff keys, the output
-    * will be missing the image part, i.e. line, samples, radiometry...
-    *
-    * This output is the raw tiff tags/geotiff keys not necessarily useable to construct
-    * a projection from.
-    *
-    * @param out Stream to dump to.
-    * @param prefix if any.  This will be added to the keys, e.g.
-    * tiff0.coord_trans where "tiff0." is the prefix and "coord_trans" the key.
-    * @param geoKeyLength Length of geoKeyBlock.
-    * @param geoKeyBlock Pointer to array of keys.
-    * @param geoDoubleLength Length of geoDoubleBlock.
-    * @param geoDoubleBlock Pointer to array of double values.
-    * @param geoAsciiLength Length of geoAsciiBlock.
-    * @param geoAsciiBlock Pointer to array of ascii values.
-    */
-   std::ostream& printGeoKeys(std::ostream& out,
-                              const std::string& prefix,
-                              ossim_uint64   geoKeyLength,
-                              ossim_uint16*  geoKeyBlock,
-                              ossim_uint64   geoDoubleLength,
-                              ossim_float64* geoDoubleBlock,
-                              ossim_uint64   geoAsciiLength,
-                              ossim_int8*    geoAsciiBlock) const;
-
-private:
-
-   /**
-    * @brief extracts geometry info from stream to keyword list.
-    *  
-    * Populates geomKwl from gtiffKwl.
-    *
-    * @param gtiffKwl Raw keywordlist extracted from tiff/geotiff keys.
-    * 
-    * @param geomKwl Keyword list that will be initialized with geometry info.
-    * Returns true if geometry info is present, false if not.
-    *
-    * @param entryIndex Entry to get geometry from. 
-    */
-   bool getImageGeometry(const ossimKeywordlist& gtiffKwl,
-                         ossimKeywordlist& geomKwl,
-                         ossim_uint32 entryIndex) const;
-   
-   /** Initializes s reference.  Does byte swapping as needed. */
-   void readShort(ossim_uint16& s, std::istream& str) const;
-   
-   /** Initializes l reference.  Does byte swapping as needed. */
-   void readLong(ossim_uint32& l, std::istream& str) const;
-   
-   /** Initializes l reference.  Does byte swapping as needed. */
-   void readLongLong(ossim_uint64& l, std::istream& str) const;
-   
-   /** Attempts to parse the pcs code (3072). */
-   void parsePcsCode(int code);
-   
-   /** Attempts to parse the projection geo key (3074). */
-   void parseProjGeoCode(int code);
-   
-   /**
-    *  Converts double passed in to meters if needed.  The conversion is
-    *  base on "theLiniarUnitsCode".
-    */
-   double convert2meters(double d) const;
-   
-   /**
-    * This will read either 4 or 8 bytes depending on the version and
-    * initialize offset.
-    *
-    * @return true if stream is good, false if not.
-    */
-   bool getOffset(std::streamoff& offset, std::istream& str,
-                  ossim_uint16 version) const;
-   
-   /**
-    * This will read either 2 , 4or 8 bytes depending on the version and
-    * WORD_TYPE.
-    *
-    * @return true if stream is good, false if not.
-    */
-   bool getValue(ossim_uint64& val, std::istream& str, WordType type,
-                 ossim_uint16 version) const;
-   
-   ossim_uint64 getArraySizeInBytes(ossim_uint64 length,
-                                    ossim_uint16 type) const;
-   
-   /**
-    * @return The byte size of each tiff type or 0 if unhandled.
-    */
-   ossim_uint16 getTypeByteSize(ossim_uint16 type) const;
-   
-   /**
-    * Eats the value field.  Either 4 or 8 bytes depending on the version.
-    */
-   void eatValue(std::istream& str, ossim_uint16 version) const;
-   
-   void swapBytes(ossim_uint8* v, ossim_uint16 type, ossim_uint64 count) const;
-   
-   /** Initializes v. */
-   template <class T> void getArrayValue(T& v,
-                                         ossim_uint8* array,
-                                         ossim_uint64 position) const;
-   
-   std::ostream& print(std::ostream& out,
-                       const std::string&  prefix,
-                       ossim_uint64   tagIdx,
-                       ossim_uint16   tag,
-                       ossim_uint16   type,
-                       ossim_uint64   count,
-                       ossim_uint64   arraySizeInBytes,
-                       ossim_uint8*   valueArray) const;
-   
-   std::ostream& printValue(std::ostream& out,
-                            ossim_uint16 type,
-                            ossim_uint8* valueArray) const;
-   
-   std::ostream& printArray(std::ostream& out,
-                            ossim_uint16 type,
-                            ossim_uint64 count,
-                            ossim_uint8* valueArray) const;
-   
-   std::ostream& printGdalMetadata(std::ostream& out,
-                                   const std::string& prefix,
-                                   ossim_uint64 count,
-                                   ossim_uint8* valueArray) const;
-
-   /** @brief Prints key 1024 */
-   std::ostream& printModelType(std::ostream& out,
-                                const std::string& prefix,
-                                ossim_uint16 code) const;
-
-   /** @brief Prints key 1025 */
-   std::ostream& printRasterType(std::ostream& out,
-                                 const std::string& prefix,
-                                 ossim_uint16 code) const;
-
-   /** @brief Prints key 2054 */
-   std::ostream& printAngularUnits(std::ostream& out,
-                                   const std::string& prefix,
-                                   ossim_uint16 code) const;
-
-   /** @brief Prints key 3075 */
-   std::ostream& printCoordTrans(std::ostream& out,
-                                  const std::string& prefix,
-                                  ossim_uint16 code) const;
-
-   /** @brief Prints key from code from section 6.3.1.3 */
-   std::ostream& printLinearUnits(std::ostream& out,
-                                  const std::string& prefix,
-                                  const std::string& key,
-                                  ossim_uint16 code) const;
-
-   /** @brief Prints tag 274 */
-   std::ostream& printOrientation(std::ostream& out,
-                                  const std::string& prefix,
-                                  ossim_uint16 code) const;
-  
-   /** @brief adds imageN. to prefix where N is zero base directory index. */
-   void getDirPrefix(ossim_int32 dirIndex, std::string& prefix) const;
-
-   /**
-    * @brief Gets the required pixel scale from keyword list looking for the
-    * key model_pixel_scale.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param scale The point to initialize.
-    * @return true on success, false on error.
-    */
-   bool getPixelScale(const ossimString& gtiffPrefix,
-                      const ossimKeywordlist& gtiffKwl,
-                      ossimDpt& scale) const;
-   
-   /**
-    * @brief Gets the model_tie_point array.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param ties The array to initialize.
-    * @return true on success, false on error.
-    */
-   bool getTiePoint(const ossimString& gtiffPrefix,
-                    const ossimKeywordlist& gtiffKwl,
-                    std::vector<ossim_float64>& ties) const;
-
-   /**
-    * @brief Gets the model_transform array.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param ties The array to initialize.
-    * @return true on success, false on error.
-    */
-   bool getModelTransform(const ossimString& gtiffPrefix,
-                          const ossimKeywordlist& gtiffKwl,
-                          std::vector<ossim_float64>& xfrm) const;
-
-   /**
-    * @brief Extracts float values from keyword list that match key.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param key to look for.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param floats Array to stuff.  Will have size of zero on failure.
-    * @return true on success, false on error.  If size of array is zero it
-    * will return false.
-    */
-   bool  getFloats(const ossimString& gtiffPrefix,
-                   const ossimString& key,
-                   const ossimKeywordlist& gtiffKwl,
-                   std::vector<ossim_float64>& floats) const;
-
-   /**
-    * @brief Extracts float values from lookup line and puts in floats array.
-    * @param lookup Line to parse like:
-    * "0.00138888888889 0.00138888888889, 0.0"
-    * @param floats Array to stuff.  Will have size of zero on failure.
-    */
-   bool getFloats(const ossimString& line,
-                  std::vector<ossim_float64>& floats) const;
-
-   /**
-    * @brief Gets the datum code matching code from the keyword list as a
-    * string.
-    *
-    * This checks for "geodetic_datum"(geotiff key 2050), then
-    * "gcs_code"(geotiff key 2048) if first lookup faild.
-    * 
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param datumCode The code to initialize.
-    * @return true on success, false on error.
-    */
-   bool getDatumCode(const ossimString& gtiffPrefix,
-                     const ossimKeywordlist& gtiffKwl,
-                     ossimString& datumCode) const;
-
-   /**
-    * @brief Gets the datum code.
-    * @param code Code from either "geodetic_datum"(geotiff key 2050),
-    * or "gcs_code"(geotiff key 2048).
-    * @param datumCode The code to initialize.
-    * @return true on success, false on error.
-    */
-   bool getDatumCode(ossim_int32 code, ossimString& datumCode) const;
-
-   /**
-    * @brief Gets the pcs code from the keyword list as a string.
-    *
-    * If the lookup of "pcs_code" returns false then the "pcs_citation" is then
-    * checked.
-    * 
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param pcsCode The code to initialize.
-    * @return true on success, false on error.
-    */
-   bool getPcsCode(const ossimString& gtiffPrefix,
-                   const ossimKeywordlist& gtiffKwl,
-                   ossimString& pcsCode) const;
-
-   /**
-    * @brief Gets units from keyword list as a string. This will be angular
-    * or linear base on the model type.  The default is meters if not found.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param linearUnits The string to initialize with units.
-    * @return true on success, false on error.
-    */
-   bool getUnits(const ossimString& gtiffPrefix,
-                 const ossimKeywordlist& gtiffKwl,
-                 ossimString& units) const;
-   /**
-    * @brief Gets the linear units from keyword list as a string.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param linearUnits The string to initialize with units.
-    * @return true on success, false on error.
-    */
-   bool getLinearUnits(const ossimString& gtiffPrefix,
-                       const ossimKeywordlist& gtiffKwl,
-                       ossimString& linearUnits) const;
-
-   /**
-    * @brief Gets the vertical units from keyword list as a string.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param linearUnits The string to initialize with units.
-    * @return true on success, false on error.
-    */
-   bool getVerticalUnits(const ossimString& gtiffPrefix,
-                         const ossimKeywordlist& gtiffKwl,
-                         ossimString& verticalUnits) const;
-
-   /**
-    * @brief Gets the units from keyword list as a string.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param angularUnit The string to initialize with units.
-    * @return true on success, false on error.
-    */
-   bool getAngularUnits(const ossimString& gtiffPrefix,
-                        const ossimKeywordlist& gtiffKwl,
-                        ossimString& units) const;
-
-
-   /**
-    * @brief Gets the pixel type (point or area) from keyword list as a string.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param unit The string to initialize with pixel type.
-    * @return true on success, false on error.
-    */   
-   bool getPixelType(const ossimString& gtiffPrefix,
-                     const ossimKeywordlist& gtiffKwl,
-                     ossimString& pixelType) const;
-
-   /**
-    * @brief Gets the model type from keyword list as a string.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param modelType The string to initialize with pixel type.
-    * @return true on success, false on error.
-    */   
-   bool getModelType(const ossimString& gtiffPrefix,
-                     const ossimKeywordlist& gtiffKwl,
-                     ossimString& modeType) const;
-
-   /**
-    * @brief Gets the ossimProjection from keyword list as a string.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param ossimProj The string to initialize with pixel type.
-    * @return true on success, false on error.
-    */   
-   bool getOssimProjectionName(const ossimString& gtiffPrefix,
-                               const ossimKeywordlist& gtiffKwl,
-                               ossimString& ossimProj) const;
-   
-   /**
-    * @brief Gets the number of lines from keyword list.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @return Number of lines or 0 if lines not found.
-    */   
-   ossim_uint32 getLines(const ossimString& gtiffPrefix,
-                         const ossimKeywordlist& gtiffKwl) const;
-
-   /**
-    * @brief Gets the number of samples from keyword list.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @return Number of lines or 0 if lines not found.
-    */   
-   ossim_uint32 getSamples(const ossimString& gtiffPrefix,
-                           const ossimKeywordlist& gtiffKwl) const;
-
-   /**
-    * @brief Gets the first standard parallel from keyword list.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param value Initialized with result.
-    */   
-   bool getStdParallelOne(const ossimString& gtiffPrefix,
-                          const ossimKeywordlist& gtiffKwl,
-                          ossimString& value) const;
-
-   /**
-    * @brief Gets the second standard parallel from keyword list.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param value Initialized with result.
-    */
-   bool getStdParallelTwo(const ossimString& gtiffPrefix,
-                          const ossimKeywordlist& gtiffKwl,
-                          ossimString& value) const;
-   
-   /**
-    * @brief Gets the false easting from keyword list.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param value Initialized with result.
-    */
-   bool getFalseEasting(const ossimString& gtiffPrefix,
-                        const ossimKeywordlist& gtiffKwl,
-                        ossimString& value) const;
-
-   /**
-    * @brief Gets the false northing from keyword list.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param value Initialized with result.
-    */
-   bool getFalseNorthing(const ossimString& gtiffPrefix,
-                         const ossimKeywordlist& gtiffKwl,
-                         ossimString& value) const;
-
-   /**
-    * @brief Gets the false easting/northing from keyword list.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param eastingNorthing Initialized with result.
-    */
-   bool getFalseEastingNorthing(const ossimString& gtiffPrefix,
-                                const ossimKeywordlist& gtiffKwl,
-                                ossimDpt& eastingNorthing) const;
-
-   /**
-    * @brief Gets the scale factor from keyword list.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param value Initialized with result.
-    */
-   bool getScaleFactor(const ossimString& gtiffPrefix,
-                       const ossimKeywordlist& gtiffKwl,
-                       ossim_float64& value) const;
-
-   /**
-    * @brief Gets the origin of latitude from keyword list.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param value Initialized with result.
-    */
-   bool getOriginLat(const ossimString& gtiffPrefix,
-                     const ossimKeywordlist& gtiffKwl,
-                     ossim_float64& value) const;
-
-   /**
-    * @brief Gets the central meridian from keyword list.
-    * @param gtiffPrefix Prefix for gtiffKwl.
-    * @param gtiffKwl The keyword list with all tiff keywords.
-    * @param value Initialized with result.
-    */
-   bool getCentralMeridian(const ossimString& gtiffPrefix,
-                           const ossimKeywordlist& gtiffKwl,
-                           ossim_float64& value) const;
-
-   /**
-    * @brief Split tie points into sets of six tie sets.
-    * @param tie points.
-    * @param width Image width.
-    * @param height Image height.
-    * @param tieSet Initialized with result.
-    */
-   void getTieSets(const std::vector<ossim_float64>& ties,
-                   ossim_uint32 width,
-                   ossim_uint32 height,
-                   ossimTieGptSet& tieSet) const;
-
-
-   /**
-    * @brief Check tie points to see if they are zero base or one based.
-    * @param tie points.
-    * @param width Image width.
-    * @param height Image height.
-    * @return true if one based, false if not.
-    */
-   bool hasOneBasedTiePoints(const std::vector<ossim_float64>& ties,
-                             ossim_uint32 width,
-                             ossim_uint32 height) const;
-   
-   ossimFilename          theFile;
-   mutable ossimEndian*   theEndian;
-};
-
-#endif /* End of "#ifndef ossimTiffInfo_HEADER" */
diff --git a/include/ossim/support_data/ossimTiffWorld.h b/include/ossim/support_data/ossimTiffWorld.h
deleted file mode 100644
index f890273..0000000
--- a/include/ossim/support_data/ossimTiffWorld.h
+++ /dev/null
@@ -1,80 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Ken Melero
-// 
-// Description: Container class for a tiff world file data.
-//
-//********************************************************************
-// $Id: ossimTiffWorld.h 18693 2011-01-17 18:49:15Z dburken $
-#ifndef ossimTiffWorld_HEADER
-#define ossimTiffWorld_HEADER
-
-#include <iostream>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimDpt.h>
-using namespace std;
-
-//***************************************************************************
-// CLASS:  ossimTiffWorld
-//***************************************************************************
-class OSSIMDLLEXPORT ossimTiffWorld
-{
-public:
-   ossimTiffWorld();
-   ossimTiffWorld(const char* source, 
-		  ossimPixelType ptype = OSSIM_PIXEL_IS_POINT,
-		  ossimUnitType  unit = OSSIM_METERS);
-   
-   ~ossimTiffWorld();
-   
-   bool open(const ossimFilename& file,
-             ossimPixelType ptype,
-             ossimUnitType unit);
-   
-   bool saveToOssimGeom(ossimKeywordlist& kwl, const char* prefix=NULL)const;
-   bool loadFromOssimGeom(const ossimKeywordlist& kwl, const char* prefix=NULL);
-   
-   std::ostream& print(std::ostream& out) const;
-   
-   friend OSSIMDLLEXPORT std::ostream& operator<<(std::ostream& out,
-                                                  const ossimTiffWorld& obj);
-   
-   /*!
-    * transformed.x =
-    * imagePoint.x*theX_scale + imagePoint.y*the3rdValue + theTranslateX
-    * 
-    * transformed.y =
-    * imagePoint.x*the2ndValue + imagePoint.y*theY_scale + theTranslateY
-    */
-   void forward(const ossimDpt& imagePoint,
-                ossimDpt& transformedPoint);
-   
-   //! Converts world file parameters into x, y scale (for use in affine transform) 
-   const ossimDpt& getScale() const { return theComputedScale; }
-   
-   //! Converts world file parameters into RH rotation in radians (for use in affine transform) 
-   double getRotation() const { return theComputedRotation; }
-   
-   //! Provides access to the translation (for use in affine transform) 
-   const ossimDpt& getTranslation() const { return theTranslation; }
-
-protected:
-   double theXform1;     
-   double theXform2;   
-   double theXform3;   
-   double theXform4;   
-   ossimDpt theTranslation;
-
-   ossimPixelType thePixelType;
-   ossimUnitType  theUnit;
-   ossimDpt theComputedScale;
-   double   theComputedRotation;  //!< Radians
-};
-
-#endif
diff --git a/include/ossim/support_data/ossimWavelength.h b/include/ossim/support_data/ossimWavelength.h
deleted file mode 100644
index 6535960..0000000
--- a/include/ossim/support_data/ossimWavelength.h
+++ /dev/null
@@ -1,106 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Class declaration for ossimWavelength.
-// See class description below.
-//
-//----------------------------------------------------------------------------
-// $Id$
-
-#ifndef ossimWavelength_HEADER
-#define ossimWavelength_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-#include <iostream>
-#include <map>
-#include <vector>
-
-
-class ossimEnviHeader;
-
-/**
- * @class ossimWavelenght class.
- *
- * Simple container class encapsulating a std::map of wavelengths(key) and associated
- * bands(value), with convenience methods.  Wavelengths values are 64 bit
- * floating point in nanometers. Bands are zero based
- * 32 bit unsigned integers. 
- */
-class OSSIM_DLL ossimWavelength 
-{
-public:
-   
-   typedef std::map< ossim_float64, ossim_uint32 > WavelengthMap;
-   
-   /** @brief default constructor */
-   ossimWavelength();
-
-   /** @brief copy constructor */
-   ossimWavelength( const ossimWavelength& obj );
-
-   /** @brief assignment operator= */
-   const ossimWavelength& operator=( const ossimWavelength& rhs );
-
-   /** @brief virtual destructor */
-   ~ossimWavelength();
-   
-   const ossimWavelength::WavelengthMap& getMap() const;
-   
-   ossimWavelength::WavelengthMap& getMap();
-
-   /**
-    * @brief Initializes map from ENVI header class.
-    *
-    * This will clear any existing map, look for the keywords
-    * "wavelength units" and "wavelength".
-    * 
-    * @param header to initialize from.
-    * @return true on success, false on error.
-    */
-   bool initialize( const ossimEnviHeader& hdr );
-
-   /**
-    * @brief Finds iterator closest to wavelength.
-    * @param requestedWavelength Requested wavelength in nanometers.
-    * @param thresholdFromCenter in nanometers.
-    * @return WavelengthMap::const_iterator if not found will return. 
-    */
-   WavelengthMap::const_iterator findClosestIterator(
-      const ossim_float64& requestedWavelength,
-      const ossim_float64& thresholdFromCenter  ) const;
-   
-   /**
-    * @brief Finds index closest to wavelength.
-    * @param requestedWavelength Requested wavelength in nanometers.
-    * @param thresholdFromCenter in nanometers.
-    * @return Closest zero based index to wavelength or -1 if not found. 
-    */
-   ossim_int32 findClosestIndex(
-      const ossim_float64& requestedWavelength,
-      const ossim_float64& thresholdFromCenter  ) const;
-   
-   /**
-    * @brief Gets rgb bands if "wavelength" keyword is present.
-    * @param bands Initialized by this with zero base rbg band
-    * indexes.
-    * @return true on success, false if bands not found.
-    */   
-   bool getRgbBands( std::vector<ossim_uint32>& bands ) const;
-
-   /** @return WavelengthMap::const_iterator of underlying map. */
-   WavelengthMap::const_iterator end() const;
-
-   /** @return WavelengthMap::iterator of underlying map. */
-   WavelengthMap::iterator end();
-
-private:
-   
-   WavelengthMap m_map;
-};
-
-#endif /* End of "#ifndef ossimWavelength_HEADER" */
diff --git a/include/ossim/support_data/ossimXmpInfo.h b/include/ossim/support_data/ossimXmpInfo.h
deleted file mode 100644
index 9a49de5..0000000
--- a/include/ossim/support_data/ossimXmpInfo.h
+++ /dev/null
@@ -1,120 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Extensible Metadata Platform (XMP) Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#ifndef ossimXmpInfo_HEADER
-#define ossimXmpInfo_HEADER 1
-
-#include <ossim/support_data/ossimInfoBase.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimXmlNode.h>
-#include <ossim/projection/ossimProjection.h>
-#include <string>
-
-// Forward class declarations:
-class ossimDrect;
-class ossimString;
-class ossimXmlDocument;
-
-/** @class Extensible Metadata Platform (XMP) Info object. */
-class OSSIM_DLL ossimXmpInfo : public ossimInfoBase
-{
-public:
-   
-   /** default constructor */
-   ossimXmpInfo();
-
-   /** virtual destructor */
-   virtual ~ossimXmpInfo();
-
-   /**
-    * @brief open method.
-    *
-    * @param file File name to open.
-    *
-    * @return true on success false on error.
-    */
-   virtual bool open(const ossimFilename& file);
-   
-   /**
-    * Print method.
-    *
-    * @param out Stream to print to.
-    * 
-    * @return std::ostream&
-    */
-   virtual std::ostream& print(std::ostream& out) const;
-
-   /** @return XMP APP1 XML block. */ 
-   const std::string& getXmpApp1XmlBlock() const;
-
-   /**
-    * @brief Method to get a projection if possible.
-    * @param imageRect Require image rectangle of associated meta data
-    * parsed by this class.
-    * @return Projection pointer wrapped in ref pointer.  Can be null if
-    * projection cannot be established.
-    */
-   ossimRefPtr<ossimProjection> getProjection(
-      const ossimDrect& imageRect ) const;
-
-   /**
-    *  @brief Gets the date if available in ISO8601 format:
-    *  YYYY-MM-DDThh:mm:ss.sssZ
-    *
-    *  @param date Initialized by this.  Will be cleared if date not found.
-    */
-   void getDate( std::string& date ) const;
-   
-   /**
-    *  @brief Gets the mission ID if available.
-    *
-    *  @param mission Initialized by this.  Will be cleared if date not found.
-    */
-   void getMissionId( std::string& mission ) const;
-
-   /**
-    *  @brief Gets the sensor ID if available.
-    *
-    *  @param sensor Initialized by this.  Will be cleared if date not found.
-    */
-   void getSensorId( std::string& sensor ) const;
-   
-private:
-
-   /**
-    * @brief Gets the xml block as a string from stream.
-    * @param str Input stream.
-    * @param xmpApp1XmlBlock String initialized by this.
-    * @return true on success, false on error.
-    */
-   bool getXmpApp1XmlBlock( std::ifstream& str,
-                            std::string& xmpApp1XmlBlock ) const;
-
-   /**
-    * @brief Gets path from doc and initializes string.
-    * @param path Xml path to look for.
-    * @param xdoc Xml doc to look in.
-    * @param s String to initialize.
-    * @return true on success and false if path is not found or if there
-    * are more than one of path.
-    */
-   bool getPath( const ossimString& path,
-                 const ossimXmlDocument& xdoc,
-                 ossimString& s ) const;
-
-   ossimFilename  m_file;
-   std::string    m_xmpApp1XmlBlock;
-};
-
-#endif /* End of "#ifndef ossimXmpInfo_HEADER" */
diff --git a/include/ossim/util/ossimBatchTest.h b/include/ossim/util/ossimBatchTest.h
deleted file mode 100644
index 3dbefa8..0000000
--- a/include/ossim/util/ossimBatchTest.h
+++ /dev/null
@@ -1,150 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  David Burken, Oscar Kramer
-//
-// Description: Test code application utility class.
-//
-//----------------------------------------------------------------------------
-// $Id$
-
-#ifndef ossimBatchTest_HEADER
-#define ossimBatchTest_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimReferenced.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimFilename.h>
-#include <vector>
-#include <fstream>
-
-// Forward class declarations:
-class ossimArgumentParser;
-class ossimDpt;
-class ossimString;
-class ossimGpt;
-class ossimImageFileWriter;
-class ossimImageGeometry;
-class ossimIrect;
-class ossimKeywordlist;
-class ossimTilingRect;
-
-class OSSIM_DLL ossimBatchTest : public ossimReferenced
-{
-public:
-   enum TEST_STATUS
-   {
-      TEST_TBD      = 0x00, // initial state: no test yet attempted
-      TEST_PASSED   = 0x01,
-      TEST_FAILED   = 0x02,
-      TEST_ERROR    = 0x04,
-      TEST_DISABLED = 0x08
-   };
-
-   //! This constructor only initializes data members to null/defaults
-   ossimBatchTest();
-   
-   //! Initializes the test session given the command line.
-   bool initialize(ossimArgumentParser& ap);
-
-   //! Performs the actual test with the config filename previously set in initialize() or
-   //! processConfigList() when config is a list of subordinate test config files.
-   //! @return The overall bit-wise status of all tests (see TEST_STATUS enum for bit definitions).
-   ossim_uint8 execute();
-
-private:
-   //! Writes template test config file, either exhaustive long form for flexibility, or simple
-   //! short-form for easier test creation.
-   void writeTemplate(const ossimFilename& templateFile, bool long_form);
-   
-   //! Fetches string from OS for naming and tagging the log file.
-   void getDateString(ossimString& date);
-   
-   //! Establishes name of output log file.
-   void getLogFilename(ossimFilename& logFile);
-
-   //! When the config file consists of a list of subordinate test config files, this method manages
-   //! processing multiple configs.
-   //! @return The overall bit-wise status of all configs (see TEST_STATUS enum for bit definitions).
-   ossim_uint8 processConfigList(const ossimKeywordlist& kwl);
-
-   //! Within a single config file can be multiple tests, distinguished by the "test*." prefix. This
-   //! method manages the execution of a single test.
-   //! @return The overall bit-wise status of test (see TEST_STATUS enum for bit definitions).
-   ossim_uint8 processTest(const ossimString& prefix, const ossimKeywordlist& kwl);
-
-   //! Runs a single command within a test.
-   //! @return The bit-wise status of command (see TEST_STATUS enum for bit definitions).
-   ossim_uint8 processCommands(const ossimString& prefix,
-                               const ossimKeywordlist& kwl,
-                               const ossimString& testName,
-                               bool logTime,
-                               const ossimFilename& tempFile=ossimFilename(""));
-
-   //! Modifies the config's KWL to explicitly declare implied keywords.
-   void preprocessKwl(const std::vector<std::string>& testList,
-                      const std::string& testCommand,
-                      ossimKeywordlist& kwl);
-
-   // Turns everything off.
-   void disableAllKwl(ossimKeywordlist& kwl);
-
-   //! Default preprocessing step makes expected and output results directories. Returns 
-   //! @return TRUE if successful.
-   bool makeDefaultResultsDir();
-
-   //! Default clean step deletes all files in out and exp dirs.
-   //! @return TRUE if successful.
-   bool doDefaultClean();
-
-   /**
-    * @brief Gets the temp file name.
-    *
-    * This will either be from the config file lookup of "temp_file" or derived under
-    * $(OSSIM_BATCH_TEST_RESULTS)/tmp if the lookup fails.  Note that this will create
-    * the $(OSSIM_BATCH_TEST_RESULTS)/tmp directory if needed.
-    *
-    * @param prefix Like "test1."
-    * @param kwl Keyword list to look for temp_file in.
-    * @param tempFile Initialized by this.
-    *
-    * @return true on success.  False if derived temp file directory could
-    * not be created.
-    */
-   bool getTempFileName( const ossimString& prefix,
-                         const ossimKeywordlist& kwl,
-                         ossimFilename& tempFile ) const;
-
-   /**
-    * @brief Gets the default temp directory $(OSSIM_BATCH_TEST_RESULTS)/tmp.
-    * @param tempDir Initialized by this.
-    *
-    * @return true on success, false on error.
-    */
-   bool getDefaultTempFileDir( ossimFilename& tempDir ) const;
-
-   /** @brief Initializes arg parser and outputs usage. */
-   void usage(ossimArgumentParser& ap);
-
-   /**
-    * @brief Converts string slashes to either forward or backward taking
-    * into account that windows commands with forward slashes in them.
-    * @param s String to convert.
-    */
-   std::string convertToNative( const char* lookup ) const;
-
-   std::vector<std::string> m_acceptTestList;
-   std::vector<std::string> m_cleanTestList;
-   std::vector<std::string> m_preprocessTestList;
-   std::vector<std::string> m_runTestList;
-
-   bool          m_allIsDisabled;
-   bool          m_templateModeActive;
-   ossimFilename m_configFileName;
-   ossimFilename m_outDir;
-   ossimFilename m_expDir;
-   std::ofstream m_logStr;
-};
-
-#endif /* #ifndef ossimBatchTest_HEADER */
diff --git a/include/ossim/util/ossimChipperUtil.h b/include/ossim/util/ossimChipperUtil.h
deleted file mode 100644
index c36e994..0000000
--- a/include/ossim/util/ossimChipperUtil.h
+++ /dev/null
@@ -1,569 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossimChipperUtil.h
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-// 
-// Utility class to for chipping out images. , orthorectifying imagery with an added slant
-// toward doing digital elevation model(DEM) operations.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimChipperUtil.h 22257 2013-05-01 19:21:35Z dburken $
-
-#ifndef ossimChipperUtil_HEADER
-#define ossimChipperUtil_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimReferenced.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/imaging/ossimSingleImageChain.h>
-#include <ossim/projection/ossimMapProjection.h>
-
-#include <map>
-#include <vector>
-
-// Forward class declarations:
-class ossimArgumentParser;
-class ossimDpt;
-class ossimFilename;
-class ossimGpt;
-class ossimImageFileWriter;
-class ossimImageGeometry;
-class ossimImageViewAffineTransform;
-class ossimIrect;
-class ossimKeywordlist;
-
-/**
- * @brief ossimChipperUtil class.
- *
- * This is a utility class to orthorectify imagery with an added slant toward
- * doing digital elevation model(DEM) operations.
- *
- * See the ossim-dem application for a code usage example.
- *
- * @note Almost all methods use throw for stack unwinding.  This is not in
- * method declarations to alleviate build errors on windows.  Sorry...
- *
- * @note "bumpshade" and "hillshade" intermixed throughout.  The class to do
- * a hillshade is the ossimBumpShadeTileSource.
- */
-class OSSIM_DLL ossimChipperUtil : public ossimReferenced
-{
-public:
-
-   /** emumerated operations */
-   enum ossimChipperOperation
-   {
-      OSSIM_CHIPPER_OP_UNKNOWN      = 0,
-      OSSIM_CHIPPER_OP_HILL_SHADE   = 1,
-      OSSIM_CHIPPER_OP_COLOR_RELIEF = 2,
-      OSSIM_CHIPPER_OP_ORTHO        = 3,
-      OSSIM_CHIPPER_OP_2CMV         = 4, // two color multiview
-      OSSIM_CHIPPER_OP_CHIP         = 5  // image space
-   };
-
-   /** emumerated output projections */
-   enum ossimChipperOutputProjection
-   {
-      OSSIM_CHIPPER_PROJ_UNKNOWN    = 0,
-      OSSIM_CHIPPER_PROJ_GEO        = 1,
-      OSSIM_CHIPPER_PROJ_GEO_SCALED = 2,
-      OSSIM_CHIPPER_PROJ_INPUT      = 3,
-      OSSIM_CHIPPER_PROJ_UTM        = 4
-   };
-
-   /** default constructor */
-   ossimChipperUtil();
-
-   /** virtual destructor */
-   virtual ~ossimChipperUtil();
-
-   /**
-    * @brief Initial method to be ran prior to execute.
-    * @param ap Arg parser to initialize from.
-    * @note Throws ossimException on error.
-    * @note A throw with an error message of "usage" is used to get out when
-    * a usage is printed.
-    */
-   bool initialize(ossimArgumentParser& ap);
-
-   /**
-    * @brief Initial method to be ran prior to execute.
-    *
-    * This was separated out from initialize(ossimArgumentParser& ap) because
-    * you could make an initialize(const ossimKeywordlist& kwl) and then call
-    * initialize().
-    * 
-    * @note Throws ossimException on error.
-    */
-   void initialize();
-
-   /**
-    * @brief execute method.  Performs the actual product write.
-    * @note Throws ossimException on error.
-    */
-   void execute();
-
-   /**
-    * @brief Gets the output file name.
-    * @param f Initialized by this with the filename.
-    */
-   void getOutputFilename(ossimFilename& f) const;
-
-private:
-
-   /**
-    * @brief Initializes the output projection and propagates to image chains.
-    * @note Throws ossimException on error.
-    */
-   void initializeOutputProjection();
-   
-   /** @brief Create chains for all dems. */
-   void addDemSources();
-   
-   /** @brief Method to create a chain and add to dem layers from file. */
-   void addDemSource(const ossimFilename& file);
-
-   /**
-    * @brief  Method to create a chain and add to dem layers from a
-    * ossimSrcRecord.
-    */
-   void addDemSource(const ossimSrcRecord& rec);
-
-   /** @brief Creates chains for all images. */
-   void addImgSources();
-   
-   /** @brief Method to create a chain and add to img layers from file. */
-   void addImgSource(const ossimFilename& file);
-
-   /**
-    * @brief  Method to create a chain and add to img layers from a
-    * ossimSrcRecord.
-    */
-   void addImgSource(const ossimSrcRecord& rec);
-
-   /**
-    * @brief Creates a ossimSingleImageChain from file.
-    * @param file File to open.
-    * @return Ref pointer to ossimSingleImageChain.
-    * @note Throws ossimException on error.
-    */
-   ossimRefPtr<ossimSingleImageChain> createChain(const ossimFilename& file) const;
-
-   /**
-    * @brief Creates a ossimSingleImageChain from ossimSrcRecord.
-    * @param src Record.
-    * @return Ref pointer to ossimSingleImageChain.
-    * @note Throws ossimException on error.
-    */
-   ossimRefPtr<ossimSingleImageChain> createChain(const ossimSrcRecord& rec) const;
-
-   /**
-    * @brief Creates the output or view projection.
-    * @note All chains should be constructed prior to calling this.
-    */
-   void createOutputProjection();
-   
-   /**
-    * @brief Sets the single image chain for identity operations view to
-    * a ossimImageViewAffineTransform.  This will have a rotation if
-    * up is up is selected.  Also set m_outputProjection to the input's
-    * for area of interest.
-    */
-   void createIdentityProjection();
-
-   /**
-    * @brief Gets the first input projection.
-    *
-    * This gets the output projection of the first dem layer if present;
-    * if not, the first image layer.
-    * 
-    * @return ref ptr to projection, could be null.
-    */
-   ossimRefPtr<ossimMapProjection> getFirstInputProjection();
-
-   /**
-    * @brief Convenience method to get geographic projection.
-    * @return new ossimEquDistCylProjection.
-    */
-   ossimRefPtr<ossimMapProjection> getNewGeoProjection();
-
-   /**
-    * @brief Convenience method to get geographic projection.
-    *
-    * This method sets the origin to the center of the scene bounding rect
-    * of all layers.
-    * @return new ossimEquDistCylProjection.
-    */
-   ossimRefPtr<ossimMapProjection> getNewGeoScaledProjection();
-
-    /**
-    * @brief Convenience method to get a projection from an srs code.
-    * @return new ossimMapProjection.
-    */  
-   ossimRefPtr<ossimMapProjection> getNewProjectionFromSrsCode(const ossimString& code);
-
-   /**
-    * @brief Convenience method to get a utm projection.
-    * @return new ossimUtmProjection.
-    */     
-   ossimRefPtr<ossimMapProjection> getNewUtmProjection();
-
-   /**
-    * @brief Convenience method to get a pointer to the  output map
-    * projection.
-    *
-    * Callers should check for valid() as the pointer could be
-    * 0 if not initialized.
-    * 
-    * @returns The ossimMapProjection* from the m_outputGeometry as a ref
-    * pointer.
-    */
-   ossimRefPtr<ossimMapProjection> getMapProjection();
-
-   /**
-    * @brief Sets the projection tie point to the scene bounding rect corner.
-    * @note Throws ossimException on error.
-    */
-   void intiailizeProjectionTiePoint();
-
-   /**
-    * @brief Initializes the projection gsd.
-    *
-    * This loops through all chains to find the best resolution gsd.
-    *
-    * @note Throws ossimException on error.
-    */
-   void initializeProjectionGsd();   
-
-   /**
-    * @brief Initializes the image view transform(IVT) scale.
-    *
-    * Chip mode only. Sets IVT scale to output / input.
-    * 
-    * @note Throws ossimException on error.
-    */
-   void initializeIvtScale();   
-
-   /**
-    * @brief Loops through all layers to get the upper left tie point.
-    * @param tie Point to initialize.
-    */
-   void getTiePoint(ossimGpt& tie);
-
-   /**
-    * @brief Gets the upper left tie point from a chain.
-    * @param chain The chain to get tie point from.
-    * @param tie Point to initialize.
-    * @note Throws ossimException on error.
-    */
-   void getTiePoint(ossimSingleImageChain* chain, ossimGpt& tie);
-
-   /**
-    * @brief Loops through all layers to get the upper left tie point.
-    * @param tie Point to initialize.
-    */
-   void getTiePoint(ossimDpt& tie);
-
-   /**
-    * @brief Gets the upper left tie point from a chain.
-    * @param chain The chain to get tie point from.
-    * @param tie Point to initialize.
-    * @note Throws ossimException on error.
-    */
-   void getTiePoint(ossimSingleImageChain* chain, ossimDpt& tie);
-
-   /**
-    * @brief Loops through all layers to get the best gsd.
-    * @param gsd Point to initialize.
-    */
-   void getMetersPerPixel(ossimDpt& gsd);
-
-   /**
-    * @brief Gets the gsd from a chain.
-    * @param chain The chain to get gsd from.
-    * @param gsd Point to initialize.
-    * @note Throws ossimException on error.
-    */   
-   void getMetersPerPixel(ossimSingleImageChain* chain, ossimDpt& gsd);
-
-   /**
-    * @brief Gets value of key "central_meridan" if set, nan if not.
-    *
-    * @return Value as a double or nan if keyord is not set.
-    * 
-    * @note Throws ossimException on range error.
-    */
-   ossim_float64 getCentralMeridian() const;
-
-   /**
-    * @brief Gets value of key "origin_latitude" if set, nan if not.
-    *
-    * @return Value as a double or nan if keyord is not set.
-    * 
-    * @note Throws ossimException on range error.
-    */
-   ossim_float64 getOriginLatitude() const;
-
-   /**
-    * @brief Loops through all layers to get the scene center ground point.
-    * @param gpt Point to initialize.
-    * @note Throws ossimException on error.
-    */
-   void getSceneCenter(ossimGpt& gpt);
-
-   /**
-    * @brief Gets the scene center from a chain.
-    * @param chain The chain to get scene center from.
-    * @param gpt Point to initialize.
-    * @note Throws ossimException on error.
-    */   
-   void getSceneCenter(ossimSingleImageChain* chain, ossimGpt& gpt);
-
-   /**
-    * @brief Creates a new writer.
-    *
-    * This will use the writer option (-w or --writer), if present; else,
-    * it will be derived from the output file extention.
-    *
-    * This will also set any writer properties passed in.
-    *
-    * @return new ossimImageFileWriter.
-    * @note Throws ossimException on error.
-    */
-   ossimRefPtr<ossimImageFileWriter> createNewWriter() const;
-
-   /**
-    * @brief loops through all chains and sets the output projection.
-    * @note Throws ossimException on error.
-    */
-   void propagateOutputProjectionToChains();
-
-   /**
-    * @brief Combines all layers into an ossimImageMosaic.
-    * @return ossimRefPtr with pointer to ossimImageSource.  Can be null.
-    */
-   ossimRefPtr<ossimImageSource> combineLayers(
-      std::vector< ossimRefPtr<ossimSingleImageChain> >& layers) const;
-
-   /** @brief Combines dems(m_demLayer) and images(m_imgLayer). */
-   ossimRefPtr<ossimImageSource> combineLayers();
-
-   /** @brief Combines two images into a two color multi view chain.
-    * @return ossimRefPtr with pointer to ossimImageSource.  Can be null.
-    */
-   ossimRefPtr<ossimImageSource> combine2CmvLayers();
-
-   /**
-    * @brief Creates ossimIndexToRgbLutFilter and connects to source.
-    * @param Source to connect to.
-    * @return End of chain with lut filter on it.
-    * @note Throws ossimException on error.
-    */
-   ossimRefPtr<ossimImageSource> addIndexToRgbLutFilter(
-      ossimRefPtr<ossimImageSource> &source) const;
-
-   /**
-    * @brief Creates ossimScalarRemapper and connects to source.
-    * @param Source to connect to.
-    * @param scalar Scalar type.
-    * @return End of chain with remapper on it.
-    * @note Throws ossimException on error.
-    */
-   ossimRefPtr<ossimImageSource> addScalarRemapper(
-      ossimRefPtr<ossimImageSource> &source,
-      ossimScalarType scalar) const;
-
-   /**
-    * @brief Set up ossimHistogramRemapper for a chain.
-    * @param chain Chain to set up.
-    * @return true on success, false on error.
-    */
-   bool setupChainHistogram( ossimRefPtr<ossimSingleImageChain>& chain) const;
-
-   /**
-    * @brief Sets entry for a chain.
-    * @param chain Chain to set up.
-    * @param entryIndex Zero based index.
-    * @return true on success, false on error.
-    */
-   bool setChainEntry( ossimRefPtr<ossimSingleImageChain>& chain,
-                       ossim_uint32 entryIndex ) const;
-
-   /**
-    * @brief Initializes "rect" with the output area of interest.
-    *
-    * Initialization will either come from user defined cut options or the
-    * source bounding rect with user options taking precidence.
-    *
-    * @param source Should be the end of the processing chain.
-    * @param rect Rectangle to initialize.  This is in output (view) space.
-    *
-    * @note Throws ossimException on error.
-    */
-   void getAreaOfInterest( ossimImageSource* source, ossimIrect& rect ) const;
-
-   /**
-    * @brief Method to calculate and initialize scale and area of interest
-    * for making a thumbnail.
-    *
-    * Sets the scale of the output projection so that the adjusted rectangle
-    * meets the cut rect and demension requirements set in options.
-    *
-    * @param originalRect Original scene area of interest.
-    * @param adjustedRect New rect for thumbnail.
-    *
-    * @note Throws ossimException on error.
-    */
-   void initializeThumbnailProjection(const ossimIrect& originalRect,
-                                      ossimIrect& adjustedRect);
-
-   /** @return true if BANDS keyword is set; false, if not. */
-   bool hasBandSelection() const;
-
-   /**
-    * @brief Gets the band list if BANDS keyword is set.
-    *
-    * NOTE: BANDS keyword values are ONE based.  bandList values are
-    * ZERO based.
-    *
-    * @param bandList List initialized by this.
-    */
-   void getBandList( std::vector<ossim_uint32>& bandList ) const;
-
-   /** @return true if color table (lut) is set; false, if not. */
-   bool hasLutFile() const;
-
-   /**
-    * @return true if any bump share options have been set by user; false,
-    * if not.
-    */
-   bool hasBumpShadeArg() const;
-
-   /** @return true if thumbnail option is set; false, if not. */
-   bool hasThumbnailResolution() const;
-
-   bool hasHistogramOperation() const;
-
-   /** @return true if file extension is "hgt", "dem" or contains "dtN" (dted). */
-   bool isDemFile(const ossimFilename& file) const;
-
-   /** @return true if file extension is "src" */
-   bool isSrcFile(const ossimFilename& file) const;
-
-   /** @brief Initializes m_srcKwl if option was set. */
-   void initializeSrcKwl();
-
-   /**
-    * @return The number of DEM_KW and IMG_KW found in the m_kwl and m_srcKwl
-    * keyword list.
-    */
-   ossim_uint32 getNumberOfInputs() const;
-
-   /**
-    * @brief Gets the emumerated output projection type.
-    *
-    * This looks in m_kwl for ossimKeywordNames::PROJECTION_KW.
-    * @return The enumerated output projection type.
-    * @note This does not cover SRS keyword which could be any type of projection.
-    */
-   ossimChipperOutputProjection getOutputProjectionType() const;
-
-   /**
-    * @brief Returns the scalar type from OUTPUT_RADIOMETRY_KW keyword if
-    * present. Deprecated SCALE_2_8_BIT_KW is also checked.
-    *
-    * @return ossimScalarType Note this can be OSSIM_SCALAR_UNKNOWN if the
-    * keywords are not present.
-    */
-   ossimScalarType getOutputScalarType() const;
-
-   /** @return true if scale to eight bit option is set; false, if not. */
-   bool scaleToEightBit() const;
-
-   /** @return true if snap tie to origin option is set; false, if not. */
-   bool snapTieToOrigin() const;
-
-   /**
-    * @brief Gets rotation.
-    *
-    * @return Rotation in decimal degrees if ROTATION_KW option is set;
-    * ossim::nan, if not.
-    *
-    * @note Throws ossimException on range error.
-    */
-   ossim_float64 getRotation() const;
-
-   /** @return true if ROTATION_KW option is set; false, if not. */
-   bool hasRotation() const;
-
-   /** @return true if UP_IS_UP_KW option is set; false, if not. */
-   bool upIsUp() const;
-
-   /** @return true if NORTH_UP_KW option is set; false, if not. */
-   bool northUp() const;
-
-   /** @return true if operation is "chip" or identity; false, if not. */
-   bool isIdentity() const;
-
-   /** @return true if key is set to true; false, if not. */
-   bool keyIsTrue( const std::string& key ) const;
-
-   /**
-    * @return The entry number if set.  Zero if ossimKeywordNames::ENTRY_KW not
-    * found.
-    */
-   ossim_uint32 getEntryNumber() const;
-
-   /**
-    * @return True if any input has a sensor model input, false if all input
-    * projections are map projections.
-    */
-   bool hasSensorModelInput() const;
-
-   /**
-    * @brief Adds application arguments to the argument parser.
-    * @param ap Parser to add to.
-    */
-   void addArguments(ossimArgumentParser& ap);
-   
-   /** @brief Initializes arg parser and outputs usage. */
-   void usage(ossimArgumentParser& ap);
-
-   /** Enumerated operation to perform. */
-   ossimChipperOperation m_operation;
-   
-   /** Hold all options passed into intialize except writer props. */
-   ossimRefPtr<ossimKeywordlist> m_kwl;
-
-   /** Hold contents of src file if --src is used. */
-   ossimRefPtr<ossimKeywordlist> m_srcKwl;
-
-   /**
-    * The image geometry.  In chip mode this will be from the input image. So
-    * this may or may not have a map projection. In any other mode it
-    * will the view or output geometry which will be a map projection.
-    */
-   ossimRefPtr<ossimImageGeometry> m_geom;
-
-   /**
-    * Image view transform(IVT). Only set/used in "chip"(identity) operation as
-    * the IVT for the resampler(ossimImageRenderer).
-    */
-   ossimRefPtr<ossimImageViewAffineTransform> m_ivt;
-
-   /**  Array of dem chains. */
-   std::vector< ossimRefPtr<ossimSingleImageChain> > m_demLayer;
-
-   /**  Array of image source chains. */
-   std::vector< ossimRefPtr<ossimSingleImageChain> > m_imgLayer;
-};
-
-#endif /* #ifndef ossimChipperUtil_HEADER */
diff --git a/include/ossim/util/ossimFileWalker.h b/include/ossim/util/ossimFileWalker.h
deleted file mode 100644
index 4621a28..0000000
--- a/include/ossim/util/ossimFileWalker.h
+++ /dev/null
@@ -1,227 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossimFileWalker.h
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:  See description for class below.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#ifndef ossimFileWalker_HEADER
-#define ossimFileWalker_HEADER 1
-
-#include <ossim/base/ossimCallback1.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/parallel/ossimJob.h>
-#include <ossim/parallel/ossimJobMultiThreadQueue.h>
-#include <OpenThreads/Mutex>
-#include <string>
-#include <vector>
-
-class ossimFilename;
-
-/**
- * @class ossimFileWalker
- *
- * Utility class to walk through directories and get a list of files to
- * process. For each file found the callback is excecuted.  Mechanisms are in
- * place to filter files and to call back  to a processFile method.  This
- * requires a callback method to process files from the user.  The callback is
- * set via registerProcessFileCallback method.  Internally the processFile
- * calls are placed in a job queue.
- *
- * Typical usage (snip from ossimTiledElevationDatabase):
- *
- * ossimFileWalker* fw = new ossimFileWalker();
- * fw->initializeDefaultFilterList();
- * ossimCallback1<const ossimFilename&, bool&, bool>* cb =
- * new ProcessFileCB(this, &ossimTiledElevationDatabase::processFile);
- * fw->registerProcessFileCallback(cb);
- * fw->walk(f);
- */
-class OSSIM_DLL ossimFileWalker
-{
-public:
-   
-   /** default constructor */
-   ossimFileWalker();
-
-   /** destructor */
-   ~ossimFileWalker();
-
-   /**
-    * @brief Takes an array of files.
-    *
-    * For each file in array:  If files is a directory, it will walk it. Files
-    * found in walk or files(not directories) in the array will be processed
-    * via a job queue.
-    *
-    * Files are filter prior to the callback execution.  The filtering is to
-    * eliminate sending unwanted files to the callback.  There is a default
-    * filter table.  This can be edited by calling the non-const
-    * getFilteredExtensions method.
-    *
-    * Each callback is placed in a threaded job queue.  So users should ensure
-    * their callback is thread safe.
-    */
-   void walk(const std::vector<ossimFilename>& files);
-
-   /**
-    * @brief This will walk "root" and execute a callback for each file found.
-    *
-    * Files are filter prior to the callback execution.  The filtering is to
-    * eliminate sending unwanted files to the callback.  There is a default
-    * filter table.  This can be edited by calling the non-const
-    * getFilteredExtensions method.
-    *
-    * Each callback is placed in a threaded job queue.  So users should ensure
-    * their callback is thread safe.
-    */
-   void walk(const ossimFilename& root);
-
-   // void walk(const ossimFilename& root);
-
-   /**
-    * @brief Registers callback method to process a file.
-    *
-    * @param cb Callback to register.
-    *
-    * @see m_processFileCallBackPtr for documentation on template interface.
-    */   
-   void registerProcessFileCallback(ossimCallback1<const ossimFilename&>* cb);
-
-   /** @return The list of filtered out files. */
-   const std::vector<std::string>& getFilteredExtensions() const;
-
-   /**
-    * @brief Non const method to allow access for
-    * adding or deleting extensions from the list.
-    *
-    * The list is used by the private isFiltered method to avoid trying to
-    * process unwanted files.
-    */
-   std::vector<std::string>& getFilteredExtensions();
-
-   /**
-    * @brief Initializes the filter list with a default set of filtered out
-    * file names.
-    */
-   void initializeDefaultFilterList();
-
-   /**
-    * @brief Sets recurse flag.
-    *
-    * If set to true this stops recursing of the
-    * current directory.  Defaulted to true in the constructor.
-    * Typically used to indicate the directory being processed holds a
-    * directory based image, e.g. RPF data.
-    *
-    * @param flag True to recurse, false to stop recursion of current
-    * directory.
-    */
-   void setRecurseFlag(bool flag);
-
-   /**
-    * @brief Sets waitOnDir flag.
-    *
-    * If set to true each directory is processed in entirety before sub
-    * directories are recursed.  This allows callers of setRecurseFlag
-    * to disable directory walking.  If your code is calling setRecurseFlag
-    * this flag should be set to true.
-    *
-    * @param flag true to wait, false to not wait. Defaulted to false in the constructor. 
-    */   
-   void setWaitOnDirFlag(bool flag);
-
-   /**
-    * @brief If set to true this stops files walking (aborts).
-    * @param flag True to abort current "walk".
-    */
-   void setAbortFlag(bool flag);
-
-   /** @brief Sets the max number of threads(jobs) to run at one time. */
-   void setNumberOfThreads(ossim_uint32 nThreads);
-   
-private:
-
-   /** @brief Private ossimJob class. */
-   class ossimFileWalkerJob : public ossimJob
-   {
-   public:
-      /**
-       * @brief Constructor that takes callback and file.
-       * @param cb Callback to method to process a file.
-       * @param file The file to process.
-       */
-      ossimFileWalkerJob(ossimCallback1<const ossimFilename&>* cb,
-                         const ossimFilename& file);
-      /**
-       * @brief Defines pure virtual ossimJob::start.
-       *
-       * This executes the call to m_processFileCallBackPtr.
-       */
-      virtual void start();
-      
-   private:
-      ossimCallback1<const ossimFilename&>* m_processFileCallBackPtr;
-      ossimFilename                         m_file;
-      
-   }; // End: class ossimFileWalkerJob
-
-   /** @brief Private ossimJobCallback class. */
-   class ossimFileWalkerJobCallback : public ossimJobCallback
-   {
-   public:
-      ossimFileWalkerJobCallback();
-      virtual void started(ossimJob* job);
-      virtual void finished(ossimJob* job);
-      virtual void canceled(ossimJob* job);
-   };
-
-   /**
-    * @brief Processes files in directory.
-    *
-    * If a file in the directory is itself a directory this will do a recursive
-    * call to itself.  Individual files are processed in a job queue...
-    */
-   void walkDir(const ossimFilename& dir);
-   
-   /**
-    * @brief Convenience method for file walker code to check file to see is
-    * it should be processed.
-    *
-    * @param f File to check.
-    * 
-    * @return true f is stagagble, false if not.
-    */
-   bool isFiltered(const ossimFilename& f) const;
-   
-   /**
-    * @brief isDotFile method.
-    * @param f File/directory to check.
-    * @return true if file is a dot file.
-    */   
-   bool isDotFile(const ossimFilename& f) const;
-   
-   /**
-    * @brief Callback to method to process a file.
-    *
-    * @param const ossimFilename& First parameter(argument) file to process.
-    */
-   ossimCallback1<const ossimFilename&>* m_processFileCallBackPtr;
-   ossimRefPtr<ossimJobMultiThreadQueue> m_jobQueue;
-   std::vector<std::string>              m_filteredExtensions;
-   bool                                  m_recurseFlag;
-   bool                                  m_waitOnDirFlag;
-   bool                                  m_abortFlag;
-   OpenThreads::Mutex                    m_mutex;
-};
-
-#endif /* #ifndef ossimFileWalker_HEADER */
diff --git a/include/ossim/util/ossimImageUtil.h b/include/ossim/util/ossimImageUtil.h
deleted file mode 100644
index 43b6be2..0000000
--- a/include/ossim/util/ossimImageUtil.h
+++ /dev/null
@@ -1,399 +0,0 @@
-//----------------------------------------------------------------------------
-// File: ossimImageUtil.h
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: ossimImageUtil
-//
-// See class descriptions below for more.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#ifndef ossimImageUtil_HEADER
-#define ossimImageUtil_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimPropertyInterface.h>
-#include <ossim/base/ossimReferenced.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimOverviewBuilderBase.h>
-#include <OpenThreads/Mutex>
-#include <ostream>
-
-class ossimArgumentParser;
-class ossimFileWalker;
-class ossimGpt;
-
-/**
- * @brief ossimImageUtil class.
- *
- * Utility class for processing image recursively.  This is for doing things like:
- * 
- * building overview, histograms, compute min/max, extract vertices.
- */
-class OSSIM_DLL ossimImageUtil : public ossimReferenced
-{
-public:
-
-   /** default constructor */
-   ossimImageUtil();
-
-   /** virtual destructor */
-   virtual ~ossimImageUtil();
-
-   /**
-    * @brief Adds application arguments to the argument parser.
-    * @param ap Parser to add to.
-    */
-   void addArguments(ossimArgumentParser& ap);
-
-   /**
-    * @brief Initial method.
-    *
-    * Typically called from application prior to execute.  This parses
-    * all options and put in keyword list m_kwl.
-    * 
-    * @param ap Arg parser to initialize from.
-    *
-    * @return true, indicating process should continue with execute.
-    */
-   bool initialize(ossimArgumentParser& ap);
-
-   /**
-    * @brief Execute method.
-    *
-    * This launches file walking mechanism.
-    *
-    * @return int, 0 = good, non-zero something happened.  Because this can
-    * process multiple files a non-zero return may indicate just one file
-    * did not complete, e.g. building overviews.
-    * 
-    * @note Throws ossimException on error.
-    */
-   ossim_int32 execute();
-
-   /**
-    * @brief ProcessFile method.
-    *
-    * This method is linked to the ossimFileWalker::walk method via a callback
-    * mechanism.  It is called by the ossimFileWalk (caller).  In turn this
-    * class (callee) calls ossimFileWalker::setRecurseFlag and
-    * ossimFileWalker::setAbortFlag to control the waking process.
-    * 
-    * @param file to process.
-    */
-   void processFile(const ossimFilename& file);
-
-   /**
-    * @brief Sets create overviews flag keyword CREATE_OVERVIEWS_KW used by
-    * processFile method.
-    *
-    * @param flag If true overview will be created if image does not already
-    * have the required or if the REBUILD_OVERVIEWS_KW is set.
-    *
-    * @note Number of required overviews is controlled by the ossim preferences
-    * keyword overview_stop_dimension.
-    */
-   void setCreateOverviewsFlag( bool flag );
-
-   /** @return true if CREATE_OVERVIEWS_KW is found and set to true. */
-   bool createOverviews() const;
-   
-   /**
-    * @brief Sets the rebuild overview flag keyword REBUILD_OVERVIEWS_KW used by
-    * processFile method.
-    *
-    * @param flag If true forces a rebuild of overviews even if image has
-    * required number of reduced resolution data sets.
-    *
-    * @note Number of required overviews is controlled by the ossim preferences
-    * keyword overview_stop_dimension.
-    */
-   void setRebuildOverviewsFlag( bool flag );
-
-   /** @return true if REBUILD_OVERVIEWS_KW is found and set to true. */
-   bool rebuildOverviews() const;
-
-   /**
-    * @brief Sets the rebuild histogram flag keyword REBUILD_HISTOGRAM_KW used by
-    * processFile method.
-    *
-    * @param flag If true forces a rebuild of histogram even if image has one already.
-    */
-   void setRebuildHistogramFlag( bool flag );
-
-   /** @return true if REBUILD_HISTOGRAM_KW is found and set to true. */
-   bool rebuildHistogram() const;
-
-   /**
-    * @brief Sets key OVERVIEW_TYPE_KW.
-    *
-    * Available types depens on plugins.  Know types:
-    * ossim_tiff_box ( defualt )
-    * ossim_tiff_nearest
-    * ossim_kakadu_nitf_j2k ( kakadu plugin )
-    * gdal_tiff_nearest	    ( gdal plugin )
-    * gdal_tiff_average	    ( gdal plugin )
-    * gdal_hfa_nearest      ( gdal plugin )	
-    * gdal_hfa_average      ( gdal plugin )	
-    * 
-    * @param type One of the above.
-    */
-   void setOverviewType( const std::string& type );
-   
-   /**
-    * @brief sets the overview stop dimension.
-    *
-    * The overview builder will decimate the image until both dimensions are
-    * at or below this dimension.
-    *
-    * @param dimension
-    *
-    * @note Recommend a power of 2 value, i.e. 8, 16, 32 and so on.
-    */
-   void setOverviewStopDimension( ossim_uint32 dimension );
-   void setOverviewStopDimension( const std::string& dimension );
-
-   /**
-    * @brief Sets the tile size.
-    *
-    * @param tileSize
-    *
-    * @note Must be a multiple of 16, i.e. 64, 128, 256 and so on.
-    */
-   void setTileSize( ossim_uint32 tileSize );
-
-   /**
-    * @return Overview stop dimension or 0 if OVERVIEW_STOP_DIM_KW is not
-    * found.
-    */
-   ossim_uint32 getOverviewStopDimension() const;
-
-   /**
-    * @brief Sets create histogram flag keyword CREATE_HISTOGRAM_KW used by
-    * processFile method.
-    *
-    * @param flag If true a full histogram will be created.
-    */
-   void setCreateHistogramFlag( bool flag );
-   
-   /** @return true if CREATE_HISTOGRAM_KW is found and set to true. */
-   bool createHistogram() const;
-
-   /**
-    * @brief Sets create histogram flag keyword CREATE_HISTOGRAM_FAST_KW used by
-    * processFile method.
-    *
-    * @param flag If true a histogram will be created in fast mode.
-    */
-   void setCreateHistogramFastFlag( bool flag );
-
-   /** @return true if CREATE_HISTOGRAM_FAST_KW is found and set to true. */
-   bool createHistogramFast() const;
-
-   /**
-    * @brief Sets create histogram "R0" flag keyword CREATE_HISTOGRAM_R0_KW used by
-    * processFile method.
-    *
-    * @param flag If true a histogram will be created from R0.
-    */
-   void setCreateHistogramR0Flag( bool flag );
-
-   /** @return true if CREATE_HISTOGRAM_R0_KW is found and set to true. */
-   bool createHistogramR0() const;
-
-   /** @return true if any of the histogram options are set. */
-   bool hasHistogramOption() const;
-
-   /** @return Histogram mode or OSSIM_HISTO_MODE_UNKNOWN if not set. */
-   ossimHistogramMode getHistogramMode() const;
-
-   /**
-    * @brief Sets scan for min/max flag keyword SCAN_MIN_MAX_KW used by
-    * processFile method.
-    *
-    * @param flag If true a file will be scanned for min/max and a file.omd
-    * will be written out.
-    */
-   void setScanForMinMax( bool flag );
-   
-   /** @return true if SCAN_MIN_MAX_KW is found and set to true. */
-   bool scanForMinMax() const;
-
-   /**
-    * @brief Sets scan for min/max/null flag keyword SCAN_MIN_MAX_KW used by
-    * processFile method.
-    *
-    * @param flag If true a file will be scanned for min/max/null and a file.omd
-    * will be written out.
-    */
-   void setScanForMinMaxNull( bool flag );
-
-   /** @return true if SCAN_MIN_MAX_NULL_KW is found and set to true. */
-   bool scanForMinMaxNull() const;
-
-   /**
-    * @brief Sets the writer property for compression quality.
-    *
-    * @param quality For TIFF JPEG takes values from 1
-    * to 100, where 100 is best.  For J2K plugin (if available),
-    * numerically_lossless, visually_lossless, lossy.
-    */
-   void setCompressionQuality( const std::string& quality );
-
-   /**
-    * @brief Sets the compression type to use when building overviews.
-    *  
-    * @param compression_type Current supported types:
-    * - deflate 
-    * - jpeg
-    * - lzw
-    * - none
-    * - packbits
-    */
-   void setCompressionType( const std::string& type );
-
-   /**
-    * @brief Sets the overview builder copy all flag.
-    * @param flag
-    */
-   void setCopyAllFlag( bool flag );
-
-   /**
-    * @return true if COPY_ALL_FLAG_KW key is found and value is true; else,
-    * false.
-    */
-   bool getCopyAllFlag() const;
-
-   /**
-    * @brief Sets the overview builder internal overviews flag.
-    * @param flag
-    */
-   void setInternalOverviewsFlag( bool flag );
-   
-   /**
-    * @return true if INTERNAL_OVERVIEWS_FLAG_KW key is found and value is true; else,
-    * false.
-    */
-   bool getInternalOverviewsFlag() const;
-   
-   /**
-    * @brief Sets the output directory.  Typically overviews and histograms
-    * are placed parallel to image file.  This overrides.
-    *  
-    * @param directory
-    */
-   void setOutputDirectory( const std::string& directory );
- 
-   /**
-    * @brief Sets the output file name flag OUTPUT_FILENAMES_KW.
-    *
-    * If set to true all files that we can successfully open will be output.
-    *  
-    * @param flag
-    */
-   void setOutputFileNamesFlag( bool flag );
-
-   /**
-    * @return true if OUTPUT_FILENAMES_KW key is found and value is true; else,
-    * false.
-    */
-   bool getOutputFileNamesFlag() const;
- 
-   /**
-    * @brief Set number of threads to use.
-    *
-    * This is only used in execute method if a directory is given to
-    * application to walk.
-    *
-    * @param threads Defaults to 1 if THREADS_KW is not found.
-    */
-   void setNumberOfThreads( ossim_uint32 threads );
-   void setNumberOfThreads( const std::string& threads );
-
-private:
-
-   void createOverview(ossimRefPtr<ossimImageHandler>& ih,
-                       bool& consumedHistogramOptions,
-                       bool& consumedCmmOptions);
-
-   void createOverview(ossimRefPtr<ossimImageHandler>& ih,
-                       ossimRefPtr<ossimOverviewBuilderBase>& ob,
-                       ossim_uint32 entry,
-                       bool useEntryIndex,
-                       bool& consumedHistogramOptions);
-
-   /** @return true if entry has required overviews. */
-   bool hasRequiredOverview( ossimRefPtr<ossimImageHandler>& ih,
-                             ossimRefPtr<ossimOverviewBuilderBase>& ob );
-
-   void createHistogram(ossimRefPtr<ossimImageHandler>& ih);
-
-   void createHistogram(ossimRefPtr<ossimImageHandler>& ih,
-                       ossim_uint32 entry,
-                       bool useEntryIndex);
-
-   
-   /** @brief Initializes arg parser and outputs usage. */
-   void usage(ossimArgumentParser& ap);
-
-   void outputOverviewWriterTypes() const;
-
-   /**
-    * @return true if file is a directory based image and the stager should go
-    * on to next directory; false if stager should continue with directory.
-    */
-   bool isDirectoryBasedImage(const ossimImageHandler* ih) const;
-
-
-   /**
-    * @brief Initializes type from OVERVIEW_TYPE_KW or sets to default
-    * ossim_tiff_box if not found.
-    */
-   void getOverviewType(std::string& type) const;
-
-   /** @brief set reader or writer properties based on cast of pi. */
-   void setProps(ossimPropertyInterface* pi) const;
-   
-   /**
-    * @return Threads to use.  Defaults to 1 if THREADS_KW is not found.
-    */
-   ossim_uint32 getNumberOfThreads() const;
-
-   /** @return the next writer prop index. */
-   ossim_uint32 getNextWriterPropIndex() const;
-
-   /** @return the next reader prop index. */   
-   ossim_uint32 getNextReaderPropIndex() const;
-
-   /**
-    * @brief Adds option to m_kwl with mutex lock.
-    * @param key
-    * @param value
-    */
-   void addOption( const std::string& key, ossim_uint32 value );
-   void addOption( const std::string& key, const std::string& value );
-
-   /**
-    * @brief Sets the m_errorStatus for return on execute.
-    */
-   void setErrorStatus( ossim_int32 status );
-
-   
-   /** Holds all options passed into intialize except writer props. */
-   ossimRefPtr<ossimKeywordlist> m_kwl;
-
-   ossimFileWalker*   m_fileWalker;
-   OpenThreads::Mutex m_mutex;
-
-   ossim_int32 m_errorStatus;
-};
-
-#endif /* #ifndef ossimImageUtil_HEADER */
diff --git a/include/ossim/util/ossimInfo.h b/include/ossim/util/ossimInfo.h
deleted file mode 100644
index 368b090..0000000
--- a/include/ossim/util/ossimInfo.h
+++ /dev/null
@@ -1,563 +0,0 @@
-//----------------------------------------------------------------------------
-// File: ossimInfo.h
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: ossimInfo class declaration
-//
-// See class doxygen descriptions below for more.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimInfo.h 22187 2013-03-07 20:29:00Z dburken $
-
-#ifndef ossimInfo_HEADER
-#define ossimInfo_HEADER 1
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimReferenced.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/imaging/ossimImageHandler.h>
-
-#include <ostream>
-
-class ossimArgumentParser;
-class ossimGpt;
-
-/**
- * @brief ossimInfo class.
- *
- * This is a utility class for getting information from the ossim library.
- * This includes information from an image, general library queries, like
- * loaded plugins, and just general stuff like height for point, conversions
- * and so on that are easily obtained through the library.
- */
-class OSSIM_DLL ossimInfo : public ossimReferenced
-{
-public:
-
-   /** default constructor */
-   ossimInfo();
-
-   /** virtual destructor */
-   virtual ~ossimInfo();
-
-   /**
-    * @brief Adds application arguments to the argument parser.
-    * @param ap Parser to add to.
-    */
-   void addArguments(ossimArgumentParser& ap);
-
-   /**
-    * @brief Initial method.
-    *
-    * Typically called from application prior to execute.  This parses
-    * all options and put in keyword list m_kwl.
-    * 
-    * @param ap Arg parser to initialize from.
-    *
-    * @return true, indicating process should continue with execute.
-    */
-   bool initialize(ossimArgumentParser& ap);
-
-   /**
-    * @brief execute method.
-    *
-    * Performs the actual dump of information.  This executes any options
-    * set including image operations, i.e. -i -p --dno and so on.
-    * 
-    * @note Throws ossimException on error.
-    */
-   void execute();
-
-   /**
-    * @brief handles image options.
-    *
-    * Handles image type info opions,  i.e. -i -p --dno and so on.
-    *
-    * @return Number of consumed options.
-    */
-   ossim_uint32 executeImageOptions(const ossimFilename& file);
-
-   /**
-    * @brief getImageInfo Method to open image "file" and get image info
-    * in the form of a ossimKeywordlist.
-    *
-    * Flags turn on various pieces of info.  These equate to options in
-    * ossim-info for image information.
-    *
-    * This method opens and closes "file" under the hood so if an image is
-    * open and it's not the same as "file" it will be closed by this call.
-    * On exite the image will be closed.
-    *
-    * @param file Image file to get information for.
-    * @param dumpFlag      ossim-info -d
-    * @param dnoFlag       ossim-info --dno
-    * @param imageGeomFlag ossim-info -p
-    * @param imageInfoFlag ossim-info -i 
-    * @param metaDataFlag  ossim-info -m 
-    * @param paletteFlag   ossim-info --palette
-    * @param kwl Initialized by this method.
-    */
-   void getImageInfo(const ossimFilename& file,
-                     bool dumpFlag,
-                     bool dnoFlag,
-                     bool imageGeomFlag,
-                     bool imageInfoFlag,
-                     bool metaDataFlag,
-                     bool paletteFlag,
-                     ossimKeywordlist& kwl);
-   
-   /**
-    * @brief Opens image handler and stores in m_img data member.
-    * @param Image to open.
-    * @note Throws ossimException if image cannot be opened.
-    */
-   void openImage(const ossimFilename& file);
-
-   /** @brief Closes image if open. */
-   void closeImage();
-
-   /**
-    * @return Ref pointer to the image handler.  Can be null if an image is
-    * not open.
-    */
-   ossimRefPtr<ossimImageHandler> getImageHandler();
-
-   /** @brief Dumps the image information from ossimInfoFactoryRegistry */
-   void dumpImage(const ossimFilename& file, bool dnoFlag) const;
-
-   /**
-    * @brief Dumps the image information from ossimInfoFactoryRegistry to
-    * keyword list.
-    * @param file Image to dump.
-    * @param dnoFlag Dump no overviews. If true do not dump overviews.
-    * @param kwl Initialized by this method.
-    */
-   void dumpImage(const ossimFilename& file,
-                  bool dnoFlag,
-                  ossimKeywordlist& kwl) const;
-
-   /**
-    * @brief Prints factories.
-    * @param keywordListFlag If true the result of a saveState will be output
-    * for each factory.
-    * */
-   void printFactories(bool keywordListFlag) const;
-
-   /**
-    * @brief Populates keyword list with metadata.
-    * This requires open image.
-    *
-    * @param kwl Keyword list to populate.
-    */
-   void getImageMetadata(ossimKeywordlist& kwl) const;
-
-   /**
-    * @brief Populates keyword list with palette data.
-    * This requires open image.
-    *
-    * @param kwl Keyword list to populate.
-    */
-   void getImagePalette(ossimKeywordlist& kwl);
-
-   /**
-    * @brief Populates keyword list with general image information.
-    *
-    * This requires open image.
-    *
-    * @param kwl Keyword list to populate.
-    * @param dnoFlag If true no entries flaged as overviews will be output.
-    */
-   void getImageInfo(ossimKeywordlist& kwl, bool dnoFlag);
-
-   /**
-    * @brief Populates keyword list with general image information.
-    *
-    * @param entry Entry number to select.  Note this is the entry number from
-    * the getEntryList call not a simple zero based entry index.
-    * 
-    * @param kwl Keyword list to populate.
-    *
-    * @param dnoFlag If true no entries flaged as overviews will be output.
-    *
-    * This requires open image.
-    *
-    * @return true if entry info was saved to keyword list false if not.
-    */
-   bool getImageInfo(ossim_uint32 entry, ossimKeywordlist& kwl, bool dnoFlag);
-
-   /**
-    * @brief Populates keyword list with image geometry/projection information.
-    *
-    * This requires open image.
-    *
-    * @param kwl Keyword list to populate.
-    * @param dnoFlag If true no entries flaged as overviews will be output.
-    */
-   void getImageGeometryInfo(ossimKeywordlist& kwl, bool dnoFlag);
-
-   /**
-    * @brief Populates keyword list with image geometry/projection information.
-    *
-    * @param entry Entry number to select.  Note this is the entry number
-    * from the getEntryList call not a simple zero based entry index.
-    * 
-    * @param kwl Keyword list to populate.
-    *
-    * @param dnoFlag If true no entries flaged as overviews will be output.
-    *
-    * This requires open image.
-    *
-    * @return true if entry info was saved to keyword list false if not.
-    */
-   bool getImageGeometryInfo( ossim_uint32 entry, 
-                              ossimKeywordlist& kwl, 
-                              bool dnoFlag );
-
-   void getCenterImage(ossimKeywordlist& kwl);
-   void getCenterImage(ossim_uint32 entry, ossimKeywordlist& kwl);
-   void getCenterGround(ossimKeywordlist& kwl);
-   void getCenterGround(ossim_uint32 entry, ossimKeywordlist& kwl);
-
-   /**
-    * @brief Populates keyword list with up_is_up_rotation.
-    *
-    * @param kwl Keyword list to populate.
-    *
-    * This requires open image.
-    */
-   void getUpIsUpAngle(ossimKeywordlist& kwl);
-
-   /**
-    * @brief Populates keyword list with up_is_up_rotation.
-    *
-    * @param entry Entry number to select.  Note this is the entry number
-    * from the getEntryList call not a simple zero based entry index.
-    * 
-    * @param kwl Keyword list to populate.
-    *
-    * @param dnoFlag If true no entries flaged as overviews will be output.
-    *
-    * This requires open image.
-    */
-   void getUpIsUpAngle(ossim_uint32 entry, ossimKeywordlist& kwl);
-   
-   /**
-    * @brief Populates keyword list with image rectangle.
-    *
-    * This requires open image.
-    *
-    * @param kwl Keyword list to populate.
-    */
-   void getImageRect(ossimKeywordlist& kwl);
-
-   /**
-    * @brief Populates keyword list with image rectangle.
-    *
-    * @param entry Entry number to select.  Note this is the entry number from
-    * the getEntryList call not a simple zero based entry index.
-    * 
-    * @param kwl Keyword list to populate.
-    *
-    * This requires open image.
-    */
-   void getImageRect(ossim_uint32 entry, ossimKeywordlist& kwl);
-
-   /**
-    * @return true if current open image entry is an overview.
-    */
-   bool isImageEntryOverview() const;
-
-   /** @brief Dumps ossim preferences/configuration data. */
-   void printConfiguration() const;
-
-   /**
-    * @brief Dumps ossim preferences/configuration data.
-    * @param out Output to write to.
-    * @return stream
-    */
-   std::ostream& printConfiguration(std::ostream& out) const;
-
-   /** @brief Dumps datum list to stdout. */
-   void printDatums() const;
-
-   /** @brief Dumps datum list to stream. */
-   std::ostream& printDatums(std::ostream& out) const;
-
-   /** @brief Converts degrees to radians and outputs to stdout. */
-   void deg2rad(const ossim_float64& degrees) const;
-
-   /**
-    * @brief Converts degrees to radians and outputs to stream.
-    * @param out Output to write to.
-    * @return stream
-    */
-   std::ostream& deg2rad(const ossim_float64& degrees, std::ostream& out) const;
-
-   /** @brief Converts radians to degrees and outputs to stdout. */
-   void rad2deg(const ossim_float64& radians) const;
-
-   /**
-    * @brief Converts radians to degrees and outputs to stream. 
-    * @param out Output to write to.
-    * @return stream
-    */
-   std::ostream& rad2deg(const ossim_float64& radians, std::ostream& out) const;
-
-   /** @brief Converts feet to meters and outputs to stdout. */
-   void ft2mtrs(const ossim_float64& feet, bool us_survey) const;
-
-   /**
-    * @brief Converts feet to meters and outputs to stream.
-    * @param out Output to write to out.
-    * @return stream
-    */
-   std::ostream& ft2mtrs(const ossim_float64& feet, bool us_survey, std::ostream& out) const;
-
-   /** @brief Converts meters to feet and outputs to stdout. */
-   void mtrs2ft(const ossim_float64& meters, bool us_survey) const;
-
-   /**
-    * @brief Converts meters to feet and outputs to stream.
-    * @param out Output to write to out.
-    * @return stream
-    */   
-   std::ostream& mtrs2ft(const ossim_float64& meters, bool us_survey, std::ostream& out) const;
-
-   /**
-    * @brief Get meters per degree for a given latitude and outputs to stdout.
-    * @param latitude
-    */
-   void mtrsPerDeg(const ossim_float64& latitude) const;
-
-   /**
-    * @brief Get meters per degree for a given latitude and outputs to stream.
-    * @param latitude
-    * @param out Output to write to out.
-    * @return stream
-    */   
-   std::ostream& mtrsPerDeg(const ossim_float64& latitude, std::ostream& out) const;
-
-   /**
-    * @brief Gets the height for ground point (latitude, longitude). Outputs
-    * to stdout.
-    * @param gpt Ground point.
-    */
-   void outputHeight(const ossimGpt& gpt) const;
-
-   /**
-    * @brief Gets the height for ground point (latitude, longitude). Outputs
-    * to out.
-    * @param out Output to write to out.
-    * @return stream
-    */
-   std::ostream& outputHeight(const ossimGpt& gpt, std::ostream& out) const;
-
-   /** @brief Prints loaded plugins to stdout. */
-   void printPlugins() const;
-
-   /**
-    * @brief Prints loaded plugins to stream.
-    * @param out Output to write to out.
-    * @return stream
-    */
-   std::ostream& printPlugins(std::ostream& out) const;
-
-   /**
-    * @brief Test a plugin load  and outputs to stdout.
-    * 
-    * @param plugin Plugin to test.
-    */
-   void testPlugin(const ossimFilename& plugin) const;
-
-   /**
-    * @brief Test a plugin load outputs to stream.
-    * 
-    * @param plugin Plugin to test.
-    * @param out Stream to write to.
-    * @param stream
-    */
-   std::ostream& testPlugin(const ossimFilename& plugin, std::ostream& out) const;
-
-   /** @brief Prints overview types to stdout. */
-   void printOverviewTypes() const;
-
-   /** @brief Prints overview types to stream. */
-   std::ostream& printOverviewTypes(std::ostream& out) const;
-
-   /** @breif Prints projections to stdout. */
-   void printProjections() const;
-
-   /** @breif Prints projections to stream. */
-   std::ostream& printProjections(std::ostream& out) const;
-
-   /** @brief Prints reader properties to stdout. */
-   void printReaderProps() const;
-
-   /** @brief Prints reader properties to stream. */
-   std::ostream& printReaderProps(std::ostream& out) const;
-
-   /** @brief Prints resampler filters to stdout. */
-   void printResamplerFilters() const;
-
-   /** @brief Prints resampler filters to stream. */
-   std::ostream& printResamplerFilters(std::ostream& out) const;
-
-   /** @brief Prints list of available writers to stdout. */
-   void printWriters() const;
-
-   /** @brief Prints list of available writers to stream. */
-   std::ostream& printWriters(std::ostream& out) const;
-
-   /** @brief Prints writer properties to stdout. */
-   void printWriterProps() const;
-
-   /** @brief Prints writer properties to stream. */
-   std::ostream& printWriterProps(std::ostream& out) const;
-
-   /**
-    * @brief Gets the radiometry string, i.e. "8-bit" and so on, from scalar.
-    * @param scalar Scalar type.
-    * @param s String to initialize.
-    */
-   void getRadiometry(ossimScalarType scalar, std::string& s) const;
-   
-private:
- 
-   /**
-    * @brief Populates keyword list with metadata.
-    * @param ih Pointer to an image handler.
-    * @param kwl Keyword list to populate.
-    */
-   void getImageMetadata( const ossimImageHandler* ih, 
-                          ossimKeywordlist& kwl ) const;
- 
-  /**
-   * @brief Populates keyword list with palette data.
-   * @param ih Pointer to an image handler.
-   * @param kwl Keyword list to populate.
-   */
-   void getImagePalette( ossimImageHandler* ih, 
-                         ossimKeywordlist& kwl ) const;
-  
-   /**
-    * @brief Populates keyword list with general image information.
-    * @param ih Pointer to an image handler.
-    * @param kwl Keyword list to populate.
-    * @param dnoFlag If true no entries flaged as overviews will be output.
-    */
-   void getImageInfo( ossimImageHandler* ih, 
-                      ossimKeywordlist& kwl, 
-                      bool dnoFlag ) const;
-
-   /**
-    * @brief Populates keyword list with general image information.
-    * @param ih Pointer to an image handler.
-    * @param entry Entry number to select.  Note this is the entry number from
-    * the getEntryList call not a simple zero based entry index.
-    * @param kwl Keyword list to populate.
-    * @param dnoFlag If true no entries flaged as overviews will be output.
-    * @return true if entry info was saved to keyword list false if not.
-    */
-   bool getImageInfo( ossimImageHandler* ih, 
-                      ossim_uint32 entry, 
-                      ossimKeywordlist& kwl, 
-                      bool dnoFlag ) const;
-   
-   /**
-    * @brief Populates keyword list with image geometry/projection information.
-    * @param ih Pointer to an image handler.
-    * @param kwl Keyword list to populate.
-    * @param dnoFlag If true no entries flaged as overviews will be output.
-    */
-   void getImageGeometryInfo( ossimImageHandler* ih,
-                              ossimKeywordlist& kwl, 
-                              bool dnoFlag ) const;
-
-   /**
-    * @brief Populates keyword list with image geometry/projection information.
-    * @param ih Pointer to an image handler.
-    * @param entry Entry number to select.  Note this is the entry number
-    * from the getEntryList call not a simple zero based entry index.
-    * @param kwl Keyword list to populate.
-    * @param dnoFlag If true no entries flaged as overviews will be output.
-    * @return true if entry info was saved to keyword list false if not.
-    */
-   bool getImageGeometryInfo( ossimImageHandler* ih,
-                              ossim_uint32 entry, 
-                              ossimKeywordlist& kwl, 
-                              bool dnoFlag ) const;
-
-   void getCenterImage( ossimImageHandler* ih,
-                        ossimKeywordlist& kwl ) const;
-   void getCenterImage( ossimImageHandler* ih,
-                        ossim_uint32 entry, 
-                        ossimKeywordlist& kwl ) const;
-   void getCenterGround( ossimImageHandler* ih,
-                         ossimKeywordlist& kwl ) const;
-   void getCenterGround( ossimImageHandler* ih,
-                         ossim_uint32 entry, 
-                         ossimKeywordlist& kwl ) const;
-
-   /**
-    * @brief Populates keyword list with up_is_up_rotation.
-    * @param kwl Keyword list to populate.
-    */
-   void getUpIsUpAngle( ossimImageHandler* ih,
-                        ossimKeywordlist& kwl ) const;
-
-   /**
-    * @brief Populates keyword list with up_is_up_rotation.
-    * @param entry Entry number to select.  Note this is the entry number from
-    * the getEntryList call not a simple zero based entry index.
-    * @param kwl Keyword list to populate.
-    */  
-   void getUpIsUpAngle( ossimImageHandler* ih,
-                        ossim_uint32 entry, 
-                        ossimKeywordlist& kwl ) const;
-   
-   /**
-    * @brief Populates keyword list with image rectangle.
-    *
-    * @param kwl Keyword list to populate.
-    */
-   void getImageRect( ossimImageHandler* ih,
-                      ossimKeywordlist& kwl ) const;
-
-   /**
-    * @brief Populates keyword list with image rectangle.
-    * @param entry Entry number to select.  Note this is the entry number from
-    * the getEntryList call not a simple zero based entry index.
-    * @param kwl Keyword list to populate.
-    */
-   void getImageRect( ossimImageHandler* ih,
-                      ossim_uint32 entry, 
-                      ossimKeywordlist& kwl ) const;
-
-   /** @return true if current open image entry is an overview. */
-   bool isImageEntryOverview( const ossimImageHandler* ih ) const;
-
-  /**
-   * @brief Opens image.
-   * @param Image to open.
-   * @return ossimRefPtr with image handler.
-   * @note Throws ossimException if image cannot be opened.
-   */
-   ossimRefPtr<ossimImageHandler> openImageHandler(const ossimFilename& file) const;
-   
-   /** @brief Initializes arg parser and outputs usage. */
-   void usage(ossimArgumentParser& ap);
-
-   /** Hold all options passed into intialize except writer props. */
-   ossimRefPtr<ossimKeywordlist> m_kwl;
-
-   /** Holds the open image. */
-   ossimRefPtr<ossimImageHandler> m_img;
-};
-
-#endif /* #ifndef ossimInfo_HEADER */
diff --git a/include/ossim/util/ossimRpfUtil.h b/include/ossim/util/ossimRpfUtil.h
deleted file mode 100644
index 95842e3..0000000
--- a/include/ossim/util/ossimRpfUtil.h
+++ /dev/null
@@ -1,85 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:  ossimRpfUtil.h
-// 
-// Utility class to stuff with rpf files.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#ifndef ossimRpfUtil_HEADER
-#define ossimRpfUtil_HEADER 1
-
-#include <ossim/base/ossimReferenced.h>
-#include <ossim/imaging/ossimImageGeometry.h> 
-
-class ossimFilename;
-class ossimGpt;
-class ossimRpfToc;
-class ossimRpfTocEntry;
-
-class OSSIM_DLL ossimRpfUtil : public ossimReferenced
-{
-public:
-
-   /** @brief default constructor */
-   ossimRpfUtil();
-
-
-   /**
-    * @brief Write dot rpf file(s) to output directory from a.toc file.
-    *
-    * This creates a dot rpf file for each entry.
-    *
-    * @param aDotFile The a.toc file.
-    *
-    * @param outputDir Directory to write dot rpf file(s) to.
-    *
-    * throws ossimException on error.
-    */
-   void writeDotRpfFiles( const ossimFilename& aDotTocFile,
-                          const ossimFilename& outputDir);
-
-   void writeDotRpfFile( const ossimRpfToc* toc,
-                         const ossimRpfTocEntry* tocEntry,
-                         const ossimFilename& outputDir,
-                         ossim_uint32 entry);
-
-protected:
-
-   /**
-    * @brief protected virtual destructor
-    *
-    * Do not call directly.  Use as a ref ptr.
-    */
-   virtual ~ossimRpfUtil();
-
-private:
-
-   /**
-    * @brief Method to test for 360 spread, 180.0 <--> 180.00 and set
-    * leftLon to -180 if both left and right are 180.0 degrees.
-    *
-    * This adds a small tolerance to the test.
-    * 
-    * @param left Left hand side of scene.  This is the value
-    * that will be flipped to -180 if test is true.
-    *
-    * @param right Right hand side of scene.
-    */
-   void checkLongitude(ossimGpt& left, ossimGpt& right) const;
-
-   /** @brief Method to get the file for entry. */
-   void getDotRfpFilenameForEntry(const ossimFilename& outputDir,
-                                  ossim_uint32 entry,
-                                  ossimFilename& outFile) const;
-   
-}; // Matches: class ossimRpfUtil
-
-#endif /* #ifndef ossimRpfUtil_HEADER */
diff --git a/include/ossim/vec/ossimVpfDatabaseHeaderTableValidator.h b/include/ossim/vec/ossimVpfDatabaseHeaderTableValidator.h
deleted file mode 100644
index cb9a195..0000000
--- a/include/ossim/vec/ossimVpfDatabaseHeaderTableValidator.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//-----------------------------------------------------------------
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//-----------------------------------------------------------------
-#ifndef ossimVpfDatabaseHeaderTableValidator_HEADER
-#define ossimVpfDatabaseHeaderTableValidator_HEADER
-#include <ossim/vec/ossimVpfTableValidator.h>
-class ossimVpfTable;
-class ossimVpfDatabaseHeaderTableValidator : public ossimVpfTableValidator
-{
-public:
-   virtual ~ossimVpfDatabaseHeaderTableValidator();
-   virtual bool isValid(ossimVpfTable& aTable)const;
-};
-
-#endif
diff --git a/include/ossim/vec/ossimVpfTableValidator.h b/include/ossim/vec/ossimVpfTableValidator.h
deleted file mode 100644
index 6b72705..0000000
--- a/include/ossim/vec/ossimVpfTableValidator.h
+++ /dev/null
@@ -1,18 +0,0 @@
-//-----------------------------------------------------------------
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//-----------------------------------------------------------------
-#ifndef ossimVpfTableValidator_HEADER
-#define ossimVpfTableValidator_HEADER
-
-class ossimVpfTable;
-
-class ossimVpfTableValidator
-{
-public:
-   virtual ~ossimVpfTableValidator(){}
-   virtual bool isValid(ossimVpfTable& aTable)const=0;
-};
-
-#endif
diff --git a/include/ossim/vec/vpf.h b/include/ossim/vec/vpf.h
deleted file mode 100644
index aaf85e3..0000000
--- a/include/ossim/vec/vpf.h
+++ /dev/null
@@ -1,35 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-// Description: This class give the capability to access tiles from an
-//              vpf file.
-//
-//********************************************************************
-// $Id: vpf.h 13586 2008-09-17 01:35:25Z gpotts $
-#ifndef VPF_HEADER
-#define VPF_HEADER
-
-#include <ossim/ossimConfig.h>
-
-#if __OSSIM_CARBON__
-#define MAXINT INT_MAX
-#endif
-
-extern "C"
-{
-#include <ossim/vpfutil/vpfapi.h>
-#include <ossim/vpfutil/vpfview.h>
-#include <ossim/vpfutil/vpfselec.h>
-#include <ossim/vpfutil/vpftable.h>
-#include <ossim/vpfutil/vpfprim.h>
-#include <ossim/vpfutil/vpfmisc.h>
-#include <ossim/vpfutil/vpfdisp.h>
-}
-
-#endif
diff --git a/include/ossim/vpfutil/values.h b/include/ossim/vpfutil/values.h
deleted file mode 100644
index e12ee63..0000000
--- a/include/ossim/vpfutil/values.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* Old compatibility names for <limits.h> and <float.h> constants.
-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public License as
-   published by the Free Software Foundation; either version 2 of the
-   License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with the GNU C Library; see the file COPYING.LIB.  If not,
-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-/* This interface is obsolete.  New programs should use
-   <limits.h> and/or <float.h> instead of <values.h>.  */
-
-#ifndef	_VALUES_H
-#define	_VALUES_H	1
-
-#include <limits.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef MAXSHORT
-#undef MAXSHORT
-#endif
-#ifdef MAXFLOAT
-#undef MAXFLOAT
-#endif 
-
-#define _TYPEBITS(type)	(sizeof (type) * CHAR_BIT)
-
-#define CHARBITS	_TYPEBITS (char)
-#define SHORTBITS	_TYPEBITS (short int)
-#define INTBITS		_TYPEBITS (int)
-#define LONGBITS	_TYPEBITS (long int)
-#define PTRBITS		_TYPEBITS (char *)
-#define DOUBLEBITS	_TYPEBITS (double)
-#define FLOATBITS	_TYPEBITS (float)
-
-#ifndef MINSHORT
-#  define   MINSHORT	SHRT_MIN
-#endif
-#ifndef MININT
-#  define	MININT		INT_MIN
-#endif
-#ifndef MINLONG
-#  define	MINLONG		LONG_MIN
-#endif
-
-#ifndef MAXSHORT
-#  define	MAXSHORT	SHRT_MAX
-#endif
-#ifndef MAXINT
-#  define	MAXINT		INT_MAX
-#endif
-#ifndef MAXLONG
-#  define	MAXLONG		LONG_MAX
-#endif
-
-#define HIBITS		MINSHORT
-#define HIBITL		MINLONG
-
-
-#include <float.h>
-
-#define	MAXDOUBLE	DBL_MAX
-#define	MAXFLOAT	FLT_MAX
-#define	MINDOUBLE	DBL_MIN
-#define	MINFLOAT	FLT_MIN
-#define	DMINEXP		DBL_MIN_EXP
-#define	FMINEXP		FLT_MIN_EXP
-#define	DMAXEXP		DBL_MAX_EXP
-#define	FMAXEXP		FLT_MAX_EXP
-
-
-#ifdef __USE_MISC
-/* Some systems define this name instead of CHAR_BIT or CHARBITS.  */
-# define BITSPERBYTE	CHAR_BIT
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-#endif	/* values.h */
diff --git a/install-sh b/install-sh
deleted file mode 100755
index e9de238..0000000
--- a/install-sh
+++ /dev/null
@@ -1,251 +0,0 @@
-#!/bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
-
-	-d) dir_arg=true
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
-
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
-
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "install:	no input file specified"
-	exit 1
-else
-	true
-fi
-
-if [ x"$dir_arg" != x ]; then
-	dst=$src
-	src=""
-	
-	if [ -d $dst ]; then
-		instcmd=:
-		chmodcmd=""
-	else
-		instcmd=mkdir
-	fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
-
-	if [ -f $src -o -d $src ]
-	then
-		true
-	else
-		echo "install:  $src does not exist"
-		exit 1
-	fi
-	
-	if [ x"$dst" = x ]
-	then
-		echo "install:	no destination specified"
-		exit 1
-	else
-		true
-	fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-	if [ -d $dst ]
-	then
-		dst="$dst"/`basename $src`
-	else
-		true
-	fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='	
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-	pathcomp="${pathcomp}${1}"
-	shift
-
-	if [ ! -d "${pathcomp}" ] ;
-        then
-		$mkdirprog "${pathcomp}"
-	else
-		true
-	fi
-
-	pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd $dst &&
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-	if [ x"$transformarg" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		dstfile=`basename $dst $transformbasename | 
-			sed $transformarg`$transformbasename
-	fi
-
-# don't allow the sed command to completely eliminate the filename
-
-	if [ x"$dstfile" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		true
-	fi
-
-# Make a temp file name in the proper directory.
-
-	dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-	$doit $instcmd $src $dsttmp &&
-
-	trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
-	$doit $rmcmd -f $dstdir/$dstfile &&
-	$doit $mvcmd $dsttmp $dstdir/$dstfile 
-
-fi &&
-
-
-exit 0
diff --git a/lib/.cvsignore b/lib/.cvsignore
deleted file mode 100644
index e258234..0000000
--- a/lib/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-lib*
-
diff --git a/ltmain.sh b/ltmain.sh
deleted file mode 100755
index 502ef58..0000000
--- a/ltmain.sh
+++ /dev/null
@@ -1,6401 +0,0 @@
-# ltmain.sh - Provide generalized library-building support services.
-# NOTE: Changing this file will not affect anything until you rerun configure.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
-# Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Check that we have a working $echo.
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
-  # Yippee, $echo works!
-  :
-else
-  # Restart under the correct shell, and then maybe $echo will work.
-  exec $SHELL "$0" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-$*
-EOF
-  exit 0
-fi
-
-# The name of this program.
-progname=`$echo "$0" | ${SED} 's%^.*/%%'`
-modename="$progname"
-
-# Constants.
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION=1.5.2
-TIMESTAMP=" (1.1220.2.60 2004/01/25 12:25:08) Debian$Rev: 12535 $"
-
-default_mode=
-help="Try \`$progname --help' for more information."
-magic="%%%MAGIC variable%%%"
-mkdir="mkdir"
-mv="mv -f"
-rm="rm -f"
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
-sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-# test EBCDIC or ASCII
-case `echo A|tr A '\301'` in
- A) # EBCDIC based system
-  SP2NL="tr '\100' '\n'"
-  NL2SP="tr '\r\n' '\100\100'"
-  ;;
- *) # Assume ASCII based system
-  SP2NL="tr '\040' '\012'"
-  NL2SP="tr '\015\012' '\040\040'"
-  ;;
-esac
-
-# NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-# We save the old values to restore during execute mode.
-if test "${LC_ALL+set}" = set; then
-  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
-fi
-if test "${LANG+set}" = set; then
-  save_LANG="$LANG"; LANG=C; export LANG
-fi
-
-# Make sure IFS has a sensible default
-: ${IFS=" 	
-"}
-
-if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-  $echo "$modename: not configured to build any kind of library" 1>&2
-  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-  exit 1
-fi
-
-# Global variables.
-mode=$default_mode
-nonopt=
-prev=
-prevopt=
-run=
-show="$echo"
-show_help=
-execute_dlfiles=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-
-#####################################
-# Shell function definitions:
-# This seems to be the best place for them
-
-# Need a lot of goo to handle *both* DLLs and import libs
-# Has to be a shell function in order to 'eat' the argument
-# that is supplied when $file_magic_command is called.
-win32_libid () {
-  win32_libid_type="unknown"
-  win32_fileres=`file -L $1 2>/dev/null`
-  case $win32_fileres in
-  *ar\ archive\ import\ library*) # definitely import
-    win32_libid_type="x86 archive import"
-    ;;
-  *ar\ archive*) # could be an import, or static
-    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
-      grep -E 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
-      win32_nmres=`eval $NM -f posix -A $1 | \
-	sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
-      if test "X$win32_nmres" = "Ximport" ; then
-        win32_libid_type="x86 archive import"
-      else
-        win32_libid_type="x86 archive static"
-      fi
-    fi
-    ;;
-  *DLL*) 
-    win32_libid_type="x86 DLL"
-    ;;
-  *executable*) # but shell scripts are "executable" too...
-    case $win32_fileres in
-    *MS\ Windows\ PE\ Intel*)
-      win32_libid_type="x86 DLL"
-      ;;
-    esac
-    ;;
-  esac
-  $echo $win32_libid_type
-}
-
-# End of Shell function definitions
-#####################################
-
-# Parse our command line options once, thoroughly.
-while test "$#" -gt 0
-do
-  arg="$1"
-  shift
-
-  case $arg in
-  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) optarg= ;;
-  esac
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$prev"; then
-    case $prev in
-    execute_dlfiles)
-      execute_dlfiles="$execute_dlfiles $arg"
-      ;;
-    tag)
-      tagname="$arg"
-      preserve_args="${preserve_args}=$arg"
-
-      # Check whether tagname contains only valid characters
-      case $tagname in
-      *[!-_A-Za-z0-9,/]*)
-	$echo "$progname: invalid tag name: $tagname" 1>&2
-	exit 1
-	;;
-      esac
-
-      case $tagname in
-      CC)
-	# Don't test for the "default" C tag, as we know, it's there, but
-	# not specially marked.
-	;;
-      *)
-	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
-	  taglist="$taglist $tagname"
-	  # Evaluate the configuration.
-	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
-	else
-	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
-	fi
-	;;
-      esac
-      ;;
-    *)
-      eval "$prev=\$arg"
-      ;;
-    esac
-
-    prev=
-    prevopt=
-    continue
-  fi
-
-  # Have we seen a non-optional argument yet?
-  case $arg in
-  --help)
-    show_help=yes
-    ;;
-
-  --version)
-    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
-    $echo
-    $echo "Copyright (C) 2003  Free Software Foundation, Inc."
-    $echo "This is free software; see the source for copying conditions.  There is NO"
-    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-    exit 0
-    ;;
-
-  --config)
-    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
-    # Now print the configurations for the tags.
-    for tagname in $taglist; do
-      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
-    done
-    exit 0
-    ;;
-
-  --debug)
-    $echo "$progname: enabling shell trace mode"
-    set -x
-    preserve_args="$preserve_args $arg"
-    ;;
-
-  --dry-run | -n)
-    run=:
-    ;;
-
-  --features)
-    $echo "host: $host"
-    if test "$build_libtool_libs" = yes; then
-      $echo "enable shared libraries"
-    else
-      $echo "disable shared libraries"
-    fi
-    if test "$build_old_libs" = yes; then
-      $echo "enable static libraries"
-    else
-      $echo "disable static libraries"
-    fi
-    exit 0
-    ;;
-
-  --finish) mode="finish" ;;
-
-  --mode) prevopt="--mode" prev=mode ;;
-  --mode=*) mode="$optarg" ;;
-
-  --preserve-dup-deps) duplicate_deps="yes" ;;
-
-  --quiet | --silent)
-    show=:
-    preserve_args="$preserve_args $arg"
-    ;;
-
-  --tag) prevopt="--tag" prev=tag ;;
-  --tag=*)
-    set tag "$optarg" ${1+"$@"}
-    shift
-    prev=tag
-    preserve_args="$preserve_args --tag"
-    ;;
-
-  -dlopen)
-    prevopt="-dlopen"
-    prev=execute_dlfiles
-    ;;
-
-  -*)
-    $echo "$modename: unrecognized option \`$arg'" 1>&2
-    $echo "$help" 1>&2
-    exit 1
-    ;;
-
-  *)
-    nonopt="$arg"
-    break
-    ;;
-  esac
-done
-
-if test -n "$prevopt"; then
-  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
-  $echo "$help" 1>&2
-  exit 1
-fi
-
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end.  This prevents here-documents from being
-# left over by shells.
-exec_cmd=
-
-if test -z "$show_help"; then
-
-  # Infer the operation mode.
-  if test -z "$mode"; then
-    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
-    $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
-    case $nonopt in
-    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
-      mode=link
-      for arg
-      do
-	case $arg in
-	-c)
-	   mode=compile
-	   break
-	   ;;
-	esac
-      done
-      ;;
-    *db | *dbx | *strace | *truss)
-      mode=execute
-      ;;
-    *install*|cp|mv)
-      mode=install
-      ;;
-    *rm)
-      mode=uninstall
-      ;;
-    *)
-      # If we have no mode, but dlfiles were specified, then do execute mode.
-      test -n "$execute_dlfiles" && mode=execute
-
-      # Just use the default operation mode.
-      if test -z "$mode"; then
-	if test -n "$nonopt"; then
-	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
-	else
-	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
-	fi
-      fi
-      ;;
-    esac
-  fi
-
-  # Only execute mode is allowed to have -dlopen flags.
-  if test -n "$execute_dlfiles" && test "$mode" != execute; then
-    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
-    $echo "$help" 1>&2
-    exit 1
-  fi
-
-  # Change the help message to a mode-specific one.
-  generic_help="$help"
-  help="Try \`$modename --help --mode=$mode' for more information."
-
-  # These modes are in order of execution frequency so that they run quickly.
-  case $mode in
-  # libtool compile mode
-  compile)
-    modename="$modename: compile"
-    # Get the compilation command and the source file.
-    base_compile=
-    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
-    suppress_opt=yes
-    suppress_output=
-    arg_mode=normal
-    libobj=
-    later=
-
-    for arg
-    do
-      case "$arg_mode" in
-      arg  )
-	# do not "continue".  Instead, add this to base_compile
-	lastarg="$arg"
-	arg_mode=normal
-	;;
-
-      target )
-	libobj="$arg"
-	arg_mode=normal
-	continue
-	;;
-
-      normal )
-	# Accept any command-line options.
-	case $arg in
-	-o)
-	  if test -n "$libobj" ; then
-	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
-	    exit 1
-	  fi
-	  arg_mode=target
-	  continue
-	  ;;
-
-	-static | -prefer-pic | -prefer-non-pic)
-	  later="$later $arg"
-	  continue
-	  ;;
-
-	-no-suppress)
-	  suppress_opt=no
-	  continue
-	  ;;
-
-	-Xcompiler)
-	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
-	  continue      #  The current "srcfile" will either be retained or
-	  ;;            #  replaced later.  I would guess that would be a bug.
-
-	-Wc,*)
-	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
-	  lastarg=
-	  save_ifs="$IFS"; IFS=','
-	  for arg in $args; do
-	    IFS="$save_ifs"
-
-	    # Double-quote args containing other shell metacharacters.
-	    # Many Bourne shells cannot handle close brackets correctly
-	    # in scan sets, so we specify it separately.
-	    case $arg in
-	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	      arg="\"$arg\""
-	      ;;
-	    esac
-	    lastarg="$lastarg $arg"
-	  done
-	  IFS="$save_ifs"
-	  lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
-
-	  # Add the arguments to base_compile.
-	  base_compile="$base_compile $lastarg"
-	  continue
-	  ;;
-
-	* )
-	  # Accept the current argument as the source file.
-	  # The previous "srcfile" becomes the current argument.
-	  #
-	  lastarg="$srcfile"
-	  srcfile="$arg"
-	  ;;
-	esac  #  case $arg
-	;;
-      esac    #  case $arg_mode
-
-      # Aesthetically quote the previous argument.
-      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
-
-      case $lastarg in
-      # Double-quote args containing other shell metacharacters.
-      # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, so we specify it separately.
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	lastarg="\"$lastarg\""
-	;;
-      esac
-
-      base_compile="$base_compile $lastarg"
-    done # for arg
-
-    case $arg_mode in
-    arg)
-      $echo "$modename: you must specify an argument for -Xcompile"
-      exit 1
-      ;;
-    target)
-      $echo "$modename: you must specify a target with \`-o'" 1>&2
-      exit 1
-      ;;
-    *)
-      # Get the name of the library object.
-      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
-      ;;
-    esac
-
-    # Recognize several different file suffixes.
-    # If the user specifies -o file.o, it is replaced with file.lo
-    xform='[cCFSifmso]'
-    case $libobj in
-    *.ada) xform=ada ;;
-    *.adb) xform=adb ;;
-    *.ads) xform=ads ;;
-    *.asm) xform=asm ;;
-    *.c++) xform=c++ ;;
-    *.cc) xform=cc ;;
-    *.ii) xform=ii ;;
-    *.class) xform=class ;;
-    *.cpp) xform=cpp ;;
-    *.cxx) xform=cxx ;;
-    *.f90) xform=f90 ;;
-    *.for) xform=for ;;
-    *.java) xform=java ;;
-    esac
-
-    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
-
-    case $libobj in
-    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
-    *)
-      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
-      exit 1
-      ;;
-    esac
-
-    # Infer tagged configuration to use if any are available and
-    # if one wasn't chosen via the "--tag" command line option.
-    # Only attempt this if the compiler in the base compile
-    # command doesn't match the default compiler.
-    if test -n "$available_tags" && test -z "$tagname"; then
-      case $base_compile in
-      # Blanks in the command may have been stripped by the calling shell,
-      # but not from the CC environment variable when configure was run.
-      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;;
-      # Blanks at the start of $base_compile will cause this to fail
-      # if we don't check for them as well.
-      *)
-	for z in $available_tags; do
-	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
-	    # Evaluate the configuration.
-	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
-	    case "$base_compile " in
-	    "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
-	      # The compiler in the base compile command matches
-	      # the one in the tagged configuration.
-	      # Assume this is the tagged configuration we want.
-	      tagname=$z
-	      break
-	      ;;
-	    esac
-	  fi
-	done
-	# If $tagname still isn't set, then no tagged configuration
-	# was found and let the user know that the "--tag" command
-	# line option must be used.
-	if test -z "$tagname"; then
-	  $echo "$modename: unable to infer tagged configuration"
-	  $echo "$modename: specify a tag with \`--tag'" 1>&2
-	  exit 1
-#        else
-#          $echo "$modename: using $tagname tagged configuration"
-	fi
-	;;
-      esac
-    fi
-
-    for arg in $later; do
-      case $arg in
-      -static)
-	build_old_libs=yes
-	continue
-	;;
-
-      -prefer-pic)
-	pic_mode=yes
-	continue
-	;;
-
-      -prefer-non-pic)
-	pic_mode=no
-	continue
-	;;
-      esac
-    done
-
-    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
-    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
-    if test "X$xdir" = "X$obj"; then
-      xdir=
-    else
-      xdir=$xdir/
-    fi
-    lobj=${xdir}$objdir/$objname
-
-    if test -z "$base_compile"; then
-      $echo "$modename: you must specify a compilation command" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    # Delete any leftover library objects.
-    if test "$build_old_libs" = yes; then
-      removelist="$obj $lobj $libobj ${libobj}T"
-    else
-      removelist="$lobj $libobj ${libobj}T"
-    fi
-
-    $run $rm $removelist
-    trap "$run $rm $removelist; exit 1" 1 2 15
-
-    # On Cygwin there's no "real" PIC flag so we must build both object types
-    case $host_os in
-    cygwin* | mingw* | pw32* | os2*)
-      pic_mode=default
-      ;;
-    esac
-    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
-      # non-PIC code in shared libraries is not supported
-      pic_mode=default
-    fi
-
-    # Calculate the filename of the output object if compiler does
-    # not support -o with -c
-    if test "$compiler_c_o" = no; then
-      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
-      lockfile="$output_obj.lock"
-      removelist="$removelist $output_obj $lockfile"
-      trap "$run $rm $removelist; exit 1" 1 2 15
-    else
-      output_obj=
-      need_locks=no
-      lockfile=
-    fi
-
-    # Lock this critical section if it is needed
-    # We use this script file to make the link, it avoids creating a new file
-    if test "$need_locks" = yes; then
-      until $run ln "$0" "$lockfile" 2>/dev/null; do
-	$show "Waiting for $lockfile to be removed"
-	sleep 2
-      done
-    elif test "$need_locks" = warn; then
-      if test -f "$lockfile"; then
-	$echo "\
-*** ERROR, $lockfile exists and contains:
-`cat $lockfile 2>/dev/null`
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-	$run $rm $removelist
-	exit 1
-      fi
-      $echo $srcfile > "$lockfile"
-    fi
-
-    if test -n "$fix_srcfile_path"; then
-      eval srcfile=\"$fix_srcfile_path\"
-    fi
-
-    $run $rm "$libobj" "${libobj}T"
-
-    # Create a libtool object file (analogous to a ".la" file),
-    # but don't create it if we're doing a dry run.
-    test -z "$run" && cat > ${libobj}T <<EOF
-# $libobj - a libtool object file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-EOF
-
-    # Only build a PIC object if we are building libtool libraries.
-    if test "$build_libtool_libs" = yes; then
-      # Without this assignment, base_compile gets emptied.
-      fbsd_hideous_sh_bug=$base_compile
-
-      if test "$pic_mode" != no; then
-	command="$base_compile $srcfile $pic_flag"
-      else
-	# Don't build PIC code
-	command="$base_compile $srcfile"
-      fi
-
-      if test ! -d "${xdir}$objdir"; then
-	$show "$mkdir ${xdir}$objdir"
-	$run $mkdir ${xdir}$objdir
-	status=$?
-	if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
-	  exit $status
-	fi
-      fi
-
-      if test -z "$output_obj"; then
-	# Place PIC objects in $objdir
-	command="$command -o $lobj"
-      fi
-
-      $run $rm "$lobj" "$output_obj"
-
-      $show "$command"
-      if $run eval "$command"; then :
-      else
-	test -n "$output_obj" && $run $rm $removelist
-	exit 1
-      fi
-
-      if test "$need_locks" = warn &&
-	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-	$echo "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-	$run $rm $removelist
-	exit 1
-      fi
-
-      # Just move the object if needed, then go on to compile the next one
-      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
-	$show "$mv $output_obj $lobj"
-	if $run $mv $output_obj $lobj; then :
-	else
-	  error=$?
-	  $run $rm $removelist
-	  exit $error
-	fi
-      fi
-
-      # Append the name of the PIC object to the libtool object file.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-pic_object='$objdir/$objname'
-
-EOF
-
-      # Allow error messages only from the first compilation.
-      if test "$suppress_opt" = yes; then
-        suppress_output=' >/dev/null 2>&1'
-      fi
-    else
-      # No PIC object so indicate it doesn't exist in the libtool
-      # object file.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-pic_object=none
-
-EOF
-    fi
-
-    # Only build a position-dependent object if we build old libraries.
-    if test "$build_old_libs" = yes; then
-      if test "$pic_mode" != yes; then
-	# Don't build PIC code
-	command="$base_compile $srcfile"
-      else
-	command="$base_compile $srcfile $pic_flag"
-      fi
-      if test "$compiler_c_o" = yes; then
-	command="$command -o $obj"
-      fi
-
-      # Suppress compiler output if we already did a PIC compilation.
-      command="$command$suppress_output"
-      $run $rm "$obj" "$output_obj"
-      $show "$command"
-      if $run eval "$command"; then :
-      else
-	$run $rm $removelist
-	exit 1
-      fi
-
-      if test "$need_locks" = warn &&
-	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-	$echo "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-	$run $rm $removelist
-	exit 1
-      fi
-
-      # Just move the object if needed
-      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
-	$show "$mv $output_obj $obj"
-	if $run $mv $output_obj $obj; then :
-	else
-	  error=$?
-	  $run $rm $removelist
-	  exit $error
-	fi
-      fi
-
-      # Append the name of the non-PIC object the libtool object file.
-      # Only append if the libtool object file exists.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object='$objname'
-
-EOF
-    else
-      # Append the name of the non-PIC object the libtool object file.
-      # Only append if the libtool object file exists.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object=none
-
-EOF
-      $show " cp $lobj $obj"
-      $run cp $lobj $obj
-    fi
-
-    $run $mv "${libobj}T" "${libobj}"
-
-    # Unlock the critical section if it was locked
-    if test "$need_locks" != no; then
-      $run $rm "$lockfile"
-    fi
-
-    exit 0
-    ;;
-
-  # libtool link mode
-  link | relink)
-    modename="$modename: link"
-    case $host in
-    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-      # It is impossible to link a dll without this setting, and
-      # we shouldn't force the makefile maintainer to figure out
-      # which system we are compiling for in order to pass an extra
-      # flag for every libtool invocation.
-      # allow_undefined=no
-
-      # FIXME: Unfortunately, there are problems with the above when trying
-      # to make a dll which has undefined symbols, in which case not
-      # even a static library is built.  For now, we need to specify
-      # -no-undefined on the libtool link line when we can be certain
-      # that all symbols are satisfied, otherwise we get a static library.
-      allow_undefined=yes
-      ;;
-    *)
-      allow_undefined=yes
-      ;;
-    esac
-    libtool_args="$nonopt"
-    base_compile="$nonopt $@"
-    compile_command="$nonopt"
-    finalize_command="$nonopt"
-
-    compile_rpath=
-    finalize_rpath=
-    compile_shlibpath=
-    finalize_shlibpath=
-    convenience=
-    old_convenience=
-    deplibs=
-    old_deplibs=
-    compiler_flags=
-    linker_flags=
-    dllsearchpath=
-    lib_search_path=`pwd`
-    inst_prefix_dir=
-
-    avoid_version=no
-    dlfiles=
-    dlprefiles=
-    dlself=no
-    export_dynamic=no
-    export_symbols=
-    export_symbols_regex=
-    generated=
-    libobjs=
-    ltlibs=
-    module=no
-    no_install=no
-    objs=
-    non_pic_objects=
-    precious_files_regex=
-    prefer_static_libs=no
-    preload=no
-    prev=
-    prevarg=
-    release=
-    rpath=
-    xrpath=
-    perm_rpath=
-    temp_rpath=
-    thread_safe=no
-    vinfo=
-    vinfo_number=no
-
-    # Infer tagged configuration to use if any are available and
-    # if one wasn't chosen via the "--tag" command line option.
-    # Only attempt this if the compiler in the base link
-    # command doesn't match the default compiler.
-    if test -n "$available_tags" && test -z "$tagname"; then
-      case $base_compile in
-      # Blanks in the command may have been stripped by the calling shell,
-      # but not from the CC environment variable when configure was run.
-      "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
-      # Blanks at the start of $base_compile will cause this to fail
-      # if we don't check for them as well.
-      *)
-	for z in $available_tags; do
-	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
-	    # Evaluate the configuration.
-	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
-	    case $base_compile in
-	    "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
-	      # The compiler in $compile_command matches
-	      # the one in the tagged configuration.
-	      # Assume this is the tagged configuration we want.
-	      tagname=$z
-	      break
-	      ;;
-	    esac
-	  fi
-	done
-	# If $tagname still isn't set, then no tagged configuration
-	# was found and let the user know that the "--tag" command
-	# line option must be used.
-	if test -z "$tagname"; then
-	  $echo "$modename: unable to infer tagged configuration"
-	  $echo "$modename: specify a tag with \`--tag'" 1>&2
-	  exit 1
-#       else
-#         $echo "$modename: using $tagname tagged configuration"
-	fi
-	;;
-      esac
-    fi
-
-    # We need to know -static, to get the right output filenames.
-    for arg
-    do
-      case $arg in
-      -all-static | -static)
-	if test "X$arg" = "X-all-static"; then
-	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
-	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
-	  fi
-	  if test -n "$link_static_flag"; then
-	    dlopen_self=$dlopen_self_static
-	  fi
-	else
-	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
-	    dlopen_self=$dlopen_self_static
-	  fi
-	fi
-	build_libtool_libs=no
-	build_old_libs=yes
-	prefer_static_libs=yes
-	break
-	;;
-      esac
-    done
-
-    # See if our shared archives depend on static archives.
-    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
-
-    # Go through the arguments, transforming them on the way.
-    while test "$#" -gt 0; do
-      arg="$1"
-      shift
-      case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
-	;;
-      *) qarg=$arg ;;
-      esac
-      libtool_args="$libtool_args $qarg"
-
-      # If the previous option needs an argument, assign it.
-      if test -n "$prev"; then
-	case $prev in
-	output)
-	  compile_command="$compile_command @OUTPUT@"
-	  finalize_command="$finalize_command @OUTPUT@"
-	  ;;
-	esac
-
-	case $prev in
-	dlfiles|dlprefiles)
-	  if test "$preload" = no; then
-	    # Add the symbol object into the linking commands.
-	    compile_command="$compile_command @SYMFILE@"
-	    finalize_command="$finalize_command @SYMFILE@"
-	    preload=yes
-	  fi
-	  case $arg in
-	  *.la | *.lo) ;;  # We handle these cases below.
-	  force)
-	    if test "$dlself" = no; then
-	      dlself=needless
-	      export_dynamic=yes
-	    fi
-	    prev=
-	    continue
-	    ;;
-	  self)
-	    if test "$prev" = dlprefiles; then
-	      dlself=yes
-	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
-	      dlself=yes
-	    else
-	      dlself=needless
-	      export_dynamic=yes
-	    fi
-	    prev=
-	    continue
-	    ;;
-	  *)
-	    if test "$prev" = dlfiles; then
-	      dlfiles="$dlfiles $arg"
-	    else
-	      dlprefiles="$dlprefiles $arg"
-	    fi
-	    prev=
-	    continue
-	    ;;
-	  esac
-	  ;;
-	expsyms)
-	  export_symbols="$arg"
-	  if test ! -f "$arg"; then
-	    $echo "$modename: symbol file \`$arg' does not exist"
-	    exit 1
-	  fi
-	  prev=
-	  continue
-	  ;;
-	expsyms_regex)
-	  export_symbols_regex="$arg"
-	  prev=
-	  continue
-	  ;;
-	inst_prefix)
-	  inst_prefix_dir="$arg"
-	  prev=
-	  continue
-	  ;;
-	precious_regex)
-	  precious_files_regex="$arg"
-	  prev=
-	  continue
-	  ;;
-	release)
-	  release="-$arg"
-	  prev=
-	  continue
-	  ;;
-	objectlist)
-	  if test -f "$arg"; then
-	    save_arg=$arg
-	    moreargs=
-	    for fil in `cat $save_arg`
-	    do
-#	      moreargs="$moreargs $fil"
-	      arg=$fil
-	      # A libtool-controlled object.
-
-	      # Check to see that this really is a libtool object.
-	      if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-		pic_object=
-		non_pic_object=
-
-		# Read the .lo file
-		# If there is no directory component, then add one.
-		case $arg in
-		*/* | *\\*) . $arg ;;
-		*) . ./$arg ;;
-		esac
-
-		if test -z "$pic_object" || \
-		   test -z "$non_pic_object" ||
-		   test "$pic_object" = none && \
-		   test "$non_pic_object" = none; then
-		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
-		  exit 1
-		fi
-
-		# Extract subdirectory from the argument.
-		xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-		if test "X$xdir" = "X$arg"; then
-		  xdir=
-		else
-		  xdir="$xdir/"
-		fi
-
-		if test "$pic_object" != none; then
-		  # Prepend the subdirectory the object is found in.
-		  pic_object="$xdir$pic_object"
-
-		  if test "$prev" = dlfiles; then
-		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-		      dlfiles="$dlfiles $pic_object"
-		      prev=
-		      continue
-		    else
-		      # If libtool objects are unsupported, then we need to preload.
-		      prev=dlprefiles
-		    fi
-		  fi
-
-		  # CHECK ME:  I think I busted this.  -Ossama
-		  if test "$prev" = dlprefiles; then
-		    # Preload the old-style object.
-		    dlprefiles="$dlprefiles $pic_object"
-		    prev=
-		  fi
-
-		  # A PIC object.
-		  libobjs="$libobjs $pic_object"
-		  arg="$pic_object"
-		fi
-
-		# Non-PIC object.
-		if test "$non_pic_object" != none; then
-		  # Prepend the subdirectory the object is found in.
-		  non_pic_object="$xdir$non_pic_object"
-
-		  # A standard non-PIC object
-		  non_pic_objects="$non_pic_objects $non_pic_object"
-		  if test -z "$pic_object" || test "$pic_object" = none ; then
-		    arg="$non_pic_object"
-		  fi
-		fi
-	      else
-		# Only an error if not doing a dry-run.
-		if test -z "$run"; then
-		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
-		  exit 1
-		else
-		  # Dry-run case.
-
-		  # Extract subdirectory from the argument.
-		  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-		  if test "X$xdir" = "X$arg"; then
-		    xdir=
-		  else
-		    xdir="$xdir/"
-		  fi
-
-		  pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
-		  non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
-		  libobjs="$libobjs $pic_object"
-		  non_pic_objects="$non_pic_objects $non_pic_object"
-		fi
-	      fi
-	    done
-	  else
-	    $echo "$modename: link input file \`$save_arg' does not exist"
-	    exit 1
-	  fi
-	  arg=$save_arg
-	  prev=
-	  continue
-	  ;;
-	rpath | xrpath)
-	  # We need an absolute path.
-	  case $arg in
-	  [\\/]* | [A-Za-z]:[\\/]*) ;;
-	  *)
-	    $echo "$modename: only absolute run-paths are allowed" 1>&2
-	    exit 1
-	    ;;
-	  esac
-	  if test "$prev" = rpath; then
-	    case "$rpath " in
-	    *" $arg "*) ;;
-	    *) rpath="$rpath $arg" ;;
-	    esac
-	  else
-	    case "$xrpath " in
-	    *" $arg "*) ;;
-	    *) xrpath="$xrpath $arg" ;;
-	    esac
-	  fi
-	  prev=
-	  continue
-	  ;;
-	xcompiler)
-	  compiler_flags="$compiler_flags $qarg"
-	  prev=
-	  compile_command="$compile_command $qarg"
-	  finalize_command="$finalize_command $qarg"
-	  continue
-	  ;;
-	xlinker)
-	  linker_flags="$linker_flags $qarg"
-	  compiler_flags="$compiler_flags $wl$qarg"
-	  prev=
-	  compile_command="$compile_command $wl$qarg"
-	  finalize_command="$finalize_command $wl$qarg"
-	  continue
-	  ;;
-	xcclinker)
-	  linker_flags="$linker_flags $qarg"
-	  compiler_flags="$compiler_flags $qarg"
-	  prev=
-	  compile_command="$compile_command $qarg"
-	  finalize_command="$finalize_command $qarg"
-	  continue
-	  ;;
-	*)
-	  eval "$prev=\"\$arg\""
-	  prev=
-	  continue
-	  ;;
-	esac
-      fi # test -n "$prev"
-
-      prevarg="$arg"
-
-      case $arg in
-      -all-static)
-	if test -n "$link_static_flag"; then
-	  compile_command="$compile_command $link_static_flag"
-	  finalize_command="$finalize_command $link_static_flag"
-	fi
-	continue
-	;;
-
-      -allow-undefined)
-	# FIXME: remove this flag sometime in the future.
-	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
-	continue
-	;;
-
-      -avoid-version)
-	avoid_version=yes
-	continue
-	;;
-
-      -dlopen)
-	prev=dlfiles
-	continue
-	;;
-
-      -dlpreopen)
-	prev=dlprefiles
-	continue
-	;;
-
-      -export-dynamic)
-	export_dynamic=yes
-	continue
-	;;
-
-      -export-symbols | -export-symbols-regex)
-	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
-	  $echo "$modename: more than one -exported-symbols argument is not allowed"
-	  exit 1
-	fi
-	if test "X$arg" = "X-export-symbols"; then
-	  prev=expsyms
-	else
-	  prev=expsyms_regex
-	fi
-	continue
-	;;
-
-      -inst-prefix-dir)
-	prev=inst_prefix
-	continue
-	;;
-
-      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
-      # so, if we see these flags be careful not to treat them like -L
-      -L[A-Z][A-Z]*:*)
-	case $with_gcc/$host in
-	no/*-*-irix* | /*-*-irix*)
-	  compile_command="$compile_command $arg"
-	  finalize_command="$finalize_command $arg"
-	  ;;
-	esac
-	continue
-	;;
-
-      -L*)
-	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
-	# We need an absolute path.
-	case $dir in
-	[\\/]* | [A-Za-z]:[\\/]*) ;;
-	*)
-	  absdir=`cd "$dir" && pwd`
-	  if test -z "$absdir"; then
-	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
-	    exit 1
-	  fi
-	  dir="$absdir"
-	  ;;
-	esac
-	case "$deplibs " in
-	*" -L$dir "*) ;;
-	*)
-	  deplibs="$deplibs -L$dir"
-	  lib_search_path="$lib_search_path $dir"
-	  ;;
-	esac
-	case $host in
-	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-	  case :$dllsearchpath: in
-	  *":$dir:"*) ;;
-	  *) dllsearchpath="$dllsearchpath:$dir";;
-	  esac
-	  ;;
-	esac
-	continue
-	;;
-
-      -l*)
-	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
-	  case $host in
-	  *-*-cygwin* | *-*-pw32* | *-*-beos*)
-	    # These systems don't actually have a C or math library (as such)
-	    continue
-	    ;;
-	  *-*-mingw* | *-*-os2*)
-	    # These systems don't actually have a C library (as such)
-	    test "X$arg" = "X-lc" && continue
-	    ;;
-	  *-*-openbsd* | *-*-freebsd*)
-	    # Do not include libc due to us having libc/libc_r.
-	    test "X$arg" = "X-lc" && continue
-	    ;;
-	  *-*-rhapsody* | *-*-darwin1.[012])
-	    # Rhapsody C and math libraries are in the System framework
-	    deplibs="$deplibs -framework System"
-	    continue
-	  esac
-	elif test "X$arg" = "X-lc_r"; then
-	 case $host in
-	 *-*-openbsd* | *-*-freebsd*)
-	   # Do not include libc_r directly, use -pthread flag.
-	   continue
-	   ;;
-	 esac
-	fi
-	deplibs="$deplibs $arg"
-	continue
-	;;
-
-     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
-	deplibs="$deplibs $arg"
-	continue
-	;;
-
-      -module)
-	module=yes
-	continue
-	;;
-
-      # gcc -m* arguments should be passed to the linker via $compiler_flags
-      # in order to pass architecture information to the linker
-      # (e.g. 32 vs 64-bit).  This may also be accomplished via -Wl,-mfoo
-      # but this is not reliable with gcc because gcc may use -mfoo to
-      # select a different linker, different libraries, etc, while
-      # -Wl,-mfoo simply passes -mfoo to the linker.
-      -m*)
-	# Unknown arguments in both finalize_command and compile_command need
-	# to be aesthetically quoted because they are evaled later.
-	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-	case $arg in
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	  arg="\"$arg\""
-	  ;;
-	esac
-        compile_command="$compile_command $arg"
-        finalize_command="$finalize_command $arg"
-        if test "$with_gcc" = "yes" ; then
-          compiler_flags="$compiler_flags $arg"
-        fi
-        continue
-        ;;
-
-      -shrext)
-	prev=shrext
-	continue
-	;;
-
-      -no-fast-install)
-	fast_install=no
-	continue
-	;;
-
-      -no-install)
-	case $host in
-	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-	  # The PATH hackery in wrapper scripts is required on Windows
-	  # in order for the loader to find any dlls it needs.
-	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
-	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
-	  fast_install=no
-	  ;;
-	*) no_install=yes ;;
-	esac
-	continue
-	;;
-
-      -no-undefined)
-	allow_undefined=no
-	continue
-	;;
-
-      -objectlist)
-	prev=objectlist
-	continue
-	;;
-
-      -o) prev=output ;;
-
-      -precious-files-regex)
-	prev=precious_regex
-	continue
-	;;
-
-      -release)
-	prev=release
-	continue
-	;;
-
-      -rpath)
-	prev=rpath
-	continue
-	;;
-
-      -R)
-	prev=xrpath
-	continue
-	;;
-
-      -R*)
-	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
-	# We need an absolute path.
-	case $dir in
-	[\\/]* | [A-Za-z]:[\\/]*) ;;
-	*)
-	  $echo "$modename: only absolute run-paths are allowed" 1>&2
-	  exit 1
-	  ;;
-	esac
-	case "$xrpath " in
-	*" $dir "*) ;;
-	*) xrpath="$xrpath $dir" ;;
-	esac
-	continue
-	;;
-
-      -static)
-	# The effects of -static are defined in a previous loop.
-	# We used to do the same as -all-static on platforms that
-	# didn't have a PIC flag, but the assumption that the effects
-	# would be equivalent was wrong.  It would break on at least
-	# Digital Unix and AIX.
-	continue
-	;;
-
-      -thread-safe)
-	thread_safe=yes
-	continue
-	;;
-
-      -version-info)
-	prev=vinfo
-	continue
-	;;
-      -version-number)
-	prev=vinfo
-	vinfo_number=yes
-	continue
-	;;
-
-      -Wc,*)
-	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
-	arg=
-	save_ifs="$IFS"; IFS=','
-	for flag in $args; do
-	  IFS="$save_ifs"
-	  case $flag in
-	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	    flag="\"$flag\""
-	    ;;
-	  esac
-	  arg="$arg $wl$flag"
-	  compiler_flags="$compiler_flags $flag"
-	done
-	IFS="$save_ifs"
-	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
-	;;
-
-      -Wl,*)
-	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
-	arg=
-	save_ifs="$IFS"; IFS=','
-	for flag in $args; do
-	  IFS="$save_ifs"
-	  case $flag in
-	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	    flag="\"$flag\""
-	    ;;
-	  esac
-	  arg="$arg $wl$flag"
-	  compiler_flags="$compiler_flags $wl$flag"
-	  linker_flags="$linker_flags $flag"
-	done
-	IFS="$save_ifs"
-	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
-	;;
-
-      -Xcompiler)
-	prev=xcompiler
-	continue
-	;;
-
-      -Xlinker)
-	prev=xlinker
-	continue
-	;;
-
-      -XCClinker)
-	prev=xcclinker
-	continue
-	;;
-
-      # Some other compiler flag.
-      -* | +*)
-	# Unknown arguments in both finalize_command and compile_command need
-	# to be aesthetically quoted because they are evaled later.
-	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-	case $arg in
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	  arg="\"$arg\""
-	  ;;
-	esac
-	;;
-
-      *.$objext)
-	# A standard object.
-	objs="$objs $arg"
-	;;
-
-      *.lo)
-	# A libtool-controlled object.
-
-	# Check to see that this really is a libtool object.
-	if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-	  pic_object=
-	  non_pic_object=
-
-	  # Read the .lo file
-	  # If there is no directory component, then add one.
-	  case $arg in
-	  */* | *\\*) . $arg ;;
-	  *) . ./$arg ;;
-	  esac
-
-	  if test -z "$pic_object" || \
-	     test -z "$non_pic_object" ||
-	     test "$pic_object" = none && \
-	     test "$non_pic_object" = none; then
-	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
-	    exit 1
-	  fi
-
-	  # Extract subdirectory from the argument.
-	  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-	  if test "X$xdir" = "X$arg"; then
-	    xdir=
- 	  else
-	    xdir="$xdir/"
-	  fi
-
-	  if test "$pic_object" != none; then
-	    # Prepend the subdirectory the object is found in.
-	    pic_object="$xdir$pic_object"
-
-	    if test "$prev" = dlfiles; then
-	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-		dlfiles="$dlfiles $pic_object"
-		prev=
-		continue
-	      else
-		# If libtool objects are unsupported, then we need to preload.
-		prev=dlprefiles
-	      fi
-	    fi
-
-	    # CHECK ME:  I think I busted this.  -Ossama
-	    if test "$prev" = dlprefiles; then
-	      # Preload the old-style object.
-	      dlprefiles="$dlprefiles $pic_object"
-	      prev=
-	    fi
-
-	    # A PIC object.
-	    libobjs="$libobjs $pic_object"
-	    arg="$pic_object"
-	  fi
-
-	  # Non-PIC object.
-	  if test "$non_pic_object" != none; then
-	    # Prepend the subdirectory the object is found in.
-	    non_pic_object="$xdir$non_pic_object"
-
-	    # A standard non-PIC object
-	    non_pic_objects="$non_pic_objects $non_pic_object"
-	    if test -z "$pic_object" || test "$pic_object" = none ; then
-	      arg="$non_pic_object"
-	    fi
-	  fi
-	else
-	  # Only an error if not doing a dry-run.
-	  if test -z "$run"; then
-	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
-	    exit 1
-	  else
-	    # Dry-run case.
-
-	    # Extract subdirectory from the argument.
-	    xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-	    if test "X$xdir" = "X$arg"; then
-	      xdir=
-	    else
-	      xdir="$xdir/"
-	    fi
-
-	    pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
-	    non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
-	    libobjs="$libobjs $pic_object"
-	    non_pic_objects="$non_pic_objects $non_pic_object"
-	  fi
-	fi
-	;;
-
-      *.$libext)
-	# An archive.
-	deplibs="$deplibs $arg"
-	old_deplibs="$old_deplibs $arg"
-	continue
-	;;
-
-      *.la)
-	# A libtool-controlled library.
-
-	if test "$prev" = dlfiles; then
-	  # This library was specified with -dlopen.
-	  dlfiles="$dlfiles $arg"
-	  prev=
-	elif test "$prev" = dlprefiles; then
-	  # The library was specified with -dlpreopen.
-	  dlprefiles="$dlprefiles $arg"
-	  prev=
-	else
-	  deplibs="$deplibs $arg"
-	fi
-	continue
-	;;
-
-      # Some other compiler argument.
-      *)
-	# Unknown arguments in both finalize_command and compile_command need
-	# to be aesthetically quoted because they are evaled later.
-	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-	case $arg in
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	  arg="\"$arg\""
-	  ;;
-	esac
-	;;
-      esac # arg
-
-      # Now actually substitute the argument into the commands.
-      if test -n "$arg"; then
-	compile_command="$compile_command $arg"
-	finalize_command="$finalize_command $arg"
-      fi
-    done # argument parsing loop
-
-    if test -n "$prev"; then
-      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
-      eval arg=\"$export_dynamic_flag_spec\"
-      compile_command="$compile_command $arg"
-      finalize_command="$finalize_command $arg"
-    fi
-
-    oldlibs=
-    # calculate the name of the file, without its directory
-    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
-    libobjs_save="$libobjs"
-
-    if test -n "$shlibpath_var"; then
-      # get the directories listed in $shlibpath_var
-      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
-    else
-      shlib_search_path=
-    fi
-    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
-    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
-
-    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
-    if test "X$output_objdir" = "X$output"; then
-      output_objdir="$objdir"
-    else
-      output_objdir="$output_objdir/$objdir"
-    fi
-    # Create the object directory.
-    if test ! -d "$output_objdir"; then
-      $show "$mkdir $output_objdir"
-      $run $mkdir $output_objdir
-      status=$?
-      if test "$status" -ne 0 && test ! -d "$output_objdir"; then
-	exit $status
-      fi
-    fi
-
-    # Determine the type of output
-    case $output in
-    "")
-      $echo "$modename: you must specify an output file" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-      ;;
-    *.$libext) linkmode=oldlib ;;
-    *.lo | *.$objext) linkmode=obj ;;
-    *.la) linkmode=lib ;;
-    *) linkmode=prog ;; # Anything else should be a program.
-    esac
-
-    case $host in
-    *cygwin* | *mingw* | *pw32*)
-      # don't eliminate duplcations in $postdeps and $predeps
-      duplicate_compiler_generated_deps=yes
-      ;;
-    *)
-      duplicate_compiler_generated_deps=$duplicate_deps
-      ;;
-    esac
-    specialdeplibs=
-
-    libs=
-    # Find all interdependent deplibs by searching for libraries
-    # that are linked more than once (e.g. -la -lb -la)
-    for deplib in $deplibs; do
-      if test "X$duplicate_deps" = "Xyes" ; then
-	case "$libs " in
-	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-	esac
-      fi
-      libs="$libs $deplib"
-    done
-
-    if test "$linkmode" = lib; then
-      libs="$predeps $libs $compiler_lib_search_path $postdeps"
-
-      # Compute libraries that are listed more than once in $predeps
-      # $postdeps and mark them as special (i.e., whose duplicates are
-      # not to be eliminated).
-      pre_post_deps=
-      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
-	for pre_post_dep in $predeps $postdeps; do
-	  case "$pre_post_deps " in
-	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
-	  esac
-	  pre_post_deps="$pre_post_deps $pre_post_dep"
-	done
-      fi
-      pre_post_deps=
-    fi
-
-    deplibs=
-    newdependency_libs=
-    newlib_search_path=
-    need_relink=no # whether we're linking any uninstalled libtool libraries
-    notinst_deplibs= # not-installed libtool libraries
-    notinst_path= # paths that contain not-installed libtool libraries
-    case $linkmode in
-    lib)
-	passes="conv link"
-	for file in $dlfiles $dlprefiles; do
-	  case $file in
-	  *.la) ;;
-	  *)
-	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
-	    exit 1
-	    ;;
-	  esac
-	done
-	;;
-    prog)
-	compile_deplibs=
-	finalize_deplibs=
-	alldeplibs=no
-	newdlfiles=
-	newdlprefiles=
-	passes="conv scan dlopen dlpreopen link"
-	;;
-    *)  passes="conv"
-	;;
-    esac
-    for pass in $passes; do
-      if test "$linkmode,$pass" = "lib,link" ||
-	 test "$linkmode,$pass" = "prog,scan"; then
-	libs="$deplibs"
-	deplibs=
-      fi
-      if test "$linkmode" = prog; then
-	case $pass in
-	dlopen) libs="$dlfiles" ;;
-	dlpreopen) libs="$dlprefiles" ;;
-	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
-	esac
-      fi
-      if test "$pass" = dlopen; then
-	# Collect dlpreopened libraries
-	save_deplibs="$deplibs"
-	deplibs=
-      fi
-      for deplib in $libs; do
-	lib=
-	found=no
-	case $deplib in
-	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
-	  if test "$linkmode,$pass" = "prog,link"; then
-	    compile_deplibs="$deplib $compile_deplibs"
-	    finalize_deplibs="$deplib $finalize_deplibs"
-	  else
-	    deplibs="$deplib $deplibs"
-	  fi
-	  continue
-	  ;;
-	-l*)
-	  if test "$linkmode" != lib && test "$linkmode" != prog; then
-	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
-	    continue
-	  fi
-	  if test "$pass" = conv; then
-	    deplibs="$deplib $deplibs"
-	    continue
-	  fi
-	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
-	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
-	    for search_ext in .la $shrext .so .a; do
-	      # Search the libtool library
-	      lib="$searchdir/lib${name}${search_ext}"
-	      if test -f "$lib"; then
-		if test "$search_ext" = ".la"; then
-		  found=yes
-		else
-		  found=no
-		fi
-		break 2
-	      fi
-	    done
-	  done
-	  if test "$found" != yes; then
-	    # deplib doesn't seem to be a libtool library
-	    if test "$linkmode,$pass" = "prog,link"; then
-	      compile_deplibs="$deplib $compile_deplibs"
-	      finalize_deplibs="$deplib $finalize_deplibs"
-	    else
-	      deplibs="$deplib $deplibs"
-	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
-	    fi
-	    continue
-	  else # deplib is a libtool library
-	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
-	    # We need to do some special things here, and not later.
-	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-	      case " $predeps $postdeps " in
-	      *" $deplib "*)
-		if (${SED} -e '2q' $lib |
-                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-		  library_names=
-		  old_library=
-		  case $lib in
-		  */* | *\\*) . $lib ;;
-		  *) . ./$lib ;;
-		  esac
-		  for l in $old_library $library_names; do
-		    ll="$l"
-		  done
-		  if test "X$ll" = "X$old_library" ; then # only static version available
-		    found=no
-		    ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
-		    test "X$ladir" = "X$lib" && ladir="."
-		    lib=$ladir/$old_library
-		    if test "$linkmode,$pass" = "prog,link"; then
-		      compile_deplibs="$deplib $compile_deplibs"
-		      finalize_deplibs="$deplib $finalize_deplibs"
-		    else
-		      deplibs="$deplib $deplibs"
-		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
-		    fi
-		    continue
-		  fi
-		fi
-	        ;;
-	      *) ;;
-	      esac
-	    fi
-	  fi
-	  ;; # -l
-	-L*)
-	  case $linkmode in
-	  lib)
-	    deplibs="$deplib $deplibs"
-	    test "$pass" = conv && continue
-	    newdependency_libs="$deplib $newdependency_libs"
-	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
-	    ;;
-	  prog)
-	    if test "$pass" = conv; then
-	      deplibs="$deplib $deplibs"
-	      continue
-	    fi
-	    if test "$pass" = scan; then
-	      deplibs="$deplib $deplibs"
-	      newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
-	    else
-	      compile_deplibs="$deplib $compile_deplibs"
-	      finalize_deplibs="$deplib $finalize_deplibs"
-	    fi
-	    ;;
-	  *)
-	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
-	    ;;
-	  esac # linkmode
-	  continue
-	  ;; # -L
-	-R*)
-	  if test "$pass" = link; then
-	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
-	    # Make sure the xrpath contains only unique directories.
-	    case "$xrpath " in
-	    *" $dir "*) ;;
-	    *) xrpath="$xrpath $dir" ;;
-	    esac
-	  fi
-	  deplibs="$deplib $deplibs"
-	  continue
-	  ;;
-	*.la) lib="$deplib" ;;
-	*.$libext)
-	  if test "$pass" = conv; then
-	    deplibs="$deplib $deplibs"
-	    continue
-	  fi
-	  case $linkmode in
-	  lib)
-	    if test "$deplibs_check_method" != pass_all; then
-	      $echo
-	      $echo "*** Warning: Trying to link with static lib archive $deplib."
-	      $echo "*** I have the capability to make that library automatically link in when"
-	      $echo "*** you link to this library.  But I can only do this if you have a"
-	      $echo "*** shared version of the library, which you do not appear to have"
-	      $echo "*** because the file extensions .$libext of this argument makes me believe"
-	      $echo "*** that it is just a static archive that I should not used here."
-	    else
-	      $echo
-	      $echo "*** Warning: Linking the shared library $output against the"
-	      $echo "*** static library $deplib is not portable!"
-	      deplibs="$deplib $deplibs"
-	    fi
-	    continue
-	    ;;
-	  prog)
-	    if test "$pass" != link; then
-	      deplibs="$deplib $deplibs"
-	    else
-	      compile_deplibs="$deplib $compile_deplibs"
-	      finalize_deplibs="$deplib $finalize_deplibs"
-	    fi
-	    continue
-	    ;;
-	  esac # linkmode
-	  ;; # *.$libext
-	*.lo | *.$objext)
-	  if test "$pass" = conv; then
-	    deplibs="$deplib $deplibs"
-	  elif test "$linkmode" = prog; then
-	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
-	      # If there is no dlopen support or we're linking statically,
-	      # we need to preload.
-	      newdlprefiles="$newdlprefiles $deplib"
-	      compile_deplibs="$deplib $compile_deplibs"
-	      finalize_deplibs="$deplib $finalize_deplibs"
-	    else
-	      newdlfiles="$newdlfiles $deplib"
-	    fi
-	  fi
-	  continue
-	  ;;
-	%DEPLIBS%)
-	  alldeplibs=yes
-	  continue
-	  ;;
-	esac # case $deplib
-	if test "$found" = yes || test -f "$lib"; then :
-	else
-	  $echo "$modename: cannot find the library \`$lib'" 1>&2
-	  exit 1
-	fi
-
-	# Check to see that this really is a libtool archive.
-	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-	else
-	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-	  exit 1
-	fi
-
-	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
-	test "X$ladir" = "X$lib" && ladir="."
-
-	dlname=
-	dlopen=
-	dlpreopen=
-	libdir=
-	library_names=
-	old_library=
-	# If the library was installed with an old release of libtool,
-	# it will not redefine variables installed, or shouldnotlink
-	installed=yes
-	shouldnotlink=no
-
-	# Read the .la file
-	case $lib in
-	*/* | *\\*) . $lib ;;
-	*) . ./$lib ;;
-	esac
-
-	if test "$linkmode,$pass" = "lib,link" ||
-	   test "$linkmode,$pass" = "prog,scan" ||
-	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
-	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
-	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
-	fi
-
-	if test "$pass" = conv; then
-	  # Only check for convenience libraries
-	  deplibs="$lib $deplibs"
-	  if test -z "$libdir"; then
-	    if test -z "$old_library"; then
-	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
-	      exit 1
-	    fi
-	    # It is a libtool convenience library, so add in its objects.
-	    convenience="$convenience $ladir/$objdir/$old_library"
-	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
-	    tmp_libs=
-	    for deplib in $dependency_libs; do
-	      deplibs="$deplib $deplibs"
-              if test "X$duplicate_deps" = "Xyes" ; then
-	        case "$tmp_libs " in
-	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-	        esac
-              fi
-	      tmp_libs="$tmp_libs $deplib"
-	    done
-	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
-	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
-	    exit 1
-	  fi
-	  continue
-	fi # $pass = conv
-
-    
-	# Get the name of the library we link against.
-	linklib=
-	for l in $old_library $library_names; do
-	  linklib="$l"
-	done
-	if test -z "$linklib"; then
-	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
-	  exit 1
-	fi
-
-	# This library was specified with -dlopen.
-	if test "$pass" = dlopen; then
-	  if test -z "$libdir"; then
-	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
-	    exit 1
-	  fi
-	  if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
-	    # If there is no dlname, no dlopen support or we're linking
-	    # statically, we need to preload.  We also need to preload any
-	    # dependent libraries so libltdl's deplib preloader doesn't
-	    # bomb out in the load deplibs phase.
-	    dlprefiles="$dlprefiles $lib $dependency_libs"
-	  else
-	    newdlfiles="$newdlfiles $lib"
-	  fi
-	  continue
-	fi # $pass = dlopen
-
-	# We need an absolute path.
-	case $ladir in
-	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
-	*)
-	  abs_ladir=`cd "$ladir" && pwd`
-	  if test -z "$abs_ladir"; then
-	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
-	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
-	    abs_ladir="$ladir"
-	  fi
-	  ;;
-	esac
-	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-
-	# Find the relevant object directory and library name.
-	if test "X$installed" = Xyes; then
-	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
-	    dir="$ladir"
-	    absdir="$abs_ladir"
-	    libdir="$abs_ladir"
-	  else
-	    dir="$libdir"
-	    absdir="$libdir"
-	  fi
-	else
-	  dir="$ladir/$objdir"
-	  absdir="$abs_ladir/$objdir"
-	  # Remove this search path later
-	  notinst_path="$notinst_path $abs_ladir"
-	fi # $installed = yes
-	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
-
-	# This library was specified with -dlpreopen.
-	if test "$pass" = dlpreopen; then
-	  if test -z "$libdir"; then
-	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
-	    exit 1
-	  fi
-	  # Prefer using a static library (so that no silly _DYNAMIC symbols
-	  # are required to link).
-	  if test -n "$old_library"; then
-	    newdlprefiles="$newdlprefiles $dir/$old_library"
-	  # Otherwise, use the dlname, so that lt_dlopen finds it.
-	  elif test -n "$dlname"; then
-	    newdlprefiles="$newdlprefiles $dir/$dlname"
-	  else
-	    newdlprefiles="$newdlprefiles $dir/$linklib"
-	  fi
-	fi # $pass = dlpreopen
-
-	if test -z "$libdir"; then
-	  # Link the convenience library
-	  if test "$linkmode" = lib; then
-	    deplibs="$dir/$old_library $deplibs"
-	  elif test "$linkmode,$pass" = "prog,link"; then
-	    compile_deplibs="$dir/$old_library $compile_deplibs"
-	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
-	  else
-	    deplibs="$lib $deplibs" # used for prog,scan pass
-	  fi
-	  continue
-	fi
-
-    
-	if test "$linkmode" = prog && test "$pass" != link; then
-	  newlib_search_path="$newlib_search_path $ladir"
-	  deplibs="$lib $deplibs"
-
-	  linkalldeplibs=no
-	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
-	     test "$build_libtool_libs" = no; then
-	    linkalldeplibs=yes
-	  fi
-
-	  tmp_libs=
-	  for deplib in $dependency_libs; do
-	    case $deplib in
-	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
-	    esac
-	    # Need to link against all dependency_libs?
-	    if test "$linkalldeplibs" = yes; then
-	      deplibs="$deplib $deplibs"
-	    else
-	      # Need to hardcode shared library paths
-	      # or/and link against static libraries
-	      newdependency_libs="$deplib $newdependency_libs"
-	    fi
-	    if test "X$duplicate_deps" = "Xyes" ; then
-	      case "$tmp_libs " in
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-	      esac
-	    fi
-	    tmp_libs="$tmp_libs $deplib"
-	  done # for deplib
-	  continue
-	fi # $linkmode = prog...
-
-	if test "$linkmode,$pass" = "prog,link"; then
-	  if test -n "$library_names" &&
-	     { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
-	    # We need to hardcode the library path
-	    if test -n "$shlibpath_var"; then
-	      # Make sure the rpath contains only unique directories.
-	      case "$temp_rpath " in
-	      *" $dir "*) ;;
-	      *" $absdir "*) ;;
-	      *) temp_rpath="$temp_rpath $dir" ;;
-	      esac
-	    fi
-
-	    # Hardcode the library path.
-	    # Skip directories that are in the system default run-time
-	    # search path.
-	    case " $sys_lib_dlsearch_path " in
-	    *" $absdir "*) ;;
-	    *)
-	      case "$compile_rpath " in
-	      *" $absdir "*) ;;
-	      *) compile_rpath="$compile_rpath $absdir"
-	      esac
-	      ;;
-	    esac
-	    case " $sys_lib_dlsearch_path " in
-	    *" $libdir "*) ;;
-	    *)
-	      case "$finalize_rpath " in
-	      *" $libdir "*) ;;
-	      *) finalize_rpath="$finalize_rpath $libdir"
-	      esac
-	      ;;
-	    esac
-	  fi # $linkmode,$pass = prog,link...
-
-	  if test "$alldeplibs" = yes &&
-	     { test "$deplibs_check_method" = pass_all ||
-	       { test "$build_libtool_libs" = yes &&
-		 test -n "$library_names"; }; }; then
-	    # We only need to search for static libraries
-	    continue
-	  fi
-	fi
-
-	link_static=no # Whether the deplib will be linked statically
-	if test -n "$library_names" &&
-	   { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
-	  if test "$installed" = no; then
-	    notinst_deplibs="$notinst_deplibs $lib"
-	    need_relink=yes
-	  fi
-	  # This is a shared library
-	
-      # Warn about portability, can't link against -module's on some systems (darwin)
-      if test "$shouldnotlink" = yes && test "$pass" = link ; then
-	    $echo
-	    if test "$linkmode" = prog; then
-	      $echo "*** Warning: Linking the executable $output against the loadable module"
-	    else
-	      $echo "*** Warning: Linking the shared library $output against the loadable module"
-	    fi
-	    $echo "*** $linklib is not portable!"    
-      fi	  
-	  if test "$linkmode" = lib &&
-	     test "$hardcode_into_libs" = yes; then
-	    # Hardcode the library path.
-	    # Skip directories that are in the system default run-time
-	    # search path.
-	    case " $sys_lib_dlsearch_path " in
-	    *" $absdir "*) ;;
-	    *)
-	      case "$compile_rpath " in
-	      *" $absdir "*) ;;
-	      *) compile_rpath="$compile_rpath $absdir"
-	      esac
-	      ;;
-	    esac
-	    case " $sys_lib_dlsearch_path " in
-	    *" $libdir "*) ;;
-	    *)
-	      case "$finalize_rpath " in
-	      *" $libdir "*) ;;
-	      *) finalize_rpath="$finalize_rpath $libdir"
-	      esac
-	      ;;
-	    esac
-	  fi
-
-	  if test -n "$old_archive_from_expsyms_cmds"; then
-	    # figure out the soname
-	    set dummy $library_names
-	    realname="$2"
-	    shift; shift
-	    libname=`eval \\$echo \"$libname_spec\"`
-	    # use dlname if we got it. it's perfectly good, no?
-	    if test -n "$dlname"; then
-	      soname="$dlname"
-	    elif test -n "$soname_spec"; then
-	      # bleh windows
-	      case $host in
-	      *cygwin* | mingw*)
-		major=`expr $current - $age`
-		versuffix="-$major"
-		;;
-	      esac
-	      eval soname=\"$soname_spec\"
-	    else
-	      soname="$realname"
-	    fi
-
-	    # Make a new name for the extract_expsyms_cmds to use
-	    soroot="$soname"
-	    soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
-	    newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
-
-	    # If the library has no export list, then create one now
-	    if test -f "$output_objdir/$soname-def"; then :
-	    else
-	      $show "extracting exported symbol list from \`$soname'"
-	      save_ifs="$IFS"; IFS='~'
-	      cmds=$extract_expsyms_cmds
-	      for cmd in $cmds; do
-		IFS="$save_ifs"
-		eval cmd=\"$cmd\"
-		$show "$cmd"
-		$run eval "$cmd" || exit $?
-	      done
-	      IFS="$save_ifs"
-	    fi
-
-	    # Create $newlib
-	    if test -f "$output_objdir/$newlib"; then :; else
-	      $show "generating import library for \`$soname'"
-	      save_ifs="$IFS"; IFS='~'
-	      cmds=$old_archive_from_expsyms_cmds
-	      for cmd in $cmds; do
-		IFS="$save_ifs"
-		eval cmd=\"$cmd\"
-		$show "$cmd"
-		$run eval "$cmd" || exit $?
-	      done
-	      IFS="$save_ifs"
-	    fi
-	    # make sure the library variables are pointing to the new library
-	    dir=$output_objdir
-	    linklib=$newlib
-	  fi # test -n "$old_archive_from_expsyms_cmds"
-
-	  if test "$linkmode" = prog || test "$mode" != relink; then
-	    add_shlibpath=
-	    add_dir=
-	    add=
-	    lib_linked=yes
-	    case $hardcode_action in
-	    immediate | unsupported)
-	      if test "$hardcode_direct" = no; then
-		add="$dir/$linklib"
-		case $host in
-		  *-*-sco3.2v5* ) add_dir="-L$dir" ;;
-		  *-*-darwin* )
-		    # if the lib is a module then we can not link against it, someone
-		    # is ignoring the new warnings I added
-		    if /usr/bin/file -L $add 2> /dev/null | grep "bundle" >/dev/null ; then
-		      $echo "** Warning, lib $linklib is a module, not a shared library"
-		      if test -z "$old_library" ; then
-		        $echo
-		        $echo "** And there doesn't seem to be a static archive available"
-		        $echo "** The link will probably fail, sorry"
-		      else
-		        add="$dir/$old_library"
-		      fi 
-		    fi
-		esac
-	      elif test "$hardcode_minus_L" = no; then
-		case $host in
-		*-*-sunos*) add_shlibpath="$dir" ;;
-		esac
-		add_dir="-L$dir"
-		add="-l$name"
-	      elif test "$hardcode_shlibpath_var" = no; then
-		add_shlibpath="$dir"
-		add="-l$name"
-	      else
-		lib_linked=no
-	      fi
-	      ;;
-	    relink)
-	      if test "$hardcode_direct" = yes; then
-		add="$dir/$linklib"
-	      elif test "$hardcode_minus_L" = yes; then
-		add_dir="-L$dir"
-		# Try looking first in the location we're being installed to.
-		if test -n "$inst_prefix_dir"; then
-		  case "$libdir" in
-		    [\\/]*)
-		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
-		      ;;
-		  esac
-		fi
-		add="-l$name"
-	      elif test "$hardcode_shlibpath_var" = yes; then
-		add_shlibpath="$dir"
-		add="-l$name"
-	      else
-		lib_linked=no
-	      fi
-	      ;;
-	    *) lib_linked=no ;;
-	    esac
-
-	    if test "$lib_linked" != yes; then
-	      $echo "$modename: configuration error: unsupported hardcode properties"
-	      exit 1
-	    fi
-
-	    if test -n "$add_shlibpath"; then
-	      case :$compile_shlibpath: in
-	      *":$add_shlibpath:"*) ;;
-	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
-	      esac
-	    fi
-	    if test "$linkmode" = prog; then
-	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
-	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
-	    else
-	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
-	      test -n "$add" && deplibs="$add $deplibs"
-	      if test "$hardcode_direct" != yes && \
-		 test "$hardcode_minus_L" != yes && \
-		 test "$hardcode_shlibpath_var" = yes; then
-		case :$finalize_shlibpath: in
-		*":$libdir:"*) ;;
-		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
-		esac
-	      fi
-	    fi
-	  fi
-
-	  if test "$linkmode" = prog || test "$mode" = relink; then
-	    add_shlibpath=
-	    add_dir=
-	    add=
-	    # Finalize command for both is simple: just hardcode it.
-	    if test "$hardcode_direct" = yes; then
-	      add="$libdir/$linklib"
-	    elif test "$hardcode_minus_L" = yes; then
-	      add_dir="-L$libdir"
-	      add="-l$name"
-	    elif test "$hardcode_shlibpath_var" = yes; then
-	      case :$finalize_shlibpath: in
-	      *":$libdir:"*) ;;
-	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
-	      esac
-	      add="-l$name"
-	    elif test "$hardcode_automatic" = yes; then
-	      if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then
-	        add="$inst_prefix_dir$libdir/$linklib"
-	      else
-	        add="$libdir/$linklib"
-	      fi
-	    else
-	      # We cannot seem to hardcode it, guess we'll fake it.
-	      add_dir="-L$libdir"
-	      # Try looking first in the location we're being installed to.
-	      if test -n "$inst_prefix_dir"; then
-		case "$libdir" in
-		  [\\/]*)
-		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
-		    ;;
-		esac
-	      fi
-	      add="-l$name"
-	    fi
-
-	    if test "$linkmode" = prog; then
-	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
-	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
-	    else
-	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
-	      test -n "$add" && deplibs="$add $deplibs"
-	    fi
-	  fi
-	elif test "$linkmode" = prog; then
-	  # Here we assume that one of hardcode_direct or hardcode_minus_L
-	  # is not unsupported.  This is valid on all known static and
-	  # shared platforms.
-	  if test "$hardcode_direct" != unsupported; then
-	    test -n "$old_library" && linklib="$old_library"
-	    compile_deplibs="$dir/$linklib $compile_deplibs"
-	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
-	  else
-	    compile_deplibs="-l$name -L$dir $compile_deplibs"
-	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
-	  fi
-	elif test "$build_libtool_libs" = yes; then
-	  # Not a shared library
-	  if test "$deplibs_check_method" != pass_all; then
-	    # We're trying link a shared library against a static one
-	    # but the system doesn't support it.
-
-	    # Just print a warning and add the library to dependency_libs so
-	    # that the program can be linked against the static library.
-	    $echo
-	    $echo "*** Warning: This system can not link to static lib archive $lib."
-	    $echo "*** I have the capability to make that library automatically link in when"
-	    $echo "*** you link to this library.  But I can only do this if you have a"
-	    $echo "*** shared version of the library, which you do not appear to have."
-	    if test "$module" = yes; then
-	      $echo "*** But as you try to build a module library, libtool will still create "
-	      $echo "*** a static module, that should work as long as the dlopening application"
-	      $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
-	      if test -z "$global_symbol_pipe"; then
-		$echo
-		$echo "*** However, this would only work if libtool was able to extract symbol"
-		$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
-		$echo "*** not find such a program.  So, this module is probably useless."
-		$echo "*** \`nm' from GNU binutils and a full rebuild may help."
-	      fi
-	      if test "$build_old_libs" = no; then
-		build_libtool_libs=module
-		build_old_libs=yes
-	      else
-		build_libtool_libs=no
-	      fi
-	    fi
-	  else
-	    convenience="$convenience $dir/$old_library"
-	    old_convenience="$old_convenience $dir/$old_library"
-	    deplibs="$dir/$old_library $deplibs"
-	    link_static=yes
-	  fi
-	fi # link shared/static library?
-
-	if test "$linkmode" = lib; then
-	  if test -n "$dependency_libs" &&
-	     { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes ||
-	       test "$link_static" = yes; }; then
-	    # Extract -R from dependency_libs
-	    temp_deplibs=
-	    for libdir in $dependency_libs; do
-	      case $libdir in
-	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
-		   case " $xrpath " in
-		   *" $temp_xrpath "*) ;;
-		   *) xrpath="$xrpath $temp_xrpath";;
-		   esac;;
-	      *) temp_deplibs="$temp_deplibs $libdir";;
-	      esac
-	    done
-	    dependency_libs="$temp_deplibs"
-	  fi
-
-	  newlib_search_path="$newlib_search_path $absdir"
-	  # Link against this library
-	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
-	  # ... and its dependency_libs
-	  tmp_libs=
-	  for deplib in $dependency_libs; do
-	    newdependency_libs="$deplib $newdependency_libs"
-	    if test "X$duplicate_deps" = "Xyes" ; then
-	      case "$tmp_libs " in
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-	      esac
-	    fi
-	    tmp_libs="$tmp_libs $deplib"
-	  done
-
-	  if test "$link_all_deplibs" != no; then
-	    # Add the search paths of all dependency libraries
-	    for deplib in $dependency_libs; do
-	      case $deplib in
-	      -L*) path="$deplib" ;;
-	      *.la)
-		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
-		test "X$dir" = "X$deplib" && dir="."
-		# We need an absolute path.
-		case $dir in
-		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
-		*)
-		  absdir=`cd "$dir" && pwd`
-		  if test -z "$absdir"; then
-		    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
-		    absdir="$dir"
-		  fi
-		  ;;
-		esac
-		if grep "^installed=no" $deplib > /dev/null; then
-		  path="$absdir/$objdir"
-		else
-		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
-		  if test -z "$libdir"; then
-		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
-		    exit 1
-		  fi
-		  if test "$absdir" != "$libdir"; then
-		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
-		  fi
-		  path="$absdir"
-		fi
-		depdepl=
-		case $host in
-		*-*-darwin*)
-		  # we do not want to link against static libs, but need to link against shared
-		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
-		  if test -n "$deplibrary_names" ; then
-		    for tmp in $deplibrary_names ; do
-		      depdepl=$tmp
-		    done
-		    if test -f "$path/$depdepl" ; then
-		      depdepl="$path/$depdepl"
-		   fi
-		    # do not add paths which are already there
-		    case " $newlib_search_path " in
-		    *" $path "*) ;;
-		    *) newlib_search_path="$newlib_search_path $path";;
-		    esac
-		  fi
-		  path=""
-		  ;;
-		*)
-		path="-L$path"
-		;;
-		esac 
-		
-		;;
-		  -l*)
-		case $host in
-		*-*-darwin*)
-		 # Again, we only want to link against shared libraries
-		 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
-		 for tmp in $newlib_search_path ; do
-		     if test -f "$tmp/lib$tmp_libs.dylib" ; then
-		       eval depdepl="$tmp/lib$tmp_libs.dylib"
-		       break
-		     fi  
-         done
-         path=""
-		  ;;
-		*) continue ;;
-		esac  		  
-		;;
-	      *) continue ;;
-	      esac
-	      case " $deplibs " in
-	      *" $depdepl "*) ;;
-	      *) deplibs="$deplibs $depdepl" ;;
-	      esac	      
-	      case " $deplibs " in
-	      *" $path "*) ;;
-	      *) deplibs="$deplibs $path" ;;
-	      esac
-	    done
-	  fi # link_all_deplibs != no
-	fi # linkmode = lib
-      done # for deplib in $libs
-      dependency_libs="$newdependency_libs"
-      if test "$pass" = dlpreopen; then
-	# Link the dlpreopened libraries before other libraries
-	for deplib in $save_deplibs; do
-	  deplibs="$deplib $deplibs"
-	done
-      fi
-      if test "$pass" != dlopen; then
-	if test "$pass" != conv; then
-	  # Make sure lib_search_path contains only unique directories.
-	  lib_search_path=
-	  for dir in $newlib_search_path; do
-	    case "$lib_search_path " in
-	    *" $dir "*) ;;
-	    *) lib_search_path="$lib_search_path $dir" ;;
-	    esac
-	  done
-	  newlib_search_path=
-	fi
-
-	if test "$linkmode,$pass" != "prog,link"; then
-	  vars="deplibs"
-	else
-	  vars="compile_deplibs finalize_deplibs"
-	fi
-	for var in $vars dependency_libs; do
-	  # Add libraries to $var in reverse order
-	  eval tmp_libs=\"\$$var\"
-	  new_libs=
-	  for deplib in $tmp_libs; do
-	    # FIXME: Pedantically, this is the right thing to do, so
-	    #        that some nasty dependency loop isn't accidentally
-	    #        broken:
-	    #new_libs="$deplib $new_libs"
-	    # Pragmatically, this seems to cause very few problems in
-	    # practice:
-	    case $deplib in
-	    -L*) new_libs="$deplib $new_libs" ;;
-	    -R*) ;;
-	    *)
-	      # And here is the reason: when a library appears more
-	      # than once as an explicit dependence of a library, or
-	      # is implicitly linked in more than once by the
-	      # compiler, it is considered special, and multiple
-	      # occurrences thereof are not removed.  Compare this
-	      # with having the same library being listed as a
-	      # dependency of multiple other libraries: in this case,
-	      # we know (pedantically, we assume) the library does not
-	      # need to be listed more than once, so we keep only the
-	      # last copy.  This is not always right, but it is rare
-	      # enough that we require users that really mean to play
-	      # such unportable linking tricks to link the library
-	      # using -Wl,-lname, so that libtool does not consider it
-	      # for duplicate removal.
-	      case " $specialdeplibs " in
-	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
-	      *)
-		case " $new_libs " in
-		*" $deplib "*) ;;
-		*) new_libs="$deplib $new_libs" ;;
-		esac
-		;;
-	      esac
-	      ;;
-	    esac
-	  done
-	  tmp_libs=
-	  for deplib in $new_libs; do
-	    case $deplib in
-	    -L*)
-	      case " $tmp_libs " in
-	      *" $deplib "*) ;;
-	      *) tmp_libs="$tmp_libs $deplib" ;;
-	      esac
-	      ;;
-	    *) tmp_libs="$tmp_libs $deplib" ;;
-	    esac
-	  done
-	  eval $var=\"$tmp_libs\"
-	done # for var
-      fi
-      # Last step: remove runtime libs from dependency_libs (they stay in deplibs)
-      tmp_libs=
-      for i in $dependency_libs ; do
-	case " $predeps $postdeps $compiler_lib_search_path " in
-	*" $i "*)
-	  i=""
-	  ;;
-	esac
-	if test -n "$i" ; then
-	  tmp_libs="$tmp_libs $i"
-	fi
-      done
-      dependency_libs=$tmp_libs
-    done # for pass
-    if test "$linkmode" = prog; then
-      dlfiles="$newdlfiles"
-      dlprefiles="$newdlprefiles"
-    fi
-
-    case $linkmode in
-    oldlib)
-      if test -n "$deplibs"; then
-	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
-      fi
-
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$rpath"; then
-	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$xrpath"; then
-	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$vinfo"; then
-	$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$release"; then
-	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
-	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
-      fi
-
-      # Now set the variables for building old libraries.
-      build_libtool_libs=no
-      oldlibs="$output"
-      objs="$objs$old_deplibs"
-      ;;
-
-    lib)
-      # Make sure we only generate libraries of the form `libNAME.la'.
-      case $outputname in
-      lib*)
-	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
-	eval shared_ext=\"$shrext\"
-	eval libname=\"$libname_spec\"
-	;;
-      *)
-	if test "$module" = no; then
-	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
-	  $echo "$help" 1>&2
-	  exit 1
-	fi
-	if test "$need_lib_prefix" != no; then
-	  # Add the "lib" prefix for modules if required
-	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
-	  eval shared_ext=\"$shrext\"
-	  eval libname=\"$libname_spec\"
-	else
-	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
-	fi
-	;;
-      esac
-
-      if test -n "$objs"; then
-	if test "$deplibs_check_method" != pass_all; then
-	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
-	  exit 1
-	else
-	  $echo
-	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
-	  $echo "*** objects $objs is not portable!"
-	  libobjs="$libobjs $objs"
-	fi
-      fi
-
-      if test "$dlself" != no; then
-	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
-      fi
-
-      set dummy $rpath
-      if test "$#" -gt 2; then
-	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
-      fi
-      install_libdir="$2"
-
-      oldlibs=
-      if test -z "$rpath"; then
-	if test "$build_libtool_libs" = yes; then
-	  # Building a libtool convenience library.
-	  # Some compilers have problems with a `.al' extension so
-	  # convenience libraries should have the same extension an
-	  # archive normally would.
-	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
-	  build_libtool_libs=convenience
-	  build_old_libs=yes
-	fi
-
-	if test -n "$vinfo"; then
-	  $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
-	fi
-
-	if test -n "$release"; then
-	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
-	fi
-      else
-
-	# Parse the version information argument.
-	save_ifs="$IFS"; IFS=':'
-	set dummy $vinfo 0 0 0
-	IFS="$save_ifs"
-
-	if test -n "$8"; then
-	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
-	  $echo "$help" 1>&2
-	  exit 1
-	fi
-
-	# convert absolute version numbers to libtool ages
-	# this retains compatibility with .la files and attempts
-	# to make the code below a bit more comprehensible
-	
-	case $vinfo_number in
-	yes)
-	  number_major="$2"
-	  number_minor="$3"
-	  number_revision="$4"
-	  #
-	  # There are really only two kinds -- those that
-	  # use the current revision as the major version
-	  # and those that subtract age and use age as
-	  # a minor version.  But, then there is irix
-	  # which has an extra 1 added just for fun
-	  #
-	  case $version_type in
-	  darwin|linux|osf|windows)
-	    current=`expr $number_major + $number_minor`
-	    age="$number_minor"
-	    revision="$number_revision"
-	    ;;
-	  freebsd-aout|freebsd-elf|sunos)
-	    current="$number_major"
-	    revision="$number_minor"
-	    age="0"
-	    ;;
-	  irix|nonstopux)
-	    current=`expr $number_major + $number_minor - 1`
-	    age="$number_minor"
-	    revision="$number_minor"
-	    ;;
-	  esac
-	  ;;
-	no)
-	  current="$2"
-	  revision="$3"
-	  age="$4"
-	  ;;
-	esac
-
-	# Check that each of the things are valid numbers.
-	case $current in
-	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
-	*)
-	  $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit 1
-	  ;;
-	esac
-
-	case $revision in
-	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
-	*)
-	  $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit 1
-	  ;;
-	esac
-
-	case $age in
-	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
-	*)
-	  $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit 1
-	  ;;
-	esac
-
-	if test "$age" -gt "$current"; then
-	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit 1
-	fi
-
-	# Calculate the version variables.
-	major=
-	versuffix=
-	verstring=
-	case $version_type in
-	none) ;;
-
-	darwin)
-	  # Like Linux, but with the current version available in
-	  # verstring for coding it into the library header
-	  major=.`expr $current - $age`
-	  versuffix="$major.$age.$revision"
-	  # Darwin ld doesn't like 0 for these options...
-	  minor_current=`expr $current + 1`
-	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
-	  ;;
-
-	freebsd-aout)
-	  major=".$current"
-	  versuffix=".$current.$revision";
-	  ;;
-
-	freebsd-elf)
-	  major=".$current"
-	  versuffix=".$current";
-	  ;;
-
-	irix | nonstopux)
-	  major=`expr $current - $age + 1`
-
-	  case $version_type in
-	    nonstopux) verstring_prefix=nonstopux ;;
-	    *)         verstring_prefix=sgi ;;
-	  esac
-	  verstring="$verstring_prefix$major.$revision"
-
-	  # Add in all the interfaces that we are compatible with.
-	  loop=$revision
-	  while test "$loop" -ne 0; do
-	    iface=`expr $revision - $loop`
-	    loop=`expr $loop - 1`
-	    verstring="$verstring_prefix$major.$iface:$verstring"
-	  done
-
-	  # Before this point, $major must not contain `.'.
-	  major=.$major
-	  versuffix="$major.$revision"
-	  ;;
-
-	linux)
-	  major=.`expr $current - $age`
-	  versuffix="$major.$age.$revision"
-	  ;;
-
-	osf)
-	  major=.`expr $current - $age`
-	  versuffix=".$current.$age.$revision"
-	  verstring="$current.$age.$revision"
-
-	  # Add in all the interfaces that we are compatible with.
-	  loop=$age
-	  while test "$loop" -ne 0; do
-	    iface=`expr $current - $loop`
-	    loop=`expr $loop - 1`
-	    verstring="$verstring:${iface}.0"
-	  done
-
-	  # Make executables depend on our current version.
-	  verstring="$verstring:${current}.0"
-	  ;;
-
-	sunos)
-	  major=".$current"
-	  versuffix=".$current.$revision"
-	  ;;
-
-	windows)
-	  # Use '-' rather than '.', since we only want one
-	  # extension on DOS 8.3 filesystems.
-	  major=`expr $current - $age`
-	  versuffix="-$major"
-	  ;;
-
-	*)
-	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
-	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-	  exit 1
-	  ;;
-	esac
-
-	# Clear the version info if we defaulted, and they specified a release.
-	if test -z "$vinfo" && test -n "$release"; then
-	  major=
-	  case $version_type in
-	  darwin)
-	    # we can't check for "0.0" in archive_cmds due to quoting
-	    # problems, so we reset it completely
-	    verstring=
-	    ;;
-	  *)
-	    verstring="0.0"
-	    ;;
-	  esac
-	  if test "$need_version" = no; then
-	    versuffix=
-	  else
-	    versuffix=".0.0"
-	  fi
-	fi
-
-	# Remove version info from name if versioning should be avoided
-	if test "$avoid_version" = yes && test "$need_version" = no; then
-	  major=
-	  versuffix=
-	  verstring=""
-	fi
-
-	# Check to see if the archive will have undefined symbols.
-	if test "$allow_undefined" = yes; then
-	  if test "$allow_undefined_flag" = unsupported; then
-	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
-	    build_libtool_libs=no
-	    build_old_libs=yes
-	  fi
-	else
-	  # Don't allow undefined symbols.
-	  allow_undefined_flag="$no_undefined_flag"
-	fi
-      fi
-
-      if test "$mode" != relink; then
-	# Remove our outputs, but don't remove object files since they
-	# may have been created when compiling PIC objects.
-	removelist=
-	tempremovelist=`$echo "$output_objdir/*"`
-	for p in $tempremovelist; do
-	  case $p in
-	    *.$objext)
-	       ;;
-	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
-	       if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
-	       then
-		 continue
-	       fi
-	       removelist="$removelist $p"
-	       ;;
-	    *) ;;
-	  esac
-	done
-	if test -n "$removelist"; then
-	  $show "${rm}r $removelist"
-	  $run ${rm}r $removelist
-	fi
-      fi
-
-      # Now set the variables for building old libraries.
-      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
-	oldlibs="$oldlibs $output_objdir/$libname.$libext"
-
-	# Transform .lo files to .o files.
-	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
-      fi
-
-      # Eliminate all temporary directories.
-      for path in $notinst_path; do
-	lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
-	deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
-	dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
-      done
-
-      if test -n "$xrpath"; then
-	# If the user specified any rpath flags, then add them.
-	temp_xrpath=
-	for libdir in $xrpath; do
-	  temp_xrpath="$temp_xrpath -R$libdir"
-	  case "$finalize_rpath " in
-	  *" $libdir "*) ;;
-	  *) finalize_rpath="$finalize_rpath $libdir" ;;
-	  esac
-	done
-	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
-	  dependency_libs="$temp_xrpath $dependency_libs"
-	fi
-      fi
-
-      # Make sure dlfiles contains only unique files that won't be dlpreopened
-      old_dlfiles="$dlfiles"
-      dlfiles=
-      for lib in $old_dlfiles; do
-	case " $dlprefiles $dlfiles " in
-	*" $lib "*) ;;
-	*) dlfiles="$dlfiles $lib" ;;
-	esac
-      done
-
-      # Make sure dlprefiles contains only unique files
-      old_dlprefiles="$dlprefiles"
-      dlprefiles=
-      for lib in $old_dlprefiles; do
-	case "$dlprefiles " in
-	*" $lib "*) ;;
-	*) dlprefiles="$dlprefiles $lib" ;;
-	esac
-      done
-
-      if test "$build_libtool_libs" = yes; then
-	if test -n "$rpath"; then
-	  case $host in
-	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
-	    # these systems don't actually have a c library (as such)!
-	    ;;
-	  *-*-rhapsody* | *-*-darwin1.[012])
-	    # Rhapsody C library is in the System framework
-	    deplibs="$deplibs -framework System"
-	    ;;
-	  *-*-netbsd*)
-	    # Don't link with libc until the a.out ld.so is fixed.
-	    ;;
-	  *-*-openbsd* | *-*-freebsd*)
-	    # Do not include libc due to us having libc/libc_r.
-	    test "X$arg" = "X-lc" && continue
-	    ;;
- 	  *)
-	    # Add libc to deplibs on all other systems if necessary.
-	    if test "$build_libtool_need_lc" = "yes"; then
-	      deplibs="$deplibs -lc"
-	    fi
-	    ;;
-	  esac
-	fi
-
-	# Transform deplibs into only deplibs that can be linked in shared.
-	name_save=$name
-	libname_save=$libname
-	release_save=$release
-	versuffix_save=$versuffix
-	major_save=$major
-	# I'm not sure if I'm treating the release correctly.  I think
-	# release should show up in the -l (ie -lgmp5) so we don't want to
-	# add it in twice.  Is that correct?
-	release=""
-	versuffix=""
-	major=""
-	newdeplibs=
-	droppeddeps=no
-	case $deplibs_check_method in
-	pass_all)
-	  # Don't check for shared/static.  Everything works.
-	  # This might be a little naive.  We might want to check
-	  # whether the library exists or not.  But this is on
-	  # osf3 & osf4 and I'm not really sure... Just
-	  # implementing what was already the behavior.
-	  newdeplibs=$deplibs
-	  ;;
-	test_compile)
-	  # This code stresses the "libraries are programs" paradigm to its
-	  # limits. Maybe even breaks it.  We compile a program, linking it
-	  # against the deplibs as a proxy for the library.  Then we can check
-	  # whether they linked in statically or dynamically with ldd.
-	  $rm conftest.c
-	  cat > conftest.c <<EOF
-	  int main() { return 0; }
-EOF
-	  $rm conftest
-	  $LTCC -o conftest conftest.c $deplibs
-	  if test "$?" -eq 0 ; then
-	    ldd_output=`ldd conftest`
-	    for i in $deplibs; do
-	      name="`expr $i : '-l\(.*\)'`"
-	      # If $name is empty we are operating on a -L argument.
-              if test "$name" != "" && test "$name" -ne "0"; then
-		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-		  case " $predeps $postdeps " in
-		  *" $i "*)
-		    newdeplibs="$newdeplibs $i"
-		    i=""
-		    ;;
-		  esac
-	        fi
-		if test -n "$i" ; then
-		  libname=`eval \\$echo \"$libname_spec\"`
-		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
-		  set dummy $deplib_matches
-		  deplib_match=$2
-		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		    newdeplibs="$newdeplibs $i"
-		  else
-		    droppeddeps=yes
-		    $echo
-		    $echo "*** Warning: dynamic linker does not accept needed library $i."
-		    $echo "*** I have the capability to make that library automatically link in when"
-		    $echo "*** you link to this library.  But I can only do this if you have a"
-		    $echo "*** shared version of the library, which I believe you do not have"
-		    $echo "*** because a test_compile did reveal that the linker did not use it for"
-		    $echo "*** its dynamic dependency list that programs get resolved with at runtime."
-		  fi
-		fi
-	      else
-		newdeplibs="$newdeplibs $i"
-	      fi
-	    done
-	  else
-	    # Error occurred in the first compile.  Let's try to salvage
-	    # the situation: Compile a separate program for each library.
-	    for i in $deplibs; do
-	      name="`expr $i : '-l\(.*\)'`"
-	      # If $name is empty we are operating on a -L argument.
-              if test "$name" != "" && test "$name" != "0"; then
-		$rm conftest
-		$LTCC -o conftest conftest.c $i
-		# Did it work?
-		if test "$?" -eq 0 ; then
-		  ldd_output=`ldd conftest`
-		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-		    case " $predeps $postdeps " in
-		    *" $i "*)
-		      newdeplibs="$newdeplibs $i"
-		      i=""
-		      ;;
-		    esac
-		  fi
-		  if test -n "$i" ; then
-		    libname=`eval \\$echo \"$libname_spec\"`
-		    deplib_matches=`eval \\$echo \"$library_names_spec\"`
-		    set dummy $deplib_matches
-		    deplib_match=$2
-		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		      newdeplibs="$newdeplibs $i"
-		    else
-		      droppeddeps=yes
-		      $echo
-		      $echo "*** Warning: dynamic linker does not accept needed library $i."
-		      $echo "*** I have the capability to make that library automatically link in when"
-		      $echo "*** you link to this library.  But I can only do this if you have a"
-		      $echo "*** shared version of the library, which you do not appear to have"
-		      $echo "*** because a test_compile did reveal that the linker did not use this one"
-		      $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
-		    fi
-		  fi
-		else
-		  droppeddeps=yes
-		  $echo
-		  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
-		  $echo "***  make it link in!  You will probably need to install it or some"
-		  $echo "*** library that it depends on before this library will be fully"
-		  $echo "*** functional.  Installing it before continuing would be even better."
-		fi
-	      else
-		newdeplibs="$newdeplibs $i"
-	      fi
-	    done
-	  fi
-	  ;;
-	file_magic*)
-	  set dummy $deplibs_check_method
-	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
-	  for a_deplib in $deplibs; do
-	    name="`expr $a_deplib : '-l\(.*\)'`"
-	    # If $name is empty we are operating on a -L argument.
-            if test "$name" != "" && test  "$name" != "0"; then
-	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-		case " $predeps $postdeps " in
-		*" $a_deplib "*)
-		  newdeplibs="$newdeplibs $a_deplib"
-		  a_deplib=""
-		  ;;
-		esac
-	      fi
-	      if test -n "$a_deplib" ; then
-		libname=`eval \\$echo \"$libname_spec\"`
-		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
-		  for potent_lib in $potential_libs; do
-		      # Follow soft links.
-		      if ls -lLd "$potent_lib" 2>/dev/null \
-			 | grep " -> " >/dev/null; then
-			continue
-		      fi
-		      # The statement above tries to avoid entering an
-		      # endless loop below, in case of cyclic links.
-		      # We might still enter an endless loop, since a link
-		      # loop can be closed while we follow links,
-		      # but so what?
-		      potlib="$potent_lib"
-		      while test -h "$potlib" 2>/dev/null; do
-			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
-			case $potliblink in
-			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
-			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
-			esac
-		      done
-		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
-			 | ${SED} 10q \
-			 | $EGREP "$file_magic_regex" > /dev/null; then
-			newdeplibs="$newdeplibs $a_deplib"
-			a_deplib=""
-			break 2
-		      fi
-		  done
-		done
-	      fi
-	      if test -n "$a_deplib" ; then
-		droppeddeps=yes
-		$echo
-		$echo "*** Warning: linker path does not have real file for library $a_deplib."
-		$echo "*** I have the capability to make that library automatically link in when"
-		$echo "*** you link to this library.  But I can only do this if you have a"
-		$echo "*** shared version of the library, which you do not appear to have"
-		$echo "*** because I did check the linker path looking for a file starting"
-		if test -z "$potlib" ; then
-		  $echo "*** with $libname but no candidates were found. (...for file magic test)"
-		else
-		  $echo "*** with $libname and none of the candidates passed a file format test"
-		  $echo "*** using a file magic. Last file checked: $potlib"
-		fi
-	      fi
-	    else
-	      # Add a -L argument.
-	      newdeplibs="$newdeplibs $a_deplib"
-	    fi
-	  done # Gone through all deplibs.
-	  ;;
-	match_pattern*)
-	  set dummy $deplibs_check_method
-	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
-	  for a_deplib in $deplibs; do
-	    name="`expr $a_deplib : '-l\(.*\)'`"
-	    # If $name is empty we are operating on a -L argument.
-	    if test -n "$name" && test "$name" != "0"; then
-	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-		case " $predeps $postdeps " in
-		*" $a_deplib "*)
-		  newdeplibs="$newdeplibs $a_deplib"
-		  a_deplib=""
-		  ;;
-		esac
-	      fi
-	      if test -n "$a_deplib" ; then
-		libname=`eval \\$echo \"$libname_spec\"`
-		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
-		  for potent_lib in $potential_libs; do
-		    potlib="$potent_lib" # see symlink-check above in file_magic test
-		    if eval $echo \"$potent_lib\" 2>/dev/null \
-		        | ${SED} 10q \
-		        | $EGREP "$match_pattern_regex" > /dev/null; then
-		      newdeplibs="$newdeplibs $a_deplib"
-		      a_deplib=""
-		      break 2
-		    fi
-		  done
-		done
-	      fi
-	      if test -n "$a_deplib" ; then
-		droppeddeps=yes
-		$echo
-		$echo "*** Warning: linker path does not have real file for library $a_deplib."
-		$echo "*** I have the capability to make that library automatically link in when"
-		$echo "*** you link to this library.  But I can only do this if you have a"
-		$echo "*** shared version of the library, which you do not appear to have"
-		$echo "*** because I did check the linker path looking for a file starting"
-		if test -z "$potlib" ; then
-		  $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
-		else
-		  $echo "*** with $libname and none of the candidates passed a file format test"
-		  $echo "*** using a regex pattern. Last file checked: $potlib"
-		fi
-	      fi
-	    else
-	      # Add a -L argument.
-	      newdeplibs="$newdeplibs $a_deplib"
-	    fi
-	  done # Gone through all deplibs.
-	  ;;
-	none | unknown | *)
-	  newdeplibs=""
-	  tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
-	    -e 's/ -[LR][^ ]*//g'`
-	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-	    for i in $predeps $postdeps ; do
-	      # can't use Xsed below, because $i might contain '/'
-	      tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
-	    done
-	  fi
-	  if $echo "X $tmp_deplibs" | $Xsed -e 's/[ 	]//g' \
-	    | grep . >/dev/null; then
-	    $echo
-	    if test "X$deplibs_check_method" = "Xnone"; then
-	      $echo "*** Warning: inter-library dependencies are not supported in this platform."
-	    else
-	      $echo "*** Warning: inter-library dependencies are not known to be supported."
-	    fi
-	    $echo "*** All declared inter-library dependencies are being dropped."
-	    droppeddeps=yes
-	  fi
-	  ;;
-	esac
-	versuffix=$versuffix_save
-	major=$major_save
-	release=$release_save
-	libname=$libname_save
-	name=$name_save
-
-	case $host in
-	*-*-rhapsody* | *-*-darwin1.[012])
-	  # On Rhapsody replace the C library is the System framework
-	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
-	  ;;
-	esac
-
-	if test "$droppeddeps" = yes; then
-	  if test "$module" = yes; then
-	    $echo
-	    $echo "*** Warning: libtool could not satisfy all declared inter-library"
-	    $echo "*** dependencies of module $libname.  Therefore, libtool will create"
-	    $echo "*** a static module, that should work as long as the dlopening"
-	    $echo "*** application is linked with the -dlopen flag."
-	    if test -z "$global_symbol_pipe"; then
-	      $echo
-	      $echo "*** However, this would only work if libtool was able to extract symbol"
-	      $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
-	      $echo "*** not find such a program.  So, this module is probably useless."
-	      $echo "*** \`nm' from GNU binutils and a full rebuild may help."
-	    fi
-	    if test "$build_old_libs" = no; then
-	      oldlibs="$output_objdir/$libname.$libext"
-	      build_libtool_libs=module
-	      build_old_libs=yes
-	    else
-	      build_libtool_libs=no
-	    fi
-	  else
-	    $echo "*** The inter-library dependencies that have been dropped here will be"
-	    $echo "*** automatically added whenever a program is linked with this library"
-	    $echo "*** or is declared to -dlopen it."
-
-	    if test "$allow_undefined" = no; then
-	      $echo
-	      $echo "*** Since this library must not contain undefined symbols,"
-	      $echo "*** because either the platform does not support them or"
-	      $echo "*** it was explicitly requested with -no-undefined,"
-	      $echo "*** libtool will only create a static version of it."
-	      if test "$build_old_libs" = no; then
-		oldlibs="$output_objdir/$libname.$libext"
-		build_libtool_libs=module
-		build_old_libs=yes
-	      else
-		build_libtool_libs=no
-	      fi
-	    fi
-	  fi
-	fi
-	# Done checking deplibs!
-	deplibs=$newdeplibs
-      fi
-
-      # All the library-specific variables (install_libdir is set above).
-      library_names=
-      old_library=
-      dlname=
-
-      # Test again, we may have decided not to build it any more
-      if test "$build_libtool_libs" = yes; then
-	if test "$hardcode_into_libs" = yes; then
-	  # Hardcode the library paths
-	  hardcode_libdirs=
-	  dep_rpath=
-	  rpath="$finalize_rpath"
-	  test "$mode" != relink && rpath="$compile_rpath$rpath"
-	  for libdir in $rpath; do
-	    if test -n "$hardcode_libdir_flag_spec"; then
-	      if test -n "$hardcode_libdir_separator"; then
-		if test -z "$hardcode_libdirs"; then
-		  hardcode_libdirs="$libdir"
-		else
-		  # Just accumulate the unique libdirs.
-		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-		    ;;
-		  *)
-		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-		    ;;
-		  esac
-		fi
-	      else
-		eval flag=\"$hardcode_libdir_flag_spec\"
-		dep_rpath="$dep_rpath $flag"
-	      fi
-	    elif test -n "$runpath_var"; then
-	      case "$perm_rpath " in
-	      *" $libdir "*) ;;
-	      *) perm_rpath="$perm_rpath $libdir" ;;
-	      esac
-	    fi
-	  done
-	  # Substitute the hardcoded libdirs into the rpath.
-	  if test -n "$hardcode_libdir_separator" &&
-	     test -n "$hardcode_libdirs"; then
-	    libdir="$hardcode_libdirs"
-	    if test -n "$hardcode_libdir_flag_spec_ld"; then
-	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
-	    else
-	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
-	    fi
-	  fi
-	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
-	    # We should set the runpath_var.
-	    rpath=
-	    for dir in $perm_rpath; do
-	      rpath="$rpath$dir:"
-	    done
-	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
-	  fi
-	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
-	fi
-
-	shlibpath="$finalize_shlibpath"
-	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
-	if test -n "$shlibpath"; then
-	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
-	fi
-
-	# Get the real and link names of the library.
-	eval shared_ext=\"$shrext\"
-	eval library_names=\"$library_names_spec\"
-	set dummy $library_names
-	realname="$2"
-	shift; shift
-
-	if test -n "$soname_spec"; then
-	  eval soname=\"$soname_spec\"
-	else
-	  soname="$realname"
-	fi
-	if test -z "$dlname"; then
-	  dlname=$soname
-	fi
-
-	lib="$output_objdir/$realname"
-	for link
-	do
-	  linknames="$linknames $link"
-	done
-
-	# Use standard objects if they are pic
-	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-
-	# Prepare the list of exported symbols
-	if test -z "$export_symbols"; then
-	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
-	    $show "generating symbol list for \`$libname.la'"
-	    export_symbols="$output_objdir/$libname.exp"
-	    $run $rm $export_symbols
-	    cmds=$export_symbols_cmds
-	    save_ifs="$IFS"; IFS='~'
-	    for cmd in $cmds; do
-	      IFS="$save_ifs"
-	      eval cmd=\"$cmd\"
-	      if len=`expr "X$cmd" : ".*"` &&
-	       test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-	        $show "$cmd"
-	        $run eval "$cmd" || exit $?
-	        skipped_export=false
-	      else
-	        # The command line is too long to execute in one step.
-	        $show "using reloadable object file for export list..."
-	        skipped_export=:
-	      fi
-	    done
-	    IFS="$save_ifs"
-	    if test -n "$export_symbols_regex"; then
-	      $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
-	      $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
-	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
-	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
-	    fi
-	  fi
-	fi
-
-	if test -n "$export_symbols" && test -n "$include_expsyms"; then
-	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
-	fi
-
-	tmp_deplibs=
-	for test_deplib in $deplibs; do
-		case " $convenience " in
-		*" $test_deplib "*) ;;
-		*) 
-			tmp_deplibs="$tmp_deplibs $test_deplib"
-			;;
-		esac
-	done
-	deplibs="$tmp_deplibs" 
-
-	if test -n "$convenience"; then
-	  if test -n "$whole_archive_flag_spec"; then
-	    save_libobjs=$libobjs
-	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
-	  else
-	    gentop="$output_objdir/${outputname}x"
-	    $show "${rm}r $gentop"
-	    $run ${rm}r "$gentop"
-	    $show "$mkdir $gentop"
-	    $run $mkdir "$gentop"
-	    status=$?
-	    if test "$status" -ne 0 && test ! -d "$gentop"; then
-	      exit $status
-	    fi
-	    generated="$generated $gentop"
-
-	    for xlib in $convenience; do
-	      # Extract the objects.
-	      case $xlib in
-	      [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-	      *) xabs=`pwd`"/$xlib" ;;
-	      esac
-	      xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-	      xdir="$gentop/$xlib"
-
-	      $show "${rm}r $xdir"
-	      $run ${rm}r "$xdir"
-	      $show "$mkdir $xdir"
-	      $run $mkdir "$xdir"
-	      status=$?
-	      if test "$status" -ne 0 && test ! -d "$xdir"; then
-		exit $status
-	      fi
-	      # We will extract separately just the conflicting names and we will no
-	      # longer touch any unique names. It is faster to leave these extract
-	      # automatically by $AR in one run.
-	      $show "(cd $xdir && $AR x $xabs)"
-	      $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-	      if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
-		:
-	      else
-		$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
-		$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
-		$AR t "$xabs" | sort | uniq -cd | while read -r count name
-		do
-		  i=1
-		  while test "$i" -le "$count"
-		  do
-		   # Put our $i before any first dot (extension)
-		   # Never overwrite any file
-		   name_to="$name"
-		   while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
-		   do
-		     name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
-		   done
-		   $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
-		   $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
-		   i=`expr $i + 1`
-		  done
-		done
-	      fi
-
-	      libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
-	    done
-	  fi
-	fi
-
-	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
-	  eval flag=\"$thread_safe_flag_spec\"
-	  linker_flags="$linker_flags $flag"
-	fi
-
-	# Make a backup of the uninstalled library when relinking
-	if test "$mode" = relink; then
-	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
-	fi
-
-	# Do each of the archive commands.
-	if test "$module" = yes && test -n "$module_cmds" ; then
-	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
-	    eval test_cmds=\"$module_expsym_cmds\"
-	    cmds=$module_expsym_cmds
-	  else
-	    eval test_cmds=\"$module_cmds\"
-	    cmds=$module_cmds
-	  fi
-	else
-	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-	  eval test_cmds=\"$archive_expsym_cmds\"
-	  cmds=$archive_expsym_cmds
-	else
-	  eval test_cmds=\"$archive_cmds\"
-	  cmds=$archive_cmds
-	  fi
-	fi
-
-	if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
-	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-	  :
-	else
-	  # The command line is too long to link in one step, link piecewise.
-	  $echo "creating reloadable object files..."
-
-	  # Save the value of $output and $libobjs because we want to
-	  # use them later.  If we have whole_archive_flag_spec, we
-	  # want to use save_libobjs as it was before
-	  # whole_archive_flag_spec was expanded, because we can't
-	  # assume the linker understands whole_archive_flag_spec.
-	  # This may have to be revisited, in case too many
-	  # convenience libraries get linked in and end up exceeding
-	  # the spec.
-	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
-	    save_libobjs=$libobjs
-	  fi
-	  save_output=$output
-
-	  # Clear the reloadable object creation command queue and
-	  # initialize k to one.
-	  test_cmds=
-	  concat_cmds=
-	  objlist=
-	  delfiles=
-	  last_robj=
-	  k=1
-	  output=$output_objdir/$save_output-${k}.$objext
-	  # Loop over the list of objects to be linked.
-	  for obj in $save_libobjs
-	  do
-	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
-	    if test "X$objlist" = X ||
-	       { len=`expr "X$test_cmds" : ".*"` &&
-		 test "$len" -le "$max_cmd_len"; }; then
-	      objlist="$objlist $obj"
-	    else
-	      # The command $test_cmds is almost too long, add a
-	      # command to the queue.
-	      if test "$k" -eq 1 ; then
-		# The first file doesn't have a previous command to add.
-		eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
-	      else
-		# All subsequent reloadable object files will link in
-		# the last one created.
-		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
-	      fi
-	      last_robj=$output_objdir/$save_output-${k}.$objext
-	      k=`expr $k + 1`
-	      output=$output_objdir/$save_output-${k}.$objext
-	      objlist=$obj
-	      len=1
-	    fi
-	  done
-	  # Handle the remaining objects by creating one last
-	  # reloadable object file.  All subsequent reloadable object
-	  # files will link in the last one created.
-	  test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-	  eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
-
-	  if ${skipped_export-false}; then
-	    $show "generating symbol list for \`$libname.la'"
-	    export_symbols="$output_objdir/$libname.exp"
-	    $run $rm $export_symbols
-	    libobjs=$output
-	    # Append the command to create the export file.
-	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
-          fi
-
-	  # Set up a command to remove the reloadale object files
-	  # after they are used.
-	  i=0
-	  while test "$i" -lt "$k"
-	  do
-	    i=`expr $i + 1`
-	    delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
-	  done
-
-	  $echo "creating a temporary reloadable object file: $output"
-
-	  # Loop through the commands generated above and execute them.
-	  save_ifs="$IFS"; IFS='~'
-	  for cmd in $concat_cmds; do
-	    IFS="$save_ifs"
-	    eval cmd=\"$cmd\"
-	    $show "$cmd"
-	    $run eval "$cmd" || exit $?
-	  done
-	  IFS="$save_ifs"
-
-	  libobjs=$output
-	  # Restore the value of output.
-	  output=$save_output
-
-	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
-	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
-	  fi
-	  # Expand the library linking commands again to reset the
-	  # value of $libobjs for piecewise linking.
-
-	  # Do each of the archive commands.
-	  if test "$module" = yes && test -n "$module_cmds" ; then
-	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
-	      cmds=$module_expsym_cmds
-	    else
-	      cmds=$module_cmds
-	    fi
-	  else
-	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-	    cmds=$archive_expsym_cmds
-	  else
-	    cmds=$archive_cmds
-	    fi
-	  fi
-
-	  # Append the command to remove the reloadable object files
-	  # to the just-reset $cmds.
-	  eval cmds=\"\$cmds~\$rm $delfiles\"
-	fi
-	save_ifs="$IFS"; IFS='~'
-	for cmd in $cmds; do
-	  IFS="$save_ifs"
-	  eval cmd=\"$cmd\"
-	  $show "$cmd"
-	  $run eval "$cmd" || exit $?
-	done
-	IFS="$save_ifs"
-
-	# Restore the uninstalled library and exit
-	if test "$mode" = relink; then
-	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
-	  exit 0
-	fi
-
-	# Create links to the real library.
-	for linkname in $linknames; do
-	  if test "$realname" != "$linkname"; then
-	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
-	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
-	  fi
-	done
-
-	# If -module or -export-dynamic was specified, set the dlname.
-	if test "$module" = yes || test "$export_dynamic" = yes; then
-	  # On all known operating systems, these are identical.
-	  dlname="$soname"
-	fi
-      fi
-      ;;
-
-    obj)
-      if test -n "$deplibs"; then
-	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
-      fi
-
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$rpath"; then
-	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$xrpath"; then
-	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$vinfo"; then
-	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$release"; then
-	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
-      fi
-
-      case $output in
-      *.lo)
-	if test -n "$objs$old_deplibs"; then
-	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
-	  exit 1
-	fi
-	libobj="$output"
-	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
-	;;
-      *)
-	libobj=
-	obj="$output"
-	;;
-      esac
-
-      # Delete the old objects.
-      $run $rm $obj $libobj
-
-      # Objects from convenience libraries.  This assumes
-      # single-version convenience libraries.  Whenever we create
-      # different ones for PIC/non-PIC, this we'll have to duplicate
-      # the extraction.
-      reload_conv_objs=
-      gentop=
-      # reload_cmds runs $LD directly, so let us get rid of
-      # -Wl from whole_archive_flag_spec
-      wl=
-
-      if test -n "$convenience"; then
-	if test -n "$whole_archive_flag_spec"; then
-	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
-	else
-	  gentop="$output_objdir/${obj}x"
-	  $show "${rm}r $gentop"
-	  $run ${rm}r "$gentop"
-	  $show "$mkdir $gentop"
-	  $run $mkdir "$gentop"
-	  status=$?
-	  if test "$status" -ne 0 && test ! -d "$gentop"; then
-	    exit $status
-	  fi
-	  generated="$generated $gentop"
-
-	  for xlib in $convenience; do
-	    # Extract the objects.
-	    case $xlib in
-	    [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-	    *) xabs=`pwd`"/$xlib" ;;
-	    esac
-	    xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-	    xdir="$gentop/$xlib"
-
-	    $show "${rm}r $xdir"
-	    $run ${rm}r "$xdir"
-	    $show "$mkdir $xdir"
-	    $run $mkdir "$xdir"
-	    status=$?
-	    if test "$status" -ne 0 && test ! -d "$xdir"; then
-	      exit $status
-	    fi
-	    # We will extract separately just the conflicting names and we will no
-	    # longer touch any unique names. It is faster to leave these extract
-	    # automatically by $AR in one run.
-	    $show "(cd $xdir && $AR x $xabs)"
-	    $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-	    if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
-	      :
-	    else
-	      $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
-	      $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
-	      $AR t "$xabs" | sort | uniq -cd | while read -r count name
-	      do
-		i=1
-		while test "$i" -le "$count"
-		do
-		 # Put our $i before any first dot (extension)
-		 # Never overwrite any file
-		 name_to="$name"
-		 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
-		 do
-		   name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
-		 done
-		 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
-		 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
-		 i=`expr $i + 1`
-		done
-	      done
-	    fi
-
-	    reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
-	  done
-	fi
-      fi
-
-      # Create the old-style object.
-      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
-
-      output="$obj"
-      cmds=$reload_cmds
-      save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-	IFS="$save_ifs"
-	eval cmd=\"$cmd\"
-	$show "$cmd"
-	$run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-
-      # Exit if we aren't doing a library object file.
-      if test -z "$libobj"; then
-	if test -n "$gentop"; then
-	  $show "${rm}r $gentop"
-	  $run ${rm}r $gentop
-	fi
-
-	exit 0
-      fi
-
-      if test "$build_libtool_libs" != yes; then
-	if test -n "$gentop"; then
-	  $show "${rm}r $gentop"
-	  $run ${rm}r $gentop
-	fi
-
-	# Create an invalid libtool object if no PIC, so that we don't
-	# accidentally link it into a program.
-	# $show "echo timestamp > $libobj"
-	# $run eval "echo timestamp > $libobj" || exit $?
-	exit 0
-      fi
-
-      if test -n "$pic_flag" || test "$pic_mode" != default; then
-	# Only do commands if we really have different PIC objects.
-	reload_objs="$libobjs $reload_conv_objs"
-	output="$libobj"
-	cmds=$reload_cmds
-	save_ifs="$IFS"; IFS='~'
-	for cmd in $cmds; do
-	  IFS="$save_ifs"
-	  eval cmd=\"$cmd\"
-	  $show "$cmd"
-	  $run eval "$cmd" || exit $?
-	done
-	IFS="$save_ifs"
-      fi
-
-      if test -n "$gentop"; then
-	$show "${rm}r $gentop"
-	$run ${rm}r $gentop
-      fi
-
-      exit 0
-      ;;
-
-    prog)
-      case $host in
-	*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
-      esac
-      if test -n "$vinfo"; then
-	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
-      fi
-
-      if test -n "$release"; then
-	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
-      fi
-
-      if test "$preload" = yes; then
-	if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
-	   test "$dlopen_self_static" = unknown; then
-	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
-	fi
-      fi
-
-      case $host in
-      *-*-rhapsody* | *-*-darwin1.[012])
-	# On Rhapsody replace the C library is the System framework
-	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
-	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
-	;;
-      esac
-
-      case $host in
-      *darwin*)
-        # Don't allow lazy linking, it breaks C++ global constructors
-        if test "$tagname" = CXX ; then
-        compile_command="$compile_command ${wl}-bind_at_load"
-        finalize_command="$finalize_command ${wl}-bind_at_load"
-        fi
-        ;;
-      esac
-
-      compile_command="$compile_command $compile_deplibs"
-      finalize_command="$finalize_command $finalize_deplibs"
-
-      if test -n "$rpath$xrpath"; then
-	# If the user specified any rpath flags, then add them.
-	for libdir in $rpath $xrpath; do
-	  # This is the magic to use -rpath.
-	  case "$finalize_rpath " in
-	  *" $libdir "*) ;;
-	  *) finalize_rpath="$finalize_rpath $libdir" ;;
-	  esac
-	done
-      fi
-
-      # Now hardcode the library paths
-      rpath=
-      hardcode_libdirs=
-      for libdir in $compile_rpath $finalize_rpath; do
-	if test -n "$hardcode_libdir_flag_spec"; then
-	  if test -n "$hardcode_libdir_separator"; then
-	    if test -z "$hardcode_libdirs"; then
-	      hardcode_libdirs="$libdir"
-	    else
-	      # Just accumulate the unique libdirs.
-	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-		;;
-	      *)
-		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-		;;
-	      esac
-	    fi
-	  else
-	    eval flag=\"$hardcode_libdir_flag_spec\"
-	    rpath="$rpath $flag"
-	  fi
-	elif test -n "$runpath_var"; then
-	  case "$perm_rpath " in
-	  *" $libdir "*) ;;
-	  *) perm_rpath="$perm_rpath $libdir" ;;
-	  esac
-	fi
-	case $host in
-	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-	  case :$dllsearchpath: in
-	  *":$libdir:"*) ;;
-	  *) dllsearchpath="$dllsearchpath:$libdir";;
-	  esac
-	  ;;
-	esac
-      done
-      # Substitute the hardcoded libdirs into the rpath.
-      if test -n "$hardcode_libdir_separator" &&
-	 test -n "$hardcode_libdirs"; then
-	libdir="$hardcode_libdirs"
-	eval rpath=\" $hardcode_libdir_flag_spec\"
-      fi
-      compile_rpath="$rpath"
-
-      rpath=
-      hardcode_libdirs=
-      for libdir in $finalize_rpath; do
-	if test -n "$hardcode_libdir_flag_spec"; then
-	  if test -n "$hardcode_libdir_separator"; then
-	    if test -z "$hardcode_libdirs"; then
-	      hardcode_libdirs="$libdir"
-	    else
-	      # Just accumulate the unique libdirs.
-	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-		;;
-	      *)
-		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-		;;
-	      esac
-	    fi
-	  else
-	    eval flag=\"$hardcode_libdir_flag_spec\"
-	    rpath="$rpath $flag"
-	  fi
-	elif test -n "$runpath_var"; then
-	  case "$finalize_perm_rpath " in
-	  *" $libdir "*) ;;
-	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
-	  esac
-	fi
-      done
-      # Substitute the hardcoded libdirs into the rpath.
-      if test -n "$hardcode_libdir_separator" &&
-	 test -n "$hardcode_libdirs"; then
-	libdir="$hardcode_libdirs"
-	eval rpath=\" $hardcode_libdir_flag_spec\"
-      fi
-      finalize_rpath="$rpath"
-
-      if test -n "$libobjs" && test "$build_old_libs" = yes; then
-	# Transform all the library objects into standard objects.
-	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-      fi
-
-      dlsyms=
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	if test -n "$NM" && test -n "$global_symbol_pipe"; then
-	  dlsyms="${outputname}S.c"
-	else
-	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
-	fi
-      fi
-
-      if test -n "$dlsyms"; then
-	case $dlsyms in
-	"") ;;
-	*.c)
-	  # Discover the nlist of each of the dlfiles.
-	  nlist="$output_objdir/${outputname}.nm"
-
-	  $show "$rm $nlist ${nlist}S ${nlist}T"
-	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
-
-	  # Parse the name list into a source file.
-	  $show "creating $output_objdir/$dlsyms"
-
-	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
-/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-/* Prevent the only kind of declaration conflicts we can make. */
-#define lt_preloaded_symbols some_other_symbol
-
-/* External symbol declarations for the compiler. */\
-"
-
-	  if test "$dlself" = yes; then
-	    $show "generating symbol list for \`$output'"
-
-	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
-
-	    # Add our own program objects to the symbol list.
-	    progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-	    for arg in $progfiles; do
-	      $show "extracting global C symbols from \`$arg'"
-	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
-	    done
-
-	    if test -n "$exclude_expsyms"; then
-	      $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
-	      $run eval '$mv "$nlist"T "$nlist"'
-	    fi
-
-	    if test -n "$export_symbols_regex"; then
-	      $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
-	      $run eval '$mv "$nlist"T "$nlist"'
-	    fi
-
-	    # Prepare the list of exported symbols
-	    if test -z "$export_symbols"; then
-	      export_symbols="$output_objdir/$output.exp"
-	      $run $rm $export_symbols
-	      $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
-	    else
-	      $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
-	      $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
-	      $run eval 'mv "$nlist"T "$nlist"'
-	    fi
-	  fi
-
-	  for arg in $dlprefiles; do
-	    $show "extracting global C symbols from \`$arg'"
-	    name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
-	    $run eval '$echo ": $name " >> "$nlist"'
-	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
-	  done
-
-	  if test -z "$run"; then
-	    # Make sure we have at least an empty file.
-	    test -f "$nlist" || : > "$nlist"
-
-	    if test -n "$exclude_expsyms"; then
-	      $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
-	      $mv "$nlist"T "$nlist"
-	    fi
-
-	    # Try sorting and uniquifying the output.
-	    if grep -v "^: " < "$nlist" |
-		if sort -k 3 </dev/null >/dev/null 2>&1; then
-		  sort -k 3
-		else
-		  sort +2
-		fi |
-		uniq > "$nlist"S; then
-	      :
-	    else
-	      grep -v "^: " < "$nlist" > "$nlist"S
-	    fi
-
-	    if test -f "$nlist"S; then
-	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
-	    else
-	      $echo '/* NONE */' >> "$output_objdir/$dlsyms"
-	    fi
-
-	    $echo >> "$output_objdir/$dlsyms" "\
-
-#undef lt_preloaded_symbols
-
-#if defined (__STDC__) && __STDC__
-# define lt_ptr void *
-#else
-# define lt_ptr char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
-  const char *name;
-  lt_ptr address;
-}
-lt_preloaded_symbols[] =
-{\
-"
-
-	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
-
-	    $echo >> "$output_objdir/$dlsyms" "\
-  {0, (lt_ptr) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
-  return lt_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif\
-"
-	  fi
-
-	  pic_flag_for_symtable=
-	  case $host in
-	  # compiling the symbol table file with pic_flag works around
-	  # a FreeBSD bug that causes programs to crash when -lm is
-	  # linked before any other PIC object.  But we must not use
-	  # pic_flag when linking with -static.  The problem exists in
-	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
-	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
-	    case "$compile_command " in
-	    *" -static "*) ;;
-	    *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
-	    esac;;
-	  *-*-hpux*)
-	    case "$compile_command " in
-	    *" -static "*) ;;
-	    *) pic_flag_for_symtable=" $pic_flag";;
-	    esac
-	  esac
-
-	  # Now compile the dynamic symbol file.
-	  $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
-	  $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
-
-	  # Clean up the generated files.
-	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
-	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
-
-	  # Transform the symbol file into the correct name.
-	  compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
-	  finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
-	  ;;
-	*)
-	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
-	  exit 1
-	  ;;
-	esac
-      else
-	# We keep going just in case the user didn't refer to
-	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
-	# really was required.
-
-	# Nullify the symbol file.
-	compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
-	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
-      fi
-
-      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
-	# Replace the output file specification.
-	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
-	link_command="$compile_command$compile_rpath"
-
-	# We have no uninstalled library dependencies, so finalize right now.
-	$show "$link_command"
-	$run eval "$link_command"
-	status=$?
-
-	# Delete the generated files.
-	if test -n "$dlsyms"; then
-	  $show "$rm $output_objdir/${outputname}S.${objext}"
-	  $run $rm "$output_objdir/${outputname}S.${objext}"
-	fi
-
-	exit $status
-      fi
-
-      if test -n "$shlibpath_var"; then
-	# We should set the shlibpath_var
-	rpath=
-	for dir in $temp_rpath; do
-	  case $dir in
-	  [\\/]* | [A-Za-z]:[\\/]*)
-	    # Absolute path.
-	    rpath="$rpath$dir:"
-	    ;;
-	  *)
-	    # Relative path: add a thisdir entry.
-	    rpath="$rpath\$thisdir/$dir:"
-	    ;;
-	  esac
-	done
-	temp_rpath="$rpath"
-      fi
-
-      if test -n "$compile_shlibpath$finalize_shlibpath"; then
-	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
-      fi
-      if test -n "$finalize_shlibpath"; then
-	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
-      fi
-
-      compile_var=
-      finalize_var=
-      if test -n "$runpath_var"; then
-	if test -n "$perm_rpath"; then
-	  # We should set the runpath_var.
-	  rpath=
-	  for dir in $perm_rpath; do
-	    rpath="$rpath$dir:"
-	  done
-	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
-	fi
-	if test -n "$finalize_perm_rpath"; then
-	  # We should set the runpath_var.
-	  rpath=
-	  for dir in $finalize_perm_rpath; do
-	    rpath="$rpath$dir:"
-	  done
-	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
-	fi
-      fi
-
-      if test "$no_install" = yes; then
-	# We don't need to create a wrapper script.
-	link_command="$compile_var$compile_command$compile_rpath"
-	# Replace the output file specification.
-	link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
-	# Delete the old output file.
-	$run $rm $output
-	# Link the executable and exit
-	$show "$link_command"
-	$run eval "$link_command" || exit $?
-	exit 0
-      fi
-
-      if test "$hardcode_action" = relink; then
-	# Fast installation is not supported
-	link_command="$compile_var$compile_command$compile_rpath"
-	relink_command="$finalize_var$finalize_command$finalize_rpath"
-
-	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
-	$echo "$modename: \`$output' will be relinked during installation" 1>&2
-      else
-	if test "$fast_install" != no; then
-	  link_command="$finalize_var$compile_command$finalize_rpath"
-	  if test "$fast_install" = yes; then
-	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
-	  else
-	    # fast_install is set to needless
-	    relink_command=
-	  fi
-	else
-	  link_command="$compile_var$compile_command$compile_rpath"
-	  relink_command="$finalize_var$finalize_command$finalize_rpath"
-	fi
-      fi
-
-      # Replace the output file specification.
-      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
-
-      # Delete the old output files.
-      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
-
-      $show "$link_command"
-      $run eval "$link_command" || exit $?
-
-      # Now create the wrapper script.
-      $show "creating $output"
-
-      # Quote the relink command for shipping.
-      if test -n "$relink_command"; then
-	# Preserve any variables that may affect compiler behavior
-	for var in $variables_saved_for_relink; do
-	  if eval test -z \"\${$var+set}\"; then
-	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
-	  elif eval var_value=\$$var; test -z "$var_value"; then
-	    relink_command="$var=; export $var; $relink_command"
-	  else
-	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
-	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
-	  fi
-	done
-	relink_command="(cd `pwd`; $relink_command)"
-	relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
-      fi
-
-      # Quote $echo for shipping.
-      if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
-	case $0 in
-	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
-	*) qecho="$SHELL `pwd`/$0 --fallback-echo";;
-	esac
-	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
-      else
-	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
-      fi
-
-      # Only actually do things if our run command is non-null.
-      if test -z "$run"; then
-	# win32 will think the script is a binary if it has
-	# a .exe suffix, so we strip it off here.
-	case $output in
-	  *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
-	esac
-	# test for cygwin because mv fails w/o .exe extensions
-	case $host in
-	  *cygwin*)
-	    exeext=.exe
-	    outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
-	  *) exeext= ;;
-	esac
-	case $host in
-	  *cygwin* | *mingw* )
-	    cwrappersource=`$echo ${objdir}/lt-${output}.c`
-	    cwrapper=`$echo ${output}.exe`
-	    $rm $cwrappersource $cwrapper
-	    trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15
-
-	    cat > $cwrappersource <<EOF
-
-/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
-   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-
-   The $output program cannot be directly executed until all the libtool
-   libraries that it depends on are installed.
-   
-   This wrapper executable should never be moved out of the build directory.
-   If it is, it will not operate correctly.
-
-   Currently, it simply execs the wrapper *script* "/bin/sh $output",
-   but could eventually absorb all of the scripts functionality and
-   exec $objdir/$outputname directly.
-*/
-EOF
-	    cat >> $cwrappersource<<"EOF"
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <malloc.h>
-#include <stdarg.h>
-#include <assert.h>
-
-#if defined(PATH_MAX)
-# define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
-# define LT_PATHMAX MAXPATHLEN
-#else
-# define LT_PATHMAX 1024
-#endif
-
-#ifndef DIR_SEPARATOR
-#define DIR_SEPARATOR '/'
-#endif
-
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
-  defined (__OS2__)
-#define HAVE_DOS_BASED_FILE_SYSTEM
-#ifndef DIR_SEPARATOR_2 
-#define DIR_SEPARATOR_2 '\\'
-#endif
-#endif
-
-#ifndef DIR_SEPARATOR_2
-# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-#else /* DIR_SEPARATOR_2 */
-# define IS_DIR_SEPARATOR(ch) \
-        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-#endif /* DIR_SEPARATOR_2 */
-
-#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
-#define XFREE(stale) do { \
-  if (stale) { free ((void *) stale); stale = 0; } \
-} while (0)
-
-const char *program_name = NULL;
-
-void * xmalloc (size_t num);
-char * xstrdup (const char *string);
-char * basename (const char *name);
-char * fnqualify(const char *path);
-char * strendzap(char *str, const char *pat);
-void lt_fatal (const char *message, ...);
-
-int
-main (int argc, char *argv[])
-{
-  char **newargz;
-  int i;
-  
-  program_name = (char *) xstrdup ((char *) basename (argv[0]));
-  newargz = XMALLOC(char *, argc+2);
-EOF
-
-	    cat >> $cwrappersource <<EOF
-  newargz[0] = "$SHELL";
-EOF
-
-	    cat >> $cwrappersource <<"EOF"
-  newargz[1] = fnqualify(argv[0]);
-  /* we know the script has the same name, without the .exe */
-  /* so make sure newargz[1] doesn't end in .exe */
-  strendzap(newargz[1],".exe"); 
-  for (i = 1; i < argc; i++)
-    newargz[i+1] = xstrdup(argv[i]);
-  newargz[argc+1] = NULL;
-EOF
-
-	    cat >> $cwrappersource <<EOF
-  execv("$SHELL",newargz);
-EOF
-
-	    cat >> $cwrappersource <<"EOF"
-}
-
-void *
-xmalloc (size_t num)
-{
-  void * p = (void *) malloc (num);
-  if (!p)
-    lt_fatal ("Memory exhausted");
-
-  return p;
-}
-
-char * 
-xstrdup (const char *string)
-{
-  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
-;
-}
-
-char *
-basename (const char *name)
-{
-  const char *base;
-
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  /* Skip over the disk name in MSDOS pathnames. */
-  if (isalpha (name[0]) && name[1] == ':') 
-    name += 2;
-#endif
-
-  for (base = name; *name; name++)
-    if (IS_DIR_SEPARATOR (*name))
-      base = name + 1;
-  return (char *) base;
-}
-
-char * 
-fnqualify(const char *path)
-{
-  size_t size;
-  char *p;
-  char tmp[LT_PATHMAX + 1];
-
-  assert(path != NULL);
-
-  /* Is it qualified already? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  if (isalpha (path[0]) && path[1] == ':')
-    return xstrdup (path);
-#endif
-  if (IS_DIR_SEPARATOR (path[0]))
-    return xstrdup (path);
-
-  /* prepend the current directory */
-  /* doesn't handle '~' */
-  if (getcwd (tmp, LT_PATHMAX) == NULL)
-    lt_fatal ("getcwd failed");
-  size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
-  p = XMALLOC(char, size);
-  sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
-  return p;
-}
-
-char *
-strendzap(char *str, const char *pat) 
-{
-  size_t len, patlen;
-
-  assert(str != NULL);
-  assert(pat != NULL);
-
-  len = strlen(str);
-  patlen = strlen(pat);
-
-  if (patlen <= len)
-  {
-    str += len - patlen;
-    if (strcmp(str, pat) == 0)
-      *str = '\0';
-  }
-  return str;
-}
-
-static void
-lt_error_core (int exit_status, const char * mode, 
-          const char * message, va_list ap)
-{
-  fprintf (stderr, "%s: %s: ", program_name, mode);
-  vfprintf (stderr, message, ap);
-  fprintf (stderr, ".\n");
-
-  if (exit_status >= 0)
-    exit (exit_status);
-}
-
-void
-lt_fatal (const char *message, ...)
-{
-  va_list ap;
-  va_start (ap, message);
-  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
-  va_end (ap);
-}
-EOF
-	  # we should really use a build-platform specific compiler
-	  # here, but OTOH, the wrappers (shell script and this C one)
-	  # are only useful if you want to execute the "real" binary.
-	  # Since the "real" binary is built for $host, then this
-	  # wrapper might as well be built for $host, too.
-	  $run $LTCC -s -o $cwrapper $cwrappersource
-	  ;;
-	esac
-	$rm $output
-	trap "$rm $output; exit 1" 1 2 15
-
-	$echo > $output "\
-#! $SHELL
-
-# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# The $output program cannot be directly executed until all the libtool
-# libraries that it depends on are installed.
-#
-# This wrapper script should never be moved out of the build directory.
-# If it is, it will not operate correctly.
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='${SED} -e 1s/^X//'
-sed_quote_subst='$sed_quote_subst'
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
-
-relink_command=\"$relink_command\"
-
-# This environment variable determines our operation mode.
-if test \"\$libtool_install_magic\" = \"$magic\"; then
-  # install mode needs the following variable:
-  notinst_deplibs='$notinst_deplibs'
-else
-  # When we are sourced in execute mode, \$file and \$echo are already set.
-  if test \"\$libtool_execute_magic\" != \"$magic\"; then
-    echo=\"$qecho\"
-    file=\"\$0\"
-    # Make sure echo works.
-    if test \"X\$1\" = X--no-reexec; then
-      # Discard the --no-reexec flag, and continue.
-      shift
-    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
-      # Yippee, \$echo works!
-      :
-    else
-      # Restart under the correct shell, and then maybe \$echo will work.
-      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
-    fi
-  fi\
-"
-	$echo >> $output "\
-
-  # Find the directory that this script lives in.
-  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
-  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
-
-  # Follow symbolic links until we get to the real thisdir.
-  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
-  while test -n \"\$file\"; do
-    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
-
-    # If there was a directory component, then change thisdir.
-    if test \"x\$destdir\" != \"x\$file\"; then
-      case \"\$destdir\" in
-      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
-      *) thisdir=\"\$thisdir/\$destdir\" ;;
-      esac
-    fi
-
-    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
-    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
-  done
-
-  # Try to get the absolute directory name.
-  absdir=\`cd \"\$thisdir\" && pwd\`
-  test -n \"\$absdir\" && thisdir=\"\$absdir\"
-"
-
-	if test "$fast_install" = yes; then
-	  $echo >> $output "\
-  program=lt-'$outputname'$exeext
-  progdir=\"\$thisdir/$objdir\"
-
-  if test ! -f \"\$progdir/\$program\" || \\
-     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
-       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
-
-    file=\"\$\$-\$program\"
-
-    if test ! -d \"\$progdir\"; then
-      $mkdir \"\$progdir\"
-    else
-      $rm \"\$progdir/\$file\"
-    fi"
-
-	  $echo >> $output "\
-
-    # relink executable if necessary
-    if test -n \"\$relink_command\"; then
-      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
-      else
-	$echo \"\$relink_command_output\" >&2
-	$rm \"\$progdir/\$file\"
-	exit 1
-      fi
-    fi
-
-    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
-    { $rm \"\$progdir/\$program\";
-      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
-    $rm \"\$progdir/\$file\"
-  fi"
-	else
-	  $echo >> $output "\
-  program='$outputname'
-  progdir=\"\$thisdir/$objdir\"
-"
-	fi
-
-	$echo >> $output "\
-
-  if test -f \"\$progdir/\$program\"; then"
-
-	# Export our shlibpath_var if we have one.
-	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
-	  $echo >> $output "\
-    # Add our own library path to $shlibpath_var
-    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
-
-    # Some systems cannot cope with colon-terminated $shlibpath_var
-    # The second colon is a workaround for a bug in BeOS R4 sed
-    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
-
-    export $shlibpath_var
-"
-	fi
-
-	# fixup the dll searchpath if we need to.
-	if test -n "$dllsearchpath"; then
-	  $echo >> $output "\
-    # Add the dll search path components to the executable PATH
-    PATH=$dllsearchpath:\$PATH
-"
-	fi
-
-	$echo >> $output "\
-    if test \"\$libtool_execute_magic\" != \"$magic\"; then
-      # Run the actual program with our arguments.
-"
-	case $host in
-	# Backslashes separate directories on plain windows
-	*-*-mingw | *-*-os2*)
-	  $echo >> $output "\
-      exec \$progdir\\\\\$program \${1+\"\$@\"}
-"
-	  ;;
-
-	*)
-	  $echo >> $output "\
-      exec \$progdir/\$program \${1+\"\$@\"}
-"
-	  ;;
-	esac
-	$echo >> $output "\
-      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
-      exit 1
-    fi
-  else
-    # The program doesn't exist.
-    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
-    \$echo \"This script is just a wrapper for \$program.\" 1>&2
-    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
-    exit 1
-  fi
-fi\
-"
-	chmod +x $output
-      fi
-      exit 0
-      ;;
-    esac
-
-    # See if we need to build an old-fashioned archive.
-    for oldlib in $oldlibs; do
-
-      if test "$build_libtool_libs" = convenience; then
-	oldobjs="$libobjs_save"
-	addlibs="$convenience"
-	build_libtool_libs=no
-      else
-	if test "$build_libtool_libs" = module; then
-	  oldobjs="$libobjs_save"
-	  build_libtool_libs=no
-	else
-	  oldobjs="$old_deplibs $non_pic_objects"
-	fi
-	addlibs="$old_convenience"
-      fi
-
-      if test -n "$addlibs"; then
-	gentop="$output_objdir/${outputname}x"
-	$show "${rm}r $gentop"
-	$run ${rm}r "$gentop"
-	$show "$mkdir $gentop"
-	$run $mkdir "$gentop"
-	status=$?
-	if test "$status" -ne 0 && test ! -d "$gentop"; then
-	  exit $status
-	fi
-	generated="$generated $gentop"
-
-	# Add in members from convenience archives.
-	for xlib in $addlibs; do
-	  # Extract the objects.
-	  case $xlib in
-	  [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-	  *) xabs=`pwd`"/$xlib" ;;
-	  esac
-	  xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-	  xdir="$gentop/$xlib"
-
-	  $show "${rm}r $xdir"
-	  $run ${rm}r "$xdir"
-	  $show "$mkdir $xdir"
-	  $run $mkdir "$xdir"
-	  status=$?
-	  if test "$status" -ne 0 && test ! -d "$xdir"; then
-	    exit $status
-	  fi
-	  # We will extract separately just the conflicting names and we will no
-	  # longer touch any unique names. It is faster to leave these extract
-	  # automatically by $AR in one run.
-	  $show "(cd $xdir && $AR x $xabs)"
-	  $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-	  if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
-	    :
-	  else
-	    $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
-	    $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
-	    $AR t "$xabs" | sort | uniq -cd | while read -r count name
-	    do
-	      i=1
-	      while test "$i" -le "$count"
-	      do
-	       # Put our $i before any first dot (extension)
-	       # Never overwrite any file
-	       name_to="$name"
-	       while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
-	       do
-		 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
-	       done
-	       $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
-	       $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
-	       i=`expr $i + 1`
-	      done
-	    done
-	  fi
-
-	  oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
-	done
-      fi
-
-      # Do each command in the archive commands.
-      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
-       cmds=$old_archive_from_new_cmds
-      else
-	eval cmds=\"$old_archive_cmds\"
-
-	if len=`expr "X$cmds" : ".*"` &&
-	     test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-	  cmds=$old_archive_cmds
-	else
-	  # the command line is too long to link in one step, link in parts
-	  $echo "using piecewise archive linking..."
-	  save_RANLIB=$RANLIB
-	  RANLIB=:
-	  objlist=
-	  concat_cmds=
-	  save_oldobjs=$oldobjs
-	  # GNU ar 2.10+ was changed to match POSIX; thus no paths are
-	  # encoded into archives.  This makes 'ar r' malfunction in
-	  # this piecewise linking case whenever conflicting object
-	  # names appear in distinct ar calls; check, warn and compensate.
-	    if (for obj in $save_oldobjs
-	    do
-	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
-	    done | sort | sort -uc >/dev/null 2>&1); then
-	    :
-	  else
-	    $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
-	    $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
-	    AR_FLAGS=cq
-	  fi
-	  # Is there a better way of finding the last object in the list?
-	  for obj in $save_oldobjs
-	  do
-	    last_oldobj=$obj
-	  done  
-	  for obj in $save_oldobjs
-	  do
-	    oldobjs="$objlist $obj"
-	    objlist="$objlist $obj"
-	    eval test_cmds=\"$old_archive_cmds\"
-	    if len=`expr "X$test_cmds" : ".*"` &&
-	       test "$len" -le "$max_cmd_len"; then
-	      :
-	    else
-	      # the above command should be used before it gets too long
-	      oldobjs=$objlist
-	      if test "$obj" = "$last_oldobj" ; then
-	        RANLIB=$save_RANLIB
-	      fi  
-	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
-	      objlist=
-	    fi
-	  done
-	  RANLIB=$save_RANLIB
-	  oldobjs=$objlist
-	  if test "X$oldobjs" = "X" ; then
-	    eval cmds=\"\$concat_cmds\"
-	  else
-	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
-	  fi
-	fi
-      fi
-      save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-        eval cmd=\"$cmd\"
-	IFS="$save_ifs"
-	$show "$cmd"
-	$run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-    done
-
-    if test -n "$generated"; then
-      $show "${rm}r$generated"
-      $run ${rm}r$generated
-    fi
-
-    # Now create the libtool archive.
-    case $output in
-    *.la)
-      old_library=
-      test "$build_old_libs" = yes && old_library="$libname.$libext"
-      $show "creating $output"
-
-      # Preserve any variables that may affect compiler behavior
-      for var in $variables_saved_for_relink; do
-	if eval test -z \"\${$var+set}\"; then
-	  relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
-	elif eval var_value=\$$var; test -z "$var_value"; then
-	  relink_command="$var=; export $var; $relink_command"
-	else
-	  var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
-	  relink_command="$var=\"$var_value\"; export $var; $relink_command"
-	fi
-      done
-      # Quote the link command for shipping.
-      relink_command="(cd `pwd`; $SHELL $0 $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
-      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
-      if test "$hardcode_automatic" = yes ; then
-        relink_command=
-      fi  
-      # Only create the output if not a dry run.
-      if test -z "$run"; then
-	for installed in no yes; do
-	  if test "$installed" = yes; then
-	    if test -z "$install_libdir"; then
-	      break
-	    fi
-	    output="$output_objdir/$outputname"i
-	    # Replace all uninstalled libtool libraries with the installed ones
-	    newdependency_libs=
-	    for deplib in $dependency_libs; do
-	      case $deplib in
-	      *.la)
-		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
-		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
-		if test -z "$libdir"; then
-		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
-		  exit 1
-		fi
-		newdependency_libs="$newdependency_libs $libdir/$name"
-		;;
-	      *) newdependency_libs="$newdependency_libs $deplib" ;;
-	      esac
-	    done
-	    dependency_libs="$newdependency_libs"
-	    newdlfiles=
-	    for lib in $dlfiles; do
-	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
-	      if test -z "$libdir"; then
-		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-		exit 1
-	      fi
-	      newdlfiles="$newdlfiles $libdir/$name"
-	    done
-	    dlfiles="$newdlfiles"
-	    newdlprefiles=
-	    for lib in $dlprefiles; do
-	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
-	      if test -z "$libdir"; then
-		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-		exit 1
-	      fi
-	      newdlprefiles="$newdlprefiles $libdir/$name"
-	    done
-	    dlprefiles="$newdlprefiles"
-	  else
-	    newdlfiles=
-	    for lib in $dlfiles; do
-	      case $lib in 
-		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
-		*) abs=`pwd`"/$lib" ;;
-	      esac
-	      newdlfiles="$newdlfiles $abs"
-	    done
-	    dlfiles="$newdlfiles"
-	    newdlprefiles=
-	    for lib in $dlprefiles; do
-	      case $lib in 
-		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
-		*) abs=`pwd`"/$lib" ;;
-	      esac
-	      newdlprefiles="$newdlprefiles $abs"
-	    done
-	    dlprefiles="$newdlprefiles"
-	  fi
-	  $rm $output
-	  # place dlname in correct position for cygwin
-	  tdlname=$dlname
-	  case $host,$output,$installed,$module,$dlname in
-	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
-	  esac
-	  $echo > $output "\
-# $outputname - a libtool library file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname='$tdlname'
-
-# Names of this library.
-library_names='$library_names'
-
-# The name of the static archive.
-old_library='$old_library'
-
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
-
-# Version information for $libname.
-current=$current
-age=$age
-revision=$revision
-
-# Is this an already installed library?
-installed=$installed
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=$module
-
-# Files to dlopen/dlpreopen
-dlopen='$dlfiles'
-dlpreopen='$dlprefiles'
-
-# Directory that this library needs to be installed in:
-libdir='$install_libdir'"
-	  if test "$installed" = no && test "$need_relink" = yes; then
-	    $echo >> $output "\
-relink_command=\"$relink_command\""
-	  fi
-	done
-      fi
-
-      # Do a symbolic link so that the libtool archive can be found in
-      # LD_LIBRARY_PATH before the program is installed.
-      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
-      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
-      ;;
-    esac
-    exit 0
-    ;;
-
-  # libtool install mode
-  install)
-    modename="$modename: install"
-
-    # There may be an optional sh(1) argument at the beginning of
-    # install_prog (especially on Windows NT).
-    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
-       # Allow the use of GNU shtool's install command.
-       $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
-      # Aesthetically quote it.
-      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
-      case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	arg="\"$arg\""
-	;;
-      esac
-      install_prog="$arg "
-      arg="$1"
-      shift
-    else
-      install_prog=
-      arg="$nonopt"
-    fi
-
-    # The real first argument should be the name of the installation program.
-    # Aesthetically quote it.
-    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-    case $arg in
-    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-      arg="\"$arg\""
-      ;;
-    esac
-    install_prog="$install_prog$arg"
-
-    # We need to accept at least all the BSD install flags.
-    dest=
-    files=
-    opts=
-    prev=
-    install_type=
-    isdir=no
-    stripme=
-    for arg
-    do
-      if test -n "$dest"; then
-	files="$files $dest"
-	dest="$arg"
-	continue
-      fi
-
-      case $arg in
-      -d) isdir=yes ;;
-      -f) prev="-f" ;;
-      -g) prev="-g" ;;
-      -m) prev="-m" ;;
-      -o) prev="-o" ;;
-      -s)
-	stripme=" -s"
-	continue
-	;;
-      -*) ;;
-
-      *)
-	# If the previous option needed an argument, then skip it.
-	if test -n "$prev"; then
-	  prev=
-	else
-	  dest="$arg"
-	  continue
-	fi
-	;;
-      esac
-
-      # Aesthetically quote the argument.
-      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-      case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
-	arg="\"$arg\""
-	;;
-      esac
-      install_prog="$install_prog $arg"
-    done
-
-    if test -z "$install_prog"; then
-      $echo "$modename: you must specify an install program" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    if test -n "$prev"; then
-      $echo "$modename: the \`$prev' option requires an argument" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    if test -z "$files"; then
-      if test -z "$dest"; then
-	$echo "$modename: no file or destination specified" 1>&2
-      else
-	$echo "$modename: you must specify a destination" 1>&2
-      fi
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    # Strip any trailing slash from the destination.
-    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
-
-    # Check to see that the destination is a directory.
-    test -d "$dest" && isdir=yes
-    if test "$isdir" = yes; then
-      destdir="$dest"
-      destname=
-    else
-      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
-      test "X$destdir" = "X$dest" && destdir=.
-      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
-
-      # Not a directory, so check to see that there is only one file specified.
-      set dummy $files
-      if test "$#" -gt 2; then
-	$echo "$modename: \`$dest' is not a directory" 1>&2
-	$echo "$help" 1>&2
-	exit 1
-      fi
-    fi
-    case $destdir in
-    [\\/]* | [A-Za-z]:[\\/]*) ;;
-    *)
-      for file in $files; do
-	case $file in
-	*.lo) ;;
-	*)
-	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
-	  $echo "$help" 1>&2
-	  exit 1
-	  ;;
-	esac
-      done
-      ;;
-    esac
-
-    # This variable tells wrapper scripts just to set variables rather
-    # than running their programs.
-    libtool_install_magic="$magic"
-
-    staticlibs=
-    future_libdirs=
-    current_libdirs=
-    for file in $files; do
-
-      # Do each installation.
-      case $file in
-      *.$libext)
-	# Do the static libraries later.
-	staticlibs="$staticlibs $file"
-	;;
-
-      *.la)
-	# Check to see that this really is a libtool archive.
-	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-	else
-	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
-	  $echo "$help" 1>&2
-	  exit 1
-	fi
-
-	library_names=
-	old_library=
-	relink_command=
-	# If there is no directory component, then add one.
-	case $file in
-	*/* | *\\*) . $file ;;
-	*) . ./$file ;;
-	esac
-
-	# Add the libdir to current_libdirs if it is the destination.
-	if test "X$destdir" = "X$libdir"; then
-	  case "$current_libdirs " in
-	  *" $libdir "*) ;;
-	  *) current_libdirs="$current_libdirs $libdir" ;;
-	  esac
-	else
-	  # Note the libdir as a future libdir.
-	  case "$future_libdirs " in
-	  *" $libdir "*) ;;
-	  *) future_libdirs="$future_libdirs $libdir" ;;
-	  esac
-	fi
-
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
-	test "X$dir" = "X$file/" && dir=
-	dir="$dir$objdir"
-
-	if test -n "$relink_command"; then
-	  # Determine the prefix the user has applied to our future dir.
-	  inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
-
-	  # Don't allow the user to place us outside of our expected
-	  # location b/c this prevents finding dependent libraries that
-	  # are installed to the same prefix.
-	  # At present, this check doesn't affect windows .dll's that
-	  # are installed into $libdir/../bin (currently, that works fine)
-	  # but it's something to keep an eye on.
-	  if test "$inst_prefix_dir" = "$destdir"; then
-	    $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
-	    exit 1
-	  fi
-
-	  if test -n "$inst_prefix_dir"; then
-	    # Stick the inst_prefix_dir data into the link command.
-	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
-	  else
-	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
-	  fi
-
-	  $echo "$modename: warning: relinking \`$file'" 1>&2
-	  $show "$relink_command"
-	  if $run eval "$relink_command"; then :
-	  else
-	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
-	    exit 1
-	  fi
-	fi
-
-	# See the names of the shared library.
-	set dummy $library_names
-	if test -n "$2"; then
-	  realname="$2"
-	  shift
-	  shift
-
-	  srcname="$realname"
-	  test -n "$relink_command" && srcname="$realname"T
-
-	  # Install the shared library and build the symlinks.
-	  $show "$install_prog $dir/$srcname $destdir/$realname"
-	  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
-	  if test -n "$stripme" && test -n "$striplib"; then
-	    $show "$striplib $destdir/$realname"
-	    $run eval "$striplib $destdir/$realname" || exit $?
-	  fi
-
-	  if test "$#" -gt 0; then
-	    # Delete the old symlinks, and create new ones.
-	    for linkname
-	    do
-	      if test "$linkname" != "$realname"; then
-		$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
-		$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
-	      fi
-	    done
-	  fi
-
-	  # Do each command in the postinstall commands.
-	  lib="$destdir/$realname"
-	  cmds=$postinstall_cmds
-	  save_ifs="$IFS"; IFS='~'
-	  for cmd in $cmds; do
-	    IFS="$save_ifs"
-	    eval cmd=\"$cmd\"
-	    $show "$cmd"
-	    $run eval "$cmd" || exit $?
-	  done
-	  IFS="$save_ifs"
-	fi
-
-	# Install the pseudo-library for information purposes.
-	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-	instname="$dir/$name"i
-	$show "$install_prog $instname $destdir/$name"
-	$run eval "$install_prog $instname $destdir/$name" || exit $?
-
-	# Maybe install the static library, too.
-	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
-	;;
-
-      *.lo)
-	# Install (i.e. copy) a libtool object.
-
-	# Figure out destination file name, if it wasn't already specified.
-	if test -n "$destname"; then
-	  destfile="$destdir/$destname"
-	else
-	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-	  destfile="$destdir/$destfile"
-	fi
-
-	# Deduce the name of the destination old-style object file.
-	case $destfile in
-	*.lo)
-	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
-	  ;;
-	*.$objext)
-	  staticdest="$destfile"
-	  destfile=
-	  ;;
-	*)
-	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
-	  $echo "$help" 1>&2
-	  exit 1
-	  ;;
-	esac
-
-	# Install the libtool object if requested.
-	if test -n "$destfile"; then
-	  $show "$install_prog $file $destfile"
-	  $run eval "$install_prog $file $destfile" || exit $?
-	fi
-
-	# Install the old object if enabled.
-	if test "$build_old_libs" = yes; then
-	  # Deduce the name of the old-style object file.
-	  staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
-
-	  $show "$install_prog $staticobj $staticdest"
-	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
-	fi
-	exit 0
-	;;
-
-      *)
-	# Figure out destination file name, if it wasn't already specified.
-	if test -n "$destname"; then
-	  destfile="$destdir/$destname"
-	else
-	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-	  destfile="$destdir/$destfile"
-	fi
-
-	# If the file is missing, and there is a .exe on the end, strip it
-	# because it is most likely a libtool script we actually want to
-	# install
-	stripped_ext=""
-	case $file in
-	  *.exe)
-	    if test ! -f "$file"; then
-	      file=`$echo $file|${SED} 's,.exe$,,'`
-	      stripped_ext=".exe"
-	    fi
-	    ;;
-	esac
-
-	# Do a test to see if this is really a libtool program.
-	case $host in
-	*cygwin*|*mingw*)
-	    wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
-	    ;;
-	*)
-	    wrapper=$file
-	    ;;
-	esac
-	if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
-	  notinst_deplibs=
-	  relink_command=
-
-	  # To insure that "foo" is sourced, and not "foo.exe",
-	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
-	  # which disallows the automatic-append-.exe behavior.
-	  case $build in
-	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
-	  *) wrapperdot=${wrapper} ;;
-	  esac
-	  # If there is no directory component, then add one.
-	  case $file in
-	  */* | *\\*) . ${wrapperdot} ;;
-	  *) . ./${wrapperdot} ;;
-	  esac
-
-	  # Check the variables that should have been set.
-	  if test -z "$notinst_deplibs"; then
-	    $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
-	    exit 1
-	  fi
-
-	  finalize=yes
-	  for lib in $notinst_deplibs; do
-	    # Check to see that each library is installed.
-	    libdir=
-	    if test -f "$lib"; then
-	      # If there is no directory component, then add one.
-	      case $lib in
-	      */* | *\\*) . $lib ;;
-	      *) . ./$lib ;;
-	      esac
-	    fi
-	    libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
-	    if test -n "$libdir" && test ! -f "$libfile"; then
-	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
-	      finalize=no
-	    fi
-	  done
-
-	  relink_command=
-	  # To insure that "foo" is sourced, and not "foo.exe",
-	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
-	  # which disallows the automatic-append-.exe behavior.
-	  case $build in
-	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
-	  *) wrapperdot=${wrapper} ;;
-	  esac
-	  # If there is no directory component, then add one.
-	  case $file in
-	  */* | *\\*) . ${wrapperdot} ;;
-	  *) . ./${wrapperdot} ;;
-	  esac
-
-	  outputname=
-	  if test "$fast_install" = no && test -n "$relink_command"; then
-	    if test "$finalize" = yes && test -z "$run"; then
-	      tmpdir="/tmp"
-	      test -n "$TMPDIR" && tmpdir="$TMPDIR"
-	      tmpdir="$tmpdir/libtool-$$"
-	      if $mkdir "$tmpdir" && chmod 700 "$tmpdir"; then :
-	      else
-		$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
-		continue
-	      fi
-	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
-	      outputname="$tmpdir/$file"
-	      # Replace the output file specification.
-	      relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
-
-	      $show "$relink_command"
-	      if $run eval "$relink_command"; then :
-	      else
-		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
-		${rm}r "$tmpdir"
-		continue
-	      fi
-	      file="$outputname"
-	    else
-	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
-	    fi
-	  else
-	    # Install the binary that we compiled earlier.
-	    file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
-	  fi
-	fi
-
-	# remove .exe since cygwin /usr/bin/install will append another
-	# one anyways
-	case $install_prog,$host in
-	*/usr/bin/install*,*cygwin*)
-	  case $file:$destfile in
-	  *.exe:*.exe)
-	    # this is ok
-	    ;;
-	  *.exe:*)
-	    destfile=$destfile.exe
-	    ;;
-	  *:*.exe)
-	    destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
-	    ;;
-	  esac
-	  ;;
-	esac
-	$show "$install_prog$stripme $file $destfile"
-	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
-	test -n "$outputname" && ${rm}r "$tmpdir"
-	;;
-      esac
-    done
-
-    for file in $staticlibs; do
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-
-      # Set up the ranlib parameters.
-      oldlib="$destdir/$name"
-
-      $show "$install_prog $file $oldlib"
-      $run eval "$install_prog \$file \$oldlib" || exit $?
-
-      if test -n "$stripme" && test -n "$old_striplib"; then
-	$show "$old_striplib $oldlib"
-	$run eval "$old_striplib $oldlib" || exit $?
-      fi
-
-      # Do each command in the postinstall commands.
-      cmds=$old_postinstall_cmds
-      save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-	IFS="$save_ifs"
-	eval cmd=\"$cmd\"
-	$show "$cmd"
-	$run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-    done
-
-    if test -n "$future_libdirs"; then
-      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
-    fi
-
-    if test -n "$current_libdirs"; then
-      # Maybe just do a dry run.
-      test -n "$run" && current_libdirs=" -n$current_libdirs"
-      exec_cmd='$SHELL $0 $preserve_args --finish$current_libdirs'
-    else
-      exit 0
-    fi
-    ;;
-
-  # libtool finish mode
-  finish)
-    modename="$modename: finish"
-    libdirs="$nonopt"
-    admincmds=
-
-    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
-      for dir
-      do
-	libdirs="$libdirs $dir"
-      done
-
-      for libdir in $libdirs; do
-	if test -n "$finish_cmds"; then
-	  # Do each command in the finish commands.
-	  cmds=$finish_cmds
-	  save_ifs="$IFS"; IFS='~'
-	  for cmd in $cmds; do
-	    IFS="$save_ifs"
-	    eval cmd=\"$cmd\"
-	    $show "$cmd"
-	    $run eval "$cmd" || admincmds="$admincmds
-       $cmd"
-	  done
-	  IFS="$save_ifs"
-	fi
-	if test -n "$finish_eval"; then
-	  # Do the single finish_eval.
-	  eval cmds=\"$finish_eval\"
-	  $run eval "$cmds" || admincmds="$admincmds
-       $cmds"
-	fi
-      done
-    fi
-
-    # Exit here if they wanted silent mode.
-    test "$show" = : && exit 0
-
-    $echo "----------------------------------------------------------------------"
-    $echo "Libraries have been installed in:"
-    for libdir in $libdirs; do
-      $echo "   $libdir"
-    done
-    $echo
-    $echo "If you ever happen to want to link against installed libraries"
-    $echo "in a given directory, LIBDIR, you must either use libtool, and"
-    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
-    $echo "flag during linking and do at least one of the following:"
-    if test -n "$shlibpath_var"; then
-      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
-      $echo "     during execution"
-    fi
-    if test -n "$runpath_var"; then
-      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
-      $echo "     during linking"
-    fi
-    if test -n "$hardcode_libdir_flag_spec"; then
-      libdir=LIBDIR
-      eval flag=\"$hardcode_libdir_flag_spec\"
-
-      $echo "   - use the \`$flag' linker flag"
-    fi
-    if test -n "$admincmds"; then
-      $echo "   - have your system administrator run these commands:$admincmds"
-    fi
-    if test -f /etc/ld.so.conf; then
-      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
-    fi
-    $echo
-    $echo "See any operating system documentation about shared libraries for"
-    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
-    $echo "----------------------------------------------------------------------"
-    exit 0
-    ;;
-
-  # libtool execute mode
-  execute)
-    modename="$modename: execute"
-
-    # The first argument is the command name.
-    cmd="$nonopt"
-    if test -z "$cmd"; then
-      $echo "$modename: you must specify a COMMAND" 1>&2
-      $echo "$help"
-      exit 1
-    fi
-
-    # Handle -dlopen flags immediately.
-    for file in $execute_dlfiles; do
-      if test ! -f "$file"; then
-	$echo "$modename: \`$file' is not a file" 1>&2
-	$echo "$help" 1>&2
-	exit 1
-      fi
-
-      dir=
-      case $file in
-      *.la)
-	# Check to see that this really is a libtool archive.
-	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-	else
-	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-	  $echo "$help" 1>&2
-	  exit 1
-	fi
-
-	# Read the libtool library.
-	dlname=
-	library_names=
-
-	# If there is no directory component, then add one.
-	case $file in
-	*/* | *\\*) . $file ;;
-	*) . ./$file ;;
-	esac
-
-	# Skip this library if it cannot be dlopened.
-	if test -z "$dlname"; then
-	  # Warn if it was a shared library.
-	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
-	  continue
-	fi
-
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-	test "X$dir" = "X$file" && dir=.
-
-	if test -f "$dir/$objdir/$dlname"; then
-	  dir="$dir/$objdir"
-	else
-	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
-	  exit 1
-	fi
-	;;
-
-      *.lo)
-	# Just add the directory containing the .lo file.
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-	test "X$dir" = "X$file" && dir=.
-	;;
-
-      *)
-	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
-	continue
-	;;
-      esac
-
-      # Get the absolute pathname.
-      absdir=`cd "$dir" && pwd`
-      test -n "$absdir" && dir="$absdir"
-
-      # Now add the directory to shlibpath_var.
-      if eval "test -z \"\$$shlibpath_var\""; then
-	eval "$shlibpath_var=\"\$dir\""
-      else
-	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
-      fi
-    done
-
-    # This variable tells wrapper scripts just to set shlibpath_var
-    # rather than running their programs.
-    libtool_execute_magic="$magic"
-
-    # Check if any of the arguments is a wrapper script.
-    args=
-    for file
-    do
-      case $file in
-      -*) ;;
-      *)
-	# Do a test to see if this is really a libtool program.
-	if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-	  # If there is no directory component, then add one.
-	  case $file in
-	  */* | *\\*) . $file ;;
-	  *) . ./$file ;;
-	  esac
-
-	  # Transform arg to wrapped name.
-	  file="$progdir/$program"
-	fi
-	;;
-      esac
-      # Quote arguments (to preserve shell metacharacters).
-      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
-      args="$args \"$file\""
-    done
-
-    if test -z "$run"; then
-      if test -n "$shlibpath_var"; then
-	# Export the shlibpath_var.
-	eval "export $shlibpath_var"
-      fi
-
-      # Restore saved environment variables
-      if test "${save_LC_ALL+set}" = set; then
-	LC_ALL="$save_LC_ALL"; export LC_ALL
-      fi
-      if test "${save_LANG+set}" = set; then
-	LANG="$save_LANG"; export LANG
-      fi
-
-      # Now prepare to actually exec the command.
-      exec_cmd="\$cmd$args"
-    else
-      # Display what would be done.
-      if test -n "$shlibpath_var"; then
-	eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
-	$echo "export $shlibpath_var"
-      fi
-      $echo "$cmd$args"
-      exit 0
-    fi
-    ;;
-
-  # libtool clean and uninstall mode
-  clean | uninstall)
-    modename="$modename: $mode"
-    rm="$nonopt"
-    files=
-    rmforce=
-    exit_status=0
-
-    # This variable tells wrapper scripts just to set variables rather
-    # than running their programs.
-    libtool_install_magic="$magic"
-
-    for arg
-    do
-      case $arg in
-      -f) rm="$rm $arg"; rmforce=yes ;;
-      -*) rm="$rm $arg" ;;
-      *) files="$files $arg" ;;
-      esac
-    done
-
-    if test -z "$rm"; then
-      $echo "$modename: you must specify an RM program" 1>&2
-      $echo "$help" 1>&2
-      exit 1
-    fi
-
-    rmdirs=
-
-    origobjdir="$objdir"
-    for file in $files; do
-      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-      if test "X$dir" = "X$file"; then
-	dir=.
-	objdir="$origobjdir"
-      else
-	objdir="$dir/$origobjdir"
-      fi
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-      test "$mode" = uninstall && objdir="$dir"
-
-      # Remember objdir for removal later, being careful to avoid duplicates
-      if test "$mode" = clean; then
-	case " $rmdirs " in
-	  *" $objdir "*) ;;
-	  *) rmdirs="$rmdirs $objdir" ;;
-	esac
-      fi
-
-      # Don't error if the file doesn't exist and rm -f was used.
-      if (test -L "$file") >/dev/null 2>&1 \
-	|| (test -h "$file") >/dev/null 2>&1 \
-	|| test -f "$file"; then
-	:
-      elif test -d "$file"; then
-	exit_status=1
-	continue
-      elif test "$rmforce" = yes; then
-	continue
-      fi
-
-      rmfiles="$file"
-
-      case $name in
-      *.la)
-	# Possibly a libtool archive, so verify it.
-	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-	  . $dir/$name
-
-	  # Delete the libtool libraries and symlinks.
-	  for n in $library_names; do
-	    rmfiles="$rmfiles $objdir/$n"
-	  done
-	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
-	  test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
-
-	  if test "$mode" = uninstall; then
-	    if test -n "$library_names"; then
-	      # Do each command in the postuninstall commands.
-	      cmds=$postuninstall_cmds
-	      save_ifs="$IFS"; IFS='~'
-	      for cmd in $cmds; do
-		IFS="$save_ifs"
-		eval cmd=\"$cmd\"
-		$show "$cmd"
-		$run eval "$cmd"
-		if test "$?" -ne 0 && test "$rmforce" != yes; then
-		  exit_status=1
-		fi
-	      done
-	      IFS="$save_ifs"
-	    fi
-
-	    if test -n "$old_library"; then
-	      # Do each command in the old_postuninstall commands.
-	      cmds=$old_postuninstall_cmds
-	      save_ifs="$IFS"; IFS='~'
-	      for cmd in $cmds; do
-		IFS="$save_ifs"
-		eval cmd=\"$cmd\"
-		$show "$cmd"
-		$run eval "$cmd"
-		if test "$?" -ne 0 && test "$rmforce" != yes; then
-		  exit_status=1
-		fi
-	      done
-	      IFS="$save_ifs"
-	    fi
-	    # FIXME: should reinstall the best remaining shared library.
-	  fi
-	fi
-	;;
-
-      *.lo)
-	# Possibly a libtool object, so verify it.
-	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-
-	  # Read the .lo file
-	  . $dir/$name
-
-	  # Add PIC object to the list of files to remove.
-	  if test -n "$pic_object" \
-	     && test "$pic_object" != none; then
-	    rmfiles="$rmfiles $dir/$pic_object"
-	  fi
-
-	  # Add non-PIC object to the list of files to remove.
-	  if test -n "$non_pic_object" \
-	     && test "$non_pic_object" != none; then
-	    rmfiles="$rmfiles $dir/$non_pic_object"
-	  fi
-	fi
-	;;
-
-      *)
-	if test "$mode" = clean ; then
-	  noexename=$name
-	  case $file in
-	  *.exe) 
-	    file=`$echo $file|${SED} 's,.exe$,,'`
-	    noexename=`$echo $name|${SED} 's,.exe$,,'`
-	    # $file with .exe has already been added to rmfiles,
-	    # add $file without .exe
-	    rmfiles="$rmfiles $file"
-	    ;;
-	  esac
-	  # Do a test to see if this is a libtool program.
-	  if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-	    relink_command=
-	    . $dir/$noexename
-
-	    # note $name still contains .exe if it was in $file originally
-	    # as does the version of $file that was added into $rmfiles
-	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
-	    if test "$fast_install" = yes && test -n "$relink_command"; then
-	      rmfiles="$rmfiles $objdir/lt-$name"
-	    fi
-	    if test "X$noexename" != "X$name" ; then
-	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
-	    fi
-	  fi
-	fi
-	;;
-      esac
-      $show "$rm $rmfiles"
-      $run $rm $rmfiles || exit_status=1
-    done
-    objdir="$origobjdir"
-
-    # Try to remove the ${objdir}s in the directories where we deleted files
-    for dir in $rmdirs; do
-      if test -d "$dir"; then
-	$show "rmdir $dir"
-	$run rmdir $dir >/dev/null 2>&1
-      fi
-    done
-
-    exit $exit_status
-    ;;
-
-  "")
-    $echo "$modename: you must specify a MODE" 1>&2
-    $echo "$generic_help" 1>&2
-    exit 1
-    ;;
-  esac
-
-  if test -z "$exec_cmd"; then
-    $echo "$modename: invalid operation mode \`$mode'" 1>&2
-    $echo "$generic_help" 1>&2
-    exit 1
-  fi
-fi # test -z "$show_help"
-
-if test -n "$exec_cmd"; then
-  eval exec $exec_cmd
-  exit 1
-fi
-
-# We need to display help for each of the modes.
-case $mode in
-"") $echo \
-"Usage: $modename [OPTION]... [MODE-ARG]...
-
-Provide generalized library-building support services.
-
-    --config          show all configuration variables
-    --debug           enable verbose shell tracing
--n, --dry-run         display commands without modifying any files
-    --features        display basic configuration information and exit
-    --finish          same as \`--mode=finish'
-    --help            display this help message and exit
-    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
-    --quiet           same as \`--silent'
-    --silent          don't print informational messages
-    --tag=TAG         use configuration variables from tag TAG
-    --version         print version information
-
-MODE must be one of the following:
-
-      clean           remove files from the build directory
-      compile         compile a source file into a libtool object
-      execute         automatically set library path, then run a program
-      finish          complete the installation of libtool libraries
-      install         install libraries or executables
-      link            create a library or an executable
-      uninstall       remove libraries from an installed directory
-
-MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
-a more detailed description of MODE.
-
-Report bugs to <bug-libtool at gnu.org>."
-  exit 0
-  ;;
-
-clean)
-  $echo \
-"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
-
-Remove files from the build directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, object or program, all the files associated
-with it are deleted. Otherwise, only FILE itself is deleted using RM."
-  ;;
-
-compile)
-  $echo \
-"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
-
-Compile a source file into a libtool library object.
-
-This mode accepts the following additional options:
-
-  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
-  -prefer-pic       try to building PIC objects only
-  -prefer-non-pic   try to building non-PIC objects only
-  -static           always build a \`.o' file suitable for static linking
-
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
-from the given SOURCEFILE.
-
-The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
-  ;;
-
-execute)
-  $echo \
-"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
-
-Automatically set library path, then run a program.
-
-This mode accepts the following additional options:
-
-  -dlopen FILE      add the directory containing FILE to the library path
-
-This mode sets the library path environment variable according to \`-dlopen'
-flags.
-
-If any of the ARGS are libtool executable wrappers, then they are translated
-into their corresponding uninstalled binary, and any of their required library
-directories are added to the library path.
-
-Then, COMMAND is executed, with ARGS as arguments."
-  ;;
-
-finish)
-  $echo \
-"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
-
-Complete the installation of libtool libraries.
-
-Each LIBDIR is a directory that contains libtool libraries.
-
-The commands that this mode executes may require superuser privileges.  Use
-the \`--dry-run' option if you just want to see what would be executed."
-  ;;
-
-install)
-  $echo \
-"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
-
-Install executables or libraries.
-
-INSTALL-COMMAND is the installation command.  The first component should be
-either the \`install' or \`cp' program.
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
-  ;;
-
-link)
-  $echo \
-"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
-
-Link object files or libraries together to form another library, or to
-create an executable program.
-
-LINK-COMMAND is a command using the C compiler that you would use to create
-a program from several object files.
-
-The following components of LINK-COMMAND are treated specially:
-
-  -all-static       do not do any dynamic linking at all
-  -avoid-version    do not add a version suffix if possible
-  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
-  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
-  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-  -export-symbols SYMFILE
-		    try to export only the symbols listed in SYMFILE
-  -export-symbols-regex REGEX
-		    try to export only the symbols matching REGEX
-  -LLIBDIR          search LIBDIR for required installed libraries
-  -lNAME            OUTPUT-FILE requires the installed library libNAME
-  -module           build a library that can dlopened
-  -no-fast-install  disable the fast-install mode
-  -no-install       link a not-installable executable
-  -no-undefined     declare that a library does not refer to external symbols
-  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
-  -objectlist FILE  Use a list of object files found in FILE to specify objects
-  -precious-files-regex REGEX
-                    don't remove output files matching REGEX
-  -release RELEASE  specify package release information
-  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
-  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
-  -static           do not do any dynamic linking of libtool libraries
-  -version-info CURRENT[:REVISION[:AGE]]
-		    specify library version info [each variable defaults to 0]
-
-All other options (arguments beginning with \`-') are ignored.
-
-Every other argument is treated as a filename.  Files ending in \`.la' are
-treated as uninstalled libtool libraries, other files are standard or library
-object files.
-
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
-required, except when creating a convenience library.
-
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
-
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
-is created, otherwise an executable program is created."
-  ;;
-
-uninstall)
-  $echo \
-"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
-
-Remove libraries from an installation directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, all the files associated with it are deleted.
-Otherwise, only FILE itself is deleted using RM."
-  ;;
-
-*)
-  $echo "$modename: invalid operation mode \`$mode'" 1>&2
-  $echo "$help" 1>&2
-  exit 1
-  ;;
-esac
-
-$echo
-$echo "Try \`$modename --help' for more information about other modes."
-
-exit 0
-
-# The TAGs below are defined such that we never get into a situation
-# in which we disable both kinds of libraries.  Given conflicting
-# choices, we go for a static library, that is the most portable,
-# since we can't tell whether shared libraries were disabled because
-# the user asked for that or because the platform doesn't support
-# them.  This is particularly important on AIX, because we don't
-# support having both static and shared libraries enabled at the same
-# time on that platform, so we default to a shared-only configuration.
-# If a disable-shared tag is given, we'll fallback to a static-only
-# configuration.  But we'll never go from static-only to shared-only.
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-build_libtool_libs=no
-build_old_libs=yes
-# ### END LIBTOOL TAG CONFIG: disable-shared
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-static
-build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
-# ### END LIBTOOL TAG CONFIG: disable-static
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
diff --git a/makefile.vc b/makefile.vc
deleted file mode 100644
index 7f5c5c2..0000000
--- a/makefile.vc
+++ /dev/null
@@ -1,38 +0,0 @@
-###
-# $Id: makefile.vc 16136 2009-12-18 15:09:14Z dburken $
-#
-# Windows nmake make file.  This code should compile with the Microsoft .NET
-# compiler.
-# 
-# Currently for a typical build on windows you would do the following:
-#
-# - cd to the ossim top and edit its nmake.opt file appropriately.
-# - nmake /f makefile
-# - nmake /f makefile install (if you want the apps in the bin directory.
-#
-# NOTE:  If you make shared apps it's handy to copy the ossim.dll to the bin
-#        directory. 
-###
-
-!INCLUDE nmake.opt
-
-default:
-	cd src
-	$(MAKE) /f makefile.vc
-	cd ..
-
-install:
-	cd src
-	$(MAKE) /f makefile.vc install
-	cd ..
-	$(CP) $(LIBDIR)\ossim.dll $(BINDIR)
-	$(CP) $(LIBDIR)\ossim.dll.manifest $(BINDIR)
-
-clean:
-	cd src
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	$(RM) lib\*.*
-
-clobber:	clean
-	$(RM) bin\*.*
diff --git a/makefiles/cygwin/makelib b/makefiles/cygwin/makelib
deleted file mode 100644
index 3b8a0e0..0000000
--- a/makefiles/cygwin/makelib
+++ /dev/null
@@ -1,248 +0,0 @@
-###
-# $Id: makelib 12268 2008-01-07 16:01:58Z dburken $
-###
-CCSRCS=$(wildcard *.cc)
-CPPSRCS=$(wildcard *.cpp)
-CSRCS=$(wildcard *.c)
-SRCS=$(CCSRCS) $(CPPSRCS)
-COBJS=$(patsubst %.c,%.o,$(CSRCS))
-CCOBJS=$(patsubst %.cc,%.o,$(CCSRCS))
-CPPOBJS=$(patsubst %.cpp,%.o,$(CPPSRCS))
-OBJS=$(CCOBJS) $(CPPOBJS) $(COBJS) 
-
-DIRECTORIES=$(filter-out %.o %.d %.cc %.cc %.cpp %.c %.h %.inc %.lo %.libs Makefile cvs CVS bitmaps test_endian test generator .libs .obj test_suite include , $(wildcard *))
-DEPENDS_FILES=$(wildcard *.d)
-INCLUDES=$(BASE_INCLUDES)
-HEADERS=$(wildcard *.h)
-
-
-
-SHARED_LIB_VERSIONLESS=$(OSSIM_LIB).$(SO_VERSIONLESS_EXT)
-SHARED_LIB_SONAME=$(OSSIM_LIB).$(SO_SONAME_EXT)
-SHARED_LIB_REALNAME=$(OSSIM_LIB).la
-SHARED_LIB_TARGET=$(OSSIM_LIB_PATH)/$(SHARED_LIB_REALNAME)
-SHARED_OBJ_DIR_PATH=$(BASELIBPATH)/$(SHARED_OBJ_DIR)
-SHARED_LIB_TEMP_ARCHIVE=$(SHARED_OBJ_DIR_PATH)/$(OSSIM_LIB).a
-
-STATIC_LIB=$(OSSIM_LIB).a
-STATIC_LIB_TARGET=$(OSSIM_LIB_PATH)/$(STATIC_LIB)
-STATIC_OBJ_DIR_PATH=$(BASELIBPATH)/$(STATIC_OBJ_DIR)
-
-# ---
-# To handle "for d in $(VAR);" expanding to  "for d in ;"
-# if no directories present and producing an error on sun os.
-# Substitute empty string with bogus string.
-# ---
-ifeq ($(strip $(DIRECTORIES)),)
-DIRECTORIES=BOGUS_DIR
-endif
-
-# ---
-# all target:
-# 1) Make directories to hold objects.
-# 2) Make all objects.
-# 3) Make all subdirectories.
-# 4) If at top level of the core library directory make the libraries.
-# ---
-all:    destobjdir $(OBJS)
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) all) ; \
-		fi ; \
-	done ;
-	if [ -d $(SHARED_OBJ_DIR) ] ; then $(build_shared_lib) fi
-	if [ -d $(STATIC_OBJ_DIR) ] ; then $(build_static_lib) fi
-
-# ---
-# lib target:
-# 1) Make directories to hold objects.
-# 2) Make all objects.
-# 3) Make all subdirectories.
-# 4) Unlike all target always make the libraries even in not in top directory.
-# ---
-lib:	destobjdir $(OBJS)
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) all) ; \
-		fi ; \
-	done ;
-	$(build_shared_lib)
-	$(build_static_lib)
-
-depends: 	$(CCSRCS:.cc=.d)\
-		$(CSRCS:.c=.d)\
-		$(CPPSRCS:.cpp=.d)
-
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) depends) ; \
-		fi ; \
-	done ;
-
-destobjdir:
-	$(mkdir_shared)
-	$(mkdir_static)
-
-###
-# PLEASE KEEP:
-# This is how ossimEquTokenizer.cpp was generated.
-# Commented out on purpose so rule is not ran at compile time.
-# Explicit rule to make ossimEquTokenizer.cpp from ossimEquTokenizer files.
-# ossimEquTokenizer.cpp: ossimEquTokenizer.l ossimEquTokenDefines.h
-# 	flex -PossimEquTokenizer -+ ossimEquTokenizer.l
-# 	mv lex.ossimEquTokenizer.cc ossimEquTokenizer.cpp
-###
-
-clean_depends:
-	($(RM_NOPROMPT) *.d);
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) clean_depends) ; \
-		fi; \
-	done ;
-
-clean:
-	$(RM_CMD)
-	if [ -d ".obj" ]; then \
-		(cd .obj; $(RM_CMD); cd .libs; $(RM_CMD)) ; \
-	fi
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) clean) ; \
-		fi ; \
-	done ;
-	if [ -d $(SHARED_OBJ_DIR) ]; then $(RMDIR) $(SHARED_OBJ_DIR) ; fi
-	if [ -d $(STATIC_OBJ_DIR) ]; then $(RMDIR) $(STATIC_OBJ_DIR) ; fi
-
-###
-# Pattern rule for objects from .cpp files.
-###
-%.$(OBJEXT): %.cpp
-ifeq ($(BUILD_SHARED_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(PIC_FLAG) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp $@ $(SHARED_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-ifeq ($(BUILD_STATIC_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@;
-	cp $@ $(STATIC_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-
-###
-# Pattern rule for objects from .cc files.
-###
-%.$(OBJEXT): %.cc
-ifeq ($(BUILD_SHARED_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(PIC_FLAG) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp $@ $(SHARED_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-ifeq ($(BUILD_STATIC_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@;
-	cp $@ $(STATIC_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-
-###
-# Pattern rule for object from .c files.
-###
-%.$(OBJEXT): %.c
-ifeq ($(BUILD_SHARED_OBJS),yes)
-	$(CC) $(CFLAGS) $(PIC_FLAG) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp  $*.$(OBJEXT) $(SHARED_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-ifeq ($(BUILD_STATIC_OBJS),yes)
-	$(CC) $(CFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp  $*.$(OBJEXT) $(STATIC_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-
-###
-# Explicit rule for ossimMapCompositionSource.cpp which cannot be built with
-# optimazation flags.
-###
-ossimMapCompositionSource.o: ossimMapCompositionSource.cpp
-ifeq ($(BUILD_SHARED_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(PIC_FLAG) $(NO_OPTIMIZATION_CXXFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp $@ $(SHARED_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-ifeq ($(BUILD_STATIC_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(NO_OPTIMIZATION_CXXFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp $@ $(STATIC_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-
-# Pattern rule for .d dependency file from .cc files.
-%.d: %.cc
-	$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-# Pattern rule for .d dependency file from .cpp files.
-%.d: %.cpp
-	$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-# Pattern rule for .d dependency file from .c files.
-%.d: %.c
-	$(SHELL) -ec '$(CC) -MM $(CFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-
-ifneq ( $(DEPENDS_FILES),)
--include $(DEPENDS_FILES) 
-endif
-
-# ---
-# Make an archive so the dllwarp command doesn't bust it's args length
-# limitation.
-# ---
-ifeq ($(BUILD_SHARED_LIBS),yes)
-define build_shared_lib
-$(CXX) -o $(SHARED_LIB_TARGET) $(SHARED_OBJ_DIR_PATH)/*.$(OBJEXT) ;
-endef
-
-else
-
-define build_shared_lib
-echo "Shared library build disabled.";
-endef
-
-endif
-# End of "ifeq ($(BUILD_SHARED_LIBS),yes)"
-
-
-# ---
-# Define command sequences conditional upon "$(BUILD_STATIC_LIBS) = yes"
-# ---
-ifeq ($(BUILD_STATIC_LIBS),yes)
-
-define build_static_lib
-$(AR) $(AR_FLAGS) $(STATIC_LIB_TARGET) $(STATIC_OBJ_DIR_PATH)/*.$(OBJEXT) ; \
-$(RANLIB) $(STATIC_LIB_TARGET) ;
-endef
-
-else
-
-define build_static_lib
-echo "Static library build disabled.";
-endef
-
-endif
-# End of "ifeq ($(BUILD_STATIC_LIBS),yes)"
-
-
-# Define mkdir for shared objects...
-ifeq ($(BUILD_SHARED_OBJS),yes)
-define mkdir_shared
-if [ ! -d $(SHARED_OBJ_DIR_PATH) ] ; then mkdir $(SHARED_OBJ_DIR_PATH) ; fi
-endef
-else
-define mkdir_shared
-
-endef
-endif
-
-# Define mkdir for static objects...
-ifeq ($(BUILD_STATIC_OBJS),yes)
-define mkdir_static
-if [ ! -d $(STATIC_OBJ_DIR_PATH) ] ; then mkdir $(STATIC_OBJ_DIR_PATH) ; fi
-endef
-else
-define mkdir_static
-
-endef
-endif
-
-
diff --git a/makefiles/cygwin/makelibcore b/makefiles/cygwin/makelibcore
deleted file mode 100644
index 4701a1c..0000000
--- a/makefiles/cygwin/makelibcore
+++ /dev/null
@@ -1,162 +0,0 @@
-###
-# $Id: makelibcore 13689 2008-10-07 12:26:45Z dburken $
-###
-
- at INCLUDE_COMMON@
-
-DIRECTORIES=$(wildcard *)
-
-OSSIM_LIB=ossim
-OSSIM_IMP_LIB=$(OSSIM_LIB_PATH)/$(OSSIM_LIB).dll.a
-OSSIM_DLL_LIB=$(OSSIM_LIB_PATH)/$(OSSIM_LIB).dll
-OSSIM_DLL_DEF=$(OSSIM_LIB_PATH)/$(OSSIM_LIB).def
-SHARED_LIB_VERSIONLESS=$(OSSIM_LIB).$(SO_VERSIONLESS_EXT)
-SHARED_LIB_SONAME=$(OSSIM_LIB).$(SO_SONAME_EXT)
-SHARED_LIB_REALNAME=$(OSSIM_LIB).$(SO_REALNAME_EXT)
-SHARED_LIB_TARGET=$(OSSIM_LIB_PATH)/$(SHARED_LIB_REALNAME)
-SHARED_OBJ_DIR_PATH=$(BASELIBPATH)/$(SHARED_OBJ_DIR)
-
-STATIC_LIB=$(OSSIM_LIB).a
-STATIC_LIB_TARGET=$(OSSIM_LIB_PATH)/$(STATIC_LIB)
-STATIC_OBJ_DIR_PATH=$(BASELIBPATH)/$(STATIC_OBJ_DIR)
-
-# Path to ossimVersion.h
-VERSION_FILE=$(OSSIM_TOP)/include/ossim/ossimVersion.h
-
-# ---
-# To handle "for d in $(VAR);" expanding to  "for d in ;"
-# if no directories present and producing an error on sun os.
-# Substitute empty string with bogus string.
-# ---
-ifeq ($(strip $(DIRECTORIES)),)
-DIRECTORIES=BOGUS_DIR
-endif
-
-all:	version-config
-	./version-config $(VERSION_FILE) $(OSSIM_VERSION)
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != "generator" -a "$$d" != ".obj" ]; then \
-				(cd $$d; $(MAKE) all) ; \
-			fi ; \
-		fi ; \
-	done ;
-	$(build_single_shared_lib)
-	$(build_single_static_lib)
-
-version-config:
-	if test ! -f "$(OSSIM_TOP)/src/ossim/version-config" ; then \
-		$(CXX) -I$(OSSIM_TOP)/include -o version-config version-config.cpp ; \
-	fi
-
-clean:	clean-version
-	$(RM_CMD)
-	if [ -d ".obj" ]; then \
-		cd .obj ; \
-		rm -f *; \
-	fi
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != ".obj" -a "$$d" != "generator" ]; then \
-			(cd $$d; $(MAKE) clean) ; \
-			fi ; \
-		fi ; \
-	done ;
-
-clean-version:
-	$(RM_NOPROMPT) version-config
-	$(RM_NOPROMPT) $(VERSION_FILE)
-
-depends: 
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != ".obj" -a "$$d" != "generator" ]; then \
-				(cd $$d; $(MAKE) depends) ; \
-			fi ; \
-		fi ; \
-	done ;
-
-clean_depends:
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != ".obj" -a "$$d" != "generator" ]; then \
-				(cd $$d; $(MAKE) clean_depends) ; \
-			fi ; \
-		fi ; \
-	done ;
-
-
-shared: 
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != ".obj" -a "$$d" != "generator" ]; then \
-				(cd $$d; $(MAKE) shared) ; \
-			fi ; \
-		fi ; \
-	done ;
-
-# Nothing to do for install...
-install:
-
-dll:
-	$(build_single_shared_lib)
-
-# ---
-# NOTE:
-# Have to use relative path to shared object directories.  With absolute paths
-# the args list passed to dllwrap get too long.
-# ---
-ifeq ($(BUILD_SINGLE_SHARED_LIBS),yes)
-define build_single_shared_lib
- at LD_SHARED@ -o $(OSSIM_DLL_LIB) \
-   matrix/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   kbool/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   base/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   font/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   vpfutil/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   vec/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   support_data/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   elevation/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   projection/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   imaging/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   parallel/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   plugin/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   init/$(SHARED_OBJ_DIR)/*.$(OBJEXT) $(OSSIM_LIB_LINK) ;
-endef
-else
-define build_single_shared_lib
-echo "Single shared library build disabled.";
-endef
-endif
-
-# ---
-# Define command sequences conditional upon "$(BUILD_STATIC_LIBS) = yes"
-# ---
-ifeq ($(BUILD_SINGLE_STATIC_LIBS),yes)
-
-define build_single_static_lib
-$(AR) $(AR_FLAGS) $(STATIC_LIB_TARGET) \
-   $(MATRIX_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(KBOOL_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(BASE_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(FONT_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(VPFUTIL_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(VEC_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(SUPPORT_DATA_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(ELEVATION_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(PROJECTION_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(IMAGING_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(PARALLEL_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(PLUGIN_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(INIT_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) $(OSSIM_LIB_LINK) ; \
-$(RANLIB) $(STATIC_LIB_TARGET) ;
-endef
-
-else
-
-define build_single_static_lib
-echo "Single static library build disabled.";
-endef
-
-endif
-# End of "ifeq ($(BUILD_SINGLE_STATIC_LIBS),yes)"
diff --git a/makefiles/cygwin/makeprog b/makefiles/cygwin/makeprog
deleted file mode 100644
index a577913..0000000
--- a/makefiles/cygwin/makeprog
+++ /dev/null
@@ -1,71 +0,0 @@
-###
-# $Id: makeprog 9143 2006-06-16 19:55:14Z dburken $
-###
-
-# include Makefile.common found at the root of ossim
-# Makefile.common is generated by the configure
-#
- at INCLUDE_COMMON@
-
-CCSRCS=$(wildcard *.cc)
-CPPSRCS=$(wildcard *.cpp)
-CSRCS=$(wildcard *.c)
-COBJS=$(patsubst %.c,%.o,$(CSRCS))
-CCOBJS=$(patsubst %.cc,%.o,$(CCSRCS))
-CPPOBJS=$(patsubst %.cpp,%.o,$(CPPSRCS))
-OBJS=$(CCOBJS) $(CPPOBJS) $(COBJS) 
-DEPEND_FILES = $(wildcard *.d)
-DEFINES = $(BASE_DEFINES) -DOSSIMUSINGDLL
-
-
-# The binary program extension, if any, including dots (e.g. '.exe')
-PROGRAM_EXT = $(EXEEXT)
-BIN_PROGRAM = $(PROGRAM_PREFIX)$(PROGRAM)$(PROGRAM_EXT)
-
-SRCS      = $(CCSRCS) $(CPPSRCS) $(CSRCS)
-INCLUDES  = $(BASE_INCLUDES)
-
-# Pattern rule for objects from .cpp files.
-%.$(OBJEXT): %.cpp
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(DEFINES) $(INCLUDES) -c $< -o $@
-
-# Pattern rule for objects from .cc files.
-%.$(OBJEXT): %.cc
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(DEFINES) $(INCLUDES) -c $< -o $@
-
-# Pattern rule for object from .c files.
-%.$(OBJEXT): %.c
-	$(CC) $(CFLAGS) $(CDEBUGFLAGS) $(DEFINES) $(INCLUDES) -c $< -o $@
-
-%.d: %.cc
-	$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(CDEBUGFLAGS) $(DEFINES) $(INCLUDES) $< >> $@;'
-
-%.d: %.cpp
-	$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(CDEBUGFLAGS) $(DEFINES) $(INCLUDES) $< >> $@;'
-
-%.d: %.c
-	$(SHELL) -ec '$(CC) -MM $(CFLAGS) $(CDEBUGFLAGS) $(DEFINES) $(INCLUDES) $< >> $@;'
-
-all:	$(BIN_PROGRAM)
-
-$(BIN_PROGRAM): $(OBJS)
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(DEFINES) $(LDFLAGS_APP) $(OBJS) $(OSSIM_APP_LINK) -o $@
-	$(INSTALL_PROGRAM) $(BIN_PROGRAM) $(OSSIM_TOP)/bin
-
-depends: 	$(CCSRCS:.cc=.d)\
-		$(CSRCS:.c=.d)\
-		$(CPPSRCS:.cpp=.d)
-
-clean_depends:
-	$(RM_NOPROMPT) *.d
-
-clean:
-	$(RM_CMD) $(BIN_PROGRAM)
-
-
-
-# Only add the depends if they exist
-#
-ifneq ($(DEPENDS_FILES),)
--include $(DEPENDS_FILES)
-endif
diff --git a/makefiles/cygwin/makeroot b/makefiles/cygwin/makeroot
deleted file mode 100644
index c43371a..0000000
--- a/makefiles/cygwin/makeroot
+++ /dev/null
@@ -1,199 +0,0 @@
-#---
-# $Id: makeroot 10986 2007-05-19 19:41:41Z dburken $
-# cygwin makeroot
-#---
-include ./Makefile.common
-
-name = ossim
-#bindir = $(prefix)/bin
-#datadir = $(prefix)
-#docdir = $(datadir)/doc
-version = $(OSSIM_VERSION)
-OSSIM_ROOT	=	.
-
-default: 
-	(cd src; $(MAKE))
-	(cd scripts; $(MAKE))
-
-# ---
-# Rule for installing to remote directory (prefix).
-# Do not allow install to workspace!
-# ---
-install: ossim-config-inst
-	if test "$(prefix)" = "$(TOP)"; then \
-		echo "Workspace and install directory the same!"; \
-		echo -n "Use configure option:  "; \
-		echo " --prefix to specify install directory"; \
-		exit 1; \
-	fi
-	if test -f $(INST_BIN)/ossim-uninstall ; then \
-		$(RM) -f $(TOP)/ossim-uninstall ; \
-	fi
-	$(INSTALL) -d $(INST_BIN) $(INST_LIB) $(INST_INC) $(INST_SHARE) \
-	$(INST_DOCS) $(INST_TEMPLATES)
-	echo "#!/bin/sh" > $(INST_BIN)/ossim-uninstall
-	($(INSTALL) COPYING.GPL COPYING.LGPL README.txt $(INST_DOCS))
-	echo "Installing includes to: $(INST_INC)"
-	( cd include/ossim; \
-		for d in `find . -type d` ; do \
-			if [ ! `echo $$d | egrep CVS` ] ; then \
-				$(INSTALL) -d  $(INST_INC)/$$d; \
-			fi ; \
-		done ; \
-		for f in `find . -name "*.h"` ; do \
-			if [ ! `echo $$f | egrep CVS` ] ; then \
-				echo installing $$f ... ; \
-				g=`$(DIRNAME) $$f`; \
-				g=`echo $$g | sed s/'\.\/'//`; \
-				h=$$f; \
-				h=`echo $$h | sed s/'\.\/'//`; \
-				$(INSTALL) -m 664 $$f $(INST_INC)/$$g; \
-				(echo "$(RM) -f $(INST_INC)/$$h" >> \
-				$(INST_BIN)/ossim-uninstall); \
-			fi ; \
-		done ; \
-	)
-	echo "include installation finished..."
-	( cd lib/ossim; \
-		for libFile in * ; do \
-			if test -f $$libFile ; then \
-				echo installing $$libFile ... ; \
-	 			cp -d $$libFile $(INST_LIB) ;\
-				(echo "$(RM) -f $(INST_LIB)/$$libFile" \
-			 	>> $(INST_BIN)/ossim-uninstall) ; \
-			fi ; \
-		done ; \
-	)
-	( for bin in bin/* ; do \
-		if test -f $$bin -a -x $$bin ; then \
-			echo installing $$bin ... ; \
-			$(INSTALL_PROGRAM) $$bin $(INST_BIN) ;\
-			(echo "$(RM) -f $(prefix)/$$bin"  \
-			>> $(INST_BIN)/ossim-uninstall) ; \
-		fi ; \
-	done ; \
-	)
-	( for t in etc/templates/* ; do \
-		if test x$$t != "etc/templates/CVS" ; then \
-			echo installing $$t ... ; \
-			$(INSTALL_PROGRAM) $$t $(INST_TEMPLATES) ; \
-			(echo "$(RM) -f $(prefix)/$$t"  \
-			>> $(INST_BIN)/ossim-uninstall) ; \
-		fi ; \
-	done ; \
-	)
-	($(MAKE) ossim-config-inst)
-	($(INSTALL_PROGRAM) src/apps/ossim-config-inst \
-	$(INST_BIN)/ossim-config)
-	echo "$(RM) -f $(INST_BIN)/ossim-config" \
-	>> $(INST_BIN)/ossim-uninstall
-	echo "$(RM) -f $(INST_BIN)/ossim-uninstall" \
-	>> $(INST_BIN)/ossim-uninstall
-	chmod 775 $(INST_BIN)/ossim-uninstall
-
-# ---
-# End of install rule...
-# ---
-
-# ---
-# Rule for uninstalling a remote directory (prefix).
-# Do not allow uninstall to workspace!
-# ---
-uninstall:
-	if test "$(prefix)" = "$(TOP)"; then \
-		echo "Workspace and install directory the same!"; \
-		echo -n "Use configure option:  "; \
-		echo " --prefix to specify install directory"; \
-		exit 1; \
-	fi
-	$(shell $(INST_BIN)/ossim-uninstall)
-
-shared:
-	(cd src; $(MAKE) shared) ;
-
-ossim-config-inst:
-	@rm -f src/apps/ossim-config-inst
-	@echo '#!/bin/sh' > src/apps/ossim-config-inst
-	@echo 'OSSIM_LIBS="$(OSSIM_CONFIG_APP_LINK_INST)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_CFLAGS="$(CFLAGS) $(BASE_DEFINES)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_CPPFLAGS="$(CXXFLAGS) $(BASE_DEFINES)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_PREFIX="$(prefix)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_VERSION="$(OSSIM_VERSION)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_INCLUDES="$(BASE_INCLUDES_INST)"' >> src/apps/ossim-config-inst
-	@cat src/apps/ossim-config.in >> src/apps/ossim-config-inst
-	@chmod a+x src/apps/ossim-config-inst
-
-clean:	
-	if test "${RM}" != "" ; then \
-		for d in `find . -name "*.d"` ; do \
-			if ! test -d $$d ; then \
-				${RM} -f $$d ; \
-			fi ; \
-		done ; \
-	fi ;
-	(cd src; $(MAKE) clean) ;
-	(cd lib; $(RM_CMD) ossim/libossim* ; )
-	(for d in bin/* ; do \
-	    if test -f $$d; then \
-		$(RM_CMD)  $$d ; \
-	    fi ; \
-	done ; \
-	) ; 
-
-depends: clean_depends
-	(cd src; $(MAKE) depends) ;
-
-clean_depends:
-	(cd src; $(MAKE) clean_depends) ;
-
-configure:	configure.in aclocal.m4
-	aclocal
-	autoconf
-
-all:	default
-
-RPMTOP=${TOP}/../rpmbuild
-CYGWINDIST=${TOP}/../cygwin_ossim
-DISTTOP=${TOP}/..
-
-gzip-dist:
-	cd ${DISTTOP} ; \
-	${RM} -rf ${DISTTOP}/${OSSIM_ARCHIVE} ; \
-	${RM} -rf ${DISTTOP}/${OSSIM_ARCHIVE_TGZ} ; \
-	cp -r ossim ${OSSIM_ARCHIVE} ; \
-	${RM} -f ${OSSIM_ARCHIVE}/lib/* ; \
-	${RM} -f ${OSSIM_ARCHIVE}/bin/* ; \
-	${RM} -rf `find ${DISTTOP}/${OSSIM_ARCHIVE} -name "*.o" -o -name "CVS" -o -name "cvs"` ; \
-	cd ${DISTTOP} ; \
-	tar cvfz $(OSSIM_ARCHIVE_TGZ) ${OSSIM_ARCHIVE} ;
-
-cygwin-dist: gzip-dist
-	@echo "*** Building cygwin-dist ***"
-	${RM} -rf ${CYGWINDIST} ; \
-	${INSTALL} -d ${CYGWINDIST} ; \
-	${INSTALL} -d ${CYGWINDIST}/ossim_install ; \
-	cp -f ${DISTTOP}/${OSSIM_ARCHIVE_TGZ} ${CYGWINDIST} ; \
-	${RM} -f ${DISTTOP}/${OSSIM_ARCHIVE} ; \
-	${RM} -rf ${DISTTOP}/${OSSIM_ARCHIVE}/ossim_install/* ; \
-	cd ${CYGWINDIST} ; \
-	tar -xvzf $(OSSIM_ARCHIVE_TGZ) ; \
-	cd ${CYGWINDIST}/${OSSIM_ARCHIVE} ; \
-	./configure --prefix=${CYGWINDIST}/ossim_install --enable-optimization --disable-debug --with-gdalconf="--with-hdf4=/usr/local"; \
-	make; make install; \
-	if test "${SED}" != "" ; then \
-		${SED}  -e s@$prefix=.*@prefix=/usr/local at g ${CYGWINDIST}/${OSSIM_ARCHIVE}/src/apps/ossim-config > ${INSTALL_BIN}/ossim-config; \
-	fi ; \
-	cd ${CYGWINDIST}/ossim_install ; \
-	tar cvfz ossim-cygwin-${OSSIM_VERSION}.tgz include bin share etc lib;
-
-rpm: gzip-dist
-	@echo "*** Building RPMs ***"
-	${INSTALL} -d  $(RPMTOP) \
-			$(RPMTOP)/SOURCES \
-			$(RPMTOP)/SPECS \
-			$(RPMTOP)/BUILD \
-			$(RPMTOP)/RPMS \
-			$(RPMTOP)/SRPMS ;
-	cp -f ${DISTTOP}/$(OSSIM_ARCHIVE_TGZ) $(RPMTOP)/SOURCES
-	cp -f ${TOP}/ossim.spec $(RPMTOP)/SPECS
-	rpmbuild -ba --define "_topdir ${RPMTOP}" $(RPMTOP)/SPECS/ossim.spec
diff --git a/makefiles/macosx/libtiff_config.site b/makefiles/macosx/libtiff_config.site
deleted file mode 100644
index 21be2de..0000000
--- a/makefiles/macosx/libtiff_config.site
+++ /dev/null
@@ -1,174 +0,0 @@
-# $Header$
-#
-# TIFF Software
-#
-# Copyright (c) 1990-1997 Sam Leffler
-# Copyright (c) 1991-1997 Silicon Graphics, Inc.
-# 
-# Permission to use, copy, modify, distribute, and sell this software and 
-# its documentation for any purpose is hereby granted without fee, provided
-# that (i) the above copyright notices and this permission notice appear in
-# all copies of the software and related documentation, and (ii) the names of
-# Sam Leffler and Silicon Graphics may not be used in any advertising or
-# publicity relating to the software without the specific, prior written
-# permission of Sam Leffler and Silicon Graphics.
-# 
-# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
-# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
-# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
-# 
-# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
-# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
-# OF THIS SOFTWARE.
-#
-
-#
-# This file holds site-specific configuration parameters.
-#
-# Nothing is defined in here by default, the definitions
-# commented out below serve as documentation for what you
-# can set in this file or a config.local file.
-#
-# Note that you do not need to set anything here unless you
-# want to override the auto-configuration behaviour and/or
-# interactive prompting done by the configure script.
-#
-
-#
-# Package controls.
-#
-#DSO="auto"			# auto|IRIX|IRIX52 enable DSO support for system
-#JPEG="no"			# yes|no configure JPEG support (see below)
-#ZIP="no"			# yes|no configure Deflate support (see below)
-#LIBGL="auto"			# yes|no|auto configure IRIS GL-based tools
-#LIBIMAGE="auto"		# yes|no|auto configure SGI RGB image tools
-#HTML="yes"			# yes|no install HTML documentation
-
-#NONINTERACTIVE=yes		# yes|no Don't ask for confirmation on console
-
-#
-# Directory parameters.
-#
-#DIR_BIN="/usr/local/bin"		# directory for tools
-#DIR_LIB="/usr/local/lib"		# directory for libraries
-#DIR_INC="/usr/local/include"		# directory for include files
-#DIR_MAN="/usr/local/man"		# directory for manual pages
-#DIR_HTML="/var/httpd/htdocs/tiff"	# directory for HTML documentation
-
-#
-# Configuring supporting libraries.
-#
-# The TIFF software makes use of two ancillary packages: the IJG
-# distribution to support the JPEG codec and the zlib distribution
-# to support the Deflate codec.  To setup use of these packages you
-# need to specify where each package's include files are located and
-# where the pre-built library (static archive or DSO) is located.
-# These may be different or the same (as when the package is compiled
-# and referenced directly from the place where the software was
-# loaded and compiled).
-#
-# DIRS_LIBINC is a space-separated list of directories to use for
-# locating include files in these packages.  Note that it should not
-# include -I options as might be passed to the C preprocessor; these
-# are automatically added by the configure script when the Makefiles
-# are generated.
-#
-# DIR_<package>LIB is the pathname of the directory where <package>'s
-# pre-built library may be found; this is used when building a TIFF
-# DSO (on systems where support is present) and when building the
-# programs in the tools directory.  By default the configure script
-# will load the associated library using
-#
-#     -L${DIR_<package>LIB} -l<package>
-#
-# e.g. -L${DIR_JPEGLIB} -ljpeg.  If this is wrong for your system
-# (e.g. your compiler/loader does not support the -L option), then
-# the LIB<package> parameter can be set explicitly to specify the
-# library to use.
-#
-
-#
-# JPEG-specific parameters; used when JPEG support is enabled (see above).
-#
-# JPEG support requires release 5 or later of the IJG code,
-# which you can find on the Internet at ftp.uu.net:/graphics/jpeg/.
-#
-#DIRS_LIBINC="$DIRS_LIBINC ../src/jpeg-6b" # directory for jpeg include files
-#DIR_JPEGLIB=../src/jpeg-6b		# directory for libjpeg
-
-# The following will enable OJPEG support.  Note that a patch libjpeg is
-# required before this can be enabled.  It is also only supported if JPEG is
-# enabled.  
-
-#OJPEG="yes"			        # yes|no configure OJPEG support
-
-#
-# Deflate-specific parameters; used when Deflate support is enabled (see above).
-#
-# NB: Deflate support requires version 0.92 or later of the zlib
-#     library written by Jean-loup Gailly and Mark Adler.  Starting
-#     with about 0.95 the library is called libz.a (previously it was
-#     libgz.a).  The library was last found at
-#
-#        ftp://ftp.uu.net/graphics/png/code/zlib-0.93.tar.gz
-#
-#     Look for it also at ftp://ftp.uu.net/pub/archiving/zip/zlib.
-#
-#DIRS_LIBINC="$DIRS_LIBINC ../zlib"	# directory for zlib include files
-#DIR_GZLIB="../zlib"			# directory for libz
-
-#
-# Miscellaneous parameters.
-#
-#FILLORDER="MS2LSB"			# bit order of cpu (MSB2LSB/LSB2MSB)
-#MANSCHEME="sysv-source-cat-strip"	# manual page installation scheme
-#LARGEFILE="yes"			# support for large (>2GiB) files
-
-#
-# Parameters used when building the software.
-#
-# Note that configure has several ENVOPTS built into it that are
-# set according to the target.  This is done to help naive folks.
-#
-# Beware of changing the INSTALL definition; you *must* have an
-# install script that emulates the Silicon Graphics install program!
-#
-#AR="/bin/ar"				# pathname of suitable ar program
-#AROPTS="rc"				# options to ar for creating archive
-#CC="gcc"				# name/pathname of C compiler
-#CCOMPILER=/opt/ansic/bin/$CC		# path to compiler if not in PATH.
-#ENVOPTS="-Aa"				# options for getting ANSI C
-#GCOPTS="-g"				# options to pass C compiler
-#OPTIMIZER="-O"				# Optimization options for compiler
-#LDFLAGS="-Wl,-O"                       # Special linker flags.
-#LIBPORT='${PORT}/libport.a'		# library with emulation code
-#MACHDEPLIBS="-lm"			# extra libraries for linking
-#PORTFUNCS=""				# non-standard functions to emulate
-#RANLIB=":"				# pathname of suitable ranlib program
-#DSOSUF="so"				# DSO filename suffix
-#LIBCOPTS="-K PIC"			# compiler options for building library
-#TARGET=hppa1.1-hp-hpux11.11            # Force TARGET platform setting.
-#PATH="$PATH:/usr/ccs/bin"		# Modify path for finding compilers,etc
-
-#
-# Makefile construction parameters.
-#
-# These should not normally be set; configure will
-# deduce the appropriate syntax to use for includes.
-#
-#SETMAKE='MAKE	= ${MAKE}'		# define if make does not setup $MAKE
-
-#
-# General system stuff used by the distribution.
-#
-#CHMOD="/etc/chmod"			# pathname of suitable chmod program
-#INSTALL='${SHELL} ${PORT}/install.sh'	# SGI install program/emulator
-#LN="/bin/ln"				# pathname of suitable ln program
-#LN_S="-s"				# option to ${LN} to create symlink
-#MV_F="-f"				# option to ${MV} to force operation
-#SED="/bin/sed"				# pathname of suitable sed program
-#SCRIPT_SH="/bin/sh"			# pathname of suitable shell
-#STRIP="/bin/strip"			# strip program used by install.sh
diff --git a/makefiles/macosx/makelib b/makefiles/macosx/makelib
deleted file mode 100644
index f0c8d23..0000000
--- a/makefiles/macosx/makelib
+++ /dev/null
@@ -1,240 +0,0 @@
-###
-# $Id: makelib 12268 2008-01-07 16:01:58Z dburken $
-###
-CCSRCS=$(wildcard *.cc)
-CPPSRCS=$(wildcard *.cpp)
-CSRCS=$(wildcard *.c)
-SRCS=$(CCSRCS) $(CPPSRCS)
-COBJS=$(patsubst %.c,%.o,$(CSRCS))
-CCOBJS=$(patsubst %.cc,%.o,$(CCSRCS))
-CPPOBJS=$(patsubst %.cpp,%.o,$(CPPSRCS))
-OBJS=$(CCOBJS) $(CPPOBJS) $(COBJS) 
-
-DIRECTORIES=$(filter-out %.o %.d %.cc %.cc %.cpp %.c %.h %.inc %.lo %.libs Makefile cvs CVS bitmaps test_endian test generator .libs .obj test_suite include , $(wildcard *))
-DEPENDS_FILES=$(wildcard *.d)
-INCLUDES=$(BASE_INCLUDES)
-HEADERS=$(wildcard *.h)
-
-
-SHARED_LIB_VERSIONLESS=$(OSSIM_LIB).$(SO_VERSIONLESS_EXT)
-SHARED_LIB_SONAME=$(OSSIM_LIB).$(SO_SONAME_EXT)
-SHARED_LIB_REALNAME=$(OSSIM_LIB).$(SO_REALNAME_EXT)
-SHARED_LIB_TARGET=$(OSSIM_LIB_PATH)/$(SHARED_LIB_REALNAME)
-SHARED_OBJ_DIR_PATH=$(BASELIBPATH)/$(SHARED_OBJ_DIR)
-
-STATIC_LIB=$(OSSIM_LIB).a
-STATIC_LIB_TARGET=$(OSSIM_LIB_PATH)/$(STATIC_LIB)
-STATIC_OBJ_DIR_PATH=$(BASELIBPATH)/$(STATIC_OBJ_DIR)
-
-# ---
-# To handle "for d in $(VAR);" expanding to  "for d in ;"
-# if no directories present and producing an error on sun os.
-# Substitute empty string with bogus string.
-# ---
-ifeq ($(strip $(DIRECTORIES)),)
-DIRECTORIES=BOGUS_DIR
-endif
-
-# ---
-# all target:
-# 1) Make directories to hold objects.
-# 2) Make all objects.
-# 3) Make all subdirectories.
-# 4) If at top level of the core library directory make the libraries.
-# ---
-all:    destobjdir $(OBJS)
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) all) ; \
-		fi ; \
-	done ;
-	if [ -d $(SHARED_OBJ_DIR) ] ; then $(build_shared_lib) fi
-	if [ -d $(STATIC_OBJ_DIR) ] ; then $(build_static_lib) fi
-
-# ---
-# lib target:
-# 1) Make directories to hold objects.
-# 2) Make all objects.
-# 3) Make all subdirectories.
-# 4) Unlike all target always make the libraries even in not in top directory.
-# ---
-lib:	destobjdir $(OBJS)
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) all) ; \
-		fi ; \
-	done ;
-	$(build_shared_lib)
-	$(build_static_lib)
-
-depends: 	$(CCSRCS:.cc=.d)\
-		$(CSRCS:.c=.d)\
-		$(CPPSRCS:.cpp=.d)
-
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) depends) ; \
-		fi ; \
-	done ;
-
-destobjdir:
-	$(mkdir_shared)
-	$(mkdir_static)
-
-###
-# PLEASE KEEP:
-# This is how ossimEquTokenizer.cpp was generated.
-# Commented out on purpose so rule is not ran at compile time.
-# Explicit rule to make ossimEquTokenizer.cpp from ossimEquTokenizer files.
-# ossimEquTokenizer.cpp: ossimEquTokenizer.l ossimEquTokenDefines.h
-# 	flex -PossimEquTokenizer -+ ossimEquTokenizer.l
-# 	mv lex.ossimEquTokenizer.cc ossimEquTokenizer.cpp
-###
-
-clean_depends:
-	($(RM_NOPROMPT) *.d);
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) clean_depends) ; \
-		fi; \
-	done ;
-
-clean:
-	$(RM_CMD)
-	if [ -d ".obj" ]; then \
-		(cd .obj; $(RM_CMD); cd .libs; $(RM_CMD)) ; \
-	fi
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) clean) ; \
-		fi ; \
-	done ;
-	if [ -d $(SHARED_OBJ_DIR) ]; then $(RMDIR) $(SHARED_OBJ_DIR) ; fi
-	if [ -d $(STATIC_OBJ_DIR) ]; then $(RMDIR) $(STATIC_OBJ_DIR) ; fi
-
-# Pattern rule for objects from .cpp files.
-%.$(OBJEXT): %.cpp
-ifeq ($(BUILD_SHARED_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(PIC_FLAG) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp $@ $(SHARED_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-ifeq ($(BUILD_STATIC_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@;
-	cp $@ $(STATIC_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-
-
-# Pattern rule for objects from .cc files.
-%.$(OBJEXT): %.cc
-ifeq ($(BUILD_SHARED_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(PIC_FLAG) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp $@ $(SHARED_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-ifeq ($(BUILD_STATIC_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@;
-	cp $@ $(STATIC_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-
-
-# Pattern rule for object from .c files.
-%.$(OBJEXT): %.c
-ifeq ($(BUILD_SHARED_OBJS),yes)
-	$(CC) $(CFLAGS) $(PIC_FLAG) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp  $*.$(OBJEXT) $(SHARED_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-ifeq ($(BUILD_STATIC_OBJS),yes)
-	$(CC) $(CFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp  $*.$(OBJEXT) $(STATIC_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-
-###
-# Explicit rule for ossimMapCompositionSource.cpp which cannot be built with
-# optimazation flags.
-###
-ossimMapCompositionSource.o: ossimMapCompositionSource.cpp
-ifeq ($(BUILD_SHARED_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(PIC_FLAG) $(NO_OPTIMIZATION_CXXFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp $@ $(SHARED_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-ifeq ($(BUILD_STATIC_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(NO_OPTIMIZATION_CXXFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp $@ $(STATIC_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-
-# Pattern rule for .d dependency file from .cc files.
-%.d: %.cc
-	$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-# Pattern rule for .d dependency file from .cpp files.
-%.d: %.cpp
-	$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-# Pattern rule for .d dependency file from .c files.
-%.d: %.c
-	$(SHELL) -ec '$(CC) -MM $(CFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-
-ifneq ( $(DEPENDS_FILES),)
--include $(DEPENDS_FILES) 
-endif
-
-# ---
-# Define command sequences conditional upon "$(BUILD_S_LIBS) = yes"
-# --- 
-ifeq ($(BUILD_SHARED_LIBS),yes)
-
-define build_shared_lib
-g++ -dynamiclib -single_module -undefined dynamic_lookup -o $(SHARED_LIB_TARGET) $(SHARED_OBJ_DIR_PATH)/*.$(OBJEXT) ; \
-(cd $(OSSIM_LIB_PATH) ; $(RM_NOPROMPT) $(SHARED_LIB_SONAME) ; $(RM_NOPROMPT) $(SHARED_LIB_VERSIONLESS) ; ln -s $(SHARED_LIB_REALNAME) $(SHARED_LIB_SONAME) ; ln -s $(SHARED_LIB_REALNAME) $(SHARED_LIB_VERSIONLESS) ; ) ;
-endef
-
-else
-
-define build_shared_lib
-echo "Shared library build disabled.";
-endef
-
-endif
-# End of "ifeq ($(BUILD_SHARED_LIBS),yes)"
-
-
-# ---
-# Define command sequences conditional upon "$(BUILD_STATIC_LIBS) = yes"
-# ---
-ifeq ($(BUILD_STATIC_LIBS),yes)
-
-define build_static_lib
-$(AR) $(AR_FLAGS) $(STATIC_LIB_TARGET) $(STATIC_OBJ_DIR_PATH)/*.$(OBJEXT) ; \
-$(RANLIB) $(STATIC_LIB_TARGET) ;
-endef
-
-else
-
-define build_static_lib
-echo "Static library build disabled.";
-endef
-
-endif
-# End of "ifeq ($(BUILD_STATIC_LIBS),yes)"
-
-# Define mkdir for shared objects...
-ifeq ($(BUILD_SHARED_OBJS),yes)
-define mkdir_shared
-if [ ! -d $(SHARED_OBJ_DIR_PATH) ] ; then mkdir $(SHARED_OBJ_DIR_PATH) ; fi
-endef
-else
-define mkdir_shared
-
-endef
-endif
-
-# Define mkdir for static objects...
-ifeq ($(BUILD_STATIC_OBJS),yes)
-define mkdir_static
-if [ ! -d $(STATIC_OBJ_DIR_PATH) ] ; then mkdir $(STATIC_OBJ_DIR_PATH) ; fi
-endef
-else
-define mkdir_static
-
-endef
-endif
diff --git a/makefiles/macosx/makelibcore b/makefiles/macosx/makelibcore
deleted file mode 100644
index 13f5589..0000000
--- a/makefiles/macosx/makelibcore
+++ /dev/null
@@ -1,185 +0,0 @@
-###
-# $Id: makelibcore 13758 2008-10-22 17:39:57Z gpotts $
-###
-
- at INCLUDE_COMMON@
-
-DIRECTORIES=$(wildcard *)
-
-OSSIM_LIB=libossim
-SHARED_LIB_VERSIONLESS=$(OSSIM_LIB).$(SO_VERSIONLESS_EXT)
-SHARED_LIB_SONAME=$(OSSIM_LIB).$(SO_SONAME_EXT)
-SHARED_LIB_REALNAME=$(OSSIM_LIB).$(SO_REALNAME_EXT)
-SHARED_LIB_TARGET=$(OSSIM_LIB_PATH)/$(SHARED_LIB_REALNAME)
-SHARED_OBJ_DIR_PATH=$(BASELIBPATH)/$(SHARED_OBJ_DIR)
-
-STATIC_LIB=$(OSSIM_LIB).a
-STATIC_LIB_TARGET=$(OSSIM_LIB_PATH)/$(STATIC_LIB)
-STATIC_OBJ_DIR_PATH=$(BASELIBPATH)/$(STATIC_OBJ_DIR)
-
-# Path to ossimVersion.h
-VERSION_FILE=$(OSSIM_TOP)/include/ossim/ossimVersion.h
-
-COMPATIBILITY_VERSION=$(OSSIM_MAJOR_VERSION_NUMBER).$(OSSIM_MINOR_VERSION_NUMBER)
-INSTALL_NAME=$(OSSIM_LIB_PATH)/$(SHARED_LIB_SONAME)
-
-ifeq ($(BUILD_SINGLE_SHARED_LIBS),yes)
-LINK_SHARED_OBJECT_FILES=	$(MATRIX_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   				$(KBOOL_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(BASE_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(FONT_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(VPFUTIL_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(VEC_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(SUPPORT_DATA_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(ELEVATION_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(PROJECTION_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(IMAGING_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(PARALLEL_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(PLUGIN_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(INIT_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT)
-endif
-ifeq ($(BUILD_SINGLE_STATIC_LIBS),yes)
-
-LINK_STATIC_OBJECT_FILES=	$(MATRIX_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   				$(KBOOL_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(BASE_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(FONT_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(VPFUTIL_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(VEC_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(SUPPORT_DATA_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(ELEVATION_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(PROJECTION_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(IMAGING_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(PARALLEL_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(PLUGIN_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(INIT_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT)
-endif
-
-# ---
-# To handle "for d in $(VAR);" expanding to  "for d in ;"
-# if no directories present and producing an error on sun os.
-# Substitute empty string with bogus string.
-# ---
-ifeq ($(strip $(DIRECTORIES)),)
-DIRECTORIES=BOGUS_DIR
-endif
-
-all:	version-config
-	./version-config $(VERSION_FILE) $(OSSIM_VERSION)
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != "generator" -a "$$d" != ".obj" ]; then \
-				(cd $$d; $(MAKE) all) ; \
-			fi ; \
-		fi ; \
-	done ;
-	$(build_single_shared_lib)
-	$(build_single_static_lib)
-
-version-config:
-	if test ! -f "$(OSSIM_TOP)/src/ossim/version-config" ; then \
-		$(CXX) -I$(OSSIM_TOP)/include -o version-config version-config.cpp ; \
-	fi
-
-clean:	clean-version
-	$(RM_CMD)
-	if [ -d ".obj" ]; then \
-		cd .obj ; \
-		rm -f *; \
-	fi
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != ".obj" -a "$$d" != "generator" ]; then \
-			(cd $$d; $(MAKE) clean) ; \
-			fi ; \
-		fi ; \
-	done ;
-
-
-clean-version:
-	$(RM_NOPROMPT) version-config
-	$(RM_NOPROMPT) $(VERSION_FILE)
-
-depends: 
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != ".obj" -a "$$d" != "generator" ]; then \
-				(cd $$d; $(MAKE) depends) ; \
-			fi ; \
-		fi ; \
-	done ;
-
-clean_depends:
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != ".obj" -a "$$d" != "generator" ]; then \
-				(cd $$d; $(MAKE) clean_depends) ; \
-			fi ; \
-		fi ; \
-	done ;
-
-
-shared: 
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != ".obj" -a "$$d" != "generator" ]; then \
-				(cd $$d; $(MAKE) shared) ; \
-			fi ; \
-		fi ; \
-	done ;
-
-install:
-#	for f in `find . -name "*.h"` ; do \
-#		$(INSTALL) -d  $(INST_INC)/`$(DIRNAME) $$f`; \
-#		$(INSTALL) $$f $(INST_INC)/`$(DIRNAME) $$f`; \
-#	done
-
-#framework:
-#	for f in `find . -name "*.h"` ; do \
-#		$(INSTALL) -d  $(TOP)/lib/ossim.framework/Versions/${OSSIM_VERSION}/Headers/`$(DIRNAME) $$f`; \
-#		$(INSTALL) $$f $(TOP)/lib/ossim.framework/Versions/${OSSIM_VERSION}/Headers/`$(DIRNAME) $$f`; \
-#	done
-
-framework:
-	for f in `find . -name "*.h"` ; do \
-		$(INSTALL) -d  $(TOP)/lib/ossim.framework/Versions/A/Headers/`$(DIRNAME) $$f`; \
-		$(INSTALL) $$f $(TOP)/lib/ossim.framework/Versions/A/Headers/`$(DIRNAME) $$f`; \
-	done
-
-ifeq ($(BUILD_SINGLE_SHARED_LIBS),yes)
-
-define build_single_shared_lib
- at LD_SHARED@ -o $(SHARED_LIB_TARGET) \
- $(LINK_SHARED_OBJECT_FILES) $(OSSIM_LIB_LINK) ; \
-(cd $(OSSIM_LIB_PATH) ; $(RM_NOPROMPT) $(SHARED_LIB_SONAME) ; $(RM_NOPROMPT) $(SHARED_LIB_VERSIONLESS) ; ln -s $(SHARED_LIB_REALNAME) $(SHARED_LIB_SONAME) ; ln -s $(SHARED_LIB_REALNAME) $(SHARED_LIB_VERSIONLESS) ; ) ;
-endef
-
-else
-
-define build_single_shared_lib
-echo "Single shared library build disabled.";
-endef
-
-endif
-# End of "ifeq ($(BUILD_SINGLE_SHARED_LIBS),yes)"
-
-
-# ---
-# Define command sequences conditional upon "$(BUILD_STATIC_LIBS) = yes"
-# ---
-ifeq ($(BUILD_SINGLE_STATIC_LIBS),yes)
-
-define build_single_static_lib
-$(AR) $(AR_FLAGS) $(STATIC_LIB_TARGET) \
-	$(LINK_STATIC_OBJECT_FILES) $(OSSIM_LIB_LINK) ; \
-$(RANLIB) $(STATIC_LIB_TARGET) ;
-endef
-
-else
-
-define build_single_static_lib
-echo "Single static library build disabled.";
-endef
-
-endif
-# End of "ifeq ($(BUILD_SINGLE_STATIC_LIBS),yes)"
diff --git a/makefiles/macosx/makeprog b/makefiles/macosx/makeprog
deleted file mode 100644
index e421bbe..0000000
--- a/makefiles/macosx/makeprog
+++ /dev/null
@@ -1,67 +0,0 @@
-# include Makefile.common found at the root of ossim
-# Makefile.common is generated by the configure
-#
- at INCLUDE_COMMON@
-
-CCSRCS=$(wildcard *.cc)
-CPPSRCS=$(wildcard *.cpp)
-CSRCS=$(wildcard *.c)
-COBJS=$(patsubst %.c,%.o,$(CSRCS))
-CCOBJS=$(patsubst %.cc,%.o,$(CCSRCS))
-CPPOBJS=$(patsubst %.cpp,%.o,$(CPPSRCS))
-OBJS=$(CCOBJS) $(CPPOBJS) $(COBJS) 
-DEPEND_FILES = $(wildcard *.d)
-
-# The binary program extension, if any, including dots (e.g. '.exe')
-PROGRAM_EXT = $(EXEEXT)
-BIN_PROGRAM = $(PROGRAM)$(PROGRAM_EXT)
-
-LIBRARY   = $(LIBTOOL_CORE_LIBS)
-DEPLIBS	  = $(OSSIM_CORE_LIBS:-l%=$(LIB_SRC)/.libs/lib%.a)
-SRCS      = $(CCSRCS) $(CPPSRCS) $(CSRCS)
-INCLUDES  = $(BASE_INCLUDES)
-
-# Pattern rule for objects from .cpp files.
-%.$(OBJEXT): %.cpp
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-
-# Pattern rule for objects from .cc files.
-%.$(OBJEXT): %.cc
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-
-# Pattern rule for object from .c files.
-%.$(OBJEXT): %.c
-	$(CC) $(CFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-
-%.d: %.cc
-	$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-%.d: %.cpp
-	$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-%.d: %.c
-	$(SHELL) -ec '$(CC) -MM $(CFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-all:	$(BIN_PROGRAM)
-
-$(BIN_PROGRAM): $(OBJS)
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(LDFLAGS_APP) $(OBJS) $(OSSIM_APP_LINK) -o $@
-	$(INSTALL_PROGRAM) $(BIN_PROGRAM) $(OSSIM_TOP)/bin
-
-depends: 	$(CCSRCS:.cc=.d)\
-		$(CSRCS:.c=.d)\
-		$(CPPSRCS:.cpp=.d)
-
-clean_depends:
-	$(RM_NOPROMPT) *.d
-
-clean:
-	$(RM_CMD) $(BIN_PROGRAM)
-
-
-
-# Only add the depends if they exist
-#
-ifneq ($(DEPENDS_FILES),)
--include $(DEPENDS_FILES)
-endif
diff --git a/makefiles/macosx/makeroot b/makefiles/macosx/makeroot
deleted file mode 100644
index df3a189..0000000
--- a/makefiles/macosx/makeroot
+++ /dev/null
@@ -1,167 +0,0 @@
-	include ./Makefile.common
-
-name = ossim
-#bindir = $(prefix)/bin
-#datadir = $(prefix)
-#docdir = $(datadir)/doc
-version = $(OSSIM_VERSION)
-OSSIM_ROOT	=	.
-
-default: 
-	(cd src; $(MAKE))
-	(cd scripts; $(MAKE))
-	($(MAKE) framework)
-
-framework:
-	$(RMDIR) $(TOP)/lib/ossim.framework/
-	$(INSTALL) -d lib/ossim.framework \
-		lib/ossim.framework/Versions \
-		lib/ossim.framework/Versions/A \
-		lib/ossim.framework/Versions/A/Headers 
-	$(INSTALL) include/ossim/ossimConfig.h lib/ossim.framework/Versions/A/Headers
-	$(INSTALL) lib/ossim/libossim.$(SO_REALNAME_EXT) lib/ossim.framework/Versions/A/libossim.dylib
-	(cd src/ossim; $(MAKE) framework)
-	(cd lib/ossim.framework/Versions; \
-	  $(RM_NOPROMPT) current ; \
-	  ln -s A current; \
-	  cd ..; \
-	  $(RM_NOPROMPT) ossim; \
-	  $(RM_NOPROMPT) Headers; \
-	  ln -s Versions/current/libossim.dylib ossim ; \
-	  ln -s Versions/current/Headers Headers; )
-
-install: 
-	($(RM) -f $(TOP)/ossim-uninstall)
-	($(INSTALL) -d \
-		$(INST_BIN) \
-		$(INST_SHARE)\
-		$(INST_DOCS) \
-		$(INST_TEMPLATES) \
-		/Library/frameworks/ossim.framework \
-		/Library/frameworks/ossim.framework/Versions )
-	($(INSTALL) COPYING.GPL COPYING.LGPL README.txt $(INST_DOCS))
-	(cd src; $(MAKE) install)
-	($(RMDIR) /Library/frameworks/ossim.framework/Versions/${OSSIM_VERSION})
-	($(RM_NOPROMPT) /Library/frameworks/ossim.framework/Headers)
-	($(RM_NOPROMPT) /Library/frameworks/ossim.framework/ossim)
-	(cd lib/ossim.framework/Versions; cp -r ${OSSIM_VERSION} /Library/Frameworks/ossim.framework/Versions; \
-	 cd /Library/Frameworks/ossim.framework/Versions; \
-	  $(RM_NOPROMPT) current ; \
-	  ln -s ${OSSIM_VERSION} current; \
-	  cd ..; \
-	  $(RM_NOPROMPT) ossim; \
-	  $(RM_NOPROMPT) Headers; \
-	  ln -s Versions/current/libossim.dylib ossim ; \
-	  ln -s Versions/current/Headers Headers; )
-	( for bin in bin/* ; do \
-		if test -f $$bin -a -x $$bin ; then \
-			echo installing $$bin ... ; \
-			$(INSTALL_PROGRAM) $$bin $(INST_BIN) ;\
-			(echo "$(RM) -f $(prefix)/$$bin"  >> $(TOP)/ossim-uninstall) ; \
-		fi ; \
-	  done)
-	( for t in etc/templates/* ; do \
-		if test x$$t != "etc/templates/CVS" ; then \
-			echo installing $$t ... ; \
-			install $$t $(INST_TEMPLATES) ; \
-		fi ; \
-	  done)
-	($(MAKE) ossim-config-inst)
-	($(INSTALL_PROGRAM) src/apps/ossim-config-inst $(INST_BIN)/ossim-config)
-	(echo "$(RM) -rf $(prefix)/include/ossim"  >> $(TOP)/ossim-uninstall ; \
-	echo "$(RM) -rf $(prefix)/etc/ossim"  >> $(TOP)/ossim-uninstall ; \
-	echo "$(RM) -rf $(prefix)/share/ossim*"  >> $(TOP)/ossim-uninstall ; \
-	echo "$(RM) -rf $(prefix)/share/doc/ossim*"  >> $(TOP)/ossim-uninstall ; \
-	echo "$(RM) -f $(INST_BIN)/ossim-config"  >> $(TOP)/ossim-uninstall ; \
-	echo "$(RM) -f $(INST_BIN)/ossim-uninstall"  >> $(TOP)/ossim-uninstall ; \
-	$(INSTALL_PROGRAM) $(TOP)/ossim-uninstall $(INST_BIN) )
-
-shared:
-	(cd src; $(MAKE) shared) ;
-
-ossim-config-inst:
-	@rm -f src/apps/ossim-config-inst
-	@echo '#!/bin/sh' > src/apps/ossim-config-inst
-	@echo 'OSSIM_LIBS="$(OSSIM_CONFIG_APP_LINK_INST)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_CFLAGS="$(CFLAGS) $(BASE_DEFINES)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_CPPFLAGS="$(CXXFLAGS) $(BASE_DEFINES)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_PREFIX="$(prefix)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_VERSION="$(OSSIM_VERSION)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_INCLUDES="$(BASE_INCLUDES_INST)"' >> src/apps/ossim-config-inst
-	@cat src/apps/ossim-config.in >> src/apps/ossim-config-inst
-	@chmod a+x src/apps/ossim-config-inst
-
-clean:	
-	if test "${RM}" != "" ; then \
-		for d in `find . -name "*.d"` ; do \
-			if ! test -d $$d ; then \
-				${RM} -f $$d ; \
-			fi ; \
-		done ; \
-	fi ;
-	(cd src; $(MAKE) clean) ;
-	(cd lib; $(RMDIR) ossim.framework; $(RM_CMD) *ossim* ; )
-	(for d in bin/* ; do \
-	    if test -f $$d; then \
-		$(RM_CMD)  $$d ; \
-	    fi ; \
-	done ; \
-	) ; 
-
-depends: clean_depends
-	(cd src; $(MAKE) depends) ;
-
-clean_depends:
-	(cd src; $(MAKE) clean_depends) ;
-
-configure:	configure.in aclocal.m4
-	aclocal
-	autoconf
-
-all:	default
-
-RPMTOP=${TOP}/../rpmbuild
-CYGWINDIST=${TOP}/../cygwin_ossim
-DISTTOP=${TOP}/..
-
-gzip-dist:
-	cd ${DISTTOP} ; \
-	${RM} -rf ${DISTTOP}/${OSSIM_ARCHIVE} ; \
-	${RM} -rf ${DISTTOP}/${OSSIM_ARCHIVE_TGZ} ; \
-	cp -r ossim ${OSSIM_ARCHIVE} ; \
-	${RM} -f ${OSSIM_ARCHIVE}/lib/* ; \
-	${RM} -f ${OSSIM_ARCHIVE}/bin/* ; \
-	${RM} -rf `find ${DISTTOP}/${OSSIM_ARCHIVE} -name "*.o" -o -name "CVS" -o -name "cvs"` ; \
-	cd ${DISTTOP} ; \
-	tar cvfz $(OSSIM_ARCHIVE_TGZ) ${OSSIM_ARCHIVE} ;
-
-cygwin-dist: gzip-dist
-	@echo "*** Building cygwin-dist ***"
-	${RM} -rf ${CYGWINDIST} ; \
-	${INSTALL} -d ${CYGWINDIST} ; \
-	${INSTALL} -d ${CYGWINDIST}/ossim_install ; \
-	cp -f ${DISTTOP}/${OSSIM_ARCHIVE_TGZ} ${CYGWINDIST} ; \
-	${RM} -f ${DISTTOP}/${OSSIM_ARCHIVE} ; \
-	${RM} -rf ${DISTTOP}/${OSSIM_ARCHIVE}/ossim_install/* ; \
-	cd ${CYGWINDIST} ; \
-	tar -xvzf $(OSSIM_ARCHIVE_TGZ) ; \
-	cd ${CYGWINDIST}/${OSSIM_ARCHIVE} ; \
-	./configure --prefix=${CYGWINDIST}/ossim_install --enable-optimization --disable-debug --with-gdalconf="--with-hdf4=/usr/local"; \
-	make; make install; \
-	if test "${SED}" != "" ; then \
-		${SED}  -e s@$prefix=.*@prefix=/usr/local at g ${CYGWINDIST}/${OSSIM_ARCHIVE}/src/apps/ossim-config > ${INSTALL_BIN}/ossim-config; \
-	fi ; \
-	cd ${CYGWINDIST}/ossim_install ; \
-	tar cvfz ossim-cygwin-${OSSIM_VERSION}.tgz include bin share etc lib;
-
-rpm: gzip-dist
-	@echo "*** Building RPMs ***"
-	${INSTALL} -d  $(RPMTOP) \
-			$(RPMTOP)/SOURCES \
-			$(RPMTOP)/SPECS \
-			$(RPMTOP)/BUILD \
-			$(RPMTOP)/RPMS \
-			$(RPMTOP)/SRPMS ;
-	cp -f ${DISTTOP}/$(OSSIM_ARCHIVE_TGZ) $(RPMTOP)/SOURCES
-	cp -f ${TOP}/ossim.spec $(RPMTOP)/SPECS
-	rpmbuild -ba --define "_topdir ${RPMTOP}" $(RPMTOP)/SPECS/ossim.spec
diff --git a/makefiles/mingw/makelib b/makefiles/mingw/makelib
deleted file mode 100644
index b75dabb..0000000
--- a/makefiles/mingw/makelib
+++ /dev/null
@@ -1,248 +0,0 @@
-###
-# $Id: makelib 12268 2008-01-07 16:01:58Z dburken $
-###
-CCSRCS=$(wildcard *.cc)
-CPPSRCS=$(wildcard *.cpp)
-CSRCS=$(wildcard *.c)
-SRCS=$(CCSRCS) $(CPPSRCS)
-COBJS=$(patsubst %.c,%.o,$(CSRCS))
-CCOBJS=$(patsubst %.cc,%.o,$(CCSRCS))
-CPPOBJS=$(patsubst %.cpp,%.o,$(CPPSRCS))
-OBJS=$(CCOBJS) $(CPPOBJS) $(COBJS) 
-
-DIRECTORIES=$(filter-out %.o %.d %.cc %.cc %.cpp %.c %.h %.inc %.lo %.libs Makefile cvs CVS bitmaps test_endian test generator .libs .obj test_suite include , $(wildcard *))
-DEPENDS_FILES=$(wildcard *.d)
-INCLUDES=$(BASE_INCLUDES)
-HEADERS=$(wildcard *.h)
-
-
-
-SHARED_LIB_VERSIONLESS=$(OSSIM_LIB).$(SO_VERSIONLESS_EXT)
-SHARED_LIB_SONAME=$(OSSIM_LIB).$(SO_SONAME_EXT)
-SHARED_LIB_REALNAME=$(OSSIM_LIB).la
-SHARED_LIB_TARGET=$(OSSIM_LIB_PATH)/$(SHARED_LIB_REALNAME)
-SHARED_OBJ_DIR_PATH=$(BASELIBPATH)/$(SHARED_OBJ_DIR)
-SHARED_LIB_TEMP_ARCHIVE=$(SHARED_OBJ_DIR_PATH)/$(OSSIM_LIB).a
-
-STATIC_LIB=$(OSSIM_LIB).a
-STATIC_LIB_TARGET=$(OSSIM_LIB_PATH)/$(STATIC_LIB)
-STATIC_OBJ_DIR_PATH=$(BASELIBPATH)/$(STATIC_OBJ_DIR)
-
-# ---
-# To handle "for d in $(VAR);" expanding to  "for d in ;"
-# if no directories present and producing an error on sun os.
-# Substitute empty string with bogus string.
-# ---
-ifeq ($(strip $(DIRECTORIES)),)
-DIRECTORIES=BOGUS_DIR
-endif
-
-# ---
-# all target:
-# 1) Make directories to hold objects.
-# 2) Make all objects.
-# 3) Make all subdirectories.
-# 4) If at top level of the core library directory make the libraries.
-# ---
-all:    destobjdir $(OBJS)
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) all) ; \
-		fi ; \
-	done ;
-	if [ -d $(SHARED_OBJ_DIR) ] ; then $(build_shared_lib) fi
-	if [ -d $(STATIC_OBJ_DIR) ] ; then $(build_static_lib) fi
-
-# ---
-# lib target:
-# 1) Make directories to hold objects.
-# 2) Make all objects.
-# 3) Make all subdirectories.
-# 4) Unlike all target always make the libraries even in not in top directory.
-# ---
-lib:	destobjdir $(OBJS)
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) all) ; \
-		fi ; \
-	done ;
-	$(build_shared_lib)
-	$(build_static_lib)
-
-depends: 	$(CCSRCS:.cc=.d)\
-		$(CSRCS:.c=.d)\
-		$(CPPSRCS:.cpp=.d)
-
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) depends) ; \
-		fi ; \
-	done ;
-
-destobjdir:
-	$(mkdir_shared)
-	$(mkdir_static)
-
-###
-# PLEASE KEEP:
-# This is how ossimEquTokenizer.cpp was generated.
-# Commented out on purpose so rule is not ran at compile time.
-# Explicit rule to make ossimEquTokenizer.cpp from ossimEquTokenizer files.
-# ossimEquTokenizer.cpp: ossimEquTokenizer.l ossimEquTokenDefines.h
-# 	flex -PossimEquTokenizer -+ ossimEquTokenizer.l
-# 	mv lex.ossimEquTokenizer.cc ossimEquTokenizer.cpp
-###
-
-clean_depends:
-	($(RM_NOPROMPT) *.d);
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) clean_depends) ; \
-		fi; \
-	done ;
-
-clean:
-	$(RM_CMD)
-	if [ -d ".obj" ]; then \
-		(cd .obj; $(RM_CMD); cd .libs; $(RM_CMD)) ; \
-	fi
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) clean) ; \
-		fi ; \
-	done ;
-	if [ -d $(SHARED_OBJ_DIR) ]; then $(RMDIR) $(SHARED_OBJ_DIR) ; fi
-	if [ -d $(STATIC_OBJ_DIR) ]; then $(RMDIR) $(STATIC_OBJ_DIR) ; fi
-
-###
-# Pattern rule for objects from .cpp files.
-###
-%.$(OBJEXT): %.cpp
-ifeq ($(BUILD_SHARED_OBJS),yes)
-	$(CXX) -DOSSIMMAKINGDLL $(CXXFLAGS) $(PIC_FLAG) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp $@ $(SHARED_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-ifeq ($(BUILD_STATIC_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@;
-	cp $@ $(STATIC_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-
-###
-# Pattern rule for objects from .cc files.
-###
-%.$(OBJEXT): %.cc
-ifeq ($(BUILD_SHARED_OBJS),yes)
-	$(CXX) -DOSSIMMAKINGDLL $(CXXFLAGS) $(PIC_FLAG) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp $@ $(SHARED_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-ifeq ($(BUILD_STATIC_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@;
-	cp $@ $(STATIC_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-
-###
-# Pattern rule for object from .c files.
-###
-%.$(OBJEXT): %.c
-ifeq ($(BUILD_SHARED_OBJS),yes)
-	$(CC) -DOSSIMMAKINGDLL $(CFLAGS) $(PIC_FLAG) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp  $*.$(OBJEXT) $(SHARED_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-ifeq ($(BUILD_STATIC_OBJS),yes)
-	$(CC) $(CFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp  $*.$(OBJEXT) $(STATIC_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-
-###
-# Explicit rule for ossimMapCompositionSource.cpp which cannot be built with
-# optimazation flags.
-###
-ossimMapCompositionSource.o: ossimMapCompositionSource.cpp
-ifeq ($(BUILD_SHARED_OBJS),yes)
-	$(CXX) -DOSSIMMAKINGDLL $(CXXFLAGS) $(PIC_FLAG) $(NO_OPTIMIZATION_CXXFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp $@ $(SHARED_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-ifeq ($(BUILD_STATIC_OBJS),yes)
-	$(CXX) -DOSSIMMAKINGDLL $(CXXFLAGS) $(NO_OPTIMIZATION_CXXFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp $@ $(STATIC_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-
-# Pattern rule for .d dependency file from .cc files.
-%.d: %.cc
-	$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-# Pattern rule for .d dependency file from .cpp files.
-%.d: %.cpp
-	$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-# Pattern rule for .d dependency file from .c files.
-%.d: %.c
-	$(SHELL) -ec '$(CC) -MM $(CFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-
-ifneq ( $(DEPENDS_FILES),)
--include $(DEPENDS_FILES) 
-endif
-
-# ---
-# Make an archive so the dllwarp command doesn't bust it's args length
-# limitation.
-# ---
-ifeq ($(BUILD_SHARED_LIBS),yes)
-define build_shared_lib
-$(CXX) -o $(SHARED_LIB_TARGET) $(SHARED_OBJ_DIR_PATH)/*.$(OBJEXT) ;
-endef
-
-else
-
-define build_shared_lib
-echo "Shared library build disabled.";
-endef
-
-endif
-# End of "ifeq ($(BUILD_SHARED_LIBS),yes)"
-
-
-# ---
-# Define command sequences conditional upon "$(BUILD_STATIC_LIBS) = yes"
-# ---
-ifeq ($(BUILD_STATIC_LIBS),yes)
-
-define build_static_lib
-$(AR) $(AR_FLAGS) $(STATIC_LIB_TARGET) $(STATIC_OBJ_DIR_PATH)/*.$(OBJEXT) ; \
-$(RANLIB) $(STATIC_LIB_TARGET) ;
-endef
-
-else
-
-define build_static_lib
-echo "Static library build disabled.";
-endef
-
-endif
-# End of "ifeq ($(BUILD_STATIC_LIBS),yes)"
-
-
-# Define mkdir for shared objects...
-ifeq ($(BUILD_SHARED_OBJS),yes)
-define mkdir_shared
-if [ ! -d $(SHARED_OBJ_DIR_PATH) ] ; then mkdir $(SHARED_OBJ_DIR_PATH) ; fi
-endef
-else
-define mkdir_shared
-
-endef
-endif
-
-# Define mkdir for static objects...
-ifeq ($(BUILD_STATIC_OBJS),yes)
-define mkdir_static
-if [ ! -d $(STATIC_OBJ_DIR_PATH) ] ; then mkdir $(STATIC_OBJ_DIR_PATH) ; fi
-endef
-else
-define mkdir_static
-
-endef
-endif
-
-
diff --git a/makefiles/mingw/makelibcore b/makefiles/mingw/makelibcore
deleted file mode 100644
index 818948b..0000000
--- a/makefiles/mingw/makelibcore
+++ /dev/null
@@ -1,165 +0,0 @@
-###
-# $Id: makelibcore 13689 2008-10-07 12:26:45Z dburken $
-###
-
- at INCLUDE_COMMON@
-
-DIRECTORIES=$(wildcard *)
-
-OSSIM_LIB=ossim
-OSSIM_IMP_LIB=$(OSSIM_LIB_PATH)/$(OSSIM_LIB).dll.a
-OSSIM_DLL_LIB=$(OSSIM_LIB_PATH)/$(OSSIM_LIB).dll
-OSSIM_DLL_DEF=$(OSSIM_LIB_PATH)/$(OSSIM_LIB).def
-SHARED_LIB_VERSIONLESS=$(OSSIM_LIB).$(SO_VERSIONLESS_EXT)
-SHARED_LIB_SONAME=$(OSSIM_LIB).$(SO_SONAME_EXT)
-SHARED_LIB_REALNAME=$(OSSIM_LIB).$(SO_REALNAME_EXT)
-SHARED_LIB_TARGET=$(OSSIM_LIB_PATH)/$(SHARED_LIB_REALNAME)
-SHARED_OBJ_DIR_PATH=$(BASELIBPATH)/$(SHARED_OBJ_DIR)
-
-STATIC_LIB=$(OSSIM_LIB).a
-STATIC_LIB_TARGET=$(OSSIM_LIB_PATH)/$(STATIC_LIB)
-STATIC_OBJ_DIR_PATH=$(BASELIBPATH)/$(STATIC_OBJ_DIR)
-
-# Path to ossimVersion.h
-VERSION_FILE=$(OSSIM_TOP)/include/ossim/ossimVersion.h
-
-# ---
-# To handle "for d in $(VAR);" expanding to  "for d in ;"
-# if no directories present and producing an error on sun os.
-# Substitute empty string with bogus string.
-# ---
-ifeq ($(strip $(DIRECTORIES)),)
-DIRECTORIES=BOGUS_DIR
-endif
-
-all:	version-config
-	./version-config $(VERSION_FILE) $(OSSIM_VERSION)
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != "generator" -a "$$d" != ".obj" ]; then \
-				(cd $$d; $(MAKE) all) ; \
-			fi ; \
-		fi ; \
-	done ;
-	$(build_single_shared_lib)
-	$(build_single_static_lib)
-
-version-config:
-	if test ! -f "$(OSSIM_TOP)/src/ossim/version-config" ; then \
-		$(CXX) -I$(OSSIM_TOP)/include -o version-config version-config.cpp ; \
-	fi
-
-clean:	clean-version
-	$(RM_CMD)
-	if [ -d ".obj" ]; then \
-		cd .obj ; \
-		rm -f *; \
-	fi
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != ".obj" -a "$$d" != "generator" ]; then \
-			(cd $$d; $(MAKE) clean) ; \
-			fi ; \
-		fi ; \
-	done ;
-
-clean-version:
-	$(RM_NOPROMPT) version-config
-	$(RM_NOPROMPT) $(VERSION_FILE)
-
-depends: 
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != ".obj" -a "$$d" != "generator" ]; then \
-				(cd $$d; $(MAKE) depends) ; \
-			fi ; \
-		fi ; \
-	done ;
-
-clean_depends:
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != ".obj" -a "$$d" != "generator" ]; then \
-				(cd $$d; $(MAKE) clean_depends) ; \
-			fi ; \
-		fi ; \
-	done ;
-
-
-shared: 
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != ".obj" -a "$$d" != "generator" ]; then \
-				(cd $$d; $(MAKE) shared) ; \
-			fi ; \
-		fi ; \
-	done ;
-
-install:
-	for f in `find . -name "*.h"` ; do \
-		$(INSTALL) -d  $(INST_INC)/`$(DIRNAME) $$f`; \
-		$(INSTALL) $$f $(INST_INC)/`$(DIRNAME) $$f`; \
-	done
-
-dll:
-	$(build_single_shared_lib)
-
-# ---
-# NOTE:
-# Have to use relative path to shared object directories.  With absolute paths
-# the args list passed to dllwrap get too long.
-# ---
-ifeq ($(BUILD_SINGLE_SHARED_LIBS),yes)
-define build_single_shared_lib
- at LD_SHARED@ -o $(OSSIM_DLL_LIB) \
-   matrix/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   kbool/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   base/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   font/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   vpfutil/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   vec/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   support_data/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   elevation/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   projection/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   imaging/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   parallel/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   plugin/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   init/$(SHARED_OBJ_DIR)/*.$(OBJEXT) $(OSSIM_LIB_LINK) ;
-endef
-else
-define build_single_shared_lib
-echo "Single shared library build disabled.";
-endef
-endif
-
-# ---
-# Define command sequences conditional upon "$(BUILD_STATIC_LIBS) = yes"
-# ---
-ifeq ($(BUILD_SINGLE_STATIC_LIBS),yes)
-
-define build_single_static_lib
-$(AR) $(AR_FLAGS) $(STATIC_LIB_TARGET) \
-   $(MATRIX_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(KBOOL_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(BASE_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(FONT_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(VPFUTIL_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(VEC_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(SUPPORT_DATA_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(ELEVATION_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(PROJECTION_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(IMAGING_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(PARALLEL_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(PLUGIN_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(INIT_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) $(OSSIM_LIB_LINK) ; \
-$(RANLIB) $(STATIC_LIB_TARGET) ;
-endef
-
-else
-
-define build_single_static_lib
-echo "Single static library build disabled.";
-endef
-
-endif
-# End of "ifeq ($(BUILD_SINGLE_STATIC_LIBS),yes)"
diff --git a/makefiles/mingw/makeprog b/makefiles/mingw/makeprog
deleted file mode 100644
index a577913..0000000
--- a/makefiles/mingw/makeprog
+++ /dev/null
@@ -1,71 +0,0 @@
-###
-# $Id: makeprog 9143 2006-06-16 19:55:14Z dburken $
-###
-
-# include Makefile.common found at the root of ossim
-# Makefile.common is generated by the configure
-#
- at INCLUDE_COMMON@
-
-CCSRCS=$(wildcard *.cc)
-CPPSRCS=$(wildcard *.cpp)
-CSRCS=$(wildcard *.c)
-COBJS=$(patsubst %.c,%.o,$(CSRCS))
-CCOBJS=$(patsubst %.cc,%.o,$(CCSRCS))
-CPPOBJS=$(patsubst %.cpp,%.o,$(CPPSRCS))
-OBJS=$(CCOBJS) $(CPPOBJS) $(COBJS) 
-DEPEND_FILES = $(wildcard *.d)
-DEFINES = $(BASE_DEFINES) -DOSSIMUSINGDLL
-
-
-# The binary program extension, if any, including dots (e.g. '.exe')
-PROGRAM_EXT = $(EXEEXT)
-BIN_PROGRAM = $(PROGRAM_PREFIX)$(PROGRAM)$(PROGRAM_EXT)
-
-SRCS      = $(CCSRCS) $(CPPSRCS) $(CSRCS)
-INCLUDES  = $(BASE_INCLUDES)
-
-# Pattern rule for objects from .cpp files.
-%.$(OBJEXT): %.cpp
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(DEFINES) $(INCLUDES) -c $< -o $@
-
-# Pattern rule for objects from .cc files.
-%.$(OBJEXT): %.cc
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(DEFINES) $(INCLUDES) -c $< -o $@
-
-# Pattern rule for object from .c files.
-%.$(OBJEXT): %.c
-	$(CC) $(CFLAGS) $(CDEBUGFLAGS) $(DEFINES) $(INCLUDES) -c $< -o $@
-
-%.d: %.cc
-	$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(CDEBUGFLAGS) $(DEFINES) $(INCLUDES) $< >> $@;'
-
-%.d: %.cpp
-	$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(CDEBUGFLAGS) $(DEFINES) $(INCLUDES) $< >> $@;'
-
-%.d: %.c
-	$(SHELL) -ec '$(CC) -MM $(CFLAGS) $(CDEBUGFLAGS) $(DEFINES) $(INCLUDES) $< >> $@;'
-
-all:	$(BIN_PROGRAM)
-
-$(BIN_PROGRAM): $(OBJS)
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(DEFINES) $(LDFLAGS_APP) $(OBJS) $(OSSIM_APP_LINK) -o $@
-	$(INSTALL_PROGRAM) $(BIN_PROGRAM) $(OSSIM_TOP)/bin
-
-depends: 	$(CCSRCS:.cc=.d)\
-		$(CSRCS:.c=.d)\
-		$(CPPSRCS:.cpp=.d)
-
-clean_depends:
-	$(RM_NOPROMPT) *.d
-
-clean:
-	$(RM_CMD) $(BIN_PROGRAM)
-
-
-
-# Only add the depends if they exist
-#
-ifneq ($(DEPENDS_FILES),)
--include $(DEPENDS_FILES)
-endif
diff --git a/makefiles/mingw/makeroot b/makefiles/mingw/makeroot
deleted file mode 100644
index f32af80..0000000
--- a/makefiles/mingw/makeroot
+++ /dev/null
@@ -1,196 +0,0 @@
-#---
-# $Id: makeroot 12189 2007-12-13 21:40:36Z dburken $
-# mingw makeroot
-#---
-include ./Makefile.common
-
-name = ossim
-#bindir = $(prefix)/bin
-#datadir = $(prefix)
-#docdir = $(datadir)/doc
-version = $(OSSIM_VERSION)
-OSSIM_ROOT	=	.
-
-default: 
-	(cd src; $(MAKE))
-	(cd scripts; $(MAKE))
-
-# ---
-# Rule for installing to remote directory (prefix).
-# Do not allow install to workspace!
-# ---
-install: ossim-config-inst
-	if test "$(prefix)" = "$(TOP)"; then \
-		echo "Workspace and install directory the same!"; \
-		echo -n "Use configure option:  "; \
-		echo " --prefix to specify install directory"; \
-		exit 1; \
-	fi
-	if test -f $(INST_BIN)/ossim-uninstall ; then \
-		$(RM) -f $(TOP)/ossim-uninstall ; \
-	fi
-	$(INSTALL) -d $(INST_BIN) $(INST_LIB) $(INST_INC) $(INST_SHARE) \
-	$(INST_DOCS) $(INST_TEMPLATES)
-	echo "#!/bin/sh" > $(INST_BIN)/ossim-uninstall
-	($(INSTALL) COPYING.GPL COPYING.LGPL README.txt $(INST_DOCS))
-	echo "Installing includes to: $(INST_INC)"
-	( cd include/ossim; \
-		for d in `find . -type d` ; do \
-			if [ ! `echo $$d | egrep CVS` ] ; then \
-				$(INSTALL) -d  $(INST_INC)/$$d; \
-			fi ; \
-		done ; \
-		for f in `find . -name "*.h"` ; do \
-			if [ ! `echo $$f | egrep CVS` ] ; then \
-				g=`$(DIRNAME) $$f`; \
-				g=`echo $$g | sed s/'\.\/'//`; \
-				h=$$f; \
-				h=`echo $$h | sed s/'\.\/'//`; \
-				$(INSTALL) -m 664 $$f $(INST_INC)/$$g; \
-				(echo "$(RM) -f $(INST_INC)/$$h" >> \
-				$(INST_BIN)/ossim-uninstall); \
-			fi ; \
-		done ; \
-	)
-	echo "include installation finished..."
-	( cd lib; \
-		for libFile in * ; do \
-			if test -f $$libFile ; then \
-				echo installing $$libFile ... ; \
-	 			cp -d $$libFile $(INST_LIB) ;\
-				(echo "$(RM) -f $(INST_LIB)/$$libFile" \
-			 	>> $(INST_BIN)/ossim-uninstall) ; \
-			fi ; \
-		done ; \
-	)
-	( for bin in bin/* ; do \
-		if test -f $$bin -a -x $$bin ; then \
-			$(INSTALL_PROGRAM) $$bin $(INST_BIN) ;\
-			(echo "$(RM) -f $(prefix)/$$bin"  \
-			>> $(INST_BIN)/ossim-uninstall) ; \
-		fi ; \
-	done ; \
-	)
-	( for t in etc/templates/* ; do \
-		if test x$$t != "etc/templates/CVS" ; then \
-			$(INSTALL_PROGRAM) $$t $(INST_TEMPLATES) ; \
-			(echo "$(RM) -f $(prefix)/$$t"  \
-			>> $(INST_BIN)/ossim-uninstall) ; \
-		fi ; \
-	done ; \
-	)
-	($(MAKE) ossim-config-inst)
-	($(INSTALL_PROGRAM) src/apps/ossim-config-inst \
-	$(INST_BIN)/ossim-config)
-	echo "$(RM) -f $(INST_BIN)/ossim-config" \
-	>> $(INST_BIN)/ossim-uninstall
-	echo "$(RM) -f $(INST_BIN)/ossim-uninstall" \
-	>> $(INST_BIN)/ossim-uninstall
-	chmod 775 $(INST_BIN)/ossim-uninstall
-
-# ---
-# End of install rule...
-# ---
-
-# ---
-# Rule for uninstalling a remote directory (prefix).
-# Do not allow uninstall to workspace!
-# ---
-uninstall:
-	if test "$(prefix)" = "$(TOP)"; then \
-		echo "Workspace and install directory the same!"; \
-		echo -n "Use configure option:  "; \
-		echo " --prefix to specify install directory"; \
-		exit 1; \
-	fi
-	$(shell $(INST_BIN)/ossim-uninstall)
-
-shared:
-	(cd src; $(MAKE) shared) ;
-
-ossim-config-inst:
-	@rm -f src/apps/ossim-config-inst
-	@echo '#!/bin/sh' > src/apps/ossim-config-inst
-	@echo 'OSSIM_LIBS="$(OSSIM_CONFIG_APP_LINK_INST)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_CFLAGS="$(CFLAGS) $(BASE_DEFINES)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_CPPFLAGS="$(CXXFLAGS) $(BASE_DEFINES)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_PREFIX="$(prefix)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_VERSION="$(OSSIM_VERSION)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_INCLUDES="$(BASE_INCLUDES_INST)"' >> src/apps/ossim-config-inst
-	@cat src/apps/ossim-config.in >> src/apps/ossim-config-inst
-	@chmod a+x src/apps/ossim-config-inst
-
-clean:	
-	if test "${RM}" != "" ; then \
-		for d in `find . -name "*.d"` ; do \
-			if ! test -d $$d ; then \
-				${RM} -f $$d ; \
-			fi ; \
-		done ; \
-	fi ;
-	(cd src; $(MAKE) clean) ;
-	(cd lib; $(RM_CMD) libossim* ; )
-	(for d in bin/* ; do \
-	    if test -f $$d; then \
-		$(RM_CMD)  $$d ; \
-	    fi ; \
-	done ; \
-	) ; 
-
-depends: clean_depends
-	(cd src; $(MAKE) depends) ;
-
-clean_depends:
-	(cd src; $(MAKE) clean_depends) ;
-
-configure:	configure.in aclocal.m4
-	aclocal
-	autoconf
-
-all:	default
-
-RPMTOP=${TOP}/../rpmbuild
-CYGWINDIST=${TOP}/../cygwin_ossim
-DISTTOP=${TOP}/..
-
-gzip-dist:
-	cd ${DISTTOP} ; \
-	${RM} -rf ${DISTTOP}/${OSSIM_ARCHIVE} ; \
-	${RM} -rf ${DISTTOP}/${OSSIM_ARCHIVE_TGZ} ; \
-	cp -r ossim ${OSSIM_ARCHIVE} ; \
-	${RM} -f ${OSSIM_ARCHIVE}/lib/* ; \
-	${RM} -f ${OSSIM_ARCHIVE}/bin/* ; \
-	${RM} -rf `find ${DISTTOP}/${OSSIM_ARCHIVE} -name "*.o" -o -name "CVS" -o -name "cvs"` ; \
-	cd ${DISTTOP} ; \
-	tar cvfz $(OSSIM_ARCHIVE_TGZ) ${OSSIM_ARCHIVE} ;
-
-cygwin-dist: gzip-dist
-	@echo "*** Building cygwin-dist ***"
-	${RM} -rf ${CYGWINDIST} ; \
-	${INSTALL} -d ${CYGWINDIST} ; \
-	${INSTALL} -d ${CYGWINDIST}/ossim_install ; \
-	cp -f ${DISTTOP}/${OSSIM_ARCHIVE_TGZ} ${CYGWINDIST} ; \
-	${RM} -f ${DISTTOP}/${OSSIM_ARCHIVE} ; \
-	${RM} -rf ${DISTTOP}/${OSSIM_ARCHIVE}/ossim_install/* ; \
-	cd ${CYGWINDIST} ; \
-	tar -xvzf $(OSSIM_ARCHIVE_TGZ) ; \
-	cd ${CYGWINDIST}/${OSSIM_ARCHIVE} ; \
-	./configure --prefix=${CYGWINDIST}/ossim_install --enable-optimization --disable-debug --with-gdalconf="--with-hdf4=/usr/local"; \
-	make; make install; \
-	if test "${SED}" != "" ; then \
-		${SED}  -e s@$prefix=.*@prefix=/usr/local at g ${CYGWINDIST}/${OSSIM_ARCHIVE}/src/apps/ossim-config > ${INSTALL_BIN}/ossim-config; \
-	fi ; \
-	cd ${CYGWINDIST}/ossim_install ; \
-	tar cvfz ossim-cygwin-${OSSIM_VERSION}.tgz include bin share etc lib;
-
-rpm: gzip-dist
-	@echo "*** Building RPMs ***"
-	${INSTALL} -d  $(RPMTOP) \
-			$(RPMTOP)/SOURCES \
-			$(RPMTOP)/SPECS \
-			$(RPMTOP)/BUILD \
-			$(RPMTOP)/RPMS \
-			$(RPMTOP)/SRPMS ;
-	cp -f ${DISTTOP}/$(OSSIM_ARCHIVE_TGZ) $(RPMTOP)/SOURCES
-	cp -f ${TOP}/ossim.spec $(RPMTOP)/SPECS
-	rpmbuild -ba --define "_topdir ${RPMTOP}" $(RPMTOP)/SPECS/ossim.spec
diff --git a/makefiles/solaris/makelib b/makefiles/solaris/makelib
deleted file mode 100644
index cf8c1c0..0000000
--- a/makefiles/solaris/makelib
+++ /dev/null
@@ -1,247 +0,0 @@
-###
-# $Id: makelib 12268 2008-01-07 16:01:58Z dburken $
-###
-CCSRCS=$(wildcard *.cc)
-CPPSRCS=$(wildcard *.cpp)
-CSRCS=$(wildcard *.c)
-SRCS=$(CCSRCS) $(CPPSRCS)
-COBJS=$(patsubst %.c,%.o,$(CSRCS))
-CCOBJS=$(patsubst %.cc,%.o,$(CCSRCS))
-CPPOBJS=$(patsubst %.cpp,%.o,$(CPPSRCS))
-OBJS=$(CCOBJS) $(CPPOBJS) $(COBJS) 
-
-DIRECTORIES=$(filter-out %.o %.d %.cc %.cc %.cpp %.c %.h %.inc %.lo %.libs Makefile cvs CVS bitmaps test_endian test generator .libs .obj test_suite include , $(wildcard *))
-DEPENDS_FILES=$(wildcard *.d)
-INCLUDES=$(BASE_INCLUDES)
-HEADERS=$(wildcard *.h)
-
-
-SHARED_LIB_VERSIONLESS=$(OSSIM_LIB).$(SO_VERSIONLESS_EXT)
-SHARED_LIB_SONAME=$(OSSIM_LIB).$(SO_SONAME_EXT)
-SHARED_LIB_REALNAME=$(OSSIM_LIB).$(SO_REALNAME_EXT)
-SHARED_LIB_TARGET=$(OSSIM_LIB_PATH)/$(SHARED_LIB_REALNAME)
-SHARED_OBJ_DIR_PATH=$(BASELIBPATH)/$(SHARED_OBJ_DIR)
-
-STATIC_LIB=$(OSSIM_LIB).a
-STATIC_LIB_TARGET=$(OSSIM_LIB_PATH)/$(STATIC_LIB)
-STATIC_OBJ_DIR_PATH=$(BASELIBPATH)/$(STATIC_OBJ_DIR)
-
-# ---
-# To handle "for d in $(VAR);" expanding to  "for d in ;"
-# if no directories present and producing an error on sun os.
-# Substitute empty string with bogus string.
-# ---
-ifeq ($(strip $(DIRECTORIES)),)
-DIRECTORIES=BOGUS_DIR
-endif
-
-# ---
-# all target:
-# 1) Make directories to hold objects.
-# 2) Make all objects.
-# 3) Make all subdirectories.
-# 4) If at top level of the core library directory make the libraries.
-# ---
-all:    destobjdir $(OBJS)
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) all) ; \
-		fi ; \
-	done ;
-	if [ -d $(SHARED_OBJ_DIR) ] ; then $(build_shared_lib) fi
-	if [ -d $(STATIC_OBJ_DIR) ] ; then $(build_static_lib) fi
-
-# ---
-# lib target:
-# 1) Make directories to hold objects.
-# 2) Make all objects.
-# 3) Make all subdirectories.
-# 4) Unlike all target always make the libraries even in not in top directory.
-# ---
-lib:	destobjdir $(OBJS)
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) all) ; \
-		fi ; \
-	done ;
-	$(build_shared_lib)
-	$(build_static_lib)
-
-depends: 	$(CCSRCS:.cc=.d)\
-		$(CSRCS:.c=.d)\
-		$(CPPSRCS:.cpp=.d)
-
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) depends) ; \
-		fi ; \
-	done ;
-
-destobjdir:
-	$(mkdir_shared)
-	$(mkdir_static)
-
-###
-# PLEASE KEEP:
-# This is how ossimEquTokenizer.cpp was generated.
-# Commented out on purpose so rule is not ran at compile time.
-# Explicit rule to make ossimEquTokenizer.cpp from ossimEquTokenizer files.
-# ossimEquTokenizer.cpp: ossimEquTokenizer.l ossimEquTokenDefines.h
-# 	flex -PossimEquTokenizer -+ ossimEquTokenizer.l
-# 	mv lex.ossimEquTokenizer.cc ossimEquTokenizer.cpp
-###
-
-clean_depends:
-	($(RM_NOPROMPT) *.d);
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) clean_depends) ; \
-		fi; \
-	done ;
-
-clean:
-	$(RM_CMD)
-	if [ -d ".obj" ]; then \
-		(cd .obj; $(RM_CMD); cd .libs; $(RM_CMD)) ; \
-	fi
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) clean) ; \
-		fi ; \
-	done ;
-	if [ -d $(SHARED_OBJ_DIR) ]; then $(RMDIR) $(SHARED_OBJ_DIR) ; fi
-	if [ -d $(STATIC_OBJ_DIR) ]; then $(RMDIR) $(STATIC_OBJ_DIR) ; fi
-
-###
-# Pattern rule for objects from .cpp files.
-###
-%.$(OBJEXT): %.cpp
-ifeq ($(BUILD_SHARED_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(PIC_FLAG) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp $@ $(SHARED_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-ifeq ($(BUILD_STATIC_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@;
-	cp $@ $(STATIC_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-
-###
-# Pattern rule for objects from .cc files.
-###
-%.$(OBJEXT): %.cc
-ifeq ($(BUILD_SHARED_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(PIC_FLAG) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp $@ $(SHARED_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-ifeq ($(BUILD_STATIC_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@;
-	cp $@ $(STATIC_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-
-###
-# Pattern rule for object from .c files.
-###
-%.$(OBJEXT): %.c
-ifeq ($(BUILD_SHARED_OBJS),yes)
-	$(CC) $(CFLAGS) $(PIC_FLAG) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp  $*.$(OBJEXT) $(SHARED_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-ifeq ($(BUILD_STATIC_OBJS),yes)
-	$(CC) $(CFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp  $*.$(OBJEXT) $(STATIC_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-
-###
-# Explicit rule for ossimMapCompositionSource.cpp which cannot be built with
-# optimazation flags.
-###
-ossimMapCompositionSource.o: ossimMapCompositionSource.cpp
-ifeq ($(BUILD_SHARED_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(PIC_FLAG) $(NO_OPTIMIZATION_CXXFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp $@ $(SHARED_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-ifeq ($(BUILD_STATIC_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(NO_OPTIMIZATION_CXXFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp $@ $(STATIC_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-
-# Pattern rule for .d dependency file from .cc files.
-%.d: %.cc
-	$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-# Pattern rule for .d dependency file from .cpp files.
-%.d: %.cpp
-	$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-# Pattern rule for .d dependency file from .c files.
-%.d: %.c
-	$(SHELL) -ec '$(CC) -MM $(CFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-
-ifneq ( $(DEPENDS_FILES),)
--include $(DEPENDS_FILES) 
-endif
-
-# ---
-# Define command sequences conditional upon "$(BUILD_S_LIBS) = yes"
-# --- 
-ifeq ($(BUILD_SHARED_LIBS),yes)
-
-define build_shared_lib
-g++ -shared -Wl,-soname,$(SHARED_LIB_SONAME) -o $(SHARED_LIB_TARGET) $(SHARED_OBJ_DIR_PATH)/*.$(OBJEXT) ; \
-(cd $(OSSIM_LIB_PATH) ; $(RM_NOPROMPT) $(SHARED_LIB_SONAME) ; $(RM_NOPROMPT) $(SHARED_LIB_VERSIONLESS) ; ln -s $(SHARED_LIB_REALNAME) $(SHARED_LIB_SONAME) ; ln -s $(SHARED_LIB_REALNAME) $(SHARED_LIB_VERSIONLESS) ; ) ;
-endef
-
-else
-
-define build_shared_lib
-echo "Shared library build disabled.";
-endef
-
-endif
-# End of "ifeq ($(BUILD_SHARED_LIBS),yes)"
-
-
-# ---
-# Define command sequences conditional upon "$(BUILD_STATIC_LIBS) = yes"
-# ---
-ifeq ($(BUILD_STATIC_LIBS),yes)
-
-define build_static_lib
-$(AR) $(AR_FLAGS) $(STATIC_LIB_TARGET) $(STATIC_OBJ_DIR_PATH)/*.$(OBJEXT) ; \
-$(RANLIB) $(STATIC_LIB_TARGET) ;
-endef
-
-else
-
-define build_static_lib
-echo "Static library build disabled.";
-endef
-
-endif
-# End of "ifeq ($(BUILD_STATIC_LIBS),yes)"
-
-
-# Define mkdir for shared objects...
-ifeq ($(BUILD_SHARED_OBJS),yes)
-define mkdir_shared
-if [ ! -d $(SHARED_OBJ_DIR_PATH) ] ; then mkdir $(SHARED_OBJ_DIR_PATH) ; fi
-endef
-else
-define mkdir_shared
-
-endef
-endif
-
-# Define mkdir for static objects...
-ifeq ($(BUILD_STATIC_OBJS),yes)
-define mkdir_static
-if [ ! -d $(STATIC_OBJ_DIR_PATH) ] ; then mkdir $(STATIC_OBJ_DIR_PATH) ; fi
-endef
-else
-define mkdir_static
-
-endef
-endif
-
-
diff --git a/makefiles/solaris/makelibcore b/makefiles/solaris/makelibcore
deleted file mode 100644
index 74cbc56..0000000
--- a/makefiles/solaris/makelibcore
+++ /dev/null
@@ -1,193 +0,0 @@
-###
-# $Id: makelibcore 13689 2008-10-07 12:26:45Z dburken $
-###
-
- at INCLUDE_COMMON@
-
-DIRECTORIES=$(wildcard *)
-
-OSSIM_LIB=libossim
-SHARED_LIB_VERSIONLESS=$(OSSIM_LIB).$(SO_VERSIONLESS_EXT)
-SHARED_LIB_SONAME=$(OSSIM_LIB).$(SO_SONAME_EXT)
-SHARED_LIB_REALNAME=$(OSSIM_LIB).$(SO_REALNAME_EXT)
-SHARED_LIB_TARGET=$(OSSIM_LIB_PATH)/$(SHARED_LIB_REALNAME)
-SHARED_OBJ_DIR_PATH=$(BASELIBPATH)/$(SHARED_OBJ_DIR)
-
-STATIC_LIB=$(OSSIM_LIB).a
-STATIC_LIB_TARGET=$(OSSIM_LIB_PATH)/$(STATIC_LIB)
-STATIC_OBJ_DIR_PATH=$(BASELIBPATH)/$(STATIC_OBJ_DIR)
-
-# Path to ossimVersion.h
-VERSION_FILE=$(OSSIM_TOP)/include/ossim/ossimVersion.h
-
-ifeq ($(BUILD_SINGLE_SHARED_LIBS),yes)
-LINK_SHARED_OBJECT_FILES=	$(MATRIX_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-	  			$(KBOOL_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(BASE_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(FONT_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(VPFUTIL_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(VEC_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(SUPPORT_DATA_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(ELEVATION_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(PROJECTION_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(IMAGING_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(PARALLEL_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(PLUGIN_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-				$(INIT_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT)
-endif
-ifeq ($(BUILD_SINGLE_STATIC_LIBS),yes)
-
-LINK_STATIC_OBJECT_FILES=	$(MATRIX_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(KBOOL_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(BASE_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(FONT_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(VPFUTIL_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(VEC_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(SUPPORT_DATA_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(ELEVATION_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(PROJECTION_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(IMAGING_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(PARALLEL_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(PLUGIN_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-				$(INIT_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT)
-endif
-
-# ---
-# To handle "for d in $(VAR);" expanding to  "for d in ;"
-# if no directories present and producing an error on sun os.
-# Substitute empty string with bogus string.
-# ---
-ifeq ($(strip $(DIRECTORIES)),)
-DIRECTORIES=BOGUS_DIR
-endif
-
-all:	version-config
-	./version-config $(VERSION_FILE) $(OSSIM_VERSION)
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != "generator" -a "$$d" != ".obj" ]; then \
-				(cd $$d; $(MAKE) all) ; \
-			fi ; \
-		fi ; \
-	done ;
-	$(build_single_shared_lib)
-	$(build_single_static_lib)
-
-version-config:
-	if test ! -f "$(OSSIM_TOP)/src/ossim/version-config" ; then \
-		$(CXX) -I$(OSSIM_TOP)/include -o version-config version-config.cpp ; \
-	fi
-
-clean:	clean-version
-	$(RM_CMD)
-	if [ -d ".obj" ]; then \
-		cd .obj ; \
-		rm -f *; \
-	fi
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != ".obj" -a "$$d" != "generator" ]; then \
-			(cd $$d; $(MAKE) clean) ; \
-			fi ; \
-		fi ; \
-	done ;
-
-clean-version:
-	$(RM_NOPROMPT) version-config
-	$(RM_NOPROMPT) $(VERSION_FILE)
-
-depends: 
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != ".obj" -a "$$d" != "generator" ]; then \
-				(cd $$d; $(MAKE) depends) ; \
-			fi ; \
-		fi ; \
-	done ;
-
-clean_depends:
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != ".obj" -a "$$d" != "generator" ]; then \
-				(cd $$d; $(MAKE) clean_depends) ; \
-			fi ; \
-		fi ; \
-	done ;
-
-
-shared: 
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != ".obj" -a "$$d" != "generator" ]; then \
-				(cd $$d; $(MAKE) shared) ; \
-			fi ; \
-		fi ; \
-	done ;
-
-install:
-	for f in `find . -name "*.h"` ; do \
-		$(INSTALL) -d  $(INST_INC)/`$(DIRNAME) $$f`; \
-		$(INSTALL) $$f $(INST_INC)/`$(DIRNAME) $$f`; \
-	done
-
-ifeq ($(BUILD_SINGLE_SHARED_LIBS),yes)
-
-define build_single_shared_lib
- at LD_SHARED@ -h $(SHARED_LIB_SONAME) -o $(SHARED_LIB_TARGET) \
-   $(MATRIX_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(KBOOL_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(BASE_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(FONT_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(VPFUTIL_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(VEC_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(SUPPORT_DATA_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(ELEVATION_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(PROJECTION_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(IMAGING_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(PARALLEL_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(PLUGIN_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(INIT_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) ; \
-(cd $(OSSIM_LIB_PATH) ; $(RM_NOPROMPT) $(SHARED_LIB_SONAME) ; $(RM_NOPROMPT) $(SHARED_LIB_VERSIONLESS) ; ln -s $(SHARED_LIB_REALNAME) $(SHARED_LIB_SONAME) ; ln -s $(SHARED_LIB_REALNAME) $(SHARED_LIB_VERSIONLESS) ; ) ;
-endef
-
-else
-
-define build_single_shared_lib
-echo "Single shared library build disabled.";
-endef
-
-endif
-# End of "ifeq ($(BUILD_SINGLE_SHARED_LIBS),yes)"
-
-
-# ---
-# Define command sequences conditional upon "$(BUILD_STATIC_LIBS) = yes"
-# ---
-ifeq ($(BUILD_SINGLE_STATIC_LIBS),yes)
-
-define build_single_static_lib
-$(AR) $(AR_FLAGS) $(STATIC_LIB_TARGET) \
-   $(MATRIX_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(KBOOL_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(BASE_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(FONT_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(VPFUTIL_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(VEC_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(SUPPORT_DATA_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(ELEVATION_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(PROJECTION_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(IMAGING_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(PARALLEL_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(PLUGIN_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(INIT_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) ; \
-$(RANLIB) $(STATIC_LIB_TARGET) ;
-endef
-
-else
-
-define build_single_static_lib
-echo "Single static library build disabled.";
-endef
-
-endif
-# End of "ifeq ($(BUILD_SINGLE_STATIC_LIBS),yes)"
diff --git a/makefiles/solaris/makeprog b/makefiles/solaris/makeprog
deleted file mode 100644
index eb189e9..0000000
--- a/makefiles/solaris/makeprog
+++ /dev/null
@@ -1,67 +0,0 @@
-# include Makefile.common found at the root of ossim
-# Makefile.common is generated by the configure
-#
- at INCLUDE_COMMON@
-
-CCSRCS=$(wildcard *.cc)
-CPPSRCS=$(wildcard *.cpp)
-CSRCS=$(wildcard *.c)
-COBJS=$(patsubst %.c,%.o,$(CSRCS))
-CCOBJS=$(patsubst %.cc,%.o,$(CCSRCS))
-CPPOBJS=$(patsubst %.cpp,%.o,$(CPPSRCS))
-OBJS=$(CCOBJS) $(CPPOBJS) $(COBJS) 
-DEPEND_FILES = $(wildcard *.d)
-
-# The binary program extension, if any, including dots (e.g. '.exe')
-PROGRAM_EXT = $(EXEEXT)
-BIN_PROGRAM = $(PROGRAM_PREFIX)$(PROGRAM)$(PROGRAM_EXT)
-
-LIBRARY   = $(LIBTOOL_CORE_LIBS)
-DEPLIBS	  = $(OSSIM_CORE_LIBS:-l%=$(LIB_SRC)/.libs/lib%.a)
-SRCS      = $(CCSRCS) $(CPPSRCS) $(CSRCS)
-INCLUDES  = $(BASE_INCLUDES)
-
-# Pattern rule for objects from .cpp files.
-%.$(OBJEXT): %.cpp
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-
-# Pattern rule for objects from .cc files.
-%.$(OBJEXT): %.cc
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-
-# Pattern rule for object from .c files.
-%.$(OBJEXT): %.c
-	$(CC) $(CFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-
-%.d: %.cc
-	$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-%.d: %.cpp
-	$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-%.d: %.c
-	$(SHELL) -ec '$(CC) -MM $(CFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-all:	$(BIN_PROGRAM)
-
-$(BIN_PROGRAM): $(OBJS)
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(LDFLAGS_APP) $(OBJS) $(OSSIM_APP_LINK) -o $@
-	$(INSTALL_PROGRAM) $(BIN_PROGRAM) $(OSSIM_TOP)/bin
-
-depends: 	$(CCSRCS:.cc=.d)\
-		$(CSRCS:.c=.d)\
-		$(CPPSRCS:.cpp=.d)
-
-clean_depends:
-	$(RM_NOPROMPT) *.d
-
-clean:
-	$(RM_CMD) $(BIN_PROGRAM)
-
-
-
-# Only add the depends if they exist
-#
-ifneq ($(DEPENDS_FILES),)
--include $(DEPENDS_FILES)
-endif
diff --git a/makefiles/solaris/makeroot b/makefiles/solaris/makeroot
deleted file mode 100644
index 2e706d9..0000000
--- a/makefiles/solaris/makeroot
+++ /dev/null
@@ -1,195 +0,0 @@
-#---
-# $Id: makeroot 16386 2010-01-21 18:35:04Z gpotts $
-# solaris makeroot
-#---
-include ./Makefile.common
-
-name = ossim
-#bindir = $(prefix)/bin
-#datadir = $(prefix)
-#docdir = $(datadir)/doc
-version = $(OSSIM_VERSION)
-OSSIM_ROOT	=	.
-
-default: 
-	(cd src; $(MAKE))
-	(cd scripts; $(MAKE))
-
-# ---
-# Rule for installing to remote directory (prefix).
-# Do not allow install to workspace!
-# ---
-install: ossim-config-inst
-	if test "$(prefix)" = "$(TOP)"; then \
-		echo "Workspace and install directory the same!"; \
-		echo -n "Use configure option:  "; \
-		echo " --prefix to specify install directory"; \
-		exit 1; \
-	fi
-	if test -f $(INST_BIN)/ossim-uninstall ; then \
-		$(RM) -f $(TOP)/ossim-uninstall ; \
-	fi
-	$(INSTALL) -d $(INST_BIN) $(INST_LIB) $(INST_INC) $(INST_SHARE) \
-	$(INST_DOCS) $(INST_TEMPLATES)
-	echo "#!/bin/sh" > $(INST_BIN)/ossim-uninstall
-	($(INSTALL) COPYING.GPL COPYING.LGPL README.txt $(INST_DOCS))
-	echo "Installing includes to: $(INST_INC)"
-	( cd include/ossim; \
-		for d in `find . -type d` ; do \
-				$(INSTALL) -d  $(INST_INC)/$$d; \
-		done ; \
-		for f in `find . -name "*.h"` ; do \
-				echo installing $$f ... ; \
-				g=`$(DIRNAME) $$f`; \
-				g=`echo $$g | sed s/'\.\/'//`; \
-				h=$$f; \
-				h=`echo $$h | sed s/'\.\/'//`; \
-				$(INSTALL) -m 664 $$f $(INST_INC)/$$g; \
-				(echo "$(RM) -f $(INST_INC)/$$h" >> \
-				$(INST_BIN)/ossim-uninstall); \
-		done ; \
-	)
-	echo "include installation finished..."
-	( cd lib; \
-		for libFile in * ; do \
-			if test -f $$libFile ; then \
-				echo installing $$libFile ... ; \
-	 			cp -d $$libFile $(INST_LIB) ;\
-				(echo "$(RM) -f $(INST_LIB)/$$libFile" \
-			 	>> $(INST_BIN)/ossim-uninstall) ; \
-			fi ; \
-		done ; \
-	)
-	( for bin in bin/* ; do \
-		if test -f $$bin -a -x $$bin ; then \
-			echo installing $$bin ... ; \
-			$(INSTALL_PROGRAM) $$bin $(INST_BIN) ;\
-			(echo "$(RM) -f $(prefix)/$$bin"  \
-			>> $(INST_BIN)/ossim-uninstall) ; \
-		fi ; \
-	done ; \
-	)
-	( for t in etc/templates/* ; do \
-		if test x$$t != "etc/templates/CVS" ; then \
-			echo installing $$t ... ; \
-			$(INSTALL_PROGRAM) $$t $(INST_TEMPLATES) ; \
-			(echo "$(RM) -f $(prefix)/$$t"  \
-			>> $(INST_BIN)/ossim-uninstall) ; \
-		fi ; \
-	done ; \
-	)
-	($(MAKE) ossim-config-inst)
-	($(INSTALL_PROGRAM) src/apps/ossim-config-inst \
-	$(INST_BIN)/ossim-config)
-	echo "$(RM) -f $(INST_BIN)/ossim-config" \
-	>> $(INST_BIN)/ossim-uninstall
-	echo "$(RM) -f $(INST_BIN)/ossim-uninstall" \
-	>> $(INST_BIN)/ossim-uninstall
-	chmod 775 $(INST_BIN)/ossim-uninstall
-
-# ---
-# End of install rule...
-# ---
-
-# ---
-# Rule for uninstalling a remote directory (prefix).
-# Do not allow uninstall to workspace!
-# ---
-uninstall:
-	if test "$(prefix)" = "$(TOP)"; then \
-		echo "Workspace and install directory the same!"; \
-		echo -n "Use configure option:  "; \
-		echo " --prefix to specify install directory"; \
-		exit 1; \
-	fi
-	$(shell $(INST_BIN)/ossim-uninstall)
-
-shared:
-	(cd src; $(MAKE) shared) ;
-
-ossim-config-inst:
-	@rm -f src/apps/ossim-config-inst
-	@echo '#!/bin/sh' > src/apps/ossim-config-inst
-	@echo 'OSSIM_LIBS="$(OSSIM_CONFIG_APP_LINK_INST)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_CFLAGS="$(CFLAGS) $(BASE_DEFINES)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_CPPFLAGS="$(CXXFLAGS) $(BASE_DEFINES)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_PREFIX="$(prefix)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_VERSION="$(OSSIM_VERSION)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_INCLUDES="$(BASE_INCLUDES_INST)"' >> src/apps/ossim-config-inst
-	@cat src/apps/ossim-config.in >> src/apps/ossim-config-inst
-	@chmod a+x src/apps/ossim-config-inst
-
-clean:	
-	if test "${RM}" != "" ; then \
-		for d in `find . -name "*.d"` ; do \
-			if ! test -d $$d ; then \
-				${RM} -f $$d ; \
-			fi ; \
-		done ; \
-	fi ;
-	(cd src; $(MAKE) clean) ;
-	(cd lib; $(RM_CMD) *ossim* ; )
-	(for d in bin/* ; do \
-	    if test -f $$d; then \
-		$(RM_CMD)  $$d ; \
-	    fi ; \
-	done ; \
-	) ; 
-
-depends: clean_depends
-	(cd src; $(MAKE) depends) ;
-
-clean_depends:
-	(cd src; $(MAKE) clean_depends) ;
-
-configure:	configure.in aclocal.m4
-	aclocal
-	autoconf
-
-all:	default
-
-RPMTOP=${TOP}/../rpmbuild
-CYGWINDIST=${TOP}/../cygwin_ossim
-DISTTOP=${TOP}/..
-
-gzip-dist:
-	cd ${DISTTOP} ; \
-	${RM} -rf ${DISTTOP}/${OSSIM_ARCHIVE} ; \
-	${RM} -rf ${DISTTOP}/${OSSIM_ARCHIVE_TGZ} ; \
-	cp -r ossim ${OSSIM_ARCHIVE} ; \
-	${RM} -f ${OSSIM_ARCHIVE}/lib/* ; \
-	${RM} -f ${OSSIM_ARCHIVE}/bin/* ; \
-	${RM} -rf `find ${DISTTOP}/${OSSIM_ARCHIVE} -name "*.o" -o -name "CVS" -o -name "cvs"` ; \
-	cd ${DISTTOP} ; \
-	tar cvfz $(OSSIM_ARCHIVE_TGZ) ${OSSIM_ARCHIVE} ;
-
-cygwin-dist: gzip-dist
-	@echo "*** Building cygwin-dist ***"
-	${RM} -rf ${CYGWINDIST} ; \
-	${INSTALL} -d ${CYGWINDIST} ; \
-	${INSTALL} -d ${CYGWINDIST}/ossim_install ; \
-	cp -f ${DISTTOP}/${OSSIM_ARCHIVE_TGZ} ${CYGWINDIST} ; \
-	${RM} -f ${DISTTOP}/${OSSIM_ARCHIVE} ; \
-	${RM} -rf ${DISTTOP}/${OSSIM_ARCHIVE}/ossim_install/* ; \
-	cd ${CYGWINDIST} ; \
-	tar -xvzf $(OSSIM_ARCHIVE_TGZ) ; \
-	cd ${CYGWINDIST}/${OSSIM_ARCHIVE} ; \
-	./configure --prefix=${CYGWINDIST}/ossim_install --enable-optimization --disable-debug --with-gdalconf="--with-hdf4=/usr/local"; \
-	make; make install; \
-	if test "${SED}" != "" ; then \
-		${SED}  -e s@$prefix=.*@prefix=/usr/local at g ${CYGWINDIST}/${OSSIM_ARCHIVE}/src/apps/ossim-config > ${INSTALL_BIN}/ossim-config; \
-	fi ; \
-	cd ${CYGWINDIST}/ossim_install ; \
-	tar cvfz ossim-cygwin-${OSSIM_VERSION}.tgz include bin share etc lib;
-
-rpm: gzip-dist
-	@echo "*** Building RPMs ***"
-	${INSTALL} -d  $(RPMTOP) \
-			$(RPMTOP)/SOURCES \
-			$(RPMTOP)/SPECS \
-			$(RPMTOP)/BUILD \
-			$(RPMTOP)/RPMS \
-			$(RPMTOP)/SRPMS ;
-	cp -f ${DISTTOP}/$(OSSIM_ARCHIVE_TGZ) $(RPMTOP)/SOURCES
-	cp -f ${TOP}/ossim.spec $(RPMTOP)/SPECS
-	rpmbuild -ba --define "_topdir ${RPMTOP}" $(RPMTOP)/SPECS/ossim.spec
diff --git a/makefiles/unx/.cvsignore b/makefiles/unx/.cvsignore
deleted file mode 100644
index 14c0366..0000000
--- a/makefiles/unx/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.~*
diff --git a/makefiles/unx/makeapps.unx b/makefiles/unx/makeapps.unx
deleted file mode 100644
index b6c8bad..0000000
--- a/makefiles/unx/makeapps.unx
+++ /dev/null
@@ -1,52 +0,0 @@
- at INCLUDE_COMMON@
-DIRECTORIES=$(filter-out cvs CVS vce pathFinder histogramViewer fooApp foo toc_render utm2geo dumpocg icat pasta roadFind dtedChecker, $(wildcard *))
-
-# ---
-# To handle "for d in $(VAR);" expanding to  "for d in ;"
-# if no directories present and producing an error on sun os.
-# Substitute empty string with bogus string.
-# ---
-ifeq ($(strip $(DIRECTORIES)),)
-DIRECTORIES=BOGUS_DIR
-endif
-
-all: ossim-config
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) all) ; \
-		fi ; \
-	done ;
-
-depends:
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) depends) ; \
-		fi; \
-	done ;
-
-clean_depends:
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) clean_depends) ; \
-		fi ; \
-	done ;
-
-clean: 
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			(cd $$d; $(MAKE) clean) ; \
-		fi ; \
-	done ;
-
-ossim-config:	ossim-config.in ../../Makefile.common ./Makefile 
-	@rm -f ossim-config
-	@echo '#!/bin/sh' > ossim-config
-	@echo 'OSSIM_LIBS="$(OSSIM_APP_LINK)"' >> ossim-config
-	@echo 'OSSIM_CFLAGS="$(CFLAGS) $(BASE_DEFINES)"' >> ossim-config
-	@echo 'OSSIM_CPPFLAGS="$(CXXFLAGS) $(BASE_DEFINES)"' >> ossim-config
-	@echo 'OSSIM_PREFIX="$(prefix)"' >> ossim-config
-	@echo 'OSSIM_VERSION="$(OSSIM_VERSION)"' >> ossim-config
-	@echo 'OSSIM_INCLUDES="$(BASE_INCLUDES)"' >> ossim-config
-	@cat ossim-config.in >> ossim-config
-	@chmod a+x ossim-config
-
diff --git a/makefiles/unx/makelib b/makefiles/unx/makelib
deleted file mode 100644
index f4b6a89..0000000
--- a/makefiles/unx/makelib
+++ /dev/null
@@ -1,212 +0,0 @@
-###
-# $Id: makelib 12268 2008-01-07 16:01:58Z dburken $
-#
-# Makefile for directories under "ossim/src/ossim" like "base", "init" and 
-# so on...
-#
-###
-
-CCSRCS=$(wildcard *.cc)
-CPPSRCS=$(wildcard *.cpp)
-CSRCS=$(wildcard *.c)
-SRCS=$(CCSRCS) $(CPPSRCS)
-COBJS=$(patsubst %.c,%.o,$(CSRCS))
-CCOBJS=$(patsubst %.cc,%.o,$(CCSRCS))
-CPPOBJS=$(patsubst %.cpp,%.o,$(CPPSRCS))
-OBJS=$(CCOBJS) $(CPPOBJS) $(COBJS) 
-
-DEPENDS_FILES=$(wildcard *.d)
-INCLUDES=$(BASE_INCLUDES)
-HEADERS=$(wildcard *.h)
-
-
-SHARED_LIB_VERSIONLESS=$(OSSIM_LIB).$(SO_VERSIONLESS_EXT)
-SHARED_LIB_SONAME=$(OSSIM_LIB).$(SO_SONAME_EXT)
-SHARED_LIB_REALNAME=$(OSSIM_LIB).$(SO_REALNAME_EXT)
-SHARED_LIB_TARGET=$(OSSIM_LIB_PATH)/$(SHARED_LIB_REALNAME)
-SHARED_OBJ_DIR_PATH=$(BASELIBPATH)/$(SHARED_OBJ_DIR)
-
-STATIC_LIB=$(OSSIM_LIB).a
-STATIC_LIB_TARGET=$(OSSIM_LIB_PATH)/$(STATIC_LIB)
-STATIC_OBJ_DIR_PATH=$(BASELIBPATH)/$(STATIC_OBJ_DIR)
-
-# ---
-# all target:
-# 1) Make directories to hold objects.
-# 2) Make all objects.
-# 3) If at top level of the core library directory make the libraries.
-all:    destobjdir $(OBJS)
-	if [ -d $(SHARED_OBJ_DIR) ] ; then $(build_shared_lib) fi
-	if [ -d $(STATIC_OBJ_DIR) ] ; then $(build_static_lib) fi
-
-# ---
-# lib target:
-# 1) Make directories to hold objects.
-# 2) Make all objects.
-# 3) Unlike all target always make the libraries even in not in top directory.
-lib:	destobjdir $(OBJS)
-	$(build_shared_lib)
-	$(build_static_lib)
-
-depends: 	$(CCSRCS:.cc=.d)\
-		$(CSRCS:.c=.d)\
-		$(CPPSRCS:.cpp=.d)
-
-destobjdir:
-	$(mkdir_shared)
-	$(mkdir_static)
-
-###
-# PLEASE KEEP:
-# This is how ossimEquTokenizer.cpp was generated.
-# Commented out on purpose so rule is not ran at compile time.
-# Explicit rule to make ossimEquTokenizer.cpp from ossimEquTokenizer files.
-# ossimEquTokenizer.cpp: ossimEquTokenizer.l ossimEquTokenDefines.h
-# 	flex -PossimEquTokenizer -+ ossimEquTokenizer.l
-# 	mv lex.ossimEquTokenizer.cc ossimEquTokenizer.cpp
-###
-
-clean_depends:
-	($(RM_NOPROMPT) *.d);
-
-clean:
-	$(RM_CMD)
-	if [ -d ".obj" ]; then \
-		(cd .obj; $(RM_CMD); cd .libs; $(RM_CMD)) ; \
-	fi
-	if [ -d $(SHARED_OBJ_DIR) ]; then $(RMDIR) $(SHARED_OBJ_DIR) ; fi
-	if [ -d $(STATIC_OBJ_DIR) ]; then $(RMDIR) $(STATIC_OBJ_DIR) ; fi
-
-###
-# Pattern rule for objects from .cpp files.
-###
-%.$(OBJEXT): %.cpp
-ifeq ($(BUILD_SHARED_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(PIC_FLAG) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp $@ $(SHARED_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-ifeq ($(BUILD_STATIC_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@;
-	cp $@ $(STATIC_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-
-###
-# Pattern rule for objects from .cc files.
-###
-%.$(OBJEXT): %.cc
-ifeq ($(BUILD_SHARED_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(PIC_FLAG) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp $@ $(SHARED_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-ifeq ($(BUILD_STATIC_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@;
-	cp $@ $(STATIC_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-
-###
-# Pattern rule for object from .c files.
-###
-%.$(OBJEXT): %.c
-ifeq ($(BUILD_SHARED_OBJS),yes)
-	$(CC) $(CFLAGS) $(PIC_FLAG) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp  $*.$(OBJEXT) $(SHARED_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-ifeq ($(BUILD_STATIC_OBJS),yes)
-	$(CC) $(CFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp  $*.$(OBJEXT) $(STATIC_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-
-###
-# Explicit rule for ossimMapCompositionSource.cpp which cannot be built with
-# optimazation flags.
-###
-ossimMapCompositionSource.o: ossimMapCompositionSource.cpp
-ifeq ($(BUILD_SHARED_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(PIC_FLAG) $(NO_OPTIMIZATION_CXXFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp $@ $(SHARED_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-ifeq ($(BUILD_STATIC_OBJS),yes)
-	$(CXX) $(CXXFLAGS) $(NO_OPTIMIZATION_CXXFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-	cp $@ $(STATIC_OBJ_DIR_PATH)/$*.$(OBJEXT)
-endif
-
-# Pattern rule for .d dependency file from .cc files.
-%.d: %.cc
-	$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-# Pattern rule for .d dependency file from .cpp files.
-%.d: %.cpp
-	$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-# Pattern rule for .d dependency file from .c files.
-%.d: %.c
-	$(SHELL) -ec '$(CC) -MM $(CFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-
-ifneq ( $(DEPENDS_FILES),)
--include $(DEPENDS_FILES) 
-endif
-
-# ---
-# Define command sequences conditional upon "$(BUILD_S_LIBS) = yes"
-# --- 
-ifeq ($(BUILD_SHARED_LIBS),yes)
-
-define build_shared_lib
-g++ -shared -Wl,-soname,$(SHARED_LIB_SONAME) -o $(SHARED_LIB_TARGET) $(SHARED_OBJ_DIR_PATH)/*.$(OBJEXT) ; \
-(cd $(OSSIM_LIB_PATH) ; $(RM_NOPROMPT) $(SHARED_LIB_SONAME) ; $(RM_NOPROMPT) $(SHARED_LIB_VERSIONLESS) ; ln -s $(SHARED_LIB_REALNAME) $(SHARED_LIB_SONAME) ; ln -s $(SHARED_LIB_REALNAME) $(SHARED_LIB_VERSIONLESS) ; ) ;
-endef
-
-else
-
-define build_shared_lib
-echo "Shared library build disabled.";
-endef
-
-endif
-# End of "ifeq ($(BUILD_SHARED_LIBS),yes)"
-
-
-# ---
-# Define command sequences conditional upon "$(BUILD_STATIC_LIBS) = yes"
-# ---
-ifeq ($(BUILD_STATIC_LIBS),yes)
-
-define build_static_lib
-$(AR) $(AR_FLAGS) $(STATIC_LIB_TARGET) $(STATIC_OBJ_DIR_PATH)/*.$(OBJEXT) ; \
-$(RANLIB) $(STATIC_LIB_TARGET) ;
-endef
-
-else
-
-define build_static_lib
-echo "Static library build disabled.";
-endef
-
-endif
-# End of "ifeq ($(BUILD_STATIC_LIBS),yes)"
-
-
-# Define mkdir for shared objects...
-ifeq ($(BUILD_SHARED_OBJS),yes)
-define mkdir_shared
-if [ ! -d $(SHARED_OBJ_DIR_PATH) ] ; then mkdir $(SHARED_OBJ_DIR_PATH) ; fi
-endef
-else
-define mkdir_shared
-
-endef
-endif
-
-# Define mkdir for static objects...
-ifeq ($(BUILD_STATIC_OBJS),yes)
-define mkdir_static
-if [ ! -d $(STATIC_OBJ_DIR_PATH) ] ; then mkdir $(STATIC_OBJ_DIR_PATH) ; fi
-endef
-else
-define mkdir_static
-
-endef
-endif
-
-
diff --git a/makefiles/unx/makelibbase.unx b/makefiles/unx/makelibbase.unx
deleted file mode 100644
index 53872c6..0000000
--- a/makefiles/unx/makelibbase.unx
+++ /dev/null
@@ -1,11 +0,0 @@
-####
-# $Id: makelibbase.unx 6994 2004-11-15 16:05:49Z dburken $
-####
-
- at INCLUDE_COMMON@
-
-OSSIM_LIB=$(LIB_BASE)
-
-BASELIBPATH=$(BASE_ROOT)
-
-include $(TOP)/makelib.mak
diff --git a/makefiles/unx/makelibcore b/makefiles/unx/makelibcore
deleted file mode 100644
index faff754..0000000
--- a/makefiles/unx/makelibcore
+++ /dev/null
@@ -1,158 +0,0 @@
-###
-# $Id: makelibcore 13758 2008-10-22 17:39:57Z gpotts $
-###
-
- at INCLUDE_COMMON@
-
-DIRECTORIES=$(wildcard *)
-
-OSSIM_LIB=libossim
-SHARED_LIB_VERSIONLESS=$(OSSIM_LIB).$(SO_VERSIONLESS_EXT)
-SHARED_LIB_SONAME=$(OSSIM_LIB).$(SO_SONAME_EXT)
-SHARED_LIB_REALNAME=$(OSSIM_LIB).$(SO_REALNAME_EXT)
-SHARED_LIB_TARGET=$(OSSIM_LIB_PATH)/$(SHARED_LIB_REALNAME)
-SHARED_OBJ_DIR_PATH=$(BASELIBPATH)/$(SHARED_OBJ_DIR)
-
-STATIC_LIB=$(OSSIM_LIB).a
-STATIC_LIB_TARGET=$(OSSIM_LIB_PATH)/$(STATIC_LIB)
-STATIC_OBJ_DIR_PATH=$(BASELIBPATH)/$(STATIC_OBJ_DIR)
-
-# Path to ossimVersion.h
-VERSION_FILE=$(OSSIM_TOP)/include/ossim/ossimVersion.h
-
-# ---
-# To handle "for d in $(VAR);" expanding to  "for d in ;"
-# if no directories present and producing an error on sun os.
-# Substitute empty string with bogus string.
-# ---
-ifeq ($(strip $(DIRECTORIES)),)
-DIRECTORIES=BOGUS_DIR
-endif
-
-all:	version-config
-	./version-config $(VERSION_FILE) $(OSSIM_VERSION)
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != "generator" -a "$$d" != ".obj" ]; then \
-				(cd $$d; $(MAKE) all) ; \
-			fi ; \
-		fi ; \
-	done ;
-	$(build_single_shared_lib)
-	$(build_single_static_lib)
-
-version-config:
-	if test ! -f "$(OSSIM_TOP)/src/ossim/version-config" ; then \
-		$(CXX) -I$(OSSIM_TOP)/include -o version-config version-config.cpp ; \
-	fi
-
-clean:	clean-version
-	$(RM_CMD)
-	if [ -d ".obj" ]; then \
-		cd .obj ; \
-		rm -f *; \
-	fi
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != ".obj" -a "$$d" != "generator" ]; then \
-			(cd $$d; $(MAKE) clean) ; \
-			fi ; \
-		fi ; \
-	done ;
-
-clean-version:
-	$(RM_NOPROMPT) version-config
-	$(RM_NOPROMPT) $(VERSION_FILE)
-
-depends: 
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != ".obj" -a "$$d" != "generator" ]; then \
-				(cd $$d; $(MAKE) depends) ; \
-			fi ; \
-		fi ; \
-	done ;
-
-clean_depends:
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != ".obj" -a "$$d" != "generator" ]; then \
-				(cd $$d; $(MAKE) clean_depends) ; \
-			fi ; \
-		fi ; \
-	done ;
-
-
-shared: 
-	for d in $(DIRECTORIES); do \
-		if [ -d $$d ]; then \
-			if [ "$$d" != "CVS" -a "$$d" != "."  -a "$$d" != "test_endian"  -a "$$d" != "test" -a "$$d" != ".obj" -a "$$d" != "generator" ]; then \
-				(cd $$d; $(MAKE) shared) ; \
-			fi ; \
-		fi ; \
-	done ;
-
-# Nothing to do for install...
-install:
-
-ifeq ($(BUILD_SINGLE_SHARED_LIBS),yes)
-
-define build_single_shared_lib
- at LD_SHARED@ -o $(SHARED_LIB_TARGET) \
-   $(KBOOL_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(MATRIX_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(BASE_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(FONT_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(VPFUTIL_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(VEC_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(SUPPORT_DATA_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(ELEVATION_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(PROJECTION_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(IMAGING_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(PARALLEL_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(PLUGIN_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) \
-   $(INIT_ROOT)/$(SHARED_OBJ_DIR)/*.$(OBJEXT) $(OSSIM_LIB_LINK) ; \
-(cd $(OSSIM_LIB_PATH) ; $(RM_NOPROMPT) $(SHARED_LIB_SONAME) ; $(RM_NOPROMPT) $(SHARED_LIB_VERSIONLESS) ; ln -s $(SHARED_LIB_REALNAME) $(SHARED_LIB_SONAME) ; ln -s $(SHARED_LIB_REALNAME) $(SHARED_LIB_VERSIONLESS) ; ) ;
-endef
-
-else
-
-define build_single_shared_lib
-echo "Single shared library build disabled.";
-endef
-
-endif
-# End of "ifeq ($(BUILD_SINGLE_SHARED_LIBS),yes)"
-
-
-# ---
-# Define command sequences conditional upon "$(BUILD_STATIC_LIBS) = yes"
-# ---
-ifeq ($(BUILD_SINGLE_STATIC_LIBS),yes)
-
-define build_single_static_lib
-$(AR) $(AR_FLAGS) $(STATIC_LIB_TARGET) \
-   $(KBOOL_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(MATRIX_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(BASE_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(FONT_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(VPFUTIL_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(VEC_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(SUPPORT_DATA_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(ELEVATION_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(PROJECTION_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(IMAGING_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(PARALLEL_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(PLUGIN_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) \
-   $(INIT_ROOT)/$(STATIC_OBJ_DIR)/*.$(OBJEXT) ; \
-$(RANLIB) $(STATIC_LIB_TARGET) ;
-endef
-
-else
-
-define build_single_static_lib
-echo "Single static library build disabled.";
-endef
-
-endif
-# End of "ifeq ($(BUILD_SINGLE_STATIC_LIBS),yes)"
diff --git a/makefiles/unx/makelibelevation.unx b/makefiles/unx/makelibelevation.unx
deleted file mode 100644
index 952c79f..0000000
--- a/makefiles/unx/makelibelevation.unx
+++ /dev/null
@@ -1,11 +0,0 @@
-####
-# $Id: makelibelevation.unx 6994 2004-11-15 16:05:49Z dburken $
-####
-
- at INCLUDE_COMMON@
-
-OSSIM_LIB=$(LIB_ELEVATION)
-
-BASELIBPATH=$(ELEVATION_ROOT)
-
-include $(TOP)/makelib.mak
diff --git a/makefiles/unx/makelibfont.unx b/makefiles/unx/makelibfont.unx
deleted file mode 100644
index 6a97529..0000000
--- a/makefiles/unx/makelibfont.unx
+++ /dev/null
@@ -1,11 +0,0 @@
-####
-# $Id: makelibfont.unx 9108 2006-06-14 02:05:09Z gpotts $
-####
-
- at INCLUDE_COMMON@
-
-OSSIM_LIB=$(LIB_FONT)
-
-BASELIBPATH=$(FONT_ROOT)
-
-include $(TOP)/makelib.mak
diff --git a/makefiles/unx/makelibimaging.unx b/makefiles/unx/makelibimaging.unx
deleted file mode 100644
index 0350635..0000000
--- a/makefiles/unx/makelibimaging.unx
+++ /dev/null
@@ -1,11 +0,0 @@
-####
-# $Id: makelibimaging.unx 6994 2004-11-15 16:05:49Z dburken $
-####
-
- at INCLUDE_COMMON@
-
-OSSIM_LIB=$(LIB_IMAGING)
-
-BASELIBPATH=$(IMAGING_ROOT)
-
-include $(TOP)/makelib.mak
diff --git a/makefiles/unx/makelibinit.unx b/makefiles/unx/makelibinit.unx
deleted file mode 100644
index e61a87a..0000000
--- a/makefiles/unx/makelibinit.unx
+++ /dev/null
@@ -1,11 +0,0 @@
-####
-# $Id: makelibinit.unx 6994 2004-11-15 16:05:49Z dburken $
-####
-
- at INCLUDE_COMMON@
-
-OSSIM_LIB=$(LIB_INIT)
-
-BASELIBPATH=$(INIT_ROOT)
-
-include $(TOP)/makelib.mak
diff --git a/makefiles/unx/makelibkbool.unx b/makefiles/unx/makelibkbool.unx
deleted file mode 100644
index 571f46d..0000000
--- a/makefiles/unx/makelibkbool.unx
+++ /dev/null
@@ -1,11 +0,0 @@
-####
-# $Id: makelibkbool.unx 8971 2006-03-28 17:59:00Z gpotts $
-####
-
- at INCLUDE_COMMON@
-
-OSSIM_LIB=$(LIB_KBOOL)
-
-BASELIBPATH=$(KBOOL_ROOT)
-
-include $(TOP)/makelib.mak
diff --git a/makefiles/unx/makelibmatrix.unx b/makefiles/unx/makelibmatrix.unx
deleted file mode 100644
index cd23b4c..0000000
--- a/makefiles/unx/makelibmatrix.unx
+++ /dev/null
@@ -1,11 +0,0 @@
-####
-# $Id: makelibmatrix.unx 6994 2004-11-15 16:05:49Z dburken $
-####
-
- at INCLUDE_COMMON@
-
-OSSIM_LIB=$(LIB_MATRIX)
-
-BASELIBPATH=$(MATRIX_ROOT)
-
-include $(TOP)/makelib.mak
diff --git a/makefiles/unx/makelibparallel.unx b/makefiles/unx/makelibparallel.unx
deleted file mode 100644
index 6999c4b..0000000
--- a/makefiles/unx/makelibparallel.unx
+++ /dev/null
@@ -1,11 +0,0 @@
-####
-# $Id: makelibparallel.unx 6994 2004-11-15 16:05:49Z dburken $
-####
-
- at INCLUDE_COMMON@
-
-OSSIM_LIB=$(LIB_PARALLEL)
-
-BASELIBPATH=$(PARALLEL_ROOT)
-
-include $(TOP)/makelib.mak
diff --git a/makefiles/unx/makelibplugin.unx b/makefiles/unx/makelibplugin.unx
deleted file mode 100644
index 5b754cb..0000000
--- a/makefiles/unx/makelibplugin.unx
+++ /dev/null
@@ -1,11 +0,0 @@
-####
-# $Id: makelibplugin.unx 6994 2004-11-15 16:05:49Z dburken $
-####
-
- at INCLUDE_COMMON@
-
-OSSIM_LIB=$(LIB_PLUGIN)
-
-BASELIBPATH=$(PLUGIN_ROOT)
-
-include $(TOP)/makelib.mak
diff --git a/makefiles/unx/makelibprojection.unx b/makefiles/unx/makelibprojection.unx
deleted file mode 100644
index 720433e..0000000
--- a/makefiles/unx/makelibprojection.unx
+++ /dev/null
@@ -1,11 +0,0 @@
-####
-# $Id: makelibprojection.unx 9108 2006-06-14 02:05:09Z gpotts $
-####
-
- at INCLUDE_COMMON@
-
-OSSIM_LIB=$(LIB_PROJECTION)
-
-BASELIBPATH=$(PROJECTION_ROOT)
-
-include $(TOP)/makelib.mak
diff --git a/makefiles/unx/makelibsupportdata.unx b/makefiles/unx/makelibsupportdata.unx
deleted file mode 100644
index 301dce9..0000000
--- a/makefiles/unx/makelibsupportdata.unx
+++ /dev/null
@@ -1,11 +0,0 @@
-####
-# $Id: makelibsupportdata.unx 6994 2004-11-15 16:05:49Z dburken $
-####
-
- at INCLUDE_COMMON@
-
-OSSIM_LIB=$(LIB_SUPPORT_DATA)
-
-BASELIBPATH=$(SUPPORT_DATA_ROOT)
-
-include $(TOP)/makelib.mak
diff --git a/makefiles/unx/makelibvec.unx b/makefiles/unx/makelibvec.unx
deleted file mode 100644
index 75892f0..0000000
--- a/makefiles/unx/makelibvec.unx
+++ /dev/null
@@ -1,11 +0,0 @@
-####
-# $Id: makelibvec.unx 6994 2004-11-15 16:05:49Z dburken $
-####
-
- at INCLUDE_COMMON@
-
-OSSIM_LIB=$(LIB_VEC)
-
-BASELIBPATH=$(VEC_ROOT)
-
-include $(TOP)/makelib.mak
diff --git a/makefiles/unx/makelibvpfutil.unx b/makefiles/unx/makelibvpfutil.unx
deleted file mode 100644
index e0303ec..0000000
--- a/makefiles/unx/makelibvpfutil.unx
+++ /dev/null
@@ -1,11 +0,0 @@
-####
-# $Id: makelibvpfutil.unx 6994 2004-11-15 16:05:49Z dburken $
-####
-
- at INCLUDE_COMMON@
-
-OSSIM_LIB=$(LIB_VPFUTIL)
-
-BASELIBPATH=$(VPFUTIL_ROOT)
-
-include $(TOP)/makelib.mak
diff --git a/makefiles/unx/makelibwx.unx b/makefiles/unx/makelibwx.unx
deleted file mode 100644
index b70a498..0000000
--- a/makefiles/unx/makelibwx.unx
+++ /dev/null
@@ -1,11 +0,0 @@
-# include Makefile.common found at the root of ossim
-# Makefile.common is generated by the configure
-#
- at INCLUDE_COMMON@
-
-STATIC_LIB=$(LIB_WX_STATIC)
-SHARED_LIB=$(LIB_WX_SHARED)
-
-BASELIBPATH=$(WX_ROOT)
-OSSIM_GUI=1
-include $(TOP)/makelib.mak
diff --git a/makefiles/unx/makelibwxogl.unx b/makefiles/unx/makelibwxogl.unx
deleted file mode 100644
index 2e57de1..0000000
--- a/makefiles/unx/makelibwxogl.unx
+++ /dev/null
@@ -1,11 +0,0 @@
-# include Makefile.common found at the root of ossim
-# Makefile.common is generated by the configure
-#
- at INCLUDE_COMMON@
-
-STATIC_LIB=$(LIB_WXOGL_STATIC)
-SHARED_LIB=$(LIB_WXOGL_SHARED)
-
-BASELIBPATH=$(WXOGL_ROOT)
-OSSIM_GUI=1
-include $(TOP)/makelib.mak
diff --git a/makefiles/unx/makeprog b/makefiles/unx/makeprog
deleted file mode 100644
index eb189e9..0000000
--- a/makefiles/unx/makeprog
+++ /dev/null
@@ -1,67 +0,0 @@
-# include Makefile.common found at the root of ossim
-# Makefile.common is generated by the configure
-#
- at INCLUDE_COMMON@
-
-CCSRCS=$(wildcard *.cc)
-CPPSRCS=$(wildcard *.cpp)
-CSRCS=$(wildcard *.c)
-COBJS=$(patsubst %.c,%.o,$(CSRCS))
-CCOBJS=$(patsubst %.cc,%.o,$(CCSRCS))
-CPPOBJS=$(patsubst %.cpp,%.o,$(CPPSRCS))
-OBJS=$(CCOBJS) $(CPPOBJS) $(COBJS) 
-DEPEND_FILES = $(wildcard *.d)
-
-# The binary program extension, if any, including dots (e.g. '.exe')
-PROGRAM_EXT = $(EXEEXT)
-BIN_PROGRAM = $(PROGRAM_PREFIX)$(PROGRAM)$(PROGRAM_EXT)
-
-LIBRARY   = $(LIBTOOL_CORE_LIBS)
-DEPLIBS	  = $(OSSIM_CORE_LIBS:-l%=$(LIB_SRC)/.libs/lib%.a)
-SRCS      = $(CCSRCS) $(CPPSRCS) $(CSRCS)
-INCLUDES  = $(BASE_INCLUDES)
-
-# Pattern rule for objects from .cpp files.
-%.$(OBJEXT): %.cpp
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-
-# Pattern rule for objects from .cc files.
-%.$(OBJEXT): %.cc
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-
-# Pattern rule for object from .c files.
-%.$(OBJEXT): %.c
-	$(CC) $(CFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) -c $< -o $@
-
-%.d: %.cc
-	$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-%.d: %.cpp
-	$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-%.d: %.c
-	$(SHELL) -ec '$(CC) -MM $(CFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(INCLUDES) $< >> $@;'
-
-all:	$(BIN_PROGRAM)
-
-$(BIN_PROGRAM): $(OBJS)
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(LDFLAGS_APP) $(OBJS) $(OSSIM_APP_LINK) -o $@
-	$(INSTALL_PROGRAM) $(BIN_PROGRAM) $(OSSIM_TOP)/bin
-
-depends: 	$(CCSRCS:.cc=.d)\
-		$(CSRCS:.c=.d)\
-		$(CPPSRCS:.cpp=.d)
-
-clean_depends:
-	$(RM_NOPROMPT) *.d
-
-clean:
-	$(RM_CMD) $(BIN_PROGRAM)
-
-
-
-# Only add the depends if they exist
-#
-ifneq ($(DEPENDS_FILES),)
--include $(DEPENDS_FILES)
-endif
diff --git a/makefiles/unx/makeroot b/makefiles/unx/makeroot
deleted file mode 100644
index 85d7385..0000000
--- a/makefiles/unx/makeroot
+++ /dev/null
@@ -1,199 +0,0 @@
-#---
-# $Id: makeroot 12187 2007-12-13 21:14:14Z dburken $
-# unix makeroot
-#---
-include ./Makefile.common
-
-name = ossim
-#bindir = $(prefix)/bin
-#datadir = $(prefix)
-#docdir = $(datadir)/doc
-version = $(OSSIM_VERSION)
-OSSIM_ROOT	=	.
-
-default: 
-	(cd src; $(MAKE))
-	(cd scripts; $(MAKE))
-
-# ---
-# Rule for installing to remote directory (prefix).
-# Do not allow install to workspace!
-# ---
-install: ossim-config-inst
-	if test "$(prefix)" = "$(TOP)"; then \
-		echo "Workspace and install directory the same!"; \
-		echo -n "Use configure option:  "; \
-		echo " --prefix to specify install directory"; \
-		exit 1; \
-	fi
-	if test -f $(INST_BIN)/ossim-uninstall ; then \
-		$(RM) -f $(TOP)/ossim-uninstall ; \
-	fi
-	$(INSTALL) -d $(INST_BIN) $(INST_LIB) $(INST_INC) $(INST_SHARE) \
-	$(INST_DOCS) $(INST_TEMPLATES)
-	echo "#!/bin/sh" > $(INST_BIN)/ossim-uninstall
-	($(INSTALL) COPYING.GPL COPYING.LGPL README.txt $(INST_DOCS))
-	echo "Installing includes to: $(INST_INC)"
-	( cd include/ossim; \
-		for d in `find . -type d` ; do \
-			if [ ! `echo $$d | egrep CVS` ] ; then \
-				$(INSTALL) -d  $(INST_INC)/$$d; \
-			fi ; \
-		done ; \
-		for f in `find . -name "*.h"` ; do \
-			if [ ! `echo $$f | egrep CVS` ] ; then \
-				echo installing $$f ... ; \
-				g=`$(DIRNAME) $$f`; \
-				g=`echo $$g | sed s/'\.\/'//`; \
-				h=$$f; \
-				h=`echo $$h | sed s/'\.\/'//`; \
-				$(INSTALL) -m 664 $$f $(INST_INC)/$$g; \
-				(echo "$(RM) -f $(INST_INC)/$$h" >> \
-				$(INST_BIN)/ossim-uninstall); \
-			fi ; \
-		done ; \
-	)
-	echo "include installation finished..."
-	( cd lib; \
-		for libFile in * ; do \
-			if test -f $$libFile ; then \
-				echo installing $$libFile ... ; \
-	 			cp -d $$libFile $(INST_LIB) ;\
-				(echo "$(RM) -f $(INST_LIB)/$$libFile" \
-			 	>> $(INST_BIN)/ossim-uninstall) ; \
-			fi ; \
-		done ; \
-	)
-	( for bin in bin/* ; do \
-		if test -f $$bin -a -x $$bin ; then \
-			echo installing $$bin ... ; \
-			$(INSTALL_PROGRAM) $$bin $(INST_BIN) ;\
-			(echo "$(RM) -f $(prefix)/$$bin"  \
-			>> $(INST_BIN)/ossim-uninstall) ; \
-		fi ; \
-	done ; \
-	)
-	( for t in etc/templates/* ; do \
-		if test x$$t != "etc/templates/CVS" ; then \
-			echo installing $$t ... ; \
-			$(INSTALL_PROGRAM) $$t $(INST_TEMPLATES) ; \
-			(echo "$(RM) -f $(prefix)/$$t"  \
-			>> $(INST_BIN)/ossim-uninstall) ; \
-		fi ; \
-	done ; \
-	)
-	($(MAKE) ossim-config-inst)
-	($(INSTALL_PROGRAM) src/apps/ossim-config-inst \
-	$(INST_BIN)/ossim-config)
-	echo "$(RM) -f $(INST_BIN)/ossim-config" \
-	>> $(INST_BIN)/ossim-uninstall
-	echo "$(RM) -f $(INST_BIN)/ossim-uninstall" \
-	>> $(INST_BIN)/ossim-uninstall
-	chmod 775 $(INST_BIN)/ossim-uninstall
-
-# ---
-# End of install rule...
-# ---
-
-# ---
-# Rule for uninstalling a remote directory (prefix).
-# Do not allow uninstall to workspace!
-# ---
-uninstall:
-	if test "$(prefix)" = "$(TOP)"; then \
-		echo "Workspace and install directory the same!"; \
-		echo -n "Use configure option:  "; \
-		echo " --prefix to specify install directory"; \
-		exit 1; \
-	fi
-	$(shell $(INST_BIN)/ossim-uninstall)
-
-shared:
-	(cd src; $(MAKE) shared) ;
-
-ossim-config-inst:
-	@rm -f src/apps/ossim-config-inst
-	@echo '#!/bin/sh' > src/apps/ossim-config-inst
-	@echo 'OSSIM_LIBS="$(OSSIM_CONFIG_APP_LINK_INST)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_CFLAGS="$(CFLAGS) $(BASE_DEFINES)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_CPPFLAGS="$(CXXFLAGS) $(BASE_DEFINES)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_PREFIX="$(prefix)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_VERSION="$(OSSIM_VERSION)"' >> src/apps/ossim-config-inst
-	@echo 'OSSIM_INCLUDES="$(BASE_INCLUDES_INST)"' >> src/apps/ossim-config-inst
-	@cat src/apps/ossim-config.in >> src/apps/ossim-config-inst
-	@chmod a+x src/apps/ossim-config-inst
-
-clean:	
-	if test "${RM}" != "" ; then \
-		for d in `find . -name "*.d"` ; do \
-			if ! test -d $$d ; then \
-				${RM} -f $$d ; \
-			fi ; \
-		done ; \
-	fi ;
-	(cd src; $(MAKE) clean) ;
-	(cd lib; $(RM_CMD) libossim* ; )
-	(for d in bin/* ; do \
-	    if test -f $$d; then \
-		$(RM_CMD)  $$d ; \
-	    fi ; \
-	done ; \
-	) ; 
-
-depends: clean_depends
-	(cd src; $(MAKE) depends) ;
-
-clean_depends:
-	(cd src; $(MAKE) clean_depends) ;
-
-configure:	configure.in aclocal.m4
-	aclocal
-	autoconf
-
-all:	default
-
-RPMTOP=${TOP}/../rpmbuild
-CYGWINDIST=${TOP}/../cygwin_ossim
-DISTTOP=${TOP}/..
-
-gzip-dist:
-	cd ${DISTTOP} ; \
-	${RM} -rf ${DISTTOP}/${OSSIM_ARCHIVE} ; \
-	${RM} -rf ${DISTTOP}/${OSSIM_ARCHIVE_TGZ} ; \
-	cp -r ossim ${OSSIM_ARCHIVE} ; \
-	${RM} -f ${OSSIM_ARCHIVE}/lib/* ; \
-	${RM} -f ${OSSIM_ARCHIVE}/bin/* ; \
-	${RM} -rf `find ${DISTTOP}/${OSSIM_ARCHIVE} -name "*.o" -o -name "CVS" -o -name "cvs"` ; \
-	cd ${DISTTOP} ; \
-	tar cvfz $(OSSIM_ARCHIVE_TGZ) ${OSSIM_ARCHIVE} ;
-
-cygwin-dist: gzip-dist
-	@echo "*** Building cygwin-dist ***"
-	${RM} -rf ${CYGWINDIST} ; \
-	${INSTALL} -d ${CYGWINDIST} ; \
-	${INSTALL} -d ${CYGWINDIST}/ossim_install ; \
-	cp -f ${DISTTOP}/${OSSIM_ARCHIVE_TGZ} ${CYGWINDIST} ; \
-	${RM} -f ${DISTTOP}/${OSSIM_ARCHIVE} ; \
-	${RM} -rf ${DISTTOP}/${OSSIM_ARCHIVE}/ossim_install/* ; \
-	cd ${CYGWINDIST} ; \
-	tar -xvzf $(OSSIM_ARCHIVE_TGZ) ; \
-	cd ${CYGWINDIST}/${OSSIM_ARCHIVE} ; \
-	./configure --prefix=${CYGWINDIST}/ossim_install --enable-optimization --disable-debug --with-gdalconf="--with-hdf4=/usr/local"; \
-	make; make install; \
-	if test "${SED}" != "" ; then \
-		${SED}  -e s@$prefix=.*@prefix=/usr/local at g ${CYGWINDIST}/${OSSIM_ARCHIVE}/src/apps/ossim-config > ${INSTALL_BIN}/ossim-config; \
-	fi ; \
-	cd ${CYGWINDIST}/ossim_install ; \
-	tar cvfz ossim-cygwin-${OSSIM_VERSION}.tgz include bin share etc lib;
-
-rpm: gzip-dist
-	@echo "*** Building RPMs ***"
-	${INSTALL} -d  $(RPMTOP) \
-			$(RPMTOP)/SOURCES \
-			$(RPMTOP)/SPECS \
-			$(RPMTOP)/BUILD \
-			$(RPMTOP)/RPMS \
-			$(RPMTOP)/SRPMS ;
-	cp -f ${DISTTOP}/$(OSSIM_ARCHIVE_TGZ) $(RPMTOP)/SOURCES
-	cp -f ${TOP}/ossim.spec $(RPMTOP)/SPECS
-	rpmbuild -ba --define "_topdir ${RPMTOP}" $(RPMTOP)/SPECS/ossim.spec
diff --git a/makefiles/unx/makeroot.unx b/makefiles/unx/makeroot.unx
deleted file mode 100644
index 1351131..0000000
--- a/makefiles/unx/makeroot.unx
+++ /dev/null
@@ -1,142 +0,0 @@
-include ./Makefile.common
-
-name = ossim
-#bindir = $(prefix)/bin
-#datadir = $(prefix)
-#docdir = $(datadir)/doc
-version = $(OSSIM_VERSION)
-OSSIM_ROOT	=	.
-
-default: 
-	(cd src; $(MAKE))
-	(cd scripts; $(MAKE))
-
-
-install:
-	($(RM) -f $(TOP)/ossim-uninstall)
-	($(INSTALL) -d \
-		$(INST_BIN) \
-		$(INST_LIB) \
-		$(INST_LIB)/ossim \
-		$(INST_SHARE)\
-		$(INST_DOCS) \
-		$(INST_TEMPLATES)\
-		$(INST_INC) \
-		$(INST_INC)/gui \
-		$(INST_INC)/ogl)
-#	if test "${SED}" != "" ; then \
-#		${SED} -e s@${TOP}/src/packages/package_install@${prefix}@g ${TOP}/src/apps/ossim-config > ${prefix}/bin/ossim-config ; \
-#		if test "${CHMOD}" != "" ; then \
-#			${CHMOD} 755 ${prefix}/bin/ossim-config ; \
-#		fi ; \
-#	fi ;
-	($(INSTALL) COPYING.GPL COPYING.LGPL README.txt $(INST_DOCS))
-	(cd src; $(MAKE) install)
-	$(INSTALL) src/ossim_core/ossimConfig.h $(INST_INC)/ossimConfig.h
-	( cd lib; \
-	  for libFile in * ; do \
-		if test -f $$libFile ; then \
-			echo installing $$libFile ... ; \
-		 	cp -d $$libFile $(INST_LIB) ;\
-		fi ; \
-	  done ; \
-	)
-	( for bin in bin/* ; do \
-		if test -f $$bin -a -x $$bin ; then \
-			echo installing $$bin ... ; \
-			$(INSTALL_PROGRAM) $$bin $(INST_BIN) ;\
-			(echo "$(RM) -f $(prefix)/$$bin"  >> $(TOP)/ossim-uninstall) ; \
-		fi ; \
-	  done ; \
-	)
-	( for t in etc/templates/* ; do \
-		if test x$$t != "etc/templates/CVS" ; then \
-			echo installing $$t ... ; \
-			install $$t $(INST_TEMPLATES) ; \
-		fi ; \
-	  done ; \
-	)
-	echo "$(RM) -rf $(prefix)/include/ossim"  >> $(TOP)/ossim-uninstall ;
-	echo "$(RM) -rf $(prefix)/etc/ossim"  >> $(TOP)/ossim-uninstall ;
-	echo "$(RM) -rf $(prefix)/share/ossim*"  >> $(TOP)/ossim-uninstall ;
-	echo "$(RM) -rf $(prefix)/share/doc/ossim*"  >> $(TOP)/ossim-uninstall ;
-	echo "$(RM) -f $(INST_BIN)/ossim-uninstall"  >> $(TOP)/ossim-uninstall ;
-	$(INSTALL_PROGRAM) $(TOP)/ossim-uninstall $(INST_BIN) ;
-
-shared:
-	(cd src; $(MAKE) shared) ;
-
-clean:	
-	if test "${RM}" != "" ; then \
-		for d in `find . -name "*.d"` ; do \
-			if ! test -d $$d ; then \
-				${RM} -f $$d ; \
-			fi ; \
-		done ; \
-	fi ;
-	(cd src; $(MAKE) clean) ;
-	(cd lib; $(RM_CMD) *ossim* ; )
-	(for d in bin/* ; do \
-	    if test -f $$d; then \
-		$(RM_CMD)  $$d ; \
-	    fi ; \
-	done ; \
-	) ; 
-
-depends: clean_depends
-	(cd src; $(MAKE) depends) ;
-
-clean_depends:
-	(cd src; $(MAKE) clean_depends) ;
-
-configure:	configure.in aclocal.m4
-	aclocal
-	autoconf
-
-all:	default
-
-RPMTOP=${TOP}/../rpmbuild
-CYGWINDIST=${TOP}/../cygwin_ossim
-DISTTOP=${TOP}/..
-
-gzip-dist:
-	cd ${DISTTOP} ; \
-	${RM} -rf ${DISTTOP}/${OSSIM_ARCHIVE} ; \
-	${RM} -rf ${DISTTOP}/${OSSIM_ARCHIVE_TGZ} ; \
-	cp -r ossim ${OSSIM_ARCHIVE} ; \
-	${RM} -f ${OSSIM_ARCHIVE}/lib/* ; \
-	${RM} -f ${OSSIM_ARCHIVE}/bin/* ; \
-	${RM} -rf `find ${DISTTOP}/${OSSIM_ARCHIVE} -name "*.o" -o -name "CVS" -o -name "cvs"` ; \
-	cd ${DISTTOP} ; \
-	tar cvfz $(OSSIM_ARCHIVE_TGZ) ${OSSIM_ARCHIVE} ;
-
-cygwin-dist: gzip-dist
-	@echo "*** Building cygwin-dist ***"
-	${RM} -rf ${CYGWINDIST} ; \
-	${INSTALL} -d ${CYGWINDIST} ; \
-	${INSTALL} -d ${CYGWINDIST}/ossim_install ; \
-	cp -f ${DISTTOP}/${OSSIM_ARCHIVE_TGZ} ${CYGWINDIST} ; \
-	${RM} -f ${DISTTOP}/${OSSIM_ARCHIVE} ; \
-	${RM} -rf ${DISTTOP}/${OSSIM_ARCHIVE}/ossim_install/* ; \
-	cd ${CYGWINDIST} ; \
-	tar -xvzf $(OSSIM_ARCHIVE_TGZ) ; \
-	cd ${CYGWINDIST}/${OSSIM_ARCHIVE} ; \
-	./configure --prefix=${CYGWINDIST}/ossim_install --enable-optimization --disable-debug --with-gdalconf="--with-hdf4=/usr/local"; \
-	$(MAKE); $(MAKE) install; \
-	if test "${SED}" != "" ; then \
-		${SED}  -e s@$prefix=.*@prefix=/usr/local at g ${CYGWINDIST}/${OSSIM_ARCHIVE}/src/apps/ossim-config > ${INSTALL_BIN}/ossim-config; \
-	fi ; \
-	cd ${CYGWINDIST}/ossim_install ; \
-	tar cvfz ossim-cygwin-${OSSIM_VERSION}.tgz include bin share etc lib;
-
-rpm: gzip-dist
-	@echo "*** Building RPMs ***"
-	${INSTALL} -d  $(RPMTOP) \
-			$(RPMTOP)/SOURCES \
-			$(RPMTOP)/SPECS \
-			$(RPMTOP)/BUILD \
-			$(RPMTOP)/RPMS \
-			$(RPMTOP)/SRPMS ;
-	cp -f ${DISTTOP}/$(OSSIM_ARCHIVE_TGZ) $(RPMTOP)/SOURCES
-	cp -f ${TOP}/ossim.spec $(RPMTOP)/SPECS
-	rpmbuild -ba --define "_topdir ${RPMTOP}" $(RPMTOP)/SPECS/ossim.spec
diff --git a/makefiles/unx/makesrc.unx b/makefiles/unx/makesrc.unx
deleted file mode 100644
index 62d85e5..0000000
--- a/makefiles/unx/makesrc.unx
+++ /dev/null
@@ -1,51 +0,0 @@
- at INCLUDE_COMMON@
-
-all: apps
-
-apps: libs
-	(cd apps; $(MAKE) all; )
-
-ifeq (${WX_SETTING}, 1)
-
-libs:
-	(cd ossim; $(MAKE) all) ; 
-
-depends:
-	(cd ossim; $(MAKE) depends) ;
-	(cd apps; $(MAKE) depends) ;
-
-shared: libs
-	(cd ossim; $(MAKE) shared) ;
-
-else
-
-libs:
-	(cd ossim; $(MAKE) all ) ;
-
-
-depends:
-	(cd ossim; $(MAKE) depends) ;
-	(cd apps; $(MAKE) depends) ;
-
-shared: libs
-	(cd ossim; $(MAKE) shared) ;
-
-endif
-
-clean:	
-	(cd ossim; $(MAKE) clean) ;
-	(cd apps; $(MAKE) clean) ;
-
-clean_depends:
-	(cd ossim; $(MAKE) clean_depends) ;
-	(cd apps; $(MAKE) clean_depends) ;
-
-
-install:
-	(cd ossim;  $(MAKE) install) ; \
-	if [ "$(WX_SETTING)" = "1" ] ; then \
-	   for f in `find ./gui -name "*.h"` ; do \
-		$(INSTALL) -d  $(INST_INC)/`$(DIRNAME) $$f` ; \
-		$(INSTALL) $$f $(INST_INC)/`$(DIRNAME) $$f` ; \
-	   done ; \
-	fi ;
diff --git a/nmake.opt b/nmake.opt
deleted file mode 100644
index ec5de88..0000000
--- a/nmake.opt
+++ /dev/null
@@ -1,212 +0,0 @@
-####
-# $Id: nmake.opt 18179 2010-09-29 18:09:47Z oscarkramer $
-#
-# Typical build with .net compiler using nmake:
-#
-# Edit this file as required.
-# cd to the top of ossim
-# nmake /f makefile.vc
-#
-# NOTE:  
-#
-# You should either set the environment variable "OSSIM_HOME" or uncomment and
-# set it in this file for include paths and linking.  Since external packages
-# such as ossim_qt looks for the environment variable, it is preferable to set
-# the environment variable to setting it in this file.
-#
-# See:  "Start->Control Panel->System->Advanced->Environment Variables" (XP)
-#       to set the environment variables.
-#####
-
-###
-# EMBED_MANIFEST:
-# For vs7 (Visual C++ 2003) set to empty string.
-# For vs8 (Visual C++ 2005) and vs9(Visual C++ 2008) set to 1.
-###
-EMBED_MANIFEST=1
- 
-OSSIM_DEV_HOME  = C:\Dev\osgeo\trunk
-OSSIM_HOME 	= $(OSSIM_DEV_HOME)\ossim
-CORE_DIR 	= $(OSSIM_HOME)\src\ossim
-BINDIR 		= $(OSSIM_HOME)\bin
-BIN_DIR 	= $(OSSIM_HOME)\bin
-
-###
-# 3rd party stuff:
-###
-3RD_PARTY_HOME = D:\vs9\3rd-party
-3RD_PARTY_INC = -I$(3RD_PARTY_HOME)\include
-
-###
-# Library directories.
-###
-LIBDIR               	= $(OSSIM_HOME)\lib
-LIB_DIR              	= $(OSSIM_HOME)\lib
-LIB_BASE_DIR         	= $(CORE_DIR)\base
-LIB_ELEVATION_DIR    	= $(CORE_DIR)\elevation
-LIB_FONT_DIR         	= $(CORE_DIR)\font
-LIB_IMAGING_DIR      	= $(CORE_DIR)\imaging
-LIB_INIT_DIR      	= $(CORE_DIR)\init
-LIB_KBOOL_DIR     	= $(CORE_DIR)\kbool
-LIB_MATRIX_DIR       	= $(CORE_DIR)\matrix
-LIB_PARALLEL_DIR     	= $(CORE_DIR)\parallel
-LIB_PLUGIN_DIR       	= $(CORE_DIR)\plugin
-LIB_PROJECTION_DIR   	= $(CORE_DIR)\projection
-LIB_SUPPORT_DATA_DIR 	= $(CORE_DIR)\support_data
-LIB_VEC_DIR          	= $(CORE_DIR)\vec
-LIB_VPF_DIR          	= $(CORE_DIR)\vpfutil
-
-###
-# OSSIM libraries
-###
-BASE_LIB 		= ossim_base.lib
-ELEVATION_LIB 		= ossim_elevation.lib
-FONT_LIB 		= ossim_font.lib
-IMAGING_LIB 		= ossim_imaging.lib
-INIT_LIB		= ossim_init.lib
-KBOOL_LIB 		= ossim_kbool.lib
-MATRIX_LIB 		= ossim_matrix.lib
-PARALLEL_LIB 		= ossim_parallel.lib
-PLUGIN_LIB		= ossim_plugin.lib
-PROJECTION_LIB 		= ossim_projection.lib
-SUPPORT_DATA_LIB	= ossim_support_data.lib
-VEC_LIB 		= ossim_vec.lib
-VPF_LIB 		= ossim_vpf.lib
-OSSIM_LIB               = ossim.lib
-
-
-###
-# Convenience link lines in the correct link order.
-###
-LINK_MATRIX 		= $(MATRIX_LIB)
-LINK_KBOOL 		= $(KBOOL_LIB) $(LINK_MATRIX)
-LINK_BASE 		= $(BASE_LIB) $(LINK_POLYCLIP)
-LINK_FONT 		= $(FONT_LIB) $(LINK_BASE)
-LINK_VPF 		= $(VPF_LIB) $(LINK_FONT)
-LINK_VEC 		= $(VEC_LIB) $(LINK_VPF)
-LINK_SUPPORT_DATA 	= $(SUPPORT_DATA_LIB) $(LINK_VEC)
-LINK_ELEVATION 		= $(ELEVATION_LIB) $(LINK_SUPPORT_DATA)
-LINK_PROJECTION 	= $(PROJECTION_LIB) $(LINK_ELEVATION)
-LINK_IMAGING 		= $(IMAGING_LIB) $(LINK_PROJECTION)
-LINK_PARALLEL 		= $(PARALLEL_LIB) $(LINK_IMAGING)
-LINK_PLUGIN             = $(PLUGIN_LIB) $(LINK_PARALLEL)
-LINK_INIT		= $(INIT_LIB) $(LINK_PLUGIN)
-LINK_OSSIM		= $(LINK_INIT)
-
-###
-# JPEG support.  This can be from gdal or external but one or the other is
-# mandatory.
-###
-JPEG_DIR = $(3RD_PARTY_HOME)
-JPEG_INC =
-JPEG_LIB = $(JPEG_DIR)\lib\libjpeg.lib
-
-###
-# TIFF support.
-###
-TIFF_DIR = $(3RD_PARTY_HOME)
-TIFF_INC =
-TIFF_LIB = $(TIFF_DIR)\lib\libtiff_i.lib
-
-###
-# geotiff support.
-###
-GEOTIFF_DEFINE =
-GEOTIFF_DIR = $(3RD_PARTY_HOME)
-GEOTIFF_INC =
-GEOTIFF_LIB = $(GEOTIFF_DIR)\lib\geotiff_i.lib
-
-###
-# Optional freetype support.
-###
-FREETYPE_DEFINE =/DFREETYPE_SETTING=1
-FREETYPE_DIR = $(3RD_PARTY_HOME)
-FREETYPE_INC = -I$(FREETYPE_DIR)\include\freetype2
-FREETYPE_LIB = $(FREETYPE_DIR)\lib\freetype.lib
-# FREETYPE_DEFINE =
-# FREETYPE_DIR =
-# FREETYPE_INC =
-# FREETYPE_LIB =
-
-###
-# openthreads support.
-###
-OPENTHREADS_DEFINE =
-OPENTHREADS_DIR = $(3RD_PARTY_HOME)
-OPENTHREADS_INC = -I$(OPENTHREADS_DIR)\include
-OPENTHREADS_LIB = $(OPENTHREADS_DIR)\lib\OpenThreads.lib
-
-ZLIB_INC =
-ZLIB_LIB = $(3RD_PARTY_HOME)\lib\zdll.lib
-
-INC = -I$(OSSIM_HOME)\include $(3RD_PARTY_INC) $(FWTOOLS_INC) $(OPENTHREADS_INC) $(GEOTIFF_INC) $(TIFF_INC) $(JPEG_INC) $(FREETYPE_INC) $(ZLIB_INC)
-
-###
-# Uncomment the first for an optimized build or the second for a debug build.
-###
-OPTIONAL_DEFINES = /W3 /DWIN32 /DNDEBUG /D_WINDOWS /DNOMINMAX /DMPI_SETTING=0 $(OPENTHREADS_DEFINE) $(GEOTIFF_DEFINE) $(FREETYPE_DEFINE)
-
-CDEBUGFLAGS     	=	/Ox
-OPTFLAGS		=	/nologo /MD /EHsc $(CDEBUGFLAGS) $(OPTIONAL_DEFINES) /D_CRT_SECURE_NO_WARNINGS
-OBJ_OPT_FLAGS		=	$(OPTFLAGS) /DOSSIMMAKINGDLL
-SHARED_APP_OPT_FLAGS	=	$(OPTFLAGS) /DOSSIMUSINGDLL
-STATIC_APP_OPT_FLAGS	=	$(OPTFLAGS)
-
-MAKE			=	nmake
-CC			=	cl
-
-###
-# External stuff ossim links with.
-###
-LINK_EXTERNALS = $(GEOTIFF_LIB) $(TIFF_LIB) $(JPEG_LIB) $(FREETYPE_LIB) $(OPENTHREADS_LIB) $(ZLIB_LIB)
-
-###
-# Link line for making single ossim library.
-###
-# OSSIM_LIB_LINK = /NODEFAULTLIB:LIBCMTD $(LINK_EXTERNALS)
-OSSIM_LIB_LINK = $(LINK_EXTERNALS)
-
-###
-# Static link line for apps.
-###
-STATIC_OSSIM_LINK = /link /LIBPATH:$(LIB_DIR) $(LINK_OSSIM) $(GEOTIFF_LIB) $(TIFF_LIB) $(JPEG_LIB) $(FREETYPE_LIB) $(OPENTHREADS_LIB)
-
-###
-# Shared link.
-###
-SHARED_OSSIM_LINK = $(LIB_DIR)\ossim.lib 
-
-###
-# Use this to link apps static or shared.
-###
-# OSSIM_LINK 	=	$(STATIC_OSSIM_LINK)
-# APP_CFLAGS	=	$(STATIC_APP_OPT_FLAGS) $(INC) $(EXTRAFLAGS)
-OSSIM_LINK 	= 	$(SHARED_OSSIM_LINK)
-APP_CFLAGS	=	$(SHARED_APP_OPT_FLAGS) $(INC) $(EXTRAFLAGS)
-
-###
-# CFLAGS usually left alone.
-###
-CFLAGS		=	$(OBJ_OPT_FLAGS) $(INC) $(EXTRAFLAGS)
-
-####
-# Some rules...  These are what the ossim_core is built with by default.
-###
-.c.obj:	
-	$(CC) $(CFLAGS) /c $*.c
-
-.cpp.obj:	
-	$(CC) $(CFLAGS) /c $*.cpp
-
-###
-# Some commands:
-###
-MKDIR = -mkdir
-RMDIR = rmdir /S /Q
-RM    = del /F /Q
-CP    = copy
-
-###
-# Version:
-###
-VERSION_STRING=1.8.4
diff --git a/ospr.spec b/ospr.spec
deleted file mode 100644
index 1f2fda6..0000000
--- a/ospr.spec
+++ /dev/null
@@ -1,51 +0,0 @@
-# $Id: ospr.spec 423 2001-06-28 15:12:09Z gpotts $
-# $crtd: by Kenneth Melero on 062501 $
-
-%define withgrass no
-
-# Preamble
-Summary: Open Source Prototype Tools (OSPR)
-Name: ospr
-Version: 0.1.0
-Release: 1
-Copyright: GPL LGPL
-Group: Applications/Image
-Source: ftp://ftp.remotesensing.org/pub/ossim/%{name}-%{version}.tgz
-URL: http://www.remotesensing.org/ossim/
-Distribution: na
-Vendor: imagelinks.com
-Packager: Kenneth Melero <kmelero at remotesensing.org>
-BuildRoot: %{_tmppath}/%{name}-%{version}
-
-%description
-OSPR is based on the OSSIM (Open Source Software Image Map) library.  Pronounced "awesome", the OSSIM project leverages existing open source algorithms, tools, and packages to construct an integrated library for remote sensing, image-processing, and Geographical Information Sciences (GIS) analysis.
-
-%prep
-%setup
-rm -r `find . -name CVS -print`
-
-%build
-./configure \
-    --prefix=%{_prefix} \
-    --with-grass=%{withgrass} \
-    --without-python
-make
-
-%install
-make \
-  version=%{version} \
-  prefix=$RPM_BUILD_ROOT%{_prefix} \
-  sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} \
-  docdir=$RPM_BUILD_ROOT%{_defaultdocdir} \
-  install
-
-%changelog
-* Mon Jun 06 2001  Kenneth Melero <kmelero at remotesensing.org>
--Initial packaging.
--Contains icp, mosaic
-
-%files
-%defattr(-,root,root)
-%{_bindir}/icp
-%{_bindir}/mosaic
-%{_bindir}/img2rr
diff --git a/ossim.spec.in b/ossim.spec.in
deleted file mode 100644
index d9b0b06..0000000
--- a/ossim.spec.in
+++ /dev/null
@@ -1,131 +0,0 @@
-%define pref /usr
-%define ver @OSSIM_MAJOR_VERSION_NUMBER at .@OSSIM_MINOR_VERSION_NUMBER at .@OSSIM_RELEASE_NUMBER@
-%define ver2 @OSSIM_MAJOR_VERSION_NUMBER at .@OSSIM_MINOR_VERSION_NUMBER@
-%define rel @OSSIM_MAJOR_VERSION_NUMBER@
-%define name ossim
-# Preamble
-Summary: Open Source Software Image Map
-Name: ossim
-Version: %{ver}
-Release: %{rel}
-Copyright: GPL LGPL
-Group: Applications/Image
-Source: %{name}-%{ver}.tgz
-URL: http://www.ossim.org
-Distribution: na
-Vendor: imagelinks.com
-Packager: Garrett Potts <gpotts at remotesensing.org>
-BuildRoot: %{_tmppath}/%{name}-%{ver}-buildroot
-
-%description
-Pronounced "awesome", the OSSIM project leverages existing open 
-source algorithms, tools, and packages to construct an integrated 
-library for remote sensing, image-processing, and Geographical 
-Information Sciences (GIS) analysis.
-
-
-%package devel
-Summary: OSSIM libraries
-Group: Development/Libraries
-Requires: ossim = %{ver}
-
-%description devel
-Headers and templates for OSSIM
-
-%prep
-%setup
-
-%build
-./configure \
-    --prefix=%{pref} \
-    --disable-appstatic\
-    --disable-debug \
-    --enable-optimization
-make
-
-%install
-make \
-  version=%{version} \
-  prefix=$RPM_BUILD_ROOT%{pref} \
-  sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} \
-  docdir=$RPM_BUILD_ROOT%{_defaultdocdir} \
-  install
-
-%post
-/sbin/ldconfig
-
-%postun
-/sbin/ldconfig
-
-%preun devel
-# Remove ossim-config if it points to this package
-if test -f %{_bindir}/ossim-config -a -f /usr/bin/md5sum ; then
-  SUM2=`md5sum %{_bindir}/ossim-config | cut -c 0-32`
-  if test "x$SUM1" = "x$SUM2" ; then
-    rm -f %{_bindir}/ossim-config
-  fi
-fi
-
-%changelog
-* Mon Jan 28 2002  Kenneth Melero <kmelero at remotesensing.org>
--New Visual Chain Editor, redo of RPM, several minor bug fixes
-* Thu Jan 03 2002  Kenneth Melero <kmelero at remotesensing.org>
--Redesign of connectable object pipeline, Save State updates,
- getTile updates, progress interfaces, added New Tile Caching schemes, 
- MPI updates, several minor bug fixes
-* Mon Oct 29 2001  Kenneth Melero <kmelero at remotesensing.org>
--Upgraded Geotrans, Fixed CIB/CADRG/ADRG support, Display remapper
-support for 11/16-bit, new configuration options, MacOS Carbon support,
-igen fixes, new discrete convolutions, NaN support, several minor bug fixes
-* Mon Sep 17 2001  Kenneth Melero <kmelero at remotesensing.org>
--Libtiff Memory leak fix, CCF Head fix, MySQL support, Shapefile
- support, dbossim-stager app, several minor bug fixes
-* Wed Sep 12 2001  Kenneth Melero <kmelero at remotesensing.org>
--Elevation Intersection and autoload DTED/DEM support, Bug fixes for
- sensor modeling, RecceVue with sensor model support, CIB/CADRG
- splitter application, IGEN (Image Generator) application,
- MPI support for IGEN, Full reading/writing GeoTIFF support,
- several minor bug fixes
-* Thu Aug 30 2001  Kenneth Melero <kmelero at remotesensing.org>
--OSSIM Sensor Modeling, RecceVue, Histogram manipulation,
- Elevation support, Minor bug fixes
-* Mon Jul 16 2001  Kenneth Melero <kmelero at remotesensing.org>
--First official release.
-* Sun Mar 04 2001  Derald Metzger <dmetz at remotesensing.org>
--UPDATE pkg to 0.999.8-1.  New rpm snapshot.
-  Compiles under both redhat-6.2 and 7.0.
-  Rpm builds by default withgrass=no but will build with it.
-  Did not test python.
-* Wed Feb 08 2001  Derald Metzger <dmetz at remotesensing.org>
--UPDATE pkg to 0.999.7-1
-  The ossim dir tree has been extensively reconfigured.
-* Thu Dec 28 2000  Derald Metzger <dmetz at remotesensing.org>
--UPDATE pkg to 0.999.3-1
-  The 0.999 is meant to imply preliminary code (alpha or beta).
-  The .3-1 is the 3rd preliminary version and first rpm release of it. 
-- Remove $BR build root stuff from Makefile. Use make var defs on cmdline.
-- Macroized and updated the files manifest
-- Added config dir etc/ossim
-- Added doc dir
-- Removed lib/ossim - linking statically
-* Thu Aug 31 2000  Derald Metzger <dmetz at remotesensing.org>
--pkg 0.2.0a-2  Rebuild with wxGTK-2.2.1-0.
-* Sat Aug 26 2000  Derald Metzger <dmetz at remotesensing.org>
--pkg 0.2.0a-1  Snapshot of current alpha code
-* Thu May 23 2000  Derald Metzger <dmetz at remotesensing.org>
--PACKGED 0.0.0-1
-- rpm'd ossim. Started version at 0.0.0
-
-%files
-%defattr(-,root,root)
-%doc %{_docdir}/%{name}-%{version}/
-%{_bindir}/*
-%{pref}/etc/ossim/templates/*
-%{pref}/man/*
-%{_libdir}/lib*
-%{pref}/share
-
-%files devel
-%defattr(-,root,root)
-%{_includedir}
-%{_libdir}/*
diff --git a/ossim/CMakeLists.txt b/ossim/CMakeLists.txt
new file mode 100644
index 0000000..6ffb7e7
--- /dev/null
+++ b/ossim/CMakeLists.txt
@@ -0,0 +1,277 @@
+PROJECT(ossimcore)
+Message("################## Setting up OSSIM core library #########################")
+
+IF(NOT OSSIM_BUILD_ADDITIONAL_OSSIM_DIRECTORIES)
+   SET(OSSIM_BUILD_ADDITIONAL_OSSIM_DIRECTORIES "" CACHE PATH "Specify full paths separated by ; to additional OSSIM applications you wish to include into the ossim build framework.  These will have variables setup for the ossim includes" FORCE)
+ENDIF(NOT OSSIM_BUILD_ADDITIONAL_OSSIM_DIRECTORIES)
+
+IF(NOT APPLE)
+  cmake_minimum_required(VERSION 2.6)
+ELSE(NOT APPLE)
+  cmake_minimum_required(VERSION 2.8)
+ENDIF(NOT APPLE)
+
+SET(CMAKE_MODULE_PATH "${${PROJECT_NAME}_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
+
+INCLUDE(OssimVersion)
+INCLUDE(OssimCommonVariables)
+
+# Expose some build options
+OPTION(BUILD_OSSIM_FREETYPE_SUPPORT "Set to ON to build OSSIM with freetype support.  Use OFF to turn off freetype support." ON)
+
+OPTION(BUILD_OSSIM_MPI_SUPPORT "Set to ON to build OSSIM with MPI support.  Use OFF to turn off MPI support." ON)
+
+OPTION(BUILD_OSSIM_ID_SUPPORT "Set to ON to build OSSIM SVN ID support into the library.  Use OFF to turn off ID support." ON)
+
+OPTION(BUILD_OSSIM_APPS "Set to ON to build ossim apps.  Use OFF to disable." ON)
+OPTION(BUILD_OSSIM_CURL_APPS "Set to ON to build ossim curl dependent apps.  Use ON to enable." OFF)
+OPTION(BUILD_OSSIM_TEST_APPS "Set to ON to build ossim test apps.  Use OFF to disable." ON)
+
+OPTION(BUILD_OSSIM_APPS "Set to ON to build ossim test apps.  Use OFF to disable." ON)
+
+
+###################################################################################
+# Include the Utilities in the root make
+###################################################################################
+INCLUDE(OssimUtilities)
+
+INCLUDE(CheckIncludeFile)
+CHECK_INCLUDE_FILE("dirent.h" CMAKE_HAVE_DIRENT_H)
+CHECK_INCLUDE_FILE("unistd.h" CMAKE_HAVE_UNISTD_H)
+CHECK_INCLUDE_FILE("getopt.h" CMAKE_HAVE_GETOPT_H)
+CHECK_INCLUDE_FILE("fcntl.h" CMAKE_HAVE_FCNTL_H)
+CHECK_INCLUDE_FILE("dbmalloc.h" CMAKE_HAVE_DBMALLOC_H)
+CHECK_INCLUDE_FILE("malloc.h" CMAKE_HAVE_MALLOC_H)
+CHECK_INCLUDE_FILE("dlfcn.h" CMAKE_HAVE_DLFCN_H)
+
+# Set our include paths:
+include_directories( ${PROJECT_SOURCE_DIR}/include )
+include_directories( ${PROJECT_BINARY_DIR}/include )
+
+# Stores list of libs to link with. Initialized throughout.
+set( ossimDependentLibs )
+
+#---
+# Find required and optional packages and add their include paths and libraries:
+#---
+
+# GEOS - Currently optional until it is actually called.:
+find_package( GEOS )
+if( GEOS_FOUND )
+   include_directories( ${GEOS_INCLUDE_DIR} )
+   set( ossimDependentLibs ${ossimDependentLibs} ${GEOS_LIBRARY} )
+else( GEOS_FOUND )
+   message( FATAL_ERROR "Could not find geos package! Consider installing this as it will soon become a required package." )
+endif( GEOS_FOUND )
+
+# GEOFIFF - Required:
+set( OSSIM_HAS_GEOTIFF 0 )
+find_package( GEOTIFF )
+if( GEOTIFF_FOUND )
+   include_directories( ${GEOTIFF_INCLUDE_DIR} )
+   set( ossimDependentLibs ${ossimDependentLibs} ${GEOTIFF_LIBRARY} )
+   set( OSSIM_HAS_GEOTIFF 1 )
+else( GEOTIFF_FOUND )
+   message( FATAL_ERROR "Could not find required geotiff package!" )
+endif( GEOTIFF_FOUND )
+
+# GEOTRANS - Required: (GeoTrans 3.4.x port future...)
+# find_package( Geotrans )
+# if( GEOTRANS_FOUND )
+#   include_directories( ${GEOTRANS_INCLUDE_DIR} )
+#   set( ossimDependentLibs ${ossimDependentLibs} ${GEOTRANS_LIBRARY} )
+# else( GEOTRANS_FOUND )
+#   message( FATAL_ERROR "Could not find required geotrans package!" )
+# endif( GEOTRANS_FOUND )
+
+# JPEG - Required package:
+find_package( JPEG )
+if( JPEG_FOUND )
+   include_directories( ${JPEG_INCLUDE_DIR} )
+   set( ossimDependentLibs ${ossimDependentLibs} ${JPEG_LIBRARY} )
+else( JPEG_FOUND )
+   message( FATAL_ERROR "Could not find required jpeg package!" )
+endif( JPEG_FOUND )
+
+# OpenThreads - Required:
+find_package( OpenThreads )
+if( OPENTHREADS_FOUND )
+   include_directories( ${OPENTHREADS_INCLUDE_DIR} )
+   set( ossimDependentLibs ${ossimDependentLibs} ${OPENTHREADS_LIBRARY} )
+else( OPENTHREADS_FOUND )
+   message( FATAL_ERROR "Could not find required OpenThreads package!" )
+endif( OPENTHREADS_FOUND )
+
+# TIFF - Required:
+find_package( TIFF )
+if( TIFF_FOUND )
+   include_directories( ${TIFF_INCLUDE_DIR} )
+   set( ossimDependentLibs ${ossimDependentLibs} ${TIFF_LIBRARY} )
+else( TIFF_FOUND )
+   message( FATAL_ERROR "Could not find required tiff package!" )
+endif( TIFF_FOUND )
+
+# DL - Required on unix:
+if( UNIX )
+   find_library( DL_LIBRARY dl )
+   if ( DL_LIBRARY )
+      set( ossimDependentLibs ${ossimDependentLibs} ${DL_LIBRARY} )
+   else( DL_LIBRARY )
+      # TODO:  Is this required on unix?  If so move to the required section.
+      message( FATAL_ERROR "Could not find dl library!" )
+   endif( DL_LIBRARY )
+endif( UNIX )
+
+# FREETYPE - Optional:
+set( OSSIM_HAS_FREETYPE 0 )
+if( BUILD_OSSIM_FREETYPE_SUPPORT )
+   find_package(Freetype)
+   if( FREETYPE_FOUND )
+      include_directories( ${FREETYPE_INCLUDE_DIRS} )
+      set( ossimDependentLibs ${ossimDependentLibs} ${FREETYPE_LIBRARIES} )
+      set( OSSIM_HAS_FREETYPE 1 )
+   else( FREETYPE_FOUND )
+      message( WARNING "Could not find optional freetype package!" )
+   endif( FREETYPE_FOUND )
+endif( BUILD_OSSIM_FREETYPE_SUPPORT )
+
+# MPI - Optional:
+set( OSSIM_HAS_MPI 0 )
+if( BUILD_OSSIM_MPI_SUPPORT )
+   find_package(MPI)
+   if ( MPI_FOUND )
+      include_directories( ${MPI_INCLUDE_DIR} )
+      set( ossimDependentLibs ${ossimDependentLibs} ${MPI_LIBRARY} )
+      set( OSSIM_HAS_MPI 1 )
+   else ( MPI_FOUND )
+      message( WARNING "Could not find optional MPI package!" )
+   endif ( MPI_FOUND )
+endif( BUILD_OSSIM_MPI_SUPPORT )
+
+# ZLIB - Optional:
+set( OSSIM_HAS_LIBZ 0 )
+find_package( ZLIB )
+if ( ZLIB_FOUND )
+   include_directories( ${ZLIB_INCLUDE_DIR} )
+   set( ossimDependentLibs ${ossimDependentLibs} ${ZLIB_LIBRARY} )
+   set( OSSIM_HAS_LIBZ 1 )
+else ( ZLIB_FOUND )
+   message( WARNING "Could not find optional zlib package!" )
+endif ( ZLIB_FOUND )
+
+#---
+# Call the OSSIM macros in OssimUtilities.cmake
+#---
+TODAYS_DATE(OSSIM_BUILD_DATE)
+SET(OSSIM_SVN_REVISION_NUMBER "UNKNOWN")
+GET_SVN_REVISION()
+if ( NOT ${Project_WC_REVISION} EQUAL 0 )
+   set( OSSIM_SVN_REVISION_NUMBER ${Project_WC_REVISION} )
+endif()
+
+#####################################################################################
+# Call the configure files for ossimConfig and ossimVersion setup
+#####################################################################################
+set(OSSIM_VERSION_NUMBER "\"${OSSIM_VERSION}\"")
+set(OSSIM_BUILD_DATE "\"${OSSIM_BUILD_DATE}\"")
+set(OSSIM_REVISION_NUMBER "\"${OSSIM_SVN_REVISION_NUMBER}\"")
+
+# Setting of OSSIM_ID to variable expanded $Id$ results.  Embedded troughout code.
+set(OSSIM_ID_ENABLED   1)
+IF(NOT BUILD_OSSIM_ID_SUPPORT)
+   set(OSSIM_ID_ENABLED 0)
+ENDIF(NOT BUILD_OSSIM_ID_SUPPORT)
+
+SET(OSSIM_CONFIGURE_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/include/ossim/ossimConfig.h")
+CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/src/ossim/ossimConfig.h.in"
+	       "${OSSIM_CONFIGURE_HEADER}")
+SET(OSSIM_VERSION_HEADER_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/src/ossim/ossimVersion.h.in")
+SET(OSSIM_VERSION_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/include/ossim/ossimVersion.h")
+CONFIGURE_FILE("${OSSIM_VERSION_HEADER_CONFIG}"
+               "${OSSIM_VERSION_HEADER}")
+
+
+##################################################################################################
+# Instead of creating another CMakeLists under src we will just add the subdirectories to build
+# here
+##################################################################################################
+subdirs(src/ossim)
+
+#---
+# Building apps optional.
+#---
+if(BUILD_OSSIM_APPS)
+  subdirs(src/apps)
+endif()
+
+#---
+# Building curl dependant apps optional. default=OFF
+#---
+if(BUILD_OSSIM_CURL_APPS)
+  subdirs(src/apps/curl_apps)
+endif()
+
+#---
+# Building test apps optional.
+#---
+if(BUILD_OSSIM_TEST_APPS)
+  subdirs(src/test)
+endif()
+
+set(TARGET_COMMON_LIBRARIES ossim ${OPENTHREADS_LIBRARY})
+
+##################################################################################################
+#
+# Setup install destinations for the shared files:
+# 1) Projection CSV files:
+#
+##################################################################################################
+FILE(GLOB ossim_projection_codes_csv ${${PROJECT_NAME}_SOURCE_DIR}/share/ossim/projection/*.csv ${${PROJECT_NAME}_SOURCE_DIR}/share/ossim/projection/*.txt)
+INSTALL(FILES ${ossim_projection_codes_csv} DESTINATION share/ossim/projection COMPONENT ossim)
+
+# 2) Utility API JSON files
+FILE(GLOB ossim_util_api_json ${${PROJECT_NAME}_SOURCE_DIR}/share/ossim/util/*.json)
+INSTALL(FILES ${ossim_util_api_json} DESTINATION share/ossim/util COMPONENT ossim)
+
+###################### OUTPUT GENERAL VARIABLE SETTINGS #######################
+
+MESSAGE( STATUS "OSSIM_REVISION_NUMBER           = ${OSSIM_REVISION_NUMBER}" )
+MESSAGE( STATUS "BUILD_LIBRARY_DIR               = ${BUILD_LIBRARY_DIR}" )
+MESSAGE( STATUS "BUILD_RUNTIME_DIR               = ${BUILD_RUNTIME_DIR}" )
+MESSAGE( STATUS "BUILD_OSSIM_FREETYPE_SUPPORT    = ${BUILD_OSSIM_FREETYPE_SUPPORT}" )
+MESSAGE( STATUS "BUILD_OSSIM_APPS                = ${BUILD_OSSIM_APPS}" )
+MESSAGE( STATUS "BUILD_OSSIM_CURL_APPS           = ${BUILD_OSSIM_CURL_APPS}" )
+MESSAGE( STATUS "BUILD_OSSIM_TEST_APPS           = ${BUILD_OSSIM_TEST_APPS}" )
+MESSAGE( STATUS "CMAKE_BUILD_TYPE                = ${CMAKE_BUILD_TYPE}" )
+MESSAGE( STATUS "CMAKE_CXX_COMPILER              = ${CMAKE_CXX_COMPILER}" )
+MESSAGE( STATUS "CMAKE_CXX_FLAGS                 = ${CMAKE_CXX_FLAGS}" )
+MESSAGE( STATUS "CMAKE_CXX_FLAGS_DEBUG           = ${CMAKE_CXX_FLAGS_DEBUG}" )
+MESSAGE( STATUS "CMAKE_CXX_FLAGS_RELEASE         = ${CMAKE_CXX_FLAGS_RELEASE}" )
+MESSAGE( STATUS "CMAKE_INSTALL_PREFIX            = ${CMAKE_INSTALL_PREFIX}" )
+MESSAGE( STATUS "FREETYPE_LIBRARY                = ${FREETYPE_LIBRARIES}" )
+MESSAGE( STATUS "FREETYPE_INCLUDE                = ${FREETYPE_INCLUDE_DIRS}" )
+MESSAGE( STATUS "GEOTIFF_LIBRARY                 = ${GEOTIFF_LIBRARIES}" )
+MESSAGE( STATUS "GEOTIFF_INCLUDE                 = ${GEOTIFF_INCLUDE_DIR}" )
+MESSAGE( STATUS "GEOTRANS_LIBRARY                = ${GEOTRANS_LIBRARY}" )
+MESSAGE( STATUS "GEOTRANS_INCLUDE                = ${GEOTRANS_INCLUDE_DIR}" )
+MESSAGE( STATUS "GEOS_LIBRARY                    = ${GEOS_LIBRARY}" )
+MESSAGE( STATUS "GEOS_INCLUDE                    = ${GEOS_INCLUDE_DIR}" )
+MESSAGE( STATUS "JPEG_LIBRARY                    = ${JPEG_LIBRARIES}" )
+MESSAGE( STATUS "JPEG_INCLUDE                    = ${JPEG_INCLUDE_DIR}" )
+MESSAGE( STATUS "MPI_LIBRARY                     = ${MPI_LIBRARIES}" )
+MESSAGE( STATUS "MPI_INCLUDE                     = ${MPI_INCLUDE_PATH}" )
+MESSAGE( STATUS "OPENTHREADS_LIBRARY             = ${OPENTHREADS_LIBRARY}" )
+MESSAGE( STATUS "OPENTHREADS_INCLUDE             = ${OPENTHREADS_INCLUDE_DIR}" )
+MESSAGE( STATUS "OSSIM_COMPILE_WITH_FULL_WARNING = ${OSSIM_COMPILE_WITH_FULL_WARNING}" )
+MESSAGE( STATUS "OSSIM DEPENDENT LIBRARIES       = ${ossimDependentLibs}" )
+MESSAGE( STATUS "TIFF_LIBRARY                    = ${TIFF_LIBRARIES}" )
+MESSAGE( STATUS "TIFF_INCLUDE                    = ${TIFF_INCLUDE_DIR}" )
+MESSAGE( STATUS "ZLIB_LIBRARY                    = ${ZLIB_LIBRARIES}" )
+MESSAGE( STATUS "ZLIB_INCLUDE                    = ${ZLIB_INCLUDE_DIR}" )
+
+#-----------------------------------------------------------------------------
+# uninstall target
+#-----------------------------------------------------------------------------
+OSSIM_ADD_COMMON_MAKE_UNINSTALL()
+
+message("################## end of OSSIM core library setup #########################")
diff --git a/ossim/Doxyfile b/ossim/Doxyfile
new file mode 100644
index 0000000..5fb8742
--- /dev/null
+++ b/ossim/Doxyfile
@@ -0,0 +1,1552 @@
+# Doxyfile 1.7.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = "OSSIM - Open Source Software Image Map"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER         = "Version 1.8.17"
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = doc
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH        =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF      = YES
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this
+# tag. The format is ext=language, where ext is a file extension, and language
+# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
+# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
+# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING      =
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen to replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penality.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will rougly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+# will sort the (brief and detailed) documentation of class members so that
+# constructors and destructors are listed first. If set to NO (the default)
+# the constructors will appear in the respective orders defined by
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page.
+# This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. The create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option.
+# You can optionally specify a file name after the option, if omitted
+# DoxygenLayout.xml will be used as the name of the layout file.
+
+LAYOUT_FILE            =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE           =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT                  = include \
+                         src \
+                         ../ossim_plugins
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS          = *.cpp \
+                         *.h \
+                         *.cc \
+                         *.dox
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = CVS \
+                         .svn
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = *CVS*
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH           =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS       =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH             =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.
+# If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER           =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis.
+# Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match.
+# The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS        =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = YES
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.
+# Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 4
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = ossim
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER            =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER            =
+
+# If the HTML_TIMESTAMP tag is set to YES then the generated HTML
+# documentation will contain the timesstamp.
+
+HTML_TIMESTAMP         = NO
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        =
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP         = YES
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE               =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING     =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
+# that can be used as input for Qt's qhelpgenerator to generate a
+# Qt Compressed Help (.qch) of the generated HTML documentation.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE               =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
+# add. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
+# Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
+# Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION           =
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = NO
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES       = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box
+# for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
+# (GENERATE_DOCSET) there is already a search function so this one should
+# typically be disabled. For large projects the javascript based search engine
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE           = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+# Note that when enabling USE_PDFLATEX this option is only used for
+# generating bitmaps for formulas in the HTML output, but not in the
+# Makefile that is written to the output directory.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA             =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD                =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader.
+# This is useful
+# if you want to understand what is going on.
+# On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH           =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS  =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED             =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+#
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+#
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
+# powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH            =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# By default doxygen will write a font called FreeSans.ttf to the output
+# directory and reference it in all dot files that doxygen generates. This
+# font does not include all possible unicode characters however, so when you need
+# these (or just want a differently looking font) you can specify the font name
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
+# containing the font.
+
+DOT_FONTNAME           = FreeSans.ttf
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
+# can find it using this tag.
+
+DOT_FONTPATH           =
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS           =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP            = YES
diff --git a/ossim/LICENSE.txt b/ossim/LICENSE.txt
new file mode 100644
index 0000000..dfa18e3
--- /dev/null
+++ b/ossim/LICENSE.txt
@@ -0,0 +1,23 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2015 OSSIM Labs
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
diff --git a/ossim/OSSIM_logo.png b/ossim/OSSIM_logo.png
new file mode 100644
index 0000000..b3a9d07
Binary files /dev/null and b/ossim/OSSIM_logo.png differ
diff --git a/README.txt b/ossim/README.txt
similarity index 100%
rename from README.txt
rename to ossim/README.txt
diff --git a/ossim/doc/ossim.spec b/ossim/doc/ossim.spec
new file mode 100644
index 0000000..1447ca0
--- /dev/null
+++ b/ossim/doc/ossim.spec
@@ -0,0 +1,78 @@
+# $Id: ossim.spec 23668 2015-12-14 20:11:00Z rashadkm $
+# $crtd:  by  Derald Metzger  on  000226 $
+# $cmnt:  spec file for ossim $
+
+# Preamble
+Summary: Open Source Software Image Map
+Name: ossim
+Version: 0.999.7
+Release: 1
+Copyright: GPL MIT
+Group: Applications/Image
+Source: ftp://ftp.remotesensing.org/pub/ossim/%{name}-%{version}.tgz
+URL: http://www.remotesensing.org/ossim/
+Distribution: na
+Vendor: imagelinks.com
+Packager: Derald Metzger <dmetz at remotesensing.org>
+BuildRoot: %{_tmppath}/%{name}-%{version}
+#Provides: 
+#Requires: 
+
+%description
+ ######--- This is alpha stage development code. ---######
+ OSSIM (Open Source Software Image Map) project. 
+Pronounced "awesome", the OSSIM project leverages existing open source 
+algorithms, tools, and packages to construct an integrated library for 
+remote sensing, image-processing, and Geographical Information Sciences (GIS) 
+analysis.
+
+%prep
+%setup
+rm -r `find . -name CVS -print`
+
+%build
+./configure \
+    --prefix=%{_prefix} \
+    --with-grass=no \
+    --without-python
+make
+
+%install
+make \
+  version=%{version} \
+  prefix=$RPM_BUILD_ROOT%{_prefix} \
+  sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} \
+  install
+
+%changelog
+* Wed Feb 08 2001  Derald Metzger <dmetz at remotesensing.org>
+-UPDATE pkg to 0.999.7-1
+  The ossim dir tree has been extensively reconfigured.
+* Thu Dec 28 2000  Derald Metzger <dmetz at remotesensing.org>
+-UPDATE pkg to 0.999.3-1
+  The 0.999 is meant to imply preliminary code (alpha or beta).
+  The .3-1 is the 3rd preliminary version and first rpm release of it. 
+- Remove $BR build root stuff from Makefile. Use make var defs on cmdline.
+- Macroized and updated the files manifest
+- Added config dir etc/ossim
+- Added doc dir
+- Removed lib/ossim - linking statically
+* Thu Aug 31 2000  Derald Metzger <dmetz at remotesensing.org>
+-pkg 0.2.0a-2  Rebuild with wxGTK-2.2.1-0.
+* Sat Aug 26 2000  Derald Metzger <dmetz at remotesensing.org>
+-pkg 0.2.0a-1  Snapshot of current alpha code
+* Thu May 23 2000  Derald Metzger <dmetz at remotesensing.org>
+-PACKGED 0.0.0-1
+- rpm'd ossim. Started version at 0.0.0
+
+%files
+%defattr(-,root,root)
+%{_bindir}/%{name}
+%doc %{_docdir}/%{name}-%{version}/
+%config %{_sysconfdir}/%{name}
+
+
+
+
+
+
diff --git a/ossim/etc/linux/profile.d/ossim.csh b/ossim/etc/linux/profile.d/ossim.csh
new file mode 100644
index 0000000..11e1502
--- /dev/null
+++ b/ossim/etc/linux/profile.d/ossim.csh
@@ -0,0 +1,18 @@
+#---
+# Open Source Software Image Map(OSSIM) initialization script (csh).
+#---
+if ( ! $?OSSIM_INSTALL_PREFIX ) then
+   setenv OSSIM_INSTALL_PREFIX "/usr"
+endif
+
+if ( ( ! $?OSSIM_PREFS_FILE ) then
+   setenv OSSIM_PREFS_FILE $OSSIM_INSTALL_PREFIX/share/ossim/ossim-site-preferences
+endif
+
+#---
+# Stub to set path on standard install:
+#---
+# set ossim_bin=/usr/local/ossim/bin
+# if ( "${path}" !~ *$ossim_bin* ) then
+#   set path = ( $ossim_bin $path )
+# endif
diff --git a/ossim/etc/linux/profile.d/ossim.sh b/ossim/etc/linux/profile.d/ossim.sh
new file mode 100644
index 0000000..f02c898
--- /dev/null
+++ b/ossim/etc/linux/profile.d/ossim.sh
@@ -0,0 +1,19 @@
+#---
+# Open Source Software Image Map(OSSIM) initialization script (sh).
+#---
+if [ -z "$OSSIM_INSTALL_PREFIX" ]; then
+   export OSSIM_INSTALL_PREFIX=/usr
+fi
+
+if [ -z "$OSSIM_PREFS_FILE" ]; then
+   export OSSIM_PREFS_FILE=$OSSIM_INSTALL_PREFIX/share/ossim/ossim-site-preferences
+fi
+
+#---
+# Stub to set path on standard install:
+#---
+# ossim_bin=/usr/local/ossim/bin
+# if ! echo ${PATH} | /bin/grep -q $ossim_bin ; then
+#    PATH=$ossim_bin:${PATH}
+# fi
+# export PATH
diff --git a/ossim/etc/templates/ossim_preferences_template b/ossim/etc/templates/ossim_preferences_template
new file mode 100644
index 0000000..e2e35c8
--- /dev/null
+++ b/ossim/etc/templates/ossim_preferences_template
@@ -0,0 +1,585 @@
+// ------------------------------------------------------------------------
+// 
+// Description:  ossim_preferences_template
+// 
+// This file will be automatically loaded by ossim applications provided the
+// environment variable "OSSIM_PREFS_FILE" is set to point to some form of 
+// this file.
+//
+// Note:  c++ comments "//" can be used to comment a line.
+//
+// To set the environment variable for automatic preference file loading:
+//
+// This assumes a preference file in your home called "ossim_preferences".
+// Typically this would be put in a dot file read at startup of a shell.
+//
+// tcsh and csh users:  setenv OSSIM_PREFS_FILE ~/ossim_preferences
+//
+// bash and sh users:   export OSSIM_PREFS_FILE=~/ossim_preferences
+// 
+// windoze users:       I'll have to look this up...
+//
+// You can also use the "-P <preference_file>" option at application startup.
+// where <preference_file> is full path and filename.
+//
+// Note that system environment variables found in this ossim preferences
+// file in the format "$(env_var_name)" will be expanded in place.
+//
+// To view your preferences use below command.  This is useful when trouble
+// shooting paths and so on:
+//
+// $ ossim-info --config
+// 
+// ------------------------------------------------------------------------
+
+//---
+// Elevation setup:
+//
+// Keyword pair: 
+// elevation_source.type
+// elevation_source.filename 
+// 
+// Indicates an elevation source.  These should be listed in pairs.  Numbering
+// should start with 0 with lowest number being the highest resolution.  This
+// can be a cell(file) or a directory.
+// 
+// There are four elevation_source.type types:
+// elevation_source.type: dted_directory
+// elevation_source.type: srtm_directory
+// elevation_source.type: general_raster_directory
+// 
+// The elevation_source.connection_string is a connection for your database.
+// Typically this is a directory location.
+// 
+// NOTES:
+// 
+// 1) Order dependent, i.e. ALWAYS put your highest resolution first.
+// 
+// 2) The elevation_source keyword replaces the deprecated keywords:
+// dted_directory
+// image_directory
+// srtm_directory
+// dted_cell 
+//
+// 3) We support bringing cells into memory for dted and srtm datasets.  You can also control the
+// number of open cells by specifying a min and max open cells.  If the number of cells opened
+// exceeds the maximum then it will shrink the active opened cells to the minumum.  We currently
+// use a least recently used algorithm.
+// 
+// 4) A good elevation source is the Shuttle Radar Topographic Mission(SRTM):
+//    http://srtm.usgs.gov/index.php
+
+// 5) Examples below are defaulted to some value.  To change enabled key to
+//    true, e.g.:
+//    elevation_manager.elevation_source0.enabled: true
+//    
+//---
+
+elevation_manager.elevation_source0.connection_string: $(OSSIM_DATA)/elevation/dted/level2
+elevation_manager.elevation_source0.enabled: true
+elevation_manager.elevation_source0.type: dted_directory
+elevation_manager.elevation_source0.min_open_cells: 25
+elevation_manager.elevation_source0.max_open_cells: 50
+elevation_manager.elevation_source0.memory_map_cells: false
+elevation_manager.elevation_source0.geoid.type: geoid1996
+
+elevation_manager.elevation_source1.connection_string: $(OSSIM_DATA)/elevation/srtm/1arc
+elevation_manager.elevation_source1.enabled: true
+elevation_manager.elevation_source1.type: srtm_directory
+elevation_manager.elevation_source1.min_open_cells: 25
+elevation_manager.elevation_source1.max_open_cells: 50
+elevation_manager.elevation_source1.memory_map_cells: false
+elevation_manager.elevation_source1.geoid.type: geoid1996
+
+elevation_manager.elevation_source2.connection_string: $(OSSIM_DATA)/elevation/dted/level1
+elevation_manager.elevation_source2.enabled: true
+elevation_manager.elevation_source2.type: dted_directory
+elevation_manager.elevation_source2.min_open_cells: 25
+elevation_manager.elevation_source2.max_open_cells: 50
+elevation_manager.elevation_source2.memory_map_cells: false
+elevation_manager.elevation_source2.geoid.type: geoid1996
+
+elevation_manager.elevation_source3.connection_string: $(OSSIM_DATA)/elevation/srtm/3arc
+elevation_manager.elevation_source3.enabled: true
+elevation_manager.elevation_source3.type: srtm_directory
+elevation_manager.elevation_source3.min_open_cells: 25
+elevation_manager.elevation_source3.max_open_cells: 50
+elevation_manager.elevation_source3.memory_map_cells: false
+elevation_manager.elevation_source3.geoid.type: geoid1996
+
+elevation_manager.elevation_source4.connection_string: $(OSSIM_DATA)/elevation/dted/level0
+elevation_manager.elevation_source4.enabled: true
+elevation_manager.elevation_source4.type: dted_directory
+elevation_manager.elevation_source4.min_open_cells: 25
+elevation_manager.elevation_source4.max_open_cells: 50
+elevation_manager.elevation_source4.memory_map_cells: true
+elevation_manager.elevation_source4.geoid.type: geoid1996
+
+// "image_directory" can be any type of image, i.e. tiff, nitf and so on.
+// elevation_manager.elevation_source5.connection_string: $(OSSIM_DATA)/elevation/some_dir
+// elevation_manager.elevation_source5.enabled: false
+// elevation_manager.elevation_source5.type: image_directory
+// elevation_manager.elevation_source5.min_open_cells: 25
+// elevation_manager.elevation_source5.max_open_cells: 50
+// elevation_manager.elevation_source5.memory_map_cells: false
+// elevation_manager.elevation_source5.geoid.type: geoid1996
+
+
+//---
+// Identity geoid is 0 everywhere, so MSL = Ellipsoid. Useful when DEM
+// provides posts relative to ellipsoid instead of customary MSL. This is
+// specific to each elev database:
+//---
+// elevation_manager.elevation_source3.geoid.type: identity
+
+//---
+// Default height above ellipsoid, for use when no elev data is present, 
+// instead of returning NAN:
+//---
+// elevation_manager.default_height_above_ellipsoid: 0.0
+
+// ---
+// This is n elevation offset that is added to the height returned from the
+// elevation manager.
+// if the value is nan then nothing is added.
+// ---
+//elevation_manager.elevation_offset: nan
+
+//---
+// Allows one to specify to the elevation manager to use the ellipsoid offset
+// as defined by the geoid manager if a getHeightAboveEllipsoid fails.
+//---
+elevation_manager.use_geoid_if_null: true
+
+//---
+// Keyword:  default_elevation_path
+// Default path for the elevation manager popup "Add" to start at.
+//---
+default_elevation_path: $(OSSIM_DATA)/elevation/dted/level2 
+// ---
+
+//---
+// Keyword:  elevation.enabled
+// If disabled calls to the elevation manager getHeightAboveMSL and 
+// getHeightAboveEllipsoid will return a null height.  (default=true)
+// Use: "true", "yes", "y" or "1" to enable, 
+//      "false", "no", "n" or "0" to disable.
+//---
+elevation_manager.enabled:  true
+
+//---
+// Keyword:  elevation.threads
+// Defines the number of instances of elevation databases to maintain for multithreading.
+// Can be boolean "yes" or "true" to use all available cores or an integer value for
+// custom experimentation. Set to "no" (or "false") or 1 for no multithreading capability. 
+// Default is "true".
+//---
+elevation_manager.threads: yes                 
+
+// ---
+// Location of datum grids:
+//
+// Snip from: http://www.ngs.noaa.gov/TOOLS/Nadcon/Nadcon.html
+// 
+// Advances in the accuracies now obtainable in geodetic surveys, specifically
+// through use of differential GPS, has allowed for the creation of state 
+// High Precision Geodetic Networks (HPGNs), also referred to as High Accuracy
+// Reference Networks (HARNs) throughout the country.
+// 
+// Latest ftp location(20100206):
+// ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon/
+//
+// ---
+// datum_grids: $(OSSIM_DATA)/ossim/elevation/nadcon-grids
+
+//---
+// Look-up tables for European Petroleum Survey Group (EPSG) coded 
+// projections and datums.
+// These are expected to be delimiter-separated value (*.csv|tsv) files.
+// NOTE: ESRI codes are NOT EPSG codes, however, they do not conflict with 
+// EPSG so ingesting them as if they were EPSG. Eventually, separate 
+// databases or a multi-Db solution may need to be 
+// implemented. OLK 05/2010
+// --- 
+epsg_database_file0: $(OSSIM_INSTALL_PREFIX)/share/ossim/projection/ossim_epsg_projections-v7_4.csv
+epsg_database_file1: $(OSSIM_INSTALL_PREFIX)/share/ossim/projection/ossim_harn_state_plane_epsg.csv
+epsg_database_file2: $(OSSIM_INSTALL_PREFIX)/share/ossim/projection/ossim_state_plane_spcs.csv
+epsg_database_file3: $(OSSIM_INSTALL_PREFIX)/share/ossim/projection/ossim_harn_state_plane_esri.csv
+
+// Database file for WKT-based projection factory:
+wkt_database_file: $(OSSIM_INSTALL_PREFIX)/share/ossim/projection/ossim_wkt_pcs.csv
+
+//---
+// Geoid support:
+// Note:  Since the sensor models do earth intersects at height above the 
+//        ellipsoid and the vertical datum of DTED is geoid_egm_96_grid, you
+//        should have a geoid grid in place for accurate earth intersections.
+//---
+
+//---
+// Generic geoid support:
+// Specifying a "geoid_manager.geoid_source0.type: geoid_image" uses an image handler
+// based geoid reader.  So this can be any type of image, i.e. tiff, raster, provided
+// it can be opened and a good image geometry is returned.
+// 
+// In the below example for geoid_manager.geoid_source0 an external geometry file was
+// created for Und_min1x1_egm2008_isw_equal_82_WGS84_TideFree_SE.ras.
+//---
+geoid_manager.geoid_source0.connection_string: $(OSSIM_DATA)/elevation/geoids/egm2008/Und_min1x1_egm2008_isw_equal_82_WGS84_TideFree_SE.ras
+geoid_manager.geoid_source0.enabled: true
+geoid_manager.geoid_source0.geoid.type: egm2008
+geoid_manager.geoid_source0.memory_map: false
+geoid_manager.geoid_source0.type: geoid_image
+
+//---
+// GEOID 99:  Set keyword to the directory containing the GEOID 99 grids.
+// 
+// Notes:  
+// - Grids MUST be in the native byte order.
+// - Can be downloaded from:
+// http://www.ngs.noaa.gov/GEOID/GEOID99
+// ---
+// geoid_99_directory:  $(OSSIM_DATA)/ele1/geoid/geoid99
+
+//---
+// Generic support has been added to each NGS geoid grid. You can download
+// ngs grids for 1999, 2003.
+// Current release only allows for a single directory we will allow for
+//  multiple directories later and auto detecting if possible.
+//
+// Currently the file names are hard coded and need to be from the NGS 
+// distribution also downloadable from ftp.remotesensing.org under
+// /ossim/test_data.tgz
+//---
+geoid_ngs_directory: $(OSSIM_DATA)/elevation/geoids/geoid99
+geoid_ngs_directory.byte_order: little_endian
+// geoid_ngs_directory.byte_order: big_endian
+
+//---
+// GEOID EGM 96:  Set keyword to the path to the egm96.grd
+// 
+// Notes:
+// - Grid must be in BIG ENDIAN (UNIX) format.
+// - Can be downloaded from svn:
+// svn co http://svn.osgeo.org/ossim/trunk/ossim_package_support/geoids geoids
+//---
+geoid_egm_96_grid: $(OSSIM_INSTALL_PREFIX)/share/ossim/geoids/geoid1996/egm96.grd
+
+//---
+// Location of other shared files can be accessed using this preference to permit 
+// specifying paths relative to it.
+//---
+ossim_share_directory: $(OSSIM_INSTALL_PREFIX)/ossim/share
+
+// ---
+// Font support:
+// NOTE:  To use the MapCompositionSource you must at least have "font.dir1"
+//        set to some default.
+// ---
+// font.file1: /usr/share/fonts/default/Type1/b018032l.pfb
+// font.dir1: /usr/share/fonts/default/Type1
+
+
+//---
+// OSSIM plugin support:
+//
+// Notes:  
+//
+// Notes:
+//
+// View plugins with:
+//
+// $ ossim-info --plugins
+//
+// To troubleshoot problems  embedded trace debug can be turned on using 
+// "ossimDynamic"
+//
+// $ ossim-info -T ossimDynamic --plugins 
+//
+// ossimDynamicLibrary::load DEBUG:
+// Loaded library:  /usr/local/lib/libossimpng_plugin.so
+// ossimDynamicLibrary::load DEBUG:
+// Loaded library:  /usr/local/lib/libossimgdal_plugin.so
+// ossimDynamicLibrary::load DEBUG:
+// Loaded library:  /usr/local/lib/libossimreg_plugin.so
+// ossimDynamicLibrary::load DEBUG:
+// Loaded library:  /usr/local/lib/libossimcontrib_plugin.so
+//
+// Keywords:
+//
+// plugin.dir1:  < directory where plugins are >
+//
+// you can also list by individual file names
+//
+// plugin.file1: < full path and file name >
+//---
+// Example, edit/uncomment as needed:
+plugin.file0: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimpng_plugin.so
+plugin.file5: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimkakadu_plugin.so
+plugin.file10: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimmrsid_plugin.so
+plugin.file15: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossim_plugin.so
+
+// Old hdf4/5 plugin:
+// plugin.file20: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimhdf_plugin.so
+
+// New split out hdf plugins
+plugin.file20: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimhdf5_plugin.so
+plugin.file23: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimhdf4_plugin.so
+
+plugin.file25: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimsqlite_plugin.so
+plugin.file30: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimlas_plugin.so
+plugin.file40: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimweb_plugin.so
+plugin.file45: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimkmlsuperoverlay_plugin.so
+plugin.file50: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimndf_plugin.so
+plugin.file55: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimgeopdf_plugin.so
+plugin.file60: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimopencv_plugin.so
+plugin.file65: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimgdal_plugin.so
+
+// plugin.file5: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimreg_plugin.so
+// plugin.file6: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimcontrib_plugin.so
+// 
+//
+// We also support a second style that allows one to pass options to any
+// plugins that support them
+// the options param is an embedded keywordlist that is surrounded by triple
+// quotes:
+// plugin0.file: <path to>/libossimkakadu_plugin
+// plugin0.options: """
+//                  read_factory.location: front
+//                  writer_factory.location: back
+//                  """
+//
+// END OSSIM plugin support
+//---
+
+// Toggles for recceVue application:
+statusLatLon: true
+statusHeight: true
+statusDatum: true
+statusGSD: true
+statusUpdateOnClick: true
+
+
+// ---
+// Keyword: cache_size
+// The cache size is in megabytes.
+// ---
+cache_size: 256
+// cache_size: 512
+// cache_size: 1024
+// cache_size: 2048
+
+
+// ---
+// Keyword: overview_stop_dimension
+//
+// Affects any overview building from img2rr, imagelinker, iview. Controls
+// the amount of resLevels created.  This is also used to control the amount
+// of levels the J2K writers use from the kakadu plugin.
+// 
+// This is the point where "img2rr" or the overview builder will stop 
+// decimating the image down.  So in other words, if the 
+// overview_stop_dimension keyword is 64, img2rr application will build 
+// overviews, decimating each level by 2 until both the width and height are 
+// less than or equal to 64.  Note the larger the dimension the less levels
+// created.
+// 
+// Uncomment one below.
+// ---
+overview_stop_dimension: 8
+// overview_stop_dimension: 16
+// overview_stop_dimension: 32
+// overview_stop_dimension: 64
+// overview_stop_dimension: 128
+// overview_stop_dimension: 256
+// overview_stop_dimension: 512
+
+// ---
+// Keyword: overview_builder.scan_for_min_max_null_if_float
+// 
+// Control overview sequencer scanning for min, max, nulls for float data. If
+// true and input data is float scalar type scanning will be performed and a
+// dot.omd file will be written with the min, max, nulls in it.
+// 
+// Type: boolean, set to true, false, 1, 0
+// 
+// CAUTION: Because the j2k overview builder requires the min/max up front for 
+// normalization this is NOT a good option to turn on.  In other word if you
+// are doing ossim-img2rr -r -t ossim_kakadu_nitf_j2k <float-image> you should
+// disable this and set the min/max with ossim-cmm(compute min max) or do it
+// manually.
+// ---
+// overview_builder.scan_for_min_max_null_if_float: true
+
+// ---
+// Keyword: tile_size
+//
+// Tile size x y
+//
+// Affects all ossim application.  This is the internal tile size of any
+// image chain unless overridden by the filter.
+// 
+// Notes: 
+// 1) OSSIM can handle any tile size; however it is best to use a size that
+// is a power of two.
+// 2) 
+// 
+// Uncomment one below.  
+// ---
+// tile_size: 32 32
+// tile_size: 64 64
+// tile_size: 128 128
+tile_size: 256 256
+// tile_size: 512 512
+// tile_size: 1024 1024
+
+
+// ---
+// Keyword: shapefile_colors_auto
+// 
+// Shape file colors set to automatic.
+// This is a boolean value.  If true pen and brush color of shape files will
+// be determined by indexing a color table in a round robin approach.  If set 
+// to true the auto colors override keywords for "pen" and "brush" color.
+// Default value if not found if "false".
+// 
+// Value can be: true, yes, y, 1, false, no, n or 0
+// ---
+shapefile_colors_auto: false
+
+// ---
+// Shape file pen color:
+// Three values for red, green and blue between 0 and 1.0 with 1.0 being 
+// brightness and 0.0 being black.
+// ---
+shapefile_normalized_rgb_pen_color: 0.004 1.0 0.004
+
+// ---
+// Shape file pen color:
+// Three values for red, green and blue between 0 and 1.0 with 1.0 being 
+// brightness and 0.0 being black.
+// ---
+shapefile_normalized_rgb_brush_color: 0.004 1.0 0.004
+
+// ---
+// Shape file point size:
+// Width and height for points in pixels.
+// ---
+shapefile_point_size: 6.0 6.0
+
+
+// --------------------------
+// Some keywords for the OSSIM GUI application
+//
+//
+// igen spec files output./  This is the directory location you would
+// like the igen export GUI to default to when outputing spec files
+ossim.igen_spec_output_directory: /work/gpotts/igen_test
+
+// this is the igen executable.  Make sure you put the full path
+ossim.igen_executable:  /work/gpotts/ossim/bin/igen
+
+// END keywords for OSSIM GUI
+//--------------------------
+
+// ---
+// Position Quality Evaluator (PQE) keywords. 
+// Note Circulay Error(CE) and Linear Error (LE)  units are in meters.
+// These keywords are for the imagelinker->image-window->PQE dialog box.
+// They allow the user to calculater position quality factoring in backdrop
+// and elevation uncertainty.
+// ---
+
+// Backdrop enter "name,ce90,le90" like "JOG-A,77,38".
+pqe_backdrop1: TLM50,31,25
+pqe_backdrop2: TLM100,61,25
+pqe_backdrop3: JOG-A,77,38
+pqe_backdrop4: TPC,613,47
+pqe_backdrop5: ONC,1226,93
+pqe_backdrop6: JNC,2452,187
+pqe_backdrop7: GNC,6129,465
+
+// Elevation enter "name,ce90,le90" like "SRTM_1ARC,20,16"
+// Accuracies vary widely depending on terrain and how they were computed.
+// These are just examples.
+pqe_elev1: SRTM_3ARC,20,16
+pqe_elev2: SRTM_1ARC,20,10
+pqe_elev3: DTED_LEVEL2,40,20
+pqe_elev4: DTED_LEVEL1,50,30
+pqe_elev5: RPC_No_DEM_State,-2,-1.6449
+// Special Case
+// RPC_No_DEM_State, Scale Divisor, 1-Sigma Divisor (minus signs required)
+
+pqe_normalized_rgb_ellipse_color: 0.004 1.0 0.004
+
+// End of PQE keywords...
+
+// ---
+// Log file support:  If set all output from ossimNotify to stdout and to 
+// stderr will be written to the log file.  Optionally users of ossim 
+// applications can use the "--ossim-logfile <some_file>" command line 
+// argument.  Note that the "--ossim-logfile" command line argument overrides
+// the preference setting.
+// 
+// Uncomment and set path to use log file:
+// ---
+// ossim.log.file: D:\tmp\ossim-log.txt
+
+// ---
+// Kakadu threads:
+// ---
+kakadu_threads: 4
+
+// ---
+// ossim threads:
+// ---
+ossim_threads: 4
+
+//---
+// Keyword for ingesting terrasar-x and radarsat-2 data. When TRUE, instructs
+// the sensor model to create an ossim coarse grid replacement model to
+// improve performance geometric_sar_sensor_model.create_ocg: true
+// Keyword parsed presently by orthoigen. If true, histograms will be
+// computed when needed for all images that do not yet have a histogram. 
+//---
+autogenerate_histogram: true
+
+//---
+// specify true or fals if you want the ossimInit to look in the current 
+// program path to see if any plugins are available.  Turn this off if you 
+// want to load them from a keyword list and remove the need to scan the 
+// directory for valid plugins
+//---
+ossim_init.auto_load_plugins: false
+
+//---
+// When true, indicates to orthoigen application that the specified cut
+// rectangle for the product shall be adjusted to fit the minimum bounding
+// valid image rect. This eliminates null exterior pixels when the cut rect
+// extends beyond the valid image rect. This preference can be overriden
+// by an option on the orthoigen command line. See the usage on orthoigen.
+// [default is false]
+//---
+orthoigen.clip_to_valid_rect: false
+
+//---
+// Specifies the preference for remapping null-valued pixels to 1 (min).
+// Possible settings are:
+// "none" -- Bypasses pixel flipper
+// "all_nulls" -- replaces any occurrence of the null value with 1. 
+//    Ex: (20,0,10) becomes (20,1,10), also (0,0,0) becomes (1,1,1)
+// "only_partial_nulls" -- 
+// replaces null-valued band only if another band is non-null.
+//    Ex: (20,0,10) becomes (20,1,10), but (0,0,0) is not remapped.
+// "all_bands_if_partial_null" -- 
+// Remaps all bands of a pixel if even one band is null.
+//    Ex: (20,0,10) becomes (1,1,1), but (0,0,0) is not remapped
+// "only_full_nulls" -- Remaps pixel only if all bands are null.
+//    Ex: (0,0,0) becomes (1,1,1), but (20,0,10) is not remapped
+//---
+orthoigen.flip_null_pixels: none
+
+// ---
+// NITF writer site configuration file:
+// ---
+// nitf_writer.site_configuration_file: $(OSSIM_DATA)/ossim/share/nitf-site-configuration.kwl
diff --git a/include/ossim/base/datum.h b/ossim/include/ossim/base/datum.h
similarity index 100%
rename from include/ossim/base/datum.h
rename to ossim/include/ossim/base/datum.h
diff --git a/include/ossim/base/ossim2dBilinearTransform.h b/ossim/include/ossim/base/ossim2dBilinearTransform.h
similarity index 100%
rename from include/ossim/base/ossim2dBilinearTransform.h
rename to ossim/include/ossim/base/ossim2dBilinearTransform.h
diff --git a/ossim/include/ossim/base/ossim2dLinearRegression.h b/ossim/include/ossim/base/ossim2dLinearRegression.h
new file mode 100644
index 0000000..2c88f50
--- /dev/null
+++ b/ossim/include/ossim/base/ossim2dLinearRegression.h
@@ -0,0 +1,77 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts (gpotts at imagelinks)
+//
+//*************************************************************************
+// $Id: ossim2dLinearRegression.h 23353 2015-06-01 19:19:10Z dburken $
+#ifndef ossim2dLinearRegression_HEADER
+#define ossim2dLinearRegression_HEADER 1
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimDpt.h>
+#include <vector>
+#include <iostream>
+
+class OSSIM_DLL ossim2dLinearRegression
+{
+public:
+   friend OSSIM_DLL std::ostream& operator <<(std::ostream& out,
+                                              const ossim2dLinearRegression& data)
+      {
+         out << "y = " << data.theSlope << "*x + " << data.theIntercept;
+
+         return out;
+      }
+   ossim2dLinearRegression();
+   void getEquation(double& slope,
+                    double& intercept)
+   {
+      slope     = theSlope;
+      intercept = theIntercept;
+   }
+   void addPoint(const ossimDpt& pt)
+      {
+//         thePoints.push_back(pt);
+         ++theNumberOfPoints;
+         theSumX  += pt.x;
+         theSumY  += pt.y;
+         theSumXX += pt.x*pt.x;
+         theSumYY += pt.y*pt.y;
+         theSumXY += pt.x*pt.y; 
+         theSolvedFlag     = false;
+      }
+   void clear()
+      {
+//         thePoints.clear();
+         theNumberOfPoints = 0;
+         theSumX           = 0.0;
+         theSumXX          = 0.0;
+         theSumY           = 0.0;
+         theSumYY          = 0.0;
+         theIntercept      = 0.0;
+         theSlope          = 0.0;
+         theSumXY          = 0.0;
+         theSolvedFlag     = false;
+      }
+   void solve();
+   ossim_uint32 getNumberOfPoints()const
+      {
+         return theNumberOfPoints;
+//         return thePoints.size();
+      }
+protected:
+//   std::vector<ossimDpt> thePoints;
+   ossim_uint32 theNumberOfPoints;
+   double theSumX;
+   double theSumY;
+   double theSumXX;
+   double theSumYY;
+   double theSumXY;
+   
+   double theIntercept;
+   double theSlope;
+   bool   theSolvedFlag;
+};
+
+#endif
diff --git a/ossim/include/ossim/base/ossim2dTo2dIdentityTransform.h b/ossim/include/ossim/base/ossim2dTo2dIdentityTransform.h
new file mode 100644
index 0000000..146a1b9
--- /dev/null
+++ b/ossim/include/ossim/base/ossim2dTo2dIdentityTransform.h
@@ -0,0 +1,69 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description:  Contains class definition for ossim2dTo2dIdentityTransform.
+// 
+//*******************************************************************
+//  $Id$
+#ifndef ossim2dTo2dIdentityTransform_HEADER
+#define ossim2dTo2dIdentityTransform_HEADER
+#include "ossim2dTo2dTransform.h"
+/**
+ * This is the identity transform and just passes the input to the output.
+ */
+class OSSIM_DLL ossim2dTo2dIdentityTransform : public ossim2dTo2dTransform
+{
+public:
+   /**
+    * forward transform just passes the point to the output.
+    */
+   virtual void forward(const ossimDpt& input,
+                        ossimDpt& output) const
+   {
+      output = input;
+   }
+   
+   /**
+    * forward transform nothing is modified on the input point.
+    */
+   virtual void forward(ossimDpt&  /* modify_this */) const
+   {
+      // do nothing this is identity
+   }
+   
+   /**
+    * inverse transform just passes the point to the output.
+    */
+   virtual void inverse(const ossimDpt& input,
+                        ossimDpt&       output) const
+   {
+      output = input;
+   }
+   
+   /**
+    * inverse transform nothing is modified on the input point.
+    */
+   virtual void inverse(ossimDpt&  /* modify_this */) const
+   {
+      // do nothing this is identity
+   }
+   
+   /**
+    * Pass equality to the parent
+    */
+   virtual const ossim2dTo2dIdentityTransform& operator=(
+                                                 const ossim2dTo2dIdentityTransform& rhs)
+   {
+      ossim2dTo2dTransform::operator =(rhs);
+      
+      return *this;
+   }
+   
+protected:
+   TYPE_DATA
+};
+#endif
+
diff --git a/ossim/include/ossim/base/ossim2dTo2dMatrixTransform.h b/ossim/include/ossim/base/ossim2dTo2dMatrixTransform.h
new file mode 100644
index 0000000..f06e95a
--- /dev/null
+++ b/ossim/include/ossim/base/ossim2dTo2dMatrixTransform.h
@@ -0,0 +1,221 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:
+//
+// Description: 
+// 
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossim2dTo2dMatrixTransform_HEADER
+#define ossim2dTo2dMatrixTransform_HEADER 1
+
+#include <ossim/base/ossim2dTo2dTransform.h>
+#include <algorithm>
+
+/**
+ * ossim2dTo2dMatrixTransform allows one to specify a set of input points and output points
+ * and will fit a bilinear transform to those points.  Function of the form is solved for each  
+ * output dimension.
+ *
+ * z(x,y) = a + b*x + c*y + d*x*y
+ *
+ * We use the ossimLeastSquareBilin solver to solve for the coefficients.
+ *
+ */
+class OSSIM_DLL ossim2dTo2dMatrixTransform : public ossim2dTo2dTransform
+{
+public: 
+
+   /**
+    * Initialize to the identity
+    */
+   ossim2dTo2dMatrixTransform();
+   
+   /**
+    * Initialize the transform that best fits the input and output arrays.  
+    * If the input and output are well dispersed and are 4 points it should fit
+    * exactly.  Both arrays should be of equal number of points
+    *
+    * @param input the list of input points
+    * @param output the list of output points to transform the input to
+    * @param arraySize the number of points for the arrays.
+    */
+   ossim2dTo2dMatrixTransform(const ossimDpt* input,
+                            const ossimDpt* output, 
+                            ossim_uint32 arraySize)
+   {
+      setFromPoints(input, output, arraySize);
+   }
+   
+   /**
+    * Mapping 4 corners to an output 4 corners.
+    *
+    */
+   ossim2dTo2dMatrixTransform(const ossimDpt& in1, const ossimDpt& in2, const ossimDpt& in3, const ossimDpt& in4,
+                            const ossimDpt& out1, const ossimDpt& out2, const ossimDpt& out3, const ossimDpt& out4)
+   {
+      setFromPoints(in1, in2, in3, in4, out1, out2, out3, out4);
+   }
+   
+   /**
+    * Copy constructor
+    */
+   ossim2dTo2dMatrixTransform(const ossim2dTo2dMatrixTransform& src);
+   
+   /**
+    * Duplication method that duplicates this object
+    */
+   virtual ossimObject* dup()const{return new ossim2dTo2dMatrixTransform(*this);}
+   
+   /**
+    * Overloaded operator equal that allows for assignment.
+    *
+    * @param src the src data to copy into this object.  It will call the base classes
+    * equal operator.
+    */
+   const ossim2dTo2dMatrixTransform& operator =(const ossim2dTo2dMatrixTransform& src)
+   {
+      if(this == &src) return *this;
+      
+      ossim2dTo2dTransform::operator =(*this); // call base classes equal operator
+      std::copy(src.m_coefficientsXTerm, src.m_coefficientsXTerm+4, m_coefficientsXTerm);
+      std::copy(src.m_coefficientsYTerm, src.m_coefficientsYTerm+4, m_coefficientsYTerm);
+      std::copy(src.m_inverseCoefficientsXTerm, src.m_inverseCoefficientsXTerm+4, m_inverseCoefficientsXTerm);
+      std::copy(src.m_inverseCoefficientsYTerm, src.m_inverseCoefficientsYTerm+4, m_inverseCoefficientsYTerm);
+      
+      return *this;
+   }
+   
+   /**
+    * Mapping 4 corners to an output 4 corners.  Will use the ossimLeastSquareBilin class to solve 
+    * the bilinear coefficients that maps the given input points to the output points.
+    */
+   void setFromPoints(const ossimDpt& in1, const ossimDpt& in2, const ossimDpt& in3, const ossimDpt& in4,
+                      const ossimDpt& out1, const ossimDpt& out2, const ossimDpt& out3, const ossimDpt& out4);
+
+   /**
+    * Initialize the transform that best fits the input and output arrays.  
+    * If the input and output are well dispersed and are 4 points it should fit
+    * exactly.  Both arrays should be of equal number of points
+    *
+    * @param input the list of input points
+    * @param output the list of output points to transform the input to
+    * @param arraySize the number of points for the arrays.
+    */
+   void setFromPoints(const ossimDpt* input,
+                      const ossimDpt* output, 
+                      ossim_uint32 arraySize);
+ 
+   /**
+    * forward transform will transform an input point to the output.  
+    */
+   virtual void forward(const ossimDpt& input,
+                        ossimDpt& output) const
+   {
+      output.x = (m_coefficientsXTerm[0] + 
+                  m_coefficientsXTerm[1]*input.x + 
+                  m_coefficientsXTerm[2]*input.y + 
+                  m_coefficientsXTerm[3]*input.x*input.y);
+      output.y = (m_coefficientsYTerm[0] + 
+                  m_coefficientsYTerm[1]*input.x + 
+                  m_coefficientsYTerm[2]*input.y + 
+                  m_coefficientsYTerm[3]*input.x*input.y);
+   }
+   
+   /**
+    * forward transform will transform an input point to the output and modify the passed in point
+    * to the new value
+    */
+   virtual void forward(ossimDpt&  modify_this) const
+   {
+      double saveX = modify_this.x;
+      modify_this.x = (m_coefficientsXTerm[0] + 
+                       m_coefficientsXTerm[1]*modify_this.x + 
+                       m_coefficientsXTerm[2]*modify_this.y + 
+                       m_coefficientsXTerm[3]*modify_this.x*modify_this.y);
+      modify_this.y = (m_coefficientsYTerm[0] + 
+                       m_coefficientsYTerm[1]*saveX + 
+                       m_coefficientsYTerm[2]*modify_this.y + 
+                       m_coefficientsYTerm[3]*saveX*modify_this.y);
+   }
+   
+   /**
+    * Inverts the point back to the original input value.
+    */
+   virtual void inverse(const ossimDpt& input,
+                        ossimDpt&       output) const
+   {
+      output.x = (m_inverseCoefficientsXTerm[0] + 
+                  m_inverseCoefficientsXTerm[1]*input.x + 
+                  m_inverseCoefficientsXTerm[2]*input.y + 
+                  m_inverseCoefficientsXTerm[3]*input.x*input.y);
+      output.y = (m_inverseCoefficientsYTerm[0] + 
+                  m_inverseCoefficientsYTerm[1]*input.x + 
+                  m_inverseCoefficientsYTerm[2]*input.y + 
+                  m_inverseCoefficientsYTerm[3]*input.x*input.y);
+   }
+   
+   /**
+    * Inverts the point back to the original input value and modifies the passed in point
+    * to the new value.
+    */
+   virtual void inverse(ossimDpt&  modify_this) const
+   {
+      double saveX = modify_this.x;
+      modify_this.x = (m_inverseCoefficientsXTerm[0] + 
+                       m_inverseCoefficientsXTerm[1]*modify_this.x + 
+                       m_inverseCoefficientsXTerm[2]*modify_this.y + 
+                       m_inverseCoefficientsXTerm[3]*modify_this.x*modify_this.y);
+      modify_this.y = (m_inverseCoefficientsYTerm[0] + 
+                       m_inverseCoefficientsYTerm[1]*saveX + 
+                       m_inverseCoefficientsYTerm[2]*modify_this.y + 
+                       m_inverseCoefficientsYTerm[3]*saveX*modify_this.y);
+   }
+   
+   /**
+    * Saves the state of this object.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix = 0)const;
+   
+   /**
+    * loads the state of this object from a keywordlist.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix = 0);
+   
+   /**
+    * prints the contents of this object.  Will also cal the base classes
+    * print method.
+    */
+   virtual std::ostream& print(std::ostream& out) const
+   {
+      ossim2dTo2dTransform::print(out);
+      out << "xTerm: " << m_coefficientsXTerm[0] << ", " << m_coefficientsXTerm[1] << ", "
+          << m_coefficientsXTerm[2] << ", " << m_coefficientsXTerm[3] << "\n";
+      out << "yTerm: " << m_coefficientsYTerm[0] << ", " << m_coefficientsYTerm[1] << ", "
+          << m_coefficientsYTerm[2] << ", " << m_coefficientsYTerm[3] << "\n";
+      
+      out << "xInverseTerm: " << m_inverseCoefficientsXTerm[0] << ", " << m_inverseCoefficientsXTerm[1] << ", "
+          << m_inverseCoefficientsXTerm[2] << ", " << m_inverseCoefficientsXTerm[3] << "\n";
+      out << "yInverseTerm: " << m_inverseCoefficientsYTerm[0] << ", " << m_inverseCoefficientsYTerm[1] << ", "
+          << m_inverseCoefficientsYTerm[2] << ", " << m_inverseCoefficientsYTerm[3] << "\n";
+      
+      return out;
+   }
+   
+protected:
+   ossim_float64 m_coefficientsXTerm[4]; // constant, linear x, linear y, cross xy
+   ossim_float64 m_coefficientsYTerm[4]; // constant, linear x, linear y, cross xy
+
+   ossim_float64 m_inverseCoefficientsXTerm[4]; // constant, linear x, linear y, cross xy
+   ossim_float64 m_inverseCoefficientsYTerm[4]; // constant, linear x, linear y, cross xy
+   TYPE_DATA;   
+};
+
+#endif 
+
diff --git a/ossim/include/ossim/base/ossim2dTo2dShiftTransform.h b/ossim/include/ossim/base/ossim2dTo2dShiftTransform.h
new file mode 100644
index 0000000..6347c17
--- /dev/null
+++ b/ossim/include/ossim/base/ossim2dTo2dShiftTransform.h
@@ -0,0 +1,127 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossim2dTo2dShiftTransform_HEADER
+#define ossim2dTo2dShiftTransform_HEADER
+#include <ossim/base/ossim2dTo2dTransform.h>
+
+class OSSIM_DLL ossim2dTo2dShiftTransform : public ossim2dTo2dTransform
+{
+public:
+   /**
+    * Constructor to initialize the shift transform
+    */
+   ossim2dTo2dShiftTransform(const ossimDpt& shift = ossimDpt(0.0,0.0))
+   :ossim2dTo2dTransform(),
+   m_shift(shift)
+   {}
+   
+   /**
+    * Copy constructor
+    */
+   ossim2dTo2dShiftTransform(const ossim2dTo2dShiftTransform& src)
+   :ossim2dTo2dTransform(src),
+   m_shift(src.m_shift)
+   {}
+   
+   /**
+    * Duplication method that duplicates this object
+    */
+   virtual ossimObject* dup()const{return new ossim2dTo2dShiftTransform(*this);}
+   
+   /**
+    * operator = allows one to copy the contents of the class through a common = 
+    * operator.  The = is passed to the derived class.
+    */
+   const ossim2dTo2dShiftTransform& operator =(const ossim2dTo2dShiftTransform& src)
+   {
+      if(this == &src) return *this;
+      
+      ossim2dTo2dTransform::operator =(*this); // call base classes equal operator
+      m_shift = src.m_shift;
+      
+      return *this;
+   }
+   
+   /**
+    * Apply the shift to the input.
+    *
+    * @param input The value to shift.
+    * @param output the shifted value.
+    */
+   virtual void forward(const ossimDpt& input,
+                        ossimDpt& output) const
+   {
+      output = input + m_shift;
+   }
+   /**
+    * Apply the shift to the input and put the result in the same variable
+    *
+    * @param modify_this The value to shift.  The result is placed back into this value.
+    */
+   virtual void forward(ossimDpt&  modify_this) const
+   {
+      modify_this.x += m_shift.x;
+      modify_this.y += m_shift.y;
+   }
+
+   /**
+    * Negate the shift to the input and put the result in output.
+    *
+    * @param input The value to apply the negated shift.
+    * @param output the shifted value.
+    */
+   virtual void inverse(const ossimDpt& input,
+                        ossimDpt& output) const
+   {
+      output = input - m_shift;
+   }
+   
+   /**
+    * Negate the shift operation and put the result in the same variable
+    *
+    * @param modify_this The value to shift.  The result is placed back into this value.
+    */
+   virtual void inverse(ossimDpt&  modify_this) const
+   {
+      modify_this.x -= m_shift.x;
+      modify_this.y -= m_shift.y;
+   }
+   /**
+    * Saves the state of this object.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix = 0)const;
+   
+   /**
+    * loads the state of this object from a keywordlist.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix = 0);
+   
+   /**
+    * Print the contents of the class and pass to the derived class.
+    */
+   virtual std::ostream& print(std::ostream& out) const
+   {
+      ossim2dTo2dTransform::print(out);
+      
+      out << "shift: " << m_shift;
+      
+      return out;
+   }
+   
+protected:
+   virtual ~ossim2dTo2dShiftTransform(){}
+   
+   ossimDpt m_shift;
+   
+TYPE_DATA;
+};
+#endif
+
diff --git a/ossim/include/ossim/base/ossim2dTo2dTransform.h b/ossim/include/ossim/base/ossim2dTo2dTransform.h
new file mode 100644
index 0000000..57ae70e
--- /dev/null
+++ b/ossim/include/ossim/base/ossim2dTo2dTransform.h
@@ -0,0 +1,65 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossim2dTo2dTransform.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossim2dTo2dTransform_HEADER
+#define ossim2dTo2dTransform_HEADER
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimDpt.h>
+
+class OSSIMDLLEXPORT ossim2dTo2dTransform : public ossimObject
+{
+public:
+   virtual void forward(const ossimDpt& input,
+                        ossimDpt& output) const=0;
+   
+   virtual void forward(ossimDpt&  modify_this) const;
+      
+   virtual void inverse(const ossimDpt& input,
+                        ossimDpt&       output) const;
+
+   virtual void inverse(ossimDpt&  modify_this) const;
+      
+   virtual const ossim2dTo2dTransform& operator=(
+      const ossim2dTo2dTransform& rhs);
+   
+   /*!
+    * Used by the inverse iterator.  This will give it a good initial value
+    * that is within the input transforms
+    */
+   virtual ossimDpt getOrigin() const;
+
+   virtual std::ostream& print(std::ostream& out) const;
+   
+   virtual bool saveState(ossimKeywordlist& kwl,
+                   const char* prefix = 0)const;
+   
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                  const char* prefix = 0);
+   
+   void setConvergenceThreshold(const double& new_threshold);
+   
+   void setMaxIterations(int new_max_iters);
+
+   void setDxDy(const ossimDpt& dxdy);
+
+protected:
+   ossim2dTo2dTransform();
+   virtual ~ossim2dTo2dTransform(){}
+   double theConvergenceThreshold;
+   int    theMaxIterations;
+
+   ossimDpt theDxDy;
+   
+TYPE_DATA      
+};
+
+#endif
+
diff --git a/ossim/include/ossim/base/ossim2dTo2dTransformFactory.h b/ossim/include/ossim/base/ossim2dTo2dTransformFactory.h
new file mode 100644
index 0000000..224c40b
--- /dev/null
+++ b/ossim/include/ossim/base/ossim2dTo2dTransformFactory.h
@@ -0,0 +1,45 @@
+//**************************************************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: Class declaration of ossim2dTo2dTransformFactory.
+//
+//**************************************************************************************************
+// $Id$
+#ifndef ossim2dTo2dTransformFactory_HEADER
+#define ossim2dTo2dTransformFactory_HEADER
+#include <ossim/base/ossim2dTo2dTransformFactoryBase.h>
+
+class ossim2dTo2dTransform;
+class OSSIM_DLL ossim2dTo2dTransformFactory : public ossim2dTo2dTransformFactoryBase
+{
+public:
+   ossim2dTo2dTransformFactory(){}
+   static ossim2dTo2dTransformFactory* instance();
+   
+   /**
+    * Take a transform type name.
+    */
+   virtual ossim2dTo2dTransform* createTransform(const ossimString& name)const;
+   
+   /**
+    * Take a keywordlist.
+    */
+   virtual ossim2dTo2dTransform* createTransform(const ossimKeywordlist& kwl,
+                                                 const char* prefix)const;
+   
+   /*!
+    * This should return the type name of all objects in all factories.
+    * This is the name used to construct the objects dynamially and this
+    * name must be unique.
+    */
+   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
+  
+protected:
+   static ossim2dTo2dTransformFactory* m_instance;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/base/ossim2dTo2dTransformFactoryBase.h b/ossim/include/ossim/base/ossim2dTo2dTransformFactoryBase.h
new file mode 100644
index 0000000..193d74d
--- /dev/null
+++ b/ossim/include/ossim/base/ossim2dTo2dTransformFactoryBase.h
@@ -0,0 +1,50 @@
+#ifndef ossim2dTo2dTransformFactoryBase_HEADER
+#define ossim2dTo2dTransformFactoryBase_HEADER
+#include <ossim/base/ossimObjectFactory.h>
+//**************************************************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: Class declaration of ossim2dTo2dTransformFactoryBase.
+//
+//**************************************************************************************************
+// $Id$
+#include <ossim/base/ossim2dTo2dTransform.h>
+
+class OSSIM_DLL ossim2dTo2dTransformFactoryBase : public ossimObjectFactory
+{
+public:
+   
+   /**
+    * Creates an object given a type name.
+    */
+   virtual ossimObject* createObject(const ossimString& typeName)const
+   {
+      return createTransform(typeName);
+   }
+   
+   /**
+    * Creates and object given a keyword list.
+    */
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
+                                     const char* prefix=0)const
+   {
+      return createTransform(kwl, prefix);
+   }
+   
+   /**
+    * Take a transform type name.
+    */
+   virtual ossim2dTo2dTransform* createTransform(const ossimString& name)const=0;
+   
+   /**
+    * Take a keywordlist.
+    */
+   virtual ossim2dTo2dTransform* createTransform(const ossimKeywordlist& kwl,
+                                                 const char* prefix)const=0;
+protected:
+};
+#endif
+
diff --git a/ossim/include/ossim/base/ossim2dTo2dTransformRegistry.h b/ossim/include/ossim/base/ossim2dTo2dTransformRegistry.h
new file mode 100644
index 0000000..3db9075
--- /dev/null
+++ b/ossim/include/ossim/base/ossim2dTo2dTransformRegistry.h
@@ -0,0 +1,85 @@
+//**************************************************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: Class declaration of ossim2dTo2dTransformRegistry.
+//
+//**************************************************************************************************
+// $Id$
+#ifndef ossim2dTo2dTransformRegistry_HEADER
+#define ossim2dTo2dTransformRegistry_HEADER
+#include <ossim/base/ossimObjectFactory.h>
+#include <ossim/base/ossimRtti.h>
+#include <ossim/base/ossim2dTo2dTransformFactoryBase.h>
+#include <ossim/base/ossim2dTo2dTransform.h>
+#include <vector>
+#include <ossim/base/ossimFactoryListInterface.h>
+
+class OSSIM_DLL ossim2dTo2dTransformRegistry : public ossimObjectFactory,
+                                               public ossimFactoryListInterface<ossim2dTo2dTransformFactoryBase,
+                                                                                ossim2dTo2dTransform>
+{
+public:
+   virtual ~ossim2dTo2dTransformRegistry(){}
+   static ossim2dTo2dTransformRegistry* instance();
+   
+   /*!
+    * Creates an object given a type name.
+    */
+   virtual ossimObject* createObject(const ossimString& typeName)const
+   {
+      return createObjectFromRegistry(typeName);
+   }
+   
+   /*!
+    * Creates and object given a keyword list.
+    */
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
+                                     const char* prefix=0)const
+   {
+      return createObjectFromRegistry(kwl, prefix);
+   }
+   /*!
+    * Creates an object given a type name.
+    */
+   virtual ossim2dTo2dTransform* createTransform(const ossimString& typeName)const
+   {
+      return createNativeObjectFromRegistry(typeName);
+   }
+   
+   /*!
+    * Creates and object given a keyword list.
+    */
+   virtual ossim2dTo2dTransform* createTransform(const ossimKeywordlist& kwl,
+                                                 const char* prefix=0)const
+   {
+      return createNativeObjectFromRegistry(kwl, prefix);
+   }
+   
+   /*!
+    * This should return the type name of all objects in all factories.
+    * This is the name used to construct the objects dynamially and this
+    * name must be unique.
+    */
+   virtual void getTypeNameList(std::vector<ossimString>& typeList)const
+   {
+      getAllTypeNamesFromRegistry(typeList);
+   }
+   
+protected:
+   ossim2dTo2dTransformRegistry()
+   :ossimObjectFactory()
+   {}
+   
+   ossim2dTo2dTransformRegistry( const ossim2dTo2dTransformRegistry& rhs )
+   :ossimObjectFactory(rhs)
+   {}
+   void operator =(const ossim2dTo2dTransformRegistry&){}
+   static ossim2dTo2dTransformRegistry* m_instance;
+   
+   TYPE_DATA
+};
+#endif
+
diff --git a/include/ossim/base/ossimActiveEdgeTable.h b/ossim/include/ossim/base/ossimActiveEdgeTable.h
similarity index 100%
rename from include/ossim/base/ossimActiveEdgeTable.h
rename to ossim/include/ossim/base/ossimActiveEdgeTable.h
diff --git a/include/ossim/base/ossimAdjSolutionAttributes.h b/ossim/include/ossim/base/ossimAdjSolutionAttributes.h
old mode 100755
new mode 100644
similarity index 100%
rename from include/ossim/base/ossimAdjSolutionAttributes.h
rename to ossim/include/ossim/base/ossimAdjSolutionAttributes.h
diff --git a/include/ossim/base/ossimAdjustableParameterInfo.h b/ossim/include/ossim/base/ossimAdjustableParameterInfo.h
similarity index 100%
rename from include/ossim/base/ossimAdjustableParameterInfo.h
rename to ossim/include/ossim/base/ossimAdjustableParameterInfo.h
diff --git a/ossim/include/ossim/base/ossimAdjustableParameterInterface.h b/ossim/include/ossim/base/ossimAdjustableParameterInterface.h
new file mode 100644
index 0000000..6f6fbf2
--- /dev/null
+++ b/ossim/include/ossim/base/ossimAdjustableParameterInterface.h
@@ -0,0 +1,157 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts (gpotts at imagelinks.com)
+//
+//*************************************************************************
+// $Id: ossimAdjustableParameterInterface.h 22892 2014-09-22 15:17:33Z okramer $
+#ifndef ossimAdjustableParameterInterface_HEADER
+#define ossimAdjustableParameterInterface_HEADER
+#include <ossim/base/ossimRtti.h>
+#include <vector>
+#include <ossim/base/ossimAdjustmentInfo.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimObject.h>
+
+class OSSIMDLLEXPORT ossimAdjustableParameterInterface
+{
+public:
+   ossimAdjustableParameterInterface();
+   ossimAdjustableParameterInterface(const ossimAdjustableParameterInterface& rhs);
+   virtual ~ossimAdjustableParameterInterface(){}
+   void newAdjustment(ossim_uint32 numberOfParameters=0);
+   void setAdjustmentDescription(const ossimString& description);
+   ossimString getAdjustmentDescription()const;
+
+   //! Returns adjustmentDescription of specific adjustmentInfo
+   ossimString getAdjustmentDescription(ossim_uint32 adjustmentIdx)const;
+
+   void setCurrentAdjustment(ossim_uint32 adjustmentIndex, bool notify=false);
+
+   //! Sets the current adjustment to the adjustment with a matching description. 
+   //! Returns true if successfully matched.
+   bool setCurrentAdjustment(const ossimString& description, bool notify=false);
+
+   void eraseAdjustment(bool notify);
+   void eraseAdjustment(ossim_uint32 idx, bool notify);
+   virtual void initAdjustableParameters();
+   void resetAdjustableParameters(bool notify=false);
+   void copyAdjustment(ossim_uint32 idx, bool notify);
+   void copyAdjustment(bool notify = false);
+
+   virtual ossimObject* getBaseObject()=0;
+   virtual const ossimObject* getBaseObject()const=0;
+   
+   /*!
+    * Will copy the adjustment but will set the new center to the
+    * applied current center plus the application of the adjustment
+    *
+    */
+   void keepAdjustment(ossim_uint32 idx, bool createCopy);
+   virtual void keepAdjustment(bool createCopy=true);
+   
+
+   const ossimAdjustableParameterInterface& operator = (const ossimAdjustableParameterInterface& rhs);
+   void removeAllAdjustments();
+   ossim_uint32 getNumberOfAdjustableParameters()const;
+   double       getAdjustableParameter(ossim_uint32 idx)const;
+   virtual void setAdjustableParameter(ossim_uint32 idx, double value,
+                                       bool notify=false);
+   virtual void setAdjustableParameter(ossim_uint32 idx,
+                                       double value,
+                                       double sigma,
+                                       bool notify=false);
+   double       getParameterSigma(ossim_uint32 idx)const;
+   void         setParameterSigma(ossim_uint32 idx,
+                                  double value,
+                                  bool notify=false);
+   ossimUnitType getParameterUnit(ossim_uint32 idx)const;
+   void          setParameterUnit(ossim_uint32 idx, ossimUnitType unit);
+   void          setParameterUnit(ossim_uint32 idx, const ossimString& unit);
+
+   void           setParameterCenter(ossim_uint32 idx,
+                                     double center,
+                                     bool notify = false);
+   double        getParameterCenter(ossim_uint32 idx)const;
+   double        computeParameterOffset(ossim_uint32 idx)const;
+   void          setParameterOffset(ossim_uint32 idx,
+                                    ossim_float64 value,
+                                    bool notify = false);
+   
+   ossimString   getParameterDescription(ossim_uint32 idx)const;
+   void          setParameterDescription(ossim_uint32 idx,
+                                         const ossimString& descrption);
+
+   ossim_int32 findParameterIdxGivenDescription(ossim_uint32 adjustmentIdx,
+                                                const ossimString& name)const;
+   ossim_int32 findParameterIdxContainingDescription(ossim_uint32 adjustmentIdx,
+                                                     const ossimString& name)const;
+   
+   bool isParameterLocked(ossim_uint32 idx)const;
+
+   void setParameterLockFlag(ossim_uint32 idxParam, bool flag);
+   bool getParameterLockFlag(ossim_uint32 idx)const;
+
+   void lockAllParametersCurrentAdjustment();
+   void unlockAllParametersCurrentAdjustment();
+
+   void lockAllParameters(ossim_uint32 idxAdjustment);
+   void unlockAllParameters(ossim_uint32 idxAdjustment);
+   
+   void resizeAdjustableParameterArray(ossim_uint32 numberOfParameters);
+
+   void setAdjustment(const ossimAdjustmentInfo& adj, bool notify=false);
+   void setAdjustment(ossim_uint32 idx, const ossimAdjustmentInfo& adj, bool notify=false);
+   
+   void addAdjustment(const ossimAdjustmentInfo& adj, bool notify);
+   void getAdjustment(ossimAdjustmentInfo& adj) const;
+   void getAdjustment(ossim_uint32 idx, ossimAdjustmentInfo& adj) const;
+   
+   ossim_uint32 getNumberOfAdjustments()const;
+   ossim_uint32 getCurrentAdjustmentIdx()const;
+   
+   void setDirtyFlag(bool flag=true);
+   void setAllDirtyFlag(bool flag = true);
+   bool hasDirtyAdjustments()const;
+   
+   //! Saves the current active adjustment to the KWL file. If an adjustment of the same 
+   //! description already exists in the KWL, it is replaced by the current adjustment.
+   //! The object is synced up with contents of KWL.
+   virtual void saveCurrentAdjustmentOnly(ossimKeywordlist &kwl, 
+                                          const ossimString& prefix=ossimString(""));
+
+   bool saveAdjustments(ossimKeywordlist& kwl,
+                        const ossimString& prefix=ossimString(""))const;
+   bool loadAdjustments(const ossimKeywordlist& kwl,
+                        const ossimString& prefix=ossimString(""));
+
+   //! Provides the derived adjustable class an opportunity to update its state after a param change.
+   virtual void updateModel() {}
+
+   //!  Dumps the currently active adjustment to ostream.
+   std::ostream& print(std::ostream& out) const;
+
+protected:
+   //! Returns true if specified parameter has been modified since last setAllChangeFlag(false) call.
+   bool paramChanged(ossim_uint32 param_idx) const { return theChangeFlags[param_idx]; }
+
+   //! Sets all the change flags to the boolean indicated to indicate parameters are changed (TRUE)
+   //! or not (FALSE).
+   void setAllChangeFlags(bool areChanged);
+
+   //! Initializes the change flags to TRUE.
+   void initChangeFlags();
+   
+private:
+   std::vector<bool> theChangeFlags;
+   std::vector<ossimAdjustmentInfo> theAdjustmentList;
+   ossim_uint32                     theCurrentAdjustment;
+   
+public:
+   virtual void adjustableParametersChanged();
+   
+TYPE_DATA
+};
+
+#endif
diff --git a/ossim/include/ossim/base/ossimAdjustmentExecutive.h b/ossim/include/ossim/base/ossimAdjustmentExecutive.h
new file mode 100644
index 0000000..2648d00
--- /dev/null
+++ b/ossim/include/ossim/base/ossimAdjustmentExecutive.h
@@ -0,0 +1,173 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Hicks
+// test
+//
+// Description: Executive class for adjustment operations.
+//----------------------------------------------------------------------------
+#ifndef ossimAdjustmentExecutive_HEADER
+#define ossimAdjustmentExecutive_HEADER
+
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimObservationSet.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/matrix/newmat.h>
+#include <ossim/matrix/newmatap.h>
+#include <ossim/matrix/newmatio.h>
+
+#include <ctime>
+#include <vector>
+#include <iostream>
+
+class ossimWLSBundleSolution;
+class ossimAdjSolutionAttributes;
+
+
+class OSSIM_DLL ossimAdjustmentExecutive : public ossimObject
+{
+public:
+
+   /**
+    * @brief constructor
+    */
+   ossimAdjustmentExecutive(std::ostream& report);
+   
+   /** @brief ossimObservationSet constructor
+    *
+    * @param obsSet     tiepoint observation set.
+    */
+   ossimAdjustmentExecutive(ossimObservationSet& obsSet, std::ostream& report);
+   
+
+   /** @brief destructor */
+   ~ossimAdjustmentExecutive();
+   
+   /**
+    * @brief initialize adjustment solution
+    *
+    * @param obsSet     tiepoint observation set.
+    *
+    * @return true on success, false on error.
+    */
+   bool initializeSolution(ossimObservationSet& obsSet);
+
+   /**
+    * @brief run adjustment solution
+    *
+    * @return true on success, false on error.
+    */
+   bool runSolution();
+
+   /**
+    * @brief summarize solution
+    */
+   void summarizeSolution() const;
+
+
+   /**
+    * @brief compute mean and RMS error of residuals
+    *
+    * @param res   image residual matrix.
+    *
+    * @return true on success, false on error.
+    */
+   bool computeResidualStatistics(NEWMAT::Matrix& res);
+
+
+   /**
+    * @brief compute SEUW
+    *
+    * @return   standard error of unit weight.
+    */
+   double computeSEUW();
+   
+   /**
+    * @brief Print parameter correction method.
+    */
+   std::ostream& printParameterCorrectionSummary(std::ostream& out) const;
+   
+   /**
+    * @brief Print observation correction method.
+    */
+   std::ostream& printObservationCorrectionSummary(std::ostream& out) const;
+   
+   /**
+    * @brief Print residuals method.
+    */
+   std::ostream& printResidualSummary(std::ostream& out) const;
+
+
+   inline bool isValid() const { return theExecValid; }
+
+   void setMaxIter(const int maxIter) { theMaxIter = maxIter; }
+
+   void setConvCriteria(const int convCriteria) { theConvCriteria = convCriteria; }
+
+protected:
+   bool theExecValid;
+
+   // Observation set
+   ossimObservationSet* theObsSet;
+
+   // Optimizer
+   ossimWLSBundleSolution* theSol;
+
+   // Attribute interface
+   ossimAdjSolutionAttributes* theSolAttributes;
+
+   // Status parameters
+   double theConvCriteria;
+   int    theMaxIter;
+   bool   theMaxIterExceeded;
+   bool   theSolDiverged;
+   bool   theSolConverged;
+
+   // Traits
+   int theNumObsInSet;
+   int theNumImages;
+   int theNumParams;
+   int theNumMeasurements;
+   int theRankN;
+
+   // Solution arrays
+   NEWMAT::Matrix theMeasResiduals; // theNumMeasurements X 2
+   NEWMAT::Matrix theObjPartials;   // theNumObjObs*3 X 2
+   NEWMAT::Matrix theParPartials;   // theNumImages*(npar/image) X 2
+
+   // Statistics
+   double theXrms;
+   double theYrms;
+   double theXmean;
+   double theYmean;
+   std::vector<double> theSEUW;
+
+   // Adjustable parameter info
+   std::vector<double> theParInitialValues;
+   std::vector<double> theParInitialStdDev;
+   std::vector<ossimString> theParDesc;
+   std::vector<int> theImgs;
+
+   // Observation info
+   std::vector<double> theObsInitialValues;
+   std::vector<double> theObsInitialStdDev;
+   
+   std::ostream& theRep;
+                                  
+   
+   /**
+    * @brief Update adjustable parameters.
+    */
+   bool updateParameters();
+   
+   /**
+    * @brief Update observatin.
+    */
+   bool updateObservations();
+
+};
+
+#endif // #ifndef ossimAdjustmentExecutive_HEADER
diff --git a/ossim/include/ossim/base/ossimAdjustmentInfo.h b/ossim/include/ossim/base/ossimAdjustmentInfo.h
new file mode 100644
index 0000000..d0bb6df
--- /dev/null
+++ b/ossim/include/ossim/base/ossimAdjustmentInfo.h
@@ -0,0 +1,50 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts (gpotts at imagelinks.com)
+//
+//*************************************************************************
+// $Id: ossimAdjustmentInfo.h 23258 2015-04-15 15:54:10Z dburken $
+#ifndef ossimAdjustmentInfo_HEADER
+#define ossimAdjustmentInfo_HEADER
+#include <vector>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimAdjustableParameterInfo.h>
+
+class OSSIM_DLL ossimAdjustmentInfo
+{
+public:
+   friend std::ostream& operator <<(std::ostream& out, const ossimAdjustmentInfo& data);
+   
+   
+   ossimAdjustmentInfo(int numberOfAdjustableParameters=0);
+   ossimAdjustmentInfo(const ossimAdjustmentInfo& rhs);
+   
+   void setNumberOfAdjustableParameters(ossim_uint32 numberOfAdjustableParameters);
+   ossim_uint32 getNumberOfAdjustableParameters()const;
+   ossimString getDescription()const;
+   void setDescription(const ossimString& description);
+   bool isDirty()const;
+   void setDirtyFlag(bool flag=true);
+   void setLockParameterFlag(bool flag,
+                             ossim_uint32 idx);
+   void keep();
+   
+   std::vector<ossimAdjustableParameterInfo>& getParameterList();
+   const std::vector<ossimAdjustableParameterInfo>& getParameterList()const;
+   void setLockFlag(bool flag,ossim_uint32 idx);
+   
+   bool saveState(ossimKeywordlist& kwl,
+                  const ossimString& prefix=ossimString(""))const;
+   bool loadState(const ossimKeywordlist& kwl,
+                  const ossimString& prefix=ossimString(""));
+   
+private:
+   std::vector<ossimAdjustableParameterInfo> theParameterList;
+   ossimString                               theDescription;
+   mutable bool                              theDirtyFlag;
+};
+
+#endif
diff --git a/include/ossim/base/ossimAffineTransform.h b/ossim/include/ossim/base/ossimAffineTransform.h
similarity index 100%
rename from include/ossim/base/ossimAffineTransform.h
rename to ossim/include/ossim/base/ossimAffineTransform.h
diff --git a/include/ossim/base/ossimApplicationUsage.h b/ossim/include/ossim/base/ossimApplicationUsage.h
similarity index 100%
rename from include/ossim/base/ossimApplicationUsage.h
rename to ossim/include/ossim/base/ossimApplicationUsage.h
diff --git a/ossim/include/ossim/base/ossimArgumentParser.h b/ossim/include/ossim/base/ossimArgumentParser.h
new file mode 100644
index 0000000..2e60508
--- /dev/null
+++ b/ossim/include/ossim/base/ossimArgumentParser.h
@@ -0,0 +1,230 @@
+//-------------------------------------------------------------------------
+//
+// This code was taken from Open Scene Graph and incorporated from into
+// OSSIM.
+//
+//-------------------------------------------------------------------------
+// $Id: ossimArgumentParser.h 22491 2013-11-26 18:17:29Z dburken $
+#ifndef ossimArgumentParser_HEADER
+#define ossimArgumentParser_HEADER 1
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimString.h>
+#include <map>
+#include <string>
+#include <iosfwd>
+
+class ossimApplicationUsage;
+
+class OSSIMDLLEXPORT ossimArgumentParser
+{
+public:
+   
+   class ossimParameter
+   {
+   public:
+      enum ossimParameterType
+      {
+         OSSIM_FLOAT_PARAMETER,
+         OSSIM_DOUBLE_PARAMETER,
+         OSSIM_INT_PARAMETER,
+         OSSIM_UNSIGNED_INT_PARAMETER,
+         OSSIM_STRING_PARAMETER,
+      };
+      
+      union ossimValueUnion
+      {
+         float*          theFloat;
+         double*         theDouble;
+         int*            theInt;
+         unsigned int*   theUint;
+         std::string*    theString;
+      };
+      
+      ossimParameter(float& value)
+      {
+         theType = OSSIM_FLOAT_PARAMETER; theValue.theFloat = &value;
+      }
+      
+      ossimParameter(double& value)
+      {
+         theType = OSSIM_DOUBLE_PARAMETER; theValue.theDouble = &value;
+      }
+      
+      ossimParameter(int& value)
+      {
+         theType = OSSIM_INT_PARAMETER; theValue.theInt = &value;
+      }
+      
+      ossimParameter(unsigned int& value)
+      {
+         theType = OSSIM_UNSIGNED_INT_PARAMETER; theValue.theUint = &value;
+      }
+      
+      ossimParameter(std::string& value)
+      {
+         theType = OSSIM_STRING_PARAMETER; theValue.theString = &value;
+      }
+      
+      ossimParameter(ossimString& value)
+      {
+         theType = OSSIM_STRING_PARAMETER; theValue.theString =
+                                              &(value.string());
+      }
+      
+      bool valid(const char* str) const;
+      bool assign(const char* str);
+      
+   protected:
+      
+      ossimParameterType   theType;
+      ossimValueUnion      theValue;
+   };
+   
+   /** return return true if specified string is an option in the form of
+    * -option or --option .
+    */
+   static bool isOption(const char* str);
+   
+   /** return return true if string is any other string apart from an option.*/
+   static bool isString(const char* str);
+   
+   /** return return true if specified parameter is an number.*/
+   static bool isNumber(const char* str);
+   
+public:
+   
+   ossimArgumentParser(int* argc,char **argv);
+
+   ~ossimArgumentParser();
+
+   /** @brief Initialize from command arguments. */
+   void initialize(int* argc, const char **argv); 
+   
+   void setApplicationUsage(ossimApplicationUsage* usage) { theUsage = usage; }
+   ossimApplicationUsage* getApplicationUsage() { return theUsage; }
+   const ossimApplicationUsage* getApplicationUsage() const { return theUsage; }
+   
+   /** return the argument count.*/
+   int& argc() { return *theArgc; }
+   
+   /** return the argument array.*/
+   char** argv() { return theArgv; }
+   
+   /** return char* argument at specificed position.*/
+   char* operator [] (int pos) { return theArgv[pos]; }
+   
+   /** return const char* argument at specificed position.*/
+   const char* operator [] (int pos) const { return theArgv[pos]; }
+   
+   /** return the application name, as specified by argv[0] */
+   std::string getApplicationName() const;
+   
+   /** return the position of an occurence of a string in the argument list.
+    * return -1 when no string is found.*/      
+   int find(const std::string& str) const;
+   
+   /** return return true if specified parameter is an option in the form of -option or --option .*/
+   bool isOption(int pos) const;
+   
+   /** return return true if specified parameter is an string, which can be any other string apart from an option.*/
+   bool isString(int pos) const;
+   
+   /** return return true if specified parameter is an number.*/
+   bool isNumber(int pos) const;
+   
+   bool containsOptions() const;
+   
+   /** remove one or more arguments from the argv argument list, and decrement the argc respectively.*/
+   void remove(int pos,int num=1);
+   
+   /** return true if specified argument matches string.*/        
+   bool match(int pos, const std::string& str) const;
+   
+   /**
+    * search for an occurance of a string in the argument list, on sucess
+    * remove that occurance from the list and return true, otherwise
+    * return false.
+    */
+   bool read(const std::string& str);
+   bool read(const std::string& str, ossimParameter value1);
+   bool read(const std::string& str, ossimParameter value1,
+             ossimParameter value2);
+   bool read(const std::string& str, ossimParameter value1,
+             ossimParameter value2, ossimParameter value3);
+   bool read(const std::string& str, ossimParameter value1,
+             ossimParameter value2, ossimParameter value3,
+             ossimParameter value4);
+   bool read(const std::string& str, ossimParameter value1,
+             ossimParameter value2, ossimParameter value3,
+             ossimParameter value4, ossimParameter value5);
+   bool read(const std::string& str, ossimParameter value1,
+             ossimParameter value2, ossimParameter value3,
+             ossimParameter value4, ossimParameter value5,
+             ossimParameter value6);
+   
+   /**
+    * @return The number of parameters of type value associated with specified
+    * option, or -1 if option not found
+    */
+   int numberOfParams(const std::string& str,
+                      const ossimParameter& value) const;
+   
+   /**
+    * if the argument value at the position pos matches specified string, and
+    * subsequent paramters are also matched then set the paramter values and
+    * remove the from the list of arguments.
+    */
+   bool read(int pos, const std::string& str);
+   bool read(int pos, const std::string& str, ossimParameter value1);
+   bool read(int pos, const std::string& str, ossimParameter value1,
+             ossimParameter value2);
+   bool read(int pos, const std::string& str, ossimParameter value1,
+             ossimParameter value2, ossimParameter value3);
+   bool read(int pos, const std::string& str, ossimParameter value1,
+             ossimParameter value2, ossimParameter value3,
+             ossimParameter value4);
+   
+   
+   enum ossimErrorSeverity
+   {
+      OSSIM_BENIGN = 0,
+      OSSIM_CRITICAL = 1
+   };
+   
+   typedef std::map<std::string,ossimErrorSeverity> ossimErrorMessageMap;
+   
+   /**
+    * @return The error flag, true if an error has occured when
+    * reading arguments.
+    */
+   bool errors(ossimErrorSeverity severity=OSSIM_BENIGN) const;
+   
+   /** report an error message by adding to the ErrorMessageMap.*/
+   void reportError(const std::string& message,
+                    ossimErrorSeverity severity=OSSIM_CRITICAL);
+   
+   /** for each remaining option report it as an unrecongnized.*/
+   void reportRemainingOptionsAsUnrecognized(
+      ossimErrorSeverity severity=OSSIM_BENIGN);
+   
+   /** @return The error message, if any has occured.*/
+   ossimErrorMessageMap& getErrorMessageMap();
+   
+   /** @return The error message, if any has occured.*/
+   const ossimErrorMessageMap& getErrorMessageMap() const;
+   
+   /** write out error messages at an above specified .*/
+   void writeErrorMessages(std::ostream& output,
+                           ossimErrorSeverity sevrity=OSSIM_BENIGN);
+   
+   
+protected:
+   
+   int*                     theArgc;
+   char**                   theArgv;
+   ossimErrorMessageMap     theErrorMessageMap;
+   ossimApplicationUsage*   theUsage;
+        
+};
+
+#endif
diff --git a/include/ossim/base/ossimAxes.h b/ossim/include/ossim/base/ossimAxes.h
similarity index 100%
rename from include/ossim/base/ossimAxes.h
rename to ossim/include/ossim/base/ossimAxes.h
diff --git a/ossim/include/ossim/base/ossimBaseObjectFactory.h b/ossim/include/ossim/base/ossimBaseObjectFactory.h
new file mode 100644
index 0000000..71a77e5
--- /dev/null
+++ b/ossim/include/ossim/base/ossimBaseObjectFactory.h
@@ -0,0 +1,35 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+// Description:
+//
+//*************************************************************************
+// $Id: ossimBaseObjectFactory.h 22645 2014-02-28 12:45:52Z gpotts $
+#ifndef ossimBaseObjectFactory_HEADER
+#define ossimBaseObjectFactory_HEADER
+#include <ossim/base/ossimObjectFactory.h>
+
+class OSSIMDLLEXPORT ossimBaseObjectFactory : public ossimObjectFactory
+{
+public:
+  ossimBaseObjectFactory();
+   virtual ~ossimBaseObjectFactory(){}
+   
+   static ossimBaseObjectFactory* instance();
+   virtual ossimObject* createObject(const ossimString& typeName)const;
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
+                                     const char* prefix=0)const;
+   /*!
+    * This should return the type name of all objects in all factories.
+    * This is the name used to construct the objects dynamially and this
+    * name must be unique.
+    */
+   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
+   
+protected:
+   
+TYPE_DATA
+};
+#endif
diff --git a/include/ossim/base/ossimBilSplitter.h b/ossim/include/ossim/base/ossimBilSplitter.h
similarity index 100%
rename from include/ossim/base/ossimBilSplitter.h
rename to ossim/include/ossim/base/ossimBilSplitter.h
diff --git a/ossim/include/ossim/base/ossimBinaryDataProperty.h b/ossim/include/ossim/base/ossimBinaryDataProperty.h
new file mode 100644
index 0000000..acc71f7
--- /dev/null
+++ b/ossim/include/ossim/base/ossimBinaryDataProperty.h
@@ -0,0 +1,37 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+//*************************************************************************
+
+#ifndef ossimBinaryDataProperty_HEADER
+#define ossimBinaryDataProperty_HEADER
+
+#include <ossim/base/ossimProperty.h>
+#include <ossim/base/ossimRtti.h>
+
+#include <vector>
+
+class OSSIMDLLEXPORT ossimBinaryDataProperty : public ossimProperty
+{
+public:
+   ossimBinaryDataProperty(const ossimString& name=ossimString(""),
+      const std::vector<unsigned char>& binaryData = std::vector<unsigned char>());
+
+   virtual ~ossimBinaryDataProperty();
+
+   virtual bool setValue(const ossimString& value);
+
+   virtual void valueToString(ossimString& valueResult) const;
+
+   void setBinaryData(const vector<unsigned char>& binaryData);
+
+   const vector<unsigned char>& getBinaryData() const;
+
+private:
+   std::vector<unsigned char> theBinaryData;
+
+TYPE_DATA
+};
+
+#endif
diff --git a/include/ossim/base/ossimBooleanProperty.h b/ossim/include/ossim/base/ossimBooleanProperty.h
similarity index 100%
rename from include/ossim/base/ossimBooleanProperty.h
rename to ossim/include/ossim/base/ossimBooleanProperty.h
diff --git a/include/ossim/base/ossimByteStreamBuffer.h b/ossim/include/ossim/base/ossimByteStreamBuffer.h
similarity index 100%
rename from include/ossim/base/ossimByteStreamBuffer.h
rename to ossim/include/ossim/base/ossimByteStreamBuffer.h
diff --git a/ossim/include/ossim/base/ossimCallback1.h b/ossim/include/ossim/base/ossimCallback1.h
new file mode 100644
index 0000000..ea0658a
--- /dev/null
+++ b/ossim/include/ossim/base/ossimCallback1.h
@@ -0,0 +1,82 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimCallback1wRet.h
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Simple templated callback class that takes a single parameter(argument) "P1"
+// with void return.
+//
+// See link for more detail description:
+// http://www.tutok.sk/fastgl/callback.html
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimCallback1_HEADER
+#define ossimCallback1_HEADER 1
+
+/**
+ * @class ossimCallback1
+ *
+ * Usage example, note template params can be anything:
+ *
+ * Caller interface to register callback:
+ *
+ * @code
+ * void registerCallback(ossimCallback1<const ossimFilename&>* cb);
+ * @endcode
+ *
+ * Callee creation of call back mechanism:
+ *
+ * @code
+ * class ProcessFileCB: public ossimCallback1<const ossimFilename&>
+ * {
+ * public:
+ *    ProcessFileCB(
+ *       ossimImageElevationDatabase* obj,
+ *       void (ossimImageElevationDatabase::*func)(const ossimFilename&))
+ *       :
+ *       m_obj(obj),
+ *       m_func(func)
+ *    {}
+ *       
+ *    virtual void operator()(const ossimFilename& file) const
+ *    {
+ *       ( m_obj->*m_func)(file);
+ *    }
+ * 
+ * private:
+ *    ossimImageElevationDatabase* m_obj;
+ *    void (ossimImageElevationDatabase::*m_func)(const ossimFilename& file);
+ * };
+ * @endcode
+ *
+ * Making/registering a callback.
+ *
+ * @code
+ * ossimFileWalker* fw = new ossimFileWalker();
+ *
+ * ossimCallback1wRet<const ossimFilename&>* cb =
+ *    new ProcessFileCB(this, &ossimImageElevationDatabase::processFile);
+ *
+ * fw->registerProcessFileCallback(cb);
+ *
+ * @endcode
+ */
+template <class P1> class ossimCallback1
+{
+public:
+   ossimCallback1(){}
+   virtual ~ossimCallback1(){}
+   virtual void operator()(P1 p1) const = 0;
+};
+
+#endif /* #ifndef ossimCallback1_HEADER */
+
diff --git a/ossim/include/ossim/base/ossimCallback1wRet.h b/ossim/include/ossim/base/ossimCallback1wRet.h
new file mode 100644
index 0000000..4032978
--- /dev/null
+++ b/ossim/include/ossim/base/ossimCallback1wRet.h
@@ -0,0 +1,82 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimCallback1wRet.h
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Simple templated callback class that takes a single parameter(argument) "P1"
+// and has a return "RT".
+//
+// See link for more detail description:
+// http://www.tutok.sk/fastgl/callback.html
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimCallback1wRet_HEADER
+#define ossimCallback1wRet_HEADER 1
+
+/**
+ * @class ossimCallback1wRet
+ *
+ * Usage example, note template params can be anything:
+ *
+ * Caller interface to register callback:
+ *
+ * @code
+ * void registerCallback(ossimCallback1wRet<const ossimFilename&, bool>* cb);
+ * @endcode
+ *
+ * Callee creation of call back mechanism:
+ *
+ * @code
+ * class ProcessFileCB: public ossimCallback1wRet<const ossimFilename&, bool>
+ * {
+ * public:
+ *    ProcessFileCB(
+ *       ossimImageElevationDatabase* obj,
+ *       bool (ossimImageElevationDatabase::*func)(const ossimFilename&))
+ *       :
+ *       m_obj(obj),
+ *       m_func(func)
+ *    {}
+ *       
+ *    virtual bool operator()(const ossimFilename& file) const
+ *    {
+ *       return ( m_obj->*m_func)(file);
+ *    }
+ * 
+ * private:
+ *    ossimImageElevationDatabase* m_obj;
+ *    bool (ossimImageElevationDatabase::*m_func)(const ossimFilename& file);
+ * };
+ * @endcode
+ *
+ * Making/registering a callback.
+ *
+ * @code
+ * ossimFileWalker* fw = new ossimFileWalker();
+ *
+ * ossimCallback1wRet<const ossimFilename&, bool>* cb =
+ *    new ProcessFileCB(this, &ossimImageElevationDatabase::processFile);
+ *
+ * fw->registerProcessFileCallback(cb);
+ *
+ * @endcode
+ */
+template <class P1, class RT> class ossimCallback1wRet
+{
+public:
+   ossimCallback1wRet(){}
+   virtual ~ossimCallback1wRet(){}
+   virtual RT operator()(P1 p1) const = 0;
+};
+
+#endif /* #ifndef ossimCallback1wRet_HEADER */
+
diff --git a/ossim/include/ossim/base/ossimCallback2wRet.h b/ossim/include/ossim/base/ossimCallback2wRet.h
new file mode 100644
index 0000000..59c38d4
--- /dev/null
+++ b/ossim/include/ossim/base/ossimCallback2wRet.h
@@ -0,0 +1,83 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimCallback2wRet.h
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Simple templated callback class that takes a two parameters(arguments) "P1"
+// and has a return "RT".
+//
+// See link for more detail description:
+// http://www.tutok.sk/fastgl/callback.html
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimCallback2wRet_HEADER
+#define ossimCallback2wRet_HEADER 1
+
+/**
+ * @class ossimCallback2wRet
+ *
+ * Usage example, note template params can be anything:
+ *
+ * Caller interface to register callback:
+ *
+ * @code
+ * void registerCallback(ossimCallback2wRet<const ossimFilename&, bool&, bool>* cb);
+ * @endcode
+ *
+ * Callee creation of call back mechanism:
+ *
+ * @code
+ * class ProcessFileCB: public ossimCallback2wRet<const ossimFilename&, bool&, bool>
+ * {
+ * public:
+ *    ProcessFileCB(
+ *       ossimImageElevationDatabase* obj,
+ *       bool (ossimImageElevationDatabase::*func)(const ossimFilename&, bool&))
+ *       :
+ *       m_obj(obj),
+ *       m_func(func)
+ *    {}
+ *       
+ *    virtual bool operator()(const ossimFilename& file, bool& flag) const
+ *    {
+ *       return ( m_obj->*m_func)(file, flag);
+ *    }
+ * 
+ * private:
+ *    ossimImageElevationDatabase* m_obj;
+ *    bool (ossimImageElevationDatabase::*m_func)(const ossimFilename& file, bool& flag);
+ * };
+ * @endcode
+ *
+ * Making/registering a callback.
+ *
+ * @code
+ * ossimFileWalker* fw = new ossimFileWalker();
+ *
+ * ossimCallback2wRet<const ossimFilename&, bool&, bool>* cb =
+ *    new ProcessFileCB(this, &ossimImageElevationDatabase::processFile);
+ *
+ * fw->registerProcessFileCallback(cb);
+ *
+ * @endcode
+ */
+
+template <class P1, class P2, class RT> class ossimCallback2wRet
+{
+public:
+   ossimCallback2wRet(){}
+   virtual ~ossimCallback2wRet(){}
+   virtual RT operator()(P1 p1, P2 p2) const = 0;
+};
+
+#endif /* #ifndef ossimCallback2wRet_HEADER */
+
diff --git a/include/ossim/base/ossimCmyVector.h b/ossim/include/ossim/base/ossimCmyVector.h
similarity index 100%
rename from include/ossim/base/ossimCmyVector.h
rename to ossim/include/ossim/base/ossimCmyVector.h
diff --git a/include/ossim/base/ossimColorProperty.h b/ossim/include/ossim/base/ossimColorProperty.h
similarity index 100%
rename from include/ossim/base/ossimColorProperty.h
rename to ossim/include/ossim/base/ossimColorProperty.h
diff --git a/include/ossim/base/ossimColumnVector3d.h b/ossim/include/ossim/base/ossimColumnVector3d.h
similarity index 100%
rename from include/ossim/base/ossimColumnVector3d.h
rename to ossim/include/ossim/base/ossimColumnVector3d.h
diff --git a/include/ossim/base/ossimColumnVector4d.h b/ossim/include/ossim/base/ossimColumnVector4d.h
similarity index 100%
rename from include/ossim/base/ossimColumnVector4d.h
rename to ossim/include/ossim/base/ossimColumnVector4d.h
diff --git a/ossim/include/ossim/base/ossimCommon.h b/ossim/include/ossim/base/ossimCommon.h
new file mode 100644
index 0000000..ba2b317
--- /dev/null
+++ b/ossim/include/ossim/base/ossimCommon.h
@@ -0,0 +1,661 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts, with some additions and modifciations by
+// Patrick Melody
+//
+// Description: Common file for utility functions.
+//
+//*************************************************************************
+// $Id: ossimCommon.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimCommon_HEADER
+#define ossimCommon_HEADER 1
+
+
+// XXX nullify these for now, but eventually replace with a #include 
+#define ossimREQUIRE(expr) 
+#define ossimENSURE(expr)  
+#define ossimCHECK(expr) 
+#define ossimSTATIC_CHECK(expr,msg)  
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimString.h>
+#include <cfloat>
+#include <cmath>
+#include <istream>
+#include <sstream>
+#include <string>
+#include <vector>
+#include <iostream>
+#include <algorithm>
+#include <iterator>
+
+class ossimIpt;
+class ossimIrect;
+class ossimDpt;
+class ossimGpt;
+namespace NEWMAT
+{
+   class Matrix;
+}
+
+namespace ossim
+{
+   OSSIM_DLL std::istream& skipws(std::istream& in);
+   OSSIM_DLL bool isWhiteSpace(int c);
+    template<class T>
+/*     inline bool almostEqual(T x, T y, T tolerence = std::numeric_limits<T>::epsilon()) */
+/*         // are x and y within tolerance distance of each other? */
+/*         { return std::abs(x - y) <= tolerence; } */
+    inline bool almostEqual(T x, T y, T tolerence = FLT_EPSILON)
+        // are x and y within tolerance distance of each other?
+        { return std::fabs(x - y) <= tolerence; }
+
+    template <class T>
+    inline bool inInterval(T x, T a, T b)
+	// is x in the closed interval [a,b]?
+	{ return x >= a && x <= b; }
+
+    template <class T>
+    inline bool inOpenInterval(T x, T a, T b)
+	// is x in the open interval (a,b)?
+	{ return x > a && x < b; }
+
+   
+    /**
+     * isnan Test for floating point Not A Number (NAN) value.
+     * This should be used test for nan.
+     * DO NOT USE operator==.  Like "if (height == ossim::nan())"
+     *
+     * @return true if nan, false if not.
+     *
+     * @see nan()
+     */
+#if defined(WIN32) || defined(_MSC_VER) && !defined(__CYGWIN__) && !defined(__MWERKS__)
+    inline bool isnan(const float& v) { return _isnan(v); }
+    inline bool isnan(const double& v) { return _isnan(v); }
+#elif defined(sun) || defined(__sun)
+#    if defined(__SVR4) || defined(__svr4__)
+/* Solaris */
+    inline bool isnan(const float& v)  { return ( ::isnan(v) ); }
+    inline bool isnan(const double& v) { return ( ::isnan(v) ); }
+#    else
+/* SunOS */
+    inline bool isnan(const float& v)  { return ( ::isnan(v) ); }
+    inline bool isnan(const double& v) { return ( ::isnan(v) ); }
+#   endif
+#else
+    inline bool isnan(const float& v)  { return ( std::isnan(v) ); }
+    inline bool isnan(const double& v) { return ( std::isnan(v) ); }
+#endif
+
+/* #if defined(WIN32) || defined(_MSC_VER) && !defined(__CYGWIN__) && !defined(__MWERKS__) */
+/*     inline bool isnan(const float& v) { return _isnan(v); } */
+/*     inline bool isnan(const double& v) { return _isnan(v); } */
+/* #else */
+/*     inline bool isnan(const float& v)  { return ( std::isnan(v) ); } */
+/*     inline bool isnan(const double& v) { return ( std::isnan(v) ); } */
+/* #endif */
+
+    /** @brief Class lets us see bit patterns of floats. */
+    class OSSIM_DLL IntFloatBitCoercion
+    {
+    public:
+       union
+       { 
+          ossim_int64 intname;
+          ossim_float64 floatname;
+       } bits;
+       IntFloatBitCoercion(ossim_int64 x)   { bits.intname = x;   }
+       IntFloatBitCoercion(ossim_float64 x) { bits.floatname = x; }
+    };
+    
+    /**
+     * @brief Declaration of nan part of nan() declared here for inline
+     * ossim::nan().
+     */
+    extern OSSIM_DLL_DATA(const IntFloatBitCoercion) nanValue;
+    
+    /**
+     * @brief Method to return ieee floating point double precision NAN.
+     *
+     * @return ieee floating point double precision NAN.
+     *
+     * @see isnan()
+     *
+     * @note casts seamlessly to float and long double.
+     *
+     * @note Use ossim::isnan(v) to test for nan.
+     * Like "if (isnan(myDoubleValue)) { doSomething; }"
+     * DO NOT USE operator==.  Like "if (myDoubleValue == ossim::nan())"
+     */
+    inline double nan() { return nanValue.bits.floatname; }
+
+   template <class T>
+   inline T abs(const T& value)
+   {
+      if(value < 0)
+      {
+         return -value;
+      }
+      return value;
+   }
+    template <class S, class T> 
+    inline T lerp(S x, T begin, T end)
+	// linear interpolation from begin to end by x
+	{ return x*(end - begin) + begin; }
+    
+    template <class T> 
+    inline T inverseLerp(T x, T begin, T end)
+	// inverse of lerp: if lerp(z,begin,end) = x, then inverseLerp(x,begin,end) = z.
+        // when begin=end, inverseLerp is underconstrained, so we define it to be 0.
+	{ return begin == end ? (ossim::isnan(x) ? x : T(0)) : (x - begin)/(end - begin); }
+
+    template <class S, class T> 
+    T quaderp(S x, T begin, T middle, T end)
+	// quadratic interpolation through begin,middle,end by x
+	{
+	    // newton interpolation
+	    const T a1 = S(2)*(middle - begin);
+	    const T a2 = S(2)*(end - middle) - a1;
+	    return x*((x - S(0.5))*a2 + a1) + begin;
+	}
+
+    template <class T> 
+    inline T clamp(T x, T a, T b)
+	// clamp x to [a, b]
+	{
+	    ossimREQUIRE(a <= b);  // input must make sense, disallow nans 
+	    
+            if (ossim::isnan(x)) return x;
+            if (x < a) return a;
+            if (b < x) return b;
+            return x;
+	}
+    
+    template <class T>
+    T wrap(T x, T a, T b)
+	// wrap x modularly into [a,b)
+	{
+	    ossimREQUIRE(a <= b);  // input must make sense, disallow nans 
+	    
+	    if (a == b && !ossim::isnan(x))
+		return a;
+	    else {
+		T z = x < a ? b : a;
+		return std::fmod(x - z, b - a) + z;
+	    }
+	}
+
+    // XXX to Garrett from PJM:
+    //     min and max routines. std::min/max do not in fact correctly handle nan.  
+    //     this is troublesome, i think my code always was asserting no nans before values got
+    //     through std::min/std::max.  i agree with you that if any of the input is nan,
+    //     then the result should be nan, but the STL doesn't really consider the possibility
+    //     that inputs to min/max have a "strange" ordering to them.  we could overload
+    //     std::min/max to do this behavior but that's evil. for all my whining, i think
+    //     we should have ossim::max/max that do the right thing wrt nan.  however:
+    //     if we "correctly" handle nans like this, does that subtly break any existing code?
+    template <class T>
+    inline T min(T a, T b)
+       // min of a,b; nan if either a or b are nan
+    {
+       return (a < b) ? a : b;
+    }
+    
+    template <>
+    inline ossim_float32 min<ossim_float32>(ossim_float32 a, ossim_float32 b)
+    {
+       if (ossim::isnan(a)||ossim::isnan(b))
+       {
+          return ossim::nan();
+       }
+       else
+       {
+          return (a < b) ? a : b;
+       }
+    }
+    
+    template <>
+    inline ossim_float64  min<ossim_float64>(ossim_float64  a, ossim_float64 b)
+    {
+       if (ossim::isnan(a)||ossim::isnan(b))
+       {
+          return ossim::nan();
+       }
+       else
+       {
+          return (a < b) ? a : b;
+       }
+    }
+    
+    template <class T>
+    inline T max(T a, T b)
+       // max of a,b; nan if either a or b are nan
+    {
+       return (a < b) ? b : a;
+    }
+    template <>
+    inline ossim_float32 max<ossim_float32>(ossim_float32 a, ossim_float32 b)
+    {
+       if (ossim::isnan(b))
+          return b;
+       else
+          return (a < b) ? b : a;       
+    }
+    template <>
+    inline ossim_float64 max<ossim_float64>(ossim_float64 a, ossim_float64 b)
+    {
+       if (ossim::isnan(b))
+          return b;
+       else
+          return (a < b) ? b : a;       
+    }
+    inline double radiansToDegrees(double x) { return x*DEG_PER_RAD;}
+    inline double degreesToRadians(double x) { return x*RAD_PER_DEG;}
+    inline double cosd(double x)             { return std::cos(x*RAD_PER_DEG); }
+    inline double sind(double x)             { return std::sin(x*RAD_PER_DEG); }
+    inline double tand(double x)             { return std::tan(x*RAD_PER_DEG); }
+        // trig fncs with parameter in degrees
+        
+    inline double acosd(double x)            { return DEG_PER_RAD*std::acos(x); }
+    inline double asind(double x)            { return DEG_PER_RAD*std::asin(x); }
+    inline double atand(double x)            { return DEG_PER_RAD*std::atan(x); }
+    inline double atan2d(double y, double x) { return DEG_PER_RAD*std::atan2(y,x); }
+        // trig fncs with result in degrees
+
+    template <class IntType>
+    IntType gcd(IntType n, IntType m)
+        // greatest common divisor of two ints
+        // NB: We use n and m as temporaries in this function, so there is no value
+        //     in using const IntType& as we would only need to make a copy anyway...
+        {
+            IntType zero(0);    // Avoid repeated construction
+            
+            // This is abs() - given the existence of broken compilers with Koenig
+            // lookup issues and other problems, I code this explicitly. (Remember,
+            // IntType may be a user-defined type).
+            if (n < zero)
+                n = -n;
+            if (m < zero)
+                m = -m;
+            
+            // As n and m are now positive, we can be sure that %= returns a
+            // positive value (the standard guarantees this for built-in types,
+            // and we require it of user-defined types).
+            for (;;) {
+                if (m == zero)
+                    return n;
+                n %= m;
+                if (n == zero)
+                    return m;
+                m %= n;
+            }
+        }
+
+    template <>
+    inline int gcd<int>(int n, int m)
+        // greatest common divisor specialize for int.
+        // XXX this is the old gcd, the above code is the old ossimGcd().
+        //     i made this a specialization of the template above,
+        //     is this really necessary or more efficient, or can we safely delete this specialization?
+        //     i don't know why this fnc must be decled inline, otherwise there's a compile error.
+        //     the simple test case doesn't have this problem.
+        { 
+            if (m == 0)
+                return n;
+            else
+                return gcd(m, n % m);  // gcc can optimize tail calls right?
+        }
+
+    template <class IntType>
+    IntType lcm(IntType n, IntType m)
+        // least common multiple
+        // NB: We use n and m as temporaries in this function, so there is no value
+        //     in using const IntType& as we would only need to make a copy anyway...
+        {
+            IntType zero(0);    // Avoid repeated construction
+            
+            if (n == zero || m == zero) {
+                return zero;
+            } else {
+                n /= gcd(n, m);
+                n *= m;
+                if (n < zero)
+                    n = -n;
+                return n;
+            }
+        }
+    
+    template<class T> 
+    inline T square(T x)
+        { return x*x; }
+        
+    // identical to copysign() but usable in templates
+    template <class T>
+    inline T sgn(T x) 
+        // signum function, returns 0, 1, -1, or nan
+        {
+            const T table[] = {T(0), T(1), T(-1)};
+            return table[((x < T(0)) << 1) | (x > T(0))];
+        }
+    template <>
+    inline ossim_float32 sgn<ossim_float32>(ossim_float32 x) 
+        // signum function, returns 0, 1, -1, or nan
+        {
+            const ossim_float32 table[] = {ossim_float32(0), ossim_float32(1), ossim_float32(-1)};
+            return ossim::isnan(x) ? x : table[((x < ossim_float32(0)) << 1) | (x > ossim_float32(0))];
+        }
+    template <>
+    inline ossim_float64 sgn(ossim_float64 x) 
+        // signum function, returns 0, 1, -1, or nan
+        {
+            const ossim_float64 table[] = {ossim_float64(0), ossim_float64(1), ossim_float64(-1)};
+            return ossim::isnan(x) ? x : table[((x < ossim_float64(0)) << 1) | (x > ossim_float64(0))];
+        }
+
+    template <class R, class F>    
+    inline R round(F x)
+        // correctly round a float, and cast to desired type R
+        {
+            R result = static_cast<R>((x < F(0)) ? std::ceil(x - F(0.5)) : std::floor(x + F(0.5)));
+            
+            ossimENSURE(ossim::isnan(x) == ossim::isnan(result));   // if x is nan, R must be a float type
+            return result;
+            
+            // XXX is this better than use of ceil/floor?:    return static_cast<long long>((x < T(0)) ? x - T(0.5) : x + T(0.5));
+        }
+
+    inline double ft2mtrs(double feet)      { return (feet * MTRS_PER_FT); }
+    inline double usft2mtrs(double feet)    { return (feet * US_METERS_PER_FT); }
+    inline double mtrs2ft(double meters)    { return (meters / MTRS_PER_FT); }
+    inline double mtrs2usft(double meters)  { return (meters / US_METERS_PER_FT); }
+        // Common conversion functions
+
+    template <class T>
+    std::pair<T, T> quadraticRoots(T a, T b, T c)
+	// evaluates quadradic formula (positive sqrt is first)
+	{
+            // XXX could suffer from catastrophic cancellation, 
+            // see David Goldberg's "What Every Computer Scientist Should Know About Floating-Point Arithmetic"
+	    T s = std::sqrt(b*b - T(4)*a*c);
+	    T twoA = T(2)*a;
+            return std::pair<T, T>((-b + s)/twoA, (-b - s)/twoA); 
+	}
+
+    template <class T>
+    inline void memClear(T& var, int z = 0)
+	// zero out a variable's memory (for a given value of zero)
+	{ memset(&var, z, sizeof(T)); }
+
+    template <class T>
+    inline void memClear(T* var)
+        // prevent user from accidentally passing in a pointer to his struct
+        { ossimSTATIC_CHECK(false, YOU_PROBABLY_WANT_TO_MEMCLEAR_WHAT_THE_POINTER_POINTS_TO_NOT_THE_POINTER_ITSELF); }
+
+    OSSIM_DLL ossimByteOrder byteOrder();
+        // test endianness of current machine 
+
+    // values for various scalar types
+    OSSIM_DLL double defaultMin(ossimScalarType scalarType);
+    OSSIM_DLL double defaultMax(ossimScalarType scalarType);
+    OSSIM_DLL double defaultNull(ossimScalarType scalarType);
+    OSSIM_DLL ossim_uint32 scalarSizeInBytes(ossimScalarType scalarType);
+    
+    /** @brief @return true if scalar type is signed, false if not. */
+    OSSIM_DLL bool isSigned(ossimScalarType scalarType);
+
+    /**
+     * @brief Get actual bits per pixel for a given scalar type.
+     * 
+     * This is bits used.  (OSSIM_USHORT11 = 11)
+     * 
+     * @returns The actual bits per pixel.  This will return 0 if the
+     * input connection is not hooked up or there is an unhandled scalar type.
+     */
+    OSSIM_DLL ossim_uint32 getActualBitsPerPixel(ossimScalarType scalarType);
+    
+    /**
+     * @brief Get bits per pixel for a given scalar type.
+     * 
+     * This the total bits per pixel.  (OSSIM_USHORT11 = 16)
+     * 
+     * @returns The bits per pixel.  This will return 0 if the
+     * input connection is not hooked up or there is an unhandled scalar type.
+     */
+    OSSIM_DLL ossim_uint32 getBitsPerPixel(ossimScalarType scalarType);  
+        
+    OSSIM_DLL void defaultTileSize(ossimIpt& tileSize);
+
+    OSSIM_DLL std::string convertHtmlSpecialCharactersToNormalCharacter(const std::string& src);
+
+    /** Heading pitch roll extraction from a matrix. */
+    OSSIM_DLL bool matrixToHpr( ossim_float64 hpr[3],
+                                const NEWMAT::Matrix& rotation );
+
+    /** Heading pitch roll extraction from a matrix. */
+    OSSIM_DLL bool matrixToHpr( ossim_float64 hpr[3],
+                                const NEWMAT::Matrix& lsrMatrix,
+                                const NEWMAT::Matrix& rotationalMatrix);
+    
+    OSSIM_DLL void lexQuotedTokens(const std::string& str,
+                                   ossim_uint32 start,
+                                   const char* whitespace,
+                                   const char* quotes,
+                                   std::vector<std::string>& tokens, bool& unbalancedQuotes);
+   /**
+    * Will take a vector of ossimDpt and convert to a string list separated by spaces
+    * For example: 
+    *      (45,34) (12,34)
+    */
+   
+   OSSIM_DLL void toStringList(ossimString& resultStringOfPoints,
+                               const std::vector<ossimDpt>& pointList,
+                               char separator=' ');
+   OSSIM_DLL void toStringList(ossimString& resultStringOfPoints,
+                               const std::vector<ossimIpt>& pointList,
+                               char separator = ' ');
+   OSSIM_DLL void toStringList(ossimString& resultStringOfPoints,
+                               const std::vector<ossimGpt>& pointList,
+                               char seaprator = ' ');
+   
+   /**
+    * Will take a string list separated by spaces and convert to a vector of ossimDpts.  It will not clear
+    * the passed in list but will append all points found.
+    */
+   OSSIM_DLL void toVector(std::vector<ossimDpt>& result,
+                           const ossimString& stringOfPoints);
+   OSSIM_DLL void toVector(std::vector<ossimIpt>& result,
+                           const ossimString& stringOfPoints);
+   OSSIM_DLL void toVector(std::vector<ossimGpt>& result,
+                           const ossimString& stringOfPoints);
+   
+   /**
+    * This will output a vector of values inst a string
+    *
+    *  (value1,...,valueN)
+    *
+    * Parenthesis are required
+    */ 
+   template <class T>
+   void toSimpleStringList(ossimString& result,
+                           const std::vector<T>& valuesList)
+   {
+      std::ostringstream out;
+      
+      if(!valuesList.empty())
+      {
+         ossim_uint32 idx = 0;
+         ossim_uint32 size = (ossim_uint32) (valuesList.size()-1);
+         for(idx = 0; idx < size; ++idx)
+         {
+            out << valuesList[idx] << ",";
+         }
+         out << valuesList[size];
+      }
+      
+      result = "("+out.str()+")";
+   }
+   
+   /**
+    * This will output a vector of values inst a string
+    *
+    *  (value1,...,valueN)
+    *
+    * Specialize the char for it will output the actual ascii char instead of the numeric value
+    *
+    * Parenthesis are required
+    */ 
+   template <>
+   OSSIM_DLL void toSimpleStringList(ossimString& result,
+                                     const std::vector<ossim_uint8>& valuesList);
+   
+   /**
+    * Generic function to extract a list of values into a vector of string where
+    * the string of points is of the form:
+    *
+    * (value1,value2, ... , )
+    *
+    * Parenthesis are required
+    */ 
+   OSSIM_DLL bool extractSimpleValues(std::vector<ossimString>& values,
+                                      const ossimString& stringOfPoints);
+
+   
+  template <class T>  bool toSimpleVector(std::vector<T>& result, const ossimString& stringOfPoints)
+  {
+     std::istringstream in(stringOfPoints);
+     ossim::skipws(in);
+     bool returnValue = true;
+     char c = in.get();
+     ossimString value = "";
+     if(c == '(')
+     {
+        c = (char)in.get();
+        while( (c!=')') && (c!= '\n') && (in.good()) )
+        {
+           if(c!= ',')
+           {
+              value += ossimString(c);
+           }
+           else
+           {
+              result.push_back(static_cast<T>(value.toDouble()));
+              value = "";
+           }
+           c = in.get();
+        }
+     }
+     if(c!= ')')
+     {
+        returnValue = false;
+     }
+     else
+     {
+        if(!value.empty())
+        {
+           result.push_back(static_cast<T>(value.toDouble()));
+        }
+     }
+     
+     return returnValue;
+  }
+   
+   /**
+    *  Takes input format of the form:
+    *  (value1,value2,...,valueN)
+    */
+  OSSIM_DLL bool toSimpleVector(std::vector<ossim_uint32>& result,
+                                const ossimString& stringOfPoints);
+   /**
+    *  Takes input format of the form:
+    *  (value1,value2,...,valueN)
+    */
+  OSSIM_DLL bool toSimpleVector(std::vector<ossim_int32>& result,
+                                const ossimString& stringOfPoints);
+   /**
+    *  Takes input format of the form:
+    *  (value1,value2,...,valueN)
+    */
+   OSSIM_DLL bool toSimpleVector(std::vector<ossim_uint16>& result,
+                                 const ossimString& stringOfPoints);
+   /**
+    *  Takes input format of the form:
+    *  (value1,value2,...,valueN)
+    */
+  OSSIM_DLL bool toSimpleVector(std::vector<ossim_int16>& result,
+                                const ossimString& stringOfPoints);
+   /**
+    *  Takes input format of the form:
+    *  (value1,value2,...,valueN)
+    */
+   OSSIM_DLL bool toSimpleVector(std::vector<ossim_uint8>& result,
+                                 const ossimString& stringOfPoints);
+   /**
+    *  Takes input format of the form:
+    *  (value1,value2,...,valueN)
+    */
+   OSSIM_DLL bool toSimpleVector(std::vector<ossim_int8>& result,
+                                 const ossimString& stringOfPoints);
+   
+        // lex str into tokens starting at position start using whitespace  
+	//    chars as delimiters and quotes[0] and quotes[1] as the opening
+	//    and closing quotation chars (for quoting tokens containing whitespace).
+	//    unbalancedQuotes is true iff it aborted when detecting unbalanced quoting.
+	// REQUIRE(whitespace != NULL);
+	// REQUIRE(quotes != NULL);
+	// REQUIRE(tokens != NULL);
+	// REQUIRE(unbalancedQuotes != NULL);
+
+   /**
+    * @brief Get the number threads to use from ossimPreferences or OpenThreads.
+    *
+    * Keyword searched for is:  "ossim_threads"
+    *
+    * If keyword is not found OpenThreads::GetNumberOfProcessors() is used.
+    *
+    * @return Number of threads. Default=1
+    */
+   OSSIM_DLL ossim_uint32 getNumberOfThreads();
+
+   /**
+    * @brief Gets the current time.
+    *
+    * Example formats and output:
+    * format = "%Y-%m-%dT%H:%M:%SZ" output = "2014-03-06T13:55:10Z"
+    *
+    * @param format E.g. "%Y-%m-%dT%H:%M:%SZ"
+    *
+    * @param gmtFlag If true get the zulu time; else, gets the local time.
+    *
+    * @param result Initialized by this with result.
+    *
+    * E.g. "2014-03-06T13:55:10Z"
+    * 
+    * @note If an error occurs result will be empty.
+    */
+   OSSIM_DLL void getFormattedTime( const std::string& format,
+                                    bool gmtFlag,
+                                    std::string& result );
+
+   /**
+    * @brief Computes the number of decimation levels to get to the overview
+    * stop dimension.
+    *
+    * This uses ossim preferences "overview_stop_dimension" value if set else
+    * it uses the default tile size to compute the number of levels.
+    * 
+    * @param rect The rectangle of the first level.
+    *
+    * @return The number of decimation levels needed.
+    */
+   OSSIM_DLL ossim_uint32 computeLevels(const ossimIrect& rect);   
+
+} // End: namespace ossim
+
+
+#endif /* #ifndef ossimCommon_HEADER */
+
diff --git a/include/ossim/base/ossimConnectableContainer.h b/ossim/include/ossim/base/ossimConnectableContainer.h
similarity index 100%
rename from include/ossim/base/ossimConnectableContainer.h
rename to ossim/include/ossim/base/ossimConnectableContainer.h
diff --git a/include/ossim/base/ossimConnectableContainerInterface.h b/ossim/include/ossim/base/ossimConnectableContainerInterface.h
similarity index 100%
rename from include/ossim/base/ossimConnectableContainerInterface.h
rename to ossim/include/ossim/base/ossimConnectableContainerInterface.h
diff --git a/ossim/include/ossim/base/ossimConnectableDisplayListener.h b/ossim/include/ossim/base/ossimConnectableDisplayListener.h
new file mode 100644
index 0000000..7a88f2b
--- /dev/null
+++ b/ossim/include/ossim/base/ossimConnectableDisplayListener.h
@@ -0,0 +1,110 @@
+//----------------------------------------------------------------------------
+// Copyright (c) 2004, David Burken, all rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: ossimConnectableDisplayListener
+// 
+// This class is intended for connectable displays that wants to be a
+// ossimConnectableObjectListener and a ossimDisplayEventListener to avoid
+// a triangle inheritance.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimConnectableDisplayListener.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimConnectableDisplayListener_HEADER
+#define ossimConnectableDisplayListener_HEADER
+
+#include <ossim/base/ossimListener.h>
+
+class ossimConnectionEvent;
+class ossimObjectDestructingEvent;
+class ossimPropertyEvent;
+class ossimContainerEvent;
+class oossimDisplayListEvent;
+class ossimRefreshEvent;
+class ossimDisplayListEvent;
+class ossimDisplayRefreshEvent;
+
+/**
+ * This class is intended for connectable displays that wants to be a
+ * ossimConnectableObjectListener and a ossimDisplayEventListener to avoid
+ * a triangle inheritance.
+ */
+class OSSIMDLLEXPORT ossimConnectableDisplayListener : public ossimListener
+{
+public:
+
+   /** default constructor */
+   ossimConnectableDisplayListener();
+
+   /**
+    * Method called by listener managers.  This will in turn call the correct
+    * xxxEvent method.
+    *
+    * @param event Event to handle.
+    */
+   virtual void processEvent(ossimEvent& event);
+
+   /** @param event Event to handle signifying an object destroying. */
+   virtual void objectDestructingEvent(ossimObjectDestructingEvent& event);
+
+   /** @param event Event to handle signifying an object connecting. */
+   virtual void connectionEvent(ossimConnectionEvent& event);
+
+   /** @param event Event to handle signifying a disconnect input event. */
+   virtual void disconnectInputEvent(ossimConnectionEvent& event);
+
+   /** @param event Event to handle signifying an output disconnect event. */
+   virtual void disconnectOutputEvent(ossimConnectionEvent& event);
+
+   /** @param event Event to handle signifying a connect input event. */
+   virtual void connectInputEvent(ossimConnectionEvent& event);
+
+   /** @param event Event to handle signifying a connect  output event. */
+   virtual void connectOutputEvent(ossimConnectionEvent& event);
+
+   /**
+    * @param event Event to handle signifying a property has changed  event.
+    */
+   virtual void propertyEvent(ossimPropertyEvent& event);
+
+   /**
+    * @param event Event to handle signifying a dislay list  has changed
+    * event.
+    */
+   virtual void displayListEvent(ossimDisplayListEvent&);
+
+   /**
+    * @param event Event to handle signifying a dislay refresh
+    * is needed.
+    */
+   virtual void displayRefreshEvent(ossimDisplayRefreshEvent&);
+
+   /**
+    * @param event Event to handle signifying a refresh is needed.
+    */
+   virtual void refreshEvent(ossimRefreshEvent& event);
+
+   /**
+    * Container Events:
+    * Typically isued by objects that contain children.  If anyone is
+    * interested, can latch on to this event.  Other objects within the
+    * system might be interest in this event even 
+    */
+
+   /** @param event Event signifying an object was added to a container. */
+   virtual void addObjectEvent(ossimContainerEvent& event);
+
+   /** @param event Event signifying an object was removed from a container. */
+   virtual void removeObjectEvent(ossimContainerEvent& event);
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/base/ossimConnectableObject.h b/ossim/include/ossim/base/ossimConnectableObject.h
similarity index 100%
rename from include/ossim/base/ossimConnectableObject.h
rename to ossim/include/ossim/base/ossimConnectableObject.h
diff --git a/include/ossim/base/ossimConnectableObjectListener.h b/ossim/include/ossim/base/ossimConnectableObjectListener.h
similarity index 100%
rename from include/ossim/base/ossimConnectableObjectListener.h
rename to ossim/include/ossim/base/ossimConnectableObjectListener.h
diff --git a/ossim/include/ossim/base/ossimConnectionEvent.h b/ossim/include/ossim/base/ossimConnectionEvent.h
new file mode 100644
index 0000000..92c595d
--- /dev/null
+++ b/ossim/include/ossim/base/ossimConnectionEvent.h
@@ -0,0 +1,80 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+//*************************************************************************
+// $Id: ossimConnectionEvent.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimConnectionEvent_HEADER
+#define ossimConnectionEvent_HEADER
+
+#include <vector>
+
+#include <ossim/base/ossimEventIds.h>
+#include <ossim/base/ossimEvent.h>
+#include <ossim/base/ossimConnectableObject.h>
+
+class OSSIMDLLEXPORT ossimConnectionEvent : public ossimEvent
+{
+public:
+   enum ossimConnectionDirectionType
+   {
+      OSSIM_DIRECTION_UNKNOWN  = 0,
+      OSSIM_INPUT_DIRECTION    = 1,
+      OSSIM_OUTPUT_DIRECTION   = 2,
+      OSSIM_INPUT_OUTPUT_DIRECTION = 3
+   };
+   
+   ossimConnectionEvent(ossimObject* object=NULL,
+                        long id=OSSIM_EVENT_NULL_ID);
+
+   ossimConnectionEvent(ossimObject* object,
+                        long id,
+                        const ossimConnectableObject::ConnectableObjectList& newList,
+                        const ossimConnectableObject::ConnectableObjectList& oldList,
+                        ossimConnectionDirectionType whichDirection);
+
+   ossimConnectionEvent(ossimObject* object,
+                        long id,
+                        ossimConnectableObject* newConnectableObject,
+                        ossimConnectableObject* oldConnectableObject,
+                        ossimConnectionDirectionType whichDirection);
+   
+   ossimConnectionEvent(const ossimConnectionEvent& rhs);
+
+   ossimObject* dup()const;
+   
+   virtual void setDirection(ossimConnectionDirectionType direction);
+   
+   virtual ossimConnectionDirectionType getDirection()const;
+
+   virtual ossim_uint32 getNumberOfNewObjects()const;
+   
+   virtual ossim_uint32 getNumberOfOldObjects()const;
+   
+   virtual ossimConnectableObject* getOldObject(ossim_uint32 i=0);
+
+   virtual ossimConnectableObject* getNewObject(ossim_uint32 i=0);
+
+   virtual bool isDisconnect()const;
+   
+   virtual bool isConnect()const;
+      
+   virtual bool isInputDirection()const;
+   
+   virtual bool isOutputDirection()const;
+   
+protected:
+   ossimConnectableObject::ConnectableObjectList theNewObjectList;
+   ossimConnectableObject::ConnectableObjectList theOldObjectList;
+   ossimConnectionDirectionType         theDirectionType;
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/base/ossimConstants.h b/ossim/include/ossim/base/ossimConstants.h
new file mode 100644
index 0000000..1d137eb
--- /dev/null
+++ b/ossim/include/ossim/base/ossimConstants.h
@@ -0,0 +1,545 @@
+/********************************************************************
+ *
+ * License:  See top level LICENSE.txt file.
+ *
+ * Author: Ken Melero
+ * 
+ * Description: Common file for global constants.
+ *
+ **************************************************************************
+ * $Id: ossimConstants.h 22476 2013-11-07 16:08:32Z dburken $
+ */
+#ifndef ossimConstants_HEADER
+#define ossimConstants_HEADER 1
+
+#include <ossim/ossimConfig.h>
+
+#ifdef __cplusplus
+#  include <cfloat>
+#else
+#  include <float.h>
+#endif
+
+/**
+ * WARNINGS SECTION:
+ */
+#ifdef _MSC_VER /* Quiet a bunch of MSVC warnings... */
+#  pragma warning(disable:4786) /* visual c6.0 compiler */
+#  pragma warning(disable:4251)/* for std:: member variable to have dll interface */
+#  pragma warning(disable:4275) /* for std:: base class to have dll interface */
+#  pragma warning(disable:4800) /* int forcing value to bool */
+#  pragma warning(disable:4244) /* conversion, possible loss of data */
+#endif
+#if defined(__GNUC__)
+#   define OSSIM_DEPRECATE_METHOD(func) func __attribute__ ((deprecated))
+#elif defined(_MSC_VER)
+#   define OSSIM_DEPRECATE_METHOD(func)  __declspec(deprecated) func 
+#else
+#   define OSSIM_DEPRECATE_METHOD(func)
+#endif
+   
+/**
+ * DLL IMPORT/EXORT SECTION
+ */
+#if defined(OSSIM_STATIC)
+#  define OSSIMEXPORT
+#  define OSSIMIMPORT
+#  define OSSIMDLLEXPORT
+#  define OSSIM_DLL
+#  define OSSIMDLLEXPORT_DATA(type) type
+#  define OSSIM_DLL_DATA(type) type
+#  define OSSIMDLLEXPORT_CTORFN 
+#elif defined(__MINGW32__) || defined(__CYGWIN__) || defined(_MSC_VER) || defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__)
+#  define OSSIMEXPORT __declspec(dllexport)
+#  define OSSIMIMPORT __declspec(dllimport)
+#  ifdef OSSIMMAKINGDLL
+#    define OSSIMDLLEXPORT OSSIMEXPORT
+#    define OSSIM_DLL       OSSIMEXPORT
+#    define OSSIMDLLEXPORT_DATA(type) OSSIMEXPORT type
+#    define OSSIM_DLL_DATA(type) OSSIMEXPORT type
+#    define OSSIMDLLEXPORT_CTORFN
+#  else
+#    define OSSIMDLLEXPORT OSSIMIMPORT
+#    define OSSIM_DLL      OSSIMIMPORT
+#    define OSSIMDLLEXPORT_DATA(type) OSSIMIMPORT type
+#    define OSSIM_DLL_DATA(type) OSSIMIMPORT type
+#    define OSSIMDLLEXPORT_CTORFN
+#  endif
+#else /* not #if defined(_MSC_VER) */
+#  define OSSIMEXPORT
+#  define OSSIMIMPORT
+#  define OSSIMDLLEXPORT
+#  define OSSIM_DLL
+#  define OSSIMDLLEXPORT_DATA(type) type
+#  define OSSIM_DLL_DATA(type) type
+#  define OSSIMDLLEXPORT_CTORFN
+#endif /* #if defined(_MSC_VER) */
+   
+/**
+ * Previous DLL import export section.  Commented out, but left just in case.
+ */
+#if 0 /* Comment out ALL this mess! */
+#if defined(_MSC_VER) || defined(__VISUALC__) || defined(__BORLANDC__) || defined(__GNUC__) || defined(__WATCOMC__)
+#  if (_MSC_VER >= 1300)	/* MSVC .NET 2003 version */
+#    define OSSIMEXPORT __declspec(dllexport)
+#    define OSSIMIMPORT __declspec(dllimport)
+#  else
+#    define OSSIMEXPORT __declspec(dllexport)
+#    define OSSIMIMPORT __declspec(dllimport)
+#  endif
+#else /* compiler doesn't support __declspec() */
+#   define OSSIMEXPORT
+#   define OSSIMIMPORT
+#endif
+
+#if defined(__WXPM__)
+#  if defined (__WATCOMC__)
+#    define OSSIMEXPORT __declspec(dllexport)
+ /*
+   __declspec(dllimport) prepends __imp to imported symbols. We do NOT
+   want that!
+ */
+#    define OSSIMIMPORT
+#  elif (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )))
+#    define OSSIMEXPORT _Export
+#    define OSSIMIMPORT _Export
+#  endif
+#elif defined(__OSSIMMAC__)
+#  ifdef __MWERKS__
+#    define OSSIMEXPORT __declspec(export)
+#    define OSSIMIMPORT __declspec(import)
+#  endif
+#endif
+
+#if defined(_MSC_VER)
+#  pragma warning(disable:4786) /* visual c6.0 compiler */
+#  pragma warning(disable:4251) /* for std:: member variable to have dll interface */
+#  pragma warning(disable:4275) /* for std:: base class to have dll interface */
+#  pragma warning(disable:4800) /* int forcing value to bool */
+#  pragma warning(disable:4244) /* conversion, possible loss of data */
+
+#  ifdef OSSIMSINGLEDLL /* one gigantic dll, all declared export */
+#    ifdef EXPORT_OSMMATRIX
+#      define EXPORT_OSMMATRIX  OSSIMEXPORT
+#    endif
+#    ifndef OSSIMDLLEXPORT
+#      define OSSIMDLLEXPORT    OSSIMEXPORT
+#    endif
+#    ifdef EXPORT_OSMELEV
+#      define EXPORT_OSMELEV    OSSIMEXPORT
+#    endif
+#    ifdef EXPORT_OSMSPTDATA
+#      define EXPORT_OSMSPTDATA OSSIMEXPORT
+#    endif
+#    ifdef EXPORT_ISO8211
+#      define EXPORT_ISO8211    OSSIMEXPORT
+#    endif
+#    ifdef EXPORT_OSMPROJ
+#      define EXPORT_OSMPROJ    OSSIMEXPORT
+#    endif
+#    ifndef EXPORT_OSMIMAGING
+#      define EXPORT_OSMIMAGING OSSIMEXPORT
+#    endif
+#  else /* individual dlls, each with their own import/export symbols */
+#    ifndef EXPORT_OSMMATRIX
+#      ifdef OSMMATRIX_EXPORTS
+#        define EXPORT_OSMMATRIX OSSIMEXPORT
+#      else
+#        define EXPORT_OSMMATRIX OSSIMIMPORT
+#      endif
+#    endif
+#    ifndef OSSIMDLLEXPORT
+#      ifdef OSMBASE_EXPORTS
+#        define OSSIMDLLEXPORT OSSIMEXPORT
+#      else
+#        define OSSIMDLLEXPORT OSSIMIMPORT
+#      endif
+#    endif
+#    ifndef EXPORT_OSMELEV
+#      ifdef OSMELEV_EXPORTS
+#        define EXPORT_OSMELEV OSSIMEXPORT
+#      else
+#        define EXPORT_OSMELEV OSSIMIMPORT
+#      endif
+#    endif
+#    ifndef EXPORT_OSMSPTDATA
+#      ifdef OSMSPTDATA_EXPORTS
+#        define EXPORT_OSMSPTDATA OSSIMEXPORT
+#      else
+#        define EXPORT_OSMSPTDATA OSSIMIMPORT
+#      endif
+#    endif
+#    ifndef EXPORT_OSMPROJ
+#      ifdef OSMPROJ_EXPORTS
+#        define EXPORT_OSMPROJ OSSIMEXPORT
+#      else
+#        define EXPORT_OSMPROJ OSSIMIMPORT
+#      endif
+#    endif
+#    ifndef EXPORT_ISO8211
+#      ifdef ISO8211_EXPORTS
+#        define EXPORT_ISO8211 OSSIMEXPORT
+#      else
+#        define EXPORT_ISO8211 OSSIMIMPORT
+#      endif
+#    endif
+#    ifndef EXPORT_OSMIMAGING
+#      ifdef OSMIMAGING_EXPORTS
+#        define EXPORT_OSMIMAGING OSSIMEXPORT
+#      else
+#        define EXPORT_OSMIMAGING OSSIMIMPORT
+#      endif
+#    endif
+#  endif
+#else /* defined(_MSC_VER) */
+#  ifdef OSSIMMAKINGDLL
+#    define OSSIMDLLEXPORT OSSIMEXPORT
+#    define OSSIM_DLL       OSSIMEXPORT
+#    define OSSIMDLLEXPORT_DATA(type) OSSIMEXPORT type
+#    define OSSIM_DLL_DATA(type) OSSIMEXPORT type
+#    define OSSIMDLLEXPORT_CTORFN
+#  elif defined(OSSIMUSINGDLL)
+#    define OSSIMDLLEXPORT OSSIMIMPORT
+#    define OSSIM_DLL      OSSIMIMPORT
+#    define OSSIMDLLEXPORT_DATA(type) OSSIMIMPORT type
+#    define OSSIM_DLL_DATA(type) OSSIMIMPORT type
+#    define OSSIMDLLEXPORT_CTORFN
+#  else /* not making nor using DLL */
+#    define OSSIMDLLEXPORT
+#    define OSSIM_DLL
+#    define OSSIM_DLL_DATA(type) type
+#    define OSSIMDLLEXPORT_DATA(type) type
+#    define OSSIMDLLEXPORT_CTORFN
+#  endif
+#  define EXPORT_OSMMATRIX  OSSIMDLLEXPORT
+#  define EXPORT_OSMELEV    OSSIMDLLEXPORT
+#  define EXPORT_OSMSPTDATA OSSIMDLLEXPORT
+#  define EXPORT_OSMPROJ    OSSIMDLLEXPORT
+#  define EXPORT_OSMIMAGING OSSIMDLLEXPORT
+#endif
+#endif /* End of commented out "#if 0" old DLL import/export section. */
+
+/*
+  we know that if this is defined all other types are defined
+  since its included from ossimConfig.h
+*/
+typedef char                   ossim_int8;
+typedef unsigned char          ossim_uint8;
+typedef signed char            ossim_sint8;
+
+typedef short                  ossim_int16;
+typedef unsigned short         ossim_uint16;
+typedef signed short           ossim_sint16;
+
+typedef int                    ossim_int32;
+typedef unsigned int           ossim_uint32;
+typedef signed int             ossim_sint32;
+
+typedef float                  ossim_float32;
+typedef double                 ossim_float64;
+
+
+typedef long long              ossim_int64;
+typedef unsigned long long     ossim_uint64;
+typedef signed long long       ossim_sint64;
+   
+typedef ossim_int32            ossimErrorCode;
+
+enum ossimVertexOrdering
+{
+   OSSIM_VERTEX_ORDER_UNKNOWN    = 0,
+   OSSIM_CLOCKWISE_ORDER         = 1,
+   OSSIM_COUNTERCLOCKWISE_ORDER  = 2
+};
+
+//---
+// For histogram builders.  Note that FAST computation mode will not sample all tiles.
+//---   
+enum ossimHistogramMode
+{
+   OSSIM_HISTO_MODE_UNKNOWN = 0,
+   OSSIM_HISTO_MODE_NORMAL  = 1,
+   OSSIM_HISTO_MODE_FAST    = 2
+};
+
+/*
+ Corner coordinates are relative to center (0) of pixel
+ or relative to the upper left of pixel (1).
+*/
+enum ossimPixelType
+{
+   OSSIM_PIXEL_IS_POINT = 0,
+   OSSIM_PIXEL_IS_AREA  = 1
+};
+
+/*
+ Definitions for scalar type identification.
+*/
+enum ossimScalarType
+{
+   OSSIM_SCALAR_UNKNOWN    =  0, 
+   OSSIM_UINT8             =  1, /**< 8 bit unsigned integer        */
+   OSSIM_SINT8             =  2, /**< 8 bit signed integer          */
+   OSSIM_UINT16            =  3, /**< 16 bit unsigned integer       */
+   OSSIM_SINT16            =  4, /**< 16 bit signed integer         */
+   OSSIM_UINT32            =  5, /**< 32 bit unsigned integer       */
+   OSSIM_SINT32            =  6, /**< 32 bit signed integer         */
+   OSSIM_UINT64            =  7, /**< 64 bit unsigned integer       */
+   OSSIM_SINT64            =  8, /**< 64 bit signed integer         */
+   OSSIM_FLOAT32           =  9, /**< 32 bit floating point         */
+   OSSIM_FLOAT64           = 10, /**< 64 bit floating point         */
+   OSSIM_CINT16            = 11, /**< 16 bit complex integer        */
+   OSSIM_CINT32            = 12, /**< 32 bit complex integer        */
+   OSSIM_CFLOAT32          = 13, /**< 32 bit complex floating point */
+   OSSIM_CFLOAT64          = 14, /**< 64 bit complex floating point */
+   OSSIM_NORMALIZED_FLOAT  = 15, /**< 32 bit normalized floating point */
+   OSSIM_NORMALIZED_DOUBLE = 16, /**< 64 bit normalized floating point */
+
+   //---
+   // Below for backward compatibility only.  Please use above enums in
+   // conjunction with null, min, max settings to determine bit depth.
+   //---
+   OSSIM_USHORT11          = 17, /**< 16 bit unsigned integer (11 bits used) */
+   OSSIM_UCHAR             = 1,  /**< 8 bit unsigned iteger  */
+   OSSIM_USHORT16          = 3,  /**< 16 bit unsigned iteger */
+   OSSIM_SSHORT16          = 4,  /**< 16 bit signed integer  */
+   OSSIM_FLOAT             = 9,  /**< 32 bit floating point  */
+   OSSIM_DOUBLE            = 10, /**< 64 bit floating point  */
+};
+
+/*
+ Definitions for interleave type identification.
+*/
+enum ossimInterleaveType
+{
+   OSSIM_INTERLEAVE_UNKNOWN = 0,
+   OSSIM_BIL                = 1,  /* band interleaved by line */
+   OSSIM_BIP                = 2,  /* band interleaved by pixel */
+   OSSIM_BSQ                = 3,  /* band sequential */
+   OSSIM_BSQ_MULTI_FILE     = 4   /* band sequential in separate files */
+};
+
+/*
+ Definitions for origin location.
+*/
+enum ossimOriginLocationType
+{
+   OSSIM_ORIGIN_LOCATION_UNKNOWN = 0,
+   OSSIM_CENTER                  = 1,
+   OSSIM_UPPER_LEFT              = 2,
+   OSSIM_UPPER_LEFT_CENTER       = 3,
+   OSSIM_LOWER_LEFT              = 4,
+   OSSIM_LOWER_LEFT_CENTER       = 5
+};
+
+/*
+ Definitions for coordinate system type.
+*/
+enum ossimCoordinateSystemType
+{
+   OSSIM_COORDINATE_SYSTEM_UNKNOWN = 0,
+   OSSIM_IMAGE_SPACE               = 1,
+   OSSIM_GEOGRAPHIC_SPACE          = 2,
+   OSSIM_PROJECTED_SPACE           = 3,
+   OSSIM_GEOCENTRIC_SPACE          = 4
+};
+
+/*
+ Definitions for coordinate system orientation mode .
+*/
+enum ossimCoordSysOrientMode
+{
+   OSSIM_LEFT_HANDED  = 0,
+   OSSIM_RIGHT_HANDED = 1
+};
+
+/*
+ Definitions for unit type.
+*/
+enum ossimUnitType
+{
+   OSSIM_UNIT_UNKNOWN    = 0,
+   OSSIM_METERS          = 1,
+   OSSIM_FEET            = 2,
+   OSSIM_US_SURVEY_FEET  = 3,
+   OSSIM_DEGREES         = 4,
+   OSSIM_RADIANS         = 5,
+   OSSIM_NAUTICAL_MILES  = 6,
+   OSSIM_SECONDS         = 7,
+   OSSIM_MINUTES         = 8,
+   OSSIM_PIXEL           = 9,
+   OSSIM_MILES           = 10,
+   OSSIM_MILLIMETERS     = 11,
+   OSSIM_MICRONS         = 12,
+   OSSIM_CENTIMETERS     = 13,
+   OSSIM_YARDS           = 14,
+   OSSIM_INCHES          = 15,
+   OSSIM_KILOMETERS      = 16
+};
+
+/** Definitions for data object status. */
+enum ossimDataObjectStatus
+{
+   OSSIM_STATUS_UNKNOWN = 0,
+   OSSIM_NULL           = 1, // not initialized
+   OSSIM_EMPTY          = 2, // initialized but blank or empty
+   OSSIM_PARTIAL        = 3, // contains some null/invalid values
+   OSSIM_FULL           = 4  // all valid data
+};
+
+/** Definitions for image type identification. */
+enum ossimImageType
+{
+   OSSIM_IMAGE_TYPE_UNKNOWN       = 0,
+   OSSIM_TIFF_STRIP               = 1,
+   OSSIM_TIFF_STRIP_BAND_SEPARATE = 2,
+   OSSIM_TIFF_TILED               = 3,
+   OSSIM_TIFF_TILED_BAND_SEPARATE = 4,
+   OSSIM_GENERAL_RASTER_BIP       = 5,
+   OSSIM_GENERAL_RASTER_BIL       = 6,
+   OSSIM_GENERAL_RASTER_BSQ       = 7,
+   OSSIM_JPEG                     = 8,
+   OSSIM_PDF                      = 9
+};
+
+/** Definitions for metadata type identification. */
+enum ossimMetadataType
+{
+   OSSIM_META_UNKNOWN   = 0,
+   OSSIM_META_TFW       = 1,
+   OSSIM_META_JGW       = 2,
+   OSSIM_META_GEOM      = 3,
+   OSSIM_META_README    = 4,
+   OSSIM_META_FGDC      = 5,
+   OSSIM_META_ENVI      = 6
+};
+
+enum ossimByteOrder
+{
+   OSSIM_LITTLE_ENDIAN = 0,
+   OSSIM_BIG_ENDIAN    = 1
+};
+
+enum ossimCompareType
+{
+   OSSIM_COMPARE_FULL=0,      // compares full traversal if supported.  Not just instance pointers
+   OSSIM_COMPARE_IMMEDIATE=1  // Only immediate attributes are compared
+};
+
+#ifndef FLT_EPSILON
+#  define FLT_EPSILON __FLT_EPSILON__
+#endif
+   
+#ifndef DBL_EPSILON
+#  define DBL_EPSILON __DBL_EPSILON__
+#endif
+   
+#ifndef M_PI
+#  define M_PI             ((ossim_float64)3.141592653589793238462643)
+#endif
+#ifndef TWO_PI
+#  define TWO_PI           ((ossim_float64)(2.0 * M_PI))
+#endif
+#ifndef DEG_PER_RAD
+#  define DEG_PER_RAD      ((ossim_float64)(180.0/M_PI))
+#endif
+#ifndef SEC_PER_RAD
+#  define SEC_PER_RAD      ((ossim_float64)206264.8062471)
+#endif
+#ifndef RAD_PER_DEG
+#  define RAD_PER_DEG      ((ossim_float64)(M_PI/180.0))
+#endif
+#ifndef MTRS_PER_FT
+#  define MTRS_PER_FT      ((ossim_float64)0.3048)
+#endif
+#ifndef FT_PER_MTRS
+#  define FT_PER_MTRS      ((ossim_float64)3.280839895013122)
+#endif
+#ifndef FT_PER_MILE
+#  define FT_PER_MILE      ((ossim_float64)5280.0)
+#endif
+#ifndef SQRT_TWO_PI
+#  define SQRT_TWO_PI      ((ossim_float64)2.50662827463100050242)
+#endif
+#ifndef SQRT_TWO_PI_DIV2
+#  define SQRT_TWO_PI_DIV2 ((ossim_float64)7.07106781186547524401E-1)
+#endif
+
+#define TIFFTAG_OSSIM_METADATA 50955
+#define OSSIM_DEFAULT_TILE_HEIGHT  ((ossim_int32)64)
+#define OSSIM_DEFAULT_TILE_WIDTH   ((ossim_int32)64)
+
+/*
+ NOTE Reference for U.S. feet value:
+ U.S.G.S. "Map Projections - A Working Manual"
+ USGS Professional paper 1395 page 51
+*/
+#ifndef US_METERS_PER_FT
+#  define  US_METERS_PER_FT ((ossim_float64)0.3048006096)
+#endif
+
+//---
+// Integer nan kept for ossimIpt.
+// This should be the most negative int: -2147483648
+//---
+#define OSSIM_INT_NAN ((ossim_sint32)0x80000000)
+
+#define OSSIM_DEFAULT_NULL_PIX_UCHAR  ((ossim_uint8)0)
+#define OSSIM_DEFAULT_MIN_PIX_UCHAR   ((ossim_uint8)1)
+#define OSSIM_DEFAULT_MAX_PIX_UCHAR   ((ossim_uint8)255)
+
+#define OSSIM_DEFAULT_NULL_PIX_UINT8  ((ossim_uint8)0)
+#define OSSIM_DEFAULT_MIN_PIX_UINT8   ((ossim_uint8)1)
+#define OSSIM_DEFAULT_MAX_PIX_UINT8   ((ossim_uint8)255)
+
+#define OSSIM_DEFAULT_NULL_PIX_SINT8  ((ossim_sint8)0x80)
+#define OSSIM_DEFAULT_MIN_PIX_SINT8   ((ossim_sint8)0x81)
+#define OSSIM_DEFAULT_MAX_PIX_SINT8   ((ossim_sint8)0x7F)
+
+#define OSSIM_DEFAULT_NULL_PIX_SINT16 ((ossim_sint16)0x8000)
+#define OSSIM_DEFAULT_MIN_PIX_SINT16  ((ossim_sint16)0x8001)
+#define OSSIM_DEFAULT_MAX_PIX_SINT16  ((ossim_sint16)0x7FFF)
+
+#define OSSIM_DEFAULT_NULL_PIX_UINT16 ((ossim_uint16)0)
+#define OSSIM_DEFAULT_MIN_PIX_UINT16  ((ossim_uint16)1)
+#define OSSIM_DEFAULT_MAX_PIX_UINT16  ((ossim_uint16)0xFFFF)
+
+#define OSSIM_DEFAULT_NULL_PIX_SINT32 ((ossim_sint32)0x80000000)
+#define OSSIM_DEFAULT_MIN_PIX_SINT32  ((ossim_sint32)0x80000001)
+#define OSSIM_DEFAULT_MAX_PIX_SINT32  ((ossim_sint32)0x7FFFFFFF)
+
+#define OSSIM_DEFAULT_NULL_PIX_UINT32 ((ossim_uint32)0)
+#define OSSIM_DEFAULT_MIN_PIX_UINT32  ((ossim_uint32)1)
+#define OSSIM_DEFAULT_MAX_PIX_UINT32  ((ossim_uint32)0xFFFFFFFF)
+
+#define OSSIM_DEFAULT_NULL_PIX_SINT64 ((ossim_sint32)0x8000000000000000)
+#define OSSIM_DEFAULT_MIN_PIX_SINT64  ((ossim_sint32)0x8000000000000001)
+#define OSSIM_DEFAULT_MAX_PIX_SINT64  ((ossim_sint32)0x7FFFFFFFFFFFFFFF)
+
+#define OSSIM_DEFAULT_NULL_PIX_UINT64 ((ossim_uint32)0)
+#define OSSIM_DEFAULT_MIN_PIX_UINT64  ((ossim_uint32)1)
+#define OSSIM_DEFAULT_MAX_PIX_UINT64  ((ossim_uint32)0xFFFFFFFFFFFFFFFF)
+
+#define OSSIM_DEFAULT_NULL_PIX_UINT11 ((ossim_uint16)0)
+#define OSSIM_DEFAULT_MIN_PIX_UINT11  ((ossim_uint16)1)
+#define OSSIM_DEFAULT_MAX_PIX_UINT11  ((ossim_uint16)0x07FF)
+
+#define OSSIM_DEFAULT_NULL_PIX_FLOAT  ((ossim_float32)-1.0/FLT_EPSILON)
+#define OSSIM_DEFAULT_MIN_PIX_FLOAT   ((ossim_float32)((-1.0/FLT_EPSILON) + 1))
+#define OSSIM_DEFAULT_MAX_PIX_FLOAT   ((ossim_float32)((1.0/FLT_EPSILON)))
+
+#define OSSIM_DEFAULT_NULL_PIX_NORM_FLOAT  ((ossim_float32)0)
+#define OSSIM_DEFAULT_MIN_PIX_NORM_FLOAT   ((ossim_float32)((2*FLT_EPSILON)))
+#define OSSIM_DEFAULT_MAX_PIX_NORM_FLOAT   ((ossim_float32)1.0)
+
+#define OSSIM_DEFAULT_NULL_PIX_DOUBLE      ((ossim_float64)-1.0/DBL_EPSILON)
+#define OSSIM_DEFAULT_MIN_PIX_DOUBLE       ((ossim_float64)((-1.0/DBL_EPSILON) + 1))
+#define OSSIM_DEFAULT_MAX_PIX_DOUBLE       ((ossim_float64)((1.0/DBL_EPSILON)))
+
+#define OSSIM_DEFAULT_NULL_PIX_NORM_DOUBLE ((ossim_float64)0)
+#define OSSIM_DEFAULT_MIN_PIX_NORM_DOUBLE  ((ossim_float64)((2*DBL_EPSILON)))
+#define OSSIM_DEFAULT_MAX_PIX_NORM_DOUBLE  ((ossim_float64)(1.0))
+
+#define OSSIM_DEFAULT_MEAN_SEA_LEVEL ((ossim_float64)0.0)
+
+#endif /* #ifndef ossimConstants_HEADER */
diff --git a/ossim/include/ossim/base/ossimContainerEvent.h b/ossim/include/ossim/base/ossimContainerEvent.h
new file mode 100644
index 0000000..87aa214
--- /dev/null
+++ b/ossim/include/ossim/base/ossimContainerEvent.h
@@ -0,0 +1,46 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimContainerEvent.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimContainerEvent_HEADER
+#define ossimContainerEvent_HEADER
+#include <ossim/base/ossimEvent.h>
+#include <ossim/base/ossimEventIds.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <vector>
+
+class OSSIMDLLEXPORT ossimContainerEvent : public ossimEvent
+{
+public:
+
+   typedef std::vector<ossimRefPtr<ossimObject> > ObjectList;
+   
+   /** constuctor */
+   ossimContainerEvent(ossimObject* obj1,// the object firing the event.
+                       long id);
+
+   void setObjectList(ossimObject* obj);
+   void setObjectList(ObjectList& objects);
+   ObjectList& getObjectList(){return m_objectList;}
+   const ObjectList& getObjectList()const{return m_objectList;}
+   
+protected:
+   
+   /*!
+    * This is the object associated with the container event.
+    * if this was an add then it s the object added to the
+    * container.
+    */
+      ObjectList m_objectList;
+
+TYPE_DATA
+};
+
+#endif /* end of: "#ifndef ossimContainerEvent_HEADER" */
+
diff --git a/include/ossim/base/ossimContainerProperty.h b/ossim/include/ossim/base/ossimContainerProperty.h
similarity index 100%
rename from include/ossim/base/ossimContainerProperty.h
rename to ossim/include/ossim/base/ossimContainerProperty.h
diff --git a/include/ossim/base/ossimCplUtil.h b/ossim/include/ossim/base/ossimCplUtil.h
similarity index 100%
rename from include/ossim/base/ossimCplUtil.h
rename to ossim/include/ossim/base/ossimCplUtil.h
diff --git a/include/ossim/base/ossimCsvFile.h b/ossim/include/ossim/base/ossimCsvFile.h
similarity index 100%
rename from include/ossim/base/ossimCsvFile.h
rename to ossim/include/ossim/base/ossimCsvFile.h
diff --git a/include/ossim/base/ossimCustomEditorWindow.h b/ossim/include/ossim/base/ossimCustomEditorWindow.h
similarity index 100%
rename from include/ossim/base/ossimCustomEditorWindow.h
rename to ossim/include/ossim/base/ossimCustomEditorWindow.h
diff --git a/include/ossim/base/ossimCustomEditorWindowFactoryBase.h b/ossim/include/ossim/base/ossimCustomEditorWindowFactoryBase.h
similarity index 100%
rename from include/ossim/base/ossimCustomEditorWindowFactoryBase.h
rename to ossim/include/ossim/base/ossimCustomEditorWindowFactoryBase.h
diff --git a/include/ossim/base/ossimCustomEditorWindowRegistry.h b/ossim/include/ossim/base/ossimCustomEditorWindowRegistry.h
similarity index 100%
rename from include/ossim/base/ossimCustomEditorWindowRegistry.h
rename to ossim/include/ossim/base/ossimCustomEditorWindowRegistry.h
diff --git a/ossim/include/ossim/base/ossimDataObject.h b/ossim/include/ossim/base/ossimDataObject.h
new file mode 100644
index 0000000..71d945c
--- /dev/null
+++ b/ossim/include/ossim/base/ossimDataObject.h
@@ -0,0 +1,116 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimDataObject.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimDataObject_HEADER
+#define ossimDataObject_HEADER
+
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimDpt3d.h>
+
+class ossimSource;
+
+class OSSIMDLLEXPORT ossimDataObject : public ossimObject
+{
+public:
+   ossimDataObject(ossimSource* source=0,
+                   ossimDataObjectStatus status=OSSIM_STATUS_UNKNOWN);
+   
+   ossimDataObject(const ossimDataObject& rhs);
+   virtual ~ossimDataObject();
+
+
+
+   virtual ossim_uint32 getHashId()const=0;
+   
+   /**
+    * Sets the owner of this Data object.
+    */
+   virtual void setOwner(ossimSource* aSource);
+
+   virtual ossimSource* getOwner();
+
+   virtual const ossimSource* getOwner() const;
+
+   /**
+    * Full list found in ossimConstants.h
+    *
+    * OSSIM_STATUS_UNKNOWN
+    * OSSIM_NULL            Null data.  The buffers are never allocated
+    * OSSIM_EMPTY           Allocated data but its empty.  Most of the
+    *                       time this will be the default for an initialized
+    *                       data object.
+    * OSSIM_PARTIAL         Says that some of the object is empty and is only
+    *                       partially full
+    * OSSIM_FULL            This data is completey full
+    */
+   virtual void  setDataObjectStatus(ossimDataObjectStatus status) const;
+
+   /**
+    * @return Returns enumerated status:
+    * OSSIM_STATUS_UNKNOWN = 0
+    * OSSIM_NULL           = 1
+    * OSSIM_EMPTY          = 2
+    * OSSIM_PARTIAL        = 3
+    * OSSIM_FULL           = 4
+    */
+   virtual ossimDataObjectStatus getDataObjectStatus() const;
+
+   /**
+    * @return Returns the status as a string, like "OSSIM_NULL".
+    */
+   virtual ossimString getDataObjectStatusString() const;
+
+   virtual ossim_uint32 getObjectSizeInBytes()const;
+
+   virtual ossim_uint32 getDataSizeInBytes()const=0;
+
+   /**
+    * This is to be overriden in the derived classes so they can check
+    * If their data is null.
+    */
+   virtual bool isInitialize() const;
+
+   /**
+    * Will allow derived classes to initialize their buffers.  This class
+    * does nothing with this and reset any internal attributes.
+    */
+   virtual void initialize()=0;
+   
+   virtual void assign(const ossimDataObject* rhs);
+
+   virtual const ossimDataObject* operator =(const ossimDataObject* rhs);
+   
+   virtual const ossimDataObject& operator=(const ossimDataObject& rhs);
+
+   virtual bool operator==(const ossimDataObject& rhs) const;
+   virtual bool operator!=(const ossimDataObject& rhs) const;
+
+   virtual std::ostream& print(std::ostream& out) const;
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+
+protected:
+
+   //***
+   // Note:  This object is not responsible for deletion of the ossimSource*
+   //        "theSource".  It is simply a hook to his owner for things
+   //        like unregister and so forth...
+   //***
+   ossimSource*                      theOwner;
+   mutable ossimDataObjectStatus     theDataObjectStatus;
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/base/ossimDate.h b/ossim/include/ossim/base/ossimDate.h
new file mode 100644
index 0000000..18688b5
--- /dev/null
+++ b/ossim/include/ossim/base/ossimDate.h
@@ -0,0 +1,280 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimDate.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimDate_HEADER
+#define ossimDate_HEADER
+#include <ctime>
+#include <iosfwd>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimXmlNode.h>
+#include <OpenThreads/Mutex>
+#include <OpenThreads/ScopedLock>
+
+class OSSIM_DLL ossimLocalTm : public std::tm
+{
+public:
+   friend OSSIM_DLL std::ostream& operator<<(std::ostream& out, const ossimLocalTm& src);
+   friend OSSIM_DLL int operator== (const ossimLocalTm& t1,
+                                    const ossimLocalTm& src);
+   friend OSSIM_DLL int operator!= (const ossimLocalTm& t1,
+                                    const ossimLocalTm& src);
+   friend OSSIM_DLL int operator<  (const ossimLocalTm& t1,
+                                    const ossimLocalTm& src);
+   friend OSSIM_DLL int operator<= (const ossimLocalTm& t1,
+                                    const ossimLocalTm& src);
+   friend OSSIM_DLL int operator>  (const ossimLocalTm& t1,
+                                    const ossimLocalTm& src);
+   friend OSSIM_DLL int operator>= (const ossimLocalTm& t1,
+                                    const ossimLocalTm& src);
+   
+   ossimLocalTm (time_t t=0);     // Set to time, 0 is magic for 'now'
+   ossimLocalTm (tm const & t); // Copy constructor
+   ossimLocalTm (const ossimLocalTm& t); // Copy constructor
+   
+   ossimLocalTm & operator= (tm const & t);            // Assignment
+   ossimLocalTm & operator= (const ossimLocalTm & t);            // Assignment
+   operator time_t (void) const;        // Conversion operator
+   
+   int isValid (void) const;             // Test for validity
+   
+   void now();
+   int compare (ossimLocalTm const & t) const;      // Compare times
+   int compare (std::time_t const tt) const;       // Compare times
+   
+   enum ossimLocalTmFormat     // Date format flags
+   {
+      ossimLocalTmFormatYear          = (int)0x0001,            // Print year
+      ossimLocalTmFormatYearShort     = (int)0x0002, // Print last two digits
+      ossimLocalTmFormatPadYear       = (int)0x0004,    // Pad year to 2 or 4
+      ossimLocalTmFormatZeroYear      = (int)0x0008,        // Zero fill year
+      ossimLocalTmFormatMonth         = (int)0x0010,           // Print month
+      ossimLocalTmFormatMonText       = (int)0x0020,   // Print month in text
+      ossimLocalTmFormatPadMon        = (int)0x0040, // Pad to 2 (trunc to 3)
+      ossimLocalTmFormatZeroMon       = (int)0x0080,       // Zero fill month
+      ossimLocalTmFormatDay           = (int)0x0100,            // Print date
+      ossimLocalTmFormatDayOfWeek     = (int)0x0200,     // Print day of week
+      ossimLocalTmFormatPadDay        = (int)0x0400,         // Pad date to 2
+      ossimLocalTmFormatZeroDay       = (int)0x0800,         // Zero fill day
+      ossimLocalTmFormatDMY           = (int)0x0111, // Print date, mth, year
+      ossimLocalTmFormatPadDMY        = (int)0x0444,         // Pad all three
+      ossimLocalTmFormatZeroDMY       = (int)0x0888,   // Zero fill all three
+      ossimLocalTmFormatYearFirst     = (int)0x1000,      // Print year first
+      ossimLocalTmFormatMonFirst      = (int)0x2000,     // Print month first
+      ossimLocalTmFormatSepChar       = (int)0x4000,// Separate fields datech
+      ossimLocalTmFormatSepSpace      = (int)0x8000,  // Separate fields space
+      ossimLocalTmFormatInternational = (int)(ossimLocalTmFormatDMY|ossimLocalTmFormatMonText|ossimLocalTmFormatPadMon|
+                                              ossimLocalTmFormatSepSpace),
+      ossimLocalTmFormatIntlShort     = (int)(ossimLocalTmFormatDMY|ossimLocalTmFormatMonText|ossimLocalTmFormatPadMon|
+                                              ossimLocalTmFormatSepSpace|ossimLocalTmFormatYearShort),
+      ossimLocalTmFormatUsa           = (int)(ossimLocalTmFormatDMY|ossimLocalTmFormatMonFirst|ossimLocalTmFormatPadDMY|
+                                              ossimLocalTmFormatZeroDMY|ossimLocalTmFormatYearShort|ossimLocalTmFormatSepChar),
+      ossimLocalTmFormatEnglish       = (int)(ossimLocalTmFormatDMY|ossimLocalTmFormatYearShort|ossimLocalTmFormatPadDMY|
+                                              ossimLocalTmFormatZeroDMY|ossimLocalTmFormatSepChar),
+      ossimLocalTmFormatJapanese      = (int)(ossimLocalTmFormatDMY|ossimLocalTmFormatYearFirst|ossimLocalTmFormatPadDMY|
+                                              ossimLocalTmFormatZeroDMY|ossimLocalTmFormatYearShort|ossimLocalTmFormatMonFirst|
+                                              ossimLocalTmFormatSepChar),
+      ossimLocalTmFormatFull          = (int)(ossimLocalTmFormatDMY|ossimLocalTmFormatDayOfWeek|ossimLocalTmFormatMonText|
+                                              ossimLocalTmFormatSepSpace)
+   };
+   
+   enum ossimTimeFormat  // Time format (nb: time zones not implemented)
+   {
+      ossimTimeFormatSecs          = (int)0x0001,         // Print seconds
+      ossimTimeFormatZeroSecs      = (int)0x0002,     // Zero fill seconds
+      ossimTimeFormatPadSecs       = (int)0x0004,      // Pad seconds to 2
+      ossimTimeFormatSecsAll       = (int)0x0007,
+      ossimTimeFormatTimeZone      = (int)0x0008,        // Print timezone
+      ossimTimeFormatMins          = (int)0x0010,         // Print minutes
+      ossimTimeFormatZeroMins      = (int)0x0020,     // Zero fill minutes
+      ossimTimeFormatPadMins       = (int)0x0040,      // Pad minutes to 2
+      ossimTimeFormatMinsAll       = (int)0x0070,
+      ossimTimeFormatTZNumeric     = (int)0x0080,      // Print numeric TZ
+      ossimTimeFormatHour          = (int)0x0100,            // Print hour
+      ossimTimeFormatZeroHour      = (int)0x0200,        // Zero fill hour
+      ossimTimeFormatPadHour       = (int)0x0400,  // Pad hour to 2 digits
+      ossimTimeFormatHourAll       = (int)0x0700,
+      ossimTimeFormat24hour        = (int)0x0800,          // 24hour clock
+      ossimTimeFormatSepChar       = (int)0x1000, // Separate field timech
+      ossimTimeFormatSepSpace      = (int)0x2000, // Separate fields space
+      ossimTimeFormatSepAbbrev     = (int)0x4000,     // Add abbreviations
+      ossimTimeFormatAmPm          = (int)0x8000,       // Add 'am' or 'pm'
+      ossimTimeFormatInternational = (int)(ossimTimeFormatHourAll|ossimTimeFormatMinsAll|ossimTimeFormatSecsAll|
+                                           ossimTimeFormat24hour|ossimTimeFormatSepChar),
+      ossimTimeFormatShortTime     = (int)(ossimTimeFormatHourAll|ossimTimeFormatMinsAll|ossimTimeFormat24hour|
+                                           ossimTimeFormatSepChar),
+      ossimTimeFormatClockTime     = (int)(ossimTimeFormatHour|ossimTimeFormatPadHour|ossimTimeFormatMinsAll|
+                                           ossimTimeFormatAmPm|ossimTimeFormatSepChar),
+      ossimTimeFormatLongTime      = (int)(ossimTimeFormatHour|ossimTimeFormatPadHour|ossimTimeFormatMinsAll|
+                                           ossimTimeFormatSecsAll|ossimTimeFormatSepAbbrev|ossimTimeFormatSepSpace),
+      ossimTimeFormatMillitary     = (int)(ossimTimeFormatHourAll|ossimTimeFormatMinsAll|ossimTimeFormat24hour)
+   };
+   
+   
+   static char timech;    // Character used for time separator
+   static char datech;    // Character used for date separator
+   static int datefmt;                  // Default date format
+   static int timefmt;                  // Default time format
+   
+   // Output methods
+   std::ostream& print(std::ostream & os,
+                       int df =datefmt,
+                       int tf =timefmt) const;
+   std::ostream& printTime(std::ostream & os, int f =timefmt) const;
+   std::ostream& printDate(std::ostream & os, int f =datefmt) const;
+   
+   /**
+    * @brief method to dump all the data members.  This is the tm struct +
+    * the theFractionalSecond from this class.
+    *
+    * @note: tm_gmtoff and  tm_zone from tm struct are not printed as they
+    * are not standard.
+    *
+    * @param os Stream to dump to.
+    *
+    * @return stream.
+    */
+   std::ostream& dump(std::ostream& os) const;
+   
+   
+   int getYear()const;
+   
+   int getShortYear()const;
+   
+   /*!
+    * This is one based i.e. values are returned between 1-12
+    */
+   int getMonth()const;
+   
+   /*!
+    * returns the day 1-31
+    */
+   int getDay()const;
+   double getJulian()const;
+   double getModifiedJulian()const;
+   
+   ossimLocalTm& setDay(int day);
+   /*!
+    * The month is a number bewteen 1 and 12.  We will shift it to the internal
+    * representation
+    */
+   ossimLocalTm& setMonth(int month);
+   ossimLocalTm& setYear(int year);
+   ossimLocalTm& setDateFromJulian(double jd);
+   ossimLocalTm& setDateFromModifiedJulian(double mjd);
+   
+   void setFractionalDay(double fractionalDay);
+   static void extractHmsFromFractionalDay(double fractionalDay,
+                                           int &h,
+                                           int &m,
+                                           int &s,
+                                           double& fractionalSecond);
+   int getHour()const;
+   int getMin()const;
+   int getSec()const;
+   double getFractionalSecond()const;
+   ossimLocalTm& setHour(int h);
+   ossimLocalTm& setMin(int m);
+   ossimLocalTm& setSec(int s);
+   ossimLocalTm& setFloatSec(double s);
+   ossimLocalTm& setFractionalSecond(double fractS);
+   
+   /**
+    * getTicks() will call getEpoc.  This is te number of microseconds passed
+    * since (00:00:00 UTC, January 1, 1970)
+    */ 
+   time_t getTicks()const;
+   time_t getEpoc()const;
+   
+   void addSeconds(ossim_float64 n);
+   void addMinutes(ossim_float64 n);
+   void addHours(ossim_float64 n);
+   void addDays(ossim_float64 n);
+   
+   ossim_float64 deltaInSeconds(const ossimLocalTm& d)const;
+   ossim_float64 deltaInMinutes(const ossimLocalTm& d)const;
+   ossim_float64 delatInHours(const ossimLocalTm& d)const;
+   ossim_float64 deltaInDays(const ossimLocalTm& d)const;
+   
+   ossimLocalTm convertToGmt()const;
+   /**
+    * Will not adjust for timezone.  The passed in value is based on seconds.
+    */ 
+   void setTimeNoAdjustmentGivenEpoc(time_t ticks);
+   
+   /**
+    * Will adjust for timezone. The passed in value is based on seconds.
+    */ 
+   void setTimeGivenEpoc(time_t ticks);
+   
+   bool setIso8601(const std::string& timeString, bool shiftToGmtOffsetZero=false);
+   
+   ossimRefPtr<ossimXmlNode> saveXml()const;
+   bool loadXml(ossimRefPtr<ossimXmlNode> dateNode);
+   
+protected:
+   // Time suffix
+   void tSfx(std::ostream & os, int fmt, char ch) const;
+   // Time field formatters
+   void pHour(std::ostream & os, int fmt) const;
+   void pMins(std::ostream & os, int fmt) const;
+   void pSecs(std::ostream & os, int fmt) const;
+   // Date suffix
+   void dSfx(std::ostream & os, int fmt) const;
+   // Date field formatters
+   void pDate(std::ostream & os, int fmt) const;
+   void pMonth(std::ostream & os, int fmt) const;
+   void pYear(std::ostream & os, int fmt) const;
+   
+   void setTimezoneOffsetFromGmt();
+   static OpenThreads::Mutex m_mutex;
+   double theFractionalSecond;
+   int m_timezoneOffset;
+};
+
+
+class OSSIM_DLL ossimDate : public ossimLocalTm
+{
+public:
+   friend OSSIM_DLL std::ostream& operator<<(std::ostream& out, const ossimDate& src);
+   
+   ossimDate(int datefmt =ossimLocalTm::datefmt);
+   ossimDate (ossimLocalTm const & t,
+              int dtfmt =ossimLocalTm::datefmt);
+   ossimDate (time_t t, int dtfmt =ossimLocalTm::datefmt);
+   ossimDate(int month, int day, int year,int dtfmt=ossimLocalTm::datefmt);
+   
+   int fmt(int f);
+   int fmt(void) const;
+   
+   std::ostream & print (std::ostream & os) const;
+   
+private:
+   int _fmt;
+};
+
+class OSSIM_DLL ossimTime :public ossimLocalTm
+{
+public:
+   friend OSSIM_DLL std::ostream& operator<<(std::ostream& out, const ossimTime& src);
+   ossimTime(int tmfmt =ossimLocalTm::timefmt);
+   ossimTime (ossimTime const & t,
+              int tmfmt =ossimLocalTm::timefmt);
+   ossimTime (time_t t, int tmfmt =ossimLocalTm::timefmt);
+   
+   int fmt (int f);
+   int fmt (void) const;
+   
+   std::ostream& print (std::ostream & os) const;
+   
+private:
+   int _fmt;   
+};
+#endif
+
diff --git a/ossim/include/ossim/base/ossimDateProperty.h b/ossim/include/ossim/base/ossimDateProperty.h
new file mode 100644
index 0000000..e038f59
--- /dev/null
+++ b/ossim/include/ossim/base/ossimDateProperty.h
@@ -0,0 +1,37 @@
+//*******************************************************************
+//
+// LICENSE: MIT see top level license.txt
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimDateProperty.h 23666 2015-12-14 20:01:22Z rashadkm $
+#ifndef ossimDateProperty_HEADER
+#define ossimDateProperty_HEADER
+#include <ossim/base/ossimProperty.h>
+#include <ossim/base/ossimDate.h>
+
+class OSSIM_DLL ossimDateProperty : public ossimProperty
+{
+public:
+   ossimDateProperty();
+   ossimDateProperty(const ossimString& name,
+                     const ossimString& value);
+   ossimDateProperty(const ossimString& name,
+                     const ossimLocalTm& value);
+   ossimDateProperty(const ossimDateProperty& src);
+   virtual ossimObject* dup()const;
+   
+   void setDate(const ossimLocalTm& localTm);
+   const ossimLocalTm& getDate()const;
+   virtual bool setValue(const ossimString& value);
+   virtual void valueToString(ossimString& valueResult)const;
+   virtual const ossimProperty& assign(const ossimProperty& rhs);
+   
+protected:
+   ossimLocalTm theValue;
+
+TYPE_DATA
+};
+
+#endif
diff --git a/include/ossim/base/ossimDatum.h b/ossim/include/ossim/base/ossimDatum.h
similarity index 100%
rename from include/ossim/base/ossimDatum.h
rename to ossim/include/ossim/base/ossimDatum.h
diff --git a/ossim/include/ossim/base/ossimDatumFactory.h b/ossim/include/ossim/base/ossimDatumFactory.h
new file mode 100644
index 0000000..b6750a6
--- /dev/null
+++ b/ossim/include/ossim/base/ossimDatumFactory.h
@@ -0,0 +1,66 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+// Description:
+//
+// This is the DatumFactory class.  You give it a code and it will
+// construct a Datum class.  It returns NULL if no code was found.
+//*******************************************************************
+//  $Id: ossimDatumFactory.h 22851 2014-08-05 12:02:55Z gpotts $
+
+#ifndef ossimDatumFactory_HEADER
+#define ossimDatumFactory_HEADER 1
+
+#include <ossim/base/ossimDatumFactoryInterface.h>
+#include <ossim/base/ossimEllipsoidFactory.h>
+#include <map>
+#include <string>
+#include <vector>
+
+class ossimFilename;
+class ossimDatum;
+class ossimWgs84Datum;
+class ossimWgs72Datum;
+class ossimString;
+
+class OSSIM_DLL ossimDatumFactory : public ossimDatumFactoryInterface
+{
+public:
+
+   /** virtual destructor */
+   virtual ~ossimDatumFactory();
+
+   /**
+    * create method
+    *
+    * Implements pure virtual ossimDatumFactoryInterface::create.
+    *
+    * @return const pointer to a datum.
+    */
+   virtual const ossimDatum* create(const ossimString &code)const;
+   virtual const ossimDatum* create(const ossimKeywordlist& kwl, const char *prefix=0)const;
+
+   const ossimDatum* create(const ossimDatum* copy) const;
+
+   static ossimDatumFactory* instance();
+   const ossimDatum* wgs84()const{return theWgs84Datum;}
+   const ossimDatum* wgs72()const{return theWgs72Datum;}
+   std::vector<ossimString> getList()const;
+   virtual void getList(std::vector<ossimString>& list)const;
+   void writeCStructure(const ossimFilename& file);
+protected:
+ //  static ossimDatumFactory*       theInstance;
+   const ossimDatum*               theWgs84Datum;
+   const ossimDatum*               theWgs72Datum;
+   std::map<std::string, const ossimDatum*> theDatumTable;
+   
+
+   ossimDatumFactory();
+
+   void deleteAll();
+   void initializeDefaults();
+};
+#endif
diff --git a/include/ossim/base/ossimDatumFactoryInterface.h b/ossim/include/ossim/base/ossimDatumFactoryInterface.h
similarity index 100%
rename from include/ossim/base/ossimDatumFactoryInterface.h
rename to ossim/include/ossim/base/ossimDatumFactoryInterface.h
diff --git a/ossim/include/ossim/base/ossimDatumFactoryRegistry.h b/ossim/include/ossim/base/ossimDatumFactoryRegistry.h
new file mode 100644
index 0000000..27e16f9
--- /dev/null
+++ b/ossim/include/ossim/base/ossimDatumFactoryRegistry.h
@@ -0,0 +1,75 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file
+//
+// Author:  David Burken
+//
+// Description: Class declaration of Registry (singleton) for datum factories.
+//
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimDatumFactoryRegistry_HEADER
+#define ossimDatumFactoryRegistry_HEADER
+
+#include <vector>
+#include <ossim/base/ossimConstants.h> /* for OSSIM_DLL macro */
+#include <ossim/base/ossimDatumFactoryInterface.h> 
+#include <OpenThreads/ReadWriteMutex>
+
+// Forward class declarations.
+class ossimDatumFactoryInterface;
+class ossimString;
+class ossimDatum;
+
+class OSSIM_DLL ossimDatumFactoryRegistry : public ossimDatumFactoryInterface
+{
+public:
+   
+   /** destructor */
+   ~ossimDatumFactoryRegistry();
+
+   /**
+    * instance method
+    *
+    * @return Point to the instance of the registry.
+    */
+   static ossimDatumFactoryRegistry* instance();
+
+   /**
+    * Method to add factory to registry.
+    * @param factory Factory to register.
+    */
+   void registerFactory(ossimDatumFactoryInterface* factory);
+   
+   /**
+    * create method
+    *
+    * Implements pure virtual ossimDatumFactoryInterface::create.
+    *
+    * @return const pointer to a datum.
+    */
+   virtual const ossimDatum* create(const ossimString& code)const;
+   virtual const ossimDatum* create(const ossimKeywordlist& kwl, const char *prefix=0) const;
+
+   /**
+    * getList method to return a combined list of all datums from registered
+    * datum factories.
+    *
+    * @param list The list to add to.
+    */
+   virtual void getList(std::vector<ossimString>& list) const;
+   
+protected:
+
+   /** hidden from use default constructor */
+   ossimDatumFactoryRegistry();
+
+   /** Single static instance of this class. */
+   //static ossimDatumFactoryRegistry* theInstance;
+
+	mutable OpenThreads::ReadWriteMutex theFactoryListMutex;
+   std::vector<ossimDatumFactoryInterface*> theFactoryList;
+};
+
+#endif /* #ifndef ossimDatumFactoryRegistry_HEADER */
diff --git a/include/ossim/base/ossimDblGrid.h b/ossim/include/ossim/base/ossimDblGrid.h
similarity index 100%
rename from include/ossim/base/ossimDblGrid.h
rename to ossim/include/ossim/base/ossimDblGrid.h
diff --git a/ossim/include/ossim/base/ossimDirectory.h b/ossim/include/ossim/base/ossimDirectory.h
new file mode 100644
index 0000000..30cb413
--- /dev/null
+++ b/ossim/include/ossim/base/ossimDirectory.h
@@ -0,0 +1,106 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+//
+// Description: 
+//
+//*************************************************************************
+// $Id: ossimDirectory.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimDirectory_HEADER
+#define ossimDirectory_HEADER
+
+#include <ossim/base/ossimFilename.h>
+
+#ifndef _WIN32
+class ossimDirectoryData;
+#endif
+
+class  OSSIMDLLEXPORT ossimDirectory
+{
+public:
+   
+   /*!
+    * These flags define what kind of filenames is included in the list
+    * of files enumerated by GetFirst/GetNext.
+    */
+   enum
+   {
+      OSSIM_DIR_FILES     = 0x0001,       // include files
+      OSSIM_DIR_DIRS      = 0x0002,       // include directories
+      OSSIM_DIR_HIDDEN    = 0x0004,       // include hidden files
+      OSSIM_DIR_DOTDOT    = 0x0008,       // include '.' and '..'
+      
+      // by default, enumerate everything except '.' and '..'
+      OSSIM_DIR_DEFAULT   = OSSIM_DIR_FILES | OSSIM_DIR_DIRS | OSSIM_DIR_HIDDEN
+   };
+
+
+   ossimDirectory();
+   
+   ossimDirectory(const ossimFilename& dir);
+   
+   ~ossimDirectory();
+   
+   bool open(const ossimFilename& dir);
+   
+   bool isOpened() const;
+   
+   bool getFirst(ossimFilename &filename,
+                 int flags = OSSIM_DIR_DEFAULT);
+   
+   /*!
+    * Get next file in the enumeration started with either GetFirst() or
+    * GetFirstNormal().
+    */
+   bool getNext(ossimFilename &filename) const;
+   
+   void findAllFilesThatMatch(std::vector<ossimFilename>& result,
+                              const ossimString& regularExpressionPattern,
+                              int flags = OSSIM_DIR_DEFAULT);
+   
+#if defined (_WIN32)
+   void setFlags(int flags) { theFlags = flags; };
+   bool fileMatched(ossimFilename &filename) const;
+#endif    
+
+   // ESH 07/2008, Trac #234: OSSIM is case sensitive 
+   // when using worldfile templates during ingest
+   /*!
+    * Case insensitive search for files with the same name but 
+    * with letters that have different case than the input name. 
+    *
+    * On Windows there can only be one match, but the case can be 
+    * different than the input name. On UNIX there can be multiple 
+    * matches.
+    *
+    * If the bExcludeExactMatch input parameter is set to false, 
+    * the original input name will be included in the 'result'
+    * vector if it is found in the directory. Otherwise (the default),
+    * the input name is excluded from the 'result' vector even if it
+    * is found in the directory.
+    *
+    * Returns true if a name has been added to the result vector.
+    */
+   bool findCaseInsensitiveEquivalents( const ossimFilename &filename, 
+                                        std::vector<ossimFilename>& result,
+                                        bool bExcludeExactMatch = true );
+   
+   // TODO using scandir() when available later, emulating it otherwise
+   
+private:
+#if defined (_WIN32)
+   intptr_t      theData;
+   ossimFilename theDirectoryName;
+   int           theFlags;
+#else
+   ossimDirectoryData* theData;
+#endif
+};
+
+#endif /* #ifndef ossimDirectory_HEADER */
+
diff --git a/include/ossim/base/ossimDirectoryData.h b/ossim/include/ossim/base/ossimDirectoryData.h
similarity index 100%
rename from include/ossim/base/ossimDirectoryData.h
rename to ossim/include/ossim/base/ossimDirectoryData.h
diff --git a/include/ossim/base/ossimDirectoryTree.h b/ossim/include/ossim/base/ossimDirectoryTree.h
similarity index 100%
rename from include/ossim/base/ossimDirectoryTree.h
rename to ossim/include/ossim/base/ossimDirectoryTree.h
diff --git a/include/ossim/base/ossimDisplayEventListener.h b/ossim/include/ossim/base/ossimDisplayEventListener.h
similarity index 100%
rename from include/ossim/base/ossimDisplayEventListener.h
rename to ossim/include/ossim/base/ossimDisplayEventListener.h
diff --git a/ossim/include/ossim/base/ossimDisplayInterface.h b/ossim/include/ossim/base/ossimDisplayInterface.h
new file mode 100644
index 0000000..e303012
--- /dev/null
+++ b/ossim/include/ossim/base/ossimDisplayInterface.h
@@ -0,0 +1,41 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimDisplayInterface.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimDisplayInterface_HEADER
+#define ossimDisplayInterface_HEADER
+#include <ossim/base/ossimRtti.h>
+#include <ossim/base/ossimString.h>
+
+class OSSIMDLLEXPORT ossimDisplayInterface
+{
+public:
+   ossimDisplayInterface();
+
+   virtual ~ossimDisplayInterface();
+
+   /*!
+    * Returns the display back to the caller
+    */
+   virtual void* getDisplayDevice()=0;
+
+   virtual void setTitle(const ossimString& title)=0;
+   virtual void getTitle(ossimString& title)const=0;
+   virtual ossimString getTitle()const;
+   virtual void close()=0;
+   virtual bool isOpen() const=0;
+   virtual bool open()=0;
+   virtual bool isMinimized()const=0;
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/base/ossimDisplayListEvent.h b/ossim/include/ossim/base/ossimDisplayListEvent.h
similarity index 100%
rename from include/ossim/base/ossimDisplayListEvent.h
rename to ossim/include/ossim/base/ossimDisplayListEvent.h
diff --git a/include/ossim/base/ossimDisplayRefreshEvent.h b/ossim/include/ossim/base/ossimDisplayRefreshEvent.h
similarity index 100%
rename from include/ossim/base/ossimDisplayRefreshEvent.h
rename to ossim/include/ossim/base/ossimDisplayRefreshEvent.h
diff --git a/include/ossim/base/ossimDms.h b/ossim/include/ossim/base/ossimDms.h
similarity index 100%
rename from include/ossim/base/ossimDms.h
rename to ossim/include/ossim/base/ossimDms.h
diff --git a/include/ossim/base/ossimDoubleGridProperty.h b/ossim/include/ossim/base/ossimDoubleGridProperty.h
similarity index 100%
rename from include/ossim/base/ossimDoubleGridProperty.h
rename to ossim/include/ossim/base/ossimDoubleGridProperty.h
diff --git a/include/ossim/base/ossimDpt.h b/ossim/include/ossim/base/ossimDpt.h
similarity index 100%
rename from include/ossim/base/ossimDpt.h
rename to ossim/include/ossim/base/ossimDpt.h
diff --git a/ossim/include/ossim/base/ossimDpt3d.h b/ossim/include/ossim/base/ossimDpt3d.h
new file mode 100644
index 0000000..bb34f12
--- /dev/null
+++ b/ossim/include/ossim/base/ossimDpt3d.h
@@ -0,0 +1,149 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+// Description:  
+//
+// Contains class declaration for dpt3d
+// Used to represent a 3d double point containing an x, y and z data member.
+//*******************************************************************
+//  $Id: ossimDpt3d.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimDpt3d_HEADER
+#define ossimDpt3d_HEADER
+
+#include <cmath>
+#include <iosfwd>
+#include <string>
+
+#include <ossim/base/ossimCommon.h> /* for ossim::isnan */
+#include <ossim/base/ossimColumnVector3d.h>
+
+class ossimIpt;
+class ossimDpt;
+
+class OSSIMDLLEXPORT ossimDpt3d
+{
+public:
+   friend OSSIMDLLEXPORT std::ostream & operator <<(std::ostream &out,
+                                                    const ossimDpt3d &rhs);
+   
+   ossimDpt3d(const double &aX=0, const double &aY=0, const double &aZ=0)
+      :x(aX), y(aY), z(aZ) {}
+
+   ossimDpt3d(const ossimDpt &aPt);
+   ossimDpt3d(const ossimIpt &aPt);
+
+   //! Argument gPt is converted to WGS84 datum before coordinates are stored in x, y, z.
+   //! Likewise, ossimGpt has a constructor that accepts an ossimDpt3d with assumed WGS84 datum.
+   ossimDpt3d(const ossimGpt &gPt);
+   
+   ossimDpt3d(const ossimColumnVector3d &pt)
+      : x(pt[0]), y(pt[1]), z(pt[2]) {}
+   
+   bool operator ==(const ossimDpt3d &rhs) const
+      {
+         return ( (x == rhs.x) &&
+                  (y == rhs.y) &&
+                  (z == rhs.z));
+      }
+   bool operator !=(const ossimDpt3d &rhs) const
+   {
+      return ( (x != rhs.x) ||
+               (y != rhs.y) ||
+               (z != rhs.z) );
+   }
+   
+   void makeNan(){x = ossim::nan(); y=ossim::nan(); z=ossim::nan();}
+
+   bool hasNans()const
+   {
+      return (ossim::isnan(x) || ossim::isnan(y) || ossim::isnan(z));
+   }
+   /*!
+    * METHOD: length()
+    * Returns the RSS of the components.
+    */
+   double length() const { return std::sqrt(x*x + y*y + z*z); }
+   double length2() const { return x*x + y*y + z*z; }
+   
+   //***
+   // OPERATORS: +, -, +=, -=
+   // Point add/subtract with other point:
+   //***
+   ossimDpt3d operator+(const ossimDpt3d& p) const
+      { return ossimDpt3d(x+p.x, y+p.y, z+p.z); }
+   ossimDpt3d operator-(const ossimDpt3d& p) const
+      { return ossimDpt3d(x-p.x, y-p.y, z-p.z); }
+   const ossimDpt3d& operator+=(const ossimDpt3d& p)
+      { x += p.x; y += p.y; z += p.z; return *this; }
+   const ossimDpt3d& operator-=(const ossimDpt3d& p)
+      { x -= p.x; y -= p.y; z -= p.z; return *this; }
+
+   //***
+   // OPERATORS: *, /
+   // Scale point components by scalar:
+   //***
+   ossimDpt3d operator*(const double& d) const
+      { return ossimDpt3d(d*x, d*y, d*z); }
+   ossimDpt3d operator/(const double& d) const
+      { return ossimDpt3d(x/d, y/d, z/d); }
+  void operator /=(double value)
+      {
+         x /= value;
+         y /= value;
+         z /= value;
+      }
+   void operator *=(double value) 
+      {
+         x *= value;
+         y *= value;
+         z *= value;
+      }
+   double operator *(const ossimDpt3d& src)const
+   {
+      return (x*src.x + y*src.y + z*src.z);
+   }
+   inline const ossimDpt3d operator ^ (const ossimDpt3d& rhs) const
+   {
+      return ossimDpt3d(y*rhs.z-z*rhs.y,
+                        z*rhs.x-x*rhs.z ,
+                        x*rhs.y-y*rhs.x);
+   }
+
+   /**
+    * @brief To string method.
+    * 
+    * @param precision Output floating point precision.
+    * 
+    * @return std::string representing point.
+    *
+    * Output format:
+    * ( 0.0000000,  0.0000000,  0.00000000 )
+    *   -----x----  -----y----  ------z----
+    */
+   std::string toString(ossim_uint32 precision=15) const;
+   
+   /**
+    * @brief Initializes this point from string.
+    *
+    * Expected format:
+    * 
+    * ( 0.0000000,  0.0000000,  0.00000000 )
+    *   -----x----  -----y----  ------z----
+    *
+    * @param s String to initialize from.
+    */
+   void toPoint(const std::string& s); 
+   
+   double x;
+   double y;
+   double z;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/base/ossimDrect.h b/ossim/include/ossim/base/ossimDrect.h
new file mode 100644
index 0000000..46a39f4
--- /dev/null
+++ b/ossim/include/ossim/base/ossimDrect.h
@@ -0,0 +1,860 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Contains class declaration for drect.
+// Container class for four double points representing a rectangle.
+// 
+//*******************************************************************
+//  $Id: ossimDrect.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimDrect_HEADER
+#define ossimDrect_HEADER
+
+#include <iosfwd>
+#include <vector>
+
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimFpt.h>
+
+//***
+// NOTE:  A word on corner points...
+//
+// There is the concept of "pixel is area" and "pixel is point".
+// - Pixel is area means the (x,y) pixel coordinate refers to the upper left
+//   corner of the pixel, NOT the center of the pixel.
+// - Pixel is point means the (x,y) pixel coordinate refers to the center
+//   of the pixel, NOT the upper left corner.
+//
+// For the uniformity purposes, all pixel points  should be in the
+// "pixel is point" form; therefore, the (x,y) point should represent the
+// CENTER of the pixel.
+//***
+
+//***
+// Forward class declarations.
+//***
+class ossimIrect;
+class ossimPolygon;
+class ossimKeywordlist;
+
+//*******************************************************************
+// CLASS:  ossimDrect
+//*******************************************************************
+
+class OSSIMDLLEXPORT ossimDrect
+{
+public:
+   enum
+   {
+      UPPER_LEFT  = 1,
+      LOWER_LEFT  = 2,
+      LOWER_RIGHT = 4,
+      UPPER_RIGHT = 8
+   };
+
+   ossimDrect()
+      :
+         theUlCorner(0.0, 0.0),
+         theUrCorner(0.0, 0.0),
+         theLrCorner(0.0, 0.0),
+         theLlCorner(0.0, 0.0),
+         theOrientMode(OSSIM_LEFT_HANDED)
+      {}
+
+   ossimDrect(const ossimDpt&   ul_corner,
+              const ossimDpt&   lr_corner,
+              ossimCoordSysOrientMode mode=OSSIM_LEFT_HANDED)
+      :
+         theUlCorner(ul_corner),
+         theUrCorner(lr_corner.x, ul_corner.y),
+         theLrCorner(lr_corner),
+         theLlCorner(ul_corner.x, lr_corner.y),
+         theOrientMode(mode)
+      {
+      }
+
+   ossimDrect(const double& ul_corner_x,
+              const double& ul_corner_y,
+              const double& lr_corner_x,
+              const double& lr_corner_y,
+              ossimCoordSysOrientMode mode=OSSIM_LEFT_HANDED)
+      :
+         theUlCorner(ul_corner_x, ul_corner_y),
+         theUrCorner(lr_corner_x, ul_corner_y),
+         theLrCorner(lr_corner_x, lr_corner_y),
+         theLlCorner(ul_corner_x, lr_corner_y),
+         theOrientMode(mode)
+      {}
+   
+   ossimDrect(const ossimDrect& rect)
+      :
+         theUlCorner(rect.ul()),
+         theUrCorner(rect.ur()),
+         theLrCorner(rect.lr()),
+         theLlCorner(rect.ll()),
+         theOrientMode(rect.orientMode())
+      {}
+
+   ossimDrect(const ossimIrect& rect);
+
+   /*!
+    * Must compute a bounding rect given a collection of points or polygon:
+    */
+   ossimDrect(const std::vector<ossimDpt>& points,
+              ossimCoordSysOrientMode mode=OSSIM_LEFT_HANDED);
+   ossimDrect(const ossimDpt& p1,
+              const ossimDpt& p2,
+              const ossimDpt& p3,
+              const ossimDpt& p4,
+              ossimCoordSysOrientMode mode=OSSIM_LEFT_HANDED);
+   ossimDrect(const ossimPolygon& polygon, 
+              ossimCoordSysOrientMode mode=OSSIM_LEFT_HANDED);
+
+   /** destructor */
+   ~ossimDrect();
+   
+   //! Constructs an Drect surrounding the specified point, and of specified size.
+   ossimDrect(const ossimDpt& center, 
+              const double&   size_x, 
+              const double&   size_y,
+              ossimCoordSysOrientMode mode=OSSIM_LEFT_HANDED);
+
+   inline const ossimDrect& operator=  (const ossimDrect& rect);
+   const ossimDrect&        operator=  (const ossimIrect& rect);
+   inline bool              operator!= (const ossimDrect& rect) const;
+   inline bool              operator== (const ossimDrect& rect) const;
+
+   friend ossimDrect operator*(double scalar, const ossimDrect& rect)
+   {
+      ossimDpt ul(rect.theUlCorner.x*scalar,
+                  rect.theUlCorner.y*scalar);
+      
+      if(rect.theOrientMode == OSSIM_LEFT_HANDED)
+      {
+         return ossimDrect(ul.x,
+                           ul.y,
+                           ul.x+rect.width()*scalar-1,
+                           ul.y+rect.height()*scalar-1,
+                           rect.theOrientMode);
+      }
+      return ossimDrect(ul.x,
+                        ul.y,
+                        ul.x+rect.width()*scalar-1,
+                        ul.y-(rect.height()*scalar-1),
+                        rect.theOrientMode);
+      
+   }
+   
+   const ossimDrect& operator *=(double scalar)
+      {
+          ossimDpt ul(theUlCorner.x*scalar,
+                      theUlCorner.y*scalar);
+
+          if(theOrientMode == OSSIM_LEFT_HANDED)
+          {
+             *this = ossimDrect(ul.x,
+                                ul.y,
+                                (ul.x+width()*scalar-1),
+                                (ul.y+height()*scalar-1),
+                                theOrientMode);
+          }
+          else
+          {
+             *this = ossimDrect(ul.x,
+                                ul.y,
+                                (ul.x+width()*scalar-1),
+                                (ul.y-(height()*scalar-1)),
+                                theOrientMode);
+                                
+          }
+         return *this;
+      }
+   
+   ossimDrect operator *(double scalar)const
+      {
+         ossimDpt ul((theUlCorner.x*scalar),
+                     (theUlCorner.y*scalar));
+
+         if(theOrientMode == OSSIM_LEFT_HANDED)
+         {
+            return ossimDrect(ul.x,
+                              ul.y,
+                              (ul.x+width()*scalar-1),
+                              (ul.y+height()*scalar-1),
+                              theOrientMode);
+         }
+
+         return ossimDrect(ul.x,
+                           ul.y,
+                           (ul.x+width()*scalar-1),
+                           ul.y-(height()*scalar-1),
+                           theOrientMode);
+      }
+   const ossimDrect& operator *=(const ossimDpt& scalar)
+      {
+         ossimDpt ul((theUlCorner.x*scalar.x),
+                     (theUlCorner.y*scalar.y));
+         
+         if(theOrientMode == OSSIM_LEFT_HANDED)
+         {
+            *this = ossimDrect(ul.x,
+                               ul.y,
+                               (ul.x+width()*scalar.x - 1),
+                               (ul.y+height()*scalar.y - 1),
+                               theOrientMode);
+         }
+         else
+         {
+            *this = ossimDrect(ul.x,
+                               ul.y,
+                               (ul.x+width()*scalar.x - 1),
+                               (ul.y-(height()*scalar.y - 1)),
+                               theOrientMode);            
+         }
+         return *this;
+      }
+   
+   ossimDrect operator *(const ossimDpt& scalar)const
+      {
+         ossimDpt ul((theUlCorner.x*scalar.x),
+                     (theUlCorner.y*scalar.y));
+         
+         if(theOrientMode == OSSIM_LEFT_HANDED)
+         {
+            return ossimDrect(ul.x,
+                              ul.y,
+                              (ul.x+width()*scalar.x-1),
+                              (ul.y+height()*scalar.y-1),
+                              theOrientMode);
+         }
+         return ossimDrect(ul.x,
+                           ul.y,
+                           (ul.x+width()*scalar.x-1),
+                           (ul.y-(height()*scalar.y-1)),
+                           theOrientMode);
+      }
+   const ossimDrect& operator +=(const ossimDpt& shift)
+      {
+         ossimDpt ul((theUlCorner.x+shift.x),
+                     (theUlCorner.y+shift.y));
+                     
+         if(theOrientMode == OSSIM_LEFT_HANDED)
+         {
+            *this = ossimDrect(ul.x,
+                               ul.y,
+                               ul.x+width()-1,
+                               ul.y+height()-1,
+                               theOrientMode);
+         }
+         else
+         {
+            *this = ossimDrect(ul.x,
+                               ul.y,
+                               ul.x+width()-1,
+                               ul.y-(height()-1),
+                               theOrientMode);            
+         }
+         return *this;
+      }
+   
+   const ossimDrect& operator -=(const ossimDpt& shift)
+      {
+         ossimDpt ul((theUlCorner.x-shift.x),
+                     (theUlCorner.y-shift.y));
+         
+         if(theOrientMode == OSSIM_LEFT_HANDED)
+         {
+            *this = ossimDrect(ul.x,
+                               ul.y,
+                               ul.x+width()-1,
+                               ul.y+height()-1,
+                               theOrientMode);
+         }
+         else
+         {
+            *this = ossimDrect(ul.x,
+                               ul.y,
+                               ul.x+width()-1,
+                               ul.y-(height()-1),
+                               theOrientMode);
+         }
+         return *this;
+      }
+   
+   ossimDrect operator +(const ossimDpt& shift)const
+      {
+         ossimDpt ul((theUlCorner.x+shift.x),
+                     (theUlCorner.y+shift.y));
+                     
+         if(theOrientMode == OSSIM_LEFT_HANDED)
+         {
+            return ossimDrect(ul.x,
+                              ul.y,
+                              ul.x+width()-1,
+                              ul.y+height()-1,
+                              theOrientMode);
+         }
+         else
+         {
+            return ossimDrect(ul.x,
+                              ul.y,
+                              ul.x+width()-1,
+                              ul.y-(height()-1),
+                              theOrientMode);
+         }
+      }  
+
+   ossimDrect operator -(const ossimDpt& shift)const
+      {
+         ossimIpt ul(ossim::round<int>(theUlCorner.x-shift.x),
+                     ossim::round<int>(theUlCorner.y-shift.y));
+                     
+         if(theOrientMode == OSSIM_LEFT_HANDED)
+         {
+            return ossimDrect(ul.x,
+                              ul.y,
+                              ul.x+width()-1,
+                              ul.y+height()-1,
+                              theOrientMode);
+         }
+         else
+         {
+            return ossimDrect(ul.x,
+                              ul.y,
+                              ul.x+width()-1,
+                              ul.y-(height()-1),
+                              theOrientMode);            
+         }
+      }  
+
+   const ossimDpt& ul() const { return theUlCorner; }
+   const ossimDpt& ur() const { return theUrCorner; }
+   const ossimDpt& lr() const { return theLrCorner; }
+   const ossimDpt& ll() const { return theLlCorner; }
+
+   const ossimDrect& changeOrientationMode(ossimCoordSysOrientMode mode)
+   {
+      // if we are already in the orientation then return
+      //
+      if(mode == theOrientMode) return *this;
+      if(mode == OSSIM_LEFT_HANDED)
+      {
+         // we must be right handed so change to left handed
+         *this = ossimDrect(theUlCorner.x,
+                            theLlCorner.y,
+                            theLrCorner.x,
+                            theUlCorner.y,
+                            OSSIM_LEFT_HANDED);
+      }
+      else
+      {
+         // we must be left handed so change to RIGHT handed
+         *this = ossimDrect(theUlCorner.x,
+                            theLlCorner.y,
+                            theLrCorner.x,
+                            theUlCorner.y,
+                            OSSIM_RIGHT_HANDED);
+      }
+      theOrientMode = mode;
+      
+      return *this;
+   }
+   
+   void getBounds(double& minx, double& miny,
+                  double& maxx, double& maxy)const
+      {
+         minx = theUlCorner.x;
+         maxx = theUrCorner.x;
+         if(theOrientMode == OSSIM_LEFT_HANDED)
+         {
+            miny = theUlCorner.y;
+            maxy = theLrCorner.y;
+         }
+         else
+         {
+            maxy = theUlCorner.y;
+            miny = theLrCorner.y;
+         }
+      }
+   void makeNan()
+      {
+         theUlCorner.makeNan();
+         theLlCorner.makeNan();
+         theLrCorner.makeNan();
+         theUrCorner.makeNan();
+      }
+   
+   bool hasNans()const{ return (theUlCorner.hasNans() ||
+                                theLlCorner.hasNans() ||
+                                theLrCorner.hasNans() ||
+                                theUrCorner.hasNans());}
+   
+   bool isNan()const{ return (theUlCorner.hasNans() &&
+                              theLlCorner.hasNans() &&
+                              theLrCorner.hasNans() &&
+                              theUrCorner.hasNans());}
+
+   double area()const
+      {
+         return width()*height();
+      }
+   //***
+   // This class supports both left and right-handed coordinate systems. For
+   // both, the positive x-axis extends to the "right".
+   //***
+   ossimCoordSysOrientMode orientMode() const { return theOrientMode; }
+   void setOrientMode(ossimCoordSysOrientMode mode) { theOrientMode = mode; }
+   
+   /*!
+    * Sets the upper left corner to "pt".  Adjusts the remaining corners
+    * accordingly.
+    */
+   inline void set_ul(const ossimDpt& pt);
+
+   /*!
+    * Sets the upper right corner to "pt".  Adjusts the remaining corners
+    * accordingly.
+    */
+   inline void set_ur(const ossimDpt& pt);
+
+   /*!
+    * Sets the lower right corner to "pt".  Adjusts the remaining corners
+    * accordingly.
+    */
+   inline void set_lr(const ossimDpt& pt);
+
+   /*!
+    * Sets the lower left corner to "pt".  Adjusts the remaining corners
+    * accordingly.
+    */
+   inline void set_ll(const ossimDpt& pt);
+
+   /*!
+    * Sets the upper left x.  Adjusts the remaining corners accordingly.
+    */
+   inline void set_ulx(ossim_float64 x);
+
+   /*!
+    * Sets the upper left y.  Adjusts the remaining corners accordingly.
+    */
+   inline void set_uly(ossim_float64 y);
+
+   /*!
+    * Sets the upper right x.  Adjusts the remaining corners accordingly.
+    */
+   inline void set_urx(ossim_float64 x);
+
+   /*!
+    * Sets the upper right y.  Adjusts the remaining corners accordingly.
+    */
+   inline void set_ury(ossim_float64 y);
+
+   /*!
+    * Sets the lower right x.  Adjusts the remaining corners accordingly.
+    */
+   inline void set_lrx(ossim_float64 x);
+
+   /*!
+    * Sets the lower right y.  Adjusts the remaining corners accordingly.
+    */
+   inline void set_lry(ossim_float64 y);
+
+   /*!
+    * Sets the lower left x.  Adjusts the remaining corners accordingly.
+    */
+   inline void set_llx(ossim_float64 x);
+
+   /*!
+    * Sets the lower left y.  Adjusts the remaining corners accordingly.
+    */
+   inline void set_lly(ossim_float64 y);
+
+   /*!
+    * METHOD: initBoundingRect(points)
+    * Initializes this rect to the bounding rect containing all points in the
+    * collection passed in.
+    */
+   void initBoundingRect(const std::vector<ossimDpt>& points);
+
+   /*!
+    * Returns true if "pt" falls within rectangle.  Fall on an edge is also
+    * considered to be within.  The edge is expanded by epsilon value so any value
+    * within epsilon is inside
+    */
+   bool pointWithin(const ossimDpt& pt, double epsilon=0.0) const;
+
+   /*!
+    * Returns true if "pt" falls within rectangle.  Fall on an edge is also
+    * considered to be within.
+    */
+   bool pointWithin(const ossimFpt& pt, double epsilon=0.0) const;
+
+   /*!
+    * Returns true if any portion of an input rectangle "rect" intersects
+    * "this" rectangle.  
+    */
+   bool intersects(const ossimDrect& rect) const;
+
+   /*!
+    * Returns true if "this" rectangle is contained completely within the
+    * input rectangle "rect".
+    */
+   bool completely_within(const ossimDrect& rect) const;
+
+   ossimCoordSysOrientMode orientationMode()const{return theOrientMode;}
+   /*!
+    * Returns the height of a rectangle.
+    */
+   ossim_float64 height() const { return fabs(theLlCorner.y - theUlCorner.y) + 1.0; }
+
+   /*!
+    * Returns the width of a rectangle.
+    */
+   ossim_float64 width()  const { return fabs(theLrCorner.x - theLlCorner.x) + 1.0; }
+
+   ossimDpt size() const { return ossimDpt(width(), height()); }
+
+   /*!
+    * Stretches this rectangle out to integer boundaries.
+    */
+   void stretchOut();
+
+   /*!
+    * Will stretch the rect to the passed in tiled boundary.
+    */
+   void stretchToTileBoundary(const ossimDpt& widthHeight);
+
+   const ossimDrect& expand(const ossimDpt& padding);
+
+   /**
+    * @return ossimString representing ossimIrect.
+    *
+    * Format:  ( 30, -90, 512, 512, [LH|RH] )
+    *            -x- -y-  -w-  -h-   -Right or left handed-
+    *
+    * where:
+    *     x and y are origins either upper left if LEFT HANDED (LH) or
+    *                                lower left if RIGHT HANDED (RH)
+    *     w and h are width and height respectively
+    *     The last value is LH or RH to indicate LeftHanded or RightHanded
+    *    
+    */
+   ossimString toString()const;
+   /**
+    * expected Format:  form 1: ( 30, -90, 512, 512, [LH|RH] )
+    *                            -x- -y-  -w-  -h-   -Right or left handed-
+    * 
+    *                   form 2: ( 30, -90, 512, 512)
+    *                            -x- -y-  -w-  -h-
+    *
+    * NOTE: Form 2 assumes Left handed were x,y is origin upper left and y positive down.
+    *
+    * This method starts by doing a "makeNan" on rect. 
+    *
+    * @param rectString String to initialize from.
+    * @return true or false to indicate successful parsing.
+    */
+   bool toRect(const ossimString& rectString);
+
+   bool saveState(ossimKeywordlist& kwl,
+                  const char* prefix=0)const;
+   bool loadState(const ossimKeywordlist& kwl,
+                  const char* prefix=0);
+
+   /*!
+    * Will subdivide this rect into four partitions.
+    */
+   void splitToQuad(ossimDrect& ulRect,
+                    ossimDrect& urRect,
+                    ossimDrect& lrRect,
+                    ossimDrect& llRect);
+   
+   /*!
+   * Finds the point on the rect boundary that is closest to the arg_point. Closest is defined as
+   * the minimum perpendicular distance.
+   */
+   ossimDpt findClosestEdgePointTo(const ossimDpt& arg_point) const;
+   
+   ossimDrect clipToRect(const ossimDrect& rect)const;
+
+   inline ossimDpt midPoint()const;
+
+   void print(std::ostream& os) const;
+
+   ossimDrect combine(const ossimDrect& rect)const;
+   
+   friend OSSIMDLLEXPORT std::ostream& operator<<(std::ostream& os,
+                                                  const ossimDrect& rect);
+
+   bool clip(ossimDpt &p1,
+             ossimDpt  &p2)const;
+
+   static long getCode(const ossimDpt& aPoint,
+                       const ossimDrect& clipRect);
+private:
+
+   enum ossimCohenSutherlandClipCodes
+   {
+      NONE   = 0,
+      LEFT   = 1,
+      RIGHT  = 2,
+      BOTTOM = 4,
+      TOP    = 8
+   };
+   
+   //***
+   // Private data members representing the rectangle corners.
+   //***
+   ossimDpt theUlCorner;
+   ossimDpt theUrCorner;
+   ossimDpt theLrCorner;
+   ossimDpt theLlCorner;
+
+   ossimCoordSysOrientMode  theOrientMode;
+};
+
+//*******************************************************************
+// Inline Method: ossimDrect::operator=(ossimDrect)
+//*******************************************************************
+inline const ossimDrect& ossimDrect::operator=(const ossimDrect& rect)
+{
+   if (this != &rect)
+   {
+      theUlCorner   = rect.theUlCorner;
+      theUrCorner   = rect.theUrCorner;
+      theLrCorner   = rect.theLrCorner;
+      theLlCorner   = rect.theLlCorner;
+      theOrientMode = rect.theOrientMode;
+   }
+
+   return *this;
+}
+
+//*******************************************************************
+// Inline Method: ossimDrect::operator!=
+//*******************************************************************
+inline bool ossimDrect::operator!=(const ossimDrect& rect) const
+{
+   return ( (theUlCorner   != rect.theUlCorner) ||
+            (theUrCorner   != rect.theUrCorner) ||
+            (theLrCorner   != rect.theLrCorner) ||
+            (theLlCorner   != rect.theLlCorner) ||
+            (theOrientMode != rect.theOrientMode));
+}
+
+//*******************************************************************
+// Inline Method: ossimDrect::operator==
+//*******************************************************************
+inline bool ossimDrect::operator==(const ossimDrect& rect) const
+{
+   return ( (theUlCorner   == rect.theUlCorner) &&
+            (theUrCorner   == rect.theUrCorner) &&
+            (theLrCorner   == rect.theLrCorner) &&
+            (theLlCorner   == rect.theLlCorner) &&
+            (theOrientMode == rect.theOrientMode));
+}
+
+//*******************************************************************
+// Inline Method: ossimDrect::set_ul
+//*******************************************************************
+inline void ossimDrect::set_ul(const ossimDpt& pt)
+{
+   theUlCorner   = pt;
+   theUrCorner.y = pt.y;
+   theLlCorner.x = pt.x;
+}
+
+//*******************************************************************
+// Inline Method: ossimDrect::set_ur
+//*******************************************************************
+inline void ossimDrect::set_ur(const ossimDpt& pt)
+{
+   theUrCorner   = pt;
+   theUlCorner.y = pt.y;
+   theLrCorner.x = pt.x;
+}
+
+//*******************************************************************
+// Inline Method: ossimDrect::set_lr
+//*******************************************************************
+inline void ossimDrect::set_lr(const ossimDpt& pt)
+{
+   theLrCorner   = pt;
+   theUrCorner.x = pt.x;
+   theLlCorner.y = pt.y;
+}
+
+//*******************************************************************
+// Inline Method: ossimDrect::set_ll
+//*******************************************************************
+inline void ossimDrect::set_ll(const ossimDpt& pt)
+{
+   theLlCorner   = pt;
+   theUlCorner.x = pt.x;
+   theLrCorner.y = pt.y;
+}
+
+//*******************************************************************
+// Inline Method: ossimDrect::set_ulx
+//*******************************************************************
+inline void ossimDrect::set_ulx(ossim_float64 x)
+{
+   theUlCorner.x = x;
+   theLlCorner.x = x;
+}
+
+//*******************************************************************
+// Inline Method: ossimDrect::set_uly
+//*******************************************************************
+inline void ossimDrect::set_uly(ossim_float64 y)
+{
+   theUlCorner.y = y;
+   theUrCorner.y = y;
+}
+
+//*******************************************************************
+// Inline Method: ossimDrect::set_urx
+//*******************************************************************
+inline void ossimDrect::set_urx(ossim_float64 x)
+{
+   theUrCorner.x = x;
+   theLrCorner.x = x;
+}
+
+//*******************************************************************
+// Inline Method: ossimDrect::set_ury
+//*******************************************************************
+inline void ossimDrect::set_ury(ossim_float64 y)
+{
+   theUrCorner.y = y;
+   theUlCorner.y = y;
+}
+
+//*******************************************************************
+// Inline Method: ossimDrect::set_lrx
+//*******************************************************************
+inline void ossimDrect::set_lrx(ossim_float64 x)
+{
+   theLrCorner.x = x;
+   theUrCorner.x = x;
+}
+
+//*******************************************************************
+// Inline Method: ossimDrect::set_lry
+//*******************************************************************
+inline void ossimDrect::set_lry(ossim_float64 y)
+{
+   theLrCorner.y = y;
+   theLlCorner.y = y;
+}
+
+//*******************************************************************
+// Inline Method: ossimDrect::set_llx
+//*******************************************************************
+inline void ossimDrect::set_llx(ossim_float64 x)
+{
+   theLlCorner.x = x;
+   theUlCorner.x = x;
+}
+
+//*******************************************************************
+// Inline Method: ossimDrect::set_lly
+//*******************************************************************
+inline void ossimDrect::set_lly(ossim_float64 y)
+{
+   theLlCorner.y = y;
+   theLrCorner.y = y;
+}
+
+//*******************************************************************
+// Inline Method: ossimDrect::pointWithin(const ossimDpt& pt) 
+//*******************************************************************
+inline bool ossimDrect::pointWithin(const ossimDpt& pt, double epsilon) const
+{
+   if (theOrientMode == OSSIM_LEFT_HANDED)
+   {
+      return ((pt.x >= (ul().x-epsilon)) &&
+              (pt.x <= (ur().x+epsilon)) &&
+              (pt.y >= (ul().y-epsilon)) &&
+              (pt.y <= (ll().y+epsilon)));
+   }
+   return ((pt.x >= (ul().x-epsilon)) &&
+           (pt.x <= (ur().x+epsilon)) &&
+           (pt.y <= (ul().y+epsilon)) &&
+           (pt.y >= (ll().y-epsilon)));
+}
+
+//*******************************************************************
+// Inline Method: ossimDrect::pointWithin(const ossimFpt& pt)
+//*******************************************************************
+inline bool ossimDrect::pointWithin(const ossimFpt& pt, double epsilon) const
+{
+   if (theOrientMode == OSSIM_LEFT_HANDED)
+   {
+      return ((pt.x >= (ul().x-epsilon)) &&
+              (pt.x <= (ur().x+epsilon)) &&
+              (pt.y >= (ul().y-epsilon)) &&
+              (pt.y <= (ll().y+epsilon)));
+   }
+   return ((pt.x >= (ul().x-epsilon)) &&
+           (pt.x <= (ur().x+epsilon)) &&
+           (pt.y <= (ul().y+epsilon)) &&
+           (pt.y >= (ll().y-epsilon)));
+}
+
+//*******************************************************************
+// Inline Method: ossimDrect::midPoint()
+//*******************************************************************
+inline ossimDpt ossimDrect::midPoint()const
+{
+   return ossimDpt( (ul().x + ur().x + ll().x + lr().x)*.25,
+                    (ul().y + ur().y + ll().y + lr().y)*.25);
+}
+
+//*******************************************************************
+// Inline Method: ossimDrect::combine(const ossimDrect& rect)
+//*******************************************************************
+inline ossimDrect ossimDrect::combine(const ossimDrect& rect)const
+{
+   if(rect.hasNans() || hasNans())
+   {
+      ossimDrect result;
+
+      result.makeNan();
+
+      return result;
+   }
+   if (theOrientMode != rect.theOrientMode)
+      return(*this);
+   
+   ossimDpt ulCombine;
+   ossimDpt lrCombine;
+
+   if(theOrientMode == OSSIM_LEFT_HANDED)
+   {
+      ulCombine.x = ((ul().x <= rect.ul().x)?ul().x:rect.ul().x);
+      ulCombine.y = ((ul().y <= rect.ul().y)?ul().y:rect.ul().y);
+      lrCombine.x = ((lr().x >= rect.lr().x)?lr().x:rect.lr().x);
+      lrCombine.y = ((lr().y >= rect.lr().y)?lr().y:rect.lr().y);
+   }
+   else
+   {
+      ulCombine.x = ((ul().x <= rect.ul().x)?ul().x:rect.ul().x);
+      ulCombine.y = ((ul().y >= rect.ul().y)?ul().y:rect.ul().y);
+      lrCombine.x = ((lr().x >= rect.lr().x)?lr().x:rect.lr().x);
+      lrCombine.y = ((lr().y <= rect.lr().y)?lr().y:rect.lr().y);
+   }
+
+   return ossimDrect(ulCombine, lrCombine, theOrientMode);
+}
+#endif
+
diff --git a/ossim/include/ossim/base/ossimDuration.h b/ossim/include/ossim/base/ossimDuration.h
new file mode 100644
index 0000000..05cb680
--- /dev/null
+++ b/ossim/include/ossim/base/ossimDuration.h
@@ -0,0 +1,167 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id$
+#ifndef ossimDuration_HEADER
+#define ossimDuration_HEADER
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimReferenced.h>
+#include <iostream>
+
+class OSSIM_DLL ossimDuration
+{
+public:
+   /**
+    * This will take an iso8601 encoded duration string and parse out
+    * the individual values
+    */
+   ossimDuration(const ossimString& iso8601Duration = ossimString(""));
+   
+   
+   /**
+    * zero out all fields
+    */
+   void clearFields();
+   
+   /**
+    * This will take an iso8601 encoded duration stream and parse out
+    * the individual values it will stop when a blank character or whitespace is found
+    */
+   bool readIso8601Encoding(std::istream& in);
+   
+   /**
+    * This will take an iso8601 encoded duration stream and parse out
+    * the individual values it will stop when a blank character or whitespace is found
+    */
+   bool setByIso8601DurationString(const ossimString& iso8601Duration);
+   
+   /**
+    * Will take the field values and encode into a iso8601 string format.
+    * Note, anything that is 0 will not be output.
+    *
+    */
+   void toIso8601DurationString(ossimString& result);
+   
+   /**
+    * this will not use the months field or the years field but will use all other
+    * fields to calculate a total value in seconds.  We can not determine leap years
+    * and how many days are in a month so those are omitted and so this serves as
+    * a utility method to just calculate the total seconds if you give a duration string
+    * that contains only one or all or any of the following: weeks, days, minutes, hours,
+    * and/or seconds.
+    *
+    * If the sign is set to negative it will return a negative value.
+    */
+   ossim_float64 toSeconds()const;
+   
+   void setSign(ossim_int32 value)
+   {
+      theSign = ((value < 0)?-1:1);
+   }
+   /**
+    * returns the sign.  Should be either -1 or 1 for the return
+    */
+   ossim_int32 sign()const
+   {
+      return theSign;
+   }
+   void setYears(ossim_uint64 value)
+   {
+      theYears = value;
+   }
+   ossim_int64 years()const
+   {
+      return theYears;
+   }
+   void setMonths(ossim_uint64 value)
+   {
+      theMonths = value;
+   }
+   ossim_int64 months()const
+   {
+      return theMonths;
+   }
+   void setWeeks(ossim_uint64 value)
+   {
+      theWeeks = value;
+   }
+   ossim_int64 weeks()const
+   {
+      return theWeeks;
+   }
+   void setDays(ossim_uint64 value)
+   {
+      theDays = value;
+   }
+   ossim_int64 days()const
+   {
+      return theDays;
+   }
+   void setHours(ossim_uint64 value)
+   {
+      theHours = value;
+   }
+   ossim_int64 hours()const
+   {
+      return theHours;
+   }
+   void setMinutes(ossim_uint64 value)
+   {
+      theMinutes = value;
+   }
+   ossim_int64 minutes()const
+   {
+      return theMinutes;
+   }
+   void setSeconds(ossim_float64 value)
+   {
+      theSeconds = value;
+   }
+   ossim_float64 seconds()const
+   {
+      return theSeconds;
+   }
+   
+   /**
+    * Sets all values in one call
+    */
+   void setAll(ossim_int32 signValue,
+               ossim_uint64 yearsValue,
+               ossim_uint64 monthsValue,
+               ossim_uint64 weeksValue,
+               ossim_uint64 daysValue,
+               ossim_uint64 hoursValue,
+               ossim_uint64 minutesValue,
+               ossim_float64 secondsValue)
+   {
+      theSign    = ((signValue < 0)?-1:1);
+      theYears   = yearsValue;
+      theMonths  = monthsValue;
+      theWeeks   = weeksValue;
+      theDays    = daysValue;
+      theHours   = hoursValue;
+      theMinutes = minutesValue;
+      theSeconds = secondsValue;
+   }
+               
+   
+protected:
+   ossim_int32 theSign; // indicates -1 for negative and anything else is positive
+   ossim_int64 theYears; // number of years
+   ossim_int64 theMonths; // number of months
+   ossim_int64 theWeeks; // number of months
+   ossim_int64 theDays;   // number of days
+   ossim_int64 theHours;  // number of hours
+   ossim_int64 theMinutes; // number of minutes
+   ossim_float64 theSeconds; // umber of Seconds
+};
+
+#endif
+
diff --git a/include/ossim/base/ossimEbcdicToAscii.h b/ossim/include/ossim/base/ossimEbcdicToAscii.h
similarity index 100%
rename from include/ossim/base/ossimEbcdicToAscii.h
rename to ossim/include/ossim/base/ossimEbcdicToAscii.h
diff --git a/include/ossim/base/ossimEcefPoint.h b/ossim/include/ossim/base/ossimEcefPoint.h
similarity index 100%
rename from include/ossim/base/ossimEcefPoint.h
rename to ossim/include/ossim/base/ossimEcefPoint.h
diff --git a/include/ossim/base/ossimEcefRay.h b/ossim/include/ossim/base/ossimEcefRay.h
similarity index 100%
rename from include/ossim/base/ossimEcefRay.h
rename to ossim/include/ossim/base/ossimEcefRay.h
diff --git a/include/ossim/base/ossimEcefVector.h b/ossim/include/ossim/base/ossimEcefVector.h
similarity index 100%
rename from include/ossim/base/ossimEcefVector.h
rename to ossim/include/ossim/base/ossimEcefVector.h
diff --git a/include/ossim/base/ossimElevationManagerEvent.h b/ossim/include/ossim/base/ossimElevationManagerEvent.h
similarity index 100%
rename from include/ossim/base/ossimElevationManagerEvent.h
rename to ossim/include/ossim/base/ossimElevationManagerEvent.h
diff --git a/ossim/include/ossim/base/ossimElevationManagerEventListener.h b/ossim/include/ossim/base/ossimElevationManagerEventListener.h
new file mode 100644
index 0000000..afd9087
--- /dev/null
+++ b/ossim/include/ossim/base/ossimElevationManagerEventListener.h
@@ -0,0 +1,18 @@
+#ifndef ossimElevationManagerEventListener_HEADER
+#define ossimElevationManagerEventListener_HEADER
+
+#include <ossim/base/ossimListener.h>
+#include <ossim/base/ossimElevationManagerEvent.h>
+
+class OSSIMDLLEXPORT ossimElevationManagerEventListener : public ossimListener
+{
+ public:
+   ossimElevationManagerEventListener();
+   virtual ~ossimElevationManagerEventListener();
+   virtual void processEvent( ossimEvent& event );
+   virtual void processEvent( ossimElevationManagerEvent& event );
+
+TYPE_DATA
+};
+
+#endif
diff --git a/include/ossim/base/ossimEllipsoid.h b/ossim/include/ossim/base/ossimEllipsoid.h
similarity index 100%
rename from include/ossim/base/ossimEllipsoid.h
rename to ossim/include/ossim/base/ossimEllipsoid.h
diff --git a/ossim/include/ossim/base/ossimEllipsoidFactory.h b/ossim/include/ossim/base/ossimEllipsoidFactory.h
new file mode 100644
index 0000000..b6fd444
--- /dev/null
+++ b/ossim/include/ossim/base/ossimEllipsoidFactory.h
@@ -0,0 +1,53 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+// Description:
+//
+// Thie file contains the ossimEllipsoidFactory.
+//*******************************************************************
+//  $Id: ossimEllipsoidFactory.h 22857 2014-08-05 15:02:58Z gpotts $
+
+#ifndef ossimEllipsoidFactory_HEADER
+#define ossimEllipsoidFactory_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <map>
+#include <string>
+
+class ossimEllipsoid;
+class ossimString;
+class ossimWgs84Ellipsoid;
+class ossimWgs72Ellipsoid;
+
+class OSSIMDLLEXPORT ossimEllipsoidFactory
+{
+public:
+   virtual ~ossimEllipsoidFactory();
+   const ossimEllipsoid* create(const ossimString &code)const;
+   const ossimEllipsoid* wgs84()const{return theWgs84Ellipsoid;}
+   const ossimEllipsoid* wgs72()const{return theWgs72Ellipsoid;}
+
+   //! Given an alpha code (for example "WE" for WGS84), returns the corresponding EPSG code or 0
+   //! if not found.
+   ossim_uint32 findEpsgCode(const ossimString &alpha_code) const;
+
+   static ossimEllipsoidFactory* instance();
+   
+private:
+   typedef std::map<std::string, ossimEllipsoid*> TableType;
+   typedef std::map<ossim_uint32, std::string> EpsgTableType;
+
+   //static ossimEllipsoidFactory*     theInstance;
+   ossimEllipsoid*       theWgs84Ellipsoid;
+   ossimEllipsoid*       theWgs72Ellipsoid;
+   TableType             theEllipsoidTable;
+   EpsgTableType         theEpsgTable;
+   ossimEllipsoidFactory();
+   void initializeTable();
+   void deleteAll();
+};
+
+#endif
diff --git a/ossim/include/ossim/base/ossimEndian.h b/ossim/include/ossim/base/ossimEndian.h
new file mode 100644
index 0000000..ff87024
--- /dev/null
+++ b/ossim/include/ossim/base/ossimEndian.h
@@ -0,0 +1,273 @@
+//******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+// 
+// Description: This file contains the interface to the
+//              endian byte swap
+//
+//***********************************
+// $ID$
+#ifndef ossimEndian_HEADER
+#define ossimEndian_HEADER
+
+// for OSSIM_LITTLE_ENDIAN AND BIG_ENDIAN
+#include <ossim/base/ossimConstants.h>
+
+class OSSIMDLLEXPORT ossimEndian
+{
+public:
+   ossimEndian();
+
+   /*!
+    *  Swap bytes methods that work on a single pixel.
+    */
+   inline void swap(ossim_sint8    &/*data*/){}
+   inline void swap(ossim_uint8    &/*data*/){}
+   inline void swap(ossim_int16   &data) const;
+   inline void swap(ossim_uint16  &data) const;
+   inline void swap(ossim_int32   &data) const;
+   inline void swap(ossim_uint32  &data) const;
+   inline void swap(ossim_uint64  &data) const;
+   inline void swap(ossim_sint64  &data) const;
+   inline void swap(ossim_float32 &data) const;
+   inline void swap(ossim_float64 &data) const;
+
+   /*!
+    *  Swap bytes methods that work on arrays of pixels.
+    *
+    *  @note size is number of pixels, not number of bytes.
+    */
+   inline void swap(ossimScalarType scalar, void* data, ossim_uint32 size) const;
+   // only here to allow template based swaps to compile correctly
+   //
+   inline void swap(ossim_sint8* data, ossim_uint32 size)const;
+   inline void swap(ossim_uint8* data, ossim_uint32 size)const;
+   
+   inline void swap(ossim_int16* data, ossim_uint32 size) const;
+   inline void swap(ossim_uint16* data, ossim_uint32 size) const;
+
+   inline void swap(ossim_int32* data, ossim_uint32 size) const;
+   inline void swap(ossim_uint32* data, ossim_uint32 size) const;
+
+   inline void swap(ossim_int64* data, ossim_uint32 size) const;
+   inline void swap(ossim_uint64* data, ossim_uint32 size) const;
+
+   inline void swap(ossim_float32* data, ossim_uint32 size) const;
+   inline void swap(ossim_float64* data, ossim_uint32 size) const;
+
+   inline void swapTwoBytes(void* data, ossim_uint32 size) const;
+   inline void swapFourBytes(void* data, ossim_uint32 size) const;
+   inline void swapEightBytes(void* data, ossim_uint32 size) const;
+   inline ossimByteOrder getSystemEndianType() const;
+
+private:
+
+   // Holds the Endian of the architecture that you are running on.
+   ossimByteOrder  theSystemEndianType;  
+   
+   void swapTwoBytes(void *data) const;
+   void swapFourBytes(void *data) const;
+   void swapEightBytes(void *data) const;
+
+   void swapPrivate(ossim_uint8 *c1,
+                    ossim_uint8 *c2) const;
+};
+
+inline ossimByteOrder ossimEndian::getSystemEndianType() const
+{
+   return theSystemEndianType;
+}
+
+inline void ossimEndian::swap(ossim_sint8* /* data */,
+                              ossim_uint32 /* size */ )const
+{
+   //intentionally left blank
+}
+
+inline void ossimEndian::swap(ossim_uint8* /* data */,
+                              ossim_uint32 /* size */ )const
+{
+   //intentionally left blank
+}
+
+inline void ossimEndian::swap(ossim_int16 &data) const
+{
+   swapTwoBytes(reinterpret_cast<void*>(&data));   
+} 
+
+inline void ossimEndian::swap(ossim_uint16 &data) const
+{
+   swapTwoBytes(reinterpret_cast<void*>(&data));
+}
+
+inline void ossimEndian::swap(ossim_int32 &data) const
+{
+   swapFourBytes(reinterpret_cast<void*>(&data));
+}
+
+inline void ossimEndian::swap(ossim_uint32 &data) const
+{
+   swapFourBytes(reinterpret_cast<void*>(&data));
+}
+
+inline void ossimEndian::swap(ossim_uint64 &data) const
+{
+   swapEightBytes(reinterpret_cast<void*>(&data));
+}
+
+inline void ossimEndian::swap(ossim_sint64 &data) const
+{
+   swapEightBytes(reinterpret_cast<void*>(&data));
+}
+
+inline void ossimEndian::swap(ossim_float32 &data) const
+{
+   swapFourBytes(reinterpret_cast<void*>(&data));
+}
+
+inline void ossimEndian::swap(ossim_float64 &data) const
+{
+   swapEightBytes(reinterpret_cast<void*>(&data));
+}
+
+inline void ossimEndian::swapTwoBytes(void *data) const
+{
+   unsigned char *c = reinterpret_cast<unsigned char*>(data);
+
+   swapPrivate(&c[0], &c[1]);
+}
+
+inline void ossimEndian::swapFourBytes(void* data) const
+{
+   unsigned char *c = reinterpret_cast<unsigned char*>(data);
+
+   swapPrivate(&c[0], &c[3]);
+   swapPrivate(&c[1], &c[2]);
+}
+
+inline void ossimEndian::swapEightBytes(void* data) const
+{
+   unsigned char *c = reinterpret_cast<unsigned char*>(data);
+
+   swapPrivate(&c[0], &c[7]);
+   swapPrivate(&c[1], &c[6]);
+   swapPrivate(&c[2], &c[5]);
+   swapPrivate(&c[3], &c[4]);
+}
+
+inline void ossimEndian::swapPrivate(ossim_uint8 *c1,                       
+                                     ossim_uint8 *c2) const
+{
+   ossim_uint8 temp_c = *c1;
+   *c1 = *c2;
+   *c2 = temp_c;
+}
+
+inline void ossimEndian::swap(ossimScalarType scalar,
+                              void* data, ossim_uint32 size) const
+{
+   switch (scalar)
+   {
+      case OSSIM_USHORT16:
+      case OSSIM_SSHORT16:
+      case  OSSIM_USHORT11:
+         swapTwoBytes(data, size);
+         return;
+         
+      case OSSIM_FLOAT:
+      case OSSIM_NORMALIZED_FLOAT:
+         swapFourBytes(data, size);
+         return;
+         
+      case OSSIM_DOUBLE:
+      case OSSIM_NORMALIZED_DOUBLE:
+         swapEightBytes(data, size);
+         break;
+         
+      default:
+         return;
+   }
+}
+
+inline void ossimEndian::swap(ossim_int16* data, ossim_uint32 size) const
+{
+   swapTwoBytes(data, size);
+}
+
+inline void ossimEndian::swap(ossim_uint16* data, ossim_uint32 size) const
+{
+   swapTwoBytes(data, size);
+}
+
+inline void ossimEndian::swap(ossim_int32* data, ossim_uint32 size) const
+{
+   swapFourBytes(data, size);
+}
+
+inline void ossimEndian::swap(ossim_uint32* data, ossim_uint32 size) const
+{
+   swapFourBytes(data, size);
+}
+
+inline void ossimEndian::swap(ossim_int64* data, ossim_uint32 size) const
+{
+   swapEightBytes(data, size);
+}
+
+inline void ossimEndian::swap(ossim_uint64* data, ossim_uint32 size) const
+{
+   swapEightBytes(data, size);
+}
+
+inline void ossimEndian::swap(ossim_float32* data, ossim_uint32 size) const
+{
+   swapFourBytes(data, size);
+}
+
+inline void ossimEndian::swap(ossim_float64* data, ossim_uint32 size) const
+{
+   swapEightBytes(data, size);
+}
+
+inline void ossimEndian::swapTwoBytes(void* data, ossim_uint32 size) const
+{
+   ossim_uint16* buf = reinterpret_cast<ossim_uint16*>(data);
+   for (ossim_uint32 i=0; i<size; ++i)
+   {
+      buf[i] = ((buf[i] & 0x00ff) << 8) | ((buf[i] & 0xff00) >> 8);
+   }
+}
+
+inline void ossimEndian::swapFourBytes(void* data, ossim_uint32 size) const
+{
+   ossim_uint32* buf = reinterpret_cast<ossim_uint32*>(data);
+   for (ossim_uint32 i=0; i<size; ++i)
+   {
+      buf[i]
+         = (  ((buf[i] & 0xff000000) >> 24)
+            | ((buf[i] & 0x00ff0000) >> 8)
+            | ((buf[i] & 0x0000ff00) << 8)
+            | ((buf[i] & 0x000000ff) << 24));
+   }
+}
+
+inline void ossimEndian::swapEightBytes(void* data, ossim_uint32 size) const
+{
+   ossim_uint64* buf = reinterpret_cast<ossim_uint64*>(data);
+   for (ossim_uint32 i=0; i<size; ++i)
+   {
+      buf[i]
+         = (  ((buf[i] & 0xff00000000000000ull) >> 56)
+            | ((buf[i] & 0x00ff000000000000ull) >> 40)
+            | ((buf[i] & 0x0000ff0000000000ull) >> 24)
+            | ((buf[i] & 0x000000ff00000000ull) >> 8)
+            | ((buf[i] & 0x00000000ff000000ull) << 8)
+            | ((buf[i] & 0x0000000000ff0000ull) << 24)
+            | ((buf[i] & 0x000000000000ff00ull) << 40)
+            | ((buf[i] & 0x00000000000000ffull) << 56));
+   }
+}
+
+#endif /* End of #ifndef ossimEndian_HEADER */
diff --git a/include/ossim/base/ossimEnvironmentUtility.h b/ossim/include/ossim/base/ossimEnvironmentUtility.h
similarity index 100%
rename from include/ossim/base/ossimEnvironmentUtility.h
rename to ossim/include/ossim/base/ossimEnvironmentUtility.h
diff --git a/ossim/include/ossim/base/ossimEpsgDatumFactory.h b/ossim/include/ossim/base/ossimEpsgDatumFactory.h
new file mode 100644
index 0000000..e7c181d
--- /dev/null
+++ b/ossim/include/ossim/base/ossimEpsgDatumFactory.h
@@ -0,0 +1,70 @@
+//*************************************************************************************************
+//                          OSSIM -- Open Source Software Image Map
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Oscar Kramer
+//
+//*************************************************************************************************
+//  $Id$
+
+#ifndef ossimEpsgDatumFactory_HEADER
+#define ossimEpsgDatumFactory_HEADER 1
+
+#include <ossim/base/ossimDatumFactoryInterface.h>
+#include <map>
+#include <string>
+
+class ossimDatum;
+class ossimString;
+
+//*************************************************************************************************
+//! Class for creating datum instances from EPSG codes. 
+//! Presently only a small subset of EPSG datums are supported. These are hardcoded here or,
+//! alternatively, the EPSG code is mapped to the OSSIM/Geotrans code and ossimDatumFactory is
+//! used to produce the final datum. 
+//! 
+//! TO DO:
+//! Eventually we should have a disk-file based database lookup of datums with associated parameters
+//! similar to the EPSG projection factory and database.
+//*************************************************************************************************
+class OSSIM_DLL ossimEpsgDatumFactory : public ossimDatumFactoryInterface
+{
+public:
+   //! Singleton implementation.
+   static ossimEpsgDatumFactory* instance();
+
+   //! Destructor
+   virtual ~ossimEpsgDatumFactory();
+
+   //! Creates a datum instance given an EPSG spec in the form "EPSG:<datum_code>".
+   virtual const ossimDatum* create(const ossimString &epsg_spec)const;
+
+   //! Creates a datum instance given a KWL and prefix
+   virtual const ossimDatum* create(const ossimKeywordlist& kwl, const char *prefix=0)const;
+
+   //! Returns list of all datums supported, in the form of "EPSG:<code>, <datum_name>".
+   virtual void getList(std::vector<ossimString>& list)const;
+   
+   //! Specific to this factory only. Creates a datum instance given an EPSG integer code.
+   const ossimDatum* create(ossim_uint32 epsg_code)const;
+
+   //! Specific to this factory only. Given an alpha-code, returns equivalent EPSG datum code or
+   //! 0 if not found.
+   ossim_uint32 findEpsgCode(const ossimString& alpha_code) const;
+
+   //! Specific to this factory only. Given an EPSG, returns equivalent alpha-code datum code or
+   //! empty string if not found.
+   ossimString findAlphaCode(ossim_uint32 epsg_code) const;
+
+protected:
+   //! Hidden constructors for singleton implementation.
+   ossimEpsgDatumFactory();
+
+   //! Presently implemented as a mapping from EPSG code to OSSIM/Geotrans alpha-codes found in 
+   //! ossimDatumFactory. Eventually should be independent (and deprecate) ossimDatumFactory.
+   std::map<ossim_uint32, std::string> m_epsgToAlphaMap;
+   
+  // static ossimEpsgDatumFactory* m_instance;
+};
+#endif
diff --git a/include/ossim/base/ossimEquTokenDefines.h b/ossim/include/ossim/base/ossimEquTokenDefines.h
similarity index 100%
rename from include/ossim/base/ossimEquTokenDefines.h
rename to ossim/include/ossim/base/ossimEquTokenDefines.h
diff --git a/include/ossim/base/ossimEquTokenizer.h b/ossim/include/ossim/base/ossimEquTokenizer.h
similarity index 100%
rename from include/ossim/base/ossimEquTokenizer.h
rename to ossim/include/ossim/base/ossimEquTokenizer.h
diff --git a/include/ossim/base/ossimErrorCodes.h b/ossim/include/ossim/base/ossimErrorCodes.h
similarity index 100%
rename from include/ossim/base/ossimErrorCodes.h
rename to ossim/include/ossim/base/ossimErrorCodes.h
diff --git a/include/ossim/base/ossimErrorContext.h b/ossim/include/ossim/base/ossimErrorContext.h
similarity index 100%
rename from include/ossim/base/ossimErrorContext.h
rename to ossim/include/ossim/base/ossimErrorContext.h
diff --git a/include/ossim/base/ossimErrorStatusInterface.h b/ossim/include/ossim/base/ossimErrorStatusInterface.h
similarity index 100%
rename from include/ossim/base/ossimErrorStatusInterface.h
rename to ossim/include/ossim/base/ossimErrorStatusInterface.h
diff --git a/include/ossim/base/ossimEvent.h b/ossim/include/ossim/base/ossimEvent.h
similarity index 100%
rename from include/ossim/base/ossimEvent.h
rename to ossim/include/ossim/base/ossimEvent.h
diff --git a/include/ossim/base/ossimEventIds.h b/ossim/include/ossim/base/ossimEventIds.h
similarity index 100%
rename from include/ossim/base/ossimEventIds.h
rename to ossim/include/ossim/base/ossimEventIds.h
diff --git a/include/ossim/base/ossimException.h b/ossim/include/ossim/base/ossimException.h
similarity index 100%
rename from include/ossim/base/ossimException.h
rename to ossim/include/ossim/base/ossimException.h
diff --git a/include/ossim/base/ossimFactoryBaseTemplate.h b/ossim/include/ossim/base/ossimFactoryBaseTemplate.h
similarity index 100%
rename from include/ossim/base/ossimFactoryBaseTemplate.h
rename to ossim/include/ossim/base/ossimFactoryBaseTemplate.h
diff --git a/ossim/include/ossim/base/ossimFactoryListInterface.h b/ossim/include/ossim/base/ossimFactoryListInterface.h
new file mode 100644
index 0000000..368638a
--- /dev/null
+++ b/ossim/include/ossim/base/ossimFactoryListInterface.h
@@ -0,0 +1,266 @@
+//**************************************************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: Class declaration of ossimFactoryListInterface.
+//
+//**************************************************************************************************
+// $Id$
+#ifndef ossimFactoryListInterface_HEADER
+#define ossimFactoryListInterface_HEADER
+#include <OpenThreads/Mutex>
+#include <OpenThreads/ScopedLock>
+#include <vector>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimKeywordlist.h>
+
+/**
+ * The is a factory list interface that allows registries to be accessed in a common way.  
+ */
+template <class T, class NativeType>
+class ossimFactoryListInterface
+   {
+   public:
+      typedef std::vector<T*> FactoryListType;
+      typedef T FactoryType;
+      typedef NativeType NativeReturnType;
+      
+      ossimFactoryListInterface(){}
+      
+      /**
+       * This is for backward compatability and calls registerFactory for simple adds.
+       */
+      void addFactory(T* factory)
+      {
+         registerFactory(factory);
+      }
+      
+      /**
+       * Public access method to determine if a factory is already registered to this
+       * list
+       */
+      bool isFactoryRegistered(T* factory)const
+      {
+         if(!factory) return false;
+         OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_factoryListMutex);
+         
+         return findFactory(factory);
+      }
+      
+      /**
+       * Will register a factory to the factory list.  Will append the passed in factory if not
+       * already registered to the list.
+       */
+      void registerFactory(T* factory, bool pushToFrontFlag=false)
+      {
+         if(!factory) return;
+         OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_factoryListMutex);
+         if(!findFactory(factory))
+         {
+            if (pushToFrontFlag)
+            {
+               m_factoryList.insert(m_factoryList.begin(), factory);
+            }
+            else
+            {
+               m_factoryList.push_back(factory);
+            }
+         }
+      }
+      /**
+       * Will remove the factory from the registry.
+       */
+      void unregisterFactory(T* factory)
+      {
+         OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_factoryListMutex);
+         ossim_uint32 idx = 0;
+         for(idx = 0; idx < m_factoryList.size(); ++idx)
+         {
+            if(factory == m_factoryList[idx])
+            {
+               m_factoryList.erase(m_factoryList.begin() + idx);
+               return;
+            }
+         }
+      }
+      
+      /**
+       * Will remove all factories from the registry.
+       */
+      void unregisterAllFactories()
+      {
+         OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_factoryListMutex);
+         m_factoryList.clear();
+      }
+      
+      /**
+       * Inserts the factory to the front of the list.
+       */
+      void registerFactoryToFront(T* factory)
+      {
+         OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_factoryListMutex);
+         if(!findFactory(factory))
+         {
+            m_factoryList.insert(m_factoryList.begin(), factory);
+         }
+      }
+      
+      /**
+       * Will insert the factory before the beforeThisFactory.  If not found
+       * it will do a simple append.
+       */
+      void registerFactoryBefore(T* factory, T* beforeThisFactory)
+      {
+         OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_factoryListMutex);
+         if(!findFactory(factory))
+         {
+            ossim_uint32 idx = 0;
+            for(idx = 0; idx < m_factoryList.size(); ++idx)
+            {
+               if(beforeThisFactory == m_factoryList[idx])
+               {
+                  m_factoryList.insert(m_factoryList.begin() + idx, factory);
+                  return;
+               }
+            }
+            m_factoryList.push_back(factory);
+         }
+      }
+      
+      /**
+       *
+       * Will add all object types the factories can allocate.  Typically a list of classnames are returned
+       *
+       */
+      void getAllTypeNamesFromRegistry(std::vector<ossimString>& typeList)const;
+      
+      /**
+       * This is the base object return for all objects in the system.  This is used for 
+       * backward compatability.
+       */
+      ossimObject* createObjectFromRegistry(const ossimString& typeName)const;
+      
+      /**
+       * This is the base object return for all objects in the system.  This is used for 
+       * backward compatability.
+       */
+      ossimObject* createObjectFromRegistry(const ossimKeywordlist& kwl,
+                                            const char* prefix=0)const;
+
+      /**
+       * This is a helper method that calls the createObject and makes sure that the
+       * returned object is of the NativeType base type this registry supports.
+       */
+      NativeType* createNativeObjectFromRegistry(const ossimString& typeName)const;
+      
+      /**
+       * This is a helper method that calls the createObject and makes sure that the
+       * returned object is of the NativeType base type this registry supports.
+       *
+       * @param kwl is a state keywordlist allowing one to instantiate an object 
+       *        defined by a set of name value pairs.  It will use the type 
+       *        keyword to create an object of the defined type and then load the 
+       *        state.
+       */
+      NativeType* createNativeObjectFromRegistry(const ossimKeywordlist& kwl,
+                                                 const char* prefix=0)const;
+   protected:
+      /**
+       * Utility to find a factory in the list
+       */
+      bool findFactory(T* factory)const
+      {
+         if(!factory) return false;
+         ossim_uint32 idx = 0;
+         for(;idx < m_factoryList.size();++idx)
+         {
+            if(m_factoryList[idx] == factory)
+            {
+               return true;
+            }
+         }
+         
+         return false;
+      }
+      mutable OpenThreads::Mutex m_factoryListMutex;
+      FactoryListType m_factoryList;
+   };
+
+template <class T, class NativeType>
+void ossimFactoryListInterface<T, NativeType>::getAllTypeNamesFromRegistry(std::vector<ossimString>& typeList)const
+{
+   //OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_factoryListMutex);
+   ossim_uint32 idx = 0;
+   for(; idx<m_factoryList.size(); ++idx)
+   {
+      m_factoryList[idx]->getTypeNameList(typeList);
+   }
+}
+template <class T, class NativeType>
+ossimObject* ossimFactoryListInterface<T, NativeType>::createObjectFromRegistry(const ossimString& typeName)const
+{
+   //OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_factoryListMutex);
+   ossimObject* result = 0;
+   ossim_uint32 idx = 0;
+   for(;((idx<m_factoryList.size())&&!result); ++idx)
+   {
+      result = m_factoryList[idx]->createObject(typeName);
+   }
+   return result;
+}
+
+template <class T, class NativeType>
+ossimObject* ossimFactoryListInterface<T, NativeType>::createObjectFromRegistry(const ossimKeywordlist& kwl,
+                                                                                const char* prefix)const
+{
+   // OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_factoryListMutex);
+   ossimObject* result = 0;
+   ossim_uint32 idx = 0;
+   for(;((idx<m_factoryList.size())&&!result); ++idx)
+   {
+      result = m_factoryList[idx]->createObject(kwl, prefix);
+   }
+   return result;
+}
+
+template <class T, class NativeType>
+NativeType* ossimFactoryListInterface<T, NativeType>::createNativeObjectFromRegistry(const ossimString& typeName)const
+{
+   NativeType* result = 0;
+   ossimRefPtr<ossimObject> tempObject = createObjectFromRegistry(typeName);
+   if(tempObject.valid())
+   {
+      result = dynamic_cast<NativeType*>(tempObject.get());
+      if(result)
+      {
+         tempObject.release();
+      }
+   }
+   
+   return result;
+}
+
+template <class T, class NativeType>
+NativeType* ossimFactoryListInterface<T, NativeType>::createNativeObjectFromRegistry(const ossimKeywordlist& kwl,
+                                                                                     const char* prefix)const
+{
+   NativeType* result = 0;
+   ossimRefPtr<ossimObject> tempObject = createObjectFromRegistry(kwl, prefix);
+   if(tempObject.valid())
+   {
+      result = dynamic_cast<NativeType*>(tempObject.get());
+      if(result)
+      {
+         tempObject.release();
+      }
+   }
+   
+   return result;
+}
+
+#endif
+
diff --git a/ossim/include/ossim/base/ossimFileProcessorInterface.h b/ossim/include/ossim/base/ossimFileProcessorInterface.h
new file mode 100644
index 0000000..74d09ff
--- /dev/null
+++ b/ossim/include/ossim/base/ossimFileProcessorInterface.h
@@ -0,0 +1,42 @@
+//----------------------------------------------------------------------------
+// File: ossimFileProcessorInterface.h
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Class interface ossimFileProcessorInterface.
+//
+// Has pure virtual "processFile" method that derived classes must
+// implement to be concrete. 
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimFileProcessorInterface_HEADER
+#define ossimFileProcessorInterface_HEADER 1
+
+class ossimFilename;
+
+/** @class ossimFileProcessorInterface */
+class ossimFileProcessorInterface
+{
+public:
+   
+   /** @brief default constructor */
+   ossimFileProcessorInterface(){}
+
+   /** @brief virtual destructor. */
+   virtual ~ossimFileProcessorInterface(){}
+
+   /**
+    * @brief Pure virtual processFile method. Derived classed must implement.
+    * @param file to process.
+    */
+   virtual void processFile(const ossimFilename& file) = 0;
+};
+
+#endif /* #ifndef ossimFileProcessorInterface_HEADER */
+
diff --git a/ossim/include/ossim/base/ossimFilename.h b/ossim/include/ossim/base/ossimFilename.h
new file mode 100644
index 0000000..a39a4f1
--- /dev/null
+++ b/ossim/include/ossim/base/ossimFilename.h
@@ -0,0 +1,265 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Ken Melero
+//
+// Description: This class provides manipulation of filenames.
+//
+//*************************************************************************
+// $Id: ossimFilename.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimFilename_HEADER
+#define ossimFilename_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimString.h>
+
+class ossimLocalTm;
+
+class OSSIM_DLL ossimFilename : public ossimString
+{
+public:
+   enum AccessModes
+   {
+      OSSIM_READ_WRITE = 6,
+      OSSIM_READ       = 4,
+      OSSIM_WRITE      = 2,
+      OSSIM_EXE	       = 1, // The PC docs say that this is ignored
+      OSSIM_EXIST      = 0
+   };
+   ossimFilename();
+   ossimFilename(const ossimFilename& src);
+   ossimFilename(const ossimString& src);
+   ossimFilename(const std::string& src);
+   ossimFilename(const char* src);
+
+   template <class Iter> ossimFilename(Iter s, Iter e);
+
+   static const ossimFilename NIL;
+
+   bool operator == (const ossimFilename& rhs)const;
+   
+   bool operator == (const ossimString& rhs)const;
+   bool operator == (const char* rhs)const;
+
+   /** @brief Writes f to the output stream os. */
+//    friend std::ostream& operator<<(std::ostream& os,
+   //                                const ossimFilename& s);
+   
+   void convertBackToForwardSlashes();
+   void convertForwardToBackSlashes();
+
+   bool setTimes(ossimLocalTm* accessTime,
+                 ossimLocalTm* modTime,
+                 ossimLocalTm* createTime)const;
+   bool getTimes(ossimLocalTm* accessTime,
+                 ossimLocalTm* modTime,
+                 ossimLocalTm* createTime)const;
+   
+   bool touch()const;
+   
+   /**
+    * Method to do file name expansion.
+    *
+    * Like: ~/docs will be expanded to /home/user/docs
+    *
+    * @return The expanded file name.
+    *
+    * @note METHOD IS NOT COMPLETE YET.
+    */
+   ossimFilename expand() const;
+   
+   // Methods to test ossimFilename for various states.
+   bool        exists()       const;
+   bool        isFile()       const;
+   bool        isDir()        const;
+   bool        isReadable()   const;
+   bool        isWriteable()  const;
+   bool        isExecutable() const;
+   ossim_int64 fileSize()     const;
+   
+   // Methods to access parts of the ossimFilename.
+
+   /**
+    * @return "tif" if file is "/data/images/t1.tif".
+    *
+    * @note The '.' (dot) is not returned.
+    */
+   ossimString   ext() const;
+
+   /**
+    * @return @return "/data/images" if file is "/data/images/t1.tif".
+    */
+   ossimFilename path() const;
+
+   /**
+    * @return @return "c:" if file is "c:\data\images\t1.tif".
+    */
+   ossimFilename drive() const;
+   
+   /**
+    * @return @return "t1.tif" if file is "/data/images/t1.tif".
+    */
+   ossimFilename file() const;
+
+   /**
+    * @return @return "t1" if file is "/data/images/t1.tif".
+    */
+   ossimFilename fileNoExtension() const;
+
+   /**
+    * @return @return "/data/images/t1" if file is "/data/images/t1.tif".
+    *
+    * @note  The '.' (dot) is not returned.
+    */
+   ossimFilename noExtension() const;
+
+   /**
+    * Sets the extension of a file name.
+    *
+    * Given:
+    * ossimFilename f = "foo";
+    * f.setExtension("tif");
+    * f now equals "foo.tif"
+    *
+    * Given: 
+    * ossimFilename f = "foo.jpg";
+    * f.setExtension("tif");
+    * f now equals "foo.tif"
+    * 
+    * Given: 
+    * ossimFilename f = "foo.jpg";
+    * f.setExtension(".tif");
+    * f now equals "foo.tif"
+    *
+    * Given: 
+    * ossimFilename f = "foo.";
+    * ossimFilename f2;
+    * f2 = f.setExtension("tif");
+    * f now equals "foo.tif"
+    * f2 now equals "foo.tif"
+    *
+    * @param e Extension to add or replace.
+    *
+    * @returns a reference to this.
+    */
+   ossimFilename& setExtension(const ossimString& e);
+
+   /**
+	* Sets the file path and drive.
+	* Input: the drive to be set (this should come from the user's preferences)
+	* Example: "x:"
+	* Given: "/filepath/file.ext"
+    * @return @return "c:\filepath\file.ext".
+    */
+   ossimFilename& setDrive(const ossimString& d);
+   ossimFilename& setPath(const ossimString& p);
+   ossimFilename& setFile(const ossimString& f);
+   
+   void split(ossimString& drivePart,
+              ossimString& pathPart,
+              ossimString& filePart,
+              ossimString& extPart)const;
+   
+   void merge(const ossimString& drivePart,
+              const ossimString& pathPart,
+              const ossimString& filePart,
+              const ossimString& extPart);
+   /*!
+    * Returns file appended onto this string. Path seperator is always placed
+    * between this and file.  Returns file if this string is empty.
+    * Given: this = /foo  and file  = bar output  = /foo/bar
+    * Given: this = /foo/ and file  = bar output  = /foo/bar
+    */
+   ossimFilename dirCat(const ossimFilename& file) const;
+
+   /*!
+    */
+   bool createDirectory(bool recurseFlag=true,
+                        int perm=0775)const;
+
+   /*!
+    * @brief Removes pathname from filesystem if supported by platform.
+    *
+    * If pathname is a directory it will only be removed if empty. If supported
+    * will set errno and output equivalent string if one occurs.
+    *
+    * @return true on success, false on error.
+    */
+   static bool remove(const ossimFilename& pathname);
+
+   /**
+    * Will use a wildcard remove.  NOTE:  This is in
+    * a regular expression format so if you want all
+    * files with prefix myfile to be erased then you would give
+    * it <path>/myfile.*
+    *
+    * The . here is a regular expression '.' character which says any character
+    * and the * "is any number of"
+    * 
+    */ 
+   static bool wildcardRemove(const ossimFilename& pathname);
+
+   bool rename(const ossimFilename& destFile, bool overwriteDestinationFlag=true)const;
+   
+   bool remove()const;
+   bool wildcardRemove()const;
+
+   /**
+    * @brief Copies this file to output file.
+    *
+    * Copies this to output file. If output file is a directory, this->file() is
+    * appended to output file.
+    * 
+    * @param outputFile File name to copy to.
+    * 
+    * @return True on success, false on error.
+    */
+   bool copyFileTo(const ossimFilename& ouputFile) const;
+
+   /**
+    * @brief Checks whether file name is relative or absolute.
+    * 
+    * @return true if file name has a relative path, false if absolute.
+    *
+    * @note This will return true if file name is empty.
+    */
+   bool isRelative() const;
+   
+   /**
+    * @brief Method to check if expansion is needed.
+    *
+    * This checks if file isRelative() first if isRelative is false (has
+    * absolute path) it then walks the file and looks for '$'.
+    * 
+    * @return true if file name is relative or has environment vars.
+    *
+    * @note This will return false if file name is empty.
+    */
+   bool needsExpansion() const;
+
+   /** @return The path separator. */
+   char getPathSeparator() const;
+   
+protected:
+
+   void convertToNative();
+
+   /*!
+    * since windows uses \ for path separation
+    * and unix / we need to be consistent.
+    */
+   static const char thePathSeparator;
+
+};
+
+// inline std::ostream& operator<<(std::ostream& os, const ossimFilename& f)
+// {
+//   return os << f.string().c_str();
+// }
+
+#endif
+
diff --git a/include/ossim/base/ossimFilenameProperty.h b/ossim/include/ossim/base/ossimFilenameProperty.h
similarity index 100%
rename from include/ossim/base/ossimFilenameProperty.h
rename to ossim/include/ossim/base/ossimFilenameProperty.h
diff --git a/include/ossim/base/ossimFlexLexer.h b/ossim/include/ossim/base/ossimFlexLexer.h
similarity index 100%
rename from include/ossim/base/ossimFlexLexer.h
rename to ossim/include/ossim/base/ossimFlexLexer.h
diff --git a/ossim/include/ossim/base/ossimFontInformation.h b/ossim/include/ossim/base/ossimFontInformation.h
new file mode 100644
index 0000000..909eb6d
--- /dev/null
+++ b/ossim/include/ossim/base/ossimFontInformation.h
@@ -0,0 +1,100 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License:  See top level LICENSE.txt.
+//
+// Author: Garrett Potts
+// 
+//********************************************************************
+// $Id: ossimFontInformation.h 23353 2015-06-01 19:19:10Z dburken $
+#ifndef ossimFontInformation_HEADER
+#define ossimFontInformation_HEADER
+
+#include <iosfwd>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimIpt.h>
+
+class ossimKeywordlist;
+
+class OSSIM_DLL ossimFontInformation
+{
+public:
+   friend OSSIMDLLEXPORT std::ostream& operator << (std::ostream& out,
+                                                    const ossimFontInformation& rhs);
+
+   ossimFontInformation();
+
+   ossimFontInformation(const ossimString& family,
+                        const ossimString& style,
+                        const ossimIpt&    pointSize,
+                        bool               fixedFlag,
+                        const ossimDpt&    scale=ossimDpt(1.0,1.0),
+                        double             rotation = 0.0,
+                        const ossimDpt&    shear=ossimDpt(0.0, 0.0));
+
+   ossimFontInformation(const ossimFontInformation& rhs);
+
+   bool isFixed()const;
+
+   /**
+    * Saves the current state of this object.
+    *
+    * For keywords see loadState:
+    */
+   bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
+
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    *
+    * Keywords:
+    *
+    * family_name:
+    * style_name:
+    * fixed_flag:
+    * point_size: ( x, y )
+    * scale: ( x, y )
+    * shear: ( x, y )
+    * rotation:
+    *
+    * point_size_x:  (deprecated)
+    * point_size_y:  (deprecated)
+    * scale_x: (deprecated)
+    * scale_y: (deprecated)
+    * shear_x: (deprecated)
+    * shear_y: (deprecated)
+    */   
+   bool loadState(const ossimKeywordlist& kwl,
+                  const char* prefix=0);
+
+   bool operator ==(const ossimFontInformation& rhs)const;
+
+   bool operator !=(const ossimFontInformation& rhs)const;
+
+   const ossimFontInformation& operator =(const ossimFontInformation& rhs);
+   
+   static const char* FAMILY_NAME_KW;
+   static const char* STYLE_NAME_KW;
+   static const char* POINT_SIZE_KW;   // point_size: ( x, y ) 
+   static const char* POINT_SIZE_X_KW; // deprecated
+   static const char* POINT_SIZE_Y_KW; // deprecated
+   static const char* FIXED_FLAG_KW;
+   static const char* SHEAR_KW;        // shear: ( x, y ) 
+   static const char* SHEAR_X_KW;      // deprecated
+   static const char* SHEAR_Y_KW;      // deprecated
+   static const char* SCALE_KW;        // scale: ( x, y ) 
+   static const char* SCALE_X_KW;      // deprecated
+   static const char* SCALE_Y_KW;      // deprecated
+   static const char* ROTATION_KW;
+   
+   
+   ossimString    theFamilyName;
+   ossimString    theStyleName;
+   ossimIpt       thePointSize;
+   bool           theFixedFlag;
+   ossimDpt       theScale;
+   double         theRotation;
+   ossimDpt       theShear;
+};
+
+#endif
diff --git a/include/ossim/base/ossimFontProperty.h b/ossim/include/ossim/base/ossimFontProperty.h
similarity index 100%
rename from include/ossim/base/ossimFontProperty.h
rename to ossim/include/ossim/base/ossimFontProperty.h
diff --git a/include/ossim/base/ossimFpt.h b/ossim/include/ossim/base/ossimFpt.h
similarity index 100%
rename from include/ossim/base/ossimFpt.h
rename to ossim/include/ossim/base/ossimFpt.h
diff --git a/include/ossim/base/ossimFpt3d.h b/ossim/include/ossim/base/ossimFpt3d.h
similarity index 100%
rename from include/ossim/base/ossimFpt3d.h
rename to ossim/include/ossim/base/ossimFpt3d.h
diff --git a/ossim/include/ossim/base/ossimGeoPolygon.h b/ossim/include/ossim/base/ossimGeoPolygon.h
new file mode 100644
index 0000000..2c38058
--- /dev/null
+++ b/ossim/include/ossim/base/ossimGeoPolygon.h
@@ -0,0 +1,137 @@
+//*****************************************************************************
+// FILE: ossimPolygon.h
+//
+// Copyright (C) 2001 ImageLinks, Inc.
+//
+// License:  See top level LICENSE.txt file.
+//
+// AUTHOR: Garrett Potts
+//
+//*****************************************************************************
+//  $Id: ossimGeoPolygon.h 23166 2015-02-24 20:57:50Z dburken $
+#ifndef ossimGeoPolygon_HEADER
+#define ossimGeoPolygon_HEADER
+#include <vector>
+#include <ossim/base/ossimGpt.h>
+
+class ossimKeywordlist;
+
+class OSSIMDLLEXPORT ossimGeoPolygon
+{
+public:
+   friend OSSIM_DLL std::ostream& operator <<(std::ostream& out, const ossimGeoPolygon& poly);
+
+   ossimGeoPolygon();
+
+   ossimGeoPolygon(const std::vector<ossimGpt>& points);
+
+   ossimGeoPolygon(const ossimGeoPolygon& rhs);
+
+    bool addWmsBbox(const ossimString& wmsBbox);  
+    void addPoint(const ossimGpt& pt)
+      {
+         theVertexList.push_back(pt);
+      }
+   void addPoint(double lat, double lon, double h=ossim::nan(), const ossimDatum* datum=0)
+      {
+         theVertexList.push_back(ossimGpt(lat, lon, h, datum));
+      }
+   void addAttribute( const ossimString& attribute )
+     {
+       theAttributeList.push_back( attribute );
+     }
+   void addHole( const ossimGeoPolygon& polygon )
+     {
+       theHoleList.push_back( polygon );
+     }
+   ossimGpt& operator[](int index)
+      {
+         return theVertexList[index];
+      }
+   const ossimGpt& operator[](int index)const
+      {
+         return theVertexList[index];
+      }
+   
+   const std::vector<ossimGpt>& getVertexList()const
+      {
+         return theVertexList;
+      }
+   std::vector<ossimString>& getAttributeList()
+      {
+         return theAttributeList;
+      }
+   std::vector<ossimGeoPolygon>& getHoleList()
+      {
+         return theHoleList;
+      }
+
+   void clear()
+      {
+         theVertexList.clear();
+      }
+   ossim_uint32 size()const
+      {
+         return (ossim_uint32)theVertexList.size();
+      }
+   void resize(ossim_uint32 newSize)
+      {
+         theVertexList.resize(newSize);
+         theCurrentVertex = 0;
+         theOrderingType  = OSSIM_VERTEX_ORDER_UNKNOWN;
+      }
+   const ossimGeoPolygon& operator = (const std::vector<ossimGpt>& rhs)
+      {
+         theVertexList = rhs;
+         theCurrentVertex = 0;
+         theOrderingType = OSSIM_VERTEX_ORDER_UNKNOWN;
+
+         return *this;
+      }
+
+   const ossimGeoPolygon& operator = (const ossimGeoPolygon& rhs);
+
+   void stretchOut(ossimGeoPolygon& newPolygon,
+                   double displacement);
+   double area()const;
+
+   ossimGpt computeCentroid()const;
+   
+   bool vertex(int index, ossimGpt& v) const;
+   bool nextVertex(ossimDpt& v) const;
+   bool hasNans()const;
+   void reverseOrder();
+   
+   bool saveState(ossimKeywordlist& kwl,
+                  const char* prefix=0)const;
+   
+   bool loadState(const ossimKeywordlist& kwl,
+                  const char* prefix=0);
+    
+   void checkOrdering()const;
+   ossimVertexOrdering getOrdering()const
+      {
+         if(theOrderingType == OSSIM_VERTEX_ORDER_UNKNOWN)
+         {
+            checkOrdering();
+         }
+         return theOrderingType;
+      }
+   void setOrdering(ossimVertexOrdering ordering)
+      {
+         theOrderingType = ordering;
+      }
+protected:
+   std::vector<ossimGpt> theVertexList;
+   std::vector<ossimString> theAttributeList;
+   std::vector<ossimGeoPolygon> theHoleList;
+   mutable ossim_int32 theCurrentVertex;
+   
+   /*!
+    * This enumeration is found in ossimConstants.h
+    */
+   mutable ossimVertexOrdering theOrderingType;
+   
+};
+
+#endif
diff --git a/include/ossim/base/ossimGeoTiffCoordTransformsLut.h b/ossim/include/ossim/base/ossimGeoTiffCoordTransformsLut.h
similarity index 100%
rename from include/ossim/base/ossimGeoTiffCoordTransformsLut.h
rename to ossim/include/ossim/base/ossimGeoTiffCoordTransformsLut.h
diff --git a/ossim/include/ossim/base/ossimGeoTiffDatumLut.h b/ossim/include/ossim/base/ossimGeoTiffDatumLut.h
new file mode 100644
index 0000000..d8dc61d
--- /dev/null
+++ b/ossim/include/ossim/base/ossimGeoTiffDatumLut.h
@@ -0,0 +1,75 @@
+//*******************************************************************
+// Copyright (C) 2001 ImageLinks Inc.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Contains class declaration for GeoTiffDatumLut. Used to map a
+// geotiff coordinate transformation code to an ossim projection.
+//*******************************************************************
+//  $Id: ossimGeoTiffDatumLut.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimGeoTiffDatumLut_HEADER
+#define ossimGeoTiffDatumLut_HEADER
+
+#include <ossim/base/ossimLookUpTable.h>
+#include <ossim/base/ossimKeywordNames.h>
+
+class OSSIMDLLEXPORT ossimGeoTiffDatumLut : public ossimLookUpTable
+{
+public:
+
+   enum
+   {
+      //---
+      // Datum codes cut from geotiff specification section 6.3.2.1.
+      //---
+      GCS_Adindan                     = 4201,
+      GCS_Arc_1950                    = 4209,
+      GCS_Arc_1960                    = 4210,
+      GCS_ED50                        = 4230,
+      GCS_NAD27                       = 4267,
+      GCS_NAD83                       = 4269,
+      GCS_OSGB_1936                   = 4277,
+      GCS_WGS_72                      = 4322,
+      GCS_WGS_84                      = 4326,
+      GCS_Tokyo                       = 4301,
+      GCS_NAD83_HARN                  = 4152,
+
+      //---
+      // Datum codes cut from geotiff specification section 6.3.2.1.
+      // NOTE:  These codes imply an ellipsoid only!
+      //---
+      GCS_Clark_1866                  = 4008,
+      
+      //---
+      // Datum codes cut from geotiff specification section 6.3.2.2.
+      //---
+      DatumE_WGS84                    = 6030,
+      Datum_Adindan                   = 6201,
+      Datum_Arc_1950                  = 6209,
+      Datum_Arc_1960                  = 6210,
+      Datum_European_Datum_1950       = 6230,
+      Datum_North_American_Datum_1927 = 6267,
+      Datum_North_American_Datum_1983 = 6269,
+      Datum_OSGB_1936                 = 6277,
+      Datum_Tokyo                     = 6301,
+      Datum_WGS72                     = 6322,
+      Datum_WGS84                     = 6326,
+      Datum_NAD83_HARN                = 6152
+   };
+   
+   ossimGeoTiffDatumLut();
+
+   virtual ~ossimGeoTiffDatumLut();
+   
+   virtual ossimKeyword getKeyword() const;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/base/ossimGeocent.h b/ossim/include/ossim/base/ossimGeocent.h
new file mode 100644
index 0000000..a79cb23
--- /dev/null
+++ b/ossim/include/ossim/base/ossimGeocent.h
@@ -0,0 +1,162 @@
+#ifndef GEOCENT_H
+#define GEOCENT_H 1
+
+/***************************************************************************/
+/* RSC IDENTIFIER:  GEOCENTRIC
+ *
+ * ABSTRACT
+ *
+ *    This component provides conversions between Geodetic coordinates (latitude,
+ *    longitude in radians and height in meters) and Geocentric coordinates
+ *    (X, Y, Z) in meters.
+ *
+ * ERROR HANDLING
+ *
+ *    This component checks parameters for valid values.  If an invalid value
+ *    is found, the error code is combined with the current error code using 
+ *    the bitwise or.  This combining allows multiple error codes to be
+ *    returned. The possible error codes are:
+ *
+ *      GEOCENT_NO_ERROR        : No errors occurred in function
+ *      GEOCENT_LAT_ERROR       : Latitude out of valid range
+ *                                 (-90 to 90 degrees)
+ *      GEOCENT_LON_ERROR       : Longitude out of valid range
+ *                                 (-180 to 360 degrees)
+ *      GEOCENT_A_ERROR         : Semi-major axis less than or equal to zero
+ *      GEOCENT_INV_F_ERROR     : Inverse flattening outside of valid range
+ *								                 (250 to 350)
+ *
+ *
+ * REUSE NOTES
+ *
+ *    GEOCENTRIC is intended for reuse by any application that performs
+ *    coordinate conversions between geodetic coordinates and geocentric
+ *    coordinates.
+ *    
+ *
+ * REFERENCES
+ *    
+ *    An Improved Algorithm for Geocentric to Geodetic Coordinate Conversion,
+ *    Ralph Toms, February 1996  UCRL-JC-123138.
+ *    
+ *    Further information on GEOCENTRIC can be found in the Reuse Manual.
+ *
+ *    GEOCENTRIC originated from : U.S. Army Topographic Engineering Center
+ *                                 Geospatial Information Division
+ *                                 7701 Telegraph Road
+ *                                 Alexandria, VA  22310-3864
+ *
+ * LICENSES
+ *
+ *    None apply to this component.
+ *
+ * RESTRICTIONS
+ *
+ *    GEOCENTRIC has no restrictions.
+ *
+ * ENVIRONMENT
+ *
+ *    GEOCENTRIC was tested and certified in the following environments:
+ *
+ *    1. Solaris 2.5 with GCC version 2.8.1
+ *    2. Windows 95 with MS Visual C++ version 6
+ *
+ * MODIFICATIONS
+ *
+ *    Date              Description
+ *    ----              -----------
+ *
+ *
+ */
+
+#include <ossim/base/ossimConstants.h>
+
+
+/***************************************************************************/
+/*
+ *                              DEFINES
+ */
+  #define GEOCENT_NO_ERROR        0x0000
+  #define GEOCENT_LAT_ERROR       0x0001
+  #define GEOCENT_LON_ERROR       0x0002
+  #define GEOCENT_A_ERROR         0x0004
+  #define GEOCENT_INV_F_ERROR     0x0008
+
+
+/***************************************************************************/
+/*
+ *                              FUNCTION PROTOTYPES
+ */
+
+/* ensure proper linkage to c++ programs */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+   OSSIM_DLL long Set_Geocentric_Parameters (double a, double f);
+/*
+ * The function Set_Geocentric_Parameters receives the ellipsoid parameters
+ * as inputs and sets the corresponding state variables.
+ *
+ *    a  : Semi-major axis of ellipsoid, in meters.          (input)
+ *    f  : Flattening of ellipsoid.						               (input)
+ */
+
+
+   OSSIM_DLL void Get_Geocentric_Parameters (double *a, double *f);
+/*
+ * The function Get_Geocentric_Parameters returns the ellipsoid parameters
+ * to be used in geocentric coordinate conversions.
+ *
+ *    a  : Semi-major axis of ellipsoid, in meters.          (output)
+ *    f  : Flattening of ellipsoid.						               (output)
+ */
+
+
+   OSSIM_DLL long Convert_Geodetic_To_Geocentric (double Latitude,
+                                                  double Longitude,
+                                                  double Height,
+                                                  double *X,
+                                                  double *Y,
+                                                  double *Z);
+/*
+ * The function Convert_Geodetic_To_Geocentric converts geodetic coordinates
+ * (latitude, longitude, and height) to geocentric coordinates (X, Y, Z),
+ * according to the current ellipsoid parameters.
+ *
+ *    Latitude  : Geodetic latitude in radians                     (input)
+ *    Longitude : Geodetic longitude in radians                    (input)
+ *    Height    : Geodetic height, in meters                       (input)
+ *    X         : Calculated Geocentric X coordinate, in meters.   (output)
+ *    Y         : Calculated Geocentric Y coordinate, in meters.   (output)
+ *    Z         : Calculated Geocentric Z coordinate, in meters.   (output)
+ *
+ */
+
+
+  OSSIM_DLL void Convert_Geocentric_To_Geodetic (double X,
+                                                 double Y, 
+                                                 double Z,
+                                                 double *Latitude,
+                                                 double *Longitude,
+                                                 double *Height);
+/*
+ * The function Convert_Geocentric_To_Geodetic converts geocentric
+ * coordinates (X, Y, Z) to geodetic coordinates (latitude, longitude, 
+ * and height), according to the current ellipsoid parameters.
+ *
+ *    X         : Geocentric X coordinate, in meters.         (input)
+ *    Y         : Geocentric Y coordinate, in meters.         (input)
+ *    Z         : Geocentric Z coordinate, in meters.         (input)
+ *    Latitude  : Calculated latitude value in radians.       (output)
+ *    Longitude : Calculated longitude value in radians.      (output)
+ *    Height    : Calculated height value, in meters.         (output)
+ */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GEOCENT_H */
diff --git a/include/ossim/base/ossimGeodeticEvaluator.h b/ossim/include/ossim/base/ossimGeodeticEvaluator.h
old mode 100755
new mode 100644
similarity index 100%
rename from include/ossim/base/ossimGeodeticEvaluator.h
rename to ossim/include/ossim/base/ossimGeodeticEvaluator.h
diff --git a/ossim/include/ossim/base/ossimGeoid.h b/ossim/include/ossim/base/ossimGeoid.h
new file mode 100644
index 0000000..f8f8741
--- /dev/null
+++ b/ossim/include/ossim/base/ossimGeoid.h
@@ -0,0 +1,66 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// DESCRIPTION:
+//   Contains declaration of class ossimGeoid. Maintains a grid of elevation
+//   offsets for the geoid (mean sea level) relative to WGS-84 ellipsoid.
+//
+// SOFTWARE HISTORY:
+//>
+//   17Apr2001  Oscar Kramer
+//              Initial coding.
+//<
+//*****************************************************************************
+
+#ifndef ossimGeoid_HEADER
+#define ossimGeoid_HEADER
+
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimErrorStatusInterface.h>
+
+class ossimGpt;
+class ossimFilename;
+
+class OSSIMDLLEXPORT ossimGeoid : public ossimObject,
+				  public ossimErrorStatusInterface
+{
+public:
+   ossimGeoid();
+
+   virtual bool open(const ossimFilename& dir, ossimByteOrder byteOrder=OSSIM_BIG_ENDIAN) = 0;
+
+   /**
+    *  @return The offset from the ellipsoid to the geoid.  Returns
+    *  ossim::nan() if grid does not contain the point.
+    */
+   virtual double offsetFromEllipsoid(const ossimGpt& gpt) = 0;
+
+protected:
+   virtual ~ossimGeoid();
+   
+   TYPE_DATA
+};
+
+/**
+ * Identity geoid.
+ */
+class OSSIM_DLL ossimIdentityGeoid : public ossimGeoid
+{
+public:
+   virtual ossimString getShortName()const
+   {
+      return ossimString("identity");
+   }
+   virtual bool open(const ossimFilename& /*dir*/, ossimByteOrder)
+   {
+      return false; // can't be opened 
+   }
+   virtual double offsetFromEllipsoid(const ossimGpt& /*gpt*/)
+   {
+      return 0.0;
+   }
+   
+   TYPE_DATA
+};
+#endif
diff --git a/ossim/include/ossim/base/ossimGeoidEgm96.h b/ossim/include/ossim/base/ossimGeoidEgm96.h
new file mode 100644
index 0000000..c5a42ac
--- /dev/null
+++ b/ossim/include/ossim/base/ossimGeoidEgm96.h
@@ -0,0 +1,66 @@
+//*******************************************************************
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author:  David Burken
+//
+// Description:
+//
+// Contains class definition for ossimGeoidEgm96 which is
+// "Earth Gravity Model 1996".
+//
+//*******************************************************************
+//  $Id: ossimGeoidEgm96.h 22900 2014-09-30 09:56:11Z dburken $
+
+#ifndef ossimGeoidEgm96_HEADER
+#define ossimGeoidEgm96_HEADER
+
+#include <ossim/base/ossimGeoid.h>
+#include <vector>
+
+#define GEOID_NO_ERROR              0x0000
+#define GEOID_FILE_OPEN_ERROR       0x0001
+#define GEOID_INITIALIZE_ERROR      0x0002
+#define GEOID_NOT_INITIALIZED_ERROR 0x0004
+#define GEOID_LAT_ERROR             0x0008
+#define GEOID_LON_ERROR             0x0010
+
+class ossimGpt;
+
+class OSSIMDLLEXPORT ossimGeoidEgm96 : public ossimGeoid
+{
+
+public:
+   ossimGeoidEgm96();
+   ossimGeoidEgm96(const ossimFilename& grid_file,
+                   ossimByteOrder byteOrder=OSSIM_BIG_ENDIAN);
+   
+   virtual ~ossimGeoidEgm96();
+
+   virtual bool open(const ossimFilename& grid_file,
+                     ossimByteOrder byteOrder=OSSIM_BIG_ENDIAN);
+
+   virtual ossimString getShortName()const;
+   
+   /**
+    *  @return The offset from the ellipsoid to the geoid or ossim::nan()
+    *  (IEEE NAN) if grid does not contain the point.
+    */
+   virtual double offsetFromEllipsoid(const ossimGpt& gpt);
+
+   double geoidToEllipsoidHeight(double lat,
+                                 double lon,
+                                 double geoidHeight);
+   
+   double ellipsoidToGeoidHeight(double lat,
+                           double lon,
+                           double ellipsoidHeight);
+
+protected:
+
+   std::vector<float> theGeoidHeightBuffer;
+   mutable float* theGeoidHeightBufferPtr;
+   TYPE_DATA
+};
+
+#endif
diff --git a/ossim/include/ossim/base/ossimGeoidImage.h b/ossim/include/ossim/base/ossimGeoidImage.h
new file mode 100644
index 0000000..ef8d928
--- /dev/null
+++ b/ossim/include/ossim/base/ossimGeoidImage.h
@@ -0,0 +1,117 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Generic geoid source which uses an image handler for reading the grid.
+// 
+//----------------------------------------------------------------------------
+#ifndef ossimGeoidImage_HEADER
+#define ossimGeoidImage_HEADER 1
+   
+#include <ossim/base/ossimGeoid.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+
+class ossimFilename;
+
+/**
+ * @class ossimGeoidImage
+ *
+ * Generic geoid source which uses a image handler for reading the grid.
+ *
+ * The settable keyword "geoid.type", e.g. "egm2008" is used to attach a given geoid
+ * to an elevation source.
+ *
+ * The keyword "type" is fixed for this object as "geoid_image".
+ */
+class OSSIM_DLL ossimGeoidImage : public ossimGeoid
+{
+
+public:
+   
+   /** @brief default constructor */
+   ossimGeoidImage();
+
+   /** @brief destructor */
+   virtual ~ossimGeoidImage();
+
+   /**
+    * @brief open method
+    * @param file This can be any image that ossim can open and get geometry
+    * info for.
+    * @param byteOrder Not used by this object.
+    * @return true on success, false on erro.
+    */
+   virtual bool open( const ossimFilename& file,
+                      ossimByteOrder byteOrder=OSSIM_BIG_ENDIAN );
+
+   /**
+    * @return The short name which represents the "geoid.type" keyword which is
+    * used by ossimGeoidFactory.
+    */
+   virtual ossimString getShortName() const;
+   
+   /** @brief Sets the geoid type name string. */
+   void setShortName( const std::string& geoidTypeName );
+
+   /**
+    * @brief Gets the memory map flag.
+    * @return true if geoid image is memory mapped; else, false.
+    */
+   bool getMemoryMapFlag() const;
+
+   /**
+    * @brief Set the memory map flag.
+    */
+   void setMemoryMapFlag( bool flag );
+   
+   /**
+    * Method to save the state of the object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0) const;
+   
+   /**
+    * Method to the load (recreate) the state of the object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+   /**
+    *  @return The offset from the ellipsoid to the geoid or ossim::nan()
+    *  (IEEE NAN) if grid does not contain the point.
+    */
+   virtual double offsetFromEllipsoid(const ossimGpt& gpt);
+
+   bool getEnableFlag() const;
+
+   void setEnableFlag(bool flag);
+
+protected:
+
+   template <class T>
+   double offsetFromEllipsoidTemplate(T dummy, const ossimGpt& gpt);
+
+   ossimRefPtr<ossimImageGeometry> m_geom;
+   ossimRefPtr<ossimImageHandler>  m_handler;
+   ossimRefPtr<ossimImageData>     m_cacheTile;
+   std::string                     m_connectionString;
+   ossimString                     m_geoidTypeName;
+   bool                            m_memoryMapFlag;
+   bool                            m_enabledFlag;
+   ossimIrect                      m_imageRect;
+   ossimScalarType                 m_scalarType;
+};
+
+#endif /* #define ossimGeoidImage_HEADER 1 */
+
diff --git a/ossim/include/ossim/base/ossimGeoidManager.h b/ossim/include/ossim/base/ossimGeoidManager.h
new file mode 100644
index 0000000..f8a4ed0
--- /dev/null
+++ b/ossim/include/ossim/base/ossimGeoidManager.h
@@ -0,0 +1,87 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Contains declaration of class ossimGeoidManager. Maintains
+//   a list of geoids.
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimGeoidManager.h 22900 2014-09-30 09:56:11Z dburken $
+
+#ifndef ossimGeoidManager_HEADER
+#define ossimGeoidManager_HEADER
+
+#include <vector>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimGeoid.h>
+/*****************************************************************************
+ *
+ * CLASS: ossimGeoidManager 
+ *
+ *****************************************************************************/
+class OSSIMDLLEXPORT ossimGeoidManager : public ossimGeoid
+{
+public:
+
+
+   virtual ~ossimGeoidManager();
+      
+   /**
+    * Implements singelton pattern:
+    */
+   static ossimGeoidManager* instance();
+
+   
+   /**
+    * Permits initialization of geoids from directory name. Should never be
+    * called since called on specific geoid types:
+    */
+   virtual bool open(const ossimFilename& dir, ossimByteOrder byteOrder);
+
+   /**
+    *  @return The offset from the ellipsoid to the geoid or ossim::nan()
+    *  if grid does not contain the point.
+    */
+   virtual double offsetFromEllipsoid(const ossimGpt& gpt);
+
+   /**
+    * Method to save the state of the object to a keyword list.
+    * Return true if ok or false on error. DO NOTHING
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0) const;
+
+   /**
+    * Method to the load (recreate) the state of the object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   /**
+    * Permits adding additional geoids to the list: 
+    */
+   virtual void addGeoid(ossimRefPtr<ossimGeoid> geoid, bool toFrontFlag=false);
+
+   ossimGeoid* findGeoidByShortName(const ossimString& shortName, bool caseSensitive=true);
+private:
+   /**
+    *  Private constructor.  Use "instance" method.
+    */
+   ossimGeoidManager();
+
+   //static ossimGeoidManager* theInstance;
+   mutable std::vector< ossimRefPtr<ossimGeoid> > theGeoidList;
+   
+   // will use this as a identity if one wants but don't want it part of the internal list
+   //
+   ossimRefPtr<ossimGeoid> theIdentityGeoid;
+   
+   TYPE_DATA
+};
+
+#endif
diff --git a/ossim/include/ossim/base/ossimGeoidNgs.h b/ossim/include/ossim/base/ossimGeoidNgs.h
new file mode 100644
index 0000000..5086470
--- /dev/null
+++ b/ossim/include/ossim/base/ossimGeoidNgs.h
@@ -0,0 +1,64 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+// Description:
+//
+//*******************************************************************
+//  $Id: ossimGeoidNgs.h 22900 2014-09-30 09:56:11Z dburken $
+#ifndef ossimGeoidNgs_HEADER
+#define ossimGeoidNgs_HEADER
+
+#include <ossim/base/ossimGeoid.h>
+#include <ossim/base/ossimGeoidNgsHeader.h>
+
+class OSSIMDLLEXPORT ossimGeoidNgs : public ossimGeoid
+{
+
+public:
+   ossimGeoidNgs();
+   ossimGeoidNgs(const ossimFilename& dir,
+                 ossimByteOrder byteOrder = OSSIM_LITTLE_ENDIAN);
+   virtual ~ossimGeoidNgs();
+
+   virtual ossimString getShortName()const;
+   
+   virtual bool open(const ossimFilename& dir,
+                     ossimByteOrder byteOrder = OSSIM_LITTLE_ENDIAN);
+
+   virtual bool addFile(const ossimFilename& file,
+                        ossimByteOrder byteOrder = OSSIM_LITTLE_ENDIAN);
+   /**
+    *  @return The offset from the ellipsoid to the geoid or ossim::nan()
+    *  if grid does not contain the point.
+    */
+   virtual double offsetFromEllipsoid(const ossimGpt&);
+
+   /**
+    *  @return Geoid to ellipsoid height or ossim::nan()
+    *  if grid does not contain the point.
+    */
+   double geoidToEllipsoidHeight(double lat,
+                                 double lon,
+                                 double geoidHeight) const;
+
+   /**
+    *  @return Ellipsoid to geoid height or ossim::nan()
+    *  if grid does not contain the point.
+    */
+   double ellipsoidToGeoidHeight(double lat,
+                                 double lon,
+                                 double ellipsoidHeight) const;
+protected:
+   void fixLatLon(double &lat, double &lon) const;
+   double deltaHeight(double lat, double lon)const;
+   
+   std::vector<ossimGeoidNgsHeader> theGridVector;
+   ossimString theShortName;
+
+   TYPE_DATA
+};
+
+#endif
diff --git a/ossim/include/ossim/base/ossimGeoidNgsHeader.h b/ossim/include/ossim/base/ossimGeoidNgsHeader.h
new file mode 100644
index 0000000..cf2de2b
--- /dev/null
+++ b/ossim/include/ossim/base/ossimGeoidNgsHeader.h
@@ -0,0 +1,83 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts (gpotts at imagelinks.com)
+//
+// Description:
+//
+//*******************************************************************
+//  $Id: ossimGeoidNgsHeader.h 23353 2015-06-01 19:19:10Z dburken $
+#ifndef ossimGeoidNgsHeader_HEADER
+#define ossimGeoidNgsHeader_HEADER 1
+#include <ossim/base/ossimFilename.h>
+#include <iostream>
+
+class OSSIM_DLL ossimGeoidNgsHeader
+{
+public:
+   friend OSSIM_DLL std::ostream& operator << (std::ostream &out, const ossimGeoidNgsHeader &data);
+   
+   ossimGeoidNgsHeader();
+   ossimGeoidNgsHeader(const ossimFilename &fileName,
+                       ossimByteOrder byteOrder=OSSIM_LITTLE_ENDIAN);
+
+   bool initialize(const ossimFilename &fileName,
+                   ossimByteOrder byteOrder=OSSIM_LITTLE_ENDIAN);
+   
+   double southernMostLat()const{return theSouthernMostLatitude;}
+   double westernMostLon()const{return theWesternMostLongitude;}
+   double latDelta()const{return theLatDelta;}
+   double lonDelta()const{return theLonDelta;}
+   int    rows()const{return theRows;}
+   int    cols()const{return theCols;}
+   int    dataType()const{return theDataType;}
+   bool   pointWithin(double lat, double lon)const;
+   const ossimFilename& filename()const{return theFilename;}
+   
+   int headerSize()const{return 44;}
+   int dataTypeSize()const{return theDataType==1?4:0;}
+
+   /** @return Height delta or ossim::nan() if not found. */
+   double getHeightDelta(double lat, double lon)const;
+   
+private:
+   ossimFilename theFilename;
+   ossimByteOrder theByteOrder;
+   double theSouthernMostLatitude;
+
+   /*!
+    * Important:  The geoid.bin files expresses this as a possitive value.
+    *
+    * example: -90.0 is 270 degrees.
+    */
+   double theWesternMostLongitude;
+
+   /*!
+    * Specifies the spacing of the latitude direction.
+    */
+   double theLatDelta;
+
+   /*!
+    * longitude spacing.
+    */
+   double theLonDelta;
+
+   /*!
+    * theRows specifies the number of lat increments
+    */
+   int    theRows;
+
+   /*!
+    * theCols specifies the number of lon increments
+    */
+   int    theCols;
+
+   /*!
+    * Specifies the datatype.  if this is 1 then the data that follows
+    * is 4 byte floats.
+    */
+   int    theDataType;
+};
+
+#endif
diff --git a/include/ossim/base/ossimGeoref.h b/ossim/include/ossim/base/ossimGeoref.h
similarity index 100%
rename from include/ossim/base/ossimGeoref.h
rename to ossim/include/ossim/base/ossimGeoref.h
diff --git a/ossim/include/ossim/base/ossimGpt.h b/ossim/include/ossim/base/ossimGpt.h
new file mode 100644
index 0000000..b838cd8
--- /dev/null
+++ b/ossim/include/ossim/base/ossimGpt.h
@@ -0,0 +1,359 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt.
+//
+// Author: Garrett Potts
+//
+// Description:
+//
+// Contains class declaration for gpt.
+//
+// CONSTRUCTOR TAKES LAT/LON IN DEGREES!!!
+//
+// Height is relative to the ellipsoid in meters.
+//
+//*******************************************************************
+//  $Id: ossimGpt.h 23159 2015-02-20 20:09:20Z okramer $
+
+#ifndef ossimGpt_HEADER
+#define ossimGpt_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimDpt3d.h>
+#include <ossim/base/ossimEcefPoint.h>
+#include <ossim/base/ossimDatumFactory.h>
+#include <ossim/base/ossimString.h>
+#include <iosfwd>
+
+class  ossimDatum;
+
+class OSSIM_DLL ossimGpt
+{
+public:
+   /**
+    * Constructor.  The values are assumed to be in DEGREES.
+    */
+   ossimGpt(const double alat=0,  // degrees
+            const double alon=0,  // degrees
+            const double ahgt=0,
+            const ossimDatum* aDatum=ossimDatumFactory::instance()->wgs84())
+      : lat(alat),
+        lon(alon),
+        hgt(ahgt),  // relative to the ellipsoid
+        theDatum(aDatum) {}//limitLonTo180();}
+
+   /**
+    * Copy Constructor:
+    */
+   ossimGpt(const ossimGpt& src);
+   
+   /**
+    * Constructor.  Conversion from geocentric to ground.
+    */
+   ossimGpt(const ossimEcefPoint &aPt,
+            const ossimDatum* aDatum=ossimDatumFactory::instance()->wgs84());
+
+   /**
+    * Argument aPt (x, y, z) is understood to represent (lon, lat, hgt) relative to WGS84 datum.
+    */
+   ossimGpt(const ossimDpt3d &aPt) :
+      lat(aPt.y), lon(aPt.x), hgt(aPt.z), theDatum(ossimDatumFactory::instance()->wgs84()) {}
+
+   /**
+    * latr().  Returns the latitude in radian measure.  
+    */
+   double latr()const{return lat*RAD_PER_DEG;}
+
+   /**
+    * Returns the latitude in radian measure.  
+    */
+   void latr(double radianValue){lat = radianValue*DEG_PER_RAD;}
+
+   /**
+    * Returns the longitude in radian measure.  
+    */
+   double lonr()const{return lon*RAD_PER_DEG;}
+
+   /**
+    * Assumes the value being passed in is in radians.
+    */
+   void lonr(double radianValue)
+      {lon = radianValue*DEG_PER_RAD; }//limitLonTo180();}
+
+   /**
+    * Will convert the radian measure to degrees.
+    */
+   double latd()const{return lat;}
+
+   /**
+    * Assumes the passed in value is in degrees.
+    */
+   void latd(double degreeValue){lat = degreeValue;}
+
+   /**
+    * Will convert the radian measure to degrees.
+    */
+   double lond()const{return lon;}
+
+   /**
+    *  Assumes the passed in value is in degrees.
+    */
+   void lond(double degreeValue){lon = degreeValue; }//limitLonTo180();}
+
+   /**
+    * @return Returns the height in meters above the ellipsoid.
+    */
+   double height()const{return hgt;}
+
+   /**
+    * @return Returns the height in meters above mean sea level (msl).
+    * 
+    * @note This is the height above the ellipsoid minus any geoid offset.
+    */
+   double heightMSL() const;
+
+   /**
+    * Sets the "hgt" data member to height.
+    *
+    * @param height Height above the ellipsoid in meters.
+    */
+   void height(double height){hgt = height;}
+
+   /**
+    * Sets the "hgt" data member to heightMsl adding any geiod offset.
+    *
+    * @param heightMSL Height in meters above msl.
+    */
+   void heightMSL(double heightMSL);
+
+   void makeNan(){lat=ossim::nan(); lon=ossim::nan(); hgt=ossim::nan();}
+   bool isNan()const
+   {
+      return (ossim::isnan(lat)&&ossim::isnan(lon)&&ossim::isnan(hgt));
+   }
+   bool hasNans()const
+   {
+      return (ossim::isnan(lat)||ossim::isnan(lon)||ossim::isnan(hgt));
+   }
+   bool isLatNan()const{return ossim::isnan(lat);}
+   bool isLonNan()const{return ossim::isnan(lon);}
+   bool isLonLatNan()const{return (ossim::isnan(lat)||ossim::isnan(lon));}
+   bool isLatLonNan() const{return (ossim::isnan(lat)||ossim::isnan(lon));}
+   bool isHgtNan()const{return ossim::isnan(hgt);}
+
+   std::ostream& print(std::ostream& os, ossim_uint32 precision=15) const;
+
+   friend OSSIMDLLEXPORT std::ostream& operator<<(std::ostream& os,
+                                                  const ossimGpt& pt);
+   
+   /**
+    * @param precision Output floating point precision.
+    * 
+    * @return ossimString representing point.
+    *
+    * Output format:
+    * ( 30.00000000000000, -90.00000000000000, 0.00000000000000, WGE )
+    *   -----latitude----  -----longitude----  ------height----  datum
+    */
+   ossimString toString(ossim_uint32 precision=15) const;
+
+   /**
+    * Initializes this point from string.  This method opens an istream to
+    * s and then calls operator>>.
+    *
+    * Expected format:
+    * ( 30.00000000000000, -90.00000000000000, 0.00000000000000, WGE )
+    *  -----latitude----  -----longitude----  ------height----  datum
+    *
+    * @param s String to initialize from.
+    *
+    * @see operator>>
+    */
+   void toPoint(const std::string& s);
+   
+   /**
+    * Method to input the formatted string of the "operator<<".
+    * 
+    * This method starts by doing a "makeNan" on aPt.  So if anything goes
+    * wrong with the stream or parsing aPt could be all or partially nan.
+    *
+    * @param is Input stream istream to formatted text.
+    * @param aPt osimGpt to be initialized from stream.
+    * @return istream pass in.
+    *
+    * Expected format:
+    * ( 30.00000000000000, -90.00000000000000, 0.00000000000000, WGE )
+    *  -----latitude----  -----longitude----  ------height----  datum
+    */
+   friend OSSIMDLLEXPORT std::istream& operator>>(std::istream& is,
+                                                  ossimGpt& pt);
+
+   /**
+    * datum().  returns the datum associated with this ground.
+    *
+    */
+   const ossimDatum* datum()const{return theDatum;}
+
+   /**
+    * Note: this will not do a shift.  This just allows you to set the datum.
+    *       If you want an automatic shift to occur then you must call the
+    *       changeDatum method
+    */
+   void datum(const ossimDatum* aDatum){theDatum = aDatum?aDatum:theDatum;}
+
+   /**
+    * This will actually perform a shift.
+    */
+   void changeDatum(const ossimDatum *datum);
+
+   const ossimGpt& operator = (const ossimGpt &aPt);
+   bool operator ==(const ossimGpt& gpt)const;
+
+   bool operator != (const ossimGpt& gpt) const { return !(*this == gpt); }
+   
+   /**
+    * METHOD: limitLonTo180()
+    * Converts the lon data member to a value between -180 and +180:
+    */
+   void  limitLonTo180()
+   { if (lon <= -180.0) lon += 360.0; else if (lon > 180.0) lon -= 360.0; }
+
+   /**
+    * @brief Wrap method to maintain longitude between -180 and +180 and latitude between
+    * -90 and +90.  Inlined below.
+    */
+   void wrap();
+
+   void clampLon(double low, double high)
+      {
+         if(lon < low) lon = low;
+         if(lon > high) lon = high;
+      }
+
+   void clampLat(double low, double high)
+      {
+         if(lat < low) lat = low;
+         if(lat > high) lat = high;
+      }
+
+   void clampHgt(double low, double high)
+      {
+         if(hgt < low) hgt = low;
+         if(hgt > high) hgt = high;
+      }
+      
+   /**
+    * METHOD: distanceTo(ossimGpt)
+    * Computes straight-line distance in meters between this and arg gpt:
+    */
+   double distanceTo(const ossimGpt& arg_gpt) const;
+
+   /**
+   * METHOD: azimuthTo(ossimGpt)
+   * Computes the great-circle starting azimuth (i.e., at this gpt) to the argument gpt in degrees.
+   * In other words, what direction we would need to start walking in to travel the shortest 
+   * distance to arg_gpt (assumes spherical earth)
+   */
+   double azimuthTo(const ossimGpt& arg_gpt) const;
+
+   ossimDpt metersPerDegree() const;
+   
+   ossimString toDmsString()const;
+
+   bool isEqualTo(const ossimGpt& rhs, ossimCompareType compareType=OSSIM_COMPARE_FULL)const;
+   ossim_float64 lat; //> latitude in degrees measure
+   ossim_float64 lon; //> longitude in degrees measure
+
+   /**
+    * Height in meters above the ellipsiod.
+    *
+    * @note This is NOT the same as "height msl".  "Height msl" is above
+    * the geoid or better know as mean sea level.
+    */ 
+   ossim_float64 hgt;
+
+private:
+   
+   /**
+    * Know reference location plus an implied ellipsoid.
+    */
+   const ossimDatum* theDatum;
+ 
+};
+
+inline const ossimGpt& ossimGpt::operator=(const ossimGpt& aPt)
+{
+   if ( this != &aPt )
+   {
+      lat = aPt.lat;
+      lon = aPt.lon;
+      hgt = aPt.hgt;
+
+      if(aPt.datum())
+      {
+         theDatum = aPt.datum();
+      }
+      if(!theDatum)
+      {
+         theDatum = ossimDatumFactory::instance()->wgs84();
+      }
+   }
+   return *this;
+}
+
+inline void ossimGpt::wrap()
+{
+   if ( lon > 180.0 )
+   {
+      do
+      {
+         lon = lon - 360.0;
+      } while ( lon > 180.0 );
+   }
+   else if ( lon < -180.0  )
+   {
+      do
+      {
+         lon = lon + 360.0;
+      } while ( lon < -180.0 );
+   }
+   if ( lat > 90.0 )
+   {
+      if ( lat > 360.0 ) // Remove total wraps.
+      {
+         do
+         {
+            lat = lat - 360.0;
+         } while ( lat > 360.0);
+      }
+      if ( lat > 270.0 ) // Between 270 and 360.
+      {
+         lat = lat - 360.0;
+      }
+      else if ( lat > 90 ) // Between 90 and 270.
+      {
+         lat = 180.0 - lat;
+      }
+   }
+   else if ( lat < -90.0  )
+   {
+      if ( lat < -360.0 ) // Remove total wraps.
+      {
+         do
+         {
+            lat = lat + 360.0;
+         } while ( lat < -360.0);
+      }
+      if ( lat < -270.0 ) 
+      {
+         lat = 360.0 + lat; // Between -270 and -360;
+      }
+      else if ( lat < -90.0 )
+      {
+         lat = -180.0 - lat;
+      }
+   }
+}
+
+#endif /* #ifndef ossimGpt_HEADER */
diff --git a/ossim/include/ossim/base/ossimGrect.h b/ossim/include/ossim/base/ossimGrect.h
new file mode 100644
index 0000000..fea60f7
--- /dev/null
+++ b/ossim/include/ossim/base/ossimGrect.h
@@ -0,0 +1,311 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimGrect.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimGrect_HEADER
+#define ossimGrect_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimDatumFactory.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimCommon.h>
+
+#include <vector>
+#include <iostream>
+
+class OSSIM_DLL ossimGrect
+{
+public:
+   friend OSSIM_DLL std::ostream& operator<<(std::ostream& os, const ossimGrect& rect);
+
+   /**
+    * Will default to 0,0,0,0.
+    */
+    ossimGrect()
+      :
+         theUlCorner(0.0, 0.0, 0.0),
+         theLrCorner(0.0, 0.0, 0.0)
+      {}
+
+   /**
+    * Copies the passed in rectangle to this
+    * object.
+    */
+   ossimGrect(const ossimGrect& rect)
+      :
+         theUlCorner(rect.ul()),
+         theLrCorner(rect.lr())
+      {}
+
+   /**
+    * WIll take two ground points and fill the
+    * bounding rect appropriately.
+    */
+   ossimGrect(const ossimGpt& p1, const ossimGpt& p2);
+
+   /**
+    * Takes the upper left and lower right ground
+    * points
+    */
+   ossimGrect(double ulLat,
+              double ulLon,
+              double lrLat,
+              double lrLon,
+              const ossimDatum* aDatum=ossimDatumFactory::instance()->wgs84())
+      : 
+         theUlCorner(ulLat, ulLon,0, aDatum),
+         theLrCorner(lrLat, lrLon, 0, aDatum)
+      {}
+   ossimGrect(const ossimGpt& point,
+              double latSpacingInDegrees,
+              double lonSpacingInDegrees)
+      :
+         theUlCorner(point),
+         theLrCorner(point)
+      {
+         std::vector<ossimGrect> v;
+         computeEvenTiles(v, latSpacingInDegrees, lonSpacingInDegrees);
+         if(v.size())
+            *this = v[0];
+      }
+   ossimGrect(std::vector<ossimGpt>& points);
+   ossimGrect(const ossimGpt& p1,
+              const ossimGpt& p2,
+              const ossimGpt& p3,
+              const ossimGpt& p4);
+              
+
+   const ossimGrect& operator=(const ossimGrect& rect)
+      {
+         theUlCorner = rect.ul();
+         theLrCorner = rect.lr();
+         return *this;
+      }
+
+   inline ossimGpt midPoint()const;
+   
+   /** Returns the height of a rectangle in deg. */
+   inline ossim_float64 height() const;
+
+   /** Returns the width of a rectangle in deg. */
+   inline ossim_float64 width()  const;
+   
+   /** Returns the height of a rectangle in meters. */
+   ossim_float64 heightMeters() const;
+
+   /** Returns the width of a rectangle in meters using the center lat for scaling EW direction. */
+   ossim_float64 widthMeters()  const;
+
+   inline const ossimGpt& ul()const;
+   inline const ossimGpt& lr()const;
+   inline ossimGpt ur() const;
+   inline ossimGpt ll() const;
+
+   inline ossimGpt& ul();
+   inline ossimGpt& lr();
+	
+   inline void makeNan();
+   
+   inline bool isLonLatNan()const;
+	
+   inline bool hasNans()const;
+   
+   inline bool isNan()const;
+   
+   /*!
+    * Returns true if "this" rectangle is contained completely within the
+    * input rectangle "rect".
+    */
+   bool completely_within(const ossimGrect& rect) const;
+	
+   /*!
+    * Returns true if any portion of an input rectangle "rect" intersects
+    * "this" rectangle.  
+    */
+   bool intersects(const ossimGrect& rect) const;
+
+   inline ossimGrect clipToRect(const ossimGrect& rect)const;
+
+   inline ossimGrect combine(const ossimGrect& rect)const;
+
+   /**
+    * Expands existing rect to accomodate argument point. If this object contains NaNs
+    * (uninitialized), then the rect is set to 0-area with the arg point as both UL and LR --
+    * convenient for establishing bounds in a loop over collection of points. This method does not
+    * consider height.
+    * @param gpt Argument point.
+    */
+   void expandToInclude(const ossimGpt& gpt);
+   void expandToInclude(const ossimGrect& rect);
+
+   /**
+    * METHOD: pointWithin(ossimGpt)
+    *
+    * @param gpt Point to test for withinness.
+    * @param considerHgt true if the height is to be compared to be between ul.hgt and lr.hgt
+    * @return true if argument is inside rectangle (or cuboid when hgt considered)
+    *
+    * @note There is no datum shift applied if
+    * gpt is of a different datum than this datum.
+    */
+   inline bool pointWithin(const ossimGpt& gpt, bool considerHgt=false) const; //inline below
+
+   ossimGrect stretchToEvenBoundary(double latSpacingInDegrees,
+                                    double lonSpacingInDegrees)const;
+   
+   void computeEvenTiles(std::vector<ossimGrect>& result,
+                         double latSpacingInDegrees,
+                         double lonSpacingInDegrees,
+                         bool clipToGeographicBounds = true)const;
+private:
+   ossimGpt theUlCorner; // Contains max height as well
+   ossimGpt theLrCorner; // Contains min height as well
+  
+};
+
+//==================== BEGIN INLINE DEFINITIONS ===============================
+
+//*****************************************************************************
+//  INLINE METHOD: ossimGrect::midPoint()
+//*****************************************************************************
+inline ossimGpt ossimGrect::midPoint()const
+{
+   return ossimGpt((ul().latd() + ur().latd() + ll().latd() + lr().latd())*.25,
+                   (ul().lond() + ur().lond() + ll().lond() + lr().lond())*.25,
+                   (ul().height()+ur().height()+ll().height()+
+                    lr().height())*.25,
+                   ul().datum() );
+}
+
+//*****************************************************************************
+//  INLINE METHOD: ossimGrect::clipToRect()
+//*****************************************************************************
+inline ossimGrect ossimGrect::clipToRect(const ossimGrect& rect)const
+{
+    double     ulx, uly, lrx, lry;
+
+    ulx = ossim::max<ossim_float64>(rect.ul().lond(),ul().lond());
+    uly = ossim::min<ossim_float64>(rect.ul().latd(),ul().latd());
+    lrx = ossim::min<ossim_float64>(rect.lr().lond(),lr().lond());
+    lry = ossim::max<ossim_float64>(rect.lr().latd(),lr().latd());
+
+    if( lrx < ulx || lry > uly )
+    {
+       return ossimGrect(ossimGpt(0,0,0),ossimGpt(0,0,0));
+    }
+    else
+    {
+       return ossimGrect(ossimGpt(uly, ulx, 0, rect.ul().datum()),
+                         ossimGpt(lry, lrx, 0, rect.ul().datum()));
+    }
+}
+
+//*******************************************************************
+// Inline Method: ossimDrect::combine(const ossimDrect& rect)
+//*******************************************************************
+inline ossimGrect ossimGrect::combine(const ossimGrect& rect)const
+{
+   if (isLonLatNan())
+      return rect;
+
+   ossimGpt ulCombine;
+   ossimGpt lrCombine;
+	
+	ulCombine.lon = ((ul().lon <= rect.ul().lon)?ul().lon:rect.ul().lon);
+   ulCombine.lat = ((ul().lat >= rect.ul().lat)?ul().lat:rect.ul().lat);
+   lrCombine.lon = ((lr().lon >= rect.lr().lon)?lr().lon:rect.lr().lon);
+   lrCombine.lat = ((lr().lat <= rect.lr().lat)?lr().lat:rect.lr().lat);
+	
+   return ossimGrect(ulCombine, lrCombine);
+}
+
+//*****************************************************************************
+//  INLINE METHOD: ossimGrect::pointWithin()
+//*****************************************************************************
+inline bool ossimGrect::pointWithin(const ossimGpt& gpt, bool considerHgt) const
+{
+   bool within = (gpt.lat <= theUlCorner.lat) && (gpt.lat >= theLrCorner.lat) &&
+                 (gpt.lon >= theUlCorner.lon) && (gpt.lon <= theLrCorner.lon);
+   if (considerHgt)
+      within &= (gpt.hgt <= theUlCorner.hgt) && (gpt.hgt >= theLrCorner.hgt);
+
+   return within;
+}
+
+inline ossim_float64 ossimGrect::height() const
+{
+   return (theUlCorner.latd() - theLrCorner.latd());
+}
+
+inline ossim_float64 ossimGrect::width() const
+{
+   return (theLrCorner.lond() - theUlCorner.lond());
+}
+
+inline const ossimGpt& ossimGrect::ul() const
+{
+   return theUlCorner;
+}
+
+inline ossimGpt ossimGrect::ur() const
+{
+   ossimGpt gpt (theUlCorner.lat, theLrCorner.lon, theUlCorner.hgt, theUlCorner.datum());
+   return gpt;
+}
+
+inline ossimGpt ossimGrect::ll() const
+{
+   ossimGpt gpt (theLrCorner.lat, theUlCorner.lon, theLrCorner.hgt, theLrCorner.datum());
+   return gpt;
+}
+
+inline const ossimGpt& ossimGrect::lr() const
+{
+   return theLrCorner;
+}
+   
+inline ossimGpt& ossimGrect::ul()
+{
+   return theUlCorner;
+}
+
+inline ossimGpt& ossimGrect::lr()
+{
+   return theLrCorner;
+}
+	
+inline void ossimGrect::makeNan()
+{
+   theUlCorner.makeNan();
+   theLrCorner.makeNan();
+}
+
+inline bool ossimGrect::isLonLatNan() const
+{
+   return ( ossim::isnan(theUlCorner.lat) ||
+            ossim::isnan(theUlCorner.lon) ||
+            ossim::isnan(theLrCorner.lat) ||
+            ossim::isnan(theLrCorner.lon) );
+}
+
+inline bool ossimGrect::hasNans() const
+{
+   return ( theUlCorner.hasNans() ||
+            theLrCorner.hasNans() );
+}
+
+inline bool ossimGrect::isNan()const
+{
+   return ( theUlCorner.hasNans() &&
+            theLrCorner.hasNans() );
+}
+
+#endif /* End of "#ifndef ossimGrect_HEADER" */
+
diff --git a/include/ossim/base/ossimGzStream.h b/ossim/include/ossim/base/ossimGzStream.h
similarity index 100%
rename from include/ossim/base/ossimGzStream.h
rename to ossim/include/ossim/base/ossimGzStream.h
diff --git a/ossim/include/ossim/base/ossimHexString.h b/ossim/include/ossim/base/ossimHexString.h
new file mode 100644
index 0000000..7b9af9f
--- /dev/null
+++ b/ossim/include/ossim/base/ossimHexString.h
@@ -0,0 +1,147 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts (gpotts at imagelinks.com)
+// 
+//********************************************************************
+// $Id: ossimHexString.h 23584 2015-10-18 13:03:33Z dburken $
+
+#ifndef ossimHexString_H
+#define ossimHexString_H 1
+
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimConstants.h>
+#include <cstring>
+
+class OSSIMDLLEXPORT ossimHexString : public ossimString
+{
+public:
+   ossimHexString():ossimString()
+      {}
+   template <class Iter>
+      ossimHexString(Iter start, Iter end):ossimString(start, end){}
+   ossimHexString(const std::string& aString):ossimString(aString)
+      {}
+   ossimHexString(const char *aString):ossimString(aString?aString:"")
+      {}
+   ossimHexString(const ossimString& aString):ossimString(aString.c_str())
+      {}
+   
+   ossimHexString(char value):ossimString()
+      {
+         assign(value);
+      }
+   ossimHexString(ossim_int16 value):ossimString()
+      {
+         assign(value);
+      }
+   ossimHexString(ossim_int32 value):ossimString()
+      {
+         assign(value);
+      }
+   ossimHexString(ossim_uint8 value):ossimString()
+      {
+         assign(value);
+      }
+   ossimHexString(ossim_uint16 value):ossimString()
+      {
+         assign(value);
+      }
+   ossimHexString(ossim_uint32 value):ossimString()
+      {
+         assign(value);
+      }
+
+   bool operator==(const ossimHexString& s) const {return (std::strcmp(this->c_str(),s.c_str())==0);}
+   bool operator==(const char* s) const {return (std::strcmp(this->c_str(),s)==0);}
+   bool operator!=(const ossimHexString& s) const {return (std::strcmp(this->c_str(),s.c_str())!=0);}
+   bool operator!=(const char* s) const {return (std::strcmp(this->c_str(),s)!=0);}
+   operator const char*()const{return c_str();}
+   const char* chars()const{return c_str();}
+   char& operator[](int i)
+      {
+         return *( const_cast<char*>(c_str())+i);
+      }
+   const char& operator[](int i)const
+      {
+         return *(c_str()+i);
+      }
+   const ossimHexString& operator =(ossim_int16 value)
+      {
+         assign(value);
+         return *this;
+      }
+   const ossimHexString& operator =(ossim_int32 value)
+      {
+         assign(value);
+         return *this;
+      }
+   const ossimHexString& operator =(ossim_uint16 value)
+      {
+         assign(value);
+         return *this;
+      }
+   const ossimHexString& operator =(ossim_uint32 value)
+      {
+         assign(value);
+         return *this;
+      }
+   const ossimHexString& operator =(ossim_int8 value)
+      {
+         assign(value);
+         return *this;
+      }
+   const ossimHexString& operator =(ossim_uint8 value)
+      {
+         assign(value);
+         return *this;
+      }
+   const ossimHexString& operator =(const ossim_int8* value)
+      {
+         ossimString::operator=(value);
+         return *this;
+      }
+   const ossimHexString& operator =(const ossimString& value)
+      {
+         ossimString::operator=(value);
+         return *this;
+      }
+
+   const ossimHexString& operator =(const ossimHexString& value)
+      {
+         ossimString::operator=(value);
+         return *this;
+      }
+
+   const ossimHexString& operator =(const std::string& value)
+      {
+         ossimString::operator=(value);
+         return *this;
+      }
+   
+   ossim_int32  toInt32()const;
+   ossim_int16  toInt16()const;
+   ossim_int8   toChar()const;
+   ossim_uint8  toUchar()const;
+   ossim_uint32 toUint32()const;
+   ossim_uint16 toUint16()const;
+
+   void assign(ossim_int16 value)
+      {
+         assign((ossim_uint16)value);
+      }
+   void assign(ossim_int32 value)
+      {
+         assign((ossim_uint32)value);
+      }
+   void assign(ossim_int8 value)
+      {
+         assign((ossim_uint8)value);
+      }
+   void assign(ossim_uint16 value);
+   void assign(ossim_uint32 value);
+   void assign(ossim_uint8  value);
+};
+
+#endif /* #ifndef ossimHexString_H */
diff --git a/include/ossim/base/ossimHistogram.h b/ossim/include/ossim/base/ossimHistogram.h
similarity index 100%
rename from include/ossim/base/ossimHistogram.h
rename to ossim/include/ossim/base/ossimHistogram.h
diff --git a/ossim/include/ossim/base/ossimHistogramSource.h b/ossim/include/ossim/base/ossimHistogramSource.h
new file mode 100644
index 0000000..c5acc45
--- /dev/null
+++ b/ossim/include/ossim/base/ossimHistogramSource.h
@@ -0,0 +1,58 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimHistogramSource.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimHistogramSource_HEADER
+#define ossimHistogramSource_HEADER
+
+#include <ossim/base/ossimSource.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimMultiResLevelHistogram.h>
+
+class OSSIM_DLL ossimHistogramSource : public ossimSource
+{
+public:
+   
+   virtual ~ossimHistogramSource();
+   
+   virtual ossimRefPtr<ossimMultiResLevelHistogram> getHistogram();
+   
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+protected:
+   ossimHistogramSource(ossimObject* owner=NULL,
+                        ossim_uint32 numberOfInputs=0,
+                        ossim_uint32 numberOfOutputs=0,
+                        bool inputListFixedFlag=true,
+                        bool outputListFixedFlag=true);
+   
+   ossimRefPtr<ossimMultiResLevelHistogram> theHistogram;
+   
+   /*!
+    * if the filename is not "" then it will use
+    * this to store the histogram outside the keywordlist.
+    *
+    * it will set the filename keyword to the filename and
+    * during a save state will save it out to the file
+    * instead of inline to the keyword list.
+    */
+   ossimFilename                theFilename;
+   
+private:
+   /** Hidden from use copy constructor. */
+   ossimHistogramSource(const ossimHistogramSource&);
+
+TYPE_DATA
+};
+
+#endif /* End of "#ifndef ossimHistogramSource_HEADER" */
+
diff --git a/include/ossim/base/ossimHsiVector.h b/ossim/include/ossim/base/ossimHsiVector.h
similarity index 100%
rename from include/ossim/base/ossimHsiVector.h
rename to ossim/include/ossim/base/ossimHsiVector.h
diff --git a/include/ossim/base/ossimHsvVector.h b/ossim/include/ossim/base/ossimHsvVector.h
similarity index 100%
rename from include/ossim/base/ossimHsvVector.h
rename to ossim/include/ossim/base/ossimHsvVector.h
diff --git a/include/ossim/base/ossimHttpRequest.h b/ossim/include/ossim/base/ossimHttpRequest.h
similarity index 100%
rename from include/ossim/base/ossimHttpRequest.h
rename to ossim/include/ossim/base/ossimHttpRequest.h
diff --git a/include/ossim/base/ossimHttpResponse.h b/ossim/include/ossim/base/ossimHttpResponse.h
similarity index 100%
rename from include/ossim/base/ossimHttpResponse.h
rename to ossim/include/ossim/base/ossimHttpResponse.h
diff --git a/include/ossim/base/ossimId.h b/ossim/include/ossim/base/ossimId.h
similarity index 100%
rename from include/ossim/base/ossimId.h
rename to ossim/include/ossim/base/ossimId.h
diff --git a/include/ossim/base/ossimIdManager.h b/ossim/include/ossim/base/ossimIdManager.h
similarity index 100%
rename from include/ossim/base/ossimIdManager.h
rename to ossim/include/ossim/base/ossimIdManager.h
diff --git a/include/ossim/base/ossimImageAoiListener.h b/ossim/include/ossim/base/ossimImageAoiListener.h
similarity index 100%
rename from include/ossim/base/ossimImageAoiListener.h
rename to ossim/include/ossim/base/ossimImageAoiListener.h
diff --git a/include/ossim/base/ossimImageGeometryEvent.h b/ossim/include/ossim/base/ossimImageGeometryEvent.h
similarity index 100%
rename from include/ossim/base/ossimImageGeometryEvent.h
rename to ossim/include/ossim/base/ossimImageGeometryEvent.h
diff --git a/include/ossim/base/ossimImageGeometryEventListener.h b/ossim/include/ossim/base/ossimImageGeometryEventListener.h
similarity index 100%
rename from include/ossim/base/ossimImageGeometryEventListener.h
rename to ossim/include/ossim/base/ossimImageGeometryEventListener.h
diff --git a/include/ossim/base/ossimImagePolygonEvent.h b/ossim/include/ossim/base/ossimImagePolygonEvent.h
similarity index 100%
rename from include/ossim/base/ossimImagePolygonEvent.h
rename to ossim/include/ossim/base/ossimImagePolygonEvent.h
diff --git a/include/ossim/base/ossimImageRectangleEvent.h b/ossim/include/ossim/base/ossimImageRectangleEvent.h
similarity index 100%
rename from include/ossim/base/ossimImageRectangleEvent.h
rename to ossim/include/ossim/base/ossimImageRectangleEvent.h
diff --git a/include/ossim/base/ossimImageTypeLut.h b/ossim/include/ossim/base/ossimImageTypeLut.h
similarity index 100%
rename from include/ossim/base/ossimImageTypeLut.h
rename to ossim/include/ossim/base/ossimImageTypeLut.h
diff --git a/include/ossim/base/ossimInterleaveTypeLut.h b/ossim/include/ossim/base/ossimInterleaveTypeLut.h
similarity index 100%
rename from include/ossim/base/ossimInterleaveTypeLut.h
rename to ossim/include/ossim/base/ossimInterleaveTypeLut.h
diff --git a/ossim/include/ossim/base/ossimIoStream.h b/ossim/include/ossim/base/ossimIoStream.h
new file mode 100644
index 0000000..e2d728f
--- /dev/null
+++ b/ossim/include/ossim/base/ossimIoStream.h
@@ -0,0 +1,236 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+// Description:
+// 
+// Class declarations for:
+//
+// ossimIStream
+// ossimOStream
+// ossimIOStream
+// ossimIOMemoryStream
+// ossimIMemoryStream
+// ossimOMemoryStream
+// ossimIOFStream
+// ossimIFStream
+// ossimOFStream
+//
+//*******************************************************************
+//  $Id: ossimIoStream.h 22475 2013-11-07 13:28:51Z gpotts $
+#ifndef ossimIoStream_HEADER
+#define ossimIoStream_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimStreamBase.h>
+#include <iostream>
+#include <fstream>
+#include <sstream>
+#include <ossim/base/ossimString.h>
+
+
+class OSSIM_DLL ossimIStream : public ossimStreamBase, public std::basic_istream<char>   
+{
+public:
+   //ossimIStream();
+   ossimIStream(std::streambuf* sb);
+   virtual ~ossimIStream();
+};
+
+
+class OSSIM_DLL ossimOStream : public ossimStreamBase, public std::basic_ostream<char>
+{
+public:
+   //ossimOStream();
+   ossimOStream(std::streambuf* sb);   
+   virtual ~ossimOStream();
+};
+
+class OSSIM_DLL ossimIOStream : public ossimStreamBase, public std::basic_iostream<char>
+{
+public:
+   //ossimIOStream();
+   ossimIOStream(std::streambuf* sb);   
+   virtual ~ossimIOStream();
+};
+
+class OSSIM_DLL ossimIOMemoryStream : public ossimIOStream
+{
+public:
+   ossimIOMemoryStream();
+
+   virtual ~ossimIOMemoryStream();
+
+   // ??? (drb)
+   bool is_open()const;
+
+   // ??? (drb)
+   virtual void open(const char* /* protocolString */,
+                     int /* openMode */);
+
+   ossimString str();
+
+   // ??? (drb)
+   virtual void close();
+
+   // ??? (drb) std::streamsize
+   ossim_uint64 size()const;
+
+protected:
+   std::stringbuf theBuf;
+};
+
+class OSSIM_DLL ossimIMemoryStream : public ossimIStream
+{
+public:
+   
+   ossimIMemoryStream(const ossimString& inputBuf);
+   
+   virtual ~ossimIMemoryStream();
+   
+   bool is_open()const;
+   
+   ossim_uint64 size()const;
+   
+   virtual void open(const char* /* protocolString */,
+                     int /* openMode */ );
+
+   virtual void close();
+   
+   ossimString str();
+
+protected:
+   std::stringbuf theBuf;
+   
+};
+
+class OSSIM_DLL ossimOMemoryStream : public ossimOStream
+{
+public:
+   ossimOMemoryStream();
+   virtual ~ossimOMemoryStream();   
+
+   bool is_open()const;
+
+   ossim_uint64 size()const;
+
+   virtual void open(const char* /* protocolString */,
+                     int /* openMode */ );
+
+   virtual void close();
+
+   ossimString str();
+
+protected:
+   std::stringbuf theBuf;
+};
+
+class OSSIM_DLL ossimIOFStream : public ossimStreamBase, public std::basic_fstream<char>
+{
+public:
+   ossimIOFStream();
+
+   ossimIOFStream(const char* name,
+                  std::ios_base::openmode mode =
+                  std::ios_base::in | std::ios_base::out);
+
+   virtual ~ossimIOFStream();
+};
+
+class OSSIM_DLL ossimIFStream : public ossimStreamBase, public std::basic_ifstream<char>
+{
+public:
+   ossimIFStream();
+   
+   ossimIFStream(const char* file,
+                 std::ios_base::openmode mode = std::ios_base::in);
+
+   virtual ~ossimIFStream();
+
+};
+
+class OSSIM_DLL ossimOFStream : public ossimStreamBase, public std::basic_ofstream<char>
+{
+public:
+   ossimOFStream();
+
+   ossimOFStream(const char* name,
+                 std::ios_base::openmode mode =
+                 std::ios_base::out|std::ios_base::trunc);
+
+   virtual ~ossimOFStream();
+
+};
+
+
+#ifdef _MSC_VER
+
+class ossimIFStream64 : public std::basic_ifstream<char>
+{
+public:
+   ossimIFStream64(const char* pFilename, 
+      std::ios_base::openmode mode = ios_base::in, 
+      int prot = ios_base::_Openprot);
+
+   virtual ~ossimIFStream64();
+   void seekg64(off_type off, ios_base::seekdir way);
+
+   void seekg64(streampos pos, ios_base::seekdir way);
+
+   static void seekg64(std::istream& str, off_type off, ios_base::seekdir way);
+ 
+   static void seekg64(std::istream& str, std::streampos pos, ios_base::seekdir way);
+private:
+   FILE* theFile;
+};
+
+class ossimOFStream64 : public std::basic_ofstream<char>
+{
+public:
+   ossimOFStream64(const char* pFilename, 
+                   std::ios_base::openmode mode = ios_base::out, 
+                   int prot = ios_base::_Openprot);
+   virtual ~ossimOFStream64();
+
+   ossim_uint64 tellp64();
+};
+
+#else
+
+class ossimIFStream64 : public std::basic_ifstream<char>
+{
+public:
+   ossimIFStream64(const char* pFilename, std::ios_base::openmode mode = ios_base::in, long prot = 0666);
+
+   virtual ~ossimIFStream64();
+
+   void seekg64(off_type off, ios_base::seekdir way);
+
+   static void seekg64(std::istream& str, off_type off, ios_base::seekdir way);
+};
+
+class ossimOFStream64 : public std::basic_ofstream<char>
+{
+public:
+   ossimOFStream64(const char* pFilename, std::ios_base::openmode mode = ios_base::out, long prot = 0666);
+
+   virtual ~ossimOFStream64();
+
+   ossim_uint64 tellp64();
+};
+
+#endif // _MSC_VER
+
+OSSIM_DLL void operator >> (ossimIStream& in,ossimOStream& out);
+OSSIM_DLL ossimIOStream& operator >> (ossimIStream& in,ossimIOStream& out);
+OSSIM_DLL void operator >> (ossimIOStream& in,ossimOStream& out);
+OSSIM_DLL ossimIOStream& operator >> (ossimIOStream& in,ossimIOStream& out);
+OSSIM_DLL void operator << (ossimOStream& out, ossimIStream& in);
+OSSIM_DLL void operator << (ossimOStream& out, ossimIOStream& in);
+OSSIM_DLL ossimIOStream& operator << (ossimIOStream& out, ossimIStream& in);
+OSSIM_DLL ossimIOStream& operator << (ossimIOStream& out, ossimIOStream& in);
+
+
+#endif
diff --git a/include/ossim/base/ossimIpt.h b/ossim/include/ossim/base/ossimIpt.h
similarity index 100%
rename from include/ossim/base/ossimIpt.h
rename to ossim/include/ossim/base/ossimIpt.h
diff --git a/include/ossim/base/ossimIrect.h b/ossim/include/ossim/base/ossimIrect.h
similarity index 100%
rename from include/ossim/base/ossimIrect.h
rename to ossim/include/ossim/base/ossimIrect.h
diff --git a/include/ossim/base/ossimJpegYCbCrVector.h b/ossim/include/ossim/base/ossimJpegYCbCrVector.h
similarity index 100%
rename from include/ossim/base/ossimJpegYCbCrVector.h
rename to ossim/include/ossim/base/ossimJpegYCbCrVector.h
diff --git a/include/ossim/base/ossimKeyword.h b/ossim/include/ossim/base/ossimKeyword.h
similarity index 100%
rename from include/ossim/base/ossimKeyword.h
rename to ossim/include/ossim/base/ossimKeyword.h
diff --git a/ossim/include/ossim/base/ossimKeywordNames.h b/ossim/include/ossim/base/ossimKeywordNames.h
new file mode 100644
index 0000000..6c09a4d
--- /dev/null
+++ b/ossim/include/ossim/base/ossimKeywordNames.h
@@ -0,0 +1,209 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License:  See top level LICENSE.txt file
+//
+// Author: Ken Melero (kmelero at remotesensing.org)
+//
+// Description: Common file for global Keywors.
+//
+//*************************************************************************
+// $Id: ossimKeywordNames.h 23626 2015-11-18 14:04:24Z gpotts $
+
+#ifndef ossimKeywordNames_HEADER
+#define ossimKeywordNames_HEADER
+
+#include <ossim/base/ossimConstants.h>
+
+class OSSIMDLLEXPORT ossimKeywordNames
+{
+public:
+   //***
+   // NOTE:  List keyword in alphabetical order.
+   //***
+   static const char* AZIMUTH_ANGLE_KW;
+   static const char* BAND_KW;
+   static const char* BANDS_KW;
+   static const char* BORDER_SIZE_KW;
+   static const char* BRUSH_COLOR_KW;
+   static const char* BYTE_ORDER_KW;
+   static const char* CE90_ABSOLUTE_KW;
+   static const char* CE90_RELATIVE_KW;
+   static const char* CENTER_PIXEL_X_KW;
+   static const char* CENTER_PIXEL_Y_KW;
+   static const char* CENTRAL_MERIDIAN_KW;
+   static const char* CENTRAL_POINT1_LAT_KW;
+   static const char* CENTRAL_POINT1_LON_KW;
+   static const char* CENTRAL_POINT2_LAT_KW;
+   static const char* CENTRAL_POINT2_LON_KW;
+   static const char* COMPRESS_KW;
+   static const char* COMPRESSION_QUALITY_KW;
+   static const char* COMPRESSION_TYPE_KW;
+   static const char* CONVERGENCE_THRESHOLD_KW;
+   static const char* CREATE_EX_KW;
+   static const char* CREATE_EXTERNAL_GEOMETRY_KW;
+   static const char* CREATE_IMAGE_KW;
+   static const char* CREATE_HISTOGRAM_KW;   
+   static const char* CREATE_OVERVIEW_KW;
+   static const char* DATA_FILE_KW;
+   static const char* DATE_KW;
+   static const char* DATE_YEAR_KW;
+   static const char* DATE_MONTH_KW;
+   static const char* DATE_DAY_KW;
+   static const char* DATE_HOUR_KW;
+   static const char* DATE_MIN_KW;
+   static const char* DATE_SEC_KW;
+   static const char* DATE_FRACT_SEC_KW;
+   static const char* DATUM_KW;
+   static const char* DECIMAL_DEGREES_PER_PIXEL_LAT;
+   static const char* DECIMAL_DEGREES_PER_PIXEL_LON;
+   static const char* DESCRIPTION_KW;
+   static const char* ELEVATION_ANGLE_KW;
+   static const char* ELEVATION_CELL_KW;
+   static const char* ELEVATION_SOURCE_KW;
+   static const char* ELEVATION_LOOKUP_FLAG_KW;
+   static const char* ELLIPSE_CODE_KW;
+   static const char* ELLIPSE_EPSG_CODE_KW;
+   static const char* ELLIPSE_NAME_KW;
+   static const char* ENABLED_KW;
+   static const char* ENABLE_CACHE_KW;
+   static const char* EXTRACT_VERTICES_KW;  
+   static const char* ENTRY_KW;
+   static const char* FALSE_EASTING_NORTHING_KW;
+   static const char* FALSE_EASTING_NORTHING_UNITS_KW;
+   static const char* FALSE_EASTING_KW;
+   static const char* FALSE_NORTHING_KW;
+   static const char* FEATURE_NAME_KW;
+   static const char* FILENAME_KW;
+   static const char* FILEPATH_KW;
+   static const char* FILL_FLAG_KW;
+   static const char* FRAME_INDEX_KW;       
+   static const char* GCS_CODE_KW;
+   static const char* GEOM_FILE_KW;
+   static const char* HEMISPHERE_KW;
+   static const char* HORIZONTAL_SIZE_KW;
+   static const char* ID_KW;
+   static const char* IMAGE_CE90_KW;
+   static const char* IMAGE_FILE_KW;
+   static const char* IMAGE_ID_KW;
+   static const char* IMAGE_MODEL_TRANSFORM_MATRIX_KW;
+   static const char* IMAGE_MODEL_TRANSFORM_UNIT_KW;
+   static const char* IMAGE_PATH_KW;
+   static const char* IMAGE_TYPE_KW;
+   static const char* IMAGE_DATE_KW;
+   static const char* IMAGE_FILE_SIZE_KW;
+   static const char* INPUT_RR_LEVEL_KW;
+   static const char* INTERLEAVE_TYPE_KW;
+   static const char* JULIAN_DAY_KW;
+   static const char* LAT_INCREMENT_KW;
+   static const char* LL_LAT_KW;
+   static const char* LL_LON_KW;
+   static const char* LR_LAT_KW;
+   static const char* LR_LON_KW;
+   static const char* LL_X_KW;
+   static const char* LL_Y_KW;
+   static const char* LR_X_KW;
+   static const char* LR_Y_KW;
+   static const char* LON_INCREMENT_KW;
+   static const char* MAJOR_AXIS_KW;
+   static const char* MAX_VALUE_KW;
+   static const char* MAX_ITERATIONS_KW;
+   static const char* MAX_QUADTREE_LEVELS_KW;
+   static const char* METADATA_TYPE_KW;
+   static const char* METERS_PER_PIXEL_KW;
+   static const char* METERS_PER_PIXEL_X_KW;
+   static const char* METERS_PER_PIXEL_Y_KW;
+   static const char* MINOR_AXIS_KW;
+   static const char* MIN_VALUE_KW;
+   static const char* NULL_VALUE_KW;
+   static const char* NUMBER_BANDS_KW;
+   static const char* NUMBER_ENTRIES_KW;
+   static const char* NUMBER_INPUT_BANDS_KW;
+   static const char* NUMBER_INPUTS_KW;
+   static const char* NUMBER_OUTPUTS_KW;
+   static const char* NUMBER_OUTPUT_BANDS_KW;
+   static const char* NUMBER_LINES_KW;
+   static const char* NUMBER_REDUCED_RES_SETS_KW;
+   static const char* NUMBER_SAMPLES_KW;
+   static const char* ORIGIN_LATITUDE_KW;
+   static const char* ORIGIN_X_KW;
+   static const char* ORIGIN_Y_KW;
+   static const char* ORIGINAL_MAP_UNITS_KW;
+   static const char* OUTPUT_FILE_KW;
+   static const char* OUTPUT_FILE_PREFIX_KW;
+   static const char* OUTPUT_FILE_EXTENSION_KW;
+   static const char* OUTPUT_TILE_SIZE_KW;
+   static const char* OVERVIEW_COMPRESSION_QUALITY_KW;
+   static const char* OVERVIEW_COMPRESSION_TYPE_KW;
+   static const char* OVERVIEW_FILE_KW;
+   static const char* OVERVIEW_STOP_DIMENSION_KW;
+   static const char* PCS_CODE_KW;
+   static const char* PEN_COLOR_KW;
+   static const char* PHOTOMETRIC_KW;
+   static const char* PIXEL_SCALE_XY_KW;
+   // static const char* PIXEL_SCALE_Y_KW;
+   static const char* PIXEL_SCALE_UNITS_KW;
+   static const char* PIXEL_TYPE_KW;
+   static const char* PLANAR_CONFIG_KW;
+   static const char* POINT_WIDTH_HEIGHT_KW;
+   static const char* PROJECTION_KW;
+   static const char* QUALITY_KW;
+   static const char* QUERY_KW;
+   static const char* RADIOMETRY_KW;
+   static const char* REDUCED_RES_LEVEL_KW;
+   static const char* REF_GPT_LAT_KW;
+   static const char* REF_GPT_LON_KW;
+   static const char* REF_GPT_HGT_KW;
+   static const char* REF_IPT_LINE_KW;
+   static const char* REF_IPT_SAMP_KW;
+   static const char* ROTATION_KW;
+   static const char* SCALAR_TYPE_KW;
+   static const char* SCALE_PER_PIXEL_X_KW;
+   static const char* SCALE_PER_PIXEL_Y_KW;
+   static const char* SCALE_FACTOR_KW;
+   static const char* SCALE_X_KW;
+   static const char* SCALE_Y_KW;
+   static const char* SCALE_FACTOR_X_KW;
+   static const char* SCALE_FACTOR_Y_KW;
+   static const char* SENSOR_ID_KW;
+   static const char* SRS_NAME_KW;
+   static const char* STD_PARALLEL_1_KW;
+   static const char* STD_PARALLEL_2_KW;
+   static const char* THICKNESS_KW;
+   static const char* THREADS_KW;
+   static const char* TIE_POINT_EASTING_KW;
+   static const char* TIE_POINT_NORTHING_KW;
+   static const char* TIE_POINT_XY_KW;
+   // static const char* TIE_POINT_Y_KW;
+   static const char* TIE_POINT_UNITS_KW;
+   
+   static const char* TIE_POINT_LAT_KW;
+   static const char* TIE_POINT_LON_KW;
+   static const char* TILE_SOURCE_KW;
+   static const char* TILE_TYPE_KW;
+   static const char* TILE_SIZE_X_KW;
+   static const char* TILE_SIZE_Y_KW;
+   static const char* TRANSLATION_X_KW;
+   static const char* TRANSLATION_Y_KW;
+   static const char* TYPE_KW;
+   static const char* UL_LAT_KW;
+   static const char* UL_LON_KW;
+   static const char* UNITS_KW;
+  
+   static const char* UR_LAT_KW;
+   static const char* UR_LON_KW;
+   static const char* UL_X_KW;
+   static const char* UL_Y_KW;
+   static const char* UR_X_KW;
+   static const char* UR_Y_KW;
+   static const char* VALID_VERTICES_KW;
+   static const char* VERTICAL_SIZE_KW;
+   static const char* ZONE_KW;
+
+protected:
+   ossimKeywordNames();
+   ossimKeywordNames(const ossimKeywordNames& rhs);
+   const ossimKeywordNames& operator =(const ossimKeywordNames &rhs);
+};
+
+#endif
diff --git a/ossim/include/ossim/base/ossimKeywordlist.h b/ossim/include/ossim/base/ossimKeywordlist.h
new file mode 100644
index 0000000..a1ed2a8
--- /dev/null
+++ b/ossim/include/ossim/base/ossimKeywordlist.h
@@ -0,0 +1,529 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Ken Melero
+// 
+// Description: This class provides capabilities for keywordlists.
+//
+//********************************************************************
+// $Id: ossimKeywordlist.h 22516 2013-12-14 17:19:47Z dburken $
+
+#ifndef ossimKeywordlist_HEADER
+#define ossimKeywordlist_HEADER 1
+
+#include <ossim/base/ossimErrorStatusInterface.h>
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimErrorCodes.h>
+#include <ossim/base/ossimString.h>
+#include <iosfwd>
+#include <map>
+#include <vector>
+#include <algorithm>
+
+static const char DEFAULT_DELIMITER = ':';
+
+class ossimFilename;
+
+
+class OSSIM_DLL ossimKeywordlist : public ossimErrorStatusInterface,
+   public ossimReferenced
+{
+public:
+
+   typedef std::map<std::string, std::string> KeywordMap;
+
+   ossimKeywordlist(const ossimKeywordlist& src);
+   ossimKeywordlist(const std::map<std::string, std::string>& keywordMap);
+   ossimKeywordlist(char delimiter = DEFAULT_DELIMITER,
+                    bool expandEnvVars = false);
+
+   ossimKeywordlist(const char* file,
+                    char        delimiter = DEFAULT_DELIMITER,
+                    bool        ignoreBinaryChars = false,
+                    bool        expandEnvVars = false );
+
+   ossimKeywordlist(const ossimFilename& fileName,
+                    char                 delimiter = DEFAULT_DELIMITER,
+                    bool                 ignoreBinaryChars = false,
+                    bool                 expandEnvVars = false);
+
+   ~ossimKeywordlist();
+
+   static const std::string NULL_KW;
+
+   /*!
+    *  Reads file and adds keywords to the KeywordMap.
+    *  Returns true if file was parsed, false on error.
+    */
+   bool addFile(const char* file);
+
+   /*!
+    *  Reads file and adds keywords to the KeywordMap.
+    *  Returns true if file was parsed, false on error.
+    */
+   bool addFile(const ossimFilename& file); 
+
+   /*!
+    *  Method to change default delimiter.  Handy when parsing
+    *  files similar to a ossimKeywordlist.  (DEFAULT = ':')
+    */
+   void change_delimiter(char del);
+
+   ossimString delimiter_str() const;
+
+   /*!
+    * If set to true, then strings found having the format
+    * "$(env_var_name)" are expanded in place.
+    */
+   void setExpandEnvVarsFlag( bool flag );
+   /*!
+    * Returns the flag that determines whether or not
+    * environment variables are expanded.
+    */
+   bool getExpandEnvVarsFlag( void ) const;
+
+   void add(const char* prefix,
+            const ossimKeywordlist& kwl,
+            bool overwrite=true);
+
+   /**
+    * This is a generic find method that takes a comparator type and iterates through 
+    * the map executing the overloaded operator ().
+    * Typical code example format
+    <pre>
+    typedef std::unary_function<std::pair<ossimString, ossimString>, bool> KwlCompareFunctionType;
+    
+    class KwlKeyCaseInsensitiveEquals : public KwlCompareFunctionType
+    {
+    public:
+       KwlKeyCaseInsensitiveEquals(const ossimString& key):m_key(key){}
+       virtual bool operator()(const KwlComparePairType& rhs)const
+       {
+          return (m_key == rhs.first.downcase());
+       }
+       ossimString m_key;
+    };
+
+    // now for use case example:
+    kwl.findValue(value, KwlKeyCaseInsensitiveEquals("foo"));
+    </pre>
+    
+    This example shows how to supplly your own comparator and do a case insensitive
+    search for the key foo and the value is set to the variable value.
+    *
+    */
+   template<class CompareType>
+   bool findValue(ossimString& value, const CompareType& compare)const
+   {
+      KeywordMap::const_iterator iter = std::find_if(m_map.begin(), m_map.end(), compare);
+      bool result = (iter != m_map.end());
+      if(result) value = iter->second;
+      return result;
+   }
+   
+   std::string& operator[](const std::string& key)
+   {
+      return m_map[key];
+   }
+   std::string operator[](const std::string& key)const
+   {
+      ossimString result = find(key.c_str());
+      
+      return result.c_str();
+   }
+
+   // Methods to add keywords to list.
+   void addPair(const std::string& key,
+                const std::string& value,
+                bool               overwrite = true);
+
+   void addPair(const std::string& prefix,
+                const std::string& key,
+                const std::string& value,
+                bool               overwrite = true);
+   
+   /*!
+    * Allows you to extract out a sub keywordlist from another
+    * you can also collapse the hieracrchy by setting
+    * strip prefix to true.
+    */
+   void add(const ossimKeywordlist& kwl,
+            const char* prefix=0,
+            bool stripPrefix=true);
+  
+   void add(const char*   key,
+            const char*   value,
+            bool          overwrite = true);
+
+   void add(const char*   prefix,
+            const char*   key,
+            const char*   value,
+            bool          overwrite = true);
+
+   void add(const char*   key,
+            char          value,
+            bool          overwrite = true);
+
+   void add(const char*   prefix,
+            const char*   key,
+            char          value,
+            bool          overwrite = true);
+
+   void add(const char*   key,
+            ossim_int16   value,
+            bool          overwrite = true);
+
+   void add(const char*   prefix,
+            const char*   key,
+            ossim_int16   value,
+            bool          overwrite = true);
+
+   void add(const char*   key,
+            ossim_uint16  value,
+            bool          overwrite = true);
+
+   void add(const char*   prefix,
+            const char*   key,
+            ossim_uint16  value,
+            bool          overwrite = true);
+
+   void add(const char*   key,
+            ossim_int32   value,
+            bool          overwrite = true);
+
+   void add(const char*   prefix,
+            const char*   key,
+            ossim_int32   value,
+            bool          overwrite = true);
+
+   void add(const char*   key,
+            ossim_uint32  value,
+            bool          overwrite = true);
+
+   void add(const char*   prefix,
+            const char*   key,
+            ossim_uint32  value,
+            bool          overwrite = true);
+
+   void add(const char*   key,
+            ossim_int64   value,
+            bool          overwrite = true);
+
+   void add(const char*   prefix,
+            const char*   key,
+            ossim_int64   value,
+            bool          overwrite = true);
+
+   void add(const char*   key,
+            ossim_uint64  value,
+            bool          overwrite = true);
+
+   void add(const char*   prefix,
+            const char*   key,
+            ossim_uint64  value,
+            bool          overwrite = true);
+
+   /**
+    * @param key Key for key-value pair.
+    *
+    * @param value Value to pair with key.  Note this will be stored as a
+    * string.
+    * 
+    * @param precision Decimal point precision of the output. (default = 8)
+    *
+    * @param trimZeroFlag If true trailing '0's and any trailing '.' will
+    * be trimmed from the converted string.  (default = false)
+    *
+    * @param scientific If true output will be in scientific notation else
+    * fixed is used. (default = false)
+    */
+   void add(const char*   key,
+            ossim_float32 value,
+            bool          overwrite    = true,
+            int           precision    = 8);
+
+   /**
+    * @param key Key for key-value pair.
+    *
+    * @param value Value to pair with key.  Note this will be stored as a
+    * string.
+    * 
+    * @param precision Decimal point precision of the output. (default = 8)
+    *
+    * @param trimZeroFlag If true trailing '0's and any trailing '.' will
+    * be trimmed from the converted string.  (default = false)
+    *
+    * @param scientific If true output will be in scientific notation else
+    * fixed is used. (default = false)
+    */
+   void add(const char*   prefix,
+            const char*   key,
+            ossim_float32 value,
+            bool          overwrite    = true,
+            int           precision    = 8);
+
+   /**
+    * @param key Key for key-value pair.
+    *
+    * @param value Value to pair with key.  Note this will be stored as a
+    * string.
+    * 
+    * @param precision Decimal point precision of the output. (default = 15)
+    *
+    * @param trimZeroFlag If true trailing '0's and any trailing '.' will
+    * be trimmed from the converted string.  (default = false)
+    *
+    * @param scientific If true output will be in scientific notation else
+    * fixed is used. (default = false)
+    */
+   void add(const char*   key,
+            ossim_float64 value,
+            bool          overwrite    = true,
+            int           precision    = 15);
+
+   /**
+    * @param key Key for key-value pair.
+    *
+    * @param value Value to pair with key.  Note this will be stored as a
+    * string.
+    * 
+    * @param precision Decimal point precision of the output. (default = 15)
+    *
+    * @param trimZeroFlag If true trailing '0's and any trailing '.' will
+    * be trimmed from the converted string.  (default = false)
+    *
+    * @param scientific If true output will be in scientific notation else
+    * fixed is used. (default = false)
+    */
+   void add(const char*   prefix,
+            const char*   key,
+            ossim_float64 value,
+            bool          overwrite    = true,
+            int           precision    = 15);
+
+   /**
+    * @brief Checks for key in map.
+    *
+    * Note that "find" and findKey will alway return an empty string even if
+    * the key in not in the map.
+    *
+    * @return true if key is in map even if value is empty; false, if not.
+    */
+   bool hasKey( const std::string& key ) const;
+   
+   /**
+    *  @brief Find methods that take std::string(s).
+    *  Searches the map for key(/prefix) and returns the resulting value
+    *  or an empty string if the key was not found.
+    *  @param key e.g. "number_line"
+    *  @param prefix e..g "image0."
+    *  @return Reference to string.  This will be emptry if not found or
+    *  if value is empty.
+    */
+   const std::string& findKey(const std::string& key) const;
+   const std::string& findKey(const std::string& prefix,
+                              const std::string& key) const;
+   
+   const char* find(const char* key) const;
+   const char* find(const char* prefix,
+                    const char* key) const;
+
+   void remove(const char * key);
+   void remove(const char* prefix, const char * key);
+
+   /*!
+    *  Searches the map for the number of keys containing the string.
+    */
+   ossim_uint32 numberOf(const char* str) const;
+
+   /*!
+    *  Searches the map for the number of keys containing the prefix+key.
+    *  
+    *  Given the keyword list contains:
+    *
+    *  source.type1: foo
+    *  source.type2: you
+    *
+    *  This:
+    *
+    *  int number_of_sources = numberOf("source", "type");
+    *
+    *  number_of_sources equals 2
+    */
+   ossim_uint32 numberOf(const char* prefix, const char* key) const;
+
+   /**
+    * Methods to dump the ossimKeywordlist to a file on disk.
+    *
+    * @param file Name of output file.
+    * @param comment Optional string that will be written to line 1
+    * as a C++-style comment. A "//" is prepended to the input string.
+    *
+    * @return true on success, false on error.
+    */
+   virtual bool write(const char* file, const char* comment = 0) const;
+
+   virtual ossimString toString()const;
+   virtual void toString(ossimString& result)const;
+
+   virtual void writeToStream(std::ostream &out)const;
+
+   virtual std::ostream& print(std::ostream& os) const;
+   OSSIMDLLEXPORT friend std::ostream& operator<<(std::ostream& os,
+                                                  const ossimKeywordlist& kwl);
+   bool operator ==(ossimKeywordlist& kwl)const;
+
+    /*!
+     * Clear all contents out of the ossimKeywordlist.
+     */
+
+    void clear();
+
+    /*!
+     * Add contents of another keyword list to this one.
+     *
+     * @param src the keyword list to copy items from.
+     * @param overwrite true if keys existing in this and src should have
+     * their value overwritten by the src value, otherwise false to preserve
+     * the original value.  Defaults to true.
+     */
+
+   void addList( const ossimKeywordlist &src, bool overwrite = true );
+
+   /** deprecated method */
+   virtual bool parseStream(std::istream& is,
+                            bool ignoreBinaryChars);
+   
+   virtual bool parseStream(std::istream& is);
+   virtual bool parseString(const std::string& inString);
+
+   /*!
+    *  Will return a list of keys that contain the string passed in.
+    *  Later we will need to allow a user to specify regular expresion
+    *  searches.
+    */
+   std::vector<ossimString> findAllKeysThatContains(
+      const ossimString &searchString)const;
+
+   /**
+    * @brief Finds keys that match regular expression.
+    *
+    * Note: This does not clear vector passed to it.
+    *
+    * @param result Initialized by this.
+    * @param regularExpression e.g. "image[0-9]*\\.file"
+    */
+   void findAllKeysThatMatch( std::vector<ossimString>& result,
+                              const ossimString &regularExpression ) const;
+
+   /**
+    * @brief Gets number keys that match regular expression.
+    * @param regularExpression e.g. "image[0-9]*\\.file"
+    * @return Number of keys matching regular expression.
+    */
+   ossim_uint32 getNumberOfKeysThatMatch(
+      const ossimString &regularExpression ) const;
+
+   void extractKeysThatMatch(ossimKeywordlist& kwl,
+                             const ossimString &regularExpression)const;
+
+   void removeKeysThatMatch(const ossimString &regularExpression);
+
+   /*!
+    * Will return only the portion of the key that
+    * matches the regular expression.
+    *
+    * example:
+    *
+    *  source1.source1.a:
+    *  source1.source2.a:
+    *  source1.source3.a:
+    *  source1.source4.a:
+    *  source1.source10.a:
+    *
+    *  kwl.getSubstringKeyList("source1.source[0-9]*\\.");
+    *
+    *  will return:
+    *
+    *  source1.source1.
+    *  source1.source2.
+    *  source1.source3.
+    *  source1.source4.
+    *  source1.source10.
+    *
+    */
+   std::vector<ossimString> getSubstringKeyList(const ossimString& regularExpression)const;
+   void getSubstringKeyList(std::vector<ossimString>& result,
+                            const ossimString& regularExpression)const;
+
+   ossim_uint32 getNumberOfSubstringKeys(
+      const ossimString& regularExpression)const;
+
+   void addPrefixToAll(const ossimString& prefix);
+   void addPrefixToKeysThatMatch(const ossimString& prefix,
+                                 const ossimString& regularExpression);
+   void stripPrefixFromAll(const ossimString& regularExpression);
+
+   /*!
+    * Returns the number of elements.
+    */
+   ossim_uint32 getSize()const;
+
+   const ossimKeywordlist::KeywordMap& getMap()const;
+   ossimKeywordlist::KeywordMap& getMap();
+   
+   ossimKeywordlist& downcaseKeywords();
+   ossimKeywordlist& upcaseKeywords();
+   
+   ossimKeywordlist& trimAllValues(const ossimString& valueToTrim= ossimString(" \t\n\r"));
+   ossimKeywordlist trimAllValues(const ossimString& valueToTrim= ossimString(" \t\n\r"))const;
+
+
+   //! [OLK, Aug/2008]
+   //! Sets the boolean  <rtn_val> depending on value associated with keyword for values = 
+   //! (yes|no|true|false|1|0). Returns TRUE if keyword found, otherwise false. Also returns false
+   //! if none of the above permitted values are specified (rtn_val left unchanged in this case).
+   bool getBoolKeywordValue(bool& rtn_val, 
+                            const char* keyword, 
+                            const char* prefix=0) const;
+
+protected:
+   enum KeywordlistParseState
+   {
+      KeywordlistParseState_OK         = 0,
+      KeywordlistParseState_FAIL       = 1, // just used to say this set of token has failed the rules
+      KeywordlistParseState_BAD_STREAM = 2, // Means an error occured that is a mal formed stream for Keywordlist
+   };
+   /*!
+    *  Method to parse files to initialize the list.  Method will error on
+    *  binary characters if "ignoreBinaryChars = false".  This is used by
+    *  ImageHandler factories that can be passed a binary file inadvertently
+    *  by a user.  The "ignoreBinaryChars" flag should be set to true if
+    *  a text file contains mixed ascii/binary values.
+    *  Returns true if file was parsed, false on error.
+    */
+   bool parseFile(const ossimFilename& file,
+                  bool  ignoreBinaryChars = false);
+
+   bool isValidKeywordlistCharacter(ossim_uint8 c)const;
+   void skipWhitespace(std::istream& in)const;
+   KeywordlistParseState readComments(ossimString& sequence, std::istream& in)const;
+   KeywordlistParseState readKey(ossimString& sequence, std::istream& in)const;
+   KeywordlistParseState readValue(ossimString& sequence, std::istream& in)const;
+   KeywordlistParseState readKeyAndValuePair(ossimString& key, ossimString& value, std::istream& in)const;
+   
+   // Method to see if keyword exists in list.
+   KeywordMap::iterator getMapEntry(const std::string& key);
+   KeywordMap::iterator getMapEntry(const ossimString& key);
+   KeywordMap::iterator getMapEntry(const char* key);
+
+   KeywordMap               m_map;
+   char                     m_delimiter;
+   bool                     m_preserveKeyValues; // enables preserving empty field values, multi lines, ... etc
+   bool                     m_expandEnvVars;
+};
+
+#endif /* #ifndef ossimKeywordlist_HEADER */
+
diff --git a/include/ossim/base/ossimLagrangeInterpolator.h b/ossim/include/ossim/base/ossimLagrangeInterpolator.h
similarity index 100%
rename from include/ossim/base/ossimLagrangeInterpolator.h
rename to ossim/include/ossim/base/ossimLagrangeInterpolator.h
diff --git a/include/ossim/base/ossimLeastSquaresBilin.h b/ossim/include/ossim/base/ossimLeastSquaresBilin.h
similarity index 100%
rename from include/ossim/base/ossimLeastSquaresBilin.h
rename to ossim/include/ossim/base/ossimLeastSquaresBilin.h
diff --git a/ossim/include/ossim/base/ossimLeastSquaresPlane.h b/ossim/include/ossim/base/ossimLeastSquaresPlane.h
new file mode 100644
index 0000000..903d902
--- /dev/null
+++ b/ossim/include/ossim/base/ossimLeastSquaresPlane.h
@@ -0,0 +1,121 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Garrett Potts (gpotts at imagelinks.com
+//
+// Description: Source code produced by Dave Knopp
+//
+//*******************************************************************
+//  $Id: ossimLeastSquaresPlane.h 23167 2015-02-24 22:07:14Z okramer $
+#ifndef    ossimLeastSquaresPlane_INCLUDE
+#define    ossimLeastSquaresPlane_INCLUDE
+#include <ossim/base/ossimConstants.h>
+#include <ossim/matrix/newmat.h>
+
+/** 
+ * @brief Provide 2D Least Squares Plane model fitting
+ * The math model is that of a plane of the form:
+ at code
+z(x,y) = ax + b*y + c
+ at endcode
+ * The getLSParms() method returns parameter values which are the least
+ * squares solution associated with the samples added via addSample(). Note
+ * that it is necessary to add at least three sample to obtain a solution.
+ */
+
+class OSSIMDLLEXPORT ossimLeastSquaresPlane
+{
+public:
+
+   ossimLeastSquaresPlane(const ossimLeastSquaresPlane &);
+   /** 
+    * Instantiate as zero surface.
+    */
+   ossimLeastSquaresPlane();
+   
+   ossimLeastSquaresPlane & operator = (const ossimLeastSquaresPlane &);
+   
+   /**
+    * Free internal storage.
+    */
+   virtual ~ossimLeastSquaresPlane();
+
+   /**
+    * Will clear everything and set it up to
+    * for another solve.  Just add points
+    * and call the solve method.
+    */
+   virtual void clear();
+
+   /**
+    * add a single data sample.
+    *
+    * @param x coordinate of sample location.
+    * @param y coordinate of sample location.
+    * @param zmea sample value measured at (x,y)
+    */
+   virtual void addSample(double x, double y, double z_mea);
+   
+   /**
+    * return LS solution parameters.
+    *
+    * @param pa set to x coefficient.
+    * @param pb set to y coefficient
+    * @param pc set to constant term
+    */
+   virtual bool getLSParms(double& pa, double& pb, double& pc) const;
+
+   /**
+    * @param pa set to x coefficient.
+    * @param pb set to y coefficient
+    * @param pc set to constant term
+    */
+   virtual void setLSParams(double pa, double pb, double pc);
+                           
+   /**
+    * interpolate LS-fit value at location (xx,yy) - returns z(xx,yy).
+    *
+    * @param xx "x" coordinate at which to interpolate.
+    * @param yy "y" "y" coordinate at which to interpolate.
+    * 
+    */
+   virtual inline double lsFitValue(double xx, double yy) const { return (m_a*xx + m_b*yy + m_c); }
+   
+   /**
+    * compute least squares parameter solution - true if succesfull.
+    */
+   bool solveLS();
+   
+private:
+
+   /**
+    * linear-X term.
+    */
+   double m_a;
+
+   /**
+    * linear-Y term.
+    */
+   double m_b;
+
+   /**
+    * constant term.
+    */
+   double m_c;
+
+   /**
+    * Normal system coefficient matrix.
+    */
+   NEWMAT::Matrix*  AtA;
+
+   /**
+    * Normal system RHS vector
+    */
+   NEWMAT::Matrix*  Atb;
+
+   ossim_uint32 m_numSamples;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/base/ossimLine.h b/ossim/include/ossim/base/ossimLine.h
new file mode 100644
index 0000000..cc139fc
--- /dev/null
+++ b/ossim/include/ossim/base/ossimLine.h
@@ -0,0 +1,81 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Garrett Potts
+//*******************************************************************
+//  $Id: ossimLine.h 23353 2015-06-01 19:19:10Z dburken $
+#ifndef ossimLine_HEADER
+#define ossimLine_HEADER
+#include <ossim/base/ossimDpt.h>
+#include <iosfwd>
+
+class OSSIM_DLL ossimLine
+{
+public:
+   friend OSSIM_DLL std::ostream& operator <<(std::ostream& out,
+                                              const ossimLine& rhs);
+   ossimLine(const ossimDpt& p1=ossimDpt(0,0),
+             const ossimDpt& p2=ossimDpt(0,0))
+      :theP1(p1),
+       theP2(p2)
+      {
+      }
+
+   
+   ossimDpt getVector()const
+      {
+         return (theP2-theP1);
+      }
+
+   /*!
+    * Computes the following equation:
+    *
+    * Note: this object will be line a and the passed
+    *       in object will be line b;
+    *       and
+    *       P1 and P2 coorespond to this object and
+    *       P3 and P4 will coorespond to the passed in object.
+    *
+    * Now find point formed at the intersection of line a and b:
+    *
+    * Pa = P1 + ua ( P2 - P1 ) 
+    * Pb = P3 + ub ( P4 - P3 )
+    *const ossimDpt&   ul_corner,
+              const ossimDpt&   lr_corner,
+              ossimCoordSysOrientMode mode=OSSIM_LEFT_HANDED);
+    * x1 + ua (x2 - x1) = x3 + ub (x4 - x3) 
+    * and 
+    * y1 + ua (y2 - y1) = y3 + ub (y4 - y3)
+    *
+    * Solve:
+    *  ua = ((x4-x3)(y1-y3) - (y4-y3)(x1-x3))/
+    *       ((y4-y3)(x2-x1) - (x4-x3)(y2-y1))
+    *  ub = ((x2-x1)(y1-y3) - (y2-y1)(x1-x3))/
+    *       ((y4-y3)(x2-x1) - (x4-x3)(y2-y1))
+    * substitute:
+    *
+    * x = x1 + ua (x2 - x1) 
+    * y = y1 + ua (y2 - y1)
+    *
+    */
+   ossimDpt intersectInfinite(const ossimLine& line)const;
+
+   ossimDpt intersectSegment(const ossimLine& line)const;
+
+   ossimDpt midPoint()const;
+   double length()const;
+   ossimDpt normal()const;
+   /*!
+    * Will return true if the point is on the line.
+    */
+   bool isPointWithin(const ossimDpt& point, double delta=FLT_EPSILON)const;
+
+   bool isPointOnInfiniteLine(const ossimDpt& point, double delta=FLT_EPSILON)const;
+
+   ossimDpt   theP1;
+   ossimDpt   theP2;
+};
+
+#endif
diff --git a/ossim/include/ossim/base/ossimListener.h b/ossim/include/ossim/base/ossimListener.h
new file mode 100644
index 0000000..9245529
--- /dev/null
+++ b/ossim/include/ossim/base/ossimListener.h
@@ -0,0 +1,52 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimListener.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimListener_HEADER
+#define ossimListener_HEADER
+#include <ossim/base/ossimObject.h>
+
+class ossimEvent;
+
+/*!
+ * Base class for all listners.  Listners nned to derive from this
+ * class and override the processEvent method.
+ */
+class OSSIMDLLEXPORT ossimListener
+{
+public:
+
+   ossimListener();
+
+   virtual ~ossimListener();
+
+   /**
+    * ProcessEvent.  The defaul is to do nothing.  Derived
+    * classes need to override this class.
+    */
+   virtual void processEvent(ossimEvent& event);
+
+   void enableListener();
+
+   void disableListener();
+
+   void setListenerEnableFlag(bool flag);
+
+   bool isListenerEnabled() const;
+
+   bool getListenerEnableFlag() const;
+
+protected:
+   bool theListenerEnableFlag;
+TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/base/ossimListenerManager.h b/ossim/include/ossim/base/ossimListenerManager.h
similarity index 100%
rename from include/ossim/base/ossimListenerManager.h
rename to ossim/include/ossim/base/ossimListenerManager.h
diff --git a/ossim/include/ossim/base/ossimLookUpTable.h b/ossim/include/ossim/base/ossimLookUpTable.h
new file mode 100644
index 0000000..5e560c2
--- /dev/null
+++ b/ossim/include/ossim/base/ossimLookUpTable.h
@@ -0,0 +1,117 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Contains class declaration for LookUpTable. 
+//*******************************************************************
+//  $Id: ossimLookUpTable.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimLookUpTable_HEADER
+#define ossimLookUpTable_HEADER
+
+#include <vector>
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimKeyword.h>
+
+class ossimKeywordlist;
+
+//*******************************************************************
+// CLASS:  LookUpTable
+//*******************************************************************
+class OSSIMDLLEXPORT ossimLookUpTable
+{
+public:
+
+   enum
+   {
+      NOT_FOUND    = -1
+   };
+   
+   virtual ~ossimLookUpTable();
+
+   /*!
+    *  @return
+    *  Returns the entry string associated with the entry number (key) passed
+    *  in. Returns empty string if entry number is not in the list.
+    */
+   virtual ossimString getEntryString(ossim_int32 entry_number) const;
+
+   /*!
+    *  @param table_index Index into the table
+    *  Note:  This is not the key mapped to the but the index into the table.
+    *  @return
+    *  Returns the entry string associated with the table index passed in.
+    *  Returns empty string if index is out of range.
+    */
+   virtual ossimString getTableIndexString(ossim_uint32 table_index) const;
+
+   /*!
+    *  Returns the entry string associated with the entry number passed in.
+    *  Returns empty string if entry number is not in the list.
+    */
+   virtual ossimString operator[](ossim_int32 entry_number) const;
+
+   /*!
+    *  Returns the entry string associated with lookup table keyword entry
+    *  in the Keywordlist passed in.
+    *  Returns empty string if keyword entry is not in the Keywordlist.
+    */
+   virtual ossimString getEntryString(const ossimKeywordlist& kwl,
+                                      const char* prefix=0) const;
+
+   /*!
+    *  Returns the entry number associated with the entry string passed in.
+    *  Returns NOT_FOUND(-1) if entry string is not in the list.
+    *  If case_insensitive == true(default), the test is case insensitive;
+    *  else, the test will be case sensitive.
+    */
+   virtual ossim_int32 getEntryNumber(const char* entry_string,
+                                      bool case_insensitive = true) const;
+
+   /*!
+    *  Returns the entry number associated with the lookup table keyword
+    *  entry in the Keywordlist passed in.  Returns NOT_FOUND(-1) if no
+    *  matching entry.
+    *  If case_insensitive == true(default), the test is case insensitive;
+    *  else, the test will be case sensitive.
+    */
+   virtual ossim_int32 getEntryNumber(const ossimKeywordlist& kwl,
+                                      const char* prefix=0,
+                                      bool case_insensitive = true) const;
+
+   /*!
+    *  Returns keyword for lookups from a Keywordlist.
+    */
+   virtual ossimKeyword getKeyword() const=0;
+
+   virtual ossim_uint32 getTableSize() const;
+  
+  void dumpValues(std::ostream& out)const;
+protected:
+
+   ossimLookUpTable(ossim_int32 table_size);
+
+   class ossimKeyValueMap
+   {
+   public:
+      void init (ossim_int32 key, const ossimString& value) { theKey=key; theValue=value; }
+      ossim_int32  theKey;
+      ossimString theValue;
+   };
+
+   std::vector<ossimKeyValueMap>  theTable;
+   
+   ossimLookUpTable(){}
+};
+
+#endif
+
diff --git a/include/ossim/base/ossimLsrPoint.h b/ossim/include/ossim/base/ossimLsrPoint.h
similarity index 100%
rename from include/ossim/base/ossimLsrPoint.h
rename to ossim/include/ossim/base/ossimLsrPoint.h
diff --git a/include/ossim/base/ossimLsrRay.h b/ossim/include/ossim/base/ossimLsrRay.h
similarity index 100%
rename from include/ossim/base/ossimLsrRay.h
rename to ossim/include/ossim/base/ossimLsrRay.h
diff --git a/include/ossim/base/ossimLsrSpace.h b/ossim/include/ossim/base/ossimLsrSpace.h
similarity index 100%
rename from include/ossim/base/ossimLsrSpace.h
rename to ossim/include/ossim/base/ossimLsrSpace.h
diff --git a/include/ossim/base/ossimLsrVector.h b/ossim/include/ossim/base/ossimLsrVector.h
similarity index 100%
rename from include/ossim/base/ossimLsrVector.h
rename to ossim/include/ossim/base/ossimLsrVector.h
diff --git a/include/ossim/base/ossimMatrix3x3.h b/ossim/include/ossim/base/ossimMatrix3x3.h
similarity index 100%
rename from include/ossim/base/ossimMatrix3x3.h
rename to ossim/include/ossim/base/ossimMatrix3x3.h
diff --git a/include/ossim/base/ossimMatrix4x4.h b/ossim/include/ossim/base/ossimMatrix4x4.h
similarity index 100%
rename from include/ossim/base/ossimMatrix4x4.h
rename to ossim/include/ossim/base/ossimMatrix4x4.h
diff --git a/include/ossim/base/ossimMatrixProperty.h b/ossim/include/ossim/base/ossimMatrixProperty.h
similarity index 100%
rename from include/ossim/base/ossimMatrixProperty.h
rename to ossim/include/ossim/base/ossimMatrixProperty.h
diff --git a/ossim/include/ossim/base/ossimMetadataInterface.h b/ossim/include/ossim/base/ossimMetadataInterface.h
new file mode 100644
index 0000000..56c3268
--- /dev/null
+++ b/ossim/include/ossim/base/ossimMetadataInterface.h
@@ -0,0 +1,46 @@
+//----------------------------------------------------------------------------
+// File: ossimFileProcessorInterface.h
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Class interface ossimMetadataInterface.
+//
+// Has pure virtual "addMetadata" method that derived classes must
+// implement to be concrete.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimMetadataInterface_HEADER
+#define ossimMetadataInterface_HEADER 1
+
+#include <string>
+
+class ossimKeywordlist;
+
+/** @class ossimMetadataInterface */
+class ossimMetadataInterface
+{
+public:
+   
+   /** @brief default constructor */
+   ossimMetadataInterface(){}
+
+   /** @brief virtual destructor. */
+   virtual ~ossimMetadataInterface(){}
+
+   /**
+    * @brief Pure virtual addMetadata method. Derived classed must implement.
+    * @param kwl Initialized by this.
+    * @param prefix e.g. "image0." (can be empty)
+    */
+   virtual void addMetadata( ossimKeywordlist* kwl,
+                             const std::string& prefix ) const = 0;
+};
+
+#endif /* #ifndef ossimMetadataInterface_HEADER */
+
diff --git a/include/ossim/base/ossimMouseEvent.h b/ossim/include/ossim/base/ossimMouseEvent.h
similarity index 100%
rename from include/ossim/base/ossimMouseEvent.h
rename to ossim/include/ossim/base/ossimMouseEvent.h
diff --git a/include/ossim/base/ossimMouseListener.h b/ossim/include/ossim/base/ossimMouseListener.h
similarity index 100%
rename from include/ossim/base/ossimMouseListener.h
rename to ossim/include/ossim/base/ossimMouseListener.h
diff --git a/include/ossim/base/ossimMultiBandHistogram.h b/ossim/include/ossim/base/ossimMultiBandHistogram.h
similarity index 100%
rename from include/ossim/base/ossimMultiBandHistogram.h
rename to ossim/include/ossim/base/ossimMultiBandHistogram.h
diff --git a/include/ossim/base/ossimMultiResLevelHistogram.h b/ossim/include/ossim/base/ossimMultiResLevelHistogram.h
similarity index 100%
rename from include/ossim/base/ossimMultiResLevelHistogram.h
rename to ossim/include/ossim/base/ossimMultiResLevelHistogram.h
diff --git a/ossim/include/ossim/base/ossimNBandLutDataObject.h b/ossim/include/ossim/base/ossimNBandLutDataObject.h
new file mode 100644
index 0000000..b2c2942
--- /dev/null
+++ b/ossim/include/ossim/base/ossimNBandLutDataObject.h
@@ -0,0 +1,489 @@
+//*******************************************************************
+// Copyright (C) 2005 Garrett Potts
+//
+// LICENSE: MIT See top level license file.
+// 
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimNBandLutDataObject.h 23666 2015-12-14 20:01:22Z rashadkm $
+#ifndef ossimNBandLutDataObject_HEADER
+#define ossimNBandLutDataObject_HEADER 1
+
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimFilename.h>
+#include <iostream>
+#include <map>
+
+/**
+ * class ossimNBandLutDataObject
+ *
+ * Sample CADRG LUT taken from an arbitrary CADRG image entry.  This is a keywordlist
+ * support by the loadstate of this class.
+ *
+ * <pre>
+ * entry0:  25 39 116 
+ * entry1:  245 242 242 
+ * entry10:  92 89 115 
+ * entry100:  74 55 85 
+ * entry101:  233 165 53 
+ * entry102:  75 2 4 
+ * entry103:  162 118 42 
+ * entry104:  233 159 130 
+ * entry105:  189 129 40 
+ * entry106:  154 109 66 
+ * entry107:  145 97 85 
+ * entry108:  121 86 31 
+ * entry109:  238 151 118 
+ * entry11:  52 31 76 
+ * entry110:  239 167 42 
+ * entry111:  236 137 100 
+ * entry112:  179 112 88 
+ * entry113:  92 37 33 
+ * entry114:  121 66 24 
+ * entry115:  120 133 151 
+ * entry116:  76 92 192 
+ * entry117:  36 50 117 
+ * entry118:  57 75 191 
+ * entry119:  125 45 50 
+ * entry12:  235 217 204 
+ * entry120:  102 65 81 
+ * entry121:  172 148 199 
+ * entry122:  204 145 95 
+ * entry123:  81 19 5 
+ * entry124:  91 4 1 
+ * entry125:  109 54 31 
+ * entry126:  137 114 118 
+ * entry127:  230 150 52 
+ * entry128:  82 38 87 
+ * entry129:  190 120 76 
+ * entry13:  244 218 172 
+ * entry130:  170 109 45 
+ * entry131:  95 20 22 
+ * entry132:  150 80 61 
+ * entry133:  225 122 82 
+ * entry134:  122 37 16 
+ * entry135:  146 88 49 
+ * entry136:  122 94 122 
+ * entry137:  230 135 63 
+ * entry138:  137 73 75 
+ * entry139:  119 46 29 
+ * entry14:  189 167 141 
+ * entry140:  190 142 128 
+ * entry141:  242 216 187 
+ * entry142:  176 125 95 
+ * entry143:  193 117 143 
+ * entry144:  19 0 0 
+ * entry145:  12 1 42 
+ * entry146:  24 4 26 
+ * entry147:  38 40 52 
+ * entry148:  8 24 175 
+ * entry149:  40 23 45 
+ * entry15:  245 213 142 
+ * entry150:  39 11 58 
+ * entry151:  10 0 22 
+ * entry152:  236 148 41 
+ * entry153:  101 41 11 
+ * entry154:  230 113 67 
+ * entry155:  148 44 46 
+ * entry156:  225 144 133 
+ * entry157:  115 2 13 
+ * entry158:  159 79 49 
+ * entry159:  164 95 33 
+ * entry16:  246 241 205 
+ * entry160:  97 6 22 
+ * entry161:  175 90 133 
+ * entry162:  112 23 20 
+ * entry163:  105 22 6 
+ * entry164:  148 59 33 
+ * entry165:  215 118 104 
+ * entry166:  211 122 41 
+ * entry167:  233 129 34 
+ * entry168:  153 73 25 
+ * entry169:  208 102 39 
+ * entry17:  240 215 89 
+ * entry170:  206 101 133 
+ * entry171:  229 113 96 
+ * entry172:  127 16 25 
+ * entry173:  224 104 28 
+ * entry174:  171 76 74 
+ * entry175:  221 94 78 
+ * entry176:  229 86 94 
+ * entry177:  213 80 57 
+ * entry178:  161 44 36 
+ * entry179:  155 54 19 
+ * entry18:  115 92 157 
+ * entry180:  130 25 5 
+ * entry181:  150 29 24 
+ * entry182:  198 54 34 
+ * entry183:  224 61 70 
+ * entry184:  213 82 37 
+ * entry185:  186 28 31 
+ * entry186:  200 64 15 
+ * entry187:  110 2 2 
+ * entry188:  195 38 12 
+ * entry189:  151 6 8 
+ * entry19:  160 163 37 
+ * entry190:  193 13 10 
+ * entry191:  205 1 3 
+ * entry192:  44 62 193 
+ * entry193:  35 14 16 
+ * entry194:  15 30 118 
+ * entry195:  28 47 189 
+ * entry196:  25 3 80 
+ * entry197:  7 16 118 
+ * entry198:  33 10 6 
+ * entry199:  39 24 95 
+ * entry2:  216 212 237 
+ * entry20:  38 29 21 
+ * entry200:  82 58 159 
+ * entry201:  55 29 142 
+ * entry202:  33 4 23 
+ * entry203:  17 14 36 
+ * entry204:  58 26 41 
+ * entry205:  11 13 14 
+ * entry206:  74 87 85 
+ * entry207:  50 60 41 
+ * entry208:  119 123 98 
+ * entry209:  193 187 172 
+ * entry21:  208 202 156 
+ * entry210:  124 126 128 
+ * entry211:  47 68 84 
+ * entry212:  110 119 60 
+ * entry213:  63 145 121 
+ * entry214:  154 166 147 
+ * entry215:  107 156 104 
+ * entry22:  242 202 152 
+ * entry23:  168 148 140 
+ * entry24:  31 22 25 
+ * entry25:  245 205 114 
+ * entry26:  245 191 137 
+ * entry27:  175 161 172 
+ * entry28:  17 6 11 
+ * entry29:  172 170 137 
+ * entry3:  247 230 113 
+ * entry30:  51 27 20 
+ * entry31:  239 210 73 
+ * entry32:  185 176 129 
+ * entry33:  35 2 13 
+ * entry34:  60 52 51 
+ * entry35:  101 78 70 
+ * entry36:  141 124 101 
+ * entry37:  206 184 107 
+ * entry38:  244 174 106 
+ * entry39:  82 98 136 
+ * entry4:  246 231 132 
+ * entry40:  190 191 239 
+ * entry41:  241 188 161 
+ * entry42:  67 51 38 
+ * entry43:  244 184 122 
+ * entry44:  211 201 142 
+ * entry45:  61 27 16 
+ * entry46:  182 182 82 
+ * entry47:  243 188 87 
+ * entry48:  86 83 60 
+ * entry49:  61 40 43 
+ * entry5:  204 198 166 
+ * entry50:  146 141 93 
+ * entry51:  44 4 4 
+ * entry52:  231 210 51 
+ * entry53:  85 74 39 
+ * entry54:  197 169 127 
+ * entry55:  182 151 60 
+ * entry56:  121 98 73 
+ * entry57:  243 182 145 
+ * entry58:  58 18 21 
+ * entry59:  241 157 91 
+ * entry6:  2 0 2 
+ * entry60:  59 4 1 
+ * entry61:  155 162 223 
+ * entry62:  154 133 80 
+ * entry63:  73 21 16 
+ * entry64:  195 183 116 
+ * entry65:  76 51 29 
+ * entry66:  234 181 63 
+ * entry67:  58 59 98 
+ * entry68:  42 22 79 
+ * entry69:  134 143 219 
+ * entry7:  204 204 239 
+ * entry70:  106 117 205 
+ * entry71:  48 65 117 
+ * entry72:  63 54 117 
+ * entry73:  125 93 62 
+ * entry74:  137 138 41 
+ * entry75:  104 68 59 
+ * entry76:  113 99 41 
+ * entry77:  76 30 11 
+ * entry78:  239 184 48 
+ * entry79:  161 129 98 
+ * entry8:  31 4 66 
+ * entry80:  241 170 126 
+ * entry81:  145 109 105 
+ * entry82:  207 163 116 
+ * entry83:  79 41 40 
+ * entry84:  175 138 41 
+ * entry85:  10 0 56 
+ * entry86:  180 151 77 
+ * entry87:  72 12 24 
+ * entry88:  242 154 105 
+ * entry89:  91 26 15 
+ * entry9:  246 238 162 
+ * entry90:  160 118 53 
+ * entry91:  228 166 141 
+ * entry92:  231 160 69 
+ * entry93:  61 2 11 
+ * entry94:  132 83 60 
+ * entry95:  86 46 24 
+ * entry96:  243 143 86 
+ * entry97:  108 60 46 
+ * entry98:  109 76 38 
+ * entry99:  96 86 84 
+ * null_value:  -1
+ * number_bands:  3
+ * number_entries:  216
+ * scalar_type:  ossim_uint8
+ * type:  ossimNBandLutDataObject
+ *
+ *
+ * NOTES:
+ * 
+ * - The null_value keyword above is the index in the lut that correspnds to an invalid pixel value.
+ * - Each entry will have number_bands.  SO if number of bands is 3 then there will be 3 values
+ *   Where the first value is for band 1, ... etc.
+ * - scalar_type is a hint as to the scalar type of the entries.  Is the resulting lut for 8 bit, 16 bit , etc data.
+ * - You should always use the LUT_ENTRY_TYPE when getting values from the lut.  This value could change to an
+ *   ossim_float32 precision and if you use the LUT_ENTRY_TYPE then your code will not have to change.
+ *   
+ * </pre>
+ */
+class OSSIM_DLL ossimNBandLutDataObject : public ossimObject
+{
+public:
+   
+   typedef ossim_int32 LUT_ENTRY_TYPE;
+   
+   friend std::ostream& operator <<(std::ostream& out,
+                                    const ossimNBandLutDataObject& lut);
+   /*!
+    * Will allocate 256 values for the color table
+    */
+   ossimNBandLutDataObject(ossim_uint32 numberOfEntries=0,
+                           ossim_uint32 numberOfBands=0,
+                           ossimScalarType bandScalarType = OSSIM_UINT8,
+                           ossim_int32 nullPixelIndex=-1);
+   ossimNBandLutDataObject(const ossimNBandLutDataObject& lut);
+   ossimObject* dup()const
+   {
+      return new ossimNBandLutDataObject(*this);
+   }
+   void create(ossim_uint32 numberOfEntries,
+               ossim_uint32 numberOfBands=3);
+   const LUT_ENTRY_TYPE* operator[](ossim_uint32 idx)const
+   {
+      if(theLut)
+      {
+         return &theLut[idx*theNumberOfBands];
+      }
+      
+      return 0;
+   }
+   LUT_ENTRY_TYPE* operator[](ossim_uint32 idx)
+   {
+      if(theLut)
+      {
+         return &theLut[idx*theNumberOfBands];
+      }
+      
+      return 0;
+   }
+   const LUT_ENTRY_TYPE* operator[](ossim_int32 idx)const
+   {
+      if(theLut)
+      {
+         return &theLut[idx*theNumberOfBands];
+      }
+      
+      return 0;
+   }
+   LUT_ENTRY_TYPE* operator[](ossim_int32 idx)
+   {
+      if(theLut)
+      {
+         return &theLut[idx*theNumberOfBands];
+      }
+      
+      return 0;
+   }
+   const LUT_ENTRY_TYPE* operator[](double normalizedIndex)const
+   {
+      int idx = int(normalizedIndex*theNumberOfEntries);
+      if (idx < 0)
+      {
+         idx = 0;
+      }
+      return (*this)[idx];
+   }
+
+   /**
+    * @param normalizedIndex  If a double precision value is passed in then it is
+    *                         assumed to be in normalized space where the value ranges from 0.0 to 1.0
+    * @return the starting address of the band values.
+    */ 
+   LUT_ENTRY_TYPE* operator[](double normalizedIndex)
+   {
+      ossim_uint32 idx = int(normalizedIndex*(theNumberOfEntries-1));
+      if (idx >= theNumberOfEntries)
+      {
+         idx = theNumberOfEntries-1;
+      }
+      return (*this)[idx];
+   }
+   
+   bool hasNullPixelIndex()const
+   {
+      return (theNullPixelIndex >= 0);
+   }
+   /**
+    * Will return the min max value for a given band
+    *
+    * @param band band number to query.  This is 0 based so the first band
+    *        is indicated by the value of 0.
+    * @param minValue is the minimum value returned for the passed in band
+    * @param maxValue is the maximum value returned for the passed in band
+    */
+   void getMinMax(ossim_uint32 band,
+                  LUT_ENTRY_TYPE& minValue,
+                  LUT_ENTRY_TYPE& maxValue);
+
+   /**
+    * @return First index with alpha of 0 or -1 if not found or there is no alpha.
+    *
+    * Currently only works on 4 band data.  May consider adding an alpha channel
+    * class data member in the future.
+    */
+   ossim_int32 getFirstNullAlphaIndex() const;
+   
+   /**
+    * Allows you to specify which entry is to be designated as an invalid
+    * entry.  Note: setting this to -1 indicates no null entry is set.
+    *
+    * @param idx is the entry number that will be used for the null value
+    */
+   void setNullPixelIndex(ossim_int32 idx){theNullPixelIndex = idx;}
+
+   /**
+    * @return Return either a positive value indicating the entry designated for
+    *         a null pixel value or a -1 to say no null pixel has been designated
+    *         yet.
+    */ 
+   ossim_int32 getNullPixelIndex()const{return theNullPixelIndex;}
+
+   /**
+    * @return Return the number of bands this lut is indexed for.
+    */ 
+   ossim_uint32 getNumberOfBands()const{return theNumberOfBands;}
+
+   /**
+    * @return Return the number of entries in the lut.
+    */ 
+   ossim_uint32 getNumberOfEntries()const{return theNumberOfEntries;}
+
+   /**
+    * This method gives you a way to find an entry index closest to the passed in
+    * band values.
+    * 
+    * @param values Is an array of band values.  This array must be equal to the number
+    *        of bands for the lut.
+    * @return Returns the nearest index to the passed in value.  
+    */ 
+   ossim_uint32 findIndex(ossim_int32* values) const;
+
+   /**
+    * @brief This method gives you a way to find an entry index closest to the
+    * passed in band values.
+    * 
+    * @param values Is an array of band values.
+    * @param size Size of values array.  Note if size is less than the LUT
+    * number of bands, the trailing bands get dropped.  This allows finding
+    * an index dropping the alpha channel.
+    * 
+    * @return Returns the nearest index to the passed in value.  
+    */ 
+   ossim_uint32 findIndex(ossim_int32* values, ossim_uint32 size) const;
+
+   /**
+    * Will do a simple memset to '\0' all 
+    */ 
+   void clearLut();
+   /**
+    * does a deep copy from the passed in lut to the object.
+    *
+    * @param lut The lut to copy.
+    */ 
+   const ossimNBandLutDataObject& operator =(const ossimNBandLutDataObject& lut);
+
+   /**
+    * Determines if the state of this lut is identical to the passed in lut
+    *
+    * @param lut Checks equality of the this object to the lut parameter.
+    * @return True if equal and false otherwise
+    */ 
+   bool operator ==(const ossimNBandLutDataObject& lut)const;
+
+   /**
+    * Reads in an external lut file.  The external file is in a keywordlist format specified by the saveState.
+    */ 
+   bool open(const ossimFilename& lutFile);
+
+   /**
+    * <pre>
+    * 
+    * Keywords:
+    *  
+    * entry0:
+    * entry1:
+    * :
+    * entry<number_entries-1>:
+    * null_value:  -1
+    * number_bands:  3
+    * number_entries:  216
+    * scalar_type:  ossim_uint8
+    * type:  ossimNBandLutDataObject
+    *
+    * Where entry<idx> is repeasted for each entry number where idx start from 0 and goes to number_entries-1
+    * each entry must have number_bands values.
+    * </pre>
+    *
+    * @param kwl The keyword list to store the keywords to.  Each keyword could be prefixed by an optional
+    *            prefix parameter.
+    * @param prefix The optional prefix parameter used to prefix each keyword.
+    * 
+    */ 
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
+
+   std::vector<ossimString> getEntryLabels(ossim_uint32 band);
+
+   void setEntryLables(ossim_uint32 band, std::vector<ossimString> entryLabels);
+
+   
+   /**
+    * Loads the state of the object by reading in the keywords listed in the save state.
+    *
+    * @param kwl The keywordlist to extract the classes keywords from to restore its state.
+    * @param prefix  Optional prefix value used to prefix each keyword.
+    */ 
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+protected:
+   virtual ~ossimNBandLutDataObject();
+
+   LUT_ENTRY_TYPE *theLut;
+   ossim_uint32    theNumberOfEntries;
+   ossim_uint32    theNumberOfBands;
+   ossimScalarType theBandScalarType;
+   ossim_int32     theNullPixelIndex;
+   std::map<ossim_uint32, std::vector<ossimString> >  m_entryLabels;
+   
+TYPE_DATA
+};
+
+#endif
diff --git a/ossim/include/ossim/base/ossimNadconGridDatum.h b/ossim/include/ossim/base/ossimNadconGridDatum.h
new file mode 100644
index 0000000..c8760aa
--- /dev/null
+++ b/ossim/include/ossim/base/ossimNadconGridDatum.h
@@ -0,0 +1,47 @@
+#ifndef ossimNadconGridDatum_HEADER
+#define ossimNadconGridDatum_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimThreeParamDatum.h>
+#include <ossim/base/ossimNadconGridFile.h>
+#include <ossim/base/ossimDrect.h>
+
+class OSSIM_DLL ossimNadconGridDatum : public ossimThreeParamDatum
+{
+public:
+  ossimNadconGridDatum(const ossimFilename& datumDirectory,
+		       const ossimString &code, 
+		       const ossimString &name,
+		       const ossimEllipsoid* anEllipsoid,
+		       double sigmaX,
+		       double sigmaY,
+		       double sigmaZ,
+		       double westLongitude,
+		       double eastLongitude,
+		       double southLatitude,
+		       double northLatitude,
+		       double param1,
+		       double param2,
+		       double param3);
+
+protected:
+  mutable ossimDrect theConusRect;
+  mutable ossimDrect theHawaiiRect;
+  mutable ossimDrect theAlaskaRect;
+  mutable ossimDrect theStGeorgeRect;
+  mutable ossimDrect theLatStLaurenceRect;
+  mutable ossimDrect theStPaulRect;
+  mutable ossimDrect thePrviRect;
+  
+  mutable ossimNadconGridFile theLatGrid;
+  mutable ossimNadconGridFile theLonGrid;
+  
+  mutable ossimDrect    theCurrentGridRect;
+  ossimFilename theDatumDirectory;
+  
+  void checkGrid(const ossimDpt& latLon)const;
+   
+   TYPE_DATA;   
+};
+
+#endif
diff --git a/ossim/include/ossim/base/ossimNadconGridFile.h b/ossim/include/ossim/base/ossimNadconGridFile.h
new file mode 100644
index 0000000..ba8c399
--- /dev/null
+++ b/ossim/include/ossim/base/ossimNadconGridFile.h
@@ -0,0 +1,54 @@
+//**************************************************************************
+// Copyright (C) 2003 Storage Area Networks, Inc.
+//
+// Written by:   Kenneth Melero  <kmelero at sanz.com>
+//
+//**************************************************************************
+
+#ifndef ossimNadconGridFile_HEADER
+#define ossimNadconGridFile_HEADER 1
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimNadconGridHeader.h>
+#include <fstream>
+
+class OSSIM_DLL ossimNadconGridFile
+{
+public:
+   ossimNadconGridFile() : theFileOkFlag(false) {}
+   ~ossimNadconGridFile();
+   bool open(const ossimFilename& file);
+   void close();
+   
+   /*!
+    */
+   double getShiftAtLatLon(double lat, double lon)const;
+   bool pointWithin(double lat, double lon)const;
+   const ossimDrect getBoundingRect()const
+   {
+      return theBoundingRect;
+   }
+   
+   const ossimFilename& getFilename()const
+   {
+      return theFilename;
+   }
+   bool getFileOkFlag()const
+   {
+      return theFileOkFlag;
+   }
+   ossimDpt getSpacing()const
+   {
+      return theHeader.getSpacing();
+   }
+   
+protected:
+   mutable std::ifstream theInputFile;
+   mutable bool          theFileOkFlag;
+   ossimFilename         theFilename;
+   ossimNadconGridHeader theHeader;
+   ossimDrect            theBoundingRect;
+   ossimDpt              theLatLonOrigin;
+
+};
+
+#endif
diff --git a/ossim/include/ossim/base/ossimNadconGridHeader.h b/ossim/include/ossim/base/ossimNadconGridHeader.h
new file mode 100644
index 0000000..55dc93c
--- /dev/null
+++ b/ossim/include/ossim/base/ossimNadconGridHeader.h
@@ -0,0 +1,89 @@
+//**************************************************************************
+// Copyright (C) 2003 Storage Area Networks, Inc.
+//
+// Written by:   Kenneth Melero  <kmelero at sanz.com>
+//
+//**************************************************************************
+
+#ifndef ossimNadconGridHeader_HEADER
+#define ossimNadconGridHeader_HEADER 1
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimDrect.h>
+#include <iostream>
+
+class OSSIM_DLL ossimNadconGridHeader
+{
+public:
+   friend OSSIM_DLL std::ostream& operator <<(std::ostream& out, const ossimNadconGridHeader& rhs);
+   ossimNadconGridHeader()
+      :theCols(0),
+       theRows(0),
+       theZ(0),
+       theMinX(0),
+       theDx(0),
+       theMinY(0),
+       theDy(0)
+      {
+      }
+   bool readHeader(const ossimFilename& file);
+   bool readHeader(std::istream& in);
+
+   int getStartOffset()const
+      {
+         return (theCols+2)*4;
+      }
+
+   int getBytesPerRow()const
+      {
+         return (theCols+1)*4;
+      }
+
+   int getNumberOfRows()const
+      {
+         return theRows;
+      }
+   int getNumberOfCols()const
+      {
+         return theCols;
+      }
+   double getDeltaX()const
+      {
+         return (double)theDx;
+      }
+   double getDeltaY()const
+      {
+         return (double)theDy;
+      }
+   ossimDrect getBoundingRect()const
+      {
+         return ossimDrect(theMinX,
+                           theMinY + (theRows)*theDy,
+                           theMinX + (theCols)*theDx,
+                           theMinY,
+                           OSSIM_RIGHT_HANDED);
+      }
+   double getMinX()const
+      {
+         return theMinX;
+      }
+   double getMinY()const
+      {
+         return theMinY;
+      }
+   ossimDpt getSpacing()const
+      {
+         return ossimDpt(theDx, theDy);
+      }
+protected:
+   int*   theCharBuf[64];
+   int   theCols;
+   int   theRows;
+   int   theZ;
+   double theMinX;
+   double theDx;
+   double theMinY;
+   double theDy;
+};
+
+#endif
diff --git a/ossim/include/ossim/base/ossimNadconNarDatum.h b/ossim/include/ossim/base/ossimNadconNarDatum.h
new file mode 100644
index 0000000..94885ad
--- /dev/null
+++ b/ossim/include/ossim/base/ossimNadconNarDatum.h
@@ -0,0 +1,21 @@
+#ifndef ossimNadconNarDatum_HEADER
+#define ossimNadconNarDatum_HEADER 1
+
+#include <ossim/base/ossimNadconGridDatum.h>
+#include <ossim/base/ossimNadconGridFile.h>
+class OSSIM_DLL ossimNadconNarDatum : public ossimNadconGridDatum
+{
+public:
+   ossimNadconNarDatum(const ossimFilename& nadconDirectory);
+
+   // Argument holds the source point and datum.  Returns another
+   // point with this datum.
+   //
+   virtual ossimGpt shift(const ossimGpt    &aPt)const;
+   //utility functions to shift to and from the standard coordinates.
+   //Users should use the shift instead!!!
+   //
+TYPE_DATA;
+};
+
+#endif
diff --git a/ossim/include/ossim/base/ossimNadconNasDatum.h b/ossim/include/ossim/base/ossimNadconNasDatum.h
new file mode 100644
index 0000000..f5bfeeb
--- /dev/null
+++ b/ossim/include/ossim/base/ossimNadconNasDatum.h
@@ -0,0 +1,20 @@
+#ifndef ossimNadconNasDatum_HEADER
+#define ossimNadconNasDatum_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimNadconGridDatum.h>
+#include <ossim/base/ossimNadconGridFile.h>
+
+class OSSIM_DLL ossimNadconNasDatum : public ossimNadconGridDatum
+{
+public:
+   ossimNadconNasDatum(const ossimFilename& nadconDirectory);
+
+   // Argument holds the source point and datum.  Returns another
+   // point with this datum.
+   //
+   virtual ossimGpt shift(const ossimGpt    &aPt)const;
+   TYPE_DATA;
+};
+
+#endif
diff --git a/ossim/include/ossim/base/ossimNormRgbVector.h b/ossim/include/ossim/base/ossimNormRgbVector.h
new file mode 100644
index 0000000..6db8f5d
--- /dev/null
+++ b/ossim/include/ossim/base/ossimNormRgbVector.h
@@ -0,0 +1,109 @@
+//*******************************************************************
+// Copyright (C) 2005 Garrett Potts
+//
+// License: MIT
+// Author: Garrett Potts 
+// Description:
+//
+//*************************************************************************
+// $Id: ossimNormRgbVector.h 23666 2015-12-14 20:01:22Z rashadkm $
+#ifndef ossimNormRgbVector_HEADER
+#define ossimNormRgbVector_HEADER
+#include <iostream>
+#include <ossim/base/ossimConstants.h>
+
+class ossimJpegYCbCrVector;
+class ossimHsiVector;
+class ossimHsvVector;
+class ossimCmyVector;
+class ossimRgbVector;
+
+class OSSIM_DLL ossimNormRgbVector
+{
+public:
+   friend std::ostream& operator <<(std::ostream& out, const ossimNormRgbVector& data)
+   {
+      out << "<" << data.theBuf[0] << ", "
+          << data.theBuf[1] << ", "
+          << data.theBuf[2] << ">";
+
+         return out;
+      }
+   ossimNormRgbVector(ossim_float64 r=0, ossim_float64 g=0, ossim_float64 b=0)
+      {
+         theBuf[0] = r;
+         theBuf[1] = g;
+         theBuf[2] = b;
+      }
+   ossimNormRgbVector(ossim_float64 grey)
+      {
+         theBuf[0] = grey;
+         theBuf[1] = grey;
+         theBuf[2] = grey;
+      }
+   ossimNormRgbVector(ossim_float64 colorData[3])
+      {
+         theBuf[0] = colorData[0];
+         theBuf[1] = colorData[1];
+         theBuf[2] = colorData[2];
+      }
+   ossimNormRgbVector(const ossimNormRgbVector& rgb)
+   {
+      theBuf[0] = rgb.theBuf[0];
+      theBuf[1] = rgb.theBuf[1];
+      theBuf[2] = rgb.theBuf[2];
+   }
+   ossimNormRgbVector(const ossimRgbVector& rgb);
+   ossimNormRgbVector(const ossimJpegYCbCrVector& YCbCr);
+   ossimNormRgbVector(const ossimHsiVector& hsi);
+   ossimNormRgbVector(const ossimHsvVector& hsv);
+   ossimNormRgbVector(const ossimCmyVector& cmy);
+   ossimNormRgbVector operator -(const ossimNormRgbVector& rgb)const
+   {
+      return ossimNormRgbVector(clamp(theBuf[0] - rgb.theBuf[0]),
+                                clamp(theBuf[1] - rgb.theBuf[1]),
+                                clamp(theBuf[2] - rgb.theBuf[2]));
+   }
+   ossimNormRgbVector operator *(ossim_float64 t)const
+   {
+      return ossimNormRgbVector(clamp(theBuf[0]*t),
+                                clamp(theBuf[1]*t),
+                                clamp(theBuf[2]*t));
+   }
+   
+   const ossimNormRgbVector& operator =(const ossimJpegYCbCrVector& data);
+   const ossimNormRgbVector& operator =(const ossimHsiVector& hsi);
+   const ossimNormRgbVector& operator =(const ossimHsvVector& hsv);
+   const ossimNormRgbVector& operator =(const ossimCmyVector& cmy);
+   bool operator ==(const ossimNormRgbVector& rgb)
+      {
+         return ( (rgb.theBuf[0] == theBuf[0])&&
+                  (rgb.theBuf[1] == theBuf[1])&&
+                  (rgb.theBuf[2] == theBuf[2]));
+      }
+   bool operator !=(const ossimNormRgbVector& rgb)
+      {
+         return ( (rgb.theBuf[0] != theBuf[0])||
+                  (rgb.theBuf[1] != theBuf[1])||
+                  (rgb.theBuf[2] != theBuf[2]));
+      }
+   static ossim_float64 clamp(ossim_float64 colorValue, ossim_float64 min=0.0, ossim_float64 max=1.0)
+      {
+         colorValue = colorValue > max? max:colorValue;
+         colorValue = colorValue < min? min:colorValue;
+         
+         return colorValue;
+      }
+   ossim_float64 getR() const { return theBuf[0]; }
+   ossim_float64 getG()const  { return theBuf[1]; }
+   ossim_float64 getB()const  { return theBuf[2]; }
+   void setR(ossim_float64 r) { theBuf[0] = r; }
+   void setG(ossim_float64 g) { theBuf[1] = g; }
+   void setB(ossim_float64 b) { theBuf[2] = b; }
+   
+protected:
+   ossim_float64 theBuf[3];
+   
+};
+
+#endif
diff --git a/ossim/include/ossim/base/ossimNotify.h b/ossim/include/ossim/base/ossimNotify.h
new file mode 100644
index 0000000..dd7a838
--- /dev/null
+++ b/ossim/include/ossim/base/ossimNotify.h
@@ -0,0 +1,107 @@
+//-------------------------------------------------------------------
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+// Contains class declaration for ossimNotify
+//-------------------------------------------------------------------
+//  $Id: ossimNotify.h 23467 2015-08-14 13:59:09Z gpotts $
+#ifndef ossimNotify_HEADER
+#define ossimNotify_HEADER 1
+
+#include <ossim/base/ossimErrorCodes.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimFilename.h>
+#include <iostream>
+#include <fstream>
+
+/**
+  * Notification level enumeration.  This specifies the
+  * level of the mesage being written.
+  */
+enum ossimNotifyLevel
+{
+   ossimNotifyLevel_ALWAYS = 0,
+   ossimNotifyLevel_FATAL  = 1,
+   ossimNotifyLevel_WARN   = 2,
+   ossimNotifyLevel_NOTICE = 3,
+   ossimNotifyLevel_INFO   = 4,
+   ossimNotifyLevel_DEBUG  = 5
+};
+
+/**
+ * Flags to allow the user to turn off certain notification levels
+ * 
+ */
+enum ossimNotifyFlags
+{
+   ossimNotifyFlags_NONE   = 0,
+   ossimNotifyFlags_FATAL  = 1,
+   ossimNotifyFlags_WARN   = 2,
+   ossimNotifyFlags_NOTICE = 4,
+   ossimNotifyFlags_INFO   = 8,
+   ossimNotifyFlags_DEBUG  = 16,
+   ossimNotifyFlags_ALL    = (ossimNotifyFlags_FATAL|
+                              ossimNotifyFlags_WARN|
+                              ossimNotifyFlags_NOTICE|
+                              ossimNotifyFlags_INFO|
+                              ossimNotifyFlags_DEBUG)
+};
+
+OSSIMDLLEXPORT void ossimSetDefaultNotifyHandlers();
+
+OSSIMDLLEXPORT void ossimSetNotifyStream(std::ostream* outputStream,
+                                         ossimNotifyFlags whichLevelsToRedirect=ossimNotifyFlags_ALL);
+
+OSSIMDLLEXPORT std::ostream* ossimGetNotifyStream(ossimNotifyLevel whichLevel);
+
+OSSIMDLLEXPORT bool ossimIsReportingEnabled();
+
+OSSIMDLLEXPORT std::ostream& ossimNotify(ossimNotifyLevel level = ossimNotifyLevel_WARN);
+OSSIMDLLEXPORT void ossimNotify(ossimString msg, ossimNotifyLevel notifyLevel = ossimNotifyLevel_WARN);
+/**
+ *
+ */
+OSSIMDLLEXPORT void ossimSetLogFilename(const ossimFilename& filename);
+
+/** @brief Returns the log filename if set. */
+/* OSSIMDLLEXPORT const char* ossimGetLogFilename(); */
+OSSIMDLLEXPORT void ossimGetLogFilename(ossimFilename& logFile);
+
+
+/**
+ *
+ */
+OSSIMDLLEXPORT void ossimDisableNotify(ossimNotifyFlags notifyLevel=ossimNotifyFlags_ALL);
+
+/**
+ *
+ */
+OSSIMDLLEXPORT void ossimEnableNotify(ossimNotifyFlags notifyLevel=ossimNotifyFlags_ALL);
+
+
+OSSIMDLLEXPORT void ossimSetNotifyFlag(ossimNotifyFlags notifyFlags);
+OSSIMDLLEXPORT void ossimPushNotifyFlags();
+OSSIMDLLEXPORT void ossimPopNotifyFlags();
+OSSIMDLLEXPORT ossimNotifyFlags ossimGetNotifyFlags();
+
+
+/**
+ * 
+ */
+OSSIMDLLEXPORT void  ossimSetError( const char *className,
+                                    ossim_int32 error,
+                                    const char *fmtString=0, ...);
+
+/**
+ * This is for general warnings and information feedback
+ *
+ * @param fmtString a C printf() style formatting string used (with the
+ * following arguments) to prepare an error message.
+ */
+OSSIMDLLEXPORT void  ossimSetInfo( const char *className,
+                                   const char *fmtString=0, ...);
+
+#endif /* #ifndef ossimNotify_HEADER */
diff --git a/include/ossim/base/ossimNotifyContext.h b/ossim/include/ossim/base/ossimNotifyContext.h
similarity index 100%
rename from include/ossim/base/ossimNotifyContext.h
rename to ossim/include/ossim/base/ossimNotifyContext.h
diff --git a/include/ossim/base/ossimNumericProperty.h b/ossim/include/ossim/base/ossimNumericProperty.h
similarity index 100%
rename from include/ossim/base/ossimNumericProperty.h
rename to ossim/include/ossim/base/ossimNumericProperty.h
diff --git a/include/ossim/base/ossimObject.h b/ossim/include/ossim/base/ossimObject.h
similarity index 100%
rename from include/ossim/base/ossimObject.h
rename to ossim/include/ossim/base/ossimObject.h
diff --git a/include/ossim/base/ossimObjectDestructingEvent.h b/ossim/include/ossim/base/ossimObjectDestructingEvent.h
similarity index 100%
rename from include/ossim/base/ossimObjectDestructingEvent.h
rename to ossim/include/ossim/base/ossimObjectDestructingEvent.h
diff --git a/include/ossim/base/ossimObjectEvents.h b/ossim/include/ossim/base/ossimObjectEvents.h
similarity index 100%
rename from include/ossim/base/ossimObjectEvents.h
rename to ossim/include/ossim/base/ossimObjectEvents.h
diff --git a/include/ossim/base/ossimObjectFactory.h b/ossim/include/ossim/base/ossimObjectFactory.h
similarity index 100%
rename from include/ossim/base/ossimObjectFactory.h
rename to ossim/include/ossim/base/ossimObjectFactory.h
diff --git a/ossim/include/ossim/base/ossimObjectFactoryRegistry.h b/ossim/include/ossim/base/ossimObjectFactoryRegistry.h
new file mode 100644
index 0000000..fe53cc2
--- /dev/null
+++ b/ossim/include/ossim/base/ossimObjectFactoryRegistry.h
@@ -0,0 +1,74 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimObjectFactoryRegistry.h 22650 2014-02-28 14:39:20Z gpotts $
+#ifndef ossimObjectFactoryRegistry_HEADER
+#define ossimObjectFactoryRegistry_HEADER
+#include <vector>
+
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimObjectFactory.h>
+#include <ossim/base/ossimFactoryListInterface.h>
+
+class ossimKeywordlist;
+class ossimString;
+class OSSIMDLLEXPORT ossimObjectFactoryRegistry : public ossimObject,
+                                                  public ossimFactoryListInterface<ossimObjectFactory, ossimObject>
+{
+public:
+   virtual ~ossimObjectFactoryRegistry();
+   static ossimObjectFactoryRegistry* instance();
+   
+   virtual ossimObject* createObject(const ossimString& name)const
+   {
+      return createObjectFromRegistry(name);
+   }
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
+                                     const char* prefix=0)const
+   {
+      return createObjectFromRegistry(kwl, prefix);
+   }
+   
+   /*!
+    * Returns a type list of all objects that can be instantiated
+    * through the createObjectMethods above.
+    */
+   virtual void getTypeNameList(std::vector<ossimString>& typeList)const
+   {
+      getAllTypeNamesFromRegistry(typeList);
+   }
+
+   /*!
+    * returns a list of objects that are of the passed in
+    * base type.  for example:
+    *
+    *  If I want all ossimImageSource objects then I call:
+    *
+    *  ossimObjectFactoryRegistry::instance()->getTypeNameList(l,
+    *                                                          "ossimImageSource");
+    */ 
+   virtual void getTypeNameList(std::vector<ossimString>& typeList,
+                                const ossimString& baseType)const;
+   
+protected:
+   ossimObjectFactoryRegistry();//hide
+   ossimObjectFactoryRegistry(const ossimObjectFactoryRegistry&):ossimObject(){}//hide
+   void operator =(const ossimObjectFactoryRegistry&){}//hide
+   
+//   std::vector<ossimObjectFactory*>   theFactoryList;
+
+//   ossimObjectFactory* findFactory(ossimObjectFactory* factory)const;
+
+TYPE_DATA
+};
+
+extern "C"
+{
+  OSSIMDLLEXPORT void* ossimObjectFactoryRegistryGetInstance();
+}
+#endif
diff --git a/include/ossim/base/ossimObservationSet.h b/ossim/include/ossim/base/ossimObservationSet.h
similarity index 100%
rename from include/ossim/base/ossimObservationSet.h
rename to ossim/include/ossim/base/ossimObservationSet.h
diff --git a/include/ossim/base/ossimOutputSource.h b/ossim/include/ossim/base/ossimOutputSource.h
similarity index 100%
rename from include/ossim/base/ossimOutputSource.h
rename to ossim/include/ossim/base/ossimOutputSource.h
diff --git a/include/ossim/base/ossimPackedBits.h b/ossim/include/ossim/base/ossimPackedBits.h
similarity index 100%
rename from include/ossim/base/ossimPackedBits.h
rename to ossim/include/ossim/base/ossimPackedBits.h
diff --git a/ossim/include/ossim/base/ossimPointHash.h b/ossim/include/ossim/base/ossimPointHash.h
new file mode 100644
index 0000000..df7d178
--- /dev/null
+++ b/ossim/include/ossim/base/ossimPointHash.h
@@ -0,0 +1,29 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+// Description: Point Hash is a base for hashing functions
+//              
+//*******************************************************************
+//  $Id: ossimPointHash.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimPointHash_HEADER
+#define ossimPointHash_HEADER
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimFpt.h>
+
+class OSSIMDLLEXPORT ossimPointHash
+{
+public:
+   virtual ~ossimPointHash(){}
+   virtual long operator ()(const ossimDpt &aPoint)=0;
+   virtual long operator ()(const ossimFpt &aPoint)=0;
+};
+
+#endif
+
diff --git a/include/ossim/base/ossimPointObservation.h b/ossim/include/ossim/base/ossimPointObservation.h
similarity index 100%
rename from include/ossim/base/ossimPointObservation.h
rename to ossim/include/ossim/base/ossimPointObservation.h
diff --git a/ossim/include/ossim/base/ossimPolyArea2d.h b/ossim/include/ossim/base/ossimPolyArea2d.h
new file mode 100644
index 0000000..1545ad6
--- /dev/null
+++ b/ossim/include/ossim/base/ossimPolyArea2d.h
@@ -0,0 +1,151 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//*******************************************************************
+//$Id: ossimPolyArea2d.h 23608 2015-10-28 13:51:35Z gpotts $
+
+#ifndef ossimPolyArea2d_HEADER
+#define ossimPolyArea2d_HEADER 1
+
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimPolygon.h>
+#include <ossim/base/ossimReferenced.h>
+#include <vector>
+
+class OssimPolyArea2dPrivate;
+
+namespace geos
+{
+   namespace geom
+   {
+      class Geometry;
+   }
+}
+
+class OSSIM_DLL ossimPolyArea2d : public ossimReferenced
+{
+public:
+   friend class OssimPolyArea2dPrivate;
+   friend OSSIM_DLL std::ostream& operator <<(std::ostream& out, const ossimPolyArea2d& data);
+   
+   ossimPolyArea2d();
+   ossimPolyArea2d(const vector<ossimGpt>& polygon);
+   ossimPolyArea2d(const ossimPolygon& shell, const vector<ossimPolygon>& holes); 
+   
+   ossimPolyArea2d(const ossimDpt& p1,
+                   const ossimDpt& p2,
+                   const ossimDpt& p3,
+                   const ossimDpt& p4);
+   ossimPolyArea2d(const ossimPolyArea2d& rhs);
+   
+   ossimPolyArea2d(const ossimIrect& rect);
+   ossimPolyArea2d(const ossimDrect& rect);
+   ossimPolyArea2d(const ossimPolygon& polygon);
+   ~ossimPolyArea2d();
+   
+   void clear()
+   {
+      clearPolygons();
+   }
+   const ossimPolyArea2d& operator =(const ossimPolyArea2d& rhs);
+   const ossimPolyArea2d& operator =(const ossimPolygon& rhs);
+   const ossimPolyArea2d& operator =(const ossimIrect& rect);
+   const ossimPolyArea2d& operator =(const ossimDrect& rect);
+   const ossimPolyArea2d& operator =(const vector<ossimGpt>& polygon);
+   const ossimPolyArea2d& operator =(const vector<ossimDpt>& polygon);
+   const ossimPolyArea2d& operator &=(const ossimPolyArea2d& rhs);
+   ossimPolyArea2d operator &(const ossimPolyArea2d& rhs)const;
+   ossimPolyArea2d operator +(const ossimPolyArea2d& rhs)const;
+   const ossimPolyArea2d& operator +=(const ossimPolyArea2d& rhs);
+   ossimPolyArea2d operator -(const ossimPolyArea2d& rhs)const;
+   const ossimPolyArea2d& operator -=(const ossimPolyArea2d& rhs);
+   
+   bool intersects(const ossimPolyArea2d& rhs)const;
+   
+   void add(const ossimPolyArea2d& rhs);
+   bool getVisiblePolygons(vector<ossimPolygon>& polyList)const;
+   bool getPolygonHoles(vector<ossimPolygon>& polyList)const;
+   
+   /**
+    * @brief Gets all of the polygons stored with their holes embedded. This
+    * may be useful if an operation was performed on the original ossimPolyArea2d 
+    * that caused multiple polygons to be created internally.
+    *	 
+    * For example, if a rectangle is intersected with a U shape, the two top
+    * portions of the U would be their own separate polygon. It's also possible 
+    * for these polygons to contain their own holes. This function will return 
+    * the two top polygons as separate ossimPolyArea2d objects (with any of 
+    * their holes embedded inside them).
+    *
+    *  --------------------------------		 
+    * |                                |
+    * |                                |
+    * | ........           .........   |
+    * | .      .           .       .   |
+    *  -.------.-----------.-------.---
+    *   .      .           .       .
+    *   .      .............       .
+    *   .                          .
+    *   ............................
+    *   
+    * @param polylist an empty vector of ossimPolyArea2d that will be filled
+    * @return returns true if it successfully places polygons in the input vector
+    */
+   bool getCompletePolygons(vector<ossimPolyArea2d>& polyList)const;
+   
+   bool isEmpty()const;
+   bool isValid(bool displayValidationError = false)const;
+   bool isPointWithin(const ossimDpt& point)const;
+   bool isPointWithin(double x, double y)const;
+   void getBoundingRect(ossimDrect& rect);
+   
+   /**
+   * Returns the Well Known Text string
+   */
+   std::string toString()const;
+
+   /**
+    * @brief Buffers the ossimPolyArea2d shape and returns a copy. This method
+    * does not alter polygon.
+    *  
+    * @param distance is the distance to buffer the shape by. Positive values
+    * will expand the shape, and negative values will shrink the shape.
+    * @return A shape that is a buffered (expanded/contracted) version of this
+    * shape
+    */
+   ossimPolyArea2d getBufferedShape(double distance=FLT_EPSILON) const;
+   
+   ossimPolyArea2d& setToBufferedShape(double distance=FLT_EPSILON);
+
+   ossimPolyArea2d& toMultiPolygon();
+   bool saveState(ossimKeywordlist& kwl,
+                  const char* prefix=0)const;
+   bool loadState(const ossimKeywordlist& kwl,
+                  const char* prefix=0);
+   
+protected:
+   
+   void clearPolygons();
+   void recurseVisibleGeometries(ossimPolygon::Vector& polyList,
+                                 const geos::geom::Geometry* geom) const;
+   
+   void recurseHoles(ossimPolygon::Vector& polyList,
+                     const geos::geom::Geometry* geom) const;
+   
+   /**
+    * @brief Recurses over the Geometry object to load all complete polygons
+    * (a shell and any internal holes) into the ossimPolyArea2d.
+    */
+   void recurseCompleteGeometries(std::vector<ossimPolyArea2d>& polyList,
+                                  const geos::geom::Geometry* geom) const;
+   
+   OssimPolyArea2dPrivate* m_privateData;
+};
+
+#endif /* #ifndef ossimPolyArea2d_HEADER */
diff --git a/include/ossim/base/ossimPolyLine.h b/ossim/include/ossim/base/ossimPolyLine.h
similarity index 100%
rename from include/ossim/base/ossimPolyLine.h
rename to ossim/include/ossim/base/ossimPolyLine.h
diff --git a/ossim/include/ossim/base/ossimPolygon.h b/ossim/include/ossim/base/ossimPolygon.h
new file mode 100644
index 0000000..625042d
--- /dev/null
+++ b/ossim/include/ossim/base/ossimPolygon.h
@@ -0,0 +1,248 @@
+//*****************************************************************************
+// FILE: ossimPolygon.h
+//
+// Copyright (C) 2001 ImageLinks, Inc.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Contains declaration of class ossimPolygon.
+//   This class provides utilities associated with N-vertex, convex
+//   (i.e., only two intersections for any line passing through the polygon).
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimPolygon.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimPolygon_HEADER
+#define ossimPolygon_HEADER
+#include <iostream>
+#include <vector>
+using namespace std;
+
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimIrect.h>
+#include <vector>
+class ossimLine;
+
+/******************************************************************************
+ *
+ * CLASS:  ossimPolygon
+ *
+ *****************************************************************************/
+class OSSIMDLLEXPORT ossimPolygon
+{
+public:
+  typedef std::vector<ossimPolygon> Vector;
+   ossimPolygon();
+   ossimPolygon(const vector<ossimIpt>& polygon);
+   ossimPolygon(const vector<ossimDpt>& polygon);
+   ossimPolygon(int numVertices, const ossimDpt* vertex_array);
+
+   ossimPolygon(const ossimPolygon& copy_this);
+   
+   /**
+    * CONSTRUCTOR: Provided for convenience. Does not imply the polygon is
+    * limited to four vertices:
+    */
+   ossimPolygon(ossimDpt v1,
+                ossimDpt v2,
+                ossimDpt v3,
+                ossimDpt v4);
+   
+   ossimPolygon(const ossimIrect& rect);
+   ossimPolygon(const ossimDrect& rect);
+
+   ~ossimPolygon();
+
+   ossimDpt& operator[](int index);
+   
+   const ossimDpt& operator[](int index)const;
+
+   ossim_uint32 getVertexCount()const;
+   
+   ossim_uint32 getNumberOfVertices()const;
+
+   //! Returns polygon area. Negative indicates CW ordering of vertices (in right-handed coordinates)
+   double area()const;
+
+   void getIntegerBounds(ossim_int32& minX,
+                         ossim_int32& minY,
+                         ossim_int32& maxX,
+                         ossim_int32& maxY)const;
+   void getFloatBounds(ossim_float64& minX,
+                       ossim_float64& minY,
+                       ossim_float64& maxX,
+                       ossim_float64& maxY)const;
+
+   void getBoundingRect(ossimIrect& rect)const;
+   void getBoundingRect(ossimDrect& rect)const;
+
+   /**
+    * Initializes minRect with the minimum area rect (not-necessarily
+    * aligned with axes) that bounds this polygon.
+    *
+    * @param minRect Polygon to initialize with the minimum rect.
+    */
+   void getMinimumBoundingRect(ossimPolygon& minRect) const;
+   
+   void roundToIntegerBounds(bool compress=false);
+
+   void clear();
+
+   void addPoint(const ossimDpt& pt);
+   void addPoint(double x, double y);
+
+   ossimDpt midPoint()const;
+   
+   /**
+    * will sequence through the polygon and check to see if any values are NAN
+    */
+   bool hasNans()const;
+
+   const vector<ossimDpt>& getVertexList()const;
+      
+   /**
+    * Uses the ossimPolyArea2d class for the intersection
+    */
+   bool clipToRect(vector<ossimPolygon>& result,
+                   const ossimDrect& rect)const;
+
+   
+   /**
+    * METHOD: clipLineSegment(p1, p2)
+    * Implements Cyrus-Beck clipping algorithm as described in:
+    * http://www.daimi.au.dk/~mbl/cgcourse/wiki/cyrus-beck_line-clipping_.html
+    * Clips the line segment defined by thw two endpoints provided. The
+    * endpoints are modified as needed to represent the clipped line. Returnes
+    * true if intersection present.
+    */
+   bool clipLineSegment(ossimDpt& p1, ossimDpt& p2) const;
+
+   /**
+    * METHOD: pointWithin(ossimDpt)
+    * Returns TRUE if point is inside polygon.
+    */
+   bool pointWithin(const ossimDpt& point) const;
+
+   bool isPointWithin(const ossimDpt& point) const;
+
+   /**
+   * METHOD: isRectWithin()
+   * Returns true if all the corner points of the given rect fit within.
+   */
+   bool isRectWithin(const ossimIrect &rect) const;
+
+   /**
+   * METHOD: isPolyWithin()
+   * Returns true if all the vertices of the given polygon fit within.
+   */
+   bool isPolyWithin(const ossimPolygon &poly) const;
+
+   /**
+    * METHOD: vertex(index)
+    * Returns the ossimDpt vertex given the index. Returns false if no vertex
+    * defined.
+    */
+   bool vertex(int index, ossimDpt& tbd_vertex) const;
+
+   /**
+    * METHOD: nextVertex()
+    * Assigns the ossimDpt tbd_vertex following the current vertex. The current
+    * vertex is initialized with a call to vertex(int), or after the last
+    * vertex is reached. Returns false if no vertex defined. Intended to be
+    * when cycling through all vertices.
+    */
+   bool nextVertex(ossimDpt& tbd_vertex) const;
+
+   void reverseOrder();
+   /**
+    * OPERATORS: (Some are inlined at bottom) 
+    */
+   const ossimPolygon& operator= (const ossimPolygon& copy_this);
+   const ossimPolygon& operator= (const vector<ossimDpt>& vertexList);
+   const ossimPolygon& operator= (const vector<ossimIpt>& vertexList);
+   const ossimPolygon& operator= (const ossimIrect& rect);
+   const ossimPolygon& operator= (const ossimDrect& rect);
+   bool                operator==(const ossimPolygon& compare_this) const;
+   bool                operator!=(const ossimPolygon& compare_this) const;
+
+   const ossimPolygon& operator *=(const ossimDpt& scale);
+   const ossimPolygon& operator *=(double scale);
+   
+   ossimPolygon operator *(const ossimDpt& scale)const;
+   ossimPolygon operator *(double scale)const;
+   
+   void resize(ossim_uint32 newSize);
+
+   /**
+    * METHOD: print()
+    */
+   void print(ostream& os) const;
+   friend ostream& operator<<(ostream&, const ossimPolygon&);
+
+
+   bool saveState(ossimKeywordlist& kwl,
+                  const char* prefix=0)const;
+   
+   bool loadState(const ossimKeywordlist& kwl,
+                  const char* prefix=0);
+
+   ossimVertexOrdering checkOrdering()const;
+
+   ossimVertexOrdering getOrdering()const;
+
+protected:
+   /**
+   * METHOD: getCentroid()
+   * Assigns the ossimDpt centroid the polygon.
+   * Warning: centroid is not guaranteed to be inside the polygon!
+    */
+   void getCentroid(ossimDpt &centroid) const;
+
+   /**
+   * METHOD: shrink()
+   * Shrinks the current polygon by inset, return true if success.
+    */
+   bool shrink(ossimPolygon &dest, double inset) const;
+   
+   /**
+   * METHOD: remove()
+   * Removes the vertex from the polygon.
+
+    */
+   void removeVertex(int vertex);
+   /**
+   * METHOD: removeSmallestContributingVertex()
+   * Removes the vertex that contributes the smallest area to the polygon.
+    */
+   void removeSmallestContributingVertex();
+
+   void intersectEdge(ossimDpt& result,
+                      const ossimLine& segment,
+                      const ossimDrect& rect,
+                      int edge);
+   
+   bool isInsideEdge(const ossimDpt& pt,
+                     const ossimDrect& rect,
+                     int edge)const;
+
+   /**
+   * Assigns destPt the point that fits a circle of given radius inside the polygon vertex.
+   * Warning: destPt is not guaranteed to be inside the polygon!
+   * (you may not be able to fit a circle of the given radius inside the polygon)
+   */
+   void fitCircleInsideVertex(ossimDpt &destPt, unsigned int vertex, double radius) const;
+
+   mutable ossimVertexOrdering theOrderingType;
+   vector<ossimDpt> theVertexList;
+   mutable ossim_int32 theCurrentVertex;
+};
+
+#endif /* End of "#ifndef ossimPolygon_HEADER" */
+
diff --git a/ossim/include/ossim/base/ossimPolynom.h b/ossim/include/ossim/base/ossimPolynom.h
new file mode 100644
index 0000000..5f2d78f
--- /dev/null
+++ b/ossim/include/ossim/base/ossimPolynom.h
@@ -0,0 +1,872 @@
+///////////////////////////////////////////////////////////////////////////////
+// ossimPolynom.h
+// Author: Frederic Claudel Meraka/CSIR, 2005
+///////////////////////////////////////////////////////////////////////////////
+//
+//TODO : check if automatically removing small monoms is actually viable
+//
+//TBD : normalization for Least Mean Square fit
+//TBD : copy constructor for different DIM
+//TBD : LOW PRIORITY redo serialization so that doesn't have to use strings (streams only)
+
+#ifndef ossimPolynom_HEADER
+#define ossimPolynom_HEADER
+
+#include <cmath>
+#include <vector>
+#include <map>
+#include <set>
+#include <iostream>
+#include <iomanip>
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/matrix/newmat.h>
+#include <ossim/matrix/newmatap.h>
+
+/**
+ * template class for multivariate polynom algebra
+ *
+ * T   : the storage type, constraints: must have 0 (zero) as value, support ops fabs + - * /
+ * DIM : the dimension of the input space, integer (>=1, default : 1)
+ *
+ * stores a set of monoms, a monom is (exponent tuples + coefficient)
+ * requires a precion (epsilon) for comparisons
+ * note: monoms absolute values below epsilon are removed from the map
+ */
+template < class T, int DIM = 1 >
+class  ossimPolynom
+{
+public:
+   /**
+    * inner types
+    */
+   typedef std::vector< int > EXP_TUPLE; //! type to store exponent tuples
+   typedef std::vector< T >   VAR_TUPLE; //! type to store multivariate input
+
+   struct EXP_TUPLE_LESSTHAN //! inner functor for sorting exponent tuples
+   {
+      //warning both EXP_TUPLE should have same dimension (not necessarily DIM)
+      bool operator()(const EXP_TUPLE& o1, const EXP_TUPLE& o2)const
+      {
+         for(unsigned int i=0;i<o1.size();++i)
+         {
+            if (o1[i]<o2[i])
+            {
+               return true;
+            } else if (o1[i]>o2[i])
+            {
+               return false;
+            }
+         }
+         return false;
+      }
+   };
+
+   typedef std::map< EXP_TUPLE, T , EXP_TUPLE_LESSTHAN > MONOM_MAP; //! for storing polynom
+
+   typedef std::set< EXP_TUPLE, EXP_TUPLE_LESSTHAN >     EXPT_SET; //! for storing set of exponent tuples
+
+   /** 
+    * construction : 
+    * 
+    */
+    //TBD : by default, adapt epsilon to template type T
+   ossimPolynom(const T& epsilon = 0) //! must supply epsilon value, default 0
+      : theEpsilon(epsilon)
+   {}
+
+   ossimPolynom(const ossimPolynom& p) : 
+      theMonoms(p.getMonoms()),
+      theEpsilon(p.getEpsilon())
+   {}
+
+   ~ossimPolynom()
+   {}
+
+   const ossimPolynom& operator=(const ossimPolynom< T, DIM >& pt)
+   {
+      if (this != &pt)
+      {
+         theEpsilon = pt.getEpsilon();
+         theMonoms  = pt.getMonoms();
+      }
+      return *this;
+   }
+
+   void setMonom(const EXP_TUPLE& m, const T& v)
+   {
+      if (isNegligible(v))
+      {
+         theMonoms.erase(m); //TBC TBD: what happens if m is not in the map?
+      } else {
+         theMonoms[m] = v;
+      }
+   }
+
+   void setMonom(const int mexp[DIM], const T& v)
+   {
+      EXP_TUPLE mexpV(mexp,mexp+DIM);
+      if (isNegligible(v))
+      {
+         theMonoms.erase(mexpV); //TBC TBD: what happens if m is not in the map?
+      } else {
+         theMonoms[mexpV] = v;
+      }
+   }
+
+
+   inline void delMonom(const EXP_TUPLE& m)
+   {
+      theMonoms.erase(m); //TBC TBD: what happens if m is not in the map?
+   }
+
+   T getCoeff(const EXP_TUPLE& m)const
+   {
+      typename MONOM_MAP::const_iterator it = theMonoms.find(m);
+      if (it != theMonoms.end())
+      {
+         return it->second;
+      } else {
+         return 0;
+      }
+   }
+
+   void nullify()  //set to 0
+   {
+      theMonoms.clear();
+   }
+
+   inline bool isNull()const
+   {
+      return (theMonoms.size() == 0);
+   }
+  
+   inline const MONOM_MAP& getMonoms()const 
+   {
+      return theMonoms;
+   }
+
+   inline const T& getEpsilon()const  //! no setEpsilon beacause might erase monoms
+   {
+      return theEpsilon;
+   }
+
+   /**
+    * comparison operators
+    * -don't compare theEpsilon values
+    * -use my own epsilon in comparisons (not the compared to's epsilon)
+    */
+   bool operator==(const ossimPolynom& pt)const
+   {
+      if (getMonoms().size() != pt.getMonoms().size()) return false;
+
+      // loop on my monoms
+      typename MONOM_MAP::const_iterator it;
+      for ( it = getMonoms().begin(); it != getMonoms().end() ; ++it )
+      {
+         if ( !isNegligible(it->second - pt.getCoeff(it->first)) ) return false;
+      }
+      return true; //same number of identical monoms
+   }
+
+   bool operator!=(const ossimPolynom& pt)const
+   {
+      return !operator==(pt);
+   }
+
+   inline bool isNegligible(const T& v)const //! can v be considered as zero?
+   {
+      return ( fabs(v) <= theEpsilon );
+   }   
+
+   /** 
+    * orders
+    */
+   int getOrder(int d)const //! returns maximum order of monoms for a specific dimension (d starts at 0)
+   {
+      if ((d>=DIM) || (d<0)) return -1; //error = no dimension
+
+      // loop on monoms
+      int order = -1; //for null polynom
+      int corder;
+      typename MONOM_MAP::const_iterator it;
+      for ( it = getMonoms().begin(); it != getMonoms().end() ; ++it )
+      {
+         corder = (it->first)[d];
+         if ( corder > order ) order = corder;
+      }
+      return order;
+   }
+
+   int getTotalOrder()const //! returns maximum order of monoms
+   {
+      int order = -1; //for null polynom
+      int sorder;
+      typename MONOM_MAP::const_iterator it;
+      for ( it = getMonoms().begin(); it != getMonoms().end() ; ++it )
+      {
+         sorder = 0;
+         for (int d=0;d<DIM;++d) sorder+=(it->first)[d];
+         if ( sorder > order ) order = sorder;
+      }
+      return order;
+   }
+
+   /**
+    * evaluation : needs DIM values as input
+    */
+   T eval(const VAR_TUPLE& v)const
+   {
+      T ev = 0;
+      //loop on monoms. TBD optimize powers using map order
+      typename MONOM_MAP::const_iterator it;
+      int p;
+      for ( it = getMonoms().begin(); it != getMonoms().end() ; ++it )
+      {
+         //compute powers
+         T mv = it->second;
+         for(int d=0;d<DIM;++d)
+         {
+            p = (it->first)[d];
+            if (p != 0)
+            {
+               mv *= std::pow( v[d], p );
+            }
+         }
+         //add momom value
+         ev += mv;
+      }
+      return ev;
+   }
+
+   /** 
+    * partial differentiation polynom
+    */
+   void pdiff(int pdim, ossimPolynom& result)const
+   {
+      result.nullify();
+      int ord;
+      //loop on monoms
+      for ( typename MONOM_MAP::const_iterator it = getMonoms().begin(); it != getMonoms().end() ; ++it )
+      {
+         ord = it->first[pdim];
+         if (ord>=1)
+         {
+            EXP_TUPLE expDiff(it->first);
+            expDiff[pdim] -= 1;
+            result.setMonom(expDiff, it->second * ord);
+         }
+      }
+   }
+
+   /**
+    * operations with scalar
+    */
+   const ossimPolynom& operator*=(const T& k)
+   {
+      //loop on monoms
+      for ( typename MONOM_MAP::const_iterator it = getMonoms().begin(); it != getMonoms().end() ; ++it )
+      {
+         it->second *= k;
+      }
+      discardNullMonoms();
+   }
+
+   /**
+    * arithmetic operators
+    */
+   ossimPolynom operator+(const ossimPolynom& p)const
+   {
+      ossimPolynom< T , DIM > sum(*this);
+      return (sum+=p);
+   }
+   ossimPolynom operator-(const ossimPolynom& p)const
+   {
+      ossimPolynom< T , DIM > diff(*this);
+      return (diff-=p);
+   }
+
+   const ossimPolynom& operator+=(const ossimPolynom& p)
+   {
+      typename MONOM_MAP::const_iterator it;
+      //loop on p monoms
+      for ( it = p.getMonoms().begin(); it != p.getMonoms().end() ; ++it )
+      {
+         setMonom( it->first, getCoeff(it->first) + it->second );
+      }
+      return *this;
+   }
+
+   const ossimPolynom& operator-=(const ossimPolynom& p)
+   {
+      typename MONOM_MAP::const_iterator it;
+      //loop on p monoms
+      for ( it = p.getMonoms().begin(); it != p.getMonoms().end() ; ++it )
+      {
+         setMonom( it->first, getCoeff(it->first) - it->second );
+      }
+      return *this;
+   }
+
+   /**
+    * product operator : use epsilon from left side
+    */
+   ossimPolynom operator*(const ossimPolynom& p)const
+   {
+      //do a stupid multiplication (sum all monom pairs)      
+      ossimPolynom< T , DIM > prod(getEpsilon());
+      T coeff;
+      //loop on p monoms
+      for ( typename MONOM_MAP::const_iterator it = getMonoms().begin(); it != getMonoms().end() ; ++it )
+      {      
+         for ( typename MONOM_MAP::const_iterator pit = p.getMonoms().begin(); pit != p.getMonoms().end() ; ++pit )
+         {
+            coeff = it->second * pit->second;
+            if (coeff!=0)
+            {
+               EXP_TUPLE prodExp(it->first);
+               addExpTuple(prodExp, pit->first);
+               prod.addMonomQuick(prodExp, coeff);
+            }
+         }
+      }
+      //scan for null monoms and discard
+      prod.discardNullMonoms();
+      return prod;
+   }
+
+   const ossimPolynom& operator*=(const ossimPolynom& p)
+   {
+      return operator=( this->operator*(p) );
+   }
+
+   static void addExpTuple(EXP_TUPLE& m1, const EXP_TUPLE& m2)
+   {
+      for(int i=0;i<DIM;++i) {
+         m1[i] += m2[i];
+      }
+   }
+   
+   /**
+    * I/O
+    * 
+    * stream serialization format :
+    *  [ k1 (e1_1,e1_2,...,e1_DIM) ; k2 (e2_1,e2_2,..,e2_DIM) ; kN (eN_1,...eN_DIM)]
+    *
+    * N is the number of monoms
+    * ei_j is exponent for dimension j and monom i
+    *
+    * order is not important
+    * all monoms should have the same dimension : DIM
+    * you should add eps=xxxx at the beginning, separated by semi-colon ; (by default epsilon is 0)
+    *
+    * examples:
+    *  [ ] is the null polynom, [ eps=1.0e-5 ] too
+    *  [ 1.0 (0) 3.5 (1) ] is polynom 1.0 + 3.5*x, with epsilon = 0
+    *  [ eps=1.0E-12 ;  2.0 (1,1,0) ; -1.0 (0,0,1) ] is polynom 2*x*y-z, with epsilon=10^-12
+    */
+   
+   std::ostream& print(std::ostream& os)const
+   {
+      static const char* monom_sep = " ; ";
+      static const char* no_sep    = "";
+
+      const char* use_sep = no_sep;
+
+      os<<"[";
+      os<<std::setprecision(16); //16 for double, TBD TBC: adapt to epsilon
+      os<<std::setiosflags(std::ios_base::scientific);
+      //output epsilon if not null
+      if (getEpsilon() > 0)
+      {         
+         os<<use_sep<<"eps="<<getEpsilon();
+         use_sep=monom_sep;
+      }
+      //loop on monoms
+      for ( typename MONOM_MAP::const_iterator it = getMonoms().begin(); it != getMonoms().end() ; ++it )
+      {
+         os<<use_sep<<it->second<<"(";
+         for(int d=0 ; d<DIM ; ++d)
+         {
+            /* if (d>0) */
+            /* { */
+            /*    os<<","; */
+            /* } */
+            os<<(it->first)[d];
+         }
+         os<<")";
+         use_sep=monom_sep;
+      }
+      os<<"]";
+      return os;
+   }
+ 
+   std::ostream& 
+   printNice(std::ostream& os, const char symbols[DIM]) //!classic representation (bad accuracy, for display only)
+   {
+      if (getMonoms().size() == 0)
+      {
+         os<<"0"; //zero
+      } else {
+         os<<std::setiosflags(std::ios_base::fixed);
+         os<<std::setprecision(14); //14 for double, TBD TBC: adapt to epsilon
+         //loop on monoms (map order)
+         for ( typename MONOM_MAP::const_iterator it = getMonoms().begin(); it != getMonoms().end() ; ++it )
+         {
+            T coeff = it->second;
+            if (coeff>0)
+            {
+               os<<"+";
+            }
+            os<<coeff;
+            for(int d=0;d<DIM;++d) 
+            {
+               int ord=(it->first)[d];
+               if (ord>0)
+               {
+                  os<<""<<symbols[d];
+                  if (ord != 1)
+                  {
+                     os<<ord;
+                  }
+               }
+            }
+         }
+      }
+      return os;
+   }
+
+   std::istream& import(std::istream& is) //! note that it can only import for the template type T and dimesnion DIM
+   {
+      nullify();
+
+      //extract data in brackets [ ]
+      //swallow bracket
+      ossimString tempString;
+      char tempChar;
+      is.get(tempChar);
+      if (!is) 
+      {
+         std::cerr<<"ossimPolynom::import ERROR, cannot read left bracket ["<<std::endl;
+         return is;
+      }
+      if (tempChar != '[')
+      {
+         std::cerr<<"ossimPolynom::import ERROR, missing left bracket ["<<std::endl;
+         return is;
+      }
+      const int BUFSIZE=32768;  //should be enough fro most apps (TBC TBD : allow loops if not enough)
+      char buffer[BUFSIZE];
+      is.getline(buffer, BUFSIZE, ']');
+      if (!is)
+      {
+         std::cerr<<"ossimPolynom::import ERROR, cannot read after left bracket ["<<std::endl;
+         return is;
+      }     
+      if (is.gcount() >= BUFSIZE-1)
+      {
+         std::cerr<<"ossimPolynom::import ERROR, cannot find right bracket ] after "<<BUFSIZE-1<<"characters"<<std::endl;
+         return is;
+      }
+      tempString = buffer; //no more brackets
+
+      //split string using semicolons
+      std::vector< ossimString > subparts = tempString.explode(";");
+      //loop on subparts
+      for (typename std::vector< ossimString >::const_iterator it=subparts.begin() ; it!=subparts.end() ; ++it )
+      {
+         ossimString sp = it->trim();
+         //check for epsilon
+         ossimString aft_eps=sp.after("eps=");
+         if (aft_eps.size()>0)
+         {
+            //get epsilon value
+            aft_eps.trim();
+            theEpsilon = static_cast< T >(aft_eps.toDouble());
+         } else {
+            //no epsilon : must be a monom
+            ossimString scalpart=sp.before("(");
+            if (scalpart.size() < sp.size())
+            {
+              T coeff = static_cast< T >(scalpart.toDouble());
+              ossimString expopart = ((sp.before(")")).after("(")).trim();
+              if (expopart.size() == 0)
+              {
+                 std::cerr<<"ossimPolynom::import ERROR, cannot find ) in monom or empty monom"<<std::endl;
+                 return is;
+              }
+              std::vector< ossimString > vexpo = expopart.explode(",");
+              if (vexpo.size() != DIM)
+              {
+                 std::cerr<<"ossimPolynom::import ERROR, bad number of exponents in monom (need "<<DIM<<"): "<<vexpo.size()<<std::endl;
+                 return is;
+              }
+              //store all exponents
+              EXP_TUPLE expt(DIM);
+              int d;
+              std::vector< ossimString >::const_iterator eit;
+              for (eit=vexpo.begin() , d=0 ; eit != vexpo.end() ; ++eit, ++d )
+              {
+                 expt[d] = eit->toInt(); //TBD : could check that value is integer, but how?
+              }
+              //add new monom (if duplicate...error)
+              if (getMonoms().find(expt) != getMonoms().end())
+              {
+                 std::cerr<<"ossimPolynom::import ERROR, duplicate exponent tuple in polynom"<<std::endl;
+                 return is;
+              }
+              theMonoms[expt] = coeff;
+
+            } else {
+               std::cerr<<"ossimPolynom::import ERROR, cannot find left parenthesis ( in monom "<<std::endl;
+               return is;
+            }
+         }
+      }
+
+      return is;
+   }
+/**
+ * constructs simple exponent tuples set for using LMSfit
+ * need order for each dimension
+ */
+ EXPT_SET builExpSet(const EXP_TUPLE& orders)const
+ {
+    EXPT_SET eset;
+    if (orders.size() != DIM)
+    {
+       std::cerr<<"ossimPolynom::import ERROR bad dimension for parameter, need "<<DIM<<" elements"<<std::endl;
+       return eset;
+    }
+    //initialise variable exponent tuple
+    EXP_TUPLE et(DIM);
+    for(int d=0;d<DIM;++d) et[d]=0;
+    while (et[0] <= orders[0])
+    {
+      //add tuple to set
+      eset.insert(et);
+
+      //increment tuple within bounds
+      et[DIM-1]++;
+      for(int d=DIM-1 ; d>=0 ; --d)
+      {
+         if ((et[d] > orders[d]) && (d>0))
+         {
+            et[d] = 0;
+            et[d-1]++;
+         }
+      }
+    }
+    return eset;
+ }
+
+ /** 
+  * concatenate exponents (at the right) to existing tuple set, for a given maximum total order
+  * eg: with eset={(0,1),(0,0)} , 
+  * then addExpTuple(2,1,eset) = {(0,1,0,0),(0,1,0,1),(0,1,1,0), (0,0,0,0),(0,0,0,1),(0,0,1,0)}
+  */
+ void addExpTupleRight(int newdim, int totalOrder, EXPT_SET& eset )const
+ {
+    EXPT_SET newset;
+    // add a copy off eset for each order with the specific last dim
+    for(int o=0; o<=totalOrder ; ++o)
+    {
+       EXPT_SET extset; //extended set
+       if (eset.size()==0)
+       {
+          EXP_TUPLE tu(1);
+          tu[0]=o;
+          extset.insert(tu);
+       } else {
+          //we have to construct a new set from eset, extending dimension
+          // cause: stored tuples cannot be compared at different dimensions
+          for(typename EXPT_SET::iterator sit = eset.begin(); sit != eset.end(); ++sit)
+          {
+             EXP_TUPLE tu(*sit);
+             tu.push_back(o);
+             extset.insert(tu);
+          }
+       }
+       //recursively add remaining dimensions
+       if (newdim>1)
+       {
+          addExpTupleRight(newdim-1, totalOrder-o, extset); //only dimension decreases
+       }
+       //add full set for the specific order
+       newset.insert(extset.begin(), extset.end());
+    }
+    eset=newset; //overwrite
+ }
+
+/**
+ * fits the polynom to the observations using Least Mean Squares
+ * returns true on success (can fail if not enough observations)
+ *  + also updates rms error(root mean square)
+ * NOTES: inputs must have same size and must be ordered the same way
+ *        use builExpSet() to construct classic polynoms 
+ * TODO: add weights to observations
+ */
+bool
+LMSfit(const EXPT_SET&                expset,
+       const std::vector< VAR_TUPLE > obs_input,
+       const std::vector< T >         obs_output,
+       T*                             prms = NULL)
+{
+   //init
+   nullify();
+
+   //check size
+   int nobs = (int)obs_input.size();
+   if (nobs != (int)obs_output.size())
+   {
+      std::cerr<<"ossimPolynom::LMSfit ERROR observation input/output must have the same size"<<std::endl;
+      return false;
+   }
+   if (nobs<=0)
+   {
+      std::cerr<<"ossimPolynom::LMSfit ERROR observation count is zero"<<std::endl;
+      return false;
+   }
+   int ncoeff = (int)expset.size();  
+   if (ncoeff<=0)
+   {
+      std::cerr<<"ossimPolynom::LMSfit ERROR exponent count is zero"<<std::endl;
+      return false;
+   }
+   
+   //construct LMS linear system (using OSSIM matrices)
+   // M.k = v
+   // M : monom matrix
+   // k : polynbm coefficients
+   // v : output_obs
+   NEWMAT::Matrix M(nobs, ncoeff);
+   double elt;
+   int p;
+   typename EXPT_SET::const_iterator cit;
+   typename std::vector< VAR_TUPLE >::const_iterator oit;
+   int i,j;
+   for (cit=expset.begin(), j=1; cit != expset.end() ; ++cit, ++j) //loop on exponent tuples
+   {
+      for(oit=obs_input.begin(), i=1; oit!=obs_input.end();++oit, ++i) //loop on observations
+      {
+         //compute powers using observation position
+         elt=1.0;
+         for(int d=0;d<DIM;++d)
+         {
+            p = (*cit)[d];
+            if (p != 0)
+            {
+               elt *= std::pow( (*oit)[d], p );
+            }
+         }
+         //init M
+         M(i,j) = elt; //NEWMAT indices start at 1
+      }
+   }
+
+   NEWMAT::ColumnVector v(nobs);
+   for(int o=0;o<nobs;++o)
+   {
+      v(o+1) = obs_output[o];
+   }
+
+   //build LMS symmetric matrix tM.M
+   //build best fit
+   NEWMAT::ColumnVector bfit = invert(M.t()*M)*M.t()*v; //TBD : check inversion
+
+   //compute RMS (optional, if rms non null)
+   if (prms!=NULL)
+   {
+      NEWMAT::ColumnVector delta = M*bfit - v;
+      *prms = std::sqrt( delta.SumSquare() / nobs);
+   }
+
+   //init polynom
+   for (cit=expset.begin(), j=1; cit != expset.end() ; ++cit, ++j) //loop on exponent tuples
+   {
+      setMonom(*cit, bfit(j));
+   }
+   return true;
+}
+
+
+/**
+ * Standard least squares
+ * Modified version of LMSfit that uses standard NEWMAT inverse as
+ *  alternative to SVD solution.
+ */
+bool
+SLSfit(const EXPT_SET&                expset,
+       const std::vector< VAR_TUPLE > obs_input,
+       const std::vector< T >         obs_output,
+       T*                             prms = NULL)
+{
+   //init
+   nullify();
+
+   //check size
+   int nobs = (int)obs_input.size();
+   if (nobs != (int)obs_output.size())
+   {
+      std::cerr<<"ossimPolynom::LMSfit ERROR observation input/output must have the same size"<<std::endl;
+      return false;
+   }
+   if (nobs<=0)
+   {
+      std::cerr<<"ossimPolynom::LMSfit ERROR observation count is zero"<<std::endl;
+      return false;
+   }
+   int ncoeff = (int)expset.size();  
+   if (ncoeff<=0)
+   {
+      std::cerr<<"ossimPolynom::LMSfit ERROR exponent count is zero"<<std::endl;
+      return false;
+   }
+   
+   // M : monom matrix
+   // k : polynomial coefficients
+   // v : output_obs
+   NEWMAT::Matrix M(nobs, ncoeff);
+   double elt;
+   int p;
+   typename EXPT_SET::const_iterator cit;
+   typename std::vector< VAR_TUPLE >::const_iterator oit;
+   int i,j;
+   for (cit=expset.begin(), j=1; cit != expset.end() ; ++cit, ++j) //loop on exponent tuples
+   {
+      for(oit=obs_input.begin(), i=1; oit!=obs_input.end();++oit, ++i) //loop on observations
+      {
+         elt=1.0;
+         for(int d=0;d<DIM;++d)
+         {
+            p = (*cit)[d];
+            if (p != 0)
+            {
+               elt *= std::pow( (*oit)[d], p );
+            }
+         }
+         M(i,j) = elt;
+      }
+   }
+
+   NEWMAT::ColumnVector v(nobs);
+   for(int o=0;o<nobs;++o)
+   {
+      v(o+1) = obs_output[o];
+   }
+
+   //perform solution
+   NEWMAT::ColumnVector bfit = (M.t()*M).i()*M.t()*v;
+
+   //compute RMS (optional, if rms non null)
+   if (prms!=NULL)
+   {
+      NEWMAT::ColumnVector delta = M*bfit - v;
+      *prms = std::sqrt( delta.SumSquare() / nobs);
+   }
+
+   //init polynom
+   for (cit=expset.begin(), j=1; cit != expset.end() ; ++cit, ++j) //loop on exponent tuples
+   {
+      setMonom(*cit, bfit(j));
+   }
+   return true;
+}
+
+protected:
+   /**
+    * protected data members
+    */
+   MONOM_MAP theMonoms; //!associate a scalar to each tuple of orders : monom
+
+   T theEpsilon; //! positive values below epsilon are considered 0 
+
+   /**
+    * method to erase all negligible monoms : user don't need that (automatic)
+    */
+   void
+   discardNullMonoms()
+   {     
+      std::vector< typename MONOM_MAP::iterator > erasev; //storage for iterators on elements to erase
+      for (typename MONOM_MAP::iterator it = theMonoms.begin(); it != theMonoms.end() ; ++it )
+      {
+         if (isNegligible(it->second)) erasev.push_back(it);
+      }
+      //erase all elements afterwards
+      for ( typename std::vector< typename MONOM_MAP::iterator >::const_iterator vit = erasev.begin(); vit != erasev.end() ; ++vit )
+      {
+         theMonoms.erase(*vit); //*vit is  an iterator in theMonoms
+      }      
+   }
+
+   /**
+    * add value without testing for negligible
+    */
+   void 
+   addMonomQuick(const EXP_TUPLE& m, const T& v)
+   {
+      typename MONOM_MAP::iterator it = theMonoms.find(m);
+      if (it != theMonoms.end())
+      {
+         it->second  += v;
+      } else {
+         theMonoms.insert( MONOM_MAP::value_type(m,v));
+      }
+   }
+
+   /** 
+    * invert stolen from ossimRpcSolver
+    */
+   NEWMAT::Matrix 
+   invert(const NEWMAT::Matrix& m)const
+   {
+      ossim_uint32 idx = 0;
+      NEWMAT::DiagonalMatrix d;
+      NEWMAT::Matrix u;
+      NEWMAT::Matrix v;
+
+      // decompose m.t*m which is stored in Temp into the singular values and vectors.
+      //
+      NEWMAT::SVD(m, d, u, v, true, true);
+      
+      // invert the diagonal
+      // this is just doing the reciprical fo all diagonal components and store back int
+      // d.  ths compute d inverse.
+      //
+      for(idx=0; idx < (ossim_uint32)d.Ncols(); ++idx)
+      {
+         if(d[idx] > getEpsilon()) //adpated here for epsilon
+         {
+            d[idx] = 1.0/d[idx];
+         }
+         else
+         {
+            d[idx] = 0.0;
+         }
+      }
+
+      //compute inverse of decomposed m;
+      return v*d*u.t();
+   }
+
+}; //class ossimPolynom
+
+
+
+/**
+ * stream operators
+ */
+template < class T, int DIM  > std::ostream& 
+operator<<(std::ostream& os, const ossimPolynom<T,DIM>& pt)
+{
+   return pt.print(os);
+}
+
+template < class T, int DIM > std::istream&
+operator>>(std::istream& is, ossimPolynom<T,DIM>& pt)
+{
+   return pt.import(is);
+}
+
+#endif
diff --git a/include/ossim/base/ossimPool.h b/ossim/include/ossim/base/ossimPool.h
similarity index 100%
rename from include/ossim/base/ossimPool.h
rename to ossim/include/ossim/base/ossimPool.h
diff --git a/include/ossim/base/ossimPoolObject.h b/ossim/include/ossim/base/ossimPoolObject.h
similarity index 100%
rename from include/ossim/base/ossimPoolObject.h
rename to ossim/include/ossim/base/ossimPoolObject.h
diff --git a/include/ossim/base/ossimPreferences.h b/ossim/include/ossim/base/ossimPreferences.h
similarity index 100%
rename from include/ossim/base/ossimPreferences.h
rename to ossim/include/ossim/base/ossimPreferences.h
diff --git a/ossim/include/ossim/base/ossimProcessInterface.h b/ossim/include/ossim/base/ossimProcessInterface.h
new file mode 100644
index 0000000..358aa70
--- /dev/null
+++ b/ossim/include/ossim/base/ossimProcessInterface.h
@@ -0,0 +1,86 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimProcessInterface.h 23353 2015-06-01 19:19:10Z dburken $
+#ifndef ossimProcessInterface_HEADER
+#define ossimProcessInterface_HEADER 1
+#include <ossim/base/ossimRtti.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimProcessProgressEvent.h>
+#include <ossim/base/ossimListenerManager.h>
+#include <iosfwd>
+
+class ossimObject;
+class ossimListenerManager;
+
+class OSSIMDLLEXPORT ossimProcessInterface
+{
+public:
+
+   enum ossimProcessStatus
+   {
+      PROCESS_STATUS_UNKNOWN       = 0,
+      PROCESS_STATUS_EXECUTING     = 1,
+      PROCESS_STATUS_ABORTED       = 2,
+      PROCESS_STATUS_ABORT_REQUEST = 3,
+      PROCESS_STATUS_NOT_EXECUTING = 4
+   };
+   
+   ossimProcessInterface();
+   
+   virtual ~ossimProcessInterface();
+   
+   virtual ossimObject* getObject()=0;
+   virtual const ossimObject* getObject()const=0;
+   virtual bool execute()=0;
+   
+   virtual void abort();
+
+   bool needsAborting()const;
+
+   bool isAbortRequested()const;
+
+   bool isAborted()const;
+
+   bool isExecuting()const;
+
+   ossimProcessStatus getProcessStatus()const;
+
+   virtual void setProcessStatus(ossimProcessStatus processStatus);
+
+   virtual double getPercentComplete()const;
+
+   virtual void setPercentComplete(double percentComplete);
+
+   virtual ossimListenerManager* getManager();
+
+   void enableEvents();
+   
+   void disableEvents();
+
+   void setCurrentMessage(const ossimString& message);
+
+   /*!
+    *  Called by friend operator<< function, derived classes should override
+    *  if something different is desired.
+    */
+   virtual std::ostream& print(std::ostream& out) const;
+   
+   friend OSSIM_DLL std::ostream& operator<<(std::ostream& out,
+                                             const ossimProcessInterface& data);
+   
+protected:
+   double              thePercentComplete;
+   ossimProcessStatus  theProcessStatus;
+   ossimString         theMessage;
+   bool                theEventFlag;
+
+TYPE_DATA
+};
+
+#endif
diff --git a/ossim/include/ossim/base/ossimProcessListener.h b/ossim/include/ossim/base/ossimProcessListener.h
new file mode 100644
index 0000000..639613d
--- /dev/null
+++ b/ossim/include/ossim/base/ossimProcessListener.h
@@ -0,0 +1,30 @@
+//----------------------------------------------------------------------------
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+// $Id: ossimProcessListener.h 23664 2015-12-14 14:17:27Z dburken $
+//----------------------------------------------------------------------------
+#ifndef ossimProcessListener_HEADER
+#define ossimProcessListener_HEADER
+#include <ossim/base/ossimListener.h>
+
+class ossimProcessProgressEvent;
+
+class OSSIMDLLEXPORT ossimProcessListener : public ossimListener
+{
+public:
+   ossimProcessListener();
+   virtual ~ossimProcessListener();
+   virtual void processEvent(ossimEvent& event);
+   virtual void processProgressEvent(ossimProcessProgressEvent& event);
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/base/ossimProcessProgressEvent.h b/ossim/include/ossim/base/ossimProcessProgressEvent.h
new file mode 100644
index 0000000..5550214
--- /dev/null
+++ b/ossim/include/ossim/base/ossimProcessProgressEvent.h
@@ -0,0 +1,52 @@
+//----------------------------------------------------------------------------
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+// Description: Event for process progress.
+//
+// $Id: ossimProcessProgressEvent.h 23664 2015-12-14 14:17:27Z dburken $
+//----------------------------------------------------------------------------
+#ifndef ossimProcessProgressEvent_HEADER
+#define ossimProcessProgressEvent_HEADER
+
+#include <ossim/base/ossimEvent.h>
+#include <ossim/base/ossimString.h>
+
+class OSSIMDLLEXPORT ossimProcessProgressEvent : public ossimEvent
+{
+public:
+   ossimProcessProgressEvent(ossimObject* owner=NULL,
+                             double percentComplete=0.0,
+                             const ossimString message="",
+                             bool outputMessageFlag=false);
+
+   virtual ossimObject* dup()const;
+   
+   double getPercentComplete()const;
+   
+   ossimString getMessage()const;
+
+   void getMessage(ossimString& message)const;
+   
+   void setPercentComplete(double percentComplete);
+   
+   void setMessage(const ossimString& message);
+
+   void setOutputMessageFlag(bool flag);
+
+   bool getOutputMessageFlag() const;
+      
+protected:
+   double      thePercentComplete;
+   ossimString theMessage;
+   bool        theOutputMessageFlag;
+
+TYPE_DATA
+};
+#endif
+
diff --git a/include/ossim/base/ossimProperty.h b/ossim/include/ossim/base/ossimProperty.h
similarity index 100%
rename from include/ossim/base/ossimProperty.h
rename to ossim/include/ossim/base/ossimProperty.h
diff --git a/include/ossim/base/ossimPropertyEvent.h b/ossim/include/ossim/base/ossimPropertyEvent.h
similarity index 100%
rename from include/ossim/base/ossimPropertyEvent.h
rename to ossim/include/ossim/base/ossimPropertyEvent.h
diff --git a/ossim/include/ossim/base/ossimPropertyInterface.h b/ossim/include/ossim/base/ossimPropertyInterface.h
new file mode 100644
index 0000000..36c5b4c
--- /dev/null
+++ b/ossim/include/ossim/base/ossimPropertyInterface.h
@@ -0,0 +1,41 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// LICENSE: MIT see top level license.txt
+//
+// Author: Garrett Potts (gpotts at imagelinks)
+//
+//*************************************************************************
+// $Id: ossimPropertyInterface.h 23666 2015-12-14 20:01:22Z rashadkm $
+#ifndef ossimPropertyInterface_HEADER
+#define ossimPropertyInterface_HEADER
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimProperty.h>
+
+
+class OSSIM_DLL ossimPropertyInterface
+{
+public:
+   ossimPropertyInterface()
+      {}
+   
+   virtual ~ossimPropertyInterface()
+      {}
+
+   virtual void setProperty(const ossimString& name,
+                            const ossimString& value);
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const; 
+	virtual ossimString getPropertyValueAsString(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   void getPropertyList(std::vector<ossimRefPtr<ossimProperty> >& propertyList)const;
+   void setProperties(std::vector<ossimRefPtr<ossimProperty> >& propertyList);
+   
+protected:
+   
+TYPE_DATA
+};
+
+#endif
diff --git a/include/ossim/base/ossimPropertyInterfaceFactory.h b/ossim/include/ossim/base/ossimPropertyInterfaceFactory.h
similarity index 100%
rename from include/ossim/base/ossimPropertyInterfaceFactory.h
rename to ossim/include/ossim/base/ossimPropertyInterfaceFactory.h
diff --git a/include/ossim/base/ossimPropertyInterfaceRegistry.h b/ossim/include/ossim/base/ossimPropertyInterfaceRegistry.h
similarity index 100%
rename from include/ossim/base/ossimPropertyInterfaceRegistry.h
rename to ossim/include/ossim/base/ossimPropertyInterfaceRegistry.h
diff --git a/include/ossim/base/ossimProtocolStream.h b/ossim/include/ossim/base/ossimProtocolStream.h
similarity index 100%
rename from include/ossim/base/ossimProtocolStream.h
rename to ossim/include/ossim/base/ossimProtocolStream.h
diff --git a/include/ossim/base/ossimQuadTreeWarp.h b/ossim/include/ossim/base/ossimQuadTreeWarp.h
similarity index 100%
rename from include/ossim/base/ossimQuadTreeWarp.h
rename to ossim/include/ossim/base/ossimQuadTreeWarp.h
diff --git a/include/ossim/base/ossimQuadrilateralMap.h b/ossim/include/ossim/base/ossimQuadrilateralMap.h
similarity index 100%
rename from include/ossim/base/ossimQuadrilateralMap.h
rename to ossim/include/ossim/base/ossimQuadrilateralMap.h
diff --git a/include/ossim/base/ossimQuaternion.h b/ossim/include/ossim/base/ossimQuaternion.h
similarity index 100%
rename from include/ossim/base/ossimQuaternion.h
rename to ossim/include/ossim/base/ossimQuaternion.h
diff --git a/include/ossim/base/ossimROIEvent.h b/ossim/include/ossim/base/ossimROIEvent.h
similarity index 100%
rename from include/ossim/base/ossimROIEvent.h
rename to ossim/include/ossim/base/ossimROIEvent.h
diff --git a/include/ossim/base/ossimROIEventListener.h b/ossim/include/ossim/base/ossimROIEventListener.h
similarity index 100%
rename from include/ossim/base/ossimROIEventListener.h
rename to ossim/include/ossim/base/ossimROIEventListener.h
diff --git a/include/ossim/base/ossimRationalNumber.h b/ossim/include/ossim/base/ossimRationalNumber.h
similarity index 100%
rename from include/ossim/base/ossimRationalNumber.h
rename to ossim/include/ossim/base/ossimRationalNumber.h
diff --git a/ossim/include/ossim/base/ossimRectanglePartitioner.h b/ossim/include/ossim/base/ossimRectanglePartitioner.h
new file mode 100644
index 0000000..2e7ba6a
--- /dev/null
+++ b/ossim/include/ossim/base/ossimRectanglePartitioner.h
@@ -0,0 +1,148 @@
+//----------------------------------------------------------------------------
+// Copyright (C) 2004 David Burken, all rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+// Utility class to partition up a rectangle.
+//
+// $Id: ossimRectanglePartitioner.h 23664 2015-12-14 14:17:27Z dburken $
+//----------------------------------------------------------------------------
+#ifndef ossimRectanglePartitioner_HEADER
+#define ossimRectanglePartitioner_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <vector>
+
+class ossimIrect;
+
+/**
+ * class ossimRectanglePartitioner
+ * Utility class to partition up a rectangle.
+ */
+class OSSIMDLLEXPORT ossimRectanglePartitioner
+{
+public:
+
+   /** default construtor */
+   ossimRectanglePartitioner();
+
+   /** destructor */
+   ~ossimRectanglePartitioner();
+
+   /**
+    * Partitions the rectangle doing a binary split on the longest dimension
+    * until the total size is less than or equal to the "maxSizeInBytes".
+    * Initializes "result" with the resulting rectangles starting at the
+    * upper left corner.
+    *
+    * @param inputRectangle The source rectangle usually the bounding rectangle
+    * of a scene.
+    *
+    * @param result The vector of ossimIrects to hold the result.
+    *
+    * @param maxSizeInBytes Maximum size of the resulting rectangle partitions
+    * in bytes.
+    *
+    * @param bands The number of bands in the image.
+    *
+    * @param bytesPerPixel.  The number of bytes per pixel for a single band.
+    *
+    * @param internalOverlapPixels Overlap in pixels for desired partitions.
+    * (default = 0) This is added to all four sides of the rectangle so 
+    *
+    * @note The result rectangle passed in will be cleared for starters.
+    *
+    * @note Edge rectangles will be clipped to the inputRectangle.
+    */
+   void binaryPartition(const ossimIrect& inputRectangle,
+                        std::vector<ossimIrect>& result,
+                        ossim_uint64 maxSizeInBytes,
+                        ossim_uint32 bands,
+                        ossim_uint32 bytesPerPixel,
+                        ossim_uint32 internalOverlapPixels = 0) const;
+
+private:
+
+   /**
+    * Recursively splits the input rectangle until the size is less than
+    * or equal to maxSizeInBytes.
+    * 
+    * @param rect Input rectangle to split.
+    *
+    * @param maxSizeInBytes Maximum size of the resulting rectangle partitions
+    * in bytes.
+    *
+    * @param bands The number of bands in the image.
+    *
+    * @param bytesPerPixel.  The number of bytes per pixel for a single band.
+    *
+    * @param internalOverlapPixels Overlap in pixels for desired partitions.
+    * (default = 0)
+    *
+    * @note Will split the longest dimension.  If square will split in the
+    * lengthwise direction.
+    */
+   void splitUntilLessThanMax(ossimIrect& rect,
+                              ossim_uint64 maxSizeInBytes,
+                              ossim_uint32 bands,
+                              ossim_uint32 bytesPerPixel,
+                              ossim_uint32 internalOverlapPixels = 0) const;
+
+   /**
+    * Splits rectangle in half rounding up if needed.
+    *
+    * @param input Rectangle to split.
+    *
+    * @note output will be a zero base rect.
+    *
+    * @notes Will split the longest dimension.  If square will split in the
+    * lengthwise direction.
+    */
+   void splitRect(ossimIrect& rect) const;
+
+   /**
+    * @param rect Rectangle to give size for in bytes.
+    *
+    * @param bands The number of bands in the image.
+    *
+    * @param bytesPerPixel.  The number of bytes per pixel for a single band.
+    *
+    * @param internalOverlapPixels Overlap in pixels.
+    * (default = 0)
+    * 
+    * @return size of rectangle in bytes.
+    */
+   ossim_uint64 getSize(const ossimIrect& rect,
+                        ossim_uint32 bands,
+                        ossim_uint32 bytesPerPixel,
+                        ossim_uint32 internalOverlapPixels = 0) const;
+
+   /**
+    * Convenience trace method.
+    *
+    * @param r Input rectangle.
+    *
+    * @param v Vector of resulting partitioned rectangles.
+    *
+    * @param maxSizeInBytes Maximum size of the resulting rectangle partitions
+    * in bytes.
+    *
+    * @param bands The number of bands in the image.
+    *
+    * @param bytesPerPixel.  The number of bytes per pixel for a single band.
+    */
+   void trace(const ossimIrect& r,
+              const std::vector<ossimIrect>& v,
+              ossim_uint64 maxSizeInBytes,
+              ossim_uint32 bands,
+              ossim_uint32 bytesPerPixel) const;
+   
+};
+
+#endif /* End of "#ifndef ossimRectanglePartitioner_HEADER" */
+
diff --git a/ossim/include/ossim/base/ossimRectilinearDataObject.h b/ossim/include/ossim/base/ossimRectilinearDataObject.h
new file mode 100644
index 0000000..b5d98c4
--- /dev/null
+++ b/ossim/include/ossim/base/ossimRectilinearDataObject.h
@@ -0,0 +1,156 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimRectilinearDataObject.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimRectilinearDataObject_HEADER
+#define ossimRectilinearDataObject_HEADER
+#include <ossim/base/ossimDataObject.h>
+
+class OSSIMDLLEXPORT ossimRectilinearDataObject : public ossimDataObject
+{
+public:
+
+   /** default constructor */
+   ossimRectilinearDataObject();
+
+   ossimRectilinearDataObject(const ossimRectilinearDataObject&rhs);
+      
+   ossimRectilinearDataObject(ossim_uint32 numberOfSpatialComponents,
+                              ossimSource* owner,
+                              ossim_uint32 numberOfDataComponents,
+                              ossimScalarType scalarType=OSSIM_SCALAR_UNKNOWN,
+                              ossimDataObjectStatus status=OSSIM_NULL);
+   
+   /**
+    * This is a helper constructor that allows one to instantiate a one
+    * dimensional Spatial component with N number of data components.
+    * It will internally allocate theSpatialExtent to 1 and set the
+    * contents equal to the value passed in to length.
+    */
+   ossimRectilinearDataObject(ossimSource* owner,
+                              ossim_uint32 numberOfDataComponents,
+                              ossim_uint32 length,
+                              ossimScalarType scalarType=OSSIM_SCALAR_UNKNOWN,
+                              ossimDataObjectStatus status=OSSIM_NULL);
+
+   /**
+    * This is a helper constructor that allows one to instantiate a two
+    * dimensional Spatial component (WidthxHeight) with N number of
+    * data components.  It will internally allocate theSpatialExtent
+    * to 2 and set the contents equal to the value passed in to width, and
+    * height.
+    */
+   ossimRectilinearDataObject(ossimSource* owner,
+                              ossim_uint32 numberOfDataComponents,
+                              ossim_uint32 width,
+                              ossim_uint32 height,
+                              ossimScalarType scalarType=OSSIM_SCALAR_UNKNOWN,
+                              ossimDataObjectStatus status=OSSIM_NULL);
+
+   /**
+    * This is a helper constructor that allows one to instantiate a two
+    * dimensional Spatial component (WidthxHeightxDepth) with N number of
+    * data components.  It will internally allocate theSpatialExtent
+    * to 3 and set the contents equal to the value passed in to width,
+    * height, and depth.
+    */
+   ossimRectilinearDataObject(ossimSource* owner,
+                              ossim_uint32 numberOfDataComponents,
+                              ossim_uint32 width,
+                              ossim_uint32 height,
+                              ossim_uint32 depth,
+                              ossimScalarType   scalarType=OSSIM_SCALAR_UNKNOWN,
+                              ossimDataObjectStatus status=OSSIM_NULL);
+   
+
+   virtual ~ossimRectilinearDataObject();
+   /**
+    * How many components make up this data object.  For
+    * example:  If this were an RGB image data object then
+    * the number of components would be set to 3 and the
+    * RGB would be seen as a single data object being
+    * passed through.
+    */
+   virtual void setNumberOfDataComponents(ossim_uint32 n);
+   
+   virtual void setSpatialExtents(ossim_uint32* extents, ossim_uint32  size);
+
+   /**
+    *  See ossimScalarType in ossimConstants for a full list
+    *
+    *  OSSIM_SCALAR_UNKNOWN
+    *  OSSIM_UCHAR          Unsigned char
+    *  OSSIM_USHORT16       16bit unsigned short
+    *  OSSIM_SSHORT16       16bit signed short
+    *  OSSIM_USHORT11       11bit unsigned short
+    *  OSSIM_FLOAT          float
+    *  OSSIM_NORMALIZED_DOUBLE normalized 0 to 1 data
+    */
+   virtual void setScalarType(ossimScalarType type);
+
+   virtual ossim_uint32 getNumberOfDataComponents() const;
+
+   virtual ossim_uint32 getNumberOfSpatialComponents() const;
+
+   virtual const ossim_uint32* getSpatialExtents() const;
+
+   virtual ossimScalarType getScalarType() const;
+
+   virtual ossim_uint32 getScalarSizeInBytes()const;
+
+   virtual void*   getBuf();
+
+   virtual const void* getBuf() const;
+
+   virtual void assign(const ossimRectilinearDataObject* data);
+
+   /**
+    *  Initializes m_dataBuffer to current spatial extents.
+    *  
+    *  @notes
+    *
+    *  1) The underlying std::vector::resize() call with only be performed if
+    *  m_dataBuffer.size() is not equal to getDataSizeInBytes().
+    *
+    *  2) The status will be set to OSSIM_STATUS_UNKNOWN if a resize was
+    *  performed.
+    *
+    *  3) On error: catches std::bad_alloc exception and rethrows as
+    *  ossimException.
+    */
+   virtual void initialize();
+
+   virtual ossim_uint32 computeSpatialProduct()const;
+
+   virtual ossim_uint32 getDataSizeInBytes()const;
+
+   virtual std::ostream& print(std::ostream& out) const;
+
+   /**
+    * @brief assignment operator=
+    * @param rhs The data to assign from.
+    * @param A reference to this object.
+    */
+   virtual const ossimRectilinearDataObject& operator=(
+      const ossimRectilinearDataObject& rhs);
+
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+
+protected:
+   ossim_uint32              m_numberOfDataComponents;
+   ossimScalarType           m_scalarType;
+   std::vector<ossim_uint8>  m_dataBuffer;
+   std::vector<ossim_uint32> m_spatialExtents;
+   
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/base/ossimRefPtr.h b/ossim/include/ossim/base/ossimRefPtr.h
new file mode 100644
index 0000000..2fbec14
--- /dev/null
+++ b/ossim/include/ossim/base/ossimRefPtr.h
@@ -0,0 +1,87 @@
+/* -*-c++-*- ossim - Copyright (C) since 2004 Garrett Potts 
+ *
+ * This was taken directly from OpenSceneGraph and will retain OSGGPL license.
+ * This is basically an MIT.
+ * 
+*/
+#ifndef ossimRefPtr_HEADER
+#define ossimRefPtr_HEADER
+#include <ossim/base/ossimConstants.h>
+
+template<class T> class ossimRefPtr
+{
+ public:
+   typedef T element_type;
+   
+   ossimRefPtr() :m_ptr(0) {}
+   ossimRefPtr(T* t):m_ptr(t)              { if (m_ptr) m_ptr->ref(); }
+   ossimRefPtr(const ossimRefPtr& rp):m_ptr(rp.m_ptr)  { if (m_ptr) m_ptr->ref(); }
+   ~ossimRefPtr()                           { if (m_ptr) m_ptr->unref(); m_ptr=0; }
+   
+   inline ossimRefPtr& operator = (const ossimRefPtr& rp)
+      {
+         if (m_ptr==rp.m_ptr) return *this;
+         T* tmpPtr = m_ptr;
+         m_ptr = rp.m_ptr;
+         if (m_ptr) m_ptr->ref();
+         // unref second to prevent any deletion of any object which might
+         // be referenced by the other object. i.e rp is child of the
+         // original _ptr.
+         if (tmpPtr) tmpPtr->unref();
+         return *this;
+      }
+   
+   inline ossimRefPtr& operator = (T* ptr)
+      {
+         if (m_ptr==ptr) return *this;
+         T* tmpPtr = m_ptr;
+         m_ptr = ptr;
+         if (m_ptr) m_ptr->ref();
+         // unref second to prevent any deletion of any object which might
+         // be referenced by the other object. i.e rp is child of the
+         // original m_ptr.
+         if (tmpPtr) tmpPtr->unref();
+         return *this;
+      }
+   
+   // comparison operators for ossimRefPtr.
+   inline bool operator == (const ossimRefPtr& rp) const { return (m_ptr==rp.m_ptr); }
+   inline bool operator != (const ossimRefPtr& rp) const { return (m_ptr!=rp.m_ptr); }
+   inline bool operator < (const ossimRefPtr& rp) const { return (m_ptr<rp.m_ptr); }
+   inline bool operator > (const ossimRefPtr& rp) const { return (m_ptr>rp.m_ptr); }
+   
+   // comparion operator for const T*.
+   inline bool operator == (const T* ptr) const { return (m_ptr==ptr); }
+   inline bool operator != (const T* ptr) const { return (m_ptr!=ptr); }
+   inline bool operator < (const T* ptr) const { return (m_ptr<ptr); }
+   inline bool operator > (const T* ptr) const { return (m_ptr>ptr); }
+   
+   inline T& operator*()  { return *m_ptr; }
+   
+   inline const T& operator*() const { return *m_ptr; }
+   
+   inline T* operator->() { return m_ptr; }
+   
+   inline const T* operator->() const   { return m_ptr; }
+   
+   inline bool operator!() const	{ return m_ptr==0L; }
+   
+   inline bool valid() const	{ return m_ptr!=0L; }
+   
+   inline T* get() { return m_ptr; }
+   
+   inline const T* get() const { return m_ptr; }
+   
+   /** take control over the object pointed to by ref_ptr, unreference but do not delete even if ref count goes to 0,
+    * return the pointer to the object.
+    * Note, do not use this unless you are 100% sure your code handles the deletion of the object correctly, and
+    * only use when absolutely required.*/
+   inline T* take() { return release();}
+   
+   inline T* release() { T* tmp=m_ptr; if (m_ptr) m_ptr->unref_nodelete(); m_ptr=0; return tmp;}
+   
+ private:
+   T* m_ptr;
+};
+
+#endif
diff --git a/ossim/include/ossim/base/ossimReferenced.h b/ossim/include/ossim/base/ossimReferenced.h
new file mode 100644
index 0000000..9337695
--- /dev/null
+++ b/ossim/include/ossim/base/ossimReferenced.h
@@ -0,0 +1,107 @@
+/* -*-c++-*- libossim - Copyright (C) since 2004 Garrett Potts 
+ * LICENSE: MIT
+ * Author: Garrett Potts
+*/
+#ifndef ossimReferenced_HEADER
+#define ossimReferenced_HEADER
+#include <ossim/base/ossimConstants.h>
+#include <OpenThreads/ScopedLock>
+#include <OpenThreads/Mutex>
+
+class OSSIMDLLEXPORT ossimReferenced
+{
+ public:
+   ossimReferenced()
+   : theRefMutex(new OpenThreads::Mutex),
+     theRefCount(0)
+      {}
+   
+   ossimReferenced(const ossimReferenced&)
+   : theRefMutex(new OpenThreads::Mutex),
+   theRefCount(0)
+   {}
+   inline ossimReferenced& operator = (const ossimReferenced&) { return *this; }
+   
+
+   /*! increment the reference count by one, indicating that 
+       this object has another pointer which is referencing it.*/
+   inline void ref() const;
+   
+   /*! decrement the reference count by one, indicating that 
+       a pointer to this object is referencing it.  If the
+       reference count goes to zero, it is assumed that this object
+       is no longer referenced and is automatically deleted.*/
+   inline void unref() const;
+   
+   /*! decrement the reference count by one, indicating that 
+       a pointer to this object is referencing it.  However, do
+       not delete it, even if ref count goes to 0.  Warning, unref_nodelete() 
+       should only be called if the user knows exactly who will
+       be resonsible for, one should prefer unref() over unref_nodelete() 
+       as the later can lead to memory leaks.*/
+   inline void unref_nodelete() const 
+   { 
+      if (theRefMutex)
+      {
+         OpenThreads::ScopedLock<OpenThreads::Mutex> lock(*theRefMutex); 
+         --theRefCount;
+      }
+      else
+      {
+         --theRefCount;
+      }
+   }
+   
+   /*! return the number pointers currently referencing this object. */
+   inline int referenceCount() const { return theRefCount; }
+   
+   
+ protected:
+   virtual ~ossimReferenced();
+   mutable OpenThreads::Mutex*     theRefMutex;
+   mutable int theRefCount;
+};
+
+inline void ossimReferenced::ref() const
+{
+   if (theRefMutex)
+   {
+      OpenThreads::ScopedLock<OpenThreads::Mutex> lock(*theRefMutex); 
+      ++theRefCount;
+   }
+   else
+   {
+      ++theRefCount;
+   }
+}
+
+inline void ossimReferenced::unref() const
+{
+   bool needDelete = false;
+   if (theRefMutex)
+   {
+      OpenThreads::ScopedLock<OpenThreads::Mutex> lock(*theRefMutex); 
+      --theRefCount;
+      needDelete = theRefCount<=0;
+   }
+   else
+   {
+      --theRefCount;
+      needDelete = theRefCount<=0;
+   }
+   
+   if (needDelete)
+   {
+      delete this;
+   }
+   
+#if 0
+    --theRefCount;
+    if (theRefCount==0)
+    {
+        delete this;
+    }
+#endif
+}
+
+#endif
diff --git a/include/ossim/base/ossimRefreshEvent.h b/ossim/include/ossim/base/ossimRefreshEvent.h
similarity index 100%
rename from include/ossim/base/ossimRefreshEvent.h
rename to ossim/include/ossim/base/ossimRefreshEvent.h
diff --git a/ossim/include/ossim/base/ossimRegExp.h b/ossim/include/ossim/base/ossimRegExp.h
new file mode 100644
index 0000000..70371f8
--- /dev/null
+++ b/ossim/include/ossim/base/ossimRegExp.h
@@ -0,0 +1,264 @@
+//
+// Copyright (C) 1991 Texas Instruments Incorporated.
+//
+// Permission is granted to any individual or institution to use, copy, modify,
+// and distribute this software, provided that this complete copyright and
+// permission notice is maintained, intact, in all copies and supporting
+// documentation.
+//
+// Texas Instruments Incorporated provides this software "as is" without
+// express or implied warranty.
+//
+// .NAME CoolRegExp - Pattern matching with regular expressions.
+// .LIBRARY cool
+// .HEADER String Classes
+// .INCLUDE cool/RegExp.h
+// .FILE cool/RegExp.C
+// .FILE cool/RegExp.h
+// .EXAMPLE examples/ex_RegExp.C
+//
+//
+// .SECTION Description
+//  A regular expression allows a programmer to specify  complex
+//  patterns  that  can  be searched for and matched against the
+//  character string of a string object. In its simplest form, a
+//  regular  expression  is  a  sequence  of  characters used to
+//  search for exact character matches. However, many times  the
+//  exact  sequence to be found is not known, or only a match at
+//  the beginning or end of a string is desired. The cool  regu-
+//  lar  expression  class implements regular expression pattern
+//  matching as is found and implemented in many  UNIX  commands
+//  and utilities.
+//
+//  The regular expression class provides a convenient mechanism
+//  for  specifying  and  manipulating  regular expressions. The
+//  regular expression object allows specification of such  pat-
+//  terns  by using the following regular expression metacharac-
+//  ters:
+// 
+//   ^        Matches at beginning of a line
+//
+//   $        Matches at end of a line
+//
+//  .         Matches any single character
+//
+//  [ ]       Matches any character(s) inside the brackets
+//
+//  [^ ]      Matches any character(s) not inside the brackets
+//
+//   -        Matches any character in range on either side of a dash
+//
+//   *        Matches preceding pattern zero or more times
+//
+//   +        Matches preceding pattern one or more times
+//
+//   ?        Matches preceding pattern zero or once only
+//
+//  ()        Saves a matched expression and uses it in a  later match
+// 
+//  Note that more than one of these metacharacters can be  used
+//  in  a  single  regular expression in order to create complex
+//  search patterns. For example, the pattern [^ab1-9]  says  to
+//  match  any  character  sequence that does not begin with the
+//  characters "ab"  followed  by  numbers  in  the  series  one
+//  through nine.
+ 
+
+#ifndef ossimRegExph
+#define ossimRegExph
+
+#include <ossim/base/ossimString.h>
+
+const int NSUBEXP = 10;
+
+
+class OSSIMDLLEXPORT ossimRegExp {
+public:
+  inline ossimRegExp ();			// ossimRegExp with program=NULL
+  inline ossimRegExp (const char*);	// ossimRegExp with compiled char*
+  ossimRegExp (const ossimRegExp&);	// Copy constructor
+  inline ~ossimRegExp();			// Destructor 
+
+  void compile (const char*);		// Compiles char* --> regexp
+  bool find (const char*);		// true if regexp in char* arg
+  inline ossim_uint32 start() const;	// Index to start of first find
+  inline ossim_uint32 end() const;	// Index to end of first find
+
+  bool operator== (const ossimRegExp&) const;	// Equality operator
+  inline bool operator!= (const ossimRegExp&) const; // Inequality operator
+  bool deep_equal (const ossimRegExp&) const;	// Same regexp and state?
+  
+  inline bool is_valid() const;		// true if compiled regexp
+  inline void set_invalid();		// Invalidates regexp
+
+  // awf added
+  ossim_uint32 start(ossim_uint32 n) const;
+  ossim_uint32 end(ossim_uint32 n) const;
+  std::string match(ossim_uint32 n) const;
+  
+private: 
+  const char* startp[NSUBEXP];
+  const char* endp[NSUBEXP];
+  char  regstart;			// Internal use only
+  char  reganch;			// Internal use only
+  const char* regmust;			// Internal use only
+  ossim_uint32 regmlen;			// Internal use only
+  char* program;   
+  ossim_uint32 progsize;
+  const char* searchstring;
+
+ // work variables
+  mutable const char* regparse;
+  mutable int   regnpar;	// () count.
+  mutable char  regdummy;
+  mutable char* regcode;	// Code-emit pointer; &regdummy = don't.
+  mutable long  regsize;	// Code size.
+  const char*  reginput;	// String-input pointer.
+  const char*  regbol;	// Beginning of input, for ^ check.
+  const char* *regstartp;	// Pointer to startp array.
+  const char* *regendp;	// Ditto for endp.
+
+  char* reg (int, int*);
+  char* regbranch (int*);
+  char* regpiece (int*);
+  char* regatom (int*);
+  char* regnode (char);
+  const char* regnext (register const char*);
+  char* regnext (register char*);
+  void        regc (unsigned char);
+  void        reginsert (char, char*);
+  void        regtail (char*, const char*);
+  void        regoptail (char*, const char*);
+  int regtry (const char*, const char* *,
+              const char* *, const char*);
+  int regmatch (const char*);
+  int regrepeat (const char*);
+#ifdef STRCSPN
+  int strcspn ();
+#endif
+  
+}; 
+
+// ossimRegExp -- Creates an empty regular expression.
+
+inline ossimRegExp::ossimRegExp ():
+  regstart(0),     // Internal use only
+  reganch(0),      // Internal use only
+  regmust(0),      // Internal use only
+  regmlen(0),     // Internal use only
+  program(0),   
+  progsize(0),
+  searchstring(0),
+
+ // work variables
+  regparse(0),
+  regnpar(0),  // () count.
+  regdummy(0),
+  regcode(0),  // Code-emit pointer; &regdummy = don't.
+  regsize(0),  // Code size.
+  reginput(0),  // String-input pointer.
+  regbol(0),  // Beginning of input, for ^ check.
+  regstartp(0), // Pointer to startp array.
+  regendp(0) // Ditto for endp.
+{ 
+}
+
+
+// ossimRegExp -- Creates a regular expression from string s, and
+// compiles s.
+
+
+inline ossimRegExp::ossimRegExp (const char* s) :
+  regstart(0),     // Internal use only
+  reganch(0),      // Internal use only
+  regmust(0),      // Internal use only
+  regmlen(0),     // Internal use only
+  program(0),   
+  progsize(0),
+  searchstring(0),
+
+ // work variables
+  regparse(0),
+  regnpar(0),  // () count.
+  regdummy(0),
+  regcode(0),  // Code-emit pointer; &regdummy = don't.
+  regsize(0),  // Code size.
+  reginput(0),  // String-input pointer.
+  regbol(0),  // Beginning of input, for ^ check.
+  regstartp(0), // Pointer to startp array.
+  regendp(0) // Ditto for endp.
+{  
+  this->program = NULL;
+  compile(s);
+}
+
+// ~ossimRegExp -- Frees space allocated for regular expression.
+
+inline ossimRegExp::~ossimRegExp () {
+//#ifndef WIN32
+   if(program)
+   {
+      delete [] this->program;
+      this->program = 0;
+   }
+//#endif
+}
+
+// Start -- 
+
+inline ossim_uint32 ossimRegExp::start () const {
+  return(this->startp[0] - searchstring);
+}
+
+
+// End -- Returns the start/end index of the last item found.
+
+
+inline ossim_uint32 ossimRegExp::end () const {
+  return(this->endp[0] - searchstring);
+}
+
+
+// operator!= //
+
+inline bool ossimRegExp::operator!= (const ossimRegExp& r) const {
+  return(!(*this == r));
+}
+
+
+// is_valid -- Returns true if a valid regular expression is compiled
+// and ready for pattern matching.
+
+inline bool ossimRegExp::is_valid () const {
+  return (this->program != NULL);
+}
+
+
+// set_invalid -- Invalidates regular expression.
+
+inline void ossimRegExp::set_invalid () {
+//#ifndef WIN32
+  delete [] this->program;
+//#endif
+  this->program = NULL;
+}
+
+// -- Return start index of nth submatch. start(0) is the start of the full match.
+inline ossim_uint32 ossimRegExp::start(ossim_uint32 n) const
+{
+  return this->startp[n] - searchstring;
+}
+
+// -- Return end index of nth submatch. end(0) is the end of the full match.
+inline ossim_uint32 ossimRegExp::end(ossim_uint32 n) const
+{
+  return this->endp[n] - searchstring;
+}
+
+// -- Return nth submatch as a string.
+inline std::string ossimRegExp::match(ossim_uint32 n) const
+{
+	return std::string(this->startp[n], this->endp[n] - this->startp[n]);
+}
+
+#endif // CoolRegExph
diff --git a/include/ossim/base/ossimRgbLutDataObject.h b/ossim/include/ossim/base/ossimRgbLutDataObject.h
similarity index 100%
rename from include/ossim/base/ossimRgbLutDataObject.h
rename to ossim/include/ossim/base/ossimRgbLutDataObject.h
diff --git a/ossim/include/ossim/base/ossimRgbVector.h b/ossim/include/ossim/base/ossimRgbVector.h
new file mode 100644
index 0000000..27f0bad
--- /dev/null
+++ b/ossim/include/ossim/base/ossimRgbVector.h
@@ -0,0 +1,115 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author: Garrett Potts
+// Description:
+//
+//*************************************************************************
+// $Id: ossimRgbVector.h 23064 2015-01-07 03:20:21Z okramer $
+#ifndef ossimRgbVector_HEADER
+#define ossimRgbVector_HEADER
+#include <iostream>
+using namespace std;
+#include <ossim/base/ossimConstants.h>
+
+class ossimJpegYCbCrVector;
+class ossimHsiVector;
+class ossimHsvVector;
+class ossimCmyVector;
+
+class OSSIMDLLEXPORT ossimRgbVector
+{
+public:
+   friend ostream& operator <<(ostream& out, const ossimRgbVector& data)
+      {
+         out << "<" << (long)data.theBuf[0] << ", "
+             << (long)data.theBuf[1] << ", "
+             << (long)data.theBuf[2] << ">";
+
+         return out;
+      }
+   ossimRgbVector(unsigned char r=0, unsigned char g=0, unsigned char b=0)
+      {
+         theBuf[0] = r;
+         theBuf[1] = g;
+         theBuf[2] = b;
+      }
+   ossimRgbVector(const ossimRgbVector& copy_this)
+      {
+         theBuf[0] = copy_this.theBuf[0];
+         theBuf[1] = copy_this.theBuf[1];
+         theBuf[2] = copy_this.theBuf[2];
+      }
+   ossimRgbVector(unsigned char grey)
+      {
+         theBuf[0] = grey;
+         theBuf[1] = grey;
+         theBuf[2] = grey;
+      }
+   ossimRgbVector(unsigned char colorData[3])
+      {
+         theBuf[0] = colorData[0];
+         theBuf[1] = colorData[1];
+         theBuf[2] = colorData[2];
+      }
+
+   ossimRgbVector(const ossimJpegYCbCrVector& YCbCr);
+   ossimRgbVector(const ossimHsiVector& hsi);
+   ossimRgbVector(const ossimHsvVector& hsv);
+   ossimRgbVector(const ossimCmyVector& cmy);
+
+   ossimRgbVector operator -(const ossimRgbVector& rgb)const
+      {
+         return ossimRgbVector((unsigned char)clamp((long)theBuf[0] - (long)rgb.theBuf[0]),
+                               (unsigned char)clamp((long)theBuf[1] - (long)rgb.theBuf[1]),
+                               (unsigned char)clamp((long)theBuf[2] - (long)rgb.theBuf[2]));
+      }
+
+   ossimRgbVector operator +(const ossimRgbVector& rgb)const
+      {
+         return ossimRgbVector((unsigned char)clamp((long)theBuf[0] + (long)rgb.theBuf[0]),
+                               (unsigned char)clamp((long)theBuf[1] + (long)rgb.theBuf[1]),
+                               (unsigned char)clamp((long)theBuf[2] + (long)rgb.theBuf[2]));
+      }
+   ossimRgbVector operator *(double t)const
+      {
+         return ossimRgbVector((unsigned char)clamp((long)(theBuf[0]*t)),
+                               (unsigned char)clamp((long)(theBuf[1]*t)),
+                               (unsigned char)clamp((long)(theBuf[2]*t)));
+      }
+   const ossimRgbVector& operator =(const ossimJpegYCbCrVector& data);
+   const ossimRgbVector& operator =(const ossimHsiVector& hsi);
+   const ossimRgbVector& operator =(const ossimHsvVector& hsv);
+   const ossimRgbVector& operator =(const ossimCmyVector& cmy);
+   bool operator ==(const ossimRgbVector& rgb)
+      {
+         return ( (rgb.theBuf[0] == theBuf[0])&&
+                  (rgb.theBuf[1] == theBuf[1])&&
+                  (rgb.theBuf[2] == theBuf[2]));
+      }
+   bool operator !=(const ossimRgbVector& rgb)
+      {
+         return ( (rgb.theBuf[0] != theBuf[0])||
+                  (rgb.theBuf[1] != theBuf[1])||
+                  (rgb.theBuf[2] != theBuf[2]));
+      }
+   static long clamp(long colorValue, unsigned char min=0, unsigned char max=255)
+      {
+         colorValue = colorValue > (long)max? (long)max:colorValue;
+         colorValue = colorValue < (long)min? (long)min:colorValue;
+         
+         return colorValue;
+      }
+   unsigned char getR() const { return theBuf[0]; }
+   unsigned char getG()const  { return theBuf[1]; }
+   unsigned char getB()const  { return theBuf[2]; }
+   void setR(unsigned char  R) { theBuf[0] = R; }
+   void setG(unsigned char G)  { theBuf[1] = G; }
+   void setB(unsigned char B)  { theBuf[2] = B; }
+   
+protected:
+   unsigned char theBuf[3];
+};
+
+#endif
diff --git a/ossim/include/ossim/base/ossimRtti.h b/ossim/include/ossim/base/ossimRtti.h
new file mode 100644
index 0000000..33e33d0
--- /dev/null
+++ b/ossim/include/ossim/base/ossimRtti.h
@@ -0,0 +1,511 @@
+#ifndef RTTI_H
+#define RTTI_H
+
+/////////////////////////////////////////////////////////////////////////////////////////
+/* 
+   RTTI_H:	This file provides support for RTTI and generalized (virtual-base to derived and 
+		separate hierarchy branches) casting. There is also support for RT obj creation
+	  	from type names.
+
+		In order to enable these features for a class, two things should be done:
+
+		1)	insert the text TYPE_DATA (without ';') as the last item in the class-decl.
+		2)	in the .C file where the class's implementation resides, insert the following (without';'):
+		
+			RTTI_DEF(classname,"RT classname")	     if the class has no bases with RTTI
+ 			RTTI_DEFn(classname,"RT classname",b1,...bn) if the class has bases b1,...bn with RTTI
+
+			Use RTTI_DEF_INST instead of RTTI_DEF if you want to enable RT obj creation for classname.
+			You should provide then a public default ctor.
+			
+   RTTI is used via a class called RTTItypeid. A typeid describes a type of a class. typeids can be compared
+   with operator== and operator!= and can be retrieved from classes/pointers. They should provide all necessary 
+   support for any kind of RTTI/casting, as described by the macros below (by RTTI-class we mean a class having RTTI,
+   as described above). The 'return type' of the macros is listed between quotes:
+
+   'RTTItypeid'
+   STATIC_TYPE_INFO(T)		T=RTTI-class name. Returns a RTTItypeid with T's type. if T hasn't RTTI, a 
+				compile-time error occurs.
+   'RTTItypeid'
+   TYPE_INFO(p)		        p=ptr to a RTTI-class.  
+				Returns the RTTItypeid of the class-obj p is really pointing at. 
+			        If *p hasn't RTTI, a compile-time error occurs.	
+				If p==NULL, a special typeid for the NULL pointer is returned. 
+				This typeid has the name (const char*) "NULL".  
+   'T*'
+   PTR_CAST(T,p)		T=RTTI-class, p=RTTI-class ptr.
+				Returns p cast to the type T as a T*, if cast is possible, else
+				returns NULL. If *p or T have no RTTI, a compile-time error occurs.
+				Note that p can point to virtual base classes. Casting between separate
+				branches of a class hierarchy is also supported, as long as all classes
+				have RTTI. Therefore PTR_CAST is a fully general and safe operator.
+				If p==NULL, the operator returns NULL.
+
+   Some other macros. Not essential, provided mostly for convenience:
+   =================
+   const char*
+   STATIC_TYPE_NAME(T)		T=RTTI-class name. Returns the name (const char*) of T's type.
+				Provided for convenience. Compile-time error if T hasn't RTTI.
+   const char*
+   TYPE_NAME(p)			p=RTTI-class ptr. Returns the class name (char*) of real *p.
+				Provided for convenience.  Compile-time error if *p hasn't RTTI.
+   int				If p==NULL, "NULL" is returned.
+   DYN_CAST(t,p)		t=RTTItypeid. p=RTTI-class ptr.
+				Returns 1 if p can indeed be cast to t, else returns 0.
+				Compile-time error if *p hasn't RTTI.
+				If p==NULL, 1 is returned (NULL can be cast to anything).
+				This operator is useful when we just want to check that a pointer can be cast to
+				a RTTItypeid variable (which can be created/selected at run-time). For creating a RTTItypeid, 
+				construct a subclass of RTTItypeid called RTTIdyntypeid which allows construction from a const char*, i.e. from
+				a user specification and pass it to DYN_CAST.
+				DYN_TYPE can't return a typed pointer (since t is a RTTItypeid var and C++ has no 'real' type variables), 
+				but returns a 1/0 indicating whether the cast is possible or not. 
+   void*
+   UPTR_CAST(t,p)		t=RTTItypeid. p=RTTI-class ptr.
+				Returns p cast to a void* if cast succeeds, else returns NULL.
+				Again, p can point to virtual-bases and casts between separate branches of a class dag
+				are supported. this operator is practically the 'untyped' version of PTR_CAST, offering
+				the extra feature that the type is expressed by a run-time type variable (RTTItypeid).
+				Compile-time error if *p hasn't RTTI.
+
+  
+  Obsolete macros:		This set of macros is based on Stroustrup. They are not general and safe 
+  ===============		(e.g. virtual-base to derived casts are trapped as compile-time errors and casts
+				between separate class-dag branches are incorrectly done without any warnings). 
+				The above macros are including ALL functionality of these macros, which are
+				provided only for completeness:
+
+  OLD_PTR_CAST(T,p)		Like PTR_CAST(T,p), but without accepting p=ptr to virtual bases and performing
+				incorrect casts between separate branches of a class-dag.
+  OLD_UPTR_CAST(t,p)		Like UPTR_CAST(t,p), but with same problems as above.
+  OLD_DYN_CAST(t,p)		Like DYN_CAST(t,p), but with same problems as above.
+ 
+
+  RT Object Creation:		This feature enables the user to create objects of a RT-selected type in a generic manner.
+  ==================		Typically, we create/obtain a RT type (via a RTTItypeid t1). Then, having another RTTItypeid t2
+				(typically from the (STATIC_)TYPE_INFO of some ROOT class / ROOT* ptr, we call:
+
+				ROOT* new_obj = (ROOT*)t2.create(t1);
+
+				create() searches for t1 in the class DAG rooted at t2. If found, it creates a new obj of type 
+				t1 and returns it as a '(void*)(t2*)'. For example, we know above that we get a ROOT* since
+				t2 is ROOT's RTTItypeid, so we can _safely_ cast the void* to ROOT. If create() can't make the t1
+				object (there's no such type or the type is not declared via RTTI_DEF_INST), it returns NULL.
+				This gives a fully generic typeid-based factory method for RT obj creation.
+
+  REMARK:	RTTI support adds some additional info, both static+virtual, to a class. The current implementation
+  =======	adds a static object and some static functions and 2 virtual functions to each class desiring RTTI.
+		This may of course cause potential name-clash problems. In order to avoid this, all added identifiers
+		in the RTTI system are prefixed with RTTI_ (see the TYPE_DATA macro).
+  
+  REMARK_2:	There are two classes related to RTTI: RTTItypeid and RTTITypeinfo. A RTTItypeid is, as it says, an 'id for a type'
+  ========	It actually wraps a RTTITypeinfo*, where a RTTITypeinfo contains the actual encoding of a class type.
+		You can freely create/copy/destroy/manipulate RTTItypeid's, but you should NEVER deal directly
+		with RTTITypeinfo. A RTTITypeinfo should actually be created ONLY by the TYPE_DATA macros, as part of a class definition,
+		since the RTTITypeinfo encodes a type info for an EXISTING class. All type-related stuff should be therefore
+		handled via RTTItypeid's. If you really want to dynamically create a dummy typeid, use RTTIdyntypeid class.
+
+  REMARK 3:	All names introduced by this RTTI implementation (RTTItypeid,RTTIdyntypeid,RTTITypeinfo,etc)
+  =========	are prefixed by RTTI, to make this system easily acceptable by e.g. C++ environments which happen to 
+	 	already support typeids.
+
+*/				
+
+	
+//////////////////////////////////////////////////////////////
+
+#include <cstring> // for strdup,strcmp
+#include <string> // for strdup,strcmp
+#include <ossim/base/ossimConstants.h>
+#include <vector>
+/////////////////////////////////////////////////////////////
+
+class RTTITypeinfo;
+
+class OSSIMDLLEXPORT RTTItypeid	
+		{							// Main class for RTTI interface.
+		public:
+
+		                    RTTItypeid(const RTTITypeinfo* p):  theId(p)  {}
+				    RTTItypeid(); 			 
+		   int 		    operator==(RTTItypeid) const;
+		   int 		    operator!=(RTTItypeid) const;
+		   const RTTITypeinfo* get_info() const    	 { return theId; }
+		   int 		    can_cast(RTTItypeid) const;	 	// 1 if the arg can be cast to this, else 0
+		   const char* 	    getname() const;
+		   int 		    num_subclasses() const;		// Return # subclasses of this
+		   RTTItypeid	    subclass(int) const;		// Return ith subclass of this
+		   int		    num_baseclasses() const;		// Return # baseclasses of this
+		   RTTItypeid 	    baseclass(int) const;		// Return ith baseclass of this
+		   void*	    create(RTTItypeid) const;	 	// Tries to create an instance of a subclass of this
+								 	// having of type given by the RTTItypeid arg. If ok, it returns it 
+								 	// casted to the class-type of this and then to void* 
+		   int		    can_create() const;			// Return 1 if this type is instantiable, else 0
+                   RTTItypeid       find_baseclass(const char* name)const;// 
+		   static RTTItypeid 
+                   null_type();			// the RTTItypeid for NULL ptrs
+                   
+	        protected:
+
+		    const RTTITypeinfo* theId;				// RTTItypeid implementation (the only data-member)
+		};
+
+
+class OSSIMDLLEXPORT RTTIdyntypeid : public RTTItypeid					//Class for dynamic type creation from user strings.
+		{							//Useful for creating typeids at RT for comparison
+		public:							//purposes.
+				    RTTIdyntypeid(const char*);
+				   ~RTTIdyntypeid();
+		private:
+				    static const RTTITypeinfo* a[];
+		};
+
+///////////////////////////////////////////////////////////////////
+
+class OSSIMDLLEXPORT RTTITypeinfo {							//Implementation of type-related info
+		public:
+			typedef std::vector<const RTTITypeinfo*> SubtypesConstVector;
+
+		               RTTITypeinfo(const char* name, const RTTITypeinfo* bb[],
+					 void* (*)(int,void*),void* (*)());
+		  	      ~RTTITypeinfo();
+		   const char* getname() const;				//Returns name of this RTTITypeinfo	
+		   int 	       same(const RTTITypeinfo*) const;		//Compares 2 RTTITypeinfo objs
+		   int         can_cast(const RTTITypeinfo*) const;	//1 if the arg can be cast to this, else 0
+		   int         has_base(const RTTITypeinfo*) const;	//1 if this has the arg as some base, else 0		
+		   
+		   
+		   const RTTITypeinfo*  
+		   	       subclass(int=0) const;			//get i-th subclass of this, if any, else NULL
+		   int	       num_subclasses() const;			//get # subclasses of this 
+		   void*       create(const RTTITypeinfo*,const char*) const;	//search for a subclass named char*,
+									//create obj of it and return it cast to 
+									//the RTTITypeinfo* type, which is either 
+									//this or a direct base of this. 
+		   int	       can_create() const;			//Returns 1 if this type has a default ctor, else 0			
+			
+		private:
+
+		   //char* 	          n;				//type name 
+			std::string n;
+	           const RTTITypeinfo**   b;				//base types (NULL-ended array of RTTITypeinfo's for this's direct bases)
+		   int			  ns;				//#subtypes of this type
+		   SubtypesConstVector subtypes;
+		   //const RTTITypeinfo**	  subtypes;			//types derived from this type
+		   static const RTTITypeinfo null_type;			//convenience type info for a 'null' type
+		   void*		  (*new_obj)();			//func to create a new obj of this type
+		   void*		  (*cast)(int,void*);		//func to cast an obj of this type to
+									//ith baseclass of it or to itself
+		   
+		   void 		  add_subtype(const RTTITypeinfo*);//adds a subtype to this's subtypes[]	
+		   void			  del_subtype(const RTTITypeinfo*);//dels a subtype from this's subtypes[]
+
+		   friend class		  RTTItypeid;			//for null_type
+		};      	
+
+
+
+
+inline int RTTITypeinfo::num_subclasses() const				//Return # subclasses of this
+{
+  return ns;
+} 
+
+inline const RTTITypeinfo* RTTITypeinfo::subclass(int i) const		//Return ith subclass of this, else NULL;
+{
+  return (i>=0 && i<ns)? subtypes[i]: 0;
+} 
+
+inline int RTTITypeinfo::same(const RTTITypeinfo* p) const			//Compare 2 RTTITypeinfo's:
+{  										//First, try to see if it's the same
+   return this==p || !strcmp(n.c_str(),p->n.c_str()); 						//'physical' RTTITypeinfo (which should be the case,
+}										//since we create them per-class and not per-obj).
+  										//If this fails, still do a textual name comaprison.
+
+inline int RTTITypeinfo::can_cast(const RTTITypeinfo* p) const
+{  
+   return same(p) || p->has_base(this); 
+}
+
+inline int RTTITypeinfo::can_create() const
+{
+   return new_obj!=0;
+}
+
+/////////////////////////////////////////////////////////////////
+//
+// RTTItypeid methods:
+//
+
+inline RTTItypeid RTTItypeid::null_type()
+{
+   return &(RTTITypeinfo::null_type);
+}
+
+inline RTTItypeid::RTTItypeid(): theId(null_type().theId)   
+{
+}
+
+inline int RTTItypeid::operator==(RTTItypeid i) const
+{ 
+  return theId->same(i.theId); 
+}
+
+inline int RTTItypeid::operator!=(RTTItypeid i) const
+{
+  return !(theId->same(i.theId));
+}
+
+inline int RTTItypeid::can_cast(RTTItypeid i) const
+{
+  return theId->can_cast(i.theId);
+}
+
+
+inline const char* RTTItypeid::getname() const
+{
+  return theId->getname();
+}
+
+inline int RTTItypeid::num_subclasses() const
+{
+  return theId->num_subclasses();
+}
+
+inline RTTItypeid RTTItypeid::subclass(int i) const
+{
+  return theId->subclass(i);
+}
+
+inline int RTTItypeid::num_baseclasses() const
+{
+  int i;
+  for(i=0;theId->b[i];i++){}
+  return i;
+}
+
+inline RTTItypeid RTTItypeid::baseclass(int i) const
+{
+  return theId->b[i];
+}
+
+inline void* RTTItypeid::create(RTTItypeid t) const
+{
+   return theId->create(theId,t.getname());
+}
+
+inline int RTTItypeid::can_create() const
+{
+  return theId->can_create();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+
+inline RTTIdyntypeid::RTTIdyntypeid(const char* c) : RTTItypeid(new RTTITypeinfo(c,a,0,0)) { }   //create a dummy RTTITypeinfo
+inline RTTIdyntypeid::~RTTIdyntypeid()
+{
+   if(theId)
+   {
+      delete theId;
+      theId = 0;
+   }
+}				    //delete the dummy RTTITypeinfo
+		
+
+/////////////////////////////////////////////////////////////////////////////////////
+		
+// 1. Main operators
+#define STATIC_TYPE_INFO(T)   T::RTTI_sinfo()
+#define TYPE_INFO(p)          ((p)? (p)->RTTI_vinfo() : RTTItypeid::null_type() )
+#define PTR_CAST(T,p) 	      ((p)? (T*)((p)->RTTI_cast(STATIC_TYPE_INFO(T))) : 0)
+
+
+// 2. Convenience operators
+#define STATIC_TYPE_NAME(T)   (STATIC_TYPE_INFO(T).getname())	
+#define TYPE_NAME(p)	      ((p)? ((p)->RTTI_vinfo().getname()) : RTTItypeid::null_type().getname())	
+#define DYN_CAST(t,p)	      ((p)? ((p)->RTTI_cast((t))!=0) : 1)
+#define UPTR_CAST(t,p)	      ((p)? ((p)->RTTI_cast((t))) : 0)	
+
+// 3. Unsafe operators (see Stroustrup)
+#define OLD_PTR_CAST(T,p)     ((p)? ((STATIC_TYPE_INFO(T).can_cast((p)->RTTI_vinfo()))? (T*)p : 0) : 0)
+#define OLD_UPTR_CAST(t,p)    ((p)? ((t).can_cast((p)->RTTI_vinfo())? (void*)p : 0) : 0)
+#define OLD_DYN_CAST(t,p)     ((p)? ((t).can_cast((p)->RTTI_vinfo())? 1 : 0) : 1)
+
+
+// Definition of TYPE_DATA for a RTTI-class: introduces one static RTTITypeinfo data-member
+// and a couple of virtuals.
+
+#define TYPE_DATA			 		          \
+	protected:					          \
+	   static  const  RTTITypeinfo RTTI_obj; 		  \
+	   static  void*  RTTI_scast(int,void*);	          \
+	   static  void*  RTTI_new();			          \
+	public:						          \
+	   virtual RTTItypeid RTTI_vinfo() const { return &RTTI_obj; }\
+	   static  RTTItypeid RTTI_sinfo()	 { return &RTTI_obj; }\
+	   virtual void*  RTTI_cast(RTTItypeid);\
+	   virtual const void*  RTTI_cast(RTTItypeid)const;
+	
+
+
+// Definition of auxiliary data-structs supporting RTTI for a class: defines the static RTTITypeinfo
+// object of that class and its associated virtuals.
+
+// Auxiliary definition of the construction method:
+#define RTTI_NEW(cls,name)     void* cls::RTTI_new() { return new cls; }	\
+			       const RTTITypeinfo cls::RTTI_obj = RTTITypeinfo(name,RTTI_base_##cls,cls::RTTI_scast,cls::RTTI_new);
+
+#define RTTI_NO_NEW(cls,name)  const RTTITypeinfo cls::RTTI_obj = RTTITypeinfo(name,RTTI_base_##cls,cls::RTTI_scast,0);
+
+
+
+//////////////////////////////////////////////////////////////////
+//
+//	Top-level macros:
+//
+
+#define RTTI_DEF_BASE(cls,name)					\
+	static const RTTITypeinfo* RTTI_base_##cls [] = { 0 };\
+	void* cls::RTTI_cast(RTTItypeid t)			\
+	{							\
+	   if (t == &RTTI_obj) return this;			\
+	   return 0;						\
+	}							\
+	const void* cls::RTTI_cast(RTTItypeid t)const	\
+	{							\
+	   if (t == &RTTI_obj) return this;			\
+	   return 0;						\
+	}							\
+        void* cls::RTTI_scast(int /* i */,void* p)			\
+	{  cls* ptr = (cls*)p; return ptr; }			
+	
+
+#define RTTI_DEF1_BASE(cls,name,b1)				\
+        static const RTTITypeinfo* RTTI_base_##cls [] = 	\
+	       { STATIC_TYPE_INFO(b1).get_info(),0 };		\
+  	void* cls::RTTI_cast(RTTItypeid t)			\
+	{							\
+	   if (t == &RTTI_obj) return this;			\
+	   void* ptr;						\
+	   if ((ptr=b1::RTTI_cast(t))) return ptr;		\
+	   return 0;						\
+	}							\
+  	const void* cls::RTTI_cast(RTTItypeid t)const	\
+	{							\
+	   if (t == &RTTI_obj) return this;			\
+	   const void* ptr;						\
+	   if ((ptr=b1::RTTI_cast(t))) return ptr;		\
+	   return 0;						\
+	}							\
+	void* cls::RTTI_scast(int i,void* p)			\
+	{  cls* ptr = (cls*)p;					\
+	   switch(i)						\
+	   {  case  0: return (b1*)ptr;	 }			\
+	   return ptr;						\
+	}							
+									
+
+#define RTTI_DEF2_BASE(cls,name,b1,b2)				\
+        static const RTTITypeinfo* RTTI_base_##cls [] = 	\
+	       { STATIC_TYPE_INFO(b1).get_info(),		\
+		 STATIC_TYPE_INFO(b2).get_info(),0 };		\
+  	void* cls::RTTI_cast(RTTItypeid t)			\
+	{							\
+	   if (t == &RTTI_obj) return this;			\
+	   void* ptr;						\
+	   if ((ptr=b1::RTTI_cast(t))) return ptr;		\
+	   if ((ptr=b2::RTTI_cast(t))) return ptr;		\
+	   return 0;						\
+	}							\
+  	const void* cls::RTTI_cast(RTTItypeid t)const	\
+	{							\
+	   if (t == &RTTI_obj) return this;			\
+	   const void* ptr;					\
+	   if ((ptr=b1::RTTI_cast(t))) return ptr;		\
+	   if ((ptr=b2::RTTI_cast(t))) return ptr;		\
+	   return 0;						\
+	}							\
+	void* cls::RTTI_scast(int i,void* p)			\
+	{  cls* ptr = (cls*)p;					\
+	   switch(i)						\
+	   {  case  0: return (b1*)ptr;				\
+	      case  1: return (b2*)ptr;				\
+	   }							\
+	   return ptr;						\
+	}							
+	
+#define RTTI_DEF3_BASE(cls,name,b1,b2,b3)			\
+        static const RTTITypeinfo* RTTI_base_##cls [] = 	\
+	       { STATIC_TYPE_INFO(b1).get_info(),		\
+		 STATIC_TYPE_INFO(b2).get_info(),		\
+		 STATIC_TYPE_INFO(b3).get_info(), 0 };		\
+  	void* cls::RTTI_cast(RTTItypeid t)			\
+	{							\
+	   if (t == &RTTI_obj) return this;			\
+	   void* ptr;						\
+	   if ((ptr=b1::RTTI_cast(t))) return ptr;		\
+	   if ((ptr=b2::RTTI_cast(t))) return ptr;		\
+	   if ((ptr=b3::RTTI_cast(t))) return ptr;		\
+	   return 0;						\
+	}							\
+  	const void* cls::RTTI_cast(RTTItypeid t)const	\
+	{							\
+	   if (t == &RTTI_obj) return this;			\
+	   const void* ptr;					\
+	   if ((ptr=b1::RTTI_cast(t))) return ptr;		\
+	   if ((ptr=b2::RTTI_cast(t))) return ptr;		\
+	   if ((ptr=b3::RTTI_cast(t))) return ptr;		\
+	   return 0;						\
+	}							\
+	void* cls::RTTI_scast(int i,void* p)			\
+	{  cls* ptr = (cls*)p;					\
+	   switch(i)						\
+	   {  case  0: return (b1*)ptr;				\
+	      case  1: return (b2*)ptr;				\
+	      case  2: return (b3*)ptr;				\
+	   }							\
+	   return ptr;						\
+	}							
+	
+					
+
+#define RTTI_DEF_INST(cls,name)					\
+	RTTI_DEF_BASE(cls,name)					\
+	RTTI_NEW(cls,name)			
+
+#define RTTI_DEF(cls,name)					\
+	RTTI_DEF_BASE(cls,name)					\
+	RTTI_NO_NEW(cls,name)
+
+#define RTTI_DEF1_INST(cls,name,b1)				\
+	RTTI_DEF1_BASE(cls,name,b1)				\
+	RTTI_NEW(cls,name)			
+
+#define RTTI_DEF1(cls,name,b1)					\
+	RTTI_DEF1_BASE(cls,name,b1)				\
+	RTTI_NO_NEW(cls,name)			
+	
+#define RTTI_DEF2_INST(cls,name,b1,b2)				\
+	RTTI_DEF2_BASE(cls,name,b1,b2)				\
+	RTTI_NEW(cls,name)			
+
+#define RTTI_DEF2(cls,name,b1,b2)				\
+	RTTI_DEF2_BASE(cls,name,b1,b2)				\
+	RTTI_NO_NEW(cls,name)			
+
+#define RTTI_DEF3_INST(cls,name,b1,b2,b3)			\
+	RTTI_DEF3_BASE(cls,name,b1,b2,b3)			\
+	RTTI_NEW(cls,name)	
+
+#define RTTI_DEF3(cls,name,b1,b2,b3)				\
+	RTTI_DEF3_BASE(cls,name,b1,b2,b3)			\
+	RTTI_NO_NEW(cls,name)			
+
+
+#endif
+
+
+			 
+
+		
diff --git a/include/ossim/base/ossimScalarTypeLut.h b/ossim/include/ossim/base/ossimScalarTypeLut.h
similarity index 100%
rename from include/ossim/base/ossimScalarTypeLut.h
rename to ossim/include/ossim/base/ossimScalarTypeLut.h
diff --git a/include/ossim/base/ossimSevenParamDatum.h b/ossim/include/ossim/base/ossimSevenParamDatum.h
similarity index 100%
rename from include/ossim/base/ossimSevenParamDatum.h
rename to ossim/include/ossim/base/ossimSevenParamDatum.h
diff --git a/include/ossim/base/ossimSource.h b/ossim/include/ossim/base/ossimSource.h
similarity index 100%
rename from include/ossim/base/ossimSource.h
rename to ossim/include/ossim/base/ossimSource.h
diff --git a/include/ossim/base/ossimStateChangedEvent.h b/ossim/include/ossim/base/ossimStateChangedEvent.h
similarity index 100%
rename from include/ossim/base/ossimStateChangedEvent.h
rename to ossim/include/ossim/base/ossimStateChangedEvent.h
diff --git a/ossim/include/ossim/base/ossimStdOutProgress.h b/ossim/include/ossim/base/ossimStdOutProgress.h
new file mode 100644
index 0000000..b3e4a1d
--- /dev/null
+++ b/ossim/include/ossim/base/ossimStdOutProgress.h
@@ -0,0 +1,36 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimStdOutProgress.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimStdOutProgress_HEADER
+#define ossimStdOutProgress_HEADER
+
+#include <ossim/base/ossimProcessListener.h>
+#include <ossim/base/ossimProcessProgressEvent.h>
+#include <ossim/base/ossimNotifyContext.h>
+
+class OSSIM_DLL ossimStdOutProgress : public ossimProcessListener
+{
+public:
+   ossimStdOutProgress(ossim_uint32 precision = 0, bool flushStream=false);
+
+   virtual void processProgressEvent(ossimProcessProgressEvent& event);
+      
+   virtual void setFlushStreamFlag(bool flag);
+
+protected:
+   ossim_uint32 thePrecision;
+   bool         theFlushStreamFlag;
+TYPE_DATA
+};
+
+OSSIM_DLL extern ossimStdOutProgress theStdOutProgress;
+#endif
+
diff --git a/include/ossim/base/ossimStreamBase.h b/ossim/include/ossim/base/ossimStreamBase.h
similarity index 100%
rename from include/ossim/base/ossimStreamBase.h
rename to ossim/include/ossim/base/ossimStreamBase.h
diff --git a/ossim/include/ossim/base/ossimStreamFactory.h b/ossim/include/ossim/base/ossimStreamFactory.h
new file mode 100644
index 0000000..4bf19d0
--- /dev/null
+++ b/ossim/include/ossim/base/ossimStreamFactory.h
@@ -0,0 +1,38 @@
+//*******************************************************************
+// Copyright (C) 2005 Garrett Potts
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//
+//*******************************************************************
+//  $Id: ossimStreamFactory.h 23664 2015-12-14 14:17:27Z dburken $
+//
+#ifndef ossimStreamFactory_HEADER
+#define ossimStreamFactory_HEADER
+#include <ossim/base/ossimStreamFactoryBase.h>
+#include <ossim/base/ossimIoStream.h>
+
+class OSSIM_DLL ossimStreamFactory : public ossimStreamFactoryBase
+{
+public:
+   static ossimStreamFactory* instance();
+   virtual ~ossimStreamFactory();
+ 
+   virtual ossimRefPtr<ossimIFStream>
+      createNewIFStream(const ossimFilename& file,
+                        std::ios_base::openmode openMode) const;
+
+   
+protected:
+   ossimStreamFactory();
+   ossimStreamFactory(const ossimStreamFactory&);
+   static ossimStreamFactory* theInstance;
+   
+};
+
+#endif
+
diff --git a/ossim/include/ossim/base/ossimStreamFactoryBase.h b/ossim/include/ossim/base/ossimStreamFactoryBase.h
new file mode 100644
index 0000000..24d8bf7
--- /dev/null
+++ b/ossim/include/ossim/base/ossimStreamFactoryBase.h
@@ -0,0 +1,36 @@
+//*******************************************************************
+// Copyright (C) 2005 Garrett Potts
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//
+//*******************************************************************
+//  $Id: ossimStreamFactoryBase.h 23664 2015-12-14 14:17:27Z dburken $
+//
+#ifndef ossimStreamFactoryBase_HEADER
+#define ossimStreamFactoryBase_HEADER
+
+#include <iosfwd>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimIoStream.h>
+
+class ossimFilename;
+class ossimIStream;
+
+class OSSIM_DLL ossimStreamFactoryBase
+{
+public:
+   virtual ~ossimStreamFactoryBase(){}
+   
+   virtual ossimRefPtr<ossimIFStream> createNewIFStream(
+      const ossimFilename& file,
+      std::ios_base::openmode openMode)const=0;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/base/ossimStreamFactoryRegistry.h b/ossim/include/ossim/base/ossimStreamFactoryRegistry.h
new file mode 100644
index 0000000..96e898c
--- /dev/null
+++ b/ossim/include/ossim/base/ossimStreamFactoryRegistry.h
@@ -0,0 +1,40 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimStreamFactoryRegistry.h 22648 2014-02-28 14:34:29Z gpotts $
+//
+#ifndef ossimStreamFactoryRegistry_HEADER
+#define ossimStreamFactoryRegistry_HEADER
+#include <vector>
+
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimIoStream.h>
+#include <ossim/base/ossimStreamFactoryBase.h>
+
+
+class OSSIM_DLL ossimStreamFactoryRegistry : public ossimStreamFactoryBase
+{
+public:
+   static ossimStreamFactoryRegistry* instance();
+   virtual ~ossimStreamFactoryRegistry();
+   
+   void registerFactory(ossimStreamFactoryBase* factory);
+   
+   virtual ossimRefPtr<ossimIFStream> createNewIFStream(
+      const ossimFilename& file, std::ios_base::openmode openMode) const;
+   
+protected:
+   ossimStreamFactoryRegistry();
+private:
+   /** @brief copy constructor hidden from use */
+   ossimStreamFactoryRegistry(const ossimStreamFactoryRegistry&);
+   
+   std::vector<ossimStreamFactoryBase*> theFactoryList;
+   static ossimStreamFactoryRegistry* theInstance;
+};
+
+#endif
diff --git a/ossim/include/ossim/base/ossimString.h b/ossim/include/ossim/base/ossimString.h
new file mode 100644
index 0000000..d7a869d
--- /dev/null
+++ b/ossim/include/ossim/base/ossimString.h
@@ -0,0 +1,936 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+// Description: This class extends the stl's string class.
+//
+//********************************************************************
+// $Id: ossimString.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimString_HEADER
+#define ossimString_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <string>
+#include <vector>
+#include <iostream>
+
+
+class OSSIM_DLL ossimString
+{
+public:
+
+   typedef std::string::const_iterator const_iterator;
+   typedef std::string::iterator       iterator;
+   typedef std::string::size_type      size_type;
+
+   /** @brief default constructor */
+   ossimString(): m_str() {}
+
+   /** @brief constructor that takes a std::string */
+   ossimString(const std::string& s):m_str(s) {}
+
+   /**
+    * @brief constructor that takes char*
+    * NOTE: std::string construtor throws exception given null pointer;
+    * hence, the null check.
+    */
+   ossimString(const char *aString):m_str( aString?aString:"" ){}
+
+   /** @brief copy constructor */
+   ossimString(const ossimString& aString):m_str(aString.m_str){}
+
+   /** @brief constructor - constructs with n copies of c */
+   ossimString(std::string::size_type n, char c):m_str(n,c){}
+
+   /** @brief constructor - constructs with 1 c. */
+   ossimString(char aChar):m_str(1, aChar){}
+
+   template <class Iter>
+   ossimString(Iter startIter, Iter endIter):m_str(startIter, endIter){}
+
+   /** @brief destructor */
+   ~ossimString(){}
+
+   bool contains(const ossimString& aString) const
+   { return m_str.find(aString.m_str)!=std::string::npos; }
+
+   bool contains(const char* aString) const
+   { return m_str.find(aString)!=std::string::npos; }
+
+   /** @brief Type conversion operator to a const std::string&. */
+   operator const std::string&() const { return m_str; }
+
+   /** @brief Type conversion operator to a std::string&. */
+   operator std::string&() { return m_str; }
+
+   /** @brief Type conversion operator to a const char*. */
+   operator const char*() const { return m_str.c_str(); }
+
+   /** @brief For backward compatibility. */
+   const char* chars() const { return m_str.c_str(); }
+
+   /** @brief Reads s from the input stream is. */
+   friend OSSIM_DLL std::istream& operator>>(std::istream&  is, ossimString& s);
+
+   /** @brief Writes s to the output stream os. */
+   friend OSSIM_DLL std::ostream& operator<<(std::ostream& os,
+                                             const ossimString& s);
+
+   /**
+    * @brief Reads a string from the input stream is, stopping when it
+    * reaches delim.
+    */
+   friend OSSIM_DLL std::istream& getline( std::istream& is,
+                                           ossimString& str,
+                                           char delim );
+
+   /** @brief Reads a single line from the input stream is. */
+   friend OSSIM_DLL std::istream& getline( std::istream& is, ossimString& str );
+
+   const ossimString& operator=(const std::string& s)
+   {
+      m_str = s;
+      return *this;
+   }
+
+   const ossimString& operator=(const char* s)
+   {
+      if (s) // std::string::operator= throws exception given null pointer.
+      {
+         m_str = s;
+      }
+      else
+      {
+         m_str = "";
+      }
+      return *this;
+   }
+
+   const ossimString& operator=(char c)
+   {
+      m_str = c;
+      return *this;
+   }
+
+   const ossimString& operator=(const ossimString& s)
+   {
+      if ( this != &s )
+      {
+         m_str = s.m_str;
+      }
+      return *this;
+   }
+
+   const ossimString& operator+=(const ossimString& s)
+   {
+      m_str.append(s.m_str);
+      return *this;
+   }
+
+   const ossimString& operator+=(const std::string& s)
+   {
+      m_str.append(s);
+      return *this;
+   }
+
+   const ossimString& operator+=(const char* s)
+   {
+      if ( s ) m_str.append(s);
+      return *this;
+   }
+
+   const ossimString& operator+=(char c)
+   {
+      m_str.append(1, c);
+      return *this;
+   }
+
+   const ossimString& append(const ossimString& s);
+
+   const ossimString& append(const std::string& s);
+
+   const ossimString& append(const char* s);
+
+   /**
+    *  @brief  Provides access to the data contained in the %string.
+    *  @param n The index of the character to access.
+    *  @return  Read-only (const) reference to the character.
+    *  @throw  std::out_of_range  If @a n is an invalid index.
+    *
+    *  This function provides for safer data access.  The parameter is
+    *  first checked that it is in the range of the string.  The function
+    *  throws out_of_range if the check fails.
+    */
+   const char& at(std::string::size_type n) const;
+
+   /**
+    *  @brief  Provides access to the data contained in the %string.
+    *  @param n The index of the character to access.
+    *  @return  Read/write reference to the character.
+    *  @throw  std::out_of_range  If @a n is an invalid index.
+    *
+    *  This function provides for safer data access.  The parameter is
+    *  first checked that it is in the range of the string.  The function
+    *  throws out_of_range if the check fails.  Success results in
+    *  unsharing the string.
+    */
+   char& at(std::string::size_type n);
+
+   /** @brief Append n copies of c to *this. */
+   const ossimString& append(std::string::size_type n, char c);
+
+   ossimString operator+(const ossimString& s)const
+   {
+      ossimString returnS(*this);
+      returnS.m_str.append(s.m_str);
+      return returnS;
+   }
+
+   ossimString operator+(const std::string& s)const
+   {
+      ossimString returnS(*this);
+      returnS.m_str.append(s);
+      return returnS;
+   }
+
+   ossimString operator+(const char* s)const
+   {
+      ossimString returnS(*this);
+      if ( s ) returnS.m_str.append(s);
+      return returnS;
+   }
+
+   ossimString operator+(char c)const
+   {
+      ossimString returnS(*this);
+      returnS.m_str.append(1, c);
+      return returnS;
+   }
+
+   friend OSSIM_DLL ossimString operator+(const char* s1, const ossimString& s2);
+
+   friend OSSIM_DLL ossimString operator+(const std::string s1, const ossimString& s2);
+
+   friend OSSIM_DLL ossimString operator+(char c, const ossimString& s2);
+   friend OSSIM_DLL bool operator==(const char* lhs, const ossimString& rhs);
+   friend OSSIM_DLL bool operator==(const std::string& lhs, const ossimString& rhs);
+
+   /**
+    *  @brief  Test if this ossimString is equal to another ossimString.
+    *  @param rhs ossimString to compare.
+    *  @return  True if strings are equal.  False otherwise.
+    */
+   bool operator==(const ossimString& rhs) const
+   {
+      return (m_str.compare( rhs.m_str ) == 0);
+   }
+
+   /**
+    *  @brief  Test if this ossimString is equal to a C sting.
+    *  @param rhs C string to compare.
+    *  @return  True if strings are equal.
+    *  False if rhs is not equal null or null.
+    */
+   bool operator==(const char* rhs) const
+   {
+      bool result = false;
+      if (rhs)
+      {
+         result = (m_str.compare(std::string(rhs)) == 0);
+      }
+      return result;
+   }
+
+   /**
+    *  @brief  Test if this ossimString is not equal to another ossimString.
+    *  @param rhs ossimString to compare.
+    *  @return  True if strings are not equal.  False otherwise.
+    */
+   bool operator!=(const ossimString& rhs) const
+   {
+      return !(m_str.compare(rhs.m_str) == 0);
+   }
+
+   /**
+    *  @brief  Test if this ossimString is not equal to a C sting.
+    *  @param rhs C string to compare.
+    *  @return  True if strings are not equal or rhs is null.
+    *  False if rhs equal to this string.
+    */
+   bool operator!=(const char* rhs) const
+   {
+      bool result = true;
+      if (rhs)
+      {
+         result = !(m_str.compare(std::string(rhs)) == 0);
+      }
+      return result;
+   }
+
+   char& operator[](std::string::size_type i)
+   {
+      return m_str[i];
+      // return *( const_cast<char*>(m_strc_str())+i);
+   }
+
+   const char& operator[](std::string::size_type i)const
+   {
+      return m_str[i];
+   }
+
+   /**
+    * @brief If pos > size(), throws out_of_range. Otherwise, equivalent to
+    * insert(begin() + pos, s, s + traits::length(s)).
+    */
+   std::string& insert(std::string::size_type pos, const char* s);
+
+   /** @brief Equivalent to insert(end(), c). */
+   void push_back(char c);
+
+   /** @brief Equivalent to basic_string(*this, pos, n). */
+   std::string substr(std::string::size_type pos = 0,
+                      std::string::size_type n = std::string::npos) const;
+
+   /**
+    * this will strip lead and trailing character passed in.
+    * So if you want to remove blanks:
+    *    ossimString temp("       asdfasdf      ");
+    *    ossimString trimmedString = temp.trim(" \n\t\r");
+    *
+    *    this will now contain "asdfasdf" without the blanks.
+    *
+    */
+   ossimString trim(const ossimString& valueToTrim= ossimString(" \t\n\r"))const;
+   ossimString& trim(const ossimString& valueToTrim= ossimString(" \t\n\r"));
+
+   ossimString beforePos(std::string::size_type pos)const;
+    ossimString afterPos(std::string::size_type pos)const;
+
+   /**
+    *  Substitutes searchKey string with replacementValue and returns a
+    *  string.  Will replace all occurrences found if "replaceAll" is true.
+    */
+   ossimString substitute(const ossimString &searchKey,
+                                  const ossimString &replacementValue,
+                                  bool replaceAll=false)const;
+
+   /**
+    *  Substitutes searchKey string with replacementValue and returns a
+    *  reference to *this.  Will replace all occurrences found if
+    *  "replaceAll" is true.  (like substitute only works on "this")
+    */
+   ossimString& gsub(const ossimString &searchKey,
+                             const ossimString &replacementValue,
+                             bool replaceAll=false);
+
+   std::vector<ossimString> explode(const ossimString& delimeter) const;
+
+   /**
+    * If the variable "$(env_var_name)" is found in the string, where
+    * "env_var_name" is any system environment variable resolvable by
+    * the getenv() function, the variable is expanded in place and the
+    * result returned.
+    */
+   ossimString expandEnvironmentVariable() const;
+
+   /**
+    * @param aString String to make an upcased copy of.
+    *
+    * @return An upcased version of aString.
+    */
+   static ossimString upcase(const ossimString& aString);
+
+   /**
+    * @param aString String to make an downcased copy of.
+    *
+    * @return A downcased version of aString.
+    */
+   static ossimString downcase(const ossimString& aString);
+
+   /**
+    * Upcases this string.
+    *
+    * @return Reference to this.
+    */
+   ossimString& upcase();
+   ossimString upcase()const;
+
+   /**
+    * Downcases this string.
+    *
+    * @return Reference to this.
+    */
+   ossimString& downcase();
+   ossimString downcase()const;
+
+   /**
+    * @brief Returns a pointer to a null-terminated array of characters
+    * representing the string's contents.
+    */
+   const char* c_str() const { return m_str.c_str(); }
+
+   /**
+    * @brief Returns a pointer to an array of characters (not necessarily
+    * null-terminated) representing the string's contents.
+    */
+   const char* data() const { return m_str.data(); }
+
+   /** @return The size of the string. */
+   std::string::size_type size() const { return m_str.size(); }
+
+   /** @return The size of the string. */
+   std::string::size_type length() const { return m_str.size(); }
+
+   /** @return True if size is 0. */
+   bool empty() const { return m_str.empty(); }
+
+   /** @return The underlying std::string container. */
+   const std::string& string() const { return m_str; }
+
+   /** @return The underlying std::string container. */
+   std::string& string() { return m_str; }
+
+   /** @return An iterator pointing to the beginning of the string. */
+   std::string::iterator begin() { return m_str.begin(); }
+
+   /** @return An iterator pointing to the end of the string. */
+   std::string::iterator end() { return m_str.end(); }
+
+   /** @return An const_iterator pointing to the beginning of the string. */
+   std::string::const_iterator begin() const { return m_str.begin(); }
+
+   /** @return An const_iterator pointing to the end of the string. */
+   std::string::const_iterator end() const { return m_str.end(); }
+
+   /** @brief Erases the entire container. */
+   void clear() { m_str.clear(); }
+
+   /** @brief Erases the character at position p. */
+   std::string::iterator erase(std::string::iterator p);
+
+   /** @brief Erases the range [first, last). */
+   std::string::iterator erase(std::string::iterator first,
+                               std::string::iterator last);
+
+   /** @brief Erases a range. */
+   std::string& erase(std::string::size_type pos = 0,
+                      std::string::size_type n = std::string::npos);
+
+   /**
+    * @brief Searches for s as a substring of *this, beginning at character
+    * pos of *this.
+    */
+   std::string::size_type find(const std::string& s,
+                               std::string::size_type pos = 0) const;
+
+   /**
+    * @brief Searches for the first n characters of s as a substring of *this,
+    * beginning at character pos of *this.
+    */
+   std::string::size_type find(const char* s,
+                               std::string::size_type pos,
+                               std::string::size_type n) const;
+
+   /**
+    * @brief Searches for a null-terminated character array as a substring
+    * of *this, beginning at character pos of *this.
+    */
+   std::string::size_type find(const char* s,
+                               std::string::size_type pos = 0) const;
+
+   /**
+    * @brief Searches for the character c, beginning at character position
+    * pos.
+    */
+   std::string::size_type find(char c, std::string::size_type pos = 0) const;
+
+    /**
+    * @brief Searches backward for s as a substring of *this, beginning at
+    * character position min(pos, size()).
+    */
+   std::string::size_type rfind(const std::string& s,
+                                std::string::size_type pos = 0) const;
+
+   /**
+    * @brief Searches backward for the first n characters of s as a substring
+    * of *this, beginning at character position min(pos, size()).
+    */
+   std::string::size_type rfind(const char* s,
+                                std::string::size_type pos,
+                                std::string::size_type n) const;
+
+   /**
+    * @brief Searches backward for a null-terminated character array as a
+    * substring of *this, beginning at character min(pos, size()).
+    */
+   std::string::size_type rfind(const char* s,
+                                std::string::size_type pos = 0) const;
+
+   /**
+    * @brief Searches backward for the character c, beginning at character
+    * position min(pos, size().
+    */
+   std::string::size_type rfind(char c, std::string::size_type pos = 0) const;
+
+   /** @brief Equivalent to find(c, pos). */
+   std::string::size_type find_first_of(
+      char c, std::string::size_type pos = 0) const;
+
+   /**
+    * @brief Returns the smallest character position N such that
+    * pos <= N < size(), and such that (*this)[N] does not compare equal to c.
+    * Returns npos if no such character position exists.
+    */
+   std::string::size_type find_first_not_of(
+      char c, std::string::size_type pos = 0) const;
+
+   /**
+    * @brief Equivalent to find_first_of(s, pos, traits::length(s)).
+    */
+   std::string::size_type find_first_of(
+      const char* s, std::string::size_type pos = 0) const;
+
+      /**
+    * @brief Equivalent to find_first_not_of(s, pos, traits::length(s)).
+    */
+   std::string::size_type find_first_not_of(
+      const char* s, std::string::size_type pos = 0) const;
+
+   /** @brief Equivalent to rfind(c, pos). */
+   std::string::size_type find_last_of(
+      char c, std::string::size_type pos = std::string::npos) const;
+
+   /**
+    * @brief Erases the existing characters and replaces them by n copies
+    * of c.
+    */
+   std::string& assign(std::string::size_type n, char c);
+
+   /** @brief Replaces a substring of *this with the string s. */
+   std::string& replace(std::string::size_type pos,
+                        std::string::size_type n,
+                        const std::string& s);
+
+   /** brief Equivalent to insert(erase(first, last), s.begin(), s.end()). */
+   std::string& replace(std::string::iterator first,
+                        std::string::iterator last,
+                        const std::string& s);
+
+   /** @brief Replaces a substring of *this with a substring of s. */
+   std::string& replace(std::string::size_type pos,
+                        std::string::size_type n,
+                        const std::string& s,
+                        std::string::size_type pos1,
+                        std::string::size_type n1);
+
+   /** @brief Requests that the string's capacity be changed. */
+   void reserve(std::string::size_type n);
+
+   /**
+    * METHOD: before(str, pos)
+    * Returns string beginning at pos and ending one before the token str
+    * If string not found or pos out of range the whole string will be
+    * returned.
+    */
+   ossimString before(const ossimString& str, std::string::size_type pos=0)const;
+
+   /**
+    * METHOD: after(str, pos)
+    * Returns string immediately after the token str. The search for str
+    * begins at pos.  Returns an empty string if not found or pos out of
+    * range.
+    */
+   ossimString after (const ossimString& str, std::string::size_type pos=0)const;
+
+   char* stringDup()const;
+
+   /**
+    * String to numeric methods.
+    */
+   bool                 toBool()const;
+   static bool          toBool(const ossimString& aString);
+
+   ossim_uint8          toUInt8()const;
+   static ossim_uint8   toUInt8(const ossimString& aString);
+
+   int                  toInt()const;
+   static int           toInt(const ossimString& aString);
+
+   ossim_int16          toInt16()const;
+   static ossim_int16   toInt16(const ossimString& aString);
+   ossim_uint16         toUInt16()const;
+   static ossim_uint16  toUInt16(const ossimString& aString);
+
+   ossim_int32          toInt32()const;
+   static ossim_int32   toInt32(const ossimString& aString);
+   ossim_uint32         toUInt32()const;
+   static ossim_uint32  toUInt32(const ossimString& aString);
+
+   ossim_int64          toInt64()const;
+   static ossim_int64   toInt64(const ossimString& aString);
+   ossim_uint64         toUInt64()const;
+   static ossim_uint64  toUInt64(const ossimString& aString);
+
+   /**
+    * toLong's deprecated, please use the toInts...
+    */
+   long                 toLong()const;
+   static long          toLong(const ossimString& aString);
+   unsigned long        toULong()const;
+   static unsigned long toULong(const ossimString& aString);
+
+   ossim_float32        toFloat32()const;
+   static ossim_float32 toFloat32(const ossimString& aString);
+   ossim_float64        toFloat64()const;
+   static ossim_float64 toFloat64(const ossimString& aString);
+   double               toDouble()const;
+   static double        toDouble(const ossimString& aString);
+
+   /**
+    * Numeric to string methods.
+    */
+   static ossimString toString(bool aValue);
+   static ossimString toString(ossim_int16   aValue);
+   static ossimString toString(ossim_uint16  aValue);
+   static ossimString toString(ossim_int32   aValue);
+   static ossimString toString(ossim_uint32  aValue);
+   static ossimString toString(ossim_int64   aValue);
+   static ossimString toString(ossim_uint64  aValue);
+
+   /**
+    * @param aValue Value to convert to string.
+    *
+    * @param precision Decimal point precision of the output.
+    *
+    * @param fixed If true setiosflags(std::ios::fixed) will be called.
+    */
+   static ossimString toString(ossim_float32 aValue,
+                               ossim_int32 precision = 8,
+                               bool fixed = false);
+
+   /**
+    * @param aValue Value to convert to string.
+    *
+    * @param precision Decimal point precision of the output.
+    *
+    * @param fixed If true setiosflags(std::ios::fixed) will be called.
+    */
+   static ossimString toString(ossim_float64 aValue,
+                               ossim_int32 precision = 15,
+                               bool fixed = false);
+
+   static ossimString stripLeading(const ossimString &value,
+                                   char characterToStrip);
+
+
+   /**
+    * Splits this string into a vector of strings (fields) using the delimiter list specified.
+    * If a delimiter is encountered at the beginning or the end of this, or two delimiters are
+    * contiguous, a blank field is inserted in the vector, unless skipBlankFields is true.
+    */
+   void split(std::vector<ossimString>& result,
+              const ossimString& separatorList,
+              bool skipBlankFields=false)const;
+
+   std::vector<ossimString> split(const ossimString& separatorList,
+                                  bool skipBlankFields=false)const;
+
+   const ossimString& join(const std::vector<ossimString>& stringList,
+                           const ossimString& separator);
+
+   //---
+   // Regular expression pattern utilities
+   //---
+
+   /**
+    * Returns from start of string up to but not including found pattern.
+    * Returns "" if pattern not found.
+    */
+   ossimString beforeRegExp(const char *regularExpressionPattern) const;
+
+   /**
+    * Returns from position of found pattern to end of string.
+    * Returns "" if pattern not found.
+    */
+   ossimString fromRegExp(const char *regularExpressionPattern) const;
+
+   /**
+    * Returns from position after found pattern to end of string.
+    * Returns "" if pattern not found.
+    */
+   ossimString afterRegExp(const char *regularExpressionPattern) const;
+
+   /**
+    * Returns from found pattern to end of pattern.
+    * Returns "" if pattern not found.
+    */
+   ossimString match(const char *regularExpressionPattern) const;
+
+   ossimString replaceAllThatMatch(const char *regularExpressionPattern,
+                                   const char *value="") const;
+
+   ossimString replaceStrThatMatch(const char *regularExpressionPattern,
+                                   const char *value="") const;
+
+   ossimString urlEncode()const;
+
+   /**
+    * If OSSIM_ID_ENABLED returns the OSSIM_ID which currently is the
+    * expanded cvs $Id: ossimString.h 23664 2015-12-14 14:17:27Z dburken $ macro; else, an empty string.
+    */
+   ossimString getOssimId() const;
+
+protected:
+
+   std::string m_str;
+};
+
+inline std::string::iterator ossimString::erase(std::string::iterator p)
+{
+   return m_str.erase(p);
+}
+
+inline std::string::iterator ossimString::erase(std::string::iterator first,
+                                                std::string::iterator last)
+{
+   return m_str.erase(first, last);
+}
+
+inline std::string& ossimString::erase(std::string::size_type pos,
+                                       std::string::size_type n)
+{
+   return m_str.erase(pos, n);
+}
+
+inline std::string::size_type ossimString::find(
+   const std::string& s, std::string::size_type pos) const
+{
+   return m_str.find(s, pos);
+}
+
+inline std::string::size_type ossimString::find(
+   const char* s, std::string::size_type pos, std::string::size_type n) const
+{
+   return m_str.find(s, pos, n);
+}
+
+inline std::string::size_type ossimString::find(
+   const char* s, std::string::size_type pos) const
+{
+   return m_str.find(s, pos);
+}
+
+inline std::string::size_type ossimString::find(
+   char c, std::string::size_type pos) const
+{
+   return m_str.find(c, pos);
+}
+
+inline std::string::size_type ossimString::rfind(
+   const std::string& s, std::string::size_type pos) const
+{
+   return m_str.rfind(s, pos);
+}
+
+inline std::string::size_type ossimString::rfind(
+   const char* s, std::string::size_type pos, std::string::size_type n) const
+{
+   return m_str.rfind(s, pos, n);
+}
+
+inline std::string::size_type ossimString::rfind(
+   const char* s, std::string::size_type pos) const
+{
+   return m_str.rfind(s, pos);
+}
+
+inline std::string::size_type ossimString::rfind(
+   char c, std::string::size_type pos) const
+{
+   return m_str.rfind(c, pos);
+}
+
+inline std::string::size_type ossimString::find_first_of(
+   char c, std::string::size_type pos) const
+{
+   return m_str.find_first_of(c, pos);
+}
+
+inline std::string::size_type ossimString::find_first_of(
+   const char* s, std::string::size_type pos) const
+{
+   return m_str.find_first_of(s, pos);
+}
+
+inline std::string::size_type ossimString::find_first_not_of(
+   const char c, std::string::size_type pos) const
+{
+   return m_str.find_first_not_of(c, pos);
+}
+
+inline std::string::size_type ossimString::find_first_not_of(
+   const char* s, std::string::size_type pos) const
+{
+   return m_str.find_first_not_of(s, pos);
+}
+
+inline std::string::size_type ossimString::find_last_of(
+   char c, std::string::size_type pos) const
+{
+   return m_str.find_last_of(c, pos);
+}
+
+inline const ossimString& ossimString::append(const ossimString& s)
+{
+   m_str.append(s.m_str);
+   return *this;
+}
+
+inline const ossimString& ossimString::append(const std::string& s)
+{
+   m_str.append(s);
+   return *this;
+}
+
+inline const ossimString& ossimString::append(const char* s)
+{
+   if ( s ) m_str.append(s);
+   return *this;
+}
+
+inline const ossimString& ossimString::append(std::string::size_type n, char c)
+{
+   m_str.append(n, c);
+   return *this;
+}
+
+inline const char& ossimString::at(std::string::size_type n) const
+{
+   return m_str.at(n); 
+}
+
+inline char& ossimString::at(std::string::size_type n)
+{
+   return m_str.at(n);
+}
+
+inline std::string& ossimString::assign(std::string::size_type n, char c)
+{
+   return m_str.assign(n, c);
+}
+
+inline std::string& ossimString::replace(
+   std::string::size_type pos, std::string::size_type n, const std::string& s)
+{
+   return m_str.replace(pos, n, s);
+}
+
+inline std::string& ossimString::replace(std::string::iterator first,
+                                         std::string::iterator last,
+                                         const std::string& s)
+{
+   return m_str.replace(first, last, s);
+}
+
+inline std::string& ossimString::replace(std::string::size_type pos,
+                                         std::string::size_type n,
+                                         const std::string& s,
+                                         std::string::size_type pos1,
+                                         std::string::size_type n1)
+{
+   return m_str.replace(pos, n, s, pos1, n1);
+}
+
+inline void ossimString::reserve(std::string::size_type n)
+{
+   m_str.reserve(n);
+}
+
+
+inline std::string& ossimString::insert(std::string::size_type pos,
+                                        const char* s)
+{
+   if (s) m_str.insert(pos, s);
+   return m_str;
+}
+
+inline void ossimString::push_back(char c)
+{
+   m_str.push_back(c);
+}
+
+inline std::string ossimString::substr(std::string::size_type pos,
+                                       std::string::size_type n) const
+{
+   return m_str.substr(pos, n);
+}
+
+inline std::istream& getline( std::istream& is, ossimString& str, char delim )
+{
+   return std::getline( is, str.string(), delim );
+}
+
+inline std::istream& getline( std::istream& is, ossimString& str )
+{
+   // Not sure why getline( is, str.string()) doesn't work. (drb)
+   return std::getline( is, str.string(), '\n' );
+}
+
+inline std::istream& operator>>(std::istream&  is, ossimString& s)
+{
+   return is >> s.string();
+}
+
+inline std::ostream& operator<<(std::ostream& os, const ossimString& s)
+{
+   return os << s.string();
+}
+
+inline ossimString operator+(const char* s1, const ossimString& s2)
+{
+   ossimString result;
+   if ( s1 ) result = ossimString( s1 + s2.string() );
+   else result = s2;
+   return result;
+}
+
+inline ossimString operator+(const std::string s1, const ossimString& s2)
+{
+   return ossimString( s1 + s2.string() );
+}
+
+inline ossimString operator+(char c, const ossimString& s2)
+{
+   return ossimString( c + s2.string() );
+}
+
+inline bool operator==(const char* lhs, const ossimString& rhs)
+{
+   return (rhs.operator ==(lhs));
+}
+
+inline bool operator==(const std::string& lhs, const ossimString& rhs)
+{
+   return (rhs.operator ==(lhs));
+}
+
+/**
+ * @brief For use with std::map as a compare operator:
+ * std::map<ossimString, ossimString, ossimStringLtstr>
+ *
+ * This will allow the find method on map to work.
+ */
+struct ossimStringLtstr
+{
+   bool operator()(const ossimString& s1, const ossimString& s2) const
+   {
+      return s1.string().compare(s2.string()) < 0;
+   }
+};
+
+#endif /* #ifndef ossimString_HEADER */
+
diff --git a/include/ossim/base/ossimStringListProperty.h b/ossim/include/ossim/base/ossimStringListProperty.h
similarity index 100%
rename from include/ossim/base/ossimStringListProperty.h
rename to ossim/include/ossim/base/ossimStringListProperty.h
diff --git a/ossim/include/ossim/base/ossimStringProperty.h b/ossim/include/ossim/base/ossimStringProperty.h
new file mode 100644
index 0000000..2874f89
--- /dev/null
+++ b/ossim/include/ossim/base/ossimStringProperty.h
@@ -0,0 +1,73 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// LICENSE: MIT see top level license.txt
+//
+// Author: Garrett Potts (gpotts at imagelinks.com)
+//
+//*************************************************************************
+// $Id: ossimStringProperty.h 23666 2015-12-14 20:01:22Z rashadkm $
+#ifndef ossimStringProperty_HEADER
+#define ossimStringProperty_HEADER
+#include <ossim/base/ossimProperty.h>
+#include <vector>
+
+class OSSIMDLLEXPORT ossimStringProperty : public ossimProperty
+{
+public:
+   ossimStringProperty(const ossimString& name = ossimString(""),
+                       const ossimString& value = ossimString(""),
+                       bool editableFlag = true,
+                       const std::vector<ossimString>& constraintList = std::vector<ossimString>());
+   
+   ossimStringProperty(const ossimStringProperty& rhs);
+
+   /*!
+    * Duplicates the object and returns a new one
+    */
+   virtual ossimObject* dup()const;
+
+   virtual const ossimProperty& assign(const ossimProperty& rhs);
+   
+   void setEditableFlag(bool flag);
+   bool getEditableFlag()const;
+   bool isEditable()const;
+   
+   /*!
+    * Clears the constraints for this string.  You can constrain
+    * it to a string list by calling setConstraints.
+    */
+   void clearConstraints();
+
+   /*!
+    * Sets the constraints for this property.  If the editable
+    * flag is present then this says the editing is not readonly
+    * and one can hand type the value in without only selecting
+    * from a choice list.
+    */
+   void setConstraints(const std::vector<ossimString>& constraintList);
+
+   void addConstraint(const ossimString& value);
+   const std::vector<ossimString>& getConstraints()const;
+   
+   bool hasConstraints()const;
+   
+   /*!
+    * will try to set the value.  If the constraints are set
+    * it will make sure that the value is in the list and
+    * if its not then it will return false 
+    */
+   virtual bool setValue(const ossimString& value);
+   
+   virtual void valueToString(ossimString& valueResult)const;
+  
+   
+protected:
+   ossimString theValue;
+   bool        theEditableFlag;
+   std::vector<ossimString> theConstraints;
+
+TYPE_DATA
+};
+
+#endif
diff --git a/include/ossim/base/ossimTDpt.h b/ossim/include/ossim/base/ossimTDpt.h
similarity index 100%
rename from include/ossim/base/ossimTDpt.h
rename to ossim/include/ossim/base/ossimTDpt.h
diff --git a/ossim/include/ossim/base/ossimTempFilename.h b/ossim/include/ossim/base/ossimTempFilename.h
new file mode 100644
index 0000000..652a1f0
--- /dev/null
+++ b/ossim/include/ossim/base/ossimTempFilename.h
@@ -0,0 +1,43 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// Description: This is a tmeporary filename class it will create a temporary
+//              file and will also delete it upon destruction
+//
+//*************************************************************************
+// $Id: ossimTempFilename.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimTempFilename_HEADER
+#define ossimTempFilename_HEADER
+#include <ossim/base/ossimFilename.h>
+
+class OSSIM_DLL ossimTempFilename : public ossimFilename
+{
+public:
+   ossimTempFilename(const ossimString& tempDir="",
+                     const ossimString& prefix = "",
+                     const ossimString& extension = "",
+                     bool autodelete=true,
+                     bool useWildcardDelete=true);
+
+   void generateRandomFile();
+   void generateRandomDir();
+   
+   ~ossimTempFilename();
+   
+protected:
+   ossimString theTempDir;
+   ossimString thePrefix;
+   ossimString theExtension;
+   bool theAutoDeleteFlag;
+   bool theWildCardDeleteFlag;
+   
+
+   void generate(bool createAsDirectoryFlag);
+};
+#endif
+
diff --git a/include/ossim/base/ossimTextProperty.h b/ossim/include/ossim/base/ossimTextProperty.h
similarity index 100%
rename from include/ossim/base/ossimTextProperty.h
rename to ossim/include/ossim/base/ossimTextProperty.h
diff --git a/include/ossim/base/ossimThinPlateSpline.h b/ossim/include/ossim/base/ossimThinPlateSpline.h
similarity index 100%
rename from include/ossim/base/ossimThinPlateSpline.h
rename to ossim/include/ossim/base/ossimThinPlateSpline.h
diff --git a/include/ossim/base/ossimThreeParamDatum.h b/ossim/include/ossim/base/ossimThreeParamDatum.h
similarity index 100%
rename from include/ossim/base/ossimThreeParamDatum.h
rename to ossim/include/ossim/base/ossimThreeParamDatum.h
diff --git a/include/ossim/base/ossimTieGpt.h b/ossim/include/ossim/base/ossimTieGpt.h
similarity index 100%
rename from include/ossim/base/ossimTieGpt.h
rename to ossim/include/ossim/base/ossimTieGpt.h
diff --git a/include/ossim/base/ossimTieGptSet.h b/ossim/include/ossim/base/ossimTieGptSet.h
similarity index 100%
rename from include/ossim/base/ossimTieGptSet.h
rename to ossim/include/ossim/base/ossimTieGptSet.h
diff --git a/ossim/include/ossim/base/ossimTieMeasurementGeneratorInterface.h b/ossim/include/ossim/base/ossimTieMeasurementGeneratorInterface.h
new file mode 100644
index 0000000..80fb913
--- /dev/null
+++ b/ossim/include/ossim/base/ossimTieMeasurementGeneratorInterface.h
@@ -0,0 +1,83 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimTieMeasurementGeneratorInterface.h
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David hicks
+//
+// Description: OSSIM interface for tie measurement generator plugin.
+//----------------------------------------------------------------------------
+// $Id
+
+#ifndef ossimTieMeasurementGeneratorInterface_HEADER
+#define ossimTieMeasurementGeneratorInterface_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimIrect.h>
+#include <iosfwd>
+
+
+class ossimImageSource;
+
+class ossimTieMeasurementGeneratorInterface
+{
+public:
+
+   /** @brief Virtual destructor defined to squash compiler errors. */
+   virtual ~ossimTieMeasurementGeneratorInterface(){}
+
+   // Initializer
+   virtual bool init(std::ostream& report = std::cout) = 0;
+
+   // Define collection ROI
+   virtual bool setBox(std::vector<ossimIrect> roi,
+                       const ossim_uint32& index,
+                       std::vector<ossimImageSource*> src) = 0;
+   virtual bool isValidCollectionBox() const = 0;
+
+   // Measurement collection
+   virtual bool run() = 0;
+
+   // Report run parameters
+   virtual void summarizeRun() const = 0;
+   
+   // Patch grid configuration accessors
+   virtual void setUseGrid(const bool useGrid) = 0;
+   virtual bool getUseGrid() const = 0;
+   virtual bool setGridSize(const ossimIpt& gridDimensions) = 0;
+   virtual ossimIpt getGridSize() const = 0;
+
+   // Max matches in patch accessors
+   virtual bool setMaxMatches(const int& maxMatches) = 0;
+   virtual int getMaxMatches() const = 0;
+
+   // Set the feature detector
+   virtual bool setFeatureDetector(const ossimString& name) = 0;
+   virtual ossimString getFeatureDetector() const  = 0;
+   
+   // Set the descriptor-extractor
+   virtual bool setDescriptorExtractor(const ossimString& name) = 0;
+   virtual ossimString getDescriptorExtractor() const  = 0;
+   
+   // Set the matcher
+   virtual bool setDescriptorMatcher(const ossimString& name) = 0;
+   virtual ossimString getDescriptorMatcher() const  = 0;
+   
+   // Measured point access
+   virtual int numMeasurements() const = 0;
+   virtual ossimDpt pointIndexedAt(const ossim_uint32 imgIdx,
+                                   const ossim_uint32 measIdx) = 0;
+
+   // OpenCV drawMatches window
+   virtual void closeCvWindow(const bool waitKeyPress = false) = 0;
+   virtual void setShowCvWindow(const bool showCvWindow) = 0;
+   virtual bool getShowCvWindow() const = 0;
+
+};
+
+#endif /* #ifndef ossimTieMeasurementGeneratorInterface_HEADER */
+
diff --git a/ossim/include/ossim/base/ossimTileHash.h b/ossim/include/ossim/base/ossimTileHash.h
new file mode 100644
index 0000000..3f8cdcf
--- /dev/null
+++ b/ossim/include/ossim/base/ossimTileHash.h
@@ -0,0 +1,47 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken Copied from TiledImageHash.
+//
+// Description: Hashing function for tiled rectangles.  Will hash a
+//              dpt or fpt to a single index value.
+//
+// NOTE:  Works on rectangles that are positive in the line up (y)
+//        direction.  Use TiledImageHash for rectangles that are positive
+//        in the line down direction.
+//              
+//*******************************************************************
+//  $Id: ossimTileHash.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef TileHash_HEADER
+#define TileHash_HEADER
+
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimPointHash.h>
+
+class OSSIMDLLEXPORT ossimTileHash : public ossimPointHash
+{
+public:
+   ossimTileHash(const ossimDrect &imageRect,
+                 double tileWidth,
+                 double tileHeight);
+
+   virtual ~ossimTileHash();
+
+   virtual long operator()(const ossimDpt &aPoint);
+   virtual long operator()(const ossimFpt &aPoint);
+   
+private:
+   ossimDrect   theImageRect;
+   double  theTileWidth;
+   double  theTileHeight;
+   long    theNumberOfHorizTiles;
+   long    theNumberOfVertTiles;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/base/ossimTiledImageHash.h b/ossim/include/ossim/base/ossimTiledImageHash.h
new file mode 100644
index 0000000..b549f73
--- /dev/null
+++ b/ossim/include/ossim/base/ossimTiledImageHash.h
@@ -0,0 +1,41 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+// Description: Hashing function for tiled rectangles.  Will hash a
+//              dpt to a single index value.
+//              
+//*******************************************************************
+//  $Id: ossimTiledImageHash.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimTiledImageHash_HEADER
+#define ossimTiledImageHash_HEADER
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimPointHash.h>
+
+class OSSIMDLLEXPORT ossimTiledImageHash : public ossimPointHash
+{
+public:
+   ossimTiledImageHash(const ossimDrect &imageRect,
+                       double tileWidth,
+                       double tileHeight);
+
+   virtual ~ossimTiledImageHash();
+
+   virtual long operator()(const ossimDpt &aPoint);
+   virtual long operator()(const ossimFpt &aPoint);
+   
+private:
+   ossimDrect   theImageRect;
+   double  theTileWidth;
+   double  theTileHeight;
+   long    theNumberOfHorizTiles;
+   long    theNumberOfVertTiles;
+};
+
+#endif
+
diff --git a/include/ossim/base/ossimTimer.h b/ossim/include/ossim/base/ossimTimer.h
similarity index 100%
rename from include/ossim/base/ossimTimer.h
rename to ossim/include/ossim/base/ossimTimer.h
diff --git a/include/ossim/base/ossimTrace.h b/ossim/include/ossim/base/ossimTrace.h
similarity index 100%
rename from include/ossim/base/ossimTrace.h
rename to ossim/include/ossim/base/ossimTrace.h
diff --git a/ossim/include/ossim/base/ossimTraceManager.h b/ossim/include/ossim/base/ossimTraceManager.h
new file mode 100644
index 0000000..b514550
--- /dev/null
+++ b/ossim/include/ossim/base/ossimTraceManager.h
@@ -0,0 +1,70 @@
+//*****************************************************************************
+// Copyright (C) 2005 Garrett Potts, all rights reserved.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+// 
+// DESCRIPTION:
+//   Contains declaration of class ossimTraceManager.
+//
+//*****************************************************************************
+// $Id: ossimTraceManager.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimTraceManager_HEADER
+#define ossimTraceManager_HEADER
+
+#include <ossim/base/ossimString.h>
+
+class ossimTrace;
+
+class OSSIMDLLEXPORT ossimTraceManager
+{
+public:
+   /**
+    * @return ossimTraceManager* to instance of the ossim trace manager.
+    */
+   static ossimTraceManager* instance();
+
+   /**
+    * Sets "thePattern" to "pattern", then calls setTraceFlags(true).
+    *
+    * @param pattern Regular expression to enable trace for.
+    */
+   void setTracePattern(const ossimString& pattern);
+
+   /**
+    * @param traceObj ossimTrace* to add to "theTraceList".
+    */
+   void addTrace(ossimTrace* traceObj);
+
+   /**
+    * @param traceObj ossimTrace* to remove from "theTraceList".
+    */
+   void removeTrace(ossimTrace* traceObj);
+   
+protected:
+   /** Protected default constructor. */
+   ossimTraceManager();
+
+private:
+   /**
+    * Loops through "theTraceList" and sets any trace object's enable flag to
+    * flag if it matches regular expression of "thePattern".
+    * For trace objects not matching "thePattern" no action is taken.
+    */
+   void setTraceFlags(bool flag);
+
+   /** The instance of this manager. */
+   static ossimTraceManager* theInstance;
+
+   /** The regular expression pattern like "ossimDynamic|ossimGdal". */
+   ossimString               thePattern;
+
+   /** The list of trace objects. */
+   std::vector<ossimTrace*>  theTraceList;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/base/ossimUnitConversionTool.h b/ossim/include/ossim/base/ossimUnitConversionTool.h
new file mode 100644
index 0000000..2549b7b
--- /dev/null
+++ b/ossim/include/ossim/base/ossimUnitConversionTool.h
@@ -0,0 +1,81 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimUnitConversionTool.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimUnitConversionTool_HEADER
+#define ossimUnitConversionTool_HEADER
+#include <iostream>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimGpt.h>
+
+class OSSIM_DLL ossimUnitConversionTool
+{
+public:
+   friend std::ostream& operator<<(std::ostream& out,
+                                   const ossimUnitConversionTool& data);
+
+   ossimUnitConversionTool(double value=1.0,
+                           ossimUnitType unitType=OSSIM_METERS);
+
+   ossimUnitConversionTool(const ossimGpt& origin,
+                           double value,
+                           ossimUnitType unitType=OSSIM_METERS);
+
+   void setOrigin(const ossimGpt& gpt);
+
+   ossimGpt getOrigin()const;
+
+   void getOrigin(ossimGpt& result)const;
+
+   void setValue(double value, ossimUnitType unitType=OSSIM_METERS);
+
+   double getValue(ossimUnitType unitType=OSSIM_METERS) const;
+   
+   void setMeters(double value);
+   void setRadians(double value);
+   void setDegrees(double value);
+   void setMinutes(double value);
+   void setSeconds(double value);
+   void setUsSurveyFeet(double value);
+   void setFeet(double value);
+   void setNauticalMiles(double value);
+   void setMiles(double value);
+   void setMillimeters(double value);
+   void setMicrons(double value);
+   void setCentimeters(double value);
+   void setYards(double value);
+   void setInches(double value);
+   void setKilometers(double value);
+   double getMeters()const;
+   double getRadians()const;
+   double getDegrees()const;
+   double getMinutes()const;
+   double getSeconds()const;
+   double getUsSurveyFeet()const;
+   double getFeet()const;
+   double getNauticalMiles()const;
+   double getMiles()const;
+   double getMillimeters()const;
+   double getMicrons()const;
+   double getCentimeters()const;
+   double getYards()const;
+   double getInches()const;
+   double getKilometers()const;
+   
+protected:
+   double         theValue;
+   ossimUnitType  theUnitType;
+   ossimGpt       theOrigin;
+
+   double computeMeters()const;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/base/ossimUnitTypeLut.h b/ossim/include/ossim/base/ossimUnitTypeLut.h
new file mode 100644
index 0000000..7c2d23f
--- /dev/null
+++ b/ossim/include/ossim/base/ossimUnitTypeLut.h
@@ -0,0 +1,57 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimUnitTypeLut.h 22857 2014-08-05 15:02:58Z gpotts $
+#ifndef ossimUnitTypeLut_HEADER
+#define ossimUnitTypeLut_HEADER
+
+#include <ossim/base/ossimLookUpTable.h>
+#include <ossim/base/ossimKeywordNames.h>
+
+class OSSIMDLLEXPORT ossimUnitTypeLut : public ossimLookUpTable
+{
+public:
+
+   /**
+    * Returns the static instance of an ossimUnitTypeLut object.
+    */
+   static ossimUnitTypeLut* instance();
+
+   virtual ~ossimUnitTypeLut();
+
+   /*!
+    *  Returns the entry number associated with the entry string passed in.
+    *  Returns OSSIM_UNIT_UNKNOWN if entry string is not in the list.
+    *  If case_insensitive == true(default), the test is case insensitive;
+    *  else, the test will be case sensitive.
+    */
+   virtual ossim_int32 getEntryNumber(const char* entry_string,
+                                      bool case_insensitive = true) const;
+
+   /*!
+    *  Returns the entry number associated with the lookup table keyword
+    *  entry in the Keywordlist passed in.  Returns NOT_FOUND(-1) if no
+    *  matching entry.
+    *  If case_insensitive == true(default), the test is case insensitive;
+    *  else, the test will be case sensitive.
+    */
+   virtual ossim_int32 getEntryNumber(const ossimKeywordlist& kwl,
+                                      const char* prefix=0,
+                                      bool case_insensitive = true) const;
+   
+   virtual ossimKeyword getKeyword() const;
+
+protected:
+   ossimUnitTypeLut();
+
+private:
+  // static ossimUnitTypeLut* theInstance;
+   
+};
+
+#endif
diff --git a/include/ossim/base/ossimUrl.h b/ossim/include/ossim/base/ossimUrl.h
similarity index 100%
rename from include/ossim/base/ossimUrl.h
rename to ossim/include/ossim/base/ossimUrl.h
diff --git a/include/ossim/base/ossimUsgsQuad.h b/ossim/include/ossim/base/ossimUsgsQuad.h
similarity index 100%
rename from include/ossim/base/ossimUsgsQuad.h
rename to ossim/include/ossim/base/ossimUsgsQuad.h
diff --git a/include/ossim/base/ossimViewController.h b/ossim/include/ossim/base/ossimViewController.h
similarity index 100%
rename from include/ossim/base/ossimViewController.h
rename to ossim/include/ossim/base/ossimViewController.h
diff --git a/include/ossim/base/ossimViewEvent.h b/ossim/include/ossim/base/ossimViewEvent.h
similarity index 100%
rename from include/ossim/base/ossimViewEvent.h
rename to ossim/include/ossim/base/ossimViewEvent.h
diff --git a/include/ossim/base/ossimViewInterface.h b/ossim/include/ossim/base/ossimViewInterface.h
similarity index 100%
rename from include/ossim/base/ossimViewInterface.h
rename to ossim/include/ossim/base/ossimViewInterface.h
diff --git a/include/ossim/base/ossimViewListener.h b/ossim/include/ossim/base/ossimViewListener.h
similarity index 100%
rename from include/ossim/base/ossimViewListener.h
rename to ossim/include/ossim/base/ossimViewListener.h
diff --git a/ossim/include/ossim/base/ossimVisitor.h b/ossim/include/ossim/base/ossimVisitor.h
new file mode 100644
index 0000000..c594014
--- /dev/null
+++ b/ossim/include/ossim/base/ossimVisitor.h
@@ -0,0 +1,229 @@
+// $Id: ossimVisitor.h 22790 2014-05-16 19:19:30Z gpotts $
+
+#ifndef ossimVisitor_HEADER
+#define ossimVisitor_HEADER 1
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimId.h>
+#include <ossim/base/ossimEvent.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <set>
+#include <vector>
+
+class ossimConnectableObject;
+
+
+class OSSIM_DLL ossimVisitor : public ossimReferenced
+{
+public:
+   typedef std::set<ossimRefPtr<ossimObject> >    MarkCollectionRef;
+   typedef std::set<ossimRefPtr<ossimObject> >    CollectionRef;
+   typedef std::vector<ossimRefPtr<ossimObject> > ListRef;
+   typedef std::set<ossimObject*>                 Collection;
+   typedef std::vector<ossimObject* >             List;
+   /**
+    * Enumeration type can be a mask and will traverse a graph of connectables based on the values.
+    */
+   enum VisitorType
+   {
+      VISIT_NONE     = 0,
+      VISIT_CHILDREN = 1,
+      VISIT_INPUTS   = 2,
+      VISIT_OUTPUTS  = 4,
+      VISIT_ALL      = (VISIT_CHILDREN|VISIT_INPUTS|VISIT_OUTPUTS)
+   };
+   
+   ossimVisitor(int visitorType = VISIT_NONE);
+   ossimVisitor(const ossimVisitor& src);
+   virtual void reset();
+   virtual ossimRefPtr<ossimVisitor> dup()const=0;
+   virtual void visit(ossimObject* obj);
+   virtual void visit(ossimConnectableObject* obj);
+   VisitorType getVisitorType()const;
+   void setVisitorType(int vType, bool on=true);
+   void turnOffVisitorType(int vType);
+   bool hasVisited(ossimObject* obj)const;
+   bool stopTraversal()const;
+protected:
+   VisitorType            m_visitorType;
+   mutable Collection     m_markNode;
+   mutable bool           m_stopTraversalFlag;
+};
+
+class OSSIM_DLL ossimCollectionVisitor : public ossimVisitor
+{
+public:
+   ossimCollectionVisitor(int visitorType =(VISIT_INPUTS|VISIT_CHILDREN));
+   ossimCollectionVisitor(const ossimCollectionVisitor& src);
+   ListRef& getObjects();
+   const ListRef& getObjects()const;
+   ossimObject* getObject(ossim_uint32 idx = 0);
+   const ossimObject* getObject(ossim_uint32 idx = 0)const;
+
+   // Inlined to force template instantiation.
+   template <class T> T* getObjectAs(ossim_uint32 idx=0)
+   {
+      if(idx < m_collection.size())
+      {
+         return dynamic_cast<T*>(m_collection[idx].get());
+      }
+      return 0;
+   }
+
+   // Inlined to force template instantiation.
+   template<class T> const T* getObjectAs(ossim_uint32 idx=0)const
+   {
+      if(idx < m_collection.size())
+      {
+         return dynamic_cast<const T*>(m_collection[idx].get());
+      }
+      return 0;
+   }
+
+   virtual void reset();
+ 
+protected:
+   ListRef m_collection; 
+   
+};
+
+class OSSIM_DLL ossimIdVisitor : public ossimVisitor
+{
+public:
+   /** 
+    * @brief Default constructor
+    * Constructs with id of 0 and vistor type of VISIT_INPUTS|VISIT_CHILDREN.
+    */
+   ossimIdVisitor();
+
+   ossimIdVisitor(int visitorType);
+   ossimIdVisitor(const ossimId& id, int visitorType =(VISIT_INPUTS|VISIT_CHILDREN));
+   ossimIdVisitor(const ossimIdVisitor& src);
+
+   virtual ossimRefPtr<ossimVisitor> dup()const;
+   virtual void visit(ossimConnectableObject* obj);
+
+   /** @brief Resets m_object to 0, calls ossimVisitor::reset(). */
+   virtual void reset();
+   
+   ossimConnectableObject* getObject();
+   const ossimConnectableObject* getObject()const;
+   void setId(const ossimId& id);
+   const ossimId& getId()const;
+protected:
+   ossimConnectableObject* m_object;
+   ossimId m_id;
+};
+
+class OSSIM_DLL ossimTypeNameVisitor : public ossimCollectionVisitor
+{
+public:
+   ossimTypeNameVisitor(int visitorType =(VISIT_INPUTS|VISIT_CHILDREN));
+   ossimTypeNameVisitor(const ossimString& typeName, bool firstofTypeFlag=false, int visitorType =(VISIT_INPUTS|VISIT_CHILDREN));
+   ossimTypeNameVisitor(const ossimTypeNameVisitor& src);
+   virtual ossimRefPtr<ossimVisitor> dup()const;
+   virtual void visit(ossimObject* obj);
+   void setTypeName(const ossimString& typeName);
+   const ossimString& getTypeName()const;
+
+   /**
+    * @brief Set the m_firstOfTypeFlag.
+    *
+    * @param flag If flag is true, ossimTypeNameVisitor::visit will stop traversing if it
+    * finds an object of m_typeName.
+    */
+   void setFirstOfTypeFlag(bool flag);
+
+   /** @return m_firstOfTypeFlag */
+   bool getFirstOfTypeFlag() const;
+   
+protected:
+   ossimString m_typeName;
+   bool        m_firstOfTypeFlag;
+};
+
+class OSSIM_DLL ossimTypeIdVisitor : public ossimCollectionVisitor
+{
+public:
+   ossimTypeIdVisitor(int visitorType =(VISIT_INPUTS|VISIT_CHILDREN));
+   ossimTypeIdVisitor(const RTTItypeid& typeId, bool firstofTypeFlag=false, int visitorType =(VISIT_INPUTS|VISIT_CHILDREN));
+   ossimTypeIdVisitor(const ossimTypeIdVisitor& src);
+   virtual ossimRefPtr<ossimVisitor> dup()const;
+   virtual void visit(ossimObject* obj);
+   void setTypeId(const RTTItypeid& typeId);
+   const RTTItypeid& getTypeId()const;
+protected:
+   RTTItypeid m_typeId;
+   bool        m_firstOfTypeFlag;
+};
+
+class OSSIM_DLL ossimEventVisitor : public ossimVisitor
+{
+public:
+   ossimEventVisitor(ossimEvent* evt,
+                      int visitorType =(VISIT_OUTPUTS|VISIT_CHILDREN));
+   ossimEventVisitor(const ossimEventVisitor& src);
+   virtual ossimRefPtr<ossimVisitor> dup()const;
+   virtual void visit(ossimObject* obj);
+   
+protected:
+   ossimRefPtr<ossimEvent> m_event;
+  
+};
+
+/**
+ * @class ossimViewInterfaceVisitor
+ *
+ * Visitor to update view and then propagate property event to outputs.
+ */
+class OSSIM_DLL ossimViewInterfaceVisitor : public ossimVisitor
+{
+public:
+   ossimViewInterfaceVisitor(ossimObject* view,
+                             int visitorType =(VISIT_OUTPUTS|VISIT_CHILDREN));
+   ossimViewInterfaceVisitor(const ossimViewInterfaceVisitor& src);
+   virtual ossimRefPtr<ossimVisitor> dup()const;
+
+   /**
+    * @brief Calls ossimViewInterface::setView if obj cast to
+    * ossimViewInterface*.  On success a property event is sent to
+    * output side so that things like ossimCombiner can reinitialize if
+    * needed.
+    *
+    * @param obj Object to visit.
+    */
+   virtual void visit(ossimObject* obj);
+   
+
+   ossimObject* getView();
+   const ossimObject* getView()const;
+protected:
+   ossimRefPtr<ossimObject> m_view;
+};
+
+/**
+ * @class ossimSourceInitializeVisitor
+ *
+ * Visitor to update view and then propagate property event to outputs.
+ */
+class OSSIM_DLL ossimSourceInitializeVisitor : public ossimVisitor
+{
+public:
+   ossimSourceInitializeVisitor(int visitorType = VISIT_OUTPUTS);
+   ossimSourceInitializeVisitor(const ossimSourceInitializeVisitor& src);
+   virtual ossimRefPtr<ossimVisitor> dup()const;
+
+   /**
+    * @brief Calls ossimViewInterface::setView if obj cast to
+    * ossimViewInterface*.  On success a property event is sent to
+    * output side so that things like ossimCombiner can reinitialize if
+    * needed.
+    *
+    * @param obj Object to visit.
+    */
+   virtual void visit(ossimObject* obj);
+   
+
+};
+
+#endif
diff --git a/ossim/include/ossim/base/ossimVrect.h b/ossim/include/ossim/base/ossimVrect.h
new file mode 100644
index 0000000..3e5b956
--- /dev/null
+++ b/ossim/include/ossim/base/ossimVrect.h
@@ -0,0 +1,168 @@
+//*******************************************************************
+//
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+// Contains class declaration for vrect.
+// Container class for four double points representing a rectangle
+// where y is up
+// 
+//*******************************************************************
+//  $Id: ossimVrect.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimVrect_HEADER
+#define ossimVrect_HEADER
+#include <iostream>
+
+#include <ossim/base/ossimDpt.h>
+
+class OSSIMDLLEXPORT ossimVrect
+{
+public:
+   ossimVrect()
+      :theUlCorner(0.0, 0.0),
+       theLlCorner(0.0, 0.0),
+       theLrCorner(0.0, 0.0),
+       theUrCorner(0.0, 0.0)
+      {}
+   ossimVrect(const ossimDpt &ul,
+         const ossimDpt &lr)
+      :theUlCorner(ul),
+       theLlCorner(ul.x, lr.y),
+       theLrCorner(lr),
+       theUrCorner(lr.x, ul.y)
+      {}
+   ossimVrect(double ul_corner_x,
+         double ul_corner_y,
+         double lr_corner_x,
+         double lr_corner_y)
+      :
+         theUlCorner(ul_corner_x, ul_corner_y),
+         theLlCorner(ul_corner_x, lr_corner_y),
+         theLrCorner(lr_corner_x, lr_corner_y),
+         theUrCorner(lr_corner_x, ul_corner_y)
+      {}
+   ossimVrect(const ossimVrect& rect)
+      :
+         theUlCorner(rect.ul()),
+         theLlCorner(rect.ll()),
+         theLrCorner(rect.lr()),
+         theUrCorner(rect.ur())
+      {}
+
+   ~ossimVrect();
+
+   const ossimVrect& operator=  (const ossimVrect& rect);
+   bool         operator!= (const ossimVrect& rect) const;
+   bool         operator== (const ossimVrect& rect) const;
+   
+   const ossimDpt &ul() const { return theUlCorner; }
+   const ossimDpt &ur() const { return theUrCorner; }
+   const ossimDpt &lr() const { return theLrCorner; }
+   const ossimDpt &ll() const { return theLlCorner; }
+   /*!
+    * Returns the height of a rectangle.
+    */
+   ossim_float64 height() const
+      { return fabs(theLlCorner.y - theUlCorner.y) + 1.0; }
+
+   /*!
+    * Returns the width of a rectangle.
+    */
+   ossim_float64 width()  const
+      { return fabs(theLrCorner.x - theLlCorner.x) + 1.0; }
+   
+   inline ossimDpt midPoint()const;
+   void print(std::ostream& os) const;
+   
+   ossimVrect combine(const ossimVrect& rect)const;
+   inline ossimVrect clipToRect(const ossimVrect& rect)const;
+
+   friend std::ostream& operator<<(std::ostream& os, const ossimVrect& rect);
+
+private:
+   ossimDpt theUlCorner;
+   ossimDpt theLlCorner;
+   ossimDpt theLrCorner;
+   ossimDpt theUrCorner;
+};
+
+inline const ossimVrect& ossimVrect::operator=(const ossimVrect& rect)
+{
+   if (this != &rect)
+   {
+      theUlCorner = rect.ul();
+      theUrCorner = rect.ur();
+      theLrCorner = rect.lr();
+      theLlCorner = rect.ll();
+   }
+
+   return *this;
+}
+
+inline bool ossimVrect::operator!=(const ossimVrect& rect) const
+{
+   return ( (theUlCorner != rect.ul()) ||
+            (theUrCorner != rect.ur()) ||
+            (theLrCorner != rect.lr()) ||
+            (theLlCorner != rect.ll()) );
+}
+
+inline bool ossimVrect::operator==(const ossimVrect& rect) const
+{
+   return ( (theUlCorner == rect.ul()) &&
+            (theUrCorner == rect.ur()) &&
+            (theLrCorner == rect.lr()) &&
+            (theLlCorner == rect.ll()) );
+}
+
+
+inline ossimVrect ossimVrect::clipToRect(const ossimVrect& rect)const
+{
+    ossim_float64     ulx, uly, lrx, lry;
+
+    // XXX not replaced with std::max or ossim::max since the test is backward 
+    //     here and will give a different answer in the case of nan.
+    #define d_MAX(a,b)      (((a)>(b)) ? a : b)
+
+    ulx = d_MAX(rect.ul().x,ul().x);
+    uly = d_MAX(rect.ul().y,ul().y);
+
+    #undef d_MAX
+
+    lrx = std::min(rect.lr().x,lr().x);
+    lry = std::min(rect.lr().y,lr().y);
+
+    if( lrx <= ulx || lry <= uly )
+        return ossimVrect(ossimDpt(0,0),ossimDpt(0,0));
+    else
+       return ossimVrect(ulx,uly,lrx,lry);
+}
+
+inline ossimDpt ossimVrect::midPoint()const
+{
+   return ossimDpt( (ul().x + ur().x + ll().x + lr().x)*.25,
+               (ul().y + ur().y + ll().y + lr().y)*.25);
+}
+
+inline ossimVrect ossimVrect::combine(const ossimVrect& rect)const
+{
+   ossimDpt ulCombine;
+   ossimDpt lrCombine;
+   
+   ulCombine.x = ((ul().x <= rect.ul().x)?ul().x:rect.ul().x);
+   ulCombine.y = ((ul().y >= rect.ul().y)?ul().y:rect.ul().y);
+   lrCombine.x = ((lr().x >= rect.lr().x)?lr().x:rect.lr().x);
+   lrCombine.y = ((lr().y <= rect.lr().y)?lr().y:rect.lr().y);
+
+   return ossimVrect(ulCombine, lrCombine);
+}
+
+#endif
+
diff --git a/include/ossim/base/ossimWLSBundleSolution.h b/ossim/include/ossim/base/ossimWLSBundleSolution.h
similarity index 100%
rename from include/ossim/base/ossimWLSBundleSolution.h
rename to ossim/include/ossim/base/ossimWLSBundleSolution.h
diff --git a/include/ossim/base/ossimWebRequest.h b/ossim/include/ossim/base/ossimWebRequest.h
similarity index 100%
rename from include/ossim/base/ossimWebRequest.h
rename to ossim/include/ossim/base/ossimWebRequest.h
diff --git a/include/ossim/base/ossimWebRequestFactoryBase.h b/ossim/include/ossim/base/ossimWebRequestFactoryBase.h
similarity index 100%
rename from include/ossim/base/ossimWebRequestFactoryBase.h
rename to ossim/include/ossim/base/ossimWebRequestFactoryBase.h
diff --git a/include/ossim/base/ossimWebRequestFactoryRegistry.h b/ossim/include/ossim/base/ossimWebRequestFactoryRegistry.h
similarity index 100%
rename from include/ossim/base/ossimWebRequestFactoryRegistry.h
rename to ossim/include/ossim/base/ossimWebRequestFactoryRegistry.h
diff --git a/include/ossim/base/ossimWebResponse.h b/ossim/include/ossim/base/ossimWebResponse.h
similarity index 100%
rename from include/ossim/base/ossimWebResponse.h
rename to ossim/include/ossim/base/ossimWebResponse.h
diff --git a/include/ossim/base/ossimWgs72Datum.h b/ossim/include/ossim/base/ossimWgs72Datum.h
similarity index 100%
rename from include/ossim/base/ossimWgs72Datum.h
rename to ossim/include/ossim/base/ossimWgs72Datum.h
diff --git a/include/ossim/base/ossimWgs84Datum.h b/ossim/include/ossim/base/ossimWgs84Datum.h
similarity index 100%
rename from include/ossim/base/ossimWgs84Datum.h
rename to ossim/include/ossim/base/ossimWgs84Datum.h
diff --git a/include/ossim/base/ossimWms.h b/ossim/include/ossim/base/ossimWms.h
similarity index 100%
rename from include/ossim/base/ossimWms.h
rename to ossim/include/ossim/base/ossimWms.h
diff --git a/include/ossim/base/ossimXmlAttribute.h b/ossim/include/ossim/base/ossimXmlAttribute.h
similarity index 100%
rename from include/ossim/base/ossimXmlAttribute.h
rename to ossim/include/ossim/base/ossimXmlAttribute.h
diff --git a/include/ossim/base/ossimXmlDocument.h b/ossim/include/ossim/base/ossimXmlDocument.h
similarity index 100%
rename from include/ossim/base/ossimXmlDocument.h
rename to ossim/include/ossim/base/ossimXmlDocument.h
diff --git a/include/ossim/base/ossimXmlNode.h b/ossim/include/ossim/base/ossimXmlNode.h
similarity index 100%
rename from include/ossim/base/ossimXmlNode.h
rename to ossim/include/ossim/base/ossimXmlNode.h
diff --git a/ossim/include/ossim/base/ossimXmlString.h b/ossim/include/ossim/base/ossimXmlString.h
new file mode 100644
index 0000000..61d3446
--- /dev/null
+++ b/ossim/include/ossim/base/ossimXmlString.h
@@ -0,0 +1,67 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author: Garrett Potts
+// Description: This class provides manipulation of filenames.
+//
+//*************************************************************************
+// $Id: ossimXmlString.h 22326 2013-07-25 17:13:55Z gpotts $
+
+#ifndef ossimXmlString_HEADER
+#define ossimXmlString_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimString.h>
+
+class OSSIM_DLL ossimXmlString : public ossimString
+{
+public:
+   ossimXmlString()
+      :
+         ossimString()
+      {}
+   ossimXmlString(const ossimXmlString& src)
+      :
+         ossimString(src)
+      {}
+   ossimXmlString(const ossimString& src)
+      :
+         ossimString("")
+      {
+         assign(src);
+
+      }
+   ossimXmlString(const char* src)
+      :
+         ossimString("")
+      {
+         assign(src);
+      }
+   
+   template <class Iter>
+   ossimXmlString(Iter s, Iter e)
+      :ossimString("")
+      {
+         assign(ossimString(s, e));
+      }
+
+   const ossimXmlString& operator =(const char* s)
+      {
+         return assign(ossimString(s));
+      }
+   	  const ossimXmlString& operator =(const ossimString& s)
+      {
+         return assign(ossimString(s));
+      }
+	  const ossimXmlString& operator =(const std::string& s)
+      {
+         return assign(ossimString(s));
+      }
+   static ossimString wrapCDataIfNeeded(const ossimString& input);
+   static ossimString wrapCData(const ossimString& input);
+   static bool containsSpecialXmlCharacters(const ossimString& value);
+   const ossimXmlString& assign(const ossimString& s);
+};
+
+#endif
diff --git a/ossim/include/ossim/elevation/ossimDtedElevationDatabase.h b/ossim/include/ossim/elevation/ossimDtedElevationDatabase.h
new file mode 100644
index 0000000..fde095f
--- /dev/null
+++ b/ossim/include/ossim/elevation/ossimDtedElevationDatabase.h
@@ -0,0 +1,81 @@
+#ifndef ossimDtedElevationDatabase_HEADER
+#define ossimDtedElevationDatabase_HEADER 1
+
+#include <ossim/elevation/ossimElevationCellDatabase.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/elevation/ossimDtedHandler.h>
+#include <OpenThreads/Mutex>
+
+class OSSIM_DLL ossimDtedElevationDatabase : public ossimElevationCellDatabase
+{
+public:
+   typedef std::vector<ossimRefPtr<CellInfo> > DirectMap; // 360x180 cell grid
+   ossimDtedElevationDatabase()
+   :ossimElevationCellDatabase(),
+   m_extension("")
+   {
+   }
+   ossimDtedElevationDatabase(const ossimDtedElevationDatabase& rhs)
+   :ossimElevationCellDatabase(rhs),
+   m_extension(rhs.m_extension)
+   {
+   }
+   virtual ~ossimDtedElevationDatabase()
+   {
+   }
+
+   virtual ossimObject* dup() const
+   {
+      ossimDtedElevationDatabase* duped = new ossimDtedElevationDatabase;
+      duped->open(m_connectionString);
+      return duped;
+   }
+
+   virtual bool open(const ossimString& connectionString);
+   virtual bool pointHasCoverage(const ossimGpt& gpt) const
+   {
+      ossimFilename filename;
+      createFullPath(filename, gpt);
+      
+      return filename.exists();
+   }
+   
+   virtual bool getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const;
+   virtual double getHeightAboveMSL(const ossimGpt&);
+   virtual double getHeightAboveEllipsoid(const ossimGpt& gpt);
+   virtual ossim_uint64 createId(const ossimGpt& pt)const
+   {
+      ossim_uint64 y = static_cast<ossim_uint64>(ossim::wrap(pt.latd(), -90.0, 90.0)+90.0);
+      ossim_uint64 x = static_cast<ossim_uint64>(ossim::wrap(pt.lond(),-180.0,180.0)+180.0);
+      // map the extreme edge to the same ID ax the 179 west cell and the same for the 89
+      // degree north cell.
+      //
+      x = x==360?359:x;
+      y = y==180?179:y;
+      // dted databases are 1x1 degree cells and we will use a world 
+      // grid for id generation.
+      //
+      return (y*360+x);
+   }
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix = 0);
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix = 0)const;
+   
+   virtual std::ostream& print(std::ostream& out) const;
+
+protected:
+   ossimString                m_extension;
+   ossimRefPtr<ossimElevCellHandler> m_lastHandler;
+   mutable OpenThreads::Mutex m_mutex;
+   
+   bool openDtedDirectory(const ossimFilename& dir);
+   void createRelativePath(ossimFilename& file, const ossimGpt& gpt)const;
+   void createFullPath(ossimFilename& file, const ossimGpt& gpt)const
+   {
+      ossimFilename relativeFile;
+      createRelativePath(relativeFile, gpt);
+      file = ossimFilename(m_connectionString).dirCat(relativeFile);
+   }
+   virtual ossimRefPtr<ossimElevCellHandler> createCell(const ossimGpt& gpt);
+TYPE_DATA
+};
+#endif
diff --git a/ossim/include/ossim/elevation/ossimDtedFactory.h b/ossim/include/ossim/elevation/ossimDtedFactory.h
new file mode 100644
index 0000000..03a7c90
--- /dev/null
+++ b/ossim/include/ossim/elevation/ossimDtedFactory.h
@@ -0,0 +1,39 @@
+//*****************************************************************************
+// FILE: ossimDtedFactory.cc
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author:  David Burken
+//
+// Description:
+//
+// Class declaration for ossimDtedFactory.
+// This is the base class interface for elevation cell factories.
+//*****************************************************************************
+// $Id: ossimDtedFactory.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimDtedFactory_HEADER
+#define ossimDtedFactory_HEADER
+
+#include <ossim/elevation/ossimElevSourceFactory.h>
+
+/** CLASS:  ossimDtedFactory */
+class OSSIM_DLL ossimDtedFactory : public ossimElevSourceFactory
+{
+public:
+
+   ossimDtedFactory();
+   ossimDtedFactory(const ossimFilename& dir);
+      
+
+   virtual ossimElevSource* getNewElevSource(const ossimGpt& gpt) const;
+   virtual void createIndex();
+protected:
+   virtual ~ossimDtedFactory();
+
+TYPE_DATA
+};
+
+#endif /* End of "#ifndef ossimDtedFactory_HEADER" */
+
diff --git a/ossim/include/ossim/elevation/ossimDtedHandler.h b/ossim/include/ossim/elevation/ossimDtedHandler.h
new file mode 100644
index 0000000..801750d
--- /dev/null
+++ b/ossim/include/ossim/elevation/ossimDtedHandler.h
@@ -0,0 +1,241 @@
+//*****************************************************************************
+// FILE: ossimDtedHandler.h
+//
+// License:  See top level LICENSE.txt file.
+//
+// DESCRIPTION:
+//   Contains declaration of class ossimDtedHandler. This class derives from
+//   ossimElevHandler. It is responsible for loading an individual DTED cell
+//   from disk. This elevation files are memory mapped.
+//
+// SOFTWARE HISTORY:
+//>
+//   05Feb2001  Ken Melero
+//              Initial coding of ossimDted.h
+//   19Apr2001  Oscar Kramer
+//              Derived from ossimElevCellHandler.
+//<
+//*****************************************************************************
+// $Id: ossimDtedHandler.h 23497 2015-08-28 15:28:59Z okramer $
+
+#ifndef ossimDtedHandler_HEADER
+#define ossimDtedHandler_HEADER
+
+#include <fstream>
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/elevation/ossimElevCellHandler.h>
+#include <OpenThreads/Mutex>
+#include <ossim/support_data/ossimDtedVol.h>
+#include <ossim/support_data/ossimDtedHdr.h>
+#include <ossim/support_data/ossimDtedUhl.h>
+#include <ossim/support_data/ossimDtedDsi.h>
+#include <ossim/support_data/ossimDtedAcc.h>
+#include <ossim/support_data/ossimDtedRecord.h>
+
+class OSSIM_DLL ossimDtedHandler : public ossimElevCellHandler
+{
+public:
+
+   /// number of Dted posts per point.
+   static const int TOTAL_POSTS = 4;
+   /// number of Dted posts per block
+   static const int NUM_POSTS_PER_BLOCK= 2;
+
+   /// ossimDtedHandler
+   ossimDtedHandler()
+   {
+   }
+
+   ossimDtedHandler(const ossimFilename& dted_file, bool memoryMapFlag=false);
+
+   enum
+   {
+      DATA_RECORD_OFFSET_TO_POST = 8,     // bytes
+      DATA_RECORD_CHECKSUM_SIZE  = 4,     // bytes
+      POST_SIZE                  = 2,     // bytes
+      NULL_POST                  = -32767 // Fixed by DTED specification.
+   };
+
+   virtual bool open(const ossimFilename& file, bool memoryMapFlag=false);
+   virtual void close();
+   
+   /*!
+    * METHOD: getHeightAboveMSL
+    * Height access methods.
+    */
+   virtual double getHeightAboveMSL(const ossimGpt&);
+
+   /*!
+    *  METHOD:  getSizeOfElevCell
+    *  Returns the number of post in the cell.  Satisfies pure virtual.
+    *  Note:  x = longitude, y = latitude
+    */
+   virtual ossimIpt getSizeOfElevCell() const;
+      
+   /*!
+    *  METHOD:  getPostValue
+    *  Returns the value at a given grid point as a double.
+    *  Satisfies pure virtual.
+    */
+   virtual double getPostValue(const ossimIpt& gridPt) const;
+
+   ossimString  edition()         const;
+   ossimString  productLevel()    const;
+   ossimString  compilationDate() const;
+
+   virtual bool isOpen()const;
+   
+   virtual bool getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const;
+   
+   const ossimDtedVol& vol()const
+   {
+      return m_vol;
+   }
+   const ossimDtedHdr& hdr()const
+   {
+      return m_hdr;
+   }
+   const ossimDtedUhl& uhl()const
+   {
+      return m_uhl;
+   }
+   const ossimDtedDsi& dsi()const
+   {
+      return m_dsi;
+   }
+   const ossimDtedAcc& acc()const
+   {
+      return m_acc;
+   }
+
+   virtual ossimObject* dup () const
+   {
+      return new ossimDtedHandler(this->getFilename(), (m_memoryMap.size() != 0));
+   }
+
+   virtual ~ossimDtedHandler();
+
+protected:
+
+   /// DtedPost, this class contains the height, weighting factor and status
+   class DtedPost
+   {
+   public:
+     // constructor - initialise variables
+     DtedPost():
+       m_height(0),
+       m_weight(0),
+       m_status(false)
+     {
+     }
+     // destructor
+     virtual ~DtedPost();
+     // member variables
+     double m_height;
+     double m_weight;
+     bool m_status;
+   };
+
+   /// DtedHeight is a class for storing DTED information
+   /// - 4 posts are used to generate an interpolated height value.
+   class DtedHeight
+   {
+   public:
+     // constructor
+     DtedHeight();
+     // destructor
+     virtual ~DtedHeight();
+     // calculate the interpolated Height for the posts
+     double calcHeight();
+     // debug
+     void debug();
+     // post data
+     DtedPost m_posts[TOTAL_POSTS];
+   };
+
+
+  // Disallow operator= and copy construction...
+   const ossimDtedHandler& operator=(const ossimDtedHandler& rhs);
+   ossimDtedHandler(const ossimDtedHandler&);
+
+   /*!
+    *  If statistics file exist, stats will be initialized from that; else,
+    *  this scans the dted cell and gets stats, then, writes new stats file.
+    *  The statistics file will be named accordingly:
+    *  If dted cell = n27.dt1 then the stats file = n27.statistics.
+    *  Currently method only grabs the min and max posts value.
+    */
+   void gatherStatistics();
+
+   ossim_sint16 convertSignedMagnitude(ossim_uint16& s) const;
+   virtual double getHeightAboveMSL(const ossimGpt&, bool readFromFile);
+
+  /**
+   * read the height posts from the File
+   * @param postData - post heights, status & weight
+   * @param offset - file contents offset to start reading from
+   */
+   void readPostsFromFile(DtedHeight &postData, int offset);
+
+   mutable OpenThreads::Mutex m_fileStrMutex;
+   mutable std::ifstream m_fileStr;
+   
+   ossim_int32      m_numLonLines;  // east-west dir
+   ossim_int32      m_numLatPoints; // north-south
+   ossim_int32      m_dtedRecordSizeInBytes;
+   ossimString      m_edition;
+   ossimString      m_productLevel;
+   ossimString      m_compilationDate;
+   ossim_int32      m_offsetToFirstDataRecord;
+   double           m_latSpacing;   // degrees
+   double           m_lonSpacing;   // degrees
+   ossimDpt         m_swCornerPost; // cell origin;
+
+   // Indicates whether byte swapping is needed.
+   bool m_swapBytesFlag;
+
+   mutable OpenThreads::Mutex m_memoryMapMutex;
+   mutable std::vector<ossim_uint8> m_memoryMap;
+   
+   ossimDtedVol m_vol;
+   ossimDtedHdr m_hdr;
+   ossimDtedUhl m_uhl;
+   ossimDtedDsi m_dsi;
+   ossimDtedAcc m_acc;
+   TYPE_DATA
+};
+
+inline ossim_sint16 ossimDtedHandler::convertSignedMagnitude(ossim_uint16& s) const
+{
+   // DATA_VALUE_MASK 0x7fff = 0111 1111 1111 1111
+   // DATA_SIGN_MASK  0x8000 = 1000 0000 0000 0000
+   
+   // First check to see if the bytes need swapped.
+   s = (m_swapBytesFlag ? ( ((s & 0x00ff) << 8) | ((s & 0xff00) >> 8) ) : s);
+   
+   // If the sign bit is set, mask it out then multiply by negative one.
+   if (s & 0x8000)
+   {
+      return (static_cast<ossim_sint16>(s & 0x7fff) * -1);
+   }
+   
+   return static_cast<ossim_sint16>(s);
+}
+
+inline bool ossimDtedHandler::isOpen()const
+{
+   if(!m_memoryMap.empty()) return true;
+   
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_fileStrMutex);
+   return (m_fileStr.is_open());
+}
+
+inline void ossimDtedHandler::close()
+{
+   m_fileStr.close();
+   m_memoryMap.clear();
+}
+
+#endif
diff --git a/ossim/include/ossim/elevation/ossimElevCellHandler.h b/ossim/include/ossim/elevation/ossimElevCellHandler.h
new file mode 100644
index 0000000..c4f491f
--- /dev/null
+++ b/ossim/include/ossim/elevation/ossimElevCellHandler.h
@@ -0,0 +1,110 @@
+//*****************************************************************************
+// FILE: ossimElevCellHandler.h
+//
+// License:  See top level LICENSE.txt file.
+//
+// DESCRIPTION:
+//   Contains declaration of class osimElevHandler. This class provides a
+//   base-class interface for the various DEM file formats.
+//
+// SOFTWARE HISTORY:
+//>
+//   13Apr2001  Oscar Kramer
+//              Initial coding.
+//<
+//*****************************************************************************
+// $Id: ossimElevCellHandler.h 23117 2015-01-29 22:33:13Z okramer $
+
+
+#ifndef ossimElevCellHandler_HEADER
+#define ossimElevCellHandler_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/elevation/ossimElevSource.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimIpt.h>
+
+class ossimGpt;
+
+/******************************************************************************
+ *
+ * CLASS:  ossimElevCellHandler
+ *
+ *****************************************************************************/
+class OSSIM_DLL ossimElevCellHandler : public ossimElevSource
+{
+public:
+   /**
+    * Constructors:
+    */
+
+   ossimElevCellHandler (const char* elev_filename);
+   ossimElevCellHandler (const ossimElevCellHandler& src);
+
+   virtual const ossimFilename& getFilename() const;
+   
+   
+   /**
+    *  METHOD:  getSizeOfElevCell 
+    *  Returns the number of post in the cell.
+    *  Note:  x = longitude, y = latitude
+    */
+   virtual ossimIpt getSizeOfElevCell() const = 0;
+
+   /**
+    *  METHOD:  getPostValue
+    *  Returns the value at a given grid point as a double.
+    */
+   virtual double getPostValue(const ossimIpt& gridPt) const = 0;
+      
+   /**
+    * METHOD: meanSpacingMeters()
+    * Implements pure virtual for. This method is used for deterrming
+    * preferred DEM among multiple overlapping elev sources:
+    */
+   virtual double getMeanSpacingMeters() const;
+
+   /**
+    * METHOD: pointIsInsideRect()
+    * Method to check if the ground point elevation is defined:
+    */
+   virtual bool pointHasCoverage(const ossimGpt&) const;
+
+   virtual bool getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const;
+   /**
+    * METHODS: accuracyLE90(), accuracyCE90()
+    * Returns the vertical and horizontal accuracy (90% confidence):
+    */
+ // virtual double getAccuracyLE90(const ossimGpt&) const;
+ //  virtual double getAccuracyCE90(const ossimGpt&) const;
+
+   bool canConnectMyInputTo(ossim_int32 inputIndex,
+                            const ossimConnectableObject* object)const;
+   virtual void close(){}
+   virtual bool open(const ossimFilename&, bool=false){return false;}
+      
+   virtual std::ostream& print(std::ostream& out) const;
+
+protected:
+   ossimElevCellHandler ();
+   virtual ~ossimElevCellHandler();
+   
+   /**
+    * Virtual method for reading 
+    */
+   ossimFilename        theFilename;
+   double               theMeanSpacing;  // meters
+   double               theAbsLE90;
+   double               theAbsCE90;
+
+
+   
+TYPE_DATA
+};
+
+inline bool ossimElevCellHandler::pointHasCoverage(const ossimGpt& gpt) const
+{
+   return theGroundRect.pointWithin(gpt);
+}
+
+#endif
diff --git a/include/ossim/elevation/ossimElevCellHandlerFactory.h b/ossim/include/ossim/elevation/ossimElevCellHandlerFactory.h
similarity index 100%
rename from include/ossim/elevation/ossimElevCellHandlerFactory.h
rename to ossim/include/ossim/elevation/ossimElevCellHandlerFactory.h
diff --git a/include/ossim/elevation/ossimElevLess.h b/ossim/include/ossim/elevation/ossimElevLess.h
similarity index 100%
rename from include/ossim/elevation/ossimElevLess.h
rename to ossim/include/ossim/elevation/ossimElevLess.h
diff --git a/ossim/include/ossim/elevation/ossimElevManager.h b/ossim/include/ossim/elevation/ossimElevManager.h
new file mode 100644
index 0000000..ec5cf92
--- /dev/null
+++ b/ossim/include/ossim/elevation/ossimElevManager.h
@@ -0,0 +1,184 @@
+//*****************************************************************************
+// FILE: ossimElevManager.h
+//
+// License:  See top level LICENSE.txt file.
+//
+// DESCRIPTION:
+//   Contains declaration of class ossimElevManager. This object provides a
+//   single interface to an imaging chain for accessing multiple elevation
+//   sources. This object owns one or more elevation sources in an ordered
+//   list. When queried for an elevation at a particular point, it searches
+//   the available sources for the best result, instantiating new sources if
+//   necessary.
+//
+// SOFTWARE HISTORY:
+//>
+//   13Apr2001  Oscar Kramer
+//              Initial coding.
+//<
+//*****************************************************************************
+#ifndef ossimElevManager_HEADER
+#define ossimElevManager_HEADER
+
+#include <vector>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimVisitor.h>
+#include <ossim/elevation/ossimElevSource.h>
+#include <ossim/elevation/ossimElevationDatabase.h>
+#include <OpenThreads/ReadWriteMutex>
+
+class OSSIM_DLL ossimElevManager : public ossimElevSource
+{
+public: 
+   typedef std::vector<ossimRefPtr<ossimElevationDatabase> > ElevationDatabaseListType;
+   
+   class OSSIM_DLL ConnectionStringVisitor : public ossimVisitor
+   {
+   public:
+      ConnectionStringVisitor(const ossimString& value);
+      virtual ossimRefPtr<ossimVisitor> dup()const{return new ConnectionStringVisitor(*this);}
+      const ossimString& getConnectionString()const{return m_connectionString;}
+      virtual void visit(ossimObject* obj);
+      ossimElevationDatabase* getElevationDatabase(){return m_database.get();}
+      
+   protected:
+      ossimString m_connectionString;
+      ossimRefPtr<ossimElevationDatabase> m_database;
+   };
+   
+   virtual ~ossimElevManager();
+   
+   /**
+    * METHOD: instance()
+    * Implements singelton pattern
+    */
+   static ossimElevManager* instance();
+   
+   virtual double getHeightAboveEllipsoid(const ossimGpt& gpt);
+   virtual double getHeightAboveMSL(const ossimGpt& gpt);
+   virtual bool pointHasCoverage(const ossimGpt&) const;
+
+   /**
+    * Returns the mean post spacing (in meters) for the highest resolution DEM in the list or NaN
+    * if no DEMs have been loaded. Recommended to perform a getHeight() call for a central
+    * ground pt first to load the relevant cells before calling this method.
+    */
+   virtual double getMeanSpacingMeters() const;
+
+   virtual bool getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const;
+  
+   ossim_uint32 getNumberOfElevationDatabases()const
+   {
+      return (ossim_uint32) m_dbRoundRobin[0].size();
+   }
+   ossimElevationDatabase* getElevationDatabase(ossim_uint32 idx)
+   {
+      return m_dbRoundRobin[0][idx].get();
+   }
+   const ossimElevationDatabase* getElevationDatabase(ossim_uint32 idx)const
+   {
+      return m_dbRoundRobin[0][idx].get();
+   }
+   void addDatabase(ossimElevationDatabase* database);
+   bool loadElevationPath(const ossimFilename& path);
+   
+   void setDefaultHeightAboveEllipsoid(double meters) {m_defaultHeightAboveEllipsoid=meters;}
+   void setElevationOffset(double meters) {m_elevationOffset=meters;}
+   double getElevationOffset() const { return m_elevationOffset; }
+   
+   void getOpenCellList(std::vector<ossimFilename>& list) const;
+
+   /**
+    * @brief Gets a list of elevation cells needed to cover bounding box.
+    * @param connectionString Typically elevation repository, e.g.:
+    * "/data1/elevation/srtm/1arc"
+    * @param minLat Minimum latitude of bounding box.
+    * @param minLon Minimum longitude of bounding box.
+    * @param maxLat Maximum latitude of bounding box.
+    * @param maxLon Maximum longitude of bounding box.
+    * @param cells Initialized by this.
+    * @param maxNumberOfCells Value of 0 indicates return as many as you can.  Any positive
+    *        number will only return that number of cells.
+    */
+   void getCellsForBounds( const std::string& connectionString,
+                           const ossim_float64& minLat,
+                           const ossim_float64& minLon,
+                           const ossim_float64& maxLat,
+                           const ossim_float64& maxLon,
+                           std::vector<std::string>& cells,
+                           ossim_uint32 maxNumberOfCells=0 );
+
+   /**
+    * @brief Gets a list of elevation cells needed to cover bounding box.
+    *
+    * This implementation sorts elevation repositories by resolution, best
+    * first, then searches cells for bounds. Search is stopped on the first
+    * repository that has cells.
+    * 
+    * @param minLat Minimum latitude of bounding box.
+    * @param minLon Minimum longitude of bounding box.
+    * @param maxLat Maximum latitude of bounding box.
+    * @param maxLon Maximum longitude of bounding box.
+    * @param cells Initialized by this.
+    * @param maxNumberOfCells Value of 0 indicates return as many as you can.  Any positive
+    *        number will only return that number of cells.
+    */
+   void getCellsForBounds( const ossim_float64& minLat,
+                           const ossim_float64& minLon,
+                           const ossim_float64& maxLat,
+                           const ossim_float64& maxLon,
+                           std::vector<std::string>& cells,
+                           ossim_uint32 maxNumberOfCells=0 );
+   void getCellsForBounds( const ossimGrect& bounds,
+                           std::vector<std::string>& cells,
+                           ossim_uint32 maxNumberOfCells=0 );
+
+   void setUseGeoidIfNullFlag(bool flag) { m_useGeoidIfNullFlag = flag; }
+   bool getUseGeoidIfNullFlag() const { return m_useGeoidIfNullFlag; }
+   void setRoundRobinMaxSize(ossim_uint32 size);
+
+   void clear();
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0) const;
+   
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+   
+   virtual void accept(ossimVisitor& visitor);
+   
+   virtual std::ostream& print(std::ostream& out) const;
+
+protected:
+   virtual ossimObject* dup() const { return 0; } // required to implement but not permitted to call
+
+   ossimElevManager();
+   void loadStandardElevationPaths();
+
+   ElevationDatabaseListType& getNextElevDbList() const; // for multithreading
+   
+   //static ossimElevManager* m_instance;
+   mutable std::vector<ElevationDatabaseListType> m_dbRoundRobin;
+   ossim_uint32 m_maxRoundRobinSize;
+   ossim_float64 m_defaultHeightAboveEllipsoid;
+   ossim_float64 m_elevationOffset;
+   
+   // if an elevation is returned that's null for ellipsoid then use the geoid manager to calculate a shift
+   bool m_useGeoidIfNullFlag;
+   
+   mutable ossim_uint32 m_currentDatabaseIdx;
+   
+   /**
+    * I have tried the readwrite lock interfaces but have found it unstable.  I am using the standard Mutex
+    * and it seems to be much more stable across all platforms.  More testing needs to occur for the ReadWriteMutex.
+    * For now we will use Mutex.
+    */
+   mutable OpenThreads::Mutex m_mutex;
+};
+
+#endif
diff --git a/ossim/include/ossim/elevation/ossimElevSource.h b/ossim/include/ossim/elevation/ossimElevSource.h
new file mode 100644
index 0000000..8b3a276
--- /dev/null
+++ b/ossim/include/ossim/elevation/ossimElevSource.h
@@ -0,0 +1,182 @@
+//*****************************************************************************
+// FILE: ossimElevSource.h
+//
+// License:  See top level LICENSE.txt file.
+// 
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION:
+//   Contains declaration of class ossimElevSource. This is the base class for
+//   all objects providing height information given horizontal ground position.
+//
+//*****************************************************************************
+// $Id: ossimElevSource.h 23117 2015-01-29 22:33:13Z okramer $
+
+#ifndef ossimElevSource_HEADER
+#define ossimElevSource_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimSource.h>
+#include <ossim/base/ossimGrect.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimGeoid.h>
+#include <ossim/elevation/ossimElevationAccuracyInfo.h>
+class ossimEcefRay;
+class ossimKeywordlist;
+
+/******************************************************************************
+ * CLASS:  ossimElevSource
+ *
+ *****************************************************************************/
+class OSSIM_DLL ossimElevSource : public ossimSource
+{
+public:
+
+   /**
+    * Height access methods:
+    */
+   virtual double getHeightAboveMSL(const ossimGpt&) = 0;
+   virtual double getHeightAboveEllipsoid(const ossimGpt&);
+
+   // Forces all concrete subtypes to implement:
+   virtual ossimObject* dup() const = 0;
+
+   /**
+    *  METHOD: intersectRay()
+    *  
+    *  Service method for intersecting a ray with the elevation surface to
+    *  arrive at a ground point. The ray is expected to originate ABOVE the
+    *  surface and pointing down.
+    *
+    *  NOTE: the gpt argument is expected to be initialized with the desired
+    *  datum, including ellipsoid, for the proper intersection point to be
+    *  computed.
+    *
+    *  LIMITATION: This release supports only single valued solutions, i.e., it
+    *  is possible a ray passing through one side of a mountain and out the
+    *  other will return an intersection with the far side. Eventually,
+    *  a more robust algorithm will be employed.
+    *
+    *  Returns true if good intersection found.
+    */
+   bool intersectRay(const ossimEcefRay& ray, ossimGpt& gpt, double defaultElevValue = 0.0);
+   
+   /**
+    * Access methods for the bounding elevations:
+    */
+   virtual double getMinHeightAboveMSL() const;
+   virtual double getMaxHeightAboveMSL() const;
+
+   /**
+    * Special numeric quantities as defined by this source:
+    */
+   double getNullHeightValue() const;
+   double getSeaLevelValue()   const;
+
+   /**
+    * METHOD: pointHasCoverage(gpt)
+    * Returns TRUE if coverage exists over gpt:
+    */
+   virtual bool pointHasCoverage(const ossimGpt&) const = 0;
+
+   /**
+    * METHOD: meanSpacingMeters()
+    * This method returns the post spacing in the region of gpt:
+    */
+   virtual double getMeanSpacingMeters() const = 0;
+
+
+   virtual bool getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const =0;
+
+
+
+   /**
+    * METHODS: accuracyLE90(), accuracyCE90()
+    * Returns the vertical and horizontal accuracy (90% confidence) in the
+    * region of gpt:
+    */
+   //virtual double getAccuracyLE90(const ossimGpt& gpt) const = 0;
+   //virtual double getAccuracyCE90(const ossimGpt& gpt) const = 0;
+
+
+   /**
+    *  METHOD:  getBoundingGndRect
+    *  
+    *  @return  The bounding geograpic rectangle in decimal degrees.
+    */
+   virtual const ossimGrect& getBoundingGndRect() const;
+   
+   virtual bool canConnectMyInputTo(ossim_int32 inputIndex,
+                                    const ossimConnectableObject* object)const;
+   
+   /**
+    * Implement ossimSource base-class pure virtuals:
+    */
+   virtual void initialize();
+
+   /**
+    * Opens a stream to an elevation cell.
+    *
+    * @return Returns true on success, false on error.
+    *
+    * @note This implementation always returns true.  This should be
+    * overridden in derived classes that have streams to files.
+    */
+//   virtual bool open();
+   
+   /**
+    * Closes the stream to the file.
+    *
+    * @note This implementation does nothing.  This should be
+    * overridden in derived classes that have streams to files.
+    */
+//   virtual void close();
+
+   /**
+    * @return Returns the flag which controls whether or not statistics will
+    * be computed upon opening a cell and not finding a corresponding
+    * statistics file.
+    */
+   virtual bool getComputeStatisticsFlag() const;
+
+   /**
+    * Sets the flag which controls whether or not statistics will
+    * be computed upon opening a cell and not finding a corresponding
+    * statistics file.
+    *
+    * @param flag  true to enable, false to disable.
+    *
+    * @note This flag can also be controlled by user via the ossim preferences
+    * keyword = "elevation.compute_statistics.enabled".
+    */
+   virtual void setComputeStatisticsFlag(bool flag);
+
+   virtual std::ostream& print(std::ostream& out) const;
+
+protected:
+   virtual ~ossimElevSource();
+   /**
+    * Constructors/Destructors:
+    */
+   ossimElevSource();
+   ossimElevSource(const ossimElevSource& src);
+
+   /**
+    * Data members:
+    */
+   double     theMinHeightAboveMSL;
+   double     theMaxHeightAboveMSL;
+   double     theNullHeightValue;
+   double     theSeaLevelValue;
+   ossimGrect theGroundRect;
+
+   //> Controls statistics gathering.  Defaulted to true.
+   bool       theComputeStatsFlag;
+
+
+private:
+
+TYPE_DATA
+};
+
+#endif
diff --git a/ossim/include/ossim/elevation/ossimElevSourceFactory.h b/ossim/include/ossim/elevation/ossimElevSourceFactory.h
new file mode 100644
index 0000000..717e58d
--- /dev/null
+++ b/ossim/include/ossim/elevation/ossimElevSourceFactory.h
@@ -0,0 +1,75 @@
+//----------------------------------------------------------------------------
+// FILE: ossimElevSourceFactory.cc
+//
+// Copyright (C) 2002 ImageLinks, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Class declaration for ossimElevSourceFactory.
+//
+// This is the base class interface for elevation source factories which main
+// function is to return an elevation source that covers the ground point
+// passed to the "getElevSource" method.
+//
+// Note the caller of "getElevSource" is responsible for managing the memory
+// new'd from the method.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimElevSourceFactory.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimElevSourceFactory_HEADER
+#define ossimElevSourceFactory_HEADER
+
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimFilename.h>
+
+class ossimElevSource;
+class ossimGpt;
+
+/*!****************************************************************************
+ * CLASS:  ossimElevSourceFactory
+ *
+ *****************************************************************************/
+class OSSIM_DLL ossimElevSourceFactory : public ossimObject
+{
+public:
+
+   /** default constructor */
+   ossimElevSourceFactory();
+
+   /** virtual destructor */
+   virtual ~ossimElevSourceFactory();
+
+   /**
+    *  Pure virtual method.
+    *  return an elevation source pointer that has elevation coverage for the
+    *  ground point passed in.
+    *  Note the caller of this method is responsible for managing the memory
+    *  allocated.
+    */
+   virtual ossimElevSource* getNewElevSource(const ossimGpt& gpt)const=0;
+
+   /**
+    * @return The directory the factory returns data from.
+    */
+   virtual ossimFilename getDirectory() const;
+
+   /**
+    * @param directory The directory to return data from.
+    */
+   virtual void setDirectory(const ossimFilename& directory);
+
+protected:
+   ossimFilename theDirectory;
+   
+TYPE_DATA
+}; 
+
+#endif /* End of "#ifndef ossimElevSourceFactory_HEADER" */
+
diff --git a/include/ossim/elevation/ossimElevationAccuracyInfo.h b/ossim/include/ossim/elevation/ossimElevationAccuracyInfo.h
similarity index 100%
rename from include/ossim/elevation/ossimElevationAccuracyInfo.h
rename to ossim/include/ossim/elevation/ossimElevationAccuracyInfo.h
diff --git a/ossim/include/ossim/elevation/ossimElevationCellDatabase.h b/ossim/include/ossim/elevation/ossimElevationCellDatabase.h
new file mode 100644
index 0000000..cf40646
--- /dev/null
+++ b/ossim/include/ossim/elevation/ossimElevationCellDatabase.h
@@ -0,0 +1,170 @@
+#ifndef ossimElevationCellDatabase_HEADER
+#define ossimElevationCellDatabase_HEADER 1
+#include <ossim/elevation/ossimElevationDatabase.h>
+
+class OSSIM_DLL ossimElevationCellDatabase : public ossimElevationDatabase
+{
+public:
+   struct CellInfo : ossimReferenced
+   {
+      CellInfo(ossim_uint64 id, ossimElevCellHandler* handler = 0)
+         :ossimReferenced(),
+          m_id(id),
+          m_handler(handler),
+          m_timestamp(0)
+      {
+            m_timestamp = ossimTimer::instance()->tick();
+      }
+      CellInfo(const CellInfo& src)
+         :ossimReferenced(src),
+          m_id(src.m_id),
+          m_handler(src.m_handler),
+          m_timestamp(src.m_timestamp)
+      {
+      }
+      CellInfo()
+         :ossimReferenced(),
+          m_id(0),
+          m_handler(0),
+          m_timestamp(0)
+      {
+      }
+      const CellInfo& operator =(const CellInfo& src)
+      {
+         if (this != &src)
+         {
+            m_id = src.m_id;
+            m_handler = src.m_handler;
+            m_timestamp = src.m_timestamp;
+         }
+         return *this;
+      }
+      void updateTimestamp()
+      {
+         m_timestamp = ossimTimer::instance()->tick();
+      }
+      ossim_uint64 id()const
+      {
+         return m_id;
+      }
+      ossim_uint64                      m_id;
+      ossimRefPtr<ossimElevCellHandler> m_handler;
+      ossimTimer::Timer_t               m_timestamp;
+   };
+
+   typedef std::map<ossim_uint64, ossimRefPtr<CellInfo> > CellMap;
+   
+   ossimElevationCellDatabase()
+      :ossimElevationDatabase(),
+      m_minOpenCells(5),
+      m_maxOpenCells(10),
+      m_memoryMapCellsFlag(false)
+   {
+   }
+   ossimElevationCellDatabase(const ossimElevationCellDatabase& src)
+      :ossimElevationDatabase(src),
+      m_minOpenCells(src.m_minOpenCells),
+      m_maxOpenCells(src.m_maxOpenCells),
+      m_cacheMap(src.m_cacheMap),
+      m_memoryMapCellsFlag(src.m_memoryMapCellsFlag)
+   {
+   }
+
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
+   virtual ossim_uint32 getMinOpenCells()const
+   {
+      return m_minOpenCells;
+   }
+   virtual ossim_uint32 getMaxOpenCells()const
+   {
+      return m_maxOpenCells;
+   }
+   virtual void setMinMaxOpenCells(ossim_uint64 minCellCount,
+                                   ossim_uint64 maxCellCount)
+   {
+      m_minOpenCells = minCellCount;
+      m_maxOpenCells = maxCellCount;
+   }
+   virtual bool getMemoryMapCellsFlag()const
+   {
+      return m_memoryMapCellsFlag;
+   }
+   virtual void setMemoryMapCellsFlag(bool flag)
+   {
+      m_memoryMapCellsFlag = flag;
+   }
+
+   virtual void getOpenCellList(std::vector<ossimFilename>& list) const;
+
+   /**
+    * @brief Gets a list of elevation cells needed to cover bounding box.
+    * @param connectionString Typically elevation repository, e.g.:
+    * "/data1/elevation/srtm/1arc"
+    * @param minLat Minimum latitude of bounding box.
+    * @param minLon Minimum longitude of bounding box.
+    * @param maxLat Maximum latitude of bounding box.
+    * @param maxLon Maximum longitude of bounding box.
+    * @param cells Initialized by this.
+    * @param maxNumberOfCells Value of 0 indicates return as many as you can.  Any positive
+    *        number will only return that number of cells.
+    */   
+   void getCellsForBounds( const ossim_float64& minLat,
+                           const ossim_float64& minLon,
+                           const ossim_float64& maxLat,
+                           const ossim_float64& maxLon,
+                           std::vector<std::string>& cells,
+                           ossim_uint32 maxNumberOfCells=0 );
+
+   virtual ossim_uint64 createId(const ossimGpt& /* pt */)const
+   {
+      return 0;
+   }
+   virtual ossimRefPtr<ossimElevCellHandler> getOrCreateCellHandler(const ossimGpt& gpt);
+
+   virtual std::ostream& print(std::ostream& out) const;
+
+protected:
+   virtual ossimRefPtr<ossimElevCellHandler> createCell(const ossimGpt& /* gpt */)
+   {
+      return 0;
+   }
+   virtual void remove(ossim_uint64 id)
+   {
+      CellMap::iterator iter = m_cacheMap.find(id);
+      if(iter != m_cacheMap.end())
+      {
+         m_cacheMap.erase(iter);
+      }
+   }
+   void flushCacheToMinOpenCells()
+   {
+      // lets flush the cache from least recently used to recent.
+      //
+      CellMap sortedMap;
+      CellMap::iterator iter = m_cacheMap.begin();
+      
+      while(iter != m_cacheMap.end())
+      {
+         sortedMap.insert(std::make_pair(iter->second->m_timestamp, iter->second));
+         ++iter;
+      }
+      
+      iter = sortedMap.begin();
+      while((iter!=sortedMap.end())&&(m_cacheMap.size() > m_minOpenCells))
+      {
+         remove(iter->second->id());
+         ++iter;
+      }
+   }
+   
+   ossim_uint32               m_minOpenCells;
+   ossim_uint32               m_maxOpenCells;
+   mutable OpenThreads::Mutex m_cacheMapMutex;
+   CellMap                    m_cacheMap;
+   ossim_uint32               m_memoryMapCellsFlag;
+   
+   TYPE_DATA;
+};
+
+#endif /* #ifndef ossimElevationCellDatabase_HEADER */
diff --git a/ossim/include/ossim/elevation/ossimElevationDatabase.h b/ossim/include/ossim/elevation/ossimElevationDatabase.h
new file mode 100644
index 0000000..0464d8e
--- /dev/null
+++ b/ossim/include/ossim/elevation/ossimElevationDatabase.h
@@ -0,0 +1,90 @@
+#ifndef ossimElevationDatabase_HEADER
+#define ossimElevationDatabase_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimGeoid.h>
+#include <ossim/base/ossimGeoidManager.h>
+#include <ossim/elevation/ossimElevSource.h>
+#include <ossim/elevation/ossimElevCellHandler.h>
+#include <ossim/base/ossimTimer.h>
+#include <vector>
+#include <map>
+
+class OSSIM_DLL ossimElevationDatabase : public ossimElevSource
+{
+public:
+   
+   ossimElevationDatabase()
+   :  ossimElevSource(),
+      m_meanSpacing(0.0)
+   {
+   }
+
+   ossimElevationDatabase(const ossimElevationDatabase& src)
+   :  ossimElevSource(src),
+      m_connectionString(src.m_connectionString),
+      m_geoid(src.m_geoid),
+      m_meanSpacing(src.m_meanSpacing)
+   {
+   }
+
+   virtual bool getAccuracyInfo(ossimElevationAccuracyInfo& /*info*/, const ossimGpt& /*gpt*/) const
+   {
+      return false;
+   }
+  virtual double getMeanSpacingMeters() const
+   {
+      return m_meanSpacing;
+   }
+   virtual void setGeoid(ossimGeoid* geoid)
+   {
+      m_geoid = geoid;
+   }
+   ossimGeoid* getGeoid()
+   {
+      return m_geoid.get();
+   }
+   const ossimGeoid* getGeoid()const
+   {
+      return m_geoid.get();
+   }
+   
+   /**
+    * Open a connection to a database.  In most cases this will be a pointer
+    * to a directory like in a Dted directory reader.  
+    *
+    */
+   virtual bool open(const ossimString& connectionString)=0;
+
+   const ossimString& getConnectionString()const
+   {
+      return m_connectionString;
+   }
+
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+   
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
+   
+   virtual std::ostream& print(std::ostream& out) const;
+
+protected:
+   virtual ~ossimElevationDatabase()
+   {
+      m_geoid = 0;
+   }
+   virtual double getOffsetFromEllipsoid(const ossimGpt& gpt);
+
+   ossimString m_connectionString;
+   ossimRefPtr<ossimGeoid>    m_geoid;
+   ossim_float64              m_meanSpacing;
+   
+TYPE_DATA
+   
+}; // End: class ossimElevationDatabase
+
+#endif /* #ifndef ossimElevationDatabase_HEADER */
diff --git a/include/ossim/elevation/ossimElevationDatabaseFactory.h b/ossim/include/ossim/elevation/ossimElevationDatabaseFactory.h
similarity index 100%
rename from include/ossim/elevation/ossimElevationDatabaseFactory.h
rename to ossim/include/ossim/elevation/ossimElevationDatabaseFactory.h
diff --git a/ossim/include/ossim/elevation/ossimElevationDatabaseFactoryBase.h b/ossim/include/ossim/elevation/ossimElevationDatabaseFactoryBase.h
new file mode 100644
index 0000000..6a779c2
--- /dev/null
+++ b/ossim/include/ossim/elevation/ossimElevationDatabaseFactoryBase.h
@@ -0,0 +1,33 @@
+#ifndef ossimElevationDatabaseFactoryBase_HEADER
+#define ossimElevationDatabaseFactoryBase_HEADER 1
+#include <ossim/base/ossimObjectFactory.h>
+#include <ossim/base/ossimObject.h>
+#include <ossim/elevation/ossimElevationDatabase.h>
+
+class OSSIM_DLL ossimElevationDatabaseFactoryBase : public ossimObjectFactory
+{
+public:
+   /**
+    * Creates an object given a type name.
+    */
+   virtual ossimObject* createObject(const ossimString& typeName)const
+   {
+      return createDatabase(typeName);
+   }
+   
+   /**
+    * Creates and object given a keyword list.
+    */
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
+                                     const char* prefix=0)const
+   {
+      return createDatabase(kwl, prefix);
+   }
+   
+   virtual ossimElevationDatabase* createDatabase(const ossimString& typeName)const=0;
+   virtual ossimElevationDatabase* createDatabase(const ossimKeywordlist& kwl,
+                                                  const char* prefix=0)const=0;
+   virtual ossimElevationDatabase* open(const ossimString& connectionString)const=0;
+};
+
+#endif
diff --git a/include/ossim/elevation/ossimElevationDatabaseRegistry.h b/ossim/include/ossim/elevation/ossimElevationDatabaseRegistry.h
similarity index 100%
rename from include/ossim/elevation/ossimElevationDatabaseRegistry.h
rename to ossim/include/ossim/elevation/ossimElevationDatabaseRegistry.h
diff --git a/include/ossim/elevation/ossimGeneralRasterElevFactory.h b/ossim/include/ossim/elevation/ossimGeneralRasterElevFactory.h
similarity index 100%
rename from include/ossim/elevation/ossimGeneralRasterElevFactory.h
rename to ossim/include/ossim/elevation/ossimGeneralRasterElevFactory.h
diff --git a/ossim/include/ossim/elevation/ossimGeneralRasterElevHandler.h b/ossim/include/ossim/elevation/ossimGeneralRasterElevHandler.h
new file mode 100644
index 0000000..2424db2
--- /dev/null
+++ b/ossim/include/ossim/elevation/ossimGeneralRasterElevHandler.h
@@ -0,0 +1,170 @@
+//----------------------------------------------------------------------------
+//
+// License:  see top level LICENSE.txt
+// 
+// Author:  Garrett Potts
+//
+// Description:
+// 
+//
+//----------------------------------------------------------------------------
+// $Id: ossimGeneralRasterElevHandler.h 23117 2015-01-29 22:33:13Z okramer $
+#ifndef ossimGeneralRasterElevHandler_HEADER
+#define ossimGeneralRasterElevHandler_HEADER
+#include <list>
+#include <ossim/base/ossimIoStream.h>
+//#include <fstream>
+
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/elevation/ossimElevCellHandler.h>
+#include <ossim/imaging/ossimGeneralRasterInfo.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimImageViewTransform.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimGpt.h>
+#include <OpenThreads/Mutex>
+#include <OpenThreads/ScopedLock>
+class ossimProjection;
+/**
+ * @class ossimGeneralRasterElevHandler Elevation source for an srtm file.
+ */
+class  OSSIM_DLL ossimGeneralRasterElevHandler : public ossimElevCellHandler
+{
+public:
+   class GeneralRasterInfo
+      {
+      public:
+         GeneralRasterInfo()
+         :theWidth(0),
+         theHeight(0),
+         theNullHeightValue(ossim::nan()),
+         theScalarType(OSSIM_SCALAR_UNKNOWN),
+         theBytesPerRawLine(0),
+         theDatum(0),
+         theGeometry(0)
+         {
+         }
+         GeneralRasterInfo(const  ossimGeneralRasterElevHandler::GeneralRasterInfo& src)
+         :theFilename(src.theFilename),
+         theImageRect(src.theImageRect),
+         theUl(src.theUl),
+         theLr(src.theLr),
+         theWidth(src.theWidth),
+         theHeight(src.theHeight),
+         theWgs84GroundRect(src.theWgs84GroundRect),
+         theNullHeightValue(src.theNullHeightValue),
+         theByteOrder(src.theByteOrder),
+         theScalarType(src.theScalarType),
+         theBytesPerRawLine(src.theBytesPerRawLine),
+         theDatum(src.theDatum),
+         theGeometry(src.theGeometry)
+         {
+         }
+         ossimFilename     theFilename;
+         ossimIrect        theImageRect;
+         ossimIpt          theUl;
+         ossimIpt          theLr;
+         ossim_uint32      theWidth;
+         ossim_uint32      theHeight;
+         ossimDrect        theWgs84GroundRect;
+         ossim_float64     theNullHeightValue;
+         ossimByteOrder    theByteOrder;
+         ossimScalarType   theScalarType;
+         ossim_uint32      theBytesPerRawLine;
+         const ossimDatum* theDatum;
+         ossimRefPtr<ossimImageGeometry> theGeometry;  //add by simbla
+      };
+   ossimGeneralRasterElevHandler(const ossimFilename& file="");
+   ossimGeneralRasterElevHandler(const ossimGeneralRasterElevHandler::GeneralRasterInfo& generalRasterInfo);
+   ossimGeneralRasterElevHandler(const ossimGeneralRasterElevHandler& rhs);
+
+   /** destructor */
+   virtual ~ossimGeneralRasterElevHandler();
+
+   virtual ossimObject* dup() const { return new ossimGeneralRasterElevHandler(this->theFilename); }
+
+
+   /**
+    * METHOD: getHeightAboveMSL
+    * Height access methods.
+    */
+   virtual double getHeightAboveMSL(const ossimGpt&);
+
+   /**
+    *  METHOD:  getSizeOfElevCell
+    *  Returns the number of post in the cell.  Satisfies pure virtual.
+    *  Note:  x = longitude, y = latitude
+    */
+   virtual ossimIpt getSizeOfElevCell() const;
+      
+   /**
+    *  METHOD:  getPostValue
+    *  Returns the value at a given grid point as a double.
+    *  Satisfies pure virtual.
+    */
+   virtual double getPostValue(const ossimIpt& gridPt) const;
+
+   virtual bool isOpen()const;
+
+   /**
+    * Opens a stream to the srtm cell.
+    *
+    * @return Returns true on success, false on error.
+    */
+   bool open(const ossimFilename& file, bool memoryMapFlag=false);
+
+   /**
+    * Closes the stream to the file.
+    */
+   virtual void close();
+
+   /**
+    * This method does not really fit the handler since this handle a
+    * directory not a cell that could have holes in it.  So users looking for
+    * valid coverage should call "pointHasCoverage".
+    */
+   ossimDrect getBoundingRect()const;
+
+   /**
+    * Loops through ossimGeneralRasterElevHandler::BoundingRectListType and
+    * checks for coverage.
+    *
+    * @param gpt Point to look for.
+    *
+    * @return true if coverage is found false if not.
+    */
+   virtual bool pointHasCoverage(const ossimGpt& gpt) const;
+
+   const ossimGeneralRasterElevHandler::GeneralRasterInfo& generalRasterInfo()const;
+   
+private:
+   template <class T>
+   double getHeightAboveMSLFileTemplate(T dummy,
+                                    const ossimGeneralRasterElevHandler::GeneralRasterInfo& info,
+                                    const ossimGpt& gpt);
+   template <class T>
+   double getHeightAboveMSLMemoryTemplate(T dummy,
+                                    const ossimGeneralRasterElevHandler::GeneralRasterInfo& info,
+                                    const ossimGpt& gpt);
+   
+   virtual bool setFilename(const ossimFilename& file);
+   
+   ossimGeneralRasterElevHandler::GeneralRasterInfo theGeneralRasterInfo;
+   mutable OpenThreads::Mutex m_inputStreamMutex;
+   std::ifstream m_inputStream;
+
+   /** @brief true if stream is open. */
+   bool          m_streamOpen;
+   
+   std::vector<char> m_memoryMap;
+TYPE_DATA
+};
+
+#endif /* End of "#ifndef ossimGeneralRasterElevHandler_HEADER" */
diff --git a/ossim/include/ossim/elevation/ossimGeneralRasterElevationDatabase.h b/ossim/include/ossim/elevation/ossimGeneralRasterElevationDatabase.h
new file mode 100644
index 0000000..d448394
--- /dev/null
+++ b/ossim/include/ossim/elevation/ossimGeneralRasterElevationDatabase.h
@@ -0,0 +1,86 @@
+#ifndef ossimGeneralRasterElevationDatabase_HEADER
+#define ossimGeneralRasterElevationDatabase_HEADER 1
+
+#include <ossim/elevation/ossimElevationCellDatabase.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/elevation/ossimGeneralRasterElevHandler.h>
+#include <OpenThreads/Mutex>
+
+class OSSIM_DLL ossimGeneralRasterElevationDatabase : public ossimElevationCellDatabase
+{
+public:
+   ossimGeneralRasterElevationDatabase()
+   :ossimElevationCellDatabase()
+   {
+   }
+   ossimGeneralRasterElevationDatabase(const ossimGeneralRasterElevationDatabase& rhs)
+   :ossimElevationCellDatabase(rhs)
+   {
+   }
+   virtual ~ossimGeneralRasterElevationDatabase()
+   {
+      if(m_cellHandler.valid())
+      {
+         m_cellHandler->close();
+      }
+      m_cellHandler = 0;
+   }
+
+   virtual ossimObject* dup() const
+   {
+      ossimGeneralRasterElevationDatabase* duped = new ossimGeneralRasterElevationDatabase;
+      duped->open(m_connectionString);
+      return duped;
+   }
+
+   virtual bool open(const ossimString& connectionString);
+   virtual bool pointHasCoverage(const ossimGpt& gpt) const;
+
+   virtual bool getAccuracyInfo(ossimElevationAccuracyInfo& /*info*/, const ossimGpt& /*gpt*/) const
+   {
+      return false;
+   }
+
+   /**
+    * METHODS: accuracyLE90(), accuracyCE90()
+    * Returns the vertical and horizontal accuracy (90% confidence) in the
+    * region of gpt:
+    */
+//   virtual double getAccuracyLE90(const ossimGpt& /* gpt */) const
+//   {
+//      std::cout << "ossimGeneralElevationDatabase::getAccuracyLE90 \n";
+//      return 0.0;
+//   }
+//   virtual double getAccuracyCE90(const ossimGpt& /* gpt */) const
+ //  {
+ //     std::cout << "ossimGeneralElevationDatabase::getAccuracyCE90 \n";
+ //     return 0.0;
+ //  }
+   virtual double getHeightAboveMSL(const ossimGpt&);
+   virtual double getHeightAboveEllipsoid(const ossimGpt& gpt);
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix = 0);
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix = 0)const;
+   virtual ossim_uint64 createId(const ossimGpt& /* pt */)const
+   {
+     return 0;
+   }
+   
+   virtual std::ostream& print(std::ostream& out) const;
+
+protected:
+   ossimRefPtr<ossimGeneralRasterElevHandler> m_cellHandler;
+   bool openGeneralRasterDirectory(const ossimFilename& dir);
+   void createRelativePath(ossimFilename& file, const ossimGpt& gpt)const;
+   void createFullPath(ossimFilename& file, const ossimGpt& gpt)const
+   {
+      ossimFilename relativeFile;
+      createRelativePath(relativeFile, gpt);
+      file = ossimFilename(m_connectionString).dirCat(relativeFile);
+   }
+   ossimRefPtr<ossimElevCellHandler> createHandler(const ossimGpt& /* gpt */);
+   virtual ossimRefPtr<ossimElevCellHandler> createCell(const ossimGpt& /* gpt */);
+   
+   
+   TYPE_DATA
+};
+#endif
diff --git a/include/ossim/elevation/ossimHgtRef.h b/ossim/include/ossim/elevation/ossimHgtRef.h
similarity index 100%
rename from include/ossim/elevation/ossimHgtRef.h
rename to ossim/include/ossim/elevation/ossimHgtRef.h
diff --git a/ossim/include/ossim/elevation/ossimImageElevationDatabase.h b/ossim/include/ossim/elevation/ossimImageElevationDatabase.h
new file mode 100644
index 0000000..500b9d1
--- /dev/null
+++ b/ossim/include/ossim/elevation/ossimImageElevationDatabase.h
@@ -0,0 +1,219 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimImageElevationDatabase.h
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: See description for class below.
+//
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimImageElevationDatabase_HEADER
+#define ossimImageElevationDatabase_HEADER 1
+
+#include <ossim/elevation/ossimElevationCellDatabase.h>
+#include <ossim/base/ossimFileProcessorInterface.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimGrect.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimRtti.h>
+#include <map>
+
+class ossimString;
+
+/**
+ * @class ossimTiledElevationDatabase
+ *
+ * Elevation source used for working with generic images opened by an
+ * ossimImageHandler. This class is typically utilized through the
+ * ossimElevManager.
+ */
+class OSSIM_DLL ossimImageElevationDatabase :
+   public ossimElevationCellDatabase, public ossimFileProcessorInterface
+{
+public:
+
+   /** default constructor */
+   ossimImageElevationDatabase();
+
+   /**
+    * @brief Open a connection to a database.
+    *
+    * @param connectionString File or directory to open.  In most cases this
+    * will point to a directory containing DEMs. Satisfies pure virtual
+    * ossimElevationDatabase::open().
+    *
+    * @return true on success, false on error.
+    */   
+   virtual bool open(const ossimString& connectionString);
+
+   /** @brief close method. Unreferences all data. */
+   virtual void close();
+
+   virtual ossimObject* dup() const
+   {
+      ossimImageElevationDatabase* duped = new ossimImageElevationDatabase;
+      duped->open(m_connectionString);
+      return duped;
+   }
+
+   /**
+    * @brief Maps elevation data for region to a grid.
+    *
+    * This uses connectionString passed to open method as starting point.
+    */
+   void mapRegion(const ossimGrect& region);
+
+   /**
+    * @brief Get height above MSL for point.
+    *
+    * Satisfies pure virtual ossimElevSource::getHeightAboveMSL().
+    * 
+    * @return Height above MSL.
+    */
+   virtual double getHeightAboveMSL(const ossimGpt& gpt);
+
+   /**
+    * @brief Get height above ellipsoid for point.
+    *
+    * Satisfies pure virtual ossimElevSource::getHeightAboveMSL().
+    * 
+    * @return Height above MSL.
+    */
+   virtual double getHeightAboveEllipsoid(const ossimGpt&);
+   
+   /**
+    * Satisfies pure virtual ossimElevSource::pointHasCoverage
+    * 
+    * @return true if database has coverage for point.
+    */
+   virtual bool pointHasCoverage(const ossimGpt& gpt) const;
+
+
+   virtual bool getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const;
+
+
+   /**
+    * Statisfies pure virtual ossimElevSource::getAccuracyLE90.
+    * @return The vertical accuracy (90% confidence) in the
+    * region of gpt:
+    */
+   //virtual double getAccuracyLE90(const ossimGpt& gpt) const;
+   
+   /**
+    * Statisfies pure virtual ossimElevSource::getAccuracyCE90.
+    * @return The horizontal accuracy (90% confidence) in the
+    * region of gpt.
+    */
+   //virtual double getAccuracyCE90(const ossimGpt& gpt) const;
+
+   /** @brief Initialize from keyword list. */
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+
+   /** @brief Save the state to a keyword list. */
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
+
+   /**
+    * @brief Gets the bounding rectangle/coverage of elevation.
+    *
+    * @param rect Rectangle to initialize.
+    */
+   void getBoundingRect(ossimGrect& rect) const;
+
+   /**
+    * @brief ProcessFile method.
+    *
+    * Satisfies pure virtual ossimFileProcessorInterface::processFile.
+    *
+    * This method is linked to the ossimFileWalker::walk method via a pointer
+    * to this class.
+    * 
+    * @param file to process.
+    */
+   virtual void processFile(const ossimFilename& file);
+   
+   virtual std::ostream& print(std::ostream& out) const;
+
+protected:
+   /**
+    * @Brief Protected destructor.
+    *
+    * This class is derived from ossimReferenced so users should always use
+    * ossimRefPtr<ossimImageElevationDatabase> to hold instance.
+    */
+   virtual ~ossimImageElevationDatabase();
+
+   virtual ossimRefPtr<ossimElevCellHandler> createCell(const ossimGpt& gpt);
+
+   // virtual ossim_uint64 createId(const ossimGpt& pt) const;
+
+   /**
+    * @brief Gets cell for point.
+    *
+    * This override ossimElevationCellDatabase::getOrCreateCellHandler as we cannot use
+    * the createId as our cells could be of any size.
+    */
+   virtual ossimRefPtr<ossimElevCellHandler> getOrCreateCellHandler(const ossimGpt& gpt);
+
+   /**
+    * @brief Removes an entry from the m_cacheMap and m_entryMap maps.
+    */
+   virtual void remove(ossim_uint64 id);
+
+private:
+
+   // Private container to hold bounding rect and image handler.
+   struct ossimImageElevationFileEntry
+   {
+      /** @brief default constructor */
+      ossimImageElevationFileEntry();
+
+      /** @brief Constructor that takes a file name. */
+      ossimImageElevationFileEntry(const ossimFilename& file);
+
+      ossimImageElevationFileEntry(const ossimImageElevationFileEntry& copy_this);
+
+      /** file name */
+      ossimFilename m_file;
+
+      /** Bounding rectangle in decimal degrees. */
+      ossimGrect m_rect;
+
+      /** True if in ossimElevationCellDatabase::m_cacheMap. */
+      bool m_loadedFlag;
+   };  
+
+   /**
+    * @brief Initializes m_entryMap with all loadable files from
+    * m_connectionString.
+    */
+   void loadFileMap();
+
+   /** Hidden from use copy constructor */
+   ossimImageElevationDatabase(const ossimImageElevationDatabase& copy_this);
+   
+   std::map<ossim_uint64, ossimImageElevationFileEntry> m_entryMap;
+   ossim_uint64       m_lastMapKey;
+   ossim_uint64       m_lastAccessedId;
+
+   TYPE_DATA 
+};
+
+inline void ossimImageElevationDatabase::remove(ossim_uint64 id)
+{
+   std::map<ossim_uint64, ossimImageElevationFileEntry>::iterator entryIter = m_entryMap.find(id);
+   if ( entryIter != m_entryMap.end() )
+   {
+      (*entryIter).second.m_loadedFlag = false;
+   }
+   ossimElevationCellDatabase::remove(id);
+}
+
+#endif /* ossimImageElevationDatabase_HEADER */
+
diff --git a/ossim/include/ossim/elevation/ossimImageElevationHandler.h b/ossim/include/ossim/elevation/ossimImageElevationHandler.h
new file mode 100644
index 0000000..2bf6464
--- /dev/null
+++ b/ossim/include/ossim/elevation/ossimImageElevationHandler.h
@@ -0,0 +1,135 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimImageElevationHandler.h
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: See description for class below.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimImageElevationHandler_HEADER
+#define ossimImageElevationHandler_HEADER 1
+
+#include <ossim/elevation/ossimElevCellHandler.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <OpenThreads/Mutex>
+
+/**
+ * @class ossimImageElevationHandler
+ *
+ * Elevation source for a generic image opened via ossimImageHandler.
+ */
+class OSSIM_DLL ossimImageElevationHandler : public ossimElevCellHandler
+{
+public:
+
+   /** default constructor */
+   ossimImageElevationHandler();
+   ossimImageElevationHandler(const ossimFilename& file);
+
+   /**
+    * METHOD: getHeightAboveMSL
+    * Height access methods.
+    */
+   virtual double getHeightAboveMSL(const ossimGpt&);
+
+   /**
+    *  METHOD:  getSizeOfElevCell
+    *  Returns the number of post in the cell.  Satisfies pure virtual.
+    *  Note:  x = longitude, y = latitude
+    */
+   virtual ossimIpt getSizeOfElevCell() const;
+      
+   /**
+    *  METHOD:  getPostValue
+    *  Returns the value at a given grid point as a double.
+    *  Satisfies pure virtual.
+    */
+   virtual double getPostValue(const ossimIpt& gridPt) const;
+
+   /** @return True if open, false if not. */
+   virtual bool isOpen()const;
+   
+   /**
+    * Opens a stream to the srtm cell.
+    *
+    * @return Returns true on success, false on error.
+    */
+   virtual bool open(const ossimFilename& file);
+
+   /** @brief Closes the stream to the file. */
+   virtual void close();
+
+   /**
+    * @brief pointHasCoverage(gpt)
+    *
+    * Overrides ossimElevCellHandler::pointHasCoverage
+    * @return TRUE if coverage exists over gpt.
+    */
+   virtual bool pointHasCoverage(const ossimGpt&) const;
+
+   virtual ossimObject* dup () const { return new ossimImageElevationHandler(this->getFilename()); }
+
+protected:
+   /**
+    * @Brief Protected destructor.
+    *
+    * This class is derived from ossimReferenced so users should always use
+    * ossimRefPtr<ossimImageElevationHandler> to hold instance.
+    */
+   virtual ~ossimImageElevationHandler();
+   
+private:
+
+   /** Hidden from use copy constructor */
+   ossimImageElevationHandler(const ossimImageElevationHandler&);
+   
+   /** Hidden from use assignment operator */
+   const ossimImageElevationHandler& operator= (const ossimImageElevationHandler& rhs);
+
+
+   /** Pointers to links in chain. */
+   ossimRefPtr<ossimImageHandler>      m_ih;
+   ossimRefPtr<ossimImageGeometry>     m_geom;
+
+   /** Image space rect stored as drect for inlined pointHasCoverage method. */
+   ossimDrect                          m_rect;
+   
+   mutable OpenThreads::Mutex          m_mutex; 
+
+   TYPE_DATA
+};
+
+inline bool ossimImageElevationHandler::isOpen() const
+{
+   return m_ih.valid();
+}
+
+inline void ossimImageElevationHandler::close()
+{
+   m_geom  = 0;
+   m_ih    = 0;
+}
+
+inline bool ossimImageElevationHandler::pointHasCoverage(const ossimGpt& gpt) const
+{
+   if ( m_geom.valid() )
+   {
+      ossimDpt dpt;
+      m_geom->worldToLocal(gpt, dpt);
+      return m_rect.pointWithin(dpt);
+   }
+   return false;
+}
+
+#endif /* ossimImageElevationHandler_HEADER */
+
diff --git a/ossim/include/ossim/elevation/ossimSrtmElevationDatabase.h b/ossim/include/ossim/elevation/ossimSrtmElevationDatabase.h
new file mode 100644
index 0000000..55819bb
--- /dev/null
+++ b/ossim/include/ossim/elevation/ossimSrtmElevationDatabase.h
@@ -0,0 +1,84 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimSrtmElevationDatabase_HEADER
+#define ossimSrtmElevationDatabase_HEADER 1
+
+#include <ossim/elevation/ossimElevationCellDatabase.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/elevation/ossimSrtmHandler.h>
+#include <OpenThreads/Mutex>
+
+class OSSIM_DLL ossimSrtmElevationDatabase : public ossimElevationCellDatabase
+{
+public:
+   typedef std::vector<ossimRefPtr<CellInfo> > DirectMap; // 360x180 cell grid
+   ossimSrtmElevationDatabase()
+   :ossimElevationCellDatabase()
+   {
+   }
+   ossimSrtmElevationDatabase(const ossimSrtmElevationDatabase& rhs)
+   :ossimElevationCellDatabase(rhs)
+   {
+   }
+   virtual ~ossimSrtmElevationDatabase()
+   {
+   }
+
+   virtual ossimObject* dup() const
+   {
+      ossimSrtmElevationDatabase* duped = new ossimSrtmElevationDatabase;
+      duped->open(m_connectionString);
+      return duped;
+   }
+
+   virtual bool open(const ossimString& connectionString);
+   bool getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& /*gpt*/) const;
+   virtual bool pointHasCoverage(const ossimGpt& gpt) const
+   {
+      ossimFilename filename;
+      createFullPath(filename, gpt);
+      
+      return filename.exists();
+   }
+   virtual double getHeightAboveMSL(const ossimGpt&);
+   virtual double getHeightAboveEllipsoid(const ossimGpt& gpt);
+   virtual ossim_uint64 createId(const ossimGpt& pt)const
+   {
+      ossim_uint64 y = static_cast<ossim_uint64>(ossim::wrap(pt.latd(), -90.0, 90.0)+90.0);
+      ossim_uint64 x = static_cast<ossim_uint64>(ossim::wrap(pt.lond(),-180.0,180.0)+180.0);
+      // map the extreme edge to the same ID ax the 179 west cell and the same for the 89
+      // degree north cell.
+      //
+      x = x==360?359:x;
+      y = y==180?179:y;
+      // Srtm databases are 1x1 degree cells and we will use a world 
+      // grid for id generation.
+      //
+      return (y*360+x);
+   }
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix = 0);
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix = 0)const;
+   
+protected:
+   bool openSrtmDirectory(const ossimFilename& dir);
+   void createRelativePath(ossimFilename& file, const ossimGpt& gpt)const;
+   void createFullPath(ossimFilename& file, const ossimGpt& gpt)const
+   {
+      ossimFilename relativeFile;
+      createRelativePath(relativeFile, gpt);
+      file = ossimFilename(m_connectionString).dirCat(relativeFile);
+   }
+
+   ossimRefPtr<ossimElevCellHandler> createCell(const ossimGpt& gpt);
+
+   TYPE_DATA
+};
+#endif
+
diff --git a/ossim/include/ossim/elevation/ossimSrtmFactory.h b/ossim/include/ossim/elevation/ossimSrtmFactory.h
new file mode 100644
index 0000000..ab968fb
--- /dev/null
+++ b/ossim/include/ossim/elevation/ossimSrtmFactory.h
@@ -0,0 +1,58 @@
+//----------------------------------------------------------------------------
+// Copyright (c) 2005, David Burken, all rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+// 
+// Shuttle Radar Topography Mission (SRTM) factory to return an
+// ossimSrtmElevSource given a ground point.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimSrtmFactory.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimSrtmFactory_HEADER
+#define ossimSrtmFactory_HEADER
+
+#include <ossim/elevation/ossimElevSourceFactory.h>
+
+/**
+ * @class ossimSrtmFactory Used by the elevation manager, this class returns
+ * an ossimSrtmElevSource given a ground point and some directory with srtm
+ * files in it.
+ */
+class OSSIM_DLL ossimSrtmFactory : public ossimElevSourceFactory
+{
+public:
+
+   /** default constructor */
+   ossimSrtmFactory();
+
+   /** Constructor that takes a directory name. */
+   ossimSrtmFactory(const ossimFilename& dir);
+
+   /** destructor */
+   virtual ~ossimSrtmFactory();
+
+   /**
+    * Open the appropriate ossimSrtmElevSource that covers given a
+    * ground point.
+    *
+    * @param gpt Ground point that an elevation source is need for.
+    *
+    * @return Returns a pointer to an ossimElevSource if an srtm file is found
+    * that can cover the ground point.  Returns NULL if no cell is found
+    * for the point.
+    */
+   virtual ossimElevSource* getNewElevSource(const ossimGpt& gpt) const;
+   
+protected:
+
+TYPE_DATA
+};
+
+#endif /* End of "#ifndef ossimSrtmFactory_HEADER" */
+
diff --git a/ossim/include/ossim/elevation/ossimSrtmHandler.h b/ossim/include/ossim/elevation/ossimSrtmHandler.h
new file mode 100644
index 0000000..7cc4c9c
--- /dev/null
+++ b/ossim/include/ossim/elevation/ossimSrtmHandler.h
@@ -0,0 +1,111 @@
+//----------------------------------------------------------------------------
+//
+// License:  See tope level LICENSE.txt file.
+//
+// Author:  David Burken
+//
+// Description:
+// 
+// Shuttle Radar Topography Mission (SRTM) elevation source.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimSrtmHandler.h 23117 2015-01-29 22:33:13Z okramer $
+#ifndef ossimSrtmHandler_HEADER
+#define ossimSrtmHandler_HEADER
+
+#include <ossim/base/ossimIoStream.h>
+//#include <fstream>
+
+#include <ossim/base/ossimString.h>
+#include <ossim/elevation/ossimElevCellHandler.h>
+#include <ossim/support_data/ossimSrtmSupportData.h>
+
+class ossimEndian;
+
+/**
+ * @class ossimSrtmHandler Elevation source for an srtm file.
+ */
+class OSSIMDLLEXPORT ossimSrtmHandler : public ossimElevCellHandler
+{
+public:
+
+   /** Constructor that takes a file name. */
+   ossimSrtmHandler();
+   ossimSrtmHandler(const ossimSrtmHandler&);
+
+
+   enum
+   {
+      NULL_POST = -32768 // Fixed by SRTM specification.
+   };
+
+   /**
+    * METHOD: getHeightAboveMSL
+    * Height access methods.
+    */
+   virtual double getHeightAboveMSL(const ossimGpt&);
+
+   /**
+    *  METHOD:  getSizeOfElevCell
+    *  Returns the number of post in the cell.  Satisfies pure virtual.
+    *  Note:  x = longitude, y = latitude
+    */
+   virtual ossimIpt getSizeOfElevCell() const;
+      
+   /**
+    *  METHOD:  getPostValue
+    *  Returns the value at a given grid point as a double.
+    *  Satisfies pure virtual.
+    */
+   virtual double getPostValue(const ossimIpt& gridPt) const;
+
+   virtual bool isOpen()const;
+   
+   /**
+    * Opens a stream to the srtm cell.
+    *
+    * @return Returns true on success, false on error.
+    */
+   virtual bool open(const ossimFilename& file, bool memoryMapFlag=false);
+
+   /**
+    * Closes the stream to the file.
+    */
+   virtual void close();
+   
+   virtual ossimObject* dup() const
+   {
+      ossimSrtmHandler* obj = new ossimSrtmHandler();
+      obj->open(theFilename, (m_memoryMap.size() != 0));
+      return obj;
+   }
+
+protected:
+   /** destructor */
+   virtual ~ossimSrtmHandler();
+   ossimSrtmSupportData m_supportData;
+   mutable OpenThreads::Mutex m_fileStrMutex;
+   std::ifstream m_fileStr;
+
+   /** @brief true if stream is open. */
+   bool          m_streamOpen;
+   
+   ossim_int32      m_numberOfLines;
+   ossim_int32      m_numberOfSamples;
+   ossim_int32      m_srtmRecordSizeInBytes;
+   double           m_latSpacing;   // degrees
+   double           m_lonSpacing;   // degrees
+   ossimDpt         m_nwCornerPost; // cell origin;
+   ossimEndian*     m_swapper;
+   ossimScalarType  m_scalarType;
+   
+   mutable std::vector<ossim_int8> m_memoryMap;
+   
+   template <class T>
+   double getHeightAboveMSLFileTemplate(T dummy, const ossimGpt& gpt);
+   template <class T>
+   double getHeightAboveMSLMemoryTemplate(T dummy, const ossimGpt& gpt);
+   TYPE_DATA
+};
+
+#endif /* End of "#ifndef ossimSrtmHandler_HEADER" */
diff --git a/ossim/include/ossim/elevation/ossimTiledElevationDatabase.h b/ossim/include/ossim/elevation/ossimTiledElevationDatabase.h
new file mode 100644
index 0000000..e0a38c7
--- /dev/null
+++ b/ossim/include/ossim/elevation/ossimTiledElevationDatabase.h
@@ -0,0 +1,223 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimTiledElevationDatabase.h
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: See description for class below.
+//
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimTiledElevationDatabase_HEADER
+#define ossimTiledElevationDatabase_HEADER 1
+
+#include <ossim/elevation/ossimElevationDatabase.h>
+#include <ossim/base/ossimFileProcessorInterface.h>
+#include <ossim/base/ossimGrect.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimRtti.h>
+#include <vector>
+
+class ossimDblGrid;
+class ossimFilename;
+class ossimFileWalker;
+class ossimImageData;
+class ossimImageGeometry;
+class ossimImageHandler;
+class ossimProjection;
+class ossimSingleImageChain;
+class ossimString;
+
+/**
+ * @class ossimTiledElevationDatabase
+ *
+ * Elevation source used for working with generic images opened by an
+ * ossimImageHandler.  This class supplies a mapRegion method used to map a
+ * region of elevation to a grid.  The grid in turn is used for the
+ * getHeightAboveMSL.  This class is for applications that know their region
+ * of interest up front and want to bypass the ossimElevManager and grid the
+ * elevation prior to processing for speed.  Can work on a file or a
+ * directory of files.
+ */
+class OSSIM_DLL ossimTiledElevationDatabase :
+   public ossimElevationDatabase, public ossimFileProcessorInterface
+{
+public:
+
+   /** default constructor */
+   ossimTiledElevationDatabase();
+
+   /**
+    * @brief Open a connection to a database.
+    *
+    * @param connectionString File or directory to open.  In most cases this
+    * will point to a directory containing DEMs. Satisfies pure virtual
+    * ossimElevationDatabase::open().
+    *
+    * @return true on success, false on error.
+    */   
+   virtual bool open(const ossimString& connectionString);
+
+   /** @brief close method. Unreferences all data. */
+   virtual void close();
+
+   /**
+    * @brief Maps elevation data for region to a grid.
+    *
+    * This uses connectionString passed to open method as starting point.
+    */
+   void mapRegion(const ossimGrect& region);
+
+   /**
+    * @brief Get height above MSL for point.
+    *
+    * Satisfies pure virtual ossimElevSource::getHeightAboveMSL().
+    * 
+    * @return Height above MSL.
+    */
+   virtual double getHeightAboveMSL(const ossimGpt& gpt);
+
+   /**
+    * @brief Get height above ellipsoid for point.
+    *
+    * Satisfies pure virtual ossimElevSource::getHeightAboveMSL().
+    * 
+    * @return Height above MSL.
+    */
+   virtual double getHeightAboveEllipsoid(const ossimGpt&);
+   
+   /**
+    * Satisfies pure virtual ossimElevSource::pointHasCoverage
+    * 
+    * @return true if database has coverage for point.
+    */
+   virtual bool pointHasCoverage(const ossimGpt& gpt) const;
+
+
+   /** @brief Initialize from keyword list. */
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+
+   /** @brief Save the state to a keyword list. */
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
+   
+   bool getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& /*gpt*/) const
+   {
+      info.makeNan();
+      
+      return false;
+   }
+   
+   /**
+    * @brief ProcessFile method.
+    *
+    * Satisfies pure virtual ossimFileProcessorInterface::processFile.
+    *
+    * This method is linked to the ossimFileWalker::walk method via a callback
+    * mechanism.  It is called by the ossimFileWalk (caller).  This class
+    * (callee) sets recurse and return flags accordingly to control
+    * the ossimFileWalker, e.g. don't recurse, stop altogether.
+    * 
+    * @param file to process.
+    */
+   virtual void processFile(const ossimFilename& file);
+   
+   virtual std::ostream& print(std::ostream& out) const;
+
+   virtual ossimObject* dup() const
+   {
+      ossimTiledElevationDatabase* duped = new ossimTiledElevationDatabase;
+      duped->open(m_connectionString);
+      return duped;
+   }
+
+protected:
+   /** Protected destructor as this is derived from ossimRefenced. */
+   virtual ~ossimTiledElevationDatabase();
+
+private:
+
+   // Private container to hold bounding rect and image handler.
+   struct ossimTiledElevationEntry
+   {
+      /** @brief default constructor */
+      ossimTiledElevationEntry();
+
+      /** @brif Constructor that takes rectangle and chain. */
+      ossimTiledElevationEntry(const ossimGrect& rect,
+                               ossimRefPtr<ossimSingleImageChain> sic );
+
+      /** Bounding rectangle in decimal degrees. */
+      ossimGrect m_rect;
+
+      /** Hold pointer to single image chain. */
+      ossimRefPtr<ossimSingleImageChain> m_sic;
+   };
+
+   /**
+    * @brief adds entry to the list checking for duplicates.
+    */
+   void addEntry(const ossimTiledElevationEntry& entry);
+
+   /**
+    * @brief Initializes m_referenceProj from the first entry.
+    */
+   void initializeReferenceProjection();
+
+   /**
+    * @return true if file is a directory based image and the stager should go
+    * on to next directory; false if stager should continue with directory.
+    */
+   bool isDirectoryBasedImage(ossimRefPtr<ossimImageHandler> ih);
+
+   /**
+    * @brief Check for match of the following against the first entry of:
+    *  bands, projection, scalar type and scale.
+    * @returns true if good, false if not the same.
+    */
+   bool isCompatible(ossimImageHandler* ih,
+                     ossimImageGeometry* geom,
+                     ossimProjection* proj) const;
+
+   /**
+    * @brief Initialize bounding rectangle from image handler.
+    *
+    * Sets boundingRect to nan if ossimImageGeometry::getCornerGpts returns false.
+    * 
+    * @param ih Image handler.
+    * @param boundingRect Initialized by method.
+    */
+   void getBoundingRect(ossimRefPtr<ossimImageGeometry> geom, ossimGrect& boundingRect) const;
+
+   /** @brief Loads m_requestedRect into m_grid from m_entries. */
+   void mapRegion();
+
+   /** @brief Templated fill grid method. */
+   template <class T> void fillGrid(T dummyTemplate, ossimRefPtr<ossimImageData> data);
+
+   /** Hidden from use copy constructor */
+   ossimTiledElevationDatabase(const ossimTiledElevationDatabase& copy_this);
+
+   std::vector<ossimTiledElevationEntry> m_entries;
+
+   /** Hold region of elevation. */
+   ossimDblGrid* m_grid;
+
+   /** Projection of the first entry.  Stored for convenience. */
+   ossimRefPtr<ossimProjection> m_referenceProj;
+
+   ossimGrect m_requestedRect;
+   ossimGrect m_entryListRect;
+   ossimGrect m_mappedRect; // Requested expanded to even post boundary.
+
+   ossimFileWalker* m_fileWalker;
+
+   TYPE_DATA 
+};
+
+#endif /* ossimTiledElevationDatabase_HEADER */
+
diff --git a/include/ossim/font/ossimFont.h b/ossim/include/ossim/font/ossimFont.h
similarity index 100%
rename from include/ossim/font/ossimFont.h
rename to ossim/include/ossim/font/ossimFont.h
diff --git a/ossim/include/ossim/font/ossimFontFactoryBase.h b/ossim/include/ossim/font/ossimFontFactoryBase.h
new file mode 100644
index 0000000..b845990
--- /dev/null
+++ b/ossim/include/ossim/font/ossimFontFactoryBase.h
@@ -0,0 +1,42 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+//********************************************************************
+// $Id: ossimFontFactoryBase.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimFontFactoryBase_HEADER
+#define ossimFontFactoryBase_HEADER
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimFontInformation.h>
+class ossimFont;
+
+class ossimFontFactoryBase
+{
+public:
+
+   virtual ~ossimFontFactoryBase(){}
+   
+   /*!
+    * Will find the best font for the passed in infromation.
+    * If none is found a default font should be returned.
+    */
+   virtual ossimFont* createFont(const ossimFontInformation& information)const=0;
+
+   /*!
+    * Usually for trutype fonts but any font stored in a file it
+    * will try to create a font from it.
+    */
+   virtual ossimFont* createFont(const ossimFilename& file)const=0;
+
+   virtual void getFontInformation(std::vector<ossimFontInformation>& informationList)const=0;
+
+};
+
+#endif
+
diff --git a/include/ossim/font/ossimFontFactoryRegistry.h b/ossim/include/ossim/font/ossimFontFactoryRegistry.h
similarity index 100%
rename from include/ossim/font/ossimFontFactoryRegistry.h
rename to ossim/include/ossim/font/ossimFontFactoryRegistry.h
diff --git a/include/ossim/font/ossimFreeTypeFont.h b/ossim/include/ossim/font/ossimFreeTypeFont.h
similarity index 100%
rename from include/ossim/font/ossimFreeTypeFont.h
rename to ossim/include/ossim/font/ossimFreeTypeFont.h
diff --git a/include/ossim/font/ossimFreeTypeFontFactory.h b/ossim/include/ossim/font/ossimFreeTypeFontFactory.h
similarity index 100%
rename from include/ossim/font/ossimFreeTypeFontFactory.h
rename to ossim/include/ossim/font/ossimFreeTypeFontFactory.h
diff --git a/include/ossim/font/ossimGdBitmapFont.h b/ossim/include/ossim/font/ossimGdBitmapFont.h
similarity index 100%
rename from include/ossim/font/ossimGdBitmapFont.h
rename to ossim/include/ossim/font/ossimGdBitmapFont.h
diff --git a/include/ossim/font/ossimGdSansBold.inc b/ossim/include/ossim/font/ossimGdSansBold.inc
similarity index 100%
rename from include/ossim/font/ossimGdSansBold.inc
rename to ossim/include/ossim/font/ossimGdSansBold.inc
diff --git a/include/ossim/imaging/gdfontg.inc b/ossim/include/ossim/imaging/gdfontg.inc
similarity index 100%
rename from include/ossim/imaging/gdfontg.inc
rename to ossim/include/ossim/imaging/gdfontg.inc
diff --git a/include/ossim/imaging/gdfontl.inc b/ossim/include/ossim/imaging/gdfontl.inc
similarity index 100%
rename from include/ossim/imaging/gdfontl.inc
rename to ossim/include/ossim/imaging/gdfontl.inc
diff --git a/include/ossim/imaging/gdfontmb.inc b/ossim/include/ossim/imaging/gdfontmb.inc
similarity index 100%
rename from include/ossim/imaging/gdfontmb.inc
rename to ossim/include/ossim/imaging/gdfontmb.inc
diff --git a/include/ossim/imaging/gdfonts.inc b/ossim/include/ossim/imaging/gdfonts.inc
similarity index 100%
rename from include/ossim/imaging/gdfonts.inc
rename to ossim/include/ossim/imaging/gdfonts.inc
diff --git a/include/ossim/imaging/gdfontt.inc b/ossim/include/ossim/imaging/gdfontt.inc
similarity index 100%
rename from include/ossim/imaging/gdfontt.inc
rename to ossim/include/ossim/imaging/gdfontt.inc
diff --git a/ossim/include/ossim/imaging/ossim3x3ConvolutionFilter.h b/ossim/include/ossim/imaging/ossim3x3ConvolutionFilter.h
new file mode 100644
index 0000000..bcd15e5
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossim3x3ConvolutionFilter.h
@@ -0,0 +1,98 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossim3x3ConvolutionFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossim3x3ConvolutionFilter_HEADER
+#define ossim3x3ConvolutionFilter_HEADER
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+
+class ossim3x3ConvolutionFilter : public ossimImageSourceFilter
+{
+public:
+   ossim3x3ConvolutionFilter(ossimObject* owner=NULL);
+
+   virtual ossimString getShortName()const{return ossimString("3x3 Convolution");}
+   virtual ossimString getLongName()const{return ossimString("Convolves the input image with a 3x3 kernel");}
+
+   virtual void getKernel(double kernel[3][3]);
+   
+   virtual void setKernel(double kernel[3][3]);
+
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+
+   virtual void initialize();
+
+   virtual double getNullPixelValue(ossim_uint32 band=0) const;
+   virtual double getMinPixelValue(ossim_uint32 band=0)  const;
+   virtual double getMaxPixelValue(ossim_uint32 band=0)  const;
+
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix = 0);
+   
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix = 0)const;
+   
+protected:
+   virtual ~ossim3x3ConvolutionFilter();
+
+   /**
+    * Allocates theTile.
+    */
+   void allocate();
+
+   /**
+    * Clears data members theNullPixValue, theMinPixValue, and
+    * theMaxPixValue.
+    */
+   void clearNullMinMax();
+
+   /**
+    * Computes null, min, and max considering input connection and theKernel.
+    */
+   void computeNullMinMax();
+   
+   ossimRefPtr<ossimImageData> theTile;
+   double theKernel[3][3];
+
+   vector<double> theNullPixValue;
+   vector<double> theMinPixValue;
+   vector<double> theMaxPixValue;   
+   
+   /*!
+    * Convolve full means that the input data is full and has
+    * no null data.  We don't have to compare for nulls here
+    */
+   template<class T>
+   void convolveFull(T,
+                     ossimRefPtr<ossimImageData> inputData,
+                     ossimRefPtr<ossimImageData> outputData);
+   
+   /*!
+    * Convolve partial means that the input data is has some
+    * null data.  We will have to compare nulls
+    */
+   template<class T>
+   void convolvePartial(T,
+                        ossimRefPtr<ossimImageData> inputData,
+                        ossimRefPtr<ossimImageData> outputData);
+                       
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossim3x3ConvolutionFilter_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimAOD.h b/ossim/include/ossim/imaging/ossimAOD.h
new file mode 100644
index 0000000..ef25198
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimAOD.h
@@ -0,0 +1,67 @@
+//*******************************************************************
+// Copyright (C) 2002 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Kathy Minear
+//
+// Description:
+// 
+// Class to compute Aerosol Optical Depth (AOD) for with atmospheric
+// correction.
+//
+//*************************************************************************
+// $Id: ossimAOD.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimAOD_HEADER
+#define ossimAOD_HEADER
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+class ossimAOD : public ossimImageSourceFilter
+{
+public:
+
+   ossimAOD(ossimObject* owner=NULL);
+   ossimAOD(ossimImageSource* inputSource);
+   ossimAOD(ossimObject* owner, ossimImageSource* inputSource);
+
+
+   virtual ossimString getShortName() const;
+
+   virtual void initialize();
+
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect,
+                                               ossim_uint32 resLevel=0);
+   
+   /*!
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+   virtual ostream& print(ostream& os) const;
+   friend ostream& operator << (ostream& os,  const ossimAOD& hr);
+
+   static void writeTemplate(ostream& os);
+
+protected:
+   virtual ~ossimAOD();
+
+   void allocate();
+   
+   /*!
+    * Method to set unset the enable flag.
+    */
+   void verifyEnabled();
+
+   ossimRefPtr<ossimImageData> theTile;
+
+   TYPE_DATA
+};
+
+#endif /* #ifndef ossimAOD_HEADER */
+
+
diff --git a/include/ossim/imaging/ossimAdrgHeader.h b/ossim/include/ossim/imaging/ossimAdrgHeader.h
similarity index 100%
rename from include/ossim/imaging/ossimAdrgHeader.h
rename to ossim/include/ossim/imaging/ossimAdrgHeader.h
diff --git a/ossim/include/ossim/imaging/ossimAdrgTileSource.h b/ossim/include/ossim/imaging/ossimAdrgTileSource.h
new file mode 100644
index 0000000..7f33914
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimAdrgTileSource.h
@@ -0,0 +1,197 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Ken Melero
+// 
+// Description: This class give the capability to access tiles from an
+//              ADRG file.
+//
+//********************************************************************
+// $Id: ossimAdrgTileSource.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimAdrgTileSource_HEADER
+#define ossimAdrgTileSource_HEADER
+
+#include <fstream>
+
+#include <ossim/imaging/ossimImageHandler.h>
+
+class ossimImageData;
+class ossimAdrgHeader;
+
+class OSSIM_DLL ossimAdrgTileSource : public ossimImageHandler
+{
+public:
+   
+   enum
+   {
+      ADRG_TILE_WIDTH  = 128,
+      ADRG_TILE_HEIGHT = 128,
+      ADRG_TILE_SIZE   = 16384, // 128 * 128,
+      BAND_OFFSET      = 16384, // 8 * 2048,
+      NUMBER_OF_BANDS  = 3
+   };
+   
+   enum ADRG_COLOR
+   {
+      RED_BAND    = 0,  // the ADRG rgb value
+      GREEN_BAND  = 1,
+      BLUE_BAND   = 2
+   };
+      
+   ossimAdrgTileSource();
+
+   virtual ossimString getShortName()const;
+   virtual ossimString getLongName()const;
+
+   /**
+    *  @return Returns true on success, false on error.
+    *
+    *  @note This method relies on the data member ossimImageData::theImageFile
+    *  being set.  Callers should do a "setFilename" prior to calling this
+    *  method or use the ossimImageHandler::open that takes a file name and an
+    *  entry index.
+    */
+   virtual bool open();
+
+   /**
+    *  Returns a pointer to a tile given an origin representing the upper
+    *  left corner of the tile to grab from the image.
+    *  Satisfies pure virtual requirement from TileSource class.
+    */
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
+                                               ossim_uint32 resLevel=0);
+   /**
+    * Method to get a tile.   
+    *
+    * @param result The tile to stuff.  Note The requested rectangle in full
+    * image space and bands should be set in the result tile prior to
+    * passing.  It will be an error if:
+    * result.getNumberOfBands() != this->getNumberOfOutputBands()
+    *
+    * @return true on success false on error.  If return is false, result
+    *  is undefined so caller should handle appropriately with makeBlank or
+    * whatever.
+    */
+   virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);   
+
+   /**
+    *  Returns the number of bands in the image.
+    *  Satisfies pure virtual requirement from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfInputBands() const;
+   
+   virtual ossim_uint32 getNumberOfOutputBands()const;
+
+   /**
+    *  Returns the number of lines in the image.
+    *  Satisfies pure virtual requirement from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level = 0) const;
+   
+   /**
+    *  Returns the number of samples in the image.  
+    *  Satisfies pure virtual requirement from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level = 0) const;
+
+   /**
+    * Returns the zero based image rectangle for the reduced resolution data
+    * set (rrds) passed in.  Note that rrds 0 is the highest resolution rrds.
+    */
+   virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level = 0) const;
+   
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+   
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+   /**
+    *  Returns the image geometry object associated with this tile source or NULL if non defined.
+    */
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+   
+   /**
+    * Returns the output pixel type of the tile source.
+    */
+   virtual ossimScalarType getOutputScalarType() const;
+
+   /**
+    * Returns the width of the output tile.
+    */
+   virtual ossim_uint32 getTileWidth() const;
+
+   virtual void close();
+   /**
+    * Returns the height of the output tile.
+    */
+   virtual ossim_uint32 getTileHeight() const;
+
+   virtual bool isOpen()const;
+
+   /**
+    * Returns the tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileWidth which
+    * returns the output tile width, which can be different than the
+    * internal image tile width on disk.
+    */
+   virtual ossim_uint32 getImageTileWidth() const;
+
+   /**
+    * Returns the tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileHeight which
+    * returns the output tile width which can be different than the internal
+    * image tile width on disk.
+    */
+   virtual ossim_uint32 getImageTileHeight() const;
+
+   /**
+    * @brief Gets a property for matching name.
+    * @param name The name of the property to get.
+    * @return Returns property matching "name".
+    */
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   
+   /**
+    * @brief Gets a list of property names available.
+    * @param propertyNames The list to push back names to.
+    */
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   
+protected:
+   virtual ~ossimAdrgTileSource();
+   
+   /**
+    *  Adjust point to even 128 boundary.  Assumes 0,0 origin.
+    */
+   void adjustToStartOfTile(ossimIpt& pt) const;
+   
+   /**
+    *  Returns true on success, false on error.
+    */
+   bool fillBuffer(const ossimIrect& tile_rect,
+                   const ossimIrect& clip_rect,
+                   ossimImageData* tile);
+   
+   ossimRefPtr<ossimImageData>  m_Tile;
+   ossim_uint8*                 m_TileBuffer;
+   std::ifstream                m_FileStr;
+   ossimAdrgHeader*             m_AdrgHeader;
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/imaging/ossimAnnotationEllipseObject.h b/ossim/include/ossim/imaging/ossimAnnotationEllipseObject.h
similarity index 100%
rename from include/ossim/imaging/ossimAnnotationEllipseObject.h
rename to ossim/include/ossim/imaging/ossimAnnotationEllipseObject.h
diff --git a/include/ossim/imaging/ossimAnnotationFontObject.h b/ossim/include/ossim/imaging/ossimAnnotationFontObject.h
similarity index 100%
rename from include/ossim/imaging/ossimAnnotationFontObject.h
rename to ossim/include/ossim/imaging/ossimAnnotationFontObject.h
diff --git a/include/ossim/imaging/ossimAnnotationGdBitmapFont.h b/ossim/include/ossim/imaging/ossimAnnotationGdBitmapFont.h
similarity index 100%
rename from include/ossim/imaging/ossimAnnotationGdBitmapFont.h
rename to ossim/include/ossim/imaging/ossimAnnotationGdBitmapFont.h
diff --git a/include/ossim/imaging/ossimAnnotationLineObject.h b/ossim/include/ossim/imaging/ossimAnnotationLineObject.h
similarity index 100%
rename from include/ossim/imaging/ossimAnnotationLineObject.h
rename to ossim/include/ossim/imaging/ossimAnnotationLineObject.h
diff --git a/include/ossim/imaging/ossimAnnotationMapGridSource.h b/ossim/include/ossim/imaging/ossimAnnotationMapGridSource.h
similarity index 100%
rename from include/ossim/imaging/ossimAnnotationMapGridSource.h
rename to ossim/include/ossim/imaging/ossimAnnotationMapGridSource.h
diff --git a/ossim/include/ossim/imaging/ossimAnnotationMultiEllipseObject.h b/ossim/include/ossim/imaging/ossimAnnotationMultiEllipseObject.h
new file mode 100644
index 0000000..d5a83e2
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimAnnotationMultiEllipseObject.h
@@ -0,0 +1,66 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimAnnotationMultiEllipseObject.h 23239 2015-04-08 01:02:44Z gpotts $
+#ifndef ossimAnnotationMultiEllipseObject_HEADER
+#define ossimAnnotationMultiEllipseObject_HEADER
+#include <ossim/imaging/ossimAnnotationObject.h>
+#include <vector>
+
+class OSSIMDLLEXPORT ossimAnnotationMultiEllipseObject : public ossimAnnotationObject
+{
+public:
+   ossimAnnotationMultiEllipseObject(const std::vector<ossimDpt>& pointList,
+                                     const ossimDpt& widthHeight = ossimDpt(1,1),
+                                     bool enableFill = false,
+                                     unsigned char r = 255,
+                                     unsigned char g = 255,
+                                     unsigned char b = 255,
+                                     long thickness = 1);
+
+   ossimAnnotationMultiEllipseObject(const ossimDpt& widthHeight = ossimDpt(1,1),
+                                     bool enableFill = false,
+                                     unsigned char r = 255,
+                                     unsigned char g = 255,
+                                     unsigned char b = 255,
+                                     long thickness = 1);
+
+   ossimAnnotationMultiEllipseObject(const ossimAnnotationMultiEllipseObject& rhs);
+   virtual ~ossimAnnotationMultiEllipseObject();
+
+   ossimObject* dup()const;
+
+
+   virtual ossimAnnotationObject* getNewClippedObject(const ossimDrect& rect)const;
+   virtual void applyScale(double x, double y);
+   virtual void draw(ossimRgbImage& anImage)const;
+   virtual bool intersects(const ossimDrect& rect)const;
+   virtual std::ostream& print(std::ostream& out)const;
+   virtual void getBoundingRect(ossimDrect& rect)const;
+   virtual void computeBoundingRect();
+  /*!
+   */
+   virtual bool isPointWithin(const ossimDpt& imagePoint)const;
+   
+   void setFillFlag(bool flag);
+
+   void resize(ossim_uint32 size);
+
+   virtual void setWidthHeight(const ossimDpt& widthHeight);
+
+   ossimDpt& operator[](int i);
+   
+   const ossimDpt& operator[](int i)const;
+   
+protected:
+   std::vector<ossimDpt>  thePointList;
+   ossimDpt               theWidthHeight;
+   bool                   theFillFlag;
+   ossimDrect             theBoundingRect;
+};
+
+#endif
diff --git a/include/ossim/imaging/ossimAnnotationMultiLineObject.h b/ossim/include/ossim/imaging/ossimAnnotationMultiLineObject.h
similarity index 100%
rename from include/ossim/imaging/ossimAnnotationMultiLineObject.h
rename to ossim/include/ossim/imaging/ossimAnnotationMultiLineObject.h
diff --git a/include/ossim/imaging/ossimAnnotationMultiPolyLineObject.h b/ossim/include/ossim/imaging/ossimAnnotationMultiPolyLineObject.h
similarity index 100%
rename from include/ossim/imaging/ossimAnnotationMultiPolyLineObject.h
rename to ossim/include/ossim/imaging/ossimAnnotationMultiPolyLineObject.h
diff --git a/include/ossim/imaging/ossimAnnotationMultiPolyObject.h b/ossim/include/ossim/imaging/ossimAnnotationMultiPolyObject.h
similarity index 100%
rename from include/ossim/imaging/ossimAnnotationMultiPolyObject.h
rename to ossim/include/ossim/imaging/ossimAnnotationMultiPolyObject.h
diff --git a/ossim/include/ossim/imaging/ossimAnnotationObject.h b/ossim/include/ossim/imaging/ossimAnnotationObject.h
new file mode 100644
index 0000000..99c0398
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimAnnotationObject.h
@@ -0,0 +1,105 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License:  See LICENSE.txt file in the top level directory.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimAnnotationObject.h 23239 2015-04-08 01:02:44Z gpotts $
+#ifndef ossimAnnotationObject_HEADER
+#define ossimAnnotationObject_HEADER
+#include <iostream>
+
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/imaging/ossimRgbImage.h>
+#include <ossim/base/ossimString.h>
+
+class OSSIMDLLEXPORT ossimAnnotationObject : public ossimObject
+{
+public:
+   virtual ~ossimAnnotationObject();
+   ossimAnnotationObject(ossim_uint8 r=255,
+                         ossim_uint8 g=255,
+                         ossim_uint8 b=255,
+                         ossim_uint8 thickness=1);
+   virtual void applyScale(double x,
+                           double y)=0;
+   virtual void applyScale(const ossimDpt& scale);
+   
+   virtual std::ostream& print(std::ostream& out)const;
+
+   virtual void draw(ossimRgbImage& anImage)const=0;
+   virtual bool intersects(const ossimDrect& rect)const=0;
+
+   /*!
+    * Will allocate a new object that is clipped to the passed.
+    * in rect.  Look at derived classes to see if the object is actually
+    * clipped or not.  A new object is returned if it clips to the rect
+    * else NULL should be returned it doesn't clip.
+    */
+   virtual ossimAnnotationObject* getNewClippedObject(const ossimDrect& rect)const=0;
+   
+   virtual void getBoundingRect(ossimDrect& rect)const=0;
+   virtual ossimDrect getBoundingRect()const;
+
+   virtual void computeBoundingRect()=0;
+   
+   virtual void setColor(ossim_uint8 r,
+                         ossim_uint8 g,
+                         ossim_uint8 b);
+
+   void getColor(ossim_uint8 &r,
+                 ossim_uint8 &g,
+                 ossim_uint8 &b)const;
+
+   ossim_uint8  getThickness()const;
+   virtual void setThickness(ossim_uint8 thickness);
+   
+   /*!
+    * This method allows you to pick an object.  It will
+    * return true or false if the point falls somewhere
+    * on an object.  Look at derived classes for further
+    * information.
+    */
+   virtual bool isPointWithin(const ossimDpt& imagePoint) const;
+
+   /**
+    * Saves the current state of this object.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   virtual ossimString getName() const;
+   virtual void setName(const ossimString& name);
+
+  ossim_uint32 getId()const;
+  virtual ossim_uint32 setId();
+
+  static ossim_uint32 getNextId();
+  static void restIdCounter();
+
+protected:
+   ossim_uint8 theRed;
+   ossim_uint8 theGreen;
+   ossim_uint8 theBlue;
+   ossim_uint8 theThickness;
+
+   ossimString  theName;
+   ossim_uint32 theId;
+
+  static ossim_uint32 theIdCounter;
+TYPE_DATA
+};
+
+#endif
diff --git a/include/ossim/imaging/ossimAnnotationObjectFactory.h b/ossim/include/ossim/imaging/ossimAnnotationObjectFactory.h
similarity index 100%
rename from include/ossim/imaging/ossimAnnotationObjectFactory.h
rename to ossim/include/ossim/imaging/ossimAnnotationObjectFactory.h
diff --git a/include/ossim/imaging/ossimAnnotationPolyObject.h b/ossim/include/ossim/imaging/ossimAnnotationPolyObject.h
similarity index 100%
rename from include/ossim/imaging/ossimAnnotationPolyObject.h
rename to ossim/include/ossim/imaging/ossimAnnotationPolyObject.h
diff --git a/include/ossim/imaging/ossimAnnotationSource.h b/ossim/include/ossim/imaging/ossimAnnotationSource.h
similarity index 100%
rename from include/ossim/imaging/ossimAnnotationSource.h
rename to ossim/include/ossim/imaging/ossimAnnotationSource.h
diff --git a/ossim/include/ossim/imaging/ossimAppFixedTileCache.h b/ossim/include/ossim/imaging/ossimAppFixedTileCache.h
new file mode 100644
index 0000000..1f83b7f
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimAppFixedTileCache.h
@@ -0,0 +1,118 @@
+//******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: This file contains the Application cache algorithm
+//
+//***********************************
+// $Id: ossimAppFixedTileCache.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimAppFixedTileCache_HEADER
+#define ossimAppFixedTileCache_HEADER
+#include <map>
+#include <list>
+#include <iostream>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimIrect.h>
+#include <OpenThreads/ReadWriteMutex>
+
+class ossimFixedTileCache;
+class ossimImageData;
+
+class OSSIM_DLL ossimAppFixedTileCache
+{
+public:
+   friend std::ostream& operator <<(std::ostream& out,
+                                    const ossimAppFixedTileCache& rhs);
+   static const ossim_uint32 DEFAULT_SIZE;
+   typedef ossim_int32 ossimAppFixedCacheId;
+   static ossimAppFixedTileCache *instance(ossim_uint32  maxSize   = 0);
+   virtual ~ossimAppFixedTileCache();
+   
+   /*!
+    * Will flush all cache registered
+    */
+   virtual void flush();
+   virtual void flush(ossimAppFixedCacheId cacheId);
+   virtual void deleteCache(ossimAppFixedCacheId cacheId);
+   /*!
+    * Will create a new Tile cache for this application if the tile size is 0,0 it will
+    * use the default tile size.  Will
+    * return 0 if not successful.
+    */
+   ossimAppFixedCacheId newTileCache(const ossimIrect& tileBoundaryRect,
+                                     const ossimIpt& tileSize=ossimIpt(0,0));
+   ossimAppFixedCacheId newTileCache();
+
+   virtual void setRect(ossimAppFixedCacheId cacheId,
+                        const ossimIrect& boundaryTileRect);
+   virtual void setTileSize(ossimAppFixedCacheId cacheId,
+                            const ossimIpt& tileSize);
+   
+   ossimRefPtr<ossimImageData> getTile(ossimAppFixedCacheId cacheId,
+                           const ossimIpt& origin);
+   ossimRefPtr<ossimImageData> addTile(ossimAppFixedCacheId cacheId,
+                                       ossimRefPtr<ossimImageData> data,
+                                       bool duplicateData=true);
+   
+   ossimRefPtr<ossimImageData> removeTile(ossimAppFixedCacheId cacheId,
+                                          const ossimIpt& origin);
+   void deleteTile(ossimAppFixedCacheId cacheId,
+                   const ossimIpt& origin);
+   
+   const ossimIpt& getTileSize(ossimAppFixedCacheId cacheId);
+   
+   virtual void setMaxCacheSize(ossim_uint32 cacheSize);
+   
+protected:
+//    struct ossimAppFixedCacheTileInfo
+//    {
+//    public:
+//       ossimAppFixedCacheTileInfo(ossimAppFixedCacheId appId,
+//                                  const ossimIpt& origin)
+//          :theAppCacheId(appId),
+//           theOrigin(origin)
+//          {}
+//       ossimAppFixedCacheId  theAppCacheId;
+//       ossimIpt       theOrigin;
+      
+//       bool operator ==(const ossimAppFixedCacheTileInfo &rhs)const
+//          {
+//             return (theAppCacheId == rhs.theAppCacheId &&
+//                     theOrigin     == rhs.theOrigin);
+//          } 
+//    };
+   
+   ossimAppFixedTileCache();
+   
+   ossimFixedTileCache* getCache(ossimAppFixedCacheId cacheId);
+
+   void shrinkGlobalCacheSize(ossim_int32 byteCount);
+   void shrinkCacheSize(ossimAppFixedCacheId id,
+                        ossim_int32 byteCount);
+   void shrinkCacheSize(ossimFixedTileCache* cache,
+                        ossim_int32 byteCount);
+   void deleteAll();
+   
+   static ossimAppFixedTileCache *theInstance;
+   
+   /*!
+    * Will hold the current unique Application id.
+    */
+   static ossimAppFixedCacheId    theUniqueAppIdCounter;
+   ossimIpt                       theTileSize;
+   ossim_uint32                   theMaxCacheSize;
+   ossim_uint32                   theMaxGlobalCacheSize;
+   ossim_uint32                   theCurrentCacheSize;
+
+   std::map<ossimAppFixedCacheId, ossimFixedTileCache*> theAppCacheMap;
+
+   OpenThreads::Mutex theMutex;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimAppTileCache.h b/ossim/include/ossim/imaging/ossimAppTileCache.h
new file mode 100644
index 0000000..f0b9011
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimAppTileCache.h
@@ -0,0 +1,171 @@
+//******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+// Description: This file contains the Application cache algorithm
+//
+//***********************************
+// $Id: ossimAppTileCache.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimAppTileCache_HEADER
+#define ossimAppTileCache_HEADER
+#include <map>
+#include <list>
+using namespace std;
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimDpt3d.h>
+#include <ossim/base/ossimRefPtr.h>
+// class ossimTile;
+class ossimTileCache;
+class ossimDataObject;
+
+class ossimAppTileCache
+{
+public:
+   static const ossim_uint32 DEFAULT_SIZE;
+
+   static const ossim_uint32 DEFAULT_BUCKET_SIZE;
+
+   typedef ossim_int32 ossimAppCacheId;
+   typedef ossim_int32 ossimTileId;
+   typedef map<ossimAppCacheId, ossimTileCache*>::iterator AppIdIterator;
+
+   ~ossimAppTileCache();
+
+   /*!
+    *  We will force a singleton on this class.
+    */
+   static ossimAppTileCache *instance(ossim_uint32  maxSize   = 0);
+
+   /*!
+    * Will create a new Tile cache for this application.  Will
+    * return 0 if not successful.
+    */
+   ossimAppCacheId newTileCache(ossim_uint32 bucketSize=DEFAULT_BUCKET_SIZE);
+
+   /*!
+    * Will retrieve a tile from the cache.  Will return NULL
+    * if not found.
+    */
+   ossimDataObject *get(ossimAppCacheId id,
+                        const ossimDpt3d &origin,
+                        ossim_uint32 resLevel=0);
+
+   /*!
+    * Will remove a tile completly from the cache.  The
+    * returned tile is no longer owned by the cache.
+    */
+   ossimRefPtr<ossimDataObject> removeTile(ossimAppCacheId id,
+                                           const ossimDpt3d &origin,
+                                           unsigned long resLevel);
+   /*!
+    * Will insert a tile into the cache.
+    */
+   ossimRefPtr<ossimDataObject> insert(ossimAppCacheId id,
+                                       const ossimDpt3d &origin,
+                                       const ossimDataObject* data,
+                                       ossim_uint32 resLevel=0);
+   
+   /*!
+    * This will delete the specified cache. The LRU queue will
+    * be updated accordingly
+    */
+   void deleteCache(ossimAppCacheId appId);
+protected:
+
+   struct ossimAppCacheTileInfo
+   {
+   public:
+      ossimAppCacheTileInfo(ossimAppCacheId appId,
+                       const ossimDpt3d& origin,
+                       ossim_uint32    resLevel)
+         :theAppCacheId(appId),
+          theOrigin(origin),
+          theResLevel(resLevel)
+         {}
+      ossimAppCacheId  theAppCacheId;
+      ossimDpt3d         theOrigin;
+      ossim_uint32     theResLevel;
+
+      bool operator ==(const ossimAppCacheTileInfo &rhs)
+         {
+            return (theAppCacheId == rhs.theAppCacheId &&
+                    theOrigin     == rhs.theOrigin &&
+                    theResLevel   == rhs.theResLevel);
+         } 
+  
+   };
+
+   ossimAppTileCache(ossim_uint32  maxSize   = DEFAULT_SIZE)
+      :
+         theMaxCacheSize(maxSize),
+         theCurrentCacheSize(0)
+      {}
+
+   void deleteAll();
+   /*!
+    * Used to get access to the App cache.
+    */
+  ossimTileCache* get(ossimAppCacheId id);
+
+   /*!
+    * will remove all occurances of the appId from the
+    * queue
+    */
+   void deleteAppCacheFromQueue(ossimAppCacheId appId);
+
+   /*!
+    * Will remove a single instance of a tile from the queue.
+    */
+   void removeTileFromQueue(ossimAppCacheId appId,
+                            const ossimDpt3d &origin,
+                            ossim_uint32 resLevel);
+
+   void adjustQueue(ossimAppCacheId id,
+                    const ossimDpt3d &origin,
+                    ossim_uint32 resLevel);
+   /*!
+    * will pop the queue and remove that tile from its cache
+    * and return it to the caller. This is used by the insert
+    * when the max cache size is exceeded.
+    */
+   ossimRefPtr<ossimDataObject> removeTile();
+
+
+   static ossimAppTileCache *theInstance;
+   /*!
+    * Will hold the current unique Application id.
+    */
+   static ossimAppCacheId                   theUniqueAppIdCounter;
+   /*!
+    * Will hold the list of application caches
+    */
+   map<ossimAppCacheId, ossimTileCache*>  theAppCache;
+
+   /*!
+    * Is the maximum size of the cache.
+    */
+   ossim_uint32                      theMaxGlobalCacheSize;
+   ossim_uint32                      theMaxCacheSize;
+   
+
+   /*!
+    * This holds the current cache size.
+    */
+   ossim_uint32                      theCurrentCacheSize;
+   
+
+   /*!
+    * Is used in an Least recently used algorithm
+    */
+   list<ossimAppCacheTileInfo>      theUsedQueue;
+   
+};
+
+#endif
+
diff --git a/include/ossim/imaging/ossimArcInfoGridWriter.h b/ossim/include/ossim/imaging/ossimArcInfoGridWriter.h
similarity index 100%
rename from include/ossim/imaging/ossimArcInfoGridWriter.h
rename to ossim/include/ossim/imaging/ossimArcInfoGridWriter.h
diff --git a/include/ossim/imaging/ossimAtCorrGridRemapper.h b/ossim/include/ossim/imaging/ossimAtCorrGridRemapper.h
similarity index 100%
rename from include/ossim/imaging/ossimAtCorrGridRemapper.h
rename to ossim/include/ossim/imaging/ossimAtCorrGridRemapper.h
diff --git a/include/ossim/imaging/ossimAtCorrKeywords.h b/ossim/include/ossim/imaging/ossimAtCorrKeywords.h
similarity index 100%
rename from include/ossim/imaging/ossimAtCorrKeywords.h
rename to ossim/include/ossim/imaging/ossimAtCorrKeywords.h
diff --git a/ossim/include/ossim/imaging/ossimAtCorrRemapper.h b/ossim/include/ossim/imaging/ossimAtCorrRemapper.h
new file mode 100644
index 0000000..323fc9a
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimAtCorrRemapper.h
@@ -0,0 +1,89 @@
+//*******************************************************************
+// Copyright (C) 2002 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Kathy Minear
+//
+// Description:
+// Takes in DNs for any number of bands
+// Converts DNs to Radiance at the satellite values Lsat
+// Converts Lsat to Surface Reflectance values
+//
+//*************************************************************************
+// $Id: ossimAtCorrRemapper.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimAtCorrRemapper_HEADER
+#define ossimAtCorrRemapper_HEADER
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+class ossimAtCorrRemapper : public ossimImageSourceFilter
+{
+public:
+
+   ossimAtCorrRemapper(ossimObject* owner = NULL,
+                       ossimImageSource* inputSource =  NULL,
+                       const ossimString& sensorType = "");
+
+
+   virtual ossimString getShortName() const;
+
+   virtual void initialize();
+
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect,
+                                               ossim_uint32 resLevel=0);
+   
+   /*!
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+   virtual ostream& print(ostream& os) const;
+   friend ostream& operator << (ostream& os,  const ossimAtCorrRemapper& hr);
+
+   vector<double> getNormMinPixelValues() const;
+   vector<double> getNormMaxPixelValues() const;
+
+   void getNormMinPixelValues(vector<double>& v) const;
+   void getNormMaxPixelValues(vector<double>& v) const;
+
+   const ossimString& getSensorType() const;
+
+   void setSensorType(const ossimString& sensorType);
+
+protected:
+   virtual ~ossimAtCorrRemapper();
+
+   /*!
+    * Method to set unset the enable flag.
+    */
+   void verifyEnabled();
+   virtual void interpolate(const ossimDpt& pt,
+                            int band,
+                            double& a,
+                            double& b,
+                            double& c)const;
+                            
+   ossimRefPtr<ossimImageData> theTile;
+   double*            theSurfaceReflectance;
+   bool               theUseInterpolationFlag;
+   vector<double>     theMinPixelValue;
+   vector<double>     theMaxPixelValue;
+   vector<double>     theXaArray;
+   vector<double>     theXbArray;
+   vector<double>     theXcArray;
+   vector<double>     theBiasArray;
+   vector<double>     theGainArray;
+   vector<double>     theCalCoefArray;
+   vector<double>     theBandWidthArray;
+   ossimString        theSensorType;
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimAtCorrRemapper_HEADER */
+
diff --git a/include/ossim/imaging/ossimAtbController.h b/ossim/include/ossim/imaging/ossimAtbController.h
similarity index 100%
rename from include/ossim/imaging/ossimAtbController.h
rename to ossim/include/ossim/imaging/ossimAtbController.h
diff --git a/include/ossim/imaging/ossimAtbMatchPoint.h b/ossim/include/ossim/imaging/ossimAtbMatchPoint.h
similarity index 100%
rename from include/ossim/imaging/ossimAtbMatchPoint.h
rename to ossim/include/ossim/imaging/ossimAtbMatchPoint.h
diff --git a/include/ossim/imaging/ossimAtbPointSource.h b/ossim/include/ossim/imaging/ossimAtbPointSource.h
similarity index 100%
rename from include/ossim/imaging/ossimAtbPointSource.h
rename to ossim/include/ossim/imaging/ossimAtbPointSource.h
diff --git a/ossim/include/ossim/imaging/ossimBandAverageFilter.h b/ossim/include/ossim/imaging/ossimBandAverageFilter.h
new file mode 100644
index 0000000..9f12689
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimBandAverageFilter.h
@@ -0,0 +1,111 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimBandAverageFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimBandAverageFilter_HEADER
+#define ossimBandAverageFilter_HEADER
+#include <vector>
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+/**
+ * This filter outputs a single band that is the weighted average of all the
+ * input bands retrieved from the getTile.  This filter will work with any
+ * input scalar type.  Note the OSSIMDLLEXPORT is used for the different
+ * compilers that require importing and exporting symbols for shared library
+ * support.
+ */
+class OSSIMDLLEXPORT ossimBandAverageFilter : public ossimImageSourceFilter
+{
+public:
+   ossimBandAverageFilter();
+   ossimBandAverageFilter(ossimImageSource* input,
+                          const std::vector<double>& weights);
+
+   /**
+    * The data object argument is deprecated and should not be used.
+    * eventually we will remove it from the base classes.  This method will
+    * return 1 if our source is enabled else it calls the base class
+    * getNumberOfOutputBands.
+    */
+   virtual ossim_uint32 getNumberOfOutputBands()const;
+   
+   /**
+    * Since this filter is going to operate in native pixel type we will use
+    * a tmeplate method to do this.  It will check the scalar tpe of the input
+    * and then cat it to set the template variabel to be used within the
+    * template method averageInput.
+    */
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
+                                               ossim_uint32 resLevel=0);
+
+   /**
+    * Since we are merging all bands we will use the null pix of the
+    * first input band as our null pix.  If we are disabled we just
+    * return the input s null
+    */
+   virtual double getNullPixelValue(ossim_uint32 band=0)const;
+
+   /**
+    * We will use the min of all bands as our min.  If we aredisabled
+    * we just return the inputs min
+    */
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   
+   /**
+    * We will use the max of all bands as our max.  If we aredisabled
+    * we just return the inputs max
+    */
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+
+   /**
+    * simple access method to get a weight
+    */
+   double getWeight(ossim_uint32 band)const;
+
+   /**
+    * Sinple access method to set the weight of a band,
+    * We make sure that it is a positive weight
+    */
+   void setWeight(ossim_uint32 band, double weight);
+
+   /**
+    * allocates its tile buffer
+    */
+   virtual void initialize();
+
+   /**
+    * loads its weights to a keywordlist
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   /**
+    * Saves its weights to a keywordlist
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+protected:
+   virtual ~ossimBandAverageFilter();
+   
+  ossimRefPtr<ossimImageData> theTile;
+   std::vector<double>         theWeights;
+
+   void checkWeights();
+   
+   template<class T> void averageInput(
+      T dummyVariable, // used only for template type, value ignored
+      ossimRefPtr<ossimImageData> inputDataObject);
+
+// for Runtime Type Info (RTTI)
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimBandClipFilter.h b/ossim/include/ossim/imaging/ossimBandClipFilter.h
new file mode 100644
index 0000000..dcb2b30
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimBandClipFilter.h
@@ -0,0 +1,93 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimBandClipFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimBandClipFilter_HEADER
+#define ossimBandClipFilter_HEADER
+#include <vector>
+using namespace std;
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+class ossimBandClipFilter : public ossimImageSourceFilter
+{
+public:
+   /*!
+    * Specifies the type of clipping.  The first will
+    * just clip and 
+    */
+   enum ossimBandClipType
+   {
+      ossimBandClipType_NONE             = 0,
+      ossimBandClipType_CLIP             = 1,
+      ossimBandClipType_CLAMP            = 2,
+      ossimBandClipType_LINEAR_STRETCH   = 3,
+      ossimBandClipType_MEDIAN_STRETCH   = 4 
+   };
+
+   ossimBandClipFilter();
+   ossimBandClipFilter(ossimImageSource*,
+                        const vector<double>& minPix,
+                        const vector<double>& maxPix,
+                        ossimBandClipType clipType=ossimBandClipType_NONE);
+   
+   ossimBandClipFilter(ossimImageSource*,
+                        double minPix,
+                        double maxPix,
+                        ossimBandClipType clipType=ossimBandClipType_NONE);
+
+
+   void setClipType(ossimBandClipType clipType);
+
+   ossimBandClipType getClipType()const;
+
+   virtual ossim_uint32 getNumberOfValues()const;
+
+   void setNumberOfValues(ossim_uint32 size);
+   
+   void setMinMaxPix(const vector<double>& minPix,
+                     const vector<double>& maxPix);
+
+   const std::vector<double>& getMinPixList()const;
+   const std::vector<double>  getMaxPixList()const;
+
+   double getMinPix(ossim_uint32 index)const;
+   double getMaxPix(ossim_uint32 index)const;
+
+   ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
+                                       ossim_uint32 resLevel=0);
+   
+   virtual void initialize();
+   
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix = NULL);
+
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix = NULL)const;
+protected:
+   virtual ~ossimBandClipFilter();
+
+   void runClip();
+   void runClamp();
+   void runLinearStretch();
+   void runMedianStretch();
+
+   std::vector<double> theMinPix; // normalized min
+   std::vector<double> theMaxPix; // normalized max
+   std::vector<double> theMedian; // normalized median.
+
+   ossimBandClipType           theClipType;
+   ossimRefPtr<ossimImageData> theTile;
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimBandMergeSource.h b/ossim/include/ossim/imaging/ossimBandMergeSource.h
new file mode 100644
index 0000000..076dba1
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimBandMergeSource.h
@@ -0,0 +1,63 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimBandMergeSource.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimBandMergeSource_HEADER
+#define ossimBandMergeSource_HEADER
+#include <ossim/imaging/ossimImageCombiner.h>
+
+class ossimImageSourceConnection;
+class ossimImageSource;
+
+class OSSIM_DLL ossimBandMergeSource : public ossimImageCombiner
+{
+public:
+   ossimBandMergeSource();
+   ossimBandMergeSource(ossimConnectableObject::ConnectableObjectList& inputSources);
+   
+   /**
+    * This will merge all the bands from the input source list
+    * into one contiguous ossimImageData object.  This is very
+    * useful when you want to split off an intesity channel in
+    * HSI and then run some algorithms on it and then merge it back.
+    * You can also try to do fusions by converting to an YCbCr and
+    * replace the Y or intensity channel with maybe a high-pass
+    * convolution on the pan.
+    */
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect, ossim_uint32 resLevel=0);
+   virtual bool getTile(ossimImageData* tile, ossim_uint32 resLevel=0);
+
+   virtual void initialize();
+   
+   /**
+    * Returns the number of bands in a tile returned from this TileSource.
+    * Note: we are supporting sources that can have multiple data objects.
+    * If you want to know the scalar type of an object you can pass in the 
+    */
+   virtual ossim_uint32 getNumberOfOutputBands() const;
+
+   virtual double getNullPixelValue(ossim_uint32 band=0)const;
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+   
+protected:
+   virtual ~ossimBandMergeSource();
+   /** Performs allocation of "theTile". */
+   void allocate();
+   
+   ossim_uint32                theNumberOfOutputBands;
+   ossimRefPtr<ossimImageData> theTile;
+   
+   ossim_uint32 computeNumberOfInputBands()const;
+
+TYPE_DATA
+};
+#endif /* #ifndef ossimBandMergeSource_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimBandSelector.h b/ossim/include/ossim/imaging/ossimBandSelector.h
new file mode 100644
index 0000000..04579b1
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimBandSelector.h
@@ -0,0 +1,169 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License:  See top level LICENSE.txt.
+// 
+// Author:  Garrett Potts
+//
+// Description:  Contains class declaration for ossimBandSelector.
+// 
+//*******************************************************************
+//  $Id: ossimBandSelector.h 23427 2015-07-15 14:51:51Z okramer $
+#ifndef ossimBandSelector_HEADER
+#define ossimBandSelector_HEADER 1
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+#include <vector>
+ 
+class ossimImageData;
+class ossimImageHandler;
+
+class OSSIM_DLL ossimBandSelector : public ossimImageSourceFilter
+{
+   
+public:
+   enum ossimBandSelectorWithinRangeFlagState
+   {
+      ossimBandSelectorWithinRangeFlagState_NOT_SET      = 0,
+      ossimBandSelectorWithinRangeFlagState_IN_RANGE     = 1,
+      ossimBandSelectorWithinRangeFlagState_OUT_OF_RANGE = 2,
+   };
+
+   ossimBandSelector();
+   virtual ~ossimBandSelector();
+   
+   virtual ossimString getLongName()  const;
+   virtual ossimString getShortName() const;
+
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+
+   /**
+    * Initializes bandList to the zero based order of output bands.
+    */
+   virtual void getOutputBandList(std::vector<ossim_uint32>& bandList) const;
+
+   /**
+    * Sets the output band list.
+    *
+    * @param outputBandList List of zero based bands.
+    * @param disablePassThru If true, forces the band selection to be performed by this filter.
+    *        Otherwise, the image handler to the left is directed to select bands if it has that
+    *        capability (default behavior).
+    *
+    * @note The input connection should be established prior to calling this.
+    *
+    * @note Bands can be duplicated.  So if you have a single band input you
+    * can do a band list like "1, 1, 1".   Any band within the list must be
+    * available from the input.  So if you have a 3 band input bands must be
+    * constrained to zero based bands "0, 1, or 2".
+    *
+    * @note Calling this method does not enable filter so callers should do:
+    * theBandSelector->enableSource();
+    * theBandSelector->setOutputBandList(bandList);
+    */
+   virtual void setOutputBandList(const vector<ossim_uint32>& outputBandList,
+                                  bool disablePassThru=false);
+   
+   /**
+    * Returns the number of bands in a tile returned from this TileSource.
+    */
+   virtual ossim_uint32 getNumberOfOutputBands() const;
+
+   /**
+    * @brief Returns the number of input bands.
+    *
+    * Overrides ossimImageSourceFilter::getNumberOfInputBands to check for a
+    * single image chain band selectable image handler on the input.  If one
+    * is present it returns it's number of input bands instead of the number
+    * of the input connection's output bands(our input).  This is needed so
+    * callers, e.g. band selector dialog box can query the number of bands
+    * available.
+    *
+    * @return Number of bands available.
+    */
+   virtual ossim_uint32 getNumberOfInputBands()const;   
+
+   virtual void initialize();
+   
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+   virtual double getNullPixelValue(ossim_uint32 band=0)const;
+
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=NULL)const;
+   
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=NULL);
+   /**
+    *   Override base class so that a disableSource event does not
+    *   reinitialize the object and enable itself.
+    */
+   //virtual void propertyEvent(ossimPropertyEvent& event);
+   //virtual void refreshEvent(ossimRefreshEvent& event);   
+
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;						  
+   virtual bool isSourceEnabled()const;
+
+protected:
+
+   /**
+    * Called on first getTile, will initialize all data needed.
+    */
+   void allocate();
+
+   /**
+    * Will check all combinations of the band list to see if its 
+    */
+   void checkPassThrough();
+
+   /**
+    * @return true if all bands in theOutputBandList are less than the
+    * number of input's bands.
+    */
+   bool outputBandsWithinInputRange() const;
+
+   /**
+    * @brief Finds and returns band selectable image handler.
+    *
+    * To get a valid pointer there must be one and only one image handler on
+    * the input connection and it must be a band selector.  In other words,
+    * must be a single image chain input and
+    * ossimImageHandler::isBandSelector() must return true.
+    *
+    * @return Pointer to image handler wrapped in an ossimRefPtr on success;
+    * null, on error.
+    */
+   ossimRefPtr<ossimImageHandler> getBandSelectableImageHandler() const;
+
+   /**
+    * @brief Attempts to derive rgb bands from image handler to the left of the
+    * band selector.
+    *
+    * Must be one and only one image handler on the input connection.
+    * In other words, must be a single image chain input.
+    *
+    * @return true on success, false on error.
+    */
+   bool getRgbBandList(std::vector<ossim_uint32>& bandList) const;
+   
+   ossimRefPtr<ossimImageData>           theTile;
+   std::vector<ossim_uint32>             theOutputBandList;
+   ossimBandSelectorWithinRangeFlagState theWithinRangeFlag;
+   bool                                  thePassThroughFlag;
+   bool                                  theDelayLoadRgbFlag;
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimBandSelector_HEADER */
diff --git a/ossim/include/ossim/imaging/ossimBandSeparateHandler.h b/ossim/include/ossim/imaging/ossimBandSeparateHandler.h
new file mode 100644
index 0000000..2efb9e8
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimBandSeparateHandler.h
@@ -0,0 +1,98 @@
+//**************************************************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Oscar Kramer
+// 
+// Description:
+//
+// Image handler used when the multi-band image has each band represented by a different disk file.
+// This is the case for some Ikonos imagery. 
+//
+//**************************************************************************************************
+// $Id: ossimBandSeparateHandler.h 2644 2011-05-26 15:20:11Z oscar.kramer $
+#ifndef ossimBandSeparateHandler_HEADER
+#define ossimBandSeparateHandler_HEADER
+
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/imaging/ossimBandMergeSource.h>
+
+/**
+ *  This class defines an abstract Handler which all image handlers(loaders)
+ *  should derive from.
+ */
+class OSSIMDLLEXPORT ossimBandSeparateHandler : public ossimImageHandler
+{
+public:
+   //!  Constructor (default):
+   ossimBandSeparateHandler();
+   
+   //! Destructor:
+   virtual ~ossimBandSeparateHandler();
+   
+   //! Opens multiple band-files based on info in metadata file.
+   //! @return Returns true on success, false on error.
+   virtual bool open();
+
+   //! Closes all band-files and clears input handler list.
+   virtual void close();
+
+   //! @return true if open, false if not.
+   virtual bool isOpen()const;
+
+   virtual ossim_uint32 getNumberOfInputBands() const;
+   
+   //! @param resLevel Reduced resolution level to return lines of.
+   //! Default = 0
+   //! @return The number of lines for specified reduced resolution level.
+   virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel = 0) const;
+
+   //! @param resLevel Reduced resolution level to return samples of.
+   //! Default = 0
+   //! @return The number of samples for specified reduced resolution level.
+   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel = 0) const;
+   
+   //! Method to save the state of an object to a keyword list.
+   //! Return true if ok or false on error.
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
+
+   //! Method to the load (recreate) the state of an object from a keyword
+   //! list.  Return true if ok or false on error.
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+
+   //! Fills the requested tile by pulling pixels from multiple file tiles as needed.
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect, ossim_uint32 resLevel);
+
+   //! Returns scalar type of first band (should be the same for all bands)
+   virtual ossimScalarType getOutputScalarType() const;
+
+   //! Overrides base connection method to connect output of merge source.
+   virtual bool canConnectMyOutputTo(ossim_int32 index, const ossimConnectableObject* obj);
+
+   //! Returns the geometry of the first band:
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+
+   //! These images are not tiled
+   virtual ossim_uint32 getImageTileWidth()  const { return 0; }
+   virtual ossim_uint32 getImageTileHeight() const { return 0; }
+
+protected:
+   //! Fetches the list of band file names from the header file. The header file name is contained
+   //! in ossimImageHandler::theImageFile.
+   //! NOTE TO PROGRAMMER: This class is presently tailored to the Ikonos metadata file specifying
+   //! the individual band files. If other "metadata" formats are to be supported, then this class
+   //! should be derived from. This method would therefore be pure virtual in this base-class and 
+   //! only this method would need to be implemented in the derived classes.
+   virtual void getBandFileNames(vector<ossimFilename>& file_names);
+
+  vector<ossimRefPtr<ossimImageHandler> > m_bandFiles;
+  ossimRefPtr<ossimBandMergeSource>       m_mergeSource;
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimBandSeparateHandler_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimBitMaskTileSource.h b/ossim/include/ossim/imaging/ossimBitMaskTileSource.h
new file mode 100644
index 0000000..a8226d8
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimBitMaskTileSource.h
@@ -0,0 +1,134 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Oscar Kramer
+//
+//*******************************************************************
+//  $Id: ossimBitMaskTileSource.h 2644 2011-05-26 15:20:11Z oscar.kramer $
+
+#ifndef ossimBitMaskTileSource_HEADER
+#define ossimBitMaskTileSource_HEADER
+
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimBitMaskWriter.h>
+
+class ossimImageGeometry;
+
+//*************************************************************************************************
+//! This is the image handler for providing mask pixels to an ossimMaskFilter object.
+//!
+//! This class takes care of reading the custom, bit-compressed OSSIM bit mask file format. 
+//! 
+//! When the developer needs to mask an image, the following needs to be done:
+//!
+//!   Creating the Mask:
+//!   1. A mask file first needs to be created using ossimBitMaskWriter and a source image. The app
+//!      "img2rr --create-mask" directs that program to use ossimBitMaskWriter to generate a mask  
+//!      during overview generation. There is also create-bitmask app that will generate the mask.
+//!   2. An OSSIM ".mask" file should exist on disk after step 0. This is typically the same base 
+//!      name as the source image file being masked.
+//!   
+//!   Using the Mask:
+//!   1. An ossimBitMaskTileSource (derived from ossimImageHandler) needs to be instantiated and
+//!      the mask file name used to open it. 
+//!   3. An ossimMaskFilter (derived from ossimImageCombiner) is the actual filter that combines
+//!      the source image handler and the ossimBitMaskTileSource object to provide the resultant 
+//!      masked tiles.
+//!      
+//! The OSSIM bit mask file contains a small header that consists of:
+//!    magic number,
+//!    starting res level,
+//!    number of res levels
+//!    num columns at starting res level,
+//!    num rows at starting res level, 
+//!    num columns at 2nd res level,
+//!    num rows at 2nd res level, 
+//!    etc., for all res levels
+//!    <space> 
+//!    <compressed binary mask data>
+//!
+//! The number of rows and columns represents the number of bytes in the mask, with each byte
+//! containing 8 alpha mask bits representing 8 pixels in the original image.
+//!
+//! This class functions as an image handler, returning 255 for unmasked pixels, and 0 for masked 
+//! pixels. 
+//! 
+//! For debug purposes, this code initializes the tile to all 128's so that the 
+//! ossimMaskFilter can recognize uninitialized mask data.
+//!
+//*************************************************************************************************
+
+class OSSIM_DLL ossimBitMaskTileSource : public ossimImageHandler
+{
+public:
+
+   ossimBitMaskTileSource();
+
+   //! Return a tile of masks. These are "bit masks", i.e., either 0 (hide) or 1 (show).
+   //! The pixels' remaining 7 bits are cleared and should not be used.
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect, ossim_uint32 rLevel=0);
+   
+   virtual bool         isValidRLevel     (ossim_uint32 res_level)   const;
+   virtual ossim_uint32 getNumberOfLines  (ossim_uint32 res_level=0) const;
+   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 res_level=0) const;
+
+   virtual ossim_uint32    getNumberOfInputBands()  const { return 1; }
+   virtual ossim_uint32    getNumberOfOutputBands() const { return 1; }
+   virtual ossimScalarType getOutputScalarType()    const { return OSSIM_UINT8; }
+   virtual ossim_uint32    getImageTileWidth()      const { return 0; }
+   virtual ossim_uint32    getImageTileHeight()     const { return 0; }   
+
+   virtual bool isOpen() const;
+   virtual bool open();
+   virtual void close();
+
+   virtual double getNullPixelValue(ossim_uint32 /*band=0*/) const { return 0; }
+   virtual double getMinPixelValue (ossim_uint32 /*band=0*/) const { return 0; }
+   virtual double getMaxPixelValue (ossim_uint32 /*band=0*/) const { return 1.0; }
+
+   //! There is no geometry associated with a mask file -- it is pixel-for-pixel mapped to
+   //! an image file. The image file must have the valid geometry.
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+
+   //! Overrides base class implementation.
+   virtual ossim_uint32 getNumberOfDecimationLevels() const;
+
+   //! For backward compatibility with older mask format ("Ming Mask"), provide for associating
+   //! the mask with an image handler:
+   void setAssociatedImageHandler(ossimImageHandler* handler);
+
+   //! This class can be used during overview generation, in which case there will be a simultaneous
+   //! mask writing. Instead of accessing a mask file (which may not yet exist), the mask buffer
+   //! of the writer will be accessed directly instead of our own buffer.
+   void setAssociatedMaskWriter(ossimBitMaskWriter* maskWriter);
+
+protected:
+   virtual ~ossimBitMaskTileSource();
+   
+   //! Returns true if this handler recognizes the file name extension as an OSSIM raster mask file.
+   bool isSupportedExtension();
+
+   virtual void establishDecimationFactors();
+
+   ossimRefPtr<ossimImageData>  m_tile;
+   vector<ossim_uint8*>         m_buffers;
+   vector<ossimIpt>             m_bufferSizes;
+   
+   //! For backward compatibility with older mask format ("Ming Mask"), provide for associating
+   //! the mask with an image handler:
+   ossimRefPtr<ossimImageHandler>  m_handler;
+
+   //! This class can be used during overview generation, in which case there will be a simultaneous
+   //! mask writing. Instead of accessing a mask file (which may not yet exist), the mask buffer
+   //! of the writer will be accessed directly instead of our own buffer.
+   ossimRefPtr<ossimBitMaskWriter>  m_maskWriter;
+
+   TYPE_DATA
+};
+
+#endif
+
+
diff --git a/ossim/include/ossim/imaging/ossimBitMaskWriter.h b/ossim/include/ossim/imaging/ossimBitMaskWriter.h
new file mode 100644
index 0000000..70725dd
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimBitMaskWriter.h
@@ -0,0 +1,134 @@
+//*************************************************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Oscar Kramer
+//
+//*************************************************************************************************
+//  $Id: ossimBitMaskWriter.h 2644 2011-05-26 15:20:11Z oscar.kramer $
+
+#ifndef ossimBitMaskWriter_HEADER
+#define ossimBitMaskWriter_HEADER
+
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimOutputSource.h>
+#include <ossim/imaging/ossimPixelFlipper.h>
+#include <vector>
+
+class ossimFilename;
+class ossimKeywordlist;
+class ossimImageHandler;
+class ossimBitMaskTileSource;
+
+//*************************************************************************************************
+//! 
+//! Class for computing a mask from an input image source and writing the mask file to disk.
+//!
+//! This class takes care of all details associated with computing, writing and reading the custom,
+//! bit-compressed OSSIM bit mask file format. 
+//! 
+//! When the developer needs to mask an image, the following needs to be done:
+//!
+//!   Creating the Mask:
+//!   1. A mask file first needs to be created using ossimBitMaskWriter and a source image. The app
+//!      "img2rr --create-mask" directs that program to use ossimBitMaskWriter to generate a mask  
+//!      during overview generation. There is also create-bitmask app that will generate the mask.
+//!   2. An OSSIM ".mask" file should exist on disk after step 0. This is typically the same base 
+//!      name as the source image file being masked.
+//!   
+//!   Using the Mask:
+//!   1. An ossimBitMaskTileSource (derived from ossimImageHandler) needs to be instantiated and
+//!      the mask file name used to open it. 
+//!   3. An ossimMaskFilter (derived from ossimImageCombiner) is the actual filter that combines
+//!      the source image handler and the ossimBitMaskTileSource object to provide the resultant 
+//!      masked tiles.
+//!      
+//! The OSSIM bit mask file contains a small header that consists of:
+//!    magic number,
+//!    starting res level,
+//!    number of res levels
+//!    num columns at starting res level,
+//!    num rows at starting res level, 
+//!    num columns at 2nd res level,
+//!    num rows at 2nd res level, 
+//!    etc., for all res levels
+//!    <space> 
+//!    <compressed binary mask data>
+//!
+//! The number of rows and columns represents the number of bytes in the mask, with each byte
+//! containing 8 alpha mask bits representing 8 pixels in the original image.
+//!
+//! The mask is computed here using the specified values for bogus pixels. If a pixel in the source
+//! image is in the range of bogus values, a mask of 0 is assigned to that pixel, otherwise 1. 
+//!
+//*************************************************************************************************
+class OSSIM_DLL ossimBitMaskWriter : public ossimOutputSource
+{
+public:
+   static const char* BM_STARTING_RLEVEL_KW;
+   static const char* MASK_FILE_MAGIC_NUMBER;
+
+   //! Default constructor typically used when reading a mask from disk.
+   ossimBitMaskWriter();
+
+   ~ossimBitMaskWriter();
+
+   //! Sets the NULL pixel value to consider when computing mask:
+   void setBogusPixel(double pixel_value);
+
+   //! Sets the range of pixels (inclusive) to be regarded as NULL pixels when computing mask
+   void setBogusPixelRange(double min, double max);
+
+   //! Sets the starting resolution level for the mask.
+   void setStartingResLevel(ossim_uint32 res_level) { m_startingResLevel = res_level; }
+
+   //! Given a source's tile, derives the alpha mask and saves it in buffer for later writing to 
+   //! disk.
+   void generateMask(ossimRefPtr<ossimImageData> tile, ossim_uint32 rLevel);
+
+   //! For imagery that already has overviews built, but with artifact edge pixels (such as JP2-
+   //! compressed data), it is preferred to build the mask overviews directly from the R0 mask.
+   //! This method will build the remaining number of R-levels from the last defined mask buffer
+   //! such that the total number of R-levels (counting R0) are represented. Returns TRUE if successful.
+   bool buildOverviews(ossim_uint32 total_num_rlevels);
+
+   //! Computes and writes the mask file according to the specification in the KWL.
+   //! Returns TRUE if successful.
+   virtual bool loadState(const ossimKeywordlist& spec, const char* prefix=0);
+
+   virtual bool isOpen() const;
+   virtual bool open();
+   virtual void close();
+
+   virtual bool canConnectMyInputTo(ossim_int32 myInputIndex, 
+                                    const ossimConnectableObject* object) const;
+   virtual ossim_int32 connectMyInputTo (ossimConnectableObject *inputObject, 
+                                         bool makeOutputConnection=true, 
+                                         bool createEventFlag=true);
+
+protected:
+   friend class ossimBitMaskTileSource;
+
+   //! Initializes the flipper (used for identifying pixels for masking) to default values
+   void initializeFlipper();
+
+   //! Deletes allocated buffers and resets all values to defaults.
+   void reset();
+
+   //! Since overviews may not yet exist when the mask is being written, we must compute the
+   //! size of the source image based on the original R0 image size.
+   ossimIpt computeImageSize(ossim_uint32 rlevel, ossimImageData* tile) const;
+
+   ossimRefPtr<ossimPixelFlipper>  m_flipper;
+   vector<ossim_uint8*>            m_buffers;
+   vector<ossimIpt>                m_bufferSizes;
+   ossim_uint32                    m_startingResLevel;
+   ossimIpt                        m_imageSize; //!< Size of full res source image
+};
+
+#endif
+
+
diff --git a/ossim/include/ossim/imaging/ossimBlendMosaic.h b/ossim/include/ossim/imaging/ossimBlendMosaic.h
new file mode 100644
index 0000000..b5aff2a
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimBlendMosaic.h
@@ -0,0 +1,79 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimBlendMosaic.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimBlendMosaic_HEADER
+#define ossimBlendMosaic_HEADER
+#include <ossim/imaging/ossimImageMosaic.h>
+
+class OSSIMDLLEXPORT ossimBlendMosaic : public ossimImageMosaic
+{
+public:
+   ossimBlendMosaic();
+   ossimBlendMosaic(ossimConnectableObject::ConnectableObjectList& inputSources);
+   virtual void initialize();
+
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
+                                               ossim_uint32 resLevel=0);
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=NULL)const;
+
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=NULL);
+
+   void setWeight(ossim_uint32 index, double weight);
+   void setWeights(const std::vector<double>& weights);
+   
+   double getWeight(ossim_uint32 index) const;
+   const std::vector<double>& getWeights()const;
+
+
+   void setNumberOfWeights(ossim_uint32 numberOfWeights);
+   void setAllWeightsTo(double value);
+   
+   /**
+    * Will find the min and max values and then
+    * normalize all weights to be from 0 to 1
+    */
+   void normalizeWeights();
+   void findMinMax(double& minValue, double& maxValue)const;
+   
+protected:
+   virtual ~ossimBlendMosaic();
+   vector<double>              theWeights;
+   ossimRefPtr<ossimImageData> theNormResult;
+   /**
+    * If our inputs have output of different scalar
+    * types then we must normalize so we can blend
+    * different scalar data together.
+    */
+   
+
+   template <class T>
+      ossimRefPtr<ossimImageData> combine(T,
+                                          const ossimIrect& tileRect,
+                                          ossim_uint32);
+   template <class T>
+      ossimRefPtr<ossimImageData> combineNorm(T,
+                                              const ossimIrect& tileRect,
+                                              ossim_uint32);
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimBlendMosaic_HEADER */
+
diff --git a/include/ossim/imaging/ossimBrightnessContrastSource.h b/ossim/include/ossim/imaging/ossimBrightnessContrastSource.h
similarity index 100%
rename from include/ossim/imaging/ossimBrightnessContrastSource.h
rename to ossim/include/ossim/imaging/ossimBrightnessContrastSource.h
diff --git a/ossim/include/ossim/imaging/ossimBrightnessMatch.h b/ossim/include/ossim/imaging/ossimBrightnessMatch.h
new file mode 100644
index 0000000..a179273
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimBrightnessMatch.h
@@ -0,0 +1,58 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: A brief description of the contents of the file.
+//
+//*************************************************************************
+// $Id: ossimBrightnessMatch.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimBrightnessMatch_HEADER
+#define ossimBrightnessMatch_HEADER
+#include <ossim/imaging/ossimImageSourceFilter.h>
+#include <ossim/imaging/ossimBrightnessContrastSource.h>
+
+class ossimBrightnessMatch : public ossimImageSourceFilter
+{
+public:
+   ossimBrightnessMatch();
+
+
+
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+
+
+   virtual void initialize();
+   /*---------------------- PROPERTY INTERFACE ---------------------------*/
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   /*--------------------- PROPERTY INTERFACE END ------------------------*/
+
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+protected:
+   virtual ~ossimBrightnessMatch();
+   
+   double          theTargetBrightness;
+   double          theInputBrightness;
+   ossimRefPtr<ossimImageData> theNormTile;
+
+   ossimRefPtr<ossimBrightnessContrastSource> theBrightnessContrastSource;
+   
+   ossimRefPtr<ossimImageData> runBrightnessMatch();
+
+   void computeInputBrightness();
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimBumpShadeTileSource.h b/ossim/include/ossim/imaging/ossimBumpShadeTileSource.h
new file mode 100644
index 0000000..0f1f329
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimBumpShadeTileSource.h
@@ -0,0 +1,284 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimBumpShadeTileSource.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimBumpShadeTileSource_HEADER
+#define ossimBumpShadeTileSource_HEADER
+#include <ossim/imaging/ossimImageCombiner.h>
+#include <ossim/base/ossimPropertyEvent.h>
+#include <ossim/matrix/newmat.h>
+
+class ossimImageData;
+
+class ossimImageSourceConnection;
+
+/**
+ * This uses a derivative of Blinn's bump function to compute a 3-D
+ * looking image.  The elevation data can be from Grey Scale image or from
+ * a Dted file.  This class can take one or two inputs.  The First input is an
+ * elevation input that is used to compute a perturbed Normal which is
+ * used in a simple lambertian shading equation.  The second input is some
+ * color source (Grey or RGB) that defines the diffuse color used within
+ * the illumination equation for each pixel. If the diffuse color input is not
+ * supplied then an all white color is used for the color.  There are several
+ * adjustable parameters that can be set:
+ * 1) the Incident light vector described by the Azimuth and Elevation Angle,
+ * 2) the pixel scale used along the x and y direction, and
+ * 3) the partial derivative matrix used for the partial derivative
+ * computation along the x and y direction.
+ *
+ * <pre>
+ * 
+ * Some examples of good values:
+ *
+ * If we are using dted 90 meters as input for shading then:
+ * 1) set pixel scale to 180.  Since the partials do 2*dx and 2*dy then
+ *    the scale is 2*90meters = 180.
+ * 2) set azimuth angle to 45 and set elevation angle to 45 degrees.  Change
+ *    them to see the effects.
+ * 3) use the following matrix -1 0 1
+ *                             -1 0 1
+ *                             -1 0 1
+ *                                &
+ *                              1  1  1
+ *                              0  0  0
+ *                             -1 -1 -1
+ * 
+ *    for the partials along x and y directions respectively.  These matrices
+ *
+ *    (f(x+dx, y) - f(x-dx, y))/2*dx and
+ *    (f(x, y+dy) - f(x, y-dy))/2*dy
+ *
+ *    for an apprximate derivative about some point x, y
+ *
+ * If we are using pixel intesity (1 - 255) then set the scales to around
+ * 100.
+ *
+ *  Note: varying the scales will vary the smoothness/roughness of the surface
+ *        Smaller the scale the rougher the surface will look.
+ *
+ * The output of this source is always a 3-band 8-bit image.
+ *
+ * Keywords:
+ *   type:               ossimBumpShadeTileSource
+ *   azimuth_angle:      45.000000000000000
+ *   elevation_angle:    45.000000000000000
+ *   scale_per_pixel_x:  180.000000000000000  // this is the 2*dx defined above
+ *   scale_per_pixel_y:  180.000000000000000  // this is the 2*dy defined above
+ *
+ *   the next set of keywords are optional and the default is as defined above.
+ *   these define the matrix.
+ *
+ *
+ * A typical chain would look something like this:
+ * 
+ * OrthoMosaicOfElevation-->Normals-->Renderer-->|
+ *                                               |--> BumpShade-->Output 
+ * ColorSource----------------------->Renderer-->|
+ *
+ * NOTES:
+ *
+ * 1) "Normals" is an ossimImageToPlaneNormalFilter class
+ *
+ * 2) The bump map input source is used to bump or shade the input color
+ * source.  The input color source currently must be a 1 or 3 band
+ * image.  Note that the output of this source is always
+ * 3 bands (r, g, b).
+ *
+ * 3) If no color source (2nd input layer) is present the r,g,b values will be
+ * used.  The method setRgbColorSource can be used to control this.
+ * 
+ * </pre>
+ * 
+ */
+class OSSIMDLLEXPORT ossimBumpShadeTileSource : public ossimImageCombiner
+{
+public:
+   ossimBumpShadeTileSource();
+
+   ossimString getShortName()const;
+   ossimString getLongName()const;
+
+   ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                       ossim_uint32 resLevel=0);
+
+   virtual bool getTile(ossimImageData* tile, ossim_uint32 resLevel=0);
+
+   /**
+    * This should always return 3
+    */
+   virtual ossim_uint32 getNumberOfOutputBands() const;
+
+   /**
+    * The output scalar type should always be 8-bit
+    */
+   virtual ossimScalarType getOutputScalarType() const;
+   
+   /**
+    * the null pixel is 0.0.
+    * \return null pixel value is always 0
+    *
+    */
+   virtual double getNullPixelValue()const;
+
+   /**
+    * the min pixel is 1.0.
+    * \return min pixel value is always 1
+    *
+    */
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+
+   /**
+    * the max pixel is 255.
+    * \return max pixel value is always 255
+    *
+    */
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+
+   /**
+    * \return Returns the rotation of the incident vector..
+    */
+   virtual double getAzimuthAngle()const;
+
+   /**
+    * \return Returns the elevation of the incident vector.
+    */
+   virtual double getElevationAngle()const;
+
+   /**
+    *
+    */
+   virtual void setAzimuthAngle(double angle);
+
+   /**
+    *
+    */
+   virtual void setElevationAngle(double angle);
+
+   /**
+    *
+    */
+   virtual void initialize();
+
+   /**
+    *
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   /**
+    *
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+   
+   /**
+    *
+    */
+   bool canConnectMyInputTo(ossim_int32 inputIndex,
+                            const ossimConnectableObject* object)const;
+      
+   /**
+    *
+    */
+   virtual void connectInputEvent(ossimConnectionEvent& event);
+
+   /**
+    *
+    */
+   virtual void disconnectInputEvent(ossimConnectionEvent& event);
+
+   /**
+    *
+    */
+   virtual void propertyEvent(ossimPropertyEvent& event);
+
+   virtual void refreshEvent(ossimRefreshEvent& event);
+
+   /**
+    * Will re-compute the light direction given the elevation angle and
+    * azimuth angle.
+    */
+   void computeLightDirection();
+
+   /* ------------------- PROPERTY INTERFACE -------------------- */
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   /* ------------------ PROPERTY INTERFACE END ------------------- */
+
+   /**
+    * @brief Set the red, green and blue color source values.
+    *
+    * This sets the rgb value used when no second layer is present.
+    *
+    * The default is: r = 255, g = 255, b = 255
+    *
+    * @param r red
+    * @param g green
+    * @param b blue
+    */
+   void setRgbColorSource(ossim_uint8 r, ossim_uint8 g, ossim_uint8 b);
+
+   /**
+    * Gets the red, green and blue color source values.
+    * @param r red
+    * @param g green
+    * @param b blue
+    */
+   void getRgbColorSource(ossim_uint8& r, ossim_uint8& g, ossim_uint8& b) const;
+   
+protected:
+   virtual ~ossimBumpShadeTileSource();
+   void allocate();
+   /**
+    * The result of the illumination equation is stored in
+    * here.  This is populated on each call to getTile.
+    */
+   ossimRefPtr<ossimImageData> m_tile;
+
+   /**
+    * Used for the light vector computation.
+    */
+   double m_lightSourceElevationAngle;
+
+   /**
+    * Used for the light vector computation.
+    */
+   double m_lightSourceAzimuthAngle;
+
+   /**
+    * This is computed from the elevation and
+    * azimuth angles of the light source.
+    */
+   NEWMAT::ColumnVector m_lightDirection;
+
+   /**
+    * rgb values used when no color source (2nd layer) is present.
+    */
+   ossim_uint8 m_r;
+   ossim_uint8 m_g;
+   ossim_uint8 m_b;
+
+   void computeColor(ossim_uint8& r,
+                     ossim_uint8& g,
+                     ossim_uint8& b,
+                     ossim_float64 normalX,
+                     ossim_float64 normalY,
+                     ossim_float64 normalZ,
+                     ossim_uint8 dr,
+                     ossim_uint8 dg,
+                     ossim_uint8 db)const;
+   
+TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/imaging/ossimCacheTileSource.h b/ossim/include/ossim/imaging/ossimCacheTileSource.h
similarity index 100%
rename from include/ossim/imaging/ossimCacheTileSource.h
rename to ossim/include/ossim/imaging/ossimCacheTileSource.h
diff --git a/ossim/include/ossim/imaging/ossimCastTileSourceFilter.h b/ossim/include/ossim/imaging/ossimCastTileSourceFilter.h
new file mode 100644
index 0000000..ba3826a
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimCastTileSourceFilter.h
@@ -0,0 +1,94 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimCastTileSourceFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimCastTileSourceFilter_HEADER
+#define ossimCastTileSourceFilter_HEADER
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+class OSSIMDLLEXPORT ossimCastTileSourceFilter : public ossimImageSourceFilter
+{
+public:
+   ossimCastTileSourceFilter(ossimImageSource* inputSource=NULL,
+			     ossimScalarType scalarType=OSSIM_UCHAR);
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+   virtual void initialize();
+   virtual ossimScalarType getOutputScalarType() const;
+
+   virtual ossimString getOutputScalarTypeString()const;
+
+   /**
+    *  Sets the output scalar type.
+    */
+   virtual void setOutputScalarType(ossimScalarType scalarType);
+   virtual void setOutputScalarType(ossimString scalarType);
+   
+   /**
+    *  Sets the current resolution level.  Returns true on success, false
+    *  on error.
+    */
+   virtual double getNullPixelValue(ossim_uint32 band)const;
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+
+   ossimRefPtr<ossimImageData> applyCast(ossimRefPtr<ossimImageData> input);
+   
+   /**
+    *  Method to save the state of an object to a keyword list.
+    *  Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=NULL)const;
+
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=NULL);
+
+   /**
+    *   Override base class so that a disableSource event does not
+    *   reinitialize the object and enable itself.
+    */
+   virtual void propertyEvent(ossimPropertyEvent& event);
+   virtual void refreshEvent(ossimRefreshEvent& event);   
+
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+     
+protected:
+   virtual ~ossimCastTileSourceFilter();
+
+   void allocate(const ossimRefPtr<ossimImageData> inputTile);
+   
+   ossimRefPtr<ossimImageData> theTile;
+   ossimScalarType             theOutputScalarType;
+
+   template<class inType>
+   void castInputToOutput(inType **inBuffer,
+                          const double  *nullPix,
+                          bool   inPartialFlag);
+   
+   template<class inType, class outType>
+   void castInputToOutput(inType *inBuffer[],
+                          const double  *nullInPix,
+                          bool   inPartialFlag,
+                          outType *outBuffer[],
+                          const double  *nullOutPix,
+                          ossim_uint32   numberOfBands);
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimCastTileSourceFilter_HEADER */
+
diff --git a/include/ossim/imaging/ossimCcfHead.h b/ossim/include/ossim/imaging/ossimCcfHead.h
similarity index 100%
rename from include/ossim/imaging/ossimCcfHead.h
rename to ossim/include/ossim/imaging/ossimCcfHead.h
diff --git a/ossim/include/ossim/imaging/ossimCcfTileSource.h b/ossim/include/ossim/imaging/ossimCcfTileSource.h
new file mode 100644
index 0000000..74ab580
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimCcfTileSource.h
@@ -0,0 +1,233 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Contains class declaration for CcfTileSource.
+//
+// A ccf (Chip Chunk Format) is a double tiled format.  Image data is
+// arranged in chips and chunks.  Each chip is 32 x 32 pixels.  Each chunk
+// is 8 x 8 chips for a single band image.  Bands are interleaved by chip
+// so a rgb image has a red chip a green chip, then a blue chip which
+// would make the chunk 24 x 8 chips.
+//
+//*******************************************************************
+//  $Id: ossimCcfTileSource.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimCcfTileSource_HEADER
+#define ossimCcfTileSource_HEADER
+
+#include <fstream>
+
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimCcfHead.h>
+
+class  ossimImageData;
+
+class OSSIM_DLL ossimCcfTileSource : public ossimImageHandler
+{
+public:
+
+   ossimCcfTileSource();
+   
+   virtual ossimString getShortName()const;
+   virtual ossimString getLongName()const;
+
+   /**
+    *  @return Returns true on success, false on error.
+    *
+    *  @note This method relies on the data member ossimImageData::theImageFile
+    *  being set.  Callers should do a "setFilename" prior to calling this
+    *  method or use the ossimImageHandler::open that takes a file name and an
+    *  entry index.
+    */
+   virtual bool open();
+   
+   virtual void close();
+   
+   virtual ossimRefPtr<ossimImageData> getTile(const  ossimIrect& rect,
+                                               ossim_uint32 resLevel=0);
+
+   /**
+    * Method to get a tile.   
+    *
+    * @param result The tile to stuff.  Note The requested rectangle in full
+    * image space and bands should be set in the result tile prior to
+    * passing.  It will be an error if:
+    * result.getNumberOfBands() != this->getNumberOfOutputBands()
+    *
+    * @return true on success false on error.  If return is false, result
+    *  is undefined so caller should handle appropriately with makeBlank or
+    * whatever.
+    */
+   virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);
+   
+    /**
+     *  Returns the number of bands in the image.
+     *  Satisfies pure virtual from ImageHandler class.
+     */
+   virtual ossim_uint32 getNumberOfInputBands() const;
+   virtual ossim_uint32 getNumberOfOutputBands()const;
+
+   /**
+     *  Returns the number of lines in the image.
+     *  Satisfies pure virtual from ImageHandler class.
+     */
+   virtual ossim_uint32 getNumberOfLines(
+      ossim_uint32 reduced_res_level = 0) const;
+   
+   /**
+    *  Returns the number of samples in the image.  
+    *  Satisfies pure virtual from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfSamples(
+      ossim_uint32 reduced_res_level = 0) const;
+
+   /**
+    *  Returns the number of reduced resolution data sets (rrds).
+    *  Note:  The full res image is counted as a data set so an image with no
+    *         reduced resolution data set will have a count of one.
+    */
+   virtual ossim_uint32 getNumberOfDecimationLevels() const;
+   
+   /**
+    *  Returns the zero based image rectangle for the reduced resolution data
+    *  set (rrds) passed in.  Note that rrds 0 is the highest resolution rrds.
+    */
+   virtual ossimIrect getImageRectangle(
+      ossim_uint32 reduced_res_level = 0) const;
+   
+   /**
+    *  Set the output band list.  Use to set the number and order of output
+    *  bands.  Will set an error if out of range.
+    */
+   bool setOutputBandList(const vector<ossim_uint32>& outputBandList);
+
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+   
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+      
+   /**
+    * Returns the output pixel type of the tile source.
+    */
+   virtual ossimScalarType getOutputScalarType() const;
+
+   /**
+    * Returns the width of the output tile.
+    */
+   virtual ossim_uint32 getTileWidth() const;
+   
+   /**
+    * Returns the height of the output tile.
+    */
+   virtual ossim_uint32 getTileHeight() const;
+
+   /**
+    * Returns the tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileWidth which
+    * returns the output tile width which can be different than the internal
+    * image tile width on disk.
+    */
+   virtual ossim_uint32 getImageTileWidth() const;
+
+   /**
+    * Returns the tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileWidth which
+    * returns the output tile width which can be different than the internal
+    * image tile width on disk.
+    */
+   virtual ossim_uint32 getImageTileHeight() const;
+
+   virtual bool isOpen()const;
+
+   /**
+    * @brief Gets a property for matching name.
+    * @param name The name of the property to get.
+    * @return Returns property matching "name".
+    */
+   virtual ossimRefPtr<ossimProperty> getProperty(
+      const ossimString& name)const;
+   
+   /**
+    * @brief Gets a list of property names available.
+    * @param propertyNames The list to push back names to.
+    */
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+	
+   
+protected:
+   virtual ~ossimCcfTileSource();
+
+   void initVerticesFromHeader();
+   
+   // Disallow these...
+   ossimCcfTileSource(const ossimCcfTileSource& source);
+   ossimCcfTileSource& operator=(const ossimCcfTileSource& source); 
+   
+   /**
+    *  Returns true on success, false on error.
+    */
+   bool fillBuffer(const  ossimIrect& tile_rect,
+                   const  ossimIrect& clip_rect,
+                   const  ossimIrect& image_rect,
+                   ossim_uint32 reduced_res_level,
+                   ossimImageData* tile);
+
+   /**
+    *  Returns true on success, false on error.
+    */
+   bool fillUshortBuffer(const  ossimIrect& tile_rect,
+                         const  ossimIrect& clip_rect,
+                         const  ossimIrect& image_rect,
+                         ossim_uint32 reduced_res_level,
+                         ossimImageData* tile);
+   
+   /**
+    *  Returns true on success, false on error.
+    */
+   bool fillUcharBuffer(const  ossimIrect& tile_rect,
+                        const  ossimIrect& clip_rect,
+                        const  ossimIrect& image_rect,
+                        ossim_uint32 reduced_res_level,
+                        ossimImageData* tile);
+
+   /**
+    *  Adjust point to even 256 boundary.  Assumes 0,0 origin.
+    */
+   void adjustToStartOfChunk(ossimIpt& pt) const;
+
+   /**
+    *  Adjust point to even 32 boundary.  Assumes 0,0 origin.
+    */
+   void adjustToStartOfChip(ossimIpt& pt) const;
+
+   bool isEcgGeom(const ossimFilename& filename)const;
+
+   ossimCcfHead                theCcfHead;
+   ossimRefPtr<ossimImageData> theTile;
+   ossim_uint8*                theChipBuffer;
+   ifstream*                   theFileStr;
+   vector<ossim_uint32>        theOutputBandList;
+   ossim_int32                 theByteOrder;
+
+
+TYPE_DATA
+};
+   
+#endif
+
diff --git a/include/ossim/imaging/ossimCibCadrgTileSource.h b/ossim/include/ossim/imaging/ossimCibCadrgTileSource.h
similarity index 100%
rename from include/ossim/imaging/ossimCibCadrgTileSource.h
rename to ossim/include/ossim/imaging/ossimCibCadrgTileSource.h
diff --git a/ossim/include/ossim/imaging/ossimClosestToCenterCombiner.h b/ossim/include/ossim/imaging/ossimClosestToCenterCombiner.h
new file mode 100644
index 0000000..c9a9ccb
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimClosestToCenterCombiner.h
@@ -0,0 +1,61 @@
+//*******************************************************************
+// Copyright (C) 2005 Garrett Potts. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimClosestToCenterCombiner.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimClosestToCenterCombiner_HEADER
+#define ossimClosestToCenterCombiner_HEADER
+#include <vector>
+#include <ossim/imaging/ossimImageMosaic.h>
+/**
+  * This implements a closest to center combiner.
+  *
+  * It will first grab all images overlapping a given rectangle query.  The first non-null
+  * closest pixel to the center of the image is used.  This basically uses only pixels along
+  * the "sweet" spot of the image.  This combiner is typically used when there is overlapping
+  * sensor data.
+  * 
+  */
+class OSSIM_DLL ossimClosestToCenterCombiner : public ossimImageMosaic
+{
+public:
+   ossimClosestToCenterCombiner();
+
+   /**
+    * Executes the ossimClosestToCenterCombiner algorithm. sets the pixels to the closest
+    * Valid value.  This simulates a sweet spot cutter.
+    * 
+    * @param rect The region of interest.
+    * @param resLevel.  For this combiner this is assumed to always be 0
+    */
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
+                                               ossim_uint32 resLevel=0);
+protected:
+   class ossimClosestToCenterCombinerInfo
+   {
+   public:
+      ossimClosestToCenterCombinerInfo(ossimRefPtr<ossimImageData> tile,
+                                       ossim_int32 idx)
+         :theTile(tile),
+         theIndex(idx)
+         {
+         }
+      ossimRefPtr<ossimImageData> theTile;
+      ossim_int32                 theIndex;
+   };
+
+   
+   ossim_int32 findIdx(const std::vector<ossimClosestToCenterCombinerInfo >& normTileList,
+                       const ossimIpt& pt, ossim_uint32 offset)const;
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimCodecBase.h b/ossim/include/ossim/imaging/ossimCodecBase.h
new file mode 100644
index 0000000..b0daf89
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimCodecBase.h
@@ -0,0 +1,67 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: class declaration for base codec(encoder/decoder).
+// 
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossimCodecBase_HEADER
+#define ossimCodecBase_HEADER 1
+
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimPropertyInterface.h>
+#include <ossim/imaging/ossimImageData.h>
+class OSSIM_DLL ossimCodecBase
+   : public ossimObject, public ossimPropertyInterface
+{
+public:
+
+    /**
+    * Will return the identifier used to identify the codec type.  For example the Jpeg codec
+    * will have "jpeg" as the identifier
+    *
+    * @return Codec identifier
+    */
+	virtual ossimString getCodecType()const=0;
+
+   /**
+    * @brief Encode method.
+    *
+    * Pure virtual method that encodes the passed in buffer to this codec.
+    *
+    * @param in Input data to encode.
+    * 
+    * @param out Encoded output data.
+    *
+    * @return true on success, false on failure.
+    */
+
+   virtual bool encode( const ossimRefPtr<ossimImageData>& in,
+                        std::vector<ossim_uint8>& out ) const=0;
+
+  /**
+    * @brief Decode method.
+    *
+    * @param in Input data to decode.
+    * 
+    * @param out Output tile.  If the pointer to ossimImageData is null
+    * internally it will be created.  For code loops it is better to pre
+    * initialized to correct size.
+    *
+    * @note Caller should set "out's" image rectangle upon successful
+    * decode.
+    *
+    * @return true on success, false on failure.
+    */
+   virtual bool decode( const std::vector<ossim_uint8>& in,
+                        ossimRefPtr<ossimImageData>& out ) const=0;
+
+TYPE_DATA;
+
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimCodecFactory.h b/ossim/include/ossim/imaging/ossimCodecFactory.h
new file mode 100644
index 0000000..b80c1cc
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimCodecFactory.h
@@ -0,0 +1,74 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Factory class declaration for codec(encoder/decoder).
+// 
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossimCodecFactory_HEADER
+#define ossimCodecFactory_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/imaging/ossimCodecFactoryInterface.h>
+
+class ossimFilename;
+class ossimCodecBase;
+
+/**
+ * @brief Codec factory.
+ */
+class OSSIM_DLL ossimCodecFactory : public ossimCodecFactoryInterface
+{
+public:
+
+   /** virtual destructor */
+   virtual ~ossimCodecFactory();
+
+   /**
+   * @return instance
+   */
+   static ossimCodecFactory* instance();
+
+   /**
+   * createCodec takes a type and will return a new codec to encode decode image buffers
+   *
+   * @param in type.  Type identifer used to allocate the proper codec.
+   * @return ossimCodecBase type.
+   */
+   virtual ossimCodecBase* createCodec(const ossimString& type)const;
+
+
+   /**
+   * createCodec takes a type in the keywordlist and will return a new codec to encode decode image buffers
+   *
+   * @param in kwl.  Type identifer used to allocate the proper codec.
+   * @param in prefix.  prefix used to prefix keywords during the construction
+   *                    of the codec
+   * @return ossimCodecBase type.
+   */
+   virtual ossimCodecBase* createCodec(const ossimKeywordlist& kwl, const char* prefix=0)const;
+
+   virtual void getTypeNameList(std::vector<ossimString>& typeNames)const;
+   
+private:
+   
+   /** hidden from use default constructor */
+   ossimCodecFactory();
+
+   /** hidden from use copy constructor */
+   ossimCodecFactory(const ossimCodecFactory& obj);
+
+   /** hidden from use operator = */
+   const ossimCodecFactory& operator=(const ossimCodecFactory& rhs);
+
+   /** The single instance of this class. */
+   static ossimCodecFactory* theInstance;
+};
+
+#endif /* End of "#ifndef ossimCodecFactory_HEADER" */
+
diff --git a/ossim/include/ossim/imaging/ossimCodecFactoryInterface.h b/ossim/include/ossim/imaging/ossimCodecFactoryInterface.h
new file mode 100644
index 0000000..b73f2a5
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimCodecFactoryInterface.h
@@ -0,0 +1,91 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Interface for codec(encoder/decoder) factories.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossimCodecFactoryInterface_HEADER
+#define ossimCodecFactoryInterface_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <vector>
+
+class ossimObject;
+class ossimCodecBase;
+/**
+ * @brief Codec factory interface.
+ */
+class OSSIM_DLL ossimCodecFactoryInterface // : public ossimObjectFactory
+{
+public:
+
+   /** default constructor */
+   ossimCodecFactoryInterface(){}
+
+   /** virtual destructor */
+   virtual ~ossimCodecFactoryInterface(){}
+   
+   /**
+   * This is a bridge to the generic factory list interface that trys to call createObject
+   * 
+   * We will bridge it in this interface to just call createCodec.  These are not pure virtual.
+   *
+   */
+   virtual ossimObject* createObject(const ossimString& type)const;
+
+  /**
+   * This is a bridge to the generic factory list interface that trys to call createObject
+   * 
+   * We will bridge it in this interface to just call createCodec.  These are not pure virtual.
+   *
+   */
+  virtual ossimObject* createObject(const ossimKeywordlist& kwl, const char* prefix=0)const;
+   
+
+   
+   virtual ossimCodecBase* createCodec(const ossimString& type)const=0;
+   virtual ossimCodecBase* createCodec(const ossimKeywordlist& kwl, const char* prefix=0)const=0;
+
+
+   virtual void getTypeNameList(std::vector<ossimString>& typeNames)const=0;
+
+   /**
+    * @brief Pure virtual decode method. Derived classes must implement to
+    * be concrete.
+    *
+    * @param in Input data to decode.
+    * 
+    * @param out Output tile.
+    *
+    * @return true on success, false on failure.
+    */
+//   virtual bool decode( const std::vector<ossim_uint8>& in,
+//                        ossimRefPtr<ossimImageData>& out ) const = 0;
+
+   /**
+    * @brief Pure virtual encode method. Derived classes must implement to
+    * be concrete.
+    *
+    * @param in Input data to encode.
+    * 
+    * @param out Encoded output data.
+    *
+    * @return true on success, false on failure.
+    */
+
+//   virtual bool encode( const ossimKeywordlist& options,
+//                        const ossimRefPtr<ossimImageData>& in,
+//                        std::vector<ossim_uint8>& out ) const = 0;
+};
+
+#endif /* End of "#ifndef ossimCodecFactoryInterface_HEADER" */
+
diff --git a/ossim/include/ossim/imaging/ossimCodecFactoryRegistry.h b/ossim/include/ossim/imaging/ossimCodecFactoryRegistry.h
new file mode 100644
index 0000000..8c9cbfd
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimCodecFactoryRegistry.h
@@ -0,0 +1,56 @@
+#ifndef ossimCodecFactoryRegistry_HEADER
+#define ossimCodecFactoryRegistry_HEADER
+#include <ossim/base/ossimFactoryListInterface.h>
+#include <ossim/imaging/ossimCodecBase.h>
+#include <ossim/imaging/ossimCodecFactoryInterface.h>
+
+class OSSIM_DLL ossimCodecFactoryRegistry : public ossimFactoryListInterface<ossimCodecFactoryInterface, 
+																	ossimCodecBase>
+{
+public:
+	static ossimCodecFactoryRegistry* instance();
+	virtual ~ossimCodecFactoryRegistry();
+
+   /**
+   * Will loop through all registered factories trying to allocate a codec for the passed
+   * in type.
+   *
+   *  @param   in type.  Type of Codec to allocate.
+   *  @return ossimCodecBase. Newly allocated Codec  
+   */
+   virtual ossimCodecBase* createCodec(const ossimString& type)const;
+
+   /**
+   * Will loop through all registered factories trying to allocate a codec for the passed
+   * in type in the type keyword of the keywordlist.
+   *
+   * @param in kwl.  State infromation to load when allocating the codec
+   * @param in prefix. prefix value for all keys
+   *
+   *  @return ossimCodecBase. Newly allocated codec
+   */
+   virtual ossimCodecBase* createCodec(const ossimKeywordlist& kwl, const char* prefix=0)const;
+
+
+   /**
+   * Loop through all factories and get a list of supported types.
+   *
+   * @param out typeNames. The resulting typename list.  Values will be appended.
+   */
+   virtual void getTypeNameList(std::vector<ossimString>& typeNames)const;
+
+
+private:
+   /** hidden from use default constructor */
+   ossimCodecFactoryRegistry();
+
+   /** hidden from use copy constructor */
+   ossimCodecFactoryRegistry(const ossimCodecFactoryRegistry& obj);
+
+   /** hidden from use operator = */
+   const ossimCodecFactoryRegistry& operator=(const ossimCodecFactoryRegistry& rhs);
+
+	static ossimCodecFactoryRegistry* m_instance;
+};
+
+#endif
diff --git a/ossim/include/ossim/imaging/ossimColorNormalizedFusion.h b/ossim/include/ossim/imaging/ossimColorNormalizedFusion.h
new file mode 100644
index 0000000..391a7b3
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimColorNormalizedFusion.h
@@ -0,0 +1,33 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: Color normalized fusion
+//
+//*************************************************************************
+// $Id: ossimColorNormalizedFusion.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimColorNormalizedFusion_HEADER
+#define ossimColorNormalizedFusion_HEADER
+#include <ossim/imaging/ossimFusionCombiner.h>
+
+class ossimColorNormalizedFusion : public ossimFusionCombiner
+{
+public:
+
+   ossimColorNormalizedFusion();
+   ossimColorNormalizedFusion(ossimObject* owner);
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
+                                               ossim_uint32 resLevel=0);
+
+protected:
+   virtual ~ossimColorNormalizedFusion();
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimConvolutionFilter1D.h b/ossim/include/ossim/imaging/ossimConvolutionFilter1D.h
new file mode 100644
index 0000000..16fb1b1
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimConvolutionFilter1D.h
@@ -0,0 +1,125 @@
+//*******************************************************************
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// class ossimImageGaussianFilter : tile source
+// class ossimConvolutionFilter1D
+// one dimensional convolution
+//
+// efficient for gradients & separable convolution kernels (like gaussian)
+//*******************************************************************
+// $Id: ossimConvolutionFilter1D.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimConvolutionFilter1D_HEADER
+#define ossimConvolutionFilter1D_HEADER
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+/**
+ * class for vertical or horizontal convolution
+ *
+ * PROPERTIES:
+ *  -KernelSize   : length of linear kernel (>=1)
+             NOTE - you need to exit the property editor for the kernel to be resized
+ *  -Kernel       : Kernel vector (line matrix)
+ *  -Horizontal   : boolean, otherwise vertical kernel
+ *  -CenterOffset : center pixel position in the kernel, starting at 0
+ *  -StrictNoData : controls NODATA use
+ *      true  : any NODATA pixel in the convolution will make the center pixel NODATA
+ *      false : if center is NODATA, then output center is NODATA,
+ *              other NODATA pixels are processed as if they were zero in the convolution
+ */
+class OSSIM_DLL ossimConvolutionFilter1D : public ossimImageSourceFilter
+{
+public:
+  /**
+   * own class methods
+   */
+   ossimConvolutionFilter1D(ossimObject* owner=NULL);
+
+   virtual inline const std::vector<ossim_float64>& getKernel()const { return theKernel; }
+   virtual void setKernel(const std::vector<ossim_float64>& aKernel);
+
+   virtual inline bool isHorizontal()const         { return theIsHz; }
+   virtual inline void setIsHorizontal(bool aIsHz) { theIsHz = aIsHz; }
+
+   virtual inline ossim_int32 getCenterOffset()const              { return theCenterOffset; }
+   virtual inline void setCenterOffset(ossim_int32 aCenterOffset) { theCenterOffset = aCenterOffset; }
+   
+   virtual inline bool isStrictNoData()const         { return theStrictNoData; }
+   virtual inline void setStrictNoData(bool aStrict) { theStrictNoData = aStrict; }
+
+  /** 
+   * inherited methods
+   */
+   virtual ossimString getShortName()const{return ossimString("1D Convolution");}
+   virtual ossimString getLongName()const{return ossimString("Convolves the input image with a one dimensional convolution kernel");}
+
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,ossim_uint32 resLevel=0);
+
+   virtual void initialize();
+
+   virtual double getNullPixelValue(ossim_uint32 band=0) const;
+   virtual double getMinPixelValue(ossim_uint32 band=0)  const;
+   virtual double getMaxPixelValue(ossim_uint32 band=0)  const;
+
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+   virtual bool loadState(const ossimKeywordlist& kwl,const char* prefix = 0);
+   virtual bool saveState(ossimKeywordlist& kwl,const char* prefix = 0)const;
+   
+protected:
+   virtual ~ossimConvolutionFilter1D();
+
+   /**
+    * Allocates theTile.
+    */
+   void allocate();
+
+   /**
+    * Clears data members theNullPixValue, theMinPixValue, and
+    * theMaxPixValue.
+    */
+   void clearNullMinMax();
+
+   /**
+    * Computes null, min, and max considering input connection and theKernel.
+    */
+   void computeNullMinMax();
+      
+   /*!
+    * Convolve full means that the input data is full and has
+    * no null data.  We don't have to compare for nulls here
+    */
+   template<class T>
+   void convolveFull(T,
+                     ossimRefPtr<ossimImageData> inputData,
+                     ossimRefPtr<ossimImageData> outputData);
+   
+   /*!
+    * Convolve partial means that the input data is has some
+    * null data.  We will have to compare nulls
+    */
+   template<class T>
+   void convolvePartial(T,
+                        ossimRefPtr<ossimImageData> inputData,
+                        ossimRefPtr<ossimImageData> outputData);
+
+   //! offset of center point in the Kernel
+   ossim_int32                theCenterOffset;
+   ossimRefPtr<ossimImageData> theTile;
+   std::vector<ossim_float64>  theKernel;
+   bool                        theIsHz; //! isHorizontal convolution?
+   bool                        theStrictNoData; //! strictly no NODATA values used
+
+   std::vector<double> theNullPixValue;
+   std::vector<double> theMinPixValue;
+   std::vector<double> theMaxPixValue;
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimConvolutionFilter1D_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimConvolutionSource.h b/ossim/include/ossim/imaging/ossimConvolutionSource.h
new file mode 100644
index 0000000..19ee678
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimConvolutionSource.h
@@ -0,0 +1,73 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimConvolutionSource.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimConvolutionSource_HEADER
+#define ossimConvolutionSource_HEADER
+#include <vector>
+#include <iostream>
+#include <ossim/matrix/newmat.h>
+using namespace std;
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+class ossimTilePatch;
+class ossimDiscreteConvolutionKernel;
+
+class OSSIM_DLL ossimConvolutionSource : public ossimImageSourceFilter
+{
+public:
+   ossimConvolutionSource();
+   ossimConvolutionSource(ossimImageSource* inputSource,
+                          const NEWMAT::Matrix& convolutionMatix);
+   ossimConvolutionSource(ossimImageSource* inputSource,
+                          const vector<NEWMAT::Matrix>& convolutionList);
+   
+   virtual void setConvolution(const double* kernel, int nrows, int ncols, bool doWeightedAverage=false);
+   virtual void setConvolution(const NEWMAT::Matrix& convolutionMatrix, bool doWeightedAverage=false);
+   virtual void setConvolutionList(const vector<NEWMAT::Matrix>& convolutionList, bool doWeightedAverage=false);
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=NULL)const;
+   
+   /*!
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=NULL);
+
+   ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect, ossim_uint32 resLevel=0);
+   
+   virtual void initialize();
+   
+protected:
+   virtual ~ossimConvolutionSource();
+
+   void allocate();
+   
+   ossimRefPtr<ossimImageData> theTile;
+   ossim_int32                 theMaxKernelWidth;
+   ossim_int32                 theMaxKernelHeight;
+   
+   std::vector<ossimDiscreteConvolutionKernel* > theConvolutionKernelList;
+   virtual void setKernelInformation();
+   virtual void deleteConvolutionList();
+
+   template<class T>
+   void convolve(T dummyVariable,
+                 ossimRefPtr<ossimImageData> inputTile,
+                 ossimDiscreteConvolutionKernel* kernel);
+   
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimConvolutionSource_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimDespeckleFilter.h b/ossim/include/ossim/imaging/ossimDespeckleFilter.h
new file mode 100644
index 0000000..2fab8dd
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimDespeckleFilter.h
@@ -0,0 +1,49 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Oscar Kramer
+//
+//*******************************************************************
+//  $Id: ossimDespeckleFilter.h 2644 2011-05-26 15:20:11Z oscar.kramer $
+#ifndef ossimDespeckleFilter_HEADER
+#define ossimDespeckleFilter_HEADER
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+class ossimDespeckleFilter : public ossimImageSourceFilter
+{
+public:
+   ossimDespeckleFilter();
+   ossimDespeckleFilter(ossimImageSource* inputSource, ossim_uint32 filter_radius=1);
+   
+   virtual void setRadius(ossim_uint32 radius) { theFilterRadius = (ossim_int32) radius; }
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=NULL)const;
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=NULL);
+
+   ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect, ossim_uint32 resLevel=0);
+   
+   virtual void initialize();
+   
+   /* ------------------- PROPERTY INTERFACE -------------------- */
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   /* ------------------ PROPERTY INTERFACE END ------------------- */
+
+protected:
+   virtual ~ossimDespeckleFilter();
+   template<class T> void despeckle(T dummyVariable, ossimRefPtr<ossimImageData> inputTile);
+
+   void allocate();
+   
+   ossimRefPtr<ossimImageData> theTile;
+   ossim_int32                theFilterRadius;
+   
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimDespeckleFilter_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimDilationFilter.h b/ossim/include/ossim/imaging/ossimDilationFilter.h
new file mode 100644
index 0000000..4d59535
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimDilationFilter.h
@@ -0,0 +1,74 @@
+//**************************************************************************************************
+//
+//                                            OSSIM
+//
+//       License: MIT. See LICENSE.txt file in the top level directory for more details.
+//
+//**************************************************************************************************
+//  $Id$
+#ifndef ossimDilationFilter_HEADER
+#define ossimDilationFilter_HEADER
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+#include <ossim/base/ossimPolygon.h>
+
+/*!
+ * class ossimDilationFilter
+ *
+ * Allows you to change between a median or mean filter.  You can
+ * also specify a window size which the median or mean is computed and
+ * the center pixel is replaced.
+ *
+ */
+class OSSIM_DLL ossimDilationFilter : public ossimImageSourceFilter
+{
+public:
+   ossimDilationFilter(ossimObject* owner=NULL);
+   virtual void initialize();
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect, ossim_uint32 resLevel=0);
+
+   /**
+    * Size of resampling kernel width & height
+    */
+   void setWindowSize(ossim_uint32 windowSize) { theWindowSize = windowSize; }
+   ossim_uint32 getWindowSize() const          { return theWindowSize; }
+
+   /**
+    * Set if getTile is to be called recursively until all pixels have been assigned non-null.
+    * This is only valid for "fill null" modes.
+    */
+   void setRecursiveFlag(bool flag=true) { theRecursiveFlag = flag; }
+   bool getRecursiveFlag() const         { return theRecursiveFlag; }
+
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
+
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+
+protected:
+   virtual ~ossimDilationFilter();
+   
+   ossimRefPtr<ossimImageData> theTile;
+   ossimRefPtr<ossimImageData> theTempTile; //!> Used for recursion when recursive fill enabled
+   ossim_uint32                theWindowSize;
+   bool                        theRecursiveFlag;
+   ossimPolygon                theValidImagePoly;
+   bool                        theNullFoundFlag;
+
+   template <class T> void doDilation(T scalarType, ossimRefPtr<ossimImageData>& inputData);
+
+   TYPE_DATA
+};
+
+#endif
diff --git a/include/ossim/imaging/ossimDiscrete3x3HatFilter.h b/ossim/include/ossim/imaging/ossimDiscrete3x3HatFilter.h
similarity index 100%
rename from include/ossim/imaging/ossimDiscrete3x3HatFilter.h
rename to ossim/include/ossim/imaging/ossimDiscrete3x3HatFilter.h
diff --git a/include/ossim/imaging/ossimDiscreteConvolutionKernel.h b/ossim/include/ossim/imaging/ossimDiscreteConvolutionKernel.h
similarity index 100%
rename from include/ossim/imaging/ossimDiscreteConvolutionKernel.h
rename to ossim/include/ossim/imaging/ossimDiscreteConvolutionKernel.h
diff --git a/include/ossim/imaging/ossimDiscreteNearestNeighbor.h b/ossim/include/ossim/imaging/ossimDiscreteNearestNeighbor.h
similarity index 100%
rename from include/ossim/imaging/ossimDiscreteNearestNeighbor.h
rename to ossim/include/ossim/imaging/ossimDiscreteNearestNeighbor.h
diff --git a/ossim/include/ossim/imaging/ossimDoqqTileSource.h b/ossim/include/ossim/imaging/ossimDoqqTileSource.h
new file mode 100644
index 0000000..42c563e
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimDoqqTileSource.h
@@ -0,0 +1,59 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimDoqqTileSource.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimDoqqTileSource_HEADER
+#define ossimDoqqTileSource_HEADER
+#include <ossim/imaging/ossimGeneralRasterTileSource.h>
+#include <ossim/support_data/ossimDoqq.h>
+
+class OSSIM_DLL ossimDoqqTileSource: public ossimGeneralRasterTileSource
+{
+public:
+   ossimDoqqTileSource();
+   
+   ossimString getShortName()const;
+   ossimString getLongName()const;
+   
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix = NULL);
+   
+   //! Returns the image geometry object associated with this tile source or NULL if non defined.
+   //! The geometry contains full-to-local image transform as well as projection (image-to-world)
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+
+   bool open(const ossimFilename& filename);
+   bool open(const ossimGeneralRasterInfo& info);
+
+   ossimString acqdate() const;
+	
+   /**
+    * @brief Gets a property for matching name.
+    * @param name The name of the property to get.
+    * @return Returns property matching "name".
+    */
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   
+   /**
+    * @brief Gets a list of property names available.
+    * @param propertyNames The list to push back names to.
+    */
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+	
+protected:
+   virtual ~ossimDoqqTileSource();
+  ossimRefPtr<ossimDoqq>   theHeaderInformation;
+  ossimString  theAcqDate;
+   
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimDtedTileSource.h b/ossim/include/ossim/imaging/ossimDtedTileSource.h
new file mode 100644
index 0000000..6b09e1e
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimDtedTileSource.h
@@ -0,0 +1,260 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: David Burken
+//
+// Description:
+//
+// Contains class declaration of ossimDtedTileSource.  The ossimDtedTileSource
+// class is derived from ossimImageHandler and is intended to be an image
+// handler for DTED files.
+//
+//********************************************************************
+// $Id: ossimDtedTileSource.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimDtedTileSource_HEADER
+#define ossimDtedTileSource_HEADER
+
+#include <fstream>
+
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/support_data/ossimDtedVol.h>
+#include <ossim/support_data/ossimDtedHdr.h>
+#include <ossim/support_data/ossimDtedUhl.h>
+#include <ossim/support_data/ossimDtedDsi.h>
+#include <ossim/support_data/ossimDtedAcc.h>
+
+class ossimImageData;
+
+class OSSIM_DLL ossimDtedTileSource : public ossimImageHandler
+{
+public:
+      
+   ossimDtedTileSource();
+
+   enum
+   {
+      DATA_RECORD_OFFSET_TO_POST = 8,  // bytes
+      DATA_RECORD_CHECKSUM_SIZE  = 4,  // bytes
+      POST_SIZE                  = 2,  // bytes
+      NULL_PIXEL                 = -32767
+   };
+   
+   virtual ossimString getShortName()const;
+   virtual ossimString getLongName()const;
+
+   /**
+    *  Returns true if "theImageFile" can be opened and is a valid adrg file.
+    */
+   virtual bool open();
+   virtual void close();
+
+   virtual ossimRefPtr<ossimImageData> getTile(const  ossimIrect& tile_rect,
+                                               ossim_uint32 resLevel=0);
+   
+  /**
+   * Method to get a tile.   
+   *
+   * @param result The tile to stuff.  Note The requested rectangle in full
+   * image space and bands should be set in the result tile prior to
+   * passing.  It will be an error if:
+   * result.getNumberOfBands() != this->getNumberOfOutputBands()
+   *
+   * @return true on success false on error.  If return is false, result
+   *  is undefined so caller should handle appropriately with makeBlank or
+   * whatever.
+   */
+  virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);
+  
+   /**
+    *  Returns the number of bands in the image.
+    *  Satisfies pure virtual requirement from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfInputBands() const;
+   
+   virtual ossim_uint32 getNumberOfOutputBands()const;
+   
+   /**
+    *  Returns the number of lines in the image.
+    *  Satisfies pure virtual requirement from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfLines(
+      ossim_uint32 reduced_res_level = 0) const;
+   
+   /**
+    *  Returns the number of samples in the image.  
+    *  Satisfies pure virtual requirement from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfSamples(
+      ossim_uint32 reduced_res_level = 0) const;
+
+   virtual double getNullPixelValue(ossim_uint32 band=0)const;
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+
+   /**
+    * Returns the zero based image rectangle for the reduced resolution data
+    * set (rrds) passed in.  Note that rrds 0 is the highest resolution rrds.
+    */
+   virtual ossimIrect getImageRectangle(
+      ossim_uint32 reduced_res_level = 0) const;
+   
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+   
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+   //! Returns the image geometry object associated with this tile source or NULL if not defined.
+   //! The geometry contains full-to-local image transform as well as projection (image-to-world)
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+   
+   /**
+    * Returns the output pixel type of the tile source.
+    */
+   virtual ossimScalarType getOutputScalarType() const;
+
+   /**
+    * Returns the width of the output tile.
+    */
+   virtual ossim_uint32 getTileWidth() const;
+
+   /**
+    * Returns the height of the output tile.
+    */
+   virtual ossim_uint32 getTileHeight() const;
+
+   /**
+    * Returns the tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileWidth which
+    * returns the output tile width which can be different than the internal
+    * image tile width on disk.
+    */
+   virtual ossim_uint32 getImageTileWidth() const;
+
+   /**
+    * Returns the tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileWidth which
+    * returns the output tile width which can be different than the internal
+    * image tile width on disk.
+    */
+   virtual ossim_uint32 getImageTileHeight() const;
+
+   virtual bool isOpen()const;
+
+   /**
+    * Initializes spacing to the post spacing of the cell.
+    *
+    * @param postSpacing ossimDpt to initialize with spacing where
+    * postspacing.x = longitude interval and postspacing.y = latitude interval.
+    */
+   void getPostSpacing(ossimDpt& postSpacing) const;
+
+   /**
+    * @brief Gets a property for name.
+    * @param name Property name to get.
+    * @return ossimRefPtr<ossimProperty> Note that this can be empty if
+    * property for name was not found.
+    */
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   /**
+    * @brief Adds this class's properties to list.
+    * @param propertyNames list to append to.
+    */
+   virtual void getPropertyNames(
+      std::vector<ossimString>& propertyNames)const;
+
+   /**
+    * @brief Sets the min/max.
+    *
+    * looks for an omd or statistics file for min/max.  If not found
+    * calls gatherStatistics method.  Overrides ossimImageHandler::loadMetaData
+    * called by completeOpen.
+    */
+   virtual void loadMetaData();  
+   
+protected:
+   virtual ~ossimDtedTileSource();
+
+   // Disallow operator= and copy constrution...
+   const ossimDtedTileSource& operator=(const  ossimDtedTileSource& rhs);
+   ossimDtedTileSource(const ossimDtedTileSource&);
+
+   /**
+    * Allocated the tiles.
+    */
+   void allocate();
+
+   /**
+    *  Returns true on success, false on error.
+    */
+   bool fillBuffer(const ossimIrect& tile_rect,
+                   const ossimIrect& clip_rect,
+                   ossimImageData* tile);
+
+   
+   /**
+    * @brief Scans for min and max.
+    * @param writeStatsFile If true and statistics file does not exists it
+    * will write one; else, no file will be written.
+    */
+   void gatherStatistics(bool writeStatsFile);
+   
+   ossim_sint16 convertSignedMagnitude(ossim_uint16& s) const;
+   
+   ossimRefPtr<ossimImageData> theTile;
+   mutable std::ifstream      theFileStr;
+   ossim_uint32               theTileWidth;
+   ossim_uint32               theTileHeight;   
+   ossim_uint32               theNumberOfLines;
+   ossim_uint32               theNumberOfSamps;
+   ossim_uint32               theOffsetToFirstDataRecord;
+   ossim_uint32               theDataRecordSize;
+   ossim_sint16               theMinHeight;
+   ossim_sint16               theMaxHeight;
+   ossimDpt                   thePostSpacing;
+   
+   ossimDtedVol m_vol;
+   ossimDtedHdr m_hdr;
+   ossimDtedUhl m_uhl;
+   ossimDtedDsi m_dsi;
+   ossimDtedAcc m_acc;
+   /**
+    *  DTED data is always stored as BIG_ENDIAN.  This flag indicates that
+    *  byte swapping is needed (LITTLE_ENDIAN machine).
+    */
+   bool  theSwapBytesFlag;    
+
+TYPE_DATA
+};
+
+inline ossim_sint16 ossimDtedTileSource::convertSignedMagnitude(ossim_uint16& s) const
+{
+   // DATA_VALUE_MASK 0x7fff = 0111 1111 1111 1111
+   // DATA_SIGN_MASK  0x8000 = 1000 0000 0000 0000
+   
+   // First check to see if the bytes need swapped.
+   s = (theSwapBytesFlag ? ( ((s&0x00ff) << 8) | ((s&0xff00) >> 8) ) : s);
+
+   // If the sign bit is set, mask it out then multiply by negative one.
+   if (s & 0x8000)
+   {
+      return (static_cast<ossim_sint16>(s & 0x7fff) * -1);
+   }
+   
+   return static_cast<ossim_sint16>(s);
+}
+
+#endif
+
diff --git a/include/ossim/imaging/ossimERSFileWriter.h b/ossim/include/ossim/imaging/ossimERSFileWriter.h
similarity index 100%
rename from include/ossim/imaging/ossimERSFileWriter.h
rename to ossim/include/ossim/imaging/ossimERSFileWriter.h
diff --git a/ossim/include/ossim/imaging/ossimERSTileSource.h b/ossim/include/ossim/imaging/ossimERSTileSource.h
new file mode 100644
index 0000000..17d2585
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimERSTileSource.h
@@ -0,0 +1,57 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Chong-Ket Chuah
+//
+// Description:
+//
+// Contains class definition for the class "ossimERSTileSource".
+//
+//*******************************************************************
+//  $Id: ossimERSTileSource.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimERSTileSource_HEADER
+#define ossimERSTileSource_HEADER
+
+#include <ossim/imaging/ossimGeneralRasterTileSource.h>
+#include <ossim/support_data/ossimERS.h>
+
+
+class OSSIM_DLL ossimERSTileSource : public ossimGeneralRasterTileSource
+{
+public:
+   ossimERSTileSource();
+
+   ossimERSTileSource(const ossimKeywordlist& kwl, const char* prefix=0);
+   
+
+   virtual ossimString getShortName() const;
+   virtual ossimString getLongName() const;
+   virtual ossimString className() const;
+
+   virtual bool open(const ossimFilename& filename);
+  
+   //! Returns the image geometry object associated with this tile source or NULL if not defined.
+   //! The geometry contains full-to-local image transform as well as projection (image-to-world)
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix = NULL);
+protected:
+   virtual ~ossimERSTileSource();
+
+private:
+
+   void openHeader(const ossimFilename& file);
+   
+   ossimERS* theHdr;
+
+   TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/imaging/ossimEastingNorthingCutter.h b/ossim/include/ossim/imaging/ossimEastingNorthingCutter.h
similarity index 100%
rename from include/ossim/imaging/ossimEastingNorthingCutter.h
rename to ossim/include/ossim/imaging/ossimEastingNorthingCutter.h
diff --git a/ossim/include/ossim/imaging/ossimEdgeFilter.h b/ossim/include/ossim/imaging/ossimEdgeFilter.h
new file mode 100644
index 0000000..97de63c
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimEdgeFilter.h
@@ -0,0 +1,84 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimEdgeFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimEdgeFilter_HEADER
+#define ossimEdgeFilter_HEADER
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+/**
+ * class ossimEdgeFilter
+ *
+ * This has default implementation for the certain filter types.  For the
+ * different filter type please see method setFilterType.
+ *
+ *
+ */
+class ossimEdgeFilter : public ossimImageSourceFilter
+{
+public:
+   ossimEdgeFilter(ossimObject* owner=NULL);
+   ossimEdgeFilter(ossimImageSource* inputSource);
+   ossimEdgeFilter(ossimObject* owner,
+                    ossimImageSource* inputSource);
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
+                                               ossim_uint32 resLevel=0);
+   virtual void initialize();
+   virtual void getFilterTypeNames(std::vector<ossimString>& filterNames)const;
+   virtual ossimString getFilterType()const;
+   /**
+    * The filter type can be one of the following strings.  It is
+    * case insensitive for the compares.
+    *
+    *  Sobel
+    *  Laplacian
+    *  Prewitt
+    *  
+    */
+   virtual void setFilterType(const ossimString& filterType);
+
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+   virtual bool saveState(ossimKeywordlist& kwl,const char* prefix=0)const;
+   virtual bool loadState(const ossimKeywordlist& kwl,const char* prefix=0);
+   
+protected:
+   ossimRefPtr<ossimImageData> theTile;
+   ossimString                 theFilterType;
+   
+   void adjustRequestRect(ossimIrect& requestRect)const;
+   
+   template <class T>
+   void runFilter(T dummyVariable,
+                  ossimRefPtr<ossimImageData> inputData);
+   template <class T>
+   void runSobelFilter(T dummyVariable,
+                       ossimRefPtr<ossimImageData> inputData);
+   template <class T>
+   void runPrewittFilter(T dummyVariable,
+                         ossimRefPtr<ossimImageData> inputData);
+   template <class T>
+   void runLaplacianFilter(T dummyVariable,
+                           ossimRefPtr<ossimImageData> inputData);
+   template <class T>
+   void runRobertsFilter(T dummyVariable,
+                           ossimRefPtr<ossimImageData> inputData);
+   template <class T>
+   void runLocalMax8Filter(T dummyVariable,
+                          ossimRefPtr<ossimImageData> inputData);
+   
+TYPE_DATA
+};
+
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimElevImageSource.h b/ossim/include/ossim/imaging/ossimElevImageSource.h
new file mode 100644
index 0000000..f99767e
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimElevImageSource.h
@@ -0,0 +1,147 @@
+//*******************************************************************
+// Copyright (C) 2002 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+// 
+// Description:  Class provides an elevation image source from the elevation
+// manager.
+//
+//********************************************************************
+// $Id: ossimElevImageSource.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimElevImageSource_HEADER
+#define ossimElevImageSource_HEADER
+
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimGrect.h>
+
+class ossimElevSource;
+
+class ossimElevImageSource : public ossimImageSource
+{
+public:
+
+   ossimElevImageSource();
+   ossimElevImageSource(ossimObject* owner);
+   ossimElevImageSource(ossimObject* owner,
+                        const ossimGpt& tie,
+                        double latSpacing,  // decimal degrees
+                        double lonSpacing ,
+                        ossim_uint32 numberLines,
+                        ossim_uint32 numberSamples);
+   ossimElevImageSource(ossimObject* owner,
+                        const ossimKeywordlist& kwl,
+                        const char* prefix=0);
+   
+
+   /*!
+    *  Returns a pointer to a tile given an origin representing the upper left
+    *  corner of the tile to grab from the image.
+    *  Satisfies pure virtual from TileSource class.
+    */
+   virtual ossimRefPtr<ossimImageData> getTile(const  ossimIrect& rect,
+                                   ossim_uint32 resLevel=0);
+
+   /*!
+    *  Populates the keyword list with image geometry information.  This
+    *  method is used to relay projection/model information to users.
+    *  Returns true if geometry info is present, false if not.
+    */
+   virtual bool getImageGeometry(ossimKeywordlist& kwl,
+                                 const char* prefix=0);
+   
+   /*!
+    *  Returns the number of bands in the image.  Alway one for this source.
+    */
+   virtual ossim_uint32 getNumberOfOutputBands()const { return 1; }
+
+
+   /*!
+    * Returns the zero-based (relative) image rectangle for the reduced
+    * resolution data set (rrds) passed in.  Note that rrds 0 is the highest
+    * resolution rrds.
+    */
+   virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level = 0) const; 
+
+   /*!
+    * Returns the absolute bounding rectangle of the image. The upper left
+    * corner may be non-zero if this is a subimage.
+    */
+   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel = 0) const
+      {
+         return getImageRectangle(resLevel);
+      }
+   
+   /*!
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+   /*!
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   bool canConnectMyInputTo(ossim_int32 /* inputIndex */,
+                            const ossimConnectableObject* /* object */ )const
+   {      
+      return false;
+   }
+      
+   virtual void initialize();
+
+   /*!
+    *  Satisfy pure virtuals from base classes...
+    */
+   virtual void getDecimationFactor(ossim_uint32 resLevel, ossimDpt& result) const;
+   virtual void getDecimationFactors(vector<ossimDpt>& decimations) const;
+   virtual ossim_uint32 getNumberOfDecimationLevels()const;
+   virtual ossim_uint32 getNumberOfInputBands() const;
+   virtual ossimScalarType getOutputScalarType() const;
+   virtual ossim_uint32 getTileWidth() const;
+   virtual ossim_uint32 getTileHeight() const;
+   virtual void changeTileSize(const ossimIpt& size);
+
+   // access methods
+   virtual ossimGpt getTiePoint()         const { return theTiePoint; }
+   virtual ossim_float64 getLatitudeSpacing()  const { return theLatSpacing; }
+   virtual ossim_float64 getLongitudeSpacing() const { return theLonSpacing; }
+   virtual ossim_uint32  getNumberOfLines(ossim_uint32 reduced_res_level = 0) const;
+   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level = 0) const;
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+   
+   // set methods
+   virtual void setTiePoint(const ossimGpt& gpt) { theTiePoint = gpt; }
+   virtual void setLatitudeSpacing(ossim_float64 sp) { theLatSpacing = sp; }
+   virtual void setLongitudeSpacing(ossim_float64 sp) { theLonSpacing = sp; }
+   virtual void setNumberOfLines(ossim_uint32 lines) { theNumberOfLines = lines; }
+   virtual void setNumberOfSamples(ossim_uint32 samps) { theNumberOfSamps = samps;}
+   virtual void setMinPixelValue(ossim_float64 min_pix);
+   virtual void setMaxPixelValue(ossim_float64 max_pix);
+   
+protected:
+   virtual ~ossimElevImageSource();
+
+   ossimElevSource*            theElevManager;
+   ossimRefPtr<ossimImageData> theTile;
+   ossimGpt                    theTiePoint;      // upper left tie point
+   ossim_float64               theLatSpacing;    // in decimal degrees
+   ossim_float64               theLonSpacing;    // in decimal degrees
+   ossim_uint32                theNumberOfLines;
+   ossim_uint32                theNumberOfSamps;
+   
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimEnviHeaderFileWriter.h b/ossim/include/ossim/imaging/ossimEnviHeaderFileWriter.h
new file mode 100644
index 0000000..415f31a
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimEnviHeaderFileWriter.h
@@ -0,0 +1,79 @@
+//----------------------------------------------------------------------------
+// Copyright (c) 2005, David Burken, all rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+// 
+// Class declaration for ossimEnviHeaderFileWriter.  Meta data class for
+// writing an ENVI (The Environment for Visualizing Images) header file.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimEnviHeaderFileWriter.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimEnviHeaderFileWriter_H
+#define ossimEnviHeaderFileWriter_H
+
+#include <fstream>
+#include <ossim/imaging/ossimMetadataFileWriter.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/support_data/ossimEnviHeader.h>
+
+/**
+ * Class for writing a "ENVI" style header.
+ */
+class OSSIMDLLEXPORT ossimEnviHeaderFileWriter : public ossimMetadataFileWriter
+{
+public:
+
+   /** default constructor */
+   ossimEnviHeaderFileWriter();
+
+
+   /**
+    * Initializes the state of the writer.  Users should use this to set
+    * the envi header fields that are not taken from theInputConnection prior
+    * to calling execute.
+    *
+    * @return true on success, false on failure.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix = 0);
+
+   /**
+    * Satisfies pure virtual from ossimMetadataWriter base.
+    *
+    * Appends the writers image types to the "metadatatypeList".
+    * 
+    * @param metadatatypeList stl::vector<ossimString> list to append to.
+    *
+    * @note Appends to the list, does not clear it first.
+    */
+   virtual void getMetadatatypeList(
+      std::vector<ossimString>& metadatatypeList) const;
+
+   /**
+    * Satisfies pure virtual from ossimMetadataWriter base.
+    *
+    * @param imageType string representing image type.
+    *
+    * @return true if "metadataType" is supported by writer.
+    */
+   virtual bool hasMetadataType(const ossimString& metadataType)const;   
+protected:
+   /** virtual destructor */
+   virtual ~ossimEnviHeaderFileWriter();
+
+private:
+   
+   virtual bool writeFile();
+
+   ossimEnviHeader theHdr;
+   
+TYPE_DATA
+};
+#endif /* End of #ifndef ossimEnviHeaderFileWriter_H */
+
diff --git a/ossim/include/ossim/imaging/ossimEnviTileSource.h b/ossim/include/ossim/imaging/ossimEnviTileSource.h
new file mode 100644
index 0000000..5bef61f
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimEnviTileSource.h
@@ -0,0 +1,102 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+// 
+// Image handler class for a raster files with an ENVI header file.
+//
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimEnviTileSource_HEADER
+#define ossimEnviTileSource_HEADER 1
+
+#include <ossim/imaging/ossimGeneralRasterTileSource.h>
+#include <ossim/support_data/ossimEnviHeader.h>
+
+
+class OSSIMDLLEXPORT ossimEnviTileSource : public ossimGeneralRasterTileSource
+{
+public:
+
+   /** @brief default constructor */
+   ossimEnviTileSource();
+
+   /** @return "ENVI" */
+   virtual ossimString getShortName() const;
+
+   /** @return "ENVI reader" */
+   virtual ossimString getLongName()  const;
+
+   /** @brief open method. */
+   virtual bool open();
+
+   /**
+    * @return The image geometry object associated with this tile source or
+    * NULL if not defined.  The geometry contains full-to-local image transform
+    * as well as projection (image-to-world).
+    */
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+
+   /**
+    * Method to save the state of an object to a keyword list.
+    * @return true on success, false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.
+    *
+    * @return true on success, false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix = NULL);
+
+   /**
+    * @brief Gets a property.
+    * @param The name of the property to get.
+    * @return The property if found.
+    */
+   virtual ossimRefPtr<ossimProperty> getProperty(
+      const ossimString& name)const;
+
+   /**
+    * @brief Adds property names to array.
+    * @param propertyNames Array to populate with property names.
+    */
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+protected:
+   
+   /** @brief Hidden from use destructor.  This is a ref ptr. */
+   virtual ~ossimEnviTileSource();
+
+private:
+
+   /**
+    * @brief Sets default output band list if we are a band selector and
+    * "default bands" is found in the header file.
+    */
+   void setDefaultBandList();
+
+   /**
+    * @brief Creates geometry from known support data, i.e. envi header,
+    * and so on if found.
+    */
+   ossimRefPtr<ossimImageGeometry> getInternalImageGeometry() const;
+   
+   ossimEnviHeader m_enviHdr;
+   
+TYPE_DATA
+   
+}; // End: class ossimEnviTileSource
+
+#endif /* #ifndef ossimEnviTileSource_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimEquationCombiner.h b/ossim/include/ossim/imaging/ossimEquationCombiner.h
new file mode 100644
index 0000000..8743e72
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimEquationCombiner.h
@@ -0,0 +1,324 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimEquationCombiner.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimEquationCombiner_HEADER
+#define ossimEquationCombiner_HEADER
+#include <ossim/imaging/ossimImageCombiner.h>
+#include <ossim/imaging/ossimCastTileSourceFilter.h>
+#include <ossim/base/ossimEquTokenizer.h>
+#include <stack>
+
+//class ossimCastTileSourceFilter;
+
+/**
+ * Will combine the input data based on a supplied equation.
+ *
+ * This combiner uses the ossimEquTokenizer to create unique id's
+ * for all tokens in the formula.  The parser is based on the following
+ * rules:
+ *
+ * <pre>
+ * 
+ * Prog -> Expr EOF 
+ * Expr -> Term RestExpr 
+ * RestExpr -> + Term RestExpr | - Term RestExpr | <null> 
+ * Term -> Storable RestTerm 
+ * RestTerm -> * Factor RestTerm | / Factor RestTerm | <null> 
+ * Factor -> number | R | ( Expr )
+ *
+ *
+ * The equation string represents input images as in[i] for i = 0, 1, ..., n.
+ * The following tokens are supported, where I, I1, I2, ..., In are inputs (either input images or
+ * image solutions of other equations):
+ *
+ * sin(I)                 takes the sine of the input
+ * sind(I)                takes the sin of the input and assumes degree input
+ * asin(I)                computes the arc-sine of input in radians (input must be normalized)
+ * asind(I)               computes the arc-sine of input in degrees (input must be normalized)
+ * cos(I)                 takes cosine of input
+ * cosd(I)                takes the cosine of input and assumes input in degrees
+ * acos(I)                computes the arc-cosine of input in radians (input must be normalized)
+ * acosd(I)               computes the arc-cosine of input in degrees (input must be normalized)
+ * tan(I)                 takes tangent of input
+ * tand(I)                takes the tangent of input and assumes input in degrees
+ * atan(I)                computes the arc-tangent of input in radians
+ * atand(I)               computes the arc-tangent of input in degrees
+ * sqrt(I)                takes square root of input
+ * log(I)                 takes the natural log of input
+ * log10(I)               takes the log base 10 of the input
+ * exp(I)                 takes the e raised to the passed in argument
+ * abs(I)                 takes the absolute value of the passed in value
+ * min(I1, I2, ... In)    takes the min of all values in the list
+ * max(I1, I2, ... In)    takes the max of all values in the list.
+ *
+ * clamp(I, min, max)     will clamp all data to be between the min max values.
+ *                        will set anything less than min to min and anythin
+ *                        larger than max to max
+ *
+ * band(I, band_index)    returns a single band image object
+ *                        by selecting band num from input image x.  Note
+ *                        the first argument must be an image
+ *                        and the second argument must be a number
+ *
+ * shift(I, rows, cols)
+ *                        currently, the first argument must be an image
+ *                        variable and rows, cols must be numbers
+ *                        indicating the delta in that direction to shift the
+ *                        input.
+ *
+ * blurr(I, rows, cols)   Will blurr the input image I with a
+ *                        rows-by-cols kernel.  All values are equal
+ *                        weight.  Note the fist argument must by an image
+ *                        variable (ex: i1, i2,....in).
+ *
+ * conv(index, rows, cols, <row ordered list of values> )
+ *                        this allows you to define an arbitrary matrix.  The
+ *                        <row ordered list of values> is a comma separated
+ *                        list of constant values.
+ *
+ * assign_band(I1, num1, I2, num2)
+ *                        will take band num2 from image data I2 and assign it to
+ *                        band num1 in image data I1.
+ *
+ * assign_band(I1, num1, I2)
+ *                        will take band 1 from image data I2 and assign it to
+ *                        band num1 in image data I1.
+ *
+ * assign_band(I, num1, num2)
+ *                        will assin to band num1 of data I the value of num2
+ *
+ * I1 * I2                will multiply I1 and I2
+ * I1 + I2                will add I1 and I2
+ * I1 - I2                will subtract I1 and I2
+ * I1 / I2                will divide I1 and I2
+ * I1 ^ I2                will do a power, raises I1 to I2
+ * I1 | I2                will do a bitwise or operation
+ *                        ( will do it in unisgned char precision)
+ *
+ * I1 & I2                will do a bitwise and operation
+ *                        ( will do it in unsigned char precision)
+ *
+ * ~I1                    will do the ones complement of the input
+ *
+ * I1 xor I2              will do an exclusive or operation
+ *                        (will do it in unsigned char precision)
+ *
+ * - I1                   will negative of I1
+ *
+ * Boolean ops: 1=true, 0=false
+ * I1 > I2
+ * I1 >= I2
+ * I1 == I2
+ * I1 <= I2
+ * I1 < I2
+ * I1 <> I2
+ *
+ * Note:
+ *
+ * Currently an image input is reference by the variable "in[i]" where i
+ * represents the input image index starting from 0.  So in[1] referes to the second image
+ * in the input source list.
+ *
+ * Some examples:
+ *
+ *  (in[0] + in[1])/2
+ *  Will take image 0 and add it to image 1 and average them.
+ *
+ *  exp(sqrt(in[0])/4)
+ *  Will take the root of the image and divide by 4 and then raise e to that
+ *  amount.
+ *
+ *  128
+ *  Will return a constant value of 128 for all input bands.
+ *
+ * shift(0, 1, 1) - in[0]
+ * Will shift the first input (0) by 1 pixel along the diagonal and then subtract
+ * the original from the shifted (edge detect).
+ *
+ * assign_band(in[1], 1, blurr(in[1], 5, 5), 2)
+ * Will assign to the first band of input 1 the 2nd band of the 5x5 blurr of same image.
+ *
+ * conv(0, 3, 3, -1, -2, -1, 0, 0, 0, 1, 2, 1)
+ * Will convolve the first input connection with a 3x3 matrix.
+ * The args are row ordered:
+ *                          -1, -2, -1
+ *                           0,  0,  0
+ *                           1,  2,  1
+ *
+ * NDVI:
+ * N=(in[0]-in[1])/(in[0]+in[1])
+ *
+ * For indexed-type values,like NDVI, (with limited values) it is better
+ * to rescale between 0.0 and 1.0 and use type NormalizedFloat.
+ * 
+ * Rescaled NDVI between 0 and 1:
+ * (N+1)/2 = in[0]/(in[0]+in[1])
+ * 
+ * With an ossimImageToPlaneNormalFilter feeding the DEM-image input, the slope at each pixel,
+ * normalized so that 1.0 = 90 deg from vertical, is computed with:
+ * "acosd(band(in[0],2))/90"
+ *
+ * </pre>
+ */
+class OSSIMDLLEXPORT ossimEquationCombiner : public ossimImageCombiner
+{
+public:
+   ossimEquationCombiner();
+   ossimEquationCombiner(ossimConnectableObject::ConnectableObjectList& inputSources);
+
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
+                                               ossim_uint32 resLevel=0);
+   
+   virtual void initialize();
+
+   virtual void setEquation(const ossimString& equ)
+      {
+         theEquation = equ;
+      }
+   virtual ossimString getEquation()const
+      {
+         return theEquation;
+      }
+   
+   virtual double getNullPixelValue(ossim_uint32 band=0)const;
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+   virtual ossimScalarType getOutputScalarType() const;
+
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   
+   
+   virtual void setOutputScalarType(ossimScalarType scalarType);
+   /*!
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+   /*!
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+   class ossimBinaryOp
+   {
+   public:
+      virtual ~ossimBinaryOp(){}
+      virtual double apply(double v1, double v2)const=0;
+   };
+   class ossimUnaryOp
+   {
+   public:
+      virtual ~ossimUnaryOp(){}
+      virtual double apply(double v)const=0;
+   };
+   
+protected:
+   enum ossimEquValueType
+   {
+      OSSIM_EQU_TYPE_UNKNOWN    = 0,
+      OSSIM_EQU_DOUBLE_TYPE     = 1,
+      OSSIM_EQU_IMAGE_DATA_TYPE = 2
+   };
+   
+   union ossimEquDataType
+   {
+      double           doubleValue;
+      ossimImageData* imageDataValue;
+   };
+   
+   struct ossimEquValue
+   {
+      int              type;
+      ossimEquDataType d;
+   };
+
+   virtual ~ossimEquationCombiner();
+   
+   
+   ossimScalarType             theOutputScalarType;
+   ossimString                 theEquation;
+   mutable ossimEquTokenizer  *theLexer;
+   ossimRefPtr<ossimImageData> theTile;
+   ossimRefPtr<ossimCastTileSourceFilter>  theCastFilter;
+   ossimRefPtr<ossimCastTileSourceFilter> theCastOutputFilter;
+   
+   mutable int                theCurrentId;
+   mutable std::stack<ossimEquValue> theValueStack;
+   ossim_uint32                     theCurrentResLevel;
+   virtual void assignValue();
+   virtual void clearStacks();
+   virtual void clearArgList(vector<ossimEquValue>& argList);
+
+   virtual ossimRefPtr<ossimImageData> getImageData(ossim_uint32 index);
+   virtual ossimRefPtr<ossimImageData> getNewImageData(ossim_uint32 index);
+
+   virtual void deleteArgList(vector<ossimEquValue>& args);
+   virtual bool parseArgList(vector<ossimEquValue>& args,
+                             bool popValueStack = true);
+   
+   virtual ossimRefPtr<ossimImageData> parseEquation();
+  
+   virtual bool parseAssignBand();
+   virtual bool parseExpression();
+   virtual bool parseRestOfExp();
+   virtual bool parseTerm();
+   virtual bool parseRestOfTerm();
+   virtual bool parseFactor();
+   virtual bool parseStdFuncs();
+   virtual bool parseUnaryFactor();
+
+   virtual bool applyClamp(ossimImageData* &result,
+                           const vector<ossimEquValue>& argList);
+                           
+   virtual bool applyConvolution(ossimImageData* &result,
+                                 const vector<ossimEquValue>& argList);
+   
+   virtual bool applyBlurr(ossimImageData* &result,
+                           const vector<ossimEquValue>& argList);
+   
+   virtual bool applyShift(ossimImageData* &result,
+                           const vector<ossimEquValue>& argList);
+   
+   virtual bool applyOp(const ossimBinaryOp& op,
+                        ossimEquValue& result,
+                        ossimEquValue& v1,
+                        ossimEquValue& v2);
+   
+   virtual bool applyOp(const ossimBinaryOp& op,
+                        ossimImageData* v1,
+                        double          v2);
+
+   virtual bool applyOp(const ossimBinaryOp& op,
+                        double          v1,
+                        ossimImageData* v2);
+
+   virtual bool applyOp(const ossimBinaryOp& op,
+                        ossimImageData* v1,
+                        ossimImageData* v2);      
+
+   
+   virtual bool applyOp(const ossimUnaryOp& op,
+                        ossimEquValue& result,
+                        ossimEquValue& v1);
+   
+   virtual bool applyOp(const ossimUnaryOp& op,
+                        ossimImageData* v);
+   
+TYPE_DATA
+};
+#endif
+
diff --git a/include/ossim/imaging/ossimEsriShapeFileInterface.h b/ossim/include/ossim/imaging/ossimEsriShapeFileInterface.h
similarity index 100%
rename from include/ossim/imaging/ossimEsriShapeFileInterface.h
rename to ossim/include/ossim/imaging/ossimEsriShapeFileInterface.h
diff --git a/ossim/include/ossim/imaging/ossimFeatherMosaic.h b/ossim/include/ossim/imaging/ossimFeatherMosaic.h
new file mode 100644
index 0000000..1cd5218
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimFeatherMosaic.h
@@ -0,0 +1,88 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimFeatherMosaic.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimFeatherMosaic_HEADER
+#define ossimFeatherMosaic_HEADER
+#include <vector>
+#include <iterator>
+
+#include <ossim/imaging/ossimImageMosaic.h>
+#include <ossim/base/ossimDpt.h>
+
+
+/**
+ * Performs a spatial blend accross overlapping regions
+ */
+class OSSIMDLLEXPORT ossimFeatherMosaic : public ossimImageMosaic
+{
+public:
+   ossimFeatherMosaic();
+   ossimFeatherMosaic(ossimConnectableObject::ConnectableObjectList& inputSources);
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
+                                   ossim_uint32 resLevel=0);
+   virtual void initialize();
+       
+protected:
+   virtual ~ossimFeatherMosaic();
+   /**
+    * This is only visible by this class and will remain here
+    * unless we want to move it later.
+    */
+   class ossimFeatherInputInformation
+   {
+      
+   public:
+      ossimFeatherInputInformation(const vector<ossimIpt>& validVertices=vector<ossimIpt>());
+
+      void setVertexList(const vector<ossimIpt>& validVertices);
+      
+      ossimDpt        theCenter;
+      ossimDpt        theAxis1;
+      ossimDpt        theAxis2;
+      double          theAxis1Length;
+      double          theAxis2Length;
+      std::vector<ossimIpt> theValidVertices;
+      
+   };
+
+   friend ostream& operator<<(ostream& out,
+                              const ossimFeatherInputInformation& data);
+   
+
+   /**
+    * will hold an array of input information
+    *
+    */
+   ossimFeatherInputInformation* theInputFeatherInformation;
+   ossimRefPtr<ossimImageData> theAlphaSum;
+   ossimRefPtr<ossimImageData> theResult;
+   
+   /**
+    * Will hold the count for the feather information list.
+    */
+   long                          theFeatherInfoSize;
+
+   /**
+    * The dummy variable is used for the template type.  See the getTile
+    * method for the call.
+    */
+   template <class T>
+   ossimRefPtr<ossimImageData> combine(T dummyVariableNotUsed,
+                                       const ossimIrect& tileRect,
+                                       ossim_uint32 resLevel);
+   
+   virtual double computeWeight(long index,
+                                const ossimDpt& point)const;
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimFeatherMosaic_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimFftFilter.h b/ossim/include/ossim/imaging/ossimFftFilter.h
new file mode 100644
index 0000000..849d2a0
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimFftFilter.h
@@ -0,0 +1,87 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimFftFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimFftFilter_HEADER
+#define ossimFftFilter_HEADER
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+class ossimScalarRemapper;
+
+class ossimFftFilter : public ossimImageSourceFilter
+{
+public:
+   enum ossimFftFilterDirectionType
+      {
+         ossimFftFilterDirectionType_FORWARD = 0,
+         ossimFftFilterDirectionType_INVERSE
+      };
+   ossimFftFilter(ossimObject* owner=NULL);
+   ossimFftFilter(ossimImageSource* inputSource);
+   ossimFftFilter(ossimObject* owner,
+                  ossimImageSource* inputSource);
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
+                                   ossim_uint32 resLevel=0);
+   virtual void initialize();
+   virtual ossim_uint32 getNumberOfOutputBands() const;
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+  /*!
+   * Returns the max pixel of the band.
+   */
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+  /*!
+   * Each band has a null pixel associated with it.  The null pixel 
+   * represents an invalid value.
+   */ 
+   virtual double getNullPixelValue(ossim_uint32 band=0)const;
+   
+   virtual ossimScalarType getOutputScalarType() const;
+   
+   void setForward();
+   void setInverse();
+   ossimString getDirectionTypeAsString()const;
+   void setDirectionType(const ossimString& directionType);
+   void setDirectionType(ossimFftFilterDirectionType directionType);
+      
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix = 0);
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix = 0)const;
+protected:
+   virtual ~ossimFftFilter();
+   ossimRefPtr<ossimImageData> theTile;
+   ossimFftFilterDirectionType theDirectionType;
+   ossimRefPtr<ossimScalarRemapper>        theScalarRemapper;
+   template <class T>
+   void runFft(T dummy,
+               ossimRefPtr<ossimImageData>& input,
+               ossimRefPtr<ossimImageData>& output);
+
+   template <class T>
+   void fillMatrixForward(T *realPart,
+                          T nullPix,
+                          NEWMAT::Matrix& real,
+                          NEWMAT::Matrix& img)const;
+   template <class T>
+   void fillMatrixInverse(T *realPart,
+                          T *imgPart,
+                          NEWMAT::Matrix& real,
+                          NEWMAT::Matrix& img)const;
+
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimFgdcFileWriter.h b/ossim/include/ossim/imaging/ossimFgdcFileWriter.h
new file mode 100644
index 0000000..c0dce1a
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimFgdcFileWriter.h
@@ -0,0 +1,158 @@
+//----------------------------------------------------------------------------
+// Copyright (c) 2005, David Burken, all rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:  Class to write out meta data in a Federal Geographic Data
+// Committe (FGDC) format.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimFgdcFileWriter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimFgdcFileWriter_HEADER
+#define ossimFgdcFileWriter_HEADER
+
+#include <ossim/imaging/ossimMetadataFileWriter.h>
+#include <ossim/base/ossimXmlNode.h>
+#include <ossim/base/ossimXmlDocument.h>
+
+/**
+ * Class to write out meta data in a Federal Geographic Data
+ * Committe (FGDC) format.
+ */
+class OSSIMDLLEXPORT ossimFgdcFileWriter : public ossimMetadataFileWriter
+{
+public:
+   
+   /** constructor */
+   ossimFgdcFileWriter();
+
+   
+   /**
+    * Method to load the state from a keyword list.
+    *
+    * @param kwl Keyword list to load state from.
+    *
+    * @param prefix Prefix to attatch to keyword (like "object1.").
+    * default=NULL
+    *
+    * @return true if ok or false on error.
+    *
+    * Keywords picked up by this loadState:
+    * 
+    * source_image_filename: foo.ntf
+    * tab_string:            "\t"
+    * fgdc_template_doc:     fgdc_template.xml
+    * 
+    */
+   virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0);
+
+   /**
+    * Satisfies pure virtual from ossimMetadataWriter base.
+    *
+    * Appends the writers image types to the "metadatatypeList".
+    * 
+    * @param metadatatypeList stl::vector<ossimString> list to append to.
+    *
+    * @note Appends to the list, does not clear it first.
+    */
+   virtual void getMetadatatypeList(
+      std::vector<ossimString>& metadatatypeList) const;
+
+   /**
+    * Satisfies pure virtual from ossimMetadataWriter base.
+    *
+    * @param imageType string representing image type.
+    *
+    * @return true if "metadataType" is supported by writer.
+    */
+   virtual bool hasMetadataType(const ossimString& metadataType)const;
+
+   
+   /** @return Returns the current indentation level. */
+   ossim_uint32 getIndentionLevel() const;
+
+   /**
+    * Sets the current indentation level.
+    *
+    * @param level Indentation level.  "0" equals no indentation.
+    */
+   void setIndentionLevel(ossim_uint32 level);
+
+   /**
+    * @return The current tab string e.g.: "\t".
+    */
+   ossimString getTabString() const;
+
+   /**
+    * Sets the tab string.  Usually "\t" or spaces "  ".
+    *
+    * @param tabString  String to use for indentation.
+    */
+   void setTabString(const ossimString& tabString);
+
+   /**
+    * @param title Tile of data usually the image file name.
+    */
+   void setTitle(const ossimString& pubDate);
+
+   void setTemplate(const ossimFilename& xmlTemplateFile);
+
+   ossimString find(const ossimString& xpath) const;
+
+   bool writeTemplate(const ossimFilename& file) const;
+
+protected:
+   /** destructor */
+   virtual ~ossimFgdcFileWriter();
+
+   /**
+    * Writes file to disk.
+    *
+    * @return true on success, false on failure.
+    */
+   virtual bool writeFile();
+
+private:
+
+   /**
+    * Writes openning tag adding any indentation and brackets.  Increments
+    * indentation level.
+    *
+    * @param os otream to write to.
+    *
+    * @param tag String representing tag with no brackets, i.e. "metadata".
+    *
+    * @param newLine If true a new line "\n" is added.
+    */
+   void openTag(std::ostream& os,
+                const ossimString& tag,
+                bool newLine) const;
+
+   /**
+    * Closes tag decrementing indentation.
+    * e.g.: <metadata>
+    *
+    * @param os otream to write to.
+    *
+    * @param tag String representing tag with no brackets.
+    *
+    * @param decrementLevel If true indentation level is decremented.
+    */
+   void closeTag(std::ostream& os,
+                 const ossimString& tag,
+                 bool decrementLevel) const;
+   
+   mutable ossim_uint32 theIndentionLevel;
+   ossimString          theTabString;
+   ossimXmlDocument     theTemplate;
+   ossimFilename        theSourceImageFilename;
+
+TYPE_DATA
+};
+
+#endif /* End of "#ifndef ossimFgdcFileWriter_HEADER" */
+
diff --git a/ossim/include/ossim/imaging/ossimFilter.h b/ossim/include/ossim/imaging/ossimFilter.h
new file mode 100644
index 0000000..85d34cc
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimFilter.h
@@ -0,0 +1,511 @@
+#ifndef ossimFilter_HEADER
+#define ossimFilter_HEADER
+#include <math.h>
+#include <ossim/matrix/newmat.h>
+#include <ossim/base/ossimRtti.h>
+#include <ossim/base/ossimCommon.h>
+
+class ossimFilter
+{
+public:
+   ossimFilter()
+      {}
+   virtual ~ossimFilter() {}
+   
+   virtual double filter (double x, double support)const = 0;
+   /*!
+    * Will call the filter method to create a
+    * convolution matrix.  This matrix will not
+    * have normalized weights.
+    *
+    * Will generate a matrix by creating an outer
+    * product of the 1-D filter array.  This matrix
+    * will be square width-by-width.
+    *
+    * note:  the matrix is a new matrix and needs to
+    *        be destroyed by the caller
+    */
+   virtual NEWMAT::Matrix *newMatrix(long width=3,
+                                     double middle=0.0,
+                                     double scale=0.0)const;
+   virtual void createMatrix(NEWMAT::Matrix& m,
+                             long width=3,
+                             double middle=0.0,
+                             double scale=0.0)const;
+   
+   virtual NEWMAT::RowVector *newVector(long width,
+                                        double middle=0.0,
+                                        double scale = 1.0)const;
+   static double Sinc(double x)
+      {
+         if (x != 0.0)
+         {
+            x*=M_PI;
+            return(sin(x)/x);
+         }
+         
+         return(1.0);
+      }
+   static double Sinc(double x, double /* support */ )
+      {
+         if (x != 0.0)
+         {
+            x*=M_PI;
+            return(sin(x)/x);
+         }
+         
+         return(1.0);
+      }
+
+   virtual double getSupport()const=0;
+   
+TYPE_DATA
+};
+
+class ossimBoxFilter : public ossimFilter
+{
+public:
+   ossimBoxFilter (){}
+   virtual ~ossimBoxFilter() {}
+   
+   virtual double filter (double x, double /* support */ )const
+      {
+         if (x < -0.5)
+            return(0.0);
+         if (x < 0.5)
+            return(1.0);
+         return(0.0);
+      }
+   virtual double getSupport()const
+      {
+         return .5;
+      }
+TYPE_DATA
+};
+
+class ossimSincFilter : public ossimFilter
+{
+public:
+   ossimSincFilter(){}
+   virtual ~ossimSincFilter(){}
+   double filter(double x, double /* support */ )const
+      {
+         x*=M_PI;
+         if (x != 0.0)
+            return(sin(x)/x);
+         return(1.0);
+      }
+   virtual double getSupport()const
+      {
+         return 1.0;
+      }
+TYPE_DATA
+};
+
+class ossimBellFilter : public ossimFilter
+{
+public:
+   ossimBellFilter(){}
+   virtual ~ossimBellFilter(){}
+   virtual double getSupport()const
+      {
+         return 1.5;
+      }
+   virtual double filter(double value, double /* support */ )const
+      {
+         if(value < 0) value = -value;
+         if(value < .5) return(.75 - (value * value));
+         if(value < 1.5) {
+            value = (value - 1.5);
+            return(.5 * (value * value));
+         }
+         return(0.0);
+      }
+TYPE_DATA
+};
+
+class ossimNearestNeighborFilter: public ossimBoxFilter
+{
+public:
+   ossimNearestNeighborFilter (){}
+   virtual ~ossimNearestNeighborFilter() {}
+   
+   virtual double getSupport()const
+      {
+         return 0.0;
+      }
+TYPE_DATA
+};
+
+   
+class ossimBesselOrderOneFilter : public ossimFilter
+{
+public:
+   ossimBesselOrderOneFilter(){}
+   virtual ~ossimBesselOrderOneFilter(){}
+   virtual double filter(double value, double /* support */ )const;
+   virtual double getSupport()const
+      {
+         return 1.0;
+      }
+TYPE_DATA
+};
+class ossimBesselFilter : public ossimFilter
+{
+public:
+   ossimBesselFilter(){}
+   virtual ~ossimBesselFilter(){}
+   virtual double filter(double x, double support)const
+      {
+         if (x == 0.0)
+         {
+            return(M_PI/4.0);
+         }
+         
+         return(ossimBesselOrderOneFilter().filter((M_PI*x)/(2.0*x), support));
+      }
+   virtual double getSupport()const
+      {
+         return 1.0;
+      }
+   
+TYPE_DATA
+};
+
+class ossimBlackmanFilter : public ossimFilter
+{
+public:
+    ossimBlackmanFilter (){}
+    virtual ~ossimBlackmanFilter() {}
+
+    virtual double filter (double x, double /* support */ ) const
+        {
+           return(0.42+0.50*cos(M_PI*x)+0.08*cos(2.0*M_PI*x));
+        }
+   virtual double getSupport()const
+      {
+         return 1.0;
+      }
+TYPE_DATA
+};
+
+class ossimBlackmanSincFilter : public ossimBlackmanFilter
+{
+public:
+    ossimBlackmanSincFilter (){}
+    virtual ~ossimBlackmanSincFilter() {}
+
+    virtual double filter (double x, double support) const
+        {
+           return ((ossimBlackmanFilter::filter(x/support,support))*
+                   (ossimSincFilter().filter(x, support)));
+        }
+   virtual double getSupport()const
+      {
+         return 4.0;
+      }
+TYPE_DATA
+};
+
+class ossimBlackmanBesselFilter : public ossimBlackmanFilter
+{
+public:
+    ossimBlackmanBesselFilter(){}
+    virtual ~ossimBlackmanBesselFilter() {}
+
+    virtual double filter (double x, double support) const
+        {
+           return ((ossimBlackmanFilter::filter(x/support,support))*
+                   (ossimBesselFilter().filter(x, support)));
+        }
+   virtual double getSupport()const
+      {
+         return 3.2383;
+      }
+TYPE_DATA
+};
+
+
+class ossimCatromFilter : public ossimFilter
+{
+public:
+   ossimCatromFilter(){}
+   virtual ~ossimCatromFilter(){}
+   double filter(double x, double /* support */ )const
+      {
+         if (x < -2.0)
+            return(0.0);
+         if (x < -1.0)
+            return(0.5*(4.0+x*(8.0+x*(5.0+x))));
+         if (x < 0.0)
+            return(0.5*(2.0+x*x*(-5.0-3.0*x)));
+         if (x < 1.0)
+            return(0.5*(2.0+x*x*(-5.0+3.0*x)));
+         if (x < 2.0)
+            return(0.5*(4.0+x*(-8.0+x*(5.0-x))));
+         return(0.0);
+      }
+   virtual double getSupport()const
+      {
+         return 2.0;
+      }
+TYPE_DATA
+};
+
+class ossimCubicFilter : public ossimFilter
+{
+public:
+   ossimCubicFilter(){}
+   virtual ~ossimCubicFilter(){}
+   double filter(double x, double /* support */ )const
+      {
+         if (x < -2.0)
+            return(0.0);
+         if (x < -1.0)
+            return((2.0+x)*(2.0+x)*(2.0+x)/6.0);
+         if (x < 0.0)
+            return((4.0+x*x*(-6.0-3.0*x))/6.0);
+         if (x < 1.0)
+            return((4.0+x*x*(-6.0+3.0*x))/6.0);
+         if (x < 2.0)
+            return((2.0-x)*(2.0-x)*(2.0-x)/6.0);
+         return(0.0);
+      }
+   virtual double getSupport()const
+      {
+         return 2.0;
+      }
+TYPE_DATA
+};
+
+class ossimBSplineFilter : public ossimFilter
+{
+public:
+   ossimBSplineFilter(){}
+   virtual ~ossimBSplineFilter(){}
+   virtual double filter(double value, double /* support */ )const
+      {
+	double tt;
+
+	if(value < 0) value = -value;
+	if(value < 1) {
+		tt = value * value;
+		return((.5 * tt * value) - tt + (2.0 / 3.0));
+	} else if(value < 2) {
+		value = 2 - value;
+		return((1.0 / 6.0) * (value * value * value));
+	}
+	return(0.0);
+      }
+   virtual double getSupport()const
+      {
+         return 2.0;
+      }
+TYPE_DATA
+};
+
+class ossimGaussianFilter : public ossimFilter
+{
+public:
+    ossimGaussianFilter (){}
+    virtual ~ossimGaussianFilter() {}
+
+    virtual double filter (double x, double /* support */ ) const
+        {
+           return(exp(-2.0*x*x)*sqrt(2.0/M_PI));
+        }
+   virtual double getSupport()const
+      {
+         return 1.25;
+      }
+TYPE_DATA
+};
+
+class ossimHanningFilter : public ossimFilter
+{
+public:
+   ossimHanningFilter(){}
+   virtual ~ossimHanningFilter(){}
+   double filter(double x, double /* support */ )const
+      {
+         return(0.5+0.5*cos(M_PI*x));
+      }
+   virtual double getSupport()const
+      {
+         return 1.0;
+      }
+TYPE_DATA
+};
+
+class ossimHammingFilter : public ossimFilter
+{
+public:
+    ossimHammingFilter (){}
+    virtual ~ossimHammingFilter() {}
+
+    virtual double filter (double x, double /* support */ ) const
+        {
+           return(0.54+0.46*cos(M_PI*x));
+        }
+   virtual double getSupport()const
+      {
+         return 1.0;
+      }
+TYPE_DATA
+};
+
+class ossimHermiteFilter : public ossimFilter
+{
+public:
+   ossimHermiteFilter(){}
+   virtual ~ossimHermiteFilter(){}
+   double filter(double x, double /* support */ )const
+      {
+         if (x < -1.0)
+            return(0.0);
+         if (x < 0.0)
+            return((2.0*(-x)-3.0)*(-x)*(-x)+1.0);
+         if (x < 1.0)
+            return((2.0*x-3.0)*x*x+1.0);
+         return(0.0);
+      }
+   virtual double getSupport()const
+      {
+         return 1.0;
+      }
+TYPE_DATA
+};
+
+
+class ossimLanczosFilter : public ossimFilter
+{
+public:
+   ossimLanczosFilter(){}
+   virtual ~ossimLanczosFilter(){}
+   double filter(double x, double /* support */ )const
+      {
+         if (x < -3.0)
+            return(0.0);
+         if (x < 0.0)
+            return(Sinc(-x,getSupport())*Sinc(-x/3.0,getSupport()));
+         if (x < 3.0)
+            return(Sinc(x,getSupport())*Sinc(x/3.0,getSupport()));
+         return(0.0);
+      }
+   virtual double getSupport()const
+      {
+         return 3.0;
+      }
+TYPE_DATA
+};
+
+class ossimMagicFilter : public ossimFilter
+{
+public:
+   ossimMagicFilter(){}
+   virtual ~ossimMagicFilter(){}
+   double filter(double x, double /* support */ )const
+      {
+         if (x <= -1.5)
+            return(0.0);
+         if (x <= -0.5)
+          return (0.5*ossim::square(x + 1.5));
+         if (x <=0.5)
+            return (0.75-ossim::square(x));
+         if(x <= 0.75)
+            return (0.5*ossim::square(x-1.5));
+
+         return(0.0);
+      }
+   virtual double getSupport()const
+      {
+         return 1.5;
+      }
+TYPE_DATA
+};
+
+class ossimMitchellFilter : public ossimFilter
+{
+public:
+   ossimMitchellFilter(){}
+   virtual ~ossimMitchellFilter(){}
+   double filter(double x, double /* support */ )const
+      {
+#define MITCHELL_B   (1.0/3.0)
+#define MITCHELL_C   (1.0/3.0)
+#define MITCHELL_P0  ((  6.0- 2.0*MITCHELL_B       )/6.0)
+#define MITCHELL_P2  ((-18.0+12.0*MITCHELL_B+ 6.0*MITCHELL_C)/6.0)
+#define MITCHELL_P3  (( 12.0- 9.0*MITCHELL_B- 6.0*MITCHELL_C)/6.0)
+#define MITCHELL_Q0  ((       8.0*MITCHELL_B+24.0*MITCHELL_C)/6.0)
+#define MITCHELL_Q1  ((     -12.0*MITCHELL_B-48.0*MITCHELL_C)/6.0)
+#define MITCHELL_Q2  ((       6.0*MITCHELL_B+30.0*MITCHELL_C)/6.0)
+#define MITCHELL_Q3  ((     - 1.0*MITCHELL_B- 6.0*MITCHELL_C)/6.0)
+         
+         if (x < -2.0)
+            return(0.0);
+         if (x < -1.0)
+            return(MITCHELL_Q0-x*(MITCHELL_Q1-x*(MITCHELL_Q2-x*MITCHELL_Q3)));
+         if (x < 0.0)
+            return(MITCHELL_P0+x*x*(MITCHELL_P2-x*MITCHELL_P3));
+         if (x < 1.0)
+            return(MITCHELL_P0+x*x*(MITCHELL_P2+x*MITCHELL_P3));
+         if (x < 2.0)
+            return(MITCHELL_Q0+x*(MITCHELL_Q1+x*(MITCHELL_Q2+x*MITCHELL_Q3)));
+         return(0.0);
+      }
+   virtual double getSupport()const
+      {
+         return 2.0;
+      }
+TYPE_DATA
+};
+
+class ossimQuadraticFilter : public ossimFilter
+{
+public:
+   ossimQuadraticFilter(){}
+   virtual ~ossimQuadraticFilter(){}
+   double filter(double x, double /* support */ )const
+      {
+         if (x < -1.5)
+            return(0.0);
+         if (x < -0.5)
+            return(0.5*(x+1.5)*(x+1.5));
+         if (x < 0.5)
+            return(0.75-x*x);
+         if (x < 1.5)
+            return(0.5*(x-1.5)*(x-1.5));
+         return(0.0);
+      }
+   double getSupport()const
+      {
+         return 1.5;
+      }
+TYPE_DATA
+};
+
+class ossimTriangleFilter : public ossimFilter
+{
+public:
+   ossimTriangleFilter(){}
+   virtual ~ossimTriangleFilter() {}
+   
+   virtual double filter (double x, double /* support */ )const
+      {
+         if (x < -1.0)
+            return(0.0);
+         if (x < 0.0)
+            return(1.0+x);
+         if (x < 1.0)
+            return(1.0-x);
+         return(0.0);
+      }
+   virtual double getSupport()const
+      {
+         return 1.0;
+      }
+TYPE_DATA
+};
+
+
+#endif
diff --git a/ossim/include/ossim/imaging/ossimFilterResampler.h b/ossim/include/ossim/imaging/ossimFilterResampler.h
new file mode 100644
index 0000000..dff9a29
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimFilterResampler.h
@@ -0,0 +1,152 @@
+//*******************************************************************
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+// Contributor:
+//         David A. Horner (DAH) http://dave.thehorners.com
+//
+//*************************************************************************
+// $Id: ossimFilterResampler.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimFilterResampler_HEADER
+#define ossimFilterResampler_HEADER
+
+#include <vector>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimFilter.h>
+#include <ossim/imaging/ossimFilterTable.h>
+
+class OSSIMDLLEXPORT ossimFilterResampler
+{
+public:
+   enum ossimFilterResamplerType
+   {
+      ossimFilterResampler_NEAREST_NEIGHBOR = 0,
+      ossimFilterResampler_BOX              = 1,
+      ossimFilterResampler_GAUSSIAN         = 2,
+      ossimFilterResampler_CUBIC            = 3,
+      ossimFilterResampler_HANNING          = 4,
+      ossimFilterResampler_HAMMING          = 5,
+      ossimFilterResampler_LANCZOS          = 6,
+      ossimFilterResampler_MITCHELL         = 7,
+      ossimFilterResampler_CATROM           = 8,
+      ossimFilterResampler_BLACKMAN         = 9,
+      ossimFilterResampler_BLACKMAN_SINC    = 10,
+      ossimFilterResampler_BLACKMAN_BESSEL  = 11,
+      ossimFilterResampler_QUADRATIC        = 12,
+      ossimFilterResampler_TRIANGLE         = 13,
+      ossimFilterResampler_BILINEAR         = 13,
+      ossimFilterResampler_HERMITE          = 14,
+      ossimFilterResampler_BELL             = 15,
+      ossimFilterResampler_BSPLINE          = 16,
+      ossimFilterResampler_MAGIC            = 17
+      
+   };
+   ossimFilterResampler();
+   virtual ~ossimFilterResampler();
+
+  virtual void resample(const ossimRefPtr<ossimImageData>& input,
+			ossimRefPtr<ossimImageData>& output,
+			const ossimDpt& ul,
+			const ossimDpt& ur,
+			const ossimDpt& deltaUl,
+			const ossimDpt& deltaUr,
+			const ossimDpt& length);
+
+  virtual void resample(const ossimRefPtr<ossimImageData>& input,
+			ossimRefPtr<ossimImageData>& output,
+			const ossimIrect& outputSubRect,
+			const ossimDpt& ul,
+			const ossimDpt& ur,
+			const ossimDpt& deltaUl,
+			const ossimDpt& deltaUr,
+			const ossimDpt& length);
+
+  void setFilterType(ossimFilterResamplerType filterType);
+  void setFilterType(ossimFilterResamplerType minifyFilterType,
+		     ossimFilterResamplerType magnifyFilterType);
+  void setFilterType(const ossimString& type);
+  void setFilterType(const ossimString& minifyType,
+		     const ossimString& magnifyType);
+
+  void setMinifyFilterType(const ossimString& minifyType);
+  void setMagnifyFilterType(const ossimString& magnifyType);
+  void setMinifyFilterType(ossimFilterResamplerType filterType);
+  void setMagnifyFilterType(ossimFilterResamplerType filterType);
+  ossimString getMinifyFilterTypeAsString()const;
+  ossimString getMagnifyFilterTypeAsString()const;
+  void setScaleFactor(const ossimDpt& scale);
+  void setBlurFactor(ossim_float64 blur);
+
+  void setBoundingInputRect(const ossimIrect& rect)
+  {
+    theInputRect = rect;
+  }
+  ossimIrect getBoundingInputRect()const
+  {
+    return theInputRect;
+  }
+
+  ossim_float64 getBlurFactor()const;
+
+  const ossimDpt& getScaleFactor()const
+  {
+    return theScaleFactor;
+  }
+  /*!
+   * Saves the state of this object.
+   */
+  virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
+  
+  /*!
+   * Loads the state of this object.
+   */
+  virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+  
+  virtual void getKernelSupport(double& x,
+				double & y)const;
+
+  virtual void getFilterTypes(std::vector<ossimString>& filterTypes)const;
+
+private:
+  const ossimFilter* getHorizontalFilter()const;
+  const ossimFilter* getVerticalFilter()const;
+
+  template <class T>
+  void resampleBilinearTile(T dummy,
+			    const ossimRefPtr<ossimImageData>& input,
+			    ossimRefPtr<ossimImageData>& output,
+			    const ossimIrect& outputSubRect,
+			    const ossimDpt& inputUl,
+			    const ossimDpt& inputUr,
+			    const ossimDpt& deltaUl,
+			    const ossimDpt& deltaUr,
+			    const ossimDpt& outLength);
+  
+   void computeTable();
+   ossimString getFilterTypeAsString(ossimFilterResamplerType type)const;
+   ossimFilterResamplerType getFilterType(const ossimString& type)const;
+   ossimFilter* createNewFilter(ossimFilterResamplerType filterType,
+                                ossimFilterResamplerType& result);
+
+
+   ossimFilter*             theMinifyFilter;
+   ossimFilter*             theMagnifyFilter;
+   ossimFilterTable         theFilterTable;
+   
+   ossimFilterResamplerType theMinifyFilterType;
+   ossimFilterResamplerType theMagnifyFilterType;
+   ossimDpt                 theScaleFactor;
+   ossimDpt                 theInverseScaleFactor;
+   
+   ossimIrect               theInputRect;
+   ossim_float64            theBlurFactor;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimFilterTable.h b/ossim/include/ossim/imaging/ossimFilterTable.h
new file mode 100644
index 0000000..34fd916
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimFilterTable.h
@@ -0,0 +1,98 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimFilterTable.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimFilterTable_HEADER
+#define ossimFilterTable_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <cmath>
+
+class ossimFilter;
+
+class OSSIM_DLL ossimFilterTable
+{
+public:
+   /** default constructor */
+   ossimFilterTable();
+
+   /** destructor */
+   ~ossimFilterTable();
+
+   /** Builds a table with filter being used in both x and y direction. */
+   void buildTable(ossim_uint32  filterSteps,
+                   const ossimFilter& filter);
+
+   /** Builds a table. */
+   void buildTable(ossim_uint32  filterSteps,
+                   const ossimFilter& xFilter,
+                   const ossimFilter& yFilter);
+
+   /** @return theWidth*theHeight */
+   ossim_uint32 getWidthByHeight() const;
+
+   /** @return theXSupport */
+   ossim_uint32 getXSupport()      const;
+
+   /** @return theYSupport */
+   ossim_uint32 getYSupport()      const;
+
+   /** @return theWidth */
+   ossim_uint32 getWidth()         const;
+
+   /** @return theHeight */
+   ossim_uint32 getHeight()        const;
+
+   /**
+    * Inlined below.
+    *
+    * @return const double* to the closest weight of x and y.
+    */
+   const double* getClosestWeights(const double& x, const double& y)const;
+
+protected:
+
+   /**
+    * Creates the weight array "theWeights".  Will delete if previously
+    * allocated.
+    */
+   void allocateWeights();
+
+   double*      theWeights;
+   ossim_uint32 theWidth;
+   ossim_uint32 theHeight;
+   ossim_uint32 theWidthHeight;
+   ossim_uint32 theXSupport;
+   ossim_uint32 theYSupport;
+   ossim_uint32 theFilterSteps;
+};
+
+/**
+ * Method inlined for speed as it is used in the inner pixel loop of
+ * ossimFilterResampler::resampleBilinearTile method.
+ */
+inline const double* ossimFilterTable::getClosestWeights(const double& x,
+                                                         const double& y)const
+{
+   // Extract the decimal part of x and y.
+   double intPartDummy;
+   double decimalPrecisionX = fabs(modf(x, &intPartDummy));
+   double decimalPrecisionY = fabs(modf(y, &intPartDummy));
+   
+   ossim_int32 kernelLine =
+      (ossim_int32)(theFilterSteps*decimalPrecisionY);
+   ossim_int32 kernelSamp =
+      (ossim_int32)(theFilterSteps*decimalPrecisionX);
+  
+  return &theWeights[(kernelLine*theFilterSteps +
+                      kernelSamp)*theWidthHeight];
+}
+
+#endif /* End of "#ifndef ossimFilterTable_HEADER" */
+
diff --git a/ossim/include/ossim/imaging/ossimFixedTileCache.h b/ossim/include/ossim/imaging/ossimFixedTileCache.h
new file mode 100644
index 0000000..f0114cf
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimFixedTileCache.h
@@ -0,0 +1,147 @@
+//******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: This file contains the Application cache algorithm
+//
+//***********************************
+// $Id: ossimFixedTileCache.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimFixedTileCache_HEADER
+#define ossimFixedTileCache_HEADER
+#include <map>
+#include <list>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <OpenThreads/Mutex>
+
+class  ossimFixedTileCacheInfo
+{
+public:
+   ossimFixedTileCacheInfo(ossimRefPtr<ossimImageData>& tile,
+                           ossim_int32 tileId=-1)
+      :theTile(tile),
+      theTileId(tileId)
+      {
+      }
+   
+   bool operator <(const ossimFixedTileCacheInfo& rhs)const
+      {
+         return (theTileId < rhs.theTileId);
+      }
+   bool operator <(ossim_int32 tileId)const
+      {
+         return (theTileId < tileId);
+      }
+   bool operator >(const ossimFixedTileCacheInfo& rhs)const
+      {
+         return (theTileId > rhs.theTileId);
+      }
+   bool operator >(ossim_int32 tileId)const
+      {
+         return (theTileId > tileId);
+      }
+   bool operator ==(const ossimFixedTileCacheInfo& rhs)const
+      {
+         return (theTileId == rhs.theTileId);
+      }
+   bool operator ==(ossim_int32 tileId)const
+      {
+         return (theTileId == tileId);
+      }
+   
+   ossimRefPtr<ossimImageData> theTile;
+   ossim_int32 theTileId;
+};
+
+class ossimFixedTileCache : public ossimReferenced
+{
+public:
+   ossimFixedTileCache();
+   virtual void setRect(const ossimIrect& rect);
+   virtual void setRect(const ossimIrect& rect,
+                        const ossimIpt& tileSize);
+   void keepTilesWithinRect(const ossimIrect& rect);
+   virtual ossimRefPtr<ossimImageData> addTile(ossimRefPtr<ossimImageData> imageData,
+                                               bool duplicateData=true);
+   virtual ossimRefPtr<ossimImageData> getTile(ossim_int32 id);
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIpt& origin)
+      {
+         return getTile(computeId(origin));
+      }
+   virtual void setUseLruFlag(bool flag)
+      {
+         theUseLruFlag = flag;
+      }
+   virtual bool getUseLruFlag()const
+      {
+         return theUseLruFlag;
+      }
+   virtual void flush();
+   virtual void deleteTile(const ossimIpt& origin)
+      {
+         deleteTile(computeId(origin));
+      }
+   virtual void deleteTile(ossim_int32 tileId);
+   virtual ossimRefPtr<ossimImageData> removeTile(const ossimIpt& origin)
+      {
+         return removeTile(computeId(origin));
+      }
+   virtual ossimRefPtr<ossimImageData> removeTile(ossim_int32 tileId);
+   virtual const ossimIrect& getTileBoundaryRect()const
+      {
+         return theTileBoundaryRect;
+      }
+   virtual ossim_uint32 getNumberOfTiles()const
+      {
+         return (ossim_uint32)theTileMap.size();
+      }
+   virtual const ossimIpt& getTileSize()const
+      {
+         return theTileSize;
+      }
+   virtual ossim_uint32 getCacheSize()const
+      {
+         return theCacheSize;
+      }
+   virtual void deleteTile();
+   virtual ossimRefPtr<ossimImageData> removeTile();
+   
+   virtual void setMaxCacheSize(ossim_uint32 cacheSize)
+      {
+         theMaxCacheSize = cacheSize;
+      }
+
+   ossim_uint32 getMaxCacheSize()const
+      {
+         return theMaxCacheSize;
+      }
+   
+   virtual ossimIpt getTileOrigin(ossim_int32 tileId);
+   virtual ossim_int32 computeId(const ossimIpt& tileOrigin)const;
+   virtual void setTileSize(const ossimIpt& tileSize);
+protected:
+   virtual ~ossimFixedTileCache();
+   OpenThreads::Mutex theMutex;
+   ossimIrect   theTileBoundaryRect;
+   ossimIpt     theTileSize;
+   ossimIpt     theBoundaryWidthHeight;
+   ossim_uint32 theTilesHorizontal;
+   ossim_uint32 theTilesVertical;
+   ossim_uint32 theCacheSize;
+   ossim_uint32 theMaxCacheSize;
+   std::map<ossim_int32, ossimFixedTileCacheInfo> theTileMap;
+   std::list<ossim_int32> theLruQueue;
+   bool                   theUseLruFlag;
+   virtual void eraseFromLru(ossim_int32 id);
+   void adjustLru(ossim_int32 id);
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimFusionCombiner.h b/ossim/include/ossim/imaging/ossimFusionCombiner.h
new file mode 100644
index 0000000..8534d3e
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimFusionCombiner.h
@@ -0,0 +1,48 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: Implementation for Base fusion.
+//              This base class assumes two inputs where the second input is
+//              the intensity source.
+//
+//*************************************************************************
+// $Id: ossimFusionCombiner.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimFusionCombiner_HEADER
+#define ossimFusionCombiner_HEADER
+
+#include <ossim/imaging/ossimImageCombiner.h>
+
+class OSSIMDLLEXPORT ossimFusionCombiner : public ossimImageCombiner
+{
+public:
+  ossimFusionCombiner();
+  ossimFusionCombiner(ossimObject* owner);
+  virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const;
+  bool canConnectMyInputTo(ossim_int32 inputIndex,
+			   const ossimConnectableObject* object)const;
+   ossimScalarType getOutputScalarType() const;
+   
+  virtual void initialize();
+protected:
+   virtual ~ossimFusionCombiner();   
+  ossimRefPtr<ossimImageData> theTile;
+  ossimRefPtr<ossimImageData> theNormTile;
+  ossimRefPtr<ossimImageData> theNormIntensity;
+  ossimImageSource*  theInputConnection;
+  ossimImageSource*  theIntensityConnection;
+  
+  ossimRefPtr<ossimImageData> getNormIntensity(const ossimIrect& rect,
+                                               ossim_uint32 resLevel);
+  ossimRefPtr<ossimImageData> getNormTile(const ossimIrect& rect,
+                                          ossim_uint32 resLevel);
+TYPE_DATA  
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimGammaRemapper.h b/ossim/include/ossim/imaging/ossimGammaRemapper.h
new file mode 100644
index 0000000..72e31b0
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimGammaRemapper.h
@@ -0,0 +1,72 @@
+//*******************************************************************
+// Copyright (C) 2002 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Kathy Minear
+//
+// Description:
+//
+// Gamma remapper.
+//
+//*************************************************************************
+// $Id: ossimGammaRemapper.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimGammaRemapper_HEADER
+#define ossimGammaRemapper_HEADER
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+class ossimGammaRemapper : public ossimImageSourceFilter
+{
+public:
+
+   ossimGammaRemapper(ossimObject* owner=NULL);
+   ossimGammaRemapper(ossimImageSource* inputSource);
+   ossimGammaRemapper(ossimObject* owner, ossimImageSource* inputSource);
+
+
+   virtual ossimString getShortName()const;
+
+   virtual void initialize();
+
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect,
+                                   ossim_uint32 resLevel=0);
+   
+   /*!
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+   virtual ostream& print(ostream& os) const;
+   friend ostream& operator<< (ostream& os,  const ossimGammaRemapper& hr);
+
+   void setMinMaxPixelValues(const vector<double>& v_min,
+                             const vector<double>& v_max);
+
+   virtual void enableSource();
+   
+protected:
+   virtual ~ossimGammaRemapper();
+
+   /*!
+    * Method to set unset the enable flag.
+    */
+
+   void verifyEnabled();
+
+   ossimRefPtr<ossimImageData> theTile;
+   double*         theBuffer;
+   vector<double>  theMinPixelValue;
+   vector<double>  theMaxPixelValue;
+   vector<double>  theGamma;
+   bool            theUserDisabledFlag;
+
+   TYPE_DATA
+};
+
+#endif /* #ifndef ossimGammaRemapper_HEADER */
+
diff --git a/include/ossim/imaging/ossimGdFont.h b/ossim/include/ossim/imaging/ossimGdFont.h
similarity index 100%
rename from include/ossim/imaging/ossimGdFont.h
rename to ossim/include/ossim/imaging/ossimGdFont.h
diff --git a/include/ossim/imaging/ossimGdFontExterns.h b/ossim/include/ossim/imaging/ossimGdFontExterns.h
similarity index 100%
rename from include/ossim/imaging/ossimGdFontExterns.h
rename to ossim/include/ossim/imaging/ossimGdFontExterns.h
diff --git a/ossim/include/ossim/imaging/ossimGeneralRasterInfo.h b/ossim/include/ossim/imaging/ossimGeneralRasterInfo.h
new file mode 100644
index 0000000..16f44b0
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimGeneralRasterInfo.h
@@ -0,0 +1,432 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Contains class declaration for ossimGeneralRasterInfo
+//*******************************************************************
+//  $Id: ossimGeneralRasterInfo.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimGeneralRasterInfo_HEADER
+#define ossimGeneralRasterInfo_HEADER 1
+
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimErrorContext.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/imaging/ossimImageMetaData.h>
+#include <vector>
+
+//---
+// Forward class declarations.
+//---
+class ossimEnviHeader;
+class ossimKeywordlist;
+
+/**
+ * @class ossimGeneralRasterInfo
+ *
+ */
+class OSSIMDLLEXPORT ossimGeneralRasterInfo : public ossimObject
+{
+public:
+
+   enum ossimFillMode
+   {
+      NONE,
+      ZEROES_TO_MIN,
+      ZEROES_TO_NULL_EDGES_ONLY
+   };
+
+   enum
+   {
+      UNKNOWN = -1
+   };
+
+   /* @brief default constructor */
+   ossimGeneralRasterInfo();
+   
+   ossimGeneralRasterInfo(const std::vector<ossimFilename>& imageFileList,
+                          ossimScalarType      pixelType,
+                          ossimInterleaveType  il_type,
+                          ossim_int32          numberOfBands,
+                          ossim_int32          lines,
+                          ossim_int32          samples,
+                          ossim_int32          headerSize,
+                          ossimFillMode        nullsMode,
+                          ossim_int32          pixelsToChop);
+   
+   ossimGeneralRasterInfo(const ossimKeywordlist& kwl, const char* prefix=0);
+
+   /* @brief copy constructor */
+   ossimGeneralRasterInfo( const ossimGeneralRasterInfo& obj );
+
+   /** @brief Assignment operator=. */
+   const ossimGeneralRasterInfo& operator=( const ossimGeneralRasterInfo& rhs );
+   
+   virtual ~ossimGeneralRasterInfo ();
+
+   /**
+    *  Zero based rectangle of the valid image.
+    */
+   const ossimIrect& imageRect() const;
+
+   /**
+    *  Returns the rectangle of where the image is within the raster file.
+    *  In most cases this will be the same as the rawImageRect. (zero based)
+    */
+   const ossimIrect& validImageRect() const;
+
+   /**
+    *  Zero based rectangle of the raw image.
+    */
+   const ossimIrect& rawImageRect() const;
+
+   /**
+    * Returns the offset of this image's origin to a full-image's origin, in
+    * the case where this image is a sub-image of a larger full-image.
+    */
+   const ossimIpt& subImageOffset() const;
+
+   /**
+    *  Returns the size of header in bytes.
+    */
+   ossim_int32 headerSize() const;
+
+   /**
+    *  Returns the fill mode.  This is used to flip values on ingest.
+    *  Valid Mode Enumerations:
+    *  - 0  Do nothing to the pixels on ingest.
+    *  - 1  Flip all zeroes to the minimum pixel value.
+    *  - 2  Flip zeroes within the image line to minimum pixel value.
+    *       This is used by edge walking code.
+    */
+   ossim_uint32 fillToNullsMode() const;
+
+   /**
+    *  Sets theSetNullsMode.
+    */
+   void setFillToNullsMode(ossim_uint32 mode);
+
+   /**
+    * @brief Number of bands. Inlined below.
+    * @return Number of bands from theMetaData class member cast to an int32.
+    */
+   inline ossim_int32 numberOfBands() const;
+   
+   /**
+    * @brief Bytes per pixel.  Inlined below.
+    * @return Bytes per pixel from theMetaData class member cast to an int32.
+    */   
+   inline ossim_int32 bytesPerPixel() const;
+   
+   /**
+    *  Returns the number of pixels from the edge of a line
+    *  to set to the fill value.  This can be used to eliminate
+    *  resampling error on the edge of an image and still keep
+    *  the image demensions relative to the geometry file.
+    */
+   ossim_int32 pixelsToChop() const;
+   
+   /**
+    *  Enumerated in InterleaveTypeLUT. Should be either bip,
+    *  bil or bsq.  Defaulted to bip.
+    */
+   ossimInterleaveType interleaveType() const;
+
+   /**
+    *  Returns the number of lines within "theValidImageRect".
+    */
+   inline ossim_int32 validLines() const;
+
+   /**
+    *  Returns the number of lines within "theRawImageRect".
+    */
+   inline ossim_int32 rawLines() const;
+
+   /**
+    *  Returns the number of bytes in a raw line.
+    */
+   inline ossim_int32 bytesPerRawLine() const;
+
+   /**
+    *  Returns the number of bytes in a valid line.
+    */
+   inline ossim_int32 bytesPerValidLine() const;
+
+   /**
+    *  Returns the number of samples within "theValidImageRect".
+    */
+   inline ossim_int32 validSamples() const;
+
+   /**
+    *  Returns the number of samples within "theRawImageRect".
+    */
+   inline ossim_int32 rawSamples() const;
+
+   /**
+    *  Returns the offset in bytes to the first valid sample in the image.
+    */
+   inline std::streamoff offsetToFirstValidSample() const;
+   
+   const std::vector<ossimFilename>& getImageFileList() const;
+
+   void setImageFileList(const std::vector<ossimFilename>& list);
+
+   /**
+    * @brief Sets the image file list to file.  Performs a clear, prior to
+    * setting.
+    * @param file Image file.
+    */
+   void setImageFile(const ossimFilename& file);
+
+   void setHeaderSize(ossim_int32 headerSize);
+   
+   void setInterleaveType(ossimInterleaveType il_type);
+
+   virtual std::ostream& print(std::ostream& out) const;
+
+   void setImageRect(const ossimIrect& imageRect);
+   
+   void setValidImageRect(const ossimIrect &imageRect);
+
+   void setRawImageRect(const ossimIrect &imageRect);
+
+   void setSubImageOffset(const ossimIpt& d);
+
+   ossimByteOrder getImageDataByteOrder() const;
+
+   void setImageDataByteOrder(ossimByteOrder byteOrder);
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0) const;
+
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   /**
+    * @brief Takes image file and attempts to derive/find header file to
+    * parse for general raster data, i.e. lines, samples, bands and so on.
+    * @param image file.
+    * @return true on success, false on error.
+    */
+   bool open( const ossimFilename& imageFile );
+
+   /** @return Const reference to theMetaData class member. */
+   inline const ossimImageMetaData& getImageMetaData() const;
+
+   /** @return Reference to theMetaData class member. */
+   inline ossimImageMetaData& getImageMetaData();
+
+   /**
+    * @brief Initialize from envi header file.
+    * @param enviHeader
+    * @return true on success, false on error.
+    */  
+   bool initializeFromEnviHdr( const ossimEnviHeader& enviHdr );
+
+private:
+
+   /**
+    * @brief Initialize from header file.
+    * @param headerFile
+    * @return true on success, false on error.
+    */
+   bool initializeFromHdr( const ossimFilename& imageFile,
+                           const ossimFilename& headerFile );
+
+   /**
+    * @brief Initialize from envi header file.
+    * @param headerFile
+    * @return true on success, false on error.
+    */  
+   bool initializeFromEnviHdr( const ossimFilename& headerFile );
+
+   /**
+    * @brief Initialize from omd file.
+    * @param file
+    * @return true on success, false on error.
+    */  
+   bool initializeFromXml( const ossimFilename& imageFile,
+                           const ossimFilename& headerFile );
+
+   /**
+    * @brief Private method to get bits per pixel from file size,
+    * lines, samples and bands.  Method created to avoid duplicate code
+    * in "initizeFrom" methods.
+    *
+    * This assumes that "theRawImageRect" and "theNumberOfBands" has been
+    * set.
+    *
+    * @param imageFile This image file.
+    * @param Calculated bits per pixel.
+    * @return bits per pixel or 0 on error.
+    */
+   ossim_int32 getBitsPerPixel( const ossimFilename& imageFile ) const;
+
+   /** @brief Clears data members. */
+   void clear();
+   
+   ossimImageMetaData          theMetaData;
+   std::vector<ossimFilename>  theImageFileList;
+   ossimInterleaveType         theInterleaveType;
+
+   /**
+    *  The zero based rectangle of the entire image not including any header.
+    */
+   ossimIrect theRawImageRect;
+
+   /**
+    *  The rectangle representing where the valid part of the image lies
+    *  within "theRawImageRect".
+    */
+   ossimIrect theValidImageRect;
+
+   /**
+    *  The valid image rectangle normalized to be zero based.
+    */
+   ossimIrect theImageRect;
+
+   /**
+    *  The offset from the full-image origin to this image's origin
+    */
+   ossimIpt theSubImageOffset;
+
+   /**
+    *  Size of header in bytes.
+    */
+   ossim_int32 theHeaderSize;
+
+   /**
+    *  Mode of how to handle pixels on import.
+    *   0 = Do nothing the pixels.
+    *   1 = Set any zeroes to min value of radiometry.
+    *   2 = Set zeroes on line edges only to nulls; any other zeroes are
+    *       set to min value of radiometry.
+    */
+   ossimFillMode theSetNullsMode;
+
+   /**
+    *  Amount of pixels to chop for each line edge.
+    */
+   ossim_int32 thePixelsToChop;
+
+   /**
+    *  The byte order the image data is stored in.
+    */
+  ossimByteOrder theImageDataByteOrder;
+};
+
+
+//---
+// Inlines:
+// 
+// These methods are used throughout raster read/write code; hence, inlines.
+// Note that most of these are used in calculating std::streamoff which is
+// a signed 64 bit integer on most machines; hence, the cast to an int from
+// an unsigned int for convenience.
+//---
+inline const ossimImageMetaData& ossimGeneralRasterInfo::getImageMetaData() const
+{
+   return theMetaData;
+}
+
+inline ossimImageMetaData& ossimGeneralRasterInfo::getImageMetaData()
+{
+   return theMetaData;
+}
+
+inline ossim_int32 ossimGeneralRasterInfo::numberOfBands() const
+{
+   return static_cast<ossim_int32>( theMetaData.getNumberOfBands() );
+}
+
+inline ossim_int32 ossimGeneralRasterInfo::bytesPerPixel() const
+{
+   return static_cast<ossim_int32>( theMetaData.getBytesPerPixel() );
+}
+
+inline ossim_int32 ossimGeneralRasterInfo::validLines() const
+{
+   return static_cast<ossim_int32>(theValidImageRect.height());
+}
+
+inline ossim_int32 ossimGeneralRasterInfo::rawLines() const
+{
+   return static_cast<ossim_int32>(theRawImageRect.height());
+}
+
+inline ossim_int32 ossimGeneralRasterInfo::bytesPerRawLine() const
+{
+   if (interleaveType() == OSSIM_BIP)
+   {
+      return rawSamples() * bytesPerPixel() * numberOfBands();
+   }
+   else
+   {
+      return rawSamples() * bytesPerPixel();
+   }
+}
+
+inline ossim_int32 ossimGeneralRasterInfo::bytesPerValidLine() const
+{
+   if (interleaveType() == OSSIM_BIP)
+   {
+      return validSamples() * bytesPerPixel() * numberOfBands();
+   }
+   else
+   {
+      return validSamples() * bytesPerPixel();
+   }
+}
+
+inline ossim_int32 ossimGeneralRasterInfo::validSamples() const
+{
+   return static_cast<ossim_int32>(theValidImageRect.width());
+}
+
+inline ossim_int32 ossimGeneralRasterInfo::rawSamples() const
+{
+   return static_cast<ossim_int32>(theRawImageRect.width());
+}
+
+inline std::streamoff ossimGeneralRasterInfo::offsetToFirstValidSample() const
+{
+   if (interleaveType() == OSSIM_BIP)
+   {
+      return headerSize() +
+         ( bytesPerRawLine() * validImageRect().ul().y ) +
+         ( validImageRect().ul().x * numberOfBands() * bytesPerPixel() );
+   }
+   else if (interleaveType() == OSSIM_BIL)
+   {
+      return headerSize() +
+         ( bytesPerRawLine() * validImageRect().ul().y * numberOfBands() ) +
+         ( validImageRect().ul().x * bytesPerPixel() );
+   }
+   else // BSQ
+   {
+      return headerSize() +
+         ( bytesPerRawLine() * validImageRect().ul().y ) +
+         ( validImageRect().ul().x * bytesPerPixel() );
+   }
+}
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimGeneralRasterTileSource.h b/ossim/include/ossim/imaging/ossimGeneralRasterTileSource.h
new file mode 100644
index 0000000..3bd9f8d
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimGeneralRasterTileSource.h
@@ -0,0 +1,213 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Contains class declaration for ossimGeneralRasterTileSource.
+// ossimGeneralRasterTileSource is derived from ImageHandler which is
+// derived from ossimTileSource.
+//*******************************************************************
+//  $Id: ossimGeneralRasterTileSource.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimGeneralRasterTileSource_HEADER
+#define ossimGeneralRasterTileSource_HEADER 1
+
+
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/base/ossimIoStream.h>
+#include <ossim/imaging/ossimGeneralRasterInfo.h>
+#include <vector>
+  
+
+class  ossimImageData;
+
+class OSSIM_DLL ossimGeneralRasterTileSource : public ossimImageHandler
+{
+public:
+
+   ossimGeneralRasterTileSource();
+
+   virtual ossimString getShortName()const;
+   virtual ossimString getLongName()const;
+   
+   /**
+    *  Returns a pointer to a tile given an origin representing the upper
+    *  left corner of the tile to grab from the image.
+    *  Satisfies pure virtual from TileSource class.
+    */
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect,
+                                               ossim_uint32 resLevel=0);
+
+   /**
+    * Method to get a tile.   
+    *
+    * @param result The tile to stuff.  Note The requested rectangle in full
+    * image space and bands should be set in the result tile prior to
+    * passing.  It will be an error if:
+    * result.getNumberOfBands() != this->getNumberOfOutputBands()
+    *
+    * @return true on success false on error.  If return is false, result
+    *  is undefined so caller should handle appropriately with makeBlank or
+    * whatever.
+    */
+   virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);   
+   
+   /**
+    *  Returns the number of bands in the image.
+    *  Satisfies pure virtual from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfInputBands() const;
+   
+   /**
+    * Returns the number of bands in a tile returned from this TileSource.
+    * Note: we are supporting sources that can have multiple data objects.
+    * If you want to know the scalar type of an object you can pass in the 
+    */
+   virtual ossim_uint32 getNumberOfOutputBands() const;
+   
+   /**
+    *  Returns the number of lines in the image.
+    *  Satisfies pure virtual from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level = 0) const;
+   
+   /**
+    *  Returns the number of samples in the image.  
+    *  Satisfies pure virtual from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level = 0) const;
+
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+   
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+   /**
+    * Returns the output pixel type of the tile source.
+    */
+   virtual ossimScalarType getOutputScalarType() const;
+
+   /**
+    * Returns the width of the output tile.
+    */
+   virtual ossim_uint32    getTileWidth() const;
+   
+   /**
+    * Returns the height of the output tile.
+    */
+   virtual ossim_uint32    getTileHeight() const;
+
+   /**
+    * Returns the tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileWidth which
+    * returns the output tile width which can be different than the internal
+    * image tile width on disk.
+    * Note:  This handler will always return 0 for this method.
+    */
+   virtual ossim_uint32 getImageTileWidth() const;
+
+   /**
+    * Returns the tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileWidth which
+    * returns the output tile width which can be different than the internal
+    * image tile width on disk.
+    * Note:  This handler will always return 0 for this method.
+    */
+   virtual ossim_uint32 getImageTileHeight() const;   
+   
+   bool isValidRLevel(ossim_uint32 reduced_res_level) const;
+   
+   virtual void close();
+   virtual bool isOpen() const;
+   virtual bool open();
+   virtual bool open(const ossimGeneralRasterInfo& info);
+   
+   /**
+    * Override base getXXXXPixValue methods since the null/min/max can be set
+    * to something different.  Currently returns the same value for all bands.
+    */
+   virtual double getNullPixelValue(ossim_uint32 band=0)const;
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+
+   /**
+    * @brief Indicates whether or not the image handler can control output
+    * band selection via the setOutputBandList method.
+    *
+    * Overrides: ossimImageHandler::isBandSelector
+    *
+    * @return true
+    */
+   virtual bool isBandSelector() const;
+
+   /**
+    * @brief If the image handler "isBandSeletor()" then the band selection
+    * of the output chip can be controlled.
+    *
+    * Overrides: ossimImageHandler::setOutputBandList
+    * 
+    * @return true on success, false on error.
+    */
+   virtual bool setOutputBandList(const std::vector<ossim_uint32>& band_list);
+
+   /** @brief Initializes bandList to the zero based order of output bands. */
+   virtual void getOutputBandList(std::vector<ossim_uint32>& bandList) const;
+
+protected:
+   virtual ~ossimGeneralRasterTileSource();
+   /**
+    *  Methods return true on succes false on error.
+    */
+   virtual bool fillBuffer(const ossimIpt& origin, const ossimIpt& size);
+   virtual bool fillBIP(const ossimIpt& origin, const ossimIpt& size);
+   virtual bool fillBIL(const ossimIpt& origin, const ossimIpt& size);
+   virtual bool fillBSQ(const ossimIpt& origin, const ossimIpt& size);
+   virtual bool fillBsqMultiFile(const ossimIpt& origin, const ossimIpt& size);
+
+   virtual ossimKeywordlist getHdrInfo(ossimFilename hdrFile);
+   virtual ossimKeywordlist getXmlInfo(ossimFilename xmlFile);
+
+   bool initializeHandler();
+   
+   ossimRefPtr<ossimImageData>              m_tile;
+   ossim_uint8*                             m_buffer;
+   ossim_uint8*                             m_lineBuffer;
+   ossimInterleaveType                      m_bufferInterleave;
+   std::vector<ossimRefPtr<ossimIFStream> > m_fileStrList;
+   // std::vector< std::ifstream* >            m_fileStrList;   
+   ossimGeneralRasterInfo                   m_rasterInfo;
+   ossimIrect                               m_bufferRect;
+   bool                                     m_swapBytesFlag;
+   ossim_uint32                             m_bufferSizeInPixels;
+   std::vector<ossim_uint32>                m_outputBandList;
+
+private:
+   
+   /** @brief Allocates m_tile. */
+   void allocateTile();
+
+   /** @brief Allocates m_buffer */
+   void allocateBuffer( const ossimImageData* tile );
+   
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimGeneralRasterTileSource_HEADER */
+
diff --git a/include/ossim/imaging/ossimGeneralRasterWriter.h b/ossim/include/ossim/imaging/ossimGeneralRasterWriter.h
similarity index 100%
rename from include/ossim/imaging/ossimGeneralRasterWriter.h
rename to ossim/include/ossim/imaging/ossimGeneralRasterWriter.h
diff --git a/ossim/include/ossim/imaging/ossimGeoAnnotationBitmap.h b/ossim/include/ossim/imaging/ossimGeoAnnotationBitmap.h
new file mode 100644
index 0000000..738faf9
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimGeoAnnotationBitmap.h
@@ -0,0 +1,55 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimGeoAnnotationBitmap.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimGeoAnnotationBitmap_HEADER
+#define ossimGeoAnnotationBitmap_HEADER
+#include <ossim/imaging/ossimGeoAnnotationObject.h>
+
+class OSSIMDLLEXPORT ossimGeoAnnotationBitmap: public ossimGeoAnnotationObject
+{
+public:
+
+   ossimGeoAnnotationBitmap(const ossimGpt& center= ossimGpt(0,0,0),
+                            ossimRefPtr<ossimImageData> imageData=0,
+                            unsigned char r = 255,
+                            unsigned char g = 255,
+                            unsigned char b = 255);
+   
+   ossimGeoAnnotationBitmap(const ossimGeoAnnotationBitmap& rhs);
+   
+   virtual ossimObject* dup()const;
+
+   virtual bool intersects(const ossimDrect& rect) const;
+
+   virtual ossimGeoAnnotationBitmap* getNewClippedObject(const ossimDrect& rect)const;
+
+   virtual void applyScale(double x, double y);
+
+   virtual std::ostream& print(std::ostream& out)const;
+   virtual void draw(ossimRgbImage& anImage)const;
+   virtual void getBoundingRect(ossimDrect& rect)const;
+   virtual void transform(ossimImageGeometry* projection);
+
+   virtual void setImageData(ossimRefPtr<ossimImageData>& imageData);
+   virtual void computeBoundingRect();
+
+protected:
+   virtual ~ossimGeoAnnotationBitmap();
+   
+   ossimGpt                    theCenterPoint;
+   ossimDpt                    theProjectedPoint;
+   ossimRefPtr<ossimImageData> theImageData;
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/imaging/ossimGeoAnnotationEllipseObject.h b/ossim/include/ossim/imaging/ossimGeoAnnotationEllipseObject.h
similarity index 100%
rename from include/ossim/imaging/ossimGeoAnnotationEllipseObject.h
rename to ossim/include/ossim/imaging/ossimGeoAnnotationEllipseObject.h
diff --git a/include/ossim/imaging/ossimGeoAnnotationFontObject.h b/ossim/include/ossim/imaging/ossimGeoAnnotationFontObject.h
similarity index 100%
rename from include/ossim/imaging/ossimGeoAnnotationFontObject.h
rename to ossim/include/ossim/imaging/ossimGeoAnnotationFontObject.h
diff --git a/include/ossim/imaging/ossimGeoAnnotationGdBitmapFont.h b/ossim/include/ossim/imaging/ossimGeoAnnotationGdBitmapFont.h
similarity index 100%
rename from include/ossim/imaging/ossimGeoAnnotationGdBitmapFont.h
rename to ossim/include/ossim/imaging/ossimGeoAnnotationGdBitmapFont.h
diff --git a/include/ossim/imaging/ossimGeoAnnotationLineObject.h b/ossim/include/ossim/imaging/ossimGeoAnnotationLineObject.h
similarity index 100%
rename from include/ossim/imaging/ossimGeoAnnotationLineObject.h
rename to ossim/include/ossim/imaging/ossimGeoAnnotationLineObject.h
diff --git a/ossim/include/ossim/imaging/ossimGeoAnnotationMultiEllipseObject.h b/ossim/include/ossim/imaging/ossimGeoAnnotationMultiEllipseObject.h
new file mode 100644
index 0000000..10067a5
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimGeoAnnotationMultiEllipseObject.h
@@ -0,0 +1,70 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimGeoAnnotationMultiEllipseObject.h 23239 2015-04-08 01:02:44Z gpotts $
+#ifndef ossimGeoAnnotationMultiEllipseObject_HEADER
+#define ossimGeoAnnotationMultiEllipseObject_HEADER
+#include <ossim/imaging/ossimGeoAnnotationObject.h>
+#include <vector>
+class ossimAnnotationMultiEllipseObject;
+class OSSIM_DLL ossimGeoAnnotationMultiEllipseObject : public ossimGeoAnnotationObject
+{
+public:
+   ossimGeoAnnotationMultiEllipseObject();
+   virtual ~ossimGeoAnnotationMultiEllipseObject();
+   ossimGeoAnnotationMultiEllipseObject(const std::vector<ossimGpt>& centerPoints,
+                                        const ossimDpt& widthHeight,
+                                        bool enableFill = false,
+                                        unsigned char r = 255,
+                                        unsigned char g = 255,
+                                        unsigned char b = 255,
+                                        long thickness = 1);
+   ossimGeoAnnotationMultiEllipseObject(const ossimDpt& widthHeight,
+                                        bool enableFill = false,
+                                        unsigned char r = 255,
+                                        unsigned char g = 255,
+                                        unsigned char b = 255,
+                                        long thickness = 1);
+   ossimGeoAnnotationMultiEllipseObject(const ossimGeoAnnotationMultiEllipseObject& rhs);
+   
+   virtual ossimObject* dup()const;
+
+   virtual ossimAnnotationObject* getNewClippedObject(const ossimDrect& rect)const;
+
+   virtual void transform(ossimImageGeometry* projection);
+   
+   virtual void applyScale(double x, double y);
+
+   virtual void draw(ossimRgbImage& anImage)const;
+   virtual bool intersects(const ossimDrect& rect)const;
+   
+   virtual void addPoint(const ossimGpt& point);
+
+   virtual void setColor(unsigned char r,
+                         unsigned char g,
+                         unsigned char b);
+   virtual void setThickness(ossim_uint8 thickness);
+   
+   virtual void setPoint(int i, const ossimGpt& point);
+
+   virtual void setWidthHeight(const ossimDpt& widthHeight);
+   virtual void resize(ossim_uint32 newSize);
+
+   virtual void setFillFlag(bool fillFlag);
+   virtual std::ostream& print(std::ostream& out)const;
+   virtual void getBoundingRect(ossimDrect& rect)const;
+   virtual void computeBoundingRect();
+   
+protected:
+   ossimAnnotationMultiEllipseObject* theProjectedObject;
+   
+   std::vector<ossimGpt> thePointList;
+   ossimDpt              theWidthHeight;
+   bool                  theFillFlag;
+};
+
+#endif /* #ifndef ossimGeoAnnotationMultiEllipseObject_HEADER */
diff --git a/include/ossim/imaging/ossimGeoAnnotationMultiPolyLineObject.h b/ossim/include/ossim/imaging/ossimGeoAnnotationMultiPolyLineObject.h
similarity index 100%
rename from include/ossim/imaging/ossimGeoAnnotationMultiPolyLineObject.h
rename to ossim/include/ossim/imaging/ossimGeoAnnotationMultiPolyLineObject.h
diff --git a/include/ossim/imaging/ossimGeoAnnotationMultiPolyObject.h b/ossim/include/ossim/imaging/ossimGeoAnnotationMultiPolyObject.h
similarity index 100%
rename from include/ossim/imaging/ossimGeoAnnotationMultiPolyObject.h
rename to ossim/include/ossim/imaging/ossimGeoAnnotationMultiPolyObject.h
diff --git a/include/ossim/imaging/ossimGeoAnnotationObject.h b/ossim/include/ossim/imaging/ossimGeoAnnotationObject.h
similarity index 100%
rename from include/ossim/imaging/ossimGeoAnnotationObject.h
rename to ossim/include/ossim/imaging/ossimGeoAnnotationObject.h
diff --git a/include/ossim/imaging/ossimGeoAnnotationPolyLineObject.h b/ossim/include/ossim/imaging/ossimGeoAnnotationPolyLineObject.h
similarity index 100%
rename from include/ossim/imaging/ossimGeoAnnotationPolyLineObject.h
rename to ossim/include/ossim/imaging/ossimGeoAnnotationPolyLineObject.h
diff --git a/include/ossim/imaging/ossimGeoAnnotationPolyObject.h b/ossim/include/ossim/imaging/ossimGeoAnnotationPolyObject.h
similarity index 100%
rename from include/ossim/imaging/ossimGeoAnnotationPolyObject.h
rename to ossim/include/ossim/imaging/ossimGeoAnnotationPolyObject.h
diff --git a/include/ossim/imaging/ossimGeoAnnotationSource.h b/ossim/include/ossim/imaging/ossimGeoAnnotationSource.h
similarity index 100%
rename from include/ossim/imaging/ossimGeoAnnotationSource.h
rename to ossim/include/ossim/imaging/ossimGeoAnnotationSource.h
diff --git a/ossim/include/ossim/imaging/ossimGeoPolyCutter.h b/ossim/include/ossim/imaging/ossimGeoPolyCutter.h
new file mode 100644
index 0000000..5fc10b1
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimGeoPolyCutter.h
@@ -0,0 +1,221 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author: Garrett Potts (gpotts at imagelinks)
+//
+//*************************************************************************
+// $Id: ossimGeoPolyCutter.h 22303 2013-07-04 18:15:52Z dburken $
+#ifndef ossimGeoPolyCutter_HEADER
+#define ossimGeoPolyCutter_HEADER 1
+#include <ossim/imaging/ossimPolyCutter.h>
+#include <ossim/base/ossimViewInterface.h>
+#include <ossim/base/ossimGeoPolygon.h>
+#include <vector>
+
+class ossimImageData;
+class ossimProjection;
+
+/*!
+ * ossimGeoPolyCutter.
+ *
+ * This classes overrides the 2-d counter part ossimPolyCutter. It will automatically
+ * map 2-D to 3-D (ground) polygons if you add 2-D polygons and will automatically
+ * compute the forward transform when adding a ground polygon.
+ *
+ * you can set the view trough the ossimViewInterface by calling setView(object, true);
+ * it will cast to an ossimProjection and use that as the transformation.  For igen this is
+ * set automatically and does not need to be set by the user.
+ *
+ * This class has no keywords but does use 2 prefix values to store out the view
+ * and the ground polygon for example if we have only one polygon then here is a sample
+ * keyword list for the polygons: NOTE we can have any number of polygons just increment
+ * the geo_polygon0 to geo_polygon1 .. geo_polygonN for the Nth one
+ *
+ * <pre>
+ *
+ * geo_polygon0.datum:  WGE
+ * geo_polygon0.number_vertices:  18
+ * geo_polygon0.type:  ossimGeoPolygon
+ * geo_polygon0.v0:  38.023634368488452 -122.542245818545709 nan
+ * geo_polygon0.v1:  38.016619667868909 -122.548990722987568 nan
+ * geo_polygon0.v2:  38.018238444934966 -122.546292761210807 nan
+ * geo_polygon0.v3:  38.012932453440698 -122.547911538276864 nan
+ * geo_polygon0.v4:  38.014731094625191 -122.542065954427244 nan
+ * geo_polygon0.v5:  38.007446597827986 -122.541796158249582 nan
+ * geo_polygon0.v6:  38.009694899308606 -122.537569351466018 nan
+ * geo_polygon0.v7:  38.005108364288141 -122.537119691169892 nan
+ * geo_polygon0.v8:  38.008255986361007 -122.532353292030976 nan
+ * geo_polygon0.v9:  38.003039926925965 -122.531274107320272 nan
+ * geo_polygon0.v10:  38.013292181677599 -122.529565398195004 nan
+ * geo_polygon0.v11:  38.009874763427050 -122.526867436418243 nan
+ * geo_polygon0.v12:  38.019587425823332 -122.528306349365849 nan
+ * geo_polygon0.v13:  38.023904164666128 -122.537299555288328 nan
+ * geo_polygon0.v14:  38.024983349376825 -122.544584052085540 nan
+ * geo_polygon0.v15:  38.023904164666128 -122.548720926809878 nan
+ * geo_polygon0.v16:  38.022195455540853 -122.562210735693611 nan
+ * geo_polygon0.v17:  38.019317629645663 -122.562930192167400 nan
+ *
+ *
+ * the example for the view information is
+ *
+ * view.central_meridian:  -123.000000000000000
+ * view.datum:  WGE
+ * view.decimal_degrees_per_pixel_lat:  0.000089932059225
+ * view.decimal_degrees_per_pixel_lon:  0.000089932059225
+ * view.ellipse_code:  WE
+ * view.ellipse_name:  WGS 84
+ * view.false_easting:  0.000000000000000
+ * view.false_northing:  0.000000000000000
+ * view.major_axis:  6378137.000000000000000
+ * view.meters_per_pixel_x:  10.000000000000000
+ * view.meters_per_pixel_y:  10.000000000000000
+ * view.minor_axis:  6356752.314199999906123
+ * view.origin_latitude:  0.000000000000000
+ * view.rotation:  0.000000000000000
+ * view.scale_x:  1.000000000000000
+ * view.scale_y:  1.000000000000000
+ * view.tie_point_easting:  0.000000000000000
+ * view.tie_point_lat:  0.000000000000000
+ * view.tie_point_lon:  -123.000000000000000
+ * view.tie_point_northing:  0.000000000000000
+ * view.translation_x:  0.000000000000000
+ * view.translation_y:  0.000000000000000
+ * view.type:  ossimEquDistCylProjection
+ *
+ * </pre> 
+ */
+class OSSIM_DLL ossimGeoPolyCutter : public ossimPolyCutter,
+                                     public ossimViewInterface
+{
+public:
+   ossimGeoPolyCutter();
+
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+   
+   /*!
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   /*!
+    * Sets the polygon to the specified polygon index.
+    * /param polygon A vector of points in projected 2-D.
+    * /param i index of the polygon to change.
+    */
+   virtual void setPolygon(const vector<ossimDpt>& polygon,
+                           ossim_uint32 i = 0);
+   
+   /*!
+    * Sets the polygon to the specified polygon index.
+    * /param polygon A vector of points in projected 2-D.
+    * /param i index of the polygon to change.
+    */
+   virtual void setPolygon(const vector<ossimIpt>& polygon,
+                           ossim_uint32 i = 0);
+
+   /*!
+    * Sets the polygon to the specified polygon index.
+    * /param polygon A Ground polygon.
+    * /param i index of the polygon to change.
+    */
+    virtual void setPolygon(const vector<ossimGpt>& polygon,
+                            ossim_uint32 i = 0);
+
+   virtual void setPolygon(const ossimGeoPolygon& polygon,
+                           ossim_uint32 i = 0);
+   /*!
+    * Will invert this polygon out to world space and add it to the
+    * polygon list
+    */
+   virtual void addPolygon(const vector<ossimIpt>& polygon);
+
+   /*!
+    * Will invert the passed in polygon to world space and add to the
+    * polygon list
+    */
+   virtual void addPolygon(const vector<ossimDpt>& polygon);
+
+   /*!
+    * Will add the ground polygon to the list
+    */
+   virtual void addPolygon(const vector<ossimGpt>& polygon);
+
+   /*!
+    * Will invert te polygon to ground and add.
+    */
+   virtual void addPolygon(const ossimPolygon& polygon);
+
+   /*!
+    * Will add the passed in polygon.
+    */
+   virtual void addPolygon(const ossimGeoPolygon& polygon);
+
+   /*!
+    * Will set the number of polygons and will call the base
+    * class set number of polygons.
+    */
+   virtual void setNumberOfPolygons(ossim_uint32 count);
+
+   /*!
+    * This should only be used for informational uses only.  If updates
+    * are to be made please go through the access methods that change
+    * the polygon data.
+    */
+   virtual std::vector<ossimGeoPolygon>& getGeoPolygonList();
+
+   virtual const std::vector<ossimGeoPolygon>& getGeoPolygonList()const;
+
+
+   /*!
+    * Will set the view to the passed in object.  Once set it will project the
+    * ground polygon relative to the passed in view.
+    */
+   virtual bool setView(ossimObject* baseObject);
+
+   /*!
+    * \return The current view for this object.
+    */
+   virtual ossimObject* getView();
+   
+   /*!
+    * \return The constant pointer to the current view for this object.
+    */
+   virtual const ossimObject* getView()const;
+   
+protected:
+   virtual ~ossimGeoPolyCutter();
+
+   /*!
+    * Utility method used to invert any passed in projected polygons to
+    * be changed or added to the list.
+    * \param polygonNumber the index of the polygon to invert to ground.
+    */ 
+   void invertPolygon(int polygonNumber);
+
+   /*!
+    * Transforms all vertices based on the current m_viewProjection.
+    */
+   void transformVertices();
+
+   /*!
+    * Transforms the specified polygon index.
+    * \param i The polygon index to project.
+    */
+   void transformVertices(int i);
+
+   /*!
+    * The view projection used to project the ground coordinates.
+    */
+   ossimRefPtr<ossimImageGeometry> m_viewGeometry;
+
+   std::vector<ossimGeoPolygon> m_geoPolygonList;
+
+   
+TYPE_DATA  
+};
+
+#endif /* #ifndef ossimGeoPolyCutter_HEADER */
diff --git a/include/ossim/imaging/ossimGeographicAnnotationGrid.h b/ossim/include/ossim/imaging/ossimGeographicAnnotationGrid.h
similarity index 100%
rename from include/ossim/imaging/ossimGeographicAnnotationGrid.h
rename to ossim/include/ossim/imaging/ossimGeographicAnnotationGrid.h
diff --git a/ossim/include/ossim/imaging/ossimGeomFileWriter.h b/ossim/include/ossim/imaging/ossimGeomFileWriter.h
new file mode 100644
index 0000000..9021e4e
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimGeomFileWriter.h
@@ -0,0 +1,58 @@
+//*******************************************************************
+// Copyright (C) 2003 Storage Area Networks, Inc.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Kenneth Melero (kmelero at sanz.com)
+//
+//*******************************************************************
+//  $Id: ossimGeomFileWriter.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimGeomFileWriter_H
+#define ossimGeomFileWriter_H
+
+#include <ossim/imaging/ossimMetadataFileWriter.h>
+
+/** ossimGeomFileWriter */
+class OSSIMDLLEXPORT ossimGeomFileWriter : public ossimMetadataFileWriter
+{
+public:
+   /** default constructor */
+   ossimGeomFileWriter();
+
+
+   /**
+    * Satisfies pure virtual from ossimMetadataWriter base.
+    *
+    * Appends the writers image types to the "metadatatypeList".
+    * 
+    * @param metadatatypeList stl::vector<ossimString> list to append to.
+    *
+    * @note Appends to the list, does not clear it first.
+    */
+   virtual void getMetadatatypeList(
+      std::vector<ossimString>& metadatatypeList) const;
+
+   /**
+    * Satisfies pure virtual from ossimMetadataWriter base.
+    *
+    * @param imageType string representing image type.
+    *
+    * @return true if "metadataType" is supported by writer.
+    */
+   virtual bool hasMetadataType(const ossimString& metadataType)const;
+
+protected:
+   /** virtual destructor */
+   virtual ~ossimGeomFileWriter();
+
+   /** Write a geometry file to "theFilename". */
+   virtual bool writeFile();
+   
+TYPE_DATA
+};
+
+#endif /* End of #ifndef ossimGeomFileWriter_H */
+
diff --git a/ossim/include/ossim/imaging/ossimGpkgWriterInterface.h b/ossim/include/ossim/imaging/ossimGpkgWriterInterface.h
new file mode 100644
index 0000000..2a4e190
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimGpkgWriterInterface.h
@@ -0,0 +1,73 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Interface for GeoPackage(gpkg) writers.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossimGpkgWriterInterface_HEADER
+#define ossimGpkgWriterInterface_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimRefPtr.h>
+
+class ossimImageData;
+class ossimKeywordlist;
+
+/**
+ * @class GeoPackage writer interface.
+ *
+ * This interface is for using the ossimGeopackageWriter in a connectionless
+ * manner.  See ossim-gpkg-writer-test.cpp for example usage.
+ */
+class OSSIM_DLL ossimGpkgWriterInterface
+{
+public:
+
+   /**
+    * @brief Opens file for writing, appending, merging without an input
+    * connection. I.e. opening, then calling writeTile directly.
+    * 
+    * @param options.  Keyword list containing all options.
+    */
+   virtual bool openFile( const ossimKeywordlist& options ) = 0;
+
+   /**
+    * @brief Calls initial sqlite3_prepare_v2 statement.  Must be called
+    * prior to calling writeTile.
+    * @return SQLITE_OK(0) on success, something other(non-zero) on failure.
+    */
+   virtual ossim_int32 beginTileProcessing() = 0;
+   
+   /**
+    * @brief Direct interface to writing a tile to database.
+    * @param tile to write.
+    * @param zoolLevel
+    * @param row
+    * @param col
+    * @return true on success, false on error.
+    */   
+   virtual bool writeTile( ossimRefPtr<ossimImageData>& tile,
+                           ossim_int32 zoomLevel,
+                           ossim_int64 row,
+                           ossim_int64 col ) = 0;
+   virtual bool writeCodecTile( ossim_uint8* codecTile,
+                                ossim_int32 codecTileSize,
+                                ossim_int32 zoomLevel,
+                                ossim_int64 row,
+                                ossim_int64 col ) = 0;
+
+   /**
+    * @brief Calls sqlite3_finalize(pStmt) terminating tile processing.
+    */
+   virtual void finalizeTileProcessing() = 0;
+   
+};
+
+#endif /* End of "#ifndef ossimGpkgWriterInterface_HEADER" */
+
diff --git a/ossim/include/ossim/imaging/ossimGridRemapEngine.h b/ossim/include/ossim/imaging/ossimGridRemapEngine.h
new file mode 100644
index 0000000..56e9a36
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimGridRemapEngine.h
@@ -0,0 +1,71 @@
+//*****************************************************************************
+// FILE: ossimGridRemapEngine.h
+//
+// Copyright (C) 2001 ImageLinks, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Contains declaration of class 
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimGridRemapEngine.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimGridRemapEngine_HEADER
+#define ossimGridRemapEngine_HEADER
+
+#include <vector>
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimRefPtr.h>
+
+class ossimDpt;
+class ossimGridRemapSource;
+class ossimImageData;
+class ossimAtbPointSource;
+
+/*!****************************************************************************
+ *
+ * CLASS: ossimGridRemapEngine 
+ *
+ *****************************************************************************/
+class ossimGridRemapEngine : public ossimObject
+{
+public:
+   virtual ossimObject* dup() const = 0;
+   
+   virtual void remapTile(const ossimDpt&       origin_point,
+                          ossimGridRemapSource* remapper,
+                          ossimRefPtr<ossimImageData>& tile) = 0;
+
+   virtual void assignRemapValues(std::vector<ossimAtbPointSource*>& sources)=0;
+
+   virtual void computeSourceValue(ossimRefPtr<ossimImageData>& source,
+                                   void* result) = 0;
+
+   int  getNumberOfParams() const { return theNumberOfParams; }
+   
+   int  getNumberOfBands()  const { return theNumberOfBands; }
+   
+protected:
+   ossimGridRemapEngine(int numParams, int numBands)
+      : theNumberOfParams(numParams), theNumberOfBands(numBands) {}
+
+   ossimGridRemapEngine() {}
+   virtual ~ossimGridRemapEngine() {}
+
+   virtual void computeRemapNode(ossimAtbPointSource*  point_source,
+                                 void*                 source_value,
+                                 void*                 target_value) = 0;
+   int  theNumberOfParams;
+   int  theNumberOfBands;
+
+   TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimGridRemapEngineFactory.h b/ossim/include/ossim/imaging/ossimGridRemapEngineFactory.h
new file mode 100644
index 0000000..fff3191
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimGridRemapEngineFactory.h
@@ -0,0 +1,37 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// AUTHOR: Oscar Kramer (okramer at imagelinks.com)
+//
+// DESCRIPTION: Contains declaration of class ossimGridRemapEngineFactory
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimGridRemapEngineFactory.h 23356 2015-06-03 18:28:03Z dburken $
+
+#ifndef ossimGridRemapEngineFactory_HEADER
+#define ossimGridRemapEngineFactory_HEADER 1
+
+#include <ossim/imaging/ossimGridRemapEngine.h>
+
+/*!****************************************************************************
+ *
+ * CLASS:  ossimGridRemapEngineFactory (SIMPLETON)
+ *
+ *****************************************************************************/
+class OSSIM_DLL ossimGridRemapEngineFactory
+{
+public:
+   /*!
+    * Attempts to create an instance of the Product given a Specifier. Returns
+    * successfully constructed product or NULL.
+    */
+   static ossimGridRemapEngine* create(const char* spec);
+   
+protected:
+   ossimGridRemapEngineFactory() {}
+};
+
+#endif
diff --git a/ossim/include/ossim/imaging/ossimGridRemapSource.h b/ossim/include/ossim/imaging/ossimGridRemapSource.h
new file mode 100644
index 0000000..3baa131
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimGridRemapSource.h
@@ -0,0 +1,145 @@
+//*****************************************************************************
+// FILE: ossimGridRemapSource.h
+//
+// Copyright (C) 2001 ImageLinks, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Contains declaration of class ossimGridRemapSource. This is
+//   a spacially variant remapper that utilizes a grid for interpolating the
+//   remap value given an image x, y. 
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimGridRemapSource.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimGridRemapSource_HEADER
+#define ossimGridRemapSource_HEADER
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+#include <vector>
+#include <ossim/imaging/ossimGridRemapEngine.h>
+#include <ossim/base/ossimFilename.h>
+
+class ossimDblGrid;
+class ossimDrect;
+class ossimDpt;
+class ossimImageData;
+
+/*!****************************************************************************
+ *
+ * CLASS:  ossimGridRemapSource
+ *
+ *****************************************************************************/
+class ossimGridRemapSource : public ossimImageSourceFilter
+{
+public:
+   /*!
+    * Constructors: 
+    */
+   ossimGridRemapSource();
+   ossimGridRemapSource(ossimImageSource* inputSource,
+                        ossimGridRemapEngine* engine);
+
+   /*!ossimAtbPointSource
+    * Initializes the remap engine. This object implements specific algorithms
+    * for interpreting the grids owned by this remapper. It actually performs
+    * the remapping.
+    */
+   void setRemapEngine(ossimGridRemapEngine* engine);
+   
+   /*!
+    * Provides access to the remap engine:
+    */
+   ossimGridRemapEngine* getRemapEngine() { return theRemapEngine; }
+   
+   /*!
+    * Permits initializing the remap grid after construction. 
+    */
+   virtual void initialize(const ossimDrect& uv_rect,
+			   const ossimDpt&   grid_spacing);
+
+  /*!
+   * Sets a node of the member grid to the value specified. The grid is flagged
+   * as unfilled.
+   */
+  void setGridNode(const ossimDpt& view_pt,
+		   const double*    value);
+  
+   /*!
+    * Implementation of virtual method to return remapped tile.
+    */
+   virtual ossimRefPtr<ossimImageData> getTile(const  ossimIrect& origin,
+                                   ossim_uint32 resLevel=0);
+
+   /*!
+    * Restore the state of the object from a keywordlist.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   /*!
+    * Save the state of the object to a keywordlist.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+   /*!
+    * Locks the image to prevent grid adjustment. The remapper continues to
+    * remap given the current grid (if enabled), but all target values computed
+    * are such that no change in the grids will occur in an adjsutment. If more
+    * than one overlapping image is locked, the target will may be influenced
+    * by all locked images, but the remap grids will not be updated.
+    */
+   void lock() { theRemapIsLockedFlag = true; }
+
+   /*!
+    * Unlocks the grids for adjustment.
+    */
+   void unlock() { theRemapIsLockedFlag = false; }
+   
+   /*!
+    * Returns the status of the lock flag.
+    */
+   bool isLocked() const { return theRemapIsLockedFlag; }
+
+   /*!
+    * Provides access to individual grids (pointer) given an index. Null pointer
+    * returned if index out of range.
+    */
+   ossimDblGrid* getGrid(unsigned int index);
+
+   /*!
+    * Returns grid filename (may be empty)
+    */
+   const ossimFilename& getGridFilename() const { return theGridFilename; }
+
+   /*!
+    * Sets the grid filename and initiates read.
+    */
+   void setGridFilename(const ossimFilename& grid_filename);
+   
+protected:
+   virtual ~ossimGridRemapSource();
+
+   /*!
+    * Deallocates grid memory.
+    */
+   void deallocateGrids();
+   
+   vector<ossimDblGrid*> theGrids;
+   ossimFilename         theGridFilename;
+   ossimGridRemapEngine* theRemapEngine;
+   bool                  theRemapIsLockedFlag;
+   bool                  theGridIsFilled;
+   
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimHistoMatchRemapper.h b/ossim/include/ossim/imaging/ossimHistoMatchRemapper.h
new file mode 100644
index 0000000..4c9de25
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimHistoMatchRemapper.h
@@ -0,0 +1,98 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimHistoMatchRemapper.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimHistoMatchRemapper_HEADER
+#define ossimHistoMatchRemapper_HEADER 1
+#include <vector>
+using namespace std;
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+class OSSIM_DLL ossimHistoMatchRemapper: public ossimImageSourceFilter
+{
+public:
+   ossimHistoMatchRemapper();
+   ossimHistoMatchRemapper(ossimImageSource* inputSource,
+                           const vector<double>& targetMeanPerBand  = vector<double>(),
+                           const vector<double>& targetSigmaPerBand = vector<double>(),
+                           const vector<double>& inputMeanPerBand   = vector<double>(),
+                           const vector<double>& inputSigmaPerBand  = vector<double>()
+                           );
+
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+   virtual void initialize();
+   
+   const vector<double>& getInputMeanValues()const;
+   const vector<double>& getInputSigmaValues()const;
+   const vector<double>& getTargetMeanValues()const;
+   const vector<double>& getTargetSigmaValues()const;
+
+   void setInputMeanValues(const vector<double>& newValues);
+   void setInputSigmaValues(const vector<double>& newValues);
+   void setTargetMeanValues(const vector<double>& newValues);
+   void setTargetSigmaValues(const vector<double>& newValues);
+   
+
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=NULL);
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=NULL);
+
+protected:
+   virtual ~ossimHistoMatchRemapper();
+   
+   ossimRefPtr<ossimImageData> theBlankTile;
+   
+   vector<double> theTargetMeanPerBand;
+   vector<double> theTargetSigmaPerBand;
+   vector<double> theInputMeanPerBand;
+   vector<double> theInputSigmaPerBand;
+
+   /**
+    * transLean
+    * @param vIn input value to be transformed
+    * @param vBias bias value to be removed
+    * @param vTarget value that will replace bias
+    * @param vMin minimum valid value of vIn (inclusive)
+    * @param vMax maximum valid value of vIn (inclusive)
+    * @return vOut
+    */
+   double transLean(double vIn,
+                    double vBias,
+                    double vTarget,
+                    double vMin,
+                    double vMax);
+
+   /**
+    * transLeanStretch
+    * @param vin Input value to be transformed.
+    * @param vBias Bias value to be removed.
+    * @param vBiasStretch dispersion (+/-) about vBias
+    * @param vTarget value that will replace bias
+    * @param vTargetStretch dispersion (+/-) about vTarget
+    * @param vMin minimum valid value of vIn (inclusive)
+    * @param vMax maximum valid value of vIn (inclusive)
+    * @return vOut
+    */
+   double transLeanStretch(double vIn,
+                           double vBias,
+                           double vBiasStretch,
+                           double vTarget,
+                           double vTargetStretch,
+                           double vMin,
+                           double vMax);
+   
+};
+
+#endif /* #ifndef ossimHistoMatchRemapper_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimHistogramEqualization.h b/ossim/include/ossim/imaging/ossimHistogramEqualization.h
new file mode 100644
index 0000000..f933a36
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimHistogramEqualization.h
@@ -0,0 +1,100 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimHistogramEqualization.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimHistogramEqualization_HEADER
+#define ossimHistogramEqualization_HEADER
+#include <ossim/imaging/ossimImageSourceHistogramFilter.h>
+
+class OSSIMDLLEXPORT ossimHistogramEqualization : public ossimImageSourceHistogramFilter
+{
+public:
+   ossimHistogramEqualization();
+   ossimHistogramEqualization(ossimImageSource* inputSource,
+                              ossimRefPtr<ossimMultiResLevelHistogram> histogram);
+   ossimHistogramEqualization(ossimImageSource* inputSource,
+                              ossimRefPtr<ossimMultiResLevelHistogram> histogram,
+                              bool inverseFlag);
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+
+   virtual void setHistogram(ossimRefPtr<ossimMultiResLevelHistogram> histogram);
+   virtual bool setHistogram(const ossimFilename& filename);
+
+   virtual bool getInverseFlag()const;
+   virtual void initialize();
+   virtual void setInverseFlag(bool inverseFlag);
+   
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=NULL);
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=NULL)const;
+
+   virtual std::ostream& print(std::ostream& out) const;
+
+protected:
+   virtual ~ossimHistogramEqualization();
+
+   /**
+    * Called on first getTile, will initialize all data needed.
+    */
+   void allocate();
+   
+  ossimRefPtr<ossimImageData> theTile;
+   /*!
+    * This will be used in some of the histogram
+    * based operations.
+    */
+   ossimRefPtr<ossimMultiResLevelHistogram> theAccumulationHistogram;
+
+   /*!
+    * Indicates if you should equalize or unequalize an input stream.
+    * If the inverse flag is true then it will indicate that we should
+    * assume that the input stream is already equalized and we should
+    * invert based on the current accumulation histogram.
+    *
+    *
+    * This flag is defaulted to false.
+    */
+   bool                         theInverseFlag;
+   /*!
+    * We will create a LUT for each band that directly maps
+    * an input value to an equalized output.
+    */
+   vector<double*> theForwardLut;
+   
+   /*!
+    * We will create a LUT for each band that directly maps
+    * an input value to an un-equalized output.
+    */
+   vector<double*> theInverseLut;
+
+   
+  std::vector<ossim_uint32> theBandList;
+   virtual void computeAccumulationHistogram();
+
+  template<class T>
+  ossimRefPtr<ossimImageData> runEqualizationAlgorithm(T dummyVariable,
+                                                       ossimRefPtr<ossimImageData> tile);
+
+   /*!
+    * We will pre-compute the luts for the forward and inverse
+    * equalization.  Note: the inverse is a little more tricky
+    * and since we must fill the empty spots missed by the
+    * inverse.  We use a linear interpolation between valid
+    * values for this.
+    */
+   virtual void initializeLuts();
+   virtual void deleteLuts();
+
+TYPE_DATA
+};
+#endif /* #ifndef ossimHistogramEqualization_HEADER */
+
diff --git a/include/ossim/imaging/ossimHistogramMatchFilter.h b/ossim/include/ossim/imaging/ossimHistogramMatchFilter.h
similarity index 100%
rename from include/ossim/imaging/ossimHistogramMatchFilter.h
rename to ossim/include/ossim/imaging/ossimHistogramMatchFilter.h
diff --git a/ossim/include/ossim/imaging/ossimHistogramRemapper.h b/ossim/include/ossim/imaging/ossimHistogramRemapper.h
new file mode 100644
index 0000000..de7d601
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimHistogramRemapper.h
@@ -0,0 +1,574 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Histogram remapper class declaration.  Derived from ossimTableRemapper.
+//
+// Remaps a tile based on mode and histogram clip points.  This object uses
+// a precomputed remap table for speed; hence, derived from the
+// ossimTableRemapper
+//
+// NOTE on bands:
+// 
+// - All methods take zero based bands.  In other words the first
+//   band is band "0".  
+//
+// - This objects band 0 is the same band 0 as it's input connection.  If
+//   the band order was changed by a ossimBandSelector then this band 0 will
+//   not map to the histogram files band 0.  To handle this,
+//   the "getOutputBandList()" method is used to get the correct histogram for
+//   the input band.
+//   
+// - The "get" methods that do not take a band, simply return the average of
+//   all bands.  This really only makes sense if all bands are the same
+//   but is provided for convenience.
+//   
+//*************************************************************************
+// $Id: ossimHistogramRemapper.h 22746 2014-04-23 16:16:28Z gpotts $
+#ifndef ossimHistogramRemapper_HEADER
+#define ossimHistogramRemapper_HEADER
+
+#include <ossim/imaging/ossimTableRemapper.h>
+#include <ossim/base/ossimMultiResLevelHistogram.h>
+
+
+class OSSIMDLLEXPORT ossimHistogramRemapper : public ossimTableRemapper
+{
+public:
+   enum StretchMode
+   {
+      LINEAR_ONE_PIECE      = 0,
+      LINEAR_1STD_FROM_MEAN = 1,
+      LINEAR_2STD_FROM_MEAN = 2,
+      LINEAR_3STD_FROM_MEAN = 3,
+      LINEAR_AUTO_MIN_MAX   = 4,
+      STRETCH_UNKNOWN = 5 // Alway last as used for number of modes method.
+   };
+
+   /** default constructor */
+   ossimHistogramRemapper();
+
+
+   virtual ossimString getLongName()  const;
+   virtual ossimString getShortName() const;
+
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect,
+                                               ossim_uint32 resLevel=0);
+
+   virtual void initialize();
+   /**
+    * - Disables this source.
+    * - Sets all clip points to default.
+    * - Removes current table.
+    */
+   void reset();
+   
+   /**
+    * Sets remap mode to mode.  If rebuildTableFlag is true, the table will
+    * be built at this time; else just the dirty flag is set.
+    *
+    * @param mode The stretch mode.
+    * 
+    * @param rebuildTableFlag If the true the table will be rebuilt; else,
+    * just the dirty flag will be set.
+    */
+   void setStretchMode(StretchMode mode, bool rebuildTableFlag=false);
+
+   /**
+    * Stretch mode values can be linear_one_piece, linear_1std_from_mean,
+    * linear_2std_from_mean, linear_3std_from_mean, linear_auto_min_max,
+    * If rebuildTableFlag is true, the table will
+    * be built at this time; else just the dirty flag is set.
+    *
+    * @param mode The stretch mode.
+    * 
+    * @param rebuildTableFlag If the true the table will be rebuilt; else,
+    * just the dirty flag will be set.
+    */
+   void setStretchModeAsString(const ossimString& mode,
+                               bool rebuildTableFlag=false);
+   
+   /**
+    * Returns the current enumerated node.
+    */
+   StretchMode   getStretchMode() const;
+
+   /**
+    * Returns the string for current remap mode.
+    */
+   ossimString getStretchModeString() const;
+
+   /**
+    * Returns the number of stretch modes.
+    */
+   ossim_uint32 getNumberOfStretchModes() const;
+
+   /**
+    * Returns the mode string for a given index.
+    * Returns "stretch_unknown" if index is out of range.
+    * 
+    * NOTE:
+    * - If you're building gui buttons you can:
+    *   // pseudo code...
+    *   ossim_uint32 number_of_modes = remapper->getNumberOfModes()
+    *   for (ossim_uint32 i = 0; i < number_of_modes; ++i)
+    *   {
+    *      addButton(getModeString(i).c_str());
+    *   }
+    */
+   ossimString getStretchModeString(ossim_uint32 index) const;
+   
+   /**
+    * Sets the low clip point.
+    *
+    * Note on null bin:
+    * - The null bin is ignored when considering a percent of penetration from
+    *   the low end.
+    *
+    * Notes on clip point:
+    * - If input chip source is mutiband this will set all band to same
+    *   percentage of clip.
+    * - Clip points should be normalized between zero and one.
+    * - A low clip point of 0.0 means no penetration.
+    * - A low clip point of 0.02 means penetrate in two percent.
+    */
+   void setLowNormalizedClipPoint(const ossim_float64& clip);
+
+   /**
+    * Sets the low clip point for band.
+    *
+    * Note on null bin:
+    * - The null bin is ignored when considering a percent of penetration from
+    *   the low end.
+    *
+    * Notes on clip points:
+    * - Clip point should be normalized between zero and one.
+    * - A low clip point of 0.0 means no penetration.
+    * - A low clip point of 0.02 means penetrate in two percent.
+    */
+   void setLowNormalizedClipPoint(const ossim_float64& clip,
+                                  ossim_uint32 zero_based_band);
+
+   /**
+    * Sets the high clip point.
+    * 
+    * Notes on clip points:
+    * - If input chip source is mutiband this will set all band to same
+    *   percentage of clip.
+    * - Clip point should be normalized between zero and one.
+    * - A high clip point of 1.0 means no penetration.
+    * - A high clip point of .98 mean a 2 % penetration from the high end.
+    */
+   void setHighNormalizedClipPoint(const ossim_float64& clip);
+
+   /**
+    * Sets the high clip point.
+    *
+    * Notes on clip points:
+    * - Clip point should be normalized between zero and one.
+    * - A high clip point of 1.0 means no penetration.
+    * - A high clip point of .98 mean a 2 % penetration from the high end.
+    */
+   void setHighNormalizedClipPoint(const ossim_float64& clip,
+                                   ossim_uint32 zero_based_band);
+
+   /**
+    * Sets the low clip point.
+    *
+    * Notes on clip point:
+    * - If input chip source is mutiband this will set all band to same
+    *   percentage of clip.
+    * - Clip points are in DN values.
+    * - If histogram is not set no action is taken. 
+    */
+   void setLowClipPoint(const ossim_float64& clip);
+
+   /**
+    * Sets the low clip point for band.
+    *
+    * Notes on clip points:
+    * - Clip points are DN values.
+    * - If histogram is not set no action is taken. 
+    */
+   void setLowClipPoint(const ossim_float64& clip,
+                        ossim_uint32 zero_based_band);
+
+   /**
+    * Sets the high clip point.
+    * 
+    * Notes on clip points:
+    * - If input chip source is mutiband this will set all band to same
+    *   percentage of clip.
+    * - Clip points are DN values.
+    * - If histogram is not set no action is taken. 
+    */
+   void setHighClipPoint(const ossim_float64& clip);
+
+   /**
+    * Sets the high clip point.
+    *
+    * Notes on clip points:
+    * - Clip points are DN values.
+    * - If histogram is not set no action is taken. 
+    */
+   void setHighClipPoint(const ossim_float64& clip,
+                         ossim_uint32 zero_based_band);
+
+   /**
+    * Sets the mid clip point.
+    * 
+    * Notes on clip points:
+    * - If input chip source is mutiband this will set all band to same
+    *   percentage of clip.
+    */
+   void setMidPoint(const ossim_float64& value);
+
+   /**
+    * Sets the mid clip point for band.
+    */
+   void setMidPoint(const ossim_float64& value,
+                    ossim_uint32 zero_based_band);
+
+   /**
+    * Sets the min output value.
+    * 
+    * Notes on clip points:
+    * - If input chip source is mutiband this will set all band to same
+    *   percentage of clip.
+    */
+   void setMinOutputValue(const ossim_float64& value);
+
+   /**
+    * Sets the min output value for band.
+    */
+   void setMinOutputValue(const ossim_float64& value,
+                          ossim_uint32 zero_based_band);
+
+   /**
+    * Sets the max output value.
+    * 
+    * Notes on clip points:
+    * - If input chip source is mutiband this will set all band to same
+    *   percentage of clip.
+    */
+   void setMaxOutputValue(const ossim_float64& value);
+
+   /**
+    * Sets the min output value for band.
+    */
+   void setMaxOutputValue(const ossim_float64& value,
+                          ossim_uint32 zero_based_band);
+   
+   /**
+    * Returns the normalized low clip point for band.
+    * Will return OSSIM_DBL_NAN if:
+    * - Band is out of range.
+    * - Connection is not complete.
+    * - Histogram has not been set.
+    */
+   ossim_float64 getLowNormalizedClipPoint(ossim_uint32 zero_based_band) const;
+
+   /**
+    * Returns the normalized low clip point which is the average of all bands.
+    * 
+    * Will return OSSIM_DBL_NAN if:
+    * - Band is out of range.
+    * - Connection is not complete.
+    * - Histogram has not been set.
+    */
+   ossim_float64 getLowNormalizedClipPoint() const;
+
+   /**
+    * Returns the normalized high clip point for band.
+    *
+    * Will return OSSIM_DBL_NAN if:
+    * - Band is out of range.
+    * - Connection is not complete.
+    * - Histogram has not been set.
+    */
+   ossim_float64 getHighNormalizedClipPoint(ossim_uint32 zero_based_band) const;
+   /**
+    * Returns the normalized High clip point which is the average of all bands.
+    * 
+    * Will return OSSIM_DBL_NAN if:
+    * - Band is out of range.
+    * - Connection is not complete.
+    * - Histogram has not been set.
+    */
+   ossim_float64 getHighNormalizedClipPoint() const;
+
+   /**
+    * Returns the low clip point for band.
+    * Clip points are DN values relative to the scalar type.
+    *
+    * Will return OSSIM_DBL_NAN if:
+    * - Band is out of range.
+    * - Connection is not complete.
+    * - Histogram has not been set.
+    */
+   ossim_float64 getLowClipPoint(ossim_uint32 zero_based_band) const;
+
+   /**
+    * Returns the low clip point which is the average of all bands.
+    * 
+    * Will return OSSIM_DBL_NAN if:
+    * - Band is out of range.
+    * - Connection is not complete.
+    * - Histogram has not been set.
+    */
+   ossim_float64 getLowClipPoint() const;
+
+   /**
+    * Returns the high clip point for band.
+    * Clip points are DN values relative to the scalar type.
+    *
+    * Will return OSSIM_DBL_NAN if:
+    * - Band is out of range.
+    * - Connection is not complete.
+    * - Histogram has not been set.
+    */
+   ossim_float64 getHighClipPoint(ossim_uint32 zero_based_band) const;
+
+   /**
+    * Returns the high clip point which is the average of all bands.
+    * 
+    * Will return OSSIM_DBL_NAN if:
+    * - Band is out of range.
+    * - Connection is not complete.
+    * - Histogram has not been set.
+    */
+   ossim_float64 getHighClipPoint() const;
+
+   
+   /**
+    * Returns the mid point for band
+    * 
+    * Will return OSSIM_DBL_NAN if:
+    * - Band is out of range.
+    * - Connection is not complete.
+    * - Histogram has not been set.
+    */
+   ossim_float64 getMidPoint(ossim_uint32 zero_based_band) const;
+   
+   /**
+    * Returns the mid clip point which is the average of all bands.
+    * 
+    * Will return OSSIM_DBL_NAN if:
+    * - Band is out of range.
+    * - Connection is not complete.
+    * - Histogram has not been set.
+    */
+   ossim_float64 getMidPoint() const;
+   
+   /**
+    * Returns the minimum output value for band.
+    * 
+    * Will return OSSIM_DBL_NAN if:
+    * - Band is out of range.
+    * - Connection is not complete.
+    */
+   ossim_float64 getMinOutputValue(ossim_uint32 zero_based_band) const;
+
+   /**
+    * Returns the minimum output value which is the average of all bands.
+    * 
+    * Will return OSSIM_DBL_NAN if:
+    * - Band is out of range.
+    * - Connection is not complete.
+    */
+   ossim_float64 getMinOutputValue() const;
+
+   /**
+    * Returns the maximum output value for band.
+    * 
+    * Will return OSSIM_DBL_NAN if:
+    * - Band is out of range.
+    * - Connection is not complete.
+    */
+   ossim_float64 getMaxOutputValue(ossim_uint32 zero_based_band) const;
+
+   /**
+    * Returns the maximum output value which is the average of all bands.
+    * 
+    * Will return OSSIM_DBL_NAN if:
+    * - Band is out of range.
+    * - Connection is not complete.
+    */
+   ossim_float64 getMaxOutputValue() const;
+   
+   /**
+    * Sets the histogram.
+    * If (own_histogram == true) this object will delete theHistogram
+    * on destruction.
+    */
+   void setHistogram(ossimRefPtr<ossimMultiResLevelHistogram> histogram);
+   
+   ossimRefPtr<ossimMultiResLevelHistogram> getHistogram();
+   ossimRefPtr<const ossimMultiResLevelHistogram> getHistogram()const;
+   
+   /**
+    * Returns pointer to histogram for band and reduced res level.
+    * - Band is zero based relative to the input connection.  This will be
+    *   remapped to the histogram band using the "getOutputBandList()" to
+    *   get the correct histogram band.
+    *   
+    * Will return NULL if:
+    * - band is out range
+    * - res_level is out of range
+    * - theHistogram has not been initialized yet.
+    */
+   ossimRefPtr<ossimHistogram> getHistogram(ossim_uint32 zero_based_band,
+                                ossim_uint32 res_level=0) const;
+
+   /**
+    * Open the histogram file.
+    * With this method the histogram is owned by this object.
+    * Returns true on success, false on error.
+    */
+   bool openHistogram(const ossimFilename& histogram_file);
+
+   /**
+    * Returns the currently opened histogram.
+    * Returns ossimFilename::NIL if no histogram is loaded.
+    */
+   ossimFilename getHistogramFile() const;
+   
+   /**
+    * Method to the save the state to a keyword list.
+    * Returns true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.
+    * Returns true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+   
+   virtual ostream& print(ostream& os) const;
+
+   /**
+    * Returns the min pixel of the band.
+    */
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   
+   /**
+    * Returns the max pixel of the band.
+    */
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+
+   /**
+    * Will test for the input being a ossimHistogramSource and allow pulling the histogram
+    * from a histogram source.
+    */
+   bool canConnectMyInputTo(ossim_int32 inputIndex,
+                            const ossimConnectableObject* object)const;
+
+protected:
+   /** virtual destructor */
+   virtual ~ossimHistogramRemapper();
+
+private:
+   // Do not allow copy constructor, operator=.
+   ossimHistogramRemapper(const ossimHistogramRemapper& hr);
+   ossimHistogramRemapper& operator=(const ossimHistogramRemapper& hr);
+
+   void buildTable();
+   void buildLinearTable();
+   void buildAutoLinearMinMaxTable();
+   template <class T> void buildLinearTable(T dummy);
+   template <class T> void buildAutoLinearMinMaxTableTemplate(T dummy);
+
+   /**
+    * Sets clip points using mean and standard deviations then calls
+    * buildLinearTable method.
+    */
+   void buildLinearTableStdFromMean();
+   
+   /**
+    * Uses getNumberOfInputBands() to determine BANDS then calls
+    * initializeClips(BANDS)
+    */
+   void initializeClips();
+
+   /**
+    * Initializes data members to some default state and size.
+    */
+   void initializeClips(ossim_uint32 bands);
+
+   /*
+    * Sets the count of the null bin to 0 so that clips from the low end
+    * ignore the null bin.
+    */
+   void setNullCount();
+
+   void initializeMinMaxOutput();
+   
+   /**
+    * Initialized base class (ossimTableRemapper) values:
+    * - theTableBinCount
+    * - theTableBandCount
+    * - theTableType
+    * - theTable (resizes if not correct size.
+    */
+   void setupTable();
+
+   /**
+    * This set theBypassFlag.  This is an internally used flag to signal that
+    * there is nothing to do in this filter; hence, bypass.
+    */
+   void verifyEnabled();
+
+   /**
+    * Returns the histogram band that maps to the input band.
+    * Note:
+    * - This uses the current band list from "getOutputBandList()".
+    */
+   ossim_uint32 getHistogramBand(ossim_uint32 input_band) const;
+
+   /**
+    * Sets theBypassFlag.  If the start changes from bypassed to not bypassed
+    * this will set theDirtyFlag to true.
+    */
+   void setBypassFlag(bool flag);
+
+   /**
+   * If we are dirty then it will init what it needs and then set
+   * the dirty back to false;
+   */
+   void makeClean();
+
+   template <class T> void applyLinearStretch(
+      T dummy,
+      ossimRefPtr<ossimImageData>& inputTile);
+
+
+   StretchMode                   theStretchMode;
+   bool                          theDirtyFlag;
+   mutable ossimRefPtr<ossimMultiResLevelHistogram>  theHistogram;
+   vector<ossim_float64>         theNormalizedLowClipPoint;
+   vector<ossim_float64>         theNormalizedHighClipPoint;
+   vector<ossim_float64>         theMidPoint;
+   vector<ossim_float64>         theMinOutputValue;
+   vector<ossim_float64>         theMaxOutputValue;
+
+   // Maps zero based band to histogram band.
+   vector<ossim_uint32>          theBandList;
+
+   // Internally bypassed flag.
+   bool theBypassFlag;
+   bool theResetBandIndicesFlag;
+
+   TYPE_DATA
+};
+
+#endif  /* #ifndef ossimHistogramRemapper_HEADER */
diff --git a/ossim/include/ossim/imaging/ossimHistogramThreshholdFilter.h b/ossim/include/ossim/imaging/ossimHistogramThreshholdFilter.h
new file mode 100644
index 0000000..c0d1328
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimHistogramThreshholdFilter.h
@@ -0,0 +1,52 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimHistogramThreshholdFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimHistogramThreshholdFilter_HEADER
+#define ossimHistogramThreshholdFilter_HEADER
+#include <ossim/imaging/ossimImageSourceHistogramFilter.h>
+
+class ossimHistogramThreshholdFilter : public ossimImageSourceHistogramFilter
+{
+public:
+   ossimHistogramThreshholdFilter();
+   ossimHistogramThreshholdFilter(double minValuePercent,
+                                  double maxValuePercent,
+                                  ossimImageSource* inputSource,
+                                  ossimMultiResLevelHistogram* histogram);
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+   
+   virtual void setMinValuePercent(double minValue);
+   virtual void setMaxValuePercent(double maxValue);
+   
+   virtual double getMinValuePercent()const;
+   virtual double getMaxValuePercent()const;
+
+   virtual void initialize();
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+   
+protected:
+   virtual ~ossimHistogramThreshholdFilter();
+   
+   double theMinValuePercent;
+   double theMaxValuePercent;
+   template <class T>
+   ossimRefPtr<ossimImageData> runThreshholdStretchAlgorithm(
+      T dummyVariable,
+      ossimRefPtr<ossimImageData>& tile);
+   
+TYPE_DATA
+};
+#endif
+
diff --git a/include/ossim/imaging/ossimHistogramWriter.h b/ossim/include/ossim/imaging/ossimHistogramWriter.h
similarity index 100%
rename from include/ossim/imaging/ossimHistogramWriter.h
rename to ossim/include/ossim/imaging/ossimHistogramWriter.h
diff --git a/ossim/include/ossim/imaging/ossimHsiRemapper.h b/ossim/include/ossim/imaging/ossimHsiRemapper.h
new file mode 100644
index 0000000..b9f9686
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimHsiRemapper.h
@@ -0,0 +1,257 @@
+//*******************************************************************
+// Copyright (C) 2002 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Remapper to adjust hue, saturation and intensity.
+//
+//*************************************************************************
+// $Id: ossimHsiRemapper.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimHsiRemapper_HEADER
+#define ossimHsiRemapper_HEADER
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+class OSSIMDLLEXPORT ossimHsiRemapper : public ossimImageSourceFilter
+{
+public:
+   enum
+   {
+      RED      = 0,
+      YELLOW   = 1,
+      GREEN    = 2,
+      CYAN     = 3,      
+      BLUE     = 4,
+      MAGENTA  = 5,
+      ALL      = 6
+   };
+   
+   ossimHsiRemapper();
+
+   virtual ossimString getLongName()  const;
+   virtual ossimString getShortName() const;
+
+   virtual void initialize();
+   /*---------------------- PROPERTY INTERFACE ---------------------------*/
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   /*---------------------- END PROPERTY INTERFACE ---------------------------*/
+   
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect,
+                                   ossim_uint32 resLevel=0);
+
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+   
+   /*!
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+   
+   ossim_uint32 getNumberOfOutputBands() const;
+
+   virtual ostream& print(ostream& os) const;
+
+   friend ostream& operator << (ostream& os,  const ossimHsiRemapper& hr);
+   
+   void setHueOffset               (int color_group, double offset);
+   void setHueLowRange             (int color_group, double range);
+   void setHueHighRange            (int color_group, double range);
+   void setHueBlendRange           (int color_group, double range);
+   void setSaturationOffset        (int color_group, double offset);
+   void setIntensityOffset         (int color_group, double offset);
+   
+   void setMasterHueOffset         (double offset);
+   void setMasterSaturationOffset  (double offset);
+   void setMasterIntensityOffset   (double offset);
+   void setMasterIntensityLowClip  (double clip);
+   void setMasterIntensityHighClip (double clip);
+
+   void setRedHueOffset            (double offset);
+   void setRedHueLowRange          (double range);
+   void setRedHueHighRange         (double range);
+   void setRedHueBlendRange        (double range);
+   void setRedSaturationOffset     (double offset);
+   void setRedIntensityOffset      (double offset);
+
+   void setYellowHueOffset         (double offset);
+   void setYellowHueLowRange       (double range);
+   void setYellowHueHighRange      (double range);
+   void setYellowHueBlendRange     (double range);
+   void setYellowSaturationOffset  (double offset);
+   void setYellowIntensityOffset   (double offset);
+
+   void setGreenHueOffset          (double offset);
+   void setGreenHueLowRange        (double range);
+   void setGreenHueHighRange       (double range);
+   void setGreenHueBlendRange      (double range);
+   void setGreenSaturationOffset   (double offset);
+   void setGreenIntensityOffset    (double offset);
+
+   void setCyanHueOffset           (double offset);
+   void setCyanHueLowRange         (double range);
+   void setCyanHueHighRange        (double range);
+   void setCyanHueBlendRange       (double range);
+   void setCyanSaturationOffset    (double offset);
+   void setCyanIntensityOffset     (double offset);
+
+   void setBlueHueOffset           (double offset);
+   void setBlueHueLowRange         (double range);
+   void setBlueHueHighRange        (double range);
+   void setBlueHueBlendRange       (double range);
+   void setBlueSaturationOffset    (double offset);
+   void setBlueIntensityOffset     (double offset);
+
+   void setMagentaHueOffset        (double offset);
+   void setMagentaHueLowRange      (double range);
+   void setMagentaHueHighRange     (double range);
+   void setMagentaHueBlendRange    (double range);
+   void setMagentaSaturationOffset (double offset);
+   void setMagentaIntensityOffset  (double offset);
+
+   double getHueOffset             (int color_group) const;
+   double getHueLowRange           (int color_group) const;
+   double getHueHighRange          (int color_group) const;
+   double getHueBlendRange         (int color_group) const;
+   double getSaturationOffset      (int color_group) const;
+   double getIntensityOffset       (int color_group) const;
+   
+   double getMasterHueOffset          () const;
+   double getMasterSaturationOffset   () const;
+   double getMasterIntensityOffset    () const;
+   double getMasterIntensityLowClip   () const;
+   double getMasterIntensityHighClip  () const;
+   
+   double getRedHueOffset             () const;
+   double getRedHueLowRange           () const;
+   double getRedHueHighRange          () const;
+   double getRedHueBlendRange         () const;
+   double getRedSaturationOffset      () const;
+   double getRedIntensityOffset       () const;
+
+   double getYellowHueOffset          () const;
+   double getYellowHueLowRange        () const;
+   double getYellowHueHighRange       () const;
+   double getYellowHueBlendRange      () const;
+   double getYellowSaturationOffset   () const;
+   double getYellowIntensityOffset    () const;
+
+   double getGreenHueOffset           () const;
+   double getGreenHueLowRange         () const;
+   double getGreenHueHighRange        () const;
+   double getGreenHueBlendRange       () const;
+   double getGreenSaturationOffset    () const;
+   double getGreenIntensityOffset     () const;
+
+   double getCyanHueOffset            () const;
+   double getCyanHueLowRange          () const;
+   double getCyanHueHighRange         () const;
+   double getCyanHueBlendRange        () const;
+   double getCyanSaturationOffset     () const;
+   double getCyanIntensityOffset      () const;
+
+   double getBlueHueOffset            () const;
+   double getBlueHueLowRange          () const;
+   double getBlueHueHighRange         () const;
+   double getBlueHueBlendRange        () const;
+   double getBlueSaturationOffset     () const;
+   double getBlueIntensityOffset      () const;
+
+   double getMagentaHueOffset         () const;
+   double getMagentaHueLowRange       () const;
+   double getMagentaHueHighRange      () const;
+   double getMagentaHueBlendRange     () const;
+   double getMagentaSaturationOffset  () const;
+   double getMagentaIntensityOffset   () const;
+
+   void   setWhiteObjectClip          (double clip);
+   double getWhiteObjectClip          () const;
+   void   resetWhiteObjectClip        ();
+
+   void resetGroup(int color_group);
+   void resetAll();
+   void resetMaster();
+   void resetRed();
+   void resetYellow();
+   void resetGreen();
+   void resetCyan();
+   void resetBlue();
+   void resetMagenta();
+   
+protected:
+   virtual ~ossimHsiRemapper();
+   void   allocate(const ossimIrect& rect);
+   void   verifyEnabled();
+   double calculateMinNormValue();
+
+   bool theValidFlag;
+   ossimRefPtr<ossimImageData> theTile;
+   double*                     theBuffer;
+   double                      theNormalizedMinPix;
+
+   double theMasterHueOffset;
+   double theMasterSaturationOffset;
+   double theMasterIntensityOffset;
+   double theMasterIntensityLowClip;
+   double theMasterIntensityHighClip;
+
+   double theRedHueOffset;
+   double theRedHueLowRange;
+   double theRedHueHighRange;
+   double theRedHueBlendRange;
+   double theRedSaturationOffset;
+   double theRedIntensityOffset;
+
+   double theYellowHueOffset;
+   double theYellowHueLowRange;
+   double theYellowHueHighRange;
+   double theYellowHueBlendRange;
+   double theYellowSaturationOffset;
+   double theYellowIntensityOffset;
+
+   double theGreenHueOffset;
+   double theGreenHueLowRange;
+   double theGreenHueHighRange;
+   double theGreenHueBlendRange;
+   double theGreenSaturationOffset;
+   double theGreenIntensityOffset;
+
+   double theCyanHueOffset;
+   double theCyanHueLowRange;
+   double theCyanHueHighRange;
+   double theCyanHueBlendRange;
+   double theCyanSaturationOffset;
+   double theCyanIntensityOffset;
+
+   double theBlueHueOffset;
+   double theBlueHueLowRange;
+   double theBlueHueHighRange;
+   double theBlueHueBlendRange;
+   double theBlueSaturationOffset;
+   double theBlueIntensityOffset;
+
+   double theMagentaHueOffset;
+   double theMagentaHueLowRange;
+   double theMagentaHueHighRange;
+   double theMagentaHueBlendRange;
+   double theMagentaSaturationOffset;
+   double theMagentaIntensityOffset;
+
+   double theWhiteObjectClip;
+
+   TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimHsiToRgbSource.h b/ossim/include/ossim/imaging/ossimHsiToRgbSource.h
new file mode 100644
index 0000000..76866fa
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimHsiToRgbSource.h
@@ -0,0 +1,50 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimHsiToRgbSource.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimHsiToRgbSource_HEADER
+#define ossimHsiToRgbSource_HEADER
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+class ossimHsiToRgbSource : public ossimImageSourceFilter
+{
+public:
+   ossimHsiToRgbSource();
+   ossimHsiToRgbSource(ossimImageSource* inputSource);
+   virtual ossimRefPtr<ossimImageData> getTile(const  ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+
+   virtual ossimScalarType getOutputScalarType() const;
+
+   virtual double getNullPixelValue()const;
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+
+   virtual void initialize();
+protected:
+   virtual ~ossimHsiToRgbSource();
+
+   /**
+    * Called on first getTile, will initialize all data needed.
+    */
+   void allocate();
+   
+   ossimRefPtr<ossimImageData> theBlankTile;
+   ossimRefPtr<ossimImageData> theTile;
+
+   void initializeBuffers(ossimRefPtr<ossimImageData>& data);
+   
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimHsiToRgbSource_HEADER */
+
+
diff --git a/ossim/include/ossim/imaging/ossimHsvGridRemapEngine.h b/ossim/include/ossim/imaging/ossimHsvGridRemapEngine.h
new file mode 100644
index 0000000..bde9840
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimHsvGridRemapEngine.h
@@ -0,0 +1,55 @@
+//*****************************************************************************
+// FILE: ossimHsvGridRemapEngine.h
+//
+// Copyright (C) 2001 ImageLinks, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Contains declaration of class ossimHsvGridRemapEngine
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimHsvGridRemapEngine.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimHsvGridRemapEngine_HEADER
+#define ossimHsvGridRemapEngine_HEADER
+
+#include <ossim/imaging/ossimGridRemapEngine.h>
+
+/*!****************************************************************************
+ *
+ * CLASS: ossimHsvGridRemapEngine 
+ *
+ *****************************************************************************/
+class ossimHsvGridRemapEngine : public ossimGridRemapEngine
+{
+public:
+   ossimHsvGridRemapEngine()
+      : ossimGridRemapEngine(3, 3) {}
+   
+   virtual ossimObject* dup() const;
+   
+   virtual void remapTile(const ossimDpt& origin_point,
+                          ossimGridRemapSource* remapper,
+                          ossimRefPtr<ossimImageData>& tile);
+
+   virtual void assignRemapValues(std::vector<ossimAtbPointSource*>& sources);
+
+   virtual void computeSourceValue(ossimRefPtr<ossimImageData>& source,
+                                   void* result);
+
+protected:
+   virtual void computeRemapNode(ossimAtbPointSource*  point_source,
+                                 void*                 source_value,
+                                 void*                 target_value);
+
+   TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimHsvToRgbSource.h b/ossim/include/ossim/imaging/ossimHsvToRgbSource.h
new file mode 100644
index 0000000..8c52481
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimHsvToRgbSource.h
@@ -0,0 +1,43 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimHsvToRgbSource.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimHsvToRgbSource_HEADER
+#define ossimHsvToRgbSource_HEADER
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+class OSSIM_DLL ossimHsvToRgbSource : public ossimImageSourceFilter
+{
+public:
+   ossimHsvToRgbSource();
+   ossimHsvToRgbSource(ossimImageSource* inputSource);
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+
+   virtual ossimScalarType getOutputScalarType() const;
+   virtual double          getNullPixelValue()const;
+   virtual double          getMinPixelValue(ossim_uint32 band=0)const;
+   virtual double          getMaxPixelValue(ossim_uint32 band=0)const;
+
+   virtual void initialize();
+
+protected:
+   virtual ~ossimHsvToRgbSource();
+
+   virtual void allocate();
+
+   ossimRefPtr<ossimImageData> theBlankTile;
+   ossimRefPtr<ossimImageData> theTile;
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/imaging/ossimIgenGenerator.h b/ossim/include/ossim/imaging/ossimIgenGenerator.h
similarity index 100%
rename from include/ossim/imaging/ossimIgenGenerator.h
rename to ossim/include/ossim/imaging/ossimIgenGenerator.h
diff --git a/include/ossim/imaging/ossimImageCacheBase.h b/ossim/include/ossim/imaging/ossimImageCacheBase.h
similarity index 100%
rename from include/ossim/imaging/ossimImageCacheBase.h
rename to ossim/include/ossim/imaging/ossimImageCacheBase.h
diff --git a/include/ossim/imaging/ossimImageCacheTileSource.h b/ossim/include/ossim/imaging/ossimImageCacheTileSource.h
similarity index 100%
rename from include/ossim/imaging/ossimImageCacheTileSource.h
rename to ossim/include/ossim/imaging/ossimImageCacheTileSource.h
diff --git a/ossim/include/ossim/imaging/ossimImageChain.h b/ossim/include/ossim/imaging/ossimImageChain.h
new file mode 100644
index 0000000..fdc8436
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageChain.h
@@ -0,0 +1,417 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimImageChain.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimImageChain_HEADER
+#define ossimImageChain_HEADER
+#include <vector>
+#include <map>
+using namespace std;
+
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/base/ossimConnectableObjectListener.h>
+#include <ossim/base/ossimId.h>
+#include <ossim/base/ossimConnectableContainerInterface.h>
+
+class OSSIMDLLEXPORT ossimImageChain : public ossimImageSource,
+                                       public ossimConnectableObjectListener,
+                                       public ossimConnectableContainerInterface
+{
+public:
+   ossimImageChain();
+   virtual ~ossimImageChain();
+
+   ossimConnectableObject::ConnectableObjectList& getChainList(){return theImageChainList;}
+   const ossimConnectableObject::ConnectableObjectList& getChainList()const{return theImageChainList;}
+   
+   /**
+    * @param index Index of object to get.
+    *
+    * @see getNumberOfObjects(false) to get the number of objects inside
+    * the container.
+    *
+    * @return Container's object at that index or NULL if out of range.
+    */
+   ossimConnectableObject* operator[](ossim_uint32 index);
+
+   /**
+    * Same as operator[](ossim_uint32 i)
+    * 
+    * @param index Index of object to get.
+    *
+    * @see getNumberOfObjects(false) to get the number of objects inside
+    * the container.
+    *
+    * @return Container's object at that index or NULL if out of range.
+    *
+    * @note This does not recurse into other containers.
+    */
+   virtual ossimConnectableObject* getConnectableObject(ossim_uint32 index);
+   
+   virtual ossim_int32 indexOf(ossimConnectableObject* obj)const;
+   /**
+    * Return the first source which is the one that first receives the
+    * getTile request
+    */
+   virtual ossimImageSource* getFirstSource();
+   virtual const ossimImageSource* getFirstSource() const;
+   
+   virtual ossimObject* getFirstObject();
+
+   /**
+    * Return the last source which is the one that last receives the
+    * getTile request.
+    */
+   virtual ossimImageSource* getLastSource();
+   virtual const ossimImageSource* getLastSource() const;
+   
+   virtual ossimObject* getLastObject();
+
+
+   /**
+    * Adds it to the start of the chain.  This is the first one to receive
+    * the getTile request.  This basically inserts it to the right of the
+    * right most filter.
+    * Returns true on success, false on error.
+    */
+   bool addFirst(ossimConnectableObject* obj);
+
+   /**
+    * Adds it to the end.  this is the last one to receive the getTile
+    * request.  This basically inserts it to the left of the left most filter.
+    * Returns true on success, false on error.
+    */
+   bool addLast(ossimConnectableObject* obj);
+   
+   /**
+    * Deletes the first object.
+    * Note this is really most right of the chain.
+    * Returns true if deletion occurred, false if the chain is empty.
+    */
+   bool deleteFirst();
+
+   /**
+    * Deletes the last object.
+    * Note this is really most left of the chain.
+    * Returns true if deletion occurred, false if the chain is empty.
+    */
+   bool deleteLast();
+
+   /**
+    * 
+    */
+   bool insertRight(ossimConnectableObject* newObj,
+                    ossimConnectableObject* rightOfThisObj);
+
+   /**
+    *
+    */
+   bool insertRight(ossimConnectableObject* newObj,
+                    const ossimId& id);
+
+   /**
+    *
+    */
+   bool insertLeft(ossimConnectableObject* newObj,
+                   const ossimId& id);
+   /**
+    *
+    */
+   bool insertLeft(ossimConnectableObject* newObj,
+                   ossimConnectableObject* leftOfThisObj);
+   
+   bool replace(ossimConnectableObject* newObj,
+                ossimConnectableObject* oldObj);
+   /**
+    * Will return true or false if an image source was
+    * added to the chain.  It will add and do a connection
+    * to the previous source automatically.  This is a
+    * chain and the order of insertion matters. It adds it to the beginning
+    * of the list.  The last one added is the first one to receive
+    * the getTile.  Basically inserts to the right of the rightmost filter
+    *
+    */
+   virtual bool add(ossimConnectableObject* source);
+
+   /**
+    * Within the image chain will pass the head of the
+    * list.
+    */
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+   
+   /**
+    * this call is passed to the head of the list.
+    */
+   virtual ossim_uint32 getNumberOfInputBands() const;
+   
+   /**
+    * This call is passed to the head of the list.
+    */
+   virtual ossimScalarType getOutputScalarType() const;
+
+   virtual double getNullPixelValue(ossim_uint32 band=0)const;
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+   
+   virtual void getOutputBandList(std::vector<ossim_uint32>& bandList) const;
+
+   /**
+    * This call is passed to the head of the list.
+    */
+   virtual ossim_uint32 getTileWidth()const;
+
+   /**
+    * This call is passed to the head of the list.
+    */
+   virtual ossim_uint32 getTileHeight()const;
+   
+   /**
+    * Will pass this call to the head of the list.
+    */
+   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
+   virtual void getValidImageVertices(vector<ossimIpt>& validVertices,
+                                      ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER,
+                                      ossim_uint32 resLevel=0)const;
+   
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+
+   virtual void getDecimationFactor(ossim_uint32 resLevel,
+                                    ossimDpt& result) const;
+   virtual void getDecimationFactors(vector<ossimDpt>& decimations) const;
+   virtual ossim_uint32 getNumberOfDecimationLevels()const;
+   
+   /**
+    * Will save the state of the chain.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=NULL)const;
+
+   /**
+    * Will load the state.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=NULL);
+   
+   virtual void initialize();
+   virtual void enableSource();
+   virtual void disableSource();
+   
+   bool canConnectMyInputTo(ossim_int32 myInputIndex,
+                            const ossimConnectableObject* object)const
+      {
+         if(theImageChainList.size()&&
+            theImageChainList[theImageChainList.size()-1].valid())
+         {
+            ossimConnectableObject* obj = PTR_CAST(ossimConnectableObject, theImageChainList[theImageChainList.size()-1].get());
+            if(obj)
+            {
+               return obj->canConnectMyInputTo(myInputIndex,
+                                               object);
+            }
+         }
+         else if(!theImageChainList.size())
+         {
+            return true;
+         }
+         return false;
+      }
+      
+//    bool canConnectMyOutputTo(int32 myOutputIndex,
+//                              const ossimConnectableObject* object)const
+//       {
+//          if(theImageChainList.size()&&theImageChainList[0])
+//          {
+// 	   ossimConnectableObject* obj = PTR_CAST(ossimConnectableObject, theImageChainList[0]);
+// 	   if(obj)
+// 	     {
+// 	       return obj->canConnectMyOutputTo(myOutputIndex,
+// 						object);
+// 	     }
+//          }
+         
+//          return false;
+//       }
+   
+   // ________________________CONNECTABLE CONTAINER DEFINTIONS_________________
+   //
+   
+   /*!
+    * These methods are now deprecated.  You can achieve the same thing by using the new visitor design pattern.  If this does not 
+    * achieve exactly what you want then you can derive new rules by overriding the virtual visit method in ossimVisitor
+    *
+    * <pre>
+    *    ossimTypeIdVisitor visitor(tyeId, false, ossimVisitor::VISIT_CHILDREN);
+    *    connectableObject->accept(visitor);
+    *    ossimCollectionVisitor::List& collection = visitor.getObjects();
+    * </pre>
+    */
+   OSSIM_DEPRECATE_METHOD( virtual ossimConnectableObject::ConnectableObjectList findAllObjectsOfType(const RTTItypeid& typeInfo,
+                                                                     bool recurse=true));
+   /*!
+    * These methods are now deprecated.  You can achieve the same thing by using the new visitor design pattern.  If this does not 
+    * achieve exactly what you want then you can derive new rules by overriding the virtual visit method in ossimVisitor
+    *
+    * <pre>
+    *    ossimTypeNameVisitor visitor(typeName, false, ossimVisitor::VISIT_CHILDREN);
+    *    connectableObject->accept(visitor);
+    *    ossimCollectionVisitor::List& collection = visitor.getObjects();
+    * </pre>
+    */
+   OSSIM_DEPRECATE_METHOD(virtual ossimConnectableObject::ConnectableObjectList findAllObjectsOfType(const ossimString& className,
+                                                                     bool recurse=true));
+
+   /*!
+    * These methods are now deprecated.  You can achieve the same thing by using the new visitor design pattern.  If this does not 
+    * achieve exactly what you want then you can derive new rules by overriding the virtual visit method in ossimVisitor
+    *
+    * <pre>
+    *    ossimTypeIdVisitor visitor(tyeId, true, ossimVisitor::VISIT_CHILDREN);
+    *    connectableObject->accept(visitor);
+    *    ossimRefPtr<ossimConnectableObject> obj = visitor.getObject();
+    * </pre>
+    */
+   OSSIM_DEPRECATE_METHOD(virtual ossimConnectableObject* findFirstObjectOfType(const RTTItypeid& typeInfo,
+                                                         bool recurse=true));
+   /*!
+    * These methods are now deprecated.  You can achieve the same thing by using the new visitor design pattern.  If this does not 
+    * achieve exactly what you want then you can derive new rules by overriding the virtual visit method in ossimVisitor
+    *
+    * <pre>
+    *    ossimTypeNameVisitor visitor(className, true, ossimVisitor::VISIT_CHILDREN);
+    *    connectableObject->accept(visitor);
+    *    ossimRefPtr<ossimConnectableObject> obj = visitor.getObject();
+    * </pre>
+    */
+   OSSIM_DEPRECATE_METHOD(virtual ossimConnectableObject* findFirstObjectOfType(const ossimString& className,
+                                                         bool recurse=true));
+
+   /*!
+    * These methods are now deprecated.  You can achieve the same thing by using the new visitor design pattern.  If this does not 
+    * achieve exactly what you want then you can derive new rules by overriding the virtual visit method in ossimVisitor
+    *
+    * <pre>
+    *    ossimIdVisitor visitor(tyeId, true, ossimVisitor::VISIT_CHILDREN);
+    *    connectableObject->accept(visitor);
+    *    ossimRefPtr<ossimConnectableObject> obj = visitor.getObject();
+    * </pre>
+    */
+   OSSIM_DEPRECATE_METHOD(virtual ossimConnectableObject* findObject(const ossimId& id,
+                                              bool recurse=true));
+
+   OSSIM_DEPRECATE_METHOD(virtual ossimConnectableObject* findObject(const ossimConnectableObject* obj,
+                                              bool recurse=true));
+
+   /**
+    * Will cycle through all sources setting their ids. the idLast wlil
+    * be updated
+    * so we can recurse into other containers.
+    */
+   virtual void makeUniqueIds();
+
+   /**
+    * Returns the number of objects within this container and all child
+    * containers.
+    *
+    * @param recurse If true and object is a contains containers; all objects
+    * will be conter.  If false only the objects of this container will be
+    * counted (theImageChainList.size()).
+    */
+   virtual ossim_uint32 getNumberOfObjects(bool recurse=true)const;
+
+   /**
+    * Deprecated! Please use getNumberOfObjects(false).
+    *
+    * @return The number of objects in this container or
+    * (theImageChainList.size()).
+    */
+   virtual ossim_uint32 getNumberOfSources() const;
+   
+   /**
+    * Will add an object to the container and then set the added objects owner
+    * to this.
+    */
+   virtual bool addChild(ossimConnectableObject* attachableObject);
+
+   /**
+    * Will remove the child from the container.  Changes the owner of the
+    * child to be NULL;
+    */
+   virtual bool removeChild(ossimConnectableObject* object);
+   virtual ossimConnectableObject* removeChild(const ossimId& id);
+   
+   virtual void getChildren(vector<ossimConnectableObject*>& children,
+                            bool immediateChildrenOnlyFlag);
+   //______________END CONNECTABLE CONTAINER INTERFACE____________
+   
+   virtual void disconnectInputEvent(ossimConnectionEvent& event);
+   virtual void disconnectOutputEvent(ossimConnectionEvent& event);
+   virtual void connectInputEvent(ossimConnectionEvent& event);
+   virtual void connectOutputEvent(ossimConnectionEvent& event);
+   virtual void objectDestructingEvent(ossimObjectDestructingEvent& event);
+
+   virtual void propagateEventToOutputs(ossimEvent& event);
+   virtual void propagateEventToInputs(ossimEvent& event);
+ 
+   virtual void processEvent(ossimEvent& event);
+
+   virtual void accept(ossimVisitor& visitor);
+   void deleteList();
+
+   /**
+    * These access methods greatly facilitate the implementation of an image chain adaptor class.
+    * They shouldn't be accessed directly by any other classes.  These methods really should be 
+    * "protected" but the compiler complains if this base class' declarations are "protected".
+    */
+   virtual ossimConnectableObject::ConnectableObjectList& imageChainList() { return theImageChainList; }
+   virtual const ossimConnectableObject::ConnectableObjectList& imageChainList() const { return theImageChainList; }
+   
+   /**
+    * Inserts all of this object's children and inputs into the container provided. Since this is
+    * itself a form of container, this method will consolidate this chain with the argument
+    * container. Consequently, this chain object will not be represented in the container, but its
+    * children will be, with correct input and output connections to external objects. Ownership
+    * of children will pass to the argument container.
+    * @return Returns TRUE if successful.
+    */
+   virtual bool fillContainer(ossimConnectableContainer& container);
+
+protected:
+   void prepareForRemoval(ossimConnectableObject* connectableObject);
+   
+  /**
+    * This will hold a sequence of image sources.
+    * theFirst one in the list will be the head of the
+    * list and the last one is the tail.
+    */
+   ossimConnectableObject::ConnectableObjectList theImageChainList;
+   
+   ossimRefPtr<ossimImageData>     theBlankTile;
+  // mutable bool                    thePropagateEventFlag;
+   mutable bool                    theLoadStateFlag;
+   /**
+    * For dynamic loading to take place we must allocate all objects first and
+    * then assign id's later.  We must remember the id's so we can do this.
+    * we will create a map that takes the id of the source as a key and a
+    * vector of input id's to connect it's inputs to.
+    */
+   bool addAllSources(map<ossimId, vector<ossimId> >& idMapping,
+                      const ossimKeywordlist& kwl,
+                      const char* prefix = NULL);
+   void findInputConnectionIds(vector<ossimId>& result,
+                               const ossimKeywordlist& kwl,
+                               const char* prefix=NULL);
+   bool connectAllSources(const map<ossimId, vector<ossimId> >& idMapping);
+   
+   
+TYPE_DATA
+};
+#endif /* #ifndef ossimImageChain_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimImageCombiner.h b/ossim/include/ossim/imaging/ossimImageCombiner.h
new file mode 100644
index 0000000..12cff76
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageCombiner.h
@@ -0,0 +1,140 @@
+//*******************************************************************
+//
+// License:  See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimImageCombiner.h 23108 2015-01-27 17:00:20Z okramer $
+#ifndef ossimImageCombiner_HEADER
+#define ossimImageCombiner_HEADER
+#include <vector>
+
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/base/ossimConnectableObjectListener.h>
+#include <ossim/base/ossimPropertyEvent.h>
+
+/**
+ * This will be a base for all combiners.  Combiners take N inputs and
+ * will produce a single output.
+ */
+class OSSIMDLLEXPORT ossimImageCombiner : public ossimImageSource,
+                                          public ossimConnectableObjectListener
+{
+public:
+   ossimImageCombiner();
+   ossimImageCombiner(ossimObject* owner,
+                      int numberOfInputs,
+                      int numberOfOutputs,
+                      bool inputListIsFixedFlag,
+                      bool outputListIsFixedFlag);
+   
+   ossimImageCombiner(ossimConnectableObject::ConnectableObjectList& inputSources);
+
+   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const;
+
+   virtual void initialize();
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=NULL);
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=NULL)const;
+
+   /**
+    * This will go through and precompute the
+    * bounding rects of each input image.
+    */
+   virtual void updateRects();
+
+   /**
+    * Returns the number of bands available from the input.
+    */
+   virtual ossim_uint32 getNumberOfInputBands()const;   
+   virtual ossimScalarType getOutputScalarType() const;
+   virtual ossim_uint32 getTileWidth()const;  
+   virtual ossim_uint32 getTileHeight()const;
+
+   virtual double getNullPixelValue(ossim_uint32 band=0)const;
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+
+  /**
+   * Used to retrieve the number of overlapping images withint the given
+   * rect.
+   */
+  virtual ossim_uint32 getNumberOfOverlappingImages(const ossimIrect& rect,
+                                                    ossim_uint32 resLevel=0)const;
+
+  /**
+   * Used to populate the result with the index of the overlapping images.
+   */
+  virtual void getOverlappingImages(std::vector<ossim_uint32>& result,
+				    const ossimIrect& rect,
+                                    ossim_uint32 resLevel=0)const;
+   
+   
+/*    virtual ossimRefPtr<ossimImageData> getNextTile(ossim_uint32& returnedIdx, */
+/*                                                    ossim_uint32 startIdx, */
+/*                                                    const ossimIpt& origin, */
+/*                                                    ossim_uint32 resLevel=0); */
+   
+/*    virtual ossimRefPtr<ossimImageData> getNextTile(ossim_uint32& returnedIdx, */
+/*                                                    const ossimIpt& origin, */
+/*                                                    ossim_uint32 resLevel=0); */
+   
+   virtual ossimRefPtr<ossimImageData> getNextTile(ossim_uint32& returnedIdx,
+                                                   const ossim_uint32 startIdx,
+                                                   const ossimIrect& tileRect,
+                                                   ossim_uint32 resLevel=0);
+
+   virtual ossimRefPtr<ossimImageData> getNextTile(ossim_uint32& returnedIdx,
+                                                   const ossimIrect& tileRect,
+                                                   ossim_uint32 resLevel=0);
+
+   
+   virtual bool getNextTile(ossim_uint32& returnedIdx,
+                            const ossim_uint32 startIdx,
+                            ossimImageData* tile,
+                            ossim_uint32 resLevel=0);
+
+  virtual ossimRefPtr<ossimImageData> getNextNormTile(ossim_uint32& returnedIdx,
+                                                       const ossim_uint32 index,
+                                                       const ossimIrect& tileRect,
+                                                       ossim_uint32 resLevel=0);
+   
+   virtual ossimRefPtr<ossimImageData> getNextNormTile(ossim_uint32& returnedIdx,
+                                                       const ossimIrect& tileRect,
+                                                       ossim_uint32 resLevel=0);
+   
+/*    virtual ossimRefPtr<ossimImageData> getNextNormTile(ossim_uint32& returnedIdx, */
+/*                                                        ossim_uint32 index, */
+/*                                                        const ossimIpt& origin, */
+/*                                                        ossim_uint32 resLevel=0); */
+/*    virtual ossimRefPtr<ossimImageData> getNextNormTile(ossim_uint32& returnedIdx, */
+/*                                                        const ossimIpt& origin, */
+/*                                                        ossim_uint32 resLevel=0); */
+   
+   
+   virtual bool canConnectMyInputTo(ossim_int32 inputIndex,
+                                    const ossimConnectableObject* object)const;
+         
+   virtual void connectInputEvent(ossimConnectionEvent& event);
+   virtual void disconnectInputEvent(ossimConnectionEvent& event);
+   virtual void propertyEvent(ossimPropertyEvent& event);
+   virtual void refreshEvent(ossimRefreshEvent& event);
+   virtual bool hasDifferentInputs()const;
+
+   
+protected:
+   virtual ~ossimImageCombiner();   
+   void precomputeBounds()const;
+
+   ossim_uint32                theLargestNumberOfInputBands;
+   ossim_uint32                theInputToPassThrough;
+   bool                        theHasDifferentInputs;
+   ossimRefPtr<ossimImageData> theNormTile;
+   mutable std::vector<ossimIrect>     theFullResBounds;
+   mutable bool                theComputeFullResBoundsFlag;
+   ossim_uint32                theCurrentIndex;
+   
+TYPE_DATA  
+};
+
+#endif /* #ifndef ossimImageCombiner_HEADER */
diff --git a/ossim/include/ossim/imaging/ossimImageData.h b/ossim/include/ossim/imaging/ossimImageData.h
new file mode 100644
index 0000000..eb62cde
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageData.h
@@ -0,0 +1,1275 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: Container class for a tile of image data.
+//
+//*******************************************************************
+// $Id: ossimImageData.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimImageData_HEADER
+#define ossimImageData_HEADER 1
+
+#include <vector>
+#include <iosfwd> /* for ostream */
+
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimRectilinearDataObject.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimRefPtr.h>
+
+class ossimMultiBandHistogram;
+
+class OSSIMDLLEXPORT ossimImageData : public ossimRectilinearDataObject
+{
+public:
+
+   /** Definitions for the unloadBand routines. */
+   enum OverwriteBandRule
+   {
+      /*
+       * The COLOR_DISCREPANCY rule directs that the selected band of a pixel
+       * of the destination buffer is to be overwritten if *any* one of the
+       * other bands of the same destination pixel have color values that 
+       * deviate from its color. 
+       * Deprecated in favor of COLOR_DISCREPANCY_OF_ANY_FROM_DEST.
+       */
+      COLOR_DISCREPANCY = 0,
+
+      /*
+       * The COLOR_DISCREPANCY_OF_ANY_FROM_DEST rule directs that the selected 
+       * band of a pixel of the destination buffer is to be overwritten if 
+       * *any* one of the other bands of the same destination pixel have color 
+       * values that deviate from its color. 
+       * Same as the deprecated COLOR_DISCREPANCY.
+       */
+      COLOR_DISCREPANCY_OF_ANY_FROM_DEST = 1,
+
+      /*
+       * The COLOR_DISCREPANCY_OF_ALL_FROM_DEST rule directs that the selected 
+       * band of a pixel of the destination buffer is to be overwritten only if 
+       * *all* of the other bands of the same destination pixel have color 
+       * values that deviate from its color. 
+       */
+      COLOR_DISCREPANCY_OF_ALL_FROM_DEST = 2,
+
+      /*
+       * The COLOR_EQUALITY_OF_ANY_TO_SRC rule directs that the selected 
+       * band of a pixel of the destination buffer is to be overwritten if 
+       * *any* one of the other bands of the same destination pixel have color 
+       * values that are equal to the color of the selected band of the source
+       * pixel. 
+       */
+      COLOR_EQUALITY_OF_ANY_TO_SRC = 3,
+
+      /*
+       * The COLOR_EQUALITY_OF_ALL_TO_SRC rule directs that the selected 
+       * band of a pixel of the destination buffer is to be overwritten only if 
+       * *all* of the other bands of the same destination pixel have color 
+       * values that are equal to the color of the selected band of the source
+       * pixel. 
+       */
+      COLOR_EQUALITY_OF_ALL_TO_SRC = 4,
+
+      /*
+       * The selected band of the destination buffer is to be overwritten 
+       * by the selected band of the source image data (no questions asked).
+       */
+      NULL_RULE = 5
+   };
+
+   /** @brief copy constructor */
+   ossimImageData(const ossimImageData &rhs);
+   
+   ossimImageData();
+
+   /**
+    * @brief Constructor
+    * @param source The owner.  This can be null.
+    * @param scalar The Scalar type like OSSIM_UINT8, OSSIM_UINT16...
+    * @param bands  The number of bands.
+    * 
+    * @note This does not initialize the undelying data buffer.
+    *       Call the initialize method to allocate storage.
+    */
+   ossimImageData(ossimSource* source,
+                  ossimScalarType scalar,
+                  ossim_uint32 bands = 1);
+
+   /**
+    * @brief Constructor
+    * @param source The owner.  This can be null.
+    * @param scalar The Scalar type like OSSIM_UINT8, OSSIM_UINT16...
+    * @param bands  The number of bands.
+    * @param width  The width or number of samples in the buffer.
+    * @param height The height or numer of lines in the buffer.
+    * 
+    * @note This does not initialize the undelying data buffer.
+    *       Call the initialize method to allocate storage.
+    */
+   ossimImageData(ossimSource* source,
+                  ossimScalarType scalar,
+                  ossim_uint32 bands,
+                  ossim_uint32 width,
+                  ossim_uint32 height);
+
+   /** @brief virtual destructor */
+   virtual ~ossimImageData();
+
+   /**
+    * @brief assignment operator=
+    * @param rhs The data to assign from.
+    * @param A reference to this object.
+    */
+   virtual const ossimImageData& operator=(const ossimImageData &rhs);
+
+
+   /**
+    * @return The width of the data object.
+    */
+   virtual ossim_uint32 getWidth()const;
+
+   /**
+    * @return The height of the data object.
+    */
+   virtual ossim_uint32 getHeight()const;
+
+   /**
+    * @return The image rectangle relative to origin, height and width.
+    */
+   virtual ossimIrect getImageRectangle() const;
+   virtual void getWidthHeight(ossim_uint32& w, ossim_uint32& h);
+   virtual void setWidth(ossim_uint32 width);
+   virtual void setHeight(ossim_uint32 height);
+   virtual void setWidthHeight(ossim_uint32 w, ossim_uint32 h);
+   virtual void setImageRectangleAndBands(const ossimIrect& rect,
+                                          ossim_uint32 numberOfBands);
+   virtual void setImageRectangle(const ossimIrect& rect);
+   virtual void setOrigin(const ossimIpt& origin);   
+                                    
+   virtual void assign(const ossimDataObject* data);
+   virtual void assign(const ossimImageData* data);
+   virtual void assignBand(const ossimImageData* data,
+                           ossim_uint32 source_band,
+                           ossim_uint32 output_band);
+   
+   virtual ossimObject* dup() const;
+
+  /**
+   * Uses prime numbers as coefficients for this summation.  
+   * Take the the fours bytes of each origin and multiply 
+   * by the prime numbers and sum together.  This has
+   * been proven by others to give nicely distributed 
+   * id number.
+   */
+   virtual ossim_uint32 getHashId()const;
+   
+   virtual void setNullPix(ossim_float64 null_pix);
+   virtual void setNullPix(ossim_float64 null_pix, ossim_uint32 band);
+   virtual void setNullPix(const ossim_float64* nullPixArray,
+                           ossim_uint32 numberOfValues);
+   virtual void setMinPix(ossim_float64 min_pix);
+   virtual void setMinPix(ossim_float64 min_pix, ossim_uint32 band);
+   virtual void setMinPix(const ossim_float64* minPixArray,
+                          ossim_uint32 numberOfValues);
+   virtual void setMaxPix(ossim_float64 max_pix);
+   virtual void setMaxPix(ossim_float64 max_pix, ossim_uint32 band);
+   virtual void setMaxPix(const ossim_float64* maxPixArray,
+                          ossim_uint32 numberOfValues);
+
+   virtual const ossimIpt& getOrigin()const{return m_origin;}
+
+   /**
+    * If the minBands and maxBands are empty or not equal to the imageData's
+    * current number of bands it will erase the contents, resize, and then
+    * replace the values in the passed in array with this objects min max
+    * values.  If the arrays are the same size as this objects number of
+    * bands it will just update the values and use the current values in the
+    * arrays as initial min max values.
+    *
+    * If the status of this object(getDataObjectStatus()) is OSSIM_NULL or
+    * OSSIM_EMPTY no action is performed.
+    */
+   virtual void computeMinMaxPix(std::vector<ossim_float64>& minBands,
+                                 std::vector<ossim_float64>& maxBands) const;
+
+   /**
+    * @brief Scans tile for min, max, nulls.
+    * 
+    * If the nullBands, minBands and maxBands are empty or not equal to the
+    * imageData's current number of bands it will erase the contents, resize,
+    * and then replace the values in the passed in array with this objects
+    * min max values.  If the arrays are the same size as this objects number
+    * of bands it will just update the values and use the current values in the
+    * arrays as initial min max values.
+    *
+    * If the status of this object(getDataObjectStatus()) is OSSIM_NULL no
+    * action is performed.
+    */
+   virtual void computeMinMaxNulPix(
+      std::vector<ossim_float64>& minBands,
+      std::vector<ossim_float64>& maxBands,
+      std::vector<ossim_float64>& nulBands) const;
+   
+   virtual const ossim_float64* getNullPix()const;
+   virtual const ossim_float64* getMinPix()const;
+   virtual const ossim_float64* getMaxPix()const;
+   virtual ossim_float64        getNullPix(ossim_uint32 band) const;
+   virtual ossim_float64        getMinPix(ossim_uint32 band)  const;
+   virtual ossim_float64        getMaxPix(ossim_uint32 band)  const;
+
+   /**
+    * returns normalized minimum pixel value of band zero.
+    */
+   virtual ossim_float64   getMinNormalizedPix() const;
+   virtual ossimString     getScalarTypeAsString()const;
+   virtual ossim_uint32    getNumberOfBands() const;
+   virtual void            setNumberOfBands(ossim_uint32 bands,
+                                            bool reallocate=false);
+
+   /**
+    * Will return the pixel at location position.  Note it will first get
+    * the passed in position relative to the origin or upper left
+    * corner of this tile and then return the result.
+    */
+   virtual ossim_float64 getPix(const ossimIpt& position,
+                                ossim_uint32 band=0) const;
+
+   /**
+    * Will return the pixel at offset and band number.
+    */
+   virtual ossim_float64 getPix(ossim_uint32 offset,
+                                ossim_uint32 band = 0) const;
+   
+   /**
+    * will fill the entire band with
+    * the value.
+    */
+   void fill(ossim_uint32 band, ossim_float64 value);
+
+   /**
+    * will fill all bands with the passed in
+    * value.
+    */
+   void fill(ossim_float64 value);
+
+   /**
+    * @brief Creates a step wedge for testing only.
+    *
+    * Writes line at a time of a single value, starting at scalar null,
+    * and going to scalar max in increments of scalar range/tile_lines.
+    */
+   void createTestTile();
+   
+   bool isNull(ossim_uint32 offset)const;
+   bool isNull(ossim_uint32 offset, ossim_uint32 band)const;
+   void setNull(ossim_uint32 offset);
+   void setNull(ossim_uint32 offset, ossim_uint32 band);
+
+   bool isNull(const ossimIpt& pt)const;
+   void setNull(const ossimIpt& pt);
+   bool isNull(const ossimIpt& pt, ossim_uint32 band)const;
+   void setNull(const ossimIpt& pt, ossim_uint32 band);
+   
+   virtual bool   isValidBand(ossim_uint32 band) const;
+   virtual ossimDataObjectStatus validate() const;
+
+   /**
+    * Will take this tile and normalize it to a newly
+    * allocated floating point tile.
+    */
+   virtual ossimRefPtr<ossimImageData> newNormalizedFloat()const;
+
+   /**
+    * will go to the band and offset and compute the
+    * normalized float and return it back to the
+    * caller through the result argument.
+    */
+   virtual void getNormalizedFloat(ossim_uint32 offset,
+                                   ossim_uint32 bandNumber,
+                                   ossim_float32& result)const;
+
+   /**
+    * This will assign to this object a normalized
+    * value by unnormalizing to its native type.
+    */
+   virtual void setNormalizedFloat(ossim_uint32 offset,
+                                   ossim_uint32 bandNumber,
+                                   ossim_float32 input);
+
+   /**
+    * Will use the memory that you pass in to normalize
+    * this data object.
+    */
+   virtual void convertToNormalizedFloat(ossimImageData* result)const;
+
+   /**
+    * Will take this tile and normalize it to a newly
+    * allocated double point tile.
+    */
+   virtual ossimImageData* newNormalizedDouble()const;
+
+   /**
+    * Will use the memory that you pass in to normalize
+    * this data object.
+    */
+   virtual void convertToNormalizedDouble(ossimImageData* result)const;
+
+   /**
+    * Will take the normalized input and convert it
+    * to this tile's data type.  Example:  if this
+    * tile is of type UCHAR and its input is of type
+    * NORALIZED_FLOAT it will unnormalize the data by
+    * doing:
+    *
+    * minPix + normalizedInput*(maxPix-minPix)
+    *
+    * on a per band basis.
+    */
+   virtual void unnormalizeInput(ossimImageData* normalizedInput);
+
+   /**
+    * This will compute the average value for the band.
+    */
+   virtual ossim_float64 computeAverageBandValue(
+      ossim_uint32 bandNumber = 0) const;
+
+   /**
+    * This will call the compute average band value and then
+    * use that in the calculation of:
+    
+    * It will then do a SUM[(Mean - Actual)^2]/width*height.
+    *
+    * This is the average variance from the passed in
+    * mean.  
+    */
+   virtual ossim_float64 computeMeanSquaredError(
+      ossim_float64 meanValue,
+      ossim_uint32 bandNumber = 0) const;
+  
+   virtual void populateHistogram(ossimRefPtr<ossimMultiBandHistogram> histo);
+
+   /**
+    * @return true if alpha channel is initialized, false if not.
+    */
+   virtual bool hasAlpha() const;
+   
+   /**
+    * @return const ossim_uint8* to the alpha channel or null if the alpha
+    * channel was not computed.
+    */
+   virtual const ossim_uint8* getAlphaBuf() const;
+
+   /**
+    * @return ossim_uint8* to the alpha channel or null if the alpha channel
+    * was not computed.
+    */
+   virtual ossim_uint8* getAlphaBuf();
+
+   /**
+    * @return const void* to theDataBuffer
+    */
+   virtual const void* getBuf() const;
+   
+   /**
+    * @return const ossim_uint8* to theDataBuffer if scalar is of type
+    * OSSIM_UCHAR; else, NULL.
+    */
+   virtual const ossim_uint8*    getUcharBuf()  const;
+
+   /**
+    * @return const ossim_uint16* to theDataBuffer if scalar is of type
+    * OSSIM_USHORT16 or USHORT11; else, NULL.
+    */
+   virtual const ossim_uint16*   getUshortBuf() const;
+
+   /**
+    * @return const ossim_sint16* to theDataBuffer if scalar is of type
+    * OSSIM_SSHORT16; else, NULL.
+    */
+   virtual const ossim_sint16*   getSshortBuf() const;
+
+   /**
+    * @return const ossim_float32* to theDataBuffer if scalar is of type
+    * OSSIM_FLOAT or OSSIM_NORMALIZED_FLOAT; else, NULL.
+    */
+   virtual const ossim_float32*  getFloatBuf()  const;
+
+   /**
+    * @return const ossim_float64* to theDataBuffer if scalar is of type
+    * OSSIM_DOUBLE or OSSIM_NORMALIZED_DOUBLE; else, NULL.
+    */
+   virtual const ossim_float64*  getDoubleBuf() const;
+
+   /**
+    * @return void* to theDataBuffer
+    */
+   virtual void* getBuf();
+   
+   /**
+    * @return ossim_uint8* to theDataBuffer if scalar is of type
+    * OSSIM_UCHAR; else, NULL.
+    */
+   virtual ossim_uint8*    getUcharBuf();
+   
+   /**
+    * @return ossim_uint16* to theDataBuffer if scalar is of type
+    * OSSIM_USHORT16 or OSSIM_USHORT11; else, NULL.
+    */
+   virtual ossim_uint16*   getUshortBuf();
+   
+   /**
+    * @return ossim_sint16* to theDataBuffer if scalar is of type
+    * OSSIM_SSHORT16; else, NULL.
+    */
+   virtual ossim_sint16*   getSshortBuf();
+
+   /**
+    * @return ossim_float32* to theDataBuffer if scalar is of type
+    * OSSIM_FLOAT or OSSIM_NORMALIZED_FLOAT; else, NULL.
+    */
+   virtual ossim_float32*  getFloatBuf();
+   
+   /**
+    * @return float64* to theDataBuffer if scalar is of type OSSIM_DOUBLE or
+    * OSSIM_NORMALIZED_DOUBLE; else, NULL.
+    */
+   virtual ossim_float64*  getDoubleBuf();
+
+   /**
+    * @param band (zero based)
+    * @return void* to theDataBuffer positioned at band.
+    */
+   virtual const void*           getBuf(ossim_uint32 band) const;
+   
+   /**
+    * @param band (zero based)
+    * @return ossim_uint8* to theDataBuffer positioned at band if scalar is
+    * of type OSSIM_UCHAR; else, NULL.
+    */
+   virtual const ossim_uint8*    getUcharBuf(ossim_uint32 band) const;
+
+   /**
+    * @param band (zero based)
+    * @return ossim_uint16* to theDataBuffer positioned at band if scalar is
+    * of type OSSIM_USHORT16 or OSSIM_USHORT11; else, NULL.
+    */
+   virtual const ossim_uint16*   getUshortBuf(ossim_uint32 band) const;
+   
+   /**
+    * @param band (zero based)
+    * @return ossim_sint16* to theDataBuffer positioned at band if scalar is
+    * of type OSSIM_SSHORT16; else, NULL.
+    */
+   virtual const ossim_sint16*   getSshortBuf(ossim_uint32 band) const;
+   
+   /**
+    * @param band (zero based)
+    * @return ossim_float32* to theDataBuffer positioned at band if scalar is
+    * of type OSSIM_FLOAT or OSSIM_NORMALIZED_FLOAT; else, NULL.
+    */
+   virtual const ossim_float32*  getFloatBuf(ossim_uint32 band) const;
+   
+   /**
+    * @param band (zero based)
+    * @return ossim_float64* to theDataBuffer positioned at band if scalar is
+    * of type OSSIM_DOUBLE or OSSIM_NORMALIZED_DOUBLE; else, NULL.
+    */
+   virtual const ossim_float64*  getDoubleBuf(ossim_uint32 band) const;
+
+   /**
+    * @param band (zero based)
+    * @return void* to theDataBuffer positioned at band.
+    */
+   virtual void*           getBuf(ossim_uint32 band);
+   
+   /**
+    * @param band (zero based)
+    * @return ossim_uint8* to theDataBuffer positioned at band if scalar is
+    * of type OSSIM_UCHAR; else, NULL.
+    */
+   virtual ossim_uint8*    getUcharBuf(ossim_uint32 band);
+   
+   /**
+    * @param band (zero based)
+    * @return ossim_uint16* to theDataBuffer positioned at band if scalar is
+    * of type OSSIM_USHORT16 or OSSIM_USHORT11; else, NULL.
+    */
+   virtual ossim_uint16*   getUshortBuf(ossim_uint32 band);
+   
+   /**
+    * @param band (zero based)
+    * @return ossim_sint16* to theDataBuffer positioned at band if scalar is
+    * of type OSSIM_SSHORT16; else, NULL.
+    */
+   virtual ossim_sint16*   getSshortBuf(ossim_uint32 band);
+   
+   /**
+    * @param band (zero based)
+    * @return ossim_float32* to theDataBuffer positioned at band if scalar is
+    * of type OSSIM_FLOAT or OSSIM_NORMALIZED_FLOAT; else, NULL.
+    */
+   virtual ossim_float32*  getFloatBuf(ossim_uint32 band);
+   
+   /**
+    * @param band (zero based)
+    * @return ossim_float64* to theDataBuffer positioned at band if scalar is
+    * of type OSSIM_DOUBLE or OSSIM_NORMALIZED_DOUBLE; else, NULL.
+    */
+   virtual ossim_float64*  getDoubleBuf(ossim_uint32 band);
+   
+   /**
+    *  Returns the total number of pixels in a tile for all bands.
+    *  Note:  This is not in bytes but in pixels.
+    */
+   virtual ossim_uint32 getSize() const;
+
+   /**
+    *  Returns the number of pixels in a single band in a tile.
+    *  Note:  This is not in bytes but in pixels.
+    */
+   virtual ossim_uint32 getSizePerBand()const;
+
+   /**
+    *  Returns the number of bytes in single band of the tile.
+    */
+   virtual ossim_uint32 getSizePerBandInBytes() const;
+
+   virtual ossim_uint32 getDataSizeInBytes()const;
+
+   /**
+    * Returns the total number of bytes for all bands.
+    */
+   virtual ossim_uint32  getSizeInBytes() const;
+
+   /**
+    *  Initializes data to null pixel values.
+    */
+   virtual void makeBlank();
+
+   /**
+    *  Initialize the data buffer.
+    */
+   virtual void initialize();
+
+   /**
+    * @brief Writes tile to stream.
+    *
+    * This will write the buffer to file with an associated header file.
+    * Assuming a contiguous buffer in BSQ format.  Currently does not
+    * support converting to BIP or BIL or byte swapping but probably
+    * should add at some point.
+    *
+    * @param f File to write.
+    *
+    * @return true on success, false on error.
+    */
+   virtual bool write(const ossimFilename& f) const;
+
+   /**
+    * Copies entire tile to buf passed in.  Data put in buf is normalized.
+    * The "buf" passed to method is assumed to be at least as big as:
+    * "getSize() * sizeof(double)"
+    */
+   virtual void copyTileToNormalizedBuffer(ossim_float64* buf) const;
+   virtual void copyTileToNormalizedBuffer(ossim_float32* buf)const;
+
+   /**
+    * Will copy this tiles specified band number to the normalized buffer.
+    * if the band is out of range then nothing is done and returns.
+    *
+    * @param band Zero based band to copy.
+    *
+    * @param buf Buffer to copy to.
+    */
+   virtual void copyTileBandToNormalizedBuffer(ossim_uint32 band,
+                                               ossim_float64* buf) const;
+   
+   /**
+    * Will copy this tiles specified band number to the normalized buffer.
+    * if the band is out of range then nothing is done and returns.
+    *
+    * @param band Zero based band to copy.
+    *
+    * @param buf Buffer to copy to.
+    */
+   virtual void copyTileBandToNormalizedBuffer(ossim_uint32 band,
+                                               ossim_float32* buf)const;
+
+   /**
+    * Copies buf passed in to tile.  Data is unnormalized to the tile's
+    * scalar type.
+    * The "buf" passed to method is assumed to be at least as big as the tiles:
+    * "getSize() * sizeof(double)"
+    */
+   virtual void copyNormalizedBufferToTile(ossim_float64* buf);
+   virtual void copyNormalizedBufferToTile(ossim_float32* buf);
+
+   /**
+    * Will copy the normalized buffer to this tiles
+    * specified band.  If band is out of range then nothing
+    *
+    * is done and returns.
+    */
+   virtual void copyNormalizedBufferToTile(ossim_uint32 band,
+                                           ossim_float64* buf);
+   virtual void copyNormalizedBufferToTile(ossim_uint32 band,
+                                           ossim_float32* buf);
+
+   virtual bool isWithin(ossim_int32 x, ossim_int32 y);
+   virtual void setValue(ossim_int32 x, ossim_int32 y, ossim_float64 color);
+
+   virtual void loadBand(const void* src,
+                         const ossimIrect& src_rect,
+                         ossim_uint32 band);
+
+   virtual void loadBand(const void* src,
+                         const ossimIrect& src_rect,
+                         const ossimIrect& clip_rect,
+                         ossim_uint32 band);
+   
+   virtual void loadTile(const void* src,
+                         const ossimIrect& src_rect,
+                         ossimInterleaveType il_type);
+   virtual void loadTileWithAlpha(const void* src,
+                         const ossimIrect& src_rect,
+                         ossimInterleaveType il_type);
+
+   virtual void loadTile(const void* src,
+                         const ossimIrect& src_rect,
+                         const ossimIrect& clip_rect,                         
+                         ossimInterleaveType il_type);
+
+   virtual void nullTileAlpha(const ossim_uint8* src,
+                              const ossimIrect& src_rect,
+                              bool mutliplyAlphaFlag=false);
+   virtual void nullTileAlpha(const ossim_uint8* src,
+                              const ossimIrect& src_rect,
+                              const ossimIrect& clip_rect,
+                              bool multiplyAlphaFlag=false);
+   /**
+    * Will load a tile of different types.  If they
+    * are the same then it will call loadTile(void*...)
+    * method.  Note if they are of different types we
+    * will have to go through a much slower assign
+    * process by normalizing the right side and then
+    * unnormalizing to the destination type. For this
+    * method to work they both must have the same
+    * number of bands.
+    */
+   virtual void loadTile(const ossimImageData* src);
+   
+   virtual void loadTileFrom1Band(const ossimImageData* data);
+
+   virtual void loadTileFrom1Band(const void* src,
+                                  const ossimIrect& src_rect);
+   /**
+    * Specialized to load a tile from a short (16 bit scalar type) buffer.
+    * Performs byte swapping if swap_bytes is set to true.
+    */
+   virtual void loadShortBand(const void* src,
+                              const ossimIrect& src_rect,
+                              ossim_uint32 band,
+                              bool swap_bytes=false);
+
+   /**
+    * This routine is designed for overwriting a selected band of the 
+    * destination buffer 'dest' by an independent selected band of the
+    * source buffer according to a user-selected rule, defined by 
+    * OverwriteBandRule.
+    *
+    * Currently the rules available in OverwriteBandRule are: 
+    *
+    * The COLOR_DISCREPANCY_OF_ANY_FROM_DEST rule directs that the selected 
+    * band of a pixel of the destination buffer is to be overwritten if *any* 
+    * one of the other bands of the same destination pixel have color values 
+    * that deviate from its color. Same as the deprecated COLOR_DISCREPANCY.
+    *
+    * The COLOR_DISCREPANCY_OF_ALL_FROM_DEST rule directs that the selected 
+    * band of a pixel of the destination buffer is to be overwritten only if 
+    * *all* of the other bands of the same destination pixel have color values
+    * that deviate from its color. 
+    *
+    * The COLOR_EQUALITY_OF_ANY_TO_SRC rule directs that the selected 
+    * band of a pixel of the destination buffer is to be overwritten if 
+    * *any* one of the other bands of the same destination pixel have color 
+    * values that are equal to the color of the selected band of the source
+    * pixel. 
+    *
+    * The COLOR_EQUALITY_OF_ALL_TO_SRC rule directs that the selected 
+    * band of a pixel of the destination buffer is to be overwritten only if 
+    * *all* of the other bands of the same destination pixel have color 
+    * values that are equal to the color of the selected band of the source
+    * pixel. 
+    *
+    * The NULL_RULE rule directs that the selected band of the 
+    * destination buffer is to be overwritten by the selected band of the 
+    * source image data (no questions asked).
+    *
+    * @note: The 'dest' buffer should have at least the same number of bands 
+    * as the 'src' object. 
+    *
+    * Currently this routine is only implemented for il_type set to OSSIM_BSQ.
+    *
+    * @param dest      The destination buffer, which should have at least the 
+    * same number of bands as the 'src' object.
+    * @param src_band  The 0-based band of the source image data.
+    * @param dest_band The 0-based band of the dest buffer.
+    * @param dest_rect The rectangle of the destination buffer.
+    * @param il_type   The interleave type. Only OSSIM_BSQ available.
+    * @param ow_type   The rule for overwriting the destination buffer.
+    */
+   virtual void unloadBand( void* dest,
+                            ossim_uint32 src_band,
+                            ossim_uint32 dest_band,
+                            const ossimIrect& dest_rect,
+                            ossimInterleaveType il_type=OSSIM_BSQ,
+                            OverwriteBandRule ow_type=NULL_RULE ) const;
+
+   /**
+    * This routine is designed for overwriting a selected band of the 
+    * destination buffer 'dest' by an independent selected band of the
+    * source buffer according to a user-selected rule, defined by 
+    * OverwriteBandRule.
+    *
+    * Currently the rules available in OverwriteBandRule are: 
+    *
+    * The COLOR_DISCREPANCY_OF_ANY_FROM_DEST rule directs that the selected 
+    * band of a pixel of the destination buffer is to be overwritten if *any* 
+    * one of the other bands of the same destination pixel have color values 
+    * that deviate from its color. Same as the deprecated COLOR_DISCREPANCY.
+    *
+    * The COLOR_DISCREPANCY_OF_ALL_FROM_DEST rule directs that the selected 
+    * band of a pixel of the destination buffer is to be overwritten only if 
+    * *all* of the other bands of the same destination pixel have color values
+    * that deviate from its color. 
+    *
+    * The COLOR_EQUALITY_OF_ANY_TO_SRC rule directs that the selected 
+    * band of a pixel of the destination buffer is to be overwritten if 
+    * *any* one of the other bands of the same destination pixel have color 
+    * values that are equal to the color of the selected band of the source
+    * pixel. 
+    *
+    * The COLOR_EQUALITY_OF_ALL_TO_SRC rule directs that the selected 
+    * band of a pixel of the destination buffer is to be overwritten only if 
+    * *all* of the other bands of the same destination pixel have color 
+    * values that are equal to the color of the selected band of the source
+    * pixel. 
+    *
+    * The NULL_RULE rule directs that the selected band of the 
+    * destination buffer is to be overwritten by the selected band of the 
+    * source image data (no questions asked).
+    *
+    * @note: The 'dest' buffer should have at least the same number of bands 
+    * as the 'src' object. 
+    *
+    * Currently this routine is only implemented for il_type set to OSSIM_BSQ.
+    *
+    * @param dest      The destination buffer, which should have at least the 
+    * same number of bands as the 'src' object.
+    * @param src_band  The 0-based band of the source image data.
+    * @param dest_band The 0-based band of the dest buffer.
+    * @param dest_rect The rectangle of the destination buffer.
+    * @param clip_rect Only data within will be copied.
+    * @param il_type   The interleave type. Only OSSIM_BSQ available.
+    * @param ow_type   The rule for overwriting the destination buffer.
+    */
+   virtual void unloadBand( void* dest,
+                            ossim_uint32 src_band,
+                            ossim_uint32 dest_band,
+                            const ossimIrect& dest_rect,
+                            const ossimIrect& clip_rect,
+                            ossimInterleaveType il_type=OSSIM_BSQ,
+                            OverwriteBandRule ow_type=NULL_RULE ) const;
+
+   /**
+    * @param dest The destination buffer.  It is assumed this is a single band
+    * and the size of dest_rect.
+    * @param dest_rect The rectangle of the destination buffer.
+    * @param src_band The band to copy (unload) from the tile.
+    */
+   virtual void unloadBand(void* dest,
+                           const ossimIrect& dest_rect,
+                           ossim_uint32 src_band) const;
+
+   /**
+    * @param dest The destination buffer.  It is assumed this is a single band
+    * and the size of dest_rect.
+    * @param dest_rect The rectangle of the destination buffer.
+    * param clip_rect Only data within the clip_rect will be copied.
+    * @param src_band The band to copy (unload) from the tile.
+    */
+   virtual void unloadBand(void* dest,
+                           const ossimIrect& dest_rect,
+                           const ossimIrect& clip_rect,
+                           ossim_uint32 src_band) const;
+   
+   virtual void unloadTile(void* dest,
+                           const ossimIrect& dest_rect,
+                           ossimInterleaveType il_type ) const;
+
+   virtual void unloadTile(void* dest,
+                           const ossimIrect& dest_rect,
+                           const ossimIrect& clip_rect,
+                           ossimInterleaveType il_type) const;
+
+   /**
+    * @param dest The destination buffer.
+    * @param dest_rect The rectangle of the destination buffer.
+    * param clip_rect Only data within the clip_rect will be copied.
+    * @param src_band The band to copy (unload) from the tile.
+    */
+   virtual void unloadTileToBipAlpha(void* dest,
+                                     const ossimIrect& dest_rect,
+                                     const ossimIrect& clip_rect) const;
+   
+   virtual bool isPointWithin(const ossimIpt& point)const;
+   virtual bool isPointWithin(ossim_int32 x,
+                              ossim_int32 y)const;
+
+   virtual std::ostream& print(std::ostream& out) const;
+
+   /**
+    * @brief Performs linear stretch on tile data from min/max to limits of
+    * scalar type.
+    */
+   virtual void stretchMinMax();
+
+   /**
+    * @brief Computes the alpha channel.
+    *
+    * For each pixel if any band value is not null then alpha will be 255;
+    * else, 0.
+    */
+   virtual void computeAlphaChannel();
+
+   /**
+    * @brief Method to copy a single line to the tile.
+    *
+    * This will copy a line to the tile.  It is assumed that all bands are in
+    * the buffer "src".  Only pixels within the tile rect will be copied.
+    * Note that all coordinates are relative to the tile coordinates.
+    * Clipping will be performed on pixels outside of the tile rectangle.
+    * No fill is added if a partial tile line is copied so callers
+    * should do a ossimImageData::makeBlank if the whole tile is not to be
+    * stuffed.  ossimImageData::validate should be called after all lines
+    * are copied if in doubt of a full tile.
+    *
+    * @param src The source buffer or line to copy containing all bands.
+    *
+    * @param lineNumber Line number to copy.
+    *
+    * @param lineStartSample The start sample of the source buffer relative
+    * to tile coordinates.
+    *
+    * @param lineStopSample The stop sample of the source buffer relative
+    * to tile coordinates.
+    *
+    * @param lineInterleave Interleave of src buffer.  If OSSIM_BIP assumed
+    * rgbrgbrgb; else, red row, green row, blue row.
+    *
+    * Usage example in method: ossimTiffTileSource::loadFromScanLine
+    */
+   virtual void copyLine(const void* src,
+                         ossim_int32 lineNumber,
+                         ossim_int32 lineStartSample,
+                         ossim_int32 lineStopSample,
+                         ossimInterleaveType lineInterleave);
+
+   /**
+    * @brief Sets the indexed flag.
+    *
+    * This indicates the data contains palette indexes.  Default is false.
+    * 
+    * @param flag If true data is indexed.
+    */
+   void setIndexedFlag(bool flag);
+
+   /** @return The indexed flag. */
+   bool getIndexedFlag() const;
+   
+   /**
+    * Returns the percentage (0-100) of data buffer containing non-null (valid) entries.
+    * Undefined until validate() is called.
+    */
+   ossim_float64 percentFull() const { return m_percentFull; }
+   
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+protected:
+   /** @brief Templated copy line method. */
+   template <class T> void copyLineTemplate(T dummyTemplate,
+                                            const void* src,
+                                            ossim_int32 lineNumber,
+                                            ossim_int32 lineStartSample,
+                                            ossim_int32 lineStopSample,
+                                            ossimInterleaveType lineInterleave);
+   
+   /**
+    * @brief Templated stretch method.
+    *
+    * Performs linear stretches on tile data from min/max to limits of
+    * scalar type.
+    */
+   template <class T> void stretchMinMax(T dummyTemplate);
+
+   /**
+    * @brief Templated compute alpha channel.
+    *
+    * For each pixel if any band value is not null then alpha will be 255;
+    * else, 0.
+    */
+   template <class T> void computeAlphaChannel(T dummyTemplate);   
+
+   /**
+    * Templated validate method.
+    *
+    * @return The status of the ossimImageDataMethod.
+    *
+    * @note See ossimConstants.h for ossimDataObjectStatus enumerations.
+    */
+   template <class T> ossimDataObjectStatus validate(T dummyTemplate) const;
+
+   /**
+    * Templated makeBlank method.
+    */
+   template <class T> void makeBlank(T dummyTemplate);
+
+   /**
+    * Templated computeMeanSquaredError method.
+    */
+   template <class T>
+      ossim_float64 computeMeanSquaredError(T dummyTemplate,
+                                            ossim_float64 meanValue,
+                                            ossim_uint32 bandNumber) const;
+
+   /**
+    * Templated computeAverageBandValue method.
+    */
+   template <class T>
+      ossim_float64 computeAverageBandValue(T dummyTemplate,
+                                            ossim_uint32 bandNumber) const;
+   
+   void loadTileFromBip(const void* src, const ossimIrect& src_rect);
+   void loadTileFromBipAlpha(const void* src, const ossimIrect& src_rect);
+   void loadTileFromBil(const void* src, const ossimIrect& src_rect);
+   void loadTileFromBsq(const void* src, const ossimIrect& src_rect);
+
+   void loadTileFromBip(const void* src,
+                        const ossimIrect& src_rect,
+                        const ossimIrect& clip_rect);
+   void loadTileFromBil(const void* src,
+                        const ossimIrect& src_rect,
+                        const ossimIrect& clip_rect);
+   void loadTileFromBsq(const void* src,
+                        const ossimIrect& src_rect,
+                        const ossimIrect& clip_rect);
+
+   void unloadTileToBip(void* dest,
+                        const ossimIrect& dest_rect,
+                        const ossimIrect& clip_rect) const;
+   void unloadTileToBil(void* dest,
+                        const ossimIrect& dest_rect,
+                        const ossimIrect& clip_rect) const;
+   void unloadTileToBsq(void* dest,
+                        const ossimIrect& dest_rect,
+                        const ossimIrect& clip_rect) const;
+
+   /**
+    * Called from public unloadBand() routines that have an 
+    * OverwriteBandRule interface.
+    *
+    * @param dest      The destination buffer.
+    * @param src_band  The 0-based band of the source image data.
+    * @param dest_band The 0-based band of the destination buffer.
+    * @param dest_rect The rectangle of the destination buffer.
+    * @param clip_rect Only data within will be copied.
+    * @param ow_type   The rule for overwriting the destination buffer.
+    */
+   virtual void unloadBandToBsq( void* dest,
+                                 ossim_uint32 src_band,
+                                 ossim_uint32 dest_band,
+                                 const ossimIrect& dest_rect,
+                                 const ossimIrect& clip_rect,
+                                 OverwriteBandRule ow_type=NULL_RULE ) const;
+
+   /**
+    * Copies entire tile to buf passed in.  Data put in buf is normalized.
+    * The "buf" passed to method is assumed to be at least as big as:
+    * "getSize() * sizeof(double)"
+    */
+   template <class T>
+   void copyTileToNormalizedBuffer(T dummyTemplate,
+                                   ossim_float64* buf) const;
+   template <class T>
+   void copyTileToNormalizedBuffer(T dummyTemplate,
+                                   ossim_float32* buf)const;
+
+   /**
+    * Will copy this tiles specified band number to the normalized buffer.
+    * if the band is out of range then nothing is done and returns.
+    */
+   template <class T>
+   void copyTileToNormalizedBuffer(T dummyTemplate,
+                                   ossim_uint32 band, ossim_float64* buf) const;
+   template <class T>
+   void copyTileToNormalizedBuffer(T dummyTemplate,
+                                   ossim_uint32 band, ossim_float32* buf)const;
+
+   /**
+    * Copies buf passed in to tile.  Data is unnormalized to the tile's
+    * scalar type.
+    * The "buf" passed to method is assumed to be at least as big as the tiles:
+    * "getSize() * sizeof(double)"
+    */
+   template <class T>
+   void copyNormalizedBufferToTile(T dummyTemplate,
+                                   ossim_float64* buf);
+   template <class T>
+   void copyNormalizedBufferToTile(T dummyTemplate,
+                                   ossim_float32* buf);
+   template <class T>
+   void copyNormalizedBufferToTile(T dummyTemplate,
+                                   ossim_uint32 band,
+                                   ossim_float64* buf);
+   template <class T>
+   void copyNormalizedBufferToTile(T dummyTemplate,
+                                   ossim_uint32 band,
+                                   ossim_float32* buf);
+
+   
+   template <class T>
+   void computeMinMaxPix(T dummyValue,
+                         std::vector<ossim_float64>& minBands,
+                         std::vector<ossim_float64>& maxBands) const;
+
+   template <class T>
+   void computeMinMaxNulPix(T dummyValue,
+                            std::vector<ossim_float64>& minBands,
+                            std::vector<ossim_float64>& maxBands,
+                            std::vector<ossim_float64>& nulBands) const;
+   
+   template <class T> void loadBandTemplate(T, // dummy template variable
+                                            const void* src,
+                                            const ossimIrect& src_rect,
+                                            ossim_uint32 band);
+
+   template <class T> void loadBandTemplate(T, // dummy template variable
+                                            const void* src,
+                                            const ossimIrect& src_rect,
+                                            const ossimIrect& clip_rect,
+                                            ossim_uint32 band);
+
+   template <class T> void nullTileAlphaTemplate(T,
+                                                 const ossim_uint8* src,
+                                                 const ossimIrect& src_rect,
+                                                 const ossimIrect& clip_rect,
+                                                 bool multiplyAlphaFlag=false);
+   
+   template <class T> void loadTileFromBipTemplate(T, // dummy template variable
+                                                   const void* src,
+                                                   const ossimIrect& src_rect);
+   template <class T> void loadTileFromBipAlphaTemplate(T, // dummy template variable
+                                                   const void* src,
+                                                   const ossimIrect& src_rect);
+
+   template <class T> void loadTileFromBipTemplate(T, // dummy template variable
+                                                   const void* src,
+                                                   const ossimIrect& src_rect,
+                                                   const ossimIrect& clip_rect);
+    template <class T>
+    void loadTileFromBipAlphaTemplate(T, // dummy template variable
+                                                 const void* src,
+                                                 const ossimIrect& src_rect,
+                                                 const ossimIrect& clip_rect);
+   
+   template <class T> void loadTileFromBilTemplate(T, // dummy template variable
+                                                   const void* src,
+                                                   const ossimIrect& src_rect);
+   
+   template <class T> void loadTileFromBilTemplate(T, // dummy template variable
+                                                   const void* src,
+                                                   const ossimIrect& src_rect,
+                                                   const ossimIrect& clip_rect);
+   
+   template <class T> void loadTileFromBsqTemplate(T, // dummy template variable
+                                                   const void* src,
+                                                   const ossimIrect& src_rect);
+   
+   template <class T> void loadTileFromBsqTemplate(T, // dummy template variable
+                                                   const void* src,
+                                                   const ossimIrect& src_rect,
+                                                   const ossimIrect& clip_rect);
+   
+   template <class T> void unloadTileToBipTemplate(T, // dummy template variable
+                                                   void* dest,
+                                                   const ossimIrect& dest_rect,
+                                                   const ossimIrect& clip_rect) const;
+
+   template <class T> void unloadTileToBipAlphaTemplate(T, // dummy template variable
+                                                        void* dest,
+                                                        const ossimIrect& dest_rect,
+                                                        const ossimIrect& clip_rect) const;
+
+   template <class T> void unloadTileToBilTemplate(T, // dummy template variable
+                                                   void* dest,
+                                                   const ossimIrect& dest_rect,
+                                                   const ossimIrect& clip_rect) const;
+
+   template <class T> void unloadTileToBsqTemplate(T, // dummy template variable
+                                                   void* dest,
+                                                   const ossimIrect& dest_rect,
+                                                   const ossimIrect& clip_rect) const;
+
+   template <class T> void unloadBandTemplate(T, // dummy template variable
+                                              void* dest,
+                                              const ossimIrect& dest_rect,
+                                              const ossimIrect& clip_rect,
+                                              ossim_uint32 band) const;
+
+   template <class T> void unloadBandToBsqTemplate(T, // dummy template variable
+                                                   void* dest,
+                                                   ossim_uint32 src_band,
+                                                   ossim_uint32 dest_band,
+                                                   const ossimIrect& dest_rect,
+                                                   const ossimIrect& clip_rect,
+                                                   OverwriteBandRule ow_type=NULL_RULE) const;
+
+   /**
+    * @brief Creates a test tile for scalar type for testing only.
+    *
+    * Protected template implementation of matching public createTestTile.
+    */
+   template <class T> void createTestTile(T);
+   
+   /**
+    * @brief initializeDefaults() Resizes and sets min/max/null arrays to
+    * number of bands and some default value for scalar type.
+    */
+   virtual void initializeDefaults();
+
+   /**
+    * @brief initializeMinDefault() Resizes theMinPixelValue array to number
+    * of bands and initializes to the default min for scalar type.
+    */
+   virtual void initializeMinDefault();
+
+   /**
+    * @brief initializeMaxDefault() Resizes theMaxPixelValue array to number
+    * of bands and initializes to the default max for scalar type.
+    */
+   virtual void initializeMaxDefault();
+
+   /**
+    * @brief initializeNullDefault() Resizes theNullPixelValue array to number
+    * of bands and initializes to the default null for scalar type.
+    */
+   virtual void initializeNullDefault();
+
+   virtual bool isEqualTo(const ossimDataObject& rhs,
+                          bool deepTest=false)const;
+   
+   bool hasSameDimensionsAs(ossimImageData* data)const
+   {
+      bool result = false;
+      if(data)
+      {
+         result = ((m_spatialExtents.size() ==
+                    data->m_spatialExtents.size())&&
+                   (m_spatialExtents[0] == data->m_spatialExtents[0])&&
+                   (m_spatialExtents[1] == data->m_spatialExtents[1])&&
+                   (m_scalarType == data->m_scalarType));
+      }
+      return result;
+   }
+   
+   /**  Null pixel value for each band. */
+   std::vector<ossim_float64> m_nullPixelValue;
+
+   /** Min pixel value for each band. */
+   std::vector<ossim_float64> m_minPixelValue;
+
+   /** Max pixel value for each band. */
+   std::vector<ossim_float64> m_maxPixelValue;
+
+   /** Alpha channel */
+   std::vector<ossim_uint8> m_alpha;
+   
+   ossimIpt m_origin;
+
+   /** Indicates data contains palette indexes. */
+   bool m_indexedFlag;
+
+   /** percentage (0-100) of image tile that has valid (non-null) pixel values. This is computed
+    * in validate() method.
+    */
+   mutable ossim_float64 m_percentFull;
+
+private:
+
+   
+TYPE_DATA
+};
+
+inline bool ossimImageData::hasAlpha() const
+{
+   return (m_alpha.size()?true:false);
+}
+
+inline ossimIrect ossimImageData::getImageRectangle() const
+{
+   ossimIpt lr(m_origin.x + getWidth()  - 1,
+               m_origin.y + getHeight() - 1);
+   
+   return ossimIrect(m_origin, lr);
+}
+
+inline const ossim_float64* ossimImageData::getNullPix()const
+{
+   return ( m_nullPixelValue.size() > 0 ? &m_nullPixelValue.front() : 0 );
+}
+
+inline const ossim_float64* ossimImageData::getMinPix()const
+{
+   return ( m_minPixelValue.size() > 0 ? &m_minPixelValue.front() : 0 );
+}
+
+inline const ossim_float64* ossimImageData::getMaxPix()const
+{
+   return ( m_maxPixelValue.size() > 0 ? &m_maxPixelValue.front() : 0 );
+}
+
+inline ossim_float64 ossimImageData::getNullPix(ossim_uint32 band) const
+{
+   return ( band < m_nullPixelValue.size() ? m_nullPixelValue[band] :
+            ossim::defaultNull( getScalarType() ) );
+}
+      
+inline ossim_float64 ossimImageData::getMinPix(ossim_uint32 band) const
+{
+   return ( band < m_minPixelValue.size() ? m_minPixelValue[band] :
+            ossim::defaultMin( getScalarType() ) );
+}
+
+inline ossim_float64 ossimImageData::getMaxPix(ossim_uint32 band) const
+{
+   return ( band < m_maxPixelValue.size() ? m_maxPixelValue[band] :
+            ossim::defaultMax( getScalarType() ) );
+}
+
+inline ossim_uint32 ossimImageData::getHashId()const
+{
+   const unsigned char *bufx = (unsigned char*)(&m_origin.x);
+   const unsigned char *bufy = (unsigned char*)(&m_origin.y);
+   return (ossim_uint32)(bufx[0]*101 + bufx[1]*103 +
+                         bufx[2]*107 + bufx[3]*109 +
+                         bufy[0]*139 + bufy[1]*149 +
+                         bufy[2]*151 + bufy[3]*157);
+}
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimImageDataFactory.h b/ossim/include/ossim/imaging/ossimImageDataFactory.h
new file mode 100644
index 0000000..54e878b
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageDataFactory.h
@@ -0,0 +1,64 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description:
+//
+//*************************************************************************
+// $Id: ossimImageDataFactory.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimImageDataFactory_HEADER
+#define ossimImageDataFactory_HEADER
+
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <OpenThreads/Mutex>
+class ossimSource;
+class ossimImageSource;
+
+
+/*!
+ * This factory should be called by all image source producers to allocate
+ * an image tile.
+ */
+class OSSIM_DLL ossimImageDataFactory
+{
+public:
+   virtual ~ossimImageDataFactory();
+   static ossimImageDataFactory* instance();
+
+   virtual ossimRefPtr<ossimImageData> create(ossimSource* owner,
+                                              ossimScalarType scalar,
+                                              ossim_uint32 bands = 1)const;
+
+   virtual ossimRefPtr<ossimImageData> create(ossimSource* owner,
+                                              ossimScalarType scalar,
+                                              ossim_uint32 bands,
+                                              ossim_uint32 width,
+                                              ossim_uint32 height)const;
+   
+   virtual ossimRefPtr<ossimImageData> create(
+      ossimSource* owner,
+      ossim_uint32 bands,
+      ossimImageSource* inputSource)const;
+   
+   
+   virtual ossimRefPtr<ossimImageData> create(
+      ossimSource* owner,
+      ossimImageSource* inputSource)const;
+   
+protected:
+   ossimImageDataFactory(); // hide
+   ossimImageDataFactory(const ossimImageDataFactory&){}//hide
+   void operator = (ossimImageDataFactory&){}// hide
+   
+   static ossimImageDataFactory* theInstance;
+   static OpenThreads::Mutex theInstanceMutex;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimImageDataHelper.h b/ossim/include/ossim/imaging/ossimImageDataHelper.h
new file mode 100644
index 0000000..cac28e9
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageDataHelper.h
@@ -0,0 +1,102 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author: Garrett Potts (gpotts at imagelinks)
+//
+//*************************************************************************
+// $Id: ossimImageDataHelper.h 23356 2015-06-03 18:28:03Z dburken $
+#ifndef ossimImageDataHelper_HEADER
+#define ossimImageDataHelper_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/base/ossimPolyArea2d.h>
+#include <ossim/base/ossimRgbVector.h>
+
+class OSSIM_DLL ossimImageDataHelper
+{
+public:
+   /*!
+    * This must be a valid image data object
+    */
+   ossimImageDataHelper(ossimImageData* imageData=0);
+
+   void setImageData(ossimImageData* imageData);
+
+   void fill(const double* values,
+             const ossimIrect& rect,
+             bool clipPoly=true);
+
+   void fill(const double* values,
+             std::vector<ossimPolygon>& regionList,
+             bool clipPoly=true);
+   
+   void fill(const ossimRgbVector& color,
+             std::vector<ossimPolygon>& regionList,
+             bool clipPoly=true);
+   
+   void fill(const ossimRgbVector& color,
+             const ossimIrect& rect,
+             bool clipPoly=true);
+   /*!
+    * Values must be of the same type as the image data that
+    * we are writing to.
+    */
+   void fill(const double*  values,
+             const ossimPolygon& region,
+             bool clipPoly=true);
+
+   void fill(const ossimRgbVector& color,
+             const ossimPolygon& region,
+             bool clipPoly=true);
+   /*!
+    * The input is assumed to have the same origin, size and scalar
+    * as this object.  This will implement a selection
+    */
+   void copyInputToThis(const void* input,
+                        const ossimPolygon& region,
+                        bool clipPoly=true);
+
+   ossimImageData* theImageData;
+   
+
+protected:
+   ossimIpt        theOrigin;
+   ossimIrect      theImageRectangle;
+   ossimPolyArea2d thePolyImageRectangle;
+   
+   template <class T>
+   void fill(T dummyVariable,
+             const double* values,
+             const ossimPolygon& region,
+             bool clipPoly);
+
+   template <class T>
+   void fill(T dummyVariable,
+             const double* values,
+             const ossimIrect& region,
+             bool clipPoly);
+   
+   template <class T>
+   void copyInputToThis(const T* inputBuf,
+                        const ossimPolygon& region,
+                        bool clipPoly);
+
+   template <class T>
+   void fill(T dummyVariable,
+             const double* values,
+             const ossimPolygon& region);
+   template <class T>
+   void fill(T dummyVariable,
+             const double* values,
+             const ossimIrect& region);
+   
+   template <class T>
+   void copyInputToThis(const T* inputBuf,
+                        const ossimPolygon& region);
+
+   
+};
+
+#endif
diff --git a/include/ossim/imaging/ossimImageDisplayWriter.h b/ossim/include/ossim/imaging/ossimImageDisplayWriter.h
similarity index 100%
rename from include/ossim/imaging/ossimImageDisplayWriter.h
rename to ossim/include/ossim/imaging/ossimImageDisplayWriter.h
diff --git a/include/ossim/imaging/ossimImageFileWriter.h b/ossim/include/ossim/imaging/ossimImageFileWriter.h
similarity index 100%
rename from include/ossim/imaging/ossimImageFileWriter.h
rename to ossim/include/ossim/imaging/ossimImageFileWriter.h
diff --git a/ossim/include/ossim/imaging/ossimImageGaussianFilter.h b/ossim/include/ossim/imaging/ossimImageGaussianFilter.h
new file mode 100644
index 0000000..2e975b0
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageGaussianFilter.h
@@ -0,0 +1,81 @@
+//*******************************************************************
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// class ossimImageGaussianFilter : tile source
+//*******************************************************************
+// $Id: ossimImageGaussianFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimImageGaussianFilter_HEADER
+#define ossimImageGaussianFilter_HEADER
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+#include <ossim/imaging/ossimConvolutionFilter1D.h>
+
+/**
+ * class for symmetric Gaussian filtering
+ * implemented as two separable horizontal/vertical gaussian filters
+ *
+ * PROPERTIES:
+ * -GaussStd is the standard deviation of the gaussian
+ *  (filter widths are equal to 2*floor(2.5*GaussStd+0.5)+1)
+ * -strictNoData selects the behaviour for NODATA pixels
+ *   true  : any NODATA pixels in the convolution will Nullify the center pixel
+ *   false : center pixel will be NODATA only if it was NODATA before 
+ *     other NODATA pixels are processed as zero in the convolution calculation
+ */
+class OSSIM_DLL ossimImageGaussianFilter : public ossimImageSourceFilter
+{
+public:
+  /** 
+   * own methods
+   */
+   ossimImageGaussianFilter();
+
+   inline ossim_float64 getGaussStd()const { return theGaussStd; }
+   void setGaussStd(const ossim_float64& v);
+
+   inline bool isStrictNoData()const { return theStrictNoData; }
+   void setStrictNoData(bool aStrict);
+
+  /** 
+   * inherited methods
+   */
+   virtual void initialize();
+   
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect &tileRect,ossim_uint32 resLevel=0);
+
+   virtual void connectInputEvent(ossimConnectionEvent &event);
+   virtual void disconnectInputEvent(ossimConnectionEvent &event);
+
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+   virtual bool loadState(const ossimKeywordlist& kwl,const char* prefix = 0);   
+   virtual bool saveState(ossimKeywordlist& kwl,const char* prefix = 0)const;
+   
+protected:
+   virtual ~ossimImageGaussianFilter();
+  /**
+   * protected methods
+   */
+   void initializeProcesses();
+   void updateKernels();
+
+  /**
+   * parameters
+   */
+   ossim_float64 theGaussStd;
+   bool          theStrictNoData;
+
+  /**
+   * subprocesses
+   */
+   ossimRefPtr<ossimConvolutionFilter1D> theHF; //horizontal filter
+   ossimRefPtr<ossimConvolutionFilter1D> theVF; //vertical filter
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimImageGaussianFilter_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimImageGeometry.h b/ossim/include/ossim/imaging/ossimImageGeometry.h
new file mode 100644
index 0000000..0f69fb7
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageGeometry.h
@@ -0,0 +1,473 @@
+//***********************************************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Oscar Kramer (oscarkramer at yahoo.com)
+//
+// Description: Class declaration of ossimImageGeometry.
+//
+//***********************************************************************************************
+// $Id: ossimImageGeometry.h 3102 2012-01-18 15:30:20Z oscar.kramer $
+
+#ifndef ossimImageGeometry_HEADER
+#define ossimImageGeometry_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimRtti.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimPolyArea2d.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/base/ossim2dTo2dTransform.h>
+#include <vector>
+#include <ossim/matrix/newmat.h>
+#include <ossim/base/ossimDpt3d.h>
+#include <ossim/base/ossimAdjustableParameterInterface.h>
+
+// Forward class declarations:
+class ossimDrect;
+class ossimIrect;
+class ossimGrect;
+
+//***********************************************************************************************
+//! Container class that holds both 2D transform and 3D projection information for an image
+//! Only one instance of this is alive per image. This is  the object that is returned from
+//! a call to ossimImageSource::getImageGeometry()
+//! 
+//! All images in OSSIM have at least a 2D transformation from local (relative to start of file)
+//! to full-image coordinates. Often this transform is an identity transform (does nothing). In 
+//! some cases however, the first pixel in the file does not correspond to the upper-left pixel of
+//! the original, full image. Since the image's sensor model may only apply to full-image pixel 
+//! coordinates, it is necessary to reference the latter when making computing ground point 
+//! location.  Also the local image could be a reduced resolution level of the full image.  So
+//! the image could be a decimated sub image of the full image.
+//!
+//! Additionally, images typically are accompanied by some form of metadata that defines the mapping
+//! from 2D image coordinates to 3D world coordinates. This mapping may be in the form of a map
+//! projection for orthorectified images, or a perspective projection such as a sensor model.
+//! 
+//! This object class maintains both 2D transform and 3D projection information for the associated
+//! image. This object will typically be created and "owned" by the image handler object. Therefore,
+//! only one copy per image will exist at a time.
+//!
+//! Notes:
+//! 1) Shifts are relative to "full image space".  So if you have a sub image from r2 the shift
+//!    given to the transform should be relative to "full image space".
+//
+//! 2) A decimation of 1.0 is the full image.  This may or may not be r0 as r0 can be decimated.
+//!
+//***********************************************************************************************
+class OSSIM_DLL ossimImageGeometry : public ossimObject
+{
+public:
+   typedef std::vector<ossim_float64> DeltaParamList;
+   
+   //! Default constructor defaults to unity transform with no projection.
+   ossimImageGeometry();
+   virtual ~ossimImageGeometry();
+   
+   //! Copy constructor -- performs a deep copy. This is needed when an imageSource in the chain
+   //! needs to modify the image geometry at that point in the chain. The image geometry to the 
+   //! left of that imageSource must remain unchanged. This constructor permits that imageSource to 
+   //! maintain its own geometry based on the input geometry. All chained objects to the right
+   //! would see this alternate geometry. See ossimScaleFilter for an example of this case.
+   ossimImageGeometry(const ossimImageGeometry& copy_this);
+
+   //! Constructs with projection and transform objects available for referencing. Either pointer
+   //! can be NULL -- the associated mapping would be identity.
+   ossimImageGeometry(ossim2dTo2dTransform* transform, ossimProjection* projection);
+
+   //! rnToRn is a utility method that takes a rn resolution image point and maps it to the another
+   //! rn resolution image point.
+   //!
+   //! @param inRnPt Is a point in resolution n.
+   //! @param inResolutionLevel Is the resolution of the point inRnPt.
+   //! @param outResolutionLevel Is the resolution of the point outRnPt.
+   //! @param outRnPt Is the result of the transform.
+   //!
+   void rnToRn(const ossimDpt& inRnPt, ossim_uint32 inResolutionLevel,
+               ossim_uint32 outResolutionLevel,ossimDpt& outRnPt) const;
+   
+   //! rnToFull is a utility method that takes a rn resolution image point and maps it to the full
+   //! image point.
+   //!
+   //! @param rnPt Is a point in resolution n.
+   //! @param resolutionLevel Is the resolution of the point rnPt.  a value of 0 is the local image
+   //! @param fullPt Is the result of the transform
+   //!
+   void rnToFull(const ossimDpt& rnPt, ossim_uint32 resolutionLevel, ossimDpt& fullPt) const;
+
+   //! @brief fullToRn is a utility method that takes a full image point and maps it to a rn
+   //! resolution image point.
+   //! 
+   //! @param fullPt Is a point in full image space.
+   //! @param resolutionLevel Is the resolution of the point rnPt. A value of 0 is the local image.
+   //! @param fullPt Is the result of the transform
+   void fullToRn(const ossimDpt& fullPt, ossim_uint32 resolutionLevel, ossimDpt& rnPt) const;
+
+   //! rnToWorld is a utility method that takes a rn resolution image point and maps it to the 
+   //! world point.
+   //!
+   //! @param rnPt Is a point in resolution n.
+   //! @param resolutionLevel Is the resolution of the point rnPt.  a value of 0 is the local image
+   //! @param wpt Is the result of the transform
+   //!
+   void rnToWorld(const ossimDpt& rnPt, ossim_uint32 resolutionLevel, ossimGpt& wpt) const;
+   
+   //! worldToRn is a utility method that takes a world point allows one to transform all the way back to
+   //! an rn point.
+   //!
+   //! @param wpt Ground point.
+   //! @param resolutionLevel Is the resolution of the point rnPt.  a value of 0 is the local image
+   //! @param rnPt Is the resoltion point.
+   //!
+   void worldToRn(const ossimGpt& wpt, ossim_uint32 resolutionLevel, ossimDpt& rnPt) const;
+
+   //! Exposes the 3D projection from image to world coordinates. The caller should verify that
+   //! a valid projection exists before calling this method. Returns TRUE if a valid ground point
+   //! is available in the ground_pt argument. This method depends on the existence of elevation
+   //! information. If no DEM is available, the results will be incorrect or inaccurate.
+   bool localToWorld(const ossimDpt& local_pt, ossimGpt& world_pt) const;
+
+   //! Exposes the 3D projection from image to world coordinates given a constant height above 
+   //! ellipsoid. The caller should verify that a valid projection exists before calling this
+   //! method. Returns TRUE if a valid ground point is available in the ground_pt argument.
+   bool localToWorld(const ossimDpt& local_pt, const double& h_ellipsoid, ossimGpt& world_pt) const;
+
+   //! Exposes the 3D world-to-local image coordinate reverse projection. The caller should verify 
+   //! that a valid projection exists before calling this method. Returns TRUE if a valid image 
+   //! point is available in the local_pt argument.
+   bool worldToLocal(const ossimGpt& world_pt, ossimDpt& local_pt) const;
+
+   //! Sets the transform to be used for local-to-full-image coordinate transformation
+   void setTransform(ossim2dTo2dTransform* transform);
+
+   //! Sets the projection to be used for local-to-world coordinate transformation
+   void setProjection(ossimProjection* projection);
+
+   //! Access methods for transform (may be NULL pointer).
+   const ossim2dTo2dTransform* getTransform() const { return m_transform.get(); }
+   ossim2dTo2dTransform*       getTransform()       { return m_transform.get(); }
+
+   //! Access methods for projection (may be NULL pointer).
+   const ossimProjection* getProjection() const { return m_projection.get(); }
+   ossimProjection*       getProjection()       { return m_projection.get(); }
+
+   /**
+    * @return const ossimMapProjection* or NULL if projection not set or not
+    * derived from ossimMapProjection.
+    */
+   const ossimMapProjection* getAsMapProjection() const
+   { return dynamic_cast<const ossimMapProjection*>( m_projection.get() ); }
+
+   /**
+    * @return ossimMapProjection* or NULL if projection not set or not
+    * derived from ossimMapProjection.
+    */
+   ossimMapProjection*       getAsMapProjection()
+   { return dynamic_cast<ossimMapProjection*>( m_projection.get() ); }
+
+   //! Returns TRUE if valid projection defined
+   bool hasProjection() const { return m_projection.valid(); }
+   
+   //! Returns TRUE if valid transform defined
+   bool hasTransform() const { return m_transform.valid(); }
+
+   //! Returns TRUE if this geometry is sensitive to elevation
+   bool isAffectedByElevation() const;
+
+   //! Returns the GSD associated with this image in the active projection. Note that this only
+   //! makes sense if there is a projection associated with the image. Returns NaNs if no 
+   //! projection defined.
+   ossimDpt getMetersPerPixel() const;
+
+   /**
+    * @brief Get the ground sample distance(GSD) associated with this image
+    * in the active projection.
+    *
+    * GSD is taken from projection if there is no transform set; else,
+    * taken from three localToWorld calls (one pixel apart) at the image
+    * center.  If the projection or the image size(if needed) is not set the
+    * point will be set to NaNs.
+    * 
+    * @param gsd Point to intialize with GSD.
+    * 
+    * @note This only makes sense if there is a projection associated with
+    * the image.
+    *
+    * @note Result should be checked for NaNs after call.
+    */
+   void getMetersPerPixel( ossimDpt& gsd ) const;
+
+   //! Returns the resolution of this image in degrees/pixel. Note that this only
+   //! makes sense if there is a projection associated with the image. Returns NaNs if no 
+   //! projection defined.
+   ossimDpt getDegreesPerPixel() const;
+
+   /**
+    * @brief Get the resolution of this image in degrees/pixel.
+    *
+    * Degrees/pixel is taken from projection if there is no transform set;
+    * else, taken from three localToWorld calls (one pixel apart) at the image
+    * center.  If the projection or the image size(if needed) is not set the
+    * point will be set to NaNs.
+    * 
+    * @param dpp Point to intialize with degrees/pixel.
+    * 
+    * @note This only makes sense if there is a projection associated with
+    * the image.
+    *
+    * @note Result should be checked for NaNs after call.
+    */
+   void getDegreesPerPixel( ossimDpt& dpp ) const;
+
+   //! Assigns the ossimGpts with the ground coordinates of the four corresponding image 
+   //! corner points. Returns true if points are valid.
+   bool getCornerGpts(ossimGpt& ul, ossimGpt& ur, ossimGpt& lr, ossimGpt& ll) const;
+
+   /**
+    * @brief Get the latitude, longitude of the tie point.
+    *
+    * This is the bounding upper left point of the image which is not
+    * necessarily the image (0, 0) point.
+    * 
+    * @param tie ossimGpt to assign.
+    *
+    * @param edge If true the tie point is shifted up and to the right by
+    * half the gsd.
+    *
+    * @note Requires projection and image size to be initialized or the
+    * latitude and longitue will be set to nan.
+    *
+    * @note The height parameter of the ossimGpt is not touched by this method.
+    */
+   void getTiePoint(ossimGpt& tie, bool edge) const;
+
+   /**
+    * @brief Get the easting, northing of the tie point.
+    *
+    * This is the bounding upper left point of the image which is not
+    * necessarily the image (0, 0) point.
+    * 
+    * @param tie ossimDpt to assign.
+    *
+    * @param edge If true the tie point is shifted up and to the right by
+    * half the gsd.
+    * 
+    * @note Requires projection and image size to be initialized or the
+    * easting and northing will be set to nan.
+    */
+   void getTiePoint(ossimDpt& tie, bool edge) const;
+
+   //! Prints contents to output stream.
+   std::ostream& print(std::ostream& out) const;
+
+   //! Returns TRUE if argument geometry has exactly the same instances for transform and 
+   //! m_projection. This should be expanded to permit different instances of same transforms
+   bool operator==(const ossimImageGeometry& compare_this) const;
+
+   //! Replaces any existing transform and projection with those in the copy_this object
+   const ossimImageGeometry& operator=(const ossimImageGeometry& copy_this);
+
+   //! Returns the decimation factor from R0 for the resolution level specified. For r_index=0, the 
+   //! decimation factor is by definition 1.0. For the non-discrete case, r_index=1 returns a 
+   //! decimation of 0.5. If the vector of discrete decimation factors (m_decimationFactors) is 
+   //! empty, the factor will be computed as f=1/2^n
+   ossimDpt decimationFactor(ossim_uint32 r_index) const;
+
+   /**
+    * @brief Method to get the decimation factor for a given resolution
+    * level.
+    *
+    * If the array of decimations is not initialized by owner, the default is:
+    * r_index=0 is by definition 1.0.
+    * r_index=n Where n is some level the factor will be computed as f=1/2^n.
+    *
+    * @param resLevel Reduced resolution set for requested decimation.
+    *
+    * @param result ossimDpt to initialize with requested decimation.
+    */
+   void decimationFactor(ossim_uint32 r_index, ossimDpt& result) const;
+
+   /**
+    * @brief Gets array of all decimation levels.
+    * @param decimations Array to initialiaze.
+    */
+   void decimationFactors(std::vector<ossimDpt>& decimations) const;
+
+   //! Sets the decimation scheme to a discrete list of decimation factors.
+   void setDiscreteDecimation(const std::vector<ossimDpt>& decimation_list) 
+      { m_decimationFactors = decimation_list; }
+
+   //! @return The number of decimation factors
+   ossim_uint32 getNumberOfDecimations()const
+   {
+      return (ossim_uint32)m_decimationFactors.size();
+   }
+   void setImageSize(const ossimIpt& size)
+   {
+      m_imageSize = size;
+   }
+   const ossimIpt& getImageSize()const
+   {
+      return m_imageSize;
+   }
+
+   bool getCrossesDateline()const;
+   
+   /**
+   * This is the first stage implementation.   It will determine if it crosses the dateline
+   * and do a special multi polygon for the ossimPolyArea2d result.  For each edge
+   * of the image we walk "partitions" number of points.   If we cross a dateline we calculate
+   * the crossing lat by using the parametric form of the equation.   For example, if we
+   * are crossing from positive to negative that means we are going through the 180 degree lon
+   * location and we will need to solve for the paramtetric parameter t and plug back into the parametric
+   * equation to solve for the latitude.  Basic form:  start + (end-start)*t = 180.  If we are coming from
+   * negative to positive then we solve basic form: start + (end-start)*t = -180.  Where deltaPoint is (end-start) 
+   *
+   *                   ossim_float64 t = ((180-start.x)/deltaPoint.x);
+   *                   ossim_float64 lat = (start.y+deltaPoint.y*t);
+   *
+   * If we do not cross the dateline then if the image is affected by elevation (i.e. a sensor model) then we use the partitions
+   * paraemter to calculate that number of partitions to sample along each edge.
+   *
+   * if The geometry is not affected by elevation then we just use the corner points and ignore the partitions parameter
+   *
+   * @param poly holds the resulting polygon.  This could be a MultiPolygon depending on the geometry
+   * @param partitions These are the number of steps you want when walking the border.
+   */
+   void calculatePolyBounds(ossimPolyArea2d& result, ossim_int32 partitions = 25)const;
+
+   /**
+    * @brief Get the bounding rect of (0, 0) to (imageSize.x-1, imageSize.y-1).
+    *
+    * Relies on image size being initialized.
+    *
+    * @param bounding_rect Initialized by this method.  Will do a
+    * ossimIrect::makeNan() if the image size is not initialized.
+    */
+   void getBoundingRect(ossimIrect& bounding_rect) const;
+   void getBoundingRect(ossimDrect& bounding_rect) const; // Overloaded for drect.
+   
+   void getBoundingGroundRect(ossimGrect& bounding_grect) const;
+
+   //! Creates a new instance of ossimImageGeometry with the same transform and projection.
+   //! Overrides base-class version requiring loadState() and saveState() (not implemented yet)
+   virtual ossimObject* dup() const { return new ossimImageGeometry(*this); }
+
+   //! Attempts to initialize a transform and a projection given the KWL. Returns TRUE if no
+   //! error encountered.
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+
+   //! Saves the transform (if any) and projection (if any) states to the KWL.
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0) const;
+
+   /**
+    * @brief Set m_targetRrds data member.
+    *
+    * This is used by methods worldToRn and localToWorld that do not take a rrds
+    * argument and methods rnToWorld and worldToRn.  If the target rrds is set to 2,
+    * then the resulting point from worldToLocal is relative to reduced
+    * resolution level 2.  Vice versa for localToWorld it is assumed the local
+    * point is relative to the target
+    * reduced resolution data set.
+    *
+    * @param rrds Target (zero based) reduced resolution data set.
+    */
+   void setTargetRrds(ossim_uint32 rrds);
+
+   /**
+    * @return The target zero based reduced resolution data set used for localToWorld and
+    * worldToLocal.
+    * @see setTargetRrds 
+    */
+   ossim_uint32 getTargetRrds() const;
+
+   //! @brief  Changes the GSD and image size to reflect the scale provided.
+   //! @param scale  The scale to be applied in x and y directions
+   //! @param recenterTiePoint If true the will adjust the tie point by shifting the original tie 
+   //! to the upper left corner, applying scale, then shifting back by half of either the new
+   //! theDeltaLat/lon or theMetersPerPixel depending on if underlying projection isGeographic.
+   void applyScale(const ossimDpt& scale, bool recenterTiePoint);
+
+   virtual bool isEqualTo(const ossimObject& obj, ossimCompareType compareType = OSSIM_COMPARE_FULL)const;
+
+
+
+   // If we have an adjustable parameter interface return one.
+   //
+   // @return a pointer to an ossimAdjustableParameterInterface or NULL if no
+   //         adjustable paramters exist
+   //
+   virtual ossimAdjustableParameterInterface* getAdjustableParameterInterface();
+   virtual const ossimAdjustableParameterInterface* getAdjustableParameterInterface()const;
+   
+   
+   // Compute partials from image to ground with respect to the adjustable parameters.
+   //
+   //
+   bool computeImageToGroundPartialsWRTAdjParam(ossimDpt& result,
+                                                          const ossimGpt& gpt,
+                                                          ossim_uint32 idx,
+                                                          ossim_float64 paramDelta=1.0);
+   bool computeImageToGroundPartialsWRTAdjParams(NEWMAT::Matrix& result,
+                                                           const ossimGpt& gpt,
+                                                           ossim_float64 paramDelta=1.0);
+   bool computeImageToGroundPartialsWRTAdjParams(NEWMAT::Matrix& result,
+                                                           const ossimGpt& gpt,
+                                                           const DeltaParamList& deltas);
+   
+   bool computeGroundToImagePartials(NEWMAT::Matrix& result,
+                                     const ossimGpt& gpt,
+                                     const ossimDpt3d& deltaLlh);
+   
+   bool computeGroundToImagePartials(NEWMAT::Matrix& result,
+                                     const ossimGpt& gpt);
+
+   /**
+    * @return Returns the angle to "up is up" in decimal degrees, 0.0 if image
+    * is not affected by elevation, ossim::nan on error.
+    */
+   ossim_float64 upIsUpAngle() const;
+
+   /**
+    * @return Returns the angle to "north up" in decimal degrees, ossim::nan
+    * on error.
+    */
+   ossim_float64 northUpAngle() const;
+   
+protected:
+   //! @brief Method to back out decimation of a point.
+   //! @param rnPt Is a point in resolution n.
+   //! @param resolutionLevel Is the resolution of the point rnPt.
+   //! @param outPt Is the result of the transform a non-decimated point.
+   void undecimatePoint(const ossimDpt& rnPt,
+                        ossim_uint32 resolutionLevel,
+                        ossimDpt& outPt) const;
+
+   //! @brief Method to apply decimation of a point.
+   //! @param inPt Is a point with no decimation.
+   //! @param resolutionLevel Is the resolution of the point rnPt.
+   //! @param rnPt Is the result of the transform
+   void decimatePoint(const ossimDpt& inPt,
+                      ossim_uint32 resolutionLevel,
+                      ossimDpt& rnPt) const;
+
+   ossimRefPtr<ossim2dTo2dTransform> m_transform;   //!< Maintains local_image-to-full_image transformation 
+   ossimRefPtr<ossimProjection>      m_projection;  //!< Maintains full_image-to-world_space transformation
+   std::vector<ossimDpt>             m_decimationFactors; //!< List of decimation factors for R-levels
+   ossimIpt                          m_imageSize; // Image width and height
+
+   /** @brief Target rrds for localToWorld and worldToLocal methods. */
+   ossim_uint32                      m_targetRrds; 
+
+   TYPE_DATA
+};
+
+#endif /* #ifndef ossimImageGeometry_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimImageGeometryFactory.h b/ossim/include/ossim/imaging/ossimImageGeometryFactory.h
new file mode 100644
index 0000000..6ce7aa6
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageGeometryFactory.h
@@ -0,0 +1,54 @@
+//*****************************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: Class declaration of ossimImageGeometryFactory.
+//
+//*****************************************************************************
+// $Id$
+#ifndef ossimImageGeometryFactory_HEADER
+#define ossimImageGeometryFactory_HEADER 1
+
+#include <ossim/imaging/ossimImageGeometryFactoryBase.h>
+
+class ossim2dTo2dTransform;
+class ossimNitfTileSource;
+class ossimProjection;
+
+class OSSIM_DLL ossimImageGeometryFactory : public ossimImageGeometryFactoryBase
+{
+public:
+   static ossimImageGeometryFactory* instance();
+   virtual ossimImageGeometry* createGeometry(const ossimString& typeName)const;
+   virtual ossimImageGeometry* createGeometry(const ossimKeywordlist& kwl,
+                                              const char* prefix=0)const;
+   virtual ossimImageGeometry* createGeometry(const ossimFilename& filename,
+                                              ossim_uint32 entryIdx)const;
+   virtual bool extendGeometry(ossimImageHandler* handler)const;
+   
+   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
+   
+   /**
+    * This is a utility method used by crateGeoemtry that takes an image handler
+    */
+   virtual ossim2dTo2dTransform* createTransform(ossimImageHandler* handler)const;
+
+   /**
+    * @brief Utility method to create a projection from an image handler.
+    * @param handler The image handler to create projection from.
+    * @return Pointer to an ossimProjection on success, null on error.
+    */
+   virtual ossimProjection* createProjection(ossimImageHandler* handler) const;
+   
+protected:
+   ossimImageGeometryFactory();
+
+   virtual ossim2dTo2dTransform* createTransformFromNitf(ossimNitfTileSource* handler)const;
+   
+   static ossimImageGeometryFactory* m_instance;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimImageGeometryFactoryBase.h b/ossim/include/ossim/imaging/ossimImageGeometryFactoryBase.h
new file mode 100644
index 0000000..46feea2
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageGeometryFactoryBase.h
@@ -0,0 +1,45 @@
+//**************************************************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: Class declaration of ossimImageGeometryFactoryBase. See .h file for class documentation.
+//
+//**************************************************************************************************
+// $Id$
+#ifndef ossimImageGeometryFactoryBase_HEADER
+#define ossimImageGeometryFactoryBase_HEADER
+#include <ossim/base/ossimBaseObjectFactory.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+
+class ossimImageHandler;
+class OSSIM_DLL ossimImageGeometryFactoryBase : public ossimBaseObjectFactory
+{
+public: 
+   /**
+    * Creates an object given a type name.
+    */
+   virtual ossimObject* createObject(const ossimString& typeName)const
+   {
+      return createGeometry(typeName);
+   }
+   
+   /**
+    * Creates and object given a keyword list.
+    */
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
+                                     const char* prefix=0)const
+   {
+      return createGeometry(kwl, prefix);
+   }
+   
+   virtual ossimImageGeometry* createGeometry(const ossimString& typeName)const=0;
+   virtual ossimImageGeometry* createGeometry(const ossimKeywordlist& kwl,
+                                              const char* prefix=0)const=0;
+   virtual ossimImageGeometry* createGeometry(const ossimFilename& filename,
+                                              ossim_uint32 entryIdx)const = 0;
+   virtual bool extendGeometry(ossimImageHandler* handler)const=0;
+};
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimImageGeometryRegistry.h b/ossim/include/ossim/imaging/ossimImageGeometryRegistry.h
new file mode 100644
index 0000000..cb28e3b
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageGeometryRegistry.h
@@ -0,0 +1,75 @@
+//**************************************************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: Class declaration of ossimImageGeometryRegistry. See .h file for class documentation.
+//
+//**************************************************************************************************
+// $Id$
+#ifndef ossimImageGeometryRegistry_HEADER
+#define ossimImageGeometryRegistry_HEADER
+#include <ossim/base/ossimConstants.h>
+#include <ossim/imaging/ossimImageGeometryFactoryBase.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/base/ossimFactoryListInterface.h>
+class OSSIM_DLL ossimImageGeometryRegistry : public ossimImageGeometryFactoryBase,
+                                             public ossimFactoryListInterface<ossimImageGeometryFactoryBase,
+                                                                              ossimImageGeometry>
+{
+public:
+   virtual ~ossimImageGeometryRegistry(){m_instance=0;}
+   static ossimImageGeometryRegistry* instance();
+   
+   
+   virtual ossimImageGeometry* createGeometry(const ossimString& typeName)const;
+   virtual ossimImageGeometry* createGeometry(const ossimKeywordlist& kwl,
+                                              const char* prefix=0)const;
+   virtual ossimImageGeometry* createGeometry(const ossimFilename& filename,
+                                              ossim_uint32 entryIdx)const;
+#if 0
+   /*!
+    * Creates an object given a type name.
+    */
+   virtual ossimObject* createObject(const ossimString& typeName)const
+   {
+      return createObjectFromRegistry(typeName);
+   }
+   
+   /*!
+    * Creates and object given a keyword list.
+    */
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
+                                     const char* prefix=0)const
+   {
+      return createObjectFromRegistry(kwl, prefix);
+   }
+#endif
+   virtual bool extendGeometry(ossimImageHandler* handler)const;
+   
+   /*!
+    * This should return the type name of all objects in all factories.
+    * This is the name used to construct the objects dynamially and this
+    * name must be unique.
+    */
+   virtual void getTypeNameList(std::vector<ossimString>& typeList)const
+   {
+      getAllTypeNamesFromRegistry(typeList);
+   }
+   
+protected:
+   ossimImageGeometryRegistry()
+   :ossimImageGeometryFactoryBase()
+   {}
+   
+   ossimImageGeometryRegistry( const ossimImageGeometryRegistry& rhs )
+   :ossimImageGeometryFactoryBase(rhs)
+   {}
+   void operator =(const ossimImageGeometryRegistry&){}
+   static ossimImageGeometryRegistry* m_instance;
+   
+   TYPE_DATA
+};
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimImageHandler.h b/ossim/include/ossim/imaging/ossimImageHandler.h
new file mode 100644
index 0000000..bf5437d
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageHandler.h
@@ -0,0 +1,788 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description:
+//
+// This class defines an abstract image handler which all loaders should
+// derive from.
+//
+//********************************************************************
+// $Id: ossimImageHandler.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimImageHandler_HEADER
+#define ossimImageHandler_HEADER 1
+
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimNBandLutDataObject.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/imaging/ossimFilterResampler.h>
+#include <ossim/imaging/ossimImageMetaData.h>
+
+/**
+ *  This class defines an abstract Handler which all image handlers(loaders)
+ *  should derive from.
+ */
+class OSSIMDLLEXPORT ossimImageHandler : public ossimImageSource
+{
+public:
+
+   enum ossimImageHandlerOverviewCompressionType
+   {
+      OSSIM_OVERVIEW_COMPRESSION_NONE= 0,
+      OSSIM_OVERVIEW_COMPRESSION_JPEG,
+      OSSIM_OVERVIEW_COMPRESSION_LZW,
+      OSSIM_OVERVIEW_COMPRESSION_DEFLATE,
+      OSSIM_OVERVIEW_COMPRESSION_PACKBITS
+   };
+
+   /** Constructor (default): */
+   ossimImageHandler();
+   
+   /**
+    * Destructor:
+    * Derived classes should implement.
+    */
+   virtual ~ossimImageHandler();
+   
+   /**
+    * initialize
+    * Does nothing in this class.  Implemented to satisfy pure virtual.
+    */
+   virtual void initialize();
+   
+   /**
+    *  Searches for an overview.  Uses theImageFile as a key.
+    *  If theImageFile = "foo.tif" it will look for "foo.ovr" first,
+    *  then "foo_ovr.tif" next.
+    *  Calls openOverview(const ossimFilename& overview_file)
+    *  @return true on success, false on error.
+    *  @see openOverview(const ossimFilename& overview_file)
+    */
+   virtual bool openOverview();
+
+   /**
+    *  Calls closeOverview(), then attempts to open the overview_file.
+    *  On success, theOverviewFile will be set and theOverview will be
+    *  initialized.  On failure, theOverviewFile will be cleared and
+    *  theOverview deleted and set to NULL.
+    *  @param overview_file ossimFilename representing overview file.
+    *  @return true on success, false on error.
+    *  @see closeOverview()
+    */
+   virtual bool openOverview(const ossimFilename& overview_file);
+
+   /**
+    *  If theOverview is initialized it will be deleted and set to NULL. Also
+    *  clears theOverviewFile.
+    *  @return void
+    */
+   virtual void closeOverview();
+   
+   /**
+    *  @return the image handler of the overview, if it has been
+    *  successfully opened.
+    */
+   virtual const ossimImageHandler* getOverview() const;
+
+   /**
+    *  @return true if getNumberOfReducedResSets > 1, false if not.
+    *  @see getNumberOfReducedResSets()
+    */
+   virtual bool hasOverviews() const;
+
+   /**
+    *  @return ossimFilename represents an external OSSIM overview filename.
+    */
+   virtual ossimFilename createDefaultOverviewFilename() const;
+   
+   /**
+    *  @return ossimFilename represents an external OSSIM geometry filename.
+    */
+   virtual ossimFilename createDefaultGeometryFilename() const;
+
+   /**
+    *  @return ossimFilename represents an external OSSIM metadata filename.
+    */
+   virtual ossimFilename createDefaultMetadataFilename() const;
+
+   /**
+    *  @return ossimFilename represents an external OSSIM histogram filename.
+    */
+   virtual ossimFilename createDefaultHistogramFilename() const;
+
+   /**
+    *  @return ossimFilename represents an external OSSIM valid vertices filename.
+    */
+   virtual ossimFilename createDefaultValidVerticesFilename() const;
+   
+   /**
+    *  Outputs vertices to file and updates the internal vertex
+    *  array variable "theValidImageVertices".
+    *  @param vertices Array of ossimIpts to write.
+    *  @param file Name of output file to write to.  If file is empty, the
+    *  output file will be the image file with no extension + _vertices.kwl.
+    *  So if the image is "foo.tif" you'll get "foo_vertices.kwl".
+    *  @return true on success, false on error.
+    */
+   virtual bool writeValidImageVertices(const std::vector<ossimIpt>& vertices, 
+					const ossimFilename& file=ossimFilename(""));
+
+   /**
+    *  Opens the valid image vertices file and sets theValidImageVerticesFile
+    *  variable.
+    *  @param vertices_file File name containing valid vertices for image.
+    *  @return true on success, false on error.
+    */
+   virtual bool openValidVertices(const ossimFilename& vertices_file);
+
+   /**
+    *  Creates vertices file name based on image, then tries to open.
+    *  If theImageFile = "foo.tif" it will look for "foo_vertices.kwl".
+    *  @return true on success, false on error.
+    */
+   virtual bool openValidVertices();
+
+   /**
+    *  Pure virtual open.  Derived classes must implement.
+    *  
+    *  @return Returns true on success, false on error.
+    *
+    *  @note This method relies on the data member ossimImageData::theImageFile
+    *  being set.  Callers should do a "setFilename" prior to calling this
+    *  method or use the ossimImageHandler::open that takes a file name and an
+    *  entry index.
+    */
+   virtual bool open() = 0;
+
+   /**
+    *  Opens the image file.
+    *  
+    *  @param imageFile File to open.
+    *
+    *  @param entryIndex
+    *  @return true on success, false on error.
+    */
+   virtual bool open(const ossimFilename& imageFile,
+                     ossim_uint32 entryIndex);
+
+   virtual bool open(const ossimFilename& imageFile);
+
+   /**
+    *  Deletes the overview and clears the valid image vertices.  Derived
+    *  classes should implement.
+    */
+   virtual void close();
+
+   /**
+    *  Derived classes must implement this method to be concrete.
+    *
+    *  @return true if open, false if not.
+    */
+   virtual bool isOpen()const=0;
+
+   /**
+    *  Build a histogram for image file.
+    *
+    *  @param numberOfRLevels sets the maximum number of reduced resolution
+    *  level to compute histogram for.
+    *
+    *  @return true on success, false if not open.
+    */
+   virtual bool buildHistogram(int numberOfRLevels=0);
+   
+   
+   /**
+    *  Build a histograms for all image entries.
+    *
+    *  @param numberOfRLevels sets the maximum number of reduced resolution
+    *  level to compute histogram for.
+    *
+    *  @return true on success, false if not open.
+    */
+   virtual bool buildAllHistograms(int numberOfRLevels=0);
+   
+   /**
+    *  Will build over file for theImageFile.
+    *
+    *  @param includeFullResFlag if true the full resolution layer will also
+    *  be put in the overview format.  This is handly for inefficeint formats.
+    */
+   virtual bool buildOverview(ossimImageHandlerOverviewCompressionType compressionType = OSSIM_OVERVIEW_COMPRESSION_NONE,
+                              ossim_uint32 quality = 75,
+                              ossimFilterResampler::ossimFilterResamplerType resampleType = ossimFilterResampler::ossimFilterResampler_BOX,
+                              bool includeFullResFlag=false);
+
+   /**
+    *  Will build over file for all image entries.
+    *
+    *  @param includeFullResFlag if true the full resolution layer will also
+    *  be put in the overview format.  This is handly for inefficeint formats.
+    */
+   virtual bool buildAllOverviews(ossimImageHandlerOverviewCompressionType compressionType = OSSIM_OVERVIEW_COMPRESSION_NONE,
+                                  ossim_uint32 quality = 75,
+                                  ossimFilterResampler::ossimFilterResamplerType resampleType = ossimFilterResampler::ossimFilterResampler_BOX,
+                                  bool includeFullResFlag=false);
+   
+   /**
+    *  Will build an over file for filename.
+    *  @param filename Name of image file.
+    *
+    *  @param includeFullResFlag if true the full resolution layer will also
+    *  be put in the overview format.  This is handly for inefficeint formats.
+    */
+   virtual bool buildOverview(const ossimFilename& filename,
+                              ossimImageHandlerOverviewCompressionType compressionType = OSSIM_OVERVIEW_COMPRESSION_NONE,
+                              ossim_uint32 quality = 75,
+                              ossimFilterResampler::ossimFilterResamplerType resampleType = ossimFilterResampler::ossimFilterResampler_BOX,
+                              bool includeFullResFlag=false);
+   
+   /**
+    * Returns the image geometry object associated with this tile source or
+    * NULL if non defined.  The geometry contains full-to-local image
+    * transform as well as projection (image-to-world).
+    */
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+   
+   /**
+    * Sets the image geometry object.
+    *
+    * @note Callers should note that this will override any existing
+    *       geometry.
+    *
+    * @note This does not write the geometry to disk, to do so call
+    *       one of the saveImageGeometry methods. 
+    */
+   virtual void setImageGeometry(ossimImageGeometry* geom);
+
+   /**
+    * Saves the image geometry to a file that will be made based on the image
+    * file name.
+    */
+   virtual void saveImageGeometry() const;
+   
+   /**
+    * Saves the image geometry to a file that will be made based on the image
+    * file name.
+    */
+   virtual void saveImageGeometry(const ossimFilename& geometry_file) const;   
+   
+   /**
+    *  Pure virtual, derived classes must implement.
+    *
+    *  @param resLevel Reduced resolution level to return lines of.
+    *  Default = 0
+    *
+    *  @return The number of lines for specified reduced resolution level.
+    */
+   virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel = 0) const = 0;
+
+   /**
+    *  Pure virtual, derived classes must implement.
+    *
+    *  @param resLevel Reduced resolution level to return samples of.
+    *  Default = 0
+    *
+    *  @return The number of samples for specified reduced resolution level.
+    */
+   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel = 0) const = 0;
+   
+   /**
+    * @brief Returns zero-based bounding rectangle of the image.
+    * Note sub-image offset now in ossimImageGeometry class.
+    * 
+    * @param resLevel Reduced resolution level for rectangle.
+    *
+    * @return Rectangle of reduced resolution level.
+    */
+   virtual ossimIrect getImageRectangle(ossim_uint32 resLevel = 0) const; 
+
+   /**
+    * @brief Returns zero-based bounding rectangle of the image.
+    * Same as getImageRectangle() call.  Note sub-image offset now
+    * in ossimImageGeometry class.
+    * 
+    * @param resLevel Reduced resolution level for rectangle.
+    *
+    * @return Rectangle of reduced resolution level.
+    */
+   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel = 0) const;
+
+   /**
+    * @param resLevel Reduced resolution set for requested decimation.
+    *
+    * @param result ossimDpt to initialize with requested decimation.
+    * 
+    * @note Initialized "result" with the decimation factor for the passed in
+    * resLevel.
+    * Most of the time the returned factor is a square decimation along x
+    * and y indicated by result.x and .y  = 1.0/(resLevel^2) where ^
+    * means rasing to the power of.  If the resLevel is 1 then the return
+    * decimation .5, .5. this is not the decimation to each resolution
+    * level but the total decimation from res level 0.
+    * So if resLevel is 2 then the return is .25, .25.
+    *
+    * @note Derived classes should override if the decimation is anything other
+    * than a power of two change in each direction per res level.
+    */
+   virtual void getDecimationFactor(ossim_uint32 resLevel, ossimDpt& result) const;
+
+   /**
+    * This returns all decimation for all levels.
+    */
+   virtual void getDecimationFactors(vector<ossimDpt>& decimations) const;
+
+   /**
+    * This returns the total number of decimation levels.  It is important to
+    * note that res level 0 or full resolution is included in the list and has
+    * decimation values 1.0, 1.0
+    */
+   virtual ossim_uint32 getNumberOfDecimationLevels() const;
+
+   /**
+    * This method is obsolete.  Please use getNumberOfDecimationLevels.
+    *
+    * For backwards compatibility this calls getNumberOfDecimationLevels.
+    */
+   virtual ossim_uint32 getNumberOfReducedResSets()const;
+   
+   /**
+    * Sets the filename
+    */
+   virtual void setFilename(const ossimFilename& filename);
+
+   /**
+    * Returns the filename
+    */
+   virtual const ossimFilename& getFilename()const;
+   
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   /**
+    * @brief Determines if the passed in reslution level is valid.
+    *
+    * If this reader is used as an overview the caller should pass in a
+    * resLevel relative to the full image.
+    * 
+    * @param resLevel zero base resolution level.
+    * @return true on success, false on error.
+    */
+   virtual bool isValidRLevel(ossim_uint32 resLevel) const;
+
+   /**
+    * Connection rule.  Since image handler currently don't have any
+    * inputs this will just return false saying we can't connect anything
+    * to an image handler.
+    */
+   bool canConnectMyInputTo(ossim_int32 inputIndex,
+                            const ossimConnectableObject* object) const;
+      
+   /**
+    * ordering specifies how the vertices should be arranged.
+    * valid image vertices is basically the tightly fit convex hull
+    * of the image.  Usually an image has NULL values and are
+    * internally not upright rectangular.  This can cause
+    * problems some spatial filters.
+    *
+    * The default implementation is to return the bounding rect.
+    */
+   virtual void getValidImageVertices(vector<ossimIpt>& validVertices,
+                                      ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER,
+                                      ossim_uint32 resLevel=0)const;
+
+   /**
+    * @brief Indicates whether or not the image handler can control output
+    * band selection via the setOutputBandList method.
+    * @return true if band selector; false, if not.
+    */
+   virtual bool isBandSelector() const;
+
+   /**
+    * @brief If the image handler "isBandSeletor()" then the band selection
+    * of the output chip can be controlled.
+    *
+    * This method returns false. Derived classes that are band selectors should
+    * override.
+    *
+    * @param band_list Requested bands.
+    * 
+    * @return true on success, false on error.
+    */
+   virtual bool setOutputBandList(const std::vector<ossim_uint32>& band_list);
+ 
+   /**
+    * @brief If the image handler "isBandSeletor()" then the band selection
+    * of the output are set to input or identity.  Does nothing and returns
+    * false if not a band selector.
+    * 
+    * @return If band selector, returns the output of setOutputBandList; if
+    * not, returns false.
+    */
+   virtual bool setOutputToInputBandList();
+ 
+   /**
+    * @brief Convenience method to see if band list is identity.
+    * @param bandList List to check.
+    * @return true if band selector; false, if not.
+    */
+   virtual bool isIdentityBandList( const std::vector<ossim_uint32>& bandList ) const;
+   
+   /**
+    * Indicates whether or not the image is tiled internally.
+    * This implementation returns true if (getImageTileWidth() &&
+    * getImageTileHeight()) are both non zero.
+    * Override in the image handler if something else is desired.
+    * Returns true if tiled, false if not.
+    */
+   virtual bool isImageTiled() const;
+
+   /**
+    * Returns the tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileWidth which
+    * returns the output tile width which can be different than the internal
+    * image tile width on disk.
+    */
+   virtual ossim_uint32 getImageTileWidth() const = 0;
+
+   /**
+    * Returns the tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileWidth which
+    * returns the output tile width which can be different than the internal
+    * image tile width on disk.
+    */
+   virtual ossim_uint32 getImageTileHeight() const = 0;
+
+   virtual bool hasMetaData() const;
+
+   virtual ossimRefPtr<ossimNBandLutDataObject> getLut()const;
+
+   virtual bool hasLut() const;
+   
+   /**
+    * There is an external file with an omd extension.  this file contains
+    * additional information about the image such as the null pixel, min and
+    * max values.
+    * For general raster it will contain much more than that.
+    */
+   virtual void loadMetaData();
+
+   /**
+    * Retuns the min pixel value.  If there was an external eta data file
+    * then use the meta data from that file.  If not given then we will
+    * return the default min
+    */
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+   virtual double getNullPixelValue(ossim_uint32 band=0)const;
+
+   /**
+    * @brief convenience method to set min pixel value.
+    *
+    * Added for overview readers so that the image handler that owns the
+    * overview reader can pass on it's min value.
+    *
+    * @param band Zero based band to set.
+    *
+    * @param pix Min pixel value.
+    */
+   virtual void setMinPixelValue(ossim_uint32 band, const ossim_float64& pix);
+
+   /**
+    * @brief convenience method to set max pixel value.
+    *
+    * Added for overview readers so that the image handler that owns the
+    * overview reader can pass on it's max value.
+    *
+    * @param band Zero based band to set.
+    *
+    * @param pix Max pixel value.
+    */
+   virtual void setMaxPixelValue(ossim_uint32 band, const ossim_float64& pix);
+
+   /**
+    * @brief convenience method to set null pixel value.
+    *
+    * Added for overview readers so that the image handler that owns the
+    * overview reader can pass on it's max value.
+    *
+    * @param band Zero based band to set.
+    *
+    * @param pix Null pixel value.
+    */
+   virtual void setNullPixelValue(ossim_uint32 band, const ossim_float64& pix);
+    
+   /**
+    * @return The current entry number.
+    *
+    * @note This implementation returns 0.  Derived classes should override
+    * if of multiple entry image type.
+    */
+   virtual ossim_uint32 getCurrentEntry()const;
+   
+   /**
+    * @return The number of entries (images) in the image file.
+    */
+   virtual ossim_uint32 getNumberOfEntries()const;
+
+   /**
+    * @brief Get the name of entry as a string.
+    *
+    * This implementation clears name. Derived classes that support multiple
+    * entries and have "named" entries should re-implement to provide entry
+    * names.  Example given from HDF5 file:
+    * 
+    * entry_name: /All_Data/VIIRS-IMG-GTM-EDR-GEO_All/QF1_VIIRSGTMGEO
+    *
+    * @param entryIdx Zero based entry index. If out of range name will
+    * be cleared.
+    * 
+    * @param name Initialized by this.
+    */
+   virtual void getEntryName( ossim_uint32 entryIdx,
+                              std::string& name ) const;
+   
+   /**
+    * @param entryList This is the list to initialize with entry indexes.
+    *
+    * @note This implementation returns puts one entry "0" in the list.
+    */
+   virtual void getEntryList(std::vector<ossim_uint32>& entryList) const;
+   
+   /**
+    * @param getEntryNames List to initialize with strings associated with
+    * entries.
+    *
+    * @note This implementation calls getEntryList and converts entries in
+    * the list to strings.  Derived classes that support multiple entries
+    * with associated strings should re-implement.
+    */
+   virtual void getEntryNames(std::vector<ossimString>& entryNames) const;
+
+   /**
+    * @brief Convenience method to determine if entry index should be used for
+    * support files, e.g. file.his or file_e1.his.
+    * 
+    * @returns true if file is open, &&
+    * ( (entryList.size() > 1) || (entryList[0] != 0) )
+    * false otherwise.
+    *
+    * @note This is just a hint.  Put here as code was duplicated everywhere.
+    * Callers can do what they wish.
+    */
+   bool useEntryIndex() const;
+   
+   ossimFilename getOverviewFile()const;
+
+   /**
+    * @param entryIdx Entry number to select.
+    *
+    * @note The implementation does nothing.  Derived classes that handle
+    * multiple images should override.
+    *
+    * @return true if it was able to set the current entry and false otherwise.
+    */
+   virtual bool setCurrentEntry(ossim_uint32 entryIdx);
+   
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   
+   /**
+    * Returns the image file with extension set.
+    *
+    * Examples:
+    * 
+    * - theImageFile          = "foo.hdf"
+    * - The number of entries = 1
+    * - ext parameter         = "geom"
+    * - return of method will = "foo.geom"
+    *
+    * - theImageFile          = "foo.hdf"
+    * - The number of entries = 12
+    * - The current entry     = 3
+    * - ext parameter         = "geom"
+    * - return of method will = "foo_e3.geom"
+    *
+    * @param ext Extension to tack onto file.  Can have or have not ".", it
+    * will be added if "." is not the first character.
+    *
+    * @param set_e0_prefix If true and the number of entries = 1 then
+    * "foo.geom" would come out "foo_e0.geom" instead. Default = false.
+    * 
+    * @return theImageFile with sent extension.
+    */
+   ossimFilename getFilenameWithThisExtension(const ossimString& ext,
+                                              bool set_e0_prefix=false) const;
+   
+   ossim_uint32 getStartingResLevel() const;
+   
+   void setStartingResLevel(ossim_uint32 level);
+   
+   /** @return theOpenOverviewFlag */
+   bool getOpenOverviewFlag() const;
+   
+   /**
+    * @brief Sets theOpenOverviewFlag.
+    *
+    * If true opening of overviews will be attempted on normal open.  If
+    * false only the base image will be opened (shallow open).
+    * Defaulted to true in constructor.
+    */
+   void setOpenOverviewFlag(bool flag);
+   
+   /**
+    * Sets the supplementary directory
+    */
+   virtual void setSupplementaryDirectory(const ossimFilename& dir);
+   
+   /**
+    * Returns the supplementary directory
+    */
+   virtual const ossimFilename& getSupplementaryDirectory()const;
+   
+   //! Fetches the image ID. This is initialized to -1 in the constructor but is searched for in 
+   //! loadState():
+   const ossimString& getImageID() const { return theImageID; }
+   
+   //! Sets the image ID in case it is externally generated
+   void setImageID(const ossimString&  id) { theImageID = id; }
+
+   //! Returns the raster pixel alignment type. OSSIM treats all alignments internally as
+   //! pixel-is-point. This is only a flag to identify the source's alignment type.
+   ossimPixelType getPixelType() const { return thePixelType; }
+   
+   /**
+    * @brief Convenience method to get the zero based rgb output band list.
+    *
+    * This method returns false and is here only so derived classes can
+    * override.
+    * 
+    * @param bandList
+    * @return false
+    */
+   virtual bool getRgbBandList(std::vector<ossim_uint32>& bandList) const;
+
+protected:
+   
+   /**
+    * Returns the image geometry object associated with this tile source or
+    * NULL if non defined.  The geometry contains full-to-local image
+    * transform as well as projection (image-to-world).
+    *
+    * This method just looks for external .geom style override only.
+    * If you want to go through a registry then call getImageGeometry().
+    */
+   virtual ossimRefPtr<ossimImageGeometry> getExternalImageGeometry() const;
+   
+   virtual ossimRefPtr<ossimImageGeometry> getInternalImageGeometry() const;
+   
+   /**
+    * @brief Method to get an overview tile.  Derived classes should override if
+    * they have built in overviews or something different than the standard
+    * external overview file.  Image handlers can call this method from getTile
+    * in place of inlining code or if derived class needs to override this
+    * method.
+    *
+    * @param resLevel The resolution level to pull from with resLevel 0 being
+    * full res.
+    * 
+    * @param result The tile to stuff. 
+    * passing. 
+    *
+    * @return true on success false on error.  Typically this will return false
+    * if resLevel==0 unless the overview has r0.  If return is false, result
+    * is undefined so caller should handle appropriately with makeBlank or
+    * whatever.
+    */
+   virtual bool getOverviewTile(ossim_uint32 resLevel, ossimImageData* result);  
+   
+   /**
+    *  Opens file and attempts to initialize the valid image vertices.
+    *  Returns true on success, false on error.
+    */
+   bool initVertices(const char* file);
+   
+   /**
+    * Will complete the opening process.  
+    * If there are overviews it will open them. 
+    * If there is meta data it will open that and if there
+    * is valid vertices it will open that.
+    */
+   virtual void completeOpen();
+   
+   /**
+    * @brief Convenience method to set things needed in the image geometry from
+    * the image handler.  At time of writing sets the decimation and image size.
+    * @param geom ossimImageGeometry to initiale.
+    */
+   void initImageParameters(ossimImageGeometry* geom) const;
+   
+   /**
+    * @brief Virtual method determines the decimation factors at each resolution level. This
+    * base class implementation computes the decimation by considering the ratios in image size
+    * between resolution levels, with fuzzy logic for rounding ratios to the nearest power of 2
+    * if possible. Derived classes need to override this method if the decimations are provided
+    * as part of the image metadata.
+    */
+   virtual void establishDecimationFactors();
+
+   /**
+    * @brief Convenience method to set output band list.
+    *
+    * This performs range checking and calls theOverview->setOutputBandList
+    * on success.
+    * 
+    * @param inBandList The new band list.
+    * @param outBandList Band list to initialize.
+    * @return true on success, false on error.
+    */
+   virtual bool setOutputBandList(const std::vector<ossim_uint32>& inBandList,
+                                  std::vector<ossim_uint32>& outBandList);
+
+   ossimFilename theImageFile;
+   ossimFilename theOverviewFile;
+   ossimFilename theSupplementaryDirectory;
+   ossimRefPtr<ossimImageHandler> theOverview;
+   vector<ossimIpt> theValidImageVertices;
+   ossimImageMetaData theMetaData;
+   mutable ossimRefPtr<ossimImageGeometry> theGeometry;
+   ossimRefPtr<ossimNBandLutDataObject> theLut;
+   std::vector<ossimDpt> theDecimationFactors;
+   ossimString theImageID;
+
+   /**
+    * theStartingResLevel If set to something other than zero(default) this is
+    * indicative that the reader is an overview.
+    */
+   ossim_uint32 theStartingResLevel; // 0 being full or highest res.
+
+   /**
+    * If true opening of overviews will be attempted.  If false only the base
+    * image will be opened (shallow open). Defaulted to true in constructor.
+    */
+   bool theOpenOverviewFlag;
+   mutable ossimPixelType thePixelType; // pixel-is-point or pixel-is-area
+   
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimImageHandler_HEADER */
+
diff --git a/include/ossim/imaging/ossimImageHandlerFactory.h b/ossim/include/ossim/imaging/ossimImageHandlerFactory.h
similarity index 100%
rename from include/ossim/imaging/ossimImageHandlerFactory.h
rename to ossim/include/ossim/imaging/ossimImageHandlerFactory.h
diff --git a/ossim/include/ossim/imaging/ossimImageHandlerFactoryBase.h b/ossim/include/ossim/imaging/ossimImageHandlerFactoryBase.h
new file mode 100644
index 0000000..492a4a1
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageHandlerFactoryBase.h
@@ -0,0 +1,110 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimImageHandlerFactoryBase.h 22632 2014-02-20 00:53:14Z dburken $
+
+#ifndef ossimImageHandlerFactoryBase_HEADER
+#define ossimImageHandlerFactoryBase_HEADER 1
+
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/base/ossimObjectFactory.h>
+#include <algorithm>
+#include <iosfwd>
+#include <vector>
+
+class ossimFilename;
+class ossimKeywordlist;
+
+class OSSIM_DLL ossimImageHandlerFactoryBase : public ossimObjectFactory
+{
+public:
+   template <class T> class UniqueList
+   {
+   public:
+      
+      void push_back(const T& value)
+      {
+         if(std::find(theList.begin(),theList.end(), value) == theList.end())
+         {
+            theList.push_back(value);
+         }
+      }
+
+      const std::vector<T>& getList()const
+      {
+         return theList;
+      }
+      ossim_uint32 size()const
+      {
+         return theList.size();
+      }
+      const T& operator[](ossim_uint32 idx)const
+      {
+         return theList[idx];
+      }
+      T& operator[](ossim_uint32 idx)
+      {
+         return theList[idx];
+      }
+   protected:
+      std::vector<T> theList;
+   };
+   
+   typedef UniqueList<ossimString> UniqueStringList;
+   typedef std::vector<ossimRefPtr<ossimImageHandler> > ImageHandlerList;
+   
+   virtual ossimImageHandler* open(const ossimFilename& fileName,
+                                   bool openOverview=true)const = 0;
+   virtual ossimImageHandler* open(const ossimKeywordlist& kwl,
+                                   const char* prefix=0)const = 0;
+
+   /**
+    *  @brief Open method.
+    *
+    *  This open takes a stream, position and a flag.
+    *
+    *  @param str Open stream to image.
+    *
+    *  @param restartPosition Typically 0, this is the stream offset to the
+    *  front of the image.
+    *
+    *  @param youOwnIt If true the opener takes ownership of the stream
+    *  pointer and will destroy on close.
+    *  
+    *  @return This implementation returns an ossimRefPtr with a null pointer.
+    */
+   virtual ossimRefPtr<ossimImageHandler> open( std::istream* str,
+                                                std::streamoff restartPosition,
+                                                bool youOwnIt ) const;   
+
+   /**
+    * @brief Open overview that takes a file name.
+    *
+    * This default implementation returns a null ref pointer.
+    * Derived factories that have overview readers should override.
+    * 
+    * @param file File to open.
+    *
+    * @return This default implementation returns a null ref pointer.
+    */
+   virtual ossimRefPtr<ossimImageHandler> openOverview(
+      const ossimFilename& file ) const;
+
+   virtual void getImageHandlersBySuffix(ImageHandlerList& result,
+                                         const ossimString& ext)const;
+
+   virtual void getImageHandlersByMimeType(ImageHandlerList& result,
+                                           const ossimString& mimeType)const;
+
+   virtual void getSupportedExtensions(ossimImageHandlerFactoryBase::UniqueStringList& extensionList)const=0;
+   
+TYPE_DATA
+};
+
+#endif
diff --git a/ossim/include/ossim/imaging/ossimImageHandlerRegistry.h b/ossim/include/ossim/imaging/ossimImageHandlerRegistry.h
new file mode 100644
index 0000000..38727ec
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageHandlerRegistry.h
@@ -0,0 +1,157 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author:  Garrett Potts
+//
+// Description:  Contains class definition for the class
+//               ImageHandlerRegistry.
+//
+//*******************************************************************
+//  $Id: ossimImageHandlerRegistry.h 22636 2014-02-23 17:55:50Z dburken $
+
+#ifndef ossimImageHandlerRegistry_HEADER
+#define ossimImageHandlerRegistry_HEADER 1
+
+#include <ossim/base/ossimObjectFactory.h>
+#include <ossim/base/ossimRtti.h>
+#include <ossim/imaging/ossimImageHandlerFactoryBase.h>
+#include <ossim/base/ossimFactoryListInterface.h>
+#include <iosfwd>
+#include <vector>
+
+class ossimImageHandler;
+class ossimFilename;
+class ossimKeywordlist;
+
+class OSSIMDLLEXPORT ossimImageHandlerRegistry : public ossimObjectFactory,
+                                                public ossimFactoryListInterface<ossimImageHandlerFactoryBase, ossimImageHandler>
+{
+public:
+   virtual ~ossimImageHandlerRegistry();
+   
+   static ossimImageHandlerRegistry* instance();
+   
+
+   /**
+    * @brief open that takes a filename.
+    * @param fileName File to open.
+    * @param trySuffixFirst If true calls code to try to open by suffix first,
+    * then goes through the list of available handlers. default=true.
+    * @param openOverview If true image handler will attempt to open overview.
+    * default = true
+    * @return Pointer to image handler or null if cannot open.
+    */
+   virtual ossimImageHandler* open(const ossimFilename& fileName,
+                                   bool trySuffixFirst=true,
+                                   bool openOverview=true)const;
+   
+   /**
+    *  Given a keyword list return a pointer to an ImageHandler.  Returns
+    *  null if a valid handler cannot be found.
+    */
+   virtual ossimImageHandler* open(const ossimKeywordlist& kwl,
+                                   const char* prefix=0)const;
+
+   /**
+    *  @brief Open method.
+    *
+    *  This open takes a stream, position and a flag.
+    *
+    *  @param str Open stream to image.
+    *
+    *  @param restartPosition Typically 0, this is the stream offset to the
+    *  front of the image.
+    *
+    *  @param youOwnIt If true the opener takes ownership of the stream
+    *  pointer and will destroy on close.
+    *  
+    *  @return This implementation returns an ossimRefPtr with a null pointer.
+    */
+   virtual ossimRefPtr<ossimImageHandler> open( std::istream* str,
+                                                std::streamoff restartPosition,
+                                                bool youOwnIt ) const;   
+   
+   /**
+    * @brief Open overview that takes a file name.
+    *
+    * This will only check readers that can be overview handlers.
+    * 
+    * @param file File to open.
+    * 
+    * @return ossimRefPtr to image handler on success or null on failure.
+    */
+   virtual ossimRefPtr<ossimImageHandler> openOverview(
+      const ossimFilename& file ) const;
+
+   /*!
+    * Creates an object given a type name.
+    */
+   virtual ossimObject* createObject(const ossimString& typeName) const;
+   
+   /*!
+    * Creates and object given a keyword list.
+    */
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
+                                     const char* prefix=0)const;
+
+   /**
+    * openBySuffix will call the mthod getImageHandlersBySuffix and go through
+    * each handler to try and open the file.  This should be a faster open
+    * for we do not have to do a magic number compare on all prior files and
+    * keep opening and closing files.
+    * @param openOverview If true image handler will attempt to open overview.
+    * default = true
+    */
+   virtual ossimRefPtr<ossimImageHandler> openBySuffix(const ossimFilename& file,
+                                                       bool openOverview=true)const; 
+   
+   /**
+    *
+    * Will add to the result list any handler that supports the passed in extensions
+    *
+    */
+   virtual void getImageHandlersBySuffix(ossimImageHandlerFactoryBase::ImageHandlerList& result,
+                                         const ossimString& ext)const;
+   /**
+    *
+    * Will add to the result list and handler that supports the passed in mime type
+    *
+    */
+   virtual void getImageHandlersByMimeType(ossimImageHandlerFactoryBase::ImageHandlerList& result,
+                                           const ossimString& mimeType)const;
+   
+   /*!
+    * This should return the type name of all objects in all factories.
+    * This is the name used to construct the objects dynamially and this
+    * name must be unique.
+    */
+   virtual void getTypeNameList( std::vector<ossimString>& typeList ) const;
+
+   virtual void getSupportedExtensions(
+      ossimImageHandlerFactoryBase::UniqueStringList& extensionList)const;
+
+   /**
+    * @brief Prints list of readers and properties.
+    * @param  out Stream to print to.
+    * @return std::ostream&
+    */
+   std::ostream& printReaderProps(std::ostream& out) const;
+   
+protected:
+   ossimImageHandlerRegistry();
+   ossimImageHandlerRegistry(const ossimImageHandlerRegistry& rhs);
+   const ossimImageHandlerRegistry&
+      operator=(const ossimImageHandlerRegistry& rhs);
+   
+   //static ossimImageHandlerRegistry*            theInstance;
+   
+TYPE_DATA
+};
+
+extern "C"
+{
+   OSSIM_DLL  void* ossimImageHandlerRegistryGetInstance();
+}
+
+#endif /* #ifndef ossimImageHandlerRegistry_HEADER */
diff --git a/ossim/include/ossim/imaging/ossimImageHistogramSource.h b/ossim/include/ossim/imaging/ossimImageHistogramSource.h
new file mode 100644
index 0000000..e5a93a1
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageHistogramSource.h
@@ -0,0 +1,106 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimImageHistogramSource.h 22737 2014-04-16 18:53:57Z gpotts $
+#ifndef ossimImageHistogramSource_HEADER
+#define ossimImageHistogramSource_HEADER
+#include <ossim/base/ossimHistogramSource.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/base/ossimProcessInterface.h>
+#include <ossim/base/ossimConnectableObjectListener.h>
+#include <ossim/base/ossimObjectEvents.h>
+#include <ossim/base/ossimIrect.h>
+
+/*!
+ * This source expects as input an ossimImageSource.
+ * it will slice up the requested region into tiles and compute
+ * the histogram of the passed in rectangle.
+ */
+class OSSIMDLLEXPORT ossimImageHistogramSource : public ossimHistogramSource,
+                                                 public ossimConnectableObjectListener,
+                                                 public ossimProcessInterface
+{
+public:
+
+   ossimImageHistogramSource(ossimObject* owner = 0);
+   
+   virtual ossimObject* getObject();
+   virtual const ossimObject* getObject()const;
+
+   void setAreaOfInterest(const ossimIrect& rect);
+
+   ossimIrect getAreaOfInterest()const;
+
+   void getAreaOfInterest(ossimIrect& rect)const;
+
+   virtual ossim_uint32 getMaxNumberOfRLevels()const;
+
+   virtual void setMaxNumberOfRLevels(ossim_uint32 number);
+
+   /*!
+    * The first argument is the region of interest that you wish to
+    * use for the histogram.  If the region is different than
+    * what it has already computed before then the histogram is considered
+    * dirty and will be re-computed.  The returned object is a
+    * multi-reslevel histogram
+    */
+   virtual ossimRefPtr<ossimMultiResLevelHistogram> getHistogram(const ossimIrect& rect);
+
+   virtual ossimRefPtr<ossimMultiResLevelHistogram> getHistogram();
+   virtual bool execute();
+   
+   virtual bool canConnectMyInputTo(ossim_int32 myInputIndex,
+                                    const ossimConnectableObject* object)const;
+
+   void setNumberOfBinsOverride(ossim_int32 numberOfBinsOverride);
+
+   void setMinValueOverride(ossim_float32 minValueOverride);
+
+   void setMaxValueOverride(ossim_float32 maxValueOverride);
+
+   ossimHistogramMode getComputationMode()const;
+   void setComputationMode(ossimHistogramMode mode);
+	
+   virtual void propertyEvent(ossimPropertyEvent& event);
+   
+   virtual void connectInputEvent(ossimConnectionEvent& event);
+   
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+	
+protected:
+   virtual ~ossimImageHistogramSource();
+
+   void getBinInformation(ossim_uint32& numberOfBins,
+                          ossim_float64& minValue,
+                          ossim_float64& maxValue,
+                          ossim_uint32 band)const;
+   virtual void computeNormalModeHistogram();
+   virtual void computeFastModeHistogram();
+   
+   /*!
+    * Initialized to ossimNAN'S
+    */
+   ossimIrect theAreaOfInterest;
+   bool       theHistogramRecomputeFlag;
+   
+   /*!
+    * Will default to 1.  This means it will use up to max
+    * number of res levels for the histogram.
+    */
+   ossim_uint32       theMaxNumberOfResLevels; 
+   ossim_float64      theMinValueOverride;
+   ossim_float64      theMaxValueOverride;
+   ossim_int32        theNumberOfBinsOverride;
+   ossimHistogramMode theComputationMode;
+   ossim_uint32       theNumberOfTilesToUseInFastMode;
+TYPE_DATA
+};
+
+#endif
diff --git a/ossim/include/ossim/imaging/ossimImageMetaData.h b/ossim/include/ossim/imaging/ossimImageMetaData.h
new file mode 100644
index 0000000..45dd249
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageMetaData.h
@@ -0,0 +1,139 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+// Contains class declaration for ossimImageMetaData.
+// 
+//*******************************************************************
+//  $Id: ossimImageMetaData.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimImageMetaData_HEADER
+#define ossimImageMetaData_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <iosfwd>
+#include <string>
+
+class ossimKeywordlist;
+
+class OSSIM_DLL ossimImageMetaData
+{
+public:
+   ossimImageMetaData();
+   ossimImageMetaData(ossimScalarType aType,
+                      ossim_uint32 numberOfBands);
+   ossimImageMetaData(const ossimImageMetaData& rhs);
+
+   const ossimImageMetaData& operator=(const ossimImageMetaData& rhs);
+   
+   ~ossimImageMetaData();
+   
+   void clear();
+
+   void setDefaultsForArrays();
+   
+   void setNumberOfBands(ossim_uint32 numberOfBands);
+   
+   ossim_uint32 getNumberOfBands()const;
+   
+   void setScalarType(ossimScalarType aType);
+   
+   ossimScalarType getScalarType()const;
+
+   /** @return The bytes per pixel. This is for a single band. */
+   ossim_uint32 getBytesPerPixel() const;
+   
+   double getMinPix(ossim_uint32 band)const;
+   
+   void setMinPix(ossim_uint32 band, double pix);
+   
+   void setMaxPix(ossim_uint32 band, double pix);
+   
+   void setNullPix(ossim_uint32 band, double pix);
+   
+   double getMaxPix(ossim_uint32 band)const;
+   
+   double getNullPix(ossim_uint32 band)const;
+   
+   const double* getMinPixelArray()const;
+   
+   const double* getMaxPixelArray()const;
+   
+   const double* getNullPixelArray()const;
+
+   void setMinValuesValid(bool flag);
+   
+   void setMaxValuesValid(bool flag);
+   
+   void setNullValuesValid(bool flag);
+
+   bool getMinValuesValidFlag()const;
+
+   bool getMaxValuesValidFlag()const;
+
+   bool getNullValuesValidFlag()const;
+
+   bool isValid()const;
+   
+   bool loadState(const ossimKeywordlist& kwl,
+                  const char* prefix=0);
+   bool saveState(ossimKeywordlist& kwl,
+                  const char* prefix=0)const;
+
+   /**
+    * @brief Method to update band values.
+    *
+    * Assumes a previous initialization and does not error out if band data is
+    * not found.  This does NOT clear the object prior to loading like the
+    * loadState(...) method.  Can be used to update min/max values from a
+    * "compute min max".  
+    *
+    * @param kwl Keyword list to initialize from.
+    *
+    * @param prefix Prefix, e.g. "image0.".
+    */
+   void updateMetaData( const ossimKeywordlist& kwl,
+                        const std::string& prefix );
+
+   /**
+    * @brief Print method.
+    * @return std::ostream&
+    */
+   std::ostream& print(std::ostream& out) const;
+
+   /**
+    * @note  Since the print method is virtual, derived classes only need
+    *        to implement that, not an addition operator<<.
+    */
+   friend OSSIM_DLL std::ostream& operator<<(std::ostream& out,
+                                             const ossimImageMetaData& obj);
+   
+private:
+
+   /**
+    * Looks for ossimKeywordNames::NUMBER_BANDS_KW, if not found looks for.
+    */
+   ossim_uint32 getBandCount(const ossimKeywordlist& kwl,
+                             const std::string& prefix) const;
+   
+   double*         theNullPixelArray;
+   double*         theMinPixelArray;
+   double*         theMaxPixelArray;
+  
+   bool            theMinValuesValidFlag;
+   bool            theMaxValuesValidFlag;
+   bool            theNullValuesValidFlag;
+   
+   ossimScalarType theScalarType;
+   ossim_uint32    theBytesPerPixel;
+   ossim_uint32    theNumberOfBands;
+};
+
+#endif /* #ifndef ossimImageMetaData_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimImageMetaDataWriterFactory.h b/ossim/include/ossim/imaging/ossimImageMetaDataWriterFactory.h
new file mode 100644
index 0000000..d107369
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageMetaDataWriterFactory.h
@@ -0,0 +1,88 @@
+//*******************************************************************
+// Copyright (C) 2003 Storage Area Networks, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Kenneth Melero (kmelero at sanz.com)
+//
+//*******************************************************************
+//  $Id: ossimImageMetaDataWriterFactory.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimImageMetaDataWriterFactory_HEADER
+#define ossimImageMetaDataWriterFactory_HEADER
+
+#include <ossim/imaging/ossimImageMetaDataWriterFactoryBase.h>
+#include <ossim/base/ossimRefPtr.h>
+
+class ossimMetadataFileWriter;
+
+class OSSIMDLLEXPORT ossimImageMetaDataWriterFactory:
+   public ossimImageMetaDataWriterFactoryBase
+{
+public:
+   ~ossimImageMetaDataWriterFactory();
+
+   static ossimImageMetaDataWriterFactory* instance();
+   virtual ossimObject* createObject(const ossimString& typeName)const;
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
+                                     const char* prefix=0)const;
+
+   /**
+    * Creates a writer from either a class name or a string representing the
+    * meta data type like "tiff_world_file".
+    *
+    * @return ossimRefPtr<ossimMetadataFileWriter>
+    *
+    * @note Return can have a null pointer if type is not found in a factory so
+    * the caller should always check the pointer like:
+    * ossimRefPtr<ossimMetadataFileWriter> mw =
+    *    ossimImageMetaDataWriterRegistry::instance("ossim_readme");
+    * if (!mw.valid())
+    * {
+    *    // not in factory
+    * }
+    */
+   virtual ossimRefPtr<ossimMetadataFileWriter> createWriter(
+      const ossimString& type)const;
+
+   /**
+    * This should return the type name of all objects in all factories.
+    * This is the name used to construct the objects dynamially and this
+    * name must be unique.
+    */
+   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
+
+   /**
+    * Satisfies pure virtual from ossimImageMetaDataWriterFactoryBase.
+    * 
+    * Appends the meta data writers types from each of the supported meta
+    * data writers in this factor to the "metadatatypeList".
+    * 
+    * This is the actual metadata type name like:
+    *   ossim_geometry
+    *   envi_header
+    *   tiff_world_file
+    *   jpeg_world_file
+    *   
+    * @param metadatatypeList stl::vector<ossimString> List to append to.
+    */
+   virtual void getMetadatatypeList(
+      std::vector<ossimString>& metadatatypeList) const;
+ 
+protected:
+   static ossimImageMetaDataWriterFactory* theInstance;
+
+   ossimImageMetaDataWriterFactory();
+
+   ossimImageMetaDataWriterFactory(const ossimImageMetaDataWriterFactory& rhs);
+
+   const ossimImageMetaDataWriterFactory& operator =(
+      const ossimImageMetaDataWriterFactory& rhs);
+   
+TYPE_DATA 
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimImageMetaDataWriterFactoryBase.h b/ossim/include/ossim/imaging/ossimImageMetaDataWriterFactoryBase.h
new file mode 100644
index 0000000..fe5d706
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageMetaDataWriterFactoryBase.h
@@ -0,0 +1,68 @@
+//----------------------------------------------------------------------------
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//----------------------------------------------------------------------------
+// $Id: ossimImageMetaDataWriterFactoryBase.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimImageMetaDataWriterFactoryBase_HEADER
+#define ossimImageMetaDataWriterFactoryBase_HEADER
+#include <ossim/base/ossimObjectFactory.h>
+#include <ossim/base/ossimRefPtr.h>
+
+class ossimMetadataFileWriter;
+
+class ossimImageMetaDataWriterFactoryBase : public ossimObjectFactory
+{
+public:
+   /**
+    * Pure virtual.  All ossimImageMetaDataWriterFactories must implement.
+    * 
+    * Creates a writer from either a class name or a string representing the
+    * meta data type like "tiff_world_file".
+    *
+    * @return ossimRefPtr<ossimMetadataFileWriter>
+    *
+    * @note Return can have a null pointer if type is not found in a factory so
+    * the caller should always check the pointer like:
+    * ossimRefPtr<ossimMetadataFileWriter> mw =
+    *    ossimImageMetaDataWriterRegistry::instance("ossim_readme");
+    * if (!mw.valid())
+    * {
+    *    // not in factory
+    * }
+    */
+   virtual ossimRefPtr<ossimMetadataFileWriter> createWriter(
+      const ossimString& type)const=0;
+
+   /**
+    * Pure virtual.  All ossimImageMetaDataWriterFactories must implement.
+    * 
+    * Appends the meta data writers types to the "metadatatypeList".
+    * 
+    * This is the actual metadata type name like:
+    *   ossim_geometry
+    *   envi_header
+    *   tiff_world_file
+    *   jpeg_world_file
+    *   
+    * @param metadatatypeList stl::vector<ossimString> List to append to.
+    *
+    * @note All writers should append to the list, not, clear it and then add
+    * their types.
+    */
+   virtual void getMetadatatypeList(
+      std::vector<ossimString>& metadatatypeList) const=0;
+
+protected:
+   ossimImageMetaDataWriterFactoryBase();
+   
+   ossimImageMetaDataWriterFactoryBase(
+      const ossimImageMetaDataWriterFactoryBase&);
+   
+   const ossimImageMetaDataWriterFactoryBase& operator=(
+      const ossimImageMetaDataWriterFactoryBase&);
+
+TYPE_DATA
+};
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimImageMetaDataWriterRegistry.h b/ossim/include/ossim/imaging/ossimImageMetaDataWriterRegistry.h
new file mode 100644
index 0000000..92574d8
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageMetaDataWriterRegistry.h
@@ -0,0 +1,99 @@
+//----------------------------------------------------------------------------
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//----------------------------------------------------------------------------
+// $Id: ossimImageMetaDataWriterRegistry.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimImageMetaDataWriterRegistry_HEADER
+#define ossimImageMetaDataWriterRegistry_HEADER
+#include <ossim/imaging/ossimImageMetaDataWriterFactoryBase.h>
+#include <ossim/base/ossimRefPtr.h>
+
+class ossimMetadataFileWriter;
+
+class OSSIMDLLEXPORT ossimImageMetaDataWriterRegistry :
+   public ossimImageMetaDataWriterFactoryBase
+{
+public:
+   ~ossimImageMetaDataWriterRegistry();
+   
+   static ossimImageMetaDataWriterRegistry* instance();
+   
+   void registerFactory(ossimImageMetaDataWriterFactoryBase* factory);
+   void unregisterFactory(ossimImageMetaDataWriterFactoryBase* factory);
+   bool findFactory(ossimImageMetaDataWriterFactoryBase* factory)const;
+   /**
+    * Creates an object given a type name.
+    */
+   virtual ossimObject* createObject(const ossimString& typeName)const;
+
+   /**
+    * Creates and object given a keyword list.
+    */
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
+                                     const char* prefix=0)const;
+
+   /**
+    * Creates a writer from either a class name or a string representing the
+    * meta data type like "tiff_world_file".
+    *
+    * @return ossimRefPtr<ossimMetadataFileWriter>
+    *
+    * @note Return can have a null pointer if type is not found in a factory so
+    * the caller should always check the pointer like:
+    * ossimRefPtr<ossimMetadataFileWriter> mw =
+    *    ossimImageMetaDataWriterRegistry::instance("ossim_readme");
+    * if (!mw.valid())
+    * {
+    *    // not in factory
+    * }
+    */
+   virtual ossimRefPtr<ossimMetadataFileWriter> createWriter(
+      const ossimString& type)const;
+   
+   /**
+    * This should return the type name of all objects in all factories.
+    * This is the name used to construct the objects dynamially and this
+    * name must be unique.
+    */
+   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
+
+   /**
+    * Initializes list with meta data types from all registered
+    * metadata factories.
+    * 
+    * This is the actual image type name like:
+    *   ossim_geometry
+    *   envi_header
+    *   tiff_world_file
+    *   jpeg_world_file
+    *   
+    * @param metadatatypeList stl::vector<ossimString> list to append to.
+    *
+    * @note Since this is the master registry for all meta data factories
+    * this method starts by clearing the metadatatypeList.
+    */
+   virtual void getMetadatatypeList(
+      std::vector<ossimString>& metadatatypeList)const;
+   
+protected:
+   ossimImageMetaDataWriterRegistry();
+
+   ossimImageMetaDataWriterRegistry(
+      const ossimImageMetaDataWriterRegistry& rhs);
+   
+   const ossimImageMetaDataWriterRegistry& operator=(
+      const ossimImageMetaDataWriterRegistry &rhs);
+
+  // static ossimImageMetaDataWriterRegistry* theInstance;
+   std::vector<ossimImageMetaDataWriterFactoryBase*> theFactoryList;
+};
+
+
+extern "C"
+{
+   OSSIMDLLEXPORT void* ossimImageMetaDataWriterRegistryGetInstance();
+}
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimImageModel.h b/ossim/include/ossim/imaging/ossimImageModel.h
new file mode 100644
index 0000000..d2bad58
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageModel.h
@@ -0,0 +1,190 @@
+//-----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Class declaration of ossimImageModel.
+//
+//-----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimImageModel_HEADER
+#define ossimImageModel_HEADER 1
+
+#include <vector>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimRtti.h>
+
+class ossimDrect;
+class ossimImageHandler;
+
+/**
+ * @brief Class to handle transforming image points, rectangles, and offsets
+ * from one reduced resolution data set (rrds) level to another.
+ *
+ * Derived from ossimObject only so users can pass via the
+ * ossimViewInterface::setView method.
+ */
+class OSSIM_DLL ossimImageModel : public ossimObject
+{
+public:
+   
+   /** @brief default constructor */
+   ossimImageModel();
+
+
+   /**
+    * @brief Method to initialize class from an image handler.
+    *
+    * @param ih Image handler.
+    */
+   virtual void initialize(const ossimImageHandler& ih);
+
+   /**
+    * @brief Get r0 point from rn point.
+    * 
+    * @param rrds Source (rnPt) reduced resolution data set.
+    *
+    * @param rnPt The image point to tranform.
+    *
+    * @param r0Pt the Point to initialize.
+    *
+    * @note Throws ossimException on out of range rrds.
+    */
+   void rnToR0(ossim_uint32 rrds,
+               const ossimDpt& rnPt,
+               ossimDpt& r0Pt) const;
+
+   /**
+    * @brief Get r0 point from rn point.
+    *
+    * This requires calling setTargetRrds(ossim_uint32 rrds) to the level
+    * for rnPt.
+    * 
+    * @param rnPt The image point to tranform.
+    *
+    * @param r0Pt the Point to initialize.
+    *
+    * @note Throws ossimException on out of range rrds.
+    *
+    * @see setTargetRrds
+    */
+   void rnToR0(const ossimDpt& rnPt, ossimDpt& r0Pt) const;
+   
+   /**
+    * @brief Get rn point from r0 point.
+    * 
+    * @param rrds Target (rnPt) reduced resolution data set.
+    *
+    * @param r0Pt The image point to tranform.
+    *
+    * @param rnPt the Point to initialize.
+    *
+    * @note Throws ossimException on out of range rrds.
+    */
+   void r0ToRn(ossim_uint32 rrds,
+               const ossimDpt& r0Pt,
+               ossimDpt& rnPt) const;
+
+   /**
+    * @brief Get rn point from r0 point.
+    *
+    * This requires calling setTargetRrds(ossim_uint32 rrds) to the level
+    * for rnPt.
+    * 
+    * @param r0Pt The image point to tranform.
+    *
+    * @param rnPt the Point to initialize.
+    *
+    * @note Throws ossimException on out of range rrds.
+    *
+    * @see setTargetRrds
+    */
+   void r0ToRn(const ossimDpt& r0Pt,
+               ossimDpt& rnPt) const;
+
+   /**
+    * @brief Get the sub image offset for a given resolution level.
+    * 
+    * @param rrds The reduced resolution data set.
+    *
+    * @param offset the Point to initialize.
+    *
+    * @note Throws ossimException on out of range rrds.
+    */
+   void getSubImageOffset(ossim_uint32 rrds, ossimDpt& offset) const;
+
+   /**
+    * @brief Gets the zero-based image rectangle for a given reduced resolution
+    * data set.
+    *
+    * @param rrds The reduced resolution data set.
+    *
+    * @param rect Initialized with image rectangle for rrds.
+    *
+    * @note Throws ossimException on out of range rrds.
+    */
+   void getImageRectangle(ossim_uint32 rrds, ossimDrect& rect) const; 
+   
+   /**
+    * @brief Gets the model-based image rectangle for a given reduced
+    * resolution data set.
+    *
+    * If this image is a sub image the offset is applied.  So if the image
+    * has a sub image offset of (1024, 1024), and has 1024 lines and 1024
+    * samples the rectangle for r0 will be:  (1024, 1024) (2047, 2047)
+    *
+    * @param rrds The reduced resolution data set.
+    *
+    * @param rect Initialized with image rectangle for rrds.
+    *
+    * @note Throws ossimException on out of range rrds.
+    */
+   void getBoundingRectangle(ossim_uint32 rrds, ossimDrect& rect) const;
+
+   /**
+    * @return This returns the total number of decimation levels.
+    */
+   ossim_uint32 getNumberOfDecimationLevels()const;
+
+   /**
+    * @brief Set theTargetRrds data member.
+    *
+    * This is used by methods rnToR0 and r0ToRn that do not take a rrds
+    * argument.
+    *
+    * @param rrds Target reduced resolution data set.
+    */
+   void setTargetRrds(ossim_uint32 rrds);
+
+   /**
+    * @return The target reduced resolution data set.
+    */
+   ossim_uint32 getTargetRrds() const;
+   
+ 
+
+protected:
+   /** @brief virtual destructor */
+   virtual ~ossimImageModel();
+
+   /** Offset from the full image. */
+   ossimDpt theSubImageOffset;
+
+   /** Decimation factors for each rrds level. */
+   std::vector<ossimDpt> theDecimationFactors;
+
+   ossim_uint32 theLines;
+   ossim_uint32 theSamples;
+   ossim_uint32 theTargetRrds;
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimImageModel_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimImageMosaic.h b/ossim/include/ossim/imaging/ossimImageMosaic.h
new file mode 100644
index 0000000..753e9cf
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageMosaic.h
@@ -0,0 +1,74 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimImageMosaic.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimImageMosaic_HEADER
+#define ossimImageMosaic_HEADER
+#include <vector>
+using namespace std;
+
+#include <ossim/imaging/ossimImageCombiner.h>
+
+
+/**
+ * An image mosaic is a simple combiner that will
+ * just do a simple mosaic.  It just checks NULL pix values until it finds a
+ * pixel that is not empty and copies it out to the output.  The list will
+ * have same size tiles and have the same number of bands.
+ */
+class OSSIMDLLEXPORT ossimImageMosaic : public ossimImageCombiner
+{
+public:
+   ossimImageMosaic();
+   ossimImageMosaic(ossimConnectableObject::ConnectableObjectList& inputSources);
+   
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
+                                               ossim_uint32 resLevel=0);
+   
+   virtual void initialize();
+   
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+protected:
+   virtual ~ossimImageMosaic();
+
+   /**
+    * Called on first getTile, will initialize all data needed.
+    */
+   void allocate();
+   
+   ossimRefPtr<ossimImageData> theTile;
+
+   template <class T> ossimRefPtr<ossimImageData> combine(
+      T, // dummy template variable not used
+      const ossimIrect& tileRect,
+      ossim_uint32 resLevel=0);
+   template <class T> ossimRefPtr<ossimImageData> combineNorm(
+      T, // dummy template variable not used
+      const ossimIrect& tileRect,
+      ossim_uint32 resLevel=0);
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimImageMosaic_HEADER */
+
diff --git a/include/ossim/imaging/ossimImageReconstructionFilterFactory.h b/ossim/include/ossim/imaging/ossimImageReconstructionFilterFactory.h
similarity index 100%
rename from include/ossim/imaging/ossimImageReconstructionFilterFactory.h
rename to ossim/include/ossim/imaging/ossimImageReconstructionFilterFactory.h
diff --git a/include/ossim/imaging/ossimImageReconstructionFilterRegistry.h b/ossim/include/ossim/imaging/ossimImageReconstructionFilterRegistry.h
similarity index 100%
rename from include/ossim/imaging/ossimImageReconstructionFilterRegistry.h
rename to ossim/include/ossim/imaging/ossimImageReconstructionFilterRegistry.h
diff --git a/ossim/include/ossim/imaging/ossimImageRenderer.h b/ossim/include/ossim/imaging/ossimImageRenderer.h
new file mode 100644
index 0000000..55ad6b5
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageRenderer.h
@@ -0,0 +1,500 @@
+//*******************************************************************
+// Copyright (C) 2001 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*******************************************************************
+// $Id: ossimImageRenderer.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimImageRenderer_HEADER
+#define ossimImageRenderer_HEADER
+#include <ossim/imaging/ossimImageSourceFilter.h>
+#include <ossim/projection/ossimImageViewTransform.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimPolyArea2d.h>
+#include <ossim/base/ossimViewInterface.h>
+#include <ossim/base/ossimRationalNumber.h>
+
+class ossimImageData;
+class ossimDiscreteConvolutionKernel;
+class ossimFilterResampler;
+
+class OSSIMDLLEXPORT ossimImageRenderer : public ossimImageSourceFilter,
+                                          public ossimViewInterface
+{
+public:
+   ossimImageRenderer();
+   ossimImageRenderer(ossimImageSource* inputSource,
+                      ossimImageViewTransform* imageViewTrans = NULL);
+
+   virtual ossimString getLongName()  const;
+   virtual ossimString getShortName() const;
+
+   /**
+    * the resampler will need the tile request to come from the view.
+    * It will use the view to transoform this to world and then use the
+    * image's projection to get it into final line sample.  This way
+    * the resampler can fill a tile width by height on the screen
+    * correctly.
+    */
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
+                                               ossim_uint32 resLevel=0);
+
+   virtual void initialize();
+
+   /**
+    * m_Resampler will adjust the rect to whatever the view is.  So it
+    * will project the full image rect onto the view and return the upright
+    * bounding rect.
+    */
+   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
+
+   /**
+    * @brief Gets the bounding rectangle of the source.
+    *
+    * This is the output view bounds.
+    * 
+    * @param rect Initialized with bounding rectangle by this.
+    * @param resLevel Reduced resolution level if applicable.
+    */
+   virtual void getBoundingRect(ossimIrect& rect,
+                                ossim_uint32 resLevel=0) const;
+
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+   
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   void setImageViewTransform(ossimImageViewTransform* transform);
+   ossimImageViewTransform* getImageViewTransform() { return m_ImageViewTransform.get(); }
+
+   //! Returns instance to the input image geometry. This may be a NULL pointer.
+   //! This is only valid if the IVT is a projection type IVT (IVPT) 
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+
+   virtual bool setView(ossimObject* baseObject);
+   ossimFilterResampler* getResampler() { return m_Resampler; }
+   virtual ossimObject* getView();
+   virtual const ossimObject* getView()const;
+
+   virtual void getDecimationFactor(ossim_uint32 resLevel, ossimDpt& result)const;
+  virtual void getDecimationFactors(vector<ossimDpt>& decimations)const;
+  virtual ossim_uint32 getNumberOfDecimationLevels()const;
+  
+   virtual void setAutoUpdateInputTransformFlag(bool flag){ m_AutoUpdateInputTransform = flag; }
+   
+   /**
+    * ordering specifies how the vertices should be arranged.
+    * valid image vertices is basically the tightly fit convex hull
+    * of the image.  Usually an image has NULL values and are
+    * internally not upright rectangular.  This can cause
+    * problems some spatial filters.
+    *
+    * We need to make sure that the resampler overrides this method.
+    * it needs to transform the vertices to the view's side.
+    */
+   virtual void getValidImageVertices(vector<ossimIpt>& validVertices,
+                                      ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER,
+                                      ossim_uint32 resLevel=0)const;
+
+   void setMaxLevelsToCompute(ossim_uint32 maxLevels);
+   ossim_uint32 getMaxLevelsToCompute()const;
+   
+   void connectInputEvent(ossimConnectionEvent& event);
+   void disconnectInputEvent(ossimConnectionEvent& event);
+   void propertyEvent(ossimPropertyEvent& event);
+   virtual void refreshEvent(ossimRefreshEvent& event);
+   
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+   /**
+    * @brief Enables source.
+    *
+    * Overrides ossimSource::enableSource so bounding rects are recomputed on
+    * state change.
+    */
+   virtual void enableSource();
+
+   /**
+    * @brief Disables source.
+    *
+    * Overrides ossimSource::disableSource so bounding rects are recomputed on
+    * state change.
+    */
+   virtual void disableSource();
+
+   /**
+    * @brief Sets the enable flag.
+    *
+    * @param flag True to enable, false to disable.
+    * 
+    * Overrides ossimSource::setEnableFlag so bounding rects are recomputed on
+    * state change.
+    */
+   virtual void setEnableFlag(bool flag);
+
+   
+protected:
+   virtual ~ossimImageRenderer();
+
+private:
+   
+   class ossimRendererSubRectInfo
+   {
+    enum SplitFlag{
+      SPLIT_NONE = 0,
+      UPPER_LEFT_SPLIT_FLAG  = 1,
+      UPPER_RIGHT_SPLIT_FLAG = 2,
+      LOWER_RIGHT_SPLIT_FLAG = 4,
+      LOWER_LEFT_SPLIT_FLAG  = 8,
+      SPLIT_ALL = UPPER_LEFT_SPLIT_FLAG|UPPER_RIGHT_SPLIT_FLAG|LOWER_RIGHT_SPLIT_FLAG|LOWER_LEFT_SPLIT_FLAG
+    };
+   public:
+      friend std::ostream& operator <<(std::ostream& out, const ossimRendererSubRectInfo& rhs)
+      {
+         return out << "vul:   " << rhs.m_Vul << endl
+            << "vur:   " << rhs.m_Vur << endl
+            << "vlr:   " << rhs.m_Vlr << endl
+            << "vll:   " << rhs.m_Vll << endl
+            << "iul:   " << rhs.m_Iul << endl
+            << "iur:   " << rhs.m_Iur << endl
+            << "ilr:   " << rhs.m_Ilr << endl
+            << "ill:   " << rhs.m_Ill << endl
+            << "scale: " << rhs.m_ViewToImageScale << endl;
+
+      }
+
+      ossimRendererSubRectInfo(ossimImageViewTransform* transform=0);
+      ossimRendererSubRectInfo(ossimImageViewTransform* transform,
+                               const ossimDpt& vul,
+                               const ossimDpt& vur,
+                               const ossimDpt& vlr,
+                               const ossimDpt& vll);
+         
+      bool imageHasNans()const;
+      bool imageIsNan()const;
+      bool viewHasNans()const;
+      bool viewIsNan()const;
+
+      void splitView(std::vector<ossimRendererSubRectInfo>& result)const;
+      //void splitView(ossimRendererSubRectInfo& ulRect,
+      //               ossimRendererSubRectInfo& urRect,
+      //               ossimRendererSubRectInfo& lrRect,
+      //               ossimRendererSubRectInfo& llRect)const;
+      
+      void transformViewToImage();
+      void transformImageToView();
+      bool tooBig()const;
+      void roundToInteger();
+      void stretchImageOut(bool enableRound=false);
+      ossimDrect getViewRect()const;
+      ossimDrect getImageRect()const;
+      void roundImageToInteger();
+      void roundViewToInteger();
+      bool isViewEqual(const ossimRendererSubRectInfo& infoRect)const;
+      bool isViewEqual(const ossimDrect& viewRect)const;
+      ossimDpt computeViewToImageScale(const ossimDpt& viewPt, const ossimDpt& delta=ossimDpt(1.0,1.0))const;
+      ossimDpt getAbsValueViewToImageScales()const;
+      ossimDpt getAbsValueImageToViewScales()const;
+      ossimDpt computeRoundTripErrorViewPt(const ossimDpt& dpt)const;
+      bool isViewAPoint()const;
+      bool isIdentity()const;
+      bool canBilinearInterpolate(double error)const;
+
+      ossimDpt getParametricCenter(const ossimDpt& ul, const ossimDpt& ur, 
+				    const ossimDpt& lr, const ossimDpt& ll)const;
+
+     void getViewMids(ossimDpt& upperMid,
+		      ossimDpt& rightMid,
+		      ossimDpt& bottomMid,
+		      ossimDpt& leftMid,
+		      ossimDpt& center)const;
+
+     void getImageMids(ossimDpt& upperMid,
+		       ossimDpt& rightMid,
+		       ossimDpt& bottomMid,
+		       ossimDpt& leftMid,
+		       ossimDpt& center)const;
+     ossim_uint16 getSplitFlags()const;
+
+      ossimDpt m_Iul;
+      ossimDpt m_Iur;
+      ossimDpt m_Ilr;
+      ossimDpt m_Ill;
+
+      ossimIpt m_Vul;
+      ossimIpt m_Vur;
+      ossimIpt m_Vlr;
+      ossimIpt m_Vll;
+
+      ossimDpt m_ViewToImageScale;
+      ossimDpt m_ImageToViewScale;
+
+
+      ossimDpt m_VulScale;
+      ossimDpt m_VurScale;
+      ossimDpt m_VlrScale;
+      ossimDpt m_VllScale;
+
+      ossimDpt m_ulRoundTripError;
+      ossimDpt m_urRoundTripError;
+      ossimDpt m_lrRoundTripError;
+      ossimDpt m_llRoundTripError;
+
+      mutable ossimRefPtr<ossimImageViewTransform> m_transform;
+      mutable const ossimPolyArea2d* m_viewBounds;
+
+    private:
+      void splitHorizontal(std::vector<ossimRendererSubRectInfo>& result)const;
+      void splitVertical(std::vector<ossimRendererSubRectInfo>& result)const;
+      void splitAll(std::vector<ossimRendererSubRectInfo>& result)const;
+   };
+
+   void recursiveResample(ossimRefPtr<ossimImageData> outputData,
+                          const ossimRendererSubRectInfo& rectInfo,
+			  ossim_uint32 level);
+   
+
+   void fillTile(ossimRefPtr<ossimImageData> outputData,
+                 const ossimRendererSubRectInfo& rectInfo);
+                 
+   ossimIrect getBoundingImageRect()const;
+
+   
+   //! this is called on a property event and on input connection changes.
+   void checkIVT();
+
+   /**
+    * @brief Initializes m_inputR0Rect and m_viewBoundingRect and sets
+    * m_rectsDirty appropriately.
+    */
+   void initializeBoundingRects();
+
+   ossimRefPtr<ossimImageData> getTileAtResLevel(const ossimIrect& boundingRect,
+                                     ossim_uint32 resLevel);
+  template <class T>
+  void resampleTileToDecimation(T dummyVariable,
+				ossimRefPtr<ossimImageData> result,
+				ossimRefPtr<ossimImageData> tile,
+				ossim_uint32 multiplier);
+
+   long computeClosestResLevel(const std::vector<ossimDpt>& decimationFactors,
+                               double scale)const;
+   void stretchQuadOut(const ossimDpt& amount,
+                       ossimDpt& ul,
+                       ossimDpt& ur,
+                       ossimDpt& lr,
+                       ossimDpt& ll);
+
+   /**
+    * Called on first getTile, will initialize all data needed.
+    */
+   void allocate();
+
+   /**
+    *  Deletes all allocated tiles.
+    */
+   void deallocate();
+
+   ossimFilterResampler*       m_Resampler;
+   ossimRefPtr<ossimImageData> m_BlankTile;
+   ossimRefPtr<ossimImageData> m_Tile;
+   ossimRefPtr<ossimImageData> m_TemporaryBuffer;
+
+   /**
+    * This is going to allow us to chain multiple
+    * renderers together.  So if we have one
+    * renderer doing a scale and they pass an r-level
+    * down and we have another renderer within the
+    * chain he will be starting at a different r-level.
+    * The default will be r-level 0 request coming
+    * from the right.
+    */
+   ossim_uint32             m_StartingResLevel;
+   ossimRefPtr<ossimImageViewTransform> m_ImageViewTransform;
+
+   ossimIrect               m_inputR0Rect;
+   ossimIrect               m_viewRect;
+   bool                     m_rectsDirty;
+
+   ossim_uint32             m_MaxRecursionLevel;
+   bool                     m_AutoUpdateInputTransform;
+   ossim_uint32             m_MaxLevelsToCompute;
+
+   ossimPolyArea2d            m_viewArea;
+   
+TYPE_DATA
+};
+
+inline ossimImageRenderer::ossimRendererSubRectInfo::ossimRendererSubRectInfo(ossimImageViewTransform* transform)
+:m_transform(transform),
+m_viewBounds(0)
+{
+   m_Vul.makeNan();
+   m_Vur.makeNan();
+   m_Vlr.makeNan();
+   m_Vll.makeNan();
+   m_Iul.makeNan();
+   m_Iur.makeNan();
+   m_Ilr.makeNan();
+   m_Ill.makeNan();
+   m_ViewToImageScale.makeNan();
+   m_ImageToViewScale.makeNan();            
+}
+
+inline ossimImageRenderer::ossimRendererSubRectInfo::ossimRendererSubRectInfo(ossimImageViewTransform* transform,
+                         const ossimDpt& vul,
+                         const ossimDpt& vur,
+                         const ossimDpt& vlr,
+                         const ossimDpt& vll)
+                         :m_Vul(vul),
+                         m_Vur(vur),
+                         m_Vlr(vlr),
+                         m_Vll(vll),
+                         m_transform(transform),
+                         m_viewBounds(0)
+{
+   m_Iul.makeNan();
+   m_Iur.makeNan();
+   m_Ilr.makeNan();
+   m_Ill.makeNan();
+   m_ViewToImageScale.makeNan();
+   m_ImageToViewScale.makeNan();            
+}
+
+inline bool ossimImageRenderer::ossimRendererSubRectInfo::imageHasNans()const
+{
+   return ( m_Iul.hasNans()||
+      m_Iur.hasNans()||
+      m_Ilr.hasNans()||
+      m_Ill.hasNans());
+}
+
+inline bool ossimImageRenderer::ossimRendererSubRectInfo::imageIsNan()const
+{
+   return ( m_Iul.hasNans()&&
+      m_Iur.hasNans()&&
+      m_Ilr.hasNans()&&
+      m_Ill.hasNans());
+}
+
+inline bool ossimImageRenderer::ossimRendererSubRectInfo::viewHasNans()const
+{
+   return ( m_Vul.hasNans()||
+      m_Vur.hasNans()||
+      m_Vlr.hasNans()||
+      m_Vll.hasNans());
+}
+
+inline bool ossimImageRenderer::ossimRendererSubRectInfo::viewIsNan()const
+{
+   return ( m_Vul.hasNans()&&
+      m_Vur.hasNans()&&
+      m_Vlr.hasNans()&&
+      m_Vll.hasNans());
+}
+
+inline void ossimImageRenderer::ossimRendererSubRectInfo::roundToInteger()
+{
+   m_Iul = ossimIpt(m_Iul);
+   m_Iur = ossimIpt(m_Iur);
+   m_Ilr = ossimIpt(m_Ilr);
+   m_Ill = ossimIpt(m_Ill);
+
+   m_Vul = ossimIpt(m_Vul);
+   m_Vur = ossimIpt(m_Vur);
+   m_Vlr = ossimIpt(m_Vlr);
+   m_Vll = ossimIpt(m_Vll);
+}
+
+inline ossimDrect ossimImageRenderer::ossimRendererSubRectInfo::getViewRect()const
+{
+   return ossimDrect(m_Vul,
+      m_Vur,
+      m_Vlr,
+      m_Vll);            
+}
+
+inline ossimDrect ossimImageRenderer::ossimRendererSubRectInfo::getImageRect()const
+{
+   return ossimDrect(m_Iul,
+      m_Iur,
+      m_Ilr,
+      m_Ill);
+}
+
+inline void ossimImageRenderer::ossimRendererSubRectInfo::roundImageToInteger()
+{
+   m_Iul = ossimIpt(m_Iul);
+   m_Iur = ossimIpt(m_Iur);
+   m_Ilr = ossimIpt(m_Ilr);
+   m_Ill = ossimIpt(m_Ill);
+}
+
+inline void ossimImageRenderer::ossimRendererSubRectInfo::roundViewToInteger()
+{
+   m_Vul = ossimIpt(m_Vul);
+   m_Vur = ossimIpt(m_Vur);
+   m_Vlr = ossimIpt(m_Vlr);
+   m_Vll = ossimIpt(m_Vll);
+}
+
+inline bool ossimImageRenderer::ossimRendererSubRectInfo::isViewEqual(const ossimRendererSubRectInfo& infoRect)const
+{
+   return ( (m_Vul == infoRect.m_Vul)&&
+      (m_Vur == infoRect.m_Vur)&&
+      (m_Vlr == infoRect.m_Vlr)&&
+      (m_Vll == infoRect.m_Vll));
+}
+
+inline bool ossimImageRenderer::ossimRendererSubRectInfo::isViewEqual(const ossimDrect& viewRect)const
+{
+   return ( (m_Vul == viewRect.ul())&&
+      (m_Vur == viewRect.ur())&&
+      (m_Vlr == viewRect.lr())&&
+      (m_Vll == viewRect.ll()));
+}
+
+inline ossimDpt ossimImageRenderer::ossimRendererSubRectInfo::getAbsValueViewToImageScales()const
+{
+   if(m_ViewToImageScale.hasNans())
+   {
+      return m_ImageToViewScale;
+   }
+   return ossimDpt(fabs(m_ViewToImageScale.x), fabs(m_ViewToImageScale.y));
+}
+
+inline ossimDpt ossimImageRenderer::ossimRendererSubRectInfo::getAbsValueImageToViewScales()const
+{
+   if(m_ImageToViewScale.hasNans())
+   {
+      return m_ImageToViewScale;
+   }
+
+   return ossimDpt(fabs(m_ImageToViewScale.x), fabs(m_ImageToViewScale.y));
+}
+
+inline bool ossimImageRenderer::ossimRendererSubRectInfo::isViewAPoint()const
+{
+   return ((m_Vul == m_Vur)&&
+      (m_Vul == m_Vlr)&&
+      (m_Vul == m_Vll));
+}
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimImageSharpenFilter.h b/ossim/include/ossim/imaging/ossimImageSharpenFilter.h
new file mode 100644
index 0000000..08eba4e
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageSharpenFilter.h
@@ -0,0 +1,84 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimImageSharpenFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimImageSharpenFilter_HEADER
+#define ossimImageSharpenFilter_HEADER
+#include <ossim/imaging/ossimImageSourceFilter.h>
+#include <ossim/imaging/ossimConvolutionSource.h>
+class OSSIMDLLEXPORT ossimImageSharpenFilter : public ossimImageSourceFilter
+{
+public:
+   ossimImageSharpenFilter(ossimObject* owner=NULL);
+
+   virtual ossimString getShortName()const;
+   virtual ossimString getLongName()const;
+   
+   ossim_uint32 getWidth()const;
+   ossim_float64 getSigma()const;
+   void setWidthAndSigma(ossim_uint32 w, ossim_float64 sigma);
+   
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+   
+   virtual void initialize();
+   
+   virtual void connectInputEvent(ossimConnectionEvent &event);
+   virtual void disconnectInputEvent(ossimConnectionEvent &event);
+   
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+protected:
+   virtual ~ossimImageSharpenFilter();
+   inline double laplacianOfGaussian(double x, double y, double sigma)
+   {
+      double r2 = x*x+y*y;
+      double sigma2 = sigma*sigma;
+      return ((1.0/(M_PI*sigma2*sigma2))*
+              (1.0-r2/(2.0*sigma2))*
+              (exp(-r2/(2.0*sigma2))));
+      
+   }
+   
+   void buildConvolutionMatrix();
+   
+
+   /*!
+    * Convolve full means that the input data is full and has
+    * no null data.  We don't have to compare for nulls here
+    */
+   template<class T>
+   void sharpenFull(T,
+                    const ossimRefPtr<ossimImageData>& inputData,
+                    ossimRefPtr<ossimImageData>& outputData);
+   
+   /*!
+    * Convolve partial means that the input data is has some
+    * null data.  We will have to compare nulls
+    */
+   template<class T>
+   void sharpenPartial(T,
+                       const ossimRefPtr<ossimImageData>& inputData,
+                       ossimRefPtr<ossimImageData>& outputData);
+
+   ossimRefPtr<ossimConvolutionSource> theConvolutionSource;
+   ossim_uint32 theWidth;
+   ossim_float64 theSigma;
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimImageSharpenFilter_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimImageSource.h b/ossim/include/ossim/imaging/ossimImageSource.h
new file mode 100644
index 0000000..e5124e0
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageSource.h
@@ -0,0 +1,247 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimImageSource.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimImageSource_HEADER
+#define ossimImageSource_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimSource.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+
+class ossimDpt;
+
+class OSSIMDLLEXPORT ossimImageSource : public ossimSource
+{
+public:
+   ossimImageSource(ossimObject* owner = 0);
+   ossimImageSource(ossimObject* owner,
+                    ossim_uint32 inputListSize,
+                    ossim_uint32 outputListSize,
+                    bool inputListIsFixedFlag=true,
+                    bool outputListIsFixedFlag=true);
+   virtual ~ossimImageSource();
+
+   /**
+    * @return from origin out to tile_width-1, and tile_height-1.
+    */
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIpt& origin,
+                                               ossim_uint32 resLevel=0);
+   
+  /**
+   * @return the requested region of interest
+   */
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
+                                               ossim_uint32 resLevel=0);
+
+   /**
+    * Method to get a tile.   
+    *
+    * @param result The tile to stuff.  Note The requested rectangle in full
+    * image space and bands should be set in the result tile prior to
+    * passing. This is the default implementation that is not thread-friendly as it uses the
+    * object's tile then simply copies its buffer to the provided tile. Eventually, all image
+    * sources should override this method.
+    *
+    * @return true on success false on error.  If return is false, result
+    * is undefined so caller should handle appropriately with makeBlank or whatever.
+    *
+    * @note Derived classes should override this method to most efficiently stuff result.
+    */
+   virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);
+   
+  /**
+   * For RTTI support. overrides ossimImageSource
+   * get object to return the correct casted base pointer
+   * for RTTI casting
+   */
+   virtual ossimObject* getObject() { return this; }
+   
+   /**
+    * For RTTI support. overrides ossimImageSource
+    * get object to return the correct casted base pointer
+    * for RTTI casting
+    */
+   virtual const ossimObject* getObject() const { return this; }
+
+ 
+  /**
+   * Will return the decimation factor for the given resolution 
+   * level.  the decimation is the scale from Resolution 0 or full 
+   * res.  Usually this is a power of 2 decimation where
+   * the decimation result is 1.0/2^resoltion.
+   */
+   virtual void getDecimationFactor(ossim_uint32 resLevel,
+                                    ossimDpt& result)const;
+  
+   /**
+    * Will return an array of all decimations for each resolution level.
+    */
+   virtual void getDecimationFactors(std::vector<ossimDpt>& decimations) const;
+
+   /**
+    * Will return the number of resolution levels.  Note: resolution
+    * level 0 is included in the return count.
+    */
+   virtual ossim_uint32 getNumberOfDecimationLevels() const;
+   
+   /*!
+    * Returns the number of bands available from the input.
+    */
+   virtual ossim_uint32 getNumberOfInputBands() const = 0;
+   
+   /**
+    * Returns the number of bands in a tile returned from this TileSource.
+    */
+   virtual ossim_uint32 getNumberOfOutputBands() const;
+
+   /**
+    * @brief Initializes bandList.
+    * 
+    * This implementation initializes to the zero based order of input bands.
+    * Derived classes that are band selectors should override.
+    *
+    * @param bandList Initialized by this.
+    */
+   virtual void getOutputBandList( std::vector<ossim_uint32>& bandList ) const;
+
+   /**
+    * This will be used to query the output pixel type of the tile source.
+    * Please ignore the argument.  It will soon be removed.
+    */
+   virtual ossimScalarType getOutputScalarType() const;
+
+   /**
+    * Returns the default processing tile width
+    */
+   virtual ossim_uint32 getTileWidth() const;
+
+   /**
+    * Returns the default processing tile height
+    */
+   virtual ossim_uint32 getTileHeight() const;
+
+   /**
+    * Each band has a null pixel associated with it.  The null pixel 
+    * represents an invalid value.
+    */ 
+   virtual double getNullPixelValue(ossim_uint32 band=0)const;
+   
+   /**
+    * Returns the min pixel of the band.
+    */
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   
+   /**
+    * Returns the max pixel of the band.
+    */
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+   
+   /**
+    * This will return the bounding rect of the source.  We can have several
+    * sources which are in a chain to modify the bounding image rect.
+    * lets say you are next to an image handler then it will return the
+    * bounding rect for that image.  If you are at the right side of a
+    * resampler then you will get a bounding rect along the image view plane.
+    * This is going to be a very import method for both image writers,
+    * mosaics or anything that needs to operate only within the bounds of an
+    * image.
+    */
+   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const;
+   
+   /**
+    * @brief Gets the bounding rectangle of the source.
+    *
+    * This default implementation calls the getBoundingRect interface that
+    * returns a rectangle.  Derived classes should override as needed.
+    * 
+    * @param rect Initialized with bounding rectangle by this.
+    * @param resLevel Reduced resolution level if applicable.
+    */
+   virtual void getBoundingRect(ossimIrect& rect,
+                                ossim_uint32 resLevel=0) const;
+   
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   /**
+    * ordering specifies how the vertices should be arranged.
+    * valid image vertices is basically the tightly fit convex hull
+    * of the image.  Usually an image has NULL values and are
+    * internally not upright rectangular.  This can cause
+    * problems some spatial filters.
+    *
+    * The default implementation is to return the bounding rect.
+    */
+   virtual void getValidImageVertices(
+      std::vector<ossimIpt>& validVertices,
+      ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER,
+      ossim_uint32 resLevel=0)const;
+
+   /**
+    * Returns the image geometry object associated with this tile source or
+    * NULL if not defined. The geometry contains full-to-local image transform
+    * as well as projection (image-to-world). Default implementation returns
+    * the image geometry object associated with the next  
+    * (left) input source (if any) connected to this source in the chain, or
+    * NULL.
+    */
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+
+   /**
+    * Default implementation sets geometry of the first input to the geometry
+    * specified.
+    */
+   virtual void setImageGeometry(const ossimImageGeometry* geom);
+       
+   /** Default method to call input's saveImageGeometry. */
+   virtual void saveImageGeometry() const;
+   
+   /** Default method to call input's saveImageGeometry. */
+   virtual void saveImageGeometry(const ossimFilename& geometry_file) const;
+   
+   virtual void initialize()=0;
+   
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+   /**
+    * @return Flag indicating the data contains pallete indexes.
+    *
+    * This should be replaced by a getPhotoInterpretation().
+    */
+   virtual bool isIndexedData() const;
+   
+protected:
+
+   ossimImageSource (const ossimImageSource& rhs);
+   const ossimImageSource& operator= (const ossimImageSource&);
+
+private:
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimImageSource_HEADER */
+
diff --git a/include/ossim/imaging/ossimImageSourceFactory.h b/ossim/include/ossim/imaging/ossimImageSourceFactory.h
similarity index 100%
rename from include/ossim/imaging/ossimImageSourceFactory.h
rename to ossim/include/ossim/imaging/ossimImageSourceFactory.h
diff --git a/include/ossim/imaging/ossimImageSourceFactoryBase.h b/ossim/include/ossim/imaging/ossimImageSourceFactoryBase.h
similarity index 100%
rename from include/ossim/imaging/ossimImageSourceFactoryBase.h
rename to ossim/include/ossim/imaging/ossimImageSourceFactoryBase.h
diff --git a/include/ossim/imaging/ossimImageSourceFactoryRegistry.h b/ossim/include/ossim/imaging/ossimImageSourceFactoryRegistry.h
similarity index 100%
rename from include/ossim/imaging/ossimImageSourceFactoryRegistry.h
rename to ossim/include/ossim/imaging/ossimImageSourceFactoryRegistry.h
diff --git a/ossim/include/ossim/imaging/ossimImageSourceFilter.h b/ossim/include/ossim/imaging/ossimImageSourceFilter.h
new file mode 100644
index 0000000..fccac4d
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageSourceFilter.h
@@ -0,0 +1,67 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+//*******************************************************************
+//  $Id: ossimImageSourceFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimImageSourceFilter_HEADER
+#define ossimImageSourceFilter_HEADER
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/base/ossimConnectableObjectListener.h>
+#include <ossim/base/ossimConnectionEvent.h>
+
+class OSSIMDLLEXPORT ossimImageSourceFilter : public ossimImageSource,
+     public ossimConnectableObjectListener
+{
+public:
+   ossimImageSourceFilter(ossimObject* owner=NULL);
+   ossimImageSourceFilter(ossimImageSource* inputSource);
+   ossimImageSourceFilter(ossimObject* owner,
+                          ossimImageSource* inputSource);
+
+   /*!
+    * Returns the input connection's output band list.
+    * If not connected calls ossimImageSource::getOutputBandList.
+    */
+   virtual void getOutputBandList(std::vector<ossim_uint32>& bandList) const;
+   
+   /*!
+    * Returns the number of bands available from the input.
+    */
+   virtual ossim_uint32 getNumberOfInputBands()const;   
+
+   virtual void initialize();
+
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+   bool canConnectMyInputTo(ossim_int32 inputIndex,
+                            const ossimConnectableObject* object)const;
+   virtual void connectInputEvent(ossimConnectionEvent& event);
+   virtual void disconnectInputEvent(ossimConnectionEvent& event);
+   virtual void propertyEvent(ossimPropertyEvent& event);
+   virtual void refreshEvent(ossimRefreshEvent& event);
+   
+
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   
+protected:
+   virtual ~ossimImageSourceFilter();
+   ossimImageSource* theInputConnection;
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimImageSourceFilter_HEADER */
+
diff --git a/include/ossim/imaging/ossimImageSourceHistogramFilter.h b/ossim/include/ossim/imaging/ossimImageSourceHistogramFilter.h
similarity index 100%
rename from include/ossim/imaging/ossimImageSourceHistogramFilter.h
rename to ossim/include/ossim/imaging/ossimImageSourceHistogramFilter.h
diff --git a/ossim/include/ossim/imaging/ossimImageSourceSequencer.h b/ossim/include/ossim/imaging/ossimImageSourceSequencer.h
new file mode 100644
index 0000000..eadc08c
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageSourceSequencer.h
@@ -0,0 +1,168 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimImageSourceSequencer.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimImageSourceSequencer_HEADER
+#define ossimImageSourceSequencer_HEADER 1
+
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimConnectableObjectListener.h>
+
+
+class OSSIMDLLEXPORT ossimImageSourceSequencer
+   :
+      public ossimImageSource,
+      public ossimConnectableObjectListener
+{
+public:
+   ossimImageSourceSequencer(ossimImageSource* inputSource=NULL,
+                             ossimObject* owner=NULL);
+
+   virtual ~ossimImageSourceSequencer();
+  /*!
+    * This will return the number of tiles within the
+    * area of interest.
+    */
+   ossim_int64 getNumberOfTiles()const;
+
+   /*!
+    * Will return the number of tiles along the
+    * x or horizontal direction.
+    */
+   ossim_int64 getNumberOfTilesHorizontal()const;
+
+   /*!
+    * Will return the number of tiles along the
+    * y or vertical direction.
+    */
+   ossim_int64 getNumberOfTilesVertical()const;
+
+   /*!
+    * This must be called.  We can only initialize this
+    * object completely if we know all connections
+    * are valid.  Some other object drives this and so the
+    * connection's initialize will be called after.  The job
+    * of this connection is to set up the sequence.  It will
+    * default to the bounding rect.  The area of interest can be
+    * set to some other rectagle (use setAreaOfInterest).
+    */
+   virtual void initialize();
+
+   /*!
+    * Will set the current area of interest.
+    */
+   virtual void setAreaOfInterest(const ossimIrect& areaOfInterest);
+
+   /*!
+    * Just returns the current area of interest.
+    */
+   const ossimIrect& getAreaOfInterest()const;
+
+   /*!
+    * Will set the internal pointers to the upperleft
+    * tile number.  To go to the next tile in the sequence
+    * just call getNextTile.
+    */
+   virtual void setToStartOfSequence();
+
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
+                                               ossim_uint32 resLevel=0);
+
+   /*!
+    * Will allow you to get the next tile in the sequence.
+    * Note the last tile returned will be an invalid
+    * ossimRefPtr<ossimImageData>.  Callers should be able to do:
+    * 
+    * ossimRefPtr<ossimImageData> id = sequencer->getNextTile();
+    * while (id.valid())
+    * {
+    *    doSomething;
+    *    id = sequencer->getNextTile();
+    * }
+    * 
+    */
+   virtual ossimRefPtr<ossimImageData> getNextTile(ossim_uint32 resLevel=0);
+
+   virtual bool getTileOrigin(ossim_int64 id, ossimIpt& origin)const;
+
+   /*!
+    * @brief Establishes a tile rect given tile ID.
+    * @param tile_id
+    * @param rect Rectangle to initialize.
+    * @return true if valid; else, false.
+    */
+   bool getTileRect(ossim_int64 tile_id, ossimIrect& rect) const;
+
+   virtual ossimRefPtr<ossimImageData> getTile(ossim_int64 id,
+                                               ossim_uint32 resLevel=0);
+
+   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
+   virtual void getDecimationFactor(ossim_uint32 resLevel,
+                                    ossimDpt& result) const;
+   virtual void getDecimationFactors(vector<ossimDpt>& decimations) const;
+   virtual ossim_uint32 getNumberOfDecimationLevels()const;
+   
+   /*!
+    * Returns the number of bands available from the input.
+    */
+   virtual ossim_uint32 getNumberOfInputBands()const;   
+
+   virtual ossimScalarType getOutputScalarType() const;
+      
+   virtual ossim_uint32 getTileWidth() const;
+   virtual ossim_uint32 getTileHeight() const;
+   
+   virtual void slaveProcessTiles();
+   virtual bool isMaster()const;
+
+   virtual ossimIpt getTileSize()const;
+   virtual void setTileSize(const ossimIpt& tileSize);
+   virtual void setTileSize(ossim_int32 width, ossim_int32 height);
+   
+   virtual void connectInputEvent(ossimConnectionEvent& event);
+   virtual void disconnectInputEvent(ossimConnectionEvent& event);
+   
+   virtual bool canConnectMyInputTo(ossim_int32 inputIndex,
+                                    const ossimConnectableObject* object)const;
+   
+   virtual double getNullPixelValue(ossim_uint32 band=0)const;
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+   
+protected:
+   ossimImageSource*  theInputConnection;
+   ossimRefPtr<ossimImageData> theBlankTile;
+   /*!
+    * Is the area of interest.  The default will
+    * 
+    */
+   ossimIrect theAreaOfInterest;
+
+   /*!
+    * Called during initialize.
+    */
+   ossimIpt theTileSize;
+
+   //---
+   // These need to be big(64 bit) for high resolution tile servers. Made
+   // signed for ease of going to/from ipt and irect which are both signed.
+   //---
+   ossim_int64 theNumberOfTilesHorizontal;
+   ossim_int64 theNumberOfTilesVertical;
+   ossim_int64 theCurrentTileNumber;
+
+   virtual void updateTileDimensions();
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/imaging/ossimImageStatisticsSource.h b/ossim/include/ossim/imaging/ossimImageStatisticsSource.h
similarity index 100%
rename from include/ossim/imaging/ossimImageStatisticsSource.h
rename to ossim/include/ossim/imaging/ossimImageStatisticsSource.h
diff --git a/ossim/include/ossim/imaging/ossimImageToPlaneNormalFilter.h b/ossim/include/ossim/imaging/ossimImageToPlaneNormalFilter.h
new file mode 100644
index 0000000..e1b87f4
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageToPlaneNormalFilter.h
@@ -0,0 +1,75 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimImageToPlaneNormalFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimImageToPlaneNormalFilter_HEADER
+#define ossimImageToPlaneNormalFilter_HEADER
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+class OSSIMDLLEXPORT ossimImageToPlaneNormalFilter : public ossimImageSourceFilter
+{
+public:
+   ossimImageToPlaneNormalFilter();
+   ossimImageToPlaneNormalFilter(ossimImageSource* inputSource);
+
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+   
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+
+   virtual ossimScalarType getOutputScalarType() const;
+   virtual ossim_uint32    getNumberOfOutputBands() const;
+   
+   void setXScale(const double& scale);
+   void setYScale(const double& scale);
+   
+   double getXScale()const;
+   double getYScale()const;
+
+   void setTrackScaleFlag(bool flag);
+   bool getTrackScaleFlag()const;
+   
+   void   setSmoothnessFactor(double value);
+   double getSmoothnessFactor()const;
+   
+   bool loadState(const ossimKeywordlist& kwl,
+                  const char* prefix);
+   bool saveState(ossimKeywordlist& kwl,
+                  const char* prefix)const;
+   virtual void initialize();
+   /* ------------------- PROPERTY INTERFACE -------------------- */
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   /* ------------------ PROPERTY INTERFACE END ------------------- */
+   
+protected:
+   ossimRefPtr<ossimImageData> theTile;
+   ossimRefPtr<ossimImageData> theBlankTile;
+   ossimIrect      theInputBounds;
+   bool            theTrackScaleFlag;
+   double          theXScale;
+   double          theYScale;
+   double          theSmoothnessFactor;
+   
+   void initializeTile();
+   virtual void computeNormals(ossimRefPtr<ossimImageData>& inputTile,
+                               ossimRefPtr<ossimImageData>& outputTile);
+
+   template <class T>
+   void computeNormalsTemplate(T inputScalarTypeDummy,
+                               ossimRefPtr<ossimImageData>& inputTile,
+                               ossimRefPtr<ossimImageData>& outputTile);
+TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/imaging/ossimImageWriter.h b/ossim/include/ossim/imaging/ossimImageWriter.h
similarity index 100%
rename from include/ossim/imaging/ossimImageWriter.h
rename to ossim/include/ossim/imaging/ossimImageWriter.h
diff --git a/ossim/include/ossim/imaging/ossimImageWriterFactory.h b/ossim/include/ossim/imaging/ossimImageWriterFactory.h
new file mode 100644
index 0000000..db15034
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageWriterFactory.h
@@ -0,0 +1,64 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Frank Warmerdam (warmerda at home.com)
+//
+//*******************************************************************
+//  $Id: ossimImageWriterFactory.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimImageWriterFactory_HEADER
+#define ossimImageWriterFactory_HEADER
+#include <ossim/imaging/ossimImageWriterFactoryBase.h>
+
+class ossimImageWriter;
+class ossimKeywordlist;
+
+class ossimImageWriterFactory: public ossimImageWriterFactoryBase
+{   
+public:
+   virtual ~ossimImageWriterFactory();
+   static ossimImageWriterFactory* instance();
+   
+   ossimImageFileWriter *createWriterFromExtension(const ossimString& fileExtension)const;
+   virtual ossimImageFileWriter* createWriter(const ossimKeywordlist& kwl,
+                                              const char *prefix=0)const;
+   virtual ossimImageFileWriter* createWriter(const ossimString& typeName)const;
+   
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
+                                     const char *prefix=0)const;
+   virtual ossimObject* createObject(const ossimString& typeName)const;
+   
+   virtual void getExtensions(std::vector<ossimString>& result)const;
+   
+   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
+   
+   /*!
+    * getImageTypeList.  This is the actual image type name.  So for
+    * example, ossimTiffWriter has several image types.  Some of these
+    * include TIFF_TILED, TIFF_TILED_BAND_SEPARATE ... etc.  The
+    * ossimGdalWriter
+    * may include GDAL_IMAGINE_HFA, GDAL_RGB_NITF, GDAL_JPEG20000, ... etc
+    * A writer should be able to be instantiated by this name as well as a
+    * class name
+    */
+   virtual void getImageTypeList(std::vector<ossimString>& imageTypeList)const;
+   
+   virtual void getImageFileWritersBySuffix(ossimImageWriterFactoryBase::ImageFileWriterList& result,
+                                            const ossimString& ext)const;
+   virtual void getImageFileWritersByMimeType(ossimImageWriterFactoryBase::ImageFileWriterList& result,
+                                              const ossimString& mimeType)const;
+protected:
+   ossimImageWriterFactory() {}
+
+   static ossimImageWriterFactory* theInstance;
+
+	ossimImageFileWriter* createFromMimeType(const ossimString& mimeType)const;
+   bool isImageTypeName(const ossimString& name)const;
+};
+
+#endif
+
diff --git a/include/ossim/imaging/ossimImageWriterFactoryBase.h b/ossim/include/ossim/imaging/ossimImageWriterFactoryBase.h
similarity index 100%
rename from include/ossim/imaging/ossimImageWriterFactoryBase.h
rename to ossim/include/ossim/imaging/ossimImageWriterFactoryBase.h
diff --git a/ossim/include/ossim/imaging/ossimImageWriterFactoryRegistry.h b/ossim/include/ossim/imaging/ossimImageWriterFactoryRegistry.h
new file mode 100644
index 0000000..891a37a
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimImageWriterFactoryRegistry.h
@@ -0,0 +1,90 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Frank Warmerdam (warmerda at home.com)
+//
+//*******************************************************************
+//  $Id: ossimImageWriterFactoryRegistry.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimImageWriterFactoryRegistry_HEADER
+#define ossimImageWriterFactoryRegistry_HEADER
+#include <ossim/base/ossimObjectFactory.h>
+#include <ossim/imaging/ossimImageWriterFactoryBase.h>
+#include <ossim/base/ossimFactoryListInterface.h>
+#include <vector>
+#include <iosfwd>
+
+class ossimImageFileWriter;
+class ossimKeywordlist;
+
+class OSSIMDLLEXPORT ossimImageWriterFactoryRegistry :
+   public ossimObjectFactory,
+   public ossimFactoryListInterface<ossimImageWriterFactoryBase, ossimImageFileWriter>
+{   
+public:
+   static ossimImageWriterFactoryRegistry* instance();
+
+   ossimImageFileWriter *createWriter(const ossimFilename& filename)const;
+   ossimImageFileWriter *createWriterFromExtension(const ossimString& fileExtension)const;
+   ossimImageFileWriter *createWriter(const ossimKeywordlist &kwl,
+                                      const char *prefix=0)const;
+   ossimImageFileWriter* createWriter(const ossimString& typeName)const;
+   
+   ossimObject* createObject(const ossimKeywordlist &kwl,
+                             const char *prefix=0)const;
+
+   ossimObject* createObject(const ossimString& typeName)const;
+   
+   /**
+    * getTypeNameList.  This should return the class type of the object being
+    * used to perform the writting.
+    */
+   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
+   
+   /**
+    * getImageTypeList.  This is the actual image type name.  So for
+    * example, ossimTiffWriter has several image types.  Some of these
+    * include TIFF_TILED, TIFF_TILED_BAND_SEPARATE ... etc.
+    * The ossimGdalWriter
+    * may include GDAL_IMAGINE_HFA, GDAL_RGB_NITF, GDAL_JPEG20000, ... etc
+    * A writer should be able to be instantiated by this name as well as a
+    * class name
+    */
+   virtual void getImageTypeList(std::vector<ossimString>& imageTypeList)const;
+
+   virtual void getImageFileWritersBySuffix(ossimImageWriterFactoryBase::ImageFileWriterList& result,
+                                            const ossimString& ext)const;
+   virtual void getImageFileWritersByMimeType(ossimImageWriterFactoryBase::ImageFileWriterList& result,
+                                              const ossimString& mimeType)const;
+   /**
+    * @brief Prints list of writers from getImageTypeList.
+    * @param  out Stream to print to.
+    * @return std::ostream&
+    */
+   std::ostream& printImageTypeList(std::ostream& out)const;
+
+   /**
+    * @brief Prints list of writers from getImageTypeList.
+    * @param  out Stream to print to.
+    * @return std::ostream&
+    */
+   std::ostream& printWriterProps(std::ostream& out)const;
+   
+protected:
+   ossimImageWriterFactoryRegistry();
+   ossimImageWriterFactoryRegistry(const ossimImageWriterFactoryRegistry&);
+   void operator=(const ossimImageWriterFactoryRegistry&);
+   
+   //static ossimImageWriterFactoryRegistry*    theInstance;
+};
+
+extern "C"
+{
+  OSSIMDLLEXPORT void* ossimImageWriterFactoryRegistryGetInstance();
+}
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimIndexToRgbLutFilter.h b/ossim/include/ossim/imaging/ossimIndexToRgbLutFilter.h
new file mode 100644
index 0000000..64fc80f
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimIndexToRgbLutFilter.h
@@ -0,0 +1,176 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Oscar Kramer
+//
+//*************************************************************************
+// $Id: ossimIndexToRgbLutFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimIndexToRgbLutFilter_HEADER
+#define ossimIndexToRgbLutFilter_HEADER
+
+#include <ossim/base/ossimRgbVector.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/imaging/ossimImageSourceFilter.h>
+#include <vector>
+
+class ossimImageData;
+
+/***************************************************************************************************
+ *
+ * This class provides a look-up-table remap from a single band input (the index), to a 3-band RGB
+ * output. The LUT is provided as a KWL with several remapping modes supported:
+ *
+ * Literal: Only those indices represented in the KWL are remapped to the values indicated. All
+ * other pixel values are mapped to the NULL pixel (0,0,0). Note that this is only meaningful for
+ * integer input scalar types since a normalized input will likely not find an exact match.
+ *
+ * Arbitrary piecewise linear ("vertices"): The LUT KWL provides vertices to contiguous line
+ * segments. Pixel values falling between specified indices are linearly interpolated between
+ * adjacent vertices. Any index pixel values falling outside the range between min and max vertex
+ * indices will be mapped to the NULL pixel.
+ *
+ * Regular piecewise linear ("regular"): The entries in the KWL do not correspond to any specific
+ * index (except the first and the last entries that correspond to the min and max pixel values).
+ * Remaining intermediate entries are equally spaced in index space so that the line segments are of
+ * equal length. The min and max values are queried from the input source, but can be overriden with
+ * the "min_value" and "max_value" keywords in the LUT KWL.
+ *
+ * Here are example KWLs for the three modes, first for the literal remap:
+ *
+ *    type: ossimIndexToRgbLutFilter
+ *    mode: literal
+ *    entry0.index: 0
+ *    entry0.color: 1 1 1
+ *    entry1.index: 128
+ *    entry1.color: 255 0 0
+ *    entry2.index: 255
+ *    entry2.color: 0 255 0
+ *
+ * The above KWL will map only pixels with input values of 0, 128, and 255. All other indices will
+ * map to the null value.
+ *
+ * Example for arbitrary piecewise linear:
+ *
+ *    type: ossimIndexToRgbLutFilter
+ *    mode: vertices
+ *    entry0.index: 1
+ *    entry0.color: 0 0 255
+ *    entry1.index: 128
+ *    entry1.color: 0 255 0
+ *    entry2.index: 250
+ *    entry2.color: 255 0 0
+ *
+ * The above KWL is a sort of heat map where indices between 1 and 128 will linearly map from blue
+ * to green, and then 128 to 250 will map from green (through yellow) to red. Note that any value
+ * above 250 as well as 0 are outside of the remap range and will map to the null pixel (0,0,0).
+ *
+ * Example or regular piecewise linear. This is the default mode. For backward compatibility, the
+ * mode keyword here is optional and if omitted will imply this mode. Also, unlike previous form,
+ * the number_of_entries keyword is not required and is ignored if present.
+ *
+ *    type: ossimIndexToRgbLutFilter
+ *    mode: regular
+ *    entry0: 0 0 255
+ *    entry1: 0 255 0
+ *    entry2: 255 0 0
+ *    max_value:  250
+ *    min_value:  1
+ *
+ * The above KWL is almost equivalent to the "vertices" example above, i.e., a heat map. However,
+ * the individual vertices are not specified. Instead, three entries will define two line segments.
+ * The first line segment will commence with index 1 (min_value) and finish at:
+ *
+ *    [(max_value-min_value)/(number_of_entries-1)] + min_value
+ *
+ * In this case it will be 125.5. The quantity in square-brackets (124.5) is the interval, or
+ * length of each line segment, so the second line segment will go from 125.5 to 250. Input pixel
+ * values below the min_value will clamp to the min value (except the null pixel) and those above
+ * the max value will clamp to the max value.
+ *
+ * The table can be contained in a separate file from the main KWL state file. In this case, the
+ * loadState can accept a file name in place of a complete table:
+ *
+ *    type: ossimIndexToRgbLutFilter
+ *    lut_file: <path to LUT KWL file>
+ * 
+ * The format of the LUT KWL file is just as specified above for the inline case.
+ *
+ **************************************************************************************************/
+class OSSIM_DLL ossimIndexToRgbLutFilter : public ossimImageSourceFilter
+{
+public:
+   enum Mode  { LITERAL = 0, VERTICES  = 1, REGULAR = 2 };
+
+   ossimIndexToRgbLutFilter();
+
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
+                                               ossim_uint32 resLevel=0);
+   
+   ossim_uint32 getNumberOfOutputBands() const;
+   
+   virtual ossimScalarType getOutputScalarType() const;
+   
+   void           setMode(Mode mode) { theMode = mode; }
+   Mode           getMode() const { return theMode; }
+
+   /**
+    * @brief Set lookup table(lut) method.
+    *
+    * This opens the keyword list and initializes lut.
+    *
+    * CAUTION: Requires theMinValue, theMaxValue, and theMode to be set.  Typically a
+    * connection is made prior to this call.  If not connected to an input, "min",
+    * "max" and "mode" keywords should be passed in the keyword list file.
+    *
+    * @param file Keyword list containing lut.
+    */
+   void           setLut(const ossimFilename& file);
+   
+   double         getMinValue()const;
+   double         getMaxValue()const;
+   
+   void           setMinValue(double value);
+   void           setMaxValue(double value);
+   
+   virtual double getNullPixelValue(ossim_uint32 band=0)const;
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+
+   virtual void initialize();
+
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=NULL)const;
+
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=NULL);
+
+protected:
+   virtual ~ossimIndexToRgbLutFilter();
+
+   /**
+    * Called on first getTile, will initialize all data needed.
+    */
+   void allocate();
+   bool initializeLut(const ossimKeywordlist* kwl, const char* prefix=0);
+   
+   std::map<double, ossimRgbVector> theLut;
+
+   double theMinValue;
+   double theMaxValue;
+   bool   theMinValueOverride;
+   bool   theMaxValueOverride;
+   Mode   theMode;
+   ossimRefPtr<ossimImageData> theTile;
+   ossimFilename   theLutFile;
+   
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimIndexToRgbLutFilter_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimIntensityAdjustmentFilter.h b/ossim/include/ossim/imaging/ossimIntensityAdjustmentFilter.h
new file mode 100644
index 0000000..ab0dbf3
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimIntensityAdjustmentFilter.h
@@ -0,0 +1,75 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+// $Id: ossimIntensityAdjustmentFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimIntensityAdjustmentFilter_HEADER
+#define ossimIntensityAdjustmentFilter_HEADER
+#include <ossim/imaging/ossimImageSourceFilter.h>
+#include <ossim/base/ossimDblGrid.h>
+
+class ossimIntensityAdjustmentFilter : public ossimImageSourceFilter
+{
+public:
+   ossimIntensityAdjustmentFilter();
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
+                                               ossim_uint32 resLevel=0);
+
+   const ossimIrect& getGridBounds()const
+      {
+         return theGridBounds;
+      }
+   virtual void setIntensityGrid(const ossimDblGrid& grid)
+      {
+         theMeanIntensityGrid = grid;
+      }
+   void setMeanIntensityTarget(double targetMean)
+      {
+         theMeanIntensityTarget = targetMean;
+      }
+   double getMeanIntensityTarget()const
+      {
+         return theMeanIntensityTarget;
+      }
+   ossimDblGrid& getMeanIntensityGrid()
+      {
+         return theMeanIntensityGrid;
+      }
+   const ossimDblGrid& getMeanIntensityGrid()const
+      {
+         return theMeanIntensityGrid;
+      }
+   void createAndPopulateGrid(const ossimIpt& spacing, double targetMean = .5);
+   
+   virtual void initialize();
+protected:
+   virtual ~ossimIntensityAdjustmentFilter();
+
+   virtual void allocate();
+   
+   ossimDblGrid                theMeanIntensityGrid;
+   double                      theMeanIntensityTarget;
+   ossimRefPtr<ossimImageData> theNormTile;
+   ossimRefPtr<ossimImageData> theTile;
+   ossimRefPtr<ossimImageData> theBlankTile;
+
+   ossimIrect   theGridBounds;
+
+   double computeMeanIntensity(ossimRefPtr<ossimImageData>& data);
+   void loadNormTile(ossimRefPtr<ossimImageData>& data);
+   double matchTargetMean(double inputValue,
+                          double meanValue,
+                          double targetMean,
+                          double minValue,
+                          double maxValue);
+   
+TYPE_DATA
+};
+#endif
+
diff --git a/include/ossim/imaging/ossimIso8211.h b/ossim/include/ossim/imaging/ossimIso8211.h
similarity index 100%
rename from include/ossim/imaging/ossimIso8211.h
rename to ossim/include/ossim/imaging/ossimIso8211.h
diff --git a/ossim/include/ossim/imaging/ossimJpegCodec.h b/ossim/include/ossim/imaging/ossimJpegCodec.h
new file mode 100644
index 0000000..58bed4b
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimJpegCodec.h
@@ -0,0 +1,134 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: class declaration for base codec(encoder/decoder).
+// 
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossimJpegCodec_HEADER
+#define ossimJpegCodec_HEADER 1
+#include <ossim/imaging/ossimCodecBase.h>
+
+class OSSIM_DLL ossimJpegCodec : public ossimCodecBase
+{
+public:
+   
+   ossimJpegCodec();
+   virtual ~ossimJpegCodec();
+
+   /**
+    * @return Codec type.  "jpeg"
+    */  
+   virtual ossimString getCodecType()const;
+   
+   /**
+    * @brief Encode jpeg method.
+    *
+    * Current options handled by this factory:
+    *
+    * type: jpeg
+    * quality: 75
+    *
+    * @param in Input data to encode.
+    * 
+    * @param out Encoded output data.
+    *
+    * @return true on success, false on failure.
+    */   
+   virtual bool encode( const ossimRefPtr<ossimImageData>& in,
+                        std::vector<ossim_uint8>& out ) const;
+
+   /**
+    * @brief Decode jpeg method.
+    *
+    * @param in Input data to decode.
+    * 
+    * @param out Output tile.  If the pointer to ossimImageData is null
+    * internally it will be created.  For code loops it is better to pre
+    * initialized to correct size.
+    *
+    * @note Caller should set "out's" image rectangle upon successful
+    * decode.
+    *
+    * @return true on success, false on failure.
+    */
+   virtual bool decode( const std::vector<ossim_uint8>& in,
+                        ossimRefPtr<ossimImageData>& out ) const;
+
+   /**
+    * Ineterface to allow for specific properties to be set.
+    *
+    */ 
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   
+   /**
+    * Interface to get the value of a specific property
+    *
+    * @param in name.  Property name to retrieve
+    *
+    * @return property value
+    */
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const; 
+   
+   /**
+    * Get a list of all supported property names.  Currently only "quality" property 
+    * is exposed
+    *
+    * @param out proeprtyNames.  push the list of proeprty names to the list
+    */
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   
+   /**
+    * Allocate the state of the object thorugh a factory load/keywordlist
+    *
+    * @param in kwl. Input keywordlist that holds the values.
+    *
+    * @param in prefix. prefix to use for all keywords.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+   
+   /**
+    * Save the state of the codec to the keywordlist
+    *
+    * @param out kwl. Input keywordlist that holds the values.
+    *
+    * @param in prefix. prefix to use for all keywords.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
+   
+protected:
+
+   /**
+    * @brief For decoding standard jpeg block.
+    * Curently only handles CMYK.
+    * @param in Input jpeg buffer.
+    * @param out Initialized by this.
+    * @return true on success, false on error.
+    */
+   bool decodeJpeg(const std::vector<ossim_uint8>& in,
+                   ossimRefPtr<ossimImageData>& out ) const;
+   
+   /**
+    * @brief For decoding color spaces other that mono and rgb.
+    * Curently only handles CMYK.
+    * @param in Input jpeg buffer.
+    * @param out Initialized by this.
+    * @return true on success, false on error.
+    */
+   bool decodeJpegToRgb(const std::vector<ossim_uint8>& in,
+                        ossimRefPtr<ossimImageData>& out ) const;
+
+   /**
+    * @return The enumerated libjpeg out_color_space.
+    */
+   ossim_int32 getColorSpace( const std::vector<ossim_uint8>& in ) const;
+   
+   ossim_uint32 m_quality;
+   TYPE_DATA;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimJpegDefaultTable.h b/ossim/include/ossim/imaging/ossimJpegDefaultTable.h
new file mode 100644
index 0000000..3ebe557
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimJpegDefaultTable.h
@@ -0,0 +1,163 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Mingjie Su
+// 
+// Description: Default JPEG Huffman tables. Values from: MIL-STD-188-198, APPENDIX B
+//              Default JPEG quantization tables. Values from: MIL-STD-188-198, APPENDIX A
+//
+//********************************************************************
+// $Id: ossimJpegDefaultTable.h 958 2010-06-03 23:00:32Z ming.su $
+
+#ifndef ossimJpegDefaultTable_HEADER
+#define ossimJpegDefaultTable_HEADER
+
+static const int AC_BITS[16] = 
+{
+  0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125
+};
+
+static const int DC_BITS[16] = 
+{
+  0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0
+};
+
+static const int AC_HUFFVAL[256] =
+{
+  0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12,          
+  0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07,
+  0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xA1, 0x08,
+  0x23, 0x42, 0xB1, 0xC1, 0x15, 0x52, 0xD1, 0xF0,
+  0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0A, 0x16,
+  0x17, 0x18, 0x19, 0x1A, 0x25, 0x26, 0x27, 0x28,
+  0x29, 0x2A, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
+  0x3A, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
+  0x4A, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
+  0x5A, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
+  0x6A, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
+  0x7A, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,
+  0x8A, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98,
+  0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7,
+  0xA8, 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6,
+  0xB7, 0xB8, 0xB9, 0xBA, 0xC2, 0xC3, 0xC4, 0xC5,
+  0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xD2, 0xD3, 0xD4,
+  0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE1, 0xE2,
+  0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA,
+  0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8,
+  0xF9, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static const int DC_HUFFVAL[256] =
+{
+  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+  0x08, 0x09, 0x0A, 0x0B, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+const static int Q1table[64] = 
+{
+  8,    72,  72,  72,  72,  72,  72,  72, // 0 - 7
+  72,   72,  78,  74,  76,  74,  78,  89, // 8 - 15
+  81,   84,  84,  81,  89, 106,  93,  94, // 16 - 23
+  99,   94,  93, 106, 129, 111, 108, 116, // 24 - 31
+  116, 108, 111, 129, 135, 128, 136, 145, // 32 - 39
+  136, 128, 135, 155, 160, 177, 177, 160, // 40 - 47
+  155, 193, 213, 228, 213, 193, 255, 255, // 48 - 55
+  255, 255, 255, 255, 255, 255, 255, 255  // 56 - 63
+};
+
+const static int Q2table[64] = 
+{ 
+  8,   36,  36,  36,  36,  36,  36,  36, // 0 - 7
+  36,   36,  39,  37,  38,  37,  39,  45, // 8 - 15
+  41,   42,  42,  41,  45,  53,  47,  47, // 16 -23
+  50,   47,  47,  53,  65,  56,  54,  59, // 24 - 31
+  59,   54,  56,  65,  68,  64,  69,  73, // 32 - 39
+  69,   64,  68,  78,  81,  89,  89,  81, // 40 - 47
+  78,   98, 108, 115, 108,  98, 130, 144, // 48 - 55
+  144, 130, 178, 190, 178, 243, 243, 255  // 56 - 63
+};
+
+const static int Q3table[64] = 
+{ 
+  8,  10, 10, 10, 10, 10, 10, 10,  // 0 - 7
+  10, 10, 11, 10, 11, 10, 11, 13,  // 8 - 15
+  11, 12, 12, 11, 13, 15, 13, 13,  // 16 - 23
+  14, 13, 13, 15, 18, 16, 15, 16,  // 24 - 31
+  16, 15, 16, 18, 19, 18, 19, 21,  // 32 - 39
+  19, 18, 19, 22, 23, 25, 25, 23,  // 40 - 47
+  22, 27, 30, 32, 30, 27, 36, 40,  // 48 - 56
+  40, 36, 50, 53, 50, 68, 68, 91   // 57 - 63
+};
+
+const static int Q4table[64] = 
+{
+  8,   7,  7,  7,  7,  7,  7,  7, // 0 - 7
+  7,   7,  8,  7,  8,  7,  8,  9, // 8 - 15
+  8,   8,  8,  8,  9, 11,  9,  9, // 16 - 23
+  10,  9,  9, 11, 13, 11, 11, 12, // 24 - 31
+  12, 11, 11, 13, 14, 13, 14, 15, // 32 - 39
+  14, 13, 14, 16, 16, 18, 18, 16, // 40 - 47
+  16, 20, 22, 23, 22, 20, 26, 29, // 48 - 55
+  29, 26, 36, 38, 36, 49, 49, 65  // 56 - 63
+};
+
+const static int Q5table[64] = 
+{
+  4,   4,  4,  4,  4,  4,  4,  4, // 0 - 7
+  4,   4,  4,  4,  4,  4,  4,  5, // 8 - 15
+  5,   5,  5,  5,  5,  6,  5,  5, // 16 - 23
+  6,   5,  5,  6,  7,  6,  6,  6, // 24 - 31
+  6,   6,  6,  7,  8,  7,  8,  8, // 32 - 39
+  8,   7,  8,  9,  9, 10, 10,  9, // 40 - 47
+  9,  11, 12, 13, 12, 11, 14, 16, // 48 - 55
+  16, 14, 20, 21, 20, 27, 27, 36  // 56 - 63
+};
+
+const static int* QTABLE_ARRAY[5]={Q1table,Q2table,Q3table,Q4table,Q5table};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimJpegMemDest.h b/ossim/include/ossim/imaging/ossimJpegMemDest.h
new file mode 100644
index 0000000..20c54bc
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimJpegMemDest.h
@@ -0,0 +1,36 @@
+//----------------------------------------------------------------------------
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Oscar Kramer, original code from Thomas G. Lane
+//
+// Most of code and comments below are from jpeg-6b "example.c" file. See 
+// http://www4.cs.fau.de/Services/Doc/graphics/doc/jpeg/libjpeg.html
+//
+// Description:
+// Code interfaces to use with jpeg-6b library to write a jpeg image from memory.
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossimJpegMemDest_HEADER
+#define ossimJpegMemDest_HEADER 1
+
+#include <ostream>                     /** for std::ostream */
+#include <ossim/base/ossimConstants.h> /** for OSSIM_DLL export macro */
+#include <cstdio>                      /** for size_t  */
+#include <csetjmp>                     /** for jmp_buf */
+extern "C"
+{
+#if defined(_MSC_VER) || defined(__MINGW32__)
+#  ifndef XMD_H
+#    define XMD_H
+#  endif
+#endif
+#include <jpeglib.h> /** for jpeg stuff */
+}
+
+/**
+ * @brief Method which uses memory instead of a FILE* to write to.
+ * @note Used in place of "jpeg_stdio_dest(&cinfo, outfile)".
+ */
+OSSIM_DLL void jpeg_cpp_stream_dest (j_compress_ptr cinfo, std::ostream& stream);
+
+#endif 
diff --git a/ossim/include/ossim/imaging/ossimJpegMemSrc.h b/ossim/include/ossim/imaging/ossimJpegMemSrc.h
new file mode 100644
index 0000000..ea56b1c
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimJpegMemSrc.h
@@ -0,0 +1,43 @@
+//----------------------------------------------------------------------------
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Burken, original code from Thomas G. Lane
+//
+// Description:
+// Code interfaces to use with jpeg-6b library to read a jpeg image from
+// memory.
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossimJpegMemSrc_HEADER
+#define ossimJpegMemSrc_HEADER 1
+
+#include <ossim/base/ossimConstants.h> /** for OSSIM_DLL export macro */
+extern "C"
+{
+#include <cstdio>                      /** for size_t  */
+#include <csetjmp>                     /** for jmp_buf */
+#include <jpeglib.h>                   /** for jpeg stuff */
+
+
+/** @brief Extended error handler struct. */
+struct OSSIM_DLL ossimJpegErrorMgr
+{
+  struct jpeg_error_mgr pub;	/* "public" fields */
+  jmp_buf setjmp_buffer;	/* for return to caller */
+};
+typedef struct ossimJpegErrorMgr* ossimJpegErrorPtr;
+
+/**
+ * @brief Error routine that will replace jpeg's standard error_exit method.
+ */
+OSSIM_DLL void ossimJpegErrorExit (j_common_ptr cinfo);
+
+/**
+ * @brief Method which uses memory instead of a FILE* to read from.
+ * @note Used in place of "jpeg_stdio_src(&cinfo, infile)".
+ */
+OSSIM_DLL void ossimJpegMemorySrc (j_decompress_ptr cinfo,
+                                   const JOCTET * buffer,
+                                   std::size_t bufsize);
+}
+#endif /* #ifndef ossimJpegMemSrc_HEADER */
diff --git a/include/ossim/imaging/ossimJpegStdIOSrc.h b/ossim/include/ossim/imaging/ossimJpegStdIOSrc.h
similarity index 100%
rename from include/ossim/imaging/ossimJpegStdIOSrc.h
rename to ossim/include/ossim/imaging/ossimJpegStdIOSrc.h
diff --git a/ossim/include/ossim/imaging/ossimJpegTileSource.h b/ossim/include/ossim/imaging/ossimJpegTileSource.h
new file mode 100644
index 0000000..bff30ae
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimJpegTileSource.h
@@ -0,0 +1,216 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Contains class declaration for JpegTileSource.
+// JpegTileSource is derived from ImageHandler which is derived from
+// TileSource.
+//*******************************************************************
+//  $Id: ossimJpegTileSource.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimJpegTileSource_HEADER
+#define ossimJpegTileSource_HEADER
+
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimAppFixedTileCache.h>
+
+class  ossimImageData;
+
+class OSSIM_DLL ossimJpegTileSource : public ossimImageHandler
+{
+public:
+
+   ossimJpegTileSource();
+
+   ossimJpegTileSource(const ossimKeywordlist& kwl,
+                       const char* prefix=0);
+
+   ossimJpegTileSource(const char* jpeg_file);
+
+
+   virtual ossimString getShortName() const;
+   virtual ossimString getLongName()  const;
+
+   /**
+    *  Returns a pointer to a tile given an origin representing the upper
+    *  left corner of the tile to grab from the image.
+    *  Satisfies pure virtual from TileSource class.
+    */
+   virtual ossimRefPtr<ossimImageData> getTile(const  ossimIrect& rect,
+                                               ossim_uint32 resLevel=0);
+
+   /**
+    * Method to get a tile.   
+    *
+    * @param result The tile to stuff.  Note The requested rectangle in full
+    * image space and bands should be set in the result tile prior to
+    * passing.  It will be an error if:
+    * result.getNumberOfBands() != this->getNumberOfOutputBands()
+    *
+    * @return true on success false on error.  If return is false, result
+    *  is undefined so caller should handle appropriately with makeBlank or
+    * whatever.
+    */
+   virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);
+
+   /**
+     *  Returns the number of bands in the image.
+     *  Satisfies pure virtual from ImageHandler class.
+     */
+   virtual ossim_uint32 getNumberOfInputBands() const;
+
+   /**
+    * Returns the number of bands in a tile returned from this TileSource.
+    * Note: we are supporting sources that can have multiple data objects.
+    * If you want to know the scalar type of an object you can pass in the
+    */
+   virtual ossim_uint32 getNumberOfOutputBands()const;
+
+   /**
+     *  Returns the number of lines in the image.
+     *  Satisfies pure virtual from ImageHandler class.
+     */
+   virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level = 0) const;
+
+   /**
+    *  Returns the number of samples in the image.
+    *  Satisfies pure virtual from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level = 0) const;
+
+   /**
+    * Returns the zero based image rectangle for the reduced resolution data
+    * set (rrds) passed in.  Note that rrds 0 is the highest resolution rrds.
+    */
+   virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level = 0) const;
+
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   /**
+    * Returns the output pixel type of the tile source.
+    */
+   virtual ossimScalarType getOutputScalarType() const;
+
+   /**
+    * Returns the width of the output tile.
+    */
+   virtual ossim_uint32    getTileWidth() const;
+
+   /**
+    * Returns the height of the output tile.
+    */
+   virtual ossim_uint32    getTileHeight() const;
+
+   /**
+    * Returns the tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileWidth which
+    * returns the output tile width which can be different than the internal
+    * image tile width on disk.
+    */
+   virtual ossim_uint32 getImageTileWidth() const;
+
+   /**
+    * Returns the tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileWidth which
+    * returns the output tile width which can be different than the internal
+    * image tile width on disk.
+    */
+   virtual ossim_uint32 getImageTileHeight() const;
+
+   bool isValidRLevel(ossim_uint32 reduced_res_level) const;
+
+
+   bool isOpen()const;
+   /**
+    *  Returns true if the image_file can be opened and is a valid tiff file.
+    */
+   bool open(const ossimFilename& jpeg_file);
+   virtual void close();
+
+   /**
+    * @brief Gets a property for matching name.
+    * @param name The name of the property to get.
+    * @return Returns property matching "name".
+    */
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   
+   /**
+    * @brief Gets a list of property names available.
+    * @param propertyNames The list to push back names to.
+    */
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+   /**
+    * Returns the image geometry object associated with this tile source or
+    * NULL if non defined.  The geometry contains full-to-local image
+    * transform as well as projection (image-to-world).
+    */
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+   
+protected:
+
+   /**
+    * @param Method to get geometry from the xml file or internal geotiff
+    * tags.
+    */
+   virtual ossimRefPtr<ossimImageGeometry> getInternalImageGeometry() const; 
+   
+   virtual ~ossimJpegTileSource();
+	class PrivateData;
+   /**
+    *  Returns true if no errors initializing object.
+    *
+    *  Notes:
+    *  - Callers of this method must ensure "theTiffPtr" data member
+    *    is initialized.
+    *  - This method was added to consolidate object initialization code
+    *    between constructor and public open method.
+    */
+   virtual bool open();
+
+   void allocate();
+   void destroy();
+   void restart();
+
+   /**
+    * @note this method assumes that setImageRectangle has been called on
+    * theTile.
+    */
+   void fillTile(const ossimIrect& clip_rect, ossimImageData* tile);
+
+   ossimRefPtr<ossimImageData>  theTile;
+   ossimRefPtr<ossimImageData>  theCacheTile;
+   ossim_uint8*                 theLineBuffer;
+   FILE*                        theFilePtr;
+   ossimIrect                   theBufferRect;
+   ossimIrect                   theImageRect;
+   ossim_uint32                 theNumberOfBands;
+   ossimIpt                     theCacheSize;
+
+   PrivateData*                 thePrivateData;
+
+   ossimAppFixedTileCache::ossimAppFixedCacheId theCacheId;
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/imaging/ossimJpegWriter.h b/ossim/include/ossim/imaging/ossimJpegWriter.h
similarity index 100%
rename from include/ossim/imaging/ossimJpegWriter.h
rename to ossim/include/ossim/imaging/ossimJpegWriter.h
diff --git a/ossim/include/ossim/imaging/ossimJpegYCbCrToRgbSource.h b/ossim/include/ossim/imaging/ossimJpegYCbCrToRgbSource.h
new file mode 100644
index 0000000..962b8ce
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimJpegYCbCrToRgbSource.h
@@ -0,0 +1,38 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimJpegYCbCrToRgbSource.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimJpegYCbCrToRgbSource_HEADER
+#define ossimJpegYCbCrToRgbSource_HEADER
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+class ossimJpegYCbCrToRgbSource : public ossimImageSourceFilter
+{
+public:
+   ossimJpegYCbCrToRgbSource();
+   ossimJpegYCbCrToRgbSource(ossimImageSource* inputSource);
+   
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
+                                               ossim_uint32 resLevel=0);
+
+   virtual void initialize();
+       
+protected:
+   virtual ~ossimJpegYCbCrToRgbSource();
+
+   virtual void allocate();
+   
+   ossimRefPtr<ossimImageData> theBlankTile;
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/imaging/ossimLandsatTileSource.h b/ossim/include/ossim/imaging/ossimLandsatTileSource.h
similarity index 100%
rename from include/ossim/imaging/ossimLandsatTileSource.h
rename to ossim/include/ossim/imaging/ossimLandsatTileSource.h
diff --git a/include/ossim/imaging/ossimLandsatTopoCorrectionFilter.h b/ossim/include/ossim/imaging/ossimLandsatTopoCorrectionFilter.h
similarity index 100%
rename from include/ossim/imaging/ossimLandsatTopoCorrectionFilter.h
rename to ossim/include/ossim/imaging/ossimLandsatTopoCorrectionFilter.h
diff --git a/include/ossim/imaging/ossimLocalCorrelationFusion.h b/ossim/include/ossim/imaging/ossimLocalCorrelationFusion.h
similarity index 100%
rename from include/ossim/imaging/ossimLocalCorrelationFusion.h
rename to ossim/include/ossim/imaging/ossimLocalCorrelationFusion.h
diff --git a/ossim/include/ossim/imaging/ossimMapCompositionSource.h b/ossim/include/ossim/imaging/ossimMapCompositionSource.h
new file mode 100644
index 0000000..423c70e
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimMapCompositionSource.h
@@ -0,0 +1,337 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimMapCompositionSource.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimMapCompositionSource_HEADER
+#define ossimMapCompositionSource_HEADER
+#include <ossim/imaging/ossimAnnotationSource.h>
+#include <ossim/base/ossimRgbVector.h>
+#include <ossim/base/ossimPolyArea2d.h>
+#include <ossim/font/ossimFont.h>
+#include <ossim/base/ossimFontInformation.h>
+
+class ossimFont;
+class ossimMapProjection;
+class ossimU8ImageData;
+
+class ossimMapCompositionSource : public ossimAnnotationSource
+{
+public:
+   enum ossimGridLineType
+   {
+      OSSIM_GRID_NONE    = 0,
+      OSSIM_GRID_LINE    = 1,
+      OSSIM_GRID_RESEAUX = 2
+   };
+
+   ossimMapCompositionSource();
+   
+   virtual ossimScalarType getOutputScalarType() const;
+   virtual ossim_uint32    getNumberOfOutputBands() const;
+   
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+
+
+   ossimIpt getViewWidthHeight()const;
+
+   void getViewWidthHeight(ossimIpt& widthHeight)const;
+   
+   void setViewWidthHeight(const ossimIpt& widthHeight);
+   
+   // all borders here
+   virtual ossim_int32 getTopBorderLength()const;
+   virtual ossim_int32 getBottomBorderLength()const;
+   virtual ossim_int32 getLeftBorderLength()const;
+   virtual ossim_int32 getRightBorderLength()const;
+
+   virtual void setTopBorderLength(ossim_int32 length);
+   virtual void setBottomBorderLength(ossim_int32 length);
+   virtual void setLeftBorderLength(ossim_int32 length);
+   virtual void setRightBorderLength(ossim_int32 length);
+
+   //all spacing here
+   void setGeographicSpacingLat(double value);
+   void setGeographicSpacingLon(double value);
+   void setMeterSpacingX(double value);
+   void setMeterSpacingY(double value);
+   void setMeterSpacing(double x, double y);
+   void setGeographicSpacing(double lat, double lon);
+
+   ossimDpt getGeographicSpacing()const;
+   ossimDpt getMeterSpacing()const;
+   
+   // All geographic formatting here
+   virtual ossimString getTopGeographicLabelFormat()const;
+   virtual ossimString getBottomGeographicLabelFormat()const;
+   virtual ossimString getLeftGeographicLabelFormat()const;
+   virtual ossimString getRightGeographicLabelFormat()const;
+
+   virtual void setGeographicLabelFormat(const ossimString format);
+   virtual void setTopGeographicLabelFormat(const ossimString& format);
+   virtual void setBottomGeographicLabelFormat(const ossimString& format);
+   virtual void setLeftGeographicLabelFormat(const ossimString& format);
+   virtual void setRightGeographicLabelFormat(const ossimString& format);
+   
+   // All font funtions here.
+   virtual ossimString    getTitle()const;
+   virtual ossimRgbVector getTitleColor()const;
+
+   virtual void setTitleFont(const ossimFontInformation& fontInfo);
+   virtual void setTitleColor(const ossimRgbVector& color);
+   virtual void setTitle(const ossimString& s);
+   virtual void setGeographicTopLabelFont(const ossimFontInformation& fontInfo);
+   virtual void setGeographicBottomLabelFont(const ossimFontInformation& fontInfo);
+   virtual void setGeographicLeftLabelFont(const ossimFontInformation& fontInfo);
+   virtual void setGeographicRightLabelFont(const ossimFontInformation& fontInfo);
+
+   virtual void setMeterTopLabelFont(const ossimFontInformation& fontInfo);
+   virtual void setMeterBottomLabelFont(const ossimFontInformation& fontInfo);
+   virtual void setMeterLeftLabelFont(const ossimFontInformation& fontInfo);
+   virtual void setMeterRightLabelFont(const ossimFontInformation& fontInfo);
+
+   virtual ossimFontInformation getTitleFont()const;
+   virtual ossimFontInformation getGeographicTopLabelFontInfo()const;
+   virtual ossimFontInformation getGeographicBottomLabelFontInfo()const;
+   virtual ossimFontInformation getGeographicLeftLabelFontInfo()const;
+   virtual ossimFontInformation getGeographicRightLabelFontInfo()const;
+   virtual ossimFontInformation getMeterTopLabelFontInfo()const;
+   virtual ossimFontInformation getMeterBottomLabelFontInfo()const;
+   virtual ossimFontInformation getMeterLeftLabelFontInfo()const;
+   virtual ossimFontInformation getMeterRightLabelFontInfo()const;
+
+   // All color funtions here
+   virtual ossimRgbVector getBorderColor()const;
+   virtual void setBorderColor(const ossimRgbVector& color);
+
+   virtual ossimRgbVector getGeographicGridColor()const;
+   virtual ossimRgbVector getMeterGridColor()const;
+   virtual ossimRgbVector getTopGeographicLabelColor()const;
+   virtual ossimRgbVector getBottomGeographicLabelColor()const;
+   virtual ossimRgbVector getLeftGeographicLabelColor()const;
+   virtual ossimRgbVector getRightGeographicLabelColor()const;
+
+   virtual void setGeographicGridColor(const ossimRgbVector& color);
+   virtual void setTopGeographicLabelColor(const ossimRgbVector& color);
+   virtual void setBottomGeographicLabelColor(const ossimRgbVector& color);
+   virtual void setLeftGeographicLabelColor(const ossimRgbVector& color);
+   virtual void setRightGeographicLabelColor(const ossimRgbVector& color);
+   virtual void setGeographicLabelColor(const ossimRgbVector& color);
+
+   virtual ossimRgbVector getTopMeterLabelColor()const;
+   virtual ossimRgbVector getBottomMeterLabelColor()const;
+   virtual ossimRgbVector getLeftMeterLabelColor()const;
+   virtual ossimRgbVector getRightMeterLabelColor()const;
+   
+   virtual void setTopMeterLabelColor(const ossimRgbVector& color);
+   virtual void setBottomMeterLabelColor(const ossimRgbVector& color);
+   virtual void setLeftMeterLabelColor(const ossimRgbVector& color);
+   virtual void setRightMeterLabelColor(const ossimRgbVector& color);
+   virtual void setMeterLabelColor(const ossimRgbVector& color);
+   virtual void setMeterGridColor(const ossimRgbVector& color);
+
+   // All grid types here
+   virtual void setMeterGridType(ossimGridLineType gridType);
+   virtual void setGeographicGridType(ossimGridLineType gridType);
+   virtual void setBorderColor(ossimRgbVector& color);
+
+   virtual ossimGridLineType getGeographicGridType()const;
+   virtual ossimGridLineType getMeterGridType()const;
+   
+   // all grid flags here
+   void setGeographicTickMarkFlag(bool flag);
+   void setTopGeographicTickMarkFlag(bool flag);
+   void setBottomGeographicTickMarkFlag(bool flag);
+   void setLeftGeographicTickMarkFlag(bool flag);
+   void setRightGeographicTickMarkFlag(bool flag);
+   void setTopGeographicLabelFlag(bool flag);
+   void setBottomGeographicLabelFlag(bool flag);
+   void setLeftGeographicLabelFlag(bool flag);
+   void setRightGeographicLabelFlag(bool flag);
+
+   virtual bool getTopGeographicTickMarkFlag()const;
+   virtual bool getBottomGeographicTickMarkFlag()const;
+   virtual bool getLeftGeographicTickMarkFlag()const;
+   virtual bool getRightGeographicTickMarkFlag()const;
+   virtual bool getTopGeographicLabelFlag()const;
+   virtual bool getBottomGeographicLabelFlag()const;
+   virtual bool getLeftGeographicLabelFlag()const;
+   virtual bool getRightGeographicLabelFlag()const;
+
+   void setMeterTickMarkFlag(bool flag);
+   virtual void setTopMeterTickMarkFlag(bool flag);
+   virtual void setBottomMeterTickMarkFlag(bool flag);
+   virtual void setLeftMeterTickMarkFlag(bool flag);
+   virtual void setRightMeterTickMarkFlag(bool flag);
+   virtual void setTopMeterLabelFlag(bool flag);
+   virtual void setBottomMeterLabelFlag(bool flag);
+   virtual void setLeftMeterLabelFlag(bool flag);
+   virtual void setRightMeterLabelFlag(bool flag);
+   
+   virtual bool getTopMeterTickMarkFlag()const;
+   virtual bool getBottomMeterTickMarkFlag()const;
+   virtual bool getLeftMeterTickMarkFlag()const;
+   virtual bool getRightMeterTickMarkFlag()const;
+   virtual bool getTopMeterLabelFlag()const;
+   virtual bool getBottomMeterLabelFlag()const;
+   virtual bool getLeftMeterLabelFlag()const;
+   virtual bool getRightMeterLabelFlag()const;
+   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
+
+   virtual void initialize();
+
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+
+protected:
+   virtual ~ossimMapCompositionSource();
+   ossimIpt            theViewWidthHeight;
+   ossimGridLineType   theMeterGridType;
+   ossimGridLineType   theGeographicGridType;
+   
+   ossim_uint32        theTopBorderLength;
+   ossim_uint32        theBottomBorderLength;
+   ossim_uint32        theLeftBorderLength;
+   ossim_uint32        theRightBorderLength;
+   
+   ossimRgbVector      theBorderColor;
+
+   ossimRgbVector      theGeographicGridColor;
+   ossimRgbVector      theMeterGridColor;
+
+   // title info
+   //
+   ossimString          theTitleString;
+   ossimRefPtr<ossimFont>           theTitleFont;
+   ossimFontInformation theTitleFontInfo;
+   ossimRgbVector       theTitleColor;
+   
+   // grid label colors
+   //
+   ossimRgbVector      theTopGeographicLabelColor;
+   ossimRgbVector      theBottomGeographicLabelColor;
+   ossimRgbVector      theLeftGeographicLabelColor;
+   ossimRgbVector      theRightGeographicLabelColor;
+   ossimRgbVector      theTopMeterLabelColor;
+   ossimRgbVector      theBottomMeterLabelColor;
+   ossimRgbVector      theLeftMeterLabelColor;
+   ossimRgbVector      theRightMeterLabelColor;
+
+   // grid label font
+   //
+   ossimFontInformation theGeographicTopLabelFontInfo;
+   ossimRefPtr<ossimFont>           theGeographicTopLabelFont;
+   ossimFontInformation theGeographicBottomLabelFontInfo;
+   ossimRefPtr<ossimFont>           theGeographicBottomLabelFont;
+   ossimFontInformation theGeographicLeftLabelFontInfo;
+   ossimRefPtr<ossimFont>           theGeographicLeftLabelFont;
+   ossimFontInformation theGeographicRightLabelFontInfo;
+   ossimRefPtr<ossimFont>           theGeographicRightLabelFont;
+
+   ossimFontInformation theMeterTopLabelFontInfo;
+   ossimRefPtr<ossimFont>           theMeterTopLabelFont;
+   ossimFontInformation theMeterBottomLabelFontInfo;
+   ossimRefPtr<ossimFont>           theMeterBottomLabelFont;
+   ossimFontInformation theMeterLeftLabelFontInfo;
+   ossimRefPtr<ossimFont>           theMeterLeftLabelFont;
+   ossimFontInformation theMeterRightLabelFontInfo;
+   ossimRefPtr<ossimFont>           theMeterRightLabelFont;
+   
+   // grid label dms format strings
+   //
+   ossimString         theTopGeographicFormat;
+   ossimString         theBottomGeographicFormat;
+   ossimString         theLeftGeographicFormat;
+   ossimString         theRightGeographicFormat;
+
+   // grid label flag
+   //
+   bool                theTopGeographicLabelFlag;
+   bool                theBottomGeographicLabelFlag;
+   bool                theLeftGeographicLabelFlag;
+   bool                theRightGeographicLabelFlag;
+
+   bool                theTopGeographicTickFlag;
+   bool                theBottomGeographicTickFlag;
+   bool                theLeftGeographicTickFlag;
+   bool                theRightGeographicTickFlag;
+
+   bool                theTopMeterLabelFlag;
+   bool                theBottomMeterLabelFlag;
+   bool                theLeftMeterLabelFlag;
+   bool                theRightMeterLabelFlag;
+
+   bool                theTopMeterTickFlag;
+   bool                theBottomMeterTickFlag;
+   bool                theLeftMeterTickFlag;
+   bool                theRightMeterTickFlag;
+   
+   
+   ossimIrect          theTopBorder;
+   ossimIrect          theBottomBorder;
+   ossimIrect          theLeftBorder;
+   ossimIrect          theRightBorder;
+
+   // geo-tick spacing in lat lon
+   ossimDpt            theGeographicSpacing;
+
+   //  tick spacing in meter units
+   ossimDpt            theMeterSpacing;
+   
+   ossimAnnotationSource::AnnotationObjectListType theFixedAnnotationList;
+
+   /*!
+    * Override base classes drawAnnotations so we can layout
+    * any fixed annotations first.
+    */
+   virtual void drawAnnotations(ossimRefPtr<ossimImageData> tile);
+   
+   virtual void computeBorderRects();
+   virtual void drawBorders();
+   virtual void addGridLabels();
+   
+   virtual void addGeographicTopGridLabels();
+   virtual void addGeographicBottomGridLabels();
+   virtual void addGeographicLeftGridLabels();
+   virtual void addGeographicRightGridLabels();
+
+   virtual void addGeographicGridLines();
+   virtual void addGeographicGridReseaux();
+   
+   virtual void addMeterGridLabels();
+   
+   virtual void addMeterGridLines();
+   virtual void addMeterGridReseaux();
+
+   
+   virtual void addTitle();
+   
+   virtual void layoutAnnotations();
+
+   virtual void addFixedAnnotation(ossimAnnotationObject* obj);
+      
+   virtual void deleteFixedAnnotations();
+   
+   ossimIrect getViewingRect()const;
+   
+   //! Fetches the input connection's image geometry and verifies that it is a map projection.
+   //! Returns NULL if no valid projection found.
+   const ossimMapProjection* inputMapProjection() const;
+
+// For RTTI
+TYPE_DATA
+};
+#endif /* #ifndef ossimMapCompositionSource_HEADER */
+
+
diff --git a/ossim/include/ossim/imaging/ossimMaskFilter.h b/ossim/include/ossim/imaging/ossimMaskFilter.h
new file mode 100644
index 0000000..f52c2b4
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimMaskFilter.h
@@ -0,0 +1,267 @@
+//*******************************************************************
+  // Copyright (C) 2000 ImageLinks Inc. 
+  //
+// License: MIT
+  // 
+  // See LICENSE.txt file in the top level directory for more details.
+  //
+  // Author: Garrett Potts
+  // Modified by: Elan Sharghi (1/20/2009)
+  // Description: Class declaration for ossimMaskFilter.
+  //
+  //*************************************************************************
+    // $Id: ossimMaskFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef  ossimMaskFilter_HEADER
+#define  ossimMaskFilter_HEADER 1
+#include <ossim/imaging/ossimImageSource.h>
+
+    /**
+     * <pre>
+     * class ossimMaskFilter
+     *
+     *    Requires 2 inputs.  The first input is assumed to be the image input
+     *    and the second input is assumed to be the mask data.  It will only
+     *    use one band of the mask and multi band masks are not supported.
+     *
+     *    the number of bands, min pix, max pix, null pix ...etc are mapped
+     *    to the first input.
+     *
+     * Keywords:
+     *    mask_type:
+     *
+     * keywords description: This keyword can have the following values:
+     *    select, select_clamp, invert, weighted, binary, or binary_inverse
+     *         
+     *    - select will use the input data and every where
+     *      the mask is greater than 0 it will copy the input to the output.
+     *
+     *    - select_clamp_min If mask pixel is non zero, output pixel is input
+     *      pixel; else, null pixel value. Differs from select in that output
+     *      pixel is clamped to min pixel if input pixel is used. 
+     *      
+     *    - invert will use the input data and every where the mask is 0 it
+     *      will copy the input to the output else it will place a null in
+     *      the output.
+     *      
+     *    - weighted will normalize the mask between 0 and 1 and then multiply
+     *      the input by that normalized value and copy to the output.
+     *
+     *    - binary If mask pixel is non zero, output pixel is max pixel value;
+     *      else, null.
+     *
+     *    - binary_inverse If mask pixel is non zero, output pixel is max pixel
+     *      value; else, null pixel value. 
+     *    
+     * example of keywords:
+     *
+     *      mask_type: select
+     *
+     * </pre>
+     */
+class OSSIMDLLEXPORT ossimMaskFilter : public ossimImageSource
+{
+public:
+   /**
+    * Enumeration used to identify what the selection type for this mask is to
+    * be used:
+    * 
+    * - OSSIM_MASK_TYPE_SELECT
+    *   If the mask is non zero then the input is kept if it's 0 then the input
+    *   is nulled out.
+    * - OSSIM_MASK_TYPE_INVERT
+    *   If the input is non zero then the output is nulled else the input is kept
+    * - OSSIM_MASK_TYPE_WEIGHTED
+    *   works as a multiplier of the input data.  The mask is normalized to be
+    *   between 0 and 1 and multiplies the input by that normalized value.
+    * - OSSIM_MASK_TYPE_BINARY
+    *   If mask pixel is non zero, output pixel is null pixel value; else, max
+    *   pixel value.
+    * - OSSIM_MASK_TYPE_BINARY_INVERSE
+    *   If mask pixel is non zero, output pixel is max pixel value; else, null
+    *   pixel value.
+    * - OSSIM_MASK_TYPE_SELECT_CLAMP_MIN
+    *   If mask pixel is non zero, output pixel is input pixel; else, null pixel
+    *   value. Differs from OSSIM_MASK_TYPE_SELECT in that output pixel is
+    *   clamped to min pixel if input pixel is used. The clampling has the
+    *   affect of flipping null pixels to min pixel value if the mask pixel is
+    *   non zero and input pixel is a null.
+    */
+  enum ossimFileSelectionMaskType
+  {
+     /**< standard select if mask is true then keep */
+     OSSIM_MASK_TYPE_SELECT         = 1,
+     /**< standard invert if mask is true the don't keep */
+     OSSIM_MASK_TYPE_INVERT         = 2,
+     /**< weighted operation.  Normalize the mask and multiply the input */
+     OSSIM_MASK_TYPE_WEIGHTED       = 3,
+     /**< binary image> */
+     OSSIM_MASK_TYPE_BINARY         = 4,
+     /**< inverse binary image> */
+     OSSIM_MASK_TYPE_BINARY_INVERSE = 5,
+     /**< Standard select if mask is true then keep with min. */
+     OSSIM_MASK_TYPE_SELECT_CLAMP_MIN = 6,
+  };
+
+   /**
+    * Default Constructor.
+    */
+   ossimMaskFilter(ossimObject* owner=NULL);
+
+   /**
+    * This set method is necessary when this object is being added to an ossimImageChain because
+    * ossimImageChain::addLast() performs a disconnect of all the input sources, thus losing the
+    * assignments made via constructor accepting source pointers. If the intent is to insert this
+    * object in place of the image handler in a chain, First remove the handler from the chain, then
+    * add a default-constructed mask filter object, then call this method to assign the inputs.
+    */
+   void setMaskSource(ossimImageSource* maskSource);
+
+   /**
+    * Sets the mask type.
+    * @param type The mask algorithm type to be used.
+    * see ossimFileSelectionMaskType
+    */
+   virtual void setMaskType(ossimFileSelectionMaskType type);
+   
+   /**
+    * @brief Sets the mask type from string.
+    *
+    * Valid strings are:  "select", "invert" and "weighted".
+    * 
+    * @param type The mask algorithm type to be used.
+    */
+   virtual void setMaskType(const ossimString& type);
+
+   /**
+    * Returns the current mask algorithm used.
+    * \return the current ossimFileSelectionMaskType used.
+    */
+   virtual ossimFileSelectionMaskType getMaskType() const;
+
+   /**
+    * @brief Returns the current mask algorithm used as a string.
+    * @return the current ossimFileSelectionMaskType used.
+    */
+   virtual ossimString getMaskTypeString() const;
+
+   /**
+    * Main entry point for the algorithm.
+    * \param rect 
+    *
+    */
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
+                                               ossim_uint32 resLevel=0);
+
+   virtual void initialize();
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+   
+   virtual bool canConnectMyInputTo(ossim_int32 index, const ossimConnectableObject* object)const;
+   
+   virtual ossim_uint32 getNumberOfInputBands() const;
+   
+
+   virtual ossimRefPtr<ossimImageData> executeMaskFilter(
+      ossimRefPtr<ossimImageData> imageSourceData,
+      ossimRefPtr<ossimImageData> maskSourceData);
+
+   /** @brief Interface to set the mask type. */
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+
+   /** @return "mask_type" property. */
+   virtual ossimRefPtr<ossimProperty> getProperty(
+      const ossimString& name)const;
+
+   /** @brief Adds "mask_type" to list. */
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+protected:
+   /**
+    * Will delete its owned tile.
+    */
+   virtual ~ossimMaskFilter();
+   
+   void allocate();
+   
+   /**
+    * will execute the section algorithm.  everywhere the mask is not 0 it
+    * copies the input data to the output and everywhere the input is null it
+    * writes a null pixel to the output.
+    */
+   ossimRefPtr<ossimImageData> executeMaskFilterSelect(
+      ossimRefPtr<ossimImageData> imageSourceData,
+      ossimRefPtr<ossimImageData> maskSourceData);
+
+   /**
+    * will execute the invert selection algorithm.  everywhere the mask is 0
+    * it copies the input data to the output else it outputs null.
+    */
+   ossimRefPtr<ossimImageData> executeMaskFilterInvertSelect(
+      ossimRefPtr<ossimImageData> imageSourceData,
+      ossimRefPtr<ossimImageData> maskSourceData);
+
+   /**
+    * will execute the weighted algorithm.  It normalizes the mask value to
+    * be between 0 and 1 and multiplies the input data by that value and
+    * outputs it.  
+    */
+   ossimRefPtr<ossimImageData> executeMaskFilterWeighted(
+      ossimRefPtr<ossimImageData> imageSourceData,
+      ossimRefPtr<ossimImageData> maskSourceData);
+
+   /**
+    * Will execute the binary algorithm. Copies the values in the mask to each 
+    * tile. Values will be either NULL or MAX pixel value, typically 0 or 255.
+    */
+   ossimRefPtr<ossimImageData> executeMaskFilterBinary(
+      ossimRefPtr<ossimImageData> imageSourceData,
+      ossimRefPtr<ossimImageData> maskSourceData);
+   
+   template <class inputT, class maskT>
+      ossimRefPtr<ossimImageData> executeMaskFilterSelection(
+         inputT dummyInput,
+         maskT  dummyMask,
+         ossimRefPtr<ossimImageData> imageSourceData,
+         ossimRefPtr<ossimImageData> maskSourceData);
+   
+   template <class inputT, class maskT>
+      ossimRefPtr<ossimImageData> executeMaskFilterInvertSelection(
+         inputT dummyInput,
+         maskT  dummyMask,
+         ossimRefPtr<ossimImageData> imageSourceData,
+         ossimRefPtr<ossimImageData> maskSourceData);
+   
+   template <class inputT, class maskT>
+      ossimRefPtr<ossimImageData> executeMaskFilterWeighted(
+         inputT dummyInput,
+         maskT  dummyMask,
+         ossimRefPtr<ossimImageData> imageSourceData,
+         ossimRefPtr<ossimImageData> maskSourceData);
+
+   template <class inputT, class maskT>
+   ossimRefPtr<ossimImageData> executeMaskFilterBinarySelection(
+      inputT dummyInput,
+      maskT  dummyMask,
+      ossimRefPtr<ossimImageData> imageSourceData,
+      ossimRefPtr<ossimImageData> maskSourceData);
+
+   /**
+    * Member variable that holds the algorithm type to run on the calls to getTile.
+    */
+   ossimFileSelectionMaskType  theMaskType;
+
+   /**
+    * Member used to store the result of the applied algorithm type.  This is returned
+    * from the call to getTile.
+    */
+   ossimRefPtr<ossimImageData> theTile;
+   ossimRefPtr<ossimImageSource> theMaskSource;
+
+   TYPE_DATA
+};
+
+#endif /* #ifndef ossimMaskFilter_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimMaxMosaic.h b/ossim/include/ossim/imaging/ossimMaxMosaic.h
new file mode 100644
index 0000000..e25446c
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimMaxMosaic.h
@@ -0,0 +1,79 @@
+//*******************************************************************
+// Copyright (C) 2005 SANZ Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Kenneth Melero (kmelero at sanz.com)
+//
+// Description: This combiner is designed to "float" the maximum pixel value
+//              of all inputs to the top of the mosaic output. 
+//
+//*************************************************************************
+// $Id: ossimMaxMosaic.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimMaxMosaic_HEADER
+#define ossimMaxMosaic_HEADER
+
+#include <vector>
+#include <ossim/imaging/ossimImageCombiner.h>
+
+
+/**
+ * An image mosaic is a simple combiner that will
+ * just do a simple mosaic.  It just checks NULL pix values until it finds a
+ * pixel that is not empty and copies it out to the output.  The list will
+ * have same size tiles and have the same number of bands.
+ */
+class OSSIMDLLEXPORT ossimMaxMosaic : public ossimImageCombiner
+{
+public:
+   ossimMaxMosaic();
+   ossimMaxMosaic(ossimConnectableObject::ConnectableObjectList& inputSources);
+   
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
+                                               ossim_uint32 resLevel=0);
+   
+   virtual void initialize();
+   
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   virtual ossimString getShortName() const;
+   virtual ossimString getLongName()  const;
+   virtual ossimString getDescription()const;
+
+protected:
+   virtual ~ossimMaxMosaic();
+   /**
+    * Called on first getTile, will initialize all data needed.
+    */
+   void allocate();
+   
+   ossimRefPtr<ossimImageData> theTile;
+
+   template <class T> ossimRefPtr<ossimImageData> combine(
+      T, // dummy template variable not used
+      const ossimIrect& tileRect,
+      ossim_uint32 resLevel=0);
+   template <class T> ossimRefPtr<ossimImageData> combineNorm(
+      T, // dummy template variable not used
+      const ossimIrect& tileRect,
+      ossim_uint32 resLevel=0);
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimMeanMedianFilter.h b/ossim/include/ossim/imaging/ossimMeanMedianFilter.h
new file mode 100644
index 0000000..f2ea333
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimMeanMedianFilter.h
@@ -0,0 +1,130 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimMeanMedianFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimMeanMedianFilter_HEADER
+#define ossimMeanMedianFilter_HEADER
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+/*!
+ * class ossimMeanMedianFilter
+ *
+ * Allows you to change between a median or mean filter.  You can
+ * also specify a window size which the median or mean is computed and
+ * the center pixel is replaced.
+ *
+ */
+class OSSIM_DLL ossimMeanMedianFilter : public ossimImageSourceFilter
+{
+public:
+
+   enum ossimMeanMedianFilterType
+   {
+      /** Applies filter to any non-null center pixel. */
+      OSSIM_MEDIAN                  = 0,
+
+      /** Applies filter to all pixels including null center pixels. */
+      OSSIM_MEDIAN_FILL_NULLS       = 1,
+
+      /** Applies filter to only null center pixels. */
+      OSSIM_MEDIAN_NULL_CENTER_ONLY = 2,
+
+      /** Applies filter to any non-null center pixel. */
+      OSSIM_MEAN                    = 3,
+
+      /* Applies filter to all pixels including null center pixels. */
+      OSSIM_MEAN_FILL_NULLS         = 4,
+
+      /** Applies filter to only null center pixels. */
+      OSSIM_MEAN_NULL_CENTER_ONLY   = 5
+   };
+
+   ossimMeanMedianFilter(ossimObject* owner=NULL);
+
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
+                                               ossim_uint32 resLevel=0);
+   virtual void initialize();
+
+   void setWindowSize(ossim_uint32 windowSize);
+   ossim_uint32 getWindowSize()const;
+
+   /**
+    * @param flag Set "theAutoGrowRectFlag".  This only affects filter types
+    * that set nulls.  Will have a growing affect on the edges.
+    */
+   void setAutoGrowRectFlag(bool flag);
+   bool getAutoGrowRectFlag() const;
+
+   void setFilterType(ossimMeanMedianFilterType type);
+   void setFilterType(const ossimString& type);
+   ossimString getFilterTypeString() const;
+   void getFilterTypeList(std::vector<ossimString>& list) const;
+   
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   /**
+    * @return Returns the bounding rectangle which is the input bounding
+    * rectangle with any expansion (from autogrow) added in.
+    */
+   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
+
+protected:
+   virtual ~ossimMeanMedianFilter();
+   
+   ossimRefPtr<ossimImageData> theTile;
+   ossimMeanMedianFilterType   theFilterType;
+   ossim_uint32                theWindowSize;
+
+   /** Used by applyMean and applyMedian for "fill null" modes. */
+   bool theEnableFillNullFlag;
+
+   /**
+    * If true rectangle is expanded by half filter in each direction if the
+    * theFilterType fills nulls.
+    */
+   bool theAutoGrowRectFlag;
+
+   void applyFilter(ossimRefPtr<ossimImageData>& input);
+
+   template <class T>
+      void applyMean(T dummyVariable,
+                     ossimRefPtr<ossimImageData>& inputData);
+   template <class T>
+      void applyMeanNullCenterOnly(T dummyVariable,
+                                   ossimRefPtr<ossimImageData>& inputData);
+
+   template <class T>
+      void applyMedian(T dummyVariable,
+                       ossimRefPtr<ossimImageData>& inputData);
+   template <class T>
+      void applyMedianNullCenterOnly(T dummyVariable,
+                                     ossimRefPtr<ossimImageData>& inputData);
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimMemoryImageSource.h b/ossim/include/ossim/imaging/ossimMemoryImageSource.h
new file mode 100644
index 0000000..001c0fc
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimMemoryImageSource.h
@@ -0,0 +1,96 @@
+//*******************************************************************. 
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+//
+#ifndef ossimMemoryImageSource_HEADER
+#define ossimMemoryImageSource_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageSource.h>
+
+class OSSIM_DLL ossimMemoryImageSource : public ossimImageSource
+{
+public:
+   ossimMemoryImageSource();
+   ossimMemoryImageSource(const ossimMemoryImageSource& src)
+   :ossimImageSource(src),
+   m_image(src.m_image.valid()?(ossimImageData*)src.m_image->dup():(ossimImageData*)0),
+   m_result(0),
+   m_geometry(src.m_geometry.valid()?(ossimImageGeometry*)src.m_geometry->dup():(ossimImageGeometry*)0),
+   m_boundingRect(src.m_boundingRect)
+   {
+   }
+   ossimMemoryImageSource* dup()const
+   {
+      return new ossimMemoryImageSource(*this);
+   }
+   void setImage(ossimRefPtr<ossimImageData> image);
+   void setImage(ossimScalarType scalarType,
+                 ossim_uint32 numberOfBands,
+                 ossim_uint32 width,
+                 ossim_uint32 height);
+   void setRect(ossim_uint32 ulx,
+                ossim_uint32 uly,
+                ossim_uint32 width,
+                ossim_uint32 height);
+   virtual ossim_uint32 getNumberOfInputBands() const;
+   virtual ossim_uint32 getNumberOfOutputBands() const;
+   virtual ossimScalarType getOutputScalarType() const;
+   virtual double getNullPixelValue(ossim_uint32 band=0)const;
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+   
+   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
+   
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
+                                               ossim_uint32 resLevel=0);
+   
+   virtual bool canConnectMyInputTo(ossim_int32 myInputIndex,
+                                    const ossimConnectableObject* object)const;
+   
+   virtual void initialize();
+	virtual ossim_uint32 getNumberOfDecimationLevels() const;
+   virtual void getDecimationFactor(ossim_uint32 resLevel,
+                                    ossimDpt& result) const;
+   virtual void getDecimationFactors(std::vector<ossimDpt>& decimations)const;
+   
+   //! Returns the image geometry object associated with this tile source or NULL if not defined.
+   //! The geometry contains full-to-local image transform as well as projection (image-to-world)
+   //! Default implementation returns the image geometry object associated with the next  
+   //! (left) input source (if any) connected to this source in the chain, or NULL.
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry()
+   {
+      return m_geometry;
+   }
+   
+   //! Default implementation sets geometry of the first input to the geometry specified.
+   virtual void setImageGeometry(ossimImageGeometry* geom)
+   {
+      m_geometry = geom;
+   }
+   
+   /**
+    *  save state is not implemented for this source and only passes to the base.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
+   
+   /**
+    * loadState is here so one can construct a memory source as a blank tile.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+   
+protected:
+   ossimRefPtr<ossimImageData> m_image;
+   ossimRefPtr<ossimImageData> m_result;
+   ossimRefPtr<ossimImageGeometry> m_geometry;
+   ossimIrect m_boundingRect;
+   TYPE_DATA
+};
+
+#endif
diff --git a/ossim/include/ossim/imaging/ossimMetadataFileWriter.h b/ossim/include/ossim/imaging/ossimMetadataFileWriter.h
new file mode 100644
index 0000000..1069050
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimMetadataFileWriter.h
@@ -0,0 +1,177 @@
+//*******************************************************************
+// Copyright (C) 2003 Storage Area Networks, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Kenneth Melero (kmelero at sanz.com)
+//
+//*******************************************************************
+//  $Id: ossimMetadataFileWriter.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimMetadataFileWriter_H
+#define ossimMetadataFileWriter_H
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimConnectableObject.h>
+#include <ossim/base/ossimProcessInterface.h>
+#include <ossim/base/ossimConnectableObjectListener.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimObjectEvents.h>
+#include <ossim/base/ossimProcessProgressEvent.h>
+
+class ossimImageSource;
+
+/**
+ * ossimMetadataFileWriter
+ *
+ * Typical usage something like this:
+ *
+ * ossimObject* obj = ossimImageMetaDataWriterRegistry::instance()->
+ *     createObject(ossimString("ossimReadmeFileWriter"));
+ * if (!obj)
+ * {
+ *    return;
+ * }
+ * ossimMetadataFileWriter* mw = PTR_CAST(ossimMetadataFileWriter, obj);
+ * if (!mw)
+ * {
+ *    return;
+ * }
+ * 
+ * mw->setFilename(xmlFile);
+ * mw->loadState(kwl);
+ * mw->connectMyInputTo(ih.get());
+ * mw->execute();
+ * delete mw;
+ */
+class OSSIMDLLEXPORT ossimMetadataFileWriter :
+   public ossimConnectableObject,
+   public ossimProcessInterface,
+   public ossimConnectableObjectListener
+{   
+public:
+   ossimMetadataFileWriter();
+   
+
+   virtual ossimObject*       getObject();
+   virtual const ossimObject* getObject() const;
+
+   virtual void initialize();
+   
+   virtual bool execute();
+   
+   virtual void setPercentComplete(double percentComplete);
+   
+   virtual void setFilename(const ossimFilename& file);
+   
+   const ossimFilename& getFilename()const;
+
+   /**
+    * Load state method:
+    *
+    * This method call base class ossimConnectableObject::loadState then
+    * looks for its keywords.
+    *
+    * @param kwl Keyword list to initialize from.
+    *
+    * @param prefix Usually something like: "object1."
+    *
+    * @return This method will alway return true as it is intended to be
+    * used in conjuction with the set methods.
+    *
+    * Keywords picked up by loadState:
+    *
+    * filename: foo.tfw
+    *
+    * (pixel_type should be area or point)
+    * 
+    * pixel_type: area
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix = 0);
+   
+   bool canConnectMyInputTo(ossim_int32 inputIndex,
+                            const ossimConnectableObject* object) const;
+   
+   virtual void disconnectInputEvent(ossimConnectionEvent& event);
+   virtual void connectInputEvent(ossimConnectionEvent& event);
+   virtual void propertyEvent(ossimPropertyEvent& event);
+
+   /**
+    * Ossim uses a concept of "pixel is point" internally.
+    * 
+    * This means that if you say a tie point is 30.0N -81.0W, the center of
+    * the pixel at the tie point is 30.0N -81.0W.
+    *
+    */ 
+   virtual void setPixelType(ossimPixelType pixelType);
+   virtual ossimPixelType getPixelType() const;
+
+   /**
+    * Sets the area of interest to write the meta data for.
+    * 
+    * @param areaOfInterest Sets theAreaOfInterest.
+    *
+    * @note By default the writers will use
+    * "theInputConnection->getBoundingRect()" if theAreaOfInterest has nans.
+    */
+   virtual void setAreaOfInterest(const ossimIrect& areaOfInterest);
+
+   /**
+    * @returns theAreaOfInterest.
+    */
+   virtual ossimIrect getAreaOfInterest() const;
+
+   /**
+    * void getMetadatatypeList(std::vector<ossimString>& metadatatypeList)const
+    *
+    * pure virtual
+    * 
+    * Appends the writers metadata types to the "metadatatypeList".
+    * 
+    * This is the actual image type name.  So for
+    * example, ossimTiffWorldFileWriter has tiff_world_file type.
+    *
+    * @param metadatatypeList stl::vector<ossimString> list to append to.
+    *
+    * @note All writers should append to the list, not, clear it and then add
+    * their types.
+    */
+   virtual void getMetadatatypeList(
+      std::vector<ossimString>& metadatatypeList)const=0;
+
+   /**
+    * bool hasMetadataType(const ossimString& metadataType) const
+    *
+    * @param imageType string representing image type.
+    *
+    * @return true if "metadataType" is supported by writer.
+    */
+   virtual bool hasMetadataType(const ossimString& metadataType)const=0;
+   
+   /*!
+    * property interface
+    */
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+protected:
+   virtual ~ossimMetadataFileWriter();
+   /**
+    * Write out the file.
+    * @return true on success, false on error.
+    */
+   virtual bool writeFile() = 0;
+
+   ossimImageSource* theInputConnection;
+   ossimFilename              theFilename;
+   ossimPixelType             thePixelType;
+   ossimIrect                 theAreaOfInterest;
+   
+TYPE_DATA
+};
+
+#endif /* End of #ifndef ossimMetadataFileWriter_H */
+
diff --git a/ossim/include/ossim/imaging/ossimMonoGridRemapEngine.h b/ossim/include/ossim/imaging/ossimMonoGridRemapEngine.h
new file mode 100644
index 0000000..d2ea9b8
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimMonoGridRemapEngine.h
@@ -0,0 +1,55 @@
+//*****************************************************************************
+// FILE: ossimMonoGridRemapEngine.h
+//
+// Copyright (C) 2001 ImageLinks, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Contains declaration of class ossimMonoGridRemapEngine
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimMonoGridRemapEngine.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimMonoGridRemapEngine_HEADER
+#define ossimMonoGridRemapEngine_HEADER
+
+#include <ossim/imaging/ossimGridRemapEngine.h>
+
+/*!****************************************************************************
+ *
+ * CLASS: ossimMonoGridRemapEngine 
+ *
+ *****************************************************************************/
+class ossimMonoGridRemapEngine : public ossimGridRemapEngine
+{
+public:
+   ossimMonoGridRemapEngine()
+      : ossimGridRemapEngine(1, 1) {}
+   
+   virtual ossimObject* dup() const;
+   
+   virtual void remapTile(const ossimDpt& origin_point,
+                          ossimGridRemapSource* remapper,
+                          ossimRefPtr<ossimImageData>& tile);
+
+   virtual void assignRemapValues(std::vector<ossimAtbPointSource*>& sources);
+
+   virtual void computeSourceValue(ossimRefPtr<ossimImageData>& source,
+                                   void* result);
+
+protected:
+   virtual void computeRemapNode(ossimAtbPointSource*  point_source,
+                                 void*                 source_value,
+                                 void*                 target_value);
+
+   TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/imaging/ossimMultiBandHistogramTileSource.h b/ossim/include/ossim/imaging/ossimMultiBandHistogramTileSource.h
similarity index 100%
rename from include/ossim/imaging/ossimMultiBandHistogramTileSource.h
rename to ossim/include/ossim/imaging/ossimMultiBandHistogramTileSource.h
diff --git a/ossim/include/ossim/imaging/ossimNBandToIndexFilter.h b/ossim/include/ossim/imaging/ossimNBandToIndexFilter.h
new file mode 100644
index 0000000..ef2a68c
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimNBandToIndexFilter.h
@@ -0,0 +1,130 @@
+//*******************************************************************
+// Copyright (C) 2005 Garrett Potts
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimNBandToIndexFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimNBandToIndexFilter_HEADER
+#define ossimNBandToIndexFilter_HEADER
+#include <ossim/base/ossimNBandLutDataObject.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/imaging/ossimImageSourceFilter.h>
+#include <vector>
+
+class ossimImageData;
+
+/*!
+ * It will map the input data to an 8-bit index table.  The table
+ * <pre>
+ *
+ * Example keyword list:
+ *
+ * type:  ossimNBandToIndexFilter
+ *
+ * If you want to load from a file then just do:
+ *
+ * lut.filename: <full path to lut file>
+ *
+ * If you have the lut table in line then it must look like this:
+ *
+ * lut.entry0:  204 102 1
+ * lut.entry1:  255 204 153
+ * lut.entry2:  51 204 204
+ * lut.number_of_entries:  3
+ * lut.type:  ossimNBandLutDataObject
+ *
+ * </pre>
+ */
+class OSSIM_DLL ossimNBandToIndexFilter : public ossimImageSourceFilter
+{
+public:
+   /*!
+    * Initializes the min value to 0 and the max value to 4000.
+    */
+   ossimNBandToIndexFilter();
+   
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
+                                               ossim_uint32 resLevel=0);
+   
+   virtual ossim_uint32 getNumberOfOutputBands() const;
+   
+   virtual ossimScalarType getOutputScalarType() const;
+   
+   void setLut(ossimNBandLutDataObject& lut);
+
+   void setLut(const ossimFilename& file);
+
+   virtual bool isSourceEnabled()const;
+   virtual void disableSource();
+   
+   virtual double getNullPixelValue(ossim_uint32 band=0)const;
+
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+   
+   virtual void initialize();
+
+   /*!
+    * Saves the state of this object.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
+
+   /*!
+    * Loads the state of this object.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+
+   /**
+    * Will set the property whose name matches the argument
+    * "property->getName()".
+    *
+    * @param property Object containing property to set.
+    */
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+
+   /**
+    * @param name Name of property to return.
+    * 
+    * @returns A pointer to a property object which matches "name".  Returns
+    * NULL if no match is found.
+    */
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+
+   /**
+    * Pushes this's names onto the list of property names.
+    *
+    * @param propertyNames array to add this's property names to.
+    */
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   
+protected:
+   virtual ~ossimNBandToIndexFilter();
+   void allocate();
+
+   
+   virtual ossimRefPtr<ossimImageData> convertInputTile(ossimImageData* inputTile);
+
+   template <class T> ossimRefPtr<ossimImageData> convertOutputTileTemplate(T inputDummy,
+                                                                            ossimImageData* inputTile);
+   template <class T1, class T2> ossimRefPtr<ossimImageData> convertInputTileToOutputTemplate(T1 inputDummy,
+                                                                                              T2 outputDummy,
+                                                                                              ossimImageData* inputTile);
+   
+   ossimRefPtr<ossimNBandLutDataObject> theLut;
+   ossimRefPtr<ossimImageData>          theTile;
+   ossimFilename                        theLutFilename;
+   bool                                 theKeepQuantizedValueFlag;
+   std::vector<ossimNBandLutDataObject::LUT_ENTRY_TYPE> theMinValues;
+   std::vector<ossimNBandLutDataObject::LUT_ENTRY_TYPE> theMaxValues;
+   std::vector<ossimNBandLutDataObject::LUT_ENTRY_TYPE> theNullValues;
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimNitf20Writer.h b/ossim/include/ossim/imaging/ossimNitf20Writer.h
new file mode 100644
index 0000000..328cbf5
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimNitf20Writer.h
@@ -0,0 +1,136 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimNitfWriter.h 9256 2006-07-14 15:28:19Z dburken $
+#ifndef ossimNitf20Writer_HEADER
+#define ossimNitf20Writer_HEADER
+
+#include <iosfwd>
+#include <ossim/imaging/ossimImageFileWriter.h>
+#include <ossim/imaging/ossimNitfWriterBase.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/projection/ossimMapProjectionInfo.h>
+#include <ossim/base/ossimRgbLutDataObject.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/support_data/ossimNitfFileHeaderV2_0.h>
+#include <ossim/support_data/ossimNitfImageHeaderV2_0.h>
+
+class ossimProjection;
+
+class OSSIM_DLL ossimNitf20Writer : public ossimNitfWriterBase
+{
+public:
+   ossimNitf20Writer(const ossimFilename& filename=ossimFilename(""),
+                   ossimImageSource* inputSource = (ossimImageSource*)NULL);
+   virtual ~ossimNitf20Writer();
+   virtual bool isOpen()const;
+   virtual bool open();
+   virtual void close();
+   
+   /**
+    * void getImageTypeList(std::vector<ossimString>& imageTypeList)const
+    *
+    * Appends this writer image types to list "imageTypeList".
+    *
+    * This writer has the following types:
+    * nitf_block_band_separate
+    * nitf_block_band_sequential
+    *
+    * @param imageTypeList stl::vector<ossimString> list to append to.
+    */   
+   virtual void getImageTypeList(std::vector<ossimString>& imageTypeList)const;
+   
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(
+      const ossimString& name)const;
+
+   /**
+    * @param propertyNames Array to populate with property names.
+    *
+    * @note The following names are handled:
+    *  file_header
+    *  image_header
+    */
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   
+   void addRegisteredTag(ossimRefPtr<ossimNitfRegisteredTag> registeredTag);
+
+   /**
+    * Saves the state of the writer to kwl with prefix then calls
+    * base class ossimImageFileWriter::saveState
+    *
+    * @param kwl Keyword list to save to.
+    *
+    * @param prefix Usually something like: "object2."
+
+    * @return true on success, false on failure.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0) const;
+
+   /**
+    * Initializes the state of the writer from kwl with prefix then calls
+    * base class ossimImageFileWriter::loadState
+    *
+    * @param kwl Keyword list to initialize from.
+    *
+    * @param prefix Usually something like: "object2."
+
+    * @return true on success, false on failure.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+
+protected:
+   
+   /**
+    * @return true on success false on error.
+    */
+   virtual bool writeFile();
+   
+   /**
+    * write out block band separate
+    * 
+    * @return true on success and false on error
+    */
+   virtual bool writeBlockBandSeparate();
+   
+   /**
+    * Outputs in band sequential format.  Band 1 is followed by band
+    * 2, ... etc.
+    */
+   virtual bool writeBlockBandSequential();
+
+   void addTags();
+
+   std::ofstream* theOutputStream;
+   
+   ossimRefPtr<ossimNitfFileHeaderV2_0>  theFileHeader;
+   ossimRefPtr<ossimNitfImageHeaderV2_0> theImageHeader;
+
+   /** If true user wants to set RPC00B tag. (DEFAULT = false) */
+   bool theEnableRpcbTagFlag;
+
+   /**
+    * If true user wants to set BLOCKA tag. (DEFAULT = true)
+    * Currently only valid for map projected images.
+    */
+   bool theEnableBlockaTagFlag;
+
+   /**
+    *
+    * If true this will enable searching the input connnection for another NITF handler and 
+    * bring the fields to this writers output fields and will maintin as many field values as possible
+    *
+    */
+   bool theCopyFieldsFlag;
+   
+TYPE_DATA   
+};
+
+#endif /* #ifndef ossimNitfWriter_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimNitfTileSource.h b/ossim/include/ossim/imaging/ossimNitfTileSource.h
new file mode 100644
index 0000000..fee5c20
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimNitfTileSource.h
@@ -0,0 +1,544 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Contains class declaration for NitfTileSource.
+//
+//*******************************************************************
+//  $Id: ossimNitfTileSource.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimNitfTileSource_HEADER
+#define ossimNitfTileSource_HEADER 1
+
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimAppFixedTileCache.h>
+#include <ossim/support_data/ossimNitfFile.h>
+#include <ossim/support_data/ossimNitfFileHeader.h>
+#include <ossim/support_data/ossimNitfImageHeader.h>
+#include <fstream>
+
+struct jpeg_decompress_struct;
+
+class OSSIM_DLL ossimNitfTileSource : public ossimImageHandler
+{
+public:
+
+   enum ReadMode
+   {
+      READ_MODE_UNKNOWN = 0,
+      
+      /** IMODE = B "Band Interleaved By Block or a single band" */
+      READ_BIB_BLOCK = 1,
+
+      /** IMODE = P "Band Interleaved By Pixel" */
+      READ_BIP_BLOCK = 2,
+
+      /** IMODE = R "Band Interleaved By Row" */
+      READ_BIR_BLOCK = 3,
+
+      /** IMODE = S "Band Sequential" */
+      READ_BSQ_BLOCK = 4,
+
+      /** IMODE = B of S "single block or one block for each band" */
+      READ_BIB       = 5,
+
+      /** IMODE = P "single block Band Interleaved By Pixel" */
+      READ_BIP       = 6,
+
+      /** IMODE = R "single block Band Interleaved By Row" */
+      READ_BIR       = 7,
+
+      /** IMODE = B, IC = C3 "JPEG compressed blocks" */
+      READ_JPEG_BLOCK = 8
+   };
+
+   ossimNitfTileSource();
+   
+   
+   virtual ossimString getShortName() const;
+   virtual ossimString getLongName()  const;
+
+   /**
+    *  Returns true if the image_file can be opened and is a valid nitf file.
+    */
+   virtual bool open();
+
+   /**
+    * Closes file and destroys all memory allocated.
+    */
+   virtual void close();
+
+   /**
+    * @param tileRect Requested rectangle.
+    *
+    * @param resLevel Reduced resolution level to grab tileRect from.
+    * Default = 0 or the full resolution data set.
+    *
+    * @return Returns an image data object with requested rectangle from the
+    * image.  Depending on the overlap of tileRect with respect to the image
+    * rectangle, the returned tile could be full, partial, or an empty(blank)
+    * tile.
+    */
+   virtual ossimRefPtr<ossimImageData> getTile(const  ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+
+    /**
+     * @return Returns the number of bands in the image.
+     * Satisfies pure virtual from ImageHandler class.
+     */
+   virtual ossim_uint32 getNumberOfInputBands() const;
+
+   /**
+    * @return Number of output bands.
+    */
+   virtual ossim_uint32 getNumberOfOutputBands() const;
+
+   /**
+     *  Returns the number of lines in the image.
+     *  Satisfies pure virtual from ImageHandler class.
+     */
+   virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel = 0) const;
+   
+   /**
+    *  Returns the number of samples in the image.  
+    *  Satisfies pure virtual from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel = 0) const;
+   
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+   
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   /**
+    * Returns the output pixel type of the tile source.
+    */
+   virtual ossimScalarType getOutputScalarType() const;
+
+   /**
+    * Returns the width of the output tile.
+    */
+   virtual ossim_uint32 getTileWidth() const;
+   
+   /**
+    * Returns the height of the output tile.
+    */
+   virtual ossim_uint32 getTileHeight() const;
+
+   /**
+    * Returns the tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileWidth which
+    * returns the output tile width which can be different than the internal
+    * image tile width on disk.
+    */
+   virtual ossim_uint32 getImageTileWidth() const;
+
+   /**
+    * Returns the tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileWidth which
+    * returns the output tile width which can be different than the internal
+    * image tile width on disk.
+    */
+   virtual ossim_uint32 getImageTileHeight() const;   
+
+   virtual bool isOpen()const;
+
+   /**
+    * @return The current entry number.
+    *
+    * @note NITF's can contain multiple images in a single file.  This returns
+    * the index of the current image being read.
+    */
+   virtual ossim_uint32 getCurrentEntry() const;
+
+   /**
+    * @param entryList This is the list to initialize with entry indexes.
+    */
+   virtual void getEntryList(std::vector<ossim_uint32>& entryList) const;
+
+   /**
+    * @return Returns the number of entries (or images) within the nitf
+    * file.
+    */
+   ossim_uint32 getNumberOfEntries() const;
+   
+   /**
+    * @param entryIdx Zero base entry number to select.  Sets data member
+    * "theCurrentEntry".
+    *
+    * @note "theCurrentEntry" will not be set if "entryIdx" is out of range.
+    */
+   virtual bool setCurrentEntry(ossim_uint32 entryIdx);
+
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+   ossimString getSecurityClassification()const;
+   
+   /**
+    * @return Returns theCacheEnabledFlag.
+    */
+   bool getCacheEnabledFlag() const;
+
+   /**
+    * @param flag Sets theCacheEnabledFlag and disables/enables caching
+    * accordingly.  If cache is disabled it is also flushed at the same time.
+    * If cache is enabled, blocks read from the image will be cached.
+    */
+   void setCacheEnabledFlag(bool flag);
+
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+   virtual double getNullPixelValue(ossim_uint32 band=0)const;
+
+   const ossimNitfFileHeader* getFileHeader()const;
+   ossimNitfFileHeader* getFileHeader();
+   /**
+    * @return The image header for the current entry.
+    */
+   const ossimNitfImageHeader* getCurrentImageHeader() const;
+   ossimNitfImageHeader* getCurrentImageHeader();
+
+   /**
+    * @brief Convenience method to get the zero based rgb output band list.
+    *
+    * Attempts to derive RGB bands from nitf fields.
+    * 
+    * @param bandList Initialized by this.
+    * @return true on success, false if number of bands is less than 3 or if
+    * rgb bands could not be derived from nitf fields.
+    */
+   virtual bool getRgbBandList(std::vector<ossim_uint32>& bandList) const;
+
+protected:
+   virtual ~ossimNitfTileSource();
+
+   /**
+    * @param imageRect The full resolution image rectangle.
+    *
+    * @note Should contain offsets if there are any.
+    */
+   void setBoundingRectangle(const ossimIrect& imageRect);
+   
+   /** Copy constructor, disallow... */
+   ossimNitfTileSource(const ossimNitfTileSource& obj);
+
+   /** Operator=, disallow... */
+   ossimNitfTileSource& operator=(const ossimNitfTileSource& rhs); 
+
+   /**
+    *  Returns true on success, false on error.
+    */
+   bool loadTile(const ossimIrect& clipRect);
+
+   /**
+    * @return Returns the block number given an origin.
+    */
+   ossim_uint32 getBlockNumber(const ossimIpt& block_origin) const;
+
+   /**
+    * Deletes all memory allocated by this object.
+    */
+   void destroy();
+
+   /**
+    * @brief Parses "theImageFile" and initializes all nitf headers.
+    * @return true on success, false on error.
+    */
+   virtual bool parseFile();
+
+   /**
+    * @brief Allocates everything for current entry.
+    *
+    * This is called on an open() or a entry change to an already open nitf
+    * file.
+    *
+    * This does not allocate buffers and tiles to keep open and
+    * setCurrentEntry times to a minimum.  Buffers are allocated on first
+    * grab of pixel data by allocatBuffers method.
+    * 
+    * @return True on success, false on error.
+    */
+   virtual bool allocate();
+
+   /**
+    * @brief Allocates buffers for current entry.
+    *
+    * This is called on first getTile().
+    * 
+    * @return True on success, false on error.
+    */
+   virtual bool allocateBuffers();
+
+   /**
+    * @param hdr Pointer to image header.
+    * @return true if reader can uncompress nitf.
+    * */
+   virtual bool canUncompress(const ossimNitfImageHeader* hdr) const;
+
+   /**
+    * Initializes the data member "theScalarType" from the current entry.
+    */
+   virtual void initializeScalarType();
+
+   /**
+    * Initializes the data member "theSwapBytesFlag" from the current entry.
+    */
+   virtual void initializeSwapBytesFlag();
+   
+   /**
+    * Initializes the data member "theReadMode" from the current entry.
+    */
+   virtual void initializeReadMode();
+
+   /**
+    * Initializes the data member "theNumberOfBands" from the current entry.
+    */
+   void initializeBandCount();
+
+   /**
+    * Initializes the data member "theBlockSize" from the current entry.
+    *
+    * @note This should be performed after setting the read mode and
+    * band count.
+    *
+    * @note This is the size of a single block read.  So if the bands are
+    * separated by block, a read of this size will get one block.
+    *
+    * @return true on success, false on error.
+    */
+   bool initializeBlockSize();
+
+   /**
+    * Initializes the data members "theImageRect" and "theBlockRect"
+    * from the current entry.
+    *
+    * @return true on success, false on error.
+    */
+   virtual bool initializeImageRect();
+
+   /**
+    * Initializes the data member "theCacheSize".
+    */
+   void initializeCacheSize();
+
+   /**
+    * Initializes the data member "theCacheTileInterLeaveType".
+    */
+   virtual void initializeCacheTileInterLeaveType();
+   
+   /**
+    * Initializes the cache tile size(width and height).  For block images
+    * this will be the size of one block.  For images that are a single block,
+    * this will be the image width by the height of one tile.
+    */
+   void initializeCacheTile();
+
+   /**
+    * Initializes the data member theCompressedBuf.
+    */
+   virtual void initializeCompressedBuf();
+
+   /**
+    * Initializes the output tile size(width and height).
+    */
+   virtual void initializeOutputTile();
+
+   /**
+    * @brief Initializes "theLut" if applicable.
+    */
+   void initializeLut();
+
+   /**
+    * Loads a block of data to theCacheTile.
+    * 
+    * @param x Starting x position of block to load.
+    *
+    * @param y Starting y position of block to load.
+    *
+    * @return true on success, false on error.
+    *
+    * @note x and y are zero based relative to the upper left corner so any
+    * sub image offset should be subtracted off.
+    */
+   bool loadBlockFromCache(ossim_uint32 x, ossim_uint32 y,
+                           const ossimIrect& clipRect);
+
+   /**
+    * Loads a block of data to theCacheTile.
+    * 
+    * @param x Starting x position of block to load.
+    *
+    * @param y Starting y position of block to load.
+    *
+    * @return true on success, false on error.
+    *
+    * @note x and y are zero based relative to the upper left corner so any
+    * sub image offset should be subtracted off.
+    */
+   virtual bool loadBlock(ossim_uint32 x, ossim_uint32 y);
+
+   /**
+    * @param x Horizontal upper left pixel position of the requested block.
+    *
+    * @param y Vertical upper left pixel position of the requested block.
+    *
+    * @param band Band of block.  Only relative with IMODES that have bands
+    * in separate blocks.
+    *
+    * @return true if the stream offset was settable and false otherwise.
+    */
+   bool getPosition(std::streamoff& position,
+                    ossim_uint32 x,
+                    ossim_uint32 y,
+                    ossim_uint32 band) const;
+
+   /**
+    * @return the total number of blocks for the current entry.
+    *
+    * @note For band separated blocks, all bands will be counted as on block.
+    */
+   ossim_uint32 getNumberOfBlocks() const;
+
+   /**
+    * @return The number of bytes to get from one block band to the next band.
+    */
+   std::streampos getBandOffset() const;
+
+   /**
+    * @return The number of bytes to get from one block to the next block.
+    */
+   std::streampos getBlockOffset() const;
+   
+
+   void explodePackedBits(ossimRefPtr<ossimImageData> packedBuffer)const;
+
+   void convertTransparentToNull(ossimRefPtr<ossimImageData> tile)const;
+   
+   ossim_uint32 getPartialReadSize(const ossimIpt& blockOrigin)const;
+   bool isVqCompressed(const ossimString& compressionCode)const;
+
+   /**
+    * @brief Uncompresses Vector Quantization unmasked image data.
+    * IC field = C4
+    * @param destination tile to stuff.
+    * @param source Pointer to compressed data.
+    */
+   void vqUncompressC4(ossimRefPtr<ossimImageData> destination,
+                       ossim_uint8* source);
+   
+   /**
+    * @brief Uncompresses Vector Quantization masked image data.
+    * IC field = M4
+    * @param destination tile to stuff.
+    * @param source Pointer to compressed data.
+    */
+   void vqUncompressM4(ossimRefPtr<ossimImageData> destination,
+                       ossim_uint8* source);
+
+   void lutUncompress(ossimRefPtr<ossimImageData> destination,
+                     ossim_uint8* source);
+
+   /**
+    * @brief scans the file storing in offsets in "theNitfBlockOffset" and
+    * block sizes in "theNitfBlockSize".
+    * @return true on success, false on error.  This checks for arrays being
+    * the same size as number of blocks.
+    */
+   virtual bool scanForJpegBlockOffsets();
+
+   /**
+    * @brief Uncompresses a jpeg block using the jpeg-6b library.
+    * @param x sample location in image space.
+    * @param y line location in image space.
+    * @return true on success, false on error.
+    */
+   virtual bool uncompressJpegBlock(ossim_uint32 x, ossim_uint32 y);
+
+   /**
+    * @brief Loads one of the default tables based on COMRAT value.
+    *
+    * @return true if comrat had valid table value(1-5) and table was loaded,
+    * false if COMRAT value did not contain a valid value.  Will also return
+    * false if there is already a table loaded.
+    * 
+    * @note COMRAT is nitf compression rate code field:
+    * -  "00.2" == default compression table 2
+    * -  "00.5" == default compression table 5 and so on.
+    */
+   bool loadJpegQuantizationTables(jpeg_decompress_struct& cinfo) const;
+
+   /**
+    * @brief Loads default huffman tables.
+    *
+    * @return true success, false on error.
+    */
+   bool loadJpegHuffmanTables(jpeg_decompress_struct& cinfo) const;
+   
+   /**
+   * @brief Virtual method determines the decimation factors at each resolution level. 
+   * This method derives the decimations from the image metadata.
+   */
+   virtual void establishDecimationFactors();
+
+   ossimRefPtr<ossimImageData>   theTile;
+   ossimRefPtr<ossimImageData>   theCacheTile;
+   ossimRefPtr<ossimNitfFile>    theNitfFile;
+   std::vector<ossimRefPtr<ossimNitfImageHeader> > theNitfImageHeader;
+   ReadMode                      theReadMode;
+   ossimScalarType               theScalarType;
+   bool                          theSwapBytesFlag;
+   ossim_uint32                  theNumberOfInputBands;
+   ossim_uint32                  theNumberOfOutputBands;
+   ossim_uint32                  theBlockSizeInBytes;
+   ossim_uint32                  theReadBlockSizeInBytes;
+   ossim_uint32                  theNumberOfImages;
+   ossim_uint32                  theCurrentEntry;
+   ossimIrect                    theImageRect;
+   std::ifstream                 theFileStr;   
+   std::vector<ossim_uint32>     theOutputBandList;
+   ossimIpt                      theCacheSize;
+   ossimInterleaveType           theCacheTileInterLeaveType;
+   bool                          theCacheEnabledFlag;
+   std::vector<ossim_uint32>     theEntryList;
+   ossimAppFixedTileCache::ossimAppFixedCacheId theCacheId;
+   bool                          thePackedBitsFlag;
+   ossimIrect                    theBlockImageRect;
+   std::vector<ossim_uint8>      theCompressedBuf;
+
+   //---
+   // Have compressed jpeg blocks of variable length so we must scan and
+   // capture the offsetts and block sizes for reading.
+   //---
+   std::vector<std::streamoff>   theNitfBlockOffset;
+   std::vector<ossim_uint32>     theNitfBlockSize;
+   
+   bool m_isJpeg12Bit;
+
+   //---
+   // If set to true indicates scanForJpegBlockOffsets() needs to be called
+   // prior to grabbing a block.
+   //---
+   bool m_jpegOffsetsDirty;
+   
+TYPE_DATA
+};
+   
+#endif /* #ifndef ossimNitfTileSource_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimNitfTileSource_12.h b/ossim/include/ossim/imaging/ossimNitfTileSource_12.h
new file mode 100644
index 0000000..9effc70
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimNitfTileSource_12.h
@@ -0,0 +1,42 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Mingjie Su
+//
+// Description:
+//
+// Contains class declaration for NitfTileSource_12.
+//
+//*******************************************************************
+//  $Id: ossimNitfTileSource_12.h 958 2010-06-03 23:00:32Z ming.su $
+#ifndef ossimNitfTileSource_12_HEADER
+#define ossimNitfTileSource_12_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/support_data/ossimNitfImageHeader.h>
+
+class OSSIM_DLL ossimNitfTileSource_12 
+{
+public:
+  static bool uncompressJpeg12Block(ossim_uint32 x, 
+                                    ossim_uint32 y,
+                                    ossimRefPtr<ossimImageData> cacheTile,
+                                    ossimNitfImageHeader* hdr,
+                                    ossimIpt cacheSize,
+                                    std::vector<ossim_uint8> compressedBuf,
+                                    ossim_uint32 readBlockSizeInBytes,
+                                    ossim_uint32 bands);
+
+
+  static bool loadJpegQuantizationTables(ossimNitfImageHeader* hdr,
+                                         jpeg_decompress_struct& cinfo);
+
+  static bool loadJpegHuffmanTables(jpeg_decompress_struct& cinfo);
+};
+   
+#endif /* #ifndef ossimNitfTileSource_12_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimNitfWriter.h b/ossim/include/ossim/imaging/ossimNitfWriter.h
new file mode 100644
index 0000000..5dd7dd5
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimNitfWriter.h
@@ -0,0 +1,173 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimNitfWriter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimNitfWriter_HEADER
+#define ossimNitfWriter_HEADER
+
+#include <iosfwd>
+#include <ossim/imaging/ossimNitfWriterBase.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/projection/ossimMapProjectionInfo.h>
+#include <ossim/base/ossimRgbLutDataObject.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/support_data/ossimNitfFileHeaderV2_1.h>
+#include <ossim/support_data/ossimNitfImageHeaderV2_1.h>
+#include <ossim/support_data/ossimNitfTextHeaderV2_0.h>
+#include <ossim/support_data/ossimNitfTextHeaderV2_1.h>
+#include <ossim/support_data/ossimNitfDataExtensionSegmentV2_1.h>
+#include <ossim/base/ossimIoStream.h>
+
+class ossimProjection;
+
+class OSSIM_DLL ossimNitfWriter : public ossimNitfWriterBase
+{
+public:
+   ossimNitfWriter(const ossimFilename& filename=ossimFilename(""),
+                   ossimImageSource* inputSource = (ossimImageSource*)NULL);
+   virtual ~ossimNitfWriter();
+   virtual bool isOpen()const;
+   virtual bool open();
+   virtual void close();
+   
+   /**
+    * void getImageTypeList(std::vector<ossimString>& imageTypeList)const
+    *
+    * Appends this writer image types to list "imageTypeList".
+    *
+    * This writer has the following types:
+    * nitf_block_band_separate
+    * nitf_block_band_sequential
+    *
+    * @param imageTypeList stl::vector<ossimString> list to append to.
+    */   
+   virtual void getImageTypeList(std::vector<ossimString>& imageTypeList)const;
+   
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+
+   /**
+    * @param propertyNames Array to populate with property names.
+    *
+    * @note The following names are handled:
+    *  file_header
+    *  image_header
+    *  des_header
+    */
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   
+   void addRegisteredTag(ossimRefPtr<ossimNitfRegisteredTag> registeredTag, bool unique = true);
+   void addRegisteredTag(ossimRefPtr<ossimNitfRegisteredTag> registeredTag, bool unique,
+      const ossim_uint32& ownerIndex, const ossimString& tagType);
+
+   /**
+    * Saves the state of the writer to kwl with prefix then calls
+    * base class ossimImageFileWriter::saveState
+    *
+    * @param kwl Keyword list to save to.
+    *
+    * @param prefix Usually something like: "object2."
+
+    * @return true on success, false on failure.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0) const;
+
+   /**
+    * Initializes the state of the writer from kwl with prefix then calls
+    * base class ossimImageFileWriter::loadState
+    *
+    * @param kwl Keyword list to initialize from.
+    *
+    * @param prefix Usually something like: "object2."
+
+    * @return true on success, false on failure.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+
+   virtual bool addTextToNitf(std::string& inputText);
+
+   /** @brief Gets the block size. */
+   virtual void getTileSize(ossimIpt& size) const;
+
+   /**
+    * Sets the nitf output block size.  Must be divisible by 16.
+    *
+    * Note:  This is not called setBlockSize just because there was already
+    * a virtual setTileSize.
+    *
+    * @param tileSize Block size.
+    */
+   virtual void setTileSize(const ossimIpt& tileSize);
+
+   /**
+    * Get the image header used for export.
+    *
+    * @warning Many values will be overwritten at export time.  This includes the 
+    *          ossimNitfImageBandV2_1, if the number of bands on the image header
+    *          does not match that on the writer.
+    *
+    * @return The image header.
+    */
+   virtual ossimNitfImageHeaderV2_1 *getImageHeader();
+
+   /**
+    * Get the file header used for export.
+    *
+    * @warning Many values will be overwritten at export time.
+    *
+    * @return The file header.
+    */
+   virtual ossimNitfFileHeaderV2_1 *getFileHeader();
+
+   /**
+    * Add a DES to the file.
+    *
+    * @param des The DES to add to the file.
+    */
+   virtual void addDataExtensionSegment(const ossimNitfDataExtensionSegmentV2_1& des, bool allowTreOverflow);
+protected:
+   
+   /**
+    * @return true on success false on error.
+    */
+   virtual bool writeFile();
+   
+   /**
+    * write out block band separate
+    * 
+    * @return true on success and false on error
+    */
+   virtual bool writeBlockBandSeparate();
+   
+   /**
+    * Outputs in band sequential format.  Band 1 is followed by band
+    * 2, ... etc.
+    */
+   virtual bool writeBlockBandSequential();
+
+   /** Currently disabled... */
+   // virtual void addStandardTags();
+
+   ossimOFStream64*                      m_outputStream;
+   ossimRefPtr<ossimNitfFileHeaderV2_1>  m_fileHeader;
+   ossimRefPtr<ossimNitfImageHeaderV2_1> m_imageHeader;
+   std::vector<ossimNitfDataExtensionSegmentV2_1> m_dataExtensionSegments;
+   ossimRefPtr<ossimNitfTextHeaderV2_1>  m_textHeader;
+   std::string                           m_textEntry;
+   ossimIpt                              m_blockSize;
+
+TYPE_DATA 
+private:
+   void takeOverflowTags(bool useFileHeader, bool userDefinedTags);
+
+};
+
+#endif /* #ifndef ossimNitfWriter_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimNitfWriterBase.h b/ossim/include/ossim/imaging/ossimNitfWriterBase.h
new file mode 100644
index 0000000..ef195af
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimNitfWriterBase.h
@@ -0,0 +1,184 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: OSSIM nitf writer base class to hold methods common to
+// all nitf writers.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimNitfWriterBase.h 2981 2011-10-10 21:14:02Z david.burken $
+#ifndef ossimNitfWriterBase_HEADER
+#define ossimNitfWriterBase_HEADER
+
+#include <ossim/imaging/ossimImageFileWriter.h>
+
+class ossimFilename;
+class ossimImageSourceSequencer;
+class ossimMapProjectionInfo;
+class ossimNitfFileHeaderV2_X;
+class ossimNitfImageHeaderV2_X;
+class ossimProjection;
+
+/**
+ * @brief OSSIM nitf writer base class to hold methods common to
+ * all nitf writers.
+ */
+class OSSIM_DLL ossimNitfWriterBase : public ossimImageFileWriter
+{
+public:
+
+   /** @brief default constructor */
+   ossimNitfWriterBase();
+
+   /**
+    * @brief Constructor that takes filename and input source.
+    * @param filename The output file name.
+    * @param inputSource The input source to write to file.
+    */
+   ossimNitfWriterBase(const ossimFilename& filename,
+                       ossimImageSource* inputSource);
+
+   /* @brief virtual destructor */
+   virtual ~ossimNitfWriterBase();
+
+   /**
+    * @brief Set the properties.
+    * @param property The property to set.
+    */
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+
+   /**
+    * @brief Gets a property.
+    * @param The name of the property to get.
+    * @return The property if found.
+    */
+   virtual ossimRefPtr<ossimProperty> getProperty(
+      const ossimString& name)const;
+
+   /**
+    * @param propertyNames Array to populate with property names.
+    *
+    * @note The following names are handled:
+    *  enable_rpcb_tag
+    *  enable_blocka_tag
+    */
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+ 
+
+   /**
+    * Saves the state of the writer to kwl with prefix then calls
+    * base class ossimImageFileWriter::saveState
+    *
+    * @param kwl Keyword list to save to.
+    *
+    * @param prefix Usually something like: "object2."
+
+    * @return true on success, false on failure.
+    *
+    * Keywords saved by saveState:
+    * 
+    * enable_rpcb_tag: true
+    *
+    * enable_blocka_tag: true
+    */
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0) const;
+
+   /**
+    * Initializes the state of the writer from kwl with prefix then calls
+    * base class ossimImageFileWriter::loadState
+    *
+    * @param kwl Keyword list to initialize from.
+    *
+    * @param prefix Usually something like: "object2."
+
+    * @return true on success, false on failure.
+    *
+    * Keywords picked up by loadState:
+    * 
+    * enable_rpcb_tag: true
+    *
+    * enable_blocka_tag: true
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+
+   /**
+    * Returns a 3-letter extension from the image type descriptor 
+    * (theOutputImageType) that can be used for image file extensions.
+    *
+    * @param imageType string representing image type.
+    *
+    * @return the 3-letter string extension.
+    */
+   virtual ossimString getExtension() const;
+
+protected:
+
+   /**
+    * @brief Populates tags with geometry info from projection.  Will write an
+    * rpcb tag if theEnableRpcbTagFlag if set to true.
+    * @param hdr The header to write to.
+    * @param seq The input connection or image source.
+    */
+   void writeGeometry(ossimNitfImageHeaderV2_X* hdr,
+                      ossimImageSourceSequencer* seq);
+
+   /**
+    * @brief Adds the BLOCKA tag.
+    *
+    * @param mapInfo ossimMapProjectionInfo to use to set tag with.
+    * @param hdr The header to write to.
+    *
+    * @note Currently only used with map projected images.
+    */
+   void addBlockaTag(ossimMapProjectionInfo& mapInfo,
+                     ossimNitfImageHeaderV2_X* hdr);
+
+   /**
+    * @brief Adds the RPC00B tag.
+    *
+    * @param rect Requested rectangle of image to write.
+    *
+    * @param proj The output projection.
+    */
+   void addRpcbTag(const ossimIrect& rect,
+                   ossimProjection* proj,
+                   ossimNitfImageHeaderV2_X* hdr);
+
+   /**
+    * @brief Sets the complexity level of theFileHeader.
+    *
+    * @param endPosition This should be the end seek position of the file.
+    */
+   void setComplexityLevel(std::streamoff,
+                           ossimNitfFileHeaderV2_X* hdr);
+
+   /**
+    * @brief Sets file header and image header defaults from config file if
+    * found in preferences.
+    */
+   virtual void initializeDefaultsFromConfigFile(
+      ossimNitfFileHeaderV2_X* fileHdr,
+      ossimNitfImageHeaderV2_X* imgHdr );   
+
+   /** @brief If true user wants to set RPC00B tag. (DEFAULT = false) */
+   bool theEnableRpcbTagFlag;
+   
+   /**
+    * @brief If true user wants to set BLOCKA tag. (DEFAULT = true)
+    * Currently only valid for map projected images.
+    */
+   bool theEnableBlockaTagFlag;
+
+   
+
+private:
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimKakaduNitfVoid Writer_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimNormalizedRemapTable.h b/ossim/include/ossim/imaging/ossimNormalizedRemapTable.h
new file mode 100644
index 0000000..5a6ecd6
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimNormalizedRemapTable.h
@@ -0,0 +1,85 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Description:
+//
+// Contains class declaration for base class ossimNormalizedRemapTable.
+// 
+//*******************************************************************
+//  $Id: ossimNormalizedRemapTable.h 23664 2015-12-14 14:17:27Z dburken $
+
+
+#ifndef ossimNormalizedRemapTable_HEADER
+#define ossimNormalizedRemapTable_HEADER
+
+#include <ossim/base/ossimConstants.h>
+
+/**
+ * @class ossimNormalizedRemapTable
+ *
+ * @brief Base class implemetation of normalized remap tables to go to/from
+ * normalized value to pixel value.
+ */
+class OSSIM_DLL ossimNormalizedRemapTable
+{
+public:
+
+   /** default constructor */
+   ossimNormalizedRemapTable();
+
+   /** virtual destructor */
+   virtual ~ossimNormalizedRemapTable();
+
+   /**
+    *  @brief Gets a normalized value (between '0.0' and '1.0') from
+    *  a pixel value.
+    *
+    *  @return Value between 0.0 and 1.0.
+    */
+   virtual ossim_float64 operator[](ossim_int32 pix) const = 0;
+
+   /**
+    *  @brief Gets a normalized value (between '0.0' and '1.0') from
+    *  a pixel value.
+    *
+    *  @return Value between 0.0 and 1.0.
+    */
+   virtual ossim_float64 normFromPix(ossim_int32 pix) const = 0;
+
+   /**
+    * @brief Returns an pixel value as an int from a normalized value.
+    *
+    * @return Value between scalar range of remap table.
+    */
+   virtual ossim_int32 pixFromNorm(ossim_float64 normPix) const = 0;
+
+   /**
+    * @brief Pure virtual method to get the number of table entries.
+    * @return The number of entries in a table.
+    */
+   virtual ossim_int32 getEntries() const = 0;
+
+   /**
+    * @brief Get the value used to normalize and un-normalize table entries.
+    * @return Value used to normalize and un-normalize table entries.
+    */
+   virtual ossim_float64 getNormalizer() const;
+
+private:
+
+   // Forbid copy constructor and asignment operator.
+   ossimNormalizedRemapTable(const ossimNormalizedRemapTable& source);
+   ossimNormalizedRemapTable& operator=(const ossimNormalizedRemapTable&);  
+
+ };
+
+inline ossim_float64 ossimNormalizedRemapTable::getNormalizer() const
+{
+   return static_cast<ossim_float64>(getEntries()-1);
+}
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimNormalizedS16RemapTable.h b/ossim/include/ossim/imaging/ossimNormalizedS16RemapTable.h
new file mode 100644
index 0000000..0ee4258
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimNormalizedS16RemapTable.h
@@ -0,0 +1,147 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Description:
+//
+// Contains class declaration for  ossimNormalizedS16RemapTable.  Table for
+// normalizing signed 16 bit data.
+// 
+//*******************************************************************
+//  $Id: ossimNormalizedS16RemapTable.h 10456 2007-02-08 14:17:50Z gpotts $
+
+#ifndef ossimNormalizedS16RemapTable_HEADER
+#define ossimNormalizedS16RemapTable_HEADER
+
+#include <ossim/imaging/ossimNormalizedRemapTable.h>
+#include <ossim/base/ossimCommon.h> /* for round */
+
+/**
+ * @class ossimNormalizedS16RemapTable
+ *
+ * @brief Signed 16 bit normalized remap tables to go to/from
+ * normalized value to pixel value.
+ */
+class OSSIM_DLL ossimNormalizedS16RemapTable : public ossimNormalizedRemapTable
+{
+public:
+   
+   /** @brief default constructor */
+   ossimNormalizedS16RemapTable();
+
+   /** @brief virtual destructor */
+   virtual ~ossimNormalizedS16RemapTable();
+
+   enum
+   {
+      TABLE_ENTRIES  = 65536,  // 2^16 32767-(-32768)+1
+      OFFSET_TO_ZERO = 32768,  // Gets -32768 to zero.
+      NULL_PIX       = -32768,
+      MIN_PIX        = -32767 
+   };
+
+   /**
+    * @brief Gets the number of table entries.
+    * @return The number of entries in a table.
+    */
+   virtual ossim_int32 getEntries() const;
+
+   /**
+    * @brief Gets normalized value (between '0.0' and '1.0') from an
+    * int which should in scalar range of a signed 16 bit.
+    *
+    * @note This table is specialized to map both -32768 and -32767 to 0 since
+    * dted data has a null of -32767.
+    * 
+    * @return Value between 0.0 and 1.0.
+    */
+   virtual ossim_float64 operator[](ossim_int32 pix) const;
+
+   /**
+    * @brief Gets normalized value (between '0.0' and '1.0') from an
+    * int which should in scalar range of a signed 16 bit.
+    *
+    * @note This table is specialized to map both -32768 and -32767 to 0 since
+    * dted data has a null of -32767.
+    *
+    * @return Value between 0.0 and 1.0.
+    */
+   virtual ossim_float64 normFromPix(ossim_int32 pix) const;
+
+   /**
+    * @brief Gets pixel value from normalized value.
+    *
+    * Valid returns range is signed 16 bit range or -32768 to 32767.
+    *
+    * @return Value between -32768 to 32767.
+    */
+   virtual ossim_int32 pixFromNorm(ossim_float64 normPix) const;
+
+private:
+
+   static ossim_float64  theTable[TABLE_ENTRIES];
+   static bool theTableIsInitialized;
+
+};
+
+inline ossim_int32 ossimNormalizedS16RemapTable::getEntries() const
+{
+   return TABLE_ENTRIES;
+}
+
+inline ossim_float64 ossimNormalizedS16RemapTable::operator[](
+   ossim_int32 pix) const
+{
+   ossim_float64 result = 0;
+
+   // Move pix into table range.  This will take -32768 to 0.
+   ossim_int32 p = pix + OFFSET_TO_ZERO;
+
+   result = (p < TABLE_ENTRIES ? ( p >= 0 ? theTable[p] : 0.0) : 1.0);
+
+   return result;
+}
+
+inline ossim_float64 ossimNormalizedS16RemapTable::normFromPix(
+   ossim_int32 pix) const
+{
+   ossim_float64 result = 0;
+
+   // Move pix into table range.  This will take -32768 to 0.
+   ossim_int32 p = pix + OFFSET_TO_ZERO;
+
+   result = (p < TABLE_ENTRIES ? ( p >= 0 ? theTable[p] : 0.0) : 1.0);
+
+   return result;
+}
+
+inline ossim_int32 ossimNormalizedS16RemapTable::pixFromNorm(
+   ossim_float64 normPix) const
+{
+   if(normPix <= 0.0) return NULL_PIX;
+   
+   // Clamp between 0 and 1 on the way in.
+   ossim_float64 p = (normPix<1.0) ? ( (normPix>0.0) ? normPix : 0.0) : 1.0;
+
+   // Un-normalize.
+   p = p * getNormalizer(); // TABLE_ENTRIES - 1;
+
+   //---
+   // Move pixel into sign range then round it.  This will take  65535 to
+   // 32767 which is the max pixel for this scalar type.
+   //---
+   p = ossim::round<ossim_int32>(p - OFFSET_TO_ZERO);
+
+   if (p == NULL_PIX)
+   {
+      // norm pixel came in just above zero so should be at least min.
+      p = MIN_PIX; 
+   }
+
+   return static_cast<ossim_int32>(p);
+}
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimNormalizedU11RemapTable.h b/ossim/include/ossim/imaging/ossimNormalizedU11RemapTable.h
new file mode 100644
index 0000000..15aeffe
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimNormalizedU11RemapTable.h
@@ -0,0 +1,118 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Description:
+//
+// Contains class declaration for  ossimNormalizedU11RemapTable.  Table for
+// normalizing unsigned 11 bit data.
+//
+//*******************************************************************
+//  $Id: ossimNormalizedU11RemapTable.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimNormalizedU11RemapTable_HEADER
+#define ossimNormalizedU11RemapTable_HEADER
+
+#include <ossim/imaging/ossimNormalizedRemapTable.h>
+#include <ossim/base/ossimCommon.h> /* for round */
+
+/**
+ * @class ossimNormalizedU11RemapTable
+ *
+ * @brief Eleven bit normalized remap table to go to/from normalized value
+ * to pixel value.
+ */
+class OSSIM_DLL ossimNormalizedU11RemapTable : public ossimNormalizedRemapTable
+{
+public:
+
+   /** @brief default constructor */
+   ossimNormalizedU11RemapTable();
+   /** @brief virtual destructor */
+   virtual ~ossimNormalizedU11RemapTable();
+
+
+   enum
+   {
+      TABLE_ENTRIES = 2048 //  2^11
+   };
+
+   /**
+    * @brief Gets the number of table entries.
+    * @return The number of entries in a table.
+    */
+   virtual ossim_int32 getEntries() const;
+
+   /**
+    *  @brief Gets a normalized value (between '0.0' and '1.0') from
+    *  a pixel value.
+    *
+    *  @return Value between 0.0 and 1.0.
+    */
+   virtual ossim_float64 operator[](ossim_int32 pix) const;
+
+   /**
+    *  @brief Gets a normalized value (between '0.0' and '1.0') from
+    *  a pixel value.
+    *
+    *  @return Value between 0.0 and 1.0.
+    */
+   virtual ossim_float64 normFromPix(ossim_int32 pix) const;
+
+   /**
+    * @brief Returns an pixel value as an int from a normalized value.
+    *
+    * @return Value between scalar range of remap table.
+    */
+   virtual ossim_int32 pixFromNorm(ossim_float64 normPix) const;   
+
+private:
+
+   static ossim_float64  theTable[TABLE_ENTRIES];
+   static bool theTableIsInitialized;
+   
+};
+
+inline ossim_int32 ossimNormalizedU11RemapTable::getEntries() const
+{
+   return TABLE_ENTRIES;
+}
+
+inline ossim_float64 ossimNormalizedU11RemapTable::operator[](
+   ossim_int32 pix) const
+{
+   return ( (pix < TABLE_ENTRIES) ? (pix >= 0 ? theTable[pix] : 0.0) : 1.0);  
+}
+
+inline ossim_float64 ossimNormalizedU11RemapTable::normFromPix(
+   ossim_int32 pix) const
+{
+   return ( (pix < TABLE_ENTRIES) ? (pix >= 0 ? theTable[pix] : 0.0) : 1.0);
+}
+
+inline ossim_int32 ossimNormalizedU11RemapTable::pixFromNorm(
+   ossim_float64 normPix) const
+{
+   if(normPix <= 0.0) return 0;
+   
+   // un-normalize...
+   ossim_float64 p = normPix * getNormalizer();
+
+   // Ensure pixel is in range.
+   p = ( (p < TABLE_ENTRIES) ? (p >= 0.0 ? p : 0.0) : getNormalizer());
+
+   // Since going from double to int round...
+   p = ossim::round<ossim_int32>(p);
+
+   if(p == 0.0)
+   {
+      p = 1.0;
+   }
+   
+   return static_cast<ossim_int32>(p);
+}
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimNormalizedU16RemapTable.h b/ossim/include/ossim/imaging/ossimNormalizedU16RemapTable.h
new file mode 100644
index 0000000..eb83e28
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimNormalizedU16RemapTable.h
@@ -0,0 +1,117 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Description:
+//
+// Contains class declaration for  ossimNormalizedU16RemapTable.  Table for
+// normalizing unsigned 16 bit data.
+// 
+//*******************************************************************
+//  $Id: ossimNormalizedU16RemapTable.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimNormalizedU16RemapTable_HEADER
+#define ossimNormalizedU16RemapTable_HEADER
+
+#include <ossim/imaging/ossimNormalizedRemapTable.h>
+#include <ossim/base/ossimCommon.h> /* for round */
+
+/**
+ * @class ossimNormalizedU16RemapTable
+ *
+ * @brief Unsigned 16 bit normalized remap table to go to/from normalized value
+ * to pixel value.
+ */
+class OSSIM_DLL ossimNormalizedU16RemapTable : public ossimNormalizedRemapTable
+{
+public:
+
+   /** @brief default constructor */
+   ossimNormalizedU16RemapTable();
+   /** @brief virtual destructor */
+   virtual ~ossimNormalizedU16RemapTable();
+
+   enum
+   {
+      TABLE_ENTRIES   = 65536 // 2^16
+   };
+
+   /**
+    * @brief Gets the number of table entries.
+    * @return The number of entries in a table.
+    */
+   virtual ossim_int32 getEntries() const;
+   
+   /**
+    *  @brief Gets a normalized value (between '0.0' and '1.0') from
+    *  a pixel value.
+    *
+    *  @return Value between 0.0 and 1.0.
+    */
+   virtual ossim_float64 operator[](ossim_int32 pix) const;
+
+   /**
+    *  @brief Gets a normalized value (between '0.0' and '1.0') from
+    *  a pixel value.
+    *
+    *  @return Value between 0.0 and 1.0.
+    */
+   virtual ossim_float64 normFromPix(ossim_int32 pix) const;
+
+   /**
+    * @brief Returns an pixel value as an int from a normalized value.
+    *
+    * @return Value between scalar range of remap table.
+    */
+   virtual ossim_int32 pixFromNorm(ossim_float64 normPix) const;
+   
+protected:
+
+   static ossim_float64  theTable[TABLE_ENTRIES];
+   static bool theTableIsInitialized;
+   
+};
+
+inline ossim_int32 ossimNormalizedU16RemapTable::getEntries() const
+{
+   return TABLE_ENTRIES;
+}
+
+inline ossim_float64 ossimNormalizedU16RemapTable::operator[](
+   ossim_int32 pix) const
+{
+   return ( (pix < TABLE_ENTRIES) ? (pix >= 0 ? theTable[pix] : 0.0) : 1.0);  
+}
+
+inline ossim_float64 ossimNormalizedU16RemapTable::normFromPix(
+   ossim_int32 pix) const
+{
+   return ( (pix < TABLE_ENTRIES) ? (pix >= 0 ? theTable[pix] : 0.0) : 1.0);
+}
+
+inline ossim_int32 ossimNormalizedU16RemapTable::pixFromNorm(
+   ossim_float64 normPix) const
+{
+   if(normPix <= 0.0) return 0;
+   
+   // un-normalize...
+   ossim_float64 p = normPix * getNormalizer();
+
+   // Ensure pixel is in range.
+   p = ( (p < TABLE_ENTRIES) ? (p >= 0.0 ? p : 0.0) : getNormalizer());
+
+   // Since going from double to int round...
+   p = ossim::round<ossim_int32>(p);
+       
+   if(p == 0.0)
+   {
+      p = 1.0;
+   }
+   
+   return static_cast<ossim_int32>(p);
+}
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimNormalizedU8RemapTable.h b/ossim/include/ossim/imaging/ossimNormalizedU8RemapTable.h
new file mode 100644
index 0000000..923aea6
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimNormalizedU8RemapTable.h
@@ -0,0 +1,117 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Description:
+//
+// Contains class declaration for  ossimNormalizedU8RemapTable.  Table for
+// normalizing unsigned 8 bit data.
+// 
+//*******************************************************************
+//  $Id: ossimNormalizedU8RemapTable.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimNormalizedU8RemapTable_HEADER
+#define ossimNormalizedU8RemapTable_HEADER
+
+#include <ossim/imaging/ossimNormalizedRemapTable.h>
+#include <ossim/base/ossimCommon.h> /* for round */
+
+/**
+ * @class ossimNormalizedU8RemapTable
+ *
+ * @brief Eight bit normalized remap table to go to/from normalized value
+ * to pixel value.
+ */
+class OSSIM_DLL ossimNormalizedU8RemapTable : public ossimNormalizedRemapTable
+{
+public:
+
+   /** @brief default constructor */
+   ossimNormalizedU8RemapTable();
+   /** @brief virtual destructor */
+   virtual ~ossimNormalizedU8RemapTable();
+
+ 
+   enum
+   {
+      TABLE_ENTRIES = 256 // 2^8
+   };
+
+   /**
+    * @brief Gets the number of table entries.
+    * @return The number of entries in a table.
+    */
+   virtual ossim_int32 getEntries() const;
+
+   /**
+    *  @brief Gets a normalized value (between '0.0' and '1.0') from
+    *  a pixel value.
+    *
+    *  @return Value between 0.0 and 1.0.
+    */
+   virtual ossim_float64 operator[](ossim_int32 pix) const;
+
+   /**
+    *  @brief Gets a normalized value (between '0.0' and '1.0') from
+    *  a pixel value.
+    *
+    *  @return Value between 0.0 and 1.0.
+    */
+   virtual ossim_float64 normFromPix(ossim_int32 pix) const;
+
+   /**
+    * @brief Returns an pixel value as an int from a normalized value.
+    *
+    * @return Value between scalar range of remap table.
+    */
+   virtual ossim_int32 pixFromNorm(ossim_float64 normPix) const;
+
+protected:
+
+   static ossim_float64 theTable[TABLE_ENTRIES];
+   static bool theTableIsInitialized;
+
+};
+
+inline ossim_int32 ossimNormalizedU8RemapTable::getEntries() const
+{
+   return TABLE_ENTRIES;
+}
+
+inline ossim_float64 ossimNormalizedU8RemapTable::operator[](
+   ossim_int32 pix) const
+{
+   return ( (pix < TABLE_ENTRIES) ? (pix >= 0 ? theTable[pix] : 0.0) : 1.0);  
+}
+
+inline ossim_float64 ossimNormalizedU8RemapTable::normFromPix(
+   ossim_int32 pix) const
+{
+   return ( (pix < TABLE_ENTRIES) ? (pix >= 0 ? theTable[pix] : 0.0) : 1.0);
+}
+
+inline ossim_int32 ossimNormalizedU8RemapTable::pixFromNorm(
+   ossim_float64 normPix) const
+{
+   if(normPix <= 0.0) return 0;
+   
+   ossim_float64 p = normPix * getNormalizer();
+
+   // Ensure pixel is in range.
+   p = ( (p < TABLE_ENTRIES) ? (p >= 0.0 ? p : 0.0) : getNormalizer());
+
+   // Since going from double to int round...
+   p = ossim::round<ossim_int32>(p);
+       
+   if(p == 0.0)
+   {
+      p = 1;
+   }
+   
+   return static_cast<ossim_int32>(p);
+}
+
+#endif
+
diff --git a/include/ossim/imaging/ossimNullPixelFlip.h b/ossim/include/ossim/imaging/ossimNullPixelFlip.h
similarity index 100%
rename from include/ossim/imaging/ossimNullPixelFlip.h
rename to ossim/include/ossim/imaging/ossimNullPixelFlip.h
diff --git a/ossim/include/ossim/imaging/ossimOrthoImageMosaic.h b/ossim/include/ossim/imaging/ossimOrthoImageMosaic.h
new file mode 100644
index 0000000..4873d78
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimOrthoImageMosaic.h
@@ -0,0 +1,62 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimOrthoImageMosaic.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimOrthoImageMosaic_HEADER
+#define ossimOrthoImageMosaic_HEADER
+
+#include <ossim/imaging/ossimImageMosaic.h>
+
+class OSSIMDLLEXPORT ossimOrthoImageMosaic : public ossimImageMosaic
+{
+public:
+   ossimOrthoImageMosaic();
+   ossimOrthoImageMosaic(ossimConnectableObject::ConnectableObjectList& inputSources);
+   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const;
+   virtual void initialize();
+
+   //! Returns the geometry associated with the full mosaic. This object maintains it's own 
+   //! geometry instance.
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+
+   //! Used to retrieve the number of overlapping images withint the given rect.
+   virtual ossim_uint32 getNumberOfOverlappingImages(const ossimIrect& rect, ossim_uint32 resLevel=0)const;
+
+   //! Used to populate the result with the index of the overlapping images.
+   virtual void getOverlappingImages(std::vector<ossim_uint32>& result,
+                                     const ossimIrect& rect,
+                                     ossim_uint32 resLevel=0)const;
+   
+   virtual ossimRefPtr<ossimImageData> getNextTile(ossim_uint32& returnedIdx,
+                                                   const ossimIrect& origin,
+                                                   ossim_uint32 resLevel=0);
+   
+   ossimIrect getRelativeRect(ossim_uint32 index,
+                              ossim_uint32 resLevel = 0)const;
+protected:
+   virtual ~ossimOrthoImageMosaic();   
+   void computeBoundingRect(ossim_uint32 resLevel=0);
+   
+   //! If this object is maintaining an ossimImageGeometry, this method needs to be called after 
+   //! each time the contents of the mosaic changes.
+   void updateGeometry();
+
+   std::vector<ossimDpt>  m_InputTiePoints;
+   ossimDpt    m_Delta; //!< Holds R0 delta and will be scaled for different r-level requests
+   ossimDpt    m_UpperLeftTie; //!< Will hold the upper left tie of the mosaic.
+   ossimIrect  m_BoundingRect;
+   ossimString m_Units;
+   ossimRefPtr<ossimImageGeometry> m_Geometry; //!< The input image geometry, altered by the map tiepoint
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimOverviewBuilderBase.h b/ossim/include/ossim/imaging/ossimOverviewBuilderBase.h
new file mode 100644
index 0000000..2cda8bb
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimOverviewBuilderBase.h
@@ -0,0 +1,241 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:  Base class for overview builders.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimOverviewBuilderBase.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimOverviewBuilderBase_HEADER
+#define ossimOverviewBuilderBase_HEADER 1
+
+#include <ossim/base/ossimSource.h>
+#include <ossim/base/ossimProcessInterface.h>
+#include <ossim/base/ossimConnectableObjectListener.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/base/ossimRtti.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/imaging/ossimBitMaskWriter.h>
+#include <ossim/imaging/ossimMaskFilter.h>
+#include <vector>
+
+class ossimImageFileWriter;
+class ossimFilename;
+
+class OSSIM_DLL ossimOverviewBuilderBase
+   :
+      public ossimSource,
+      public ossimProcessInterface,
+      public ossimConnectableObjectListener
+{
+public:
+
+   /** default constructor */
+   ossimOverviewBuilderBase();
+
+   /**
+    * @brief Sets an optional file writer to the builder.
+    * Currently used by the virtual overview builder.
+    * 
+    * @param outputWriter The file writer of the builder.
+    * 
+    * @return True on successful initialization, false on error.
+    */
+   virtual bool setOutputWriter(ossimImageFileWriter* outputWriter);
+
+   /**
+    * @brief Sets the input to the builder.
+    * 
+    * @param imageSource The input to the builder.
+    * 
+    * @return True on successful initialization, false on error.
+    */
+   virtual bool setInputSource(ossimImageHandler* imageSource);
+
+   /**
+    * @brief Sets the output file name. (pure virtual)
+    * @prama file This will be the output file name like foo.ovr
+    */
+   virtual void setOutputFile(const ossimFilename& file)=0;
+
+   /**
+    * @brief Gets the output file name. (pure virtual)
+    *
+    * @return The output file name or ossimFilename::NIL if it was not set
+    * yet and the image handle has not been initialized.
+    *
+    * @note This will return ossimFilename::NIL unless one of was called,
+    * setInputSource or setOutputFile.
+    */
+   virtual ossimFilename getOutputFile() const=0;
+
+   /**
+    * @brief Sets the overview output type. (pure virtual)
+    * @param type This should be the string representing the type.  This method
+    * will do nothing if type is not handled and return false.
+    * @return true if type is handled, false if not.
+
+    * @note Currently handled types are 
+    */
+   virtual bool setOverviewType(const ossimString& type)=0;
+
+   /**
+    * @brief Gets the overview type. (pure virtual)
+    * @return The overview output type as a string. */
+   virtual ossimString getOverviewType() const=0;
+
+   /**
+    * @brief Method to check if builder can handle type.
+    * @return true if type is handled by builder, false if not.
+    */
+   virtual bool hasOverviewType(const ossimString& type) const;
+
+   /**
+    * @brief Method to populate class supported types. (pure virtual)
+    * Example:
+    * ossimTiffOverviewNearest
+    * ossimTiffOverviewBox
+    *
+    * @param typeList List of ossimStrings to add to.
+    */
+   virtual void getTypeNameList(std::vector<ossimString>& typeList)const=0;
+
+   /**
+    * @brief Get the overview stop dimension.
+    * @return The overview stop dimension.
+    */
+   virtual ossim_uint32 getOverviewStopDimension() const;
+
+   /**
+    * @brief Sets the overview stop dimension.
+    *
+    * This controls how many layers will be built. If set to 64 then the
+    * builder will stop when height and width for current level are less
+    * than or equal to 64.  Note a default can be set in the ossim preferences
+    * file, setting the keyword "overview_stop_dimension".
+    * 
+    * @param dim The overview stop dimension
+    */
+   virtual void setOverviewStopDimension(ossim_uint32 dim);
+
+   /**
+    * @brief Gets the histogram accumulation mode.
+    * @return mode NONE, NORMAL or FAST.
+    */
+   ossimHistogramMode getHistogramMode() const;
+
+   /**
+    * @brief Sets the histogram accumulation mode.
+    * @param mode NONE, NORMAL or FAST.
+    */
+   void setHistogramMode(ossimHistogramMode mode);
+ 
+   /**
+    * @brief Builds the overviews. (pure virtual)
+    *
+    * @return true on success, false on error.
+    */
+   virtual bool execute()=0;
+
+   /**
+    * @brief Finalize method.  Should be called at end of execute.
+    *
+    * This implementation will reset the the output band list if the source
+    * image handler is a band selector.
+    */
+   virtual void finalize();
+
+   /**
+    * @brief Specifies parameters (in KWL) for generation of an alpha (bit)
+    * mask such that any full or partial null pixels will be masked out. A
+    * mask file will be written to the source image directory with the image
+    * file name and extension ".mask". 
+    */
+   void setBitMaskSpec(const ossimKeywordlist& bit_mask_spec);
+
+   /**
+    * @brief Turn on/off scan for min max flag.
+    * This method assumes the null is known.
+    * @param flag true turns scan on, false off. Default=off.
+    */
+   void setScanForMinMax(bool flag);
+
+   /** @return scan for min max flag. */
+   bool getScanForMinMax() const;
+
+   /**
+    * @brief Turn on/off scan for min, max, null flag.
+    * Attempts to find null, min and max where null is the minimum value found,
+    * min is the second most min and max is max.
+    * @param flag true turns scan on, false off. Default=off.
+    */
+   void setScanForMinMaxNull(bool flag);
+
+   /** @return scan for min max flag. */
+   bool getScanForMinMaxNull() const;
+
+protected:
+   /** virtual destructor */
+   virtual ~ossimOverviewBuilderBase();
+
+   /**
+    *  @brief Gets the required number of res levels.
+    *
+    *  Convenience method to get the required number of reduced resolution
+    *  data sets to get to the smallest dimension of the output tile size.
+    *  Note that this include r0.
+    *
+    *  @param ih Pointer to the image handler.
+    *
+    *  @return number of res levels.
+    */
+   ossim_uint32 getRequiredResLevels(const ossimImageHandler* ih) const;
+  
+   /**
+    * @brief Initializes preference settings.
+    *
+    * Currently:
+    *
+    * 1) Gets the default stop dimension.
+    *
+    * Looks for overview_stop_dimension, then will use minimum default tile
+    * size if that is not found.
+    * 
+    * 2) Set scan float data flag.
+    *
+    * Looks for overview_builder.scan_for_min_max_null_if_float.
+    *
+    * If true this will turn the m_scanForMinMaxNull on if the scalar type of
+    * image handler is float.
+    */
+   void initializePreferenceSettings();
+
+   /**
+    * @brief Checks scalar type and turns on scanning for min, max, nulls if
+    * needed.
+    */
+   void initializeScanOptions();
+   
+   ossim_uint32 m_overviewStopDimension;
+   ossimHistogramMode m_histoMode; 
+   ossimKeywordlist m_bitMaskSpec;
+   ossimRefPtr<ossimImageHandler>  m_imageHandler;
+   std::vector<ossim_uint32>       m_originalBandList;
+   ossimRefPtr<ossimBitMaskWriter> m_maskWriter;
+   ossimRefPtr<ossimMaskFilter>    m_maskFilter;
+   ossimFilename                   m_outputFile;
+   bool                            m_scanForMinMax;
+   bool                            m_scanForMinMaxNull;
+   bool                            m_scanFloatData;
+
+   /** for rtti stuff */
+   TYPE_DATA
+};
+
+#endif /* End of "#ifndef ossimOverviewBuilderBase_HEADER" */
+
diff --git a/include/ossim/imaging/ossimOverviewBuilderFactory.h b/ossim/include/ossim/imaging/ossimOverviewBuilderFactory.h
similarity index 100%
rename from include/ossim/imaging/ossimOverviewBuilderFactory.h
rename to ossim/include/ossim/imaging/ossimOverviewBuilderFactory.h
diff --git a/include/ossim/imaging/ossimOverviewBuilderFactoryBase.h b/ossim/include/ossim/imaging/ossimOverviewBuilderFactoryBase.h
similarity index 100%
rename from include/ossim/imaging/ossimOverviewBuilderFactoryBase.h
rename to ossim/include/ossim/imaging/ossimOverviewBuilderFactoryBase.h
diff --git a/include/ossim/imaging/ossimOverviewBuilderFactoryRegistry.h b/ossim/include/ossim/imaging/ossimOverviewBuilderFactoryRegistry.h
similarity index 100%
rename from include/ossim/imaging/ossimOverviewBuilderFactoryRegistry.h
rename to ossim/include/ossim/imaging/ossimOverviewBuilderFactoryRegistry.h
diff --git a/include/ossim/imaging/ossimOverviewSequencer.h b/ossim/include/ossim/imaging/ossimOverviewSequencer.h
similarity index 100%
rename from include/ossim/imaging/ossimOverviewSequencer.h
rename to ossim/include/ossim/imaging/ossimOverviewSequencer.h
diff --git a/include/ossim/imaging/ossimPdfWriter.h b/ossim/include/ossim/imaging/ossimPdfWriter.h
similarity index 100%
rename from include/ossim/imaging/ossimPdfWriter.h
rename to ossim/include/ossim/imaging/ossimPdfWriter.h
diff --git a/ossim/include/ossim/imaging/ossimPiecewiseRemapper.h b/ossim/include/ossim/imaging/ossimPiecewiseRemapper.h
new file mode 100644
index 0000000..2d3727f
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimPiecewiseRemapper.h
@@ -0,0 +1,262 @@
+//----------------------------------------------------------------------------
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Piecewise remapper class declaration.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimPiecewiseRemapper_HEADER
+#define ossimPiecewiseRemapper_HEADER 1
+
+#include <ossim/imaging/ossimTableRemapper.h>
+#include <ossim/base/ossimRtti.h>
+#include <vector>
+
+/**
+ * @class ossimPiecewiseRemapper
+ *
+ * Given object2 is a ossimPiecewiseRemapper with a state of:
+ * 
+ * object2.band0.remap0:  ((0,127,0,127),(128,255,128,382))
+ * object2.band0.remap1:  ((0,382,0,255))
+ *
+ * Quadruples map to:
+ * (<min_in> <max_in> <min_out> <max_out>)
+ *
+ * There can be any number of quadrupals.
+ *
+ * From above example:
+ * 
+ * 0 <-> 127 is mapped to 0 <-> 127
+ * 128 <->  255 is mapped to 128 <-> 382
+ * 0 <-> 382 is mapped to 0 <-> 255
+ *
+ * Notes:
+ * 
+ * 1) Currently there is only one remap type so it's not really needed but
+ *    left in the code for future type remaps, e.g. a remap where there is
+ *    a linear and a logarithmic section.
+ *
+ * 2) Any number of "remaps" are allowed.
+ *
+ * 3) Last remap should get data between scalar types.
+ * 
+ */
+class OSSIMDLLEXPORT ossimPiecewiseRemapper : public ossimTableRemapper
+{
+public:
+
+   enum PiecewiseRemapType
+   {
+      UNKNOWN       = 0,
+      LINEAR_NATIVE = 1
+   };
+   
+   /** default constructor */
+   ossimPiecewiseRemapper();
+
+   /** @return "ossimPiecewiseRemapper" */
+   virtual ossimString getClassName()const;
+
+   /** @return "OSSIM Piecewise Remapper" */
+   virtual ossimString getLongName()  const;
+
+   /** @return "Piecewise Remapper" */
+   virtual ossimString getShortName() const;
+
+   /**
+    * @brief Get tile method.
+    * @param tileRect Region of interest.
+    * @param resLevel Resolution level.
+    * @param The requested region of interest for resolution level.
+    */
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel = 0);
+
+   /** @brief Initialization method.  Called on state change of chain. */ 
+   virtual void initialize();
+
+   /**
+    * @brief Sets remap type.
+    *
+    * Current types: "linear_native"
+    *
+    * @param type
+    */
+   void setRemapType( const std::string& type );
+   
+   /**
+    * @brief Saves the state to a keyword list.
+    * @return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+   /**
+    * @brief Loads (recreates) the state of an object from a keyword
+    * list.
+    * @return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+
+   /** @brief Print method.  Called by ossimObject::operator<<. */
+   virtual ostream& print(ostream& os) const;
+
+   /** @return The min pixel of the band. */
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   
+   /** @return The max pixel of the band. */
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+
+protected:
+
+   /**
+    * @brief Protected virtual destructor.
+    *
+    * This class is derived from ossimReferenced; hence, will auto destruct
+    * provided it is wrapped/stored in an ossimRefPtr. Example usage:
+    *
+    * ossimRefPtr<ossimPiecewiseRemapper> pwr = new ossimPiecewiseRemapper();
+    */
+   virtual ~ossimPiecewiseRemapper();
+
+private:
+
+   /**
+    * @class ossimRemapSet
+    *
+    * Private container class. Currently hold an array of doubles.
+    */
+   class ossimRemapSet
+   {
+   public:
+      ossimRemapSet();
+      ossimRemapSet(const ossimRemapSet& obj);
+      const ossimRemapSet& operator=(const ossimRemapSet& rhs);
+      std::vector<ossim_float64> m_set;
+   };
+   
+   /**
+    * @class ossimBandRemap
+    *
+    * Private container class. Holds array of ossimRemapSets for a given band.
+    */
+   class ossimBandRemap
+   {
+   public:
+      ossimBandRemap();
+      ossimBandRemap(const ossimBandRemap& obj);
+      const ossimBandRemap& operator=(const ossimBandRemap& rhs);
+
+      void loadState( const ossimKeywordlist& kwl,
+                      const std::string& prefix,
+                      ossim_uint32 band );
+      
+      void saveState( ossimKeywordlist& kwl,
+                      const std::string& prefix,
+                      ossimPiecewiseRemapper::PiecewiseRemapType remapType,
+                      ossim_uint32 band ) const;
+
+      /**
+       * @brief Initializes set from string.
+       *
+       * Example input: ((0, 127, 0, 127), (128, 255, 128, 382))
+       * 
+       * @param s String to initialize from.
+       * @param set Initialized by this.
+       */
+      bool initRemapSetFromString( const std::string& s,
+                                   ossimPiecewiseRemapper::ossimRemapSet& set ) const;
+
+      /**
+       * @brief Gets a string from remap set for type.
+       * @param remapType
+       * @param set
+       * @param s Initialized by this.
+       */
+      void getRemapSetString( ossimPiecewiseRemapper::PiecewiseRemapType remapType,
+                              const ossimPiecewiseRemapper::ossimRemapSet& set, 
+                              std::string& s ) const;
+
+      void getLinearRemapSetString( const ossimPiecewiseRemapper::ossimRemapSet& set, 
+                                    std::string& s ) const;
+         
+      std::vector<ossimRemapSet> m_remap;
+      
+   }; // End: class ossimBandRemap 
+   
+   /**
+    * @brief Gets a string from remap type.
+    * @param remapType
+    * @param s Initialized by this.
+    */
+   void getRemapTypeString( ossimPiecewiseRemapper::PiecewiseRemapType remapType,
+                            std::string& s ) const;
+
+   /**
+    * @brief Gets a string from remap set.
+    *
+    * Example output: ((0, 127, 0, 127), (128, 255, 128, 382))
+    * 
+    * @param set
+    * @param s Initialized by this.
+    */   
+   void getLinearRemapSetString(
+      const ossimPiecewiseRemapper::ossimRemapSet& set, 
+      std::string& s ) const;
+
+   /** @brief Builds the table. */
+   void buildTable();
+
+   /** @brief Builds the linear native table. */
+   void buildLinearNativeTable();
+
+   /** @brief Builds the linear native table for scalar type T. */
+   template <class T> void buildLinearNativeTable(T dummy);
+   
+   /**
+    * @brief Initialized base class (ossimTableRemapper) values:
+    * - theTableBinCount
+    * - theTableBandCount
+    * - theTableType
+    * - theTable (resizes if not correct size.
+    */
+   void setupTable();
+
+   /** @brief Computes min/max from remaps in m_bandRemap. */
+   void initMinMax();
+
+   /** @private(not allowed) copy constructor. */
+   ossimPiecewiseRemapper(const ossimPiecewiseRemapper& obj);
+
+   /** @private(not allowed) assignment(operator=) */
+   ossimPiecewiseRemapper& operator=(const ossimPiecewiseRemapper& hr);
+
+   /** @brief Dirty flag to indicate table needs to be rebuilt. */
+   bool m_dirty;
+   
+   PiecewiseRemapType m_remapType;
+
+   // One set per band.
+   std::vector<ossimPiecewiseRemapper::ossimBandRemap> m_bandRemap;
+
+#if 1 /* Not sure if we need min/max right now.(drb) */
+   // Stores the min/max from the table for each band.
+   vector<ossim_float64> m_min;
+   vector<ossim_float64> m_max;
+#endif
+
+   TYPE_DATA
+};
+
+#endif  /* #ifndef ossimPiecewiseRemapper_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimPixelFlipper.h b/ossim/include/ossim/imaging/ossimPixelFlipper.h
new file mode 100644
index 0000000..f85a4ed
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimPixelFlipper.h
@@ -0,0 +1,273 @@
+//*******************************************************************
+// Copyright (C) 2002 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Class to scan pixels and flip target dn pixel value to new dn pixel value.
+// This was written to fix partial null pixels.
+// 
+//*************************************************************************
+// $Id: ossimPixelFlipper.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimPixelFlipper_HEADER
+#define ossimPixelFlipper_HEADER
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+#include <ossim/base/ossimPolygon.h>
+#include <OpenThreads/ReentrantMutex>
+
+/**
+ *  Class to scan pixels and flip target dn value to a replacement dn
+ *  value.
+ *
+ *  This was written to fix problems with null pixels, i.e. an image has a
+ *  digital number(dn) of 255 for null and it is desired to use a dn of 0 as
+ *  a null.  This can really be used to flip any pixel value to another.
+ *
+ *  @note This filter currently works on the input tile directly and does
+ *  not copy the data.
+ *
+ *  @see theReplacementMode data member documentation for more info.
+ */
+class OSSIM_DLL ossimPixelFlipper : public ossimImageSourceFilter
+{
+public:
+   static const char PF_TARGET_VALUE_KW[];     
+   static const char PF_TARGET_RANGE_KW[];     
+   static const char PF_REPLACEMENT_VALUE_KW[];
+   static const char PF_REPLACEMENT_MODE_KW[];
+   static const char PF_CLAMP_VALUE_KW[];
+   static const char PF_CLAMP_VALUE_LO_KW[];   
+   static const char PF_CLAMP_VALUE_HI_KW[];   
+   static const char PF_CLIP_MODE_KW[];
+
+   /**
+    * Target Replacement Mode:
+    * 
+    * Examples given for 3-band pixel values as (R, G, B) with target = 0, and replacement = 1
+
+    * If mode is REPLACE_BAND_IF_TARGET (default):
+    * Any pixel band with value of target will be replaced.
+    * (0, 0, 0) becomes (1, 1, 1)
+    * (0, 3, 2) becomes (1, 3, 2)
+    *
+    * If mode is REPLACE_BAND_IF_PARTIAL_TARGET:
+    * A band with target value will be replaced only if at least one other band in the pixel does 
+    * not have the target.
+    * (0, 0, 0) remains (0, 0, 0)
+    * (0, 3, 2) becomes (1, 3, 2)
+    *
+    * If mode is REPLACE_ALL_BANDS_IF_PARTIAL_TARGET:
+    * All bands of the pixel will be replaced if any but not all bands in the pixel have the
+    * target value.
+    * (0, 0, 0) remains (0, 0, 0)
+    * (0, 3, 2) becomes (1, 1, 1)
+    *
+    * If mode is REPLACE_ONLY_FULL_TARGETS:
+    * All bands in the pixel will be replaced only if they all have the target.
+    * (0, 0, 0) becomes (1, 1, 1)
+    * (0, 3, 2) remains (0, 3, 2)
+    *
+    * If mode is REPLACE_ALL_BANDS_IF_ANY_TARGET:
+    * All bands in the pixel will be replaced if even one band has the target.
+    * (0, 0, 0) becomes (1, 1, 1)
+    * (0, 3, 2) remains (1, 1, 1)
+    */
+   enum ReplacementMode
+   {
+      REPLACE_BAND_IF_TARGET               = 0,
+      REPLACE_BAND_IF_PARTIAL_TARGET       = 1,
+      REPLACE_ALL_BANDS_IF_PARTIAL_TARGET  = 2,
+      REPLACE_ONLY_FULL_TARGETS            = 3,
+      REPLACE_ALL_BANDS_IF_ANY_TARGET      = 4,
+   };
+
+   /** 
+    * When either a lo and/or hi clamp value is set, the clamping mode will be enabled accordingly
+    * and override any target replacement defined
+    */
+   enum ClampingMode
+   {
+      DISABLED                           = 0,
+      CLAMPING_LO                        = 1,
+      CLAMPING_HI                        = 2,
+      CLAMPING_LO_AND_HI                 = 3,
+   };
+
+   enum ClipMode
+   {
+      NONE = 0,
+      BOUNDING_RECT  = 1,
+      VALID_VERTICES = 2
+   };
+
+   /** default constructor */
+   ossimPixelFlipper(ossimObject* owner=NULL);
+
+
+   /** @return "Pixel flipper" as an ossimString. */
+   virtual ossimString getShortName()const;
+
+   /** Initializes the state of the object from theInputConnection. */
+   virtual void initialize();
+
+   /**
+    * @param tile_rect Rectangle to fill tile with.
+    * 
+    * @param resLevel Reduced resolution level to grab from.
+    * 
+    * @return ossimRefPtr<ossimImageData> This is tile that was filled with
+    * tile_rect.
+    *
+    * @note Callers should check the ossimRefPtr::valid method.
+    * The internal pointer of the ossimRefPtr<ossimImageData> can be
+    * null if the tile_rect did not intersect the input connection's
+    * bounding rectangle.
+    */
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect,
+                                               ossim_uint32 resLevel=0);
+
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+   
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+   virtual ossimScalarType getOutputScalarType() const;
+   virtual ossim_float64 getMaxPixelValue (ossim_uint32 band = 0 ) const;
+   virtual ossim_float64 getMinPixelValue (ossim_uint32 band = 0 ) const;
+      
+   virtual std::ostream& print(std::ostream& out) const;
+
+   /** 
+    * @param target_value This is the value to flip. 
+    * @note If clamping is specified, it will take precedence over any target value (or range) test
+    */
+   void setTargetValue(ossim_float64 target_value);
+
+   /** 
+    * Instead of a single value for a target, this method allows for specifying a range of values
+    * to flip to the replacement. The replacement mode is still referenced.
+    * @param  This is the value to flip. 
+    * @note If clamping is specified, it will take precedence over any target range test.
+    */
+   void setTargetRange(ossim_float64 target_min, ossim_float64 target_max);
+
+   /**
+    * @param replacement_value This is the value to flip target to.
+    * @note If clamping is specified, it will take precedence over any target replacement.
+    */
+ void setReplacementValue(ossim_float64 replacement_value);
+
+   /**
+    * @param clamp_value If set all pixel values above this range will (or below if clamp_max_value
+    * = false) be clamped to clamp_value. Must be less than max pixel (or greater than the min 
+    * pixel) value of the input and cannot be null. 
+    * @note If any clamp limit is defined, it will take precedence over any target value (or range)
+    * replacement. The replacement mode is referenced when deciding whether a pixel should be 
+    * clamped or left alone.
+    */
+   void setClampValue(ossim_float64 clamp_value, bool is_high_clamp_value=true);
+   void setClampValues(ossim_float64 clamp_value_lo, ossim_float64 clamp_value_hi);
+
+   /** @see enum ReplacementMode */
+   void setReplacementMode(ossimPixelFlipper::ReplacementMode mode);
+
+   /** Accepts a string that must match the enumerator's label (can be lower case) and sets the 
+    * replacement mode accordingly. If the string is not understood, the mode remains unchanged and
+    * FALSE is returned. */
+   bool setReplacementMode(const ossimString& modeString);
+
+   /** 
+    * Clipping here refers to bounding rect or valid polygon (spacial) clipping, where all pixels
+    * outside the valid area are mapped to the replacement value.
+    */
+   void setClipMode(const ossimString& modeString);
+   void setClipMode(ClipMode mode);
+
+   //ossim_float64 getTargetValue()      const;
+   ossim_float64 getReplacementValue() const;
+   //ossim_float64 getClampValue() const;
+   ossimPixelFlipper::ReplacementMode getReplacementMode()  const;
+   ossimString getReplacementModeString() const;
+   ossimString getClipModeString() const;
+   ClipMode getClipMode() const;
+
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   
+   //! This object can be used outside of an image chain for offline processing of existing tile.
+   template <class T> void flipPixels(T dummy, ossimImageData* inpuTile, ossim_uint32 resLevel);
+
+protected:
+   /** destructor */
+   virtual ~ossimPixelFlipper();
+   template <class T> void clipTile(T dummy,
+                                    ossimImageData* inpuTile,
+                                    ossim_uint32 resLevel);
+
+   /**
+    * Verifies pixel is in range.
+    * @return Returns true if in range else false.
+    */
+   bool inRange(ossim_float64 value) const;
+
+   void allocateClipTileBuffer(ossimRefPtr<ossimImageData> inputImage);
+   
+   /** The value range to replace. For a single value replacement, both Lo and Hi are equal. Any
+    * pixel within this range will be remapped to the replacement value */
+   ossim_float64 theTargetValueLo;
+   ossim_float64 theTargetValueHi;
+
+    /** When target values are defined, this is the value the pixel will assume if the pixel falls 
+     *  within the target range (according to the rules for replacement mode) */
+   ossim_float64 theReplacementValue;
+   ReplacementMode theReplacementMode; //!< See documentation for ReplacementMode enum above
+
+  /** The range of desired pixel values. Any pixels outside this range are set to the corresponding
+    * clamp value. Note that theReplacementValue is not referenced when clamping. */
+   ossim_float64 theClampValueLo;
+   ossim_float64 theClampValueHi;
+   ClampingMode  theClampingMode;
+
+   /**
+    * Border Clip mode
+    *
+    * This will flip to nulls any pixel value outside the specified mode.
+    *
+    * Valid modes are:
+    *
+    * none
+    * bounding_rect
+    * valid_vertices
+    *
+    * if the mode is "none" then nothing is done.
+    * if the mode is "bounding_rect" then the bounding rect for the requested rlevel
+    *                is used and every pixel outside that   
+    */
+   ClipMode        theClipMode;
+   
+   /** For lock and unlock. */
+   mutable OpenThreads::ReentrantMutex      theMutex;
+
+   mutable std::vector<ossimPolygon> theValidVertices;
+   mutable std::vector<ossimIrect>   theBoundingRects;
+
+   ossimRefPtr<ossimImageData> theClipTileBuffer;
+   
+   TYPE_DATA
+};
+
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimPolyCutter.h b/ossim/include/ossim/imaging/ossimPolyCutter.h
new file mode 100644
index 0000000..c87a9d7
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimPolyCutter.h
@@ -0,0 +1,109 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimPolyCutter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimPolyCutter_HEADER
+#define ossimPolyCutter_HEADER
+#include <ossim/imaging/ossimImageSourceFilter.h>
+#include <ossim/base/ossimPolygon.h>
+#include <ossim/imaging/ossimImageDataHelper.h>
+#include <vector>
+
+//class ossimPolyArea2d;
+class ossimImageData;
+
+class OSSIMDLLEXPORT ossimPolyCutter : public ossimImageSourceFilter
+{
+public:
+   enum ossimPolyCutterCutType
+   {
+      OSSIM_POLY_NULL_INSIDE  = 0,
+      OSSIM_POLY_NULL_OUTSIDE = 1
+   };
+   
+   ossimPolyCutter();
+    ossimPolyCutter(ossimImageSource* inputSource,
+                    const ossimPolygon& polygon);
+
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+   
+   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
+
+   virtual void initialize();
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+   
+   /*!
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   virtual void setPolygon(const vector<ossimDpt>& polygon,
+                           ossim_uint32 i = 0);
+   
+   virtual void setPolygon(const vector<ossimIpt>& polygon,
+                           ossim_uint32 i = 0);
+   
+   virtual void addPolygon(const vector<ossimIpt>& polygon);
+   virtual void addPolygon(const vector<ossimDpt>& polygon);
+   virtual void addPolygon(const ossimPolygon& polygon);
+   
+   virtual void setNumberOfPolygons(ossim_uint32 count);
+   
+   virtual std::vector<ossimPolygon>& getPolygonList();
+
+   virtual const std::vector<ossimPolygon>& getPolygonList()const;
+   
+   void setCutType(ossimPolyCutterCutType cutType);
+   
+   ossimPolyCutterCutType getCutType()const;
+
+   void clear();
+
+   const ossimIrect& getRectangle() const;
+
+   void setRectangle(const ossimIrect& rect);
+   
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+protected:
+   virtual ~ossimPolyCutter();
+
+   /**
+    * Called on first getTile, will initialize all data needed.
+    */
+   void allocate();
+   void computeBoundingRect();
+
+   ossimRefPtr<ossimImageData> theTile;
+
+   /*!
+    * Will hold a pre-computed bounding rect of the
+    * polygon data.
+    */
+   ossimIrect theBoundingRect;
+
+   std::vector<ossimPolygon> thePolygonList;
+
+   /*!
+    * theDefault fill will be outside.
+    */
+   ossimPolyCutterCutType theCutType;
+   ossimImageDataHelper theHelper;
+   bool m_boundingOverwrite;
+
+TYPE_DATA  
+};
+#endif /* #ifndef ossimPolyCutter_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimQbTileFilesHandler.h b/ossim/include/ossim/imaging/ossimQbTileFilesHandler.h
new file mode 100644
index 0000000..d88ed4d
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimQbTileFilesHandler.h
@@ -0,0 +1,45 @@
+//**************************************************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Oscar Kramer
+// 
+//**************************************************************************************************
+// $Id: ossimQbTileFilesHandler.h 2669 2011-06-06 12:28:20Z oscar.kramer $
+#ifndef ossimQbTileFilesHandler_HEADER
+#define ossimQbTileFilesHandler_HEADER
+
+#include <ossim/imaging/ossimTiledImageHandler.h>
+
+// Enable this flag to utilize the system of separate overviews for each tile-file
+#define USING_SUB_OVRS 0
+
+//! Image handler used for tiled Quickbird imagery. 
+class OSSIMDLLEXPORT ossimQbTileFilesHandler : public ossimTiledImageHandler
+{
+public:
+   //!  Constructor (default):
+   ossimQbTileFilesHandler();
+   
+   //! Destructor:
+   virtual ~ossimQbTileFilesHandler();
+   
+   //! @return Returns true on success, false on error.
+   //! @note This method relies on the data member ossimImageData::theImageFile being set.  
+   virtual bool open();
+
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+   
+protected:
+
+   //! Initializes tile image rects by considering adjacent row/col offsets. Called when TIL
+   //! doesn't contain the info. Returns true if successful.
+   bool computeImageRects();
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimQbTileFilesHandler_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimQuickbirdNitfTileSource.h b/ossim/include/ossim/imaging/ossimQuickbirdNitfTileSource.h
new file mode 100644
index 0000000..9e3ace9
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimQuickbirdNitfTileSource.h
@@ -0,0 +1,45 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts (gpotts at imagelinks.com)
+//
+// Description:
+//
+//*******************************************************************
+//  $Id: ossimQuickbirdNitfTileSource.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimQuickbirdNitfTileSource_HEADER
+#define ossimQuickbirdNitfTileSource_HEADER
+#include <ossim/imaging/ossimNitfTileSource.h>
+#include <ossim/base/ossim2dTo2dTransform.h>
+
+class ossimQuickbirdNitfTileSource : public ossimNitfTileSource
+{
+public:
+   virtual bool open();
+
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+   
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+protected:
+   ossimRefPtr<ossim2dTo2dTransform> m_transform;
+TYPE_DATA   
+};
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimQuickbirdTiffTileSource.h b/ossim/include/ossim/imaging/ossimQuickbirdTiffTileSource.h
new file mode 100644
index 0000000..25a178d
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimQuickbirdTiffTileSource.h
@@ -0,0 +1,37 @@
+//----------------------------------------------------------------------------
+// Copyright (c) 2005, David Burken, all rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+// 
+// Copied from ossimQuickbirdNitfTileSource written by Garrett Potts.
+//
+// Description:
+//
+// Class declaration for specialized image handler to pick up offsets from
+// Quick Bird ".TIL" files.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimQuickbirdTiffTileSource.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimQuickbirdTiffTileSource_HEADER
+#define ossimQuickbirdTiffTileSource_HEADER
+
+#include <ossim/imaging/ossimTiffTileSource.h>
+#include <ossim/base/ossim2dTo2dShiftTransform.h>
+
+class OSSIM_DLL ossimQuickbirdTiffTileSource : public ossimTiffTileSource
+{
+public:
+   virtual bool open();
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+   
+protected:
+   ossimFilename m_tileInfoFilename;
+   
+TYPE_DATA   
+};
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimRLevelFilter.h b/ossim/include/ossim/imaging/ossimRLevelFilter.h
new file mode 100644
index 0000000..b5a43b7
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimRLevelFilter.h
@@ -0,0 +1,100 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimRLevelFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimRLevelFilter_HEADER
+#define ossimRLevelFilter_HEADER
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+/*!
+ * This filter is used to adjust the RLevel.  If you would like to
+ * continually change between RLevels or Reslolutions then you can use this
+ * filter to do so.  You can also specify whether or not the rLevel
+ * passed in from the getTile request is added to this classes current
+ * Rlevel.  This is so if you concatenate multiple filters that reduce
+ * the RLevels then it will keep reducing.  For example if I have
+ * 2 filters that both go to RLevel 1 then it actually will go to
+ * 2 since there are 2 decimations happening.  This can be turned off
+ * by specifying the Rlevel not to be additive.
+ */
+class OSSIMDLLEXPORT ossimRLevelFilter : public ossimImageSourceFilter
+{
+public:
+
+   /** @brief default constructor */
+   ossimRLevelFilter();
+
+
+   virtual void getDecimationFactor(ossim_uint32 resLevel,
+                                    ossimDpt& result)const;
+
+   //! Returns a pointer reference to the active image geometry at this filter. The input source
+   //! geometry is modified, so we need to maintain our own geometry object as a data member.
+   ossimRefPtr<ossimImageGeometry> getImageGeometry();
+
+   virtual void setCurrentRLevel(ossim_uint32 rlevel);
+
+   virtual ossim_uint32 getCurrentRLevel()const;
+
+   /*!
+    * Get/set of the data member "theOverrideGeometryFlag".
+    * If set this will override the "getImageGeometry" method and adjust
+    * the getMetersPerPixel or the getDecimalDegreesPerPixel.
+    * Default behavior is to not override method.
+    */
+   virtual bool getOverrideGeometryFlag() const;
+   virtual void setOverrideGeometryFlag(bool override);
+
+   /**
+    * @brief Returns the bounding rectangle.
+    *
+    * @param resLevel This argument is only passed onto the input connection
+    * if this filter is disabled.  @see disableSource().
+    *
+    * To get the bounding rectangle of an rlevel when source is enabled do:
+    * myRLevelFilter->setCurrentRLevel(level);
+    * myRLevelFilter->getBoundingRect();
+    *
+    * @return Rectangle of the current rlevel if enabled; else, the rectangle
+    * of the input connection for resLevel.
+    */
+   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const;
+
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+protected:
+   /** @brief virtual destructor. */
+   virtual ~ossimRLevelFilter();
+   
+   /*!
+    * Initializes result with the sum of decimations from rlevel one to
+    * theCurrentRLevel.
+    */
+   void getSummedDecimation(ossimDpt& result) const;
+   
+   //! If this object is maintaining an ossimImageGeometry, this method needs to be called after 
+   //! a scale change so that the geometry's projection is modified accordingly.
+   void updateGeometry();
+
+   ossim_uint32 theCurrentRLevel;
+   bool         theOverrideGeometryFlag;
+   ossimRefPtr<ossimImageGeometry> m_ScaledGeometry; //!< The input image geometry, altered by the scale
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimRangeDomeTileSource.h b/ossim/include/ossim/imaging/ossimRangeDomeTileSource.h
new file mode 100644
index 0000000..7963003
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimRangeDomeTileSource.h
@@ -0,0 +1,122 @@
+//**************************************************************************************************
+//
+// OSSIM (http://trac.osgeo.org/ossim/)
+//
+// License: MIT
+//
+//**************************************************************************************************
+// $Id: ossimRangeDomeTileSource.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimRangeDomeTileSource_HEADER
+#define ossimRangeDomeTileSource_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimGrect.h>
+#include <vector>
+
+class ossimImageData;
+
+struct ossimRangeDome
+{
+   enum Classification
+   {
+      UNASSIGNED = 0,
+      FRIENDLY_UNSPECIFIED = 1,
+      FRIENDLY_LEVEL_1= 2,
+      FRIENDLY_LEVEL_2 = 3,
+      FRIENDLY_LEVEL_3 = 4,
+      THREAT_UNSPECIFIED = 101,
+      THREAT_LEVEL_1 = 102,
+      THREAT_LEVEL_2 = 103,
+      THREAT_LEVEL_3 = 104
+   };
+
+   ossimRangeDome(std::vector<ossimString>& tokens);
+   ossimGrect boundingRect() const;
+
+   bool valid;
+   ossim_uint32 id;
+   ossimGpt centerGpt;
+   ossimDpt centerIpt;
+   double radiusMeters;
+   ossim_uint32 radiusPixelsSq;
+   Classification classification;
+   double startAz;
+   double endAz;
+   ossimString description;
+};
+
+
+/**
+ * Class used for rendering range domes (a.k.a. "threat domes") as 2-D ortho-images.
+ *
+ * This base class has the rudimentary capability of reading range dome specifications as a CSV file
+ * in the following format (one line per dome object):
+ *
+ *    id, lat, lon, hgt, R, C [,Az0, Az1] [, description]
+ *
+ * where
+ *
+ *    id -- integer ID of data object
+ *    lat, lon, hgt -- Location of center of dome (actually sphere) in WGS84
+ *    R -- radius (in meters) of dome boundary
+ *    C -- classification id (unsigned 8-bit) corresponding to area inside r
+ *    Az0, Az1 -- [optional] starting and ending azimuth (clockwise from Az0 in degrees). If both
+ *         Az0 and Az1 are equal, then 360 deg is implied.
+ *    description -- [optional] string
+ */
+class OSSIMDLLEXPORT ossimRangeDomeTileSource : public ossimImageHandler
+{
+public:
+   ossimRangeDomeTileSource();
+   virtual ~ossimRangeDomeTileSource();
+
+   /**  @brief Reads CSV file representing range domes.  */
+   virtual bool open();
+
+   virtual bool isOpen() const;
+
+   virtual void close();
+
+   virtual void initialize();
+
+   virtual ossimRefPtr<ossimImageData> getTile(const  ossimIrect& rect, ossim_uint32 resLevel=0);
+   virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);
+
+   virtual ossim_uint32    getNumberOfInputBands() const;
+   virtual ossim_uint32    getNumberOfLines(ossim_uint32 resLevel = 0) const;
+   virtual ossim_uint32    getNumberOfSamples(ossim_uint32 resLevel = 0) const;
+   virtual ossim_uint32    getImageTileWidth() const { return 0; }
+   virtual ossim_uint32    getImageTileHeight() const { return 0; }
+   virtual ossimScalarType getOutputScalarType() const { return OSSIM_UINT8; }
+
+
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry() { return theGeometry; }
+
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0) const;
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+
+   /**
+    * The reader properties are:
+    * -- the GSD ("meters_per_pixel")
+    */
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name) const;
+
+   virtual void getGSD(ossimDpt& gsd, ossim_uint32 resLevel) const;
+   virtual void setGSD( const ossim_float64& gsd );
+
+   ossim_uint32 getNumRangeDomes() const { return m_rangeDomes.size(); }
+
+protected:
+   std::vector<ossimRangeDome>       m_rangeDomes;
+   ossimDpt                     m_gsd;
+
+   TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimReadmeFileWriter.h b/ossim/include/ossim/imaging/ossimReadmeFileWriter.h
new file mode 100644
index 0000000..e6d8bcc
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimReadmeFileWriter.h
@@ -0,0 +1,58 @@
+//*******************************************************************
+// Copyright (C) 2003 Storage Area Networks, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Kenneth Melero (kmelero at sanz.com)
+//
+//*******************************************************************
+//  $Id: ossimReadmeFileWriter.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimReadmeFileWriter_H
+#define ossimReadmeFileWriter_H
+
+#include <fstream>
+#include <ossim/imaging/ossimMetadataFileWriter.h>
+
+/** ossimReadmeFileWriter */
+class OSSIMDLLEXPORT ossimReadmeFileWriter : public ossimMetadataFileWriter
+{
+public:
+
+   /** default constructor */
+   ossimReadmeFileWriter();
+
+
+   /**
+    * Satisfies pure virtual from ossimMetadataWriter base.
+    *
+    * Appends the writers image types to the "metadatatypeList".
+    * 
+    * @param metadatatypeList stl::vector<ossimString> list to append to.
+    *
+    * @note Appends to the list, does not clear it first.
+    */
+   virtual void getMetadatatypeList(
+      std::vector<ossimString>& metadatatypeList) const;
+
+   /**
+    * Satisfies pure virtual from ossimMetadataWriter base.
+    *
+    * @param imageType string representing image type.
+    *
+    * @return true if "metadataType" is supported by writer.
+    */
+   virtual bool hasMetadataType(const ossimString& metadataType)const;
+   
+protected:
+   /** virtual destructor */
+   virtual ~ossimReadmeFileWriter();
+   virtual bool writeFile();
+   
+TYPE_DATA
+};
+
+#endif /* End of #ifndef ossimReadmeFileWriter_H */
+
diff --git a/ossim/include/ossim/imaging/ossimRectangleCutFilter.h b/ossim/include/ossim/imaging/ossimRectangleCutFilter.h
new file mode 100644
index 0000000..93a0b3f
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimRectangleCutFilter.h
@@ -0,0 +1,58 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimRectangleCutFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimRectangleCutFilter_HEADER
+#define ossimRectangleCutFilter_HEADER
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+class OSSIM_DLL ossimRectangleCutFilter : public ossimImageSourceFilter
+{
+public:
+   enum ossimRectangleCutType
+   {
+      OSSIM_RECTANGLE_NULL_INSIDE  = 0,
+      OSSIM_RECTANGLE_NULL_OUTSIDE = 1
+   };
+
+   ossimRectangleCutFilter(ossimObject* owner,
+                     ossimImageSource* inputSource=NULL);
+   ossimRectangleCutFilter(ossimImageSource* inputSource=NULL);
+
+   void setRectangle(const ossimIrect& rect);
+
+   const ossimIrect&     getRectangle()const;
+   ossimRectangleCutType getCutType()const;
+   void                  setCutType(ossimRectangleCutType cutType);
+   
+   ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
+   virtual void getValidImageVertices(vector<ossimIpt>& validVertices,
+                                      ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER,
+                                      ossim_uint32 resLevel=0)const;
+
+   ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
+                                       ossim_uint32 resLevel=0);
+
+   virtual void initialize();
+   
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=NULL)const;
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=NULL);
+   
+protected:
+   ossimIrect            theRectangle;
+   ossimRectangleCutType theCutType;
+   vector<ossimDpt>      theDecimationList;
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimRectangleCutFilter_HEADER */
+
diff --git a/include/ossim/imaging/ossimResampler.h b/ossim/include/ossim/imaging/ossimResampler.h
similarity index 100%
rename from include/ossim/imaging/ossimResampler.h
rename to ossim/include/ossim/imaging/ossimResampler.h
diff --git a/ossim/include/ossim/imaging/ossimRgbGridRemapEngine.h b/ossim/include/ossim/imaging/ossimRgbGridRemapEngine.h
new file mode 100644
index 0000000..8f2e590
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimRgbGridRemapEngine.h
@@ -0,0 +1,55 @@
+//*****************************************************************************
+// FILE: ossimRgbGridRemapEngine.h
+//
+// Copyright (C) 2001 ImageLinks, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Contains declaration of class ossimRgbGridRemapEngine
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimRgbGridRemapEngine.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimRgbGridRemapEngine_HEADER
+#define ossimRgbGridRemapEngine_HEADER
+
+#include <ossim/imaging/ossimGridRemapEngine.h>
+
+/*!****************************************************************************
+ *
+ * CLASS: ossimRgbGridRemapEngine 
+ *
+ *****************************************************************************/
+class ossimRgbGridRemapEngine : public ossimGridRemapEngine
+{
+public:
+   ossimRgbGridRemapEngine()
+      : ossimGridRemapEngine(3, 3) {}
+   
+   virtual ossimObject* dup() const;
+   
+   virtual void remapTile(const ossimDpt& origin_point,
+                          ossimGridRemapSource* remapper,
+                          ossimRefPtr<ossimImageData>& tile);
+
+   virtual void assignRemapValues(std::vector<ossimAtbPointSource*>& sources);
+
+   virtual void computeSourceValue(ossimRefPtr<ossimImageData>& source,
+                                   void* result);
+
+protected:
+   virtual void computeRemapNode(ossimAtbPointSource*  point_source,
+                                 void*                 source_value,
+                                 void*                 target_value);
+
+   TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/imaging/ossimRgbImage.h b/ossim/include/ossim/imaging/ossimRgbImage.h
similarity index 100%
rename from include/ossim/imaging/ossimRgbImage.h
rename to ossim/include/ossim/imaging/ossimRgbImage.h
diff --git a/ossim/include/ossim/imaging/ossimRgbToGreyFilter.h b/ossim/include/ossim/imaging/ossimRgbToGreyFilter.h
new file mode 100644
index 0000000..ac51093
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimRgbToGreyFilter.h
@@ -0,0 +1,71 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimRgbToGreyFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimRgbToGreyFilter_HEADER
+#define ossimRgbToGreyFilter_HEADER
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+class OSSIMDLLEXPORT ossimRgbToGreyFilter : public ossimImageSourceFilter
+{
+public:
+   ossimRgbToGreyFilter(ossimObject* owner=NULL);
+   ossimRgbToGreyFilter(ossimImageSource* inputSource,
+                        double c1 = 1.0/3.0,
+                        double c2 = 1.0/3.0,
+                        double c3 = 1.0/3.0);
+   ossimRgbToGreyFilter(ossimObject* owner,
+                        ossimImageSource* inputSource,
+                        double c1 = 1.0/3.0,
+                        double c2 = 1.0/3.0,
+                        double c3 = 1.0/3.0);
+   
+   virtual ossimString getShortName()const;
+   virtual ossimString getLongName()const;
+   
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+   
+   virtual void initialize();
+   
+   virtual ossimScalarType getOutputScalarType() const;
+   
+   ossim_uint32 getNumberOfOutputBands() const;
+ 
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+   
+   /*!
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+protected:
+   virtual ~ossimRgbToGreyFilter();
+
+   /**
+    * Called on first getTile, will initialize all data needed.
+    */
+   void allocate();
+   
+   ossimRefPtr<ossimImageData> theBlankTile;
+   ossimRefPtr<ossimImageData> theTile;
+   void runUcharTransformation(ossimRefPtr<ossimImageData>& tile);
+   double theC1;
+   double theC2;
+   double theC3;
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimRgbToGreyFilter_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimRgbToHsiSource.h b/ossim/include/ossim/imaging/ossimRgbToHsiSource.h
new file mode 100644
index 0000000..c298d54
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimRgbToHsiSource.h
@@ -0,0 +1,48 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimRgbToHsiSource.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimRgbToHsiSource_HEADER
+#define ossimRgbToHsiSource_HEADER
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+class ossimRgbToHsiSource : public ossimImageSourceFilter
+{
+public:
+   ossimRgbToHsiSource();
+   ossimRgbToHsiSource(ossimImageSource* inputSource);
+
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+   
+   virtual ossimScalarType getOutputScalarType() const;
+   virtual ossim_uint32    getNumberOfOutputBands()const;
+   virtual double          getNullPixelValue()const;
+   virtual double          getMinPixelValue(ossim_uint32 band=0)const;
+   virtual double          getMaxPixelValue(ossim_uint32 band=0)const;
+
+   virtual void initialize();
+
+protected:
+   virtual ~ossimRgbToHsiSource();
+
+   /**
+    * Called on first getTile, will initialize all data needed.
+    */
+   void allocate();
+   
+   ossimRefPtr<ossimImageData> theBlankTile;
+   ossimRefPtr<ossimImageData> theTile;
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimRgbToHsiSource_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimRgbToHsvSource.h b/ossim/include/ossim/imaging/ossimRgbToHsvSource.h
new file mode 100644
index 0000000..021243f
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimRgbToHsvSource.h
@@ -0,0 +1,48 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimRgbToHsvSource.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimRgbToHsvSource_HEADER
+#define ossimRgbToHsvSource_HEADER
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+class ossimRgbToHsvSource : public ossimImageSourceFilter
+{
+public:
+   ossimRgbToHsvSource();
+   ossimRgbToHsvSource(ossimImageSource* inputSource);
+   
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+   
+   virtual ossimScalarType getOutputScalarType() const;
+   virtual ossim_uint32    getNumberOfOutputBands()const;
+   virtual double getNullPixelValue()const;
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+
+   virtual void initialize();
+       
+protected:
+   virtual ~ossimRgbToHsvSource();
+
+   /**
+    * Called on first getTile, will initialize all data needed.
+    */
+   void allocate();
+   
+   ossimRefPtr<ossimImageData> theBlankTile;
+   ossimRefPtr<ossimImageData> theTile;
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimRgbToIndexFilter.h b/ossim/include/ossim/imaging/ossimRgbToIndexFilter.h
new file mode 100644
index 0000000..57a651f
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimRgbToIndexFilter.h
@@ -0,0 +1,97 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimRgbToIndexFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimRgbToIndexFilter_HEADER
+#define ossimRgbToIndexFilter_HEADER
+#include <ossim/base/ossimRgbVector.h>
+#include <ossim/base/ossimRgbLutDataObject.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/imaging/ossimImageSourceFilter.h>
+#include <vector>
+
+class ossimImageData;
+
+/*!
+ * It will map the input data to an 8-bit index table.  The table
+ * <pre>
+ *
+ * Example keyword list:
+ *
+ * type:  ossimRgbToIndexFilter
+ *
+ * If you want to load from a file then just do:
+ *
+ * lut.filename: <full path to lut file>
+ *
+ * If you have the lut table in line then it must look like this:
+ *
+ * lut.entry0:  204 102 1
+ * lut.entry1:  255 204 153
+ * lut.entry2:  51 204 204
+ * lut.number_of_entries:  3
+ * lut.type:  ossimRgbLutDataObject
+ *
+ * </pre>
+ */
+class ossimRgbToIndexFilter : public ossimImageSourceFilter
+{
+public:
+   /*!
+    * Initializes the min value to 0 and the max value to 4000.
+    */
+   ossimRgbToIndexFilter();
+   ossimRgbToIndexFilter(ossimImageSource* inputSource,
+                           const ossimRgbLutDataObject& rgbLut);
+   
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
+                                               ossim_uint32 resLevel=0);
+   
+   virtual ossim_uint32 getNumberOfOutputBands() const;
+   
+   virtual ossimScalarType getOutputScalarType() const;
+   
+   void setLut(ossimRgbLutDataObject& lut);
+
+   void setLut(const ossimFilename& file);
+
+   virtual void disableSource();
+   
+   virtual double getNullPixelValue(ossim_uint32 band=0)const;
+
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+   
+   virtual void initialize();
+
+   /*!
+    * Saves the state of this object.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
+
+   /*!
+    * Loads the state of this object.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+protected:
+   virtual ~ossimRgbToIndexFilter();
+   void allocate();
+   
+   virtual ossimRefPtr<ossimImageData> convertInputTile(ossimRefPtr<ossimImageData>& tile);
+
+   ossimRefPtr<ossimRgbLutDataObject>       theLut;
+   ossimRefPtr<ossimImageData> theTile;
+   
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimRgbToJpegYCbCrSource.h b/ossim/include/ossim/imaging/ossimRgbToJpegYCbCrSource.h
new file mode 100644
index 0000000..de498d6
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimRgbToJpegYCbCrSource.h
@@ -0,0 +1,33 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimRgbToJpegYCbCrSource.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimRgbToJpegYCbCrSource_HEADER
+#define ossimRgbToJpegYCbCrSource_HEADER
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+class ossimRgbToJpegYCbCrSource : public ossimImageSourceFilter
+{
+public:
+   
+   ossimRgbToJpegYCbCrSource();
+   ossimRgbToJpegYCbCrSource(ossimImageSource* inputSource);
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+       
+protected:
+   virtual ~ossimRgbToJpegYCbCrSource();
+   ossimRefPtr<ossimImageData> theBlankTile;
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/imaging/ossimRpfCacheTileSource.h b/ossim/include/ossim/imaging/ossimRpfCacheTileSource.h
similarity index 100%
rename from include/ossim/imaging/ossimRpfCacheTileSource.h
rename to ossim/include/ossim/imaging/ossimRpfCacheTileSource.h
diff --git a/ossim/include/ossim/imaging/ossimS16ImageData.h b/ossim/include/ossim/imaging/ossimS16ImageData.h
new file mode 100644
index 0000000..29baaf0
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimS16ImageData.h
@@ -0,0 +1,185 @@
+//*******************************************************************
+// Copyright (C) 2001 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Class declaration of ossimS16ImageData.  Specialized image data object for
+// signed short data.
+//
+//*************************************************************************
+// $Id: ossimS16ImageData.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimS16ImageData_HEADER
+#define ossimS16ImageData_HEADER
+
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimNormalizedS16RemapTable.h>
+
+class OSSIMDLLEXPORT ossimS16ImageData : public ossimImageData
+{
+public:
+   ossimS16ImageData(ossimSource* source,
+                     ossim_uint32 bands = 1);
+
+   ossimS16ImageData(ossimSource* source,
+                    ossim_uint32 bands,
+                    ossim_uint32 width,
+                    ossim_uint32 height);
+
+   ossimS16ImageData(const ossimS16ImageData &rhs);
+   
+
+   /*!
+    * Perform object duplication.
+    */
+   virtual ossimObject* dup()const;
+
+   /*!
+    * will fill the entire band with
+    * the value.
+    */
+   void fill(ossim_uint32 band, double value);
+
+
+   bool isNull(ossim_uint32 offset)const;
+   void setNull(ossim_uint32 offset);
+
+   virtual ossimDataObjectStatus validate() const;
+
+   /*!
+    * will go to the band and offset and compute the
+    * normalized float and return it back to the
+    * caller through the result argument.
+    */
+   virtual void getNormalizedFloat(ossim_uint32 offset,
+                                   ossim_uint32 bandNumber,
+                                   float& result)const;
+
+   /*!
+    * This will assign to this object a normalized
+    * value by unnormalizing to its native type.
+    */
+   virtual void setNormalizedFloat(ossim_uint32 offset,
+                                   ossim_uint32 bandNumber,
+                                   float input);
+   
+   /*!
+    * Will use the memory that you pass in to normalize
+    * this data object.
+    */
+   virtual void convertToNormalizedFloat(ossimImageData* result)const;
+   
+   /*!
+    * Will use the memory that you pass in to normalize
+    * this data object.
+    */
+   virtual void convertToNormalizedDouble(ossimImageData* result)const;
+
+   /*!
+    * Will take the normalized input and convert it
+    * to this tile's data type.  Example:  if this
+    * tile is of type UCHAR and its input is of type
+    * NORALIZED_FLOAT it will unnormalize the data by
+    * doing:
+    *
+    * minPix + normalizedInput*(maxPix-minPix)
+    *
+    * on a per band basis.
+    */
+   virtual void unnormalizeInput(ossimImageData* normalizedInput);
+
+   /*!
+    * This will compute the average value for the band.
+    */
+   virtual double computeAverageBandValue(ossim_uint32 bandNumber = 0);
+
+   /*!
+    * This will call the compute average band value and then
+    * use that in the calculation of:
+    
+    * It will then do a SUM[(Mean - Actual)^2]/width*height.
+    *
+    * This is the average variance from the passed in
+    * mean.  Basically think of the mean as a completely
+    * grey image and we would like to see how this
+    * image varies from the passed in mean.
+    */
+   virtual double computeMeanSquaredError(double meanValue,
+                                          ossim_uint32 bandNumber = 0);
+  
+   virtual void setValue(ossim_int32 x, ossim_int32 y, double color);
+
+   /*!
+    * Copies entire tile to buf passed in.  Data put in buf is normalized.
+    * The "buf" passed to method is assumed to be at least as big as:
+    * "getSize() * sizeof(double)"
+    */
+   virtual void copyTileToNormalizedBuffer(double* buf) const;
+   
+   /*!
+    * Copies buf passed in to tile.  Data is unnormalized to the tile's
+    * scalar type.
+    * The "buf" passed to method is assumed to be at least as big as the tiles:
+    * "getSize() * sizeof(double)"
+    */
+   virtual void copyNormalizedBufferToTile(double* buf);
+
+   /*!
+    * Will copy this tiles specified band number to the normalized buffer.
+    * if the band is out of range then nothing is done and returns.
+    */
+   virtual void copyTileToNormalizedBuffer(ossim_uint32 band, double* buf) const;
+   virtual void copyTileToNormalizedBuffer(ossim_uint32 band, float* buf)const;
+   
+   /*!
+    * Copies entire tile to buf passed in.  Data put in buf is normalized.
+    * The "buf" passed to method is assumed to be at least as big as:
+    * "getSize() * sizeof(double)"
+    */
+   virtual void copyTileToNormalizedBuffer(float* buf) const;
+   
+   /*!
+    * Copies buf passed in to tile.  Data is unnormalized to the tile's
+    * scalar type.
+    * The "buf" passed to method is assumed to be at least as big as the tiles:
+    * "getSize() * sizeof(double)"
+    */
+   virtual void copyNormalizedBufferToTile(float* buf);
+   
+   /*!
+    * Will copy the normalized buffer to this tiles
+    * specified band.  If band is out of range then nothing
+    * is done and returns.
+    */
+   virtual void copyNormalizedBufferToTile(ossim_uint32 band,
+                                           double* buf);
+   virtual void copyNormalizedBufferToTile(ossim_uint32 band,
+                                           float* buf);
+
+   /** @return The first non-null index of the normalized remap table. */
+   virtual ossim_float64 getMinNormalizedPix() const;
+   
+protected:
+   virtual ~ossimS16ImageData();
+   ossimS16ImageData();
+
+private:
+
+   static const ossimNormalizedS16RemapTable m_remapTable;
+
+TYPE_DATA
+};
+
+inline ossim_float64 ossimS16ImageData::getMinNormalizedPix() const
+{
+   return m_remapTable[1];
+}
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimSFIMFusion.h b/ossim/include/ossim/imaging/ossimSFIMFusion.h
new file mode 100644
index 0000000..50c1ac4
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimSFIMFusion.h
@@ -0,0 +1,86 @@
+//*******************************************************************
+// Copyright (C) 2005 Garrett Potts
+//
+// LICENSE:  See top level LICENSE.txt
+// 
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimSFIMFusion.h 23666 2015-12-14 20:01:22Z rashadkm $
+#ifndef ossimSFIMFusion_HEADER
+#define ossimSFIMFusion_HEADER
+#include <ossim/imaging/ossimFusionCombiner.h>
+#include <ossim/imaging/ossimConvolutionSource.h>
+#include <ossim/imaging/ossimImageGaussianFilter.h>
+#include <ossim/base/ossimAdjustableParameterInterface.h>
+
+/**
+ * This class imlements the fusion algorithm from the paper:
+ *
+ * "Smoothing Filter-based Intesity Modulation: a spectral preserve
+ *  image fusion technique for improving spatial details"
+ *
+ *  Pulished in INT. J. Remote Sensing, 2000, Vol. 21 NO. 18, 3461-3472
+ *
+ *  By J. G. LIU
+ *
+ *
+ * Auther: Garrett Potts
+ * LICENSE: MIT
+ */
+class OSSIM_DLL ossimSFIMFusion : public ossimFusionCombiner,
+                                  public ossimAdjustableParameterInterface
+{
+public:
+   ossimSFIMFusion();
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
+                                               ossim_uint32 resLevel=0);
+   virtual void initialize();
+
+   virtual ossimObject* getBaseObject()
+   {
+      return this;
+   }
+   virtual const ossimObject* getBaseObject()const
+   {
+      return this;
+   }
+   virtual void initAdjustableParameters();
+   virtual void adjustableParametersChanged();
+   
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0) const;
+
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+protected:
+   virtual ~ossimSFIMFusion();
+   void setFilters();
+   bool computeRegression(ossim_float64& slopeResult,
+                          const ossimIpt& origin,
+                          ossimRefPtr<ossimImageData> panData,
+                          ossimRefPtr<ossimImageData> colorData,
+                          ossim_uint32 colorBandIdx);
+   
+   ossim_float64 theLowPassKernelWidth;
+   ossim_uint32 theHighPassKernelWidth;
+   // These are low and high pass filters for the single pan band
+   //
+   ossimRefPtr<ossimImageGaussianFilter> theLowPassFilter;
+   ossimRefPtr<ossimConvolutionSource>   theHighPassFilter;
+   ossimRefPtr<ossimImageData>           theNormLowPassTile;
+   ossimRefPtr<ossimImageData>           theNormHighPassTile;
+   ossimRefPtr<ossimImageData>           theNormColorData;
+
+   NEWMAT::Matrix                        theHighPassMatrix;
+   bool                                  theAutoAdjustScales;
+
+TYPE_DATA   
+};
+
+#endif
diff --git a/include/ossim/imaging/ossimSICDToDetectedImage.h b/ossim/include/ossim/imaging/ossimSICDToDetectedImage.h
similarity index 100%
rename from include/ossim/imaging/ossimSICDToDetectedImage.h
rename to ossim/include/ossim/imaging/ossimSICDToDetectedImage.h
diff --git a/include/ossim/imaging/ossimScalarRemapper.h b/ossim/include/ossim/imaging/ossimScalarRemapper.h
similarity index 100%
rename from include/ossim/imaging/ossimScalarRemapper.h
rename to ossim/include/ossim/imaging/ossimScalarRemapper.h
diff --git a/ossim/include/ossim/imaging/ossimScaleFilter.h b/ossim/include/ossim/imaging/ossimScaleFilter.h
new file mode 100644
index 0000000..e7dbf2f
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimScaleFilter.h
@@ -0,0 +1,185 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimScaleFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimScaleFilter_HEADER
+#define ossimScaleFilter_HEADER
+#include <vector>
+#include <ossim/imaging/ossimImageSourceFilter.h>
+#include <ossim/matrix/newmat.h>
+#include <ossim/matrix/newmatio.h>
+#include <ossim/imaging/ossimFilter.h>
+
+/*!
+ */
+class OSSIM_DLL ossimScaleFilter : public ossimImageSourceFilter
+{
+public:
+   enum ossimScaleFilterType
+   {
+      ossimScaleFilter_NEAREST_NEIGHBOR = 0,
+      ossimScaleFilter_BOX              = 1,
+      ossimScaleFilter_GAUSSIAN         = 2,
+      ossimScaleFilter_CUBIC            = 3,
+      ossimScaleFilter_HANNING          = 4,
+      ossimScaleFilter_HAMMING          = 5,
+      ossimScaleFilter_LANCZOS          = 6,
+      ossimScaleFilter_MITCHELL         = 7,
+      ossimScaleFilter_CATROM           = 8,
+      ossimScaleFilter_BLACKMAN         = 9,
+      ossimScaleFilter_BLACKMAN_SINC    = 10,
+      ossimScaleFilter_BLACKMAN_BESSEL  = 11,
+      ossimScaleFilter_QUADRATIC        = 12,
+      ossimScaleFilter_TRIANGLE         = 13,
+      ossimScaleFilter_HERMITE          = 14
+   };
+   
+   ossimScaleFilter();
+   ossimScaleFilter(ossimImageSource* inputSource,
+                    const ossimDpt& scaleFactor);
+   
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                   ossim_uint32 resLevel=0);
+   
+   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
+
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+   virtual void initialize();
+   virtual void getDecimationFactor(ossim_uint32 resLevel,
+                                    ossimDpt& result)const
+      {
+         result.makeNan();
+
+         if(resLevel == 0)
+         {
+            result.x = 1.0;
+            result.y = 1.0;
+         }
+      }
+   virtual void getDecimationFactors(vector<ossimDpt>& decimations)const
+      {
+         decimations.push_back(ossimDpt(1.0, 1.0));
+      }
+   virtual ossim_uint32 getNumberOfDecimationLevels()const
+      {
+         // only full res output since we are scaling
+         //
+         return 1;
+      }
+   void setFilterType(ossimScaleFilterType filterType);
+   void setFilterType(ossimScaleFilterType minifyFilterType,
+                      ossimScaleFilterType magnifyFilterType);
+   
+   void setFilterType(const ossimString& minifyType,
+                      const ossimString& magnifyType)
+      {
+         setFilterType(getFilterType(minifyType),
+                       getFilterType(magnifyType));
+      }
+   void setMinifyFilterType(const ossimString& minifyType)
+      {
+         setMinifyFilterType(getFilterType(minifyType));
+      }
+   void setMagnifyFilterType(const ossimString& magnifyType)
+      {
+         setMagnifyFilterType(getFilterType(magnifyType));
+      }
+   void setMinifyFilterType(ossimScaleFilterType filterType)
+      {
+         setFilterType(filterType,
+                       m_MagnifyFilterType);
+      }
+   void setMagnifyFilterType(ossimScaleFilterType filterType)
+      {
+         setFilterType(m_MinifyFilterType,filterType);
+      }
+   ossimString getMinifyFilterTypeAsString()const
+      {
+         return getFilterTypeAsString(m_MinifyFilterType);
+      }
+   ossimString getMagnifyFilterTypeAsString()const
+      {
+         return getFilterTypeAsString(m_MagnifyFilterType);
+      }
+   void setScaleFactor(const ossimDpt& scale);
+   void setBlurFactor(ossim_float64 blur)
+      {
+         m_BlurFactor = blur;
+      }
+   ossim_float64 getBlurFactor()const
+      {
+         return m_BlurFactor;
+      }
+   const ossimDpt& getScaleFactor()const
+      {
+         return m_ScaleFactor;
+      }
+   /*!
+    * Saves the state of this object.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
+
+   /*!
+    * Loads the state of this object.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+   
+protected:
+   virtual ~ossimScaleFilter();
+  void allocate();
+
+   //! If this object is maintaining an ossimImageGeometry, this method needs to be called after 
+   //! a scale change so that the geometry's projection is modified accordingly.
+   void updateGeometry();
+   
+   ossimRefPtr<ossimImageData> m_BlankTile;
+   ossimRefPtr<ossimImageData> m_Tile;
+   ossimFilter*                m_MinifyFilter;
+   ossimFilter*                m_MagnifyFilter;
+   ossimScaleFilterType        m_MinifyFilterType;
+   ossimScaleFilterType        m_MagnifyFilterType;
+   ossimDpt                    m_ScaleFactor;
+   ossimDpt                    m_InverseScaleFactor;
+   ossimIpt                    m_TileSize;
+   ossimIrect                  m_InputRect;
+   ossim_float64               m_BlurFactor;
+   ossimRefPtr<ossimImageGeometry> m_ScaledGeometry; //!< The input image geometry, altered by the scale
+
+   template <class T>
+   void runFilterTemplate(T dummy,
+                          const ossimIrect& imageRect,
+                          const ossimIrect& viewRect);
+   template <class T>
+   void runHorizontalFilterTemplate(T dummy,
+                                    const ossimRefPtr<ossimImageData>& input,
+                                    ossimRefPtr<ossimImageData>& output);
+   template <class T>
+   void runVerticalFilterTemplate(T dummy,
+                                  const ossimRefPtr<ossimImageData>& input,
+                                  ossimRefPtr<ossimImageData>& output);
+    void runFilter(const ossimIrect& imageRect,
+                   const ossimIrect& viewRect);
+
+   void getSupport(double& x, double& y);
+   const ossimFilter* getHorizontalFilter()const;
+   const ossimFilter* getVerticalFilter()const;
+   
+   ossimString getFilterTypeAsString(ossimScaleFilterType type)const;
+   ossimScaleFilterType getFilterType(const ossimString& type)const;
+   
+   ossimIrect scaleRect(const ossimIrect input,
+                        const ossimDpt& scaleFactor)const;
+   ossimFilter* createNewFilter(ossimScaleFilterType filterType,
+                                ossimScaleFilterType& result);
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimShiftFilter.h b/ossim/include/ossim/imaging/ossimShiftFilter.h
new file mode 100644
index 0000000..a44ef05
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimShiftFilter.h
@@ -0,0 +1,106 @@
+//----------------------------------------------------------------------------
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Filter for shifting input to an output range.  See class description
+// below for more.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossimShiftFilter_HEADER
+#define ossimShiftFilter_HEADER 1
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/imaging/ossimImageData.h>
+
+/**
+ * @class ossimShiftFilter
+ *
+ * Class to shift/stretch input values to given min/max.  Callers must set
+ * the min, max, null output values.  Input data shifted stretch base on:
+ *
+ * pix = outMin + (inPix - inMin) * (outMax-outMin)/(inMax-inMin)
+ *
+ * See ossim-shift-filter-test.cpp for concrete example of usage.
+ */
+class OSSIMDLLEXPORT ossimShiftFilter : public ossimImageSourceFilter
+{
+public:
+
+   /** default constructor */
+   ossimShiftFilter();
+
+   virtual void initialize();
+
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+   /** @return "ossimShiftFilter" */
+   virtual ossimString getClassName() const;
+
+   /** @return "OSSIM shift filter" */
+   virtual ossimString getLongName()  const;
+
+   /** @return "shift filter" */
+   virtual ossimString getShortName() const;
+
+   
+   /** @return The null pixel of the band. */
+   virtual double getNullPixelValue(ossim_uint32 band)const;
+
+   /** @return The min pixel of the band. */
+   virtual double getMinPixelValue(ossim_uint32 band)const;
+   
+   /** @return The max pixel of the band. */
+   virtual double getMaxPixelValue(ossim_uint32 band)const;
+
+   /** @brief Set the null output pixel. */
+   void setNullPixelValue(double null);
+
+   /** @brief Set the min output pixel. */
+   void setMinPixelValue(double min);
+
+   /** @brief Set the max output pixel. */
+   void setMaxPixelValue(double max);
+
+protected:
+
+   /** virtual protected destructor */
+   virtual ~ossimShiftFilter();
+
+private:
+   
+   /** @brief Private to disallow use... */
+   ossimShiftFilter(const ossimShiftFilter&);
+
+   /** @brief Private to disallow use... */
+   ossimShiftFilter& operator=(const ossimShiftFilter&);
+
+   /** @brief Allocates the tile.  Called on first getTile. */
+   void allocate();
+
+   /**
+    * @brief Template to fill the tile.
+    * @param dummy template type.
+    * @param inputTile
+    * @param outputTile
+    */
+   template <class T> void fillTile(T dummy,
+                                    const ossimImageData* inputTile,
+                                    ossimImageData* outputTile) const;
+   
+   ossimRefPtr<ossimImageData> m_tile;
+   double m_min;
+   double m_max;
+   double m_null;
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimShiftFilter_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimSingleImageChain.h b/ossim/include/ossim/imaging/ossimSingleImageChain.h
new file mode 100644
index 0000000..2d61125
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimSingleImageChain.h
@@ -0,0 +1,557 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Utility class declaration for a single image chain.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossimSingleImageChain_HEADER
+#define ossimSingleImageChain_HEADER 1
+
+#include <ossim/base/ossimConstants.h> /* OSSIM_DLL */
+#include <ossim/imaging/ossimBandSelector.h>
+#include <ossim/imaging/ossimBrightnessContrastSource.h>
+#include <ossim/imaging/ossimCacheTileSource.h>
+#include <ossim/imaging/ossimGeoPolyCutter.h>
+#include <ossim/imaging/ossimHistogramRemapper.h>
+#include <ossim/imaging/ossimImageChain.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageRenderer.h>
+#include <ossim/imaging/ossimImageSharpenFilter.h>
+#include <ossim/imaging/ossimScalarRemapper.h>
+#include <vector>
+
+// Forward class declarations:
+class ossimFilename;
+class ossimGeoPolygon;
+class ossimSrcRecord;
+
+/**
+ * @class ossimSingleImageChain
+ * 
+ * @brief Single image chain class.
+ *
+ * Convenience class for a single image chain.
+ * 
+ * For code example see: ossim/src/test/ossim-single-image-chain-test.cpp  
+ *
+ * Just a clarification on "start of chain" versus "end of chain" in this
+ * file.
+ *
+ * Given chain of:
+ * 1) image handler
+ * 2) band selector (optional)
+ * 3) histogram remapper(optional)
+ * 4) scalar remapper (optional)
+ * 5) resampler cache
+ * 6) resampler
+ * 7) band selector (optional when going one band to three)
+ * 8) chain cache
+ *
+ * The "image handle" is the "start of chain".
+ * The "chain cache" is the "end of chain".
+ */
+class OSSIM_DLL ossimSingleImageChain : public ossimImageChain
+{
+public:
+
+   /** default constructor */
+   ossimSingleImageChain();
+
+   /** Constructor that takes flags.*/
+   ossimSingleImageChain(bool addHistogramFlag,
+                         bool addResamplerCacheFlag,
+                         bool addChainCacheFlag,
+                         bool remapToEightBitFlag,
+                         bool threeBandFlag,
+                         bool threeBandReverseFlag,
+                         bool brightnessContrastFlag=false,
+                         bool sharpenFlag=false,
+                         bool geoPolyCutterFlag=false);
+   
+   /** virtual destructor */
+   virtual ~ossimSingleImageChain();
+
+   /**
+    * @brief reset method
+    * This deletes all links in the chain, zero's out all data members, and
+    * sets all flags back to default.
+    */
+   void reset();
+   
+   /**
+    * @brief open method that takes an image file.
+    *
+    * Opens file and creates a simple chain with ossimImageHandler.
+    *
+    * @param file File to open.
+
+    * @param openOverview If true image handler will attempt to open overview.
+    * Note that if you are planning on doing a rendered chain or want to go
+    * between res levels you should set this to true.  default = true
+    *
+    * @return true on success, false on error.
+    *
+    * @note This will close previous chain if one was opened.
+    */
+   bool open(const ossimFilename& file, bool openOverview=true);
+
+   /**
+    * @brief open method that takes an ossimSrcRecord.
+    *
+    * Opens file and creates a simple chain with ossimImageHandler.
+    *
+    * @return true on success, false on error.
+    *
+    * @note This will close previous chain if one was opened.
+    */
+   bool open(const ossimSrcRecord& src);
+   
+   /** @return true if image handler is opened. */
+   bool isOpen() const;
+
+   /** @brief close method to delete the image handler. */
+   void close();
+
+   /** @return The filename of the image. */
+   ossimFilename getFilename() const;
+
+   /**
+    * @brief Create a rendered image chain.
+    *
+    * Typical usage is to call this after "open" method returns true like:
+    * if ( myChain->open(myFile) == true )
+    * {
+    *    myChain->createRenderedChain();
+    *    code-goes-here();
+    * }
+    *
+    * Typical chain is:
+    * 
+    * 1) image handler
+    * 2) band selector (optional)
+    * 3) histogram remapper(optional)
+    * 4) scalar remapper (optional)
+    * 5) resampler cache
+    * 6) resampler
+    * 7) band selector (optional when going one band to three)
+    * 8) chain cache
+    *
+    * NOTES:
+    * 1) Cache on left hand side of resampler is critical to speed if you
+    *    have the ossimImageRender enabled.
+    *    
+    * 2) If doing a sequential write where tiles to the right of the
+    *    resampler will not be revisited the chain cache could be
+    *    disabled to save memory.
+    */
+   void createRenderedChain();
+
+   /**
+    * @brief Create a rendered image chain that takes an ossimSrcRecord.
+    */
+   void createRenderedChain(const ossimSrcRecord& src);
+
+   /**
+    * @brief Adds an image handler for file.
+    * 
+    * @param file File to open.
+    *
+    * @param openOverview If true image handler will attempt to open overview.
+    * Note that if you are planning on doing a rendered chain or want to go
+    * between res levels you should set this to true. default = true
+    *
+    * @return true on success, false on error.
+    */
+   bool addImageHandler(const ossimFilename& file,
+                        bool openOverview=true);
+
+   /**
+    * @brief Adds an image handler from src record.
+    *
+    * This take an ossimSrcRecord which can contain a supplemental directory
+    * to look for overviews.
+    * 
+    * @param rec Record to open.
+    * @return true on success, false on error.
+    */
+   bool addImageHandler(const ossimSrcRecord& src);
+   
+   /** @brief Adds a band selector to the end of the chain. */
+   void addBandSelector();
+
+   /**
+    * @brief Adds a band selector.
+    *
+    * This takes an ossimSrcRecord which can contain a band selection list.
+    * 
+    * @param src Record to initialize band selector from.
+    * 
+    */
+   void addBandSelector(const ossimSrcRecord& src);
+
+   /** @brief Adds histogram remapper to the chain. */
+   void addHistogramRemapper();
+
+   /**
+    * @brief Adds a band selector.
+    *
+    * This takes an ossimSrcRecord which can contain a histogram
+    * operation to be performed.
+    * 
+    * @param src Record to initialize band selector from.
+    */
+   void addHistogramRemapper(const ossimSrcRecord& src);
+
+   /**
+    * @brief Adds a new cache to the current end of the chain.
+    * @return Pointer to cache.
+    */
+   ossimRefPtr<ossimCacheTileSource> addCache();
+
+   /** @brief Adds a resampler to the end of the chain. */ 
+   void addResampler();
+
+   /**
+    * @brief Adds scalar remapper either to the left of the resampler cache
+    * or at the end of the chain if not present.
+    */
+   void addScalarRemapper();
+
+   /**
+    * @brief Adds brightness contrast filter the end of the chain if not
+    * present.
+    */
+   void addBrightnessContrast();
+
+   /**
+    * @brief Adds sharpen filter the end of the chain if not present.
+    */
+   void addSharpen();
+
+
+   /**
+   *
+   * @brief Adds a geo polycutter to allow for cropping imagery or nulling out
+   * regions.  This has no affect on modification of the bounds
+   *
+   */
+   void addGeoPolyCutter();
+
+   void addGeoPolyCutterPolygon(const vector<ossimGpt>& polygon);
+   void addGeoPolyCutterPolygon(const ossimGeoPolygon& polygon);
+
+   /**
+    * @return ossimRefPtr containing the image handler.
+    * @note Can contain a null pointer so callers should validate.
+    */
+   ossimRefPtr<const ossimImageHandler> getImageHandler() const;
+
+   /**
+    * @return ossimRefPtr containing the image handler.
+    * @note Can contain a null pointer so callers should validate.
+    */
+   ossimRefPtr<ossimImageHandler> getImageHandler();
+
+   /**
+    * @return ossimRefPtr containing  the band selector.
+    * @note Can contain a null pointer so callers should validate.
+    */
+   ossimRefPtr<const ossimBandSelector> getBandSelector() const;
+
+   /**
+    * @return ossimRefPtr containing  the band selector.
+    * @note Can contain a null pointer so callers should validate.
+    */
+   ossimRefPtr<ossimBandSelector> getBandSelector();
+
+   /**
+    * @return ossimRefPtr containing the histogram remapper.
+    * @note Can contain a null pointer so callers should validate.
+    */
+   ossimRefPtr<const ossimHistogramRemapper> getHistogramRemapper() const;
+
+   /**
+    * @return ossimRefPtr containing the histogram remapper.
+    * @note Can contain a null pointer so callers should validate.
+    */
+   ossimRefPtr<ossimHistogramRemapper> getHistogramRemapper();
+
+   /**
+    * @return  ossimRefPtr containing the resampler cache.
+    * @note Can contain a null pointer so callers should validate.
+    */
+   ossimRefPtr<const ossimCacheTileSource> getResamplerCache() const;
+
+   /**
+    * @return  ossimRefPtr containing the resampler cache.
+    * @note Can contain a null pointer so callers should validate.
+    */
+   ossimRefPtr<ossimCacheTileSource> getResamplerCache();
+
+   /**
+    * @return ossimRefPtr containing the resampler.
+    * @note Can contain a null pointer so callers should validate.
+    */
+   ossimRefPtr<const ossimImageRenderer> getImageRenderer() const;
+
+   /**
+    * @return ossimRefPtr containing the resampler.
+    * @note Can contain a null pointer so callers should validate.
+    */
+   ossimRefPtr<ossimImageRenderer> getImageRenderer();
+
+   /**
+    * @return ossimRefPtr containing the scalar remapper.
+    * @note Can contain a null pointer so callers should validate.
+    */
+   ossimRefPtr<const ossimScalarRemapper> getScalarRemapper() const;
+
+   /**
+    * @return ossimRefPtr containing the scalar remapper.
+    * @note Can contain a null pointer so callers should validate.
+    */
+   ossimRefPtr<ossimScalarRemapper> getScalarRemapper();
+
+   /**
+    * @return ossimRefPtr containing the brightness contrast filter.
+    * @note Can contain a null pointer so callers should validate.
+    */
+   ossimRefPtr<const ossimBrightnessContrastSource>
+      getBrightnessContrast() const;
+
+   /**
+    * @return ossimRefPtr containing the brightness contrast filter.
+    * @note Can contain a null pointer so callers should validate.
+    */
+   ossimRefPtr<ossimBrightnessContrastSource> getBrightnessContrast();
+
+   /**
+    * @return ossimRefPtr containing the sharpen filter.
+    * @note Can contain a null pointer so callers should validate.
+    */
+   ossimRefPtr<const ossimImageSharpenFilter> getSharpenFilter() const;
+
+   /**
+    * @return ossimRefPtr containing the sharpen.
+    * @note Can contain a null pointer so callers should validate.
+    */
+   ossimRefPtr<ossimImageSharpenFilter> getSharpenFilter();
+   
+   /**
+    * @return ossimRefPtr containing the chain cache.
+    * @note Can contain a null pointer so callers should validate.
+    */
+   ossimRefPtr<const ossimCacheTileSource> getChainCache() const;
+
+   /**
+    * @return ossimRefPtr containing the chain cache.
+    * @note Can contain a null pointer so callers should validate.
+    */
+   ossimRefPtr<ossimCacheTileSource> getChainCache();
+
+   /**
+    * @brief If flag is true a histogram will be added to the chain at create time.
+    * @param flag
+    */
+   void setAddHistogramFlag(bool flag);
+
+   /**
+    * @brief Gets the add histogram flag.
+    * @return true or false.
+    */
+   bool getAddHistogramFlag() const;
+
+   /**
+    * @brief If flag is true a resampler cache will be added to the chain at create time.
+    * This is a cache to the left of the resampler.
+    * @param flag
+    */
+   void setAddResamplerCacheFlag(bool flag);
+
+   /**
+    * @brief Gets the add resampler cache flag.
+    * @return true or false.
+    */
+   bool getAddResamplerCacheFlag() const;
+
+   /**
+    * @brief If flag is true a chain cache will be added to the chain at create time.
+    * This is a cache at the end of the chain.
+    * @param flag
+    */
+   void setAddChainCacheFlag(bool flag);
+
+   /**
+    * @brief Gets the add chain cache flag.
+    * @return true or false.
+    */
+   bool getAddChainCacheFlag() const;
+
+   /**
+    * @brief Sets remap to eigth bit flag.
+    * @param flag
+    */
+   void setRemapToEightBitFlag(bool flag);
+
+   /**
+    * @brief Get the remap to eight bit flag.
+    * @return true or false.
+    */
+   bool getRemapToEightBitFlag() const;
+   
+   /**
+    * @brief Sets the three band flag.
+    *
+    * If set will for a three band output.  So if one band it will duplicate
+    * so that rgb = b1,b1,b1. An attempt is made to derive rgb bands from the
+    * image handler.
+    * 
+    * @param flag
+    */
+   void setThreeBandFlag(bool flag);
+
+   /**
+    * @brief Get the three band flag.
+    * @return true or false.
+    */
+   bool getThreeBandFlag() const;
+   
+   /**
+    * @brief Sets the three band reverse flag.
+    *
+    * @param flag
+    */
+   void setThreeBandReverseFlag(bool flag);
+
+   /**
+    * @brief Get the three band reverse flag.
+    * @return true or false.
+    */
+   bool getThreeBandReverseFlag() const;
+   
+   /**
+    * @brief Sets the brightness contrast flag.
+    *
+    * @param flag
+    */
+   void setBrightnessContrastFlag(bool flag);
+
+   /**
+    * @brief Get the brightness constrast flag.
+    * @return true or false.
+    */
+   bool getBrightnessContrastFlag() const;
+
+   /**
+    * @brief Sets the sharpenflag.
+    *
+    * @param flag
+    */
+   void setSharpenFlag(bool flag);
+
+   /**
+    * @brief Get the sharpen flag.
+    * @return true or false.
+    */
+   bool getSharpenFlag() const;
+
+   /**
+    * @brief Utility method to force 3 band output.
+    *
+    * Set band selector to a three band (rgb) output. If image has less than
+    * three bands it will set to rgb = b1,b1,b1.  If image has three or
+    * more bands the band selector will be see to rgb = b1, b2, b3.
+    *
+    * @note This will not work unless the image handler is initialized.
+    */
+   void setToThreeBands();
+   
+   /**
+    * @brief Utility method to set to 3 bandsand reverse them.  This is
+    * mainly used by NITF and Lndsat color data where the bands are in bgr
+    * format and you want it in rgb combination.  If image has less than
+    * three bands it will set to rgb = b1,b1,b1.  If image has three or
+    * more bands the band selector will be see to rgb = b3, b2, b1.
+    *
+    * @note This will not work unless the image handler is initialized.
+    */
+   void setToThreeBandsReverse();
+
+   /**
+    * @brief method to set band selector.
+    *
+    * This will set the band selection to bandList.  If a band selector is
+    * not in the chain yet it will be added.
+    *
+    * @param bandList The list of bands.
+    */
+   void setBandSelection(const std::vector<ossim_uint32>& bandList);
+
+   /**
+    * @brief Convenience method to return the scalar type of the image handler.
+    * 
+    * @return Scalar type of the image handler.
+    *
+    * This can return OSSIM_SCALAR_UNKNOWN if the image handler has not been
+    * set yet.  Also, this is NOT the same as calling getOutputScalarType
+    * which could have a different scalar type than the image if the
+    * m_remapToEightBitFlag has been set.
+    */
+   ossimScalarType getImageHandlerScalarType() const;
+
+   /**
+    * @brief Convenience method to open the histogram and apply a default
+    * stretch.
+    *
+    * This will only work if the image is open, there is a histogram remapper
+    * in the chain, and there was a histogram created.
+    * 
+    * Valid stretches (from ossimHistogramRemapper.h):
+    *
+    @verbatim
+      ossimHistogramRemapper::LINEAR_ONE_PIECE
+      ossimHistogramRemapper::LINEAR_1STD_FROM_MEAN
+      ossimHistogramRemapper::LINEAR_2STD_FROM_MEAN
+      ossimHistogramRemapper::LINEAR_3STD_FROM_MEAN
+      ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX
+    @endverbatim
+    *
+    * @return true on success, false on error.
+    */
+   bool openHistogram( ossimHistogramRemapper::StretchMode mode );
+
+private:
+
+   /**  Pointers to links in chain. */
+   ossimRefPtr<ossimImageHandler>             m_handler;
+   ossimRefPtr<ossimBandSelector>             m_bandSelector;
+   ossimRefPtr<ossimHistogramRemapper>        m_histogramRemapper;
+   ossimRefPtr<ossimBrightnessContrastSource> m_brightnessContrast;
+   ossimRefPtr<ossimImageSharpenFilter>       m_sharpen;   
+   ossimRefPtr<ossimScalarRemapper>           m_scalarRemapper;
+   ossimRefPtr<ossimCacheTileSource>          m_resamplerCache;
+   ossimRefPtr<ossimImageRenderer>            m_resampler;
+   ossimRefPtr<ossimGeoPolyCutter>            m_geoPolyCutter;
+   ossimRefPtr<ossimCacheTileSource>          m_chainCache;
+
+   /** control flags */
+   bool m_addHistogramFlag;
+   bool m_addResamplerCacheFlag;
+   bool m_addChainCacheFlag;
+   bool m_remapToEightBitFlag;
+   bool m_threeBandFlag;
+   bool m_threeBandReverseFlag;
+   bool m_brightnessContrastFlag;
+   bool m_sharpenFlag;
+   bool m_geoPolyCutterFlag;
+
+};
+
+#endif /* #ifndef ossimSingleImageChain_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimSlopeFilter.h b/ossim/include/ossim/imaging/ossimSlopeFilter.h
new file mode 100644
index 0000000..1f41314
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimSlopeFilter.h
@@ -0,0 +1,84 @@
+//*******************************************************************
+// OSSIM
+//
+// License:  See top level LICENSE.txt file.
+// 
+//*******************************************************************
+//  $Id: ossimSlopeFilter.h 23451 2015-07-27 15:42:17Z okramer $
+#ifndef ossimSlopeFilter_HEADER
+#define ossimSlopeFilter_HEADER
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+#include <ossim/imaging/ossimImageToPlaneNormalFilter.h>
+
+/**
+ * Filter class for computing the slope image of the input image connection. The slope
+ * dP/dR is defined as the maximum change in pixel value for a differential change in ground
+ * position. This filter would typically be applied to elevation data (represented as an image),
+ * where dP is the change in height when walking some distance dR either straight uphill or
+ * downhill. Numerically , this quantity is computed from the dot product of the normal vector with
+ * the local vertical.
+ *
+ * The output is a floating point single-band image. The input should be a single-band, floating
+ * point image. The slope quantity can be represented as an angle from local vertical, i.e., the
+ * arccos(dP/dR) (in radians, degrees, or normalized) or as the simple ratio dP/dR.
+ */
+class OSSIMDLLEXPORT ossimSlopeFilter : public ossimImageSourceFilter
+{
+public:
+   /** Specifies how the slope quantity is represented */
+   enum SlopeType
+   {
+      RADIANS,   // Angle from local vertical in radians
+      DEGREES,   // Angle from local vertical in degrees (default)
+      RATIO,     // dH/dR ratio of change in height to change in horizontal ground distance
+      NORMALIZED // Angle from local vertical normalized so that 0.0 = 0 deg, 1.0 = 90 deg)
+   };
+
+   ossimSlopeFilter();
+   ossimSlopeFilter(ossimImageSource* inputSource);
+
+   virtual void initialize();
+
+   virtual ossimString getLongName()  const;
+   virtual ossimString getShortName() const;
+   
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect, ossim_uint32 rLevel=0);
+
+   /**
+    *  Returns the output pixel type of the tile source.  This override the
+    *  base class since it simply returns it's input scalar type which is
+    *  not correct with this object.
+    */
+   virtual ossimScalarType getOutputScalarType() const { return OSSIM_FLOAT32; }
+
+   /**
+    *  Method to save the state of an object to a keyword list.
+    *  Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=NULL)const;
+
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=NULL);
+
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   
+   void setSlopeType(SlopeType t) { m_slopeType = t; }
+
+protected:
+   virtual ~ossimSlopeFilter();
+   static ossimString getSlopeTypeString(SlopeType t);
+
+   ossimRefPtr<ossimImageToPlaneNormalFilter> m_normals;
+   SlopeType m_slopeType;
+
+   TYPE_DATA
+};
+
+#endif /* #ifndef ossimSlopeFilter_HEADER */
diff --git a/ossim/include/ossim/imaging/ossimSrtmTileSource.h b/ossim/include/ossim/imaging/ossimSrtmTileSource.h
new file mode 100644
index 0000000..f6354cc
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimSrtmTileSource.h
@@ -0,0 +1,75 @@
+//----------------------------------------------------------------------------
+// Copyright (c) 2005, David Burken, all rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+// 
+// Image handler class for a Shuttle Radar Topography Mission (SRTM) file.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimSrtmTileSource.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimSrtmTileSource_HEADER
+#define ossimSrtmTileSource_HEADER
+
+#include <ossim/imaging/ossimGeneralRasterTileSource.h>
+#include <ossim/support_data/ossimSrtmSupportData.h>
+
+
+class OSSIMDLLEXPORT ossimSrtmTileSource : public ossimGeneralRasterTileSource
+{
+public:
+   ossimSrtmTileSource();
+
+   virtual ossimString getShortName() const;
+   virtual ossimString getLongName()  const;
+
+   virtual bool open();
+
+   //! Returns the image geometry object associated with this tile source or NULL if not defined.
+   //! The geometry contains full-to-local image transform as well as projection (image-to-world)
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+
+   /**
+    * Method to save the state of an object to a keyword list.
+    * @return true on success, false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.
+    *
+    * @return true on success, false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix = NULL);
+
+   /**
+    * @brief Gets a property.
+    * @param The name of the property to get.
+    * @return The property if found.
+    */
+   virtual ossimRefPtr<ossimProperty> getProperty(
+      const ossimString& name)const;
+
+   /**
+    * @brief Adds property names to array.
+    * @param propertyNames Array to populate with property names.
+    */
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+protected:
+   virtual ~ossimSrtmTileSource();
+   ossimSrtmSupportData m_SrtmSupportData;
+   
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimStreamReaderInterface.h b/ossim/include/ossim/imaging/ossimStreamReaderInterface.h
new file mode 100644
index 0000000..a156673
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimStreamReaderInterface.h
@@ -0,0 +1,53 @@
+//----------------------------------------------------------------------------
+// File: ossimStreamReaderInterface.h
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: Class interface ossimMetadataInterface.
+//
+// Has pure virtual "open" method that derived classes must
+// implement to be concrete.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimStreamReaderInterface_HEADER
+#define ossimStreamReaderInterface_HEADER 1
+
+#include <iosfwd>
+
+/** @class ossimStreamReaderInterface */
+class ossimStreamReaderInterface
+{
+public:
+   
+   /** @brief default constructor */
+   ossimStreamReaderInterface(){}
+
+   /** @brief virtual destructor. */
+   virtual ~ossimStreamReaderInterface(){}
+
+   /**
+    *  @brief Pure virtual open method.
+    *
+    *  This open takes a stream, postition and a flag.
+    *
+    *  @param str Open stream to image.
+    *
+    *  @param restartPosition Typically 0, this is the stream offset to the
+    *  front of the image.
+    *
+    *  @param youOwnIt If true this object takes owner ship of the pointer
+    *  memory and will destroy on close.
+    *  
+    *  @return true on success, false on error.
+    */
+   virtual bool open( std::istream* str,
+                      std::streamoff restartPosition,
+                      bool youOwnIt ) = 0;
+};
+
+#endif /* #ifndef ossimStreamReaderInterface_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimSubImageTileSource.h b/ossim/include/ossim/imaging/ossimSubImageTileSource.h
new file mode 100644
index 0000000..ee0c732
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimSubImageTileSource.h
@@ -0,0 +1,91 @@
+//*****************************************************************************
+// FILE: ossimSubImageTileSource.h
+//
+// Copyright (C) 2001 ImageLinks, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Contains declaration of class ossimSubImageTileSource.
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimSubImageTileSource.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimSubImageTileSource_HEADER
+#define ossimSubImageTileSource_HEADER
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+/*!****************************************************************************
+ *
+ *  CLASS: ossimSubImageTileSource
+ *
+ *  This tile source permits specifying an offset that is to be applied to the
+ *  tile origin for all getTile() requests. It is intended for converting
+ *  a full-image space coordinate to a sub-image coordinate.
+ *
+ *****************************************************************************/
+class OSSIM_DLL ossimSubImageTileSource : public ossimImageSourceFilter
+{
+public:
+   /*!
+    * Default constructor initializes the sub-image offset to zero.
+    */
+   ossimSubImageTileSource();
+
+   /*!
+    * Constructor accepts an input source pointer. Offset is defaulted to (0,0).
+    */
+   ossimSubImageTileSource(ossimImageSource* inputSource);
+
+   /*!
+    * Constructs with specified input source and offset.
+    */
+   ossimSubImageTileSource(ossimImageSource* inputSource,
+                           const ossimIpt&   offset);
+
+   /*!
+    * Permits setting the image's offset relative to the full image space.
+    */
+   void setSubImageOffset(const ossimIpt& offset) { theSubImageOffset=offset; }
+
+   ossimIpt getSubImageOffset()const{ return theSubImageOffset;}
+ 
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
+                                               ossim_uint32  rr_level=0);
+
+   /*!
+    * Fetches the sub-image's bounding rect in FULL-IMAGE SPACE.
+    */
+   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const;
+   
+   /*!
+    * Fetches the sub-image's valid image vertices in FULL-IMAGE SPACE.
+    */
+   virtual void getValidImageVertices(vector<ossimIpt>& validVertices,
+                                      ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER,
+                                      ossim_uint32 resLevel=0)const;
+
+   virtual void initialize();
+   
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+private:
+   virtual ~ossimSubImageTileSource();
+   
+   ossimIpt                    theSubImageOffset;
+   ossimRefPtr<ossimImageData> theTile;
+   TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimTableRemapper.h b/ossim/include/ossim/imaging/ossimTableRemapper.h
new file mode 100644
index 0000000..1788163
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimTableRemapper.h
@@ -0,0 +1,96 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author:  David Burken
+//
+// Description:
+//
+// Table remapper class declaration.
+// 
+// Takes input tile, remaps it through a table, then output tile in the desired
+// scalar type.
+//
+// Two modes one that works on native remap tables, that being of the same
+// scalar type (like ossim_uint8) of the input connection, and another that
+// uses a normalized remap table (more scalar independent).
+//
+//*************************************************************************
+// $Id: ossimTableRemapper.h 22479 2013-11-12 02:18:55Z dburken $
+#ifndef ossimTableRemapper_HEADER
+#define ossimTableRemapper_HEADER
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+class OSSIMDLLEXPORT ossimTableRemapper : public ossimImageSourceFilter
+{
+public:
+   enum RemapTableType
+   {
+      UKNOWN     = 0,
+      NATIVE     = 1,
+      NORMALIZED = 2
+   };
+
+   /** default constructor */
+   ossimTableRemapper();
+
+   virtual ossimScalarType getOutputScalarType() const;
+    
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect,
+                                               ossim_uint32 resLevel=0);
+
+   virtual void initialize();
+
+
+
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+   
+   virtual ostream& print(ostream& os) const;
+
+   friend ostream& operator << (ostream& os,  const ossimTableRemapper& tr);
+
+protected:
+   /** virtual destructor */
+   virtual ~ossimTableRemapper();
+
+   ossimRefPtr<ossimImageData> theTile;
+   ossimRefPtr<ossimImageData> theTmpTile;
+   std::vector<ossim_uint8>    theTable;
+   ossim_float64*  theNormBuf;
+   ossim_uint32    theTableBinCount;
+   ossim_uint32    theTableBandCount;
+   RemapTableType  theTableType;
+   ossimScalarType theInputScalarType;
+   ossimScalarType theOutputScalarType;
+   
+   void allocate(const ossimIrect& rect);
+   void destroy();
+
+   void remapFromNativeTable(ossimRefPtr<ossimImageData>& inputTile);
+
+   template <class T> void remapFromNativeTable(
+      T dummy,
+      ossimRefPtr<ossimImageData>& inputTile);
+
+   void remapFromNormalizedTable(ossimRefPtr<ossimImageData>& inputTile);
+
+   template <class T> void dumpTable(T dummy, ostream& os) const;
+
+   // Do not allow copy constructor, operator=.
+   ossimTableRemapper(const ossimTableRemapper& tr);
+   ossimTableRemapper& operator=(const ossimTableRemapper& tr);
+   
+   TYPE_DATA
+};
+
+#endif  /* #ifndef ossimTableRemapper_HEADER */
diff --git a/ossim/include/ossim/imaging/ossimTiffOverviewBuilder.h b/ossim/include/ossim/imaging/ossimTiffOverviewBuilder.h
new file mode 100644
index 0000000..8c12590
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimTiffOverviewBuilder.h
@@ -0,0 +1,304 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Contains class declaration for TiffOverviewBuilder.
+//
+//*******************************************************************
+//  $Id: ossimTiffOverviewBuilder.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimTiffOverviewBuilder_HEADER
+#define ossimTiffOverviewBuilder_HEADER
+
+#include <vector>
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimFilename.h>
+
+#include <ossim/imaging/ossimOverviewBuilderBase.h>
+#include <ossim/imaging/ossimFilterResampler.h>
+
+#include <tiffio.h>
+
+class ossimConnectableObject;
+class ossimFilename;
+class ossimImageGeometry;
+
+class OSSIM_DLL ossimTiffOverviewBuilder
+   :
+      public ossimOverviewBuilderBase
+{
+public:
+
+   enum
+   {
+      DEFAULT_COMPRESS_QUALITY=75
+   };
+
+   /** default constructor */
+   ossimTiffOverviewBuilder();
+   
+   /** virtual destructor */
+   virtual ~ossimTiffOverviewBuilder();
+
+   /**
+    * Supports BOX or NEAREST NEIGHBOR.  When indexed you should probably use nearest neighbor
+    */ 
+   void setResampleType(ossimFilterResampler::ossimFilterResamplerType resampleType);
+   
+   /**
+    *  Builds overview file and sets "theOutputFile" to that of
+    *  the overview_file.
+    *
+    *  @param overview_file The overview file name to output.
+    *
+    *  @param copy_all  If set to true the entire image will be
+    *  copied.  This can be used to convert an image to a tiled tif.
+    *  
+    *  @return trueon success, false on error.
+    */
+   bool buildOverview(const ossimFilename& overview_file,
+                      bool copy_all=false);
+
+   /**
+    * Calls buildOverview.  This method uses "theOutputFile" for the file
+    * name.
+    *
+    * If the copy_all flag is set the entire image will be copied.  This can
+    * be used to convert an image to a tiled tif.
+    *
+    * @return true on success, false on error.
+    *
+    * @note If setOutputFile was not called the output name will be derived
+    * from the image name.  If image was "foo.tif" the overview file will
+    * be "foo.ovr".
+    */
+   virtual bool execute();
+
+   /**
+    *  Sets the compression type to use when building overviews.
+    *  
+    *  @param compression_type Current supported types:
+    * - COMPRESSION_JPEG
+    * - COMPRESSION_LZW
+    * - COMPRESSION_DEFLATE
+    * - COMPRESSION_PACKBITS
+    * - COMPRESSION_NONE (default)
+    */
+   void setCompressionType(ossim_uint16 compression_type);
+
+   /**
+    *  Sets the compression quality for use when using a compression type
+    *  of COMPRESSION_JPEG.
+    *
+    *  @param quality Range 1 to 100 with 100 being best quality.
+    */
+   void setJpegCompressionQuality(ossim_int32 quality);
+
+   /**
+    * @brief Method to return copy all flag.
+    * @return The copy all flag.  If true all data will be written to the
+    * overview including R0.
+    */
+   bool getCopyAllFlag() const;
+
+   /**
+    * @brief Sets internal overviews flag.
+    * @param flag If true, and input source is tiff format, overviews will be
+    * built internally.
+    */
+   void setInternalOverviewsFlag(bool flag);
+
+   /** @return The intenal overview flag. */
+   bool getInternalOverviewsFlag() const;
+
+   /**
+    * @brief Sets theCopyAllFlag.
+    * @param flag The flag. If true all data will be written to the
+    * overview including R0.
+    */
+   void setCopyAllFlag(bool flag);
+
+   /** @return ossimObject* to this object. */
+   virtual ossimObject* getObject();
+
+   /**
+    * @return const ossimObject* to this object.
+    */
+   virtual const ossimObject* getObject() const;
+
+   /**
+    * @return true if input is an image handler.
+    */
+   virtual bool canConnectMyInputTo(ossim_int32 index,
+                                    const ossimConnectableObject* obj) const;
+
+   /**
+    * @brief Sets the input to the builder. Satisfies pure virtual from
+    * ossimOverviewBuilderBase.
+    *
+    * @param imageSource The input to the builder.
+    *
+    * @return True on successful initializion, false on error.
+    */
+   virtual bool setInputSource(ossimImageHandler* imageSource);
+   
+   /**
+    * @brief Sets the output filename.
+    * Satisfies pure virtual from ossimOverviewBuilderBase.
+    * @param file The output file name.
+    */
+   virtual void  setOutputFile(const ossimFilename& file);
+
+   /**
+    * @brief Gets the output file name. (pure virtual)
+    *
+    * @return The output file name or ossimFilename::NIL if it was not set
+    * yet and the image handle has not been initialized.
+    *
+    * @note This is non-const as a call to this may force initialization of
+    * overview builder output file name if the it was not set already.
+    *
+    * @note This will return ossimFilename::NIL unless one of was called,
+    * setInputSource or setOutputFile.
+    */
+   virtual ossimFilename getOutputFile() const;
+
+   void setOutputTileSize(const ossimIpt& tileSize);
+
+   /**
+    * @brief Sets the overview output type.
+    *
+    * Satisfies pure virtual from ossimOverviewBuilderBase.
+    * 
+    * Currently handled types are:
+    * "ossim_tiff_nearest" and "ossim_tiff_box"
+    *
+    * @param type This should be the string representing the type.  This method
+    * will do nothing if type is not handled and return false.
+    *
+    * @return true if type is handled, false if not.
+    */
+   virtual bool setOverviewType(const ossimString& type);
+
+   /**
+    * @brief Gets the overview type.
+    * Satisfies pure virtual from ossimOverviewBuilderBase.
+    * @return The overview output type as a string.
+    */
+   virtual ossimString getOverviewType() const;
+
+   /**
+    * @brief Method to populate class supported types.
+    * Satisfies pure virtual from ossimOverviewBuilderBase.
+    * @param typeList List of ossimStrings to add to.
+    */
+   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
+
+   /**
+    * @brief Method to set properties.
+    * @param property Property to set.
+    *
+    * @note Currently supported property:
+    * name=levels, value should be list of levels separated by a comma with
+    * no spaces. Example: "2,4,8,16,32,64"
+    */
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+
+   /**
+    * @brief Method to populate the list of property names.
+    * @param propertyNames List to populate.  This does not clear the list
+    * just adds to it.
+    */
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+  
+private:
+
+   /**
+    *  Copy the full resolution image data to the output tif image.
+    */
+  bool writeR0(TIFF* tif);
+
+   /**
+    *  Write reduced resolution data set to the tif file.
+    *
+    *  @param firstRestLevel used to tell method that if a histogram is needed, do it on
+    *  that res level.
+    */
+   bool writeRn(ossimImageHandler* imageHandler,
+                TIFF* tif,
+                ossim_uint32 resLevel,
+                bool firstResLevel);
+   
+   /**
+    *  Set the tiff tags for the appropriate resLevel.  Level zero is the
+    *  full resolution image.
+    *
+    *  @param tif Pointer to the tif file.
+    *  @param outputRect The dimensions (zero based) of res set.
+    *  @param rrds_level The current reduced res level.
+    */
+   bool setTags(TIFF* tif,
+                const ossimIrect& outputRect,
+                ossim_int32 resLevel) const;
+
+   /**
+    *  Writes geotiff tags.
+    *  @param geom
+    *  @param boundingRect
+    *  @param resLevel Zero base, 0 being full res.
+    *  @param tif
+    *  @return true on success, false on error.
+    */
+   bool setGeotiffTags(const ossimImageGeometry* geom,
+                       const ossimDrect& boundingRect,
+                       ossim_uint32 resLevel,
+                       TIFF* tif);
+
+   TIFF* openTiff( const ossimString& filename ) const;
+
+   void closeTiff(TIFF* tif);
+
+   /**
+    * @returns true if m_internalOverviewsFlag and input image supports
+    * building internal overviews.  Currently only tiff reader.
+    */
+   bool buildInternalOverviews() const;
+
+   /**
+    * @return true if m_copyAllFlag is set and build internal overviews is not
+    * set.
+    */
+   bool copyR0() const;
+
+   // Disallow these...
+   ossimTiffOverviewBuilder(const ossimTiffOverviewBuilder& source);
+   ossimTiffOverviewBuilder& operator=(const ossimTiffOverviewBuilder& rhs); 
+
+   std::vector<ossim_uint8>                           m_nullDataBuffer;
+   ossim_int32                                        m_bytesPerPixel;
+   ossim_int32                                        m_bitsPerSample;
+   ossim_int32                                        m_tileWidth;
+   ossim_int32                                        m_tileHeight;
+   ossim_int32                                        m_tileSizeInBytes;
+   ossim_int32                                        m_sampleFormat;
+   ossim_int32                                        m_currentTiffDir;
+   ossim_uint16                                       m_tiffCompressType;
+   ossim_int32                                        m_jpegCompressQuality;
+   ossimFilterResampler::ossimFilterResamplerType     m_resampleType;
+   std::vector<double>                                m_nullPixelValues;
+   bool                                               m_copyAllFlag;
+   bool                                               m_outputTileSizeSetFlag;
+   bool                                               m_internalOverviewsFlag;
+
+TYPE_DATA   
+};
+   
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimTiffTileSource.h b/ossim/include/ossim/imaging/ossimTiffTileSource.h
new file mode 100644
index 0000000..4089e7c
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimTiffTileSource.h
@@ -0,0 +1,365 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//          Frank Warmerdam (warmerdam at pobox.com)
+//
+// Description:
+//
+// Contains class declaration for ossimTiffTileSource.
+// ossimTiffTileSource  is derived from ImageHandler which is derived from
+// TileSource.
+//*******************************************************************
+//  $Id: ossimTiffTileSource.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimTiffTileSource_HEADER
+#define ossimTiffTileSource_HEADER 1
+
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/base/ossimIrect.h>
+#include <tiffio.h>
+#include <vector>
+
+class ossimImageData;
+class ossimTiffOverviewTileSource;
+
+class OSSIMDLLEXPORT ossimTiffTileSource : public ossimImageHandler
+{
+public:
+
+   enum ReadMethod
+   {
+      UNKNOWN,
+      READ_RGBA_U8_TILE,
+      READ_RGBA_U8_STRIP,
+      READ_RGBA_U8A_STRIP,
+      READ_SCAN_LINE,
+      READ_TILE,
+      READ_U16_STRIP
+   };
+
+   ossimTiffTileSource();
+
+   virtual ossimString getLongName()  const;
+   virtual ossimString getShortName() const;
+
+   /**
+    *  Returns true if the image_file can be opened and is a valid tiff file.
+    */
+   virtual bool open(const ossimFilename& image_file);
+   virtual void close();
+   
+   /**
+    *  Returns a pointer to a tile given an origin representing the upper left
+    *  corner of the tile to grab from the image.
+    *  Satisfies pure virtual from TileSource class.
+    */
+   virtual ossimRefPtr<ossimImageData> getTile(const  ossimIrect& rect,
+                                               ossim_uint32 resLevel=0);
+   
+   /**
+    * Method to get a tile.   
+    *
+    * @param result The tile to stuff.  Note The requested rectangle in full
+    * image space and bands should be set in the result tile prior to
+    * passing.  It will be an error if:
+    * result.getNumberOfBands() != this->getNumberOfOutputBands()
+    *
+    * @return true on success false on error.  If return is false, result
+    *  is undefined so caller should handle appropriately with makeBlank or
+    * whatever.
+    */
+   virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);
+   
+   /**
+    *  Returns the number of bands in the image.
+    *  Satisfies pure virtual from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfInputBands() const;
+   virtual ossim_uint32 getNumberOfOutputBands () const;
+
+   /**
+    * @brief Indicates whether or not the image handler can control output
+    * band selection via the setOutputBandList method.
+    *
+    * Overrides: ossimImageHandler::isBandSelector
+    *
+    * @return true
+    */
+   virtual bool isBandSelector() const;
+
+   /**
+    * @brief If the image handler "isBandSeletor()" then the band selection
+    * of the output chip can be controlled.
+    *
+    * Overrides: ossimImageHandler::setOutputBandList
+    * 
+    * @return true on success, false on error.
+    */
+   virtual bool setOutputBandList(const std::vector<ossim_uint32>& band_list);
+
+   /** @brief Initializes bandList to the zero based order of output bands. */
+   virtual void getOutputBandList(std::vector<ossim_uint32>& bandList) const;
+   
+   /**
+    *  Returns the number of lines in the image.
+    *  Satisfies pure virtual from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel = 0) const;
+   
+   /**
+    *  Returns the number of samples in the image.
+    *  Satisfies pure virtual from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel = 0) const;
+
+   /**
+    *  Returns the number of image file directories in the tiff image.
+    */
+   virtual ossim_uint32 getNumberOfDirectories() const;
+   
+   /**
+    * Returns the number of reduced resolution data sets (rrds).
+    * Notes:
+    *
+    * - The full res image is counted as a data set so an image with no
+    *   reduced resolution data set will have a count of one.
+    * - This method counts R0 as a res set even if it does not have one.
+    *   This was done deliberately so as to not screw up code down the
+    *   line.
+    */
+   virtual ossim_uint32 getNumberOfDecimationLevels() const;
+   
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+   
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   virtual bool isOpen()const;
+
+   /**
+    * Returns the output pixel type of the tile source.
+    */
+   virtual ossimScalarType getOutputScalarType() const;
+
+   /**
+    * Returns the width of the output tile.
+    */
+   virtual ossim_uint32 getTileWidth() const;
+   
+   /**
+    * Returns the height of the output tile.
+    */
+   virtual ossim_uint32 getTileHeight() const;
+
+   /**
+    *  Returns true if the first directory of the tiff image did not have
+    *  the reduced resolution file type set.
+    */
+   bool hasR0() const;
+  
+   virtual ossim_float64 getMinPixelValue(ossim_uint32 band=0)const;
+   virtual ossim_float64 getMaxPixelValue(ossim_uint32 band=0)const;
+   virtual ossim_float64 getNullPixelValue(ossim_uint32 band=0)const;
+   
+   virtual bool isValidRLevel(ossim_uint32 resLevel) const;
+
+   /**
+    * @return The tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileWidth which
+    * returns the output tile width, which can be different than the
+    * internal image tile width on disk.
+    */
+   virtual ossim_uint32 getImageTileWidth() const;
+
+   /**
+    * @return The tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileHeight which
+    * returns the output tile width which can be different than the internal
+    * image tile width on disk.
+    */
+   virtual ossim_uint32 getImageTileHeight() const;
+
+   void setApplyColorPaletteFlag(bool flag);
+   bool getApplyColorPaletteFlag()const;
+
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   bool isColorMapped() const;
+   
+   virtual std::ostream& print(std::ostream& os) const;
+
+   TIFF* tiffPtr()
+   {
+      return theTiffPtr;
+   }
+#if 0
+   /**
+    * @brief Method to get the image geometry object associated with this
+    * image.
+    *
+    * The geometry contains full-to-local image transform as well as
+    * projection (image-to-world).
+    *
+    * @return ossimImageGeometry* or null if not defined.
+    */
+   virtual ossimImageGeometry* getImageGeometry();
+#endif   
+protected:
+   virtual ~ossimTiffTileSource();
+   /**
+    *  Returns true if no errors initializing object.
+    *
+    *  Notes:
+    *  - Callers of this method must ensure "theTiffPtr" data member
+    *    is initialized.
+    *  - This method was added to consolidate object initialization code
+    *    between constructor and public open method.
+    */
+   bool open();
+
+   // Must be protected for derived ossimTerraSarTiffReader.
+   TIFF* theTiffPtr; 
+   
+private:
+
+   /**
+    *  Adjust point to even tile boundary.  Assumes 0,0 origin.
+    *  Shifts in the upper left direction.
+    */
+   void adjustToStartOfTile(ossimIpt& pt) const;
+
+   /**
+    *  If the tiff source has R0 then this returns the current tiff directory
+    *  that the tiff pointer is pointing to; else, it returns the current
+    *  directory + 1.
+    */
+   ossim_uint32 getCurrentTiffRLevel() const;
+   
+   ossimString getReadMethod(ossim_uint32 directory) const;
+   
+   bool loadTile(const ossimIrect& tile_rect,
+                 const ossimIrect& clip_rect,
+                 ossimImageData* result);
+   
+   bool loadFromRgbaU8Tile(const ossimIrect& tile_rect,
+                           const ossimIrect& clip_rect,
+                           ossimImageData* result);
+   
+   bool loadFromRgbaU8Strip(const ossimIrect& tile_rect,
+                            const ossimIrect& clip_rect,
+                            ossimImageData* result);
+   
+   bool loadFromRgbaU8aStrip(const ossimIrect& tile_rect,
+                             const ossimIrect& clip_rect,
+                             ossimImageData* result);
+
+   bool loadFromU16Strip(const ossimIrect& clip_rect,
+                         ossimImageData* result);
+   
+   bool loadFromScanLine(const ossimIrect& clip_rect,
+                         ossimImageData* result);
+
+   bool loadFromTile(const ossimIrect& clip_rect,
+                     ossimImageData* result);
+   
+   void setReadMethod();
+   
+   /**
+    * Change tiff directory and sets theCurrentDirectory.
+    *
+    * @return true on success, false on error.
+    */
+   bool setTiffDirectory(ossim_uint16 directory);
+
+   void populateLut();
+
+   /**
+    * @brief validateMinMaxNull Checks min, max and null to make sure they are not equal
+    * to the scalar type nan or double nan; sets to default min max if so.
+    */
+   void validateMinMaxNull();
+
+   /**
+    * @brief Checks line/samples of level for power of two decimation from the
+    * previous rlevel.
+    *
+    * Used to weed out thumbnail directories being used as a reduced
+    * resolution layer.
+    *
+    * Note this shuts off the thumbnail which someone may
+    * want to see.  We could make this a reader prop if it becomes an issue.
+    * drb - 09 Jan. 2012.
+    *
+    * @param dir The tiff directory index.
+    * 
+    * @return true is so; else, false.  If level is zero returns false.
+    */
+   bool isPowerOfTwoDecimation(ossim_uint32 dir) const;
+
+   /** @brief Allocates theTile. */
+   void allocateTile();
+
+   /**
+    * @brief Allocates theBuffer
+    * @return true on success; false, on error.
+    */
+   bool allocateBuffer();  
+   
+   ossimRefPtr<ossimImageData> theTile;
+   
+   ossim_uint8*         theBuffer;
+   ossim_uint32         theBufferSize;
+   ossimIrect           theBufferRect;
+   ossim_uint32         theBufferRLevel;
+   ossim_uint32         theCurrentTileWidth;
+   ossim_uint32         theCurrentTileHeight;
+
+   ossim_uint16         theSamplesPerPixel;
+   ossim_uint16         theBitsPerSample;
+   ossim_uint16         theSampleFormatUnit;
+
+   ossim_float64        theMaxSampleValue;
+   ossim_float64        theMinSampleValue;
+   ossim_float64        theNullSampleValue;
+
+   ossim_uint16         theNumberOfDirectories;
+   ossim_uint16         theCurrentDirectory;
+   bool                 theR0isFullRes;
+   ossim_uint32         theBytesPerPixel;
+   ossimScalarType      theScalarType;
+   bool                 theApplyColorPaletteFlag;
+
+   // Things we need from each directory as they can be different.
+   std::vector<ossim_uint32> theImageWidth;
+   std::vector<ossim_uint32> theImageLength;
+   std::vector<ReadMethod>   theReadMethod;
+   std::vector<ossim_uint16> thePlanarConfig;
+   std::vector<ossim_uint16> thePhotometric;
+   std::vector<ossim_uint32> theRowsPerStrip;
+   std::vector<ossim_uint32> theImageTileWidth;
+   std::vector<ossim_uint32> theImageTileLength;
+   std::vector<ossim_uint32> theImageDirectoryList;
+   
+   ossim_uint32              theCurrentTiffRlevel;
+   ossim_int32               theCompressionType;
+   std::vector<ossim_uint32> theOutputBandList;
+   
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimTiffTileSource_HEADER */
+
diff --git a/include/ossim/imaging/ossimTiffWriter.h b/ossim/include/ossim/imaging/ossimTiffWriter.h
similarity index 100%
rename from include/ossim/imaging/ossimTiffWriter.h
rename to ossim/include/ossim/imaging/ossimTiffWriter.h
diff --git a/ossim/include/ossim/imaging/ossimTileCache.h b/ossim/include/ossim/imaging/ossimTileCache.h
new file mode 100644
index 0000000..9512a0e
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimTileCache.h
@@ -0,0 +1,106 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// License:  See top level LICENSE.txt file.
+// 
+// Author: Garrett Potts
+// Description: This file contains the cache algorithm
+//
+//***********************************
+// $Id: ossimTileCache.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef DataCache_HEADER
+#define DataCache_HEADER
+#include <map>
+#include <stack>
+using namespace std;
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimDpt3d.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimDataObject.h>
+class OSSIM_DLL ossimTileCache
+{
+public:
+   
+   ossimTileCache(long numberOfBuckets  = 10);
+   virtual ~ossimTileCache();
+
+   /*!
+    * This will return a tile if found.  Note this tile is still
+    * owned by the cache.
+    */
+   virtual ossimDataObject* get(const ossimDpt3d &origin,
+                               unsigned long resLevel=0);
+
+   /*!
+    * Will remove the tile from the cache and will not delete.  Note:
+    * the cache no longer owns the tile.
+    */
+   virtual ossimDataObject* remove(const ossimDpt3d &origin,
+                                  unsigned long resLevel=0);
+   /*!
+    * This will not duplicate the tile.  Note the tile is owned
+    * by the cache.
+    */
+   virtual ossimDataObject* insert(const ossimDpt3d &origin,
+                                  ossimDataObject* data,
+                                  unsigned long resLevel=0);
+   /*!
+    * Not implemented
+    */
+   void invalidate();
+   /*!
+    * Not implemented
+    */
+   virtual void invalidate(const ossimDpt3d &origin,
+                           ossim_uint32 resLevel);
+
+
+   
+   virtual long numberOfItems()const{return theCache?(long)theCache->size():(long)0;}
+   virtual void display()const;
+
+   virtual ossim_uint32 sizeInBytes(){return theSizeInBytes;}
+   
+protected:
+
+   struct ossimTileInformation
+   {
+   public:
+      friend ostream& operator <<(ostream &out,
+                                  const ossimTileInformation& /* info */)
+         {
+
+            return out;
+         }
+      ossimTileInformation(ossimDataObject* aTile,
+                           const ossimDpt3d &origin = ossimDpt(0,0),
+                           unsigned long resLevel = 0)
+         : theCachedTile(aTile),
+           theOrigin(origin),
+           theResLevel(resLevel)
+         {}
+      ossimRefPtr<ossimDataObject>    theCachedTile;
+      ossimDpt3d         theOrigin;
+      unsigned long      theResLevel;
+   };
+
+   typedef multimap<ossim_uint32, ossimTileInformation*>::iterator Iterator;
+   typedef ossimTileInformation* CacheDataPtr;
+   typedef ossimTileInformation  CacheData;
+   
+   void deleteAll();
+   virtual ossim_uint32 bucketHash(const ossimDpt3d &aPt);
+   virtual ossim_uint32 tileId(const ossimDpt3d &aPt);
+   
+   multimap<ossim_uint32, ossimTileInformation*>  *theCache;
+   long                                            theNumberOfBuckets;
+   ossim_uint32                                    theSizeInBytes;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimTilePatch.h b/ossim/include/ossim/imaging/ossimTilePatch.h
new file mode 100644
index 0000000..585f042
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimTilePatch.h
@@ -0,0 +1,137 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimTilePatch.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimTilePatch_HEADER
+#define ossimTilePatch_HEADER
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/imaging/ossimDiscreteNearestNeighbor.h>
+#include <ossim/imaging/ossimImageData.h>
+
+class ossimImageSource;
+
+class ossimTilePatch : public ossimObject
+{
+public:
+   ossimTilePatch(ossimImageSource* input);
+   /*!
+    * The rect is assumed up right and all we need
+    * to do is compute the even tile boundary rect
+    */
+   ossimTilePatch(ossimScalarType scalarType = OSSIM_UCHAR,
+                  long numberOfComponents = 1,
+                  long width=128,
+                  long height=128);
+   
+   /*!
+    * return the tile boundary aligned rectangle for this
+    * patch.
+    */
+   virtual ossimIrect getRect()const;
+
+   /*!
+    * The padding is for any convolution that must take
+    * place.  
+    */
+   virtual void setRect(const ossimDpt &p1,
+                        const ossimDpt &p2,
+                        const ossimDpt &p3,
+                        const ossimDpt &p4,
+                        const ossimDpt &tile_size,
+                        const ossimDpt &padding=ossimDpt(0,0));
+
+   virtual void setRect(const ossimDrect &aRect,
+                        const ossimDpt &tile_size,
+                        const ossimDpt &padding=ossimDpt(0,0));
+
+   virtual void setRect(const ossimDpt &center_of_rect,
+                        const ossimDpt &rect_size,
+                        const ossimDpt &tile_size,
+                        const ossimDpt &padding=ossimDpt(0,0));
+
+   /*!
+    * This will fill the tile from the tile patch.
+    */
+   virtual void fillTile(ossimRefPtr<ossimImageData>& aTile)const;
+
+   /*!
+    * This will fill the tile from the tile patch and apply the convolution
+    * kernel.  This is optimized for upright rectangles.  Use the bilinear
+    * fill tile bellow for arbitrary 4-sided polygons.
+    */
+   virtual void fillTile(ossimRefPtr<ossimImageData>& result,
+                         ossimDiscreteConvolutionKernel* kernel)const;
+
+   /*!
+    * We will assume that the patch is already
+    * big enough to satisfy the kernel size.
+    */
+   virtual void fillTile(ossimRefPtr<ossimImageData>& result,
+                         const ossimDpt   &ul,
+                         const ossimDpt   &ur,
+                         const ossimDpt   &deltaUl,
+                         const ossimDpt   &deltaUr,
+                         const ossimDpt   &length)const;
+
+
+   virtual void fillPatch(ossimImageSource *imageSource,
+                          long resLevel = 0);
+   
+   
+   
+//    static ossimIrect alignRectToBoundary(const ossimDrect &aRect,
+//                                          const ossimDpt &tile_size);
+   static ossimDrect findBoundingRect(const ossimDpt &p1,
+                                      const ossimDpt &p2,
+                                      const ossimDpt &p3,
+                                      const ossimDpt &p4);
+   /*!
+    * Do not delete this data.  We give raw access to the buffer
+    * if there are special things you wish to have done.
+    */
+   ossimRefPtr<ossimImageData> getData(){return thePatchData;}
+
+   void setData(ossimRefPtr<ossimImageData>& patchData);
+   /*!
+    *  This will implement an in place convolution.  It will
+    *  allocate a buffer pass it to the convolution algorithm
+    * and then replace the internal buffer.
+    */
+   void convolve(ossimDiscreteConvolutionKernel* kernel);
+   
+protected:
+   virtual ~ossimTilePatch();
+   
+   ossimRefPtr<ossimImageData>         thePatchData;
+   static ossimDiscreteNearestNeighbor nearestNeighborKernel;
+   
+
+
+   template<class T>
+   void fillTileTemplate(T dummyVariable,
+                         ossimRefPtr<ossimImageData>& result,
+                         const ossimDpt   &ul,
+                         const ossimDpt   &ur,
+                         const ossimDpt   &deltaUl,
+                         const ossimDpt   &deltaUr,
+                         const ossimDpt   &length)const;
+   
+   template<class T>
+   void fillTileTemplate(T dummyVariable,
+                         ossimRefPtr<ossimImageData>& result,
+                         ossimDiscreteConvolutionKernel* kernel)const;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimTiledImageHandler.h b/ossim/include/ossim/imaging/ossimTiledImageHandler.h
new file mode 100644
index 0000000..658280e
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimTiledImageHandler.h
@@ -0,0 +1,161 @@
+//**************************************************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Oscar Kramer
+// 
+// Description:
+//
+// Image handler used  when the full image is distributed across multiple files,
+// As is the case for tiled Quickbird imagery. This is not for use with band-separate formats,
+// but only "spatially-separate" schemes. Throughout, MFT = multiple file tiles, the disk storage
+// scheme handled by this class.
+//
+//**************************************************************************************************
+// $Id: ossimTiledImageHandler.h 2644 2011-05-26 15:20:11Z oscar.kramer $
+#ifndef ossimTiledImageHandler_HEADER
+#define ossimTiledImageHandler_HEADER
+
+#include <ossim/imaging/ossimImageHandler.h>
+
+// Enable this flag to utilize the system of separate overviews for each tile-file
+#define USING_SUB_OVRS 0
+
+/**
+ *  This class defines an abstract Handler which all image handlers(loaders)
+ *  should derive from.
+ */
+class OSSIMDLLEXPORT ossimTiledImageHandler : public ossimImageHandler
+{
+public:
+   //!  Constructor (default):
+   ossimTiledImageHandler();
+   
+   //! Destructor:
+   virtual ~ossimTiledImageHandler();
+   
+   //! @return Returns true on success, false on error.
+   //! @note This method relies on the data member ossimImageData::theImageFile
+   //! being set.  
+   virtual bool open() = 0;
+
+   //! Deletes the overview and clears the valid image vertices.  Derived
+   //! classes should implement. */
+   virtual void close();
+
+   //! Derived classes must implement this method to be concrete.
+   //! @return true if open, false if not.
+   virtual bool isOpen()const;
+
+   virtual ossim_uint32 getNumberOfInputBands() const;
+   
+   //! @param resLevel Reduced resolution level to return lines of.
+   //! Default = 0
+   //! @return The number of lines for specified reduced resolution level.
+   virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel = 0) const;
+
+   //! @param resLevel Reduced resolution level to return samples of.
+   //! Default = 0
+   //! @return The number of samples for specified reduced resolution level.
+   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel = 0) const;
+   
+   //! Method to save the state of an object to a keyword list.
+   //! Return true if ok or false on error.
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
+
+   //! Method to the load (recreate) the state of an object from a keyword
+   //! list.  Return true if ok or false on error.
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+
+   //! Indicates whether or not the image is tiled internally.
+   //! This implementation returns true if (getImageTileWidth() &&
+   //! getImageTileHeight()) are both non zero.
+   //! Override in the image handler if something else is desired.
+   //! Returns true if tiled, false if not.
+   virtual bool isImageTiled() const;
+
+   //! Returns the tile width of the image or 0 if the image is not tiled.
+   //! Note: this is not the same as the ossimImageSource::getTileWidth which
+   //! returns the output tile width which can be different than the internal
+   //! image tile width on disk.
+   virtual ossim_uint32 getImageTileWidth() const;
+
+   //! Returns the tile height of the image or 0 if the image is not tiled.
+   //! Note: this is not the same as the ossimImageSource::getTileHeight which
+   //! returns the output tile height which can be different than the internal
+   //! image tile height on disk.
+   virtual ossim_uint32 getImageTileHeight() const;
+
+   //! Fills the requested tile by pulling pixels from multiple file tiles as needed.
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect, ossim_uint32 resLevel);
+
+   //! Returns scalar type of first tile (should be the same for all tiles)
+   virtual ossimScalarType getOutputScalarType() const;
+
+   //! Returns overall bounding rect in image space.
+   virtual ossimIrect getImageRectangle(ossim_uint32 resLevel = 0) const;
+
+protected:
+
+   //! Class for record of one tile file:
+   class ossimTileFile
+   {
+   public:
+      ossimTileFile() : overviewIsOpen(false) {}
+
+      ossimFilename tileFilename;
+      vector<ossimIrect>  subImageRects; // one rect per resolution level
+      ossimRefPtr<ossimImageHandler> imageHandler;
+      bool overviewIsOpen;
+   };
+
+   //!  Initialize tile buffer to match image datatype.
+   void allocate();
+
+  vector<ossimTileFile> m_tileFiles;
+  ossimRefPtr<ossimImageData> m_tile;
+  ossimRefPtr<ossimImageData> m_blankTile;
+  ossimIrect  m_fullImgRect;
+  ossim_uint32 m_startOvrResLevel;
+
+#if USING_SUB_OVRS
+public:
+   //! Will build over files, one for each tile file.
+   //! @param includeFullResFlag if true the full resolution layer will also
+   //! be put in the overview format.  This is handy for inefficient formats.
+   virtual bool buildOverview(
+      ossimImageHandlerOverviewCompressionType compressionType = OSSIM_OVERVIEW_COMPRESSION_NONE,
+      ossim_uint32 quality = 75,
+      ossimFilterResampler::ossimFilterResamplerType resampleType = ossimFilterResampler::ossimFilterResampler_BOX,
+      bool includeFullResFlag=false);
+
+   virtual bool openOverview();
+   virtual void closeOverview();
+
+   //! This is not an allowed operation since there are many overviews (one per tile) and the
+   //! precise overview being requested is ambiguous:
+   virtual const ossimImageHandler* getOverview() const { return NULL; }
+
+   //!  @return true if getNumberOfReducedResSets > 1, false if not.
+   //!  @see getNumberOfReducedResSets()
+   virtual bool hasOverviews() const;
+   
+   //! Returns the number of decimation (reduced resolution) levels. This is the minimum number
+   //! among all sub-image tile-files.
+   virtual ossim_uint32 getNumberOfDecimationLevels() const;
+
+protected:
+   //! Will complete the opening process. If there are overviews it will open them. 
+   virtual void completeOpen();
+  
+   bool m_lockSubOvrs;
+
+#endif /* #if USING_SUB_OVRS */
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimTiledImageHandler_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimTiling.h b/ossim/include/ossim/imaging/ossimTiling.h
new file mode 100644
index 0000000..c1d21b5
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimTiling.h
@@ -0,0 +1,201 @@
+//*******************************************************************
+// Copyright (C) 2004 Garrett Potts
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: implementation for image generator
+//
+//*************************************************************************
+// $Id: ossimTiling.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimTiling_HEADER
+#define ossimTiling_HEADER
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/base/ossimRefPtr.h>
+
+class OSSIM_DLL ossimTiling : public ossimObject
+{
+public:
+
+   enum ossimTilingDeltaType
+   {
+      ossimTilingDeltaType_TOTAL_PIXELS,
+      ossimTilingDeltaType_PER_PIXEL
+   };
+
+   ossimTiling();
+
+   bool initialize(const ossimMapProjection& proj,
+                   const ossimIrect& boundingRect);
+
+   bool next(ossimRefPtr<ossimMapProjection>& resultProjection,
+             ossimIrect& resultingBounds,
+             ossimString& resultingName)const;
+   
+   void reset();
+   
+   /**
+    * 
+    * @param tilingDistance Distance in the specified units.
+    * @param unitType Currently only angular unit degrees,
+    *                 and linear unit meters are supported.
+    *                 If unitType is pixel unit then the
+    *                 delta per unit will be set to 1.
+    *                 
+    */
+   void setTilingDistance(const ossimDpt& tilingDistance,
+                          ossimUnitType unitType);
+
+   /**
+    * This sets the pixel delta.  The delta can either be TOTAL_PIXELS or
+    * UNIT_PER_PIXEL.
+    *
+    * If the delta type is TOTAL_PIXELS then the unit per pixel is calculated
+    * from the theTilingDistance.  This is very useful when wanting to be on
+    * even geographic boundaries and would like to have a fixed width and
+    * height for
+    * the pixels.  Flight simulators use this tiling scheme for power of 2
+    * outputs.
+    *
+    * if the delta type is unit per pixel then the total pixels is computed
+    * form the
+    * theTilingDistance.  This is useful when you might want whole number
+    * GSD's and whole numbered tile boundaries.
+    */
+   void setDelta(const ossimDpt& delta,
+                 ossimTilingDeltaType deltaType);
+
+   /**
+    * This sets the tilename mask.  The key tokens that are supported are.
+    *
+    * %r%         Replaces with the row number of the current tile
+    * %c%         Replaces with the column number of the current tile
+    * %i%         Replaces with the current tile id.
+    * %or%        Replaces with the origin of the row
+    * %oc%        Replaces with the origin of the col
+    * %SRTM%      Replaces all filenames with the SRTM file name convention
+    *
+    * 
+    * Examples:
+    *   tile%r%_%c%  assume r = 0 and c = 100 then
+    *              this is replaced with tile0_100
+    *   
+    */
+   void setTileNameMask(const ossimString& mask);
+   ossimString getTileNameMask()const;
+   
+   bool getRowCol(ossim_int64& row,
+                  ossim_int64& col,
+                  ossim_int64 tileId)const;
+   bool getOrigin(ossimDpt& origin,
+                  ossim_int64 tileId)const;
+   bool getOrigin(ossimDpt& origin,
+                  ossim_int64 row,
+                  ossim_int64 col)const;
+   
+   void setPaddingSizeInPixels(const ossimIpt& pizelOverlap);
+   ossimDpt getDeltaPerPixel()const;
+   
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   virtual std::ostream& print(std::ostream& out) const;
+
+protected:
+
+   /**
+    * @return The tiling distance converted to either degrees or meters.
+    */
+   void getConvertedTilingDistance(ossimDpt& pt) const;
+
+   /** The size of a tile in theTilingDistanceUnitType. */
+   ossimDpt             theTilingDistance;
+
+   /** The unit type for "theDelta", and "theTilingDistance". */
+   ossimUnitType        theTilingDistanceUnitType;
+
+   /**
+    * If (theDeltaType == ossimTilingDeltaType_TOTAL_PIXELS) then
+    * this is the size of the tile in pixels like 1024 x 1024.
+    *
+    * If (theDeltaType == ossimTilingDeltaType_PER_PIXEL) then
+    * this is the size of a single pixel like 1.0 meter.
+    */
+   ossimDpt             theDelta;
+
+   /** @see theDelta */
+   ossimTilingDeltaType theDeltaType;
+
+   /**
+    * @brief If set tiling size is controlled by the desired output size in
+    * bytes.  Set by one of output_size_in_bytes, output_size_in_kilo_bytes, or
+    * output_size_in_mega_bytes.  Always stored in bytes.
+    *
+    * @note kilo_byte = 1024 X 1024, mega_byte = 1024 X 1024 X 1024.
+    *
+    * @note If set this relys on theNumberOfBands and theNumberOfBytesPerPixel
+    * need to alse be set correctly.
+    */
+   ossim_int64 theOutputSizeInBytes;
+
+   /**
+    * @brief Output number of bands.  Needed to tile by output size in bytes.
+    *
+    * default = 1
+    *
+    * @see theOutputSizeInBytes
+    */
+   ossim_uint32 theNumberOfBands;
+
+   /**
+    * @brief Output number of bytes per pixel.
+    * Needed to tile by output size in bytes.
+    *
+    * default = 1
+    *
+    * @see theOutputSizeInBytes
+    *
+    * @note This bytes per single pixel, not all bands.
+    */
+   ossim_uint32 theNumberOfBytesPerPixelPerBand;
+   
+   ossimDpt             thePaddingSizeInPixels;
+   mutable ossimRefPtr<ossimMapProjection>  theMapProjection;
+   ossimIrect                       theImageRect;
+   ossimDrect                       theTilingRect;
+   mutable ossim_int64 theTileId;
+   ossim_int64         theTotalHorizontalTiles;
+   ossim_int64         theTotalVerticalTiles;
+   ossim_int64         theTotalTiles;
+   ossimString         theTileNameMask;
+
+   /**
+    * This flags the code to shift the tie point so that the edge of the pixel
+    * falls on the tile boundary.  default=false
+    */
+   bool theEdgeToEdgeFlag; 
+   
+   bool validate()const;
+   bool isAngularUnit(ossimUnitType unitType)const;
+   bool isLinearUnit(ossimUnitType unitType)const;
+   void getTileName(ossimString& resultingName,
+                    ossim_int64 row,
+                    ossim_int64 col,
+                    ossim_int64 id)const;
+   void clampGeographic(ossimDrect& rect)const;
+                    
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimTilingPoly.h b/ossim/include/ossim/imaging/ossimTilingPoly.h
new file mode 100644
index 0000000..014633b
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimTilingPoly.h
@@ -0,0 +1,97 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Mingjie Su
+// 
+// Description: implementation for image generator
+//
+//*************************************************************************
+// $Id: ossimTilingPoly.h 2725 2011-06-15 18:13:07Z david.burken $
+#ifndef ossimTilingPoly_HEADER
+#define ossimTilingPoly_HEADER 1
+
+#include <ossim/imaging/ossimTilingRect.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/imaging/ossimGeoPolyCutter.h>
+
+class OSSIM_DLL ossimTilingPoly : public ossimTilingRect
+{
+public:
+
+   ossimTilingPoly();
+
+   virtual ~ossimTilingPoly();
+
+   virtual bool initialize(const ossimMapProjection& proj,
+                           const ossimIrect& boundingRect);
+
+   virtual bool next(ossimRefPtr<ossimMapProjection>& resultProjection,
+                     ossimIrect& resultingBounds,
+                     ossimString& resultingName);
+
+   virtual bool saveState(ossimKeywordlist& kwl,
+      const char* prefix=0)const;
+
+   virtual bool loadState(const ossimKeywordlist& kwl,
+      const char* prefix=0);
+
+   bool useMbr() const;
+
+   /** return true if exterior cut is initialized. */
+   bool hasExteriorCut() const;
+
+   /** return true if interior cut is initialized. */
+   bool hasInteriorCut() const;
+   
+   ossimRefPtr<ossimGeoPolyCutter>& getExteriorCut();
+   
+   ossimRefPtr<ossimGeoPolyCutter>& getInteriorCut();
+
+   bool isFeatureBoundingIntersect() const;
+
+protected:
+
+   struct ossimShpFeature
+   {
+      ossimShpFeature(ossim_int32 fid,
+         ossim_int32 polyType,
+         std::vector<ossimGpt> polygon,
+         std::vector<ossimGeoPolygon> multiPolys)
+
+         :m_fid(fid),
+         m_polyType(polyType),
+         m_polygon(polygon),
+         m_multiPolys(multiPolys)
+      {}
+
+      ossim_int32 m_fid;
+      ossim_int32 m_polyType;
+      std::vector<ossimGpt> m_polygon;
+      std::vector<ossimGeoPolygon> m_multiPolys;
+   };
+
+   bool parseShpFile();
+
+   bool nextFeature();
+
+   void setRect();
+
+   ossimFilename          m_shpFilename;
+   bool                   m_useMbr;
+   ossim_float64          m_bufferDistance;
+   
+   ossimRefPtr<ossimGeoPolyCutter> m_exteriorCut;
+   ossimRefPtr<ossimGeoPolyCutter> m_interiorCut;
+   
+   std::vector<ossimShpFeature> m_features;
+   bool m_featureBoundingIntersect;
+                    
+TYPE_DATA
+};
+
+#endif
+
+
diff --git a/ossim/include/ossim/imaging/ossimTilingRect.h b/ossim/include/ossim/imaging/ossimTilingRect.h
new file mode 100644
index 0000000..db5b5ca
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimTilingRect.h
@@ -0,0 +1,68 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Mingjie Su
+// 
+// Description: implementation for image generator
+//
+//*************************************************************************
+// $Id: ossimTilingRect.h 2725 2011-06-15 18:13:07Z david.burken $
+#ifndef ossimTilingRect_HEADER
+#define ossimTilingRect_HEADER 1
+
+#include <ossim/imaging/ossimTiling.h>
+#include <ossim/imaging/ossimGeoPolyCutter.h>
+#include <ossim/imaging/ossimGeoAnnotationPolyObject.h>
+#include <ossim/imaging/ossimGeoAnnotationMultiPolyObject.h>
+
+
+class OSSIM_DLL ossimTilingRect : public ossimTiling
+{
+public:
+
+   ossimTilingRect();
+
+   virtual ~ossimTilingRect();
+
+   virtual bool initialize(const ossimMapProjection& proj,
+                           const ossimIrect& boundingRect);
+
+   virtual bool next(ossimRefPtr<ossimMapProjection>& resultProjection,
+                     ossimIrect& resultingBounds,
+                     ossimString& resultingName);
+
+   virtual bool saveState(ossimKeywordlist& kwl,
+      const char* prefix=0)const;
+
+   virtual bool loadState(const ossimKeywordlist& kwl,
+      const char* prefix=0);
+
+protected:
+
+   bool initializeBase(const ossimMapProjection& proj, 
+                       const ossimIrect& boundingRect,
+                       ossimDpt& convertedTilingDistance);
+
+   void getConvertedDistance(ossimDpt& pt, ossimDpt inputDistance) const;
+
+   ossimDpt getPaddingSize() const;
+
+   bool                   m_clipToAoi;
+   ossim_float64          m_lastWidth;
+   ossim_float64          m_lastHeight;
+   bool                   m_useOffset;
+   ossimDpt               m_offsetInPixels;
+   ossimDpt               m_tilingDistanceInPixels;
+   ossimDpt               m_tilinResolutionDistance;
+   ossimUnitType          m_tilingResolutionUnitType;
+   ossimDpt               m_fractionalPixelMisalignment;
+                    
+TYPE_DATA
+};
+
+#endif
+
+
diff --git a/ossim/include/ossim/imaging/ossimTopographicCorrectionFilter.h b/ossim/include/ossim/imaging/ossimTopographicCorrectionFilter.h
new file mode 100644
index 0000000..8286b85
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimTopographicCorrectionFilter.h
@@ -0,0 +1,225 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimTopographicCorrectionFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimTopographicCorrectionFilter_HEADER
+#define ossimTopographicCorrectionFilter_HEADER
+#include <ossim/imaging/ossimImageCombiner.h>
+#include <ossim/matrix/newmat.h>
+#include <ossim/base/ossimColumnVector3d.h>
+#include <ossim/base/ossimConnectableObjectListener.h>
+#include <ossim/base/ossimPropertyEvent.h>
+#include <ossim/base/ossim2dLinearRegression.h>
+
+class ossimImageData;
+
+class ossimImageSourceConnection;
+class ossimImageToPlaneNormalFilter;
+/*!
+ *
+ * class ossimTopographicCorrectionFilter
+ *
+ * This clas is used to execute terrain correction.  I t requires 2 inputs
+ * where the first input is a multi band data source to correct and the
+ * second is elevation normals used in light incident calculations.
+ *
+ * A sample chain might look like:
+ *
+ *  landsatHandler ---> Cache ---> renderer ---> cache ---------------------------------------
+ *                                                                                            |--> Topo correction filter ---> Output
+ *  ortho mosaic of elevation data----> imageToPlaneNormals --> Cache ---> Renderer -->Cache --
+ *
+ * the ossimImageToPlaneNormalsFilter is used to take a single band elevation source and compute normals at each post.  I suggest that you
+ * set the renderer to use a higher order convolution than just nearest neighbor, maybe Cubic.  This way you have smoother interpolation
+ * as you change zoom levels.
+ *
+ *
+ * Correction Types:
+ *
+ *   Cosine correction:     In order for this to run it does not need any additional informat but the multi band source and
+ *                          an normal calculation input.
+ *
+ *   Cosine-C correction:   In order for this to run it will need theC array populated for each band.  It defaults
+ *                          to 0 forcing a default Cosine correction to take place.
+ *
+ *   Minnaert correction:   In order for this to run it will need theK array populated for each band.  The defaults should work pretty good
+ *  
+ */
+class OSSIMDLLEXPORT ossimTopographicCorrectionFilter : public ossimImageCombiner
+{
+public:
+   enum ossimTopoCorrectionType
+   {
+      TOPO_CORRECTION_COSINE    = 0,
+      TOPO_CORRECTION_COSINE_C  = 1,
+      TOPO_CORRECTION_MINNAERT  = 2
+   };
+   ossimTopographicCorrectionFilter();
+
+   ossimTopographicCorrectionFilter(ossimImageSource* colorSource,
+                                    ossimImageSource* elevSource);
+   
+   ossimRefPtr<ossimImageData> getTile(const  ossimIrect& tileRect,
+                                       ossim_uint32 resLevel=0);
+   
+   virtual ossim_uint32 getNumberOfOutputBands() const;
+
+   virtual ossimScalarType getOutputScalarType() const;
+
+   virtual double getNullPixelValue(ossim_uint32 band=0)const;
+
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+
+   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
+
+   virtual void getDecimationFactor(ossim_uint32 resLevel,
+                                    ossimDpt& result) const;
+   
+   virtual void getDecimationFactors(vector<ossimDpt>& decimations) const;
+
+   virtual ossim_uint32 getNumberOfDecimationLevels()const;
+
+   virtual double getAzimuthAngle()const;
+
+   virtual double getElevationAngle()const;
+
+   virtual void setAzimuthAngle(double angle);
+
+   virtual void setElevationAngle(double angle);
+
+   virtual void initialize();
+
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+   
+   bool canConnectMyInputTo(ossim_int32 inputIndex,
+                            const ossimConnectableObject* object)const;
+      
+   virtual void connectInputEvent(ossimConnectionEvent& event);
+
+   virtual void disconnectInputEvent(ossimConnectionEvent& event);
+
+   virtual void propertyEvent(ossimPropertyEvent& event);
+
+   virtual void refreshEvent(ossimRefreshEvent& event);
+
+   virtual ossimTopoCorrectionType getTopoCorrectionType()const;
+
+   virtual void setTopoCorrectionType(ossimTopoCorrectionType topoType);
+
+   const std::vector<double>& getGainValues()const;
+
+   void setGainValues(const std::vector<double>& gainValues);
+  
+   const vector<double>& getBiasValues()const;
+
+   void setBiasValues(const std::vector<double>& biasValues);
+
+   const vector<double>& getKValues()const;
+
+   double getK(int idx)const;
+
+   void setK(int idx, double value);
+
+   void setKValues(const vector<double>& kValues);
+
+   double getC(int idx)const;
+
+   void setC(int idx, double value);
+
+   void setCValues(const vector<double>& cValues);
+   
+   void computeLightDirection();
+
+protected:
+   virtual ~ossimTopographicCorrectionFilter();
+   virtual void allocate();
+   
+   /*!
+    * The result of the illumination equation is stored in
+    * here.  This is populated on each call to getTile.
+    */
+   ossimRefPtr<ossimImageData>   theTile;
+
+   std::vector<ossim_uint32> theBandMapping;
+   
+//   ossimImageToPlaneNormalFilter* theNormalFilter;
+//   ossimScalarRemapper*           theScalarRemapper;
+   std::vector<double> theC;
+   std::vector<double> theK;
+   std::vector<double> theBias;
+   std::vector<double> theGain;
+   
+   /*!
+    * Used for the light vector computation.
+    */
+   double theLightSourceElevationAngle;
+
+   /*!
+    * Used for the light vector computation.
+    */
+   double theLightSourceAzimuthAngle;
+
+   /*!
+    * This is computed from the elevation and
+    * azimuth angles of the light source.
+    */
+   double theLightDirection[3];
+
+   double         theJulianDay;
+   mutable bool   theCComputedFlag;
+   ossimTopoCorrectionType theTopoCorrectionType;   
+   double         theNdviLowTest;
+   double         theNdviHighTest;
+   
+   virtual void executeTopographicCorrection(
+      ossimRefPtr<ossimImageData>& outputData,
+      ossimRefPtr<ossimImageData>& colorData,
+      ossimRefPtr<ossimImageData>& normalData);
+
+   template <class T> void executeTopographicCorrectionTemplate(
+      T dummy,
+      ossimRefPtr<ossimImageData>& outputData,
+      ossimRefPtr<ossimImageData>& colorData,
+      ossimRefPtr<ossimImageData>& normalData);
+
+   template <class T> void executeTopographicCorrectionMinnaertTemplate(
+      T dummy,
+      ossimRefPtr<ossimImageData>& outputData,
+      ossimRefPtr<ossimImageData>& colorData,
+      ossimRefPtr<ossimImageData>& normalData);
+  
+//    virtual void computeC();
+
+//    template<class T>
+//    void addRegressionPointsTemplate(T, //dummy
+//                                     std::vector<ossim2dLinearRegression>& regressionPoints,
+//                                     std::vector<int>& cosineIBucketCount,
+//                                     ossim_int32 maxCountPerBucket,
+//                                     ossimImageData* colorData,
+//                                     ossimImageData* normalData);
+   template <class T> bool computeNdvi(T dummy,
+                                       ossim_float64& result,
+                                       ossim_uint32 offset,
+                                       const std::vector<T*>& bands)const;
+
+   void resizeArrays(ossim_uint32 newSize);
+
+   bool setCCmputedFlag();
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimTrimFilter.h b/ossim/include/ossim/imaging/ossimTrimFilter.h
new file mode 100644
index 0000000..9de9f97
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimTrimFilter.h
@@ -0,0 +1,72 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimTrimFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimTrimFilter_HEADER
+#define ossimTrimFilter_HEADER
+#include <ossim/imaging/ossimImageSourceFilter.h>
+#include <ossim/imaging/ossimPolyCutter.h>
+
+class ossimTrimFilter : public ossimImageSourceFilter
+{
+public:
+   ossimTrimFilter();
+
+   virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0)const;
+   virtual void getValidImageVertices(vector<ossimIpt>& validVertices,
+                                      ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER,
+                                      ossim_uint32 resLevel=0)const;
+
+   ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
+                                       ossim_uint32 resLevel=0);
+
+   virtual void initialize();
+   
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=NULL)const;
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=NULL);
+   
+
+   virtual ossimRefPtr<ossimProperty> getProperty(
+      const ossimString& name)const;
+
+   /**
+    * Set property.
+    *
+    * @param property Property to set if property->getName() matches a
+    * property name of this object.
+    */
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+
+   /**
+    * Adds this objects properties to the list.
+    *
+    * @param propertyNames Array to add to.
+    *
+    * @note This method does not clear propertyNames prior to adding it's
+    * names.
+    */
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+protected:
+   virtual ~ossimTrimFilter();
+   double theLeftPercent;
+   double theRightPercent;
+   double theTopPercent;
+   double theBottomPercent;
+   std::vector<ossimIpt>  theValidVertices;
+   ossimRefPtr<ossimPolyCutter> theCutter;
+   
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimTrimFilter_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimTwoColorView.h b/ossim/include/ossim/imaging/ossimTwoColorView.h
new file mode 100644
index 0000000..bf62b80
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimTwoColorView.h
@@ -0,0 +1,106 @@
+//-------------------------------------------------------------------
+// License: MIT
+//
+// Author:  Garrett Potts
+//
+//-------------------------------------------------------------------
+//  $Id$
+#ifndef ossimTwoColorView_HEADER
+#define ossimTwoColorView_HEADER 1
+#include <ossim/base/ossimConstants.h>
+#include <ossim/imaging/ossimImageCombiner.h>
+
+/**
+ * This is a 2 color view of the input.  It basically allows for a change detection and by default will take the first input and map
+ * it to the blue channel and takes the second input and maps to the red channel.  The unused channel is mapped to a min pixel value.
+ */
+class OSSIM_DLL ossimTwoColorView : public ossimImageCombiner
+{
+public:
+
+   /**
+    * @brief Enumerations for mapping inputs to red, green and blue
+    * output channels.
+    */
+   enum ossimTwoColorMultiViewOutputSource
+   {
+      UNKNOWN = 0,
+      MIN     = 1,
+      OLD     = 2,
+      NEW     = 3
+   };
+   
+   ossimTwoColorView();
+   virtual ossim_uint32 getNumberOfOutputBands() const;
+   /**
+    * @return the requested region of interest
+    */
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
+                                               ossim_uint32 resLevel=0);
+   ossimScalarType getOutputScalarType() const;
+   
+   double getNullPixelValue(ossim_uint32 band)const;
+   double getMinPixelValue(ossim_uint32 band)const;
+   double getMaxPixelValue(ossim_uint32 band)const;
+   
+   /**
+    * @brief Sets which bands to use from inputs, and which inputs to use for
+    * output red, green and blue channels.
+    *
+    * This method does no error checking as the inputs may or may not be set
+    * prior to this call.  ossimTwoColorView::initialize() will verify once
+    * inputs are established.  So if an input band is out of range band
+    * 0 (first band) will be used.
+    *
+    * Callers should ensure initialize is called after this.
+    *
+    * @param oldInputBandIndex Zero based band index for old input. Default=0
+    * * 
+    * @param newInputBandIndex Zero based band index for new input. Default=0.
+    * 
+    * @param redOutputSource default=OLD.  Can be:
+    *    ossimTwoColorMultiViewOutputSource::OLD
+    *    ossimTwoColorMultiViewOutputSource::NEW
+    *    ossimTwoColorMultiViewOutputSource::MIN
+    *    
+    * @param grnOutputSource default=NEW.  Can be:
+    *    ossimTwoColorMultiViewOutputSource::OLD
+    *    ossimTwoColorMultiViewOutputSource::NEW
+    *    ossimTwoColorMultiViewOutputSource::MIN
+    *    
+    * @param bluOutputSource default=NEW.  Can be:
+    *    ossimTwoColorMultiViewOutputSource::OLD
+    *    ossimTwoColorMultiViewOutputSource::NEW
+    *    ossimTwoColorMultiViewOutputSource::MIN   
+    */
+   void setBandIndexMapping(
+      ossim_uint32 oldInputBandIndex,
+      ossim_uint32 newInputBandIndex,
+      ossimTwoColorMultiViewOutputSource redOutputSource,
+      ossimTwoColorMultiViewOutputSource grnOutputSource,
+      ossimTwoColorMultiViewOutputSource bluOutputSource);
+
+   virtual void initialize();
+   
+protected:
+   void allocate();
+   void runAlgorithm(ossimImageData* newData, ossimImageData* oldData);
+   void runNative8(ossimImageData* newData,   ossimImageData* oldData);
+   void runNorm(ossimImageData* newData,   ossimImageData* oldData);
+   
+   bool                               m_byPassFlag;
+   bool                               m_nativeFlag;
+   ossimRefPtr<ossimImageData>        m_twoColorTile;
+   ossimRefPtr<ossimImageSource>      m_newInput;
+   ossimRefPtr<ossimImageSource>      m_oldInput;
+   ossim_uint32                       m_newInputBandIndex;
+   ossim_uint32                       m_oldInputBandIndex;
+   ossimTwoColorMultiViewOutputSource m_redSource;
+   ossimTwoColorMultiViewOutputSource m_grnSource;
+   ossimTwoColorMultiViewOutputSource m_bluSource;
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimTwoColorView_HEADER */
+
diff --git a/ossim/include/ossim/imaging/ossimU11ImageData.h b/ossim/include/ossim/imaging/ossimU11ImageData.h
new file mode 100644
index 0000000..d0d4d12
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimU11ImageData.h
@@ -0,0 +1,189 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Class declaration of ossimU16ImageData.  Specialized image data object for
+// unsigned short data with an 11 bit depth.
+//
+// NOTE:  This object is optimized for unsigned short data and assumes the
+//        following:  null pixel value  = 0.0
+//                    min  pixel value  = 1.0
+//                    max  pixel value  = 2047.0  (2^11 - 1)
+//
+//        If you want anything else use the less efficient ossimImageData.
+//
+//*************************************************************************
+// $Id: ossimU11ImageData.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimU11ImageData_HEADER
+#define ossimU11ImageData_HEADER
+
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimNormalizedU11RemapTable.h>
+
+class OSSIMDLLEXPORT ossimU11ImageData : public ossimImageData
+{
+public:
+   ossimU11ImageData(ossimSource* source,
+                     ossim_uint32 bands = 1);
+
+   ossimU11ImageData(ossimSource* source,
+                     ossim_uint32 bands,
+                     ossim_uint32 width,
+                     ossim_uint32 height);
+
+   ossimU11ImageData(const ossimU11ImageData &rhs);
+   
+
+   virtual ossimObject* dup()const;
+
+   /*!
+    * will fill the entire band with
+    * the value.
+    */
+   void fill(ossim_uint32 band, double value);
+
+   bool isNull(ossim_uint32 offset)const;
+   void setNull(ossim_uint32 offset);
+
+   virtual ossimDataObjectStatus validate() const;
+
+   /*!
+    * will go to the band and offset and compute the
+    * normalized float and return it back to the
+    * caller through the result argument.
+    */
+   virtual void getNormalizedFloat(ossim_uint32 offset,
+                                   ossim_uint32 bandNumber,
+                                   float& result)const;
+
+   /*!
+    * This will assign to this object a normalized
+    * value by unnormalizing to its native type.
+    */
+   virtual void setNormalizedFloat(ossim_uint32 offset,
+                                   ossim_uint32 bandNumber,
+                                   float input);
+   
+   /*!
+    * Will use the memory that you pass in to normalize
+    * this data object.
+    */
+   virtual void convertToNormalizedFloat(ossimImageData* result)const;
+   
+   /*!
+    * Will use the memory that you pass in to normalize
+    * this data object.
+    */
+   virtual void convertToNormalizedDouble(ossimImageData* result)const;
+
+   /*!
+    * Will take the normalized input and convert it
+    * to this tile's data type.  Example:  if this
+    * tile is of type UCHAR and its input is of type
+    * NORALIZED_FLOAT it will unnormalize the data by
+    * doing:
+    *
+    * minPix + normalizedInput*(maxPix-minPix)
+    *
+    * on a per band basis.
+    */
+   virtual void unnormalizeInput(ossimImageData* normalizedInput);
+
+   /*!
+    * This will compute the average value for the band.
+    */
+   virtual double computeAverageBandValue(ossim_uint32 bandNumber = 0);
+
+   /*!
+    * This will call the compute average band value and then
+    * use that in the calculation of:
+    
+    * It will then do a SUM[(Mean - Actual)^2]/width*height.
+    *
+    * This is the average variance from the passed in
+    * mean.  Basically think of the mean as a completely
+    * grey image and we would like to see how this
+    * image varies from the passed in mean.
+    */
+   virtual double computeMeanSquaredError(double meanValue,
+                                          ossim_uint32 bandNumber = 0);
+
+   virtual void setValue(long x, long y, double color);
+
+   /*!
+    * Copies entire tile to buf passed in.  Data put in buf is normalized.
+    * The "buf" passed to method is assumed to be at least as big as:
+    * "getSize() * sizeof(double)"
+    */
+   virtual void copyTileToNormalizedBuffer(double* buf) const;
+   
+   /*!
+    * Copies buf passed in to tile.  Data is unnormalized to the tile's
+    * scalar type.
+    * The "buf" passed to method is assumed to be at least as big as the tiles:
+    * "getSize() * sizeof(double)"
+    */
+   virtual void copyNormalizedBufferToTile(double* buf);
+
+   /*!
+    * Will copy this tiles specified band number to the normalized buffer.
+    * if the band is out of range then nothing is done and returns.
+    */
+   virtual void copyTileToNormalizedBuffer(ossim_uint32 band,
+                                           double* buf) const;
+   virtual void copyTileToNormalizedBuffer(ossim_uint32 band,
+                                           float* buf)const;
+
+      /*!
+    * Copies entire tile to buf passed in.  Data put in buf is normalized.
+    * The "buf" passed to method is assumed to be at least as big as:
+    * "getSize() * sizeof(double)"
+    */
+   virtual void copyTileToNormalizedBuffer(float* buf) const;
+   
+   /*!
+    * Copies buf passed in to tile.  Data is unnormalized to the tile's
+    * scalar type.
+    * The "buf" passed to method is assumed to be at least as big as the tiles:
+    * "getSize() * sizeof(double)"
+    */
+   virtual void copyNormalizedBufferToTile(float* buf);
+
+   /*!
+    * Will copy the normalized buffer to this tiles
+    * specified band.  If band is out of range then nothing
+    * is done and returns.
+    */
+   virtual void copyNormalizedBufferToTile(ossim_uint32 band,
+                                           double* buf);
+   virtual void copyNormalizedBufferToTile(ossim_uint32 band,
+                                           float* buf);
+
+   /** @return The first non-null index of the normalized remap table. */
+   virtual ossim_float64 getMinNormalizedPix() const;
+
+protected:
+   virtual ~ossimU11ImageData();
+   ossimU11ImageData();
+
+private:
+
+   static const ossimNormalizedU11RemapTable m_remapTable;
+   
+TYPE_DATA
+};
+
+inline ossim_float64 ossimU11ImageData::getMinNormalizedPix() const
+{
+   return m_remapTable[1];
+}
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimU16ImageData.h b/ossim/include/ossim/imaging/ossimU16ImageData.h
new file mode 100644
index 0000000..61c7ee5
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimU16ImageData.h
@@ -0,0 +1,193 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Class declaration of ossimU16ImageData.  Specialized image data object for
+// unsigned short data.
+//
+// NOTE:  This object is optimized for unsigned short data and assumes the
+//        following:  null pixel value  = 0.0
+//                    min  pixel value  = 1.0
+//                    max  pixel value  = 65536.0  (2^16 - 1)
+//
+//        If you want anything else use the less efficient ossimImageData.
+//
+//*************************************************************************
+// $Id: ossimU16ImageData.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimU16ImageData_HEADER
+#define ossimU16ImageData_HEADER
+
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimNormalizedU16RemapTable.h>
+
+class OSSIMDLLEXPORT ossimU16ImageData : public ossimImageData
+{
+public:
+   ossimU16ImageData(ossimSource* source,
+                     ossim_uint32 bands = 1);
+
+   ossimU16ImageData(ossimSource* source,
+                    ossim_uint32 bands,
+                    ossim_uint32 width,
+                    ossim_uint32 height);
+
+   ossimU16ImageData(const ossimU16ImageData &rhs);
+
+
+   /*!
+    * Perform object duplication.
+    */
+   virtual ossimObject* dup()const;
+
+   /*!
+    * will fill the entire band with
+    * the value.
+    */
+   void fill(ossim_uint32 band, double value);
+
+   /*!
+    * will fill all bands with the passed in
+    * value.
+    */
+   void fill(double value);
+
+   virtual ossimDataObjectStatus validate() const;
+
+   /*!
+    * will go to the band and offset and compute the
+    * normalized float and return it back to the
+    * caller through the result argument.
+    */
+   virtual void getNormalizedFloat(ossim_uint32 offset,
+                                   ossim_uint32 bandNumber,
+                                   float& result)const;
+
+   /*!
+    * This will assign to this object a normalized
+    * value by unnormalizing to its native type.
+    */
+   virtual void setNormalizedFloat(ossim_uint32 offset,
+                                   ossim_uint32 bandNumber,
+                                   float input);
+   
+   /*!
+    * Will use the memory that you pass in to normalize
+    * this data object.
+    */
+   virtual void convertToNormalizedFloat(ossimImageData* result)const;
+   
+   /*!
+    * Will use the memory that you pass in to normalize
+    * this data object.
+    */
+   virtual void convertToNormalizedDouble(ossimImageData* result)const;
+
+   /*!
+    * Will take the normalized input and convert it
+    * to this tile's data type.  Example:  if this
+    * tile is of type UCHAR and its input is of type
+    * NORALIZED_FLOAT it will unnormalize the data by
+    * doing:
+    *
+    * minPix + normalizedInput*(maxPix-minPix)
+    *
+    * on a per band basis.
+    */
+   virtual void unnormalizeInput(ossimImageData* normalizedInput);
+
+   /*!
+    * This will compute the average value for the band.
+    */
+   virtual double computeAverageBandValue(ossim_uint32 bandNumber = 0);
+
+   /*!
+    * This will call the compute average band value and then
+    * use that in the calculation of:
+    
+    * It will then do a SUM[(Mean - Actual)^2]/width*height.
+    *
+    * This is the average variance from the passed in
+    * mean.  Basically think of the mean as a completely
+    * grey image and we would like to see how this
+    * image varies from the passed in mean.
+    */
+   virtual double computeMeanSquaredError(double meanValue,
+                                          ossim_uint32 bandNumber = 0);
+
+   virtual void setValue(long x, long y, double color);
+   
+   /*!
+    * Copies entire tile to buf passed in.  Data put in buf is normalized.
+    * The "buf" passed to method is assumed to be at least as big as:
+    * "getSize() * sizeof(double)"
+    */
+   virtual void copyTileToNormalizedBuffer(double* buf) const;
+   
+   /*!
+    * Copies buf passed in to tile.  Data is unnormalized to the tile's
+    * scalar type.
+    * The "buf" passed to method is assumed to be at least as big as the tiles:
+    * "getSize() * sizeof(double)"
+    */
+   virtual void copyNormalizedBufferToTile(double* buf);
+
+   /*!
+    * Will copy this tiles specified band number to the normalized buffer.
+    * if the band is out of range then nothing is done and returns.
+    */
+   virtual void copyTileToNormalizedBuffer(ossim_uint32 band, double* buf) const;
+   virtual void copyTileToNormalizedBuffer(ossim_uint32 band, float* buf)const;
+
+   /*!
+    * Copies entire tile to buf passed in.  Data put in buf is normalized.
+    * The "buf" passed to method is assumed to be at least as big as:
+    * "getSize() * sizeof(double)"
+    */
+   virtual void copyTileToNormalizedBuffer(float* buf) const;
+   
+   /*!
+    * Copies buf passed in to tile.  Data is unnormalized to the tile's
+    * scalar type.
+    * The "buf" passed to method is assumed to be at least as big as the tiles:
+    * "getSize() * sizeof(double)"
+    */
+   virtual void copyNormalizedBufferToTile(float* buf);
+
+   /*!
+    * Will copy the normalized buffer to this tiles
+    * specified band.  If band is out of range then nothing
+    * is done and returns.
+    */
+   virtual void copyNormalizedBufferToTile(ossim_uint32 band,
+                                           double* buf);
+   virtual void copyNormalizedBufferToTile(ossim_uint32 band,
+                                           float* buf);
+
+   /** @return The first non-null index of the normalized remap table. */
+   virtual ossim_float64 getMinNormalizedPix() const;
+   
+protected:
+   virtual ~ossimU16ImageData();
+   ossimU16ImageData();
+
+private:
+
+   static const ossimNormalizedU16RemapTable m_remapTable;
+   
+TYPE_DATA
+};
+
+inline ossim_float64 ossimU16ImageData::getMinNormalizedPix() const
+{
+   return m_remapTable[1];
+}
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimU8ImageData.h b/ossim/include/ossim/imaging/ossimU8ImageData.h
new file mode 100644
index 0000000..d37d35f
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimU8ImageData.h
@@ -0,0 +1,176 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Class declaration of ossimU8ImageData.  Specialized image data object for
+// unsigned char data.
+//
+// NOTE:  This object is optimized for unsigned char data and assumes the
+//        following:  null pixel value  = 0.0
+//                    min  pixel value  = 1.0
+//                    max  pixel value  = 255.0
+//
+//        If you want anything else use the less efficient ossimImageData.
+//
+//*************************************************************************
+// $Id: ossimU8ImageData.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimU8ImageData_HEADER
+#define ossimU8ImageData_HEADER
+
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimNormalizedU8RemapTable.h>
+
+class OSSIMDLLEXPORT ossimU8ImageData : public ossimImageData
+{
+public:
+   ossimU8ImageData(ossimSource* source=NULL,
+                    ossim_uint32 bands = 1);
+   
+   ossimU8ImageData(ossimSource* source,
+                    ossim_uint32 bands,
+                    ossim_uint32 width,
+                    ossim_uint32 height);
+   
+   ossimU8ImageData(const ossimU8ImageData& rhs)
+      :ossimImageData(rhs)
+      {}
+
+
+   virtual ossimObject* dup()const;
+
+   /*!
+    * will fill the entire band with
+    * the value.
+    */
+   void fill(ossim_uint32 band, double value);
+   void fill(double value);
+
+   bool isNull(ossim_uint32 offset)const;
+   void setNull(ossim_uint32 offset);
+
+   virtual ossimDataObjectStatus validate() const;
+
+   /*!
+    * will go to the band and offset and compute the
+    * normalized float and return it back to the
+    * caller through the result argument.
+    */
+   virtual void getNormalizedFloat(ossim_uint32 offset,
+                                   ossim_uint32 bandNumber,
+                                   float& result)const;
+
+   /*!
+    * This will assign to this object a normalized
+    * value by unnormalizing to its native type.
+    */
+   virtual void setNormalizedFloat(ossim_uint32 offset,
+                                   ossim_uint32 bandNumber,
+                                   float input);
+   
+   /*!
+    * Will use the memory that you pass in to normalize
+    * this data object.
+    */
+   virtual void convertToNormalizedFloat(ossimImageData* result)const;
+   
+   /*!
+    * Will use the memory that you pass in to normalize
+    * this data object.
+    */
+   virtual void convertToNormalizedDouble(ossimImageData* result)const;
+
+   /*!
+    * Will take the normalized input and convert it
+    * to this tile's data type.  Example:  if this
+    * tile is of type UCHAR and its input is of type
+    * NORALIZED_FLOAT it will unnormalize the data by
+    * doing:
+    *
+    * minPix + normalizedInput*(maxPix-minPix)
+    *
+    * on a per band basis.
+    */
+   virtual void unnormalizeInput(ossimImageData* normalizedInput);
+
+   /*!
+    * This will compute the average value for the band.
+    */
+   virtual double computeAverageBandValue(ossim_uint32 bandNumber = 0);
+
+   /*!
+    * This will call the compute average band value and then
+    * use that in the calculation of:
+    
+    * It will then do a SUM[(Mean - Actual)^2]/width*height.
+    *
+    * This is the average variance from the passed in
+    * mean.  Basically think of the mean as a completely
+    * grey image and we would like to see how this
+    * image varies from the passed in mean.
+    */
+   virtual double computeMeanSquaredError(double meanValue,
+                                          ossim_uint32 bandNumber = 0);
+  
+   virtual void setValue(ossim_int32 x, ossim_int32 y, double color);
+
+   /*!
+    * Copies entire tile to buf passed in.  Data put in buf is normalized.
+    * The "buf" passed to method is assumed to be at least as big as:
+    * "getSize() * sizeof(double)"
+    */
+   virtual void copyTileToNormalizedBuffer(double* buf) const;
+   virtual void copyTileToNormalizedBuffer(float* buf) const;
+
+   /*!
+    * Will copy this tiles specified band number to the normalized buffer.
+    * if the band is out of range then nothing is done and returns.
+    */
+   virtual void copyTileToNormalizedBuffer(ossim_uint32 band, double* buf) const;
+   virtual void copyTileToNormalizedBuffer(ossim_uint32 band, float* buf)const;
+
+   /*!
+    * Copies buf passed in to tile.  Data is unnormalized to the tile's
+    * scalar type.
+    * The "buf" passed to method is assumed to be at least as big as the tiles:
+    * "getSize() * sizeof(double)"
+    */
+   virtual void copyNormalizedBufferToTile(double* buf);
+   virtual void copyNormalizedBufferToTile(float* buf);
+
+   /*!
+    * Will copy the normalized buffer to this tiles
+    * specified band.  If band is out of range then nothing
+    * is done and returns.
+    */
+   virtual void copyNormalizedBufferToTile(ossim_uint32 band,
+                                           double* buf);
+   virtual void copyNormalizedBufferToTile(ossim_uint32 band,
+                                           float* buf);
+
+   /** @return The first non-null index of the normalized remap table. */   
+   virtual ossim_float64 getMinNormalizedPix() const;
+   
+protected:
+   virtual ~ossimU8ImageData();
+
+private:
+
+   static const ossimNormalizedU8RemapTable m_remapTable;
+   
+TYPE_DATA
+};
+
+inline ossim_float64 ossimU8ImageData::getMinNormalizedPix() const
+{
+   return m_remapTable[1];
+}
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimUsgsDemTileSource.h b/ossim/include/ossim/imaging/ossimUsgsDemTileSource.h
new file mode 100644
index 0000000..f66d3de
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimUsgsDemTileSource.h
@@ -0,0 +1,195 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description:
+//
+// Contains class declaration of ossimUsgsDemTileSource.
+// The ossimUsgsDemTileSource class is derived from ossimImageHandler and
+// is intended to be an image handler for USGS dem files.
+//
+//********************************************************************
+// $Id: ossimUsgsDemTileSource.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimUsgsDemTileSource_HEADER
+#define ossimUsgsDemTileSource_HEADER
+
+#include <ossim/imaging/ossimImageHandler.h>
+
+class ossimImageData;
+class ossimDemGrid;
+
+class OSSIM_DLL ossimUsgsDemTileSource : public ossimImageHandler
+{
+public:
+      
+   ossimUsgsDemTileSource();
+
+   virtual ossimString getShortName() const;
+   virtual ossimString getLongName()  const;
+
+   /**
+    *  Returns true if the "theImageFile can be opened.
+    *
+    *  If the extension is not equal to ".dem" this will attempt to look for
+    *  an ".omd" file with the keyword pair "dem_type:  usgs_dem" in it.
+    *
+    *  Optionally users can change the scalar type from signed 16 bit to
+    *  float with the keyword pair "scalar_type: ossim_float32"
+    */
+   virtual bool open();
+
+   virtual ossimRefPtr<ossimImageData> getTile(const  ossimIrect& tile_rect,
+                                               ossim_uint32 resLevel=0);
+
+   /**
+    * Method to get a tile.   
+    *
+    * @param result The tile to stuff.  Note The requested rectangle in full
+    * image space and bands should be set in the result tile prior to
+    * passing.  It will be an error if:
+    * result.getNumberOfBands() != this->getNumberOfOutputBands()
+    *
+    * @return true on success false on error.  If return is false, result
+    *  is undefined so caller should handle appropriately with makeBlank or
+    * whatever.
+    */
+   virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);
+   
+   /**
+    *  Returns the number of bands in the image.
+    *  Satisfies pure virtual requirement from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfInputBands()  const;
+   virtual ossim_uint32 getNumberOfOutputBands() const;
+   
+   /**
+    *  Returns the number of lines in the image.
+    *  Satisfies pure virtual requirement from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level = 0) const;
+   
+   /**
+    *  Returns the number of samples in the image.  
+    *  Satisfies pure virtual requirement from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level = 0) const;
+
+   virtual double getNullPixelValue(ossim_uint32 band=0)const;
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+
+   /**
+    * Returns the zero based image rectangle for the reduced resolution data
+    * set (rrds) passed in.  Note that rrds 0 is the highest resolution rrds.
+    */
+   virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level = 0) const;
+   
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+   
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    *
+    * Keywords picked up by this method:
+    * dem_type: usgs_dem
+    * scalar_type: ossim_sint16 (default)
+    * or
+    * scalar_type: ossim_float32
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+   
+   /**
+    * Returns the output pixel type of the tile source.
+    */
+   virtual ossimScalarType getOutputScalarType() const;
+
+   /**
+    * Returns the width of the output tile.
+    */
+   virtual ossim_uint32 getTileWidth() const;
+
+   /**
+    * Returns the height of the output tile.
+    */
+   virtual ossim_uint32 getTileHeight() const;
+
+   /**
+    * Returns the tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileWidth which
+    * returns the output tile width which can be different than the internal
+    * image tile width on disk.
+    */
+   virtual ossim_uint32 getImageTileWidth() const;
+
+   /**
+    * Returns the tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileWidth which
+    * returns the output tile width which can be different than the internal
+    * image tile width on disk.
+    */
+   virtual ossim_uint32 getImageTileHeight() const;   
+
+   virtual bool isOpen()const;
+   
+   /**
+    * Override base-class method to make sure the internal geometry is explored before extending.
+    */
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+
+protected:
+
+   /**
+    * @brief Initializes theGeometry from USGS DEM header.
+    *
+    * This is called by base ossimImageHandler::getImageGeometry if
+    * theGeometry is not set.  External callers should not go through this
+    * method but call "getImageGeometry" instead for efficiency reasons.
+    * 
+    * @return Pointer to geometry or null if header not found.
+    */
+   virtual ossimRefPtr<ossimImageGeometry> getInternalImageGeometry() const;
+   
+   virtual ~ossimUsgsDemTileSource();
+   // Disallow operator= and copy constrution...
+   const ossimUsgsDemTileSource& operator=(const  ossimUsgsDemTileSource& rhs);
+   ossimUsgsDemTileSource(const ossimUsgsDemTileSource&);
+   
+   /**
+    *  Returns true on success, false on error.
+    */
+   template <class T> bool fillBuffer(T, // dummy template variable
+                                      const ossimIrect& tile_rect,
+                                      const ossimIrect& clip_rect,
+                                      ossimImageData* tile);
+
+   void gatherStatistics();
+
+   ossimDemGrid*               theDem;
+   ossimRefPtr<ossimImageData> theTile;
+   ossim_float64               theNullValue;
+   ossim_float64               theMinHeight;
+   ossim_float64               theMaxHeight;
+   bool                        theFeetFlag;  // elevation units = feet
+   bool                        theIsDemFlag;
+
+   /**
+    * This can be either OSSIM_SINT16 or OSSIM_FLOAT32.  Default = OSSIM_SINT16
+    * Can be changed via ".omd" file keyword:
+    */
+   ossimScalarType             theScalarType;
+   
+TYPE_DATA
+};
+
+#endif  // #ifndef ossimUsgsDemTileSource_HEADER
+
diff --git a/ossim/include/ossim/imaging/ossimValueAssignImageSourceFilter.h b/ossim/include/ossim/imaging/ossimValueAssignImageSourceFilter.h
new file mode 100644
index 0000000..aad6f52
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimValueAssignImageSourceFilter.h
@@ -0,0 +1,103 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimValueAssignImageSourceFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimValueAssignImageSourceFilter_HEADER
+#define ossimValueAssignImageSourceFilter_HEADER
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+/**
+ * This allows one to assign a value to a group of bands.  It will test
+ * for equality band separate or as group. For example:
+ *
+ * if we are testing as a group then the assign will not happen unless
+ * all values equal theInputValue array
+ *
+ *  inputValue = <1, 2, 3>
+ *  outputValue = <100, 100, 100>
+ *
+ *  then it will only convert to 100, 100, 100 if the input equals all
+ *  values of the output.
+ *
+ * input <1, 55, 3>  would become <1, 55, 3>
+ * input <1, 2, 3>   would become <100, 100, 100>
+ *
+ *  Now for band separate it means you want to change on a per band and
+ *  not as a group.  For example:
+ *
+ * inputValue = <1, 2, 3>
+ * outputValue = <100, 100, 100>
+ *
+ * input <1, 55, 3>  would become <100, 55, 100>
+ *
+ */
+class OSSIMDLLEXPORT ossimValueAssignImageSourceFilter : public ossimImageSourceFilter
+{
+public:
+   enum ossimValueAssignType
+   {
+      ossimValueAssignType_SEPARATE = 1,
+      ossimValueAssignType_GROUP    = 2
+   };
+   
+   ossimValueAssignImageSourceFilter(ossimObject* owner=NULL);
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                   ossim_uint32 resLevel=0);
+
+   void setInputOutputValues(const vector<double>& inputValues,
+                             const vector<double>& outputValues);
+
+   const vector<double>& getInputValues()const;
+   const vector<double>& getOutputValues()const;
+   ossimValueAssignType getValueAssignType()const;
+   void setValueAssignType(ossimValueAssignType type);
+
+   virtual void initialize();
+
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=NULL)const;
+   
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=NULL);
+   
+protected:
+   virtual ~ossimValueAssignImageSourceFilter();
+
+   /**
+    * Called on first getTile, will initialize all data needed.
+    */
+   void allocate();
+   
+   vector<double>              theInputValueArray;
+   vector<double>              theOutputValueArray;
+   ossimValueAssignType        theAssignType;
+   ossimRefPtr<ossimImageData> theTile;
+   
+   void validateArrays();
+   
+   template <class T>
+      void executeAssign(T, ossimRefPtr<ossimImageData>& data);
+   
+   template <class T>
+      void executeAssignSeparate(T, ossimRefPtr<ossimImageData>& data);
+   
+   template <class T>
+      void executeAssignGroup(T, ossimRefPtr<ossimImageData>& data);
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimValueAssignImageSourceFilter_HEADER */
+
diff --git a/include/ossim/imaging/ossimVectorRenderer.h b/ossim/include/ossim/imaging/ossimVectorRenderer.h
similarity index 100%
rename from include/ossim/imaging/ossimVectorRenderer.h
rename to ossim/include/ossim/imaging/ossimVectorRenderer.h
diff --git a/include/ossim/imaging/ossimVertexExtractor.h b/ossim/include/ossim/imaging/ossimVertexExtractor.h
similarity index 100%
rename from include/ossim/imaging/ossimVertexExtractor.h
rename to ossim/include/ossim/imaging/ossimVertexExtractor.h
diff --git a/ossim/include/ossim/imaging/ossimVpfAnnotationCoverageInfo.h b/ossim/include/ossim/imaging/ossimVpfAnnotationCoverageInfo.h
new file mode 100644
index 0000000..954e3bd
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimVpfAnnotationCoverageInfo.h
@@ -0,0 +1,78 @@
+//*************************************************************************
+// Copyright (C) 2004 Intelligence Data Systems, Inc.  All rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+//**************************************************************************
+// $Id: ossimVpfAnnotationCoverageInfo.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimVpfAnnotationCoverageInfo_HEADER
+#define ossimVpfAnnotationCoverageInfo_HEADER
+#include <ossim/imaging/ossimVpfAnnotationFeatureInfo.h>
+#include <ossim/vec/ossimVpfCoverage.h>
+class ossimVpfLibrary;
+
+class ossimRgbImage;
+
+class ossimVpfAnnotationCoverageInfo
+{
+public:
+  ossimVpfAnnotationCoverageInfo(const ossimString& name="")
+    :theName(name)
+  {
+    
+  }
+  virtual ~ossimVpfAnnotationCoverageInfo()
+  {
+    deleteAllFeatures();
+  }
+  bool hasRenderableFeature()const;
+  void getEnabledFeatures(std::vector<ossimVpfAnnotationFeatureInfo*>& result);
+  void getAllFeatures(std::vector<ossimVpfAnnotationFeatureInfo*>& result);
+
+  void transform(ossimImageGeometry* geom);
+  ossimIrect getBoundingProjectedRect()const;
+  void buildCoverage();
+  void buildCoverage(const ossimString& feature);
+  void setName(const ossimString& name)
+  {
+    theName = name;
+  }
+  ossimString getName()const
+     {
+        return theName;
+     }
+  void setLibrary(ossimVpfLibrary* library)
+  {
+    theLibrary = library;
+  }
+  ossimVpfLibrary* getLibrary()
+  {
+    return theLibrary;
+  }
+  const ossimVpfLibrary* getLibrary()const
+  {
+    return theLibrary;
+  }
+  void drawAnnotations(ossimRgbImage* tile);
+   void deleteAllFeatures();
+
+  virtual bool saveState(ossimKeywordlist& kwl,
+			 const char* prefix=0)const;
+  virtual bool loadState(const ossimKeywordlist& kwl,
+			 const char* prefix=0);
+protected:
+  ossimString theName;
+
+  /*!
+   * Not owned.
+   */
+  ossimVpfLibrary* theLibrary;
+  std::vector<ossimVpfAnnotationFeatureInfo*>           theFeatureInfoArray;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimVpfAnnotationFeatureInfo.h b/ossim/include/ossim/imaging/ossimVpfAnnotationFeatureInfo.h
new file mode 100644
index 0000000..229592a
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimVpfAnnotationFeatureInfo.h
@@ -0,0 +1,230 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimVpfAnnotationFeatureInfo.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimVpfAnnotationFeatureInfo_HEADER
+#define ossimVpfAnnotationFeatureInfo_HEADER
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimRgbVector.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimGeoPolygon.h>
+#include <ossim/imaging/ossimGeoAnnotationObject.h>
+#include <ossim/vec/ossimVpfCoverage.h>
+#include <ossim/base/ossimFontInformation.h>
+
+class ossimGeoAnnotationObject;
+class ossimVpfCoverage;
+class ossimVpfFeatureClassSchema;
+class ossimPolyLine;
+
+class OSSIMDLLEXPORT ossimVpfAnnotationFeatureInfo : public ossimObject
+{
+public:
+  enum ossimVpfAnnotationFeatureType
+    {
+      ossimVpfAnnotationFeatureType_UNKNOWN  = 0,
+      ossimVpfAnnotationFeatureType_POINT    = 1,
+      ossimVpfAnnotationFeatureType_LINE     = 2,
+      ossimVpfAnnotationFeatureType_POLYGON  = 3,
+      ossimVpfAnnotationFeatureType_TEXT     = 4,
+    };
+
+  ossimVpfAnnotationFeatureInfo(const ossimString& featureName   = "",
+				const ossimRgbVector& penColor   = ossimRgbVector(255,255,255),
+				const ossimRgbVector& brushColor = ossimRgbVector(255,255,255),
+                                const ossimDpt& pointRadius=ossimDpt(1,1),
+                                int   thickness=0,
+				bool enabledFlag = true);
+  ~ossimVpfAnnotationFeatureInfo();
+
+  void setCoverage(const ossimVpfCoverage& coverage)
+  {
+    theCoverage = coverage;
+  }
+
+  const ossimVpfCoverage& getCoverage()const
+  {
+    return theCoverage;
+  }
+  ossimVpfCoverage& getCoverage()
+  {
+    return theCoverage;
+  }
+
+   void setColor(const ossimRgbVector& color)
+      {
+         setPenColor(color);
+         setBrushColor(color);
+      }
+  void setPenColor(const ossimRgbVector& penColor)
+  {
+    thePenColor = penColor;
+  }
+
+  ossimRgbVector getPenColor()const
+  {
+    return thePenColor;
+  }
+
+  void setBrushColor(const ossimRgbVector& brushColor)
+  {
+    theBrushColor = brushColor;
+  }
+
+  ossimRgbVector getBrushColor()const
+  {
+    return theBrushColor;
+  }
+
+  void setFillEnabledFlag(bool flag)
+  {
+     theFillEnabledFlag = flag;
+  }
+  bool getFillEnabledFlag()const
+  {
+     return theFillEnabledFlag;
+  }
+  void setEnabledFlag(bool flag);
+  bool getEnabledFlag()const
+  {
+    return theEnabledFlag;
+  }
+
+  void setThickness(int thickness)
+  {
+     theThickness = thickness;
+  }
+
+  int getThickness()const
+  {
+     return theThickness;
+  }
+  
+  void setName(const ossimString& name)
+  {
+    theName = name;
+  }
+  const ossimString& getName()const
+  {
+    return theName;
+  }
+   
+  bool isPoint()const
+  {
+     return (theFeatureType == ossimVpfAnnotationFeatureType_POINT);
+  }
+  bool isLine()const
+  {
+     return (theFeatureType == ossimVpfAnnotationFeatureType_LINE);
+  }
+  bool isPolygon()const
+  {
+     return (theFeatureType == ossimVpfAnnotationFeatureType_POLYGON);
+  }
+  bool isText()const
+  {
+     return (theFeatureType == ossimVpfAnnotationFeatureType_TEXT);
+  }
+  void getFontInformation(ossimFontInformation& fontInfo)const
+  {
+     fontInfo = theFontInformation;
+  }
+  void setFontInformation(const ossimFontInformation& fontInfo)
+  {
+     theFontInformation = fontInfo;
+  }
+
+  void setPointRadius(const ossimDpt& radius)
+  {
+    thePointRadius = radius;
+  }
+  ossimDpt getPointRadius()const
+  {
+    return thePointRadius;
+  }
+  void setDrawingFeaturesToAnnotation();
+  ossimIrect getBoundingProjectedRect()const;
+  void transform(ossimImageGeometry* proj);
+  void buildFeature();
+  void deleteAllObjects();
+  void drawAnnotations(ossimRgbImage* tile);
+
+  bool saveState(ossimKeywordlist& kwl,
+		 const char* prefix=0)const;
+  bool loadState(const ossimKeywordlist& kwl,
+		 const char* prefix=0);
+  ossimString getFeatureTypeAsString()const;
+  ossimVpfAnnotationFeatureType getFeatureTypeFromString(const ossimString& featureType)const;
+
+private:
+  void readAttributes(ossimPolyLine& polyLine, ossimVpfTable& table, int row);
+  void readAttributes(ossimGeoPolygon& polygon, ossimVpfTable& table, int row);
+
+protected:
+  ossimString                   theName;
+  ossimString                   theDescription;
+  ossimRgbVector                thePenColor;
+  ossimRgbVector                theBrushColor;
+  ossimVpfCoverage              theCoverage;
+  ossimDpt                      thePointRadius;
+  int                           theThickness; 
+  bool                          theFillEnabledFlag;
+  bool                          theEnabledFlag;
+  ossimVpfAnnotationFeatureType theFeatureType;
+  ossimFontInformation          theFontInformation;
+   
+  std::vector<ossimRefPtr<ossimGeoAnnotationObject> > theAnnotationArray;
+
+  void buildTxtFeature(const ossimFilename& table,
+                       const ossimString&   tableKey,
+                       const ossimFilename& primitive,
+                       const ossimString&   primitiveKey);
+   
+  void buildEdgFeature(const ossimFilename& table,
+                       const ossimString&   tableKey,
+		       const ossimFilename& primitive,
+		       const ossimString&   primitiveKey);
+
+  void buildPointFeature(const ossimString& primitiveName,
+			 const ossimFilename& table,
+			 const ossimString&   tableKey,
+			 const ossimFilename& primitive,
+			 const ossimString&   primitiveKey);
+  void buildFaceFeature(const ossimFilename& table,
+                        const ossimString&   tableKey,
+                        const ossimFilename& primitive,
+			const ossimString&   primitiveKey);
+  
+
+  void readEdge(ossimPolyLine& polyLine,
+		int rowNumber,
+		int colPosition,
+		ossimVpfTable& edgeTable);
+  int readTableCellAsInt (int rowNumber, // should replace calls to readRngId, readStartEdgeId with this
+			  int colNumber,
+			  ossimVpfTable& table);
+  int readRngId(int rowNumber,
+		int colNumber,
+		ossimVpfTable& faceTable);
+  int readStartEdgeId(int rowNumber,
+		      int colNumber,
+		      ossimVpfTable& rngTable);
+  void readGeoPolygon(ossimGeoPolygon& polygon,
+		      int faceId,
+		      int startEdgeId,
+		      ossimVpfTable& edgTable);
+
+  ossimDpt* getXy(vpf_table_type table, row_type row, ossim_int32 pos, ossim_int32* count);
+  int getEdgeKeyId (vpf_table_type& table, row_type& row, int col);
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/imaging/ossimVpfAnnotationLibraryInfo.h b/ossim/include/ossim/imaging/ossimVpfAnnotationLibraryInfo.h
similarity index 100%
rename from include/ossim/imaging/ossimVpfAnnotationLibraryInfo.h
rename to ossim/include/ossim/imaging/ossimVpfAnnotationLibraryInfo.h
diff --git a/include/ossim/imaging/ossimVpfAnnotationSource.h b/ossim/include/ossim/imaging/ossimVpfAnnotationSource.h
similarity index 100%
rename from include/ossim/imaging/ossimVpfAnnotationSource.h
rename to ossim/include/ossim/imaging/ossimVpfAnnotationSource.h
diff --git a/ossim/include/ossim/imaging/ossimVpfTileSource.h b/ossim/include/ossim/imaging/ossimVpfTileSource.h
new file mode 100644
index 0000000..33c123b
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimVpfTileSource.h
@@ -0,0 +1,165 @@
+//----------------------------------------------------------------------------
+// Copyright (C) 2004 Garrett Potts, all rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+// $Id: ossimVpfTileSource.h 23664 2015-12-14 14:17:27Z dburken $
+//----------------------------------------------------------------------------
+#ifndef ossimVpfTileSource_HEADER
+#define ossimVpfTileSource_HEADER
+
+#include <ossim/imaging/ossimVpfAnnotationSource.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimViewInterface.h>
+
+
+class OSSIMDLLEXPORT ossimVpfTileSource : public ossimImageHandler,
+                                          public ossimViewInterface
+{
+public:
+   
+   ossimVpfTileSource();
+
+   virtual void close();
+
+   /**
+    *  @return Returns true on success, false on error.
+    *
+    *  @note This method relies on the data member ossimImageData::theImageFile
+    *  being set.  Callers should do a "setFilename" prior to calling this
+    *  method or use the ossimImageHandler::open that takes a file name and an
+    *  entry index.
+    */   
+   virtual bool open();
+
+   /*!
+    *  Returns a pointer to a tile given an origin representing the upper
+    *  left corner of the tile to grab from the image.
+    *  Satisfies pure virtual from TileSource class.
+    */
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+
+   /*!
+    *  Returns the number of bands in the image.
+    *  Satisfies pure virtual from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfInputBands() const;
+
+    /*!
+    * Returns the number of bands in a tile returned from this TileSource.
+    * Note: we are supporting sources that can have multiple data objects.
+    * If you want to know the scalar type of an object you can pass in the 
+    */
+   virtual ossim_uint32 getNumberOfOutputBands() const;
+  
+   /*!
+    *  Returns the number of bands in the image.
+    *  Satisfies pure virtual from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level = 0) const;
+
+   /*!
+    *  Returns the number of bands available from an image.
+    *  Satisfies pure virtual from ImageHandler class.
+    */
+   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level = 0) const;
+
+   /*!
+    * Returns the number of reduced resolution data sets (rrds).
+    * Note:  The full res image is counted as a data set so an image with no
+    *        reduced resolution data set will have a count of one.
+    */
+   virtual ossim_uint32 getNumberOfDecimationLevels() const;
+
+   /*!
+    * Returns the zero based image rectangle for the reduced resolution data
+    * set (rrds) passed in.  Note that rrds 0 is the highest resolution rrds.
+    */
+   virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level = 0) const;
+
+   /*!
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+   /*!
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix);
+   
+   //! Returns the image geometry object associated with this tile source or NULL if non defined.
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+
+   /*!
+    * Returns the output pixel type of the tile source.
+    */
+   virtual ossimScalarType getOutputScalarType() const;
+
+   /*!
+    * Returns the width of the output tile.
+    */
+   virtual ossim_uint32 getTileWidth() const;
+   
+   /*!
+    * Returns the height of the output tile.
+    */
+   virtual ossim_uint32 getTileHeight() const;
+
+   /*!
+    * Returns the tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileWidth which
+    * returns the output tile width which can be different than the internal
+    * image tile width on disk.
+    */
+   virtual ossim_uint32 getImageTileWidth() const;
+
+   /*!
+    * Returns the tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileWidth which
+    * returns the output tile width which can be different than the internal
+    * image tile width on disk.
+    */
+   virtual ossim_uint32 getImageTileHeight() const;
+
+   virtual bool isOpen()const;
+   
+   virtual double getNullPixelValue(ossim_uint32 band=0)const;
+
+   virtual double getMinPixelValue(ossim_uint32 band=0)const;
+      
+   virtual double getMaxPixelValue(ossim_uint32 band=0)const;
+
+   virtual ossimObject* getView();
+
+   virtual const ossimObject* getView()const;
+   
+   virtual bool setView(ossimObject*  baseObject);
+
+   void getAllFeatures(std::vector<ossimVpfAnnotationFeatureInfo*>& featureList);
+  
+   void setAllFeatures(std::vector<ossimVpfAnnotationFeatureInfo*>& featureList);
+
+   void transformObjects();
+
+   void computeBoundingRect();
+
+protected:
+   virtual ~ossimVpfTileSource();
+   ossimRefPtr<ossimVpfAnnotationSource> m_AnnotationSource;
+   
+   
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/imaging/ossimWatermarkFilter.h b/ossim/include/ossim/imaging/ossimWatermarkFilter.h
new file mode 100644
index 0000000..a5f11bc
--- /dev/null
+++ b/ossim/include/ossim/imaging/ossimWatermarkFilter.h
@@ -0,0 +1,348 @@
+//----------------------------------------------------------------------------
+// Copyright (c) 2005, David Burken, all rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Class declaration of ossimWatermarkFilter.
+// Applies an image or watermark to image.  Positioning is based on mode.
+// Density is base on alpha weight.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimWatermarkFilter.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimWatermarkFilter_HEADER
+#define ossimWatermarkFilter_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/imaging/ossimImageSourceFilter.h>
+
+/**
+ * class ossimWatermarkFilter
+ * Applies an image or watermark to image.
+ * Positioning is based on mode.
+ * Density is base on alpha weight.
+ */
+class OSSIMDLLEXPORT ossimWatermarkFilter : public ossimImageSourceFilter
+{
+public:
+
+   enum WatermarkMode
+   {
+      UPPER_LEFT     = 0,
+      UPPER_CENTER   = 1,
+      UPPER_RIGHT    = 2,
+      CENTER         = 3,
+      LOWER_LEFT     = 4,
+      LOWER_CENTER   = 5,
+      LOWER_RIGHT    = 6,
+      UNIFORM_DENSE  = 7,
+      UNIFORM_SPARSE = 8,
+      END            = 9 //< Number of modes.
+   };
+      
+   /** contructor */
+   ossimWatermarkFilter();
+
+   /** @return Short name of filter. */
+   virtual ossimString getShortName()   const;
+
+   /** @return Long name of filter. */
+   virtual ossimString getLongName()    const;
+
+   /** @return Descriptive name of filter. */
+   virtual ossimString getDescription() const;
+
+   /**
+    * @param tile_rect Rectangle to fill tile with.
+    * 
+    * @param resLevel Reduced resolution level to grab from.
+    * 
+    * @return ossimRefPtr<ossimImageData> This is tile that was filled with
+    * tile_rect.
+    *
+    * @note Callers should check the ossimRefPtr::valid method.
+    * The internal pointer of the ossimRefPtr<ossimImageData> can be
+    * null if the tile_rect did not intersect the input connection's
+    * bounding rectangle.
+    */
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tile_rect,
+                                               ossim_uint32 resLevel=0);
+   
+   /**
+    * Initializes state of the object from the input connection.
+    */
+   virtual void initialize();
+
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    *
+    * Keywords picked saved by saveState
+    * 
+    * filename: my_colormap_file.jpg
+    *
+    * weight: .25
+    * 
+    * watermark_mode:  upper_left
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+   /**
+    * Method to the load (recreate) the state of the object from a keyword
+    * list.
+    *
+    * @param kwl Keyword list to initialize from.
+    *
+    * @param prefix Usually something like: "object1."
+    *
+    * @return This method will alway return true as it is intended to be
+    * used in conjuction with the set methods.
+    *
+    * Keywords picked up by loadState:
+    * 
+    * filename: my_colormap_file.jpg
+    *
+    * weight: .25
+    * 
+    * watermark_mode:  upper_left
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   /**
+    * @param The property to get as a string like "watermark_mode".
+    *
+    * @return ossimRefPt<ossimProperty> holding pointer to ossimProperty
+    * matching string or null pointer if string does not match.
+    *
+    * @note Internal pointer can be null so callers should check prior to
+    * accessing like:
+    * ossimRefPtr<ossimProperty> p = myFilter->getProperty(ossimString("foo"));
+    * if (p.valid() == NULL)
+    * {
+    *    some_error;
+    * }
+    */
+   virtual ossimRefPtr<ossimProperty> getProperty(
+      const ossimString& name)const;
+
+   /**
+    * Set property.
+    *
+    * @param property Property to set if property->getName() matches a
+    * property name of this object.
+    */
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+
+   /**
+    * Adds this objects properties to the list.
+    *
+    * @param propertyNames Array to add to.
+    *
+    * @note This method does not clear propertyNames prior to adding it's
+    * names.
+    */
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+   /**
+    * @param list List initialized with watermark mode strings.
+    *
+    * @note This method clears the "list" prior to stuffing.
+    */
+   void getModeList(vector<ossimString>& list) const;
+
+   /** @return theMode */
+   ossimWatermarkFilter::WatermarkMode getMode() const;
+
+   /** @return theMode as a string like "upper_left". */
+   ossimString getModeString() const;
+
+   /**
+    * Sets theFilename to file.
+    *
+    * @param file The watermark image file.
+    */
+   void setFilename(const ossimFilename& file);
+
+   /**
+    * Sets the filter mode.
+    *
+    * @param mode String representing mode.
+    */
+   void setMode(const ossimString& mode);
+
+   /**
+    * Sets the weight.
+    *
+    * @param weight Weight to use for watermark pixels normalize between
+    * 0.0 and 1.0.
+    */
+   void setWeight(ossim_float64 weight);
+   
+   /**
+    * Print method.  Called by: friend operator<<
+    * 
+    * @return std::ostream&
+    */
+   virtual std::ostream& print(std::ostream& out) const;
+
+protected:
+   /** destructor */
+   virtual ~ossimWatermarkFilter();
+
+   /**
+    * Allocates / recomputes things that are needed.  Clears theDirtyFlag
+    * by setting it to false on success.
+    *
+    * @return true on success, false on error.
+    */
+   bool allocate();
+
+   /**
+    * Attempts to open "theFilename".  This will load "theWatermark" with
+    * the image converting it to the scalar type of the input connection.
+    *
+    * @return true on success, false if no image handler is found for the
+    * image or theInputConnection has not been established.
+    */
+   bool openWatermarkFile();
+   
+   // void verifyEnable();
+
+   /**
+    * Writes watermark(s) to theTile.
+    * Performs theTile->validate() at the end if theTile was touched.
+    */
+   template <class T> void fill(T dummy);
+
+   /**
+    * Computes the bounding rectangles.  These are the rectangles in image
+    * space of the input connection to paint the watermark(s) on.  The start of
+    * each rectangle will be the start of where "theWatermark" is painted.
+    */
+   void getIntersectingRects(vector<ossimIrect>& rects);
+
+   /**
+    * Addes upper left watermark rectangle to rects if it intersects
+    * theTile rect clipped to input bounding rect.
+    *
+    * @param rects Array to add rect to.
+    */
+   void getUpperLeftRect(vector<ossimIrect>& rects);
+   
+   /**
+    * Addes upper center watermark rectangle to rects if it intersects
+    * theTile rect clipped to input bounding rect.
+    *
+    * @param rects Array to add rect to.
+    */
+   void getUpperCenterRect(vector<ossimIrect>& rects);
+   
+   /**
+    * Addes upper right watermark rectangle to rects if it intersects
+    * theTile rect clipped to input bounding rect.
+    *
+    * @param rects Array to add rect to.
+    */
+   void getUpperRightRect(vector<ossimIrect>& rects);
+
+   /**
+    * Addes center watermark rectangle to rects if it intersects
+    * theTile rect clipped to input bounding rect.
+    *
+    * @param rects Array to add rect to.
+    */
+   void getCenterRect(vector<ossimIrect>& rects);
+
+   /**
+    * Addes lower left watermark rectangle to rects if it intersects
+    * theTile rect clipped to input bounding rect.
+    *
+    * @param rects Array to add rect to.
+    */
+   void getLowerLeftRect(vector<ossimIrect>& rects);
+
+   /**
+    * Addes lower center watermark rectangle to rects if it intersects
+    * theTile rect clipped to input bounding rect.
+    *
+    * @param rects Array to add rect to.
+    */
+   void getLowerCenterRect(vector<ossimIrect>& rects);
+   
+   /**
+    * Addes lower right watermark rectangle to rects if it intersects
+    * theTile rect clipped to input bounding rect.
+    *
+    * @param rects Array to add rect to.
+    */
+   void getLowerRightRect(vector<ossimIrect>& rects);
+   
+   /**
+    * Addes rectangles to rects if it intersects
+    * theTile rect clipped to input bounding rect.
+    *
+    * This will repeat the watermark throughout the input bounding rect.
+    *
+    * @param rects Array to add rect to.
+    */
+   void getUniformDenseRects(vector<ossimIrect>& rects);
+   
+   /**
+    * Addes rectangles to rects if it intersects
+    * theTile rect clipped to input bounding rect.
+    *
+    * This will repeat the watermark sparsly throughout the input bounding
+    * rect.
+    * 
+    * @param rects Array to add rect to.
+    */
+   void getUniformSparceRects(vector<ossimIrect>& rects);
+   
+   /** File name of watermark image. */
+   ossimFilename      theFilename;
+
+   /** Normalized between 0.0 and 1.0. */
+   ossim_float64      theWatermarkWeight;
+
+   /** The returned tile. */
+   ossimRefPtr<ossimImageData> theTile;
+
+   /** Tile storage for watermark image. */
+   ossimRefPtr<ossimImageData> theWatermark;
+
+   /** The number of watermark bands. */
+   ossim_uint32 theWatermarkNumberOfBands;
+
+   /** The filter mode. */
+   WatermarkMode      theMode;
+
+   /** The bounding rectangle of the input connection. */
+   ossimIrect theInputBoundingRect;
+
+   /** The number of input bands. */
+   ossim_uint32 theInputNumberOfBands;
+
+   /** The input scalar type. */
+   ossimScalarType theInputScalarType;
+
+   /**
+    * Set in the initialize method this instructs the getTile that something
+    * has changes and it need to call initialize.
+    */
+   bool theDirtyFlag;
+
+
+TYPE_DATA
+      
+}; // End of class ossimWatermarkFilter.
+
+#endif /* #ifndef ossimWatermarkFilter_HEADER */
+
diff --git a/include/ossim/imaging/ossimWorldFileWriter.h b/ossim/include/ossim/imaging/ossimWorldFileWriter.h
similarity index 100%
rename from include/ossim/imaging/ossimWorldFileWriter.h
rename to ossim/include/ossim/imaging/ossimWorldFileWriter.h
diff --git a/include/ossim/init/ossimInit.h b/ossim/include/ossim/init/ossimInit.h
similarity index 100%
rename from include/ossim/init/ossimInit.h
rename to ossim/include/ossim/init/ossimInit.h
diff --git a/include/ossim/matrix/controlw.h b/ossim/include/ossim/matrix/controlw.h
similarity index 100%
rename from include/ossim/matrix/controlw.h
rename to ossim/include/ossim/matrix/controlw.h
diff --git a/include/ossim/matrix/include.h b/ossim/include/ossim/matrix/include.h
similarity index 100%
rename from include/ossim/matrix/include.h
rename to ossim/include/ossim/matrix/include.h
diff --git a/include/ossim/matrix/myexcept.h b/ossim/include/ossim/matrix/myexcept.h
similarity index 100%
rename from include/ossim/matrix/myexcept.h
rename to ossim/include/ossim/matrix/myexcept.h
diff --git a/ossim/include/ossim/matrix/newmat.h b/ossim/include/ossim/matrix/newmat.h
new file mode 100644
index 0000000..93956ea
--- /dev/null
+++ b/ossim/include/ossim/matrix/newmat.h
@@ -0,0 +1,1807 @@
+//$$ newmat.h           definition file for new version of matrix package
+
+// Copyright (C) 1991,2,3,4,7,2000,2,3: R B Davies
+
+#ifndef NEWMAT_LIB
+#define NEWMAT_LIB 0
+
+#include <ossim/matrix/include.h>
+
+#include <ossim/matrix/myexcept.h>
+
+
+#ifdef use_namespace
+namespace NEWMAT { using namespace RBD_COMMON; }
+namespace RBD_LIBRARIES { using namespace NEWMAT; }
+namespace NEWMAT {
+#endif
+
+//#define DO_REPORT                     // to activate REPORT
+
+#ifdef NO_LONG_NAMES
+#define UpperTriangularMatrix UTMatrix
+#define LowerTriangularMatrix LTMatrix
+#define SymmetricMatrix SMatrix
+#define DiagonalMatrix DMatrix
+#define BandMatrix BMatrix
+#define UpperBandMatrix UBMatrix
+#define LowerBandMatrix LBMatrix
+#define SymmetricBandMatrix SBMatrix
+#define BandLUMatrix BLUMatrix
+#endif
+
+// ************************** general utilities ****************************/
+
+class GeneralMatrix;
+
+void MatrixErrorNoSpace(const void*);                 // no space handler
+
+class LogAndSign
+// Return from LogDeterminant function
+//    - value of the log plus the sign (+, - or 0)
+{
+   Real log_value;
+   int sign;
+public:
+   LogAndSign() { log_value=0.0; sign=1; }
+   LogAndSign(Real);
+   void operator*=(Real);
+   void PowEq(int k);  // raise to power of k
+   void ChangeSign() { sign = -sign; }
+   Real LogValue() const { return log_value; }
+   int Sign() const { return sign; }
+   Real Value() const;
+   FREE_CHECK(LogAndSign)
+};
+
+// the following class is for counting the number of times a piece of code
+// is executed. It is used for locating any code not executed by test
+// routines. Use turbo GREP locate all places this code is called and
+// check which ones are not accessed.
+// Somewhat implementation dependent as it relies on "cout" still being
+// present when ExeCounter objects are destructed.
+
+#ifdef DO_REPORT
+
+class ExeCounter
+{
+   int line;                                    // code line number
+   int fileid;                                  // file identifier
+   long nexe;                                   // number of executions
+   static int nreports;                         // number of reports
+public:
+   ExeCounter(int,int);
+   void operator++() { nexe++; }
+   ~ExeCounter();                               // prints out reports
+};
+
+#endif
+
+
+// ************************** class MatrixType *****************************/
+
+// Is used for finding the type of a matrix resulting from the binary operations
+// +, -, * and identifying what conversions are permissible.
+// This class must be updated when new matrix types are added.
+
+class GeneralMatrix;                            // defined later
+class BaseMatrix;                               // defined later
+class MatrixInput;                              // defined later
+
+class OSSIM_DLL MatrixType
+{
+public:
+   enum Attribute {  Valid     = 1,
+                     Diagonal  = 2,             // order of these is important
+                     Symmetric = 4,
+                     Band      = 8,
+                     Lower     = 16,
+                     Upper     = 32,
+                     Square    = 64,
+                     Skew      = 128,
+                     LUDeco    = 256,
+                     Ones      = 512 };
+
+   enum            { US = 0,
+                     UT = Valid + Upper + Square,
+                     LT = Valid + Lower + Square,
+                     Rt = Valid,
+                     Sq = Valid + Square,
+                     Sm = Valid + Symmetric + Square,
+                     Sk = Valid + Skew + Square,
+                     Dg = Valid + Diagonal + Band + Lower + Upper + Symmetric
+                        + Square,
+                     Id = Valid + Diagonal + Band + Lower + Upper + Symmetric
+                        + Square + Ones,
+                     RV = Valid,     //   do not separate out
+                     CV = Valid,     //   vectors
+                     BM = Valid + Band + Square,
+                     UB = Valid + Band + Upper + Square,
+                     LB = Valid + Band + Lower + Square,
+                     SB = Valid + Band + Symmetric + Square,
+                     Ct = Valid + LUDeco + Square,
+                     BC = Valid + Band + LUDeco + Square,
+                     Mask = ~Square
+                   };
+
+
+   static int nTypes() { return 12; }          // number of different types
+					       // exclude Ct, US, BC
+public:
+   int attribute;
+   bool DataLossOK;                            // true if data loss is OK when
+                                               // this represents a destination
+public:
+   MatrixType () : DataLossOK(false) {}
+   MatrixType (int i) : attribute(i), DataLossOK(false) {}
+   MatrixType (int i, bool dlok) : attribute(i), DataLossOK(dlok) {}
+   MatrixType (const MatrixType& mt)
+      : attribute(mt.attribute), DataLossOK(mt.DataLossOK) {}
+   void operator=(const MatrixType& mt)
+      { attribute = mt.attribute; DataLossOK = mt.DataLossOK; }
+   void SetDataLossOK() { DataLossOK = true; }
+   int operator+() const { return attribute; }
+   MatrixType operator+(MatrixType mt) const
+      { return MatrixType(attribute & mt.attribute); }
+   MatrixType operator*(const MatrixType&) const;
+   MatrixType SP(const MatrixType&) const;
+   MatrixType KP(const MatrixType&) const;
+   MatrixType operator|(const MatrixType& mt) const
+      { return MatrixType(attribute & mt.attribute & Valid); }
+   MatrixType operator&(const MatrixType& mt) const
+      { return MatrixType(attribute & mt.attribute & Valid); }
+   bool operator>=(MatrixType mt) const
+      { return ( attribute & ~mt.attribute & Mask ) == 0; }
+   bool operator<(MatrixType mt) const         // for MS Visual C++ 4
+      { return ( attribute & ~mt.attribute & Mask ) != 0; }
+   bool operator==(MatrixType t) const
+      { return (attribute == t.attribute); }
+   bool operator!=(MatrixType t) const
+      { return (attribute != t.attribute); }
+   bool operator!() const { return (attribute & Valid) == 0; }
+   MatrixType i() const;                       // type of inverse
+   MatrixType t() const;                       // type of transpose
+   MatrixType AddEqualEl() const               // Add constant to matrix
+      { return MatrixType(attribute & (Valid + Symmetric + Square)); }
+   MatrixType MultRHS() const;                 // type for rhs of multiply
+   MatrixType sub() const                      // type of submatrix
+      { return MatrixType(attribute & Valid); }
+   MatrixType ssub() const                     // type of sym submatrix
+      { return MatrixType(attribute); }        // not for selection matrix
+   GeneralMatrix* New() const;                 // new matrix of given type
+   GeneralMatrix* New(int,int,BaseMatrix*) const;
+                                               // new matrix of given type
+   const char* Value() const;                  // to print type
+   friend bool Rectangular(MatrixType a, MatrixType b, MatrixType c);
+   friend bool Compare(const MatrixType&, MatrixType&);
+                                               // compare and check conv.
+   bool IsBand() const { return (attribute & Band) != 0; }
+   bool IsDiagonal() const { return (attribute & Diagonal) != 0; }
+   bool IsSymmetric() const { return (attribute & Symmetric) != 0; }
+   bool CannotConvert() const { return (attribute & LUDeco) != 0; }
+                                               // used by operator== 
+   FREE_CHECK(MatrixType)
+};
+
+
+// *********************** class MatrixBandWidth ***********************/
+
+class OSSIM_DLL MatrixBandWidth
+{
+public:
+   int lower;
+   int upper;
+   MatrixBandWidth(const int l, const int u) : lower(l), upper (u) {}
+   MatrixBandWidth(const int i) : lower(i), upper(i) {}
+   MatrixBandWidth operator+(const MatrixBandWidth&) const;
+   MatrixBandWidth operator*(const MatrixBandWidth&) const;
+   MatrixBandWidth minimum(const MatrixBandWidth&) const;
+   MatrixBandWidth t() const { return MatrixBandWidth(upper,lower); }
+   bool operator==(const MatrixBandWidth& bw) const
+      { return (lower == bw.lower) && (upper == bw.upper); }
+   bool operator!=(const MatrixBandWidth& bw) const { return !operator==(bw); }
+   int Upper() const { return upper; }
+   int Lower() const { return lower; }
+   FREE_CHECK(MatrixBandWidth)
+};
+
+
+// ********************* Array length specifier ************************/
+
+// This class is introduced to avoid constructors such as
+//   ColumnVector(int)
+// being used for conversions
+
+class OSSIM_DLL ArrayLengthSpecifier
+{
+   int value;
+public:
+   int Value() const { return value; }
+   ArrayLengthSpecifier(int l) : value(l) {}
+};
+
+// ************************* Matrix routines ***************************/
+
+
+class MatrixRowCol;                             // defined later
+class MatrixRow;
+class MatrixCol;
+class MatrixColX;
+
+class GeneralMatrix;                            // defined later
+class AddedMatrix;
+class MultipliedMatrix;
+class SubtractedMatrix;
+class SPMatrix;
+class KPMatrix;
+class ConcatenatedMatrix;
+class StackedMatrix;
+class SolvedMatrix;
+class ShiftedMatrix;
+class NegShiftedMatrix;
+class ScaledMatrix;
+class TransposedMatrix;
+class ReversedMatrix;
+class NegatedMatrix;
+class InvertedMatrix;
+class RowedMatrix;
+class ColedMatrix;
+class DiagedMatrix;
+class MatedMatrix;
+class GetSubMatrix;
+class ReturnMatrix;
+class Matrix;
+class SquareMatrix;
+class nricMatrix;
+class RowVector;
+class ColumnVector;
+class SymmetricMatrix;
+class UpperTriangularMatrix;
+class LowerTriangularMatrix;
+class DiagonalMatrix;
+class CroutMatrix;
+class BandMatrix;
+class LowerBandMatrix;
+class UpperBandMatrix;
+class SymmetricBandMatrix;
+class LinearEquationSolver;
+class GenericMatrix;
+
+
+#define MatrixTypeUnSp 0
+//static MatrixType MatrixTypeUnSp(MatrixType::US);
+//						// AT&T needs this
+
+class OSSIM_DLL BaseMatrix : public RBD_COMMON::Janitor               // base of all matrix classes
+{
+protected:
+   virtual int search(const BaseMatrix*) const = 0;
+						// count number of times matrix
+   						// is referred to
+
+public:
+   virtual GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp) = 0;
+						// evaluate temporary
+   // for old version of G++
+   //   virtual GeneralMatrix* Evaluate(MatrixType mt) = 0;
+   //   GeneralMatrix* Evaluate() { return Evaluate(MatrixTypeUnSp); }
+   AddedMatrix operator+(const BaseMatrix&) const;    // results of operations
+   MultipliedMatrix operator*(const BaseMatrix&) const;
+   SubtractedMatrix operator-(const BaseMatrix&) const;
+   ConcatenatedMatrix operator|(const BaseMatrix&) const;
+   StackedMatrix operator&(const BaseMatrix&) const;
+   ShiftedMatrix operator+(Real) const;
+   ScaledMatrix operator*(Real) const;
+   ScaledMatrix operator/(Real) const;
+   ShiftedMatrix operator-(Real) const;
+   TransposedMatrix t() const;
+//   TransposedMatrix t;
+   NegatedMatrix operator-() const;                   // change sign of elements
+   ReversedMatrix Reverse() const;
+   InvertedMatrix i() const;
+//   InvertedMatrix i;
+   RowedMatrix AsRow() const;
+   ColedMatrix AsColumn() const;
+   DiagedMatrix AsDiagonal() const;
+   MatedMatrix AsMatrix(int,int) const;
+   GetSubMatrix SubMatrix(int,int,int,int) const;
+   GetSubMatrix SymSubMatrix(int,int) const;
+   GetSubMatrix Row(int) const;
+   GetSubMatrix Rows(int,int) const;
+   GetSubMatrix Column(int) const;
+   GetSubMatrix Columns(int,int) const;
+   Real AsScalar() const;                      // conversion of 1 x 1 matrix
+   virtual LogAndSign LogDeterminant() const;
+   Real Determinant() const;
+   virtual Real SumSquare() const;
+   Real NormFrobenius() const;
+   virtual Real SumAbsoluteValue() const;
+   virtual Real Sum() const;
+   virtual Real MaximumAbsoluteValue() const;
+   virtual Real MaximumAbsoluteValue1(int& i) const;
+   virtual Real MaximumAbsoluteValue2(int& i, int& j) const;
+   virtual Real MinimumAbsoluteValue() const;
+   virtual Real MinimumAbsoluteValue1(int& i) const;
+   virtual Real MinimumAbsoluteValue2(int& i, int& j) const;
+   virtual Real Maximum() const;
+   virtual Real Maximum1(int& i) const;
+   virtual Real Maximum2(int& i, int& j) const;
+   virtual Real Minimum() const;
+   virtual Real Minimum1(int& i) const;
+   virtual Real Minimum2(int& i, int& j) const;
+   virtual Real Trace() const;
+   Real Norm1() const;
+   Real NormInfinity() const;
+   virtual MatrixBandWidth BandWidth() const;  // bandwidths of band matrix
+   virtual void CleanUp() {}                   // to clear store
+   void IEQND() const;                         // called by ineq. ops
+//   virtual ReturnMatrix Reverse() const;       // reverse order of elements
+//protected:
+//   BaseMatrix() : t(this), i(this) {}
+
+   friend class GeneralMatrix;
+   friend class Matrix;
+   friend class SquareMatrix;
+   friend class nricMatrix;
+   friend class RowVector;
+   friend class ColumnVector;
+   friend class SymmetricMatrix;
+   friend class UpperTriangularMatrix;
+   friend class LowerTriangularMatrix;
+   friend class DiagonalMatrix;
+   friend class CroutMatrix;
+   friend class BandMatrix;
+   friend class LowerBandMatrix;
+   friend class UpperBandMatrix;
+   friend class SymmetricBandMatrix;
+   friend class AddedMatrix;
+   friend class MultipliedMatrix;
+   friend class SubtractedMatrix;
+   friend class SPMatrix;
+   friend class KPMatrix;
+   friend class ConcatenatedMatrix;
+   friend class StackedMatrix;
+   friend class SolvedMatrix;
+   friend class ShiftedMatrix;
+   friend class NegShiftedMatrix;
+   friend class ScaledMatrix;
+   friend class TransposedMatrix;
+   friend class ReversedMatrix;
+   friend class NegatedMatrix;
+   friend class InvertedMatrix;
+   friend class RowedMatrix;
+   friend class ColedMatrix;
+   friend class DiagedMatrix;
+   friend class MatedMatrix;
+   friend class GetSubMatrix;
+   friend class ReturnMatrix;
+   friend class LinearEquationSolver;
+   friend class GenericMatrix;
+   NEW_DELETE(BaseMatrix)
+};
+
+
+// ***************************** working classes **************************/
+
+class OSSIM_DLL GeneralMatrix : public BaseMatrix         // declarable matrix types
+{
+   virtual GeneralMatrix* Image() const;        // copy of matrix
+protected:
+   int tag;                                     // shows whether can reuse
+   int nrows, ncols;                            // dimensions
+   int storage;                                 // total store required
+   Real* store;                                 // point to store (0=not set)
+   GeneralMatrix();                             // initialise with no store
+   GeneralMatrix(ArrayLengthSpecifier);         // constructor getting store
+   void Add(GeneralMatrix*, Real);              // sum of GM and Real
+   void Add(Real);                              // add Real to this
+   void NegAdd(GeneralMatrix*, Real);           // Real - GM
+   void NegAdd(Real);                           // this = this - Real
+   void Multiply(GeneralMatrix*, Real);         // product of GM and Real
+   void Multiply(Real);                         // multiply this by Real
+   void Negate(GeneralMatrix*);                 // change sign
+   void Negate();                               // change sign
+   void ReverseElements();                      // internal reverse of elements
+   void ReverseElements(GeneralMatrix*);        // reverse order of elements
+   void operator=(Real);                        // set matrix to constant
+   Real* GetStore();                            // get store or copy
+   GeneralMatrix* BorrowStore(GeneralMatrix*, MatrixType);
+                                                // temporarily access store
+   void GetMatrix(const GeneralMatrix*);        // used by = and initialise
+   void Eq(const BaseMatrix&, MatrixType);      // used by =
+   void Eq(const GeneralMatrix&);               // version with no conversion
+   void Eq(const BaseMatrix&, MatrixType, bool);// used by <<
+   void Eq2(const BaseMatrix&, MatrixType);     // cut down version of Eq
+   int search(const BaseMatrix*) const;
+   virtual GeneralMatrix* Transpose(TransposedMatrix*, MatrixType);
+   void CheckConversion(const BaseMatrix&);     // check conversion OK
+   void ReSize(int, int, int);                  // change dimensions
+   virtual short SimpleAddOK(const GeneralMatrix* /* gm */ ) { return 0; }
+             // see bandmat.cpp for explanation
+   virtual void MiniCleanUp() { store = 0; storage = 0; nrows = 0; ncols = 0; tag = -1;}
+             // CleanUp when the data array has already been deleted
+   void PlusEqual(const GeneralMatrix& gm);
+   void MinusEqual(const GeneralMatrix& gm);
+   void PlusEqual(Real f);
+   void MinusEqual(Real f);
+public:
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   virtual MatrixType Type() const = 0;         // type of a matrix
+   int Nrows() const { return nrows; }          // get dimensions
+   int Ncols() const { return ncols; }
+   int Storage() const { return storage; }
+   Real* Store() const { return store; }
+   virtual ~GeneralMatrix();                    // delete store if set
+   void tDelete();                              // delete if tag permits
+   bool reuse();                                // true if tag allows reuse
+   void Protect() { tag=-1; }                   // cannot delete or reuse
+   int Tag() const { return tag; }
+   bool IsZero() const;                         // test matrix has all zeros
+   void Release() { tag=1; }                    // del store after next use
+   void Release(int t) { tag=t; }               // del store after t accesses
+   void ReleaseAndDelete() { tag=0; }           // delete matrix after use
+   void operator<<(const Real*);                // assignment from an array
+   void operator<<(const int*);                // assignment from an array
+   void operator<<(const BaseMatrix& X)
+      { Eq(X,this->Type(),true); }              // = without checking type
+   void Inject(const GeneralMatrix&);           // copy stored els only
+   void operator+=(const BaseMatrix&);
+   void operator-=(const BaseMatrix&);
+   void operator*=(const BaseMatrix&);
+   void operator|=(const BaseMatrix&);
+   void operator&=(const BaseMatrix&);
+   void operator+=(Real);
+   void operator-=(Real r) { operator+=(-r); }
+   void operator*=(Real);
+   void operator/=(Real r) { operator*=(1.0/r); }
+   virtual GeneralMatrix* MakeSolver();         // for solving
+   virtual void Solver(MatrixColX&, const MatrixColX&) {}
+   virtual void GetRow(MatrixRowCol&) = 0;      // Get matrix row
+   virtual void RestoreRow(MatrixRowCol&) {}    // Restore matrix row
+   virtual void NextRow(MatrixRowCol&);         // Go to next row
+   virtual void GetCol(MatrixRowCol&) = 0;      // Get matrix col
+   virtual void GetCol(MatrixColX&) = 0;        // Get matrix col
+   virtual void RestoreCol(MatrixRowCol&) {}    // Restore matrix col
+   virtual void RestoreCol(MatrixColX&) {}      // Restore matrix col
+   virtual void NextCol(MatrixRowCol&);         // Go to next col
+   virtual void NextCol(MatrixColX&);           // Go to next col
+   Real SumSquare() const;
+   Real SumAbsoluteValue() const;
+   Real Sum() const;
+   Real MaximumAbsoluteValue1(int& i) const;
+   Real MinimumAbsoluteValue1(int& i) const;
+   Real Maximum1(int& i) const;
+   Real Minimum1(int& i) const;
+   Real MaximumAbsoluteValue() const;
+   Real MaximumAbsoluteValue2(int& i, int& j) const;
+   Real MinimumAbsoluteValue() const;
+   Real MinimumAbsoluteValue2(int& i, int& j) const;
+   Real Maximum() const;
+   Real Maximum2(int& i, int& j) const;
+   Real Minimum() const;
+   Real Minimum2(int& i, int& j) const;
+   LogAndSign LogDeterminant() const;
+   virtual bool IsEqual(const GeneralMatrix&) const;
+                                                // same type, same values
+   void CheckStore() const;                     // check store is non-zero
+   virtual void SetParameters(const GeneralMatrix*) {}
+                                                // set parameters in GetMatrix
+   operator ReturnMatrix() const;               // for building a ReturnMatrix
+   ReturnMatrix ForReturn() const;
+   virtual bool SameStorageType(const GeneralMatrix& A) const;
+   virtual void ReSizeForAdd(const GeneralMatrix& A, const GeneralMatrix& B);
+   virtual void ReSizeForSP(const GeneralMatrix& A, const GeneralMatrix& B);
+   virtual void ReSize(const GeneralMatrix& A);
+   MatrixInput operator<<(Real);                // for loading a list
+   MatrixInput operator<<(int f);
+//   ReturnMatrix Reverse() const;                // reverse order of elements
+   void CleanUp();                              // to clear store
+
+   friend class Matrix;
+   friend class SquareMatrix;
+   friend class nricMatrix;
+   friend class SymmetricMatrix;
+   friend class UpperTriangularMatrix;
+   friend class LowerTriangularMatrix;
+   friend class DiagonalMatrix;
+   friend class CroutMatrix;
+   friend class RowVector;
+   friend class ColumnVector;
+   friend class BandMatrix;
+   friend class LowerBandMatrix;
+   friend class UpperBandMatrix;
+   friend class SymmetricBandMatrix;
+   friend class BaseMatrix;
+   friend class AddedMatrix;
+   friend class MultipliedMatrix;
+   friend class SubtractedMatrix;
+   friend class SPMatrix;
+   friend class KPMatrix;
+   friend class ConcatenatedMatrix;
+   friend class StackedMatrix;
+   friend class SolvedMatrix;
+   friend class ShiftedMatrix;
+   friend class NegShiftedMatrix;
+   friend class ScaledMatrix;
+   friend class TransposedMatrix;
+   friend class ReversedMatrix;
+   friend class NegatedMatrix;
+   friend class InvertedMatrix;
+   friend class RowedMatrix;
+   friend class ColedMatrix;
+   friend class DiagedMatrix;
+   friend class MatedMatrix;
+   friend class GetSubMatrix;
+   friend class ReturnMatrix;
+   friend class LinearEquationSolver;
+   friend class GenericMatrix;
+   NEW_DELETE(GeneralMatrix)
+};
+
+
+
+class OSSIM_DLL Matrix : public GeneralMatrix             // usual rectangular matrix
+{
+   GeneralMatrix* Image() const;                // copy of matrix
+public:
+   Matrix():GeneralMatrix() {}
+   ~Matrix() {}
+   Matrix(int, int);                            // standard declaration
+   Matrix(const BaseMatrix&);                   // evaluate BaseMatrix
+   void operator=(const BaseMatrix&);
+   void operator=(Real f) { GeneralMatrix::operator=(f); }
+   void operator=(const Matrix& m) { Eq(m); }
+   MatrixType Type() const;
+   Real& operator()(int, int);                  // access element
+   Real& element(int, int);                     // access element
+   Real operator()(int, int) const;            // access element
+   Real element(int, int) const;               // access element
+#ifdef SETUP_C_SUBSCRIPTS
+   Real* operator[](int m) { return store+m*ncols; }
+   const Real* operator[](int m) const { return store+m*ncols; }
+#endif
+   Matrix(const Matrix& gm):GeneralMatrix(gm) { GetMatrix(&gm); }
+   GeneralMatrix* MakeSolver();
+   Real Trace() const;
+   void GetRow(MatrixRowCol&);
+   void GetCol(MatrixRowCol&);
+   void GetCol(MatrixColX&);
+   void RestoreCol(MatrixRowCol&);
+   void RestoreCol(MatrixColX&);
+   void NextRow(MatrixRowCol&);
+   void NextCol(MatrixRowCol&);
+   void NextCol(MatrixColX&);
+   virtual void ReSize(int,int);           // change dimensions
+      // virtual so we will catch it being used in a vector called as a matrix
+   void ReSize(const GeneralMatrix& A);
+   Real MaximumAbsoluteValue2(int& i, int& j) const;
+   Real MinimumAbsoluteValue2(int& i, int& j) const;
+   Real Maximum2(int& i, int& j) const;
+   Real Minimum2(int& i, int& j) const;
+   void operator+=(const Matrix& M) { PlusEqual(M); }
+   void operator-=(const Matrix& M) { MinusEqual(M); }
+   void operator+=(Real f) { GeneralMatrix::Add(f); }
+   void operator-=(Real f) { GeneralMatrix::Add(-f); }
+   friend OSSIM_DLL Real DotProduct(const Matrix& A, const Matrix& B);
+   NEW_DELETE(Matrix)
+};
+
+class OSSIM_DLL SquareMatrix : public Matrix              // square matrix
+{
+   GeneralMatrix* Image() const;                // copy of matrix
+public:
+   SquareMatrix() {}
+   ~SquareMatrix() {}
+   SquareMatrix(ArrayLengthSpecifier);          // standard declaration
+   SquareMatrix(const BaseMatrix&);             // evaluate BaseMatrix
+   void operator=(const BaseMatrix&);
+   void operator=(Real f) { GeneralMatrix::operator=(f); }
+   void operator=(const SquareMatrix& m) { Eq(m); }
+   void operator=(const Matrix& m);
+   MatrixType Type() const;
+   SquareMatrix(const SquareMatrix& gm):Matrix(gm) { GetMatrix(&gm); }
+   SquareMatrix(const Matrix& gm);
+   void ReSize(int);                            // change dimensions
+   virtual void ReSize(int,int);                // change dimensions
+      // virtual so we will catch it being used in a vector called as a matrix
+   void ReSize(const GeneralMatrix& A);
+   void operator+=(const Matrix& M) { PlusEqual(M); }
+   void operator-=(const Matrix& M) { MinusEqual(M); }
+   void operator+=(Real f) { GeneralMatrix::Add(f); }
+   void operator-=(Real f) { GeneralMatrix::Add(-f); }
+   NEW_DELETE(SquareMatrix)
+};
+
+class OSSIM_DLL nricMatrix : public Matrix                // for use with Numerical
+                                                // Recipes in C
+{
+   GeneralMatrix* Image() const;                // copy of matrix
+   Real** row_pointer;                          // points to rows
+   void MakeRowPointer();                       // build rowpointer
+   void DeleteRowPointer();
+public:
+   nricMatrix():Matrix() {}
+   nricMatrix(int m, int n)                     // standard declaration
+      :  Matrix(m,n) { MakeRowPointer(); }
+   nricMatrix(const BaseMatrix& bm)             // evaluate BaseMatrix
+      :  Matrix(bm) { MakeRowPointer(); }
+   void operator=(const BaseMatrix& bm)
+      { DeleteRowPointer(); Matrix::operator=(bm); MakeRowPointer(); }
+   void operator=(Real f) { GeneralMatrix::operator=(f); }
+   void operator=(const nricMatrix& m)
+      { DeleteRowPointer(); Eq(m); MakeRowPointer(); }
+   void operator<<(const BaseMatrix& X)
+      { DeleteRowPointer(); Eq(X,this->Type(),true); MakeRowPointer(); }
+   nricMatrix(const nricMatrix& gm):Matrix(gm) { GetMatrix(&gm); MakeRowPointer(); }
+   void ReSize(int m, int n)               // change dimensions
+      { DeleteRowPointer(); Matrix::ReSize(m,n); MakeRowPointer(); }
+   void ReSize(const GeneralMatrix& A);
+   ~nricMatrix() { DeleteRowPointer(); }
+   Real** nric() const { CheckStore(); return row_pointer-1; }
+   void CleanUp();                                // to clear store
+   void MiniCleanUp();
+   void operator+=(const Matrix& M) { PlusEqual(M); }
+   void operator-=(const Matrix& M) { MinusEqual(M); }
+   void operator+=(Real f) { GeneralMatrix::Add(f); }
+   void operator-=(Real f) { GeneralMatrix::Add(-f); }
+   NEW_DELETE(nricMatrix)
+};
+
+class OSSIM_DLL SymmetricMatrix : public GeneralMatrix
+{
+   GeneralMatrix* Image() const;                // copy of matrix
+public:
+   SymmetricMatrix():GeneralMatrix() {}
+   ~SymmetricMatrix() {}
+   SymmetricMatrix(ArrayLengthSpecifier);
+   SymmetricMatrix(const BaseMatrix&);
+   void operator=(const BaseMatrix&);
+   void operator=(Real f) { GeneralMatrix::operator=(f); }
+   void operator=(const SymmetricMatrix& m) { Eq(m); }
+   Real& operator()(int, int);                  // access element
+   Real& element(int, int);                     // access element
+   Real operator()(int, int) const;             // access element
+   Real element(int, int) const;                // access element
+#ifdef SETUP_C_SUBSCRIPTS
+   Real* operator[](int m) { return store+(m*(m+1))/2; }
+   const Real* operator[](int m) const { return store+(m*(m+1))/2; }
+#endif
+   MatrixType Type() const;
+   SymmetricMatrix(const SymmetricMatrix& gm):GeneralMatrix(gm) { GetMatrix(&gm); }
+   Real SumSquare() const;
+   Real SumAbsoluteValue() const;
+   Real Sum() const;
+   Real Trace() const;
+   void GetRow(MatrixRowCol&);
+   void GetCol(MatrixRowCol&);
+   void GetCol(MatrixColX&);
+   void RestoreCol(MatrixRowCol&) {}
+   void RestoreCol(MatrixColX&);
+	GeneralMatrix* Transpose(TransposedMatrix*, MatrixType);
+   void ReSize(int);                       // change dimensions
+   void ReSize(const GeneralMatrix& A);
+   void operator+=(const SymmetricMatrix& M) { PlusEqual(M); }
+   void operator-=(const SymmetricMatrix& M) { MinusEqual(M); }
+   void operator+=(Real f) { GeneralMatrix::Add(f); }
+   void operator-=(Real f) { GeneralMatrix::Add(-f); }
+   NEW_DELETE(SymmetricMatrix)
+};
+
+class OSSIM_DLL UpperTriangularMatrix : public GeneralMatrix
+{
+   GeneralMatrix* Image() const;                // copy of matrix
+public:
+   UpperTriangularMatrix():GeneralMatrix() {}
+   ~UpperTriangularMatrix() {}
+   UpperTriangularMatrix(ArrayLengthSpecifier);
+   void operator=(const BaseMatrix&);
+   void operator=(const UpperTriangularMatrix& m) { Eq(m); }
+   UpperTriangularMatrix(const BaseMatrix&);
+   UpperTriangularMatrix(const UpperTriangularMatrix& gm):GeneralMatrix(gm) { GetMatrix(&gm); }
+   void operator=(Real f) { GeneralMatrix::operator=(f); }
+   Real& operator()(int, int);                  // access element
+   Real& element(int, int);                     // access element
+   Real operator()(int, int) const;             // access element
+   Real element(int, int) const;                // access element
+#ifdef SETUP_C_SUBSCRIPTS
+   Real* operator[](int m) { return store+m*ncols-(m*(m+1))/2; }
+   const Real* operator[](int m) const { return store+m*ncols-(m*(m+1))/2; }
+#endif
+   MatrixType Type() const;
+   GeneralMatrix* MakeSolver() { return this; } // for solving
+   void Solver(MatrixColX&, const MatrixColX&);
+   LogAndSign LogDeterminant() const;
+   Real Trace() const;
+   void GetRow(MatrixRowCol&);
+   void GetCol(MatrixRowCol&);
+   void GetCol(MatrixColX&);
+   void RestoreCol(MatrixRowCol&);
+   void RestoreCol(MatrixColX& c) { RestoreCol((MatrixRowCol&)c); }
+   void NextRow(MatrixRowCol&);
+   void ReSize(int);                       // change dimensions
+   void ReSize(const GeneralMatrix& A);
+   MatrixBandWidth BandWidth() const;
+   void operator+=(const UpperTriangularMatrix& M) { PlusEqual(M); }
+   void operator-=(const UpperTriangularMatrix& M) { MinusEqual(M); }
+   void operator+=(Real f) { GeneralMatrix::operator+=(f); }
+   void operator-=(Real f) { GeneralMatrix::operator-=(f); }
+   NEW_DELETE(UpperTriangularMatrix)
+};
+
+class OSSIM_DLL LowerTriangularMatrix : public GeneralMatrix
+{
+   GeneralMatrix* Image() const;                // copy of matrix
+public:
+   LowerTriangularMatrix():GeneralMatrix() {}
+   ~LowerTriangularMatrix() {}
+   LowerTriangularMatrix(ArrayLengthSpecifier);
+   LowerTriangularMatrix(const LowerTriangularMatrix& gm):GeneralMatrix(gm) { GetMatrix(&gm); }
+   LowerTriangularMatrix(const BaseMatrix& M);
+   void operator=(const BaseMatrix&);
+   void operator=(Real f) { GeneralMatrix::operator=(f); }
+   void operator=(const LowerTriangularMatrix& m) { Eq(m); }
+   Real& operator()(int, int);                  // access element
+   Real& element(int, int);                     // access element
+   Real operator()(int, int) const;             // access element
+   Real element(int, int) const;                // access element
+#ifdef SETUP_C_SUBSCRIPTS
+   Real* operator[](int m) { return store+(m*(m+1))/2; }
+   const Real* operator[](int m) const { return store+(m*(m+1))/2; }
+#endif
+   MatrixType Type() const;
+   GeneralMatrix* MakeSolver() { return this; } // for solving
+   void Solver(MatrixColX&, const MatrixColX&);
+   LogAndSign LogDeterminant() const;
+   Real Trace() const;
+   void GetRow(MatrixRowCol&);
+   void GetCol(MatrixRowCol&);
+   void GetCol(MatrixColX&);
+   void RestoreCol(MatrixRowCol&);
+   void RestoreCol(MatrixColX& c) { RestoreCol((MatrixRowCol&)c); }
+   void NextRow(MatrixRowCol&);
+   void ReSize(int);                       // change dimensions
+   void ReSize(const GeneralMatrix& A);
+   MatrixBandWidth BandWidth() const;
+   void operator+=(const LowerTriangularMatrix& M) { PlusEqual(M); }
+   void operator-=(const LowerTriangularMatrix& M) { MinusEqual(M); }
+   void operator+=(Real f) { GeneralMatrix::operator+=(f); }
+   void operator-=(Real f) { GeneralMatrix::operator-=(f); }
+   NEW_DELETE(LowerTriangularMatrix)
+};
+
+class OSSIM_DLL DiagonalMatrix : public GeneralMatrix
+{
+   GeneralMatrix* Image() const;                // copy of matrix
+public:
+   DiagonalMatrix():GeneralMatrix() {}
+   ~DiagonalMatrix() {}
+   DiagonalMatrix(ArrayLengthSpecifier);
+   DiagonalMatrix(const BaseMatrix&);
+   DiagonalMatrix(const DiagonalMatrix& gm):GeneralMatrix(gm) { GetMatrix(&gm); }
+   void operator=(const BaseMatrix&);
+   void operator=(Real f) { GeneralMatrix::operator=(f); }
+   void operator=(const DiagonalMatrix& m) { Eq(m); }
+   Real& operator()(int, int);                  // access element
+   Real& operator()(int);                       // access element
+   Real operator()(int, int) const;             // access element
+   Real operator()(int) const;
+   Real& element(int, int);                     // access element
+   Real& element(int);                          // access element
+   Real element(int, int) const;                // access element
+   Real element(int) const;                     // access element
+#ifdef SETUP_C_SUBSCRIPTS
+   Real& operator[](int m) { return store[m]; }
+   const Real& operator[](int m) const { return store[m]; }
+#endif
+   MatrixType Type() const;
+
+   LogAndSign LogDeterminant() const;
+   Real Trace() const;
+   void GetRow(MatrixRowCol&);
+   void GetCol(MatrixRowCol&);
+   void GetCol(MatrixColX&);
+   void NextRow(MatrixRowCol&);
+   void NextCol(MatrixRowCol&);
+   void NextCol(MatrixColX&);
+   GeneralMatrix* MakeSolver() { return this; } // for solving
+   void Solver(MatrixColX&, const MatrixColX&);
+   GeneralMatrix* Transpose(TransposedMatrix*, MatrixType);
+   void ReSize(int);                       // change dimensions
+   void ReSize(const GeneralMatrix& A);
+   Real* nric() const
+      { CheckStore(); return store-1; }         // for use by NRIC
+   MatrixBandWidth BandWidth() const;
+//   ReturnMatrix Reverse() const;                // reverse order of elements
+   void operator+=(const DiagonalMatrix& M) { PlusEqual(M); }
+   void operator-=(const DiagonalMatrix& M) { MinusEqual(M); }
+   void operator+=(Real f) { GeneralMatrix::operator+=(f); }
+   void operator-=(Real f) { GeneralMatrix::operator-=(f); }
+   NEW_DELETE(DiagonalMatrix)
+};
+
+class OSSIM_DLL RowVector : public Matrix
+{
+   GeneralMatrix* Image() const;                // copy of matrix
+public:
+   RowVector():Matrix() { nrows = 1; }
+   ~RowVector() {}
+   RowVector(ArrayLengthSpecifier n) : Matrix(1,n.Value()) {}
+   RowVector(const BaseMatrix&);
+   RowVector(const RowVector& gm):Matrix(gm) { GetMatrix(&gm); }
+   void operator=(const BaseMatrix&);
+   void operator=(Real f) { GeneralMatrix::operator=(f); }
+   void operator=(const RowVector& m) { Eq(m); }
+   Real& operator()(int);                       // access element
+   Real& element(int);                          // access element
+   Real operator()(int) const;                  // access element
+   Real element(int) const;                     // access element
+#ifdef SETUP_C_SUBSCRIPTS
+   Real& operator[](int m) { return store[m]; }
+   const Real& operator[](int m) const { return store[m]; }
+#endif
+   MatrixType Type() const;
+   void GetCol(MatrixRowCol&);
+   void GetCol(MatrixColX&);
+   void NextCol(MatrixRowCol&);
+   void NextCol(MatrixColX&);
+   void RestoreCol(MatrixRowCol&) {}
+   void RestoreCol(MatrixColX& c);
+   GeneralMatrix* Transpose(TransposedMatrix*, MatrixType);
+   void ReSize(int);                       // change dimensions
+   void ReSize(int,int);                   // in case access is matrix
+   void ReSize(const GeneralMatrix& A);
+   Real* nric() const
+      { CheckStore(); return store-1; }         // for use by NRIC
+   void CleanUp();                              // to clear store
+   void MiniCleanUp() { store = 0; storage = 0; nrows = 1; ncols = 0; tag = -1; }
+   // friend ReturnMatrix GetMatrixRow(Matrix& A, int row);
+   void operator+=(const Matrix& M) { PlusEqual(M); }
+   void operator-=(const Matrix& M) { MinusEqual(M); }
+   void operator+=(Real f) { GeneralMatrix::Add(f); }
+   void operator-=(Real f) { GeneralMatrix::Add(-f); }
+   NEW_DELETE(RowVector)
+};
+
+class OSSIM_DLL ColumnVector : public Matrix
+{
+   GeneralMatrix* Image() const;                // copy of matrix
+public:
+   ColumnVector():Matrix() { ncols = 1; }
+   ~ColumnVector() {}
+   ColumnVector(ArrayLengthSpecifier n) : Matrix(n.Value(),1) {}
+   ColumnVector(const BaseMatrix&);
+   ColumnVector(const ColumnVector& gm):Matrix(gm) { GetMatrix(&gm); }
+   void operator=(const BaseMatrix&);
+   void operator=(Real f) { GeneralMatrix::operator=(f); }
+   void operator=(const ColumnVector& m) { Eq(m); }
+   Real& operator()(int);                       // access element
+   Real& element(int);                          // access element
+   Real operator()(int) const;                  // access element
+   Real element(int) const;                     // access element
+#ifdef SETUP_C_SUBSCRIPTS
+   Real& operator[](int m) { return store[m]; }
+   const Real& operator[](int m) const { return store[m]; }
+#endif
+   MatrixType Type() const;
+   GeneralMatrix* Transpose(TransposedMatrix*, MatrixType);
+   void ReSize(int);                       // change dimensions
+   void ReSize(int,int);                   // in case access is matrix
+   void ReSize(const GeneralMatrix& A);
+   Real* nric() const
+      { CheckStore(); return store-1; }         // for use by NRIC
+   void CleanUp();                              // to clear store
+   void MiniCleanUp() { store = 0; storage = 0; nrows = 0; ncols = 1; tag = -1; }
+//   ReturnMatrix Reverse() const;                // reverse order of elements
+   void operator+=(const Matrix& M) { PlusEqual(M); }
+   void operator-=(const Matrix& M) { MinusEqual(M); }
+   void operator+=(Real f) { GeneralMatrix::Add(f); }
+   void operator-=(Real f) { GeneralMatrix::Add(-f); }
+   NEW_DELETE(ColumnVector)
+};
+
+class OSSIM_DLL CroutMatrix : public GeneralMatrix        // for LU decomposition
+{
+   int* indx;
+   bool d;
+   bool sing;
+   void ludcmp();
+   void operator=(const CroutMatrix& /* m */) {}     // not allowed
+public:
+   CroutMatrix(const BaseMatrix&);
+   MatrixType Type() const;
+   void lubksb(Real*, int=0);
+   ~CroutMatrix();
+   GeneralMatrix* MakeSolver() { return this; } // for solving
+   LogAndSign LogDeterminant() const;
+   void Solver(MatrixColX&, const MatrixColX&);
+   void GetRow(MatrixRowCol&);
+   void GetCol(MatrixRowCol&);
+   void GetCol(MatrixColX& c) { GetCol((MatrixRowCol&)c); }
+   void CleanUp();                                // to clear store
+   void MiniCleanUp();
+   bool IsEqual(const GeneralMatrix&) const;
+   bool IsSingular() const { return sing; }
+   NEW_DELETE(CroutMatrix)
+};
+
+// ***************************** band matrices ***************************/
+
+class OSSIM_DLL BandMatrix : public GeneralMatrix         // band matrix
+{
+   GeneralMatrix* Image() const;                // copy of matrix
+protected:
+   void CornerClear() const;                    // set unused elements to zero
+   short SimpleAddOK(const GeneralMatrix* gm);
+public:
+   int lower, upper;                            // band widths
+   BandMatrix():GeneralMatrix() { lower=0; upper=0; CornerClear(); }
+   ~BandMatrix() {}
+   BandMatrix(int n,int lb,int ub) { ReSize(n,lb,ub); CornerClear(); }
+                                                // standard declaration
+   BandMatrix(const BaseMatrix&);               // evaluate BaseMatrix
+   void operator=(const BaseMatrix&);
+   void operator=(Real f) { GeneralMatrix::operator=(f); }
+   void operator=(const BandMatrix& m) { Eq(m); }
+   MatrixType Type() const;
+   Real& operator()(int, int);                  // access element
+   Real& element(int, int);                     // access element
+   Real operator()(int, int) const;             // access element
+   Real element(int, int) const;                // access element
+#ifdef SETUP_C_SUBSCRIPTS
+   Real* operator[](int m) { return store+(upper+lower)*m+lower; }
+   const Real* operator[](int m) const { return store+(upper+lower)*m+lower; }
+#endif
+   BandMatrix(const BandMatrix& gm):GeneralMatrix(gm) { GetMatrix(&gm); }
+   LogAndSign LogDeterminant() const;
+   GeneralMatrix* MakeSolver();
+   Real Trace() const;
+   Real SumSquare() const { CornerClear(); return GeneralMatrix::SumSquare(); }
+   Real SumAbsoluteValue() const
+      { CornerClear(); return GeneralMatrix::SumAbsoluteValue(); }
+   Real Sum() const
+      { CornerClear(); return GeneralMatrix::Sum(); }
+   Real MaximumAbsoluteValue() const
+      { CornerClear(); return GeneralMatrix::MaximumAbsoluteValue(); }
+   Real MinimumAbsoluteValue() const
+      { int i, j; return GeneralMatrix::MinimumAbsoluteValue2(i, j); }
+   Real Maximum() const { int i, j; return GeneralMatrix::Maximum2(i, j); }
+   Real Minimum() const { int i, j; return GeneralMatrix::Minimum2(i, j); }
+   void GetRow(MatrixRowCol&);
+   void GetCol(MatrixRowCol&);
+   void GetCol(MatrixColX&);
+   void RestoreCol(MatrixRowCol&);
+   void RestoreCol(MatrixColX& c) { RestoreCol((MatrixRowCol&)c); }
+   void NextRow(MatrixRowCol&);
+   virtual void ReSize(int, int, int);             // change dimensions
+   void ReSize(const GeneralMatrix& A);
+   bool SameStorageType(const GeneralMatrix& A) const;
+   void ReSizeForAdd(const GeneralMatrix& A, const GeneralMatrix& B);
+   void ReSizeForSP(const GeneralMatrix& A, const GeneralMatrix& B);
+   MatrixBandWidth BandWidth() const;
+   void SetParameters(const GeneralMatrix*);
+   MatrixInput operator<<(Real);                // will give error
+   MatrixInput operator<<(int f);
+   void operator<<(const Real* r);              // will give error
+   void operator<<(const int* r);               // will give error
+      // the next is included because Zortech and Borland
+      // cannot find the copy in GeneralMatrix
+   void operator<<(const BaseMatrix& X) { GeneralMatrix::operator<<(X); }
+   NEW_DELETE(BandMatrix)
+};
+
+class OSSIM_DLL UpperBandMatrix : public BandMatrix       // upper band matrix
+{
+   GeneralMatrix* Image() const;                // copy of matrix
+public:
+   UpperBandMatrix():BandMatrix() {}
+   ~UpperBandMatrix() {}
+   UpperBandMatrix(int n, int ubw)              // standard declaration
+      : BandMatrix(n, 0, ubw) {}
+   UpperBandMatrix(const BaseMatrix&);          // evaluate BaseMatrix
+   void operator=(const BaseMatrix&);
+   void operator=(Real f) { GeneralMatrix::operator=(f); }
+   void operator=(const UpperBandMatrix& m) { Eq(m); }
+   MatrixType Type() const;
+   UpperBandMatrix(const UpperBandMatrix& gm):BandMatrix(gm) { GetMatrix(&gm); }
+   GeneralMatrix* MakeSolver() { return this; }
+   void Solver(MatrixColX&, const MatrixColX&);
+   LogAndSign LogDeterminant() const;
+   void ReSize(int, int, int);             // change dimensions
+   void ReSize(int n,int ubw)              // change dimensions
+      { BandMatrix::ReSize(n,0,ubw); }
+   void ReSize(const GeneralMatrix& A) { BandMatrix::ReSize(A); }
+   Real& operator()(int, int);
+   Real operator()(int, int) const;
+   Real& element(int, int);
+   Real element(int, int) const;
+#ifdef SETUP_C_SUBSCRIPTS
+   Real* operator[](int m) { return store+upper*m; }
+   const Real* operator[](int m) const { return store+upper*m; }
+#endif
+   NEW_DELETE(UpperBandMatrix)
+};
+
+class OSSIM_DLL LowerBandMatrix : public BandMatrix       // upper band matrix
+{
+   GeneralMatrix* Image() const;                // copy of matrix
+public:
+   LowerBandMatrix():BandMatrix() {}
+   ~LowerBandMatrix() {}
+   LowerBandMatrix(int n, int lbw)              // standard declaration
+      : BandMatrix(n, lbw, 0) {}
+   LowerBandMatrix(const BaseMatrix&);          // evaluate BaseMatrix
+   void operator=(const BaseMatrix&);
+   void operator=(Real f) { GeneralMatrix::operator=(f); }
+   void operator=(const LowerBandMatrix& m) { Eq(m); }
+   MatrixType Type() const;
+   LowerBandMatrix(const LowerBandMatrix& gm):BandMatrix(gm) { GetMatrix(&gm); }
+   GeneralMatrix* MakeSolver() { return this; }
+   void Solver(MatrixColX&, const MatrixColX&);
+   LogAndSign LogDeterminant() const;
+   void ReSize(int, int, int);             // change dimensions
+   void ReSize(int n,int lbw)             // change dimensions
+      { BandMatrix::ReSize(n,lbw,0); }
+   void ReSize(const GeneralMatrix& A) { BandMatrix::ReSize(A); }
+   Real& operator()(int, int);
+   Real operator()(int, int) const;
+   Real& element(int, int);
+   Real element(int, int) const;
+#ifdef SETUP_C_SUBSCRIPTS
+   Real* operator[](int m) { return store+lower*(m+1); }
+   const Real* operator[](int m) const { return store+lower*(m+1); }
+#endif
+   NEW_DELETE(LowerBandMatrix)
+};
+
+class OSSIM_DLL SymmetricBandMatrix : public GeneralMatrix
+{
+   GeneralMatrix* Image() const;                // copy of matrix
+   void CornerClear() const;                    // set unused elements to zero
+   short SimpleAddOK(const GeneralMatrix* gm);
+public:
+   int lower;                                   // lower band width
+   SymmetricBandMatrix():GeneralMatrix() { lower=0; CornerClear(); }
+   ~SymmetricBandMatrix() {}
+   SymmetricBandMatrix(int n, int lb) { ReSize(n,lb); CornerClear(); }
+   SymmetricBandMatrix(const BaseMatrix&);
+   void operator=(const BaseMatrix&);
+   void operator=(Real f) { GeneralMatrix::operator=(f); }
+   void operator=(const SymmetricBandMatrix& m) { Eq(m); }
+   Real& operator()(int, int);                  // access element
+   Real& element(int, int);                     // access element
+   Real operator()(int, int) const;             // access element
+   Real element(int, int) const;                // access element
+#ifdef SETUP_C_SUBSCRIPTS
+   Real* operator[](int m) { return store+lower*(m+1); }
+   const Real* operator[](int m) const { return store+lower*(m+1); }
+#endif
+   MatrixType Type() const;
+   SymmetricBandMatrix(const SymmetricBandMatrix& gm):GeneralMatrix(gm) { GetMatrix(&gm); }
+   GeneralMatrix* MakeSolver();
+   Real SumSquare() const;
+   Real SumAbsoluteValue() const;
+   Real Sum() const;
+   Real MaximumAbsoluteValue() const
+      { CornerClear(); return GeneralMatrix::MaximumAbsoluteValue(); }
+   Real MinimumAbsoluteValue() const
+      { int i, j; return GeneralMatrix::MinimumAbsoluteValue2(i, j); }
+   Real Maximum() const { int i, j; return GeneralMatrix::Maximum2(i, j); }
+   Real Minimum() const { int i, j; return GeneralMatrix::Minimum2(i, j); }
+   Real Trace() const;
+   LogAndSign LogDeterminant() const;
+   void GetRow(MatrixRowCol&);
+   void GetCol(MatrixRowCol&);
+   void GetCol(MatrixColX&);
+   void RestoreCol(MatrixRowCol&) {}
+   void RestoreCol(MatrixColX&);
+   GeneralMatrix* Transpose(TransposedMatrix*, MatrixType);
+   void ReSize(int,int);                       // change dimensions
+   void ReSize(const GeneralMatrix& A);
+   bool SameStorageType(const GeneralMatrix& A) const;
+   void ReSizeForAdd(const GeneralMatrix& A, const GeneralMatrix& B);
+   void ReSizeForSP(const GeneralMatrix& A, const GeneralMatrix& B);
+   MatrixBandWidth BandWidth() const;
+   void SetParameters(const GeneralMatrix*);
+   void operator<<(const Real* r);              // will give error
+   void operator<<(const int* r);               // will give error
+   void operator<<(const BaseMatrix& X) { GeneralMatrix::operator<<(X); }
+   NEW_DELETE(SymmetricBandMatrix)
+};
+
+class OSSIM_DLL BandLUMatrix : public GeneralMatrix
+// for LU decomposition of band matrix
+{
+   int* indx;
+   bool d;
+   bool sing;                                   // true if singular
+   Real* store2;
+   int storage2;
+   void ludcmp();
+   int m1,m2;                                   // lower and upper
+   void operator=(const BandLUMatrix& /* m */) {}     // no allowed
+public:
+   BandLUMatrix(const BaseMatrix&);
+   MatrixType Type() const;
+   void lubksb(Real*, int=0);
+   ~BandLUMatrix();
+   GeneralMatrix* MakeSolver() { return this; } // for solving
+   LogAndSign LogDeterminant() const;
+   void Solver(MatrixColX&, const MatrixColX&);
+   void GetRow(MatrixRowCol&);
+   void GetCol(MatrixRowCol&);
+   void GetCol(MatrixColX& c) { GetCol((MatrixRowCol&)c); }
+   void CleanUp();                                // to clear store
+   void MiniCleanUp();
+   bool IsEqual(const GeneralMatrix&) const;
+   bool IsSingular() const { return sing; }
+   NEW_DELETE(BandLUMatrix)
+};
+
+// ************************** special matrices ****************************
+
+class OSSIM_DLL IdentityMatrix : public GeneralMatrix
+{
+   GeneralMatrix* Image() const;          // copy of matrix
+public:
+   IdentityMatrix():GeneralMatrix() {}
+   ~IdentityMatrix() {}
+   IdentityMatrix(ArrayLengthSpecifier n) : GeneralMatrix(1)
+      { nrows = ncols = n.Value(); *store = 1; }
+   IdentityMatrix(const IdentityMatrix& gm):GeneralMatrix(gm) { GetMatrix(&gm); }
+   IdentityMatrix(const BaseMatrix&);
+   void operator=(const BaseMatrix&);
+   void operator=(const IdentityMatrix& m) { Eq(m); }
+   void operator=(Real f) { GeneralMatrix::operator=(f); }
+   MatrixType Type() const;
+
+   LogAndSign LogDeterminant() const;
+   Real Trace() const;
+   Real SumSquare() const;
+   Real SumAbsoluteValue() const;
+   Real Sum() const { return Trace(); }
+   void GetRow(MatrixRowCol&);
+   void GetCol(MatrixRowCol&);
+   void GetCol(MatrixColX&);
+   void NextRow(MatrixRowCol&);
+   void NextCol(MatrixRowCol&);
+   void NextCol(MatrixColX&);
+   GeneralMatrix* MakeSolver() { return this; } // for solving
+   void Solver(MatrixColX&, const MatrixColX&);
+   GeneralMatrix* Transpose(TransposedMatrix*, MatrixType);
+   void ReSize(int n);
+   void ReSize(const GeneralMatrix& A);
+   MatrixBandWidth BandWidth() const;
+//   ReturnMatrix Reverse() const;                // reverse order of elements
+   NEW_DELETE(IdentityMatrix)
+};
+
+
+
+
+// ************************** GenericMatrix class ************************/
+
+class OSSIM_DLL GenericMatrix : public BaseMatrix
+{
+   GeneralMatrix* gm;
+   int search(const BaseMatrix* bm) const;
+   friend class BaseMatrix;
+public:
+   GenericMatrix() : gm(0) {}
+   GenericMatrix(const BaseMatrix& bm)
+      { gm = ((BaseMatrix&)bm).Evaluate(); gm = gm->Image(); }
+   GenericMatrix(const GenericMatrix& bm) : BaseMatrix(bm)
+      { gm = bm.gm->Image(); }
+   void operator=(const GenericMatrix&);
+   void operator=(const BaseMatrix&);
+   void operator+=(const BaseMatrix&);
+   void operator-=(const BaseMatrix&);
+   void operator*=(const BaseMatrix&);
+   void operator|=(const BaseMatrix&);
+   void operator&=(const BaseMatrix&);
+   void operator+=(Real);
+   void operator-=(Real r) { operator+=(-r); }
+   void operator*=(Real);
+   void operator/=(Real r) { operator*=(1.0/r); }
+   ~GenericMatrix() { delete gm; }
+   void CleanUp() { delete gm; gm = 0; }
+   void Release() { gm->Release(); }
+   GeneralMatrix* Evaluate(MatrixType = MatrixTypeUnSp);
+   MatrixBandWidth BandWidth() const;
+   NEW_DELETE(GenericMatrix)
+};
+
+// *************************** temporary classes *************************/
+
+class OSSIM_DLL MultipliedMatrix : public BaseMatrix
+{
+protected:
+   // if these union statements cause problems, simply remove them
+   // and declare the items individually
+   union { const BaseMatrix* bm1; GeneralMatrix* gm1; };
+						  // pointers to summands
+   union { const BaseMatrix* bm2; GeneralMatrix* gm2; };
+   MultipliedMatrix(const BaseMatrix* bm1x, const BaseMatrix* bm2x)
+      : bm1(bm1x),bm2(bm2x) {}
+   int search(const BaseMatrix*) const;
+   friend class BaseMatrix;
+   friend class GeneralMatrix;
+   friend class GenericMatrix;
+public:
+   ~MultipliedMatrix() {}
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   MatrixBandWidth BandWidth() const;
+   NEW_DELETE(MultipliedMatrix)
+};
+
+class OSSIM_DLL AddedMatrix : public MultipliedMatrix
+{
+protected:
+   AddedMatrix(const BaseMatrix* bm1x, const BaseMatrix* bm2x)
+      : MultipliedMatrix(bm1x,bm2x) {}
+
+   friend class BaseMatrix;
+   friend class GeneralMatrix;
+   friend class GenericMatrix;
+public:
+   ~AddedMatrix() {}
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   MatrixBandWidth BandWidth() const;
+   NEW_DELETE(AddedMatrix)
+};
+
+class OSSIM_DLL SPMatrix : public AddedMatrix
+{
+protected:
+   SPMatrix(const BaseMatrix* bm1x, const BaseMatrix* bm2x)
+      : AddedMatrix(bm1x,bm2x) {}
+
+   friend class BaseMatrix;
+   friend class GeneralMatrix;
+   friend class GenericMatrix;
+public:
+   ~SPMatrix() {}
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   MatrixBandWidth BandWidth() const;
+
+   friend SPMatrix SP(const BaseMatrix&, const BaseMatrix&);
+
+   NEW_DELETE(SPMatrix)
+};
+
+class OSSIM_DLL KPMatrix : public MultipliedMatrix
+{
+protected:
+   KPMatrix(const BaseMatrix* bm1x, const BaseMatrix* bm2x)
+      : MultipliedMatrix(bm1x,bm2x) {}
+
+   friend class BaseMatrix;
+   friend class GeneralMatrix;
+   friend class GenericMatrix;
+public:
+   ~KPMatrix() {}
+   MatrixBandWidth BandWidth() const;
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   friend KPMatrix KP(const BaseMatrix&, const BaseMatrix&);
+   NEW_DELETE(KPMatrix)
+};
+
+class OSSIM_DLL ConcatenatedMatrix : public MultipliedMatrix
+{
+protected:
+   ConcatenatedMatrix(const BaseMatrix* bm1x, const BaseMatrix* bm2x)
+      : MultipliedMatrix(bm1x,bm2x) {}
+
+   friend class BaseMatrix;
+   friend class GeneralMatrix;
+   friend class GenericMatrix;
+public:
+   ~ConcatenatedMatrix() {}
+   MatrixBandWidth BandWidth() const;
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   NEW_DELETE(ConcatenatedMatrix)
+};
+
+class OSSIM_DLL StackedMatrix : public ConcatenatedMatrix
+{
+protected:
+   StackedMatrix(const BaseMatrix* bm1x, const BaseMatrix* bm2x)
+      : ConcatenatedMatrix(bm1x,bm2x) {}
+
+   friend class BaseMatrix;
+   friend class GeneralMatrix;
+   friend class GenericMatrix;
+public:
+   ~StackedMatrix() {}
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   NEW_DELETE(StackedMatrix)
+};
+
+class OSSIM_DLL SolvedMatrix : public MultipliedMatrix
+{
+   SolvedMatrix(const BaseMatrix* bm1x, const BaseMatrix* bm2x)
+      : MultipliedMatrix(bm1x,bm2x) {}
+   friend class BaseMatrix;
+   friend class InvertedMatrix;                        // for operator*
+public:
+   ~SolvedMatrix() {}
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   MatrixBandWidth BandWidth() const;
+   NEW_DELETE(SolvedMatrix)
+};
+
+class OSSIM_DLL SubtractedMatrix : public AddedMatrix
+{
+   SubtractedMatrix(const BaseMatrix* bm1x, const BaseMatrix* bm2x)
+      : AddedMatrix(bm1x,bm2x) {}
+   friend class BaseMatrix;
+   friend class GeneralMatrix;
+   friend class GenericMatrix;
+public:
+   ~SubtractedMatrix() {}
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   NEW_DELETE(SubtractedMatrix)
+};
+
+class OSSIM_DLL ShiftedMatrix : public BaseMatrix
+{
+protected:
+   union { const BaseMatrix* bm; GeneralMatrix* gm; };
+   Real f;
+   ShiftedMatrix(const BaseMatrix* bmx, Real fx) : bm(bmx),f(fx) {}
+   int search(const BaseMatrix*) const;
+   friend class BaseMatrix;
+   friend class GeneralMatrix;
+   friend class GenericMatrix;
+public:
+   ~ShiftedMatrix() {}
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   friend ShiftedMatrix operator+(Real f, const BaseMatrix& BM);
+   NEW_DELETE(ShiftedMatrix)
+};
+
+class OSSIM_DLL NegShiftedMatrix : public ShiftedMatrix
+{
+protected:
+   NegShiftedMatrix(Real fx, const BaseMatrix* bmx) : ShiftedMatrix(bmx,fx) {}
+   friend class BaseMatrix;
+   friend class GeneralMatrix;
+   friend class GenericMatrix;
+public:
+   ~NegShiftedMatrix() {}
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   friend NegShiftedMatrix operator-(Real, const BaseMatrix&);
+   NEW_DELETE(NegShiftedMatrix)
+};
+
+class OSSIM_DLL ScaledMatrix : public ShiftedMatrix
+{
+   ScaledMatrix(const BaseMatrix* bmx, Real fx) : ShiftedMatrix(bmx,fx) {}
+   friend class BaseMatrix;
+   friend class GeneralMatrix;
+   friend class GenericMatrix;
+public:
+   ~ScaledMatrix() {}
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   MatrixBandWidth BandWidth() const;
+   friend ScaledMatrix operator*(Real f, const BaseMatrix& BM);
+   NEW_DELETE(ScaledMatrix)
+};
+
+class OSSIM_DLL NegatedMatrix : public BaseMatrix
+{
+protected:
+   union { const BaseMatrix* bm; GeneralMatrix* gm; };
+   NegatedMatrix(const BaseMatrix* bmx) : bm(bmx) {}
+   int search(const BaseMatrix*) const;
+private:
+   friend class BaseMatrix;
+public:
+   ~NegatedMatrix() {}
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   MatrixBandWidth BandWidth() const;
+   NEW_DELETE(NegatedMatrix)
+};
+
+class OSSIM_DLL TransposedMatrix : public NegatedMatrix
+{
+   TransposedMatrix(const BaseMatrix* bmx) : NegatedMatrix(bmx) {}
+   friend class BaseMatrix;
+public:
+   ~TransposedMatrix() {}
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   MatrixBandWidth BandWidth() const;
+   NEW_DELETE(TransposedMatrix)
+};
+
+class OSSIM_DLL ReversedMatrix : public NegatedMatrix
+{
+   ReversedMatrix(const BaseMatrix* bmx) : NegatedMatrix(bmx) {}
+   friend class BaseMatrix;
+public:
+   ~ReversedMatrix() {}
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   NEW_DELETE(ReversedMatrix)
+};
+
+class OSSIM_DLL InvertedMatrix : public NegatedMatrix
+{
+   InvertedMatrix(const BaseMatrix* bmx) : NegatedMatrix(bmx) {}
+public:
+   ~InvertedMatrix() {}
+   SolvedMatrix operator*(const BaseMatrix&) const;       // inverse(A) * B
+   ScaledMatrix operator*(Real t) const { return BaseMatrix::operator*(t); }
+   friend class BaseMatrix;
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   MatrixBandWidth BandWidth() const;
+   NEW_DELETE(InvertedMatrix)
+};
+
+class OSSIM_DLL RowedMatrix : public NegatedMatrix
+{
+   RowedMatrix(const BaseMatrix* bmx) : NegatedMatrix(bmx) {}
+   friend class BaseMatrix;
+public:
+   ~RowedMatrix() {}
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   MatrixBandWidth BandWidth() const;
+   NEW_DELETE(RowedMatrix)
+};
+
+class OSSIM_DLL ColedMatrix : public NegatedMatrix
+{
+   ColedMatrix(const BaseMatrix* bmx) : NegatedMatrix(bmx) {}
+   friend class BaseMatrix;
+public:
+   ~ColedMatrix() {}
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   MatrixBandWidth BandWidth() const;
+   NEW_DELETE(ColedMatrix)
+};
+
+class OSSIM_DLL DiagedMatrix : public NegatedMatrix
+{
+   DiagedMatrix(const BaseMatrix* bmx) : NegatedMatrix(bmx) {}
+   friend class BaseMatrix;
+public:
+   ~DiagedMatrix() {}
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   MatrixBandWidth BandWidth() const;
+   NEW_DELETE(DiagedMatrix)
+};
+
+class OSSIM_DLL MatedMatrix : public NegatedMatrix
+{
+   int nr, nc;
+   MatedMatrix(const BaseMatrix* bmx, int nrx, int ncx)
+      : NegatedMatrix(bmx), nr(nrx), nc(ncx) {}
+   friend class BaseMatrix;
+public:
+   ~MatedMatrix() {}
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   MatrixBandWidth BandWidth() const;
+   NEW_DELETE(MatedMatrix)
+};
+
+class OSSIM_DLL ReturnMatrix : public BaseMatrix    // for matrix return
+{
+   GeneralMatrix* gm;
+   int search(const BaseMatrix*) const;
+public:
+   ~ReturnMatrix() {}
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   friend class BaseMatrix;
+   ReturnMatrix(const ReturnMatrix& tm) :BaseMatrix(tm), gm(tm.gm) {}
+   ReturnMatrix(const GeneralMatrix* gmx) : gm((GeneralMatrix*&)gmx) {}
+//   ReturnMatrix(GeneralMatrix&);
+   MatrixBandWidth BandWidth() const;
+   NEW_DELETE(ReturnMatrix)
+};
+
+
+// ************************** submatrices ******************************/
+
+class OSSIM_DLL GetSubMatrix : public NegatedMatrix
+{
+   int row_skip;
+   int row_number;
+   int col_skip;
+   int col_number;
+   bool IsSym;
+
+   GetSubMatrix
+      (const BaseMatrix* bmx, int rs, int rn, int cs, int cn, bool is)
+      : NegatedMatrix(bmx),
+      row_skip(rs), row_number(rn), col_skip(cs), col_number(cn), IsSym(is) {}
+   void SetUpLHS();
+   friend class BaseMatrix;
+
+public:
+
+   GetSubMatrix(const GetSubMatrix& g)
+      : NegatedMatrix(g.bm), row_skip(g.row_skip), row_number(g.row_number),
+      col_skip(g.col_skip), col_number(g.col_number), IsSym(g.IsSym) {}
+
+   ~GetSubMatrix() {}
+   GeneralMatrix* Evaluate(MatrixType mt=MatrixTypeUnSp);
+   void operator=(const BaseMatrix&);
+   void operator+=(const BaseMatrix&);
+   void operator-=(const BaseMatrix&);
+   void operator=(const GetSubMatrix& m) { operator=((const BaseMatrix&)m); }
+   void operator<<(const BaseMatrix&);
+   void operator<<(const Real*);                // copy from array
+   void operator<<(const int*);                 // copy from array
+   MatrixInput operator<<(Real);                // for loading a list
+   MatrixInput operator<<(int f);
+   void operator=(Real);                        // copy from constant
+   void operator+=(Real);                       // add constant
+   void operator-=(Real r) { operator+=(-r); }  // subtract constant
+   void operator*=(Real);                       // multiply by constant
+   void operator/=(Real r) { operator*=(1.0/r); } // divide by constant
+   void Inject(const GeneralMatrix&);           // copy stored els only
+   MatrixBandWidth BandWidth() const;
+   NEW_DELETE(GetSubMatrix)
+};
+
+// ******************** linear equation solving ****************************/
+
+class OSSIM_DLL LinearEquationSolver : public BaseMatrix
+{
+   GeneralMatrix* gm;
+   int search(const BaseMatrix*) const { return 0; }
+   friend class BaseMatrix;
+public:
+   LinearEquationSolver(const BaseMatrix& bm);
+   ~LinearEquationSolver() { delete gm; }
+   void CleanUp() { delete gm; } 
+   GeneralMatrix* Evaluate(MatrixType) { return gm; }
+   // probably should have an error message if MatrixType != UnSp
+   NEW_DELETE(LinearEquationSolver)
+};
+
+// ************************** matrix input *******************************/
+
+class OSSIM_DLL MatrixInput // for reading a list of values into a matrix
+                           // the difficult part is detecting a mismatch
+                           // in the number of elements
+{
+   int n;                  // number values still to be read
+   Real* r;                // pointer to next location to be read to
+public:
+   MatrixInput(const MatrixInput& mi) : n(mi.n), r(mi.r) {}
+   MatrixInput(int nx, Real* rx) : n(nx), r(rx) {}
+   ~MatrixInput();
+   MatrixInput operator<<(Real);
+   MatrixInput operator<<(int f);
+   friend class GeneralMatrix;
+};
+
+
+
+// **************** a very simple integer array class ********************/
+
+// A minimal array class to imitate a C style array but giving dynamic storage
+// mostly intended for internal use by newmat
+
+class OSSIM_DLL SimpleIntArray : public RBD_COMMON::Janitor
+{
+protected:
+   int* a;                    // pointer to the array
+   int n;                     // length of the array
+public:
+   SimpleIntArray(int xn);    // build an array length xn
+   ~SimpleIntArray();         // return the space to memory
+   int& operator[](int i);    // access element of the array - start at 0
+   int operator[](int i) const;
+			      // access element of constant array
+   void operator=(int ai);    // set the array equal to a constant
+   void operator=(const SimpleIntArray& b);
+			      // copy the elements of an array
+   SimpleIntArray(const SimpleIntArray& b);
+			      // make a new array equal to an existing one
+   int Size() const { return n; }
+			      // return the size of the array
+   int* Data() { return a; }  // pointer to the data
+   const int* Data() const { return a; }
+			      // pointer to the data
+   void ReSize(int i, bool keep = false);
+                              // change length, keep data if keep = true
+   void CleanUp() { ReSize(0); }
+   NEW_DELETE(SimpleIntArray)
+};
+
+// *************************** exceptions ********************************/
+
+class OSSIM_DLL NPDException : public Runtime_error     // Not positive definite
+{
+public:
+   static unsigned long Select;          // for identifying exception
+   NPDException(const GeneralMatrix&);
+};
+
+class OSSIM_DLL ConvergenceException : public Runtime_error
+{
+public:
+   static unsigned long Select;          // for identifying exception
+   ConvergenceException(const GeneralMatrix& A);
+   ConvergenceException(const char* c);
+};
+
+class OSSIM_DLL SingularException : public Runtime_error
+{
+public:
+   static unsigned long Select;          // for identifying exception
+   SingularException(const GeneralMatrix& A);
+};
+
+class OSSIM_DLL OverflowException : public Runtime_error
+{
+public:
+   static unsigned long Select;          // for identifying exception
+   OverflowException(const char* c);
+};
+
+class OSSIM_DLL ProgramException : public Logic_error
+{
+protected:
+   ProgramException();
+public:
+   static unsigned long Select;          // for identifying exception
+   ProgramException(const char* c);
+   ProgramException(const char* c, const GeneralMatrix&);
+   ProgramException(const char* c, const GeneralMatrix&, const GeneralMatrix&);
+   ProgramException(const char* c, MatrixType, MatrixType);
+};
+
+class OSSIM_DLL IndexException : public Logic_error
+{
+public:
+   static unsigned long Select;          // for identifying exception
+   IndexException(int i, const GeneralMatrix& A);
+   IndexException(int i, int j, const GeneralMatrix& A);
+   // next two are for access via element function
+   IndexException(int i, const GeneralMatrix& A, bool);
+   IndexException(int i, int j, const GeneralMatrix& A, bool);
+};
+
+class OSSIM_DLL VectorException : public Logic_error    // cannot convert to vector
+{
+public:
+   static unsigned long Select;          // for identifying exception
+   VectorException();
+   VectorException(const GeneralMatrix& A);
+};
+
+class OSSIM_DLL NotSquareException : public Logic_error
+{
+public:
+   static unsigned long Select;          // for identifying exception
+   NotSquareException(const GeneralMatrix& A);
+   NotSquareException();
+};
+
+class OSSIM_DLL SubMatrixDimensionException : public Logic_error
+{
+public:
+   static unsigned long Select;          // for identifying exception
+   SubMatrixDimensionException();
+};
+
+class OSSIM_DLL IncompatibleDimensionsException : public Logic_error
+{
+public:
+   static unsigned long Select;          // for identifying exception
+   IncompatibleDimensionsException();
+   IncompatibleDimensionsException(const GeneralMatrix&, const GeneralMatrix&);
+};
+
+class OSSIM_DLL NotDefinedException : public Logic_error
+{
+public:
+   static unsigned long Select;          // for identifying exception
+   NotDefinedException(const char* op, const char* matrix);
+};
+
+class OSSIM_DLL CannotBuildException : public Logic_error
+{
+public:
+   static unsigned long Select;          // for identifying exception
+   CannotBuildException(const char* matrix);
+};
+
+
+class OSSIM_DLL InternalException : public Logic_error
+{
+public:
+   static unsigned long Select;          // for identifying exception
+   InternalException(const char* c);
+};
+
+// ************************ functions ************************************ //
+
+bool operator==(const GeneralMatrix& A, const GeneralMatrix& B);
+bool operator==(const BaseMatrix& A, const BaseMatrix& B);
+inline bool operator!=(const GeneralMatrix& A, const GeneralMatrix& B)
+   { return ! (A==B); }
+inline bool operator!=(const BaseMatrix& A, const BaseMatrix& B)
+   { return ! (A==B); }
+
+   // inequality operators are dummies included for compatibility
+   // with STL. They throw an exception if actually called.
+inline bool operator<=(const BaseMatrix& A, const BaseMatrix&)
+   { A.IEQND(); return true; }
+inline bool operator>=(const BaseMatrix& A, const BaseMatrix&)
+   { A.IEQND(); return true; }
+inline bool operator<(const BaseMatrix& A, const BaseMatrix&)
+   { A.IEQND(); return true; }
+inline bool operator>(const BaseMatrix& A, const BaseMatrix&)
+   { A.IEQND(); return true; }
+
+bool IsZero(const BaseMatrix& A);
+
+OSSIM_DLL Matrix CrossProduct(const Matrix& A, const Matrix& B);
+OSSIM_DLL ReturnMatrix CrossProductRows(const Matrix& A, const Matrix& B);
+OSSIM_DLL ReturnMatrix CrossProductColumns(const Matrix& A, const Matrix& B);
+
+// Definition: newmat8.cpp:
+OSSIM_DLL Real DotProduct(const Matrix& A, const Matrix& B);
+
+// ********************* inline functions ******************************** //
+
+
+inline LogAndSign LogDeterminant(const BaseMatrix& B)
+   { return B.LogDeterminant(); }
+inline Real Determinant(const BaseMatrix& B)
+   { return B.Determinant(); }
+inline Real SumSquare(const BaseMatrix& B) { return B.SumSquare(); }
+inline Real NormFrobenius(const BaseMatrix& B) { return B.NormFrobenius(); }
+inline Real Trace(const BaseMatrix& B) { return B.Trace(); }
+inline Real SumAbsoluteValue(const BaseMatrix& B)
+   { return B.SumAbsoluteValue(); }
+inline Real Sum(const BaseMatrix& B)
+   { return B.Sum(); }
+inline Real MaximumAbsoluteValue(const BaseMatrix& B)
+   { return B.MaximumAbsoluteValue(); }
+inline Real MinimumAbsoluteValue(const BaseMatrix& B)
+   { return B.MinimumAbsoluteValue(); }
+inline Real Maximum(const BaseMatrix& B) { return B.Maximum(); }
+inline Real Minimum(const BaseMatrix& B) { return B.Minimum(); }
+inline Real Norm1(const BaseMatrix& B) { return B.Norm1(); }
+inline Real Norm1(RowVector& RV) { return RV.MaximumAbsoluteValue(); }
+inline Real NormInfinity(const BaseMatrix& B) { return B.NormInfinity(); }
+inline Real NormInfinity(ColumnVector& CV)
+   { return CV.MaximumAbsoluteValue(); }
+inline bool IsZero(const GeneralMatrix& A) { return A.IsZero(); }
+
+
+inline MatrixInput MatrixInput::operator<<(int f) { return *this << (Real)f; }
+inline MatrixInput GeneralMatrix::operator<<(int f) { return *this << (Real)f; }
+inline MatrixInput BandMatrix::operator<<(int f) { return *this << (Real)f; }
+inline MatrixInput GetSubMatrix::operator<<(int f) { return *this << (Real)f; }
+
+
+
+#ifdef use_namespace
+}
+#endif
+
+
+#endif
+
+// body file: newmat1.cpp
+// body file: newmat2.cpp
+// body file: newmat3.cpp
+// body file: newmat4.cpp
+// body file: newmat5.cpp
+// body file: newmat6.cpp
+// body file: newmat7.cpp
+// body file: newmat8.cpp
+// body file: newmatex.cpp
+// body file: bandmat.cpp
+// body file: submat.cpp
+
+
+
+
+
+
+
diff --git a/ossim/include/ossim/matrix/newmatap.h b/ossim/include/ossim/matrix/newmatap.h
new file mode 100644
index 0000000..3382241
--- /dev/null
+++ b/ossim/include/ossim/matrix/newmatap.h
@@ -0,0 +1,201 @@
+//$$ newmatap.h           definition file for matrix package applications
+
+// Copyright (C) 1991,2,3,4,8: R B Davies
+
+#ifndef NEWMATAP_LIB
+#define NEWMATAP_LIB 0
+
+#include <ossim/matrix/newmat.h>
+
+#ifdef use_namespace
+namespace NEWMAT {
+#endif
+
+
+// ************************** applications *****************************/
+
+
+void QRZT(Matrix&, LowerTriangularMatrix&);
+
+void QRZT(const Matrix&, Matrix&, Matrix&);
+
+void QRZ(Matrix&, UpperTriangularMatrix&);
+
+void QRZ(const Matrix&, Matrix&, Matrix&);
+
+inline void HHDecompose(Matrix& X, LowerTriangularMatrix& L)
+{ QRZT(X,L); }
+
+inline void HHDecompose(const Matrix& X, Matrix& Y, Matrix& M)
+{ QRZT(X, Y, M); }
+
+void UpdateQRZT(Matrix& X, LowerTriangularMatrix& L);
+
+void UpdateQRZ(Matrix& X, UpperTriangularMatrix& U);
+
+
+ReturnMatrix Cholesky(const SymmetricMatrix&);
+
+ReturnMatrix Cholesky(const SymmetricBandMatrix&);
+
+
+// produces the Cholesky decomposition of A + x.t() * x where A = chol.t() * chol
+// and x is a RowVector
+void UpdateCholesky(UpperTriangularMatrix &chol, RowVector r1Modification);
+
+// produces the Cholesky decomposition of A - x.t() * x where A = chol.t() * chol
+// and x is a RowVector
+void DowndateCholesky(UpperTriangularMatrix &chol, RowVector x);
+
+// a RIGHT circular shift of the rows and columns from
+// 1,...,k-1,k,k+1,...l,l+1,...,p to
+// 1,...,k-1,l,k,k+1,...l-1,l+1,...p
+void RightCircularUpdateCholesky(UpperTriangularMatrix &chol, int k, int l);
+
+// a LEFT circular shift of the rows and columns from
+// 1,...,k-1,k,k+1,...l,l+1,...,p to
+// 1,...,k-1,k+1,...l,k,l+1,...,p to
+void LeftCircularUpdateCholesky(UpperTriangularMatrix &chol, int k, int l); 
+
+
+void SVD(const Matrix&, DiagonalMatrix&, Matrix&, Matrix&,
+    bool=true, bool=true);
+
+void SVD(const Matrix&, DiagonalMatrix&);
+
+inline void SVD(const Matrix& A, DiagonalMatrix& D, Matrix& U,
+   bool withU = true) { SVD(A, D, U, U, withU, false); }
+
+void SortSV(DiagonalMatrix& D, Matrix& U, bool ascending = false);
+
+void SortSV(DiagonalMatrix& D, Matrix& U, Matrix& V, bool ascending = false);
+
+void Jacobi(const SymmetricMatrix&, DiagonalMatrix&);
+
+void Jacobi(const SymmetricMatrix&, DiagonalMatrix&, SymmetricMatrix&);
+
+void Jacobi(const SymmetricMatrix&, DiagonalMatrix&, Matrix&);
+
+void Jacobi(const SymmetricMatrix&, DiagonalMatrix&, SymmetricMatrix&,
+   Matrix&, bool=true);
+
+void EigenValues(const SymmetricMatrix&, DiagonalMatrix&);
+
+void EigenValues(const SymmetricMatrix&, DiagonalMatrix&, SymmetricMatrix&);
+
+void EigenValues(const SymmetricMatrix&, DiagonalMatrix&, Matrix&);
+
+class SymmetricEigenAnalysis
+// not implemented yet
+{
+public:
+   SymmetricEigenAnalysis(const SymmetricMatrix&);
+private:
+   DiagonalMatrix diag;
+   DiagonalMatrix offdiag;
+   SymmetricMatrix backtransform;
+   FREE_CHECK(SymmetricEigenAnalysis)
+};
+
+void SortAscending(GeneralMatrix&);
+
+void SortDescending(GeneralMatrix&);
+
+
+// class for deciding which fft to use and containing new fft function
+class OSSIM_DLL FFT_Controller
+{
+public:
+   static bool OnlyOldFFT;
+   static bool ar_1d_ft (int PTS, Real* X, Real *Y);
+   static bool CanFactor(int PTS);
+};
+
+void FFT(const ColumnVector&, const ColumnVector&,
+   ColumnVector&, ColumnVector&);
+
+void FFTI(const ColumnVector&, const ColumnVector&,
+   ColumnVector&, ColumnVector&);
+
+void RealFFT(const ColumnVector&, ColumnVector&, ColumnVector&);
+
+void RealFFTI(const ColumnVector&, const ColumnVector&, ColumnVector&);
+
+void DCT_II(const ColumnVector&, ColumnVector&);
+
+void DCT_II_inverse(const ColumnVector&, ColumnVector&);
+
+void DST_II(const ColumnVector&, ColumnVector&);
+
+void DST_II_inverse(const ColumnVector&, ColumnVector&);
+
+void DCT(const ColumnVector&, ColumnVector&);
+
+void DCT_inverse(const ColumnVector&, ColumnVector&);
+
+void DST(const ColumnVector&, ColumnVector&);
+
+void DST_inverse(const ColumnVector&, ColumnVector&);
+
+void FFT2(const Matrix& U, const Matrix& V, Matrix& X, Matrix& Y);
+
+void FFT2I(const Matrix& U, const Matrix& V, Matrix& X, Matrix& Y);
+
+
+// This class is used by the new FFT program
+
+// Suppose an integer is expressed as a sequence of digits with each
+// digit having a different radix.
+// This class supposes we are counting with this multi-radix number
+// but also keeps track of the number with the digits (and radices)
+// reversed.
+// The integer starts at zero
+// operator++() increases it by 1
+// Counter gives the number of increments
+// Reverse() gives the value with the digits in reverse order
+// Swap is true if reverse is less than counter
+// Finish is true when we have done a complete cycle and are back at zero
+
+class MultiRadixCounter
+{
+   const SimpleIntArray& Radix;
+                              // radix of each digit
+                              // n-1 highest order, 0 lowest order
+   SimpleIntArray& Value;     // value of each digit
+   const int n;               // number of digits
+   int reverse;               // value when order of digits is reversed
+   int product;               // product of radices
+   int counter;               // counter
+   bool finish;               // true when we have gone over whole range
+public:
+   MultiRadixCounter(int nx, const SimpleIntArray& rx,
+      SimpleIntArray& vx);
+   void operator++();         // increment the multi-radix counter
+   bool Swap() const { return reverse < counter; }
+   bool Finish() const { return finish; }
+   int Reverse() const { return reverse; }
+   int Counter() const { return counter; }
+};
+
+
+#ifdef use_namespace
+}
+#endif
+
+
+
+#endif
+
+// body file: cholesky.cpp
+// body file: evalue.cpp
+// body file: fft.cpp
+// body file: hholder.cpp
+// body file: jacobi.cpp
+// body file: newfft.cpp
+// body file: sort.cpp
+// body file: svd.cpp
+
+
+
+
+
diff --git a/include/ossim/matrix/newmatio.h b/ossim/include/ossim/matrix/newmatio.h
similarity index 100%
rename from include/ossim/matrix/newmatio.h
rename to ossim/include/ossim/matrix/newmatio.h
diff --git a/include/ossim/matrix/newmatnl.h b/ossim/include/ossim/matrix/newmatnl.h
similarity index 100%
rename from include/ossim/matrix/newmatnl.h
rename to ossim/include/ossim/matrix/newmatnl.h
diff --git a/ossim/include/ossim/matrix/newmatrc.h b/ossim/include/ossim/matrix/newmatrc.h
new file mode 100644
index 0000000..e9353b1
--- /dev/null
+++ b/ossim/include/ossim/matrix/newmatrc.h
@@ -0,0 +1,171 @@
+//$$ newmatrc.h              definition file for row/column classes
+
+// Copyright (C) 1991,2,3,4,7: R B Davies
+
+#ifndef NEWMATRC_LIB
+#define NEWMATRC_LIB 0
+
+#ifdef use_namespace
+namespace NEWMAT {
+#endif
+
+#include <ossim/matrix/controlw.h>
+
+
+/************** classes MatrixRowCol, MatrixRow, MatrixCol *****************/
+
+// Used for accessing the rows and columns of matrices
+// All matrix classes must provide routines for calculating matrix rows and
+// columns. Assume rows can be found very efficiently.
+
+enum LSF { LoadOnEntry=1,StoreOnExit=2,DirectPart=4,StoreHere=8,HaveStore=16 };
+
+
+class LoadAndStoreFlag : public ControlWord
+{
+public:
+   LoadAndStoreFlag() {}
+   LoadAndStoreFlag(int i) : ControlWord(i) {}
+   LoadAndStoreFlag(LSF lsf) : ControlWord(lsf) {}
+   LoadAndStoreFlag(const ControlWord& cwx) : ControlWord(cwx) {}
+};
+
+class OSSIM_DLL MatrixRowCol
+// the row or column of a matrix
+{
+public:                                        // these are public to avoid
+                                               // numerous friend statements
+   int length;                                 // row or column length
+   int skip;                                   // initial number of zeros
+   int storage;                                // number of stored elements
+   int rowcol;                                 // row or column number
+   GeneralMatrix* gm;                          // pointer to parent matrix
+   Real* data;                                 // pointer to local storage
+   LoadAndStoreFlag cw;                        // Load? Store? Is a Copy?
+   void IncrMat() { rowcol++; data += storage; }   // used by NextRow
+   void IncrDiag() { rowcol++; skip++; data++; }
+   void IncrId() { rowcol++; skip++; }
+   void IncrUT() { rowcol++; data += storage; storage--; skip++; }
+   void IncrLT() { rowcol++; data += storage; storage++; }
+
+public:
+   void Zero();                                // set elements to zero
+   void Add(const MatrixRowCol&);              // add a row/col
+   void AddScaled(const MatrixRowCol&, Real);  // add a multiple of a row/col
+   void Add(const MatrixRowCol&, const MatrixRowCol&);
+                                               // add two rows/cols
+   void Add(const MatrixRowCol&, Real);        // add a row/col
+   void NegAdd(const MatrixRowCol&, Real);     // Real - a row/col
+   void Sub(const MatrixRowCol&);              // subtract a row/col
+   void Sub(const MatrixRowCol&, const MatrixRowCol&);
+					       // sub a row/col from another
+   void RevSub(const MatrixRowCol&);           // subtract from a row/col
+   void ConCat(const MatrixRowCol&, const MatrixRowCol&);
+                                               // concatenate two row/cols
+   void Multiply(const MatrixRowCol&);         // multiply a row/col
+   void Multiply(const MatrixRowCol&, const MatrixRowCol&);
+                                               // multiply two row/cols
+   void KP(const MatrixRowCol&, const MatrixRowCol&);
+                                               // Kronecker Product two row/cols
+   void Copy(const MatrixRowCol&);             // copy a row/col
+   void CopyCheck(const MatrixRowCol&);        // ... check for data loss
+   void Check(const MatrixRowCol&);            // just check for data loss
+   void Check();                               // check full row/col present
+   void Copy(const Real*&);                    // copy from an array
+   void Copy(const int*&);                     // copy from an array
+   void Copy(Real);                            // copy from constant
+   void Add(Real);                             // add a constant
+   void Multiply(Real);                        // multiply by constant
+   Real SumAbsoluteValue();                    // sum of absolute values
+   Real MaximumAbsoluteValue1(Real r, int& i); // maximum of absolute values
+   Real MinimumAbsoluteValue1(Real r, int& i); // minimum of absolute values
+   Real Maximum1(Real r, int& i);              // maximum
+   Real Minimum1(Real r, int& i);              // minimum
+   Real Sum();                                 // sum of values
+   void Inject(const MatrixRowCol&);           // copy stored els of a row/col
+   void Negate(const MatrixRowCol&);           // change sign of a row/col
+   void Multiply(const MatrixRowCol&, Real);   // scale a row/col
+   friend Real DotProd(const MatrixRowCol&, const MatrixRowCol&);
+                                               // sum of pairwise product
+   Real* Data() { return data; }
+   int Skip() { return skip; }                 // number of elements skipped
+   int Storage() { return storage; }           // number of elements stored
+   int Length() { return length; }             // length of row or column
+   void Skip(int i) { skip=i; }
+   void Storage(int i) { storage=i; }
+   void Length(int i) { length=i; }
+   void SubRowCol(MatrixRowCol&, int, int) const;
+					       // get part of a row or column
+   MatrixRowCol() {}                           // to stop warning messages
+   ~MatrixRowCol();
+   FREE_CHECK(MatrixRowCol)
+};
+
+class OSSIM_DLL MatrixRow : public MatrixRowCol
+{
+public:
+   // bodies for these are inline at the end of this .h file
+   MatrixRow(GeneralMatrix*, LoadAndStoreFlag, int=0);
+                                               // extract a row
+   ~MatrixRow();
+   void Next();                                // get next row
+   FREE_CHECK(MatrixRow)
+};
+
+class OSSIM_DLL MatrixCol : public MatrixRowCol
+{
+public:
+   // bodies for these are inline at the end of this .h file
+   MatrixCol(GeneralMatrix*, LoadAndStoreFlag, int=0);
+                                               // extract a col
+   MatrixCol(GeneralMatrix*, Real*, LoadAndStoreFlag, int=0);
+                                               // store/retrieve a col
+   ~MatrixCol();
+   void Next();                                // get next row
+   FREE_CHECK(MatrixCol)
+};
+
+// MatrixColX is an alternative to MatrixCol where the complete
+// column is stored externally
+
+class OSSIM_DLL MatrixColX : public MatrixRowCol
+{
+public:
+   // bodies for these are inline at the end of this .h file
+   MatrixColX(GeneralMatrix*, Real*, LoadAndStoreFlag, int=0);
+                                               // store/retrieve a col
+   ~MatrixColX();
+   void Next();                                // get next row
+   Real* store;                                // pointer to local storage
+                                               //    less skip
+   FREE_CHECK(MatrixColX)
+};
+
+/**************************** inline bodies ****************************/
+
+inline MatrixRow::MatrixRow(GeneralMatrix* gmx, LoadAndStoreFlag cwx, int row)
+{ gm=gmx; cw=cwx; rowcol=row; gm->GetRow(*this); }
+
+inline void MatrixRow::Next() { gm->NextRow(*this); }
+
+inline MatrixCol::MatrixCol(GeneralMatrix* gmx, LoadAndStoreFlag cwx, int col)
+{ gm=gmx; cw=cwx; rowcol=col; gm->GetCol(*this); }
+
+inline MatrixCol::MatrixCol(GeneralMatrix* gmx, Real* r,
+   LoadAndStoreFlag cwx, int col)
+{ gm=gmx; data=r; cw=cwx+StoreHere; rowcol=col; gm->GetCol(*this); }
+
+inline MatrixColX::MatrixColX(GeneralMatrix* gmx, Real* r,
+   LoadAndStoreFlag cwx, int col)
+{ gm=gmx; store=data=r; cw=cwx+StoreHere; rowcol=col; gm->GetCol(*this); }
+
+
+inline void MatrixCol::Next() { gm->NextCol(*this); }
+
+inline void MatrixColX::Next() { gm->NextCol(*this); }
+
+#ifdef use_namespace
+}
+#endif
+
+#endif
diff --git a/include/ossim/matrix/newmatrm.h b/ossim/include/ossim/matrix/newmatrm.h
similarity index 100%
rename from include/ossim/matrix/newmatrm.h
rename to ossim/include/ossim/matrix/newmatrm.h
diff --git a/include/ossim/matrix/precisio.h b/ossim/include/ossim/matrix/precisio.h
similarity index 100%
rename from include/ossim/matrix/precisio.h
rename to ossim/include/ossim/matrix/precisio.h
diff --git a/include/ossim/matrix/solution.h b/ossim/include/ossim/matrix/solution.h
similarity index 100%
rename from include/ossim/matrix/solution.h
rename to ossim/include/ossim/matrix/solution.h
diff --git a/include/ossim/ossimConfig.h.in b/ossim/include/ossim/ossimConfig.h.in
similarity index 100%
rename from include/ossim/ossimConfig.h.in
rename to ossim/include/ossim/ossimConfig.h.in
diff --git a/include/ossim/ossimConfig.h.vc b/ossim/include/ossim/ossimConfig.h.vc
similarity index 100%
rename from include/ossim/ossimConfig.h.vc
rename to ossim/include/ossim/ossimConfig.h.vc
diff --git a/ossim/include/ossim/parallel/ossimIgen.h b/ossim/include/ossim/parallel/ossimIgen.h
new file mode 100644
index 0000000..12fa192
--- /dev/null
+++ b/ossim/include/ossim/parallel/ossimIgen.h
@@ -0,0 +1,72 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: Class declaration for image generator.
+//
+//*************************************************************************
+// $Id: ossimIgen.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimIgen_HEADER
+#define ossimIgen_HEADER
+
+#include <iostream>
+#include <list>
+#include <fstream>
+
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimConnectableContainer.h>
+#include <ossim/imaging/ossimTiling.h>
+
+class ossimImageChain;
+class ossimImageFileWriter;
+class ossimMapProjection;
+class ossimImageViewTransform;
+class ossimImageSource;
+class ossimImageMpiMWriterSequenceConnection;
+class ossimImageMpiSWriterSequenceConnection;
+class ossimObject;
+class ossimArgumentParser;
+
+class OSSIM_DLL ossimIgen : public ossimReferenced
+{
+public:
+   ossimIgen();
+   virtual ~ossimIgen();
+
+   virtual void initialize(const ossimKeywordlist& kwl);
+   virtual void outputProduct();
+   
+protected:
+   void initializeAttributes();
+   void slaveSetup();
+   bool loadProductSpec();
+   void setView();
+   void initThumbnailProjection();
+   void initializeChain();
+   bool writeToFile(ossimImageFileWriter* writer);
+
+   ossimRefPtr<ossimConnectableContainer> theContainer;
+   ossimRefPtr<ossimMapProjection>  theProductProjection;
+   ossimRefPtr<ossimImageChain>  theProductChain;
+   ossimRefPtr<ossimTiling>      theTiling;
+   ossimDrect        theOutputRect;
+   bool              theBuildThumbnailFlag;
+   ossimIpt          theThumbnailSize;
+   long              theNumberOfTilesToBuffer;
+   ossimKeywordlist  theKwl;
+   bool              theTilingEnabled;
+   bool              theProgressFlag;
+   bool              theStdoutFlag;
+   ossim_uint32      theThreadCount;
+
+};
+
+#endif
+
diff --git a/ossim/include/ossim/parallel/ossimImageChainMtAdaptor.h b/ossim/include/ossim/parallel/ossimImageChainMtAdaptor.h
new file mode 100644
index 0000000..81576d6
--- /dev/null
+++ b/ossim/include/ossim/parallel/ossimImageChainMtAdaptor.h
@@ -0,0 +1,123 @@
+//*************************************************************************************************
+//                                            OSSIM
+//
+// License: MIT
+//
+// Author: Oscar Kramer
+//
+//*************************************************************************************************
+// $Id$
+#ifndef ossimImageChainMtAdaptor_HEADER
+#define ossimImageChainMtAdaptor_HEADER
+
+#include <vector>
+#include <ossim/imaging/ossimImageChain.h>
+#include <ossim/parallel/ossimImageHandlerMtAdaptor.h>
+#include <ossim/base/ossimId.h>
+#include <ossim/base/ossimConnectableContainer.h>
+
+//*************************************************************************************************
+//! This class supports multi-threading of image chain getTile() requests and associated chain
+//! updating. It accepts an original ossimImageChain object which is then cloned (replicated). 
+//! One clone per thread is created, counting the original as clone(0), with all clones
+//! sharing a common input handler (if directed) so that disk access is serialized and thread-safe.
+//*************************************************************************************************
+class OSSIMDLLEXPORT ossimImageChainMtAdaptor : public ossimImageChain
+{
+   friend class ossimMultiThreadSequencer; //### FOR DEBUG ONLY
+
+public:
+   ossimImageChainMtAdaptor();
+
+   //! Full constructor accepts the original image chain to clone. 
+   //! @param num_threads  Total number of cloned chains to make available.
+   //! 
+   ossimImageChainMtAdaptor(ossimImageChain* original, ossim_uint32 num_threads=0);
+   ~ossimImageChainMtAdaptor();
+
+   //! Alternate way of specifying number of threads to support. This is the same as the number of 
+   //! clones that will be available after replicating the original chain. 
+   //! @param num_threads  Total number of cloned chains to make available.
+   void setNumberOfThreads(ossim_uint32 num_threads);
+
+   //! Alternate way of specifying the original chain being adapted for multi-threading.
+   //! @param original  Image chain to be adapted.
+   void setOriginalChain(ossimImageChain* original);
+
+   //! Intercepts the getTile because it should never be called directly. The tile request must go
+   //! to the specific chain clone.
+   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect,
+                                               ossim_uint32 resLevel=0);
+   
+   //! Adapts call to original chain so that all clones are initialized.
+   virtual void initialize();
+
+   //! Adapts call to original chain so that clones are replicated after original's loadState.
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=NULL);
+
+   //! Adapts call to original chain so that adapter-specific keywords can be added to KWL.
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=NULL)const;
+
+   //! Adapts the image chain event handler. If the event involves a change to the original image 
+   //! chain, then the clones will need to be regenerated here.
+   virtual void processEvent(ossimEvent& event);
+
+   //! Returns pointer to a specific clone image chain, or NULL if index exceeds the max available.
+   //! The clone at index=0 corresponds to the original, though this detail should be ignored.
+   ossimImageSource* getClone(ossim_uint32 index);
+
+   //! Returns the number of clones available. The original chain always counts as the first clone.
+   ossim_uint32 getNumberOfClones() const { return (ossim_uint32) m_clones.size(); }
+
+   //! These overriding access methods greatly facilitate the implementation of an image chain
+   //! adapter class operating on the member original chain. These methods really should be 
+   //! "protected" but the compiler complains if the base class declarations are "protected".
+   virtual ossimConnectableObject::ConnectableObjectList& imageChainList();
+   virtual const ossimConnectableObject::ConnectableObjectList& imageChainList() const;
+
+   //! Overrides base class implementation in order to make the connection to each clone. This 
+   //! connection is typically to the multi-thread sequencer object.
+   virtual ossim_int32 connectMyOutputTo(ossimConnectableObject* outputObject,
+                                         bool makeInputConnection=true,
+                                         bool createEventFlag=true);
+
+protected:
+   //! Deletes instances of all replicas from the clone list and leaves only the original.
+   void deleteReplicas();
+
+   //! Creates clones of original and pushes them onto the clone list. Returns TRUE if successful.
+   bool replicate();
+
+   //! Manages reconnecting shared image handlers to a cloned image chain (identified by index)
+   //! after its creation. This is in support of shared image handlers. Returns TRUE if successful.
+   bool connectSharedHandlers(ossim_uint32 index);
+
+   //! This is the adaptee image chain.
+   ossimRefPtr<ossimImageChain> m_adaptedChain;
+
+   //! List of replicated child chains' first source (the one receiving the getTile call). The
+   //! first in the list is always the original (adaptee) source. These are owned by the 
+   //! m_chainContainers that are maintained here.
+   std::vector< ossimRefPtr<ossimImageSource> > m_clones;
+   
+   //! The container objects must be kept alive in this vector while their child chains in
+   //! m_clones are used. Containers are used because they are the only way of "duping" a complete 
+   //! chain with all connections properly done. The containers need to persist in order for the 
+   //! chain connections to be maintained (apparent bug in connectable object code). I found it 
+   //! impossible to dissociate the chain from its container. As soon as the container disappeared,
+   //! the chain's internal connections would be disrupted. (OLK 11/11)
+   std::vector< ossimRefPtr<ossimConnectableContainer> > m_chainContainers;
+
+   //! List of handlers that are being shared among all clones (if requested). It is a list since 
+   //! the original chain may involve a combiner with multiple image inputs.
+   typedef std::vector<ossimRefPtr<ossimImageHandlerMtAdaptor> > SharedHandlerList;
+   SharedHandlerList m_sharedHandlers;
+
+   ossim_uint32 m_numThreads;
+
+   bool d_useSharedHandlers;
+   bool d_debugEnabled;
+
+};
+#endif /* #ifndef ossimImageChain_HEADER */
+
diff --git a/include/ossim/parallel/ossimImageHandlerMtAdaptor.h b/ossim/include/ossim/parallel/ossimImageHandlerMtAdaptor.h
similarity index 100%
rename from include/ossim/parallel/ossimImageHandlerMtAdaptor.h
rename to ossim/include/ossim/parallel/ossimImageHandlerMtAdaptor.h
diff --git a/ossim/include/ossim/parallel/ossimImageMpiMWriterSequenceConnection.h b/ossim/include/ossim/parallel/ossimImageMpiMWriterSequenceConnection.h
new file mode 100644
index 0000000..413a93a
--- /dev/null
+++ b/ossim/include/ossim/parallel/ossimImageMpiMWriterSequenceConnection.h
@@ -0,0 +1,61 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+// This class is specific to the Master connection and is optimized
+// for the writer sequence and batch processing chain.  For the Slave
+// implementation look for the ossimImageMpiSWriterSequenceConnection.cc and .h
+// files.  The Master connection is currently implemented to allways do
+// a recieve and does no processing itself.  The slave connection does
+// all the actual work and processing.
+//
+//*******************************************************************
+//  $Id: ossimImageMpiMWriterSequenceConnection.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimImageMpiMWriterSequenceConnection_HEADER
+#define ossimImageMpiMWriterSequenceConnection_HEADER
+#include <ossim/imaging/ossimImageSourceSequencer.h>
+class ossimImageData;
+class ossimImageMpiMWriterSequenceConnection : public ossimImageSourceSequencer
+{
+public:
+   ossimImageMpiMWriterSequenceConnection(ossimObject* owner=NULL);
+   ossimImageMpiMWriterSequenceConnection(ossimImageSource* inputSource,
+                                          ossimObject* owner=NULL);
+  virtual ~ossimImageMpiMWriterSequenceConnection();
+
+   /*!
+    * This is a virtual method that can be overriden
+    * by derived classes (MPI, or PVM or other
+    * parallel connections.  This method is to indicate
+    * whether or not this connection is the master/
+    * controlling connection.
+    */
+   virtual void initialize();
+   virtual void setToStartOfSequence();
+
+   virtual bool isMaster()const
+      {
+         return true;
+      }
+   /*!
+    * Will allow you to get the next tile in the sequence.
+    */
+   virtual ossimRefPtr<ossimImageData> getNextTile(ossim_uint32 resLevel=0);
+protected:
+   int theNumberOfProcessors;
+   int theRank;
+   bool theNeedToSendRequest;
+   ossimRefPtr<ossimImageData> theOutputTile;
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/parallel/ossimImageMpiSWriterSequenceConnection.h b/ossim/include/ossim/parallel/ossimImageMpiSWriterSequenceConnection.h
new file mode 100644
index 0000000..810f7fd
--- /dev/null
+++ b/ossim/include/ossim/parallel/ossimImageMpiSWriterSequenceConnection.h
@@ -0,0 +1,54 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimImageMpiSWriterSequenceConnection.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimImageMpiSWriterSequenceConnection_HEADER
+#define ossimImageMpiSWriterSequenceConnection_HEADER
+#include <ossim/imaging/ossimImageSourceSequencer.h>
+class ossimImageData;
+class ossimImageMpiSWriterSequenceConnection : public ossimImageSourceSequencer
+{
+public:
+   ossimImageMpiSWriterSequenceConnection(ossimObject* owner=NULL,
+                                          long numberOfTilesToBuffer = 2);
+   
+   ossimImageMpiSWriterSequenceConnection(ossimImageSource* inputSource,
+                                          ossimObject* owner=NULL,
+                                          long numberOfTilesToBuffer = 2);
+   
+  virtual ~ossimImageMpiSWriterSequenceConnection();
+   virtual bool isMaster()const
+      {
+         return false;
+      }
+
+   virtual void initialize();
+   virtual void setToStartOfSequence();
+   /*!
+    * Will allow you to get the next tile in the sequence.
+    */
+   virtual ossimRefPtr<ossimImageData> getNextTile(ossim_uint32 resLevel=0);
+
+   virtual void slaveProcessTiles();
+   
+protected:
+   int theNumberOfProcessors;
+   int theRank;
+   int theNumberOfTilesToBuffer;
+   
+   ossimRefPtr<ossimImageData>* theOutputTile;
+
+   void deleteOutputTiles();
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/parallel/ossimJob.h b/ossim/include/ossim/parallel/ossimJob.h
similarity index 100%
rename from include/ossim/parallel/ossimJob.h
rename to ossim/include/ossim/parallel/ossimJob.h
diff --git a/include/ossim/parallel/ossimJobMultiThreadQueue.h b/ossim/include/ossim/parallel/ossimJobMultiThreadQueue.h
similarity index 100%
rename from include/ossim/parallel/ossimJobMultiThreadQueue.h
rename to ossim/include/ossim/parallel/ossimJobMultiThreadQueue.h
diff --git a/include/ossim/parallel/ossimJobQueue.h b/ossim/include/ossim/parallel/ossimJobQueue.h
similarity index 100%
rename from include/ossim/parallel/ossimJobQueue.h
rename to ossim/include/ossim/parallel/ossimJobQueue.h
diff --git a/include/ossim/parallel/ossimJobThreadQueue.h b/ossim/include/ossim/parallel/ossimJobThreadQueue.h
similarity index 100%
rename from include/ossim/parallel/ossimJobThreadQueue.h
rename to ossim/include/ossim/parallel/ossimJobThreadQueue.h
diff --git a/include/ossim/parallel/ossimMpi.h b/ossim/include/ossim/parallel/ossimMpi.h
similarity index 100%
rename from include/ossim/parallel/ossimMpi.h
rename to ossim/include/ossim/parallel/ossimMpi.h
diff --git a/include/ossim/parallel/ossimMpiMasterOverviewSequencer.h b/ossim/include/ossim/parallel/ossimMpiMasterOverviewSequencer.h
similarity index 100%
rename from include/ossim/parallel/ossimMpiMasterOverviewSequencer.h
rename to ossim/include/ossim/parallel/ossimMpiMasterOverviewSequencer.h
diff --git a/include/ossim/parallel/ossimMpiSlaveOverviewSequencer.h b/ossim/include/ossim/parallel/ossimMpiSlaveOverviewSequencer.h
similarity index 100%
rename from include/ossim/parallel/ossimMpiSlaveOverviewSequencer.h
rename to ossim/include/ossim/parallel/ossimMpiSlaveOverviewSequencer.h
diff --git a/include/ossim/parallel/ossimMtDebug.h b/ossim/include/ossim/parallel/ossimMtDebug.h
similarity index 100%
rename from include/ossim/parallel/ossimMtDebug.h
rename to ossim/include/ossim/parallel/ossimMtDebug.h
diff --git a/include/ossim/parallel/ossimMultiThreadSequencer.h b/ossim/include/ossim/parallel/ossimMultiThreadSequencer.h
similarity index 100%
rename from include/ossim/parallel/ossimMultiThreadSequencer.h
rename to ossim/include/ossim/parallel/ossimMultiThreadSequencer.h
diff --git a/ossim/include/ossim/parallel/ossimOrthoIgen.h b/ossim/include/ossim/parallel/ossimOrthoIgen.h
new file mode 100644
index 0000000..ab6d2ae
--- /dev/null
+++ b/ossim/include/ossim/parallel/ossimOrthoIgen.h
@@ -0,0 +1,253 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: Class declaration for ortho-image generator.
+//
+//*************************************************************************
+// $Id: ossimOrthoIgen.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimOrthoIgen_HEADER
+#define ossimOrthoIgen_HEADER
+
+#include <ossim/parallel/ossimIgen.h>
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimConnectableContainer.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/imaging/ossimImageChain.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/support_data/ossimSrcRecord.h>
+#include <map>
+
+class ossimConnectableObject;
+class ossimMapProjection;
+class ossimImageSource;
+class ossimImageHandler;
+class ossimImageCombiner;
+
+class OSSIM_DLL ossimOrthoIgen : public ossimIgen
+{
+public:
+   enum ossimOrthoIgenProjectionType
+   {
+      OSSIM_UNKNOWN_PROJECTION = 0,
+      OSSIM_UTM_PROJECTION,
+      OSSIM_SRS_PROJECTION,
+      OSSIM_GEO_PROJECTION,
+      OSSIM_INPUT_PROJECTION,
+      OSSIM_EXTERNAL_PROJECTION
+   };
+   enum OriginType
+   {
+      OSSIM_CENTER_ORIGIN     = 0,
+      OSSIM_UPPER_LEFT_ORIGIN = 1
+   };
+   typedef std::map<ossimString,ossimString, ossimStringLtstr> PropertyMap;
+   
+   ossimOrthoIgen();
+
+   /**
+    * Will add command line arguments to initialize this object from a command line application
+    *
+    * <pre>
+    * Command Line Arguments:
+    *
+    * -t or --thumbnail  Takes an integer argument that is used to set both width
+    *                    and height.
+    *                    example: -t 1024 will produce an image that is 1024x1024
+    * --meters           Takes a double precision argument that is used for meters per pixel
+    *                    override.
+    *                    example: --meters 5 will create a 5 meter product.
+    * --slave-buffers    Takes an integer as an argument that specifies the number of slave tile buffers per
+    *                    slave node.  The slave nodes are suppose to be asynch send.  It will
+    *                    not wait for the send to finish.  It will got to the next buffer and check to
+    *                    see if it's been sent and if not it will then wait for the buffer to be free.
+    *                    example: --slave-buffers 10  will create 10 buffers per slave node.
+    * --chain-template   Takes a file name that is a kewyord list that is used as a template for every
+    *                    input file.
+    *                    example:
+    * 
+    * @param argumentParser Argument parser object to add command line options to
+    *
+    */ 
+   void addArguments(ossimArgumentParser& argumentParser);
+   virtual void initialize(ossimArgumentParser& argumentParser);
+   void addFiles(ossimArgumentParser& argumentParser,
+                 bool withDecoding,
+                 ossim_uint32 startIdx = 1);
+   void clearFilenameList();
+
+   //! Parses the .src file specified in the command line. These contain an alternate specification
+   //! of input file and associated attributes as a KWL.
+   void addSrcFile(const ossimFilename& fileName);
+
+   bool execute();
+   void setDefaultValues();
+
+protected:
+   //! Used to parse command line filename specs with piped switches (in lieu of *.src file).
+   //! Returns TRUE if successful.
+   bool parseFilename(const ossimString& file_spec, bool decodeEntry);
+
+   //! Determines the UL corner tiepoint of the product projection as the overall UL corner of the
+   //! mosaic.
+   void establishMosaicTiePoint();
+
+   //! Computes the center latitude of the mosaic for use as the geographic scaling latitude
+   void computeGeoScalingLatitude();
+
+   ossimUnitType theDeltaPerPixelUnit;
+   ossimDpt      theDeltaPerPixelOverride;
+   ossimOrthoIgenProjectionType theProjectionType;
+   ossimString   theProjectionName;
+   ossimString   theCrsString;
+   ossim_float64 theGeoScalingLatitude;
+   ossimString   theCombinerType;
+   ossimString   theResamplerType;
+   ossimString   theWriterType;
+   ossimFilename theTemplateView;
+   ossimFilename theTilingTemplate;
+   ossimFilename theTilingFilename;
+   ossimFilename theChainTemplate;
+   ossimFilename theCombinerTemplate;
+   ossimFilename theAnnotationTemplate;
+   ossimFilename theWriterTemplate;
+   ossimFilename theSupplementaryDirectory;
+   ossimString   theSlaveBuffers;
+   OriginType    theCutOriginType;
+   ossimDpt      theCutOrigin;
+   ossimDpt      theCutDxDy;
+   ossimUnitType theCutOriginUnit;
+   ossimUnitType theCutDxDyUnit;
+   ossim_float64 theLowPercentClip;
+   ossim_float64 theHighPercentClip;
+   ossim_int32   theStdDevClip;
+   bool          theUseAutoMinMaxFlag;
+   bool          theClipToValidRectFlag;
+   PropertyMap   theReaderProperties;
+   PropertyMap   theWriterProperties;   
+   ossimFilename theTargetHistoFileName;
+   std::vector<ossimSrcRecord> theSrcRecords;
+   ossimFilename theProductFilename;
+   ossimRefPtr<ossimProjection> theReferenceProj;
+   ossimFilename theMaskShpFile;
+   bool          theCacheExcludedFlag;
+   ossimString   thePixelReplacementMode;
+   ossim_float64 theClampPixelMin;
+   ossim_float64 theClampPixelMax;
+   ossim_float64 theClipPixelMin;
+   ossim_float64 theClipPixelMax;
+   ossimString   theOutputRadiometry;
+   ossimPixelType thePixelAlignment;
+
+   /**
+   * @brief Sets up the igen keyword list for the process.
+   *
+   * This throws ossimException on error.
+   */
+   void setupIgenChain();
+
+   bool setupTiling();
+   void setupCutter();
+
+   /** 
+   * Checks for the presence of a raster mask file alongside the image, and inserts the mask 
+   * filter in the chain if mask file exists. Returns with current_src pointing to masker object 
+   */
+   ossimImageSource* setupRasterMask(ossimImageChain* single_image_chain,
+                        const ossimSrcRecord& src_record);
+
+   /**
+   * Insert a partial-pixel flipper to remap null-valued pixels to min according to info in the
+   * source record and/or command line. Returns with current_src pointing to flipper object.
+   */
+   ossimImageSource* setupPixelFlipper(ossimImageChain* single_image_chain, 
+                          const ossimSrcRecord& src_record);
+
+   /**
+    * @brief Set up the writer for the process.
+    * This throws ossimException on error.
+    */
+   void setupWriter();
+
+   /**
+    * @brief Set up the output projection for the process.
+    * This throws ossimException on error.
+    */
+   void setupProjection();
+
+   /**
+    * Sets up any annotation from --annotate option.
+    * @note This must be called after "setupView" as it needs a projection.
+    */
+   void setupAnnotation();
+
+   void addFiles(ossimString fileInfoStr, 
+                 std::vector<ossimString> fileInfos,
+                 bool withEncodedEntry);
+
+   /**
+   * Consolidates specification of bounding rect given various ways of specifying on the command
+   * line. This avoids multiple, redundant checks scattered throughout the code.
+   */
+   void consolidateCutRectSpec();
+
+   /**
+   * Called when histogram operation is requested. Sets up additional filters in image chain
+   * for performing matching, stretching or clipping. If chain=0,
+   * this implies that the target histogram is being enabled for the output mosaic. */
+   void setupHistogram(ossimImageChain* chain=0, const ossimSrcRecord& src_record=ossimSrcRecord());
+
+   //! Utility method for creating a histogram for an input image. Returns TRUE if successful.
+   bool createHistogram(ossimImageChain* chain, const ossimFilename& histo_filename);
+
+   /**
+    * @brief Adds cache to the left of resampler.
+    * @param chain The chain to add to.
+    */
+   void addChainCache(ossimImageChain* chain) const;
+
+   /**
+   * @brief Generates a log KWL file that could be fed directly to Igen. Used for verifying chain.
+   */
+   void generateLog();
+  
+   /**
+   * @brief Adds a scalar remapper to the extreme right of the chain is specified by the 
+   * --output-radiometry option.
+   */
+   void setupOutputRadiometry();
+
+   /**
+    * @brief Checks all input image projections to see if elevation is needed.
+    * @return true if affected, false if not.
+    */
+   bool isAffectedByElevation();
+
+   /**
+    * @brief Recomputes image gsds.
+    *
+    * Calls ossimImageGeometry::computeGsd() on all image handlers
+    * that have projections affected by elevation.  Used to recompute after a
+    * delayed load of elevation.
+    */
+   void reComputeChainGsds();
+
+   /**
+    * GSD Determination is nontrivial since there are various command-line options that control
+    * this quantity. This method considers all information before setting the product's GSD.
+    */
+   void setProductGsd();
+};
+#endif
+
diff --git a/ossim/include/ossim/plugin/ossimDynamicLibrary.h b/ossim/include/ossim/plugin/ossimDynamicLibrary.h
new file mode 100644
index 0000000..2d0f956
--- /dev/null
+++ b/ossim/include/ossim/plugin/ossimDynamicLibrary.h
@@ -0,0 +1,67 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// LICENSE: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimDynamicLibrary.h 23666 2015-12-14 20:01:22Z rashadkm $
+#ifndef ossimDynamicLibrary_HEADER
+#define ossimDynamicLibrary_HEADER 1
+
+#include <ossim/ossimConfig.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimReferenced.h>
+
+
+#if defined(_WIN32) || defined(__WIN32__)
+#include <windows.h>
+#else 
+#include <dlfcn.h>
+#endif
+
+class OSSIM_DLL ossimDynamicLibrary : public ossimReferenced
+{
+public:
+   ossimDynamicLibrary();
+   ossimDynamicLibrary(const ossimString& name);
+   virtual ~ossimDynamicLibrary();
+   // return TRUE if the library was loaded successfully
+   bool isLoaded() const { return theLibrary != 0; }
+
+   // load the library with the given name (full or not), return TRUE on
+   // success
+   bool load(const ossimString& name);
+
+   bool load();
+   // unload the library, also done automatically in dtor
+   void unload();
+
+   // load a symbol from the library, return NULL if an error occured or
+   // symbol wasn't found
+   void *getSymbol(const ossimString& name) const;
+
+   const ossimString& getName()const
+   {
+      return theLibraryName;
+   }
+   
+protected:
+   // the handle to DLL or NULL
+#if defined(_WIN32)
+   HINSTANCE theLibrary;
+#else
+   void* theLibrary;
+#endif
+   ossimString theLibraryName;
+
+};
+
+#endif
+
+
+
diff --git a/include/ossim/plugin/ossimPluginLibrary.h b/ossim/include/ossim/plugin/ossimPluginLibrary.h
similarity index 100%
rename from include/ossim/plugin/ossimPluginLibrary.h
rename to ossim/include/ossim/plugin/ossimPluginLibrary.h
diff --git a/include/ossim/plugin/ossimSharedObjectBridge.h b/ossim/include/ossim/plugin/ossimSharedObjectBridge.h
similarity index 100%
rename from include/ossim/plugin/ossimSharedObjectBridge.h
rename to ossim/include/ossim/plugin/ossimSharedObjectBridge.h
diff --git a/include/ossim/plugin/ossimSharedPluginRegistry.h b/ossim/include/ossim/plugin/ossimSharedPluginRegistry.h
similarity index 100%
rename from include/ossim/plugin/ossimSharedPluginRegistry.h
rename to ossim/include/ossim/plugin/ossimSharedPluginRegistry.h
diff --git a/ossim/include/ossim/point_cloud/ossimGenericPointCloudHandler.h b/ossim/include/ossim/point_cloud/ossimGenericPointCloudHandler.h
new file mode 100644
index 0000000..b21eaeb
--- /dev/null
+++ b/ossim/include/ossim/point_cloud/ossimGenericPointCloudHandler.h
@@ -0,0 +1,41 @@
+//**************************************************************************************************
+//
+// OSSIM (http://trac.osgeo.org/ossim/)
+//
+// License: MIT
+//
+//**************************************************************************************************
+// $Id: ossimGenericPointCloudHandler.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimGenericPointCloudHandler_HEADER
+#define ossimGenericPointCloudHandler_HEADER 1
+
+#include <ossim/point_cloud/ossimPointCloudHandler.h>
+#include <ossim/point_cloud/ossimPointBlock.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimGrect.h>
+#include <vector>
+
+using namespace std;
+
+class OSSIM_DLL ossimGenericPointCloudHandler : public ossimPointCloudHandler
+{
+public:
+   ossimGenericPointCloudHandler(vector<ossimEcefPoint>& ecef_points);
+   ossimGenericPointCloudHandler(vector<ossimGpt>& ground_points);
+   virtual ~ossimGenericPointCloudHandler();
+   virtual ossim_uint32 getNumPoints() const;
+   virtual void getFileBlock(ossim_uint32 offset,
+                             ossimPointBlock& block,
+                             ossim_uint32 maxNumPoints=0xFFFFFFFF)const;
+   virtual ossim_uint32 getFieldCode() const;
+   virtual bool open(const ossimFilename& pointsFile);
+   virtual void close();
+
+protected:
+   ossimGenericPointCloudHandler() {}
+   ossimPointBlock m_pointBlock;
+};
+
+#endif /* #ifndef ossimPdalReader_HEADER */
+
diff --git a/ossim/include/ossim/point_cloud/ossimPointBlock.h b/ossim/include/ossim/point_cloud/ossimPointBlock.h
new file mode 100644
index 0000000..f8e9379
--- /dev/null
+++ b/ossim/include/ossim/point_cloud/ossimPointBlock.h
@@ -0,0 +1,98 @@
+//**************************************************************************************************
+//
+// OSSIM (http://trac.osgeo.org/ossim/)
+//
+// License: MIT
+//
+//**************************************************************************************************
+#ifndef ossimPointBlock_HEADER
+#define ossimPointBlock_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h> /* for ossim::isnan */
+#include <ossim/base/ossimDataObject.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimGrect.h>
+#include <ossim/point_cloud/ossimPointRecord.h>
+#include <vector>
+
+class ossimSource;
+
+/***************************************************************************************************
+ * Base class for all Point Cloud data sources, including input file handlers and processing nodes.
+ **************************************************************************************************/
+class OSSIMDLLEXPORT ossimPointBlock: public ossimDataObject
+{
+public:
+   typedef std::vector< ossimRefPtr<ossimPointRecord> > PointList;
+
+   ossimPointBlock(ossimSource* owner=0, ossim_uint32 fields=0);
+
+   virtual ~ossimPointBlock();
+
+   /** Returns allocated size. The pointList may contain only null points if not assigned */
+   virtual ossim_uint32 size() const { return m_pointList.size(); }
+
+   bool empty() const { return (size() == 0); }
+
+   /**
+    * Returns OR'd mash-up of ossimPointRecord field codes being stored (or desired to be stored)
+    */
+   ossim_uint32 getFieldCode() const;
+   vector<ossimPointRecord::FIELD_CODES> getFieldCodesAsList() const;
+
+   /**
+    * Initializes the desired fields to be stored. This will affect future getBlock() calls. If
+    * the point list contains points from prior read, they will be deleted unless the points field
+    * code matches the code argument.
+    */
+   void setFieldCode(ossim_uint32 code);
+
+   /** Adds single point to the tail of the list. */
+   virtual void addPoint(ossimPointRecord* point);
+
+   virtual const ossimPointRecord* getPoint(ossim_uint32 point_offset) const;
+   virtual ossimPointRecord* getPoint(ossim_uint32 point_offset);
+
+   const ossimPointRecord* operator[](ossim_uint32 i) const { return getPoint(i); }
+   ossimPointRecord* operator[](ossim_uint32 i) { return getPoint(i); }
+
+   virtual const PointList&  getPoints() const { return m_pointList; }
+   virtual PointList&  getPoints()  { return m_pointList; }
+
+   void getFieldMin(ossimPointRecord::FIELD_CODES field, ossim_float32& value) const;
+   void getFieldMax(ossimPointRecord::FIELD_CODES field, ossim_float32& value) const;
+   void getBounds(ossimGrect& block_bounds) const;
+
+   virtual const ossimPointBlock& operator=(const ossimPointBlock &rhs);
+
+   virtual ossimObject* dup() const;
+
+   /** Resets any storage to empty. */
+   virtual void clear() { m_pointList.clear(); m_isNormalized = false; m_minMaxValid = false;}
+
+   /**
+    *  Fulfills base class pure virtual. TODO: Needs to be correctly implemented
+    */
+   virtual bool isEqualTo(const ossimDataObject& /*rhs*/, bool /*deep_copy*/) const { return false; }
+   virtual ossim_uint32 getHashId() const { return 0; }
+   virtual ossim_uint32 getDataSizeInBytes() const { return 0; };
+   virtual void initialize() {};
+
+protected:
+   ossimPointBlock(const ossimPointBlock& rhs);
+   void scanForMinMax() const;
+
+   ossimPointRecord m_nullPCR;
+   mutable ossimPointRecord m_minRecord;
+   mutable ossimPointRecord m_maxRecord;
+   mutable bool m_minMaxValid;
+   PointList m_pointList;
+   mutable ossim_uint32 m_fieldCode; // OR'd mash-up of ossimPointRecord::FIELD_CODES
+   bool m_isNormalized;
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimPointBlock_HEADER */
+
diff --git a/ossim/include/ossim/point_cloud/ossimPointCloudGeometry.h b/ossim/include/ossim/point_cloud/ossimPointCloudGeometry.h
new file mode 100644
index 0000000..adac902
--- /dev/null
+++ b/ossim/include/ossim/point_cloud/ossimPointCloudGeometry.h
@@ -0,0 +1,89 @@
+//**************************************************************************************************
+//
+// OSSIM (http://trac.osgeo.org/ossim/)
+//
+// License: MIT
+//
+//**************************************************************************************************
+// $Id$
+
+#ifndef ossimPointCloudGeometry_HEADER
+#define ossimPointCloudGeometry_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimDatumFactory.h>
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimGrect.h>
+#include <ossim/projection/ossimMapProjection.h>
+
+
+/***************************************************************************************************
+ * This class represents the 3D geometry of the point cloud dataset.
+ * NOTE: See below for details on position format. It is the responsibility of the derived
+ * ossimPointCloudHandlers to convert the ray point positions into either geographic or map-meters
+ * before storing a point in ossimPointCloudRecord.
+ **************************************************************************************************/
+class OSSIMDLLEXPORT ossimPointCloudGeometry : public ossimObject
+{
+public:
+   enum PositionFormat
+   {
+      UNKNOWN,
+      GEOGRAPHIC,     // x=lon, y=lat, z=ellipsoid height
+      MAP_PROJECTED, // x=easting, y=northing, z=ellipsoid height
+      ECF_METERS      // X, Y, Z (see base/ossimEcef)
+   };
+
+   /**
+    * Constructs from WKT specification. Since the projection units are unknown
+    * when the bounds are established, the caller will not know the units of the point coordinates
+    * for establishing the bounds.
+    */
+   ossimPointCloudGeometry(const ossimString& wkt);
+
+   /**
+    * If arg left to default GEOGRAPHIC, this geometry is essentially unity transform except for a
+    * possible datum change if requested.
+    */
+   ossimPointCloudGeometry(PositionFormat f=GEOGRAPHIC)
+         : m_format(f),
+           m_projection(0),
+           m_datum (ossimDatumFactory::instance()->wgs84()) {}
+
+   ~ossimPointCloudGeometry() {}
+
+   bool operator==(const ossimPointCloudGeometry& other) const;
+
+   /**
+   * While the raw point positions may be specified in the data file as either geographic, map
+   * projected (feet or meters), or ECF meters, the point positions are stored in OSSIM as either as
+   * geographic or map (meters) only. This method is used by the Point cloud handler object for
+   * interpreting the input file's raw position format.
+   */
+   PositionFormat getRawPosFormat() const { return m_format; }
+
+   /**
+    * This method will return either GEOGRAPHIC or MAP_PROJECTION. For the latter, the stored
+    * coordinates will be in meters.
+    */
+   PositionFormat getStoredPosFormat() const { return (m_format==ECF_METERS) ? GEOGRAPHIC : m_format; }
+
+   const ossimMapProjection* getProjection()   const { return m_projection.get(); }
+   const ossimDatum*         getDatum()        const { return m_datum; }
+
+   /**
+    * Method converts a generic 3D point as stored in the argument ossim3Dpt object,
+    * and converts it to an ossimGpt, using the preset datum provided in the argument gpt.
+    */
+   void convertPos(const ossimDpt3d& stored_pos, ossimGpt& converted_gpos) const;
+
+private:
+   PositionFormat m_format;
+   ossimRefPtr<ossimMapProjection> m_projection;
+   const ossimDatum* m_datum;
+
+TYPE_DATA
+};
+
+#endif /* ossimPointCloudGeometry_HEADER */
+
diff --git a/ossim/include/ossim/point_cloud/ossimPointCloudHandler.h b/ossim/include/ossim/point_cloud/ossimPointCloudHandler.h
new file mode 100644
index 0000000..094c264
--- /dev/null
+++ b/ossim/include/ossim/point_cloud/ossimPointCloudHandler.h
@@ -0,0 +1,98 @@
+//**************************************************************************************************
+//
+// OSSIM (http://trac.osgeo.org/ossim/)
+//
+// License: MIT
+//
+//**************************************************************************************************
+// $Id$
+
+#ifndef ossimPointCloudHandler_HEADER
+#define ossimPointCloudHandler_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/point_cloud/ossimPointCloudSource.h>
+#include <ossim/point_cloud/ossimPointBlock.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/point_cloud/ossimPointCloudGeometry.h>
+#include <vector>
+
+
+/**
+ * Base class for all point-cloud file readers
+ */
+class OSSIMDLLEXPORT ossimPointCloudHandler: public ossimPointCloudSource
+{
+public:
+   static ossim_uint32 DEFAULT_BLOCK_SIZE;
+
+   ossimPointCloudHandler();
+   ossimPointCloudHandler(ossimObject* owner);
+
+   virtual ~ossimPointCloudHandler();
+
+   /**
+    *  @brief Method to open input point cloud dataset.
+    *  @param imageFile Name of point data file to be opened. (or basename for multi-file sets.)
+    *  @return Returns true on success, false on error.
+    */
+   virtual bool open(const ossimFilename& imageFile) = 0;
+
+   /**
+    * Closes the point cloud file(s).
+    */
+   virtual void close() = 0;
+
+   /**
+    * Fetches up to maxNumPoints points starting at the dataset's <offset> in the order they
+    * appear in the data file. Thread-safe implementation accepts an allocated block from the
+    * calling method. caller can check block.size() to see if block is full.
+    */
+   virtual void getFileBlock(ossim_uint32 offset,
+                             ossimPointBlock& block,
+                             ossim_uint32 maxNumPoints=0xFFFFFFFF) const = 0;
+
+   /**
+    * @see getFileBlock.
+    */
+   virtual void getNextFileBlock(ossimPointBlock& block,
+                                 ossim_uint32 maxNumPoints=0xFFFFFFFF) const;
+
+   virtual void rewind() const { m_currentPID = 0; }
+
+   /**
+    * Fetches the block of points inside the block bounds. If the height components of the bounds
+    * are NaN, then only the horizontal bounds are considered. Thread-safe version accepts data
+    * block object from caller. The block object is cleared before points are pushed on the vector.
+    * The block size will be non-zero if points were found.
+    */
+   virtual void getBlock(const ossimGrect& bounds, ossimPointBlock& block) const;
+
+   virtual const ossimPointRecord*  getMinPoint() const { return m_minRecord.get(); }
+   virtual const ossimPointRecord*  getMaxPoint() const { return m_maxRecord.get(); }
+
+   virtual void getBounds(ossimGrect& bounds) const;
+
+   /**
+    * Handler is always on the start of the pipeline
+    */
+   virtual bool canConnectMyInputTo(ossim_int32, const ossimConnectableObject*) const
+   { return false; }
+
+   void normalizeBlock(ossimPointBlock& block);
+
+protected:
+
+   ossimFilename m_inputFilename;
+   ossimRefPtr<ossimPointCloudGeometry> m_geometry;
+   ossimRefPtr<ossimPointRecord> m_minRecord;
+   ossimRefPtr<ossimPointRecord>  m_maxRecord;
+   mutable ossim_uint32 m_currentPID;
+
+TYPE_DATA
+};
+
+#endif /* ossimPointCloudHandler_HEADER */
+
diff --git a/ossim/include/ossim/point_cloud/ossimPointCloudHandlerFactory.h b/ossim/include/ossim/point_cloud/ossimPointCloudHandlerFactory.h
new file mode 100644
index 0000000..32780c4
--- /dev/null
+++ b/ossim/include/ossim/point_cloud/ossimPointCloudHandlerFactory.h
@@ -0,0 +1,44 @@
+//**************************************************************************************************
+//
+// OSSIM (http://trac.osgeo.org/ossim/)
+//
+// License: MIT
+//
+//**************************************************************************************************
+// $Id$
+
+#ifndef ossimPointCloudHandlerFactory_HEADER
+#define ossimPointCloudHandlerFactory_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimObjectFactory.h>
+#include <ossim/base/ossimFilename.h>
+
+class ossimPointCloudHandler;
+
+class OSSIMDLLEXPORT ossimPointCloudHandlerFactory: public ossimObjectFactory
+{
+public:
+   virtual ~ossimPointCloudHandlerFactory() {}
+
+   virtual ossimPointCloudHandler* open(const ossimFilename& fileName) const = 0;
+   virtual ossimPointCloudHandler* open(const ossimKeywordlist& kwl, const char* prefix = 0) const = 0;
+
+   /*!
+    * Creates and object given a keyword list.
+    */
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl, const char* prefix = 0) const
+   {
+      return (ossimObject*) open(kwl, prefix);
+   }
+
+   virtual ossimObject* createObject(const ossimString& typeName) const = 0;
+
+   virtual void getSupportedExtensions(std::vector<ossimString>& extList) const = 0;
+
+protected:
+
+};
+
+#endif /* ossimPointCloudHandlerFactory_HEADER */
+
diff --git a/ossim/include/ossim/point_cloud/ossimPointCloudHandlerRegistry.h b/ossim/include/ossim/point_cloud/ossimPointCloudHandlerRegistry.h
new file mode 100644
index 0000000..69d6814
--- /dev/null
+++ b/ossim/include/ossim/point_cloud/ossimPointCloudHandlerRegistry.h
@@ -0,0 +1,58 @@
+//**************************************************************************************************
+//
+// OSSIM (http://trac.osgeo.org/ossim/)
+//
+// License: MIT
+//
+//**************************************************************************************************
+// $Id$
+
+#ifndef ossimPointCloudHandlerRegistry_HEADER
+#define ossimPointCloudHandlerRegistry_HEADER 1
+
+#include <ossim/base/ossimObjectFactory.h>
+#include <ossim/base/ossimFactoryListInterface.h>
+#include <ossim/base/ossimFilename.h>
+
+#include <ossim/point_cloud/ossimPointCloudHandlerFactory.h>
+#include <ossim/point_cloud/ossimPointCloudHandler.h>
+
+class OSSIMDLLEXPORT ossimPointCloudHandlerRegistry :
+      public ossimObjectFactory,
+      public ossimFactoryListInterface<ossimPointCloudHandlerFactory, ossimPointCloudHandler>
+{
+public:
+   virtual ~ossimPointCloudHandlerRegistry();
+
+   static ossimPointCloudHandlerRegistry* instance();
+
+   virtual ossimPointCloudHandler* open(const ossimFilename& fileName) const;
+
+   virtual ossimPointCloudHandler* open(const ossimKeywordlist& kwl, const char* prefix = 0) const;
+
+   virtual ossimRefPtr<ossimPointCloudHandler> open(std::istream* str,
+                                                    std::streamoff restartPosition,
+                                                    bool youOwnIt) const;
+
+   /*!
+    * Creates an object given a type name.
+    */
+   virtual ossimObject* createObject(const ossimString& typeName) const;
+
+   /*!
+    * Creates and object given a keyword list.
+    */
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl, const char* prefix = 0) const;
+
+   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
+
+protected:
+   ossimPointCloudHandlerRegistry();
+   const ossimPointCloudHandlerRegistry& operator=(const ossimPointCloudHandlerRegistry& rhs);
+   static ossimPointCloudHandlerRegistry* m_instance;
+
+TYPE_DATA
+};
+
+#endif /* ossimPointCloudHandlerRegistry_HEADER */
+
diff --git a/ossim/include/ossim/point_cloud/ossimPointCloudImageHandler.h b/ossim/include/ossim/point_cloud/ossimPointCloudImageHandler.h
new file mode 100644
index 0000000..bbc9cbe
--- /dev/null
+++ b/ossim/include/ossim/point_cloud/ossimPointCloudImageHandler.h
@@ -0,0 +1,255 @@
+//**************************************************************************************************
+//
+// OSSIM (http://trac.osgeo.org/ossim/)
+//
+// License: MIT
+//
+//**************************************************************************************************
+// $Id$
+
+#ifndef ossimPointCloudImageSource_HEADER
+#define ossimPointCloudImageSource_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/point_cloud/ossimPointCloudHandler.h>
+#include <vector>
+
+class ossimImageData;
+class ossimTiffOverviewTileSource;
+class ossimPoinCloudHandler;
+
+/**
+ * Class used for rendering point cloud data into a raster tile. It is derived from
+ * ossimImageHandler so that it can be included in the available file formats for reading as
+ * maintained by the ossimImageHandlerRegistry. This base class implementation exposes the data
+ * elements represented by the base-class ossimPointCloudSource and the individual point base-class
+ * ossimPointCloudRecord, namely, intensity, RGB color, elevation, and number of returns.
+ *
+ * For sensor systems providing additional renderable data items, a derived class will be required
+ * to expose those components.
+ */
+class OSSIMDLLEXPORT ossimPointCloudImageHandler : public ossimImageHandler
+{
+public:
+   enum Components { INTENSITY=0, HIGHEST, LOWEST, RETURNS, RGB, NUM_COMPONENTS /*not a component*/ };
+
+   ossimPointCloudImageHandler();
+   virtual ~ossimPointCloudImageHandler();
+
+   /**
+    *  @brief open method.
+    *  Satisfies ossimImageHandler::open pure virtual.
+    *  @return Returns true on success, false on error.
+    *  @note This method relies on the data member ossimImageData::theImageFile
+    *  being set.  Callers should do a "setFilename" prior to calling this
+    *  method or use the ossimImageHandler::open that takes a file name and an
+    *  entry index.
+    */
+   virtual bool open();
+
+   /**
+    *  @brief is open method.
+    *  Satisfies ossimImageHandler::isOpen pure virtual.
+    *  @return true if open, false if not.
+    */
+   virtual bool isOpen() const { return m_pch.valid(); }
+
+
+   /**
+    * @brief Close method.
+    */
+   virtual void close();
+
+   /**
+    *  Returns a pointer to a tile given an origin representing the upper left
+    *  corner of the tile to grab from the image.
+    *  Satisfies pure virtual from TileSource class.
+    */
+   virtual ossimRefPtr<ossimImageData> getTile(const  ossimIrect& rect,
+                                               ossim_uint32 resLevel=0);
+   
+   /**
+    * Method to get a tile.   
+    * @param result The tile to stuff.  Note The requested rectangle in full
+    * image space and bands should be set in the result tile prior to
+    * passing.  It will be an error if:
+    * result.getNumberOfBands() != this->getNumberOfOutputBands()
+    * @return true on success false on error.  If return is false, result
+    *  is undefined so caller should handle appropriately with makeBlank or
+    * whatever.
+    */
+   virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);
+   
+   /**
+    * @brief Gets bands.
+    * Satisfies ossimImageSource::getNumberOfInputBands pure virtual.
+    * @retrun Number of bands.
+    */
+   virtual ossim_uint32 getNumberOfInputBands() const;
+
+   /**
+    * @brief Gets lines.
+    * Satisfies ossimImageHandler::getNumberOfLines pure virtual.
+    * @param resLevel Reduced resolution level to return lines of.
+    * Default = 0
+    * @return The number of lines for specified reduced resolution level.
+    */
+   virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel = 0) const;
+
+   /**
+    * @brief Gets samples.
+    * Satisfies ossimImageHandler::getNumberOfSamples
+    * @param resLevel Reduced resolution level to return samples of.
+    * Default = 0
+    * @return The number of samples for specified reduced resolution level.
+    */
+   virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel = 0) const;
+
+   /**
+    * @brief Gets tile width.
+    * Satisfies ossimImageHandler::getImageTileWidth pure virtual.
+    * @return The tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileWidth which
+    * returns the output tile width which can be different than the internal
+    * image tile width on disk.
+    */
+   virtual ossim_uint32 getImageTileWidth() const;
+
+   /**
+    * @brief Gets tile height.
+    * Satisfies ossimImageHandler::getImageTileHeight pure virtual.
+    * @return The tile width of the image or 0 if the image is not tiled.
+    * Note: this is not the same as the ossimImageSource::getTileWidth which
+    * returns the output tile width which can be different than the internal
+    * image tile width on disk.
+    */
+   virtual ossim_uint32 getImageTileHeight() const;
+
+   /** @return The width of the output tile. */
+   virtual ossim_uint32 getTileWidth() const;
+   
+   /** @returns The height of the output tile. */
+   virtual ossim_uint32 getTileHeight() const;
+
+   /** @return The output pixel type of the tile source. */
+   ossimScalarType getOutputScalarType() const;
+
+   /**
+    * @brief Gets entry list.
+    * This list reflects the data component entry list provided by the derived point-cloud handler.
+    * This base class understands the basic (LIDAR-biased) entries: "Intensity", "RGB",
+    * "Elevation", and "Return". If a sensor provides other components, then a derived image handler
+    * will be needed to rasterize that data channel as well.
+    * @param entryList This is the list to initialize with entry indexes.
+    */
+   virtual void getEntryList(std::vector<ossim_uint32>& entryList) const;
+
+   virtual void getEntryNames(std::vector<ossimString>& entryNames) const;
+
+   /** @return The current entry number. */
+   virtual ossim_uint32 getCurrentEntry() const;
+
+   /**
+    * @param entryIdx Entry number to select.
+    * @return true if it was able to set the current entry and false otherwise.
+    */
+   virtual bool setCurrentEntry(ossim_uint32 entryIdx);
+
+   /** @return "point-cloud" */
+   virtual ossimString getShortName() const;
+   
+   /** @return "ossim point cloud to image renderer" */
+   virtual ossimString getLongName()  const;
+
+   /**
+    * Returns the image geometry object associated with this tile source or
+    * NULL if non defined.  The geometry contains full-to-local image
+    * transform as well as projection (image-to-world).
+    */
+   virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
+
+   /** @return Min pixel value. */
+   virtual double getMinPixelValue(ossim_uint32 band=0) const;
+
+   /** @return Min pixel value. */
+   virtual double getMaxPixelValue(ossim_uint32 band=0) const;
+
+   /** @return Min pixel value. */
+   virtual double getNullPixelValue(ossim_uint32 band=0) const;
+
+   /** @return The total number of decimation levels. */
+   virtual ossim_uint32 getNumberOfDecimationLevels() const;
+
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0) const;
+
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+
+   virtual void getValidImageVertices(std::vector<ossimIpt>& validVertices,
+                                      ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER,
+                                      ossim_uint32 resLevel=0) const;
+
+   /**
+    * The reader properties are:
+    * -- the GSD ("meters_per_pixel") which overrides computed nominal GSD
+    * -- the GSD factor ("gsd_factor") scales the computed nominal GSD, defaults to 1.0.
+    * -- the active component as entry number ("entry") with possible values [0 - 4] corresponding
+    *    to "component" property (listed below)
+    * -- the active component ("component") as string with possible values
+    *    "intensity", "highest", "lowest", "returns", or "rgb", respectively (case insensitive)
+    */
+   void setProperty(ossimRefPtr<ossimProperty> property);
+   ossimRefPtr<ossimProperty> getProperty(const ossimString& name) const;
+
+   /**
+    * Permits backdoor for setting the input point cloud handler object. Useful for debug
+    */
+   bool setPointCloudHandler(ossimPointCloudHandler* pch);
+
+   /** @brief Get the GSD for resLevel. */
+   void getGSD(ossimDpt& gsd, ossim_uint32 resLevel) const;
+
+   /** @brief Sets m_gsd data member and projection if projection is set. */
+   void setGSD( const ossim_float64& gsd );
+
+
+protected:
+   class PcrBucket
+   {
+   public:
+      PcrBucket() : m_bucket(0), m_numSamples(0) {}
+      PcrBucket(const ossim_float32* init_value, ossim_uint32 numBands);
+      PcrBucket(const ossim_float32& R, const ossim_float32& G, const ossim_float32& B);
+      PcrBucket(const ossim_float32& init_value);
+      ~PcrBucket();
+      ossim_float32* m_bucket;
+      int m_numSamples;
+   };
+
+   void initTile();
+
+   void addSample(std::map<ossim_int32, PcrBucket*>& accumulator,
+                  ossim_int32 index,
+                  const ossimPointRecord* sample);
+
+   void normalize(std::map<ossim_int32, PcrBucket*>& accumulator);
+
+   ossim_uint32 componentToFieldCode() const;
+
+   ossimRefPtr<ossimPointCloudHandler> m_pch;
+   ossim_float32                m_maxPixel;
+   ossim_float32                m_minPixel;
+   ossimDpt                     m_gsd;
+   ossim_float64                m_gsdFactor;
+   ossimRefPtr<ossimImageData>  m_tile;
+   OpenThreads::Mutex           m_mutex;
+   Components                   m_activeComponent;
+   std::vector<ossimString>     m_componentNames;
+
+   TYPE_DATA
+};
+
+#endif /* ossimPointCloudRenderer_HEADER */
+
diff --git a/ossim/include/ossim/point_cloud/ossimPointCloudImageHandlerFactory.h b/ossim/include/ossim/point_cloud/ossimPointCloudImageHandlerFactory.h
new file mode 100644
index 0000000..b825e81
--- /dev/null
+++ b/ossim/include/ossim/point_cloud/ossimPointCloudImageHandlerFactory.h
@@ -0,0 +1,48 @@
+/*
+ * ossimPointCloudImageHandlerFactory.h
+ *
+ *  Created on: Dec 8, 2014
+ *      Author: okramer
+ */
+
+#ifndef ossimPointCloudImageHandlerFactory_HEADER
+#define ossimPointCloudImageHandlerFactory_HEADER
+
+#include <ossim/imaging/ossimImageHandlerFactoryBase.h>
+
+class ossimPointCloudImageHandlerFactory: public ossimImageHandlerFactoryBase
+{
+public:
+   ossimPointCloudImageHandlerFactory() {}
+   virtual ~ossimPointCloudImageHandlerFactory();
+
+   static ossimPointCloudImageHandlerFactory* instance();
+
+   virtual ossimImageHandler* open(const ossimFilename& fileName,
+                                   bool openOverview=true) const;
+   virtual ossimImageHandler* open(const ossimKeywordlist& kwl,
+                                   const char* prefix=0) const;
+
+   virtual void
+   getSupportedExtensions(ossimImageHandlerFactoryBase::UniqueStringList& extensionList) const;
+
+   virtual ossimRefPtr<ossimImageHandler> openOverview(const ossimFilename& file ) const;
+
+   virtual ossimObject* createObject(const ossimString& typeName)const;
+
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
+                                     const char* prefix=0)const;
+
+   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
+   virtual void getImageHandlersBySuffix(ossimImageHandlerFactoryBase::ImageHandlerList& result, const ossimString& ext)const;
+   virtual void getImageHandlersByMimeType(ossimImageHandlerFactoryBase::ImageHandlerList& result, const ossimString& mimeType)const;
+
+
+private:
+   static ossimPointCloudImageHandlerFactory* m_instance;
+
+   TYPE_DATA
+
+};
+
+#endif /* OSSIM_PLUGINS_PDAL_ossimPointCloudImageHandlerFactory_H_ */
diff --git a/ossim/include/ossim/point_cloud/ossimPointCloudSource.h b/ossim/include/ossim/point_cloud/ossimPointCloudSource.h
new file mode 100644
index 0000000..d74cb84
--- /dev/null
+++ b/ossim/include/ossim/point_cloud/ossimPointCloudSource.h
@@ -0,0 +1,84 @@
+//**************************************************************************************************
+//
+// OSSIM (http://trac.osgeo.org/ossim/)
+//
+// License: MIT
+//
+//**************************************************************************************************
+#ifndef ossimPointCloudSource_HEADER
+#define ossimPointCloudSource_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h> /* for ossim::isnan */
+#include <ossim/base/ossimSource.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimGrect.h>
+#include <ossim/point_cloud/ossimPointBlock.h>
+#include <ossim/point_cloud/ossimPointRecord.h>
+#include <vector>
+
+/***************************************************************************************************
+ * Base class for all Point Cloud data sources, including input file handlers and processing nodes.
+ **************************************************************************************************/
+class OSSIMDLLEXPORT ossimPointCloudSource: public ossimSource
+{
+public:
+   ossimPointCloudSource(ossimObject* owner = 0);
+   virtual ~ossimPointCloudSource();
+
+   /**
+    * Fetches the block of points inside the block bounds. If the height components of the bounds
+    * are NaN, then only the horizontal bounds are considered. Thread-safe version accepts data
+    * block object from caller.
+    */
+   virtual void getBlock(const ossimGrect& bounds, ossimPointBlock& block) const = 0;
+
+   /**
+    * Returns the total number of points in the dataset (not just the block returned in getPoints)
+    */
+   virtual ossim_uint32 getNumPoints() const = 0;
+
+   /**
+    * Assigns the two points with fields representing the extremes of the dataset. Useful for
+    * normalizing and establishing bounds.
+    */
+   virtual const ossimPointRecord*  getMinPoint() const;
+   virtual const ossimPointRecord*  getMaxPoint() const;
+
+   /**
+    * Fetches the data fields ids available from this source, OR'd together for testing against
+    * specific field (@see ossimPointRecord::FIELD_CODES). e.g. (though should use hasField()),
+    *
+    * bool hasIntensity = getFields() & ossimPointRecord::Intensity;
+    */
+   virtual ossim_uint32 getFieldCode() const;
+
+   /**
+    * Sets the data fields ID of interest for this source, and all input sources connected to this.
+    * This is an OR'd mash-up of @see ossimPointRecord::FIELD_CODES
+    */
+   virtual void setFieldCode (ossim_uint32 fieldCode);
+
+   /**
+    * Returns true if the data field is available from this source. The argument can be OR'd
+    * together for testing multiple fileds simultaneously. Example:
+    *
+    * bool hasRGB = hasField(ossimPointRecord::Red|ossimPointRecord::Green|ossimPointRecord::Blue);
+    */
+   virtual bool hasFields(ossim_uint32 id) const { return getFieldCode()&id; }
+
+   /** Special for convenience */
+   bool hasRGB() const
+   { return hasFields(ossimPointRecord::Red|ossimPointRecord::Green|ossimPointRecord::Blue); }
+
+   virtual bool canConnectMyInputTo(ossim_int32, const ossimConnectableObject*) const;
+
+protected:
+   ossimPointCloudSource(const ossimPointCloudSource& rhs);
+   ossimPointRecord m_nullPCR;
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimPointCloudSource_HEADER */
+
diff --git a/ossim/include/ossim/point_cloud/ossimPointRecord.h b/ossim/include/ossim/point_cloud/ossimPointRecord.h
new file mode 100644
index 0000000..f7cc449
--- /dev/null
+++ b/ossim/include/ossim/point_cloud/ossimPointRecord.h
@@ -0,0 +1,91 @@
+//**************************************************************************************************
+//
+// OSSIM (http://trac.osgeo.org/ossim/)
+//
+// License: MIT
+//
+//**************************************************************************************************
+// $Id: ossimPointRecord.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimPointCloudRecord_HEADER
+#define ossimPointCloudRecord_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/base/ossimGpt.h>
+#include <vector>
+#include <map>
+
+/***************************************************************************************************
+ * This class represents a single sample (point) in a point cloud.
+ **************************************************************************************************/
+class OSSIMDLLEXPORT ossimPointRecord : public ossimReferenced
+{
+public:
+   // Field codes intended to be OR'd to indicate fields present in point record. All point records
+   // have at least an X, Y, Z position so those fields are implied.
+   enum FIELD_CODES // and associated types
+   {
+      Intensity       = 0x0008, // float 32
+      ReturnNumber    = 0x0010, // unsigned int 32
+      NumberOfReturns = 0x0020, // unsigned int 32
+      Red             = 0x0040, // float 32
+      Green           = 0x0080, // float 32
+      Blue            = 0x0100, // float 32
+      GpsTime         = 0x0200, // unsigned long Unix epoch (microsec from 01/01/1970)
+      Infrared        = 0x0400, // float 32
+      All             = 0x0777
+   };
+
+   ossimPointRecord(ossim_uint32 fields_code=0);
+   ossimPointRecord(const ossimPointRecord& pcr);
+   ossimPointRecord(const ossimGpt& pos);
+
+   /** Creates a point record with fields set to null values */
+   ~ossimPointRecord();
+
+   ossimPointRecord& operator=(const ossimPointRecord& pcr);
+
+   ossim_uint32 getPointId() const { return m_pointId; }
+   void         setPointId(ossim_uint32 id) {m_pointId = id; }
+
+   /**
+    * Returns the 3D position vector in the dataset's coodinate reference system (available from
+    * the ossimPointCloudSource object. This is either map/meters (x, y, z) or geog (lat, lon, hgt).
+    * Refer to the ossimPointCloudGeometry::getStoredPosFormat() available from the associated
+    * ossimPointCloudSource->getGeometry()
+    */
+   const ossimGpt& getPosition() const { return m_position; }
+   void setPosition(const ossimGpt& p)  { m_position = p; }
+
+   /** Argument can be mash-up of OR'd codes for check of multiple fields. Returns TRUE if ALL
+    * fields are present. */
+   virtual bool hasFields(ossim_uint32 code_mashup) const;
+
+   /** Returns mash-up of OR'd codes of multiple fields being stored*/
+   virtual ossim_uint32 getFieldCode() const;
+
+   /** Return the float value of the requested field */
+   ossim_float32 getField(FIELD_CODES fc) const;
+
+   const std::map<FIELD_CODES, ossim_float32>& getFieldMap() const { return m_fieldMap; }
+
+   void setField(FIELD_CODES fc, ossim_float32 value);
+
+   friend std::ostream& operator << (std::ostream& ostr, const ossimPointRecord& p);
+
+   /**
+    * Initializes point to undefined state:
+    */
+   void clear();
+   bool isValid() const;
+
+protected:
+   ossim_uint32 m_pointId;
+   ossimGpt     m_position;
+   std::map<FIELD_CODES, ossim_float32> m_fieldMap;
+};
+
+#endif /* ossimPointCloudRecord_HEADER */
+
diff --git a/ossim/include/ossim/projection/ossimAdjMapModel.h b/ossim/include/ossim/projection/ossimAdjMapModel.h
new file mode 100644
index 0000000..c9b0949
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimAdjMapModel.h
@@ -0,0 +1,138 @@
+//----------------------------------------------------------------------------
+// Copyright (c) 2005, Oscar Kramer, all rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Oscar Kramer
+//
+// Description:
+// 
+// Special "sensor model" that provides a conventional map projection but
+// with additional capability for adjusting the map x,y coordinates with
+// offset, scale, and rotation transform.  Funtions to control notifications,
+// information and error output.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimAdjMapModel.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimAdjMapModel_HEADER
+#define ossimAdjMapModel_HEADER
+
+#include <ossim/matrix/newmat.h>
+#include <ossim/projection/ossimSensorModel.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimRefPtr.h>
+
+using namespace NEWMAT;
+
+class ossimMapProjection;
+
+//----------------------------------------------------------------------------
+//  CLASS DESCRIPTION: ossimAdjMapModel
+//! Special "sensor model" that provides a conventional map projection but with
+//  additional
+//! capability for adjusting the map x,y coordinates with offset, scale, and
+//  rotation transform.
+//----------------------------------------------------------------------------
+class OSSIMDLLEXPORT ossimAdjMapModel : public ossimSensorModel
+{
+public:
+   //! Constructs to uninitialized state (needed by factory).
+   ossimAdjMapModel();
+
+   //! Constructs with map projection and image rectangle size.
+   ossimAdjMapModel(ossimMapProjection* map_proj, const ossimIpt& image_size);
+
+   //! Copy constructor
+   ossimAdjMapModel(const ossimAdjMapModel& copy_this);
+
+   //! Constructs given geom KWL.
+   ossimAdjMapModel(const ossimKeywordlist& kwl, const char* prefix);
+
+   //! Constructs given geom filename.
+   ossimAdjMapModel(const ossimFilename& geom_filename);
+
+   //! Initializes base class data members after map model established.
+   //  Returns TRUE if all's well.
+   bool initializeFromMap();
+
+   //! Returns pointer to a new instance, copy of this.
+   virtual ossimObject* dup() const;
+   
+   //! Extends base-class implementation. Dumps contents of object to ostream.
+   virtual std::ostream& print(std::ostream& out) const;
+   
+   //! Fulfills ossimObject base-class pure virtuals. Loads and saves geometry
+   //! KWL files. Returns true if successful.
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0) const;
+   
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+   
+   //! Writes a template of geom keywords processed by loadState and saveState
+   //  to output stream.
+   static void writeGeomTemplate(ostream& os);
+   
+   //! Overrides base class pure virtual.
+   virtual void lineSampleHeightToWorld(const ossimDpt& image_point,
+                                        const double&   heightEllipsoid,
+                                        ossimGpt&       worldPoint) const;
+   
+   //! Overrides base class virtual.
+   virtual void lineSampleToWorld(const ossimDpt& image_point,
+                                  ossimGpt&       worldPoint) const;
+   
+   //! Rigorous inverse transform implented, overrides base-class' iterative
+   //  solution.
+   virtual void worldToLineSample(const ossimGpt& world_point,
+                                  ossimDpt&       image_point) const;
+      
+   //! Following a change to the adjustable parameter set, this virtual is
+   //  called to permit 
+   //! instances to compute derived quantities after parameter change.
+   virtual void updateModel();
+
+   //! Initializes adjustable parameters to their default values.
+   //! Overrides ossimAdjustableParameterInterface virtual method.
+   virtual void initAdjustableParameters();
+
+   //! Fetches the GSD from the internal map projection.
+   virtual ossimDpt 	getMetersPerPixel () const;
+
+   //! Enumeration for adjustable parameter positions in theAdjParams vector
+   enum AdjParamIndex
+   {
+      OFFSET_X = 0,         // meters
+      OFFSET_Y,             // meters
+      ROTATION,             // degrees CCW
+      SCALE_X,              // ratio
+      SCALE_Y,              // ratio
+      NUM_ADJ_PARAMS // not an index
+   };
+
+   /*!
+    * ossimOptimizableProjection
+    */
+   inline virtual bool useForward()const {return true;} //!ground to image faster (you don't need DEM)
+
+private:
+   //! Destructor only deletes the map projection.
+   virtual ~ossimAdjMapModel();
+   
+   //! This is the vector of UNNORMALIZED, BIASED parameters as used in the
+   //! model. The collection of normalized, 0-biased, parameters used in
+   //! registration are found in the
+   //! ossimAdjustableParameterInterface and related classes.
+   //!  The quantities here are computed given the base class quantities.
+   ColumnVector                    theAdjParams;
+
+   ossimRefPtr<ossimMapProjection> theMapProjection;
+   double                          theCosTheta;
+   double                          theSinTheta;
+
+TYPE_DATA
+};
+
+#endif /* End of "#ifndef ossimAdjMapModel_HEADER" */
+
diff --git a/include/ossim/projection/ossimAffineProjection.h b/ossim/include/ossim/projection/ossimAffineProjection.h
similarity index 100%
rename from include/ossim/projection/ossimAffineProjection.h
rename to ossim/include/ossim/projection/ossimAffineProjection.h
diff --git a/include/ossim/projection/ossimAlbersProjection.h b/ossim/include/ossim/projection/ossimAlbersProjection.h
similarity index 100%
rename from include/ossim/projection/ossimAlbersProjection.h
rename to ossim/include/ossim/projection/ossimAlbersProjection.h
diff --git a/include/ossim/projection/ossimAlphaSensor.h b/ossim/include/ossim/projection/ossimAlphaSensor.h
similarity index 100%
rename from include/ossim/projection/ossimAlphaSensor.h
rename to ossim/include/ossim/projection/ossimAlphaSensor.h
diff --git a/include/ossim/projection/ossimAlphaSensorHRI.h b/ossim/include/ossim/projection/ossimAlphaSensorHRI.h
similarity index 100%
rename from include/ossim/projection/ossimAlphaSensorHRI.h
rename to ossim/include/ossim/projection/ossimAlphaSensorHRI.h
diff --git a/include/ossim/projection/ossimAlphaSensorHSI.h b/ossim/include/ossim/projection/ossimAlphaSensorHSI.h
similarity index 100%
rename from include/ossim/projection/ossimAlphaSensorHSI.h
rename to ossim/include/ossim/projection/ossimAlphaSensorHSI.h
diff --git a/ossim/include/ossim/projection/ossimApplanixEcefModel.h b/ossim/include/ossim/projection/ossimApplanixEcefModel.h
new file mode 100644
index 0000000..7cb1f9b
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimApplanixEcefModel.h
@@ -0,0 +1,102 @@
+//*******************************************************************
+// Copyright (C) 2005 Garrett Potts
+//
+// MIT
+// 
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimApplanixEcefModel.h 23666 2015-12-14 20:01:22Z rashadkm $
+#ifndef ossimApplanixEcefModel_HEADER
+#define ossimApplanixEcefModel_HEADER
+#include <ossim/projection/ossimFcsiModel.h>
+#include <ossim/projection/ossimMeanRadialLensDistortion.h>
+#include <ossim/base/ossimDpt3d.h>
+
+class OSSIM_DLL ossimApplanixEcefModel : public ossimSensorModel
+{
+public:
+   ossimApplanixEcefModel();
+   ossimApplanixEcefModel(const ossimDrect& imageRect, // center in image space
+                          const ossimGpt& platformPosition,
+                          double roll,
+                          double pitch,
+                          double heading,
+                          const ossimDpt& principalPoint, // in millimeters
+                          double focalLength, // in millimeters
+                          const ossimDpt& pixelSize); // in millimeters
+   ossimApplanixEcefModel(const ossimApplanixEcefModel& src);
+   virtual ossimObject* dup()const;
+   
+   virtual void imagingRay(const ossimDpt& image_point,
+                           ossimEcefRay&   image_ray) const;
+
+   void lineSampleToWorld(const ossimDpt& image_point,
+                          ossimGpt&       gpt) const;
+  
+   
+   virtual void lineSampleHeightToWorld(const ossimDpt& image_point,
+                                        const double&   heightEllipsoid,
+                                        ossimGpt&       worldPoint) const;
+   virtual void worldToLineSample(const ossimGpt& world_point,
+                                  ossimDpt&       image_point) const;
+   
+   virtual void updateModel();
+
+   void setPrincipalPoint(ossimDpt principalPoint);
+
+   virtual bool insideImage(const ossimDpt& p) const
+   {
+      /*          return( (p.u>=(0.0-FLT_EPSILON)) && */
+      /*                  (p.u<=(double)(theImageSize.u-(1-FLT_EPSILON))) && */
+      /*                  (p.v>=(0.0-FLT_EPSILON)) && */
+      /*                  (p.v<=(double)(theImageSize.v-(1-FLT_EPSILON))) ); */
+      // if it's close to the edge we will consider it inside the image
+      //
+      return theImageClipRect.pointWithin(p, theImageClipRect.width());
+   }
+
+
+   void setRollPitchHeading(double roll,
+                            double pitch,
+                            double heading);
+   
+   void setPixelSize(const ossimDpt& pixelSize);
+   void setImageRect(const ossimDrect& rect);
+   void setFocalLength(double focalLength);
+   void setPlatformPosition(const ossimGpt& gpt);
+
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0) const;
+   
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   virtual void initAdjustableParameters();
+   
+   /*!
+    * ossimOptimizableProjection
+    */
+//   inline virtual bool useForward()const {return true;} //!ground to image faster (you don't need DEM)
+   inline virtual bool useForward()const {return false;} //!ground to image faster (you don't need DEM)
+   virtual bool setupOptimizer(const ossimString& init_file); //!uses file path to init model
+
+protected:
+   
+   NEWMAT::Matrix theCompositeMatrix;
+   NEWMAT::Matrix theCompositeMatrixInverse;
+   double         theRoll;
+   double         thePitch;
+   double         theHeading;
+   ossimDpt       thePrincipalPoint;
+   ossimDpt       thePixelSize;
+   double         theFocalLength;
+   ossimEcefPoint theEcefPlatformPosition;
+   ossimRefPtr<ossimMeanRadialLensDistortion> theLensDistortion;
+
+
+   ossimEcefPoint theAdjEcefPlatformPosition;
+   
+TYPE_DATA
+};
+
+#endif
diff --git a/ossim/include/ossim/projection/ossimApplanixUtmModel.h b/ossim/include/ossim/projection/ossimApplanixUtmModel.h
new file mode 100644
index 0000000..25d3801
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimApplanixUtmModel.h
@@ -0,0 +1,83 @@
+//*******************************************************************
+// Copyright (C) 2005 Garrett Potts
+//
+// MIT
+// 
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimApplanixUtmModel.h 23666 2015-12-14 20:01:22Z rashadkm $
+#ifndef ossimApplanixUtmModel_HEADER
+#define ossimApplanixUtmModel_HEADER
+#include <ossim/projection/ossimFcsiModel.h>
+#include <ossim/projection/ossimMeanRadialLensDistortion.h>
+#include <ossim/base/ossimDpt3d.h>
+
+class OSSIM_DLL ossimApplanixUtmModel : public ossimSensorModel
+{
+public:
+   ossimApplanixUtmModel();
+   ossimApplanixUtmModel(const ossimApplanixUtmModel& src);
+   virtual ossimObject* dup()const;
+   
+   virtual void imagingRay(const ossimDpt& image_point,
+                           ossimEcefRay&   image_ray) const;
+
+   void lineSampleToWorld(const ossimDpt& image_point,
+                          ossimGpt&       gpt) const;
+  
+   virtual void lineSampleHeightToWorld(const ossimDpt& image_point,
+                                        const double&   heightEllipsoid,
+                                        ossimGpt&       worldPoint) const;
+   virtual void worldToLineSample(const ossimGpt& world_point,
+                                  ossimDpt&       image_point) const;
+   
+   virtual void updateModel();
+
+   void setPrincipalPoint(ossimDpt principalPoint);
+
+   void setPixelSize(const ossimDpt& pixelSize);
+   void setImageRect(const ossimDrect& rect);
+   void setFocalLength(double focalLength);
+   void setPlatformPosition(const ossimGpt& gpt);
+
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0) const;
+   
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   virtual void initAdjustableParameters();
+   
+   /*!
+    * ossimOptimizableProjection
+    */
+//   inline virtual bool useForward()const {return false;} 
+   inline virtual bool useForward()const {return true;} //!ground to image faster (you don't need DEM) //TBC
+   virtual bool setupOptimizer(const ossimString& init_file); //!uses file path to init model
+
+protected:
+   NEWMAT::Matrix theCompositeMatrix;
+   NEWMAT::Matrix theCompositeMatrixInverse;
+   double         theOmega;
+   double         thePhi;
+   double         theKappa;
+   double         theBoreSightTx;
+   double         theBoreSightTy;
+   double         theBoreSightTz;
+   ossimDpt       thePrincipalPoint;
+   ossimDpt       thePixelSize;
+   double         theFocalLength;
+   ossimEcefPoint theEcefPlatformPosition;
+   ossimGpt       thePlatformPosition;
+   ossim_int32    theUtmZone;
+   ossim_int8     theUtmHemisphere;
+   ossimDpt3d     theUtmPlatformPosition;
+   ossimEcefVector theShiftValues;
+   
+   ossimRefPtr<ossimMeanRadialLensDistortion> theLensDistortion;
+   ossimEcefPoint theAdjEcefPlatformPosition;
+
+TYPE_DATA
+};
+
+#endif
diff --git a/include/ossim/projection/ossimAzimEquDistProjection.h b/ossim/include/ossim/projection/ossimAzimEquDistProjection.h
similarity index 100%
rename from include/ossim/projection/ossimAzimEquDistProjection.h
rename to ossim/include/ossim/projection/ossimAzimEquDistProjection.h
diff --git a/include/ossim/projection/ossimBilinearProjection.h b/ossim/include/ossim/projection/ossimBilinearProjection.h
similarity index 100%
rename from include/ossim/projection/ossimBilinearProjection.h
rename to ossim/include/ossim/projection/ossimBilinearProjection.h
diff --git a/include/ossim/projection/ossimBngProjection.h b/ossim/include/ossim/projection/ossimBngProjection.h
similarity index 100%
rename from include/ossim/projection/ossimBngProjection.h
rename to ossim/include/ossim/projection/ossimBngProjection.h
diff --git a/include/ossim/projection/ossimBonneProjection.h b/ossim/include/ossim/projection/ossimBonneProjection.h
similarity index 100%
rename from include/ossim/projection/ossimBonneProjection.h
rename to ossim/include/ossim/projection/ossimBonneProjection.h
diff --git a/ossim/include/ossim/projection/ossimBuckeyeSensor.h b/ossim/include/ossim/projection/ossimBuckeyeSensor.h
new file mode 100644
index 0000000..b3be2f7
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimBuckeyeSensor.h
@@ -0,0 +1,146 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+// 
+//*******************************************************************
+//  $Id$
+#ifndef ossimBuckeyeSensor_HEADER
+#define ossimBuckeyeSensor_HEADER
+/**
+ * The Buckeye sensor has a set of simple orientation parameters.  For this model we are using the
+ * orientation parameters found in the MetaData_GSTI.txt file typically found in the directory where the
+ * imagery sits.
+ *
+ * There are 2 forms the class takes for keyword lists.  The first allows one to point
+ * to a file containing the frame numbers and all the orientation parameters. You will still
+ * need to define the Camera information and calibration parameters.  The pixel_size, 
+ * focal_length and principal point are all in millimeters. 
+ *
+ * <pre>
+ * EXAMPLE 1:
+ *
+ * type: ossimBuckeyeSensor
+ * framemeta_gsti: /data/buckeye/01-31 at 09/01-31 at 09/10-39-48/FrameMeta_GSTI.txt
+ * frame_number: 10001
+ * pixel_size: (0.0068,0.0068)
+ * focal_length: 211.0211
+ * principal_point: (-0.1853,1.2428)
+ * smac_radial: -.2165e-3 .4230e-7 -.1652e-11 .2860e-19 .5690e-26
+ * smac_decent: -.1483e-6 .1558e-6 -.1464e-18 .1233e-38
+ * rect: 0 0 7239 5432
+ *
+ *
+ * EXAMPLE 2:
+ * roll: 0.074405
+ * pitch: 2.849851
+ * yaw: 269.517649
+ * platform_position: (34.927014,69.353684,3757.12,WGE)
+ * pixel_size: (0.0068,0.0068)
+ * focal_length: 211.0211
+ * principal_point: (-0.1853,1.2428)
+ * smac_radial: -.2165e-3 .4230e-7 -.1652e-11 .2860e-19 .5690e-26
+ * smac_decent: -.1483e-6 .1558e-6 -.1464e-18 .1233e-38
+ * rect: 0 0 7239 5432
+ */
+#include <ossim/projection/ossimSensorModel.h>
+#include "ossimSmacCallibrationSystem.h"
+
+class OSSIM_DLL ossimBuckeyeSensor : public ossimSensorModel
+{
+public:
+   ossimBuckeyeSensor();
+   ossimBuckeyeSensor(const ossimDrect& imageRect, // center in image space
+                          const ossimGpt& platformPosition,
+                          double roll,
+                          double pitch,
+                          double heading,
+                          const ossimDpt& principalPoint, // in millimeters
+                          double focalLength, // in millimeters
+                          const ossimDpt& pixelSize); // in millimeters
+   ossimBuckeyeSensor(const ossimBuckeyeSensor& src);
+   virtual ossimObject* dup()const;
+   
+   virtual void imagingRay(const ossimDpt& image_point,
+                           ossimEcefRay&   image_ray) const;
+
+   void lineSampleToWorld(const ossimDpt& image_point,
+                          ossimGpt&       gpt) const;
+  
+   
+   virtual void lineSampleHeightToWorld(const ossimDpt& image_point,
+                                        const double&   heightEllipsoid,
+                                        ossimGpt&       worldPoint) const;
+   virtual void worldToLineSample(const ossimGpt& world_point,
+                                  ossimDpt&       image_point) const;
+   
+   virtual void updateModel();
+
+   void setPrincipalPoint(ossimDpt principalPoint);
+
+   virtual bool insideImage(const ossimDpt& p) const
+   {
+      return theImageClipRect.pointWithin(p, theImageClipRect.width());
+   }
+
+
+   void setRollPitchHeading(double roll,
+                            double pitch,
+                            double heading);
+   
+   void setPixelSize(const ossimDpt& pixelSize);
+   void setImageRect(const ossimDrect& rect);
+   void setFocalLength(double focalLength);
+   void setPlatformPosition(const ossimGpt& gpt);
+
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0) const;
+   
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   virtual void initAdjustableParameters();
+   
+   void setLensDistortion(ossimSmacCallibrationSystem* lensDistortion);
+   /*!
+    * ossimOptimizableProjection
+    */
+//   inline virtual bool useForward()const {return true;} //!ground to image faster (you don't need DEM)
+   inline virtual bool useForward()const {return false;} //!ground to image faster (you don't need DEM)
+   virtual bool setupOptimizer(const ossimString& init_file); //!uses file path to init model
+  
+   /**
+    * @brief Extracts geometry info from a non-ossim key,value pair 
+    * to an ossim keyword list.
+    *
+    * @param key non-ossim-based input ossimString 
+    * @param value non-ossim-based input ossimString
+    * @param geomKwl The keyword list to fill in.
+    */
+   virtual bool getImageGeometry( 
+      const ossimString& key, const ossimString& value, 
+      ossimKeywordlist& geomKwl ) const;
+
+protected:
+   
+   NEWMAT::Matrix theCompositeMatrix;
+   NEWMAT::Matrix theCompositeMatrixInverse;
+   double         theRoll;
+   double         thePitch;
+   double         theHeading;
+   ossimDpt       thePrincipalPoint;
+   ossimDpt       thePixelSize;
+   double         theFocalLength;
+   ossimEcefPoint theEcefPlatformPosition;
+   ossimRefPtr<ossimSmacCallibrationSystem> theLensDistortion;
+
+
+   ossimEcefPoint theAdjEcefPlatformPosition;
+   
+TYPE_DATA
+};
+
+#endif
diff --git a/ossim/include/ossim/projection/ossimCadrgProjection.h b/ossim/include/ossim/projection/ossimCadrgProjection.h
new file mode 100644
index 0000000..f0ba410
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimCadrgProjection.h
@@ -0,0 +1,91 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimCadrgProjection.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimCadrgProjection_HEADER
+#define ossimCadrgProjection_HEADER
+#include <ossim/projection/ossimMapProjection.h>
+
+class OSSIM_DLL ossimCadrgProjection : public ossimMapProjection
+{
+public:
+   ossimCadrgProjection();
+
+                       
+   virtual ossimObject *dup()const;
+   virtual ossimGpt inverse(const ossimDpt &eastingNorthing)const;
+   virtual ossimDpt forward(const ossimGpt &latLon)const;
+   
+   virtual ossimDpt worldToLineSample(const ossimGpt &worldPoint)    const;
+   virtual ossimGpt lineSampleToWorld(const ossimDpt &projectedPoint)const;
+   virtual void worldToLineSample(const ossimGpt &worldPoint,
+                                  ossimDpt&       lineSample)const;
+   virtual void lineSampleToWorld(const ossimDpt &projectedPoint,
+                                  ossimGpt& gpt)const;
+
+   double computeXPixConstant(double scale, long zone)const;
+   double computeYPixConstant(double scale)const;
+   /*!
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+   /*!
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   
+   ossimString getProjectionName()const
+      {
+         return getClassName();
+      }
+      
+   //! Returns TRUE if principal parameters are within epsilon tolerance.
+   virtual bool operator==(const ossimProjection& projection) const;
+
+protected:
+   virtual ~ossimCadrgProjection();
+   /*
+    * Are from the ADRG Mil spec for 1:1,000,000 and
+    * are scales for each zone.
+    */
+   static double theCadrgArcA[8];
+   
+
+   static double theOldZoneExtents[10];
+
+   static double theNorthLimit;
+   static double theSouthLimit;
+
+   ossim_int32   theCadrgZone;
+
+   ossimDpt thePixelConstant;
+   double   theMapScale;
+
+   double theWidth;
+   double theHeight;
+
+   ossimDpt theUlLineSample;
+
+   ossimGpt theUlGpt;
+   ossimGpt theLlGpt;
+   ossimGpt theLrGpt;
+   ossimGpt theUrGpt;
+   
+   void computeParameters();
+TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/projection/ossimCassiniProjection.h b/ossim/include/ossim/projection/ossimCassiniProjection.h
similarity index 100%
rename from include/ossim/projection/ossimCassiniProjection.h
rename to ossim/include/ossim/projection/ossimCassiniProjection.h
diff --git a/ossim/include/ossim/projection/ossimCoarseGridModel.h b/ossim/include/ossim/projection/ossimCoarseGridModel.h
new file mode 100644
index 0000000..17d754a
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimCoarseGridModel.h
@@ -0,0 +1,185 @@
+//*****************************************************************************
+// FILE: ossimCoarseGridModel.h
+//
+// Copyright (C) 2001 ImageLinks, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION:
+//   Contains declaration of class ossimCoarseGridModel. This is an
+//   implementation of an interpolation sensor model.
+//
+//*****************************************************************************
+//  $Id: ossimCoarseGridModel.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimCoarseGridModel_HEADER
+#define ossimCoarseGridModel_HEADER 1
+
+#include <ossim/projection/ossimSensorModel.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimDblGrid.h>
+#include <ossim/base/ossimFilename.h>
+
+class ossimImageGeometry;
+
+/******************************************************************************
+ *
+ * CLASS:  ossimCoarseGridModel
+ *
+ *****************************************************************************/
+class OSSIMDLLEXPORT ossimCoarseGridModel : public ossimSensorModel
+{
+public:
+   /**
+    * CONSTRUCTORS:
+    */
+   ossimCoarseGridModel();
+   ossimCoarseGridModel(const ossimCoarseGridModel& copy_this);
+
+   /**
+    * CONSTRUCTOR (filename)
+    * Accepts name of geometry file. This can be either MET ECG geom file, or
+    * OSSIM keywordlist geometry file.
+    */
+   ossimCoarseGridModel(const ossimFilename& geom_file);
+
+   /**
+    * CONSTRUCTOR (keywordlist)
+    * Accepts OSSIM keywordlist geometry file.
+    */
+   ossimCoarseGridModel(const ossimKeywordlist& geom_kwl);
+   
+   ~ossimCoarseGridModel();
+
+   /**
+    * This method will build a grid from any projector.
+    * The first argument must be the image space bounds for
+    * the projection.  The second argument is the projector
+    * that will be used to approximate a bilinear grid over.
+    *
+    * The accuracy of the grid can be controlled by the static method
+    * setInterpolationError.
+    */
+   virtual void buildGrid(const ossimDrect& imageBounds,
+                          ossimProjection* proj,
+                          double heightDelta=500.0,
+                          bool enableHeightFlag=false,
+                          bool makeAdjustableFlag=true);
+   virtual void buildGrid(const ossimDrect& imageBounds,
+                          ossimImageGeometry* geom,
+                          double heightDelta=500.0,
+                          bool enableHeightFlag=false,
+                          bool makeAdjustableFlag=true);
+   
+   /**
+    *  This is used when building a grid from a projector.
+    *  You can set the interpolation error.  The default is
+    *  subpixel accuracy (within .1 of a pixel).
+    */
+   static void setInterpolationError(double error=.1);
+   static void setMinGridSpacing(ossim_int32 minSpacing = 100);
+   /**
+    * METHOD: print()
+    * Extends base-class implementation. Dumps contents of object to ostream.
+    */
+   virtual std::ostream& print(std::ostream& out) const;
+   
+   /**
+    * METHODS:  saveState, loadState
+    * Fulfills ossimObject base-class pure virtuals. Loads and saves geometry
+    * KWL files. Returns true if successful.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0) const;
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+
+   /**
+    * STATIC METHOD: writeGeomTemplate(ostream)
+    * Writes a template of geometry keywords processed by loadState and
+    * saveState to output stream.
+    */
+   static void writeGeomTemplate(ostream& os);
+
+   /**
+    * METHOD: dup()
+    * Returns pointer to a new instance, copy of this.
+    */
+   virtual ossimObject* dup() const
+      { return new ossimCoarseGridModel(*this); }
+   
+   /**
+    * METHOD: saveCoarseGrid(), loadCoarseGrid()
+    * Saves/loads the coarse grid to/from the specified file. Returns true if
+    * successful.
+    */
+   bool saveCoarseGrid(const ossimFilename& cgFileName) const;
+   bool loadCoarseGrid(const ossimFilename& cgFileName);
+
+   virtual void imagingRay(const ossimDpt& image_point,
+                           ossimEcefRay&   image_ray) const;
+
+   
+   virtual void lineSampleToWorld(const ossimDpt& image_point,
+                                  ossimGpt&       gpt) const;
+   /**
+    * METHOD: lineSampleHeightToWorld(image_point, height, &ground_point)
+    * This is the virtual that performs the actual work of projecting
+    * the image point to the earth at some specified elevation.
+    */
+   virtual void lineSampleHeightToWorld(const ossimDpt& image_point,
+                                        const double&   heightEllipsoid,
+                                        ossimGpt&       world_pt) const;
+
+
+   virtual void initAdjustableParameters();
+
+   /*!
+    * ossimOptimizableProjection
+    */
+   inline virtual bool useForward()const {return false;} //!image to ground faster
+
+   /**
+    * @brief Overrides base  ossimSensorModel::isAffectedByElevation
+    * method.
+    * @return true if height enabled, false if not.
+    */
+   virtual bool isAffectedByElevation() const;
+   
+protected:
+   /**
+    * METHOD: reallocateGrid()
+    * Deletes existing allocated memory and reallocates
+    * new space. This may happen if a new grid is loaded over an existing one.
+    */
+   void reallocateGrid(const ossimIpt& size);
+   
+   //! Initializes base class data members after grids have been assigned.
+   void initializeModelParams(ossimIrect irect);
+
+   //! Implements its own extrapolation since this can be handled by ossimDblGrid.
+   virtual ossimGpt extrapolate (const ossimDpt& imgPt, const double& height=ossim::nan()) const;
+
+   /**
+    * Data Members:
+    */
+   mutable ossimFilename theGridFilename;
+   ossimDblGrid  theLatGrid;         // degrees
+   ossimDblGrid  theLonGrid;         // degrees
+   ossimDblGrid  theDlatDhGrid;      // degrees/meter
+   ossimDblGrid  theDlonDhGrid;      // degrees/meter
+   ossimDblGrid* theDlatDparamGrid;  // degrees/(units-of-param)
+   ossimDblGrid* theDlonDparamGrid;  // degrees/(units-of-param)
+
+   static double       theInterpolationError;
+   static ossim_int32  theMinGridSpacing;
+   ossimAdjustmentInfo theInitialAdjustment;
+   bool                theHeightEnabledFlag;
+   
+   TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/projection/ossimCylEquAreaProjection.h b/ossim/include/ossim/projection/ossimCylEquAreaProjection.h
similarity index 100%
rename from include/ossim/projection/ossimCylEquAreaProjection.h
rename to ossim/include/ossim/projection/ossimCylEquAreaProjection.h
diff --git a/include/ossim/projection/ossimEckert4Projection.h b/ossim/include/ossim/projection/ossimEckert4Projection.h
similarity index 100%
rename from include/ossim/projection/ossimEckert4Projection.h
rename to ossim/include/ossim/projection/ossimEckert4Projection.h
diff --git a/include/ossim/projection/ossimEckert6Projection.h b/ossim/include/ossim/projection/ossimEckert6Projection.h
similarity index 100%
rename from include/ossim/projection/ossimEckert6Projection.h
rename to ossim/include/ossim/projection/ossimEckert6Projection.h
diff --git a/ossim/include/ossim/projection/ossimEpsgProjectionDatabase.h b/ossim/include/ossim/projection/ossimEpsgProjectionDatabase.h
new file mode 100644
index 0000000..0859a77
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimEpsgProjectionDatabase.h
@@ -0,0 +1,132 @@
+//*************************************************************************************************
+//                          OSSIM -- Open Source Software Image Map
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Oscar Kramer
+//
+//*************************************************************************************************
+//  $Id: ossimEpsgProjectionDatabase.h 22924 2014-10-27 16:32:58Z okramer $
+
+#ifndef ossimEpsgProjectionDatabase_HEADER
+#define ossimEpsgProjectionDatabase_HEADER 1
+
+#include <ossim/projection/ossimProjectionFactoryBase.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <OpenThreads/Mutex>
+#include <fstream>
+
+
+class ossimProjection;
+class ossimString;
+class ossimEpsgProjectionFactory;
+class ossimUtmProjection;
+
+//*************************************************************************************************
+//! Projection Database for coded projections defined in database files and specified via some 
+//! coordinate reference system group:code, such as EPSG:26715.
+//*************************************************************************************************
+class OSSIMDLLEXPORT ossimEpsgProjectionDatabase : public ossimReferenced
+{
+   friend class ossimEpsgProjectionFactory;
+
+public:
+   //! Instantiates singleton instance of this class:
+   static ossimEpsgProjectionDatabase* instance();
+
+   //! Destructor
+   virtual ~ossimEpsgProjectionDatabase();
+
+   //! Returns a projection corresponding to the projection specified, or NULL if no entry found.
+   //! Normally <proj_spec> takes the form of <group>:<code> (e.g., "EPSG:26715"). Other forms 
+   //! accepted are <code> (assumed EPSG), or <proj_name> to match a name in the database.
+   ossimProjection* findProjection(const ossimString& proj_spec) const;
+
+   //! Returns a projection corresponding to the epsg code specified, or NULL if no entry found.
+   ossimProjection* findProjection(ossim_uint32 epsg_code) const;
+
+   //! Given a projection name, assigns the group (e.g., "EPSG") and code of the projection. 
+   //! Returns integer EPSG code if match was found or 0 if not found.
+   ossim_uint32 findProjectionCode(const ossimString& projection_name) const;
+
+   //! Given a projection instance, this method determines the corresponding EPSG code. Obviously
+   //! this is only needed if the projection does not have its PCS code assigned (it is NULL). This
+   //! happens when the projection was constructed with full parameters instead of the EPSG code.
+   //! Returns integer EPSG code if match was found or 0 if not found.
+   ossim_uint32 findProjectionCode(const ossimMapProjection& lost_proj) const;
+
+   //! ### NECESSARY HACK ### (originally implemented by ESH)
+   //! ArcMap (9.2 and less) doesn't understand the non-meters HARN codes.  
+   //! This method provides acess to the projection name given the EPSG code. The name provides 
+   //! enough info for recognizing a non-meters HARN-based projection. 
+   ossimString findProjectionName(ossim_uint32 epsg_code) const;
+
+   //! Populates caller's list with all projections currently represented in the database.
+   //! The format is: 
+   //!    EPSG:<code>  "<Name as appears in Db>"
+   //! There may be duplicate entries if the projection is duplicated in the various Db files.
+   void getProjectionsList(std::vector<ossimString>& typeList) const;
+
+   //! ENGINEERING CODE. Used for testing
+   size_t numRecords() const { return m_projDatabase.size(); }
+
+protected:
+   enum RecordFormat
+   {  
+      NOT_ASSIGNED=0,
+      FORMAT_A,
+      FORMAT_B,
+      FORMAT_C,
+      CUSTOM
+   };
+
+   //! Type for database record consists of EPSG code and serialized form of corresponding OSSIM 
+   //! projection (as a keywordlist)
+   class ProjDbRecord : public ossimReferenced
+   {
+   public:
+      ProjDbRecord() : 
+            code(0), 
+            name(""), 
+            datumValid(false), 
+            csvFormat(NOT_ASSIGNED), 
+            proj(0) {}
+
+      ossim_uint32     code;
+      ossimString      name;
+      bool             datumValid; //!< FALSE if the datum code was not parsed and WGS84 defaulted
+      RecordFormat     csvFormat;
+      std::vector<ossimString>        csvRecord;
+      ossimRefPtr<ossimMapProjection> proj;
+   };
+
+   //! Constructor loads all Db files specified in the ossim prefs. Protected as part of
+   //! singleton implementation.
+   ossimEpsgProjectionDatabase();
+
+   //! Parses the "Spadac EPSG" Db record format and produces a projection (or NULL if invalid)   
+   ossimMapProjection* createProjFromFormatARecord(ProjDbRecord* record) const;
+
+   //! Parses the State Plane Db record format and produce a projection (or NULL if invalid)
+   ossimMapProjection* createProjFromFormatBRecord(ProjDbRecord* record) const;
+
+   //!  ### HACK ###
+   //! UTM projections as specified in the EPSG are indistinguishable from regular TM.
+   //! Unfortunately OSSIM does make a distinction. For the time being, parse the code and
+   //! programmatically arrives at the UTM projection.
+   ossimMapProjection* createProjFromUtmCode(ossim_uint32 code) const;
+
+   //! Given UTM projection, derives the associated EPSG code. This is faster than a Db lookup.
+   ossim_uint32 getCodeFromUtmProj(const ossimUtmProjection* proj) const;
+
+   //! Populates the database with contents of DB files as specified in ossim_preferences.
+   void initialize() const;
+
+   mutable std::multimap<ossim_uint32, ossimRefPtr<ProjDbRecord> > m_projDatabase;
+   mutable OpenThreads::Mutex m_mutex;
+   //static ossimEpsgProjectionDatabase*  m_instance; //!< Singleton implementation
+   
+};
+
+#endif
diff --git a/ossim/include/ossim/projection/ossimEpsgProjectionFactory.h b/ossim/include/ossim/projection/ossimEpsgProjectionFactory.h
new file mode 100644
index 0000000..971836e
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimEpsgProjectionFactory.h
@@ -0,0 +1,77 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author:  Oscar Kramer
+//
+//*******************************************************************
+//  $Id: ossimEpsgProjectionFactory.h 12081 2007-11-26 21:44:18Z dburken $
+
+#ifndef ossimEpsgProjectionFactory_HEADER
+#define ossimEpsgProjectionFactory_HEADER
+
+#include <ossim/projection/ossimEpsgProjectionDatabase.h>
+#include <ossim/projection/ossimProjectionFactoryBase.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimRefPtr.h>
+
+class ossimProjection;
+class ossimString;
+class ossimMapProjection;
+
+//*************************************************************************************************
+//! Projection Factory for coded projections defined in database. These are projections
+//! that are fully defined in database files and specified via a projection coordinate system (PCS)
+//! code, such as EPSG codes.
+//*************************************************************************************************
+class OSSIMDLLEXPORT ossimEpsgProjectionFactory : public ossimProjectionFactoryBase
+{
+public:
+   /*!
+    * METHOD: instance()
+    * Instantiates singleton instance of this class:
+    */
+   static ossimEpsgProjectionFactory* instance();
+
+   virtual ossimProjection* createProjection(const ossimFilename& filename,
+                                             ossim_uint32 entryIdx) const;
+
+   //! This is the principal factory method. It accepts a string in one of three formats:
+   //!
+   //!   1. <group>:<code>, for example "EPSG:32615"
+   //!   2. <code>, for example "32615", this is the CRS code ID for the projerection.
+   //!   3. AUTO:<comma-separated spec>, for specifying custom user-defined codes.
+   //!
+   //! Both projected and geographic (Platte Carre) codes are handled.
+   virtual ossimProjection* createProjection(const ossimString& name) const;
+
+   //! Looks for presence of "pcs_code" keyword with the value in the format <group>:<code>,
+   //! for example "EPSG:32615" (EPSG and AUTO--see above-- are presently supported).
+   //! If only an integer is specified, EPSG code is assumed.
+   virtual ossimProjection* createProjection(const ossimKeywordlist& kwl,
+                                             const char* prefix = 0)const;
+
+   virtual ossimObject* createObject(const ossimString& typeName)const;
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl, const char* prefix=0)const;
+   
+    //! This returns the type name of all objects in all factories. This is the name used to 
+    //! construct the objects dynamically and this name must be unique.
+   virtual void getTypeNameList(std::vector<ossimString>& typeList) const;
+
+protected:
+   //! Constructor loads all SRS CSV files specified in the ossim prefs. Protected as part of
+   //! singleton implementation.
+   ossimEpsgProjectionFactory();
+
+   //! When the CRS is specified with the "AUTO:<spec>" code format, this method is invoked to
+   //! parse the <spec> and produce a projection (or NULL if spec invalid):
+   //! This really shouldn't be in this class but nobody else is parsing for it, so leave it here 
+   //! for now.
+   ossimMapProjection* createProjFromAutoCode(const std::vector<ossimString>& spec) const;
+
+   //ossimRefPtr<ossimEpsgProjectionDatabase>    m_projDatabase;
+   //static ossimEpsgProjectionFactory*  m_instance; //!< Singleton implementation
+ 
+};
+
+#endif
diff --git a/ossim/include/ossim/projection/ossimEquDistCylProjection.h b/ossim/include/ossim/projection/ossimEquDistCylProjection.h
new file mode 100644
index 0000000..f2c0e52
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimEquDistCylProjection.h
@@ -0,0 +1,223 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author:  Garrett Potts
+//
+// Description:
+//
+// Calls Geotrans Equidistant Cylinder projection code.  
+//*******************************************************************
+//  $Id: ossimEquDistCylProjection.h 23373 2015-06-13 17:16:38Z okramer $
+
+#ifndef ossimEquDistCylProjection_HEADER
+#define ossimEquDistCylProjection_HEADER
+
+#include <ossim/projection/ossimLlxyProjection.h>
+
+class ossimIpt;
+
+class OSSIMDLLEXPORT ossimEquDistCylProjection : public ossimMapProjection//public ossimLlxyProjection
+{
+public:
+   ossimEquDistCylProjection(const ossimEllipsoid& ellipsoid = ossimEllipsoid(),
+                             const ossimGpt& origin = ossimGpt());
+   ossimEquDistCylProjection(const ossimEllipsoid& ellipsoid,
+                             const ossimGpt& origin,
+                             double falseEasting,
+                             double falseNorthing);
+   
+   ossimEquDistCylProjection(const ossimEquDistCylProjection& rhs)
+     :ossimMapProjection(rhs)
+     //      :ossimLlxyProjection(rhs)
+      {
+         *this = rhs;
+      }
+   
+   ~ossimEquDistCylProjection(){}
+   virtual ossimObject *dup()const
+      {
+         return new ossimEquDistCylProjection(*this);
+      }
+   
+   virtual ossimGpt inverse(const ossimDpt &eastingNorthing)const;
+   virtual ossimDpt forward(const ossimGpt &latLon)const;
+   virtual void update();
+
+   /*!
+    * This method needs to be overridden here because of bug that causes bad projections if the
+    * origin is set without reseting the tiepoint. (OLK Jun2015)
+    */
+   virtual void setOrigin(const ossimGpt& origin);
+
+   /*!
+    * SetFalseEasting.  The value is in meters.
+    * Update is then called so we can pre-compute paramters
+    */
+   void setFalseEasting(double falseEasting);
+
+   /*!
+    * SetFalseNorthing.  The value is in meters.
+    * Update is then called so we can pre-compute paramters
+    */
+   void setFalseNorthing(double falseNorthing);
+
+   /*!
+    * Sets both false easting and northing values.  The values are
+    * expected to be in meters.
+    * Update is then called so we can pre-compute paramters
+    */
+   void setFalseEastingNorthing(double falseEasting, double falseNorthing);
+
+   double getFalseEasting()const{return Eqcy_False_Easting;}
+   double getFalseNorthing()const{return Eqcy_False_Northing;}
+   
+   virtual void lineSampleHeightToWorld(const ossimDpt& lineSampPt,
+                                        const double&   heightAboveEllipsoid,
+                                        ossimGpt&       worldPt) const;
+   virtual void     worldToLineSample(const ossimGpt &worldPoint,
+                                      ossimDpt&       lineSample)const;
+
+   /**
+    * @brief Specialized worldToLineSample.
+    * 
+    * Takes into consideration the image size and crossing the date line.
+    * Also makes local points outside of image negative or positive based on
+    * there relative closeness to left or right edge.
+    *
+    * @param worldPoint Ground point to convert to line sample.
+    * @param imageSize Size of image in pixels.
+    * @param lineSample Initialized by this.
+    */
+   void worldToLineSample( const ossimGpt& worldPoint,
+                           const ossimIpt& imageSize,
+                           ossimDpt&       lineSample ) const;
+   
+   virtual bool isGeographic()const
+   {
+      return true;
+   }
+   void setDefaults();
+
+   /*!
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+   /*!
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+private:   
+   //---------------------GEOTRANS-------------------------------
+   mutable double Eqcy_a;                  /* Semi-major axis of ellipsoid in meters */
+   mutable double Eqcy_f;          /* Flattening of ellipsoid */
+   mutable double es2;         /* Eccentricity (0.08181919084262188000) squared         */
+   mutable double es4;          /* es2 * es2	 */
+   mutable double es6;          /* es4 * es2  */
+   mutable double Ra;                /* Spherical Radius  */
+   
+/* Equidistant Cylindrical projection Parameters */
+   mutable double Eqcy_Std_Parallel;             /* Latitude of standard parallel in radians     */
+   mutable double Cos_Eqcy_Std_Parallel;         /* cos(Eqcy_Std_Parallel)  */
+   mutable double Eqcy_Origin_Long;              /* Longitude of origin in radians    */
+   mutable double Eqcy_False_Easting;
+   mutable double Eqcy_False_Northing;
+   mutable double Eqcy_Delta_Northing;
+   mutable double Eqcy_Max_Easting;
+   mutable double Eqcy_Min_Easting;
+   mutable double Ra_Cos_Eqcy_Std_Parallel; /* Ra * Cos_Eqcy_Std_Parallel */
+
+/*!
+ * The function Set_Equidistant_Cyl_Parameters receives the ellipsoid parameters and
+ * projection parameters as inputs, and sets the corresponding state
+ * variables.  It also calculates the spherical radius of the sphere having 
+ * the same area as the ellipsoid.  If any errors occur, the error code(s) 
+ * are returned by the function, otherwise EQCY_NO_ERROR is returned.
+ *
+ *    a                 : Semi-major axis of ellipsoid, in meters   (input)
+ *    f                 : Flattening of ellipsoid						        (input)
+ *    Std_Parallel      : Latitude in radians at which the          (input)
+ *                          point scale factor is 1.0
+ *    Central_Meridian  : Longitude in radians at the center of     (input)
+ *                          the projection
+ *    False_Easting     : A coordinate value in meters assigned to the
+ *                          central meridian of the projection.     (input)
+ *    False_Northing    : A coordinate value in meters assigned to the
+ *                          standard parallel of the projection     (input)
+ */
+  long Set_Equidistant_Cyl_Parameters(double a,
+                                      double f,
+                                      double Std_Parallel,
+                                      double Central_Meridian,
+                                      double False_Easting,
+                                      double False_Northing);
+
+
+/*!
+ * The function Get_Equidistant_Cyl_Parameters returns the current ellipsoid
+ * parameters and Equidistant Cylindrical projection parameters.
+ *
+ *    a                 : Semi-major axis of ellipsoid, in meters   (output)
+ *    f                 : Flattening of ellipsoid						        (output)
+ *    Std_Parallel      : Latitude in radians at which the          (output)
+ *                          point scale factor is 1.0
+ *    Central_Meridian  : Longitude in radians at the center of     (output)
+ *                          the projection
+ *    False_Easting     : A coordinate value in meters assigned to the
+ *                          central meridian of the projection.     (output)
+ *    False_Northing    : A coordinate value in meters assigned to the
+ *                          standard parallel of the projection     (output)
+ */
+  void Get_Equidistant_Cyl_Parameters(double *a,
+                                      double *f,
+                                      double *Std_Parallel,
+                                      double *Central_Meridian,
+                                      double *False_Easting,
+                                      double *False_Northing)const;
+
+
+/*!
+ * The function Convert_Geodetic_To_Equidistant_Cyl converts geodetic (latitude and
+ * longitude) coordinates to Equidistant Cylindrical projection easting, and northing
+ * coordinates, according to the current ellipsoid and Equidistant Cylindrical projection
+ * parameters.  If any errors occur, the error code(s) are returned by the
+ * function, otherwise EQCY_NO_ERROR is returned.
+ *
+ *    Latitude          : Latitude (phi) in radians           (input)
+ *    Longitude         : Longitude (lambda) in radians       (input)
+ *    Easting           : Easting (X) in meters               (output)
+ *    Northing          : Northing (Y) in meters              (output)
+ */
+  long Convert_Geodetic_To_Equidistant_Cyl (double Latitude,
+                                            double Longitude,
+                                            double *Easting,
+                                            double *Northing)const;
+
+
+/*!
+ * The function Convert_Equidistant_Cyl_To_Geodetic converts Equidistant Cylindrical projection
+ * easting and northing coordinates to geodetic (latitude and longitude)
+ * coordinates, according to the current ellipsoid and Equidistant Cylindrical projection
+ * coordinates.  If any errors occur, the error code(s) are returned by the
+ * function, otherwise EQCY_NO_ERROR is returned.
+ *
+ *    Easting           : Easting (X) in meters                  (input)
+ *    Northing          : Northing (Y) in meters                 (input)
+ *    Latitude          : Latitude (phi) in radians              (output)
+ *    Longitude         : Longitude (lambda) in radians          (output)
+ */
+  long Convert_Equidistant_Cyl_To_Geodetic(double Easting,
+                                           double Northing,
+                                           double *Latitude,
+                                           double *Longitude)const;
+
+TYPE_DATA
+};
+
+#endif
diff --git a/include/ossim/projection/ossimFcsiModel.h b/ossim/include/ossim/projection/ossimFcsiModel.h
similarity index 100%
rename from include/ossim/projection/ossimFcsiModel.h
rename to ossim/include/ossim/projection/ossimFcsiModel.h
diff --git a/include/ossim/projection/ossimGnomonicProjection.h b/ossim/include/ossim/projection/ossimGnomonicProjection.h
similarity index 100%
rename from include/ossim/projection/ossimGnomonicProjection.h
rename to ossim/include/ossim/projection/ossimGnomonicProjection.h
diff --git a/ossim/include/ossim/projection/ossimGoogleProjection.h b/ossim/include/ossim/projection/ossimGoogleProjection.h
new file mode 100644
index 0000000..d14a98d
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimGoogleProjection.h
@@ -0,0 +1,35 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+//
+//*******************************************************************
+#ifndef ossimGoogleProjection_HEADER
+#define ossimGoogleProjection_HEADER 1
+#include <ossim/projection/ossimMapProjection.h>
+
+class OSSIM_DLL ossimGoogleProjection : public ossimMapProjection
+{
+public:
+   ossimGoogleProjection(const ossimEllipsoid& ellipsoid = ossimEllipsoid(),
+                        const ossimGpt& origin = ossimGpt());
+   ossimGoogleProjection(const ossimGoogleProjection&);
+   ~ossimGoogleProjection();
+   virtual ossimObject *dup()const{return new ossimGoogleProjection(*this);}
+
+   virtual ossimDpt forward(const ossimGpt &worldPoint)    const;
+   virtual ossimGpt inverse(const ossimDpt &projectedPoint)const;
+   virtual void update();
+
+	virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+	virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
+   virtual bool operator==(const ossimProjection& projection) const;
+
+protected:
+
+	TYPE_DATA;
+};
+#endif
+
diff --git a/ossim/include/ossim/projection/ossimIkonosRpcModel.h b/ossim/include/ossim/projection/ossimIkonosRpcModel.h
new file mode 100644
index 0000000..d0282d1
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimIkonosRpcModel.h
@@ -0,0 +1,77 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Contains declaration of class ossimIkonosRpcModel. This 
+//    derived class implements the capability of reading Ikonos RPC support
+//    data.
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimIkonosRpcModel.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimIkonosRpcModel_HEADER
+#define ossimIkonosRpcModel_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/projection/ossimRpcModel.h>
+#include <ossim/support_data/ossimIkonosMetaData.h>
+
+class ossimFilename;
+
+/*!****************************************************************************
+ *
+ * CLASS:  ossimIkonosRpcModel
+ *
+ *****************************************************************************/
+class OSSIM_DLL ossimIkonosRpcModel : public ossimRpcModel
+{
+public:
+  ossimIkonosRpcModel();
+   ossimIkonosRpcModel(const ossimFilename& geom_file);
+
+   ossimIkonosRpcModel(const ossimFilename& metadata,
+                       const ossimFilename& rpcdata);
+
+  virtual bool saveState(ossimKeywordlist& kwl,
+			 const char* prefix=0)const;
+
+  /**
+    * @brief loadState
+    * Fulfills ossimObject base-class pure virtuals. Loads and saves geometry
+    * KWL files. Returns true if successful.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+  
+   /*!
+    * STATIC METHOD: writeGeomTemplate(ostream)
+    * Writes a template of an ossimIkonosRpcModel geometry file.
+    */
+   static void writeGeomTemplate(ostream& os);
+
+   virtual bool parseFile(const ossimFilename& file);
+   
+protected:
+   virtual ~ossimIkonosRpcModel();
+   void finishConstruction();
+   void parseMetaData(const ossimFilename& metadata);
+   void parseRpcData (const ossimFilename& rpcdata);
+
+   bool isNitf(const ossimFilename& filename);
+   bool parseTiffFile(const ossimFilename& filename);
+/*    bool parseNitfFile(const ossimFilename& geom_file); */
+   bool parseHdrData(const ossimFilename& data_file);
+
+   ossimRefPtr<ossimIkonosMetaData> theSupportData;
+
+   TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/projection/ossimImageProjectionModel.h b/ossim/include/ossim/projection/ossimImageProjectionModel.h
new file mode 100644
index 0000000..c67964a
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimImageProjectionModel.h
@@ -0,0 +1,62 @@
+//-----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Class declaration of ossimImageProjectionModel.
+//
+//-----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimImageProjectionModel_HEADER
+#define ossimImageProjectionModel_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimRtti.h>
+#include <ossim/imaging/ossimImageModel.h>
+
+class ossimProjection;
+
+/**
+ * @brief Class derived from ossimImageModel, this adds an image projection
+ * for lineSampleToWorld and worldToLineSample.
+ *
+ * Note that image points fed to projection methods should be full
+ * resolution with any sub image offset applied.
+ */
+class OSSIM_DLL ossimImageProjectionModel : public ossimImageModel
+{
+public:
+   
+   /** @brief default constructor */
+   ossimImageProjectionModel();
+
+
+   /**
+    * @brief Method to initialize class from an image handler.
+    *
+    * @param ih Image handler.
+    */
+   virtual void initialize(const ossimImageHandler& ih);
+
+   /**
+    * @brief Method to get projection.
+    *
+    * @return Constant pointer to projection or 0 if not initialized.
+    */
+   const ossimProjection* getProjection() const;
+
+protected:
+   /** @brief virtual destructor */
+   virtual ~ossimImageProjectionModel();
+
+   ossimProjection* theProjection;
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimImageProjectionModel_HEADER */
+
diff --git a/ossim/include/ossim/projection/ossimImageViewAffineTransform.h b/ossim/include/ossim/projection/ossimImageViewAffineTransform.h
new file mode 100644
index 0000000..b576aba
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimImageViewAffineTransform.h
@@ -0,0 +1,188 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimImageViewAffineTransform.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimImageViewAffineTransform_HEADER
+#define ossimImageViewAffineTransform_HEADER
+#include <ossim/projection/ossimImageViewTransform.h>
+#include <ossim/matrix/newmat.h>
+
+class OSSIMDLLEXPORT ossimImageViewAffineTransform: public ossimImageViewTransform
+{
+public:
+   ossimImageViewAffineTransform(double rotateDegrees = 0.0,
+                                 double imageScaleX = 1.0,
+                                 double imageScaleY = 1.0,
+                                 double scaleXValue = 1.0,
+                                 double scaleYValue = 1.0,
+                                 double translateXValue = 0.0,
+                                 double translateYValue = 0.0,
+                                 double pivotXValue = 0.0,
+                                 double pivotYValue = 0.0 );
+   virtual ~ossimImageViewAffineTransform();
+   
+   ossimImageViewAffineTransform(const ossimImageViewAffineTransform& src)
+   :ossimImageViewTransform(src),
+   m_transform(src.m_transform),
+   m_inverseTransform(src.m_inverseTransform),
+   m_rotation(src.m_rotation),
+   m_imageSpaceScale(src.m_imageSpaceScale),
+   m_scale(src.m_scale),
+   m_translate(src.m_translate),
+   m_pivot(src.m_pivot)
+   {
+   }
+   virtual ossimObject* dup()const
+   {
+      return new ossimImageViewAffineTransform(*this);
+   }
+//   virtual void inverse(const ossimDpt& input,
+//                        ossimDpt&       output) const
+//   {
+//      viewToImage(input, output);
+ //  }
+   
+   virtual void imageToView(const ossimDpt& imagePoint,
+                            ossimDpt&       viewPoint)const;
+   virtual void viewToImage(const ossimDpt& viewPoint,
+                            ossimDpt&       imagePoint)const;
+   void setMatrix(NEWMAT::Matrix& matrix);
+   const NEWMAT::Matrix& getMatrix()const;
+   
+   virtual bool isIdentity()const
+   {
+      return ((m_transform[0][0] == 1.0)&&
+              (m_transform[0][1] == 0.0)&&
+              (m_transform[0][2] == 0.0)&&
+              (m_transform[1][0] == 0.0)&&
+              (m_transform[1][1] == 1.0)&&
+              (m_transform[1][2] == 0.0)&&
+              (m_transform[2][0] == 0.0)&&
+              (m_transform[2][1] == 0.0)&&
+              (m_transform[2][2] == 1.0));
+   }
+
+   virtual bool isValid()const;
+   virtual bool setView(ossimObject* obj);
+   virtual ossimObject* getView();
+   virtual const ossimObject* getView()const;
+   
+   /** @return (1, 1) ???????(drb) */
+   virtual ossimDpt getInputMetersPerPixel()const;
+
+   /** @return (nan, nan) ????????? (drb) */
+   virtual ossimDpt getOutputMetersPerPixel()const;
+   
+   /*!
+    * Translate in the x and y direction.
+    */ 
+   virtual void translate(double deltaX, double deltaY);
+   
+   /*!
+    * Translate in the x direction.
+    */
+   virtual void translateX(double deltaX);
+   
+   /*!
+    * Translate in the Y direction.
+    */
+   virtual void translateY(double deltaY);
+   
+   /*!
+    * Translate the origin for rotation in the x and y direction.
+    */
+   virtual void pivot(double originX, double originY);
+   
+   /*!
+    * Translate the origin for rotation in the x direction.
+    */
+   virtual void pivotX(double originX);
+   
+   /*!
+    * Translate the origin for rotation in the y direction.
+    */
+   virtual void pivotY(double originY);
+
+   /*!
+    * Will allow you to specify an image scale
+    * for both the x and y direction.
+    */
+   virtual void imageSpaceScale(double x, double y);
+   
+   /*!
+    * Will allow you to specify an image scale along the X direction.
+    */
+   virtual void imageSpaceScaleX(double x);
+
+   /*!
+    * Will allow you to an image scale along the Y direction.
+    */
+   virtual void imageSpaceScaleY(double y);
+    
+   /*!
+    * will allow you to specify a scale
+    * for both the x and y direction.
+    */
+   virtual void scale(double x, double y);
+    
+   /*!
+    * will alow you to specify a scale
+    * along the X direction.
+    */
+   virtual void scaleX(double x);
+   
+   /*!
+    * Will allow you to scale along the Y
+    * direction.
+    */
+   virtual void scaleY(double y);
+   
+   /*!
+    * Will apply a rotation
+    */
+   virtual void rotate(double degrees);
+   
+   ossim_float64 getRotation()const{return m_rotation;}
+   const ossimDpt& getScale()const{return m_scale;}
+   const ossimDpt& getTranslate()const{return m_translate;}
+   const ossimDpt& getPivot()const{return m_pivot;}
+   
+   
+   virtual bool isEqualTo(const ossimObject& obj, ossimCompareType compareType = OSSIM_COMPARE_FULL)const;
+   
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix =0);
+   
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix =0)const;
+   
+   
+protected:
+   void buildCompositeTransform();
+   
+   /*!
+    * This is the transformation from image to
+    * viewing coordinates.  If this matrix is
+    * changed it will perform an inverse to solve
+    * the inverse transform.
+    */
+   NEWMAT::Matrix m_transform;
+   NEWMAT::Matrix m_inverseTransform;
+   ossim_float64  m_rotation;
+   ossimDpt       m_imageSpaceScale;
+   ossimDpt       m_scale;
+   ossimDpt       m_translate;
+   ossimDpt       m_pivot;
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/projection/ossimImageViewProjectionTransform.h b/ossim/include/ossim/projection/ossimImageViewProjectionTransform.h
similarity index 100%
rename from include/ossim/projection/ossimImageViewProjectionTransform.h
rename to ossim/include/ossim/projection/ossimImageViewProjectionTransform.h
diff --git a/include/ossim/projection/ossimImageViewTransform.h b/ossim/include/ossim/projection/ossimImageViewTransform.h
similarity index 100%
rename from include/ossim/projection/ossimImageViewTransform.h
rename to ossim/include/ossim/projection/ossimImageViewTransform.h
diff --git a/include/ossim/projection/ossimImageViewTransformFactory.h b/ossim/include/ossim/projection/ossimImageViewTransformFactory.h
similarity index 100%
rename from include/ossim/projection/ossimImageViewTransformFactory.h
rename to ossim/include/ossim/projection/ossimImageViewTransformFactory.h
diff --git a/include/ossim/projection/ossimIpodSensor.h b/ossim/include/ossim/projection/ossimIpodSensor.h
similarity index 100%
rename from include/ossim/projection/ossimIpodSensor.h
rename to ossim/include/ossim/projection/ossimIpodSensor.h
diff --git a/include/ossim/projection/ossimLambertConformalConicProjection.h b/ossim/include/ossim/projection/ossimLambertConformalConicProjection.h
similarity index 100%
rename from include/ossim/projection/ossimLambertConformalConicProjection.h
rename to ossim/include/ossim/projection/ossimLambertConformalConicProjection.h
diff --git a/include/ossim/projection/ossimLandSatModel.h b/ossim/include/ossim/projection/ossimLandSatModel.h
similarity index 100%
rename from include/ossim/projection/ossimLandSatModel.h
rename to ossim/include/ossim/projection/ossimLandSatModel.h
diff --git a/ossim/include/ossim/projection/ossimLensDistortion.h b/ossim/include/ossim/projection/ossimLensDistortion.h
new file mode 100644
index 0000000..fce7ab8
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimLensDistortion.h
@@ -0,0 +1,52 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// MIT
+// 
+// Author:  Garrett Potts (gpotts at imagelinks.com)
+//
+// Description:
+//
+// ossimLensDistortion
+//*******************************************************************
+//  $Id: ossimLensDistortion.h 23666 2015-12-14 20:01:22Z rashadkm $
+
+#ifndef ossimLensDistortion_HEADER
+#define ossimLensDistortion_HEADER
+#include <ossim/base/ossim2dTo2dTransform.h>
+class OSSIM_DLL ossimLensDistortion : public ossim2dTo2dTransform
+{
+public:
+   ossimLensDistortion(const ossimDpt& callibratedCenter=ossimDpt(0,0))
+      :theCenter(callibratedCenter)
+   {
+   }
+   void setCenter(const ossimDpt& center)
+   {
+      theCenter = center;
+   }
+   virtual void forward(const ossimDpt& input,
+                        ossimDpt& output) const
+   {
+      distort(input, output);
+   }
+   virtual void inverse(const ossimDpt& input,
+                        ossimDpt& output)
+   {
+      undistort(input, output);
+   }
+   virtual void distort(const ossimDpt& input, ossimDpt& output)const;
+   virtual void undistort(const ossimDpt& input, ossimDpt& output)const=0;
+
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix = 0)const;
+   
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix = 0);
+   
+protected:
+   ossimDpt theCenter;
+
+TYPE_DATA   
+};
+#endif
diff --git a/include/ossim/projection/ossimLlxyProjection.h b/ossim/include/ossim/projection/ossimLlxyProjection.h
similarity index 100%
rename from include/ossim/projection/ossimLlxyProjection.h
rename to ossim/include/ossim/projection/ossimLlxyProjection.h
diff --git a/ossim/include/ossim/projection/ossimMapProjection.h b/ossim/include/ossim/projection/ossimMapProjection.h
new file mode 100644
index 0000000..d6ee039
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimMapProjection.h
@@ -0,0 +1,377 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+// Base class for all map projections.
+// 
+//*******************************************************************
+//  $Id: ossimMapProjection.h 22938 2014-11-01 11:43:35Z okramer $
+
+#ifndef ossimMapProjection_HEADER
+#define ossimMapProjection_HEADER 1
+
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimKeyword.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimEllipsoid.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimDrect.h>
+#include <iostream>
+
+#include <ossim/base/ossimMatrix4x4.h>
+
+class ossimKeywordlist;
+
+class OSSIMDLLEXPORT ossimMapProjection : public ossimProjection
+{
+public:
+   ossimMapProjection(const ossimEllipsoid& ellipsoid = ossimEllipsoid(),
+                      const ossimGpt& origin=ossimGpt());
+
+   ossimMapProjection(const ossimMapProjection& src);
+
+   virtual ossimGpt origin()const;
+
+   /**
+    * All map projections will convert the world coordinate to an easting
+    * northing (Meters).
+    */
+   virtual ossimDpt forward(const ossimGpt &worldPoint) const = 0;
+
+   /**
+    * Will take a point in meters and convert it to ground.
+    */
+   virtual ossimGpt inverse(const ossimDpt &projectedPoint)const = 0;
+
+   virtual ossimDpt worldToLineSample(const ossimGpt &worldPoint)const;
+   virtual void     worldToLineSample(const ossimGpt &worldPoint,
+                                      ossimDpt&       lineSample)const;
+   
+   virtual ossimGpt lineSampleToWorld(const ossimDpt &projectedPoint)const;
+   virtual void     lineSampleToWorld(const ossimDpt &projectedPoint,
+                                      ossimGpt& gpt)const;
+   /**
+    * This is the pure virtual that projects the image point to the given
+    * elevation above ellipsoid, thereby bypassing reference to a DEM. Useful
+    * for projections that are sensitive to elevation.
+    */
+   virtual void lineSampleHeightToWorld(const ossimDpt& lineSampPt,
+                                        const double&   heightAboveEllipsoid,
+                                        ossimGpt&       worldPt) const;
+
+   virtual void lineSampleToEastingNorthing(const ossimDpt& liineSample,
+                                            ossimDpt& eastingNorthing)const;
+
+   virtual void eastingNorthingToLineSample(const ossimDpt& eastingNorthing,
+                                            ossimDpt&       lineSample)const;
+
+   virtual void eastingNorthingToWorld(const ossimDpt& eastingNorthing,
+                                       ossimGpt&       worldPt)const;
+
+   
+   /** @return The false easting. */
+   virtual double getFalseEasting() const;
+
+   /** @return The false northing. */
+   virtual double getFalseNorthing() const;
+   
+   /**
+    * Derived classes should implement as needed.
+    * This implementation returns 0.0.
+    * 
+    * @return The first standard parallel.
+    */
+   virtual double getStandardParallel1() const;
+
+   /**
+    * Derived classes should implement as needed.
+    * This implementation returns 0.0.
+    * 
+    * @return The second standard parallel.
+    */
+   virtual double getStandardParallel2() const;
+   
+   virtual void update();
+
+   virtual void setPcsCode(ossim_uint32 pcsCode);
+
+   //! Returns the EPSG PCS code or 32767 if the projection is a custom (non-EPSG) projection
+   virtual ossim_uint32 getPcsCode()const;
+
+   /**
+    *  Returns the projection name.
+    */
+   virtual ossimString getProjectionName() const;
+   
+   /**
+    * ACCESS METHODS: 
+    */
+   virtual double getA() const;
+   virtual double getB() const;
+   virtual double getF() const;
+   
+   virtual ossimDpt getMetersPerPixel() const;
+
+   /**
+    * Returns decimal degrees per pixel as an ossimDpt with
+    * "x" representing longitude and "y" representing latitude.
+    */
+   virtual const ossimDpt& getDecimalDegreesPerPixel() const;
+   
+   virtual const ossimDpt&   getUlEastingNorthing() const;
+   virtual const ossimGpt&   getUlGpt() const;
+   virtual const ossimDatum* getDatum() const;
+   const ossimEllipsoid&     getEllipsoid() const { return theEllipsoid; }
+   const ossimGpt& getOrigin() const;
+   virtual bool isGeographic()const;
+
+   /**
+    * Applies scale to theDeltaLonPerPixel, theDeltaLatPerPixel and
+    * theMetersPerPixel data members (eg: theDeltaLonPerPixel *= scale.x).
+    *
+    * @param scale Multiplier to be applied to theDeltaLonPerPixel,
+    * theDeltaLatPerPixel and theMetersPerPixel
+    *
+    * @param recenterTiePoint If true the will adjust the tie point by
+    * shifting the original tie to the upper left corner, applying scale,
+    * then shifting back by half of either the new
+    * theDeltaLat/lon or theMetersPerPixel depending on if projection
+    * isGeographic.
+    */
+   virtual void applyScale(const ossimDpt& scale, bool recenterTiePoint);
+   
+   /**
+    * SET METHODS: 
+    */
+   virtual void setEllipsoid(const ossimEllipsoid& ellipsoid);
+   virtual void setAB(double a, double b);
+
+   /**
+    * Sets theDatum to datum.
+    * Sets theEllipsiod to datum's ellipsiod.
+    * Calls update().
+    */
+   virtual void setDatum(const ossimDatum* datum);
+
+   /**
+    * Sets theOrigin to origin.
+    * Sets theDatum to origin's datum.
+    * Sets theEllipsiod to datum's ellipsiod.
+    * Calls update().
+    *
+    * @param origin The projection origin.
+    */
+   virtual void setOrigin(const ossimGpt& origin);
+   
+   virtual void setMetersPerPixel(const ossimDpt& gsd);
+   virtual void setDecimalDegreesPerPixel(const ossimDpt& gsd);
+   virtual void setUlTiePoints(const ossimGpt& gpt);
+   virtual void setUlTiePoints(const ossimDpt& eastingNorthing);
+   virtual void setUlEastingNorthing(const  ossimDpt& ulEastingNorthing);
+   virtual void setUlGpt(const  ossimGpt& ulGpt);
+   virtual void assign( const  ossimProjection &aProjection);
+   
+   /**
+    * Method to save the state of an object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0) const;
+
+   /**
+    * Method to the load (recreate) the state of an object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   /**
+    * Prints data members to stream.  Returns stream&.
+    */
+   virtual std::ostream& print(std::ostream& out) const;
+
+   //! Compares this to arg projection and returns TRUE if the same. 
+   //! NOTE: As currently implemented in OSSIM, map projections also contain image geometry 
+   //! information like tiepoint and scale. This operator is only concerned with the map 
+   //! specification and ignores image geometry differences.
+   virtual bool operator==(const ossimProjection& projection) const;
+
+   //! Computes the approximate resolution in degrees/pixel
+   virtual void computeDegreesPerPixel();
+
+   
+   /**
+    * This will go from the ground point and give
+    * you an approximate meters per pixel. the Delta Lat
+    * and delta lon will be in degrees.
+    */
+   virtual void computeMetersPerPixel();
+
+   void setMatrix(double rotation,
+                  const ossimDpt& scale,
+                  const ossimDpt& translation);
+   
+   void setMatrixScale(const ossimDpt& scale);
+   
+   void setMatrixRotation(double rotation);
+
+   void setMatrixTranslation(const ossimDpt& translation);
+
+   /**
+    * Utility method to snap the tie point to some multiple.
+    *
+    * This is used to overcome inaccuracies in formats like NITF's rpc tag
+    * witch has a four digit decimal degree precision for the lat/lon offset.
+    *
+    * @param multiple Value to snap tie point to like 1.0.
+    *
+    * @param unitType OSSIM_METERS or OSSIM_DEGREES.
+    *
+    * EXAMPLE1:
+    * projection:    ossimUtmProjection
+    * tie point is:  551634.88, 4492036.16
+    * multiple:      1.0
+    * unitType:      OSSIM_METERS
+    * new tie point: 551635.00, 4492036.00
+    *
+    * EXAMPLE2:
+    * projection:    ossimEquDistCylProjection
+    * tie point is:  -90.3246343      42.0297589
+    * multiple:      0.0001
+    * unitType:      OSSIM_DEGREES
+    * new tie point: -90.3246 42.0298
+    */
+   void snapTiePointTo(ossim_float64 multiple, ossimUnitType unitType);
+   void snapTiePointToOrigin();
+                      
+   void setElevationLookupFlag(bool flag);
+   bool getElevationLookupFlag()const;
+   ossimUnitType getModelTransformUnitType()const
+   {
+      return theModelTransformUnitType;
+   }
+   void setModelTransformUnitType(ossimUnitType unit)
+   {
+      theModelTransformUnitType = unit;
+   }
+   bool hasModelTransform()const
+   {
+      return (theModelTransformUnitType != OSSIM_UNIT_UNKNOWN);
+   }
+
+   /**
+    * @brief Implementation of pure virtual
+    * ossimProjection::isAffectedByElevation method.
+    * @return false.
+    */
+   virtual bool isAffectedByElevation() const { return false; }
+   
+   void setProjectionUnits(ossimUnitType units) { theProjectionUnits = units; }
+
+   /**
+    * OSSIM considers all map projection coordinates (including false eastings and northings) to
+    * be in meters. However, some standard projection specifications (cf EPSG spec) indicate
+    * coordinates in feet (US and Intl). Since the methods forward() and inverse() always deal in
+    * meters, the user of this projection may need to convert their map coordinates to meters prior
+    * to calling inverse() (and after calling forward() if the coordinates need to be in the
+    * original unit. This class keeps track of the original units so that a user can query and
+    * convert the map point coordinates to meters as needed.
+    */
+   ossimUnitType getProjectionUnits() const { return theProjectionUnits; }
+   
+   virtual bool isEqualTo(const ossimObject& obj, ossimCompareType compareType = OSSIM_COMPARE_FULL)const;
+
+
+protected:
+   
+   virtual ~ossimMapProjection();
+
+   //---
+   // If theModelTransform is set this updates:
+   // theDegreesPerPixel
+   // theMetersPerPixel
+   // theUlEastingNorthing
+   // theUlGpt
+   //---
+   void updateFromTransform();
+
+   /**
+    * This method verifies that the projection parameters match the current
+    * pcs code.  If not this will set the pcs code to 0.
+    *
+    * @return true if match, false if not.
+    */
+   //bool verifyPcsCodeMatches() const;
+   
+   ossimEllipsoid   theEllipsoid;
+   ossimGpt         theOrigin;
+
+   /**
+    * This is only set if we want to have built in datum shifting
+    */
+   const ossimDatum* theDatum;
+   
+   /**
+    * Holds the number of meters per pixel.
+    * x = easting
+    * y = northing
+    */
+   ossimDpt          theMetersPerPixel;
+
+   /**
+    * Hold the decimal degrees per pixel.
+    * x = longitude
+    * y = latitude
+    */
+   ossimDpt          theDegreesPerPixel;
+
+   /** Hold tie point in decimal degrees. */
+   ossimGpt          theUlGpt;
+
+   /**
+    * Hold tie point as easting northing.
+    * x = easting,
+    * y = northing
+    */
+   ossimDpt          theUlEastingNorthing;
+
+   /**
+    * Hold the false easting northing.
+    * x = false easting,
+    * y = false northing
+    */
+   ossimDpt          theFalseEastingNorthing;
+
+   //! Projection Coordinate System(PCS) code. Mutable because they may update automatically
+   //! after the projection is initialized, even in a const method. Normally set to 0 until the
+   //! corresponding EPSG code can be determined. If the projection is NOT represented by any
+   //! EPSG code, then the PCS is set to 32767.
+   mutable ossim_uint32      thePcsCode;
+
+   bool              theElevationLookupFlag;
+
+   // Will always be a 4x4 matrix.
+   // note:  only the first 2 dimensions will be used.
+   // if the size is 0 then it will not be used
+   //
+   ossimMatrix4x4 theModelTransform; // goes from image to model
+   ossimMatrix4x4 theInverseModelTransform; //goes from model back to image
+
+   // Output Units of the transform
+   //
+   ossimUnitType theModelTransformUnitType;
+
+   //! Linear units of the projection as indicated in the projection's specification:
+   ossimUnitType theProjectionUnits;
+
+TYPE_DATA
+};
+
+
+#endif
diff --git a/ossim/include/ossim/projection/ossimMapProjectionFactory.h b/ossim/include/ossim/projection/ossimMapProjectionFactory.h
new file mode 100644
index 0000000..652fa70
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimMapProjectionFactory.h
@@ -0,0 +1,67 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author:  Garrett Potts
+//
+// Description:
+//
+// class ossimProjectionFactory maintains a static list of projection
+// makers.  If a user wants to create a projection they can pass in
+// a projection name and a datum if desired.  Currently the default
+// datum will be WGS84.
+//*******************************************************************
+//  $Id: ossimMapProjectionFactory.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimMapProjectionFactory_HEADER
+#define ossimMapProjectionFactory_HEADER
+
+#include <ossim/projection/ossimProjectionFactoryBase.h>
+
+class ossimProjection;
+class ossimString;
+
+class OSSIMDLLEXPORT ossimMapProjectionFactory : public ossimProjectionFactoryBase
+{
+public:
+   /*!
+    * METHOD: instance()
+    * Instantiates singleton instance of this class:
+    */
+   static ossimMapProjectionFactory* instance();
+
+   virtual ossimProjection* createProjection(const ossimFilename& filename,
+                                             ossim_uint32 entryIdx)const;
+   /*!
+    * METHOD: create()
+    * Attempts to create an instance of the projection specified by name.
+    * Returns successfully constructed projection or NULL.
+    */
+   virtual ossimProjection* createProjection(const ossimString& name)const;
+   virtual ossimProjection* createProjection(const ossimKeywordlist& kwl,
+                                             const char* prefix = 0)const;
+   virtual ossimObject* createObject(const ossimString& typeName)const;
+
+   /*!
+    * Creates and object given a keyword list.
+    */
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
+                                     const char* prefix=0)const;
+   
+   /*!
+    * This should return the type name of all objects in all factories.
+    * This is the name used to construct the objects dynamially and this
+    * name must be unique.
+    */
+   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
+
+protected:
+   ossimMapProjectionFactory() {}
+   static ossimMapProjectionFactory*  theInstance;
+ 
+};
+
+#endif
+
diff --git a/ossim/include/ossim/projection/ossimMapProjectionInfo.h b/ossim/include/ossim/projection/ossimMapProjectionInfo.h
new file mode 100644
index 0000000..39f6512
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimMapProjectionInfo.h
@@ -0,0 +1,277 @@
+//*******************************************************************
+// Copyright (C) 2001 ImageLinks Inc.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+// Class for encapsulate projection info given a projection, datum, and
+// output rectangle.
+//
+// NOTE:
+// - Output rectangle should be relative to the center of pixels.
+//   Shifts will be made for "pixel is area" internally.
+//
+//*******************************************************************
+//  $Id: ossimMapProjectionInfo.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimMapProjectionInfo_HEADER
+#define ossimMapProjectionInfo_HEADER
+
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimString.h>
+
+class ossimMapProjection;
+class ossimImageChain;
+
+class OSSIMDLLEXPORT ossimMapProjectionInfo : public ossimObject
+{
+public:
+
+   ossimMapProjectionInfo(const ossimMapProjection* proj,
+                          const ossimDrect& output_rect);
+
+   virtual ~ossimMapProjectionInfo();
+
+   /**
+    *  Returns true on error false if ok.
+    */
+   bool errorStatus() const;
+
+   /**
+    * Adds tie point to keyword list.  This will be latitude, longitude if
+    * projection is geographic; else, easting, northing.
+    */
+   void getGeom(ossimKeywordlist& kwl, const char* prefix=0)const;
+
+   /**
+    *  Returns the pixel size in meters.
+    *  x = sample direction
+    *  y = line direction
+    */
+   ossimDpt getMetersPerPixel() const;
+   
+   /**
+    *  Returns the pixel size in U.S. Survey feet.
+    *  x = sample direction
+    *  y = line direction
+    *
+    *  NOTE:
+    *  The US survey feet per meter converion (0.3048006096 feet per meter)
+    *  is NOT the same as the standard feet per meter conversion
+    *  (0.3048 feet per meter).
+    */
+   ossimDpt getUsSurveyFeetPerPixel() const;
+
+   /**
+    *  Returns the decimal degrees per pixel.
+    *  x = sample direction
+    *  y = line direction
+    */
+   ossimDpt getDecimalDegreesPerPixel() const;
+   
+   /**
+    *  Returns the upper left easting and northing as a ossimDpt.
+    *  The easting is "u" and the northing is "v". Units are in meters.
+    */
+   ossimDpt ulEastingNorthingPt() const;
+
+   /**
+    *  Returns the upper right easting and northing as a ossimDpt.
+    *  The easting is "u" and the northing is "v". Units are in meters.
+    */
+   ossimDpt urEastingNorthingPt() const;
+
+   /**
+    *  Returns the lower right easting and northing as a ossimDpt.
+    *  The easting is "u" and the northing is "v". Units are in meters.
+    */
+   ossimDpt lrEastingNorthingPt() const;
+
+   /**
+    *  Returns the lower left easting and northing as a ossimDpt.
+    *  The easting is "u" and the northing is "v". Units are in meters.
+    */
+   ossimDpt llEastingNorthingPt() const;
+   
+   /**
+    *  Returns the upper left easting and northing as a ossimDpt.
+    *  The easting is "u" and the northing is "v".
+    *  Units are in U.S. Survey feet.
+    */
+   ossimDpt ulEastingNorthingPtInFt() const;
+
+   /**
+    *  Returns the upper right easting and northing as a ossimDpt.
+    *  The easting is "u" and the northing is "v".
+    *  Units are in U.S. Survey feet.
+    */
+   ossimDpt urEastingNorthingPtInFt() const;
+
+   /**
+    *  Returns the lower right easting and northing as a ossimDpt.
+    *  The easting is "u" and the northing is "v".
+    *  Units are in U.S. Survey feet.
+    */
+   ossimDpt lrEastingNorthingPtInFt() const;
+
+   /**
+    *  Returns the lower left easting and northing as a ossimDpt.
+    *  The easting is "u" and the northing is "v". 
+    *  Units are in U.S. Survey feet.
+    */
+   ossimDpt llEastingNorthingPtInFt() const;
+   
+   /**
+    * Returns the upper left ground point.
+    */
+   ossimGpt ulGroundPt() const;
+
+   /**
+    * Returns the upper right ground point.
+    */
+   ossimGpt urGroundPt() const;
+
+   /**
+    * Returns the lower right ground point.
+    */
+   ossimGpt lrGroundPt() const;
+ 
+   /**
+    * Returns the lower left ground point.
+    */
+   ossimGpt llGroundPt() const;
+
+   /**
+    * Returns the center ground point.
+    */
+   ossimGpt centerGroundPt() const;
+
+   /** @return The center ground point. */
+   ossimDpt centerEastingNorthingPt() const;
+
+   /** @return The lines per image. */
+   ossim_int32 linesPerImage() const;
+
+   /** @return The pixels per line (samples). */
+   ossim_int32 pixelsPerLine() const;
+
+   /**
+    * Formatted print of data members.  Used by operator <<.
+    */
+   std::ostream& print(std::ostream& os) const;
+
+   /**
+    *  Sets the data member "thePixelType".
+    *  NOTE:
+    *  PIXEL_IS_POINT (ennumerated to a "0"):
+    *  Corner coordinates are relative to the center of pixel.
+    *  PIXEL_IS_AREA (ennumerated to a "1"):
+    *  Corner coordinates are relative to the outer edge of the pixel.
+    */
+   void setPixelType (ossimPixelType type);
+
+   /**
+    *  Returns data member "thePixelType".
+    *  NOTE:
+    *  OSSIM_PIXEL_IS_POINT (ennumerated to a "0"):
+    *  Corner coordinates are relative to the center of pixel.
+    *  OSSIM_PIXEL_IS_AREA (ennumerated to a "1"):
+    *  Corner coordinates are relative to the outer of the pixel.
+    */
+   ossimPixelType  getPixelType () const;
+
+   /**
+    * Sets the data member "theOutputInfoInFeetFlag".
+    */
+   void setOutputFeetFlag (bool flag);
+
+   /**
+    *  Returns the data member "theOutputInfoInFeetFlag".
+    *  True = feet, false = meters.
+    */
+   bool unitsInFeet() const;
+
+   /**
+    * Returns theImageInfoString.
+    */
+   ossimString getImageInfoString () const;
+
+   /**
+    *  Used to set data member "theImageInfoString".  This will be output
+    *  in the "Image: " field of the README file.
+    */
+   void setImageInfoString (const ossimString& string);
+
+   /**
+    * Returns reference to "theProjection".
+    */
+   const ossimMapProjection* getProjection() const;
+
+   //****
+   // Keywords for getStateFrom/saveStateTo.
+   //***
+   static const char* README_IMAGE_STRING_KW;
+   static const char* PIXEL_TYPE_KW;
+   static const char* OUTPUT_US_FT_INFO_KW;
+   
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix = 0);
+   
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix = 0) const;
+   
+private:
+
+   // Do not permit construction with void args.
+   ossimMapProjectionInfo();
+   ossimMapProjectionInfo& operator=(const ossimMapProjectionInfo&);
+   
+   void initializeMembers(const ossimDrect& output_rect);
+   
+   const ossimMapProjection* theProjection;
+   mutable bool              theErrorStatus;
+   int                       theLinesPerImage;
+   int                       thePixelsPerLine;
+   ossimGpt                  theCornerGroundPt[4];
+   ossimDpt                  theCornerEastingNorthingPt[4];
+   ossimGpt                  theCenterGroundPt;
+   ossimDpt                  theCenterEastingNorthingPt;
+   ossimDrect                theBoundingRect;
+   
+   /**
+    *   "thePixelType" defines whether the tie point coordinates are
+    *   relative to the center of the pixel(which is PIXEL_IS_POINT) or
+    *   the upper left corner of the pixel(PIXEL_IS_AREA).  The default
+    *   pixle type is PIXEL_IS_POINT.
+    */
+   ossimPixelType                 thePixelType;
+
+   /**
+    *   If "theOutputInfoInFeetFlag" is true the readme file tie point
+    *   info will be output in both meters and U.S. feet.
+    *   NOTE:
+    *   U.S. feet conversion is "meters/0.3048006096" not the standard
+    *   "meters/0.3048".
+    *   Reference for U.S. feet value:
+    *   U.S.G.S. "Map Projections - A Working Manual" USGS Professional
+    *   paper 1395 page 51.
+    */
+   bool                      theOutputInfoInFeetFlag;
+
+   /**
+    *   "theImageInfoString" goes in the README file "Image:" field
+    *   to identify the image.
+    */
+   ossimString               theImageInfoString;
+};
+
+#endif /* End of #ifndef ossimMapProjectionInfo_HEADER */
+
diff --git a/include/ossim/projection/ossimMapViewController.h b/ossim/include/ossim/projection/ossimMapViewController.h
similarity index 100%
rename from include/ossim/projection/ossimMapViewController.h
rename to ossim/include/ossim/projection/ossimMapViewController.h
diff --git a/ossim/include/ossim/projection/ossimMeanRadialLensDistortion.h b/ossim/include/ossim/projection/ossimMeanRadialLensDistortion.h
new file mode 100644
index 0000000..1e4bbf1
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimMeanRadialLensDistortion.h
@@ -0,0 +1,119 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// MIT
+// 
+// Author:  Garrett Potts (gpotts at imagelinks.com)
+//
+// Description:
+//
+// MeanRadialLensDistortion
+//*******************************************************************
+//  $Id: ossimMeanRadialLensDistortion.h 23666 2015-12-14 20:01:22Z rashadkm $
+#ifndef ossimMeanRadialLensDistortion_HEADER
+#define ossimMeanRadialLensDistortion_HEADER
+#include <vector>
+#include <ossim/matrix/newmat.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/projection/ossimLensDistortion.h>
+class ossimMeanRadialLensDistortion : public ossimLensDistortion
+{
+public:
+   ossimMeanRadialLensDistortion()
+   {
+      theCoefficients.resize(4);
+      theCoefficients[0] = 0.0;
+      theCoefficients[1] = 0.0;
+      theCoefficients[2] = 0.0;
+      theCoefficients[3] = 0.0;
+   }
+
+  /*!
+   * Instantiate a ossimMeanRadialLens with the calibrated data.
+   * The data consists of the Principal point,
+   * focal distance, radialDistance measures for the distortion
+   * deltas, the radial distortion values.
+   * 
+   * example of construction:
+   *
+   * lets say we have the following:
+   *
+   * principal point = (.008 , -.001) mm
+   *
+   * and
+   *
+   * field angle       radial distance       deltaR (distortion)
+   *_____________________________________________________________
+   *  7.5 deg.             .004 mm             .0202 mm
+   *  15 deg.              .007 mm             .0411 mm
+   *  22.5 deg.            .007 mm             .0635 mm
+   *  :
+   *  :
+   *  :
+   *
+   * then construct the ossimMeanRadialLensDistortion class to construct the
+   * given focal length and principal point and the middle column as
+   * the radial distance column vector and the third column as the
+   * distortion values.
+   */
+/*    ossimMeanRadialLensDistortion(ossimDpt    calibratedPrincipalPoint, */
+/*                                  const NEWMAT::ColumnVector &radialDistance, */
+/*                                  const NEWMAT::ColumnVector &radialDistortion) */
+   ossimMeanRadialLensDistortion(ossimDpt    calibratedPrincipalPoint,
+                                 const NEWMAT::ColumnVector &radialDistance,
+                                 const NEWMAT::ColumnVector &radialDistortion)
+      :ossimLensDistortion(calibratedPrincipalPoint)
+  {
+     theCoefficients.resize(4);
+     solveCoefficients(radialDistance, radialDistortion);
+  }
+      
+  /*!
+   * Returns the coefficients (k1, k2, k3, k4) for the deltaR polynomial:
+   *
+   *    deltaR = k1*r + k2*r^3 + k3*r^5 + k4*r^7
+   */
+  const std::vector<double>& getCoefficients()const{return theCoefficients;}
+  std::vector<double>& getCoefficients(){return theCoefficients;}
+
+
+//  ossimDpt adjustPoint(const ossimDpt &position)const;
+  virtual std::ostream& print(std::ostream& out) const
+  {return out;}
+
+  /*!
+   * dletaR computes how much we should adjust r.  The
+   * return value is the adjustment amount.  This method is used
+   * by adjustPoint.
+   */
+  double deltaR(double r)const;
+
+  virtual void undistort(const ossimDpt& input, ossimDpt& output)const;
+  
+  /*!
+   * solves the coefficients given the radial distances and distortion
+   * for each distance.
+   */
+  void solveCoefficients(const NEWMAT::ColumnVector &radialDistance,
+			 const NEWMAT::ColumnVector &radialDistortion);
+  /*!
+   * solves the coefficients given the radial distances and distortion
+   * for each distance.
+   */
+  void solveCoefficients(const std::vector<double>& radialDistance,
+			 const std::vector<double>& radialDistortion);
+  
+  virtual bool saveState(ossimKeywordlist& kwl,
+                         const char* prefix = 0)const;
+  
+  virtual bool loadState(const ossimKeywordlist& kwl,
+                         const char* prefix = 0);
+  
+protected:
+  std::vector<double> theCoefficients;
+  
+TYPE_DATA  
+};
+
+
+#endif
diff --git a/include/ossim/projection/ossimMercatorProjection.h b/ossim/include/ossim/projection/ossimMercatorProjection.h
similarity index 100%
rename from include/ossim/projection/ossimMercatorProjection.h
rename to ossim/include/ossim/projection/ossimMercatorProjection.h
diff --git a/include/ossim/projection/ossimMgrs.h b/ossim/include/ossim/projection/ossimMgrs.h
similarity index 100%
rename from include/ossim/projection/ossimMgrs.h
rename to ossim/include/ossim/projection/ossimMgrs.h
diff --git a/include/ossim/projection/ossimMillerProjection.h b/ossim/include/ossim/projection/ossimMillerProjection.h
similarity index 100%
rename from include/ossim/projection/ossimMillerProjection.h
rename to ossim/include/ossim/projection/ossimMillerProjection.h
diff --git a/include/ossim/projection/ossimMiscProjectionFactory.h b/ossim/include/ossim/projection/ossimMiscProjectionFactory.h
similarity index 100%
rename from include/ossim/projection/ossimMiscProjectionFactory.h
rename to ossim/include/ossim/projection/ossimMiscProjectionFactory.h
diff --git a/include/ossim/projection/ossimMollweidProjection.h b/ossim/include/ossim/projection/ossimMollweidProjection.h
similarity index 100%
rename from include/ossim/projection/ossimMollweidProjection.h
rename to ossim/include/ossim/projection/ossimMollweidProjection.h
diff --git a/include/ossim/projection/ossimNewZealandMapGridProjection.h b/ossim/include/ossim/projection/ossimNewZealandMapGridProjection.h
similarity index 100%
rename from include/ossim/projection/ossimNewZealandMapGridProjection.h
rename to ossim/include/ossim/projection/ossimNewZealandMapGridProjection.h
diff --git a/ossim/include/ossim/projection/ossimNgaProjectionFactory.h b/ossim/include/ossim/projection/ossimNgaProjectionFactory.h
new file mode 100644
index 0000000..422b8c7
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimNgaProjectionFactory.h
@@ -0,0 +1,66 @@
+//*******************************************************************
+// Copyright (C) 2014 RadiantBlue, Inc.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+//*******************************************************************
+//  $Id$
+#ifndef ossimNgaProjectionFactory_HEADER
+#define ossimNgaProjectionFactory_HEADER
+
+#include <ossim/projection/ossimProjectionFactoryBase.h>
+
+class OSSIM_DLL ossimNgaProjectionFactory : public ossimProjectionFactoryBase
+{
+public:
+   
+   static ossimNgaProjectionFactory* instance();
+
+   /**
+    * takes a filename. This filename can be an image file or
+    * it can also be a ossim .geom file.  It could be other
+    * forms of geom files as well.  The factories job will be to
+    * determine what parser to use and return a projection if
+    * successful.
+    */
+   virtual ossimProjection* createProjection(const ossimFilename& filename,
+                                             ossim_uint32 entryIdx)const;
+
+   /**
+    * Take a projection type name.
+    */
+   virtual ossimProjection* createProjection(const ossimString& name)const;
+
+   /**
+    * Take a keywordlist.
+    */
+   virtual ossimProjection* createProjection(const ossimKeywordlist& kwl,
+                                             const char* prefix)const;
+   
+   virtual ossimObject* createObject(const ossimString& typeName)const;
+
+   /*!
+    * Creates and object given a keyword list.
+    */
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
+                                     const char* prefix=0) const;
+
+   /*!
+     * This should return the type name of all objects in all factories.
+     * This is the name used to construct the objects dynamially and this
+     * name must be unique.
+     */
+    virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
+
+protected:
+    //! Constructor loads all SRS CSV files specified in the ossim prefs. Protected as part of
+    //! singleton implementation.
+    ossimNgaProjectionFactory() {}
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/projection/ossimNitfMapModel.h b/ossim/include/ossim/projection/ossimNitfMapModel.h
similarity index 100%
rename from include/ossim/projection/ossimNitfMapModel.h
rename to ossim/include/ossim/projection/ossimNitfMapModel.h
diff --git a/include/ossim/projection/ossimNitfProjectionFactory.h b/ossim/include/ossim/projection/ossimNitfProjectionFactory.h
similarity index 100%
rename from include/ossim/projection/ossimNitfProjectionFactory.h
rename to ossim/include/ossim/projection/ossimNitfProjectionFactory.h
diff --git a/ossim/include/ossim/projection/ossimNitfRpcModel.h b/ossim/include/ossim/projection/ossimNitfRpcModel.h
new file mode 100644
index 0000000..e50a52b
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimNitfRpcModel.h
@@ -0,0 +1,116 @@
+//*****************************************************************************
+// FILE: ossimNitfRpcModel.h
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Contains declaration of class ossimNitfRpcModel. This 
+//    derived class implements the capability of reading Nitf RPC support
+//    data.
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimNitfRpcModel.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimNitfRpcModel_HEADER
+#define ossimNitfRpcModel_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/projection/ossimRpcModel.h>
+
+class ossimFilename;
+class ossimNitfImageHeader;
+
+/*!****************************************************************************
+ *
+ * CLASS:  ossimNitfRpcModel
+ *
+ *****************************************************************************/
+class OSSIM_DLL ossimNitfRpcModel : public ossimRpcModel
+{
+public:
+   ossimNitfRpcModel();
+   ossimNitfRpcModel(const ossimNitfRpcModel& rhs);
+   ossimNitfRpcModel(const ossimFilename& nitfFile);
+   virtual ossimObject* dup() const;
+
+   /**
+    * @brief worldToLineSample()
+    * Calls ossimRpcModel::worldToLineSample(), then applies (if needed)
+    * decimation.
+    * This is a temp work around for decimation RPC NITFs.
+    */
+   virtual void  worldToLineSample(const ossimGpt& world_point,
+                                   ossimDpt&       image_point) const;
+
+   /**
+    * @brief lineSampleHeightToWorld()
+    * Backs out decimation of image_point (if needed) then calls:
+    * ossimRpcModel::lineSampleHeightToWorld
+    * This is a temp work around for decimation RPC NITFs.
+    */
+   virtual void lineSampleHeightToWorld(const ossimDpt& image_point,
+                                        const double&   heightEllipsoid,
+                                        ossimGpt&       worldPoint) const;
+
+   /**
+    * @brief Saves "decimation".  Then calls ossimRpcModel::saveState.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0) const;
+
+   /**
+    * @brief Looks for decimation. Then calls ossimRpcModel::loadState.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   /**
+    * @brief Method to parse an nitf file and initialize model.
+    * @param entryIndex The entry to get model for.  Note the nitf's can have
+    * multiple entries; each with a different projection.
+    * @return true on success, false on error.
+    */
+   virtual bool parseFile(const ossimFilename& nitfFile,
+                          ossim_uint32 entryIndex=0);
+   
+   virtual bool parseImageHeader(const ossimNitfImageHeader* ih);
+private:
+
+   /**
+    * Attempts to get gsd from nitf tags and initialize
+    * ossimSensorModel::theGsd.
+    * 
+    * If unsuccessful  theGsd will be initialized to OSSIM_DBL_NAN.
+    */
+   void getGsd(const ossimNitfImageHeader* ih);
+
+   /**
+    * Attempts to get sensor ID from nitf tags and initialize
+    * ossimSensorModel::theSensorID.
+    * 
+    * If unsuccessful  theGsd will be initialized to UNKNOWN.
+    */
+   void getSensorID(const ossimNitfImageHeader* ih);
+
+   /**
+    * Get model information from either the RPC00A or RPC00B tag.
+    * @return true on success, false on error.
+    */
+   bool getRpcData(const ossimNitfImageHeader* ih);
+
+   /**
+    * Stored from header field "IMAG".  This is a temp work around to handle
+    * decimated rpc nitf's.
+    */
+   ossim_float64 theDecimation;
+
+   TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/projection/ossimNitfRsmModel.h b/ossim/include/ossim/projection/ossimNitfRsmModel.h
new file mode 100644
index 0000000..f8d46b7
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimNitfRsmModel.h
@@ -0,0 +1,92 @@
+//---
+// File: ossimNitfRsmModel.h
+//---
+#ifndef ossimNitfRsmModel_HEADER
+#define ossimNitfRsmModel_HEADER 1
+
+#include <ossim/projection/ossimRsmModel.h>
+
+class ossimNitfImageHeader;
+class ossimNitfRsmecaTag;
+class ossimNitfRsmidaTag;
+class ossimNitfRsmpcaTag;
+class ossimNitfRsmpiaTag;
+
+/**
+ * @class ossimNitfRsmModel
+ */
+class OSSIM_DLL ossimNitfRsmModel : public ossimRsmModel
+{
+public:
+
+   /** @brief default constructor */
+   ossimNitfRsmModel();
+
+   /** @brief copy constructor */
+   ossimNitfRsmModel( const ossimNitfRsmModel& obj );
+
+   /** @brief assignment operator */
+   const ossimNitfRsmModel& operator=( const ossimNitfRsmModel& rhs );
+
+   virtual bool parseFile(const ossimFilename& nitfFile,
+                          ossim_uint32 entryIndex=0);
+
+   virtual bool parseImageHeader(const ossimNitfImageHeader* ih);
+
+   bool getRsmData(const ossimNitfImageHeader* ih);
+
+   /**
+    * @brief saveState
+    * Fulfills ossimObject base-class pure virtuals. Loads and saves geometry
+    * KWL files. Returns true if successful.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0) const;
+   
+   /**
+    * @brief loadState
+    * Fulfills ossimObject base-class pure virtuals. Loads and saves geometry
+    * KWL files. Returns true if successful.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   /**
+    * @brief dup()
+    * Returns pointer to a new instance, copy of this.
+    */
+   virtual ossimObject* dup() const;
+
+   /**
+    * @brief Initializes model from RSMECA tag.
+    * @param rsmecaTag
+    */
+   bool initializeModel( const ossimNitfRsmecaTag* rsmecaTag );
+
+   /**
+    * @brief Initializes model from RSMECA tag.
+    * @param rsmecaTag
+    */
+   bool initializeModel( const ossimNitfRsmidaTag* rsmidaTag );
+   
+   /**
+    * @brief Initializes model from RSMECA tag.
+    * @param rsmecaTag
+    */ 
+   bool initializeModel( const ossimNitfRsmpiaTag* rsmpiaTag );
+   
+   /**
+    * @brief Initializes model from RSMECA tag.
+    * @param rsmecaTag
+    */   
+   bool initializeModel( const ossimNitfRsmpcaTag* rsmpcaTag );
+
+protected:
+   /** @brief virtual destructor */
+   virtual ~ossimNitfRsmModel();
+
+   TYPE_DATA
+      
+}; // End: class ossimRsmModel
+
+#endif /* #ifndef ossimNitfRsmModel_HEADER */
diff --git a/include/ossim/projection/ossimObliqueMercatorProjection.h b/ossim/include/ossim/projection/ossimObliqueMercatorProjection.h
similarity index 100%
rename from include/ossim/projection/ossimObliqueMercatorProjection.h
rename to ossim/include/ossim/projection/ossimObliqueMercatorProjection.h
diff --git a/include/ossim/projection/ossimOptimizableProjection.h b/ossim/include/ossim/projection/ossimOptimizableProjection.h
similarity index 100%
rename from include/ossim/projection/ossimOptimizableProjection.h
rename to ossim/include/ossim/projection/ossimOptimizableProjection.h
diff --git a/include/ossim/projection/ossimOrthoGraphicProjection.h b/ossim/include/ossim/projection/ossimOrthoGraphicProjection.h
similarity index 100%
rename from include/ossim/projection/ossimOrthoGraphicProjection.h
rename to ossim/include/ossim/projection/ossimOrthoGraphicProjection.h
diff --git a/include/ossim/projection/ossimPolarStereoProjection.h b/ossim/include/ossim/projection/ossimPolarStereoProjection.h
similarity index 100%
rename from include/ossim/projection/ossimPolarStereoProjection.h
rename to ossim/include/ossim/projection/ossimPolarStereoProjection.h
diff --git a/include/ossim/projection/ossimPolarst.h b/ossim/include/ossim/projection/ossimPolarst.h
similarity index 100%
rename from include/ossim/projection/ossimPolarst.h
rename to ossim/include/ossim/projection/ossimPolarst.h
diff --git a/include/ossim/projection/ossimPolyconicProjection.h b/ossim/include/ossim/projection/ossimPolyconicProjection.h
similarity index 100%
rename from include/ossim/projection/ossimPolyconicProjection.h
rename to ossim/include/ossim/projection/ossimPolyconicProjection.h
diff --git a/include/ossim/projection/ossimPolynomProjection.h b/ossim/include/ossim/projection/ossimPolynomProjection.h
similarity index 100%
rename from include/ossim/projection/ossimPolynomProjection.h
rename to ossim/include/ossim/projection/ossimPolynomProjection.h
diff --git a/include/ossim/projection/ossimPositionQualityEvaluator.h b/ossim/include/ossim/projection/ossimPositionQualityEvaluator.h
similarity index 100%
rename from include/ossim/projection/ossimPositionQualityEvaluator.h
rename to ossim/include/ossim/projection/ossimPositionQualityEvaluator.h
diff --git a/include/ossim/projection/ossimPpjFrameSensor.h b/ossim/include/ossim/projection/ossimPpjFrameSensor.h
similarity index 100%
rename from include/ossim/projection/ossimPpjFrameSensor.h
rename to ossim/include/ossim/projection/ossimPpjFrameSensor.h
diff --git a/ossim/include/ossim/projection/ossimProjection.h b/ossim/include/ossim/projection/ossimProjection.h
new file mode 100644
index 0000000..450a576
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimProjection.h
@@ -0,0 +1,147 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author:  Garrett Potts (gpotts at imagelinks.com)
+//
+// Description: Base class for all projections (2D-to-3D transform)
+//
+//*******************************************************************
+//  $Id: ossimProjection.h 23297 2015-05-05 20:32:16Z dburken $
+#ifndef ossimProjection_HEADER
+#define ossimProjection_HEADER 1
+
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimErrorStatusInterface.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimKeyword.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimGeoPolygon.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <iosfwd>
+
+class OSSIMDLLEXPORT ossimProjection : public ossimObject, public ossimErrorStatusInterface
+{
+public:
+   /*!
+    * Constructors, Destructor:
+    */
+   ossimProjection();
+   virtual ~ossimProjection() {}
+
+   virtual ossimObject *dup()const=0;
+
+   /*!
+    * METHOD: origin()
+    * Returns projection's ground point origin. That is the GP corresponding
+    * to line=0, sample=0.
+    */
+   virtual ossimGpt origin()const=0;
+
+   /*!
+    * METHODS: forward(), reverse() 
+    * OBSOLETE -- provided for existing GUI code only. Bogus return value.
+    */
+   virtual ossimDpt forward(const ossimGpt &wp) const;  //inline below
+   virtual ossimGpt inverse(const ossimDpt &pp) const;  //inline below
+
+   /*!
+    * METHOD: worldToLineSample()
+    * Performs the forward projection from ground point to line, sample.
+    */
+   virtual void worldToLineSample(const ossimGpt& worldPoint,
+                                  ossimDpt&       lineSampPt) const = 0;
+
+   /*!
+    * METHOD: lineSampleToWorld()
+    * Performs the inverse projection from line, sample to ground (world):
+    */
+   virtual void lineSampleToWorld(const ossimDpt& lineSampPt,
+                                  ossimGpt&       worldPt) const = 0;
+   
+   /*!
+    * METHOD: lineSampleHeightToWorld
+    * This is the pure virtual that projects the image point to the given
+    * elevation above ellipsoid, thereby bypassing reference to a DEM. Useful
+    * for projections that are sensitive to elevation (such as sensor models).
+    */
+   virtual void lineSampleHeightToWorld(const ossimDpt& lineSampPt,
+                                        const double&   heightAboveEllipsoid,
+                                        ossimGpt&       worldPt) const = 0;
+
+   virtual void getRoundTripError(const ossimDpt& imagePoint,
+                                  ossimDpt& errorResult)const;
+
+   virtual void getRoundTripError(const ossimGpt& groundPoint,
+                                  ossimDpt& errorResult)const;
+   
+   virtual std::ostream& print(std::ostream& out) const;
+
+   virtual void getGroundClipPoints(ossimGeoPolygon& gpts)const;
+   /*!
+    * METHODS:  saveState, loadState
+    * Fulfills ossimObject base-class pure virtuals.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0)const;
+
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   virtual bool isEqualTo(const ossimObject& obj, ossimCompareType compareType = OSSIM_COMPARE_FULL)const
+   {
+      return ossimObject::isEqualTo(obj, compareType);
+   }
+   
+   /*!
+    * OPERATOR: ==
+    * Compares this instance with arg projection.
+    */
+   virtual bool operator==(const ossimProjection& projection) const=0;
+   virtual bool operator!=(const ossimProjection& projection) const {return !(*this == projection);}
+
+   /*!
+    * ACCESS METHODS: 
+    */
+   virtual ossimDpt getMetersPerPixel() const=0;
+
+   /**
+    * @brief Pure virtual method to query if projection is affected by
+    * elevation.
+    * @return true if affected, false if not.
+    */
+   virtual bool isAffectedByElevation() const=0;
+   
+protected:
+  
+
+   TYPE_DATA
+};
+
+//====================== BEGIN INLINE DEFINITIONS ===========================
+
+//*****************************************************************************
+//  INLINE METHOD: ossimProjection::forward()
+//  Projects ground point to 2D plane.
+//*****************************************************************************
+inline ossimDpt ossimProjection::forward(const ossimGpt &wp) const
+{
+   ossimDpt p;
+   worldToLineSample(wp, p);
+   return p;
+}
+
+//*****************************************************************************
+//  INLINE METHOD: ossimProjection::inverse()
+//  Inverse projection from 2D plane to ground point.
+//*****************************************************************************
+inline ossimGpt ossimProjection::inverse(const ossimDpt &pp) const
+{
+   ossimGpt g;
+   lineSampleToWorld(pp, g);
+   return g;
+}
+
+#endif
diff --git a/include/ossim/projection/ossimProjectionFactoryBase.h b/ossim/include/ossim/projection/ossimProjectionFactoryBase.h
similarity index 100%
rename from include/ossim/projection/ossimProjectionFactoryBase.h
rename to ossim/include/ossim/projection/ossimProjectionFactoryBase.h
diff --git a/ossim/include/ossim/projection/ossimProjectionFactoryRegistry.h b/ossim/include/ossim/projection/ossimProjectionFactoryRegistry.h
new file mode 100644
index 0000000..534066b
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimProjectionFactoryRegistry.h
@@ -0,0 +1,82 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimProjectionFactoryRegistry.h 22851 2014-08-05 12:02:55Z gpotts $
+#ifndef ossimProjectionFactoryRegistry_HEADER
+#define ossimProjectionFactoryRegistry_HEADER
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimObjectFactory.h>
+#include <ossim/base/ossimFactoryListInterface.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/projection/ossimProjectionFactoryBase.h>
+
+class ossimImageHandler;
+class OSSIM_DLL ossimProjectionFactoryRegistry : public ossimObjectFactory,
+                                                 public ossimFactoryListInterface<ossimProjectionFactoryBase,
+                                                                                 ossimProjection>
+{
+public:
+
+   virtual ~ossimProjectionFactoryRegistry();
+   
+   static ossimProjectionFactoryRegistry* instance();
+
+   
+   ossimProjection* createProjection(const ossimFilename& filename,
+                                     ossim_uint32 entryIdx)const;
+   ossimProjection* createProjection(const ossimString& name)const
+   {
+      return createNativeObjectFromRegistry(name);
+   }
+   ossimProjection* createProjection(const ossimKeywordlist& kwl,
+                                     const char* prefix=NULL)const;
+   
+   virtual ossimProjection* createProjection(ossimImageHandler* handler)const;
+   /*!
+    * Creates an object given a type name.
+    */
+   virtual ossimObject* createObject(const ossimString& typeName)const
+   {
+      return createObjectFromRegistry(typeName);
+   }
+   
+   /*!
+    * Creates and object given a keyword list.
+    */
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
+                                     const char* prefix=0)const
+   {
+      return createObjectFromRegistry(kwl, prefix);
+   }
+   
+   /**
+    * This should return the type name of all objects in all factories.
+    * This is the name used to construct the objects dynamially and this
+    * name must be unique.
+    */
+   virtual void getTypeNameList(std::vector<ossimString>& typeList)const
+   {
+      getAllTypeNamesFromRegistry(typeList);
+   }
+      
+protected:
+   ossimProjectionFactoryRegistry();
+   ossimProjectionFactoryRegistry(const ossimProjectionFactoryRegistry& rhs);
+   void operator = (const ossimProjectionFactoryRegistry&);
+
+   //static ossimProjectionFactoryRegistry* m_instance;
+   void initializeDefaults();
+};
+
+extern "C"
+{
+  OSSIMDLLEXPORT void* ossimProjectionFactoryRegistryGetInstance();
+}
+
+#endif
diff --git a/include/ossim/projection/ossimProjectionViewControllerFactory.h b/ossim/include/ossim/projection/ossimProjectionViewControllerFactory.h
similarity index 100%
rename from include/ossim/projection/ossimProjectionViewControllerFactory.h
rename to ossim/include/ossim/projection/ossimProjectionViewControllerFactory.h
diff --git a/include/ossim/projection/ossimQuadProjection.h b/ossim/include/ossim/projection/ossimQuadProjection.h
similarity index 100%
rename from include/ossim/projection/ossimQuadProjection.h
rename to ossim/include/ossim/projection/ossimQuadProjection.h
diff --git a/ossim/include/ossim/projection/ossimQuickbirdRpcModel.h b/ossim/include/ossim/projection/ossimQuickbirdRpcModel.h
new file mode 100644
index 0000000..14a6e98
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimQuickbirdRpcModel.h
@@ -0,0 +1,86 @@
+//*****************************************************************************
+// FILE: ossimQuickbirdRpcModel.h
+//
+// Copyright (C) 2001 ImageLinks, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// DESCRIPTION: Contains declaration of class ossimQuickbirdRpcModel. This 
+//    derived class implements the capability of reading Quickbird RPC support
+//    data.
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimQuickbirdRpcModel.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimQuickbirdRpcModel_HEADER
+#define ossimQuickbirdRpcModel_HEADER
+
+#include <ossim/projection/ossimRpcModel.h>
+#include <ossim/support_data/ossimQuickbirdMetaData.h>
+
+class ossimFilename;
+class ossimQuickbirdMetaData;
+class ossimQbTileFilesHandler;
+
+/*!****************************************************************************
+ *
+ * CLASS:  ossimQuickbirdRpcModel
+ *
+ *****************************************************************************/
+class ossimQuickbirdRpcModel : public ossimRpcModel
+{
+public:
+   ossimQuickbirdRpcModel();
+   ossimQuickbirdRpcModel(const ossimQuickbirdRpcModel& rhs);
+
+   //! Initializes
+   ossimQuickbirdRpcModel(const ossimQbTileFilesHandler* handler);
+   ~ossimQuickbirdRpcModel();
+
+   virtual ossimObject* dup() const;
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0) const;
+
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   virtual bool parseFile(const ossimFilename& file);
+   
+   void setSupportData(ossimQuickbirdMetaData* supportData)
+   {
+      theSupportData = supportData;
+   }
+   ossimQuickbirdMetaData* getSupportData()
+   {
+      return theSupportData.get();
+   }
+   const ossimQuickbirdMetaData* getSupportData()const
+   {
+      return theSupportData.get();
+   }
+protected:
+   bool parseNitfFile(const ossimFilename& file);
+   bool parseTiffFile(const ossimFilename& file);
+   bool parseMetaData(const ossimFilename& file);
+   bool parseRpcData (const ossimFilename& file);
+   bool parseTileData(const ossimFilename& file);
+
+   //! Given an initial filename with case-agnostic extension, this method searches first for an
+   //! image-specific instance of that file (i.e., with _R*C* in the filename) before considering
+   //! the mosaic-global support file (_R*C* removed). If a file is found, the argument is modified 
+   //! to match the actual filename and TRUE is returned. Otherwise, argument filename is left 
+   //! unchanged and FALSE is returned.
+   bool findSupportFile(ossimFilename& file) const;
+
+void finishConstruction();
+
+   ossimRefPtr<ossimQuickbirdMetaData> theSupportData;
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/include/ossim/projection/ossimRS1SarModel.h b/ossim/include/ossim/projection/ossimRS1SarModel.h
similarity index 100%
rename from include/ossim/projection/ossimRS1SarModel.h
rename to ossim/include/ossim/projection/ossimRS1SarModel.h
diff --git a/ossim/include/ossim/projection/ossimRadialDecentLensDistortion.h b/ossim/include/ossim/projection/ossimRadialDecentLensDistortion.h
new file mode 100644
index 0000000..1912a16
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimRadialDecentLensDistortion.h
@@ -0,0 +1,159 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author:  Garrett Potts (gpotts at imagelinks.com)
+//
+// Description: Modeling for lens radial and decentering distortion.
+//
+//   The default implementation is:
+//  
+//   Let X and Y be coordinates relative to the center. Let
+//   Xc and Yc be the adjusted point so that:
+//  
+//   Xc = X + delta1X + delta2X
+//   Yc = Y + delta1Y + delta2Y
+//  
+//   
+//   delta1X = X*(k0 + k1*r^2 + k2*r^4 + k3*r^6 + k4*r^8)
+//   delta1Y = Y*(k0 + k1*r^2 + k2*r^4 + k3*r^6 + k4*r^8)
+//   
+//   delta2X = (1 + p3*r^2 + p4*r^4)[p1*(r^2 + 2*X^2) + 2*p2*X*Y]
+//   delta2Y = (1 + p3*r^2 + p4*r^4)[2*p1*X*Y  + p2*(r^2 + 2*Y^2) ]
+//  
+//  
+//   Note the point that is passed in we will compute:
+//        <X, Y> =  position - calibratedPrincipalPoint.
+//  
+//        so if you compute the delta then make sure that
+//        this class is constructed with principal point
+//        at 0,0
+//  
+//   Reference book: Elements of Photogrammetry Paul Wolf
+//   
+//*******************************************************************
+//  $Id: ossimRadialDecentLensDistortion.h 22879 2014-09-03 20:19:42Z dburken $
+#ifndef ossimRadialDecentLensDistortion_HEADER
+#define ossimRadialDecentLensDistortion_HEADER
+#include <iostream>
+using namespace std;
+
+#include <ossim/matrix/newmat.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossim2dTo2dTransform.h>
+
+//*****************************************************************************
+//  CLASS
+//*****************************************************************************
+class OSSIMDLLEXPORT ossimRadialDecentLensDistortion
+   : public ossim2dTo2dTransform
+{
+public:
+   ossimRadialDecentLensDistortion() {}
+   ossimRadialDecentLensDistortion
+      (const ossimDpt& calibratedPrincipalPoint,
+       const NEWMAT::ColumnVector &radialDistortionParameters,
+       const NEWMAT::ColumnVector &decentDistortionParameters)
+      : theCalibratedPrincipalPoint(calibratedPrincipalPoint),
+        theRadialDistortionParameters(radialDistortionParameters),
+        theDecentDistortionParameters(decentDistortionParameters)
+      {  }
+
+   ossimRadialDecentLensDistortion(const ossimRadialDecentLensDistortion& copy)
+      : theCalibratedPrincipalPoint (copy.theCalibratedPrincipalPoint),
+        theRadialDistortionParameters (copy.theRadialDistortionParameters),
+        theDecentDistortionParameters (copy.theDecentDistortionParameters) { }
+
+   ossimRadialDecentLensDistortion(const ossimKeywordlist& kwl,
+                                   const char* prefix);
+
+   virtual ~ossimRadialDecentLensDistortion(){}
+   
+   /*!
+    * Implementation of base class 2D-to-2D transformation. The "forward"
+    * transformation is defined here as going from an undistorted ideal point to
+    * a distorted real point, i.e., adding distortion.
+    * 
+    * Also available (implemented in the base class) are:
+    *   inverse(distorted_point_in, undistorted_pt_out)
+    *   inverse(undistort_this_pt)
+    */
+   virtual void forward(const ossimDpt& undistorted_point_in,
+                        ossimDpt&       distorted_point_out) const;
+
+   virtual void forward(ossimDpt&  modify_this) const 
+      {
+         ossimDpt output;
+         forward(modify_this, output);
+         modify_this = output;
+      }
+      
+   
+   /*!
+    * Method to save the state of the object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0) const;
+
+   /*!
+    * Method to the load (recreate) the state of the object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   /*!
+    * Set methods provide alternative initialization scheme to loadState:
+    */
+   void setPrincipalPoint(const ossimDpt pp);
+   void setRadialDistortionParams(const NEWMAT::ColumnVector& params);
+   void setDecentDistortionParams(const NEWMAT::ColumnVector& params);
+   /*!
+    * Dumps contents of object to ostream.
+    */
+   virtual std::ostream& print(std::ostream& out) const;
+   
+   static const char* PRINCIPAL_POINT_X_KW;
+   static const char* PRINCIPAL_POINT_Y_KW;
+   static const char* RADIAL_DISTORTION_COEFF_KW;
+   static const char* DECENT_DISTORTION_COEFF_KW;
+   
+protected:
+   /*!
+    * default implementation Will solve the polynomial:
+    *
+    * k0 + k1*r^2 + k2*r^4 + k3*r^6 + k4*r^8
+    */
+   virtual double deltaR(double radius)const;
+   
+   ossimDpt     theCalibratedPrincipalPoint;
+   NEWMAT::ColumnVector theRadialDistortionParameters;
+   NEWMAT::ColumnVector theDecentDistortionParameters;  
+
+   TYPE_DATA
+};
+
+//*****************************************************************************
+//  INLINE METHODS
+//*****************************************************************************
+inline void
+ossimRadialDecentLensDistortion::setPrincipalPoint(const ossimDpt pp)
+{
+   theCalibratedPrincipalPoint = pp;
+}
+
+inline void ossimRadialDecentLensDistortion::setRadialDistortionParams
+   (const NEWMAT::ColumnVector& params)
+{
+   theRadialDistortionParameters = params;
+}
+
+inline void ossimRadialDecentLensDistortion::setDecentDistortionParams
+   (const NEWMAT::ColumnVector& params)
+{
+   theDecentDistortionParameters = params;
+}
+
+
+#endif
diff --git a/include/ossim/projection/ossimRpcModel.h b/ossim/include/ossim/projection/ossimRpcModel.h
similarity index 100%
rename from include/ossim/projection/ossimRpcModel.h
rename to ossim/include/ossim/projection/ossimRpcModel.h
diff --git a/ossim/include/ossim/projection/ossimRpcProjection.h b/ossim/include/ossim/projection/ossimRpcProjection.h
new file mode 100644
index 0000000..347d0a5
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimRpcProjection.h
@@ -0,0 +1,238 @@
+//*****************************************************************************
+// FILE: ossimRpcProjection.h
+//
+// MIT
+//
+// DESCRIPTION: Contains declaration of class ossimRpcProjection.
+//   This is a replacement model utilizing the Rational Polynomial Coefficients
+//   (RPC), a.k.a. Rapid Positioning Capability, and Universal Sensor Model
+//   (USM).
+//
+//*****************************************************************************
+//  $Id: ossimRpcProjection.h 23666 2015-12-14 20:01:22Z rashadkm $
+
+#ifndef ossimRpcProjection_HEADER
+#define ossimRpcProjection_HEADER
+
+#include <ossim/projection/ossimOptimizableProjection.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/base/ossimAdjustableParameterInterface.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/matrix/newmat.h>
+
+/*!****************************************************************************
+ *
+ * CLASS:  ossimRpcProjection
+ *
+ *****************************************************************************/
+class OSSIM_DLL ossimRpcProjection : public ossimProjection,
+                                     public ossimOptimizableProjection,
+                                     public ossimAdjustableParameterInterface
+{
+public:
+   //***
+   // Enumeration of supported RPC polynomial formats:
+   //***
+   enum PolynomialType
+   {
+      A='A',  // corresponds to "RPC00A"
+      B='B'   // corresponds to "RPC00B"
+   };
+   
+   /*!
+    * CONSTRUCTORS:
+    */
+   ossimRpcProjection();
+   ossimRpcProjection(const ossimRpcProjection& copy_this);
+   ~ossimRpcProjection();
+
+   ossimRpcProjection& operator=(const ossimRpcProjection& source);
+
+   void initAdjustableParameters();
+   virtual void adjustableParametersChanged();
+   
+   virtual ossimObject* getBaseObject();
+   virtual const ossimObject* getBaseObject()const;
+   
+   void setAttributes(ossim_float64 theSampleOffset,
+                      ossim_float64 theLineOffset,
+                      ossim_float64 theSampleScale,
+                      ossim_float64 theLineScale,
+                      ossim_float64 theLatOffset,
+                      ossim_float64 theLonOffset,
+                      ossim_float64 theHeightOffset,
+                      ossim_float64 theLatScale,
+                      ossim_float64 theLonScale,
+                      ossim_float64 theHeightScale,
+                      const std::vector<double>& xNumeratorCoeffs,
+                      const std::vector<double>& xDenominatorCoeffs,
+                      const std::vector<double>& yNumeratorCoeffs,
+                      const std::vector<double>& yDenominatorCoeffs,
+                      PolynomialType polyType = B);
+                      
+   /*!
+    * METHOD: worldToLineSample()
+    * Overrides base class implementation. Directly computes line-sample from
+    * the polynomials.
+    */
+   virtual void  worldToLineSample(const ossimGpt& world_point,
+                                   ossimDpt&       image_point) const;
+   /*!
+    * METHOD: print()
+    * Extends base-class implementation. Dumps contents of object to ostream.
+    */
+   virtual std::ostream& print(std::ostream& out) const;
+
+   /*!
+    * METHODS:  saveState, loadState
+    * Fulfills ossimObject base-class pure virtuals. Loads and saves geometry
+    * KWL files. Returns true if successful.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0) const;
+
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   virtual void  lineSampleToWorld(const ossimDpt& image_point,
+                                   ossimGpt&       world_point) const;
+   //***
+   // METHOD: lineSampleHeightToWorld()
+   // Overrides base class pure virtual. Height understood to be relative to
+   // standard ellipsoid.
+   //***
+   virtual void lineSampleHeightToWorld(const ossimDpt& image_point,
+                                        const double&   heightEllipsoid,
+                                        ossimGpt&       worldPoint) const;
+
+   /*!
+    * METHOD: dup()
+    * Returns pointer to a new instance, copy of this.
+    */
+   virtual ossimObject* dup() const { return new ossimRpcProjection(*this); }
+
+   virtual ossimGpt origin()const;
+   virtual ossimDpt getMetersPerPixel() const;
+   virtual bool operator==(const ossimProjection& projection) const;
+   
+   /*
+    * optimizable interface
+    */
+    virtual bool setupOptimizer(const ossimString& setup);
+    inline virtual bool useForward()const {return true;}
+    virtual ossim_uint32 degreesOfFreedom()const;
+    virtual double optimizeFit(const ossimTieGptSet& tieSet, double* targetVariance=NULL);
+   /*!
+    * METHOD: getForwardDeriv()
+    * gives forward() partial derivative regarding parameter parmIdx (>=0)
+    * default implementation is centered finite difference
+    * -should be reimplemented with formal derivative in child class
+    */
+   virtual ossimDpt getForwardDeriv(int parmIdx, const ossimGpt& gpos, double hdelta=1e-11);
+
+   /*!
+    * METHOD: getInverseDeriv()
+    * gives inverse() partial derivative regarding parameter parmIdx (>=0)
+    * default implementation is centered finite difference
+    * -should be reimplemented with formal derivative in child class
+    */
+   virtual ossimGpt getInverseDeriv(int parmIdx, const ossimDpt& ipos, double hdelta=1e-11);
+
+   /**
+    * @brief Implementation of pure virtual
+    * ossimProjection::isAffectedByElevation method.
+    * @return true.
+    */
+   virtual bool isAffectedByElevation() const { return true; }
+
+protected:
+   //***
+   // Methods for computing RPC polynomial and its derivatives:
+   //***
+   double polynomial(const double& nlat,
+                     const double& nlon,
+                     const double& nhgt,
+                     const double* coeffs) const;
+   double dPoly_dLat(const double& nlat,
+                     const double& nlon,
+                     const double& nhgt,
+                     const double* coeffs) const;
+   double dPoly_dLon(const double& nlat,
+                     const double& nlon,
+                     const double& nhgt,
+                     const double* coeffs) const;
+   
+   /*!
+    * METHOD: buildNormalEquation
+    * builds linearized system  (LMS equivalent)
+    * A*dp = projResidue
+    * 
+    * A: symetric matrix = tJ*J
+    * dp: system parameter shift that we want to estimate
+    * projResidue = tJ * residue
+    *
+    * t: transposition operator
+    * J = jacobian of transform relative to parameters p, transform can be forward() or inverse()
+    * jacobian is obtained via finite differences
+    * residue can be image (2D) or ground residue(3D)
+    *
+    * TODO: use image/ground points covariance matrices
+    */
+   void buildNormalEquation(const ossimTieGptSet& tieSet,
+                                      NEWMAT::SymmetricMatrix& A,
+                                      NEWMAT::ColumnVector& residue,
+                                      NEWMAT::ColumnVector& projResidue,
+                                      double pstep_scale);
+
+   /*!
+    * METHOD: getResidue()
+    * returns ground opr image residue
+    */
+   NEWMAT::ColumnVector getResidue(const ossimTieGptSet& tieSet);
+
+   NEWMAT::ColumnVector solveLeastSquares(NEWMAT::SymmetricMatrix& A,  NEWMAT::ColumnVector& r)const;
+
+   /*!
+    * stable invert stolen from ossimRpcSolver
+    */
+   NEWMAT::Matrix invert(const NEWMAT::Matrix& m)const;
+
+   PolynomialType thePolyType;
+   //***
+   // Quantities for zero-biasing and normalizing the image point and
+   // ground point coordinates referenced in the polynomials:
+   //***
+   double theLineScale;
+   double theSampScale;
+   double theLatScale;
+   double theLonScale;
+   double theHgtScale;
+   double theLineOffset;
+   double theSampOffset;
+   double theLatOffset;
+   double theLonOffset;
+   double theHgtOffset;
+
+   //***
+   // Coefficients:
+   //***
+   double theLineNumCoef[20];
+   double theLineDenCoef[20];
+   double theSampNumCoef[20];
+   double theSampDenCoef[20];
+
+   //*
+   // Quantities derived from the adjustable parameters:
+   //*
+   double theIntrackOffset;
+   double theCrtrackOffset;
+   double theIntrackScale;
+   double theCrtrackScale;
+   double theYawSkew;  // = sin(theYawOffset)
+   double theCosMapRot;
+   double theSinMapRot;
+   
+   TYPE_DATA
+};
+
+#endif
diff --git a/ossim/include/ossim/projection/ossimRpcSolver.h b/ossim/include/ossim/projection/ossimRpcSolver.h
new file mode 100644
index 0000000..d42c1fb
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimRpcSolver.h
@@ -0,0 +1,244 @@
+//*****************************************************************************
+// FILE: ossimRpcModel.h
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// AUTHOR: Garrett Potts
+//
+//*****************************************************************************
+//  $Id: ossimRpcSolver.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimRpcSolver_HEADER
+#define ossimRpcSolver_HEADER
+
+#include <vector>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/matrix/newmat.h>
+#include <ossim/projection/ossimRpcModel.h>
+#include <ossim/projection/ossimRpcProjection.h>
+
+class ossimProjection;
+class ossimImageGeometry;
+class ossimNitfRegisteredTag;
+
+/**
+ * This currently only support Rational poilynomial B format.  This can be
+ * found in the NITF registered commercial tag document.
+ *
+ * @note x=longitude, y=latitude, z=height
+ * 
+ * <pre>
+ * Format is:
+ *  coeff[ 0]       + coeff[ 1]*x     + coeff[ 2]*y     + coeff[ 3]*z     +
+ *  coeff[ 4]*x*y   + coeff[ 5]*x*z   + coeff[ 6]*y*z   + coeff[ 7]*x*x   +
+ *  coeff[ 8]*y*y   + coeff[ 9]*z*z   + coeff[10]*x*y*z + coeff[11]*x*x*x +
+ *  coeff[12]*x*y*y + coeff[13]*x*z*z + coeff[14]*x*x*y + coeff[15]*y*y*y +
+ *  coeff[16]*y*z*z + coeff[17]*x*x*z + coeff[18]*y*y*z + coeff[19]*z*z*z;
+ *
+ *       where coeff is one of XNum, XDen, YNum, and YDen.  So there are 80
+ *       coefficients all together.
+ *
+ *       
+ * Currently we use a linear least squares fit to solve the coefficients.
+ * This is the simplest to implement.  We probably relly need a nonlinear
+ * minimizer to fit the coefficients but I don't have time to experiment.
+ * Levenberg Marquardt might be a solution to look into.
+ *
+ *
+ * 
+ * HOW TO USE:
+ * 
+ *        ossimRpcSolver solver;
+ *        solver.solveCoefficients(rect,
+ *                                 *proj.get());
+ *                                 
+ * We can also call solve coefficients with a list of ground control points.
+ * First is the list of image points followed by the ground points.
+ * NOTE: Thes must be equal in size.
+ * 
+ *        solver.solveCoefficients(imagePoints,
+ *                                 groundPoints);
+ *                                 
+ *                                 
+ * Once you call solveCoefficients you can create the projector:
+ *                                 
+ *        ossimRefPtr<ossimRpcProjection> rpc = solver.createRpcProjection();
+ *
+ * </pre>
+ * 
+ */ 
+class OSSIM_DLL ossimRpcSolver : public ossimReferenced
+{
+public:
+   /**
+    * The use elvation flag will deterimne if we force the height t be 0.
+    * If the elevation is enabled then we use the height field of the control
+    * points to determine the coefficients of the RPC00 polynomial.  If its
+    * false then we will ignore the height by setting the height field to 0.0.
+    *
+    * Note:  even if the elevation is enabled all NAN heights are set to 0.0.
+    */
+   ossimRpcSolver(bool useElevation=false,
+                  bool useHeightAboveMSLFlag=false);
+
+   
+   /**
+    * This will convert any projector to an RPC model
+    */
+   void solveCoefficients(const ossimDrect& imageBouunds,
+                          ossimProjection* imageProj,
+                          ossim_uint32 xSamples=8,
+                          ossim_uint32 ySamples=8,
+                          bool shiftTo0Flag=true);
+   
+   void solveCoefficients(const ossimDrect& imageBouunds,
+                          ossimImageGeometry* geom,
+                          ossim_uint32 xSamples=8,
+                          ossim_uint32 ySamples=8,
+                          bool shiftTo0Flag=true);
+   
+   /**
+    * takes associated image points and ground points
+    * and solves the coefficents for the rational polynomial for
+    * line and sample calculations from world points.
+    *
+    * Note: All data will be normalized between -1 and 1 for
+    *       numerical robustness.
+    */ 
+   void solveCoefficients(const std::vector<ossimDpt>& imagePoints,
+                          const std::vector<ossimGpt>& groundControlPoints,
+                          const ossimDpt& imageShift = ossimDpt(0.0,0.0));
+
+   /**
+    * Creates and Rpc model from the coefficients
+    */
+   ossimImageGeometry* createRpcModel()const;
+
+   /**
+    * Create a simple rpc projection which is a dumbed down
+    * rpc model.
+    */
+   ossimImageGeometry* createRpcProjection()const;
+
+
+   /**
+    * Gives access to the solved coefficients.  For the image
+    * X numerator
+    */
+   const std::vector<double>& getImageXNumCoefficients()const;
+
+   /**
+    * Gives access to the solved coefficients.  For the image
+    * X denominator
+    */
+   const std::vector<double>& getImageXDenCoefficients()const;
+
+   /**
+    * Gives access to the solved coefficients.  For the image
+    * Y numerator
+    */
+   const std::vector<double>& getImageYNumCoefficients()const;
+
+   /**
+    * Gives access to the solved coefficients. For the image
+    * Y denominator
+    */
+   const std::vector<double>& getImageYDenCoefficients()const;
+
+   
+   double getImageXOffset()const;
+   double getImageYOffset()const;
+   double getLatOffset()const;
+   double getLonOffset()const;
+   double getHeightOffset()const;
+   double getImageXScale()const;
+   double getImageYScale()const;
+   double getLatScale()const;
+   double getLonScale()const;
+   double getHeightScale()const;
+
+   double getRmsError()const;
+
+   /**
+    * @return ossimRefPtr<ossimNitfRegisteredTag>
+    *
+    * @note one of the solve methods should have been called prior to this.
+    */
+   ossimRefPtr<ossimNitfRegisteredTag> getNitfRpcBTag() const;
+   
+protected:
+	virtual ~ossimRpcSolver(){}
+   
+   virtual void solveInitialCoefficients(NEWMAT::ColumnVector& coeff,
+                                         const std::vector<double>& f,
+                                         const std::vector<double>& x,
+                                         const std::vector<double>& y,
+                                         const std::vector<double>& z)const;
+                                         
+   virtual void solveCoefficients(NEWMAT::ColumnVector& coeff,
+                                  const std::vector<double>& f,
+                                  const std::vector<double>& x,
+                                  const std::vector<double>& y,
+                                  const std::vector<double>& z)const;
+   
+   double eval(const std::vector<double>& coeff,
+               double x,
+               double y,
+               double z)const;
+
+   /**
+    * Inverts using the SVD method
+    */
+   NEWMAT::Matrix invert(const NEWMAT::Matrix& m)const;
+   
+   void setupSystemOfEquations(NEWMAT::Matrix& equations,
+                               const NEWMAT::ColumnVector& f,
+                               const std::vector<double>& x,
+                               const std::vector<double>& y,
+                               const std::vector<double>& z)const;
+
+   void setupWeightMatrix(NEWMAT::DiagonalMatrix& result, // holds the resulting weights
+                          const NEWMAT::ColumnVector& coefficients,
+                          const NEWMAT::ColumnVector& f,
+                          const std::vector<double>& x,
+                          const std::vector<double>& y,
+                          const std::vector<double>& z)const;
+
+   bool theUseElevationFlag;
+   bool theHeightAboveMSLFlag;
+   ossimDpt      theImageOffset;
+   ossimGpt      theGroundOffset;
+   ossimDpt      theImageScale;
+   ossim_float64 theLatScale;
+   ossim_float64 theLonScale;
+   ossim_float64 theHeightScale;
+   ossim_float64 theError;
+   /**
+    * there are 20 coefficients in the cubic RPC model
+    */ 
+   std::vector<ossim_float64> theXNumCoeffs;
+
+   /**
+    * there are 20 coefficients in the cubic RPC model
+    */ 
+   std::vector<ossim_float64> theXDenCoeffs;
+
+   /**
+    * there are 20 coefficients in the cubic RPC model
+    */ 
+   std::vector<ossim_float64> theYNumCoeffs;
+
+   /**
+    * there are 20 coefficients in the cubic RPC model
+    */ 
+   std::vector<ossim_float64> theYDenCoeffs;
+   
+};
+
+#endif
+
diff --git a/ossim/include/ossim/projection/ossimRsmModel.h b/ossim/include/ossim/projection/ossimRsmModel.h
new file mode 100644
index 0000000..33ef418
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimRsmModel.h
@@ -0,0 +1,166 @@
+//---
+// File: ossimRsmModel.h
+//---
+#ifndef ossimRsmModel_H
+#define ossimRsmModel_H 1
+
+#include <ossim/projection/ossimSensorModel.h>
+#include <iosfwd>
+
+/**
+ * @class ossimRsmModel
+ */
+class OSSIM_DLL ossimRsmModel : public ossimSensorModel
+{
+public:
+
+   /** @brief default constructor */
+   ossimRsmModel();
+
+   /** @brief copy constructor */
+   ossimRsmModel( const ossimRsmModel& obj );
+
+   /** @brief assignment operator */
+   const ossimRsmModel& operator=( const ossimRsmModel& rhs );
+
+   /**
+    * @brief worldToLineSample()
+    * Overrides base class implementation. Directly computes line-sample from
+    * the polynomials.
+    */
+   virtual void  worldToLineSample(const ossimGpt& world_point,
+                                   ossimDpt&       image_point) const;
+ 
+
+   /**
+    * @brief lineSampleToWorld()
+    * Overrides base class pure virtual.  Intersects DEM.
+    */
+   virtual void  lineSampleToWorld(const ossimDpt& image_point,
+                                   ossimGpt&       world_point) const;
+   /**
+    * @brief lineSampleHeightToWorld()
+    * Overrides base class pure virtual. Height understood to be relative to
+    * standard ellipsoid.
+    */
+   virtual void lineSampleHeightToWorld(const ossimDpt& image_point,
+                                        const double&   heightEllipsoid,
+                                        ossimGpt&       worldPoint) const;
+   
+   /**
+    * @brief imagingRay()
+    * Overrides base class pure virtual.
+    */
+   virtual void imagingRay(const ossimDpt& image_point,
+                           ossimEcefRay&   image_ray) const;
+
+   virtual void updateModel();
+   virtual void initAdjustableParameters();
+
+   /**
+    * @brief dup()
+    * Returns pointer to a new instance, copy of this.
+    */
+   virtual ossimObject* dup() const;
+
+   inline virtual bool useForward()const {return false;}
+
+   double polynomial( const double& x, const double& y, const double& z,
+                      const ossim_uint32& maxx, const ossim_uint32& maxy,
+                      const ossim_uint32& maxz,
+                      std::vector<ossim_float64> pcf ) const;
+   
+   double dPoly_dLat( const double& x, const double& y, const double& z,
+                      const ossim_uint32& maxx, const ossim_uint32& maxy,
+                      const ossim_uint32& maxz,
+                      std::vector<ossim_float64> pcf) const;
+   
+   double dPoly_dLon( const double& x, const double& y, const double& z,
+                      const ossim_uint32& maxx, const ossim_uint32& maxy,
+                      const ossim_uint32& maxz,
+                      std::vector<ossim_float64> pcf ) const;
+   
+   double dPoly_dHgt( const double& x, const double& y, const double& z,
+                      const ossim_uint32& maxx, const ossim_uint32& maxy,
+                      const ossim_uint32& maxz,
+                      std::vector<ossim_float64> pcf ) const;
+
+   /**
+    * @brief print()
+    * Extends base-class implementation. Dumps contents of object to ostream.
+    */
+   virtual std::ostream& print(std::ostream& out) const;
+
+   /**
+    * @brief saveState
+    * Fulfills ossimObject base-class pure virtuals. Loads and saves geometry
+    * KWL files. Returns true if successful.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0) const;
+   
+   /**
+    * @brief loadState
+    * Fulfills ossimObject base-class pure virtuals. Loads and saves geometry
+    * KWL files. Returns true if successful.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+protected:
+   
+   /** @brief virtual destructor */
+   virtual ~ossimRsmModel();
+   
+   ossimString m_iid;
+   ossimString m_edition;
+
+   ossim_uint32 m_rsn;
+   ossim_uint32 m_csn;
+
+   ossim_float64 m_rfep;
+   ossim_float64 m_cfep;
+   ossim_float64 m_rnrmo;
+   ossim_float64 m_cnrmo;
+   ossim_float64 m_xnrmo;
+   ossim_float64 m_ynrmo;
+   ossim_float64 m_znrmo;
+   ossim_float64 m_rnrmsf;
+   ossim_float64 m_cnrmsf;
+   ossim_float64 m_xnrmsf;
+   ossim_float64 m_ynrmsf;
+   ossim_float64 m_znrmsf;
+   
+   ossim_uint32 m_rnpwrx;
+   ossim_uint32 m_rnpwry;
+   ossim_uint32 m_rnpwrz;
+   ossim_uint32 m_rntrms;
+
+   std::vector<ossim_float64> m_rnpcf;
+
+   ossim_uint32 m_rdpwrx;
+   ossim_uint32 m_rdpwry;
+   ossim_uint32 m_rdpwrz;
+   ossim_uint32 m_rdtrms;
+
+   std::vector<ossim_float64> m_rdpcf;
+
+   ossim_uint32 m_cnpwrx;
+   ossim_uint32 m_cnpwry;
+   ossim_uint32 m_cnpwrz;
+   ossim_uint32 m_cntrms;
+
+   std::vector<ossim_float64> m_cnpcf;
+
+   ossim_uint32 m_cdpwrx;
+   ossim_uint32 m_cdpwry;
+   ossim_uint32 m_cdpwrz;
+   ossim_uint32 m_cdtrms;
+
+   std::vector<ossim_float64> m_cdpcf;
+
+   TYPE_DATA
+      
+}; // End: class ossimRsmModel
+
+#endif /* #ifndef ossimRsmModel_H */
diff --git a/include/ossim/projection/ossimSarModel.h b/ossim/include/ossim/projection/ossimSarModel.h
similarity index 100%
rename from include/ossim/projection/ossimSarModel.h
rename to ossim/include/ossim/projection/ossimSarModel.h
diff --git a/ossim/include/ossim/projection/ossimSensorModel.h b/ossim/include/ossim/projection/ossimSensorModel.h
new file mode 100644
index 0000000..920cbed
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimSensorModel.h
@@ -0,0 +1,393 @@
+//*****************************************************************************
+// FILE: ossimSensorModel.h
+//
+// License:  See top level LICENSE.txt file.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION:
+//   Contains declaration of class ossimSensorModel. This is the base class to
+//   all sensor model-related projections including replacement models such as
+//   coarse grids and polynomial models. This base class supports adjustable
+//   parameters for registration adjustment.
+//
+//   Important note to sensor model implementors: In order to avoid a separate
+//   set of "initial adjustable parameters," this design assumes ALL initial
+//   values are 0. When designing the derived-class model, insure that the
+//   adjustable parameters are 0-based. This applies to theAdjustableParams
+//   array declared in this base class only. The derived classes can declare
+//   their own adjstable params that are more descriptive and that can be
+//   assigned an initial value that is non-zero, but that are linearly related
+//   to the adjustable params of this class. In that case, the updateModel()
+//   method will compute the derived-class's parameters based on
+//   theAdjustableParams array, after an adjustment is made.
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimSensorModel.h 23516 2015-09-14 18:22:38Z dburken $
+
+#ifndef ossimSensorModel_HEADER
+#define ossimSensorModel_HEADER 1
+
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/projection/ossimBilinearProjection.h>
+#include <ossim/projection/ossimOptimizableProjection.h>
+#include <ossim/base/ossimEcefRay.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimPolygon.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimCommon.h> /* for ossim::nan() */
+#include <ossim/elevation/ossimElevSource.h>
+#include <ossim/base/ossimAdjustableParameterInterface.h>
+#include <ossim/matrix/newmat.h>
+#include <ossim/matrix/newmatap.h>
+#include <ossim/base/ossimException.h>
+class ossimKeywordlist;
+class ossimTieGptSet;
+
+/*!****************************************************************************
+ *
+ * CLASS:  ossimSensorModel
+ *
+ *****************************************************************************/
+class OSSIMDLLEXPORT ossimSensorModel : public ossimProjection,
+                                        public ossimOptimizableProjection,
+                                        public ossimAdjustableParameterInterface
+{
+public:
+
+   enum CovMatStatus
+   {
+      COV_INVALID = 0,
+      COV_PARTIAL = 1,
+      COV_FULL    = 2
+   };
+
+   enum DeriveMode
+   {
+      OBS_INIT =-99,
+      EVALUATE =-98,
+      P_WRT_X = -1,
+      P_WRT_Y = -2,
+      P_WRT_Z = -3
+   };
+   
+   /*!
+    * CONSTRUCTORS:
+    */
+   ossimSensorModel();
+   ossimSensorModel(const ossimSensorModel& copy_this);
+   ossimSensorModel(const ossimKeywordlist& geom_kwl);
+
+   /** @brief assignment operator */
+   const ossimSensorModel& operator=( const ossimSensorModel& rhs );
+
+   virtual ossimObject* getBaseObject();
+   virtual const ossimObject* getBaseObject()const;
+   
+   /*!
+    * ACCESS METHODS:
+    */
+   virtual ossimGpt origin()            const {return theRefGndPt; }
+   virtual ossimDpt getMetersPerPixel() const {return ossimDpt(fabs(theGSD.x),
+                                                               fabs(theGSD.y));}
+   
+   //! Returns the estimated Absolute horizontal position error (CE90) of the sensor model.
+   virtual const double& getNominalPosError() const { return theNominalPosError; }
+
+   //! Returns the estimated RELATIVE horizontal position error (CE90) of the sensor model.
+   virtual const double& getRelativePosError() const { return theRelPosError; }
+
+   //! Assigns the absolute image position error uncertainty (abs CE90)
+   virtual void setNominalPosError(const double& ce90) { theNominalPosError = ce90; }
+
+   //! Assigns the relative image position error uncertainty (rel CE90)
+   virtual void setRelativePosError(const double& ce90) { theRelPosError = ce90; }
+
+   /*!
+    * Implementation of base-class pure virtual projection methods. These
+    * methods may be overriden by derived classes if those have more efficient
+    * schemes. The implementations here are iterative (relatively slow). Both
+    * depend on calls to the pure virtual lineSampleHeightToWorld() method.
+    */
+   virtual void  lineSampleToWorld(const ossimDpt& image_point,
+                                   ossimGpt&       world_point) const;
+   virtual void  worldToLineSample(const ossimGpt& world_point,
+                                   ossimDpt&       image_point) const;
+
+   /*!
+    * METHOD: lineSampleHeightToWorld
+    * This is the pure virtual that performs the actual work of projecting
+    * the image point to the given elevation above Ellipsoid. 
+    */
+   virtual void lineSampleHeightToWorld(const ossimDpt& lineSampPt,
+                                        const double&   heightEllipsoid,
+                                        ossimGpt&       worldPt) const = 0;
+   /*!
+    * METHOD: imagingRay(image_point, &ossimEcefRay)
+    * Given an image point, returns a ray originating at some arbitrarily high
+    * point (ideally at the sensor position) and pointing towards the target.
+    * Implemented here but should be overriden for more efficient solution.
+    */
+   virtual void imagingRay(const ossimDpt& image_point,
+                           ossimEcefRay&   image_ray) const;
+
+   /*!
+    * METHOD: print()
+    * Fulfills base-class pure virtual. Dumps contents of object to ostream.
+    */
+   virtual std::ostream& print(std::ostream& out) const;
+
+   /**
+    * @brief Sets the center line sampe of the image.
+    *
+    * @param pt Image center point (x = sample, y = line).
+    */
+   void setRefImgPt(const ossimDpt& pt);
+
+   /**
+    * @brief Sets the center latitude, longitude, height of the image.
+    *
+    * @param pt Image center point.
+    */
+   void setRefGndPt(const ossimGpt& pt);
+   
+
+   void setImageRect(const ossimDrect& imageRect);
+   void setGroundRect(const ossimGpt& ul,
+                      const ossimGpt& ur,
+                      const ossimGpt& lr,
+                      const ossimGpt& ll);
+   /*!
+    * METHOD: imageSize()
+    * Returns the maximum line/sample rigorously defined by this model.
+    */
+   ossimDpt imageSize() const { return theImageSize; }
+   void setImageSize(const ossimDpt& size){theImageSize = size;}
+   /*!
+    * This is from the adjustable parameter interface.  It is
+    * called when a paraemter adjustment is made.
+    */
+   virtual void adjustableParametersChanged()
+      {
+         updateModel();
+      }
+   /*!
+    * VIRTUAL METHOD: updateModel()
+    * Following a change to the adjustable parameter set, this virtual
+    * is called to permit instances to compute derived quantities after
+    * parameter change.
+    */
+   virtual void updateModel() {}
+
+   /*!
+    * METHODS:  saveState, loadState
+    * Fulfills ossimObject base-class pure virtuals. Loads and saves geometry
+    * KWL files.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0) const;
+
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+
+   /*!
+    * METHOD: insideImage(image_point)
+    * Returns true if the image_point lies inside the image rectangle.
+    */
+   virtual bool insideImage(const ossimDpt& p) const
+      {
+/*          return( (p.u>=(0.0-FLT_EPSILON)) && */
+/*                  (p.u<=(double)(theImageSize.u-(1-FLT_EPSILON))) && */
+/*                  (p.v>=(0.0-FLT_EPSILON)) && */
+/*                  (p.v<=(double)(theImageSize.v-(1-FLT_EPSILON))) ); */
+         // if it's close to the edge we will consider it inside the image
+         //
+         return theImageClipRect.pointWithin(p, 2.0);
+      }
+
+   /*!
+    * STATIC METHOD: writeGeomTemplate(ostream)
+    * Writes a template of keywords processed by loadState and saveState to
+    * output stream.
+    */
+   static void writeGeomTemplate(ostream& os);
+
+   /*!
+    * OPERATORS: 
+    */
+   virtual bool operator==(const ossimProjection& proj) const; //inline below
+
+    //! Access methods:
+    const ossimString&   getImageID()               const { return theImageID; }
+    const ossimDrect&    getImageClipRect()         const { return theImageClipRect; }
+
+   /*!
+    * optimizableProjection implementation
+    */
+   virtual ossim_uint32 degreesOfFreedom()const;
+   inline virtual bool needsInitialState()const {return true;}
+   virtual double optimizeFit(const ossimTieGptSet& tieSet,
+                              double* targetVariance=0);
+
+   /*!
+    * METHOD: getForwardDeriv()
+    * gives forward() partial derivative regarding parameter parmIdx (>=0)
+    * default implementation is centered finite difference
+    * -should be reimplemented with formal derivative in child class
+    */
+   virtual ossimDpt getForwardDeriv(int parmIdx, const ossimGpt& gpos, double hdelta=1e-11);
+
+   /*!
+    * METHOD: getInverseDeriv()
+    * gives inverse() partial derivative regarding parameter parmIdx (>=0)
+    * default implementation is centered finite difference
+    * -should be reimplemented with formal derivative in child class
+    */
+   virtual ossimGpt getInverseDeriv(int parmIdx, const ossimDpt& ipos, double hdelta=1e-11);
+
+   /*!
+    * METHOD: getObsCovMat()
+    * @brief Gives 2X2 covariance matrix of observations
+    */
+   virtual ossimSensorModel::CovMatStatus getObsCovMat(
+      const ossimDpt& ipos, NEWMAT::SymmetricMatrix& Cov,
+      const ossim_float64 defPointingSigma = 0.5);
+
+   /**
+    * @brief Implementation of pure virtual
+    * ossimProjection::isAffectedByElevation method.
+    * @return true.
+    */
+   virtual bool isAffectedByElevation() const { return true; }
+
+   /**
+    * This method computes the ground sample distance(gsd) and sets class
+    * attributes theGSD and theMeanGSD by doing a lineSampleHeightToWorld on
+    * four points and calculating the distance from them.
+    *
+    * @return Nothing but throws ossimException on error.
+    */
+   void computeGsd();
+
+   /**
+    * @brief Extracts geometry info from a non-ossim key,value pair 
+    * to an ossim keyword list.
+    *
+    * @param key non-ossim-based input ossimString 
+    * @param value non-ossim-based input ossimString
+    * @param geomKwl The keyword list to fill in.
+    */
+   virtual bool getImageGeometry( 
+      const ossimString& /* key */, const ossimString& /* value */, 
+      ossimKeywordlist& /* geomKwl */ ) const { return false; }
+
+protected:
+   virtual ~ossimSensorModel();
+
+   
+   /*!
+    * METHOD: extrapolate()
+    * Extrapolates solutions for points outside of the image. The second
+    * version accepts a height value -- if left at the default, the elevation
+    * will be looked up via theElevation object.
+    */
+   virtual ossimDpt extrapolate (const ossimGpt& gp) const;
+   virtual ossimGpt extrapolate (const ossimDpt& ip,
+				 const double& height=ossim::nan()) const;
+
+   /*!
+    * METHOD: buildNormalEquation
+    * builds linearized system  (LMS equivalent)
+    * A*dp = projResidue
+    * 
+    * A: symetric matrix = tJ*J
+    * dp: system parameter shift that we want to estimate
+    * projResidue = tJ * residue
+    *
+    * t: transposition operator
+    * J = jacobian of transform relative to parameters p, transform can be forward() or inverse()
+    * jacobian is obtained via finite differences
+    * residue can be image (2D) or ground residue(3D)
+    *
+    * TODO: use image/ground points covariance matrices
+    */
+   void buildNormalEquation(const ossimTieGptSet& tieSet,
+                                      NEWMAT::SymmetricMatrix& A,
+                                      NEWMAT::ColumnVector& residue,
+                                      NEWMAT::ColumnVector& projResidue,
+                                      double pstep_scale);
+
+   /*!
+    * METHOD: getResidue()
+    * returns ground opr image residue
+    */
+   NEWMAT::ColumnVector getResidue(const ossimTieGptSet& tieSet);
+
+   NEWMAT::ColumnVector solveLeastSquares(NEWMAT::SymmetricMatrix& A,  NEWMAT::ColumnVector& r)const;
+
+   /*!
+    * stable invert stolen from ossimRpcSolver
+    */
+   NEWMAT::Matrix invert(const NEWMAT::Matrix& m)const;
+
+   ossimIpt       theImageSize;       // pixels
+
+   /*!
+    * Support sub-image of larger full image by maintaining offset to UL corner
+    */
+   ossimDpt       theSubImageOffset;  // pixels
+   
+   ossimString    theImageID;
+   ossimString    theSensorID;
+   ossimDpt       theGSD;             // meters
+   ossim_float64  theMeanGSD;         // meters
+   ossimGpt       theRefGndPt;        // should be image center
+   ossimDpt       theRefImgPt;        // should be image center
+   ossimPolygon   theBoundGndPolygon;
+   ossimDrect     theImageClipRect;
+   ossim_float64  theRelPosError; 	// meters, relative to other models in the set
+   ossim_float64  theNominalPosError; // meters
+
+   /** Partials for current point */
+   ossimDpt theParWRTx;
+   ossimDpt theParWRTy;
+   ossimDpt theParWRTz;
+   
+   /** Observations & residuals for current point */
+   ossimDpt theObs;
+   ossimDpt theResid;
+
+   /**
+    * Used as an initial guess for iterative solutions and a guess for points outside the support
+    * bounds.
+    */ 
+   ossimRefPtr<ossimProjection> theSeedFunction;
+   
+   mutable bool theExtrapolateImageFlag;
+   mutable bool theExtrapolateGroundFlag;
+   
+TYPE_DATA
+};
+
+//================= BEGIN INLINE DEFINITIONS =================================
+
+//*****************************************************************************
+//  OPERATOR == 
+//*****************************************************************************
+inline bool ossimSensorModel::operator==(const ossimProjection& proj) const
+{
+   const  ossimSensorModel* model
+      = PTR_CAST(ossimSensorModel, (const ossimProjection*) &proj);
+    
+   if ( (!model) ||
+	(theSensorID != model->theSensorID) ||
+	(theImageID != model->theImageID) ||
+	(theSubImageOffset != model->theSubImageOffset) )
+      return false;
+
+   return true;
+}
+
+#endif
diff --git a/ossim/include/ossim/projection/ossimSensorModelFactory.h b/ossim/include/ossim/projection/ossimSensorModelFactory.h
new file mode 100644
index 0000000..540c068
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimSensorModelFactory.h
@@ -0,0 +1,65 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Oscar Kramer
+//
+// Description: Factory for all ossim sensor models.
+// 
+//*******************************************************************
+//  $Id: ossimSensorModelFactory.h 22862 2014-08-05 18:54:37Z dburken $
+#ifndef ossimSensorModelFactory_HEADER
+#define ossimSensorModelFactory_HEADER
+#include <ossim/projection/ossimProjectionFactoryBase.h>
+
+class ossimProjection;
+class ossimString;
+class ossimFilename;
+
+class OSSIM_DLL ossimSensorModelFactory : public ossimProjectionFactoryBase
+{
+public:
+   /*!
+    * METHOD: instance()
+    * For accessing static instance of concrete factory.
+    */
+   static ossimSensorModelFactory* instance();
+   
+   virtual ossimProjection* createProjection(const ossimFilename& filename,
+                                             ossim_uint32 entryIdx)const;
+   /*!
+    * METHOD: create()
+    * Attempts to create an instance of the Product given a Specifier or
+    * keywordlist. Returns successfully constructed product or NULL.
+    */
+   virtual ossimProjection* createProjection(const ossimString& spec)     const;
+   virtual ossimProjection* createProjection(const ossimKeywordlist& kwl,
+                                             const char* prefix = 0)      const;
+
+   virtual ossimObject* createObject(const ossimString& typeName)const;
+
+   /*!
+    * Creates and object given a keyword list.
+    */
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
+                                     const char* prefix=0)const;
+   
+   /*!
+    * This should return the type name of all objects in all factories.
+    * This is the name used to construct the objects dynamially and this
+    * name must be unique.
+    */
+   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
+   
+protected:
+
+   // Hidden from use default constructor:
+   ossimSensorModelFactory(){}
+   
+   bool isNitf(const ossimFilename& filename)const;
+   bool isLandsat(const ossimFilename& filename)const;
+   void findCoarseGrid(ossimFilename& result,
+                       const ossimFilename& geomFile)const;
+};
+
+#endif
diff --git a/include/ossim/projection/ossimSensorModelTuple.h b/ossim/include/ossim/projection/ossimSensorModelTuple.h
similarity index 100%
rename from include/ossim/projection/ossimSensorModelTuple.h
rename to ossim/include/ossim/projection/ossimSensorModelTuple.h
diff --git a/include/ossim/projection/ossimSinusoid.h b/ossim/include/ossim/projection/ossimSinusoid.h
similarity index 100%
rename from include/ossim/projection/ossimSinusoid.h
rename to ossim/include/ossim/projection/ossimSinusoid.h
diff --git a/include/ossim/projection/ossimSinusoidalProjection.h b/ossim/include/ossim/projection/ossimSinusoidalProjection.h
similarity index 100%
rename from include/ossim/projection/ossimSinusoidalProjection.h
rename to ossim/include/ossim/projection/ossimSinusoidalProjection.h
diff --git a/include/ossim/projection/ossimSkyBoxLearSensor.h b/ossim/include/ossim/projection/ossimSkyBoxLearSensor.h
similarity index 100%
rename from include/ossim/projection/ossimSkyBoxLearSensor.h
rename to ossim/include/ossim/projection/ossimSkyBoxLearSensor.h
diff --git a/include/ossim/projection/ossimSmacCallibrationSystem.h b/ossim/include/ossim/projection/ossimSmacCallibrationSystem.h
similarity index 100%
rename from include/ossim/projection/ossimSmacCallibrationSystem.h
rename to ossim/include/ossim/projection/ossimSmacCallibrationSystem.h
diff --git a/include/ossim/projection/ossimSonomaSensor.h b/ossim/include/ossim/projection/ossimSonomaSensor.h
similarity index 100%
rename from include/ossim/projection/ossimSonomaSensor.h
rename to ossim/include/ossim/projection/ossimSonomaSensor.h
diff --git a/include/ossim/projection/ossimSpaceObliqueMercatorProjection.h b/ossim/include/ossim/projection/ossimSpaceObliqueMercatorProjection.h
similarity index 100%
rename from include/ossim/projection/ossimSpaceObliqueMercatorProjection.h
rename to ossim/include/ossim/projection/ossimSpaceObliqueMercatorProjection.h
diff --git a/include/ossim/projection/ossimSpot5Model.h b/ossim/include/ossim/projection/ossimSpot5Model.h
similarity index 100%
rename from include/ossim/projection/ossimSpot5Model.h
rename to ossim/include/ossim/projection/ossimSpot5Model.h
diff --git a/ossim/include/ossim/projection/ossimStatePlaneProjectionInfo.h b/ossim/include/ossim/projection/ossimStatePlaneProjectionInfo.h
new file mode 100644
index 0000000..f3d4d57
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimStatePlaneProjectionInfo.h
@@ -0,0 +1,103 @@
+//*******************************************************************
+//
+// License:  See top LICENSE.txt file.
+//
+// Author: Garrett Potts
+//*******************************************************************
+//  $Id: ossimStatePlaneProjectionInfo.h 23353 2015-06-01 19:19:10Z dburken $
+#ifndef ossimStatePlaneProjectionInfo_HEADER
+#define ossimStatePlaneProjectionInfo_HEADER 1
+
+#include <ossim/base/ossimConstants.h> /* for OSSIM_DLL macro */
+#include <ossim/base/ossimDms.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimString.h>
+#include <ostream>
+
+class ossimDatum;
+class ossimMapProjection;
+class ossimKeywordlist;
+
+class OSSIM_DLL ossimStatePlaneProjectionInfo
+{
+   friend OSSIM_DLL std::ostream& operator<<(std::ostream&,
+                                             const ossimStatePlaneProjectionInfo&);
+
+public:
+
+   ossimStatePlaneProjectionInfo(const std::string&  name,
+                                 int                 pcsCode,
+                                 const std::string&  projCode,
+                                 const std::string&  param1,
+                                 const std::string&  param2,
+                                 const std::string&  param3,
+                                 const std::string&  param4,
+                                 double              falseEast,
+                                 double              falseNorth,
+                                 const std::string&  units,
+                                 const std::string&  datumName);
+  
+   int                code()                  const;
+   const ossimString& name()                  const;
+   const ossimString& projName()              const;
+   double             originLat()             const;
+   double             originLon()             const;
+   const ossimDatum*  datum()                 const;
+   ossimGpt           origin()                const;
+   double             parallel1()             const;
+   double             parallel2()             const;
+   double             falseEasting()          const;
+   double             falseNorthing()         const;
+   double             falseEastingInMeters()  const;
+   double             falseNorthingInMeters() const;
+   double             scaleFactor()           const;
+
+   /** Not stored as string; hence, returned by value. */
+   ossimString        units()                 const;
+
+   /**
+    * 
+    * @return ossimUnitType
+    */
+   ossimUnitType getUnitType() const;
+
+   /**
+    * Checks parameters of projection against this.
+    *
+    * @return true if projection parameters match this, false if not.
+    */
+   bool matchesProjection(const ossimMapProjection* proj) const;
+   
+   bool               isSameCode( int Code )  const;
+
+   void populateProjectionKeywords(ossimKeywordlist& kwl,
+                                   const char* prefix=0)const;
+private:
+   
+   int                  thePcsCode;       // The Geotiff code 
+   ossimString          theName;          // Descriptive PCS name
+   
+   /*!
+    * ossimLambertConformalConicProjection or
+    * ossimTransMercatorProjection
+    */
+   ossimString          theProjectionName;
+   
+   const ossimDatum*    theDatum; // Either NAD83 or NAD27  based on name
+   
+   ossimDms             theOriginLat;
+   ossimDms             theOriginLon;
+   ossimGpt             theOrigin;
+   
+   double               theParameter3;      // parallel 1   or   Scale factor
+   double               theParameter4;      // parallel 2   or      0
+   
+   double               theFalseEasting;
+   double               theFalseNorthing;
+   
+   double               theScaleFactor;
+   
+   ossimUnitType        theUnits;        // "us_survey_ft" "feet" or "meters"
+};
+
+#endif /* #ifndef ossimStatePlaneProjectionInfo_HEADER */
diff --git a/include/ossim/projection/ossimStereographicProjection.h b/ossim/include/ossim/projection/ossimStereographicProjection.h
similarity index 100%
rename from include/ossim/projection/ossimStereographicProjection.h
rename to ossim/include/ossim/projection/ossimStereographicProjection.h
diff --git a/ossim/include/ossim/projection/ossimTiffProjectionFactory.h b/ossim/include/ossim/projection/ossimTiffProjectionFactory.h
new file mode 100644
index 0000000..ff12970
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimTiffProjectionFactory.h
@@ -0,0 +1,68 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+// class ossimProjectionFactory maintains a static list of projection
+// makers.  If a user wants to create a projection they can pass in
+// a projection name and a datum if desired.  Currently the default
+// datum will be WGS84.
+//*******************************************************************
+//  $Id: ossimTiffProjectionFactory.h 23440 2015-07-16 19:41:16Z dburken $
+
+#ifndef ossimTiffProjectionFactory_HEADER
+#define ossimTiffProjectionFactory_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/projection/ossimProjectionFactoryBase.h>
+
+class ossimProjection;
+class ossimString;
+
+class OSSIM_DLL ossimTiffProjectionFactory : public ossimProjectionFactoryBase
+{
+public:
+   /*!
+    * METHOD: instance()
+    * Instantiates singleton instance of this class:
+    */
+   static ossimTiffProjectionFactory* instance();
+
+   virtual ossimProjection* createProjection(const ossimFilename& filename,
+                                             ossim_uint32 entryIdx)const;
+   /*!
+    * METHOD: create()
+    * Attempts to create an instance of the projection specified by name.
+    * Returns successfully constructed projection or NULL.
+    */
+   virtual ossimProjection* createProjection(const ossimString& name)const;
+   virtual ossimProjection* createProjection(const ossimKeywordlist& kwl,
+                                             const char* prefix = 0)const;
+   ossimProjection* createProjection(ossimImageHandler* handler)const;
+
+   virtual ossimObject* createObject(const ossimString& typeName)const;
+
+   /*!
+    * Creates and object given a keyword list.
+    */
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
+                                     const char* prefix=0)const;
+   
+   /*!
+    * This should return the type name of all objects in all factories.
+    * This is the name used to construct the objects dynamially and this
+    * name must be unique.
+    */
+   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
+
+protected:
+   ossimTiffProjectionFactory() {}
+   static ossimTiffProjectionFactory*  theInstance;
+
+   bool isTiff(const ossimFilename& filename)const;
+};
+
+#endif
diff --git a/include/ossim/projection/ossimTranmerc.h b/ossim/include/ossim/projection/ossimTranmerc.h
similarity index 100%
rename from include/ossim/projection/ossimTranmerc.h
rename to ossim/include/ossim/projection/ossimTranmerc.h
diff --git a/include/ossim/projection/ossimTransCylEquAreaProjection.h b/ossim/include/ossim/projection/ossimTransCylEquAreaProjection.h
similarity index 100%
rename from include/ossim/projection/ossimTransCylEquAreaProjection.h
rename to ossim/include/ossim/projection/ossimTransCylEquAreaProjection.h
diff --git a/include/ossim/projection/ossimTransMercatorProjection.h b/ossim/include/ossim/projection/ossimTransMercatorProjection.h
similarity index 100%
rename from include/ossim/projection/ossimTransMercatorProjection.h
rename to ossim/include/ossim/projection/ossimTransMercatorProjection.h
diff --git a/include/ossim/projection/ossimUps.h b/ossim/include/ossim/projection/ossimUps.h
similarity index 100%
rename from include/ossim/projection/ossimUps.h
rename to ossim/include/ossim/projection/ossimUps.h
diff --git a/include/ossim/projection/ossimUpsProjection.h b/ossim/include/ossim/projection/ossimUpsProjection.h
similarity index 100%
rename from include/ossim/projection/ossimUpsProjection.h
rename to ossim/include/ossim/projection/ossimUpsProjection.h
diff --git a/ossim/include/ossim/projection/ossimUpspt.h b/ossim/include/ossim/projection/ossimUpspt.h
new file mode 100644
index 0000000..a884a18
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimUpspt.h
@@ -0,0 +1,44 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author:  Garrett Potts(gpotts at imagelinks.com)
+//
+// Description:
+//
+// This is the Universal Polar Stereographic (UPS) point.  Allows
+// easy onversion between different coordinates.
+//*******************************************************************
+//  $Id: ossimUpspt.h 23353 2015-06-01 19:19:10Z dburken $
+
+#ifndef ossimUpspt_HEADER
+#define ossimUpspt_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+
+class ossimUtmpt;
+class ossimGpt;
+class ossimEcefPoint;
+class ossimDatum;
+
+class OSSIM_DLL ossimUpspt
+{
+public:
+   ossimUpspt(const ossimGpt &aPt);
+   ossimUpspt(const ossimEcefPoint &aPt);
+
+   char hemisphere()const{return theHemisphere;}
+   double easting()const {return theEasting;}
+   double northing()const{return theNorthing;}
+   const ossimDatum* datum()const{return theDatum;}
+   
+private:
+   char    theHemisphere;
+   double  theEasting;
+   double  theNorthing;
+   ossimDatum  *theDatum;
+
+   void convertFromGeodetic(const ossimGpt &aPt);
+};
+
+#endif
diff --git a/ossim/include/ossim/projection/ossimUtm.h b/ossim/include/ossim/projection/ossimUtm.h
new file mode 100644
index 0000000..ace6048
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimUtm.h
@@ -0,0 +1,178 @@
+#ifndef UTM_H
+#define UTM_H 1
+/***************************************************************************/
+/* RSC IDENTIFIER: UTM
+ *
+ * ABSTRACT
+ *
+ *    This component provides conversions between geodetic coordinates 
+ *    (latitude and longitudes) and Universal Transverse Mercator (UTM)
+ *    projection (zone, hemisphere, easting, and northing) coordinates.
+ *
+ * ERROR HANDLING
+ *
+ *    This component checks parameters for valid values.  If an invalid value
+ *    is found, the error code is combined with the current error code using 
+ *    the bitwise or.  This combining allows multiple error codes to be
+ *    returned. The possible error codes are:
+ *
+ *          UTM_NO_ERROR           : No errors occurred in function
+ *          UTM_LAT_ERROR          : Latitude outside of valid range
+ *                                    (-80.5 to 84.5 degrees)
+ *          UTM_LON_ERROR          : Longitude outside of valid range
+ *                                    (-180 to 360 degrees)
+ *          UTM_EASTING_ERROR      : Easting outside of valid range
+ *                                    (100,000 to 900,000 meters)
+ *          UTM_NORTHING_ERROR     : Northing outside of valid range
+ *                                    (0 to 10,000,000 meters)
+ *          UTM_ZONE_ERROR         : Zone outside of valid range (1 to 60)
+ *          UTM_HEMISPHERE_ERROR   : Invalid hemisphere ('N' or 'S')
+ *          UTM_ZONE_OVERRIDE_ERROR: Zone outside of valid range
+ *                                    (1 to 60) and within 1 of 'natural' zone
+ *          UTM_A_ERROR            : Semi-major axis less than or equal to zero
+ *          UTM_INV_F_ERROR        : Inverse flattening outside of valid range
+ *								  	                (250 to 350)
+ *
+ * REUSE NOTES
+ *
+ *    UTM is intended for reuse by any application that performs a Universal
+ *    Transverse Mercator (UTM) projection or its inverse.
+ *    
+ * REFERENCES
+ *
+ *    Further information on UTM can be found in the Reuse Manual.
+ *
+ *    UTM originated from :  U.S. Army Topographic Engineering Center
+ *                           Geospatial Information Division
+ *                           7701 Telegraph Road
+ *                           Alexandria, VA  22310-3864
+ *
+ * LICENSES
+ *
+ *    None apply to this component.
+ *
+ * RESTRICTIONS
+ *
+ *    UTM has no restrictions.
+ *
+ * ENVIRONMENT
+ *
+ *    UTM was tested and certified in the following environments:
+ *
+ *    1. Solaris 2.5 with GCC, version 2.8.1
+ *    2. MSDOS with MS Visual C++, version 6
+ *
+ * MODIFICATIONS
+ *
+ *    Date              Description
+ *    ----              -----------
+ *    10-02-97          Original Code
+ *
+ */
+
+
+/***************************************************************************/
+/*
+ *                              DEFINES
+ */
+#include <ossim/base/ossimConstants.h>
+
+  #define UTM_NO_ERROR            0x0000
+  #define UTM_LAT_ERROR           0x0001
+  #define UTM_LON_ERROR           0x0002
+  #define UTM_EASTING_ERROR       0x0004
+  #define UTM_NORTHING_ERROR      0x0008
+  #define UTM_ZONE_ERROR          0x0010
+  #define UTM_HEMISPHERE_ERROR    0x0020
+  #define UTM_ZONE_OVERRIDE_ERROR 0x0040
+  #define UTM_A_ERROR             0x0080
+  #define UTM_INV_F_ERROR         0x0100
+
+
+/***************************************************************************/
+/*
+ *                              FUNCTION PROTOTYPES
+ *                                for UTM.C
+ */
+
+/* ensure proper linkage to c++ programs */
+  #ifdef __cplusplus
+extern "C" {
+  #endif
+
+  long OSSIM_DLL Set_UTM_Parameters(double a,      
+                          double f,
+                          long   override);
+/*
+ * The function Set_UTM_Parameters receives the ellipsoid parameters and
+ * UTM zone override parameter as inputs, and sets the corresponding state
+ * variables.  If any errors occur, the error code(s) are returned by the 
+ * function, otherwise UTM_NO_ERROR is returned.
+ *
+ *    a                 : Semi-major axis of ellipsoid, in meters       (input)
+ *    f                 : Flattening of ellipsoid                       (input)
+ *    override          : UTM override zone, zero indicates no override (input)
+ */
+
+
+  void OSSIM_DLL Get_UTM_Parameters(double *a,
+                          double *f,
+                          long   *override);
+/*
+ * The function Get_UTM_Parameters returns the current ellipsoid
+ * parameters and UTM zone override parameter.
+ *
+ *    a                 : Semi-major axis of ellipsoid, in meters       (output)
+ *    f                 : Flattening of ellipsoid                       (output)
+ *    override          : UTM override zone, zero indicates no override (output)
+ */
+
+
+  long OSSIM_DLL Convert_Geodetic_To_UTM (double Latitude,
+                                double Longitude,
+                                long   *Zone,
+                                char   *Hemisphere,
+                                double *Easting,
+                                double *Northing); 
+/*
+ * The function Convert_Geodetic_To_UTM converts geodetic (latitude and
+ * longitude) coordinates to UTM projection (zone, hemisphere, easting and
+ * northing) coordinates according to the current ellipsoid and UTM zone
+ * override parameters.  If any errors occur, the error code(s) are returned
+ * by the function, otherwise UTM_NO_ERROR is returned.
+ *
+ *    Latitude          : Latitude in radians                 (input)
+ *    Longitude         : Longitude in radians                (input)
+ *    Zone              : UTM zone                            (output)
+ *    Hemisphere        : North or South hemisphere           (output)
+ *    Easting           : Easting (X) in meters               (output)
+ *    Northing          : Northing (Y) in meters              (output)
+ */
+
+
+  long OSSIM_DLL Convert_UTM_To_Geodetic(long   Zone,
+                               char   Hemisphere,
+                               double Easting,
+                               double Northing,
+                               double *Latitude,
+                               double *Longitude);
+/*
+ * The function Convert_UTM_To_Geodetic converts UTM projection (zone, 
+ * hemisphere, easting and northing) coordinates to geodetic(latitude
+ * and  longitude) coordinates, according to the current ellipsoid
+ * parameters.  If any errors occur, the error code(s) are returned
+ * by the function, otherwise UTM_NO_ERROR is returned.
+ *
+ *    Zone              : UTM zone                               (input)
+ *    Hemisphere        : North or South hemisphere              (input)
+ *    Easting           : Easting (X) in meters                  (input)
+ *    Northing          : Northing (Y) in meters                 (input)
+ *    Latitude          : Latitude in radians                    (output)
+ *    Longitude         : Longitude in radians                   (output)
+ */
+
+  #ifdef __cplusplus
+}
+  #endif
+
+#endif /* UTM_H */
diff --git a/include/ossim/projection/ossimUtmProjection.h b/ossim/include/ossim/projection/ossimUtmProjection.h
similarity index 100%
rename from include/ossim/projection/ossimUtmProjection.h
rename to ossim/include/ossim/projection/ossimUtmProjection.h
diff --git a/ossim/include/ossim/projection/ossimUtmpt.h b/ossim/include/ossim/projection/ossimUtmpt.h
new file mode 100644
index 0000000..a259681
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimUtmpt.h
@@ -0,0 +1,90 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+// This is the Universal Transverse Mercator (UTM) point.  Allows
+// easy onversion between different coordinates.
+//*******************************************************************
+//  $Id: ossimUtmpt.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimUtmpt_HEADER
+#define ossimUtmpt_HEADER
+
+#include <ossim/base/ossimConstants.h>
+
+class ossimGpt;
+class ossimEcefPoint;
+class ossimUpspt;
+class ossimDatum;
+
+class OSSIMDLLEXPORT ossimUtmpt
+{
+public:
+   ossimUtmpt(const ossimGpt &aPt);
+   ossimUtmpt(const ossimEcefPoint &aPt);
+   ossimUtmpt(long         zone,
+              char         hemisphere,  // N or S
+              double       easting,
+              double       northing,
+              const ossimDatum* datum);
+   
+   // ossimUtmpt(const ossimUpspt &aPt);
+
+   /**
+    * Return the zone for this utm point.
+    */
+   long zone() const { return theZone; }
+
+   /**
+    * Return the hemisphere ( Northern or Southern).
+    * We store this as a char value N or S.  We store it
+    * like this because we are interfacing to geotrans
+    * and geotrans stores their values in this manner.
+    */
+   char hemisphere() const { return theHemisphere; }
+
+   /**
+    * return the easting value in meters.
+    */
+   double easting() const { return theEasting; }
+
+   /**
+    * return the northing value in meters.
+    */
+   double northing() const { return theNorthing; }
+
+   /**
+    * return the reference datum for this point.
+    */
+   const ossimDatum* datum() const { return theDatum; }
+
+   /**
+    * Initializes this point to utm coordinates for the ground point.
+    *
+    * @param aPt Ground point to initialize from.
+    */
+   void convertFromGround(const ossimGpt &aPt);
+
+   /**
+    * Initializes the ground point from the utm coordinates of this point.
+    *
+    * @param aPt Ground point to initialize.
+    */
+   void convertToGround(ossimGpt &aPt);
+   
+private:
+   long               theZone;
+   char               theHemisphere;
+   double             theEasting;
+   double             theNorthing;
+   const ossimDatum*  theDatum;
+};
+
+#endif
+
diff --git a/include/ossim/projection/ossimVanDerGrintenProjection.h b/ossim/include/ossim/projection/ossimVanDerGrintenProjection.h
similarity index 100%
rename from include/ossim/projection/ossimVanDerGrintenProjection.h
rename to ossim/include/ossim/projection/ossimVanDerGrintenProjection.h
diff --git a/include/ossim/projection/ossimWarpProjection.h b/ossim/include/ossim/projection/ossimWarpProjection.h
similarity index 100%
rename from include/ossim/projection/ossimWarpProjection.h
rename to ossim/include/ossim/projection/ossimWarpProjection.h
diff --git a/ossim/include/ossim/projection/ossimWktProjectionFactory.h b/ossim/include/ossim/projection/ossimWktProjectionFactory.h
new file mode 100644
index 0000000..d65a0bb
--- /dev/null
+++ b/ossim/include/ossim/projection/ossimWktProjectionFactory.h
@@ -0,0 +1,76 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author:  Oscar Kramer
+//
+//*******************************************************************
+//  $Id: ossimWktProjectionFactory.h 22924 2014-10-27 16:32:58Z okramer $
+
+#ifndef ossimWktProjectionFactory_HEADER
+#define ossimWktProjectionFactory_HEADER
+
+#include <ossim/projection/ossimProjectionFactoryBase.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimRefPtr.h>
+
+class ossimProjection;
+class ossimString;
+class ossimMapProjection;
+class ossimDatum;
+
+//*************************************************************************************************
+//! Projection Factory for coded projections defined in database. These are projections
+//! that are fully defined in database files and specified via a projection coordinate system (PCS)
+//! code, such as EPSG codes.
+//*************************************************************************************************
+class OSSIMDLLEXPORT ossimWktProjectionFactory : public ossimProjectionFactoryBase
+{
+public:
+   /*!
+    * METHOD: instance()
+    * Instantiates singleton instance of this class:
+    */
+   static ossimWktProjectionFactory* instance();
+
+   virtual ossimProjection* createProjection(const ossimFilename& filename,
+                                             ossim_uint32 entryIdx) const;
+
+   //! This is the principal factory method. It accepts a WKT string, for example 
+   //! "Anguilla_1957_British_West_Indies_Grid"
+   virtual ossimProjection* createProjection(const ossimString& name) const;
+
+   //! Looks for presence of "projection" keyword with the value in WKT format,
+   //! for example "Anguilla_1957_British_West_Indies_Grid" 
+   virtual ossimProjection* createProjection(const ossimKeywordlist& kwl,
+                                             const char* prefix = 0)const;
+
+   virtual ossimObject* createObject(const ossimString& typeName)const;
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl, const char* prefix=0)const;
+   
+    //! This returns the type name of all objects in all factories. This is the name used to 
+    //! construct the objects dynamically and this name must be unique.
+   virtual void getTypeNameList(std::vector<ossimString>& typeList) const;
+
+protected:
+
+   //! Constructor loads the WKT CSV file specified in the ossim prefs with "wkt_database_file"
+   //! keyword.
+   ossimWktProjectionFactory() {}
+
+   ossimProjection* doTransverseMercator(const ossimKeywordlist& kwl)const;
+   ossimProjection* doMercator(const ossimKeywordlist& kwl)const;
+   ossimProjection* doLambertConformalConic(const ossimKeywordlist& kwl) const;
+   ossimProjection* doEquiDistCylindrical(const ossimKeywordlist& kwl) const;
+   ossimProjection* doEquiAreaCylindrical(const ossimKeywordlist& kwl) const;
+
+   void loadRecords() const;
+
+   template<class T> void doMapCommon(const ossimKeywordlist& kwl, T proj) const;
+
+   static ossimWktProjectionFactory*  m_instance; //!< Singleton implementation
+   mutable std::map<std::string, ossim_uint32> m_wktProjRecords;
+
+};
+
+#endif
diff --git a/include/ossim/support_data/ossimAigBounds.h b/ossim/include/ossim/support_data/ossimAigBounds.h
similarity index 100%
rename from include/ossim/support_data/ossimAigBounds.h
rename to ossim/include/ossim/support_data/ossimAigBounds.h
diff --git a/include/ossim/support_data/ossimAigDataFileHeader.h b/ossim/include/ossim/support_data/ossimAigDataFileHeader.h
similarity index 100%
rename from include/ossim/support_data/ossimAigDataFileHeader.h
rename to ossim/include/ossim/support_data/ossimAigDataFileHeader.h
diff --git a/include/ossim/support_data/ossimAigHeader.h b/ossim/include/ossim/support_data/ossimAigHeader.h
similarity index 100%
rename from include/ossim/support_data/ossimAigHeader.h
rename to ossim/include/ossim/support_data/ossimAigHeader.h
diff --git a/include/ossim/support_data/ossimAigIndexFileHeader.h b/ossim/include/ossim/support_data/ossimAigIndexFileHeader.h
similarity index 100%
rename from include/ossim/support_data/ossimAigIndexFileHeader.h
rename to ossim/include/ossim/support_data/ossimAigIndexFileHeader.h
diff --git a/include/ossim/support_data/ossimAigStatistics.h b/ossim/include/ossim/support_data/ossimAigStatistics.h
similarity index 100%
rename from include/ossim/support_data/ossimAigStatistics.h
rename to ossim/include/ossim/support_data/ossimAigStatistics.h
diff --git a/include/ossim/support_data/ossimAlphaSensorSupportData.h b/ossim/include/ossim/support_data/ossimAlphaSensorSupportData.h
similarity index 100%
rename from include/ossim/support_data/ossimAlphaSensorSupportData.h
rename to ossim/include/ossim/support_data/ossimAlphaSensorSupportData.h
diff --git a/ossim/include/ossim/support_data/ossimApplanixEOFile.h b/ossim/include/ossim/support_data/ossimApplanixEOFile.h
new file mode 100644
index 0000000..c178c91
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimApplanixEOFile.h
@@ -0,0 +1,211 @@
+//*******************************************************************
+// Copyright (C) 2005 Garrett Potts
+//
+// MIT
+// 
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimApplanixEOFile.h 23666 2015-12-14 20:01:22Z rashadkm $
+#ifndef ossimApplanixEOFile_HEADER
+#define ossimApplanixEOFile_HEADER 1
+
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimString.h>
+#include <iostream>
+#include <map>
+#include <vector>
+
+class OSSIM_DLL ossimApplanixEORecord : public ossimReferenced
+{
+public:
+
+   OSSIM_DLL friend std::ostream& operator <<(std::ostream& out, const ossimApplanixEORecord& src);
+   ossimApplanixEORecord(const ossimApplanixEORecord& src)
+      :theField(src.theField)
+   {
+   }
+   ossimApplanixEORecord(ossim_uint32 size=0)
+   {
+      setSize(size);
+   }
+
+   void setSize(ossim_uint32 size)
+   {
+      theField.resize(size);
+   }
+   const ossimString& operator [](ossim_uint32 idx)const
+   {
+      return theField[idx];
+   }
+   ossimString& operator [](ossim_uint32 idx)
+   {
+      return theField[idx];
+   }
+
+   std::vector<ossimString> theField;
+};
+
+class OSSIM_DLL ossimApplanixEOFile : public ossimReferenced
+{
+public:
+   OSSIM_DLL friend std::ostream& operator <<(std::ostream& out, const ossimApplanixEOFile& src);
+   ossimApplanixEOFile();
+
+   /**
+    * Will parse the entire Exterior orientation file and then index any record
+    * ID's found.  This calls the parseStream method.
+    *
+    * @param file  The exterior orientation file
+    */ 
+   bool parseFile(const ossimFilename& file);
+
+   /**
+    * Will parse the stream and set internal queriable parameters.
+    * @param inThe input stream containing the Applanix format exterior orientation file
+    * 
+    */
+   bool parseStream(std::istream& in);
+   
+
+   /**
+    * Utility method that just checks for an APPlanix exterior orientation header.
+    * Will call the isEOFile(istream) method.
+    *
+    * @param file theExterior orientation file.
+    */ 
+   bool isEOFile(const ossimFilename& file)const;
+
+   /**
+    * Utility method that just checks for an APPlanix exterior orientation header.
+    */ 
+   bool isEOFile(std::istream& in)const;
+
+   /**
+    * Parses the header of the exterior orientation file.
+    * Calls the parseHeader(istream, header) method.
+    *
+    * @param file The filename that is an Applanix Exterior orientation file.
+    * @param header The resulting header that was parsed out.
+    */
+   bool parseHeader(const ossimFilename& file,
+                    ossimString& header)const;
+
+   /**
+    * Parses the header of the exterior orientation file.
+    * Calls the parseHeader(istream, header) method.
+    *
+    * @param in The input stream That contains an exterior orientation 
+    * @param header The resulting header that was parsed out.
+    */
+   bool parseHeader(std::istream& in,
+                    ossimString& header)const;
+
+   /**
+    * Is a case insensitive parse of the column names for the orientation
+    * record.  Note this will check to see if the search key is contained
+    * within any column heading.  So if a Heading has something like
+    * "ID MORE TEXT"  then you can call this with just "ID" and get a match
+    *
+    * @param searchKey  the substring to search for
+    * @return The id of the column or -1 if can't find the column
+    */
+   ossim_int32 getFieldIdxLike(const ossimString& searchKey)const;
+   
+   
+   /**
+    * Is a case insensitive parse of the column names for the orientation
+    * record.  Note this will check to see if the search key exactly matches
+    * a column heading.  So if a Heading has something like
+    * "ID MORE TEXT"  then you can call this with just "ID MORE TEXT" to have a match
+    *
+    * @param searchKey  the substring to search for
+    *
+    * @return The id of the column or -1 if can't find the column
+    */
+   ossim_int32 getFieldIdx(const ossimString& searchKey)const;
+   
+   /** 
+    * Will index all records based on the "ID #" field for fast searching.
+    */ 
+   void indexRecordIds();
+
+   /**
+    *  Given an ID it will search and find an EO record that matches the ID.
+    *
+    *  If the records are not indexed it will do a linear search on the record array.
+    *
+    *  @param id  The id of the record to find.
+    *  
+    *  @return The exterior orientation for that record.
+    */
+   const ossimRefPtr<ossimApplanixEORecord> getRecordGivenId(const ossimString& id)const;
+
+   ossim_uint32 getNumberOfRecords()const;
+   const ossimRefPtr<ossimApplanixEORecord> getRecord(ossim_uint32 idx)const;
+      
+   bool isHeightAboveMSL()const;
+   bool isEcefModel()const;
+   bool isUtmFrame()const;
+   ossim_int32 getUtmZone()const;
+   ossimString getUtmHemisphere()const;
+
+   ossimString getSbetField()const;
+   double getBoreSightTx()const;
+   double getBoreSightTy()const;
+   double getBoreSightTz()const;
+   double getLeverArmLx()const;
+   double getLeverArmLy()const;
+   double getLeverArmLz()const;
+   double getKardinalKappa()const;
+   double getShiftValuesX()const;
+   double getShiftValuesY()const;
+   double getShiftValuesZ()const;
+
+   ossimString getMappingFrameDatum()const;
+   ossimString getMappingFrameProjection()const;
+   double getMappingFrameCentralMeridian()const;
+   double getMappingFrameOriginLatitude()const;
+   double getMappingFrameGridScaleFactor()const;
+   double getMappingFrameFalseEasting()const;
+   double getMappingFrameFalseNorthing()const;
+
+   ossimString convertToOssimDatumCode(const ossimString& datum)const;
+   
+protected:
+   ossimString theHeader;
+   ossimString theVersion;
+   ossimString theBoreSightTx;
+   ossimString theBoreSightTy;
+   ossimString theBoreSightTz;
+   ossimString theKappaCardinal;
+   ossimString theLeverArmLx;
+   ossimString theLeverArmLy;
+   ossimString theLeverArmLz;
+   ossimString theShiftValuesX;
+   ossimString theShiftValuesY;
+   ossimString theShiftValuesZ;
+   ossimString theSbetField;
+
+   ossimString theMappingFrameDatum;
+   ossimString theMappingFrameProjection;
+   ossimString theCentralMeridian;
+   ossimString theOriginLatitude;
+   ossimString theGridScaleFactor;
+   ossimString theFalseEasting;
+   ossimString theFalseNorthing;
+   ossimString theUtmZone;
+   ossimString theUtmHemisphere;
+
+   ossim_float64 theMinLat;
+   ossim_float64 theMinLon;
+   ossim_float64 theMaxLat;
+   ossim_float64 theMaxLon;
+   std::vector<ossimString> theRecordFormat;
+   std::vector< ossimRefPtr<ossimApplanixEORecord> > theApplanixRecordList;
+   std::map<ossimString, ossimRefPtr<ossimApplanixEORecord>, ossimStringLtstr> theRecordIdMap;
+};
+
+#endif
diff --git a/ossim/include/ossim/support_data/ossimAuxFileHandler.h b/ossim/include/ossim/support_data/ossimAuxFileHandler.h
new file mode 100644
index 0000000..e5ce077
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimAuxFileHandler.h
@@ -0,0 +1,231 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: SPADAC Inc
+//         Adaptd from the GDAL package hfa dataset
+// Description: This class provides some simple utilities for aux file.
+//
+//********************************************************************
+// $Id: ossimAuxFileHandler.h 2644 2011-05-26 15:20:11Z oscar.kramer $
+
+#ifndef ossimAuxFileHandler_HEADER
+#define ossimAuxFileHandler_HEADER
+
+#include <cstring>
+#include <cstdlib>
+#include <string>
+#include <iostream>
+#include <fstream>
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimString.h>
+
+#define EPT_u1	0
+#define EPT_u2	1
+#define EPT_u4	2
+#define EPT_u8	3
+#define EPT_s8	4
+#define EPT_u16	5
+#define EPT_s16	6
+#define EPT_u32	7
+#define EPT_s32	8
+#define EPT_f32	9
+#define EPT_f64	10
+#define EPT_c64	11
+#define EPT_c128 12
+
+class ossimFilename;
+class ossimAuxEntry;
+class ossimAuxType;
+class ossimAuxDictionary;
+
+class ossimAuxInfo{
+
+public:
+  ossimAuxInfo();
+
+  virtual ~ossimAuxInfo();   
+
+  FILE *fp;
+
+  ossim_uint32  nEndOfFile;
+  ossim_uint32	nRootPos;
+  ossim_uint32	nDictionaryPos;
+
+  ossim_int16	nEntryHeaderLength;
+  ossim_int32	nVersion;
+
+  ossimAuxEntry* m_Root;
+
+  ossimAuxDictionary*  m_Dictionary;
+  char* dictionaryData;
+};
+
+
+class ossimAuxEntry
+{
+  ossim_uint32	nFilePos;
+
+  ossimAuxInfo*   m_auxInfo;
+  ossimAuxEntry*  m_Parent;
+  ossimAuxEntry*  m_Prev;
+  ossimAuxEntry*  m_Next;
+  ossimAuxEntry*  m_Child;
+
+  ossim_uint32	  nNextPos;
+  ossim_uint32	  nChildPos;
+  
+  char	entryNodeName[64];
+  char	entryType[32];
+
+  ossimAuxType* m_Type;
+  ossim_uint32	nDataPos;
+  ossim_uint32	nDataSize;
+  char*  entryData;
+
+  void	     loadData();
+
+  int 	     getFieldValue(const char* auxFieldPath,
+                           char chReqType, void *reqReturn);
+
+public:
+  ossimAuxEntry( ossimAuxInfo* auxInfoIn, ossim_uint32 nPos,
+    ossimAuxEntry* parentIn, ossimAuxEntry* prevIn);
+
+  virtual     ~ossimAuxEntry();                
+
+  ossim_uint32	getFilePos() { return nFilePos; }
+
+  const char*   getName() { return entryNodeName; }
+  void          setName( const char *nodeName );
+
+  const char*   getType() { return entryType; }
+
+  char*  getData() { loadData(); return entryData; }
+  ossim_uint32	getDataPos() { return nDataPos; }
+  ossim_uint32	getDataSize() { return nDataSize; }
+
+  ossimAuxEntry*     getChild();
+  ossimAuxEntry*     getNext();
+  ossimAuxEntry*     getNamedChild( const char * name);
+
+  ossim_int16	  getIntField( const char * auxFieldPath);
+  const char*   getStringField( const char * auxFieldPath);
+
+};
+
+class ossimAuxField
+{
+public:
+  int		nBytes;
+
+  int		nItemCount;
+  char	chPointer; 	/* '\0', '*' or 'p' */
+  char	chItemType;	/* 1|2|4|e|... */
+
+  char	*itemObjectType; /* if chItemType == 'o' */
+  ossimAuxType* m_auxItemObjectType;
+
+  char** enumNames; /* normally NULL if not an enum */
+
+  char	*fieldName;
+
+  ossimAuxField();
+  ~ossimAuxField();
+
+  int 	extractInstValue( const char * auxField, int nIndexValue,
+    char *entryData, ossim_uint32 nDataOffset, int nDataSize,
+    char chReqType, void *reqReturn );
+
+  int		getInstCount( char * entryData, int nDataSize );
+
+  int   getInstBytes( char *entryData, int nDataSize );
+
+  const char* initialize( const char * fieldInput );
+
+  void completeDefn( ossimAuxDictionary * auxDict );
+};
+
+
+class ossimAuxType
+{
+public:
+  int		nBytes;
+  int		nFields;
+
+  ossimAuxField** m_auxFields;
+
+  char* auxTypeName;
+
+  ossimAuxType();
+  ~ossimAuxType();
+
+  const char* initialize( const char * typeInput);
+
+  void	completeDefn( ossimAuxDictionary * auxDict);
+
+  int		getInstBytes(char *entryData, int nDataSize );
+
+  int   extractInstValue( const char * auxField,
+    char *entryData, ossim_uint32 nDataOffset, int nDataSize,
+    char chReqType, void *reqReturn );
+};
+
+class ossimAuxDictionary
+{
+public:
+  int		nTypes;
+  int   nTypesMax;
+  ossimAuxType**  m_auxTypes;
+
+  ossimAuxDictionary(const char *auxDictStr);
+  ~ossimAuxDictionary();
+
+  ossimAuxType* findType( const char * name);
+  void          addType( ossimAuxType * type);
+
+  static int	  getItemSize( char chType);
+};
+
+
+class OSSIM_DLL ossimAuxFileHandler
+{
+public:
+
+
+  ossimAuxFileHandler();
+  virtual ~ossimAuxFileHandler();
+  /**
+  * @read .aux file
+  */
+  bool isAuxFile(const ossimFilename& file);
+
+  /**
+  * @open the file for reading
+  */
+  bool open(const ossimFilename& file);
+
+  /**
+  *  Reads a single record from a aux file.
+  *  Returns true if succesful. Returns false if EOF or error.
+  */
+  const ossimString& getProjectionName() const { return m_projName; }
+
+  const ossimString& getDatumName() const { return m_datumName; }
+
+  const ossimString& getUnitType() const { return m_unitsType; }
+
+private:
+
+  ossimAuxInfo* m_auxInfo;
+  ossimString m_projName;
+  ossimString m_datumName;
+  ossimString m_unitsType;
+};
+
+#endif  // #ifndef ossimAuxFileHandlerl_HEADER
+
diff --git a/ossim/include/ossim/support_data/ossimAuxXmlSupportData.h b/ossim/include/ossim/support_data/ossimAuxXmlSupportData.h
new file mode 100644
index 0000000..9539afc
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimAuxXmlSupportData.h
@@ -0,0 +1,94 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: See class description below.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimAuxXmlSupportData_HEADER
+#define ossimAuxXmlSupportData_HEADER 1
+
+#include <ossim/base/ossimRefPtr.h>
+#include <iosfwd>
+#include <string>
+
+// Forward class declarations:
+class ossimDrect;
+class ossimFilename;
+class ossimProjection;
+class ossimString;
+class ossimXmlDocument;
+
+/**
+ * @class ossimAuxXmlSupportData
+ *
+ * Utility/support data class to extract the projection from a dot aux dot xml
+ * file commonly found with mrsid data.
+ */
+class OSSIM_DLL ossimAuxXmlSupportData
+{
+public:
+   
+   /** default constructor */
+   ossimAuxXmlSupportData();
+
+   /** virtual destructor */
+   virtual ~ossimAuxXmlSupportData();
+
+   /**
+    * @brief Method to get a projection if possible.
+    * @param file File name to open.
+    * @return Projection pointer wrapped in ref pointer.  Can be null if
+    * projection cannot be established.
+    */
+   ossimRefPtr<ossimProjection> getProjection(const ossimFilename& file) const;
+
+private:
+
+   /**
+    * @brief Gets path from doc and initializes string.
+    * @param path Xml path to look for.
+    * @param xdoc Xml doc to look in.
+    * @param s String to initialize.
+    * @return true on success and false if path is not found or if there
+    * are more than one of path.
+    */
+   bool getPath( const ossimString& path,
+                 const ossimXmlDocument& xdoc,
+                 ossimString& s ) const;
+
+   /**
+    * @brief Sets tie and scale.
+    * @param xdoc Xml document.
+    * @param wkt Well known tet string.
+    * @return True on success, false on error.
+    */
+   bool initializeProjection( const ossimXmlDocument xdoc,
+                              const std::string& wkt,
+                              ossimProjection* proj ) const;
+
+   /**
+    * @brief Get first parameter from PROJCS[ ... ] string.
+    * @param wkt Well known tet string.
+    * @param name Initialized by this with name if found.
+    * @return true on success, false on error.
+    */
+   bool getProjcsName( const std::string& wkt, std::string& name ) const;
+
+   /**
+    * @brief Gets units of Projected Coordinate System.
+    * @param wkt Well known tet string.
+    * @return Units.
+    */
+   ossimUnitType getUnits( const std::string& wkt ) const;
+
+};
+
+#endif /* End of "#ifndef ossimAuxXmlSupportData_HEADER" */
+
diff --git a/ossim/include/ossim/support_data/ossimCcfInfo.h b/ossim/include/ossim/support_data/ossimCcfInfo.h
new file mode 100644
index 0000000..6c3bd38
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimCcfInfo.h
@@ -0,0 +1,61 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: CCF Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossimCcfInfo_HEADER
+#define ossimCcfInfo_HEADER
+
+#include <iosfwd>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/support_data/ossimInfoBase.h>
+#include <ossim/base/ossimFilename.h>
+
+class ossimNitfFile;
+
+/**
+ * @brief NITF info class.
+ *
+ * Encapsulates the dumpnitf functionality.
+ */
+class OSSIM_DLL ossimCcfInfo : public ossimInfoBase
+{
+public:
+   
+   /** default constructor */
+   ossimCcfInfo();
+
+   /** virtual destructor */
+   virtual ~ossimCcfInfo();
+
+   /**
+    * @brief open method.
+    *
+    * @param file File name to open.
+    *
+    * @return true on success false on error.
+    */
+   virtual bool open(const ossimFilename& file);
+   
+   /**
+    * Print method.
+    *
+    * @param out Stream to print to.
+    * 
+    * @return std::ostream&
+    */
+   virtual std::ostream& print(std::ostream& out) const;
+
+private:
+   ossimFilename theFile;
+};
+
+#endif /* End of "#ifndef ossimCcfInfo_HEADER" */
+
diff --git a/include/ossim/support_data/ossimCeosData.h b/ossim/include/ossim/support_data/ossimCeosData.h
similarity index 100%
rename from include/ossim/support_data/ossimCeosData.h
rename to ossim/include/ossim/support_data/ossimCeosData.h
diff --git a/include/ossim/support_data/ossimDemGrid.h b/ossim/include/ossim/support_data/ossimDemGrid.h
similarity index 100%
rename from include/ossim/support_data/ossimDemGrid.h
rename to ossim/include/ossim/support_data/ossimDemGrid.h
diff --git a/ossim/include/ossim/support_data/ossimDemHeader.h b/ossim/include/ossim/support_data/ossimDemHeader.h
new file mode 100644
index 0000000..0b5edee
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimDemHeader.h
@@ -0,0 +1,384 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Ken Melero
+//         Orginally written by Jamie Moyers (jmoyers at geeks.com)
+//         Adapted from the package KDEM.
+// Description: This class parses a DEM header.
+//
+//********************************************************************
+// $Id: ossimDemHeader.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimDemHeader_HEADER
+#define ossimDemHeader_HEADER
+
+#include <string>
+#include <iosfwd>
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/support_data/ossimDemPoint.h>
+
+class ossimFilename;
+class ossimString;
+class ossimKeywordlist;
+
+class OSSIM_DLL ossimDemHeader
+{
+public:
+   
+   ossimDemHeader();
+   
+   friend OSSIM_DLL std::ostream& operator<<(std::ostream& s,
+                                             const ossimDemHeader& header);
+   friend OSSIM_DLL std::istream& operator>>(std::istream& s,
+                                             ossimDemHeader& header);
+
+   /**
+    * @brief open method that takes a file.
+    *
+    * @param file File name to open.
+    *
+    * @return true on success false on error.
+    */
+   bool open(const ossimFilename& file);
+
+   /**
+    * @brief open method that takes a stream.
+    *
+    * @param is The input stream to read from.
+    *
+    * @return stream
+    */
+   std::istream& open(std::istream& is);
+
+   /**
+    * Print method.
+    *
+    * @param out Stream to print to.
+    * 
+    * @return std::ostream&
+    */   
+   std::ostream& print(std::ostream& out) const;
+   
+   // Accessors
+
+   /*! Quadrangle name. */
+   std::string const& getQuadName() const;
+
+   /*! Free format desciptor field containing process information. */
+   std::string const& getProcessInfo () const;
+
+   /*!
+    *  SE geographic corner orderd as:
+    *  x == Longitude == SDDDMMSS.SSSS
+    *  (neg sign (s) right justified, no leading zeros,
+    *  plus sign (s) implied
+    */
+   double getSEGeoCornerX () const;
+
+   /*!
+    *  SE geographic corner orderd as:
+    *  y == Latitude == SDDMMSS.SSSS
+    *  (neg sign (s) right justified, no leading zeros,
+    *  plus sign (s) implied
+    */
+   double getSEGeoCornerY () const;
+
+   /*!
+    *  1 == Autocorrelation resample simple bilinear
+    *  2 == Manual profile GRIDEM simple bilinear
+    *  3 == DLG/hypsography CTOG 8-direction bilinear
+    *  4 == Interpolation from photogrammetic system contours DCASS 
+    *  4-direction bilinear
+    *  5 == DLG/hypsography LINETRACE, LT4X complex linear
+    *  6 == DLG/hypsography CPS-3, ANUDEM, GRASS complex polynomial
+    *  7 == Electronic imaging (non-photogrammetric), active or passive
+    *  sensor systems
+    */
+   ossim_int32 getProcessCode () const;
+
+   /*!
+    *  Used for 30 minute DEMs - Identifies 1:100,000 scale sections
+    *  Formatted as XNN, wher X is "S" == 7.5 min. & "F" == 15 min.
+    *  NN is a two digit sequence number
+    */
+   std::string const& getSectionIndicator() const;
+
+   /*!
+    *  Mapping Center origin code. "EMC","WMC","MCMC","RMMC","FS" and "GPM2"
+    */
+   std::string const& getMappingCenterCode() const;
+
+   /*!
+    *  1 == DEM-1
+    *  2 == DEM-2
+    *  3 == DEM-3
+    */
+   ossim_int32 getLevelCode() const;
+
+   /*!
+    *  1 == Regular
+    *  2 == Random (reserved for future use).
+    */
+   ossim_int32 getElevPattern() const;
+
+   /*!
+    *  Code defining ground planimetric reference system.
+    *  0 == Geographic
+    *  1 == UTM
+    *  2 == State Plane
+    */
+   ossim_int32 getGroundRefSysCode() const;
+
+   /*!
+    * @return The projection type as a string.
+    */
+   ossimString getProjectionType() const;
+
+   /*!
+    *  Code defining zone in ground planimetric reference system.
+    */
+   ossim_int32 getGroundRefSysZone() const;
+
+   /*!
+    *  Code defining unit of measure for ground planimetric coordinates
+    *  used throughout the file.
+    *  0 == Radians
+    *  1 == Feet
+    *  2 == Meters
+    *  3 == Arc Seconds
+    */
+   ossim_int32 getGroundRefSysUnits() const;
+
+   /*!
+    *  Code defining unit of measure for elevation coordinates used
+    *  throughout the file.
+    *  1 == Feet
+    *  2 == Meters
+    */
+   ossim_int32 getElevationUnits() const;
+
+   /*!
+    *  Set n == 4
+    */
+   ossim_int32 getNumPolySides() const;
+
+   /*!
+    *  The coordinates of the quadrangle corners are ordered in a clockwise
+    *  direction beginning with the southwest corner.
+    */
+   const ossimDemPointVector& getDEMCorners() const;
+
+   /*!
+    *  In Radians the counterclockwise angle from the primary axis of ground
+    *  planimetric reference to the primary axis of the DEM local reference
+    *  system. Set to 0 to align with the coordinate system
+    */
+   double getCounterclockAngle() const;
+
+   /*!
+    *  0 == unknown accuracy
+    *  1 == accuracy info is given in logical record type C
+    */
+   ossim_int32 getElevAccuracyCode() const;
+
+   /*!
+    *  Minimum elevation in the DEM.
+    */
+   double getMinimumElev() const;
+
+   /*!
+    *  Maximum elevation in the DEM.
+    */
+   double getMaximumElev() const;
+
+   double getSpatialResX() const;
+   double getSpatialResY() const;
+   double getSpatialResZ() const;
+
+   /*!
+    *  The number of rows and columns in profiles in the DEM. 
+    *  NOTE: When profile rows == 1, profile columns is the number of profiles
+    *  in the DEM.
+    */
+   ossim_int32 getProfileRows() const;
+   ossim_int32 getProfileColumns() const;      
+
+   /*!
+    *  Present only if two or more primary intervals exist (level 2 DEM's only)
+    */
+   ossim_int32 getLargeContInt() const;
+
+   /*!
+    *  0 == NA
+    *  1 == feet
+    *  2 == meters
+    *  (level two DEM's only)
+    */
+   ossim_int32 getMaxSourceUnits() const;
+
+   /*!
+    *  Smallest or only primary contour interval (level 2 DEM's only)
+    */
+   ossim_int32 getSmallContInt() const;
+
+   /*!
+    *  1 == feet
+    *  2 == meters
+    */
+   ossim_int32 getMinSourceUnits() const;
+
+   /*!
+    *  YYY
+    */
+   ossim_int32 getSourceDate() const;
+
+   /*!
+    *  YYY
+    */
+   ossim_int32 getInspRevDate() const;
+
+   /*!
+    *  "I" indicates all processes of part3, Quality Control have been
+    *  performed.
+    */
+   std::string const& getInspFlag() const;
+
+   /*!
+    *  0 == No Validation
+    *  1 == RSME computed from test points, no quantative test or interactive
+    *       editing/review
+    *  2 == Batch process water body edit and RSME computed from test points
+    *  3 == Review and edit, including water edit. No RSME computed from test
+    *       points
+    *  4 == Level 1 DEM's reviewed & edited. RSME computed from test points
+    *  5 == Level 2 & 3 DEM's reviewed & edited. RSME computed from test points
+    */
+   ossim_int32 getDataValFlag() const;
+
+   /*!
+    *  0 == none
+    *  1 == suspect areas
+    *  2 == void areas
+    *  3 == suspect & void areas
+    */
+   ossim_int32 getSuspectVoidFlag() const;
+
+   /*!
+    *  1 == local mean sea level
+    *  2 == National Geodetic Vertical Datum 1929
+    *  3 == North American Vertical Datum 1988
+    */
+   ossim_int32 getVertDatum() const;
+
+   /*!
+    *  1 == North Amercian Datum 1927 (NAD 27)
+    *  2 == World Geoditic System 1972 (WGS 72)
+    *  3 == WGS 84
+    *  4 == NAD 83
+    *  5 == Old Hawaii Datum
+    *  6 == Puerto Rico Datum
+    */
+   ossim_int32 getHorizDatum() const;
+
+   /**
+    * @return The ossim datum code as a string.
+    */
+   ossimString getHorizDatumCode() const;
+
+   /*!
+    *  01-99 Primarily a DMA specfic field. (For USGS use set to 01)
+    */
+   ossim_int32 getDataEdition() const;
+
+   /*!
+    *  Contains the percentage of nodes in the file set to void
+    */
+   ossim_int32 getPerctVoid() const;
+
+   /*!
+    *  West edge match status flag
+    */
+   ossim_int32 getWestEdgeFlag() const;
+
+   /*!
+    *  North edge match status flag
+    */
+   ossim_int32 getNorthEdgeFlag() const;
+
+   /*!
+    *  East edge match staus flag
+    */
+   ossim_int32 getEastEdgeFlag() const;
+
+   /*!
+    *  South edge match status flag
+    */
+   ossim_int32 getSouthEdgeFlag() const;
+
+   /*!
+    *  Vertical datum shift - value is in the form of SFFF.DD Value is
+    *  the average shift value for the four quadrangle corners obtained
+    *  from program VERTCOM.
+    */
+   double getVertDatumShift() const;
+
+   /*!
+    * Populates keyword list with geometry info.
+    * 
+    * @return true on success, false on error.
+    */
+   bool getImageGeometry(ossimKeywordlist& kwl,
+                         const char* prefix=NULL) const;
+	 
+private:
+
+   std::string _quadName;
+   std::string _processInfo;
+   double _seGeoCornerX;
+   double _seGeoCornerY;
+   ossim_int32 _processCode;
+   std::string _sectionIndicator;
+   std::string _mapCenterCode;
+   ossim_int32 _levelCode;
+   ossim_int32 _elevPattern;
+   ossim_int32 _groundRefSysCode;
+   ossim_int32 _groundRefSysZone;
+   ossim_int32 _groundRefSysUnits;
+   ossim_int32 _elevUnits;
+   ossim_int32 _numPolySides;
+   ossimDemPointVector _demCorners;
+   double _counterclockAngle;
+   ossim_int32 _elevAccuracyCode;
+   double _minElevation;
+   double _maxElevation;
+   double _spatialResX;
+   double _spatialResY;
+   double _spatialResZ;
+   ossim_int32 _profileRows;
+   ossim_int32 _profileColumns;
+   ossim_int32 _largeContInt;
+   ossim_int32 _maxSourceUnits;
+   ossim_int32 _smallContInt;
+   ossim_int32 _minSourceUnits;
+   ossim_int32 _sourceDate;
+   ossim_int32 _inspRevDate;
+   std::string _inspFlag;
+   ossim_int32 _valFlag;
+   ossim_int32 _suspectVoidFlg;
+   ossim_int32 _vertDatum;
+   ossim_int32 _horizDatum;
+   ossim_int32 _dataEdition;
+   ossim_int32 _perctVoid;
+   ossim_int32 _westEdgeFlag;
+   ossim_int32 _northEdgeFlag;
+   ossim_int32 _eastEdgeFlag;
+   ossim_int32 _southEdgeFlag;
+   double _vertDatumShift;
+};
+
+#endif  // #ifndef ossimDemHeader_HEADER
+
diff --git a/ossim/include/ossim/support_data/ossimDemInfo.h b/ossim/include/ossim/support_data/ossimDemInfo.h
new file mode 100644
index 0000000..29a3366
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimDemInfo.h
@@ -0,0 +1,59 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: USGS DEM Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossimDemInfo_HEADER
+#define ossimDemInfo_HEADER
+
+#include <iosfwd>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/support_data/ossimInfoBase.h>
+
+/**
+ * @brief USGS DEM info class.
+ *
+ * Encapsulates the dumpnitf functionality.
+ */
+class OSSIM_DLL ossimDemInfo : public ossimInfoBase
+{
+public:
+   
+   /** default constructor */
+   ossimDemInfo();
+
+   /** virtual destructor */
+   virtual ~ossimDemInfo();
+
+   /**
+    * @brief open method.
+    *
+    * @param file File name to open.
+    *
+    * @return true on success false on error.
+    */
+   virtual bool open(const ossimFilename& file);
+   
+   /**
+    * Print method.
+    *
+    * @param out Stream to print to.
+    * 
+    * @return std::ostream&
+    */
+   virtual std::ostream& print(std::ostream& out) const;
+
+private:
+   ossimFilename theFile;
+};
+
+#endif /* End of "#ifndef ossimDemInfo_HEADER" */
+
diff --git a/include/ossim/support_data/ossimDemPoint.h b/ossim/include/ossim/support_data/ossimDemPoint.h
similarity index 100%
rename from include/ossim/support_data/ossimDemPoint.h
rename to ossim/include/ossim/support_data/ossimDemPoint.h
diff --git a/ossim/include/ossim/support_data/ossimDemProfile.h b/ossim/include/ossim/support_data/ossimDemProfile.h
new file mode 100644
index 0000000..45510a6
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimDemProfile.h
@@ -0,0 +1,97 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Ken Melero
+//         Orginally written by Jamie Moyers (jmoyers at geeks.com)
+//         Adapted from the package KDEM.
+// Description: This class defines a DEM profile.
+//
+//********************************************************************
+// $Id: ossimDemProfile.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimDemProfile_HEADER
+#define ossimDemProfile_HEADER
+
+#include <vector>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/support_data/ossimDemPoint.h>
+
+typedef std::vector<ossim_int32> ossimDemElevationVector;
+
+class ossimDemProfile
+{
+public:
+
+   ossimDemProfile();
+   ossimDemProfile(ossimDemProfile const& right);
+   ossimDemProfile const& operator=(ossimDemProfile const& right);
+
+   friend std::ostream& operator<<(std::ostream& s, ossimDemProfile& demp);
+   friend std::istream& operator>>(std::istream& s, ossimDemProfile& demp);
+
+   // Accessors
+
+   /*!
+    *  Row identification number. Typically set to 1.
+    */
+   ossim_int32 getRowNumber() const;
+
+   /*!
+    *  Column identification number. This is the profile sequence number.
+    */
+   ossim_int32 getColumnNumber() const;
+
+   /*!
+    *  Number of elevations in this profile.
+    */
+   ossim_int32 getNumberOfElevations() const;
+
+   /*!
+    *  Location (in ground planimetric coordinates) of the first
+    */
+   ossimDemPoint const& getProfileLocation() const;
+
+   /*!
+    *  Elevation of local datum for the profile.
+    *  Value is in units of measure given by the Elevation Units field
+    *  found in the DEM header.
+    */
+   double getLocalDatumElevation() const;
+
+   /*!
+    *  Minimum elevation for this profile.
+    */
+   double getMinimumElev() const;
+
+   /*!
+    *  Maximum elevation for this profile.
+    */
+   double getMaximumElev() const;
+
+   /*!
+   *  Elevation values.
+   *  From the DEM standard:
+   *  "A value in this array would be multiplied by the spatial resolution
+   *  value and added to the elevation of the local elevation datum for the
+   *  element profile to obtain the elevation for the point."
+   */
+   ossimDemElevationVector const& getElevations() const;
+
+private:
+
+   ossim_int32 _row;
+   ossim_int32 _column;
+   ossim_int32 _numberElevations;
+   ossimDemPoint _profileLocation;
+   double _locDatumElev;
+   double _minElev;
+   double _maxElev;
+   ossimDemElevationVector _elevations;
+};
+
+#endif  // #ifndef ossimDemProfile_HEADER
+
diff --git a/ossim/include/ossim/support_data/ossimDemStats.h b/ossim/include/ossim/support_data/ossimDemStats.h
new file mode 100644
index 0000000..8976b4d
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimDemStats.h
@@ -0,0 +1,89 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Ken Melero
+//         Orginally written by Jamie Moyers (jmoyers at geeks.com)
+//         Adapted from the package KDEM.
+// Description: This class provides some statistics for DEMs.
+//
+//********************************************************************
+// $Id: ossimDemStats.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimDemStats_HEADER
+#define ossimDemStats_HEADER
+
+#include <iostream>
+
+class ossimDemStats
+{
+public:
+
+   ossimDemStats();
+   ~ossimDemStats();
+
+   friend std::ostream& operator<<(std::ostream& s,
+                                   ossimDemStats const& stats);
+   friend std::istream& operator>>(std::istream& s, ossimDemStats& stats);
+
+   //Accessors
+
+   /*!
+    *  1 = available
+    *  2 = unavailable
+    *  The code defines the availability of statics
+    */
+   long getAvailCodeDE2() const;
+
+   long getRSMEDE2x () const;
+
+   long getRSMEDE2y () const;
+
+   long getRSMEDE2z () const;
+
+   /*!
+    *  This code defines the sample size use
+    *  to compute the accuracy, if 0 then the
+    *  accuracy is estimated.
+    */
+   long getSampleSizeDE2() const;
+
+   /*!
+    *  1 = available
+    *  2 = unavailable
+    *  The code defines the availability of statics
+    */
+   long getAvailCodeDE5() const;
+
+   long getRSMEDE5x () const;
+
+   long getRSMEDE5y () const;
+
+   long getRSMEDE5z () const;
+	
+   /*!
+    *  This code defines the sample size use
+    *  to compute the accuracy, if 0 then the
+    *  accuracy is estimated.
+    */
+   long getSampleSizeDE5() const;
+
+private:
+
+   long _availCodeDE2;
+   long _rsmeDE2x;
+   long _rsmeDE2y;
+   long _rsmeDE2z;
+   long _sampleSizeDE2;
+   long _availCodeDE5;
+   long _rsmeDE5x;
+   long _rsmeDE5y;
+   long _rsmeDE5z;
+   long _sampleSizeDE5;
+};
+
+#endif // #ifndef ossimDemStats_HEADER
+
diff --git a/ossim/include/ossim/support_data/ossimDemUtil.h b/ossim/include/ossim/support_data/ossimDemUtil.h
new file mode 100644
index 0000000..2beb64a
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimDemUtil.h
@@ -0,0 +1,83 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Ken Melero
+//         Orginally written by Jamie Moyers (jmoyers at geeks.com)
+//         Adapted from the package KDEM.
+// Description: This class provides some simple utilities for DEMs.
+//
+//********************************************************************
+// $Id: ossimDemUtil.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimDemUtil_HEADER
+#define ossimDemUtil_HEADER
+
+#include <cstring>
+#include <cstdlib>
+#include <string>
+#include <iostream>
+#include <fstream>
+
+class ossimFilename;
+
+class ossimDemUtil
+{
+public:
+
+   /**
+    * @brief Does basic sanity checks to see if file is a dem.
+    *
+    * 1) Check extension for .dem
+    *
+    * 2) Look for file.omd (ossim meta data) file containing keyword
+    *    "dem_type" with value of "usgs_dem".
+    *
+    * 3) Check 512 bytes and make sure there is no binary data.
+    *
+    * @note
+    * There is a keyword list template stored in the templates directory:
+    * "ossim/etc/templates/usgs_dem_template.kwl"
+    *
+    * @param file The file to check.
+    *
+    * @return true on success, false on error.
+    */
+   static bool isUsgsDem(const ossimFilename& file);
+
+   /**
+    *  Reads a single record from a DEM.
+    *  Returns true if succesful. Returns false if EOF or error.
+    */
+   static bool getRecord(std::istream& s, std::string& strbuf, long reclength = 1024);
+
+   /**
+    *  Same as getRecord above. buf should be at least reclength+1 in size.
+    */
+   static bool getRecord(std::istream& s, char* buf, long reclength = 1024);
+
+   static long getLong(char* const strbuf, // string to extract long from
+                       long const startpos,  // starting position of field
+                       long const width)     // width of field
+      {
+         char temp[1024];
+         strncpy(temp,strbuf+startpos,width);
+         temp[width] = '\0';
+         return atol(temp);
+      }
+
+   static bool getDouble(std::string const& strbuf, // string to extract double from
+                         long const startpos,  // starting position of field
+                         long const width,     // width of field
+                         double& val);         // value extracted from field.
+
+private:
+
+   ossimDemUtil();
+};
+
+#endif  // #ifndef ossimDemUtil_HEADER
+
diff --git a/ossim/include/ossim/support_data/ossimDoqq.h b/ossim/include/ossim/support_data/ossimDoqq.h
new file mode 100644
index 0000000..579be95
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimDoqq.h
@@ -0,0 +1,127 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Ken Melero
+//
+// Description: This class parses a Digital Ortho Quarter Quad (DOQQ)
+//              header.
+//
+//********************************************************************
+// $Id: ossimDoqq.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimDoqq_HEADER
+#define ossimDoqq_HEADER
+
+//#include <iostream>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fstream>
+#include <iostream>
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/support_data/ossimInfoBase.h>
+
+class OSSIM_DLL ossimDoqq : public ossimInfoBase
+{
+public:
+   ossimDoqq();
+   ossimDoqq(ossimFilename file);
+   ~ossimDoqq();
+   
+   enum ossimErrorStatus
+   {
+      OSSIM_OK    = 0,
+      OSSIM_ERROR = 1
+   };
+
+   enum
+   {
+      GSD_X_OFFSET            = 59,
+      GSD_Y_OFFSET            = 59,
+      DATA_ORDER_OFFSET       = 142,      
+      LINE_OFFSET             = 145,
+      SAMPLE_OFFSET           = 151,
+      PROJECTION_OFFSET       = 196,
+      RGB_OFFSET              = 157,
+      UL_EASTING_OFFSET       = 288,
+      UL_NORTHING_OFFSET      = 312,
+      UTM_ZONE_OFFSET         = 199,
+      DATUM_OFFSET            = 168,
+
+      DATA_ORDER_SIZE         = 3,
+      LINE_SIZE               = 8,
+      SAMPLE_SIZE             = 8,  
+      PROJECTION_SIZE         = 3,
+      RGB_SIZE                = 3,
+      MARKING_U_SIZE          = 5,
+      MARKING_V_SIZE          = 5,
+      UL_EASTING_SIZE         = 24,
+      UL_NORTHING_SIZE        = 24,
+      UTM_ZONE_SIZE           = 6,
+      DATUM_SIZE              = 2,
+      RADIOMETRY_SIZE         = 3,
+      GSD_SIZE              = 12
+   };
+
+   //! Implementation of ossimInfoBase class pure virtual.
+   virtual bool open(const ossimFilename& file);
+
+   //! Implementation of ossimInfoBase class pure virtual.
+   virtual std::ostream& print(std::ostream& out) const;
+
+   ossimString theProjection;
+   ossimString theDatum;
+   ossimString theQuadName;
+   ossimString theQuad;
+   ossimString theNation;
+   ossimString theState;
+   ossimString theDataOrder;
+   ossimString theMarkU;
+   ossimString theMarkV;
+   ossimString theImageSource;
+   ossimString theSourceImageID;
+
+   ossim_int32 theUtmZone;
+   ossim_int32 theLine;
+   ossim_int32 theSample;
+   ossim_int32 theRgb;
+
+   ossimString theAcqYear;
+   ossimString theAcqMonth;
+   ossimString theAcqDay;
+   ossimString theAcqYearMonthDay;
+
+   ossim_float64 theRMSE;
+
+   ossim_float64   theEasting;
+   ossim_float64   theNorthing;
+   ossim_float64   theUN;
+   ossim_float64   theUE;
+   ossim_float64   theLN;
+   ossim_float64   theLE;
+   ossimDpt        theGsd;
+   ossim_int32     theHeaderSize;
+   ossim_int32     theRecordSize;
+
+   ossim_int32 errorStatus() const { return theErrorStatus; }
+   
+private:
+
+   std::ifstream           theDoqFile;
+   ossimErrorStatus   theErrorStatus;
+   
+   ossim_float64 convertStr(const char* str) const;
+
+   void ldstr_v1(std::istream& in);
+   void ldstr_v2(std::istream& in);
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimDtedAcc.h b/ossim/include/ossim/support_data/ossimDtedAcc.h
new file mode 100644
index 0000000..c909923
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimDtedAcc.h
@@ -0,0 +1,135 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Ken Melero
+// 
+// Description:  This class gives access to the Accuracy Description
+//               (ACC) of a DTED Level 1 file.
+//
+//********************************************************************
+// $Id: ossimDtedAcc.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimDtedAcc_H
+#define ossimDtedAcc_H
+#include <iosfwd>
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimErrorStatusInterface.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimRefPtr.h>
+
+class ossimProperty;
+
+class OSSIM_DLL ossimDtedAcc : public ossimErrorStatusInterface
+{
+public:
+   ossimDtedAcc(const ossimFilename& dted_file="", ossim_int32 offset=0);
+   ossimDtedAcc(std::istream& in);
+   enum
+   {
+      ACC_LENGTH = 2700,
+      ACC_ABSOLUTE_CE = 4,
+      ACC_ABSOLUTE_LE = 8,
+      ACC_RELATIVE_CE = 12,
+      ACC_RELATIVE_LE = 16,
+      ACC_RESERVED_1 = 20,
+      ACC_RESERVED_2 = 24,
+      ACC_RESERVED_3 = 25,
+      ACC_MULTIPLE_FLAG = 56,
+      ACC_RESERVED = 58,
+      FIELD1_SIZE           = 3,
+      FIELD2_SIZE           = 4,
+      FIELD3_SIZE           = 4,
+      FIELD4_SIZE           = 4,
+      FIELD5_SIZE           = 4,
+      FIELD6_SIZE           = 4,
+      FIELD7_SIZE           = 1,
+      FIELD8_SIZE           = 31,
+      FIELD9_SIZE           = 2,
+      FIELD10_SIZE          = 4,
+      FIELD11_SIZE          = 4,
+      FIELD12_SIZE          = 4,
+      FIELD13_SIZE          = 4,
+      FIELD14_SIZE          = 2,
+      FIELD15_SIZE          = 9,
+      FIELD16_SIZE          = 10,
+      FIELD17_SIZE          = 18,
+      FIELD18_SIZE          = 69
+   };
+
+   // The Recoginition Sentinel signifies if the ACC record exists.
+
+   ossim_int32 absCE() const;
+   ossim_int32 absLE() const;
+   ossim_int32 relCE() const;
+   ossim_int32 relLE() const;
+   
+   ossim_int32 startOffset() const;
+   ossim_int32 stopOffset()  const;
+   
+   friend OSSIM_DLL std::ostream& operator<<( std::ostream& os,
+                                              const ossimDtedAcc& acc);
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out String to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
+    * "nitf.file_name:"
+    * @return output stream.
+    */
+   std::ostream& print(std::ostream& out,
+                       const std::string& prefix) const;
+   
+   void parse(std::istream& in);
+
+   void clearFields();
+
+   /**
+    * @brief Gets a property for name.
+    * @param name Property name to get.
+    * @return ossimRefPtr<ossimProperty> Note that this can be empty if
+    * property for name was not found.
+    */
+   ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+
+   /**
+    * @brief Adds this class's properties to list.
+    * @param propertyNames list to append to.
+    */
+   void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+private:
+   // Do not allow...
+   ossimDtedAcc(const ossimDtedAcc& source);
+   const ossimDtedAcc& operator=(const ossimDtedAcc& rhs);
+
+   
+   char theRecSen[FIELD1_SIZE+1];
+   char theAbsoluteCE[FIELD2_SIZE+1];
+   char theAbsoluteLE[FIELD3_SIZE+1];
+   char theRelativeCE[FIELD4_SIZE+1];
+   char theRelativeLE[FIELD5_SIZE+1];
+   char theField6[FIELD6_SIZE+1];
+   char theField7[FIELD7_SIZE+1];
+   char theField8[FIELD8_SIZE+1];
+   char theField9[FIELD9_SIZE+1];
+   char theField10[FIELD10_SIZE+1];
+   char theField11[FIELD11_SIZE+1];
+   char theField12[FIELD12_SIZE+1];
+   char theField13[FIELD13_SIZE+1];
+   char theField14[FIELD14_SIZE+1];
+   char theField15[FIELD15_SIZE+1];
+   char theField16[FIELD16_SIZE+1];
+   char theField17[FIELD17_SIZE+1];
+   
+   ossim_int32 theStartOffset;
+   ossim_int32 theStopOffset;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimDtedDsi.h b/ossim/include/ossim/support_data/ossimDtedDsi.h
new file mode 100644
index 0000000..0463ef9
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimDtedDsi.h
@@ -0,0 +1,238 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Ken Melero
+// 
+// Description:  This class gives access to the Data Set Identification
+//               (DSI) of a DTED Level 1 file.
+//
+//********************************************************************
+// $Id: ossimDtedDsi.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimDtedDsi_H
+#define ossimDtedDsi_H
+#include <iosfwd>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimErrorStatusInterface.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimRefPtr.h>
+
+class ossimProperty;
+
+class OSSIM_DLL ossimDtedDsi : public ossimErrorStatusInterface
+{
+public:
+   ossimDtedDsi(const ossimFilename& dted_file="", ossim_int32 offset=0);
+   ossimDtedDsi(std::istream& in);
+
+   enum
+   {
+      DSI_LENGTH = 648,
+      DSI_SECURITY_CODE = 4,
+      DSI_SECURITY_CONTROL = 5,
+      DSI_SECURITY_HANDLING = 7,
+      DSI_RESERVED_1 = 34,
+      DSI_DMA_SERIES = 60,
+      DSI_RESERVED_2 = 65,
+      DSI_RESERVED_3 = 80,
+      DSI_DATA_EDITION = 88,
+      DSI_MATCH_MERGE_VERSION = 90,
+      DSI_MAINTENANCE_DATE = 91,
+      DSI_MATCH_MERGE_DATE = 95,
+      DSI_MAINTENANCE_CODE = 99,
+      DSI_PRODUCER_CODE = 103,
+      DSI_RESERVED_4 = 111,
+      DSI_PRODUCT_SPEC_STOCK_NUMBER = 127, 
+      DSI_PRODUCT_SPEC_NUMBER = 136,
+      DSI_PRODUCT_SPEC_DATE = 138,
+      DSI_VERTICAL_DATUM = 142,
+      DSI_HORIZ_DATUM = 145,
+      DSI_DIGITIZING_SYSTEM = 150,
+      DSI_COMPILATION_DATE = 160,
+      DSI_RESERVED_5 = 164,
+      DSI_LAT_ORIGIN = 186,
+      DSI_LON_ORIGIN = 195,
+      DSI_LAT_SW = 205,
+      DSI_LON_SW = 212,
+      DSI_LAT_NW = 220,
+      DSI_LON_NW = 227,
+      DSI_LAT_NE = 235,
+      DSI_LON_NE = 242,
+      DSI_LAT_SE = 250,
+      DSI_LON_SE = 257,
+      DSI_ORIENTATION = 265,
+      DSI_LAT_INTERVAL = 274,
+      DSI_LON_INTERVAL = 278,
+      DSI_NUM_LAT_LINES = 282,
+      DSI_NUM_LON_LINES = 286,
+      DSI_PARTIAL_CELL_INDICATOR = 290,
+      DSI_RESERVED = 292,
+      FIELD1_SIZE           = 3,
+      FIELD2_SIZE           = 1,
+      FIELD3_SIZE           = 2,
+      FIELD4_SIZE           = 27,
+      FIELD5_SIZE           = 26,
+      FIELD6_SIZE           = 5,
+      FIELD7_SIZE           = 15,
+      FIELD8_SIZE           = 8,
+      FIELD9_SIZE           = 2,
+      FIELD10_SIZE          = 1,
+      FIELD11_SIZE          = 4,
+      FIELD12_SIZE          = 4,
+      FIELD13_SIZE          = 4,
+      FIELD14_SIZE          = 8,
+      FIELD15_SIZE          = 16,
+      FIELD16_SIZE          = 9,
+      FIELD17_SIZE          = 2,
+      FIELD18_SIZE          = 4,
+      FIELD19_SIZE          = 3,
+      FIELD20_SIZE          = 5,
+      FIELD21_SIZE          = 10,
+      FIELD22_SIZE          = 4,
+      FIELD23_SIZE          = 22,
+      FIELD24_SIZE          = 9,
+      FIELD25_SIZE          = 10,
+      FIELD26_SIZE          = 7,
+      FIELD27_SIZE          = 8,
+      FIELD28_SIZE          = 7,
+      FIELD29_SIZE          = 8,
+      FIELD30_SIZE          = 7,
+      FIELD31_SIZE          = 8,
+      FIELD32_SIZE          = 7,
+      FIELD33_SIZE          = 8,
+      FIELD34_SIZE          = 9,
+      FIELD35_SIZE          = 4,
+      FIELD36_SIZE          = 4,
+      FIELD37_SIZE          = 4,
+      FIELD38_SIZE          = 4,
+      FIELD39_SIZE          = 2,
+      FIELD40_SIZE          = 101,
+      FIELD41_SIZE          = 100,
+      FIELD42_SIZE          = 156
+   };
+
+   // The Recognition Sentinel signifies if the DSI record exists.
+   ossimString recognitionSentinel() const;
+
+   ossimString securityCode()           const;
+   ossimString productLevel()           const;
+   ossimString edition()                const;
+   ossimString matchMergeVersion()      const;
+   ossimString maintanenceDate()        const;
+   ossimString matchMergeDate()         const;
+   ossimString maintenanceCode()        const;
+   ossimString producerCode()           const;
+   ossimString productStockSpecNumber() const;
+   ossimString productSpecNumber()      const;
+   ossimString productSpecDate()        const;
+   ossimString verticalDatum()          const;
+   ossimString horizontalDatum()        const;
+   ossimString compilationDate()        const;
+   ossimString latOrigin()              const;
+   ossimString lonOrigin()              const;
+   ossimString latSW()                  const;
+   ossimString lonSW()                  const;
+   ossimString latNW()                  const;
+   ossimString lonNW()                  const;
+   ossimString latNE()                  const;
+   ossimString lonNE()                  const;
+   ossimString latSE()                  const;
+   ossimString lonSE()                  const;
+
+   ossimString orientation()    const;
+   ossimString latInterval()    const;
+   ossimString lonInterval()    const;
+   ossim_int32 numLatPoints()   const;
+   ossim_int32 numLonLines()    const;
+   ossim_int32 cellIndicator()  const;
+   ossim_int32 startOffset()    const;
+   ossim_int32 stopOffset()     const;
+   
+   friend OSSIM_DLL std::ostream& operator<<( std::ostream& os,
+                                              const ossimDtedDsi& dsi);
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out String to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
+    * "nitf.file_name:"
+    * @return output stream.
+    */
+   std::ostream& print(std::ostream& out,
+                       const std::string& prefix) const;   
+   
+   void parse(std::istream& in);
+
+   /**
+    * @brief Gets a property for name.
+    * @param name Property name to get.
+    * @return ossimRefPtr<ossimProperty> Note that this can be empty if
+    * property for name was not found.
+    */
+   ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   
+   /**
+    * @brief Adds this class's properties to list.
+    * @param propertyNames list to append to.
+    */
+   void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+private:
+   // Do not allow...
+   ossimDtedDsi(const ossimDtedDsi& source);
+   const ossimDtedDsi& operator=(const ossimDtedDsi& rhs);
+
+   
+   char theRecSen[FIELD1_SIZE+1];
+   char theSecurityCode[FIELD2_SIZE+1];
+   char theField3[FIELD3_SIZE+1];
+   char theField4[FIELD4_SIZE+1];
+   char theProductLevel[FIELD6_SIZE+1];
+   char theField7[FIELD7_SIZE+1];
+   char theField8[FIELD8_SIZE+1];
+   char theEdition[FIELD9_SIZE+1];
+   char theMatchMergeVersion[FIELD10_SIZE+1];
+   char theMaintenanceDate[FIELD11_SIZE+1];
+   char theMatchMergeDate[FIELD12_SIZE+1];
+   char theMaintenanceCode[FIELD13_SIZE+1];
+   char theProducerCode[FIELD14_SIZE+1];
+   char theField15[FIELD15_SIZE+1];
+   char theProductStockSpecNumber[FIELD16_SIZE+1];
+   char theProductSpecNumber[FIELD17_SIZE+1];
+   char theProductSpecDate[FIELD18_SIZE+1];
+   char theVerticalDatum[FIELD19_SIZE+1];
+   char theHorizontalDatum[FIELD20_SIZE+1];
+   char theField21[FIELD21_SIZE+1];
+   char theCompilationDate[FIELD22_SIZE+1];
+   char theField23[FIELD23_SIZE+1];
+   char theLatOrigin[FIELD24_SIZE+1];
+   char theLonOrigin[FIELD25_SIZE+1];
+   char theLatSW[FIELD26_SIZE+1];
+   char theLonSW[FIELD27_SIZE+1];
+   char theLatNW[FIELD28_SIZE+1];
+   char theLonNW[FIELD29_SIZE+1];
+   char theLatNE[FIELD30_SIZE+1];
+   char theLonNE[FIELD31_SIZE+1];
+   char theLatSE[FIELD32_SIZE+1];
+   char theLonSE[FIELD33_SIZE+1];
+   char theOrientation[FIELD34_SIZE+1];
+   char theLatInterval[FIELD35_SIZE+1];
+   char theLonInterval[FIELD36_SIZE+1];
+   char theNumLatPoints[FIELD37_SIZE+1];
+   char theNumLonLines[FIELD38_SIZE+1];
+   char theCellIndicator[FIELD39_SIZE+1];
+   char theField40[FIELD40_SIZE+1];
+   char theField41[FIELD41_SIZE+1];
+   char theField42[FIELD42_SIZE+1];
+   
+   ossim_int32       theStartOffset;
+   ossim_int32       theStopOffset;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimDtedHdr.h b/ossim/include/ossim/support_data/ossimDtedHdr.h
new file mode 100644
index 0000000..a0920e9
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimDtedHdr.h
@@ -0,0 +1,128 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Ken Melero
+// 
+// Description:  This class gives access to the File Header Label
+//               (HDR) of a DTED Level 1 file.
+//
+//********************************************************************
+// $Id: ossimDtedHdr.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimDtedHdr_H
+#define ossimDtedHdr_H
+#include <iosfwd>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimErrorStatusInterface.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimRefPtr.h>
+
+class ossimProperty;
+
+class OSSIM_DLL ossimDtedHdr : public ossimErrorStatusInterface
+{
+public:
+   ossimDtedHdr(const ossimFilename& dted_file="", ossim_int32 offset=0);
+   ossimDtedHdr(std::istream& in);
+
+   enum
+   {
+      HDR_LENGTH            = 80,
+      HDR_ONE_LABEL_1       =  4,
+      HDR_FILENAME          =  5,
+      HDR_UNIVAC            = 22,
+      HDR_REEL              = 28,
+      HDR_FILE_NUM          = 32,
+      HDR_GENERATION_NUM    = 36,
+      HDR_VERSION_NUM       = 40,
+      HDR_CREATION_DATE     = 42,
+      HDR_EXPIRATION_DATE   = 48,
+      HDR_ACCESS            = 54,
+      HDR_BLOCK_COUNT       = 55,
+      HDR_QUALIFIER         = 61,
+      HDR_BLANKS            = 74,
+      FIELD1_SIZE           = 3,
+      FIELD2_SIZE           = 1,
+      FIELD3_SIZE           = 17,
+      FIELD4_SIZE           = 6,
+      FIELD5_SIZE           = 4,
+      FIELD6_SIZE           = 4,
+      FIELD7_SIZE           = 4,
+      FIELD8_SIZE           = 2,
+      FIELD9_SIZE           = 6,
+      FIELD10_SIZE          = 6,
+      FIELD11_SIZE          = 1,
+      FIELD12_SIZE          = 6,
+      FIELD13_SIZE          = 13,
+      FIELD14_SIZE          = 7
+   };
+
+   // The Recognition Sentinel signifies if the HDR record exists.
+   ossimString recognitionSentinel() const;
+
+   ossimString fileName()     const;
+   ossimString version()      const;
+   ossimString creationDate() const;
+   ossim_int32 startOffset()  const;
+   ossim_int32 stopOffset()   const;
+
+   friend OSSIM_DLL std::ostream& operator<<( std::ostream& os,
+                                              const ossimDtedHdr& hdr);
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out String to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
+    * "nitf.file_name:"
+    * @return output stream.
+    */
+   std::ostream& print(std::ostream& out,
+                       const std::string& prefix) const;
+
+   void parse(std::istream& in);
+
+   /**
+    * @brief Gets a property for name.
+    * @param name Property name to get.
+    * @return ossimRefPtr<ossimProperty> Note that this can be empty if
+    * property for name was not found.
+    */
+   ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+
+   /**
+    * @brief Adds this class's properties to list.
+    * @param propertyNames list to append to.
+    */
+   void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   
+private:
+   // Do not allow...
+   ossimDtedHdr(const ossimDtedHdr& source);
+   const ossimDtedHdr& operator=(const ossimDtedHdr& rhs);
+   
+   char theRecSen[FIELD1_SIZE+1];
+   char theField2[FIELD2_SIZE+1];
+   char theFilename[FIELD3_SIZE+1];
+   char theField4[FIELD4_SIZE+1];
+   char theField5[FIELD5_SIZE+1];
+   char theField6[FIELD6_SIZE+1];
+   char theVersion[FIELD7_SIZE+1];
+   char theCreationDate[FIELD8_SIZE+1];
+   char theField9[FIELD9_SIZE+1];
+   char theField10[FIELD10_SIZE+1];
+   char theField11[FIELD11_SIZE+1];
+   char theField12[FIELD12_SIZE+1];
+   char theField13[FIELD13_SIZE+1];
+   char theField14[FIELD14_SIZE+1];
+   
+   ossim_int32 theStartOffset;
+   ossim_int32 theStopOffset;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimDtedInfo.h b/ossim/include/ossim/support_data/ossimDtedInfo.h
new file mode 100644
index 0000000..2a1199b
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimDtedInfo.h
@@ -0,0 +1,78 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: DTED Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossimDtedInfo_HEADER
+#define ossimDtedInfo_HEADER
+
+#include <iosfwd>
+#include <vector>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/support_data/ossimInfoBase.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimRefPtr.h>
+
+class ossimNitfFile;
+class ossimProperty;
+
+/**
+ * @brief DTED Info class.
+ *
+ * Encapsulates the dtedInfo functionality.
+ */
+class OSSIM_DLL ossimDtedInfo : public ossimInfoBase
+{
+public:
+   
+   /** default constructor */
+   ossimDtedInfo();
+
+   /** virtual destructor */
+   virtual ~ossimDtedInfo();
+
+   /**
+    * @brief open method.
+    *
+    * @param file File name to open.
+    *
+    * @return true on success false on error.
+    */
+   virtual bool open(const ossimFilename& file);
+   
+   /**
+    * Print method.
+    *
+    * @param out Stream to print to.
+    * 
+    * @return std::ostream&
+    */
+   virtual std::ostream& print(std::ostream& out) const;
+
+   /**
+    * @brief Gets a property for name.
+    * @param name Property name to get.
+    * @return ossimRefPtr<ossimProperty> Note that this can be empty if
+    * property for name was not found.
+    */
+   ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   
+   /**
+    * @brief Adds this class's properties to list.
+    * @param propertyNames list to append to.
+    */
+   void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+private:
+   ossimFilename theFile;
+};
+
+#endif /* End of "#ifndef ossimDtedInfo_HEADER" */
+
diff --git a/ossim/include/ossim/support_data/ossimDtedRecord.h b/ossim/include/ossim/support_data/ossimDtedRecord.h
new file mode 100644
index 0000000..9f4ff6b
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimDtedRecord.h
@@ -0,0 +1,165 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Ken Melero
+// 
+// Description:  This class gives access to the Data Record Description
+//               of a DTED Level 1 file.
+//
+// Notes:  Each elevation is a true value referenced to meas sea level
+//         (MSL) datum recorded to the nearest meter.  The horizontal
+//         position is referenced to precise longitude-latitiude
+//         locations in terms of the current World Geodetic System
+//         (WGS84) determined for each file by reference to the origin
+//         at the southwest corner.  The elevations are evenly spaced
+//         in latitude and longitude at the interval designated in the
+//         User Header Label (UHL) in South to North profile sequence.
+//
+//********************************************************************
+// $Id: ossimDtedRecord.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimDtedRecord_H
+#define ossimDtedRecord_H
+#include <iosfwd>
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimErrorStatusInterface.h>
+
+class OSSIM_DLL ossimDtedRecord : public ossimErrorStatusInterface
+{
+public:
+   ossimDtedRecord(std::istream& in,
+                   ossim_int32 offest,
+                   ossim_int32 num_points);
+   // NOTE:  When using this class be sure that as you cycle through
+   //        all the points within a record, that you verify they are
+   //        sequential.  According to the DTED Specification
+   //        (MIL-PRF-89020A) issued in 19 April 1996, page 22 all
+   //        records must be sequential.  If not, file may be corrupt.
+   //
+   //        To verify this, you can do the following:
+   //
+   //        int count = 0;
+   //        for(int i = 0; i < num_lon_lines; i++)
+   //          rec[i] = new ossimDtedRecord(theFileDesc, offset,
+   //                       num_lat_points);
+   //          if(count != (rec[i]->dataBlockCount() + 1))
+   //             ERROR -- Records are not sequential
+   //          count = rec[i]->dataBlockCount();
+
+   ~ossimDtedRecord();
+   
+   enum
+   {
+      DATA_LENGTH = 12,
+      DATA_BLOCK_COUNT = 2,
+      DATA_LON_COUNT = 4,
+      DATA_LAT_COUNT = 6,
+      DATA_ELEV_START = 8,
+      DATA_BYTES_PER_POINT = 2,
+   };
+
+   // The Recognition Sentinel signifies if the Data Record exists.
+   ossimString recognitionSentinel() const;
+
+   ossim_int32  dataBlockCount()   const;
+   ossim_int32  lonCount()         const;
+   ossim_int32  latCount()         const;
+   ossim_uint32 checkSum()         const;
+   ossim_uint32 computedCheckSum() const;
+   ossim_int32  numPoints()        const;
+
+   // Access methods for the elevation data
+   ossim_int32   getPoint(ossim_int32 i)     const;
+   ossim_uint16  getPointData(ossim_int32 i) const;
+   ossim_int32*  points()                    const;
+   ossim_uint16* pointsData()                const;
+   
+   ossim_int32 startOffset() const;
+   ossim_int32 stopOffset()  const;
+
+   friend OSSIM_DLL std::ostream& operator<<( std::ostream& os,
+                                              const ossimDtedRecord& rec);
+   void parse(std::istream& in);
+
+private:
+   // prevent use
+   ossimDtedRecord(const ossimDtedRecord& source);
+
+   ossim_int32  theFile;
+
+   /*!
+    * 252 (8 bit)
+    */
+   ossimString theRecSen;
+
+   /*!
+    *  Sequential count of the block within the file.
+    */
+   ossim_int32  theDataBlockCount;
+
+   /*!
+    *  Count of the meridian.
+    *  True longitude = longitude count x data interval + origin
+    *  (Offset from the SW corner longitude)
+    */
+   ossim_int32  theLonCount;
+
+   /*!
+    *  Count of the parallel.
+    *  True latitude = latitude count x data interval + origin
+    *  (Offset from the SW corner latitude)
+    */
+   ossim_int32  theLatCount;
+
+   /*!
+    *  Algebraic addition of contents of block.
+    *  The checksum is computed algebraically using integer arithmetic by
+    *  summing all header and elevation bytes contained int the record as
+    *  8-bit values.  Each byte is considered an unsigned, 8-bit value for
+    *  checksum calculation.
+    */
+   ossim_uint32  theCheckSum;
+
+   /*!
+    *  All the elevation points in a Data Record as ints.
+    *  (ie. all the latitudal points in a longitudinal line)
+    */
+   ossim_int32* thePoints;
+
+   /*!
+    *  All the elevation points in a Data Record as unsigned shorts.
+    *  (ie. all the latitudal points in a longitudinal line)
+    */
+   ossim_uint16* thePointsData;
+
+   /*!
+    *  Our computed check sum.  This should match the checksum
+    *  at the end of the Data Record.
+    */
+   ossim_uint32  theComputedCheckSum;
+
+   /*!
+    *  The number of points in a longitudinal line.
+    */
+   ossim_int32  theNumPoints;
+
+   ossim_int32  theStartOffset;
+   ossim_int32  theStopOffset;
+
+   /*!
+    *  Compute the check sum for the Data Record and compare against
+    *  the parsed check sum from the data record. This must be correct
+    *  to be a valid data record. If not, there is a chance of a
+    *  corrupted elevation cell.
+    *
+    *  @return true if check sum validates, false if not.
+    */
+   bool validateCheckSum(std::istream& in);
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimDtedUhl.h b/ossim/include/ossim/support_data/ossimDtedUhl.h
new file mode 100644
index 0000000..c6566d9
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimDtedUhl.h
@@ -0,0 +1,131 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Ken Melero
+// 
+// Description:  This class gives access to the User Header Label
+//               (UHL) of a DTED Level 1 file.
+//
+//********************************************************************
+// $Id: ossimDtedUhl.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimDtedUhl_H
+#define ossimDtedUhl_H
+#include <iosfwd>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimErrorStatusInterface.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimRefPtr.h>
+
+class ossimProperty;
+
+class OSSIM_DLL ossimDtedUhl : public ossimErrorStatusInterface
+{
+public:
+   ossimDtedUhl(const ossimFilename& dted_file="", ossim_int32 offset=0);
+   ossimDtedUhl(std::istream& in);
+
+   enum
+   {
+      UHL_LENGTH        = 80,
+      UHL_LON_ORIGIN    =  5,
+      UHL_LAT_ORIGIN    = 13,
+      UHL_LON_INTERVAL  = 21,
+      UHL_LAT_INTERVAL  = 25,
+      UHL_ABSOLUTE_LE   = 29,
+      UHL_SECURITY_CODE = 33,
+      UHL_REFERENCE_NUM = 33,
+      UHL_NUM_LON_LINES = 48,
+      UHL_NUM_LAT_LINES = 52,
+      UHL_MULTIPLE_ACC  = 56,
+      UHL_RESERVED      = 57,
+      FIELD1_SIZE       = 3,
+      FIELD2_SIZE       = 1,
+      FIELD3_SIZE       = 8,
+      FIELD4_SIZE       = 8,
+      FIELD5_SIZE       = 4,
+      FIELD6_SIZE       = 4,
+      FIELD7_SIZE       = 4,
+      FIELD8_SIZE       = 3,
+      FIELD9_SIZE       = 12,
+      FIELD10_SIZE      = 4,
+      FIELD11_SIZE      = 4,
+      FIELD12_SIZE      = 1,
+      FIELD13_SIZE      = 24
+   };
+   
+   // The Recognition Sentinel signifies if the UHL record exists.
+   ossimString recognitionSentinel() const;
+
+   double      lonOrigin()        const;
+   double      latOrigin()        const;
+   double      lonInterval()      const;
+   double      latInterval()      const;
+   double      absoluteLE()       const;
+   ossimString securityCode()     const;
+   ossim_int32 numLonLines()      const;
+   ossim_int32 numLatPoints()     const;
+   ossim_int32 mulitpleAccuracy() const;
+   ossim_int32 startOffset()      const;
+   ossim_int32 stopOffset()       const;
+   
+   friend OSSIM_DLL std::ostream& operator<<( std::ostream& out,
+                                              const ossimDtedUhl& uhl);
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out String to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
+    * "nitf.file_name:"
+    * @return output stream.
+    */
+   std::ostream& print(std::ostream& out,
+                       const std::string& prefix) const;
+
+   void parse(std::istream& in);
+
+   /**
+    * @brief Gets a property for name.
+    * @param name Property name to get.
+    * @return ossimRefPtr<ossimProperty> Note that this can be empty if
+    * property for name was not found.
+    */
+   ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+
+   /**
+    * @brief Adds this class's properties to list.
+    * @param propertyNames list to append to.
+    */
+   void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   
+private:
+   // Do not allow...
+   ossimDtedUhl(const ossimDtedUhl& source);
+   const ossimDtedUhl& operator=(const ossimDtedUhl& rhs);
+
+   double degreesFromString(const char* str) const;
+   double spacingFromString(const char* str) const;
+   
+   char theRecSen[FIELD1_SIZE+1];
+   char theField2[FIELD2_SIZE+1];
+   char theLonOrigin[FIELD3_SIZE+1];
+   char theLatOrigin[FIELD4_SIZE+1];
+   char theLonInterval[FIELD5_SIZE+1];
+   char theLatInterval[FIELD6_SIZE+1];
+   char theAbsoluteLE[FIELD7_SIZE+1];
+   char theSecurityCode[FIELD8_SIZE+1];
+   char theField9[FIELD9_SIZE+1];
+   char theNumLonLines[FIELD10_SIZE+1];
+   char theNumLatPoints[FIELD11_SIZE+1];
+   char theMultipleAccuracy[FIELD12_SIZE+1];
+   
+   ossim_int32 theStartOffset;
+   ossim_int32 theStopOffset;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimDtedVol.h b/ossim/include/ossim/support_data/ossimDtedVol.h
new file mode 100644
index 0000000..73eec89
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimDtedVol.h
@@ -0,0 +1,110 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Ken Melero
+// 
+// Description:  This class gives access to the Volume Header Label
+//               (VOL) of a DTED Level 1 file.
+//
+//********************************************************************
+// $Id: ossimDtedVol.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimDtedVol_H
+#define ossimDtedVol_H
+
+#include <iosfwd>
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimErrorStatusInterface.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimRefPtr.h>
+
+class ossimProperty;
+
+class OSSIM_DLL ossimDtedVol : public ossimErrorStatusInterface
+{
+public:
+   ossimDtedVol(const ossimFilename& dted_file="",
+                ossim_int32 offset=0);
+   ossimDtedVol(std::istream& in);
+
+   enum
+   {
+      VOL_LENGTH            = 80,
+      VOL_ONE_LABEL_1       =  4,
+      VOL_REEL_NUMBER       =  5,
+      VOL_REEL_ACCESS       = 11,
+      VOL_SPACE             = 12,
+      VOL_ACCOUNT_NUMBER    = 38,
+      VOL_BLANKS            = 52,
+      VOL_ONE_LABEL_2       = 80,
+      FIELD1_SIZE           = 3,
+      FIELD2_SIZE           = 1,
+      FIELD3_SIZE           = 6,
+      FIELD4_SIZE           = 1,
+      FIELD5_SIZE           = 26,
+      FIELD6_SIZE           = 14,
+      FIELD7_SIZE           = 28,
+      FIELD8_SIZE           = 1
+   };
+   
+   // The Recognition Sentinel signifies if the VOL record exists.
+   ossimString getRecognitionSentinel() const;
+   ossimString getReelNumber()           const;
+   ossimString getAccountNumber()        const;
+   ossim_int32 startOffset()             const;
+   ossim_int32 stopOffset()              const;
+   
+   friend OSSIM_DLL std::ostream& operator<<( std::ostream& os,
+                                              const ossimDtedVol& vol);
+   
+   void parse(std::istream& in);
+
+   /**
+    * @brief Gets a property for name.
+    * @param name Property name to get.
+    * @return ossimRefPtr<ossimProperty> Note that this can be empty if
+    * property for name was not found.
+    */
+   ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+
+   /**
+    * @brief Adds this class's properties to list.
+    * @param propertyNames list to append to.
+    */
+   void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out String to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
+    * "nitf.file_name:"
+    * @return output stream.
+    */
+   std::ostream& print(std::ostream& out,
+                       const std::string& prefix) const;
+private:
+   // Do not allow...
+   ossimDtedVol(const ossimDtedVol& source);
+   const ossimDtedVol& operator=(const ossimDtedVol& rhs);
+
+   char theRecSen[FIELD1_SIZE+1];
+   char theField2[FIELD2_SIZE+1];
+   char theReelNumber[FIELD3_SIZE+1];
+   char theField4[FIELD4_SIZE+1];
+   char theField5[FIELD5_SIZE+1];
+   char theAccountNumber[FIELD6_SIZE+1];
+   char theField7[FIELD7_SIZE+1];
+   char theField8[FIELD8_SIZE+1];
+  
+   ossim_int32 theStartOffset;
+   ossim_int32 theStopOffset;
+};
+
+#endif
+
diff --git a/include/ossim/support_data/ossimERS.h b/ossim/include/ossim/support_data/ossimERS.h
similarity index 100%
rename from include/ossim/support_data/ossimERS.h
rename to ossim/include/ossim/support_data/ossimERS.h
diff --git a/ossim/include/ossim/support_data/ossimEnviHeader.h b/ossim/include/ossim/support_data/ossimEnviHeader.h
new file mode 100644
index 0000000..0b5876d
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimEnviHeader.h
@@ -0,0 +1,415 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Burken
+//
+// Description:
+// 
+// Class for reading and writing an ENVI (The Environment for Visualizing
+// Images) header file.  This parses envi header and places in a keyword
+// list.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimEnviHeader.h 22349 2013-08-01 21:38:29Z dburken $
+
+#ifndef ossimEnviHeader_HEADER
+#define ossimEnviHeader_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimReferenced.h>
+#include <iosfwd>
+
+/**
+ * Class for reading and writing an ENVI (The Environment for Visualizing
+ * Images) header file.
+ */
+class OSSIM_DLL ossimEnviHeader : public ossimReferenced
+{
+public:
+   /** default construtor */
+   ossimEnviHeader();
+
+   /** virtual destructor */
+   virtual ~ossimEnviHeader();
+
+   virtual void reset();
+
+   /** @return Const reference to map. */
+   const ossimKeywordlist& getMap() const;
+   
+   /** @return Reference to map. */
+   ossimKeywordlist& getMap();
+
+   /**
+    * @brief Gets value for key.
+    * @param key To search for.
+    * @param value Initialized by this.
+    * @return true on success, false on error. This will return true if key is
+    * found, even if value is empty.
+    */
+   bool getValue( const ossimString& key, ossimString& value ) const;
+
+   /**
+    * @brief Gets value for key.
+    * @param key
+    * @param value
+    * @return true if key is in map even if value is empty; false, if not.
+    */
+   bool findCaseInsensitive( const ossimString& key,
+                             ossimString& value ) const;
+
+   /**
+    * @brief Gets value for key.
+    * @param key
+    * @param value
+    * @return true if key is in map even if value is empty; false, if not.
+    */
+   bool findSubStringCaseInsensitive( const ossimString& key,
+                                      ossimString& value) const;
+
+   /**
+    * Opens an envi header.
+    * 
+    * @return true on success, false on error.
+    */
+   bool open(const ossimFilename& file);
+
+   /**
+    * Writes header to file in a standard envi format.
+    *
+    * @param file File to write to.
+    *
+    * @return true on success, false on error.
+    */
+   bool writeFile(const ossimFilename& file);
+   
+   /**
+    * Prints header to out in a standard envi format.
+    *
+    * @param out Stream to write to.
+    *
+    * @return Reference to the stream passed.
+    */
+   std::ostream& print(std::ostream& out) const;
+
+   /** @brief friend operator<< */
+   friend OSSIM_DLL std::ostream& operator<<(std::ostream& out,
+                                             const ossimEnviHeader& obj);
+
+   /**
+    * @return The description of the file.
+    */
+   ossimString getDescription() const;
+
+   /**
+    * @param description The description of the file.
+    */
+   void setDescription(const ossimString& description);
+
+   /**
+    * @return The number of samples.
+    */
+   ossim_uint32 getSamples() const;
+
+   /**
+    * Sets the number of samples.
+    * 
+    * @param samples The number of samples.
+    */
+   void setSamples(ossim_uint32 samples);
+
+   /**
+    * @return The number of lines.
+    */
+   ossim_uint32 getLines() const;
+
+   /**
+    * Sets the number of lines.
+    * 
+    * @param lines The number of lines.
+    */
+   void setLines(ossim_uint32 lines);
+
+   /**
+    * @return The number of bands.
+    */
+   ossim_uint32 getBands() const;
+
+   /**
+    * Sets the number of bands.
+    * 
+    * @param bands The number of bands.
+    */
+   void setBands(ossim_uint32 bands);
+
+   /**
+    * @brief Gets default bands if "default bands" keyword is present.
+    * @param bands Initialized by this.
+    * @return true on success, false if keyword not found. "bands" will be
+    * zeroed out on failure. 
+    */
+   bool getDefaultBands( std::vector<ossim_uint32>& bands ) const;
+
+   /**
+    * @brief Gets rgb bands if "wavelength" keyword is present.
+    * @param bands Initialized by this.
+    * @return true on success, false if keyword not found.  "bands" will be
+    * zeroed out on failure.
+    */   
+   bool getRgbBandsFromWaveLength( std::vector<ossim_uint32>& bands ) const;
+
+   /**
+    * @return The number of header offset in bytes.
+    */
+   ossim_uint32 getHeaderOffset() const;
+
+   /**
+    * Sets the header offset in bytes.
+    * 
+    * @param headerOffset The number of header offset in bytes.
+    */
+   void setHeaderOffset(ossim_uint32 headerOffset);
+
+   /**
+    * @return The file type
+    */
+   ossimString getFileType() const;
+
+   /**
+    * Sets the file type.
+    * 
+    * @param fileType The sensor type as a string.
+    */
+   void setFileType(const ossimString& fileType);
+
+   /**
+    * @return The envi data type..
+    */
+   ossim_uint32 getDataType() const;
+
+   /**
+    * @return The ossimScalarType from the envi data type..
+    */
+   ossimScalarType getOssimScalarType() const;
+
+   /**
+    * Sets the envi data type based on the ossimScalarType.
+    * 
+    * @param scalar The ossimScalarType of the image.
+    */
+   void setDataType(ossimScalarType scalar);
+
+   /**
+    * @return The envi interleave type.
+    */
+   ossimString getInterleaveType() const;
+
+   /**
+    * @return The ossimInterleaveType from the envi interleave..
+    */
+   ossimInterleaveType getOssimInterleaveType() const;
+
+   /**
+    * Sets the envi interleave type string based on the ossimInterleaveType.
+    * 
+    * @param interleave The ossimInterleaveType of the image.
+    */
+   void setInterleaveType(ossimInterleaveType interleave);
+
+   /**
+    * @return The sensor type..
+    */
+   ossimString getSensorType() const;
+
+   /**
+    * Sets the envi sensor type string.
+    * 
+    * @param sensorType The sensor type as a string.
+    */
+   void setSensorType(const ossimString& sensorType);
+
+   /**
+    * @return If key "byte order" found returns the envi byte order; else,
+    * system byte order.  
+    *
+    * @note (Same as the ossimByteOrder enumeration):
+    * 0 = LITTLE_ENDIAN,
+    * 1 = BIG_ENDIAN
+    */
+   ossimByteOrder getByteOrder() const;
+   
+   /**
+    * Sets the envi byte order from the ossimByteOrder.
+    * 
+    * @param byteorder The ossimByteOrder of the image.
+    */
+   void setByteorder(ossimByteOrder byteOrder);
+   
+   /**
+    * @return The x start.
+    */
+   ossim_int32 getXStart() const;
+   
+   /**
+    * Sets the x start.
+    * 
+    * @param xStart
+    */
+   void setXStart(ossim_int32 xstart);
+   
+   /**
+    * @return The x start.
+    */
+   ossim_int32 getYStart() const;
+   
+   /**
+    * Sets the y start.
+    * 
+    * @param ystart
+    */
+   void setYStart(ossim_int32 ystart);
+
+   /**
+    * @return The envi map info string.
+    */
+   ossimString getMapInfo() const;
+
+   /**
+    * Sets the envi map info string.
+    * 
+    * @param mapInfo envi map info string.
+    */
+   void setMapInfo(const ossimString& mapInfo);
+
+   /**
+    * Sets the envi map info string from a keyword list containing geometry
+    * information.
+    * 
+    * @param kwl Keyword list containing geometry information.
+    */
+   void setMapInfo(const ossimKeywordlist& kwl,  const char* prefix=0);
+
+   /**
+    * @return The env wavelength units..
+    */
+   ossimString getWavelengthUnits() const;
+
+   /**
+    * Sets the envi wavelength units string.
+    * 
+    * @param wavelengthUnits envi wavelength units string.
+    */
+   void setWavelengthUnits(const ossimString& wavelenghtUnits);
+
+   /**
+    * @param bandNames Vector of strings to initialize with band names.
+    */
+   void getBandNames(std::vector<ossimString>& bandNames) const;
+
+   /**
+    * Sets the band name string vector.
+    * 
+    * @param bandNames Vector of band name strings.
+    */
+   void setBandNames(const std::vector<ossimString>& bandNames);
+
+   /**
+    * @param wavelengths Vector of strings to initialize with wave lengths.
+    */
+   void getWavelengths(std::vector<ossimString>& wavelengths) const;
+
+   /**
+    * Sets the envi band name string.
+    * 
+    * @param wavelengths Vector of band name strings.
+    */
+   void setWavelengths(const std::vector<ossimString>& wavelengths);
+
+   /**
+    * Method to the load (recreate) the state of the object from a keyword
+    * list.
+    *
+    * @param kwl Keyword list to initialize from.
+    *
+    * @param prefix Usually something like: "object1."
+    *
+    * @return This method will alway return true as it is intended to be
+    * used in conjuction with the set methods.
+    *
+    * Keywords picked up by loadState:
+    * 
+    * description: My_file
+    *
+    * number_samples: 1024
+    *
+    * number_lines: 512
+    *
+    * number_bands: 3
+    *
+    * header_offset: 0
+    *
+    * file_type: ENVI Standard
+    *
+    * data_type: 1
+    *
+    * interleave_type: bil
+    *
+    * sensor_type:  Unknown
+    *
+    * (little_endian or big_endian)
+    * byte_order: little_endian
+    * 
+    * map_info: Unkown
+    *
+    * wavelength_units: 
+    *
+    * band_name0: Red band
+    * band_name1: Green band
+    * band_name2: Blue band
+    *
+    * wavelength0:  620.25
+    * wavelength1:  514.5
+    * wavelength2:  470.0
+    */
+   bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+
+   /**
+    * @brief Global method to test first line of file for "ENVI".
+    * @return true on success, false on error.
+    */
+   static bool isEnviHeader( const ossimFilename& file );
+
+   /**
+    * @brief Global method to test first line of stream for "ENVI".
+    * @return true on success, false on error.
+    */
+   static bool isEnviHeader( std::istream& in );
+
+   /** @return Path to envi header file. */
+   const ossimFilename& getFile() const;
+   
+private:
+
+   /**
+    * @brief Check band list to see if any are outside of range of bands.
+    * Bands should be zero base.
+    * @return true if all bands are less than number of bands; false, if
+    * outside range or if "bands" key is not found.
+    */
+   bool rangeCheckBands( const std::vector<ossim_uint32>& bands ) const;
+
+   /**
+    * @brief Parses stream.
+    * @return true on success, false on error.
+    */
+   bool readStream(std::istream& in);
+   
+   ossimFilename       m_file; // Name of header file.
+   ossimKeywordlist    m_keywords;
+};
+#endif /* #ifndef ossimEnviHeader_HEADER */
+
diff --git a/ossim/include/ossim/support_data/ossimEnviInfo.h b/ossim/include/ossim/support_data/ossimEnviInfo.h
new file mode 100644
index 0000000..912fa3b
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimEnviInfo.h
@@ -0,0 +1,55 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: ENVI Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossimEnviInfo_HEADER
+#define ossimEnviInfo_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/support_data/ossimInfoBase.h>
+#include <ossim/base/ossimFilename.h>
+
+/** @brief ENVI info class. */
+class OSSIM_DLL ossimEnviInfo : public ossimInfoBase
+{
+public:
+   
+   /** default constructor */
+   ossimEnviInfo();
+
+   /** virtual destructor */
+   virtual ~ossimEnviInfo();
+
+   /**
+    * @brief open method.
+    *
+    * @param file File name to open.
+    *
+    * @return true on success false on error.
+    */
+   virtual bool open(const ossimFilename& file);
+
+   /**
+    * Print method.
+    *
+    * @param out Stream to print to.
+    * 
+    * @return std::ostream&
+    */
+   virtual std::ostream& print(std::ostream& out) const;
+
+private:
+
+   ossimFilename m_file;
+};
+
+#endif /* End of "#ifndef ossimEnviInfo_HEADER" */
+
diff --git a/include/ossim/support_data/ossimFfL5.h b/ossim/include/ossim/support_data/ossimFfL5.h
similarity index 100%
rename from include/ossim/support_data/ossimFfL5.h
rename to ossim/include/ossim/support_data/ossimFfL5.h
diff --git a/include/ossim/support_data/ossimFfL7.h b/ossim/include/ossim/support_data/ossimFfL7.h
similarity index 100%
rename from include/ossim/support_data/ossimFfL7.h
rename to ossim/include/ossim/support_data/ossimFfL7.h
diff --git a/include/ossim/support_data/ossimFfRevb.h b/ossim/include/ossim/support_data/ossimFfRevb.h
similarity index 100%
rename from include/ossim/support_data/ossimFfRevb.h
rename to ossim/include/ossim/support_data/ossimFfRevb.h
diff --git a/include/ossim/support_data/ossimFfRevc.h b/ossim/include/ossim/support_data/ossimFfRevc.h
similarity index 100%
rename from include/ossim/support_data/ossimFfRevc.h
rename to ossim/include/ossim/support_data/ossimFfRevc.h
diff --git a/ossim/include/ossim/support_data/ossimFgdcTxtDoc.h b/ossim/include/ossim/support_data/ossimFgdcTxtDoc.h
new file mode 100644
index 0000000..81b6b4b
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimFgdcTxtDoc.h
@@ -0,0 +1,130 @@
+//----------------------------------------------------------------------------
+//
+// File ossimFgdcTxtDoc.h
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: ossimFgdcTxtDoc class declaration.
+//
+// FGDC = "Federal Geographic Data Committee"
+//
+// See: http://www.fgdc.gov/
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimFgdcTxtDoc.h 2673 2011-06-06 14:57:24Z david.burken $
+#ifndef ossimFgdcTxtDoc_HEADER
+#define ossimFgdcTxtDoc_HEADER 1
+
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/projection/ossimProjection.h>
+
+/**
+ * @class ossimFgdcTxtDoc
+ * @brief Support data container for FGDC in text format.
+ *
+ * Has minimum parse support to get Spatial_Reference_Information section to
+ * extract projection information.
+ *
+ * TODO: Make an ossimFgdcBase and consolidate code from
+ * ossimFgdcXmlDoc and this class. (drb - 15 Aug. 2011)
+ */
+class OSSIM_DLL ossimFgdcTxtDoc : public ossimReferenced
+{
+public:
+
+   /** default constructor */
+   ossimFgdcTxtDoc();
+
+   /** virtual destructor */
+   virtual ~ossimFgdcTxtDoc();
+
+   /**
+    * @brief open method.
+    *
+    * @param file File name to open.
+    *
+    * @return true on success false on error.
+    */
+   bool open(const ossimFilename& file);
+
+   /**
+    * @brief Close method.
+    *
+    * This doesn't really do anything.  Here only because I think every open()
+    * should have a matching close().
+    */
+   void close();
+
+   /**
+    * @brief Gets projection from Spatial_Reference_Information block.
+    * @param proj Intialized by this method.  Set to null on projection cannot
+    * be created.
+    */   
+   void getProjection(ossimRefPtr<ossimProjection>& proj);
+
+   /**
+    * @brief Gets units from Altitude_Distance_Units.
+    * @return Units if found, OSSIM_UNIT_UNKNOWN if not.
+    */
+   void getAltitudeDistanceUnits(std::string& units) const;
+
+private:
+
+   /**
+    * @brief Gets projection from Spatial_Reference_Information block for
+    * version FGDC-STD-001-1998.
+    * @param str Stream to read from.
+    * @param proj Intialized by this method.  Set to null on projection cannot
+    * be created.
+    */ 
+   void getProjectionV1(std::ifstream& str,
+                        ossimRefPtr<ossimProjection>& proj);
+
+   /**
+    * @brief Finds key and returns true if present.
+    *
+    * Leaves stream at position of last getline.
+    * 
+    * @param str Stream to read from.
+    * @param key Key to find.
+    * @return true if present false if not.
+    */
+   bool findKey( std::ifstream& str, const std::string& key);
+
+   /**
+    * @brief Finds key and returns and intializes value if present.
+    *
+    * Stream position at end of call is dependent on seekBack flag.
+    * 
+    * @param str Stream to read from.
+    * @param seekBack If true the stream will be repositioned to original
+    * position at beginning of the call.
+    * @param key Key to find.
+    * @param value Intialized with value if key is found.
+    * @return true if present false if not.
+    */
+   bool findKey( std::ifstream& str,
+                 bool seekBack,
+                 const std::string& key,
+                 std::string& value);
+
+   /**
+    * Gets ossim datum string from fgdc datum string.
+    */
+   void getOssimDatum( const std::string& fgdcDatumString,
+                       std::string& ossimDatumCode ) const;
+
+   // Container for relevant data from FGDC file.
+   ossimRefPtr<ossimKeywordlist> m_kwl;
+   
+}; // End: class ossimFgdcTxtDoc
+
+#endif /* #ifndef ossimFgdcTxtDoc_HEADER */
+
diff --git a/ossim/include/ossim/support_data/ossimFgdcXmlDoc.h b/ossim/include/ossim/support_data/ossimFgdcXmlDoc.h
new file mode 100644
index 0000000..268dabb
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimFgdcXmlDoc.h
@@ -0,0 +1,189 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Mingjie Su
+//
+// Description: Utility class to encapsulate parsing projection info in the xml file.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimFgdcXmlDoc.h 2063 2011-01-19 19:38:12Z ming.su $
+#ifndef ossimFgdcXmlDoc_HEADER
+#define ossimFgdcXmlDoc_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimXmlDocument.h>
+#include <ossim/projection/ossimProjection.h>
+
+class ossimDatum;
+class ossimDrect;
+
+/** @brief Class for FGDC XML doc parsing. */
+class OSSIMDLLEXPORT ossimFgdcXmlDoc
+{
+public:
+   /** @brief default constructor */
+   ossimFgdcXmlDoc();
+   
+   /** @brief destructor */
+   ~ossimFgdcXmlDoc();
+
+   /**
+    * @brief Open method.
+    * @return true on success, false on error.
+    */
+   bool open(const ossimFilename& xmlFileName);
+
+   /** @return true if m_xmlDocument is open; false if not. */
+   bool isOpen() const;
+
+   /** @brief close method. */
+   void close();
+
+   /** @brief Gets projection from document. */
+   ossimRefPtr<ossimProjection> getProjection();
+
+   /** @return Unit type. Note meters is the default if not found in doc. */
+   ossimUnitType getUnitType() const;
+
+   /**
+    * @return text for path "/metadata/spref/horizsys/cordsysn/geogcsn"
+    */
+   bool getGeoCsn(ossimString& s) const;
+
+   /**
+    * @return text for path "/metadata/spref/horizsys/cordsysn/projcsn"
+    */
+   bool getProjCsn(ossimString& s) const;
+
+   /**
+    * @brief Get the Altitude Distance Units
+    *
+    * Path: "/metadata/spref/vertdef/altsys/altunits"
+    *
+    * Domain: "meters" "feet"
+    * 
+    * @return Text for path.
+    */
+   bool getAltitudeDistantUnits(ossimString& s) const;
+
+   /**
+    * @brief Get the Grid Coordinate system
+    *
+    * Path: "/metadata/spref/horizsys/planar/gridsys/gridsysn"
+    *
+    * @return Text for path.
+    */
+   bool getGridCoordinateSystem(ossimString& s) const;
+
+   /**
+    * @brief Gets projection from Grid Coordinate system node.
+    *
+    * Throws ossimException on error.
+    *
+    * @return Refptr with projection pointer.  Underlying pointer may be null.
+    */
+   ossimRefPtr<ossimProjection> getGridCoordSysProjection();
+
+   /**
+    * @brief Get the Grid Coordinate system
+    *
+    * Path: "/metadata/spref/horizsys/planar/gridsys/gridsysn"
+    *
+    * @return Text for path.
+    */
+   bool getHorizontalDatum(ossimString& s) const;
+
+   /**
+    * @brief Get the Planar Distant Units
+    * 
+    * Path: "/metadata/spref/horizsys/planar/planci/plandu"
+    *
+    * Domain: "meters" "international feet" "survey feet"
+    *
+    * @return Text for path.
+    */
+   bool getPlanarDistantUnits(ossimString& s) const;
+
+   /**
+    * @brief Get UTM false Northing.
+    * 
+    * Path: "/metadata/spref/horizsys/planar/gridsys/utm/transmer/fnorth"
+    *
+    * @return Text for path.
+    */
+   bool getUtmFalseNorthing(ossimString& s) const;
+   
+   /**
+    * @brief Get UTM zone.
+    * 
+    * Path: "/metadata/spref/horizsys/planar/gridsys/utm/utmzone"
+    *
+    * Domain: 1 <= UTM Zone Number <= 60 for the northern hemisphere;
+    * -60 <= UTM Zone Number <= -1 for the southern hemisphere
+     *
+    * @return Text for path.
+    */
+   bool getUtmZone(ossimString& s) const;
+
+   /**
+    * @brief Get Bands.
+    * 
+    * Path: "/metadata/spdoinfo/rastinfo/vrtcount"
+    *
+    * the maximum number of raster objects along the vertical (z) axis. 
+    * For use with rectangular volumetric raster objects (voxels). 
+     *
+    * @return int for path.
+    */
+   ossim_uint32 getNumberOfBands();
+
+    /**
+    * @brief Gets path from doc and initializes string.
+    *
+    * This method errors if multiple nodes are found for path.
+    * 
+    * @param path Xml path to look for.
+    * @param s String to initialize.
+    * @return true on success and false if path is not found or if there
+    * are more than one of path.
+    */
+   bool getPath(const ossimString& path, ossimString& s) const;
+
+   bool getImageSize(ossimIpt& size) const;
+
+private:
+
+   bool getXRes(ossim_float64& v) const;
+   
+   bool getYRes(ossim_float64& v) const;
+
+   void getBoundingBox(ossimDrect& rect) const;
+
+   /**
+    * @brief Gets path from doc and initializes string.
+    * @param path Xml path to look for.
+    * @param v Value to initialize.
+    * @return true on success and false if path is not found or if there
+    * are more than one of path.
+    */
+   bool getPath(const ossimString& path, ossim_float64& v) const;
+
+   /**
+    * Gets the ossimDatum from string.
+    */
+   const ossimDatum* createOssimDatum(const ossimString& s) const;
+   
+   ossimFilename                 m_xmlFilename;
+   ossimRefPtr<ossimXmlDocument> m_xmlDocument;
+   ossimRefPtr<ossimProjection>  m_projection;
+   mutable bool                  m_boundInDegree;
+};
+
+#endif /* matches: #ifndef ossimFgdcXmlDoc */
+
diff --git a/include/ossim/support_data/ossimGeoTiff.h b/ossim/include/ossim/support_data/ossimGeoTiff.h
similarity index 100%
rename from include/ossim/support_data/ossimGeoTiff.h
rename to ossim/include/ossim/support_data/ossimGeoTiff.h
diff --git a/ossim/include/ossim/support_data/ossimGmlSupportData.h b/ossim/include/ossim/support_data/ossimGmlSupportData.h
new file mode 100644
index 0000000..0a3a9cb
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimGmlSupportData.h
@@ -0,0 +1,118 @@
+//---
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: GML support data object.
+// 
+//---
+// $Id$
+#ifndef ossimGmlSupportData_HEADER
+#define ossimGmlSupportData_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimString.h>
+#include <iosfwd>
+
+class ossimImageGeometry;
+class ossimKeywordlist;
+class ossimMapProjection;
+class ossimXmlDocument;
+class ossimXmlNode;
+
+/** @brief GML support data class. */
+class OSSIM_DLL ossimGmlSupportData
+{
+public:
+   
+   /** default constructor */
+   ossimGmlSupportData();
+
+   /** destructor */
+   ~ossimGmlSupportData();
+
+   /**
+    * @brief Initializes gml block from geometry file.
+    * @param geom
+    */
+   bool initialize( const ossimImageGeometry* geom );
+
+   /**
+    * @brief Initializes from stream assumed to be a gml block.
+    * @param in
+    */   
+   bool initialize( std::istream& in );
+
+   /** @brief Write xml doc to stream. */
+   bool write( std::ostream& os );
+
+   /** @return Reference to xml doc. */
+   ossimRefPtr<ossimXmlDocument> getXmlDoc() const;
+
+   /**
+    *  @brief Extracts geometry info to keyword list.
+    *  
+    *  Populates the keyword list with image geometry information.  This
+    *  method is used to relay projection/model information to users.
+    *
+    *  @param geomKwl Keyword list that will be initialized with geometry info.
+    *
+    *  @return true if geometry info is present, false if not.
+    */
+   bool getImageGeometry( ossimKeywordlist& geomKwl ) const;
+  
+
+private:
+   
+   ossimRefPtr<ossimXmlNode> getGmljp2V1RootNode() const;
+   ossimRefPtr<ossimXmlNode> getGmljp2V2RootNode() const;
+
+   void getOrigin( const ossimImageGeometry* geom,
+                   ossimString& originString,
+                   ossimString& offsetVector1String, 
+                   ossimString& offsetVector2String ) const;
+
+   void getLimits( const ossimImageGeometry* geom,
+                   ossimString& gridHighString,
+                   ossimString& gridLowString ) const;
+
+   void getGeoBounds( const ossimImageGeometry* geom,
+                      ossimString& upperCornerString,
+                      ossimString& lowerCornerString ) const;
+
+   void getGeoOrigin( const ossimImageGeometry* geom,
+                      ossimString& originString,
+                      ossimString& offsetVector1String, 
+                      ossimString& offsetVector2String ) const;
+
+   void getMapOrigin( const ossimImageGeometry* geom,
+                      ossimString& originString,
+                      ossimString& offsetVector1String, 
+                      ossimString& offsetVector2String ) const;
+
+   bool configureGmljp2V1( ossimRefPtr<ossimXmlNode> node, const ossimImageGeometry* geom );
+   bool configureGmljp2V2( ossimRefPtr<ossimXmlNode> node, const ossimImageGeometry* geom );
+   bool configureBounds  ( ossimRefPtr<ossimXmlNode> node, const ossimImageGeometry* geom );
+                  
+   ossimRefPtr<ossimXmlDocument>         m_xmlDocument;
+   ossimRefPtr<const ossimMapProjection> m_mapProj;
+
+   bool         m_use_gmljp2_version2;
+   ossim_uint32 m_pcsCodeMap;
+   ossim_uint32 m_pcsCodeGeo;
+   ossimString  m_srsNameStringMap;
+   ossimString  m_srsNameStringGeo;
+   ossimString  m_srsDimensionString;
+   ossimString  m_axisLabelsStringMap;
+   ossimString  m_axisLabelsStringGeo;
+   ossimString  m_uomLabelsStringMap;
+   ossimString  m_uomLabelsStringGeo;
+
+};
+
+#endif /* End of "#ifndef ossimGmlSupportData_HEADER" */
+
diff --git a/ossim/include/ossim/support_data/ossimIkonosMetaData.h b/ossim/include/ossim/support_data/ossimIkonosMetaData.h
new file mode 100644
index 0000000..6b577c2
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimIkonosMetaData.h
@@ -0,0 +1,121 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Class declaration for ossimIkonosMetaData.
+// 
+// This class parses a Space Imaging Ikonos meta data file.
+//
+//********************************************************************
+// $Id: ossimIkonosMetaData.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimIkonosMetaData_HEADER
+#define ossimIkonosMetaData_HEADER
+
+#include <iosfwd>
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimString.h>
+
+class ossimFilename;
+class ossimKeywordlist;
+
+
+class OSSIMDLLEXPORT ossimIkonosMetaData : public ossimObject
+{
+public:
+
+   /** @brief default constructor */
+   ossimIkonosMetaData();
+
+
+   /**
+    * @brief Open method that takes the image file, derives the metadata,
+    * header and rpc files, then calls parse methods parseMetaData,
+    * parseHdrData, and parseRpcData.
+    *
+    * @param imageFile Usually in the form of "po_2619900_pan_0000000.tif".
+    *
+    * @return true on success, false on error.
+    */
+   bool open(const ossimFilename& imageFile);
+
+   void clearFields();
+   
+   ossimString   getSensorID() const;
+
+   //---
+   // Convenient method to print important image info:
+   //---
+   virtual std::ostream& print(std::ostream& out) const;
+
+   /**
+    * Method to save the state of the object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix = 0) const;
+   
+   /**
+    * Method to the load (recreate) the state of the object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix = 0);
+
+   /**
+    * @brief Method to parse Ikonos metadata file.
+    *
+    * @param metadata File name usually in the form of
+    * "po_149875_metadata.txt."
+    *
+    * @return true on success, false on error.
+    */
+   bool parseMetaData(const ossimFilename& metadata);
+
+   /**
+    * @brief Method to parse Ikonos header file.
+    *
+    * @param metadata File name usually in the form of
+    * "po_149875_pan_0000000.hdr"
+    *
+    * @return true on success, false on error.
+    */
+   bool parseHdrData(const ossimFilename& data_file);
+
+   /**
+    * @brief Method to parse Ikonos rpc file.
+    *
+    * @param metadata File name usually in the form of
+    * "po_149875_pan_0000000_rpc.txt"
+    *
+    * @return true on success, false on error.
+    *
+    * @note Currently NOT implemented.
+    */
+   bool parseRpcData(const ossimFilename& data_file);
+
+protected:
+   /** virtual destructor */
+   virtual ~ossimIkonosMetaData();
+
+private:
+   ossim_float64 theNominalCollectionAzimuth;
+   ossim_float64 theNominalCollectionElevation;
+   ossim_float64 theSunAzimuth;
+   ossim_float64 theSunElevation;
+   ossim_uint32  theNumBands;
+   ossimString   theBandName;
+   ossimString   theProductionDate;
+   ossimString   theAcquisitionDate;
+   ossimString   theAcquisitionTime;
+   ossimString   theSensorID;
+   
+TYPE_DATA   
+};
+
+#endif /* #ifndef ossimIkonosMetaData_HEADER */
+
diff --git a/ossim/include/ossim/support_data/ossimInfoBase.h b/ossim/include/ossim/support_data/ossimInfoBase.h
new file mode 100644
index 0000000..1cd5af6
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimInfoBase.h
@@ -0,0 +1,84 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Base class for Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossimInfoBase_HEADER
+#define ossimInfoBase_HEADER
+
+#include <iosfwd>
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimReferenced.h>
+
+class ossimFilename;
+class ossimKeywordlist;
+
+/**
+ * @brief Info Base.
+ *
+ * This is the base class for all info objects.  The purpose of an Info object
+ * is to dump whatever info is available for a given file name to user.
+ */
+class OSSIM_DLL ossimInfoBase : public ossimReferenced
+{
+public:
+   
+   /** default constructor */
+   ossimInfoBase();
+
+
+   /**
+    * @brief open method.
+    *
+    * @param file File name to open.
+    *
+    * @return true on success false on error.
+    */
+   virtual bool open(const ossimFilename& file) = 0;
+
+   /**
+    * Print method.
+    *
+    * @param out Stream to print to.
+    * 
+    * @return std::ostream&
+    */
+   virtual std::ostream& print(std::ostream& out) const = 0;
+
+   /**
+    * @brief Sets the overview flag.
+    * @param flag If true overview info is processed also.
+    */
+   void setProcessOverviewFlag(bool flag);
+   
+   /**
+    * @brief Method to get the overview flag.
+    * @return The overview flag.
+    */
+   bool getProcessOverviewFlag() const;
+
+   /**
+    * @brief Method to dump info to a keyword list.
+    * @param kwl The keyword list to initialize.
+    * @return true on success, false on error.
+    */
+   virtual bool getKeywordlist(ossimKeywordlist& kwl)const;
+
+protected:
+   /** virtual destructor */
+   virtual ~ossimInfoBase();
+   
+   bool theOverviewFlag; // If true overview information should be processed.
+   
+};
+
+#endif /* End of "#ifndef ossimInfoBase_HEADER" */
+
diff --git a/ossim/include/ossim/support_data/ossimInfoFactory.h b/ossim/include/ossim/support_data/ossimInfoFactory.h
new file mode 100644
index 0000000..5adfbb8
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimInfoFactory.h
@@ -0,0 +1,60 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Factory for info objects.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimInfoFactory.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimInfoFactory_HEADER
+#define ossimInfoFactory_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/support_data/ossimInfoFactoryInterface.h>
+
+class ossimFilename;
+class ossimInfoBase;
+
+/**
+ * @brief Info factory.
+ */
+class OSSIM_DLL ossimInfoFactory : public ossimInfoFactoryInterface
+{
+public:
+
+   /** virtual destructor */
+   virtual ~ossimInfoFactory();
+
+   static ossimInfoFactory* instance();
+
+   /**
+    * @brief create method.
+    *
+    * @param file Some file you want info for.
+    *
+    * @return ossimInfoBase* on success 0 on failure.  Caller is responsible
+    * for memory.
+    */
+   virtual ossimInfoBase* create(const ossimFilename& file) const;
+   
+private:
+   
+   /** hidden from use default constructor */
+   ossimInfoFactory();
+
+   /** hidden from use copy constructor */
+   ossimInfoFactory(const ossimInfoFactory& obj);
+
+   /** hidden from use operator = */
+   const ossimInfoFactory& operator=(const ossimInfoFactory& rhs);
+
+   /** The single instance of this class. */
+   static ossimInfoFactory* theInstance;
+};
+
+#endif /* End of "#ifndef ossimInfoFactory_HEADER" */
+
diff --git a/ossim/include/ossim/support_data/ossimInfoFactoryInterface.h b/ossim/include/ossim/support_data/ossimInfoFactoryInterface.h
new file mode 100644
index 0000000..6d8730d
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimInfoFactoryInterface.h
@@ -0,0 +1,81 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Interface for info factories.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossimInfoFactoryInterface_HEADER
+#define ossimInfoFactoryInterface_HEADER
+
+#include <ossim/base/ossimConstants.h>
+// #include <ossim/base/ossimObjectFactory.h>
+
+class ossimFilename;
+class ossimInfoBase;
+
+//---
+// Note: Deriving from ossimObjectFactory is being backed out as no
+// ossimObjectFactory interfaces were ever called and it introduces warning in
+// the header file so anyone who #includes this gets warnings...
+//
+// We can add back if there is a interface from ossimObjectFactory needed;
+// else, please leave out.
+// 
+// drb 20120518
+//---
+
+/**
+ * @brief Info factory.
+ */
+class OSSIM_DLL ossimInfoFactoryInterface // : public ossimObjectFactory
+{
+public:
+
+   /** default constructor */
+   ossimInfoFactoryInterface(){}
+
+   /** virtual destructor */
+   virtual ~ossimInfoFactoryInterface(){}
+
+   /**
+    * @brief Pure virtual create method.  Derived classes must implement to
+    * be concrete.
+    *
+    * @param file Some file you want info for.
+    *
+    * @return ossimInfoBase* on success 0 on failure.  Caller is responsible
+    * for memory.
+    */
+   virtual ossimInfoBase* create(const ossimFilename& file) const = 0;
+
+#if 0
+   virtual ossimObject* createObject(const ossimString& typeName)const
+   {
+      return 0;
+   }
+   virtual ossimObject* createObject(const ossimKeywordlist& kwl,
+                                     const char* prefix=0)const
+   {
+      return 0;
+   }
+   /*!
+    * This should return the type name of all objects in all factories.
+    * This is the name used to construct the objects dynamially and this
+    * name must be unique.
+    */
+   virtual void getTypeNameList(std::vector<ossimString>& typeList)const
+   {
+      
+   }
+#endif
+   
+};
+
+#endif /* End of "#ifndef ossimInfoFactoryInterface_HEADER" */
+
diff --git a/include/ossim/support_data/ossimInfoFactoryRegistry.h b/ossim/include/ossim/support_data/ossimInfoFactoryRegistry.h
similarity index 100%
rename from include/ossim/support_data/ossimInfoFactoryRegistry.h
rename to ossim/include/ossim/support_data/ossimInfoFactoryRegistry.h
diff --git a/ossim/include/ossim/support_data/ossimJ2kCodRecord.h b/ossim/include/ossim/support_data/ossimJ2kCodRecord.h
new file mode 100644
index 0000000..d240cf8
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimJ2kCodRecord.h
@@ -0,0 +1,96 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Container class for J2K Coding style default (COD) record.
+//
+// See document BPJ2K01.00 Table 7-7 Image and tile size (15444-1 Annex A5.1)
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimJ2kCodRecord.h,v 1.5 2005/10/13 21:24:47 dburken Exp $
+#ifndef ossimJ2kCodRecord_HEADER
+#define ossimJ2kCodRecord_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+
+#include <iosfwd>
+#include <string>
+
+class OSSIM_DLL ossimJ2kCodRecord
+{
+public:
+   
+   /** default constructor */
+   ossimJ2kCodRecord();
+
+   /** destructor */
+   ~ossimJ2kCodRecord();
+
+   /**
+    * Parse method.  Performs byte swapping as needed.
+    *
+    * @param in Stream to parse.
+    *
+    * @note COD Marker (0xff52) is not read.
+    */
+   void parseStream(std::istream& in);
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out String to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "j2k." and key is "file_name" key becomes:
+    * "nitf.file_name:"
+    * @return output stream.
+    */
+   std::ostream& print(std::ostream& out,
+                       const std::string& prefix=std::string()) const;
+
+   /** operator<< */
+   friend OSSIM_DLL std::ostream& operator<<(
+      std::ostream& out, const ossimJ2kCodRecord& obj);
+
+   /** segmet marker 0xff52 (big endian) */
+   ossim_uint16 m_marker;
+
+   /** length of segment minus marker */
+   ossim_uint16 m_lcod;
+
+   /** Coding style */
+   ossim_uint8 m_scod;
+
+   /** SGcod - Progression order */
+   ossim_uint8 m_progressionOrder;
+
+   /** SGcod - Number of layers */
+   ossim_uint16 m_numberOfLayers;
+
+   /** SGcod - Multiple component transform */
+   ossim_uint8 m_multipleComponentTransform;
+
+   /** SPcod - Number of decomposition levels */
+   ossim_uint8 m_numberOfDecompositionLevels;
+
+   /** SPcod - Code-block width */
+   ossim_uint8 m_codeBlockWidth;
+   
+   /** SPcod - Code-block height */
+   ossim_uint8 m_codeBlockHeight;
+
+   /** SPcod - Code-block height */
+   ossim_uint8 m_codeBlockStyle;
+
+   /** SPcod - transformation (wavelet filter) */
+   ossim_uint8 m_transformation;
+
+    /** SPcod - precinct size (only is defined, Scod = xxxx xxx1) */
+   ossim_uint8 m_precinctSize;
+};
+
+#endif /* End of "#ifndef ossimJ2kCodRecord_HEADER" */
+
diff --git a/ossim/include/ossim/support_data/ossimJ2kInfo.h b/ossim/include/ossim/support_data/ossimJ2kInfo.h
new file mode 100644
index 0000000..db9353b
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimJ2kInfo.h
@@ -0,0 +1,125 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: J2K Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossimJ2kInfo_HEADER
+#define ossimJ2kInfo_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/support_data/ossimInfoBase.h>
+#include <ossim/base/ossimFilename.h>
+
+class ossimEndian;
+
+/**
+ * @brief TIFF info class.
+ *
+ * Encapsulates the listgeo functionality.
+ */
+class OSSIM_DLL ossimJ2kInfo : public ossimInfoBase
+{
+public:
+   
+   /** default constructor */
+   ossimJ2kInfo();
+
+   /** virtual destructor */
+   virtual ~ossimJ2kInfo();
+
+   /**
+    * @brief open method.
+    *
+    * @param file File name to open.
+    *
+    * @return true on success false on error.
+    */
+   virtual bool open(const ossimFilename& file);
+   
+   /**
+    * Print method.
+    *
+    * @param out Stream to print to.
+    * 
+    * @return std::ostream&
+    */
+   virtual std::ostream& print(std::ostream& out) const;
+
+protected:
+
+   /** Initializes s reference.  Does byte swapping as needed. */
+   void readUInt16(ossim_uint16& s, std::ifstream& str) const;
+
+   /**
+    * @brief Prints 0xff52 COD_MARKER (0xff52).
+    * @param out Stream to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "j2k." and key is "file_name" key becomes:
+    * "j2k.file_name:"
+    * @param str Input stream to pass to j2k record for parsing.  Should be
+    * just pass the marker.
+    * @return output stream.
+    */
+   std::ostream& printCodMarker(std::ostream& out,
+                                const std::string& prefix,
+                                std::ifstream& str) const;
+
+   /**
+    * @brief Prints 0xff51 SIZ_MARKER (0xff51).
+    * @param out Stream to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "j2k." and key is "file_name" key becomes:
+    * "j2k.file_name:"
+    * @param str Input stream to pass to j2k record for parsing.  Should be
+    * just pass the marker.
+    * @return output stream.
+    */
+   std::ostream& printSizMarker(std::ostream& out,
+                                const std::string& prefix,
+                                std::ifstream& str) const;
+
+   /**
+    * @brief Prints 0xff90 SOT_MARKER (0xff90)
+    * @param out Stream to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "j2k." and key is "file_name" key becomes:
+    * "j2k.file_name:"
+    * @param str Input stream to pass to j2k record for parsing.  Should be
+    * just pass the marker.
+    * @return output stream.
+    */
+   std::ostream& printSotMarker(std::ostream& out,
+                                const std::string& prefix,
+                                std::ifstream& str) const;
+
+   /**
+    * @brief Prints unhandle segment.  This will only print the marker and
+    * record length.
+    * @param out Stream to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "j2k." and key is "file_name" key becomes:
+    * "j2k.file_name:"
+    * @param str Input stream to pass to j2k record for parsing.  Should be
+    * just pass the marker.
+    * @param marker.  The marker.
+    * @return output stream.
+    */
+   std::ostream& printUnknownMarker(std::ostream& out,
+                                    const std::string& prefix,
+                                    std::ifstream& str,
+                                    ossim_uint16 marker) const;
+
+   
+   ossimFilename  m_file;
+   ossimEndian*   m_endian;
+};
+
+#endif /* End of "#ifndef ossimJ2kInfo_HEADER" */
+
diff --git a/ossim/include/ossim/support_data/ossimJ2kSizRecord.h b/ossim/include/ossim/support_data/ossimJ2kSizRecord.h
new file mode 100644
index 0000000..6b98794
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimJ2kSizRecord.h
@@ -0,0 +1,131 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Container class for J2K Image and tile size (SIZ) record.
+//
+// See document BPJ2K01.00 Table 7-6 Image and tile size (15444-1 Annex A5.1)
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimJ2kSizRecord.h,v 1.5 2005/10/13 21:24:47 dburken Exp $
+#ifndef ossimJ2kSizRecord_HEADER
+#define ossimJ2kSizRecord_HEADER
+
+#include <iosfwd>
+#include <string>
+
+#include <ossim/base/ossimConstants.h>
+
+class OSSIM_DLL ossimJ2kSizRecord
+{
+public:
+   
+   /** default constructor */
+   ossimJ2kSizRecord();
+
+   /** destructor */
+   ~ossimJ2kSizRecord();
+
+   /**
+    * Parse method.  Performs byte swapping as needed.
+    *
+    * @param in Stream to parse.
+    *
+    * @note SIZ Marker (0xff51) is not read.
+    */
+   void parseStream(std::istream& in);
+
+   /** @return scalar type based on bit depth and signed bit from theSsiz. */
+   ossimScalarType getScalarType() const;
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out String to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
+    * "nitf.file_name:"
+    * @return output stream.
+    */
+   std::ostream& print(std::ostream& out,
+                       const std::string& prefix=std::string()) const;
+
+   /** operator<< */
+   friend OSSIM_DLL std::ostream& operator<<(
+      std::ostream& out, const ossimJ2kSizRecord& obj);
+
+   /** segmet marker 0xff51 (big endian) */
+   ossim_uint16 m_marker;
+
+   /** length of segment minus marker */
+   ossim_uint16 m_Lsiz;
+
+   /** profile */
+   ossim_uint16 m_Rsiz;
+
+   /** width of reference grid */
+   ossim_uint32 m_Xsiz;
+
+   /** height of reference grid */
+   ossim_uint32 m_Ysiz;
+
+   /**
+    * Horizontal offset from the orgin of reference grid to the left side
+    * of image.
+    */
+   ossim_uint32 m_XOsiz;
+
+   /**
+    * Vertical offset from the orgin of reference grid to the top
+    * of image.
+    */
+   ossim_uint32 m_YOsiz;
+
+   /** width of one reference tile */
+   ossim_uint32 m_XTsiz;
+   
+   /** height of one reference tile */   
+   ossim_uint32 m_YTsiz;
+
+   /**
+    * Horizontal offset from the orgin of reference grid to the left edge
+    * of first tile.
+    */
+   ossim_uint32 m_XTOsiz;
+
+   /**
+    * Vertical offset from the orgin of reference grid to the top
+    * edge of first tile.
+    */
+   ossim_uint32 m_YTOsiz;
+
+   /** number of component in the image */
+   ossim_uint16 m_Csiz;
+
+   /**
+    * sign bit and bit depth of data
+    * unsigned = 0xxx xxxx (msb == 0)
+    * signed   = 1xxx xxxx (msb == 1)
+    * bit depth = x000 0000 + 1 (first seven bits plus one)
+    */
+   ossim_uint8  m_Ssiz;
+
+   /**
+    * Horizontal separation of a sample of the component with respect to the
+    * reference grid.
+    */
+   ossim_uint8  m_XRsiz;
+
+   /**
+    * Vertical separation of a sample of the component with respect to the
+    * reference grid.
+    */
+   ossim_uint8  m_YRsiz;
+};
+
+#endif /* End of "#ifndef ossimJ2kSizRecord_HEADER" */
+
diff --git a/ossim/include/ossim/support_data/ossimJ2kSotRecord.h b/ossim/include/ossim/support_data/ossimJ2kSotRecord.h
new file mode 100644
index 0000000..c10ea3e
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimJ2kSotRecord.h
@@ -0,0 +1,85 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Container class for J2K "Start Of Tile" (SOT) record.
+//
+// See document BPJ2K01.00 Table 7-3 Image and tile size (15444-1 Annex A.4.2)
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimJ2kSotRecord.h,v 1.5 2005/10/13 21:24:47 dburken Exp $
+#ifndef ossimJ2kSotRecord_HEADER
+#define ossimJ2kSotRecord_HEADER
+
+#include <iosfwd>
+#include <string>
+
+#include <ossim/base/ossimConstants.h>
+
+class OSSIM_DLL ossimJ2kSotRecord
+{
+public:
+   
+   /** default constructor */
+   ossimJ2kSotRecord();
+
+   /** destructor */
+   ~ossimJ2kSotRecord();
+
+   /**
+    * Parse method.  Performs byte swapping as needed.
+    *
+    * @param in Stream to parse.
+    *
+    * @note Marker is not read.
+    */
+   void parseStream(std::istream& in);
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out String to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
+    * "nitf.file_name:"
+    * @return output stream.
+    */
+   std::ostream& print(std::ostream& out,
+                       const std::string& prefix=std::string()) const;
+   
+   /**
+    * operator<<.
+    */
+   friend OSSIM_DLL std::ostream& operator<<(
+      std::ostream& out, const ossimJ2kSotRecord& obj);
+
+   /** Start of tile-part marker code. 0xff90 */
+   ossim_uint16 theMarker;
+   
+   /** Length in bytes of the marker segment. */
+   ossim_uint16 theLsot;
+
+   /** Tile index. Tiles are in raster order starting at 0. */
+   ossim_uint16 theIsot;
+
+   /** The length in bytes of this record including the SOT marker. */
+   ossim_uint32 thePsot;
+
+   /** Tile-Part index. */
+   ossim_uint8  theTpsot;
+
+   /**
+    * 0 = Number of tile-parts of this tile in the codestream is not defined
+    * in this header.
+    *
+    * 1-255 number of tile-parts of this tile in the codestream.
+    */
+   ossim_uint8  theTnsot;
+};
+
+#endif /* End of "#ifndef ossimJ2kSotRecord_HEADER" */
+
diff --git a/ossim/include/ossim/support_data/ossimJp2Info.h b/ossim/include/ossim/support_data/ossimJp2Info.h
new file mode 100644
index 0000000..af70537
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimJp2Info.h
@@ -0,0 +1,135 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: JP2 Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimJp2Info.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimJp2Info_HEADER
+#define ossimJp2Info_HEADER 1
+
+#include <ossim/support_data/ossimJ2kInfo.h>
+
+/**
+ * @brief JP2 info class.
+ */
+class OSSIM_DLL ossimJp2Info : public ossimJ2kInfo
+{
+public:
+
+   /** Anonymous enumerations: */
+   enum
+   {
+      SIGNATURE_BOX_SIZE = 12,
+      GEOTIFF_UUID_SIZE  = 16
+   };
+   
+   /** default constructor */
+   ossimJp2Info();
+
+   /** virtual destructor */
+   virtual ~ossimJp2Info();
+
+   /**
+    * @brief open method.
+    *
+    * @param file File name to open.
+    *
+    * @return true on success false on error.
+    */
+   virtual bool open(const ossimFilename& file);
+
+   /**
+    * Print method.
+    *
+    * @param out Stream to print to.
+    * 
+    * @return std::ostream&
+    */
+   virtual std::ostream& print(std::ostream& out) const;
+
+   /**
+    * @brief This gets a box of type and stuffs in box.
+    *
+    * Code for copying a box to a buffer. Currently used in ossimOpjWriter
+    * to overcome short falls of trying to write in between the uuid box in
+    * between the jp2h and start of jp2c written by opj_start_compress.
+    *
+    * @param type Defines box type. E.g. 0x6A703268 (jp2h)
+    * @param includeAll if true the length fields are copied. If false
+    * just the DBox is copied.
+    * @param box Initialized by this. LBox and XLBox fields
+    * are NOT copied to the box.
+    * @return is the start position of the box. At the LBox.
+    */
+   std::streamoff getBox( const ossim_uint32 type,
+                          bool includeAll,
+                          std::vector<ossim_uint8>& box ) const;
+
+   /**
+    * @brief This gets a box of type and stuffs in box.
+    *
+    * Code for copying a box to a buffer. Note that stream is not rewound or
+    * cleared if it hits EOF.
+    *
+    * @param type Defines box type. E.g. 0x6A703268 (jp2h)
+    * @param includeAll if true the length fields are copied. If false
+    * just the DBox is copied.
+    * @param str Stream to read from.
+    * @param box Initialized by this. LBox and XLBox fields
+    * are NOT copied to the box.
+    * @return The start position of the box (LBox) or zero if not found.
+    */
+   std::streamoff getBox( const ossim_uint32& type,
+                          bool includeAll,
+                          std::ifstream& str,
+                          std::vector<ossim_uint8>& box ) const;
+   /**
+    * @brief Method to get the embedded JP2 GeoTIFF box. This includes the 16
+    * GEOTIFF_UUID bytes.
+    * @param str Stream to read from.
+    * @return  The start position of the box (LBox) or zero if not found.
+    */
+   std::streamoff getGeotiffBox( std::ifstream& str,
+                                 std::vector<ossim_uint8>& box ) const;
+
+   /**
+    * @brief Method to get the embedded JP2 GML Box.
+    * @param str Stream to read from.
+    * @return  The start position of the box (LBox) or zero if not found.
+    */
+   std::streamoff getGmlBox( std::ifstream& str,
+                             std::vector<ossim_uint8>& box ) const;
+   
+   /**
+    * @brief This finds a box of type and returns the location of its data.
+    *
+    * @param type Defines box type. E.g. 0x6A703268 (jp2h)
+    * @param str Stream to read from.
+    * @param length Number of bytes in the data.
+    * @return The start position of the box (LBox) or zero if not found.
+    */
+   std::streamoff findBoxData( const ossim_uint32& type,
+                               std::ifstream& str,
+                               ossim_uint32& length ) const;
+
+protected:
+
+   /** @brief Print tbox type as string if known. */
+   void printTboxType( ossim_uint32 tbox, std::ostream& out) const;
+
+   /** Initializes i reference.  Does byte swapping as needed. */
+   void readUInt32(ossim_uint32& i, std::ifstream& str) const;
+
+   /** Initializes i reference.  Does byte swapping as needed. */
+   void readUInt64(ossim_uint64& i, std::ifstream& str) const;
+
+};
+
+#endif /* End of "#ifndef ossimJp2Info_HEADER" */
+
diff --git a/ossim/include/ossim/support_data/ossimJpipMessage.h b/ossim/include/ossim/support_data/ossimJpipMessage.h
new file mode 100644
index 0000000..9c81429
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimJpipMessage.h
@@ -0,0 +1,36 @@
+/*********************************************************************************************
+ *
+ * License: MIT Please see the top level LICENSE.txt
+ *
+ * Author: Garrett Potts
+ * 
+ *********************************************************************************************/
+#ifndef ossimJpipMessage_HEADER
+#define ossimJpipMessage_HEADER
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/support_data/ossimJpipMessageHeader.h>
+#include <vector>
+class OSSIM_DLL ossimJpipMessage : public ossimReferenced
+{
+public:
+    typedef std::vector<ossim_uint8> MessageBodyType;
+    
+    ossimJpipMessage();
+    void reset();
+    void setHeaderLength(ossim_uint64 length){m_headerLength = length;}
+    ossimJpipMessageHeader* header(){return m_header.get();}
+    const ossimJpipMessageHeader* header()const{return m_header.get();}
+    MessageBodyType& messageBody(){return m_messageBody;}
+    const MessageBodyType& messageBody()const{return m_messageBody;}
+    void dumpBodyAsHex(std::ostream& out)const;
+    void dumpBodyAsText(std::ostream& out)const;
+    
+protected:
+    ossimRefPtr<ossimJpipMessageHeader> m_header;
+    ossim_uint64             m_headerLength;
+    MessageBodyType m_messageBody;
+};
+
+#endif
diff --git a/include/ossim/support_data/ossimJpipMessageDecoder.h b/ossim/include/ossim/support_data/ossimJpipMessageDecoder.h
similarity index 100%
rename from include/ossim/support_data/ossimJpipMessageDecoder.h
rename to ossim/include/ossim/support_data/ossimJpipMessageDecoder.h
diff --git a/include/ossim/support_data/ossimJpipMessageHeader.h b/ossim/include/ossim/support_data/ossimJpipMessageHeader.h
similarity index 100%
rename from include/ossim/support_data/ossimJpipMessageHeader.h
rename to ossim/include/ossim/support_data/ossimJpipMessageHeader.h
diff --git a/ossim/include/ossim/support_data/ossimLasHdr.h b/ossim/include/ossim/support_data/ossimLasHdr.h
new file mode 100644
index 0000000..95c9216
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimLasHdr.h
@@ -0,0 +1,188 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimLasHdr.h
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Container class for LAS LIDAR format public header block.
+//
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossimLasHdr_HEADER
+#define ossimLasHdr_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+
+#include <iosfwd>
+#include <string>
+class ossimKeywordlist;
+
+class OSSIM_DLL ossimLasHdr
+{
+public:
+   
+   /* @brief default constructor */
+   ossimLasHdr();
+
+   /* @brief copy constructor */
+   ossimLasHdr(const ossimLasHdr& hdr);
+
+   /* @brief assignment operator= */
+   const ossimLasHdr& operator=(const ossimLasHdr& hdr);
+
+   /* destructor */
+   ~ossimLasHdr();
+
+   /**
+    * @brief Checks for LASF in first four bytes.
+    * @return true if first four bytes are LASF.
+    */
+   bool checkSignature(std::istream& in) const;   
+
+   /**
+    * @brief Method to initialize from input stream.
+    *
+    * Input stream should be at beginning of file.
+    * 
+    * @param in Stream to read from.
+    */
+   void readStream(std::istream& in);
+
+   /** @brief Writes header to stream. */
+   void writeStream(std::ostream& out);
+
+   /**
+    * @brief print method.
+    * @return std::ostream&
+    */
+   std::ostream& print(std::ostream& out) const;
+
+   /** @brief Convenience operator<< method. */
+   friend OSSIM_DLL std::ostream& operator<<(std::ostream& out, const ossimLasHdr& hdr);
+   
+   void getKeywordlist(ossimKeywordlist& kwl) const;
+
+   /** @return True if bit 0 of m_globalEncoding is set, false if not. */
+   bool getGpsTimeTypeBit() const;
+
+   /** @return True if bit 1 of m_globalEncoding is set, false if not. */
+   bool getWaveforDataPacketsInternalBit() const;
+
+   /** @return True if bit 2 of m_globalEncoding is set, false if not. */
+   bool getWaveforDataPacketsExternalBit() const;
+   
+   /** @return True if bit 3 of m_globalEncoding is set, false if not. */
+   bool getReturnsSyntheticallyGeneratedBit() const;
+
+   /** @return True if bit 4 of m_globalEncoding is set, false if not. */
+   bool getWktBit() const;
+   
+   /**
+    * @return The project ID GUID data, e.g.: 55b44da7-7c23-4f86-a54ec39e8f1d1ea1
+    */
+   std::string getProjectIdGuid() const;
+
+   /** @return The major and minor version, e.g.: 1.2 */
+   std::string getVersion() const;
+
+   /** @return The system identifier string. */
+   std::string  getSystemIndentifier() const;
+
+   /** @return The generating software string. */
+   std::string  getGeneratingSoftware() const;
+
+   /** @return Size of this header in bytes. */
+   ossim_uint16 getHeaderSize() const;
+
+   /** @return Offset to point data. */
+   ossim_uint32 getOffsetToPointData() const;
+
+   /** @return The number fo variable length records. */
+   ossim_uint32 getNumberOfVlrs() const;
+
+   /** @return Point data format ID */
+   ossim_uint8 getPointDataFormatId() const;
+
+   /** @return The number of total points. */
+   ossim_uint64 getNumberOfPoints() const;
+
+   /**
+    * @brief Gets number of points for entry where entry is synonymous returns.
+    * @return The number of points for entries 0 through 4.
+    */
+   ossim_uint64 getNumberOfPoints(ossim_uint32 entry) const;
+
+   const ossim_float64& getScaleFactorX() const;
+   const ossim_float64& getScaleFactorY() const;
+   const ossim_float64& getScaleFactorZ() const;
+   const ossim_float64& getOffsetX() const;
+   const ossim_float64& getOffsetY() const;
+   const ossim_float64& getOffsetZ() const;
+   const ossim_float64& getMinX() const;
+   const ossim_float64& getMinY() const;
+   const ossim_float64& getMinZ() const;
+   const ossim_float64& getMaxX() const;
+   const ossim_float64& getMaxY() const;
+   const ossim_float64& getMaxZ() const;
+   
+   
+private:
+
+   /** @brief Performs a swap if system byte order is not little endian. */
+   void swap();
+
+   /**
+    * @brief Test version.
+    * @param major
+    * @param minor
+    * @return true if m_versionMajor and m_versionMinor are greater than major and minor
+    * args.
+    */
+   bool versionGreaterThan( ossim_uint8 major, ossim_uint8 minor ) const;
+
+   char          m_fileSignature[5];
+   ossim_uint16  m_fileSourceId;
+   ossim_uint16  m_globalEncoding;
+   ossim_uint32  m_projectIdGuidData1;
+   ossim_uint16  m_projectIdGuidData2;
+   ossim_uint16  m_projectIdGuidData3;
+   ossim_uint8   m_projectIdGuidData4[8];
+   ossim_uint8   m_versionMajor;
+   ossim_uint8   m_versionMinor;
+   char          m_systemIndentifier[32];
+   char          m_generatingSoftware[32];
+   ossim_uint16  m_fileCreationDay;
+   ossim_uint16  m_fileCreateionYear;
+   ossim_uint16  m_headerSize;
+   ossim_uint32  m_offsetToPointData;
+   ossim_uint32  m_numberOfVariableLengthRecords;
+   ossim_uint8   m_pointDataFormatId;
+   ossim_uint16  m_pointDataRecordLength;
+   ossim_uint32  m_legacyNumberOfPointRecords;            // deprecated 1_4
+   ossim_uint32  m_legacyNumberOfPointsByReturn[5];       // deprecated 1_4
+   ossim_float64 m_xScaleFactor;
+   ossim_float64 m_yScaleFactor;
+   ossim_float64 m_zScaleFactor;
+   ossim_float64 m_xOffset;
+   ossim_float64 m_yOffset;
+   ossim_float64 m_zOffset;
+   ossim_float64 m_maxX;
+   ossim_float64 m_minX;
+   ossim_float64 m_maxY;
+   ossim_float64 m_minY;
+   ossim_float64 m_maxZ;
+   ossim_float64 m_minZ;
+   ossim_uint64  m_startOfWaveformDataPacket;             // Added 1_3
+   ossim_uint64  m_startOfExtendedVariableLengthRecords;  // Added 1_4
+   ossim_uint32  m_numberOfExtendedVariableLengthRecords; // Added 1_4
+   ossim_uint64  m_numberOfPointRecords;                  // Added 1_4
+   ossim_uint64  m_numberOfPointsByReturn[15];            // Added 1_4
+   
+};
+
+#endif /* End of "#ifndef ossimLasHdr_HEADER" */
+
diff --git a/ossim/include/ossim/support_data/ossimLasInfo.h b/ossim/include/ossim/support_data/ossimLasInfo.h
new file mode 100644
index 0000000..dd03241
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimLasInfo.h
@@ -0,0 +1,58 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimLibLasInfo.h
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: LAS LIDAR info object.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossimLasInfo_HEADER
+#define ossimLasInfo_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/support_data/ossimInfoBase.h>
+#include <ossim/base/ossimFilename.h>
+
+#include <iosfwd>
+
+/** @brief LAS LIDAR info object. */
+class OSSIM_DLL ossimLasInfo : public ossimInfoBase
+{
+public:
+   
+   /** default constructor */
+   ossimLasInfo();
+
+   /** virtual destructor */
+   virtual ~ossimLasInfo();
+
+   /**
+    * @brief open method.
+    *
+    * @param file File name to open.
+    *
+    * @return true on success false on error.
+    */
+   virtual bool open(const ossimFilename& file);
+
+   /**
+    * Print method.
+    *
+    * @param out Stream to print to.
+    * 
+    * @return std::ostream&
+    */
+   virtual std::ostream& print(std::ostream& out) const;
+
+private:
+   ossimFilename m_file;
+};
+
+#endif /* End of "#ifndef ossimLasInfo_HEADER" */
+
diff --git a/ossim/include/ossim/support_data/ossimNitfAcftbTag.h b/ossim/include/ossim/support_data/ossimNitfAcftbTag.h
new file mode 100644
index 0000000..e63fa6b
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfAcftbTag.h
@@ -0,0 +1,404 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: ACFTB - Aircraft Infomation Extension Format tag class
+// declaration.
+//
+// See document STDI-0002 (version 3), Appendix E, Table E-6 for more info.
+// 
+//----------------------------------------------------------------------------
+// $Id
+
+#ifndef ossimNitfAcftbTag_HEADER
+#define ossimNitfAcftbTag_HEADER
+
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+
+class OSSIM_DLL ossimNitfAcftbTag : public ossimNitfRegisteredTag
+{
+public:
+
+   enum 
+   {
+      CEL_SIZE               = 207,
+      AC_MSN_ID_SIZE         = 20,
+      AC_TAIL_NO_SIZE        = 10,
+      AC_TO_SIZE             = 12,
+      SENSOR_ID_TYPE_SIZE    = 4,
+      SENSOR_ID_SIZE         = 6,
+      SCENE_SOURCE_SIZE      = 1,
+      SCNUM_SIZE             = 6,
+      PDATE_SIZE             = 8,
+      IMHOSTNO_SIZE          = 6,
+      IMREQID_SIZE           = 5,
+      MPLAN_SIZE             = 3,
+      ENTLOC_SIZE            = 25,
+      LOC_ACCY_SIZE          = 6,
+      ENTELV_SIZE            = 6,
+      ELV_UNIT_SIZE          = 1,
+      EXITLOC_SIZE           = 25,
+      EXITELV_SIZE           = 6,
+      TMAP_SIZE              = 7,
+      ROW_SPACING_SIZE       = 7,
+      ROW_SPACING_UNITS_SIZE = 1,
+      COL_SPACING_SIZE       = 7,
+      COL_SPACING_UINTS_SIZE = 1,
+      FOCAL_LENGTH_SIZE      = 6,
+      SENSERIAL_SIZE         = 6,
+      ABSWVER_SIZE           = 7,
+      CAL_DATE_SIZE          = 8,
+      PATCH_TOT_SIZE         = 4,
+      MTI_TOT_SIZE           = 3
+   };
+   
+   /** @brief default constructor */
+   ossimNitfAcftbTag();
+
+   /** @brief destructor */
+   virtual ~ossimNitfAcftbTag();
+
+   /** @brief Method to parse data from stream. */
+   virtual void parseStream(std::istream& in);
+
+   /** @brief Method to write data to stream. */
+   virtual void writeStream(std::ostream& out);
+
+   /** @brief Method to clear all fields including null terminating. */
+   virtual void clearFields();
+
+   ossimString getFocalLength()const;
+   ossimString getColumnSpacing()const;
+   ossimString getColumnSpacingUnits()const;
+   ossimString getRowSpacing()const;
+   ossimString getRowSpacingUnits()const;
+   /**
+    * @brief Print method that outputs a key/value type format
+    * adding prefix to keys.
+    * @param out Stream to output to.
+    * @param prefix Prefix added to key like "image0.";
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix=std::string()) const;
+   
+protected:
+
+   /** Type R = Required Type <R> = BCS spaces allowed for entire field */
+   
+   /**
+    * FIELD: AC_MSN_ID
+    *
+    * TYPE: R
+    * 
+    * 20 byte field
+    *
+    * Aircraft Mission Identification
+    */
+   char theAcMsnId[AC_MSN_ID_SIZE+1];
+
+   /**
+    * FIELD: AC_TAIL_NO
+    *
+    * TYPE: <R>
+    * 
+    * 10 byte field
+    *
+    * Aircraft Tail Number
+    */
+   char theAcTailNo[AC_TAIL_NO_SIZE+1];
+   
+   /**
+    * FIELD: AC_TO
+    *
+    * TYPE: <R>
+    * 
+    * 12 byte field
+    *
+    * Aircraft Take-off, CCYYMMDDhhmm
+    */
+   char theAcTo[AC_TO_SIZE+1];
+
+   /**
+    * FIELD: SENSOR_ID_TYPE
+    *
+    * TYPE: R
+    * 
+    * 4 byte field
+    *
+    * Sensor ID Type
+    */
+   char theSensorIdType[SENSOR_ID_TYPE_SIZE+1];
+   
+   /**
+    * FIELD: SENSOR_ID
+    *
+    * TYPE: R
+    * 
+    * 6 byte field
+    *
+    * Sensor ID 
+    */
+   char theSensorId[SENSOR_ID_SIZE+1];
+
+   /**
+    * FIELD: SCENE_SOURCE
+    *
+    * TYPE: <R>
+    * 
+    * 1 byte field
+    *
+    * Scene Source, 0 to 9
+    */
+   char theSceneSource[SCENE_SOURCE_SIZE+1];
+   
+   /**
+    * FIELD: SCNUM
+    *
+    * TYPE: R
+    * 
+    * 6 byte field
+    *
+    * Scene Number, 000000 to 999999
+    */
+   char theScNum[SCNUM_SIZE+1];
+
+   /**
+    * FIELD: PDATE
+    *
+    * TYPE: R
+    * 
+    * 8 byte field
+    *
+    * Processing Date, CCYYMMDD
+    */
+   char thePDate[PDATE_SIZE+1];
+   
+   /**
+    * FIELD: IMHOSTNO
+    *
+    * TYPE: R
+    * 
+    * 6 byte field
+    *
+    * Immediate Scene Host
+    */
+   char theImHostNo[IMHOSTNO_SIZE+1];
+
+   /**
+    * FIELD: IMREQID
+    *
+    * TYPE: R
+    * 
+    * 5 byte field
+    *
+    * Immediate Scene Request ID, 00000, 00001 to 99999
+    */
+   char theImReqID[IMREQID_SIZE+1];
+   
+   /**
+    * FIELD: MPLAN
+    *
+    * TYPE: R
+    * 
+    * 3 byte field
+    *
+    * Mission Plan Mode, 001 to 999
+    */
+   char theMPlan[MPLAN_SIZE+1];
+
+   /**
+    * FIELD: ENTLOC
+    *
+    * TYPE: <R>
+    * 
+    * 25 byte field
+    *
+    * Entry Location
+    */
+   char theEntLoc[ENTLOC_SIZE+1];
+
+   /**
+    * FIELD: LOC_ACCY
+    *
+    * TYPE: R
+    * 
+    * 6 byte field
+    *
+    * Location Accuracy, feet, 000.01 to 999.99, 000000, 000.00
+    */
+   char theLocAccy[LOC_ACCY_SIZE+1];
+   
+   /**
+    * FIELD: ENTELV
+    *
+    * TYPE: <R>
+    * 
+    * 6 byte field
+    *
+    * Entry Elevation, feet or meters, -01000 to +30000
+    */
+   char theEntelv[ENTELV_SIZE+1];
+
+   /**
+    * FIELD: ELV_UNIT
+    *
+    * TYPE: <R>
+    * 
+    * 1 byte field
+    *
+    * Unit of Elevation, f or m
+    */
+   char theElvUnit[ELV_UNIT_SIZE+1];
+   
+   /**
+    * FIELD: EXITLOC
+    *
+    * TYPE: <R>
+    * 
+    * 25 byte field
+    *
+    * Exit Location
+    */
+   char theExitLoc[EXITLOC_SIZE+1];
+
+   /**
+    * FIELD: EXITELV
+    *
+    * TYPE: <R>
+    * 
+    * 6 byte field
+    *
+    * Exit Elevation
+    */
+   char theExitElev[EXITELV_SIZE+1];
+   
+   /**
+    * FIELD: TMAP
+    *
+    * TYPE: <R>
+    * 
+    * 7 byte field
+    *
+    * True Map Angle, degrees, 000.000 to 180.000
+    */
+   char theTMap[TMAP_SIZE+1];
+
+   /**
+    * FIELD: ROW_SPACING
+    *
+    * TYPE: R
+    * 
+    * 7 byte field
+    *
+    * Row Spacing, feet, meters, rads. 
+    */
+   char theRowSpacing[ROW_SPACING_SIZE+1];
+
+   /**
+    * FIELD: ROW_SPACING_UNITS
+    *
+    * TYPE: R
+    * 
+    * 1 byte field
+    *
+    * Unit of Row Spacing, f, m, r or u
+    */
+   char theRowSpacingUnits[ROW_SPACING_UNITS_SIZE+1];
+
+   /**
+    * FIELD: COL_SPACING
+    *
+    * TYPE: R
+    * 
+    * 7 byte field
+    *
+    * Column Spacing
+    */
+   char theColSpacing[COL_SPACING_SIZE+1];
+
+   /**
+    * FIELD: COL_SPACING_UINTS
+    *
+    * TYPE: R
+    * 
+    * 1 byte field
+    *
+    * Unit of Column Spacing
+    */
+   char theColSpacingUnits[COL_SPACING_UINTS_SIZE+1];
+   
+   /**
+    * FIELD: FOCAL_LENGTH
+    *
+    * TYPE: R
+    * 
+    * 6 byte field
+    *
+    * Sensor Focal Length, cm, 000.01 to 899.99, 999.99
+    */
+   char theFocalLength[FOCAL_LENGTH_SIZE+1];
+
+   /**
+    * FIELD: SENSERIAL
+    *
+    * TYPE: <R>
+    * 
+    * 6 byte field
+    *
+    * Sensor vendor's serial number, 000001 to 999999
+    */
+   char theSenserial[SENSERIAL_SIZE+1];
+   
+   /**
+    * FIELD: ABSWVER
+    *
+    * TYPE: <R>
+    * 
+    * 7byte field
+    *
+    * Airborne Software Version
+    */
+   char theAbSwVer[ABSWVER_SIZE+1];
+
+   /**
+    * FIELD: CAL_DATE
+    *
+    * TYPE: <R>
+    * 
+    * 8 byte field
+    *
+    * Calibration Date, CCYYMMDD
+    */
+   char theCalDate[CAL_DATE_SIZE+1];
+   
+   /**
+    * FIELD: PATCH_TOT
+    *
+    * TYPE: R
+    * 
+    * 4 byte field
+    *
+    * Patch Total
+    */
+   char thePatchTot[PATCH_TOT_SIZE+1];
+
+   /**
+    * FIELD: MTI_TOT
+    *
+    * TYPE: R
+    * 
+    * 3 byte field
+    *
+    * MTI Total, SAR: 000 to 999, EO-IR: 000
+    */
+   char theMtiTot[MTI_TOT_SIZE+1];
+   
+TYPE_DATA   
+};
+
+#endif /* matches #ifndef ossimNitfAcftbTag_HEADER */
+
diff --git a/ossim/include/ossim/support_data/ossimNitfAimidbTag.h b/ossim/include/ossim/support_data/ossimNitfAimidbTag.h
new file mode 100644
index 0000000..cc2c5e8
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfAimidbTag.h
@@ -0,0 +1,279 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: AIMIDB - Additional Image ID Extension Format
+// tag class declaration.
+//
+// See document STDI-0002 (version 3), Appendix E, Table E-3 for more info.
+// 
+//----------------------------------------------------------------------------
+// $Id
+
+#ifndef ossimNitfAimidbTag_HEADER
+#define ossimNitfAimidbTag_HEADER 1
+
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+
+class OSSIM_DLL ossimNitfAimidbTag : public ossimNitfRegisteredTag
+{
+public:
+
+   enum 
+   {
+      CEL_SIZE                    = 89,
+      ACQUISITION_DATE_SIZE       = 14,
+      MISSION_NO_SIZE             = 4,
+      MISSION_IDENTIFICATION_SIZE = 10,
+      FLIGHT_NO_SIZE              = 2,
+      OP_NUM_SIZE                 = 3,
+      CURRENT_SEGMENT_SIZE        = 2,
+      REPRO_NUM_SIZE              = 2,
+      REPLAY_SIZE                 = 3,
+      RESERVED_1_SIZE             = 1,
+      START_TILE_COLUMN_SIZE      = 3,
+      START_TILE_ROW_SIZE         = 5,
+      END_SEGMENT_SIZE            = 2,
+      END_TILE_COLUMN_SIZE        = 3,
+      END_TILE_ROW_SIZE           = 5,
+      COUNTRY_SIZE                = 2,
+      RESERVED_2_SIZE             = 4,
+      LOCATION_SIZE               = 11,
+      RESERVED_3_SIZE             = 13
+    };
+   
+   /** @brief default constructor */
+   ossimNitfAimidbTag();
+
+   /** @brief destructor */
+   virtual ~ossimNitfAimidbTag();
+
+   /** @brief Method to parse data from stream. */
+   virtual void parseStream(std::istream& in);
+
+   /** @brief Method to write data to stream. */
+   virtual void writeStream(std::ostream& out);
+
+   /** @brief Method to clear all fields including null terminating. */
+   virtual void clearFields();
+
+   /**
+    * @brief Print method that outputs a key/value type format
+    * adding prefix to keys.
+    * @param out Stream to output to.
+    * @param prefix Prefix added to key like "image0.";
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix=std::string()) const;
+   
+protected:
+
+   /** Type R = Required Type <R> = BCS spaces allowed for entire field */
+   
+   /**
+    * FIELD: ACQUISITION_DATE
+    *
+    * TYPE: R
+    * 
+    * 14 byte field
+    *
+    * CCYYMMDDhhmmss
+    */
+   char theAcquisitionDate[ACQUISITION_DATE_SIZE+1];
+
+   /**
+    * FIELD: MISSION_NO
+    *
+    * TYPE: R
+    *
+    * 4 byte field
+    *
+    * Mission Number
+    */
+   char theMissionNumber[MISSION_NO_SIZE+1];
+
+   /**
+    * FIELD: MISSION_IDENTIFICATION
+    *
+    * TYPE: R
+    *
+    * 10 byte field
+    *
+    * Name of the Mission.
+    */
+   char theMissionIdentification[MISSION_IDENTIFICATION_SIZE+1];
+   
+   /**
+    * FIELD: FLIGHT_NO
+    *
+    * TYPE: R
+    *
+    * 2 byte field
+    *
+    * Flight Number
+    */
+   char theFlightNo[FLIGHT_NO_SIZE+1];
+
+   /**
+    * FIELD: OP_NUM
+    *
+    * TYPE: R
+    *
+    * 3 byte field
+    *
+    * Image Operation Number 000 to 999
+    */
+   char theOpNum[OP_NUM_SIZE+1];
+   
+   /**
+    * FIELD: CURRENT_SEGMENT
+    *
+    * TYPE: R
+    *
+    * 2 byte field
+    *
+    * Current Segment ID, AA to ZZ
+    */
+   char theCurrentSegment[CURRENT_SEGMENT_SIZE+1];
+
+   /**
+    * FIELD: REPRO_NUM
+    *
+    * TYPE: R
+    *
+    * 2 byte field
+    *
+    * Reprocess Number, 00 to 99
+    */
+   char theReproNum[REPRO_NUM_SIZE+1];
+   
+   /**
+    * FIELD: REPLAY
+    *
+    * TYPE: <R>
+    *
+    * 3 byte field
+    *
+    * Replay
+    */
+   char theReplay[REPLAY_SIZE+1];
+
+   /**
+    * FIELD: RESERVED_1
+    *
+    * TYPE: R
+    *
+    * 1 byte field
+    *
+    * 1 space
+    */
+   char theReserved1[RESERVED_1_SIZE+1];
+   
+   /**
+    * FIELD: START_TILE_COLUMN
+    *
+    * TYPE: R
+    *
+    * 3 byte field
+    *
+    * Starting Tile Column Number, 001 to 099
+    */
+   char theStartTileColumn[START_TILE_COLUMN_SIZE+1];
+
+   /**
+    * FIELD: START_TILE_ROW
+    *
+    * TYPE: R
+    *
+    * 5 byte field
+    *
+    * Starting Tile Row Number, 00001 to 99999
+    */
+   char theStartTileRow[START_TILE_ROW_SIZE+1];
+   
+   /**
+    * FIELD: END_SEGMENT
+    *
+    * TYPE: R
+    *
+    * 2 byte field
+    *
+    * Ending Segment, 00, AA to ZZ
+    */
+   char theEndSegment[END_SEGMENT_SIZE+1];
+
+   /**
+    * FIELD: END_TILE_COLUMN
+    *
+    * TYPE: R
+    *
+    * 3 byte field
+    *
+    * Ending Tile Column Number, 001 to 099
+    */
+   char theTileColumn[END_TILE_COLUMN_SIZE+1];
+   
+   /**
+    * FIELD: END_TILE_ROW
+    *
+    * TYPE: R
+    *
+    * 5 byte field
+    *
+    * Ending Tile Row Number, 00001 to 99999
+    */
+   char theTileRow[END_TILE_ROW_SIZE+1];
+
+   /**
+    * FIELD: COUNTRY
+    *
+    * TYPE: <R>
+    *
+    * 2 byte field
+    *
+    * Country Code, AA to ZZ
+    */
+   char theCountry[COUNTRY_SIZE+1];
+   
+   /**
+    * FIELD: RESERVED_2
+    *
+    * TYPE: R
+    *
+    * 4 byte field
+    *
+    * 4 spaces
+    */
+   char theReserved2[RESERVED_2_SIZE+1];
+
+   /**
+    * FIELD: LOCATION
+    *
+    * TYPE: <R>
+    *
+    * 11 byte field
+    *
+    * Location, ddmmXdddmmY, spaces
+    */
+   char theLocation[LOCATION_SIZE+1];
+
+   /**
+    * FIELD: RESERVED_3
+    *
+    * TYPE: R
+    *
+    * 13 byte field
+    *
+    * 13 spaces
+    */
+   char theReserved3[RESERVED_3_SIZE+1];
+   
+TYPE_DATA   
+};
+
+#endif /* matches #ifndef ossimNitfAimidbTag_HEADER */
+
diff --git a/ossim/include/ossim/support_data/ossimNitfBlockaTag.h b/ossim/include/ossim/support_data/ossimNitfBlockaTag.h
new file mode 100644
index 0000000..3d5dc78
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfBlockaTag.h
@@ -0,0 +1,335 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: BLOCKA tag class declaration.
+//
+// See document STDI-0002 Table 8-9 for more info.
+// 
+// http://164.214.2.51/ntb/baseline/docs/stdi0002/final.pdf
+//
+//----------------------------------------------------------------------------
+// $Id: ossimNitfBlockaTag.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimNitfBlockaTag_HEADER
+#define ossimNitfBlockaTag_HEADER
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+
+class ossimDpt;
+
+class OSSIM_DLL ossimNitfBlockaTag : public ossimNitfRegisteredTag
+{
+public:
+   enum 
+   {
+      BLOCK_INSTANCE_SIZE = 2,
+      N_GRAY_SIZE         = 5,
+      L_LINES_SIZE        = 5,
+      LAYOVER_ANGLE_SIZE  = 3,
+      SHADOW_ANGLE_SIZE   = 3,
+      FIELD_6_SIZE        = 16, // reserved
+      FRLC_LOC_SIZE       = 21,
+      LRLC_LOC_SIZE       = 21,
+      LRFC_LOC_SIZE       = 21,
+      FRFC_LOC_SIZE       = 21,
+      FIELD_11_SIZE       = 5,  // reserved
+      //                -----
+      //                  123
+   };
+   
+   /** default constructor */
+   ossimNitfBlockaTag();
+  
+   /**
+    * Parse method.
+    *
+    * @param in Stream to parse.
+    */
+   virtual void parseStream(std::istream& in);
+   
+   /**
+    * Write method.
+    *
+    * @param out Stream to write to.
+    */
+   virtual void writeStream(std::ostream& out);
+   
+   /**
+    * Clears all string fields within the record to some default nothingness.
+    */
+   virtual void clearFields();
+
+   /**
+    * @brief Print method that outputs a key/value type format
+    * adding prefix to keys.
+    * @param out Stream to output to.
+    * @param prefix Prefix added to key like "image0.";
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix) const;
+
+   /** @param block number to set block instance to.  Valid range 01 to 99. */
+   void setBlockInstance(ossim_uint32 block);
+
+   
+   /** @return theBlockInstance as a string. */
+   ossimString getBlockInstance() const;
+   
+   /**
+    * @param grayCount Count of gray fill.
+    *
+    * Valid range:  0 to 99999
+    */
+   void setNGray(ossim_uint32 grayCount);
+   
+   /** @return theNGray as a string. */
+   ossimString getNGray() const;
+   
+   /**
+    * @param lines Number of rows.
+    *
+    * Valid range:  0 to 99999
+    */
+   void setLLines(ossim_uint32 lines);
+   
+   /** @return theLLines as a string. */
+   ossimString getLLines() const;
+   
+   /**
+    * @param angle Value to set theLayoverAngle to.
+    *
+    * Valid range: 000 to 359 or spaces
+    */
+   void setLayoverAngle(ossim_uint32 angle);
+   
+   /** @return theLayoverAngle as a string. */
+   ossimString getLayoverAngle() const;
+   
+   /**
+    * @param angle Value to set theLayoverAngle to.
+    *
+    * Valid range: 000 to 359 or spaces
+    */
+   void setShadowAngle(ossim_uint32 angle);
+   
+   /** @return theLayoverAngle as a string. */
+   ossimString getShadowAngle() const;
+   
+   /**
+    * Convert latitude and logitude to theFrlcLoc string.
+    * 
+    * @param pt Ground point of first row, last column.
+    *
+    * @param longitude Longitude portion in decimal degrees.
+    */
+   void setFrlcLoc(const ossimDpt& pt);
+   
+   /** @return theFrlcLoc as a string. */
+   ossimString getFrlcLoc() const;
+   
+   /** @param pt Ground point to initialize with location. */
+   void getFrlcLoc(ossimDpt& pt) const;
+
+   /**
+    * Convert latitude and logitude to theLrlcLoc string.
+    * 
+    * @param pt Ground point of last row, last column.
+    *
+    * @param longitude Longitude portion in decimal degrees.
+    */
+   void setLrlcLoc(const ossimDpt& pt);
+   
+   /** @return theLrlcLoc as a string. */
+   ossimString getLrlcLoc() const;
+   
+   /** @param pt Ground point to initialize with location. */
+   void getLrlcLoc(ossimDpt& pt) const;
+
+      /**
+    * Convert latitude and logitude to theLrfcLoc string.
+    * 
+    * @param pt Ground point of last row, first column.
+    *
+    * @param longitude Longitude portion in decimal degrees.
+    */
+   void setLrfcLoc(const ossimDpt& pt);
+   
+   /** @return theLrfcLoc as a string. */
+   ossimString getLrfcLoc() const;
+   
+   /** @param pt Ground point to initialize with location. */
+   void getLrfcLoc(ossimDpt& pt) const;
+
+   /**
+    * Convert latitude and logitude to theFrfcLoc string.
+    * 
+    * @param pt Ground point of first row, first column.
+    *
+    * @param longitude Longitude portion in decimal degrees.
+    */
+   void setFrfcLoc(const ossimDpt& pt);
+   
+   /** @return theFrfcLoc as a string. */
+   ossimString getFrfcLoc() const;
+   
+   /** @param pt Ground point to initialize with location. */
+   void getFrfcLoc(ossimDpt& pt) const;
+   
+protected:
+
+   /**
+    * Parses location string and initializes pt with result.
+    *
+    * @param locationString String to parse.
+    *
+    * @param pt Point to initialize.
+    */
+   void converLocStringToPt(const ossimString& locationString,
+                            ossimDpt& pt) const;
+                            
+   
+   /**
+    * FIELD: BLOCK_INSTANCE
+    *
+    * required 2 byte field
+    *
+    * 01 to 99
+    * 
+    * Block number of the image.
+    */
+   char theBlockInstance[BLOCK_INSTANCE_SIZE+1];
+   
+   /**
+    * FIELD: N_GRAY
+    *
+    * required 5 byte field
+    *
+    * 00000 to 99999
+    *
+    * SAR The number of gray fill pixels.
+    *
+    * EO-IR: 00000
+    */
+   char theNGray[N_GRAY_SIZE+1];
+   
+   /**
+    * FIELD: L_LINES
+    *
+    * required 5 byte field
+    *
+    * 00000 to 99999
+    *
+    * Row count.
+    */
+   char theLLines[L_LINES_SIZE+1];
+   
+   /**
+    * FIELD: LAYOVER_ANGLE
+    *
+    * required 3 byte field
+    *
+    * 000 to 359 or spaces
+    * 
+    * SAR: Angle between the first row of pixels and the layover direction in
+    * the image, measured in a clockwise direction.
+    *
+    * EO-IR: spaces
+    */
+   char theLayoverAngle[LAYOVER_ANGLE_SIZE+1];
+   
+   /**
+    * FIELD: SHADOW_ANGLE
+    *
+    * required 3 byte field
+    *
+    * 000 to 359 or spaces
+    *
+    * SAR: Angle between the first row of pixels and the radar shadow in
+    * the image, measured in a clockwase direction.
+    *
+    * EO-IR: spaces
+    */
+   char theShadowAngle[SHADOW_ANGLE_SIZE+1];
+   
+   /**
+    * FIELD: FIELD_6
+    *
+    * Reserved field of 16 spaces.
+    */
+   char theField6[FIELD_6_SIZE+1];
+   
+   /**
+    * FIELD: FRLC_LOC
+    *
+    * required 21 byte field
+    *
+    * XDDMMSS.SSYDDDMMSS.SS
+    * OR
+    * +-dd.dddddd+-ddd.dddddd
+    * OR
+    * 21 spaces
+    *
+    * Location of the first row, last column of the image block.
+    */
+   char theFrlcLoc[FRLC_LOC_SIZE+1];
+   
+   /**
+    * FIELD: LRLC_LOC
+    *
+    * required 21 byte field
+    *
+    * XDDMMSS.SSYDDDMMSS.SS
+    * OR
+    * +-dd.dddddd+-ddd.dddddd
+    * OR
+    * 21 spaces
+    *
+    * Location of the last row, last column of the image block.
+    */
+   char theLrlcLoc[LRLC_LOC_SIZE+1];
+   
+   /**
+    * FIELD: LRFC_LOC
+    *
+    * required 21 byte field
+    *
+    * XDDMMSS.SSYDDDMMSS.SS
+    * OR
+    * +-dd.dddddd+-ddd.dddddd
+    * OR
+    * 21 spaces
+    *
+    * Location of the last row, first column of the image block.
+    */
+   char theLrfcLoc[LRFC_LOC_SIZE+1];
+   
+   /**
+    * FIELD: FRFC_LOC
+    *
+    * required 21 byte field
+    *
+    * XDDMMSS.SSYDDDMMSS.SS
+    * OR
+    * +-dd.dddddd+-ddd.dddddd
+    * OR
+    * 21 spaces
+    *
+    * Location of the first row, first column of the image block.
+    */
+   char theFrfcLoc[FRFC_LOC_SIZE+1];
+   
+   /**
+    * FIELD: FIELD_11
+    *
+    * Reserved field of 5 bytes containing: 010.0 
+    */
+   char theField11[FIELD_11_SIZE+1];
+   
+TYPE_DATA   
+};
+
+#endif /* End of "#ifndef ossimNitfBlockaTag_HEADER" */
+
diff --git a/ossim/include/ossim/support_data/ossimNitfCommon.h b/ossim/include/ossim/support_data/ossimNitfCommon.h
new file mode 100644
index 0000000..f142ed2
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfCommon.h
@@ -0,0 +1,183 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Utility class for global nitf methods.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimNitfCommon.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimNitfCommon_HEADER
+#define ossimNitfCommon_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimString.h>
+#include <iostream>
+
+class ossimDpt;
+class ossimIrect;
+
+/** class ossimNitfCommon for global utility methods */   
+class OSSIM_DLL ossimNitfCommon
+{
+public:
+
+   /** default constructor */
+   ossimNitfCommon();
+
+   /** destructor */
+   ~ossimNitfCommon();
+
+   /**
+    * This method takes a value and a size(or width) and converts it to a
+    * scientific notation sting in the format: ±0.999999E±9
+    *
+    * @note If the value is positive, currently there is no + added to the
+    * front.
+    *
+    * @param aValue Value to convert to string.
+    *
+    * @param size total size of the string.  This must be at least 7 if
+    * aValue is positive and at least 8 if aValue is negative; else,
+    * no action is taken and an empty string is returned.
+    */
+   static ossimString convertToScientificString(const ossim_float64& aValue,
+                                                ossim_uint32 size);
+
+   /**
+    * This method takes a value and converts to a string of size with
+    * requested precision with a '0' fill.
+    *
+    * Format example: 00925.00
+    * 
+    * @param aValue Value to convert to string.
+    *
+    * @param precision The floating point precision.
+    *
+    * @param size total size of the string.
+    */
+   static ossimString convertToDoubleString(const ossim_float64& aValue,
+                                            ossim_uint32 precision,
+                                            ossim_uint32 size);
+
+   /**
+    * This method takes a value and converts to a string of size with
+    * with a '0' fill.
+    *
+    * Format example: 00925
+
+    * @param aValue Value to convert to string.
+    *
+    * @param size total size of the string.
+    */
+   static ossimString convertToUIntString(ossim_uint32 aValue,
+                                          ossim_uint32 size);
+   
+   /**
+    * Just like convertToUIntString only takes a signed value.
+    * 
+    * This method takes a value and converts to a string of size with
+    * with a '0' fill.
+    *
+    * Format example: 00925
+
+    * @param aValue Value to convert to string.
+    *
+    * @param size total size of the string.
+    */
+   static ossimString convertToIntString(ossim_int32 aValue,
+                                         ossim_uint32 size);
+
+   /**
+    * Converts pt to a decimal degrees latitude longitude location string.
+    *
+    * Format example: +-dd.dddddd+-ddd.dddddd
+    *
+    * @param pt Point to convert where pt.x = longitude and pt.y = latitude.
+    *
+    * @param  precision The floating point precision. This will determine the
+    * size of the string.
+    */
+   static ossimString convertToDdLatLonLocString(const ossimDpt& pt,
+                                                 ossim_uint32 precision);
+
+   /**
+    * Sets a field with a given string, width, and IOS flags.
+    *
+    * @param fieldDestination
+    *        The member NITF field to set.
+    * @param src
+    *        The source string.
+    * @param width
+    *        The number of characters in fieldDestination to copy from the
+    *        source string.
+    * @param ioflags
+    *        Formatting flags for the destination string.
+    * @param fill
+    *        If the size of the string is smaller than the field size,
+    *        this character specifies what the excess character values are.
+    */
+   static void setField(void* fieldDestination,
+                        const ossimString& src,
+                        std::streamsize width,
+                        std::ios_base::fmtflags ioflags = std::ios::left,
+                        char fill = ' ');
+   /**
+    * This will encode a 60 character IGEOLO field.
+    */
+   static ossimString encodeUtm(
+                                ossim_uint32 zone,
+                                const ossimDpt& ul,
+                                const ossimDpt& ur,
+                                const ossimDpt& lr,
+                                const ossimDpt& ll);
+   static ossimString encodeGeographicDms(
+                                          const ossimDpt& ul,
+                                          const ossimDpt& ur,
+                                          const ossimDpt& lr,
+                                          const ossimDpt& ll);
+   static ossimString encodeGeographicDecimalDegrees(
+                                                     const ossimDpt& ul,
+                                                     const ossimDpt& ur,
+                                                     const ossimDpt& lr,
+                                                     const ossimDpt& ll);
+
+   /**
+    * @brief Get the nitf pixel type string from scalar type.
+    *
+    * @param scalarType The scalar type.
+    *
+    * @return Pixel type as string, e.g.: "INT", "SI", "R"
+    */
+   static ossimString getNitfPixelType(ossimScalarType scalarType);
+
+   /**
+    * @brief Get compression rate (COMRAT) which is bits perpixel per band.
+    *
+    * This corresponds to the nitf image header COMRAT field.  Return is in
+    * the form of Nxyz "N" for numerically lossles, where "xyz"
+    * indicates the expected achieved bit rate (in bits per pixel per band)
+    * for the final layer of each tile. The decimal point is implicit and
+    * assumed to be one digit from the right (i.e. xy.z).
+    * 
+    * @param rect Image rectangles.
+    * @param bands
+    * @param scalar
+    * @param lengthInBytes Compressed length of image pixels.
+    * @return Approximate number of bits per pixel for the compressed image as
+    * a string which follows the nitf comrat field convention.  This will
+    * return an empty string if comrat is bigger than three digits.
+    */
+   static ossimString getCompressionRate(const ossimIrect& rect,
+                                         ossim_uint32 bands,
+                                         ossimScalarType scalar,
+                                         ossim_uint64 lengthInBytes);
+   
+   
+}; // End of class ossimNitfCommon.
+   
+#endif /* #ifndef ossimNitfCommon_HEADER */
+
diff --git a/ossim/include/ossim/support_data/ossimNitfCompressionHeader.h b/ossim/include/ossim/support_data/ossimNitfCompressionHeader.h
new file mode 100644
index 0000000..3a2ce2a
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfCompressionHeader.h
@@ -0,0 +1,36 @@
+//*******************************************************************
+// Copyright (C) 2004 Garrett Potts
+//
+// LICENSE: MIT see top level LICENSE.txt for more details
+// 
+// Author: Garrett Potts
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfCompressionHeader.h 23666 2015-12-14 20:01:22Z rashadkm $
+#ifndef ossimNitfCompressionHeader_HEADER
+#define ossimNitfCompressionHeader_HEADER
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimString.h>
+
+#include <iosfwd>
+#include <string>
+
+class OSSIM_DLL ossimNitfCompressionHeader : public ossimObject
+{
+public:
+   virtual void parseStream(std::istream& in) = 0;
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix) const=0;
+   
+   virtual bool saveState(ossimKeywordlist& kwl, const ossimString& prefix="")const;
+protected:
+
+TYPE_DATA;   
+};
+#endif
diff --git a/include/ossim/support_data/ossimNitfCsccgaTag.h b/ossim/include/ossim/support_data/ossimNitfCsccgaTag.h
similarity index 100%
rename from include/ossim/support_data/ossimNitfCsccgaTag.h
rename to ossim/include/ossim/support_data/ossimNitfCsccgaTag.h
diff --git a/ossim/include/ossim/support_data/ossimNitfCscrnaTag.h b/ossim/include/ossim/support_data/ossimNitfCscrnaTag.h
new file mode 100644
index 0000000..378227b
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfCscrnaTag.h
@@ -0,0 +1,185 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: CSCRNA tag class declaration.
+//
+// Corner Footprint TRE.
+//
+// See document STDI-0006-NCDRD Table 3.2-13 for more info.
+// 
+//----------------------------------------------------------------------------
+// $Id
+
+#ifndef ossimNitfCscrnaTag_HEADER
+#define ossimNitfCscrnaTag_HEADER 1
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+
+class OSSIM_DLL ossimNitfCscrnaTag : public ossimNitfRegisteredTag
+{
+public:
+   /** @brief default constructor */
+   ossimNitfCscrnaTag();
+
+   /** @brief destructor */
+   virtual ~ossimNitfCscrnaTag();
+
+   /** @brief Method to parse data from stream. */
+   virtual void parseStream(std::istream& in);
+
+   /** @brief Method to write data to stream. */
+   virtual void writeStream(std::ostream& out);
+
+   /** @brief Method to clear all fields including null terminating. */
+   virtual void clearFields();
+
+   /**
+    * @brief Print method that outputs a key/value type format
+    * adding prefix to keys.
+    * @param out Stream to output to.
+    * @param prefix Prefix added to key like "image0.";
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix) const;
+   
+protected:
+
+   //---
+   // NOTE:  Spec says corner points are project from image plane to
+   // reference ellipsoid NOT ellipsoid + height.
+   //---
+
+   /**
+    * FIELD: PREDICT_CORNERS
+    * 
+    * 1 byte field BCS-A
+    *
+    * Y = predicted, N = actual
+    */
+   char thePredictedCornerFlag[2];
+
+   /**
+    * FIELD: ULCRN_LAT
+    *
+    * 9 byte field BCS-N Degrees
+    *
+    * -90.000000 ti +90.000000
+    */
+   char theUlLat[10];
+
+   /**
+    * FIELD: ULCRN_LON
+    *
+    * 10 byte field BCS-N Degrees
+    *
+    * -179.999999 ti +180.000000
+    */
+   char theUlLon[11];
+
+   /**
+    * FIELD: ULCRN_HT
+    *
+    * 8 byte field BCS-N Meters
+    *
+    * Height referenced to the reference ellipsoid.
+    *
+    * -00610.0 to +10668.0
+    */
+   char theUlHt[9];
+
+    /**
+    * FIELD: URCRN_LAT
+    *
+    * 9 byte field BCS-N Degrees
+    *
+    * -90.000000 ti +90.000000
+    */
+   char theUrLat[10];
+
+   /**
+    * FIELD: URCRN_LON
+    *
+    * 10 byte field BCS-N Degrees
+    *
+    * -179.999999 ti +180.000000
+    */
+   char theUrLon[11];
+
+   /**
+    * FIELD: URCRN_HT
+    *
+    * 8 byte field BCS-N Meters
+    *
+    * Height referenced to the reference ellipsoid.
+    *
+    * -00610.0 to +10668.0
+    */
+   char theUrHt[9];
+
+   /**
+    * FIELD: LRCRN_LAT
+    *
+    * 9 byte field BCS-N Degrees
+    *
+    * -90.000000 ti +90.000000
+    */
+   char theLrLat[10];
+
+   /**
+    * FIELD: LRCRN_LON
+    *
+    * 10 byte field BCS-N Degrees
+    *
+    * -179.999999 ti +180.000000
+    */
+   char theLrLon[11];
+
+   /**
+    * FIELD: LRCRN_HT
+    *
+    * 8 byte field BCS-N Meters
+    *
+    * Height referenced to the reference ellipsoid.
+    *
+    * -00610.0 to +10668.0
+    */
+   char theLrHt[9];
+
+   /**
+    * FIELD: LLCRN_LAT
+    *
+    * 9 byte field BCS-N Degrees
+    *
+    * -90.000000 ti +90.000000
+    */
+   char theLlLat[10];
+
+   /**
+    * FIELD: LLCRN_LON
+    *
+    * 10 byte field BCS-N Degrees
+    *
+    * -179.999999 ti +180.000000
+    */
+   char theLlLon[11];
+
+   /**
+    * FIELD: LLCRN_HT
+    *
+    * 8 byte field BCS-N Meters
+    *
+    * Height referenced to the reference ellipsoid.
+    *
+    * -00610.0 to +10668.0
+    */
+   char theLlHt[9];
+   
+TYPE_DATA   
+};
+
+#endif /* matches #ifndef ossimNitfCscrnaTag_HEADER */
+
diff --git a/ossim/include/ossim/support_data/ossimNitfCsdidaTag.h b/ossim/include/ossim/support_data/ossimNitfCsdidaTag.h
new file mode 100644
index 0000000..d748ed2
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfCsdidaTag.h
@@ -0,0 +1,210 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: CSDIDA tag class declaration.
+//
+// Dataset Indentification TRE.
+//
+// See document STDI-0006-NCDRD Table 3.3-14 for more info.
+// 
+//----------------------------------------------------------------------------
+// $Id
+
+#ifndef ossimNitfCsdidaTag_HEADER
+#define ossimNitfCsdidaTag_HEADER 1
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+
+class OSSIM_DLL ossimNitfCsdidaTag : public ossimNitfRegisteredTag
+{
+public:
+   /** @brief default constructor */
+   ossimNitfCsdidaTag();
+
+   /** @brief destructor */
+   virtual ~ossimNitfCsdidaTag();
+
+   /** @brief Method to parse data from stream. */
+   virtual void parseStream(std::istream& in);
+
+   /** @brief Method to write data to stream. */
+   virtual void writeStream(std::ostream& out);
+
+   /** @brief Method to clear all fields including null terminating. */
+   virtual void clearFields();
+
+   /**
+    * @brief Print method that outputs a key/value type format
+    * adding prefix to keys.
+    * @param out Stream to output to.
+    * @param prefix Prefix added to key like "image0.";
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix) const;
+   
+protected:
+
+   /**
+    * FIELD: DAY
+    * 
+    * 2 byte field BCS-N
+    *
+    * 01 TO 31 (UTC)
+    */
+   char theDay[3];
+
+   /**
+    * FIELD: MONTH
+    *
+    * 3 byte field BCS-A
+    *
+    * JAN to DEC (UTC)
+    */
+   char theMonth[4];
+
+
+   /**
+    * FIELD: YEAR
+    *
+    * 4 byte field BCS-N
+    * 
+    * 0000 to 9999 (UTC)
+    */
+   char theYear[5];
+
+   /**
+    * FIELD: PLATFORM CODE
+    *
+    * 2 byte field BCS-A
+    * 
+    * QB, IK, OV, WV ...
+    */
+   char thePlatformCode[3];
+
+   /**
+    * FIELD: VEHICLE ID
+    *
+    * 2 byte field BCS-N
+    * 
+    * 00 TO 99
+    */
+   char theVehicleId[3];
+
+   /**
+    * FIELD: PASS
+    *
+    * 2 byte field BCS-N
+    * 
+    * 01 to 99
+    */
+   char thePass[3];
+
+   /**
+    * FIELD: OPERATION
+    *
+    * 3 byte field BCS-N
+    * 
+    * 001 to 999
+    */
+   char theOperation[4];
+
+   /**
+    * FIELD: SENSOR_ID
+    * 
+    * 2 byte field BCS-A
+    * 
+    * AA = pan only, GA = multispectral and pan sharpened only, NA =
+    * panchroomatic & multispectral together.
+    */
+   char theSensorId[3];
+
+   /**
+    * FIELD: PRODUCT_ID
+    *
+    * 2 byte field BCS-A
+    * 
+    * See table 2.1-7 
+    */
+   char theProductId[3];
+
+   /**
+    * FIELD: Reserved
+    * 
+    * 4 bytes BCS-A
+    *
+    * fill "00  "
+    */
+   char theReservedField1[5];
+
+   /**
+    * FIELD: TIME
+    *
+    * 14 byte field BCS-N
+    * 
+    * Image start time (UTC) YYYYMMDDhhmmss Corresponds to ACQUISITION_DATE
+    * in STDI-0002
+    */
+   char theTime[15];
+
+   /**
+    * FIELD: PROCESS_TIME
+    *
+    * 14 byte field BCS-N
+    * 
+    * Image start time (UTC) YYYYMMDDhhmmss
+    */
+   char theProcessTime[15];
+
+   /** FIELD: Reserved
+    *
+    * 2 bytes BCS-N
+    * 
+    * Fill "00"
+    */
+   char theReservedField2[3];
+
+   /**
+    * FIELD: Reserved
+    *
+    * 2 bytes BCS-N 
+    *
+    * Fill "01"
+    */
+   char theReservedField3[3];
+
+   /**
+    * FIELD: Reserved
+    *
+    * 1 byte BCS-A
+    *
+    * Fill "N"
+    */
+   char theReservedField4[1];
+
+   /**
+    * FIELD: Reserved
+    *
+    * 1 byte BCS-A
+    *
+    * BCS-A "N"
+    */
+   char theReservedField5[1];
+
+   /**
+    * FIELD: SOFTWARE_VERSION_NUMBER
+    *
+    * 10 byte field BCS-A
+    * 
+    * Software version used.
+    */
+   char theSoftwareVersionNumber[11]; 
+   
+TYPE_DATA   
+};
+
+#endif /* matches #ifndef ossimNitfCsdidaTag_HEADER */
+
diff --git a/ossim/include/ossim/support_data/ossimNitfCsexraTag.h b/ossim/include/ossim/support_data/ossimNitfCsexraTag.h
new file mode 100644
index 0000000..6d8883a
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfCsexraTag.h
@@ -0,0 +1,478 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: CSEXRA tag class declaration.
+//
+// Exploitation Reference Data TRE.
+//
+// See document STDI-0006-NCDRD Table 3.5-16 for more info.
+// 
+//----------------------------------------------------------------------------
+// $Id
+
+#ifndef ossimNitfCsexraTag_HEADER
+#define ossimNitfCsexraTag_HEADER 1
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+
+class OSSIM_DLL ossimNitfCsexraTag : public ossimNitfRegisteredTag
+{
+public:
+   /** @brief default constructor */
+   ossimNitfCsexraTag();
+
+   /** @brief destructor */
+   virtual ~ossimNitfCsexraTag();
+
+   /** @brief Method to parse data from stream. */
+   virtual void parseStream(std::istream& in);
+
+   /** @brief Method to write data to stream. */
+   virtual void writeStream(std::ostream& out);
+
+   /** @brief Method to clear all fields including null terminating. */
+   virtual void clearFields();
+
+   /**
+    * @brief Print method that outputs a key/value type format
+    * adding prefix to keys.
+    * @param out Stream to output to.
+    * @param prefix Prefix added to key like "image0.";
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix) const;
+   
+   /**
+    * @brief Get the SENSOR field.
+    * @return The SENSOR field as a string.
+    */
+   ossimString getSensor() const;
+   
+   /**
+    * @brief Get the TIME_FIRST_LINE_IMAGE field.
+    * @return The TIME_FIRST_LINE_IMAGE field as a string.
+    */
+   ossimString getTimeFirstLineImage() const;
+   
+   /**
+    * @brief Get the TIME_IMAGE_DURATION field.
+    * @return The TIME_IMAGE_DURATION field as a string.
+    */
+   ossimString getTimeImageDuration() const;
+   
+   /**
+    * @brief Get the MAX_GSDfield.
+    * @return The MAX_GSD field as a string.
+    */
+   ossimString getMaxGsd() const;
+   
+   /**
+    * @brief Get the ALONG_SCAN_GSD field.
+    * @return The ALONG_SCAN_GSD field as a string.
+    */
+   ossimString getAlongScanGsd() const;
+   
+   /**
+    * @brief Get the CROSS_SCAN_GSD field.
+    * @return TheCROSS_SCAN_GSD field as a string.
+    */
+   ossimString getCrossScanGsd() const;
+   
+   /**
+    * @brief Get the GEO_MEAN_GSD field.
+    * @return The GEO_MEAN_GSD field as a string.
+    */
+   ossimString getGeoMeanGsd() const;
+   
+   /**
+    * @brief Get the A_S_VERT_GSD field.
+    * @return The A_S_VERT_GSD field as a string.
+    */
+   ossimString getAlongScanVerticalGsd() const;
+   
+   /**
+    * @brief Get the C_S_VERT_GSD field.
+    * @return The C_S_VERT_GSD field as a string.
+    */
+   ossimString getCrossScanVerticalGsd() const;
+
+   /**
+    * @brief Get the GEO_MEAN_VERT_GSD field.
+    * @return The GEO_MEAN_VERT_GSD field as a string.
+    */
+   ossimString getGeoMeanVerticalGsd() const;
+   
+   /**
+    * @brief Get the GEO_BETA_ANGLEfield.
+    * @return The GEO_BETA_ANGLE field as a string.
+    */
+   ossimString getGeoBetaAngle() const;
+
+   /**
+    * @brief Get the DYNAMIC_RANGE field.
+    * @return The DYNAMIC_RANGE field as a string.
+    */
+   ossimString getDynamicRange() const;
+   
+   /**
+    * @brief Get the NUM_LINES field.
+    * @return The NUM_LINES field as a string.
+    */
+   ossimString getNumLines() const;
+   
+   
+   /**
+    * @brief Get the NUM_SAMPLES field.
+    * @return The NUM_SAMPLES field as a string.
+    */
+   ossimString getNumSamples() const;
+   
+   /**
+    * @brief Get the ANGLE_TO_NORTH field.
+    * @return The ANGLE_TO_NORTH field as a string.
+    */
+   ossimString getAngleToNorth() const;
+   
+   /**
+    * @brief Get the OBLIQUITY_ANGLE field.
+    * @return The OBLIQUITY_ANGLE field as a string.
+    */
+   ossimString getObliquityAngle() const;
+
+   /**
+    * @brief Get the AZ_OF_OBLIQUITY field.
+    * @return The AZ_OF_OBLIQUITY field as a string.
+    */
+   ossimString getAzimuthOfObliquity() const;
+   
+   /**
+    * @brief Get the GRD_COVER field.
+    * @return The GRD_COVER field as a string.
+    */
+   ossimString getGroundCover() const;
+
+   /**
+    * @brief Get the SNOW_DEPTH_CAT field.
+    * @return The SNOW_DEPTH_CAT field as a string.
+    */
+   ossimString getSnowDepth() const;
+   
+   /**
+    * @brief Get the SUN_AZIMUTH field.
+    * @return The SUN_AZIMUTH field as a string.
+    */
+   ossimString getSunAzimuth() const;
+
+   /**
+    * @brief Get the SUN_ELEVATION field.
+    * @return The SUN_ELEVATION field as a string.
+    */
+   ossimString getSunElevation() const;
+
+   /**
+    * @brief Get the PREDICTED_NIIRS field.
+    * @return The PREDICTED_NIIRS field as a string.
+    */
+   ossimString getPredictedNiirs() const;
+   
+   /**
+    * @brief Get the CIRCL_ERR field.
+    * @return The CIRCL_ERR field as a string.
+    */
+   ossimString getCE90() const;
+
+   /**
+    * @brief Get the LINEAR_ERR field.
+    * @return The LINEAR_ERR field as a string.
+    */
+   ossimString getLE90() const;
+
+protected:
+
+   /**
+    * FIELD: SENSOR
+    * 
+    * 6 byte field BCS-A
+    *
+    * PAN MS
+    */
+   char theSensor[7];
+
+   /**
+    * FIELD: TIME_FIRST_LINE_IMAGE
+    *
+    * 12 byte field BCS-N Seconds (UTC)
+    *
+    * Time in seconds from midnight for the first line, synthetic array,
+    * of the Dataset collection.
+    * 
+    * 00000.000000 to 86400.000000
+    */
+   char theTileFirstLine[13];
+
+   /**
+    * FIELD: TIME_IMAGE_DURATION
+    *
+    * 12 byte field BCS-N Seconds (UTC)
+    *
+    * Time Difference in seconds between the first line, synthetic array,
+    * and the last line, synthetic array.
+    * 
+    * 00000.000000 to 86400.000000
+    */
+   char theImageTimeDuration[13];
+
+   /**
+    * FIELD: MAX_GSD
+    *
+    * 5 byte field BCS-N inches
+    *
+    * Predicted maximum mean ground sample distance (GSD)for the primary
+    * target.
+    *
+    * 000.0 to 999.9
+    */
+   char theMaxGsd[6];
+
+   /**
+    * FIELD: ALONG_SCAN_GSD
+    *
+    * 5 byte field BCS-A inches
+    *
+    * Measured along scan GSD for the primary target.
+    *
+    * 000.0 to 999.9 or N/A
+    */
+   char theAlongScanGsd[6];
+
+   /**
+    * FIELD: CROSS_SCAN_GSD
+    *
+    * 5 byte field BCS-A inches
+    *
+    * Measured cross scan GSD for the primary target.
+    *
+    * 000.0 to 999.9 or N/A
+    */
+   char theCrossScanGsd[6];
+
+   /**
+    * FIELD: GEO_MEAN_GSD
+    *
+    * 5 byte field BCS-A inches
+    *
+    * Measured mean GSD for the primary target.
+    *
+    * 000.0 to 999.9 or N/A
+    */
+   char theGeoMeanGsd[6];
+
+   /**
+    * FIELD: A_S_VERT_GSD
+    *
+    * 5 byte field BCS-A inches
+    *
+    * Measured along scan vertical GSD for the primary target.
+    *
+    * 000.0 to 999.9 or N/A
+    */
+   char theAlongScanVertGsd[6];
+
+   /**
+    * FIELD: C_S_VERT_GSD
+    *
+    * 5 byte field BCS-A inches
+    *
+    * Measured cross scan vertical GSD for the primary target.
+    *
+    * 000.0 to 999.9 or N/A
+    */
+   char theCrossScanVertGsd[6];
+
+   /**
+    * FIELD: GEO_MEAN_VERT_GSD
+    *
+    * 5 byte field BCS-A inches
+    *
+    * Measured mean vertical GSD for the primary target.
+    *
+    * 000.0 to 999.9 or N/A
+    */
+   char theGeoMeanVertGsd[6];
+
+   /**
+    * FIELD: GEO_BETA_ANGLE
+    *
+    * 5 byte field BCS-A Degrees
+    *
+    * Angle on ground (Earth tangent plane) between along scan and cross scan
+    * directions.
+    *
+    * 00.0 to 180.0 or N/A
+    */
+   char theGeoBetaAngle[6];
+   
+   /**
+    * FIELD: DYNAMIC_RANGE
+    *
+    * 5 byte field BCS-N
+    *
+    * Dynamic range extent of pixel values in the image.
+    *
+    * 00000 to 02047 for PAN and MS.
+    */
+   char theDynamicRange[6];  
+
+   /**
+    * FIELD: NUM_LINES
+    *
+    * 7 byte field BCS-N
+    *
+    * 0000101 to 9999999
+    */
+   char theLine[8];
+   
+   /**
+    * FIELD: NUM_SAMPLES
+    *
+    * 5 byte field BCS-N
+    *
+    * 00101 to 99999
+    */
+   char theSamples[6];  
+
+   /**
+    * FIELD: ANGLE_TO_NORTH
+    *
+    * 7 byte field BCS-N Degrees
+    *
+    * Angle in degrees measured clockwise from the first row of the image to
+    * true North at image start time.
+    * 
+    * 000.000 to 360.000
+    */
+   char theAngleToNorth[8];
+
+   /**
+    * FIELD: OBLIQUITY_ANGLE
+    *
+    * 6 byte field BCS-N Degrees
+    *
+    * Obliquity angle measured from target local vertical.  I.e., the angle
+    * betweent the local North-Earth-Down (NED) horizontal and the optical
+    * axis of the image at the time of closest approach.
+    * 
+    * 00.000 to 90.000
+    */
+   char theObliquityAngle[7];
+
+   /**
+    * FIELD: AZ_OF_OBLIQUITY
+    *
+    * 7 byte field BCS-N Degrees
+    *
+    * Azimuth of the target-SV line-of-sight vectory projected in the target
+    * local horizontal plane, measured clockwise from True North, computed
+    * at Image Start Time.  The Velocity Control Point on the focal plane
+    * is projected to this azimuth projection in the target local
+    * horizontal plane.
+    * 
+    * 000.000 to 360.000
+    */
+   char theAzOfObliquity[8];
+   
+   /**
+    * FIELD: GRD_COVER
+    *
+    * 1 byte field BCS-N
+    *
+    * Snow or no snow
+    *
+    * 1 = snow, 0 = no snow, 9 = not available.
+    */
+   char theGrdCover[2];
+
+    /**
+    * FIELD: SNOW_DEPTH_CAT
+    *
+    * 1 byte field BCS-N
+    *
+    * Provides the weighted average of the snow depth values for all of
+    * the grids that overlap the tasked image area.
+    *
+    * 0 = 0 inches,
+    * 1 = 1-8 inches or ice,
+    * 2 = 9-17 inches,
+    * 3 = greater than 17 inches
+    * 9 = Not Available
+    */
+   char theSnowDepthCategory[2];
+
+   /**
+    * FIELD: SUN_AZIMUTH   
+    *
+    * 7 byte field BCS-N Degrees
+    *
+    * Azimuth of the target-sun line-of-sight vector projected in the
+    * target local horizontal plane, measured clockwise from True North,
+    * calculated at Image Start Time.
+    * 
+    * 000.000 to 360.000
+    */
+   char theSunAzimuth[8];
+
+   /**
+    * FIELD: SUN_ELEVATION  
+    *
+    * 7 byte field BCS-N Degrees
+    *
+    * The sun elevation angle from the local target plane to the sun
+    * calculated at Image_Start_Time, where the local target plane is
+    * referenced by the Target Centered - Earth Fixed, ST coordinate frame.
+    * 
+    * -90.000 to +90.000
+    */
+   char theSunElevation[8];
+   
+   /**
+    * FIELD: PREDICTED_NIIRS
+    *
+    * 3 byte field BCS-A
+    *
+    * Imagery NIIRS value. 
+    *
+    * 0.0 to 9.0 or N/A
+    */
+   char thePredictedNiirs[4];
+
+   /**
+    * FIELD: CIRCL_ERR
+    *
+    * 3 byte field BCS-N Feet
+    *
+    * Predicted CE/90 in the geolocation in the scene.
+    *
+    * 000 to 999
+    */
+   char theCircularError[4];
+
+   /**
+    * FIELD: LINEAR_ERR
+    *
+    * 3 byte field BCS-N Feet
+    *
+    * Predicted LE/90 in the geolocation in the scene
+    *
+    * 000 to 999
+    */
+   char theLinearError[4];
+   
+TYPE_DATA   
+};
+
+#endif /* matches #ifndef ossimNitfCsexraTag_HEADER */
+
diff --git a/include/ossim/support_data/ossimNitfCsproaTag.h b/ossim/include/ossim/support_data/ossimNitfCsproaTag.h
similarity index 100%
rename from include/ossim/support_data/ossimNitfCsproaTag.h
rename to ossim/include/ossim/support_data/ossimNitfCsproaTag.h
diff --git a/ossim/include/ossim/support_data/ossimNitfDataExtensionSegment.h b/ossim/include/ossim/support_data/ossimNitfDataExtensionSegment.h
new file mode 100644
index 0000000..25dfbc9
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfDataExtensionSegment.h
@@ -0,0 +1,53 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfDataExtensionSegment.h 22418 2013-09-26 15:01:12Z gpotts $
+#ifndef ossimNitfDataExtensionSegment_HEADER
+#define ossimNitfDataExtensionSegment_HEADER
+
+#include <iosfwd>
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimPropertyInterface.h>
+#include <ossim/base/ossimProperty.h>
+
+#include <vector>
+
+class ossimNitfTagInformation;
+
+class OSSIMDLLEXPORT ossimNitfDataExtensionSegment : public ossimPropertyInterface, public ossimObject
+{
+public:
+   friend std::ostream& operator <<(std::ostream &out,
+                                    const ossimNitfDataExtensionSegment &data);
+   ossimNitfDataExtensionSegment(){}
+   virtual ~ossimNitfDataExtensionSegment(){}
+   virtual void parseStream(std::istream &in, ossim_uint64 dataLength)=0;
+   virtual const std::vector<ossimNitfTagInformation>&  getTagList()const=0;
+
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+   static const ossimString DE_KW;
+   static const ossimString DESVER_KW;
+   static const ossimString DESOFLW_KW;
+   static const ossimString DESITEM_KW;
+   static const ossimString DESSHL_KW;
+   static const ossimString DESSHF_KW;
+   static const ossimString DESDATA_KW;
+   static const ossimString DECLAS_KW;
+   static const ossimString DESCODE_KW;
+   static const ossimString DESCTLH_KW;
+   static const ossimString DESREL_KW;
+   static const ossimString DESCAUT_KW;
+   static const ossimString DESCTLN_KW;
+
+TYPE_DATA
+};
+
+#endif
diff --git a/ossim/include/ossim/support_data/ossimNitfDataExtensionSegmentV2_0.h b/ossim/include/ossim/support_data/ossimNitfDataExtensionSegmentV2_0.h
new file mode 100644
index 0000000..c2cf2b0
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfDataExtensionSegmentV2_0.h
@@ -0,0 +1,88 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfDataExtensionSegmentV2_0.h 22418 2013-09-26 15:01:12Z gpotts $
+#ifndef ossimNitfDataExtensionSegmentV2_0_HEADER
+#define ossimNitfDataExtensionSegmentV2_0_HEADER
+#include <ossim/support_data/ossimNitfDataExtensionSegment.h>
+#include <ossim/support_data/ossimNitfTagInformation.h>
+
+struct ossimNitfDataExtIdentSecurityChunkV2_0
+{
+   friend std::ostream& operator <<(std::ostream& out,
+                                    const ossimNitfDataExtIdentSecurityChunkV2_0& data);
+   char theFilePartType[3]; // 2 byte alpha
+   char theUniqueDataExtTypeId[26]; // 25 byte alpha numeric
+   char theVersionDataFieldDef[3]; // 2 byte numeric
+   char theDataExtSecurityClass[2]; // 1 byte alpha
+   char theDataExtCodewords[41];    // 40 byte alpha numeric
+   char theDataExtControlAndHand[41]; // 40 byte alpha numeric
+   char theDataExtReleasingInst[41]; // 40 byte alpha numeric
+   char theDataExtClassAuthority[21]; // 20 byte alph num
+   char theDataExtSecurityConNum[21]; // 20 byte alpha num
+   char theDataExtSecurityDowngrade[7]; // 6 byte alpha num
+   char theDataExtDowngradingEvent[41]; // 40 byte alpha num
+};
+
+class OSSIMDLLEXPORT ossimNitfDataExtensionSegmentV2_0 : public ossimNitfDataExtensionSegment
+{
+public:
+   ossimNitfDataExtensionSegmentV2_0();
+   virtual ~ossimNitfDataExtensionSegmentV2_0();
+   virtual void parseStream(std::istream &in, ossim_uint64 dataLength);
+   virtual std::ostream& print(std::ostream& out)const;
+   virtual const std::vector<ossimNitfTagInformation>&  getTagList()const
+      {
+         return theTagList;
+      }
+
+   ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+   static const ossimString DESTAG_KW;
+   static const ossimString DESDWNG_KW;
+   static const ossimString DESDEVT_KW;
+
+private:
+   void clearFields();
+   
+   ossimNitfDataExtIdentSecurityChunkV2_0 theIdentSecurityChunk;
+   
+   /*!
+    * This is a 6 byte field
+    */
+   char theOverflowedHeaderType[7];
+
+   /*!
+    * This is a 3 byte field
+    */
+   char theDataItemOverflowed[4];
+
+   /*!
+    * This is a 4 byte field.
+    */
+   char theLengthOfUserDefinedSubheaderFields[5];
+
+   /*!
+    * This is an n-byte field, where n is theLengthOfUserDefinedSubheaderFields.
+    */
+   std::vector<unsigned char> theUserDefinedSubheaderFields;
+
+   /*!
+    * This is an n-byte field, where n is found in the file header.
+    */
+   std::vector<unsigned char> theData;
+
+   std::vector<ossimNitfTagInformation> theTagList;
+
+TYPE_DATA
+};
+
+#endif
diff --git a/ossim/include/ossim/support_data/ossimNitfDataExtensionSegmentV2_1.h b/ossim/include/ossim/support_data/ossimNitfDataExtensionSegmentV2_1.h
new file mode 100644
index 0000000..06f6b8e
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfDataExtensionSegmentV2_1.h
@@ -0,0 +1,115 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfDataExtensionSegmentV2_1.h 9094 2006-06-13 19:12:40Z dburken $
+#ifndef ossimNitfDataExtensionSegmentV2_1_HEADER
+#define ossimNitfDataExtensionSegmentV2_1_HEADER
+#include <ossim/support_data/ossimNitfDataExtensionSegment.h>
+#include <ossim/support_data/ossimNitfTagInformation.h>
+
+class ossimNitfFileHeaderV2_1;
+
+struct ossimNitfDataExtIdentSecurityChunkV2_1
+{
+   friend std::ostream& operator <<(std::ostream& out,
+                                    const ossimNitfDataExtIdentSecurityChunkV2_1& data);
+   char theFilePartType[3]; // 2 byte alpha
+   char theUniqueDataExtTypeId[26]; // 25 byte alpha numeric
+   char theVersionDataFieldDef[3]; // 2 byte numeric
+   char theDataExtSecurityClass[2]; // 1 byte alpha
+   char theDataExtClassSystem[3];
+   char theDataExtCodewords[12];    // 11 byte alpha numeric
+   char theDataExtControlAndHand[3]; // 2 byte alpha numeric
+   char theDataExtReleasingInst[21]; // 20 byte alpha numeric
+   char theDataExtDeclassType[3];
+   char theDataExtDeclassDate[9];
+   char theDataExtDeclassExempt[5];
+   char theDataExtSecurityDowngrade[2]; // 1 byte alpha
+   char theDataExtSecurityDowngradeDate[9];
+   char theDataExtSecurityClassText[44];
+   char theDataExtClassAuthType[2];
+   char theDataExtClassAuthority[41]; // 40 byte alph num
+   char theDataExtClassReason[2];
+   char theDataExtSecuritySourceDate[9];
+   char theDataExtSecurityConNum[16]; // 20 byte alpha num
+};
+
+class OSSIMDLLEXPORT ossimNitfDataExtensionSegmentV2_1 : public ossimNitfDataExtensionSegment
+{
+public:
+   ossimNitfDataExtensionSegmentV2_1();
+   virtual ~ossimNitfDataExtensionSegmentV2_1();
+   virtual void parseStream(std::istream &in, ossim_uint64 dataLength);
+   virtual void writeStream(std::ostream &out);
+   virtual std::ostream& print(std::ostream& out)const;
+   virtual const std::vector<ossimNitfTagInformation>&  getTagList()const
+      {
+         return theTagList;
+      }
+
+   virtual void setTagList(const std::vector<ossimNitfTagInformation> &tagList);
+
+   virtual void setSecurityMarkings(const ossimNitfFileHeaderV2_1 &fileHeader);
+
+   virtual ossim_uint32 getHeaderLength() const;
+   virtual ossim_uint64 getDataLength() const;
+
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+   static const ossimString DESID_KW;
+   static const ossimString DESCLSY_KW;
+   static const ossimString DESDCTP_KW;
+   static const ossimString DESDCDT_KW;
+   static const ossimString DESDCXM_KW;
+   static const ossimString DESDG_KW;
+   static const ossimString DESDGDT_KW;
+   static const ossimString DESCLTX_KW;
+   static const ossimString DESCATP_KW;
+   static const ossimString DESCRSN_KW;
+   static const ossimString DESSRDT_KW;
+
+private:
+   void clearFields();
+   
+   ossimNitfDataExtIdentSecurityChunkV2_1 theIdentSecurityChunk;
+   
+   /*!
+    * This is a 6 byte field
+    */
+   char theOverflowedHeaderType[7];
+
+   /*!
+    * This is a 3 byte field
+    */
+   char theDataItemOverflowed[4];
+
+   /*!
+    * This is a 4 byte field.
+    */
+   char theLengthOfUserDefinedSubheaderFields[5];
+
+   /*!
+    * This is an n-byte field, where n is theLengthOfUserDefinedSubheaderFields.
+    */
+   std::vector<unsigned char> theUserDefinedSubheaderFields;
+
+   /*!
+    * This is an n-byte field, where n is found in the file header.
+    */
+   std::vector<unsigned char> theData;
+
+   std::vector<ossimNitfTagInformation> theTagList;
+
+TYPE_DATA
+};
+
+#endif
diff --git a/ossim/include/ossim/support_data/ossimNitfEmbeddedRpfDes.h b/ossim/include/ossim/support_data/ossimNitfEmbeddedRpfDes.h
new file mode 100644
index 0000000..1e8e22b
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfEmbeddedRpfDes.h
@@ -0,0 +1,44 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfEmbeddedRpfDes.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimNitfEmbeddedRpfDes_HEADER
+#define ossimNitfEmbeddedRpfDes_HEADER 1
+
+#include <iosfwd>
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+class ossimNitfFileHeader;
+
+class OSSIMDLLEXPORT ossimNitfEmbeddedRpfDes : public ossimNitfRegisteredTag
+{
+public:
+   ossimNitfEmbeddedRpfDes();
+   
+   virtual void parseStream(std::istream &in);
+
+   /**
+    * @brief Print method that outputs a key/value type format
+    * adding prefix to keys.
+    * @param out Stream to output to.
+    * @param prefix Prefix added to key like "image0.";
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix=std::string()) const;
+protected:
+   virtual ~ossimNitfEmbeddedRpfDes();
+
+TYPE_DATA
+private:
+
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimNitfEngrdaTag.h b/ossim/include/ossim/support_data/ossimNitfEngrdaTag.h
new file mode 100644
index 0000000..d2d9758
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfEngrdaTag.h
@@ -0,0 +1,149 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: ENGRDA - Engineering Data tag class declaration.
+//
+// See document STDI-0002 (version 3), Appendix N for more info.
+// 
+//----------------------------------------------------------------------------
+// $Id
+
+#ifndef ossimNitfEngrdaTag_HEADER
+#define ossimNitfEngrdaTag_HEADER 1
+
+#include <string>
+#include <vector>
+
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+
+class OSSIM_DLL ossimNitfEngrdaTag : public ossimNitfRegisteredTag
+{
+public:
+
+   enum 
+   {
+      RESRC_SIZE   = 20,
+      RECNT_SIZE   = 3,
+      ENGLN_SIZE   = 2,
+      ENGMTXC_SIZE = 4,
+      ENGMTXR_SIZE = 4,
+      ENGTYP_SIZE  = 1,
+      ENGDTS_SIZE  = 1,
+      ENGDATU_SIZE = 2,
+      ENGDATC_SIZE = 8,
+      TMP_BUF_SIZE = 128
+   };
+   
+   /** @brief default constructor */
+   ossimNitfEngrdaTag();
+
+   /** @brief destructor */
+   virtual ~ossimNitfEngrdaTag();
+
+   /** @brief Method to parse data from stream. */
+   virtual void parseStream(std::istream& in);
+
+   /** @brief Method to write data to stream. */
+   virtual void writeStream(std::ostream& out);
+
+   /** @brief Method to clear all fields including null terminating. */
+   virtual void clearFields();
+
+   /**
+    * @brief Print method that outputs a key/value type format
+    * adding prefix to keys.
+    * @param out Stream to output to.
+    * @param prefix Prefix added to key like "image0.";
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix=std::string()) const;
+   
+protected:
+
+   /** @brief Container class for an Engineering Data Element Record. */
+   class ossimEngDataElement
+   {
+   public:
+      /** ENGLBL - label */
+      std::string theEngLbl;
+
+      /** ENGMTXC - column count */
+      ossim_uint16 theEngMtxC;
+
+      /** ENGMTXR - row count */
+      ossim_uint16 theEngMtxR;
+
+      /** ENGTYP - data type */
+      ossim_int8  theEngTyp;
+
+      /** ENGDTS - data size in bytes */
+      ossim_uint8 theEngDts;
+
+      /** ENGDATU - units */
+      std::string theEngDatU;
+
+      /** ENGDATA - data */
+      std::vector<ossim_uint8> theEngDat;
+   };
+
+   /**
+    * @brief Method to print out a ossimEngDataElement object.
+    * @param out Stream to print to.
+    * @param element The element to print.
+    * @param elIndex The index of the element array index.
+    * @param prefix  The prefix to add to key.
+    */
+   std::ostream& printData(std::ostream& out,
+                           const ossimEngDataElement& element,
+                           ossim_uint32 elIndex,
+                           const std::string& prefix) const;
+
+   /**
+    * @brief Method to convert value to a string, padding with zero's,
+    * left justified.
+    * @param v The value to convert.
+    * @param w The width of the string field.
+    * @param s The string to stuff.
+    */
+   template <class T> void getValueAsString(T v,
+                                            ossim_uint16 w,
+                                            std::string& s) const;
+
+   /** Type R = Required Type <R> = BCS spaces allowed for entire field */
+   
+   /**
+    * FIELD: RESRC
+    *
+    * TYPE: R
+    * 
+    * 20 byte field
+    *
+    * Unique Source System Name.
+    */
+   char theReSrc[RESRC_SIZE+1];
+   
+   /**
+    * FIELD: RECNT
+    *
+    * TYPE: R
+    * 
+    * 20 byte field
+    *
+    * Unique Source System Name.
+    */
+   char theReCnt[RECNT_SIZE+1];
+
+   std::vector<ossimEngDataElement> theData;
+
+   ossim_uint32 theTreLength;
+   
+TYPE_DATA   
+};
+
+#endif /* matches #ifndef ossimNitfEngrdaTag_HEADER */
+
diff --git a/include/ossim/support_data/ossimNitfExoptaTag.h b/ossim/include/ossim/support_data/ossimNitfExoptaTag.h
similarity index 100%
rename from include/ossim/support_data/ossimNitfExoptaTag.h
rename to ossim/include/ossim/support_data/ossimNitfExoptaTag.h
diff --git a/ossim/include/ossim/support_data/ossimNitfFile.h b/ossim/include/ossim/support_data/ossimNitfFile.h
new file mode 100644
index 0000000..fee4a9d
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfFile.h
@@ -0,0 +1,93 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfFile.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimNitfFile_HEADER
+#define ossimNitfFile_HEADER
+
+#include <iosfwd>
+#include <vector>
+
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/support_data/ossimNitfFileHeader.h>
+
+class ossimNitfImageHeader;
+class ossimNitfSymbolHeader;
+class ossimNitfLabelHeader;
+class ossimNitfTextHeader;
+class ossimNitfDataExtensionSegment;
+class ossimFilename;
+class ossimNitfRegisteredTag;
+class ossimNitfTagInformation;
+
+class OSSIMDLLEXPORT ossimNitfFile : public ossimReferenced
+{
+public:
+   friend OSSIMDLLEXPORT std::ostream& operator <<(std::ostream& out,
+                                                   const ossimNitfFile &data);
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out Stream to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
+    * "nitf.file_name:"
+    * @param printOverviews If true overview, if present(e.g. rpf's) will be
+    * printed.
+    * @return output stream.
+    */
+   std::ostream& print(std::ostream& out,
+                       const std::string& prefix=std::string(),
+                       bool printOverviews=false) const;
+   
+   ossimNitfFile();
+   virtual ~ossimNitfFile();
+
+   /*!
+    *  Opens the nitf file and attempts to parse.
+    *  Returns true on success, false on error.
+    */
+   bool parseFile(const ossimFilename &file);
+
+   /*!
+    * Will return the header.
+    */
+   const ossimNitfFileHeader* getHeader()const;
+   ossimNitfFileHeader* getHeader();
+   ossimIrect getImageRect()const;
+   
+   ossimNitfImageHeader*  getNewImageHeader(ossim_uint32 imageNumber)const;
+   ossimNitfSymbolHeader* getNewSymbolHeader(ossim_uint32 symbolNumber)const;
+   ossimNitfLabelHeader*  getNewLabelHeader(ossim_uint32 labelNumber)const;
+   ossimNitfTextHeader*   getNewTextHeader(ossim_uint32 textNumber)const;
+   ossimNitfDataExtensionSegment* getNewDataExtensionSegment(ossim_uint32 dataExtNumber)const;
+   
+   ossimString getVersion()const;
+
+   /** @return The filename parsed by this object. */
+   ossimFilename getFilename() const;
+   
+   virtual bool saveState(ossimKeywordlist& kwl, const ossimString& prefix)const;
+
+protected:
+   ossimNitfImageHeader* allocateImageHeader()const;
+   
+   ossimFilename                    theFilename;
+   ossimRefPtr<ossimNitfFileHeader> theNitfFileHeader;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimNitfFileHeader.h b/ossim/include/ossim/support_data/ossimNitfFileHeader.h
new file mode 100644
index 0000000..cd5dbaa
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfFileHeader.h
@@ -0,0 +1,220 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfFileHeader.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimNitfFileHeader_HEADER
+#define ossimNitfFileHeader_HEADER
+
+#include <iosfwd>
+#include <vector>
+#include <iterator>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimPropertyInterface.h>
+#include <ossim/base/ossimProperty.h>
+#include <ossim/support_data/ossimNitfTagInformation.h>
+
+class ossimNitfImageHeader;
+class ossimNitfSymbolHeader;
+class ossimNitfTextHeader;
+class ossimNitfLabelHeader;
+class ossimNitfRegisteredTag;
+class ossimNitfDataExtensionSegment;
+// These structures are just data holders and will
+// not be used directly by outside users.  This is for internal use
+//
+class OSSIM_DLL ossimNitfImageOffsetInformation : public ossimObject
+{
+public:
+   virtual std::ostream& print(std::ostream& out) const;
+
+   ossimNitfImageOffsetInformation(ossim_uint64 headerOffset,
+                                   ossim_uint64 dataOffset)
+      :theImageHeaderOffset(headerOffset),
+       theImageDataOffset(dataOffset)
+      {
+      }
+   
+   ossim_uint64 theImageHeaderOffset;
+   ossim_uint64 theImageDataOffset;
+};
+
+
+class OSSIMDLLEXPORT ossimNitfSymbolOffsetInformation : public ossimObject
+{
+public:
+   ossimNitfSymbolOffsetInformation(ossim_uint64 headerOffset,
+                                    ossim_uint64 dataOffset)
+      :theSymbolHeaderOffset(headerOffset),
+       theSymbolDataOffset(dataOffset)
+      {
+      }
+   
+   ossim_uint64 theSymbolHeaderOffset;
+   ossim_uint64 theSymbolDataOffset;
+};
+
+class OSSIMDLLEXPORT ossimNitfGraphicOffsetInformation : public ossimObject
+{
+public:
+   ossimNitfGraphicOffsetInformation(ossim_uint64 headerOffset,
+                                    ossim_uint64 dataOffset)
+      :theGraphicHeaderOffset(headerOffset),
+       theGraphicDataOffset(dataOffset)
+      {
+      }
+   
+   ossim_uint64 theGraphicHeaderOffset;
+   ossim_uint64 theGraphicDataOffset;
+};
+
+class OSSIMDLLEXPORT ossimNitfLabelOffsetInformation : public ossimObject
+{
+public:
+   ossimNitfLabelOffsetInformation(ossim_uint64 headerOffset,
+                                   ossim_uint64 dataOffset)
+      :theLabelHeaderOffset(headerOffset),
+       theLabelDataOffset(dataOffset)
+      {
+      }
+   
+   ossim_uint64 theLabelHeaderOffset;
+   ossim_uint64 theLabelDataOffset;
+};
+
+class OSSIMDLLEXPORT ossimNitfTextOffsetInformation : public ossimObject
+{
+public:
+   ossimNitfTextOffsetInformation(ossim_uint64 headerOffset,
+                                  ossim_uint64 dataOffset)
+      :theTextHeaderOffset(headerOffset),
+       theTextDataOffset(dataOffset)
+      {
+      }
+   
+   ossim_uint64 theTextHeaderOffset;
+   ossim_uint64 theTextDataOffset;
+   
+};
+
+class OSSIMDLLEXPORT ossimNitfDataExtSegOffsetInformation : public ossimObject
+{
+public:
+   ossimNitfDataExtSegOffsetInformation(ossim_uint64 headerOffset,
+                                        ossim_uint64 dataOffset)
+      :theDataExtSegHeaderOffset(headerOffset),
+       theDataExtSegDataOffset(dataOffset)
+      {
+      }
+   
+   ossim_uint64 theDataExtSegHeaderOffset;
+   ossim_uint64 theDataExtSegDataOffset;   
+};
+
+class OSSIM_DLL ossimNitfFileHeader : public ossimObject,
+                                      public ossimPropertyInterface
+{
+public:
+   friend class ossimNitfFile;
+
+   ossimNitfFileHeader();
+   virtual ~ossimNitfFileHeader();
+
+   virtual void parseStream(std::istream &in)= 0;
+   virtual void writeStream(std::ostream &out)=0;
+   
+   virtual bool isEncrypted()const=0;
+   virtual ossim_int32 getNumberOfImages()const=0;
+   virtual ossim_int32 getNumberOfLabels()const=0;
+   virtual ossim_int32 getNumberOfSymbols()const=0;
+   virtual ossim_int32 getNumberOfGraphics()const=0;
+   virtual ossim_int32 getNumberOfTextSegments()const=0;
+   virtual ossim_int32 getNumberOfDataExtSegments()const=0;
+   virtual ossim_int32 getNumberOfReservedExtSegments()const=0;
+   virtual ossim_int32 getHeaderSize()const=0;
+   
+   void addTag(const ossimNitfTagInformation& tag, bool unique=true);
+   virtual void removeTag(const ossimString& tagName);
+   virtual bool  getTagInformation(ossimNitfTagInformation& tag,
+                                   int idx)const;
+
+   virtual int getNumberOfTags()const;
+
+   virtual bool getTag(ossimNitfTagInformation& tagInfo,
+                       const ossimString& tagName)const;
+   
+   virtual ossim_int64 getFileSize()const=0;
+   virtual const char* getVersion()const=0;
+   virtual const char* getDateTime()const=0;
+   virtual ossimDrect getImageRect()const=0;
+   virtual ossimString getSecurityClassification()const=0;
+   
+   bool hasImages()const;
+   bool hasSymbols()const;
+   bool hasGraphics()const;
+   bool hasText()const;
+   bool hasLabels()const;
+   bool hasDataExtSegments()const;
+
+   virtual ossimNitfImageHeader* getNewImageHeader(ossim_uint32 imageNumber,
+                                                   std::istream& in)const=0;
+   virtual ossimNitfSymbolHeader* getNewSymbolHeader(ossim_uint32 symbolNumber,
+                                                    std::istream& in)const=0;
+   virtual ossimNitfLabelHeader* getNewLabelHeader(ossim_uint32 labelNumber,
+                                                   std::istream& in)const=0;
+   virtual ossimNitfTextHeader* getNewTextHeader(ossim_uint32 textNumber,
+                                                std::istream& in)const=0;
+   virtual ossimNitfDataExtensionSegment* getNewDataExtensionSegment(
+      ossim_int32 dataExtNumber, std::istream& in)const=0;
+   
+   virtual ossimNitfImageHeader*    allocateImageHeader()const=0;
+   virtual ossimNitfSymbolHeader*   allocateSymbolHeader()const=0;
+   virtual ossimNitfLabelHeader*    allocateLabelHeader()const=0;
+   virtual ossimNitfTextHeader*     allocateTextHeader()const=0;
+   virtual ossimNitfDataExtensionSegment *allocateDataExtSegment()const=0;
+
+   virtual ossim_uint32 getTotalTagLength()const;
+
+   /** @brief Sets file length (FL) field. */
+   virtual void setFileLength(ossim_uint64 fileLength) = 0;
+
+   /** @brief Sets header length (HL) field. */
+   virtual void setHeaderLength(ossim_uint64 headerLength) = 0;
+
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+   /**
+    * @brief Print method that outputs a key/value type format
+    * adding prefix to keys.
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix=std::string()) const;
+   
+   /**
+    * @brief print tags method that outputs a key/value type format adding
+    * prefix to keys.
+    */
+   virtual std::ostream& printTags(
+      std::ostream& out,
+      const std::string& prefix=std::string()) const;
+   
+   virtual bool saveState(ossimKeywordlist& kwl, const ossimString& prefix="")const;
+   
+protected:
+   std::vector<ossimNitfTagInformation> theTagList;
+   
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimNitfFileHeaderV2_0.h b/ossim/include/ossim/support_data/ossimNitfFileHeaderV2_0.h
new file mode 100644
index 0000000..4691562
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfFileHeaderV2_0.h
@@ -0,0 +1,612 @@
+//*******************************************************************
+//
+//  License:  MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfFileHeaderV2_0.h 23666 2015-12-14 20:01:22Z rashadkm $
+#ifndef ossimNitfFileHeaderV2_0_HEADER
+#define ossimNitfFileHeaderV2_0_HEADER
+
+#include <iosfwd>
+#include <ossim/support_data/ossimNitfFileHeaderV2_X.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/support_data/ossimNitfTagInformation.h>
+
+class ossimNitfRegisteredTag;
+
+class ossimNitfImageInfoRecordV2_0
+{
+public:
+   friend std::ostream& operator <<(std::ostream& out,
+                                    const ossimNitfImageInfoRecordV2_0 &data);
+
+   ossim_uint32 getHeaderLength()const;
+   ossim_uint64 getImageLength()const;
+   ossim_uint64 getTotalLength()const;
+   void setSubheaderLength(ossim_uint32 length);
+   void setImageLength(ossim_uint64 length);
+
+   /*!
+    * Is a 6 byte numeric 0-999999
+    */
+   char theImageSubheaderLength[7];
+
+   /*!
+    * Is a 10 byte numeric 0-999999999
+    */
+   char theImageLength[11];
+};
+
+struct ossimNitfSymbolInfoRecordV2_0
+{
+public:
+   friend std::ostream& operator <<(std::ostream& out,
+                               const ossimNitfSymbolInfoRecordV2_0 &data);
+
+   ossim_int32 getHeaderLength()const;
+   ossim_int32 getImageLength()const;
+   ossim_int32 getTotalLength()const;
+   
+   /*!
+    * Is a 4 byte numeric 0-9999
+    */
+   char theSymbolSubheaderLength[5];
+
+   /*!
+    * Is a 6 byte numeric 0-999999
+    */
+   char theSymbolLength[7];
+};
+
+struct ossimNitfLabelInfoRecordV2_0
+{
+public:
+   friend std::ostream& operator <<(std::ostream& out,
+                               const ossimNitfLabelInfoRecordV2_0 &data);
+
+   ossim_int32 getHeaderLength()const;
+   ossim_int32 getImageLength()const;
+   ossim_int32 getTotalLength()const;
+   
+   /*!
+    * Is a 4 byte numeric 0-9999
+    */
+   char theLabelSubheaderLength[5];
+
+   /*!
+    * Is a 3 byte numeric 0-320
+    */
+   char theLabelLength[4];
+};
+
+struct ossimNitfTextInfoRecordV2_0
+{
+public:
+   friend std::ostream& operator <<(std::ostream& out,
+                               const ossimNitfTextInfoRecordV2_0 &data);
+
+   ossim_int32 getHeaderLength()const;
+   ossim_int32 getImageLength()const;
+   ossim_int32 getTotalLength()const;
+   /*!
+    * Is a 4 byte numeric 0-9999
+    */
+   char theTextSubheaderLength[5];
+
+   /*!
+    * Is a 5 byte numeric 0-99999
+    */
+   char theTextLength[6];
+};
+
+struct ossimNitfDataExtSegInfoRecordV2_0
+{
+public:
+   friend std::ostream& operator <<(std::ostream& out,
+                               const ossimNitfDataExtSegInfoRecordV2_0 &data);
+
+   ossim_int32 getHeaderLength()const;
+   ossim_int32 getImageLength()const;
+   ossim_int32 getTotalLength()const;
+   /*!
+    * Is a 4 byte numeric 0-9999
+    */
+   char theDataExtSegSubheaderLength[5];
+
+   /*!
+    * Is a 9 byte numeric 0-999999999
+    */
+   char theDataExtSegLength[10];
+};
+
+struct ossimNitfResExtSegInfoRecordV2_0
+{
+public:
+   friend std::ostream& operator <<(std::ostream& out,
+                               const ossimNitfResExtSegInfoRecordV2_0 &data);
+
+   /*!
+    * Is a 4 byte numeric 0-9999
+    */
+   char theResExtSegSubheaderLength[5];
+
+   /*!
+    * Is a 7 byte numeric 0-9999999
+    */
+   char theResExtSegLength[8];
+};
+
+class OSSIMDLLEXPORT ossimNitfFileHeaderV2_0 : public ossimNitfFileHeaderV2_X
+{
+public:
+   
+   ossimNitfFileHeaderV2_0();
+   virtual ~ossimNitfFileHeaderV2_0();
+
+   /**
+    * @brief parse method.
+    * @return This method returns void but will throw an std::exception in
+    * certain instances if the stream goes bad on seeks.
+    */
+   virtual void parseStream(std::istream &in);
+   
+   virtual void writeStream(std::ostream &out);
+   
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix=std::string()) const;
+   
+   virtual bool isEncrypted()const;
+   virtual ossim_int32 getNumberOfImages()const;
+   virtual ossim_int32 getNumberOfLabels()const;
+   virtual ossim_int32 getNumberOfSymbols()const;
+   virtual ossim_int32 getNumberOfGraphics()const;
+   virtual ossim_int32 getNumberOfTextSegments()const;
+   virtual ossim_int32 getNumberOfDataExtSegments()const;
+   virtual ossim_int32 getNumberOfReservedExtSegments()const;
+   virtual ossim_int32 getHeaderSize()const;
+   virtual ossim_int64 getFileSize()const;
+   virtual ossimString getSecurityClassification()const;
+   
+   virtual const char* getDateTime()const;
+   virtual const char* getVersion()const;
+
+   virtual ossimDrect getImageRect()const;
+  
+   virtual void addImageInfoRecord(const ossimNitfImageInfoRecordV2_0& recordInfo);
+   virtual void replaceImageInfoRecord(ossim_uint32 i, const ossimNitfImageInfoRecordV2_0& recordInfo);
+
+   virtual ossimNitfImageHeader*  getNewImageHeader(ossim_uint32 imageNumber,
+                                                    std::istream& in)const;
+   virtual ossimNitfSymbolHeader* getNewSymbolHeader(ossim_uint32 symbolNumber,
+                                                     std::istream& in)const;
+   virtual ossimNitfLabelHeader* getNewLabelHeader(ossim_uint32 labelNumber,
+                                                   std::istream& in)const;
+   virtual ossimNitfTextHeader*   getNewTextHeader(ossim_uint32 textNumber,
+                                                   std::istream& in)const;
+   virtual ossimNitfDataExtensionSegment* getNewDataExtensionSegment(
+      ossim_int32 dataExtNumber, std::istream& in)const;
+   
+   virtual ossimNitfImageHeader*  allocateImageHeader()const;
+   virtual ossimNitfSymbolHeader* allocateSymbolHeader()const;
+   virtual ossimNitfLabelHeader*  allocateLabelHeader()const;
+   virtual ossimNitfTextHeader*   allocateTextHeader()const;
+   virtual ossimNitfDataExtensionSegment *allocateDataExtSegment()const;
+
+   virtual void setCodeWords(const ossimString& codeWords);
+   virtual void setControlAndHandling(const ossimString& controlAndHandling);
+   virtual void setReleasingInstructions(const ossimString& releasingInstructions);
+   virtual void setClassificationAuthority(const ossimString& classAuth);
+   virtual void setSecurityControlNumber(const ossimString& controlNo);
+   virtual void setOriginatorsName(const ossimString& originatorName);
+   virtual void setOriginatorsPhone(const ossimString& origniatorPhone);
+
+   virtual ossimString getCodeWords()const;
+   virtual ossimString getControlAndHandling()const;
+   virtual ossimString getReleasingInstructions()const;
+   virtual ossimString getClassificationAuthority()const;
+   virtual ossimString getSecurityControlNumber()const;
+   virtual ossimString getOriginatorsName()const;
+   virtual ossimString getOriginatorsPhone()const;
+
+   ossimString getComplianceLevel()const;
+   ossimString getSecurityDowngrade()const;
+   ossimString getDowngradingEvent()const;
+
+   void setComplianceLevel(const ossimString& complianceLevel);
+   void setSecurityDowngrade(const ossimString& securityDowngrade);
+   void setDowngradingEvent(const ossimString& downgradeEvent);
+
+   virtual void setFileLength(ossim_uint64 fileLength);
+   virtual void setHeaderLength(ossim_uint64 headerLength);
+   /**
+    * Properties of a NITF 2.0 Header file. See MIL-STD-2500A for details.
+    *
+    * To access these, pass the constant to getProperty().
+    */
+   static const ossimString FSDWNG_KW;
+   static const ossimString FSDEVT_KW;
+
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+   
+   virtual bool saveState(ossimKeywordlist& kwl, const ossimString& prefix="")const;
+TYPE_DATA
+private:
+
+   struct ossimNitfDisplayInfo
+   {
+   public:
+      ossimNitfDisplayInfo(const ossimString &filePartType,
+                           ossim_int32 displayLevel,
+                           ossim_int32 indexIntoList)
+         :theFilePartType(filePartType),
+          theDisplayLevel(displayLevel),
+          theIndex(indexIntoList)
+         {
+         }
+      
+      /*!
+       * Since NITF already has unique ids for the file
+       * part types we will just use them.
+       *
+       *  IM  indicates image part
+       *  LA  indicates a label part
+       *  SY   indicates a symbol part
+       */
+      ossimString theFilePartType;
+
+      /*!
+       * This is the display level of the renderable data.  Note the
+       * display level is like a painters algorithm.  The lowest level
+       * is drawn first followed by the next level.
+       */
+      ossim_int32        theDisplayLevel;
+
+      /*!
+       * This is an index into the array that has all the offsets
+       * pre-computed.
+       */
+      ossim_int32        theIndex;
+      
+   };
+
+   void clearFields();
+   /**
+    * Sets the number of image records in the NITF 2.0 File Header.
+    *
+    * @param num
+    *        The number of image records for the entire NITF 2.0 file.
+    *
+    * @throw std::out_of_range
+    */
+   void setNumberOfImageInfoRecords(ossim_uint64 num);
+   
+  /*!
+    * This method will be used to setup information about the file.
+    * Example: NITF files have display levels where the lowest number is the
+    * back most image and the highes number is the front most image.  We
+    * are not guranteed that they will be in order in the file so we must
+    * parse the file and sort the images.  The images include image data,
+    * symbols and labels.  Each of these are renderable.  The lowest
+    * display level should have the larges rect and this will be used
+    * to send back to the user an image rect.  During rasterization we must
+    * know the order to draw the data.
+    */
+   void precomputeValues();
+   
+   void readImageInfoRecords(std::istream &in);
+   void readSymbolInfoRecords(std::istream &in);
+   void readLabelInfoRecords(std::istream &in);
+   void readTextFileInfoRecords(std::istream &in);
+   void readDataExtSegInfoRecords(std::istream &in);
+   void readResExtSegInfoRecords(std::istream &in);
+   /*!
+    * If the header was parsed this method will initialize the offsets
+    * to whare all data resides within the file.  Example:  NITF files
+    * have several sections (Image, Symbol, Labels, Text and Extended data) and
+    * each of these sections have subsections.  The offsets stored are just offsets
+    * from the start of the file to each major section and eqach subsection.
+    */
+   void initializeAllOffsets();
+
+  /*!
+    * If the header was parsed and the offsets have been initialized, this method will
+    * parse all overflow tags and put them into theTagList.
+    */
+   void readOverflowTags(std::istream& in);
+
+   /*!
+    * This method will be called after the header is read
+    * in and the offsets have been initialized.  It will
+    * sort in order all renderable data based on their
+    * display level.
+    */
+   void initializeDisplayLevels(std::istream& in);
+
+   void insertIntoDisplayInfoList(const ossimNitfDisplayInfo &displayInformation);
+
+   
+   /*!
+    * This is the current file we are operating on.
+    */
+   ossimFilename theFilename;
+   
+   /*!
+    * This will be pre-computed when the header file is opened.  This is computed
+    * after we have found the display order.  We will use the rectangle of the
+    * smallest display number.
+    */
+   ossimDrect theImageRect;
+   
+   /*!
+    * This will hold some pre-computed information about the display
+    * order of the images.  It will be populated by scanning the
+    * file and sorting display levels.
+    */
+   std::vector<ossimNitfDisplayInfo>             theDisplayInformationList;
+   
+   /*!
+    * This will hold pre-computed offsets to the start of all image headers
+    * and start to their data.
+    */
+   std::vector<ossimNitfImageOffsetInformation>  theImageOffsetList;
+
+   /*!
+    * This will hold pre-computed offsets to the start of all symbol headers
+    * and start to their data.
+    */
+   std::vector<ossimNitfSymbolOffsetInformation> theSymbolOffsetList;
+
+   /*!
+    * This will hold pre-computed offsets to the start of all Label headers
+    * and start to their data.
+    */
+   std::vector<ossimNitfLabelOffsetInformation>  theLabelOffsetList;
+
+   /*!
+    * This will hold pre-computed offsets to the start of all text headers
+    * and start to their data.
+    */
+   std::vector<ossimNitfTextOffsetInformation>   theTextOffsetList;
+
+   /*!
+    * This will hold pre-coputed offsets to the start of all the data
+    * extension segments.
+    */
+   std::vector<ossimNitfDataExtSegOffsetInformation> theDataExtSegOffsetList;
+
+
+
+   
+   // Note: these are work variables and not part of the
+   // ossimNitf header.  These variables will be used to quickly
+   // access various parts of the file.
+   /*!
+    * This is not part of the NITF file header.  This will be
+    * computed since somethimes the header size will not be
+    * given in the header field.  This value will hold a count of
+    * all the bytes read for the header portion.  This can be used
+    * to skip past the header data.
+    */
+   ossim_int32 theHeaderSize;
+   
+   /*!
+    * FSCODE: This is a 40 byte Alphanumeric field
+    */
+   char theCodewords[41]; 
+
+   /*!
+    * FSCTLH: This is a 40 byte Alphanumeric field.
+    */
+   char theControlAndHandling[41]; 
+
+   /*!
+    * FSREL: This is a 40 byte Alphanumeric field.
+    */
+   char theReleasingInstructions[41]; 
+
+   /*!
+    * FSCAUT: This is a 20 byte alphanumeric field.
+    */ 
+   char theClassificationAuthority[21];
+
+   /*!
+    * FSCTLN: This is a 20 byte Alphanumeric field.
+    */
+   char theSecurityControlNumber[21]; 
+
+   /*!
+    * FSDWNG:
+    *
+    * This is a 6 byte Alphanumeric.  If this field
+    * is not blank then it will have the form:
+    *
+    *   YYMMDD
+    *
+    *   Where YY is the last 2 chars of the year and will be
+    *            00 to 59 represents 2000 to 2059
+    *            60 to 99 represents 1960 to 1999
+    *
+    *
+    *   if the field is 999999 then the Originating agency field
+    *   is required. If te field is 999998 then the downgrade event
+    *   is required
+    */
+   char theSecurityDowngrade[7];
+
+   /**
+    * FSDEVT:
+    * This is a conditional field and is a 40 byte
+    * Alphanumeric field.  This field exists if the
+    * security downgrade is 999998.
+    */
+   char theDowngradingEvent[41];
+
+   /**
+    * ONAME:
+    *
+    * This is a 27 byte Alphanumeric number
+    */
+   char theOriginatorsName[28];
+
+   /*!
+    * OPHONE:
+    * This is an 18 byte Alphanumeric value. 
+    */
+   char theOriginatorsPhone[19]; 
+
+   /*!
+    * FL:
+    *
+    * This is a required field.
+    *
+    * Is a 12 byte number of the form
+    * 000000000388-999999999998 indicates the
+    * file length and a value of 999999999999
+    * indicates that the file length was not
+    * available.
+    */
+   char theFileLength[13];
+
+   /**
+    * HL:
+    *
+    * This is a reqired field.
+    *
+    * Will hold the header length. The values
+    * range up to 999998 and a value of
+    * 999999 indicates that the length of the
+    * header was not available upon creation.
+    */
+   char theHeaderLength[7];
+
+   /**
+    * NUMI:
+    *
+    * This is a 3 byte field that specifies the number
+    * of images in the file.  0-999
+    */
+   char theNumberOfImageInfoRecords[4];
+
+   /*!
+    * This information is conditional on the number of image
+    * info records field.  If the field is greater than 0 then
+    * the record information is read in up to the indicated number
+    */
+   std::vector<ossimNitfImageInfoRecordV2_0> theNitfImageInfoRecords;
+
+   /*!
+    * This is a 3 byte numeric 0-999.
+    */
+
+   char theNumberOfSymbolInfoRecords[4];
+   /*!
+    * This information is conditional on the number of symbol
+    * info records field.  If the field is greater than 0 then
+    * the record information is read in up to the indicated number
+    */
+   std::vector<ossimNitfSymbolInfoRecordV2_0> theNitfSymbolInfoRecords;
+
+   /**
+    * NUML
+    *
+    * This is a 3 byte numeric 0-999.
+    */
+
+   char theNumberOfLabelInfoRecords[4];
+   
+   /*!
+    * This information is conditional on the number of label
+    * info records field.  If the field is greater than 0 then
+    * the record information is read in up to the indicated number
+    */
+   std::vector<ossimNitfLabelInfoRecordV2_0> theNitfLabelInfoRecords;
+
+   /**
+    * NUMT:
+    *
+    * This is a 3 byte numeric 0-999.
+    */
+   char theNumberOfTextFileInfoRecords[4];
+
+   /*!
+    * This information is conditional on the number of text file
+    * info records field.  If the field is greater than 0 then
+    * the record information is read in up to the indicated number
+    */
+   std::vector<ossimNitfTextInfoRecordV2_0> theNitfTextInfoRecords;
+
+   /**
+    * NUMDES:
+    *
+    * This is a 3 byte numeric 0-999.
+    */
+   char theNumberOfDataExtSegInfoRecords[4];
+
+   /*!
+    * This information is conditional on the number of 
+    * info records field.  If the field is greater than 0 then
+    * the record information is read in up to the indicated number
+    */
+   std::vector<ossimNitfDataExtSegInfoRecordV2_0> theNitfDataExtSegInfoRecords;
+
+   /**
+    * NUMRES:
+    *
+    * This is a 3 byte numeric 0-999. Reserved Extension Segments
+    */
+   char theNumberOfResExtSegInfoRecords[4];
+
+   /*!
+    * This information is conditional on the number of Res Ext Seg
+    * info records field.  If the field is greater than 0 then
+    * the record information is read in up to the indicated number
+    */
+   std::vector<ossimNitfResExtSegInfoRecordV2_0> theNitfResExtSegInfoRecords;
+
+   /**
+    * UDHDL:
+    * 
+    * This is a required field and is a 5 byte numeric ranging
+    * from 0-99999.  This is 0 if there is no data.
+    */
+   char theUserDefinedHeaderDataLength[6];
+
+   /*!
+    * This is a conditional field.  It will exist if the
+    * user defined header length is not 0.  If it exists
+    * then it may contain an overflow into one of the data
+    * extension segments above and will hold the number of that
+    * segment.
+    */
+   char theUserDefinedHeaderOverflow[4];
+
+   /**
+    * XHDL:
+    *
+    * This is a required field.  It is 5 bytes long and
+    * ranges from 0-99999.  0 means there is no data
+    */
+   char theExtendedHeaderDataLength[6];
+
+   /*!
+    * This is a required field.  It is 5 bytes long and
+    * ranges from 0-99999.  0 means there is no data
+    */
+   char theExtendedHeaderOverflow[4];
+};
+
+#endif
diff --git a/ossim/include/ossim/support_data/ossimNitfFileHeaderV2_1.h b/ossim/include/ossim/support_data/ossimNitfFileHeaderV2_1.h
new file mode 100644
index 0000000..eb581cf
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfFileHeaderV2_1.h
@@ -0,0 +1,641 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfFileHeaderV2_1.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimNitfFileHeaderV2_1_HEADER
+#define ossimNitfFileHeaderV2_1_HEADER
+
+#include <iosfwd>
+
+#include <ossim/support_data/ossimNitfFileHeaderV2_X.h>
+#include <ossim/base/ossimDate.h>
+#include <ossim/base/ossimKeywordlist.h>
+
+class OSSIMDLLEXPORT ossimNitfImageInfoRecordV2_1
+{
+public:
+   friend std::ostream& operator <<(std::ostream& out,
+                                    const ossimNitfImageInfoRecordV2_1 &data);
+   
+   ossim_uint64 getHeaderLength()const;
+   ossim_uint64 getImageLength()const;
+   ossim_uint64 getTotalLength()const;
+   
+   void setSubheaderLength(ossim_uint32 length);
+   void setImageLength(ossim_uint64 length);
+   
+   /**
+    * Is a 6 byte numeric 000439-999999
+    */
+   char theImageSubheaderLength[7];
+   
+   /**
+    * Is a 10 byte numeric 0000000001-9999999999
+    */
+   char theImageLength[11];
+};
+
+
+struct ossimNitfGraphicInfoRecordV2_1
+{
+public:
+   friend std::ostream& operator <<(std::ostream& out,
+                                    const ossimNitfGraphicInfoRecordV2_1 &data);
+   
+   ossim_uint64 getHeaderLength()const;
+   ossim_uint64 getGraphicLength()const;
+   ossim_uint64 getTotalLength()const;
+   /**
+    * Is a 4 byte numeric 0258-9999
+    */
+   char theGraphicSubheaderLength[5];
+   
+   /**
+    * Is a 6 byte numeric 0000001-9999999
+    */
+   char theGraphicLength[7];
+};
+
+
+class OSSIMDLLEXPORT ossimNitfTextFileInfoRecordV2_1
+{
+public:
+   friend std::ostream& operator<<(std::ostream& out,
+                                   const ossimNitfTextFileInfoRecordV2_1 &data);
+
+
+   ossim_uint64 getHeaderLength()const;
+   ossim_uint64 getTextLength()const;
+   ossim_uint64 getTotalLength()const;
+
+   void setSubheaderLength(ossim_uint64 length);
+   void setTextLength(ossim_uint64 length);
+   
+   /**
+    * Is a 4 byte numeric 0282-9999
+    */
+   char theTextFileSubheaderLength[5];
+
+   /**
+    * Is a 5 byte numeric 0-99999
+    */
+   char theTextFileLength[6];
+};
+
+struct ossimNitfDataExtSegInfoRecordV2_1
+{
+public:
+   friend std::ostream& operator<<(std::ostream& out,
+                                   const ossimNitfDataExtSegInfoRecordV2_1 &data);
+
+   ossim_uint64 getHeaderLength()const;
+   ossim_uint64 getDataExtSegLength()const;
+   ossim_uint64 getTotalLength()const;
+   /**
+    * Is a 4 byte numeric 200-9999
+    */
+   char theDataExtSegSubheaderLength[5];
+
+   /**
+    * Is a 9 byte numeric 0-999999999
+    */
+   char theDataExtSegLength[10];
+};
+
+struct ossimNitfResExtSegInfoRecordV2_1
+{
+public:
+   friend std::ostream& operator<<(std::ostream& out,
+                                   const ossimNitfResExtSegInfoRecordV2_1 &data);
+
+   ossim_uint64 getHeaderLength()const;
+   ossim_uint64 getResExtSegLength()const;
+   ossim_uint64 getTotalLength()const;
+  /**
+    * Is a 4 byte numeric 0-9999
+    */
+   char theResExtSegSubheaderLength[5];
+
+   /**
+    * Is a 7 byte numeric 0-9999999
+    */
+   char theResExtSegLength[8];
+};
+
+class OSSIMDLLEXPORT ossimNitfFileHeaderV2_1 : public ossimNitfFileHeaderV2_X
+{
+public:
+   
+   ossimNitfFileHeaderV2_1();
+   virtual ~ossimNitfFileHeaderV2_1();
+   virtual void parseStream(std::istream &in);
+   virtual void writeStream(std::ostream &out);
+   virtual bool isEncrypted()const;
+   virtual ossim_int32 getNumberOfImages()const;
+   virtual ossim_int32 getNumberOfLabels()const;
+   virtual ossim_int32 getNumberOfSymbols()const;
+   virtual ossim_int32 getNumberOfGraphics()const;
+   virtual ossim_int32 getNumberOfTextSegments()const;
+   virtual ossim_int32 getNumberOfDataExtSegments()const;
+  virtual ossim_int32 getNumberOfReservedExtSegments()const;
+   virtual ossim_int32 getHeaderSize()const;
+   virtual ossim_int64 getFileSize()const;
+   virtual const char* getVersion()const;
+   virtual const char* getDateTime()const;
+   virtual ossimDrect getImageRect()const;
+
+   virtual void addImageInfoRecord(const ossimNitfImageInfoRecordV2_1& recordInfo);
+   virtual void addTextInfoRecord(const ossimNitfTextFileInfoRecordV2_1& recordInfo);
+	virtual void addDataExtSegInfoRecord(const ossimNitfDataExtSegInfoRecordV2_1& recordInfo);
+
+   virtual void replaceImageInfoRecord(int i, const ossimNitfImageInfoRecordV2_1& recordInfo);
+   
+   virtual ossimNitfImageHeader*  getNewImageHeader(ossim_uint32 imageNumber,
+                                                    std::istream& in)const;
+   virtual ossimNitfSymbolHeader* getNewSymbolHeader(ossim_uint32 symbolNumber,
+                                                     std::istream& in)const;
+   virtual ossimNitfLabelHeader* getNewLabelHeader(ossim_uint32 labelNumber,
+                                                   std::istream& in)const;
+   virtual ossimNitfTextHeader* getNewTextHeader(ossim_uint32 textNumber,
+                                                   std::istream& in)const;
+   virtual ossimNitfDataExtensionSegment* getNewDataExtensionSegment(
+      ossim_int32 dataExtNumber, std::istream& in)const;
+
+   virtual ossimNitfImageHeader*  allocateImageHeader()const;
+   virtual ossimNitfSymbolHeader* allocateSymbolHeader()const;
+   virtual ossimNitfLabelHeader*  allocateLabelHeader()const;
+   virtual ossimNitfTextHeader*   allocateTextHeader()const;
+   virtual ossimNitfDataExtensionSegment *allocateDataExtSegment()const;
+
+   virtual ossimString getSecurityClassificationSys()const;
+   virtual ossimString getCodeWords()const;
+   virtual ossimString getControlAndHandling()const;
+   virtual ossimString getReleasingInstructions()const;
+   virtual ossimString getDeclassificationType()const;
+   virtual ossimString getDeclassificationDate()const;
+   virtual ossimString getDeclassificationExemption()const;
+   virtual ossimString getDowngrade()const;
+   virtual ossimString getDowngradingDate()const;
+   virtual ossimString getClassificationText()const;
+   virtual ossimString getClassificationAuthorityType()const;
+   virtual ossimString getClassificationAuthority()const;
+   virtual ossimString getClassificationReason()const;
+   virtual ossimString getSecuritySourceDate()const;
+   virtual ossimString getSecurityControlNumber()const;
+   virtual void getBackgroundColor(ossim_uint8& r,
+                                   ossim_uint8& g,
+                                   ossim_uint8& b)const;
+   virtual ossimString getOriginatorsName()const;
+   virtual ossimString getOriginatorsPhone()const;
+   
+   virtual void setFileLength(ossim_uint64 fileLength);
+   virtual void setHeaderLength(ossim_uint64 headerLength);
+   
+   virtual void setSecurityClassificationSys(const ossimString& value);
+   virtual void setCodeWords(const ossimString& codeWords);
+   virtual void setControlAndHandling(const ossimString& controlAndHandling);
+   virtual void setReleasingInstructions(const ossimString& releasingInstructions);
+   virtual void setDeclassificationType(const ossimString& declassType);
+   virtual void setDeclassificationDate(const ossimLocalTm& declassDate);
+   virtual void setDeclassificationDate(const ossimString& declassDate);
+   virtual void setDeclassificationExemption(const ossimString& exemption);
+   virtual void setDowngrade(const ossimString& downgrade);
+   virtual void setDowngradingDate(const ossimLocalTm& date);
+   virtual void setDowngradingDate(const ossimString& date);
+   virtual void setClassificationText(const ossimString& classificationText);
+   virtual void setClassificationAuthorityType(const ossimString& authorityType);
+   virtual void setClassificationAuthority(const ossimString& authorityType);
+   virtual void setClassificationReason(const ossimString& reason);
+   virtual void setSecuritySourceDate(const ossimLocalTm& date);
+   virtual void setSecuritySourceDate(const ossimString& date);
+   virtual void setSecurityControlNumber(const ossimString& number);
+   virtual void setFileBackgroundColor(ossim_uint8 r,
+                                       ossim_uint8 g,
+                                       ossim_uint8 b);
+   virtual void setOriginatorsName(const ossimString& name);
+   virtual void setOriginatorsPhone(const ossimString& phone);
+   
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+   /*!
+    * @brief Method to set fields from a keyword list.
+    *
+    * This is not a true loadState as it does not lookup/initialize all class
+    * members.  This was added to allow defaults, e.g OSTAID, to be set via a
+    * site configuration file.
+    * Code does not return false if a field(key) is not found..
+    *
+    * @return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+
+   /**
+    * Properties of a NITF 2.1 Header file. See MIL-STD-2500B for details.
+    *
+    * To access these, pass the constant to getProperty().
+    */
+   static const ossimString FSCLSY_KW;
+   static const ossimString FSDCTP_KW;
+   static const ossimString FSDCDT_KW;
+   static const ossimString FSDCXM_KW;
+   static const ossimString FSDG_KW;
+   static const ossimString FSDGDT_KW;
+   static const ossimString FSCLTX_KW;
+   static const ossimString FSCATP_KW;
+   static const ossimString FSCRSN_KW;
+   static const ossimString FSSRDT_KW;
+   static const ossimString FBKGC_KW;
+   
+   void clearFields();
+
+   void addTag(ossimNitfTagInformation tag, bool unique = true);
+   void removeTag(const ossimString& tagName);
+   bool takeOverflowTags(std::vector<ossimNitfTagInformation> &overflowTags,
+                         ossim_uint32 potentialDesIndex, bool userDefinedTags = false);
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix=std::string()) const;
+   
+private:
+   /**
+    * Sets the number of image records in the NITF 2.1 File Header.
+    *
+    * @param num
+    *        The number of image records for the entire NITF 2.1 file.
+    *
+    * @throw std::out_of_range
+    */
+   void setNumberOfImageInfoRecords(ossim_uint64 num);
+   void setNumberOfTextInfoRecords(ossim_uint64 num);
+   void setNumberOfGraphicInfoRecords(ossim_uint64 num);
+   void setNumberOfDataExtSegInfoRecords(ossim_uint64 num);
+
+   void readImageInfoRecords(std::istream &in);
+   void readGraphicInfoRecords(std::istream &in);
+   void readTextFileInfoRecords(std::istream &in);
+   void readDataExtSegInfoRecords(std::istream &in);
+   void readResExtSegInfoRecords(std::istream &in);
+
+   /**
+    * If the header was parsed this method will initialize the offsets
+    * to whare all data resides within the file.  Example:  NITF files
+    * have several sections (Image, Symbol, Labels, Text and Extended data) and
+    * each of these sections have subsections.  The offsets stored are just offsets
+    * from the start of the file to each major section and eqach subsection.
+    */
+   void initializeAllOffsets();
+   
+   /**
+    * If the header was parsed and the offsets have been initialized, this method will
+    * parse all overflow tags and put them into theTagList.
+    */
+   void readOverflowTags(std::istream& in);
+
+   // Note: these are work variables and not part of the
+   // Nitf header.  These variables will be used to quickly
+   // access various parts of the file.
+   /**
+    * This is not part of the NITF file header.  This will be
+    * computed since somethimes the header size will not be
+    * given in the header field.  This value will hold a count of
+    * all the bytes read for the header portion.  This can be used
+    * to skip past the header data.
+    */
+   ossim_uint32 theHeaderSize;
+
+   /**
+    * This will be pre-computed when the header file is opened.  This is
+    * computed after we have found the display order.  We will use the
+    * rectangle of the smallest display number.
+    */
+   ossimDrect theImageRect;
+   
+   /**
+    * This will hold pre-computed offsets to the start of all image headers
+    * and start to their data.
+    */
+   std::vector<ossimNitfImageOffsetInformation>  theImageOffsetList;
+   
+   std::vector<ossimNitfGraphicOffsetInformation> theGraphicOffsetList;
+   std::vector<ossimNitfTextOffsetInformation> theTextFileOffsetList;
+   std::vector<ossimNitfDataExtSegOffsetInformation> theDataExtSegOffsetList;
+   
+   // START Of header variables
+   /**
+    * Field: FSCLSY
+    * 
+    * Is a 2 byte field.  Required but can be blank:
+    *
+    */
+   char theSecurityClassificationSys[3];
+
+   /**
+    * Field: FSCODE
+    * 
+    * This is a 11 byte Alphanumeric field
+    */
+   char theCodewords[12]; 
+
+   /**
+    * Field: FSCTLH
+    * 
+    * This is a 2 byte Alphanumeric field.
+    */
+   char theControlAndHandling[3]; 
+
+   /**
+    * Field: FSREL
+    * 
+    * This is a 20 byte Alphanumeric field.
+    */
+   char theReleasingInstructions[21]; 
+
+   /**
+    * Field: FSDCTP
+    * 
+    * This is a 2 byte alphanumeric field.
+    * 
+    * DD    declassify on a specific date
+    * DE    declassify upon occurrence of an event
+    * GD    downgrade to a specified level on a specific date)
+    * GE    downgrade to a specified level upon occurrence of an event)
+    * O     OADR
+    * X     exempt from automatic declassification
+    *
+    * NOTE: If this field is all BCS spaces (0x20), it shall imply that no
+    *       file security declassification or
+    */ 
+   char theDeclassificationType[3];
+
+   /**
+    * Field: FSDCDT
+    * 
+    * This is a 8 byte field and has the form
+    * CCYYMMDD where:
+    *
+    * CC is the firs 2 chars of the year 00-99
+    * YY is the second 2 chars of the year 00-99
+    * MM is the month 01-12
+    * DD is the day 01-31
+    */
+   char theDeclassificationDate[9]; 
+
+   /**
+    * Field: FSDCXM
+    * 
+    * Is a 4 byte field
+    */
+   char theDeclassificationExemption[5];
+   
+   /**
+    * Field: FSDG
+    * 
+    * Can be blank.  Is a 1 byte field valid
+    * values are:
+    *
+    * S = secret
+    * C = Confidential
+    * R = Restricted
+    * 0x20 or BCS spaces.
+    *
+    * if spaces then security downgrading does not apply.
+    */
+   char theDowngrade[2];
+
+   /**
+    * Field: FSDGDT
+    * 
+    * Is an 8 byte field of the form
+    * CCYYMMDD.
+    */
+   char theDowngradingDate[9];
+
+   /**
+    * Field: FSCLTX
+    * 
+    * Is a 43 byte field and can contain BCS spaces (0x20).
+    */
+   char theClassificationText[44];
+
+   /**
+    * Field: FSCATP
+    *
+    * Values can be:
+    * 
+    * O  Original classification authority
+    * D  derivative from a single source
+    * M  derivative from multiple sources
+    * 
+    * Is a 1 byte field and can contain BCS spaces (0x20).
+    */
+   char theClassificationAuthorityType[2];
+
+   /**
+    * Field: FSCAUT
+    * 
+    * Is a 40 byte field and can contain BCS spaces (0x20).
+    */
+   char theClassificationAuthority[41];
+
+   /**
+    * Field: FSCRSN
+    * 
+    * Is a 1 byte field and can contain BCS spaces (0x20).
+    *
+    * Valid values are A-G
+    */
+   char theClassificationReason[2];
+
+   /**
+    * Field: FSSRDT
+    * 
+    * Is a 8 byte field of the form CCYYMMDD and can be
+    * BCS space (0x20).
+    */
+   char theSecuritySourceDate[9];
+
+   /**
+    * Field: FSCTLN
+    * 
+    * Is a 15 byte field and can be blank (0x20)
+    */
+   char theSecurityControlNumber[16];
+   
+   /**
+    * Field: FBKGC
+    * 
+    * Required.  Is a 3 byte field and is reuqired.  Note:  This
+    * field is binary and has range
+    *
+    *      (0x00-0xff, 0x00-0xff, 0x00-0xff)
+    *
+    * each byte can range from 0 to 255 binary
+    */
+   ossim_uint8 theFileBackgroundColor[3];
+   
+   /**
+    * Field: ONAME
+    * 
+    * This is a 24 byte Alphanumeric number
+    */
+   char theOriginatorsName[25];
+
+   /**
+    * Field: OPHONE
+    * 
+    * This is an 18 byte Alphanumeric value. 
+    */
+   char theOriginatorsPhone[19]; 
+
+   /**
+    * Field: FL
+    * 
+    * This is a required field.
+    *
+    * Is a 12 byte number of the form
+    * 000000000388-999999999998 indicates the
+    * file length and a value of 999999999999
+    * indicates that the file length was not
+    * available.
+    */
+   char theFileLength[13];
+
+   /**
+    * Field: HL
+    * 
+    * This is a reqired field.
+    *
+    * ranges from 000388-999999.
+    */
+   char theHeaderLength[7];
+
+   /**
+    * Field: NUMI
+    * 
+    * This is a 3 byte field that specifies the number
+    * of images in the file.  0-999
+    */
+   char theNumberOfImageInfoRecords[4];
+
+   /**
+    * This information is conditional on the number of image
+    * info records field.  If the filed is greater than 0 then
+    * the record information is read in up t the indicated number
+    */
+   std::vector<ossimNitfImageInfoRecordV2_1> theNitfImageInfoRecords;
+
+   /**
+    * Field: NUMS
+    * 
+    * This info is required and ranges from 000-999.
+    */
+   char theNumberOfGraphicInfoRecords[4];
+
+   /**
+    * This is an optional field and will depend on
+    * theNumberOfGraphicInfoRecords.  If 0 then does not exist.
+    */
+   std::vector<ossimNitfGraphicInfoRecordV2_1> theNitfGraphicInfoRecords;
+
+   /**
+    * Field: NUMX
+    * 
+    * Is a 3 byte field and is reserved for future use.
+    */
+   char theReservedForFutureUse1[4];
+   
+   /**
+    * Field: NUMT
+    * 
+    * This is a 3 byte numeric 0-999.
+    */
+   char theNumberOfTextFileInfoRecords[4];
+
+   /**
+    * This information is conditional on the number of text file
+    * info records field.  If the filed is greater than 0 then
+    * the record information is read in up t the indicated number
+    */
+   std::vector<ossimNitfTextFileInfoRecordV2_1> theNitfTextFileInfoRecords;
+
+   /**
+    * Field: NUMDES
+    * 
+    * This is a 3 byte numeric 0-999.
+    */
+   char theNumberOfDataExtSegInfoRecords[4];
+
+   /**
+    * This information is conditional on the number of 
+    * info records field.  If the filed is greater than 0 then
+    * the record information is read in up t the indicated number
+    */
+   std::vector<ossimNitfDataExtSegInfoRecordV2_1> theNitfDataExtSegInfoRecords;
+
+   /**
+    * Field: NUMRES
+    * 
+    * This is a 3 byte numeric 0-999. Reserved Extension Segments
+    */
+   char theNumberOfResExtSegInfoRecords[4];
+
+   /**
+    * This information is conditional on the number of Res Ext Seg
+    * info records field.  If the filed is greater than 0 then
+    * the record information is read in up t the indicated number
+    */
+   std::vector<ossimNitfResExtSegInfoRecordV2_1> theNitfResExtSegInfoRecords;
+
+   /**
+    * Field: UDHDL
+    * 
+    * This is a required field and is a 5 byte numeric ranging
+    * from 0-99999.  This is 0 if there is no data.  Valid values
+    * are 00000 or 00003-99999
+    */
+   char theUserDefinedHeaderDataLength[6];
+
+   /**
+    * Field: UDHOFL
+    * 
+    * This exists if theUserDefinedHeaderDataLength is not 0.
+    */
+   char theUserDefinedHeaderOverflow[4];
+
+   /**
+    * Field: XHDL
+    * 
+    * This is a required field.  It is 5 bytes long and
+    * ranges from 0-99999.  0 means there is no data
+    */
+   char theExtendedHeaderDataLength[6];
+
+   /**
+    * Field: XHDLOFL
+    * 
+    * This is conditional on theExtendedHeaderDataLength.  If
+    * that field is 0 then this does not exist.  This is a 3
+    * byte field.
+    */
+   char theExtendedHeaderDataOverflow[4];
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimNitfFileHeaderV2_X.h b/ossim/include/ossim/support_data/ossimNitfFileHeaderV2_X.h
new file mode 100644
index 0000000..22f5af3
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfFileHeaderV2_X.h
@@ -0,0 +1,255 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimNitfFileHeaderV2_X.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimNitfFileHeaderV2_X_HEADER
+#define ossimNitfFileHeaderV2_X_HEADER
+#include <ossim/base/ossimConstants.h>
+#include <ossim/support_data/ossimNitfFileHeader.h>
+
+class ossimKeywordlist;
+class ossimLocalTm;
+
+class OSSIM_DLL ossimNitfFileHeaderV2_X : public ossimNitfFileHeader
+{
+public:
+   ossimNitfFileHeaderV2_X();
+
+   static ossimString formatDate(const ossimString& version,
+                                 const ossimLocalTm& d);
+
+   virtual void setCodeWords(const ossimString& codeWords) = 0;
+   virtual void setControlAndHandling(const ossimString& controlAndHandling) = 0;
+   virtual void setReleasingInstructions(const ossimString& releasingInstructions) = 0;
+   virtual void setClassificationAuthority(const ossimString& classAuth) = 0;
+   virtual void setSecurityControlNumber(const ossimString& controlNo) = 0;
+   virtual void setOriginatorsName(const ossimString& originatorName) = 0;
+   virtual void setOriginatorsPhone(const ossimString& origniatorPhone) = 0;
+
+   virtual ossimString getCodeWords()const = 0;
+   virtual ossimString getControlAndHandling()const = 0;
+   virtual ossimString getReleasingInstructions()const = 0;
+   virtual ossimString getClassificationAuthority()const = 0;
+   virtual ossimString getSecurityControlNumber()const = 0;
+   virtual ossimString getOriginatorsName()const = 0;
+   virtual ossimString getOriginatorsPhone()const = 0;
+
+   virtual ossimString getSecurityClassification()const;
+   void setComplexityLevel(const ossimString& level);
+   void setSystemType(const ossimString& systemType);
+   void setOriginatingStationId(const ossimString& originationId);
+
+   /**
+    * @brief Sets field FDT.
+    *
+    * Version 2.0 format: DDHHMMSSZMONYY
+    * Version 2.1 format: CCYYMMDDhhmmss
+    *
+    * @param ossimLocalTm Local time.  Note that this will be converted to
+    * GMT(ZULU).
+    */
+   void setDate(const ossimLocalTm& d);
+
+   
+   /**
+    * @brief Sets field FDT.
+    *
+    * @param d Date string to copy to FDT field.
+    *
+    * @note No conversions performed. 
+    */
+   void setDate(const ossimString& d);
+
+   /**
+    * @brief Sets field FDT to current time converted to GMT(ZULU).
+    *
+    * Version 2.0 format: DDHHMMSSZMONYY
+    * Version 2.1 format: CCYYMMDDhhmmss
+    */
+   virtual void setDate();
+
+   void setTitle(const ossimString& title);
+   void setFileSecurityClassification(const ossimString& securityClassification);
+   void setCopyNumber(const ossimString& copyNumber);
+   void setNumberOfCopies(const ossimString& numberOfCopies);
+   void setEncryption(const ossimString& encryption);
+
+   ossimString getComplexityLevel()const;
+   ossimString getSystemType()const;
+   ossimString getOriginatingStationId()const;
+   ossimString getDate()const;
+   ossimString getTitle()const;
+   ossimString getCopyNumber()const;
+   ossimString getNumberOfCopies()const;
+   ossimString getEncryption()const;
+
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+   bool saveState(ossimKeywordlist& kwl, const ossimString& prefix="")const;
+
+   /*!
+    * @brief Method to set fields from a keyword list.
+    *
+    * This is not a true loadState as it does not lookup/initialize all class
+    * members.  This was added to allow defaults, e.g OSTAID, to be set via a
+    * site configuration file.
+    * Code does not return false if a field(key) is not found..
+    *
+    * @return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+   /**
+    * Properties of a NITF 2.x Header file. See MIL-STD-2500A or
+    * MIL-STD-2500B for details.
+    *
+    * To access these, pass the constant to getProperty().
+    */
+   static const ossimString FILE_TYPE_KW;
+   static const ossimString FHDR_KW;
+   static const ossimString VERSION_KW;
+   static const ossimString CLEVEL_KW;
+   static const ossimString STYPE_KW;
+   static const ossimString OSTAID_KW;
+   static const ossimString FDT_KW;
+   static const ossimString FTITLE_KW;
+   static const ossimString FSCLAS_KW;
+   static const ossimString FSCODE_KW;
+   static const ossimString FSCTLH_KW;
+   static const ossimString FSREL_KW;
+   static const ossimString FSCAUT_KW;
+   static const ossimString FSCTLN_KW;
+   static const ossimString FSCOP_KW;
+   static const ossimString FSCPYS_KW;
+   static const ossimString ENCRYP_KW;
+   static const ossimString ONAME_KW;
+   static const ossimString OPHONE_KW;
+
+protected:
+
+   /**
+    * Field: FHDR
+    * Required field for NITF and is a 9 byte value
+    *
+    * format is NITFNN.NN where NN.NN is the version
+    * number. The valid version number for this class
+    * is NITF02.10.
+    *
+    * NOTE: This field may contain NSIF01.00 which is also the same as NITF02.10
+    * 
+    */
+   char  theFileTypeVersion[10]; // nine bytes
+
+   /**
+    * Field: CLEVEL
+    * 
+    * Required field. 2 byte field ranges from 01-99
+    */
+   char  theComplexityLevel[3];  // 2 bytes
+
+   /**
+    * Field: STYPE
+    * 
+    * Required field. 4 bytes
+    */
+   char  theSystemType[5];      // four bytes
+
+   /**
+    * Field: OSTAID
+    * 
+    * Is required 10 byte field and can't be blank
+    * 
+    */
+   char  theOriginatingStationId[11]; // ten bytes
+
+   /**
+    * Field: FDT
+    * 
+    * for NITF 2.1 format we have
+    *
+    * Has the form CCYYMMDDhhmmss and is a required field
+    *
+    * where CC is the first two digits of the year 00-99
+    *       YY is the last 2 digits of the year 00-99
+    *       MM is the month 01-12
+    *       DD is the day 01-31
+    *       hh is the hour 00-23
+    *       mm is the minutes 00-59
+    *       ss is the seconds 00-59
+    *
+    * For NITF 2.0 format we have
+    *
+    * DDHHMMSSZMONYY
+    *
+    * where  DD is the day
+    *        HH is the hour
+    *        MM is the minutes
+    *        SS is the seconds
+    *        MON is the first 3 characters of the month
+    *        YY is the 2 digit year
+    */
+   char  theDateTime[15];  // 14 bytes
+
+   /**
+    * Field: FTITLE
+    * 
+    * Is a required field and is an 80 byte
+    * Alphanumeric value this can be all BCS spaces.
+    */
+   char  theFileTitle[81]; // 80 bytes
+
+   /**
+    * Field: FSCLAS
+    * 
+    * This is a reqired field and is 1 byte long and
+    * can contain one of the following:
+    *
+    *  T      Top secret
+    *  S      Secret
+    *  C      Confidential
+    *  R      Restricted
+    *  U      Unclassified
+    */
+   char theSecurityClassification[2];
+
+   /**
+    * Field: FSCOP
+    * 
+    * This is the copy number and is a 5 byte
+    * numeric of the form 00000-99999.  This field
+    * is required.
+    */
+   char theCopyNumber[6];
+
+   /**
+    * Field: FSCOPYS
+    * 
+    * This is the total number of copies that exist.
+    * This is a 5 byte numeric of the form 00000-99999.  This
+    * field is required.
+    */
+   char theNumberOfCopies[6];
+
+   /**
+    * Field: ENCRYP
+    * 
+    * This is a reqired field and is a 1 byte numeric
+    * where 0 is not encrypted and 1 is encrypted.  This field
+    * is reuqired.
+    */
+   char theEncryption[2];
+
+TYPE_DATA
+};
+
+#endif
+
+
diff --git a/ossim/include/ossim/support_data/ossimNitfGeoPositioningTag.h b/ossim/include/ossim/support_data/ossimNitfGeoPositioningTag.h
new file mode 100644
index 0000000..6bd3141
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfGeoPositioningTag.h
@@ -0,0 +1,230 @@
+//********************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author:      Garrett Potts
+// 
+// Description: Nitf support class
+//
+// Documentation reference:
+// DIGEST Part 2 Annex D - Appendix 1, Table D1-3
+// 
+//********************************************************************
+// $Id: ossimNitfGeoPositioningTag.h 23664 2015-12-14 14:17:27Z dburken $
+//
+#ifndef ossimNitfGeoPositioningTag_HEADER
+#define ossimNitfGeoPositioningTag_HEADER 1
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+
+class OSSIM_DLL ossimNitfGeoPositioningTag : public ossimNitfRegisteredTag
+{
+public:
+   ossimNitfGeoPositioningTag();
+   virtual ~ossimNitfGeoPositioningTag();
+
+   virtual void parseStream(std::istream& in);
+   virtual void writeStream(std::ostream& out);
+
+   virtual void clearFields();
+
+   /**
+    * @brief Print method that outputs a key/value type format
+    * adding prefix to keys.
+    * @param out Stream to output to.
+    * @param prefix Prefix added to key like "image0.";
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix=std::string()) const;
+   
+protected:
+   /**
+    * FIELD: TYP
+    *
+    * required 3 byte field.
+    * 
+    * Coordinate System Type
+    *
+    * This field shall contain the type of coordinate system to which the Image
+    * Segment refers.  Valid values are GEO for a geographic coordinate
+    * system (longitude & latitude), MAP for a cartographic (grid)
+    * coordinate system (easting & northing) and DIG for a geographic or
+    * cartographic coordinate system registered through location grids or
+    * registration points.
+    * See clause D1.2.2 for details.
+    * The default value is MAP.
+    *
+    *
+    * Values: MAP, GEO or DIG 
+    */
+   char theType[4];
+
+   /**
+    * FIELD: UNI
+    *
+    * required 3 byte field.
+    *
+    * Coordinate Units This field shall contain the units of measure to which
+    * the Image Segment refers.  Valid values are SEC (Decimal seconds of arc),
+    * DEG (Decimal degrees) and M (Metres).  The value must be consistent with
+    * the coordinate system type.  SEC and DEG are not allowed when the
+    * coordinate system type is MAP.  M is not allowed when the coordinate system
+    * type is GEO.  The PRJPS extension is expected when the value is M.
+    * The default value is M.
+    */
+   char theCoordinateUnits[4];
+
+
+   /**
+    * FIELD: DAG
+    * 
+    * required 80 byte field.
+    * 
+    * Geodetic Datum Name
+    *
+    * This field shall contain the name of the geodetic datum to which the
+    * Image Segment refers.
+    * The default value is World Geodetic System 1984.
+    * 
+    */
+   char theGeodeticDatumName[81];
+
+   /**
+    * FIELD: DCD
+    *
+    * required 4 byte field.
+    * 
+    * Geodetic Datum Code This field shall contain the code of the geodetic
+    * datum to which the Image Segment refers. The default value is WGE.
+    * 
+    */
+   char theGeodeticDatumCode[5];
+
+   /**
+    * FIELD: ELL
+    *
+    * required 80 byte field.
+    *
+    * Ellipsoid Name
+    *
+    * This field shall contain the name of the ellipsoid to which the
+    * Image Segment refers. The default value is World Geodetic System 1984.
+    * 
+    */
+   char theEllipsoidName[81];
+
+   /**
+    * FIELD: ELC
+    *
+    * required 3 byte field.
+    *
+    * Ellipsoid Code This field shall contain the code of the ellipsoid to
+    * which the Image Segment refers.
+    * The default value is WE.
+    * 
+    */
+   char theEllipsoidCode[4];
+
+   /**
+    * FIELD: DVR
+    *
+    * required 80 byte field.
+    *
+    * Vertical Datum Reference This field shall contain the name of the vertical
+    * datum reference to which the Image Segment refers, or BCS Spaces if no elevation value
+    * appears in the Image Segment. The default name is Geodetic. 
+    */
+   char theVerticalDatumReference[81];
+
+   /**
+    * FIELD: VDCDVR
+    *
+    * required 4 byte field.
+    * 
+    * Code (Category) of Vertical Reference This field shall contain the code
+    * (or category) of the vertical reference to which the Image Segment
+    * refers, or BCS Spaces if no elevation value appears in the Image Segment.
+    * The default code is GEOD.
+    * 
+    */
+   char theVerticalReferenceCode[5];
+
+   /**
+    * FIELD: SDA
+    *
+    * required 80 byte field.
+    * 
+    * Sounding Datum Name This field shall contain the name of the sounding datum
+    * to which the Image Segment refers, or BCS Spaces i
+    * f no sounding appears in the Image Segment.
+    * The default value is Mean Sea.
+    */
+   char theSoundingDatumName[81];
+
+   /**
+    * FIELD: VDCSDA
+    *
+    * required 4 byte field.
+    * 
+    * Code for  Sounding Datum This field shall contain the code of the
+    * sounding datum to which the Image Segment refers, or BCS Spaces
+    * if no sounding appears in the Image Segment.
+    * The default valid code is MSL. 4BCS-A See Part 3-6 <R> 
+    */
+   char theSoundingDatumCode[5];
+
+   /**
+    * FIELD ZOR
+    *
+    * required 15 byte field
+    *
+    * Z values False Origin
+    *
+    * This field shall contain the elevation and depth false origin for Z values
+    * to which the Image Segment refers. The default value is 000000000000000,
+    * which implies that there is no projection false Z origin. 15 BCS-N positive integer
+    * 
+    */
+   char theZFalseOrigin[16];
+
+   /**
+    * FIELD: GRD
+    *
+    * required 3 byte field.
+    * 
+    * Grid Code This field shall contain the identification code of the grid system
+    * to which the Image Segment refers, or BCS Spaces. The default value is
+    * BCS Spaces. 3BCS-A See Part 3-6 <R> 
+    */
+   char theGridCode[4];
+
+   /**
+    * FIELD: GRN
+    *
+    * required 80 byte field.
+    *
+    * Grid Description If the GRD Field value is not BCS Spaces, this field can
+    * contain a text description of the grid system.
+    * The default value is BCS Spaces. 80 BCS-A <R> 
+    */
+   char theGridDescription[81];
+
+   /**
+    * FIELD: ZNA
+    *
+    * required 4 byte field.
+    *
+    * Grid Zone number This field shall contain the zone number when the GRD
+    * Field contains a significant grid code and the corresponding grid system
+    * comprises more than one zone. Defaulted to 0000 otherwise.
+    * 4 BCS-N integer See Part 3-6 R 
+    */
+   char theGridZoneNumber[5];
+
+   
+TYPE_DATA   
+};
+
+#endif
+
diff --git a/include/ossim/support_data/ossimNitfHistoaTag.h b/ossim/include/ossim/support_data/ossimNitfHistoaTag.h
similarity index 100%
rename from include/ossim/support_data/ossimNitfHistoaTag.h
rename to ossim/include/ossim/support_data/ossimNitfHistoaTag.h
diff --git a/include/ossim/support_data/ossimNitfIchipbTag.h b/ossim/include/ossim/support_data/ossimNitfIchipbTag.h
similarity index 100%
rename from include/ossim/support_data/ossimNitfIchipbTag.h
rename to ossim/include/ossim/support_data/ossimNitfIchipbTag.h
diff --git a/ossim/include/ossim/support_data/ossimNitfImageBand.h b/ossim/include/ossim/support_data/ossimNitfImageBand.h
new file mode 100644
index 0000000..1d7e177
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfImageBand.h
@@ -0,0 +1,51 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfImageBand.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimNitfImageBand_HEADER
+#define ossimNitfImageBand_HEADER 1
+#include <iosfwd>
+#include <string>
+#include <ossim/support_data/ossimNitfImageLut.h>
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimRefPtr.h>
+
+class ossimNitfImageBand : public ossimObject
+{
+public:
+   ossimNitfImageBand();
+   virtual ~ossimNitfImageBand();
+   virtual void parseStream(std::istream& in)=0;
+   virtual void writeStream(std::ostream& out)=0;
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out Stream to output to.
+    * @param prefix Like "image0."
+    * @param band zero based band.
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix,
+                               ossim_uint32 band)const=0;
+
+   virtual ossim_uint32 getNumberOfLuts()const=0;
+   virtual const ossimRefPtr<ossimNitfImageLut> getLut(ossim_uint32 idx)const=0;
+   virtual ossimRefPtr<ossimNitfImageLut> getLut(ossim_uint32 idx)=0;
+
+   /** @return The band representation as an ossimString. */
+   virtual ossimString getBandRepresentation() const = 0;
+
+TYPE_DATA;
+};
+
+#endif /* #ifndef ossimNitfImageBand_HEADER */
+
diff --git a/ossim/include/ossim/support_data/ossimNitfImageBandV2_0.h b/ossim/include/ossim/support_data/ossimNitfImageBandV2_0.h
new file mode 100644
index 0000000..a374ffa
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfImageBandV2_0.h
@@ -0,0 +1,113 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfImageBandV2_0.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimNitfImageBandV2_0_HEADER
+#define ossimNitfImageBandV2_0_HEADER
+
+#include <string>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/support_data/ossimNitfImageBand.h>
+#include <ossim/support_data/ossimNitfImageLutV2_0.h>
+
+class OSSIM_DLL ossimNitfImageBandV2_0 : public ossimNitfImageBand
+{
+public:
+   
+   /** default constructor */
+   ossimNitfImageBandV2_0();
+
+   /** virtual destructory */
+   virtual ~ossimNitfImageBandV2_0();
+   
+   virtual void parseStream(std::istream& in);
+   virtual void writeStream(std::ostream& out);
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out Stream to output to.
+    * @param prefix Like "image0."
+    * @param band zero based band.
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix=std::string(),
+                               ossim_uint32 band=0) const;   
+   
+   virtual ossim_uint32 getNumberOfLuts()const;
+   virtual const ossimRefPtr<ossimNitfImageLut> getLut(ossim_uint32 idx)const;
+   virtual ossimRefPtr<ossimNitfImageLut> getLut(ossim_uint32 idx);
+
+   /** @return The band representation as an ossimString. */
+   virtual ossimString getBandRepresentation()const;
+
+   /**
+    * Sets the band representation.
+    *
+    * @param rep The band representation.
+    */
+   virtual void setBandRepresentation(const ossimString& rep);
+
+   /** @return The band significance as an ossimString. */
+   virtual ossimString getBandSignificance()const;
+
+   /**
+    * Sets the band significance.
+    *
+    * @param rep The band significance.
+    */
+   virtual void setBandSignificance(const ossimString& rep);
+
+protected:
+   void clearFields();
+   void printLookupTables(std::ostream& out)const;
+   /*!
+    * FIELD: IREPBAND,,
+    * Is a required 2 byte field.  When theNumberOfBands is
+    * 1 this field will contain all spaces.
+    */
+   char theBandRepresentation[3];
+
+   /*!
+    * FIELD:  ISUBCATnn
+    * Is a required 6 byte field.
+    */
+   char theBandSignificance[7];
+
+   /*!
+    * FIELD:  IFCnn
+    * Is an required 1 byte field.  Will be N
+    */
+   char theBandImageFilterCondition[2];
+
+   /*!
+    * FIELD:  IMFLTnn
+    * is a required 3 byte field.  This is a reserved field
+    */
+   char theBandStandardImageFilterCode[4];
+
+   /*!
+    * FIELD:  NLUTSnn
+    * This is a required 1 byte field.  Has value 0-4
+    */
+   char theBandNumberOfLuts[2];
+
+   /*!
+    * NELUTnn
+    * This is a conditional field.
+    */
+   char theBandNumberOfLutEntries[6];
+
+   std::vector<ossimRefPtr<ossimNitfImageLut> > theLookupTables;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimNitfImageBandV2_1.h b/ossim/include/ossim/support_data/ossimNitfImageBandV2_1.h
new file mode 100644
index 0000000..eaa5792
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfImageBandV2_1.h
@@ -0,0 +1,27 @@
+//*******************************************************************
+//
+// LICENSE: MIT see top level directory for more details
+//
+// Author:  David Burken <dburken at imagelinks.com>
+//
+//********************************************************************
+// $Id: ossimNitfImageBandV2_1.h 23666 2015-12-14 20:01:22Z rashadkm $
+
+#ifndef ossimNitfImageBandV2_1_HEADER
+#define ossimNitfImageBandV2_1_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/support_data/ossimNitfImageBandV2_0.h>
+
+class OSSIM_DLL ossimNitfImageBandV2_1 : public ossimNitfImageBandV2_0
+{
+public:
+
+   /** default constructor */
+   ossimNitfImageBandV2_1();
+
+   /** virtual destructory */
+   virtual ~ossimNitfImageBandV2_1();
+};
+
+#endif
diff --git a/ossim/include/ossim/support_data/ossimNitfImageDataMaskV2_1.h b/ossim/include/ossim/support_data/ossimNitfImageDataMaskV2_1.h
new file mode 100644
index 0000000..7589355
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfImageDataMaskV2_1.h
@@ -0,0 +1,37 @@
+//*******************************************************************
+// Copyright (C) 2007 Ball Aerspace & Technologies Corp 
+//
+// LICENSE: See top level LICENSE.txt file.
+// 
+// Author: Lucas Eckels
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: $
+
+#ifndef ossimNitfImageDataMaskV2_1_HEADER
+#define ossimNitfImageDataMaskV2_1_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <vector>
+#include <ostream>
+
+class OSSIMDLLEXPORT ossimNitfImageDataMaskV2_1
+{
+public:
+   ossimNitfImageDataMaskV2_1();
+
+   void setBlockCount(ossim_uint32 blockCount);
+   void setBlockLengthInBytes(ossim_uint32 blockLength);
+
+   void setIncludeBlock(ossim_uint32 blockNumber, bool included);
+   
+   void writeStream(std::ostream &out);
+
+private:
+   std::vector<bool> theIncludedBlocks;
+   ossim_uint32 theBlockLength;
+};
+
+#endif
\ No newline at end of file
diff --git a/ossim/include/ossim/support_data/ossimNitfImageHeader.h b/ossim/include/ossim/support_data/ossimNitfImageHeader.h
new file mode 100644
index 0000000..a34e8ac
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfImageHeader.h
@@ -0,0 +1,181 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfImageHeader.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimNitfImageHeader_HEADER
+#define ossimNitfImageHeader_HEADER
+
+#include <vector>
+
+#include <ossim/base/ossimNBandLutDataObject.h>
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimPropertyInterface.h>
+#include <ossim/support_data/ossimNitfTagInformation.h>
+#include <ossim/support_data/ossimNitfCompressionHeader.h>
+#include <ossim/support_data/ossimNitfImageBand.h>
+
+class ossimString;
+class ossimDpt;
+class ossimIpt;
+class ossimIrect;
+
+class OSSIMDLLEXPORT ossimNitfImageHeader : public ossimObject,
+                                            public ossimPropertyInterface
+{
+public:
+   ossimNitfImageHeader();
+   virtual ~ossimNitfImageHeader();
+
+   virtual bool getTagInformation(ossimNitfTagInformation& tagInfo,
+                                  ossim_uint32 idx) const;
+   
+   virtual bool getTagInformation(ossimNitfTagInformation& tagInfo,
+                                  const ossimString& tagName) const;
+
+   ossimRefPtr<ossimNitfRegisteredTag> getTagData(const ossimString& tagName);
+   
+   const ossimRefPtr<ossimNitfRegisteredTag> getTagData(
+      const ossimString& tagName) const;
+   
+   virtual ossim_uint32 getNumberOfTags()const;
+
+   virtual void addTag(const ossimNitfTagInformation& tag, bool unique=true);
+   virtual void removeTag(const ossimString& tagName);
+   
+   virtual void parseStream(std::istream &in)= 0;
+   virtual void writeStream(std::ostream &out)= 0;
+
+   virtual bool isCompressed()const=0;
+   virtual bool isEncrypted()const=0;
+
+   virtual ossimString getCompressionCode()const=0;
+   virtual ossimString getCompressionRateCode()const=0;
+   virtual ossim_uint32 getDisplayLevel()const=0;
+   virtual ossim_uint32 getAttachmentLevel()const=0;
+   
+   virtual ossim_int32 getNumberOfRows()const=0;
+   virtual ossim_int32 getNumberOfBands()const=0;
+   virtual ossim_int32 getNumberOfCols()const=0;
+   virtual ossim_int32 getNumberOfBlocksPerRow()const=0;
+   virtual ossim_int32 getNumberOfBlocksPerCol()const=0;
+   virtual ossim_int32 getNumberOfPixelsPerBlockHoriz()const=0;
+   virtual ossim_int32 getNumberOfPixelsPerBlockVert()const=0;
+   virtual ossimString getImageId()const=0;
+   virtual ossimString getTitle()const=0;
+   virtual ossim_int32 getActualBitsPerPixelPerBand()const=0;
+   virtual ossim_int32 getBitsPerPixelPerBand()const=0;
+   virtual ossimIrect  getImageRect()const=0;
+   /**
+    * Blocks might not be the same size as the significant rows and cols used
+    * by the getImageRect.
+    */
+   virtual ossimIrect   getBlockImageRect()const=0;
+   virtual ossimString  getIMode()const=0;
+   virtual ossim_uint64 getDataLocation()const=0;
+
+   /** @return The IDATIM field unparsed. */
+   virtual ossimString  getImageDateAndTime() const=0;
+   
+   virtual ossimString  getAcquisitionDateMonthDayYear(ossim_uint8 separationChar='-')const=0;
+   virtual ossimString  getSecurityClassification()const=0;
+   virtual ossimString  getCategory()const=0;
+   virtual ossimString  getImageSource()const=0;
+   virtual ossimString  getRepresentation()const=0;
+   virtual ossimString  getCoordinateSystem()const=0;
+   virtual ossimString  getGeographicLocation()const=0;
+   virtual ossimString  getPixelValueType()const=0;
+
+   /** @return IMAG field */
+   virtual ossimString  getImageMagnification()const=0;
+
+   /**
+    * @brief Gets the ILOC field as an ossimIpt.
+    * @param loc Initialized with the field.
+    * @note: Do not confuse with "data location".
+    */
+   virtual void getImageLocation(ossimIpt& loc)const=0;
+
+   /**
+    * @brief Convenience method to get the decimation factor as a double from
+    * the string returned be the getImageMagnification() method.
+    *
+    * @param result Initialized with the decimation factor as a double.
+    * Will return an ossim::nan() if something bad happens like the string is
+    * empty so callers should check result with ossim::isnan(result).
+    */
+   virtual void getDecimationFactor(ossim_float64& result) const;
+   
+   virtual bool hasBlockMaskRecords()const=0;
+   virtual bool hasPadPixelMaskRecords()const=0;
+   virtual bool hasTransparentCode()const=0;
+   virtual ossim_uint32 getTransparentCode()const=0;
+   virtual ossim_uint32 getBlockMaskRecordOffset(ossim_uint32 blockNumber,
+                                                 ossim_uint32 bandNumber)const=0;
+   
+   virtual ossim_uint32 getPadPixelMaskRecordOffset(ossim_uint32 blockNumber,
+                                                    ossim_uint32 bandNumber)const=0;
+   virtual const ossimRefPtr<ossimNitfCompressionHeader> getCompressionHeader()const=0;
+   virtual const ossimRefPtr<ossimNitfImageBand> getBandInformation(ossim_uint32 idx)const=0;
+   bool hasLut()const;
+   ossimRefPtr<ossimNBandLutDataObject> createLut(ossim_uint32 bandIdx)const;
+   virtual bool isSameAs(const ossimNitfImageHeader* hdr) const;
+   
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+   virtual ossim_uint32 getTotalTagLength()const;
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    */
+   virtual std::ostream& printTags(
+      std::ostream& out, const std::string& prefix=std::string()) const;
+   
+   /**
+    * @brief Populates keyword list with metadata.
+    * expample:  country_code: US
+    * 
+    * @param kwl Keywordlist to populate with metadata.
+    *
+    * @param prefix Optional prefix to put in front of key, like: "image1.".
+    */
+   virtual void getMetadata(ossimKeywordlist& kwl,
+                            const char* prefix=0) const;
+
+   /**
+    * @brief pure virtual print method that outputs a key/value type format
+    * adding prefix to keys.
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix) const = 0;
+
+   virtual bool saveState(ossimKeywordlist& kwl, const ossimString& prefix="")const;
+protected:
+
+   /**
+    * Method to check tie point to see if it will be truncated in field
+    * IGEOLO which has only arc second resolution.
+    * 
+    * Spits out warning if tie does not evenly divide by an arc second.
+    *
+    * @param tie Tie point to check.
+    */
+   void checkForGeographicTiePointTruncation(const ossimDpt& tie) const;
+   
+   std::vector<ossimNitfTagInformation> theTagList;
+
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimNitfImageHeaderV2_0.h b/ossim/include/ossim/support_data/ossimNitfImageHeaderV2_0.h
new file mode 100644
index 0000000..82d184b
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfImageHeaderV2_0.h
@@ -0,0 +1,165 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfImageHeaderV2_0.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimNitfImageHeaderV2_0_HEADER
+#define ossimNitfImageHeaderV2_0_HEADER
+#include <ossim/support_data/ossimNitfImageHeaderV2_X.h>
+#include <ossim/support_data/ossimNitfImageBandV2_0.h>
+#include <iterator>
+
+class OSSIMDLLEXPORT ossimNitfImageHeaderV2_0 : public ossimNitfImageHeaderV2_X
+{
+public:
+   ossimNitfImageHeaderV2_0();
+   virtual ~ossimNitfImageHeaderV2_0();
+
+   virtual void parseStream(std::istream &in);
+   virtual void writeStream(std::ostream &out);
+   
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix=std::string()) const;
+   
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   
+   virtual bool        isCompressed()const;
+   virtual bool        isEncrypted()const;
+
+   virtual ossim_int32  getNumberOfBands()const;
+   virtual ossim_int32  getNumberOfRows()const;
+   virtual ossim_int32  getNumberOfCols()const;
+   virtual ossim_int32  getNumberOfBlocksPerRow()const;
+   virtual ossim_int32  getNumberOfBlocksPerCol()const;
+   virtual ossim_int32  getNumberOfPixelsPerBlockHoriz()const;
+   virtual ossim_int32  getNumberOfPixelsPerBlockVert()const;
+   virtual ossimString  getImageId()const;
+   virtual ossim_int32  getBitsPerPixelPerBand()const;
+   virtual ossim_int32  getActualBitsPerPixelPerBand()const;
+   virtual ossimString  getIMode()const;
+   virtual ossimString  getSecurityClassification()const;
+
+   /** @return The IDATIM field unparsed. */
+   virtual ossimString  getImageDateAndTime() const;
+   virtual ossimString  getAcquisitionDateMonthDayYear(
+      ossim_uint8 separationChar='-')const;
+   virtual ossimString  getCategory()const;
+   virtual ossimString  getImageSource()const;
+   virtual ossimString  getRepresentation()const;
+   virtual ossimString  getCoordinateSystem()const;
+
+   virtual ossimString  getPixelValueType()const;
+   virtual bool         hasBlockMaskRecords()const;
+   virtual bool         hasPadPixelMaskRecords()const;
+   virtual bool         hasTransparentCode()const;
+   virtual ossim_uint32 getTransparentCode()const;
+   virtual ossim_uint32 getBlockMaskRecordOffset(ossim_uint32 blockNumber,
+                                                 ossim_uint32 bandNumber)const;
+   virtual ossim_uint32 getPadPixelMaskRecordOffset(ossim_uint32 blockNumber,
+                                                    ossim_uint32 bandNumber)const;
+   
+   virtual const ossimRefPtr<ossimNitfCompressionHeader> getCompressionHeader()const;
+   virtual const ossimRefPtr<ossimNitfImageBand> getBandInformation(ossim_uint32 idx)const;
+
+   virtual void setNumberOfBands(ossim_uint32 nbands);
+   virtual void setBandInfo(ossim_uint32 idx,
+                            const ossimNitfImageBandV2_0& info);
+   virtual void setNumberOfRows(ossim_uint32 rows);
+   virtual void setNumberOfCols(ossim_uint32 cols);
+   virtual bool saveState(ossimKeywordlist& kwl, const ossimString& prefix="")const;
+   
+   static const ossimString ISCODE_KW;
+   static const ossimString ISCTLH_KW;
+   static const ossimString ISREL_KW;
+   static const ossimString ISCAUT_KW;
+   static const ossimString CTLN_KW;
+   static const ossimString ISDWNG_KW;
+   static const ossimString ISDEVT_KW;
+   
+TYPE_DATA
+private:
+   //
+   
+   void clearFields();
+
+   /*!
+    * FIELD ISCODE:
+    * is a 40 byte field
+    */
+   char theCodewords[41];
+
+   /*!
+    * FIELD ISCTLH:
+    * is a 40 byte field
+    */
+   char theControlAndHandling[41];
+
+   /*!
+    * FIELD ISREL:
+    * Is a 40 byte field.
+    */
+   char theReleasingInstructions[41];
+
+   /*!
+    * FIELD ISCAUT:
+    * Is a 20 byte field
+    */
+   char theClassificationAuthority[21];
+
+   /*!
+    * FIELD CTLN:
+    */
+   char theSecurityControlNumber[21];
+
+   /*!
+    * FIELD ISDWNG:
+    * Is a 6 byte field with form:
+    *
+    *  YYMMDD.  Year month day
+    *
+    * 999999 indicates that he Originating
+    *        agencies determination is required
+    *        (OADR)
+    * 999998 downgrade event will specify at what
+    *        point and time the declassification
+    *        or downgrading is to take place.
+    */
+   char theSecurityDowngrade[7];
+
+   /*!
+    * FIELD ISDEVT:
+    * This is a conditional field and is present
+    * if the Security downgrade is 999998.
+    */
+   char theDowngradingEvent[41];
+
+   /**
+    * Will contain also the field NBANDS and we will have to recreate the prefix for
+    * 
+    * Container for repetitive fields:
+    * IREPBAND
+    * ISUBCAT
+    * IFC
+    * IMFLT
+    * NLUTS
+    * NELUT1
+    * LUTD
+    */ 
+   std::vector<ossimRefPtr<ossimNitfImageBandV2_0> > theImageBands;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimNitfImageHeaderV2_1.h b/ossim/include/ossim/support_data/ossimNitfImageHeaderV2_1.h
new file mode 100644
index 0000000..5cbd155
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfImageHeaderV2_1.h
@@ -0,0 +1,428 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// LICENSE: See top level LICENSE.txt file.
+// 
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfImageHeaderV2_1.h 23072 2015-01-12 15:34:18Z dburken $
+
+#ifndef ossimNitfImageHeaderV2_1_HEADER
+#define ossimNitfImageHeaderV2_1_HEADER
+
+#include <stdexcept>
+
+#include <ossim/support_data/ossimNitfImageHeaderV2_X.h>
+#include <ossim/support_data/ossimNitfImageBandV2_1.h>
+
+class ossimNitfFileHeaderV2_1;
+class OSSIMDLLEXPORT ossimNitfImageHeaderV2_1 : public ossimNitfImageHeaderV2_X
+{
+public:
+   ossimNitfImageHeaderV2_1();
+   virtual ~ossimNitfImageHeaderV2_1();
+
+   virtual void parseStream(std::istream &in, const ossimNitfFileHeaderV2_1 *file);
+   virtual void parseStream(std::istream &in);
+   virtual void writeStream(std::ostream &out);
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix) const;
+   
+   virtual ossimIrect  getImageRect()const;   
+   virtual ossimIrect  getBlockImageRect()const;   
+   virtual bool        isCompressed()const;
+   virtual bool        isEncrypted()const;
+
+   virtual ossim_int32 getNumberOfBands()const;
+   virtual ossim_int32 getNumberOfRows()const;
+   virtual ossim_int32 getNumberOfCols()const;
+   virtual ossim_int32 getNumberOfBlocksPerRow()const;
+   virtual ossim_int32 getNumberOfBlocksPerCol()const;
+   virtual ossim_int32 getNumberOfPixelsPerBlockHoriz()const;
+   virtual ossim_int32 getNumberOfPixelsPerBlockVert()const;
+   virtual ossimString getImageId()const;
+   virtual ossim_int32 getBitsPerPixelPerBand()const;
+   virtual ossim_int32 getActualBitsPerPixelPerBand()const;
+   virtual ossimString getIMode()const;
+
+   /** @return The IDATIM field unparsed. */
+   virtual ossimString  getImageDateAndTime() const;
+   
+   virtual ossimString getAcquisitionDateMonthDayYear(ossim_uint8 separationChar='-')const;
+   virtual ossimString getSecurityClassification()const;
+   virtual ossimString getCategory()const;
+   virtual ossimString getRepresentation()const;
+   virtual ossimString getCoordinateSystem()const;
+   virtual ossimString getGeographicLocation()const;
+   virtual ossimString getPixelValueType()const;
+
+  virtual bool takeOverflowTags(std::vector<ossimNitfTagInformation> &overflowTags,
+      ossim_uint32 potentialDesIndex, bool userDefinedTags = false);
+
+   virtual bool hasBlockMaskRecords()const;
+   virtual bool hasPadPixelMaskRecords()const;
+   virtual bool hasTransparentCode()const;
+   virtual ossim_uint32 getTransparentCode()const;
+   virtual ossim_uint32 getBlockMaskRecordOffset(ossim_uint32 blockNumber,
+                                                 ossim_uint32 bandNumber)const;
+   virtual ossim_uint32 getPadPixelMaskRecordOffset(ossim_uint32 blockNumber,
+                                                    ossim_uint32 bandNumber)const;
+   
+   virtual void setNumberOfBands(ossim_uint32 nbands);
+   virtual void setBandInfo(ossim_uint32 idx,
+                            const ossimNitfImageBandV2_1& info);
+   
+   virtual void setNumberOfRows(ossim_uint32 rows);
+   virtual void setNumberOfCols(ossim_uint32 cols);
+
+   virtual void setGeographicLocationDms(const ossimDpt& ul,
+                                         const ossimDpt& ur,
+                                         const ossimDpt& lr,
+                                         const ossimDpt& ll);
+   
+   virtual void setGeographicLocationDecimalDegrees(const ossimDpt& ul,
+                                                    const ossimDpt& ur,
+                                                    const ossimDpt& lr,
+                                                    const ossimDpt& ll);
+   virtual void setUtmNorth(ossim_uint32 zone,
+                            const ossimDpt& ul,
+                            const ossimDpt& ur,
+                            const ossimDpt& lr,
+                            const ossimDpt& ll);
+   virtual void setUtmSouth(ossim_uint32 zone,
+                            const ossimDpt& ul,
+                            const ossimDpt& ur,
+                            const ossimDpt& lr,
+                            const ossimDpt& ll);
+
+   virtual void setSecurityClassificationSystem(const ossimString& value);
+   virtual void setCodewords(const ossimString& value);
+   virtual void setControlAndHandling(const ossimString& value);
+   virtual void setReleasingInstructions(const ossimString& value);
+   virtual void setDeclassificationType(const ossimString& value);
+   virtual void setDeclassificationDate(const ossimString& value);
+   virtual void setDeclassificationExempt(const ossimString& value);
+   virtual void setDowngrade(const ossimString& value);
+   virtual void setDowngradeDate(const ossimString& value);
+   virtual void setClassificationText(const ossimString& value);
+   virtual void setClassificationAuthorityType(const ossimString& value);
+   virtual void setClassificationAuthority(const ossimString& value);
+   virtual void setClassificationReason(const ossimString& value);
+   virtual void setSecuritySourceDate(const ossimString& value);
+   virtual void setSecurityControlNumber(const ossimString& value);
+   virtual void setImageMagnification(const ossimString& value);
+   
+   virtual ossimString getImageSource()const; 
+   
+   virtual const ossimRefPtr<ossimNitfCompressionHeader> getCompressionHeader()const;
+   virtual const ossimRefPtr<ossimNitfImageBand> getBandInformation(ossim_uint32 idx)const;
+   
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+   virtual bool saveState(ossimKeywordlist& kwl, const ossimString& prefix="")const;
+
+   /*!
+    * @brief Method to set fields from a keyword list.
+    *
+    * This is not a true loadState as it does not lookup/initialize all class
+    * members.  This was added to allow defaults, e.g ISCLAS, to be set via a
+    * site configuration file.
+    * Code does not return false if a field(key) is not found..
+    *
+    * @return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+   static const ossimString ISCLSY_KW;
+   static const ossimString ISCODE_KW;
+   static const ossimString ISCTLH_KW;
+   static const ossimString ISREL_KW;
+   static const ossimString ISDCTP_KW;
+   static const ossimString ISDCDT_KW;
+   static const ossimString ISDCXM_KW;
+   static const ossimString ISDG_KW;
+   static const ossimString ISDGDT_KW;
+   static const ossimString ISCLTX_KW;
+   static const ossimString ISCATP_KW;
+   static const ossimString ISCAUT_KW;
+   static const ossimString ISCRSN_KW;
+   static const ossimString ISSRDT_KW;
+   static const ossimString ISCTLN_KW;
+   static const ossimString XBANDS_KW;
+
+private:
+   void clearFields();
+
+   ossimString encodeUtm(ossim_uint32 zone,
+                         const ossimDpt& ul,
+                         const ossimDpt& ur,
+                         const ossimDpt& lr,
+                         const ossimDpt& ll)const;
+
+   /**
+    * FIELD: ISCLSY
+    * 
+    * Is a required 2 byte field.
+    *
+    * Image Security Classification System.
+    *
+    * This field shall contain valid values indicating the
+    * national or multinational security system used to classify the image.
+    * Country Codes per FIPS 10-4 shall be used to indicate national security
+    * systems; codes found in DIAM 65-19
+    * shall be used to indicate multinational security systems.
+    * If this field is all BCS spaces (0x20), it shall imply that no security
+    * classification system applies to the image. 
+    */
+   char theSecurityClassificationSys[3];
+
+   /**
+    * FIELD: ISCODE
+    * 
+    * is a 11 byte field
+    *
+    * Image Codewords.
+    *
+    * This field shall contain a valid indicator of the security compartments
+    * associated with the image. Values include one or more of the
+    * tri/digraphs found
+    * in DIAM 65-19 and/or Table A-4. Multiple entries shall be separated by
+    * single
+    * BCS spaces (0x20): The selection of a relevant set of codewords is
+    * application
+    * specific.  If this field is all BCS spaces (0x20), it shall imply that no
+    * codewords apply to the image.
+    */
+   char theCodewords[12];
+
+   /**
+    * FIELD: ISCTLH
+    * 
+    * is a 2 byte field.
+    *
+    * Image Control and Handling.  This field shall contain valid additional
+    * security control and/or handling instructions (caveats) associated with
+    * the image.
+    * Values include digraphs found in DIAM 65-19 and/or Table A4.
+    * The digraph may indicate single or multiple caveats. The selection of a
+    * relevant caveat(s) is application specific.  If this field is all BCS
+    * spaces (0x20),
+    * it shall imply that no additional control and handling instructions
+    * apply to the image. 
+    */
+   char theControlAndHandling[3];
+
+   /**
+    * FIELD: ISREL
+    * 
+    * Is a 20 byte field.
+    *
+    * Image Releasing Instructions.  This field shall contain a valid list of
+    * country and/or multilateral entity codes to which countries and/or
+    * multilateral entities the image is authorized for release.  Valid items
+    * in the list are one or
+    * more country codes as found in FIPS 10-4 and/or codes identifying
+    * multilateral
+    * entities as found in DIAM 65-19. If this field is all BCS spaces (0x20),
+    * it shall imply that no image release instructions apply.
+    */
+   char theReleasingInstructions[21];
+
+
+   /**
+    * FIELD: ISDCTP
+    * 
+    * Is a required 2 byte field.  The valid
+    * values are
+    * DD = declassify on a specific date
+    * DE = Declassify upon occurence of an event
+    * GD = downgrade to a specified level upon
+    *      occurence of an event
+    * O  = OADR
+    * X  = exempt from automatic declassification
+    * spaces = no image security declassification or
+    *          downgrade instruction apply.
+    */
+   char theDeclassificationType[3];
+   
+
+   /**
+    * FIELD: ISDCDT
+    * 
+    * Is a required 8 byte field.
+    *  CCYYMMDD
+    *
+    * CC   is the first 2 chars of the year 00-99
+    * YY   is the second 2 chars of the year 00-99
+    * MM   is the month 01-12
+    * DD   is the day 00-31
+    */
+   char theDeclassificationDate[9];
+
+   /**
+    * FIELD: ISDCXM
+    * 
+    * is a required 4 byte field.
+    * 
+    * Image Declassification Exemption.
+    *
+    * This field shall indicate the reason the image is exempt from automatic
+    * declassification if the value in Image Declassification Type is X. Valid
+    * values are X1 through X8 and X251 through X259. X1 through X8 correspond
+    * to the declassification exemptions found in DOD 5200.1-R, paragraphs
+    * 4-202b(1) through (8) for material exempt from the 10-year rule.
+    * X251 through X259 correspond to the declassification exemptions found in
+    * DOD 5200.1-R, paragraphs 4-301a(1) through (9) for permanently valuable
+    * material exempt from the 25-year declassification system. If this field is
+    * all BCS spaces (0x20), it shall imply that a image declassification exemption
+    * does not apply. 
+    */
+   char theDeclassificationExempt[5];
+   
+   /**
+    * FIELD: ISDG
+    * 
+    * Is a required 1 byte field with form:
+    *
+    *
+    * Image Downgrade.  This field shall indicate the classification level
+    * to which a image is to be downgraded if the values in Image Declassification Type
+    * are GD or GE.
+    *
+    * Valid values are
+    *    S (=Secret),
+    *    C (=Confidential),
+    *    R (= Restricted).
+    *
+    * If this field is all BCS spaces (0x20), it shall imply that image security
+    * downgrading does not apply.  
+    */
+   char theDowngrade[2];
+
+   /**
+    * FIELD: ISDGDT
+    * 
+    * is a required 8 byte field
+    *
+    * CCYYMMDD
+    *
+    * CC   is the first 2 chars of the year 00-99
+    * YY   is the second 2 chars of the year 00-99
+    * MM   is the month 01-12
+    * DD   is the day 00-31
+    */
+   char theDowngradeDate[9];
+
+   /**
+    * FIELD: ISCLTX
+    * 
+    * is a required 43 byte field.
+    *
+    * Image Classification Text.
+    *
+    * This field shall be used to provide additional information
+    * about image classification to include identification of a declassification or downgrading
+    * event if the values in Image Declassification Type are DE or GE.. It may also be used
+    * to identify multiple classification sources and/or any other special handling rules.
+    * Values are user defined free text. If this field is all BCS spaces (0x20), it shall
+    * imply that additional information about image classification does not apply. 
+    */
+   char theClassificationText[44];
+
+   /**
+    * FIELD: ISCATP
+    * 
+    * Is a required 1 byte field.
+    *
+    * O  = original classification Authority
+    * D  = derivative from a single source
+    * M  = derivative from multiple sources
+    * 
+    */
+   char theClassificationAuthType[2];
+
+   /**
+    * FIELD: ISCAUT
+    * 
+    * Is a required 40 byte field.
+    *
+    * Image Classification Authority.
+    *
+    * This field shall identify the classification authority for the image dependent upon the
+    * value in Image Classification Authority Type. Values are user defined free text which
+    * should contain the following information: original classification authority name and
+    * position or personal identifier if the value in Image Classification Authority Type is O;
+    * title of the document or security classification guide used to classify the image
+    * if the value in Image Classification Authority Type is D;
+    * and Derive-Multiple if the image classification was derived from multiple sources.
+    * In the latter case, the image originator will maintain a record of the sources used
+    * in accordance with existing security directives. One of the multiple sources may also
+    * be identified in Image Classification Text if desired. If this field is all BCS spaces
+    * (0x20), it shall imply that no image classification authority applies.
+    */
+   char theClassificationAuthority[41];
+
+   /**
+    * FIELD: ISCRSN
+    * 
+    * This is a required 1 byte field and indicates
+    * the classification reason.
+    *
+    * Image Classification Reason.
+    *
+    * This field shall contain values indicating the reason for classifying the image.
+    * Valid values are A through G. These correspond to the reasons for
+    * original classification per E.O. 12958, Section 1.5.(a) through (g).
+    * If this field is all BCS spaces (0x20), it shall imply that no image classification
+    * reason applies. 
+    */
+   char theClassificationReason[2];
+
+   /**
+    * FIELD: ISSRDT
+    * 
+    * This is a required 8 byte field.
+    *
+    * CCYYMMDD
+    *
+    * CC   is the first 2 chars of the year 00-99
+    * YY   is the second 2 chars of the year 00-99
+    * MM   is the month 01-12
+    * DD   is the day 00-31
+    *
+    */
+   char theSecuritySourceDate[9];
+
+   /**
+    * FIELD: ISCTLN
+    * 
+    * is a required 15 byte field.
+    */
+   char theSecurityControlNumber[16];
+
+  
+   /**
+    * FIELD: XBANDS
+    * 
+    * This is a conditional 5 byte field and ranges from
+    * 00010-99999.  This exists if theNumberOfBands is 0.
+    */
+   char theNumberOfMultispectralBands[6];
+
+   std::vector<ossimRefPtr<ossimNitfImageBandV2_1> > theImageBands;
+
+TYPE_DATA   
+};
+
+#endif
diff --git a/include/ossim/support_data/ossimNitfImageHeaderV2_X.h b/ossim/include/ossim/support_data/ossimNitfImageHeaderV2_X.h
similarity index 100%
rename from include/ossim/support_data/ossimNitfImageHeaderV2_X.h
rename to ossim/include/ossim/support_data/ossimNitfImageHeaderV2_X.h
diff --git a/include/ossim/support_data/ossimNitfImageLut.h b/ossim/include/ossim/support_data/ossimNitfImageLut.h
similarity index 100%
rename from include/ossim/support_data/ossimNitfImageLut.h
rename to ossim/include/ossim/support_data/ossimNitfImageLut.h
diff --git a/include/ossim/support_data/ossimNitfImageLutV2_0.h b/ossim/include/ossim/support_data/ossimNitfImageLutV2_0.h
similarity index 100%
rename from include/ossim/support_data/ossimNitfImageLutV2_0.h
rename to ossim/include/ossim/support_data/ossimNitfImageLutV2_0.h
diff --git a/include/ossim/support_data/ossimNitfImageLutV2_1.h b/ossim/include/ossim/support_data/ossimNitfImageLutV2_1.h
similarity index 100%
rename from include/ossim/support_data/ossimNitfImageLutV2_1.h
rename to ossim/include/ossim/support_data/ossimNitfImageLutV2_1.h
diff --git a/ossim/include/ossim/support_data/ossimNitfInfo.h b/ossim/include/ossim/support_data/ossimNitfInfo.h
new file mode 100644
index 0000000..a790465
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfInfo.h
@@ -0,0 +1,60 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: NITF Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossimNitfInfo_HEADER
+#define ossimNitfInfo_HEADER
+
+#include <iosfwd>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/support_data/ossimInfoBase.h>
+#include <ossim/support_data/ossimNitfFile.h>
+
+/**
+ * @brief NITF info class.
+ *
+ * Encapsulates the dumpnitf functionality.
+ */
+class OSSIM_DLL ossimNitfInfo : public ossimInfoBase
+{
+public:
+   
+   /** default constructor */
+   ossimNitfInfo();
+
+   /** virtual destructor */
+   virtual ~ossimNitfInfo();
+
+   /**
+    * @brief open method.
+    *
+    * @param file File name to open.
+    *
+    * @return true on success false on error.
+    */
+   virtual bool open(const ossimFilename& file);
+   
+   /**
+    * Print method.
+    *
+    * @param out Stream to print to.
+    * 
+    * @return std::ostream&
+    */
+   virtual std::ostream& print(std::ostream& out) const;
+
+   virtual bool getKeywordlist(ossimKeywordlist& kwl)const;
+   
+private:
+   ossimRefPtr<ossimNitfFile> m_nitfFile;
+};
+
+#endif /* End of "#ifndef ossimNitfInfo_HEADER" */
+
diff --git a/ossim/include/ossim/support_data/ossimNitfJ2klraTag.h b/ossim/include/ossim/support_data/ossimNitfJ2klraTag.h
new file mode 100644
index 0000000..0921bde
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfJ2klraTag.h
@@ -0,0 +1,177 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimNitfJ2klraTag.h
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: NITF J2KLRA tag.
+//
+// See:  ISO/IEC BIIF Profile BPJ2K01.00 Table 9-3.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+#ifndef ossimNitfJ2klraTag_HEADER
+#define ossimNitfJ2klraTag_HEADER 1
+
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+#include <ossim/base/ossimConstants.h>
+
+#include <iosfwd>
+#include <vector>
+
+class OSSIM_DLL ossimNitfJ2klraTag : public ossimNitfRegisteredTag
+{
+public:
+   enum 
+   {
+      ORIG_SIZE      = 1,
+      NLEVELS_O_SIZE = 2,
+      NBANDS_O_SIZE  = 5,
+      NLAYERS_O_SIZE = 3,
+      
+      LAYER_ID_SIZE  = 3, // repeating
+      BITRATE_SIZE   = 9, // repeating
+
+      NLEVELS_I_SIZE = 2, // conditional
+      NBANDS_I_SIZE  = 5, // conditional
+      NLAYERS_I_SIZE = 3  // conditional
+   };
+   
+   /** default constructor */
+   ossimNitfJ2klraTag();
+  
+   /**
+    * Parse method.
+    *
+    * @param in Stream to parse.
+    */
+   virtual void parseStream(std::istream& in);
+   
+   /**
+    * Write method.
+    *
+    * @param out Stream to write to.
+    */
+   virtual void writeStream(std::ostream& out);
+   
+   /** @return The size of this record in bytes (123) within a nitf file. */
+   virtual ossim_uint32 getSizeInBytes()const;
+   
+   /**
+    * Clears all string fields within the record to some default nothingness.
+    */
+   virtual void clearFields();
+
+   /**
+    * @brief Print method that outputs a key/value type format
+    * adding prefix to keys.
+    * @param out Stream to output to.
+    * @param prefix Prefix added to key like "image0.";
+    */
+   virtual std::ostream& print(std::ostream& out, const std::string& prefix) const;
+
+   /** @return ORIG field as a number. */
+   ossim_uint32 getOriginNumber() const;
+
+   /** @return NLAYERS_O field as a number. */
+   ossim_uint32 getNumberOfLayersOriginal() const;
+
+protected:
+
+   // Container for repeating fields.
+   class ossimJ2klraLayer
+   {
+   public:
+      /**
+       * FIELD: LAYER_ID
+       * required 3 byte field
+       * 000 - 999
+       * Layer ID Number. Repeating.
+       */
+      char m_layer_id[LAYER_ID_SIZE+1];
+      
+      /**
+       * FIELD: BITRATE
+       * required 9 byte
+       * 00.000000 – 37.000000
+       * Bitrate
+       */
+      char m_bitrate[BITRATE_SIZE+1];
+   };
+
+   /**
+    * FIELD: ORIG
+    *
+    * Required 1 byte.
+    *
+    * 0 - Original NPJE
+    * 1 – Parsed NPJE
+    * 2 – Original EPJE*
+    * 3 – Parsed EPJE*
+    * 8 – Original other
+    * 9 – Parsed other
+    *
+    * Original compressed data.
+    */
+   char m_orig[ORIG_SIZE+1];
+   
+   /**
+    * FIELD: NLEVELS_O
+    * required 2 bytes
+    * 00 - 32
+    * Number of wavelet levels in original image.
+    */
+   char m_levels_o[NLEVELS_O_SIZE+1];
+   
+   /**
+    * FIELD: NBANDS_O
+    * required 5 bytes
+    * 00000 - 16384
+    * Number of bands in original image.
+    */
+   char m_bands_o[NBANDS_O_SIZE+1];
+   
+   /**
+    * FIELD: NLAYERS_O
+    * required 3 bytes
+    * 000 - 999
+    * Number of layers in original image.
+    */
+   char m_layers_o[NLAYERS_O_SIZE+1];
+
+   /** repeating fields */
+   std::vector<ossimJ2klraLayer> m_layer;
+   
+   /**
+    * FIELD: NLEVELS_I
+    * Conditional 2 bytes if ORIG=1, 3, or 9.
+    * 00 - 32
+    * Number of wavelet levels in this image.
+    */
+   char m_nlevels_i[NLEVELS_I_SIZE+1];
+   
+   /**
+    * FIELD: NBANDS_I
+    * Conditional 5 bytes if ORIG=1, 3,or 9.
+    * 00000 = 16384
+    * Number of bands in this image.
+    */
+   char m_nbands_i[NBANDS_I_SIZE+1];
+   
+   /**
+    * FIELD: NLAYERS_I
+    * Conditional 3 bytes if ORIG=1, 3, or 9.
+    * 000 - 999
+    * Number of Layers in this image.
+    */
+   char m_nlayers_i[NLAYERS_I_SIZE+1];
+   
+TYPE_DATA   
+};
+
+#endif /* End of "#ifndef ossimNitfJ2klraTag_HEADER_HEADER" */
+
diff --git a/include/ossim/support_data/ossimNitfLabelHeader.h b/ossim/include/ossim/support_data/ossimNitfLabelHeader.h
similarity index 100%
rename from include/ossim/support_data/ossimNitfLabelHeader.h
rename to ossim/include/ossim/support_data/ossimNitfLabelHeader.h
diff --git a/include/ossim/support_data/ossimNitfLabelHeaderV2_0.h b/ossim/include/ossim/support_data/ossimNitfLabelHeaderV2_0.h
similarity index 100%
rename from include/ossim/support_data/ossimNitfLabelHeaderV2_0.h
rename to ossim/include/ossim/support_data/ossimNitfLabelHeaderV2_0.h
diff --git a/include/ossim/support_data/ossimNitfLocalCartographicTag.h b/ossim/include/ossim/support_data/ossimNitfLocalCartographicTag.h
similarity index 100%
rename from include/ossim/support_data/ossimNitfLocalCartographicTag.h
rename to ossim/include/ossim/support_data/ossimNitfLocalCartographicTag.h
diff --git a/ossim/include/ossim/support_data/ossimNitfLocalGeographicTag.h b/ossim/include/ossim/support_data/ossimNitfLocalGeographicTag.h
new file mode 100644
index 0000000..36d3736
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfLocalGeographicTag.h
@@ -0,0 +1,81 @@
+//*******************************************************************
+// Copyright (C) 2004 Intelligence Data Systems. 
+//
+// LICENSE: MIT
+//
+// see top level LICENSE.txt
+// 
+// Author: Garrett Potts
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfLocalGeographicTag.h 23666 2015-12-14 20:01:22Z rashadkm $
+#ifndef ossimNitfLocalGeographicTag_HEADER
+#define ossimNitfLocalGeographicTag_HEADER
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+
+class OSSIM_DLL ossimNitfLocalGeographicTag : public ossimNitfRegisteredTag
+{
+public:
+   ossimNitfLocalGeographicTag();
+   virtual ~ossimNitfLocalGeographicTag();
+
+   virtual void parseStream(std::istream& in);
+   virtual void writeStream(std::ostream& out);
+
+   virtual void clearFields();
+
+   virtual void setDegreesPerPixelLat(double deltaLat);
+   virtual void setDegreesPerPixelLon(double deltaLon);
+   virtual void setLatOrigin(double origin);
+   virtual void setLonOrigin(double origin);
+   
+protected:
+   /**
+    * FIELD: ARV
+    *
+    * required 9 byte field
+    *
+    * Longitude density
+    *
+    * This field shall contain the pixel ground spacing in E/W direction that is
+    * the number of pixels or elements intervals in 360 degrees.
+    * 9 BCS-N positive integer 000000002 to 999999999. 
+    */
+   char theLonDensity[10];
+
+   /**
+    * FIELD: BRV
+    *
+    * required 9 byte field
+    *
+    * Latitude density
+    *
+    * This field shall contain the pixel ground spacing in N/S direction that is the number of
+    * pixels or elements intervals in 360 degrees. 9 BCS-N positive integer 000000002 to 999999999 R 
+    */ 
+   char theLatDensity[10];
+
+   /**
+    * FIELD: LSO
+    * 
+    * required 15 byte field
+    *
+    * Longitude of Reference Origin This field shall contain the longitude of the origin pixel
+    * (row number 0, column number 0) in the absolute coordinate system. 15 BCS-N R 
+    */
+   char theLonOrigin[16];
+
+   /**
+    * FIELD: PSO
+    *
+    * required 15 byte field
+    *
+    * Latitude of Reference Origin This field shall contain the latitude of the origin
+    * pixel (row number 0, column number 0) in the absolute coordinate system. 15 BCS-N R 
+    */
+   char theLatOrigin[15];
+
+TYPE_DATA   
+};
+#endif
diff --git a/ossim/include/ossim/support_data/ossimNitfMstgtaTag.h b/ossim/include/ossim/support_data/ossimNitfMstgtaTag.h
new file mode 100644
index 0000000..880cab4
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfMstgtaTag.h
@@ -0,0 +1,218 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: MSTGTA Mission Target Information Extension Format
+// tag class declaration.
+//
+// See document STDI-0002 Table 8-16 for more info.
+// 
+//----------------------------------------------------------------------------
+// $Id
+
+#ifndef ossimNitfMstgtaTag_HEADER
+#define ossimNitfMstgtaTag_HEADER 1
+
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+
+class OSSIM_DLL ossimNitfMstgtaTag : public ossimNitfRegisteredTag
+{
+public:
+
+   enum 
+   {
+      TGT_NUM_SIZE       = 5,
+      TGT_ID_SIZE        = 12,
+      TGT_BE_SIZE        = 15,
+      TGT_PRI_SIZE       = 3,
+      TGT_REQ_SIZE       = 12,
+      TGT_LTIOV_SIZE     = 12,
+      TGT_TYPE_SIZE      = 1,
+      TGT_COLL_SIZE      = 1,
+      TGT_CAT_SIZE       = 5,
+      TGT_UTC_SIZE       = 7,
+      TGT_ELEV_SIZE      = 6,
+      TGT_ELEV_UNIT_SIZE = 1,
+      TGT_LOC_SIZE       = 21
+    };
+   
+   /** @brief default constructor */
+   ossimNitfMstgtaTag();
+
+   /** @brief destructor */
+   virtual ~ossimNitfMstgtaTag();
+
+   /** @brief Method to parse data from stream. */
+   virtual void parseStream(std::istream& in);
+
+   /** @brief Method to write data to stream. */
+   virtual void writeStream(std::ostream& out);
+
+   /** @brief Method to clear all fields including null terminating. */
+   virtual void clearFields();
+
+   /**
+    * @brief Print method that outputs a key/value type format
+    * adding prefix to keys.
+    * @param out Stream to output to.
+    * @param prefix Prefix added to key like "image0.";
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix=std::string()) const;
+   
+protected:
+
+   /** Type R = Required Type <R> = BCS spaces allowed for entire field */
+   
+   /**
+    * FIELD: TGT_NUM
+    *
+    * TYPE: R
+    * 
+    * 5 byte field
+    *
+    * 00001 ti 99999
+    */
+   char theTgtNum[TGT_NUM_SIZE+1];
+
+   /**
+    * FIELD: TGT_ID
+    *
+    * TYPE: <R>
+    *
+    * 12 byte field
+    *
+    * Disignator of Target, alphnumeric.
+    */
+   char theTgtId[TGT_ID_SIZE+1];
+
+   /**
+    * FIELD: TGT_BE
+    *
+    * TYPE: <R>
+    * 
+    * 15 byte field
+    * 
+    * alphnumeric
+    */
+   char theTgtBe[TGT_BE_SIZE+1];
+
+   /**
+    * FIELD: TGT_PRI
+    *
+    * TYPE: <R>
+    *
+    * 3 byte field
+    * 
+    * Target priority, 1 = top, 2 = 2nd...  001 to 999
+    */
+   char theTgtPri[TGT_PRI_SIZE+1];
+
+   /**
+    * FIELD: TGT_REQ
+    *
+    * TYPE: <R>
+    *
+    * 12 byte field
+    * 
+    * Target requester. alphnumeric 
+    */
+   char theTgtReq[TGT_REQ_SIZE+1];
+
+   /**
+    * FIELD: TGT_LTIOV
+    *
+    * TYPE: <R>
+    * 
+    * 12 byte field
+    * 
+    * Latest Time Information of Value CCYYMMDDhhmm
+    */
+   char theTgtLtiov[TGT_LTIOV_SIZE+1];
+
+   /**
+    * FIELD: TGT_TYPE
+    *
+    * TYPE: <R>
+    *
+    * 1 byte field
+    * 
+    * Pre-Planned Target Type: 0 = point, 1 = strip, 2 = area, 0 to 9.
+    */
+   char theTgtType[TGT_TYPE_SIZE+1];
+
+   /**
+    * FIELD: TGT_COLL
+    *
+    * TYPE: R
+    * 
+    * 1 byte field
+    * 
+    * Pre-Planned Collection Technique: 0 to 9
+    */
+   char theTgtColl[TGT_COLL_SIZE+1];
+
+   /**
+    * FIELD: TGT_CAT
+    *
+    * TYPE: <R>
+    *
+    * 5 byte field
+    * 
+    * Target Functional Category Code 10000 to 99999
+    */
+   char theTgtCat[TGT_CAT_SIZE+1];
+
+   /**
+    * FIELD: TGT_UTC
+    *
+    * TYPE: <R>
+    * 
+    * 7 byte field
+    *
+    * Planned Time at Target hhmmssZ
+    */
+   char theTgtUtc[TGT_UTC_SIZE+1];
+
+   /**
+    * FIELD: TGT_ELEV
+    *
+    * TYPE: <R>
+    * 
+    * 6 byte field
+    * 
+    * Target Elevation -01000 to +30000 feet or meters
+    */
+   char theTgtElev[TGT_ELEV_SIZE+1];
+
+   /**
+    * FIELD: TGT_ELEV_UNIT
+    *
+    * TYPE: <R>
+    * 
+    * 1 byte field
+    * 
+    * Unit of Target Elevation, f = feet, m = meters
+    */
+   char theTgtElevUnit[TGT_ELEV_UNIT_SIZE+1];
+
+   /**
+    * FIELD: TGT_LOC
+    *
+    * TYPE: R
+    *
+    * 21 byte field
+    * 
+    * Target Location
+    */
+   char theTgtLoc[TGT_LOC_SIZE+1];
+   
+TYPE_DATA   
+};
+
+#endif /* matches #ifndef ossimNitfMstgtaTag_HEADER */
+
diff --git a/ossim/include/ossim/support_data/ossimNitfNameConversionTables.h b/ossim/include/ossim/support_data/ossimNitfNameConversionTables.h
new file mode 100644
index 0000000..f32218e
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfNameConversionTables.h
@@ -0,0 +1,30 @@
+//*******************************************************************
+// Copyright (C) 2004 Garrett Potts.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimNitfNameConversionTables.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimNitfNameConversionTables_HEADER
+#define ossimNitfNameConversionTables_HEADER
+#include <ossim/base/ossimConstants.h>
+
+class ossimString;
+
+class OSSIM_DLL ossimNitfNameConversionTables
+{
+public:
+   ossimNitfNameConversionTables();
+
+   ossimString convertMapProjectionNameToNitfCode(const ossimString& mapProjectionName)const;
+   ossimString convertNitfCodeToOssimProjectionName(const ossimString& nitfProjectionCode)const;
+   ossimString convertNitfCodeToNitfProjectionName(const ossimString& nitfProjectionCode)const;
+   ossimString convertNitfProjectionNameToNitfCode(const ossimString& nitfProjectionName)const;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimNitfPiaimcTag.h b/ossim/include/ossim/support_data/ossimNitfPiaimcTag.h
new file mode 100644
index 0000000..89a421c
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfPiaimcTag.h
@@ -0,0 +1,428 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: PIAIMC tag class declaration.
+// 
+// "Profile for Imagery Access Image Support Extensions"
+//
+// See document STDI-0002 Table 6-1 for more info.
+// 
+// http://164.214.2.51/ntb/baseline/docs/stdi0002/final.pdf
+//
+//----------------------------------------------------------------------------
+// $Id: ossimNitfPiaimcTag.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimNitfPiaimcTag_HEADER
+#define ossimNitfPiaimcTag_HEADER
+
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+#include <ossim/base/ossimConstants.h>
+
+class ossimString;
+
+class OSSIM_DLL ossimNitfPiaimcTag : public ossimNitfRegisteredTag
+{
+public:
+   enum 
+   {
+      CLOUDCVR_SIZE   =   3,
+      SRP_SIZE        =   1,
+      SENSMODE_SIZE   =  12,
+      SENSNAME_SIZE   =  18,
+      SOURCE_SIZE     = 255,
+      COMGEN_SIZE     =   2,
+      SUBQUAL_SIZE    =   1,
+      PIAMSNNUM_SIZE  =   7,
+      CAMSPECS_SIZE   =  32,
+      PROJID_SIZE     =   2,
+      GENERATION_SIZE =   1,
+      ESD_SIZE        =   1,
+      OTHERCOND_SIZE  =   2,
+      MEANGSD_SIZE    =   7,
+      IDATUM_SIZE     =   3,
+      IELLIP_SIZE     =   3,
+      PREPROC_SIZE    =   2,
+      IPROJ_SIZE      =   2,
+      SATTRACK_SIZE   =   8
+      //             -------
+      //                362
+   };
+   
+   /** default constructor */
+   ossimNitfPiaimcTag();
+  
+   /**
+    * Parse method.
+    *
+    * @param in Stream to parse.
+    */
+   virtual void parseStream(std::istream& in);
+   
+   /**
+    * Write method.
+    *
+    * @param out Stream to write to.
+    */
+   virtual void writeStream(std::ostream& out);
+   
+   /**
+    * Clears all string fields within the record to some default nothingness.
+    */
+   virtual void clearFields();
+   
+   /**
+    * @brief Print method that outputs a key/value type format
+    * adding prefix to keys.
+    * @param out Stream to output to.
+    * @param prefix Prefix added to key like "image0.";
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix) const;
+   /**
+    * @return CLOUDCVR field as an ossimString.
+    */
+   ossimString getCloudcvrString() const;
+
+   /**
+    * @return SRP field as an ossimString.
+    */
+   ossimString getSrpString() const;
+   
+   /**
+    * @return SENSMODE field as an ossimString.
+    */
+   ossimString getSensmodeString() const;
+   
+   /**
+    * @return SENSNAME field as an ossimString.
+    */
+   ossimString getSensnameString() const;
+   
+    /**
+    * @return SOURCE field as an ossimString.
+    */
+   ossimString getSourceString() const;
+  
+   /**
+    * @return COMGEN field as an ossimString.
+    */
+   ossimString getComgenString() const;
+   
+   /**
+    * @return SUBQUAL field as an ossimString.
+    */
+   ossimString getSubqualString() const;
+
+   /**
+    * @return PIAMSNNUM field as an ossimString.
+    */
+   ossimString getPiamsnnumString() const;
+
+   /**
+    * @return field as an ossimString.
+    */
+   ossimString getString() const;
+
+   /**
+    * @return CAMSPECS field as an ossimString.
+    */
+   ossimString getCamspecsString() const;
+
+   /**
+    * @return PROJID field as an ossimString.
+    */
+   ossimString getProjidString() const;
+
+   /**
+    * @return GENERATION field as an ossimString.
+    */
+   ossimString getGenerationString() const;
+
+   /**
+    * @return ESD field as an ossimString.
+    */
+   ossimString getEsdString() const;
+   
+   /**
+    * @return OTHERCONDfield as an ossimString.
+    */
+   ossimString getOthercondString() const;
+
+   /**
+    * @return MEANGSD field as an ossimString.
+    */
+   ossimString getMeadGsdString() const;
+
+   /**
+    * @return MEANGSD field as a double converted to meters.
+    *
+    * @note Conversion used: gsd_in_meters = gsd / 12.0 * MTRS_PER_FT
+    */
+   ossim_float64 getMeanGsdInMeters() const;
+
+   /**
+    * @return IDATUM field as an ossimString.
+    */
+   ossimString getIdatumString() const;
+   
+   /**
+    * @return IELLIP field as an ossimString.
+    */
+   ossimString getIellipString() const;
+   
+   /**
+    * @return PREPROC field as an ossimString.
+    */
+   ossimString getPreprocString() const;
+   
+   /**
+    * @return IPROJ field as an ossimString.
+    */
+   ossimString getIprojString() const;
+   
+   /**
+    * @return SATTRACK field as an ossimString.
+    */
+   ossimString getSattrackString() const;
+   
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+protected:
+
+   /**
+    * FIELD: CLOUDCVR
+    *
+    * 3 byte field
+    *
+    * Indicates the precentage of the image that is obscured by cloud. A value
+    * os 999 indicates an unknown condition.
+    *
+    * 000 to 100, or 999
+    */
+   char theCloudcvr[CLOUDCVR_SIZE+1];
+   
+   /**
+    * FIELD: SRP
+    *
+    * 1 byte field
+    *
+    * Indicates whether or not standard radiometric product data is available.
+    *
+    * Y,N
+    */
+   char theSrp[SRP_SIZE+1];
+   
+   /**
+    * FIELD: SENSMODE
+    *
+    * 12 byte field
+    *
+    * Indentifies the sensor mode used in capturing the image.
+    *
+    * WHISKBROOM, PUSHROOM, FRAMING, SPOT, SWATH, TBD
+    */
+   char thesSensmode[SENSMODE_SIZE+1];
+   
+   /**
+    * FIELD: SENSNAME
+    *
+    * 18 byte field
+    *
+    * Indentifies the name of sensor used in capturing the image.
+    *
+    * USIGS DM, SENSORTYPE Name
+    */
+   char theSensname[SENSNAME_SIZE+1];
+   
+   /**
+    * FIELD: SOURCE
+    *
+    * 18 byte field
+    *
+    * Indicated where the image came from.
+    *
+    * alphanumeric
+    */
+   char theSource[SOURCE_SIZE+1];
+   
+   /**
+    * FIELD: COMGEN
+    *
+    * 2 byte field
+    *
+    * Compression Generation.
+    *
+    * 00 to 99
+    */
+   char theComgen[COMGEN_SIZE+1];
+   
+   /**
+    * FIELD: SUBQUAL
+    *
+    * 1 byte field
+    *
+    * Subjective Quality
+    *
+    * P-Poor, G-Good, E-Excellent, F-Fair
+    */
+   char theSubqual[SUBQUAL_SIZE+1];
+   
+   /**
+    * FIELD: PIAMSNNUM
+    *
+    * 7 byte field
+    *
+    * Indicates the mission number assigned to the reconnaissance mission.
+    *
+    * EARS 1.1 page 4-28
+    */
+   char thePiamsnnum[PIAMSNNUM_SIZE+1];
+   
+   /**
+    * FIELD: CAMSPECS
+    *
+    * 32 byte field
+    *
+    * Specifies the brand name of the camera used and the focal length of the
+    * lens.
+    *
+    * alphanumeric
+    */
+   char theCamspecs[CAMSPECS_SIZE+1];
+   
+   /**
+    * FIELD: PROJID
+    *
+    * 2 byte field
+    *
+    * Indentifies collection platform project identifier code.
+    *
+    * EARS Appendix 9
+    */
+   char theProjid[PROJID_SIZE+1];
+   
+   /**
+    * FIELD: GENERATION
+    *
+    * 1 byte field
+    *
+    * Specifies the number of image generations of the product.  The number(0)
+    * is reserved for the original product.
+    *
+    * 0 to 9
+    */
+   char theGeneration[GENERATION_SIZE+1];
+
+   /**
+    * FIELD: ESD
+    *
+    * 1 byte field
+    *
+    * Indicates whether or not Exploitation Support Data is available and
+    * contained withing the product data.
+    *
+    * Y,N
+    */
+   char theEsd[ESD_SIZE+1];
+
+   /**
+    * FIELD: OTHERCOND
+    *
+    * 2 byte field
+    *
+    * Indicates other conditions that affect the imagery over the target.
+    *
+    * EARS 1.1 page 4 to 28
+    */
+   char theOthercond[OTHERCOND_SIZE+1];
+
+   /**
+    * FIELD: MEANGSD
+    *
+    * 7 byte field
+    *
+    * The geometric mean of the across and along scan center-to-center distance
+    * between contiguous ground samples.
+    *
+    * 00000.0 to 99999.9 Expressed in inches, accuracy=10%
+    */
+   char theMeanGsd[MEANGSD_SIZE+1];
+
+   /**
+    * FIELD: IDATUM
+    *
+    * 3 byte field
+    *
+    * Identifies the mathematical representation of the earth used to
+    * geo-correct/or to rectify the image.
+    * (Identifies the Datum assiciated with IGEOLO.)
+    *
+    * Horizontal_Reference_Datum_Code(refer to DDDS element)
+    */
+   char theIdatum[IDATUM_SIZE+1];
+
+   /**
+    * FIELD: IELLIP
+    *
+    * 3 byte field
+    *
+    * Identifies the mathematical representation of the earth used to
+    * geo-correct/or to rectify the image.
+    * (Identifies the Ellipsoid assiciated with IGEOLO.)
+    */
+   char theIellip[IELLIP_SIZE+1];
+  
+   /**
+    * FIELD: PREPROC
+    *
+    * 2 byte field
+    *
+    * Identifies the level of radiometric and geometric processing applied to
+    * the product by the commercial vendor.
+    *
+    * USIGS DM, IMAGEDATASET Processing Level Code.
+    */
+   char thePreproc[PREPROC_SIZE+1];
+  
+   /**
+    * FIELD: IPROJ
+    *
+    * 2 byte field
+    *
+    * Identifies the 2D-map projection used by commercial vendors to
+    * geo-correct/or to rectify the image.
+    *
+    * DIGEST, Part 3 table 6-1
+    */
+   char theIproj[IPROJ_SIZE+1];
+
+   /**
+    * FIELD: SATTRACK
+    *
+    * 8 byte field
+    *
+    * Identifies location of an image acquired by LANDSAT or SPOT (only) along
+    * the satellite path.
+    *
+    * Minimum values:
+    *  PATH(J)=0001
+    *  ROW(K) =0001
+    * Maximum values:
+    *  PATH(J)=9999
+    *  ROW(K) =9999
+    *
+    *  Recorded as PATH/ROW 00010001
+    */
+   char theSattrack[SATTRACK_SIZE+1];
+   
+TYPE_DATA   
+};
+
+#endif /* End of "#ifndef ossimNitfPiaimcTag_HEADER" */
+
diff --git a/ossim/include/ossim/support_data/ossimNitfProjectionParameterTag.h b/ossim/include/ossim/support_data/ossimNitfProjectionParameterTag.h
new file mode 100644
index 0000000..34a03f8
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfProjectionParameterTag.h
@@ -0,0 +1,333 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfProjectionParameterTag.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimNitfProjectionParameterTag_HEADER
+#define ossimNitfProjectionParameterTag_HEADER
+#include <vector>
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+
+class OSSIM_DLL ossimNitfProjectionParameterTag : public ossimNitfRegisteredTag
+{
+public:
+   ossimNitfProjectionParameterTag();
+   virtual ~ossimNitfProjectionParameterTag();
+
+   virtual void parseStream(std::istream& in);
+   virtual void writeStream(std::ostream& out);
+
+   /**
+    * @brief Print method that outputs a key/value type format
+    * adding prefix to keys.
+    * @param out Stream to output to.
+    * @param prefix Prefix added to key like "image0.";
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix=std::string()) const;
+
+   virtual ossim_uint32 getSizeInBytes()const;
+   virtual void clearFields();
+   virtual void clearParameters();
+   virtual void addParameter(const ossimString& param);
+   virtual void addParameter(const ossim_float64& param);
+   void setName(const ossimString& name);
+   void setCode(const ossimString& code);
+   ossimString getName()const;
+   ossimString getCode()const;
+   void setFalseX(double falseX);
+   void setFalseY(double falseY);
+   double getFalseX()const;
+   double getFalseY()const;
+   
+protected:
+   /**
+    * FIELD: PRN
+    *
+    * required 80 byte field.
+    * 
+    * Projection Name
+    *
+    * This field shall contain the name of the projection to which the Image Segment refers.
+    * The default value is Transverse Mercator.
+    */
+   char theProjectionName[81];
+
+   /**
+    *
+    * FIELD: PCO
+    *
+    * required 2 byte field.
+    * 
+    * Projection Code
+    *
+    * This field shall contain the code of the projection to which the Image Segment refers.
+    * The default value is TC.
+    *
+    * Code values:
+    *
+    * AC           Albers Equal-Area Conic
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. std. parallel nearer to equator
+    *                3. std parallel farther from equator
+    *                4. latitude of origin
+    *              
+    * AK           (Lambert) Azimuthal Equal-Area
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. Latitude of origin
+    *              
+    * AL           Azimuthal Equidistant
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. Latitude of origin
+    * 
+    * BF           Bonne
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. Latitude of origin
+    *                3. Scale factor at projection origin
+    *                
+    * CC           Equidistant Conic with 1 Standard Parallel
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. Latitude of origin
+    *                3. Latitude of Std. Parallel
+    *                
+    * CP           Equirectangular
+    *              Parameters:
+    *                1. Longitude of central meridian 
+    *                2. Latitude of true scale
+    *                3. Radius of sphere
+    *                
+    * CS           Cassini-Soldner
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. Latitude of origin
+    *            
+    * ED           Eckert VI
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. Radius of sphere
+    * 
+    * EF           Eckert IV
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. Radius of sphere
+    * 
+    * GN           Gnomonic
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. Latitude of origin
+    * 
+    * HX           Hotine Oblique Mercator based on 2 Points 
+    *              Parameters:
+    *                1. Scale factor at projection origin
+    *                2. latitude of projection origin
+    *                3. longitude of first point defining center line
+    *                4. latitude of fist point defining center line
+    *                
+    * KA           Equidistant Conic with 2 Standard Parallels 
+    *              Parameters:
+    *                1. Longitude of central meridian
+    *                2. Latitude of origin
+    *                3. Latitude of standard parallel Nearer to equator
+    *                4. Latitude of standard parallel farther from equator
+    *
+    * LA           Laborde
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. Latitude of origin
+    *                3. Scale factor at proj origin
+    *                4. Azimuth at origin of axis of constant scale
+    * 
+    * LE           Lambert Conformal Conic
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. std. parallel nearer to equator
+    *                3. std. parallel farther from equator
+    *                4. Latitude of origin
+    * 
+    * LI           Cylindrical Equal Area
+    *              Parameters:
+    *                1. Longitude of central meridian
+    *                2. Latitude of origin
+    *                
+    * LJ           Lambert Equal-Area Meridional
+    *              Parameters:
+    *                1. Longitude of central meridian
+    *                2. Latitude of origin
+    *                
+    * MC           Mercator
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. Latitude of true scale
+    *                3. Latitude of reference origin
+    *                
+    * MH           Miller Cylindrical
+    *              Parameters:
+    *                1. Longitude of central meridian
+    *                2. Radius of sphere
+    *                
+    * MJ           French Lambert
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. Latitude of origin
+    *                3. Scale factor at proj origin
+    *                
+    * MP           Mollweide
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. Radius of sphere
+    *                
+    * NT           New Zealand Map Grid
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. Latitude of origin
+    *                
+    * OC           Oblique Mercator
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. Latitude of origin
+    *                3. Azimuth
+    *                4. radius of sphere
+    *                
+    * OD           Orthographic
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. Latitude of origin
+    *                3. Radius of sphere
+    *                
+    * PG           Polar Stereographic
+    *              Parameters:
+    *                1. Latitude of true scale
+    *                
+    * PH           Polyconic
+    *              Parameters:
+    *                1. Longitude of central meridian
+    *                2. Latitude of origin
+    *                
+    * RS or RB     Hotine Oblique Mercator (Rectified Skew Orthomorphic)
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. Latitude of origin
+    *                3. Azimuth East of North for Central Line (Skew X-Axis at Proj. origin)
+    *                4. Scale factor at proj origin
+    *                
+    * RX           Robinson
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. Radius of sphere
+    *                
+    * SA           Sinusoidal
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. Radius of sphere
+    *               
+    * SD           Oblique Stereographic
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. Latitude of origin
+    *                3. Scale factor at origin
+    *                
+    * SX           Space Oblique Mercator
+    *              Parameters:
+    *                1. Application code:
+    *                     1 = Landsat, USGS equations
+    *                     2 = Landsat, EOSAT equations
+    *                2. Vehicle number
+    *                3. Orbital path number
+    *                
+    * TC           Transverse Mercator
+    *              Parameters:
+    *                1. Longitude of central meridian
+    *                2. Central Scale Factor
+    *                3. Latitude of origin
+    *                
+    * TX           Transverse Cylindrical Equal Area
+    *              Parameters:
+    *                1. Longitude of central meridian
+    *                2. Latitude of origin
+    *                3. Scale factor along central meridian
+    *                
+    * VA           Van der Grinten
+    *              Parameters:
+    *                1. Longitude of central meridian
+    *                2. Radius of sphere
+    * 
+    * VX           General Vertical NearSide Perspective
+    *              Parameters:
+    *                1. Longitude of origin
+    *                2. Latitude of origin
+    *                3. Heigh of perspective map above surface
+    *
+    * ZY           Other Known Projection
+    */
+   char theProjectionCode[3];
+
+   /**
+    * FIELD: NUM_PRJ
+    *
+    * required 1 byte field ranging from 0-9
+    * 
+    * Number of Projection Parameters
+    *
+    * This field shall contain the number of projection parameters.
+    * The PRJ Field should be repeated as necessary depending on the
+    * projection code (see Part 3-6).  If the number of projection parameters
+    * provided is lower than specified in Part 3-6, the
+    * missing parameters value is 0.
+    *
+    */
+   char              theNumberOfParameters[2];
+   
+   /**
+    * FIELD(S): PRJn
+    *
+    * Conditional 15 byte field each.
+    *
+    * Projection Parameter Each occurrence of this field provides an appropriate
+    * parameter to accurately describe the projection.  See Part 3-6 to know the
+    * kind of parameters needed for each projection code. 15 BCS-N C 
+    */
+   std::vector<ossimString> theProjectionParameters;
+   
+   /**
+    * FIELD: XOR
+    *
+    * required  15 byte field.
+    * 
+    * Projection False X (Easting) Origin
+    *
+    * This field shall contain the projection false X (easting) origin.
+    * The default value is 000000000000000, which implies that there is no projection false X origin.
+    * 
+    */
+   char theFalseXOrigin[16];
+
+
+   /**
+    * FIELD: YOR
+    *
+    * required 15 byte field.
+    *
+    * Projection False Y (Northing) Origin
+    *
+    * This field shall contain the projection false Y (northing) origin.
+    * The default value is 000000000000000, which implies that there is
+    * no projection false Y origin.
+    * 
+    */
+   char theFalseYOrigin[16];
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimNitfRegisteredTag.h b/ossim/include/ossim/support_data/ossimNitfRegisteredTag.h
new file mode 100644
index 0000000..bbd87a7
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfRegisteredTag.h
@@ -0,0 +1,125 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfRegisteredTag.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimNitfRegisteredTag_HEADER
+#define ossimNitfRegisteredTag_HEADER 1
+
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimPropertyInterface.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <string>
+
+class ossimKeywordlist;
+class ossimString;
+
+class OSSIM_DLL ossimNitfRegisteredTag : public ossimObject ,
+                                         public ossimPropertyInterface
+{
+public:
+   /** @brief default constructor */
+   ossimNitfRegisteredTag();
+   
+   /** @brief Constructor that takes name and size. */
+   ossimNitfRegisteredTag(const std::string& tagName, ossim_uint32 tagLength);
+
+   /** @brief destructor */
+   virtual ~ossimNitfRegisteredTag();
+   
+   /**
+    * @brief This will return the name of the registered tag for this user
+    * defined header.
+    *
+    * @note Deprecated - Use getTagName()
+    */
+   virtual std::string getRegisterTagName() const;
+   
+   /**
+    * @brief This will return the name of the registered tag for this user
+    * defined header.
+    */
+   virtual const std::string& getTagName() const;
+
+   /**
+    * @param tagName Name of tag.
+    *
+    * @note Users should set tag name as this is an unknown tag.
+    */
+   virtual void setTagName(const std::string& tagName);
+ 
+   /**
+    * @brief Returns the length in bytes of the tag from the CEL or REL field.
+    * 
+    * @note Depricated use: getTagLength()
+    *
+    * The entire TRE length is 11 plus this(the size of the CEL or REL field).
+    *
+    * @return Length of REDATA or CEDATA.
+    */
+   virtual ossim_uint32 getSizeInBytes()const;
+
+  /**
+    * @brief Returns the length in bytes of the tag from the CEL or REL field.
+    *
+    * The entire TRE length is 11 plus this(the size of the CEL or REL field).
+    *
+    * @return Length of REDATA or CEDATA.
+    */
+   virtual ossim_uint32 getTagLength()const;
+
+  /**
+    * @brief Set the tag length.
+    *
+    * @param length Length of tag.
+    */
+   virtual void setTagLength(ossim_uint32 length);
+    
+   /**
+    * This will allow the user defined data to parse the stream.
+    */
+   virtual void parseStream(std::istream& in)=0;
+   virtual void writeStream(std::ostream& out)=0;
+
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+   /**
+    * @brief Default interface to populate keyword list with metadata.
+    * expample:  country_code: US
+    * This implementation does nothing.  Derived classes should implement as
+    * they see fit.
+    * 
+    * @param kwl Keywordlist to populate with metadata.
+    *
+    * @param prefix Optional prefix to put in front of key, like: "image1.".
+    */
+   virtual void getMetadata(ossimKeywordlist& kwl,
+                            const char* prefix=0) const;
+
+   /**
+    * @brief Pure virtual print method that outputs a key/value type format
+    * adding prefix to keys.
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix=std::string()) const;
+   
+   virtual bool saveState(ossimKeywordlist& kwl, const ossimString& prefix)const;
+   
+protected:
+   std::string  m_tagName;
+   ossim_uint32 m_tagLength;
+   
+TYPE_DATA
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimNitfRegisteredTagFactory.h b/ossim/include/ossim/support_data/ossimNitfRegisteredTagFactory.h
new file mode 100644
index 0000000..3f60095
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfRegisteredTagFactory.h
@@ -0,0 +1,30 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// LICENSE: MIT see top level LICENSE.txt
+// 
+// Author: Garrett Potts
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfRegisteredTagFactory.h 23666 2015-12-14 20:01:22Z rashadkm $
+#ifndef ossimNitfRegisteredTagFactory_HEADER
+#define ossimNitfRegisteredTagFactory_HEADER 1
+
+#include <ossim/support_data/ossimNitfTagFactory.h>
+
+class ossimNitfRegisteredTagFactory : public ossimNitfTagFactory
+{
+public:
+   virtual ~ossimNitfRegisteredTagFactory();
+   static ossimNitfRegisteredTagFactory* instance();
+   
+   virtual ossimRefPtr<ossimNitfRegisteredTag> create(const ossimString &tagName)const;
+
+protected:
+   ossimNitfRegisteredTagFactory();
+
+TYPE_DATA   
+};
+
+#endif
diff --git a/ossim/include/ossim/support_data/ossimNitfRpcATag.h b/ossim/include/ossim/support_data/ossimNitfRpcATag.h
new file mode 100644
index 0000000..9c4b89d
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfRpcATag.h
@@ -0,0 +1,35 @@
+//*******************************************************************
+// Copyright (C) 2000 Intelligence Data Systems. 
+//
+// LICENSE: MIT
+//
+// see top level LICENSE.txt
+// 
+// Author: Garrett Potts
+//
+// Description: Nitf support class for RPC00A -
+// Rational Polynomial Coefficient extension.
+//
+//********************************************************************
+// $Id: ossimNitfRpcATag.h 23666 2015-12-14 20:01:22Z rashadkm $
+#ifndef ossimNitfRpcATag_HEADER
+#define ossimNitfRpcATag_HEADER 1
+
+#include <ossim/support_data/ossimNitfRpcBase.h>
+
+/**
+ * The layout of RPC00B is the same as RPC00A.  The difference is how the
+ * coefficients are used; hence, all the code is in the ossimNitfRpcBase class.
+ */
+class OSSIM_DLL ossimNitfRpcATag : public ossimNitfRpcBase
+{
+public:
+   
+   ossimNitfRpcATag();
+   
+protected:
+   
+TYPE_DATA   
+};
+
+#endif
diff --git a/ossim/include/ossim/support_data/ossimNitfRpcBTag.h b/ossim/include/ossim/support_data/ossimNitfRpcBTag.h
new file mode 100644
index 0000000..7a0617b
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfRpcBTag.h
@@ -0,0 +1,30 @@
+//*******************************************************************
+// Copyright (C) 2000 Intelligence Data Systems. 
+//
+// LICENSE: MIT
+//
+// see top level LICENSE.txt
+// 
+// Author: Garrett Potts
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfRpcBTag.h 23666 2015-12-14 20:01:22Z rashadkm $
+#ifndef ossimNitfRpcBTag_HEADER
+#define ossimNitfRpcBTag_HEADER 1
+
+#include <ossim/support_data/ossimNitfRpcBase.h>
+
+/**
+ * The layout of RPC00B is the same as RPC00A.  The difference is how the
+ * coefficients are used; hence, all the code is in the ossimNitfRpcBase class.
+ */
+class OSSIM_DLL ossimNitfRpcBTag : public ossimNitfRpcBase
+{
+public:
+   ossimNitfRpcBTag();
+
+TYPE_DATA   
+};
+
+#endif
diff --git a/ossim/include/ossim/support_data/ossimNitfRpcBase.h b/ossim/include/ossim/support_data/ossimNitfRpcBase.h
new file mode 100644
index 0000000..88bc1f2
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfRpcBase.h
@@ -0,0 +1,544 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+//
+// Description: Nitf base support data class for RPC tags.
+// 
+// Rational Polynomial Coefficient extension.
+//
+// See: http://164.214.2.51/ntb/baseline/docs/stdi0002/final.pdf
+//
+//********************************************************************
+// $Id: ossimNitfRpcBase.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimNitfRpcBase_HEADER
+#define ossimNitfRpcBase_HEADER 1
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+
+class OSSIM_DLL ossimNitfRpcBase : public ossimNitfRegisteredTag
+{
+ public:
+  enum 
+  {
+    SUCCESS_SIZE                         = 1,
+    ERROR_BIAS_SIZE                      = 7,
+    ERR_RAND_SIZE                        = 7,
+    LINE_OFFSET_SIZE                     = 6,
+    SAMPLE_OFFSET_SIZE                   = 5,
+    GEODETIC_LAT_OFFSET_SIZE             = 8,
+    GEODETIC_LON_OFFSET_SIZE             = 9,
+    GEODETIC_HEIGHT_OFFSET_SIZE          = 5,
+    LINE_SCALE_SIZE                      = 6,
+    SAMPLE_SCALE_SIZE                    = 5,
+    GEODETIC_LAT_SCALE_SIZE              = 8,
+    GEODETIC_LON_SCALE_SIZE              = 9,
+    GEODETIC_HEIGHT_SCALE_SIZE           = 5,
+    LINE_NUMERATOR_COEFFICIENT_SIZE      = 12,
+    LINE_NUMERATOR_COEFFICIENT_COUNT     = 20,
+    LINE_DENOMINATOR_COEFFICIENT_SIZE    = 12,
+    LINE_DENOMINATOR_COEFFICIENT_COUNT   = 20,
+    SAMPLE_NUMERATOR_COEFFICIENT_SIZE    = 12,
+    SAMPLE_NUMERATOR_COEFFICIENT_COUNT   = 20,
+    SAMPLE_DENOMINATOR_COEFFICIENT_SIZE  = 12,
+    SAMPLE_DENOMINATOR_COEFFICIENT_COUNT = 20
+    //                                  -----
+    //                                   1041
+  };
+
+  /** default constructor */
+  ossimNitfRpcBase();
+
+  /**
+   * Parse method.
+   *
+   * @param in Stream to parse.
+   */
+  virtual void parseStream(std::istream& in);
+
+  /**
+   * Write method.
+   *
+   * @param out Stream to write to.
+   */
+  virtual void writeStream(std::ostream& out);
+
+  /**
+   * Clears all string fields within the record to some default nothingness.
+   */
+  virtual void clearFields();
+
+  /**
+   * @return The success record as a boolean.
+   */
+  bool getSuccess()const;
+
+  /** @param success Sets data member theSuccess to success. */
+  void setSuccess(bool success);
+
+  /** @return theErrorBias as a string. */
+  ossimString getErrorBias()const;
+
+  //---
+  // The set methods below taking ossimString args will truncate and
+  // pad with spaces, as necessary, to match enumed size.
+  //---
+
+  /**
+   * @param errorBias Error bias to set theErrorBias to.  This will be
+   * converted to a string with two digit precision.
+   */
+  void setErrorBias(const ossim_float64& errorBias);
+
+  /** @param errorBias bias string to set theErrorBias to. */
+  void setErrorBias(const ossimString& errorBias);
+
+  /** @return theErrorBias as a string. */
+  ossimString getErrorRand()const;
+
+  /**
+   * @param errorRand The random error to set theErrRand to.  This will be
+   * converted to a string with two digit precision.
+   */
+  void setErrorRand(const ossim_float64& errorRand);
+
+  
+  /** @param errorRand error random  string to set theErrorRand to. */
+  void setErrorRand(const ossimString& errorRand);
+
+  /** @return The line offset as a string. */
+  ossimString getLineOffset()const;
+
+  /**
+   * @param lineOffset Sets the line offset to a string truncated to an int.
+   */
+  void setLineOffset(ossim_uint32 lineOffset);
+
+  /**
+   * @param lineOffset Sets theLineOffset to lineOffset string.
+   */
+  void setLineOffset(const ossimString& lineOffset);
+
+  /** @return The sample offset as a string. */
+  ossimString getSampleOffset()const;
+
+  /**
+   * @param sampleOffset Sets the sample offset to a string truncated to an
+   * int.
+   */
+  void setSampleOffset(ossim_uint32 sampleOffset);
+
+  /** @param sampleOffset Sets the sample offset to a string. */
+  void setSampleOffset(const ossimString& sampleOffset);
+
+  /** @return Geodetic latitude offset as a string. */
+  ossimString getGeodeticLatOffset()const;
+
+  /**
+   * @param geodeticLatOffset Value to Set the geodedic latitude offset to.
+   * Converted to a string with four digit precision.
+   */
+  void setGeodeticLatOffset(const ossim_float64& geodeticLatOffset);
+
+  /**
+   * @param geodeticLatOffset geodedic latitude offset string to set
+   * theGeodeticLatOffset to.
+   */
+  void setGeodeticLatOffset(const ossimString& geodeticLatOffset);
+
+  /** @return Geodetic longitude offset as a string. */
+  ossimString getGeodeticLonOffset()const;
+
+  /**
+   * @param geodeticLonOffset Value to Set the geodedic longitude offset to.
+   * Converted to a string with four digit precision.
+   */
+  void setGeodeticLonOffset(const ossim_float64& geodeticLonOffset);
+
+  /**
+   * @param geodeticLonOffset Value to Set the geodedic longitude offset to.
+   */
+  void setGeodeticLonOffset(const ossimString& geodeticLonOffset);
+
+  /** @return Geodetic height offset as a string. */
+  ossimString getGeodeticHeightOffset()const;
+
+  /**
+   * @param geodeticHeightOffset value to Set the height offset to.
+   * Converted to a string truncated to an int.
+   */
+  void setGeodeticHeightOffset(ossim_int32 geodeticHeightOffset);
+  
+  /** @param geodeticHeightOffset value to Set the height offset to. */
+  void setGeodeticHeightOffset(const ossimString& geodeticHeightOffset);
+
+  /** @return The line scale as a string. */
+  ossimString getLineScale()const;
+  
+  /**
+   * @param lineScale The value to set the line scale to.
+   * Converted to a string.
+   */
+  void setLineScale(ossim_uint32 lineScale);
+
+  /**
+   * @param lineScale The value to set the line scale to.
+   */
+  void setLineScale(const ossimString& lineScale);
+
+  /**
+   * @return the sample scale as a string.
+   */
+  ossimString getSampleScale()const;
+
+  /**
+   * @param sampleScale The value to set the sample scale to.
+   * Converted to a string truncated to an int.
+   */
+  void setSampleScale(ossim_uint32 sampleScale);
+
+  /**
+   * @param sampleScale The value to set the sample scale to.
+   */
+  void setSampleScale(const ossimString& sampleScale);
+
+  /** @return The Geodetic latitude scale as a string. */
+  ossimString getGeodeticLatScale()const;
+
+  /**
+   * @param geodeticLatScale The value to set the geodedic latitude scale to.
+   * Converted to a string with four digit precision.
+   */
+  void setGeodeticLatScale(const ossim_float64& geodeticLatScale);
+
+  /**
+   * @param geodeticLatScale The value to set the geodedic latitude scale to.
+   */
+  void setGeodeticLatScale(const ossimString& geodeticLatScale);
+
+  /** @return Geodetic longitude scale as a string. */
+  ossimString getGeodeticLonScale()const;
+
+  /**
+   * @param geodeticLonScale The value to set the geodedic longitude scale to.
+   * Converted to a string with four digit precision.
+   */
+  void setGeodeticLonScale(const ossim_float64& geodeticLonScale);
+
+  /**
+   * @param geodeticLonScale The value to set the geodedic longitude scale to.
+   */
+  void setGeodeticLonScale(const ossimString& geodeticLonScale);
+
+  /** @return The geodetic height scale as a string. */
+  ossimString getGeodeticHeightScale()const;
+
+  /**
+   * @param geodeticHeightScale The value to set the height scale to.
+   * Converted to a string truncated to an int.
+   */
+  void setGeodeticHeightScale(ossim_int32 geodeticHeightScale);
+  
+  /**
+   * @param geodeticHeightScale The value to set the height scale to.
+   */
+  void setGeodeticHeightScale(const ossimString& geodeticHeightScale);
+
+  /**
+   * @param idx Index of line numerator coefficient to get.
+   * Range: 0 - 19
+   *
+   * @return The line numerator coefficient as a string.
+   */
+  ossimString getLineNumeratorCoeff(ossim_uint32 idx)const;
+
+  /**
+   * @param coeff This should be an array of 20 line numerator coefficients.
+   * Coefficients will be converted to a scientific string to conform to
+   * specification.
+   *
+   * @note if (coeff.size() != 20) no action is taken.
+   */  
+  void setLineNumeratorCoeff(const std::vector<ossim_float64>& coeff);
+  
+  /**
+   * @param idx index of line numerator coefficient to set.
+   * Range: 0 - 19
+   *
+   * @param coeff Value to set line numerator coefficient to for
+   * idx or index.
+   */  
+  void setLineNumeratorCoeff(ossim_uint32 idx,
+                             const ossimString& coeff);
+
+  /**
+   * @param idx index of line denominator coefficient to get.
+   * Range: 0 - 19
+   *
+   * @return line  denominator coefficient as a string.
+   */
+  ossimString getLineDenominatorCoeff(ossim_uint32 idx)const;
+  
+  /**
+   * @param coeff This should be an array of 20 line denominator coefficients.
+   * Coefficients will be converted to a scientific string to conform to
+   * specification.
+   *
+   * @note if (coeff.size() != 20) no action is taken.
+   */  
+  void setLineDenominatorCoeff(const std::vector<ossim_float64>& coeff);
+  
+  /**
+   * @param idx index of line denominator coefficient to set.
+   * Range: 0 - 19
+   *
+   * @param lineDenominatorCoeff Value to set line denominator coefficient
+   * to for idx or index.
+   */  
+  void setLineDenominatorCoeff(ossim_uint32 idx,
+                               const ossimString& coeff);
+
+  /**
+   * @param idx Index of sample numerator coefficient to get.
+   * Range: 0 - 19
+   *
+   * @return The sample numerator coefficient as a string.
+   */
+  ossimString getSampleNumeratorCoeff(ossim_uint32 idx)const;
+
+  /**
+   * @param coeff This should be an array of 20 sample numerator coefficients.
+   * Coefficients will be converted to a scientific string to conform to
+   * specification.
+   *
+   * @note if (coeff.size() != 20) no action is taken.
+   */  
+  void setSampleNumeratorCoeff(const std::vector<ossim_float64>& coeff);
+  
+  /**
+   * @param idx index of sample numerator coefficient to set.
+   * Range: 0 - 19
+   *
+   * @param coeff Value to set sample numerator coefficient to for
+   * idx or index.
+   */  
+  void setSampleNumeratorCoeff(ossim_uint32 idx,
+                             const ossimString& coeff);
+
+  /**
+   * @param idx index of sample denominator coefficient to get.
+   * Range: 0 - 19
+   *
+   * @return sample  denominator coefficient as a string.
+   */
+  ossimString getSampleDenominatorCoeff(ossim_uint32 idx)const;
+  
+  /**
+   * @param coeff This should be an array of 20 sample denominator coefficients.
+   * Coefficients will be converted to a scientific string to conform to
+   * specification.
+   *
+   * @note if (coeff.size() != 20) no action is taken.
+   */  
+  void setSampleDenominatorCoeff(const std::vector<ossim_float64>& coeff);
+  
+  /**
+   * @param idx index of sample denominator coefficient to set.
+   * Range: 0 - 19
+   *
+   * @param sampleDenominatorCoeff Value to set sample denominator coefficient
+   * to for idx or index.
+   */  
+  void setSampleDenominatorCoeff(ossim_uint32 idx,
+                               const ossimString& coeff);
+
+   /**
+    * @brief Print method that outputs a key/value type format
+    * adding prefix to keys.
+    * @param out Stream to output to.
+    * @param prefix Prefix added to key like "image0.";
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix=std::string()) const;
+
+  virtual void setProperty(ossimRefPtr<ossimProperty> property);
+  virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+  virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+protected:
+
+  /**
+   * FIELD: SUCCESS
+   *
+   * Required 1 byte field.
+   * 
+   * Value is 1
+   * 
+   */
+  char theSuccess[SUCCESS_SIZE+1];
+   
+  /**
+   * FIELD: ERR_BIAS
+   *
+   * required 7 byte field
+   * 
+   * Error - Bias. 68% non time-varying error estimate assumes
+   * correlated images.
+   *
+   * Values range from 0000.00 to 9999.99 meters
+   */
+  char theErrorBias[ERROR_BIAS_SIZE+1];
+
+  /**
+   * FIELD ERR_RAND
+   *
+   * Required 7 byte field
+   * 
+   * Error - Random. 68% time-varying error estimate assumes
+   * correlated images. 0000.00 to 9999.99 meters
+   */
+  char theErrRand[ERR_RAND_SIZE+1];
+
+  /**
+   * FIELD: LINE_OFF
+   *
+   * required 6 byte field.
+   * 
+   * value is in pixels and ranges from 000000-999999
+   */
+  char theLineOffset[LINE_OFFSET_SIZE+1];
+
+  /**
+   * FIELD: SAMP_OFF
+   *
+   * required 5 byte field.
+   *
+   * value is in pixels and ranges from 00000-99999
+   */
+  char theSampleOffset[SAMPLE_OFFSET_SIZE+1];
+
+  /**
+   * FIELD: LAT_OFF
+   *
+   * required 8 byte field.
+   *
+   * Holds the lat offset in degrees and ranges from +-90.0000
+   */
+  char theGeodeticLatOffset[GEODETIC_LAT_OFFSET_SIZE+1];
+
+  /**
+   * FIELD: LONG_OFF
+   *
+   * required 9 byte field.
+   *
+   * holds the lon offset in degrees and ranges from +-180.0000
+   */
+  char theGeodeticLonOffset[GEODETIC_LON_OFFSET_SIZE+1];
+
+  /**
+   * FIELD: HEIGHT_OFF
+   *
+   * required 5 byte field.
+   *
+   * holds the height offset in meters and ranges from +-9999
+   */
+  char theGeodeticHeightOffset[GEODETIC_HEIGHT_OFFSET_SIZE+1];
+
+  /**
+   * FIELD: LINE_SCALE
+   *
+   * required 6 byte field.
+   *
+   * holds the line scale in pixels and ranges from 000001-999999
+   * 
+   */
+  char theLineScale[LINE_SCALE_SIZE+1];
+
+  /**
+   * FIELD: SAMP_SCALE
+   *
+   * required 5 byte field.
+   *
+   * holds the line scale in pixels and ranges from 00001-99999
+   * 
+   */
+  char theSampleScale[SAMPLE_SCALE_SIZE+1];
+
+  /**
+   * FIELD: LAT_SCALE
+   *
+   * required 8 byte field
+   *
+   * holds the lat scale in degrees and ranges from +-90.0000 degrees
+   */
+  char theGeodeticLatScale[GEODETIC_LAT_SCALE_SIZE+1];
+
+  /**
+   * FIELD: LON_SCALE
+   *
+   * required 9 byte field
+   *
+   * holds the lon scale in degrees and ranges from +-180.0000 degrees
+   */
+  char theGeodeticLonScale[GEODETIC_LON_SCALE_SIZE+1];
+
+  /**
+   * FIELD: HEIGHT_SCALE
+   *
+   * required 5 byte field
+   *
+   * holds the geodetic height scale and ranges from +-9999 meters.
+   */
+  char theGeodeticHeightScale[GEODETIC_HEIGHT_SCALE_SIZE+1];
+
+  /**
+   * FIELD: LINE_NUM_COEFF_1 through LINE_NUM_COEFF_20
+   *
+   * Line Numerator Coefficients.
+   *
+   * required 12 byte field ranging �0.999999E�9 Twenty coefficients for the
+   * polynomial
+   *
+   */     
+  std::vector<ossimString> theLineNumeratorCoefficient;
+
+  /**
+   * FIELD: LINE_DEN_COEFF_1 through LINE_DEN_COEFF_20
+   *
+   * Line Denominato Coefficients.
+   *
+   * required 12 byte field ranging �0.999999E�9 Twenty coefficients for the
+   * polynomial
+   *
+   */     
+  std::vector<ossimString> theLineDenominatorCoefficient;
+
+  /**
+   * FIELD: SAMP_NUM_COEFF_1 through SAMP_NUM_COEFF_20
+   *
+   * samp Numerator Coefficients.
+   *
+   * required 12 byte field ranging �0.999999E�9 Twenty coefficients for the
+   * polynomial
+   *
+   */     
+  std::vector<ossimString> theSampleNumeratorCoefficient;
+
+  /**
+   * FIELD: SAMP_DEN_COEFF_1 through SAMP_DEN_COEFF_20
+   *
+   * samp Denominator Coefficients.
+   *
+   * required 12 byte field ranging �0.999999E�9 Twenty coefficients for the
+   * polynomial
+   *
+   */     
+  std::vector<ossimString> theSampleDenominatorCoefficient;
+
+TYPE_DATA   
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimNitfRpfTagFactory.h b/ossim/include/ossim/support_data/ossimNitfRpfTagFactory.h
new file mode 100644
index 0000000..6fc4d27
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfRpfTagFactory.h
@@ -0,0 +1,40 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// LICENSE: MIT  see top level LICENSE.txt
+// 
+// Author: Garrett Potts
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfRpfTagFactory.h 23666 2015-12-14 20:01:22Z rashadkm $
+#ifndef ossimNitfRpfTagFactory_HEADER
+#define ossimNitfRpfTagFactory_HEADER 1
+
+#include <ossim/support_data/ossimNitfTagFactory.h>
+class ossimNitfRegisteredTag;
+
+class ossimNitfRpfTagFactory : public ossimNitfTagFactory
+{
+public:
+   virtual ~ossimNitfRpfTagFactory();
+   static ossimNitfRpfTagFactory* instance();
+   virtual ossimRefPtr<ossimNitfRegisteredTag> create(const ossimString &tagName)const;
+   
+protected:
+   ossimNitfRpfTagFactory();
+
+private:
+   /*!
+    * Hide this.
+    */
+   ossimNitfRpfTagFactory(const ossimNitfRpfTagFactory & /* rhs */){}
+
+   /*!
+    * Hide this.
+    */ 
+   ossimNitfRpfTagFactory& operator =(const ossimNitfRpfTagFactory & /* rhs */){return *this;}
+
+TYPE_DATA
+};
+#endif
diff --git a/ossim/include/ossim/support_data/ossimNitfRsmecaTag.h b/ossim/include/ossim/support_data/ossimNitfRsmecaTag.h
new file mode 100644
index 0000000..e3ea143
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfRsmecaTag.h
@@ -0,0 +1,252 @@
+//---
+// File: ossimNitfRsmecaTag.h
+//---
+#ifndef ossimNitfRsmecaTag_HEADER
+#define ossimNitfRsmecaTag_HEADER 1
+
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+#include <vector>
+
+/**
+ * @class ossimNitfRsmecaIsg
+ * RSM Error Covariance: RSM indirect error covariance data.
+ * RFC NTB 055, STDI-0002-1 v4.0, Appendix U: RSM
+ */
+class ossimNitfRsmecaIsg
+{
+public:
+   enum
+   {
+      NUMOPG_SIZE  = 2,
+      FLOAT21_SIZE = 21,
+      TCDF_SIZE    = 1,
+      NCSEG_SIZE   = 1
+   };
+
+   ossimNitfRsmecaIsg();
+
+   /** @brief copy constructor */
+   ossimNitfRsmecaIsg(const ossimNitfRsmecaIsg& obj);
+   
+   /** @brief assignment operator */
+   const ossimNitfRsmecaIsg& operator=(const ossimNitfRsmecaIsg& rhs);
+   
+   void parseStream(std::istream& in);
+   
+   void writeStream(std::ostream& out);
+   
+   void clearFields();
+   
+   std::ostream& print( std::ostream& out,
+                        const std::string& prefix=std::string(),
+                        ossim_uint32 index=0) const;
+   
+protected:
+   char m_numopg[NUMOPG_SIZE+1];
+   std::vector<ossimString> m_errcvg;
+   char m_tcdf[TCDF_SIZE+1];
+   char m_ncseg[NCSEG_SIZE+1];
+   std::vector<ossimString> m_corseg;
+   std::vector<ossimString> m_tauseg;
+   ossim_uint32 m_errCovNum;
+   ossim_uint32 m_opgNum;
+   ossim_uint32 m_corSegNum;
+};
+
+class OSSIM_DLL ossimNitfRsmecaTag : public ossimNitfRegisteredTag
+{
+public:
+   enum 
+   {
+      IID_SIZE     = 80,
+      EDITION_SIZE = 40,
+      TID_SIZE     = 40,
+      INCLIC_SIZE  = 1,
+      INCLUC_SIZE  = 1,
+      NPAR_SIZE    = 2,
+      NPARO_SIZE   = 2,
+      IGN_SIZE     = 2,
+      CVDATE_SIZE  = 8,
+      FLOAT21_SIZE = 21,
+      IR_SIZE      = 2,
+      IC_SIZE      = 2,
+      G_SIZE       = 2,
+      NUMOPG_SIZE  = 2,
+      TCDF_SIZE    = 1,
+      NCSEG_SIZE   = 1,
+      UNCSR_SIZE   = 1,
+      UNCSC_SIZE   = 1
+  };
+
+   ossimNitfRsmecaTag();
+   
+   virtual void parseStream(std::istream& in);
+   
+   virtual void writeStream(std::ostream& out);
+   
+   virtual void clearFields();
+   
+   virtual std::ostream& print( std::ostream& out,
+                                const std::string& prefix=std::string() ) const;
+
+   ossimString getIid() const;
+   ossimString getEdition() const;
+   ossimString getTid() const;
+   ossimString getInclic() const;
+   ossimString getIncluc() const;
+   ossimString getNpar() const;
+   ossimString getNparo() const;
+   ossimString getIgn() const;
+   ossimString getCvdate() const;
+   ossimString getXuol() const;
+   ossimString getYuol() const;
+   ossimString getZuol() const;
+   ossimString getXuxl() const;
+   ossimString getXuyl() const;
+   ossimString getXuzl() const;
+   ossimString getYuxl() const;
+   ossimString getYuyl() const;
+   ossimString getYuzl() const;
+   ossimString getZuxl() const;
+   ossimString getZuyl() const;
+   ossimString getZuzl() const;
+   ossimString getIro() const;
+   ossimString getIrx() const;
+   ossimString getIry() const;
+   ossimString getIrz() const;
+   ossimString getIrxx() const;
+   ossimString getIrxy() const;
+   ossimString getIrxz() const;
+   ossimString getIryy() const;
+   ossimString getIryz() const;
+   ossimString getIrzz() const;
+   ossimString getIco() const;
+   ossimString getIcx() const;
+   ossimString getIcy() const;
+   ossimString getIcz() const;
+   ossimString getIcxx() const;
+   ossimString getIcxy() const;
+   ossimString getIcxz() const;
+   ossimString getIcyy() const;
+   ossimString getIcyz() const;
+   ossimString getIczz() const;
+   ossimString getGxo() const;
+   ossimString getGyo() const;
+   ossimString getGzo() const;
+   ossimString getGxr() const;
+   ossimString getGyr() const;
+   ossimString getGzr() const;
+   ossimString getGs() const;
+   ossimString getGxx() const;
+   ossimString getGxy() const;
+   ossimString getGxz() const;
+   ossimString getGyx() const;
+   ossimString getGyy() const;
+   ossimString getGyz() const;
+   ossimString getGzx() const;
+   ossimString getGzy() const;
+   ossimString getGzz() const;
+   
+   ossimNitfRsmecaIsg getIsg(ossim_uint32 index) const;
+
+   ossimString getMap(ossim_uint32 index) const;
+   ossimString getUrr() const;
+   ossimString getUrc() const;
+   ossimString getUcc() const;
+   ossimString getUncsr() const;
+   ossimString getUcorsr(ossim_uint32 index) const;
+   ossimString getUtausr(ossim_uint32 index) const;
+   ossimString getUncsc() const;
+   ossimString getUcorsc(ossim_uint32 index) const;
+   ossimString getUtausc(ossim_uint32 index) const;
+   bool        getInclicFlag() const;
+   bool        getInclucFlag() const;
+   ossimString getIgnNum() const;
+   ossimString getMapNum() const;
+   ossimString getRowCorSegNum() const;
+   ossimString getColCorSegNum() const;
+   
+protected:
+   char m_iid[IID_SIZE+1];
+   char m_edition[EDITION_SIZE+1];
+   char m_tid[TID_SIZE+1];
+   char m_inclic[INCLIC_SIZE+1];
+   char m_incluc[INCLUC_SIZE+1];
+   char m_npar[NPAR_SIZE+1];
+   char m_nparo[NPARO_SIZE+1];
+   char m_ign[IGN_SIZE+1];
+   char m_cvdate[CVDATE_SIZE+1];
+   char m_xuol[FLOAT21_SIZE+1];
+   char m_yuol[FLOAT21_SIZE+1];
+   char m_zuol[FLOAT21_SIZE+1];
+   char m_xuxl[FLOAT21_SIZE+1];
+   char m_xuyl[FLOAT21_SIZE+1];
+   char m_xuzl[FLOAT21_SIZE+1];
+   char m_yuxl[FLOAT21_SIZE+1];
+   char m_yuyl[FLOAT21_SIZE+1];
+   char m_yuzl[FLOAT21_SIZE+1];
+   char m_zuxl[FLOAT21_SIZE+1];
+   char m_zuyl[FLOAT21_SIZE+1];
+   char m_zuzl[FLOAT21_SIZE+1];
+   char m_iro[IR_SIZE+1];
+   char m_irx[IR_SIZE+1];
+   char m_iry[IR_SIZE+1];
+   char m_irz[IR_SIZE+1];
+   char m_irxx[IR_SIZE+1];
+   char m_irxy[IR_SIZE+1];
+   char m_irxz[IR_SIZE+1];
+   char m_iryy[IR_SIZE+1];
+   char m_iryz[IR_SIZE+1];
+   char m_irzz[IR_SIZE+1];
+   char m_ico[IC_SIZE+1];
+   char m_icx[IC_SIZE+1];
+   char m_icy[IC_SIZE+1];
+   char m_icz[IC_SIZE+1];
+   char m_icxx[IC_SIZE+1];
+   char m_icxy[IC_SIZE+1];
+   char m_icxz[IC_SIZE+1];
+   char m_icyy[IC_SIZE+1];
+   char m_icyz[IC_SIZE+1];
+   char m_iczz[IC_SIZE+1];
+   char m_gxo[G_SIZE+1];
+   char m_gyo[G_SIZE+1];
+   char m_gzo[G_SIZE+1];
+   char m_gxr[G_SIZE+1];
+   char m_gyr[G_SIZE+1];
+   char m_gzr[G_SIZE+1];
+   char m_gs[G_SIZE+1];
+   char m_gxx[G_SIZE+1];
+   char m_gxy[G_SIZE+1];
+   char m_gxz[G_SIZE+1];
+   char m_gyx[G_SIZE+1];
+   char m_gyy[G_SIZE+1];
+   char m_gyz[G_SIZE+1];
+   char m_gzx[G_SIZE+1];
+   char m_gzy[G_SIZE+1];
+   char m_gzz[G_SIZE+1];
+
+   std::vector<ossimNitfRsmecaIsg> m_isg;
+   std::vector<ossimString> m_map;
+
+   char m_urr[FLOAT21_SIZE+1];
+   char m_urc[FLOAT21_SIZE+1];
+   char m_ucc[FLOAT21_SIZE+1];
+   char m_uncsr[2];
+   std::vector<ossimString> m_ucorsr;
+   std::vector<ossimString> m_utausr;
+   char m_uncsc[2];
+   std::vector<ossimString> m_ucorsc;
+   std::vector<ossimString> m_utausc;
+
+   bool m_inclicFlag;
+   bool m_inclucFlag;
+   ossim_uint32 m_ignNum;
+   ossim_uint32 m_mapNum;
+   ossim_uint32 m_rowCorSegNum;
+   ossim_uint32 m_colCorSegNum;
+
+TYPE_DATA
+   
+}; // End: class ossimNitfRsmecaTag
+
+#endif /* #ifndef ossimNitfRsmecaTag_HEADER */
diff --git a/ossim/include/ossim/support_data/ossimNitfRsmidaTag.h b/ossim/include/ossim/support_data/ossimNitfRsmidaTag.h
new file mode 100755
index 0000000..ba7371f
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfRsmidaTag.h
@@ -0,0 +1,233 @@
+//---
+// File: ossimNitfRsmidaTag.h
+//---
+#ifndef ossimNitfRsmidaTag_HEADER
+#define ossimNitfRsmidaTag_HEADER 1
+
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+
+/**
+ * @class ossimNitfRsmidaTag
+ * RSM Identification: Id's, time-of-image model, optional illumination model,
+ * footprint information.
+ */
+class OSSIM_DLL ossimNitfRsmidaTag : public ossimNitfRegisteredTag
+{
+public:
+   enum
+   {
+      IID_SIZE     = 80,
+      EDITION_SIZE = 40,
+      ISID_SIZE    = 40,
+      SID_SIZE     = 40,
+      STID_SIZE    = 40,
+      YEAR_SIZE    = 4,
+      MONTH_SIZE   = 2,
+      DAY_SIZE     = 2,
+      HOUR_SIZE    = 2,
+      MINUTE_SIZE  = 2,
+      SECOND_SIZE  = 9,
+      NRG_SIZE     = 8,
+      NCG_SIZE     = 8,
+      FLOAT21_SIZE = 21,
+      GRNDD_SIZE   = 1,
+      FULL_SIZE    = 8,
+      MIN_SIZE     = 8,
+      MAX_SIZE     = 8,
+      CEL_SIZE     = 1628
+   };
+   ossimNitfRsmidaTag();
+
+   virtual void parseStream(std::istream& in);
+   virtual void writeStream(std::ostream& out);
+
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix=std::string()) const;
+   virtual void clearFields();
+
+   ossimString getIid() const;
+   ossimString getEdition() const;
+   ossimString getIsid() const;
+   ossimString getSid() const;
+   ossimString getStid() const;
+   ossimString getYear() const;
+   ossimString getMonth() const;
+   ossimString getDay() const;
+   ossimString getHour() const;
+   ossimString getMinute() const;
+   ossimString getSecond() const;
+   ossimString getNrg() const;
+   ossimString getNcg() const;
+   ossimString getTrg() const;
+   ossimString getTcg() const;
+   ossimString getGrndd() const;
+   
+   ossimString getXuor() const;
+   ossimString getYuor() const;
+   ossimString getZuor() const;
+   ossimString getXuxr() const;
+   ossimString getXuyr() const;
+   ossimString getXuzr() const;
+   ossimString getYuxr() const;
+   ossimString getYuyr() const;
+   ossimString getYuzr() const;
+   ossimString getZuxr() const;
+   ossimString getZuyr() const;
+   ossimString getZuzr() const;
+   
+   ossimString getV1x() const;
+   ossimString getV1y() const;
+   ossimString getV1z() const;
+   ossimString getV2x() const;
+   ossimString getV2y() const;
+   ossimString getV2z() const;
+   ossimString getV3x() const;
+   ossimString getV3y() const;
+   ossimString getV3z() const;
+   ossimString getV4x() const;
+   ossimString getV4y() const;
+   ossimString getV4z() const;
+   ossimString getV5x() const;
+   ossimString getV5y() const;
+   ossimString getV5z() const;
+   ossimString getV6x() const;
+   ossimString getV6y() const;
+   ossimString getV6z() const;
+   ossimString getV7x() const;
+   ossimString getV7y() const;
+   ossimString getV7z() const;
+   ossimString getV8x() const;
+   ossimString getV8y() const;
+   ossimString getV8z() const;
+   
+   ossimString getGrpx() const;
+   ossimString getGrpy() const;
+   ossimString getGrpz() const;
+
+   ossimString getFullr() const;
+   ossimString getFullc() const;
+
+   ossimString getMinr() const;
+   ossimString getMaxr() const;
+   ossimString getMinc() const;
+   ossimString getMaxc() const;
+
+   ossimString getIe0() const;
+   ossimString getIer() const;
+   ossimString getIec() const;
+   ossimString getIerr() const;
+   ossimString getIerc() const;
+   ossimString getIecc() const;
+   ossimString getIa0() const;
+   ossimString getIar() const;
+   ossimString getIac() const;
+   ossimString getIarr() const;
+   ossimString getIarc() const;
+   ossimString getIacc() const;
+
+   ossimString getSpx() const;
+   ossimString getSvx() const;
+   ossimString getSax() const;
+   ossimString getSpy() const;
+   ossimString getSvy() const;
+   ossimString getSay() const;
+   ossimString getSpz() const;
+   ossimString getSvz() const;
+   ossimString getSaz() const;
+
+protected:
+   char m_iid[IID_SIZE+1];
+   char m_edition[EDITION_SIZE+1];
+   char m_isid[ISID_SIZE+1];
+   char m_sid[SID_SIZE+1];
+   char m_stid[STID_SIZE+1];
+   char m_year[YEAR_SIZE+1];
+   char m_month[MONTH_SIZE+1];
+   char m_day[DAY_SIZE+1];
+   char m_hour[HOUR_SIZE+1];
+   char m_minute[MINUTE_SIZE+1];
+   char m_second[SECOND_SIZE+1];
+   char m_nrg[NRG_SIZE+1];
+   char m_ncg[NCG_SIZE+1];
+   char m_trg[FLOAT21_SIZE+1];
+   char m_tcg[FLOAT21_SIZE+1];
+   char m_grndd[GRNDD_SIZE+1];
+
+   char m_xuor[FLOAT21_SIZE+1];
+   char m_yuor[FLOAT21_SIZE+1];
+   char m_zuor[FLOAT21_SIZE+1];
+   char m_xuxr[FLOAT21_SIZE+1];
+   char m_xuyr[FLOAT21_SIZE+1];
+   char m_xuzr[FLOAT21_SIZE+1];
+   char m_yuxr[FLOAT21_SIZE+1];
+   char m_yuyr[FLOAT21_SIZE+1];
+   char m_yuzr[FLOAT21_SIZE+1];
+   char m_zuxr[FLOAT21_SIZE+1];
+   char m_zuyr[FLOAT21_SIZE+1];
+   char m_zuzr[FLOAT21_SIZE+1];
+
+   char m_v1x[FLOAT21_SIZE+1];
+   char m_v1y[FLOAT21_SIZE+1];
+   char m_v1z[FLOAT21_SIZE+1];
+   char m_v2x[FLOAT21_SIZE+1];
+   char m_v2y[FLOAT21_SIZE+1];
+   char m_v2z[FLOAT21_SIZE+1];
+   char m_v3x[FLOAT21_SIZE+1];
+   char m_v3y[FLOAT21_SIZE+1];
+   char m_v3z[FLOAT21_SIZE+1];
+   char m_v4x[FLOAT21_SIZE+1];
+   char m_v4y[FLOAT21_SIZE+1];
+   char m_v4z[FLOAT21_SIZE+1];
+   char m_v5x[FLOAT21_SIZE+1];
+   char m_v5y[FLOAT21_SIZE+1];
+   char m_v5z[FLOAT21_SIZE+1];
+   char m_v6x[FLOAT21_SIZE+1];
+   char m_v6y[FLOAT21_SIZE+1];
+   char m_v6z[FLOAT21_SIZE+1];
+   char m_v7x[FLOAT21_SIZE+1];
+   char m_v7y[FLOAT21_SIZE+1];
+   char m_v7z[FLOAT21_SIZE+1];
+   char m_v8x[FLOAT21_SIZE+1];
+   char m_v8y[FLOAT21_SIZE+1];
+   char m_v8z[FLOAT21_SIZE+1];
+
+   char m_grpx[FLOAT21_SIZE+1];
+   char m_grpy[FLOAT21_SIZE+1];
+   char m_grpz[FLOAT21_SIZE+1];
+
+   char m_fullr[FULL_SIZE+1];
+   char m_fullc[FULL_SIZE+1];
+
+   char m_minr[MIN_SIZE+1];
+   char m_maxr[MAX_SIZE+1];
+   char m_minc[MIN_SIZE+1];
+   char m_maxc[MAX_SIZE+1];
+
+   char m_ie0[FLOAT21_SIZE+1];
+   char m_ier[FLOAT21_SIZE+1];
+   char m_iec[FLOAT21_SIZE+1];
+   char m_ierr[FLOAT21_SIZE+1];
+   char m_ierc[FLOAT21_SIZE+1];
+   char m_iecc[FLOAT21_SIZE+1];
+   char m_ia0[FLOAT21_SIZE+1];
+   char m_iar[FLOAT21_SIZE+1];
+   char m_iac[FLOAT21_SIZE+1];
+   char m_iarr[FLOAT21_SIZE+1];
+   char m_iarc[FLOAT21_SIZE+1];
+   char m_iacc[FLOAT21_SIZE+1];
+
+   char m_spx[FLOAT21_SIZE+1];
+   char m_svx[FLOAT21_SIZE+1];
+   char m_sax[FLOAT21_SIZE+1];
+   char m_spy[FLOAT21_SIZE+1];
+   char m_svy[FLOAT21_SIZE+1];
+   char m_say[FLOAT21_SIZE+1];
+   char m_spz[FLOAT21_SIZE+1];
+   char m_svz[FLOAT21_SIZE+1];
+   char m_saz[FLOAT21_SIZE+1];
+
+TYPE_DATA
+   
+}; // End: class ossimNitfRsmidaTag
+
+#endif /* #ifndef ossimNitfRsmidaTag_HEADER */
diff --git a/ossim/include/ossim/support_data/ossimNitfRsmpcaTag.h b/ossim/include/ossim/support_data/ossimNitfRsmpcaTag.h
new file mode 100755
index 0000000..3702adc
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfRsmpcaTag.h
@@ -0,0 +1,129 @@
+//---
+// File: ossimNitfRsmpcaTag.h
+//---
+#ifndef ossimNitfRsmpcaTag_HEADER
+#define ossimNitfRsmpcaTag_HEADER 1
+
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+#include <ossim/base/ossimString.h>
+#include <vector>
+
+/**
+ * @class ossimNitfRsmpcaTag
+ * RSM Polynomial Coefficients: Polynomials coefficients for a section.
+ * RFC NTB 055, STDI-0002-1 v4.0, Appendix U: RSM
+ */
+class OSSIM_DLL ossimNitfRsmpcaTag : public ossimNitfRegisteredTag
+{
+public:
+   enum 
+   {
+      IID_SIZE      = 80,
+      EDITION_SIZE  = 40,
+      RSN_SIZE      = 3,
+      CSN_SIZE      = 3,
+      FLOAT21_SIZE  = 21, 
+      MAXPOWER_SIZE = 1,
+      NUMTERMS_SIZE = 3
+   };
+   
+   ossimNitfRsmpcaTag();
+   
+   virtual void parseStream(std::istream& in);
+   
+   virtual void writeStream(std::ostream& out);
+   
+   virtual void clearFields();
+   
+   virtual std::ostream& print( std::ostream& out,
+                                const std::string& prefix=std::string() ) const;
+   
+   ossimString getIid() const;
+   ossimString getEdition() const;
+   ossimString getRsn() const;
+   ossimString getCsn() const;
+   ossimString getRfep() const; 
+   ossimString getCfep() const;
+   ossimString getRnrmo() const;
+   ossimString getCnrmo() const;
+   ossimString getXnrmo() const;
+   ossimString getYnrmo() const;
+   ossimString getZnrmo() const;
+   ossimString getRnrmsf() const;
+   ossimString getCnrmsf() const;
+   ossimString getXnrmsf() const;
+   ossimString getYnrmsf() const;
+   ossimString getZnrmsf() const;
+   ossimString getRnpwrx() const;
+   ossimString getRnpwry() const;
+   ossimString getRnpwrz() const;
+   ossimString getRntrms() const;
+   ossimString getRnpcf(ossim_uint32 index) const;
+   ossimString getRdpwrx() const;
+   ossimString getRdpwry() const;
+   ossimString getRdpwrz() const;
+   ossimString getRdtrms() const;
+   ossimString getRdpcf(ossim_uint32 index) const;
+   ossimString getCnpwrx() const;
+   ossimString getCnpwry() const;
+   ossimString getCnpwrz() const;
+   ossimString getCntrms() const;
+   ossimString getCnpcf(ossim_uint32 index) const;
+   ossimString getCdpwrx() const;
+   ossimString getCdpwry() const;
+   ossimString getCdpwrz() const;
+   ossimString getCdtrms() const;
+   ossimString getCdpcf(ossim_uint32 index) const;
+   
+protected:
+   char m_iid[IID_SIZE+1];
+   char m_edition[EDITION_SIZE+1];
+   char m_rsn[RSN_SIZE+1];
+   char m_csn[CSN_SIZE+1];
+   char m_rfep[FLOAT21_SIZE+1];
+   char m_cfep[FLOAT21_SIZE+1];
+   char m_rnrmo[FLOAT21_SIZE+1];
+   char m_cnrmo[FLOAT21_SIZE+1];
+   char m_xnrmo[FLOAT21_SIZE+1];
+   char m_ynrmo[FLOAT21_SIZE+1];
+   char m_znrmo[FLOAT21_SIZE+1];
+   char m_rnrmsf[FLOAT21_SIZE+1];
+   char m_cnrmsf[FLOAT21_SIZE+1];
+   char m_xnrmsf[FLOAT21_SIZE+1];
+   char m_ynrmsf[FLOAT21_SIZE+1];
+   char m_znrmsf[FLOAT21_SIZE+1];
+   
+   char m_rnpwrx[MAXPOWER_SIZE+1];
+   char m_rnpwry[MAXPOWER_SIZE+1];
+   char m_rnpwrz[MAXPOWER_SIZE+1];
+   char m_rntrms[NUMTERMS_SIZE+1];
+   std::vector<ossimString> m_rnpcf;
+   
+   char m_rdpwrx[MAXPOWER_SIZE+1];
+   char m_rdpwry[MAXPOWER_SIZE+1];
+   char m_rdpwrz[MAXPOWER_SIZE+1];
+   char m_rdtrms[NUMTERMS_SIZE+1];
+   std::vector<ossimString> m_rdpcf;
+   
+   char m_cnpwrx[MAXPOWER_SIZE+1];
+   char m_cnpwry[MAXPOWER_SIZE+1];
+   char m_cnpwrz[MAXPOWER_SIZE+1];
+   char m_cntrms[NUMTERMS_SIZE+1];
+   std::vector<ossimString> m_cnpcf;
+   
+   char m_cdpwrx[MAXPOWER_SIZE+1];
+   char m_cdpwry[MAXPOWER_SIZE+1];
+   char m_cdpwrz[MAXPOWER_SIZE+1];
+   char m_cdtrms[NUMTERMS_SIZE+1];
+   std::vector<ossimString> m_cdpcf;
+   
+   ossim_uint32 m_rowNumNumTerms;
+   ossim_uint32 m_rowDenNumTerms;
+   ossim_uint32 m_colNumNumTerms;
+   ossim_uint32 m_colDenNumTerms;
+   
+TYPE_DATA
+   
+}; // End: class ossimNitfRsmpcaTag
+
+#endif /* #ifndef ossimNitfRsmpcaTag_HEADER */
diff --git a/ossim/include/ossim/support_data/ossimNitfRsmpiaTag.h b/ossim/include/ossim/support_data/ossimNitfRsmpiaTag.h
new file mode 100755
index 0000000..d8cc458
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfRsmpiaTag.h
@@ -0,0 +1,109 @@
+//---
+// File: ossimNitfRsmpiaTag.h
+//---
+#ifndef ossimNitfRsmpiaTag_HEADER
+#define ossimNitfRsmpiaTag_HEADER 1
+
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+
+class OSSIM_DLL ossimNitfRsmpiaTag : public ossimNitfRegisteredTag
+{
+public:
+   enum
+   {
+      IID_SIZE     = 80,
+      EDITION_SIZE = 40,
+      FLOAT21_SIZE = 21,
+      NIS_SIZE     = 3,
+      CEL_SIZE     = 591
+   };
+   
+   ossimNitfRsmpiaTag();
+
+   /**
+    * @brief Reads in tag from stream.
+    * @param in
+    */
+   virtual void parseStream(std::istream& in);
+
+   /**
+    * @brief Writes out tag to stream.
+    * @param out
+    */
+   virtual void writeStream(std::ostream& out);
+
+   /**
+    * @brief Memsets fields to space.  Null terminates fields.
+    */
+   virtual void clearFields();
+
+   /**
+    * @brief prints all fields.
+    * @param out Output stream.
+    * @param prefix e.g. "nitf.image0.".
+    */
+   virtual std::ostream& print( std::ostream& out,
+                                const std::string& prefix=std::string() ) const;
+
+   ossimString getIid() const;
+   ossimString getEdition() const;
+   ossimString getR0() const;
+   ossimString getRx() const;
+   ossimString getRy() const;
+   ossimString getRz() const;
+   ossimString getRxx() const;
+   ossimString getRxy() const;
+   ossimString getRxz() const;
+   ossimString getRyy() const;
+   ossimString getRyz() const;
+   ossimString getRzz() const;
+   ossimString getC0() const;
+   ossimString getCx() const;
+   ossimString getCy() const;
+   ossimString getCz() const;
+   ossimString getCxx() const;
+   ossimString getCxy() const;
+   ossimString getCxz() const;
+   ossimString getCyy() const;
+   ossimString getCyz() const;
+   ossimString getCzz() const;
+   ossimString getRnis() const;
+   ossimString getCnis() const;
+   ossimString getTnis() const;
+   ossimString getRssiz() const;
+   ossimString getCssiz() const;
+
+protected:
+   char m_iid[IID_SIZE+1];
+   char m_edition[EDITION_SIZE+1];
+   char m_r0[FLOAT21_SIZE+1];
+   char m_rx[FLOAT21_SIZE+1];
+   char m_ry[FLOAT21_SIZE+1];
+   char m_rz[FLOAT21_SIZE+1];
+   char m_rxx[FLOAT21_SIZE+1];
+   char m_rxy[FLOAT21_SIZE+1];
+   char m_rxz[FLOAT21_SIZE+1];
+   char m_ryy[FLOAT21_SIZE+1];
+   char m_ryz[FLOAT21_SIZE+1];
+   char m_rzz[FLOAT21_SIZE+1];
+   char m_c0[FLOAT21_SIZE+1];
+   char m_cx[FLOAT21_SIZE+1];
+   char m_cy[FLOAT21_SIZE+1];
+   char m_cz[FLOAT21_SIZE+1];
+   char m_cxx[FLOAT21_SIZE+1];
+   char m_cxy[FLOAT21_SIZE+1];
+   char m_cxz[FLOAT21_SIZE+1];
+   char m_cyy[FLOAT21_SIZE+1];
+   char m_cyz[FLOAT21_SIZE+1];
+   char m_czz[FLOAT21_SIZE+1];
+   char m_rnis[NIS_SIZE+1];
+   char m_cnis[NIS_SIZE+1];
+   char m_tnis[NIS_SIZE+1];
+   char m_rssiz[FLOAT21_SIZE+1];
+   char m_cssiz[FLOAT21_SIZE+1];
+
+TYPE_DATA
+   
+}; // End: class ossimNitfRsmpiaTag
+
+#endif /* #ifndef ossimNitfRsmpiaTag_HEADER */
diff --git a/ossim/include/ossim/support_data/ossimNitfSensraTag.h b/ossim/include/ossim/support_data/ossimNitfSensraTag.h
new file mode 100644
index 0000000..ba6863b
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfSensraTag.h
@@ -0,0 +1,269 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Walt Bunch
+//
+// Description: Nitf support class for SENSRA - Sensor parameters extension.
+// 
+//********************************************************************
+// $Id: ossimNitfSensraTag.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimNitfSensraTag_HEADER
+#define ossimNitfSensraTag_HEADER
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+
+class OSSIM_DLL ossimNitfSensraTag : public ossimNitfRegisteredTag
+{
+public:
+
+   enum
+   {
+      REF_ROW_SIZE         = 8,
+      REF_COL_SIZE         = 8,
+      SENSOR_MODEL_SIZE    = 6,
+      SENSOR_MOUNT_SIZE    = 3,
+      SENSOR_LOC_SIZE      = 21,
+      SENSOR_ALT_SRC_SIZE  = 1,
+      SENSOR_ALT_SIZE      = 6,
+      SENSOR_ALT_UNIT_SIZE = 1,
+      SENSOR_AGL_SIZE      = 5,
+      SENSOR_PITCH_SIZE    = 7,
+      SENSOR_ROLL_SIZE     = 8,
+      SENSOR_YAW_SIZE      = 8,
+      PLATFORM_PITCH_SIZE  = 7,
+      PLATFORM_ROLL_SIZE   = 8,
+      PLATFORM_HDG_SIZE    = 5,
+      GROUND_SPD_SRC_SIZE  = 1,
+      GROUND_SPEED_SIZE    = 6,
+      GROUND_SPD_UNIT_SIZE = 1,
+      GROUND_TRACK_SIZE    = 5,
+      VERTICAL_VEL_SIZE    = 5,
+      VERT_VEL_UNIT_SIZE   = 1,
+      SWATH_FRAMES_SIZE    = 4,
+      N_SWATHS_SIZE        = 4,
+      SPOT_NUM_SIZE        = 3
+      //                  -----
+      //                   132
+   };
+
+   ossimNitfSensraTag();
+   virtual ~ossimNitfSensraTag();
+
+   virtual void parseStream(std::istream& in);
+   virtual void writeStream(std::ostream& out);
+
+   virtual void clearFields();
+
+   /**
+    * @brief Print method that outputs a key/value type format
+    * adding prefix to keys.
+    * @param out Stream to output to.
+    * @param prefix Prefix added to key like "image0.";
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix) const;
+   
+  // The set methods below taking ossimString args will truncate and
+  // pad with spaces, as necessary, to match enumed size
+   void setRefRow(ossimString refRow);
+   ossimString getRefRow()const;
+   void setRefCol(ossimString refCol);
+   ossimString getRefCol()const;
+   void setSensorModel(ossimString sensorModel);
+   ossimString getSensorModel()const;
+   void setSensorMount(ossimString sensorMount);
+   ossimString getSensorMount()const;
+   void setSensorLoc(ossimString sensorLoc);
+   ossimString getSensorLoc()const;
+   void setSensorAltSrc(ossimString sensorAltSrc);
+   ossimString getSensorAltSrc()const;
+   void setSensorAlt(ossimString sensorAlt);
+   ossimString getSensorAlt()const;
+   void setSensorAltUnit(ossimString sensorAltUnit);
+   ossimString getSensorAltUnit()const;
+   void setSensorAgl(ossimString sensorAgl);
+   ossimString getSensorAgl()const;
+   void setSensorPitch(ossimString sensorPitch);
+   ossimString getSensorPitch()const;
+   void setSensorRoll(ossimString sensorRoll);
+   ossimString getSensorRoll()const;
+   void setSensorYaw(ossimString sensorYaw);
+   ossimString getSensorYaw()const;
+   void setPlatformPitch(ossimString platformPitch);
+   ossimString getPlatformPitch()const;
+   void setPlatformRoll(ossimString platformRoll);
+   ossimString getPlatformRoll()const;
+   void setPlatformHdg(ossimString platformHdg);
+   ossimString getPlatformHdg()const;
+   void setGroundSpdSrc(ossimString groundSpdSrc);
+   ossimString getGroundSpdSrc()const;
+   void setGroundSpeed(ossimString groundSpeed);
+   ossimString getGroundSpeed()const;
+   void setGroundSpdUnit(ossimString groundSpdUnit);
+   ossimString getGroundSpdUnit()const;
+   void setGroundTrack(ossimString groundTrack);
+   ossimString getGroundTrack()const;
+   void setVerticalVel(ossimString verticalVel);
+   ossimString getVerticalVel()const;
+   void setVertVelUnit(ossimString vertVelUnit);
+   ossimString getVertVelUnit()const;
+   void setSwathFrames(ossimString swathFrames);
+   ossimString getSwathFrames()const;
+   void setNSwaths(ossimString nSwaths);
+   ossimString getNSwaths()const;
+   void setSpotNum(ossimString spotNum);
+   ossimString getSpotNum()const;
+
+protected:
+
+   /**
+    * FIELD: REFROW
+    *
+    */
+   char theRefRow[REF_ROW_SIZE+1];
+
+   /**
+    * FIELD: REFCOL
+    *
+    */
+   char theRefCol[REF_COL_SIZE+1];
+
+   /**
+    * FIELD: SENSORMODEL
+    *
+    */
+   char theSensorModel[SENSOR_MODEL_SIZE+1];
+
+   /**
+    * FIELD: SENSORMOUNT
+    *
+    */
+   char theSensorMount[SENSOR_MOUNT_SIZE+1];
+
+   /**
+    * FIELD: SENSORLOC
+    *
+    */
+   char theSensorLoc[SENSOR_LOC_SIZE+1];
+
+   /**
+    * FIELD: SENSORALTSRC
+    *
+    */
+   char theSensorAltSrc[SENSOR_ALT_SRC_SIZE+1];
+
+   /**
+    * FIELD: SENSORALT
+    *
+    */
+   char theSensorAlt[SENSOR_ALT_SIZE+1];
+
+   /**
+    * FIELD: SENSORALTUNIT
+    *
+    */
+   char theSensorAltUnit[SENSOR_ALT_UNIT_SIZE+1];
+
+   /**
+    * FIELD: SENSORAGL
+    *
+    */
+   char theSensorAgl[SENSOR_AGL_SIZE+1];
+
+   /**
+    * FIELD: SENSORPITCH
+    *
+    */
+   char theSensorPitch[SENSOR_PITCH_SIZE+1];
+
+   /**
+    * FIELD: SENSORROLL
+    *
+    */
+   char theSensorRoll[SENSOR_ROLL_SIZE+1];
+
+   /**
+    * FIELD: SENSORYAW
+    *
+    */
+   char theSensorYaw[SENSOR_YAW_SIZE+1];
+
+   /**
+    * FIELD: PLATFORMPITCH
+    *
+    */
+   char thePlatformPitch[PLATFORM_PITCH_SIZE+1];
+
+   /**
+    * FIELD: PLATFORMROLL
+    *
+    */
+   char thePlatformRoll[PLATFORM_ROLL_SIZE+1];
+
+   /**
+    * FIELD: PLATFORMHDG
+    *
+    */
+   char thePlatformHdg[PLATFORM_HDG_SIZE+1];
+
+   /**
+    * FIELD: GROUNDSPDSRC
+    *
+    */
+   char theGroundSpdSrc[GROUND_SPD_SRC_SIZE+1];
+
+   /**
+    * FIELD: GROUNDSPEED
+    *
+    */
+   char theGroundSpeed[GROUND_SPEED_SIZE+1];
+
+   /**
+    * FIELD: GROUNDSPDUNIT
+    *
+    */
+   char theGroundSpdUnit[GROUND_SPD_UNIT_SIZE+1];
+
+   /**
+    * FIELD: GROUNDTRACK
+    *
+    */
+   char theGroundTrack[GROUND_TRACK_SIZE+1];
+
+   /**
+    * FIELD: VERTICALVEL
+    *
+    */
+   char theVerticalVel[VERTICAL_VEL_SIZE+1];
+
+   /**
+    * FIELD: VERTVELUNIT
+    *
+    */
+   char theVertVelUnit[VERT_VEL_UNIT_SIZE+1];
+
+   /**
+    * FIELD: SWATHFRAMES
+    *
+    */
+   char theSwathFrames[SWATH_FRAMES_SIZE+1];
+
+   /**
+    * FIELD: NSWATHS
+    *
+    */
+   char theNSwaths[N_SWATHS_SIZE+1];
+
+   /**
+    * FIELD: SPOTNUM
+    *
+    */
+   char theSpotNum[SPOT_NUM_SIZE+1];
+
+TYPE_DATA   
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimNitfStdidcTag.h b/ossim/include/ossim/support_data/ossimNitfStdidcTag.h
new file mode 100644
index 0000000..40f186d
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfStdidcTag.h
@@ -0,0 +1,204 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author:  Walt Bunch
+// 
+// Description:   NITF support data class for STDIDC - Standard ID extension.
+//
+// See:  STDI-000_v2.1 Table 7-3 for detailed description.
+// 
+//********************************************************************
+// $Id: ossimNitfStdidcTag.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimNitfStdidcTag_HEADER
+#define ossimNitfStdidcTag_HEADER 1
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+
+class OSSIM_DLL ossimNitfStdidcTag : public ossimNitfRegisteredTag
+{
+public:
+
+   enum
+   {
+      ACQ_DATE_SIZE         = 14,
+      MISSION_SIZE          = 14,
+      PASS_SIZE             = 2,
+      OP_NUM_SIZE           = 3,
+      START_SEGMENT_SIZE    = 2,
+      REPRO_NUM_SIZE        = 2,
+      REPLAY_REGEN_SIZE     = 3,
+      BLANK_FILL_SIZE       = 1,
+      START_COLUMN_SIZE     = 3,
+      START_ROW_SIZE        = 5,
+      END_SEGMENT_SIZE      = 2,
+      END_COLUMN_SIZE       = 3,
+      END_ROW_SIZE          = 5,
+      COUNTRY_SIZE          = 2,
+      WAC_SIZE              = 4,
+      LOCATION_SIZE         = 11,
+      FIELD17_SIZE          = 5,
+      FIELD18_SIZE          = 8
+      //                   -----
+      //                     89 bytes
+   };
+      
+   ossimNitfStdidcTag();
+   virtual ~ossimNitfStdidcTag();
+
+   virtual void parseStream(std::istream& in);
+   virtual void writeStream(std::ostream& out);
+
+   virtual void clearFields();
+
+  // The set methods below taking ossimString args will truncate and
+  // pad with spaces, as necessary, to match enumed size
+   void setAcqDate(ossimString acqDate);
+   ossimString getAcqDate()const;
+   void setMission(ossimString mission);
+   ossimString getMission()const;
+   void setPass(ossimString pass);
+   ossimString getPass()const;
+   void setOpNum(ossimString opNum);
+   ossimString getOpNum()const;
+   void setStartSegment(ossimString startSegment);
+   ossimString getStartSegment()const;
+   void setReproNum(ossimString reproNum);
+   ossimString getReproNum()const;
+   void setReplayRegen(ossimString replayRegen);
+   ossimString getReplayRegen()const;
+   void setBlankFill(ossimString blankFill);
+   ossimString getBlankFill()const;
+   void setStartColumn(ossimString startColumn);
+   ossimString getStartColumn()const;
+   void setStartRow(ossimString startRow);
+   ossimString getStartRow()const;
+   void setEndSegment(ossimString endSegment);
+   ossimString getEndSegment()const;
+   void setEndColumn(ossimString endColumn);
+   ossimString getEndColumn()const;
+   void setEndRow(ossimString endRow);
+   ossimString getEndRow()const;
+   void setCountry(ossimString country);
+   ossimString getCountry()const;
+   void setWac(ossimString wac);
+   ossimString getWac()const;
+   void setLocation(ossimString location);
+   ossimString getLocation()const;
+   void setField17(ossimString field17);
+   ossimString getField17()const;
+   void setField18(ossimString field18);
+   ossimString getField18()const;
+
+   /**
+    * @brief Print method that outputs a key/value type format
+    * adding prefix to keys.
+    * @param out Stream to output to.
+    * @param prefix Prefix added to key like "image0.";
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix=std::string()) const;
+   
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+
+
+protected:
+
+   /**
+    * FIELD: ACQDATE
+    */
+   char theAcqDate[ACQ_DATE_SIZE+1];
+   
+   /**
+    * FIELD: MISSION
+    */
+   char theMission[MISSION_SIZE+1];
+   
+   /**
+    * FIELD: PASS
+    */
+   char thePass[PASS_SIZE+1];
+   
+   /**
+    * FIELD: OPNUM
+    */
+   char theOpNum[OP_NUM_SIZE+1];
+   
+   /**
+    * FIELD: STARTSEGMENT
+    */
+   char theStartSegment[START_SEGMENT_SIZE+1];
+   
+   /**
+    * FIELD: REPRONUM
+    */
+   char theReproNum[REPRO_NUM_SIZE+1];
+   
+   /**
+    * FIELD: REPLAYREGEN
+    */
+   char theReplayRegen[REPLAY_REGEN_SIZE+1];
+   
+   /**
+    * FIELD: BLANKFILL
+    */
+   char theBlankFill[BLANK_FILL_SIZE+1];
+   
+   /**
+    * FIELD: STARTCOLUMN
+    */
+   char theStartColumn[START_COLUMN_SIZE+1];
+   
+   /**
+    * FIELD: STARTROW
+    */
+   char theStartRow[START_ROW_SIZE+1];
+   
+   /**
+    * FIELD: ENDSEGMENT
+    */
+   char theEndSegment[END_SEGMENT_SIZE+1];
+   
+   /**
+    * FIELD: ENDCOLUMN
+    */
+   char theEndColumn[END_COLUMN_SIZE+1];
+   
+   /**
+    * FIELD: ENDROW
+    */
+   char theEndRow[END_ROW_SIZE+1];
+   
+   /**
+    * FIELD: COUNTRY
+    */
+   char theCountry[COUNTRY_SIZE+1];
+   
+   /**
+    * FIELD: WAC
+    */
+   char theWac[WAC_SIZE+1];
+   
+   /**
+    * FIELD: LOCATION
+    */
+   char theLocation[LOCATION_SIZE+1];
+   
+   /**
+    * FIELD: FIELD17
+    */
+   char theField17[FIELD17_SIZE+1];
+   
+   /**
+    * FIELD: FIELD18
+    */
+   char theField18[FIELD18_SIZE+1];
+
+TYPE_DATA   
+};
+
+#endif
+
diff --git a/include/ossim/support_data/ossimNitfSymbolHeader.h b/ossim/include/ossim/support_data/ossimNitfSymbolHeader.h
similarity index 100%
rename from include/ossim/support_data/ossimNitfSymbolHeader.h
rename to ossim/include/ossim/support_data/ossimNitfSymbolHeader.h
diff --git a/include/ossim/support_data/ossimNitfSymbolHeaderV2_0.h b/ossim/include/ossim/support_data/ossimNitfSymbolHeaderV2_0.h
similarity index 100%
rename from include/ossim/support_data/ossimNitfSymbolHeaderV2_0.h
rename to ossim/include/ossim/support_data/ossimNitfSymbolHeaderV2_0.h
diff --git a/include/ossim/support_data/ossimNitfTagFactory.h b/ossim/include/ossim/support_data/ossimNitfTagFactory.h
similarity index 100%
rename from include/ossim/support_data/ossimNitfTagFactory.h
rename to ossim/include/ossim/support_data/ossimNitfTagFactory.h
diff --git a/ossim/include/ossim/support_data/ossimNitfTagFactoryRegistry.h b/ossim/include/ossim/support_data/ossimNitfTagFactoryRegistry.h
new file mode 100644
index 0000000..7a47b1b
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfTagFactoryRegistry.h
@@ -0,0 +1,49 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfTagFactoryRegistry.h 22875 2014-08-27 13:52:03Z dburken $
+#ifndef ossimNitfTagFactoryRegistry_HEADER
+#define ossimNitfTagFactoryRegistry_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+#include <vector>
+
+class ossimString;
+class ossimNitfTagFactory;
+
+class OSSIM_DLL ossimNitfTagFactoryRegistry
+{
+public:
+   virtual ~ossimNitfTagFactoryRegistry();
+   void registerFactory(ossimNitfTagFactory* aFactory);
+   void unregisterFactory(ossimNitfTagFactory* aFactory);
+   
+   static ossimNitfTagFactoryRegistry* instance();
+   
+   ossimRefPtr<ossimNitfRegisteredTag> create(const ossimString &tagName)const;
+   bool exists(ossimNitfTagFactory* factory)const;
+   
+protected:
+   ossimNitfTagFactoryRegistry();
+
+private:
+   /** hidden copy constructory */
+   ossimNitfTagFactoryRegistry(const ossimNitfTagFactoryRegistry& factory);
+
+   /** hidden operator= */
+   const ossimNitfTagFactoryRegistry& operator=(
+      const ossimNitfTagFactoryRegistry& factory);
+
+   void initializeDefaults();
+   
+   std::vector<ossimNitfTagFactory*> theFactoryList;
+};
+
+#endif
diff --git a/ossim/include/ossim/support_data/ossimNitfTagInformation.h b/ossim/include/ossim/support_data/ossimNitfTagInformation.h
new file mode 100644
index 0000000..7830ac6
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfTagInformation.h
@@ -0,0 +1,99 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfTagInformation.h 22418 2013-09-26 15:01:12Z gpotts $
+#ifndef ossimNitfTagInformation_HEADER
+#define ossimNitfTagInformation_HEADER
+
+#include <ossim/base/ossimObject.h>
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+
+class ossimString;
+
+class OSSIMDLLEXPORT ossimNitfTagInformation : public ossimObject
+{
+public:
+   ossimNitfTagInformation(ossimRefPtr<ossimNitfRegisteredTag> tagData = 0);
+   virtual ~ossimNitfTagInformation();
+   
+   virtual void parseStream(std::istream& in);
+   virtual void writeStream(std::ostream& out);
+
+   void setTagName(const ossimString& tagName);
+   void setTagLength(ossim_uint32 tagLength);
+
+   /**
+    * Length of the 5 byte tag length the 6 byte tag name and
+    * the data length.
+    * So we have Data length + 11 bytes.
+    */
+   ossim_uint32 getTotalTagLength()const;
+
+   /**
+    * Should return the value of theTagLength which is the length of
+    * the data in bytes.
+    */
+   ossim_uint32 getTagLength()const;
+   ossim_uint64 getTagOffset()const;
+   ossim_uint64 getTagDataOffset()const;
+   
+   ossimString   getTagName()const;
+   virtual std::ostream& print(std::ostream& out)const;
+   void clearFields();
+   
+   ossimRefPtr<ossimNitfRegisteredTag> getTagData();
+   const ossimRefPtr<ossimNitfRegisteredTag> getTagData()const;
+   void setTagData(ossimRefPtr<ossimNitfRegisteredTag> tagData);
+   ossimString getTagType() const;
+   void setTagType(const ossimString& tagType) const;
+
+   bool operator<(const ossimNitfTagInformation& rhs) const
+   {
+      return getTotalTagLength() < rhs.getTotalTagLength();
+   }
+   
+private:
+
+   /**
+    * This is a 6 byte field
+    */
+   char          theTagName[7];
+
+   /**
+    * This is a 5 byte field
+    */
+   char           theTagLength[6];
+
+   /**
+    * This is a 6 byte field which should be UDHD, UDID, XHD, IXSHD, SXSHD, or TXSHD.
+    * This is declared as mutable since changing the tag type doesn't change the contents of the tag.
+    */
+   mutable char theTagType[7];
+
+   /**
+    * This will hold the offset to the start of the above information
+    * This is just a work variable.
+    */
+   ossim_uint64 theTagOffset;
+
+   /**
+    * This will hold the start to the data.  This is just the
+    * position in the file just past the tag length field.
+    * This is just a work variable
+    */
+   ossim_uint64 theTagDataOffset;
+
+   /**
+    * Used to hold the tag data.
+    */
+   ossimRefPtr<ossimNitfRegisteredTag> theTagData;
+};
+
+#endif
diff --git a/include/ossim/support_data/ossimNitfTextHeader.h b/ossim/include/ossim/support_data/ossimNitfTextHeader.h
similarity index 100%
rename from include/ossim/support_data/ossimNitfTextHeader.h
rename to ossim/include/ossim/support_data/ossimNitfTextHeader.h
diff --git a/include/ossim/support_data/ossimNitfTextHeaderV2_0.h b/ossim/include/ossim/support_data/ossimNitfTextHeaderV2_0.h
similarity index 100%
rename from include/ossim/support_data/ossimNitfTextHeaderV2_0.h
rename to ossim/include/ossim/support_data/ossimNitfTextHeaderV2_0.h
diff --git a/include/ossim/support_data/ossimNitfTextHeaderV2_1.h b/ossim/include/ossim/support_data/ossimNitfTextHeaderV2_1.h
similarity index 100%
rename from include/ossim/support_data/ossimNitfTextHeaderV2_1.h
rename to ossim/include/ossim/support_data/ossimNitfTextHeaderV2_1.h
diff --git a/ossim/include/ossim/support_data/ossimNitfUnknownTag.h b/ossim/include/ossim/support_data/ossimNitfUnknownTag.h
new file mode 100644
index 0000000..66cae61
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfUnknownTag.h
@@ -0,0 +1,84 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Unknown tag class declaration.
+//
+// Note: By "unknown" this means that the tag name was not found in any of
+// the tag factories.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimNitfUnknownTag.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimNitfUnknownTag_HEADER
+#define ossimNitfUnknownTag_HEADER 1
+
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+
+class OSSIM_DLL ossimNitfUnknownTag : public ossimNitfRegisteredTag
+{
+public:
+   /** default constructor */
+   ossimNitfUnknownTag();
+
+   /** destructor */
+   virtual ~ossimNitfUnknownTag();
+  
+   /**
+    * Parse method.
+    *
+    * @param in Stream to parse.  This will read the entire tag length into
+    * an array.
+    */
+   virtual void parseStream(std::istream& in);
+   
+   /**
+    * Write method.
+    *
+    * @param out Stream to write to.
+    */
+   virtual void writeStream(std::ostream& out);
+   
+   /**
+    * Clears all string fields within the record to some default nothingness.
+    */
+   virtual void clearFields();
+   
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix=std::string()) const;
+
+   /**
+    * @param length Length of tag.
+    *
+    * @note The tag length must be set prior to calling "parseStream".
+    *
+    * @note Since you must have a length to read theTagData, if theTagData
+    * exist it will be deleted by this method.
+    * Subsequent "parseStream" calls will allocate theTagData as needed.
+    */
+   virtual void setTagLength(ossim_uint32 length);
+   
+protected:
+
+   /**
+    * @return true if all characters in theTagData are printable.
+    */
+   bool tagDataIsAscii() const;
+
+   /**
+    * Holds entire tag data(theTagLength) plus one byte for null terminator.
+    */
+   char* m_tagData;
+   
+TYPE_DATA   
+};
+
+#endif /* End of "#ifndef ossimNitfUnknownTag_HEADER" */
+
diff --git a/ossim/include/ossim/support_data/ossimNitfUse00aTag.h b/ossim/include/ossim/support_data/ossimNitfUse00aTag.h
new file mode 100644
index 0000000..377d13c
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfUse00aTag.h
@@ -0,0 +1,283 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Walt Bunch
+//
+// Description: Nitf support class for USE00A -
+// Exploitation Usability extension.
+// 
+//********************************************************************
+// $Id: ossimNitfUse00aTag.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimNitfUse00aTag_HEADER
+#define ossimNitfUse00aTag_HEADER
+
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+
+class OSSIM_DLL ossimNitfUse00aTag : public ossimNitfRegisteredTag
+{
+public:
+   
+   enum
+   {
+      ANGLE_TO_NORTH_SIZE  = 3,
+      MEAN_GSD_SIZE        = 5,
+      FIELD3_SIZE          = 1,
+      DYNAMIC_RANGE_SIZE   = 5,
+      FIELD5_SIZE          = 3,
+      FIELD6_SIZE          = 1,
+      FIELD7_SIZE          = 3,
+      OBL_ANG_SIZE         = 5,
+      ROLL_ANG_SIZE        = 6,
+      FIELD10_SIZE         = 12,
+      FIELD11_SIZE         = 15,
+      FIELD12_SIZE         = 4,
+      FIELD13_SIZE         = 1,
+      FIELD14_SIZE         = 3,
+      FIELD15_SIZE         = 1,
+      FIELD16_SIZE         = 1,
+      N_REF_SIZE           = 2,
+      REV_NUM_SIZE         = 5,
+      N_SEG_SIZE           = 3,
+      MAX_LP_SEG_SIZE      = 6,
+      FIELD20_SIZE         = 6,
+      FIELD21_SIZE         = 6,
+      SUN_EL_SIZE          = 5,
+      SUN_AZ_SIZE          = 5
+      //                  -----
+      //                  107 bytes
+   };
+   
+   ossimNitfUse00aTag();
+   virtual ~ossimNitfUse00aTag();
+
+   virtual void parseStream(std::istream& in);
+   virtual void writeStream(std::ostream& out);
+
+   virtual void clearFields();
+   
+  // The set methods below taking ossimString args will truncate and
+  // pad with spaces, as necessary, to match enumed size
+   void setAngleToNorth(const ossimString& angleToNorth);
+   ossimString getAngleToNorth()const;
+   void setMeanGsd(const ossimString& meanGsd);
+   ossimString getMeanGsd()const;
+
+   /**
+    * @return MEANGSD field as a double converted to meters.
+    *
+    * @note Conversion used: gsd_in_meters = gsd / 12.0 * MTRS_PER_FT
+    */
+   ossim_float64 getMeanGsdInMeters() const;
+
+   void setField3(const ossimString& field3);
+   ossimString getField3()const;
+   void setDynamicRange(const ossimString& dynamicRange);
+   ossimString getDynamicRange()const;
+   void setField5(const ossimString& field5);
+   ossimString getField5()const;
+   void setField6(const ossimString& field6);
+   ossimString getField6()const;
+   void setField7(const ossimString& field7);
+   ossimString getField7()const;
+   void setOblAng(const ossimString& oblAng);
+   ossimString getOblAng()const;
+   void setRollAng(const ossimString& rollAng);
+   ossimString getRollAng()const;
+   void setField10(const ossimString& field10);
+   ossimString getField10()const;
+   void setField11(const ossimString& field11);
+   ossimString getField11()const;
+   void setField12(const ossimString& field12);
+   ossimString getField12()const;
+   void setField13(const ossimString& field13);
+   ossimString getField13()const;
+   void setField14(const ossimString& field14);
+   ossimString getField14()const;
+   void setField15(const ossimString& field15);
+   ossimString getField15()const;
+   void setField16(const ossimString& field16);
+   ossimString getField16()const;
+   void setNRef(const ossimString& nRef);
+   ossimString getNRef()const;
+   void setRevNum(const ossimString& revNum);
+   ossimString getRevNum()const;
+   void setNSeg(const ossimString& nSeg);
+   ossimString getNSeg()const;
+   void setMaxLpSeg(const ossimString& maxLpSeg);
+   ossimString getMaxLpSeg()const;
+   void setField20(const ossimString& field20);
+   ossimString getField20()const;
+   void setField21(const ossimString& field21);
+   ossimString getField21()const;
+   void setSunEl(const ossimString& sunEl);
+   ossimString getSunEl()const;
+   void setSunAz(const ossimString& sunAz);
+   ossimString getSunAz()const;
+
+   /**
+    * @brief Print method that outputs a key/value type format
+    * adding prefix to keys.
+    * @param out Stream to output to.
+    * @param prefix Prefix added to key like "image0.";
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix=std::string()) const;
+   
+   virtual void setProperty(ossimRefPtr<ossimProperty> property);
+   virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
+   virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
+   
+protected:
+   
+   /**
+    * FIELD: ANGLETONORTH
+    *
+    */
+   char theAngleToNorth[ANGLE_TO_NORTH_SIZE+1];
+   
+   /**
+    * FIELD: MEANGSD
+    *
+    */
+   char theMeanGsd[MEAN_GSD_SIZE+1];
+   
+   /**
+    * FIELD: FIELD3
+    *
+    */
+   char theField3[FIELD3_SIZE+1];
+
+   /**
+    * FIELD: DYNAMICRANGE
+    *
+    */
+   char theDynamicRange[DYNAMIC_RANGE_SIZE+1];
+
+   /**
+    * FIELD: FIELD5
+    *
+    */
+   char theField5[FIELD5_SIZE+1];
+
+   /**
+    * FIELD: FIELD6
+    *
+    */
+   char theField6[FIELD6_SIZE+1];
+
+   /**
+    * FIELD: FIELD7
+    *
+    */
+   char theField7[FIELD7_SIZE+1];
+
+   /**
+    * FIELD: OBLANG
+    *
+    */
+   char theOblAng[OBL_ANG_SIZE+1];
+
+   /**
+    * FIELD: ROLLANG
+    *
+    */
+   char theRollAng[ROLL_ANG_SIZE+1];
+
+   /**
+    * FIELD: FIELD10
+    *
+    */
+   char theField10[FIELD10_SIZE+1];
+
+   /**
+    * FIELD: FIELD11
+    *
+    */
+   char theField11[FIELD11_SIZE+1];
+
+   /**
+    * FIELD: FIELD12
+    *
+    */
+   char theField12[FIELD12_SIZE+1];
+
+   /**
+    * FIELD: FIELD13
+    *
+    */
+   char theField13[FIELD13_SIZE+1];
+
+   /**
+    * FIELD: FIELD14
+    *
+    */
+   char theField14[FIELD14_SIZE+1];
+
+   /**
+    * FIELD: FIELD15
+    *
+    */
+   char theField15[FIELD15_SIZE+1];
+
+   /**
+    * FIELD: FIELD16
+    *
+    */
+   char theField16[FIELD16_SIZE+1];
+
+   /**
+    * FIELD: NREF
+    *
+    */
+   char theNRef[N_REF_SIZE+1];
+
+   /**
+    * FIELD: REVNUM
+    *
+    */
+   char theRevNum[REV_NUM_SIZE+1];
+
+   /**
+    * FIELD: NSEG
+    *
+    */
+   char theNSeg[N_SEG_SIZE+1];
+
+   /**
+    * FIELD: MAXLPSEG
+    *
+    */
+   char theMaxLpSeg[MAX_LP_SEG_SIZE+1];
+
+   /**
+    * FIELD: FIELD20
+    *
+    */
+   char theField20[FIELD20_SIZE+1];
+
+   /**
+    * FIELD: FIELD21
+    *
+    */
+   char theField21[FIELD21_SIZE+1];
+
+   /**
+    * FIELD: SUNEL
+    *
+    */
+   char theSunEl[SUN_EL_SIZE+1];
+
+   /**
+    * FIELD: SUNAZ
+    *
+    */
+   char theSunAz[SUN_AZ_SIZE+1];
+
+TYPE_DATA   
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimNitfVqCompressionHeader.h b/ossim/include/ossim/support_data/ossimNitfVqCompressionHeader.h
new file mode 100644
index 0000000..918abef
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNitfVqCompressionHeader.h
@@ -0,0 +1,79 @@
+//*******************************************************************
+// Copyright (C) 2004 Garrett Potts
+//
+// LICENSE: MIT see top level LICENSE.txt for more details
+// 
+// Author: Garrett Potts
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfVqCompressionHeader.h 23666 2015-12-14 20:01:22Z rashadkm $
+#ifndef ossimNitfVqCompressionHeader_HEADER
+#define ossimNitfVqCompressionHeader_HEADER
+
+#include <vector>
+#include <ossim/support_data/ossimNitfCompressionHeader.h>
+
+class OSSIM_DLL ossimNitfVqCompressionOffsetTableData
+{
+public:
+
+   ossimNitfVqCompressionOffsetTableData();
+   ossimNitfVqCompressionOffsetTableData(const ossimNitfVqCompressionOffsetTableData& rhs);
+   ~ossimNitfVqCompressionOffsetTableData();
+   const ossimNitfVqCompressionOffsetTableData& operator =(const ossimNitfVqCompressionOffsetTableData& rhs);
+   ossim_uint32 getDataLengthInBytes()const;
+   void clearFields();
+   void parseStream(std::istream& in);
+   
+   ossim_uint16 theTableId;
+   ossim_uint32 theNumberOfCompressionLookupRecords;
+   ossim_uint16 theNumberOfValuesPerCompressionLookup;
+   ossim_uint16 theCompressionLookupValueBitLength;
+   ossim_uint32 theCompressionLookupTableOffset;
+   ossim_uint8* theData;
+};
+
+class OSSIM_DLL ossimNitfVqCompressionHeader : public ossimNitfCompressionHeader
+{
+public:
+   ossimNitfVqCompressionHeader();
+   virtual void parseStream(std::istream &in);
+
+   virtual std::ostream& print(std::ostream& out) const;
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    */
+   virtual std::ostream& print(std::ostream& out,
+                               const std::string& prefix) const;  
+
+   virtual bool saveState(ossimKeywordlist& kwl, const ossimString& prefix="")const;
+   virtual ossim_uint32 getBlockSizeInBytes()const;
+   virtual ossim_uint32 getNumberOfImageRows()const;
+   virtual ossim_uint32 getNumberOfImageCodesPerRow()const;
+   virtual ossim_uint32 getCompressionAlgorithmId()const;
+   virtual ossim_uint32 getImageCodeBitLength()const;
+   virtual ossim_uint32 getNumberOfTables()const;
+   const std::vector<ossimNitfVqCompressionOffsetTableData>& getTable()const;
+   
+protected:
+   ossim_uint32 theNumberOfImageRows;
+   ossim_uint32 theNumberOfImageCodesPerRow;
+   ossim_uint8  theImageCodeBitLength;
+
+   ossim_uint16 theCompressionAlgorithmId;
+   ossim_uint16 theNumberOfCompressionLookupOffsetRecords;
+   ossim_uint16 theNumberOfCompressionParameterOffsetRecords;
+
+   ossim_uint32 theCompressionLookupOffsetTableOffset;
+   ossim_uint16 theCompressionLookupTableOffsetRecordLength;
+
+   std::vector<ossimNitfVqCompressionOffsetTableData> theTable;
+   void clearFields();
+
+TYPE_DATA   
+};
+
+#endif
diff --git a/ossim/include/ossim/support_data/ossimNmeaMessage.h b/ossim/include/ossim/support_data/ossimNmeaMessage.h
new file mode 100644
index 0000000..d84498d
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimNmeaMessage.h
@@ -0,0 +1,87 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// File: ossimNmeaMessage.h
+//
+// Author:  Garrett Potts
+//
+// Description: Contains a general parser for NMEA messages.
+//
+//
+// $Id$
+//----------------------------------------------------------------------------
+#ifndef ossimNmeaMessage_HEADER
+#define ossimNmeaMessage_HEADER
+
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/base/ossimException.h>
+#include <iostream>
+#include <algorithm>
+#include <vector>
+
+
+class OSSIM_DLL ossimNmeaMessage : public ossimReferenced
+{
+public:
+   typedef std::vector<ossimString> FieldListType;
+   
+   ossimNmeaMessage(const std::string& acceptedStartingCharacters="!$"):m_startChars(acceptedStartingCharacters){}
+   
+   /**
+    * Parses a standard formatted NMEA message.  No exceptions are created for checksums.  The checksum needs
+    * to be checked after parsing by calling validCheckSum().
+    */
+   virtual void parseMessage(std::istream& in)throw(ossimException);
+   
+   virtual bool valid()const{return validCheckSum();}
+   bool validCheckSum()const{return m_validCheckSum;}
+   
+   
+   ossim_uint32 numberOfFields()const{return m_fields.size();}
+   
+   const std::string& getField(ossim_uint32 idx)
+   {
+      static ossimString empty="";
+      
+      if(idx < m_fields.size()) return m_fields[idx];
+      
+      return empty;
+   }
+   const std::string& operator [](int idx)const
+   {
+      static ossimString empty="";
+      
+      if ( idx < static_cast<int>( m_fields.size() ) ) return m_fields[idx];
+      
+      return empty;
+   }
+   void setStartChars(const std::string& acceptedStartingCharacters="!$"){m_startChars = acceptedStartingCharacters;}
+   
+   virtual void reset()
+   {
+      m_fields.clear();
+      m_message = "";
+      m_validCheckSum = false;
+   }
+   const std::string& message()const{return m_message;}
+   
+   static ossim_uint32 checksum(std::string::const_iterator start, std::string::const_iterator end);
+   
+protected:
+   virtual void setFields(std::string::const_iterator start, std::string::const_iterator end);
+   
+   bool isValidStartChar(char c)const;
+   
+   std::string m_message;
+   FieldListType m_fields;
+   
+   bool m_validCheckSum;
+   std::string m_startChars;
+};
+
+#endif
+
+
diff --git a/include/ossim/support_data/ossimNmeaMessageSequencer.h b/ossim/include/ossim/support_data/ossimNmeaMessageSequencer.h
similarity index 100%
rename from include/ossim/support_data/ossimNmeaMessageSequencer.h
rename to ossim/include/ossim/support_data/ossimNmeaMessageSequencer.h
diff --git a/include/ossim/support_data/ossimPpjFrameSensorFile.h b/ossim/include/ossim/support_data/ossimPpjFrameSensorFile.h
similarity index 100%
rename from include/ossim/support_data/ossimPpjFrameSensorFile.h
rename to ossim/include/ossim/support_data/ossimPpjFrameSensorFile.h
diff --git a/ossim/include/ossim/support_data/ossimQuickbirdMetaData.h b/ossim/include/ossim/support_data/ossimQuickbirdMetaData.h
new file mode 100644
index 0000000..34e1efd
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimQuickbirdMetaData.h
@@ -0,0 +1,130 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Class declaration for ossimQuickbirdMetaData.
+// 
+// This class parses a Space Imaging Quickbird meta data file.
+//
+//********************************************************************
+// $Id: ossimQuickbirdMetaData.h 14412 2009-04-27 16:58:46Z dburken $
+
+#ifndef ossimQuickbirdMetaData_HEADER
+#define ossimQuickbirdMetaData_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimString.h>
+
+#include <iosfwd>
+
+class ossimFilename;
+class ossimKeywordlist;
+
+class OSSIMDLLEXPORT ossimQuickbirdMetaData : public ossimObject
+{
+public:
+
+   /** @brief default constructor */
+   ossimQuickbirdMetaData();
+
+   /** virtual destructor */
+   virtual ~ossimQuickbirdMetaData();
+
+   /**
+    * @brief Open method that takes the image file, derives the metadata,
+    * header and rpc files, then calls parse methods parseMetaData,
+    * parseHdrData, and parseRpcData.
+    *
+    * @param imageFile Usually in the form of "po_2619900_pan_0000000.tif".
+    *
+    * @return true on success, false on error.
+    */
+   bool open(const ossimFilename& imageFile);
+
+   void clearFields();
+
+   //---
+   // Convenient method to print important image info:
+   //---
+   virtual std::ostream& print(std::ostream& out) const;
+
+   /**
+    * Method to save the state of the object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix = 0) const;
+   
+   /**
+    * Method to the load (recreate) the state of the object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix = 0);
+
+   /**
+    * @brief Method to parse Quickbird metadata file.
+    *
+    * @param metadata File name usually in the form of
+    * ".IMD."
+    *
+    * @return true on success, false on error.
+    */
+   bool parseMetaData(const ossimFilename& metadata);
+
+   /**
+    * @brief Method to parse Quickbird rpc file.
+    *
+    * @param metadata File name usually in the form of
+    * ".GEO.txt"
+    *
+    * @return true on success, false on error.
+    *
+    * @note Currently NOT implemented.
+    */
+   bool parseGEOData(const ossimFilename& data_file);
+
+   bool parseATTData(const ossimFilename& data_file);
+
+   bool parseEPHData(const ossimFilename& data_file);
+
+   /** @return theSatID */
+   ossimString getSatID() const;
+
+   bool getEndOfLine( char * fileBuf,
+                      ossimString lineBeginning,
+                      const char * format,
+                      ossimString & name );
+
+   const ossimIpt& getImageSize() const;
+
+/*****************************************
+*parseATTData EPH GEO IMD RPB TIL
+*
+****************************************/
+   
+private:
+
+   ossimString         theGenerationDate;
+   ossimString         theBandId;
+   int                 theBitsPerPixel;	
+   ossimString         theSatID;
+   ossimString         theTLCDate;
+   ossim_float64       theSunAzimuth;
+   ossim_float64       theSunElevation;
+   ossim_float64       theSatAzimuth;
+   ossim_float64       theSatElevation;
+   int                 theTDILevel;
+   std::vector<double> theAbsCalFactors;
+   ossimString         theBandNameList;
+   ossimIpt            theImageSize;
+
+TYPE_DATA
+};
+
+#endif /* #ifndef ossimQuickbirdMetaData_HEADER */
+
diff --git a/include/ossim/support_data/ossimQuickbirdRpcHeader.h b/ossim/include/ossim/support_data/ossimQuickbirdRpcHeader.h
similarity index 100%
rename from include/ossim/support_data/ossimQuickbirdRpcHeader.h
rename to ossim/include/ossim/support_data/ossimQuickbirdRpcHeader.h
diff --git a/include/ossim/support_data/ossimQuickbirdTile.h b/ossim/include/ossim/support_data/ossimQuickbirdTile.h
similarity index 100%
rename from include/ossim/support_data/ossimQuickbirdTile.h
rename to ossim/include/ossim/support_data/ossimQuickbirdTile.h
diff --git a/include/ossim/support_data/ossimRpfAttributeOffsetRecord.h b/ossim/include/ossim/support_data/ossimRpfAttributeOffsetRecord.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfAttributeOffsetRecord.h
rename to ossim/include/ossim/support_data/ossimRpfAttributeOffsetRecord.h
diff --git a/include/ossim/support_data/ossimRpfAttributeSectionSubheader.h b/ossim/include/ossim/support_data/ossimRpfAttributeSectionSubheader.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfAttributeSectionSubheader.h
rename to ossim/include/ossim/support_data/ossimRpfAttributeSectionSubheader.h
diff --git a/ossim/include/ossim/support_data/ossimRpfAttributes.h b/ossim/include/ossim/support_data/ossimRpfAttributes.h
new file mode 100644
index 0000000..2a07be3
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimRpfAttributes.h
@@ -0,0 +1,371 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimRpfAttributes.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimRpfAttributes_HEADER
+#define ossimRpfAttributes_HEADER
+#include <map>
+
+#include <ossim/base/ossimString.h>
+
+class OSSIM_DLL ossimRpfAttributes
+{
+
+public:
+   friend OSSIM_DLL std::ostream& operator<<(std::ostream& out,
+                                             const ossimRpfAttributes& data);
+   ossimRpfAttributes();
+   ~ossimRpfAttributes();
+
+   void setAttributeFlag(ossim_uint32 id,
+                         bool flag);
+   bool getAttributeFlag(ossim_uint32 id)const;
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out String to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
+    * "nitf.file_name:"
+    * @return output stream.
+    */
+   std::ostream& print(std::ostream& out,
+                       const std::string& prefix=std::string()) const;
+   
+   bool isEmpty()const;
+   void clearFields();
+   
+   /*!
+    * The attribute Id.  The Id and descriptions are taken from
+    * MIL-STD-2411-1 and can have one of the following values:
+    * _________________________________________________________________
+    * 1      Currency Date, 1 parameter:
+    *          1. Date of most recent revision to the RPF
+    *             YYYYMMDD
+    *             8 byte ascii value
+    */
+   ossimString theCurrencyDate;
+
+   /*! 2      Production Date, 1 parameter:
+    *          1. Date the source data was transformed to RPF format
+    *             YYYYMMDD
+    *             8 byte ascii value
+    */
+   ossimString theProductionDate;
+   
+   /*! 3      Significant Date, 1 parameter:
+    *          1. Most accurately describes the date of
+    *             the source data.
+    *             YYYYMMDD
+    *             8 byte ascii value
+    */
+   ossimString theSignificantDate;
+   
+   /*!
+    * 4      Map/Chart source, 4 parameters:
+    *          1. Short title for the id of a group of
+    *             products.  ex: JOG 1501A ...
+    *             10 byte ascii value
+    *          2. The designation of the hardcopy source
+    *             8 byte ascii value
+    *          3. Old horizontal datum code.  Original
+    *             horizontal datum of the hardcopy product
+    *             4 byte ascii value
+    *          4. Edition number of the source graphic
+    *             7 byte ascii value.
+    */
+   ossimString theChartSeriesCode; 
+   ossimString theMapDesignationCode; 
+   ossimString theOldHorDatum;   
+   ossimString theEdition;
+   
+   /*!
+    * 5      Projection Systemd, 5 parameters: p. 38 of MIL-STD-2411-1
+    *          1. Projection Code. 2 byte ascii value
+    *             AC    Albers Equal area
+    *                   Requires Parameters A B C D
+    *             AL    Azimuthal Equal Dist.
+    *                   Requires Parameters A B
+    *             RB    Hotline Oblique Mercator
+    *                   Requires Parameters A B C 
+    *             LE    Lambert Conformal Conic
+    *                   Requires Parameters A B C D
+    *             MC    Mercator
+    *                   Requires Parameters A B
+    *             OC    Oblique Mercator
+    *                   Requires Parameters A B C
+    *             OD    Orthographic
+    *                   Requires Parameters A B
+    *             PG    Polar Stereo-graphic
+    *                   Requires Parameters A B C D
+    *             PH    Poly conic
+    *                   Requires Parameters A B
+    *             TC    Transverse Mercator
+    *                   Requires Parameters A B C
+    *             UT    Universal Transverse Mercator
+    *                   Requires Parameters A
+    *          2. Projection Param A: real 4 byte value
+    *          3. Projeciton Param B: real 4 byte value
+    *          4. Projection Param C: real 4 byte value
+    *          5. Projection Param D: real 4 byte value
+    */
+   ossimString theProjectionCode;
+   float theProjectionA;
+   float theProjectionB;
+   float theProjectionC;
+   float theProjectionD;
+
+   /*!
+    * 6      Vertical Datum (1 parameter) p. 37 MIL-STD-2411-1
+    *         4 byte ascii
+    *
+    *          MSL     Mean Sea Level.  All elevations in th data set
+    *                  are referenced to the geoid of the specified datum
+    *          GEOD    Geodetic (All elevations in the data set
+    *                  are referenced to the ellipsoid of the specified
+    *                  datum
+    */
+   ossimString theVertDatumCode;
+
+   /*!
+    * 7      Horizontal Datum (1 parameter)
+    *        4 byte ascii
+    *
+    *            Look on p.33 of MIL-STD-2411-1.  Too big to list
+    *            we will need a translation table for these
+    *            codes
+    */
+   ossimString theHorDatumCode;
+   
+   /*!
+    * 8      Vertical Absolute Accurracy (2 parameters)
+    *        1. vertical absolute accuracy: 4 byte unsigned int
+    *        2. Accuracy units of measure:  2 byte value 
+    *             0   unknown
+    *             1   meters (Length area Volume)
+    *             2   Kilopounds
+    *             3   Seconds (of time)
+    *             4   Meters/Second (speed)
+    *             5   Cubic Meters per second (Flow)
+    *             6   Volt (Electrical potential)
+    *             7   Watt (Ten to 6 electirical power)
+    *             8   Hertz
+    *             9   +- DD MM SS.S (Angular)
+    *             10  +- HH MM SS.S (Time)
+    *             11  International Nautical Mile (1852 meters)
+    *             12  knot
+    *             13  Nautical mile per day
+    *             14  Feet
+    *             15  Fathom
+    *             16  Micrometers (microns)
+    *             17  Mils
+    *             18  Seconds of Arc
+    *             19  Minutes of Arc
+    *             20  Degrees of arc
+    *             999 Other
+    */
+   ossim_uint32  theVertAbsAccuracy;
+   ossim_uint16 theVertAbsUnits;
+   
+   /*!
+    * 9      Horizontal Absolute Accuracy (2 parameters)
+    *        1. Horizontal absolute accuracy: 4 byte unsigned int
+    *        2. Accuracy units of measure:  2 byte value 
+    *             0   unknown
+    *             1   meters (Length area Volume)
+    *             2   Kilopounds
+    *             3   Seconds (of time)
+    *             4   Meters/Second (speed)
+    *             5   Cubic Meters per second (Flow)
+    *             6   Volt (Electrical potential)
+    *             7   Watt (Ten to 6 electirical power)
+    *             8   Hertz
+    *             9   +- DD MM SS.S (Angular)
+    *             10  +- HH MM SS.S (Time)
+    *             11  International Nautical Mile (1852 meters)
+    *             12  knot
+    *             13  Nautical mile per day
+    *             14  Feet
+    *             15  Fathom
+    *             16  Micrometers (microns)
+    *             17  Mils
+    *             18  Seconds of Arc
+    *             19  Minutes of Arc
+    *             20  Degrees of arc
+    *             999 Other
+    */
+   ossim_uint32  theHorAbsAccuracy;
+   ossim_uint16 theHorAbsUnits;
+   
+   /*!
+    * 10     Vertical Relative Accuracy (2 parameters)
+    *        1. Vertical relative accuracy: 4 byte unsigned int
+    *        2. Accuracy units of measure:  2 byte value 
+    *             0   unknown
+    *             1   meters (Length area Volume)
+    *             2   Kilopounds
+    *             3   Seconds (of time)
+    *             4   Meters/Second (speed)
+    *             5   Cubic Meters per second (Flow)
+    *             6   Volt (Electrical potential)
+    *             7   Watt (Ten to 6 electirical power)
+    *             8   Hertz
+    *             9   +- DD MM SS.S (Angular)
+    *             10  +- HH MM SS.S (Time)
+    *             11  International Nautical Mile (1852 meters)
+    *             12  knot
+    *             13  Nautical mile per day
+    *             14  Feet
+    *             15  Fathom
+    *             16  Micrometers (microns)
+    *             17  Mils
+    *             18  Seconds of Arc
+    *             19  Minutes of Arc
+    *             20  Degrees of arc
+    *             999 Other
+    */
+   ossim_uint32  theVertRelAccuracy;
+   ossim_uint16 theVertRelUnits;
+   
+   /*!
+    * 11     Horizontal Relative Accuracy (2 parameters)
+    *        1. Horizontal relative accuracy: 4 byte unsigned int
+    *        2. Accuracy units of measure:  2 byte value 
+    *             0   unknown
+    *             1   meters (Length area Volume)
+    *             2   Kilopounds
+    *             3   Seconds (of time)
+    *             4   Meters/Second (speed)
+    *             5   Cubic Meters per second (Flow)
+    *             6   Volt (Electrical potential)
+    *             7   Watt (Ten to 6 electirical power)
+    *             8   Hertz
+    *             9   +- DD MM SS.S (Angular)
+    *             10  +- HH MM SS.S (Time)
+    *             11  International Nautical Mile (1852 meters)
+    *             12  knot
+    *             13  Nautical mile per day
+    *             14  Feet
+    *             15  Fathom
+    *             16  Micrometers (microns)
+    *             17  Mils
+    *             18  Seconds of Arc
+    *             19  Minutes of Arc
+    *             20  Degrees of arc
+    *             999 Other
+    */
+   ossim_uint32  theHorRelAccuracy;
+   ossim_uint16 theHorRelUnits; 
+
+   /*!
+    * 12     Ellipsoid, 1 parameter:
+    *        1. Ellipsoid code.  3 byte ascii
+    *           See p. 40 of MIL-STD-2411-1
+    */
+   ossimString ellipsoidCode;
+
+   /*!
+    * 13     Sounding Datumm, 1 parameter: 4 byte ascii
+    *        See p. 33 MIL-STD-2411-1 5.3.2.2
+    */
+   ossimString theSoundingDatumCode;
+   
+   /*!
+    * 14     Navigation System, 1 parameter: 
+    *        1. Navigation code. 2 byte unsigned int
+    *           See MIL-STD-2411-1 5.3.2.4
+    */
+   ossim_uint16 theNavSystemCode; 
+
+   /*!
+    * 15     Grid, 1 parameter:
+    *        1. Grid code. 2 byte ascii
+    *           See MIL-STD-2411-1 5.3.2.7
+    */
+   ossimString theGridCode;
+
+   /*!
+    * 16     Easterly Annual Magnetic Change, 2 parameters:
+    *        1. Easterly annual magnetic change. 4 byte real
+    *        2. Units of the change.  See 5.3.2.6 of MIL-STD-2411-1
+    */
+   float          theEeasterlyMagChange; 
+   ossim_uint16 theEasterlyMagChangeUnits;
+
+   /*!
+    * 17     Westerly Annual Magnetic Change, 2 parameters:
+    *        1. Westerly annual magnetic change. 4 byte real
+    *        2. Units of the change.  See 5.3.2.6 of MIL-STD-2411-1
+    */
+   float          theWesterlyMagChange;
+   ossim_uint16 theWesterlyMagChangeUnits;
+
+   /*!
+    * 18     Grid North Magnetic North ANgle, 2 paramters:
+    *        1. Grid North - Magnetic North.  4 byte real
+    *        2. Units of angle. 2 byte unsigned int
+    *           see 5.3.2.6
+    */
+   float          theMagAngle; 
+   ossim_uint16 theMagAngleUnits;
+
+   /*!
+    * 19     Grid convergence angle, 2 parameters:
+    *        1. Grid convergence angle.  4 byte Real
+    *        2. Units of angle. 2 byte unsigned int 5.3.2.6
+    */
+   float          theGridConver; 
+   ossim_uint16 theGridConverUnits;
+
+   /*!
+    * 20     Highest known elevation (4 parameters)
+    *        1. Highest known elevation: 8 byte real
+    *        2. Units of elevation: See 5.3.2.6 of MIL-STD-2411-1
+    *        3. Lat of elevation: 8 byte real in decimal degrees
+    *        4. Lon of elevation: 8 byte real in decimal degrees
+    */
+   double         theHighElevation;
+   ossim_uint16   theHighElevationUnits;
+   double         theHighLat;
+   double         theHighLon;
+
+   /*! 21     Multiple legend, 1 paraemter:
+    *        1. Name of legend file that applies to this
+    *           12 byte ascii
+    */
+   ossimString theLegendFileName;
+   
+   /*!
+    * 22     Image source, 2 parameters:
+    *        1. Source of data from which this
+    *           RPF was derived. ex: SPOT. Landsat7, Landsat4.
+    *           for CDTED: "imagery, "carto"
+    *           12 byte ascii
+    *
+    *        2. GSD.  Ground sample or post distance.
+    *           4 byte unsigned int
+    */
+    ossimString theDataSource; // [12];
+    ossim_uint32 theGsd; // uint
+
+   /*!
+    * 23     Data Level, 1 parameter:
+    *        1. The level of the source.  For example:
+    *           if this is a DTED or CDTED it would
+    *           distinguish between level 1 and 2
+    */
+   ossim_uint16 theDataLevel; // ushort
+
+protected:
+   std::map<ossim_uint32, bool> theAttributeIdBoolMap;
+   
+};
+
+#endif
+
diff --git a/include/ossim/support_data/ossimRpfBoundaryRectRecord.h b/ossim/include/ossim/support_data/ossimRpfBoundaryRectRecord.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfBoundaryRectRecord.h
rename to ossim/include/ossim/support_data/ossimRpfBoundaryRectRecord.h
diff --git a/include/ossim/support_data/ossimRpfBoundaryRectSectionSubheader.h b/ossim/include/ossim/support_data/ossimRpfBoundaryRectSectionSubheader.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfBoundaryRectSectionSubheader.h
rename to ossim/include/ossim/support_data/ossimRpfBoundaryRectSectionSubheader.h
diff --git a/include/ossim/support_data/ossimRpfBoundaryRectTable.h b/ossim/include/ossim/support_data/ossimRpfBoundaryRectTable.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfBoundaryRectTable.h
rename to ossim/include/ossim/support_data/ossimRpfBoundaryRectTable.h
diff --git a/include/ossim/support_data/ossimRpfColorConverterOffsetRecord.h b/ossim/include/ossim/support_data/ossimRpfColorConverterOffsetRecord.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfColorConverterOffsetRecord.h
rename to ossim/include/ossim/support_data/ossimRpfColorConverterOffsetRecord.h
diff --git a/include/ossim/support_data/ossimRpfColorConverterSubsection.h b/ossim/include/ossim/support_data/ossimRpfColorConverterSubsection.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfColorConverterSubsection.h
rename to ossim/include/ossim/support_data/ossimRpfColorConverterSubsection.h
diff --git a/include/ossim/support_data/ossimRpfColorConverterTable.h b/ossim/include/ossim/support_data/ossimRpfColorConverterTable.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfColorConverterTable.h
rename to ossim/include/ossim/support_data/ossimRpfColorConverterTable.h
diff --git a/include/ossim/support_data/ossimRpfColorGrayscaleOffsetRecord.h b/ossim/include/ossim/support_data/ossimRpfColorGrayscaleOffsetRecord.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfColorGrayscaleOffsetRecord.h
rename to ossim/include/ossim/support_data/ossimRpfColorGrayscaleOffsetRecord.h
diff --git a/include/ossim/support_data/ossimRpfColorGrayscaleSubheader.h b/ossim/include/ossim/support_data/ossimRpfColorGrayscaleSubheader.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfColorGrayscaleSubheader.h
rename to ossim/include/ossim/support_data/ossimRpfColorGrayscaleSubheader.h
diff --git a/include/ossim/support_data/ossimRpfColorGrayscaleTable.h b/ossim/include/ossim/support_data/ossimRpfColorGrayscaleTable.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfColorGrayscaleTable.h
rename to ossim/include/ossim/support_data/ossimRpfColorGrayscaleTable.h
diff --git a/include/ossim/support_data/ossimRpfComponentIdLut.h b/ossim/include/ossim/support_data/ossimRpfComponentIdLut.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfComponentIdLut.h
rename to ossim/include/ossim/support_data/ossimRpfComponentIdLut.h
diff --git a/include/ossim/support_data/ossimRpfCompressionLookupOffsetRecord.h b/ossim/include/ossim/support_data/ossimRpfCompressionLookupOffsetRecord.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfCompressionLookupOffsetRecord.h
rename to ossim/include/ossim/support_data/ossimRpfCompressionLookupOffsetRecord.h
diff --git a/include/ossim/support_data/ossimRpfCompressionSection.h b/ossim/include/ossim/support_data/ossimRpfCompressionSection.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfCompressionSection.h
rename to ossim/include/ossim/support_data/ossimRpfCompressionSection.h
diff --git a/include/ossim/support_data/ossimRpfCompressionSectionSubheader.h b/ossim/include/ossim/support_data/ossimRpfCompressionSectionSubheader.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfCompressionSectionSubheader.h
rename to ossim/include/ossim/support_data/ossimRpfCompressionSectionSubheader.h
diff --git a/include/ossim/support_data/ossimRpfConstants.h b/ossim/include/ossim/support_data/ossimRpfConstants.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfConstants.h
rename to ossim/include/ossim/support_data/ossimRpfConstants.h
diff --git a/ossim/include/ossim/support_data/ossimRpfCoverageSection.h b/ossim/include/ossim/support_data/ossimRpfCoverageSection.h
new file mode 100644
index 0000000..b56f791
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimRpfCoverageSection.h
@@ -0,0 +1,163 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+// 
+// Description: Rpf support class
+// 
+//********************************************************************
+// $Id: ossimRpfCoverageSection.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimRpfCoverageSection_HEADER
+#define ossimRpfCoverageSection_HEADER
+
+#include <iosfwd>
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/support_data/ossimRpfConstants.h>
+#include <ossim/base/ossimErrorCodes.h>
+
+class ossimRpfCoverageSection
+{
+public:
+   friend std::ostream& operator <<(std::ostream &out,
+                                    const ossimRpfCoverageSection &data);
+   
+   ossimRpfCoverageSection();
+   ossimRpfCoverageSection(const ossimRpfCoverageSection& obj);
+   const ossimRpfCoverageSection& operator=(const ossimRpfCoverageSection& rhs);
+   
+   ~ossimRpfCoverageSection(){}
+
+   ossimErrorCode parseStream(std::istream &in, ossimByteOrder byteOrder);
+
+   /**
+    * @brief Write method.
+    *
+    * @param out Stream to write to.
+    */
+   void writeStream(std::ostream& out);
+
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out String to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
+    * "nitf.file_name:"
+    * @return output stream.
+    */
+   std::ostream& print(std::ostream& out,
+                       const std::string& prefix=std::string()) const;
+   
+   void clearFields();
+
+   bool isGeographicRectNull()const
+   {
+      return ((theUpperLeftLat  == OSSIM_RPF_ULONG_NULL) &&
+              (theUpperLeftLon  == OSSIM_RPF_ULONG_NULL) &&
+              (theLowerLeftLat  == OSSIM_RPF_ULONG_NULL) &&
+              (theLowerLeftLon  == OSSIM_RPF_ULONG_NULL) &&
+              (theLowerRightLat == OSSIM_RPF_ULONG_NULL) &&
+              (theLowerRightLon == OSSIM_RPF_ULONG_NULL) &&
+              (theUpperRightLat == OSSIM_RPF_ULONG_NULL) &&
+              (theUpperRightLon == OSSIM_RPF_ULONG_NULL));
+   }
+   bool isIntervalNull()const
+   {
+      return ((theVerticalInterval   == OSSIM_RPF_ULONG_NULL)&&
+              (theHorizontalInterval == OSSIM_RPF_ULONG_NULL));
+   }
+
+   ossim_float64 getUlLat()const{return theUpperLeftLat;}
+   ossim_float64 getUlLon()const{return theUpperLeftLon;}
+   ossim_float64 getLlLat()const{return theLowerLeftLat;}
+   ossim_float64 getLlLon()const{return theLowerLeftLon;}
+   ossim_float64 getLrLat()const{return theLowerRightLat;}
+   ossim_float64 getLrLon()const{return theLowerRightLon;}
+   ossim_float64 getUrLat()const{return theUpperRightLat;}
+   ossim_float64 getUrLon()const{return theUpperRightLon;}
+
+   ossim_float64 getVerticalResolution()const{return theVerticalResolution;}
+   ossim_float64 getHorizontalResolution()const{return theHorizontalResolution;}
+
+   /*!
+    * This indicates the lat increment per pixel in degrees.
+    */
+   ossim_float64 getVerticalInterval()const{return theVerticalInterval;}
+
+   /*!
+    * This indicates the lon increment per pixel in degrees.
+    */
+   ossim_float64 getHorizontalInterval()const{return theHorizontalInterval;}
+
+   /** @brief Sets theUpperLeftLat to value. */
+   void setUlLat(ossim_float64 value);
+
+   /** @brief Sets theUpperLeftLon to value. */
+   void setUlLon(ossim_float64 value);
+
+   /** @brief Sets theLowerLeftLat to value. */
+   void setLlLat(ossim_float64 value);
+
+   /** @brief Sets theLowerLeftLon to value. */
+   void setLlLon(ossim_float64 value);
+   
+   /** @brief Sets theLowerRightLat to value. */
+   void setLrLat(ossim_float64 value);
+   
+   /** @brief Sets theLowerRightLon to value. */
+   void setLrLon(ossim_float64 value);
+
+   /** @brief Sets theUpperRightLat to value. */
+   void setUrLat(ossim_float64 value);
+
+   /** @brief Sets theUpperRightLon to value. */
+   void setUrLon(ossim_float64 value);
+
+   /** @brief Sets theVerticalResolution to value. */
+   void setVerticalResolution(ossim_float64 value);
+
+   /** @brief Sets theHorizontalResolution to value. */
+   void setHorizontalResolution(ossim_float64 value);
+   
+   /** @brief Sets theVerticalInterval to value. */
+   void setVerticalInterval(ossim_float64 value);
+   
+   /** @brief Sets theHorizontalInterval to value. */
+   void setHorizontalInterval(ossim_float64 value);
+   
+private:   
+   /*!
+    * 8 byte ossim_float64 and is the upper left lat or
+    * North West portion of the image.
+    */
+   ossim_float64 theUpperLeftLat;
+
+   /*!
+    * 8 byte ossim_float64 and is the upper left lon
+    * (North west)
+    */
+   ossim_float64 theUpperLeftLon;
+
+   ossim_float64 theLowerLeftLat;
+   ossim_float64 theLowerLeftLon;
+
+   ossim_float64 theUpperRightLat;
+   ossim_float64 theUpperRightLon;
+
+   ossim_float64 theLowerRightLat;
+   ossim_float64 theLowerRightLon;
+
+   ossim_float64 theVerticalResolution;
+   ossim_float64 theHorizontalResolution;
+
+   ossim_float64 theVerticalInterval;
+   ossim_float64 theHorizontalInterval;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimRpfFrame.h b/ossim/include/ossim/support_data/ossimRpfFrame.h
new file mode 100644
index 0000000..2269135
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimRpfFrame.h
@@ -0,0 +1,208 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+// 
+// Description: This class give the capability to access tiles from an
+//              rpf file.
+//
+//********************************************************************
+// $Id: ossimRpfFrame.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimRpfFrame_HEADER
+#define ossimRpfFrame_HEADER 1
+
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimErrorCodes.h>
+#include <ossim/support_data/ossimNitfFile.h>
+#include <ossim/support_data/ossimRpfColorGrayscaleTable.h>
+#include <ossim/support_data/ossimRpfReplaceUpdateTable.h>
+#include <iosfwd>
+#include <vector>
+
+class ossimRpfHeader;
+class ossimRpfAttributes;
+class ossimRpfCoverageSection;
+class ossimRpfImageDescriptionSubheader;
+class ossimRpfImageDisplayParameterSubheader;
+class ossimRpfMaskSubheader;
+class ossimRpfCompressionSection;
+class ossimRpfColorGrayscaleSubheader;
+class ossimRpfColorConverterSubsection;
+
+class OSSIM_DLL ossimRpfFrame : public ossimReferenced
+{
+public:
+   friend std::ostream& operator <<(std::ostream& out,
+                                    const ossimRpfFrame& data);
+   ossimRpfFrame();
+   ~ossimRpfFrame();
+   
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out String to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
+    * "nitf.file_name:"
+    * @return output stream.
+    */
+   std::ostream& print(std::ostream& out,
+                       const std::string& prefix=std::string()) const;  
+
+   ossimErrorCode parseFile(const ossimFilename& filename,
+                            bool minimalParse = false);
+   
+   const ossimRpfHeader* getRpfHeader()const{return theHeader;}
+
+   bool hasSubframeMaskTable()const;
+
+   const vector< vector<ossim_uint32> >& getSubFrameMask(
+      ossim_uint32 spectralGroup)
+   {
+      return theSubframeMaskTable[spectralGroup];
+   }
+   
+   bool fillSubFrameBuffer(ossim_uint8* buffer,
+                           ossim_uint32 spectralGroup,
+                           ossim_uint32 row,
+                           ossim_uint32 col)const;
+   
+   const ossimRpfCompressionSection* getCompressionSection()const
+   {
+      return theCompressionSection;
+   }
+   const vector<ossimRpfColorGrayscaleTable>& getColorGrayscaleTable()const
+   {
+      return theColorGrayscaleTable;
+   }
+   const ossimRpfColorConverterSubsection* getColorConverterSubsection()const
+   {
+      return theColorConverterSubsection;
+   }
+   const ossimRpfAttributes* getAttributes()const
+   {
+      return theAttributes;
+   }
+   const ossimNitfFile* getNitfFile()const
+   {
+      return theNitfFile.get();
+   }
+
+   /**
+    * @return The RPF replace / update table.  The ossimRefPtr can have a null
+    * internal pointer if record was not found. Callers should check
+    * ossimRefPtr<ossimRpfReplaceUpdateTable>::valid() before using pointer.
+    */
+   ossimRefPtr<ossimRpfReplaceUpdateTable> getRpfReplaceUpdateTable() const;
+
+private:
+   void clearFields();
+   void deleteAll();
+   ossimErrorCode populateCoverageSection(std::istream& in);
+   ossimErrorCode populateCompressionSection(std::istream& in);
+   ossimErrorCode populateImageSection(std::istream& in);
+   ossimErrorCode populateAttributeSection(std::istream& in);
+   ossimErrorCode populateColorGrayscaleSection(std::istream& in);
+   ossimErrorCode populateMasks(std::istream& in);
+   ossimErrorCode populateReplaceUpdateTable(std::istream& in);
+
+   /*!
+    * The header will be instantiated during the opening of the
+    * frame file.
+    */
+   ossimRpfHeader *theHeader;
+
+   /*!
+    * The filename is set if its a successful open.
+    */
+   ossimFilename   theFilename;
+
+   /*!
+    * This will hold the coverage.
+    */
+   ossimRpfCoverageSection* theCoverage;
+
+   /*!
+    * This will hold the attributes of this frame.
+    */
+   ossimRpfAttributes *theAttributes;
+
+   /*!
+    * This is the subheader for the image.  It will have
+    * some general information about the image.
+    */
+   ossimRpfImageDescriptionSubheader* theImageDescriptionSubheader;
+
+   /*!
+    * This is the mask subheader.
+    */
+   ossimRpfMaskSubheader* theMaskSubheader;
+   
+   /*!
+    * This is the subheader for the display parameters
+    * for this frame.
+    */
+   ossimRpfImageDisplayParameterSubheader* theImageDisplayParameterSubheader;
+
+   /*!
+    * Will hold a pointer to the compression information section.
+    */
+   ossimRpfCompressionSection*             theCompressionSection;
+   
+   /*!
+    * If present, it will hold the color grayscale subheader.
+    */
+   ossimRpfColorGrayscaleSubheader*        theColorGrayscaleSubheader;
+
+   /*!
+    * 
+    */
+   ossimRpfColorConverterSubsection*       theColorConverterSubsection;
+
+   /*!
+    * 
+    */
+   vector<ossimRpfColorGrayscaleTable>     theColorGrayscaleTable;
+
+   /*!
+    * 
+    */
+   ossimRefPtr<ossimNitfFile>              theNitfFile;
+
+   /*!
+    * We have a 3-D array.  For the most part the numberof spectral groups
+    * should be one.  The indexes are as follows:
+    *
+    * theSubframeMasKTable[spectralGroup][row][col]
+    *
+    *  It will hold RPF_NULL(0xffffffff) if the subframe does not exist
+    *  and it will hold an offset value from the start of the
+    * [spatial data section] to the first byte of the subframe table.
+    */
+   vector< vector< vector< ossim_uint32> > > theSubframeMaskTable;
+
+   /*!
+    * We have a 3-D array.  For the most part the numberof spectral groups
+    * should be one.  The indexes are as follows:
+    *
+    * theSubframeTransparencyMaskTable[spectralGroup][row][col]
+    *
+    *  It will hold RPF_NULL(0xffffffff) if the subframe does not exist
+    *  and it will hold an offset value from the start of the
+    * [spatial data section] to the first byte of the subframe table.
+    */
+   vector< vector< vector< ossim_uint32> > > theSubframeTransparencyMaskTable;
+
+   /** Holds table of "replace / update" records if present. */
+   ossimRefPtr<ossimRpfReplaceUpdateTable> theReplaceUpdateTable;
+
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimRpfFrameEntry.h b/ossim/include/ossim/support_data/ossimRpfFrameEntry.h
new file mode 100644
index 0000000..8672667
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimRpfFrameEntry.h
@@ -0,0 +1,62 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+//
+// Description: Rpf support class
+// 
+//********************************************************************
+// $Id: ossimRpfFrameEntry.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimRpfFrameEntry_HEADER
+#define ossimRpfFrameEntry_HEADER
+
+#include <iosfwd>
+#include <ossim/base/ossimFilename.h>
+
+class OSSIM_DLL ossimRpfFrameEntry
+{
+public:
+   friend std::ostream& operator<<(std::ostream& out,
+                                   const ossimRpfFrameEntry& data);
+   ossimRpfFrameEntry(const ossimFilename& rootDirectory=ossimFilename(""),
+                      const ossimFilename& pathToFrameFileFromRoot=ossimFilename(""));
+
+   /** @brief copy constructor */
+   ossimRpfFrameEntry(const ossimRpfFrameEntry& obj);
+
+   /** @brief operator= */
+   const ossimRpfFrameEntry& operator=(const ossimRpfFrameEntry& rhs);
+   
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out String to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
+    * "nitf.file_name:"
+    * @return output stream.
+    */
+   std::ostream& print(std::ostream& out,
+                       const std::string& prefix=std::string()) const;  
+
+   bool exists() const;
+   
+   void setEntry(const ossimFilename& rootDirectory,
+                 const ossimFilename& pathToFrameFileFromRoot);
+   
+   const ossimFilename& getFullPath() const;
+   const ossimString&   getRootDirectory() const;
+   const ossimString    getPathToFrameFileFromRoot() const;
+   
+private:
+   bool          m_exists;
+   ossimFilename m_rootDirectory;
+   ossimFilename m_pathToFrameFileFromRoot;
+   ossimFilename m_fullValidPath;
+};
+
+#endif
+
diff --git a/include/ossim/support_data/ossimRpfFrameFileIndexRecord.h b/ossim/include/ossim/support_data/ossimRpfFrameFileIndexRecord.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfFrameFileIndexRecord.h
rename to ossim/include/ossim/support_data/ossimRpfFrameFileIndexRecord.h
diff --git a/include/ossim/support_data/ossimRpfFrameFileIndexSectionSubheader.h b/ossim/include/ossim/support_data/ossimRpfFrameFileIndexSectionSubheader.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfFrameFileIndexSectionSubheader.h
rename to ossim/include/ossim/support_data/ossimRpfFrameFileIndexSectionSubheader.h
diff --git a/include/ossim/support_data/ossimRpfFrameFileIndexSubsection.h b/ossim/include/ossim/support_data/ossimRpfFrameFileIndexSubsection.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfFrameFileIndexSubsection.h
rename to ossim/include/ossim/support_data/ossimRpfFrameFileIndexSubsection.h
diff --git a/include/ossim/support_data/ossimRpfFrameFileReader.h b/ossim/include/ossim/support_data/ossimRpfFrameFileReader.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfFrameFileReader.h
rename to ossim/include/ossim/support_data/ossimRpfFrameFileReader.h
diff --git a/ossim/include/ossim/support_data/ossimRpfHeader.h b/ossim/include/ossim/support_data/ossimRpfHeader.h
new file mode 100644
index 0000000..3304111
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimRpfHeader.h
@@ -0,0 +1,182 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+//
+// Description: Rpf support class
+// 
+//********************************************************************
+// $Id: ossimRpfHeader.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimRpfHeader_HEADER
+#define ossimRpfHeader_HEADER 1
+
+#include <iosfwd>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+#include <ossim/support_data/ossimRpfConstants.h>
+
+class ossimRpfLocationSection;
+class ossimRpfCoverageSection;
+class ossimRpfBoundaryRectTable;
+class ossimRpfBoundaryRectSectionSubheader;
+class ossimRpfFrameFileIndexSectionSubheader;
+class ossimRpfFrameFileIndexSubsection;
+class ossimRpfColorTableIndexSectionSubheader;
+class ossimRpfImageDescriptionSubheader;
+class ossimRpfMaskSubsection;
+class ossimRpfAttributeSectionSubheader;
+class ossimRpfImageDisplayParameterSubheader;
+class ossimRpfCompressionSection;
+class ossimRpfCompressionSectionSubheader;
+class ossimRpfColorGrayscaleSubheader;
+
+class ossimRpfHeader : public ossimNitfRegisteredTag
+{
+public:
+
+   /** default constructor */
+   ossimRpfHeader();
+
+   /** copy constructor */
+   ossimRpfHeader(const ossimRpfHeader& obj);
+
+   /** assignment operator */
+   const ossimRpfHeader& operator=(const ossimRpfHeader& rhs);
+
+   virtual ~ossimRpfHeader();
+
+   /**
+    * @brief Parse method.
+    *
+    * @param in Stream to parse.
+    */
+   virtual void parseStream(std::istream& in);
+
+   /**
+    * @brief Write method.
+    *
+    * @param out Stream to write to.
+    */
+   virtual void writeStream(std::ostream& out);
+   
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out String to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
+    * "nitf.file_name:"
+    * @return output stream.
+    */
+   std::ostream& print(std::ostream& out,
+                       const std::string& prefix=std::string()) const;
+
+   virtual ossimByteOrder getByteOrder()const;
+   
+   const ossimRpfLocationSection* getLocationSection() const;
+
+   ossimRpfLocationSection* getLocationSection();
+
+   bool hasComponent(ossimRpfComponentId componentId)const;
+   ossimString getSecurityClassification()const;
+   
+   /*!
+    * This will return a new coverage section.  It will return NULL if
+    * one does not exist.
+    */
+   ossimRpfCoverageSection*
+      getNewCoverageSection(const ossimFilename& file)const;
+   ossimRpfCoverageSection*
+      getNewCoverageSection(std::istream& in)const;
+
+   ossimRpfColorGrayscaleSubheader*
+      getNewColorGrayscaleSubheader(std::istream& in)const;
+   ossimRpfCompressionSection*
+      getNewCompressionSection(std::istream& in)const;
+   ossimRpfCompressionSectionSubheader*
+      getNewCompressionSectionSubheader(std::istream& in)const;
+   ossimRpfImageDisplayParameterSubheader*
+      getNewImageDisplayParameterSubheader(std::istream& in)const;
+   ossimRpfAttributeSectionSubheader*
+      getNewAttributeSectionSubheader(std::istream& in)const;
+   ossimRpfImageDescriptionSubheader*
+      getNewImageDescriptionSubheader(std::istream& in)const;
+   ossimRpfMaskSubsection*
+      getNewMaskSubsection(std::istream& in)const;
+   ossimRpfBoundaryRectSectionSubheader*
+      getNewBoundaryRectSectSubheader(std::istream& in)const;
+   ossimRpfBoundaryRectTable*
+      getNewBoundaryRectTable(std::istream& in)const;
+   ossimRpfFrameFileIndexSectionSubheader*
+      getNewFrameFileIndexSectionSubheader(std::istream& in)const;
+   ossimRpfFrameFileIndexSubsection*
+      getNewFileIndexSubsection(std::istream& in)const;
+   ossimRpfColorTableIndexSectionSubheader*
+      getNewColorTableIndexSectionSubheader(std::istream& in)const;
+
+   ossimRpfCompressionSection*
+      getNewCompressionSection(const ossimFilename& file)const;
+   ossimRpfBoundaryRectSectionSubheader*
+      getNewBoundaryRectSectSubheader(const ossimFilename& file)const;
+   ossimRpfBoundaryRectTable*
+      getNewBoundaryRectTable(const ossimFilename& file)const;
+   ossimRpfFrameFileIndexSectionSubheader*
+      getNewFrameFileIndexSectionSubheader(const ossimFilename& file)const;
+   ossimRpfFrameFileIndexSubsection*
+      getNewFileIndexSubsection(const ossimFilename& file)const;
+   ossimRpfColorTableIndexSectionSubheader*
+      getNewColorTableIndexSectionSubheader(const ossimFilename& file)const;
+
+   ossimString getDate()const;
+
+   /** @brief returns the byte position of the location section. */
+   ossim_uint32 getLocationSectionLocation() const;
+   
+   void setFilename(const ossimString& file);
+   void setNewRepUpIndicator(const ossimString& s);
+   void setGovSpecNumber(const ossimString& s);
+   void setGovSpecDate(const ossimString& s);
+   void setSecurityClassification(const ossimString& s);
+   void setCountryCode(const ossimString& s);
+   void setSecurityReleaseMarking(const ossimString& s);
+   void setLocationSectionPos(std::streamoff off);
+
+   /*!
+    * Method to the load (recreate) the state of the object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
+
+private:
+
+   /** 0x00 = big, 0xff = little */
+   ossim_uint8  m_littleBigEndianIndicator; // 1 byte bool
+   ossim_uint16 m_headerSectionLength;      // 2 bytes uint
+   char         m_fileName[13];             // 12 byte ascii
+   ossim_uint8  m_newRepUpIndicator;        // 1 byte unsigned int
+   char         m_govSpecNumber[16];        // 15 byte ascii
+   char         m_govSpecDate[9];           // 8 byte ascii
+   /**
+    * 1 byte field that can have the values
+    *
+    * U   Unclassified
+    * R   Restricted
+    * C   Confidential
+    * S   Secret
+    * T   Top Secret
+    */ 
+   char         m_securityClassification[2]; // 1 byte ascii
+   char         m_countryCode[3];            // 2 byte ascii
+   char         m_securityReleaseMarking[3]; // 2 byte ascii
+   ossim_uint32 m_locSectionLoc;             // 4 byte unsigned int
+   
+   ossimRpfLocationSection* m_locationSection;
+};
+
+#endif
+ 
+
diff --git a/ossim/include/ossim/support_data/ossimRpfImageDescriptionSubheader.h b/ossim/include/ossim/support_data/ossimRpfImageDescriptionSubheader.h
new file mode 100644
index 0000000..12a928b
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimRpfImageDescriptionSubheader.h
@@ -0,0 +1,128 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+// 
+// Description: Rpf support class
+// 
+//********************************************************************
+// $Id: ossimRpfImageDescriptionSubheader.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimRpfImageDescriptionSubheader_HEADER
+#define ossimRpfImageDescriptionSubheader_HEADER
+
+#include <iosfwd>
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/support_data/ossimRpfConstants.h>
+#include <ossim/base/ossimErrorContext.h>
+
+class ossimRpfImageDescriptionSubheader
+{
+public:
+   friend std::ostream& operator <<(
+      std::ostream& out, const ossimRpfImageDescriptionSubheader& data);
+
+   ossimRpfImageDescriptionSubheader();
+   ~ossimRpfImageDescriptionSubheader(){}
+
+   ossimErrorCode parseStream(std::istream& in, ossimByteOrder byteOrder);
+   
+   ossim_uint32 getStartOffset()const{return theStartOffset;}
+   ossim_uint32 getEndOffset()const{return theEndOffset;}
+
+   bool isSubframeMaskTableOffsetNull()const
+   {
+      return (theSubframeMaskTableOffset == OSSIM_RPF_ULONG_NULL);
+   }
+   bool isTransparencyMaskTableOffsetNull()const
+   {
+      return (theTransparencyMaskTableOffset == OSSIM_RPF_ULONG_NULL);
+   }
+   ossim_uint16 getNumberOfSpectralGroups()const
+   {
+      return theNumberOfSpectralGroups;
+   }
+   ossim_uint16 getNumberOfSubframeTables()const
+   {
+      return theNumberOfSubframeTables;
+   }
+   ossim_uint16 getNumberOfSpectralBandTables()const
+   {
+      return theNumberOfSpectralBandTables;
+   }
+   ossim_uint16 getNumberOfSpectralBandLinesPerImageRow()const
+   {
+      return theNumberOfSpectralBandLinesPerImageRow;
+   }
+   ossim_uint16 getNumberOfSubframesHorizontal()const
+   {
+      return theNumberOfSubframesHorizontal;
+   }
+   ossim_uint16 getNumberOfSubframesVertical()const
+   {
+      return theNumberOfSubframesVertical;
+   }
+   ossim_uint32  getNumberOfOutputColumnsPerSubframe()const
+   {
+      return theNumberOfOutputColumnsPerSubframe;
+   }
+   ossim_uint32  getNumberOfOutputRowsPerSubframe()const
+   {
+      return theNumberOfOutputRowsPerSubframe;
+   }
+   ossim_uint32  getSubframeMaskTableOffset()const
+   {
+      return theSubframeMaskTableOffset;
+   }
+   ossim_uint32  getTransparencyMaskTableOffset()const
+   {
+      return theTransparencyMaskTableOffset;
+   }
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out String to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
+    * "nitf.file_name:"
+    * @return output stream.
+    */
+   std::ostream& print(std::ostream& out,
+                       const std::string& prefix=std::string()) const;
+   
+private:
+   void clearFields();
+   // work variables to store useful information.
+   ossim_uint32 theStartOffset;
+   ossim_uint32 theEndOffset;
+
+   ossim_uint16 theNumberOfSpectralGroups;
+   ossim_uint16 theNumberOfSubframeTables;
+   ossim_uint16 theNumberOfSpectralBandTables;
+   ossim_uint16 theNumberOfSpectralBandLinesPerImageRow;
+
+   /*!
+    * Each frame file could be divided into sub frames.
+    * This identifies the number of subframes in the
+    * horizontal direction.
+    */
+   ossim_uint16 theNumberOfSubframesHorizontal;
+
+   /*!
+    * Each frame file could be divided into sub frames.
+    * This identifies the number of subframes in the
+    * vertical direction.
+    */
+   ossim_uint16 theNumberOfSubframesVertical;
+   ossim_uint32 theNumberOfOutputColumnsPerSubframe;
+   ossim_uint32 theNumberOfOutputRowsPerSubframe;
+   ossim_uint32 theSubframeMaskTableOffset;
+   ossim_uint32 theTransparencyMaskTableOffset;
+};
+
+#endif
+
diff --git a/include/ossim/support_data/ossimRpfImageDisplayParameterSubheader.h b/ossim/include/ossim/support_data/ossimRpfImageDisplayParameterSubheader.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfImageDisplayParameterSubheader.h
rename to ossim/include/ossim/support_data/ossimRpfImageDisplayParameterSubheader.h
diff --git a/ossim/include/ossim/support_data/ossimRpfInfo.h b/ossim/include/ossim/support_data/ossimRpfInfo.h
new file mode 100644
index 0000000..4ec04bf
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimRpfInfo.h
@@ -0,0 +1,63 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Mingjie Su
+//
+// Description: Rpf Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimRpfInfo.h 1236 2010-08-05 19:45:44Z ming.su $
+#ifndef ossimRpfInfo_HEADER
+#define ossimRpfInfo_HEADER
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/support_data/ossimInfoBase.h>
+#include <ossim/base/ossimFilename.h>
+
+class ossimKeywordlist;
+/**
+ * @brief HDF info class.
+ *
+ * Encapsulates the HDF functionality.
+ */
+class ossimRpfInfo : public ossimInfoBase
+{
+public:
+
+   /** default constructor */
+   ossimRpfInfo();
+
+   /** virtual destructor */
+   virtual ~ossimRpfInfo();
+
+   /**
+    * @brief open method.
+    *
+    * @param file File name to open.
+    * @return true on success false on error.
+    */
+   virtual bool open(const ossimFilename& file);
+
+   /**
+    * Print method.
+    *
+    * @param out Stream to print to.
+    * 
+    * @return std::ostream&
+    */
+   virtual std::ostream& print(std::ostream& out) const;
+
+   bool isOpen();
+
+   private: 
+   
+     ossimFilename                       theFile;
+     ossimFilename                       m_infoFile;
+};
+
+#endif /* End of "#ifndef ossimRpfInfo_HEADER" */
+
diff --git a/ossim/include/ossim/support_data/ossimRpfLocationSection.h b/ossim/include/ossim/support_data/ossimRpfLocationSection.h
new file mode 100644
index 0000000..2ddeb10
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimRpfLocationSection.h
@@ -0,0 +1,168 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+// 
+// Description: Rpf support class
+// 
+//********************************************************************
+// $Id: ossimRpfLocationSection.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimRpfLocationSection_HEADER
+#define ossimRpfLocationSection_HEADER
+
+#include <iosfwd>
+#include <vector>
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/support_data/ossimRpfConstants.h>
+#include <ossim/base/ossimErrorCodes.h>
+
+//  10 byte record
+class ossimRpfComponentLocationRecord
+{
+public:
+   friend std::ostream& operator<<(
+      std::ostream& out, const ossimRpfComponentLocationRecord& data);
+
+   /** default constructor */
+   ossimRpfComponentLocationRecord();
+
+   /** copy constructor */
+   ossimRpfComponentLocationRecord(const ossimRpfComponentLocationRecord& record);
+
+   /** assignment operator */
+   const ossimRpfComponentLocationRecord& operator=(const ossimRpfComponentLocationRecord& rhs);
+   
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out String to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
+    * "nitf.file_name:"
+    * @return output stream.
+    */
+   std::ostream& print(std::ostream& out,
+                       const std::string& prefix=std::string()) const;
+
+   ossimErrorCode parseStream(std::istream& in, ossimByteOrder endianOrder);
+
+   /**
+    * @brief Write method.
+    *
+    * @param out Stream to write to.
+    */
+   void writeStream(std::ostream& out);
+
+   /*!
+    * The component is a 2-Byte unsigned value which
+    * identitfies a level-2 component.  The table can be
+    * found in MIL-STD-2411-1 in section 5.1.1 and in ossimRpfConstants.h.
+    */
+   ossim_uint16 m_componentId;
+
+   /*!
+    * Is a 4 byte unsigned integer indicating the length in
+    * bytes of the component.
+    */
+   ossim_uint32  m_componentLength;
+
+   /*!
+    * Is a 4 byte value defining the absolute address (byte number)
+    * of the first byte of the component measured
+    * from the beginning of the RPF Frame file.
+    */ 
+   ossim_uint32  m_componentLocation;
+};
+
+class ossimRpfLocationSection
+{
+public:
+   friend std::ostream& operator <<(std::ostream& out,
+                                    const ossimRpfLocationSection &data);
+   ossimRpfLocationSection();
+   virtual ~ossimRpfLocationSection(){}
+
+   virtual ossimErrorCode parseStream(std::istream& in,
+                                      ossimByteOrder endianOrder);
+
+   /**
+    * @brief Write method.
+    *
+    * @param out Stream to write to.
+    */
+   void writeStream(std::ostream& out);
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out String to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
+    * "nitf.file_name:"
+    * @return output stream.
+    */
+   std::ostream& print(std::ostream& out,
+                       const std::string& prefix=std::string()) const;
+
+   /*!
+    * Will let you know if a component exists within the location section.
+    * these component Ids' are defined in the MIL-STD-2411-1 standards doc.
+    * the ossimRpfComponentId is in ossimRpfConstants.h
+    */
+   bool hasComponent(ossimRpfComponentId componentId)const;
+
+   bool getComponent(ossimRpfComponentId componentId,
+                     ossimRpfComponentLocationRecord& result)const;
+
+   /**
+    * @brief Method to add a component location record.
+    *
+    * This will push the record onto the back of theComponentLocationList array.
+    *
+    * @param record Record to add to array.
+    */
+   void addComponentRecord(const ossimRpfComponentLocationRecord& record);
+
+   void setLocationSectionLength(ossim_uint16 length);
+   void setLocationTableOffset(ossim_uint32 offset);
+   void setNumberOfComponentLocationRecords(ossim_uint16 count);
+   void setLocationRecordLength(ossim_uint16 length);
+   void setComponentAggregateLength(ossim_uint32 length);
+
+   /** @brief Clears records and fields. Public interface to clearFields. */
+   void clearFields();
+
+   /** Brief Direct access to the list of records. */
+   std::vector<ossimRpfComponentLocationRecord>& getLocationRecordList();
+   
+private:
+
+   /*!
+    * This is a 2 byte unsigned short >= 34 indicatin
+    * the length in bytes of the entire location section
+    */
+   ossim_uint16 m_locationSectionLength;
+
+   ossim_uint32 m_locationTableOffset;
+
+   ossim_uint16 m_numberOfComponentLocationRecords;
+
+   ossim_uint16 m_locationRecordLength;
+
+   ossim_uint32 m_componentAggregateLength;
+
+   /*!
+    * Since there are not very many components within an Rpf file
+    * it would be overkill to sort these components into an stl
+    * map.  We will just use an array (stl vector) and do linear searches
+    * for components when we need to.
+    */
+   std::vector<ossimRpfComponentLocationRecord> m_componentLocationList;
+};
+
+#endif
+
diff --git a/include/ossim/support_data/ossimRpfMaskSubheader.h b/ossim/include/ossim/support_data/ossimRpfMaskSubheader.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfMaskSubheader.h
rename to ossim/include/ossim/support_data/ossimRpfMaskSubheader.h
diff --git a/include/ossim/support_data/ossimRpfMaskSubsection.h b/ossim/include/ossim/support_data/ossimRpfMaskSubsection.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfMaskSubsection.h
rename to ossim/include/ossim/support_data/ossimRpfMaskSubsection.h
diff --git a/include/ossim/support_data/ossimRpfPathnameRecord.h b/ossim/include/ossim/support_data/ossimRpfPathnameRecord.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfPathnameRecord.h
rename to ossim/include/ossim/support_data/ossimRpfPathnameRecord.h
diff --git a/include/ossim/support_data/ossimRpfReplaceUpdateRecord.h b/ossim/include/ossim/support_data/ossimRpfReplaceUpdateRecord.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfReplaceUpdateRecord.h
rename to ossim/include/ossim/support_data/ossimRpfReplaceUpdateRecord.h
diff --git a/include/ossim/support_data/ossimRpfReplaceUpdateSectionSubheader.h b/ossim/include/ossim/support_data/ossimRpfReplaceUpdateSectionSubheader.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfReplaceUpdateSectionSubheader.h
rename to ossim/include/ossim/support_data/ossimRpfReplaceUpdateSectionSubheader.h
diff --git a/include/ossim/support_data/ossimRpfReplaceUpdateTable.h b/ossim/include/ossim/support_data/ossimRpfReplaceUpdateTable.h
similarity index 100%
rename from include/ossim/support_data/ossimRpfReplaceUpdateTable.h
rename to ossim/include/ossim/support_data/ossimRpfReplaceUpdateTable.h
diff --git a/ossim/include/ossim/support_data/ossimRpfToc.h b/ossim/include/ossim/support_data/ossimRpfToc.h
new file mode 100644
index 0000000..9d87980
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimRpfToc.h
@@ -0,0 +1,230 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimRpfToc.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef osimRpfToc_HEADER
+#define osimRpfToc_HEADER
+
+#include <vector>
+#include <iosfwd>
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimErrorCodes.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/support_data/ossimNitfFileHeader.h>
+#include <ossim/support_data/ossimRpfHeader.h>
+
+class ossimRpfFrameFileIndexSubsection;
+class ossimRpfTocEntry;
+class ossimRpfFrameEntry;
+
+class OSSIM_DLL ossimRpfToc : public ossimReferenced
+{
+public:
+   friend OSSIM_DLL std::ostream& operator <<(std::ostream& out,
+                                              const ossimRpfToc& data);
+   ossimRpfToc();
+
+   virtual ~ossimRpfToc();
+
+   /**
+    * @brief Parses a.toc file.
+    * @param fileName File to parse.
+    * @param keepFileHeader If true the ossimNitfFileHeader will be kept.
+    * @return ossimErrorCodes::OSSIM_OK on success, ossimErrorCodes::OSSIM_ERROR on error.
+    */
+   ossimErrorCode parseFile(const ossimFilename &fileName,
+                            bool keepFileHeader = false);
+
+   /**
+    * @brief Creates a new a.toc file from list of rpf frames in output directory.
+    *
+    * @param dotRpfFile File containing list of rpf frames wanted.
+    *
+    * @param outputDir Directory to write a.toc file and rpf frames to.
+    *
+    * @see ossim-rpf application usage for dotRpfFile format.
+    *
+    * @note Throws ossimException on error.
+    */
+   void createTocAndCopyFrames( const ossimFilename& dotRpfFile,
+                                const ossimFilename& outputDir);
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out String to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
+    * "nitf.file_name:"
+    * @return output stream.
+    */
+   std::ostream& print(std::ostream& out,
+                       const std::string& prefix=std::string(),
+                       bool printOverviews=false) const;
+   
+   ossim_uint32 getNumberOfEntries()const;
+   
+   const ossimRpfTocEntry* getTocEntry(ossim_uint32 index)const;
+
+   /**
+    * Returns -1 if not found.
+    */
+   ossim_int32 getTocEntryIndex(const ossimRpfTocEntry* entry);
+
+   /**
+    * @brief Get the nitf file header.
+    *
+    * @return The nitf file header or 0 if not set.
+    */
+   const ossimNitfFileHeader* getNitfFileHeader()const;
+   
+   const ossimRpfHeader* getRpfHeader() const;
+
+   /**
+    * For the given entry index, this routine returns the number of 
+    * frames that exist in the horizontal direction. If the entry index
+    * is invalid, 0 frames are returned.
+    *
+    * @param idx the entry index.
+    * @return number of frames in the horizontal direction
+    */
+   ossim_uint32 getNumberOfFramesHorizontal(ossim_uint32 idx)const;
+
+   /**
+    * For the given entry index, this routine returns the number of 
+    * frames that exist in the vertical direction. If the entry index
+    * is invalid, 0 frames are returned.
+    *
+    * @param idx the entry index.
+    * @return number of frames in the vertical direction
+    */
+   ossim_uint32 getNumberOfFramesVertical(ossim_uint32 idx)const;
+
+   /**
+    * For the given entry index, frame row, and frame column, this 
+    * routine returns the corresponding ossimRpfFrameEntry instance. 
+    *
+    * @param entryIdx the entry index.
+    * @param row the frame row.
+    * @param col the frame col.
+    * @return true if successful
+    */
+   bool getRpfFrameEntry(ossim_uint32 entryIdx, 
+                         ossim_uint32 row,
+                         ossim_uint32 col,
+                         ossimRpfFrameEntry& result)const;
+
+   /**
+    * For the given entry index, frame row, and frame column, this 
+    * routine returns the corresponding name of the frame image
+    * with respect to the location of the toc file. 
+    *
+    * @param entryIdx the entry index.
+    * @param row the frame row.
+    * @param col the frame col.
+    * @return the name of the frame image
+    */
+   const ossimString getRelativeFramePath( ossim_uint32 entryIdx,
+                                           ossim_uint32 row,
+                                           ossim_uint32 col)const;
+
+   /**
+    * @brief Method to get the root directory from the a.toc file name.
+    * @param dir This initializes dir.
+    */
+   void getRootDirectory(ossimFilename& dir) const;
+
+private:
+   void deleteAll();
+   void clearAll();
+   void deleteTocEntryList();
+   void buildTocEntryList(ossimRpfHeader* rpfHeader);
+   void allocateTocEntryList(ossim_uint32 numberOfEntries);
+
+   /** @brief Walks through frames to find the first entry that exists... */
+   void getFirstEntry(const ossimRpfTocEntry* rpfTocEntry,
+                      ossimRpfFrameEntry& frameEntry) const;
+
+   /**
+    * @brief Writes the frame file sub section of an a.toc.
+    * 
+    * This is a utility method for createTocAndCopyFrames method. 
+    */
+   void writeFrameFileIndexSection(ossimRpfFrameFileIndexSubsection* frameFileSubSection,
+                                   std::ifstream& dotRpfStr,
+                                   std::ofstream& dotTocStr);
+
+   /**
+    * @brief Copies frame to output directory.
+    * 
+    * This is a utility method for createTocAndCopyFrames method. 
+    */
+   void copyFrames(std::ifstream& dotRpfStr, const ossimFilename& outputDir);
+
+   
+
+   /**
+    * @brief Get the number of frames from the dot rpf file.
+    * This is a utility method for createTocAndCopyFrames method.
+    */
+   ossim_uint32 getNumberOfFrames(std::ifstream& dotRpfStr) const;
+
+   /**
+    * @brief Get a.toc file from the dot rpf file.
+    * This is a utility method for createTocAndCopyFrames method.
+    */
+   ossimFilename getSourceTocFile(std::ifstream& dotRpfStr) const;
+
+   /**
+    * @brief Gets the zero based entry number for the first file in the dot rpf file.
+    * This is a utility method for createTocAndCopyFrames method.
+    */
+   bool getCorespondingEntry(ossimRpfFrameFileIndexSubsection* frameFileSubSection,
+                             std::ifstream& dotRpfStr,
+                             ossim_uint32& entry) const;
+   
+   /**
+    * @brief Gets the filename from line in.
+    *
+    * Line format:
+    *
+    * /data/spadac/rpf-frame-test/t1/N03E030/005FNU1B.I21|30.9141787715578,3.03831480449669|30.9889225265623,3.10741371349693
+    *
+    * @param line Line to extract filename from.
+    *
+    * @param out Filename to initialize.
+    *
+    * This is a utility method for createTocAndCopyFrames method.
+    */
+   bool getFile(const std::string& line, ossimFilename& file) const;
+
+   /*!
+    * This will hold a list of table of content entries.  There is one entry
+    * per directory.  Each entry will have its geographic coverage.
+    * Each directory is then divided into frames.  There could be 30 or
+    * more frame images that make up an entire image.
+    */
+   std::vector<ossimRpfTocEntry*> m_tocEntryList;
+   
+   /*!
+    * We will remember the file that we opened
+    */
+   ossimFilename m_filename;
+
+   ossimRefPtr<const ossimNitfFileHeader> m_nitfFileHeader;
+   
+   ossimRefPtr<ossimRpfHeader> m_rpfHeader;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimRpfTocEntry.h b/ossim/include/ossim/support_data/ossimRpfTocEntry.h
new file mode 100644
index 0000000..2899dc0
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimRpfTocEntry.h
@@ -0,0 +1,114 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+// 
+// Description: Rpf support class
+// 
+//********************************************************************
+// $Id: ossimRpfTocEntry.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimRpfTocEntry_HEADER
+#define ossimRpfTocEntry_HEADER
+
+#include <vector>
+#include <iosfwd>
+
+#include <ossim/support_data/ossimRpfBoundaryRectRecord.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimErrorContext.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/support_data/ossimRpfFrameEntry.h>
+
+class ossimIrect;
+
+class OSSIMDLLEXPORT ossimRpfTocEntry
+{
+public:
+   friend std::ostream& operator <<(std::ostream& out,
+                                    const ossimRpfTocEntry& data);
+   ossimRpfTocEntry();
+   ossimErrorCode parseStream(std::istream &in, ossimByteOrder byteOrder);
+
+   /**
+    * @brief print method that outputs a key/value type format adding prefix
+    * to keys.
+    * @param out String to output to.
+    * @param prefix This will be prepended to key.
+    * e.g. Where prefix = "nitf." and key is "file_name" key becomes:
+    * "nitf.file_name:"
+    * @return output stream.
+    */
+   std::ostream& print(std::ostream& out,
+                       const std::string& prefix=std::string()) const;
+   
+   void setEntry(const ossimRpfFrameEntry& entry,
+                 long row,
+                 long col);
+
+   bool getEntry(long row,
+                 long col,
+                 ossimRpfFrameEntry& result)const;
+
+   ossimString getProductType() const;
+   
+   /*!
+    * returns how many subimges or frames exist in the horizontal
+    * direction.
+    */
+   ossim_uint32 getNumberOfFramesHorizontal()const;
+
+   /*!
+    * returns how many subimges or frames exist in the vertical
+    * direction.
+    */
+   ossim_uint32 getNumberOfFramesVertical()const;
+
+   /** @return The number of lines (frames vertical * 1536). */
+   ossim_uint32 getNumberOfLines() const;
+
+   /** @return The number of samples (frames horizontal * 1536). */
+   ossim_uint32 getNumberOfSamples() const;
+
+   /** @return Number of bands. */
+   ossim_uint32 getNumberOfBands() const;
+   
+   /**
+    * @brief Get the bounding rect of entry.
+    * @param rect Gets initialized with rect.
+    */
+   void getBoundingRect(ossimIrect& rect) const;
+   
+   const ossimRpfBoundaryRectRecord& getBoundaryInformation()const;
+
+   /*!
+    * If there is an entry and all the files don't exist we will return
+    * true.
+    */
+   bool isEmpty()const;
+
+   /**
+    * Returns the image geometry object associated with this tile source or
+    * NULL if non defined.  The geometry contains full-to-local image
+    * transform as well as projection (image-to-world).
+    */
+   ossimRefPtr<ossimImageGeometry> getImageGeometry() const;
+
+   /** @brief Get the scale in decimal degrees per pixel. */
+   void getDecimalDegreesPerPixel(ossimDpt& scale) const;
+
+   /** @brief Get the scale in meters per pixel. */
+   void getMetersPerPixel(ossimDpt& scale) const;
+   
+private:
+   void allocateFrameEntryArray();
+   
+   ossimRpfBoundaryRectRecord theBoundaryInformation;
+   ossim_uint32  theNumSamples; //!> May be less than actual image width in case of > 360 deg wrap condition. (OLK 10/10)
+   std::vector< std::vector<ossimRpfFrameEntry> > theFrameEntryArray;
+};
+
+#endif
+
diff --git a/include/ossim/support_data/ossimSpaceImagingGeom.h b/ossim/include/ossim/support_data/ossimSpaceImagingGeom.h
similarity index 100%
rename from include/ossim/support_data/ossimSpaceImagingGeom.h
rename to ossim/include/ossim/support_data/ossimSpaceImagingGeom.h
diff --git a/include/ossim/support_data/ossimSpotDimapSupportData.h b/ossim/include/ossim/support_data/ossimSpotDimapSupportData.h
similarity index 100%
rename from include/ossim/support_data/ossimSpotDimapSupportData.h
rename to ossim/include/ossim/support_data/ossimSpotDimapSupportData.h
diff --git a/include/ossim/support_data/ossimSrcRecord.h b/ossim/include/ossim/support_data/ossimSrcRecord.h
similarity index 100%
rename from include/ossim/support_data/ossimSrcRecord.h
rename to ossim/include/ossim/support_data/ossimSrcRecord.h
diff --git a/include/ossim/support_data/ossimSrtmFilename.h b/ossim/include/ossim/support_data/ossimSrtmFilename.h
similarity index 100%
rename from include/ossim/support_data/ossimSrtmFilename.h
rename to ossim/include/ossim/support_data/ossimSrtmFilename.h
diff --git a/ossim/include/ossim/support_data/ossimSrtmSupportData.h b/ossim/include/ossim/support_data/ossimSrtmSupportData.h
new file mode 100644
index 0000000..15f7be4
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimSrtmSupportData.h
@@ -0,0 +1,204 @@
+//----------------------------------------------------------------------------
+// Copyright (c) 2005, David Burken, all rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+// 
+// Support data class for a Shuttle Radar Topography Mission (SRTM) file.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimSrtmSupportData.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimSrtmSupportData_HEADER
+#define ossimSrtmSupportData_HEADER
+
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimIoStream.h>
+#include <ossim/projection/ossimProjection.h>
+
+/**
+ * @class ossimStrmSupportData
+ * Support data class for a Shuttle Radar Topography Mission (SRTM) file.
+ * Provides lines, samples, post spacing and geometry info given a valid
+ * srtm file.  This class will set an error if the file is not deemed to
+ * be valid.
+ */
+class OSSIMDLLEXPORT ossimSrtmSupportData : public ossimObject
+{
+public:
+   /** default constructor */
+   ossimSrtmSupportData();
+
+   /** destructor */
+   virtual ~ossimSrtmSupportData();
+
+   /**
+    * Initializes object from file.  File is expected to be in a format like
+    * N27W081.hgt or n27w081.hgt where "N27" is the South West latitude of
+    * the cell and "W081" is the South West longitude of the cell.
+    *
+    * @param srtmFile File to set.
+    *
+    * @param scanForMinMax If true and there is no ossim meta data file with
+    * the min and max keywords in it, this will call computeMinMax which will
+    * scan the file for min and max.
+    *
+    * @return Returns true if file is deemed to be an srtm, false if not.
+    *
+    * @note This will write an ossim meta data (.omd) if one does not exists.
+    */
+   bool setFilename(const ossimFilename& srtmFile,
+                    bool scanForMinMax = false);
+
+   /** @return Returns the srtm file name. */
+   ossimFilename getFilename() const;
+
+   /**
+    * @return Returns the number of lines or rows.  Returns  OSSIM_UINT_NAN
+    * if not initialized or file was invalid.
+    */
+   ossim_uint32 getNumberOfLines() const;
+   
+   /**
+    * @return Returns the number of samples or columns. Returns
+    * OSSIM_UINT_NAN if not initialized or file was invalid.
+    */
+   ossim_uint32 getNumberOfSamples() const;
+
+   /**
+    *  Populates the keyword list with image geometry information.  This
+    *  method is used to relay projection information to users.
+    *
+    *  @param kwl Keyword list that will be initialized with geometry info.
+    *  Returns true if geometry info is present, false if not.
+    *
+    *  @param prefix The prefix is added to the resulting keyword list
+    *  keywords.  So is you if you pass in a prefix of "image01.", the
+    *  keyword ul_lat will be like:  "image01.ul_lat:  -40.00000"
+    */
+   virtual bool getImageGeometry(ossimKeywordlist& kwl, const char* prefix=0);
+
+   /**
+    * @brief Gets the projection for srtm cell.
+    * @return  The projection for srtm cell.
+    */
+   ossimRefPtr<ossimProjection> getProjection() const;
+
+   /**
+    * Method to save the state of the object to a keyword list.
+    * Return true if ok or false on error.
+    */
+   virtual bool saveState(ossimKeywordlist& kwl,
+                          const char* prefix=0) const;
+   
+   /**
+    * Method to the load (recreate) the state of the object from a keyword
+    * list.  Return true if ok or false on error.
+    */
+   virtual bool loadState(const ossimKeywordlist& kwl,
+                          const char* prefix=0);
+   
+   /**
+    * @return Returns the Southwest latitude in decimal degrees. Returns
+    * OSSIM_DBL_NAN if not initialized or file was invalid.
+    */
+   ossim_float64 getSouthwestLatitude() const;
+
+   /**
+    * @return Returns the Southwest longitude in decimal degrees.  Returns
+    * OSSIM_DBL_NAN if not initialized or file was invalid.
+    */
+   ossim_float64 getSouthwestLongitude() const;
+   
+   /**
+    * @return Returns the latitude spacing in decimal degrees. Returns
+    * OSSIM_DBL_NAN if not initialized or file was invalid.
+    */
+   ossim_float64 getLatitudeSpacing() const;
+
+   /**
+    * @return Returns the longitude spacing in decimal degrees.  Returns
+    * OSSIM_DBL_NAN if not initialized or file was invalid.
+    */
+   ossim_float64 getLongitudeSpacing() const;
+
+   /**
+    * @return Returns the minimum pixel value.  This is also
+    * the minimum height above sea level.  Returns
+    * OSSIM_SSHORT_NAN if not initialized or file was invalid.
+    */
+   ossim_float64 getMinPixelValue() const;
+
+   /**
+    * @return Returns the maximum pixel value.  This is also
+    * the minimum height above sea level.  Returns
+    * OSSIM_SSHORT_NAN if not initialized or file was invalid.
+    */
+   ossim_float64 getMaxPixelValue() const;
+
+   ossimScalarType getScalarType()const;
+   /**
+    * Prints data members for debug.
+    * 
+    * @return std::ostream&
+    */
+   virtual std::ostream& print(std::ostream& out) const;
+
+private:
+
+   /**
+    * This is a loadState called by setFilename that does not reset "theFile".
+    */
+   bool loadOmd(const ossimKeywordlist& kwl, const char* prefix=0);
+
+   /** Sets all data members to an unitialized state. */
+   void clear();
+
+   /**
+    * Sets corner points from "theFile".
+    *
+    * @return true on success, false on error.
+    */
+   bool setCornerPoints();
+   
+   /**
+    * Sets lines and samples from "theFile" size.
+    *
+    * @return true on success, false on error.
+    */
+   bool setSize();
+
+   /**
+    * Scans file for min and max pixels.
+    *
+    * @retun true on success, false on error.
+    */
+   bool computeMinMax();
+  
+   ossimFilename theFile;
+   ossim_uint32  theNumberOfLines;
+   ossim_uint32  theNumberOfSamples;
+   ossim_float64 theSouthwestLatitude;  //< decimal degrees
+   ossim_float64 theSouthwestLongitude; //< decimal degrees
+   ossim_float64 theLatSpacing;         //< decimal degrees
+   ossim_float64 theLonSpacing;         //< decimal degrees
+   ossim_float64 theMinPixelValue;      //< meters
+   ossim_float64 theMaxPixelValue;      //< meters
+
+   ossimScalarType theScalarType;
+
+   mutable ossimRefPtr<ossimIFStream> theFileStream;
+   template <class T>
+   bool computeMinMaxTemplate(T dummy,
+                              double defaultNull);
+};
+
+#endif /* #ifndef ossimSrtmSupportData */
+
diff --git a/ossim/include/ossim/support_data/ossimSupportFilesList.h b/ossim/include/ossim/support_data/ossimSupportFilesList.h
new file mode 100644
index 0000000..658f6d3
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimSupportFilesList.h
@@ -0,0 +1,45 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Oscar Kramer
+// 
+//********************************************************************
+// $Id$
+#ifndef ossimSupportFilesList_HEADER
+#define ossimSupportFilesList_HEADER
+
+#include <vector>
+#include <ossim/base/ossimFilename.h>
+
+class ossimKeywordlist;
+
+//*************************************************************************************************
+//! Singleton class for logging all support data files opened during a session.
+//*************************************************************************************************
+class OSSIMDLLEXPORT ossimSupportFilesList
+{
+public:
+   static ossimSupportFilesList* instance();
+
+   //! Add support data filename to the list:
+   void add(const ossimFilename& f) { m_list.push_back(f); }
+
+   //! Output list to the kwl.
+   void save(ossimKeywordlist& kwl, const char* prefix) const;
+   
+   //! Clears the list to ready for new accumulation:
+   void clear() { m_list.clear(); }
+
+private:
+   ossimSupportFilesList()  { }
+   ~ossimSupportFilesList() { m_instance=0; }
+
+   std::vector<ossimFilename>       m_list;
+   static ossimSupportFilesList*    m_instance;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimTiffInfo.h b/ossim/include/ossim/support_data/ossimTiffInfo.h
new file mode 100644
index 0000000..ba973ea
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimTiffInfo.h
@@ -0,0 +1,772 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: TIFF Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimTiffInfo.h 2673 2011-06-06 14:57:24Z david.burken $
+#ifndef ossimTiffInfo_HEADER
+#define ossimTiffInfo_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/support_data/ossimInfoBase.h>
+#include <ossim/base/ossimFilename.h>
+
+#include <iosfwd>
+#include <string>
+#include <vector>
+
+class ossimDpt;
+class ossimEndian;
+class ossimKeywordlist;
+class ossimTieGptSet;
+
+/**
+ * @brief TIFF info class.
+ *
+ * Encapsulates the listgeo functionality.
+ */
+class OSSIM_DLL ossimTiffInfo : public ossimInfoBase
+{
+public:
+   
+   /** default constructor */
+   ossimTiffInfo();
+
+   /** virtual destructor */
+   virtual ~ossimTiffInfo();
+
+   /**
+    * Anonymous enumerations.  Note prefixed with 'O' to avoid conflict with
+    * libtiff.
+    */
+   enum
+   {
+      UNDEFINED                           = 0,
+      OPIXEL_IS_AREA                      = 1,
+      OPIXEL_IS_POINT                     = 2,
+      OTIFFTAG_SUBFILETYPE                = 254,
+      OTIFFTAG_IMAGEWIDTH                 = 256,
+      OTIFFTAG_IMAGELENGTH                = 257,
+      OTIFFTAG_BITSPERSAMPLE              = 258,
+      OTIFFTAG_COMPRESSION                = 259,
+      OTIFFTAG_PHOTOMETRIC                = 262,
+      OTIFFTAG_FILLORDER                  = 266,
+      OTIFFTAG_IMAGEDESCRIPTION           = 270,
+      OTIFFTAG_MODEL                      = 272,
+      OTIFFTAG_STRIPOFFSETS               = 273,
+      OTIFFTAG_ORIENTATION                = 274,
+      OTIFFTAG_SAMPLESPERPIXEL            = 277,
+      OTIFFTAG_ROWSPERSTRIP               = 278,
+      OTIFFTAG_STRIPBYTECOUNTS            = 279,
+      OTIFFTAG_MINSAMPLEVALUE             = 280,
+      OTIFFTAG_MAXSAMPLEVALUE             = 281,
+      OTIFFTAG_XRESOLUTION                = 282,
+      OTIFFTAG_YRESOLUTION                = 283,
+      OTIFFTAG_PLANARCONFIG               = 284,
+      OTIFFTAG_RESOLUTIONUNIT             = 296,
+      OTIFFTAG_PAGENUMBER                 = 297,
+      OTIFFTAG_SOFTWARE                   = 305,
+      OTIFFTAG_DATETIME                   = 306,  // FORMAT is YYYY:MM:DD HH:MM:SS
+      OTIFFTAG_ARTIST                     = 315,
+      OTIFFTAG_TILEWIDTH                  = 322,
+      OTIFFTAG_TILELENGTH                 = 323,
+      OTIFFTAG_TILEOFFSETS                = 324,
+      OTIFFTAG_TILEBYTECOUNTS             = 325,
+      OTIFFTAG_EXTRASAMPLES               = 338,
+      OTIFFTAG_SAMPLEFORMAT               = 339,
+      OTIFFTAG_SMINSAMPLEVALUE            = 340,
+      OTIFFTAG_SMAXSAMPLEVALUE            = 341,
+      OSAMPLEFORMAT_UINT                  = 1,
+      OSAMPLEFORMAT_INT                   = 2,
+      OSAMPLEFORMAT_IEEEFP                = 3,
+      OSAMPLEFORMAT_VOID                  = 4,
+      OSAMPLEFORMAT_COMPLEXINT            = 5,
+      OSAMPLEFORMAT_COMPLEXIEEEFP         = 6,
+      OTIFFTAG_SUBIFD                     = 330,
+      OGT_MODEL_TYPE_GEO_KEY              = 1024,
+      OGT_RASTER_TYPE_GEO_KEY             = 1025,
+      OGT_CITATION_GEO_KEY                = 1026,
+      OGEOGRAPHIC_TYPE_GEO_KEY            = 2048,
+      OGEOG_CITATION_GEO_KEY              = 2049,
+      OGEOG_GEODETIC_DATUM_GEO_KEY        = 2050,
+      OGEOG_PRIME_MERIDIAN_GEOKEY         = 2051,
+      OGEOG_LINEAR_UNITS_GEO_KEY          = 2052,
+      OGEOG_ANGULAR_UNITS_GEO_KEY         = 2054,
+      OGEOG_ANGULAR_UNIT_SIZE_GEO_KEY     = 2055,
+      OGEOG_ELLIPSOID_GEO_KEY             = 2056,
+      OGEOG_SEMI_MAJOR_AXIS               = 2057,
+      OGEOG_SEMI_MINOR_AXIS               = 2058,
+      OGEOG_INV_FLATTENING_GEO_KEY        = 2059,
+      OGEOG_PRIME_MERIDIAN_LONG_GEO_KEY   = 2061,
+      OPROJECTED_CS_TYPE_GEO_KEY          = 3072,
+      OPCS_CITATION_GEO_KEY               = 3073,
+      OPROJECTION_GEO_KEY                 = 3074,
+      OPROJ_COORD_TRANS_GEO_KEY           = 3075,
+      OPROJ_LINEAR_UNITS_GEO_KEY          = 3076,
+      OPROJ_LINEAR_UNIT_SIZE_GEO_KEY      = 3077,
+      OPROJ_STD_PARALLEL1_GEO_KEY         = 3078,
+      OPROJ_STD_PARALLEL2_GEO_KEY         = 3079,
+      OPROJ_NAT_ORIGIN_LONG_GEO_KEY       = 3080,
+      OPROJ_NAT_ORIGIN_LAT_GEO_KEY        = 3081,
+      OPROJ_FALSE_EASTING_GEO_KEY         = 3082,
+      OPROJ_FALSE_NORTHING_GEO_KEY        = 3083,
+      OPROJ_FALSE_ORIGIN_LONG_GEO_KEY     = 3084,
+      OPROJ_FALSE_ORIGIN_LAT_GEO_KEY      = 3085,
+      OPROJ_FALSE_ORIGIN_EASTING_GEO_KEY  = 3086,
+      OPROJ_FALSE_ORIGIN_NORTHING_GEO_KEY = 3087,
+      OPROJ_CENTER_LONG_GEO_KEY           = 3088,
+      OPROJ_CENTER_LAT_GEO_KEY            = 3089,
+      OPROJ_SCALE_AT_NAT_ORIGIN_GEO_KEY   = 3092,
+      OPROJ_SCALE_AT_CENTER_GEO_KEY       = 3093,
+      OVERTICAL_Cs_TYPE_GEO_KEY           = 4096,
+      OVERTICAL_CITATION_GEO_KEY          = 4097,
+      OVERTICAL_DATUM_GEO_KEY             = 4098,
+      OVERTICAL_UNITS_GEO_KEY             = 4099,
+      OLINEAR_METER                       = 9001,
+      OLINEAR_FOOT                        = 9002,
+      OLINEAR_FOOT_US_SURVEY              = 9003,
+      OANGULAR_DEGREE                     = 9102,
+      OANGULAR_ARC_MINUTE                 = 9103,
+      OANGULAR_ARC_SECOND                 = 9104,
+      OANGULAR_GRAD                       = 9105,
+      OANGULAR_GON                        = 9106,
+      OANGULAR_DMS                        = 9107,
+      OANGULAR_DMS_HEMISPHERE             = 9108,
+      OPCS_BRITISH_NATIONAL_GRID          = 27700,
+      OUSER_DEFINED                       = 32767,
+      OTIFFTAG_COPYRIGHT                  = 33432,
+      OMODEL_PIXEL_SCALE_TAG              = 33550,
+      OMODEL_TIE_POINT_TAG                = 33922,
+      OMODEL_TRANSFORM_TAG                = 34264,
+      OTIFFTAG_PHOTOSHOP                  = 34377,
+      OGEO_KEY_DIRECTORY_TAG              = 34735,
+      OGEO_DOUBLE_PARAMS_TAG              = 34736,
+      OGEO_ASCII_PARAMS_TAG               = 34737,
+      OGDAL_METADATA_TAG                  = 42112,
+      OGDAL_NODATA                        = 42113
+   };
+
+   enum CompressType
+   {
+      NOT_COMPRESSED = 0,
+      COMPRESSED     = 1
+   };
+ 
+   enum PhotoInterpretation
+   {
+      OPHOTO_MINISWHITE  = 0,   // min value is white 
+      OPHOTO_MINISBLACK  = 1,   // min value is black 
+      OPHOTO_RGB         = 2,   // RGB color model 
+      OPHOTO_PALETTE     = 3,   // color map indexed 
+      OPHOTO_MASK        = 4,   // $holdout mask 
+      OPHOTO_SEPARATED   = 5,   // !color separations 
+      OPHOTO_YCBCR       = 6,   // !CCIR 601 
+      OPHOTO_CIELAB      = 7    // !1976 CIE L*a*b*
+   };
+
+   enum ModelType
+   {
+      UNKNOWN                = 0,
+      OMODEL_TYPE_PROJECTED  = 1,  // Projection Coordinate System
+      OMODEL_TYPE_GEOGRAPHIC = 2,  // Geographic latitude-longitude System 
+      OMODEL_TYPE_GEOCENTRIC = 3
+   };
+
+   enum WordType
+   {
+      TWO_OR_EIGHT  = 0,
+      FOUR_OR_EIGHT = 1
+   };
+
+   enum
+   {
+      OTIFF_NOTYPE = 0,      /* placeholder */
+      OTIFF_BYTE = 1,        /* 8-bit unsigned integer */
+      OTIFF_ASCII = 2,       /* 8-bit bytes w/ last byte null */
+      OTIFF_SHORT = 3,       /* 16-bit unsigned integer */
+      OTIFF_LONG = 4,        /* 32-bit unsigned integer */
+      OTIFF_RATIONAL = 5,    /* 64-bit unsigned fraction */
+      OTIFF_SBYTE = 6,       /* !8-bit signed integer */
+      OTIFF_UNDEFINED = 7,   /* !8-bit untyped data */
+      OTIFF_SSHORT = 8,      /* !16-bit signed integer */
+      OTIFF_SLONG = 9,       /* !32-bit signed integer */
+      OTIFF_SRATIONAL = 10,  /* !64-bit signed fraction */
+      OTIFF_FLOAT = 11,      /* !32-bit IEEE floating point */
+      OTIFF_DOUBLE = 12,     /* !64-bit IEEE floating point */
+      OTIFF_IFD = 13,        /* %32-bit unsigned integer (offset) */
+      OTIFF_LONG8 = 16,      /* BigTIFF 64-bit unsigned integer */
+      OTIFF_SLONG8 = 17,     /* BigTIFF 64-bit signed integer */
+      OTIFF_IFD8 = 18        /* BigTIFF 64-bit unsigned integer (offset) */
+   };
+
+   /**
+    * @brief open method.
+    *
+    * @param file File name to open.
+    *
+    * @return true on success false on error.
+    */
+   virtual bool open(const ossimFilename& file);
+
+   /**
+    * Print method.
+    *
+    * @param out Stream to print to.
+    * 
+    * @return std::ostream&
+    */
+   virtual std::ostream& print(std::ostream& out) const;
+
+   /**
+    * @brief Print method.
+    * 
+    * Print method that takes a stream that should be positions at the start
+    * of tiff stream. This was added to see embedded information on embedded
+    * geotiff's in a geojp2 file.
+    *
+    * @param out Stream to print to.
+    * 
+    * @return std::ostream&
+    */
+   virtual std::ostream& print(std::istream& inStr,
+                               std::ostream& outStr) const;
+
+   /**
+    *  @brief Extracts geometry info to keyword list.  This method assumes
+    *  that open has been called and theFile is set.
+    *  
+    *  Populates the keyword list with image geometry information.  This
+    *  method is used to relay projection/model information to users.
+    *
+    *  @param geomKwl Keyword list that will be initialized with geometry info.
+    *  Returns true if geometry info is present, false if not.
+    *
+    *  @param entryIndex Entry to get geometry from. 
+    */
+   bool getImageGeometry(ossimKeywordlist& geomKwl,
+                         ossim_uint32 entryIndex) const;
+
+   /**
+    *  @brief Extracts geometry info from stream to keyword list.
+    *  
+    *  Populates the keyword list with image geometry information.  This
+    *  method is used to relay projection/model information to users.
+    *
+    *  @note The str should be position at start of tiff portion. This
+    *  was written to allow passing a stream positioned at an embedded tiff
+    *  image in a jp2 file.
+    *
+    *  @param str Stream position at start of tiff image.
+    *
+    *  @param geomKwl Keyword list that will be initialized with geometry info.
+    *  Returns true if geometry info is present, false if not.
+    *
+    *  @param entryIndex Entry to get geometry from. 
+    */
+   bool getImageGeometry(std::istream& str,
+                         ossimKeywordlist& geomKwl,
+                         ossim_uint32 entryIndex) const;
+
+   /**
+    * @brief Extracts geometry info from geotiff keys to keyword list.
+    *
+    * Helper method used to extract keywords from geotiff keys embedded in
+    * files, e.g. LAS data.  Because this is just the geotiff keys, the output
+    * will be missing the image part, i.e. line, samples, radiometry...
+    *
+    * This output is intended to be usable to get a projection from a call to
+    * ossimProjectionFactoryRegistry::createProjection(kwl).
+    *
+    * Internally calls printGeoKeys and then the private getImageGeometry.
+    *
+    * @param geoKeyLength Length of geoKeyBlock.
+    * @param geoKeyBlock Pointer to array of keys.
+    * @param geoDoubleLength Length of geoDoubleBlock.
+    * @param geoDoubleBlock Pointer to array of double values.
+    * @param geoAsciiLength Length of geoAsciiBlock.
+    * @param geoAsciiBlock Pointer to array of ascii values.
+    * @param projKwl The keyword list to initialize.
+    *
+    * @return Because the resulting keyword list (geomKwl) is not complete
+    * there will be no return.
+    */
+   void getImageGeometry(ossim_uint64   geoKeyLength,
+                         ossim_uint16*  geoKeyBlock,
+                         ossim_uint64   geoDoubleLength,
+                         ossim_float64* geoDoubleBlock,
+                         ossim_uint64   geoAsciiLength,
+                         ossim_int8*    geoAsciiBlock,
+                         ossimKeywordlist& geomKwl) const;
+
+   /**
+    * @brief Prints geo keys to stream.
+    *
+    * Helper method used to extract keywords from geotiff keys embedded in
+    * files, e.g. LAS data.  Because this is just the geotiff keys, the output
+    * will be missing the image part, i.e. line, samples, radiometry...
+    *
+    * This output is the raw tiff tags/geotiff keys not necessarily useable to construct
+    * a projection from.
+    *
+    * @param out Stream to dump to.
+    * @param prefix if any.  This will be added to the keys, e.g.
+    * tiff0.coord_trans where "tiff0." is the prefix and "coord_trans" the key.
+    * @param geoKeyLength Length of geoKeyBlock.
+    * @param geoKeyBlock Pointer to array of keys.
+    * @param geoDoubleLength Length of geoDoubleBlock.
+    * @param geoDoubleBlock Pointer to array of double values.
+    * @param geoAsciiLength Length of geoAsciiBlock.
+    * @param geoAsciiBlock Pointer to array of ascii values.
+    */
+   std::ostream& printGeoKeys(std::ostream& out,
+                              const std::string& prefix,
+                              ossim_uint64   geoKeyLength,
+                              ossim_uint16*  geoKeyBlock,
+                              ossim_uint64   geoDoubleLength,
+                              ossim_float64* geoDoubleBlock,
+                              ossim_uint64   geoAsciiLength,
+                              ossim_int8*    geoAsciiBlock) const;
+
+private:
+
+   /**
+    * @brief extracts geometry info from stream to keyword list.
+    *  
+    * Populates geomKwl from gtiffKwl.
+    *
+    * @param gtiffKwl Raw keywordlist extracted from tiff/geotiff keys.
+    * 
+    * @param geomKwl Keyword list that will be initialized with geometry info.
+    * Returns true if geometry info is present, false if not.
+    *
+    * @param entryIndex Entry to get geometry from. 
+    */
+   bool getImageGeometry(const ossimKeywordlist& gtiffKwl,
+                         ossimKeywordlist& geomKwl,
+                         ossim_uint32 entryIndex) const;
+   
+   /** Initializes s reference.  Does byte swapping as needed. */
+   void readShort(ossim_uint16& s, std::istream& str) const;
+   
+   /** Initializes l reference.  Does byte swapping as needed. */
+   void readLong(ossim_uint32& l, std::istream& str) const;
+   
+   /** Initializes l reference.  Does byte swapping as needed. */
+   void readLongLong(ossim_uint64& l, std::istream& str) const;
+   
+   /** Attempts to parse the pcs code (3072). */
+   void parsePcsCode(int code);
+   
+   /** Attempts to parse the projection geo key (3074). */
+   void parseProjGeoCode(int code);
+   
+   /**
+    *  Converts double passed in to meters if needed.  The conversion is
+    *  base on "theLiniarUnitsCode".
+    */
+   double convert2meters(double d) const;
+   
+   /**
+    * This will read either 4 or 8 bytes depending on the version and
+    * initialize offset.
+    *
+    * @return true if stream is good, false if not.
+    */
+   bool getOffset(std::streamoff& offset, std::istream& str,
+                  ossim_uint16 version) const;
+   
+   /**
+    * This will read either 2 , 4or 8 bytes depending on the version and
+    * WORD_TYPE.
+    *
+    * @return true if stream is good, false if not.
+    */
+   bool getValue(ossim_uint64& val, std::istream& str, WordType type,
+                 ossim_uint16 version) const;
+   
+   ossim_uint64 getArraySizeInBytes(ossim_uint64 length,
+                                    ossim_uint16 type) const;
+   
+   /**
+    * @return The byte size of each tiff type or 0 if unhandled.
+    */
+   ossim_uint16 getTypeByteSize(ossim_uint16 type) const;
+   
+   /**
+    * Eats the value field.  Either 4 or 8 bytes depending on the version.
+    */
+   void eatValue(std::istream& str, ossim_uint16 version) const;
+   
+   void swapBytes(ossim_uint8* v, ossim_uint16 type, ossim_uint64 count) const;
+   
+   /** Initializes v. */
+   template <class T> void getArrayValue(T& v,
+                                         ossim_uint8* array,
+                                         ossim_uint64 position) const;
+   
+   std::ostream& print(std::ostream& out,
+                       const std::string&  prefix,
+                       ossim_uint64   tagIdx,
+                       ossim_uint16   tag,
+                       ossim_uint16   type,
+                       ossim_uint64   count,
+                       ossim_uint64   arraySizeInBytes,
+                       ossim_uint8*   valueArray) const;
+   
+   std::ostream& printValue(std::ostream& out,
+                            ossim_uint16 type,
+                            ossim_uint8* valueArray) const;
+   
+   std::ostream& printArray(std::ostream& out,
+                            ossim_uint16 type,
+                            ossim_uint64 count,
+                            ossim_uint8* valueArray) const;
+   
+   std::ostream& printGdalMetadata(std::ostream& out,
+                                   const std::string& prefix,
+                                   ossim_uint64 count,
+                                   ossim_uint8* valueArray) const;
+
+   /** @brief Prints key 1024 */
+   std::ostream& printModelType(std::ostream& out,
+                                const std::string& prefix,
+                                ossim_uint16 code) const;
+
+   /** @brief Prints key 1025 */
+   std::ostream& printRasterType(std::ostream& out,
+                                 const std::string& prefix,
+                                 ossim_uint16 code) const;
+
+   /** @brief Prints key 2054 */
+   std::ostream& printAngularUnits(std::ostream& out,
+                                   const std::string& prefix,
+                                   ossim_uint16 code) const;
+
+   /** @brief Prints key 3075 */
+   std::ostream& printCoordTrans(std::ostream& out,
+                                  const std::string& prefix,
+                                  ossim_uint16 code) const;
+
+   /** @brief Prints key from code from section 6.3.1.3 */
+   std::ostream& printLinearUnits(std::ostream& out,
+                                  const std::string& prefix,
+                                  const std::string& key,
+                                  ossim_uint16 code) const;
+
+   /** @brief Prints tag 274 */
+   std::ostream& printOrientation(std::ostream& out,
+                                  const std::string& prefix,
+                                  ossim_uint16 code) const;
+  
+   /** @brief adds imageN. to prefix where N is zero base directory index. */
+   void getDirPrefix(ossim_int32 dirIndex, std::string& prefix) const;
+
+   /**
+    * @brief Gets the required pixel scale from keyword list looking for the
+    * key model_pixel_scale.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param scale The point to initialize.
+    * @return true on success, false on error.
+    */
+   bool getPixelScale(const ossimString& gtiffPrefix,
+                      const ossimKeywordlist& gtiffKwl,
+                      ossimDpt& scale) const;
+   
+   /**
+    * @brief Gets the model_tie_point array.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param ties The array to initialize.
+    * @return true on success, false on error.
+    */
+   bool getTiePoint(const ossimString& gtiffPrefix,
+                    const ossimKeywordlist& gtiffKwl,
+                    std::vector<ossim_float64>& ties) const;
+
+   /**
+    * @brief Gets the model_transform array.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param ties The array to initialize.
+    * @return true on success, false on error.
+    */
+   bool getModelTransform(const ossimString& gtiffPrefix,
+                          const ossimKeywordlist& gtiffKwl,
+                          std::vector<ossim_float64>& xfrm) const;
+
+   /**
+    * @brief Extracts float values from keyword list that match key.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param key to look for.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param floats Array to stuff.  Will have size of zero on failure.
+    * @return true on success, false on error.  If size of array is zero it
+    * will return false.
+    */
+   bool  getFloats(const ossimString& gtiffPrefix,
+                   const ossimString& key,
+                   const ossimKeywordlist& gtiffKwl,
+                   std::vector<ossim_float64>& floats) const;
+
+   /**
+    * @brief Extracts float values from lookup line and puts in floats array.
+    * @param lookup Line to parse like:
+    * "0.00138888888889 0.00138888888889, 0.0"
+    * @param floats Array to stuff.  Will have size of zero on failure.
+    */
+   bool getFloats(const ossimString& line,
+                  std::vector<ossim_float64>& floats) const;
+
+   /**
+    * @brief Gets the datum code matching code from the keyword list as a
+    * string.
+    *
+    * This checks for "geodetic_datum"(geotiff key 2050), then
+    * "gcs_code"(geotiff key 2048) if first lookup faild.
+    * 
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param datumCode The code to initialize.
+    * @return true on success, false on error.
+    */
+   bool getDatumCode(const ossimString& gtiffPrefix,
+                     const ossimKeywordlist& gtiffKwl,
+                     ossimString& datumCode) const;
+
+   /**
+    * @brief Gets the datum code.
+    * @param code Code from either "geodetic_datum"(geotiff key 2050),
+    * or "gcs_code"(geotiff key 2048).
+    * @param datumCode The code to initialize.
+    * @return true on success, false on error.
+    */
+   bool getDatumCode(ossim_int32 code, ossimString& datumCode) const;
+
+   /**
+    * @brief Gets the pcs code from the keyword list as a string.
+    *
+    * If the lookup of "pcs_code" returns false then the "pcs_citation" is then
+    * checked.
+    * 
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param pcsCode The code to initialize.
+    * @return true on success, false on error.
+    */
+   bool getPcsCode(const ossimString& gtiffPrefix,
+                   const ossimKeywordlist& gtiffKwl,
+                   ossimString& pcsCode) const;
+
+   /**
+    * @brief Gets units from keyword list as a string. This will be angular
+    * or linear base on the model type.  The default is meters if not found.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param linearUnits The string to initialize with units.
+    * @return true on success, false on error.
+    */
+   bool getUnits(const ossimString& gtiffPrefix,
+                 const ossimKeywordlist& gtiffKwl,
+                 ossimString& units) const;
+   /**
+    * @brief Gets the linear units from keyword list as a string.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param linearUnits The string to initialize with units.
+    * @return true on success, false on error.
+    */
+   bool getLinearUnits(const ossimString& gtiffPrefix,
+                       const ossimKeywordlist& gtiffKwl,
+                       ossimString& linearUnits) const;
+
+   /**
+    * @brief Gets the vertical units from keyword list as a string.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param linearUnits The string to initialize with units.
+    * @return true on success, false on error.
+    */
+   bool getVerticalUnits(const ossimString& gtiffPrefix,
+                         const ossimKeywordlist& gtiffKwl,
+                         ossimString& verticalUnits) const;
+
+   /**
+    * @brief Gets the units from keyword list as a string.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param angularUnit The string to initialize with units.
+    * @return true on success, false on error.
+    */
+   bool getAngularUnits(const ossimString& gtiffPrefix,
+                        const ossimKeywordlist& gtiffKwl,
+                        ossimString& units) const;
+
+
+   /**
+    * @brief Gets the pixel type (point or area) from keyword list as a string.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param unit The string to initialize with pixel type.
+    * @return true on success, false on error.
+    */   
+   bool getPixelType(const ossimString& gtiffPrefix,
+                     const ossimKeywordlist& gtiffKwl,
+                     ossimString& pixelType) const;
+
+   /**
+    * @brief Gets the model type from keyword list as a string.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param modelType The string to initialize with pixel type.
+    * @return true on success, false on error.
+    */   
+   bool getModelType(const ossimString& gtiffPrefix,
+                     const ossimKeywordlist& gtiffKwl,
+                     ossimString& modeType) const;
+
+   /**
+    * @brief Gets the ossimProjection from keyword list as a string.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param ossimProj The string to initialize with pixel type.
+    * @return true on success, false on error.
+    */   
+   bool getOssimProjectionName(const ossimString& gtiffPrefix,
+                               const ossimKeywordlist& gtiffKwl,
+                               ossimString& ossimProj) const;
+   
+   /**
+    * @brief Gets the number of lines from keyword list.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @return Number of lines or 0 if lines not found.
+    */   
+   ossim_uint32 getLines(const ossimString& gtiffPrefix,
+                         const ossimKeywordlist& gtiffKwl) const;
+
+   /**
+    * @brief Gets the number of samples from keyword list.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @return Number of lines or 0 if lines not found.
+    */   
+   ossim_uint32 getSamples(const ossimString& gtiffPrefix,
+                           const ossimKeywordlist& gtiffKwl) const;
+
+   /**
+    * @brief Gets the first standard parallel from keyword list.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param value Initialized with result.
+    */   
+   bool getStdParallelOne(const ossimString& gtiffPrefix,
+                          const ossimKeywordlist& gtiffKwl,
+                          ossimString& value) const;
+
+   /**
+    * @brief Gets the second standard parallel from keyword list.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param value Initialized with result.
+    */
+   bool getStdParallelTwo(const ossimString& gtiffPrefix,
+                          const ossimKeywordlist& gtiffKwl,
+                          ossimString& value) const;
+   
+   /**
+    * @brief Gets the false easting from keyword list.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param value Initialized with result.
+    */
+   bool getFalseEasting(const ossimString& gtiffPrefix,
+                        const ossimKeywordlist& gtiffKwl,
+                        ossimString& value) const;
+
+   /**
+    * @brief Gets the false northing from keyword list.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param value Initialized with result.
+    */
+   bool getFalseNorthing(const ossimString& gtiffPrefix,
+                         const ossimKeywordlist& gtiffKwl,
+                         ossimString& value) const;
+
+   /**
+    * @brief Gets the false easting/northing from keyword list.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param eastingNorthing Initialized with result.
+    */
+   bool getFalseEastingNorthing(const ossimString& gtiffPrefix,
+                                const ossimKeywordlist& gtiffKwl,
+                                ossimDpt& eastingNorthing) const;
+
+   /**
+    * @brief Gets the scale factor from keyword list.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param value Initialized with result.
+    */
+   bool getScaleFactor(const ossimString& gtiffPrefix,
+                       const ossimKeywordlist& gtiffKwl,
+                       ossim_float64& value) const;
+
+   /**
+    * @brief Gets the origin of latitude from keyword list.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param value Initialized with result.
+    */
+   bool getOriginLat(const ossimString& gtiffPrefix,
+                     const ossimKeywordlist& gtiffKwl,
+                     ossim_float64& value) const;
+
+   /**
+    * @brief Gets the central meridian from keyword list.
+    * @param gtiffPrefix Prefix for gtiffKwl.
+    * @param gtiffKwl The keyword list with all tiff keywords.
+    * @param value Initialized with result.
+    */
+   bool getCentralMeridian(const ossimString& gtiffPrefix,
+                           const ossimKeywordlist& gtiffKwl,
+                           ossim_float64& value) const;
+
+   /**
+    * @brief Split tie points into sets of six tie sets.
+    * @param tie points.
+    * @param width Image width.
+    * @param height Image height.
+    * @param tieSet Initialized with result.
+    */
+   void getTieSets(const std::vector<ossim_float64>& ties,
+                   ossim_uint32 width,
+                   ossim_uint32 height,
+                   ossimTieGptSet& tieSet) const;
+
+
+   /**
+    * @brief Check tie points to see if they are zero base or one based.
+    * @param tie points.
+    * @param width Image width.
+    * @param height Image height.
+    * @return true if one based, false if not.
+    */
+   bool hasOneBasedTiePoints(const std::vector<ossim_float64>& ties,
+                             ossim_uint32 width,
+                             ossim_uint32 height) const;
+   
+   ossimFilename          theFile;
+   mutable ossimEndian*   theEndian;
+};
+
+#endif /* End of "#ifndef ossimTiffInfo_HEADER" */
+
diff --git a/ossim/include/ossim/support_data/ossimTiffWorld.h b/ossim/include/ossim/support_data/ossimTiffWorld.h
new file mode 100644
index 0000000..3ed7563
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimTiffWorld.h
@@ -0,0 +1,81 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Ken Melero
+// 
+// Description: Container class for a tiff world file data.
+//
+//********************************************************************
+// $Id: ossimTiffWorld.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef ossimTiffWorld_HEADER
+#define ossimTiffWorld_HEADER
+
+#include <iostream>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimDpt.h>
+using namespace std;
+
+//***************************************************************************
+// CLASS:  ossimTiffWorld
+//***************************************************************************
+class OSSIMDLLEXPORT ossimTiffWorld
+{
+public:
+   ossimTiffWorld();
+   ossimTiffWorld(const char* source, 
+		  ossimPixelType ptype = OSSIM_PIXEL_IS_POINT,
+		  ossimUnitType  unit = OSSIM_METERS);
+   
+   ~ossimTiffWorld();
+   
+   bool open(const ossimFilename& file,
+             ossimPixelType ptype,
+             ossimUnitType unit);
+   
+   bool saveToOssimGeom(ossimKeywordlist& kwl, const char* prefix=NULL)const;
+   bool loadFromOssimGeom(const ossimKeywordlist& kwl, const char* prefix=NULL);
+   
+   std::ostream& print(std::ostream& out) const;
+   
+   friend OSSIMDLLEXPORT std::ostream& operator<<(std::ostream& out,
+                                                  const ossimTiffWorld& obj);
+   
+   /*!
+    * transformed.x =
+    * imagePoint.x*theX_scale + imagePoint.y*the3rdValue + theTranslateX
+    * 
+    * transformed.y =
+    * imagePoint.x*the2ndValue + imagePoint.y*theY_scale + theTranslateY
+    */
+   void forward(const ossimDpt& imagePoint,
+                ossimDpt& transformedPoint);
+   
+   //! Converts world file parameters into x, y scale (for use in affine transform) 
+   const ossimDpt& getScale() const { return theComputedScale; }
+   
+   //! Converts world file parameters into RH rotation in radians (for use in affine transform) 
+   double getRotation() const { return theComputedRotation; }
+   
+   //! Provides access to the translation (for use in affine transform) 
+   const ossimDpt& getTranslation() const { return theTranslation; }
+
+protected:
+   double theXform1;     
+   double theXform2;   
+   double theXform3;   
+   double theXform4;   
+   ossimDpt theTranslation;
+
+   ossimPixelType thePixelType;
+   ossimUnitType  theUnit;
+   ossimDpt theComputedScale;
+   double   theComputedRotation;  //!< Radians
+};
+
+#endif
+
diff --git a/ossim/include/ossim/support_data/ossimWavelength.h b/ossim/include/ossim/support_data/ossimWavelength.h
new file mode 100644
index 0000000..b0870e3
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimWavelength.h
@@ -0,0 +1,107 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Class declaration for ossimWavelength.
+// See class description below.
+//
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimWavelength_HEADER
+#define ossimWavelength_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <iostream>
+#include <map>
+#include <vector>
+
+
+class ossimEnviHeader;
+
+/**
+ * @class ossimWavelenght class.
+ *
+ * Simple container class encapsulating a std::map of wavelengths(key) and associated
+ * bands(value), with convenience methods.  Wavelengths values are 64 bit
+ * floating point in nanometers. Bands are zero based
+ * 32 bit unsigned integers. 
+ */
+class OSSIM_DLL ossimWavelength 
+{
+public:
+   
+   typedef std::map< ossim_float64, ossim_uint32 > WavelengthMap;
+   
+   /** @brief default constructor */
+   ossimWavelength();
+
+   /** @brief copy constructor */
+   ossimWavelength( const ossimWavelength& obj );
+
+   /** @brief assignment operator= */
+   const ossimWavelength& operator=( const ossimWavelength& rhs );
+
+   /** @brief virtual destructor */
+   ~ossimWavelength();
+   
+   const ossimWavelength::WavelengthMap& getMap() const;
+   
+   ossimWavelength::WavelengthMap& getMap();
+
+   /**
+    * @brief Initializes map from ENVI header class.
+    *
+    * This will clear any existing map, look for the keywords
+    * "wavelength units" and "wavelength".
+    * 
+    * @param header to initialize from.
+    * @return true on success, false on error.
+    */
+   bool initialize( const ossimEnviHeader& hdr );
+
+   /**
+    * @brief Finds iterator closest to wavelength.
+    * @param requestedWavelength Requested wavelength in nanometers.
+    * @param thresholdFromCenter in nanometers.
+    * @return WavelengthMap::const_iterator if not found will return. 
+    */
+   WavelengthMap::const_iterator findClosestIterator(
+      const ossim_float64& requestedWavelength,
+      const ossim_float64& thresholdFromCenter  ) const;
+   
+   /**
+    * @brief Finds index closest to wavelength.
+    * @param requestedWavelength Requested wavelength in nanometers.
+    * @param thresholdFromCenter in nanometers.
+    * @return Closest zero based index to wavelength or -1 if not found. 
+    */
+   ossim_int32 findClosestIndex(
+      const ossim_float64& requestedWavelength,
+      const ossim_float64& thresholdFromCenter  ) const;
+   
+   /**
+    * @brief Gets rgb bands if "wavelength" keyword is present.
+    * @param bands Initialized by this with zero base rbg band
+    * indexes.
+    * @return true on success, false if bands not found.
+    */   
+   bool getRgbBands( std::vector<ossim_uint32>& bands ) const;
+
+   /** @return WavelengthMap::const_iterator of underlying map. */
+   WavelengthMap::const_iterator end() const;
+
+   /** @return WavelengthMap::iterator of underlying map. */
+   WavelengthMap::iterator end();
+
+private:
+   
+   WavelengthMap m_map;
+};
+
+#endif /* End of "#ifndef ossimWavelength_HEADER" */
+
diff --git a/ossim/include/ossim/support_data/ossimWkt.h b/ossim/include/ossim/support_data/ossimWkt.h
new file mode 100644
index 0000000..638c2e4
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimWkt.h
@@ -0,0 +1,112 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// ossimWkt class declaration. A well known text(WKT) utility class.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimWkt_HEADER
+#define ossimWkt_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimKeywordlist.h>
+
+#include <iosfwd>
+#include <string>
+#include <vector>
+
+/**
+ * @class ossimWkt
+ *
+ * Utility/support data class to parse WKT text string to an ossimKeywordlist.
+ *
+ * Example keyword list( WKT string dependent ):
+ *
+ * PROJCS.AUTHORITY.name:  EPSG
+ * PROJCS.AUTHORITY.param0:  "32641"
+ * PROJCS.GEOGCS.AUTHORITY.name:  EPSG
+ * PROJCS.GEOGCS.AUTHORITY.param0:  "4326"
+ * PROJCS.GEOGCS.DATUM.AUTHORITY.name:  EPSG
+ * PROJCS.GEOGCS.DATUM.AUTHORITY.param0:  "6326"
+ * PROJCS.GEOGCS.DATUM.SPHEROID.AUTHORITY.name:  EPSG
+ * PROJCS.GEOGCS.DATUM.SPHEROID.AUTHORITY.param0:  "7030"
+ * PROJCS.GEOGCS.DATUM.SPHEROID.name:  WGS 84
+ * PROJCS.GEOGCS.DATUM.SPHEROID.param0:  6378137
+ * PROJCS.GEOGCS.DATUM.SPHEROID.param1:  298.2572235630016
+ * PROJCS.GEOGCS.DATUM.name:  WGS_1984
+ * PROJCS.GEOGCS.PRIMEM.name:  Greenwich
+ * PROJCS.GEOGCS.PRIMEM.param0:  0
+ * PROJCS.GEOGCS.UNIT.name:  degree
+ * PROJCS.GEOGCS.UNIT.param0:  0.0174532925199433
+ * PROJCS.GEOGCS.name:  WGS 84
+ * PROJCS.PARAMETER0.name:  latitude_of_origin
+ * PROJCS.PARAMETER0.param0:  0
+ * PROJCS.PARAMETER1.name:  central_meridian
+ * PROJCS.PARAMETER1.param0:  63
+ * PROJCS.PARAMETER2.name:  scale_factor
+ * PROJCS.PARAMETER2.param0:  0.9996
+ * PROJCS.PARAMETER3.name:  false_easting
+ * PROJCS.PARAMETER3.param0:  500000
+ * PROJCS.PARAMETER4.name:  false_northing
+ * PROJCS.PARAMETER4.param0:  0
+ * PROJCS.PROJECTION.name:  Transverse_Mercator
+ * PROJCS.UNIT.AUTHORITY.name:  EPSG
+ * PROJCS.UNIT.AUTHORITY.param0:  "9001"
+ * PROJCS.UNIT.name:  metre
+ * PROJCS.UNIT.param0:  1
+ * PROJCS.name:  WGS 84 / UTM zone 41N 
+ *
+ */
+class OSSIM_DLL ossimWkt
+{
+public:
+   
+   /** default constructor */
+   ossimWkt();
+
+   /** destructor */
+   ~ossimWkt();
+
+   /**
+    * @brief Parses string to keyword list.
+    * @param wkt String to parse.
+    */
+   bool parse( const std::string& wkt );
+
+   /** @return Refeerence to keyword list. */
+   const ossimKeywordlist& getKwl() const;
+
+private:
+   bool parseWktGroup( std::istringstream& is, ossimKeywordlist& kwl );
+
+   bool parseObject( std::istringstream& is,
+                     const std::string& prefix,
+                     const std::string& object,
+                     ossimKeywordlist& kwl );
+   
+   bool parseName( std::istringstream& is,
+                   const std::string& prefix,
+                   const std::string& object,
+                   ossimKeywordlist& kwl );
+   
+   bool parseParam( std::istringstream& is,
+                    const std::string& prefix,
+                    const std::string& object,
+                    ossim_uint32& objectIndex,
+                    ossim_uint32& paramIndex,
+                    ossimKeywordlist& kwl );
+
+   ossimKeywordlist m_kwl;
+
+};
+
+#endif /* End of "#ifndef ossimWkt_HEADER" */
+
diff --git a/ossim/include/ossim/support_data/ossimXmpInfo.h b/ossim/include/ossim/support_data/ossimXmpInfo.h
new file mode 100644
index 0000000..240c3d1
--- /dev/null
+++ b/ossim/include/ossim/support_data/ossimXmpInfo.h
@@ -0,0 +1,121 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Extensible Metadata Platform (XMP) Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimXmpInfo_HEADER
+#define ossimXmpInfo_HEADER 1
+
+#include <ossim/support_data/ossimInfoBase.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimXmlNode.h>
+#include <ossim/projection/ossimProjection.h>
+#include <string>
+
+// Forward class declarations:
+class ossimDrect;
+class ossimString;
+class ossimXmlDocument;
+
+/** @class Extensible Metadata Platform (XMP) Info object. */
+class OSSIM_DLL ossimXmpInfo : public ossimInfoBase
+{
+public:
+   
+   /** default constructor */
+   ossimXmpInfo();
+
+   /** virtual destructor */
+   virtual ~ossimXmpInfo();
+
+   /**
+    * @brief open method.
+    *
+    * @param file File name to open.
+    *
+    * @return true on success false on error.
+    */
+   virtual bool open(const ossimFilename& file);
+   
+   /**
+    * Print method.
+    *
+    * @param out Stream to print to.
+    * 
+    * @return std::ostream&
+    */
+   virtual std::ostream& print(std::ostream& out) const;
+
+   /** @return XMP APP1 XML block. */ 
+   const std::string& getXmpApp1XmlBlock() const;
+
+   /**
+    * @brief Method to get a projection if possible.
+    * @param imageRect Require image rectangle of associated meta data
+    * parsed by this class.
+    * @return Projection pointer wrapped in ref pointer.  Can be null if
+    * projection cannot be established.
+    */
+   ossimRefPtr<ossimProjection> getProjection(
+      const ossimDrect& imageRect ) const;
+
+   /**
+    *  @brief Gets the date if available in ISO8601 format:
+    *  YYYY-MM-DDThh:mm:ss.sssZ
+    *
+    *  @param date Initialized by this.  Will be cleared if date not found.
+    */
+   void getDate( std::string& date ) const;
+   
+   /**
+    *  @brief Gets the mission ID if available.
+    *
+    *  @param mission Initialized by this.  Will be cleared if date not found.
+    */
+   void getMissionId( std::string& mission ) const;
+
+   /**
+    *  @brief Gets the sensor ID if available.
+    *
+    *  @param sensor Initialized by this.  Will be cleared if date not found.
+    */
+   void getSensorId( std::string& sensor ) const;
+   
+private:
+
+   /**
+    * @brief Gets the xml block as a string from stream.
+    * @param str Input stream.
+    * @param xmpApp1XmlBlock String initialized by this.
+    * @return true on success, false on error.
+    */
+   bool getXmpApp1XmlBlock( std::ifstream& str,
+                            std::string& xmpApp1XmlBlock ) const;
+
+   /**
+    * @brief Gets path from doc and initializes string.
+    * @param path Xml path to look for.
+    * @param xdoc Xml doc to look in.
+    * @param s String to initialize.
+    * @return true on success and false if path is not found or if there
+    * are more than one of path.
+    */
+   bool getPath( const ossimString& path,
+                 const ossimXmlDocument& xdoc,
+                 ossimString& s ) const;
+
+   ossimFilename  m_file;
+   std::string    m_xmpApp1XmlBlock;
+};
+
+#endif /* End of "#ifndef ossimXmpInfo_HEADER" */
+
diff --git a/ossim/include/ossim/util/ossimAutRegUtil.h b/ossim/include/ossim/util/ossimAutRegUtil.h
new file mode 100644
index 0000000..087bcee
--- /dev/null
+++ b/ossim/include/ossim/util/ossimAutRegUtil.h
@@ -0,0 +1,289 @@
+//----------------------------------------------------------------------------
+// File: ossimAutRegUtil.h
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Hicks
+//
+// Description: Utility class for autonomous registration.
+//----------------------------------------------------------------------------
+#ifndef ossimAutRegUtil_HEADER
+#define ossimAutRegUtil_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/imaging/ossimSingleImageChain.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimTieMeasurementGeneratorInterface.h>
+
+#include <ctime>
+#include <vector>
+#include <iostream>
+
+
+// Forward class declarations:
+class ossimArgumentParser;
+class ossimImageHandler;
+class ossimKeywordlist;
+class ossimImageViewAffineTransform;
+class ossimAdjustmentExecutive;
+class ossimObservationSet;
+
+/**
+ * @brief ossimAutRegUtil class.
+ *
+ * This is a utility class to register two images.
+ *
+ * @note Almost all methods use throw for stack unwinding.  This is not in
+ * method declarations to alleviate build errors on windows.
+ */
+class OSSIM_DLL ossimAutRegUtil : public ossimReferenced
+{
+public:
+   /** emumerated operations */
+   enum ossimAutRegOperation
+   {
+      OSSIM_AUTREG_OP_UNKNOWN = 0,
+      OSSIM_AUTREG_OP_COREG   = 1,
+      OSSIM_AUTREG_OP_MASREG  = 2
+   };
+
+   /**
+    * @brief default constructor
+    */
+   ossimAutRegUtil();
+   
+   /**
+    * @brief virtual destructor
+    */
+   ~ossimAutRegUtil();
+
+   /**
+    * @brief Disconnects and clears the dem and image layers?????????????.
+    */
+   void clear();
+   
+   /**
+    * @brief Initialize method, using arguments, to be run prior to execute.
+    * @param ap Arg parser to initialize from.
+    * @note Throws ossimException on error.
+    * @note A throw with an error message of "usage" is used to get out when
+    * a usage is printed.
+    */
+   bool initialize(ossimArgumentParser& ap);
+
+
+   /**
+    * @brief Initialize method, using predefined kwl, to be run prior to execute.
+    * @note Throws ossimException on error.
+    */
+   void initialize(const ossimKeywordlist& kwl);
+
+
+   /**
+    * @brief Execute method.  Performs the registration process.
+    * @note Throws ossimException on error.
+    */
+   void execute();
+
+
+   // /**
+   //  * @brief Summarize method
+   //  */
+   void summarizeSolution() const;
+
+
+   // /**
+   //  * @brief saveAdjustment method
+   //  */
+   void saveAdjustment();
+
+   /**
+    * @brief Gets the output file name.
+    * @param f Initialized by this with the filename.
+    */
+   void getOutputFilename(ossimFilename& f) const;
+
+private:
+
+   /**
+    * @brief Internal initialize method.
+    * @note Throws ossimException on error.
+    */
+   void initialize();
+
+   /**
+    * @brief Internal load image pair method.
+    * @return true if succsessful.
+    */
+   bool loadImages();
+
+   /**
+    * @brief Internal correlation region determination.
+    * @return true if succsessful.
+    */
+   bool delineateROIs();
+
+   /**
+    * @brief Internal observation set poplulate method.
+    * @return true if succsessful.
+    */
+   bool populateObsSet();
+
+
+   /** @return true if key is set to true; false, if not. */
+   bool keyIsTrue(ossimRefPtr<ossimKeywordlist> kwl, const std::string& key ) const;
+                                  
+
+   /** @return true if file extension is "src" */
+   bool isSrcFile(const ossimFilename& file) const;
+
+   /** @brief Initializes m_srcKwl if option was set. */
+   void initializeSrcKwl();
+
+   /** @brief Initializes m_ocvKwl if option was set. */
+   void initializeOcvKwl();
+
+   /** @brief Initializes m_oaxKwl if option was set. */
+   void initializeOaxKwl();
+
+   /**
+    * @brief Adds application arguments to the argument parser.
+    * @param ap Parser to add to.
+    */
+   void addArguments(ossimArgumentParser& ap);
+
+   /**
+    * @brief Configures tie measurement generator
+    */
+   void configureTieMeasGenerator();
+
+   /**
+    * @brief Configures adjustment executive
+    */
+   void configureAdjustmentExecutive();
+
+
+   /** @brief Initializes arg parser and outputs usage. */
+   void usage(ossimArgumentParser& ap);
+
+
+   /**
+    * @brief Passes reader properties to single image handler if any.
+    * @param ih Image handler to set properties on.
+    */
+   void setReaderProps( ossimImageHandler* ih ) const;
+
+   /**
+    * @brief Sets entry for a chain.
+    * @param chain Chain to set up.
+    * @param entryIndex Zero based index.
+    * @return true on success, false on error.
+    */
+   bool setChainEntry( ossimRefPtr<ossimSingleImageChain>& chain,
+                       ossim_uint32 entryIndex ) const;
+   
+   /**
+    * @brief Method to create a chain and add to img layers from file.
+    * @param file Image to open.
+    * @parm entryIndex Entry to open.
+    */
+   bool addImgSource(const ossimFilename& file,
+                     ossim_uint32 entryIndex);
+
+
+   /**
+    * @brief Creates a ossimSingleImageChain from file.
+    * @param file File to open.
+    * @param entryIndex Entry to open.
+    * options like histogram stretches.
+    * @return Ref pointer to ossimSingleImageChain.
+    * @note Throws ossimException on error.
+    */
+   ossimRefPtr<ossimSingleImageChain> createChain(const ossimFilename& file,
+                                                  ossim_uint32 entryIndex) const;
+   
+   /**
+    * @brief Sets the single image chain for identity operations view to
+    * an ossimImageViewAffineTransform.
+    */
+   void createIdentityProjection(int idx);
+
+   /** @brief Hidden from use copy constructor. */
+   ossimAutRegUtil( const ossimAutRegUtil& obj );
+
+   /** @brief Hidden from use assignment operator. */
+   const ossimAutRegUtil& operator=( const ossimAutRegUtil& rhs );
+
+   /**
+    * @brief Tie point generator interface
+    */
+   ossimTieMeasurementGeneratorInterface* m_tGen;
+   ossimRefPtr<ossimObject> m_tGenObj;
+   
+   /** @brief Correlation ROIs */
+   std::vector<ossimIrect> m_roiRects;
+   
+   /** @brief OpenCV match window display flag */
+   bool m_showMatchWindow;
+   
+   /**
+    * @brief Adjustment executive interface
+    */
+   /** @brief Executive object */
+   ossimRefPtr<ossimAdjustmentExecutive> m_adjExec;
+
+   /** @brief Observation set */
+   ossimRefPtr<ossimObservationSet> m_obsSet;
+
+   /** @brief A priori tie point sigmas */
+   ossimColumnVector3d m_LatLonHgtSigmas;
+   ossimColumnVector3d m_LatLonHgtControlSigmas;
+
+
+   /** @brief Report stream pointer */
+   std::ostream* m_rep;
+
+
+   /**  @brief Array of image source chains. */
+   std::vector< ossimRefPtr<ossimSingleImageChain> > m_imgLayer;
+
+   /** Hold all options passed into intialize. */
+   ossimRefPtr<ossimKeywordlist> m_kwl;
+
+   /** Hold contents of OpenCV config file if --ocv_config_file is used. */
+   ossimRefPtr<ossimKeywordlist> m_ocvKwl;
+
+   /** Hold contents of oax config file if --oax_config_file is used. */
+   ossimRefPtr<ossimKeywordlist> m_oaxKwl;
+
+   /** Hold contents of src file if --src is used. */
+   ossimRefPtr<ossimKeywordlist> m_srcKwl;
+   
+   /** Enumerated operation to perform. */
+   ossimAutRegOperation m_operation;
+   
+   /**
+    * Image view transform(IVT). Only set/used in "chip"(identity) operation as
+    * the IVT for the resampler(ossimImageRenderer).
+    */
+   ossimRefPtr<ossimImageViewAffineTransform> m_ivt[2];
+
+   /**
+    * The image geometry.  In chip mode this will be from the input image. So
+    * this may or may not have a map projection. In any other mode it
+    * will the view or output geometry which will be a map projection.
+    */
+   ossimRefPtr<ossimImageGeometry> m_geom[2];
+   
+   /** Control image flags. */
+   bool m_controlImage[2];
+};
+
+#endif // #ifndef ossimAutRegUtil_HEADER
+
diff --git a/ossim/include/ossim/util/ossimBatchTest.h b/ossim/include/ossim/util/ossimBatchTest.h
new file mode 100644
index 0000000..c16f22a
--- /dev/null
+++ b/ossim/include/ossim/util/ossimBatchTest.h
@@ -0,0 +1,146 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Burken, Oscar Kramer
+//
+// Description: Test code application utility class.
+//
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimBatchTest_HEADER
+#define ossimBatchTest_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimFilename.h>
+#include <vector>
+#include <fstream>
+
+// Forward class declarations:
+class ossimArgumentParser;
+class ossimDpt;
+class ossimString;
+class ossimGpt;
+class ossimImageFileWriter;
+class ossimImageGeometry;
+class ossimIrect;
+class ossimKeywordlist;
+class ossimTilingRect;
+
+class OSSIM_DLL ossimBatchTest : public ossimReferenced
+{
+public:
+   enum TEST_STATUS
+   {
+      TEST_TBD      = 0x00, // initial state: no test yet attempted
+      TEST_PASSED   = 0x01,
+      TEST_FAILED   = 0x02,
+      TEST_ERROR    = 0x04,
+      TEST_DISABLED = 0x08
+   };
+
+   //! This constructor only initializes data members to null/defaults
+   ossimBatchTest();
+   
+   //! Initializes the test session given the command line.
+   bool initialize(ossimArgumentParser& ap);
+
+   //! Performs the actual test with the config filename previously set in initialize() or
+   //! processConfigList() when config is a list of subordinate test config files.
+   //! @return The overall bit-wise status of all tests (see TEST_STATUS enum for bit definitions).
+   ossim_uint8 execute();
+
+private:
+   //! Writes template test config file, either exhaustive long form for flexibility, or simple
+   //! short-form for easier test creation.
+   void writeTemplate(const ossimFilename& templateFile, bool long_form);
+   
+   //! Fetches string from OS for naming and tagging the log file.
+   void getDateString(ossimString& date);
+   
+   //! Establishes name of output log file.
+   void getLogFilename(ossimFilename& logFile);
+
+   //! When the config file consists of a list of subordinate test config files, this method manages
+   //! processing multiple configs.
+   //! @return The overall bit-wise status of all configs (see TEST_STATUS enum for bit definitions).
+   ossim_uint8 processConfigList(const ossimKeywordlist& kwl);
+
+   //! Within a single config file can be multiple tests, distinguished by the "test*." prefix. This
+   //! method manages the execution of a single test.
+   //! @return The overall bit-wise status of test (see TEST_STATUS enum for bit definitions).
+   ossim_uint8 processTest(const ossimString& prefix, const ossimKeywordlist& kwl);
+
+   //! Runs a single command within a test.
+   //! @return The bit-wise status of command (see TEST_STATUS enum for bit definitions).
+   ossim_uint8 processCommands(const ossimString& prefix,
+                               const ossimKeywordlist& kwl,
+                               const ossimString& testName,
+                               bool logTime,
+                               const ossimFilename& tempFile=ossimFilename(""));
+
+   //! Modifies the config's KWL to explicitly declare implied keywords.
+   void preprocessKwl(const std::vector<std::string>& testList,
+                      const std::string& testCommand,
+                      ossimKeywordlist& kwl);
+
+   //! Default preprocessing step makes expected and output results directories. Returns 
+   //! @return TRUE if successful.
+   bool makeDefaultResultsDir();
+
+   //! Default clean step deletes all files in out and exp dirs.
+   //! @return TRUE if successful.
+   bool doDefaultClean();
+
+   /**
+    * @brief Gets the temp file name.
+    *
+    * This will either be from the config file lookup of "temp_file" or derived under
+    * $(OSSIM_BATCH_TEST_RESULTS)/tmp if the lookup fails.  Note that this will create
+    * the $(OSSIM_BATCH_TEST_RESULTS)/tmp directory if needed.
+    *
+    * @param prefix Like "test1."
+    * @param kwl Keyword list to look for temp_file in.
+    * @param tempFile Initialized by this.
+    *
+    * @return true on success.  False if derived temp file directory could
+    * not be created.
+    */
+   bool getTempFileName( const ossimString& prefix,
+                         const ossimKeywordlist& kwl,
+                         ossimFilename& tempFile ) const;
+
+   /**
+    * @brief Gets the default temp directory $(OSSIM_BATCH_TEST_RESULTS)/tmp.
+    * @param tempDir Initialized by this.
+    *
+    * @return true on success, false on error.
+    */
+   bool getDefaultTempFileDir( ossimFilename& tempDir ) const;
+
+   /** @brief Initializes arg parser and outputs usage. */
+   void usage(ossimArgumentParser& ap);
+
+   /**
+    * @brief Converts string slashes to either forward or backward taking
+    * into account that windows commands with forward slashes in them.
+    * @param s String to convert.
+    */
+   std::string convertToNative( const char* lookup ) const;
+
+   std::vector<std::string> m_acceptTestList;
+   std::vector<std::string> m_cleanTestList;
+   std::vector<std::string> m_preprocessTestList;
+   std::vector<std::string> m_runTestList;
+
+   bool          m_templateModeActive;
+   ossimFilename m_configFileName;
+   ossimFilename m_outDir;
+   ossimFilename m_expDir;
+   std::ofstream m_logStr;
+};
+
+#endif /* #ifndef ossimBatchTest_HEADER */
diff --git a/ossim/include/ossim/util/ossimChipperUtil.h b/ossim/include/ossim/util/ossimChipperUtil.h
new file mode 100644
index 0000000..c6d6647
--- /dev/null
+++ b/ossim/include/ossim/util/ossimChipperUtil.h
@@ -0,0 +1,768 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimChipperUtil.h
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+// 
+// Utility class to for chipping out images. , orthorectifying imagery with an
+// added slant toward doing digital elevation model(DEM) operations.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimChipperUtil.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimChipperUtil_HEADER
+#define ossimChipperUtil_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/imaging/ossimSingleImageChain.h>
+#include <ossim/imaging/ossimImageFileWriter.h>
+#include <ossim/projection/ossimMapProjection.h>
+
+#include <map>
+#include <vector>
+
+// Forward class declarations:
+class ossimArgumentParser;
+class ossimDpt;
+class ossimFilename;
+class ossimGeoPolygon;
+class ossimGpt;
+class ossimImageData;
+class ossimImageFileWriter;
+class ossimImageGeometry;
+class ossimImageViewAffineTransform;
+class ossimIrect;
+class ossimKeywordlist;
+
+/**
+ * @brief ossimChipperUtil class.
+ *
+ * This is a utility class to orthorectify imagery with an added slant toward
+ * doing digital elevation model(DEM) operations.
+ *
+ * See the ossim-dem application for a code usage example.
+ *
+ * @note Almost all methods use throw for stack unwinding.  This is not in
+ * method declarations to alleviate build errors on windows.  Sorry...
+ *
+ * @note "bumpshade" and "hillshade" intermixed throughout.  The class to do
+ * a hillshade is the ossimBumpShadeTileSource.
+ */
+class OSSIM_DLL ossimChipperUtil : public ossimReferenced
+{
+public:
+
+   /** emumerated operations */
+   enum ossimChipperOperation
+   {
+      OSSIM_CHIPPER_OP_UNKNOWN      = 0,
+      OSSIM_CHIPPER_OP_HILL_SHADE   = 1,
+      OSSIM_CHIPPER_OP_COLOR_RELIEF = 2,
+      OSSIM_CHIPPER_OP_ORTHO        = 3,
+      OSSIM_CHIPPER_OP_2CMV         = 4, // two color multiview
+      OSSIM_CHIPPER_OP_CHIP         = 5, // image space
+      OSSIM_CHIPPER_OP_PSM          = 6  // pan sharpened multispectral
+   };
+
+   /** emumerated output projections */
+   enum ossimChipperOutputProjection
+   {
+      OSSIM_CHIPPER_PROJ_UNKNOWN    = 0,
+      OSSIM_CHIPPER_PROJ_GEO        = 1,
+      OSSIM_CHIPPER_PROJ_GEO_SCALED = 2,
+      OSSIM_CHIPPER_PROJ_INPUT      = 3,
+      OSSIM_CHIPPER_PROJ_UTM        = 4
+   };
+
+   /** default constructor */
+   ossimChipperUtil();
+
+   /** virtual destructor */
+   virtual ~ossimChipperUtil();
+
+   /**
+    * @brief Disconnects and clears the dem and image layers.
+    */
+   void clear();
+   
+   /**
+    * @brief Initial method to be ran prior to execute.
+    * @param ap Arg parser to initialize from.
+    * @note Throws ossimException on error.
+    * @note A throw with an error message of "usage" is used to get out when
+    * a usage is printed.
+    */
+   bool initialize(ossimArgumentParser& ap);
+
+
+   /**
+    * @brief Initialize method to be ran prior to execute.
+    * 
+    * @note Throws ossimException on error.
+    */
+   void initialize(const ossimKeywordlist& kwl);
+
+   /**
+    * @brief execute method.  Performs the actual product write.
+    * @note Throws ossimException on error.
+    */
+   void execute();
+
+   void abort();
+
+   /**
+    * @brief Gets initialized area of interest(aoi) from chain.
+    * @return Pointer to ossimImageData holding chip.  Pointer
+    * can be null if not initialized properly so caller should
+    * check.
+    */
+//   ossimRefPtr<ossimImageData> getChip();
+
+   /**
+   * The options will only support a couple modifications while chipping.  
+   * this is mainly here to support a moving chip window so we do not need to do
+   * a full initialize for every chip.  We can specify a new cut bounds and
+   * cut width height in pixels if desired.
+   *
+   *  cut_wms_bbox: ..........
+   *  cut_width:
+   *  cut_height:
+   *
+   *
+   *
+   */
+   ossimRefPtr<ossimImageData> getChip(const ossimKeywordlist& optionsKwl= ossimKeywordlist());
+
+   /**
+    * @brief Gets the output file name.
+    * @param f Initialized by this with the filename.
+    */
+   void getOutputFilename(ossimFilename& f) const;
+
+private:
+
+   /**
+    * @brief Initial method to be ran prior to execute.
+    *
+    * @note Throws ossimException on error.
+    */
+   void initialize();
+
+   /**
+    * @brief Builds image chains returns ref pointer to image source
+    * and initializes area of interest(aoi).
+    * @return Ref pointer to image chain.
+    */
+   ossimRefPtr<ossimImageSource> initializeChain( ossimIrect& aoi );
+
+   void setOptionsToChain( ossimIrect& aoi, const ossimKeywordlist& kwl );
+
+   /**
+    * @brief Initializes a color relief chain.
+    * @return Ref pointer to image chain.
+    */
+   ossimRefPtr<ossimImageSource> initializeColorReliefChain();
+
+   /**
+    * @brief Initializes a bump shade chain.
+    * @return Ref pointer to image chain.
+    */
+   ossimRefPtr<ossimImageSource> initializeBumpShadeChain();
+
+   /**
+    * @brief Combines two images into a two color multi view chain.
+    * @return ossimRefPtr with pointer to ossimImageSource.  Can be null.
+    */
+   ossimRefPtr<ossimImageSource> initialize2CmvChain();
+
+   /**
+    * @brief Initializes a psm (pan sharpening multispectra) chain.
+    * @return Ref pointer to image chain.
+    */
+   ossimRefPtr<ossimImageSource> initializePsmChain();
+
+   /**
+    * @brief Initializes the output projection and propagates to image chains.
+    * @note Throws ossimException on error.
+    */
+   void initializeOutputProjection();
+   
+   /** @brief Create chains for all dems. */
+   void addDemSources();
+   
+   /**
+    * @brief Method to create a chain and add to dem layers from file.
+    * @param file Image to open.
+    * @parm entryIndex Entry to open.
+    */
+   void addDemSource(const ossimFilename& file,
+                     ossim_uint32 entryIndex);
+
+   /**
+    * @brief  Method to create a chain and add to dem layers from a
+    * ossimSrcRecord.
+    */
+   void addDemSource(const ossimSrcRecord& rec);
+
+   /** @brief Creates chains for all images. */
+   void addImgSources();
+   
+   /**
+    * @brief Method to create a chain and add to img layers from file.
+    * @param file Image to open.
+    * @parm entryIndex Entry to open.
+    */
+   void addImgSource(const ossimFilename& file,
+                     ossim_uint32 entryIndex);
+
+   /**
+    * @brief  Method to create a chain and add to img layers from a
+    * ossimSrcRecord.
+    */
+   void addImgSource(const ossimSrcRecord& rec);
+
+   /**
+    * @brief Creates a ossimSingleImageChain from file.
+    * @param file File to open.
+    * @param entryIndex Entry to open.
+    * @param isDemSource True if dem source, false if not. This controls chain
+    * options like histogram stretches.
+    * @return Ref pointer to ossimSingleImageChain.
+    * @note Throws ossimException on error.
+    */
+   ossimRefPtr<ossimSingleImageChain> createChain(const ossimFilename& file,
+                                                  ossim_uint32 entryIndex,
+                                                  bool isDemSource) const;
+
+   /**
+    * @brief Creates a ossimSingleImageChain from ossimSrcRecord.
+    * @param src Record.
+    * @param isDemSource True if dem source, false if not. This controls chain
+    * options like histogram stretches.
+    * @return Ref pointer to ossimSingleImageChain.
+    * @note Throws ossimException on error.
+    */
+   ossimRefPtr<ossimSingleImageChain> createChain(const ossimSrcRecord& rec,
+                                                  bool isDemSource) const;
+
+   /**
+    * @brief Creates the output or view projection.
+    * @note All chains should be constructed prior to calling this.
+    */
+   void createOutputProjection();
+   
+   /**
+    * @brief Sets the single image chain for identity operations view to
+    * a ossimImageViewAffineTransform.  This will have a rotation if
+    * up is up is selected.  Also set m_outputProjection to the input's
+    * for area of interest.
+    */
+   void createIdentityProjection();
+
+   /**
+    * @brief Gets the first input projection.
+    *
+    * This gets the output projection of the first dem layer if present;
+    * if not, the first image layer.
+    * 
+    * @return ref ptr to projection, could be null.
+    */
+   ossimRefPtr<ossimMapProjection> getFirstInputProjection();
+
+   /**
+    * @brief Convenience method to get geographic projection.
+    * @return new ossimEquDistCylProjection.
+    */
+   ossimRefPtr<ossimMapProjection> getNewGeoProjection();
+
+   /**
+    * @brief Convenience method to get geographic projection.
+    *
+    * This method sets the origin to the center of the scene bounding rect
+    * of all layers.
+    * @return new ossimEquDistCylProjection.
+    */
+   ossimRefPtr<ossimMapProjection> getNewGeoScaledProjection();
+
+    /**
+    * @brief Convenience method to get a projection from an srs code.
+    * @return new ossimMapProjection.
+    */  
+   ossimRefPtr<ossimMapProjection> getNewProjectionFromSrsCode(
+      const std::string& code );
+
+   /**
+    * @brief Convenience method to get a utm projection.
+    * @return new ossimUtmProjection.
+    */     
+   ossimRefPtr<ossimMapProjection> getNewUtmProjection();
+
+   /**
+    * @brief Convenience method to get a pointer to the  output map
+    * projection.
+    *
+    * Callers should check for valid() as the pointer could be
+    * 0 if not initialized.
+    * 
+    * @returns The ossimMapProjection* from the m_outputGeometry as a ref
+    * pointer.
+    */
+   ossimRefPtr<ossimMapProjection> getMapProjection();
+
+   /**
+    * @brief Sets the projection tie point to the scene bounding rect corner.
+    * @note Throws ossimException on error.
+    */
+   void intiailizeProjectionTiePoint();
+
+   /**
+    * @brief Initializes the projection gsd.
+    *
+    * This loops through all chains to find the best resolution gsd.
+    *
+    * @note Throws ossimException on error.
+    */
+   void initializeProjectionGsd();   
+
+   /**
+    * @brief Initializes the image view transform(IVT) scale.
+    *
+    * Chip mode only. Sets IVT scale to output / input.
+    * 
+    * @note Throws ossimException on error.
+    */
+   void initializeIvtScale();   
+
+   /**
+    * @brief Loops through all layers to get the upper left tie point.
+    * @param tie Point to initialize.
+    */
+   void getTiePoint(ossimGpt& tie);
+
+   /**
+    * @brief Gets the upper left tie point from a chain.
+    * @param chain The chain to get tie point from.
+    * @param tie Point to initialize.
+    * @note Throws ossimException on error.
+    */
+   void getTiePoint(ossimSingleImageChain* chain, ossimGpt& tie);
+
+   /**
+    * @brief Loops through all layers to get the upper left tie point.
+    * @param tie Point to initialize.
+    */
+   void getTiePoint(ossimDpt& tie);
+
+   /**
+    * @brief Gets the upper left tie point from a chain.
+    * @param chain The chain to get tie point from.
+    * @param tie Point to initialize.
+    * @note Throws ossimException on error.
+    */
+   void getTiePoint(ossimSingleImageChain* chain, ossimDpt& tie);
+
+   /**
+    * @brief Loops through all layers to get the best gsd.
+    * @param gsd Point to initialize.
+    */
+   void getMetersPerPixel(ossimDpt& gsd);
+
+   /**
+    * @brief Gets the gsd from a chain.
+    * @param chain The chain to get gsd from.
+    * @param gsd Point to initialize.
+    * @note Throws ossimException on error.
+    */   
+   void getMetersPerPixel(ossimSingleImageChain* chain, ossimDpt& gsd);
+
+   /**
+    * @brief Gets value of key "central_meridan" if set, nan if not.
+    *
+    * @return Value as a double or nan if keyord is not set.
+    * 
+    * @note Throws ossimException on range error.
+    */
+   ossim_float64 getCentralMeridian() const;
+
+   /**
+    * @brief Gets value of key "origin_latitude" if set, nan if not.
+    *
+    * @return Value as a double or nan if keyord is not set.
+    * 
+    * @note Throws ossimException on range error.
+    */
+   ossim_float64 getOriginLatitude() const;
+
+   /**
+    * @brief Loops through all layers to get the scene center ground point.
+    * @param gpt Point to initialize.
+    * @note Throws ossimException on error.
+    */
+   void getSceneCenter(ossimGpt& gpt);
+
+   /**
+    * @brief Gets the scene center from a chain.
+    * @param chain The chain to get scene center from.
+    * @param gpt Point to initialize.
+    * @note Throws ossimException on error.
+    */   
+   void getSceneCenter(ossimSingleImageChain* chain, ossimGpt& gpt);
+
+   /**
+    * @brief Creates a new writer.
+    *
+    * This will use the writer option (-w or --writer), if present; else,
+    * it will be derived from the output file extention.
+    *
+    * This will also set any writer properties passed in.
+    *
+    * @return new ossimImageFileWriter.
+    * @note Throws ossimException on error.
+    */
+   ossimRefPtr<ossimImageFileWriter> createNewWriter() const;
+
+   /**
+    * @brief loops through all chains and sets the output projection.
+    * @note Throws ossimException on error.
+    */
+   void propagateOutputProjectionToChains();
+
+   /**
+    * @brief Combines all layers into an ossimImageMosaic.
+    * @return ossimRefPtr with pointer to ossimImageSource.  Can be null.
+    */
+   ossimRefPtr<ossimImageSource> combineLayers(
+      std::vector< ossimRefPtr<ossimSingleImageChain> >& layers) const;
+
+   /** @brief Combines dems(m_demLayer) and images(m_imgLayer). */
+   ossimRefPtr<ossimImageSource> combineLayers();
+
+   /**
+    * @brief Creates ossimIndexToRgbLutFilter and connects to source.
+    * @param Source to connect to.
+    * @return End of chain with lut filter on it.
+    * @note Throws ossimException on error.
+    */
+   ossimRefPtr<ossimImageSource> addIndexToRgbLutFilter(
+      ossimRefPtr<ossimImageSource> &source) const;
+
+   /**
+    * @brief Creates ossimScalarRemapper and connects to source.
+    * @param Source to connect to.
+    * @param scalar Scalar type.
+    * @return End of chain with remapper on it.
+    * @note Throws ossimException on error.
+    */
+   ossimRefPtr<ossimImageSource> addScalarRemapper(
+      ossimRefPtr<ossimImageSource> &source,
+      ossimScalarType scalar) const;
+
+   /**
+    * @brief Set up ossimHistogramRemapper for a chain.
+    * @param chain Chain to set up.
+    * @return true on success, false on error.
+    */
+   bool setupChainHistogram( ossimRefPtr<ossimSingleImageChain>& chain) const;
+
+   /**
+    * @brief Sets entry for a chain.
+    * @param chain Chain to set up.
+    * @param entryIndex Zero based index.
+    * @return true on success, false on error.
+    */
+   bool setChainEntry( ossimRefPtr<ossimSingleImageChain>& chain,
+                       ossim_uint32 entryIndex ) const;
+
+   /**
+    * @brief Initializes "rect" with the output area of interest.
+    *
+    * Initialization will either come from user defined cut options or the
+    * source bounding rect with user options taking precidence.
+    *
+    * @param source Should be the end of the processing chain.
+    * @param rect Rectangle to initialize.  This is in output (view) space.
+    *
+    * @note Throws ossimException on error.
+    */
+   void getAreaOfInterest( ossimImageSource* source, ossimIrect& rect ) const;
+
+   /**
+    * @brief Method to calculate and initialize scale and area of interest
+    * for making a thumbnail.
+    *
+    * Sets the scale of the output projection so that the adjusted rectangle
+    * meets the cut rect and demension requirements set in options.
+    *
+    * @param originalRect Original scene area of interest.
+    * @param adjustedRect New rect for thumbnail.
+    *
+    * @note Throws ossimException on error.
+    */
+   void initializeThumbnailProjection(const ossimIrect& originalRect,
+                                      ossimIrect& adjustedRect);
+
+   /** @return true if BANDS keyword is set; false, if not. */
+   bool hasBandSelection() const;
+
+   /**
+    * @brief Gets the band list if BANDS keyword is set.
+    *
+    * NOTE: BANDS keyword values are ONE based.  bandList values are
+    * ZERO based.
+    *
+    * @param bandList List initialized by this.
+    */
+   void getBandList( std::vector<ossim_uint32>& bandList ) const;
+
+   /** @return true if color table (lut) is set; false, if not. */
+   bool hasLutFile() const;
+
+   /** @return true if brightness or contrast option is set; false, if not. */
+   bool hasBrightnesContrastOperation() const;
+
+   /** @return true if any Geo Poly cutter option is set */
+   bool hasGeoPolyCutterOption()const;
+   
+   /**
+    * @return true if any bump share options have been set by user; false,
+    * if not.
+    */
+   bool hasBumpShadeArg() const;
+
+   /** @return true if thumbnail option is set; false, if not. */
+   bool hasThumbnailResolution() const;
+
+   /** @return true if histogram option is set; false, if not. */
+   bool hasHistogramOperation() const;
+
+   /** @return true if file extension is "hgt", "dem" or contains "dtN" (dted). */
+   bool isDemFile(const ossimFilename& file) const;
+
+   /** @return true if file extension is "src" */
+   bool isSrcFile(const ossimFilename& file) const;
+
+   /** @brief Initializes m_srcKwl if option was set. */
+   void initializeSrcKwl();
+
+   /**
+    * @return The number of DEM_KW and IMG_KW found in the m_kwl and m_srcKwl
+    * keyword list.
+    */
+   ossim_uint32 getNumberOfInputs() const;
+
+   /**
+    * @brief Gets the emumerated output projection type.
+    *
+    * This looks in m_kwl for ossimKeywordNames::PROJECTION_KW.
+    * @return The enumerated output projection type.
+    * @note This does not cover SRS keyword which could be any type of projection.
+    */
+   ossimChipperOutputProjection getOutputProjectionType() const;
+
+   /**
+    * @brief Returns the scalar type from OUTPUT_RADIOMETRY_KW keyword if
+    * present. Deprecated SCALE_2_8_BIT_KW is also checked.
+    *
+    * @return ossimScalarType Note this can be OSSIM_SCALAR_UNKNOWN if the
+    * keywords are not present.
+    */
+   ossimScalarType getOutputScalarType() const;
+
+   /** @return true if scale to eight bit option is set; false, if not. */
+   bool scaleToEightBit() const;
+
+   /** @return true if snap tie to origin option is set; false, if not. */
+   bool snapTieToOrigin() const;
+
+   /**
+    * @brief Gets the image space scale.
+    *
+    * This is a "chip" operation only.
+    *
+    * Keys: 
+    * IMAGE_SPACE_SCALE_X_KW
+    * IMAGE_SPACE_SCALE_Y_KW
+    *
+    * Scale will be 1.0, 1.0 if keys not found. 
+    */
+   void getImageSpaceScale( ossimDpt& imageSpaceScale ) const;
+   
+   /**
+    * @brief Gets rotation.
+    *
+    * @return Rotation in decimal degrees if ROTATION_KW option is set;
+    * ossim::nan, if not.
+    *
+    * @note Throws ossimException on range error.
+    */
+   ossim_float64 getRotation() const;
+
+   /** @return true if ROTATION_KW option is set; false, if not. */
+   bool hasRotation() const;
+
+   /** @return true if UP_IS_UP_KW option is set; false, if not. */
+   bool upIsUp() const;
+
+   /** @return true if NORTH_UP_KW option is set; false, if not. */
+   bool northUp() const;
+
+   /** @return true if operation is "chip" or identity; false, if not. */
+   bool isIdentity() const;
+
+   /** @return true if key is set to true; false, if not. */
+   bool keyIsTrue( const std::string& key ) const;
+
+   /**
+    * @return The entry number if set.  Zero if ossimKeywordNames::ENTRY_KW not
+    * found.
+    */
+   ossim_uint32 getEntryNumber() const;
+
+   /**
+    * @return The zone if set.  Zero if ossimKeywordNames::ZONE_KW not
+    * found.
+    */
+   ossim_int32 getZone() const;
+
+   /**
+    * @return The hemisphere if set. Empty string if
+    * ossimKeywordNames::HEMISPHERE_KW not found.
+    */
+   std::string getHemisphere() const;
+
+   /**
+    * @return True if any input has a sensor model input, false if all input
+    * projections are map projections.
+    */
+   bool hasSensorModelInput();
+
+   /**
+    * @return true if all size cut box width height keywords are true.
+    */
+   bool hasCutBoxWidthHeight() const;
+
+   /**
+   *  @return true if the WMS style cut and the width and height keywords are set
+   */
+   bool hasWmsBboxCutWidthHeight() const;
+
+   /**
+    * @return true if meters, degrees or cut box with width and height option.
+    */  
+   bool hasScaleOption() const;
+   
+   /**
+    * @return true if three band out is true, false if not.
+    */  
+   bool isThreeBandOut() const;
+
+   /**
+    * @return true if pad thumbnail is true, false if not.
+    */  
+   bool padThumbnail() const;
+
+   /**
+    * @brief Passes reader properties to single image handler if any.
+    * @param ih Image handler to set properties on.
+    */
+   void setReaderProps( ossimImageHandler* ih ) const;
+   
+   /**
+    * @brief Adds application arguments to the argument parser.
+    * @param ap Parser to add to.
+    */
+   void addArguments(ossimArgumentParser& ap);
+
+   void getClipPolygon(ossimGeoPolygon& polygon)const;
+   /**
+    * @brief Gets the brightness level.
+    * 
+    * This will return 0.0 if the keyword is not found or if the range check
+    * is not between -1.0 and 1.0.
+    *
+    * @return brightness
+    */
+   ossim_float64 getBrightness() const;
+
+   /**
+    * @brief Gets the contrast level.
+    * 
+    * This will return 1.0 if the keyword is not found or if the range check
+    * is not between 0.0 and 20.0.
+    *
+    * @return brightness
+    */   
+   ossim_float64 getContrast() const;
+
+   /**
+    * @brief Gets the sharpen mode.
+    *
+    * Valid modes: light, heavy
+    * 
+    * @return sharpness mode
+    */   
+   std::string getSharpenMode() const;
+
+   /** @brief Initializes arg parser and outputs usage. */
+   void usage(ossimArgumentParser& ap);
+
+   /** @brief Hidden from use copy constructor. */
+   ossimChipperUtil( const ossimChipperUtil& obj );
+
+   /** @brief Hidden from use assignment operator. */
+   const ossimChipperUtil& operator=( const ossimChipperUtil& rhs );
+
+   ossimRefPtr<ossimImageSource> createCombiner()const;
+
+   /** Enumerated operation to perform. */
+   ossimChipperOperation m_operation;
+   
+   /** Hold all options passed into intialize. */
+   ossimRefPtr<ossimKeywordlist> m_kwl;
+
+   /** Hold contents of src file if --src is used. */
+   ossimRefPtr<ossimKeywordlist> m_srcKwl;
+
+   /**
+    * The image geometry.  In chip mode this will be from the input image. So
+    * this may or may not have a map projection. In any other mode it
+    * will the view or output geometry which will be a map projection.
+    */
+   ossimRefPtr<ossimImageGeometry> m_geom;
+
+   /**
+    * Image view transform(IVT). Only set/used in "chip"(identity) operation as
+    * the IVT for the resampler(ossimImageRenderer).
+    */
+   ossimRefPtr<ossimImageViewAffineTransform> m_ivt;
+
+   /**  Array of dem chains. */
+   std::vector< ossimRefPtr<ossimSingleImageChain> > m_demLayer;
+
+   /**  Array of image source chains. */
+   std::vector< ossimRefPtr<ossimSingleImageChain> > m_imgLayer;
+   
+   /**
+    *  We need access to the writer so we can support aborting
+    */
+   mutable ossimRefPtr<ossimImageFileWriter> m_writer;
+
+   /**
+   * We need to support changing clips without doing a full initilization.  
+   * we will save the ImageSource pointer on first initialization
+   */
+    ossimRefPtr<ossimImageSource> m_source;
+
+};
+
+#endif /* #ifndef ossimChipperUtil_HEADER */
+
diff --git a/ossim/include/ossim/util/ossimEquationUtil.h b/ossim/include/ossim/util/ossimEquationUtil.h
new file mode 100644
index 0000000..5aeb84f
--- /dev/null
+++ b/ossim/include/ossim/util/ossimEquationUtil.h
@@ -0,0 +1,61 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author: Oscar Kramer
+//
+//*************************************************************************
+// $Id: ossimEquationUtil.h 23408 2015-07-07 10:20:17Z okramer $
+
+#ifndef ossimEquationUtil_HEADER
+#define ossimEquationUtil_HEADER
+
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimProcessInterface.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <vector>
+
+class OSSIMDLLEXPORT ossimEquationUtil : public ossimObject,
+                                         public ossimProcessInterface,
+                                         public ossimListenerManager
+{
+public:
+   ossimEquationUtil(ossimArgumentParser& ap);
+   ~ossimEquationUtil() {}
+
+   /**
+    * Returns true if successful
+    */
+   virtual bool execute();
+
+   virtual ossimObject* getObject() { return this; }
+   virtual const ossimObject* getObject() const  { return this; }
+   virtual ossimListenerManager* getManager()  { return this; };
+
+protected:
+   ossimEquationUtil() : m_argumentParser(0) {}
+
+   void addArguments(ossimArgumentParser& ap);
+   void outputTemplateKeywordlist(const ossimFilename &templateFilename);
+   bool parseKwl(const ossimFilename& kwl_file,
+                 std::vector<ossimFilename>& inputs,
+                 ossimString& equationSpec,
+                 ossimFilename& output,
+                 ossimString& writerType);
+   bool initInputSources(std::vector<ossimFilename>& fileList);
+
+   ossimArgumentParser* m_argumentParser;
+   ossimApplicationUsage m_usage;
+   ossimConnectableObject::ConnectableObjectList m_inputSources;
+   ossimRefPtr<ossimImageGeometry> m_prodGeometry;
+};
+
+
+
+
+#endif
diff --git a/ossim/include/ossim/util/ossimFileWalker.h b/ossim/include/ossim/util/ossimFileWalker.h
new file mode 100644
index 0000000..35697c1
--- /dev/null
+++ b/ossim/include/ossim/util/ossimFileWalker.h
@@ -0,0 +1,223 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimFileWalker.h
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:  See description for class below.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimFileWalker_HEADER
+#define ossimFileWalker_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/parallel/ossimJob.h>
+#include <ossim/parallel/ossimJobMultiThreadQueue.h>
+#include <OpenThreads/Mutex>
+#include <string>
+#include <vector>
+
+class ossimFilename;
+class ossimFileProcessorInterface;
+
+/**
+ * @class ossimFileWalker
+ *
+ * Utility class to walk through directories and get a list of files to
+ * process. For each file found the ossimFileProcessorInterface::processFile
+ * method is excecuted.  Internally the processFile calls are placed in a job
+ * queue.
+ *
+ * Typical usage (snip from ossimTiledElevationDatabase):
+ *
+ * ossimFileWalker* fw = new ossimFileWalker();
+ * fw->initializeDefaultFilterList();
+ * fw->setFileProcessor( this ); 
+ * fw->walk(f);
+ */
+class OSSIM_DLL ossimFileWalker
+{
+public:
+   
+   /** default constructor */
+   ossimFileWalker();
+
+   /** destructor */
+   ~ossimFileWalker();
+
+   /**
+    * @brief Takes an array of files.
+    *
+    * For each file in array:  If files is a directory, it will walk it. Files
+    * found in walk or files(not directories) in the array will be processed
+    * via a job queue.
+    *
+    * Files are filter prior to the callback execution.  The filtering is to
+    * eliminate sending unwanted files to the callback.  There is a default
+    * filter table.  This can be edited by calling the non-const
+    * getFilteredExtensions method.
+    *
+    * Each callback is placed in a threaded job queue.  So users should ensure
+    * their callback is thread safe.
+    */
+   void walk(const std::vector<ossimFilename>& files);
+
+   /**
+    * @brief This will walk "root" and execute a callback for each file found.
+    *
+    * Files are filter prior to the callback execution.  The filtering is to
+    * eliminate sending unwanted files to the callback.  There is a default
+    * filter table.  This can be edited by calling the non-const
+    * getFilteredExtensions method.
+    *
+    * Each callback is placed in a threaded job queue.  So users should ensure
+    * their callback is thread safe.
+    */
+   void walk(const ossimFilename& root);
+
+   /**
+    * @brief Sets ossimFileProcessorInterfacecallback method to process files.
+    *
+    * @param fpi ossimFileProcessorInterface pointer
+    */   
+   void setFileProcessor(ossimFileProcessorInterface* fpi);
+
+   /** @return The list of filtered out files. */
+   const std::vector<std::string>& getFilteredExtensions() const;
+
+   /**
+    * @brief Non const method to allow access for
+    * adding or deleting extensions from the list.
+    *
+    * The list is used by the private isFiltered method to avoid trying to
+    * process unwanted files.
+    */
+   std::vector<std::string>& getFilteredExtensions();
+
+   /** @brief Dumps filtered image extenstions to std out. */
+   void dumpFilteredExtensionList() const;
+
+   /**
+    * @brief Initializes the filter list with a default set of filtered out
+    * file names.
+    */
+   void initializeDefaultFilterList();
+
+   /**
+    * @brief Sets recurse flag.
+    *
+    * If set to true this stops recursing of the
+    * current directory.  Defaulted to true in the constructor.
+    * Typically used to indicate the directory being processed holds a
+    * directory based image, e.g. RPF data.
+    *
+    * @param flag True to recurse, false to stop recursion of current
+    * directory.
+    */
+   void setRecurseFlag(bool flag);
+
+   /**
+    * @brief Sets waitOnDir flag.
+    *
+    * If set to true each directory is processed in entirety before sub
+    * directories are recursed.  This allows callers of setRecurseFlag
+    * to disable directory walking.  If your code is calling setRecurseFlag
+    * this flag should be set to true.
+    *
+    * @param flag true to wait, false to not wait. Defaulted to false in the constructor. 
+    */   
+   void setWaitOnDirFlag(bool flag);
+
+   /**
+    * @brief If set to true this stops files walking (aborts).
+    * @param flag True to abort current "walk".
+    */
+   void setAbortFlag(bool flag);
+
+   /** @brief Sets the max number of threads(jobs) to run at one time. */
+   void setNumberOfThreads(ossim_uint32 nThreads);
+   
+private:
+
+   /** @brief Private ossimJob class. */
+   class ossimFileWalkerJob : public ossimJob
+   {
+   public:
+      /**
+       * @brief Constructor that takes file processor pointer and file.
+       * @param fpi ossimFileProcessorInterface pointer
+       * @param file The file to process.
+       */
+      ossimFileWalkerJob(ossimFileProcessorInterface* fpi,
+                         const ossimFilename& file);
+      /**
+       * @brief Defines pure virtual ossimJob::start.
+       *
+       * This executes the call to m_processFileCallBackPtr.
+       */
+      virtual void start();
+      
+   private:
+      ossimFileProcessorInterface* m_fileProcessor;
+      ossimFilename                m_file;
+      
+   }; // End: class ossimFileWalkerJob
+
+   /** @brief Private ossimJobCallback class. */
+   class ossimFileWalkerJobCallback : public ossimJobCallback
+   {
+   public:
+      ossimFileWalkerJobCallback();
+      virtual void started(ossimJob* job);
+      virtual void finished(ossimJob* job);
+      virtual void canceled(ossimJob* job);
+   };
+
+   /**
+    * @brief Processes files in directory.
+    *
+    * If a file in the directory is itself a directory this will do a recursive
+    * call to itself.  Individual files are processed in a job queue...
+    */
+   void walkDir(const ossimFilename& dir);
+   
+   /**
+    * @brief Convenience method for file walker code to check file to see is
+    * it should be processed.
+    *
+    * @param f File to check.
+    * 
+    * @return true if f is in filter list, false if not.
+    */
+   bool isFiltered(const ossimFilename& f) const;
+   
+   /**
+    * @brief isDotFile method.
+    * @param f File/directory to check.
+    * @return true if file is a dot file.
+    */   
+   bool isDotFile(const ossimFilename& f) const;
+   
+   /**
+    * @brief Callback to method to process a file.
+    *
+    * @param const ossimFilename& First parameter(argument) file to process.
+    */
+   ossimFileProcessorInterface*          m_fileProcessor;
+   ossimRefPtr<ossimJobMultiThreadQueue> m_jobQueue;
+   std::vector<std::string>              m_filteredExtensions;
+   bool                                  m_recurseFlag;
+   bool                                  m_waitOnDirFlag;
+   bool                                  m_abortFlag;
+   OpenThreads::Mutex                    m_mutex;
+};
+
+#endif /* #ifndef ossimFileWalker_HEADER */
+
diff --git a/ossim/include/ossim/util/ossimHLZUtil.h b/ossim/include/ossim/util/ossimHLZUtil.h
new file mode 100644
index 0000000..0e6cdb9
--- /dev/null
+++ b/ossim/include/ossim/util/ossimHLZUtil.h
@@ -0,0 +1,182 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author: Oscar Kramer
+//
+//*************************************************************************
+// $Id: ossimHLZUtil.h 23465 2015-08-13 13:36:26Z okramer $
+
+#ifndef ossimHLZUtil_HEADER
+#define ossimHLZUtil_HEADER
+
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimProcessInterface.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimGrect.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimLeastSquaresPlane.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/projection/ossimImageViewProjectionTransform.h>
+#include <ossim/parallel/ossimJob.h>
+#include <ossim/parallel/ossimJobMultiThreadQueue.h>
+#include <ossim/point_cloud/ossimPointCloudHandler.h>
+#include <OpenThreads/ReadWriteMutex>
+#include <vector>
+
+/*!
+ *  Class for finding helicopter landing zones (HLZ) on a DEM given the final destination and max
+ *  range from destination.
+ */
+class OSSIMDLLEXPORT ossimHLZUtil : public ossimObject,
+                                    public ossimProcessInterface,
+                                    public ossimListenerManager
+{
+public:
+   ossimHLZUtil();
+   ~ossimHLZUtil();
+
+   /**
+    * Initializes from command line arguments.
+    */
+   bool parseCommand(ossimArgumentParser& ap);
+
+   /*
+    * Initializes after parameter set-methods have been called (in lieu of argument parser init)
+    */
+   bool initialize();
+
+   void setAoiRadius(const double& meters) { m_aoiRadius = meters; }
+   void setDestinationGpt(const ossimGpt& dest) { m_destinationGpt = dest; }
+   void setRoughnessThreshold(const double& meters) { m_roughnessThreshold = meters; }
+   void setSlopeThreshold(const double& degrees) { m_slopeThreshold = degrees; }
+   void setLZRadiusThreshold(const double& meters) { m_hlzMinRadius = meters; }
+   void setProductGSD(const double& meters_per_pixel);
+   void setOutputFileName(const ossimFilename& fname) { m_productFile = fname; }
+
+   /**
+    * Returns true if successful
+    */
+   virtual bool execute();
+
+   virtual ossimObject* getObject() { return this; }
+   virtual const ossimObject* getObject() const  { return this; }
+   virtual ossimListenerManager* getManager()  { return this; };
+
+   void printApiJson(ostream& out) const;
+
+protected:
+   class MaskSource
+   {
+   public:
+      MaskSource(ossimHLZUtil* hlzUtil, ossimKeywordlist& kwl, ossim_uint32 index);
+      MaskSource(ossimHLZUtil* hlzUtil, const ossimFilename& mask_image);
+      ossimRefPtr<ossimImageSource> image;
+      bool exclude;
+      bool valid;
+   };
+
+   /** @brief Initializes arg parser and outputs usage. */
+   void usage(ossimArgumentParser& ap);
+   void addArguments(ossimArgumentParser& ap);
+   bool loadDemFile();
+   bool loadPcFile();
+   bool loadMaskFiles();
+   bool initProcessingChain();
+   bool initHlzFilter();
+   bool writeFile();
+   void dumpProductSummary() const;
+   void paintReticle();
+   void createInputChain(ossimRefPtr<ossimImageHandler>& handler,
+                         ossimRefPtr<ossimImageSource>& chain);
+   void writeSlopeImage();
+
+   ossimGpt m_destinationGpt;
+   double m_slopeThreshold; // (degrees)
+   double m_roughnessThreshold; // peak deviation from plane (meters)
+   double m_hlzMinRadius; // meters
+   ossimFilename m_demFile;
+   ossimFilename m_pcFile; // optional level-2 point-cloud file
+   ossimFilename m_maskFile; // optional mask specification (may be KWL file with multiple masks)
+   ossimFilename m_slopeFile; // optional byproduct output
+   double m_aoiRadius; // meters
+   ossimRefPtr<ossimImageGeometry> m_productGeom;
+   ossimIrect m_demRect; // rect (in raster coordinates) of the input dem for AOI
+   ossimIrect m_viewRect; // rect (in raster coordinates) of output image.
+   ossimGrect m_gndRect;
+   ossimIpt m_demFilterSize;
+   ossimRefPtr<ossimImageData> m_demBuffer;
+   ossimRefPtr<ossimImageData> m_outBuffer;
+   double m_gsd;
+   ossimDpt m_demGsd;
+   ossimFilename m_productFile;
+   ossim_int32 m_reticleSize;
+   ossimFilename m_lutFile;
+   ossimRefPtr<ossimJobMultiThreadQueue> m_jobMtQueue;
+   bool m_outputSummary;
+   ossim_uint32 m_jobCount;
+
+   ossim_uint8 m_badLzValue;
+   ossim_uint8 m_marginalLzValue;
+   ossim_uint8 m_goodLzValue;
+   ossim_uint8 m_reticleValue;
+   bool m_useLsFitMethod;
+   ossimRefPtr<ossimImageSource> m_combinedElevSource;
+   std::vector< ossimRefPtr<ossimPointCloudHandler> > m_pcSources;
+   OpenThreads::Mutex m_chainMutex;
+   std::vector<MaskSource> m_maskSources;
+
+   // For debugging:
+   ossim_uint32 m_numThreads;
+   double d_accumT;
+
+   class ChipProcessorJob : public ossimJob
+   {
+   public:
+      ChipProcessorJob(ossimHLZUtil* hlzUtil, const ossimIpt& origin, ossim_uint32 chip_id=0);
+
+      virtual void start();
+      virtual bool level1Test() = 0;
+      bool level2Test();
+      bool maskTest();
+
+      ossimHLZUtil* m_hlzUtil;
+      ossimIpt m_demChipUL;
+      ossimIpt m_demChipLR;
+      ossim_uint8 m_status;
+      float m_nullValue;
+
+      // ossim_uint32 m_chipId; // for debug
+      static OpenThreads::ReadWriteMutex m_bufMutex;
+   };
+
+   class LsFitChipProcessorJob : public ChipProcessorJob
+   {
+   public:
+      LsFitChipProcessorJob(ossimHLZUtil* hlzUtil, const ossimIpt& origin, ossim_uint32 chip_id=0)
+         : ChipProcessorJob(hlzUtil, origin, chip_id),
+           m_plane (new ossimLeastSquaresPlane) {}
+
+      ~LsFitChipProcessorJob() { delete m_plane; }
+      virtual bool level1Test();
+      ossimLeastSquaresPlane* m_plane;
+   };
+
+   class NormChipProcessorJob : public ChipProcessorJob
+   {
+   public:
+      NormChipProcessorJob(ossimHLZUtil* hlzUtil, const ossimIpt& origin, ossim_uint32 chip_id=0)
+         : ChipProcessorJob(hlzUtil, origin, chip_id) {}
+
+      virtual bool level1Test();
+   };
+
+};
+
+#endif
diff --git a/ossim/include/ossim/util/ossimImageUtil.h b/ossim/include/ossim/util/ossimImageUtil.h
new file mode 100644
index 0000000..43f726f
--- /dev/null
+++ b/ossim/include/ossim/util/ossimImageUtil.h
@@ -0,0 +1,504 @@
+//----------------------------------------------------------------------------
+// File: ossimImageUtil.h
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: ossimImageUtil
+//
+// See class descriptions below for more.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimImageUtil_HEADER
+#define ossimImageUtil_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimFileProcessorInterface.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimOverviewBuilderBase.h>
+#include <OpenThreads/Mutex>
+#include <ostream>
+#include <vector>
+
+class ossimArgumentParser;
+class ossimFileWalker;
+class ossimGpt;
+class ossimPropertyInterface;
+class ossimApplicationUsage;
+/**
+ * @brief ossimImageUtil class.
+ *
+ * Utility class for processing image recursively.  This is for doing things like:
+ * 
+ * building overview, histograms, compute min/max, extract vertices.
+ */
+class OSSIM_DLL ossimImageUtil :
+   public ossimReferenced, public ossimFileProcessorInterface
+{
+public:
+
+   /** default constructor */
+   ossimImageUtil();
+
+   /** virtual destructor */
+   virtual ~ossimImageUtil();
+
+   void addOptions(ossimApplicationUsage* au);
+   /**
+    * @brief Adds application arguments to the argument parser.
+    * @param ap Parser to add to.
+    */
+   void addArguments(ossimArgumentParser& ap);
+
+   /**
+    * @brief Initial method.
+    *
+    * Typically called from application prior to execute.  This parses
+    * all options and put in keyword list m_kwl.
+    * 
+    * @param ap Arg parser to initialize from.
+    *
+    * @return true, indicating process should continue with execute.
+    */
+   bool initialize(ossimArgumentParser& ap);
+
+   /**
+    * @brief Execute method.
+    *
+    * This launches file walking mechanism.
+    *
+    * @return int, 0 = good, non-zero something happened.  Because this can
+    * process multiple files a non-zero return may indicate just one file
+    * did not complete, e.g. building overviews.
+    * 
+    * @note Throws ossimException on error.
+    */
+   ossim_int32 execute();
+
+   /**
+    * @brief ProcessFile method.
+    *
+    * Satisfies pure virtual ossimFileProcessorInterface::processFile.
+    *
+    * This method is linked to the ossimFileWalker::walk method via a callback
+    * mechanism.  It is called by the ossimFileWalk (caller).  In turn this
+    * class (callee) calls ossimFileWalker::setRecurseFlag and
+    * ossimFileWalker::setAbortFlag to control the waking process.
+    * 
+    * @param file to process.
+    */
+   virtual void processFile(const ossimFilename& file);
+
+   /**
+    * @brief Sets create overviews flag keyword CREATE_OVERVIEWS_KW used by
+    * processFile method.
+    *
+    * @param flag If true overview will be created if image does not already
+    * have the required or if the REBUILD_OVERVIEWS_KW is set.
+    *
+    * @note Number of required overviews is controlled by the ossim preferences
+    * keyword overview_stop_dimension.
+    */
+   void setCreateOverviewsFlag( bool flag );
+
+   /** @return true if CREATE_OVERVIEWS_KW is found and set to true. */
+   bool createOverviews() const;
+   
+   /**
+    * @brief Sets the rebuild overview flag keyword REBUILD_OVERVIEWS_KW used by
+    * processFile method.
+    *
+    * @param flag If true forces a rebuild of overviews even if image has
+    * required number of reduced resolution data sets.
+    *
+    * @note Number of required overviews is controlled by the ossim preferences
+    * keyword overview_stop_dimension.
+    */
+   void setRebuildOverviewsFlag( bool flag );
+
+   /** @return true if REBUILD_OVERVIEWS_KW is found and set to true. */
+   bool rebuildOverviews() const;
+
+   /**
+    * @brief Sets the rebuild histogram flag keyword REBUILD_HISTOGRAM_KW used by
+    * processFile method.
+    *
+    * @param flag If true forces a rebuild of histogram even if image has one already.
+    */
+   void setRebuildHistogramFlag( bool flag );
+
+   /** @return true if REBUILD_HISTOGRAM_KW is found and set to true. */
+   bool rebuildHistogram() const;
+
+   /**
+    * @brief Sets key OVERVIEW_TYPE_KW.
+    *
+    * Available types depens on plugins.  Know types:
+    * ossim_tiff_box ( defualt )
+    * ossim_tiff_nearest
+    * ossim_kakadu_nitf_j2k ( kakadu plugin )
+    * gdal_tiff_nearest	    ( gdal plugin )
+    * gdal_tiff_average	    ( gdal plugin )
+    * gdal_hfa_nearest      ( gdal plugin )	
+    * gdal_hfa_average      ( gdal plugin )	
+    * 
+    * @param type One of the above.
+    */
+   void setOverviewType( const std::string& type );
+   
+   /**
+    * @brief sets the overview stop dimension.
+    *
+    * The overview builder will decimate the image until both dimensions are
+    * at or below this dimension.
+    *
+    * @param dimension
+    *
+    * @note Recommend a power of 2 value, i.e. 8, 16, 32 and so on.
+    */
+   void setOverviewStopDimension( ossim_uint32 dimension );
+   void setOverviewStopDimension( const std::string& dimension );
+
+   /**
+    * @brief Sets the tile size.
+    *
+    * @param tileSize
+    *
+    * @note Must be a multiple of 16, i.e. 64, 128, 256 and so on.
+    */
+   void setTileSize( ossim_uint32 tileSize );
+
+   /**
+    * @return Overview stop dimension or 0 if OVERVIEW_STOP_DIM_KW is not
+    * found.
+    */
+   ossim_uint32 getOverviewStopDimension() const;
+
+   /**
+    * @brief Sets create histogram flag keyword CREATE_HISTOGRAM_KW used by
+    * processFile method.
+    *
+    * @param flag If true a full histogram will be created.
+    */
+   void setCreateHistogramFlag( bool flag );
+   
+   /** @return true if CREATE_HISTOGRAM_KW is found and set to true. */
+   bool createHistogram() const;
+
+   /**
+    * @brief Sets create histogram flag keyword CREATE_HISTOGRAM_FAST_KW used by
+    * processFile method.
+    *
+    * @param flag If true a histogram will be created in fast mode.
+    */
+   void setCreateHistogramFastFlag( bool flag );
+
+   /** @return true if CREATE_HISTOGRAM_FAST_KW is found and set to true. */
+   bool createHistogramFast() const;
+
+   /**
+    * @brief Sets create histogram "R0" flag keyword CREATE_HISTOGRAM_R0_KW used by
+    * processFile method.
+    *
+    * @param flag If true a histogram will be created from R0.
+    */
+   void setCreateHistogramR0Flag( bool flag );
+
+   /** @return true if CREATE_HISTOGRAM_R0_KW is found and set to true. */
+   bool createHistogramR0() const;
+
+   /** @return true if any of the histogram options are set. */
+   bool hasHistogramOption() const;
+
+   /** @return Histogram mode or OSSIM_HISTO_MODE_UNKNOWN if not set. */
+   ossimHistogramMode getHistogramMode() const;
+
+   /**
+    * @brief Sets scan for min/max flag keyword SCAN_MIN_MAX_KW used by
+    * processFile method.
+    *
+    * @param flag If true a file will be scanned for min/max and a file.omd
+    * will be written out.
+    */
+   void setScanForMinMax( bool flag );
+   
+   /** @return true if SCAN_MIN_MAX_KW is found and set to true. */
+   bool scanForMinMax() const;
+
+   /**
+    * @brief Sets scan for min/max/null flag keyword SCAN_MIN_MAX_KW used by
+    * processFile method.
+    *
+    * @param flag If true a file will be scanned for min/max/null and a file.omd
+    * will be written out.
+    */
+   void setScanForMinMaxNull( bool flag );
+
+   /** @return true if SCAN_MIN_MAX_NULL_KW is found and set to true. */
+   bool scanForMinMaxNull() const;
+
+   /**
+    * @brief Sets the writer property for compression quality.
+    *
+    * @param quality For TIFF JPEG takes values from 1
+    * to 100, where 100 is best.  For J2K plugin (if available),
+    * numerically_lossless, visually_lossless, lossy.
+    */
+   void setCompressionQuality( const std::string& quality );
+
+   /**
+    * @brief Sets the compression type to use when building overviews.
+    *  
+    * @param compression_type Current supported types:
+    * - deflate 
+    * - jpeg
+    * - lzw
+    * - none
+    * - packbits
+    */
+   void setCompressionType( const std::string& type );
+
+   /**
+    * @brief Sets the overview builder copy all flag.
+    * @param flag
+    */
+   void setCopyAllFlag( bool flag );
+
+   /**
+    * @return true if COPY_ALL_FLAG_KW key is found and value is true; else,
+    * false.
+    */
+   bool getCopyAllFlag() const;
+
+   /**
+    * @brief Sets the dump filteredImageList flag.
+    * @param flag
+    */
+   void setDumpFilteredImageListFlag( bool flag );
+
+   /**
+    * @return true if DUMP_FILTERED_IMAGES_KW key is found and value is true; else,
+    * false.
+    * 
+    * DUMP_FILTERED_IMAGES_KW = "dump_filtered_images"
+    */
+   bool getDumpFilterImagesFlag() const;
+
+   /**
+    * @brief Sets the overview builder internal overviews flag.
+    * @param flag
+    */
+   void setInternalOverviewsFlag( bool flag );
+
+   /**
+    * @return true if INTERNAL_OVERVIEWS_FLAG_KW key is found and value is true; else,
+    * false.
+    */
+   bool getInternalOverviewsFlag() const;
+   
+   /**
+    * @brief Sets the output directory.  Typically overviews and histograms
+    * are placed parallel to image file.  This overrides.
+    *  
+    * @param directory
+    */
+   void setOutputDirectory( const std::string& directory );
+ 
+   /**
+    * @brief Sets the output file name flag OUTPUT_FILENAMES_KW.
+    *
+    * If set to true all files that we can successfully open will be output.
+    *  
+    * @param flag
+    */
+   void setOutputFileNamesFlag( bool flag );
+
+   /**
+    * @return true if OUTPUT_FILENAMES_KW key is found and value is true; else,
+    * false.
+    */
+   bool getOutputFileNamesFlag() const;
+
+   /**
+    * @brief Sets the override filtered images flag.
+    * @param flag
+    */
+   void setOverrideFilteredImagesFlag( bool flag );
+
+   /**
+    * @return true if DUMP_FILTERED_IMAGES_KW key is found and value is true; else,
+    * false.
+    * 
+    * DUMP_FILTERED_IMAGES_KW = "dump_filtered_images"
+    */
+   bool getOverrideFilteredImagesFlag() const;
+   
+   /**
+    * @brief Set number of threads to use.
+    *
+    * This is only used in execute method if a directory is given to
+    * application to walk.
+    *
+    * @param threads Defaults to 1 if THREADS_KW is not found.
+    */
+   void setNumberOfThreads( ossim_uint32 threads );
+   void setNumberOfThreads( const std::string& threads );
+
+   /** @return The list of filtered out files. */
+   const std::vector<std::string>& getFilteredImages() const;
+
+   /**
+    * @brief Non const method to allow access for
+    * adding or deleting extensions from the list.
+    *
+    * The list is used by the private isFiltered method to avoid trying to
+    * process unwanted files.
+    */
+   std::vector<std::string>& getFilteredImages();
+
+private:
+
+   /** @return true if key is set to true; false, if not. */
+   bool keyIsTrue( const std::string& key ) const;
+
+   /**
+    * @brief Convenience method to check file to see is if file should be
+    * processed.
+    *
+    * @param f File to check.
+    * 
+    * @return true if f is in filter list, false if not.
+    */
+   bool isFiltered(const ossimFilename& f) const;
+   
+   /**
+    * @brief Initializes the filter list with a default set of filtered out
+    * file names.
+    */
+   void initializeDefaultFilterList();
+
+   /** @brief Dumps filtered image list to std out. */
+   void dumpFilteredImageList() const;
+
+   void createOverview(ossimRefPtr<ossimImageHandler>& ih,
+                       bool& consumedHistogramOptions,
+                       bool& consumedCmmOptions);
+
+   void createOverview(ossimRefPtr<ossimImageHandler>& ih,
+                       ossimRefPtr<ossimOverviewBuilderBase>& ob,
+                       ossim_uint32 entry,
+                       bool useEntryIndex,
+                       bool& consumedHistogramOptions);
+
+   /** @return true if entry has required overviews. */
+   bool hasRequiredOverview( ossimRefPtr<ossimImageHandler>& ih,
+                             ossimRefPtr<ossimOverviewBuilderBase>& ob );
+
+   /** @return true if any compute min, max or null options are set. */
+   bool hasCmmOption() const;
+
+   void createHistogram(ossimRefPtr<ossimImageHandler>& ih);
+
+   void createHistogram(ossimRefPtr<ossimImageHandler>& ih,
+                       ossim_uint32 entry,
+                       bool useEntryIndex);
+
+   void computeMinMax(ossimRefPtr<ossimImageHandler>& ih);
+
+   void computeMinMax(ossimRefPtr<ossimImageHandler>& ih,
+                      ossim_uint32 entry,
+                      bool useEntryIndex);
+   
+   /** @brief Initializes arg parser and outputs usage. */
+   void usage(ossimArgumentParser& ap);
+
+   void outputOverviewWriterTypes() const;
+
+   /**
+    * @return true if file is a directory based image and the stager should go
+    * on to next directory; false if stager should continue with directory.
+    */
+   bool isDirectoryBasedImage(const ossimImageHandler* ih) const;
+
+   /**
+    * @brief Initializes type from OVERVIEW_TYPE_KW or sets to default
+    * ossim_tiff_box if not found.
+    */
+   void getOverviewType(std::string& type) const;
+
+   /** @brief set reader or writer properties based on cast of pi. */
+   void setProps(ossimPropertyInterface* pi) const;
+   
+   /**
+    * @return Threads to use.  Defaults to 1 if THREADS_KW is not found.
+    */
+   ossim_uint32 getNumberOfThreads() const;
+
+   /** @return the next writer prop index. */
+   ossim_uint32 getNextWriterPropIndex() const;
+
+   /** @return the next reader prop index. */   
+   ossim_uint32 getNextReaderPropIndex() const;
+
+   /**
+    * @brief Adds option to m_kwl with mutex lock.
+    * @param key
+    * @param value
+    */
+   void addOption( const std::string& key, ossim_uint32 value );
+   void addOption( const std::string& key, const std::string& value );
+
+   /**
+    * @brief Sets the m_errorStatus for return on execute.
+    */
+   void setErrorStatus( ossim_int32 status );
+
+   /** @brief run prep system commands. */
+   void executePrepCommands() const;
+
+   /** @brief run per file system commands. */
+   void executeFileCommands( const ossimFilename& file ) const;
+
+   /** @brief run post system commands. */
+   void executePostCommands() const;
+
+   /** @brief system commands. */
+   void executeCommands( const std::string& prefix,
+                         const ossimFilename& file ) const;
+
+    /** @brief Expands variables in a command string. */
+   void substituteCommandString( const ossimFilename& file,
+                                 const std::string& prefix,
+                                 const std::string& commandKey,
+                                 ossimString& command ) const;
+
+   /** @brief Expands file level variables in a command string. */
+   void substituteFileStrings( const ossimFilename& file,
+                               ossimString& command ) const;
+
+    /** @brief Expands date variables in a command string. */
+   void gsubDate( const std::string& commandPrefix,
+                  ossimString& command ) const;
+   
+   /** Holds all options passed into intialize except writer props. */
+   ossimRefPtr<ossimKeywordlist> m_kwl;
+
+   ossimFileWalker*   m_fileWalker;
+   OpenThreads::Mutex m_mutex;
+
+   ossim_int32 m_errorStatus;
+
+   /** Hold images we never want to process. */
+   std::vector<std::string> m_filteredImages; 
+};
+
+#endif /* #ifndef ossimImageUtil_HEADER */
+
diff --git a/ossim/include/ossim/util/ossimInfo.h b/ossim/include/ossim/util/ossimInfo.h
new file mode 100644
index 0000000..6cc3619
--- /dev/null
+++ b/ossim/include/ossim/util/ossimInfo.h
@@ -0,0 +1,698 @@
+//----------------------------------------------------------------------------
+// File: ossimInfo.h
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: ossimInfo class declaration
+//
+// See class doxygen descriptions below for more.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimInfo.h 23664 2015-12-14 14:17:27Z dburken $
+
+#ifndef ossimInfo_HEADER
+#define ossimInfo_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/imaging/ossimImageHandler.h>
+
+#include <ostream>
+
+class ossimArgumentParser;
+class ossimGpt;
+
+/**
+ * @brief ossimInfo class.
+ *
+ * This is a utility class for getting information from the ossim library.
+ * This includes information from an image, general library queries, like
+ * loaded plugins, and just general stuff like height for point, conversions
+ * and so on that are easily obtained through the library.
+ */
+class OSSIM_DLL ossimInfo : public ossimReferenced
+{
+public:
+
+   /** default constructor */
+   ossimInfo();
+
+   /** virtual destructor */
+   virtual ~ossimInfo();
+
+   /**
+    * @brief Adds application arguments to the argument parser.
+    * @param ap Parser to add to.
+    */
+   void addArguments(ossimArgumentParser& ap);
+
+   /**
+    * @brief Initial method.
+    *
+    * Typically called from application prior to execute.  This parses
+    * all options and put in keyword list m_kwl.
+    * 
+    * @param ap Arg parser to initialize from.
+    *
+    * @return true, indicating process should continue with execute.
+    */
+   bool initialize(ossimArgumentParser& ap);
+
+   /**
+    * @brief execute method.
+    *
+    * Performs the actual dump of information.  This executes any options
+    * set including image operations, i.e. -i -p --dno and so on.
+    * 
+    * @note Throws ossimException on error.
+    */
+   void execute();
+
+   /**
+    * @brief handles image options.
+    *
+    * Handles image type info opions,  i.e. -i -p --dno and so on.
+    *
+    * @return Number of consumed options.
+    */
+   ossim_uint32 executeImageOptions(const ossimFilename& file);
+
+   /**
+    * @brief getImageInfo Method to open image "file" and get image info
+    * in the form of a ossimKeywordlist.
+    *
+    * Flags turn on various pieces of info.  These equate to options in
+    * ossim-info for image information.
+    *
+    * @param file Image file to get information for.
+    * @param dumpFlag      ossim-info -d
+    * @param dnoFlag       ossim-info --dno
+    * @param imageGeomFlag ossim-info -p
+    * @param imageInfoFlag ossim-info -i 
+    * @param metaDataFlag  ossim-info -m 
+    * @param paletteFlag   ossim-info --palette
+    * @param kwl Initialized by this method.
+    */
+   void getImageInfo( const ossimFilename& file,
+                      bool dumpFlag,
+                      bool dnoFlag,
+                      bool imageGeomFlag,
+                      bool imageInfoFlag,
+                      bool metaDataFlag,
+                      bool paletteFlag,
+                      ossimKeywordlist& kwl ) const;
+
+   /**
+    * @brief getImageInfo Method to open image "file" and get image info
+    * for entry in the form of a ossimKeywordlist.
+    *
+    * Equivalent of ossim-info -i -p <image> for entry. 
+    *
+    * Throws ossimException on error if file cannot be opened or entry is
+    * invalid.
+    *
+    * @param file Image file to get information for.
+    * @param entry Entry index to open.
+    * @return true on success, false on error.
+    */
+   bool getImageInfo( const ossimFilename& file,
+                      ossim_uint32 entry,
+                      ossimKeywordlist& kwl ) const;
+   
+   /**
+    * @brief Opens image handler and stores in m_img data member.
+    * @param Image to open.
+    * @note Throws ossimException if image cannot be opened.
+    */
+   void openImage(const ossimFilename& file);
+
+   /** @brief Closes image if open. */
+   void closeImage();
+
+   /**
+    * @return Ref pointer to the image handler.  Can be null if an image is
+    * not open.
+    */
+   ossimRefPtr<ossimImageHandler> getImageHandler();
+
+   /** @brief Dumps the image information from ossimInfoFactoryRegistry */
+   void dumpImage(const ossimFilename& file, bool dnoFlag) const;
+
+   /**
+    * @brief Dumps the image information from ossimInfoFactoryRegistry to
+    * keyword list.
+    * @param file Image to dump.
+    * @param dnoFlag Dump no overviews. If true do not dump overviews.
+    * @param kwl Initialized by this method.
+    */
+   void dumpImage(const ossimFilename& file,
+                  bool dnoFlag,
+                  ossimKeywordlist& kwl) const;
+
+   /**
+    * @brief Prints factories.
+    * @param keywordListFlag If true the result of a saveState will be output
+    * for each factory.
+    * */
+   void printFactories(bool keywordListFlag) const;
+
+   /**
+    * @brief Populates keyword list with metadata.
+    * This requires open image.
+    *
+    * @param kwl Keyword list to populate.
+    */
+   void getImageMetadata(ossimKeywordlist& kwl) const;
+
+   /**
+    * @brief Populates keyword list with palette data.
+    * This requires open image.
+    *
+    * @param kwl Keyword list to populate.
+    */
+   void getImagePalette(ossimKeywordlist& kwl);
+
+   /**
+    * @brief Populates keyword list with general image information.
+    *
+    * This requires open image.
+    *
+    * @param kwl Keyword list to populate.
+    * @param dnoFlag If true no entries flaged as overviews will be output.
+    */
+   void getImageInfo(ossimKeywordlist& kwl, bool dnoFlag);
+
+   /**
+    * @brief Populates keyword list with general image information.
+    *
+    * @param entry Entry number to select.  Note this is the entry number from
+    * the getEntryList call not a simple zero based entry index.
+    * 
+    * @param kwl Keyword list to populate.
+    *
+    * @param dnoFlag If true no entries flaged as overviews will be output.
+    *
+    * This requires open image.
+    *
+    * @return true if entry info was saved to keyword list false if not.
+    */
+   bool getImageInfo(ossim_uint32 entry, ossimKeywordlist& kwl, bool dnoFlag);
+
+   /**
+    * @brief Populates keyword list with image geometry/projection information.
+    *
+    * This requires open image.
+    *
+    * @param kwl Keyword list to populate.
+    * @param dnoFlag If true no entries flaged as overviews will be output.
+    */
+   void getImageGeometryInfo(ossimKeywordlist& kwl, bool dnoFlag);
+
+   /**
+    * @brief Populates keyword list with image geometry/projection information.
+    *
+    * @param entry Entry number to select.  Note this is the entry number
+    * from the getEntryList call not a simple zero based entry index.
+    * 
+    * @param kwl Keyword list to populate.
+    *
+    * @param dnoFlag If true no entries flaged as overviews will be output.
+    *
+    * This requires open image.
+    *
+    * @return true if entry info was saved to keyword list false if not.
+    */
+   bool getImageGeometryInfo( ossim_uint32 entry, 
+                              ossimKeywordlist& kwl, 
+                              bool dnoFlag );
+
+   /**
+    * @brief Populates keyword list with image center point..
+    * @param kwl Keyword list to populate.
+    */
+   void getCenterImage(ossimKeywordlist& kwl);
+
+   /**
+    * @brief Populates keyword list with image center point..
+    * @param entry Entry number to select.  Note this is the entry number
+    * from the getEntryList call not a simple zero based entry index.
+    * @param kwl Keyword list to populate.
+    */
+   void getCenterImage(ossim_uint32 entry, ossimKeywordlist& kwl);
+
+   /**
+    * @brief Populates keyword list with image center ground point..
+    * @param kwl Keyword list to populate.
+    */  
+   void getCenterGround(ossimKeywordlist& kwl);
+
+   /**
+    * @brief Populates keyword list with image center ground point..
+    * @param entry Entry number to select.  Note this is the entry number
+    * from the getEntryList call not a simple zero based entry index.
+    * @param kwl Keyword list to populate.
+    */
+   void getCenterGround(ossim_uint32 entry, ossimKeywordlist& kwl);
+
+   /**
+    * @brief Populates keyword list with up_is_up_angle.
+    *
+    * @param kwl Keyword list to populate.
+    *
+    * This requires open image.
+    */
+   void getUpIsUpAngle(ossimKeywordlist& kwl);
+
+   /**
+    * @brief Populates keyword list with up_is_up_angle.
+    *
+    * @param entry Entry number to select.  Note this is the entry number
+    * from the getEntryList call not a simple zero based entry index.
+    * 
+    * @param kwl Keyword list to populate.
+    *
+    * @param dnoFlag If true no entries flaged as overviews will be output.
+    *
+    * This requires open image.
+    */
+   void getUpIsUpAngle(ossim_uint32 entry, ossimKeywordlist& kwl);
+   
+   /**
+    * @brief Populates keyword list with north_up_angle.
+    *
+    * @param kwl Keyword list to populate.
+    *
+    * This requires open image.
+    */
+   void getNorthUpAngle(ossimKeywordlist& kwl);
+
+   /**
+    * @brief Populates keyword list with north_up_angle.
+    *
+    * @param entry Entry number to select.  Note this is the entry number
+    * from the getEntryList call not a simple zero based entry index.
+    * 
+    * @param kwl Keyword list to populate.
+    *
+    * @param dnoFlag If true no entries flaged as overviews will be output.
+    *
+    * This requires open image.
+    */
+   void getNorthUpAngle(ossim_uint32 entry, ossimKeywordlist& kwl);
+   
+   /**
+    * @brief Populates keyword list with image rectangle.
+    *
+    * This requires open image.
+    *
+    * @param kwl Keyword list to populate.
+    */
+   void getImageRect(ossimKeywordlist& kwl);
+
+   /**
+    * @brief Populates keyword list with image rectangle.
+    *
+    * @param entry Entry number to select.  Note this is the entry number from
+    * the getEntryList call not a simple zero based entry index.
+    * 
+    * @param kwl Keyword list to populate.
+    *
+    * This requires open image.
+    */
+   void getImageRect(ossim_uint32 entry, ossimKeywordlist& kwl);
+
+   /**
+    * @return true if current open image entry is an overview.
+    */
+   bool isImageEntryOverview() const;
+
+   /** @brief Dumps ossim preferences/configuration data. */
+   void printConfiguration() const;
+
+   /**
+    * @brief Dumps ossim preferences/configuration data.
+    * @param out Output to write to.
+    * @return stream
+    */
+   std::ostream& printConfiguration(std::ostream& out) const;
+
+   /** @brief Dumps datum list to stdout. */
+   void printDatums() const;
+
+   /** @brief Dumps datum list to stream. */
+   std::ostream& printDatums(std::ostream& out) const;
+
+   /** @brief Converts degrees to radians and outputs to stdout. */
+   void deg2rad(const ossim_float64& degrees) const;
+
+   /**
+    * @brief Converts degrees to radians and outputs to stream.
+    * @param out Output to write to.
+    * @return stream
+    */
+   std::ostream& deg2rad(const ossim_float64& degrees, std::ostream& out) const;
+
+   /** @brief Converts radians to degrees and outputs to stdout. */
+   void rad2deg(const ossim_float64& radians) const;
+
+   /**
+    * @brief Converts radians to degrees and outputs to stream. 
+    * @param out Output to write to.
+    * @return stream
+    */
+   std::ostream& rad2deg(const ossim_float64& radians, std::ostream& out) const;
+
+   /** @brief Converts feet to meters and outputs to stdout. */
+   void ft2mtrs(const ossim_float64& feet, bool us_survey) const;
+
+   /**
+    * @brief Converts feet to meters and outputs to stream.
+    * @param out Output to write to out.
+    * @return stream
+    */
+   std::ostream& ft2mtrs(const ossim_float64& feet, bool us_survey, std::ostream& out) const;
+
+   /** @brief Converts meters to feet and outputs to stdout. */
+   void mtrs2ft(const ossim_float64& meters, bool us_survey) const;
+
+   /**
+    * @brief Converts meters to feet and outputs to stream.
+    * @param out Output to write to out.
+    * @return stream
+    */   
+   std::ostream& mtrs2ft(const ossim_float64& meters, bool us_survey, std::ostream& out) const;
+
+   /**
+    * @brief Get meters per degree for a given latitude and outputs to stdout.
+    * @param latitude
+    */
+   void mtrsPerDeg(const ossim_float64& latitude) const;
+
+   /**
+    * @brief Get meters per degree for a given latitude and outputs to stream.
+    * @param latitude
+    * @param out Output to write to out.
+    * @return stream
+    */   
+   std::ostream& mtrsPerDeg(const ossim_float64& latitude, std::ostream& out) const;
+
+   /**
+    * @brief Gets the height for ground point (latitude, longitude). Outputs
+    * to stdout.
+    * @param gpt Ground point.
+    */
+   void outputHeight(const ossimGpt& gpt) const;
+
+   /**
+    * @brief Gets the height for ground point (latitude, longitude). Outputs
+    * to out.
+    * @param out Output to write to out.
+    * @return stream
+    */
+   std::ostream& outputHeight(const ossimGpt& gpt, std::ostream& out) const;
+
+   /** @brief Prints loaded plugins to stdout. */
+   void printPlugins() const;
+
+   /**
+    * @brief Prints loaded plugins to stream.
+    * @param out Output to write to out.
+    * @return stream
+    */
+   std::ostream& printPlugins(std::ostream& out) const;
+
+   /**
+    * @brief Test a plugin load  and outputs to stdout.
+    * 
+    * @param plugin Plugin to test.
+    */
+   void testPlugin(const ossimFilename& plugin) const;
+
+   /**
+    * @brief Test a plugin load outputs to stream.
+    * 
+    * @param plugin Plugin to test.
+    * @param out Stream to write to.
+    * @param stream
+    */
+   std::ostream& testPlugin(const ossimFilename& plugin, std::ostream& out) const;
+
+   /** @brief Prints overview types to stdout. */
+   void printOverviewTypes() const;
+
+   /** @brief Prints overview types to stream. */
+   std::ostream& printOverviewTypes(std::ostream& out) const;
+
+   /** @breif Prints projections to stdout. */
+   void printProjections() const;
+
+   /** @breif Prints projections to stream. */
+   std::ostream& printProjections(std::ostream& out) const;
+
+   /** @brief Prints reader properties to stdout. */
+   void printReaderProps() const;
+
+   /** @brief Prints reader properties to stream. */
+   std::ostream& printReaderProps(std::ostream& out) const;
+
+   /** @brief Prints resampler filters to stdout. */
+   void printResamplerFilters() const;
+
+   /** @brief Prints resampler filters to stream. */
+   std::ostream& printResamplerFilters(std::ostream& out) const;
+
+   /** @brief Prints list of available writers to stdout. */
+   void printWriters() const;
+
+   /** @brief Prints list of available writers to stream. */
+   std::ostream& printWriters(std::ostream& out) const;
+
+   /** @brief Prints writer properties to stdout. */
+   void printWriterProps() const;
+
+   /** @brief Prints writer properties to stream. */
+   std::ostream& printWriterProps(std::ostream& out) const;
+
+   /** @brief Prints zoom levels to stdout. */
+   void printZoomLevelGsds() const;
+
+   /** @brief Prints zoom levels to stream. */
+   std::ostream& printZoomLevelGsds(std::ostream& out) const;
+
+   /**
+    * @brief Gets the radiometry string, i.e. "8-bit" and so on, from scalar.
+    * @param scalar Scalar type.
+    * @param s String to initialize.
+    */
+   void getRadiometry(ossimScalarType scalar, std::string& s) const;
+
+   /**
+    * @brief Gets build date.
+    * @param s String to initialize.
+    */
+   void getBuildDate(std::string& s) const;
+
+   /**
+    * @brief Gets revision number.
+    * @param s String to initialize.
+    */
+   void getRevisionNumber(std::string& s) const;
+
+   /**
+    * @brief Gets version.
+    * @param s String to initialize.
+    */
+   void getVersion(std::string& s) const;
+   
+private:
+ 
+   /**
+    * @brief Populates keyword list with metadata.
+    * @param ih Pointer to an image handler.
+    * @param kwl Keyword list to populate.
+    */
+   void getImageMetadata( const ossimImageHandler* ih, 
+                          ossimKeywordlist& kwl ) const;
+ 
+  /**
+   * @brief Populates keyword list with palette data.
+   * @param ih Pointer to an image handler.
+   * @param kwl Keyword list to populate.
+   */
+   void getImagePalette( ossimImageHandler* ih, 
+                         ossimKeywordlist& kwl ) const;
+  
+   /**
+    * @brief Populates keyword list with general image information.
+    * @param ih Pointer to an image handler.
+    * @param kwl Keyword list to populate.
+    * @param dnoFlag If true no entries flaged as overviews will be output.
+    */
+   void getImageInfo( ossimImageHandler* ih, 
+                      ossimKeywordlist& kwl, 
+                      bool dnoFlag ) const;
+
+   /**
+    * @brief Populates keyword list with general image information.
+    * @param ih Pointer to an image handler.
+    * @param entry Entry number to select.  Note this is the entry number from
+    * the getEntryList call not a simple zero based entry index.
+    * @param kwl Keyword list to populate.
+    * @param dnoFlag If true no entries flaged as overviews will be output.
+    * @return true if entry info was saved to keyword list false if not.
+    */
+   bool getImageInfo( ossimImageHandler* ih, 
+                      ossim_uint32 entry, 
+                      ossimKeywordlist& kwl, 
+                      bool dnoFlag ) const;
+   
+   /**
+    * @brief Populates keyword list with image geometry/projection information.
+    * @param ih Pointer to an image handler.
+    * @param kwl Keyword list to populate.
+    * @param dnoFlag If true no entries flaged as overviews will be output.
+    */
+   void getImageGeometryInfo( ossimImageHandler* ih,
+                              ossimKeywordlist& kwl, 
+                              bool dnoFlag ) const;
+
+   /**
+    * @brief Populates keyword list with image geometry/projection information.
+    * @param ih Pointer to an image handler.
+    * @param entry Entry number to select.  Note this is the entry number
+    * from the getEntryList call not a simple zero based entry index.
+    * @param kwl Keyword list to populate.
+    * @param dnoFlag If true no entries flaged as overviews will be output.
+    * @return true if entry info was saved to keyword list false if not.
+    */
+   bool getImageGeometryInfo( ossimImageHandler* ih,
+                              ossim_uint32 entry, 
+                              ossimKeywordlist& kwl, 
+                              bool dnoFlag ) const;
+
+   void getCenterImage( ossimImageHandler* ih,
+                        ossimKeywordlist& kwl ) const;
+   void getCenterImage( ossimImageHandler* ih,
+                        ossim_uint32 entry, 
+                        ossimKeywordlist& kwl ) const;
+   void getCenterGround( ossimImageHandler* ih,
+                         ossimKeywordlist& kwl ) const;
+   void getCenterGround( ossimImageHandler* ih,
+                         ossim_uint32 entry, 
+                         ossimKeywordlist& kwl ) const;
+
+   /**
+    * @brief Populates keyword list with up_is_up_angle.
+    * @param kwl Keyword list to populate.
+    */
+   void getUpIsUpAngle( ossimImageHandler* ih,
+                        ossimKeywordlist& kwl ) const;
+
+   /**
+    * @brief Populates keyword list with up_is_up_angle.
+    * @param entry Entry number to select.  Note this is the entry number from
+    * the getEntryList call not a simple zero based entry index.
+    * @param kwl Keyword list to populate.
+    */  
+   void getUpIsUpAngle( ossimImageHandler* ih,
+                        ossim_uint32 entry, 
+                        ossimKeywordlist& kwl ) const;
+   
+  /**
+    * @brief Populates keyword list with north_up_angle.
+    * @param kwl Keyword list to populate.
+    */
+   void getNorthUpAngle( ossimImageHandler* ih,
+                         ossimKeywordlist& kwl ) const;
+
+   /**
+    * @brief Populates keyword list with north_up_angle.
+    * @param entry Entry number to select.  Note this is the entry number from
+    * the getEntryList call not a simple zero based entry index.
+    * @param kwl Keyword list to populate.
+    */  
+   void getNorthUpAngle( ossimImageHandler* ih,
+                         ossim_uint32 entry, 
+                         ossimKeywordlist& kwl ) const;
+
+   /**
+    * @brief Populates keyword list with image rectangle.
+    *
+    * @param kwl Keyword list to populate.
+    */
+   void getImageRect( ossimImageHandler* ih,
+                      ossimKeywordlist& kwl ) const;
+
+   /**
+    * @brief Populates keyword list with image rectangle.
+    * @param entry Entry number to select.  Note this is the entry number from
+    * the getEntryList call not a simple zero based entry index.
+    * @param kwl Keyword list to populate.
+    */
+   void getImageRect( ossimImageHandler* ih,
+                      ossim_uint32 entry, 
+                      ossimKeywordlist& kwl ) const;
+
+   /**
+    * @brief Populates keyword list with rgb bands if available.
+    *
+    * This is image handler specific and within image handler specific to
+    * internal metadata, e.g. NITF IREPBAND keys.
+    *
+    * Example of key:value:
+    * rgb_bands:(2,1,0)
+    *
+    * @param ih Pointer to image handler.
+    * @param entry Current entry of image handler.
+    * @param kwl Keyword list to populate.
+    * @return true on success; false, on error.
+    */
+   bool getRgbBands( ossimImageHandler* ih,
+                     ossim_uint32 entry,
+                     ossimKeywordlist& kwl ) const;
+
+   /** @return true if current open image entry is an overview. */
+   bool isImageEntryOverview( const ossimImageHandler* ih ) const;
+
+   /**
+    * @brief Convert keyword list to xml then outputs to standard out.
+    * @param kwl Keyword list to output.
+    */
+   void outputXml( const ossimKeywordlist& kwl ) const;
+   
+   /**
+    * @brief Convert keyword list to xml then outputs to file.
+    * @param kwl Keyword list to output.
+    * @param file Output file to write to.
+    */
+   void outputXml( const ossimKeywordlist& kwl, const ossimFilename& file ) const;
+  
+  /**
+   * @brief Opens image.
+   * @param Image to open.
+   * @return ossimRefPtr with image handler.
+   * @note Throws ossimException if image cannot be opened.
+   */
+   ossimRefPtr<ossimImageHandler> openImageHandler(const ossimFilename& file) const;
+   
+   /** @brief Initializes arg parser and outputs usage. */
+   void usage(ossimArgumentParser& ap);
+
+   /** @return true if key is set to true; false, if not. */
+   bool keyIsTrue( const std::string& key ) const;
+
+   /** Hold all options passed into intialize except writer props. */
+   ossimRefPtr<ossimKeywordlist> m_kwl;
+
+   /** Holds the open image. */
+   ossimRefPtr<ossimImageHandler> m_img;
+};
+
+#endif /* #ifndef ossimInfo_HEADER */
+
diff --git a/ossim/include/ossim/util/ossimRpfUtil.h b/ossim/include/ossim/util/ossimRpfUtil.h
new file mode 100644
index 0000000..bd1de12
--- /dev/null
+++ b/ossim/include/ossim/util/ossimRpfUtil.h
@@ -0,0 +1,86 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:  ossimRpfUtil.h
+// 
+// Utility class to stuff with rpf files.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef ossimRpfUtil_HEADER
+#define ossimRpfUtil_HEADER 1
+
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/imaging/ossimImageGeometry.h> 
+
+class ossimFilename;
+class ossimGpt;
+class ossimRpfToc;
+class ossimRpfTocEntry;
+
+class OSSIM_DLL ossimRpfUtil : public ossimReferenced
+{
+public:
+
+   /** @brief default constructor */
+   ossimRpfUtil();
+
+
+   /**
+    * @brief Write dot rpf file(s) to output directory from a.toc file.
+    *
+    * This creates a dot rpf file for each entry.
+    *
+    * @param aDotFile The a.toc file.
+    *
+    * @param outputDir Directory to write dot rpf file(s) to.
+    *
+    * throws ossimException on error.
+    */
+   void writeDotRpfFiles( const ossimFilename& aDotTocFile,
+                          const ossimFilename& outputDir);
+
+   void writeDotRpfFile( const ossimRpfToc* toc,
+                         const ossimRpfTocEntry* tocEntry,
+                         const ossimFilename& outputDir,
+                         ossim_uint32 entry);
+
+protected:
+
+   /**
+    * @brief protected virtual destructor
+    *
+    * Do not call directly.  Use as a ref ptr.
+    */
+   virtual ~ossimRpfUtil();
+
+private:
+
+   /**
+    * @brief Method to test for 360 spread, 180.0 <--> 180.00 and set
+    * leftLon to -180 if both left and right are 180.0 degrees.
+    *
+    * This adds a small tolerance to the test.
+    * 
+    * @param left Left hand side of scene.  This is the value
+    * that will be flipped to -180 if test is true.
+    *
+    * @param right Right hand side of scene.
+    */
+   void checkLongitude(ossimGpt& left, ossimGpt& right) const;
+
+   /** @brief Method to get the file for entry. */
+   void getDotRfpFilenameForEntry(const ossimFilename& outputDir,
+                                  ossim_uint32 entry,
+                                  ossimFilename& outFile) const;
+   
+}; // Matches: class ossimRpfUtil
+
+#endif /* #ifndef ossimRpfUtil_HEADER */
+
diff --git a/ossim/include/ossim/util/ossimSlopeUtil.h b/ossim/include/ossim/util/ossimSlopeUtil.h
new file mode 100644
index 0000000..fc073d3
--- /dev/null
+++ b/ossim/include/ossim/util/ossimSlopeUtil.h
@@ -0,0 +1,67 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author: Oscar Kramer
+//
+//*************************************************************************
+// $Id: ossimSlopeUtil.h 23443 2015-07-17 15:57:00Z okramer $
+
+#ifndef ossimSlopeUtil_HEADER
+#define ossimSlopeUtil_HEADER
+
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimProcessInterface.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ostream>
+
+/*!
+ *  Class for computing the slope on each elevation post and generatinga corresponding slope image.
+ *  The output scalar type is a normalized float unless unsigned 8-bit is selected via the options.
+ */
+class OSSIMDLLEXPORT ossimSlopeUtil : public ossimObject,
+                                      public ossimProcessInterface,
+                                      public ossimListenerManager
+{
+public:
+   ossimSlopeUtil();
+   ~ossimSlopeUtil();
+
+   /**
+    * Initializes from command line arguments.
+    */
+   bool initialize(ossimArgumentParser& ap);
+
+   /**
+    * Returns true if successful
+    */
+   virtual bool execute();
+
+   virtual ossimObject* getObject() { return this; }
+   virtual const ossimObject* getObject() const  { return this; }
+   virtual ossimListenerManager* getManager()  { return this; };
+
+   void printApiJson(std::ostream& out) const;
+
+protected:
+   bool initializeChain();
+   bool loadDemFile();
+   bool loadElevDb();
+   void usage(ossimArgumentParser& ap);
+   void addArguments(ossimArgumentParser& ap);
+   bool writeJsonApi(const ossimFilename& outfile);
+
+   ossimFilename m_demFile;
+   ossimFilename m_slopeFile;
+   ossimFilename m_lutFile;
+   ossimGpt m_centerGpt;
+   double m_aoiRadius; // meters
+   bool m_remapToByte;
+   ossimRefPtr<ossimImageSource> m_procChain;
+};
+
+#endif
diff --git a/ossim/include/ossim/util/ossimViewshedUtil.h b/ossim/include/ossim/util/ossimViewshedUtil.h
new file mode 100644
index 0000000..913f344
--- /dev/null
+++ b/ossim/include/ossim/util/ossimViewshedUtil.h
@@ -0,0 +1,198 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author: Oscar Kramer
+//
+//*************************************************************************
+// $Id: ossimViewshedUtil.h 23409 2015-07-08 16:24:41Z okramer $
+
+#ifndef ossimViewshedUtil_HEADER
+#define ossimViewshedUtil_HEADER
+
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimProcessInterface.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/parallel/ossimJob.h>
+#include <ossim/parallel/ossimJobMultiThreadQueue.h>
+#include <OpenThreads/ReadWriteMutex>
+
+/*!
+ *  Class for computing the viewshed on a DEM given the viewer location and max range of visibility
+ */
+
+class OSSIMDLLEXPORT ossimViewshedUtil : public ossimObject,
+                                         public ossimProcessInterface,
+                                         public ossimListenerManager
+{
+   friend class SectorProcessorJob;
+   friend class RadialProcessorJob;
+   friend class RadialProcessor;
+
+public:
+   ossimViewshedUtil();
+   ~ossimViewshedUtil();
+
+   /**
+    * Initializes from command line arguments.
+    */
+   bool initialize(ossimArgumentParser& ap);
+
+   /*
+    * Initializes after parameter set-methods have been called (in lieu of argument parser init)
+    */
+   bool initialize();
+
+   /**
+    * Directly assigns the maximum visibility radius property (in meters).
+    */
+   void setVisibilityRadius(const double& radius) { m_visRadius = radius; }
+
+   /**
+    * Directly assigns the observer's ground point property.
+    */
+   void setObserverGpt(const ossimGpt& vpt) { m_observerGpt = vpt; }
+
+   void setOutputFileName(const ossimFilename& fname) { m_filename = fname; }
+
+   /**
+    * Sets the nominal output resolution in meters
+    */
+   void setGSD(const double& meters_per_pixel);
+
+   /**
+    * Sets the boundary azimuths in degrees for the field-of-view (clockwise from start to stop)
+    */
+   void setFOV(const double& start_deg, const double& stop_deg);
+
+   /**
+    * Returns true if successful
+    */
+   virtual bool execute();
+
+   virtual ossimObject* getObject() { return this; }
+   virtual const ossimObject* getObject() const  { return this; }
+   virtual ossimListenerManager* getManager()  { return this; };
+
+   void printApiJson(ostream& out) const;
+
+protected:
+   class Radial
+   {
+   public:
+      Radial() : azimuth (0), elevation (-99999999.0) {}
+      Radial (const double& az) : azimuth (az), elevation (-99999999.0) {}
+
+      // Angles are stored as arctangents: azimuth = dy/dx,  elevation = dz/dx
+      double azimuth;
+      double elevation;
+   };
+
+   /** @brief Initializes arg parser and outputs usage. */
+   void usage(ossimArgumentParser& ap);
+   void addArguments(ossimArgumentParser& ap);
+   bool writeFile();
+   void dumpProductSummary() const;
+   void paintReticle();
+   void initRadials();
+   bool writeHorizonProfile();
+   bool writeJsonApi(const ossimFilename& outfile);
+
+   ossimGpt  m_observerGpt;
+   ossimFilename m_demFile;
+   double m_obsHgtAbvTer; // meters above the terrain
+   double m_visRadius; // meters
+   Radial** m_radials;
+   ossimRefPtr<ossimImageGeometry> m_geometry;
+   bool m_initialized;
+   ossimIrect m_viewRect;
+   ossim_uint32 m_halfWindow; // visRadius adjusted by GSD (in pixels)
+   ossimRefPtr<ossimImageData> m_outBuffer;
+   double m_gsd;
+   ossimFilename m_filename;
+   ossim_uint8 m_visibleValue;
+   ossim_uint8 m_hiddenValue;
+   ossim_uint8 m_observerValue;
+   ossim_int32 m_reticleSize;
+   ossimFilename m_lutFile;
+   bool m_simulation;
+   ossimRefPtr<ossimJobMultiThreadQueue> m_jobMtQueue;
+   ossim_uint32 m_numThreads;
+   bool m_outputSummary;
+   double m_startFov;
+   double m_stopFov;
+   bool m_threadBySector;
+   ossimFilename m_horizonFile;
+   std::map<double, double> m_horizonMap;
+
+   // For debugging:
+   double d_accumT;
+   OpenThreads::Mutex d_mutex;
+};
+
+/**
+ * For support of multithreading. The --tbs option directs ossimViewshedUtil to create a thread
+ * for each sector (using the SectorProcessorJob). Otherwise, the threads are mapped to a single
+ * radial. There are 8 sectors total (45 deg each) so a max of 8 threads are launched. Thus it may
+ * be faster to use the RadialProcessorJob scheme (default) when the number of available cores > 8.
+ */
+class SectorProcessorJob : public ossimJob
+{
+   friend class ossimViewshedUtil;
+
+private:
+   SectorProcessorJob(ossimViewshedUtil* vs_util, ossim_uint32 sector, ossim_uint32 numRadials)
+   : m_vsUtil (vs_util), m_sector (sector), m_numRadials (numRadials)  {}
+
+   virtual void start();
+
+   ossimViewshedUtil* m_vsUtil;
+   ossim_uint32 m_sector;
+   ossim_uint32 m_numRadials;
+};
+
+
+class RadialProcessorJob : public ossimJob
+{
+   friend class ossimViewshedUtil;
+
+private:
+   RadialProcessorJob(ossimViewshedUtil* vs_util,
+                      ossim_uint32 sector,
+                      ossim_uint32 radial,
+                      ossim_uint32 numRadials)
+   : m_vsUtil (vs_util), m_sector (sector), m_radial (radial), m_numRadials (numRadials) {}
+
+   virtual void start();
+
+   ossimViewshedUtil* m_vsUtil;
+   ossim_uint32 m_sector;
+   ossim_uint32 m_radial;
+   ossim_uint32 m_numRadials;
+};
+
+/**
+ * This class provides a common entry point for both SectorProcessorJob and RadialProcessorJob for
+ * processing a single radial. Eventually, SectorProcessorJob can likely go away (invoked with the
+ * "--tbs" command-line option, and doRadial() method can be moved into RadialProcessorJob class.
+ * In the meantime, both Sector/thread and Radial/thread schemes are supported to continue
+ * evaluating performance.
+ */
+class RadialProcessor
+{
+public:
+   static void doRadial(ossimViewshedUtil* vs, ossim_uint32 s, ossim_uint32 r);
+
+private:
+   static OpenThreads::ReadWriteMutex m_bufMutex;
+   static OpenThreads::ReadWriteMutex m_radMutex;
+   RadialProcessor() {};
+};
+
+#endif
diff --git a/include/ossim/vec/ossimVpfBoundingRecordTable.h b/ossim/include/ossim/vec/ossimVpfBoundingRecordTable.h
similarity index 100%
rename from include/ossim/vec/ossimVpfBoundingRecordTable.h
rename to ossim/include/ossim/vec/ossimVpfBoundingRecordTable.h
diff --git a/include/ossim/vec/ossimVpfCoverage.h b/ossim/include/ossim/vec/ossimVpfCoverage.h
similarity index 100%
rename from include/ossim/vec/ossimVpfCoverage.h
rename to ossim/include/ossim/vec/ossimVpfCoverage.h
diff --git a/include/ossim/vec/ossimVpfDatabase.h b/ossim/include/ossim/vec/ossimVpfDatabase.h
similarity index 100%
rename from include/ossim/vec/ossimVpfDatabase.h
rename to ossim/include/ossim/vec/ossimVpfDatabase.h
diff --git a/include/ossim/vec/ossimVpfDatabaseHeader.h b/ossim/include/ossim/vec/ossimVpfDatabaseHeader.h
similarity index 100%
rename from include/ossim/vec/ossimVpfDatabaseHeader.h
rename to ossim/include/ossim/vec/ossimVpfDatabaseHeader.h
diff --git a/ossim/include/ossim/vec/ossimVpfDatabaseHeaderTableValidator.h b/ossim/include/ossim/vec/ossimVpfDatabaseHeaderTableValidator.h
new file mode 100644
index 0000000..8290f4e
--- /dev/null
+++ b/ossim/include/ossim/vec/ossimVpfDatabaseHeaderTableValidator.h
@@ -0,0 +1,18 @@
+//-----------------------------------------------------------------
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//-----------------------------------------------------------------
+#ifndef ossimVpfDatabaseHeaderTableValidator_HEADER
+#define ossimVpfDatabaseHeaderTableValidator_HEADER
+#include <ossim/vec/ossimVpfTableValidator.h>
+class ossimVpfTable;
+class ossimVpfDatabaseHeaderTableValidator : public ossimVpfTableValidator
+{
+public:
+   virtual ~ossimVpfDatabaseHeaderTableValidator();
+   virtual bool isValid(ossimVpfTable& aTable)const;
+};
+
+#endif
+
diff --git a/include/ossim/vec/ossimVpfExtent.h b/ossim/include/ossim/vec/ossimVpfExtent.h
similarity index 100%
rename from include/ossim/vec/ossimVpfExtent.h
rename to ossim/include/ossim/vec/ossimVpfExtent.h
diff --git a/include/ossim/vec/ossimVpfFeatureClass.h b/ossim/include/ossim/vec/ossimVpfFeatureClass.h
similarity index 100%
rename from include/ossim/vec/ossimVpfFeatureClass.h
rename to ossim/include/ossim/vec/ossimVpfFeatureClass.h
diff --git a/include/ossim/vec/ossimVpfFeatureClassSchema.h b/ossim/include/ossim/vec/ossimVpfFeatureClassSchema.h
similarity index 100%
rename from include/ossim/vec/ossimVpfFeatureClassSchema.h
rename to ossim/include/ossim/vec/ossimVpfFeatureClassSchema.h
diff --git a/include/ossim/vec/ossimVpfLibrary.h b/ossim/include/ossim/vec/ossimVpfLibrary.h
similarity index 100%
rename from include/ossim/vec/ossimVpfLibrary.h
rename to ossim/include/ossim/vec/ossimVpfLibrary.h
diff --git a/include/ossim/vec/ossimVpfLibraryAttributeTableValidator.h b/ossim/include/ossim/vec/ossimVpfLibraryAttributeTableValidator.h
similarity index 100%
rename from include/ossim/vec/ossimVpfLibraryAttributeTableValidator.h
rename to ossim/include/ossim/vec/ossimVpfLibraryAttributeTableValidator.h
diff --git a/include/ossim/vec/ossimVpfTable.h b/ossim/include/ossim/vec/ossimVpfTable.h
similarity index 100%
rename from include/ossim/vec/ossimVpfTable.h
rename to ossim/include/ossim/vec/ossimVpfTable.h
diff --git a/ossim/include/ossim/vec/ossimVpfTableValidator.h b/ossim/include/ossim/vec/ossimVpfTableValidator.h
new file mode 100644
index 0000000..f67c65c
--- /dev/null
+++ b/ossim/include/ossim/vec/ossimVpfTableValidator.h
@@ -0,0 +1,19 @@
+//-----------------------------------------------------------------
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//-----------------------------------------------------------------
+#ifndef ossimVpfTableValidator_HEADER
+#define ossimVpfTableValidator_HEADER
+
+class ossimVpfTable;
+
+class ossimVpfTableValidator
+{
+public:
+   virtual ~ossimVpfTableValidator(){}
+   virtual bool isValid(ossimVpfTable& aTable)const=0;
+};
+
+#endif
+
diff --git a/ossim/include/ossim/vec/vpf.h b/ossim/include/ossim/vec/vpf.h
new file mode 100644
index 0000000..fca5635
--- /dev/null
+++ b/ossim/include/ossim/vec/vpf.h
@@ -0,0 +1,36 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+// Description: This class give the capability to access tiles from an
+//              vpf file.
+//
+//********************************************************************
+// $Id: vpf.h 23664 2015-12-14 14:17:27Z dburken $
+#ifndef VPF_HEADER
+#define VPF_HEADER
+
+#include <ossim/ossimConfig.h>
+
+#if __OSSIM_CARBON__
+#define MAXINT INT_MAX
+#endif
+
+extern "C"
+{
+#include <ossim/vpfutil/vpfapi.h>
+#include <ossim/vpfutil/vpfview.h>
+#include <ossim/vpfutil/vpfselec.h>
+#include <ossim/vpfutil/vpftable.h>
+#include <ossim/vpfutil/vpfprim.h>
+#include <ossim/vpfutil/vpfmisc.h>
+#include <ossim/vpfutil/vpfdisp.h>
+}
+
+#endif
+
diff --git a/include/ossim/video/ossimVideoGeometry.h b/ossim/include/ossim/video/ossimVideoGeometry.h
similarity index 100%
rename from include/ossim/video/ossimVideoGeometry.h
rename to ossim/include/ossim/video/ossimVideoGeometry.h
diff --git a/include/ossim/video/ossimVideoHandler.h b/ossim/include/ossim/video/ossimVideoHandler.h
similarity index 100%
rename from include/ossim/video/ossimVideoHandler.h
rename to ossim/include/ossim/video/ossimVideoHandler.h
diff --git a/include/ossim/video/ossimVideoImageHandler.h b/ossim/include/ossim/video/ossimVideoImageHandler.h
similarity index 100%
rename from include/ossim/video/ossimVideoImageHandler.h
rename to ossim/include/ossim/video/ossimVideoImageHandler.h
diff --git a/include/ossim/video/ossimVideoImageSource.h b/ossim/include/ossim/video/ossimVideoImageSource.h
similarity index 100%
rename from include/ossim/video/ossimVideoImageSource.h
rename to ossim/include/ossim/video/ossimVideoImageSource.h
diff --git a/include/ossim/video/ossimVideoSource.h b/ossim/include/ossim/video/ossimVideoSource.h
similarity index 100%
rename from include/ossim/video/ossimVideoSource.h
rename to ossim/include/ossim/video/ossimVideoSource.h
diff --git a/include/ossim/vpfutil/linklist.h b/ossim/include/ossim/vpfutil/linklist.h
similarity index 100%
rename from include/ossim/vpfutil/linklist.h
rename to ossim/include/ossim/vpfutil/linklist.h
diff --git a/include/ossim/vpfutil/machine.h b/ossim/include/ossim/vpfutil/machine.h
similarity index 100%
rename from include/ossim/vpfutil/machine.h
rename to ossim/include/ossim/vpfutil/machine.h
diff --git a/include/ossim/vpfutil/mapgraph.h b/ossim/include/ossim/vpfutil/mapgraph.h
similarity index 100%
rename from include/ossim/vpfutil/mapgraph.h
rename to ossim/include/ossim/vpfutil/mapgraph.h
diff --git a/include/ossim/vpfutil/polygrf.h b/ossim/include/ossim/vpfutil/polygrf.h
similarity index 100%
rename from include/ossim/vpfutil/polygrf.h
rename to ossim/include/ossim/vpfutil/polygrf.h
diff --git a/include/ossim/vpfutil/projectn.h b/ossim/include/ossim/vpfutil/projectn.h
similarity index 100%
rename from include/ossim/vpfutil/projectn.h
rename to ossim/include/ossim/vpfutil/projectn.h
diff --git a/include/ossim/vpfutil/protomas.h b/ossim/include/ossim/vpfutil/protomas.h
similarity index 100%
rename from include/ossim/vpfutil/protomas.h
rename to ossim/include/ossim/vpfutil/protomas.h
diff --git a/include/ossim/vpfutil/set.h b/ossim/include/ossim/vpfutil/set.h
similarity index 100%
rename from include/ossim/vpfutil/set.h
rename to ossim/include/ossim/vpfutil/set.h
diff --git a/include/ossim/vpfutil/system.h b/ossim/include/ossim/vpfutil/system.h
similarity index 100%
rename from include/ossim/vpfutil/system.h
rename to ossim/include/ossim/vpfutil/system.h
diff --git a/ossim/include/ossim/vpfutil/values.h b/ossim/include/ossim/vpfutil/values.h
new file mode 100644
index 0000000..e807afd
--- /dev/null
+++ b/ossim/include/ossim/vpfutil/values.h
@@ -0,0 +1,92 @@
+/* Old compatibility names for <limits.h> and <float.h> constants.
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 51 Franklin Street,
+   Fifth Floor, Boston, MA 02110-1301 USA  */
+
+/* This interface is obsolete.  New programs should use
+   <limits.h> and/or <float.h> instead of <values.h>.  */
+
+#ifndef	_VALUES_H
+#define	_VALUES_H	1
+
+#include <limits.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef MAXSHORT
+#undef MAXSHORT
+#endif
+#ifdef MAXFLOAT
+#undef MAXFLOAT
+#endif
+
+#define _TYPEBITS(type)	(sizeof (type) * CHAR_BIT)
+
+#define CHARBITS	_TYPEBITS (char)
+#define SHORTBITS	_TYPEBITS (short int)
+#define INTBITS		_TYPEBITS (int)
+#define LONGBITS	_TYPEBITS (long int)
+#define PTRBITS		_TYPEBITS (char *)
+#define DOUBLEBITS	_TYPEBITS (double)
+#define FLOATBITS	_TYPEBITS (float)
+
+#ifndef MINSHORT
+#  define   MINSHORT	SHRT_MIN
+#endif
+#ifndef MININT
+#  define	MININT		INT_MIN
+#endif
+#ifndef MINLONG
+#  define	MINLONG		LONG_MIN
+#endif
+
+#ifndef MAXSHORT
+#  define	MAXSHORT	SHRT_MAX
+#endif
+#ifndef MAXINT
+#  define	MAXINT		INT_MAX
+#endif
+#ifndef MAXLONG
+#  define	MAXLONG		LONG_MAX
+#endif
+
+#define HIBITS		MINSHORT
+#define HIBITL		MINLONG
+
+
+#include <float.h>
+
+#define	MAXDOUBLE	DBL_MAX
+#define	MAXFLOAT	FLT_MAX
+#define	MINDOUBLE	DBL_MIN
+#define	MINFLOAT	FLT_MIN
+#define	DMINEXP		DBL_MIN_EXP
+#define	FMINEXP		FLT_MIN_EXP
+#define	DMAXEXP		DBL_MAX_EXP
+#define	FMAXEXP		FLT_MAX_EXP
+
+
+#ifdef __USE_MISC
+/* Some systems define this name instead of CHAR_BIT or CHARBITS.  */
+# define BITSPERBYTE	CHAR_BIT
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+#endif	/* values.h */
diff --git a/include/ossim/vpfutil/vpfapi.h b/ossim/include/ossim/vpfutil/vpfapi.h
similarity index 100%
rename from include/ossim/vpfutil/vpfapi.h
rename to ossim/include/ossim/vpfutil/vpfapi.h
diff --git a/include/ossim/vpfutil/vpfdisp.h b/ossim/include/ossim/vpfutil/vpfdisp.h
similarity index 100%
rename from include/ossim/vpfutil/vpfdisp.h
rename to ossim/include/ossim/vpfutil/vpfdisp.h
diff --git a/include/ossim/vpfutil/vpfdraw.h b/ossim/include/ossim/vpfutil/vpfdraw.h
similarity index 100%
rename from include/ossim/vpfutil/vpfdraw.h
rename to ossim/include/ossim/vpfutil/vpfdraw.h
diff --git a/include/ossim/vpfutil/vpfinit.h b/ossim/include/ossim/vpfutil/vpfinit.h
similarity index 100%
rename from include/ossim/vpfutil/vpfinit.h
rename to ossim/include/ossim/vpfutil/vpfinit.h
diff --git a/include/ossim/vpfutil/vpfio.h b/ossim/include/ossim/vpfutil/vpfio.h
similarity index 100%
rename from include/ossim/vpfutil/vpfio.h
rename to ossim/include/ossim/vpfutil/vpfio.h
diff --git a/include/ossim/vpfutil/vpfmisc.h b/ossim/include/ossim/vpfutil/vpfmisc.h
similarity index 100%
rename from include/ossim/vpfutil/vpfmisc.h
rename to ossim/include/ossim/vpfutil/vpfmisc.h
diff --git a/include/ossim/vpfutil/vpfprim.h b/ossim/include/ossim/vpfutil/vpfprim.h
similarity index 100%
rename from include/ossim/vpfutil/vpfprim.h
rename to ossim/include/ossim/vpfutil/vpfprim.h
diff --git a/include/ossim/vpfutil/vpfrelat.h b/ossim/include/ossim/vpfutil/vpfrelat.h
similarity index 100%
rename from include/ossim/vpfutil/vpfrelat.h
rename to ossim/include/ossim/vpfutil/vpfrelat.h
diff --git a/include/ossim/vpfutil/vpfselec.h b/ossim/include/ossim/vpfutil/vpfselec.h
similarity index 100%
rename from include/ossim/vpfutil/vpfselec.h
rename to ossim/include/ossim/vpfutil/vpfselec.h
diff --git a/include/ossim/vpfutil/vpftable.h b/ossim/include/ossim/vpfutil/vpftable.h
similarity index 100%
rename from include/ossim/vpfutil/vpftable.h
rename to ossim/include/ossim/vpfutil/vpftable.h
diff --git a/include/ossim/vpfutil/vpftidx.h b/ossim/include/ossim/vpfutil/vpftidx.h
similarity index 100%
rename from include/ossim/vpfutil/vpftidx.h
rename to ossim/include/ossim/vpfutil/vpftidx.h
diff --git a/include/ossim/vpfutil/vpfview.h b/ossim/include/ossim/vpfutil/vpfview.h
similarity index 100%
rename from include/ossim/vpfutil/vpfview.h
rename to ossim/include/ossim/vpfutil/vpfview.h
diff --git a/include/ossim/vpfutil/xmemory.h b/ossim/include/ossim/vpfutil/xmemory.h
similarity index 100%
rename from include/ossim/vpfutil/xmemory.h
rename to ossim/include/ossim/vpfutil/xmemory.h
diff --git a/ossim/ossim_header.txt b/ossim/ossim_header.txt
new file mode 100644
index 0000000..e0cecac
--- /dev/null
+++ b/ossim/ossim_header.txt
@@ -0,0 +1,8 @@
+/*****************************************************************************
+*                                                                            *
+*                                 O S S I M                                  *
+*            Open Source, Geospatial Image Processing Project                *
+*          License: MIT, see LICENSE.txt at the top-level directory         *
+*                                                                            *
+******************************************************************************
+$Id: ossim_header.txt 23481 2015-08-26 15:42:55Z okramer $ */
diff --git a/packaging/pkgconfig/ossim.pc.in b/ossim/packaging/pkgconfig/ossim.pc.in
similarity index 100%
rename from packaging/pkgconfig/ossim.pc.in
rename to ossim/packaging/pkgconfig/ossim.pc.in
diff --git a/ossim/share/ossim/projection/ossim_epsg_projections-v7_4.csv b/ossim/share/ossim/projection/ossim_epsg_projections-v7_4.csv
new file mode 100644
index 0000000..c38b2a5
--- /dev/null
+++ b/ossim/share/ossim/projection/ossim_epsg_projections-v7_4.csv
@@ -0,0 +1,3252 @@
+EPSG_DB_FORMAT_A
+code,name,type,unit,datum code,datum name,ellipsoid,False easting,Latitude of natural origin,False northing,Longitude of natural origin,Scale factor at natural origin,Azimuth of initial line,Latitude of projection centre,Northing at projection centre,Angle from Rectified to Skew Grid,Scale factor on initial line,Easting at projection centre,Longitude of projection centre,Latitude of pseudo standard parallel,Scale factor on pseudo standard parallel,Longitude of origin,Latitude of 2nd stan [...]
+2000,Anguilla 1957 / British West Indies Grid,Transverse Mercator,metre,4600,Anguilla 1957,Clarke 1880 (RGS),400000,0,0,-62,0.9995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2001,Antigua 1943 / British West Indies Grid,Transverse Mercator,metre,4601,Antigua 1943,Clarke 1880 (RGS),400000,0,0,-62,0.9995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2002,Dominica 1945 / British West Indies Grid,Transverse Mercator,metre,4602,Dominica 1945,Clarke 1880 (RGS),400000,0,0,-62,0.9995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2003,Grenada 1953 / British West Indies Grid,Transverse Mercator,metre,4603,Grenada 1953,Clarke 1880 (RGS),400000,0,0,-62,0.9995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2004,Montserrat 1958 / British West Indies Grid,Transverse Mercator,metre,4604,Montserrat 1958,Clarke 1880 (RGS),400000,0,0,-62,0.9995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2005,St. Kitts 1955 / British West Indies Grid,Transverse Mercator,metre,4605,St. Kitts 1955,Clarke 1880 (RGS),400000,0,0,-62,0.9995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2006,St. Lucia 1955 / British West Indies Grid,Transverse Mercator,metre,4606,St. Lucia 1955,Clarke 1880 (RGS),400000,0,0,-62,0.9995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2007,St. Vincent 45 / British West Indies Grid,Transverse Mercator,metre,4607,St. Vincent 1945,Clarke 1880 (RGS),400000,0,0,-62,0.9995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2008,NAD27(CGQ77) / SCoPQ zone 2,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,304800,0,0,-55.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2009,NAD27(CGQ77) / SCoPQ zone 3,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,304800,0,0,-58.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2010,NAD27(CGQ77) / SCoPQ zone 4,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,304800,0,0,-61.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2011,NAD27(CGQ77) / SCoPQ zone 5,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,304800,0,0,-64.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2012,NAD27(CGQ77) / SCoPQ zone 6,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,304800,0,0,-67.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2013,NAD27(CGQ77) / SCoPQ zone 7,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,304800,0,0,-70.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2014,NAD27(CGQ77) / SCoPQ zone 8,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,304800,0,0,-73.3,0.9999
+2015,NAD27(CGQ77) / SCoPQ zone 9,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,304800,0,0,-76.3,0.9999
+2016,NAD27(CGQ77) / SCoPQ zone 10,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,304800,0,0,-79.3,0.9999
+2017,NAD27(76) / MTM zone 8,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,304800,0,0,-73.3,0.9999
+2018,NAD27(76) / MTM zone 9,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,304800,0,0,-76.3,0.9999
+2019,NAD27(76) / MTM zone 10,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,304800,0,0,-79.3,0.9999
+2020,NAD27(76) / MTM zone 11,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,304800,0,0,-82.3,0.9999
+2021,NAD27(76) / MTM zone 12,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,304800,0,0,-81,0.9999
+2022,NAD27(76) / MTM zone 13,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,304800,0,0,-84,0.9999
+2023,NAD27(76) / MTM zone 14,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,304800,0,0,-87,0.9999
+2024,NAD27(76) / MTM zone 15,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,304800,0,0,-90,0.9999
+2025,NAD27(76) / MTM zone 16,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,304800,0,0,-93,0.9999
+2026,NAD27(76) / MTM zone 17,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,304800,0,0,-96,0.9999
+2027,NAD27(76) / UTM zone 15N,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,500000,0,0,-93,0.9996
+2028,NAD27(76) / UTM zone 16N,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,500000,0,0,-87,0.9996
+2029,NAD27(76) / UTM zone 17N,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,500000,0,0,-81,0.9996
+2030,NAD27(76) / UTM zone 18N,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,500000,0,0,-75,0.9996
+2031,NAD27(CGQ77) / UTM zone 17N,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,500000,0,0,-81,0.9996
+2032,NAD27(CGQ77) / UTM zone 18N,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,500000,0,0,-75,0.9996
+2033,NAD27(CGQ77) / UTM zone 19N,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,500000,0,0,-69,0.9996
+2034,NAD27(CGQ77) / UTM zone 20N,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,500000,0,0,-63,0.9996
+2035,NAD27(CGQ77) / UTM zone 21N,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,500000,0,0,-57,0.9996
+2039,Israel / Israeli TM Grid,Transverse Mercator,metre,4141,Israel,GRS 1980,219529.584,31.4403817,626907.39,35.1216261,1.0000067
+2040,Locodjo 1965 / UTM zone 30N,Transverse Mercator,metre,4142,Locodjo 1965,Clarke 1880 (RGS),500000,0,0,-3,0.9996
+2041,Abidjan 1987 / UTM zone 30N,Transverse Mercator,metre,4143,Abidjan 1987,Clarke 1880 (RGS),500000,0,0,-3,0.9996
+2042,Locodjo 1965 / UTM zone 29N,Transverse Mercator,metre,4142,Locodjo 1965,Clarke 1880 (RGS),500000,0,0,-9,0.9996
+2043,Abidjan 1987 / UTM zone 29N,Transverse Mercator,metre,4143,Abidjan 1987,Clarke 1880 (RGS),500000,0,0,-9,0.9996
+2044,Hanoi 1972 / Gauss-Kruger zone 18,Transverse Mercator,metre,4147,Hanoi 1972,Krassowsky 1940,18500000,0,0,105,1
+2045,Hanoi 1972 / Gauss-Kruger zone 19,Transverse Mercator,metre,4147,Hanoi 1972,Krassowsky 1940,19500000,0,0,111,1
+2046,Hartebeesthoek94 / Lo15,Transverse Mercator (South Orientated),metre,4148,Hartebeesthoek94,WGS 84,0,0,0,15,1
+2047,Hartebeesthoek94 / Lo17,Transverse Mercator (South Orientated),metre,4148,Hartebeesthoek94,WGS 84,0,0,0,17,1
+2048,Hartebeesthoek94 / Lo19,Transverse Mercator (South Orientated),metre,4148,Hartebeesthoek94,WGS 84,0,0,0,19,1
+2049,Hartebeesthoek94 / Lo21,Transverse Mercator (South Orientated),metre,4148,Hartebeesthoek94,WGS 84,0,0,0,21,1,0,0,0,0,0,0,0,0,0,
+2050,Hartebeesthoek94 / Lo23,Transverse Mercator (South Orientated),metre,4148,Hartebeesthoek94,WGS 84,0,0,0,23,1,0,0,0,0,0,0,0,0,0,
+2051,Hartebeesthoek94 / Lo25,Transverse Mercator (South Orientated),metre,4148,Hartebeesthoek94,WGS 84,0,0,0,25,1,0,0,0,0,0,0,0,0,0,
+2052,Hartebeesthoek94 / Lo27,Transverse Mercator (South Orientated),metre,4148,Hartebeesthoek94,WGS 84,0,0,0,27,1,0,0,0,0,0,0,0,0,0,
+2053,Hartebeesthoek94 / Lo29,Transverse Mercator (South Orientated),metre,4148,Hartebeesthoek94,WGS 84,0,0,0,29,1,0,0,0,0,0,0,0,0,0,
+2054,Hartebeesthoek94 / Lo31,Transverse Mercator (South Orientated),metre,4148,Hartebeesthoek94,WGS 84,0,0,0,31,1,0,0,0,0,0,0,0,0,0,
+2055,Hartebeesthoek94 / Lo33,Transverse Mercator (South Orientated),metre,4148,Hartebeesthoek94,WGS 84,0,0,0,33,1,0,0,0,0,0,0,0,0,0,
+2056,CH1903+ / LV95,Oblique Mercator,metre,4149,CH1903+,Bessel 1841,0,0,0,0,0,90,46.570866,1200000,90,1,2600000,7.26225,0,0,
+2057,Rassadiran / Nakhl e Taqi,Oblique Mercator,metre,4153,Rassadiran,International 1924,0,0,0,0,0,0.34179803,27.31077837,3044969.194,0.34179803,0.999895934,658377.437,52.3612741,0,0,
+2058,ED50(ED77) / UTM zone 38N,Transverse Mercator,metre,4154,European Datum 1950(1977),International 1924,500000,0,0,45,0.9996,0,0,0,0,0,0,0,0,0,
+2059,ED50(ED77) / UTM zone 39N,Transverse Mercator,metre,4154,European Datum 1950(1977),International 1924,500000,0,0,51,0.9996,0,0,0,0,0,0,0,0,0,
+2060,ED50(ED77) / UTM zone 40N,Transverse Mercator,metre,4154,European Datum 1950(1977),International 1924,500000,0,0,57,0.9996,0,0,0,0,0,0,0,0,0,
+2061,ED50(ED77) / UTM zone 41N,Transverse Mercator,metre,4154,European Datum 1950(1977),International 1924,500000,0,0,63,0.9996,0,0,0,0,0,0,0,0,0,
+2062,Madrid 1870 (Madrid) / Spain,Lambert Conic Conformal (1SP),metre,4903,Madrid 1870 (Madrid),Struve 1860,600000,40,600000,0,0.998808529,0,0,0,0,0,0,0,0,0,
+2065,S-JTSK (Ferro) / Krovak,Krovak Oblique Conic Conformal,metre,4156,S-JTSK (Ferro),Bessel 1841,0,0,0,0,0,30.1717303,49.3,0,0,0,0,0,78.3,0.9999,42.3
+2066,Mount Dillon / Tobago Grid,Cassini-Soldner,Clarke's link,4157,Mount Dillon,Clarke 1858,187500,11.1507843,180000,-60.4109632,0,0,0,0,0,0,0,0,0,0,
+2067,Naparima 1955 / UTM zone 20N,Transverse Mercator,metre,4158,Naparima 1955,International 1924,500000,0,0,-63,0.9996
+2068,ELD79 / Libya zone 5,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,200000,0,0,9,0.9999
+2069,ELD79 / Libya zone 6,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,200000,0,0,11,0.9999
+2070,ELD79 / Libya zone 7,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,200000,0,0,13,0.9999
+2071,ELD79 / Libya zone 8,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,200000,0,0,15,0.9999
+2072,ELD79 / Libya zone 9,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,200000,0,0,17,0.9999
+2073,ELD79 / Libya zone 10,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,200000,0,0,19,0.9999
+2074,ELD79 / Libya zone 11,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,200000,0,0,21,0.9999
+2075,ELD79 / Libya zone 12,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,200000,0,0,23,0.9999
+2076,ELD79 / Libya zone 13,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,200000,0,0,25,0.9999
+2077,ELD79 / UTM zone 32N,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,500000,0,0,9,0.9996
+2078,ELD79 / UTM zone 33N,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,500000,0,0,15,0.9996
+2079,ELD79 / UTM zone 34N,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,500000,0,0,21,0.9996
+2080,ELD79 / UTM zone 35N,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,500000,0,0,27,0.9996
+2081,Chos Malal 1914 / Argentina zone 2,Transverse Mercator,metre,4160,Chos Malal 1914,International 1924,2500000,-90,0,-69,1
+2082,Pampa del Castillo / Argentina zone 2,Transverse Mercator,metre,4161,Pampa del Castillo,International 1924,2500000,-90,0,-69,1
+2083,Hito XVIII 1963 / Argentina zone 2,Transverse Mercator,metre,4254,Hito XVIII 1963,International 1924,2500000,-90,0,-69,1
+2084,Hito XVIII 1963 / UTM zone 19S,Transverse Mercator,metre,4254,Hito XVIII 1963,International 1924,500000,0,10000000,-69,0.9996
+2087,ELD79 / TM 12 NE,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,500000,0,0,12,0.9996
+2088,Carthage / TM 11 NE,Transverse Mercator,metre,4223,Carthage,Clarke 1880 (IGN),500000,0,0,11,0.9996
+2089,Yemen NGN96 / UTM zone 38N,Transverse Mercator,metre,4163,Yemen National Geodetic Network 1996,WGS 84,500000,0,0,45,0.9996
+2090,Yemen NGN96 / UTM zone 39N,Transverse Mercator,metre,4163,Yemen National Geodetic Network 1996,WGS 84,500000,0,0,51,0.9996
+2093,Hanoi 1972 / GK 106 NE,Transverse Mercator,metre,4147,Hanoi 1972,Krassowsky 1940,500000,0,0,106,1
+2094,WGS 72BE / TM 106 NE,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,106,0.9996
+2095,Bissau / UTM zone 28N,Transverse Mercator,metre,4165,Bissau,International 1924,500000,0,0,-15,0.9996
+2096,Korean 1985 / Korea East Belt,Transverse Mercator,metre,4162,Korean Datum 1985,Bessel 1841,200000,38,500000,129,1
+2097,Korean 1985 / Korea Central Belt,Transverse Mercator,metre,4162,Korean Datum 1985,Bessel 1841,200000,38,500000,127,1
+2098,Korean 1985 / Korea West Belt,Transverse Mercator,metre,4162,Korean Datum 1985,Bessel 1841,200000,38,500000,125,1
+2099,Qatar 1948 / Qatar Grid,Cassini-Soldner,metre,4286,Qatar 1948,Helmert 1906,100000,25.22565,100000,50.4541,
+2100,GGRS87 / Greek Grid,Transverse Mercator,metre,4121,Greek Geodetic Reference System 1987,GRS 1980,500000,0,0,24,0.9996
+2101,Lake / Maracaibo Grid M1,Lambert Conic Conformal (1SP),metre,4249,Lake,International 1924,0,10.1,-52684.972,-71.3620224,1
+2102,Lake / Maracaibo Grid,Lambert Conic Conformal (1SP),metre,4249,Lake,International 1924,200000,10.1,147315.028,-71.3620224,1
+2103,Lake / Maracaibo Grid M3,Lambert Conic Conformal (1SP),metre,4249,Lake,International 1924,500000,10.1,447315.028,-71.3620224,1
+2104,Lake / Maracaibo La Rosa Grid,Lambert Conic Conformal (1SP),metre,4249,Lake,International 1924,-17044,10.1,-23139.97,-71.3620224,1
+2105,NZGD2000 / Mount Eden 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-36.5247,800000,174.4551,0.9999
+2106,NZGD2000 / Bay of Plenty 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-37.454,800000,176.2758,1
+2107,NZGD2000 / Poverty Bay 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-38.3728,800000,177.5308,1
+2108,NZGD2000 / Hawkes Bay 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-39.3903,800000,176.4025,1
+2109,NZGD2000 / Taranaki 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-39.0808,800000,174.134,1
+2110,NZGD2000 / Tuhirangi 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-39.3044,800000,175.3824,1
+2111,NZGD2000 / Wanganui 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-40.1431,800000,175.2917,1
+2112,NZGD2000 / Wairarapa 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-40.5531,800000,175.385,1
+2113,NZGD2000 / Wellington 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-41.1804,800000,174.4635,1
+2114,NZGD2000 / Collingwood 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-40.4253,800000,172.4019,1
+2115,NZGD2000 / Nelson 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-41.1628,800000,173.1757,1
+2116,NZGD2000 / Karamea 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-41.1723,800000,172.0632,1
+2117,NZGD2000 / Buller 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-41.4838,800000,171.3452,1
+2118,NZGD2000 / Grey 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-42.2001,800000,171.3259,1
+2119,NZGD2000 / Amuri 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-42.412,800000,173.0036,1
+2120,NZGD2000 / Marlborough 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-41.324,800000,173.4807,1
+2121,NZGD2000 / Hokitika 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-42.531,800000,170.5847,1
+2122,NZGD2000 / Okarito 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-43.0636,800000,170.1539,1
+2123,NZGD2000 / Jacksons Bay 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-43.584,800000,168.3622,1
+2124,NZGD2000 / Mount Pleasant 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-43.3526,800000,172.4337,1
+2125,NZGD2000 / Gawler 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-43.4455,800000,171.2138,1
+2126,NZGD2000 / Timaru 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-44.2407,800000,171.0326,1
+2127,NZGD2000 / Lindis Peak 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-44.4406,800000,169.2803,1
+2128,NZGD2000 / Mount Nicholas 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-45.0758,800000,168.2355,1
+2129,NZGD2000 / Mount York 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-45.3349,800000,167.4419,1
+2130,NZGD2000 / Observation Point 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-45.4858,800000,170.3742,1
+2131,NZGD2000 / North Taieri 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-45.5141,800000,170.1657,0.99996
+2132,NZGD2000 / Bluff 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-46.36,800000,168.2034,1
+2133,NZGD2000 / UTM zone 58S,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,500000,0,10000000,165,0.9996
+2134,NZGD2000 / UTM zone 59S,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,500000,0,10000000,171,0.9996
+2135,NZGD2000 / UTM zone 60S,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,500000,0,10000000,177,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2136,Accra / Ghana National Grid,Transverse Mercator,Gold Coast foot,4168,Accra,War Office,900000,4.4,0,-1,0.99975,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2137,Accra / TM 1 NW,Transverse Mercator,metre,4168,Accra,War Office,500000,0,0,-1,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2138,NAD27(CGQ77) / Quebec Lambert,Lambert Conic Conformal (2SP),metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,44,-68.3,60,0,0
+2154,RGF93 / Lambert-93,Lambert Conic Conformal (2SP),metre,4171,Reseau Geodesique Francais 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,46.3,3,49,6600000,700000
+2157,IRENET95 / Irish Transverse Mercator,Transverse Mercator,metre,4173,IRENET95,GRS 1980,600000,53.3,750000,-8,0.99982,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2158,IRENET95 / UTM zone 29N,Transverse Mercator,metre,4173,IRENET95,GRS 1980,500000,0,0,-9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2159,Sierra Leone 1924 / New Colony Grid,Transverse Mercator,Gold Coast foot,4174,Sierra Leone Colony 1924,War Office,500000,6.4,0,-12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2160,Sierra Leone 1924 / New War Office Grid,Transverse Mercator,Gold Coast foot,4174,Sierra Leone Colony 1924,War Office,800000,6.4,600000,-12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2161,Sierra Leone 1968 / UTM zone 28N,Transverse Mercator,metre,4175,Sierra Leone 1968,Clarke 1880 (RGS),500000,0,0,-15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2162,Sierra Leone 1968 / UTM zone 29N,Transverse Mercator,metre,4175,Sierra Leone 1968,Clarke 1880 (RGS),500000,0,0,-9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2163,US National Atlas Equal Area,Lambert Azimuthal Equal Area (Spherical),metre,4035,Not specified (based on Clarke 1866 Authalic Sphere),Clarke 1866 Authalic Sphere,0,45,0,-100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2164,Locodjo 1965 / TM 5 NW,Transverse Mercator,metre,4142,Locodjo 1965,Clarke 1880 (RGS),500000,0,0,-5,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2165,Abidjan 1987 / TM 5 NW,Transverse Mercator,metre,4143,Abidjan 1987,Clarke 1880 (RGS),500000,0,0,-5,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2169,Luxembourg 1930 / Gauss,Transverse Mercator,metre,4181,Luxembourg 1930,International 1924,80000,49.5,100000,6.1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2172,Pulkovo 1942(58) / Poland zone II,Oblique Stereographic,metre,4179,Pulkovo 1942(58),Krassowsky 1940,4603000,53.0007,5806000,21.301,0.9998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2173,Pulkovo 1942(58) / Poland zone III,Oblique Stereographic,metre,4179,Pulkovo 1942(58),Krassowsky 1940,3501000,53.35,5999000,17.003,0.9998
+2174,Pulkovo 1942(58) / Poland zone IV,Oblique Stereographic,metre,4179,Pulkovo 1942(58),Krassowsky 1940,3703000,51.4015,5627000,16.402,0.9998
+2175,Pulkovo 1942(58) / Poland zone V,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,237000,0,-4700000,18.573,0.999983
+2176,ETRS89 / Poland CS2000 zone 5,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,5500000,0,0,15,0.999923
+2177,ETRS89 / Poland CS2000 zone 6,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,6500000,0,0,18,0.999923
+2178,ETRS89 / Poland CS2000 zone 7,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,7500000,0,0,21,0.999923
+2179,ETRS89 / Poland CS2000 zone 8,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,8500000,0,0,24,0.999923
+2180,ETRS89 / Poland CS92,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,-5300000,19,0.9993
+2188,Azores Occidental 1939 / UTM zone 25N,Transverse Mercator,metre,4182,Azores Occidental Islands 1939,International 1924,500000,0,0,-33,0.9996
+2189,Azores Central 1948 / UTM zone 26N,Transverse Mercator,metre,4183,Azores Central Islands 1948,International 1924,500000,0,0,-27,0.9996
+2190,Azores Oriental 1940 / UTM zone 26N,Transverse Mercator,metre,4184,Azores Oriental Islands 1940,International 1924,500000,0,0,-27,0.9996
+2192,ED50 / France EuroLambert,Lambert Conic Conformal (1SP),metre,4154,European Datum 1950,International 1924,600000,46.48,2200000,2.2014025,0.99987742
+2193,NZGD2000 / New Zealand Transverse Mercator 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,1600000,0,10000000,173,0.9996
+2195,NAD83(HARN) / UTM zone 2S,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,10000000,-171,0.9996
+2196,ETRS89 / Kp2000 Jutland,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,200000,0,0,9.3,0.99995
+2197,ETRS89 / Kp2000 Zealand,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,12,0.99995
+2198,ETRS89 / Kp2000 Bornholm,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,900000,0,0,15,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2200,ATS77 / New Brunswick Stereographic (ATS77),Oblique Stereographic,metre,4041,Average Terrestrial System 1977,Average Terrestrial System 1977,300000,46.3,800000,-66.3,0.999912,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2201,REGVEN / UTM zone 18N,Transverse Mercator,metre,4189,Red Geodesica Venezolana,GRS 1980,500000,0,0,-75,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2202,REGVEN / UTM zone 19N,Transverse Mercator,metre,4189,Red Geodesica Venezolana,GRS 1980,500000,0,0,-69,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2203,REGVEN / UTM zone 20N,Transverse Mercator,metre,4189,Red Geodesica Venezolana,GRS 1980,500000,0,0,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2204,NAD27 / Tennessee,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.25,34.4,-86,35.15,100000,2000000
+2205,NAD83 / Kentucky North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.58,37.3,-84.15,37.58,0,500000
+2206,ED50 / 3-degree Gauss-Kruger zone 9,Transverse Mercator,metre,4154,European Datum 1950,International 1924,9500000,0,0,27,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2207,ED50 / 3-degree Gauss-Kruger zone 10,Transverse Mercator,metre,4154,European Datum 1950,International 1924,10500000,0,0,30,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2208,ED50 / 3-degree Gauss-Kruger zone 11,Transverse Mercator,metre,4154,European Datum 1950,International 1924,11500000,0,0,33,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2209,ED50 / 3-degree Gauss-Kruger zone 12,Transverse Mercator,metre,4154,European Datum 1950,International 1924,12500000,0,0,36,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2210,ED50 / 3-degree Gauss-Kruger zone 13,Transverse Mercator,metre,4154,European Datum 1950,International 1924,13500000,0,0,39,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2211,ED50 / 3-degree Gauss-Kruger zone 14,Transverse Mercator,metre,4154,European Datum 1950,International 1924,14500000,0,0,42,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2212,ED50 / 3-degree Gauss-Kruger zone 15,Transverse Mercator,metre,4154,European Datum 1950,International 1924,15500000,0,0,45,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2213,ETRS89 / TM 30 NE,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,30,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2215,Manoca 1962 / UTM zone 32N,Transverse Mercator,metre,4193,Manoca 1962,Clarke 1880 (IGN),500000,0,0,9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2216,Qornoq 1927 / UTM zone 22N,Transverse Mercator,metre,4194,Qornoq 1927,International 1924,500000,0,0,-51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2217,Qornoq 1927 / UTM zone 23N,Transverse Mercator,metre,4194,Qornoq 1927,International 1924,500000,0,0,-45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2218,Scoresbysund 1952 / Greenland zone 5 east,Lambert Conic Conformal (West Orientated),metre,4195,Scoresbysund 1952,International 1924,0,70.3,0,-24,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2219,ATS77 / UTM zone 19N,Transverse Mercator,metre,4041,Average Terrestrial System 1977,Average Terrestrial System 1977,500000,0,0,-69,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2220,ATS77 / UTM zone 20N,Transverse Mercator,metre,4041,Average Terrestrial System 1977,Average Terrestrial System 1977,500000,0,0,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2221,Scoresbysund 1952 / Greenland zone 6 east,Lambert Conic Conformal (West Orientated),metre,4195,Scoresbysund 1952,International 1924,0,67.3,0,-32,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2222,NAD83 / Arizona East (ft),Transverse Mercator,foot,4269,North American Datum 1983,GRS 1980,700000,31,0,-110.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2223,NAD83 / Arizona Central (ft),Transverse Mercator,foot,4269,North American Datum 1983,GRS 1980,700000,31,0,-111.55,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2224,NAD83 / Arizona West (ft),Transverse Mercator,foot,4269,North American Datum 1983,GRS 1980,700000,31,0,-113.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2225,NAD83 / California zone 1 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.2,-122,41.4,1640416.667,6561666.667
+2226,NAD83 / California zone 2 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.2,37.4,-122,39.5,1640416.667,6561666.667
+2227,NAD83 / California zone 3 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.04,36.3,-120.3,38.26,1640416.667,6561666.667
+2228,NAD83 / California zone 4 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,35.2,-119,37.15,1640416.667,6561666.667
+2229,NAD83 / California zone 5 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.02,33.3,-118,35.28,1640416.667,6561666.667
+2230,NAD83 / California zone 6 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.47,32.1,-116.15,33.53,1640416.667,6561666.667
+2231,NAD83 / Colorado North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.43,39.2,-105.3,40.47,1000000,3000000
+2232,NAD83 / Colorado Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.27,37.5,-105.3,39.45,1000000,3000000
+2233,NAD83 / Colorado South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.14,36.4,-105.3,38.26,1000000,3000000
+2234,NAD83 / Connecticut (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.12,40.5,-72.45,41.52,500000,1000000
+2235,NAD83 / Delaware (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,656166.667,38,0,-75.25,0.999995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2236,NAD83 / Florida East (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,656166.667,24.2,0,-81,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2237,NAD83 / Florida West (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,656166.667,24.2,0,-82,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2238,NAD83 / Florida North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.35,29,-84.3,30.45,0,1968500
+2239,NAD83 / Georgia East (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,656166.667,30,0,-82.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2240,NAD83 / Georgia West (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,2296583.333,30,0,-84.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2241,NAD83 / Idaho East (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,656166.667,41.4,0,-112.1,0.999947368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2242,NAD83 / Idaho Central (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1640416.667,41.4,0,-114,0.999947368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2243,NAD83 / Idaho West (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,2624666.667,41.4,0,-115.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2246,NAD83 / Kentucky North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.58,37.3,-84.15,37.58,0,1640416.667
+2247,NAD83 / Kentucky South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.44,36.2,-85.45,37.56,1640416.667,1640416.667
+2248,NAD83 / Maryland (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.18,37.4,-77,39.27,0,1312333.333
+2249,NAD83 / Massachusetts Mainland (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.43,41,-71.3,42.41,2460625,656166.667
+2250,NAD83 / Massachusetts Island (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.17,41,-70.3,41.29,0,1640416.667
+2251,NAD83 / Michigan North (ft),Lambert Conic Conformal (2SP),foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.29,44.47,-87,47.05,0,26246719.16
+2252,NAD83 / Michigan Central (ft),Lambert Conic Conformal (2SP),foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.11,43.19,-84.22,45.42,0,19685039.37
+2253,NAD83 / Michigan South (ft),Lambert Conic Conformal (2SP),foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.06,41.3,-84.22,43.4,0,13123359.58
+2254,NAD83 / Mississippi East (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,984250,29.3,0,-88.5,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2255,NAD83 / Mississippi West (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,2296583.333,29.3,0,-90.2,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2256,NAD83 / Montana (ft),Lambert Conic Conformal (2SP),foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,44.15,-109.3,49,0,1968503.937
+2257,NAD83 / New Mexico East (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,541337.5,31,0,-104.2,0.999909091,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2258,NAD83 / New Mexico Central (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1640416.667,31,0,-106.15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2259,NAD83 / New Mexico West (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,2723091.667,31,0,-107.5,0.999916667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2260,NAD83 / New York East (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,492125,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2261,NAD83 / New York Central (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,820208.333,40,0,-76.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2262,NAD83 / New York West (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1148291.667,40,0,-78.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2263,NAD83 / New York Long Island (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.4,40.1,-74,41.02,0,984250
+2264,NAD83 / North Carolina (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.2,33.45,-79,36.1,0,2000000
+2265,NAD83 / North Dakota North (ft),Lambert Conic Conformal (2SP),foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.26,47,-100.3,48.44,0,1968503.937
+2266,NAD83 / North Dakota South (ft),Lambert Conic Conformal (2SP),foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46.11,45.4,-100.3,47.29,0,1968503.937
+2267,NAD83 / Oklahoma North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.34,35,-98,36.46,0,1968500
+2268,NAD83 / Oklahoma South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.56,33.2,-98,35.14,0,1968500
+2269,NAD83 / Oregon North (ft),Lambert Conic Conformal (2SP),foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.2,43.4,-120.3,46,0,8202099.738
+2270,NAD83 / Oregon South (ft),Lambert Conic Conformal (2SP),foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.2,41.4,-120.3,44,0,4921259.843
+2271,NAD83 / Pennsylvania North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.53,40.1,-77.45,41.57,0,1968500
+2272,NAD83 / Pennsylvania South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.56,39.2,-77.45,40.58,0,1968500
+2273,NAD83 / South Carolina (ft),Lambert Conic Conformal (2SP),foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.3,31.5,-81,34.5,0,2000000
+2274,NAD83 / Tennessee (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.15,34.2,-86,36.25,0,1968500
+2275,NAD83 / Texas North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.39,34,-101.3,36.11,3280833.333,656166.667
+2276,NAD83 / Texas North Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.08,31.4,-98.3,33.58,6561666.667,1968500
+2277,NAD83 / Texas Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30.07,29.4,-100.2,31.53,9842500,2296583.333
+2278,NAD83 / Texas South Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28.23,27.5,-99,30.17,13123333.33,1968500
+2279,NAD83 / Texas South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26.1,25.4,-98.3,27.5,16404166.67,984250
+2280,NAD83 / Utah North (ft),Lambert Conic Conformal (2SP),foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.43,40.2,-111.3,41.47,3280839.895,1640419.948
+2281,NAD83 / Utah Central (ft),Lambert Conic Conformal (2SP),foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.01,38.2,-111.3,40.39,6561679.79,1640419.948
+2282,NAD83 / Utah South (ft),Lambert Conic Conformal (2SP),foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.13,36.4,-111.3,38.21,9842519.685,1640419.948
+2283,NAD83 / Virginia North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.02,37.4,-78.3,39.12,6561666.667,11482916.67
+2284,NAD83 / Virginia South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.46,36.2,-78.3,37.58,3280833.333,11482916.67
+2285,NAD83 / Washington North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.3,47,-120.5,48.44,0,1640416.667
+2286,NAD83 / Washington South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.5,45.2,-120.3,47.2,0,1640416.667
+2287,NAD83 / Wisconsin North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.34,45.1,-90,46.46,0,1968500
+2288,NAD83 / Wisconsin Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.15,43.5,-90,45.3,0,1968500
+2289,NAD83 / Wisconsin South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.44,42,-90,44.04,0,1968500
+2290,ATS77 / Prince Edward Isl. Stereographic (ATS77),Oblique Stereographic,metre,4041,Average Terrestrial System 1977,Average Terrestrial System 1977,700000,47.15,400000,-63,0.999912,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2294,ATS77 / MTM Nova Scotia zone 4,Transverse Mercator,metre,4041,Average Terrestrial System 1977,Average Terrestrial System 1977,4500000,0,0,-61.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2295,ATS77 / MTM Nova Scotia zone 5,Transverse Mercator,metre,4041,Average Terrestrial System 1977,Average Terrestrial System 1977,5500000,0,0,-64.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2296,Ammassalik 1958 / Greenland zone 7 east,Lambert Conic Conformal (West Orientated),metre,4196,Ammassalik 1958,International 1924,0,64.3,0,-40,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2299,Qornoq 1927 / Greenland zone 2 west,Lambert Conic Conformal (West Orientated),metre,4194,Qornoq 1927,International 1924,0,79.3,0,-64,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2301,Qornoq 1927 / Greenland zone 3 west,Lambert Conic Conformal (West Orientated),metre,4194,Qornoq 1927,International 1924,0,76.3,0,-64,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2303,Qornoq 1927 / Greenland zone 4 west,Lambert Conic Conformal (West Orientated),metre,4194,Qornoq 1927,International 1924,0,73.3,0,-52,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2304,Qornoq 1927 / Greenland zone 5 west,Lambert Conic Conformal (West Orientated),metre,4194,Qornoq 1927,International 1924,0,70.3,0,-52,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2305,Qornoq 1927 / Greenland zone 6 west,Lambert Conic Conformal (West Orientated),metre,4194,Qornoq 1927,International 1924,0,67.3,0,-52,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2306,Qornoq 1927 / Greenland zone 7 west,Lambert Conic Conformal (West Orientated),metre,4194,Qornoq 1927,International 1924,0,64.3,0,-52,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2307,Qornoq 1927 / Greenland zone 8 east,Lambert Conic Conformal (West Orientated),metre,4194,Qornoq 1927,International 1924,0,61.3,0,-48,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2308,Batavia / TM 109 SE,Transverse Mercator,metre,4211,Batavia,Bessel 1841,500000,0,10000000,109,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2309,WGS 84 / TM 116 SE,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,116,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2310,WGS 84 / TM 132 SE,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,132,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2311,WGS 84 / TM 6 NE,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,6,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2312,Garoua / UTM zone 33N,Transverse Mercator,metre,4197,Garoua,Clarke 1880 (RGS),500000,0,0,15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2313,Kousseri / UTM zone 33N,Transverse Mercator,metre,4198,Kousseri,Clarke 1880 (RGS),500000,0,0,15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2314,Trinidad 1903 / Trinidad Grid (ftCla),Cassini-Soldner,Clarke's foot,4302,Trinidad 1903,Clarke 1858,283800,10.263,214500,-61.2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2315,Campo Inchauspe / UTM zone 19S,Transverse Mercator,metre,4221,Campo Inchauspe,International 1924,500000,0,10000000,-69,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2316,Campo Inchauspe / UTM zone 20S,Transverse Mercator,metre,4221,Campo Inchauspe,International 1924,500000,0,10000000,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2317,PSAD56 / ICN Regional,Lambert Conic Conformal (2SP),metre,4248,Provisional South American Datum 1956,International 1924,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,6,-66,9,1000000,1000000
+2318,Ain el Abd / Aramco Lambert,Lambert Conic Conformal (2SP),metre,4204,Ain el Abd 1970,International 1924,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,25.0522236,48,17,0,0
+2319,ED50 / TM27,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,27,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2320,ED50 / TM30,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,30,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2321,ED50 / TM33,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,33,1
+2322,ED50 / TM36,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,36,1
+2323,ED50 / TM39,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,39,1
+2324,ED50 / TM42,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,42,1
+2325,ED50 / TM45,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,45,1
+2326,Hong Kong 1980 Grid System,Transverse Mercator,metre,4611,Hong Kong 1980,International 1924,836694.05,22.184368,819069.8,114.10428,1
+2327,Xian 1980 / Gauss-Kruger zone 13,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,13500000,0,0,75,1
+2328,Xian 1980 / Gauss-Kruger zone 14,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,14500000,0,0,81,1
+2329,Xian 1980 / Gauss-Kruger zone 15,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,15500000,0,0,87,1
+2330,Xian 1980 / Gauss-Kruger zone 16,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,16500000,0,0,93,1
+2331,Xian 1980 / Gauss-Kruger zone 17,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,17500000,0,0,99,1
+2332,Xian 1980 / Gauss-Kruger zone 18,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,18500000,0,0,105,1
+2333,Xian 1980 / Gauss-Kruger zone 19,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,19500000,0,0,111,1
+2334,Xian 1980 / Gauss-Kruger zone 20,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,20500000,0,0,117,1
+2335,Xian 1980 / Gauss-Kruger zone 21,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,21500000,0,0,123,1
+2336,Xian 1980 / Gauss-Kruger zone 22,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,22500000,0,0,129,1
+2337,Xian 1980 / Gauss-Kruger zone 23,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,23500000,0,0,135,1
+2338,Xian 1980 / Gauss-Kruger CM 75E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,75,1
+2339,Xian 1980 / Gauss-Kruger CM 81E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,81,1
+2340,Xian 1980 / Gauss-Kruger CM 87E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,87,1
+2341,Xian 1980 / Gauss-Kruger CM 93E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,93,1
+2342,Xian 1980 / Gauss-Kruger CM 99E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,99,1
+2343,Xian 1980 / Gauss-Kruger CM 105E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,105,1
+2344,Xian 1980 / Gauss-Kruger CM 111E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,111,1
+2345,Xian 1980 / Gauss-Kruger CM 117E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,117,1
+2346,Xian 1980 / Gauss-Kruger CM 123E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,123,1
+2347,Xian 1980 / Gauss-Kruger CM 129E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,129,1
+2348,Xian 1980 / Gauss-Kruger CM 135E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,135,1
+2349,Xian 1980 / 3-degree Gauss-Kruger zone 25,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,25500000,0,0,75,1
+2350,Xian 1980 / 3-degree Gauss-Kruger zone 26,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,26500000,0,0,78,1
+2351,Xian 1980 / 3-degree Gauss-Kruger zone 27,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,27500000,0,0,81,1
+2352,Xian 1980 / 3-degree Gauss-Kruger zone 28,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,28500000,0,0,84,1
+2353,Xian 1980 / 3-degree Gauss-Kruger zone 29,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,29500000,0,0,87,1
+2354,Xian 1980 / 3-degree Gauss-Kruger zone 30,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,30500000,0,0,90,1
+2355,Xian 1980 / 3-degree Gauss-Kruger zone 31,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,31500000,0,0,93,1
+2356,Xian 1980 / 3-degree Gauss-Kruger zone 32,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,32500000,0,0,96,1
+2357,Xian 1980 / 3-degree Gauss-Kruger zone 33,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,33500000,0,0,99,1
+2358,Xian 1980 / 3-degree Gauss-Kruger zone 34,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,34500000,0,0,102,1
+2359,Xian 1980 / 3-degree Gauss-Kruger zone 35,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,35500000,0,0,105,1
+2360,Xian 1980 / 3-degree Gauss-Kruger zone 36,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,36500000,0,0,108,1
+2361,Xian 1980 / 3-degree Gauss-Kruger zone 37,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,37500000,0,0,111,1
+2362,Xian 1980 / 3-degree Gauss-Kruger zone 38,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,38500000,0,0,114,1
+2363,Xian 1980 / 3-degree Gauss-Kruger zone 39,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,39500000,0,0,117,1
+2364,Xian 1980 / 3-degree Gauss-Kruger zone 40,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,40500000,0,0,120,1
+2365,Xian 1980 / 3-degree Gauss-Kruger zone 41,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,41500000,0,0,123,1
+2366,Xian 1980 / 3-degree Gauss-Kruger zone 42,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,42500000,0,0,126,1
+2367,Xian 1980 / 3-degree Gauss-Kruger zone 43,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,43500000,0,0,129,1
+2368,Xian 1980 / 3-degree Gauss-Kruger zone 44,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,44500000,0,0,132,1
+2369,Xian 1980 / 3-degree Gauss-Kruger zone 45,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,45500000,0,0,135,1
+2370,Xian 1980 / 3-degree Gauss-Kruger CM 75E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,75,1
+2371,Xian 1980 / 3-degree Gauss-Kruger CM 78E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,78,1
+2372,Xian 1980 / 3-degree Gauss-Kruger CM 81E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,81,1
+2373,Xian 1980 / 3-degree Gauss-Kruger CM 84E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,84,1
+2374,Xian 1980 / 3-degree Gauss-Kruger CM 87E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,87,1
+2375,Xian 1980 / 3-degree Gauss-Kruger CM 90E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,90,1
+2376,Xian 1980 / 3-degree Gauss-Kruger CM 93E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,93,1
+2377,Xian 1980 / 3-degree Gauss-Kruger CM 96E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,96,1
+2378,Xian 1980 / 3-degree Gauss-Kruger CM 99E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,99,1
+2379,Xian 1980 / 3-degree Gauss-Kruger CM 102E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,102,1
+2380,Xian 1980 / 3-degree Gauss-Kruger CM 105E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,105,1
+2381,Xian 1980 / 3-degree Gauss-Kruger CM 108E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,108,1
+2382,Xian 1980 / 3-degree Gauss-Kruger CM 111E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,111,1
+2383,Xian 1980 / 3-degree Gauss-Kruger CM 114E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,114,1
+2384,Xian 1980 / 3-degree Gauss-Kruger CM 117E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,117,1
+2385,Xian 1980 / 3-degree Gauss-Kruger CM 120E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,120,1
+2386,Xian 1980 / 3-degree Gauss-Kruger CM 123E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,123,1
+2387,Xian 1980 / 3-degree Gauss-Kruger CM 126E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,126,1
+2388,Xian 1980 / 3-degree Gauss-Kruger CM 129E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,129,1
+2389,Xian 1980 / 3-degree Gauss-Kruger CM 132E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,132,1
+2390,Xian 1980 / 3-degree Gauss-Kruger CM 135E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,135,1
+2391,KKJ / Finland zone 1,Transverse Mercator,metre,4123,Kartastokoordinaattijarjestelma (1966),International 1924,1500000,0,0,21,1
+2392,KKJ / Finland zone 2,Transverse Mercator,metre,4123,Kartastokoordinaattijarjestelma (1966),International 1924,2500000,0,0,24,1
+2393,KKJ / Finland Uniform Coordinate System,Transverse Mercator,metre,4123,Kartastokoordinaattijarjestelma (1966),International 1924,3500000,0,0,27,1
+2394,KKJ / Finland zone 4,Transverse Mercator,metre,4123,Kartastokoordinaattijarjestelma (1966),International 1924,4500000,0,0,30,1
+2395,South Yemen / Gauss-Kruger zone 8,Transverse Mercator,metre,4164,South Yemen,Krassowsky 1940,8500000,0,0,45,1
+2396,South Yemen / Gauss-Kruger zone 9,Transverse Mercator,metre,4164,South Yemen,Krassowsky 1940,9500000,0,0,51,1
+2397,Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 3,Transverse Mercator,metre,4178,Pulkovo 1942(83),Krassowsky 1940,3500000,0,0,9,1
+2398,Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 4,Transverse Mercator,metre,4178,Pulkovo 1942(83),Krassowsky 1940,4500000,0,0,12,1
+2399,Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 5,Transverse Mercator,metre,4178,Pulkovo 1942(83),Krassowsky 1940,5500000,0,0,15,1
+2401,Beijing 1954 / 3-degree Gauss-Kruger zone 25,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,25500000,0,0,75,1
+2402,Beijing 1954 / 3-degree Gauss-Kruger zone 26,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,26500000,0,0,78,1
+2403,Beijing 1954 / 3-degree Gauss-Kruger zone 27,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,27500000,0,0,81,1
+2404,Beijing 1954 / 3-degree Gauss-Kruger zone 28,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,28500000,0,0,84,1
+2405,Beijing 1954 / 3-degree Gauss-Kruger zone 29,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,29500000,0,0,87,1
+2406,Beijing 1954 / 3-degree Gauss-Kruger zone 30,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,30500000,0,0,90,1
+2407,Beijing 1954 / 3-degree Gauss-Kruger zone 31,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,31500000,0,0,93,1
+2408,Beijing 1954 / 3-degree Gauss-Kruger zone 32,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,32500000,0,0,96,1
+2409,Beijing 1954 / 3-degree Gauss-Kruger zone 33,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,33500000,0,0,99,1
+2410,Beijing 1954 / 3-degree Gauss-Kruger zone 34,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,34500000,0,0,102,1
+2411,Beijing 1954 / 3-degree Gauss-Kruger zone 35,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,35500000,0,0,105,1
+2412,Beijing 1954 / 3-degree Gauss-Kruger zone 36,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,36500000,0,0,108,1
+2413,Beijing 1954 / 3-degree Gauss-Kruger zone 37,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,37500000,0,0,111,1
+2414,Beijing 1954 / 3-degree Gauss-Kruger zone 38,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,38500000,0,0,114,1
+2415,Beijing 1954 / 3-degree Gauss-Kruger zone 39,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,39500000,0,0,117,1
+2416,Beijing 1954 / 3-degree Gauss-Kruger zone 40,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,40500000,0,0,120,1
+2417,Beijing 1954 / 3-degree Gauss-Kruger zone 41,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,41500000,0,0,123,1
+2418,Beijing 1954 / 3-degree Gauss-Kruger zone 42,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,42500000,0,0,126,1
+2419,Beijing 1954 / 3-degree Gauss-Kruger zone 43,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,43500000,0,0,129,1
+2420,Beijing 1954 / 3-degree Gauss-Kruger zone 44,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,44500000,0,0,132,1
+2421,Beijing 1954 / 3-degree Gauss-Kruger zone 45,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,45500000,0,0,135,1
+2422,Beijing 1954 / 3-degree Gauss-Kruger CM 75E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,75,1
+2423,Beijing 1954 / 3-degree Gauss-Kruger CM 78E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,78,1
+2424,Beijing 1954 / 3-degree Gauss-Kruger CM 81E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,81,1
+2425,Beijing 1954 / 3-degree Gauss-Kruger CM 84E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,84,1
+2426,Beijing 1954 / 3-degree Gauss-Kruger CM 87E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,87,1
+2427,Beijing 1954 / 3-degree Gauss-Kruger CM 90E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,90,1
+2428,Beijing 1954 / 3-degree Gauss-Kruger CM 93E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,93,1
+2429,Beijing 1954 / 3-degree Gauss-Kruger CM 96E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,96,1
+2430,Beijing 1954 / 3-degree Gauss-Kruger CM 99E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,99,1
+2431,Beijing 1954 / 3-degree Gauss-Kruger CM 102E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,102,1
+2432,Beijing 1954 / 3-degree Gauss-Kruger CM 105E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,105,1
+2433,Beijing 1954 / 3-degree Gauss-Kruger CM 108E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,108,1
+2434,Beijing 1954 / 3-degree Gauss-Kruger CM 111E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,111,1
+2435,Beijing 1954 / 3-degree Gauss-Kruger CM 114E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,114,1
+2436,Beijing 1954 / 3-degree Gauss-Kruger CM 117E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,117,1
+2437,Beijing 1954 / 3-degree Gauss-Kruger CM 120E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,120,1
+2438,Beijing 1954 / 3-degree Gauss-Kruger CM 123E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,123,1
+2439,Beijing 1954 / 3-degree Gauss-Kruger CM 126E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,126,1
+2440,Beijing 1954 / 3-degree Gauss-Kruger CM 129E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,129,1
+2441,Beijing 1954 / 3-degree Gauss-Kruger CM 132E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,132,1
+2442,Beijing 1954 / 3-degree Gauss-Kruger CM 135E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,135,1
+2443,JGD2000 / Japan Plane Rectangular CS I,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,33,0,129.3,0.9999
+2444,JGD2000 / Japan Plane Rectangular CS II,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,33,0,131,0.9999
+2445,JGD2000 / Japan Plane Rectangular CS III,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,36,0,132.1,0.9999
+2446,JGD2000 / Japan Plane Rectangular CS IV,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,33,0,133.3,0.9999
+2447,JGD2000 / Japan Plane Rectangular CS V,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,36,0,134.2,0.9999
+2448,JGD2000 / Japan Plane Rectangular CS VI,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,36,0,136,0.9999
+2449,JGD2000 / Japan Plane Rectangular CS VII,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,36,0,137.1,0.9999
+2450,JGD2000 / Japan Plane Rectangular CS VIII,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,36,0,138.3,0.9999
+2451,JGD2000 / Japan Plane Rectangular CS IX,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,36,0,139.5,0.9999
+2452,JGD2000 / Japan Plane Rectangular CS X,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,40,0,140.5,0.9999
+2453,JGD2000 / Japan Plane Rectangular CS XI,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,44,0,140.15,0.9999
+2454,JGD2000 / Japan Plane Rectangular CS XII,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,44,0,142.15,0.9999
+2455,JGD2000 / Japan Plane Rectangular CS XIII,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,44,0,144.15,0.9999
+2456,JGD2000 / Japan Plane Rectangular CS XIV,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,26,0,142,0.9999
+2457,JGD2000 / Japan Plane Rectangular CS XV,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,26,0,127.3,0.9999
+2458,JGD2000 / Japan Plane Rectangular CS XVI,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,26,0,124,0.9999
+2459,JGD2000 / Japan Plane Rectangular CS XVII,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,26,0,131,0.9999
+2460,JGD2000 / Japan Plane Rectangular CS XVIII,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,20,0,136,0.9999
+2461,JGD2000 / Japan Plane Rectangular CS XIX,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,26,0,154,0.9999
+2462,Albanian 1987 / Gauss-Kruger zone 4,Transverse Mercator,metre,4191,Albanian 1987,Krassowsky 1940,4500000,0,0,21,1
+2463,Pulkovo 1995 / Gauss-Kruger CM 21E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,21,1
+2464,Pulkovo 1995 / Gauss-Kruger CM 27E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,27,1
+2465,Pulkovo 1995 / Gauss-Kruger CM 33E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,33,1
+2466,Pulkovo 1995 / Gauss-Kruger CM 39E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,39,1
+2467,Pulkovo 1995 / Gauss-Kruger CM 45E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,45,1
+2468,Pulkovo 1995 / Gauss-Kruger CM 51E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,51,1
+2469,Pulkovo 1995 / Gauss-Kruger CM 57E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,57,1
+2470,Pulkovo 1995 / Gauss-Kruger CM 63E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,63,1
+2471,Pulkovo 1995 / Gauss-Kruger CM 69E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,69,1
+2472,Pulkovo 1995 / Gauss-Kruger CM 75E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,75,1
+2473,Pulkovo 1995 / Gauss-Kruger CM 81E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,81,1
+2474,Pulkovo 1995 / Gauss-Kruger CM 87E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,87,1
+2475,Pulkovo 1995 / Gauss-Kruger CM 93E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,93,1
+2476,Pulkovo 1995 / Gauss-Kruger CM 99E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,99,1
+2477,Pulkovo 1995 / Gauss-Kruger CM 105E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,105,1
+2478,Pulkovo 1995 / Gauss-Kruger CM 111E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,111,1
+2479,Pulkovo 1995 / Gauss-Kruger CM 117E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,117,1
+2480,Pulkovo 1995 / Gauss-Kruger CM 123E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,123,1
+2481,Pulkovo 1995 / Gauss-Kruger CM 129E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,129,1
+2482,Pulkovo 1995 / Gauss-Kruger CM 135E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,135,1
+2483,Pulkovo 1995 / Gauss-Kruger CM 141E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,141,1
+2484,Pulkovo 1995 / Gauss-Kruger CM 147E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,147,1
+2485,Pulkovo 1995 / Gauss-Kruger CM 153E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,153,1
+2486,Pulkovo 1995 / Gauss-Kruger CM 159E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,159,1
+2487,Pulkovo 1995 / Gauss-Kruger CM 165E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,165,1
+2488,Pulkovo 1995 / Gauss-Kruger CM 171E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,171,1
+2489,Pulkovo 1995 / Gauss-Kruger CM 177E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,177,1
+2490,Pulkovo 1995 / Gauss-Kruger CM 177W,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,-177,1
+2491,Pulkovo 1995 / Gauss-Kruger CM 171W,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,-171,1
+2494,Pulkovo 1942 / Gauss-Kruger CM 21E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,21,1
+2495,Pulkovo 1942 / Gauss-Kruger CM 27E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,27,1
+2496,Pulkovo 1942 / Gauss-Kruger CM 33E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,33,1
+2497,Pulkovo 1942 / Gauss-Kruger CM 39E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,39,1
+2498,Pulkovo 1942 / Gauss-Kruger CM 45E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,45,1
+2499,Pulkovo 1942 / Gauss-Kruger CM 51E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,51,1
+2500,Pulkovo 1942 / Gauss-Kruger CM 57E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,57,1
+2501,Pulkovo 1942 / Gauss-Kruger CM 63E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,63,1
+2502,Pulkovo 1942 / Gauss-Kruger CM 69E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,69,1
+2503,Pulkovo 1942 / Gauss-Kruger CM 75E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,75,1
+2504,Pulkovo 1942 / Gauss-Kruger CM 81E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,81,1
+2505,Pulkovo 1942 / Gauss-Kruger CM 87E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,87,1
+2506,Pulkovo 1942 / Gauss-Kruger CM 93E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,93,1
+2507,Pulkovo 1942 / Gauss-Kruger CM 99E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,99,1
+2508,Pulkovo 1942 / Gauss-Kruger CM 105E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,105,1
+2509,Pulkovo 1942 / Gauss-Kruger CM 111E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,111,1
+2510,Pulkovo 1942 / Gauss-Kruger CM 117E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,117,1
+2511,Pulkovo 1942 / Gauss-Kruger CM 123E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,123,1
+2512,Pulkovo 1942 / Gauss-Kruger CM 129E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,129,1
+2513,Pulkovo 1942 / Gauss-Kruger CM 135E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,135,1
+2514,Pulkovo 1942 / Gauss-Kruger CM 141E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,141,1
+2515,Pulkovo 1942 / Gauss-Kruger CM 147E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,147,1
+2516,Pulkovo 1942 / Gauss-Kruger CM 153E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,153,1
+2517,Pulkovo 1942 / Gauss-Kruger CM 159E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,159,1
+2518,Pulkovo 1942 / Gauss-Kruger CM 165E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,165,1
+2519,Pulkovo 1942 / Gauss-Kruger CM 171E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,171,1
+2520,Pulkovo 1942 / Gauss-Kruger CM 177E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,177,1
+2521,Pulkovo 1942 / Gauss-Kruger CM 177W,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,-177,1
+2522,Pulkovo 1942 / Gauss-Kruger CM 171W,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,-171,1
+2523,Pulkovo 1942 / 3-degree Gauss-Kruger zone 7,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,7500000,0,0,21,1
+2524,Pulkovo 1942 / 3-degree Gauss-Kruger zone 8,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,8500000,0,0,24,1
+2525,Pulkovo 1942 / 3-degree Gauss-Kruger zone 9,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,9500000,0,0,27,1
+2526,Pulkovo 1942 / 3-degree Gauss-Kruger zone 10,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,10500000,0,0,30,1
+2527,Pulkovo 1942 / 3-degree Gauss-Kruger zone 11,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,11500000,0,0,33,1
+2528,Pulkovo 1942 / 3-degree Gauss-Kruger zone 12,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,12500000,0,0,36,1
+2529,Pulkovo 1942 / 3-degree Gauss-Kruger zone 13,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,13500000,0,0,39,1
+2530,Pulkovo 1942 / 3-degree Gauss-Kruger zone 14,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,14500000,0,0,42,1
+2531,Pulkovo 1942 / 3-degree Gauss-Kruger zone 15,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,15500000,0,0,45,1
+2532,Pulkovo 1942 / 3-degree Gauss-Kruger zone 16,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,16500000,0,0,48,1
+2533,Pulkovo 1942 / 3-degree Gauss-Kruger zone 17,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,17500000,0,0,51,1
+2534,Pulkovo 1942 / 3-degree Gauss-Kruger zone 18,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,18500000,0,0,54,1
+2535,Pulkovo 1942 / 3-degree Gauss-Kruger zone 19,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,19500000,0,0,57,1
+2536,Pulkovo 1942 / 3-degree Gauss-Kruger zone 20,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,20500000,0,0,60,1
+2537,Pulkovo 1942 / 3-degree Gauss-Kruger zone 21,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,21500000,0,0,63,1
+2538,Pulkovo 1942 / 3-degree Gauss-Kruger zone 22,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,22500000,0,0,66,1
+2539,Pulkovo 1942 / 3-degree Gauss-Kruger zone 23,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,23500000,0,0,69,1
+2540,Pulkovo 1942 / 3-degree Gauss-Kruger zone 24,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,24500000,0,0,72,1
+2541,Pulkovo 1942 / 3-degree Gauss-Kruger zone 25,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,25500000,0,0,75,1
+2542,Pulkovo 1942 / 3-degree Gauss-Kruger zone 26,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,26500000,0,0,78,1
+2543,Pulkovo 1942 / 3-degree Gauss-Kruger zone 27,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,27500000,0,0,81,1
+2544,Pulkovo 1942 / 3-degree Gauss-Kruger zone 28,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,28500000,0,0,84,1
+2545,Pulkovo 1942 / 3-degree Gauss-Kruger zone 29,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,29500000,0,0,87,1
+2546,Pulkovo 1942 / 3-degree Gauss-Kruger zone 30,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,30500000,0,0,90,1
+2547,Pulkovo 1942 / 3-degree Gauss-Kruger zone 31,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,31500000,0,0,93,1
+2548,Pulkovo 1942 / 3-degree Gauss-Kruger zone 32,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,32500000,0,0,96,1
+2549,Pulkovo 1942 / 3-degree Gauss-Kruger zone 33,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,33500000,0,0,99,1
+2551,Pulkovo 1942 / 3-degree Gauss-Kruger zone 34,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,34500000,0,0,102,1
+2552,Pulkovo 1942 / 3-degree Gauss-Kruger zone 35,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,35500000,0,0,105,1
+2553,Pulkovo 1942 / 3-degree Gauss-Kruger zone 36,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,36500000,0,0,108,1
+2554,Pulkovo 1942 / 3-degree Gauss-Kruger zone 37,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,37500000,0,0,111,1
+2555,Pulkovo 1942 / 3-degree Gauss-Kruger zone 38,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,38500000,0,0,114,1
+2556,Pulkovo 1942 / 3-degree Gauss-Kruger zone 39,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,39500000,0,0,117,1
+2557,Pulkovo 1942 / 3-degree Gauss-Kruger zone 40,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,40500000,0,0,120,1
+2558,Pulkovo 1942 / 3-degree Gauss-Kruger zone 41,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,41500000,0,0,123,1
+2559,Pulkovo 1942 / 3-degree Gauss-Kruger zone 42,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,42500000,0,0,126,1
+2560,Pulkovo 1942 / 3-degree Gauss-Kruger zone 43,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,43500000,0,0,129,1
+2561,Pulkovo 1942 / 3-degree Gauss-Kruger zone 44,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,44500000,0,0,132,1
+2562,Pulkovo 1942 / 3-degree Gauss-Kruger zone 45,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,45500000,0,0,135,1
+2563,Pulkovo 1942 / 3-degree Gauss-Kruger zone 46,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,46500000,0,0,138,1
+2564,Pulkovo 1942 / 3-degree Gauss-Kruger zone 47,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,47500000,0,0,141,1
+2565,Pulkovo 1942 / 3-degree Gauss-Kruger zone 48,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,48500000,0,0,144,1
+2566,Pulkovo 1942 / 3-degree Gauss-Kruger zone 49,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,49500000,0,0,147,1
+2567,Pulkovo 1942 / 3-degree Gauss-Kruger zone 50,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,50500000,0,0,150,1
+2568,Pulkovo 1942 / 3-degree Gauss-Kruger zone 51,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,51500000,0,0,153,1
+2569,Pulkovo 1942 / 3-degree Gauss-Kruger zone 52,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,52500000,0,0,156,1
+2570,Pulkovo 1942 / 3-degree Gauss-Kruger zone 53,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,53500000,0,0,159,1
+2571,Pulkovo 1942 / 3-degree Gauss-Kruger zone 54,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,54500000,0,0,162,1
+2572,Pulkovo 1942 / 3-degree Gauss-Kruger zone 55,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,55500000,0,0,165,1
+2573,Pulkovo 1942 / 3-degree Gauss-Kruger zone 56,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,56500000,0,0,168,1
+2574,Pulkovo 1942 / 3-degree Gauss-Kruger zone 57,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,57500000,0,0,171,1
+2575,Pulkovo 1942 / 3-degree Gauss-Kruger zone 58,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,58500000,0,0,174,1
+2576,Pulkovo 1942 / 3-degree Gauss-Kruger zone 59,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,59500000,0,0,177,1
+2578,Pulkovo 1942 / 3-degree Gauss-Kruger zone 61,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,61500000,0,0,-177,1
+2579,Pulkovo 1942 / 3-degree Gauss-Kruger zone 62,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,62500000,0,0,-174,1
+2580,Pulkovo 1942 / 3-degree Gauss-Kruger zone 63,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,63500000,0,0,-171,1
+2581,Pulkovo 1942 / 3-degree Gauss-Kruger zone 64,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,64500000,0,0,-168,1
+2582,Pulkovo 1942 / 3-degree Gauss-Kruger CM 21E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,21,1
+2583,Pulkovo 1942 / 3-degree Gauss-Kruger CM 24E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,24,1
+2584,Pulkovo 1942 / 3-degree Gauss-Kruger CM 27E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,27,1
+2585,Pulkovo 1942 / 3-degree Gauss-Kruger CM 30E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,30,1
+2586,Pulkovo 1942 / 3-degree Gauss-Kruger CM 33E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,33,1
+2587,Pulkovo 1942 / 3-degree Gauss-Kruger CM 36E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,36,1
+2588,Pulkovo 1942 / 3-degree Gauss-Kruger CM 39E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,39,1
+2589,Pulkovo 1942 / 3-degree Gauss-Kruger CM 42E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,42,1
+2590,Pulkovo 1942 / 3-degree Gauss-Kruger CM 45E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,45,1
+2591,Pulkovo 1942 / 3-degree Gauss-Kruger CM 48E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,48,1
+2592,Pulkovo 1942 / 3-degree Gauss-Kruger CM 51E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,51,1
+2593,Pulkovo 1942 / 3-degree Gauss-Kruger CM 54E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,54,1
+2594,Pulkovo 1942 / 3-degree Gauss-Kruger CM 57E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,57,1
+2595,Pulkovo 1942 / 3-degree Gauss-Kruger CM 60E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,60,1
+2596,Pulkovo 1942 / 3-degree Gauss-Kruger CM 63E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,63,1
+2597,Pulkovo 1942 / 3-degree Gauss-Kruger CM 66E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,66,1
+2598,Pulkovo 1942 / 3-degree Gauss-Kruger CM 69E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,69,1
+2599,Pulkovo 1942 / 3-degree Gauss-Kruger CM 72E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,72,1
+2601,Pulkovo 1942 / 3-degree Gauss-Kruger CM 75E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,75,1
+2602,Pulkovo 1942 / 3-degree Gauss-Kruger CM 78E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,78,1
+2603,Pulkovo 1942 / 3-degree Gauss-Kruger CM 81E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,81,1
+2604,Pulkovo 1942 / 3-degree Gauss-Kruger CM 84E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,84,1
+2605,Pulkovo 1942 / 3-degree Gauss-Kruger CM 87E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,87,1
+2606,Pulkovo 1942 / 3-degree Gauss-Kruger CM 90E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,90,1
+2607,Pulkovo 1942 / 3-degree Gauss-Kruger CM 93E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,93,1
+2608,Pulkovo 1942 / 3-degree Gauss-Kruger CM 96E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,96,1
+2609,Pulkovo 1942 / 3-degree Gauss-Kruger CM 99E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,99,1
+2610,Pulkovo 1942 / 3-degree Gauss-Kruger CM 102E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,102,1
+2611,Pulkovo 1942 / 3-degree Gauss-Kruger CM 105E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,105,1
+2612,Pulkovo 1942 / 3-degree Gauss-Kruger CM 108E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,108,1
+2613,Pulkovo 1942 / 3-degree Gauss-Kruger CM 111E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,111,1
+2614,Pulkovo 1942 / 3-degree Gauss-Kruger CM 114E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,114,1
+2615,Pulkovo 1942 / 3-degree Gauss-Kruger CM 117E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,117,1
+2616,Pulkovo 1942 / 3-degree Gauss-Kruger CM 120E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,120,1
+2617,Pulkovo 1942 / 3-degree Gauss-Kruger CM 123E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,123,1
+2618,Pulkovo 1942 / 3-degree Gauss-Kruger CM 126E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,126,1
+2619,Pulkovo 1942 / 3-degree Gauss-Kruger CM 129E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,129,1
+2620,Pulkovo 1942 / 3-degree Gauss-Kruger CM 132E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,132,1
+2621,Pulkovo 1942 / 3-degree Gauss-Kruger CM 135E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,135,1
+2622,Pulkovo 1942 / 3-degree Gauss-Kruger CM 138E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,138,1
+2623,Pulkovo 1942 / 3-degree Gauss-Kruger CM 141E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,141,1
+2624,Pulkovo 1942 / 3-degree Gauss-Kruger CM 144E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,144,1
+2625,Pulkovo 1942 / 3-degree Gauss-Kruger CM 147E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,147,1
+2626,Pulkovo 1942 / 3-degree Gauss-Kruger CM 150E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,150,1
+2627,Pulkovo 1942 / 3-degree Gauss-Kruger CM 153E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,153,1
+2628,Pulkovo 1942 / 3-degree Gauss-Kruger CM 156E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,156,1
+2629,Pulkovo 1942 / 3-degree Gauss-Kruger CM 159E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,159,1
+2630,Pulkovo 1942 / 3-degree Gauss-Kruger CM 162E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,162,1
+2631,Pulkovo 1942 / 3-degree Gauss-Kruger CM 165E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,165,1
+2632,Pulkovo 1942 / 3-degree Gauss-Kruger CM 168E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,168,1
+2633,Pulkovo 1942 / 3-degree Gauss-Kruger CM 171E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,171,1
+2634,Pulkovo 1942 / 3-degree Gauss-Kruger CM 174E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,174,1
+2635,Pulkovo 1942 / 3-degree Gauss-Kruger CM 177E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,177,1
+2636,Pulkovo 1942 / 3-degree Gauss-Kruger CM 180E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,180,1
+2637,Pulkovo 1942 / 3-degree Gauss-Kruger CM 177W,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,-177,1
+2638,Pulkovo 1942 / 3-degree Gauss-Kruger CM 174W,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,-174,1
+2639,Pulkovo 1942 / 3-degree Gauss-Kruger CM 171W,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,-171,1
+2640,Pulkovo 1942 / 3-degree Gauss-Kruger CM 168W,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,-168,1
+2641,Pulkovo 1995 / 3-degree Gauss-Kruger zone 7,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,7500000,0,0,21,1
+2642,Pulkovo 1995 / 3-degree Gauss-Kruger zone 8,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,8500000,0,0,24,1
+2643,Pulkovo 1995 / 3-degree Gauss-Kruger zone 9,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,9500000,0,0,27,1
+2644,Pulkovo 1995 / 3-degree Gauss-Kruger zone 10,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,10500000,0,0,30,1
+2645,Pulkovo 1995 / 3-degree Gauss-Kruger zone 11,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,11500000,0,0,33,1
+2646,Pulkovo 1995 / 3-degree Gauss-Kruger zone 12,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,12500000,0,0,36,1
+2647,Pulkovo 1995 / 3-degree Gauss-Kruger zone 13,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,13500000,0,0,39,1
+2648,Pulkovo 1995 / 3-degree Gauss-Kruger zone 14,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,14500000,0,0,42,1
+2649,Pulkovo 1995 / 3-degree Gauss-Kruger zone 15,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,15500000,0,0,45,1
+2650,Pulkovo 1995 / 3-degree Gauss-Kruger zone 16,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,16500000,0,0,48,1
+2651,Pulkovo 1995 / 3-degree Gauss-Kruger zone 17,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,17500000,0,0,51,1
+2652,Pulkovo 1995 / 3-degree Gauss-Kruger zone 18,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,18500000,0,0,54,1
+2653,Pulkovo 1995 / 3-degree Gauss-Kruger zone 19,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,19500000,0,0,57,1
+2654,Pulkovo 1995 / 3-degree Gauss-Kruger zone 20,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,20500000,0,0,60,1
+2655,Pulkovo 1995 / 3-degree Gauss-Kruger zone 21,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,21500000,0,0,63,1
+2656,Pulkovo 1995 / 3-degree Gauss-Kruger zone 22,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,22500000,0,0,66,1
+2657,Pulkovo 1995 / 3-degree Gauss-Kruger zone 23,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,23500000,0,0,69,1
+2658,Pulkovo 1995 / 3-degree Gauss-Kruger zone 24,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,24500000,0,0,72,1
+2659,Pulkovo 1995 / 3-degree Gauss-Kruger zone 25,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,25500000,0,0,75,1
+2660,Pulkovo 1995 / 3-degree Gauss-Kruger zone 26,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,26500000,0,0,78,1
+2661,Pulkovo 1995 / 3-degree Gauss-Kruger zone 27,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,27500000,0,0,81,1
+2662,Pulkovo 1995 / 3-degree Gauss-Kruger zone 28,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,28500000,0,0,84,1
+2663,Pulkovo 1995 / 3-degree Gauss-Kruger zone 29,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,29500000,0,0,87,1
+2664,Pulkovo 1995 / 3-degree Gauss-Kruger zone 30,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,30500000,0,0,90,1
+2665,Pulkovo 1995 / 3-degree Gauss-Kruger zone 31,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,31500000,0,0,93,1
+2666,Pulkovo 1995 / 3-degree Gauss-Kruger zone 32,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,32500000,0,0,96,1
+2667,Pulkovo 1995 / 3-degree Gauss-Kruger zone 33,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,33500000,0,0,99,1
+2668,Pulkovo 1995 / 3-degree Gauss-Kruger zone 34,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,34500000,0,0,102,1
+2669,Pulkovo 1995 / 3-degree Gauss-Kruger zone 35,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,35500000,0,0,105,1
+2670,Pulkovo 1995 / 3-degree Gauss-Kruger zone 36,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,36500000,0,0,108,1
+2671,Pulkovo 1995 / 3-degree Gauss-Kruger zone 37,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,37500000,0,0,111,1
+2672,Pulkovo 1995 / 3-degree Gauss-Kruger zone 38,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,38500000,0,0,114,1
+2673,Pulkovo 1995 / 3-degree Gauss-Kruger zone 39,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,39500000,0,0,117,1
+2674,Pulkovo 1995 / 3-degree Gauss-Kruger zone 40,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,40500000,0,0,120,1
+2675,Pulkovo 1995 / 3-degree Gauss-Kruger zone 41,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,41500000,0,0,123,1
+2676,Pulkovo 1995 / 3-degree Gauss-Kruger zone 42,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,42500000,0,0,126,1
+2677,Pulkovo 1995 / 3-degree Gauss-Kruger zone 43,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,43500000,0,0,129,1
+2678,Pulkovo 1995 / 3-degree Gauss-Kruger zone 44,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,44500000,0,0,132,1
+2679,Pulkovo 1995 / 3-degree Gauss-Kruger zone 45,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,45500000,0,0,135,1
+2680,Pulkovo 1995 / 3-degree Gauss-Kruger zone 46,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,46500000,0,0,138,1
+2681,Pulkovo 1995 / 3-degree Gauss-Kruger zone 47,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,47500000,0,0,141,1
+2682,Pulkovo 1995 / 3-degree Gauss-Kruger zone 48,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,48500000,0,0,144,1
+2683,Pulkovo 1995 / 3-degree Gauss-Kruger zone 49,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,49500000,0,0,147,1
+2684,Pulkovo 1995 / 3-degree Gauss-Kruger zone 50,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,50500000,0,0,150,1
+2685,Pulkovo 1995 / 3-degree Gauss-Kruger zone 51,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,51500000,0,0,153,1
+2686,Pulkovo 1995 / 3-degree Gauss-Kruger zone 52,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,52500000,0,0,156,1
+2687,Pulkovo 1995 / 3-degree Gauss-Kruger zone 53,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,53500000,0,0,159,1
+2688,Pulkovo 1995 / 3-degree Gauss-Kruger zone 54,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,54500000,0,0,162,1
+2689,Pulkovo 1995 / 3-degree Gauss-Kruger zone 55,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,55500000,0,0,165,1
+2690,Pulkovo 1995 / 3-degree Gauss-Kruger zone 56,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,56500000,0,0,168,1
+2691,Pulkovo 1995 / 3-degree Gauss-Kruger zone 57,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,57500000,0,0,171,1
+2692,Pulkovo 1995 / 3-degree Gauss-Kruger zone 58,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,58500000,0,0,174,1
+2693,Pulkovo 1995 / 3-degree Gauss-Kruger zone 59,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,59500000,0,0,177,1
+2695,Pulkovo 1995 / 3-degree Gauss-Kruger zone 61,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,61500000,0,0,-177,1
+2696,Pulkovo 1995 / 3-degree Gauss-Kruger zone 62,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,62500000,0,0,-174,1
+2697,Pulkovo 1995 / 3-degree Gauss-Kruger zone 63,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,63500000,0,0,-171,1
+2698,Pulkovo 1995 / 3-degree Gauss-Kruger zone 64,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,64500000,0,0,-168,1
+2699,Pulkovo 1995 / 3-degree Gauss-Kruger CM 21E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,21,1
+2700,Pulkovo 1995 / 3-degree Gauss-Kruger CM 24E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,24,1
+2701,Pulkovo 1995 / 3-degree Gauss-Kruger CM 27E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,27,1
+2702,Pulkovo 1995 / 3-degree Gauss-Kruger CM 30E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,30,1
+2703,Pulkovo 1995 / 3-degree Gauss-Kruger CM 33E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,33,1
+2704,Pulkovo 1995 / 3-degree Gauss-Kruger CM 36E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,36,1
+2705,Pulkovo 1995 / 3-degree Gauss-Kruger CM 39E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,39,1
+2706,Pulkovo 1995 / 3-degree Gauss-Kruger CM 42E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,42,1
+2707,Pulkovo 1995 / 3-degree Gauss-Kruger CM 45E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,45,1
+2708,Pulkovo 1995 / 3-degree Gauss-Kruger CM 48E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,48,1
+2709,Pulkovo 1995 / 3-degree Gauss-Kruger CM 51E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,51,1
+2710,Pulkovo 1995 / 3-degree Gauss-Kruger CM 54E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,54,1
+2711,Pulkovo 1995 / 3-degree Gauss-Kruger CM 57E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,57,1
+2712,Pulkovo 1995 / 3-degree Gauss-Kruger CM 60E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,60,1
+2713,Pulkovo 1995 / 3-degree Gauss-Kruger CM 63E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,63,1
+2714,Pulkovo 1995 / 3-degree Gauss-Kruger CM 66E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,66,1
+2715,Pulkovo 1995 / 3-degree Gauss-Kruger CM 69E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,69,1
+2716,Pulkovo 1995 / 3-degree Gauss-Kruger CM 72E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,72,1
+2717,Pulkovo 1995 / 3-degree Gauss-Kruger CM 75E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,75,1
+2718,Pulkovo 1995 / 3-degree Gauss-Kruger CM 78E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,78,1
+2719,Pulkovo 1995 / 3-degree Gauss-Kruger CM 81E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,81,1
+2720,Pulkovo 1995 / 3-degree Gauss-Kruger CM 84E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,84,1
+2721,Pulkovo 1995 / 3-degree Gauss-Kruger CM 87E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,87,1
+2722,Pulkovo 1995 / 3-degree Gauss-Kruger CM 90E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,90,1
+2723,Pulkovo 1995 / 3-degree Gauss-Kruger CM 93E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,93,1
+2724,Pulkovo 1995 / 3-degree Gauss-Kruger CM 96E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,96,1
+2725,Pulkovo 1995 / 3-degree Gauss-Kruger CM 99E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,99,1
+2726,Pulkovo 1995 / 3-degree Gauss-Kruger CM 102E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,102,1
+2727,Pulkovo 1995 / 3-degree Gauss-Kruger CM 105E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,105,1
+2728,Pulkovo 1995 / 3-degree Gauss-Kruger CM 108E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,108,1
+2729,Pulkovo 1995 / 3-degree Gauss-Kruger CM 111E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,111,1
+2730,Pulkovo 1995 / 3-degree Gauss-Kruger CM 114E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,114,1
+2731,Pulkovo 1995 / 3-degree Gauss-Kruger CM 117E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,117,1
+2732,Pulkovo 1995 / 3-degree Gauss-Kruger CM 120E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,120,1
+2733,Pulkovo 1995 / 3-degree Gauss-Kruger CM 123E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,123,1
+2734,Pulkovo 1995 / 3-degree Gauss-Kruger CM 126E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,126,1
+2735,Pulkovo 1995 / 3-degree Gauss-Kruger CM 129E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,129,1
+2736,Tete / UTM zone 36S,Transverse Mercator,metre,4127,Tete,Clarke 1866,500000,0,10000000,33,0.9996
+2737,Tete / UTM zone 37S,Transverse Mercator,metre,4127,Tete,Clarke 1866,500000,0,10000000,39,0.9996
+2738,Pulkovo 1995 / 3-degree Gauss-Kruger CM 132E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,132,1
+2739,Pulkovo 1995 / 3-degree Gauss-Kruger CM 135E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,135,1
+2740,Pulkovo 1995 / 3-degree Gauss-Kruger CM 138E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,138,1
+2741,Pulkovo 1995 / 3-degree Gauss-Kruger CM 141E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,141,1
+2742,Pulkovo 1995 / 3-degree Gauss-Kruger CM 144E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,144,1
+2743,Pulkovo 1995 / 3-degree Gauss-Kruger CM 147E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,147,1
+2744,Pulkovo 1995 / 3-degree Gauss-Kruger CM 150E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,150,1
+2745,Pulkovo 1995 / 3-degree Gauss-Kruger CM 153E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,153,1
+2746,Pulkovo 1995 / 3-degree Gauss-Kruger CM 156E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,156,1
+2747,Pulkovo 1995 / 3-degree Gauss-Kruger CM 159E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,159,1
+2748,Pulkovo 1995 / 3-degree Gauss-Kruger CM 162E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,162,1
+2749,Pulkovo 1995 / 3-degree Gauss-Kruger CM 165E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,165,1
+2750,Pulkovo 1995 / 3-degree Gauss-Kruger CM 168E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,168,1
+2751,Pulkovo 1995 / 3-degree Gauss-Kruger CM 171E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,171,1
+2752,Pulkovo 1995 / 3-degree Gauss-Kruger CM 174E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,174,1
+2753,Pulkovo 1995 / 3-degree Gauss-Kruger CM 177E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,177,1
+2754,Pulkovo 1995 / 3-degree Gauss-Kruger CM 180E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,180,1
+2755,Pulkovo 1995 / 3-degree Gauss-Kruger CM 177W,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,-177,1
+2756,Pulkovo 1995 / 3-degree Gauss-Kruger CM 174W,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,-174,1
+2757,Pulkovo 1995 / 3-degree Gauss-Kruger CM 171W,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,-171,1
+2758,Pulkovo 1995 / 3-degree Gauss-Kruger CM 168W,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,-168,1
+2759,NAD83(HARN) / Alabama East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,200000,30.3,0,-85.5,0.99996
+2760,NAD83(HARN) / Alabama West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,600000,30,0,-87.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2761,NAD83(HARN) / Arizona East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,213360,31,0,-110.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2762,NAD83(HARN) / Arizona Central,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,213360,31,0,-111.55,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2763,NAD83(HARN) / Arizona West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,213360,31,0,-113.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2764,NAD83(HARN) / Arkansas North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.56,34.2,-92,36.14,0,400000
+2765,NAD83(HARN) / Arkansas South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.18,32.4,-92,34.46,400000,400000
+2766,NAD83(HARN) / California zone 1,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.2,-122,41.4,500000,2000000
+2767,NAD83(HARN) / California zone 2,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.2,37.4,-122,39.5,500000,2000000
+2768,NAD83(HARN) / California zone 3,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.04,36.3,-120.3,38.26,500000,2000000
+2769,NAD83(HARN) / California zone 4,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,35.2,-119,37.15,500000,2000000
+2770,NAD83(HARN) / California zone 5,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.02,33.3,-118,35.28,500000,2000000
+2771,NAD83(HARN) / California zone 6,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.47,32.1,-116.15,33.53,500000,2000000
+2772,NAD83(HARN) / Colorado North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.43,39.2,-105.3,40.47,304800.6096,914401.8289
+2773,NAD83(HARN) / Colorado Central,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.27,37.5,-105.3,39.45,304800.6096,914401.8289
+2774,NAD83(HARN) / Colorado South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.14,36.4,-105.3,38.26,304800.6096,914401.8289
+2775,NAD83(HARN) / Connecticut,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.12,40.5,-72.45,41.52,152400.3048,304800.6096
+2776,NAD83(HARN) / Delaware,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,200000,38,0,-75.25,0.999995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2777,NAD83(HARN) / Florida East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,200000,24.2,0,-81,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2778,NAD83(HARN) / Florida West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,200000,24.2,0,-82,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2779,NAD83(HARN) / Florida North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.35,29,-84.3,30.45,0,600000
+2780,NAD83(HARN) / Georgia East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,200000,30,0,-82.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2781,NAD83(HARN) / Georgia West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,700000,30,0,-84.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2782,NAD83(HARN) / Hawaii zone 1,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,18.5,0,-155.3,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2783,NAD83(HARN) / Hawaii zone 2,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,20.2,0,-156.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2784,NAD83(HARN) / Hawaii zone 3,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,21.1,0,-158,0.99999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2785,NAD83(HARN) / Hawaii zone 4,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,21.5,0,-159.3,0.99999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2786,NAD83(HARN) / Hawaii zone 5,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,21.4,0,-160.1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2787,NAD83(HARN) / Idaho East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,200000,41.4,0,-112.1,0.999947368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2788,NAD83(HARN) / Idaho Central,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,41.4,0,-114,0.999947368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2789,NAD83(HARN) / Idaho West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,800000,41.4,0,-115.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2790,NAD83(HARN) / Illinois East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,300000,36.4,0,-88.2,0.999975,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2791,NAD83(HARN) / Illinois West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,700000,36.4,0,-90.1,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2792,NAD83(HARN) / Indiana East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,100000,37.3,250000,-85.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2793,NAD83(HARN) / Indiana West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,900000,37.3,250000,-87.05,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2794,NAD83(HARN) / Iowa North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.04,41.3,-93.3,43.16,1000000,1500000
+2795,NAD83(HARN) / Iowa South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.37,40,-93.3,41.47,0,500000
+2796,NAD83(HARN) / Kansas North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.43,38.2,-98,39.47,0,400000
+2797,NAD83(HARN) / Kansas South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.16,36.4,-98.3,38.34,400000,400000
+2798,NAD83(HARN) / Kentucky North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.58,37.3,-84.15,37.58,0,500000
+2799,NAD83(HARN) / Kentucky South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.44,36.2,-85.45,37.56,500000,500000
+2800,NAD83(HARN) / Louisiana North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.1,30.3,-92.3,32.4,0,1000000
+2801,NAD83(HARN) / Louisiana South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.18,28.3,-91.2,30.42,0,1000000
+2802,NAD83(HARN) / Maine East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,300000,43.4,0,-68.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2803,NAD83(HARN) / Maine West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,900000,42.5,0,-70.1,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2804,NAD83(HARN) / Maryland,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.18,37.4,-77,39.27,0,400000
+2805,NAD83(HARN) / Massachusetts Mainland,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.43,41,-71.3,42.41,750000,200000
+2806,NAD83(HARN) / Massachusetts Island,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.17,41,-70.3,41.29,0,500000
+2807,NAD83(HARN) / Michigan North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.29,44.47,-87,47.05,0,8000000
+2808,NAD83(HARN) / Michigan Central,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.11,43.19,-84.22,45.42,0,6000000
+2809,NAD83(HARN) / Michigan South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.06,41.3,-84.22,43.4,0,4000000
+2810,NAD83(HARN) / Minnesota North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.02,46.3,-93.06,48.38,100000,800000
+2811,NAD83(HARN) / Minnesota Central,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.37,45,-94.15,47.03,100000,800000
+2812,NAD83(HARN) / Minnesota South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43.47,43,-94,45.13,100000,800000
+2813,NAD83(HARN) / Mississippi East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,300000,29.3,0,-88.5,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2814,NAD83(HARN) / Mississippi West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,700000,29.3,0,-90.2,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2815,NAD83(HARN) / Missouri East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,250000,35.5,0,-90.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2816,NAD83(HARN) / Missouri Central,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,35.5,0,-92.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2817,NAD83(HARN) / Missouri West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,850000,36.1,0,-94.3,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2818,NAD83(HARN) / Montana,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,44.15,-109.3,49,0,600000
+2819,NAD83(HARN) / Nebraska,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.5,-100,43,0,500000
+2820,NAD83(HARN) / Nevada East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,200000,34.45,8000000,-115.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2821,NAD83(HARN) / Nevada Central,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,34.45,6000000,-116.4,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2822,NAD83(HARN) / Nevada West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,800000,34.45,4000000,-118.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2823,NAD83(HARN) / New Hampshire,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,300000,42.3,0,-71.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2824,NAD83(HARN) / New Jersey,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,150000,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2825,NAD83(HARN) / New Mexico East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,165000,31,0,-104.2,0.999909091,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2826,NAD83(HARN) / New Mexico Central,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,31,0,-106.15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2827,NAD83(HARN) / New Mexico West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,830000,31,0,-107.5,0.999916667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2828,NAD83(HARN) / New York East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,150000,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2829,NAD83(HARN) / New York Central,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,250000,40,0,-76.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2830,NAD83(HARN) / New York West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,350000,40,0,-78.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2831,NAD83(HARN) / New York Long Island,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.4,40.1,-74,41.02,0,300000
+2832,NAD83(HARN) / North Dakota North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.26,47,-100.3,48.44,0,600000
+2833,NAD83(HARN) / North Dakota South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46.11,45.4,-100.3,47.29,0,600000
+2834,NAD83(HARN) / Ohio North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.26,39.4,-82.3,41.42,0,600000
+2835,NAD83(HARN) / Ohio South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.44,38,-82.3,40.02,0,600000
+2836,NAD83(HARN) / Oklahoma North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.34,35,-98,36.46,0,600000
+2837,NAD83(HARN) / Oklahoma South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.56,33.2,-98,35.14,0,600000
+2838,NAD83(HARN) / Oregon North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.2,43.4,-120.3,46,0,2500000
+2839,NAD83(HARN) / Oregon South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.2,41.4,-120.3,44,0,1500000
+2840,NAD83(HARN) / Rhode Island,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,100000,41.05,0,-71.3,0.99999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2841,NAD83(HARN) / South Dakota North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.25,43.5,-100,45.41,0,600000
+2842,NAD83(HARN) / South Dakota South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.5,42.2,-100.2,44.24,0,600000
+2843,NAD83(HARN) / Tennessee,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.15,34.2,-86,36.25,0,600000
+2844,NAD83(HARN) / Texas North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.39,34,-101.3,36.11,1000000,200000
+2845,NAD83(HARN) / Texas North Central,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.08,31.4,-98.3,33.58,2000000,600000
+2846,NAD83(HARN) / Texas Central,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30.07,29.4,-100.2,31.53,3000000,700000
+2847,NAD83(HARN) / Texas South Central,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28.23,27.5,-99,30.17,4000000,600000
+2848,NAD83(HARN) / Texas South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26.1,25.4,-98.3,27.5,5000000,300000
+2849,NAD83(HARN) / Utah North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.43,40.2,-111.3,41.47,1000000,500000
+2850,NAD83(HARN) / Utah Central,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.01,38.2,-111.3,40.39,2000000,500000
+2851,NAD83(HARN) / Utah South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.13,36.4,-111.3,38.21,3000000,500000
+2852,NAD83(HARN) / Vermont,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,42.3,0,-72.3,0.999964286,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2853,NAD83(HARN) / Virginia North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.02,37.4,-78.3,39.12,2000000,3500000
+2854,NAD83(HARN) / Virginia South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.46,36.2,-78.3,37.58,1000000,3500000
+2855,NAD83(HARN) / Washington North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.3,47,-120.5,48.44,0,500000
+2856,NAD83(HARN) / Washington South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.5,45.2,-120.3,47.2,0,500000
+2857,NAD83(HARN) / West Virginia North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39,38.3,-79.3,40.15,0,600000
+2858,NAD83(HARN) / West Virginia South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.29,37,-81,38.53,0,600000
+2859,NAD83(HARN) / Wisconsin North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.34,45.1,-90,46.46,0,600000
+2860,NAD83(HARN) / Wisconsin Central,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.15,43.5,-90,45.3,0,600000
+2861,NAD83(HARN) / Wisconsin South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.44,42,-90,44.04,0,600000
+2862,NAD83(HARN) / Wyoming East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,200000,40.3,0,-105.1,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2863,NAD83(HARN) / Wyoming East Central,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,400000,40.3,100000,-107.2,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2864,NAD83(HARN) / Wyoming West Central,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,600000,40.3,0,-108.45,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2865,NAD83(HARN) / Wyoming West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,800000,40.3,100000,-110.05,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2866,NAD83(HARN) / Puerto Rico and Virgin Is.,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18.02,17.5,-66.26,18.26,200000,200000
+2867,NAD83(HARN) / Arizona East (ft),Transverse Mercator,foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,700000,31,0,-110.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2868,NAD83(HARN) / Arizona Central (ft),Transverse Mercator,foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,700000,31,0,-111.55,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2869,NAD83(HARN) / Arizona West (ft),Transverse Mercator,foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,700000,31,0,-113.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2870,NAD83(HARN) / California zone 1 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.2,-122,41.4,1640416.667,6561666.667
+2871,NAD83(HARN) / California zone 2 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.2,37.4,-122,39.5,1640416.667,6561666.667
+2872,NAD83(HARN) / California zone 3 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.04,36.3,-120.3,38.26,1640416.667,6561666.667
+2873,NAD83(HARN) / California zone 4 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,35.2,-119,37.15,1640416.667,6561666.667
+2874,NAD83(HARN) / California zone 5 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.02,33.3,-118,35.28,1640416.667,6561666.667
+2875,NAD83(HARN) / California zone 6 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.47,32.1,-116.15,33.53,1640416.667,6561666.667
+2876,NAD83(HARN) / Colorado North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.43,39.2,-105.3,40.47,1000000,3000000
+2877,NAD83(HARN) / Colorado Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.27,37.5,-105.3,39.45,1000000,3000000
+2878,NAD83(HARN) / Colorado South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.14,36.4,-105.3,38.26,1000000,3000000
+2879,NAD83(HARN) / Connecticut (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.12,40.5,-72.45,41.52,500000,1000000
+2880,NAD83(HARN) / Delaware (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,656166.667,38,0,-75.25,0.999995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2881,NAD83(HARN) / Florida East (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,656166.667,24.2,0,-81,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2882,NAD83(HARN) / Florida West (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,656166.667,24.2,0,-82,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2883,NAD83(HARN) / Florida North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.35,29,-84.3,30.45,0,1968500
+2884,NAD83(HARN) / Georgia East (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,656166.667,30,0,-82.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2885,NAD83(HARN) / Georgia West (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,2296583.333,30,0,-84.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2886,NAD83(HARN) / Idaho East (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,656166.667,41.4,0,-112.1,0.999947368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2887,NAD83(HARN) / Idaho Central (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,1640416.667,41.4,0,-114,0.999947368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2888,NAD83(HARN) / Idaho West (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,2624666.667,41.4,0,-115.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2891,NAD83(HARN) / Kentucky North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.58,37.3,-84.15,37.58,0,1640416.667
+2892,NAD83(HARN) / Kentucky South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.44,36.2,-85.45,37.56,1640416.667,1640416.667
+2893,NAD83(HARN) / Maryland (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.18,37.4,-77,39.27,0,1312333.333
+2894,NAD83(HARN) / Massachusetts Mainland (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.43,41,-71.3,42.41,2460625,656166.667
+2895,NAD83(HARN) / Massachusetts Island (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.17,41,-70.3,41.29,0,1640416.667
+2896,NAD83(HARN) / Michigan North (ft),Lambert Conic Conformal (2SP),foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.29,44.47,-87,47.05,0,26246719.16
+2897,NAD83(HARN) / Michigan Central (ft),Lambert Conic Conformal (2SP),foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.11,43.19,-84.22,45.42,0,19685039.37
+2898,NAD83(HARN) / Michigan South (ft),Lambert Conic Conformal (2SP),foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.06,41.3,-84.22,43.4,0,13123359.58
+2899,NAD83(HARN) / Mississippi East (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,984250,29.3,0,-88.5,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2900,NAD83(HARN) / Mississippi West (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,2296583.333,29.3,0,-90.2,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2901,NAD83(HARN) / Montana (ft),Lambert Conic Conformal (2SP),foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,44.15,-109.3,49,0,1968503.937
+2902,NAD83(HARN) / New Mexico East (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,541337.5,31,0,-104.2,0.999909091,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2903,NAD83(HARN) / New Mexico Central (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,1640416.667,31,0,-106.15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2904,NAD83(HARN) / New Mexico West (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,2723091.667,31,0,-107.5,0.999916667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2905,NAD83(HARN) / New York East (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,492125,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2906,NAD83(HARN) / New York Central (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,820208.333,40,0,-76.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2907,NAD83(HARN) / New York West (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,1148291.667,40,0,-78.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2908,NAD83(HARN) / New York Long Island (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.4,40.1,-74,41.02,0,984250
+2909,NAD83(HARN) / North Dakota North (ft),Lambert Conic Conformal (2SP),foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.26,47,-100.3,48.44,0,1968503.937
+2910,NAD83(HARN) / North Dakota South (ft),Lambert Conic Conformal (2SP),foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46.11,45.4,-100.3,47.29,0,1968503.937
+2911,NAD83(HARN) / Oklahoma North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.34,35,-98,36.46,0,1968500
+2912,NAD83(HARN) / Oklahoma South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.56,33.2,-98,35.14,0,1968500
+2913,NAD83(HARN) / Oregon North (ft),Lambert Conic Conformal (2SP),foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.2,43.4,-120.3,46,0,8202099.738
+2914,NAD83(HARN) / Oregon South (ft),Lambert Conic Conformal (2SP),foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.2,41.4,-120.3,44,0,4921259.843
+2915,NAD83(HARN) / Tennessee (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.15,34.2,-86,36.25,0,1968500
+2916,NAD83(HARN) / Texas North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.39,34,-101.3,36.11,3280833.333,656166.667
+2917,NAD83(HARN) / Texas North Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.08,31.4,-98.3,33.58,6561666.667,1968500
+2918,NAD83(HARN) / Texas Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30.07,29.4,-100.2,31.53,9842500,2296583.333
+2919,NAD83(HARN) / Texas South Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28.23,27.5,-99,30.17,13123333.33,1968500
+2920,NAD83(HARN) / Texas South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26.1,25.4,-98.3,27.5,16404166.67,984250
+2921,NAD83(HARN) / Utah North (ft),Lambert Conic Conformal (2SP),foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.43,40.2,-111.3,41.47,3280839.895,1640419.948
+2922,NAD83(HARN) / Utah Central (ft),Lambert Conic Conformal (2SP),foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.01,38.2,-111.3,40.39,6561679.79,1640419.948
+2923,NAD83(HARN) / Utah South (ft),Lambert Conic Conformal (2SP),foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.13,36.4,-111.3,38.21,9842519.685,1640419.948
+2924,NAD83(HARN) / Virginia North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.02,37.4,-78.3,39.12,6561666.667,11482916.67
+2925,NAD83(HARN) / Virginia South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.46,36.2,-78.3,37.58,3280833.333,11482916.67
+2926,NAD83(HARN) / Washington North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.3,47,-120.5,48.44,0,1640416.667
+2927,NAD83(HARN) / Washington South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.5,45.2,-120.3,47.2,0,1640416.667
+2928,NAD83(HARN) / Wisconsin North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.34,45.1,-90,46.46,0,1968500
+2929,NAD83(HARN) / Wisconsin Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.15,43.5,-90,45.3,0,1968500
+2930,NAD83(HARN) / Wisconsin South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.44,42,-90,44.04,0,1968500
+2931,Beduaram / TM 13 NE,Transverse Mercator,metre,4213,Beduaram,Clarke 1880 (IGN),500000,0,0,13,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2932,QND95 / Qatar National Grid,Transverse Mercator,metre,4614,Qatar National Datum 1995,International 1924,200000,24.27,300000,51.13,0.99999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2933,Segara / UTM zone 50S,Transverse Mercator,metre,4820,Gunung Segara,Bessel 1841,500000,0,10000000,117,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2935,Pulkovo 1942 / CS63 zone A1,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,1300000,0.07,0,41.32,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2936,Pulkovo 1942 / CS63 zone A2,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,2300000,0.07,0,44.32,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2937,Pulkovo 1942 / CS63 zone A3,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,3300000,0.07,0,47.32,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2938,Pulkovo 1942 / CS63 zone A4,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,4300000,0.07,0,50.32,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2939,Pulkovo 1942 / CS63 zone K2,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,2300000,0.08,0,50.46,1
+2940,Pulkovo 1942 / CS63 zone K3,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,3300000,0.08,0,53.46,1
+2941,Pulkovo 1942 / CS63 zone K4,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,4300000,0.08,0,56.46,1
+2942,Porto Santo / UTM zone 28N,Transverse Mercator,metre,4615,Porto Santo 1936,International 1924,500000,0,0,-15,0.9996
+2943,Selvagem Grande / UTM zone 28N,Transverse Mercator,metre,4616,Selvagem Grande,International 1924,500000,0,0,-15,0.9996
+2944,NAD83(CSRS) / SCoPQ zone 2,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-55.3,0.9999
+2945,NAD83(CSRS) / MTM zone 3,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-58.3,0.9999
+2946,NAD83(CSRS) / MTM zone 4,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-61.3,0.9999
+2947,NAD83(CSRS) / MTM zone 5,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-64.3,0.9999
+2948,NAD83(CSRS) / MTM zone 6,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-67.3,0.9999
+2949,NAD83(CSRS) / MTM zone 7,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-70.3,0.9999
+2950,NAD83(CSRS) / MTM zone 8,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-73.3,0.9999
+2951,NAD83(CSRS) / MTM zone 9,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-76.3,0.9999
+2952,NAD83(CSRS) / MTM zone 10,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-79.3,0.9999
+2953,NAD83(CSRS) / New Brunswick Stereographic,Oblique Stereographic,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,2500000,46.3,7500000,-66.3,0.999912
+2954,NAD83(CSRS) / Prince Edward Isl. Stereographic (NAD83),Oblique Stereographic,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,400000,47.15,800000,-63,0.999912
+2955,NAD83(CSRS) / UTM zone 11N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-117,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2956,NAD83(CSRS) / UTM zone 12N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-111,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2957,NAD83(CSRS) / UTM zone 13N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-105,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2958,NAD83(CSRS) / UTM zone 17N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-81,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2959,NAD83(CSRS) / UTM zone 18N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-75,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2960,NAD83(CSRS) / UTM zone 19N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-69,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2961,NAD83(CSRS) / UTM zone 20N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2962,NAD83(CSRS) / UTM zone 21N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-57,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2963,Lisbon 1890 (Lisbon) / Portugal Bonne,Bonne (South Orientated),metre,4666,Lisbon 1890 (Lisbon),Bessel 1841,0,39.4,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2964,NAD27 / Alaska Albers,Albers Equal Area,US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,50,-154,55,0,0
+2965,NAD83 / Indiana East (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,328083.333,37.3,820208.333,-85.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2966,NAD83 / Indiana West (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,2952750,37.3,820208.333,-87.05,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2967,NAD83(HARN) / Indiana East (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,328083.333,37.3,820208.333,-85.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2968,NAD83(HARN) / Indiana West (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,2952750,37.3,820208.333,-87.05,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2969,Fort Marigot / UTM zone 20N,Transverse Mercator,metre,4621,Fort Marigot,International 1924,500000,0,0,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2970,Guadeloupe 1948 / UTM zone 20N,Transverse Mercator,metre,4622,Guadeloupe 1948,International 1924,500000,0,0,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2971,CSG67 / UTM zone 22N,Transverse Mercator,metre,4623,Centre Spatial Guyanais 1967,International 1924,500000,0,0,-51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2972,RGFG95 / UTM zone 22N,Transverse Mercator,metre,4624,Reseau Geodesique Francais Guyane 1995,GRS 1980,500000,0,0,-51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2973,Martinique 1938 / UTM zone 20N,Transverse Mercator,metre,0,Martinique 1938,International 1924,500000,0,0,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2975,RGR92 / UTM zone 40S,Transverse Mercator,metre,4627,Reseau Geodesique de la Reunion 1992,GRS 1980,500000,0,10000000,57,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2976,Tahiti 52 / UTM zone 6S,Transverse Mercator,metre,4628,Tahiti 52,International 1924,500000,0,10000000,-147,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2977,Tahaa 54 / UTM zone 5S,Transverse Mercator,metre,4629,Tahaa 54,International 1924,500000,0,10000000,-153,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2978,IGN72 Nuku Hiva / UTM zone 7S,Transverse Mercator,metre,4630,IGN72 Nuku Hiva,International 1924,500000,0,10000000,-141,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2980,Combani 1950 / UTM zone 38S,Transverse Mercator,metre,4632,Combani 1950,International 1924,500000,0,10000000,45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2981,IGN56 Lifou / UTM zone 58S,Transverse Mercator,metre,4633,IGN56 Lifou,International 1924,500000,0,10000000,165,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2985,Petrels 1972 / Terre Adelie Polar Stereographic,Polar Stereographic (variant C),metre,4636,Petrels 1972,International 1924,0,0,0,0,0,0,0,0,0,0,0,0,0,0,140,0,0,0,0,200000,300000,-67
+2986,Perroud 1950 / Terre Adelie Polar Stereographic,Polar Stereographic (variant C),metre,4637,Pointe Geologie Perroud 1950,International 1924,0,0,0,0,0,0,0,0,0,0,0,0,0,0,140,0,0,0,0,200000,300000,-67
+2987,Saint Pierre et Miquelon 1950 / UTM zone 21N,Transverse Mercator,metre,4638,Saint Pierre et Miquelon 1950,Clarke 1866,500000,0,0,-57,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2988,MOP78 / UTM zone 1S,Transverse Mercator,metre,4639,MOP78,International 1924,500000,0,10000000,-177,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2991,NAD83 / Oregon Lambert,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.3,41.45,-120.3,43,0,400000,
+2992,NAD83 / Oregon Lambert (ft),Lambert Conic Conformal (2SP),foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.3,41.45,-120.3,43,0,1312335.958,
+2993,NAD83(HARN) / Oregon Lambert,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.3,41.45,-120.3,43,0,400000,
+2994,NAD83(HARN) / Oregon Lambert (ft),Lambert Conic Conformal (2SP),foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.3,41.45,-120.3,43,0,1312335.958
+2995,IGN53 Mare / UTM zone 58S,Transverse Mercator,metre,4641,IGN53 Mare,International 1924,500000,0,10000000,165,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2996,ST84 Ile des Pins / UTM zone 58S,Transverse Mercator,metre,4642,ST84 Ile des Pins,International 1924,500000,0,10000000,165,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2997,ST71 Belep / UTM zone 58S,Transverse Mercator,metre,4643,ST71 Belep,International 1924,500000,0,10000000,165,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2998,NEA74 Noumea / UTM zone 58S,Transverse Mercator,metre,4644,NEA74 Noumea,International 1924,500000,0,10000000,165,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+2999,Grand Comoros / UTM zone 38S,Transverse Mercator,metre,4646,Grand Comoros,International 1924,500000,0,10000000,45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3000,Segara / NEIEZ,Mercator (1SP),metre,4820,Gunung Segara,Bessel 1841,3900000,0,900000,110,0.997,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3001,Batavia / NEIEZ,Mercator (1SP),metre,4211,Batavia,Bessel 1841,3900000,0,900000,110,0.997,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3002,Makassar / NEIEZ,Mercator (1SP),metre,4257,Makassar,Bessel 1841,3900000,0,900000,110,0.997,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3003,Monte Mario / Italy zone 1,Transverse Mercator,metre,4265,Monte Mario,International 1924,1500000,0,0,9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3004,Monte Mario / Italy zone 2,Transverse Mercator,metre,4265,Monte Mario,International 1924,2520000,0,0,15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3005,NAD83 / BC Albers,Albers Equal Area,metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58.3,45,-126,50,0,1000000
+3006,SWEREF99 TM,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,500000,0,0,15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3007,SWEREF99 12 00,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3008,SWEREF99 13 30,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,13.3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3009,SWEREF99 15 00,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,15,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3010,SWEREF99 16 30,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,16.3,1
+3011,SWEREF99 18 00,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,18,1
+3012,SWEREF99 14 15,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,14.15,1
+3013,SWEREF99 15 45,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,15.45,1
+3014,SWEREF99 17 15,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,17.15,1
+3015,SWEREF99 18 45,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,18.45,1
+3016,SWEREF99 20 15,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,20.15,1
+3017,SWEREF99 21 45,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,21.45,1
+3018,SWEREF99 23 15,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,23.15,1
+3019,RT90 7.5 gon V,Transverse Mercator,metre,4124,Rikets koordinatsystem 1990,Bessel 1841,1500000,0,0,11.18298,1
+3020,RT90 5 gon V,Transverse Mercator,metre,4124,Rikets koordinatsystem 1990,Bessel 1841,1500000,0,0,13.33298,1
+3021,RT90 2.5 gon V,Transverse Mercator,metre,4124,Rikets koordinatsystem 1990,Bessel 1841,1500000,0,0,15.48298,1
+3022,RT90 0 gon,Transverse Mercator,metre,4124,Rikets koordinatsystem 1990,Bessel 1841,1500000,0,0,18.03298,1
+3023,RT90 2.5 gon O,Transverse Mercator,metre,4124,Rikets koordinatsystem 1990,Bessel 1841,1500000,0,0,20.18298,1
+3024,RT90 5 gon O,Transverse Mercator,metre,4124,Rikets koordinatsystem 1990,Bessel 1841,1500000,0,0,22.33298,1
+3025,RT38 7.5 gon V,Transverse Mercator,metre,4308,Stockholm 1938,Bessel 1841,1500000,0,0,11.18298,1
+3026,RT38 5 gon V,Transverse Mercator,metre,4308,Stockholm 1938,Bessel 1841,1500000,0,0,13.33298,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3027,RT38 2.5 gon V,Transverse Mercator,metre,4308,Stockholm 1938,Bessel 1841,1500000,0,0,15.48298,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3028,RT38 0 gon,Transverse Mercator,metre,4308,Stockholm 1938,Bessel 1841,1500000,0,0,18.03298,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3029,RT38 2.5 gon O,Transverse Mercator,metre,4308,Stockholm 1938,Bessel 1841,1500000,0,0,20.18298,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3030,RT38 5 gon O,Transverse Mercator,metre,4308,Stockholm 1938,Bessel 1841,1500000,0,0,22.33298,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3031,WGS 84 / Antarctic Polar Stereographic,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71
+3032,WGS 84 / Australian Antarctic Polar Stereographic,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,6000000,0,6000000,0,0,0,0,0,0,0,0,0,0,0,70,0,0,0,0,0,0,-71
+3033,WGS 84 / Australian Antarctic Lambert,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-74.3,-50,70,-68.3,6000000,6000000,
+3034,ETRS89 / ETRS-LCC,Lambert Conic Conformal (2SP),metre,4258,European Terrestrial Reference System 1989,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,52,10,35,2800000,4000000,
+3035,ETRS89 / ETRS-LAEA,Lambert Azimuthal Equal Area,metre,4258,European Terrestrial Reference System 1989,GRS 1980,4321000,52,3210000,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3036,Moznet / UTM zone 36S,Transverse Mercator,metre,4130,Moznet (ITRF94),WGS 84,500000,0,10000000,33,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3037,Moznet / UTM zone 37S,Transverse Mercator,metre,4130,Moznet (ITRF94),WGS 84,500000,0,10000000,39,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3038,ETRS89 / ETRS-TM26,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,-27,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3039,ETRS89 / ETRS-TM27,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,-21,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3040,ETRS89 / ETRS-TM28,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,-15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3041,ETRS89 / ETRS-TM29,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,-9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3042,ETRS89 / ETRS-TM30,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,-3,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3043,ETRS89 / ETRS-TM31,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,3,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3044,ETRS89 / ETRS-TM32,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3045,ETRS89 / ETRS-TM33,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3046,ETRS89 / ETRS-TM34,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,21,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3047,ETRS89 / ETRS-TM35,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,27,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3048,ETRS89 / ETRS-TM36,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,33,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3049,ETRS89 / ETRS-TM37,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,39,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3050,ETRS89 / ETRS-TM38,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3051,ETRS89 / ETRS-TM39,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3052,Reykjavik 1900 / Lambert 1900,Lambert Conic Conformal (West Orientated),metre,4657,Reykjavik 1900,Danish 1876,0,65,0,-19.011965,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3053,Hjorsey 1955 / Lambert 1955,Lambert Conic Conformal (West Orientated),metre,4658,Hjorsey 1955,International 1924,500000,65,500000,-18,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3054,Hjorsey 1955 / UTM zone 26N,Transverse Mercator,metre,4658,Hjorsey 1955,International 1924,500000,0,0,-27,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3055,Hjorsey 1955 / UTM zone 27N,Transverse Mercator,metre,4658,Hjorsey 1955,International 1924,500000,0,0,-21,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3056,Hjorsey 1955 / UTM zone 28N,Transverse Mercator,metre,4658,Hjorsey 1955,International 1924,500000,0,0,-15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3057,ISN93 / Lambert 1993,Lambert Conic Conformal (2SP),metre,4659,Islands Network 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65.45,65,-19,64.15,500000,500000
+3058,Helle 1954 / Jan Mayen Grid,Transverse Mercator,metre,4660,Helle 1954,International 1924,50000,0,-7800000,-8.3,1
+3059,LKS92 / Latvia TM,Transverse Mercator,metre,4661,Latvia 1992,GRS 1980,500000,0,-6000000,24,0.9996
+3060,IGN72 Grande Terre / UTM zone 58S,Transverse Mercator,metre,4662,IGN72 Grande Terre,International 1924,500000,0,10000000,165,0.9996
+3061,Porto Santo 1995 / UTM zone 28N,Transverse Mercator,metre,4663,Porto Santo 1995,International 1924,500000,0,0,-15,0.9996
+3062,Azores Oriental 1995 / UTM zone 26N,Transverse Mercator,metre,4664,Azores Oriental Islands 1995,International 1924,500000,0,0,-27,0.9996
+3063,Azores Central 1995 / UTM zone 26N,Transverse Mercator,metre,4665,Azores Central Islands 1995,International 1924,500000,0,0,-27,0.9996
+3064,IGM95 / UTM zone 32N,Transverse Mercator,metre,4670,Istituto Geografico Militaire 1995,WGS 84,500000,0,0,9,0.9996
+3065,IGM95 / UTM zone 33N,Transverse Mercator,metre,4670,Istituto Geografico Militaire 1995,WGS 84,500000,0,0,15,0.9996
+3066,ED50 / Jordan TM,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,-3000000,37,0.9998
+3067,ETRS89 / ETRS-TM35FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,27,0.9996
+3068,DHDN / Soldner Berlin,Cassini-Soldner,metre,4314,Deutsches Hauptdreiecksnetz,Bessel 1841,40000,52.25071338,10000,13.37379332,
+3069,NAD27 / Wisconsin Transverse Mercator,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,-4500000,-90,0.9996
+3070,NAD83 / Wisconsin Transverse Mercator,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,520000,0,-4480000,-90,0.9996
+3071,NAD83(HARN) / Wisconsin Transverse Mercator,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,520000,0,-4480000,-90,0.9996
+3072,NAD83 / Maine CS2000 East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,700000,43.5,0,-67.523,0.99998
+3074,NAD83 / Maine CS2000 West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,300000,42.5,0,-70.223,0.99998
+3075,NAD83(HARN) / Maine CS2000 East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,700000,43.5,0,-67.523,0.99998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3077,NAD83(HARN) / Maine CS2000 West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,300000,42.5,0,-70.223,0.99998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3078,NAD83 / Michigan Oblique Mercator,Hotine Oblique Mercator,metre,4269,North American Datum 1983,GRS 1980,2546731.496,0,-4354009.816,0,0,337.25556,45.1833,0,337.25556,0.9996,0,-86,0,0,0,0,0,0,0,0,
+3079,NAD83(HARN) / Michigan Oblique Mercator,Hotine Oblique Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,2546731.496,0,-4354009.816,0,0,337.25556,45.1833,0,337.25556,0.9996,0,-86,0,0,0,0,0,0,0,0,
+3080,NAD27 / Shackleford,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.55,31.1,-100,27.25,3000000,3000000
+3081,NAD83 / Texas State Mapping System,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.55,31.1,-100,27.25,1000000,1000000
+3082,NAD83 / Texas Centric Lambert Conformal,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,18,-100,27.3,5000000,1500000
+3083,NAD83 / Texas Centric Albers Equal Area,Albers Equal Area,metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,18,-100,27.3,6000000,1500000
+3084,NAD83(HARN) / Texas Centric Lambert Conformal,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,18,-100,27.3,5000000,1500000
+3085,NAD83(HARN) / Texas Centric Albers Equal Area,Albers Equal Area,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,18,-100,27.3,6000000,1500000
+3086,NAD83 / Florida GDL Albers,Albers Equal Area,metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.3,24,-84,24,0,400000
+3087,NAD83(HARN) / Florida GDL Albers,Albers Equal Area,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.3,24,-84,24,0,400000
+3088,NAD83 / Kentucky Single Zone,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.4,36.2,-85.45,37.05,1000000,1500000
+3089,NAD83 / Kentucky Single Zone (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.4,36.2,-85.45,37.05,3280833.333,4921250
+3090,NAD83(HARN) / Kentucky Single Zone,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.4,36.2,-85.45,37.05,1000000,1500000
+3091,NAD83(HARN) / Kentucky Single Zone (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.4,36.2,-85.45,37.05,3280833.333,4921250
+3092,Tokyo / UTM zone 51N,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,500000,0,0,123,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3093,Tokyo / UTM zone 52N,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,500000,0,0,129,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3094,Tokyo / UTM zone 53N,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,500000,0,0,135,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3095,Tokyo / UTM zone 54N,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,500000,0,0,141,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3096,Tokyo / UTM zone 55N,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,500000,0,0,147,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3097,JGD2000 / UTM zone 51N,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,500000,0,0,123,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3098,JGD2000 / UTM zone 52N,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,500000,0,0,129,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3099,JGD2000 / UTM zone 53N,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,500000,0,0,135,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3100,JGD2000 / UTM zone 54N,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,500000,0,0,141,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3101,JGD2000 / UTM zone 55N,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,500000,0,0,147,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3102,American Samoa 1962 / American Samoa Lambert,Lambert Conic Conformal (1SP),US survey foot,4169,American Samoa 1962,Clarke 1866,500000,-14.16,312234.65,-170,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3106,Gulshan 303 / Bangladesh Transverse Mercator,Transverse Mercator,metre,0,Gulshan 303,Everest 1830 (1937 Adjustment),500000,0,0,90,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3107,GDA94 / SA Lambert,Lambert Conic Conformal (2SP),metre,4283,Geocentric Datum of Australia 1994,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-36,-32,135,-28,2000000,1000000
+3108,ETRS89 / Guernsey Grid,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,47000,49.3,50000,-2.25,0.999997,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3109,ETRS89 / Jersey Transverse Mercator,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,40000,49.225,70000,-2.135,0.9999999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3110,AGD66 / Vicgrid66,Lambert Conic Conformal (2SP),metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-38,-37,145,-36,4500000,2500000
+3111,GDA94 / Vicgrid94,Lambert Conic Conformal (2SP),metre,4283,Geocentric Datum of Australia 1994,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-38,-37,145,-36,2500000,2500000
+3112,GDA94 / Geoscience Australia Lambert,Lambert Conic Conformal (2SP),metre,4283,Geocentric Datum of Australia 1994,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-36,0,134,-18,0,0
+3113,GDA94 / BCSG02,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,50000,-28,100000,153,0.99999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3114,MAGNA-SIRGAS / Colombia Far West zone,Transverse Mercator,metre,4170,Marco Geocentrico Nacional de Referencia,GRS 1980,1000000,4.35463215,1000000,-80.04390285,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3115,MAGNA-SIRGAS / Colombia West zone,Transverse Mercator,metre,4170,Marco Geocentrico Nacional de Referencia,GRS 1980,1000000,4.35463215,1000000,-77.04390285,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3116,MAGNA-SIRGAS / Colombia Bogota zone,Transverse Mercator,metre,4170,Marco Geocentrico Nacional de Referencia,GRS 1980,1000000,4.35463215,1000000,-74.04390285,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3117,MAGNA-SIRGAS / Colombia East Central zone,Transverse Mercator,metre,4170,Marco Geocentrico Nacional de Referencia,GRS 1980,1000000,4.35463215,1000000,-71.04390285,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3118,MAGNA-SIRGAS / Colombia East zone,Transverse Mercator,metre,4170,Marco Geocentrico Nacional de Referencia,GRS 1980,1000000,4.35463215,1000000,-68.04390285,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3119,Douala 1948 / AEF west,Transverse Mercator,metre,4192,Douala 1948,International 1924,1000000,0,1000000,10.3,0.999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3120,Pulkovo 1942(58) / Poland zone I,Oblique Stereographic,metre,4179,Pulkovo 1942(58),Krassowsky 1940,4637000,50.373,5467000,21.05,0.9998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3121,PRS92 / Philippines zone 1,Transverse Mercator,metre,0,Philippine Reference System 1992,Clarke 1866,500000,0,0,117,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3122,PRS92 / Philippines zone 2,Transverse Mercator,metre,0,Philippine Reference System 1992,Clarke 1866,500000,0,0,119,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3123,PRS92 / Philippines zone 3,Transverse Mercator,metre,0,Philippine Reference System 1992,Clarke 1866,500000,0,0,121,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3124,PRS92 / Philippines zone 4,Transverse Mercator,metre,0,Philippine Reference System 1992,Clarke 1866,500000,0,0,123,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3125,PRS92 / Philippines zone 5,Transverse Mercator,metre,0,Philippine Reference System 1992,Clarke 1866,500000,0,0,125,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3126,ETRS89 / ETRS-GK19FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,19,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3127,ETRS89 / ETRS-GK20FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,20,1
+3128,ETRS89 / ETRS-GK21FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,21,1
+3129,ETRS89 / ETRS-GK22FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,22,1
+3130,ETRS89 / ETRS-GK23FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,23,1
+3131,ETRS89 / ETRS-GK24FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,24,1
+3132,ETRS89 / ETRS-GK25FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,25,1
+3133,ETRS89 / ETRS-GK26FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,26,1
+3134,ETRS89 / ETRS-GK27FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,27,1
+3135,ETRS89 / ETRS-GK28FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,28,1
+3136,ETRS89 / ETRS-GK29FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,29,1
+3137,ETRS89 / ETRS-GK30FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,30,1
+3138,ETRS89 / ETRS-GK31FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,31,1
+3139,Vanua Levu 1915 / Vanua Levu Grid,Hyperbolic Cassini-Soldner,link,0,Vanua Levu 1915,Clarke 1880 (international foot),1251331.8,-16.15,1662888.5,179.2,
+3140,Viti Levu 1912 / Viti Levu Grid,Cassini-Soldner,link,0,Viti Levu 1912,Clarke 1880 (international foot),544000,-18,704000,178,
+3141,Fiji 1956 / UTM zone 60S,Transverse Mercator,metre,0,Fiji 1956,International 1924,500000,0,10000000,177,0.9996
+3142,Fiji 1956 / UTM zone 1S,Transverse Mercator,metre,0,Fiji 1956,International 1924,500000,0,10000000,-177,0.9996
+3144,FD54 / Faroe Lambert,Lambert Conic Conformal (West Orientated),metre,0,Faroe Datum 1954,International 1924,500000,62,500000,-9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3145,ETRS89 / Faroe Lambert,Lambert Conic Conformal (West Orientated),metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,62,500000,-9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3146,Pulkovo 1942 / 3-degree Gauss-Kruger zone 6,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,6500000,0,0,18,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3147,Pulkovo 1942 / 3-degree Gauss-Kruger CM 18E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,18,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3148,Indian 1960 / UTM zone 48N,Transverse Mercator,metre,4131,Indian 1960,Everest 1830 (1937 Adjustment),500000,0,0,105,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3149,Indian 1960 / UTM zone 49N,Transverse Mercator,metre,4131,Indian 1960,Everest 1830 (1937 Adjustment),500000,0,0,111,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3150,Pulkovo 1995 / 3-degree Gauss-Kruger zone 6,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,6500000,0,0,18,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3151,Pulkovo 1995 / 3-degree Gauss-Kruger CM 18E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,18,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3152,ST74,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,100178.1808,0,-6500614.784,18.0328044,0.99999425,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3153,NAD83(CSRS) / BC Albers,Albers Equal Area,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58.3,45,-126,50,0,1000000
+3154,NAD83(CSRS) / UTM zone 7N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-141,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3155,NAD83(CSRS) / UTM zone 8N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-135,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3156,NAD83(CSRS) / UTM zone 9N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-129,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3157,NAD83(CSRS) / UTM zone 10N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-123,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3158,NAD83(CSRS) / UTM zone 14N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-99,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3159,NAD83(CSRS) / UTM zone 15N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-93,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3160,NAD83(CSRS) / UTM zone 16N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-87,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3161,NAD83 / Ontario MNR Lambert,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53.5,0,-85,44.5,6430000,930000
+3162,NAD83(CSRS) / Ontario MNR Lambert,Lambert Conic Conformal (2SP),metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53.5,0,-85,44.5,6430000,930000
+3163,RGNC91-93 / Lambert New Caledonia,Lambert Conic Conformal (2SP),metre,4645,Reseau Geodesique de Nouvelle Caledonie 91-93,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-22.2,-21.3,166,-20.4,300000,400000
+3164,ST87 Ouvea / UTM zone 58S,Transverse Mercator,metre,4635,ST87 Ouvea,WGS 84,500000,0,10000000,165,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3165,NEA74 Noumea / Noumea Lambert,Lambert Conic Conformal (2SP),metre,4644,NEA74 Noumea,International 1924,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-22.17408903,-22.16108903,166.2632733,-22.14408903,1.02,0.66
+3166,NEA74 Noumea / Noumea Lambert 2,Lambert Conic Conformal (2SP),metre,4644,NEA74 Noumea,International 1924,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-22.1741,-22.1611,166.2633,-22.1441,-2.354,8.313
+3167,Kertau (RSO) / RSO Malaya (ch),Hotine Oblique Mercator,British chain (Sears 1922 truncated),4245,Kertau (RSO),Everest 1830 (RSO 1969),40000,0,0,0,0,323.0132846,4,0,323.0748369,0.99984,0,102.15,0,0,0,0,0,0,0,0,
+3168,Kertau (RSO) / RSO Malaya (m),Hotine Oblique Mercator,metre,4245,Kertau (RSO),Everest 1830 (RSO 1969),804670.24,0,0,0,0,323.0132846,4,0,323.0748369,0.99984,0,102.15,0,0,0,0,0,0,0,0,
+3169,RGNC91-93 / UTM zone 57S,Transverse Mercator,metre,4645,Reseau Geodesique de Nouvelle Caledonie 91-93,GRS 1980,500000,0,10000000,159,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3170,RGNC91-93 / UTM zone 58S,Transverse Mercator,metre,4645,Reseau Geodesique de Nouvelle Caledonie 91-93,GRS 1980,500000,0,10000000,165,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3171,RGNC91-93 / UTM zone 59S,Transverse Mercator,metre,4645,Reseau Geodesique de Nouvelle Caledonie 91-93,GRS 1980,500000,0,10000000,171,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3172,IGN53 Mare / UTM zone 59S,Transverse Mercator,metre,4641,IGN53 Mare,International 1924,500000,0,10000000,171,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3173,fk89 / Faroe Lambert FK89,Lambert Conic Conformal (West Orientated),metre,0,fk89,International 1924,700000,62,700000,-9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3174,NAD83 / Great Lakes Albers,Albers Equal Area,metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49.01518,45.568977,-84.455955,42.122774,1000000,1000000
+3175,NAD83 / Great Lakes and St Lawrence Albers,Albers Equal Area,metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49.01518,45.568977,-83.248627,42.122774,1000000,1000000
+3176,Indian 1960 / TM 106 NE,Transverse Mercator,metre,4131,Indian 1960,Everest 1830 (1937 Adjustment),500000,0,0,106,0.9996
+3177,LGD2006 / Libya TM,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,1000000,0,0,17,0.9965
+3178,GR96 / UTM zone 18N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-75,0.9996
+3179,GR96 / UTM zone 19N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-69,0.9996
+3180,GR96 / UTM zone 20N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-63,0.9996
+3181,GR96 / UTM zone 21N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-57,0.9996
+3182,GR96 / UTM zone 22N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-51,0.9996
+3183,GR96 / UTM zone 23N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-45,0.9996
+3184,GR96 / UTM zone 24N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-39,0.9996
+3185,GR96 / UTM zone 25N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-33,0.9996
+3186,GR96 / UTM zone 26N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-27,0.9996
+3187,GR96 / UTM zone 27N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-21,0.9996
+3188,GR96 / UTM zone 28N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-15,0.9996
+3189,GR96 / UTM zone 29N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-9,0.9996
+3190,LGD2006 / Libya TM zone 5,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,200000,0,0,9,0.99995
+3191,LGD2006 / Libya TM zone 6,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,200000,0,0,11,0.99995
+3192,LGD2006 / Libya TM zone 7,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,200000,0,0,13,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3193,LGD2006 / Libya TM zone 8,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,200000,0,0,15,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3194,LGD2006 / Libya TM zone 9,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,200000,0,0,17,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3195,LGD2006 / Libya TM zone 10,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,200000,0,0,19,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3196,LGD2006 / Libya TM zone 11,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,200000,0,0,21,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3197,LGD2006 / Libya TM zone 12,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,200000,0,0,23,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3198,LGD2006 / Libya TM zone 13,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,200000,0,0,25,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3199,LGD2006 / UTM zone 32N,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,500000,0,0,9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3200,FD58 / Iraq zone,Lambert Conic Conformal (1SP),metre,4132,Final Datum 1958,Clarke 1880 (RGS),1500000,32.3,1166200,45,0.998786408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3201,LGD2006 / UTM zone 33N,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,500000,0,0,15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3202,LGD2006 / UTM zone 34N,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,500000,0,0,21,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3203,LGD2006 / UTM zone 35N,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,500000,0,0,27,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3204,WGS 84 / SCAR IMW SP19-20,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-63.2,-90,-66,-60.4,0,0
+3205,WGS 84 / SCAR IMW SP21-22,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-63.2,-90,-54,-60.4,0,0
+3206,WGS 84 / SCAR IMW SP23-24,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-63.2,-90,-42,-60.4,0,0
+3207,WGS 84 / SCAR IMW SQ01-02,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,-174,-64.4,0,0
+3208,WGS 84 / SCAR IMW SQ19-20,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,-66,-64.4,0,0
+3209,WGS 84 / SCAR IMW SQ21-22,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,-54,-64.4,0,0
+3210,WGS 84 / SCAR IMW SQ37-38,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,42,-64.4,0,0
+3211,WGS 84 / SCAR IMW SQ39-40,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,54,-64.4,0,0
+3212,WGS 84 / SCAR IMW SQ41-42,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,66,-64.4,0,0
+3213,WGS 84 / SCAR IMW SQ43-44,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,78,-64.4,0,0
+3214,WGS 84 / SCAR IMW SQ45-46,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,90,-64.4,0,0
+3215,WGS 84 / SCAR IMW SQ47-48,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,102,-64.4,0,0
+3216,WGS 84 / SCAR IMW SQ49-50,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,114,-64.4,0,0
+3217,WGS 84 / SCAR IMW SQ51-52,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,126,-64.4,0,0
+3218,WGS 84 / SCAR IMW SQ53-54,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,138,-64.4,0,0
+3219,WGS 84 / SCAR IMW SQ55-56,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,150,-64.4,0,0
+3220,WGS 84 / SCAR IMW SQ57-58,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,162,-64.4,0,0
+3221,WGS 84 / SCAR IMW SR13-14,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,-102,-68.4,0,0
+3222,WGS 84 / SCAR IMW SR15-16,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,-90,-68.4,0,0
+3223,WGS 84 / SCAR IMW SR17-18,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,-78,-68.4,0,0
+3224,WGS 84 / SCAR IMW SR19-20,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,-66,-68.4,0,0
+3225,WGS 84 / SCAR IMW SR27-28,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,-18,-68.4,0,0
+3226,WGS 84 / SCAR IMW SR29-30,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,-6,-68.4,0,0
+3227,WGS 84 / SCAR IMW SR31-32,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,6,-68.4,0,0
+3228,WGS 84 / SCAR IMW SR33-34,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,18,-68.4,0,0
+3229,WGS 84 / SCAR IMW SR35-36,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,30,-68.4,0,0
+3230,WGS 84 / SCAR IMW SR37-38,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,42,-68.4,0,0
+3231,WGS 84 / SCAR IMW SR39-40,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,54,-68.4,0,0
+3232,WGS 84 / SCAR IMW SR41-42,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,66,-68.4,0,0
+3233,WGS 84 / SCAR IMW SR43-44,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,78,-68.4,0,0
+3234,WGS 84 / SCAR IMW SR45-46,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,90,-68.4,0,0
+3235,WGS 84 / SCAR IMW SR47-48,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,102,-68.4,0,0
+3236,WGS 84 / SCAR IMW SR49-50,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,114,-68.4,0,0
+3237,WGS 84 / SCAR IMW SR51-52,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,126,-68.4,0,0
+3238,WGS 84 / SCAR IMW SR53-54,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,138,-68.4,0,0
+3239,WGS 84 / SCAR IMW SR55-56,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,150,-68.4,0,0
+3240,WGS 84 / SCAR IMW SR57-58,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,162,-68.4,0,0
+3241,WGS 84 / SCAR IMW SR59-60,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,174,-68.4,0,0
+3242,WGS 84 / SCAR IMW SS04-06,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,-153,-72.4,0,0
+3243,WGS 84 / SCAR IMW SS07-09,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,-135,-72.4,0,0
+3244,WGS 84 / SCAR IMW SS10-12,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,-117,-72.4,0,0
+3245,WGS 84 / SCAR IMW SS13-15,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,-99,-72.4,0,0
+3246,WGS 84 / SCAR IMW SS16-18,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,-81,-72.4,0,0
+3247,WGS 84 / SCAR IMW SS19-21,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,-63,-72.4,0,0
+3248,WGS 84 / SCAR IMW SS25-27,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,-27,-72.4,0,0
+3249,WGS 84 / SCAR IMW SS28-30,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,-9,-72.4,0,0
+3250,WGS 84 / SCAR IMW SS31-33,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,9,-72.4,0,0
+3251,WGS 84 / SCAR IMW SS34-36,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,27,-72.4,0,0
+3252,WGS 84 / SCAR IMW SS37-39,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,45,-72.4,0,0
+3253,WGS 84 / SCAR IMW SS40-42,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,63,-72.4,0,0
+3254,WGS 84 / SCAR IMW SS43-45,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,81,-72.4,0,0
+3255,WGS 84 / SCAR IMW SS46-48,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,99,-72.4,0,0
+3256,WGS 84 / SCAR IMW SS49-51,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,117,-72.4,0,0
+3257,WGS 84 / SCAR IMW SS52-54,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,135,-72.4,0,0
+3258,WGS 84 / SCAR IMW SS55-57,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,153,-72.4,0,0
+3259,WGS 84 / SCAR IMW SS58-60,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,171,-72.4,0,0
+3260,WGS 84 / SCAR IMW ST01-04,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,-168,-76.4,0,0
+3261,WGS 84 / SCAR IMW ST05-08,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,-144,-76.4,0,0
+3262,WGS 84 / SCAR IMW ST09-12,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,-120,-76.4,0,0
+3263,WGS 84 / SCAR IMW ST13-16,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,-96,-76.4,0,0
+3264,WGS 84 / SCAR IMW ST17-20,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,-72,-76.4,0,0
+3265,WGS 84 / SCAR IMW ST21-24,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,-48,-76.4,0,0
+3266,WGS 84 / SCAR IMW ST25-28,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,-24,-76.4,0,0
+3267,WGS 84 / SCAR IMW ST29-32,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,0,-76.4,0,0
+3268,WGS 84 / SCAR IMW ST33-36,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,24,-76.4,0,0
+3269,WGS 84 / SCAR IMW ST37-40,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,48,-76.4,0,0
+3270,WGS 84 / SCAR IMW ST41-44,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,72,-76.4,0,0
+3271,WGS 84 / SCAR IMW ST45-48,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,96,-76.4,0,0
+3272,WGS 84 / SCAR IMW ST49-52,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,120,-76.4,0,0,
+3273,WGS 84 / SCAR IMW ST53-56,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,144,-76.4,0,0,
+3274,WGS 84 / SCAR IMW ST57-60,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,168,-76.4,0,0,
+3275,WGS 84 / SCAR IMW SU01-05,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-165,0,0,0,0,0,0,-80.1419
+3276,WGS 84 / SCAR IMW SU06-10,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-135,0,0,0,0,0,0,-80.1419
+3277,WGS 84 / SCAR IMW SU11-15,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-105,0,0,0,0,0,0,-80.1419
+3278,WGS 84 / SCAR IMW SU16-20,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75,0,0,0,0,0,0,-80.1419
+3279,WGS 84 / SCAR IMW SU21-25,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-45,0,0,0,0,0,0,-80.1419
+3280,WGS 84 / SCAR IMW SU26-30,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-15,0,0,0,0,0,0,-80.1419
+3281,WGS 84 / SCAR IMW SU31-35,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,-80.1419
+3282,WGS 84 / SCAR IMW SU36-40,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,0,0,0,0,0,0,-80.1419
+3283,WGS 84 / SCAR IMW SU41-45,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,75,0,0,0,0,0,0,-80.1419
+3284,WGS 84 / SCAR IMW SU46-50,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,105,0,0,0,0,0,0,-80.1419
+3285,WGS 84 / SCAR IMW SU51-55,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,135,0,0,0,0,0,0,-80.1419
+3286,WGS 84 / SCAR IMW SU56-60,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,165,0,0,0,0,0,0,-80.1419
+3287,WGS 84 / SCAR IMW SV01-10,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-150,0,0,0,0,0,0,-80.1419
+3288,WGS 84 / SCAR IMW SV11-20,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-90,0,0,0,0,0,0,-80.1419
+3289,WGS 84 / SCAR IMW SV21-30,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-30,0,0,0,0,0,0,-80.1419
+3290,WGS 84 / SCAR IMW SV31-40,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,0,0,0,0,0,0,-80.1419
+3291,WGS 84 / SCAR IMW SV41-50,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,90,0,0,0,0,0,0,-80.1419
+3292,WGS 84 / SCAR IMW SV51-60,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,150,0,0,0,0,0,0,-80.1419
+3293,WGS 84 / SCAR IMW SW01-60,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-80.1419
+3294,WGS 84 / USGS Transantarctic Mountains,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-78,162,-76.4,0,0,
+3295,Guam 1963 / Yap Islands,Modified Azimuthal Equidistant,metre,0,Guam 1963,Clarke 1866,40000,9.324815,60000,138.100748,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3296,RGPF / UTM zone 5S,Transverse Mercator,metre,0,Reseau Geodesique de la Polynesie Francaise,GRS 1980,500000,0,10000000,-153,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3297,RGPF / UTM zone 6S,Transverse Mercator,metre,0,Reseau Geodesique de la Polynesie Francaise,GRS 1980,500000,0,10000000,-147,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3298,RGPF / UTM zone 7S,Transverse Mercator,metre,0,Reseau Geodesique de la Polynesie Francaise,GRS 1980,500000,0,10000000,-141,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3299,RGPF / UTM zone 8S,Transverse Mercator,metre,0,Reseau Geodesique de la Polynesie Francaise,GRS 1980,500000,0,10000000,-135,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3300,Estonian Coordinate System of 1992,Lambert Conic Conformal (2SP),metre,0,Estonia 1992,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,57.31031942,24,59.2,6375000,500000,
+3301,Estonian Coordinate System of 1997,Lambert Conic Conformal (2SP),metre,0,Estonia 1997,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,57.31031942,24,59.2,6375000,500000,
+3302,IGN63 Hiva Oa / UTM zone 7S,Transverse Mercator,metre,0,IGN63 Hiva Oa,International 1924,500000,0,10000000,-141,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3303,Fatu Iva 72 / UTM zone 7S,Transverse Mercator,metre,0,Fatu Iva 72,International 1924,500000,0,10000000,-141,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3304,Tahiti 79 / UTM zone 6S,Transverse Mercator,metre,0,Tahiti 79,International 1924,500000,0,10000000,-147,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3305,Moorea 87 / UTM zone 6S,Transverse Mercator,metre,0,Moorea 87,International 1924,500000,0,10000000,-147,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3306,Maupiti 83 / UTM zone 5S,Transverse Mercator,metre,0,Maupiti 83,International 1924,500000,0,10000000,-153,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3307,Nakhl-e Ghanem / UTM zone 39N,Transverse Mercator,metre,0,Nakhl-e Ghanem,WGS 84,500000,0,0,51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3308,GDA94 / NSW Lambert,Lambert Conic Conformal (2SP),metre,4283,Geocentric Datum of Australia 1994,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-35.75,-33.25,147,-30.75,4500000,9300000
+3309,NAD27 / California Albers,Albers Equal Area,metre,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.5,0,-120,34,-4000000,0
+3310,NAD83 / California Albers,Albers Equal Area,metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.5,0,-120,34,-4000000,0
+3311,NAD83(HARN) / California Albers,Albers Equal Area,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.5,0,-120,34,-4000000,0
+3312,CSG67 / UTM zone 21N,Transverse Mercator,metre,4623,Centre Spatial Guyanais 1967,International 1924,500000,0,0,-57,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3313,RGFG95 / UTM zone 21N,Transverse Mercator,metre,4624,Reseau Geodesique Francais Guyane 1995,GRS 1980,500000,0,0,-57,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3316,Kasai 1953 / Congo TM zone 22,Transverse Mercator,metre,0,Kasai 1953,Clarke 1880 (RGS),500000,0,10000000,22,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3317,Kasai 1953 / Congo TM zone 24,Transverse Mercator,metre,0,Kasai 1953,Clarke 1880 (RGS),500000,0,10000000,24,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3318,IGC 1962 / Congo TM zone 12,Transverse Mercator,metre,0,IGC 1962 Arc of the 6th Parallel South,Clarke 1880 (RGS),500000,0,10000000,12,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3319,IGC 1962 / Congo TM zone 14,Transverse Mercator,metre,0,IGC 1962 Arc of the 6th Parallel South,Clarke 1880 (RGS),500000,0,10000000,14,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3320,IGC 1962 / Congo TM zone 16,Transverse Mercator,metre,0,IGC 1962 Arc of the 6th Parallel South,Clarke 1880 (RGS),500000,0,10000000,16,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3321,IGC 1962 / Congo TM zone 18,Transverse Mercator,metre,0,IGC 1962 Arc of the 6th Parallel South,Clarke 1880 (RGS),500000,0,10000000,18,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3322,IGC 1962 / Congo TM zone 20,Transverse Mercator,metre,0,IGC 1962 Arc of the 6th Parallel South,Clarke 1880 (RGS),500000,0,10000000,20,0.9999
+3323,IGC 1962 / Congo TM zone 22,Transverse Mercator,metre,0,IGC 1962 Arc of the 6th Parallel South,Clarke 1880 (RGS),500000,0,10000000,22,0.9999
+3324,IGC 1962 / Congo TM zone 24,Transverse Mercator,metre,0,IGC 1962 Arc of the 6th Parallel South,Clarke 1880 (RGS),500000,0,10000000,24,0.9999
+3325,IGC 1962 / Congo TM zone 26,Transverse Mercator,metre,0,IGC 1962 Arc of the 6th Parallel South,Clarke 1880 (RGS),500000,0,10000000,26,0.9999
+3326,IGC 1962 / Congo TM zone 28,Transverse Mercator,metre,0,IGC 1962 Arc of the 6th Parallel South,Clarke 1880 (RGS),500000,0,10000000,28,0.9999
+3327,IGC 1962 / Congo TM zone 30,Transverse Mercator,metre,0,IGC 1962 Arc of the 6th Parallel South,Clarke 1880 (RGS),500000,0,10000000,30,0.9999
+3328,Pulkovo 1942(58) / GUGiK-80,Oblique Stereographic,metre,4179,Pulkovo 1942(58),Krassowsky 1940,500000,52.1,500000,19.1,0.999714
+3329,Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 5,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,5500000,0,0,15,1
+3330,Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 6,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,6500000,0,0,18,1
+3331,Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 7,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,7500000,0,0,21,1
+3332,Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 8,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,8500000,0,0,24,1
+3333,Pulkovo 1942(58) / Gauss-Kruger zone 3,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,3500000,0,0,15,1
+3334,Pulkovo 1942(58) / Gauss-Kruger zone 4,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,4500000,0,0,21,1
+3335,Pulkovo 1942(58) / Gauss-Kruger zone 5,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,5500000,0,0,27,1
+3336,IGN 1962 Kerguelen / UTM zone 42S,Transverse Mercator,metre,0,IGN 1962 Kerguelen,International 1924,500000,0,10000000,69,0.9996
+3337,Le Pouce 1934 / Mauritius Grid,Lambert Conic Conformal (1SP),metre,0,Le Pouce 1934,Clarke 1880 (RGS),1000000,-20.114225,1000000,57.311858,1
+3338,NAD83 / Alaska Albers,Albers Equal Area,metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,50,-154,55,0,0
+3339,IGCB 1955 / Congo TM zone 12,Transverse Mercator,metre,0,Institut Geographique du Congo Belge 1955,Clarke 1880 (RGS),500000,0,10000000,12,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3340,IGCB 1955 / Congo TM zone 14,Transverse Mercator,metre,0,Institut Geographique du Congo Belge 1955,Clarke 1880 (RGS),500000,0,10000000,14,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3341,IGCB 1955 / Congo TM zone 16,Transverse Mercator,metre,0,Institut Geographique du Congo Belge 1955,Clarke 1880 (RGS),500000,0,10000000,16,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3342,IGCB 1955 / UTM zone 33S,Transverse Mercator,metre,0,Institut Geographique du Congo Belge 1955,Clarke 1880 (RGS),500000,0,10000000,15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3343,Mauritania 1999 / UTM zone 28N,Transverse Mercator,metre,0,Mauritania 1999,GRS 1980,500000,0,0,-15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3344,Mauritania 1999 / UTM zone 29N,Transverse Mercator,metre,0,Mauritania 1999,GRS 1980,500000,0,0,-9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3345,Mauritania 1999 / UTM zone 30N,Transverse Mercator,metre,0,Mauritania 1999,GRS 1980,500000,0,0,-3,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3346,LKS94 / Lithuania TM,Transverse Mercator,metre,4669,Lithuania 1994 (ETRS89),GRS 1980,500000,0,0,24,0.9998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3347,NAD83 / Statistics Canada Lambert,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,77,63.390675,-91.52,49,3000000,6200000
+3348,NAD83(CSRS) / Statistics Canada Lambert,Lambert Conic Conformal (2SP),metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,77,63.390675,-91.52,49,3000000,6200000
+3350,Pulkovo 1942 / CS63 zone C0,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,250000,0.06,0,21.57,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3351,Pulkovo 1942 / CS63 zone C1,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,1250000,0.06,0,24.57,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3352,Pulkovo 1942 / CS63 zone C2,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,2250000,0.06,0,27.57,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3353,Mhast (onshore) / UTM zone 32S,Transverse Mercator,metre,4264,Mhast (onshore),International 1924,500000,0,10000000,9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3354,Mhast (offshore) / UTM zone 32S,Transverse Mercator,metre,4264,Mhast (offshore),International 1924,500000,0,10000000,9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3355,Egypt Gulf of Suez S-650 TL / Red Belt,Transverse Mercator,metre,0,Egypt Gulf of Suez S-650 TL,Helmert 1906,615000,30,810000,31,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3356,Grand Cayman 1959 / UTM zone 17N,Transverse Mercator,metre,0,Grand Cayman 1959,Clarke 1866,500000,0,0,-81,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3357,Little Cayman 1961 / UTM zone 17N,Transverse Mercator,metre,0,Little Cayman 1961,Clarke 1866,500000,0,0,-81,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3358,NAD83(HARN) / North Carolina,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.2,33.45,-79,36.1,0,609601.22
+3360,NAD83(HARN) / South Carolina,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.3,31.5,-81,34.5,0,609600
+3361,NAD83(HARN) / South Carolina (ft),Lambert Conic Conformal (2SP),foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.3,31.5,-81,34.5,0,2000000
+3362,NAD83(HARN) / Pennsylvania North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.53,40.1,-77.45,41.57,0,600000
+3363,NAD83(HARN) / Pennsylvania North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.53,40.1,-77.45,41.57,0,1968500
+3364,NAD83(HARN) / Pennsylvania South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.56,39.2,-77.45,40.58,0,600000
+3365,NAD83(HARN) / Pennsylvania South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.56,39.2,-77.45,40.58,0,1968500
+3367,IGN Astro 1960 / UTM zone 28N,Transverse Mercator,metre,0,IGN Astro 1960,Clarke 1880 (RGS),500000,0,0,-15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3368,IGN Astro 1960 / UTM zone 29N,Transverse Mercator,metre,0,IGN Astro 1960,Clarke 1880 (RGS),500000,0,0,-9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3369,IGN Astro 1960 / UTM zone 30N,Transverse Mercator,metre,0,IGN Astro 1960,Clarke 1880 (RGS),500000,0,0,-3,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3370,NAD27 / UTM zone 59N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,171,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3371,NAD27 / UTM zone 60N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,177,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3372,NAD83 / UTM zone 59N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,171,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3373,NAD83 / UTM zone 60N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,177,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3374,FD54 / UTM zone 29N,Transverse Mercator,metre,0,Faroe Datum 1954,International 1924,500000,0,0,-9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3375,GDM2000 / Peninsula RSO,Hotine Oblique Mercator,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,804671,0,0,0,0,323.0132867,4,0,323.0748369,0.99984,0,102.15,0,0,0,0,0,0,
+3376,GDM2000 / East Malaysia BRSO,Hotine Oblique Mercator,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,0,0,0,0,0,53.18569158,4,0,53.07483685,0.99984,0,115,0,0,0,0,0,0,
+3377,GDM2000 / Johor Grid,Cassini-Soldner,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,-14810.562,2.071804708,8758.32,103.254057,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3378,GDM2000 / Sembilan and Melaka Grid,Cassini-Soldner,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,3673.785,2.405645149,-4240.573,101.5829658,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3379,GDM2000 / PahangGrid,Cassini-Soldner,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,-7368.228,3.460979712,6485.858,102.2205876,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3380,GDM2000 / Selangor Grid,Cassini-Soldner,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,-34836.161,3.410473658,56464.049,101.2320788,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3381,GDM2000 / Terengganu Grid,Cassini-Soldner,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,19594.245,4.583462672,3371.895,103.0412992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3382,GDM2000 / Pinang Grid,Cassini-Soldner,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,-23.414,5.251746315,62.283,100.2039757,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3383,GDM2000 / Kedah and Perlis Grid,Cassini-Soldner,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,0,5.575282177,0,100.3810936,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3384,GDM2000 / Perak Grid,Cassini-Soldner,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,-1.769,4.513262688,133454.779,100.4855478,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3385,GDM2000 / Kelantan Grid,Cassini-Soldner,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,13227.851,5.582115717,8739.894,102.174287,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3386,KKJ / Finland zone 0,Transverse Mercator,metre,4123,Kartastokoordinaattijarjestelma (1966),International 1924,500000,0,0,18,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3387,KKJ / Finland zone 5,Transverse Mercator,metre,4123,Kartastokoordinaattijarjestelma (1966),International 1924,5500000,0,0,33,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3388,Pulkovo 1942 / Caspian Sea Mercator,Mercator (2SP),metre,4284,Pulkovo 1942,Krassowsky 1940,0,0,0,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42
+3389,Pulkovo 1942 / 3-degree Gauss-Kruger zone 60,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,60500000,0,0,180,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3390,Pulkovo 1995 / 3-degree Gauss-Kruger zone 60,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,60500000,0,0,180,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3391,Karbala 1979 / UTM zone 37N,Transverse Mercator,metre,0,Karbala 1979,Clarke 1880 (RGS),500000,0,0,39,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3392,Karbala 1979 / UTM zone 38N,Transverse Mercator,metre,0,Karbala 1979,Clarke 1880 (RGS),500000,0,0,45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3393,Karbala 1979 / UTM zone 39N,Transverse Mercator,metre,0,Karbala 1979,Clarke 1880 (RGS),500000,0,0,51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3394,Nahrwan 1934 / Iraq zone,Lambert Conic Conformal (1SP),metre,0,Nahrwan 1934,Clarke 1880 (RGS),1500000,32.3,1166200,45,0.998786408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3395,WGS 84 / World Mercator,Mercator (1SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3396,PD/83 / 3-degree Gauss-Kruger zone 3,Transverse Mercator,metre,0,Potsdam Datum/83,Bessel 1841,3500000,0,0,9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3397,PD/83 / 3-degree Gauss-Kruger zone 4,Transverse Mercator,metre,0,Potsdam Datum/83,Bessel 1841,4500000,0,0,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3398,RD/83 / 3-degree Gauss-Kruger zone 4,Transverse Mercator,metre,0,Rauenberg Datum/83,Bessel 1841,4500000,0,0,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3399,RD/83 / 3-degree Gauss-Kruger zone 5,Transverse Mercator,metre,0,Rauenberg Datum/83,Bessel 1841,5500000,0,0,15,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3400,NAD83 / Alberta 10-TM (Forest),Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-115,0.9992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3401,NAD83 / Alberta 10-TM (Resource),Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,0,0,0,-115,0.9992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3402,NAD83(CSRS) / Alberta 10-TM (Forest),Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-115,0.9992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3403,NAD83(CSRS) / Alberta 10-TM (Resource),Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,-115,0.9992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3404,NAD83(HARN) / North Carolina (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.2,33.45,-79,36.1,0,2000000
+3405,VN-2000 / UTM zone 48N,Transverse Mercator,metre,0,Vietnam 2000,WGS 84,500000,0,0,105,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3406,VN-2000 / UTM zone 49N,Transverse Mercator,metre,0,Vietnam 2000,WGS 84,500000,0,0,111,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3407,Hong Kong 1963 Grid System,Cassini-Soldner,Clarke's foot,0,Hong Kong 1963,Clarke 1858,132033.92,22.184368,62565.96,114.10428,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3408,NSIDC EASE-Grid North,Lambert Azimuthal Equal Area (Spherical),metre,0,Not specified (based on International 1924 Authalic Sphere),International 1924 Authalic Sphere,0,90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3409,NSIDC EASE-Grid South,Lambert Azimuthal Equal Area (Spherical),metre,0,Not specified (based on International 1924 Authalic Sphere),International 1924 Authalic Sphere,0,-90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3410,NSIDC EASE-Grid Global,Lambert Cylindrical Equal Area (Spherical),metre,0,Not specified (based on International 1924 Authalic Sphere),International 1924 Authalic Sphere,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,0,0,
+3411,NSIDC Sea Ice Polar Stereographic North,Polar Stereographic (variant B),metre,0,Not specified (based on Hughes 1980 ellipsoid),Hughes 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-45,0,0,0,0,0,0,70
+3412,NSIDC Sea Ice Polar Stereographic South,Polar Stereographic (variant B),metre,0,Not specified (based on Hughes 1980 ellipsoid),Hughes 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-70
+3413,WGS 84 / NSIDC Sea Ice Polar Stereographic North,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-45,0,0,0,0,0,0,70
+3414,SVY21 / Singapore TM,Transverse Mercator,metre,0,SVY21,WGS 84,28001.642,1.22,38744.572,103.5,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3415,WGS 72BE / South China Sea Lambert,Lambert Conic Conformal (2SP),metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,21,114,18,500000,500000,
+3416,ETRS89 / Austria Lambert,Lambert Conic Conformal (2SP),metre,4258,European Terrestrial Reference System 1989,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,47.3,13.2,49,400000,400000,
+3417,NAD83 / Iowa North (ft US),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.04,41.3,-93.3,43.16,3280833.333,4921250,
+3418,NAD83 / Iowa South (ft US),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.37,40,-93.3,41.47,0,1640416.667,
+3419,NAD83 / Kansas North (ft US),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.43,38.2,-98,39.47,0,1312333.333,
+3420,NAD83 / Kansas South (ft US),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.16,36.4,-98.3,38.34,1312333.333,1312333.333,
+3421,NAD83 / Nevada East (ft US),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,656166.6667,34.45,26246666.67,-115.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3422,NAD83 / Nevada Central (ft US),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1640416.667,34.45,19685000,-116.4,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3423,NAD83 / Nevada West (ft US),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,2624666.667,34.45,13123333.33,-118.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3424,NAD83 / New Jersey (ft US),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,492125,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3425,NAD83(HARN) / Iowa North (ft US),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.04,41.3,-93.3,43.16,3280833.333,4921250
+3426,NAD83(HARN) / Iowa South (ft US),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.37,40,-93.3,41.47,0,1640416.667
+3427,NAD83(HARN) / Kansas North (ft US),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.43,38.2,-98,39.47,0,1312333.333
+3428,NAD83(HARN) / Kansas South (ft US),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.16,36.4,-98.3,38.34,1312333.333,1312333.333
+3429,NAD83(HARN) / Nevada East (ft US),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,656166.6667,34.45,26246666.67,-115.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3430,NAD83(HARN) / Nevada Central (ft US),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,1640416.667,34.45,19685000,-116.4,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3431,NAD83(HARN) / Nevada West (ft US),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,2624666.667,34.45,13123333.33,-118.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3432,NAD83(HARN) / New Jersey (ft US),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,492125,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3433,NAD83 / Arkansas North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.56,34.2,-92,36.14,0,1312333.333
+3434,NAD83 / Arkansas South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.18,32.4,-92,34.46,1312333.333,1312333.333
+3435,NAD83 / Illinois East (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,984250,36.4,0,-88.2,0.999975,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3436,NAD83 / Illinois West (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,2296583.333,36.4,0,-90.1,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3437,NAD83 / New Hampshire (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,984250,42.3,0,-71.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3438,NAD83 / Rhode Island (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,328083.3333,41.05,0,-71.3,0.99999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3439,PSD93 / UTM zone 39N,Transverse Mercator,metre,4134,PDO Survey Datum 1993,Clarke 1880 (RGS),500000,0,0,51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3440,PSD93 / UTM zone 40N,Transverse Mercator,metre,4134,PDO Survey Datum 1993,Clarke 1880 (RGS),500000,0,0,57,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3441,NAD83(HARN) / Arkansas North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.56,34.2,-92,36.14,0,1312333.333
+3442,NAD83(HARN) / Arkansas South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.18,32.4,-92,34.46,1312333.333,1312333.333
+3443,NAD83(HARN) / Illinois East (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,984250,36.4,0,-88.2,0.999975,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3444,NAD83(HARN) / Illinois West (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,2296583.333,36.4,0,-90.1,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3445,NAD83(HARN) / New Hampshire (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,984250,42.3,0,-71.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3446,NAD83(HARN) / Rhode Island (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,328083.3333,41.05,0,-71.3,0.99999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3447,ETRS89 / Belgian Lambert 2005,Lambert Conic Conformal (2SP),metre,4258,European Terrestrial Reference System 1989,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51.1,50.4752134,4.2133177,49.5,166262,150328
+3448,JAD2001 / Jamaica Metric Grid,Lambert Conic Conformal (1SP),metre,0,Jamaica 2001,WGS 84,750000,18,650000,-77,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3449,JAD2001 / UTM zone 17N,Transverse Mercator,metre,0,Jamaica 2001,WGS 84,500000,0,0,-81,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3450,JAD2001 / UTM zone 18N,Transverse Mercator,metre,0,Jamaica 2001,WGS 84,500000,0,0,-75,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3451,NAD83 / Louisiana North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.1,30.3,-92.3,32.4,0,3280833.333
+3452,NAD83 / Louisiana South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.18,28.3,-91.2,30.42,0,3280833.333
+3453,NAD83 / Louisiana Offshore (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26.1,25.3,-91.2,27.5,0,3280833.333
+3455,NAD83 / South Dakota South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.5,42.2,-100.2,44.24,0,1968500
+3456,NAD83(HARN) / Louisiana North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.1,30.3,-92.3,32.4,0,3280833.333
+3457,NAD83(HARN) / Louisiana South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.18,28.3,-91.2,30.42,0,3280833.333
+3458,NAD83(HARN) / South Dakota North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.25,43.5,-100,45.41,0,1968500
+3459,NAD83(HARN) / South Dakota South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.5,42.2,-100.2,44.24,0,1968500
+3460,Fiji 1986 / Fiji Map Grid,Transverse Mercator,metre,0,Fiji Geodetic Datum 1986,WGS 72,2000000,-17,4000000,178.45,0.99985,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3461,Dabola 1981 / UTM zone 28N,Transverse Mercator,metre,0,Dabola 1981,Clarke 1880 (IGN),500000,0,0,-15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3462,Dabola 1981 / UTM zone 29N,Transverse Mercator,metre,0,Dabola 1981,Clarke 1880 (IGN),500000,0,0,-9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3463,NAD83 / Maine CS2000 Central,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,43.3,0,-69.073,0.99998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3464,NAD83(HARN) / Maine CS2000 Central,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,43.3,0,-69.073,0.99998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3465,NAD83(NSRS2007) / Alabama East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,200000,30.3,0,-85.5,0.99996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3466,NAD83(NSRS2007) / Alabama West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,600000,30,0,-87.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3467,NAD83(NSRS2007) / Alaska Albers,Albers Equal Area,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,50,-154,55,0,0
+3468,NAD83(NSRS2007) / Alaska zone 1,Hotine Oblique Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,5000000,0,-5000000,0,0,323.0748369,57,0,323.0748369,0.9999,0,-133.4,0,0,0,0,0,0,0,0,
+3469,NAD83(NSRS2007) / Alaska zone 2,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,54,0,-142,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3470,NAD83(NSRS2007) / Alaska zone 3,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,54,0,-146,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3471,NAD83(NSRS2007) / Alaska zone 4,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,54,0,-150,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3472,NAD83(NSRS2007) / Alaska zone 5,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,54,0,-154,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3473,NAD83(NSRS2007) / Alaska zone 6,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,54,0,-158,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3474,NAD83(NSRS2007) / Alaska zone 7,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,54,0,-162,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3475,NAD83(NSRS2007) / Alaska zone 8,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,54,0,-166,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3476,NAD83(NSRS2007) / Alaska zone 9,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,54,0,-170,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3477,NAD83(NSRS2007) / Alaska zone 10,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51.5,51,-176,53.5,0,1000000
+3478,NAD83(NSRS2007) / Arizona Central,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,213360,31,0,-111.55,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3479,NAD83(NSRS2007) / Arizona Central (ft),Transverse Mercator,foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,700000,31,0,-111.55,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3480,NAD83(NSRS2007) / Arizona East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,213360,31,0,-110.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3481,NAD83(NSRS2007) / Arizona East (ft),Transverse Mercator,foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,700000,31,0,-110.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3482,NAD83(NSRS2007) / Arizona West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,213360,31,0,-113.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3483,NAD83(NSRS2007) / Arizona West (ft),Transverse Mercator,foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,700000,31,0,-113.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3484,NAD83(NSRS2007) / Arkansas North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.56,34.2,-92,36.14,0,400000
+3485,NAD83(NSRS2007) / Arkansas North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.56,34.2,-92,36.14,0,1312333.333
+3486,NAD83(NSRS2007) / Arkansas South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.18,32.4,-92,34.46,400000,400000
+3487,NAD83(NSRS2007) / Arkansas South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.18,32.4,-92,34.46,1312333.333,1312333.333
+3488,NAD83(NSRS2007) / California Albers,Albers Equal Area,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.5,0,-120,34,-4000000,0
+3489,NAD83(NSRS2007) / California zone 1,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.2,-122,41.4,500000,2000000
+3490,NAD83(NSRS2007) / California zone 1 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.2,-122,41.4,1640416.667,6561666.667
+3491,NAD83(NSRS2007) / California zone 2,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.2,37.4,-122,39.5,500000,2000000
+3492,NAD83(NSRS2007) / California zone 2 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.2,37.4,-122,39.5,1640416.667,6561666.667
+3493,NAD83(NSRS2007) / California zone 3,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.04,36.3,-120.3,38.26,500000,2000000
+3494,NAD83(NSRS2007) / California zone 3 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.04,36.3,-120.3,38.26,1640416.667,6561666.667
+3495,NAD83(NSRS2007) / California zone 4,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,35.2,-119,37.15,500000,2000000
+3496,NAD83(NSRS2007) / California zone 4 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,35.2,-119,37.15,1640416.667,6561666.667
+3497,NAD83(NSRS2007) / California zone 5,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.02,33.3,-118,35.28,500000,2000000
+3498,NAD83(NSRS2007) / California zone 5 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.02,33.3,-118,35.28,1640416.667,6561666.667
+3499,NAD83(NSRS2007) / California zone 6,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.47,32.1,-116.15,33.53,500000,2000000
+3500,NAD83(NSRS2007) / California zone 6 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.47,32.1,-116.15,33.53,1640416.667,6561666.667
+3501,NAD83(NSRS2007) / Colorado Central,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.27,37.5,-105.3,39.45,304800.6096,914401.8289
+3502,NAD83(NSRS2007) / Colorado Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.27,37.5,-105.3,39.45,1000000,3000000
+3503,NAD83(NSRS2007) / Colorado North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.43,39.2,-105.3,40.47,304800.6096,914401.8289
+3504,NAD83(NSRS2007) / Colorado North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.43,39.2,-105.3,40.47,1000000,3000000
+3505,NAD83(NSRS2007) / Colorado South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.14,36.4,-105.3,38.26,304800.6096,914401.8289
+3506,NAD83(NSRS2007) / Colorado South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.14,36.4,-105.3,38.26,1000000,3000000
+3507,NAD83(NSRS2007) / Connecticut,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.12,40.5,-72.45,41.52,152400.3048,304800.6096
+3508,NAD83(NSRS2007) / Connecticut (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.12,40.5,-72.45,41.52,500000,1000000
+3509,NAD83(NSRS2007) / Delaware,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,200000,38,0,-75.25,0.999995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3510,NAD83(NSRS2007) / Delaware (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,656166.667,38,0,-75.25,0.999995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3511,NAD83(NSRS2007) / Florida East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,200000,24.2,0,-81,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3512,NAD83(NSRS2007) / Florida East (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,656166.667,24.2,0,-81,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3513,NAD83(NSRS2007) / Florida GDL Albers,Albers Equal Area,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.3,24,-84,24,0,400000
+3514,NAD83(NSRS2007) / Florida North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.35,29,-84.3,30.45,0,600000
+3515,NAD83(NSRS2007) / Florida North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.35,29,-84.3,30.45,0,1968500
+3516,NAD83(NSRS2007) / Florida West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,200000,24.2,0,-82,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3517,NAD83(NSRS2007) / Florida West (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,656166.667,24.2,0,-82,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3518,NAD83(NSRS2007) / Georgia East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,200000,30,0,-82.1,0.9999
+3519,NAD83(NSRS2007) / Georgia East (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,656166.667,30,0,-82.1,0.9999
+3520,NAD83(NSRS2007) / Georgia West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,700000,30,0,-84.1,0.9999
+3521,NAD83(NSRS2007) / Georgia West (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,2296583.333,30,0,-84.1,0.9999
+3522,NAD83(NSRS2007) / Idaho Central,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,41.4,0,-114,0.999947368
+3523,NAD83(NSRS2007) / Idaho Central (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,1640416.667,41.4,0,-114,0.999947368
+3524,NAD83(NSRS2007) / Idaho East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,200000,41.4,0,-112.1,0.999947368
+3525,NAD83(NSRS2007) / Idaho East (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,656166.667,41.4,0,-112.1,0.999947368
+3526,NAD83(NSRS2007) / Idaho West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,800000,41.4,0,-115.45,0.999933333
+3527,NAD83(NSRS2007) / Idaho West (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,2624666.667,41.4,0,-115.45,0.999933333
+3528,NAD83(NSRS2007) / Illinois East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,300000,36.4,0,-88.2,0.999975
+3529,NAD83(NSRS2007) / Illinois East (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,984250,36.4,0,-88.2,0.999975
+3530,NAD83(NSRS2007) / Illinois West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,700000,36.4,0,-90.1,0.999941177
+3531,NAD83(NSRS2007) / Illinois West (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,2296583.333,36.4,0,-90.1,0.999941177
+3532,NAD83(NSRS2007) / Indiana East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,100000,37.3,250000,-85.4,0.999966667
+3533,NAD83(NSRS2007) / Indiana East (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,328083.333,37.3,820208.333,-85.4,0.999966667
+3534,NAD83(NSRS2007) / Indiana West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,900000,37.3,250000,-87.05,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3535,NAD83(NSRS2007) / Indiana West (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,2952750,37.3,820208.333,-87.05,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3536,NAD83(NSRS2007) / Iowa North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.04,41.3,-93.3,43.16,1000000,1500000
+3537,NAD83(NSRS2007) / Iowa North (ft US),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.04,41.3,-93.3,43.16,3280833.333,4921250
+3538,NAD83(NSRS2007) / Iowa South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.37,40,-93.3,41.47,0,500000
+3539,NAD83(NSRS2007) / Iowa South (ft US),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.37,40,-93.3,41.47,0,1640416.667
+3540,NAD83(NSRS2007) / Kansas North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.43,38.2,-98,39.47,0,400000
+3541,NAD83(NSRS2007) / Kansas North (ft US),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.43,38.2,-98,39.47,0,1312333.333
+3542,NAD83(NSRS2007) / Kansas South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.16,36.4,-98.3,38.34,400000,400000
+3543,NAD83(NSRS2007) / Kansas South (ft US),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.16,36.4,-98.3,38.34,1312333.333,1312333.333
+3544,NAD83(NSRS2007) / Kentucky North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.58,37.3,-84.15,37.58,0,500000
+3545,NAD83(NSRS2007) / Kentucky North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.58,37.3,-84.15,37.58,0,1640416.667
+3546,NAD83(NSRS2007) / Kentucky Single Zone,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.4,36.2,-85.45,37.05,1000000,1500000
+3547,NAD83(NSRS2007) / Kentucky Single Zone (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.4,36.2,-85.45,37.05,3280833.333,4921250
+3548,NAD83(NSRS2007) / Kentucky South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.44,36.2,-85.45,37.56,500000,500000
+3549,NAD83(NSRS2007) / Kentucky South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.44,36.2,-85.45,37.56,1640416.667,1640416.667
+3550,NAD83(NSRS2007) / Louisiana North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.1,30.3,-92.3,32.4,0,1000000
+3551,NAD83(NSRS2007) / Louisiana North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.1,30.3,-92.3,32.4,0,3280833.333
+3552,NAD83(NSRS2007) / Louisiana South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.18,28.3,-91.2,30.42,0,1000000
+3553,NAD83(NSRS2007) / Louisiana South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.18,28.3,-91.2,30.42,0,3280833.333
+3554,NAD83(NSRS2007) / Maine CS2000 Central,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,43.3,0,-69.073,0.99998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3555,NAD83(NSRS2007) / Maine CS2000 East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,700000,43.5,0,-67.523,0.99998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3556,NAD83(NSRS2007) / Maine CS2000 West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,300000,42.5,0,-70.223,0.99998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3557,NAD83(NSRS2007) / Maine East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,300000,43.4,0,-68.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3558,NAD83(NSRS2007) / Maine West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,900000,42.5,0,-70.1,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3559,NAD83(NSRS2007) / Maryland,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.18,37.4,-77,39.27,0,400000
+3560,NAD83 / Utah North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.43,40.2,-111.3,41.47,3280833.333,1640416.667
+3561,Old Hawaiian / Hawaii zone 1,Transverse Mercator,US survey foot,4135,Old Hawaiian,Clarke 1866,500000,18.5,0,-155.3,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3562,Old Hawaiian / Hawaii zone 2,Transverse Mercator,US survey foot,4135,Old Hawaiian,Clarke 1866,500000,20.2,0,-156.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3563,Old Hawaiian / Hawaii zone 3,Transverse Mercator,US survey foot,4135,Old Hawaiian,Clarke 1866,500000,21.1,0,-158,0.99999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3564,Old Hawaiian / Hawaii zone 4,Transverse Mercator,US survey foot,4135,Old Hawaiian,Clarke 1866,500000,21.5,0,-159.3,0.99999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3565,Old Hawaiian / Hawaii zone 5,Transverse Mercator,US survey foot,4135,Old Hawaiian,Clarke 1866,500000,21.4,0,-160.1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3566,NAD83 / Utah Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.01,38.2,-111.3,40.39,6561666.667,1640416.667
+3567,NAD83 / Utah South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.13,36.4,-111.3,38.21,9842500,1640416.667
+3568,NAD83(HARN) / Utah North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.43,40.2,-111.3,41.47,3280833.333,1640416.667
+3569,NAD83(HARN) / Utah Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.01,38.2,-111.3,40.39,6561666.667,1640416.667
+3570,NAD83(HARN) / Utah South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.13,36.4,-111.3,38.21,9842500,1640416.667
+3571,WGS 84 / North Pole LAEA Bering Sea,Lambert Azimuthal Equal Area,metre,4326,World Geodetic System 1984,WGS 84,0,90,0,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3572,WGS 84 / North Pole LAEA Alaska,Lambert Azimuthal Equal Area,metre,4326,World Geodetic System 1984,WGS 84,0,90,0,-150,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3573,WGS 84 / North Pole LAEA Canada,Lambert Azimuthal Equal Area,metre,4326,World Geodetic System 1984,WGS 84,0,90,0,-100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3574,WGS 84 / North Pole LAEA Atlantic,Lambert Azimuthal Equal Area,metre,4326,World Geodetic System 1984,WGS 84,0,90,0,-40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3575,WGS 84 / North Pole LAEA Europe,Lambert Azimuthal Equal Area,metre,4326,World Geodetic System 1984,WGS 84,0,90,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3576,WGS 84 / North Pole LAEA Russia,Lambert Azimuthal Equal Area,metre,4326,World Geodetic System 1984,WGS 84,0,90,0,90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3577,GDA94 / Australian Albers,Albers Equal Area,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-36,0,132,-18,0,0
+3578,NAD83 / Yukon Albers,Albers Equal Area,metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,59,-132.3,61.4,500000,500000
+3579,NAD83(CSRS) / Yukon Albers,Albers Equal Area,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,59,-132.3,61.4,500000,500000
+3580,NAD83 / NWT Lambert,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,70,0,-112,62,0,0
+3581,NAD83(CSRS) / NWT Lambert,Lambert Conic Conformal (2SP),metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,70,0,-112,62,0,0
+3582,NAD83(NSRS2007) / Maryland (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.18,37.4,-77,39.27,0,1312333.333
+3583,NAD83(NSRS2007) / Massachusetts Island,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.17,41,-70.3,41.29,0,500000
+3584,NAD83(NSRS2007) / Massachusetts Island (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.17,41,-70.3,41.29,0,1640416.667
+3585,NAD83(NSRS2007) / Massachusetts Mainland,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.43,41,-71.3,42.41,750000,200000
+3586,NAD83(NSRS2007) / Massachusetts Mainland (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.43,41,-71.3,42.41,2460625,656166.667
+3587,NAD83(NSRS2007) / Michigan Central,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.11,43.19,-84.22,45.42,0,6000000
+3588,NAD83(NSRS2007) / Michigan Central (ft),Lambert Conic Conformal (2SP),foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.11,43.19,-84.22,45.42,0,19685039.37
+3589,NAD83(NSRS2007) / Michigan North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.29,44.47,-87,47.05,0,8000000
+3590,NAD83(NSRS2007) / Michigan North (ft),Lambert Conic Conformal (2SP),foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.29,44.47,-87,47.05,0,26246719.16
+3591,NAD83(NSRS2007) / Michigan Oblique Mercator,Hotine Oblique Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,2546731.496,0,-4354009.816,0,0,337.25556,45.1833,0,337.25556,0.9996,0,-86,0,0,0,0,0,0,0,0,
+3592,NAD83(NSRS2007) / Michigan South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.06,41.3,-84.22,43.4,0,4000000
+3593,NAD83(NSRS2007) / Michigan South (ft),Lambert Conic Conformal (2SP),foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.06,41.3,-84.22,43.4,0,13123359.58
+3594,NAD83(NSRS2007) / Minnesota Central,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.37,45,-94.15,47.03,100000,800000
+3595,NAD83(NSRS2007) / Minnesota North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.02,46.3,-93.06,48.38,100000,800000
+3596,NAD83(NSRS2007) / Minnesota South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43.47,43,-94,45.13,100000,800000
+3597,NAD83(NSRS2007) / Mississippi East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,300000,29.3,0,-88.5,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3598,NAD83(NSRS2007) / Mississippi East (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,984250,29.3,0,-88.5,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3599,NAD83(NSRS2007) / Mississippi West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,700000,29.3,0,-90.2,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3600,NAD83(NSRS2007) / Mississippi West (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,2296583.333,29.3,0,-90.2,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3601,NAD83(NSRS2007) / Missouri Central,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,35.5,0,-92.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3602,NAD83(NSRS2007) / Missouri East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,250000,35.5,0,-90.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3603,NAD83(NSRS2007) / Missouri West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,850000,36.1,0,-94.3,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3604,NAD83(NSRS2007) / Montana,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,44.15,-109.3,49,0,600000
+3605,NAD83(NSRS2007) / Montana (ft),Lambert Conic Conformal (2SP),foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,44.15,-109.3,49,0,1968503.937
+3606,NAD83(NSRS2007) / Nebraska,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.5,-100,43,0,500000
+3607,NAD83(NSRS2007) / Nevada Central,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,34.45,6000000,-116.4,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3608,NAD83(NSRS2007) / Nevada Central (ft US),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,1640416.667,34.45,19685000,-116.4,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3609,NAD83(NSRS2007) / Nevada East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,200000,34.45,8000000,-115.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3610,NAD83(NSRS2007) / Nevada East (ft US),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,656166.6667,34.45,26246666.67,-115.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3611,NAD83(NSRS2007) / Nevada West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,800000,34.45,4000000,-118.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3612,NAD83(NSRS2007) / Nevada West (ft US),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,2624666.667,34.45,13123333.33,-118.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3613,NAD83(NSRS2007) / New Hampshire,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,300000,42.3,0,-71.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3614,NAD83(NSRS2007) / New Hampshire (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,984250,42.3,0,-71.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3615,NAD83(NSRS2007) / New Jersey,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,150000,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3616,NAD83(NSRS2007) / New Jersey (ft US),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,492125,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3617,NAD83(NSRS2007) / New Mexico Central,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,31,0,-106.15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3618,NAD83(NSRS2007) / New Mexico Central (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,1640416.667,31,0,-106.15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3619,NAD83(NSRS2007) / New Mexico East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,165000,31,0,-104.2,0.999909091,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3620,NAD83(NSRS2007) / New Mexico East (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,541337.5,31,0,-104.2,0.999909091,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3621,NAD83(NSRS2007) / New Mexico West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,830000,31,0,-107.5,0.999916667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3622,NAD83(NSRS2007) / New Mexico West (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,2723091.667,31,0,-107.5,0.999916667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3623,NAD83(NSRS2007) / New York Central,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,250000,40,0,-76.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3624,NAD83(NSRS2007) / New York Central (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,820208.333,40,0,-76.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3625,NAD83(NSRS2007) / New York East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,150000,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3626,NAD83(NSRS2007) / New York East (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,492125,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3627,NAD83(NSRS2007) / New York Long Island,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.4,40.1,-74,41.02,0,300000
+3628,NAD83(NSRS2007) / New York Long Island (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.4,40.1,-74,41.02,0,984250
+3629,NAD83(NSRS2007) / New York West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,350000,40,0,-78.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3630,NAD83(NSRS2007) / New York West (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,1148291.667,40,0,-78.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3631,NAD83(NSRS2007) / North Carolina,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.2,33.45,-79,36.1,0,609601.22
+3632,NAD83(NSRS2007) / North Carolina (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.2,33.45,-79,36.1,0,2000000
+3633,NAD83(NSRS2007) / North Dakota North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.26,47,-100.3,48.44,0,600000
+3634,NAD83(NSRS2007) / North Dakota North (ft),Lambert Conic Conformal (2SP),foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.26,47,-100.3,48.44,0,1968503.937
+3635,NAD83(NSRS2007) / North Dakota South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46.11,45.4,-100.3,47.29,0,600000
+3636,NAD83(NSRS2007) / North Dakota South (ft),Lambert Conic Conformal (2SP),foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46.11,45.4,-100.3,47.29,0,1968503.937
+3637,NAD83(NSRS2007) / Ohio North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.26,39.4,-82.3,41.42,0,600000
+3638,NAD83(NSRS2007) / Ohio South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.44,38,-82.3,40.02,0,600000
+3639,NAD83(NSRS2007) / Oklahoma North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.34,35,-98,36.46,0,600000
+3640,NAD83(NSRS2007) / Oklahoma North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.34,35,-98,36.46,0,1968500
+3641,NAD83(NSRS2007) / Oklahoma South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.56,33.2,-98,35.14,0,600000
+3642,NAD83(NSRS2007) / Oklahoma South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.56,33.2,-98,35.14,0,1968500
+3643,NAD83(NSRS2007) / Oregon Lambert,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.3,41.45,-120.3,43,0,400000
+3644,NAD83(NSRS2007) / Oregon Lambert (ft),Lambert Conic Conformal (2SP),foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.3,41.45,-120.3,43,0,1312335.958
+3645,NAD83(NSRS2007) / Oregon North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.2,43.4,-120.3,46,0,2500000
+3646,NAD83(NSRS2007) / Oregon North (ft),Lambert Conic Conformal (2SP),foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.2,43.4,-120.3,46,0,8202099.738
+3647,NAD83(NSRS2007) / Oregon South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.2,41.4,-120.3,44,0,1500000
+3648,NAD83(NSRS2007) / Oregon South (ft),Lambert Conic Conformal (2SP),foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.2,41.4,-120.3,44,0,4921259.843
+3649,NAD83(NSRS2007) / Pennsylvania North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.53,40.1,-77.45,41.57,0,600000
+3650,NAD83(NSRS2007) / Pennsylvania North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.53,40.1,-77.45,41.57,0,1968500
+3651,NAD83(NSRS2007) / Pennsylvania South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.56,39.2,-77.45,40.58,0,600000
+3652,NAD83(NSRS2007) / Pennsylvania South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.56,39.2,-77.45,40.58,0,1968500
+3653,NAD83(NSRS2007) / Rhode Island,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,100000,41.05,0,-71.3,0.99999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3654,NAD83(NSRS2007) / Rhode Island (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,328083.3333,41.05,0,-71.3,0.99999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3655,NAD83(NSRS2007) / South Carolina,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.3,31.5,-81,34.5,0,609600
+3656,NAD83(NSRS2007) / South Carolina (ft),Lambert Conic Conformal (2SP),foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.3,31.5,-81,34.5,0,2000000
+3657,NAD83(NSRS2007) / South Dakota North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.25,43.5,-100,45.41,0,600000
+3658,NAD83(NSRS2007) / South Dakota North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.25,43.5,-100,45.41,0,1968500
+3659,NAD83(NSRS2007) / South Dakota South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.5,42.2,-100.2,44.24,0,600000
+3660,NAD83(NSRS2007) / South Dakota South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.5,42.2,-100.2,44.24,0,1968500
+3661,NAD83(NSRS2007) / Tennessee,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.15,34.2,-86,36.25,0,600000
+3662,NAD83(NSRS2007) / Tennessee (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.15,34.2,-86,36.25,0,1968500
+3663,NAD83(NSRS2007) / Texas Central,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30.07,29.4,-100.2,31.53,3000000,700000
+3664,NAD83(NSRS2007) / Texas Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30.07,29.4,-100.2,31.53,9842500,2296583.333
+3665,NAD83(NSRS2007) / Texas Centric Albers Equal Area,Albers Equal Area,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,18,-100,27.3,6000000,1500000
+3666,NAD83(NSRS2007) / Texas Centric Lambert Conformal,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,18,-100,27.3,5000000,1500000
+3667,NAD83(NSRS2007) / Texas North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.39,34,-101.3,36.11,1000000,200000
+3668,NAD83(NSRS2007) / Texas North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.39,34,-101.3,36.11,3280833.333,656166.667
+3669,NAD83(NSRS2007) / Texas North Central,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.08,31.4,-98.3,33.58,2000000,600000
+3670,NAD83(NSRS2007) / Texas North Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.08,31.4,-98.3,33.58,6561666.667,1968500
+3671,NAD83(NSRS2007) / Texas South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26.1,25.4,-98.3,27.5,5000000,300000
+3672,NAD83(NSRS2007) / Texas South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26.1,25.4,-98.3,27.5,16404166.67,984250
+3673,NAD83(NSRS2007) / Texas South Central,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28.23,27.5,-99,30.17,4000000,600000
+3674,NAD83(NSRS2007) / Texas South Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28.23,27.5,-99,30.17,13123333.33,1968500
+3675,NAD83(NSRS2007) / Utah Central,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.01,38.2,-111.3,40.39,2000000,500000
+3676,NAD83(NSRS2007) / Utah Central (ft),Lambert Conic Conformal (2SP),foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.01,38.2,-111.3,40.39,6561679.79,1640419.948
+3677,NAD83(NSRS2007) / Utah Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.01,38.2,-111.3,40.39,6561666.667,1640416.667
+3678,NAD83(NSRS2007) / Utah North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.43,40.2,-111.3,41.47,1000000,500000
+3679,NAD83(NSRS2007) / Utah North (ft),Lambert Conic Conformal (2SP),foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.43,40.2,-111.3,41.47,3280839.895,1640419.948
+3680,NAD83(NSRS2007) / Utah North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.43,40.2,-111.3,41.47,3280833.333,1640416.667
+3681,NAD83(NSRS2007) / Utah South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.13,36.4,-111.3,38.21,3000000,500000
+3682,NAD83(NSRS2007) / Utah South (ft),Lambert Conic Conformal (2SP),foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.13,36.4,-111.3,38.21,9842519.685,1640419.948
+3683,NAD83(NSRS2007) / Utah South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.13,36.4,-111.3,38.21,9842500,1640416.667
+3684,NAD83(NSRS2007) / Vermont,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,42.3,0,-72.3,0.999964286,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3685,NAD83(NSRS2007) / Virginia North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.02,37.4,-78.3,39.12,2000000,3500000
+3686,NAD83(NSRS2007) / Virginia North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.02,37.4,-78.3,39.12,6561666.667,11482916.67
+3687,NAD83(NSRS2007) / Virginia South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.46,36.2,-78.3,37.58,1000000,3500000
+3688,NAD83(NSRS2007) / Virginia South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.46,36.2,-78.3,37.58,3280833.333,11482916.67
+3689,NAD83(NSRS2007) / Washington North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.3,47,-120.5,48.44,0,500000
+3690,NAD83(NSRS2007) / Washington North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.3,47,-120.5,48.44,0,1640416.667
+3691,NAD83(NSRS2007) / Washington South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.5,45.2,-120.3,47.2,0,500000
+3692,NAD83(NSRS2007) / Washington South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.5,45.2,-120.3,47.2,0,1640416.667
+3693,NAD83(NSRS2007) / West Virginia North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39,38.3,-79.3,40.15,0,600000
+3694,NAD83(NSRS2007) / West Virginia South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.29,37,-81,38.53,0,600000
+3695,NAD83(NSRS2007) / Wisconsin Central,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.15,43.5,-90,45.3,0,600000
+3696,NAD83(NSRS2007) / Wisconsin Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.15,43.5,-90,45.3,0,1968500
+3697,NAD83(NSRS2007) / Wisconsin North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.34,45.1,-90,46.46,0,600000
+3698,NAD83(NSRS2007) / Wisconsin North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.34,45.1,-90,46.46,0,1968500
+3699,NAD83(NSRS2007) / Wisconsin South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.44,42,-90,44.04,0,600000
+3700,NAD83(NSRS2007) / Wisconsin South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.44,42,-90,44.04,0,1968500
+3701,NAD83(NSRS2007) / Wisconsin Transverse Mercator,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,520000,0,-4480000,-90,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3702,NAD83(NSRS2007) / Wyoming East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,200000,40.3,0,-105.1,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3703,NAD83(NSRS2007) / Wyoming East Central,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,400000,40.3,100000,-107.2,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3704,NAD83(NSRS2007) / Wyoming West Central,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,600000,40.3,0,-108.45,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3705,NAD83(NSRS2007) / Wyoming West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,800000,40.3,100000,-110.05,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3706,NAD83(NSRS2007) / UTM zone 59N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,171,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3707,NAD83(NSRS2007) / UTM zone 60N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,177,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3708,NAD83(NSRS2007) / UTM zone 1N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-177,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3709,NAD83(NSRS2007) / UTM zone 2N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-171,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3710,NAD83(NSRS2007) / UTM zone 3N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-165,0.9996
+3711,NAD83(NSRS2007) / UTM zone 4N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-159,0.9996
+3712,NAD83(NSRS2007) / UTM zone 5N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-153,0.9996
+3713,NAD83(NSRS2007) / UTM zone 6N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-147,0.9996
+3714,NAD83(NSRS2007) / UTM zone 7N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-141,0.9996
+3715,NAD83(NSRS2007) / UTM zone 8N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-135,0.9996
+3716,NAD83(NSRS2007) / UTM zone 9N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-129,0.9996
+3717,NAD83(NSRS2007) / UTM zone 10N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-123,0.9996
+3718,NAD83(NSRS2007) / UTM zone 11N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-117,0.9996
+3719,NAD83(NSRS2007) / UTM zone 12N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-111,0.9996
+3720,NAD83(NSRS2007) / UTM zone 13N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-105,0.9996
+3721,NAD83(NSRS2007) / UTM zone 14N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-99,0.9996
+3722,NAD83(NSRS2007) / UTM zone 15N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-93,0.9996
+3723,NAD83(NSRS2007) / UTM zone 16N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-87,0.9996
+3724,NAD83(NSRS2007) / UTM zone 17N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-81,0.9996
+3725,NAD83(NSRS2007) / UTM zone 18N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-75,0.9996
+3726,NAD83(NSRS2007) / UTM zone 19N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-69,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3727,Reunion 1947 / TM Reunion,Transverse Mercator,metre,0,Reunion 1947,International 1924,160000,-21.07,50000,55.32,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3728,NAD83(NSRS2007) / Ohio North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.26,39.4,-82.3,41.42,0,1968500
+3729,NAD83(NSRS2007) / Ohio South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.44,38,-82.3,40.02,0,1968500
+3730,NAD83(NSRS2007) / Wyoming East (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,656166.6667,40.3,0,-105.1,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3731,NAD83(NSRS2007) / Wyoming East Central (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,1312333.333,40.3,328083.3333,-107.2,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3732,NAD83(NSRS2007) / Wyoming West Central (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,1968500,40.3,0,-108.45,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3733,NAD83(NSRS2007) / Wyoming West (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,2624666.667,40.3,328083.3333,-110.05,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3734,NAD83 / Ohio North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.26,39.4,-82.3,41.42,0,1968500
+3735,NAD83 / Ohio South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.44,38,-82.3,40.02,0,1968500
+3736,NAD83 / Wyoming East (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,656166.6667,40.3,0,-105.1,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3737,NAD83 / Wyoming East Central (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1312333.333,40.3,328083.3333,-107.2,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3738,NAD83 / Wyoming West Central (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1968500,40.3,0,-108.45,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3739,NAD83 / Wyoming West (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,2624666.667,40.3,328083.3333,-110.05,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3740,NAD83(HARN) / UTM zone 10N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-123,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3741,NAD83(HARN) / UTM zone 11N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-117,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3742,NAD83(HARN) / UTM zone 12N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-111,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3743,NAD83(HARN) / UTM zone 13N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-105,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3744,NAD83(HARN) / UTM zone 14N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-99,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3745,NAD83(HARN) / UTM zone 15N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-93,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3746,NAD83(HARN) / UTM zone 16N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-87,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3747,NAD83(HARN) / UTM zone 17N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-81,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3748,NAD83(HARN) / UTM zone 18N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-75,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3749,NAD83(HARN) / UTM zone 19N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-69,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3750,NAD83(HARN) / UTM zone 4N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-159,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3751,NAD83(HARN) / UTM zone 5N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-153,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3753,NAD83(HARN) / Ohio North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.26,39.4,-82.3,41.42,0,1968500
+3754,NAD83(HARN) / Ohio South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.44,38,-82.3,40.02,0,1968500
+3755,NAD83(HARN) / Wyoming East (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,656166.6667,40.3,0,-105.1,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3756,NAD83(HARN) / Wyoming East Central (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,1312333.333,40.3,328083.3333,-107.2,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3757,NAD83(HARN) / Wyoming West Central (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,1968500,40.3,0,-108.45,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3758,NAD83(HARN) / Wyoming West (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,2624666.667,40.3,328083.3333,-110.05,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3759,NAD83 / Hawaii zone 3 (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1640416.667,21.1,0,-158,0.99999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3760,NAD83(HARN) / Hawaii zone 3 (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,1640416.667,21.1,0,-158,0.99999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3761,NAD83(CSRS) / UTM zone 22N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3762,WGS 84 / South Georgia Lambert,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-54.45,-55,-37,-54,0,0
+3763,ETRS89 / Portugal TM06,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,0,39.400573,0,-8.075919,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3764,NZGD2000 / Chatham Island Circuit 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-44,800000,-176.3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3765,HTRS96 / Croatia TM,Transverse Mercator,metre,0,Croatian Terrestrial Reference System,GRS 1980,500000,0,0,16.5,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3766,HTRS96 / Croatia LCC,Lambert Conic Conformal (2SP),metre,0,Croatian Terrestrial Reference System,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43.05,0,16.3,45.55,0,0
+3767,HTRS96 / UTM zone 33N,Transverse Mercator,metre,0,Croatian Terrestrial Reference System,GRS 1980,500000,0,0,15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3768,HTRS96 / UTM zone 34N,Transverse Mercator,metre,0,Croatian Terrestrial Reference System,GRS 1980,500000,0,0,21,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3769,Bermuda 1957 / UTM zone 20N,Transverse Mercator,metre,4216,Bermuda 1957,Clarke 1866,500000,0,0,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3770,BDA2000 / Bermuda 2000 National Grid,Transverse Mercator,metre,0,Bermuda 2000,WGS 84,550000,32,100000,-64.45,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3771,NAD27 / Alberta 3TM ref merid 111 W,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,0,0,0,-111,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3772,NAD27 / Alberta 3TM ref merid 114 W,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,0,0,0,-114,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3773,NAD27 / Alberta 3TM ref merid 117 W,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,0,0,0,-117,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3774,NAD27 / Alberta 3TM ref merid 120 W (deprecated),Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,0,0,0,-120,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3775,NAD83 / Alberta 3TM ref merid 111 W,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,0,0,0,-111,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3776,NAD83 / Alberta 3TM ref merid 114 W,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,0,0,0,-114,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3777,NAD83 / Alberta 3TM ref merid 117 W,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,0,0,0,-117,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3778,NAD83 / Alberta 3TM ref merid 120 W (deprecated),Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,0,0,0,-120,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3779,NAD83(CSRS) / Alberta 3TM ref merid 111 W,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,-111,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3780,NAD83(CSRS) / Alberta 3TM ref merid 114 W,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,-114,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3781,NAD83(CSRS) / Alberta 3TM ref merid 117 W,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,-117,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3782,NAD83(CSRS) / Alberta 3TM ref merid 120 W (deprecated),Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,-120,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3783,Pitcairn 2006 / Pitcairn TM 2006,Transverse Mercator,metre,0,Pitcairn 2006,WGS 84,14200,-25.04067894,15500,-130.0646682,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3784,Pitcairn 1967 / UTM zone 9S,Transverse Mercator,metre,0,Pitcairn 1967,International 1924,500000,0,10000000,-129,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3788,NZGD2000 / Auckland Islands TM 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,3500000,0,10000000,166,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3789,NZGD2000 / Campbell Island TM 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,3500000,0,10000000,169,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3790,NZGD2000 / Antipodes Islands TM 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,3500000,0,10000000,179,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3791,NZGD2000 / Raoul Island TM 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,3500000,0,10000000,-178,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3793,NZGD2000 / Chatham Islands TM 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,3500000,0,10000000,-176.3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3794,Slovenia 1996 / Slovene National Grid,Transverse Mercator,metre,0,Slovenia Geodetic Datum 1996,GRS 1980,500000,0,-5000000,15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3795,NAD27 / Cuba Norte,Lambert Conic Conformal (2SP),metre,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21.42,22.21,-81,23,280296.016,500000
+3796,NAD27 / Cuba Sur,Lambert Conic Conformal (2SP),metre,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20.08,20.43,-76.5,21.18,229126.939,500000
+3797,NAD27 / MTQ Lambert,Lambert Conic Conformal (2SP),metre,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,44,-70,50,0,800000
+3798,NAD83 / MTQ Lambert,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,44,-70,50,0,800000
+3799,NAD83(CSRS) / MTQ Lambert,Lambert Conic Conformal (2SP),metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,44,-70,50,0,800000
+3800,NAD27 / Alberta 3TM ref merid 120 W,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,0,0,0,-120,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3801,NAD83 / Alberta 3TM ref merid 120 W,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,0,0,0,-120,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3802,NAD83(CSRS) / Alberta 3TM ref merid 120 W,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,-120,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3812,ETRS89 / Belgian Lambert 2008,Lambert Conic Conformal (2SP),metre,4258,European Terrestrial Reference System 1989,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51.1,50.4752134,4.2133177,49.5,665262,649328
+3814,NAD83 / Mississippi TM,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,32.3,1300000,-89.45,0.9998335,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3815,NAD83(HARN) / Mississippi TM,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,32.3,1300000,-89.45,0.9998335,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3816,NAD83(NSRS2007) / Mississippi TM,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,32.3,1300000,-89.45,0.9998335,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3825,TWD97 / TM2 zone 119,Transverse Mercator,metre,0,Taiwan Datum 1997,GRS 1980,250000,0,0,119,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3826,TWD97 / TM2 zone 121,Transverse Mercator,metre,0,Taiwan Datum 1997,GRS 1980,250000,0,0,121,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3827,TWD67 / TM2 zone 119,Transverse Mercator,metre,0,Taiwan Datum 1967,GRS 1967 Modified,250000,0,0,119,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3828,TWD67 / TM2 zone 121,Transverse Mercator,metre,0,Taiwan Datum 1967,GRS 1967 Modified,250000,0,0,121,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3829,Hu Tzu Shan / UTM zone 51N,Transverse Mercator,metre,4236,Hu Tzu Shan 1950,International 1924,500000,0,0,123,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3832,WGS 84 / PDC Mercator,Mercator (1SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,150,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3833,Pulkovo 1942(58) / Gauss-Kruger zone 2,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,2500000,0,0,9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3834,Pulkovo 1942(83) / Gauss-Kruger zone 2,Transverse Mercator,metre,4178,Pulkovo 1942(83),Krassowsky 1940,2500000,0,0,9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3835,Pulkovo 1942(83) / Gauss-Kruger zone 3,Transverse Mercator,metre,4178,Pulkovo 1942(83),Krassowsky 1940,3500000,0,0,15,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3836,Pulkovo 1942(83) / Gauss-Kruger zone 4,Transverse Mercator,metre,4178,Pulkovo 1942(83),Krassowsky 1940,4500000,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3837,Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 3,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,3500000,0,0,9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3838,Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 4,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,4500000,0,0,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3839,Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 9,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,9500000,0,0,27,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3840,Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 10,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,10500000,0,0,30,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3841,Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 6,Transverse Mercator,metre,4178,Pulkovo 1942(83),Krassowsky 1940,6500000,0,0,18,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3844,Pulkovo 1942(58) / Stereo70,Oblique Stereographic,metre,4179,Pulkovo 1942(58),Krassowsky 1940,500000,46,500000,25,0.99975,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3845,SWEREF99 / RT90 7.5 gon V emulation,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,1500025.141,0,-667.282,11.18225,1.000006,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3846,SWEREF99 / RT90 5 gon V emulation,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,1500044.695,0,-667.13,13.332256,1.0000058,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3847,SWEREF99 / RT90 2.5 gon V emulation,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,1500064.274,0,-667.711,15.48226243,1.00000561,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3848,SWEREF99 / RT90 0 gon emulation,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,1500083.521,0,-668.844,18.032268,1.0000054,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3849,SWEREF99 / RT90 2.5 gon O emulation,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,1500102.765,0,-670.706,20.182274,1.0000052,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3850,SWEREF99 / RT90 5 gon O emulation,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,1500121.846,0,-672.557,22.33228,1.0000049,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3851,NZGD2000 / NZCS2000,Lambert Conic Conformal (2SP),metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-44.3,-41,173,-37.3,7000000,3000000
+3852,RSRGD2000 / DGLC2000,Lambert Conic Conformal (2SP),metre,0,Ross Sea Region Geodetic Datum 2000,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,157,-76.4,0,500000
+3854,County ST74,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,100182.7406,0,-6500620.121,18.0328332,0.99999506,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3857,WGS 84 / Pseudo-Mercator,Popular Visualisation Pseudo Mercator,metre,6055,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3890,IGRS / UTM zone 37N,Transverse Mercator,metre,0,Iraqi Geospatial Reference System,GRS 1980,500000,0,0,39,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3891,IGRS / UTM zone 38N,Transverse Mercator,metre,0,Iraqi Geospatial Reference System,GRS 1980,500000,0,0,45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3892,IGRS / UTM zone 39N,Transverse Mercator,metre,0,Iraqi Geospatial Reference System,GRS 1980,500000,0,0,51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3893,ED50 / Iraq National Grid,Transverse Mercator,metre,4154,European Datum 1950,International 1924,800000,29.0134566,0,46.3,0.9994,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3907,MGI 1901 / Balkans zone 5,Transverse Mercator,metre,4312,MGI 1901,Bessel 1841,5500000,0,0,15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3908,MGI 1901 / Balkans zone 6,Transverse Mercator,metre,4312,MGI 1901,Bessel 1841,6500000,0,0,18,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3909,MGI 1901 / Balkans zone 7,Transverse Mercator,metre,4312,MGI 1901,Bessel 1841,7500000,0,0,21,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3910,MGI 1901 / Balkans zone 8,Transverse Mercator,metre,4312,MGI 1901,Bessel 1841,8500000,0,0,24,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3911,MGI 1901 / Slovenia Grid,Transverse Mercator,metre,4312,MGI 1901,Bessel 1841,500000,0,0,15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3912,MGI 1901 / Slovene National Grid,Transverse Mercator,metre,4312,MGI 1901,Bessel 1841,500000,0,-5000000,15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3920,Puerto Rico / UTM zone 20N,Transverse Mercator,metre,4139,Puerto Rico,Clarke 1866,500000,0,0,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3942,RGF93 / CC42,Lambert Conic Conformal (2SP),metre,4171,Reseau Geodesique Francais 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.75,42,3,41.25,1200000,1700000
+3943,RGF93 / CC43,Lambert Conic Conformal (2SP),metre,4171,Reseau Geodesique Francais 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43.75,43,3,42.25,2200000,1700000
+3944,RGF93 / CC44,Lambert Conic Conformal (2SP),metre,4171,Reseau Geodesique Francais 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.75,44,3,43.25,3200000,1700000
+3945,RGF93 / CC45,Lambert Conic Conformal (2SP),metre,4171,Reseau Geodesique Francais 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.75,45,3,44.25,4200000,1700000
+3946,RGF93 / CC46,Lambert Conic Conformal (2SP),metre,4171,Reseau Geodesique Francais 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46.75,46,3,45.25,5200000,1700000
+3947,RGF93 / CC47,Lambert Conic Conformal (2SP),metre,4171,Reseau Geodesique Francais 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.75,47,3,46.25,6200000,1700000
+3948,RGF93 / CC48,Lambert Conic Conformal (2SP),metre,4171,Reseau Geodesique Francais 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48.75,48,3,47.25,7200000,1700000
+3949,RGF93 / CC49,Lambert Conic Conformal (2SP),metre,4171,Reseau Geodesique Francais 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49.75,49,3,48.25,8200000,1700000
+3950,RGF93 / CC50,Lambert Conic Conformal (2SP),metre,4171,Reseau Geodesique Francais 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50.75,50,3,49.25,9200000,1700000
+3968,NAD83 / Virginia Lambert,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.5,36,-79.5,37,0,0
+3969,NAD83(HARN) / Virginia Lambert,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.5,36,-79.5,37,0,0
+3970,NAD83(NSRS2007) / Virginia Lambert,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.5,36,-79.5,37,0,0
+3973,WGS 84 / NSIDC EASE-Grid North,Lambert Azimuthal Equal Area (Spherical),metre,4326,World Geodetic System 1984,WGS 84,0,90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3974,WGS 84 / NSIDC EASE-Grid South,Lambert Azimuthal Equal Area (Spherical),metre,4326,World Geodetic System 1984,WGS 84,0,-90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+3975,WGS 84 / NSIDC EASE-Grid Global,Lambert Cylindrical Equal Area (Spherical),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,0,0
+3976,WGS 84 / NSIDC Sea Ice Polar Stereographic South,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-70
+3978,NAD83 / Canada Atlas Lambert,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,77,49,-95,49,0,0,
+3979,NAD83(CSRS) / Canada Atlas Lambert,Lambert Conic Conformal (2SP),metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,77,49,-95,49,0,0,
+3986,Katanga 1955 / Katanga Gauss zone A,Transverse Mercator,metre,0,Katanga 1955,Clarke 1866,200000,-9,500000,30,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3987,Katanga 1955 / Katanga Gauss zone B,Transverse Mercator,metre,0,Katanga 1955,Clarke 1866,200000,-9,500000,28,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3988,Katanga 1955 / Katanga Gauss zone C,Transverse Mercator,metre,0,Katanga 1955,Clarke 1866,200000,-9,500000,26,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3989,Katanga 1955 / Katanga Gauss zone D,Transverse Mercator,metre,0,Katanga 1955,Clarke 1866,200000,-9,500000,24,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3991,Puerto Rico State Plane CS of 1927,Lambert Conic Conformal (2SP),US survey foot,4139,Puerto Rico,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18.02,17.5,-66.26,18.26,0,500000,
+3992,Puerto Rico / St. Croix,Lambert Conic Conformal (2SP),US survey foot,4139,Puerto Rico,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18.02,17.5,-66.26,18.26,100000,500000,
+3993,Guam 1963 / Guam SPCS,Guam Projection,metre,0,Guam 1963,Clarke 1866,50000,13.28208789,50000,144.4455503,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+3994,WGS 84 / Mercator 41,Mercator (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-41,0,0,
+3995,WGS 84 / Arctic Polar Stereographic,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,71
+3996,WGS 84 / IBCAO Polar Stereographic,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,75
+3997,WGS 84 / Dubai Local TM,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,55.2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+4026,MOLDREF99 / Moldova TM,Transverse Mercator,metre,0,MOLDREF99,GRS 1980,200000,0,-5000000,28.24,0.99994,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+4037,WGS 84 / TMzn35N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,27,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+4038,WGS 84 / TMzn36N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,33,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+4048,RGRDC 2005 / Congo TM zone 12,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,12,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+4049,RGRDC 2005 / Congo TM zone 14,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,14,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+4050,RGRDC 2005 / Congo TM zone 16,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,16,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
+4051,RGRDC 2005 / Congo TM zone 18,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,18,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
+4056,RGRDC 2005 / Congo TM zone 20,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,20,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
+4057,RGRDC 2005 / Congo TM zone 22,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,22,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
+4058,RGRDC 2005 / Congo TM zone 24,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,24,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
+4059,RGRDC 2005 / Congo TM zone 26,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,26,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
+4060,RGRDC 2005 / Congo TM zone 28,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,28,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
+4061,RGRDC 2005 / UTM zone 33S,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
+4062,RGRDC 2005 / UTM zone 34S,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,21,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
+4063,RGRDC 2005 / UTM zone 35S,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,27,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
+4071,Chua / UTM zone 23S,Transverse Mercator,metre,0,Chua,International 1924,500000,0,10000000,-45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
+4082,REGCAN95 / UTM zone 27N,Transverse Mercator,metre,0,Red Geodesica de Canarias 1995,GRS 1980,500000,0,0,-21,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
+4083,REGCAN95 / UTM zone 28N,Transverse Mercator,metre,0,Red Geodesica de Canarias 1995,GRS 1980,500000,0,0,-15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
+4088,World Equidistant Cylindrical (Sphere),Equidistant Cylindrical (Spherical),metre,0,Not specified (based on GRS 1980 Authalic Sphere),GRS 1980 Authalic Sphere,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,,
+4093,ETRS89 / DKTM1,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,200000,0,-5000000,9,0.99998,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
+4094,ETRS89 / DKTM2,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,400000,0,-5000000,10,0.99998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+4095,ETRS89 / DKTM3,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,600000,0,-5000000,11.75,0.99998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+4096,ETRS89 / DKTM4,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,800000,0,-5000000,15,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+4326,WGS 84 / World Equidistant Cylindrical,Equidistant Cylindrical,metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,,
+4414,NAD83(HARN) / Guam Map Grid,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,100000,13.3,200000,144.45,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+4415,Katanga 1955 / Katanga Lambert,Lambert Conic Conformal (2SP),metre,0,Katanga 1955,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-11.5,-9,26,-6.5,500000,500000
+4417,Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 7,Transverse Mercator,metre,4178,Pulkovo 1942(83),Krassowsky 1940,7500000,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+4434,Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 8,Transverse Mercator,metre,4178,Pulkovo 1942(83),Krassowsky 1940,8500000,0,0,24,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+4437,NAD83(NSRS2007) / Puerto Rico and Virgin Is.,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18.02,17.5,-66.26,18.26,200000,200000
+4455,NAD27 / Pennsylvania South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.56,39.2,-77.45,40.58,0,2000000
+4456,NAD27 / New York Long Island,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.4,40.3,-74,41.02,100000,2000000
+4457,NAD83 / South Dakota North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.25,43.5,-100,45.41,0,1968500
+4462,WGS 84 / Australian Centre for Remote Sensing Lambert,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-36,-27,132,-18,0,0
+4467,RGSPM06 / UTM zone 21N,Transverse Mercator,metre,0,Reseau Geodesique de Saint Pierre et Miquelon 2006,GRS 1980,500000,0,0,-57,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+4471,RGM04 / UTM zone 38S,Transverse Mercator,metre,0,Reseau Geodesique de Mayotte 2004,GRS 1980,500000,0,10000000,45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+4474,Cadastre 1997 / UTM zone 38S,Transverse Mercator,metre,4632,Combani 1950,International 1924,500000,0,10000000,45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+4484,Mexican Datum of 1993 / UTM zone 11N,Transverse Mercator,metre,0,Mexican Datum of 1993,GRS 1980,500000,0,0,-117,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+4485,Mexican Datum of 1993 / UTM zone 12N,Transverse Mercator,metre,0,Mexican Datum of 1993,GRS 1980,500000,0,0,-111,0.9996,,,,,,,,,,,,,,,
+4486,Mexican Datum of 1993 / UTM zone 13N,Transverse Mercator,metre,0,Mexican Datum of 1993,GRS 1980,500000,0,0,-105,0.9996,,,,,,,,,,,,,,,
+4487,Mexican Datum of 1993 / UTM zone 14N,Transverse Mercator,metre,0,Mexican Datum of 1993,GRS 1980,500000,0,0,-99,0.9996,,,,,,,,,,,,,,,
+4488,Mexican Datum of 1993 / UTM zone 15N,Transverse Mercator,metre,0,Mexican Datum of 1993,GRS 1980,500000,0,0,-93,0.9996,,,,,,,,,,,,,,,
+4489,Mexican Datum of 1993 / UTM zone 16N,Transverse Mercator,metre,0,Mexican Datum of 1993,GRS 1980,500000,0,0,-87,0.9996,,,,,,,,,,,,,,,
+4491,CGCS2000 / Gauss-Kruger zone 13,Transverse Mercator,metre,0,China 2000,CGCS2000,13500000,0,0,75,1,,,,,,,,,,,,,,,
+4492,CGCS2000 / Gauss-Kruger zone 14,Transverse Mercator,metre,0,China 2000,CGCS2000,14500000,0,0,81,1,,,,,,,,,,,,,,,
+4493,CGCS2000 / Gauss-Kruger zone 15,Transverse Mercator,metre,0,China 2000,CGCS2000,15500000,0,0,87,1,,,,,,,,,,,,,,,
+4494,CGCS2000 / Gauss-Kruger zone 16,Transverse Mercator,metre,0,China 2000,CGCS2000,16500000,0,0,93,1,,,,,,,,,,,,,,,
+4495,CGCS2000 / Gauss-Kruger zone 17,Transverse Mercator,metre,0,China 2000,CGCS2000,17500000,0,0,99,1,,,,,,,,,,,,,,,
+4496,CGCS2000 / Gauss-Kruger zone 18,Transverse Mercator,metre,0,China 2000,CGCS2000,18500000,0,0,105,1,,,,,,,,,,,,,,,
+4497,CGCS2000 / Gauss-Kruger zone 19,Transverse Mercator,metre,0,China 2000,CGCS2000,19500000,0,0,111,1,,,,,,,,,,,,,,,
+4498,CGCS2000 / Gauss-Kruger zone 20,Transverse Mercator,metre,0,China 2000,CGCS2000,20500000,0,0,117,1,,,,,,,,,,,,,,,
+4499,CGCS2000 / Gauss-Kruger zone 21,Transverse Mercator,metre,0,China 2000,CGCS2000,21500000,0,0,123,1
+4500,CGCS2000 / Gauss-Kruger zone 22,Transverse Mercator,metre,0,China 2000,CGCS2000,22500000,0,0,129,1
+4501,CGCS2000 / Gauss-Kruger zone 23,Transverse Mercator,metre,0,China 2000,CGCS2000,23500000,0,0,135,1
+4502,CGCS2000 / Gauss-Kruger CM 75E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,75,1
+4503,CGCS2000 / Gauss-Kruger CM 81E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,81,1
+4504,CGCS2000 / Gauss-Kruger CM 87E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,87,1
+4505,CGCS2000 / Gauss-Kruger CM 93E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,93,1
+4506,CGCS2000 / Gauss-Kruger CM 99E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,99,1
+4507,CGCS2000 / Gauss-Kruger CM 105E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,105,1
+4508,CGCS2000 / Gauss-Kruger CM 111E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,111,1
+4509,CGCS2000 / Gauss-Kruger CM 117E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,117,1
+4510,CGCS2000 / Gauss-Kruger CM 123E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,123,1
+4511,CGCS2000 / Gauss-Kruger CM 129E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,129,1
+4512,CGCS2000 / Gauss-Kruger CM 135E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,135,1
+4513,CGCS2000 / 3-degree Gauss-Kruger zone 25,Transverse Mercator,metre,0,China 2000,CGCS2000,25500000,0,0,75,1
+4514,CGCS2000 / 3-degree Gauss-Kruger zone 26,Transverse Mercator,metre,0,China 2000,CGCS2000,26500000,0,0,78,1
+4515,CGCS2000 / 3-degree Gauss-Kruger zone 27,Transverse Mercator,metre,0,China 2000,CGCS2000,27500000,0,0,81,1
+4516,CGCS2000 / 3-degree Gauss-Kruger zone 28,Transverse Mercator,metre,0,China 2000,CGCS2000,28500000,0,0,84,1
+4517,CGCS2000 / 3-degree Gauss-Kruger zone 29,Transverse Mercator,metre,0,China 2000,CGCS2000,29500000,0,0,87,1
+4518,CGCS2000 / 3-degree Gauss-Kruger zone 30,Transverse Mercator,metre,0,China 2000,CGCS2000,30500000,0,0,90,1
+4519,CGCS2000 / 3-degree Gauss-Kruger zone 31,Transverse Mercator,metre,0,China 2000,CGCS2000,31500000,0,0,93,1
+4520,CGCS2000 / 3-degree Gauss-Kruger zone 32,Transverse Mercator,metre,0,China 2000,CGCS2000,32500000,0,0,96,1
+4521,CGCS2000 / 3-degree Gauss-Kruger zone 33,Transverse Mercator,metre,0,China 2000,CGCS2000,33500000,0,0,99,1
+4522,CGCS2000 / 3-degree Gauss-Kruger zone 34,Transverse Mercator,metre,0,China 2000,CGCS2000,34500000,0,0,102,1
+4523,CGCS2000 / 3-degree Gauss-Kruger zone 35,Transverse Mercator,metre,0,China 2000,CGCS2000,35500000,0,0,105,1
+4524,CGCS2000 / 3-degree Gauss-Kruger zone 36,Transverse Mercator,metre,0,China 2000,CGCS2000,36500000,0,0,108,1
+4525,CGCS2000 / 3-degree Gauss-Kruger zone 37,Transverse Mercator,metre,0,China 2000,CGCS2000,37500000,0,0,111,1
+4526,CGCS2000 / 3-degree Gauss-Kruger zone 38,Transverse Mercator,metre,0,China 2000,CGCS2000,38500000,0,0,114,1
+4527,CGCS2000 / 3-degree Gauss-Kruger zone 39,Transverse Mercator,metre,0,China 2000,CGCS2000,39500000,0,0,117,1
+4528,CGCS2000 / 3-degree Gauss-Kruger zone 40,Transverse Mercator,metre,0,China 2000,CGCS2000,40500000,0,0,120,1
+4529,CGCS2000 / 3-degree Gauss-Kruger zone 41,Transverse Mercator,metre,0,China 2000,CGCS2000,41500000,0,0,123,1
+4530,CGCS2000 / 3-degree Gauss-Kruger zone 42,Transverse Mercator,metre,0,China 2000,CGCS2000,42500000,0,0,126,1
+4531,CGCS2000 / 3-degree Gauss-Kruger zone 43,Transverse Mercator,metre,0,China 2000,CGCS2000,43500000,0,0,129,1
+4532,CGCS2000 / 3-degree Gauss-Kruger zone 44,Transverse Mercator,metre,0,China 2000,CGCS2000,44500000,0,0,132,1
+4533,CGCS2000 / 3-degree Gauss-Kruger zone 45,Transverse Mercator,metre,0,China 2000,CGCS2000,45500000,0,0,135,1
+4534,CGCS2000 / 3-degree Gauss-Kruger CM 75E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,75,1
+4535,CGCS2000 / 3-degree Gauss-Kruger CM 78E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,78,1
+4536,CGCS2000 / 3-degree Gauss-Kruger CM 81E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,81,1
+4537,CGCS2000 / 3-degree Gauss-Kruger CM 84E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,84,1
+4538,CGCS2000 / 3-degree Gauss-Kruger CM 87E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,87,1
+4539,CGCS2000 / 3-degree Gauss-Kruger CM 90E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,90,1
+4540,CGCS2000 / 3-degree Gauss-Kruger CM 93E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,93,1
+4541,CGCS2000 / 3-degree Gauss-Kruger CM 96E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,96,1
+4542,CGCS2000 / 3-degree Gauss-Kruger CM 99E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,99,1
+4543,CGCS2000 / 3-degree Gauss-Kruger CM 102E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,102,1
+4544,CGCS2000 / 3-degree Gauss-Kruger CM 105E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,105,1
+4545,CGCS2000 / 3-degree Gauss-Kruger CM 108E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,108,1
+4546,CGCS2000 / 3-degree Gauss-Kruger CM 111E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,111,1
+4547,CGCS2000 / 3-degree Gauss-Kruger CM 114E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,114,1
+4548,CGCS2000 / 3-degree Gauss-Kruger CM 117E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,117,1
+4549,CGCS2000 / 3-degree Gauss-Kruger CM 120E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,120,1
+4550,CGCS2000 / 3-degree Gauss-Kruger CM 123E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,123,1
+4551,CGCS2000 / 3-degree Gauss-Kruger CM 126E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,126,1
+4552,CGCS2000 / 3-degree Gauss-Kruger CM 129E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,129,1
+4553,CGCS2000 / 3-degree Gauss-Kruger CM 132E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,132,1
+4554,CGCS2000 / 3-degree Gauss-Kruger CM 135E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,135,1
+4559,RRAF 1991 / UTM zone 20N,Transverse Mercator,metre,4640,Reseau de Reference des Antilles Francaises 1991,GRS 1980,500000,0,0,-63,0.9996
+4568,New Beijing / Gauss-Kruger zone 13,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,13500000,0,0,75,1
+4569,New Beijing / Gauss-Kruger zone 14,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,14500000,0,0,81,1
+4570,New Beijing / Gauss-Kruger zone 15,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,15500000,0,0,87,1
+4571,New Beijing / Gauss-Kruger zone 16,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,16500000,0,0,93,1
+4572,New Beijing / Gauss-Kruger zone 17,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,17500000,0,0,99,1
+4573,New Beijing / Gauss-Kruger zone 18,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,18500000,0,0,105,1
+4574,New Beijing / Gauss-Kruger zone 19,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,19500000,0,0,111,1
+4575,New Beijing / Gauss-Kruger zone 20,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,20500000,0,0,117,1
+4576,New Beijing / Gauss-Kruger zone 21,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,21500000,0,0,123,1
+4577,New Beijing / Gauss-Kruger zone 22,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,22500000,0,0,129,1
+4578,New Beijing / Gauss-Kruger zone 23,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,23500000,0,0,135,1
+4579,New Beijing / Gauss-Kruger CM 75E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,75,1
+4580,New Beijing / Gauss-Kruger CM 81E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,81,1
+4581,New Beijing / Gauss-Kruger CM 87E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,87,1
+4582,New Beijing / Gauss-Kruger CM 93E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,93,1
+4583,New Beijing / Gauss-Kruger CM 99E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,99,1
+4584,New Beijing / Gauss-Kruger CM 105E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,105,1
+4585,New Beijing / Gauss-Kruger CM 111E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,111,1
+4586,New Beijing / Gauss-Kruger CM 117E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,117,1
+4587,New Beijing / Gauss-Kruger CM 123E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,123,1
+4588,New Beijing / Gauss-Kruger CM 129E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,129,1
+4589,New Beijing / Gauss-Kruger CM 135E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,135,1
+4647,ETRS89 / UTM zone N32,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,32500000,0,0,9,0.9996
+4652,New Beijing / 3-degree Gauss-Kruger zone 25,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,25500000,0,0,75,1
+4653,New Beijing / 3-degree Gauss-Kruger zone 26,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,26500000,0,0,78,1
+4654,New Beijing / 3-degree Gauss-Kruger zone 27,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,27500000,0,0,81,1
+4655,New Beijing / 3-degree Gauss-Kruger zone 28,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,28500000,0,0,84,1
+4656,New Beijing / 3-degree Gauss-Kruger zone 29,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,29500000,0,0,87,1
+4766,New Beijing / 3-degree Gauss-Kruger zone 30,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,30500000,0,0,90,1
+4767,New Beijing / 3-degree Gauss-Kruger zone 31,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,31500000,0,0,93,1
+4768,New Beijing / 3-degree Gauss-Kruger zone 32,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,32500000,0,0,96,1
+4769,New Beijing / 3-degree Gauss-Kruger zone 33,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,33500000,0,0,99,1
+4770,New Beijing / 3-degree Gauss-Kruger zone 34,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,34500000,0,0,102,1
+4771,New Beijing / 3-degree Gauss-Kruger zone 35,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,35500000,0,0,105,1
+4772,New Beijing / 3-degree Gauss-Kruger zone 36,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,36500000,0,0,108,1
+4773,New Beijing / 3-degree Gauss-Kruger zone 37,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,37500000,0,0,111,1
+4774,New Beijing / 3-degree Gauss-Kruger zone 38,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,38500000,0,0,114,1
+4775,New Beijing / 3-degree Gauss-Kruger zone 39,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,39500000,0,0,117,1
+4776,New Beijing / 3-degree Gauss-Kruger zone 40,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,40500000,0,0,120,1
+4777,New Beijing / 3-degree Gauss-Kruger zone 41,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,41500000,0,0,123,1
+4778,New Beijing / 3-degree Gauss-Kruger zone 42,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,42500000,0,0,126,1
+4779,New Beijing / 3-degree Gauss-Kruger zone 43,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,43500000,0,0,129,1
+4780,New Beijing / 3-degree Gauss-Kruger zone 44,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,44500000,0,0,132,1
+4781,New Beijing / 3-degree Gauss-Kruger zone 45,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,45500000,0,0,135,1
+4782,New Beijing / 3-degree Gauss-Kruger CM 75E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,75,1
+4783,New Beijing / 3-degree Gauss-Kruger CM 78E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,78,1
+4784,New Beijing / 3-degree Gauss-Kruger CM 81E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,81,1
+4785,New Beijing / 3-degree Gauss-Kruger CM 84E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,84,1
+4786,New Beijing / 3-degree Gauss-Kruger CM 87E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,87,1
+4787,New Beijing / 3-degree Gauss-Kruger CM 90E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,90,1
+4788,New Beijing / 3-degree Gauss-Kruger CM 93E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,93,1
+4789,New Beijing / 3-degree Gauss-Kruger CM 96E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,96,1
+4790,New Beijing / 3-degree Gauss-Kruger CM 99E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,99,1
+4791,New Beijing / 3-degree Gauss-Kruger CM 102E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,102,1
+4792,New Beijing / 3-degree Gauss-Kruger CM 105E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,105,1
+4793,New Beijing / 3-degree Gauss-Kruger CM 108E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,108,1,,,,,,,,,,,,,,,,
+4794,New Beijing / 3-degree Gauss-Kruger CM 111E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,111,1,,,,,,,,,,,,,,,,
+4795,New Beijing / 3-degree Gauss-Kruger CM 114E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,114,1,,,,,,,,,,,,,,,,
+4796,New Beijing / 3-degree Gauss-Kruger CM 117E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,117,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+4797,New Beijing / 3-degree Gauss-Kruger CM 120E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,120,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+4798,New Beijing / 3-degree Gauss-Kruger CM 123E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,123,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+4799,New Beijing / 3-degree Gauss-Kruger CM 126E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,126,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+4800,New Beijing / 3-degree Gauss-Kruger CM 129E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,129,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+4812,New Beijing / 3-degree Gauss-Kruger CM 132E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,132,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+4822,New Beijing / 3-degree Gauss-Kruger CM 135E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,135,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+4826,WGS 84 / Cape Verde National,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16.4,15.5,-24,15,128511.202,161587.83
+20004,Pulkovo 1995 / Gauss-Kruger zone 4,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,4500000,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+20005,Pulkovo 1995 / Gauss-Kruger zone 5,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,5500000,0,0,27,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+20006,Pulkovo 1995 / Gauss-Kruger zone 6,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,6500000,0,0,33,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+20007,Pulkovo 1995 / Gauss-Kruger zone 7,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,7500000,0,0,39,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+20008,Pulkovo 1995 / Gauss-Kruger zone 8,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,8500000,0,0,45,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+20009,Pulkovo 1995 / Gauss-Kruger zone 9,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,9500000,0,0,51,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+20010,Pulkovo 1995 / Gauss-Kruger zone 10,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,10500000,0,0,57,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+20011,Pulkovo 1995 / Gauss-Kruger zone 11,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,11500000,0,0,63,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+20012,Pulkovo 1995 / Gauss-Kruger zone 12,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,12500000,0,0,69,1,,,,,,,,,,,,,,,
+20013,Pulkovo 1995 / Gauss-Kruger zone 13,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,13500000,0,0,75,1,,,,,,,,,,,,,,,
+20014,Pulkovo 1995 / Gauss-Kruger zone 14,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,14500000,0,0,81,1,,,,,,,,,,,,,,,
+20015,Pulkovo 1995 / Gauss-Kruger zone 15,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,15500000,0,0,87,1,,,,,,,,,,,,,,,
+20016,Pulkovo 1995 / Gauss-Kruger zone 16,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,16500000,0,0,93,1,,,,,,,,,,,,,,,
+20017,Pulkovo 1995 / Gauss-Kruger zone 17,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,17500000,0,0,99,1,,,,,,,,,,,,,,,
+20018,Pulkovo 1995 / Gauss-Kruger zone 18,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,18500000,0,0,105,1,,,,,,,,,,,,,,,
+20019,Pulkovo 1995 / Gauss-Kruger zone 19,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,19500000,0,0,111,1,,,,,,,,,,,,,,,
+20020,Pulkovo 1995 / Gauss-Kruger zone 20,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,20500000,0,0,117,1,,,,,,,,,,,,,,,
+20021,Pulkovo 1995 / Gauss-Kruger zone 21,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,21500000,0,0,123,1,,,,,,,,,,,,,,,
+20022,Pulkovo 1995 / Gauss-Kruger zone 22,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,22500000,0,0,129,1,,,,,,,,,,,,,,,
+20023,Pulkovo 1995 / Gauss-Kruger zone 23,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,23500000,0,0,135,1,,,,,,,,,,,,,,,
+20024,Pulkovo 1995 / Gauss-Kruger zone 24,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,24500000,0,0,141,1,,,,,,,,,,,,,,,
+20025,Pulkovo 1995 / Gauss-Kruger zone 25,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,25500000,0,0,147,1
+20026,Pulkovo 1995 / Gauss-Kruger zone 26,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,26500000,0,0,153,1
+20027,Pulkovo 1995 / Gauss-Kruger zone 27,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,27500000,0,0,159,1
+20028,Pulkovo 1995 / Gauss-Kruger zone 28,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,28500000,0,0,165,1
+20029,Pulkovo 1995 / Gauss-Kruger zone 29,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,29500000,0,0,171,1
+20030,Pulkovo 1995 / Gauss-Kruger zone 30,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,30500000,0,0,177,1
+20031,Pulkovo 1995 / Gauss-Kruger zone 31,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,31500000,0,0,-177,1
+20032,Pulkovo 1995 / Gauss-Kruger zone 32,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,32500000,0,0,-171,1
+20135,Adindan / UTM zone 35N,Transverse Mercator,metre,4201,Adindan,Clarke 1880 (RGS),500000,0,0,27,0.9996
+20136,Adindan / UTM zone 36N,Transverse Mercator,metre,4201,Adindan,Clarke 1880 (RGS),500000,0,0,33,0.9996
+20137,Adindan / UTM zone 37N,Transverse Mercator,metre,4201,Adindan,Clarke 1880 (RGS),500000,0,0,39,0.9996
+20138,Adindan / UTM zone 38N,Transverse Mercator,metre,4201,Adindan,Clarke 1880 (RGS),500000,0,0,45,0.9996
+20248,AGD66 / AMG zone 48,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,105,0.9996
+20249,AGD66 / AMG zone 49,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,111,0.9996
+20250,AGD66 / AMG zone 50,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,117,0.9996
+20251,AGD66 / AMG zone 51,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,123,0.9996
+20252,AGD66 / AMG zone 52,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,129,0.9996
+20253,AGD66 / AMG zone 53,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,135,0.9996
+20254,AGD66 / AMG zone 54,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,141,0.9996
+20255,AGD66 / AMG zone 55,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,147,0.9996
+20256,AGD66 / AMG zone 56,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,153,0.9996
+20257,AGD66 / AMG zone 57,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,159,0.9996
+20258,AGD66 / AMG zone 58,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,165,0.9996
+20348,AGD84 / AMG zone 48,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,105,0.9996
+20349,AGD84 / AMG zone 49,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,111,0.9996
+20350,AGD84 / AMG zone 50,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,117,0.9996
+20351,AGD84 / AMG zone 51,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,123,0.9996
+20352,AGD84 / AMG zone 52,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,129,0.9996
+20353,AGD84 / AMG zone 53,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,135,0.9996
+20354,AGD84 / AMG zone 54,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,141,0.9996
+20355,AGD84 / AMG zone 55,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,147,0.9996
+20356,AGD84 / AMG zone 56,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,153,0.9996
+20357,AGD84 / AMG zone 57,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,159,0.9996
+20358,AGD84 / AMG zone 58,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,165,0.9996
+20436,Ain el Abd / UTM zone 36N,Transverse Mercator,metre,4204,Ain el Abd 1970,International 1924,500000,0,0,33,0.9996
+20437,Ain el Abd / UTM zone 37N,Transverse Mercator,metre,4204,Ain el Abd 1970,International 1924,500000,0,0,39,0.9996
+20438,Ain el Abd / UTM zone 38N,Transverse Mercator,metre,4204,Ain el Abd 1970,International 1924,500000,0,0,45,0.9996
+20439,Ain el Abd / UTM zone 39N,Transverse Mercator,metre,4204,Ain el Abd 1970,International 1924,500000,0,0,51,0.9996
+20440,Ain el Abd / UTM zone 40N,Transverse Mercator,metre,4204,Ain el Abd 1970,International 1924,500000,0,0,57,0.9996
+20499,Ain el Abd / Bahrain Grid,Transverse Mercator,metre,4204,Ain el Abd 1970,International 1924,500000,0,0,51,0.9996
+20538,Afgooye / UTM zone 38N,Transverse Mercator,metre,4205,Afgooye,Krassowsky 1940,500000,0,0,45,0.9996
+20539,Afgooye / UTM zone 39N,Transverse Mercator,metre,4205,Afgooye,Krassowsky 1940,500000,0,0,51,0.9996
+20790,Lisbon (Lisbon) / Portuguese National Grid,Transverse Mercator,metre,4207,Lisbon 1937 (Lisbon),International 1924,200000,39.4,300000,1,1
+20791,Lisbon (Lisbon) / Portuguese Grid,Transverse Mercator,metre,4207,Lisbon 1937 (Lisbon),International 1924,0,39.4,0,1,1
+20822,Aratu / UTM zone 22S,Transverse Mercator,metre,4208,Aratu,International 1924,500000,0,10000000,-51,0.9996
+20823,Aratu / UTM zone 23S,Transverse Mercator,metre,4208,Aratu,International 1924,500000,0,10000000,-45,0.9996
+20824,Aratu / UTM zone 24S,Transverse Mercator,metre,4208,Aratu,International 1924,500000,0,10000000,-39,0.9996
+20934,Arc 1950 / UTM zone 34S,Transverse Mercator,metre,4209,Arc 1950,Clarke 1880 (Arc),500000,0,10000000,21,0.9996
+20935,Arc 1950 / UTM zone 35S,Transverse Mercator,metre,4209,Arc 1950,Clarke 1880 (Arc),500000,0,10000000,27,0.9996
+20936,Arc 1950 / UTM zone 36S,Transverse Mercator,metre,4209,Arc 1950,Clarke 1880 (Arc),500000,0,10000000,33,0.9996
+21035,Arc 1960 / UTM zone 35S,Transverse Mercator,metre,4210,Arc 1960,Clarke 1880 (RGS),500000,0,10000000,27,0.9996
+21036,Arc 1960 / UTM zone 36S,Transverse Mercator,metre,4210,Arc 1960,Clarke 1880 (RGS),500000,0,10000000,33,0.9996
+21037,Arc 1960 / UTM zone 37S,Transverse Mercator,metre,4210,Arc 1960,Clarke 1880 (RGS),500000,0,10000000,39,0.9996
+21095,Arc 1960 / UTM zone 35N,Transverse Mercator,metre,4210,Arc 1960,Clarke 1880 (RGS),500000,0,0,27,0.9996
+21096,Arc 1960 / UTM zone 36N,Transverse Mercator,metre,4210,Arc 1960,Clarke 1880 (RGS),500000,0,0,33,0.9996
+21097,Arc 1960 / UTM zone 37N,Transverse Mercator,metre,4210,Arc 1960,Clarke 1880 (RGS),500000,0,0,39,0.9996
+21148,Batavia / UTM zone 48S,Transverse Mercator,metre,4211,Batavia,Bessel 1841,500000,0,10000000,105,0.9996
+21149,Batavia / UTM zone 49S,Transverse Mercator,metre,4211,Batavia,Bessel 1841,500000,0,10000000,111,0.9996
+21150,Batavia / UTM zone 50S,Transverse Mercator,metre,4211,Batavia,Bessel 1841,500000,0,10000000,117,0.9996
+21291,Barbados 1938 / British West Indies Grid,Transverse Mercator,metre,4212,Barbados 1938,Clarke 1880 (RGS),400000,0,0,-62,0.9995
+21292,Barbados 1938 / Barbados National Grid,Transverse Mercator,metre,4212,Barbados 1938,Clarke 1880 (RGS),30000,13.1035,75000,-59.3335,0.9999986
+21413,Beijing 1954 / Gauss-Kruger zone 13,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,13500000,0,0,75,1
+21414,Beijing 1954 / Gauss-Kruger zone 14,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,14500000,0,0,81,1
+21415,Beijing 1954 / Gauss-Kruger zone 15,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,15500000,0,0,87,1
+21416,Beijing 1954 / Gauss-Kruger zone 16,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,16500000,0,0,93,1
+21417,Beijing 1954 / Gauss-Kruger zone 17,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,17500000,0,0,99,1
+21418,Beijing 1954 / Gauss-Kruger zone 18,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,18500000,0,0,105,1
+21419,Beijing 1954 / Gauss-Kruger zone 19,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,19500000,0,0,111,1
+21420,Beijing 1954 / Gauss-Kruger zone 20,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,20500000,0,0,117,1
+21421,Beijing 1954 / Gauss-Kruger zone 21,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,21500000,0,0,123,1
+21422,Beijing 1954 / Gauss-Kruger zone 22,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,22500000,0,0,129,1
+21423,Beijing 1954 / Gauss-Kruger zone 23,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,23500000,0,0,135,1
+21453,Beijing 1954 / Gauss-Kruger CM 75E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,75,1
+21454,Beijing 1954 / Gauss-Kruger CM 81E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,81,1
+21455,Beijing 1954 / Gauss-Kruger CM 87E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,87,1
+21456,Beijing 1954 / Gauss-Kruger CM 93E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,93,1
+21457,Beijing 1954 / Gauss-Kruger CM 99E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,99,1
+21458,Beijing 1954 / Gauss-Kruger CM 105E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,105,1
+21459,Beijing 1954 / Gauss-Kruger CM 111E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,111,1
+21460,Beijing 1954 / Gauss-Kruger CM 117E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,117,1
+21461,Beijing 1954 / Gauss-Kruger CM 123E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,123,1,,,,,,,,,,,,,,,,
+21462,Beijing 1954 / Gauss-Kruger CM 129E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,129,1,,,,,,,,,,,,,,,,
+21463,Beijing 1954 / Gauss-Kruger CM 135E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,135,1,,,,,,,,,,,,,,,,
+21500,Belge 1950 (Brussels) / Belge Lambert 50,Lambert Conic Conformal (2SP),metre,4215,Reseau National Belge 1950 (Brussels),International 1924,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51.1,90,0,49.5,5400000,150000
+21780,Bern 1898 (Bern) / LV03C,Oblique Mercator,metre,4801,CH1903 (Bern),Bessel 1841,0,0,0,0,0,90,46.570866,0,90,1,0,0,0,0,0,0,0,0,0,0,
+21781,CH1903 / LV03,Oblique Mercator,metre,4149,CH1903,Bessel 1841,0,0,0,0,0,90,46.570866,200000,90,1,600000,7.26225,0,0,0,0,0,0,0,0,
+21782,CH1903 / LV03C-G,Oblique Mercator,metre,4149,CH1903,Bessel 1841,0,0,0,0,0,90,46.570866,0,90,1,0,7.26225,0,0,0,0,0,0,0,0,
+21818,Bogota 1975 / UTM zone 18N,Transverse Mercator,metre,4218,Bogota 1975,International 1924,500000,0,0,-75,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+21896,Bogota 1975 / Colombia West zone,Transverse Mercator,metre,4218,Bogota 1975,International 1924,1000000,4.355657,1000000,-77.04513,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+21897,Bogota 1975 / Colombia Bogota zone,Transverse Mercator,metre,4218,Bogota 1975,International 1924,1000000,4.355657,1000000,-74.04513,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+21898,Bogota 1975 / Colombia East Central zone,Transverse Mercator,metre,4218,Bogota 1975,International 1924,1000000,4.355657,1000000,-71.04513,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+21899,Bogota 1975 / Colombia East,Transverse Mercator,metre,4218,Bogota 1975,International 1924,1000000,4.355657,1000000,-68.04513,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+22032,Camacupa / UTM zone 32S,Transverse Mercator,metre,4220,Camacupa,Clarke 1880 (RGS),500000,0,10000000,9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+22033,Camacupa / UTM zone 33S,Transverse Mercator,metre,4220,Camacupa,Clarke 1880 (RGS),500000,0,10000000,15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+22091,Camacupa / TM 11.30 SE,Transverse Mercator,metre,4220,Camacupa,Clarke 1880 (RGS),500000,0,10000000,11.3,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+22092,Camacupa / TM 12 SE,Transverse Mercator,metre,4220,Camacupa,Clarke 1880 (RGS),500000,0,10000000,12,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+22171,POSGAR 98 / Argentina 1,Transverse Mercator,metre,4190,Posiciones Geodesicas Argentinas 1998,GRS 1980,1500000,-90,0,-72,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+22172,POSGAR 98 / Argentina 2,Transverse Mercator,metre,4190,Posiciones Geodesicas Argentinas 1998,GRS 1980,2500000,-90,0,-69,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+22173,POSGAR 98 / Argentina 3,Transverse Mercator,metre,4190,Posiciones Geodesicas Argentinas 1998,GRS 1980,3500000,-90,0,-66,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+22174,POSGAR 98 / Argentina 4,Transverse Mercator,metre,4190,Posiciones Geodesicas Argentinas 1998,GRS 1980,4500000,-90,0,-63,1,,,,,,,,,,,,,,,
+22175,POSGAR 98 / Argentina 5,Transverse Mercator,metre,4190,Posiciones Geodesicas Argentinas 1998,GRS 1980,5500000,-90,0,-60,1,,,,,,,,,,,,,,,
+22176,POSGAR 98 / Argentina 6,Transverse Mercator,metre,4190,Posiciones Geodesicas Argentinas 1998,GRS 1980,6500000,-90,0,-57,1,,,,,,,,,,,,,,,
+22177,POSGAR 98 / Argentina 7,Transverse Mercator,metre,4190,Posiciones Geodesicas Argentinas 1998,GRS 1980,7500000,-90,0,-54,1,,,,,,,,,,,,,,,
+22181,POSGAR 94 / Argentina 1,Transverse Mercator,metre,4172,Posiciones Geodesicas Argentinas 1994,WGS 84,1500000,-90,0,-72,1,,,,,,,,,,,,,,,
+22182,POSGAR 94 / Argentina 2,Transverse Mercator,metre,4172,Posiciones Geodesicas Argentinas 1994,WGS 84,2500000,-90,0,-69,1,,,,,,,,,,,,,,,
+22183,POSGAR 94 / Argentina 3,Transverse Mercator,metre,4172,Posiciones Geodesicas Argentinas 1994,WGS 84,3500000,-90,0,-66,1,,,,,,,,,,,,,,,
+22184,POSGAR 94 / Argentina 4,Transverse Mercator,metre,4172,Posiciones Geodesicas Argentinas 1994,WGS 84,4500000,-90,0,-63,1,,,,,,,,,,,,,,,
+22185,POSGAR 94 / Argentina 5,Transverse Mercator,metre,4172,Posiciones Geodesicas Argentinas 1994,WGS 84,5500000,-90,0,-60,1,,,,,,,,,,,,,,,
+22186,POSGAR 94 / Argentina 6,Transverse Mercator,metre,4172,Posiciones Geodesicas Argentinas 1994,WGS 84,6500000,-90,0,-57,1,,,,,,,,,,,,,,,
+22187,POSGAR 94 / Argentina 7,Transverse Mercator,metre,4172,Posiciones Geodesicas Argentinas 1994,WGS 84,7500000,-90,0,-54,1,,,,,,,,,,,,,,,
+22191,Campo Inchauspe / Argentina 1,Transverse Mercator,metre,4221,Campo Inchauspe,International 1924,1500000,-90,0,-72,1,,,,,,,,,,,,,,,
+22192,Campo Inchauspe / Argentina 2,Transverse Mercator,metre,4221,Campo Inchauspe,International 1924,2500000,-90,0,-69,1,,,,,,,,,,,,,,,
+22193,Campo Inchauspe / Argentina 3,Transverse Mercator,metre,4221,Campo Inchauspe,International 1924,3500000,-90,0,-66,1,,,,,,,,,,,,,,,
+22194,Campo Inchauspe / Argentina 4,Transverse Mercator,metre,4221,Campo Inchauspe,International 1924,4500000,-90,0,-63,1,,,,,,,,,,,,,,,
+22195,Campo Inchauspe / Argentina 5,Transverse Mercator,metre,4221,Campo Inchauspe,International 1924,5500000,-90,0,-60,1,,,,,,,,,,,,,,,
+22196,Campo Inchauspe / Argentina 6,Transverse Mercator,metre,4221,Campo Inchauspe,International 1924,6500000,-90,0,-57,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+22197,Campo Inchauspe / Argentina 7,Transverse Mercator,metre,4221,Campo Inchauspe,International 1924,7500000,-90,0,-54,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+22234,Cape / UTM zone 34S,Transverse Mercator,metre,4222,Cape,Clarke 1880 (Arc),500000,0,10000000,21,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+22235,Cape / UTM zone 35S,Transverse Mercator,metre,4222,Cape,Clarke 1880 (Arc),500000,0,10000000,27,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+22236,Cape / UTM zone 36S,Transverse Mercator,metre,4222,Cape,Clarke 1880 (Arc),500000,0,10000000,33,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+22275,Cape / Lo15,Transverse Mercator (South Orientated),metre,4222,Cape,Clarke 1880 (Arc),0,0,0,15,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+22277,Cape / Lo17,Transverse Mercator (South Orientated),metre,4222,Cape,Clarke 1880 (Arc),0,0,0,17,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+22279,Cape / Lo19,Transverse Mercator (South Orientated),metre,4222,Cape,Clarke 1880 (Arc),0,0,0,19,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+22281,Cape / Lo21,Transverse Mercator (South Orientated),metre,4222,Cape,Clarke 1880 (Arc),0,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+22283,Cape / Lo23,Transverse Mercator (South Orientated),metre,4222,Cape,Clarke 1880 (Arc),0,0,0,23,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+22285,Cape / Lo25,Transverse Mercator (South Orientated),metre,4222,Cape,Clarke 1880 (Arc),0,0,0,25,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+22287,Cape / Lo27,Transverse Mercator (South Orientated),metre,4222,Cape,Clarke 1880 (Arc),0,0,0,27,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+22289,Cape / Lo29,Transverse Mercator (South Orientated),metre,4222,Cape,Clarke 1880 (Arc),0,0,0,29,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+22291,Cape / Lo31,Transverse Mercator (South Orientated),metre,4222,Cape,Clarke 1880 (Arc),0,0,0,31,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+22293,Cape / Lo33,Transverse Mercator (South Orientated),metre,4222,Cape,Clarke 1880 (Arc),0,0,0,33,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+22300,Carthage (Paris) / Tunisia Mining Grid,Tunisia Mining Grid,kilometre,4816,Carthage (Paris),Clarke 1880 (IGN),0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.81973,7.83445,0,582,270
+22332,Carthage / UTM zone 32N,Transverse Mercator,metre,4223,Carthage,Clarke 1880 (IGN),500000,0,0,9,0.9996,,,,,,,,,,,,,,,,
+22391,Carthage / Nord Tunisie,Lambert Conic Conformal (1SP),metre,4223,Carthage,Clarke 1880 (IGN),500000,40,300000,11,0.999625544,,,,,,,,,,,,,,,,
+22392,Carthage / Sud Tunisie,Lambert Conic Conformal (1SP),metre,4223,Carthage,Clarke 1880 (IGN),500000,37,300000,11,0.999625769,,,,,,,,,,,,,,,,
+22521,Corrego Alegre / UTM zone 21S,Transverse Mercator,metre,4225,Corrego Alegre,International 1924,500000,0,10000000,-57,0.9996,,,,,,,,,,,,,,,,
+22522,Corrego Alegre / UTM zone 22S,Transverse Mercator,metre,4225,Corrego Alegre,International 1924,500000,0,10000000,-51,0.9996,,,,,,,,,,,,,,,,
+22523,Corrego Alegre / UTM zone 23S,Transverse Mercator,metre,4225,Corrego Alegre,International 1924,500000,0,10000000,-45,0.9996,,,,,,,,,,,,,,,,
+22524,Corrego Alegre / UTM zone 24S,Transverse Mercator,metre,4225,Corrego Alegre,International 1924,500000,0,10000000,-39,0.9996,,,,,,,,,,,,,,,,
+22525,Corrego Alegre / UTM zone 25S,Transverse Mercator,metre,4225,Corrego Alegre,International 1924,500000,0,10000000,-33,0.9996,,,,,,,,,,,,,,,,
+22700,Deir ez Zor / Levant Zone,Lambert Conic Near-Conformal,metre,4227,Deir ez Zor,Clarke 1880 (IGN),300000,34.39,300000,37.21,0.9996256,,,,,,,,,,,,,,,,
+22770,Deir ez Zor / Syria Lambert,Lambert Conic Conformal (1SP),metre,4227,Deir ez Zor,Clarke 1880 (IGN),300000,34.39,300000,37.21,0.9996256,,,,,,,,,,,,,,,,
+22780,Deir ez Zor / Levant Stereographic,Oblique Stereographic,metre,4227,Deir ez Zor,Clarke 1880 (IGN),0,38,0,43.5,0.9995341,,,,,,,,,,,,,,,,
+22991,Egypt 1907 / Blue Belt,Transverse Mercator,metre,4229,Egypt 1907,Helmert 1906,300000,30,1100000,35,1,,,,,,,,,,,,,,,,
+22992,Egypt 1907 / Red Belt,Transverse Mercator,metre,4229,Egypt 1907,Helmert 1906,615000,30,810000,31,1,,,,,,,,,,,,,,,,
+22993,Egypt 1907 / Purple Belt,Transverse Mercator,metre,4229,Egypt 1907,Helmert 1906,700000,30,200000,27,1,,,,,,
+22994,Egypt 1907 / Extended Purple Belt,Transverse Mercator,metre,4229,Egypt 1907,Helmert 1906,700000,30,1200000,27,1,,,,,,
+23028,ED50 / UTM zone 28N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,-15,0.9996,,,,,,
+23029,ED50 / UTM zone 29N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,-9,0.9996,0,0,0,0,0,0
+23030,ED50 / UTM zone 30N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,-3,0.9996,0,0,0,0,0,0
+23031,ED50 / UTM zone 31N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,3,0.9996,0,0,0,0,0,0
+23032,ED50 / UTM zone 32N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,9,0.9996,0,0,0,0,0,0
+23033,ED50 / UTM zone 33N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,15,0.9996,0,0,0,0,0,0
+23034,ED50 / UTM zone 34N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,21,0.9996,0,0,0,0,0,0
+23035,ED50 / UTM zone 35N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,27,0.9996,0,0,0,0,0,0
+23036,ED50 / UTM zone 36N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,33,0.9996,0,0,0,0,0,0
+23037,ED50 / UTM zone 37N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,39,0.9996,0,0,0,0,0,0
+23038,ED50 / UTM zone 38N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,45,0.9996,0,0,0,0,0,0
+23090,ED50 / TM 0 N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,0,0.9996,0,0,0,0,0,0
+23095,ED50 / TM 5 NE,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,5,0.9996,0,0,0,0,0,0
+23239,Fahud / UTM zone 39N,Transverse Mercator,metre,4232,Fahud,Clarke 1880 (RGS),500000,0,0,51,0.9996,0,0,0,0,0,0
+23240,Fahud / UTM zone 40N,Transverse Mercator,metre,4232,Fahud,Clarke 1880 (RGS),500000,0,0,57,0.9996,0,0,0,0,0,0,
+23700,HD72 / EOV,Oblique Mercator,metre,4237,Hungarian Datum 1972,GRS 1967,0,0,0,0,0,90,47.08398174,200000,90,0.99993,650000,19.02548584
+23830,DGN95 / Indonesia TM-3 zone 46.2,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,94.5,0.9999,0,0,0,0,0,0,
+23831,DGN95 / Indonesia TM-3 zone 47.1,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,97.5,0.9999,,,,,,,
+23832,DGN95 / Indonesia TM-3 zone 47.2,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,100.5,0.9999,,,,,,,
+23833,DGN95 / Indonesia TM-3 zone 48.1,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,103.5,0.9999,,,,,,,
+23834,DGN95 / Indonesia TM-3 zone 48.2,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,106.5,0.9999,,,,,,,
+23835,DGN95 / Indonesia TM-3 zone 49.1,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,109.5,0.9999,,,,,,,
+23836,DGN95 / Indonesia TM-3 zone 49.2,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,112.5,0.9999,,,,,,,
+23837,DGN95 / Indonesia TM-3 zone 50.1,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,115.5,0.9999,,,,,,,
+23838,DGN95 / Indonesia TM-3 zone 50.2,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,118.5,0.9999,,,,,,,
+23839,DGN95 / Indonesia TM-3 zone 51.1,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,121.5,0.9999,,,,,,,
+23840,DGN95 / Indonesia TM-3 zone 51.2,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,124.5,0.9999,,,,,,,
+23841,DGN95 / Indonesia TM-3 zone 52.1,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,127.5,0.9999,,,,,,,
+23842,DGN95 / Indonesia TM-3 zone 52.2,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,130.5,0.9999,,,,,,,
+23843,DGN95 / Indonesia TM-3 zone 53.1,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,133.5,0.9999,,,,,,,
+23844,DGN95 / Indonesia TM-3 zone 53.2,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,136.5,0.9999
+23845,DGN95 / Indonesia TM-3 zone 54.1,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,139.5,0.9999
+23846,ID74 / UTM zone 46N,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,0,93,0.9996
+23847,ID74 / UTM zone 47N,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,0,99,0.9996
+23848,ID74 / UTM zone 48N,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,0,105,0.9996
+23849,ID74 / UTM zone 49N,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,0,111,0.9996
+23850,ID74 / UTM zone 50N,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,0,117,0.9996
+23851,ID74 / UTM zone 51N,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,0,123,0.9996
+23852,ID74 / UTM zone 52N,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,0,129,0.9996
+23866,DGN95 / UTM zone 46N,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,0,93,0.9996
+23867,DGN95 / UTM zone 47N,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,0,99,0.9996
+23868,DGN95 / UTM zone 48N,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,0,105,0.9996
+23869,DGN95 / UTM zone 49N,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,0,111,0.9996
+23870,DGN95 / UTM zone 50N,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,0,117,0.9996
+23871,DGN95 / UTM zone 51N,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,0,123,0.9996
+23872,DGN95 / UTM zone 52N,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,0,129,0.9996
+23877,DGN95 / UTM zone 47S,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,10000000,99,0.9996
+23878,DGN95 / UTM zone 48S,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,10000000,105,0.9996
+23879,DGN95 / UTM zone 49S,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,10000000,111,0.9996
+23880,DGN95 / UTM zone 50S,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,10000000,117,0.9996
+23881,DGN95 / UTM zone 51S,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,10000000,123,0.9996
+23882,DGN95 / UTM zone 52S,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,10000000,129,0.9996
+23883,DGN95 / UTM zone 53S,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,10000000,135,0.9996
+23884,DGN95 / UTM zone 54S,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,10000000,141,0.9996
+23887,ID74 / UTM zone 47S,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,10000000,99,0.9996
+23888,ID74 / UTM zone 48S,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,10000000,105,0.9996
+23889,ID74 / UTM zone 49S,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,10000000,111,0.9996
+23890,ID74 / UTM zone 50S,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,10000000,117,0.9996
+23891,ID74 / UTM zone 51S,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,10000000,123,0.9996
+23892,ID74 / UTM zone 52S,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,10000000,129,0.9996
+23893,ID74 / UTM zone 53S,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,10000000,135,0.9996
+23894,ID74 / UTM zone 54S,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,10000000,141,0.9996
+23946,Indian 1954 / UTM zone 46N,Transverse Mercator,metre,4239,Indian 1954,Everest 1830 (1937 Adjustment),500000,0,0,93,0.9996
+23947,Indian 1954 / UTM zone 47N,Transverse Mercator,metre,4239,Indian 1954,Everest 1830 (1937 Adjustment),500000,0,0,99,0.9996
+23948,Indian 1954 / UTM zone 48N,Transverse Mercator,metre,4239,Indian 1954,Everest 1830 (1937 Adjustment),500000,0,0,105,0.9996
+24047,Indian 1975 / UTM zone 47N,Transverse Mercator,metre,4240,Indian 1975,Everest 1830 (1937 Adjustment),500000,0,0,99,0.9996
+24048,Indian 1975 / UTM zone 48N,Transverse Mercator,metre,4240,Indian 1975,Everest 1830 (1937 Adjustment),500000,0,0,105,0.9996
+24100,Jamaica 1875 / Jamaica (Old Grid),Lambert Conic Conformal (1SP),Clarke's foot,4241,Jamaica 1875,Clarke 1880,550000,18,400000,-77,1
+24200,JAD69 / Jamaica National Grid,Lambert Conic Conformal (1SP),metre,4242,Jamaica 1969,Clarke 1866,250000,18,150000,-77,1
+24305,Kalianpur 1937 / UTM zone 45N,Transverse Mercator,metre,4144,Kalianpur 1937,Everest 1830 (1937 Adjustment),500000,0,0,87,0.9996
+24306,Kalianpur 1937 / UTM zone 46N,Transverse Mercator,metre,4144,Kalianpur 1937,Everest 1830 (1937 Adjustment),500000,0,0,93,0.9996
+24311,Kalianpur 1962 / UTM zone 41N,Transverse Mercator,metre,4145,Kalianpur 1962,Everest 1830 (1962 Definition),500000,0,0,63,0.9996
+24312,Kalianpur 1962 / UTM zone 42N,Transverse Mercator,metre,4145,Kalianpur 1962,Everest 1830 (1962 Definition),500000,0,0,69,0.9996
+24313,Kalianpur 1962 / UTM zone 43N,Transverse Mercator,metre,4145,Kalianpur 1962,Everest 1830 (1962 Definition),500000,0,0,75,0.9996
+24342,Kalianpur 1975 / UTM zone 42N,Transverse Mercator,metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),500000,0,0,69,0.9996
+24343,Kalianpur 1975 / UTM zone 43N,Transverse Mercator,metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),500000,0,0,75,0.9996
+24344,Kalianpur 1975 / UTM zone 44N,Transverse Mercator,metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),500000,0,0,81,0.9996
+24345,Kalianpur 1975 / UTM zone 45N,Transverse Mercator,metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),500000,0,0,87,0.9996
+24346,Kalianpur 1975 / UTM zone 46N,Transverse Mercator,metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),500000,0,0,93,0.9996
+24347,Kalianpur 1975 / UTM zone 47N,Transverse Mercator,metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),500000,0,0,99,0.9996
+24370,Kalianpur 1880 / India zone 0,Lambert Conic Conformal (1SP),Indian yard,4243,Kalianpur 1880,Everest (1830 Definition),2355500,39.3,2590000,68,0.99846154
+24371,Kalianpur 1880 / India zone I,Lambert Conic Conformal (1SP),Indian yard,4243,Kalianpur 1880,Everest (1830 Definition),3000000,32.3,1000000,68,0.99878641
+24372,Kalianpur 1880 / India zone IIa,Lambert Conic Conformal (1SP),Indian yard,4243,Kalianpur 1880,Everest (1830 Definition),3000000,26,1000000,74,0.99878641
+24373,Kalianpur 1880 / India zone III,Lambert Conic Conformal (1SP),Indian yard,4243,Kalianpur 1880,Everest (1830 Definition),3000000,19,1000000,80,0.99878641
+24374,Kalianpur 1880 / India zone IV,Lambert Conic Conformal (1SP),Indian yard,4243,Kalianpur 1880,Everest (1830 Definition),3000000,12,1000000,80,0.99878641
+24375,Kalianpur 1937 / India zone IIb,Lambert Conic Conformal (1SP),metre,4144,Kalianpur 1937,Everest 1830 (1937 Adjustment),2743185.69,26,914395.23,90,0.99878641
+24376,Kalianpur 1962 / India zone I,Lambert Conic Conformal (1SP),metre,4145,Kalianpur 1962,Everest 1830 (1962 Definition),2743196.4,32.3,914398.8,68,0.99878641
+24377,Kalianpur 1962 / India zone IIa,Lambert Conic Conformal (1SP),metre,4145,Kalianpur 1962,Everest 1830 (1962 Definition),2743196.4,26,914398.8,74,0.99878641
+24378,Kalianpur 1975 / India zone I,Lambert Conic Conformal (1SP),metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),2743195.5,32.3,914398.5,68,0.99878641
+24379,Kalianpur 1975 / India zone IIa,Lambert Conic Conformal (1SP),metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),2743195.5,26,914398.5,74,0.99878641
+24380,Kalianpur 1975 / India zone IIb,Lambert Conic Conformal (1SP),metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),2743195.5,26,914398.5,90,0.99878641
+24381,Kalianpur 1975 / India zone III,Lambert Conic Conformal (1SP),metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),2743195.5,19,914398.5,80,0.99878641
+24382,Kalianpur 1880 / India zone IIb,Lambert Conic Conformal (1SP),Indian yard,4243,Kalianpur 1880,Everest (1830 Definition),3000000,26,1000000,90,0.99878641
+24383,Kalianpur 1975 / India zone IV,Lambert Conic Conformal (1SP),metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),2743195.5,12,914398.5,80,0.99878641
+24500,Kertau 1968 / Singapore Grid,Cassini-Soldner,metre,4245,Kertau 1968,Everest 1830 Modified,30000,1.1715528,30000,103.5110808,
+24547,Kertau 1968 / UTM zone 47N,Transverse Mercator,metre,4245,Kertau 1968,Everest 1830 Modified,500000,0,0,99,0.9996
+24548,Kertau 1968 / UTM zone 48N,Transverse Mercator,metre,4245,Kertau 1968,Everest 1830 Modified,500000,0,0,105,0.9996
+24600,KOC Lambert,Lambert Conic Conformal (1SP),metre,4246,Kuwait Oil Company,Clarke 1880 (RGS),1500000,32.3,1166200,45,0.998786408
+24718,La Canoa / UTM zone 18N,Transverse Mercator,metre,4247,La Canoa,International 1924,500000,0,0,-75,0.9996
+24719,La Canoa / UTM zone 19N,Transverse Mercator,metre,4247,La Canoa,International 1924,500000,0,0,-69,0.9996
+24720,La Canoa / UTM zone 20N,Transverse Mercator,metre,4247,La Canoa,International 1924,500000,0,0,-63,0.9996
+24817,PSAD56 / UTM zone 17N,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,0,-81,0.9996
+24818,PSAD56 / UTM zone 18N,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,0,-75,0.9996
+24819,PSAD56 / UTM zone 19N,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,0,-69,0.9996
+24820,PSAD56 / UTM zone 20N,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,0,-63,0.9996
+24821,PSAD56 / UTM zone 21N,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,0,-57,0.9996
+24877,PSAD56 / UTM zone 17S,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,10000000,-81,0.9996
+24878,PSAD56 / UTM zone 18S,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,10000000,-75,0.9996
+24879,PSAD56 / UTM zone 19S,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,10000000,-69,0.9996
+24880,PSAD56 / UTM zone 20S,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,10000000,-63,0.9996
+24881,PSAD56 / UTM zone 21S,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,10000000,-57,0.9996
+24882,PSAD56 / UTM zone 22S,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,10000000,-51,0.9996
+24891,PSAD56 / Peru west zone,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,222000,-6,1426834.743,-80.3,0.99983008
+24892,PSAD56 / Peru central zone,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,720000,-9.3,1039979.159,-76,0.99932994
+24893,PSAD56 / Peru east zone,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,1324000,-9.3,1040084.558,-70.3,0.99952992
+25000,Leigon / Ghana Metre Grid,Transverse Mercator,metre,4250,Leigon,Clarke 1880 (RGS),274319.51,4.4,0,-1,0.99975
+25231,Lome / UTM zone 31N,Transverse Mercator,metre,4252,Lome,Clarke 1880 (IGN),500000,0,0,3,0.9996
+25391,Luzon 1911 / Philippines zone I,Transverse Mercator,metre,4253,Luzon 1911,Clarke 1866,500000,0,0,117,0.99995
+25392,Luzon 1911 / Philippines zone II,Transverse Mercator,metre,4253,Luzon 1911,Clarke 1866,500000,0,0,119,0.99995
+25393,Luzon 1911 / Philippines zone III,Transverse Mercator,metre,4253,Luzon 1911,Clarke 1866,500000,0,0,121,0.99995
+25394,Luzon 1911 / Philippines zone IV,Transverse Mercator,metre,4253,Luzon 1911,Clarke 1866,500000,0,0,123,0.99995
+25395,Luzon 1911 / Philippines zone V,Transverse Mercator,metre,4253,Luzon 1911,Clarke 1866,500000,0,0,125,0.99995
+25828,ETRS89 / UTM zone 28N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,-15,0.9996
+25829,ETRS89 / UTM zone 29N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,-9,0.9996
+25830,ETRS89 / UTM zone 30N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,-3,0.9996
+25831,ETRS89 / UTM zone 31N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,3,0.9996
+25832,ETRS89 / UTM zone 32N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,9,0.9996
+25833,ETRS89 / UTM zone 33N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,15,0.9996
+25834,ETRS89 / UTM zone 34N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,21,0.9996
+25835,ETRS89 / UTM zone 35N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,27,0.9996
+25836,ETRS89 / UTM zone 36N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,33,0.9996
+25837,ETRS89 / UTM zone 37N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,39,0.9996
+25838,ETRS89 / UTM zone 38N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,45,0.9996
+25884,ETRS89 / TM Baltic93,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,24,0.9996
+25932,Malongo 1987 / UTM zone 32S,Transverse Mercator,metre,4259,Malongo 1987,International 1924,500000,0,10000000,9,0.9996
+26191,Merchich / Nord Maroc,Lambert Conic Conformal (1SP),metre,4261,Merchich,Clarke 1880 (IGN),500000,37,300000,-6,0.999625769
+26192,Merchich / Sud Maroc,Lambert Conic Conformal (1SP),metre,4261,Merchich,Clarke 1880 (IGN),500000,33,300000,-6,0.999615596
+26194,Merchich / Sahara Nord,Lambert Conic Conformal (1SP),metre,4261,Merchich,Clarke 1880 (IGN),1200000,29,400000,-6,0.999616304
+26195,Merchich / Sahara Sud,Lambert Conic Conformal (1SP),metre,4261,Merchich,Clarke 1880 (IGN),1500000,25,400000,-6,0.999616437
+26237,Massawa / UTM zone 37N,Transverse Mercator,metre,4262,Massawa,Bessel 1841,500000,0,0,39,0.9996
+26331,Minna / UTM zone 31N,Transverse Mercator,metre,4263,Minna,Clarke 1880 (RGS),500000,0,0,3,0.9996
+26332,Minna / UTM zone 32N,Transverse Mercator,metre,4263,Minna,Clarke 1880 (RGS),500000,0,0,9,0.9996
+26391,Minna / Nigeria West Belt,Transverse Mercator,metre,4263,Minna,Clarke 1880 (RGS),230738.26,4,0,4.3,0.99975
+26392,Minna / Nigeria Mid Belt,Transverse Mercator,metre,4263,Minna,Clarke 1880 (RGS),670553.98,4,0,8.3,0.99975
+26393,Minna / Nigeria East Belt,Transverse Mercator,metre,4263,Minna,Clarke 1880 (RGS),1110369.7,4,0,12.3,0.99975
+26632,M'poraloko / UTM zone 32N,Transverse Mercator,metre,4266,M'poraloko,Clarke 1880 (IGN),500000,0,0,9,0.9996
+26692,M'poraloko / UTM zone 32S,Transverse Mercator,metre,4266,M'poraloko,Clarke 1880 (IGN),500000,0,10000000,9,0.9996
+26701,NAD27 / UTM zone 1N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-177,0.9996
+26702,NAD27 / UTM zone 2N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-171,0.9996
+26703,NAD27 / UTM zone 3N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-165,0.9996
+26704,NAD27 / UTM zone 4N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-159,0.9996
+26705,NAD27 / UTM zone 5N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-153,0.9996
+26706,NAD27 / UTM zone 6N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-147,0.9996
+26707,NAD27 / UTM zone 7N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-141,0.9996
+26708,NAD27 / UTM zone 8N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-135,0.9996
+26709,NAD27 / UTM zone 9N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-129,0.9996
+26710,NAD27 / UTM zone 10N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-123,0.9996
+26711,NAD27 / UTM zone 11N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-117,0.9996
+26712,NAD27 / UTM zone 12N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-111,0.9996,,,,,,,
+26713,NAD27 / UTM zone 13N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-105,0.9996,,,,,,,
+26714,NAD27 / UTM zone 14N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-99,0.9996,,,,,,,
+26715,NAD27 / UTM zone 15N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-93,0.9996,0,0,0,0,0,0,
+26716,NAD27 / UTM zone 16N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-87,0.9996,0,0,0,0,0,0,
+26717,NAD27 / UTM zone 17N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-81,0.9996,0,0,0,0,0,0,
+26718,NAD27 / UTM zone 18N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-75,0.9996,0,0,0,0,0,0,
+26719,NAD27 / UTM zone 19N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-69,0.9996,0,0,0,0,0,0,
+26720,NAD27 / UTM zone 20N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-63,0.9996,0,0,0,0,0,0,
+26721,NAD27 / UTM zone 21N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-57,0.9996,0,0,0,0,0,0,
+26722,NAD27 / UTM zone 22N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-51,0.9996,0,0,0,0,0,0,
+26729,NAD27 / Alabama East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,30.3,0,-85.5,0.99996,0,0,0,0,0,0,
+26730,NAD27 / Alabama West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,30,0,-87.3,0.999933333,0,0,0,0,0,0,
+26731,NAD27 / Alaska zone 1,Hotine Oblique Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,16404166.67,0,-16404166.67,0,0,323.0748369,57,0,323.0748369,0.9999,0,-133.4
+26732,NAD27 / Alaska zone 2,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,54,0,-142,0.9999,0,0,0,0,0,0,
+26733,NAD27 / Alaska zone 3,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,54,0,-146,0.9999,0,0,0,0,0,0,
+26734,NAD27 / Alaska zone 4,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,54,0,-150,0.9999,0,0,0,0,0,0,,,,,,,,,,
+26735,NAD27 / Alaska zone 5,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,54,0,-154,0.9999,0,0,0,0,0,0,,,,,,,,,,
+26736,NAD27 / Alaska zone 6,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,54,0,-158,0.9999,0,0,0,0,0,0,,,,,,,,,,
+26737,NAD27 / Alaska zone 7,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,700000,54,0,-162,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26738,NAD27 / Alaska zone 8,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,54,0,-166,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26739,NAD27 / Alaska zone 9,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,600000,54,0,-170,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26740,NAD27 / Alaska zone 10,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51.5,51,-176,53.5,0,3000000
+26741,NAD27 / California zone I,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.2,-122,41.4,0,2000000
+26742,NAD27 / California zone II,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.2,37.4,-122,39.5,0,2000000
+26743,NAD27 / California zone III,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.04,36.3,-120.3,38.26,0,2000000
+26744,NAD27 / California zone IV,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,35.2,-119,37.15,0,2000000
+26745,NAD27 / California zone V,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.02,33.3,-118,35.28,0,2000000
+26746,NAD27 / California zone VI,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.47,32.1,-116.15,33.53,0,2000000
+26748,NAD27 / Arizona East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,31,0,-110.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26749,NAD27 / Arizona Central,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,31,0,-111.55,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26750,NAD27 / Arizona West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,31,0,-113.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26751,NAD27 / Arkansas North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.56,34.2,-92,36.14,0,2000000
+26752,NAD27 / Arkansas South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.18,32.4,-92,34.46,0,2000000
+26753,NAD27 / Colorado North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.47,39.2,-105.3,39.43,0,2000000
+26754,NAD27 / Colorado Central,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.27,37.5,-105.3,39.45,0,2000000
+26755,NAD27 / Colorado South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.14,36.4,-105.3,38.26,0,2000000
+26756,NAD27 / Connecticut,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.12,40.5,-72.45,41.52,0,600000
+26757,NAD27 / Delaware,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,38,0,-75.25,0.999995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26758,NAD27 / Florida East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,24.2,0,-81,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26759,NAD27 / Florida West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,24.2,0,-82,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26760,NAD27 / Florida North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.35,29,-84.3,30.45,0,2000000
+26766,NAD27 / Georgia East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,30,0,-82.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26767,NAD27 / Georgia West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,30,0,-84.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26768,NAD27 / Idaho East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,41.4,0,-112.1,0.999947368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26769,NAD27 / Idaho Central,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,41.4,0,-114,0.999947368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26770,NAD27 / Idaho West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,41.4,0,-115.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26771,NAD27 / Illinois East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,36.4,0,-88.2,0.999975,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26772,NAD27 / Illinois West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,36.4,0,-90.1,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26773,NAD27 / Indiana East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,37.3,0,-85.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26774,NAD27 / Indiana West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,37.3,0,-87.05,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26775,NAD27 / Iowa North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.04,41.3,-93.3,43.16,0,2000000
+26776,NAD27 / Iowa South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.37,40,-93.3,41.47,0,2000000
+26777,NAD27 / Kansas North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.43,38.2,-98,39.47,0,2000000
+26778,NAD27 / Kansas South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.16,36.4,-98.3,38.34,0,2000000
+26779,NAD27 / Kentucky North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.58,37.3,-84.15,37.58,0,2000000
+26780,NAD27 / Kentucky South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.56,36.2,-85.45,36.44,0,2000000
+26781,NAD27 / Louisiana North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.4,30.4,-92.3,31.1,0,2000000
+26782,NAD27 / Louisiana South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30.42,28.4,-91.2,29.18,0,2000000
+26783,NAD27 / Maine East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,43.5,0,-68.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26784,NAD27 / Maine West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,42.5,0,-70.1,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26785,NAD27 / Maryland,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.27,37.5,-77,38.18,0,800000
+26786,NAD27 / Massachusetts Mainland,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.41,41,-71.3,41.43,0,600000
+26787,NAD27 / Massachusetts Island,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.29,41,-70.3,41.17,0,200000
+26791,NAD27 / Minnesota North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48.38,46.3,-93.06,47.02,0,2000000
+26792,NAD27 / Minnesota Central,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.03,45,-94.15,45.37,0,2000000
+26793,NAD27 / Minnesota South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.13,43,-94,43.47,0,2000000
+26794,NAD27 / Mississippi East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,29.4,0,-88.5,0.99996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26795,NAD27 / Mississippi West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,30.3,0,-90.2,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26796,NAD27 / Missouri East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,35.5,0,-90.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26797,NAD27 / Missouri Central,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,35.5,0,-92.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26798,NAD27 / Missouri West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,36.1,0,-94.3,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26799,NAD27 / California zone VII,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.52,34.08,-118.2,34.25,4160926.74,4186692.58
+26801,NAD Michigan / Michigan East,Transverse Mercator,US survey foot,4268,NAD Michigan,Clarke 1866 Michigan,500000,41.3,0,-83.4,0.999942857,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26802,NAD Michigan / Michigan Old Central,Transverse Mercator,US survey foot,4268,NAD Michigan,Clarke 1866 Michigan,500000,41.3,0,-85.45,0.999909091,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26803,NAD Michigan / Michigan West,Transverse Mercator,US survey foot,4268,NAD Michigan,Clarke 1866 Michigan,500000,41.3,0,-88.45,0.999909091,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26811,NAD Michigan / Michigan North,Lambert Conic Conformal (2SP),US survey foot,4268,NAD Michigan,Clarke 1866 Michigan,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.05,44.47,-87,45.29,0,2000000
+26812,NAD Michigan / Michigan Central,Lambert Conic Conformal (2SP),US survey foot,4268,NAD Michigan,Clarke 1866 Michigan,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.42,43.19,-84.2,44.11,0,2000000
+26813,NAD Michigan / Michigan South,Lambert Conic Conformal (2SP),US survey foot,4268,NAD Michigan,Clarke 1866 Michigan,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43.4,41.3,-84.2,42.06,0,2000000
+26847,NAD83 / Maine East (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,984250,43.4,0,-68.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26848,NAD83 / Maine West (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,2952750,42.5,0,-70.1,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26849,NAD83 / Minnesota North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.02,46.3,-93.06,48.38,328083.3333,2624666.667
+26850,NAD83 / Minnesota Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.37,45,-94.15,47.03,328083.3333,2624666.667
+26851,NAD83 / Minnesota South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43.47,43,-94,45.13,328083.3333,2624666.667
+26852,NAD83 / Nebraska (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.5,-100,43,0,1640416.667
+26853,NAD83 / West Virginia North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39,38.3,-79.3,40.15,0,1968500
+26854,NAD83 / West Virginia South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.29,37,-81,38.53,0,1968500
+26855,NAD83(HARN) / Maine East (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,984250,43.4,0,-68.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26856,NAD83(HARN) / Maine West (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,2952750,42.5,0,-70.1,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26857,NAD83(HARN) / Minnesota North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.02,46.3,-93.06,48.38,328083.3333,2624666.667
+26858,NAD83(HARN) / Minnesota Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.37,45,-94.15,47.03,328083.3333,2624666.667
+26859,NAD83(HARN) / Minnesota South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43.47,43,-94,45.13,328083.3333,2624666.667
+26860,NAD83(HARN) / Nebraska (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.5,-100,43,0,1640416.667
+26861,NAD83(HARN) / West Virginia North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39,38.3,-79.3,40.15,0,1968500
+26862,NAD83(HARN) / West Virginia South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.29,37,-81,38.53,0,1968500
+26863,NAD83(NSRS2007) / Maine East (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,984250,43.4,0,-68.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26864,NAD83(NSRS2007) / Maine West (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,2952750,42.5,0,-70.1,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26865,NAD83(NSRS2007) / Minnesota North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.02,46.3,-93.06,48.38,328083.3333,2624666.667
+26866,NAD83(NSRS2007) / Minnesota Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.37,45,-94.15,47.03,328083.3333,2624666.667
+26867,NAD83(NSRS2007) / Minnesota South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43.47,43,-94,45.13,328083.3333,2624666.667
+26868,NAD83(NSRS2007) / Nebraska (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.5,-100,43,0,1640416.667
+26869,NAD83(NSRS2007) / West Virginia North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39,38.3,-79.3,40.15,0,1968500
+26870,NAD83(NSRS2007) / West Virginia South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.29,37,-81,38.53,0,1968500
+26891,NAD83(CSRS) / MTM zone 11,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-82.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26892,NAD83(CSRS) / MTM zone 12,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-81,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26893,NAD83(CSRS) / MTM zone 13,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-84,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26894,NAD83(CSRS) / MTM zone 14,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-87,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26895,NAD83(CSRS) / MTM zone 15,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-90,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26896,NAD83(CSRS) / MTM zone 16,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-93,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26897,NAD83(CSRS) / MTM zone 17,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-96,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26898,NAD83(CSRS) / MTM zone 1,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-53,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26899,NAD83(CSRS) / MTM zone 2,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-56,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26901,NAD83 / UTM zone 1N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-177,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+26902,NAD83 / UTM zone 2N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-171,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+26903,NAD83 / UTM zone 3N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-165,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+26904,NAD83 / UTM zone 4N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-159,0.9996,,,,,,,,,,,,,,,
+26905,NAD83 / UTM zone 5N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-153,0.9996,,,,,,,,,,,,,,,
+26906,NAD83 / UTM zone 6N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-147,0.9996,,,,,,,,,,,,,,,
+26907,NAD83 / UTM zone 7N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-141,0.9996,,,,,,,,,,,,,,,
+26908,NAD83 / UTM zone 8N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-135,0.9996,,,,,,,,,,,,,,,
+26909,NAD83 / UTM zone 9N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-129,0.9996,,,,,,,,,,,,,,,
+26910,NAD83 / UTM zone 10N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-123,0.9996,,,,,,,,,,,,,,,
+26911,NAD83 / UTM zone 11N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-117,0.9996,,,,,,,,,,,,,,,
+26912,NAD83 / UTM zone 12N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-111,0.9996,,,,,,,,,,,,,,,
+26913,NAD83 / UTM zone 13N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-105,0.9996,,,,,,,,,,,,,,,
+26914,NAD83 / UTM zone 14N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-99,0.9996,,,,,,,,,,,,,,,
+26915,NAD83 / UTM zone 15N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-93,0.9996,,,,,,,,,,,,,,,
+26916,NAD83 / UTM zone 16N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-87,0.9996,,,,,,,,,,,,,,,
+26917,NAD83 / UTM zone 17N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-81,0.9996,,,,,,,,,,,,,,,
+26918,NAD83 / UTM zone 18N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-75,0.9996,,,,,,,,,,,,,,,
+26919,NAD83 / UTM zone 19N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-69,0.9996,,,,,,,,,,,,,,,
+26920,NAD83 / UTM zone 20N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+26921,NAD83 / UTM zone 21N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-57,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+26922,NAD83 / UTM zone 22N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+26923,NAD83 / UTM zone 23N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+26929,NAD83 / Alabama East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,200000,30.3,0,-85.5,0.99996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+26930,NAD83 / Alabama West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,600000,30,0,-87.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+26931,NAD83 / Alaska zone 1,Hotine Oblique Mercator,metre,4269,North American Datum 1983,GRS 1980,5000000,0,-5000000,0,0,323.0748369,57,0,323.0748369,0.9999,0,-133.4,0,0,0,0,0,0,0,0
+26932,NAD83 / Alaska zone 2,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,54,0,-142,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+26933,NAD83 / Alaska zone 3,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,54,0,-146,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+26934,NAD83 / Alaska zone 4,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,54,0,-150,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+26935,NAD83 / Alaska zone 5,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,54,0,-154,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+26936,NAD83 / Alaska zone 6,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,54,0,-158,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+26937,NAD83 / Alaska zone 7,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,54,0,-162,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+26938,NAD83 / Alaska zone 8,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,54,0,-166,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26939,NAD83 / Alaska zone 9,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,54,0,-170,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26940,NAD83 / Alaska zone 10,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51.5,51,-176,53.5,0,1000000
+26941,NAD83 / California zone 1,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.2,-122,41.4,500000,2000000
+26942,NAD83 / California zone 2,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.2,37.4,-122,39.5,500000,2000000
+26943,NAD83 / California zone 3,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.04,36.3,-120.3,38.26,500000,2000000
+26944,NAD83 / California zone 4,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,35.2,-119,37.15,500000,2000000
+26945,NAD83 / California zone 5,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.02,33.3,-118,35.28,500000,2000000
+26946,NAD83 / California zone 6,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.47,32.1,-116.15,33.53,500000,2000000
+26948,NAD83 / Arizona East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,213360,31,0,-110.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26949,NAD83 / Arizona Central,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,213360,31,0,-111.55,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26950,NAD83 / Arizona West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,213360,31,0,-113.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26951,NAD83 / Arkansas North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.56,34.2,-92,36.14,0,400000
+26952,NAD83 / Arkansas South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.18,32.4,-92,34.46,400000,400000
+26953,NAD83 / Colorado North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.43,39.2,-105.3,40.47,304800.6096,914401.8289
+26954,NAD83 / Colorado Central,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.27,37.5,-105.3,39.45,304800.6096,914401.8289
+26955,NAD83 / Colorado South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.14,36.4,-105.3,38.26,304800.6096,914401.8289
+26956,NAD83 / Connecticut,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.12,40.5,-72.45,41.52,152400.3048,304800.6096
+26957,NAD83 / Delaware,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,200000,38,0,-75.25,0.999995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26958,NAD83 / Florida East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,200000,24.2,0,-81,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26959,NAD83 / Florida West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,200000,24.2,0,-82,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26960,NAD83 / Florida North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.35,29,-84.3,30.45,0,600000
+26961,NAD83 / Hawaii zone 1,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,18.5,0,-155.3,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26962,NAD83 / Hawaii zone 2,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,20.2,0,-156.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26963,NAD83 / Hawaii zone 3,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,21.1,0,-158,0.99999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26964,NAD83 / Hawaii zone 4,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,21.5,0,-159.3,0.99999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26965,NAD83 / Hawaii zone 5,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,21.4,0,-160.1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26966,NAD83 / Georgia East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,200000,30,0,-82.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26967,NAD83 / Georgia West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,700000,30,0,-84.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26968,NAD83 / Idaho East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,200000,41.4,0,-112.1,0.999947368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26969,NAD83 / Idaho Central,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,41.4,0,-114,0.999947368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26970,NAD83 / Idaho West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,800000,41.4,0,-115.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26971,NAD83 / Illinois East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,300000,36.4,0,-88.2,0.999975,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26972,NAD83 / Illinois West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,700000,36.4,0,-90.1,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26973,NAD83 / Indiana East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,100000,37.3,250000,-85.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26974,NAD83 / Indiana West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,900000,37.3,250000,-87.05,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26975,NAD83 / Iowa North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.04,41.3,-93.3,43.16,1000000,1500000
+26976,NAD83 / Iowa South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.37,40,-93.3,41.47,0,500000
+26977,NAD83 / Kansas North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.43,38.2,-98,39.47,0,400000
+26978,NAD83 / Kansas South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.16,36.4,-98.3,38.34,400000,400000
+26980,NAD83 / Kentucky South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.44,36.2,-85.45,37.56,500000,500000
+26981,NAD83 / Louisiana North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.1,30.3,-92.3,32.4,0,1000000
+26982,NAD83 / Louisiana South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.18,28.3,-91.2,30.42,0,1000000
+26983,NAD83 / Maine East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,300000,43.4,0,-68.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26984,NAD83 / Maine West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,900000,42.5,0,-70.1,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26985,NAD83 / Maryland,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.18,37.4,-77,39.27,0,400000
+26986,NAD83 / Massachusetts Mainland,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.43,41,-71.3,42.41,750000,200000
+26987,NAD83 / Massachusetts Island,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.17,41,-70.3,41.29,0,500000
+26988,NAD83 / Michigan North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.29,44.47,-87,47.05,0,8000000
+26989,NAD83 / Michigan Central,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.11,43.19,-84.22,45.42,0,6000000
+26990,NAD83 / Michigan South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.06,41.3,-84.22,43.4,0,4000000
+26991,NAD83 / Minnesota North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.02,46.3,-93.06,48.38,100000,800000
+26992,NAD83 / Minnesota Central,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.37,45,-94.15,47.03,100000,800000
+26993,NAD83 / Minnesota South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43.47,43,-94,45.13,100000,800000
+26994,NAD83 / Mississippi East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,300000,29.3,0,-88.5,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26995,NAD83 / Mississippi West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,700000,29.3,0,-90.2,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26996,NAD83 / Missouri East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,250000,35.5,0,-90.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26997,NAD83 / Missouri Central,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,35.5,0,-92.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+26998,NAD83 / Missouri West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,850000,36.1,0,-94.3,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+27037,Nahrwan 1967 / UTM zone 37N,Transverse Mercator,metre,4270,Nahrwan 1967,Clarke 1880 (RGS),500000,0,0,39,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+27038,Nahrwan 1967 / UTM zone 38N,Transverse Mercator,metre,4270,Nahrwan 1967,Clarke 1880 (RGS),500000,0,0,45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+27039,Nahrwan 1967 / UTM zone 39N,Transverse Mercator,metre,4270,Nahrwan 1967,Clarke 1880 (RGS),500000,0,0,51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+27040,Nahrwan 1967 / UTM zone 40N,Transverse Mercator,metre,4270,Nahrwan 1967,Clarke 1880 (RGS),500000,0,0,57,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+27120,Naparima 1972 / UTM zone 20N,Transverse Mercator,metre,4271,Naparima 1972,International 1924,500000,0,0,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+27200,NZGD49 / New Zealand Map Grid,New Zealand Map Grid,metre,4272,New Zealand Geodetic Datum 1949,International 1924,2510000,-41,6023150,173,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+27205,NZGD49 / Mount Eden Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-36.5247515,700000,174.4551622,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+27206,NZGD49 / Bay of Plenty Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-37.45404993,700000,176.275831,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+27207,NZGD49 / Poverty Bay Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-38.372893,700000,177.5308291,1,,,,,,,,,,,,,,,
+27208,NZGD49 / Hawkes Bay Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-39.39033455,700000,176.402525,1,,,,,,,,,,,,,,,
+27209,NZGD49 / Taranaki Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-39.08087299,700000,174.1340842,1,,,,,,,,,,,,,,,
+27210,NZGD49 / Tuhirangi Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-39.30448934,700000,175.3824133,1,,,,,,,,,,,,,,,
+27211,NZGD49 / Wanganui Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-40.14310097,700000,175.2917159,1,,,,,,,,,,,,,,,
+27212,NZGD49 / Wairarapa Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-40.55319175,700000,175.3850459,1,,,,,,,,,,,,,,,
+27213,NZGD49 / Wellington Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-41.18047507,700000,174.4635843,1,,,,,,,,,,,,,,,
+27214,NZGD49 / Collingwood Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-40.42531326,700000,172.4019367,1,,,,,,,,,,,,,,,
+27215,NZGD49 / Nelson Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-41.1628361,700000,173.1757541,1,,,,,,,,,,,,,,,
+27216,NZGD49 / Karamea Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-41.17236815,700000,172.0632502,1,,,,,,,,,,,,,,,
+27217,NZGD49 / Buller Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-41.48388903,700000,171.3452536,1,,,,,,,,,,,,,,,
+27218,NZGD49 / Grey Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-42.20012994,700000,171.3259177,1,,,,,,,,,,,,,,,
+27219,NZGD49 / Amuri Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-42.41208197,700000,173.003648,1,,,,,,,,,,,,,,,
+27220,NZGD49 / Marlborough Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-41.3240152,700000,173.4807467,1
+27221,NZGD49 / Hokitika Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-42.53107605,700000,170.5847977,1
+27222,NZGD49 / Okarito Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-43.06364613,700000,170.1539333,1
+27223,NZGD49 / Jacksons Bay Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-43.58400904,700000,168.3622561,1
+27224,NZGD49 / Mount Pleasant Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-43.35262953,700000,172.4337897,1
+27225,NZGD49 / Gawler Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-43.44553616,700000,171.2138695,1
+27226,NZGD49 / Timaru Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-44.24079933,700000,171.0326103,1
+27227,NZGD49 / Lindis Peak Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-44.44069647,700000,169.2803918,1
+27228,NZGD49 / Mount Nicholas Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-45.07584493,700000,168.2355108,1
+27229,NZGD49 / Mount York Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-45.33494142,700000,167.4419902,1
+27230,NZGD49 / Observation Point Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-45.48583078,700000,170.3742943,1
+27231,NZGD49 / North Taieri Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-45.51414481,700000,170.1657321,0.99996
+27232,NZGD49 / Bluff Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300002.66,-46.36000346,699999.58,168.2034339,1
+27258,NZGD49 / UTM zone 58S,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,500000,0,10000000,165,0.9996
+27259,NZGD49 / UTM zone 59S,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,500000,0,10000000,171,0.9996
+27260,NZGD49 / UTM zone 60S,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,500000,0,10000000,177,0.9996
+27291,NZGD49 / North Island Grid,Transverse Mercator,British yard (Sears 1922),4272,New Zealand Geodetic Datum 1949,International 1924,300000,-39,400000,175.3,1
+27292,NZGD49 / South Island Grid,Transverse Mercator,British yard (Sears 1922),4272,New Zealand Geodetic Datum 1949,International 1924,500000,-44,500000,171.3,1
+27391,NGO 1948 (Oslo) / NGO zone I,Transverse Mercator,metre,4273,NGO 1948 (Oslo),Bessel Modified,0,58,0,-4.4,1
+27392,NGO 1948 (Oslo) / NGO zone II,Transverse Mercator,metre,4273,NGO 1948 (Oslo),Bessel Modified,0,58,0,-2.2,1
+27393,NGO 1948 (Oslo) / NGO zone III,Transverse Mercator,metre,4273,NGO 1948 (Oslo),Bessel Modified,0,58,0,0,1
+27394,NGO 1948 (Oslo) / NGO zone IV,Transverse Mercator,metre,4273,NGO 1948 (Oslo),Bessel Modified,0,58,0,2.3,1
+27395,NGO 1948 (Oslo) / NGO zone V,Transverse Mercator,metre,4273,NGO 1948 (Oslo),Bessel Modified,0,58,0,6.1,1
+27396,NGO 1948 (Oslo) / NGO zone VI,Transverse Mercator,metre,4273,NGO 1948 (Oslo),Bessel Modified,0,58,0,10.1,1
+27397,NGO 1948 (Oslo) / NGO zone VII,Transverse Mercator,metre,4273,NGO 1948 (Oslo),Bessel Modified,0,58,0,14.1,1
+27398,NGO 1948 (Oslo) / NGO zone VIII,Transverse Mercator,metre,4273,NGO 1948 (Oslo),Bessel Modified,0,58,0,18.2,1
+27429,Datum 73 / UTM zone 29N,Transverse Mercator,metre,4274,Datum 73,International 1924,500000,0,0,-9,0.9996
+27493,Datum 73 / Modified Portuguese Grid,Transverse Mercator,metre,4274,Datum 73,International 1924,180.598,39.4,-86.99,-8.0754862,1
+27500,ATF (Paris) / Nord de Guerre,Lambert Conic Conformal (1SP),metre,4901,Ancienne Triangulation Francaise (Paris),Plessis 1817,500000,55,300000,6,0.99950908
+27561,NTF (Paris) / Lambert Nord France,Lambert Conic Conformal (1SP),metre,4807,Nouvelle Triangulation Francaise (Paris),Clarke 1880 (IGN),600000,55,200000,0,0.999877341
+27562,NTF (Paris) / Lambert Centre France,Lambert Conic Conformal (1SP),metre,4807,Nouvelle Triangulation Francaise (Paris),Clarke 1880 (IGN),600000,52,200000,0,0.99987742
+27563,NTF (Paris) / Lambert Sud France,Lambert Conic Conformal (1SP),metre,4807,Nouvelle Triangulation Francaise (Paris),Clarke 1880 (IGN),600000,49,200000,0,0.999877499
+27564,NTF (Paris) / Lambert Corse,Lambert Conic Conformal (1SP),metre,4807,Nouvelle Triangulation Francaise (Paris),Clarke 1880 (IGN),234.358,46.85,185861.369,0,0.99994471
+27571,NTF (Paris) / Lambert zone I,Lambert Conic Conformal (1SP),metre,4807,Nouvelle Triangulation Francaise (Paris),Clarke 1880 (IGN),600000,55,1200000,0,0.999877341
+27572,NTF (Paris) / Lambert zone II,Lambert Conic Conformal (1SP),metre,4807,Nouvelle Triangulation Francaise (Paris),Clarke 1880 (IGN),600000,52,2200000,0,0.99987742
+27573,NTF (Paris) / Lambert zone III,Lambert Conic Conformal (1SP),metre,4807,Nouvelle Triangulation Francaise (Paris),Clarke 1880 (IGN),600000,49,3200000,0,0.999877499
+27574,NTF (Paris) / Lambert zone IV,Lambert Conic Conformal (1SP),metre,4807,Nouvelle Triangulation Francaise (Paris),Clarke 1880 (IGN),234.358,46.85,4185861.369,0,0.99994471
+27700,OSGB 1936 / British National Grid,Transverse Mercator,metre,4277,OSGB 1936,Airy 1830,400000,49,-100000,-2,0.999601272
+28191,Palestine 1923 / Palestine Grid,Cassini-Soldner,metre,4281,Palestine 1923,Clarke 1880 (Benoit),170251.555,31.4402749,126867.909,35.124349,
+28192,Palestine 1923 / Palestine Belt,Transverse Mercator,metre,4281,Palestine 1923,Clarke 1880 (Benoit),170251.555,31.4402749,1126867.909,35.124349,1
+28193,Palestine 1923 / Israeli CS Grid,Cassini-Soldner,metre,4281,Palestine 1923,Clarke 1880 (Benoit),170251.555,31.4402749,1126867.909,35.124349,
+28232,Pointe Noire / UTM zone 32S,Transverse Mercator,metre,4282,Congo 1960 Pointe Noire,Clarke 1880 (IGN),500000,0,10000000,9,0.9996
+28348,GDA94 / MGA zone 48,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,105,0.9996
+28349,GDA94 / MGA zone 49,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,111,0.9996
+28350,GDA94 / MGA zone 50,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,117,0.9996
+28351,GDA94 / MGA zone 51,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,123,0.9996
+28352,GDA94 / MGA zone 52,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,129,0.9996
+28353,GDA94 / MGA zone 53,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,135,0.9996
+28354,GDA94 / MGA zone 54,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,141,0.9996
+28355,GDA94 / MGA zone 55,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,147,0.9996
+28356,GDA94 / MGA zone 56,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,153,0.9996
+28357,GDA94 / MGA zone 57,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,159,0.9996
+28358,GDA94 / MGA zone 58,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,165,0.9996
+28404,Pulkovo 1942 / Gauss-Kruger zone 4,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,4500000,0,0,21,1
+28405,Pulkovo 1942 / Gauss-Kruger zone 5,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,5500000,0,0,27,1
+28406,Pulkovo 1942 / Gauss-Kruger zone 6,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,6500000,0,0,33,1
+28407,Pulkovo 1942 / Gauss-Kruger zone 7,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,7500000,0,0,39,1
+28408,Pulkovo 1942 / Gauss-Kruger zone 8,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,8500000,0,0,45,1
+28409,Pulkovo 1942 / Gauss-Kruger zone 9,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,9500000,0,0,51,1
+28410,Pulkovo 1942 / Gauss-Kruger zone 10,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,10500000,0,0,57,1
+28411,Pulkovo 1942 / Gauss-Kruger zone 11,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,11500000,0,0,63,1
+28412,Pulkovo 1942 / Gauss-Kruger zone 12,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,12500000,0,0,69,1
+28413,Pulkovo 1942 / Gauss-Kruger zone 13,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,13500000,0,0,75,1
+28414,Pulkovo 1942 / Gauss-Kruger zone 14,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,14500000,0,0,81,1
+28415,Pulkovo 1942 / Gauss-Kruger zone 15,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,15500000,0,0,87,1
+28416,Pulkovo 1942 / Gauss-Kruger zone 16,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,16500000,0,0,93,1
+28417,Pulkovo 1942 / Gauss-Kruger zone 17,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,17500000,0,0,99,1
+28418,Pulkovo 1942 / Gauss-Kruger zone 18,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,18500000,0,0,105,1
+28419,Pulkovo 1942 / Gauss-Kruger zone 19,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,19500000,0,0,111,1
+28420,Pulkovo 1942 / Gauss-Kruger zone 20,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,20500000,0,0,117,1
+28421,Pulkovo 1942 / Gauss-Kruger zone 21,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,21500000,0,0,123,1
+28422,Pulkovo 1942 / Gauss-Kruger zone 22,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,22500000,0,0,129,1
+28423,Pulkovo 1942 / Gauss-Kruger zone 23,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,23500000,0,0,135,1
+28424,Pulkovo 1942 / Gauss-Kruger zone 24,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,24500000,0,0,141,1
+28425,Pulkovo 1942 / Gauss-Kruger zone 25,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,25500000,0,0,147,1
+28426,Pulkovo 1942 / Gauss-Kruger zone 26,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,26500000,0,0,153,1
+28427,Pulkovo 1942 / Gauss-Kruger zone 27,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,27500000,0,0,159,1
+28428,Pulkovo 1942 / Gauss-Kruger zone 28,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,28500000,0,0,165,1
+28429,Pulkovo 1942 / Gauss-Kruger zone 29,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,29500000,0,0,171,1
+28430,Pulkovo 1942 / Gauss-Kruger zone 30,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,30500000,0,0,177,1
+28431,Pulkovo 1942 / Gauss-Kruger zone 31,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,31500000,0,0,-177,1
+28432,Pulkovo 1942 / Gauss-Kruger zone 32,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,32500000,0,0,-171,1
+28600,Qatar 1974 / Qatar National Grid,Transverse Mercator,metre,4285,Qatar 1974,International 1924,200000,24.27,300000,51.13,0.99999
+28991,Amersfoort / RD Old,Oblique Stereographic,metre,4289,Amersfoort,Bessel 1841,0,52.0922178,0,5.23155,0.9999079
+28992,Amersfoort / RD New,Oblique Stereographic,metre,4289,Amersfoort,Bessel 1841,155000,52.0922178,463000,5.23155,0.9999079
+29101,SAD69 / Brazil Polyconic,American Polyconic,metre,4291,South American Datum 1969,GRS 1967 Modified,5000000,0,10000000,-54,
+29168,SAD69 / UTM zone 18N,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,0,-75,0.9996
+29169,SAD69 / UTM zone 19N,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,0,-69,0.9996
+29170,SAD69 / UTM zone 20N,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,0,-63,0.9996
+29171,SAD69 / UTM zone 21N,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,0,-57,0.9996
+29172,SAD69 / UTM zone 22N,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,0,-51,0.9996
+29187,SAD69 / UTM zone 17S,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,10000000,-81,0.9996
+29188,SAD69 / UTM zone 18S,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,10000000,-75,0.9996
+29189,SAD69 / UTM zone 19S,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,10000000,-69,0.9996
+29190,SAD69 / UTM zone 20S,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,10000000,-63,0.9996
+29191,SAD69 / UTM zone 21S,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,10000000,-57,0.9996
+29192,SAD69 / UTM zone 22S,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,10000000,-51,0.9996,,,,,,,
+29193,SAD69 / UTM zone 23S,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,10000000,-45,0.9996,,,,,,,
+29194,SAD69 / UTM zone 24S,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,10000000,-39,0.9996,,,,,,,
+29195,SAD69 / UTM zone 25S,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,10000000,-33,0.9996,0,0,0,0,0,0,
+29220,Sapper Hill 1943 / UTM zone 20S,Transverse Mercator,metre,4292,Sapper Hill 1943,International 1924,500000,0,10000000,-63,0.9996,0,0,0,0,0,0,
+29221,Sapper Hill 1943 / UTM zone 21S,Transverse Mercator,metre,4292,Sapper Hill 1943,International 1924,500000,0,10000000,-57,0.9996,0,0,0,0,0,0,
+29333,Schwarzeck / UTM zone 33S,Transverse Mercator,metre,4293,Schwarzeck,Bessel Namibia (GLM),500000,0,10000000,15,0.9996,0,0,0,0,0,0,
+29371,Schwarzeck / Lo22/11,Transverse Mercator (South Orientated),German legal metre,4293,Schwarzeck,Bessel Namibia (GLM),0,-22,0,11,1,0,0,0,0,0,0,
+29373,Schwarzeck / Lo22/13,Transverse Mercator (South Orientated),German legal metre,4293,Schwarzeck,Bessel Namibia (GLM),0,-22,0,13,1,0,0,0,0,0,0,
+29375,Schwarzeck / Lo22/15,Transverse Mercator (South Orientated),German legal metre,4293,Schwarzeck,Bessel Namibia (GLM),0,-22,0,15,1,0,0,0,0,0,0,
+29377,Schwarzeck / Lo22/17,Transverse Mercator (South Orientated),German legal metre,4293,Schwarzeck,Bessel Namibia (GLM),0,-22,0,17,1,0,0,0,0,0,0,
+29379,Schwarzeck / Lo22/19,Transverse Mercator (South Orientated),German legal metre,4293,Schwarzeck,Bessel Namibia (GLM),0,-22,0,19,1,0,0,0,0,0,0,
+29381,Schwarzeck / Lo22/21,Transverse Mercator (South Orientated),German legal metre,4293,Schwarzeck,Bessel Namibia (GLM),0,-22,0,21,1,0,0,0,0,0,0,
+29383,Schwarzeck / Lo22/23,Transverse Mercator (South Orientated),German legal metre,4293,Schwarzeck,Bessel Namibia (GLM),0,-22,0,23,1,0,0,0,0,0,0,
+29385,Schwarzeck / Lo22/25,Transverse Mercator (South Orientated),German legal metre,4293,Schwarzeck,Bessel Namibia (GLM),0,-22,0,25,1,0,0,0,0,0,0,
+29701,Tananarive (Paris) / Laborde Grid,Laborde Madagascar,metre,4810,Tananarive 1925 (Paris),International 1924,400000,0,800000,0,0,21,-21,0,0,0.9995,0,49
+29702,Tananarive (Paris) / Laborde Grid approximation,Oblique Mercator,metre,4810,Tananarive 1925 (Paris),International 1924,0,0,0,0,0,21,-21,800000,21,0.9995,400000,49
+29738,Tananarive / UTM zone 38S,Transverse Mercator,metre,4297,Tananarive 1925,International 1924,500000,0,10000000,45,0.9996,0,0,0,0,0,0,
+29739,Tananarive / UTM zone 39S,Transverse Mercator,metre,4297,Tananarive 1925,International 1924,500000,0,10000000,51,0.9996,0,0,0,0,0,0,
+29849,Timbalai 1948 / UTM zone 49N,Transverse Mercator,metre,4298,Timbalai 1948,Everest 1830 (1967 Definition),500000,0,0,111,0.9996,0,0,0,0,0,0,
+29850,Timbalai 1948 / UTM zone 50N,Transverse Mercator,metre,4298,Timbalai 1948,Everest 1830 (1967 Definition),500000,0,0,117,0.9996,0,0,0,0,0,0,
+29871,Timbalai 1948 / RSO Borneo (ch),Oblique Mercator,British chain (Sears 1922),4298,Timbalai 1948,Everest 1830 (1967 Definition),0,0,0,0,0,53.18569537,4,22014.3572,53.07483685,0.99984,29352.4763,115
+29872,Timbalai 1948 / RSO Borneo (ft),Oblique Mercator,British foot (Sears 1922),4298,Timbalai 1948,Everest 1830 (1967 Definition),0,0,0,0,0,53.18569537,4,1452947.58,53.07483685,0.99984,1937263.44,115
+29873,Timbalai 1948 / RSO Borneo (m),Oblique Mercator,metre,4298,Timbalai 1948,Everest 1830 (1967 Definition),0,0,0,0,0,53.18569537,4,442857.65,53.07483685,0.99984,590476.87,115
+29901,OSNI 1952 / Irish National Grid,Transverse Mercator,metre,4188,OSNI 1952,Airy 1830,200000,53.3,250000,-8,1,0,0,0,0,0,0,
+29902,TM65 / Irish Grid,Transverse Mercator,metre,4299,TM65,Airy Modified 1849,200000,53.3,250000,-8,1.000035,0,0,0,0,0,0,
+29903,TM75 / Irish Grid,Transverse Mercator,metre,4300,Geodetic Datum of 1965,Airy Modified 1849,200000,53.3,250000,-8,1.000035,0,0,0,0,0,0,
+30161,Tokyo / Japan Plane Rectangular CS I,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,33,0,129.3,0.9999,0,0,0,0,0,0,
+30162,Tokyo / Japan Plane Rectangular CS II,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,33,0,131,0.9999,0,0,0,0,0,0,
+30163,Tokyo / Japan Plane Rectangular CS III,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,36,0,132.1,0.9999,0,0,0,0,0,0,
+30164,Tokyo / Japan Plane Rectangular CS IV,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,33,0,133.3,0.9999,0,0,0,0,0,0,
+30165,Tokyo / Japan Plane Rectangular CS V,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,36,0,134.2,0.9999,0,0,0,0,0,0,
+30166,Tokyo / Japan Plane Rectangular CS VI,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,36,0,136,0.9999,0,0,0,0,0,0
+30167,Tokyo / Japan Plane Rectangular CS VII,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,36,0,137.1,0.9999,0,0,0,0,0,0
+30168,Tokyo / Japan Plane Rectangular CS VIII,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,36,0,138.3,0.9999,0,0,0,0,0,0
+30169,Tokyo / Japan Plane Rectangular CS IX,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,36,0,139.5,0.9999,,,,,,
+30170,Tokyo / Japan Plane Rectangular CS X,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,40,0,140.5,0.9999,,,,,,
+30171,Tokyo / Japan Plane Rectangular CS XI,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,44,0,140.15,0.9999,,,,,,
+30172,Tokyo / Japan Plane Rectangular CS XII,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,44,0,142.15,0.9999,,,,,,
+30173,Tokyo / Japan Plane Rectangular CS XIII,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,44,0,144.15,0.9999,,,,,,
+30174,Tokyo / Japan Plane Rectangular CS XIV,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,26,0,142,0.9999,,,,,,
+30175,Tokyo / Japan Plane Rectangular CS XV,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,26,0,127.3,0.9999,,,,,,
+30176,Tokyo / Japan Plane Rectangular CS XVI,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,26,0,124,0.9999,,,,,,
+30177,Tokyo / Japan Plane Rectangular CS XVII,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,26,0,131,0.9999,,,,,,
+30178,Tokyo / Japan Plane Rectangular CS XVIII,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,20,0,136,0.9999,,,,,,
+30179,Tokyo / Japan Plane Rectangular CS XIX,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,26,0,154,0.9999,,,,,,
+30200,Trinidad 1903 / Trinidad Grid,Cassini-Soldner,Clarke's link,4302,Trinidad 1903,Clarke 1858,430000,10.263,325000,-61.2,,,,,,,
+30339,TC(1948) / UTM zone 39N,Transverse Mercator,metre,4303,Trucial Coast 1948,Helmert 1906,500000,0,0,51,0.9996,,,,,,
+30340,TC(1948) / UTM zone 40N,Transverse Mercator,metre,4303,Trucial Coast 1948,Helmert 1906,500000,0,0,57,0.9996
+30491,Voirol 1875 / Nord Algerie (ancienne),Lambert Conic Conformal (1SP),metre,4304,Voirol 1875,Clarke 1880 (IGN),500000,40,300000,3,0.999625544
+30492,Voirol 1875 / Sud Algerie (ancienne),Lambert Conic Conformal (1SP),metre,4304,Voirol 1875,Clarke 1880 (IGN),500000,37,300000,3,0.999625769
+30493,Voirol 1879 / Nord Algerie (ancienne),Lambert Conic Conformal (1SP),metre,4671,Voirol 1879,Clarke 1880 (IGN),500000,40,300000,3,0.999625544
+30494,Voirol 1879 / Sud Algerie (ancienne),Lambert Conic Conformal (1SP),metre,4671,Voirol 1879,Clarke 1880 (IGN),500000,37,300000,3,0.999625769
+30729,Nord Sahara 1959 / UTM zone 29N,Transverse Mercator,metre,4307,Nord Sahara 1959,Clarke 1880 (RGS),500000,0,0,-9,0.9996
+30730,Nord Sahara 1959 / UTM zone 30N,Transverse Mercator,metre,4307,Nord Sahara 1959,Clarke 1880 (RGS),500000,0,0,-3,0.9996
+30731,Nord Sahara 1959 / UTM zone 31N,Transverse Mercator,metre,4307,Nord Sahara 1959,Clarke 1880 (RGS),500000,0,0,3,0.9996
+30732,Nord Sahara 1959 / UTM zone 32N,Transverse Mercator,metre,4307,Nord Sahara 1959,Clarke 1880 (RGS),500000,0,0,9,0.9996
+30791,Nord Sahara 1959 / Voirol Unifie Nord,Lambert Conic Conformal (1SP),metre,4307,Nord Sahara 1959,Clarke 1880 (RGS),500135,40,300090,3,0.999625544
+30792,Nord Sahara 1959 / Voirol Unifie Sud,Lambert Conic Conformal (1SP),metre,4307,Nord Sahara 1959,Clarke 1880 (RGS),500135,37,300090,3,0.999625769
+31028,Yoff / UTM zone 28N,Transverse Mercator,metre,4310,Yoff,Clarke 1880 (IGN),500000,0,0,-15,0.9996
+31121,Zanderij / UTM zone 21N,Transverse Mercator,metre,4311,Zanderij,International 1924,500000,0,0,-57,0.9996
+31154,Zanderij / TM 54 NW,Transverse Mercator,metre,4311,Zanderij,International 1924,500000,0,0,-54,0.9996
+31170,Zanderij / Suriname Old TM,Transverse Mercator,metre,4311,Zanderij,International 1924,500000,0,0,-55.41,0.9996
+31171,Zanderij / Suriname TM,Transverse Mercator,metre,4311,Zanderij,International 1924,500000,0,0,-55.41,0.9999
+31251,MGI (Ferro) / Austria GK West Zone,Transverse Mercator,metre,4805,Militar-Geographische Institut (Ferro),Bessel 1841,0,0,-5000000,28,1,,,,,,,,,,,,,,,,
+31252,MGI (Ferro) / Austria GK Central Zone,Transverse Mercator,metre,4805,Militar-Geographische Institut (Ferro),Bessel 1841,0,0,-5000000,31,1,,,,,,,,,,,,,,,,
+31253,MGI (Ferro) / Austria GK East Zone,Transverse Mercator,metre,4805,Militar-Geographische Institut (Ferro),Bessel 1841,0,0,-5000000,34,1,,,,,,,,,,,,,,,,
+31254,MGI / Austria GK West,Transverse Mercator,metre,4312,Militar-Geographische Institut,Bessel 1841,0,0,-5000000,10.2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31255,MGI / Austria GK Central,Transverse Mercator,metre,4312,Militar-Geographische Institut,Bessel 1841,0,0,-5000000,13.2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31256,MGI / Austria GK East,Transverse Mercator,metre,4312,Militar-Geographische Institut,Bessel 1841,0,0,-5000000,16.2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31257,MGI / Austria GK M28,Transverse Mercator,metre,4312,Militar-Geographische Institut,Bessel 1841,150000,0,-5000000,10.2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31258,MGI / Austria GK M31,Transverse Mercator,metre,4312,Militar-Geographische Institut,Bessel 1841,450000,0,-5000000,13.2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31259,MGI / Austria GK M34,Transverse Mercator,metre,4312,Militar-Geographische Institut,Bessel 1841,750000,0,-5000000,16.2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31281,MGI (Ferro) / Austria West Zone,Transverse Mercator,metre,4805,Militar-Geographische Institut (Ferro),Bessel 1841,0,0,0,28,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31282,MGI (Ferro) / Austria Central Zone,Transverse Mercator,metre,4805,Militar-Geographische Institut (Ferro),Bessel 1841,0,0,0,31,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31283,MGI (Ferro) / Austria East Zone,Transverse Mercator,metre,4805,Militar-Geographische Institut (Ferro),Bessel 1841,0,0,0,34,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31284,MGI / Austria M28,Transverse Mercator,metre,4312,Militar-Geographische Institut,Bessel 1841,150000,0,0,10.2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31285,MGI / Austria M31,Transverse Mercator,metre,4312,Militar-Geographische Institut,Bessel 1841,450000,0,0,13.2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31286,MGI / Austria M34,Transverse Mercator,metre,4312,Militar-Geographische Institut,Bessel 1841,750000,0,0,16.2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31287,MGI / Austria Lambert,Lambert Conic Conformal (2SP),metre,4312,Militar-Geographische Institut,Bessel 1841,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,47.3,13.2,49,400000,400000
+31288,MGI (Ferro) / M28,Transverse Mercator,metre,4805,Militar-Geographische Institut (Ferro),Bessel 1841,150000,0,0,28,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31289,MGI (Ferro) / M31,Transverse Mercator,metre,4805,Militar-Geographische Institut (Ferro),Bessel 1841,450000,0,0,31,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31290,MGI (Ferro) / M34,Transverse Mercator,metre,4805,Militar-Geographische Institut (Ferro),Bessel 1841,750000,0,0,34,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31300,Belge 1972 / Belge Lambert 72,Lambert Conic Conformal (2SP Belgium),metre,4313,Reseau National Belge 1972,International 1924,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51.1,90,4.2124983,49.5,5400088.438,150000.0126
+31370,Belge 1972 / Belgian Lambert 72,Lambert Conic Conformal (2SP),metre,4313,Reseau National Belge 1972,International 1924,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49.5000002,90,4.2202952,51.1000002,5400088.438,150000.013
+31466,DHDN / 3-degree Gauss-Kruger zone 2,Transverse Mercator,metre,4314,Deutsches Hauptdreiecksnetz,Bessel 1841,2500000,0,0,6,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31467,DHDN / 3-degree Gauss-Kruger zone 3,Transverse Mercator,metre,4314,Deutsches Hauptdreiecksnetz,Bessel 1841,3500000,0,0,9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31468,DHDN / 3-degree Gauss-Kruger zone 4,Transverse Mercator,metre,4314,Deutsches Hauptdreiecksnetz,Bessel 1841,4500000,0,0,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31469,DHDN / 3-degree Gauss-Kruger zone 5,Transverse Mercator,metre,4314,Deutsches Hauptdreiecksnetz,Bessel 1841,5500000,0,0,15,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31528,Conakry 1905 / UTM zone 28N,Transverse Mercator,metre,4315,Conakry 1905,Clarke 1880 (IGN),500000,0,0,-15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31529,Conakry 1905 / UTM zone 29N,Transverse Mercator,metre,4315,Conakry 1905,Clarke 1880 (IGN),500000,0,0,-9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31600,Dealul Piscului 1930 / Stereo 33,Oblique Stereographic,metre,4316,Dealul Piscului 1930,International 1924,500000,45.54,500000,25.23328772,0.9996667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31838,NGN / UTM zone 38N,Transverse Mercator,metre,4318,National Geodetic Network,WGS 84,500000,0,0,45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31839,NGN / UTM zone 39N,Transverse Mercator,metre,4318,National Geodetic Network,WGS 84,500000,0,0,51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31901,KUDAMS / KTM,Transverse Mercator,metre,4319,Kuwait Utility,GRS 1980,500000,0,0,48,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31965,SIRGAS 2000 / UTM zone 11N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-117,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+31966,SIRGAS 2000 / UTM zone 12N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-111,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+31967,SIRGAS 2000 / UTM zone 13N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-105,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+31968,SIRGAS 2000 / UTM zone 14N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-99,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+31969,SIRGAS 2000 / UTM zone 15N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-93,0.9996,,,,,,,,,,,,,,,
+31970,SIRGAS 2000 / UTM zone 16N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-87,0.9996,,,,,,,,,,,,,,,
+31971,SIRGAS 2000 / UTM zone 17N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-81,0.9996,,,,,,,,,,,,,,,
+31972,SIRGAS 2000 / UTM zone 18N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-75,0.9996,,,,,,,,,,,,,,,
+31973,SIRGAS 2000 / UTM zone 19N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-69,0.9996,,,,,,,,,,,,,,,
+31974,SIRGAS 2000 / UTM zone 20N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-63,0.9996,,,,,,,,,,,,,,,
+31975,SIRGAS 2000 / UTM zone 21N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-57,0.9996,,,,,,,,,,,,,,,
+31976,SIRGAS 2000 / UTM zone 22N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-51,0.9996,,,,,,,,,,,,,,,
+31977,SIRGAS 2000 / UTM zone 17S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,10000000,-81,0.9996,,,,,,,,,,,,,,,
+31978,SIRGAS 2000 / UTM zone 18S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,10000000,-75,0.9996,,,,,,,,,,,,,,,
+31979,SIRGAS 2000 / UTM zone 19S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,10000000,-69,0.9996,,,,,,,,,,,,,,,
+31980,SIRGAS 2000 / UTM zone 20S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,10000000,-63,0.9996,,,,,,,,,,,,,,,
+31981,SIRGAS 2000 / UTM zone 21S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,10000000,-57,0.9996,,,,,,,,,,,,,,,
+31982,SIRGAS 2000 / UTM zone 22S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,10000000,-51,0.9996
+31983,SIRGAS 2000 / UTM zone 23S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,10000000,-45,0.9996
+31984,SIRGAS 2000 / UTM zone 24S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,10000000,-39,0.9996
+31985,SIRGAS 2000 / UTM zone 25S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,10000000,-33,0.9996
+31986,SIRGAS 1995 / UTM zone 17N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,0,-81,0.9996
+31987,SIRGAS 1995 / UTM zone 18N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,0,-75,0.9996
+31988,SIRGAS 1995 / UTM zone 19N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,0,-69,0.9996
+31989,SIRGAS 1995 / UTM zone 20N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,0,-63,0.9996
+31990,SIRGAS 1995 / UTM zone 21N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,0,-57,0.9996
+31991,SIRGAS 1995 / UTM zone 22N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,0,-51,0.9996
+31992,SIRGAS 1995 / UTM zone 17S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,10000000,-81,0.9996
+31993,SIRGAS 1995 / UTM zone 18S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,10000000,-75,0.9996
+31994,SIRGAS 1995 / UTM zone 19S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,10000000,-69,0.9996
+31995,SIRGAS 1995 / UTM zone 20S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,10000000,-63,0.9996
+31996,SIRGAS 1995 / UTM zone 21S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,10000000,-57,0.9996
+31997,SIRGAS 1995 / UTM zone 22S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,10000000,-51,0.9996
+31998,SIRGAS 1995 / UTM zone 23S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,10000000,-45,0.9996,,,,,,,,,,,,,,,,
+31999,SIRGAS 1995 / UTM zone 24S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,10000000,-39,0.9996,,,,,,,,,,,,,,,,
+32000,SIRGAS 1995 / UTM zone 25S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,10000000,-33,0.9996,,,,,,,,,,,,,,,,
+32001,NAD27 / Montana North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.51,47,-109.3,48.43,0,2000000
+32002,NAD27 / Montana Central,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46.27,45.5,-109.3,47.53,0,2000000
+32003,NAD27 / Montana South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.52,44,-109.3,46.24,0,2000000
+32005,NAD27 / Nebraska North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.49,41.2,-100,41.51,0,2000000
+32006,NAD27 / Nebraska South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.43,39.4,-99.3,40.17,0,2000000
+32007,NAD27 / Nevada East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,34.45,0,-115.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32008,NAD27 / Nevada Central,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,34.45,0,-116.4,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32009,NAD27 / Nevada West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,34.45,0,-118.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32010,NAD27 / New Hampshire,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,42.3,0,-71.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32011,NAD27 / New Jersey,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,2000000,38.5,0,-74.4,0.999975,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32012,NAD27 / New Mexico East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,31,0,-104.2,0.999909091,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32013,NAD27 / New Mexico Central,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,31,0,-106.15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32014,NAD27 / New Mexico West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,31,0,-107.5,0.999916667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32015,NAD27 / New York East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,40,0,-74.2,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32016,NAD27 / New York Central,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,40,0,-76.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32017,NAD27 / New York West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,40,0,-78.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32019,NAD27 / North Carolina,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.1,33.45,-79,34.2,0,2000000
+32020,NAD27 / North Dakota North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48.44,47,-100.3,47.26,0,2000000
+32021,NAD27 / North Dakota South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.29,45.4,-100.3,46.11,0,2000000
+32022,NAD27 / Ohio North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.42,39.4,-82.3,40.26,0,2000000
+32023,NAD27 / Ohio South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.02,38,-82.3,38.44,0,2000000
+32024,NAD27 / Oklahoma North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.46,35,-98,35.34,0,2000000
+32025,NAD27 / Oklahoma South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.14,33.2,-98,33.56,0,2000000
+32026,NAD27 / Oregon North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,43.4,-120.3,44.2,0,2000000
+32027,NAD27 / Oregon South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,41.4,-120.3,42.2,0,2000000
+32028,NAD27 / Pennsylvania North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.57,40.1,-77.45,40.53,0,2000000
+32030,NAD27 / Rhode Island,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,41.05,0,-71.3,0.9999938,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32031,NAD27 / South Carolina North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.58,33,-81,33.46,0,2000000
+32033,NAD27 / South Carolina South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.4,31.5,-81,32.2,0,2000000
+32034,NAD27 / South Dakota North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.41,43.5,-100,44.25,0,2000000
+32035,NAD27 / South Dakota South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.24,42.2,-100.2,42.5,0,2000000
+32037,NAD27 / Texas North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.11,34,-101.3,34.39,0,2000000
+32038,NAD27 / Texas North Central,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.58,31.4,-97.3,32.08,0,2000000
+32039,NAD27 / Texas Central,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.53,29.4,-100.2,30.07,0,2000000
+32040,NAD27 / Texas South Central,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30.17,27.5,-99,28.23,0,2000000
+32041,NAD27 / Texas South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27.5,25.4,-98.3,26.1,0,2000000
+32042,NAD27 / Utah North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.47,40.2,-111.3,40.43,0,2000000
+32043,NAD27 / Utah Central,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.39,38.2,-111.3,39.01,0,2000000
+32044,NAD27 / Utah South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.21,36.4,-111.3,37.13,0,2000000
+32045,NAD27 / Vermont,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,42.3,0,-72.3,0.999964286,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32046,NAD27 / Virginia North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.12,37.4,-78.3,38.02,0,2000000
+32047,NAD27 / Virginia South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.58,36.2,-78.3,36.46,0,2000000
+32048,NAD27 / Washington North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48.44,47,-120.5,47.3,0,2000000
+32049,NAD27 / Washington South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.2,45.2,-120.3,45.5,0,2000000
+32050,NAD27 / West Virginia North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.15,38.3,-79.3,39,0,2000000
+32051,NAD27 / West Virginia South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.53,37,-81,37.29,0,2000000
+32052,NAD27 / Wisconsin North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46.46,45.1,-90,45.34,0,2000000
+32053,NAD27 / Wisconsin Central,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.3,43.5,-90,44.15,0,2000000
+32054,NAD27 / Wisconsin South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.04,42,-90,42.44,0,2000000
+32055,NAD27 / Wyoming East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,40.4,0,-105.1,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32056,NAD27 / Wyoming East Central,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,40.4,0,-107.2,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32057,NAD27 / Wyoming West Central,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,40.4,0,-108.45,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32058,NAD27 / Wyoming West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,40.4,0,-110.05,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32061,NAD27 / Guatemala Norte,Lambert Conic Conformal (1SP),metre,4267,North American Datum 1927,Clarke 1866,500000,16.49,292209.579,-90.2,0.99992226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32062,NAD27 / Guatemala Sur,Lambert Conic Conformal (1SP),metre,4267,North American Datum 1927,Clarke 1866,500000,14.54,325992.681,-90.2,0.99989906,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32064,NAD27 / BLM 14N (ftUS),Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,1640416.67,0,0,-99,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32065,NAD27 / BLM 15N (ftUS),Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,1640416.67,0,0,-93,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32066,NAD27 / BLM 16N (ftUS),Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,1640416.67,0,0,-87,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32067,NAD27 / BLM 17N (ftUS),Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,1640416.67,0,0,-81,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32081,NAD27 / MTM zone 1,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,304800,0,0,-53,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32082,NAD27 / MTM zone 2,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,304800,0,0,-56,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32083,NAD27 / MTM zone 3,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,304800,0,0,-58.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32084,NAD27 / MTM zone 4,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,304800,0,0,-61.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32085,NAD27 / MTM zone 5,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,304800,0,0,-64.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32086,NAD27 / MTM zone 6,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,304800,0,0,-67.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32098,NAD27 / Quebec Lambert,Lambert Conic Conformal (2SP),metre,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,44,-68.3,60,0,0
+32099,NAD27 / Louisiana Offshore,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26.1,25.4,-91.2,27.5,0,2000000
+32100,NAD83 / Montana,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,44.15,-109.3,49,0,600000
+32104,NAD83 / Nebraska,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.5,-100,43,0,500000
+32107,NAD83 / Nevada East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,200000,34.45,8000000,-115.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32108,NAD83 / Nevada Central,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,34.45,6000000,-116.4,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32109,NAD83 / Nevada West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,800000,34.45,4000000,-118.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32110,NAD83 / New Hampshire,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,300000,42.3,0,-71.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32111,NAD83 / New Jersey,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,150000,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32112,NAD83 / New Mexico East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,165000,31,0,-104.2,0.999909091,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32113,NAD83 / New Mexico Central,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,31,0,-106.15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32114,NAD83 / New Mexico West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,830000,31,0,-107.5,0.999916667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32115,NAD83 / New York East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,150000,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32116,NAD83 / New York Central,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,250000,40,0,-76.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32117,NAD83 / New York West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,350000,40,0,-78.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32118,NAD83 / New York Long Island,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.4,40.1,-74,41.02,0,300000
+32119,NAD83 / North Carolina,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.2,33.45,-79,36.1,0,609601.22
+32120,NAD83 / North Dakota North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.26,47,-100.3,48.44,0,600000
+32121,NAD83 / North Dakota South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46.11,45.4,-100.3,47.29,0,600000
+32122,NAD83 / Ohio North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.26,39.4,-82.3,41.42,0,600000
+32123,NAD83 / Ohio South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.44,38,-82.3,40.02,0,600000
+32124,NAD83 / Oklahoma North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.34,35,-98,36.46,0,600000
+32125,NAD83 / Oklahoma South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.56,33.2,-98,35.14,0,600000
+32126,NAD83 / Oregon North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.2,43.4,-120.3,46,0,2500000
+32127,NAD83 / Oregon South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.2,41.4,-120.3,44,0,1500000
+32128,NAD83 / Pennsylvania North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.53,40.1,-77.45,41.57,0,600000
+32129,NAD83 / Pennsylvania South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.56,39.2,-77.45,40.58,0,600000
+32130,NAD83 / Rhode Island,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,100000,41.05,0,-71.3,0.99999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32133,NAD83 / South Carolina,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.3,31.5,-81,34.5,0,609600
+32134,NAD83 / South Dakota North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.25,43.5,-100,45.41,0,600000
+32135,NAD83 / South Dakota South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.5,42.2,-100.2,44.24,0,600000
+32136,NAD83 / Tennessee,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.15,34.2,-86,36.25,0,600000
+32137,NAD83 / Texas North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.39,34,-101.3,36.11,1000000,200000
+32138,NAD83 / Texas North Central,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.08,31.4,-98.3,33.58,2000000,600000
+32139,NAD83 / Texas Central,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30.07,29.4,-100.2,31.53,3000000,700000
+32140,NAD83 / Texas South Central,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28.23,27.5,-99,30.17,4000000,600000
+32141,NAD83 / Texas South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26.1,25.4,-98.3,27.5,5000000,300000
+32142,NAD83 / Utah North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.43,40.2,-111.3,41.47,1000000,500000
+32143,NAD83 / Utah Central,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.01,38.2,-111.3,40.39,2000000,500000
+32144,NAD83 / Utah South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.13,36.4,-111.3,38.21,3000000,500000
+32145,NAD83 / Vermont,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,42.3,0,-72.3,0.999964286,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32146,NAD83 / Virginia North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.02,37.4,-78.3,39.12,2000000,3500000
+32147,NAD83 / Virginia South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.46,36.2,-78.3,37.58,1000000,3500000
+32148,NAD83 / Washington North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.3,47,-120.5,48.44,0,500000
+32149,NAD83 / Washington South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.5,45.2,-120.3,47.2,0,500000
+32150,NAD83 / West Virginia North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39,38.3,-79.3,40.15,0,600000
+32151,NAD83 / West Virginia South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.29,37,-81,38.53,0,600000
+32152,NAD83 / Wisconsin North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.34,45.1,-90,46.46,0,600000
+32153,NAD83 / Wisconsin Central,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.15,43.5,-90,45.3,0,600000
+32154,NAD83 / Wisconsin South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.44,42,-90,44.04,0,600000
+32155,NAD83 / Wyoming East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,200000,40.3,0,-105.1,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32156,NAD83 / Wyoming East Central,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,400000,40.3,100000,-107.2,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32157,NAD83 / Wyoming West Central,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,600000,40.3,0,-108.45,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32158,NAD83 / Wyoming West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,800000,40.3,100000,-110.05,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32161,NAD83 / Puerto Rico & Virgin Is.,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18.02,17.5,-66.26,18.26,200000,200000
+32164,NAD83 / BLM 14N (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1640416.67,0,0,-99,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32165,NAD83 / BLM 15N (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1640416.67,0,0,-93,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32166,NAD83 / BLM 16N (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1640416.67,0,0,-87,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32167,NAD83 / BLM 17N (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1640416.67,0,0,-81,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32180,NAD83 / SCoPQ zone 2,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-55.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32181,NAD83 / MTM zone 1,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-53,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32182,NAD83 / MTM zone 2,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-56,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32183,NAD83 / MTM zone 3,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-58.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32184,NAD83 / MTM zone 4,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-61.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32185,NAD83 / MTM zone 5,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-64.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32186,NAD83 / MTM zone 6,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-67.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32187,NAD83 / MTM zone 7,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-70.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32188,NAD83 / MTM zone 8,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-73.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32189,NAD83 / MTM zone 9,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-76.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32190,NAD83 / MTM zone 10,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-79.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32191,NAD83 / MTM zone 11,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-82.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32192,NAD83 / MTM zone 12,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-81,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32193,NAD83 / MTM zone 13,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-84,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32194,NAD83 / MTM zone 14,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-87,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32195,NAD83 / MTM zone 15,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-90,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32196,NAD83 / MTM zone 16,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-93,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32197,NAD83 / MTM zone 17,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-96,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32198,NAD83 / Quebec Lambert,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,44,-68.3,60,0,0
+32199,NAD83 / Louisiana Offshore,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26.1,25.3,-91.2,27.5,0,1000000
+32201,WGS 72 / UTM zone 1N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-177,0.9996,,,,,,,,,,,,,,,,
+32202,WGS 72 / UTM zone 2N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-171,0.9996,,,,,,,,,,,,,,,,
+32203,WGS 72 / UTM zone 3N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-165,0.9996,,,,,,,,,,,,,,,,
+32204,WGS 72 / UTM zone 4N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-159,0.9996,,,,,,,,,,,,,,,,
+32205,WGS 72 / UTM zone 5N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-153,0.9996,,,,,,,,,,,,,,,,
+32206,WGS 72 / UTM zone 6N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-147,0.9996,,,,,,,,,,,,,,,,
+32207,WGS 72 / UTM zone 7N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-141,0.9996,,,,,,,,,,,,,,,,
+32208,WGS 72 / UTM zone 8N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-135,0.9996,,,,,,,,,,,,,,,,
+32209,WGS 72 / UTM zone 9N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-129,0.9996,,,,,,,,,,,,,,,,
+32210,WGS 72 / UTM zone 10N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-123,0.9996,,,,,,,,,,,,,,,,
+32211,WGS 72 / UTM zone 11N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-117,0.9996,,,,,,,,,,,,,,,,
+32212,WGS 72 / UTM zone 12N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-111,0.9996,,,,,,,,,,,,,,,,
+32213,WGS 72 / UTM zone 13N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-105,0.9996,,,,,,,,,,,,,,,,
+32214,WGS 72 / UTM zone 14N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-99,0.9996
+32215,WGS 72 / UTM zone 15N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-93,0.9996
+32216,WGS 72 / UTM zone 16N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-87,0.9996
+32217,WGS 72 / UTM zone 17N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-81,0.9996
+32218,WGS 72 / UTM zone 18N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-75,0.9996
+32219,WGS 72 / UTM zone 19N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-69,0.9996
+32220,WGS 72 / UTM zone 20N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-63,0.9996
+32221,WGS 72 / UTM zone 21N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-57,0.9996
+32222,WGS 72 / UTM zone 22N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-51,0.9996
+32223,WGS 72 / UTM zone 23N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-45,0.9996
+32224,WGS 72 / UTM zone 24N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-39,0.9996
+32225,WGS 72 / UTM zone 25N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-33,0.9996
+32226,WGS 72 / UTM zone 26N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-27,0.9996
+32227,WGS 72 / UTM zone 27N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-21,0.9996
+32228,WGS 72 / UTM zone 28N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-15,0.9996
+32229,WGS 72 / UTM zone 29N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-9,0.9996
+32230,WGS 72 / UTM zone 30N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-3,0.9996
+32231,WGS 72 / UTM zone 31N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,3,0.9996
+32232,WGS 72 / UTM zone 32N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,9,0.9996
+32233,WGS 72 / UTM zone 33N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,15,0.9996
+32234,WGS 72 / UTM zone 34N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,21,0.9996
+32235,WGS 72 / UTM zone 35N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,27,0.9996
+32236,WGS 72 / UTM zone 36N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,33,0.9996
+32237,WGS 72 / UTM zone 37N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,39,0.9996
+32238,WGS 72 / UTM zone 38N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,45,0.9996
+32239,WGS 72 / UTM zone 39N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,51,0.9996
+32240,WGS 72 / UTM zone 40N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,57,0.9996
+32241,WGS 72 / UTM zone 41N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,63,0.9996
+32242,WGS 72 / UTM zone 42N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,69,0.9996
+32243,WGS 72 / UTM zone 43N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,75,0.9996
+32244,WGS 72 / UTM zone 44N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,81,0.9996
+32245,WGS 72 / UTM zone 45N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,87,0.9996
+32246,WGS 72 / UTM zone 46N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,93,0.9996
+32247,WGS 72 / UTM zone 47N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,99,0.9996
+32248,WGS 72 / UTM zone 48N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,105,0.9996
+32249,WGS 72 / UTM zone 49N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,111,0.9996
+32250,WGS 72 / UTM zone 50N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,117,0.9996
+32251,WGS 72 / UTM zone 51N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,123,0.9996
+32252,WGS 72 / UTM zone 52N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,129,0.9996
+32253,WGS 72 / UTM zone 53N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,135,0.9996
+32254,WGS 72 / UTM zone 54N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,141,0.9996
+32255,WGS 72 / UTM zone 55N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,147,0.9996
+32256,WGS 72 / UTM zone 56N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,153,0.9996
+32257,WGS 72 / UTM zone 57N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,159,0.9996
+32258,WGS 72 / UTM zone 58N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,165,0.9996
+32259,WGS 72 / UTM zone 59N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,171,0.9996
+32260,WGS 72 / UTM zone 60N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,177,0.9996
+32301,WGS 72 / UTM zone 1S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-177,0.9996
+32302,WGS 72 / UTM zone 2S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-171,0.9996
+32303,WGS 72 / UTM zone 3S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-165,0.9996
+32304,WGS 72 / UTM zone 4S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-159,0.9996
+32305,WGS 72 / UTM zone 5S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-153,0.9996
+32306,WGS 72 / UTM zone 6S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-147,0.9996
+32307,WGS 72 / UTM zone 7S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-141,0.9996
+32308,WGS 72 / UTM zone 8S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-135,0.9996
+32309,WGS 72 / UTM zone 9S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-129,0.9996
+32310,WGS 72 / UTM zone 10S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-123,0.9996
+32311,WGS 72 / UTM zone 11S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-117,0.9996
+32312,WGS 72 / UTM zone 12S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-111,0.9996
+32313,WGS 72 / UTM zone 13S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-105,0.9996
+32314,WGS 72 / UTM zone 14S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-99,0.9996
+32315,WGS 72 / UTM zone 15S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-93,0.9996
+32316,WGS 72 / UTM zone 16S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-87,0.9996
+32317,WGS 72 / UTM zone 17S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-81,0.9996
+32318,WGS 72 / UTM zone 18S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-75,0.9996
+32319,WGS 72 / UTM zone 19S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-69,0.9996
+32320,WGS 72 / UTM zone 20S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-63,0.9996
+32321,WGS 72 / UTM zone 21S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-57,0.9996
+32322,WGS 72 / UTM zone 22S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-51,0.9996
+32323,WGS 72 / UTM zone 23S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-45,0.9996
+32324,WGS 72 / UTM zone 24S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-39,0.9996
+32325,WGS 72 / UTM zone 25S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-33,0.9996
+32326,WGS 72 / UTM zone 26S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-27,0.9996
+32327,WGS 72 / UTM zone 27S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-21,0.9996
+32328,WGS 72 / UTM zone 28S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-15,0.9996
+32329,WGS 72 / UTM zone 29S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-9,0.9996
+32330,WGS 72 / UTM zone 30S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-3,0.9996
+32331,WGS 72 / UTM zone 31S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,3,0.9996
+32332,WGS 72 / UTM zone 32S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,9,0.9996
+32333,WGS 72 / UTM zone 33S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,15,0.9996
+32334,WGS 72 / UTM zone 34S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,21,0.9996
+32335,WGS 72 / UTM zone 35S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,27,0.9996
+32336,WGS 72 / UTM zone 36S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,33,0.9996
+32337,WGS 72 / UTM zone 37S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,39,0.9996
+32338,WGS 72 / UTM zone 38S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,45,0.9996
+32339,WGS 72 / UTM zone 39S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,51,0.9996
+32340,WGS 72 / UTM zone 40S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,57,0.9996
+32341,WGS 72 / UTM zone 41S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,63,0.9996
+32342,WGS 72 / UTM zone 42S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,69,0.9996
+32343,WGS 72 / UTM zone 43S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,75,0.9996
+32344,WGS 72 / UTM zone 44S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,81,0.9996
+32345,WGS 72 / UTM zone 45S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,87,0.9996
+32346,WGS 72 / UTM zone 46S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,93,0.9996
+32347,WGS 72 / UTM zone 47S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,99,0.9996
+32348,WGS 72 / UTM zone 48S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,105,0.9996
+32349,WGS 72 / UTM zone 49S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,111,0.9996
+32350,WGS 72 / UTM zone 50S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,117,0.9996
+32351,WGS 72 / UTM zone 51S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,123,0.9996
+32352,WGS 72 / UTM zone 52S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,129,0.9996
+32353,WGS 72 / UTM zone 53S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,135,0.9996
+32354,WGS 72 / UTM zone 54S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,141,0.9996
+32355,WGS 72 / UTM zone 55S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,147,0.9996
+32356,WGS 72 / UTM zone 56S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,153,0.9996
+32357,WGS 72 / UTM zone 57S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,159,0.9996
+32358,WGS 72 / UTM zone 58S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,165,0.9996
+32359,WGS 72 / UTM zone 59S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,171,0.9996
+32360,WGS 72 / UTM zone 60S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,177,0.9996
+32401,WGS 72BE / UTM zone 1N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-177,0.9996
+32402,WGS 72BE / UTM zone 2N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-171,0.9996
+32403,WGS 72BE / UTM zone 3N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-165,0.9996
+32404,WGS 72BE / UTM zone 4N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-159,0.9996
+32405,WGS 72BE / UTM zone 5N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-153,0.9996
+32406,WGS 72BE / UTM zone 6N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-147,0.9996
+32407,WGS 72BE / UTM zone 7N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-141,0.9996
+32408,WGS 72BE / UTM zone 8N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-135,0.9996
+32409,WGS 72BE / UTM zone 9N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-129,0.9996
+32410,WGS 72BE / UTM zone 10N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-123,0.9996
+32411,WGS 72BE / UTM zone 11N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-117,0.9996
+32412,WGS 72BE / UTM zone 12N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-111,0.9996
+32413,WGS 72BE / UTM zone 13N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-105,0.9996
+32414,WGS 72BE / UTM zone 14N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-99,0.9996
+32415,WGS 72BE / UTM zone 15N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-93,0.9996
+32416,WGS 72BE / UTM zone 16N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-87,0.9996
+32417,WGS 72BE / UTM zone 17N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-81,0.9996
+32418,WGS 72BE / UTM zone 18N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-75,0.9996
+32419,WGS 72BE / UTM zone 19N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-69,0.9996
+32420,WGS 72BE / UTM zone 20N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-63,0.9996
+32421,WGS 72BE / UTM zone 21N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-57,0.9996
+32422,WGS 72BE / UTM zone 22N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-51,0.9996
+32423,WGS 72BE / UTM zone 23N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-45,0.9996
+32424,WGS 72BE / UTM zone 24N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-39,0.9996
+32425,WGS 72BE / UTM zone 25N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-33,0.9996
+32426,WGS 72BE / UTM zone 26N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-27,0.9996
+32427,WGS 72BE / UTM zone 27N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-21,0.9996
+32428,WGS 72BE / UTM zone 28N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-15,0.9996
+32429,WGS 72BE / UTM zone 29N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-9,0.9996
+32430,WGS 72BE / UTM zone 30N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-3,0.9996
+32431,WGS 72BE / UTM zone 31N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,3,0.9996
+32432,WGS 72BE / UTM zone 32N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,9,0.9996
+32433,WGS 72BE / UTM zone 33N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,15,0.9996
+32434,WGS 72BE / UTM zone 34N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,21,0.9996
+32435,WGS 72BE / UTM zone 35N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,27,0.9996
+32436,WGS 72BE / UTM zone 36N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,33,0.9996
+32437,WGS 72BE / UTM zone 37N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,39,0.9996
+32438,WGS 72BE / UTM zone 38N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,45,0.9996
+32439,WGS 72BE / UTM zone 39N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,51,0.9996
+32440,WGS 72BE / UTM zone 40N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,57,0.9996
+32441,WGS 72BE / UTM zone 41N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,63,0.9996
+32442,WGS 72BE / UTM zone 42N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,69,0.9996
+32443,WGS 72BE / UTM zone 43N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,75,0.9996
+32444,WGS 72BE / UTM zone 44N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,81,0.9996
+32445,WGS 72BE / UTM zone 45N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,87,0.9996
+32446,WGS 72BE / UTM zone 46N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,93,0.9996
+32447,WGS 72BE / UTM zone 47N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,99,0.9996
+32448,WGS 72BE / UTM zone 48N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,105,0.9996
+32449,WGS 72BE / UTM zone 49N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,111,0.9996
+32450,WGS 72BE / UTM zone 50N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,117,0.9996
+32451,WGS 72BE / UTM zone 51N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,123,0.9996
+32452,WGS 72BE / UTM zone 52N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,129,0.9996
+32453,WGS 72BE / UTM zone 53N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,135,0.9996
+32454,WGS 72BE / UTM zone 54N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,141,0.9996
+32455,WGS 72BE / UTM zone 55N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,147,0.9996
+32456,WGS 72BE / UTM zone 56N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,153,0.9996
+32457,WGS 72BE / UTM zone 57N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,159,0.9996
+32458,WGS 72BE / UTM zone 58N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,165,0.9996
+32459,WGS 72BE / UTM zone 59N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,171,0.9996
+32460,WGS 72BE / UTM zone 60N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,177,0.9996
+32501,WGS 72BE / UTM zone 1S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-177,0.9996
+32502,WGS 72BE / UTM zone 2S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-171,0.9996
+32503,WGS 72BE / UTM zone 3S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-165,0.9996
+32504,WGS 72BE / UTM zone 4S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-159,0.9996
+32505,WGS 72BE / UTM zone 5S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-153,0.9996
+32506,WGS 72BE / UTM zone 6S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-147,0.9996
+32507,WGS 72BE / UTM zone 7S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-141,0.9996
+32508,WGS 72BE / UTM zone 8S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-135,0.9996
+32509,WGS 72BE / UTM zone 9S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-129,0.9996
+32510,WGS 72BE / UTM zone 10S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-123,0.9996
+32511,WGS 72BE / UTM zone 11S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-117,0.9996
+32512,WGS 72BE / UTM zone 12S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-111,0.9996
+32513,WGS 72BE / UTM zone 13S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-105,0.9996
+32514,WGS 72BE / UTM zone 14S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-99,0.9996
+32515,WGS 72BE / UTM zone 15S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-93,0.9996
+32516,WGS 72BE / UTM zone 16S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-87,0.9996
+32517,WGS 72BE / UTM zone 17S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-81,0.9996
+32518,WGS 72BE / UTM zone 18S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-75,0.9996
+32519,WGS 72BE / UTM zone 19S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-69,0.9996
+32520,WGS 72BE / UTM zone 20S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-63,0.9996
+32521,WGS 72BE / UTM zone 21S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-57,0.9996
+32522,WGS 72BE / UTM zone 22S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-51,0.9996
+32523,WGS 72BE / UTM zone 23S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-45,0.9996
+32524,WGS 72BE / UTM zone 24S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-39,0.9996
+32525,WGS 72BE / UTM zone 25S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-33,0.9996
+32526,WGS 72BE / UTM zone 26S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-27,0.9996
+32527,WGS 72BE / UTM zone 27S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-21,0.9996
+32528,WGS 72BE / UTM zone 28S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-15,0.9996
+32529,WGS 72BE / UTM zone 29S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-9,0.9996
+32530,WGS 72BE / UTM zone 30S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-3,0.9996
+32531,WGS 72BE / UTM zone 31S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,3,0.9996
+32532,WGS 72BE / UTM zone 32S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,9,0.9996
+32533,WGS 72BE / UTM zone 33S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,15,0.9996
+32534,WGS 72BE / UTM zone 34S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,21,0.9996
+32535,WGS 72BE / UTM zone 35S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,27,0.9996
+32536,WGS 72BE / UTM zone 36S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,33,0.9996
+32537,WGS 72BE / UTM zone 37S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,39,0.9996
+32538,WGS 72BE / UTM zone 38S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,45,0.9996
+32539,WGS 72BE / UTM zone 39S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,51,0.9996
+32540,WGS 72BE / UTM zone 40S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,57,0.9996
+32541,WGS 72BE / UTM zone 41S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,63,0.9996
+32542,WGS 72BE / UTM zone 42S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,69,0.9996
+32543,WGS 72BE / UTM zone 43S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,75,0.9996
+32544,WGS 72BE / UTM zone 44S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,81,0.9996
+32545,WGS 72BE / UTM zone 45S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,87,0.9996
+32546,WGS 72BE / UTM zone 46S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,93,0.9996
+32547,WGS 72BE / UTM zone 47S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,99,0.9996
+32548,WGS 72BE / UTM zone 48S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,105,0.9996
+32549,WGS 72BE / UTM zone 49S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,111,0.9996
+32550,WGS 72BE / UTM zone 50S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,117,0.9996
+32551,WGS 72BE / UTM zone 51S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,123,0.9996
+32552,WGS 72BE / UTM zone 52S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,129,0.9996
+32553,WGS 72BE / UTM zone 53S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,135,0.9996
+32554,WGS 72BE / UTM zone 54S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,141,0.9996
+32555,WGS 72BE / UTM zone 55S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,147,0.9996
+32556,WGS 72BE / UTM zone 56S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,153,0.9996
+32557,WGS 72BE / UTM zone 57S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,159,0.9996
+32558,WGS 72BE / UTM zone 58S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,165,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,,
+32559,WGS 72BE / UTM zone 59S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,171,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,,
+32560,WGS 72BE / UTM zone 60S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,177,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,,
+32600,WGS 84 / UTM grid system (northern hemisphere),Transverse Mercator Zoned Grid System,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,0,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-180,6
+32601,WGS 84 / UTM zone 1N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-177,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32602,WGS 84 / UTM zone 2N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-171,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32603,WGS 84 / UTM zone 3N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-165,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32604,WGS 84 / UTM zone 4N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-159,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32605,WGS 84 / UTM zone 5N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-153,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32606,WGS 84 / UTM zone 6N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-147,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32607,WGS 84 / UTM zone 7N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-141,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32608,WGS 84 / UTM zone 8N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-135,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32609,WGS 84 / UTM zone 9N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-129,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32610,WGS 84 / UTM zone 10N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-123,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32611,WGS 84 / UTM zone 11N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-117,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32612,WGS 84 / UTM zone 12N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-111,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32613,WGS 84 / UTM zone 13N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-105,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32614,WGS 84 / UTM zone 14N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-99,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32615,WGS 84 / UTM zone 15N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-93,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32616,WGS 84 / UTM zone 16N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-87,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32617,WGS 84 / UTM zone 17N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-81,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32618,WGS 84 / UTM zone 18N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-75,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32619,WGS 84 / UTM zone 19N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-69,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32620,WGS 84 / UTM zone 20N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-63,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32621,WGS 84 / UTM zone 21N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-57,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32622,WGS 84 / UTM zone 22N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-51,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32623,WGS 84 / UTM zone 23N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-45,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32624,WGS 84 / UTM zone 24N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-39,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32625,WGS 84 / UTM zone 25N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-33,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32626,WGS 84 / UTM zone 26N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-27,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32627,WGS 84 / UTM zone 27N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-21,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32628,WGS 84 / UTM zone 28N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-15,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32629,WGS 84 / UTM zone 29N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-9,0.9996
+32630,WGS 84 / UTM zone 30N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-3,0.9996
+32631,WGS 84 / UTM zone 31N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,3,0.9996
+32632,WGS 84 / UTM zone 32N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,9,0.9996
+32633,WGS 84 / UTM zone 33N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,15,0.9996
+32634,WGS 84 / UTM zone 34N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,21,0.9996
+32635,WGS 84 / UTM zone 35N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,27,0.9996
+32636,WGS 84 / UTM zone 36N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,33,0.9996
+32637,WGS 84 / UTM zone 37N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,39,0.9996
+32638,WGS 84 / UTM zone 38N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,45,0.9996
+32639,WGS 84 / UTM zone 39N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,51,0.9996
+32640,WGS 84 / UTM zone 40N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,57,0.9996
+32641,WGS 84 / UTM zone 41N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,63,0.9996
+32642,WGS 84 / UTM zone 42N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,69,0.9996
+32643,WGS 84 / UTM zone 43N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,75,0.9996
+32644,WGS 84 / UTM zone 44N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,81,0.9996
+32645,WGS 84 / UTM zone 45N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,87,0.9996
+32646,WGS 84 / UTM zone 46N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,93,0.9996
+32647,WGS 84 / UTM zone 47N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,99,0.9996
+32648,WGS 84 / UTM zone 48N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,105,0.9996
+32649,WGS 84 / UTM zone 49N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,111,0.9996
+32650,WGS 84 / UTM zone 50N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,117,0.9996
+32651,WGS 84 / UTM zone 51N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,123,0.9996
+32652,WGS 84 / UTM zone 52N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,129,0.9996
+32653,WGS 84 / UTM zone 53N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,135,0.9996
+32654,WGS 84 / UTM zone 54N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,141,0.9996
+32655,WGS 84 / UTM zone 55N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,147,0.9996
+32656,WGS 84 / UTM zone 56N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,153,0.9996
+32657,WGS 84 / UTM zone 57N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,159,0.9996
+32658,WGS 84 / UTM zone 58N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,165,0.9996
+32659,WGS 84 / UTM zone 59N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,171,0.9996
+32660,WGS 84 / UTM zone 60N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,177,0.9996
+32661,WGS 84 / UPS North,Polar Stereographic (variant A),metre,4326,World Geodetic System 1984,WGS 84,2000000,90,2000000,0,0.994,,,,,,,,,,,,,,,,,,,,,,,,,,
+32664,WGS 84 / BLM 14N (ftUS),Transverse Mercator,US survey foot,4326,World Geodetic System 1984,WGS 84,1640416.67,0,0,-99,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,,
+32665,WGS 84 / BLM 15N (ftUS),Transverse Mercator,US survey foot,4326,World Geodetic System 1984,WGS 84,1640416.67,0,0,-93,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,,
+32666,WGS 84 / BLM 16N (ftUS),Transverse Mercator,US survey foot,4326,World Geodetic System 1984,WGS 84,1640416.67,0,0,-87,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32667,WGS 84 / BLM 17N (ftUS),Transverse Mercator,US survey foot,4326,World Geodetic System 1984,WGS 84,1640416.67,0,0,-81,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32700,WGS 84 / UTM grid system (southern hemisphere),Transverse Mercator Zoned Grid System,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,0,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-180,6
+32701,WGS 84 / UTM zone 1S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-177,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32702,WGS 84 / UTM zone 2S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-171,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32703,WGS 84 / UTM zone 3S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-165,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32704,WGS 84 / UTM zone 4S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-159,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32705,WGS 84 / UTM zone 5S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-153,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32706,WGS 84 / UTM zone 6S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-147,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32707,WGS 84 / UTM zone 7S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-141,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32708,WGS 84 / UTM zone 8S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-135,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32709,WGS 84 / UTM zone 9S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-129,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32710,WGS 84 / UTM zone 10S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-123,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+32711,WGS 84 / UTM zone 11S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-117,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32712,WGS 84 / UTM zone 12S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-111,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32713,WGS 84 / UTM zone 13S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-105,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+32714,WGS 84 / UTM zone 14S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-99,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32715,WGS 84 / UTM zone 15S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-93,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32716,WGS 84 / UTM zone 16S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-87,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32717,WGS 84 / UTM zone 17S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-81,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32718,WGS 84 / UTM zone 18S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-75,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32719,WGS 84 / UTM zone 19S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-69,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32720,WGS 84 / UTM zone 20S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-63,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32721,WGS 84 / UTM zone 21S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-57,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32722,WGS 84 / UTM zone 22S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-51,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32723,WGS 84 / UTM zone 23S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-45,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32724,WGS 84 / UTM zone 24S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-39,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32725,WGS 84 / UTM zone 25S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-33,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32726,WGS 84 / UTM zone 26S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-27,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
+32727,WGS 84 / UTM zone 27S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-21,0.9996
+32728,WGS 84 / UTM zone 28S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-15,0.9996
+32729,WGS 84 / UTM zone 29S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-9,0.9996
+32730,WGS 84 / UTM zone 30S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-3,0.9996
+32731,WGS 84 / UTM zone 31S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,3,0.9996
+32732,WGS 84 / UTM zone 32S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,9,0.9996
+32733,WGS 84 / UTM zone 33S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,15,0.9996
+32734,WGS 84 / UTM zone 34S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,21,0.9996
+32735,WGS 84 / UTM zone 35S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,27,0.9996
+32736,WGS 84 / UTM zone 36S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,33,0.9996
+32737,WGS 84 / UTM zone 37S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,39,0.9996
+32738,WGS 84 / UTM zone 38S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,45,0.9996
+32739,WGS 84 / UTM zone 39S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,51,0.9996
+32740,WGS 84 / UTM zone 40S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,57,0.9996
+32741,WGS 84 / UTM zone 41S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,63,0.9996
+32742,WGS 84 / UTM zone 42S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,69,0.9996
+32743,WGS 84 / UTM zone 43S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,75,0.9996
+32744,WGS 84 / UTM zone 44S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,81,0.9996
+32745,WGS 84 / UTM zone 45S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,87,0.9996
+32746,WGS 84 / UTM zone 46S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,93,0.9996
+32747,WGS 84 / UTM zone 47S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,99,0.9996
+32748,WGS 84 / UTM zone 48S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,105,0.9996
+32749,WGS 84 / UTM zone 49S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,111,0.9996
+32750,WGS 84 / UTM zone 50S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,117,0.9996
+32751,WGS 84 / UTM zone 51S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,123,0.9996
+32752,WGS 84 / UTM zone 52S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,129,0.9996
+32753,WGS 84 / UTM zone 53S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,135,0.9996
+32754,WGS 84 / UTM zone 54S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,141,0.9996
+32755,WGS 84 / UTM zone 55S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,147,0.9996
+32756,WGS 84 / UTM zone 56S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,153,0.9996
+32757,WGS 84 / UTM zone 57S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,159,0.9996
+32758,WGS 84 / UTM zone 58S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,165,0.9996
+32759,WGS 84 / UTM zone 59S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,171,0.9996
+32760,WGS 84 / UTM zone 60S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,177,0.9996
+32761,WGS 84 / UPS South,Polar Stereographic (variant A),metre,4326,World Geodetic System 1984,WGS 84,2000000,-90,2000000,0,0.994
+32766,WGS 84 / TM 36 SE,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,36,0.9996
diff --git a/share/ossim/ossim_harn_state_plane_epsg.csv b/ossim/share/ossim/projection/ossim_harn_state_plane_epsg.csv
similarity index 100%
rename from share/ossim/ossim_harn_state_plane_epsg.csv
rename to ossim/share/ossim/projection/ossim_harn_state_plane_epsg.csv
diff --git a/share/ossim/ossim_harn_state_plane_esri.csv b/ossim/share/ossim/projection/ossim_harn_state_plane_esri.csv
similarity index 100%
rename from share/ossim/ossim_harn_state_plane_esri.csv
rename to ossim/share/ossim/projection/ossim_harn_state_plane_esri.csv
diff --git a/ossim/share/ossim/projection/ossim_state_plane_readme.txt b/ossim/share/ossim/projection/ossim_state_plane_readme.txt
new file mode 100644
index 0000000..702d8b5
--- /dev/null
+++ b/ossim/share/ossim/projection/ossim_state_plane_readme.txt
@@ -0,0 +1,76 @@
+// $Id: ossim_state_plane_readme.txt 2644 2011-05-26 15:20:11Z oscar.kramer $
+
+This is a readme to document the state_plane.csv file keys.
+
+State Plane support can be picked up via ossimPreferences by adding the 
+key "state_plane_csv_file" to your preferences file.  Auto detection from 
+some common place is on the to do list.
+Example preference entry:
+
+state_plane_csv_file1: /usr/local/share/ossim/projection/ossim_state_plane.csv
+state_plane_csv_file2: /usr/local/share/ossim/projection/ossim_harn_state_plane.csv
+
+
+The state_plane.csv (comma separated value) file is used by the 
+ossimStatePlaneProjectionFactory to create projections from line entries
+contained in the csv file.  Each line entry should represent some Projection
+Coordinate System (PCS) for a given state plane projection.
+
+All values in a line must be comma separated.  It does not matter to our code
+whether or not the values are quoted or not.
+
+Example key line (first line):
+name,pcs_code,projection_code,param1,param2,param3,param4,false_easting,false_northing,linear_units,datum_code
+
+Example line with Lambert Conformal Conic projection (lcc):
+NAD27_Arkansas_North,26751,lcc,34 20 n,92 w,34 56 n,36 14 n,2000000,0,us_survey_feet,NAS-C
+
+Example line with Transverse Mercator Projection (tm):
+NAD27_Alabama_East,26729,tm,30 30 n,85 50 w,25000,0,500000,0,us_survey_feet,NAS-C
+
+Key/value: description
+
+1) name/NAD27_Alabama_East: The long name or human readable.
+
+2) pcs_code/26729:  PCS code for this projection.
+   See:  http://www.remotesensing.org/geotiff/spec/geotiff6.html#6.3.3
+
+3) projection_code/tm: This is the underlying projection of the PCS.  This
+   will either be the abbreviated tm or lcc, or the full ossim projection 
+   class name of ossimTransMercatorProjection or 
+   ossimLambertConformalConicProjection.
+
+4) param1/30 30 n: The origin of latitude.  String format = "dd mm h" where
+   dd = degrees, mm = minutes and h is the hemisphere either n or s.
+   (see note 1)
+
+5) param2/85 50 w,  The central meridian.  String format = "dd mm h" where
+   dd = degrees, mm = minutes and h is the hemisphere either n or s.
+   (see note 1)
+
+6) param3/25000: If Lambert this will be the 1st parallel(seen note 1),
+   If Transverse Mercator (this case) it will be the scale factor in the form
+   of "scale_factor = 1.0 - (1.0 / param3).
+   NOTE: For Transverse Mercator units = meters.
+
+7) param4/0: If Lambert this will be the 2st parallel(seen note 1),
+   If Transverse Mercator (this case) it will be 0.
+
+8) false_easting/500000: The false easting in linear_units which should be 
+   either meters or us_survey_feet.
+
+9) false_northing/0: The false northing in linear_units which should be 
+   either meters or us_survey_feet.
+
+10) linear_units/us_survey_feet: This can be either meters or us_survey_feet.
+
+11) datum_code/NAS-C  The ossim datum code corresponding to the PCS.  
+    Run the ossim application "datums" to see a list of valid codes.
+
+NOTES: 
+
+1) Internally this string is fed to an ossimDms class that is pretty good at interpreting strings representing degrees minutes seconds, but if you stick with the "dd mm h" format you can't go wrong.
+
+2) Key line must be present and have the valid keys or file will not be loaded.
+   This is case sensitive so your keys should be in lower case.
+
diff --git a/share/ossim/ossim_state_plane_spcs.csv b/ossim/share/ossim/projection/ossim_state_plane_spcs.csv
similarity index 100%
rename from share/ossim/ossim_state_plane_spcs.csv
rename to ossim/share/ossim/projection/ossim_state_plane_spcs.csv
diff --git a/share/ossim/ossim_wkt_pcs.csv b/ossim/share/ossim/projection/ossim_wkt_pcs.csv
similarity index 100%
rename from share/ossim/ossim_wkt_pcs.csv
rename to ossim/share/ossim/projection/ossim_wkt_pcs.csv
diff --git a/etc/templates/LambertConformalConicProjection_template.geom b/ossim/share/ossim/templates/LambertConformalConicProjection_template.geom
similarity index 100%
rename from etc/templates/LambertConformalConicProjection_template.geom
rename to ossim/share/ossim/templates/LambertConformalConicProjection_template.geom
diff --git a/etc/templates/applanix.geom b/ossim/share/ossim/templates/applanix.geom
similarity index 100%
rename from etc/templates/applanix.geom
rename to ossim/share/ossim/templates/applanix.geom
diff --git a/etc/templates/applanix_ecef.geom b/ossim/share/ossim/templates/applanix_ecef.geom
similarity index 100%
rename from etc/templates/applanix_ecef.geom
rename to ossim/share/ossim/templates/applanix_ecef.geom
diff --git a/ossim/share/ossim/templates/applanix_ecef_camera_file_sn0056.kwl b/ossim/share/ossim/templates/applanix_ecef_camera_file_sn0056.kwl
new file mode 100644
index 0000000..936e884
--- /dev/null
+++ b/ossim/share/ossim/templates/applanix_ecef_camera_file_sn0056.kwl
@@ -0,0 +1,57 @@
+sensor: sn0056
+
+// focal length in millimeters
+focal_length:  55.03
+
+// principal point in millimeters
+principal_point:  -.31 .012
+
+// image size 
+//
+image_size: 4077.0 4092.0
+
+// pixel size in millimeters
+pixel_size:  0.009
+
+// distortion values.  They can be in millimeters microns or pixels
+// internally they will be converted to millimeters
+//
+// Two values.  The radial distance followed by the distortion amount.
+// The radial distance must be in millimeters
+// the distortion amounts can be in millimeters, pixels or microns.
+//
+d0: 1 -.024
+d1: 2 -.191
+d2: 3 -.645
+d3: 4 -1.526
+d4: 5 -2.975
+d5: 6 -5.126
+d6: 7 -8.114
+d7: 8 -12.067
+d8: 9 -17.109
+d9: 10 -23.358
+d10: 11 -30.924
+d11: 12 -39.914
+d12: 12 -50.423
+d13: 14 -62.539
+d14: 15 -76.340
+d15: 16 -91.895
+d16: 17 -109.260
+d17: 18 -128.481
+d18: 19 -149.590
+d19: 20 -172.606
+d20: 21 -197.534
+d21: 22 -224.363
+d22: 23 -253.066
+d23: 24 -283.598
+d24: 25 -315.899
+d25: 26 -349.886
+
+// Specifies the units of the distortion values.  Note the distances must be in
+// millimeters
+//
+//  can be:
+//         millimeters
+//         microns
+//
+distortion_units: microns
diff --git a/ossim/share/ossim/templates/applanix_ecef_eo_example.txt b/ossim/share/ossim/templates/applanix_ecef_eo_example.txt
new file mode 100644
index 0000000..8d7d186
--- /dev/null
+++ b/ossim/share/ossim/templates/applanix_ecef_eo_example.txt
@@ -0,0 +1,160 @@
+**************************************************************************************************************************
+ POS Exterior Orientation Computation Utility         Version  4.2
+ Copyright (C) 1997-2004 by Applanix Corporation      [May 27, 2004]  
+ All rights reserved.                                        
+**************************************************************************************************************************
+ 
+ Parameter setup:
+ POSPROC SBET file: O:\MEERS_2005\Missions\Southern\20050629_SN056_Boresight\000001_18055108\Proc\sbet_050629.out 
+ Camera mid-exposure event file: O:\MEERS_2005\Missions\Southern\050629_SN056_Boresight\000001_18055108\Extract\event1_050629.dat 
+   Event time shift: -0.002400 sec 
+ Photo ID file: O:\MEERS_2005\Missions\Southern\050629_SN056_Boresight\000001_18055108\EO\PhotoID_Boresight.txt 
+   Photo ID file format: 2 Fields (Time, Photo ID) Format 
+   Offset between PHOTO ID and EVENT file times: 0.000000 sec 
+   Scale the Height Output selected. Average ground height 457.310000 
+ Mapping frame datum: WGS84  ; Mapping frame projection : TM;
+ central meridian = -117.000000 deg;
+ latitude of the grid origin = 0.000000 deg; grid scale factor = 0.999600: 
+ false easting = 500000.000000 m; false northing = 0.000000 m; 
+ Sequence of the rotation from mapping to image frame: 
+    First rotation is about the 'x' axis by the 'omega' angle. 
+    Second rotation is about the 'y' axis by the 'phi' angle. 
+    Third rotation is about the 'z' axis by the 'kappa' angle. 
+ Kappa cardinal rotation:  -90.000 deg. 
+ Boresight values: tx =       -0.1800 arc min, ty =      -16.9600 arc min, tz =       -2.5700 arc min. 
+ Lever arm values: lx =        0.0000 m, ly =        0.0000 m, lz =        0.0000 m. 
+Shift values: X = 0.000000 meter, Y = 0.000000 meter, Z = 0.000000 meter 
+
+
+ POS/AV Computed Data at Camera Perspective Centre
+
+ Output: ECEF Coordinates, Datum: WGS84 
+
+ Record Format:
+
+ ID, # EVENT, TIME (s), X, Y, Z, ROLL, PITCH, HEADING, LAT, LONG
+
+ (position in m, orientation in deg, lat, long in deg) 
+
+
+18056119	    4  322390.088043 -2411870.743 -4730740.965 3524595.274   -0.20272    0.22249  359.58758 33.75190546 -117.01382319
+18056124	    5  322395.433462 -2411780.675 -4730567.821 3524884.801    0.36114   -0.33903    0.41088 33.75505249 -117.01380594
+18056130	    6  322401.058549 -2411683.534 -4730385.884 3525192.258   -0.91892    0.53626    0.43611 33.75838919 -117.01376380
+18056135	    7  322406.611109 -2411594.868 -4730208.351 3525498.228   -1.25521    0.73721  359.36548 33.76167582 -117.01378154
+18056141	    8  322412.232276 -2411505.427 -4730030.949 3525806.229   -0.62511    0.31736    1.06982 33.76497884 -117.01379119
+18056147	    9  322417.928311 -2411403.702 -4729853.396 3526115.158   -3.12093   -0.07003    1.03410 33.76831743 -117.01368347
+18056152	   10  322423.627908 -2411307.854 -4729672.478 3526425.970   -1.28216    0.51187    0.21676 33.77167176 -117.01364874
+18056158	   11  322429.178149 -2411218.220 -4729494.126 3526728.107   -1.87747    0.01180  359.66398 33.77493550 -117.01366119
+18056163	   12  322434.783484 -2411123.974 -4729310.774 3527031.632   -0.63054   -0.54345    0.52660 33.77824246 -117.01365381
+18056169	   13  322440.290273 -2411027.212 -4729131.839 3527332.669   -2.20412   -0.16390    0.36960 33.78151679 -117.01360056
+18056174	   14  322445.785261 -2410937.588 -4728950.025 3527635.125   -1.85572   -0.05465  359.38287 33.78479835 -117.01363008
+18056333	   15  322604.617705 -2410345.617 -4729227.623 3527635.126   -0.29360    1.87666  180.77925 33.78490623 -117.00657642
+18056338	   16  322609.833620 -2410449.029 -4729415.642 3527337.193    2.42111    1.26027  180.41852 33.78159945 -117.00664935
+18056344	   17  322615.139961 -2410548.991 -4729597.461 3527031.371    0.11879   -0.13179  179.63464 33.77826913 -117.00671950
+18056349	   18  322620.469113 -2410639.046 -4729784.527 3526722.567    1.16399    0.10803  179.21719 33.77491557 -117.00666865
+18056354	   19  322625.695658 -2410731.325 -4729964.591 3526416.549    0.11570   -1.22610  180.34115 33.77160909 -117.00667351
+18056359	   20  322630.857814 -2410824.027 -4730139.365 3526106.232   -0.20893   -1.52869  180.07386 33.76829304 -117.00670836
+18056364	   21  322635.864540 -2410912.753 -4730315.113 3525802.451   -0.07657   -0.67477  180.20477 33.76503065 -117.00670020
+18056370	   22  322640.992223 -2411008.175 -4730500.934 3525495.371    1.23373    0.35047  180.57255 33.76168335 -117.00670707
+18056375	   23  322646.047918 -2411104.862 -4730682.250 3525195.452    0.97398    0.12470  180.33620 33.75840694 -117.00674818
+18056380	   24  322651.158984 -2411199.303 -4730865.013 3524893.460   -0.63356    0.35296  179.64349 33.75511365 -117.00676059
+18056385	   25  322656.334119 -2411287.966 -4731053.632 3524590.676    0.36777    0.61895  178.80148 33.75180143 -117.00668877
+18056523	   26  322794.589721 -2410705.720 -4731352.372 3524595.239   -1.92630   -0.01613  359.37295 33.75182656 -116.99962771
+18056529	   27  322800.024839 -2410618.517 -4731171.325 3524898.752   -0.42153   -0.59160  359.77525 33.75510714 -116.99967620
+18056534	   28  322805.530725 -2410523.420 -4730980.007 3525203.807   -2.75485   -1.61216  359.23125 33.75846305 -116.99969912
+18056539	   29  322810.739059 -2410441.135 -4730796.869 3525499.365   -0.67369   -0.59923  358.45011 33.76168216 -116.99980514
+18056545	   30  322816.078901 -2410352.707 -4730615.140 3525803.891   -0.21409    0.50060    0.54147 33.76497615 -116.99984521
+18056550	   31  322821.472037 -2410259.043 -4730442.793 3526111.948   -1.32639    0.81639    0.33608 33.76826662 -116.99978896
+18056556	   32  322827.087910 -2410166.366 -4730256.582 3526426.548    0.05751   -0.65620  359.46698 33.77166575 -116.99981013
+18056561	   33  322832.401765 -2410075.304 -4730077.522 3526724.381   -1.52773   -0.68836    0.29988 33.77490366 -116.99981179
+18056566	   34  322837.849309 -2409977.614 -4729894.370 3527030.923   -0.35662   -1.62337    1.60145 33.77824015 -116.99976976
+18056572	   35  322843.197618 -2409875.460 -4729713.777 3527333.664   -1.62321   -0.22614    1.27608 33.78154691 -116.99967226
+18056577	   36  322848.474318 -2409782.421 -4729536.820 3527635.728   -0.80224   -0.12550  359.79083 33.78481162 -116.99964460
+18056721	   37  322992.771810 -2409217.271 -4729821.548 3527633.687    0.76929    0.01861  179.90006 33.78481055 -116.99281392
+18056726	   38  322997.924268 -2409312.100 -4730004.813 3527330.341   -0.82790   -0.12207  180.51093 33.78150399 -116.99282815
+18056732	   39  323002.950094 -2409400.954 -4730184.514 3527034.235    0.06327    0.17609  179.07986 33.77828118 -116.99280238
+18056737	   40  323008.102385 -2409490.585 -4730370.304 3526732.198   -0.63517    0.41704  179.41085 33.77498499 -116.99275424
+18056742	   41  323013.331958 -2409582.457 -4730557.036 3526426.400   -0.26111    0.14908  179.77013 33.77165131 -116.99272306
+18056747	   42  323018.563281 -2409678.042 -4730739.639 3526119.283    0.53095   -0.38398  180.35649 33.76831774 -116.99274781
+18056752	   43  323023.661575 -2409771.101 -4730913.642 3525815.326   -0.15725   -1.91923  180.61563 33.76505198 -116.99279039
+18056757	   44  323028.901434 -2409865.321 -4731091.803 3525494.007   -0.15118   -1.44316  180.02902 33.76163492 -116.99282376
+18056762	   45  323033.842080 -2409955.613 -4731267.294 3525190.601    0.53722   -1.11505  180.79129 33.75837292 -116.99283244
+18056767	   46  323038.771906 -2410046.359 -4731445.003 3524888.089    0.09900   -0.08745  180.21753 33.75510669 -116.99283462
+18056772	   47  323043.834440 -2410140.814 -4731631.015 3524581.825    0.70416    0.08417  180.11662 33.75176684 -116.99283179
+18056909	   48  323180.358514 -2409563.526 -4731935.546 3524585.959   -0.12035   -0.54852  359.84564 33.75175087 -116.98579005
+18056914	   49  323185.736033 -2409473.697 -4731750.247 3524891.458    0.15945   -0.10676  359.55083 33.75507127 -116.98583359
+18056920	   50  323191.096999 -2409383.482 -4731568.168 3525197.364   -0.38385   -0.37968  359.47613 33.75838123 -116.98585764
+18056925	   51  323196.426157 -2409293.771 -4731382.503 3525499.736    0.24357   -1.86588  359.20567 33.76167957 -116.98590412
+18056930	   52  323201.782881 -2409195.041 -4731193.867 3525804.899   -0.88972   -0.43861    0.93893 33.76503258 -116.98587840
+18056936	   53  323207.050443 -2409099.720 -4731015.489 3526110.087   -0.75853   -0.04707    0.53867 33.76833225 -116.98583524
+18056941	   54  323212.396768 -2409006.235 -4730834.824 3526418.283   -0.05919   -0.33115    0.40762 33.77166048 -116.98582094
+18056946	   55  323217.618626 -2408915.493 -4730657.035 3526717.767   -0.32271   -0.46318  359.96963 33.77490436 -116.98581892
+18056951	   56  323222.904634 -2408824.658 -4730477.291 3527020.850   -0.08485   -0.30866  359.83422 33.77818414 -116.98582559
+18056957	   57  323228.383053 -2408732.896 -4730288.732 3527333.940   -0.23160   -0.14298  359.40876 33.78158037 -116.98586651
+18056962	   58  323233.647108 -2408645.203 -4730109.067 3527635.017   -0.70400    0.10847  359.30056 33.78483762 -116.98590302
+18057223	   59  323493.947506 -2408226.134 -4731161.995 3527599.350    0.45708    2.58738  270.69812 33.78082092 -116.97671606
+18057232	   60  323503.412046 -2408719.741 -4730913.954 3527601.041    1.09201    1.63426  269.11129 33.78081910 -116.98267806
+18057241	   61  323512.032434 -2409188.958 -4730673.874 3527602.189   -0.93347    1.44813  270.40770 33.78083284 -116.98836650
+18057249	   62  323520.365169 -2409657.123 -4730430.031 3527607.491   -0.66196    0.83601  270.70243 33.78089663 -116.99406325
+18057257	   63  323528.450832 -2410125.605 -4730187.630 3527615.116    0.40691    1.02123  271.19035 33.78097040 -116.99975600
+18057265	   64  323536.447979 -2410596.858 -4729946.807 3527618.721    1.43602   -0.01153  270.42415 33.78100044 -117.00546767
+18057273	   65  323544.268408 -2411066.510 -4729705.145 3527614.699    1.15587   -0.12528  268.67422 33.78098048 -117.01116806
+18057281	   66  323552.010197 -2411542.305 -4729468.300 3527605.917   -0.04536    0.50968  269.19078 33.78088911 -117.01690391
+18057288	   67  323559.580288 -2412008.353 -4729233.294 3527606.869   -0.38156    0.32089  270.52934 33.78088436 -117.02253701
+18057419	   68  323690.371747 -2412243.136 -4729694.919 3526838.398   -0.59837   -0.72803   89.28515 33.77253281 -117.02253070
+18057427	   69  323698.126432 -2411767.721 -4729928.958 3526840.051   -0.13392   -0.75829   89.81503 33.77258269 -117.01681284
+18057434	   70  323705.819985 -2411298.872 -4730170.115 3526841.488    0.32137    1.07731   89.67703 33.77258398 -117.01112319
+18057442	   71  323713.575625 -2410838.919 -4730416.147 3526845.268   -0.66532    0.91136   90.66097 33.77256056 -117.00549521
+18057450	   72  323721.702610 -2410361.503 -4730665.675 3526844.883   -0.56720   -0.04601   90.82191 33.77252980 -116.99968220
+18057458	   73  323729.677679 -2409888.500 -4730903.873 3526845.191    0.82546   -0.55558   89.62645 33.77254451 -116.99396713
+18057466	   74  323737.541002 -2409417.491 -4731139.142 3526842.105   -1.39229   -1.04988   89.81154 33.77254206 -116.98828558
+18057474	   75  323745.426337 -2408945.018 -4731381.490 3526839.285   -0.35083   -0.11462   90.98920 33.77251306 -116.98255529
+18057482	   76  323753.310134 -2408477.258 -4731625.809 3526832.926    0.21231    0.09263   90.92840 33.77243778 -116.97686067
+18057630	   77  323901.610762 -2408705.217 -4732093.145 3526080.919   -3.16033    0.75801  270.93590 33.76419958 -116.97676524
+18057638	   78  323909.452543 -2409183.313 -4731851.572 3526080.048   -0.69047   -0.21038  269.80653 33.76418496 -116.98254524
+18057646	   79  323917.089537 -2409654.068 -4731598.082 3526072.720   -0.23948   -2.02733  269.53932 33.76419155 -116.98831303
+18057653	   80  323924.404173 -2410120.746 -4731356.643 3526070.114    0.60421    0.60331  270.36692 33.76418875 -116.99398259
+18057660	   81  323931.710832 -2410586.211 -4731119.404 3526072.825   -0.55807   -0.77107  269.78344 33.76420953 -116.99961994
+18057668	   82  323939.284559 -2411070.678 -4730872.973 3526065.856   -0.54450   -0.42366  269.68645 33.76415534 -117.00548501
+18057675	   83  323946.505790 -2411534.209 -4730635.199 3526060.946    0.42130   -0.69723  269.97590 33.76412528 -117.01110638
+18057682	   84  323953.835653 -2412006.794 -4730393.619 3526058.927    0.20872   -0.49983  269.79008 33.76411301 -117.01683345
+18057690	   85  323961.129327 -2412475.803 -4730155.434 3526064.987   -0.07798    0.08669  270.99193 33.76415399 -117.02250951
+18057826	   86  324097.476108 -2412717.885 -4730619.515 3525307.996    0.61114   -0.12391   91.26574 33.75586088 -117.02256132
+18057834	   87  324105.454170 -2412240.384 -4730859.438 3525295.078   -0.54971   -1.32621   90.01433 33.75578007 -117.01679569
+18057842	   88  324113.241329 -2411762.547 -4731096.937 3525291.078    0.03124   -0.80391   90.64022 33.75577739 -117.01103869
+18057849	   89  324120.787431 -2411301.225 -4731333.766 3525290.031    0.47494    0.26794   90.21154 33.75576200 -117.00544373
+18057857	   90  324128.602829 -2410828.476 -4731578.708 3525288.401    0.24435   -0.12512   89.99490 33.75573178 -116.99969918
+18057865	   91  324136.345761 -2410356.505 -4731813.678 3525289.371   -1.19391   -0.59616   89.05379 33.75576349 -116.99401094
+18057873	   92  324144.145306 -2409878.942 -4732049.648 3525296.609   -0.70055   -0.14311   89.84728 33.75585015 -116.98826404
+18057881	   93  324151.940810 -2409406.083 -4732290.499 3525297.572    0.28038    0.02219   90.52854 33.75585707 -116.98253847
+18057888	   94  324159.667722 -2408942.611 -4732532.632 3525292.552    0.15547    0.09995   91.12566 33.75579183 -116.97689687
+18058645	   95  324916.131736 -2411140.308 -4700355.473 3566138.064   -0.77636    0.07490   20.56337 34.20031786 -117.15645280
+18058650	   96  324921.303146 -2410933.795 -4700239.597 3566431.154   -0.51067   -0.00033   20.52089 34.20350207 -117.15503346
+18058655	   97  324926.464184 -2410725.135 -4700125.522 3566721.526   -1.20464    0.07069   20.92794 34.20666286 -117.15358437
+18058660	   98  324931.511447 -2410522.293 -4700012.307 3567004.561   -0.94881   -0.08303   20.69128 34.20975161 -117.15218708
+18058665	   99  324936.712646 -2410312.133 -4699897.045 3567294.799   -0.53264    0.16287   21.64025 34.21292019 -117.15072917
+18058767	  100  325038.610364 -2410586.885 -4699669.478 3567419.091    0.53576    1.15626  200.27215 34.21423712 -117.15450767
+18058773	  101  325044.558300 -2410803.350 -4699793.526 3567122.778    0.48271    0.09089  201.55734 34.21096905 -117.15598281
+18058779	  102  325050.319375 -2411010.650 -4699907.731 3566835.949   -0.09103    0.49160  200.02435 34.20783720 -117.15741811
+18058785	  103  325056.079832 -2411214.397 -4700023.862 3566547.979    1.09344   -1.44019  200.55100 34.20469637 -117.15880947
+18058790	  104  325061.890050 -2411423.516 -4700133.515 3566248.391   -1.61774   -1.24578  200.72669 34.20148571 -117.16028465
+18058928	  105  325199.927030 -2410975.278 -4702075.378 3563609.350  -11.73867   -3.33058   26.75222 34.17409883 -117.14634892
+18058933	  106  325204.523677 -2410760.315 -4701975.844 3563883.159   -0.78055    0.34612   23.15178 34.17708520 -117.14476720
+18058938	  107  325209.408164 -2410539.399 -4701880.924 3564169.158   -0.23995   -1.30506   25.28092 34.18015539 -117.14310511
+18058943	  108  325214.370223 -2410301.913 -4701785.669 3564440.526   -1.49579   -0.82718   26.81992 34.18315627 -117.14128467
+18058948	  109  325219.387258 -2410067.299 -4701692.402 3564716.378   -3.38820   -0.59751   25.75713 34.18617495 -117.13948196
+18059064	  110  325335.193886 -2409807.405 -4701906.538 3564578.454    0.23387   -2.56381  203.67261 34.18478206 -117.13591462
+18059069	  111  325340.654742 -2410030.346 -4702001.243 3564288.279    1.30506   -0.35376  205.92489 34.18167711 -117.13759766
+18059074	  112  325345.890053 -2410260.219 -4702094.156 3564021.775    0.36171    0.35967  206.43291 34.17874068 -117.13935635
+18059080	  113  325351.343202 -2410493.649 -4702191.653 3563743.634    1.60635   -0.12423  205.68021 34.17568860 -117.14112656
+18059085	  114  325356.808655 -2410728.616 -4702284.198 3563465.592    0.03372   -0.25741  206.68156 34.17265599 -117.14293596
+18059453	  115  325724.670994 -2399788.897 -4712211.641 3558373.985    2.37884   -0.39497  140.50497 34.11514253 -116.98838769
+18059459	  116  325730.204085 -2399650.925 -4712465.237 3558131.556    0.55429    0.10868  140.35748 34.11250806 -116.98580874
+18059464	  117  325735.693523 -2399511.518 -4712719.676 3557898.298    2.16139    0.46403  140.61806 34.10994145 -116.98321194
+18059470	  118  325741.273498 -2399376.929 -4712976.208 3557658.512    0.19624    1.80964  140.85586 34.10730561 -116.98065154
+18059475	  119  325746.812946 -2399241.858 -4713230.578 3557427.743    1.83829    0.95991  140.66313 34.10474784 -116.97809726
+18059624	  120  325895.606415 -2398914.736 -4713245.094 3557629.758   -1.10695    0.51336  319.81965 34.10693968 -116.97486760
+18059630	  121  325901.233298 -2399056.259 -4712986.917 3557869.378   -1.02493   -1.44731  320.63914 34.10956592 -116.97750285
+18059635	  122  325906.658550 -2399191.229 -4712726.903 3558101.710   -1.09160   -1.54588  320.10368 34.11216102 -116.98008401
+18059640	  123  325911.878303 -2399324.911 -4712474.598 3558331.285   -2.30502   -0.66415  320.45459 34.11470373 -116.98261501
+18059646	  124  325917.168426 -2399464.895 -4712220.619 3558567.045   -2.26174   -0.36675  320.51619 34.11728563 -116.98521524
diff --git a/etc/templates/applanix_utm.geom b/ossim/share/ossim/templates/applanix_utm.geom
similarity index 100%
rename from etc/templates/applanix_utm.geom
rename to ossim/share/ossim/templates/applanix_utm.geom
diff --git a/ossim/share/ossim/templates/applanix_utm_camera_file_sn0085D.kwl b/ossim/share/ossim/templates/applanix_utm_camera_file_sn0085D.kwl
new file mode 100644
index 0000000..0005ac1
--- /dev/null
+++ b/ossim/share/ossim/templates/applanix_utm_camera_file_sn0085D.kwl
@@ -0,0 +1,74 @@
+sensor: sn0085D
+
+focal_length: 60.145
+
+principal_point: -0.207 -0.090
+
+image_size: 5436.0 4092.0
+
+pixel_size: 0.009
+
+d0: 1.00    -0.021  
+
+d1: 2.00    -0.171  
+
+d2: 3.00    -0.578  
+
+d3: 4.00    -1.366  
+
+d4: 5.00    -2.659  
+
+d5: 6.00    -4.578  
+
+d6: 7.00    -7.236  
+
+d7: 8.00    -10.746 
+
+d8: 9.00    -15.210 
+
+d9: 10.00   -20.727 
+
+d10:11.00   -27.388 
+
+d11:12.00   -35.276 
+
+d12:13.00   -44.465 
+
+d13:14.00   -55.022 
+
+d14:15.00   -67.005 
+
+d15:16.00   -80.461 
+
+d16:17.00   -95.431 
+
+d17:18.00   -111.944
+
+d18:19.00   -130.021
+
+d19:20.00   -149.675
+
+d20:21.00   -170.909
+
+d21:22.00   -193.721
+
+d22:23.00   -218.098
+
+d23:24.00   -244.025
+
+d24:25.00   -271.478
+
+d25:26.00   -300.433
+
+d26:27.00   -330.859
+
+d27:28.00   -362.728
+
+d28:29.00   -396.728
+
+d29:30.00   -430.678
+
+d30:31.00   -466.713
+
+distortion_units: microns
+
diff --git a/ossim/share/ossim/templates/applanix_utm_eo_example.txt b/ossim/share/ossim/templates/applanix_utm_eo_example.txt
new file mode 100644
index 0000000..b33843e
--- /dev/null
+++ b/ossim/share/ossim/templates/applanix_utm_eo_example.txt
@@ -0,0 +1,115 @@
+**************************************************************************************************************************
+ POS Exterior Orientation Computation Utility         Version  5.4
+ Copyright (C) 1997-2011 by Applanix Corporation      [Jun 15 2011] 
+ All rights reserved.                                        
+**************************************************************************************************************************
+ 
+ Parameter setup:
+ POSPROC SBET file: E:\Imagery_DSS\DSS_Boresites\2011_NCMP_BS\110625_1\000001_17656244_BS\000001_17656244_BS\110625_1\Proc\sbet_110625_1.out 
+ Camera mid-exposure event file: E:\Imagery_DSS\DSS_Boresites\2011_NCMP_BS\110625_1\000001_17656244_BS\000001_17656244_BS\110625_1\Extract\event1_110625_1.dat 
+   Event time shift: -0.002400 sec 
+ Photo ID file: E:\Imagery_DSS\DSS_Boresites\2011_NCMP_BS\110625_1\000001_17656244_BS\photo_id.dat 
+   Photo ID file format: 2 Fields (Time, Photo ID) Format 
+   Offset between PHOTO ID and EVENT file times: 0.000000 sec 
+   PHOTO ID time tolerance: 0.300000 sec 
+ Mapping frame datum: NAD83  ; a = 6378137.000000; 1/f = 298.257222;
+ Coordinate transformation from WGS84 to mapping frame datum 
+    dX = 0.984000; dY = -1.916000; dZ = -0.511000; f = 0.999999999017; 
+    R1 = 0.000000127215; R2 = 0.000000045282; R3 = 0.000000055463;
+ sequence of the rotations: x,y,z,1 
+ Mapping frame projection : TM;
+ central meridian = -87.000000 deg;
+ latitude of the grid origin = 0.000000 deg; grid scale factor = 0.999600: 
+ false easting = 500000.000000 m; false northing = 0.000000 m; 
+ Sequence of the rotation from mapping to image frame: 
+    First rotation is about the 'x' axis by the 'omega' angle. 
+    Second rotation is about the 'y' axis by the 'phi' angle. 
+    Third rotation is about the 'z' axis by the 'kappa' angle. 
+ Kappa cardinal rotation:  -90.000 deg. 
+ Boresight values: tx =        3.6833 arc min, ty =        6.5434 arc min, tz =        6.9228 arc min. 
+ Lever arm values: lx =        0.0000 m, ly =        0.0000 m, lz =        0.0000 m. 
+Shift values: X = -0.504388 meter, Y = 0.810880 meter, Z = -1.116507 meter 
+
+
+ POS/AV Computed Data at Camera Perspective Centre
+Grid: Universal Transverse Mercator  ;Zone: UTM North 16 (90W to 84W)  ;Datum: NAD83  ;Local Transformation: NONE  ;
+
+ Record Format:
+
+ ID, # EVENT, TIME (s), EASTING, NORTHING, ELLIPSOID HEIGHT, OMEGA, PHI, KAPPA, LAT, LONG
+
+ (position in Meters, orientation in Degrees, lat, long in Deg) 
+
+
+17657707	    3  576091.066218  470696.886 5155353.811 1997.734    2.43560    2.26026   89.58606 46.55110533 -87.38224152
+17657714	    4  576097.862895  470245.145 5155355.018 1998.585    1.20533    2.27140   89.94365 46.55109635 -87.38813425
+17657721	    5  576104.692411  469792.161 5155355.483 1998.236    0.61550    2.43972   89.90093 46.55108034 -87.39404314
+17657728	    6  576111.470650  469344.780 5155362.395 1998.406    0.70082    2.44766   88.73466 46.55112229 -87.39987937
+17657734	    7  576118.247587  468899.602 5155374.085 1997.834    1.00357    2.47764   88.90336 46.55120704 -87.40568719
+17657741	    8  576125.148324  468447.798 5155384.537 1997.738    0.64719    2.69769   88.59335 46.55128004 -87.41158137
+17657748	    9  576132.096894  467995.502 5155396.363 1998.326    0.77697    2.81253   88.48216 46.55136510 -87.41748208
+17657755	   10  576138.957763  467551.641 5155409.321 1999.398    0.96046    2.66215   88.28551 46.55146043 -87.42327285
+17658692	   11  577076.031430  470697.712 5156241.976 2006.633    0.83407    2.89497   89.09746 46.55909819 -87.38228687
+17658699	   12  577083.040835  470247.781 5156250.552 2007.683    1.84550    2.68497   89.70781 46.55915561 -87.38815732
+17658706	   13  577089.983802  469802.991 5156255.870 2008.239    1.33647    2.67117   89.41681 46.55918363 -87.39396050
+17658713	   14  577097.005696  469352.993 5156260.797 2006.799    0.75503    2.51334   89.36168 46.55920760 -87.39983161
+17658720	   15  577104.088379  468898.025 5156267.586 2006.090    0.86490    2.83692   89.15614 46.55924779 -87.40576769
+17658727	   16  577111.050137  468451.833 5156276.065 2007.072    0.88736    2.66944   88.85734 46.55930330 -87.41158939
+17658734	   17  577118.044247  468004.179 5156286.563 2006.744    0.69080    2.61287   88.56192 46.55937662 -87.41743031
+17658741	   18  577125.041205  467556.377 5156300.288 2006.500    0.81201    2.72859   88.09354 46.55947866 -87.42327341
+17659336	   19  577719.389728  470061.577 5154169.986 1383.492    2.50272   -0.90889   -0.29547 46.54042377 -87.39045230
+17659340	   20  577724.288035  470060.620 5154473.979 1383.036    2.48265   -1.16852    0.56860 46.54315945 -87.39048439
+17659345	   21  577729.198501  470058.039 5154779.583 1382.700    2.49408   -0.00427    0.56525 46.54590955 -87.39053777
+17659350	   22  577733.900213  470056.959 5155072.849 1382.422    2.52444   -0.44862    0.30889 46.54854868 -87.39057079
+17659355	   23  577738.647450  470056.034 5155369.413 1382.118    2.55864   -0.84150    0.37480 46.55121750 -87.39060200
+17659360	   24  577743.417252  470053.788 5155667.526 1381.589    2.56373   -0.91131    0.68010 46.55390019 -87.39065055
+17659364	   25  577748.320501  470049.401 5155974.034 1381.173    2.61328   -1.03402    1.22359 46.55665834 -87.39072757
+17659369	   26  577753.106269  470042.634 5156273.175 1381.282    2.61906   -0.65796    1.67510 46.55935008 -87.39083518
+17659374	   27  577757.866908  470035.966 5156570.767 1382.151    2.44802    2.66693    0.99563 46.56202790 -87.39094141
+17659379	   28  577762.613652  470035.207 5156867.722 1383.259    2.42525   -0.86915    0.34784 46.56470023 -87.39097051
+17659384	   29  577767.368179  470034.213 5157165.478 1383.434    2.23491   -0.55371    0.24826 46.56737977 -87.39100273
+17659388	   30  577772.234776  470033.194 5157470.963 1383.205    2.24998   -0.79168    0.35075 46.57012885 -87.39103578
+17659562	   31  577946.320363  469457.347 5157468.523 1385.543   -3.36888    0.45524 -179.00527 46.57008096 -87.39854977
+17659567	   32  577950.864076  469458.944 5157169.570 1385.161   -3.57076   -2.27199  179.82546 46.56739069 -87.39850923
+17659572	   33  577955.348633  469454.576 5156874.989 1384.872   -3.24616    1.78186  179.42835 46.56473949 -87.39854681
+17659576	   34  577959.940593  469451.573 5156573.186 1384.765   -3.40025    0.47167  179.59121 46.56202335 -87.39856610
+17659581	   35  577964.506840  469448.510 5156273.070 1384.364   -3.31070    0.80361  179.58304 46.55932240 -87.39858628
+17659585	   36  577969.032354  469445.839 5155975.459 1383.908   -3.47478    0.72155  179.71745 46.55664400 -87.39860152
+17659590	   37  577973.643168  469443.356 5155672.534 1384.126   -3.66891    0.54874  179.74357 46.55391779 -87.39861395
+17659594	   38  577978.193054  469440.690 5155374.390 1384.689   -3.61029    0.49862  179.60819 46.55123460 -87.39862908
+17659599	   39  577982.788574  469437.515 5155073.820 1385.115   -3.53325    0.47709  179.41053 46.54852955 -87.39865069
+17659603	   40  577987.264179  469433.851 5154781.428 1385.310   -3.48587    0.65936  179.24972 46.54589807 -87.39867922
+17659608	   41  577991.897084  469429.841 5154478.946 1385.015   -3.50482    0.68197  179.40393 46.54317577 -87.39871159
+17659613	   42  577996.596346  469425.661 5154172.254 1384.538   -3.46646    0.75428  179.31998 46.54041557 -87.39874590
+17659794	   43  578178.344895  468859.111 5154182.354 1387.905    2.88492   -3.22022   -0.33904 46.54048047 -87.40613537
+17659799	   44  578183.106185  468855.979 5154480.580 1387.855    2.76662   -0.54281    1.58767 46.54316414 -87.40619624
+17659804	   45  578187.886293  468849.475 5154780.470 1388.536    2.62982    0.79183    0.83614 46.54586263 -87.40630119
+17659809	   46  578192.574590  468846.599 5155075.390 1389.075    2.53435   -1.68529    0.62358 46.54851656 -87.40635851
+17659814	   47  578197.386846  468841.208 5155378.982 1388.590    2.43673   -1.54497    1.57020 46.55124841 -87.40644922
+17659818	   48  578202.042957  468832.290 5155673.657 1388.113    2.10666    2.92996    1.56906 46.55389984 -87.40658536
+17659823	   49  578206.810635  468829.015 5155976.890 1387.967    2.16015    1.29010    0.04304 46.55662856 -87.40664846
+17659828	   50  578211.504487  468831.374 5156276.854 1387.854    2.24297   -0.45588   -0.66948 46.55932811 -87.40663785
+17659832	   51  578216.105419  468834.712 5156571.977 1387.823    2.18839   -0.77020   -0.56183 46.56198415 -87.40661414
+17659837	   52  578220.787698  468837.463 5156873.391 1387.620    2.10675   -1.00440   -0.31249 46.56469677 -87.40659852
+17659842	   53  578225.386697  468838.416 5157170.022 1386.365    1.99015   -1.15488    0.20382 46.56736626 -87.40660604
+17659846	   54  578230.129439  468836.735 5157475.539 1384.282    2.31631   -1.38540    0.69801 46.57011560 -87.40664851
+17660027	   55  578410.835584  468293.463 5157475.620 1384.787   -3.28184    0.06738 -179.24445 46.57009090 -87.41373758
+17660031	   56  578415.261046  468295.265 5157177.020 1384.957   -3.35204   -2.56671  179.75335 46.56740383 -87.41369364
+17660036	   57  578419.666757  468289.417 5156880.890 1384.650   -2.99059    1.66352  178.73360 46.56473862 -87.41374968
+17660040	   58  578424.169969  468283.876 5156578.527 1384.654   -3.18674    0.73260  179.42317 46.56201732 -87.41380129
+17660045	   59  578428.645583  468279.938 5156278.434 1385.812   -3.22013    0.34378  179.38137 46.55931653 -87.41383214
+17660049	   60  578433.154334  468275.475 5155976.827 1386.941   -2.95745    0.31457  179.21167 46.55660209 -87.41386972
+17660054	   61  578437.597601  468270.574 5155679.648 1386.159   -2.69799    0.61633  179.22716 46.55392748 -87.41391333
+17660058	   62  578442.082100  468265.747 5155378.933 1384.457   -2.89392    0.46113  179.14404 46.55122105 -87.41395572
+17660063	   63  578446.458878  468261.009 5155085.175 1383.700   -3.15241    0.59372  179.10679 46.54857723 -87.41399742
+17660067	   64  578450.948410  468256.357 5154784.399 1383.370   -3.40992    0.53432  179.16685 46.54587025 -87.41403752
+17660072	   65  578455.463087  468251.780 5154482.936 1383.058   -3.42776    0.54221  179.27077 46.54315709 -87.41407658
+17660076	   66  578459.989999  468247.321 5154181.532 1382.945   -3.56628    0.57738  179.26310 46.54044447 -87.41411411
+17660286	   67  578669.406621  470694.475 5155322.610 2022.628    2.04305    2.64844   87.79740 46.55082444 -87.38227099
+17660293	   68  578676.533916  470244.802 5155336.106 2023.828    1.90262    2.58594   88.75347 46.55092614 -87.38813751
+17660300	   69  578683.608225  469795.243 5155343.708 2024.495    0.83245    2.61406   89.14466 46.55097451 -87.39400218
+17660307	   70  578690.582113  469349.464 5155351.054 2024.368    1.68538    2.33908   89.19341 46.55102044 -87.39981752
+17660314	   71  578697.626230  468896.262 5155356.488 2023.969    0.45335    2.49966   89.07735 46.55104853 -87.40572958
+17660321	   72  578704.591962  468446.293 5155362.245 2023.315    0.73981    2.45926   89.60831 46.55107937 -87.41159948
+17660328	   73  578711.456399  468001.562 5155368.804 2023.144    1.62288    2.41157   89.23076 46.55111737 -87.41740112
+17660335	   74  578718.459735  467546.819 5155374.194 2023.138    0.85947    2.48229   89.36142 46.55114408 -87.42333329
diff --git a/etc/templates/bilinear_projection_template.geom b/ossim/share/ossim/templates/bilinear_projection_template.geom
similarity index 100%
rename from etc/templates/bilinear_projection_template.geom
rename to ossim/share/ossim/templates/bilinear_projection_template.geom
diff --git a/etc/templates/elevation_database_template.sql b/ossim/share/ossim/templates/elevation_database_template.sql
similarity index 100%
rename from etc/templates/elevation_database_template.sql
rename to ossim/share/ossim/templates/elevation_database_template.sql
diff --git a/etc/templates/fgdc_metadata_file_writer_template.xml b/ossim/share/ossim/templates/fgdc_metadata_file_writer_template.xml
similarity index 100%
rename from etc/templates/fgdc_metadata_file_writer_template.xml
rename to ossim/share/ossim/templates/fgdc_metadata_file_writer_template.xml
diff --git a/etc/templates/general_raster_template.omd b/ossim/share/ossim/templates/general_raster_template.omd
similarity index 100%
rename from etc/templates/general_raster_template.omd
rename to ossim/share/ossim/templates/general_raster_template.omd
diff --git a/etc/templates/geographic_projection_template.geom b/ossim/share/ossim/templates/geographic_projection_template.geom
similarity index 100%
rename from etc/templates/geographic_projection_template.geom
rename to ossim/share/ossim/templates/geographic_projection_template.geom
diff --git a/ossim/share/ossim/templates/index_to_rgb.lut b/ossim/share/ossim/templates/index_to_rgb.lut
new file mode 100644
index 0000000..0b673a5
--- /dev/null
+++ b/ossim/share/ossim/templates/index_to_rgb.lut
@@ -0,0 +1,85 @@
+//*************************************************************************************************
+//
+// The ossimIndexToRgbLutFilter class provides a look-up-table remap from a single band input 
+// (the index), to a 3-band RGBoutput. The LUT is provided as a KWL with several remapping modes 
+// supported:
+//
+// Literal: Only those indices represented in the KWL are remapped to the values indicated. All
+// other pixel values are mapped to the NULL pixel (0,0,0). Note that this is only meaningful for
+// integer input scalar types since a normalized input will likely not find an exact match.
+//
+// Arbitrary piecewise linear ("vertices"): The LUT KWL provides vertices to contiguous line
+// segments. Pixel values falling between specified indices are linearly interpolated between
+// adjacent vertices. Any index pixel values falling outside the range between min and max vertex
+// indices will be mapped to the NULL pixel.
+//
+// Regular piecewise linear ("regular"): The entries in the KWL do not correspond to any specific
+// index (except the first and the last entries that correspond to the min and max pixel values).
+// Remaining intermediate entries are equally spaced in index space so that the line segments are of
+// equal length. The min and max values are queried from the input source, but can be overriden with
+// the "min_value" and "max_value" keywords in the LUT KWL.
+//
+// Here are example KWLs for the three modes, first for the literal remap:
+//
+//    type: ossimIndexToRgbLutFilter
+//    mode: literal
+//    entry0.index: 0
+//    entry0.color: 1 1 1
+//    entry1.index: 128
+//    entry1.color: 255 0 0
+//    entry2.index: 255
+//    entry2.color: 0 255 0
+//
+// The above KWL will map only pixels with input values of 0, 128, and 255. All other indices will
+// map to the null value.
+//
+// Example for arbitrary piecewise linear:
+//
+//    type: ossimIndexToRgbLutFilter
+//    mode: vertices
+//    entry0.index: 1
+//    entry0.color: 0 0 255
+//    entry1.index: 128
+//    entry1.color: 0 255 0
+//    entry2.index: 250
+//    entry2.color: 255 0 0
+//
+// The above KWL is a sort of heat map where indices between 1 and 128 will linearly map from blue
+// to green, and then 128 to 250 will map from green (through yellow) to red. Note that any value
+// above 250 as well as 0 are outside of the remap range and will map to the null pixel (0,0,0).
+//
+// Example for regular piecewise linear. This is the default mode. For backward compatibility, the
+// mode keyword here is optional and if omitted will imply this mode. Also, unlike previous form,
+// the number_of_entries keyword is not required and is ignored if present.
+//
+//    type: ossimIndexToRgbLutFilter
+//    mode: regular
+//    entry0: 0 0 255
+//    entry1: 0 255 0
+//    entry2: 255 0 0
+//    max_value:  250
+//    min_value:  1
+//
+// The above KWL is almost equivalent to the "vertices" example above, i.e., a heat map. However,
+// the individual vertices are not specified. Instead, three entries will define two line segments.
+// The first line segment will commence with index 1 (min_value) and finish at:
+//
+//    [(max_value-min_value)/(number_of_entries-1)] + min_value
+//
+// In this case it will be 125.5. The quantity in square-brackets (124.5) is the interval, or
+// length of each line segment, so the second line segment will go from 125.5 to 250. Input pixel
+// values below the min_value will clamp to the min value (except the null pixel) and those above
+// the max value will clamp to the max value.
+//
+//*************************************************************************************************
+
+// Heatmap:
+type: ossimIndexToRgbLutFilter
+mode: vertices
+entry0.index: 1
+entry0.color: 0 0 255
+entry1.index: 128
+entry1.color: 0 255 0
+entry2.index: 250
+entry2.color: 255 0 0
+
diff --git a/etc/templates/nitf-site-configuration.kwl b/ossim/share/ossim/templates/nitf-site-configuration.kwl
similarity index 100%
rename from etc/templates/nitf-site-configuration.kwl
rename to ossim/share/ossim/templates/nitf-site-configuration.kwl
diff --git a/etc/templates/orthoigen1.kwl b/ossim/share/ossim/templates/orthoigen1.kwl
similarity index 100%
rename from etc/templates/orthoigen1.kwl
rename to ossim/share/ossim/templates/orthoigen1.kwl
diff --git a/etc/templates/orthoigen2.kwl b/ossim/share/ossim/templates/orthoigen2.kwl
similarity index 100%
rename from etc/templates/orthoigen2.kwl
rename to ossim/share/ossim/templates/orthoigen2.kwl
diff --git a/ossim/share/ossim/templates/orthoigen3.kwl b/ossim/share/ossim/templates/orthoigen3.kwl
new file mode 100644
index 0000000..c911d46
--- /dev/null
+++ b/ossim/share/ossim/templates/orthoigen3.kwl
@@ -0,0 +1,49 @@
+//  This shows how to add tiling support to the output.
+// theTile mask here is only for show.   The output file added to the orthoigen 
+// is used as the mask for generating named tile files.
+//
+// Note:  When tiling is enabled any meter pixel overrides are ignored and is 
+// computed based on the tiling parameters.
+//
+
+igen.slave_tile_buffers: 10
+
+// Thirty km tiles with a pixel size of 15 meters:
+igen.tiling.delta: 15 15
+igen.tiling.delta_type: per_pixel
+igen.tiling.edge_to_edge: true
+igen.tiling.padding_size_in_pixels: 0 0
+igen.tiling.type: ossimTiling
+igen.tiling.tiling_distance: 30000 30000
+igen.tiling.tiling_distance_type: meters
+igen.tiling.tile_name_mask: tile_%r%_%c%
+
+
+object1.type:  ossimImageChain
+object1.description:
+object1.enabled:  1
+object1.id:  1
+object1.object1.description:  
+object1.object1.enabled:  1
+object1.object1.id:  2
+object1.object1.resampler.magnify_type:  nearest
+object1.object1.resampler.minify_type:  nearest
+object1.object1.type:  ossimImageRenderer
+
+//---
+// Example orthoigen command on Landsat7 scene:
+//---
+
+$ pwd
+/data1/test/data/public/ls7/p24r31
+
+// Tile data out:
+$ ossim-orthoigen -w tiff_tiled_band_separate --writer-prop pixel_type=area --utm --tiling-template t1.kwl l71024031_03119990929_hpn.fst tiles/t1.tif
+
+$ cd tiles
+
+// Move null edge tiles to image.null:
+$ for i in `ls *.tif`; do ossim-prune $i; done
+
+// Build overviews, histograms:
+$ ossim-preproc -o --ch *.tif
diff --git a/etc/templates/orthoigen4.kwl b/ossim/share/ossim/templates/orthoigen4.kwl
similarity index 100%
rename from etc/templates/orthoigen4.kwl
rename to ossim/share/ossim/templates/orthoigen4.kwl
diff --git a/etc/templates/orthoigenTilingTemplateByOutputBytes.kwl b/ossim/share/ossim/templates/orthoigenTilingTemplateByOutputBytes.kwl
similarity index 100%
rename from etc/templates/orthoigenTilingTemplateByOutputBytes.kwl
rename to ossim/share/ossim/templates/orthoigenTilingTemplateByOutputBytes.kwl
diff --git a/etc/templates/orthoigen_annotation_template.kwl b/ossim/share/ossim/templates/orthoigen_annotation_template.kwl
similarity index 100%
rename from etc/templates/orthoigen_annotation_template.kwl
rename to ossim/share/ossim/templates/orthoigen_annotation_template.kwl
diff --git a/etc/templates/orthoigen_srtm.kwl b/ossim/share/ossim/templates/orthoigen_srtm.kwl
similarity index 100%
rename from etc/templates/orthoigen_srtm.kwl
rename to ossim/share/ossim/templates/orthoigen_srtm.kwl
diff --git a/etc/templates/orthoigen_writer_template.kwl b/ossim/share/ossim/templates/orthoigen_writer_template.kwl
similarity index 100%
rename from etc/templates/orthoigen_writer_template.kwl
rename to ossim/share/ossim/templates/orthoigen_writer_template.kwl
diff --git a/etc/templates/ossim-batch-test-template.kwl b/ossim/share/ossim/templates/ossim-batch-test-template.kwl
similarity index 100%
rename from etc/templates/ossim-batch-test-template.kwl
rename to ossim/share/ossim/templates/ossim-batch-test-template.kwl
diff --git a/ossim/share/ossim/templates/ossim-chipper-color-table-template.kwl b/ossim/share/ossim/templates/ossim-chipper-color-table-template.kwl
new file mode 100644
index 0000000..fd98516
--- /dev/null
+++ b/ossim/share/ossim/templates/ossim-chipper-color-table-template.kwl
@@ -0,0 +1,85 @@
+// ---
+// This is a color lookup table that can be used with the ossim-chipper application.
+// Usage example:  
+// 
+// ossim-chipper --op color-relief --color-table color-relief-lut1.kwl --projection geo-scaled 
+//    -t 512 -w ossim_png N37W123.hgt outputs/basic-color-relief.png
+// ---
+
+number_of_entries:  25
+type:  ossimRgbLutDataObject
+entry0.b:  115
+entry0.g:  115
+entry0.r:  115
+entry1.b:  89
+entry1.g:  153
+entry1.r:  113
+entry2.b:  101
+entry2.g:  170
+entry2.r:  117
+entry3.b:  113
+entry3.g:  190
+entry3.r:  149
+entry4.b:  117
+entry4.g:  214
+entry4.r:  178
+entry5.b:  149
+entry5.g:  226
+entry5.r:  202
+entry6.b:  161
+entry6.g:  238
+entry6.r:  222
+entry7.b:  161
+entry7.g:  238
+entry7.r:  242
+entry8.b:  153
+entry8.g:  222
+entry8.r:  238
+entry9.b:  133
+entry9.g:  206
+entry9.r:  242
+entry10.b:  129
+entry10.g:  182
+entry10.r:  234
+entry11.b:  121
+entry11.g:  157
+entry11.r:  218
+entry12.b:  125
+entry12.g:  141
+entry12.r:  194
+entry13.b:  145
+entry13.g:  157
+entry13.r:  214
+entry14.b:  165
+entry14.g:  174
+entry14.r:  226
+entry15.b:  182
+entry15.g:  186
+entry15.r:  222
+entry16.b:  210
+entry16.g:  198
+entry16.r:  238
+entry17.b:  226
+entry17.g:  206
+entry17.r:  255
+entry18.b:  234
+entry18.g:  218
+entry18.r:  250
+entry19.b:  230
+entry19.g:  222
+entry19.r:  255
+entry20.b:  242
+entry20.g:  230
+entry20.r:  255
+entry21.b:  255
+entry21.g:  242
+entry21.r:  255
+entry22.b:  255
+entry22.g:  255
+entry22.r:  255
+entry23.b:  255
+entry23.g:  240
+entry23.r:  219
+entry24.b:  255
+entry24.g:  255
+entry24.r:  255
diff --git a/etc/templates/ossim-dem-example-commands.txt b/ossim/share/ossim/templates/ossim-dem-example-commands.txt
similarity index 100%
rename from etc/templates/ossim-dem-example-commands.txt
rename to ossim/share/ossim/templates/ossim-dem-example-commands.txt
diff --git a/ossim/share/ossim/templates/ossim_preferences_template b/ossim/share/ossim/templates/ossim_preferences_template
new file mode 100644
index 0000000..e2e35c8
--- /dev/null
+++ b/ossim/share/ossim/templates/ossim_preferences_template
@@ -0,0 +1,585 @@
+// ------------------------------------------------------------------------
+// 
+// Description:  ossim_preferences_template
+// 
+// This file will be automatically loaded by ossim applications provided the
+// environment variable "OSSIM_PREFS_FILE" is set to point to some form of 
+// this file.
+//
+// Note:  c++ comments "//" can be used to comment a line.
+//
+// To set the environment variable for automatic preference file loading:
+//
+// This assumes a preference file in your home called "ossim_preferences".
+// Typically this would be put in a dot file read at startup of a shell.
+//
+// tcsh and csh users:  setenv OSSIM_PREFS_FILE ~/ossim_preferences
+//
+// bash and sh users:   export OSSIM_PREFS_FILE=~/ossim_preferences
+// 
+// windoze users:       I'll have to look this up...
+//
+// You can also use the "-P <preference_file>" option at application startup.
+// where <preference_file> is full path and filename.
+//
+// Note that system environment variables found in this ossim preferences
+// file in the format "$(env_var_name)" will be expanded in place.
+//
+// To view your preferences use below command.  This is useful when trouble
+// shooting paths and so on:
+//
+// $ ossim-info --config
+// 
+// ------------------------------------------------------------------------
+
+//---
+// Elevation setup:
+//
+// Keyword pair: 
+// elevation_source.type
+// elevation_source.filename 
+// 
+// Indicates an elevation source.  These should be listed in pairs.  Numbering
+// should start with 0 with lowest number being the highest resolution.  This
+// can be a cell(file) or a directory.
+// 
+// There are four elevation_source.type types:
+// elevation_source.type: dted_directory
+// elevation_source.type: srtm_directory
+// elevation_source.type: general_raster_directory
+// 
+// The elevation_source.connection_string is a connection for your database.
+// Typically this is a directory location.
+// 
+// NOTES:
+// 
+// 1) Order dependent, i.e. ALWAYS put your highest resolution first.
+// 
+// 2) The elevation_source keyword replaces the deprecated keywords:
+// dted_directory
+// image_directory
+// srtm_directory
+// dted_cell 
+//
+// 3) We support bringing cells into memory for dted and srtm datasets.  You can also control the
+// number of open cells by specifying a min and max open cells.  If the number of cells opened
+// exceeds the maximum then it will shrink the active opened cells to the minumum.  We currently
+// use a least recently used algorithm.
+// 
+// 4) A good elevation source is the Shuttle Radar Topographic Mission(SRTM):
+//    http://srtm.usgs.gov/index.php
+
+// 5) Examples below are defaulted to some value.  To change enabled key to
+//    true, e.g.:
+//    elevation_manager.elevation_source0.enabled: true
+//    
+//---
+
+elevation_manager.elevation_source0.connection_string: $(OSSIM_DATA)/elevation/dted/level2
+elevation_manager.elevation_source0.enabled: true
+elevation_manager.elevation_source0.type: dted_directory
+elevation_manager.elevation_source0.min_open_cells: 25
+elevation_manager.elevation_source0.max_open_cells: 50
+elevation_manager.elevation_source0.memory_map_cells: false
+elevation_manager.elevation_source0.geoid.type: geoid1996
+
+elevation_manager.elevation_source1.connection_string: $(OSSIM_DATA)/elevation/srtm/1arc
+elevation_manager.elevation_source1.enabled: true
+elevation_manager.elevation_source1.type: srtm_directory
+elevation_manager.elevation_source1.min_open_cells: 25
+elevation_manager.elevation_source1.max_open_cells: 50
+elevation_manager.elevation_source1.memory_map_cells: false
+elevation_manager.elevation_source1.geoid.type: geoid1996
+
+elevation_manager.elevation_source2.connection_string: $(OSSIM_DATA)/elevation/dted/level1
+elevation_manager.elevation_source2.enabled: true
+elevation_manager.elevation_source2.type: dted_directory
+elevation_manager.elevation_source2.min_open_cells: 25
+elevation_manager.elevation_source2.max_open_cells: 50
+elevation_manager.elevation_source2.memory_map_cells: false
+elevation_manager.elevation_source2.geoid.type: geoid1996
+
+elevation_manager.elevation_source3.connection_string: $(OSSIM_DATA)/elevation/srtm/3arc
+elevation_manager.elevation_source3.enabled: true
+elevation_manager.elevation_source3.type: srtm_directory
+elevation_manager.elevation_source3.min_open_cells: 25
+elevation_manager.elevation_source3.max_open_cells: 50
+elevation_manager.elevation_source3.memory_map_cells: false
+elevation_manager.elevation_source3.geoid.type: geoid1996
+
+elevation_manager.elevation_source4.connection_string: $(OSSIM_DATA)/elevation/dted/level0
+elevation_manager.elevation_source4.enabled: true
+elevation_manager.elevation_source4.type: dted_directory
+elevation_manager.elevation_source4.min_open_cells: 25
+elevation_manager.elevation_source4.max_open_cells: 50
+elevation_manager.elevation_source4.memory_map_cells: true
+elevation_manager.elevation_source4.geoid.type: geoid1996
+
+// "image_directory" can be any type of image, i.e. tiff, nitf and so on.
+// elevation_manager.elevation_source5.connection_string: $(OSSIM_DATA)/elevation/some_dir
+// elevation_manager.elevation_source5.enabled: false
+// elevation_manager.elevation_source5.type: image_directory
+// elevation_manager.elevation_source5.min_open_cells: 25
+// elevation_manager.elevation_source5.max_open_cells: 50
+// elevation_manager.elevation_source5.memory_map_cells: false
+// elevation_manager.elevation_source5.geoid.type: geoid1996
+
+
+//---
+// Identity geoid is 0 everywhere, so MSL = Ellipsoid. Useful when DEM
+// provides posts relative to ellipsoid instead of customary MSL. This is
+// specific to each elev database:
+//---
+// elevation_manager.elevation_source3.geoid.type: identity
+
+//---
+// Default height above ellipsoid, for use when no elev data is present, 
+// instead of returning NAN:
+//---
+// elevation_manager.default_height_above_ellipsoid: 0.0
+
+// ---
+// This is n elevation offset that is added to the height returned from the
+// elevation manager.
+// if the value is nan then nothing is added.
+// ---
+//elevation_manager.elevation_offset: nan
+
+//---
+// Allows one to specify to the elevation manager to use the ellipsoid offset
+// as defined by the geoid manager if a getHeightAboveEllipsoid fails.
+//---
+elevation_manager.use_geoid_if_null: true
+
+//---
+// Keyword:  default_elevation_path
+// Default path for the elevation manager popup "Add" to start at.
+//---
+default_elevation_path: $(OSSIM_DATA)/elevation/dted/level2 
+// ---
+
+//---
+// Keyword:  elevation.enabled
+// If disabled calls to the elevation manager getHeightAboveMSL and 
+// getHeightAboveEllipsoid will return a null height.  (default=true)
+// Use: "true", "yes", "y" or "1" to enable, 
+//      "false", "no", "n" or "0" to disable.
+//---
+elevation_manager.enabled:  true
+
+//---
+// Keyword:  elevation.threads
+// Defines the number of instances of elevation databases to maintain for multithreading.
+// Can be boolean "yes" or "true" to use all available cores or an integer value for
+// custom experimentation. Set to "no" (or "false") or 1 for no multithreading capability. 
+// Default is "true".
+//---
+elevation_manager.threads: yes                 
+
+// ---
+// Location of datum grids:
+//
+// Snip from: http://www.ngs.noaa.gov/TOOLS/Nadcon/Nadcon.html
+// 
+// Advances in the accuracies now obtainable in geodetic surveys, specifically
+// through use of differential GPS, has allowed for the creation of state 
+// High Precision Geodetic Networks (HPGNs), also referred to as High Accuracy
+// Reference Networks (HARNs) throughout the country.
+// 
+// Latest ftp location(20100206):
+// ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon/
+//
+// ---
+// datum_grids: $(OSSIM_DATA)/ossim/elevation/nadcon-grids
+
+//---
+// Look-up tables for European Petroleum Survey Group (EPSG) coded 
+// projections and datums.
+// These are expected to be delimiter-separated value (*.csv|tsv) files.
+// NOTE: ESRI codes are NOT EPSG codes, however, they do not conflict with 
+// EPSG so ingesting them as if they were EPSG. Eventually, separate 
+// databases or a multi-Db solution may need to be 
+// implemented. OLK 05/2010
+// --- 
+epsg_database_file0: $(OSSIM_INSTALL_PREFIX)/share/ossim/projection/ossim_epsg_projections-v7_4.csv
+epsg_database_file1: $(OSSIM_INSTALL_PREFIX)/share/ossim/projection/ossim_harn_state_plane_epsg.csv
+epsg_database_file2: $(OSSIM_INSTALL_PREFIX)/share/ossim/projection/ossim_state_plane_spcs.csv
+epsg_database_file3: $(OSSIM_INSTALL_PREFIX)/share/ossim/projection/ossim_harn_state_plane_esri.csv
+
+// Database file for WKT-based projection factory:
+wkt_database_file: $(OSSIM_INSTALL_PREFIX)/share/ossim/projection/ossim_wkt_pcs.csv
+
+//---
+// Geoid support:
+// Note:  Since the sensor models do earth intersects at height above the 
+//        ellipsoid and the vertical datum of DTED is geoid_egm_96_grid, you
+//        should have a geoid grid in place for accurate earth intersections.
+//---
+
+//---
+// Generic geoid support:
+// Specifying a "geoid_manager.geoid_source0.type: geoid_image" uses an image handler
+// based geoid reader.  So this can be any type of image, i.e. tiff, raster, provided
+// it can be opened and a good image geometry is returned.
+// 
+// In the below example for geoid_manager.geoid_source0 an external geometry file was
+// created for Und_min1x1_egm2008_isw_equal_82_WGS84_TideFree_SE.ras.
+//---
+geoid_manager.geoid_source0.connection_string: $(OSSIM_DATA)/elevation/geoids/egm2008/Und_min1x1_egm2008_isw_equal_82_WGS84_TideFree_SE.ras
+geoid_manager.geoid_source0.enabled: true
+geoid_manager.geoid_source0.geoid.type: egm2008
+geoid_manager.geoid_source0.memory_map: false
+geoid_manager.geoid_source0.type: geoid_image
+
+//---
+// GEOID 99:  Set keyword to the directory containing the GEOID 99 grids.
+// 
+// Notes:  
+// - Grids MUST be in the native byte order.
+// - Can be downloaded from:
+// http://www.ngs.noaa.gov/GEOID/GEOID99
+// ---
+// geoid_99_directory:  $(OSSIM_DATA)/ele1/geoid/geoid99
+
+//---
+// Generic support has been added to each NGS geoid grid. You can download
+// ngs grids for 1999, 2003.
+// Current release only allows for a single directory we will allow for
+//  multiple directories later and auto detecting if possible.
+//
+// Currently the file names are hard coded and need to be from the NGS 
+// distribution also downloadable from ftp.remotesensing.org under
+// /ossim/test_data.tgz
+//---
+geoid_ngs_directory: $(OSSIM_DATA)/elevation/geoids/geoid99
+geoid_ngs_directory.byte_order: little_endian
+// geoid_ngs_directory.byte_order: big_endian
+
+//---
+// GEOID EGM 96:  Set keyword to the path to the egm96.grd
+// 
+// Notes:
+// - Grid must be in BIG ENDIAN (UNIX) format.
+// - Can be downloaded from svn:
+// svn co http://svn.osgeo.org/ossim/trunk/ossim_package_support/geoids geoids
+//---
+geoid_egm_96_grid: $(OSSIM_INSTALL_PREFIX)/share/ossim/geoids/geoid1996/egm96.grd
+
+//---
+// Location of other shared files can be accessed using this preference to permit 
+// specifying paths relative to it.
+//---
+ossim_share_directory: $(OSSIM_INSTALL_PREFIX)/ossim/share
+
+// ---
+// Font support:
+// NOTE:  To use the MapCompositionSource you must at least have "font.dir1"
+//        set to some default.
+// ---
+// font.file1: /usr/share/fonts/default/Type1/b018032l.pfb
+// font.dir1: /usr/share/fonts/default/Type1
+
+
+//---
+// OSSIM plugin support:
+//
+// Notes:  
+//
+// Notes:
+//
+// View plugins with:
+//
+// $ ossim-info --plugins
+//
+// To troubleshoot problems  embedded trace debug can be turned on using 
+// "ossimDynamic"
+//
+// $ ossim-info -T ossimDynamic --plugins 
+//
+// ossimDynamicLibrary::load DEBUG:
+// Loaded library:  /usr/local/lib/libossimpng_plugin.so
+// ossimDynamicLibrary::load DEBUG:
+// Loaded library:  /usr/local/lib/libossimgdal_plugin.so
+// ossimDynamicLibrary::load DEBUG:
+// Loaded library:  /usr/local/lib/libossimreg_plugin.so
+// ossimDynamicLibrary::load DEBUG:
+// Loaded library:  /usr/local/lib/libossimcontrib_plugin.so
+//
+// Keywords:
+//
+// plugin.dir1:  < directory where plugins are >
+//
+// you can also list by individual file names
+//
+// plugin.file1: < full path and file name >
+//---
+// Example, edit/uncomment as needed:
+plugin.file0: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimpng_plugin.so
+plugin.file5: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimkakadu_plugin.so
+plugin.file10: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimmrsid_plugin.so
+plugin.file15: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossim_plugin.so
+
+// Old hdf4/5 plugin:
+// plugin.file20: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimhdf_plugin.so
+
+// New split out hdf plugins
+plugin.file20: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimhdf5_plugin.so
+plugin.file23: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimhdf4_plugin.so
+
+plugin.file25: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimsqlite_plugin.so
+plugin.file30: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimlas_plugin.so
+plugin.file40: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimweb_plugin.so
+plugin.file45: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimkmlsuperoverlay_plugin.so
+plugin.file50: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimndf_plugin.so
+plugin.file55: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimgeopdf_plugin.so
+plugin.file60: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimopencv_plugin.so
+plugin.file65: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimgdal_plugin.so
+
+// plugin.file5: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimreg_plugin.so
+// plugin.file6: $(OSSIM_INSTALL_PREFIX)/lib64/ossim/plugins/libossimcontrib_plugin.so
+// 
+//
+// We also support a second style that allows one to pass options to any
+// plugins that support them
+// the options param is an embedded keywordlist that is surrounded by triple
+// quotes:
+// plugin0.file: <path to>/libossimkakadu_plugin
+// plugin0.options: """
+//                  read_factory.location: front
+//                  writer_factory.location: back
+//                  """
+//
+// END OSSIM plugin support
+//---
+
+// Toggles for recceVue application:
+statusLatLon: true
+statusHeight: true
+statusDatum: true
+statusGSD: true
+statusUpdateOnClick: true
+
+
+// ---
+// Keyword: cache_size
+// The cache size is in megabytes.
+// ---
+cache_size: 256
+// cache_size: 512
+// cache_size: 1024
+// cache_size: 2048
+
+
+// ---
+// Keyword: overview_stop_dimension
+//
+// Affects any overview building from img2rr, imagelinker, iview. Controls
+// the amount of resLevels created.  This is also used to control the amount
+// of levels the J2K writers use from the kakadu plugin.
+// 
+// This is the point where "img2rr" or the overview builder will stop 
+// decimating the image down.  So in other words, if the 
+// overview_stop_dimension keyword is 64, img2rr application will build 
+// overviews, decimating each level by 2 until both the width and height are 
+// less than or equal to 64.  Note the larger the dimension the less levels
+// created.
+// 
+// Uncomment one below.
+// ---
+overview_stop_dimension: 8
+// overview_stop_dimension: 16
+// overview_stop_dimension: 32
+// overview_stop_dimension: 64
+// overview_stop_dimension: 128
+// overview_stop_dimension: 256
+// overview_stop_dimension: 512
+
+// ---
+// Keyword: overview_builder.scan_for_min_max_null_if_float
+// 
+// Control overview sequencer scanning for min, max, nulls for float data. If
+// true and input data is float scalar type scanning will be performed and a
+// dot.omd file will be written with the min, max, nulls in it.
+// 
+// Type: boolean, set to true, false, 1, 0
+// 
+// CAUTION: Because the j2k overview builder requires the min/max up front for 
+// normalization this is NOT a good option to turn on.  In other word if you
+// are doing ossim-img2rr -r -t ossim_kakadu_nitf_j2k <float-image> you should
+// disable this and set the min/max with ossim-cmm(compute min max) or do it
+// manually.
+// ---
+// overview_builder.scan_for_min_max_null_if_float: true
+
+// ---
+// Keyword: tile_size
+//
+// Tile size x y
+//
+// Affects all ossim application.  This is the internal tile size of any
+// image chain unless overridden by the filter.
+// 
+// Notes: 
+// 1) OSSIM can handle any tile size; however it is best to use a size that
+// is a power of two.
+// 2) 
+// 
+// Uncomment one below.  
+// ---
+// tile_size: 32 32
+// tile_size: 64 64
+// tile_size: 128 128
+tile_size: 256 256
+// tile_size: 512 512
+// tile_size: 1024 1024
+
+
+// ---
+// Keyword: shapefile_colors_auto
+// 
+// Shape file colors set to automatic.
+// This is a boolean value.  If true pen and brush color of shape files will
+// be determined by indexing a color table in a round robin approach.  If set 
+// to true the auto colors override keywords for "pen" and "brush" color.
+// Default value if not found if "false".
+// 
+// Value can be: true, yes, y, 1, false, no, n or 0
+// ---
+shapefile_colors_auto: false
+
+// ---
+// Shape file pen color:
+// Three values for red, green and blue between 0 and 1.0 with 1.0 being 
+// brightness and 0.0 being black.
+// ---
+shapefile_normalized_rgb_pen_color: 0.004 1.0 0.004
+
+// ---
+// Shape file pen color:
+// Three values for red, green and blue between 0 and 1.0 with 1.0 being 
+// brightness and 0.0 being black.
+// ---
+shapefile_normalized_rgb_brush_color: 0.004 1.0 0.004
+
+// ---
+// Shape file point size:
+// Width and height for points in pixels.
+// ---
+shapefile_point_size: 6.0 6.0
+
+
+// --------------------------
+// Some keywords for the OSSIM GUI application
+//
+//
+// igen spec files output./  This is the directory location you would
+// like the igen export GUI to default to when outputing spec files
+ossim.igen_spec_output_directory: /work/gpotts/igen_test
+
+// this is the igen executable.  Make sure you put the full path
+ossim.igen_executable:  /work/gpotts/ossim/bin/igen
+
+// END keywords for OSSIM GUI
+//--------------------------
+
+// ---
+// Position Quality Evaluator (PQE) keywords. 
+// Note Circulay Error(CE) and Linear Error (LE)  units are in meters.
+// These keywords are for the imagelinker->image-window->PQE dialog box.
+// They allow the user to calculater position quality factoring in backdrop
+// and elevation uncertainty.
+// ---
+
+// Backdrop enter "name,ce90,le90" like "JOG-A,77,38".
+pqe_backdrop1: TLM50,31,25
+pqe_backdrop2: TLM100,61,25
+pqe_backdrop3: JOG-A,77,38
+pqe_backdrop4: TPC,613,47
+pqe_backdrop5: ONC,1226,93
+pqe_backdrop6: JNC,2452,187
+pqe_backdrop7: GNC,6129,465
+
+// Elevation enter "name,ce90,le90" like "SRTM_1ARC,20,16"
+// Accuracies vary widely depending on terrain and how they were computed.
+// These are just examples.
+pqe_elev1: SRTM_3ARC,20,16
+pqe_elev2: SRTM_1ARC,20,10
+pqe_elev3: DTED_LEVEL2,40,20
+pqe_elev4: DTED_LEVEL1,50,30
+pqe_elev5: RPC_No_DEM_State,-2,-1.6449
+// Special Case
+// RPC_No_DEM_State, Scale Divisor, 1-Sigma Divisor (minus signs required)
+
+pqe_normalized_rgb_ellipse_color: 0.004 1.0 0.004
+
+// End of PQE keywords...
+
+// ---
+// Log file support:  If set all output from ossimNotify to stdout and to 
+// stderr will be written to the log file.  Optionally users of ossim 
+// applications can use the "--ossim-logfile <some_file>" command line 
+// argument.  Note that the "--ossim-logfile" command line argument overrides
+// the preference setting.
+// 
+// Uncomment and set path to use log file:
+// ---
+// ossim.log.file: D:\tmp\ossim-log.txt
+
+// ---
+// Kakadu threads:
+// ---
+kakadu_threads: 4
+
+// ---
+// ossim threads:
+// ---
+ossim_threads: 4
+
+//---
+// Keyword for ingesting terrasar-x and radarsat-2 data. When TRUE, instructs
+// the sensor model to create an ossim coarse grid replacement model to
+// improve performance geometric_sar_sensor_model.create_ocg: true
+// Keyword parsed presently by orthoigen. If true, histograms will be
+// computed when needed for all images that do not yet have a histogram. 
+//---
+autogenerate_histogram: true
+
+//---
+// specify true or fals if you want the ossimInit to look in the current 
+// program path to see if any plugins are available.  Turn this off if you 
+// want to load them from a keyword list and remove the need to scan the 
+// directory for valid plugins
+//---
+ossim_init.auto_load_plugins: false
+
+//---
+// When true, indicates to orthoigen application that the specified cut
+// rectangle for the product shall be adjusted to fit the minimum bounding
+// valid image rect. This eliminates null exterior pixels when the cut rect
+// extends beyond the valid image rect. This preference can be overriden
+// by an option on the orthoigen command line. See the usage on orthoigen.
+// [default is false]
+//---
+orthoigen.clip_to_valid_rect: false
+
+//---
+// Specifies the preference for remapping null-valued pixels to 1 (min).
+// Possible settings are:
+// "none" -- Bypasses pixel flipper
+// "all_nulls" -- replaces any occurrence of the null value with 1. 
+//    Ex: (20,0,10) becomes (20,1,10), also (0,0,0) becomes (1,1,1)
+// "only_partial_nulls" -- 
+// replaces null-valued band only if another band is non-null.
+//    Ex: (20,0,10) becomes (20,1,10), but (0,0,0) is not remapped.
+// "all_bands_if_partial_null" -- 
+// Remaps all bands of a pixel if even one band is null.
+//    Ex: (20,0,10) becomes (1,1,1), but (0,0,0) is not remapped
+// "only_full_nulls" -- Remaps pixel only if all bands are null.
+//    Ex: (0,0,0) becomes (1,1,1), but (20,0,10) is not remapped
+//---
+orthoigen.flip_null_pixels: none
+
+// ---
+// NITF writer site configuration file:
+// ---
+// nitf_writer.site_configuration_file: $(OSSIM_DATA)/ossim/share/nitf-site-configuration.kwl
diff --git a/etc/templates/sample_applanix_camera.kwl b/ossim/share/ossim/templates/sample_applanix_camera.kwl
similarity index 100%
rename from etc/templates/sample_applanix_camera.kwl
rename to ossim/share/ossim/templates/sample_applanix_camera.kwl
diff --git a/etc/templates/shapefile_template.omd b/ossim/share/ossim/templates/shapefile_template.omd
similarity index 100%
rename from etc/templates/shapefile_template.omd
rename to ossim/share/ossim/templates/shapefile_template.omd
diff --git a/etc/templates/usgs_dem_template.kwl b/ossim/share/ossim/templates/usgs_dem_template.kwl
similarity index 100%
rename from etc/templates/usgs_dem_template.kwl
rename to ossim/share/ossim/templates/usgs_dem_template.kwl
diff --git a/ossim/share/ossim/templates/utm_projection_template.geom b/ossim/share/ossim/templates/utm_projection_template.geom
new file mode 100644
index 0000000..56411d8
--- /dev/null
+++ b/ossim/share/ossim/templates/utm_projection_template.geom
@@ -0,0 +1,44 @@
+//---------------------------------------------------------------------
+// $Id: utm_projection_template.geom 22468 2013-10-27 15:45:39Z dburken $
+//
+// Description:
+// This is a keyword list with minimum set of key words to make an
+// ossimUtmProjection.
+//---------------------------------------------------------------------
+
+
+//-----------------
+// Short version with code, tie and scale:
+// For codes reference: http://spatialreference.org/
+//-----------------
+pcs_code:  32616
+pixel_scale_units:  meters
+pixel_scale_xy:  ( 5.0, 5.0 )
+pixel_type:  point
+tie_point_units:  meters
+tie_point_xy:  ( 138425.0, 4738765.0 ) 
+
+
+//-----------------
+// Long version:
+//-----------------
+central_meridian:  -87.000000000000000
+datum:  WGE
+ellipse_code:  WE
+ellipse_name:  WGS 84
+false_easting_northing:  ( 500000.000000000000000, 0.000000000000000 )
+false_easting_northing_units:  meters
+hemisphere:  N
+major_axis:  6378137.000000000000000
+minor_axis:  6356752.314199999906123
+origin_latitude:  0.000000000000000
+pixel_scale_units:  meters
+pixel_scale_xy:  ( 5.0, 5.0 )
+
+// point(tie center of pixel) or area (tie upper left corner of pixel).
+pixel_type:  point
+
+tie_point_units:  meters
+tie_point_xy:  ( 138425.0, 4738765.0 )
+type:  ossimUtmProjection
+zone:  16
diff --git a/ossim/share/ossim/util/ossimHlzApi.json b/ossim/share/ossim/util/ossimHlzApi.json
new file mode 100644
index 0000000..342b7d9
--- /dev/null
+++ b/ossim/share/ossim/util/ossimHlzApi.json
@@ -0,0 +1,96 @@
+{
+    "name": "ossim-hlz",
+    "description": {
+        "version" : "1.00",
+        "short_description": "OSSIM HLZ Utility",
+        "long_description": "Utility for finding suitable helicopter landing zones surrounding a speciflzied target location."
+     },
+     "inputs": {
+        "dem": {
+            "datatype": "file:elevation",
+            "description": "Optional DEM file to use in lieu of default elevation database.",
+            "required": false    
+        },
+        "gsd": {
+            "datatype": "double:positive_range",
+            "description": "Product resolution in meters-per-pixel. Defaults to the best resolution of elevation files referenced.",
+            "required": false    
+        },
+        "lut": {
+            "datatype": "file:text",
+            "description": "Specifies the optional lookup table filename for mapping the single-band output image to an RGB. The LUT provided must be in the ossimIndexToRgbLutFilter format and must handle the three output viewshed values (see --values option).",
+            "required": false    
+        },
+        "point_cloud": {
+            "datatype": "file:geopackage",
+            "description": "Specifies ancillary point-cloud data for level-2 search for obstructions.",
+            "required": false    
+        },
+        "reticle": {
+            "datatype": "int:positive_range",
+            "description": "Size (in pixels) of reticle centered on observer's position. If non-zero, a border is drawn delineating the ROI.",
+            "required": false    
+        },
+        "rlz": {         
+            "datatype": "double:positive_range",
+            "description": "Radius of interest (meters)",
+            "required": true    
+        },
+        "roi": {         
+            "datatype": "double:positive_range",
+            "description": "Radius of interest surrounding the target (meters)",
+            "required": true    
+        },
+        "roughness": {         
+            "datatype": "double:positive_range",
+            "description": "Threshold for acceptable landing zone terrain roughness (meters).",
+            "required": false    
+        },
+        "slope": {         
+            "datatype": "double:positive_range",
+            "description": "Threshold for acceptable landing zone terrain slope (deg).",
+            "required": false    
+        },
+        "target": {         
+            "datatype": "geo_pos_2d",
+            "description": "Geographic position of target (lat-deg, lon-deg)",
+            "required": true   
+        },
+        "threat-domes": {
+            "datatype": "file:text",
+            "description": "Optional file containing threat dome specifications.",
+            "required": false    
+        },
+        "viewsheds": {
+            "datatype": "file:text",
+            "description": "Optional file containing specifications of observers used in identifying visible or hidden LZs.",
+            "required": false    
+        },
+        "bad_zone_index": {
+            "datatype": "int:byte_range",
+            "description": "Specifies the pixel values (0-255) for the pixels representing unsuitable terrain.",
+            "required": false    
+        },
+        "marginal_zone_index": {
+            "datatype": "int:byte_range",
+            "description": "Specifies the pixel values (0-255) for the pixels representing marginal terrain.",
+            "required": false    
+        },
+        "good_zone_index": {
+            "datatype": "int:byte_range",
+            "description": "Specifies the pixel values (0-255) for the pixels representing good terrain.",
+            "required": false    
+        },
+        "outputFile": {
+            "datatype": "url:wms",
+            "description": "The URL/filename of the WMS server where the file is now accessible",
+            "required": true
+        }
+    },
+    "outputs": { },
+    "ranges" : {
+       "azimuth_range": [ 0.0, 360.0 ],
+       "positive_range": [ 0, "+inf"],
+       "byte_range": [ 0, 255 ]
+    }
+}
diff --git a/ossim/share/ossim/util/ossimSlopeApi.json b/ossim/share/ossim/util/ossimSlopeApi.json
new file mode 100644
index 0000000..7deee65
--- /dev/null
+++ b/ossim/share/ossim/util/ossimSlopeApi.json
@@ -0,0 +1,39 @@
+{
+    "name": "ossim-slope",
+    "description": {
+        "version" : "1.00",
+        "short_description": "OSSIM Slope Utility",
+        "long_description": "Utility for computing the slope at each elevation post and generating corresponding slope image. The output scalar type is a normalized float with 1.0 = 90 degree angle from the local vertical. Optional 8-bit scalar type is available."   
+     },
+     "inputs": {
+        "dem": {
+            "datatype": "file:elevation",
+            "description": "DEM file to se in lieu of default elevation database.",
+            "required": false    
+        },
+        "lut": {
+            "datatype": "file:text",
+            "description": "Specifies the optional lookup table filename for mapping the single-band output image to an RGB. The LUT provided must be in the ossimIndexToRgbLutFilter format and must handle the three output viewshed values (see --values option).",
+            "required": false    
+        },
+        "roi": {         
+            "datatype": "double:positive_range",
+            "description": "Radius of interest (meters)",
+            "required": true    
+        },
+        "center": {         
+            "datatype": "geo_pos_2d",
+            "description": "Geographic position of center of area of interest (lat-deg, lon-deg)",
+            "required": true   
+        },
+        "outputFile": {
+            "datatype": "url:wms",
+            "description": "The URL/filename of the WMS server where the slope file will be accessible",
+            "required": true
+        }
+    },
+    "outputs": { },
+    "ranges" : { 
+        "positive_range": [ 0, "+inf"] 
+    }
+}
diff --git a/ossim/share/ossim/util/ossimViewshedApi.json b/ossim/share/ossim/util/ossimViewshedApi.json
new file mode 100644
index 0000000..26b7632
--- /dev/null
+++ b/ossim/share/ossim/util/ossimViewshedApi.json
@@ -0,0 +1,86 @@
+{
+    "name": "ossim-viewshed",
+    "description": {
+        "version" : "1.00",
+        "short_description": "OSSIM Viewshed Utility",
+        "long_description": "Utility for computing the viewshed from a given observer position for a specified area of interest."
+     },
+     "inputs": {
+        "radius": {         
+            "datatype": "double:positive_range",
+            "description": "Radius of interest (meters)",
+            "required": true    
+        },
+        "observer": {         
+            "datatype": "geo_pos_2d",
+            "description": "Geographic position of observer (lat-deg, lon-deg)",
+            "required": true   
+        },
+        "fovStart": {
+            "datatype": "int:azimuth_range",
+            "description": "FOV starting azimuth for clockwise sweep (deg).",
+            "required": false    
+        },
+        "fovEnd": {
+            "datatype": "int:azimuth_range",
+            "description": "FOV ending azimuth for clockwise sweep (deg).",
+            "required": false    
+        },
+        "dem": {
+            "datatype": "file:elevation",
+            "description": "Optional DEM file to se in lieu of default elevation database.",
+            "required": false    
+        },
+        "eyeHeight": {
+            "datatype": "double:positive_range",
+            "description": "eye height (meters)",
+            "datatype": "double:positive_range"
+        },
+        "gsd": {
+            "datatype": "double:positive_range",
+            "description": "Product resolution in meters-per-pixel. Defaults to the best resolution of elevation files referenced.",
+            "required": false    
+        },
+        "reticle": {
+            "datatype": "int:positive_range",
+            "description": "Size (in pixels) of reticle centered on observer's position. If non-zero, a border is drawn delineating the ROI.",
+            "required": false    
+        },
+        "lut": {
+            "datatype": "file:text",
+            "description": "Specifies the optional lookup table filename for mapping the single-band output image to an RGB. The LUT provided must be in the ossimIndexToRgbLutFilter format and must handle the three output viewshed values (see --values option).",
+            "required": false    
+        },
+        "visible_index": {
+            "datatype": "int:byte_range",
+            "description": "Specifies the pixel values (0-255) for the pixels representing visible terrain.",
+            "required": false    
+        },
+        "hidden_index": {
+            "datatype": "int:byte_range",
+            "description": "Specifies the pixel values (0-255) for the pixels representing hidden terrain.",
+            "required": false    
+        },
+        "reticle_index": {
+            "datatype": "int:byte_range",
+            "description": "Specifies the pixel values (0-255) to use for the reticle and borders.",
+            "required": false    
+        },
+        "outputFile": {
+            "datatype": "url:wms",
+            "description": "The URL/filename of the WMS server where the file is now accessible",
+            "required": true
+        },
+        "horizonFile": {
+            "datatype": "url:wms",
+            "description": "If specified, outputs the max elevation angles for all azimuths to specified URL/filename, for horizon profiling.",
+            "required": false    
+        }
+    },
+    "outputs": { },
+    "ranges" : {
+       "azimuth_range": [ 0.0, 360.0 ],
+       "positive_range": [ 0, "+inf"],
+       "byte_range": [ 0, 255 ]
+    }
+}
diff --git a/src/apps/CMakeLists.txt b/ossim/src/apps/CMakeLists.txt
similarity index 100%
rename from src/apps/CMakeLists.txt
rename to ossim/src/apps/CMakeLists.txt
diff --git a/ossim/src/apps/curl_apps/CMakeLists.txt b/ossim/src/apps/curl_apps/CMakeLists.txt
new file mode 100644
index 0000000..4cc94eb
--- /dev/null
+++ b/ossim/src/apps/curl_apps/CMakeLists.txt
@@ -0,0 +1,73 @@
+message( "************** Begin: CMAKE SETUP FOR ossim curl apps ******************" )
+
+cmake_minimum_required (VERSION 2.8)
+
+project(ossimcore)
+
+set(requiredLibs)
+
+# Get the library suffix for lib or lib64.
+get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)       
+if(LIB64)
+   set(LIBSUFFIX 64)
+else()
+   set(LIBSUFFIX "")
+endif()
+
+# OpenThreads - Required:
+find_package( OpenThreads )
+if( OPENTHREADS_FOUND )
+   include_directories( ${OPENTHREADS_INCLUDE_DIR} )
+   set( requiredLibs ${requiredLibs} ${OPENTHREADS_LIBRARY} )
+else( OPENTHREADS_FOUND )
+   message( FATAL_ERROR "Could not find required OpenThreads package!" )
+endif( OPENTHREADS_FOUND )
+
+find_package( CURL )
+if( CURL_FOUND )
+   include_directories( ${CURL_INCLUDE_DIR} )
+   set( requiredLibs ${requiredLibs} ${CURL_LIBRARY} )
+else( CURL_FOUND )
+   message(FATAL_ERROR "Could not find curl") 
+endif( CURL_FOUND )
+
+# Requires ossim:
+find_package(ossim)
+if (OSSIM_FOUND)
+   include_directories( ${OSSIM_INCLUDE_DIR} )
+   set(requiredLibs ${requiredLibs} ${OSSIM_LIBRARIES} )
+else(OSSIM_FOUND)
+   message(FATAL_ERROR "Could not find ossim")
+endif(OSSIM_FOUND)
+
+# Add our include...
+include_directories(".")
+
+message( STATUS "CURL_INCLUDE_DIR    = ${CURL_INCLUDE_DIR}" )
+message( STATUS "CURL_LIBRARY        = ${CURL_LIBRARY}" )
+message( STATUS "OPENTHREADS_LIBRARY = ${OPENTHREADS_LIBRARY}" )
+message( STATUS "OPENTHREADS_INCLUDE = ${OPENTHREADS_INCLUDE_DIR}" )
+message( STATUS "OSSIM_INCLUDE_DIR   = ${OSSIM_INCLUDE_DIR}" )
+message( STATUS "OSSIM_LIBRARIES     = ${OSSIM_LIBRARIES}" )
+message( STATUS "Required libs       = ${requiredLibs}" )
+
+# ---
+# omar-data-mgr app:
+# ---
+
+# Add the executable:
+add_executable(omar-data-mgr omar-data-mgr.cpp omarDataMgrUtil.cpp )
+
+# Set the output dir:
+set_target_properties(omar-data-mgr 
+                      PROPERTIES 
+                      RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${BUILD_RUNTIME_DIR}")
+
+# omar-data-mgr application links with required libs.
+target_link_libraries( omar-data-mgr ${requiredLibs} )
+
+# Install app:
+install( TARGETS omar-data-mgr
+         DESTINATION ${INSTALL_RUNTIME_DIR} )
+
+message( "************** End: CMAKE SETUP FOR ossim curl apps ******************" )
diff --git a/ossim/src/apps/curl_apps/omar-data-mgr.cpp b/ossim/src/apps/curl_apps/omar-data-mgr.cpp
new file mode 100644
index 0000000..8f05ab0
--- /dev/null
+++ b/ossim/src/apps/curl_apps/omar-data-mgr.cpp
@@ -0,0 +1,72 @@
+//---
+// File: omar-data-mrg.cpp
+//
+// License: See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+// 
+// Description: omar-data-mrg application for interfacing with OMAR
+// dataManager services, e.g. "add", "remove" raster via libcurl.
+//---
+
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/init/ossimInit.h>
+#include "omarDataMgrUtil.h"
+
+#include <iostream>
+using namespace std;
+
+int main(int argc, char *argv[])
+{
+   int rv = 0; // Return value.
+   
+   //---
+   // Get the arg count so we can tell if an arg was consumed by
+   // ossimInit::instance()->initialize
+   //---
+   int originalArgCount = argc;
+   
+   ossimArgumentParser ap(&argc, argv);
+
+   // Initialize ossim stuff, factories, plugin, etc.
+   ossimInit::instance()->initialize(ap);
+
+   //---
+   // Avoid going on if a global option was consumed by ossimInit::initialize
+   // like -V or --version option and the arg count is down to 1.
+   //---
+   if ( ( ap.argc() > 1 ) || ( ap.argc() == originalArgCount ) )
+   {
+      // Make the info object.
+      ossimRefPtr<omarDataMgrUtil> dm = new omarDataMgrUtil();
+
+      try
+      {
+         //---
+         // Initialize will take the options passed in and set things to output
+         // information for.
+         //
+         // omarDataMgrUtil::initialize can throw an exception.
+         //---
+         bool continue_after_init = dm->initialize(ap);
+
+         if ( continue_after_init )
+         {
+            // This does all the work...
+            rv = (int)dm->execute();
+         }
+      }
+      catch (const ossimException& e)
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
+         rv = 1;
+      }
+      
+   }  // End: if ( ( ap.argc() > 1 ) ...
+   
+   return rv;
+   
+} // End of main...
diff --git a/ossim/src/apps/curl_apps/omarDataMgrUtil.cpp b/ossim/src/apps/curl_apps/omarDataMgrUtil.cpp
new file mode 100644
index 0000000..6e27301
--- /dev/null
+++ b/ossim/src/apps/curl_apps/omarDataMgrUtil.cpp
@@ -0,0 +1,942 @@
+//----------------------------------------------------------------------------
+// File: omarDataMgrUtil.cpp
+// 
+// License: See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: omarDataMgrUtil class definition
+//
+// Utility class for processing images recursively and calling OMAR
+// services upon successful open.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include "omarDataMgrUtil.h"
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/util/ossimFileWalker.h>
+
+#include <curl/curl.h>
+#include <iomanip>
+#include <string>
+#include <vector>
+
+static std::string CLEAN_KW                    = "clean";
+static std::string DUMP_FILTERED_IMAGES_KW     = "dump_filtered_images";
+static std::string FALSE_KW                    = "false";
+static std::string FILE_KW                     = "file";
+static std::string OVERRIDE_FILTERED_IMAGES_KW = "override_filtered_images";
+static std::string SERVICE_KW                  = "service";
+static std::string THREADS_KW                  = "threads";
+static std::string TRUE_KW                     = "true";
+static std::string URL_KW                      = "url";
+
+// Static trace for debugging.  Use -T omarDataMgrUtil to turn on.
+static ossimTrace traceDebug = ossimTrace("omarDataMgrUtil:debug");
+
+omarDataMgrUtil::omarDataMgrUtil()
+   :
+   ossimReferenced(),
+   ossimFileProcessorInterface(),
+   m_kwl( new ossimKeywordlist() ),
+   m_fileWalker(0),
+   m_mutex(),
+   m_imageUtil(0),
+   m_errorStatus(0),
+   m_filteredImages(0)
+{
+}
+
+omarDataMgrUtil::~omarDataMgrUtil()
+{
+   if ( m_fileWalker )
+   {
+      delete m_fileWalker;
+      m_fileWalker = 0;
+   }
+}
+
+void omarDataMgrUtil::addArguments(ossimArgumentParser& ap)
+{
+   // Set the general usage:
+   ossimApplicationUsage* au = ap.getApplicationUsage();
+   ossimString usageString = ap.getApplicationName();
+   usageString += " [options] <service> <file(s)-or-directory-to-walk>";
+   au->setCommandLineUsage(usageString);
+
+   // Set the command line options:
+   au->addCommandLineOption("--clean", "Cleans/removes image file and associated files from file system if present.\n\"remove\" option only.\nLooks for associated files of image, e.g. .ovr, .his, .omd, .geom\nCAUTION: This command is irreversible once envoked!");
+   
+   au->addCommandLineOption("--dump-filtered-image-list", "Outputs list of filtered images.");
+
+   au->addCommandLineOption("--override-filtered-images", "Allows processing of file that is in the filtered image list.");
+   
+   au->addCommandLineOption("--threads", "<threads> The number of threads to use. (default=1) Note a default can be set in your ossim preferences file by setting the key \"ossim_threads\".");
+   
+   au->addCommandLineOption("--preproc", "Enables the use of the preproc utility to build overviews and histograms");
+
+   au->addCommandLineOption( "-u", "<url> URL, e.g. \"http://omar.osssim.org/omar\"\n(default= url \"http://localhost:8080/omar\"" );
+
+   ossimRefPtr<ossimImageUtil> imageUtil = new ossimImageUtil();
+   imageUtil->addOptions(au);
+   imageUtil = 0;
+   
+} // void omarDataMgrUtil::addArguments(ossimArgumentParser& ap)
+
+bool omarDataMgrUtil::initialize(ossimArgumentParser& ap)
+{
+   static const char M[] = "omarDataMgrUtil::initialize(ossimArgumentParser&)";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
+   }
+
+   bool result = true;
+
+   if ( (ap.argc() == 1) || ap.read("-h") || ap.read("--help") )
+   {
+      usage(ap);
+
+      // continue_after_init to false
+      result = false;
+   }
+   else
+   {
+      //---
+      // Start with clean options keyword list.
+      //---
+      m_kwl->clear();
+
+      while ( 1 ) //  While forever loop...
+      {
+         // Used throughout below:
+         std::string ts1;
+         ossimArgumentParser::ossimParameter sp1(ts1);
+
+         if( ap.read("--clean") )
+         {
+            addOption( CLEAN_KW, TRUE_KW );
+            if ( ap.argc() < 3 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--dump-filtered-image-list") )
+         {
+            setDumpFilteredImageListFlag( true );
+            if ( ap.argc() < 3 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--override-filtered-images") )
+         {
+            setOverrideFilteredImagesFlag( true );
+            if ( ap.argc() < 3 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--threads", sp1) )
+         {
+            m_kwl->addPair( THREADS_KW, ts1 );
+            if ( ap.argc() < 3 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("-u", sp1) )
+         {
+            m_kwl->addPair( URL_KW, ts1 );
+            if ( ap.argc() < 3 )
+            {
+               break;
+            }
+         }
+         
+         if( ap.read("--preproc"))
+         {
+            m_imageUtil = new ossimImageUtil();
+            m_imageUtil->initialize(ap);
+         }
+
+         if ( ap.argc() < 3 )
+         {
+            break;
+         }
+
+         // End of arg parsing.
+         ap.reportRemainingOptionsAsUnrecognized();
+         if ( ap.errors() )
+         {
+            ap.writeErrorMessages(ossimNotify(ossimNotifyLevel_NOTICE));
+            std::string errMsg = "Unknown option...";
+            throw ossimException(errMsg);
+         }
+
+         break; // Break from while forever.
+         
+      } // End while (forever) loop.
+      
+      if( ap.argc() > 2 )
+      {
+         // First arg should be service, e.g. "add", "remove".
+         std::string value = ap[1];
+         m_kwl->addPair( SERVICE_KW, value );
+
+         // Check for "clean" used with "add" and issue warning???
+         if ( getCleanFlag() && ( value == "add" ) )
+         {
+            ossimNotify(ossimNotifyLevel_NOTICE)
+               << "NOTICE: Using --clean with \"add\" service is illogical!\n";
+         }
+
+         // The remaining args should be files to process.
+         for (ossim_int32 i = 1; i < (ap.argc()-1); ++i)
+         {
+            ossimString kw = "file";
+            kw += ossimString::toString(i);
+            std::string value = ap[i+1];
+            m_kwl->addPair(kw.string(), value, true);
+         }
+      }
+      else
+      {
+         if ( getDumpFilterImagesFlag() )
+         {
+            // Caller wants to see filtered image names:
+            dumpFilteredImageList();
+         }
+         else
+         {
+            usage(ap);
+            result = false;
+         }
+      }
+
+   } // not usage
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "m_kwl:\n" << *(m_kwl.get()) << "\n"
+         << M << " exit result = " << (result?"true":"false")
+         << "\n";
+   }
+   
+   return result;
+}
+
+ossim_int32 omarDataMgrUtil::execute()
+{
+   static const char M[] = "omarDataMgrUtil::execute()";
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
+   }
+
+   if ( getDumpFilterImagesFlag() )
+   {
+      // Caller wants to see filtered image names:
+      if ( m_filteredImages.empty() )
+      {
+         initializeDefaultFilterList();
+      }
+      
+      dumpFilteredImageList();
+   }
+   
+   // Get the number of "file*" keywords.
+   ossim_uint32 fileCount = m_kwl->numberOf("file");
+
+   if ( fileCount )
+   {
+      if ( !m_fileWalker )
+      {
+         m_fileWalker = new ossimFileWalker();
+      }
+      
+      if ( !getOverrideFilteredImagesFlag() && m_filteredImages.empty() )
+      {
+         initializeDefaultFilterList();
+      }
+      
+      m_fileWalker->initializeDefaultFilterList();
+
+      //---
+      // Passing getNumberOfThreads() to ossimFileWalker::setNumberOfThreads was
+      // kicking up a coverity scan error:
+      // Passing tainted variable "this->getNumberOfThreads()" to a tainted sink.
+      // drb
+      //---
+      ossim_uint32 threads = getNumberOfThreads();
+      m_fileWalker->setNumberOfThreads( threads );
+
+      // Must set this so we can stop recursion on directory based images.
+      m_fileWalker->setWaitOnDirFlag( true );
+
+      // This links the file walker back to our "processFile" method.
+      m_fileWalker->setFileProcessor( this );
+      
+      // Wrap in try catch block as excptions can be thrown under the hood.
+      try
+      {
+         // Get the list of files passed to us:
+         std::vector<ossimFilename> files;
+         ossim_uint32 processedFiles = 0;;
+         ossim_uint32 i = 0;
+         while ( processedFiles < fileCount )
+         {
+            ossimString kw = FILE_KW;
+            kw += ossimString::toString(i);
+            std::string lookup = m_kwl->findKey( kw.string() );
+            if ( lookup.size() )
+            {
+               files.push_back( ossimFilename(lookup) );
+               ++processedFiles;
+            }
+            
+            ++i;
+            if ( i > (fileCount + 100) ) break;
+         }
+
+         // Process the files:
+         m_fileWalker->walk( files ); 
+      }
+      catch (const ossimException& e)
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "Caught exception: " << e.what() << endl;
+         setErrorStatus( ossimErrorCodes::OSSIM_ERROR );
+      }
+      
+   } // if ( fileCount )
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << M << " exit status: " << m_errorStatus << std::endl;
+   }
+   
+   // Zero is good, non zero is bad.
+   return m_errorStatus; 
+}
+
+//---
+// This method is called back by the ossimFileWalker::walk method for each file it finds that it
+// deems can be processed.
+//---
+void omarDataMgrUtil::processFile(const ossimFilename& file)
+{
+   static const char M[] = "omarDataMgrUtil::processFile";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << M << " entered...\n" << "\nfile:    " << file << "\n";
+   }
+   
+   if ( file.size() )
+   {
+      bool processFileFlag = true;
+      if ( !getOverrideFilteredImagesFlag() )
+      {
+         processFileFlag = !isFiltered( file );
+      }
+      
+      if ( processFileFlag )
+      {
+         omarDataMgrUtil::OmarDataMgrUtilService service = getService();
+
+         if ( service == omarDataMgrUtil::ADD_RASTER )
+         {
+            callAddRasterService( file );
+         }
+         else if ( service == omarDataMgrUtil::REMOVE_RASTER )
+         {
+            callRemoveRasterService( file );
+         }
+         else
+         {
+            std::string s;
+            getService( s );
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "Unhandled service: " << s << "\n";
+         }
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << "Filtered file, not processing: " << file << std::endl;
+      }
+      
+   } // Matches: if ( file.size() )
+   
+   
+   if(traceDebug())
+   {
+      // Since ossimFileWalker is threaded output the file so we know which job exited.
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << "\nfile: " << file << "\nexited...\n";
+   }
+   
+} // End: omarDataMgrUtil::processFile(const ossimFilename& file)
+
+void omarDataMgrUtil::usage(ossimArgumentParser& ap)
+{
+   // Add global usage options.
+   ossimInit::instance()->addOptions(ap);
+   
+   // Set app name.
+   ap.getApplicationUsage()->setApplicationName(ap.getApplicationName());
+
+   // Add options.
+   addArguments(ap);
+   
+   // Write usage.
+   ap.getApplicationUsage()->write(ossimNotify(ossimNotifyLevel_INFO));
+   
+   ossimNotify(ossimNotifyLevel_INFO)
+      << "\nValid services: \"add\" and \"remove\"."
+      << "\nExample usage:\n\n"
+
+      << "Using default url \"http://localhost:8080/omar\":\n"
+      << ap.getApplicationName()
+      << " add 5V090205M0001912264B220000100072M_001508507.ntf\n\n"
+
+      << "Passing in url:\n"
+      << ap.getApplicationName()
+      << " -u http://your_url/omar add 5V090205M0001912264B220000100072M_001508507.ntf\n\n"
+
+      << "Adding all images in a directory using 32 threads:\n"
+      << ap.getApplicationName()
+      << " --threads 32 add /data1/imagery/2015/09/28/0000\n\n"
+      
+      << "Removing file from database:\n"
+      << ap.getApplicationName()
+      << " remove 5V090205M0001912264B220000100072M_001508507.ntf\n\n"
+
+      << "Removing file from database and file system:\n"
+      << ap.getApplicationName()
+      << " --clean remove 5V090205M0001912264B220000100072M_001508507.ntf\n\n"
+
+      << "Removing all images in a directory using 32 threads:\n"
+      << ap.getApplicationName()
+      << " --clean --threads 32 remove /data1/imagery/2015/09/28/0000\n"
+
+      << std::endl;
+}
+
+// Private method:
+bool omarDataMgrUtil::isDirectoryBasedImage(const ossimImageHandler* ih) const
+{
+   bool result = false;
+   if ( ih )
+   {
+      // Get the image handler name.
+      ossimString imageHandlerName = ih->getClassName();
+      if ( (imageHandlerName == "ossimAdrgTileSource") ||
+           (imageHandlerName == "ossimCibCadrgTileSource") )  
+      {
+         result = true;
+      }
+   }
+   return result;
+}
+
+void omarDataMgrUtil::setNumberOfThreads( ossim_uint32 threads )
+{
+   addOption( THREADS_KW, threads );
+}
+
+void omarDataMgrUtil::setNumberOfThreads( const std::string& threads )
+{
+   addOption( THREADS_KW, threads );
+}
+
+ossim_uint32 omarDataMgrUtil::getNumberOfThreads() const
+{
+   ossim_uint32 result = 1;
+   std::string lookup = m_kwl->findKey( THREADS_KW );
+   if ( lookup.size() )
+   {
+      result = ossimString(lookup).toUInt32();
+   }
+   else
+   {
+      result = ossim::getNumberOfThreads();
+   }
+   return result;
+}
+
+void omarDataMgrUtil::addOption( const std::string& key, ossim_uint32 value )
+{
+   addOption( key, ossimString::toString( value ).string() );
+}
+
+void omarDataMgrUtil::addOption(  const std::string& key, const std::string& value )
+{
+   m_mutex.lock();
+   if ( m_kwl.valid() )
+   {
+      if ( key.size() && value.size() )
+      {
+         m_kwl->addPair( key, value );
+      }
+   }
+   m_mutex.unlock();
+}
+
+void omarDataMgrUtil::setErrorStatus( ossim_int32 status )
+{
+   m_mutex.lock();
+   m_errorStatus = status;
+   m_mutex.unlock();
+}
+
+omarDataMgrUtil::OmarDataMgrUtilService omarDataMgrUtil::getService() const
+{
+   omarDataMgrUtil::OmarDataMgrUtilService service = omarDataMgrUtil::UNKNOWN;
+   
+   std::string value = m_kwl->findKey( SERVICE_KW );
+   if ( value.size() )
+   {
+      ossimString s = value;
+      s.downcase();
+
+      if ( s == "add" )
+      {
+         service = omarDataMgrUtil::ADD_RASTER;
+      }
+      else if ( (s == "remove") || (s == "rm") || (s == "delete") || (s == "erase") )
+      {
+         service = omarDataMgrUtil::REMOVE_RASTER;
+      }
+   }
+
+   return service;
+}
+
+void omarDataMgrUtil::getService(std::string& serviceString) const
+{
+   omarDataMgrUtil::OmarDataMgrUtilService service = getService();
+   
+   if ( service == omarDataMgrUtil::ADD_RASTER )
+   {
+      serviceString = "/dataManager/addRaster";
+   }
+   else if ( service == omarDataMgrUtil::REMOVE_RASTER )
+   {
+      serviceString = "/dataManager/removeRaster";
+   }
+   else
+   {
+      serviceString.clear();
+   }
+}
+
+void omarDataMgrUtil::getUrl( std::string& url ) const
+{
+   url = m_kwl->findKey( URL_KW );
+   if ( url.empty() )
+   {
+      url = "http://localhost:8080/omar"; // default url
+   }
+}
+
+bool omarDataMgrUtil::callAddRasterService( const ossimFilename& file )
+{
+   static const char M[] = "omarDataMgrUtil::callAddRasterService";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << M << " entered...\n" << "\nfile:    " << file << "\n";
+   }
+   
+   bool result = false;
+
+   // Must be able to open:
+   m_mutex.lock();
+   ossimRefPtr<ossimImageHandler> ih =
+      ossimImageHandlerRegistry::instance()->open(file, true, true);
+   m_mutex.unlock();
+   
+   if ( ih.valid() && !ih->hasError() )
+   {
+      if ( isDirectoryBasedImage( ih.get() ) )
+      {
+         // Tell the walker not to recurse this directory.
+         m_mutex.lock();
+         m_fileWalker->setRecurseFlag(false);
+         m_mutex.unlock();
+      }
+            
+      // Must have geometry:
+      ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
+      if( geom.valid() )
+      {
+         // Geometry object must have a valid projection:
+         ossimRefPtr<ossimProjection> proj = geom->getProjection();
+         if ( proj.valid() )
+         {
+            ossimNotify(ossimNotifyLevel_NOTICE)
+               << "Processing file: " << file << std::endl;
+
+            if( m_imageUtil.valid() )
+            {
+               m_imageUtil->processFile(file);
+            }
+            
+            std::string service;
+            getService( service );
+            
+            std::string url;
+            getUrl( url );
+            
+            if ( service.size() && url.size() )
+            {
+               CURL* curl = curl_easy_init();
+               if ( curl )
+               {
+                  // Data for POST:
+                  std::string data = std::string("filename=") + file.string();
+                  curl_easy_setopt( curl, CURLOPT_POSTFIELDS, data.c_str() );
+                  
+                  // Create the URL string:
+                  std::string urlString = url + service;
+                  curl_easy_setopt( curl, CURLOPT_URL, urlString.c_str() );
+                  
+                  ossimNotify(ossimNotifyLevel_INFO)
+                     << "data: " << data 
+                     << "\nurl: " << urlString.c_str()
+                     << std::endl;
+                  
+                  // Tell libcurl to follow redirection
+                  curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+                  
+                  // Run it:
+                  CURLcode res = curl_easy_perform(curl);
+                  
+                  // Check for errors:
+                  if ( res == CURLE_OK )
+                  {
+                     // Response code of the http transaction:
+                     long respcode; 
+                     res = curl_easy_getinfo(curl,CURLINFO_RESPONSE_CODE, &respcode);
+                     if ( res == CURLE_OK )
+                     {
+                        if ( respcode == 200 ) //  OK 200 "The request was fulfilled."
+                        {
+                           result = true; // Set return status for caller.
+                        }
+                     }
+                  }
+                  else
+                  {
+                     ossimNotify(ossimNotifyLevel_WARN)
+                        << "curl_easy_perform() failed: \n"
+                        << curl_easy_strerror(res)
+                        << std::endl;
+                     setErrorStatus( (ossim_int32)res );
+                  }
+                  
+                  ossimNotify(ossimNotifyLevel_WARN) << std::endl;
+                  
+                  // Always cleanup:
+                  curl_easy_cleanup(curl);
+               }
+               
+               // Cleanup curl:
+               curl_global_cleanup();
+            
+            } // Matches: if ( url.size() )
+
+         }
+         else
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << M << "\nCould create projection for: " << file << std::endl;
+         }
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << M << "\nCould create geometry for: " << file << std::endl;
+      }  
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << M << "\nCould not open: " << file << std::endl;
+   }
+   
+   if(traceDebug())
+   {
+      // Since ossimFileWalker is threaded output the file so we know which job exited.
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << "\nfile: " << file << "\nexited...\n";
+   }
+   
+   return result;
+   
+} // End: omarDataMgrUtil::callAddRasterService( file )
+
+bool omarDataMgrUtil::callRemoveRasterService( const ossimFilename& file )
+{
+   static const char M[] = "omarDataMgrUtil::callRemoveRasterService";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << M << " entered...\n" << "\nfile:    " << file << "\n";
+   }
+   
+   bool result = false;
+   
+   std::string service;
+   getService( service );
+   
+   std::string url;
+   getUrl( url );
+   
+   if ( service.size() && url.size() )
+   {
+      CURL* curl = curl_easy_init();
+      if ( curl )
+      {
+         // Data for POST:
+         std::string data = std::string("filename=") + file.string();
+         curl_easy_setopt( curl, CURLOPT_POSTFIELDS, data.c_str() );
+         
+         // Create the URL string:
+         std::string urlString = url + service;
+         curl_easy_setopt( curl, CURLOPT_URL, urlString.c_str() );
+         
+         ossimNotify(ossimNotifyLevel_INFO)
+            << "data: " << data 
+            << "\nurl: " << urlString.c_str()
+            << std::endl;
+         
+         // Tell libcurl to follow redirection
+         curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+         
+         // Run it:
+         CURLcode res = curl_easy_perform(curl);
+         
+         // Check for errors:
+         if ( res == CURLE_OK )
+         {
+            // Response code of the http transaction:
+            long respcode; 
+            res = curl_easy_getinfo(curl,CURLINFO_RESPONSE_CODE, &respcode);
+            if ( res == CURLE_OK )
+            {
+               if ( respcode == 200 ) //  OK 200 "The request was fulfilled."
+               {
+                  result = true; // Set return status for caller.
+
+                  // Check for clean flag:
+                  if ( getCleanFlag() )
+                  {
+                     clean( file );
+                  }
+               }
+            }
+         }
+         else
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "curl_easy_perform() failed: \n"
+               << curl_easy_strerror(res)
+               << std::endl;
+            setErrorStatus( (ossim_int32)res );
+         }
+         
+         ossimNotify(ossimNotifyLevel_WARN) << std::endl;
+         
+         // Always cleanup:
+         curl_easy_cleanup(curl);
+      }
+      
+      // Cleanup curl:
+      curl_global_cleanup();
+      
+   } // Matches: if ( service.size() )
+   
+   if(traceDebug())
+   {
+      // Since ossimFileWalker is threaded output the file so we know which job exited.
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << "\nfile: " << file << "\nexited...\n";
+   }
+   
+   return result;
+      
+} // End: omarDataMgrUtil::callRemoveRasterService( file, clean )
+
+
+void omarDataMgrUtil::clean( const ossimFilename& file ) const
+{
+   // Remove files from disk:
+   ossimFilename f = file;
+   
+   // Base image file:
+   if ( f.exists() )
+   {
+      ossimNotify(ossimNotifyLevel_NOTICE) << "Removing file: " << f << "\n";
+      ossimFilename::remove( f );
+   }
+   
+   // Overview:
+   ossimString e = "ovr";
+   f.setExtension( e );
+   if ( f.exists() )
+   {
+      ossimNotify(ossimNotifyLevel_NOTICE) << "Removing file: " << f << "\n";
+      ossimFilename::remove( f );
+   }
+
+   // Histogram:
+   e = "his";
+   f.setExtension( e );
+   if ( f.exists() )
+   {
+      ossimNotify(ossimNotifyLevel_NOTICE) << "Removing file: " << f << "\n";
+      ossimFilename::remove( f );
+   }
+   
+   // Omd file:
+   e = "omd";
+   f.setExtension( e );
+   if ( f.exists() )
+   {
+      ossimNotify(ossimNotifyLevel_NOTICE) << "Removing file: " << f << "\n";
+      ossimFilename::remove( f );
+   }
+}
+
+bool omarDataMgrUtil::isFiltered(const ossimFilename& file) const
+{
+   bool result = false;
+   if ( file.size() )
+   {
+      // Strip full path to base name.
+      std::string baseName = file.file().string();
+      if ( baseName.size() )
+      {
+         std::vector<std::string>::const_iterator i = m_filteredImages.begin();
+         while ( i != m_filteredImages.end() )
+         {
+            if ( baseName == (*i) )
+            {
+               result = true;
+               break;
+            }
+            ++i;
+         }
+      }
+   }
+#if 0 /* Please leave for debug. (drb) */
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimFileWalker::isFiltered file " << (result?"filtered: ":"not filtered: ")
+         << file << "\n";
+   }
+#endif
+   
+   return result;
+}
+
+bool omarDataMgrUtil::keyIsTrue( const std::string& key ) const
+{
+   bool result = false;
+   if ( m_kwl.valid() )
+   {
+      std::string value = m_kwl->findKey( key );
+      if ( value.size() )
+      {
+         result = ossimString(value).toBool();
+      }
+   }
+   return result;
+}
+
+const std::vector<std::string>& omarDataMgrUtil::getFilteredImages() const
+{
+   return m_filteredImages;
+}
+
+std::vector<std::string>& omarDataMgrUtil::getFilteredImages()
+{
+   return m_filteredImages;
+}
+
+void omarDataMgrUtil::initializeDefaultFilterList()
+{
+   m_mutex.lock();
+
+   // Common images to filter out, put most common first.
+   m_filteredImages.push_back(std::string("icon.jpg"));
+   m_filteredImages.push_back(std::string("logo.jpg"));
+   m_filteredImages.push_back(std::string("preview.jpg"));
+   
+   m_mutex.unlock();
+}
+
+void omarDataMgrUtil::dumpFilteredImageList() const
+{
+   ossimNotify(ossimNotifyLevel_NOTICE) << "Filtered image list:\n";
+
+   std::vector<std::string>::const_iterator i = m_filteredImages.begin();
+   while ( i != m_filteredImages.end() )
+   {
+      ossimNotify(ossimNotifyLevel_NOTICE) << (*i) << "\n";
+      ++i;
+   }
+
+   ossimNotify(ossimNotifyLevel_NOTICE) << std::endl;
+}
+
+void omarDataMgrUtil::setDumpFilteredImageListFlag( bool flag )
+{
+   // Add this for hasRequiredOverview method.
+   std::string key   = DUMP_FILTERED_IMAGES_KW;
+   std::string value = ( flag ? TRUE_KW : FALSE_KW );
+   addOption( key, value );
+}
+
+bool omarDataMgrUtil::getDumpFilterImagesFlag() const
+{
+   return keyIsTrue( DUMP_FILTERED_IMAGES_KW );
+}
+
+bool omarDataMgrUtil::getCleanFlag() const
+{
+   return keyIsTrue( CLEAN_KW );
+}
+
+void omarDataMgrUtil::setOverrideFilteredImagesFlag( bool flag )
+{
+   std::string key   = OVERRIDE_FILTERED_IMAGES_KW;
+   std::string value = ( flag ? TRUE_KW : FALSE_KW );
+   addOption( key, value );
+}
+
+bool omarDataMgrUtil::getOverrideFilteredImagesFlag() const
+{
+   return keyIsTrue( OVERRIDE_FILTERED_IMAGES_KW );
+}
diff --git a/ossim/src/apps/curl_apps/omarDataMgrUtil.h b/ossim/src/apps/curl_apps/omarDataMgrUtil.h
new file mode 100644
index 0000000..918678e
--- /dev/null
+++ b/ossim/src/apps/curl_apps/omarDataMgrUtil.h
@@ -0,0 +1,269 @@
+//----------------------------------------------------------------------------
+// File: omarDataMgrUtil.h
+// 
+// License: See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: omarDataMgrUtil
+//
+// See class descriptions below for more.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#ifndef omarDataMgrUtil_HEADER
+#define omarDataMgrUtil_HEADER 1
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimFileProcessorInterface.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/util/ossimImageUtil.h>
+
+#include <OpenThreads/Mutex>
+#include <ostream>
+#include <vector>
+
+class ossimArgumentParser;
+class ossimFileWalker;
+class ossimGpt;
+class ossimImageHandler;
+class ossimPropertyInterface;
+
+/**
+ * @brief omarDataMgrUtil class.
+ *
+ * Utility class for processing images recursively and calling OMAR
+ * dataManager services upon successful open.
+ */
+class omarDataMgrUtil :
+   public ossimReferenced, public ossimFileProcessorInterface
+{
+public:
+
+   enum OmarDataMgrUtilService
+   {
+      UNKNOWN       = 0,
+      ADD_RASTER    = 1,
+      REMOVE_RASTER = 2
+   };
+   
+   /** default constructor */
+   omarDataMgrUtil();
+
+   /** virtual destructor */
+   virtual ~omarDataMgrUtil();
+
+   /**
+    * @brief Adds application arguments to the argument parser.
+    * @param ap Parser to add to.
+    */
+   void addArguments(ossimArgumentParser& ap);
+
+   /**
+    * @brief Initial method.
+    *
+    * Typically called from application prior to execute.  This parses
+    * all options and put in keyword list m_kwl.
+    * 
+    * @param ap Arg parser to initialize from.
+    *
+    * @return true, indicating process should continue with execute.
+    */
+   bool initialize(ossimArgumentParser& ap);
+
+   /**
+    * @brief Execute method.
+    *
+    * This launches file walking mechanism.
+    *
+    * @return int, 0 = good, non-zero something happened.  Because this can
+    * process multiple files a non-zero return may indicate just one file
+    * did not complete, e.g. building overviews.
+    * 
+    * @note Throws ossimException on error.
+    */
+   ossim_int32 execute();
+
+   /**
+    * @brief ProcessFile method.
+    *
+    * Satisfies pure virtual ossimFileProcessorInterface::processFile.
+    *
+    * This method is linked to the ossimFileWalker::walk method via a callback
+    * mechanism.  It is called by the ossimFileWalk (caller).  In turn this
+    * class (callee) calls ossimFileWalker::setRecurseFlag and
+    * ossimFileWalker::setAbortFlag to control the waking process.
+    * 
+    * @param file to process.
+    */
+   virtual void processFile(const ossimFilename& file);
+   
+   /**
+    * @brief Set number of threads to use.
+    *
+    * This is only used in execute method if a directory is given to
+    * application to walk.
+    *
+    * @param threads Defaults to 1 if THREADS_KW is not found.
+    */
+   void setNumberOfThreads( ossim_uint32 threads );
+   void setNumberOfThreads( const std::string& threads );
+
+   /** @return The list of filtered out files. */
+   const std::vector<std::string>& getFilteredImages() const;
+
+   /**
+    * @brief Non const method to allow access for
+    * adding or deleting extensions from the list.
+    *
+    * The list is used by the private isFiltered method to avoid trying to
+    * process unwanted files.
+    */
+   std::vector<std::string>& getFilteredImages();
+
+private:
+
+   /** @return service as enumerated type. */
+   omarDataMgrUtil::OmarDataMgrUtilService getService() const;
+
+   /** @brief Gets service string, e.g. /dataManager/addRaster. */
+   void getService(std::string& serviceString) const;
+
+   /** @brief Gets url string, e.g. http://localhost:8080/omar */
+   void getUrl(std::string& url) const;
+
+   /**
+    * @brief Runs the curl command to call addRaster service.
+    * @param file Image file.
+    * @return true if http status code of 200(OK); else, false
+    */
+   bool callAddRasterService( const ossimFilename& file );
+
+   /**
+    * @brief Runs the curl command to call removeRaster service.
+    * @param file Image file.
+    * @return true if http status code of 200(OK); else, false
+    */
+   bool callRemoveRasterService( const ossimFilename& file );
+
+   /**
+    * @brief Removes files from disk.
+    *
+    * Triggered by the --clean option.
+    * 
+    * Given: 
+    * base file = foo.ntf
+    *
+    * Currently removes:
+    * foo.ntf
+    * foo.ovr
+    * foo.his
+    * foo.omd
+    *
+    * There are no checks for multi-entry images or directory based image
+    * files.
+    */
+   void clean( const ossimFilename& file ) const;
+
+   /**
+    * @brief Convenience method to check file to see is if file should be
+    * processed.
+    *
+    * @param f File to check.
+    * 
+    * @return true if f is in filter list, false if not.
+    */
+   bool isFiltered(const ossimFilename& f) const;
+   
+   /**
+    * @brief Initializes the filter list with a default set of filtered out
+    * file names.
+    */
+   void initializeDefaultFilterList();
+
+   /** @brief Dumps filtered image list to std out. */
+   void dumpFilteredImageList() const;
+   
+   /** @brief Initializes arg parser and outputs usage. */
+   void usage(ossimArgumentParser& ap);
+   
+   /**
+    * @return Threads to use.  Defaults to 1 if THREADS_KW is not found.
+    */
+   ossim_uint32 getNumberOfThreads() const;
+
+   /**
+    * @brief Adds option to m_kwl with mutex lock.
+    * @param key
+    * @param value
+    */
+   void addOption( const std::string& key, ossim_uint32 value );
+   void addOption( const std::string& key, const std::string& value );
+   
+   /**
+    * @brief Sets the m_errorStatus for return on execute.
+    */
+   void setErrorStatus( ossim_int32 status );
+
+   /**
+    * @brief Sets the dump filteredImageList flag.
+    * @param flag
+    */
+   void setDumpFilteredImageListFlag( bool flag );
+   
+   /**
+    * @return true if DUMP_FILTERED_IMAGES_KW key is found and value is true; else,
+    * false.
+    * 
+    * DUMP_FILTERED_IMAGES_KW = "dump_filtered_images"
+    */
+   bool getDumpFilterImagesFlag() const;
+
+   /**
+    * @return true if CLEAN_KW key is found and value is true; else,
+    * false.
+    * 
+    * CLEAN_KW = "clean"
+    */
+   bool getCleanFlag() const;
+
+   /**
+    * @brief Sets the override filtered images flag.
+    * @param flag
+    */
+   void setOverrideFilteredImagesFlag( bool flag );
+   
+   /**
+    * @return true if DUMP_FILTERED_IMAGES_KW key is found and value is true; else,
+    * false.
+    * 
+    * DUMP_FILTERED_IMAGES_KW = "dump_filtered_images"
+    */
+   bool getOverrideFilteredImagesFlag() const;
+
+   /**
+    * @return true if file is a directory based image and the stager should go
+    * on to next directory; false if stager should continue with directory.
+    */
+   bool isDirectoryBasedImage(const ossimImageHandler* ih) const;
+
+   /** @return true if key is set to true; false, if not. */
+   bool keyIsTrue( const std::string& key ) const;
+   
+   /** Holds all options passed into intialize except writer props. */
+   ossimRefPtr<ossimKeywordlist> m_kwl;
+
+   ossimFileWalker*   m_fileWalker;
+   OpenThreads::Mutex m_mutex;
+
+   ossimRefPtr<ossimImageUtil> m_imageUtil;
+   ossim_int32 m_errorStatus;
+
+   /** Hold images we never want to process. */
+   std::vector<std::string> m_filteredImages; 
+};
+
+#endif /* #ifndef omarDataMgrUtil_HEADER */
diff --git a/src/apps/ossim-adrg-dump/CMakeLists.txt b/ossim/src/apps/ossim-adrg-dump/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-adrg-dump/CMakeLists.txt
rename to ossim/src/apps/ossim-adrg-dump/CMakeLists.txt
diff --git a/src/apps/ossim-adrg-dump/Makefile b/ossim/src/apps/ossim-adrg-dump/Makefile
similarity index 100%
rename from src/apps/ossim-adrg-dump/Makefile
rename to ossim/src/apps/ossim-adrg-dump/Makefile
diff --git a/src/apps/ossim-adrg-dump/ossim-adrg-dump.cpp b/ossim/src/apps/ossim-adrg-dump/ossim-adrg-dump.cpp
similarity index 100%
rename from src/apps/ossim-adrg-dump/ossim-adrg-dump.cpp
rename to ossim/src/apps/ossim-adrg-dump/ossim-adrg-dump.cpp
diff --git a/src/apps/ossim-applanix2ogeom/CMakeLists.txt b/ossim/src/apps/ossim-applanix2ogeom/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-applanix2ogeom/CMakeLists.txt
rename to ossim/src/apps/ossim-applanix2ogeom/CMakeLists.txt
diff --git a/src/apps/ossim-applanix2ogeom/Makefile b/ossim/src/apps/ossim-applanix2ogeom/Makefile
similarity index 100%
rename from src/apps/ossim-applanix2ogeom/Makefile
rename to ossim/src/apps/ossim-applanix2ogeom/Makefile
diff --git a/src/apps/ossim-applanix2ogeom/makefile.vc b/ossim/src/apps/ossim-applanix2ogeom/makefile.vc
similarity index 100%
rename from src/apps/ossim-applanix2ogeom/makefile.vc
rename to ossim/src/apps/ossim-applanix2ogeom/makefile.vc
diff --git a/ossim/src/apps/ossim-applanix2ogeom/ossim-applanix2ogeom.cpp b/ossim/src/apps/ossim-applanix2ogeom/ossim-applanix2ogeom.cpp
new file mode 100644
index 0000000..08aed70
--- /dev/null
+++ b/ossim/src/apps/ossim-applanix2ogeom/ossim-applanix2ogeom.cpp
@@ -0,0 +1,323 @@
+
+//----------------------------------------------------------------------------
+// Copyright (c) 2005, David Burken, all rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Applinix to ossim geometry.
+// 
+// Application to create an ossim geometry file from Applanix
+// support data files.
+//
+//----------------------------------------------------------------------------
+// $Id: applanix2ogeom.cpp 13025 2008-06-13 17:06:30Z sbortman $
+
+#include <iostream>
+#include <cstdlib>
+using namespace std;
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/support_data/ossimApplanixEOFile.h>
+#include <ossim/projection/ossimApplanixEcefModel.h>
+#include <ossim/projection/ossimApplanixUtmModel.h>
+
+
+static const ossimTrace traceDebug(ossimString("applanix2ogeom:debug"));
+
+bool processImage(ossimApplanixEOFile& eo,
+                  const ossimKeywordlist& kwl,
+                  const ossimString& id,
+                  const ossimFilename& outputDir);
+
+int main(int argc, char* argv[])
+{
+   static const char MODULE[] = "applanix2ogeom";
+
+   std::string tempString;
+   ossimArgumentParser::ossimParameter stringParam(tempString);
+   ossimArgumentParser argumentParser(&argc, argv);
+   bool outputDirOverrideFlag = false;
+   ossimInit::instance()->addOptions(argumentParser);
+   ossimInit::instance()->initialize(argumentParser);
+
+   argumentParser.getApplicationUsage()->setApplicationName(
+      argumentParser.getApplicationName());
+   
+   argumentParser.getApplicationUsage()->setDescription(
+      argumentParser.getApplicationName()+
+      " Creates ossim geometry file from Applannix support data.");
+   
+   argumentParser.getApplicationUsage()->setCommandLineUsage(
+      argumentParser.getApplicationName()+
+      " <camera_file> <exterior_orientation_file> <imageToProcess> <optional_output_directory>");
+
+   argumentParser.getApplicationUsage()->addUsageExplanation(
+      ossimApplicationUsage::OSSIM_COMMAND_LINE_OPTION,
+      std::string("camera_file"),
+      std::string("Serial number specific keyword list with camera parameters."));
+   
+   argumentParser.getApplicationUsage()->addUsageExplanation(
+      ossimApplicationUsage::OSSIM_COMMAND_LINE_OPTION,
+      std::string("exterior_orientation_file"),
+      std::string("Applanix exterior orientation file."));
+   
+   argumentParser.getApplicationUsage()->addUsageExplanation(
+      ossimApplicationUsage::OSSIM_COMMAND_LINE_OPTION,
+      std::string("imageToProcess"),
+      std::string("Image to create geometry for. If not present then all geometries are created"));
+   
+   argumentParser.getApplicationUsage()->addUsageExplanation(
+      ossimApplicationUsage::OSSIM_COMMAND_LINE_OPTION,
+      std::string("option_output_directory"),
+      std::string("Option directory to output geometry file(s) to.  If not set the imageToProcess directory will be used."));
+
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "-h or --help", "Shows help");
+   
+   //---
+   // Extract optional arguments.
+   //---
+   if(argumentParser.read("-h") || argumentParser.read("--help"))
+   {
+      argumentParser.getApplicationUsage()->write(std::cout);
+      exit(0);
+   }
+   
+   argumentParser.reportRemainingOptionsAsUnrecognized();
+   if (argumentParser.errors())
+   {
+      argumentParser.writeErrorMessages(std::cout);
+      exit(1);
+   }
+
+   // cout << "argc:  " << argumentParser.argc() << endl;
+   
+   if(argumentParser.argc() < 4)
+   {
+      argumentParser.getApplicationUsage()->write(std::cout);
+      exit(1);
+   }
+
+//    if(argumentParser.argc() == 4)
+//    {
+//       if(!ossimFilename(argumentParser.argv()[3]).isDir())
+//       {
+//          ossimNotify(ossimNotifyLevel_WARN) << "for the 3 argument option the last argument must be a directory" << std::endl;
+//          exit(0);
+//       }
+//    }
+   ossimFilename cameraFile     = argumentParser.argv()[1];
+   ossimFilename eoFile         = argumentParser.argv()[2];
+   ossimFilename imageToProcess;
+   ossimFilename outputDir;
+   ossim_uint32 maxIdx = argumentParser.argc();
+   if (argumentParser.argc() > 4)
+   {
+      outputDir = argumentParser.argv()[argumentParser.argc()-1];
+
+      if (outputDir.isDir() == false) // doesn't exist
+      {
+         --maxIdx;
+         if (outputDir.createDirectory() == false)
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << " ERROR:"
+               << "\nCould not create directory:  " << outputDir
+               << endl;
+            exit(1);
+         }
+      }
+      outputDirOverrideFlag = outputDir.exists();
+   }
+
+   
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " DEBUG:"
+         << "\ncamera file:       " << cameraFile
+         << "\neo file:           " << eoFile
+         << endl;
+   }
+
+   
+   // Keyword list to pass to model loadState.
+   ossimKeywordlist kwl;
+   // Open up the exterior orientation file.
+   ossimApplanixEOFile eo;
+   if (eo.parseFile(eoFile) == false)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "Could not open:  " << eoFile << endl;
+      exit(1);
+   }
+   eo.indexRecordIds();
+
+   if(argc >4)
+   {
+      ossim_uint32 idx = 0;
+      for(idx = 3; idx < maxIdx; ++idx)
+      {
+         kwl.clear();
+         // Add the eo_file keyword to the keyword list.
+         kwl.add("eo_file", eoFile.c_str(), true);
+         
+         // Add the eo_file keyword to the keyword list.
+         kwl.add("camera_file", cameraFile.c_str(), true);
+         kwl.add("compute_gsd_flag", true, true);
+         
+         // See if the ID is in the eo file.
+         imageToProcess = argumentParser.argv()[idx];
+         ossimString id = imageToProcess.fileNoExtension();
+         ossimRefPtr<ossimApplanixEORecord> rec = eo.getRecordGivenId(id);
+         if (!rec)
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "applanix2ogeom ERROR:"
+               << "\nMatching id for imageToProcess not found in eo file!"
+               << "\nfile:  " << imageToProcess
+               << "\nid:    " << id
+               << "\nReturning..." << endl;
+            exit(1);
+         }
+         kwl.add("image_id", id, true);
+         if (!outputDirOverrideFlag)
+         {
+            outputDir = imageToProcess.path();
+         }
+         processImage(eo, kwl, id, outputDir);
+      }
+   }
+   else if(argc <=4)
+   {
+      outputDir = argumentParser.argv()[argumentParser.argc()-1];
+
+      if(!outputDir .isDir())
+      {
+         ossimFilename idFile = outputDir.file();
+         outputDir = outputDir.path();
+         idFile = idFile.setExtension("");
+         const ossimRefPtr<ossimApplanixEORecord> rec = eo.getRecordGivenId(idFile);
+         
+         if(rec.valid())
+         {
+            // Add the eo_file keyword to the keyword list.
+            kwl.add("eo_file", eoFile.c_str(), true);
+            kwl.add("eo_id", idFile.c_str(), true);
+            
+            // Add the eo_file keyword to the keyword list.
+            kwl.add("camera_file", cameraFile.c_str(), true);
+            kwl.add("compute_gsd_flag", true, true);
+            
+            processImage(eo, kwl, idFile, outputDir);
+         }
+      }
+      else
+      {
+         ossim_uint32 idx = 0;
+         ossim_uint32 nRecords = eo.getNumberOfRecords();
+         ossim_int32 idIdx = eo.getFieldIdx("ID");
+         if(idIdx >= 0)
+         {
+            for(idx = 0; idx < nRecords; ++idx)
+            {
+               const ossimRefPtr<ossimApplanixEORecord> rec = eo.getRecord(idx);
+               
+               if(rec.valid())
+               {
+                  ossimString id = (*rec)[idIdx];
+                  // Add the eo_file keyword to the keyword list.
+                  kwl.add("eo_file", eoFile.c_str(), true);
+                  kwl.add("eo_id", id.c_str(), true);
+                  
+                  // Add the eo_file keyword to the keyword list.
+                  kwl.add("camera_file", cameraFile.c_str(), true);
+                  kwl.add("compute_gsd_flag", true, true);
+                  
+                  processImage(eo, kwl, id, outputDir);
+               }
+            }
+         }
+         else
+         {
+            ossimNotify(ossimNotifyLevel_WARN) << "NO ID RECORD FOUND!!" << std::endl;
+            exit(0);
+         }
+      }
+   }
+   
+   
+   return 0;
+}
+
+bool processImage(ossimApplanixEOFile& eo,
+                  const ossimKeywordlist& kwl,
+                  const ossimString& id,
+                  const ossimFilename& outputDir)
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "applanix2ogeom:processImage DEBUG:"
+         << "\nkwl:\n"
+         << kwl
+         << endl;
+   }
+
+//   ossimRefPtr<ossimApplanixEcefModel> model = new ossimApplanixEcefModel;
+   ossimRefPtr<ossimProjection> model;
+
+   if(eo.isUtmFrame())
+   {
+      model = new ossimApplanixUtmModel;
+   }
+   else
+   {
+     model = new ossimApplanixEcefModel;
+   }
+   if (model->loadState(kwl) == false)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "applanix2ogeom:processImage ERROR:"
+         << "\nossimApplanixEcefModel::loadState failded for id:  "
+         << id
+         << endl;
+      return false;
+   }
+      
+   ossimFilename geomFile = id;
+   geomFile.setExtension(ossimString(".geom"));
+   if (outputDir != ossimFilename::NIL)
+   {
+      geomFile = outputDir.dirCat(geomFile);
+   }
+
+   ossimKeywordlist geomKwl;
+   model->saveState(geomKwl);
+
+   if (geomKwl.write(geomFile.c_str()) == false)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "applanix2ogeom:processImage ERROR:"
+         << "\nCould not write file:  " << geomFile << endl;
+      return false;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_NOTICE)
+         << "Wrote file:  " << geomFile << endl;
+   }
+   return true;
+}
+
diff --git a/ossim/src/apps/ossim-autreg/CMakeLists.txt b/ossim/src/apps/ossim-autreg/CMakeLists.txt
new file mode 100644
index 0000000..baecb3f
--- /dev/null
+++ b/ossim/src/apps/ossim-autreg/CMakeLists.txt
@@ -0,0 +1,2 @@
+FILE(GLOB SOURCE_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
+OSSIM_SETUP_APPLICATION(ossim-autreg INSTALL COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ${SOURCE_FILES})
diff --git a/ossim/src/apps/ossim-autreg/ossim-autreg.cpp b/ossim/src/apps/ossim-autreg/ossim-autreg.cpp
new file mode 100644
index 0000000..a511284
--- /dev/null
+++ b/ossim/src/apps/ossim-autreg/ossim-autreg.cpp
@@ -0,0 +1,97 @@
+//----------------------------------------------------------------------------
+//
+// File: ossim-autreg.cpp
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Hicks
+//
+// Description: Autonomous registration.
+//
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimTimer.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/util/ossimAutRegUtil.h>
+
+#include <vector>
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+#include <ctime>
+#include <cstdlib>
+
+
+using namespace std;
+
+static ossimTrace traceDebug = ossimTrace("ossim-autreg:debug");
+
+
+int main(int argc, char *argv[])
+{
+   // Start the timer.
+   ossimTimer::instance()->setStartTick();
+
+   //---
+   // Get the arg count so we can tell if an arg was consumed by
+   // ossimInit::instance()->initialize
+   //---
+   int originalArgCount = argc;
+   
+   ossimArgumentParser ap(&argc, argv);
+
+   // Initialize ossim stuff, factories, plugin, etc.
+   ossimInit::instance()->initialize(ap);
+
+   //---
+   // Avoid going on if a global option was consumed by ossimInit::initialize
+   // like -V or --version option and the arg count is down to 1.
+   //---
+   if ( ( ap.argc() > 1 ) || ( ap.argc() == originalArgCount ) )
+   {
+
+      ossimRefPtr<ossimAutRegUtil> autreg = new ossimAutRegUtil;
+
+      try
+      {      
+         //---
+         // NOTE: ossimAutRegUtil::initialize handles the application usage which will
+         // false, to end things if certain options (e.g. "--help") are provided.
+         //
+         // ossimAutRegUtil::initialize can throw an exception.
+         //---
+         bool goAhead = autreg->initialize(ap);
+         if (goAhead)
+         {      
+            // ossimAutRegUtil::execute can throw an excepion.
+            autreg->execute();
+            
+            ossimNotify(ossimNotifyLevel_NOTICE)
+               << "elapsed time in seconds: "
+               << std::setiosflags(ios::fixed)
+               << std::setprecision(3)
+               << ossimTimer::instance()->time_s() << endl;
+         }
+      }
+      catch (const ossimException& e)
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
+         exit(1);
+      }
+      
+   } // End: if ( ( ap.argc() > 1 ) ...
+
+   exit(0);
+   
+} // End of main...
+
diff --git a/src/apps/ossim-band-merge/CMakeLists.txt b/ossim/src/apps/ossim-band-merge/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-band-merge/CMakeLists.txt
rename to ossim/src/apps/ossim-band-merge/CMakeLists.txt
diff --git a/src/apps/ossim-band-merge/Makefile b/ossim/src/apps/ossim-band-merge/Makefile
similarity index 100%
rename from src/apps/ossim-band-merge/Makefile
rename to ossim/src/apps/ossim-band-merge/Makefile
diff --git a/src/apps/ossim-band-merge/makefile.vc b/ossim/src/apps/ossim-band-merge/makefile.vc
similarity index 100%
rename from src/apps/ossim-band-merge/makefile.vc
rename to ossim/src/apps/ossim-band-merge/makefile.vc
diff --git a/ossim/src/apps/ossim-band-merge/ossim-band-merge.cpp b/ossim/src/apps/ossim-band-merge/ossim-band-merge.cpp
new file mode 100644
index 0000000..d55cd2d
--- /dev/null
+++ b/ossim/src/apps/ossim-band-merge/ossim-band-merge.cpp
@@ -0,0 +1,327 @@
+//*******************************************************************
+// Copyright (C) 2002 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Ken Melero
+//
+// Merges input images together into output image.  Images must be of
+// same scalar type and same number of bands.  If image width is different
+// output image will be expanded to the largest input image width.
+//
+//*******************************************************************
+//  $Id: band_merge.cpp 10695 2007-04-12 13:56:50Z gpotts $
+
+#include <ossim/imaging/ossimJpegWriter.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimImageTypeLut.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <ossim/imaging/ossimImageWriterFactory.h>
+#include <ossim/imaging/ossimImageFileWriter.h>
+#include <ossim/imaging/ossimScalarRemapper.h>
+#include <ossim/imaging/ossimBandMergeSource.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <iostream>
+#include <exception>
+static ossimTrace traceDebug("band_merge:main");
+
+static void usage();
+static void outputWriterTypes();
+
+int main(int argc, char* argv[])
+{
+   static const char MODULE[] = "band_merge:main";
+
+   std::string tempString;
+   ossimArgumentParser::ossimParameter stringParam(tempString);
+   ossimArgumentParser argumentParser(&argc, argv);
+   ossimInit::instance()->addOptions(argumentParser);
+   ossimInit::instance()->initialize(argumentParser);
+ 
+   argumentParser.getApplicationUsage()->setApplicationName(argumentParser.getApplicationName());
+   argumentParser.getApplicationUsage()->setDescription(argumentParser.getApplicationName()+" merges band separate images to one image");
+   argumentParser.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
+   argumentParser.getApplicationUsage()->addCommandLineOption("-o or --create-overiew", "Creates and overview for the output image");
+   argumentParser.getApplicationUsage()->addCommandLineOption("-w or --tile-width", "Defines the tile width for the handlers that support tiled output");
+   
+   if (traceDebug()) CLOG << " Entered..." << std::endl;
+
+   if (argumentParser.read("-h") ||
+       argumentParser.read("--help")||(argumentParser.argc() < 2))
+   {
+      argumentParser.getApplicationUsage()->write(std::cout);
+      usage(); // for writer output types
+      exit(0);
+   }
+
+   // Keyword list to initialize image writers with.
+   ossimKeywordlist kwl;
+   const char* PREFIX = "imagewriter.";
+
+   ossim_uint32 tile_width = 32;
+   bool create_overview = false;
+
+   if (argumentParser.read("-o") || argumentParser.read("--crate-overview"))
+   {
+      create_overview = true;
+      std::cout << "\nOutput overview building enabled." << std::endl;
+   }
+
+   if (argumentParser.read("-w", stringParam) ||
+       argumentParser.read("-tile-width", stringParam))
+   {
+      tile_width = ossimString(tempString).toInt();
+      if ((tile_width % 16) != 0)
+      {
+         cerr << MODULE << " NOTICE:"
+              << "\nTile width must be a multiple of 16!"
+              << "\nDefaulting to 128"
+              << std::endl;
+         tile_width = 0;
+      }
+      std::cout << "Tile width set to:  " << tile_width << std::endl;
+   }
+   
+   argumentParser.reportRemainingOptionsAsUnrecognized();
+   
+   // Three required args:  output_type, input file, and output file.
+   if (argumentParser.errors())
+   {
+      argumentParser.writeErrorMessages(std::cout);
+      exit(0);
+   }
+   if (argumentParser.argc() == 1)
+   {
+      argumentParser.getApplicationUsage()->write(std::cout);
+      usage(); // for writer output types
+      exit(0);
+   }
+   
+   ossim_uint32 number_of_source_images = argumentParser.argc() - 3;
+
+   if (traceDebug())
+   {
+      CLOG << "DEBUG:"
+           << "\nargc:  " << argumentParser.argc()
+           << "\nnumber_of_source_images:  " << number_of_source_images
+           << "\ntile_width:  " << tile_width
+           << "\ncreate_overview:  " << (create_overview?"true":"false")
+           << std::endl;
+   }
+
+   ossimString output_type = argv[1];
+   output_type.downcase();
+   std::cout << "Output type:        " << output_type << std::endl;
+
+   // Create the vector of image handlers.
+   ossimConnectableObject::ConnectableObjectList ihs;
+   for(ossim_uint32 h = 0; h < number_of_source_images; ++h)
+   {
+      ossimFilename f = argv[h + 2];
+      std::cout << "Input_image[" << h << "]:     " << f << std::endl;
+      ihs.push_back(ossimImageHandlerRegistry::instance()->open(f));
+   }
+
+   // Get the output file.
+   ossimFilename output_file = argv[argumentParser.argc() - 1];
+   std::cout << "Output file:        " << output_file << std::endl;   
+
+   //---
+   // Set the output writer type and the image type.
+   //---
+   kwl.add(PREFIX, ossimKeywordNames::TYPE_KW, output_type.c_str());
+
+   ossimRefPtr<ossimBandMergeSource> bm = new ossimBandMergeSource(ihs);
+   ossimRefPtr<ossimImageFileWriter> fileWriter =
+      ossimImageWriterFactoryRegistry::instance()->createWriter(kwl, PREFIX);
+   if(!fileWriter)
+   {
+      bm->disconnect();
+      bm = 0;
+      ossimConnectableObject::ConnectableObjectList::iterator i = ihs.begin();
+      while (i != ihs.end())
+      {
+         (*i)->disconnect();
+         (*i) = 0;
+         ++i;
+      }
+      
+      cerr << "Error making an image writer..."
+           << "\nExiting application..." << std::endl;
+      exit(1);
+   }
+   
+   // Write out a geometry file for new image.
+   ossimKeywordlist bm_geom;
+   ossimRefPtr<ossimImageGeometry> geom = bm->getImageGeometry();
+   geom->saveState(bm_geom);
+   
+   ossimFilename geom_file = output_file;
+   geom_file.setExtension("geom");
+   bm_geom.write(geom_file);
+   
+   fileWriter->connectMyInputTo(0, bm.get());
+   
+   if (tile_width)
+   {
+      // Set the tile size...
+      fileWriter->setTileSize(ossimIpt(tile_width, tile_width));
+   }
+   
+   fileWriter->open(output_file);
+   
+   ossimStdOutProgress prog(2);
+   fileWriter->addListener(&prog);
+   
+   fileWriter->setAreaOfInterest(bm->getBoundingRect());
+
+   if( fileWriter->canCastTo("ossimTiffWriter") )
+   {
+//      ossimTiffWriter* twriter = PTR_CAST(ossimTiffWriter, fileWriter);
+      
+      if(fileWriter.valid())
+      {
+         try
+         {
+            fileWriter->execute();
+         }
+         catch(std::exception& e)
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "band_merge: ERROR exception caught:\n"
+               << e.what()
+               << std::endl;
+         }
+         catch (...)
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "band_merge: ERROR - Unknown exception caught!"
+               << std::endl;
+         }
+      }
+   }
+   else if(fileWriter->canCastTo("ossimJpegWriter"))
+   {
+      ossimRefPtr<ossimScalarRemapper> remapper = NULL;
+      
+      if(PTR_CAST(ossimJpegWriter, fileWriter.get()) &&
+         (bm->getOutputScalarType() != OSSIM_UCHAR))
+      {
+         remapper = new ossimScalarRemapper(bm.get(), OSSIM_UCHAR);
+         remapper->initialize();
+         fileWriter->connectMyInputTo(0, remapper.get());
+      }
+      fileWriter->initialize();
+      try
+      {
+         fileWriter->execute();
+      }
+      catch(std::exception& e)
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "band_merge: ERROR exception caught:\n"
+            << e.what()
+            << std::endl;
+      }
+      catch (...)
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "band_merge: ERROR - Unknown exception caught!"
+            << std::endl;
+      }
+   }
+   else
+   {
+      try
+      {
+         fileWriter->execute();
+      }
+      catch(std::exception& e)
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "band_merge: ERROR exception caught:\n"
+               << e.what()
+               << std::endl;
+         }
+      }
+      catch (...)
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "band_merge: ERROR - Unknown exception caught!"
+               << std::endl;
+         }
+      }
+   }
+   
+   if (create_overview == true)
+   {
+      fileWriter->writeOverviewFile();
+   }
+   fileWriter->disconnect();
+   fileWriter = 0;
+   bm = 0;
+   ossimConnectableObject::ConnectableObjectList::iterator it = ihs.begin();
+   while (it != ihs.end())
+   {
+      (*it)->disconnect();
+      (*it) = 0;
+      ++it;
+   }
+
+   exit(0);
+}
+
+void usage()
+{
+   std::cout
+      << "band_merge: Band Merge\n"
+      << "Usage:\n"
+      << "band_merge [-h][-o][-w tile_width] <output_type> <input_file1> "
+      << "<input_file2> ... <output_file>"
+      << "\n\nOptional argument list:"
+      << "\n -h  -- display Usage/Help"
+      << "\n -o  -- create an ossim overview file with output file"
+      << "\n -w  -- tile width (default = 32)"
+      << "\n"
+      << "\nNOTES:"
+      << "\n\"-w\" option only valid with tiff type."
+      << "\n\"Tile width must be a multiple of 32."
+      << "\nValid output writer types:"
+      << "\n";
+   
+   outputWriterTypes();
+}
+
+void outputWriterTypes()
+{
+   ossimImageTypeLut lut;
+
+   ossim_uint32 index = 0;
+   ossimString type = lut.getTableIndexString(index);
+   
+   while (type.size())
+   {
+      std::cout << "\t" << type << std::endl;
+      ++index;
+      type = lut.getTableIndexString(index);
+   }
+   std::cout << std::endl;
+}
+
diff --git a/src/apps/ossim-batch-test/CMakeLists.txt b/ossim/src/apps/ossim-batch-test/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-batch-test/CMakeLists.txt
rename to ossim/src/apps/ossim-batch-test/CMakeLists.txt
diff --git a/src/apps/ossim-batch-test/ossim-batch-test.cpp b/ossim/src/apps/ossim-batch-test/ossim-batch-test.cpp
similarity index 100%
rename from src/apps/ossim-batch-test/ossim-batch-test.cpp
rename to ossim/src/apps/ossim-batch-test/ossim-batch-test.cpp
diff --git a/src/apps/ossim-btoa/CMakeLists.txt b/ossim/src/apps/ossim-btoa/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-btoa/CMakeLists.txt
rename to ossim/src/apps/ossim-btoa/CMakeLists.txt
diff --git a/src/apps/ossim-btoa/Makefile b/ossim/src/apps/ossim-btoa/Makefile
similarity index 100%
rename from src/apps/ossim-btoa/Makefile
rename to ossim/src/apps/ossim-btoa/Makefile
diff --git a/src/apps/ossim-btoa/makefile.vc b/ossim/src/apps/ossim-btoa/makefile.vc
similarity index 100%
rename from src/apps/ossim-btoa/makefile.vc
rename to ossim/src/apps/ossim-btoa/makefile.vc
diff --git a/src/apps/ossim-btoa/ossim-btoa.cpp b/ossim/src/apps/ossim-btoa/ossim-btoa.cpp
similarity index 100%
rename from src/apps/ossim-btoa/ossim-btoa.cpp
rename to ossim/src/apps/ossim-btoa/ossim-btoa.cpp
diff --git a/src/apps/ossim-chgkwval/CMakeLists.txt b/ossim/src/apps/ossim-chgkwval/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-chgkwval/CMakeLists.txt
rename to ossim/src/apps/ossim-chgkwval/CMakeLists.txt
diff --git a/src/apps/ossim-chgkwval/Makefile b/ossim/src/apps/ossim-chgkwval/Makefile
similarity index 100%
rename from src/apps/ossim-chgkwval/Makefile
rename to ossim/src/apps/ossim-chgkwval/Makefile
diff --git a/src/apps/ossim-chgkwval/makefile.vc b/ossim/src/apps/ossim-chgkwval/makefile.vc
similarity index 100%
rename from src/apps/ossim-chgkwval/makefile.vc
rename to ossim/src/apps/ossim-chgkwval/makefile.vc
diff --git a/ossim/src/apps/ossim-chgkwval/ossim-chgkwval.cpp b/ossim/src/apps/ossim-chgkwval/ossim-chgkwval.cpp
new file mode 100644
index 0000000..b3b3acb
--- /dev/null
+++ b/ossim/src/apps/ossim-chgkwval/ossim-chgkwval.cpp
@@ -0,0 +1,80 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Ken Melero
+// 
+// Description: Changes the value of a keyword within a keyword list to
+//              value passed in by user.
+//
+//********************************************************************
+// $Id: chgkwval.cpp 13083 2008-06-25 19:45:41Z dburken $
+
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <iostream>
+
+int main(int argc, char* argv[])
+{
+   enum
+   {
+      OK    = 0,
+      ERROR = 1
+   };
+   
+   int status = OK;
+   
+   if ( argc == 4 )
+   {
+      ossimFilename kwlFile = argv[1];
+      ossimKeywordlist kwl;
+      
+      if ( kwlFile.exists() )
+      {
+         // Open existing keyword list.
+         if ( kwl.addFile( kwlFile ) == false )
+         {
+            status = ERROR;
+            std::cerr
+               << "Error opening keyword list:  " << kwlFile << std::endl;
+         }
+      }
+
+      if ( status == OK )
+      {
+         std::string key = argv[2];
+         std::string value = argv[3];
+         
+         // Add or change the value of keyword in the keyword list.
+         kwl.addPair( key, value, true );
+
+         // Create or re-write the file.
+         kwl.write(kwlFile); 
+   
+         std::cout
+            << "Added or changed key: \"" << key << "\" with value: \"" << value
+            << "\" in " << kwlFile << std::endl;
+      }
+   }
+   else // Usage:
+   {
+      std::cout
+         << "Usage: chgkwval <keywordlist_file> <keyword> <value>\n"
+         << "Changes the keyword value within the keyword list to "
+         << "value specified.\n"
+         << "Example:   chgval band1.spec area.size \"pixels 7689 8031\"\n"
+         << "Changes the keyword value of area.size to pixels 7689 8031\n\n"
+         << "Note 1:  Use no colon \":\" after the keyword.\n"
+         << "Note 2:  If the keyword is present in the keyword list it will\n"
+         << "         be overwritten.\n"
+         << "Note 3:  If the keyword is not in the keyword list it will"
+         << " be added.\n"
+         << "Note 4:  Enclose value in double quotes if it is more than one"
+         << " string.\n"
+         << "Note 5:  Will create file if doesn't exists.\n"
+         << std::endl;
+   }
+   
+   return status;
+}
diff --git a/src/apps/ossim-chipper/CMakeLists.txt b/ossim/src/apps/ossim-chipper/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-chipper/CMakeLists.txt
rename to ossim/src/apps/ossim-chipper/CMakeLists.txt
diff --git a/ossim/src/apps/ossim-chipper/ossim-chipper.cpp b/ossim/src/apps/ossim-chipper/ossim-chipper.cpp
new file mode 100644
index 0000000..b105220
--- /dev/null
+++ b/ossim/src/apps/ossim-chipper/ossim-chipper.cpp
@@ -0,0 +1,92 @@
+//----------------------------------------------------------------------------
+//
+// File: ossim-chipper.cpp
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Utility class definition for processing digital elevation models(dems).
+//
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimTimer.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/util/ossimChipperUtil.h>
+
+#include <cstdlib> /* for exit */
+#include <iomanip>
+#include <iostream>
+
+using namespace std;
+
+static ossimTrace traceDebug = ossimTrace("ossim-chipper:debug");
+
+int main(int argc, char* argv[])
+{
+   // Start the timer.
+   ossimTimer::instance()->setStartTick();
+
+   //---
+   // Get the arg count so we can tell if an arg was consumed by
+   // ossimInit::instance()->initialize
+   //---
+   int originalArgCount = argc;
+   
+   ossimArgumentParser ap(&argc, argv);
+
+   // Initialize ossim stuff, factories, plugin, etc.
+   ossimInit::instance()->initialize(ap);
+
+   //---
+   // Avoid going on if a global option was consumed by ossimInit::initialize
+   // like -V or --version option and the arg count is down to 1.
+   //---
+   if ( ( ap.argc() > 1 ) || ( ap.argc() == originalArgCount ) )
+   {
+      // Make the generator.
+      ossimRefPtr<ossimChipperUtil> chipper = new ossimChipperUtil;
+
+      try
+      {      
+         //---
+         // NOTE: ossimChipperUtil::initialize handles the application usage which will
+         // false, to end things if certain options (e.g. "--help") are provided.
+         //
+         // ossimChipperUtil::initialize can throw an exception.
+         //---
+         bool continue_after_init = chipper->initialize(ap);
+         if (continue_after_init)
+         {      
+            // ossimChipperUtil::execute can throw an excepion.
+            chipper->execute();
+            
+            ossimNotify(ossimNotifyLevel_NOTICE)
+               << "elapsed time in seconds: "
+               << std::setiosflags(ios::fixed)
+               << std::setprecision(3)
+               << ossimTimer::instance()->time_s() << endl;
+         }
+      }
+      catch (const ossimException& e)
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
+         exit(1);
+      }
+      
+   } // End: if ( ( ap.argc() > 1 ) ...
+
+   exit(0);
+   
+} // End of main...
+
diff --git a/src/apps/ossim-cmm/CMakeLists.txt b/ossim/src/apps/ossim-cmm/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-cmm/CMakeLists.txt
rename to ossim/src/apps/ossim-cmm/CMakeLists.txt
diff --git a/src/apps/ossim-cmm/Makefile b/ossim/src/apps/ossim-cmm/Makefile
similarity index 100%
rename from src/apps/ossim-cmm/Makefile
rename to ossim/src/apps/ossim-cmm/Makefile
diff --git a/src/apps/ossim-cmm/makefile.vc b/ossim/src/apps/ossim-cmm/makefile.vc
similarity index 100%
rename from src/apps/ossim-cmm/makefile.vc
rename to ossim/src/apps/ossim-cmm/makefile.vc
diff --git a/ossim/src/apps/ossim-cmm/ossim-cmm.cpp b/ossim/src/apps/ossim-cmm/ossim-cmm.cpp
new file mode 100644
index 0000000..7f0a295
--- /dev/null
+++ b/ossim/src/apps/ossim-cmm/ossim-cmm.cpp
@@ -0,0 +1,496 @@
+//**************************************************************************
+//
+// License:  See top level LICENSE.txt filel.
+//
+// Written by:   Garrett Potts
+// 
+// Description:  This program will force a recompute of Min/Max Pixel Values.
+//
+//**************************************************************************
+// $Id: cmm.cpp 14515 2009-05-15 15:12:28Z dburken $
+
+#include <vector>
+#include <fstream>
+#include <iostream>
+#include <iterator>
+
+using namespace std;
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageSourceFactory.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageSourceSequencer.h>
+#include <algorithm>
+#include <map>
+
+static const ossimTrace traceDebug(ossimString("cmm:debug"));
+
+//**************************************************************************
+// usage()
+//**************************************************************************
+void usage()
+{
+   ossimNotify(ossimNotifyLevel_INFO)
+      << "\nNOTES:"
+      << "\n - Default output is to a \".omd\" file so if the image was"
+      << " \"foo.tif\" you\n   will get a \"foo.omd\"."
+      << "\n - If the .omd file exists already this will open it and add"
+      << "\n   or, overwrite the min, max keywords only."
+      << "\n - If the -p option is used no .omd file will be written."
+      << endl;
+   
+   return;
+}
+
+bool isInImageEntryList(const std::vector<ossim_uint32>& imageEntryList,
+                        ossim_uint32 entry)
+{
+   for(ossim_uint32 i=0; i<imageEntryList.size(); ++i)
+   {
+      if (imageEntryList[i] == entry)
+      {
+         return true;
+      }
+   }
+   return false;
+}
+
+//**************************************************************************
+// Main
+//**************************************************************************
+int main(int argc, char* argv[])
+{
+   //---
+   // Get the arg count so we can tell if an arg was consumed by
+   // ossimInit::instance()->initialize
+   //---
+   int originalArgCount = argc;  
+
+   ossimString tempString;
+   ossimArgumentParser::ossimParameter stringParam(tempString);
+   ossimArgumentParser ap(&argc, argv);
+   ossimInit::instance()->addOptions(ap);
+   ossimInit::instance()->initialize(ap);
+
+   if ( (ap.argc() == 1) && (originalArgCount > 1) )
+   {
+      exit(0); // ossimInit consumed all options.
+   }
+   
+   ap.getApplicationUsage()->setApplicationName(ap.getApplicationName());
+   
+   ap.getApplicationUsage()->setDescription(ap.getApplicationName()+" will force a recompute of Min/Max Pixel Values.");
+   
+   ap.getApplicationUsage()->setCommandLineUsage(ap.getApplicationName()+" <image_file>\nThis program will force a recompute of Min/Max Pixel Values.\n");
+   
+   ap.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
+   
+   ap.getApplicationUsage()->addCommandLineOption("-p","print values to standard output");
+   
+   ap.getApplicationUsage()->addCommandLineOption("-e or --entry","Give the entry(zero based) to compute min / max for.\nNOTE: Option only valid with a single file.");
+
+   ap.getApplicationUsage()->addCommandLineOption("-l or --list-entries","Lists the entries within the image and returns without doing anything else.");
+   ap.getApplicationUsage()->addCommandLineOption("-o", "Write omd to file specified. If used on a multi-entry file, given \"foo.omd\" you will get: \"foo_e0.omd\"");
+   ap.getApplicationUsage()->addCommandLineOption("--min","Hard coded min value for all bands");
+   ap.getApplicationUsage()->addCommandLineOption("--max","Hard coded max value for all bands");
+   ap.getApplicationUsage()->addCommandLineOption("--null","Hard coded null value for all bands");
+   
+   ap.getApplicationUsage()->addCommandLineOption("--reader-prop <string>", 
+      "Adds a property to send to the reader. format is name=value");
+   
+   bool out_data = false;
+   bool listEntriesFlag = false;
+   double nullValue = ossim::nan();
+   double minValue  = ossim::nan();
+   double maxValue  = ossim::nan();
+   bool hasNull = false;
+   ossimFilename outputFile;
+   
+   std::vector<ossim_uint32> entryList;
+
+   if (ap.read("-h") ||
+       ap.read("--help")||(ap.argc() < 2))
+   {
+      ap.getApplicationUsage()->write(ossimNotify(ossimNotifyLevel_WARN));
+      usage();
+      exit(0);
+   }
+   if(ap.read("--min", stringParam))
+   {
+      minValue = tempString.toDouble();
+   }
+   if(ap.read("--max", stringParam))
+   {
+      maxValue = tempString.toDouble();
+   }
+   if(ap.read("--null", stringParam))
+   {
+      nullValue = tempString.toDouble();
+      if ( !ossim::isnan(nullValue) )
+      {
+         hasNull = true;
+      }
+   }
+   if(ap.read("-p"))
+   {
+      out_data = true;
+   }
+   if(ap.read("-l") || ap.read("--list-entries"))
+   {
+      listEntriesFlag = true; 
+   }
+   if( ap.read("-o", stringParam) )
+   {
+      outputFile = tempString.trim();
+   }
+   while(ap.read("-e", stringParam) ||
+         ap.read("--entry", stringParam))
+   {
+      ossim_uint32 entryNumber = ossimString(tempString).toUInt32();
+      
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG:"
+            << "\nentryNumber:  " << entryNumber
+            << endl;
+      }
+
+      entryList.push_back(entryNumber);
+   }
+
+   std::map<ossimString, ossimString, ossimStringLtstr> readerPropertyMap;
+   while(ap.read("--reader-prop", stringParam))
+   {
+      std::vector<ossimString> nameValue;
+      ossimString(tempString).split(nameValue, "=");
+      if(nameValue.size() == 2)
+      {
+         readerPropertyMap.insert( std::make_pair(nameValue[0], nameValue[1]) );
+      }
+   }  
+   
+   ap.reportRemainingOptionsAsUnrecognized();
+   if(argc == 1)
+   {
+      usage();
+      exit(1);
+   }
+   
+   // Default variables
+
+   ossim_uint32 fileCount = argc - 1;
+
+   // Check for -e option with multiple images.
+   if ( (fileCount > 1) && entryList.size() )
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "Entry option only valid with a single file!"
+         << endl;
+      exit(1);
+   }
+   
+   ossim_uint32 idx = 1;
+   for(idx = 1; idx <= fileCount; ++idx)
+   {
+      // Get the image file name.
+      ossimFilename img_file(argv[idx]);
+
+      ossimNotify(ossimNotifyLevel_INFO)
+         << "Processing image file:  " << img_file << endl;
+      
+      // Instantiate image to see if it is supported.
+      ossimRefPtr<ossimImageHandler> ih;
+      ih = ossimImageHandlerRegistry::instance()->open(img_file);      
+      
+      // Error checking.
+      if (!ih.valid())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "Unsupported image file:  " << img_file << endl;
+         continue; // Go to next file.
+      }
+      
+      // Error checking.
+      if (ih->getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "Error reading image:  " << img_file << endl;
+         continue; // Go to next file.
+      }
+
+      // Set the reader properties if any.
+      if ( readerPropertyMap.size() )
+      {
+         ossimPropertyInterface* pi = (ossimPropertyInterface*)ih.get();
+         std::map<ossimString, ossimString, ossimStringLtstr>::iterator iter =
+            readerPropertyMap.begin();
+         while(iter != readerPropertyMap.end())
+         {
+            pi->setProperty(iter->first, iter->second);
+            ++iter;
+         }
+      }
+
+      // Get the list of entries that this image has.
+      std::vector<ossim_uint32> imageEntryList;
+      ih->getEntryList(imageEntryList);
+
+      if (listEntriesFlag)
+      {
+         std::cout << "File " << img_file << " entries:\n";
+         std::copy(imageEntryList.begin(),
+                   imageEntryList.end(),
+                   std::ostream_iterator<ossim_uint32>(std::cout, " "));
+         std::cout << std::endl;
+         continue; // Go to next file.
+      }
+
+      //---
+      // If no entry (-e option) was given assume to do all entries.
+      //---
+      if(entryList.size() == 0)
+      {
+         for(ossim_uint32 imageEntryIdx = 0;
+             imageEntryIdx < imageEntryList.size();
+             ++imageEntryIdx)
+         {
+            entryList.push_back(imageEntryList[imageEntryIdx]);
+         }
+      }
+
+      for(ossim_uint32 entryIdx = 0; entryIdx < entryList.size(); ++entryIdx)
+      {
+         if(isInImageEntryList(imageEntryList, entryList[entryIdx]) == false)
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "Entry not found:  " << entryList[entryIdx] << endl;
+            
+            continue; // Go to next entry.
+         }
+
+         ossimNotify(ossimNotifyLevel_INFO)
+         << "Computing min/max for entry number:  " << entryList[entryIdx]
+         << endl;
+
+         // Select the entry.
+         ih->setCurrentEntry(entryList[entryIdx]);
+
+         // Build the .omd file name.
+         ossimFilename omd_file;
+         if (outputFile.size())
+         {
+            omd_file = outputFile;            
+         }
+         else
+         {
+            omd_file = img_file;
+         }
+
+         if(imageEntryList.size() > 1)
+         {
+            ossim_uint32 currentEntry = ih->getCurrentEntry();
+            omd_file.setExtension("");
+            omd_file += "_e";
+            omd_file += ossimString::toString(currentEntry);
+
+            //---
+            // Note:  Set extension was not used here deliberately to avoid
+            // messing
+            // up a MODIS file in hdf format with multiple '.'s in the file
+            // name.
+            //---
+            omd_file += ".omd";
+         }
+         else
+         {
+            omd_file.setExtension("omd");
+         }
+      
+         ossimRefPtr<ossimImageSourceSequencer> is =
+            new ossimImageSourceSequencer(ih.get());
+
+         //---
+         // Note: getImageTileWidth/Height will return zero if the image is not
+         // intenally tiles.
+         //---
+         ossimIpt tileWidthHeight(ih->getImageTileWidth(),
+                                  ih->getImageTileHeight());
+         
+         if (!tileWidthHeight.x)
+         {
+            // make the sequencer read entire strips from the image handler
+            // at a time.  This will speed up access time for strip images
+            //
+            tileWidthHeight.x = ih->getBoundingRect().width();
+         }
+         if(!tileWidthHeight.y)
+         {
+            tileWidthHeight.y = ih->getTileHeight();
+         }
+
+         if ( traceDebug() )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "Sequencer tile size: " << tileWidthHeight << endl;
+         }
+         
+         is->setTileSize(tileWidthHeight);
+
+         //---
+         // Make arrays of doubles to hold the min/max values.
+         // Initialize mins to default maxes and maxes to default mins to be
+         // safe.
+         //---
+         ossim_uint32 i; // for numerous iterations...
+
+         const ossimScalarType ST = ih->getOutputScalarType();
+         
+         const double DEFAULT_MIN = ossim::defaultMin(ST);
+         const double DEFAULT_MAX = ossim::defaultMax(ST);
+         
+         const ossim_uint32 BANDS = ih->getNumberOfInputBands();
+
+         vector<double> tmin(BANDS);
+         vector<double> tmax(BANDS);
+         vector<double> tnull(BANDS);
+         for (i = 0; i < BANDS; ++i)
+         {
+            tmin[i] = DEFAULT_MAX;
+            tmax[i] = DEFAULT_MIN;
+
+            if ( hasNull )
+            {
+               // User passed in with --null option so set here.
+               tnull[i] = nullValue;
+            }
+            else
+            {
+               tnull[i] = ih->getNullPixelValue(i);
+            }
+         }
+         
+         // Scan the image and compute the min and max.
+         const double TOTAL_TILES = is->getNumberOfTiles();
+         double tile_count = 0.0;
+         ossimNotify(ossimNotifyLevel_INFO)
+            << setiosflags(ios::fixed) << setprecision(0);
+
+         if((ossim::isnan(minValue))||
+            (ossim::isnan(maxValue)))
+         {
+            ossimRefPtr<ossimImageData> id = is->getNextTile();
+            while(id.valid())
+            {
+               if ( hasNull )
+               {
+                  // Pass null to image data object so it doesn't get picked up as "min".
+                  id->setNullPix( nullValue );
+               }
+               id->computeMinMaxPix(tmin, tmax);
+               id = is->getNextTile();
+               ++tile_count;
+               ossimNotify(ossimNotifyLevel_INFO)
+                  << "\r"  << setw(3)
+                  << (tile_count / TOTAL_TILES * 100.0) << "%"
+                  << flush;
+            }
+         }
+         if(!ossim::isnan(minValue))
+         {
+            std::fill(tmin.begin(), tmin.end(), minValue);
+         }
+         if(!ossim::isnan(maxValue))
+         {
+            std::fill(tmax.begin(), tmax.end(), maxValue);
+         }
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "\r100%\nFinished..." << endl;
+         
+         ossimKeywordlist okwl(omd_file);
+         
+         for(i = 0; i < BANDS; ++i)
+         {
+            //---
+            // Check to see if values got assigned.  If not flip to default and
+            // issue a warning.
+            //---
+            if (tmin[i] == DEFAULT_MAX)
+            {
+               tmin[i] = DEFAULT_MIN;
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << "cmm scan for min failed! Using default min."
+                  << std::endl;
+            }
+            if (tmax[i] == DEFAULT_MIN)
+            {
+               tmax[i] = DEFAULT_MAX;
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << "cmm scan for max failed! Using default max."
+                  << std::endl;
+            }
+            
+            ossimString band =
+               ossimString("band")+ossimString::toString(i+1)+".";
+
+            if (tmin[i] == DEFAULT_MAX)
+            {
+               tmin[i] = DEFAULT_MIN;
+            }
+            if (tmax[i] == DEFAULT_MIN)
+            {
+            }
+            
+            okwl.add(band + "min_value", tmin[i], true);
+            okwl.add(band + "max_value", tmax[i], true);
+            okwl.add(band + "null_value", tnull[i], true); 
+            
+            if(out_data)
+            {
+               ossimNotify(ossimNotifyLevel_INFO)
+                  << setiosflags(ios::fixed) << setprecision(16)
+                  << "band" << ossimString::toString(i+1) << ".min_value: "
+                  << tmin[i]
+                  << "\nband" << ossimString::toString(i+1) << ".max_value: "
+                  << tmax[i]
+                  << "\nband" << ossimString::toString(i+1) << ".null_value: "
+                  << tnull[i] << endl;
+            }
+         }  // End of band loop.
+
+         //----
+         // ESH 05/2009 -- Fix for ticket #591:
+         // Ingest command errors - when using the ew_ingest -r option
+         //
+         // Add missing info (number of bands, scalar type) to the .omd file
+         //---
+         okwl.add("number_bands",
+                  BANDS,
+                  true);
+         okwl.add("scalar_type",
+                  (ossimScalarTypeLut::instance()->getEntryString(ST)),
+                  true);
+
+         if(!out_data)
+         {
+            okwl.write(omd_file);
+            ossimNotify(ossimNotifyLevel_INFO)
+               << "wrote file:  " << omd_file << endl;
+         }
+         
+      } // End of loop through entries of a file.
+      
+   } // End of loop through file...
+
+   return 0;
+}
diff --git a/src/apps/ossim-computeSrtmStats/CMakeLists.txt b/ossim/src/apps/ossim-computeSrtmStats/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-computeSrtmStats/CMakeLists.txt
rename to ossim/src/apps/ossim-computeSrtmStats/CMakeLists.txt
diff --git a/src/apps/ossim-computeSrtmStats/Makefile b/ossim/src/apps/ossim-computeSrtmStats/Makefile
similarity index 100%
rename from src/apps/ossim-computeSrtmStats/Makefile
rename to ossim/src/apps/ossim-computeSrtmStats/Makefile
diff --git a/src/apps/ossim-computeSrtmStats/makefile.vc b/ossim/src/apps/ossim-computeSrtmStats/makefile.vc
similarity index 100%
rename from src/apps/ossim-computeSrtmStats/makefile.vc
rename to ossim/src/apps/ossim-computeSrtmStats/makefile.vc
diff --git a/src/apps/ossim-computeSrtmStats/ossim-computeSrtmStats.cpp b/ossim/src/apps/ossim-computeSrtmStats/ossim-computeSrtmStats.cpp
similarity index 100%
rename from src/apps/ossim-computeSrtmStats/ossim-computeSrtmStats.cpp
rename to ossim/src/apps/ossim-computeSrtmStats/ossim-computeSrtmStats.cpp
diff --git a/src/apps/ossim-config.in b/ossim/src/apps/ossim-config.in
similarity index 100%
rename from src/apps/ossim-config.in
rename to ossim/src/apps/ossim-config.in
diff --git a/src/apps/ossim-correl/CMakeLists.txt b/ossim/src/apps/ossim-correl/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-correl/CMakeLists.txt
rename to ossim/src/apps/ossim-correl/CMakeLists.txt
diff --git a/src/apps/ossim-correl/Makefile b/ossim/src/apps/ossim-correl/Makefile
similarity index 100%
rename from src/apps/ossim-correl/Makefile
rename to ossim/src/apps/ossim-correl/Makefile
diff --git a/src/apps/ossim-correl/makefile.vc b/ossim/src/apps/ossim-correl/makefile.vc
similarity index 100%
rename from src/apps/ossim-correl/makefile.vc
rename to ossim/src/apps/ossim-correl/makefile.vc
diff --git a/src/apps/ossim-correl/ossim-correl.cpp b/ossim/src/apps/ossim-correl/ossim-correl.cpp
similarity index 100%
rename from src/apps/ossim-correl/ossim-correl.cpp
rename to ossim/src/apps/ossim-correl/ossim-correl.cpp
diff --git a/src/apps/ossim-create-bitmask/CMakeLists.txt b/ossim/src/apps/ossim-create-bitmask/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-create-bitmask/CMakeLists.txt
rename to ossim/src/apps/ossim-create-bitmask/CMakeLists.txt
diff --git a/src/apps/ossim-create-bitmask/ossim-create-bitmask.cpp b/ossim/src/apps/ossim-create-bitmask/ossim-create-bitmask.cpp
similarity index 100%
rename from src/apps/ossim-create-bitmask/ossim-create-bitmask.cpp
rename to ossim/src/apps/ossim-create-bitmask/ossim-create-bitmask.cpp
diff --git a/src/apps/ossim-create-cg/CMakeLists.txt b/ossim/src/apps/ossim-create-cg/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-create-cg/CMakeLists.txt
rename to ossim/src/apps/ossim-create-cg/CMakeLists.txt
diff --git a/src/apps/ossim-create-cg/Makefile b/ossim/src/apps/ossim-create-cg/Makefile
similarity index 100%
rename from src/apps/ossim-create-cg/Makefile
rename to ossim/src/apps/ossim-create-cg/Makefile
diff --git a/src/apps/ossim-create-cg/makefile.vc b/ossim/src/apps/ossim-create-cg/makefile.vc
similarity index 100%
rename from src/apps/ossim-create-cg/makefile.vc
rename to ossim/src/apps/ossim-create-cg/makefile.vc
diff --git a/ossim/src/apps/ossim-create-cg/ossim-create-cg.cpp b/ossim/src/apps/ossim-create-cg/ossim-create-cg.cpp
new file mode 100644
index 0000000..a0dad7b
--- /dev/null
+++ b/ossim/src/apps/ossim-create-cg/ossim-create-cg.cpp
@@ -0,0 +1,144 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author:  David Burken
+//
+// Description:
+//
+// Contains application definition "create_cg" app.
+//
+// It takes an image filename as input and creates a course grid model.
+//
+//*******************************************************************
+//  $Id$
+
+#include <ossim/ossimConfig.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/projection/ossimCoarseGridModel.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+
+int main(int argc, char *argv[])
+{
+   //---
+   // Get the arg count so we can tell if an arg was consumed by
+   // ossimInit::instance()->initialize
+   //---
+   int originalArgCount = argc;
+   
+   ossimArgumentParser argumentParser(&argc, argv);
+   ossimInit::instance()->addOptions(argumentParser);
+   ossimInit::instance()->initialize(argumentParser);
+   
+   if ( (argumentParser.argc() == 1) && (originalArgCount > 1) )
+   {
+      exit(0); // ossimInit consumed all options.
+   }
+
+   ossimString appname = argumentParser.getApplicationName();
+   ossimApplicationUsage* appuse = argumentParser.getApplicationUsage();
+   appuse->setApplicationName(appname);
+   appuse->setDescription(appname+" Creates OSSIM coarse grid geometry from rigorous sensor model.");
+   appuse->setCommandLineUsage(appname+" [options] <image_file>");
+   
+   appuse->addCommandLineOption("-d or --support", 
+      "<geom_path> -- Specifies a supplementary directory path to contain the geom and associated "
+      "grid files. The default is to use the image directory.");
+
+   appuse->addCommandLineOption("-e", 
+      "<error> -- default is 0.1.  This is the maximum difference tolerated in pixels between the "
+      "rigorous model and the computed coarse grid. The smaller this value, the bigger the "
+      "resulting grid.");
+
+   appuse->addCommandLineOption("-s",
+      "<min_line_sample_spacing> -- Specifies the min line sample spacing for the coarse grid. "
+      "Helps in converging. Basically will stop splitting if number of pixels per grid cell gets "
+      "below this number.");
+
+   appuse->addCommandLineOption("-o", 
+      "<base_out_name> -- Specifies a new base output name for the geom and associated grid files. "
+      "The default is to use the base name of the image file with .geom and .ocg extensions. "
+      "If specified then the output is <base_out_name>.geom and <base_out_name>.ocg where the "
+      ".ocg contains the coarse grid data. THIS IS NOT COMMON AND MAY PREVENT OSSIM FROM "
+      "SUBSEQUENTLY LOCATING THE GEOMETRY FILE.");
+
+   appuse->addCommandLineOption("-h or --help", "Shows help");
+
+   if(argumentParser.read("-h") || argumentParser.read("--help") || (argc < 2))
+   {
+      appuse->write(std::cout);
+      exit(0);
+   }
+   
+   // The last argument is always the image filename:
+   ossimFilename image_file = argv[argc-1];
+   
+   double error = 0.1;
+   if(argumentParser.read("-e", error))
+   {
+      if (error < 0.0)
+         error = 0.1;
+   }
+
+   ossim_int32 minSpacing = 100;
+   if(argumentParser.read("-s", minSpacing))
+   {
+      if (minSpacing < 1)
+         minSpacing = 100;
+   }
+   
+   ossimFilename outputBaseName;
+   argumentParser.read("-o", outputBaseName.string());
+
+   ossimFilename outputPath;
+   argumentParser.read("-d", outputPath.string());
+   if (outputPath.empty())
+   {
+      argumentParser.read("--support", outputPath);
+      if (outputPath.empty())
+         outputPath = image_file.path();
+   }
+
+   // Establish image handler for access to rigorous model:
+   ossimRefPtr<ossimImageHandler> ih = ossimImageHandlerRegistry::instance()->open(image_file);
+   if (ih.valid())
+   {
+      // Instantiate the rigorous model:
+      ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
+      if(geom.valid() && geom->getProjection())
+      {
+         // Compute the coarse grid:
+         ossimRefPtr<ossimCoarseGridModel> cg = new ossimCoarseGridModel;
+         cg->setInterpolationError(error);
+         cg->setMinGridSpacing(minSpacing);
+         ossimNotify(ossimNotifyLevel_NOTICE)<<"\nComputing coarse grid..."<<endl;
+         cg->buildGrid(ih->getBoundingRect(), geom.get());
+
+         // If no basename was provided, use the defaults for geom file. PREFERRED:
+         if (outputBaseName.empty())
+            outputBaseName = ih->createDefaultGeometryFilename().file();
+
+         // Save the coarse grid to appropriate location:
+         ossimFilename filename (outputPath.dirCat(outputBaseName));
+         filename.expand();
+         ossimNotify(ossimNotifyLevel_NOTICE)<<"\nSaving OCG grid and geometry to <"
+            <<filename.path()<<">..."<<endl;
+         cg->saveCoarseGrid(filename); // this saves geom file as well
+      }
+   }
+
+   return 0;
+}
+
diff --git a/src/apps/ossim-create-histo/CMakeLists.txt b/ossim/src/apps/ossim-create-histo/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-create-histo/CMakeLists.txt
rename to ossim/src/apps/ossim-create-histo/CMakeLists.txt
diff --git a/src/apps/ossim-create-histo/Makefile b/ossim/src/apps/ossim-create-histo/Makefile
similarity index 100%
rename from src/apps/ossim-create-histo/Makefile
rename to ossim/src/apps/ossim-create-histo/Makefile
diff --git a/src/apps/ossim-create-histo/makefile.vc b/ossim/src/apps/ossim-create-histo/makefile.vc
similarity index 100%
rename from src/apps/ossim-create-histo/makefile.vc
rename to ossim/src/apps/ossim-create-histo/makefile.vc
diff --git a/ossim/src/apps/ossim-create-histo/ossim-create-histo.cpp b/ossim/src/apps/ossim-create-histo/ossim-create-histo.cpp
new file mode 100644
index 0000000..19532c9
--- /dev/null
+++ b/ossim/src/apps/ossim-create-histo/ossim-create-histo.cpp
@@ -0,0 +1,300 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+//*******************************************************************
+//  $Id: create_histo.cpp 11743 2007-09-19 19:57:31Z gpotts $
+
+
+#include <ossim/ossimConfig.h>
+
+#include <iostream>
+#include <vector>
+#include <algorithm>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimMultiResLevelHistogram.h>
+#include <ossim/base/ossimMultiBandHistogram.h>
+#include <ossim/base/ossimHistogram.h>
+#include <ossim/imaging/ossimHistogramWriter.h>
+#include <ossim/imaging/ossimImageHistogramSource.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/imaging/ossimImageSourceSequencer.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+
+
+void usage()
+{
+   cout << "examples:\n"
+	<< " create_histo foo.tif\n"
+	<< "            Will create a histogram for the input image and call\n"
+	<< "            it foo.his\n\n"
+        << " create_histo -i foo.tif -o foo.his\n"
+        << "            this will compute a histogram from the input foo.tif\n"
+        << "            and write it to foo.his\n\n"
+        << " create_histo -p foo2.his -o foo.his\n"
+        << "            will import the proprietary histogram file and output\n"
+        << "            an ossim histogram file to foo.his\n\n"
+        << "NOTE:  If no output is given it will default to output.his\n"
+        << "       unless the special case of a single input image is given\n"
+        << endl;
+}
+
+void importHistogram(const ossimString& importFile,
+                     const ossimString&   outputFile)
+{
+   ossimRefPtr<ossimMultiResLevelHistogram> histo      = new ossimMultiResLevelHistogram;
+
+   histo->importHistogram(importFile);
+   ossimKeywordlist kwl;
+   histo->saveState(kwl);
+   kwl.write(outputFile.c_str());
+}
+
+void computeHistogram(const ossimString& imageOption,
+                      const ossimString& outputOption,
+                      ossim_float64 minValueOverride,
+                      ossim_float64 maxValueOverride,
+                      ossim_int32 numberOfBinsOverride,
+                      ossim_int32 entryNumberOverride,
+                      bool fastMode,
+                      int maxResLevels=1)
+{
+   theStdOutProgress.setFlushStreamFlag(true);
+   ossimRefPtr<ossimImageHandler> handler = ossimImageHandlerRegistry::instance()->open(ossimFilename(imageOption));
+   if(handler.valid())
+   {
+      ossimFilename histogramFile;
+      std::vector<ossim_uint32> entryList;
+      handler->getEntryList(entryList);
+
+      if(entryNumberOverride >= 0)
+      {
+         std::vector<ossim_uint32>::iterator iter= std::find(entryList.begin(),
+                                                             entryList.end(),
+                                                             (ossim_uint32)entryNumberOverride);
+
+         if(iter != entryList.end())
+         {
+            entryList.clear();
+            entryList.push_back(entryNumberOverride);
+         }
+         else
+         {
+            ossimNotify(ossimNotifyLevel_WARN) << "Invalid entry number " << entryNumberOverride << " passed in.  Returning...." << std::endl;
+            return;
+         }
+      }
+      ossim_uint32 idx = 0;
+      for(idx = 0; idx < entryList.size(); ++idx)
+      {
+         ossimNotify(ossimNotifyLevel_NOTICE)<<"entry " << entryList[idx] << std::endl;
+         handler->setCurrentEntry(entryList[idx]);
+
+         // Check handler to see if it's filtering bands.
+         if ( handler->isBandSelector() )
+         { 
+            // Set output list to input.
+            handler->setOutputToInputBandList();
+         }
+         
+         ossimRefPtr<ossimProperty> histogramFilename = handler->getProperty("histogram_filename");
+         if(histogramFilename.valid())
+         {
+            if (outputOption == "")
+            {
+              histogramFile = ossimFilename(histogramFilename->valueToString());
+            }
+            else
+            {
+              histogramFile = outputOption;
+            }
+            
+            ossimRefPtr<ossimImageHistogramSource> histoSource = new ossimImageHistogramSource;
+            ossimRefPtr<ossimHistogramWriter> writer = new ossimHistogramWriter;
+            if(maxResLevels)
+            {
+               histoSource->setMaxNumberOfRLevels(maxResLevels);
+            }
+            else
+            {
+               histoSource->setMaxNumberOfRLevels(handler->getNumberOfDecimationLevels());
+            }
+            if(!ossim::isnan(minValueOverride))
+            {
+               histoSource->setMinValueOverride(minValueOverride);
+            }
+            if(!ossim::isnan(maxValueOverride))
+            {
+               histoSource->setMaxValueOverride(maxValueOverride);
+            }
+            if(numberOfBinsOverride > 0)
+            {
+               histoSource->setNumberOfBinsOverride(numberOfBinsOverride);
+            }
+            if (fastMode)
+            {
+               histoSource->setComputationMode(OSSIM_HISTO_MODE_FAST);
+            }
+            histoSource->connectMyInputTo(0, handler.get());
+            histoSource->enableSource();
+            writer->connectMyInputTo(0, histoSource.get());
+            
+            writer->setFilename(histogramFile);
+            writer->addListener(&theStdOutProgress);
+            writer->execute();
+            writer=0;
+         }
+      }
+   }
+}
+
+int main(int argc, char *argv[])
+{
+   ossimString tempString;
+   ossimArgumentParser::ossimParameter stringParam(tempString);
+   ossimArgumentParser argumentParser(&argc, argv);
+   ossimInit::instance()->addOptions(argumentParser);
+   ossimInit::instance()->initialize(argumentParser);
+   
+   argumentParser.getApplicationUsage()->setApplicationName(argumentParser.getApplicationName());
+   argumentParser.getApplicationUsage()->setDescription(argumentParser.getApplicationName()+" creates a histogram from image.");
+   
+   argumentParser.getApplicationUsage()->setCommandLineUsage(argumentParser.getApplicationName()+" <args>");
+   
+   argumentParser.getApplicationUsage()->addCommandLineOption("-h or --help", "Display this information");
+
+   argumentParser.getApplicationUsage()->addCommandLineOption("-p", "<histogram_file> Imports imagelinks proprietary histogram_file.");
+   
+   argumentParser.getApplicationUsage()->addCommandLineOption("-i", "<image_file> Creates a histogram from the image_file.");
+   
+   argumentParser.getApplicationUsage()->addCommandLineOption("-l", "<res_level> Output the specified number of res levels default is, set to 0 if you want all(not supported for import histogram -i option");
+   argumentParser.getApplicationUsage()->addCommandLineOption("--create-histogram-fast", "Computes a histogram in fast mode which samples partial tiles.");
+   
+   argumentParser.getApplicationUsage()->addCommandLineOption("-o", "<output_file> Output the histogram to the indicated file.");
+
+   argumentParser.getApplicationUsage()->addCommandLineOption("--min",  "Minimum value to use");
+   argumentParser.getApplicationUsage()->addCommandLineOption("--max",  "Maximum value to use");
+   argumentParser.getApplicationUsage()->addCommandLineOption("--bins", "Number of bins to use");
+   argumentParser.getApplicationUsage()->addCommandLineOption("--entry", "entry number to use");
+
+   argumentParser.getApplicationUsage()->addCommandLineOption("-f", "fast mode");
+   
+   ossimString importOption;
+   ossimString imageOption;
+   ossimString outputOption;
+   ossim_uint32 maxLevels = 1;
+   ossim_int32 entry = -1;
+   
+   ossim_float64 minValueOverride = ossim::nan();
+   ossim_float64 maxValueOverride = ossim::nan();
+   ossim_int32   numberOfBinsOverride = -1;
+
+   bool fastMode = false;
+   
+   if ( (argumentParser.read("-h")) || (argumentParser.read("--help")) )
+   {
+      argumentParser.getApplicationUsage()->write(std::cout);
+      usage();
+      exit(0);
+    }
+   
+   if (argumentParser.argc() == 2)
+   {
+      ossimFilename inputImage = argv[1];
+      imageOption = inputImage;
+      if(!inputImage.exists())
+      {
+         cerr << "Image does not exist " << inputImage << endl;
+         exit(1);
+      }
+      maxLevels = 1;
+   }
+   else
+   {
+      if(argumentParser.read("--min", stringParam))
+      {
+         minValueOverride = tempString.toDouble();
+      }
+      if(argumentParser.read("--max", stringParam))
+      {
+         maxValueOverride = tempString.toDouble();
+      }
+      if(argumentParser.read("--bins", stringParam))
+      {
+         numberOfBinsOverride = tempString.toInt32();
+      }
+      if(argumentParser.read("--bins", stringParam))
+      {
+         numberOfBinsOverride = tempString.toInt32();
+      }
+      if(argumentParser.read("--entry", stringParam))
+      {
+         entry = tempString.toInt32();
+      }
+
+      if(argumentParser.read("-o", stringParam))
+      {
+         outputOption = tempString;
+      }
+      
+      if ( argumentParser.read("-f") ||
+           argumentParser.read("--create-histogram-fast"))
+      {
+         fastMode = true;
+      }
+
+      if(argumentParser.read("-p", stringParam))
+      {
+         importOption = tempString;
+      }
+      if(argumentParser.read("-l", stringParam))
+      {
+         ossimString s = tempString;
+         maxLevels = s.toUInt32();
+      }
+   }
+
+   if((importOption != "") && (imageOption  != ""))
+   {
+      cout << "you can either import or create a histogram from an image but\n"
+           << "we can't do both" << endl;
+      exit(1);
+   }
+
+   if(importOption != "")
+   {
+      importHistogram(importOption, "");
+   }
+   else if(argc > 1)
+   {
+      ossim_uint32 idx = 1;
+      while(argv[idx])
+      {
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            <<"file " << argv[idx] << std::endl;
+
+         computeHistogram(ossimString(argv[idx]), outputOption, minValueOverride, maxValueOverride, numberOfBinsOverride, entry, fastMode, maxLevels);
+         ++idx;
+      }
+   }
+   else
+   {
+      argumentParser.getApplicationUsage()->write(std::cout);
+      usage();
+   }
+
+   return 0;
+}
+
diff --git a/src/apps/ossim-deg2dms/CMakeLists.txt b/ossim/src/apps/ossim-deg2dms/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-deg2dms/CMakeLists.txt
rename to ossim/src/apps/ossim-deg2dms/CMakeLists.txt
diff --git a/src/apps/ossim-deg2dms/Makefile b/ossim/src/apps/ossim-deg2dms/Makefile
similarity index 100%
rename from src/apps/ossim-deg2dms/Makefile
rename to ossim/src/apps/ossim-deg2dms/Makefile
diff --git a/src/apps/ossim-deg2dms/makefile.vc b/ossim/src/apps/ossim-deg2dms/makefile.vc
similarity index 100%
rename from src/apps/ossim-deg2dms/makefile.vc
rename to ossim/src/apps/ossim-deg2dms/makefile.vc
diff --git a/ossim/src/apps/ossim-deg2dms/ossim-deg2dms.cpp b/ossim/src/apps/ossim-deg2dms/ossim-deg2dms.cpp
new file mode 100644
index 0000000..01c48aa
--- /dev/null
+++ b/ossim/src/apps/ossim-deg2dms/ossim-deg2dms.cpp
@@ -0,0 +1,113 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Application to convert decimal degrees, to degrees, minutes,
+// seconds (DMS).
+//
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <cstdlib>
+#include <iostream>
+#include <iomanip>
+#include <cmath>
+#include <string>
+#include <sstream>
+
+using namespace std;
+
+void getDegrees(double& deg)
+{
+   std::string s;
+   cout << "Enter degrees:  " << flush;
+   cin >> s;
+   if ( (s == "q") || (s == "Q") )
+   {
+      exit(0);
+   }
+   else
+   {
+      istringstream is(s);
+      is >> deg;
+      if( is.fail() )
+      {
+         cerr << "Must enter a valid number between -180 and 180 for degrees."
+              << "  Exiting..." << endl;
+         exit(1);
+      }
+      else if ( (deg < -180.0) || (deg > 180.0) ) // Check the range.
+      {
+         cerr << "Degrees must be between -180 and 180.  Exiting..."
+              << endl;
+         exit(1);
+      }
+   }
+}
+   
+int main(int argc, char* argv[])
+{
+   enum
+   {
+      FOREVER=1
+   };
+
+   if (argc != 1)
+   {
+      cout << "Usage: " << argv[0]
+           << "\nThis application will convert decimal degrees to degrees, "
+           << "minutes, seconds.\nIt take no arguments, you will be prompted "
+           << "for the decimal degrees.\n" << endl;
+      return 0;
+   }
+   
+   cout << "\nEnter \"q\" to quit.\n\n";
+
+   double deg = 0.0;
+   double min = 0.0;
+   double sec = 0.0;
+   int degInt = 0;
+   int minInt = 0;
+
+   cout << setiosflags(ios::fixed) << setprecision(15);
+
+   while (FOREVER)
+   {
+      // Get the degrees.
+      getDegrees(deg);
+
+      // Compute the answer.
+      
+      bool isNegative = (deg < 0.0);
+
+      if (isNegative)
+      {
+         deg = fabs(deg);
+      }
+
+      degInt = static_cast<int>(deg);
+      
+      min = (deg - degInt) * 60.0;
+
+      minInt = static_cast<int>(min);
+      
+      sec = (min - minInt) * 60.0;
+
+      if (isNegative)
+      {
+         deg = -deg;
+      }
+      cout << deg << " = "
+           << (isNegative?"-":"") << degInt << " degrees, "
+           << minInt << " minutes, "
+           << sec << " seconds."
+           << endl;
+   }
+      
+   return 0;
+}
+
diff --git a/src/apps/ossim-dms2deg/CMakeLists.txt b/ossim/src/apps/ossim-dms2deg/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-dms2deg/CMakeLists.txt
rename to ossim/src/apps/ossim-dms2deg/CMakeLists.txt
diff --git a/src/apps/ossim-dms2deg/Makefile b/ossim/src/apps/ossim-dms2deg/Makefile
similarity index 100%
rename from src/apps/ossim-dms2deg/Makefile
rename to ossim/src/apps/ossim-dms2deg/Makefile
diff --git a/src/apps/ossim-dms2deg/makefile.vc b/ossim/src/apps/ossim-dms2deg/makefile.vc
similarity index 100%
rename from src/apps/ossim-dms2deg/makefile.vc
rename to ossim/src/apps/ossim-dms2deg/makefile.vc
diff --git a/ossim/src/apps/ossim-dms2deg/ossim-dms2deg.cpp b/ossim/src/apps/ossim-dms2deg/ossim-dms2deg.cpp
new file mode 100644
index 0000000..12fbc2e
--- /dev/null
+++ b/ossim/src/apps/ossim-dms2deg/ossim-dms2deg.cpp
@@ -0,0 +1,167 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Application to convert degrees, minutes seconds (DMS) 
+// to decimal degrees.
+//
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <cstdlib>
+#include <iostream>
+#include <iomanip>
+#include <cmath>
+#include <string>
+#include <sstream>
+
+using namespace std;
+
+void getDegrees(double& deg)
+{
+   std::string s;
+   cout << "Enter degrees:  " << flush;
+   cin >> s;
+   if ( (s == "q") || (s == "Q") )
+   {
+      exit(0);
+   }
+   else
+   {
+      istringstream is(s);
+      is >> deg;
+      if( is.fail() )
+      {
+         cerr << "Must enter a valid number between -180 and 180 for degrees."
+              << "  Exiting..." << endl;
+         exit(1);
+      }
+      else if ( (deg < -180.0) || (deg > 180.0) ) // Check the range.
+      {
+         cerr << "Degrees must be between -180 and 180.  Exiting..."
+              << endl;
+         exit(1);
+      }
+   }
+}
+   
+void getMinutes(double& min)
+{
+   std::string s;
+   cout << "Enter minutes:  " << flush;
+   cin >> s;
+   if ( (s == "q") || (s == "Q") )
+   {
+      exit(0);
+   }
+   else
+   {
+      istringstream is(s);
+      is >> min;
+      if(is.fail())
+      {
+         cerr << "Must enter a valid number between 0 and 60 for minutes."
+              << "  Exiting..." << endl;
+         exit(1);
+      }
+      else if ( (min < 0.0) || (min > 60.0) ) // Check the range.
+      {
+         cerr << "Minutes must be between 0 and 60.  Exiting\n";
+         exit(1);
+      }
+   }
+}
+
+void getSeconds(double& sec)
+{
+   std::string s;
+   cout << "Enter seconds:  " << flush;
+   cin >> s;
+   if ( (s == "q") || (s == "Q") )
+   {
+      exit(0);
+   }
+   else
+   {
+      istringstream is(s);
+      is >> sec;
+      if( is.fail() )
+      {
+         cerr << "Must enter a valid number between 0 and 60 for seconds."
+              << "  Exiting..." << endl;
+         exit(1);
+      }
+      else if ( (sec < 0.0) || (sec > 60.0) ) // Check the range. 
+      {
+         cerr << "Seconds must be between 0 and 60.  Exiting\n";
+         exit(1);
+      }
+   }
+}
+
+int main(int argc, char* argv[])
+{
+   enum
+   {
+      FOREVER=1
+   };
+
+   if (argc != 1)
+   {
+      cout << "Usage: " << argv[0]
+           << "\nThis application will convert degrees, minutes, seconds to "
+           << "decimal degrees.\nIt take no arguments, you will be prompted "
+           << "for the degrees, minutes, seconds.\n" << endl;
+      return 0;
+   }
+
+   
+   cout << "\nEnter \"q\" to quit.\n\n";
+
+   double deg = 0.0;
+   double min = 0.0;
+   double sec = 0.0;
+
+   cout << setiosflags(ios::fixed) << setprecision(15);
+
+   while (FOREVER)
+   {
+      // Get the degrees.
+      getDegrees(deg);
+
+      // Get the minutes.
+      getMinutes(min);
+
+      // Get the the seconds.
+      getSeconds(sec);
+
+      // Compute the answer.
+      if (deg < 0.0)
+      {
+         double d = fabs(deg);
+         deg = -(d + min/60.0 + sec/3600.0);
+      }
+      else
+      {
+         deg = deg + min/60.0 + sec/3600.0;
+      }
+
+      if ( deg < -180.0 )
+      {
+         deg += 360.0;
+      }
+      else if ( deg > 180.0 )
+      {
+         deg -= 360.0;
+      }
+      cout << "Decimal degrees = " << deg << "\n" << endl;
+      
+   }
+      
+   return 0;
+}
+
diff --git a/src/apps/ossim-dump-ocg/CMakeLists.txt b/ossim/src/apps/ossim-dump-ocg/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-dump-ocg/CMakeLists.txt
rename to ossim/src/apps/ossim-dump-ocg/CMakeLists.txt
diff --git a/src/apps/ossim-dump-ocg/Makefile b/ossim/src/apps/ossim-dump-ocg/Makefile
similarity index 100%
rename from src/apps/ossim-dump-ocg/Makefile
rename to ossim/src/apps/ossim-dump-ocg/Makefile
diff --git a/src/apps/ossim-dump-ocg/makefile.vc b/ossim/src/apps/ossim-dump-ocg/makefile.vc
similarity index 100%
rename from src/apps/ossim-dump-ocg/makefile.vc
rename to ossim/src/apps/ossim-dump-ocg/makefile.vc
diff --git a/src/apps/ossim-dump-ocg/ossim-dump-ocg.cpp b/ossim/src/apps/ossim-dump-ocg/ossim-dump-ocg.cpp
similarity index 100%
rename from src/apps/ossim-dump-ocg/ossim-dump-ocg.cpp
rename to ossim/src/apps/ossim-dump-ocg/ossim-dump-ocg.cpp
diff --git a/ossim/src/apps/ossim-equation/CMakeLists.txt b/ossim/src/apps/ossim-equation/CMakeLists.txt
new file mode 100644
index 0000000..9d4b06f
--- /dev/null
+++ b/ossim/src/apps/ossim-equation/CMakeLists.txt
@@ -0,0 +1,2 @@
+FILE(GLOB SOURCE_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
+OSSIM_SETUP_APPLICATION(ossim-equation INSTALL COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ${SOURCE_FILES})
diff --git a/ossim/src/apps/ossim-equation/Makefile b/ossim/src/apps/ossim-equation/Makefile
new file mode 100644
index 0000000..8e1a9c7
--- /dev/null
+++ b/ossim/src/apps/ossim-equation/Makefile
@@ -0,0 +1,3 @@
+PROGRAM=ossim-equation
+
+include ../../../makeprog.mak
diff --git a/ossim/src/apps/ossim-equation/makefile.vc b/ossim/src/apps/ossim-equation/makefile.vc
new file mode 100644
index 0000000..7a90ef9
--- /dev/null
+++ b/ossim/src/apps/ossim-equation/makefile.vc
@@ -0,0 +1,11 @@
+###
+# $Id: makefile.vc 12829 2008-05-08 19:42:50Z dburken $
+# 
+# nmake makefile
+#
+# Typical usage:  nmake /f makefile.vc
+###
+
+PROGRAM=ossim-equation
+
+!include ..\makefile.inc
diff --git a/ossim/src/apps/ossim-equation/ossim-equation.cpp b/ossim/src/apps/ossim-equation/ossim-equation.cpp
new file mode 100644
index 0000000..02b7714
--- /dev/null
+++ b/ossim/src/apps/ossim-equation/ossim-equation.cpp
@@ -0,0 +1,28 @@
+//*******************************************************************
+// OSSIM
+//
+// License:  See top level LICENSE.txt file.
+//
+//*******************************************************************
+//  $Id: ossim-equation.cpp 23407 2015-07-06 15:59:23Z okramer $
+#include <iostream>
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/util/ossimEquationUtil.h>
+
+using namespace std;
+
+int main(int argc, char *argv[])
+{
+	ossimArgumentParser argParser(&argc, argv);
+	ossimInit::instance()->addOptions(argParser);
+	ossimInit::instance()->initialize(argParser);
+
+   // Run:
+	ossimEquationUtil equationUtil (argParser);
+   bool success = equationUtil.execute();
+
+   if (success)
+      exit(0);
+   exit(1);
+}
diff --git a/src/apps/ossim-extract-vertices/CMakeLists.txt b/ossim/src/apps/ossim-extract-vertices/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-extract-vertices/CMakeLists.txt
rename to ossim/src/apps/ossim-extract-vertices/CMakeLists.txt
diff --git a/src/apps/ossim-extract-vertices/Makefile b/ossim/src/apps/ossim-extract-vertices/Makefile
similarity index 100%
rename from src/apps/ossim-extract-vertices/Makefile
rename to ossim/src/apps/ossim-extract-vertices/Makefile
diff --git a/src/apps/ossim-extract-vertices/makefile.vc b/ossim/src/apps/ossim-extract-vertices/makefile.vc
similarity index 100%
rename from src/apps/ossim-extract-vertices/makefile.vc
rename to ossim/src/apps/ossim-extract-vertices/makefile.vc
diff --git a/src/apps/ossim-extract-vertices/ossim-extract-vertices.cpp b/ossim/src/apps/ossim-extract-vertices/ossim-extract-vertices.cpp
similarity index 100%
rename from src/apps/ossim-extract-vertices/ossim-extract-vertices.cpp
rename to ossim/src/apps/ossim-extract-vertices/ossim-extract-vertices.cpp
diff --git a/ossim/src/apps/ossim-hlz/CMakeLists.txt b/ossim/src/apps/ossim-hlz/CMakeLists.txt
new file mode 100644
index 0000000..c148779
--- /dev/null
+++ b/ossim/src/apps/ossim-hlz/CMakeLists.txt
@@ -0,0 +1,2 @@
+FILE(GLOB SOURCE_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
+OSSIM_SETUP_APPLICATION(ossim-hlz INSTALL COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ${SOURCE_FILES})
diff --git a/ossim/src/apps/ossim-hlz/Makefile b/ossim/src/apps/ossim-hlz/Makefile
new file mode 100644
index 0000000..bd35d60
--- /dev/null
+++ b/ossim/src/apps/ossim-hlz/Makefile
@@ -0,0 +1,3 @@
+PROGRAM=ossim-hlz
+
+include ../../../makeprog.mak
diff --git a/ossim/src/apps/ossim-hlz/makefile.vc b/ossim/src/apps/ossim-hlz/makefile.vc
new file mode 100644
index 0000000..8e9624f
--- /dev/null
+++ b/ossim/src/apps/ossim-hlz/makefile.vc
@@ -0,0 +1,11 @@
+###
+# $Id: makefile.vc 12829 2008-05-08 19:42:50Z dburken $
+# 
+# nmake makefile
+#
+# Typical usage:  nmake /f makefile.vc
+###
+
+PROGRAM=ossim-hlz
+
+!include ..\makefile.inc
diff --git a/ossim/src/apps/ossim-hlz/ossim-hlz.cpp b/ossim/src/apps/ossim-hlz/ossim-hlz.cpp
new file mode 100644
index 0000000..f1b11d4
--- /dev/null
+++ b/ossim/src/apps/ossim-hlz/ossim-hlz.cpp
@@ -0,0 +1,58 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author:  Oscar Kramer
+//
+// Description:
+//
+// Application for finding helicopter landing zones (HLZ) on a DEM given the final destination and
+// max range from destination.
+//
+//*******************************************************************
+//  $Id: ossim-hlz.cpp 23167 2015-02-24 22:07:14Z okramer $
+
+#include <iostream>
+using namespace std;
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimTimer.h>
+#include <ossim/util/ossimHLZUtil.h>
+
+int main(int argc, char *argv[])
+{
+   ossimArgumentParser ap(&argc, argv);
+   ap.getApplicationUsage()->setApplicationName(argv[0]);
+
+   // While in development mode, echo the command line for logging:
+   cout<<"\nCommand: ";
+   for (int i=0; i<argc; ++i)
+      cout<<" "<<argv[i];
+   cout<<"\n"<<endl;
+
+   // Initialize ossim stuff, factories, plugin, etc.
+   ossimInit::instance()->initialize(ap);
+
+   double t0 = ossimTimer::instance()->time_s();
+
+   ossimRefPtr<ossimHLZUtil> hlz = new ossimHLZUtil;
+   if (!hlz->parseCommand(ap))
+      exit(1);
+
+   // Add a listener for the percent complete to standard output.
+   ossimStdOutProgress prog(0, true);
+   hlz->addListener(&prog);
+   
+   // Start the viewshed process:
+   bool success = hlz->execute();
+   hlz = 0;
+   
+   double dt = ossimTimer::instance()->time_s() - t0;
+   cout << argv[0] << "Elapsed Time: " << dt << " s\n" << endl;
+   if (success)
+      exit(0);
+   exit(1);
+}
diff --git a/src/apps/ossim-icp/CMakeLists.txt b/ossim/src/apps/ossim-icp/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-icp/CMakeLists.txt
rename to ossim/src/apps/ossim-icp/CMakeLists.txt
diff --git a/src/apps/ossim-icp/Makefile b/ossim/src/apps/ossim-icp/Makefile
similarity index 100%
copy from src/apps/ossim-icp/Makefile
copy to ossim/src/apps/ossim-icp/Makefile
diff --git a/src/apps/ossim-icp/makefile.vc b/ossim/src/apps/ossim-icp/makefile.vc
similarity index 100%
copy from src/apps/ossim-icp/makefile.vc
copy to ossim/src/apps/ossim-icp/makefile.vc
diff --git a/src/apps/ossim-icp/ossim-icp.cpp b/ossim/src/apps/ossim-icp/ossim-icp.cpp
similarity index 100%
rename from src/apps/ossim-icp/ossim-icp.cpp
rename to ossim/src/apps/ossim-icp/ossim-icp.cpp
diff --git a/src/apps/ossim-igen/CMakeLists.txt b/ossim/src/apps/ossim-igen/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-igen/CMakeLists.txt
rename to ossim/src/apps/ossim-igen/CMakeLists.txt
diff --git a/src/apps/ossim-igen/Makefile b/ossim/src/apps/ossim-igen/Makefile
similarity index 100%
rename from src/apps/ossim-igen/Makefile
rename to ossim/src/apps/ossim-igen/Makefile
diff --git a/src/apps/ossim-igen/makefile.vc b/ossim/src/apps/ossim-igen/makefile.vc
similarity index 100%
rename from src/apps/ossim-igen/makefile.vc
rename to ossim/src/apps/ossim-igen/makefile.vc
diff --git a/src/apps/ossim-igen/ossim-igen.cpp b/ossim/src/apps/ossim-igen/ossim-igen.cpp
similarity index 100%
rename from src/apps/ossim-igen/ossim-igen.cpp
rename to ossim/src/apps/ossim-igen/ossim-igen.cpp
diff --git a/src/apps/ossim-image-compare/CMakeLists.txt b/ossim/src/apps/ossim-image-compare/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-image-compare/CMakeLists.txt
rename to ossim/src/apps/ossim-image-compare/CMakeLists.txt
diff --git a/src/apps/ossim-image-compare/ossim-image-compare.cpp b/ossim/src/apps/ossim-image-compare/ossim-image-compare.cpp
similarity index 100%
rename from src/apps/ossim-image-compare/ossim-image-compare.cpp
rename to ossim/src/apps/ossim-image-compare/ossim-image-compare.cpp
diff --git a/ossim/src/apps/ossim-image-synth/CMakeLists.txt b/ossim/src/apps/ossim-image-synth/CMakeLists.txt
new file mode 100644
index 0000000..99a87d1
--- /dev/null
+++ b/ossim/src/apps/ossim-image-synth/CMakeLists.txt
@@ -0,0 +1,2 @@
+FILE(GLOB SOURCE_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
+OSSIM_SETUP_APPLICATION(ossim-image-synth INSTALL COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ${SOURCE_FILES})
diff --git a/ossim/src/apps/ossim-image-synth/Makefile b/ossim/src/apps/ossim-image-synth/Makefile
new file mode 100644
index 0000000..34e6feb
--- /dev/null
+++ b/ossim/src/apps/ossim-image-synth/Makefile
@@ -0,0 +1,3 @@
+PROGRAM=ossim-image-synth
+
+include ../../../makeprog.mak
diff --git a/ossim/src/apps/ossim-image-synth/makefile.vc b/ossim/src/apps/ossim-image-synth/makefile.vc
new file mode 100644
index 0000000..0e43496
--- /dev/null
+++ b/ossim/src/apps/ossim-image-synth/makefile.vc
@@ -0,0 +1,11 @@
+###
+# $Id: makefile.vc 12829 2008-05-08 19:42:50Z dburken $
+# 
+# nmake makefile
+#
+# Typical usage:  nmake /f makefile.vc
+###
+
+PROGRAM=ossim-image-synth
+
+!include ..\makefile.inc
diff --git a/ossim/src/apps/ossim-image-synth/ossim-image-synth.cpp b/ossim/src/apps/ossim-image-synth/ossim-image-synth.cpp
new file mode 100644
index 0000000..ac80b2b
--- /dev/null
+++ b/ossim/src/apps/ossim-image-synth/ossim-image-synth.cpp
@@ -0,0 +1,184 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Description: Utility to generate custom synthesized image for testing code..
+//
+// $Id: ossim-image-synth.cpp 23163 2015-02-23 16:04:05Z okramer $
+//----------------------------------------------------------------------------
+
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimTiffWriter.h>
+#include <ossim/imaging/ossimMemoryImageSource.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <cmath>
+#include <sstream>
+#include <iostream>
+
+using namespace std;
+
+int main(int argc, char *argv[])
+{
+   int returnCode = 0;
+   
+   ossimArgumentParser ap(&argc, argv);
+   ossimInit::instance()->addOptions(ap);
+   ossimInit::instance()->initialize(ap);
+   
+   if ( (ap.argc() < 2) || ap.read("-h") || ap.read("--help") )
+   {
+      cout << "\nUsage: "<<ap[0]<<" <filename>\n"<<endl;
+      return 0;
+   }
+
+   ossimFilename filename = ap[1];
+   filename.setExtension(".tif");
+
+   // Set the destination image size:
+   ossimIpt image_size (256 , 256);
+   ossimRefPtr<ossimImageData> outImage =
+         ossimImageDataFactory::instance()->create(0, OSSIM_FLOAT32, 1, image_size.x, image_size.y);
+   if(outImage.valid())
+      outImage->initialize();
+   else
+      return -1;
+   
+   // Fill the buffer with test image pattern. Start with fill:
+   outImage->fill(1);
+
+   // Establish the image geometry's map projection:
+   ossimGpt observerGpt (0, 0, 0);
+   ossimDpt gsd (1.0, 1.0); // must be same value in both directions
+   ossimRefPtr<ossimEquDistCylProjection> mapProj = new ossimEquDistCylProjection();
+   mapProj->setOrigin(observerGpt);
+   mapProj->setMetersPerPixel(gsd);
+   ossimDpt degPerPixel (mapProj->getDecimalDegreesPerPixel());
+   mapProj->setElevationLookupFlag(false);
+   ossimGpt ulTiePt (observerGpt);
+   ulTiePt.lat += degPerPixel.lat * (image_size.y-1)/2.0;
+   ulTiePt.lon -= degPerPixel.lon * (image_size.x-1)/2.0;
+   mapProj->setUlTiePoints(ulTiePt);
+   ossimRefPtr<ossimImageGeometry> geometry = new ossimImageGeometry(0, mapProj.get());
+   geometry->setImageSize(image_size);
+
+   // Define different tile textures: noisy, inclined, flat, combo.
+   ossim_uint32 tile_size = 32;
+
+   // Start with noisy tiles below and above amplitude threshold:
+   ossim_uint32 buf_size = tile_size*tile_size;
+   ossimRefPtr<ossimImageData> noisy_tile1 =
+         ossimImageDataFactory::instance()->create(0, OSSIM_FLOAT32, 1, tile_size, tile_size);
+   noisy_tile1->initialize();
+   ossim_float32* noisy_buf1 = noisy_tile1->getFloatBuf();
+
+   ossimRefPtr<ossimImageData> noisy_tile2 =
+         ossimImageDataFactory::instance()->create(0, OSSIM_FLOAT32, 1, tile_size, tile_size);
+   noisy_tile2->initialize();
+   ossim_float32* noisy_buf2 = noisy_tile2->getFloatBuf();
+
+   float noiseAmplitude1 = 0.5; // meters
+   float noiseAmplitude2 = 5.0; // meters
+   srand (time(NULL));
+   for (ossim_uint32 i=0; i<buf_size; ++i)
+   {
+      noisy_buf1[i] = 1.0 + noiseAmplitude1 * ((float)rand()/(float)RAND_MAX - 0.5);
+      noisy_buf2[i] = 1.0 + noiseAmplitude2 * ((float)rand()/(float)RAND_MAX - 0.5);
+   }
+
+   // Inclined planes below and above inclination threshold.
+   // Eq. of plane in terms of azimuth and inclination is: z = -tan(in) [ x sin(az) + y cos(az) ]
+   ossimRefPtr<ossimImageData> incline_tile1 =
+         ossimImageDataFactory::instance()->create(0, OSSIM_FLOAT32, 1, tile_size, tile_size);
+   incline_tile1->initialize();
+   ossim_float32* incline_buf1 = incline_tile1->getFloatBuf();
+
+   ossimRefPtr<ossimImageData> incline_tile2 =
+         ossimImageDataFactory::instance()->create(0, OSSIM_FLOAT32, 1, tile_size, tile_size);
+   incline_tile2->initialize();
+   ossim_float32* incline_buf2 = incline_tile2->getFloatBuf();
+
+   double azimuth = 45.0; // degrees azimuth, horizontal component of surface normal
+   double inclination1 = 2.0; // degrees inclination of surface normal from local vertical
+   double inclination2 = 8.0; // (above threshold)
+   double sinAz = ossim::sind(azimuth);
+   double cosAz = ossim::cosd(azimuth);
+   double x0 = tile_size/2.0;
+   double y0 = tile_size/2.0;
+   double gain1 = -gsd.x * ossim::tand(inclination1);
+   double gain2 = -gsd.x * ossim::tand(inclination2);
+   for (ossim_uint32 y=0; y<tile_size; ++y)
+   {
+      for (ossim_uint32 x=0; x<tile_size; ++x)
+      {
+         incline_tile1->setValue(x, y, 1.0 + gain1*((x-x0)*sinAz + (y-y0)*cosAz));
+         incline_tile2->setValue(x, y, 1.0 + gain2*((x-x0)*sinAz + (y-y0)*cosAz));
+      }
+   }
+
+   // Create hybrid incline and noisy, below and above threshold:
+   ossimRefPtr<ossimImageData> hybrid_tile1 =
+         ossimImageDataFactory::instance()->create(0, OSSIM_FLOAT32, 1, tile_size, tile_size);
+   hybrid_tile1->initialize();
+   ossim_float32* hybrid_buf1 = hybrid_tile1->getFloatBuf();
+
+   ossimRefPtr<ossimImageData> hybrid_tile2 =
+         ossimImageDataFactory::instance()->create(0, OSSIM_FLOAT32, 1, tile_size, tile_size);
+   hybrid_tile2->initialize();
+   ossim_float32* hybrid_buf2 = hybrid_tile2->getFloatBuf();
+
+   for (ossim_uint32 i=0; i<buf_size; ++i)
+   {
+      hybrid_buf1[i] = noisy_buf1[i] + incline_buf1[i] - 1.0;
+      hybrid_buf2[i] = noisy_buf2[i] + incline_buf2[i] - 1.0;
+   }
+
+   // Create plateau:
+   ossimRefPtr<ossimImageData> plateau_tile =
+         ossimImageDataFactory::instance()->create(0, OSSIM_FLOAT32, 1, tile_size, tile_size);
+   plateau_tile->initialize();
+   plateau_tile->fill(5.0);
+
+   // Now populate the output buffer with tiles: XXXOXOXXOXXOXOO
+   std::vector<ossimImageData*> tiles;
+   tiles.push_back(noisy_tile1.get());
+   tiles.push_back(noisy_tile2.get());
+   tiles.push_back(incline_tile1.get());
+   tiles.push_back(incline_tile2.get());
+   tiles.push_back(hybrid_tile1.get());
+   tiles.push_back(hybrid_tile2.get());
+   tiles.push_back(plateau_tile.get());
+   ossimImageData* tile;
+   ossim_uint32 tiles_idx = 0;
+   ossimIpt tile_origin(0,0);
+   for (tile_origin.y=0; tile_origin.y<image_size.y; tile_origin.y+=tile_size)
+   {
+      for (tile_origin.x=0; tile_origin.x<image_size.x; tile_origin.x+=tile_size)
+      {
+         tile = tiles[tiles_idx++];
+         if (tiles_idx == tiles.size())
+            tiles_idx = 0;
+         tile->setOrigin(tile_origin);
+         outImage->loadTile(tile);
+      }
+   }
+
+   // Create output image chain:
+   ossimRefPtr<ossimMemoryImageSource> memSource = new ossimMemoryImageSource;
+   memSource->setImage(outImage);
+   memSource->setImageGeometry(geometry.get());
+
+   ossimRefPtr<ossimTiffWriter> writer = new ossimTiffWriter();
+   writer->connectMyInputTo(0, memSource.get());
+   writer->setFilename(filename);
+   writer->setGeotiffFlag(true);
+   bool success = writer->execute();
+
+   return 0;
+}
diff --git a/src/apps/ossim-img2md/CMakeLists.txt b/ossim/src/apps/ossim-img2md/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-img2md/CMakeLists.txt
rename to ossim/src/apps/ossim-img2md/CMakeLists.txt
diff --git a/src/apps/ossim-img2md/Makefile b/ossim/src/apps/ossim-img2md/Makefile
similarity index 100%
rename from src/apps/ossim-img2md/Makefile
rename to ossim/src/apps/ossim-img2md/Makefile
diff --git a/src/apps/ossim-img2md/makefile.vc b/ossim/src/apps/ossim-img2md/makefile.vc
similarity index 100%
rename from src/apps/ossim-img2md/makefile.vc
rename to ossim/src/apps/ossim-img2md/makefile.vc
diff --git a/ossim/src/apps/ossim-img2md/ossim-img2md.cpp b/ossim/src/apps/ossim-img2md/ossim-img2md.cpp
new file mode 100644
index 0000000..abd80e4
--- /dev/null
+++ b/ossim/src/apps/ossim-img2md/ossim-img2md.cpp
@@ -0,0 +1,160 @@
+//----------------------------------------------------------------------------
+// Copyright (c) 2005, David Burken, all rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:  Application to output metadata given meta data type,
+// source image, output file.  Additional keywords can be passed to writer
+// via the "-t" option which takes a keyword list.
+//
+//----------------------------------------------------------------------------
+// $Id: img2md.cpp 9111 2006-06-14 12:34:08Z gpotts $
+
+#include <iostream>
+#include <iterator>
+using namespace std;
+
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimImageMetaDataWriterRegistry.h>
+#include <ossim/imaging/ossimMetadataFileWriter.h>
+
+static void outputWriterTypes();
+static void usage();
+
+int main(int argc, char* argv[])
+{
+   std::string tempString;
+   ossimArgumentParser::ossimParameter stringParam(tempString);
+   ossimArgumentParser argumentParser(&argc, argv);
+   ossimInit::instance()->addOptions(argumentParser);
+   ossimInit::instance()->initialize(argumentParser);
+   
+   argumentParser.getApplicationUsage()->setApplicationName(
+      argumentParser.getApplicationName());
+   
+   argumentParser.getApplicationUsage()->setDescription(
+      argumentParser.getApplicationName()+" outputs metadata for an image.");
+   
+   argumentParser.getApplicationUsage()->setCommandLineUsage(
+      argumentParser.getApplicationName()+" [options] <metadata_writer> <input_file> <output_file>");
+
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "-h or --help", "Shows help");
+
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "-t or --template", "Template to pass to meta data writer.");
+   
+   //---
+   // Extract optional arguments.
+   //---
+   ossimFilename templateFile = ossimFilename::NIL;
+        
+   if(argumentParser.read("-h") || argumentParser.read("--help"))
+   {
+      argumentParser.getApplicationUsage()->write(std::cout);
+      usage(); // For metadata writer types.
+      exit(0);
+   }
+   if( argumentParser.read("-t", stringParam) ||
+       argumentParser.read("--template", stringParam) )
+   {
+      templateFile = tempString.c_str();
+   }
+   
+   argumentParser.reportRemainingOptionsAsUnrecognized();
+   if (argumentParser.errors())
+   {
+      argumentParser.writeErrorMessages(std::cout);
+      exit(1);
+   }
+
+   if(argumentParser.argc() < 4)
+   {
+      argumentParser.getApplicationUsage()->write(std::cout);
+      usage(); // For metadata writer types.
+      exit(1);
+   }
+   
+   ossimString   metaDataWriterType = argumentParser.argv()[1];
+   ossimFilename imageFile          = argumentParser.argv()[2];
+   ossimFilename outputFile         = argumentParser.argv()[3];
+   
+   ossimRefPtr<ossimImageHandler> ih =
+      ossimImageHandlerRegistry::instance()->open(imageFile);
+   if (!ih)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "Could not open:  " << imageFile << endl; 
+   }
+
+   metaDataWriterType.downcase();
+   
+   ossimRefPtr<ossimMetadataFileWriter> mw =
+      ossimImageMetaDataWriterRegistry::instance()->createWriter(
+         metaDataWriterType);
+   if (!mw)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "Could not create meta data writer of type:  "
+         << metaDataWriterType << endl;
+      exit(1);
+   }
+
+   ossimKeywordlist kwl;
+   kwl.add(ossimKeywordNames::FILENAME_KW, outputFile.c_str());
+
+   if (templateFile != ossimFilename::NIL)
+   {
+      if (kwl.addFile(templateFile) == false)
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "Could not load template file:  "
+            << templateFile << endl;
+         exit(1);
+      }
+   }
+
+   mw->loadState(kwl);
+
+   mw->connectMyInputTo(ih.get());
+
+   if (mw->execute() == true)
+   {
+      ossimNotify(ossimNotifyLevel_NOTICE)
+         << "Wrote file:  " << outputFile.c_str() << endl;
+   }
+   
+   return 0;
+}
+
+void usage()
+{
+   cout << "\nNOTES:"
+        << "\nValid metadata writer types:"
+        << "\n";
+   outputWriterTypes();
+}
+
+void outputWriterTypes()
+{
+   std::vector<ossimString> metadatatypeList;
+   
+   ossimImageMetaDataWriterRegistry::instance()->getMetadatatypeList(
+      metadatatypeList);
+   
+   std::copy(metadatatypeList.begin(),
+             metadatatypeList.end(),
+             std::ostream_iterator<ossimString>(std::cout, "\t\n"));
+}
+
diff --git a/src/apps/ossim-img2rr/CMakeLists.txt b/ossim/src/apps/ossim-img2rr/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-img2rr/CMakeLists.txt
rename to ossim/src/apps/ossim-img2rr/CMakeLists.txt
diff --git a/src/apps/ossim-img2rr/Makefile b/ossim/src/apps/ossim-img2rr/Makefile
similarity index 100%
rename from src/apps/ossim-img2rr/Makefile
rename to ossim/src/apps/ossim-img2rr/Makefile
diff --git a/src/apps/ossim-img2rr/makefile.vc b/ossim/src/apps/ossim-img2rr/makefile.vc
similarity index 100%
rename from src/apps/ossim-img2rr/makefile.vc
rename to ossim/src/apps/ossim-img2rr/makefile.vc
diff --git a/src/apps/ossim-img2rr/ossim-img2rr.cpp b/ossim/src/apps/ossim-img2rr/ossim-img2rr.cpp
similarity index 100%
rename from src/apps/ossim-img2rr/ossim-img2rr.cpp
rename to ossim/src/apps/ossim-img2rr/ossim-img2rr.cpp
diff --git a/src/apps/ossim-info/CMakeLists.txt b/ossim/src/apps/ossim-info/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-info/CMakeLists.txt
rename to ossim/src/apps/ossim-info/CMakeLists.txt
diff --git a/src/apps/ossim-info/Makefile b/ossim/src/apps/ossim-info/Makefile
similarity index 100%
rename from src/apps/ossim-info/Makefile
rename to ossim/src/apps/ossim-info/Makefile
diff --git a/src/apps/ossim-info/makefile.vc b/ossim/src/apps/ossim-info/makefile.vc
similarity index 100%
rename from src/apps/ossim-info/makefile.vc
rename to ossim/src/apps/ossim-info/makefile.vc
diff --git a/ossim/src/apps/ossim-info/ossim-info.cpp b/ossim/src/apps/ossim-info/ossim-info.cpp
new file mode 100644
index 0000000..1efe0f1
--- /dev/null
+++ b/ossim/src/apps/ossim-info/ossim-info.cpp
@@ -0,0 +1,71 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossim-info.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/util/ossimInfo.h>
+
+#include <iostream>
+using namespace std;
+
+int main(int argc, char *argv[])
+{
+   //---
+   // Get the arg count so we can tell if an arg was consumed by
+   // ossimInit::instance()->initialize
+   //---
+   int originalArgCount = argc;
+
+   ossimArgumentParser ap(&argc, argv);
+
+   // Initialize ossim stuff, factories, plugin, etc.
+   ossimInit::instance()->initialize(ap);
+
+   //---
+   // Avoid going on if a global option was consumed by ossimInit::initialize
+   // like -V or --version option and the arg count is down to 1.
+   //---
+   if ( ( ap.argc() > 1 ) || ( ap.argc() == originalArgCount ) )
+   {
+      // Make the info object.
+      ossimRefPtr<ossimInfo> oi = new ossimInfo;
+
+      try
+      {
+         //---
+         // Initialize will take the options passed in and set things to output
+         // information for.
+         //
+         // ossimInfo::initialize can throw an exception.
+         //---
+         bool continue_after_init = oi->initialize(ap);
+
+         if ( continue_after_init )
+         {
+            // This will actually output the information.
+            oi->execute();
+         }
+      }
+      catch (const ossimException& e)
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
+         return 1;
+      }
+      
+   }  // End: if ( ( ap.argc() > 1 ) ...
+   
+   return 0;
+   
+} // End of main...
+
diff --git a/src/apps/ossim-modopt/CMakeLists.txt b/ossim/src/apps/ossim-modopt/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-modopt/CMakeLists.txt
rename to ossim/src/apps/ossim-modopt/CMakeLists.txt
diff --git a/src/apps/ossim-modopt/Makefile b/ossim/src/apps/ossim-modopt/Makefile
similarity index 100%
rename from src/apps/ossim-modopt/Makefile
rename to ossim/src/apps/ossim-modopt/Makefile
diff --git a/src/apps/ossim-modopt/makefile.vc b/ossim/src/apps/ossim-modopt/makefile.vc
similarity index 100%
rename from src/apps/ossim-modopt/makefile.vc
rename to ossim/src/apps/ossim-modopt/makefile.vc
diff --git a/src/apps/ossim-modopt/ossim-modopt.cpp b/ossim/src/apps/ossim-modopt/ossim-modopt.cpp
similarity index 100%
rename from src/apps/ossim-modopt/ossim-modopt.cpp
rename to ossim/src/apps/ossim-modopt/ossim-modopt.cpp
diff --git a/src/apps/ossim-mosaic/CMakeLists.txt b/ossim/src/apps/ossim-mosaic/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-mosaic/CMakeLists.txt
rename to ossim/src/apps/ossim-mosaic/CMakeLists.txt
diff --git a/src/apps/ossim-mosaic/Makefile b/ossim/src/apps/ossim-mosaic/Makefile
similarity index 100%
rename from src/apps/ossim-mosaic/Makefile
rename to ossim/src/apps/ossim-mosaic/Makefile
diff --git a/src/apps/ossim-mosaic/makefile.vc b/ossim/src/apps/ossim-mosaic/makefile.vc
similarity index 100%
rename from src/apps/ossim-mosaic/makefile.vc
rename to ossim/src/apps/ossim-mosaic/makefile.vc
diff --git a/src/apps/ossim-mosaic/mosaic_usage.txt b/ossim/src/apps/ossim-mosaic/mosaic_usage.txt
similarity index 100%
rename from src/apps/ossim-mosaic/mosaic_usage.txt
rename to ossim/src/apps/ossim-mosaic/mosaic_usage.txt
diff --git a/src/apps/ossim-mosaic/ossim-mosaic.cpp b/ossim/src/apps/ossim-mosaic/ossim-mosaic.cpp
similarity index 100%
rename from src/apps/ossim-mosaic/ossim-mosaic.cpp
rename to ossim/src/apps/ossim-mosaic/ossim-mosaic.cpp
diff --git a/src/apps/ossim-ogeom2ogeom/CMakeLists.txt b/ossim/src/apps/ossim-ogeom2ogeom/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-ogeom2ogeom/CMakeLists.txt
rename to ossim/src/apps/ossim-ogeom2ogeom/CMakeLists.txt
diff --git a/src/apps/ossim-ogeom2ogeom/Makefile b/ossim/src/apps/ossim-ogeom2ogeom/Makefile
similarity index 100%
rename from src/apps/ossim-ogeom2ogeom/Makefile
rename to ossim/src/apps/ossim-ogeom2ogeom/Makefile
diff --git a/src/apps/ossim-ogeom2ogeom/makefile.vc b/ossim/src/apps/ossim-ogeom2ogeom/makefile.vc
similarity index 100%
rename from src/apps/ossim-ogeom2ogeom/makefile.vc
rename to ossim/src/apps/ossim-ogeom2ogeom/makefile.vc
diff --git a/src/apps/ossim-ogeom2ogeom/ossim-ogeom2ogeom.cpp b/ossim/src/apps/ossim-ogeom2ogeom/ossim-ogeom2ogeom.cpp
similarity index 100%
rename from src/apps/ossim-ogeom2ogeom/ossim-ogeom2ogeom.cpp
rename to ossim/src/apps/ossim-ogeom2ogeom/ossim-ogeom2ogeom.cpp
diff --git a/src/apps/ossim-orthoigen/CMakeLists.txt b/ossim/src/apps/ossim-orthoigen/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-orthoigen/CMakeLists.txt
rename to ossim/src/apps/ossim-orthoigen/CMakeLists.txt
diff --git a/src/apps/ossim-orthoigen/Makefile b/ossim/src/apps/ossim-orthoigen/Makefile
similarity index 100%
rename from src/apps/ossim-orthoigen/Makefile
rename to ossim/src/apps/ossim-orthoigen/Makefile
diff --git a/src/apps/ossim-orthoigen/makefile.vc b/ossim/src/apps/ossim-orthoigen/makefile.vc
similarity index 100%
rename from src/apps/ossim-orthoigen/makefile.vc
rename to ossim/src/apps/ossim-orthoigen/makefile.vc
diff --git a/ossim/src/apps/ossim-orthoigen/ossim-orthoigen.cpp b/ossim/src/apps/ossim-orthoigen/ossim-orthoigen.cpp
new file mode 100644
index 0000000..9edd62f
--- /dev/null
+++ b/ossim/src/apps/ossim-orthoigen/ossim-orthoigen.cpp
@@ -0,0 +1,168 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossim-orthoigen.cpp 3023 2011-11-02 15:02:27Z david.burken $
+
+#include <iostream>
+#include <cstdlib>
+#include <list>
+#include <fstream>
+#include <iterator>
+#include <iomanip>
+using namespace std;
+
+#include <ossim/parallel/ossimOrthoIgen.h>
+#include <ossim/parallel/ossimMpi.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimTimer.h>
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <sstream>
+
+static ossimTrace traceDebug("orthoigen:debug");
+
+//*************************************************************************************************
+// USAGE
+//*************************************************************************************************
+static void usage()
+{
+   ossimNotify(ossimNotifyLevel_NOTICE) <<
+      "Valid output writer types for \"-w\" or \"--writer\" option:\n\n" << ends;
+   ossimImageWriterFactoryRegistry::instance()->
+      printImageTypeList(ossimNotify(ossimNotifyLevel_NOTICE));
+}
+
+//*************************************************************************************************
+// FINALIZE -- Convenient location for placing debug breakpoint for catching program exit.
+//*************************************************************************************************
+void finalize(int code)
+{
+   exit (code);
+}
+
+//*************************************************************************************************
+// MAIN
+//*************************************************************************************************
+int main(int argc, char* argv[])
+{
+#if OSSIM_HAS_MPI
+   ossimMpi::instance()->initialize(&argc, &argv);
+   if (ossimMpi::instance()->getRank() == 0)
+   {
+      ossimNotify(ossimNotifyLevel_INFO)
+         << "MPI running with "
+         << ossimMpi::instance()->getNumberOfProcessors()
+         << " processors..." << std::endl;
+   }
+#endif
+
+   //---
+   // Start the timer.  Note ossimMpi::instance()->getRank() works with or without
+   // mpi being enabled.
+   //---
+   if (ossimMpi::instance()->getRank() == 0) ossimTimer::instance()->setStartTick();
+
+   enum
+   {
+      OK    = 0,
+      ERROR = 1
+   };
+
+   // Turn off the initial load of elevation.  This will be loaded if needed later.
+   ossimInit::instance()->setElevEnabledFlag(false);
+   
+   ossimRefPtr<ossimOrthoIgen> orthoIgen = new ossimOrthoIgen;
+   ossimArgumentParser argumentParser(&argc, argv);
+   ossimInit::instance()->addOptions(argumentParser);
+   ossimInit::instance()->initialize(argumentParser);
+   ossimApplicationUsage* u = argumentParser.getApplicationUsage();
+   u->setApplicationName(argumentParser.getApplicationName());
+   u->setCommandLineUsage(     
+      "\n\n"
+      "    ossim-orthoigen [options] \"<input_image1>[|switches]\" \"[<input_image2>[|switches]\" ...] <output_image>\n"
+      "\n"
+      "    ossim-orthoigen [options] <input_spec>.src <output_image>");
+
+   u->setDescription(
+      "Creates a product image given an input specification as described below. There are two ways\n"
+      "of specifying the input source list. Switches on explicit form are \n"
+      "\n"
+      "    <N>|<B1,B2,...>|<histo-op>|<ovr_path>. \n"
+      "\n"
+      "The <histo-op> presently can be either \"auto-minmax\" or \"std-stretch-N\" where N=1, 2 or 3.\n"
+      "The <input_spec>.src keyword list contains keyword entries in the form of \n"
+      "\n"
+      "    imageN.<keyword>: value\n"
+      "\n"
+      "Supported keywords are \"file\", \"entry\", \"rgb\", \"hist\", \"ovr\", with values \n"
+      "identical to those specified in the explicit switch form.\n");
+
+   orthoIgen->addArguments(argumentParser);
+   u->addCommandLineOption("-h or --help","Display this information");
+   u->addCommandLineOption(
+      "--enable-entry-decoding","A filename can be separated by a | and a number (NO space).  \n"
+      "Example: a.toc|0 will do entry 0 of a.toc file and on unix you might want to use a \\ since\n"
+      "the separator is a pipe sign. Example: ./a.toc\\|0 will do entry 0 of a.toc.");
+
+   if (argumentParser.read("-h") || argumentParser.read("--help") || (argumentParser.argc() == 1))
+   {
+      u->write(ossimNotify(ossimNotifyLevel_INFO));
+      usage();
+      ossimMpi::instance()->finalize();
+      ossimInit::instance()->finalize();
+      finalize(OK);
+   }
+   bool enableEntryDecoding = false;
+   if(argumentParser.read("--enable-entry-decoding"))
+   {
+      enableEntryDecoding = true;
+   }
+   
+   orthoIgen->initialize(argumentParser);
+   argumentParser.reportRemainingOptionsAsUnrecognized();
+   if (argumentParser.errors())
+   {
+      argumentParser.writeErrorMessages(ossimNotify(ossimNotifyLevel_WARN));
+      ossimMpi::instance()->finalize();
+      finalize(OK);
+   }
+   
+   orthoIgen->clearFilenameList();
+   orthoIgen->addFiles(argumentParser, enableEntryDecoding);
+
+   int status = OK;
+
+   try
+   {
+      orthoIgen->execute();
+   }
+   catch (const ossimException& e)
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
+      status = ERROR;
+   }
+   
+   if(ossimMpi::instance()->getRank() == 0)
+   {
+      ossimNotify(ossimNotifyLevel_NOTICE)
+         << std::setiosflags(ios::fixed)
+         << std::setprecision(3)
+         << "Time elapsed : " << ossimTimer::instance()->time_s() 
+         << std::endl;
+   }
+   
+   ossimMpi::instance()->finalize();
+   finalize(status); 
+}
+
diff --git a/ossim/src/apps/ossim-pc2dem/CMakeLists.txt b/ossim/src/apps/ossim-pc2dem/CMakeLists.txt
new file mode 100644
index 0000000..c87d718
--- /dev/null
+++ b/ossim/src/apps/ossim-pc2dem/CMakeLists.txt
@@ -0,0 +1,2 @@
+FILE(GLOB SOURCE_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
+OSSIM_SETUP_APPLICATION(ossim-pc2dem INSTALL COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ${SOURCE_FILES})
diff --git a/src/apps/ossim-icp/Makefile b/ossim/src/apps/ossim-pc2dem/Makefile
similarity index 100%
rename from src/apps/ossim-icp/Makefile
rename to ossim/src/apps/ossim-pc2dem/Makefile
diff --git a/src/apps/ossim-icp/makefile.vc b/ossim/src/apps/ossim-pc2dem/makefile.vc
similarity index 100%
rename from src/apps/ossim-icp/makefile.vc
rename to ossim/src/apps/ossim-pc2dem/makefile.vc
diff --git a/ossim/src/apps/ossim-pc2dem/ossim-pc2dem.cpp b/ossim/src/apps/ossim-pc2dem/ossim-pc2dem.cpp
new file mode 100644
index 0000000..4ecaae8
--- /dev/null
+++ b/ossim/src/apps/ossim-pc2dem/ossim-pc2dem.cpp
@@ -0,0 +1,747 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Burken
+//
+// Description:  Command line application for copying images "image copy".
+// Can be used to cut images, convert formats.  Works in image space
+// (no resampler).
+//
+//*******************************************************************
+//  $Id: ossim-pc2dem.cpp 23064 2015-01-07 03:20:21Z okramer $
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+#include <ossim/base/ossimImageTypeLut.h>
+#include <ossim/imaging/ossimJpegWriter.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimRLevelFilter.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <ossim/imaging/ossimImageWriterFactory.h>
+#include <ossim/imaging/ossimImageFileWriter.h>
+#include <ossim/imaging/ossimCacheTileSource.h>
+#include <ossim/imaging/ossimBandSelector.h>
+#include <ossim/imaging/ossimCibCadrgTileSource.h>
+#include <ossim/imaging/ossimRgbToGreyFilter.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/imaging/ossimMaskFilter.h>
+
+#include <iostream>
+#include <algorithm>
+#include <iterator>
+#include <exception>
+
+static ossimTrace traceDebug("icp:main");
+
+static void usage()
+{
+   ossimNotify(ossimNotifyLevel_NOTICE)
+      << "\nValid output writer types:\n\n";
+   ossimImageWriterFactoryRegistry::instance()->
+      printImageTypeList( ossimNotify(ossimNotifyLevel_NOTICE) );
+}
+
+ossimString massageQuotedValue(const ossimString& value)
+{
+   char quote = '\0';
+   if(*value.begin() == '"')
+   {
+      quote = '"';
+   }
+   else if(*value.begin() == '\'')
+   {
+      quote = '\'';
+   }
+   
+   if(quote == '\0')
+   {
+      return value;
+   }
+   std::vector<ossimString> splitString;
+   value.split(splitString, quote);
+   if(splitString.size() == 3)
+   {
+      return splitString[1];
+   }
+   return value;
+}
+
+//*************************************************************************************************
+// FINALIZE -- Convenient location for placing debug breakpoint for catching program exit.
+//*************************************************************************************************
+void finalize(int code)
+{
+   exit (code);
+}
+
+int main(int argc, char* argv[])
+{
+   static const char MODULE[] = "icp:main";
+   std::string tempString;
+   ossimArgumentParser::ossimParameter stringParam(tempString);
+   
+   ossimArgumentParser ap(&argc, argv);
+   ossimInit::instance()->addOptions(ap);
+   ossimInit::instance()->initialize(ap);
+
+   ossimApplicationUsage* au = ap.getApplicationUsage();
+   
+   au->setApplicationName(ap.getApplicationName());
+   au->setDescription(ap.getApplicationName()+
+      " copies any supported input image format to any supported output image format format");
+   au->setCommandLineUsage(ap.getApplicationName()+
+      " [options] <output_type> <input_file> <output_file>");
+   au->addCommandLineOption("-h or --help",
+      "Display this information");
+   au->addCommandLineOption("-a or --use-scalar-remapper", 
+      "Uses scalar remapper, transforms to 8-bit");
+   au->addCommandLineOption("-o or --create-overview", 
+      "Creates and overview for the output image");
+   au->addCommandLineOption("-b or --bands <n,n...>", 
+      "uses the specified bands: ex. \"1, 2, 4\" will select bands 1 2 and 4 of the input image.  "
+      "Note: it is 1 based");
+   au->addCommandLineOption("-c or --compression-type <type>", 
+      "Uses compression.  Currently valid for only tiff output -c jpeg will use jpeg compression");
+   au->addCommandLineOption("-e or --entry <n>", 
+      "For multi image handlers which entry do you wish to extract");
+   au->addCommandLineOption("-g", "Convert to grey scale.");
+   au->addCommandLineOption("-q or --compression-quality <n>", 
+      "Uses compression.  Valid for jpeg type. default is 75 where 100 is best and 1 is worst");
+   au->addCommandLineOption("--pixel-type <type>", 
+      "Valid values: area or point, this will determine if the tie point is upper left corner of "
+      "the upper left pixel (area) or the center of the upper left corner (point), default=point. "
+      "NOTE: This option will only affect the tiff writer.");
+   au->addCommandLineOption("-r or --res-level <n>", 
+      "Which res level to extract from the input: ex -r 1 will get res level 1");
+   au->addCommandLineOption("-l or --start-line <n>", 
+      "Which start line do you wish to copy from the input. If none is given then 0 is used");
+   au->addCommandLineOption("-L or --end-line <n>", 
+      "Which end line do you wish to copy from the input.  If none is given then max line is used");
+   au->addCommandLineOption("-s or --start-sample <n>", 
+      "Which start sample do you wish to copy from the input.  If none is given then 0 is used");
+   au->addCommandLineOption("-p or --end-sample <n>", 
+      "The end sample you wish to copy from the input. If none is given then max sample is used");
+   au->addCommandLineOption("-t or --create-thumbnail <n>", 
+      "Takes an argument which is the maximum pixel dimension desired.");
+   au->addCommandLineOption("-w or --tile-width <n>", 
+      "Defines the tile width for the handlers that support tiled output");
+
+   au->addCommandLineOption("--reader-prop <string>", 
+      "Adds a property to send to the reader. format is name=value");
+
+   au->addCommandLineOption("--writer-prop <string>", 
+      "Adds a property to send to the writer. format is name=value");
+
+   au->addCommandLineOption("--filter-spec <fname>", 
+      "This is an external file spec that describes a chain for filtering the input image.");
+   au->addCommandLineOption("--use-mask [<fname>]", 
+      "Optionally specify name of mask file to use for masking the input image. If no filename "
+      "given, then the default mask filename is used.");
+   
+   
+   if (traceDebug()) CLOG << " Entered..." << std::endl;
+   
+   // Keyword list to initialize image writers with.
+   ossimKeywordlist kwl;
+   const char* PREFIX = "imagewriter.";
+
+   bool        lineEndIsSpecified       = false;
+   bool        sampEndIsSpecified       = false;
+   bool        lineStartIsSpecified     = false;
+   bool        sampStartIsSpecified     = false;
+   bool        convert_to_greyscale     = false;
+   bool        create_overview          = false;
+   bool        create_thumbnail         = false;
+   bool        use_band_selector        = false;
+   bool        use_scalar_remapper      = false;
+   bool        use_mask                 = false;
+   ossim_int32 tile_width               = 0;
+   ossim_int32 max_thumbnail_dimension  = 0;
+   ossim_int32 rr_level                 = 0;
+   ossim_int32 line_start               = 0;
+   ossim_int32 line_stop                = 0;
+   ossim_int32 sample_start             = 0;
+   ossim_int32 sample_stop              = 0;
+   ossim_int32 cibcadrg_entry           = 0;
+   vector<ossimString> band_list(0);
+   ossimFilename filterSpec, maskFile;
+   std::map<ossimString, ossimString, ossimStringLtstr> readerPropertyMap;
+   std::map<ossimString, ossimString, ossimStringLtstr> writerPropertyMap;
+
+   if (ap.read("-h") ||
+       ap.read("--help")||(ap.argc() < 2))
+   {
+      au->write(ossimNotify(ossimNotifyLevel_NOTICE));
+      usage(); // for writer output types
+      finalize(0);
+   }
+
+   while(ap.read("--reader-prop", stringParam))
+   {
+      std::vector<ossimString> nameValue;
+      ossimString(tempString).split(nameValue, "=");
+      if(nameValue.size() == 2)
+      {
+         readerPropertyMap.insert(std::make_pair(nameValue[0], massageQuotedValue(nameValue[1])));
+      }
+   }   
+   while(ap.read("--writer-prop", stringParam))
+   {
+      std::vector<ossimString> nameValue;
+      ossimString(tempString).split(nameValue, "=");
+      if(nameValue.size() == 2)
+      {
+         writerPropertyMap.insert(std::make_pair(nameValue[0], massageQuotedValue(nameValue[1])));
+      }
+   }
+   while(ap.read("-a") ||
+         ap.read("--use-scalar-remapper"))
+   {
+      use_scalar_remapper = true;        
+   }
+   while(ap.read("--filter-spec",stringParam))
+   {
+      filterSpec = ossimFilename(tempString);        
+   }
+   
+   while(ap.read("--use-mask") ||
+         ap.read("--use-mask",stringParam) )
+   {
+      maskFile = ossimFilename(tempString);     
+      use_mask = true;
+   }
+   
+   while(ap.read("-o") ||
+         ap.read("--create-overview"))
+   {
+      create_overview = true;
+   }
+   
+   while(ap.read("-b", stringParam) ||
+         ap.read("--bands", stringParam))
+   {
+      use_band_selector = true;
+      ossimString s = tempString;
+      band_list = s.split(",");
+   }
+   
+   while(ap.read("-c", stringParam) ||
+         ap.read("--compression-type", stringParam))
+   {
+      ossimString s = tempString;
+      s.downcase();
+      kwl.add(PREFIX, ossimKeywordNames::COMPRESSION_TYPE_KW, s.c_str(), true);
+   }
+   
+   while(ap.read("-e", stringParam) ||
+         ap.read("--entry", stringParam))
+   {
+      cibcadrg_entry = ossimString(tempString).toInt();
+   }
+
+   if ( ap.read("-g") )
+   {
+      convert_to_greyscale = true;
+   }   
+   
+   while(ap.read("-q", stringParam) ||
+         ap.read("--compression-quality", stringParam))
+   {
+      // Set the jpeg compression quality level.
+      kwl.add(PREFIX,
+              ossimKeywordNames::COMPRESSION_QUALITY_KW,
+              tempString.c_str(),
+              true);
+   }
+   while(ap.read("-r", stringParam) ||
+         ap.read("--res-level", stringParam))
+   {
+      rr_level = ossimString(tempString).toInt();
+   }
+   
+   while(ap.read("-l", stringParam) ||
+         ap.read("--start-line", stringParam))
+   {
+      lineStartIsSpecified = true;
+      line_start = ossimString(tempString).toInt();
+   }
+   
+   while(ap.read("-L", stringParam) ||
+         ap.read("--end-line", stringParam))
+   {
+      lineEndIsSpecified = true;
+      line_stop = ossimString(tempString).toInt();
+   }
+   while(ap.read("-s", stringParam) ||
+         ap.read("--start-sample", stringParam))
+   {
+      sampStartIsSpecified = true;
+      sample_start = ossimString(tempString).toInt();
+   }
+   
+   while(ap.read("-p", stringParam) ||
+         ap.read("--end-sample", stringParam))
+   {
+      sampEndIsSpecified = true;
+      sample_stop = ossimString(tempString).toInt();
+   }
+   
+   while(ap.read("-t", stringParam) ||
+         ap.read("--create-thumbnail", stringParam))
+   {
+      create_thumbnail = true;
+      max_thumbnail_dimension=ossimString(tempString).toInt();
+   }
+   
+   while(ap.read("-w", stringParam) ||
+         ap.read("-tile-width", stringParam))
+   {
+      tile_width = ossimString(tempString).toInt();
+      if ((tile_width % 16) != 0)
+      {
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << MODULE << " NOTICE:"
+            << "\nTile width must be a multiple of 16!"
+            << "\nDefaulting to 128"
+            << std::endl;
+         tile_width = 0;
+      }
+   }
+   if (ap.read("--pixel-type", stringParam))
+   {
+      ossimString os = tempString;
+      os.downcase();
+      if (os.contains("area"))
+      {
+         kwl.add(PREFIX, ossimKeywordNames::PIXEL_TYPE_KW, "area", true);
+      }
+      else
+      {
+         kwl.add(PREFIX, ossimKeywordNames::PIXEL_TYPE_KW, "point", true);
+ 
+      }
+   }
+   
+   ap.reportRemainingOptionsAsUnrecognized();
+   
+   // Three required args:  output_type, input file, and output file.
+   if (ap.errors())
+   {
+      ap.writeErrorMessages(ossimNotify(ossimNotifyLevel_NOTICE));
+      finalize(0);
+   }
+   if (ap.argc() < 4)
+   {
+      au->write(ossimNotify(ossimNotifyLevel_NOTICE));
+      usage(); // for writer output types
+      finalize(0);
+   }
+   
+   // Set the writer type and the image type.
+   ossimString output_type = ap.argv()[ap.argc()-3];
+   
+   kwl.add(PREFIX, ossimKeywordNames::TYPE_KW, output_type.c_str(), true);
+
+   // Get the input file.
+   const char* input_file = argv[ap.argc()-2];
+   
+   // Get the output file.
+   ossimFilename output_file = argv[ap.argc()-1];
+   
+   if (traceDebug())
+   {
+      CLOG << "DEBUG:"
+           << "\noutput type:  "
+           << ap.argv()[ap.argc()-3]
+           << "\ninput file:   "
+           << ap.argv()[ap.argc()-2]
+           << "\noutput file:  "
+           << ap.argv()[ap.argc()-1]
+           << std::endl;
+      
+      if (tile_width)
+      {
+         ossimNotify(ossimNotifyLevel_NOTICE) << "tile_width:  " << tile_width << std::endl;
+      }
+   }
+   
+   // Get an image handler for the input file.
+   ossimRefPtr<ossimImageHandler> ih =
+      ossimImageHandlerRegistry::instance()->open(ossimFilename(input_file));
+   
+   ossimCibCadrgTileSource* its = PTR_CAST(ossimCibCadrgTileSource, ih.get());
+   
+   if (its)
+   {
+      if (cibcadrg_entry > 0)
+      {
+         its->setCurrentEntry(cibcadrg_entry);
+      }
+   }
+   
+   if (!ih)
+   {
+      ossimNotify(ossimNotifyLevel_NOTICE) << "Unsupported image file:  " << input_file
+           << "\nExiting application..." << std::endl;
+      finalize(0);
+   }
+   if (ih->getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL)
+         << "Error reading image:  " << input_file
+         << "Exiting application..." << std::endl; 
+      finalize(1);
+   }
+
+   // Set the reader properties if any.
+   if ( readerPropertyMap.size() )
+   {
+      ossimPropertyInterface* pi = (ossimPropertyInterface*)ih.get();
+      std::map<ossimString, ossimString, ossimStringLtstr>::iterator iter = readerPropertyMap.begin();
+      while(iter != readerPropertyMap.end())
+      {
+         pi->setProperty(iter->first, iter->second);
+         ++iter;
+      }
+   }
+   
+   ih->initialize();
+   ossimRefPtr<ossimImageSource> source = ih.get();
+   
+   if (traceDebug())
+   {
+      CLOG << "DEBUG:"
+           << "\nImage Handler:  " << ih->getLongName()
+           << std::endl;
+   }
+
+   // Start band selector section:
+
+   //---
+   // If image handler is band selector, start with all bands.
+   // Some sources, e.g. ossimEnviTileSource can pick up default
+   // bands and filter out all other bands.
+   //---
+   ih->setOutputToInputBandList();
+
+   if ( use_band_selector && (source->getNumberOfOutputBands() > 1) )
+   {
+      // Build the band list.
+      ossim_uint32 bands = source->getNumberOfOutputBands();
+      vector<ossim_uint32> bl;
+      ossim_uint32 i;
+      for (i=0; i<band_list.size(); ++i)
+      {
+         bl.push_back(band_list[i].toULong()-1);
+      }
+      
+      // Check the list.  Make sure all the bands are within range.
+      for (i=0; i<bl.size(); ++i)
+      {
+         if (bl[i] >= bands)
+         {
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << MODULE << " ERROR:"
+               << "\nBand list range error!"
+               << "\nHighest available band:  " << bands
+               << std::endl;
+            finalize(1);
+         }
+      }
+      
+      ossimRefPtr<ossimBandSelector> bs = new ossimBandSelector();
+      bs->connectMyInputTo(source.get());
+      bs->setOutputBandList(bl);
+      bs->enableSource();
+      bs->initialize();
+      source = bs.get();
+      
+      if (traceDebug())
+      {
+         CLOG << "DEBUG:"
+              << "\nZero based output band list:" << std::endl;
+         for (i=0; i<bl.size(); ++i)
+         {
+            ossimNotify(ossimNotifyLevel_NOTICE)
+               << "   band[" << i << "]:  " << bl[i] << std::endl;
+         }
+         ossimNotify(ossimNotifyLevel_NOTICE) << std::endl;
+      }
+      
+   } // Matches: if ( use_band_selector...
+
+   // End of band selection section.
+
+   if ( convert_to_greyscale )
+   {
+      ossimRefPtr<ossimRgbToGreyFilter> rgb2grey = new ossimRgbToGreyFilter();
+      rgb2grey->connectMyInputTo( source.get() );
+      source = rgb2grey.get();
+   }
+   
+   ossimRefPtr<ossimMaskFilter> mask_filter = 0;
+   if (use_mask)
+   {
+      if (maskFile.empty())
+      {
+         maskFile = ih->getFilenameWithThisExtension("mask");
+      }
+      
+      ossimImageHandler* mh = ossimImageHandlerRegistry::instance()->open(maskFile);
+      if (mh == NULL)
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)<<"ossim-icp -- Could not open raster mask file <"
+            <<maskFile<<">. Maske request will be ignored. Aborting..."<<endl;
+         finalize(1);
+      }
+      mask_filter = new ossimMaskFilter();
+      mask_filter->connectMyInputTo(source.get());
+      mask_filter->setMaskSource(mh);  // assumes ownership of mask handler object
+      source = mask_filter.get();
+   }
+
+   if(!filterSpec.empty()&&filterSpec.exists())
+   {
+      ossimKeywordlist kwl;
+      if(kwl.addFile(filterSpec))
+      {
+         ossimRefPtr<ossimObject> input = ossimObjectFactoryRegistry::instance()->createObject(kwl);
+         if(input.valid())
+         {
+            ossimImageSource* inputImageSource = dynamic_cast<ossimImageSource*> (input.get());
+            if(inputImageSource)
+            {
+               inputImageSource->connectMyInputTo(source.get());
+               source = inputImageSource;
+            }
+         }
+      }
+   }
+   
+   if (create_thumbnail == true)
+   {
+      // Get the rlevel that <= max thumbnail dimension.
+      int max   = 0;
+      int level = 0;
+      
+      while (level < ((ossim_int32)ih->getNumberOfDecimationLevels()-1))
+      {
+         int lines   = ih->getNumberOfLines(level);
+         int samples = ih->getNumberOfSamples(level);
+         max = lines > samples ? lines : samples;
+         if (max <= max_thumbnail_dimension)
+         {
+            break;
+         }
+         ++level;
+      }
+      
+      if (max > max_thumbnail_dimension)
+      {
+         ossimNotify(ossimNotifyLevel_NOTICE) << " NOTICE:"
+              << "\nLowest rlevel not small enough to fulfill "
+              << "max_thumbnail_dimension requirement!" << std::endl;
+      }
+      
+      // Set the reduced res level.  This will override the -r option.
+      rr_level = level;
+
+   } // end of "if  (create_thumbnail == true)
+
+   // Start rlevel filter section.
+   if( rr_level != 0 )
+   {
+      //---
+      // Check for a valid reduced resolution level.
+      // If the operator entered an invalid rr_level with the -r option,
+      // spit out a warning and set to default "0".
+      //---
+      if (rr_level >= (ossim_int32)(ih->getNumberOfDecimationLevels()))
+      {
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << " WARNING:"
+            << "\n\t Selected res level greater than available res levels."
+            << "\n\t Defaulting to res level zero. " << std::endl;
+         rr_level = 0;
+      }
+         
+      ossimRefPtr<ossimRLevelFilter> rlevelFilter = new ossimRLevelFilter;
+      
+      rlevelFilter->connectMyInputTo(source.get());
+      
+      source = rlevelFilter.get();
+      
+      rlevelFilter->setCurrentRLevel(rr_level);
+      if ( rr_level )
+      {
+         rlevelFilter->setOverrideGeometryFlag(true);
+      }
+      
+   } // Matches: if( rr_level != 0 )
+      
+   ossimIrect output_rect = source->getBoundingRect(rr_level);
+      
+   //---
+   // If any of these are true the user wants to cut the rectangle.
+   //---
+   if ( lineStartIsSpecified || lineEndIsSpecified ||
+        sampStartIsSpecified || sampEndIsSpecified)
+   {
+      if (!lineStartIsSpecified) line_start   = output_rect.ul().y;
+      if (!lineEndIsSpecified)   line_stop    = output_rect.lr().y;
+      if (!sampStartIsSpecified) sample_start = output_rect.ul().x;
+      if (!sampEndIsSpecified)   sample_stop  = output_rect.lr().x;
+      
+      //---
+      // Check the start and stop points and make sure they are in
+      // the right order; if not, swap them.
+      //---
+      if (line_stop < line_start)
+      {
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << " WARNING:\n"
+            << "\t Line end is less than line start, swapping."
+            << std::endl;
+         int tmp    = line_start;
+         line_start = line_stop;
+         line_stop  = tmp;
+      }
+      if (sample_stop < sample_start)
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << " WARNING:\n"
+            << "\t Sample end is less than sample start, swapping."
+            << std::endl;
+         int tmp      = sample_start;
+         sample_start = sample_stop;
+         sample_stop  = tmp;
+      }
+
+      output_rect.set_ulx(sample_start);
+      output_rect.set_lrx(sample_stop);
+      output_rect.set_uly(line_start);
+      output_rect.set_lry(line_stop);
+         
+   } // End of "if ((lineEndIsSpecified) ||..."
+
+   if (traceDebug())
+   {
+      CLOG << "icp:main debug"
+           << "\nrr_level:  " << rr_level
+           << "\noutput_rect:   " << output_rect
+           << "\nkeyword list:  " << kwl << std::endl;
+   }
+   
+   ossimRefPtr<ossimImageFileWriter> writer =
+      ossimImageWriterFactoryRegistry::instance()->createWriter(kwl, PREFIX);
+
+   if( writer == 0 )
+   {
+      ossimNotify(ossimNotifyLevel_NOTICE)
+         << "\nCould not create writer of type:  "
+         << output_type
+         << std::endl;
+      usage();
+      finalize(1);
+   }
+
+   writer->connectMyInputTo(0, source.get());
+
+   if (tile_width)
+   {
+      // Set the tile size...
+      writer->setTileSize(ossimIpt(tile_width, tile_width));
+   }
+   
+   writer->open(output_file);
+   
+   // Add a listener to get percent complete.
+   ossimStdOutProgress prog(0, true);
+   writer->addListener(&prog);
+
+   if (writer->getErrorStatus() == ossimErrorCodes::OSSIM_OK)
+   {
+      if( (ih->getOutputScalarType() != OSSIM_UCHAR) &&
+          ((PTR_CAST(ossimJpegWriter, writer.get())) ||
+           use_scalar_remapper))
+      {
+         writer->setScaleToEightBitFlag(true);
+      }
+
+      ossimRefPtr<ossimCacheTileSource> cache = new ossimCacheTileSource;
+      ossimIpt tileWidthHeight(ih->getImageTileWidth(),
+                               ih->getImageTileHeight());
+      // only use the cache if its stripped
+      if(static_cast<ossim_uint32>(tileWidthHeight.x) ==
+         ih->getBoundingRect().width())
+      {
+         cache->connectMyInputTo(0, source.get());
+         cache->setTileSize(tileWidthHeight);
+         writer->connectMyInputTo(0, cache.get());
+      }
+      else
+      {
+         writer->connectMyInputTo(0, source.get());
+      }
+      writer->initialize();
+      writer->setAreaOfInterest(output_rect); // Set the output rectangle.
+
+      try
+      {
+         if ( writerPropertyMap.size() )
+         {
+            ossimPropertyInterface* propInterface = (ossimPropertyInterface*)writer.get();
+            std::map<ossimString, ossimString, ossimStringLtstr>::iterator iter = writerPropertyMap.begin();
+            while(iter!=writerPropertyMap.end())
+            {
+               propInterface->setProperty(iter->first, iter->second);
+               ++iter;
+            }
+         }
+         writer->execute();
+      }
+      catch(std::exception& e)
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << "icp:main ERROR:\n"
+            << "Caught exception!\n"
+            << e.what()
+            << std::endl;
+      }
+      catch(...)
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << "icp:main ERROR:\n"
+            << "Unknown exception caught!\n"
+            << std::endl;
+      }
+
+      cache = 0;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_FATAL)
+         << "Error detected in the image writer..."
+         << "\nExiting application..." << std::endl;
+
+      finalize(1);
+   }
+   
+   if (create_overview == true)
+   {
+      writer->writeOverviewFile();
+   }
+   
+   finalize(0);
+}
diff --git a/src/apps/ossim-pixelflip/CMakeLists.txt b/ossim/src/apps/ossim-pixelflip/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-pixelflip/CMakeLists.txt
rename to ossim/src/apps/ossim-pixelflip/CMakeLists.txt
diff --git a/src/apps/ossim-pixelflip/Makefile b/ossim/src/apps/ossim-pixelflip/Makefile
similarity index 100%
rename from src/apps/ossim-pixelflip/Makefile
rename to ossim/src/apps/ossim-pixelflip/Makefile
diff --git a/src/apps/ossim-pixelflip/makefile.vc b/ossim/src/apps/ossim-pixelflip/makefile.vc
similarity index 100%
rename from src/apps/ossim-pixelflip/makefile.vc
rename to ossim/src/apps/ossim-pixelflip/makefile.vc
diff --git a/ossim/src/apps/ossim-pixelflip/ossim-pixelflip.cpp b/ossim/src/apps/ossim-pixelflip/ossim-pixelflip.cpp
new file mode 100644
index 0000000..68cd53b
--- /dev/null
+++ b/ossim/src/apps/ossim-pixelflip/ossim-pixelflip.cpp
@@ -0,0 +1,419 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+//*******************************************************************
+//  $Id: ossim-pixelflip.cpp 2644 2011-05-26 15:20:11Z oscar.kramer $
+
+
+#include <iostream>
+#include <sstream>
+#include <algorithm>
+#include <iterator>
+
+#include <ossim/ossimConfig.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimImageTypeLut.h>
+
+#include <ossim/imaging/ossimJpegWriter.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimPixelFlipper.h>
+#include <ossim/imaging/ossimRLevelFilter.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <ossim/imaging/ossimImageWriterFactory.h>
+#include <ossim/imaging/ossimImageFileWriter.h>
+#include <ossim/imaging/ossimScalarRemapper.h>
+#include <ossim/imaging/ossimBandSelector.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/parallel/ossimMpi.h>
+#include <ossim/parallel/ossimImageMpiMWriterSequenceConnection.h>
+#include <ossim/parallel/ossimImageMpiSWriterSequenceConnection.h>
+
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+
+#ifdef OSSIM_HAS_MPI
+#  if OSSIM_HAS_MPI
+#    include <mpi.h>
+#  endif
+#endif
+
+static ossimTrace traceDebug("pixelflip:main");
+static void usage();
+static void outputWriterTypes();
+int main(int argc, char* argv[])
+{
+   
+#ifdef OSSIM_HAS_MPI
+#  if OSSIM_HAS_MPI
+   ossimMpi::instance()->initialize(&argc, &argv);
+   if (ossimMpi::instance()->getRank() == 0)
+   {
+      ossimNotify(ossimNotifyLevel_INFO)
+         << "MPI running with "
+         << ossimMpi::instance()->getNumberOfProcessors()
+         << " processors..." << std::endl;
+   }
+#  endif
+#endif
+   
+   std::string tempString;
+   ossimArgumentParser::ossimParameter stringParam(tempString);
+   ossimArgumentParser argumentParser(&argc, argv);
+   ossimInit::instance()->addOptions(argumentParser);
+   ossimInit::instance()->initialize(argumentParser);
+   
+   argumentParser.getApplicationUsage()->setApplicationName(argumentParser.getApplicationName());
+   argumentParser.getApplicationUsage()->setDescription(argumentParser.getApplicationName()+" flips any null pixels to a valid pixel");
+   argumentParser.getApplicationUsage()->setCommandLineUsage(argumentParser.getApplicationName()+" [options] <output_type> <input_file> <output_file> <target_value> <replacement_value>");
+   argumentParser.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
+   argumentParser.getApplicationUsage()->addCommandLineOption("-o or --create-overview", "Creates and overview for the output image");
+   argumentParser.getApplicationUsage()->addCommandLineOption("-c or --clamp-value", "clamp values (any pixel with value larger than input will be clamped to input)");
+   argumentParser.getApplicationUsage()->addCommandLineOption("-m",  "Replacement mode (see notes below)");
+   argumentParser.getApplicationUsage()->addCommandLineOption("-w",  "output tile width(only valid with tiled output types).  Must be a multiply of 16");
+   
+ 
+   static const char MODULE[] = "pixelflip:main";
+   if (traceDebug()) CLOG << " Entered..." << std::endl;
+   ossimInit::instance()->initialize(argc, argv);
+   // Keyword list to initialize image writers with.
+   ossimKeywordlist kwl;
+   const char* PREFIX = "imagewriter.";
+   bool create_overview = false;
+   ossim_int32 tile_width = 0;
+   double clamp_value = 0.0;
+   bool do_clamp = false;
+   ossimPixelFlipper::ReplacementMode replacement_mode =
+      ossimPixelFlipper::REPLACE_BAND_IF_TARGET;
+
+
+   if(argumentParser.read("-h") || argumentParser.read("--help")||(argumentParser.argc() == 1))
+   {
+      argumentParser.getApplicationUsage()->write(ossimNotify(ossimNotifyLevel_INFO));
+      usage();
+      exit(0);
+   }
+   while(argumentParser.read("-o") || argumentParser.read("--create-overview"))
+   {
+      create_overview = true;
+   }
+   while(argumentParser.read("-c", stringParam))
+   {
+      clamp_value = ossimString(tempString).toDouble();
+      do_clamp = true;
+   }
+   while(argumentParser.read("-m", stringParam))
+   {
+      ossimString mode = tempString;
+      mode.downcase();
+      if (mode == "replace_band_if_target")
+      {
+         replacement_mode = ossimPixelFlipper::REPLACE_BAND_IF_TARGET;
+      }
+      else if (mode == "replace_band_if_partial_target")
+      {
+         replacement_mode =
+            ossimPixelFlipper::REPLACE_BAND_IF_PARTIAL_TARGET;
+      }
+      else if (mode == "replace_all_bands_if_partial_target")
+      {
+         replacement_mode = ossimPixelFlipper::REPLACE_ALL_BANDS_IF_PARTIAL_TARGET;
+      }
+      else if (mode != "replace_all_targets")
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "Invalid mode:  "
+            << mode
+            << "\nMode remains:  replace_band_if_target"
+            << std::endl;
+      }
+   }
+   while(argumentParser.read("-w", stringParam))
+   {
+      tile_width = ossimString(tempString).toInt32();
+      if (tile_width % 16)
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << MODULE
+            << " NOTICE:"
+            << "\nTile width must be a multiple of 16!"
+            << "\nDefaulting to 128"
+            << std::endl;
+         tile_width = 0;
+      }
+   }
+
+   if(argumentParser.argc() != 6)
+   {
+      ossimMpi::instance()->finalize();
+      
+      exit(0);
+   }
+   //***
+   // Set the writer type and the image type.
+   //***
+   ossimString output_type = argumentParser.argv()[1];
+   output_type.downcase();
+   kwl.add(PREFIX, ossimKeywordNames::TYPE_KW, output_type.c_str());
+   // Get the input file.
+   ossimFilename input_file = argumentParser.argv()[2];
+   // Get the output file.
+   ossimFilename    output_file = argumentParser.argv()[3];
+   // Get the value to replace.
+   double target_value = ossimString(argumentParser.argv()[4]).toDouble();
+   // Get the replacement value.
+   double replacement_value = ossimString(argumentParser.argv()[5]).toDouble();
+   bool master = true;
+
+   if (ossimMpi::instance()->getRank() != 0)
+   {
+      master = false;
+   }
+   if (master)
+   {
+      ossimNotify(ossimNotifyLevel_INFO)
+         << "pixelflip settings:"
+         << "\noutput type:        " << output_type
+         << "\ninput file:         " << input_file
+         << "\noutput file:        " << output_file
+         << "\ntarget value:       " << target_value
+         << "\nreplacement value:  " << replacement_value
+         << std::endl;
+      if (tile_width)
+      {
+         ossimNotify(ossimNotifyLevel_INFO)
+            << "tile width:         " << tile_width << std::endl;
+      }
+      if (do_clamp)
+      {
+          ossimNotify(ossimNotifyLevel_INFO)
+             << "clamp value:        " << clamp_value << std::endl;
+      }
+   }
+   // Get an image handler for the input file.
+   ossimRefPtr<ossimImageHandler> ih
+      = ossimImageHandlerRegistry::instance()->open(ossimFilename(input_file));
+   if (!ih)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "Unsupported image file:  " << input_file
+         << "\nExiting application..." << std::endl;
+      ossimMpi::instance()->finalize();
+      exit(0);
+   }
+   // Initialize the
+   if (ih->getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "Error reading image:  " << input_file
+         << "Exiting application..." << std::endl;
+      ossimMpi::instance()->finalize();
+      exit(1);
+   }
+   ih->initialize();
+   if (traceDebug())
+   {
+      CLOG << "DEBUG:"
+           << "\nImage Handler:  " << ih->getLongName()
+           << std::endl;
+   }
+   // Capture the bounding rectangle of the image handler.
+   ossimIrect output_rect = ih->getBoundingRect(0);
+   // hook up the pixel flipper to the image handler.
+   ossimRefPtr<ossimPixelFlipper> pf = new ossimPixelFlipper();
+   pf->connectMyInputTo(ih.get());
+   pf->initialize();
+   // Setup the pixel flipper target/replacement values, and replace mode.
+   pf->setTargetValue(target_value);
+   pf->setReplacementValue(replacement_value);
+   pf->setReplacementMode(replacement_mode);
+   // Setup pixel flipper clamp value
+   if (do_clamp)
+   {
+      pf->setClampValue(clamp_value);
+   }
+   if (master)
+   {
+      ossimNotify(ossimNotifyLevel_INFO)
+         << "replacement mode:   " << pf->getReplacementModeString()
+         << std::endl;
+   }
+   ossimImageSourceSequencer* sequencer = NULL;
+
+#ifdef OSSIM_HAS_MPI
+#  if OSSIM_HAS_MPI
+   // only allocate the slave connection if
+   // the number of processors is larger than
+   // 1
+   //
+   if(ossimMpi::instance()->getNumberOfProcessors() > 1)
+   {
+      if(ossimMpi::instance()->getRank()!=0)
+      {
+         sequencer = new ossimImageMpiSWriterSequenceConnection(NULL, 4);
+      }
+      else
+      {
+         sequencer = new ossimImageMpiMWriterSequenceConnection();
+      }
+   }
+   else
+   {
+      sequencer = new ossimImageSourceSequencer();
+   }
+#  else
+   // we will just load a serial connection if MPI is not supported.
+   sequencer = new ossimImageSourceSequencer(NULL);
+#  endif
+#else
+   sequencer = new ossimImageSourceSequencer(NULL);
+#endif
+   
+   ossimRefPtr<ossimImageWriter> writer
+      = ossimImageWriterFactoryRegistry::instance()->createWriter(kwl, PREFIX);
+   ossimImageFileWriter* fileWriter = PTR_CAST(ossimImageFileWriter, writer.get());
+   if( fileWriter == NULL )
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "Error making an image writer..."
+         << "\nExiting application..." << std::endl;
+      ossimMpi::instance()->finalize();
+      exit(1);
+   }
+   // Change out the sequencer...
+   fileWriter->changeSequencer(sequencer);
+   // Hook up the pixel flipper to the file writer.
+   fileWriter->connectMyInputTo(0, pf.get());
+   if (tile_width)
+   {
+      // Set the tile size...
+      fileWriter->setTileSize(ossimIpt(tile_width, tile_width));
+   }
+   fileWriter->open(output_file);
+   // Add a listener to get percent complete.
+   ossimStdOutProgress prog(0, true);
+   fileWriter->addListener(&prog);
+   if (fileWriter->getErrorStatus() == ossimErrorCodes::OSSIM_OK)
+   {
+      fileWriter->initialize();
+      fileWriter->setAreaOfInterest(output_rect); // Set the output rectangle.
+
+#ifdef OSSIM_HAS_MPI
+#  if OSSIM_HAS_MPI
+      double start_time = 0.0;
+      if(ossimMpi::instance()->getRank() == 0)
+      {
+         start_time= MPI_Wtime();
+      }
+#  endif
+#endif
+
+      // Filter and write the file...
+      fileWriter->execute();
+
+#ifdef OSSIM_HAS_MPI
+#  if OSSIM_HAS_MPI
+      if(ossimMpi::instance()->getRank() == 0)
+      {
+         double stop_time = MPI_Wtime();
+         cout << "Elapsed time: " << (stop_time-start_time) << std::endl;
+      }
+#  endif
+#endif
+   }
+   else
+   {
+      cerr << "Error detected in the image writer..."
+           << "\nExiting application..." << std::endl;
+      exit(1);
+   }
+   if (create_overview == true)
+   {
+      fileWriter->writeOverviewFile();
+   }
+
+#ifdef OSSIM_HAS_MPI
+#  if OSSIM_HAS_MPI   
+   ossimMpi::instance()->finalize();
+#  endif
+#endif
+   
+   exit(0);
+}
+void usage()
+{
+   ossimNotify(ossimNotifyLevel_INFO)
+      << "\nNOTES:"
+      << "\n-m Replacement mode option explanation:"
+      << "\n   Valid modes (default=replace_all_targets) :"
+      << "\n     replace_partial_targets"
+      << "\n     replace_partial_targets_all_bands"
+      << "\n     replace_full_targets"
+      << "\n     replace_all_targets"
+      << " (default=all)"
+      << "\n"
+      << "\nIf mode is \"replace_all_targets\" (default):"
+      << "\nAny pixel with dn of target will be replaced."
+      << "\n"
+      << "\nIf mode is \"replace_partial_targets\":"
+      << "\nTarget will be replaced only at least one subpixel(band) does "
+      << "\nnot have the target."
+      << "\n"
+      << "\nIf mode is \"replace_partial_targets_all_bands\":"
+      << "\nTarget will be replaced only at least one subpixel(band) does "
+      << "\nnot have the target.  All bands will be replaced."
+      << "\nThis is a good Landsat7 edge fixer..."
+      << "\n"
+      << "\nIf mode is \"replace_full_targets\":"
+      << "\nTarget will be repaced only if all subpixels(bands) have the "
+      << "target."
+      << "\n"
+      << "\n Example:"
+      << "\n target      = 0"
+      << "\n replacement = 1"
+      << "\n Pixel at (0, 0) r=0, g=0,  b=0"
+      << "\n Pixel at (0, 1) r=0, g=30, b=21"
+      << "\n"
+      << "\n Mode is \"replace_all_targets\":"
+      << "\n Pixel at (0, 0) becomes  r=1, g=1,  b=1"
+      << "\n Pixel at (0, 1) becomes  r=1, g=30, b=21"
+      << "\n"
+      << "\n Mode is \"replace_partial_targets\":"
+      << "\n Pixel at (0, 0) remains  r=0, g=0,  b=0"
+      << "\n Pixel at (0, 1) becomes  r=1, g=30, b=21"
+      << "\n"
+      << "\n Mode is \"replace_partial_targets_all_bands\":"
+      << "\n Pixel at (0, 0) remains  r=0, g=0,  b=0"
+      << "\n Pixel at (0, 1) becomes  r=1, g=1, b=1"
+      << "\n"
+      << "\n Mode is \"replace_full_targets\":"
+      << "\n Pixel at (0, 0) becomes  r=1, g=1,  b=1"
+      << "\n Pixel at (0, 1) remains  r=0, g=30, b=21"
+      << "\n"
+      << "\nValid output writer types:"
+      << std::endl;
+   outputWriterTypes();
+}
+
+void outputWriterTypes()
+{
+   std::vector<ossimString> outputType;
+   
+   ossimImageWriterFactoryRegistry::instance()->getImageTypeList(outputType);
+   std::copy(outputType.begin(),
+             outputType.end(),
+             std::ostream_iterator<ossimString>(std::cout, "\t\n"));
+}
+
diff --git a/src/apps/ossim-preproc/CMakeLists.txt b/ossim/src/apps/ossim-preproc/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-preproc/CMakeLists.txt
rename to ossim/src/apps/ossim-preproc/CMakeLists.txt
diff --git a/ossim/src/apps/ossim-preproc/ossim-preproc.cpp b/ossim/src/apps/ossim-preproc/ossim-preproc.cpp
new file mode 100644
index 0000000..a301908
--- /dev/null
+++ b/ossim/src/apps/ossim-preproc/ossim-preproc.cpp
@@ -0,0 +1,87 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossim-info.cpp 18619 2011-01-03 10:33:51Z dburken $
+
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimTimer.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/util/ossimImageUtil.h>
+
+int main(int argc, char *argv[])
+{
+   // Return 0 on success, something else on error.
+   enum
+   {
+      OK    = 0,
+      ERROR = 1
+   };
+   
+   int result = OK;
+   
+   // Start the timer.
+   ossimTimer::instance()->setStartTick();
+
+   //---
+   // Get the arg count so we can tell if an arg was consumed by
+   // ossimInit::instance()->initialize
+   //---
+   int originalArgCount = argc;
+
+   ossimArgumentParser ap(&argc, argv);
+
+   // Initialize ossim stuff, factories, plugin, etc.
+   ossimInit::instance()->initialize(ap);
+
+   //---
+   // Avoid going on if a global option was consumed by ossimInit::initialize
+   // like -V or --version option and the arg count is down to 1.
+   //---
+   if ( ( ap.argc() > 1 ) || ( ap.argc() == originalArgCount ) )
+   {
+      // Make the info object.
+      ossimRefPtr<ossimImageUtil> oiu = new ossimImageUtil();
+      
+      try
+      {
+         //---
+         // Initialize will take the options passed in and set things to output
+         // information for.
+         //
+         // ossimInfo::initialize can throw an exception.
+         //---
+         bool continue_after_init = oiu->initialize(ap);
+         
+         if ( continue_after_init )
+         {
+            // Execute the operation(s).
+            result = oiu->execute();
+
+            ossimNotify(ossimNotifyLevel_NOTICE)
+               << "elapsed time in seconds: "
+               << std::setiosflags(ios::fixed)
+               << std::setprecision(3)
+               << ossimTimer::instance()->time_s() << endl;
+         }
+      }
+      catch (const ossimException& e)
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
+         result = ERROR;
+      }
+      
+   }  // End: if ( ( ap.argc() > 1 ) ...
+   
+   return result;
+   
+} // End of main...
+
diff --git a/src/apps/ossim-prune/CMakeLists.txt b/ossim/src/apps/ossim-prune/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-prune/CMakeLists.txt
rename to ossim/src/apps/ossim-prune/CMakeLists.txt
diff --git a/src/apps/ossim-prune/Makefile b/ossim/src/apps/ossim-prune/Makefile
similarity index 100%
rename from src/apps/ossim-prune/Makefile
rename to ossim/src/apps/ossim-prune/Makefile
diff --git a/src/apps/ossim-prune/makefile.vc b/ossim/src/apps/ossim-prune/makefile.vc
similarity index 100%
rename from src/apps/ossim-prune/makefile.vc
rename to ossim/src/apps/ossim-prune/makefile.vc
diff --git a/ossim/src/apps/ossim-prune/ossim-prune.cpp b/ossim/src/apps/ossim-prune/ossim-prune.cpp
new file mode 100644
index 0000000..4a472e0
--- /dev/null
+++ b/ossim/src/apps/ossim-prune/ossim-prune.cpp
@@ -0,0 +1,133 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Lucas
+//
+//*******************************************************************
+//  $Id: prune.cpp 10698 2007-04-12 13:59:43Z gpotts $
+
+
+#include <iostream>
+#include <stdlib.h>
+using namespace std;
+
+#include <ossim/ossimConfig.h>
+
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimErrorCodes.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/init/ossimInit.h>
+
+static ossimTrace traceDebug("prune:main");
+
+static void usage()
+{
+   cout << "prune: Displays if image is null or not.\n"
+        << "Usage:\n"
+        << "ossim-prune <image_file>"
+        << "\nMoves image_file to image_file.null if all tiles are null."
+        << "\n";
+   return;
+}
+
+static void move( const ossimFilename& in, const ossimFilename& out )
+{
+#if defined(WIN32) || defined(_MSC_VER) && !defined(__CYGWIN__) && !defined(__MWERKS__)
+   std::string moveCommand = "ren";
+#else
+   std::string moveCommand = "mv";
+#endif
+
+   std::string command = moveCommand;
+   command += " ";
+   command += in.string();
+   command += " ";
+   command += out.string();
+   cout << "Executing " << command << endl;
+   system(command.c_str());
+}
+
+int main(int argc, char* argv[])
+{
+   ossimInit::instance()->initialize(argc, argv);
+   
+   // One required arg:  input file
+   if (argc != 2)
+   {
+      usage();
+      exit(0);
+   }
+
+   const char* input_file = argv[1];
+
+   // Get an image handler for the input file.
+   ossimRefPtr<ossimImageHandler> ih
+      = ossimImageHandlerRegistry::instance()->open(ossimFilename(input_file));
+
+   if (!ih)
+   {
+      cout << "ERROR: Unsupported image file: " << input_file
+           << "\nExiting application." << endl;
+      exit(0);
+   }
+
+   // Initialize the 
+   if (ih->getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
+   {
+      cerr << "ERROR: Unable to read image file: " << input_file
+           << "\nExiting application." << endl; 
+      exit(1);
+   }
+
+   ih->initialize();
+
+   int lines   = ih->getNumberOfLines(0);
+   int samples = ih->getNumberOfSamples(0);
+   int tileHeight = ih->getTileHeight();
+   int tileWidth = ih->getTileWidth();
+   int tilesInLineDir = lines / tileHeight;
+   int tilesInSampDir = samples / tileWidth;
+
+   if(lines % tileHeight) ++tilesInLineDir;
+
+   if(samples % tileWidth) ++tilesInSampDir;
+
+   for(int i=0; i<tilesInLineDir; i++)
+   {
+      for(int j=0; j<tilesInSampDir; j++)
+      {
+         ossimIpt origin(j*tileWidth,i*tileHeight);
+         ossimRefPtr<ossimImageData> id=ih->getTile(origin);
+         if( id.valid() && (id->getDataObjectStatus() != OSSIM_EMPTY) )
+         {
+            cout << "RESULT: Image file has data: " << input_file << endl;
+            exit(0);
+         }
+      }
+   }
+
+   // Move the input file:
+   ossimFilename in = input_file;
+   ossimFilename out = in;
+   out += ".null";
+   move( in, out );
+   
+   in = in.fileNoExtension();
+   in += "_readme.txt";
+   if ( in.exists() )
+   {
+      out = in;
+      out += ".null";
+      move( in, out );
+   }
+   
+   exit(0);
+}
+
diff --git a/src/apps/ossim-rejout/CMakeLists.txt b/ossim/src/apps/ossim-rejout/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-rejout/CMakeLists.txt
rename to ossim/src/apps/ossim-rejout/CMakeLists.txt
diff --git a/src/apps/ossim-rejout/Makefile b/ossim/src/apps/ossim-rejout/Makefile
similarity index 100%
rename from src/apps/ossim-rejout/Makefile
rename to ossim/src/apps/ossim-rejout/Makefile
diff --git a/src/apps/ossim-rejout/makefile.vc b/ossim/src/apps/ossim-rejout/makefile.vc
similarity index 100%
rename from src/apps/ossim-rejout/makefile.vc
rename to ossim/src/apps/ossim-rejout/makefile.vc
diff --git a/src/apps/ossim-rejout/ossim-rejout.cpp b/ossim/src/apps/ossim-rejout/ossim-rejout.cpp
similarity index 100%
rename from src/apps/ossim-rejout/ossim-rejout.cpp
rename to ossim/src/apps/ossim-rejout/ossim-rejout.cpp
diff --git a/src/apps/ossim-rpf/CMakeLists.txt b/ossim/src/apps/ossim-rpf/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-rpf/CMakeLists.txt
rename to ossim/src/apps/ossim-rpf/CMakeLists.txt
diff --git a/src/apps/ossim-rpf/Makefile b/ossim/src/apps/ossim-rpf/Makefile
similarity index 100%
rename from src/apps/ossim-rpf/Makefile
rename to ossim/src/apps/ossim-rpf/Makefile
diff --git a/src/apps/ossim-rpf/makefile.vc b/ossim/src/apps/ossim-rpf/makefile.vc
similarity index 100%
rename from src/apps/ossim-rpf/makefile.vc
rename to ossim/src/apps/ossim-rpf/makefile.vc
diff --git a/src/apps/ossim-rpf/ossim-rpf.cpp b/ossim/src/apps/ossim-rpf/ossim-rpf.cpp
similarity index 100%
rename from src/apps/ossim-rpf/ossim-rpf.cpp
rename to ossim/src/apps/ossim-rpf/ossim-rpf.cpp
diff --git a/src/apps/ossim-senint/CMakeLists.txt b/ossim/src/apps/ossim-senint/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-senint/CMakeLists.txt
rename to ossim/src/apps/ossim-senint/CMakeLists.txt
diff --git a/src/apps/ossim-senint/Makefile b/ossim/src/apps/ossim-senint/Makefile
similarity index 100%
rename from src/apps/ossim-senint/Makefile
rename to ossim/src/apps/ossim-senint/Makefile
diff --git a/src/apps/ossim-senint/makefile.vc b/ossim/src/apps/ossim-senint/makefile.vc
similarity index 100%
rename from src/apps/ossim-senint/makefile.vc
rename to ossim/src/apps/ossim-senint/makefile.vc
diff --git a/src/apps/ossim-senint/ossim-senint.cpp b/ossim/src/apps/ossim-senint/ossim-senint.cpp
similarity index 100%
rename from src/apps/ossim-senint/ossim-senint.cpp
rename to ossim/src/apps/ossim-senint/ossim-senint.cpp
diff --git a/ossim/src/apps/ossim-slope/CMakeLists.txt b/ossim/src/apps/ossim-slope/CMakeLists.txt
new file mode 100644
index 0000000..1ed1902
--- /dev/null
+++ b/ossim/src/apps/ossim-slope/CMakeLists.txt
@@ -0,0 +1,2 @@
+FILE(GLOB SOURCE_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
+OSSIM_SETUP_APPLICATION(ossim-slope INSTALL COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ${SOURCE_FILES})
diff --git a/ossim/src/apps/ossim-slope/Makefile b/ossim/src/apps/ossim-slope/Makefile
new file mode 100644
index 0000000..bac9e01
--- /dev/null
+++ b/ossim/src/apps/ossim-slope/Makefile
@@ -0,0 +1,3 @@
+PROGRAM=ossim-slope
+
+include ../../../makeprog.mak
diff --git a/ossim/src/apps/ossim-slope/makefile.vc b/ossim/src/apps/ossim-slope/makefile.vc
new file mode 100644
index 0000000..82df4fe
--- /dev/null
+++ b/ossim/src/apps/ossim-slope/makefile.vc
@@ -0,0 +1,11 @@
+###
+# $Id: makefile.vc 12829 2008-05-08 19:42:50Z dburken $
+# 
+# nmake makefile
+#
+# Typical usage:  nmake /f makefile.vc
+###
+
+PROGRAM=ossim-slope
+
+!include ..\makefile.inc
diff --git a/ossim/src/apps/ossim-slope/ossim-slope.cpp b/ossim/src/apps/ossim-slope/ossim-slope.cpp
new file mode 100644
index 0000000..a085abb
--- /dev/null
+++ b/ossim/src/apps/ossim-slope/ossim-slope.cpp
@@ -0,0 +1,38 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// File: ossim-slope.cpp
+//
+// Author:  Oscar Kramer
+//
+// Description: Application main() for computing the corresponding slope image (floating point
+// degrees) of an input DEM image.
+//
+// $Id: ossim-slope.cpp 23430 2015-07-15 15:01:50Z okramer $
+//----------------------------------------------------------------------------
+
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/util/ossimSlopeUtil.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/init/ossimInit.h>
+#include <iostream>
+
+using namespace std;
+
+int main(int argc, char *argv[])
+{
+   int returnCode = 0;
+   
+   ossimArgumentParser ap(&argc, argv);
+   ossimInit::instance()->initialize(ap);
+   
+   ossimRefPtr<ossimSlopeUtil> slopeUtil = new ossimSlopeUtil;
+   if (!slopeUtil->initialize(ap))
+      exit(1);
+
+   if (!slopeUtil->execute())
+      exit(1);
+
+   exit(0);
+}
diff --git a/src/apps/ossim-space-imaging/CMakeLists.txt b/ossim/src/apps/ossim-space-imaging/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-space-imaging/CMakeLists.txt
rename to ossim/src/apps/ossim-space-imaging/CMakeLists.txt
diff --git a/src/apps/ossim-space-imaging/Makefile b/ossim/src/apps/ossim-space-imaging/Makefile
similarity index 100%
rename from src/apps/ossim-space-imaging/Makefile
rename to ossim/src/apps/ossim-space-imaging/Makefile
diff --git a/src/apps/ossim-space-imaging/makefile.vc b/ossim/src/apps/ossim-space-imaging/makefile.vc
similarity index 100%
rename from src/apps/ossim-space-imaging/makefile.vc
rename to ossim/src/apps/ossim-space-imaging/makefile.vc
diff --git a/src/apps/ossim-space-imaging/ossim-space-imaging.cpp b/ossim/src/apps/ossim-space-imaging/ossim-space-imaging.cpp
similarity index 100%
rename from src/apps/ossim-space-imaging/ossim-space-imaging.cpp
rename to ossim/src/apps/ossim-space-imaging/ossim-space-imaging.cpp
diff --git a/src/apps/ossim-src2src/CMakeLists.txt b/ossim/src/apps/ossim-src2src/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-src2src/CMakeLists.txt
rename to ossim/src/apps/ossim-src2src/CMakeLists.txt
diff --git a/ossim/src/apps/ossim-src2src/ossim-src2src.cpp b/ossim/src/apps/ossim-src2src/ossim-src2src.cpp
new file mode 100644
index 0000000..3eefe6d
--- /dev/null
+++ b/ossim/src/apps/ossim-src2src/ossim-src2src.cpp
@@ -0,0 +1,523 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Mingjie Su
+//
+//*******************************************************************
+//  $Id: ossim-src2src.cpp 2644 2011-05-26 15:20:11Z oscar.kramer $
+
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimContainerProperty.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <ossim/imaging/ossimTilingPoly.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/plugin/ossimSharedPluginRegistry.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimMapProjectionInfo.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/support_data/ossimInfoBase.h>
+#include <ossim/support_data/ossimInfoFactoryRegistry.h>
+#include <ossim/support_data/ossimSrcRecord.h>
+
+#include <iostream>
+#include <vector>
+using namespace std;
+
+
+//**************************************************************************
+// usage()
+//**************************************************************************
+void usage()
+{
+   ossimNotify(ossimNotifyLevel_INFO)
+      << " examples:\n\n"
+      << "    ossim-create-src --tiling-template ./mytemplate.template ./myfile.tif ./outdir\n"
+      << std::endl;;
+}
+
+//*****************************************************************************************
+// Centralized point to capture all program exits (aids in debugging -- please leave)
+//*****************************************************************************************
+void finalize(int exit_code)
+{
+   exit(exit_code);
+}
+
+void parseSrcFile(const ossimFilename& srcFile, vector<ossimSrcRecord>& srcRecordFiles, ossimString& prefix)
+{
+   if (!srcFile.isReadable())
+      return;
+
+   ossimKeywordlist src_kwl (srcFile);
+   unsigned int image_idx = 0;
+   ossimString lookup = src_kwl.find("dem0.file");
+   if (!lookup.empty())
+   {
+      prefix = "dem";
+   }
+
+   // Loop to read all image file entries:
+   while (true)
+   {
+      ossimSrcRecord srcRecord(src_kwl, image_idx++, prefix);
+      if (!srcRecord.valid()) 
+         break;
+
+      srcRecordFiles.push_back(srcRecord);
+   }
+}
+
+ossimRefPtr<ossimTilingPoly> getTiling(const ossimFilename& templateFile)
+{
+   ossimKeywordlist templateKwl;
+   if (!templateKwl.addFile(templateFile))
+   {
+      return 0;
+   }
+
+   ossimString prefix ("igen.tiling.");
+   while (1)
+   {
+      if (templateKwl.find(prefix.chars(), "tile_source"))
+      {
+         break;
+      }
+      else
+      {
+         return 0;
+      }
+
+      // If we got here, then no matches were found in the template. Try again but without a prefix:
+      if (prefix.empty())
+         break;
+      prefix.clear();
+   }
+
+   // Initialize the tiling object if enabled:
+   ossimRefPtr<ossimTilingPoly> tiling = new ossimTilingPoly;
+  
+   if (!tiling->loadState(templateKwl, prefix))
+   {
+      return 0;
+   }
+
+   return tiling;
+}
+
+ossimDrect getRect(ossimRefPtr<ossimMapProjection> mapProj, 
+   vector<ossimGpt> points)
+{
+   std::vector<ossimDpt> rectTmp;
+   rectTmp.resize(points.size());
+
+   for(std::vector<ossimGpt>::size_type index=0; index < points.size(); ++index)
+   {
+      mapProj->worldToLineSample(points[(int)index], rectTmp[(int)index]);
+   }
+
+   if (rectTmp.size() > 3)
+   {
+      ossimDrect rect2 = ossimDrect(rectTmp[0],
+         rectTmp[1],
+         rectTmp[2],
+         rectTmp[3]);
+
+      return rect2;
+   }
+   return ossimDrect();
+}
+
+//**************************************************************************
+// Main Application
+//**************************************************************************
+int main(int argc, char *argv[])
+{
+   std::string tempString1;
+   ossimArgumentParser::ossimParameter stringParam1(tempString1);
+   std::string tempString2;
+   ossimArgumentParser::ossimParameter stringParam2(tempString2);
+
+   ossimArgumentParser argumentParser(&argc, argv);
+   ossimInit::instance()->addOptions(argumentParser);
+   ossimInit::instance()->initialize(argumentParser);
+
+   ossimApplicationUsage* appuse = argumentParser.getApplicationUsage();
+   
+   appuse->setApplicationName(argumentParser.getApplicationName());
+
+   appuse->setDescription(argumentParser.getApplicationName()+
+      " generate src files for polygons.");
+
+   appuse->setCommandLineUsage(argumentParser.getApplicationName()+
+      "ossim-create-src [--tiling-template] <full path to template file>");
+                          
+   appuse->addCommandLineOption("--tiling-template", "Specify an external file that contains tiling information.");
+
+   ossimFilename templateFile = "";
+  
+   if(argumentParser.read("--tiling-template", stringParam1))
+   {
+      templateFile = ossimFilename(tempString1);
+   }
+
+   // End of arg parsing.
+   argumentParser.reportRemainingOptionsAsUnrecognized();
+   if ( argumentParser.errors() )
+   {
+      argumentParser.writeErrorMessages(ossimNotify(ossimNotifyLevel_NOTICE));
+      finalize(1);
+   }
+
+   if (argc == 1)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)<< "Must supply an input file or info option." << std::endl;
+      finalize(0);
+   }
+
+   ossim_uint32 idx = 0;
+   ossim_uint32 last_idx = argumentParser.argc()-1;
+   ossimFilename inputSrcFile = "";
+   ossimString prefixStr = "image";
+   vector<ossimSrcRecord> inputFiles;
+   while(argumentParser.argv()[idx] && (idx < last_idx))
+   {
+      ossimString file = argumentParser.argv()[idx];
+      if (file.contains(".src"))
+      {
+         // input file spec provided via src file. Need to parse it:
+         inputSrcFile = ossimFilename(file);
+         if (!inputSrcFile.exists() )
+         {
+            ossimNotify(ossimNotifyLevel_WARN) << "ossim-src2src: file does not exist:  " << inputSrcFile
+               << std::endl;
+            finalize(1);
+         }
+         parseSrcFile(inputSrcFile, inputFiles, prefixStr);
+      }
+      ++idx;
+   }
+
+   // The last filename left on the command line should be the product filename:
+   ossimFilename outputFileDir = argumentParser.argv()[last_idx];
+   if (!outputFileDir.isDir())
+   {
+      outputFileDir = outputFileDir.path();
+      if (!outputFileDir.exists() )
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "ossim-src2src: output directory does not exist:  " << outputFileDir
+            << std::endl;
+         finalize(1);
+      }
+   }
+
+   if (!templateFile.exists())
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "ossim-src2src: template file does not exist::  " << templateFile
+         << std::endl;
+      finalize(1);
+   }
+
+   ossimRefPtr<ossimTilingPoly> polyTiling = getTiling(templateFile);
+   if (!polyTiling.valid())
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "ossim-src2src: error generating tiling:  " << templateFile
+         << std::endl;
+      finalize(1);
+   }
+
+   // Open up src file to get coordinate info from each file listed in src file.
+   ossim_float64 minLat = 90.0;
+   ossim_float64 maxLat = -90.0;
+   ossim_float64 minLon = 180.0;
+   ossim_float64 maxLon = -180.0;
+
+   ossimString tileName;
+   ossimIrect clipRect;
+   map<ossimString, ossimSrcRecord> infos;
+   ossimRefPtr<ossimMapProjection> mapProj = 0;
+
+   for (ossim_uint32 i = 0; i < inputFiles.size(); i++)
+   {
+      ossimFilename inputFile = inputFiles[i].getFilename();
+      vector<ossim_uint32> entryList;
+      ossimRefPtr<ossimImageHandler> ih = ossimImageHandlerRegistry::instance()->open(inputFile);
+      if (ih.valid() )
+      {
+         if(inputFiles[i].getEntryIndex() > -1 )
+         {
+            entryList.push_back(inputFiles[i].getEntryIndex());
+         }
+         else
+         {
+            ih->getEntryList(entryList);
+         }
+
+         for(ossim_uint32 entryIdx = 0; entryIdx < entryList.size(); ++entryIdx)
+         {
+            // Establish the image handler for this particular frame. This may be just
+            // the handler already opened in the case of single image per file:
+            ossimImageHandler* img_handler = 0;
+            if (entryList.size() == 1)
+            {
+               img_handler = ih.get();
+            }
+            else
+            {
+               img_handler = (ossimImageHandler*)ih->dup();
+            }
+
+            img_handler->setCurrentEntry(entryList[entryIdx]);
+
+            ossimDrect outputRect = img_handler->getBoundingRect();
+
+            ossimRefPtr<ossimImageGeometry> geom = img_handler->getImageGeometry();
+            if(geom.valid())
+            {
+               ossimGpt ulg;
+               ossimGpt llg;
+               ossimGpt lrg;
+               ossimGpt urg;
+
+               geom->localToWorld(outputRect.ul(), ulg);
+               geom->localToWorld(outputRect.ll(), llg);
+               geom->localToWorld(outputRect.lr(), lrg);
+               geom->localToWorld(outputRect.ur(), urg);
+
+               //find min and max lat, lon for whole src file
+               if (minLat > llg.lat)
+               {
+                  minLat = llg.lat;
+               }
+
+               if (minLon > llg.lon)
+               {
+                  minLon = llg.lon;
+               }
+
+               if (maxLat < urg.lat)
+               {
+                  maxLat = urg.lat;
+               }
+
+               if (maxLon < urg.lon)
+               {
+                  maxLon = urg.lon;
+               }
+
+               ossimString fileInfo = inputFile + "|" + ossimString::toString(entryIdx) + "|" + 
+                  ossimString::toString(ulg.lon) + "," + ossimString::toString(ulg.lat) + "," + 
+                  ossimString::toString(urg.lon) + "," + ossimString::toString(urg.lat) + "," + 
+                  ossimString::toString(lrg.lon) + "," + ossimString::toString(lrg.lat) + "," + 
+                  ossimString::toString(llg.lon) + "," + ossimString::toString(llg.lat);
+
+               infos[fileInfo] = inputFiles[i];
+
+               if (!mapProj.valid())
+               {
+                  ossimRefPtr<ossimProjection> proj = geom->getProjection();
+                  if (proj.valid())
+                  {
+                     mapProj = PTR_CAST(ossimMapProjection, proj->dup());
+                     if (!mapProj.valid()) //default it to ossimEquDistCylProjection
+                     {
+                        mapProj = new ossimEquDistCylProjection;
+                        mapProj->setMetersPerPixel(geom->getMetersPerPixel());
+                     }
+                  }
+               }
+            }
+            img_handler = 0;
+         }
+         ih = 0;
+      }
+      else
+      {
+         continue;
+      }
+   }
+   inputFiles.clear();
+
+   //get bounding rect for entire image
+   vector<ossimGpt> points;
+   if (points.size() == 0)
+   {
+      points.push_back(ossimGpt(maxLat, minLon));
+      points.push_back(ossimGpt(maxLat, maxLon));
+      points.push_back(ossimGpt(minLat, maxLon));
+      points.push_back(ossimGpt(minLat, minLon));
+   }
+
+   if(mapProj.valid())
+   {
+      ossimGpt tie(maxLat, minLon);
+      mapProj->setUlTiePoints(tie);
+      polyTiling->initialize(*(mapProj.get()), getRect(mapProj, points));
+   }
+
+   while(polyTiling->next(mapProj, clipRect, tileName))
+   {
+      ossimFilename outSrc = outputFileDir + "/" + ossimFilename(tileName).noExtension() + ".src";
+     
+      map<ossimString, ossimSrcRecord>::iterator it = infos.begin();
+      ossim_int32 index = 0;
+      map<ossim_int32, ossimSrcRecord> srcList;
+      while (it != infos.end())
+      {
+         ossimString fileInfo = it->first;
+         vector<ossimString> fileInfos = fileInfo.split("|");
+         ossim_int32 entryId = fileInfos[1].toInt();
+         vector<ossimString> latlonInfo = fileInfos[2].split(",");
+
+         double ulgLon = latlonInfo[0].toDouble();
+         double ulgLat = latlonInfo[1].toDouble();
+         double urgLon = latlonInfo[2].toDouble();
+         double urgLat = latlonInfo[3].toDouble();
+         double lrgLon = latlonInfo[4].toDouble();
+         double lrgLat = latlonInfo[5].toDouble();
+         double llgLon = latlonInfo[6].toDouble();
+         double llgLat = latlonInfo[7].toDouble();
+
+         points.clear();
+         points.push_back(ossimGpt(ulgLat, ulgLon));
+         points.push_back(ossimGpt(urgLat, urgLon));
+         points.push_back(ossimGpt(lrgLat, lrgLon));
+         points.push_back(ossimGpt(llgLat, llgLon));
+
+         //get bounding for each image listed in src file
+         ossimDrect rect = getRect(mapProj, points);
+
+         //check if the rect of image intersect with the rect of tile
+         if (rect.intersects(clipRect))
+         {
+            ossimSrcRecord srcRecord = it->second;
+            srcRecord.setEntryIndex(entryId);
+            srcList[index] = srcRecord;
+            index++;
+         }
+         it++;
+      }
+
+      //write image files which intersect with the tile to a new src file
+      if (srcList.size() > 0)
+      {
+         ofstream outputSrcFile(outSrc.c_str());
+         map<ossim_int32, ossimSrcRecord>::iterator srcIt = srcList.begin();
+         while (srcIt != srcList.end())
+         {
+            ossimString prefix = prefixStr + ossimString::toString(srcIt->first) + ".";
+
+            ossimFilename newSrcFile = srcIt->second.getFilename();
+            ossim_int32 entryId = srcIt->second.getEntryIndex();
+            ossimFilename supportDir = srcIt->second.getSupportDir();
+            ossimString hisOp = srcIt->second.getHistogramOp();
+            vector<ossim_uint32> bands = srcIt->second.getBands();
+            double weight = srcIt->second.getWeight();
+            ossimFilename overviewPath = srcIt->second.getOverviewPath();
+            ossimFilename hisPath = srcIt->second.getHistogramPath();
+            ossimFilename maskPath = srcIt->second.getMaskPath();
+
+            if (!newSrcFile.empty())
+            {
+               ossimString str = prefix + "file: " + newSrcFile;
+               outputSrcFile << str << "\n";
+            }
+
+            if (entryId > -1)
+            {
+               ossimString str = prefix + "entry: " + ossimString::toString(entryId);
+               outputSrcFile << str << "\n";
+            }
+
+            if (!supportDir.empty())
+            {
+               ossimString str = prefix + "support: " + supportDir;
+               outputSrcFile << str << "\n";
+            }
+
+            if (!hisOp.empty())
+            {
+               ossimString str = prefix + "hist-op: " + hisOp;
+               outputSrcFile << str << "\n";
+            }
+
+            if (bands.size())
+            {
+               ossimString str = "";
+               for (ossim_uint32 bandIndex = 0; bandIndex < bands.size(); bandIndex++)
+               {
+                  if (bandIndex == (bands.size()-1))
+                  {
+                     str = str + ossimString::toString(bands[bandIndex]+1);
+                  }
+                  else
+                  {
+                     str = str + ossimString::toString(bands[bandIndex]+1) + ",";
+                  }
+               }
+               str = prefix + "rgb: " + str;
+               outputSrcFile << str << "\n";
+            }
+
+            if (weight > 0)
+            {
+               ossimString str = prefix + "opacity: " + ossimString::toString(weight);
+               outputSrcFile << str << "\n";
+            }
+
+            if (!overviewPath.empty())
+            {
+               ossimString str = prefix + "ovr: " + overviewPath;
+               outputSrcFile << str << "\n";
+            }
+
+            if (!hisPath.empty())
+            {
+               ossimString str = prefix + "hist: " + hisPath;
+               outputSrcFile << str << "\n";
+            }
+
+            if (!maskPath.empty())
+            {
+               ossimString str = prefix + "mask: " + maskPath;
+               outputSrcFile << str << "\n";
+            }
+            outputSrcFile << "\n";
+            srcIt++;
+         }
+         outputSrcFile.close();
+         srcList.clear();
+      }
+   }
+
+   if (polyTiling.valid())
+   {
+      polyTiling = 0;
+   }
+   if (mapProj.valid())
+   {
+      mapProj = 0;
+   }
+   points.clear();
+   infos.clear();
+   
+   finalize(0);
+   return 0; // Never reached, but satisfies return type
+}
+
diff --git a/src/apps/ossim-swapbytes/CMakeLists.txt b/ossim/src/apps/ossim-swapbytes/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-swapbytes/CMakeLists.txt
rename to ossim/src/apps/ossim-swapbytes/CMakeLists.txt
diff --git a/src/apps/ossim-swapbytes/Makefile b/ossim/src/apps/ossim-swapbytes/Makefile
similarity index 100%
rename from src/apps/ossim-swapbytes/Makefile
rename to ossim/src/apps/ossim-swapbytes/Makefile
diff --git a/src/apps/ossim-swapbytes/makefile.vc b/ossim/src/apps/ossim-swapbytes/makefile.vc
similarity index 100%
rename from src/apps/ossim-swapbytes/makefile.vc
rename to ossim/src/apps/ossim-swapbytes/makefile.vc
diff --git a/src/apps/ossim-swapbytes/ossim-swapbytes.cpp b/ossim/src/apps/ossim-swapbytes/ossim-swapbytes.cpp
similarity index 100%
rename from src/apps/ossim-swapbytes/ossim-swapbytes.cpp
rename to ossim/src/apps/ossim-swapbytes/ossim-swapbytes.cpp
diff --git a/src/apps/ossim-tfw2ogeom/CMakeLists.txt b/ossim/src/apps/ossim-tfw2ogeom/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-tfw2ogeom/CMakeLists.txt
rename to ossim/src/apps/ossim-tfw2ogeom/CMakeLists.txt
diff --git a/src/apps/ossim-tfw2ogeom/Makefile b/ossim/src/apps/ossim-tfw2ogeom/Makefile
similarity index 100%
rename from src/apps/ossim-tfw2ogeom/Makefile
rename to ossim/src/apps/ossim-tfw2ogeom/Makefile
diff --git a/src/apps/ossim-tfw2ogeom/makefile.vc b/ossim/src/apps/ossim-tfw2ogeom/makefile.vc
similarity index 100%
rename from src/apps/ossim-tfw2ogeom/makefile.vc
rename to ossim/src/apps/ossim-tfw2ogeom/makefile.vc
diff --git a/src/apps/ossim-tfw2ogeom/ossim-tfw2ogeom.cpp b/ossim/src/apps/ossim-tfw2ogeom/ossim-tfw2ogeom.cpp
similarity index 100%
rename from src/apps/ossim-tfw2ogeom/ossim-tfw2ogeom.cpp
rename to ossim/src/apps/ossim-tfw2ogeom/ossim-tfw2ogeom.cpp
diff --git a/src/apps/ossim-tfw2ogeom/template.kwl b/ossim/src/apps/ossim-tfw2ogeom/template.kwl
similarity index 100%
rename from src/apps/ossim-tfw2ogeom/template.kwl
rename to ossim/src/apps/ossim-tfw2ogeom/template.kwl
diff --git a/ossim/src/apps/ossim-viewshed/CMakeLists.txt b/ossim/src/apps/ossim-viewshed/CMakeLists.txt
new file mode 100644
index 0000000..df35013
--- /dev/null
+++ b/ossim/src/apps/ossim-viewshed/CMakeLists.txt
@@ -0,0 +1,2 @@
+FILE(GLOB SOURCE_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
+OSSIM_SETUP_APPLICATION(ossim-viewshed INSTALL COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ${SOURCE_FILES})
diff --git a/ossim/src/apps/ossim-viewshed/Makefile b/ossim/src/apps/ossim-viewshed/Makefile
new file mode 100644
index 0000000..83b9bb1
--- /dev/null
+++ b/ossim/src/apps/ossim-viewshed/Makefile
@@ -0,0 +1,3 @@
+PROGRAM=ossim-viewshed
+
+include ../../../makeprog.mak
diff --git a/ossim/src/apps/ossim-viewshed/makefile.vc b/ossim/src/apps/ossim-viewshed/makefile.vc
new file mode 100644
index 0000000..0f3c135
--- /dev/null
+++ b/ossim/src/apps/ossim-viewshed/makefile.vc
@@ -0,0 +1,11 @@
+###
+# $Id: makefile.vc 12829 2008-05-08 19:42:50Z dburken $
+# 
+# nmake makefile
+#
+# Typical usage:  nmake /f makefile.vc
+###
+
+PROGRAM=ossim-viewshed
+
+!include ..\makefile.inc
diff --git a/ossim/src/apps/ossim-viewshed/ossim-viewshed.cpp b/ossim/src/apps/ossim-viewshed/ossim-viewshed.cpp
new file mode 100644
index 0000000..512e646
--- /dev/null
+++ b/ossim/src/apps/ossim-viewshed/ossim-viewshed.cpp
@@ -0,0 +1,53 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author:  David Burken
+//
+// Description:
+//
+// Application to scan image and attemp to detect the valid image vertices and
+// write them to a keyword list file for later use.  Note that if input
+// file is "foo.tif" this will create "foo_vertices.kwl".
+//
+//*******************************************************************
+//  $Id: ossim-viewshed.cpp 23084 2015-01-15 23:56:48Z okramer $
+
+#include <iostream>
+using namespace std;
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimTimer.h>
+#include <ossim/util/ossimViewshedUtil.h>
+
+int main(int argc, char *argv[])
+{
+   ossimArgumentParser ap(&argc, argv);
+   ap.getApplicationUsage()->setApplicationName(argv[0]);
+
+   // Initialize ossim stuff, factories, plugin, etc.
+   ossimInit::instance()->initialize(ap);
+
+   double t0 = ossimTimer::instance()->time_s();
+
+   ossimRefPtr<ossimViewshedUtil> viewshed = new ossimViewshedUtil;
+   if (!viewshed->initialize(ap))
+      exit(1);
+
+   // Add a listener for the percent complete to standard output.
+   ossimStdOutProgress prog(0, true);
+   viewshed->addListener(&prog);
+   
+   // Start the viewshed process:
+   bool success = viewshed->execute();
+   viewshed = 0;
+   
+   double dt = ossimTimer::instance()->time_s() - t0;
+   cout << argv[0] << "Elapsed Time: " << dt << " s\n" << endl;
+   if (success)
+      exit(0);
+   exit(1);
+}
diff --git a/ossim/src/apps/ossim-viirs-proc/CMakeLists.txt b/ossim/src/apps/ossim-viirs-proc/CMakeLists.txt
new file mode 100644
index 0000000..1508fc7
--- /dev/null
+++ b/ossim/src/apps/ossim-viirs-proc/CMakeLists.txt
@@ -0,0 +1,2 @@
+FILE(GLOB SOURCE_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
+OSSIM_SETUP_APPLICATION(ossim-viirs-proc INSTALL COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ${SOURCE_FILES})
diff --git a/ossim/src/apps/ossim-viirs-proc/ossim-viirs-proc.cpp b/ossim/src/apps/ossim-viirs-proc/ossim-viirs-proc.cpp
new file mode 100644
index 0000000..36fcd51
--- /dev/null
+++ b/ossim/src/apps/ossim-viirs-proc/ossim-viirs-proc.cpp
@@ -0,0 +1,265 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// File: ossim-viirs-proc
+//
+// Description: Application to extract VIIRS Radiance layer, shifting
+// min/max linearly to 16 bit space with coarse grid geometry file.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimMetadataInterface.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimTimer.h>
+#include <ossim/imaging/ossimCastTileSourceFilter.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimShiftFilter.h>
+#include <ossim/imaging/ossimSingleImageChain.h>
+#include <ossim/imaging/ossimTiffWriter.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/projection/ossimCoarseGridModel.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/projection/ossimRpcSolver.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+
+#include <iomanip>
+#include <iostream>
+#include <string>
+using namespace std;
+
+int main(int argc, char* argv[])
+{
+   int status = 0;
+   ossimArgumentParser argumentParser(&argc, argv);
+   ossimInit::instance()->addOptions(argumentParser);
+
+   // Timer for elapsed time:
+   ossimTimer::instance()->setStartTick();
+   
+   ossimInit::instance()->initialize(argc, argv);
+   argumentParser.getApplicationUsage()->setApplicationName(argumentParser.getApplicationName());
+   argumentParser.getApplicationUsage()->setDescription(argumentParser.getApplicationName() + " Extracts VIIRS Radiance layer from hdf5 file, shifting min/max linearly to 16 bit space with a coarse grid or RPC geometry file");
+   argumentParser.getApplicationUsage()->setCommandLineUsage(argumentParser.getApplicationName() + " [options] <image_file>");
+   argumentParser.getApplicationUsage()->addCommandLineOption("--cg","Create a coarse grid projection");
+   argumentParser.getApplicationUsage()->addCommandLineOption("--rpc","Create an RPC projection");
+   bool rpcFlag      = false;
+   bool cgFlag       = false;
+
+   if (argumentParser.read("--rpc"))
+   {
+      rpcFlag = true;
+   }
+   if (argumentParser.read("--cg"))
+   {
+      cgFlag = true;
+   }
+
+   if(!rpcFlag&&!cgFlag)
+   {
+      cgFlag = true;
+   }
+   if(rpcFlag&&cgFlag)
+   {
+      rpcFlag = false;
+   }
+   if (argumentParser.read("-h") || argumentParser.read("--help") || (argumentParser.argc() == 1))
+   {
+      argumentParser.getApplicationUsage()->write(ossimNotify(ossimNotifyLevel_INFO));
+      ossimInit::instance()->finalize();
+      exit(0);
+
+      cout << argv[0] << " <image_file>"
+           << "\n\nExtracts VIIRS Radiance layer from hdf5 file, shifting min/max "
+           << "linearly to 16 bit space with coarse grid geometry file.\n" << endl;
+   }
+   else
+   {
+      ossimFilename inputFile = argv[1];
+      if ( inputFile.exists() )
+      {
+         ossimFilename outputFile = inputFile.expand().noExtension();
+         outputFile.string() += "_1.tif";
+         
+         if ( inputFile != outputFile )
+         {
+            std::string command =
+               "ossim-cmm --null -9999.0 --reader-prop layer=/All_Data/VIIRS-DNB-SDR_All/Radiance ";
+            command += inputFile.string();
+            cout << "Executing command: " << command << endl;
+
+            status = system( command.c_str() );
+
+            if ( status == 0 )
+            {
+               ossimRefPtr<ossimSingleImageChain> sic = new ossimSingleImageChain();
+               if ( sic->open( inputFile, false ) )
+               {
+                  cout << "Opened: " << inputFile << endl;
+
+                  // Set the entry to the Radiance layer.
+                  ossimRefPtr<ossimProperty> readerProp = new  ossimStringProperty(
+                     ossimString("layer"),
+                     ossimString("/All_Data/VIIRS-DNB-SDR_All/Radiance") );
+
+                  sic->getImageHandler()->setProperty( readerProp );
+
+                  // Add filter to shift/stretch data uint16 range.
+                  ossimRefPtr<ossimShiftFilter> sf = new ossimShiftFilter();
+                  sf->setNullPixelValue( 0.0 );
+                  sf->setMinPixelValue( 1.0 );
+                  sf->setMaxPixelValue( 65535.0 );
+                  sic->addFirst( sf.get() );
+
+                  // Cast it to uint16:
+                  ossimRefPtr<ossimCastTileSourceFilter> cf =
+                     new ossimCastTileSourceFilter(0, OSSIM_UINT16 );
+                  sic->addFirst( cf.get() );
+
+                  // Put a cache in front of resampler.
+                  sic->addCache();
+                  
+                  // sic->addResampler();
+                  
+                  sic->initialize();
+                  
+                  // Write image:
+                  ossimRefPtr<ossimImageFileWriter> writer = new ossimTiffWriter();
+                  if ( writer->open( outputFile ) )
+                  {
+                     // Turn on overviews and histograms:
+                     writer->setWriteOverviewFlag( true );
+                     writer->setWriteHistogramFlag( true );
+
+                     // Add a listener to get percent complete.
+                     ossimStdOutProgress prog(0, true);
+                     writer->addListener(&prog);
+                     
+                     writer->connectMyInputTo(0, sic.get());
+
+                     ossimIrect rect = writer->getAreaOfInterest();
+                     
+                     writer->execute();
+
+                     cout << "Wrote file: " << outputFile << endl;
+                     
+                     ossimRefPtr<ossimImageHandler> ih = sic->getImageHandler();
+
+                     if ( ih.valid() )
+                     {
+                        //---
+                        // If there is a coarse grid model write it out so the
+                        // oqutput file will pick it up.
+                        //---
+                        ossimRefPtr<ossimImageGeometry> geom = sic->getImageHandler()->
+                           getImageGeometry();
+                        if ( geom.valid() )
+                        {
+                           ossimRefPtr<ossimProjection> proj = geom->getProjection();
+                           if ( proj.valid() )
+                           {
+                              bool enableElevation = true;
+                              ossimFilename geomFile = outputFile.noExtension();
+                              geomFile.string() += ".geom";
+
+                              if(rpcFlag)
+                              {
+                                 ossimDrect imageRect = sic->getImageHandler()->getBoundingRect();
+                                 ossimRefPtr<ossimRpcSolver> solver =
+                                    new ossimRpcSolver(enableElevation);
+
+                                 solver->solveCoefficients(imageRect,
+                                                           geom.get(),
+                                                           40,
+                                                           40);
+
+                                 ossimRefPtr<ossimImageGeometry> outputProj =
+                                    solver->createRpcProjection();
+                                 ossimKeywordlist geomKwl;
+                                 outputProj->saveState(geomKwl);
+                                 geomKwl.write(geomFile);
+                              }
+                              else
+                              {
+                                 ossimRefPtr<ossimCoarseGridModel> cg =
+                                    dynamic_cast<ossimCoarseGridModel*>( proj.get() );
+                                 if ( cg.valid() )
+                                 {
+                                    // this saves geom file as well
+                                    cg->saveCoarseGrid( geomFile );
+                                    cout << "Wrote file: " << geomFile << endl;
+                                 }
+                                 else
+                                 {
+                                    // Save the state to keyword list.
+                                    ossimKeywordlist geomKwl;
+                                    geom->saveState(geomKwl);
+
+                                    // Write to file:
+                                    geomKwl.write( geomFile.c_str() );
+                                    cout << "Wrote file: " << geomFile << endl;
+                                 }
+                              }
+                           }
+                        }
+
+                        //---
+                        // If the image handler is a metadata interface pass the metadata
+                        // to the dot.omd file and rewrite it.
+                        //---
+                        ossimMetadataInterface* mdi =
+                           dynamic_cast<ossimMetadataInterface*>( ih.get() );
+                        if ( mdi )
+                        {
+                           ossimFilename omdFile = outputFile.noExtension();
+                           omdFile += ".omd";
+                           ossimRefPtr<ossimKeywordlist> kwl = new ossimKeywordlist();
+                           if ( omdFile.exists() )
+                           {
+                              kwl->addFile( omdFile );
+                           }
+                           
+                           std::string prefix = "";
+                           mdi->addMetadata( kwl.get(), prefix );
+                           kwl->write( omdFile.c_str() );
+                           cout << "Wrote file: " << omdFile << endl;
+                        }
+                     }
+                  }
+                  else
+                  {
+                     cerr << "Could not open: " << outputFile << endl;
+                  }
+               }
+            }
+         } 
+         else // Matches: 
+         {
+            cerr << "Input file is same as output file!  Returning..." << endl;
+            status = -1;
+         }
+      }
+      else // Match: if ( inputFile.exists() ){ ... }
+      {
+         cerr << "Input file does not exists!" << endl;
+         status = -1;
+      }
+   }
+
+   cout << "Elapsed time in seconds: "
+        << std::setiosflags(ios::fixed)
+        << std::setprecision(3)
+        << ossimTimer::instance()->time_s() << "\n";
+
+   return status;
+}
+
diff --git a/src/apps/ossim-ws-cmp/CMakeLists.txt b/ossim/src/apps/ossim-ws-cmp/CMakeLists.txt
similarity index 100%
rename from src/apps/ossim-ws-cmp/CMakeLists.txt
rename to ossim/src/apps/ossim-ws-cmp/CMakeLists.txt
diff --git a/src/apps/ossim-ws-cmp/Makefile b/ossim/src/apps/ossim-ws-cmp/Makefile
similarity index 100%
rename from src/apps/ossim-ws-cmp/Makefile
rename to ossim/src/apps/ossim-ws-cmp/Makefile
diff --git a/src/apps/ossim-ws-cmp/makefile.vc b/ossim/src/apps/ossim-ws-cmp/makefile.vc
similarity index 100%
rename from src/apps/ossim-ws-cmp/makefile.vc
rename to ossim/src/apps/ossim-ws-cmp/makefile.vc
diff --git a/ossim/src/apps/ossim-ws-cmp/ossim-ws-cmp.cpp b/ossim/src/apps/ossim-ws-cmp/ossim-ws-cmp.cpp
new file mode 100644
index 0000000..42f64d9
--- /dev/null
+++ b/ossim/src/apps/ossim-ws-cmp/ossim-ws-cmp.cpp
@@ -0,0 +1,229 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Burken
+//
+// Description: Application to compare to workspaces.
+//
+// $Id: foo.cpp 14815 2009-07-01 14:59:11Z gpotts $
+//----------------------------------------------------------------------------
+
+#include <cstdlib> /* for system command */
+#include <ossim/base/ossimDirectory.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/init/ossimInit.h>
+#include <iostream>
+using namespace std;
+
+static bool trace = false; // Turn on to see more stuff...
+
+static void cmpDir(const ossimFilename& wsa,
+                   const ossimFilename& wsb,
+                   const ossimFilename& dir);
+
+static void cmpFile(const ossimFilename& wsa,
+                    const ossimFilename& wsb,
+                    const ossimFilename& file);
+
+static bool isIgnoredFile(const ossimFilename& file);
+
+static void usage()
+{
+   cout << "Usage:  ossim-ws-cmp <wsa> <wsb>\n"
+        << "Compares workspace a (wsa) to workspace b (wsb).\n"
+        << "NOTE: requires \"diff\" command."
+        << endl;
+}
+
+int main(int argc, char *argv[])
+{
+   if (argc != 3)
+   {
+      usage();
+      return 0;
+   }
+
+   ossimFilename wsa = argv[1];
+   ossimFilename wsb = argv[2];
+
+   if ( !wsa.isDir() )
+   {
+      cout << "<wsa> is NOT a directory: " << wsa << endl;
+      usage();
+      return 0;
+   }
+
+   if ( !wsb.isDir() )
+   {
+      cout << "<wsb> is NOT a directory: " << wsb << endl;
+      usage();
+      return 0;
+   }
+
+   cout << "wsa: " << wsa
+        << "\nwsb: " << wsb
+        << endl;
+
+   cmpDir(wsa, wsb, wsa);
+   
+   return 0;
+}
+
+void cmpDir(const ossimFilename& wsa,
+            const ossimFilename& wsb,
+            const ossimFilename& dir)
+{
+   ossimDirectory d;
+   if ( d.open(dir) )
+   {
+      ossimFilename f;
+      if (d.getFirst(f))
+      {
+         while ( f != "" )
+         {
+            // cout << f << endl;
+
+            if ( isIgnoredFile(f) == false )
+            {
+               if ( f.isDir() )
+               {
+                  cmpDir(wsa, wsb, f);
+               }
+               else
+               {
+                  cmpFile(wsa, wsb, f);
+               }
+            }
+            d.getNext(f);
+         }
+      }
+   }
+   else
+   {
+      cout << "Could not open: " << wsa << endl;
+   }
+}
+
+void cmpFile(const ossimFilename& wsa,
+             const ossimFilename& wsb,
+             const ossimFilename& file)
+{
+   ossimFilename bFile = file.substitute(wsa, wsb);
+
+   if ( !file.exists() )
+   {
+      cout << "\nnotice: wsb file: " << bFile
+           << "\nnotice: wsa file does not exists: " << file
+           << "\nb -> a copy command:"
+           << "\ncp " << bFile << " " << file << "\n"
+           << endl;
+   }
+   if ( !bFile.exists() )
+   {
+      cout << "\nnotice: wsa file: " << file
+           << "\nnotice: wsb file does not exists: " << bFile
+           << "\na -> b copy command:"
+           << "\ncp " << file << " " << bFile << "\n"
+           << endl;
+   }
+
+   if ( file.exists() && bFile.exists() )
+   {
+      std::string command = "diff -w --ignore-matching-lines=\\$Id ";
+      command += file.string();
+      command += " ";
+      command += bFile.string();
+      
+      int status = system( command.c_str() );
+      
+      if ( status != 0 )
+      {
+         cout << "\nnotice files differ:"
+              << "\nwsa file: " << file
+              << "\nwsb file: " << bFile
+              << "\na -> b copy command:"
+              << "\ncp " << file << " " << bFile
+              << "\nb -> a copy command:"
+              << "\ncp " << bFile << " " << file << "\n"
+              << endl;
+      }
+   }
+}
+
+bool isIgnoredFile(const ossimFilename& file)
+{
+   bool status = false;
+
+   if (trace)
+   {
+      cout << "file: " << file << endl;
+   }
+   
+   if ( file.size() )
+   {
+      ossimFilename f = file.file();
+      ossimFilename e = file.ext();
+      
+      if ( ( f == ".moc" )                  ||
+           ( f == ".svn" )                  ||
+           ( f == "CMakeCache.txt" )        ||
+           ( f == "CMakeFiles" )            ||
+           ( f == "cmake_install.cmake" )   ||
+           ( f == "cmake_uninstall.cmake" ) ||
+           ( f == "CVS" )                   ||
+           ( f == "doc" )                   || 
+           ( f == ".cvsignore" )            ||
+           ( f == "bin" )                   ||
+           ( f == "build" )                 ||
+           ( f == "builds" )                ||
+           ( f == "configure")              ||
+           ( f == "config.log" )            ||
+           ( f == "config.status")          ||
+           ( f == "lib" )                   ||
+           ( f == "Makefile" )              ||
+           ( f == "Makefile.common" )       ||
+           ( f == "make.out" )              ||
+           ( f == "projects")               ||
+           ( f == "wxmac.icns")             ||
+           ( f == "xcode" )                 ||
+           ( e == "d" )                     || // dot d file
+           ( e == "o" )                     || // object file
+           ( e == "obj" )                   ||
+           ( e == "exe" )                   ||
+           ( e == "tmp" )
+           )
+      {
+         status = true;
+      }
+      else if ( file.contains("apps") || file.contains("test") )
+      {
+         if ( file.isDir() ) // Go into apps and test dir.
+         {
+            status = false;
+         }
+         else if ( (e != "h") && (e != "cpp") )
+         {
+            // Ignore binary files. Only diff headers and source files.
+            status = true;
+         }
+      }
+      if ( file[file.size()-1] == '~' )
+      {
+         status = true; // xemacs
+      }
+      
+   } // if ( file.size() )
+   else
+   {
+      status = true; // empty
+   }
+
+   if ( trace && (status == true) )
+   {
+      cout << "ignoring file: " << file << endl;
+   }
+   
+   return status;
+}
diff --git a/src/examples/tutorial/band_average.cpp b/ossim/src/examples/tutorial/band_average.cpp
similarity index 100%
rename from src/examples/tutorial/band_average.cpp
rename to ossim/src/examples/tutorial/band_average.cpp
diff --git a/src/examples/tutorial/image_copy.cpp b/ossim/src/examples/tutorial/image_copy.cpp
similarity index 100%
rename from src/examples/tutorial/image_copy.cpp
rename to ossim/src/examples/tutorial/image_copy.cpp
diff --git a/src/examples/tutorial/image_copy_b1.cpp b/ossim/src/examples/tutorial/image_copy_b1.cpp
similarity index 100%
rename from src/examples/tutorial/image_copy_b1.cpp
rename to ossim/src/examples/tutorial/image_copy_b1.cpp
diff --git a/src/examples/tutorial/image_data.cpp b/ossim/src/examples/tutorial/image_data.cpp
similarity index 100%
rename from src/examples/tutorial/image_data.cpp
rename to ossim/src/examples/tutorial/image_data.cpp
diff --git a/src/examples/tutorial/image_open.cpp b/ossim/src/examples/tutorial/image_open.cpp
similarity index 100%
rename from src/examples/tutorial/image_open.cpp
rename to ossim/src/examples/tutorial/image_open.cpp
diff --git a/src/examples/tutorial/kwl.cpp b/ossim/src/examples/tutorial/kwl.cpp
similarity index 100%
rename from src/examples/tutorial/kwl.cpp
rename to ossim/src/examples/tutorial/kwl.cpp
diff --git a/src/examples/tutorial/ossim_preferences b/ossim/src/examples/tutorial/ossim_preferences
similarity index 100%
rename from src/examples/tutorial/ossim_preferences
rename to ossim/src/examples/tutorial/ossim_preferences
diff --git a/src/examples/tutorial/reproject.cpp b/ossim/src/examples/tutorial/reproject.cpp
similarity index 100%
rename from src/examples/tutorial/reproject.cpp
rename to ossim/src/examples/tutorial/reproject.cpp
diff --git a/src/examples/tutorial/writing_your_own_image_processing_filter.html b/ossim/src/examples/tutorial/writing_your_own_image_processing_filter.html
similarity index 100%
rename from src/examples/tutorial/writing_your_own_image_processing_filter.html
rename to ossim/src/examples/tutorial/writing_your_own_image_processing_filter.html
diff --git a/ossim/src/ossim/CMakeLists.txt b/ossim/src/ossim/CMakeLists.txt
new file mode 100644
index 0000000..d8dddd9
--- /dev/null
+++ b/ossim/src/ossim/CMakeLists.txt
@@ -0,0 +1,146 @@
+SET(LIB_NAME ossim)
+
+########################################### BEGIN: GRAB SOURCE FILES ##########################################
+FILE(GLOB ossim_dll_main_SRCS RELATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/dll_main/*.cpp")
+FILE(GLOB ossim_SRCS  RELATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} 
+        "${CMAKE_CURRENT_SOURCE_DIR}/ossimConfig*.cpp" 
+        "${CMAKE_CURRENT_SOURCE_DIR}/ossimVer*.cpp" 
+        "${CMAKE_CURRENT_SOURCE_DIR}/init/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/init/*.c" 
+        "${CMAKE_CURRENT_SOURCE_DIR}/base/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/base/*.c" 
+        "${CMAKE_CURRENT_SOURCE_DIR}/elevation/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/elevation/*.c" 
+        "${CMAKE_CURRENT_SOURCE_DIR}/font/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/font/*.c" 
+        "${CMAKE_CURRENT_SOURCE_DIR}/imaging/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/imaging/*.c" 
+        "${CMAKE_CURRENT_SOURCE_DIR}/matrix/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/matrix/*.c" 
+        "${CMAKE_CURRENT_SOURCE_DIR}/parallel/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/parallel/*.c"
+        "${CMAKE_CURRENT_SOURCE_DIR}/point_cloud/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/point_cloud/*.c"
+        "${CMAKE_CURRENT_SOURCE_DIR}/projection/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/projection/*.c" 
+        "${CMAKE_CURRENT_SOURCE_DIR}/support_data/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/support_data/*.c" 
+        "${CMAKE_CURRENT_SOURCE_DIR}/util/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/util/*.c" 
+        "${CMAKE_CURRENT_SOURCE_DIR}/vec/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/vec/*.c" 
+        "${CMAKE_CURRENT_SOURCE_DIR}/video/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/video/*.c" 
+        "${CMAKE_CURRENT_SOURCE_DIR}/vpfutil/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/vpfutil/*.c" 
+        "${CMAKE_CURRENT_SOURCE_DIR}/plugin/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/plugin/*.c")
+
+IF(WIN32)
+	LIST(APPEND ossim_SRCS "${ossim_dll_main_SRCS}")
+ENDIF(WIN32)
+
+ADD_DEFINITIONS("-DOSSIMMAKINGDLL")
+############################### GRAB HEADERS #####################################
+FILE(GLOB ossim_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/*.h")
+FILE(GLOB ossim_base_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/base/*.h")
+FILE(GLOB ossim_elevation_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/elevation/*.h")
+FILE(GLOB ossim_font_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/font/*.h")
+FILE(GLOB ossim_imaging_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/imaging/*.h")
+FILE(GLOB ossim_init_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/init/*.h")
+FILE(GLOB ossim_matrix_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/matrix/*.h")
+FILE(GLOB ossim_parallel_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/parallel/*.h")
+FILE(GLOB ossim_plugin_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/plugin/*.h")
+FILE(GLOB ossim_point_cloud_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/point_cloud/*.h")
+FILE(GLOB ossim_projection_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/projection/*.h")
+FILE(GLOB ossim_support_data_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/support_data/*.h")
+FILE(GLOB ossim_util_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/util/*.h")
+FILE(GLOB ossim_vec_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/vec/*.h")
+FILE(GLOB ossim_video_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/video/*.h")
+FILE(GLOB ossim_vpfutil_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/vpfutil/*.h")
+
+MESSAGE( "${ossim_HDRS}" )
+SET(OSSIM_HEADER_FILES 
+	${ossim_HDRS}
+ 	${ossim_base_HDRS} ${ossim_elevation_HDRS} ${ossim_font_HDRS}  ${ossim_imaging_HDRS} ${ossim_init_HDRS}
+	${ossim_matrix_HDRS} ${ossim_parallel_HDRS} ${ossim_plugin_HDRS} ${ossim_point_cloud_HDRS} ${ossim_projection_HDRS} ${ossim_support_data_HDRS} ${ossim_util_HDRS} ${ossim_vec_HDRS} ${ossim_video_HDRS} ${ossim_vpfutil_HDRS} )
+
+
+################################## APPLE Framework support deep header mapping ###################################
+IF(APPLE)
+  FOREACH(f  ${ossim_HDRS} )
+      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers )
+  ENDFOREACH(f)
+  FOREACH(f  ${ossim_base_HDRS} )
+      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/base )
+  ENDFOREACH(f)
+  FOREACH(f  ${ossim_elevation_HDRS} )
+      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/elevation )
+  ENDFOREACH(f)
+  FOREACH(f  ${ossim_font_HDRS} )
+      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/font )
+  ENDFOREACH(f)
+  FOREACH(f  ${ossim_imaging_HDRS} )
+      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/imaging )
+  ENDFOREACH(f)
+  FOREACH(f  ${ossim_init_HDRS} )
+      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/init )
+  ENDFOREACH(f)
+  FOREACH(f  ${ossim_matrix_HDRS} )
+      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/matrix )
+  ENDFOREACH(f)
+  FOREACH(f  ${ossim_parallel_HDRS} )
+      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/parallel )
+  ENDFOREACH(f)
+  FOREACH(f  ${ossim_plugin_HDRS} )
+      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/plugin )
+  ENDFOREACH(f)
+  FOREACH(f  ${ossim_point_cloud_HDRS} )
+      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/point_cloud )
+  ENDFOREACH(f)
+  FOREACH(f  ${ossim_projection_HDRS} )
+      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/projection )
+  ENDFOREACH(f)
+  FOREACH(f  ${ossim_support_data_HDRS} )
+      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/support_data )
+  ENDFOREACH(f)
+  FOREACH(f  ${ossim_util_HDRS} )
+      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/util )
+  ENDFOREACH(f)
+  FOREACH(f  ${ossim_vec_HDRS} )
+      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/vec )
+  ENDFOREACH(f)
+  FOREACH(f  ${ossim_video_HDRS} )
+      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/video )
+  ENDFOREACH(f)
+
+  FOREACH(f  ${ossim_vpfutil_HDRS} )
+      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/vpfutil )
+  ENDFOREACH(f)
+
+ENDIF(APPLE)
+
+#################################### SETUP the required link parameters using the Ossim macro ####################################
+OSSIM_LINK_LIBRARY(${LIB_NAME} 
+                   COMPONENT_NAME ossim 
+                   TYPE ${OSSIM_USER_DEFINED_DYNAMIC_OR_STATIC}
+                   LIBRARIES ${ossimDependentLibs}
+                   HEADERS "${OSSIM_HEADER_FILES}" 
+                   PUBLIC_HEADERS "${ossim_HDRS}"
+                   SOURCE_FILES "${ossim_SRCS}"
+                   INSTALL_LIB VERSION_SYMLINKS)
+
+# The install headers was duplicating ossimVersion.h and ossimConfig.h in "install_prefix/include".
+# INSTALL_HEADERS)
+
+########################################################## If DO special case for ossim core needs to have the files mapped properly ################################ 
+IF(NOT OSSIM_BUILD_FRAMEWORKS OR NOT APPLE)
+   install(FILES ${ossim_HDRS} DESTINATION include/ossim COMPONENT ossim) 
+   install(FILES ${ossim_base_HDRS} DESTINATION include/ossim/base COMPONENT ossim) 
+   install(FILES ${ossim_elevation_HDRS} DESTINATION include/ossim/elevation COMPONENT ossim)
+   install(FILES ${ossim_font_HDRS} DESTINATION include/ossim/font COMPONENT ossim)
+   install(FILES ${ossim_imaging_HDRS} DESTINATION include/ossim/imaging COMPONENT ossim) 
+   install(FILES ${ossim_init_HDRS} DESTINATION include/ossim/init COMPONENT ossim) 
+   install(FILES ${ossim_matrix_HDRS} DESTINATION include/ossim/matrix COMPONENT ossim) 
+   install(FILES ${ossim_parallel_HDRS} DESTINATION include/ossim/parallel COMPONENT ossim) 
+   install(FILES ${ossim_plugin_HDRS} DESTINATION include/ossim/plugin COMPONENT ossim) 
+   install(FILES ${ossim_point_cloud_HDRS} DESTINATION include/ossim/point_cloud COMPONENT ossim) 
+   install(FILES ${ossim_projection_HDRS} DESTINATION include/ossim/projection COMPONENT ossim) 
+   install(FILES ${ossim_support_data_HDRS} DESTINATION include/ossim/support_data COMPONENT ossim) 
+   install(FILES ${ossim_util_HDRS} DESTINATION include/ossim/util COMPONENT ossim) 
+   install(FILES ${ossim_vec_HDRS} DESTINATION include/ossim/vec COMPONENT ossim) 
+   install(FILES ${ossim_video_HDRS} DESTINATION include/ossim/video COMPONENT ossim) 
+   install(FILES ${ossim_vpfutil_HDRS} DESTINATION include/ossim/vpfutil COMPONENT ossim) 
+ENDIF(NOT OSSIM_BUILD_FRAMEWORKS OR NOT APPLE)
+# ENDIF(NOT OSSIM_FRAMEWORK_GENERATION OR NOT APPLE)
+
+# ---
+# This is the old list of library for the link line.  Replaced with ${ossimDependentLibs}.  
+# Kept temporarily in case I broke something.  drb - 31 Aug. 2011
+# LIBRARIES ${JPEG_LIBRARIES} ${TIFF_LIBRARIES} ${GEOTIFF_LIBRARIES} ${OPENTHREADS_LIBRARIES} ${FREETYPE_LIBRARIES} ${MPI_LIBRARIES} ${ZLIB_LIBRARIES} ${DL_LIBRARY}
+# ---
diff --git a/src/ossim/base/ellips.dat b/ossim/src/ossim/base/ellips.dat
similarity index 100%
rename from src/ossim/base/ellips.dat
rename to ossim/src/ossim/base/ellips.dat
diff --git a/src/ossim/base/makefile.vc b/ossim/src/ossim/base/makefile.vc
similarity index 100%
rename from src/ossim/base/makefile.vc
rename to ossim/src/ossim/base/makefile.vc
diff --git a/src/ossim/base/ossim2dBilinearTransform.cpp b/ossim/src/ossim/base/ossim2dBilinearTransform.cpp
similarity index 100%
rename from src/ossim/base/ossim2dBilinearTransform.cpp
rename to ossim/src/ossim/base/ossim2dBilinearTransform.cpp
diff --git a/src/ossim/base/ossim2dLinearRegression.cpp b/ossim/src/ossim/base/ossim2dLinearRegression.cpp
similarity index 100%
rename from src/ossim/base/ossim2dLinearRegression.cpp
rename to ossim/src/ossim/base/ossim2dLinearRegression.cpp
diff --git a/src/ossim/base/ossim2dTo2dIdentityTransform.cpp b/ossim/src/ossim/base/ossim2dTo2dIdentityTransform.cpp
similarity index 100%
rename from src/ossim/base/ossim2dTo2dIdentityTransform.cpp
rename to ossim/src/ossim/base/ossim2dTo2dIdentityTransform.cpp
diff --git a/ossim/src/ossim/base/ossim2dTo2dMatrixTransform.cpp b/ossim/src/ossim/base/ossim2dTo2dMatrixTransform.cpp
new file mode 100644
index 0000000..d71d9a0
--- /dev/null
+++ b/ossim/src/ossim/base/ossim2dTo2dMatrixTransform.cpp
@@ -0,0 +1,184 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:
+//
+// Description: 
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/base/ossim2dTo2dMatrixTransform.h>
+#include <ossim/base/ossimLeastSquaresBilin.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <iostream>
+RTTI_DEF1(ossim2dTo2dMatrixTransform, "ossim2dTo2dMatrixTransform", ossim2dTo2dTransform);
+ossim2dTo2dMatrixTransform::ossim2dTo2dMatrixTransform()
+{
+   std::fill(m_coefficientsXTerm, m_coefficientsXTerm+4, 0.0);
+   std::fill(m_coefficientsYTerm, m_coefficientsYTerm+4, 0.0);
+   std::fill(m_inverseCoefficientsXTerm, m_inverseCoefficientsXTerm+4, 0.0);
+   std::fill(m_inverseCoefficientsYTerm, m_inverseCoefficientsYTerm+4, 0.0);
+   
+   // setup identity
+   //
+   m_coefficientsXTerm[1] = 1.0;
+   m_coefficientsYTerm[2] = 1.0;
+   m_inverseCoefficientsXTerm[1] = 1.0;
+   m_inverseCoefficientsYTerm[2] = 1.0;
+}
+
+ossim2dTo2dMatrixTransform::ossim2dTo2dMatrixTransform(const ossim2dTo2dMatrixTransform& src)
+:ossim2dTo2dTransform(src)
+{
+   std::copy(src.m_coefficientsXTerm, src.m_coefficientsXTerm+4, m_coefficientsXTerm);
+   std::copy(src.m_coefficientsYTerm, src.m_coefficientsYTerm+4, m_coefficientsYTerm);
+   std::copy(src.m_inverseCoefficientsXTerm, src.m_inverseCoefficientsXTerm+4, m_inverseCoefficientsXTerm);
+   std::copy(src.m_inverseCoefficientsYTerm, src.m_inverseCoefficientsYTerm+4, m_inverseCoefficientsYTerm);
+}
+
+void ossim2dTo2dMatrixTransform::setFromPoints(const ossimDpt& in1, const ossimDpt& in2, const ossimDpt& in3, const ossimDpt& in4,
+                                             const ossimDpt& out1, const ossimDpt& out2, const ossimDpt& out3, const ossimDpt& out4)
+{
+   ossimDpt input[4];
+   ossimDpt output[4];
+   
+   input[0] = in1;
+   input[1] = in2;
+   input[2] = in3;
+   input[3] = in4;
+   
+   output[0] = out1;
+   output[1] = out2;
+   output[2] = out3;
+   output[3] = out4;
+   
+   setFromPoints(&input[0], &output[0], 4);
+}
+
+void ossim2dTo2dMatrixTransform::setFromPoints(const ossimDpt* input,
+                                             const ossimDpt* output, 
+                                             ossim_uint32 arraySize)
+{
+   ossimLeastSquaresBilin inx;
+   ossimLeastSquaresBilin inversex;
+   ossimLeastSquaresBilin iny;
+   ossimLeastSquaresBilin inversey;
+   ossim_uint32 idx = 0;
+   for(idx=0; idx < arraySize; ++idx)
+   {
+      inx.addSample(input[idx].x, input[idx].y, output[idx].x);
+      inversex.addSample(output[idx].x, output[idx].y, input[idx].x);
+      iny.addSample(input[idx].x, input[idx].y, output[idx].y);
+      inversey.addSample(output[idx].x, output[idx].y, input[idx].y);
+   }
+   inx.solveLS();
+   inversex.solveLS();
+   iny.solveLS();
+   inversey.solveLS();
+   inx.getLSParms(m_coefficientsXTerm[0], m_coefficientsXTerm[1], m_coefficientsXTerm[2], m_coefficientsXTerm[3]);
+   iny.getLSParms(m_coefficientsYTerm[0], m_coefficientsYTerm[1], m_coefficientsYTerm[2], m_coefficientsYTerm[3]);
+   inversex.getLSParms(m_inverseCoefficientsXTerm[0], m_inverseCoefficientsXTerm[1], m_inverseCoefficientsXTerm[2], m_inverseCoefficientsXTerm[3]);
+   inversey.getLSParms(m_inverseCoefficientsYTerm[0], m_inverseCoefficientsYTerm[1], m_inverseCoefficientsYTerm[2], m_inverseCoefficientsYTerm[3]);
+}
+
+bool ossim2dTo2dMatrixTransform::saveState(ossimKeywordlist& kwl,
+                                       const char* prefix)const
+{
+   ossimString xterm = (ossimString::toString(m_coefficientsXTerm[0])
+                        +" "+ossimString::toString(m_coefficientsXTerm[1])
+                        +" "+ossimString::toString(m_coefficientsXTerm[2])
+                        +" "+ossimString::toString(m_coefficientsXTerm[3]));
+   ossimString yterm = (ossimString::toString(m_coefficientsYTerm[0])
+                        +" "+ossimString::toString(m_coefficientsYTerm[1])
+                        +" "+ossimString::toString(m_coefficientsYTerm[2])
+                        +" "+ossimString::toString(m_coefficientsYTerm[3]));
+   ossimString inverse_xterm = (ossimString::toString(m_inverseCoefficientsXTerm[0])
+                        +" "+ossimString::toString(m_inverseCoefficientsXTerm[1])
+                        +" "+ossimString::toString(m_inverseCoefficientsXTerm[2])
+                        +" "+ossimString::toString(m_inverseCoefficientsXTerm[3]));
+   ossimString inverse_yterm = (ossimString::toString(m_inverseCoefficientsYTerm[0])
+                        +" "+ossimString::toString(m_inverseCoefficientsYTerm[1])
+                        +" "+ossimString::toString(m_inverseCoefficientsYTerm[2])
+                        +" "+ossimString::toString(m_inverseCoefficientsYTerm[3]));
+   
+   kwl.add(prefix, "xterm", xterm, true);
+   kwl.add(prefix, "yterm", yterm, true);
+   kwl.add(prefix, "inverse_xterm", inverse_xterm, true);
+   kwl.add(prefix, "inverse_yterm", inverse_yterm, true);
+   return ossim2dTo2dTransform::saveState(kwl, prefix);
+}
+
+bool ossim2dTo2dMatrixTransform::loadState(const ossimKeywordlist& kwl,
+                                       const char* prefix)
+{
+   bool result = true;
+   ossimString xterm = kwl.find(prefix, "xterm");
+   ossimString yterm = kwl.find(prefix, "yterm");
+   ossimString inverse_xterm = kwl.find(prefix, "inverse_xterm");
+   ossimString inverse_yterm = kwl.find(prefix, "inverse_yterm");
+   
+   std::vector<ossimString> values;
+   xterm.split(values, " ");
+   if(values.size() == 4)
+   {
+      m_coefficientsXTerm[0] = values[0].toDouble();
+      m_coefficientsXTerm[1] = values[1].toDouble();
+      m_coefficientsXTerm[2] = values[2].toDouble();
+      m_coefficientsXTerm[3] = values[3].toDouble();
+   }
+   else 
+   {
+      result = false;
+   }
+   values.clear();
+   yterm.split(values, " ");
+   if(values.size() == 4)
+   {
+      m_coefficientsYTerm[0] = values[0].toDouble();
+      m_coefficientsYTerm[1] = values[1].toDouble();
+      m_coefficientsYTerm[2] = values[2].toDouble();
+      m_coefficientsYTerm[3] = values[3].toDouble();
+   }
+   else 
+   {
+      result = false;
+   }
+   values.clear();
+   inverse_xterm.split(values, " ");
+   if(values.size() == 4)
+   {
+      m_inverseCoefficientsXTerm[0] = values[0].toDouble();
+      m_inverseCoefficientsXTerm[1] = values[1].toDouble();
+      m_inverseCoefficientsXTerm[2] = values[2].toDouble();
+      m_inverseCoefficientsXTerm[3] = values[3].toDouble();
+   }
+   else 
+   {
+      result = false;
+   }
+   values.clear();
+   inverse_yterm.split(values, " ");
+   if(values.size() == 4)
+   {
+      m_inverseCoefficientsYTerm[0] = values[0].toDouble();
+      m_inverseCoefficientsYTerm[1] = values[1].toDouble();
+      m_inverseCoefficientsYTerm[2] = values[2].toDouble();
+      m_inverseCoefficientsYTerm[3] = values[3].toDouble();
+   }
+   else 
+   {
+      result = false;
+   }
+
+   if(result)
+   {
+      result = ossim2dTo2dTransform::loadState(kwl, prefix);
+   }
+   
+   return result;
+}
+
diff --git a/src/ossim/base/ossim2dTo2dShiftTransform.cpp b/ossim/src/ossim/base/ossim2dTo2dShiftTransform.cpp
similarity index 100%
rename from src/ossim/base/ossim2dTo2dShiftTransform.cpp
rename to ossim/src/ossim/base/ossim2dTo2dShiftTransform.cpp
diff --git a/ossim/src/ossim/base/ossim2dTo2dTransform.cpp b/ossim/src/ossim/base/ossim2dTo2dTransform.cpp
new file mode 100644
index 0000000..b0fae3a
--- /dev/null
+++ b/ossim/src/ossim/base/ossim2dTo2dTransform.cpp
@@ -0,0 +1,281 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossim2dTo2dTransform.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstdlib>
+#include <sstream>
+#include <ossim/base/ossim2dTo2dTransform.h>
+
+
+RTTI_DEF1(ossim2dTo2dTransform, "ossim2dTo2dTransform", ossimObject);
+
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimNotifyContext.h>
+
+// ### CREATE_COPY ###
+// Implementation of static factory method createCopy() requires includes here of ALL 2D-to-2D
+// transform types that need a deep copy capability:
+#include <ossim/base/ossimAffineTransform.h>
+#include <ossim/projection/ossimImageViewAffineTransform.h>
+#include <ossim/projection/ossimImageViewProjectionTransform.h>
+#include <ossim/projection/ossimMeanRadialLensDistortion.h>
+#include <ossim/base/ossimQuadTreeWarp.h>
+#include <ossim/projection/ossimRadialDecentLensDistortion.h>
+
+//***
+// Define Trace flags for use within this file:
+//***
+#include <ossim/base/ossimTrace.h>
+static ossimTrace traceExec  ("ossim2dTo2dTransform:exec");
+static ossimTrace traceDebug ("ossim2dTo2dTransform:debug");
+
+static const double DEFAULT_THRESHOLD      = 1000.0*DBL_EPSILON;
+static const int    DEFAULT_MAX_ITERATIONS = 10;
+
+//*****************************************************************************
+//  CONSTRUCTOR: 
+//*****************************************************************************
+ossim2dTo2dTransform::ossim2dTo2dTransform()
+   :
+      theConvergenceThreshold (DEFAULT_THRESHOLD),
+      theMaxIterations        (DEFAULT_MAX_ITERATIONS),
+      theDxDy(1.0, 1.0)
+{
+}
+ 
+//*****************************************************************************
+//  METHOD: 
+//*****************************************************************************
+void ossim2dTo2dTransform::inverse(const ossimDpt& input,
+                                   ossimDpt&       output) const
+{
+   static const char MODULE[] = "ossim2dTo2dTransform::inverse";
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG: " << MODULE << ", entering...\n";
+   
+   //***
+   // Begin with guess. Forward transform is defined as trasforming left to
+   // right. We are therefore solving for left:
+   //***
+   ossimDpt left = getOrigin();
+   ossimDpt left_dx;
+   ossimDpt left_dy;
+   ossimDpt right;
+   ossimDpt right_dx;
+   ossimDpt right_dy;
+   ossimDpt dr_dx;
+   ossimDpt dr_dy;
+   ossimDpt r_diff;
+   ossimDpt l_diff;
+   double inverse_norm;
+   int iters=0;
+   //***
+   // Begin iterations:
+   //***
+   do
+   {
+      //***
+      // establish perturbed image points about the guessed point:
+      //***
+      left_dx.x = left.x + theDxDy.x;
+      left_dx.y = left.y;
+      left_dy.x = left.x;
+      left_dy.y = left.y + theDxDy.y;
+      
+      //***
+      // Compute numerical partials at current guessed point:
+      //***
+      forward(left,    right);
+      forward(left_dx, right_dx);
+      forward(left_dy, right_dy);
+
+      dr_dx.x = (right_dx.x - right.x)/theDxDy.x; //e
+      dr_dx.y = (right_dx.y - right.y)/theDxDy.y; //g
+      dr_dy.x = (right_dy.x - right.x)/theDxDy.x; //f
+      dr_dy.y = (right_dy.y - right.y)/theDxDy.y; //h
+
+      //***
+      // Test for convergence:
+      //***
+      r_diff = input - right;
+      
+      //***
+      // Compute linearized estimate of image point given gp delta:
+      //***
+      inverse_norm = dr_dy.x*dr_dx.y - dr_dx.x*dr_dy.y; // fg-eh
+
+      if (inverse_norm != 0)
+      {
+         l_diff.x = (-dr_dy.y*r_diff.x + dr_dy.x*r_diff.y)/inverse_norm;
+         l_diff.y = ( dr_dx.y*r_diff.x - dr_dx.x*r_diff.y)/inverse_norm;
+
+         left += l_diff;
+      }
+      else
+      {
+         l_diff.x = 0;
+         l_diff.y = 0;
+      }
+
+      iters++;
+      
+   } while (((fabs(l_diff.x) > theConvergenceThreshold) ||
+             (fabs(l_diff.y) > theConvergenceThreshold)) &&
+            (iters < theMaxIterations));
+
+   //***
+   // Note that this error mesage appears only if max count was reached while
+   // iterating. A linear (no iteration) solution would finish with iters =
+   // MAX_NUM_ITERATIONS + 1:
+   //***
+    if (iters == theMaxIterations)
+    {
+       ossimNotify(ossimNotifyLevel_WARN) << "WARNING: " << MODULE << ", exceeded max number of iterations computing inverse "
+                                          << "transform for point: " << input << "\n";
+    }
+
+   output = left;
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG: " << MODULE << ", returning...\n";
+   return;
+   
+}
+
+//*****************************************************************************
+//  METHOD: 
+//*****************************************************************************
+bool ossim2dTo2dTransform::saveState(ossimKeywordlist& kwl,
+                                     const char* prefix) const
+{
+   kwl.add(prefix,
+           ossimKeywordNames::CONVERGENCE_THRESHOLD_KW,
+           theConvergenceThreshold,
+           true);
+   kwl.add(prefix,
+           ossimKeywordNames::MAX_ITERATIONS_KW,
+           theMaxIterations,
+           true);
+   kwl.add(prefix,
+           "dxdy",
+           ossimString::toString(theDxDy.x) + " " +
+           ossimString::toString(theDxDy.y),
+           true);
+           
+   return ossimObject::saveState(kwl, prefix);
+}
+
+//*****************************************************************************
+//  METHOD: 
+//*****************************************************************************
+bool ossim2dTo2dTransform::loadState(const ossimKeywordlist& kwl,
+               const char* prefix)
+{
+  bool result = true;
+
+   const char* buf;
+
+   buf= kwl.find(prefix, ossimKeywordNames::CONVERGENCE_THRESHOLD_KW);
+
+   if (buf)
+   {
+      theConvergenceThreshold = atof(buf);
+   }
+   else
+   {
+      theConvergenceThreshold = .00000000000002;
+   }
+   
+   buf= kwl.find(prefix, ossimKeywordNames::MAX_ITERATIONS_KW);
+   if(buf)
+   {
+      theMaxIterations = atoi(buf);
+   }
+   else
+   {
+      theMaxIterations = 10;
+   }
+   const char* dxdy = kwl.find(prefix, "dxdy");
+   if(dxdy)
+   {
+      ossimString tempString(dxdy);
+      std::vector<ossimString> splitArray;
+      tempString = tempString.trim();
+      tempString.split(splitArray, " ");
+      if(splitArray.size()==2)
+      {
+         theDxDy.x = splitArray[0].toDouble();
+         theDxDy.y = splitArray[1].toDouble();
+      }
+   }
+   if(result)
+   {
+      ossimObject::loadState(kwl, prefix);
+   }
+   
+   return result;
+}
+   
+void ossim2dTo2dTransform::forward(ossimDpt&  modify_this) const 
+{
+   ossimDpt output;
+   forward(modify_this, output);
+   modify_this = output;
+}
+
+void ossim2dTo2dTransform::inverse(ossimDpt&  modify_this) const 
+{
+   ossimDpt output;
+   inverse(modify_this, output);
+   modify_this = output;
+}
+
+ossimDpt ossim2dTo2dTransform::getOrigin()const
+{
+   return ossimDpt(0,0);
+}
+
+void ossim2dTo2dTransform::setConvergenceThreshold(const double& new_threshold)
+{
+   theConvergenceThreshold = new_threshold;
+}
+
+void ossim2dTo2dTransform::setMaxIterations(int new_max_iters)
+{
+   theMaxIterations = new_max_iters;
+}
+
+void ossim2dTo2dTransform::setDxDy(const ossimDpt& dxdy)
+{
+   theDxDy.x = dxdy.x;
+   theDxDy.y = dxdy.y;
+}
+
+const ossim2dTo2dTransform& ossim2dTo2dTransform::operator=(const ossim2dTo2dTransform&  rhs )
+{
+   if (this != &rhs)
+   {
+      ossimObject::operator = (rhs);
+      
+      theConvergenceThreshold = rhs.theConvergenceThreshold;
+      theMaxIterations        = rhs.theMaxIterations;
+      theDxDy                 = rhs.theDxDy;
+   }
+   return *this;
+}
+
+std::ostream& ossim2dTo2dTransform::print(std::ostream& out) const
+{
+   out << "convergenceThreshold: " << theConvergenceThreshold << "\n"
+   << "maxIterations:        " << theMaxIterations << "\n"
+   << "dxdy:                 " << theDxDy << "\n";
+   return out;
+}
+
+
diff --git a/ossim/src/ossim/base/ossim2dTo2dTransformFactory.cpp b/ossim/src/ossim/base/ossim2dTo2dTransformFactory.cpp
new file mode 100644
index 0000000..d5502a9
--- /dev/null
+++ b/ossim/src/ossim/base/ossim2dTo2dTransformFactory.cpp
@@ -0,0 +1,67 @@
+//**************************************************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: Implementation of ossim2dTo2dTransformFactory.
+//
+//**************************************************************************************************
+// $Id$
+#include <ossim/base/ossim2dTo2dTransformFactory.h>
+#include <ossim/base/ossim2dBilinearTransform.h>
+#include <ossim/base/ossim2dTo2dShiftTransform.h>
+#include <ossim/base/ossim2dTo2dIdentityTransform.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimRefPtr.h>
+
+ossim2dTo2dTransformFactory* ossim2dTo2dTransformFactory::m_instance = 0;
+ossim2dTo2dTransformFactory* ossim2dTo2dTransformFactory::instance()
+{
+   if(!m_instance)
+   {
+      m_instance = new ossim2dTo2dTransformFactory();
+   }
+   return m_instance;
+}
+
+ossim2dTo2dTransform* ossim2dTo2dTransformFactory::createTransform(const ossimString& name)const
+{
+   ossim2dTo2dTransform* result = 0;
+   if(name == STATIC_TYPE_NAME(ossim2dBilinearTransform))
+   {
+      result = new ossim2dBilinearTransform();
+   }
+   else if(name == STATIC_TYPE_NAME(ossim2dTo2dShiftTransform))
+   {
+      result = new ossim2dTo2dShiftTransform();
+   }
+   else if(name == STATIC_TYPE_NAME(ossim2dTo2dIdentityTransform))
+   {
+      result = new ossim2dTo2dIdentityTransform();
+   }
+   
+   return result;
+}
+
+ossim2dTo2dTransform* ossim2dTo2dTransformFactory::createTransform(const ossimKeywordlist& kwl,
+                                                                   const char* prefix)const
+{
+   ossimString type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
+   ossimRefPtr<ossim2dTo2dTransform> result =  createTransform(type);
+   if(result.valid()&&!result->loadState(kwl, prefix))
+   {
+      result = 0;
+   }
+   
+   return result.release();
+}
+
+void ossim2dTo2dTransformFactory::getTypeNameList(std::vector<ossimString>& typeList)const
+{
+   typeList.push_back(STATIC_TYPE_NAME(ossim2dBilinearTransform));
+   typeList.push_back(STATIC_TYPE_NAME(ossim2dTo2dShiftTransform));
+   typeList.push_back(STATIC_TYPE_NAME(ossim2dTo2dIdentityTransform));
+}
+
diff --git a/ossim/src/ossim/base/ossim2dTo2dTransformRegistry.cpp b/ossim/src/ossim/base/ossim2dTo2dTransformRegistry.cpp
new file mode 100644
index 0000000..e2da0e9
--- /dev/null
+++ b/ossim/src/ossim/base/ossim2dTo2dTransformRegistry.cpp
@@ -0,0 +1,27 @@
+//**************************************************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: Implementation of ossim2dTo2dTransformRegistry.
+//
+//**************************************************************************************************
+// $Id$
+#include <ossim/base/ossim2dTo2dTransformRegistry.h>
+#include <ossim/base/ossim2dTo2dTransformFactory.h>
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+ossim2dTo2dTransformRegistry* ossim2dTo2dTransformRegistry::m_instance = 0;
+RTTI_DEF1(ossim2dTo2dTransformRegistry, "ossim2dTo2dTransformRegistry", ossimObjectFactory);
+ossim2dTo2dTransformRegistry* ossim2dTo2dTransformRegistry::instance()
+{
+   if(!m_instance)
+   {
+      m_instance = new ossim2dTo2dTransformRegistry();
+      m_instance->registerFactory(ossim2dTo2dTransformFactory::instance());
+      ossimObjectFactoryRegistry::instance()->registerFactory(m_instance);
+   }
+   
+   return m_instance;
+}
+
diff --git a/src/ossim/base/ossimActiveEdgeTable.cpp b/ossim/src/ossim/base/ossimActiveEdgeTable.cpp
similarity index 100%
rename from src/ossim/base/ossimActiveEdgeTable.cpp
rename to ossim/src/ossim/base/ossimActiveEdgeTable.cpp
diff --git a/src/ossim/base/ossimAdjSolutionAttributes.cpp b/ossim/src/ossim/base/ossimAdjSolutionAttributes.cpp
old mode 100755
new mode 100644
similarity index 100%
rename from src/ossim/base/ossimAdjSolutionAttributes.cpp
rename to ossim/src/ossim/base/ossimAdjSolutionAttributes.cpp
diff --git a/src/ossim/base/ossimAdjustableParameterInfo.cpp b/ossim/src/ossim/base/ossimAdjustableParameterInfo.cpp
similarity index 100%
rename from src/ossim/base/ossimAdjustableParameterInfo.cpp
rename to ossim/src/ossim/base/ossimAdjustableParameterInfo.cpp
diff --git a/ossim/src/ossim/base/ossimAdjustableParameterInterface.cpp b/ossim/src/ossim/base/ossimAdjustableParameterInterface.cpp
new file mode 100644
index 0000000..ed53f00
--- /dev/null
+++ b/ossim/src/ossim/base/ossimAdjustableParameterInterface.cpp
@@ -0,0 +1,894 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimAdjustableParameterInterface.cpp 23297 2015-05-05 20:32:16Z dburken $
+#include <algorithm>
+#include <ossim/base/ossimAdjustableParameterInterface.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimUnitTypeLut.h>
+
+RTTI_DEF(ossimAdjustableParameterInterface, "ossimAdjustableParameterInterface");
+
+static const char* NUMBER_OF_ADJUSTMENTS_KW = "number_of_adjustments";
+static const char* NUMBER_OF_ADJUSTMENTS_OLD_KW = "number_of_adjustements";
+static const char* CURRENT_ADJUSTMENT_OLD_KW    = "current_adjustement";
+static const char* CURRENT_ADJUSTMENT_KW    = "current_adjustment";
+static const char* ADJUSTMENT_PREFIX        = "adjustment_";
+
+ossimAdjustableParameterInterface::ossimAdjustableParameterInterface()
+   :
+   theChangeFlags(false),
+   theAdjustmentList(0),
+   theCurrentAdjustment(0)
+{
+}
+
+ossimAdjustableParameterInterface::ossimAdjustableParameterInterface(const ossimAdjustableParameterInterface& rhs)
+   :
+   theChangeFlags(rhs.theChangeFlags),
+   theAdjustmentList(rhs.theAdjustmentList),
+   theCurrentAdjustment(rhs.theCurrentAdjustment)
+{
+}
+
+void ossimAdjustableParameterInterface::newAdjustment(ossim_uint32 numberOfParameters)
+{
+   theAdjustmentList.push_back(ossimAdjustmentInfo());
+   if(numberOfParameters > 0)
+   {
+      theAdjustmentList[theAdjustmentList.size()-1].setNumberOfAdjustableParameters(numberOfParameters);
+      theAdjustmentList[theAdjustmentList.size()-1].setDescription("Initial adjustment");
+   }
+
+   theCurrentAdjustment = (ossim_uint32) theAdjustmentList.size() - 1;
+   initChangeFlags();
+}
+
+void ossimAdjustableParameterInterface::setAdjustmentDescription(const ossimString& description)
+{
+   if(!theAdjustmentList.size())
+   {
+      return;
+   }
+   theAdjustmentList[theCurrentAdjustment].setDescription(description);
+}
+
+ossimString ossimAdjustableParameterInterface::getAdjustmentDescription()const
+{
+   if(theAdjustmentList.size())
+   {
+      return theAdjustmentList[theCurrentAdjustment].getDescription();
+   }
+
+   return "";
+}
+
+
+ossimString ossimAdjustableParameterInterface::getAdjustmentDescription(ossim_uint32 adjustmentIdx)const
+{
+   if(adjustmentIdx < theAdjustmentList.size())
+   {
+      return theAdjustmentList[adjustmentIdx].getDescription();
+   }
+   return "";
+}
+
+void ossimAdjustableParameterInterface::setCurrentAdjustment(ossim_uint32 adjustmentIdx, bool notify)
+{
+   if(adjustmentIdx < theAdjustmentList.size())
+   {
+      theCurrentAdjustment = adjustmentIdx;
+      initChangeFlags();
+      if(notify)
+      {
+         adjustableParametersChanged();
+      }
+   }
+}
+
+//*********************************************************************************
+//! Sets the current adjustment to the adjustment with a matching description. If
+//! Returns TRUE if successfully matched.
+//*********************************************************************************
+bool ossimAdjustableParameterInterface::setCurrentAdjustment(const ossimString& description, bool notify)
+{
+   for (unsigned int i=0; i<theAdjustmentList.size(); i++)
+   {
+      if (theAdjustmentList[i].getDescription() == description)
+      {
+         setCurrentAdjustment(i, notify);
+         return true;
+      }
+   }
+   return false;
+}
+
+void ossimAdjustableParameterInterface::initAdjustableParameters()
+{
+}
+
+void ossimAdjustableParameterInterface::resetAdjustableParameters(bool notify)
+{
+    if(!theAdjustmentList.size())
+    {
+       return;
+    }
+    
+    ossim_uint32 saveCurrent = theCurrentAdjustment;
+    copyAdjustment();
+    initAdjustableParameters();
+    ossim_uint32 numberOfAdjustables = getNumberOfAdjustableParameters();
+    ossim_uint32 idx = 0;
+    
+    for(idx = 0; idx < numberOfAdjustables; ++idx)
+    {
+       theAdjustmentList[saveCurrent].getParameterList()[idx].setParameter(theAdjustmentList[theAdjustmentList.size()-1].getParameterList()[idx].getParameter());
+    }
+
+    setCurrentAdjustment(saveCurrent);
+
+    eraseAdjustment((ossim_uint32)theAdjustmentList.size()-1, false);
+    
+    if(notify)
+    {
+       adjustableParametersChanged();
+    }
+}
+
+void ossimAdjustableParameterInterface::copyAdjustment(ossim_uint32 idx, bool notify)
+{
+    if(!theAdjustmentList.size())
+    {
+       return;
+    }
+    if(idx < theAdjustmentList.size())
+    {
+       theAdjustmentList.push_back(theAdjustmentList[idx]);
+
+       if(idx == theCurrentAdjustment)
+       {
+          theCurrentAdjustment = (ossim_uint32) theAdjustmentList.size() - 1;
+          initChangeFlags();
+       }
+       if(notify)
+       {
+          adjustableParametersChanged();
+       }
+    }
+    
+}
+
+void ossimAdjustableParameterInterface::copyAdjustment(bool notify)
+{
+   copyAdjustment(theCurrentAdjustment, notify);
+}
+
+void ossimAdjustableParameterInterface::keepAdjustment(ossim_uint32 idx,
+                                                       bool createCopy)
+{
+    if(!theAdjustmentList.size())
+    {
+       return;
+    }
+    if(idx < theAdjustmentList.size())
+    {
+       if(createCopy)
+       {
+          copyAdjustment(idx);
+       }
+       theAdjustmentList[theCurrentAdjustment].keep();
+    }
+}
+
+void ossimAdjustableParameterInterface::keepAdjustment(bool createCopy)
+{
+   keepAdjustment(theCurrentAdjustment, createCopy);
+}
+
+const ossimAdjustableParameterInterface& ossimAdjustableParameterInterface::operator = (const ossimAdjustableParameterInterface& rhs)
+{
+   if (this != &rhs)
+   {
+      theAdjustmentList    = rhs.theAdjustmentList;
+      theCurrentAdjustment = rhs.theCurrentAdjustment;
+   }
+   return *this;
+}
+
+void ossimAdjustableParameterInterface::removeAllAdjustments()
+{
+   theAdjustmentList.clear();
+   theCurrentAdjustment = 0;
+}
+
+ossim_uint32 ossimAdjustableParameterInterface::getNumberOfAdjustableParameters()const
+{
+   if(theAdjustmentList.size())
+   {
+      return theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters();
+   }
+
+   return 0;
+}
+
+void ossimAdjustableParameterInterface::eraseAdjustment(bool notify)
+{
+   eraseAdjustment(theCurrentAdjustment, notify);
+}
+
+void ossimAdjustableParameterInterface::eraseAdjustment(ossim_uint32 idx, bool notify)
+{
+   if(!theAdjustmentList.size())
+   {
+      return;
+   }
+   
+   if(theCurrentAdjustment == idx)
+   {
+      theAdjustmentList.erase(theAdjustmentList.begin() + theCurrentAdjustment);
+      if(theCurrentAdjustment >= theAdjustmentList.size())
+      {
+         if(theAdjustmentList.size() < 1)
+         {
+            theCurrentAdjustment = 0;
+         }
+         else
+         {
+            theCurrentAdjustment = (ossim_uint32)theAdjustmentList.size() - 1;
+         }
+         
+      }
+      
+      if(notify)
+      {
+         adjustableParametersChanged();
+      }
+   }
+   else if(idx < theAdjustmentList.size())
+   {
+      theAdjustmentList.erase(theAdjustmentList.begin() + idx);
+      if(theAdjustmentList.size() < 1)
+      {
+         theCurrentAdjustment = 0;
+      }
+      else
+      {
+         if(theCurrentAdjustment > idx)
+         {
+            --theCurrentAdjustment;
+            if(notify)
+            {
+               adjustableParametersChanged();
+            }
+         }
+      }
+      if(notify)
+      {
+         adjustableParametersChanged();
+      }
+   }
+}
+
+double ossimAdjustableParameterInterface::getAdjustableParameter(ossim_uint32 idx)const
+{
+   if(theAdjustmentList.size())
+   {
+      if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
+      {
+         return theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].getParameter();
+      }
+   }
+   
+   return 0.0;
+}
+
+void ossimAdjustableParameterInterface::setAdjustableParameter(ossim_uint32 idx, double value, double sigma, bool notify)
+{
+   if(!theAdjustmentList.size())
+   {
+      return;
+   }
+   if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
+   {
+      theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].setParameter(value);
+      theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].setSigma(sigma);
+      theChangeFlags[idx] = true;
+      if(notify)
+      {
+         adjustableParametersChanged();
+      }
+   }
+   
+}
+
+void ossimAdjustableParameterInterface::setAdjustableParameter(ossim_uint32 idx, double value, bool notify)
+{
+   if(!theAdjustmentList.size())
+   {
+      return;
+   }
+   if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
+   {
+      theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].setParameter(value);
+      theChangeFlags[idx] = true;
+
+      if(notify)
+      {
+         adjustableParametersChanged();
+      }
+   }
+}
+
+double ossimAdjustableParameterInterface::getParameterSigma(ossim_uint32 idx)const
+{
+   if(theAdjustmentList.size())
+   {
+      if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
+      {
+         return theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].getSigma();
+      }
+   }
+
+   return 0.0;
+}
+
+void ossimAdjustableParameterInterface::setParameterSigma(ossim_uint32 idx, double value, bool notify)
+{
+   if(!theAdjustmentList.size())
+   {
+      return;
+   }
+   if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
+   {
+      theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].setSigma(value);
+      if(notify)
+      {
+         adjustableParametersChanged();
+      }
+   }
+}
+
+ossimUnitType ossimAdjustableParameterInterface::getParameterUnit(ossim_uint32 idx)const
+{
+   if(theAdjustmentList.size())
+   {
+      if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
+      {
+         return theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].getUnit();
+      }
+   }
+
+   return OSSIM_UNIT_UNKNOWN;
+}
+
+void ossimAdjustableParameterInterface::setParameterUnit(ossim_uint32 idx, ossimUnitType unit)
+{
+   if(theAdjustmentList.size())
+   {
+      if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
+      {
+         theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].setUnit(unit);
+      }
+   }
+}
+
+void ossimAdjustableParameterInterface::setParameterUnit(ossim_uint32 idx, const ossimString& unit)
+{
+   if(theAdjustmentList.size())
+   {
+      if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
+      {
+         theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].setUnit((ossimUnitType)ossimUnitTypeLut::instance()->getEntryNumber(unit));
+      }
+   }
+}
+
+
+ossimString ossimAdjustableParameterInterface::getParameterDescription(ossim_uint32 idx)const
+{
+   if(theAdjustmentList.size())
+   {
+      if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
+      {
+         return theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].getDescription();
+      }
+   }
+
+   return ossimString("");
+}
+
+void ossimAdjustableParameterInterface::setParameterDescription(ossim_uint32 idx,
+                                                                const ossimString& description)
+{
+   if(!theAdjustmentList.size())
+   {
+      return;
+   }
+   if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
+   {
+      theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].setDescription(description);
+   }
+}
+
+void  ossimAdjustableParameterInterface::setParameterCenter(ossim_uint32 idx, double center, bool notify)
+{
+   if(!theAdjustmentList.size())
+   {
+      return;
+   }
+
+   if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
+   {
+     theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].setCenter(center);
+
+	 if(notify)
+	 {
+	   adjustableParametersChanged();
+	 }
+   }
+}
+
+double ossimAdjustableParameterInterface::getParameterCenter(ossim_uint32 idx)const
+{
+   if(!theAdjustmentList.size())
+   {
+      return 0.0;
+   }
+   if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
+   {
+      return theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].getCenter();
+   }
+
+   return 0.0;
+}
+
+double   ossimAdjustableParameterInterface::computeParameterOffset(ossim_uint32 idx)const
+{
+   if(!theAdjustmentList.size())
+   {
+      return 0.0;
+   }
+   if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
+   {
+      return theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].computeOffset();
+   }
+
+   return 0.0;
+}
+
+ossim_int32 ossimAdjustableParameterInterface::findParameterIdxGivenDescription(ossim_uint32 adjustmentIdx,
+                                                                                const ossimString& name)const
+{
+   ossim_int32 result = -1;
+   if(adjustmentIdx < getNumberOfAdjustments())
+   {
+      ossim_uint32 idx = 0;
+      ossim_uint32 n = theAdjustmentList[adjustmentIdx].getNumberOfAdjustableParameters();
+      bool found = false;
+      for(idx = 0; ((idx < n)&&(!found)); ++idx)
+      {
+         if(theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].getDescription() == name)
+         {
+            result = (ossim_int32) idx;
+         }
+      }
+   }
+   
+   return result;
+}
+
+ossim_int32 ossimAdjustableParameterInterface::findParameterIdxContainingDescription(ossim_uint32 adjustmentIdx,
+                                                                                     const ossimString& name)const
+{
+   ossim_int32 result = -1;
+   if(adjustmentIdx < getNumberOfAdjustments())
+   {
+      ossim_uint32 idx = 0;
+      ossim_uint32 n = theAdjustmentList[adjustmentIdx].getNumberOfAdjustableParameters();
+      bool found = false;
+      for(idx = 0; ((idx < n)&&(!found)); ++idx)
+      {
+         if(theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].getDescription().contains(name))
+         {
+            result = (ossim_int32) idx;
+         }
+      }
+   }
+
+   return result;
+}
+
+
+bool ossimAdjustableParameterInterface::isParameterLocked(ossim_uint32 idx)const
+{
+   if(!theAdjustmentList.size())
+   {
+      return false;
+   }
+   if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
+   {
+      return theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].getLockFlag();
+   }
+
+   return false;
+   
+}
+
+void ossimAdjustableParameterInterface::setParameterLockFlag(ossim_uint32 idxParam, bool flag)
+{
+   if(!theAdjustmentList.size())
+   {
+      return;
+   }
+   if(idxParam < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
+   {
+      theAdjustmentList[theCurrentAdjustment].getParameterList()[idxParam].setLockFlag(flag);
+   }
+}
+
+bool ossimAdjustableParameterInterface::getParameterLockFlag(ossim_uint32 idx)const
+{
+   if(!theAdjustmentList.size())
+   {
+      return false;
+   }
+   if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
+   {
+      return theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].getLockFlag();
+   }
+
+   return false;
+}
+
+void ossimAdjustableParameterInterface::lockAllParametersCurrentAdjustment()
+{
+   lockAllParameters(theCurrentAdjustment);
+}
+
+void ossimAdjustableParameterInterface::unlockAllParametersCurrentAdjustment()
+{
+   unlockAllParameters(theCurrentAdjustment);
+}
+
+void ossimAdjustableParameterInterface::lockAllParameters(ossim_uint32 idxAdjustment)
+{
+   if(idxAdjustment < getNumberOfAdjustments())
+   {
+      ossim_uint32 idx = 0;
+      ossim_uint32 n   = theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters();
+      
+      for(idx = 0; idx < n; ++idx)
+      {
+         theAdjustmentList[idxAdjustment].getParameterList()[idx].setLockFlag(true);
+      }
+   }
+}
+
+void ossimAdjustableParameterInterface::unlockAllParameters(ossim_uint32 idxAdjustment)
+{
+   if(idxAdjustment < getNumberOfAdjustments())
+   {
+      ossim_uint32 idx = 0;
+      ossim_uint32 n   = theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters();
+      
+      for(idx = 0; idx < n; ++idx)
+      {
+         theAdjustmentList[idxAdjustment].getParameterList()[idx].setLockFlag(false);
+      }
+   }
+}
+
+
+void ossimAdjustableParameterInterface::setParameterOffset(ossim_uint32 idx,
+                                                           ossim_float64 value,
+                                                           bool notify)
+{
+//    double center   = getParameterCenter(idx);
+//    double sigma    = getParameterSigma(idx);
+//    double minValue = center - sigma;
+//    double maxValue = center + sigma;
+//    double x = 0.0;
+   
+//    if(sigma != 0.0)
+//    {
+//       x = (value - center)/sigma;
+      
+//       value = center + x*sigma;
+      
+//       if(value < minValue)
+//       {
+//          x = -1;
+//       }
+//       else if(value >maxValue)
+//       {
+//          x = 1.0;
+//       }
+//       setAdjustableParameter(idx, x, false);
+//    }
+   
+   if(!theAdjustmentList.size())
+   {
+      return;
+   }
+   if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
+   {
+      theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].setOffset(value);
+      if(notify)
+      {
+         adjustableParametersChanged();
+      }
+   }
+}
+
+void ossimAdjustableParameterInterface::resizeAdjustableParameterArray(ossim_uint32 numberOfParameters)
+{
+   if(!theAdjustmentList.size())
+   {
+      newAdjustment(numberOfParameters);
+      return;
+   }
+
+   theAdjustmentList[theCurrentAdjustment].setNumberOfAdjustableParameters(numberOfParameters);
+}
+
+void ossimAdjustableParameterInterface::setAdjustment(const ossimAdjustmentInfo& adj, bool notify)
+{
+   setAdjustment(theCurrentAdjustment, adj, notify);
+}
+
+void ossimAdjustableParameterInterface::setAdjustment(ossim_uint32 idx, const ossimAdjustmentInfo& adj, bool notify)
+{
+   if(idx < getNumberOfAdjustments())
+   {
+      theAdjustmentList[(int)idx] = adj;
+      if(notify)
+      {
+         adjustableParametersChanged();
+      }
+   }
+}
+
+
+void ossimAdjustableParameterInterface::addAdjustment(const ossimAdjustmentInfo& adj, bool notify)
+{
+   theAdjustmentList.push_back(adj);
+   if(notify)
+   {
+      adjustableParametersChanged();
+   }
+}
+
+void ossimAdjustableParameterInterface::getAdjustment(ossimAdjustmentInfo& adj) const
+{
+   getAdjustment(theCurrentAdjustment,  adj);
+}
+
+void ossimAdjustableParameterInterface::getAdjustment(ossim_uint32 idx, ossimAdjustmentInfo& adj) const
+{
+   adj.setNumberOfAdjustableParameters(0);
+
+   if(idx < getNumberOfAdjustments())
+   {
+      adj = theAdjustmentList[(int)idx];
+   }
+}
+
+ossim_uint32 ossimAdjustableParameterInterface::getNumberOfAdjustments()const
+{
+   return (ossim_uint32)theAdjustmentList.size();
+}
+
+ossim_uint32 ossimAdjustableParameterInterface::getCurrentAdjustmentIdx()const
+{
+   return theCurrentAdjustment;
+}
+
+void ossimAdjustableParameterInterface::setDirtyFlag(bool flag)
+{
+   if(theAdjustmentList.size() > 0)
+   {
+      theAdjustmentList[theCurrentAdjustment].setDirtyFlag(flag);
+   }
+}
+
+void ossimAdjustableParameterInterface::setAllDirtyFlag(bool flag)
+{
+   ossim_uint32 idx = 0;
+   
+   for(idx = 0; idx < theAdjustmentList.size(); ++idx)
+   {
+      theAdjustmentList[idx].setDirtyFlag(flag);
+   }
+}
+
+bool ossimAdjustableParameterInterface::hasDirtyAdjustments()const
+{
+   ossim_uint32 idx = 0;
+      
+   for(idx = 0; idx < theAdjustmentList.size(); ++idx)
+   {
+      if(theAdjustmentList[idx].isDirty())
+      {
+         return true;
+      }
+   }
+
+   return false;
+}
+
+//*************************************************************************************************
+//! Save all adjustments to the KWL file.
+//*************************************************************************************************
+bool ossimAdjustableParameterInterface::saveAdjustments(ossimKeywordlist& kwl,
+                                                        const ossimString& prefix)const
+{
+   // Nothing to do if no adjustments defined (okramer 04Sep2005)
+   if (theAdjustmentList.size() == 0)
+      return true;
+
+   // A problem: There may have been adjustments written to the KWL by another process that this
+   // instance doesn't know about. So we need to load in all adjustments present in the KWL and
+   // replace 
+   kwl.add(prefix,
+           NUMBER_OF_ADJUSTMENTS_KW,
+           (ossim_uint32) theAdjustmentList.size(),
+           true);
+   kwl.add(prefix,
+           CURRENT_ADJUSTMENT_KW,
+           (int)theCurrentAdjustment,
+           true);
+   
+   for(ossim_uint32 adjIdx = 0; adjIdx < theAdjustmentList.size(); ++adjIdx)
+   {
+      ossimString adjPrefix = prefix + (ossimString(ADJUSTMENT_PREFIX) + ossimString::toString(adjIdx)+".");
+
+      theAdjustmentList[adjIdx].saveState(kwl,
+                                          adjPrefix);
+   }
+
+   return true;
+}
+
+//*************************************************************************************************
+//! Saves the current active adjustment to the KWL file. If an adjustment of the same 
+//! description already exists in the KWL, it is replaced by the current adjustment.
+//*************************************************************************************************
+void ossimAdjustableParameterInterface::saveCurrentAdjustmentOnly(ossimKeywordlist &kwl, 
+                                                                  const ossimString &prefix) 
+{
+   // Fetch current adjustment:
+   ossimAdjustmentInfo adjTosave;
+   getAdjustment(adjTosave);
+   ossimString currentLabel = adjTosave.getDescription();
+
+   // Fetch the number of adjustments specified in the KWL:
+   int numberOfAdjustments = 0;
+   const char* value = kwl.find(prefix, NUMBER_OF_ADJUSTMENTS_KW);
+   if (value)
+   {
+      numberOfAdjustments = atoi(value);
+   }
+
+   // Loop to read the descriptions of each adjustment in the KWL to see if a match exists. If 
+   // we reach the end, insert it there:
+   // int saved_adj_idx;
+   ossimAdjustmentInfo adjInfo;
+   int i = 0;
+   while (true)
+   {
+      ossimString adjPrefix = prefix+(ossimString(ADJUSTMENT_PREFIX)+ossimString::toString(i)+".");
+      if (i < numberOfAdjustments)
+      {
+         adjInfo.loadState(kwl, adjPrefix);
+      }
+      
+      if ((i == numberOfAdjustments) || (adjInfo.getDescription() == currentLabel))
+      {
+         // match found or end of list, insert the  new adjustment at this position:
+         adjTosave.saveState(kwl, adjPrefix);
+         // saved_adj_idx = i;
+
+         // Need to bump the number of adjustments by one if we added a new one:
+         if (i == numberOfAdjustments)
+         {
+            kwl.add(prefix, NUMBER_OF_ADJUSTMENTS_KW, ++numberOfAdjustments);
+         }
+
+         break;
+      }
+      ++i;
+   }
+
+   //// Sync up this object with the contents of the KWL: NOT NEEDED???
+   //loadAdjustments(kwl, prefix);
+   //setCurrentAdjustment(saved_adj_idx);
+}
+
+bool ossimAdjustableParameterInterface::loadAdjustments(const ossimKeywordlist& kwl,
+                                                        const ossimString& prefix)
+{
+   theAdjustmentList.clear();
+   theCurrentAdjustment = 0;
+   
+   const char* numberOfAdjustments = kwl.find(prefix, NUMBER_OF_ADJUSTMENTS_KW);
+   const char* currentAdjustment   = kwl.find(prefix, CURRENT_ADJUSTMENT_KW);
+
+   if(!numberOfAdjustments)
+   {
+      numberOfAdjustments = kwl.find(prefix, NUMBER_OF_ADJUSTMENTS_OLD_KW);
+   }
+   if(!currentAdjustment)
+   {
+      currentAdjustment = kwl.find(prefix, CURRENT_ADJUSTMENT_OLD_KW);
+   }
+   if(!numberOfAdjustments) return false;
+   
+   int maxdjustments = ossimString(numberOfAdjustments).toInt();
+   
+   for(int adjIdx = 0; adjIdx <maxdjustments; ++adjIdx)
+   {
+      ossimAdjustmentInfo info;
+      ossimString adjPrefix = prefix + (ossimString(ADJUSTMENT_PREFIX) + ossimString::toString(adjIdx)+".");
+
+      if(!info.loadState(kwl, adjPrefix))
+      {
+         return false;
+      }
+      theAdjustmentList.push_back(info);
+   }
+
+   theCurrentAdjustment = ossimString(currentAdjustment).toUInt32();
+   initChangeFlags();
+   return true;
+}
+
+void ossimAdjustableParameterInterface::adjustableParametersChanged()
+{
+}
+
+
+//*************************************************************************************************
+//!  Dumps the currently active adjustment to ostream.
+//*************************************************************************************************
+std::ostream& ossimAdjustableParameterInterface::print(std::ostream& out) const
+{
+   if (theCurrentAdjustment < theAdjustmentList.size())
+   {
+      out <<"\nossimAdjustableParameterInterface base-class current adjustment index: " 
+         << theCurrentAdjustment << "\n" << theAdjustmentList[theCurrentAdjustment] << std::ends;
+   }
+   else
+   {
+      out << "No adjustments specified." << std::endl;
+   }
+   return out;
+}
+
+//*************************************************************************************************
+//! Sets all the change flags to the boolean indicated to indicate parameters are changed (TRUE)
+//! or not (FALSE).
+//*************************************************************************************************
+void ossimAdjustableParameterInterface::setAllChangeFlags(bool areChanged)
+{
+   ossim_uint32 num_params = getNumberOfAdjustableParameters();
+   for (unsigned int i=0; i<num_params; ++i)
+      theChangeFlags[i] = areChanged;
+}
+
+//*************************************************************************************************
+//! Initializes the change flags to false.
+//*************************************************************************************************
+void ossimAdjustableParameterInterface::initChangeFlags()
+{
+   // Need to resize the flag list?
+   ossim_uint32 num_params = getNumberOfAdjustableParameters();
+   if (theChangeFlags.size() != num_params)
+      theChangeFlags.resize(num_params);
+   setAllChangeFlags(true);
+}
+
diff --git a/ossim/src/ossim/base/ossimAdjustmentExecutive.cpp b/ossim/src/ossim/base/ossimAdjustmentExecutive.cpp
new file mode 100644
index 0000000..1e3397d
--- /dev/null
+++ b/ossim/src/ossim/base/ossimAdjustmentExecutive.cpp
@@ -0,0 +1,784 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Hicks
+//
+// Description: Executive class for adjustment operations..
+//
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/base/ossimAdjustmentExecutive.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimWLSBundleSolution.h>
+#include <ossim/base/ossimAdjSolutionAttributes.h>
+#include <iostream>
+
+static ossimTrace traceExec  ("ossimAdjustmentExecutive:exec");
+static ossimTrace traceDebug ("ossimAdjustmentExecutive:debug");
+
+
+
+//*****************************************************************************
+//  METHOD: ossimAdjustmentExecutive::ossimAdjustmentExecutive()
+//  
+//  Constructor.
+//  
+//*****************************************************************************
+ossimAdjustmentExecutive::ossimAdjustmentExecutive(std::ostream& report)
+   :
+      theExecValid(false),
+      theSol(0),
+      theSolAttributes(0),
+      theConvCriteria(5.0),
+      theMaxIter(7),      
+      theMaxIterExceeded(false),
+      theSolDiverged(false),
+      theSolConverged(false),
+      theNumObsInSet(0),
+      theNumImages(0),
+      theNumParams(0),
+      theNumMeasurements(0),
+      theRankN(0),
+      theMeasResiduals(),
+      theObjPartials(),
+      theParPartials(),
+      theXrms(0.0),
+      theYrms(0.0),
+      theXmean(0.0),
+      theYmean(0.0),
+      theSEUW(0),
+      theParInitialValues(0),
+      theParInitialStdDev(0),
+      theParDesc(0),
+      theObsInitialValues(0),
+      theObsInitialStdDev(0),
+      theRep(report)      
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "\nossimAdjustmentExecutive::ossimAdjustmentExecutive 1 DEBUG:" << std::endl;
+   }
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimAdjustmentExecutive::ossimAdjustmentExecutive()
+//  
+//  ossimObservationSet-based constructor.
+//  
+//*****************************************************************************
+ossimAdjustmentExecutive::
+ossimAdjustmentExecutive(ossimObservationSet& obsSet, std::ostream& report)
+   :
+      theExecValid(false),
+      theSol(0),
+      theSolAttributes(0),
+      theConvCriteria(5.0),
+      theMaxIter(7),      
+      theMaxIterExceeded(false),
+      theSolDiverged(false),
+      theSolConverged(false),
+      theNumObsInSet(0),
+      theNumImages(0),
+      theNumParams(0),
+      theNumMeasurements(0),
+      theRankN(0),
+      theMeasResiduals(),
+      theObjPartials(),
+      theParPartials(),
+      theXrms(0.0),
+      theYrms(0.0),
+      theXmean(0.0),
+      theYmean(0.0),
+      theSEUW(0),
+      theParInitialValues(0),
+      theParInitialStdDev(0),
+      theParDesc(0),
+      theObsInitialValues(0),
+      theObsInitialStdDev(0),
+      theRep(report)      
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "\nossimAdjustmentExecutive::ossimAdjustmentExecutive 2 DEBUG:" << std::endl;
+   }
+
+   theExecValid = initializeSolution(obsSet);
+}
+
+
+//*****************************************************************************
+//  DESTRUCTOR: ~ossimAdjustmentExecutive()
+//  
+//*****************************************************************************
+ossimAdjustmentExecutive::~ossimAdjustmentExecutive()
+{
+   delete theSolAttributes;
+   delete theSol;
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
+      << "DEBUG: ~ossimAdjustmentExecutive(): returning..." << std::endl;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimAdjustmentExecutive::initializeSolution()
+//  
+//  Execute solution.
+//  
+//*****************************************************************************
+bool ossimAdjustmentExecutive::initializeSolution(ossimObservationSet& obsSet)
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "\nossimAdjustmentExecutive::initializeSolution DEBUG:" << std::endl; 
+   }
+   ossimString ts;
+   ossim::getFormattedTime("%a %m.%d.%y %H:%M:%S", false, ts);
+
+   theObsSet = &obsSet;
+
+   // Initial report output
+   theRep << "\nossimAdjustmentExecutive Report     ";
+   theRep << ts;
+   theRep << "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
+   theRep << endl;
+   theObsSet->print(theRep);
+   theRep << endl;
+
+   theExecValid = false;
+
+   // Adjustment traits
+   theNumObsInSet     = theObsSet->numObs();
+   if (theNumObsInSet == 0)
+      return theExecValid;
+
+   theNumImages       = theObsSet->numImages();
+   theNumParams       = theObsSet->numAdjPar();
+   theNumMeasurements = theObsSet->numMeas();
+
+   theRankN = theNumParams + theNumObsInSet*3;
+
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         <<"\n theNumObsInSet     = "<<theNumObsInSet
+         <<"\n theNumImages       = "<<theNumImages
+         <<"\n theNumParams       = "<<theNumParams
+         <<"\n theNumMeasurements = "<<theNumMeasurements
+         <<"\n theRankN           = "<<theRankN
+         <<std::endl;
+   }
+
+
+   // Instantiate solution attributes
+   theSolAttributes = new ossimAdjSolutionAttributes
+      (theNumObsInSet, theNumImages, theNumMeasurements, theRankN);
+
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         <<"\n\nInitial Parameter Setup....";
+
+      for (int i=0; i<theNumImages; i++)
+      {
+         ossimAdjustableParameterInterface* iface =
+            theObsSet->getImageGeom(i)->getAdjustableParameterInterface();
+         int np = iface->getNumberOfAdjustableParameters();
+         for (int cp=0; cp<np; ++cp)
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               <<"\n "<<cp<<"  "<<iface->getParameterDescription(cp)
+               // <<"=  "<<iface->getAdjustableParameter(cp)
+               <<"=  "<<iface->getParameterCenter(cp)
+               <<", units= "<<iface->getParameterUnit(cp)
+               <<", sigma= "<<iface->getParameterSigma(cp);
+         }
+      }
+      ossimNotify(ossimNotifyLevel_DEBUG)<<std::endl;
+   }
+
+   // Save parameter initial values and variances
+   int start = 1;
+   theSolAttributes->theAdjParCov.ReSize(theNumParams,theNumParams);
+   for (int i=0; i<theNumImages; i++)
+   {
+      ossimAdjustableParameterInterface* iface =
+         theObsSet->getImageGeom(i)->getAdjustableParameterInterface();
+      int np = iface->getNumberOfAdjustableParameters();
+      NEWMAT::Matrix parCov(np,np);
+      parCov = 0.0;
+      for (int cp=0; cp<np; ++cp)
+      {
+         // Get the a priori value
+         // theParInitialValues.push_back(iface->getAdjustableParameter(cp));
+         theParInitialValues.push_back(iface->getParameterCenter(cp));
+         theImgs.push_back(i);
+
+         theParDesc.push_back(iface->getParameterDescription(cp));
+         double sig = iface->getParameterSigma(cp);
+         
+         // If parameter is locked, tighten down the sigma
+         // TODO: Eventually need better handling of this
+         if (iface->isParameterLocked(cp))
+            sig /= 1000;
+
+         theParInitialStdDev.push_back(sig);
+         parCov(cp+1,cp+1) = sig*sig;
+      }
+      theSolAttributes->
+         theAdjParCov.SubMatrix(start,start+np-1,start,start+np-1) = parCov;
+      start += np;
+   }
+
+   // Ensure initial estimates for observations
+   //   TODO: Currently uses mean of single-ray point drops; should
+   //         eventually use multi-ray intersection, which is only
+   //         available via the ossimSensorModelTuple class.
+   for (int obs=0; obs<theNumObsInSet; obs++)
+   {
+      // If ground position not set, initialize it
+      if (theObsSet->observ(obs)->hasNans())
+      {
+         double latMean = 0.0;
+         double lonMean = 0.0;
+         double hgtMean = 0.0;
+         ossimGpt gpt;
+         ossimDpt ipt;
+         for (ossim_uint32 meas=0; meas<theObsSet->observ(obs)->numMeas(); ++meas)
+         {
+            ipt = theObsSet->observ(obs)->getMeasurement(meas);
+            theObsSet->observ(obs)->getImageGeom(meas)->localToWorld(ipt, gpt);
+            latMean += gpt.latr();
+            lonMean += gpt.lonr();
+            hgtMean += gpt.height();
+         }
+         latMean /= theObsSet->observ(obs)->numMeas();
+         lonMean /= theObsSet->observ(obs)->numMeas();
+         hgtMean /= theObsSet->observ(obs)->numMeas();
+         theObsSet->observ(obs)->Gpt().latr(latMean);
+         theObsSet->observ(obs)->Gpt().lonr(lonMean);
+         theObsSet->observ(obs)->Gpt().height(hgtMean);
+      }
+   }
+
+
+   // Save observation intial values
+   for (int obs=0; obs<theNumObsInSet; obs++)
+   {
+      theObsInitialValues.push_back(theObsSet->observ(obs)->Gpt().latr());
+      theObsInitialValues.push_back(theObsSet->observ(obs)->Gpt().lonr());
+      theObsInitialValues.push_back(theObsSet->observ(obs)->Gpt().height());
+   }
+
+
+   // Load obj/image covariance data
+   int cMeas = 1;
+   theSolAttributes->theImagePtCov.ReSize(theNumMeasurements*2,2);
+   theSolAttributes->theObjectPtCov.ReSize(theNumObsInSet*3,3);
+
+   for (int obs=0; obs<theNumObsInSet; ++obs)
+   {
+      NEWMAT::Matrix ocov;
+      theObsSet->observ(obs)->getObsCov(ocov);
+      int idx = obs*3+1;
+      theSolAttributes->theObjectPtCov.Rows(idx,idx+2) = ocov;
+      for (int i=1; i<=3; ++i)
+         theObsInitialStdDev.push_back(sqrt(ocov(i,i)));
+      for (ossim_uint32 meas=0; meas<theObsSet->observ(obs)->numMeas(); ++meas)
+      {
+         NEWMAT::Matrix mcov;
+         theObsSet->observ(obs)->getMeasCov((int)meas, mcov);
+         int start = (cMeas-1)*2 + 1;
+         theSolAttributes->theImagePtCov.Rows(start,start+1) = mcov;
+         cMeas++;   
+      }
+   }
+
+
+   // Load obj/image xref map
+   for (int obs=0; obs<theNumObsInSet; ++obs)
+   {
+      for (ossim_uint32 meas=0; meas<theObsSet->observ(obs)->numMeas(); ++meas)
+      {
+         int img = theObsSet->imIndex(meas);
+         theSolAttributes->theObjImgXref.insert(pair<int, int>(obs, img));
+      }
+   }
+
+   // Load image/numpar xref map
+   for (int img=0; img<theNumImages; ++img)
+   {
+      int numpar = theObsSet->adjParCount(img);
+      theSolAttributes->theImgNumparXref.insert(pair<int, int>(img, numpar));
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         <<"\ntheObjImgXref multimap  Obs/Img ....\n";
+      for (ObjImgMapIter_t it =theSolAttributes->theObjImgXref.begin();
+                           it!=theSolAttributes->theObjImgXref.end(); ++it)
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            <<"  "<<it->first<<"    "<<it->second<<endl;
+      }
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         <<"\ntheImgNumparXref map  Img/Numpar ....\n";
+      for (ImgNumparMapIter_t it =theSolAttributes->theImgNumparXref.begin();
+                              it!=theSolAttributes->theImgNumparXref.end(); ++it)
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            <<"  "<<it->first<<"    "<<it->second<<endl;
+      }
+   }
+
+ 
+   theRep << "\n Iteration 0...";
+
+   updateParameters();
+
+   // Perform initial (0th iteration) observation evaluation
+   theObsSet->evaluate(theMeasResiduals, theObjPartials, theParPartials);
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         <<"\n theObjPartials\n"
+         <<theObjPartials;
+   }
+
+   // Report residual summary
+   printResidualSummary(theRep);
+
+   // Residual statistics
+   computeResidualStatistics(theMeasResiduals);
+
+   // Load partials
+   theSolAttributes->theObjPartials = theObjPartials;
+   theSolAttributes->theParPartials = theParPartials;
+
+   // Load residuals
+   theSolAttributes->theMeasResiduals = theMeasResiduals;
+
+   // Initial standard error of unit weight
+   theSEUW.push_back(computeSEUW());
+
+   // Instantiate solution object
+   theSol = new ossimWLSBundleSolution();
+
+   theExecValid = true;
+
+   return theExecValid;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimAdjustmentExecutive::runSolution()
+//  
+//  Execute solution.
+//  
+//*****************************************************************************
+bool ossimAdjustmentExecutive::runSolution()
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "\nossimAdjustmentExecutive::runSolution DEBUG:" << std::endl;
+   }
+
+
+   // Iterative loop
+   int iter = 0;
+
+   while (iter < theMaxIter &&
+          !theSolConverged &&
+          !theSolDiverged &&
+          theExecValid)
+   {
+      iter++;
+
+      theRep << "\n Iteration "<<iter<<"...";
+
+      // Execute solution
+      theExecValid = theSol->run(theSolAttributes);
+
+
+      if (theExecValid)
+      {
+         // Report corrections
+         printParameterCorrectionSummary(theRep);
+         printObservationCorrectionSummary(theRep);
+
+         // Update adjustable parameters
+         updateParameters();
+
+         // Update ground points
+         updateObservations();
+
+         // Perform observation evaluation
+         theObsSet->evaluate(theMeasResiduals, theObjPartials, theParPartials);
+
+         // Load partials
+         theSolAttributes->theObjPartials = theObjPartials;
+         theSolAttributes->theParPartials = theParPartials;
+
+         // Load residuals
+         theSolAttributes->theMeasResiduals = theMeasResiduals;
+
+         // Report residual summary
+         printResidualSummary(theRep);
+
+         // Residual statistics
+         computeResidualStatistics(theMeasResiduals);
+
+         // Compute SEUW for current iteration
+         theSEUW.push_back(computeSEUW());
+
+         // Check convergence
+         double percChange = 
+         fabs((theSEUW[iter]-theSEUW[iter-1])/theSEUW[iter-1])*100.0;
+
+         if ((percChange <= theConvCriteria) && iter>1)
+            theSolConverged = true;
+         else if (iter == theMaxIter)
+            theMaxIterExceeded = true;
+         else if (iter >= 3)
+         {
+            if (theSEUW[iter]   > theSEUW[iter-1] &&
+                theSEUW[iter-1] > theSEUW[iter-2] &&
+                theSEUW[iter-2] > theSEUW[iter-3])
+               theSolDiverged = true;
+         }
+         else
+            theSolConverged = false;
+      }
+   }
+
+   return theExecValid;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimAdjustmentExecutive::updateParameters()
+//  
+//  Update adjustable parameters with current iteration corrections.
+//  
+//*****************************************************************************
+bool ossimAdjustmentExecutive::updateParameters()
+{
+   // Update local geometries
+   int currPar = 1;
+   for (int img=0; img<theNumImages; ++img)
+   {
+      ossimAdjustableParameterInterface* iface =
+         theObsSet->getImageGeom(img)->getAdjustableParameterInterface();
+
+      for (int par=0; par<theSolAttributes->theImgNumparXref[img]; ++par)
+      {
+         // double middle = iface->getAdjustableParameter(par);
+         // middle += theSolAttributes->theLastCorrections(currPar);
+         // iface->setAdjustableParameter(par, middle, true);
+
+         double middle = iface->getParameterCenter(par);
+         middle += theSolAttributes->theLastCorrections(currPar);
+         iface->setParameterCenter(par, middle, true);
+
+         currPar++;    
+      }
+   }
+
+   // Copy updated local geometries to observation geometries
+   for (int img=0; img<theNumImages; ++img)
+   {
+      for (int obs=0; obs<theNumObsInSet; ++obs)
+      {
+         for (ossim_uint32 imgInObs=0; imgInObs<theObsSet->observ(obs)->numImages(); ++imgInObs)
+         {
+            if (theObsSet->observ(obs)->imageFile(imgInObs) ==
+                theObsSet->imageFile(img))
+            {
+               theObsSet->observ(obs)->setImageGeom
+                  (imgInObs, theObsSet->getImageGeom(img));
+            }
+         }
+      }
+   }
+
+   return true;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimAdjustmentExecutive::updateObservations()
+//  
+//  Update adjustable ground points with current iteration corrections.
+//  
+//*****************************************************************************
+bool ossimAdjustmentExecutive::updateObservations()
+{
+   int currPar = theNumParams + 1;
+   for (int obs=0; obs<theNumObsInSet; ++obs)
+   {
+      double lat = theObsSet->observ(obs)->Gpt().latr();
+      lat += theSolAttributes->theLastCorrections(currPar);
+      currPar++;    
+      double lon = theObsSet->observ(obs)->Gpt().lonr();
+      lon += theSolAttributes->theLastCorrections(currPar);
+      currPar++;    
+      double hgt = theObsSet->observ(obs)->Gpt().height();
+      hgt += theSolAttributes->theLastCorrections(currPar);
+      currPar++;    
+      theObsSet->observ(obs)->Gpt().latr(lat);
+      theObsSet->observ(obs)->Gpt().lonr(lon);
+      theObsSet->observ(obs)->Gpt().height(hgt);
+   }
+
+   return true;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimAdjustmentExecutive::summarizeSolution()
+//  
+//  Execute solution.
+//  
+//*****************************************************************************
+void ossimAdjustmentExecutive::summarizeSolution() const
+{
+   theRep << "\nossimAdjustmentExecutive Summary..."<<std::endl;
+   theRep << " Valid Exec:         "<<(theExecValid?"true":"false")<<std::endl;
+   theRep << " Nbr Ground Pts:     "<<theNumObsInSet<<std::endl;
+   theRep << " Nbr Image Points:   "<<theNumMeasurements<<std::endl;
+   theRep << " Nbr Images:         "<<theNumImages<<std::endl;
+   theRep << " Nbr Parameters:     "<<theNumParams<<std::endl;
+   theRep << " -------------------------"<<std::endl;
+   theRep << " Solution Converged: "<<(theSolConverged?"true":"false")<<std::endl;
+   theRep << " Solution Diverged:  "<<(theSolDiverged?"true":"false")<<std::endl;
+   theRep << " Max Iter Exceeded:  "<<(theMaxIterExceeded?"true":"false")<<std::endl;
+   theRep << " Max Iterations:     "<<theMaxIter<<std::endl;
+   theRep << " Convergence Crit:   "<<theConvCriteria<<"%"<<std::endl;
+
+   // SEUW history
+   theRep << "\n SEUW Trace...";
+   theRep << "\n   Iter        SEUW";
+   for (ossim_uint32 iter=0; iter<theSEUW.size(); ++iter)
+      theRep << "\n"<<setw(7)<<iter<<setw(12)<<setprecision(3)<<theSEUW[iter];
+
+   ossimString ts;
+   ossim::getFormattedTime("%a %m.%d.%y %H:%M:%S", false, ts);
+   theRep << "\n";
+   theRep << "\n" << ts;
+   theRep << "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
+   theRep << endl;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimAdjustmentExecutive::computeResidualStatistics()
+//  
+//  Statistical evaluation.
+//  
+//*****************************************************************************
+bool ossimAdjustmentExecutive::computeResidualStatistics(NEWMAT::Matrix& res)
+{
+   theXmean = 0.0;
+   theYmean = 0.0;
+   theXrms  = 0.0;
+   theYrms  = 0.0;
+   for (int n=1; n<=res.Nrows();++n)
+   {
+      theXmean += res(n,1);
+      theYmean += res(n,2);
+      theXrms  += res(n,1)*res(n,1);
+      theYrms  += res(n,2)*res(n,2);
+   }
+
+   theXmean /= theNumMeasurements;
+   theYmean /= theNumMeasurements;
+   theXrms   = sqrt(theXrms/theNumMeasurements);
+   theYrms   = sqrt(theYrms/theNumMeasurements);
+
+   theRep<<"\n";
+   theRep<<" ______________Mean:";
+   theRep<<setprecision(1)<<setw(8)<<theXmean;
+   theRep<<setprecision(1)<<setw(8)<<theYmean;
+   theRep<<"    RMS:";
+   theRep<<setprecision(1)<<setw(8)<<theXrms;
+   theRep<<setprecision(1)<<setw(8)<<theYrms;
+   theRep<<endl;
+
+   return true;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimAdjustmentExecutive::computeSEUW()
+//  
+//  Standard error of unit weight evaluation.
+//  
+//*****************************************************************************
+double ossimAdjustmentExecutive::computeSEUW()
+{
+   double vuw = 0.0;
+
+   // Observation contributions
+   int cMeas = 1;
+   for (int obs=0; obs<theNumObsInSet; ++obs)
+   {
+      NEWMAT::ColumnVector tc(3);
+      NEWMAT::Matrix cov(3,3);
+      int idx = theNumParams + 3*obs + 1;
+      tc  = theSolAttributes->theTotalCorrections.Rows(idx, idx+2);
+      idx -= theNumParams;
+      cov = theSolAttributes->theObjectPtCov.SubMatrix(idx,idx+2,1,3);
+      for (int i=1; i<=3; ++i)
+      {
+         vuw += tc(i)*tc(i)/cov(i,i);
+      }
+      for (ossim_uint32 meas=0; meas<theObsSet->observ(obs)->numMeas(); ++meas)
+      {
+         NEWMAT::RowVector res(2);
+         NEWMAT::Matrix cov(2,2);
+         res = theSolAttributes->theMeasResiduals.Row(cMeas);
+         int start = (cMeas-1)*2 + 1;
+         cov = theSolAttributes->theImagePtCov.SubMatrix(start,start+1,1,2);
+         for (int i=1; i<=2; ++i)
+         {
+            vuw += res(i)*res(i)/cov(i,i);
+         }
+         cMeas++;
+      }
+   }
+
+   // Parameter contributions
+   NEWMAT::ColumnVector tc(theNumParams);
+   tc = theSolAttributes->theTotalCorrections.Rows(1, theNumParams);
+   for (int par=0; par<theNumParams; ++par)
+   {
+      vuw += tc(par+1)*tc(par+1)/(theParInitialStdDev[par]*theParInitialStdDev[par]);
+   }
+
+   // DF
+   double df = theNumMeasurements*2 - theRankN;
+   if (df<=0.0)
+      df = 1.0;
+
+   // SEUW
+   double seuw = sqrt(vuw/df);
+
+   return seuw;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimAdjustmentExecutive::printParameterCorrectionSummary()
+//  
+//  Print info.
+//  
+//*****************************************************************************
+std::ostream& ossimAdjustmentExecutive::
+printParameterCorrectionSummary(std::ostream& out) const
+{
+   out<<"\nParameter Corrections...";
+   out<<"\n  n im        parameter    a_priori  total_corr   last_corr initial_std    prop_std";
+   for (int pc=1; pc<=theNumParams; ++pc)
+   {
+      out<<"\n "<<setprecision(5)<<setw(2)<<pc;
+      out<<setw(3)<<theImgs[pc-1]+1;
+      out<<setw(17)<<theParDesc[pc-1];
+      out<<setw(12)<<theParInitialValues[pc-1];
+      out<<setw(12)<<theSolAttributes->theTotalCorrections(pc);
+      out<<setw(12)<<theSolAttributes->theLastCorrections(pc);
+      out<<setw(12)<<theParInitialStdDev[pc-1];
+      out<<setw(12)<<sqrt(theSolAttributes->theFullCovMatrix(pc,pc));
+   }
+   out<<endl;
+
+   return out;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimAdjustmentExecutive::printObservationCorrectionSummary()
+//  
+//*****************************************************************************
+std::ostream& ossimAdjustmentExecutive::
+printObservationCorrectionSummary(std::ostream& out) const
+{
+   out<<"\nObservation Corrections...";
+   out<<"\n  n         observation    a_priori  total_corr   last_corr initial_std    prop_std";
+   for (int obs=0; obs<theNumObsInSet; ++obs)
+   {
+      out<<"\n "<<setprecision(5)<<setw(2)<<obs+1;
+      out<<" "<<setw(19)<<theObsSet->observ(obs)->ID();
+      double mPerRadp = theObsSet->observ(obs)->Gpt().metersPerDegree().y*DEG_PER_RAD;
+      double mPerRadl = theObsSet->observ(obs)->Gpt().metersPerDegree().x*DEG_PER_RAD;
+      // ossim_uint32 iobs = obs*3+1;
+
+      for (int k=0; k<3; ++k)
+      {
+         int idx = theNumParams + obs*3 + k + 1;
+         if (k<2)
+            out<<setw(12)<<theObsInitialValues[obs*3+k]*DEG_PER_RAD;
+         else
+            out<<setw(12)<<theObsInitialValues[obs*3+k];
+         double factor;
+         if (k==0)
+            factor = mPerRadp;
+         else if (k==1)
+            factor = mPerRadl;
+         else
+            factor = 1.0;
+         out<<setw(12)<<theSolAttributes->theTotalCorrections(idx)*factor;
+         out<<setw(12)<<theSolAttributes->theLastCorrections(idx)*factor;
+         out<<setw(12)<<theObsInitialStdDev[obs*3+k]*factor;
+         out<<setw(12)<<sqrt(theSolAttributes->theFullCovMatrix(idx,idx))*factor;
+         out<<endl<<"                       ";
+      }
+   }
+   out<<endl;
+
+   return out;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimAdjustmentExecutive::printResidualSummary()
+//  
+//*****************************************************************************
+std::ostream& ossimAdjustmentExecutive::
+printResidualSummary(std::ostream& out) const
+{
+   out<<"\nMeasurement Residuals...";
+   out<<"\n observation   image    samp    line    initial_meas";
+   int j = 0;
+   for (int obs=0; obs<theNumObsInSet; obs++)
+   {
+      int numMeasPerObs = theObsSet->observ(obs)->numMeas();
+      for (int meas=0; meas<numMeasPerObs; ++meas)
+      {
+         int imIdx = theObsSet->imIndex(j);
+         ++j;
+         out<<"\n";
+         out<<setw(12)<<theObsSet->observ(obs)->ID();
+         out<<setw(8)<<imIdx+1;
+         out<<setprecision(1)<<setw(8)<<theMeasResiduals(j,1);
+         out<<setprecision(1)<<setw(8)<<theMeasResiduals(j,2);
+         out<<"    ";
+         theObsSet->observ(obs)->getMeasurement(meas).print(out,1);
+      }
+      out<<endl;
+   }
+
+   return out;
+}
diff --git a/src/ossim/base/ossimAdjustmentInfo.cpp b/ossim/src/ossim/base/ossimAdjustmentInfo.cpp
similarity index 100%
rename from src/ossim/base/ossimAdjustmentInfo.cpp
rename to ossim/src/ossim/base/ossimAdjustmentInfo.cpp
diff --git a/src/ossim/base/ossimAffineTransform.cpp b/ossim/src/ossim/base/ossimAffineTransform.cpp
similarity index 100%
rename from src/ossim/base/ossimAffineTransform.cpp
rename to ossim/src/ossim/base/ossimAffineTransform.cpp
diff --git a/ossim/src/ossim/base/ossimApplicationUsage.cpp b/ossim/src/ossim/base/ossimApplicationUsage.cpp
new file mode 100644
index 0000000..d49254f
--- /dev/null
+++ b/ossim/src/ossim/base/ossimApplicationUsage.cpp
@@ -0,0 +1,216 @@
+//-------------------------------------------------------------------------
+//
+// This code was taken from Open Scene Graph and incorporated from into
+// OSSIM.
+//
+//-------------------------------------------------------------------------
+// $Id: ossimApplicationUsage.cpp 23244 2015-04-08 20:48:34Z rashadkm $
+
+#include <iostream>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimCommon.h>
+
+ossimApplicationUsage::ossimApplicationUsage(const ossimString& commandLineUsage):
+    theCommandLineUsage(commandLineUsage)
+{
+}
+
+ossimApplicationUsage* ossimApplicationUsage::instance()
+{
+    static ossimApplicationUsage theApplicationUsage;
+    return &theApplicationUsage;
+}
+void ossimApplicationUsage::setApplicationName(const ossimString& name)
+{
+   theApplicationName = name;
+}
+
+const ossimString& ossimApplicationUsage::getApplicationName() const
+{
+   return theApplicationName;
+}
+void ossimApplicationUsage::setDescription(const ossimString& desc)
+{
+   theDescription = desc;
+}
+
+const ossimString& ossimApplicationUsage::getDescription() const
+{
+   return theDescription;
+}
+
+void ossimApplicationUsage::addUsageExplanation(Type type,const ossimString& option,const ossimString& explanation)
+{
+    switch(type)
+    {
+        case(OSSIM_COMMAND_LINE_OPTION):
+            addCommandLineOption(option,explanation);
+            break;
+        case(OSSIM_ENVIRONMENTAL_VARIABLE):
+            addEnvironmentalVariable(option,explanation);
+            break;
+    }
+}
+void ossimApplicationUsage::setCommandLineUsage(const ossimString& explanation)
+{
+   theCommandLineUsage=explanation;
+}
+
+const ossimString& ossimApplicationUsage::getCommandLineUsage() const
+{
+   return theCommandLineUsage;
+}
+
+void ossimApplicationUsage::addCommandLineOption(const ossimString& option,const ossimString& explanation)
+{
+    theCommandLineOptions[option]=explanation;
+}
+
+const ossimApplicationUsage::UsageMap& ossimApplicationUsage::getCommandLineOptions() const
+{
+   return theCommandLineOptions;
+}
+
+void ossimApplicationUsage::addEnvironmentalVariable(const ossimString& option,const ossimString& explanation)
+{
+    theEnvironmentalVariables[option]=explanation;
+}
+const ossimApplicationUsage::UsageMap& ossimApplicationUsage::getEnvironmentalVariables() const
+{
+   return theEnvironmentalVariables;
+}
+
+void ossimApplicationUsage::getFormatedString(ossimString& str, const UsageMap& um,unsigned int widthOfOutput)
+{
+
+    unsigned int maxNumCharsInOptions = 0;
+    ossimApplicationUsage::UsageMap::const_iterator citr;
+    for(citr=um.begin();
+        citr!=um.end();
+        ++citr)
+    {
+        maxNumCharsInOptions = ossim::max(maxNumCharsInOptions,(unsigned int)citr->first.length());
+    }
+    
+    unsigned int fullWidth = widthOfOutput;
+    unsigned int optionPos = 2;
+    unsigned int explanationPos = 2+maxNumCharsInOptions+2;
+    unsigned int explanationWidth = fullWidth-explanationPos;
+
+    ossimString line;
+    
+    for(citr=um.begin();
+        citr!=um.end();
+        ++citr)
+    {
+        line.assign(fullWidth,' ');
+        line.replace(optionPos,citr->first.length(),citr->first);
+        
+        const ossimString& explanation = citr->second;
+        std::string::size_type pos = 0;
+        std::string::size_type offset = 0;
+        bool firstInLine = true;
+        while (pos<explanation.length())
+        {
+            if (firstInLine) offset = 0;
+                    
+            // skip any leading white space.
+            while (pos<explanation.length() && *(explanation.begin()+pos)==' ')
+            {
+                if (firstInLine) ++offset;
+                ++pos;
+            }
+            
+            firstInLine = false;
+        
+            std::string::size_type width = ossim::min((ossim_int64)(explanation.length()-pos),
+                                                      (ossim_int64)(explanationWidth-offset));
+            std::string::size_type slashn_pos = explanation.find('\n',pos);
+            
+            unsigned int extraSkip = 0;
+            bool concatinated = false;
+            if (slashn_pos!=std::string::npos)
+            {
+                if (slashn_pos<pos+width)
+                {
+                    width = slashn_pos-pos;
+                    ++extraSkip;
+                    firstInLine = true;
+                }
+                else if (slashn_pos==pos+width) 
+                {
+                    ++extraSkip;
+                    firstInLine = true;
+                }
+            }
+            
+            if (pos+width<explanation.length())
+            {
+                // now reduce width until we get a space or a return
+                // so that we ensure that whole words are printed.
+                while (width>0 && 
+                       *(explanation.begin()+(pos+width))!=' ' && 
+                       *(explanation.begin()+(pos+width))!='\n') --width;
+                       
+                if (width==0)
+                {
+                    // word must be longer than a whole line so will need
+                    // to concatinate it.
+                    width = explanationWidth-1;
+                    concatinated = true;
+                }
+            }
+
+            line.replace(explanationPos+offset,explanationWidth, explanation, pos, width);
+
+            if (concatinated) { str += line; str += "-\n"; }
+            else { str += line; str += "\n"; }
+            
+            // move to the next line of output.
+            line.assign(fullWidth,' ');
+            
+            pos += width+extraSkip;
+
+            
+        }
+                
+    }
+}
+
+void ossimApplicationUsage::write(std::ostream& output, const ossimApplicationUsage::UsageMap& um,unsigned int widthOfOutput)
+{
+    ossimString str;
+    getFormatedString(str, um, widthOfOutput);
+    output << str << std::endl;
+}
+
+void ossimApplicationUsage::write(std::ostream& output, unsigned int type, unsigned int widthOfOutput)
+{
+
+    output << "Usage: "<<getCommandLineUsage()<<std::endl;
+    if(theDescription.size()>0)
+    {
+       // TODO: take into account "widthOfOutput"
+       output << "\nDescription:\n" << theDescription.c_str() << "\n"
+              << std::endl;
+    }
+    
+    bool needspace = false;
+    if ((type&OSSIM_COMMAND_LINE_OPTION) && !getCommandLineOptions().empty())
+    {
+        // if (needspace) output << std::endl;
+        output << "Options:"<<std::endl;
+        write(output,getCommandLineOptions(),widthOfOutput);
+        needspace = true;
+    }
+    
+    if ((type&OSSIM_ENVIRONMENTAL_VARIABLE) && !getEnvironmentalVariables().empty())
+    {
+        if (needspace) output << std::endl;
+        output << "Environmental Variables:"<<std::endl;
+        write(output,getEnvironmentalVariables(),widthOfOutput);
+        needspace = true;
+    }
+
+}
+
diff --git a/ossim/src/ossim/base/ossimArgumentParser.cpp b/ossim/src/ossim/base/ossimArgumentParser.cpp
new file mode 100644
index 0000000..03a8593
--- /dev/null
+++ b/ossim/src/ossim/base/ossimArgumentParser.cpp
@@ -0,0 +1,574 @@
+//-------------------------------------------------------------------------
+//
+// This code was taken from Open Scene Graph and incorporated from into
+// OSSIM.
+//
+//-------------------------------------------------------------------------
+// $Id: ossimArgumentParser.cpp 22491 2013-11-26 18:17:29Z dburken $
+
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimString.h>
+
+#include <cstring>
+#include <iostream>
+#include <set>
+
+bool ossimArgumentParser::isOption(const char* str)
+{
+   return str && str[0]=='-';
+}
+
+bool ossimArgumentParser::isString(const char* str)
+{
+   if (!str) return false;
+
+   return true;
+//    return !isOption(str);
+}
+
+bool ossimArgumentParser::isNumber(const char* str)
+{
+   if (!str) return false;
+   
+   bool hadPlusMinus = false;
+   bool hadDecimalPlace = false;
+   bool hadExponent = false;
+   bool couldBeInt = true;
+   bool couldBeFloat = true;
+   int noZeroToNine = 0;
+
+   const char* ptr = str;
+
+   // check if could be a hex number.
+   if (std::strncmp(ptr,"0x",2)==0)
+   {
+      // skip over leading 0x, and then go through rest of string
+      // checking to make sure all values are 0...9 or a..f.
+      ptr+=2;
+      while (
+         *ptr!=0 &&
+         ((*ptr>='0' && *ptr<='9') ||
+          (*ptr>='a' && *ptr<='f') ||
+          (*ptr>='A' && *ptr<='F'))
+         )
+      {
+         ++ptr;
+      }
+
+      // got to end of string without failure, therefore must be a hex integer.
+      if (*ptr==0) return true;
+   }
+
+   ptr = str;
+
+   // check if a float or an int.
+   while (*ptr!=0 && couldBeFloat)
+   {
+      if (*ptr=='+' || *ptr=='-')
+      {
+         if (hadPlusMinus)
+         {
+            couldBeInt = false;
+            couldBeFloat = false;
+         }
+         else
+         {
+            hadPlusMinus = true;
+         }
+      }
+      else if (*ptr>='0' && *ptr<='9')
+      {
+         noZeroToNine++;
+      }
+      else if (*ptr=='.')
+      {
+         if (hadDecimalPlace)
+         {
+            couldBeInt = false;
+            couldBeFloat = false;
+         }
+         else
+         {
+            hadDecimalPlace = true;
+            couldBeInt = false;
+         }
+      }
+      else if (*ptr=='e' || *ptr=='E')
+      {
+         if (hadExponent || noZeroToNine==0)
+         {
+            couldBeInt = false;
+            couldBeFloat = false;
+         }
+         else
+         {
+            hadExponent = true;
+            couldBeInt = false;
+            hadDecimalPlace = false;
+            hadPlusMinus = false;
+            noZeroToNine=0;
+         }
+      }
+      else
+      {
+         couldBeInt = false;
+         couldBeFloat = false;
+      }
+      ++ptr;
+   }
+
+   if (couldBeInt && noZeroToNine>0) return true;
+   if (couldBeFloat && noZeroToNine>0) return true;
+
+   return false;
+
+}
+
+bool ossimArgumentParser::ossimParameter::valid(const char* str) const
+{
+   switch(theType)
+   {
+      case ossimParameter::OSSIM_FLOAT_PARAMETER:        return isNumber(str);
+      case ossimParameter::OSSIM_DOUBLE_PARAMETER:       return isNumber(str);
+      case ossimParameter::OSSIM_INT_PARAMETER:          return isNumber(str);
+      case ossimParameter::OSSIM_UNSIGNED_INT_PARAMETER: return isNumber(str);
+      case ossimParameter::OSSIM_STRING_PARAMETER:       return isString(str);
+   }
+   return false;
+}
+
+bool ossimArgumentParser::ossimParameter::assign(const char* str)
+{
+   if (valid(str))
+   {
+      switch(theType)
+      {
+         case ossimParameter::OSSIM_FLOAT_PARAMETER:
+         {
+            *theValue.theFloat = (float)ossimString(str).toDouble();
+            break;
+         }
+         case ossimParameter::OSSIM_DOUBLE_PARAMETER:
+         {
+            *theValue.theDouble = ossimString(str).toDouble();
+            break;
+         }
+         case ossimParameter::OSSIM_INT_PARAMETER:
+         {
+            *theValue.theInt = ossimString(str).toInt();
+            break;
+         }
+         case ossimParameter::OSSIM_UNSIGNED_INT_PARAMETER:
+         {
+            *theValue.theUint = ossimString(str).toUInt32();
+            break;
+         }
+         case ossimParameter::OSSIM_STRING_PARAMETER:
+         {
+            *theValue.theString = str;
+            break;
+         }
+      }
+      return true;
+   }
+   else
+   {
+      return false;
+   }
+}
+
+ossimArgumentParser::ossimArgumentParser(int* argc,char **argv):
+   theArgc(argc),
+   theArgv(argv),
+   theUsage(ossimApplicationUsage::instance())
+{
+}
+
+ossimArgumentParser::~ossimArgumentParser()
+{
+}
+
+void ossimArgumentParser::initialize(int* argc, const char **argv)
+{
+   if(argc > 0) delete (theArgv);
+   theArgc = argc;
+   theArgv = new char*[*argc];
+   for(int i=0;i<*argc;i++)
+   {
+      theArgv[i] = new char[strlen(argv[i])];
+      strcpy(theArgv[i], argv[i]);
+   }
+}
+
+std::string ossimArgumentParser::getApplicationName() const
+{
+   if (theArgc && *theArgc>0 ) return std::string(theArgv[0]);
+   return "";
+}
+
+bool ossimArgumentParser::isOption(int pos) const
+{
+   return pos<*theArgc && isOption(theArgv[pos]);
+}
+
+bool ossimArgumentParser::isString(int pos) const
+{
+   return pos < *theArgc && isString(theArgv[pos]);
+}
+
+bool ossimArgumentParser::isNumber(int pos) const
+{
+   return pos < *theArgc && isNumber(theArgv[pos]);
+}
+
+int ossimArgumentParser::find(const std::string& str) const
+{
+   for(int pos=1;pos<*theArgc;++pos)
+   {
+      if (str==theArgv[pos])
+      {
+         return pos;
+      }
+   }
+   return 0;
+}
+
+bool ossimArgumentParser::match(int pos, const std::string& str) const
+{
+   return pos<*theArgc && str==theArgv[pos];
+}
+
+bool ossimArgumentParser::containsOptions() const
+{
+   for(int pos=1;pos<*theArgc;++pos)
+   {
+      if (isOption(pos)) return true;
+   }
+   return false;
+}
+
+int ossimArgumentParser::numberOfParams(const std::string& str, const ossimParameter& param) const
+{
+   int pos=find(str);
+   if (pos<=0) 
+      return -1;
+
+   ++pos;
+   int num_params = 0;
+   while (param.valid(theArgv[pos+num_params]))
+      ++num_params;
+   return num_params;
+}
+
+void ossimArgumentParser::remove(int pos,int num)
+{
+   if (num==0) return;
+   
+   for(;pos+num<*theArgc;++pos)
+   {
+      theArgv[pos]=theArgv[pos+num];
+   }
+   for(;pos<*theArgc;++pos)
+   {
+      theArgv[pos]=0;
+   }
+   *theArgc-=num;
+}
+
+bool ossimArgumentParser::read(const std::string& str)
+{
+   int pos=find(str);
+   if (pos<=0) return false;
+   remove(pos);
+   return true;
+}
+
+bool ossimArgumentParser::read(const std::string& str, ossimParameter value1)
+{
+   int pos=find(str);
+   if (pos<=0) return false;
+   if (!value1.valid(theArgv[pos+1]))
+   {
+      reportError("argument to `"+str+"` is missing");
+      return false;
+   }
+   value1.assign(theArgv[pos+1]);
+   remove(pos,2);
+   return true;
+}
+
+bool ossimArgumentParser::read(const std::string& str, ossimParameter value1,
+                               ossimParameter value2)
+{
+   int pos=find(str);
+   if (pos<=0) return false;
+   if (!value1.valid(theArgv[pos+1]) ||
+       !value2.valid(theArgv[pos+2]))
+   {
+      reportError("argument to `"+str+"` is missing");
+      return false;
+   }
+   value1.assign(theArgv[pos+1]);
+   value2.assign(theArgv[pos+2]);
+   remove(pos,3);
+   return true;
+}
+
+bool ossimArgumentParser::read(const std::string& str, ossimParameter value1,
+                               ossimParameter value2, ossimParameter value3)
+{
+   int pos=find(str);
+   if (pos<=0) return false;
+   if (!value1.valid(theArgv[pos+1]) ||
+       !value2.valid(theArgv[pos+2]) ||
+       !value3.valid(theArgv[pos+3]))
+   {
+      reportError("argument to `"+str+"` is missing");
+      return false;
+   }
+   value1.assign(theArgv[pos+1]);
+   value2.assign(theArgv[pos+2]);
+   value3.assign(theArgv[pos+3]);
+   remove(pos,4);
+   return true;
+}
+
+bool ossimArgumentParser::read(const std::string& str, ossimParameter value1,
+                               ossimParameter value2, ossimParameter value3,
+                               ossimParameter value4)
+{
+   int pos=find(str);
+   if (pos<=0) return false;
+   if (!value1.valid(theArgv[pos+1]) ||
+       !value2.valid(theArgv[pos+2]) ||
+       !value3.valid(theArgv[pos+3]) ||
+       !value4.valid(theArgv[pos+4]))
+   {
+      reportError("argument to `"+str+"` is missing");
+      return false;
+   }
+   value1.assign(theArgv[pos+1]);
+   value2.assign(theArgv[pos+2]);
+   value3.assign(theArgv[pos+3]);
+   value4.assign(theArgv[pos+4]);
+   remove(pos,5);
+   return true;
+}
+
+bool ossimArgumentParser::read(const std::string& str, ossimParameter value1,
+                               ossimParameter value2, ossimParameter value3,
+                               ossimParameter value4, ossimParameter value5)
+{
+   int pos=find(str);
+   if (pos<=0) return false;
+   if (!value1.valid(theArgv[pos+1]) ||
+       !value2.valid(theArgv[pos+2]) ||
+       !value3.valid(theArgv[pos+3]) ||
+       !value4.valid(theArgv[pos+4]) ||
+       !value5.valid(theArgv[pos+5]))
+   {
+      reportError("argument to `"+str+"` is missing");
+      return false;
+   }
+   value1.assign(theArgv[pos+1]);
+   value2.assign(theArgv[pos+2]);
+   value3.assign(theArgv[pos+3]);
+   value4.assign(theArgv[pos+4]);
+   value5.assign(theArgv[pos+5]);    
+   remove(pos,6);
+   return true;
+}
+
+bool ossimArgumentParser::read(const std::string& str, ossimParameter value1,
+                               ossimParameter value2, ossimParameter value3,
+                               ossimParameter value4, ossimParameter value5,
+                               ossimParameter value6)
+{
+   int pos=find(str);
+   if (pos<=0) return false;
+   if (!value1.valid(theArgv[pos+1]) ||
+       !value2.valid(theArgv[pos+2]) ||
+       !value3.valid(theArgv[pos+3]) ||
+       !value4.valid(theArgv[pos+4]) ||
+       !value5.valid(theArgv[pos+5]) ||
+       !value6.valid(theArgv[pos+6]))       
+   {
+      reportError("argument to `"+str+"` is missing");
+      return false;
+   }
+   value1.assign(theArgv[pos+1]);
+   value2.assign(theArgv[pos+2]);
+   value3.assign(theArgv[pos+3]);
+   value4.assign(theArgv[pos+4]);
+   value5.assign(theArgv[pos+5]);
+   value6.assign(theArgv[pos+6]);    
+   remove(pos,7);
+   return true;
+}
+
+
+/** if the argument value at the posotion pos matches specified string, and subsequent
+ * parameters are also matched then set the paramter values and remove the from the list of arguments.*/
+bool ossimArgumentParser::read(int pos, const std::string& str)
+{
+   if (match(pos,str))
+   {
+      remove(pos,1);
+      return true;
+   }
+   else
+   {
+      return false;
+   }
+}
+
+bool ossimArgumentParser::read(int pos, const std::string& str, ossimParameter value1)
+{
+   if (match(pos,str) &&
+       value1.valid(theArgv[pos+1]))
+   {
+      value1.assign(theArgv[pos+1]);
+      remove(pos,2);
+      return true;
+   }
+   else
+   {
+      return false;
+   }
+}
+
+bool ossimArgumentParser::read(int pos, const std::string& str, ossimParameter value1, ossimParameter value2)
+{
+   if (match(pos,str) &&
+       value1.valid(theArgv[pos+1]) &&
+       value2.valid(theArgv[pos+2]))
+   {
+      value1.assign(theArgv[pos+1]);
+      value2.assign(theArgv[pos+2]);
+      remove(pos,3);
+      return true;
+   }
+   else
+   {
+      return false;
+   }
+}
+
+bool ossimArgumentParser::read(int pos, const std::string& str, ossimParameter value1, ossimParameter value2, ossimParameter value3)
+{
+   if (match(pos,str) &&
+       value1.valid(theArgv[pos+1]) &&
+       value2.valid(theArgv[pos+2]) &&
+       value3.valid(theArgv[pos+3]))
+   {
+      value1.assign(theArgv[pos+1]);
+      value2.assign(theArgv[pos+2]);
+      value3.assign(theArgv[pos+3]);
+      remove(pos,4);
+      return true;
+   }
+   else
+   {
+      return false;
+   }
+}
+
+bool ossimArgumentParser::read(int pos, const std::string& str, ossimParameter value1, ossimParameter value2, ossimParameter value3, ossimParameter value4)
+{
+   if (match(pos,str) &&
+       value1.valid(theArgv[pos+1]) &&
+       value2.valid(theArgv[pos+2]) &&
+       value3.valid(theArgv[pos+3]) &&
+       value4.valid(theArgv[pos+4]))
+   {
+      value1.assign(theArgv[pos+1]);
+      value2.assign(theArgv[pos+2]);
+      value3.assign(theArgv[pos+3]);
+      value4.assign(theArgv[pos+4]);
+      remove(pos,5);
+      return true;
+   }
+   else
+   {
+      return false;
+   }
+}
+
+bool ossimArgumentParser::errors(ossimErrorSeverity severity) const
+{
+   for(ossimErrorMessageMap::const_iterator itr=theErrorMessageMap.begin();
+       itr!=theErrorMessageMap.end();
+       ++itr)
+   {
+      if (itr->second>=severity) return true;
+   }
+   return false;
+}
+
+void ossimArgumentParser::reportError(const std::string& message, ossimErrorSeverity severity)
+{
+   theErrorMessageMap[message]=severity;
+}
+
+void ossimArgumentParser::reportRemainingOptionsAsUnrecognized(ossimErrorSeverity severity)
+{
+   std::set<std::string> options;
+   if (theUsage)
+   {
+      // parse the usage options to get all the option that the application can potential handle.
+      for(ossimApplicationUsage::UsageMap::const_iterator itr=theUsage->getCommandLineOptions().begin();
+          itr!=theUsage->getCommandLineOptions().end();
+          ++itr)
+      {
+         const std::string& option = itr->first;
+         std::string::size_type prevpos = 0, pos = 0;
+         while ((pos=option.find(' ',prevpos))!=std::string::npos)
+         {
+            if (option[prevpos]=='-')
+            {
+               options.insert(std::string(option,prevpos,pos-prevpos));
+            }
+            prevpos=pos+1;
+         }
+         if (option[prevpos]=='-')
+         {
+
+            options.insert(std::string(option,prevpos,std::string::npos));
+         }
+      }
+
+   }
+
+   for(int pos=1;pos<argc();++pos)
+   {
+      // if an option and havn't been previous querried for report as unrecognized.
+      if (isOption(pos) && options.find(theArgv[pos])==options.end())
+      {
+         reportError(getApplicationName() +": unrecognized option "+theArgv[pos],severity);
+      }
+   }
+}
+
+ossimArgumentParser::ossimErrorMessageMap& ossimArgumentParser::getErrorMessageMap()
+{
+   return theErrorMessageMap;
+}
+   
+const ossimArgumentParser::ossimErrorMessageMap& ossimArgumentParser::getErrorMessageMap() const
+{
+   return theErrorMessageMap;
+}
+
+void ossimArgumentParser::writeErrorMessages(std::ostream& output, ossimErrorSeverity severity)
+{
+   for(ossimErrorMessageMap::iterator itr=theErrorMessageMap.begin();
+       itr!=theErrorMessageMap.end();
+       ++itr)
+   {
+      if (itr->second>=severity)
+      {
+         output<< getApplicationName() << ": " << itr->first << std::endl;
+      }
+   }
+}
diff --git a/ossim/src/ossim/base/ossimBaseObjectFactory.cpp b/ossim/src/ossim/base/ossimBaseObjectFactory.cpp
new file mode 100644
index 0000000..a79b6fd
--- /dev/null
+++ b/ossim/src/ossim/base/ossimBaseObjectFactory.cpp
@@ -0,0 +1,61 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimBaseObjectFactory.cpp 22645 2014-02-28 12:45:52Z gpotts $
+#include <ossim/base/ossimBaseObjectFactory.h>
+#include <ossim/base/ossimConnectableContainer.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimString.h>
+#include <vector>
+
+RTTI_DEF1(ossimBaseObjectFactory, "ossimBaseObjectFactory", ossimObjectFactory);
+
+ossimBaseObjectFactory::ossimBaseObjectFactory()
+{
+   
+}
+
+ossimBaseObjectFactory* ossimBaseObjectFactory::instance()
+{
+   static ossimBaseObjectFactory staticInstance;
+
+   return &staticInstance;
+}
+
+ossimObject* ossimBaseObjectFactory::createObject(const ossimString& typeName)const
+{
+   if(typeName == STATIC_TYPE_NAME(ossimConnectableContainer))
+   {
+      return new ossimConnectableContainer;
+   }
+
+   return (ossimObject*)NULL;
+}
+
+ossimObject* ossimBaseObjectFactory::createObject(const ossimKeywordlist& kwl,
+                                                  const char* prefix)const
+{
+   const char* type = kwl.find(prefix,
+                               ossimKeywordNames::TYPE_KW);
+   ossimString copyPrefix = prefix;
+   if(type)
+   {
+      ossimObject* object = createObject(ossimString(type));
+      if(object)
+      {
+         object->loadState(kwl, copyPrefix.c_str());
+      }
+      return object;
+   }
+   return NULL;  
+}
+
+void ossimBaseObjectFactory::getTypeNameList(std::vector<ossimString>& typeList)const
+{
+   typeList.push_back(STATIC_TYPE_NAME(ossimConnectableContainer));
+}
diff --git a/src/ossim/base/ossimBilSplitter.cpp b/ossim/src/ossim/base/ossimBilSplitter.cpp
similarity index 100%
rename from src/ossim/base/ossimBilSplitter.cpp
rename to ossim/src/ossim/base/ossimBilSplitter.cpp
diff --git a/ossim/src/ossim/base/ossimBinaryDataProperty.cpp b/ossim/src/ossim/base/ossimBinaryDataProperty.cpp
new file mode 100644
index 0000000..8432b38
--- /dev/null
+++ b/ossim/src/ossim/base/ossimBinaryDataProperty.cpp
@@ -0,0 +1,40 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+//*************************************************************************
+
+#include <ossim/base/ossimBinaryDataProperty.h>
+
+RTTI_DEF1(ossimBinaryDataProperty, "ossimBinaryDataProperty", ossimProperty);
+
+ossimBinaryDataProperty::ossimBinaryDataProperty(const ossimString& name,
+   const std::vector<unsigned char>& binaryData)
+   :ossimProperty(name),
+    theBinaryData(binaryData)
+{
+}
+
+ossimBinaryDataProperty::~ossimBinaryDataProperty()
+{
+}
+
+bool ossimBinaryDataProperty::setValue(const ossimString& /* value */)
+{
+   return false;
+}
+
+void ossimBinaryDataProperty::valueToString(ossimString& valueResult)const
+{
+   valueResult = "Unsupported";
+}
+
+const vector<unsigned char>& ossimBinaryDataProperty::getBinaryData()const
+{
+   return theBinaryData;
+}
+
+void ossimBinaryDataProperty::setBinaryData(const vector<unsigned char>& binaryData)
+{
+   theBinaryData = binaryData;
+}
diff --git a/src/ossim/base/ossimBooleanProperty.cpp b/ossim/src/ossim/base/ossimBooleanProperty.cpp
similarity index 100%
rename from src/ossim/base/ossimBooleanProperty.cpp
rename to ossim/src/ossim/base/ossimBooleanProperty.cpp
diff --git a/src/ossim/base/ossimByteStreamBuffer.cpp b/ossim/src/ossim/base/ossimByteStreamBuffer.cpp
similarity index 100%
rename from src/ossim/base/ossimByteStreamBuffer.cpp
rename to ossim/src/ossim/base/ossimByteStreamBuffer.cpp
diff --git a/src/ossim/base/ossimCmyVector.cpp b/ossim/src/ossim/base/ossimCmyVector.cpp
similarity index 100%
rename from src/ossim/base/ossimCmyVector.cpp
rename to ossim/src/ossim/base/ossimCmyVector.cpp
diff --git a/src/ossim/base/ossimColorProperty.cpp b/ossim/src/ossim/base/ossimColorProperty.cpp
similarity index 100%
rename from src/ossim/base/ossimColorProperty.cpp
rename to ossim/src/ossim/base/ossimColorProperty.cpp
diff --git a/src/ossim/base/ossimColumnVector3d.cpp b/ossim/src/ossim/base/ossimColumnVector3d.cpp
similarity index 100%
rename from src/ossim/base/ossimColumnVector3d.cpp
rename to ossim/src/ossim/base/ossimColumnVector3d.cpp
diff --git a/ossim/src/ossim/base/ossimCommon.cpp b/ossim/src/ossim/base/ossimCommon.cpp
new file mode 100644
index 0000000..58830f8
--- /dev/null
+++ b/ossim/src/ossim/base/ossimCommon.cpp
@@ -0,0 +1,1130 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: David Burken
+//
+// Description: Common file for global functions.
+//
+//*************************************************************************
+// $Id: ossimCommon.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimDpt3d.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/matrix/newmat.h>
+#include <OpenThreads/Mutex>
+#include <OpenThreads/Thread>
+#include <ctime>
+#include <sstream>
+
+static OpenThreads::Mutex timeMutex;
+static ossimTrace traceDebug("ossimCommon:debug");
+
+// stores a floating point nan value
+const ossim::IntFloatBitCoercion ossim::nanValue(~ossim_int64(0));
+
+std::istream& ossim::skipws(std::istream& in)
+{
+   int c = in.peek();
+   while( !in.bad() && ossim::isWhiteSpace(c))
+   {
+      in.ignore();
+      c = in.peek();
+   }
+   
+   return in;
+}
+bool ossim::isWhiteSpace(int c)
+{
+   return ( (c == ' ') || (c == '\t') || (c == '\n')|| (c == '\r') ) ;
+}
+
+ossimByteOrder ossim::byteOrder()
+{
+   union
+   {
+      short s;
+      char  c[sizeof(short)];
+   } un;
+
+   un.s = 0x0102;
+   if (un.c[0] ==  2 && un.c[1] == 1)
+   {
+      return OSSIM_LITTLE_ENDIAN;
+   }
+   else
+   {
+      return OSSIM_BIG_ENDIAN;
+   }
+}
+
+double ossim::defaultMin(ossimScalarType scalarType)
+{
+   switch(scalarType)
+   {
+      case OSSIM_UINT8:
+      {
+	return OSSIM_DEFAULT_MIN_PIX_UINT8;
+      }
+      case OSSIM_SINT8:
+      {
+	return OSSIM_DEFAULT_MIN_PIX_SINT8;
+      }
+      case OSSIM_UINT16:
+      {
+         return OSSIM_DEFAULT_MIN_PIX_UINT16;
+      }
+      case OSSIM_SINT16:
+      {
+         return OSSIM_DEFAULT_MIN_PIX_SINT16;
+      }
+      case OSSIM_USHORT11:
+      {
+         return OSSIM_DEFAULT_MIN_PIX_UINT11;
+      }
+      case OSSIM_UINT32:
+      {
+         return OSSIM_DEFAULT_MIN_PIX_UINT32;
+      }
+      case OSSIM_SINT32:
+      {
+         return OSSIM_DEFAULT_MIN_PIX_SINT32;
+      }
+      case OSSIM_FLOAT32:
+      {
+         return OSSIM_DEFAULT_MIN_PIX_FLOAT;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         return OSSIM_DEFAULT_MIN_PIX_NORM_FLOAT;
+      }
+      case OSSIM_FLOAT64:
+      {
+         return OSSIM_DEFAULT_MIN_PIX_DOUBLE;
+      }
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         return OSSIM_DEFAULT_MIN_PIX_NORM_DOUBLE;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << __FILE__ << ":" << __LINE__
+               << "\nUnhandled scalar type:  " << scalarType << std::endl;
+         }
+         break;
+      }
+   }
+   return 0.0; // Should never happen...
+}
+
+double ossim::defaultMax(ossimScalarType scalarType)
+{
+   switch(scalarType)
+   {
+      case OSSIM_UINT8:
+      {
+         return OSSIM_DEFAULT_MAX_PIX_UINT8;
+      }
+      case OSSIM_SINT8:
+      {
+         return OSSIM_DEFAULT_MAX_PIX_SINT8;
+      }
+      case OSSIM_UINT16:
+      {
+	return OSSIM_DEFAULT_MAX_PIX_UINT16;
+      }
+      case OSSIM_SINT16:
+      {
+         return OSSIM_DEFAULT_MAX_PIX_SINT16;
+      }
+      case OSSIM_USHORT11:
+      {
+         return OSSIM_DEFAULT_MAX_PIX_UINT11;
+      }
+      case OSSIM_UINT32:
+      {
+	return OSSIM_DEFAULT_MAX_PIX_UINT32;
+      }
+      case OSSIM_SINT32:
+      {
+         return OSSIM_DEFAULT_MAX_PIX_SINT32;
+      }
+      case OSSIM_FLOAT32:
+      {
+         return OSSIM_DEFAULT_MAX_PIX_FLOAT;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         return OSSIM_DEFAULT_MAX_PIX_NORM_FLOAT;
+      }
+      case OSSIM_FLOAT64:
+      {
+         return OSSIM_DEFAULT_MAX_PIX_DOUBLE;
+      }
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         return OSSIM_DEFAULT_MAX_PIX_NORM_DOUBLE;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << __FILE__ << ":" << __LINE__
+               << "\nUnhandled scalar type:  " << scalarType << std::endl;
+         }
+         break;
+      }
+   }
+   return 0.0; // Should never happen...
+}
+
+double ossim::defaultNull(ossimScalarType scalarType)
+{
+   switch(scalarType)
+   {
+      case OSSIM_UINT8:
+      {
+         return OSSIM_DEFAULT_NULL_PIX_UINT8;
+      }
+      case OSSIM_SINT8:
+      {
+         return OSSIM_DEFAULT_NULL_PIX_SINT8;
+      }
+      case OSSIM_UINT16:
+      {
+         return OSSIM_DEFAULT_NULL_PIX_UINT16;
+      }
+      case OSSIM_SINT16:
+      {
+         return OSSIM_DEFAULT_NULL_PIX_SINT16;
+      }
+      case OSSIM_USHORT11:
+      {
+         return OSSIM_DEFAULT_NULL_PIX_UINT11;
+      }
+      case OSSIM_UINT32:
+      {
+         return OSSIM_DEFAULT_NULL_PIX_UINT32;
+      }
+      case OSSIM_SINT32:
+      {
+         return OSSIM_DEFAULT_NULL_PIX_SINT32;
+      }
+      case OSSIM_FLOAT32:
+      {
+         return OSSIM_DEFAULT_NULL_PIX_FLOAT;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         return OSSIM_DEFAULT_NULL_PIX_NORM_FLOAT;
+      }
+      case OSSIM_FLOAT64:
+      {
+         return OSSIM_DEFAULT_NULL_PIX_DOUBLE;
+      }
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         return OSSIM_DEFAULT_NULL_PIX_NORM_DOUBLE;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << __FILE__ << ":" << __LINE__
+               << "\nUnhandled scalar type:  " << scalarType << std::endl;
+         }
+         break;
+      }
+    }
+
+   return 0.0; // Should never happen...
+}
+
+ossim_uint32 ossim::scalarSizeInBytes(ossimScalarType scalarType)
+{
+   switch(scalarType)
+   {
+      case OSSIM_UINT8:
+      {
+         return sizeof(ossim_uint8);
+      }
+      case OSSIM_SINT8:
+      {
+         return sizeof(ossim_sint8);
+      }
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+      {
+         return sizeof(ossim_uint16);
+      }
+      case OSSIM_SINT16:
+      {
+         return sizeof(ossim_sint16);
+      }
+      case OSSIM_UINT32:
+      {
+         return sizeof(ossim_uint32);
+      }
+      case OSSIM_SINT32:
+      {
+         return sizeof(ossim_sint32);
+      }
+      case OSSIM_FLOAT32:
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         return sizeof(ossim_float32);
+      }
+      case OSSIM_FLOAT64:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         return sizeof(ossim_float64);
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << __FILE__ << ":" << __LINE__
+               << "\nUnhandled scalar type:  " << scalarType << std::endl;
+         }
+         break;
+      }
+  }
+  
+  return 1;
+}
+
+bool ossim::isSigned(ossimScalarType scalarType)
+{
+   bool result = false;
+   switch(scalarType)
+   {
+      case OSSIM_SINT8:
+      case OSSIM_SINT16:
+      case OSSIM_SINT32:
+      case OSSIM_FLOAT32:
+      case OSSIM_FLOAT64:
+      {
+         result = true;
+         break;
+      }
+      default:
+      {
+         break;
+      }
+  }
+  return result;
+}
+
+ossim_uint32 ossim::getActualBitsPerPixel(ossimScalarType scalarType)
+{
+   ossim_uint32 actualBitsPerPixel = 0;
+   switch(scalarType)
+   {
+      case OSSIM_UINT8:
+      case OSSIM_SINT8:
+      {
+         actualBitsPerPixel = 8;
+         break;
+      }
+      case OSSIM_USHORT11:
+      {
+         actualBitsPerPixel = 11;
+         break;
+      }
+      case OSSIM_UINT16:
+      case OSSIM_SINT16:
+      {
+         actualBitsPerPixel = 16;
+         break;
+      }
+      case OSSIM_UINT32:
+      case OSSIM_SINT32:
+      case OSSIM_FLOAT32:
+      case OSSIM_CINT16:
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         actualBitsPerPixel = 32;
+         break;
+      }
+      case OSSIM_FLOAT64:
+      case OSSIM_CFLOAT32:
+      case OSSIM_CINT32:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         actualBitsPerPixel = 64;
+         break;
+      }
+      case OSSIM_CFLOAT64:
+      {
+         actualBitsPerPixel = 128;
+         
+         break;
+      }
+      default:
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << __FILE__ << ":" << __LINE__
+               << "\nUnhandled scalar type:  " << scalarType << std::endl;
+         }
+         break;
+      }
+   }
+   return actualBitsPerPixel;
+}
+
+ossim_uint32 ossim::getBitsPerPixel(ossimScalarType scalarType)
+{
+   ossim_uint32 bitsPerPixel = 0;
+   switch(scalarType)
+   {
+      case OSSIM_UINT8:
+      case OSSIM_SINT8:
+      {
+         bitsPerPixel = 8;
+         break;
+      }
+      case OSSIM_USHORT11:
+      {
+         bitsPerPixel = 16;
+         break;
+      }
+      case OSSIM_UINT16:
+      case OSSIM_SINT16:
+      {
+         bitsPerPixel = 16;
+         break;
+      }
+      case OSSIM_UINT32:
+      case OSSIM_SINT32:
+      case OSSIM_FLOAT32:
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         bitsPerPixel = 32;
+         break;
+      }
+      case OSSIM_FLOAT64:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         bitsPerPixel = 64;
+         break;
+      }
+      default:
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << __FILE__ << ":" << __LINE__
+               << "\nUnhandled scalar type:  " << scalarType << std::endl;
+         }
+         break;
+      }
+   }
+   return bitsPerPixel;
+}
+
+void ossim::defaultTileSize(ossimIpt& tileSize)
+{
+   const char* tileSizeKw = ossimPreferences::instance()->
+      findPreference("tile_size");
+
+   if(tileSizeKw)
+   {
+      std::vector<ossimString> splitArray;
+      ossimString tempString(tileSizeKw);
+      tempString.split(splitArray, " ");
+      bool hasX = true;
+    if(splitArray.size() == 2)
+      {
+         tileSize.x = splitArray[0].toInt32();
+         tileSize.y = splitArray[1].toInt32();
+      }
+      else if(splitArray.size() == 1)
+      {
+         tileSize.x = splitArray[0].toInt32();
+         tileSize.y = splitArray[0].toInt32();
+      }
+      else
+      {
+         tileSize = ossimIpt(0,0);
+      }
+      if(tileSize.x < 1)
+      {
+         tileSize.x = OSSIM_DEFAULT_TILE_WIDTH;
+         hasX = false;
+      }
+      if(tileSize.y < 1)
+      {
+         if(!hasX)
+         {
+            tileSize.y = OSSIM_DEFAULT_TILE_HEIGHT;
+         }
+         else
+         {
+            tileSize.y = tileSize.x;
+         }
+      }
+   }
+   else
+   {
+      tileSize.x = OSSIM_DEFAULT_TILE_WIDTH;
+      tileSize.y = OSSIM_DEFAULT_TILE_HEIGHT;
+   }
+}
+
+std::string ossim::convertHtmlSpecialCharactersToNormalCharacter(const std::string& src)
+{
+   ossimString result = src;
+   std::string::size_type pos = 0;
+   pos = result.find("&");
+   
+   while(pos != std::string::npos)
+   {
+      std::string::size_type size = result.size();
+      std::string test1(&result[pos], ossim::min(6, (int)(size-pos)));
+      std::string test2(&result[pos], ossim::min(5, (int)(size-pos)));
+      std::string test3(&result[pos], ossim::min(4, (int)(size-pos)));
+      
+      if(test1 == "'")
+      {
+         result = result.substitute(test1, "'");
+      }
+      else if(test1 == """)
+      {
+         result = result.substitute(test1, "\"");
+      }
+      else if(test2 == "&")
+      {
+         result = result.substitute(test2, "&");
+      }
+      else if(test3 == ">")
+      {
+         result = result.substitute(test3, ">");
+      }
+      else if(test3 == "<")
+      {
+         result = result.substitute(test3, "<");
+      }
+      pos = result.find("&", pos+1);
+   }
+   
+   return result;
+}
+
+bool ossim::matrixToHpr( ossim_float64 hpr[3], const NEWMAT::Matrix& rotation )
+{
+    //implementation converted from plib's sg.cxx
+    //PLIB - A Suite of Portable Game Libraries
+    //Copyright (C) 1998,2002  Steve Baker
+    //For further information visit http://plib.sourceforge.net
+    
+   NEWMAT::Matrix mat(rotation);
+    
+   ossimDpt3d col1(rotation[0][0], rotation[1][0], rotation[2][0]);
+   double s = col1.length();
+   
+   hpr[0] = 0.0;
+   hpr[1] = 0.0;
+   hpr[2] = 0.0;
+
+   if ( s <= 0.00001 )
+   {
+      return true;
+   }
+   
+   
+   double oneOverS = 1.0f / s;
+   for( int i = 0; i < 3; i++ )
+      for( int j = 0; j < 3; j++ )
+         mat[i][j] = rotation[j][i] * oneOverS;
+   
+   
+   hpr[1] = ossim::asind(ossim::clamp(mat[1][2], -1.0, 1.0));
+   
+   double cp = ossim::cosd(hpr[1]);
+   
+   if ( cp > -0.00001 && cp < 0.00001 )
+   {
+      double cr = ossim::clamp(mat[0][1], -1.0, 1.0);
+      double sr = ossim::clamp(-mat[2][1], -1.0, 1.0);
+      
+      hpr[0] = 0.0f;
+      hpr[2] = ossim::atan2d(sr,cr);
+   }
+   else
+   {
+      cp = 1.0 / cp;
+      double sr = ossim::clamp((-mat[0][2] * cp), -1.0,1.0);
+      double cr = ossim::clamp((mat[2][2] * cp), -1.0, 1.0);
+      double sh = ossim::clamp((-mat[1][0] * cp), -1.0, 1.0);
+      double ch = ossim::clamp((mat[1][1] * cp), -1.0, 1.0);
+      
+      if ( (sh == 0.0f && ch == 0.0f) || (sr == 0.0f && cr == 0.0f) )
+      {
+         cr = ossim::clamp(mat[0][1], -1.0, 1.0);
+         sr = ossim::clamp(-mat[2][1], -1.0, 1.0);
+         
+         hpr[0] = 0.0f;
+      }
+      else
+      {
+         hpr[0] = ossim::atan2d(sh, ch);
+      }
+      
+      hpr[2] = ossim::atan2d(sr, cr);
+   }
+   
+   hpr[0] *= -1.0;
+   return true;
+}
+
+bool ossim::matrixToHpr( ossim_float64 hpr[3],
+                  const NEWMAT::Matrix& lsrMatrix,
+                  const NEWMAT::Matrix& rotationalMatrix)
+{
+    bool result = false;
+    NEWMAT::Matrix invertLsr(lsrMatrix.i());
+   
+    hpr[0] = 0.0;
+    hpr[1] = 0.0;
+    hpr[2] = 0.0;
+    result = matrixToHpr(hpr, invertLsr*rotationalMatrix);
+    if(std::abs(hpr[0]) < FLT_EPSILON)
+    {
+       hpr[0] = 0.0;
+    }
+    if(std::abs(hpr[1]) < FLT_EPSILON)
+    {
+       hpr[1] = 0.0;
+    }
+    if(std::abs(hpr[2]) < FLT_EPSILON)
+    {
+       hpr[2] = 0.0;
+    }
+    
+    return result;
+}
+
+
+void ossim::lexQuotedTokens(const std::string& str,
+                            ossim_uint32 start,
+                            const char* whitespace,
+                            const char* quotes,
+                            std::vector<std::string>& tokens,
+                            bool& unbalancedQuotes)
+{
+   ossimREQUIRE(whitespace != NULL);
+   ossimREQUIRE(quotes != NULL);
+   ossimREQUIRE(tokens != NULL);
+   
+   const char openQuote(quotes[0]), closeQuote(quotes[1]);
+   
+   tokens.clear();
+   unbalancedQuotes = false;
+   
+   int end=0;
+   while (start < str.length())
+   {
+      if (str[start] == openQuote)
+      {
+         int openBraceCount = 1;
+         
+         if (start+1 < str.length())
+         {
+            start++;
+            if (str[start] != closeQuote)
+            {
+               //               end = start+1;
+               end = start;
+               while (static_cast<ossim_uint32>(end) < str.length() &&
+                      openBraceCount > 0)
+               {
+                  if (str[end] == openQuote)
+                     openBraceCount++;
+                  else if (str[end] == closeQuote)
+                     openBraceCount--;
+                  end++;
+               }
+            }
+            else
+            {
+               openBraceCount = 0;
+               start++;
+               end = start+1;
+            }
+         }
+         if (openBraceCount == 0)
+         {
+            tokens.push_back(str.substr(start, end-1-start));
+         }
+         else
+         {
+            unbalancedQuotes = true;
+            end = (int)str.length();
+         }
+      }
+      else if (str[start] == closeQuote)
+      {
+         unbalancedQuotes = true;
+         end = (int)str.length();
+	 
+      }
+      else
+      {
+         end = (int)str.find_first_of(whitespace, start);
+         tokens.push_back(str.substr(start, end-start));
+      }
+      
+      start = (ossim_uint32)str.find_first_not_of(whitespace, end);
+   }
+}
+
+void ossim::toStringList(ossimString& resultStringOfPoints,
+                         const std::vector<ossimDpt>& pointList, 
+                         char separator)
+{
+   ossim_uint32 idx = 0;
+   for(;idx < pointList.size();++idx)
+   {
+      ossimString pt = pointList[idx].toString();
+      if(resultStringOfPoints.empty())
+      {
+         resultStringOfPoints = pt;
+      }
+      else
+      {
+         resultStringOfPoints += (separator + pt);
+      }
+   }
+}
+
+void ossim::toStringList(ossimString& resultStringOfPoints,
+                         const std::vector<ossimIpt>& pointList, 
+                         char separator)
+{
+   ossim_uint32 idx = 0;
+   for(;idx < pointList.size();++idx)
+   {
+      ossimString pt = pointList[idx].toString();
+      if(resultStringOfPoints.empty())
+      {
+         resultStringOfPoints = pt;
+      }
+      else
+      {
+         resultStringOfPoints += (separator + pt);
+      }
+   }
+}
+
+void ossim::toStringList(ossimString& resultStringOfPoints,
+                         const std::vector<ossimGpt>& pointList, 
+                         char separator)
+{
+   ossim_uint32 idx = 0;
+   for(;idx < pointList.size();++idx)
+   {
+      ossimString pt = pointList[idx].toString();
+      if(resultStringOfPoints.empty())
+      {
+         resultStringOfPoints = pt;
+      }
+      else
+      {
+         resultStringOfPoints += (separator + pt);
+      }
+   }
+}
+
+void ossim::toVector(std::vector<ossimDpt>& result,
+                     const ossimString& stringOfPoints)
+{
+   std::vector<ossimString> splitResult;
+  
+   // let grab each point string that is surrounded by ()
+   std::istringstream in(stringOfPoints.trim());
+   ossimString currentPoint = "";
+   ossimDpt tempPoint;
+   while(!in.bad()&&!in.eof())
+   {
+      skipws(in);
+      if(in.peek() == '(')
+      {
+         currentPoint += (char)in.get();
+         skipws(in);
+         if(in.peek() == '(') in.ignore();
+         
+         while(!in.bad()&&!in.eof()&&(in.peek() != ')'))
+         {
+            currentPoint += (char)in.get();
+         }
+         if(in.good())
+         {
+            currentPoint += (char)in.get();
+            tempPoint.toPoint(currentPoint);
+            result.push_back(tempPoint);
+         }
+         currentPoint = "";
+      }
+      else 
+      {
+         in.ignore();
+      }
+   }   
+}
+
+void ossim::toVector(std::vector<ossimIpt>& result,
+                     const ossimString& stringOfPoints)
+{
+   std::vector<ossimString> splitResult;
+   
+   // let grab each point string that is surrounded by ()
+   std::istringstream in(stringOfPoints.trim());
+   ossimString currentPoint = "";
+   ossimIpt tempPoint;
+   while(!in.bad()&&!in.eof())
+   {
+      skipws(in);
+      if(in.peek() == '(')
+      {
+         currentPoint += (char)in.get();
+         skipws(in);
+         if(in.peek() == '(') in.ignore();
+         
+         while(!in.bad()&&!in.eof()&&(in.peek() != ')'))
+         {
+            currentPoint += (char)in.get();
+         }
+         if(in.good())
+         {
+            currentPoint += (char)in.get();
+            tempPoint.toPoint(currentPoint);
+            result.push_back(tempPoint);
+         }
+         currentPoint = "";
+      }
+      else 
+      {
+         in.ignore();
+      }
+   }   
+}
+void ossim::toVector(std::vector<ossimGpt>& result,
+                     const ossimString& stringOfPoints)
+{
+   std::vector<ossimString> splitResult;
+   
+   // let grab each point string that is surrounded by ()
+   std::istringstream in(stringOfPoints.trim());
+   ossimString currentPoint = "";
+   ossimGpt tempPoint;
+   while(!in.bad()&&!in.eof())
+   {
+      skipws(in);
+      if(in.peek() == '(')
+      {
+         currentPoint += (char)in.get();
+         skipws(in);
+         if(in.peek() == '(') in.ignore();
+         
+         while(!in.bad()&&!in.eof()&&(in.peek() != ')'))
+         {
+            currentPoint += (char)in.get();
+         }
+         if(in.good())
+         {
+            currentPoint += (char)in.get();
+            tempPoint.toPoint(currentPoint);
+            result.push_back(tempPoint);
+         }
+         currentPoint = "";
+      }
+      else 
+      {
+         in.ignore();
+      }
+   }   
+}
+
+bool ossim::extractSimpleValues(std::vector<ossimString>& values,
+                                const ossimString& stringOfPoints)
+{
+   std::istringstream in(stringOfPoints);
+   ossim::skipws(in);
+   bool result = true;
+   if(stringOfPoints.empty()) return result;
+   char c = in.get();
+   ossimString value = "";
+   if(c == '(')
+   {
+      c = (char)in.get();
+      while((c!=')')&&
+            (c!= '\n')&&
+            (in.good()))
+      {
+         if(c!= ',')
+         {
+            value += ossimString(c);
+         }
+         else
+         {
+            values.push_back(value);
+            value = "";
+         }
+         c = in.get();
+      }
+   }
+   if(c!= ')')
+   {
+      result = false;
+   }
+   else
+   {
+      if(!value.empty())
+      {
+         values.push_back(value);
+      }
+   }
+   
+   return result;
+}
+
+bool ossim::toSimpleVector(std::vector<ossim_uint32>& result,
+                           const ossimString& stringOfPoints)
+{
+   std::vector<ossimString> extractedValues;
+   bool resultFlag = extractSimpleValues(extractedValues, stringOfPoints);
+   if(resultFlag)
+   {
+      ossim_uint32 idx = 0;
+      ossim_uint32 size = (ossim_uint32) extractedValues.size();
+      for(idx = 0; idx < size; ++idx)
+      {
+         result.push_back(extractedValues[idx].toUInt32());
+      }
+   }
+   return resultFlag;
+}
+
+template <>
+void ossim::toSimpleStringList(ossimString& result,
+                               const std::vector<ossim_uint8>& valuesList)
+
+{
+   std::ostringstream out;
+   
+   if(!valuesList.empty())
+   {
+      ossim_uint32 idx = 0;
+      ossim_uint32 size = (ossim_uint32)(valuesList.size()-1);
+      for(idx = 0; idx < size; ++idx)
+      {
+         out << ((ossim_uint32)valuesList[idx]) << ",";
+      }
+      out << static_cast<ossim_uint32>(valuesList[size]);
+   }
+   
+   result = "("+out.str()+")";
+}
+
+bool ossim::toSimpleVector(std::vector<ossim_int32>& result,
+                           const ossimString& stringOfPoints)
+{
+   std::vector<ossimString> extractedValues;
+   bool resultFlag = extractSimpleValues(extractedValues, stringOfPoints);
+   if(resultFlag)
+   {
+      ossim_uint32 idx = 0;
+      ossim_uint32 size = (ossim_int32) extractedValues.size();
+      for(idx = 0; idx < size; ++idx)
+      {
+         result.push_back(extractedValues[idx].toInt32());
+      }
+   }
+   return resultFlag;
+}
+
+bool ossim::toSimpleVector(std::vector<ossim_uint16>& result,
+                           const ossimString& stringOfPoints)
+{
+   std::vector<ossimString> extractedValues;
+   bool resultFlag = extractSimpleValues(extractedValues, stringOfPoints);
+   if(resultFlag)
+   {
+      ossim_uint32 idx = 0;
+      ossim_uint32 size = (ossim_int32) extractedValues.size();
+      for(idx = 0; idx < size; ++idx)
+      {
+         result.push_back(extractedValues[idx].toUInt32());
+      }
+   }
+   return resultFlag;
+}
+
+bool ossim::toSimpleVector(std::vector<ossim_int16>& result,
+                           const ossimString& stringOfPoints)
+{
+   std::vector<ossimString> extractedValues;
+   bool resultFlag = extractSimpleValues(extractedValues, stringOfPoints);
+   if(resultFlag)
+   {
+      ossim_uint32 idx = 0;
+      ossim_uint32 size = (ossim_uint32) extractedValues.size();
+      for(idx = 0; idx < size; ++idx)
+      {
+         result.push_back(extractedValues[idx].toInt32());
+      }
+   }
+   return resultFlag;
+}
+
+bool ossim::toSimpleVector(std::vector<ossim_uint8>& result,
+                    const ossimString& stringOfPoints)
+{
+   std::vector<ossimString> extractedValues;
+   bool resultFlag = extractSimpleValues(extractedValues, stringOfPoints);
+   if(resultFlag)
+   {
+      ossim_uint32 idx = 0;
+      ossim_uint32 size = (ossim_uint32) extractedValues.size();
+      for(idx = 0; idx < size; ++idx)
+      {
+         result.push_back(extractedValues[idx].toUInt8());
+      }
+   }
+   return resultFlag;
+}
+
+bool ossim::toSimpleVector(std::vector<ossim_int8>& result,
+                    const ossimString& stringOfPoints)
+{
+   std::vector<ossimString> extractedValues;
+   bool resultFlag = extractSimpleValues(extractedValues, stringOfPoints);
+   if(resultFlag)
+   {
+      ossim_uint32 idx = 0;
+      ossim_uint32 size = (ossim_uint32) extractedValues.size();
+      for(idx = 0; idx < size; ++idx)
+      {
+         result.push_back(extractedValues[idx].toUInt8());
+      }
+   }
+   return resultFlag;
+}
+
+ossim_uint32 ossim::getNumberOfThreads()
+{
+   ossim_uint32 result;
+   const char* str = ossimPreferences::instance()->findPreference("ossim_threads");
+   if ( str )
+   {
+      result = ossimString(str).toUInt32();
+   }
+   else
+   {
+      result = static_cast<ossim_uint32>( OpenThreads::GetNumberOfProcessors() );
+   }
+   if ( !result )
+   {
+      result = 1;
+   }
+   return result;
+}
+
+void ossim::getFormattedTime(
+   const std::string& format, bool gmtFlag, std::string& result )
+{
+   timeMutex.lock();
+   
+   time_t rawTime;
+   time(&rawTime);
+   
+   struct tm* timeInfo;
+   if ( gmtFlag )
+   {
+      timeInfo = gmtime(&rawTime);
+   }
+   else
+   {
+      timeInfo = localtime(&rawTime);
+   }
+   
+   size_t size = 0;
+   if ( timeInfo )
+   {
+      const size_t STRING_SIZE = 196; // This is a big time string size.
+      char outStr[STRING_SIZE];
+
+      size = strftime(outStr, STRING_SIZE, format.c_str(), timeInfo );
+
+      if ( size )
+      {
+         // Per strftime spec not needed but null terminating anyway.
+         outStr[STRING_SIZE-1] = '\0';
+         result = outStr;
+      }
+   }
+   if ( !size )
+   {
+      result.clear();
+   }
+
+   timeMutex.unlock();
+}
+
+ossim_uint32 ossim::computeLevels(const ossimIrect& rect)
+{
+   ossim_uint32 result = 0;
+   ossim_uint32 stopDimension = 0;
+      
+   // Get the stop dimension from ossim preferences.
+   const char* lookup = ossimPreferences::instance()->
+      findPreference(ossimKeywordNames::OVERVIEW_STOP_DIMENSION_KW);
+   if (lookup)
+   {
+      stopDimension = ossimString(lookup).toUInt32();
+   }
+   
+   if (stopDimension == 0)
+   {
+      // Use the smallest default tile size.
+      ossimIpt tileSize;
+      ossim::defaultTileSize(tileSize);
+      stopDimension = tileSize.x < tileSize.y ? tileSize.x : tileSize.y;
+   }
+      
+   ossim_uint32 largestImageDimension =
+      rect.width() > rect.height() ? rect.width() : rect.height();
+   
+   while(largestImageDimension > stopDimension)
+   {
+      largestImageDimension /= 2;
+      ++result;
+   }
+   
+   return result;
+}
+
diff --git a/src/ossim/base/ossimConnectableContainer.cpp b/ossim/src/ossim/base/ossimConnectableContainer.cpp
similarity index 100%
rename from src/ossim/base/ossimConnectableContainer.cpp
rename to ossim/src/ossim/base/ossimConnectableContainer.cpp
diff --git a/src/ossim/base/ossimConnectableContainerInterface.cpp b/ossim/src/ossim/base/ossimConnectableContainerInterface.cpp
similarity index 100%
rename from src/ossim/base/ossimConnectableContainerInterface.cpp
rename to ossim/src/ossim/base/ossimConnectableContainerInterface.cpp
diff --git a/ossim/src/ossim/base/ossimConnectableDisplayListener.cpp b/ossim/src/ossim/base/ossimConnectableDisplayListener.cpp
new file mode 100644
index 0000000..c05d2e9
--- /dev/null
+++ b/ossim/src/ossim/base/ossimConnectableDisplayListener.cpp
@@ -0,0 +1,180 @@
+
+//----------------------------------------------------------------------------
+// Copyright (c) 2004, David Burken, all rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: 
+//
+//----------------------------------------------------------------------------
+// $Id: ossimConnectableDisplayListener.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/base/ossimConnectableDisplayListener.h>
+#include <ossim/base/ossimConnectableObject.h>
+#include <ossim/base/ossimObjectEvents.h>
+#include <ossim/base/ossimDisplayListEvent.h>
+#include <ossim/base/ossimDisplayRefreshEvent.h>
+
+#include <ossim/base/ossimNotifyContext.h>
+
+RTTI_DEF1(ossimConnectableDisplayListener,
+          "ossimConnectableDisplayListener",
+          ossimListener);
+
+ossimConnectableDisplayListener::ossimConnectableDisplayListener()
+   : ossimListener()
+{}
+
+void ossimConnectableDisplayListener::processEvent(ossimEvent& event)
+{
+   switch(event.getId())
+   {
+      case OSSIM_EVENT_OBJECT_DESTRUCTING_ID:
+      {
+         ossimObjectDestructingEvent* eventCast =
+            static_cast<ossimObjectDestructingEvent*>(&event);
+         objectDestructingEvent(*eventCast);
+         
+         break;
+      }
+      case OSSIM_EVENT_CONNECTION_CONNECT_ID:
+      case OSSIM_EVENT_CONNECTION_DISCONNECT_ID:
+      {
+         ossimConnectionEvent* eventCast =
+            static_cast<ossimConnectionEvent*>(&event);
+         
+         connectionEvent(*eventCast);
+         if(event.getId() == OSSIM_EVENT_CONNECTION_DISCONNECT_ID)
+         {
+            if(eventCast->isInputDirection())
+            {
+               disconnectInputEvent(*eventCast);
+            }
+            else if(eventCast->isOutputDirection())
+            {
+               disconnectOutputEvent(*eventCast);
+            }
+            else
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << "ossimConnectableDisplayListener::processEvent, Direction not set\n";
+            }
+         }
+         else
+         {
+            ossimConnectionEvent* eventCast = static_cast<ossimConnectionEvent*>(&event);
+            
+            if(eventCast->isInputDirection())
+            {
+               connectInputEvent(*eventCast);
+            }
+            else if(eventCast->isOutputDirection())
+            {
+               connectOutputEvent(*eventCast);
+            }
+            else
+            {
+               ossimNotify(ossimNotifyLevel_WARN) << "ossimConnectableDisplayListener::processEvent, Direction not set\n";
+            }
+         }
+         break;
+      }
+      case OSSIM_EVENT_PROPERTY_ID:
+      {
+         ossimPropertyEvent* eventCast = static_cast<ossimPropertyEvent*>(&event);
+         propertyEvent(*eventCast);
+         break;
+      }
+      case OSSIM_EVENT_ADD_OBJECT_ID:
+      {
+         ossimContainerEvent* eventCast = static_cast<ossimContainerEvent*>(&event);
+         addObjectEvent(*eventCast);
+         break;
+      }
+      case OSSIM_EVENT_REMOVE_OBJECT_ID:
+      {
+         ossimContainerEvent* eventCast = static_cast<ossimContainerEvent*>(&event);
+         removeObjectEvent(*eventCast);
+         break;
+      }
+      case OSSIM_EVENT_REFRESH_ID:
+      {
+         ossimRefreshEvent* eventCast = static_cast<ossimRefreshEvent*>(&event);
+         refreshEvent(*eventCast);
+         break;
+      }
+      case OSSIM_EVENT_DISPLAY_LIST_ID:
+      {
+         ossimDisplayListEvent* eventCast =
+            static_cast<ossimDisplayListEvent*>(&event);
+         displayListEvent(*eventCast);
+         break;
+      }
+      case OSSIM_EVENT_DISPLAY_REFRESH_ID:
+      {
+         ossimDisplayRefreshEvent* eventCast =
+            static_cast<ossimDisplayRefreshEvent*>(&event);
+         displayRefreshEvent(*eventCast);
+         break;
+      }
+      default:
+      {
+         ossimListener::processEvent(event);
+         break;
+      }
+   }
+}
+
+void ossimConnectableDisplayListener::objectDestructingEvent(
+   ossimObjectDestructingEvent& /*event*/)
+{
+}
+
+void ossimConnectableDisplayListener::connectionEvent(
+   ossimConnectionEvent& /* event */)
+{}
+
+void ossimConnectableDisplayListener::disconnectInputEvent(
+   ossimConnectionEvent& /* event */)
+{}
+
+void ossimConnectableDisplayListener::disconnectOutputEvent(
+   ossimConnectionEvent& /* event */)
+{}
+
+void ossimConnectableDisplayListener::connectInputEvent(
+   ossimConnectionEvent& /* event */)
+{}
+
+void ossimConnectableDisplayListener::connectOutputEvent(
+   ossimConnectionEvent& /* event */)
+{}
+
+void ossimConnectableDisplayListener::propertyEvent(
+   ossimPropertyEvent& /* event */)
+{}
+
+void ossimConnectableDisplayListener::displayListEvent(ossimDisplayListEvent&)
+{}
+
+void ossimConnectableDisplayListener::displayRefreshEvent(
+   ossimDisplayRefreshEvent&)
+{}
+
+void ossimConnectableDisplayListener::addObjectEvent(
+   ossimContainerEvent& /* event */)
+{}
+
+void ossimConnectableDisplayListener::removeObjectEvent(
+   ossimContainerEvent& /* event */)
+{}
+
+void ossimConnectableDisplayListener::refreshEvent(
+   ossimRefreshEvent& /* event */)
+{}
+
+
diff --git a/src/ossim/base/ossimConnectableObject.cpp b/ossim/src/ossim/base/ossimConnectableObject.cpp
similarity index 100%
rename from src/ossim/base/ossimConnectableObject.cpp
rename to ossim/src/ossim/base/ossimConnectableObject.cpp
diff --git a/ossim/src/ossim/base/ossimConnectableObjectListener.cpp b/ossim/src/ossim/base/ossimConnectableObjectListener.cpp
new file mode 100644
index 0000000..78d17f5
--- /dev/null
+++ b/ossim/src/ossim/base/ossimConnectableObjectListener.cpp
@@ -0,0 +1,113 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimConnectableObjectListener.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/base/ossimConnectableObjectListener.h>
+#include <ossim/base/ossimConnectableObject.h>
+#include <ossim/base/ossimObjectEvents.h>
+#include <ossim/base/ossimNotifyContext.h>
+
+RTTI_DEF1(ossimConnectableObjectListener,
+          "ossimConnectableObjectListener",
+          ossimListener);
+
+void ossimConnectableObjectListener::processEvent(ossimEvent& event)
+{
+   switch(event.getId())
+   {
+      case OSSIM_EVENT_OBJECT_DESTRUCTING_ID:
+      {
+         ossimObjectDestructingEvent* eventCast = dynamic_cast<ossimObjectDestructingEvent*>(&event);
+         if(eventCast) objectDestructingEvent(*eventCast);
+         
+         break;
+      }
+      case OSSIM_EVENT_CONNECTION_CONNECT_ID:
+      case OSSIM_EVENT_CONNECTION_DISCONNECT_ID:
+      {
+         ossimConnectionEvent* eventCast = dynamic_cast<ossimConnectionEvent*>(&event);
+         
+         if(eventCast)
+         {
+            connectionEvent(*eventCast);
+         
+            if(event.getId() == OSSIM_EVENT_CONNECTION_DISCONNECT_ID)
+            {
+               if(eventCast->isInputDirection())
+               {
+                  disconnectInputEvent(*eventCast);
+               }
+               else if(eventCast->isOutputDirection())
+               {
+                  disconnectOutputEvent(*eventCast);
+               }
+               else
+               {
+                  ossimNotify(ossimNotifyLevel_WARN) << "ossimConnectableObjectListener::processEvent, Direction not set\n";
+               }
+            }
+            else
+            {
+               if(eventCast->isInputDirection())
+               {
+                  connectInputEvent(*eventCast);
+               }
+               else if(eventCast->isOutputDirection())
+               {
+                  connectOutputEvent(*eventCast);
+               }
+               else
+               {
+                  ossimNotify(ossimNotifyLevel_WARN) << "ossimConnectableObjectListener::processEvent, Direction not set\n";
+               }
+            }
+         }
+         break;
+      }
+      case OSSIM_EVENT_PROPERTY_ID:
+      {
+         ossimPropertyEvent* eventCast = dynamic_cast<ossimPropertyEvent*>(&event);
+         if(eventCast) propertyEvent(*eventCast);
+         break;
+      }
+      case OSSIM_EVENT_ADD_OBJECT_ID:
+      {
+         ossimContainerEvent* eventCast = dynamic_cast<ossimContainerEvent*>(&event);
+         if(eventCast)
+         {
+            containerEvent(*eventCast);
+            addObjectEvent(*eventCast);
+         }
+         break;
+      }
+      case OSSIM_EVENT_REMOVE_OBJECT_ID:
+      {
+         ossimContainerEvent* eventCast = dynamic_cast<ossimContainerEvent*>(&event);
+         if(eventCast)
+         {
+            containerEvent(*eventCast);
+            removeObjectEvent(*eventCast);
+         }
+         break;
+      }
+      case OSSIM_EVENT_REFRESH_ID:
+      {
+         ossimRefreshEvent* eventCast = dynamic_cast<ossimRefreshEvent*>(&event);
+         if(eventCast) refreshEvent(*eventCast);
+         break;
+      }
+      default:
+      {
+         ossimListener::processEvent(event);
+         break;
+      }
+   }
+}
+
diff --git a/src/ossim/base/ossimConnectionEvent.cpp b/ossim/src/ossim/base/ossimConnectionEvent.cpp
similarity index 100%
rename from src/ossim/base/ossimConnectionEvent.cpp
rename to ossim/src/ossim/base/ossimConnectionEvent.cpp
diff --git a/ossim/src/ossim/base/ossimContainerEvent.cpp b/ossim/src/ossim/base/ossimContainerEvent.cpp
new file mode 100644
index 0000000..a387622
--- /dev/null
+++ b/ossim/src/ossim/base/ossimContainerEvent.cpp
@@ -0,0 +1,32 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimContainerEvent.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/base/ossimContainerEvent.h>
+
+RTTI_DEF1(ossimContainerEvent, "ossimContainerEvent", ossimEvent);
+
+ossimContainerEvent::ossimContainerEvent(ossimObject* obj,
+                                         long id)
+   :ossimEvent(obj, id)
+{
+}
+
+void ossimContainerEvent::setObjectList(ossimObject* obj)
+{
+   m_objectList.clear();
+   m_objectList.push_back(obj);
+}
+
+void ossimContainerEvent::setObjectList(ObjectList& objects)
+{
+   m_objectList = objects;
+}
+
diff --git a/src/ossim/base/ossimContainerProperty.cpp b/ossim/src/ossim/base/ossimContainerProperty.cpp
similarity index 100%
rename from src/ossim/base/ossimContainerProperty.cpp
rename to ossim/src/ossim/base/ossimContainerProperty.cpp
diff --git a/src/ossim/base/ossimCplUtil.cpp b/ossim/src/ossim/base/ossimCplUtil.cpp
similarity index 100%
rename from src/ossim/base/ossimCplUtil.cpp
rename to ossim/src/ossim/base/ossimCplUtil.cpp
diff --git a/src/ossim/base/ossimCsvFile.cpp b/ossim/src/ossim/base/ossimCsvFile.cpp
similarity index 100%
rename from src/ossim/base/ossimCsvFile.cpp
rename to ossim/src/ossim/base/ossimCsvFile.cpp
diff --git a/src/ossim/base/ossimCustomEditorWindow.cpp b/ossim/src/ossim/base/ossimCustomEditorWindow.cpp
similarity index 100%
rename from src/ossim/base/ossimCustomEditorWindow.cpp
rename to ossim/src/ossim/base/ossimCustomEditorWindow.cpp
diff --git a/src/ossim/base/ossimCustomEditorWindowFactoryBase.cpp b/ossim/src/ossim/base/ossimCustomEditorWindowFactoryBase.cpp
similarity index 100%
rename from src/ossim/base/ossimCustomEditorWindowFactoryBase.cpp
rename to ossim/src/ossim/base/ossimCustomEditorWindowFactoryBase.cpp
diff --git a/src/ossim/base/ossimCustomEditorWindowRegistry.cpp b/ossim/src/ossim/base/ossimCustomEditorWindowRegistry.cpp
similarity index 100%
rename from src/ossim/base/ossimCustomEditorWindowRegistry.cpp
rename to ossim/src/ossim/base/ossimCustomEditorWindowRegistry.cpp
diff --git a/ossim/src/ossim/base/ossimDataObject.cpp b/ossim/src/ossim/base/ossimDataObject.cpp
new file mode 100644
index 0000000..b20d928
--- /dev/null
+++ b/ossim/src/ossim/base/ossimDataObject.cpp
@@ -0,0 +1,191 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimDataObject.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/base/ossimDataObject.h>
+#include <ossim/base/ossimSource.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+
+RTTI_DEF1(ossimDataObject, "ossimDataObject", ossimObject)
+   
+ossimDataObject::ossimDataObject(ossimSource* source,
+                                 ossimDataObjectStatus status)
+   :
+      theOwner(source),
+      theDataObjectStatus(status)
+{
+}
+
+ossimDataObject::ossimDataObject(const ossimDataObject& rhs)
+   : ossimObject(),
+     theOwner(0),
+     theDataObjectStatus(rhs.theDataObjectStatus)
+{
+}
+
+ossimDataObject::~ossimDataObject()
+{
+}
+
+void ossimDataObject::setOwner(ossimSource* aSource)
+{
+   theOwner = aSource;
+}
+
+ossimSource* ossimDataObject::getOwner()
+{
+   return theOwner;
+}
+
+const ossimSource* ossimDataObject::getOwner() const
+{
+   return theOwner;
+}
+
+void ossimDataObject::setDataObjectStatus(ossimDataObjectStatus status) const
+{
+   theDataObjectStatus = status;
+}
+
+ossimDataObjectStatus ossimDataObject::getDataObjectStatus()const
+{
+   return theDataObjectStatus;
+}
+
+ossimString ossimDataObject::getDataObjectStatusString() const
+{
+   ossimString s;
+   
+   switch (theDataObjectStatus)
+   {
+      case OSSIM_NULL:
+         s = "OSSIM_NULL";
+         break;
+
+      case OSSIM_EMPTY:
+         s = "OSSIM_EMPTY";
+         break;
+
+      case OSSIM_PARTIAL:
+         s = "OSSIM_PARTIAL";
+         break;
+
+      case OSSIM_FULL:
+         s = "OSSIM_FULL";
+         break;
+         
+      case OSSIM_STATUS_UNKNOWN:
+      default:
+         s = "OSSIM_STATUS_UNKNOWN";
+         break;
+   }
+   
+   return s;
+}
+
+ossim_uint32 ossimDataObject::getObjectSizeInBytes()const
+{
+   return sizeof(theOwner);
+}
+
+bool ossimDataObject::isInitialize()const
+{
+   return (getDataObjectStatus()!=OSSIM_NULL);
+}
+
+bool ossimDataObject::operator!=(const ossimDataObject& rhs) const
+{
+   return ( theOwner               != rhs.theOwner ||
+            theDataObjectStatus    != rhs.theDataObjectStatus );
+}
+
+bool ossimDataObject::operator==(const ossimDataObject& rhs) const
+{
+   return (theOwner            == rhs.theOwner &&
+           theDataObjectStatus == rhs.theDataObjectStatus);
+}
+
+void ossimDataObject::assign(const ossimDataObject* rhs)
+{
+   if(rhs != this)
+   {
+      theOwner               = rhs->theOwner;
+      theDataObjectStatus     = rhs->theDataObjectStatus;
+   }
+}
+
+const ossimDataObject* ossimDataObject::operator=(const ossimDataObject* rhs)
+{
+   assign(rhs);
+   return this;
+}
+
+const ossimDataObject& ossimDataObject::operator=(const ossimDataObject& rhs)
+{
+   if (this != &rhs)
+   {
+      theOwner            = rhs.theOwner;
+      theDataObjectStatus = rhs.theDataObjectStatus; 
+   }
+   return *this;
+}
+
+std::ostream& ossimDataObject::print(ostream& out) const
+{
+   out << "ossimDataObject::print:";
+   
+   if (theOwner)
+   {
+      out << "\ntheOwner->getClassName():  "
+          << theOwner->getClassName()<<endl;
+   }
+   else
+   {
+      out << "\ntheOwner is null"
+          <<endl;
+   }
+   out << "theDataObjectStatus: " << getDataObjectStatusString()
+       << endl;
+
+   return out;
+}
+
+bool ossimDataObject::saveState(ossimKeywordlist& kwl, const char* prefix)const
+{
+   kwl.add(prefix, "data_object_status", getDataObjectStatusString(), true);
+   return ossimObject::saveState(kwl, prefix);
+}
+
+bool ossimDataObject::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   ossimString data_object_status = kwl.find(prefix, "data_object_status");
+   if(!data_object_status.empty())
+   {
+      data_object_status = data_object_status.upcase();
+      if(data_object_status == "OSSIM_FULL")
+      {
+         theDataObjectStatus = OSSIM_FULL;
+      }
+      else if(data_object_status == "OSSIM_PARTIAL")
+      {
+         theDataObjectStatus = OSSIM_PARTIAL;
+      }
+      else if(data_object_status == "OSSIM_EMPTY")
+      {
+         theDataObjectStatus = OSSIM_EMPTY;
+      }
+      else if(data_object_status == "OSSIM_STATUS_UNKNOWN")
+      {
+         theDataObjectStatus = OSSIM_STATUS_UNKNOWN;
+      }
+   }
+   
+   return ossimObject::loadState(kwl, prefix);
+}                     
+
diff --git a/ossim/src/ossim/base/ossimDate.cpp b/ossim/src/ossim/base/ossimDate.cpp
new file mode 100644
index 0000000..306a1c0
--- /dev/null
+++ b/ossim/src/ossim/base/ossimDate.cpp
@@ -0,0 +1,1140 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimDate.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/base/ossimDate.h>
+#include <cctype> /* for isdigit */
+#include <iomanip>
+#include <sstream>
+#include <iostream>
+OpenThreads::Mutex ossimLocalTm::m_mutex;
+
+std::ostream& operator<< (std::ostream& out, const ossimDate& src)
+{
+   return src.print(out);
+}
+
+std::ostream& operator<< (std::ostream & os, ossimLocalTm const & t)
+{
+   return t.print(os);
+}
+
+int operator== (ossimLocalTm const & t1, ossimLocalTm const & t2)
+{
+   return int(t1.compare(t2) == 0);
+}
+
+int operator!= (ossimLocalTm const & t1, ossimLocalTm const & t2)
+{
+   return int(t1.compare(t2) != 0);
+}
+
+int operator<  (ossimLocalTm const & t1, ossimLocalTm const & t2)
+{
+   return int(t1.compare(t2) < 0);
+}
+
+int operator<= (ossimLocalTm const & t1, ossimLocalTm const & t2)
+{
+   return int(t1.compare(t2) <= 0);
+}
+
+int operator>  (ossimLocalTm const & t1, ossimLocalTm const & t2)
+{
+   return int(t1.compare(t2) > 0);
+}
+
+int operator>=  (ossimLocalTm const & t1, ossimLocalTm const & t2)
+{
+   return int(t1.compare(t2) >= 0);
+}
+
+char ossimLocalTm::timech = ':';
+char ossimLocalTm::datech = '/';
+
+int ossimLocalTm::datefmt = ossimLocalTm::ossimLocalTmFormatFull;
+int ossimLocalTm::timefmt = ossimLocalTm::ossimTimeFormatInternational;
+
+
+ossimLocalTm::ossimLocalTm (time_t t)
+   :theFractionalSecond(0.0)
+{
+  if (t == 0)
+      t = time(0);
+  *(tm *)this = *localtime(&t);
+
+  setTimezoneOffsetFromGmt();
+
+}
+
+ossimLocalTm::ossimLocalTm (tm const & t)
+   :theFractionalSecond(0.0)
+{
+  *((tm *)this) = t;
+  setTimezoneOffsetFromGmt();
+}
+ossimLocalTm::ossimLocalTm (const ossimLocalTm& t)
+   :theFractionalSecond(t.theFractionalSecond)
+{
+  *((tm *)this) = t;
+  setTimezoneOffsetFromGmt();
+}
+
+ossimLocalTm& ossimLocalTm::operator= (tm const & t)
+{
+    *((tm *)this) = t;
+    return *this;
+}
+
+ossimLocalTm & ossimLocalTm::operator= (const ossimLocalTm & t)
+{
+    *((tm *)this) = t;
+    theFractionalSecond = t.theFractionalSecond;
+    return *this;
+}
+
+int ossimLocalTm::compare (ossimLocalTm const & t) const
+{
+    return compare ((time_t)t);
+}
+
+int ossimLocalTm::compare (time_t const tt) const
+{
+    time_t tx = (time_t)*this;
+    return (tx == tt) ? 0 : (tx > tt) ? 1 : -1;
+}
+
+ossimLocalTm::operator time_t (void) const
+{
+    return mktime ((tm *)this);
+}
+
+int ossimLocalTm::isValid (void) const
+{
+    static int maxd[] =
+    {
+        31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
+    };
+
+    return ((tm_year > 0) &&
+            (tm_mon >= 0) && (tm_mon < 12) &&
+            (tm_mday > 0) && (tm_mday <= maxd[tm_mon]) &&
+            (tm_wday < 7) && (tm_yday < 367) &&
+            (tm_sec < 60) && (tm_min < 60) && (tm_hour < 24));
+}
+void ossimLocalTm::now()
+{
+   time_t t = time(0);
+   *this = *localtime(&t);
+}
+
+void ossimLocalTm::dSfx (std::ostream & os, int fmt) const
+{
+    if (fmt & ossimLocalTmFormatSepChar)
+        os << datech;
+    if (fmt & ossimLocalTmFormatSepSpace)
+        os << ' ';
+}
+
+void ossimLocalTm::pYear (std::ostream & os, int fmt) const
+{
+    if (fmt & ossimLocalTmFormatYear)
+    {
+        int year = tm_year;
+        int dig;
+        if (fmt & ossimLocalTmFormatYearShort)
+        {
+            dig = 2;
+            year %= 100;
+        }
+        else
+        {
+            dig = 4;
+            if (year < 200)
+                year += 1900;
+        }
+        os << std::setw((fmt & ossimLocalTmFormatPadYear) ? dig : 0);
+        os << std::setfill((fmt & ossimLocalTmFormatZeroYear) ? '0' : ' ');
+        os << year;
+        if ((fmt & ossimLocalTmFormatYearFirst))
+        {
+            fmt &= (ossimLocalTmFormatSepChar|ossimLocalTmFormatSepSpace);
+            dSfx (os, fmt);
+        }
+    }
+}
+
+void ossimLocalTm::pMonth (std::ostream & os, int fmt) const
+{
+
+    static const char * _months[] =
+    {
+        "January", "February", "March", "April",
+        "May", "June", "July", "August", "September",
+        "October", "November", "December"
+    };
+
+    if (fmt & ossimLocalTmFormatMonth)
+    {
+        int mon = (tm_mon % 12);
+        if (fmt & ossimLocalTmFormatMonText)
+        {
+            char const * tmon = _months[mon];
+            if (!(fmt & ossimLocalTmFormatPadMon))
+                os << tmon;
+            else
+                for (int x = 0; x < 3; ++x)
+                    os << tmon[x];
+        }
+        else
+        {
+            ++mon;
+            os << std::setw((fmt & ossimLocalTmFormatPadMon) ? 2 : 0);
+            os << std::setfill((fmt & ossimLocalTmFormatZeroMon) ? '0' : ' ');
+            os << mon;
+        }
+        if (((fmt & ossimLocalTmFormatYear) && !(fmt & ossimLocalTmFormatYearFirst)) ||
+            ((fmt & ossimLocalTmFormatDay) && (fmt & ossimLocalTmFormatMonFirst)))
+        {
+            fmt &= (ossimLocalTmFormatSepChar|ossimLocalTmFormatSepSpace);
+            dSfx (os, fmt);
+        }
+    }
+}
+
+
+void ossimLocalTm::pDate (std::ostream & os, int fmt) const
+{
+    if (fmt & ossimLocalTmFormatDay)
+    {
+        int day = tm_mday;
+        os << std::setw((fmt & ossimLocalTmFormatPadDay) ? 2 : 0);
+        os << std::setfill((fmt & ossimLocalTmFormatZeroDay) ? '0' : ' ');
+        os << day;
+        if (!(fmt & ossimLocalTmFormatYearFirst) || !(fmt & ossimLocalTmFormatMonFirst))
+        {
+            fmt &= (ossimLocalTmFormatSepChar|ossimLocalTmFormatSepSpace);
+            dSfx (os, fmt);
+        }
+    }
+}
+
+void ossimLocalTm::setTimezoneOffsetFromGmt()
+{
+   m_mutex.lock();
+   // struct tm gmt = *this;
+#if !defined(_MSC_VER) 
+   tzset();
+#else
+   _tzset();
+#endif
+   
+#if ( defined(__APPLE__) || defined(__FreeBSD__)  || defined(__OpenBSD__) )
+   //gmt.tm_sec -= tm_gmtoff; // Seconds east of UTC
+   m_timezoneOffset = tm_gmtoff;
+#else
+   m_timezoneOffset = timezone; // Seconds west of UTC
+   if ( tm_isdst )
+   {
+      m_timezoneOffset -= 3600; // Subtract an hour.
+   }
+   m_timezoneOffset = -m_timezoneOffset;
+#endif
+   m_mutex.unlock();
+   
+   m_timezoneOffset = m_timezoneOffset/3600;
+}
+
+std::ostream& ossimLocalTm::print(std::ostream & os,
+                                    int df,
+                                    int tf) const
+{
+    std::ostringstream pTmp;
+    printDate (pTmp, df);
+    pTmp << ' ';
+    printTime (pTmp, tf);
+
+    return os << pTmp.str();
+}
+
+
+
+std::ostream& ossimLocalTm::printDate (std::ostream & os, int fmt) const
+{
+    std::ostringstream pTmp;
+
+    static const char * _days[] =
+    {
+        "Sunday", "Monday", "Tuesday", "Wednesday",
+        "Thursday", "Friday", "Saturday"
+    };
+
+    if (fmt & ossimLocalTmFormatDayOfWeek)
+    {
+        int day = tm_wday % 7;
+        char const * p = _days[day];
+        if (fmt & ossimLocalTmFormatPadDay)
+            for (int x = 0; x < 3; ++x)
+                pTmp << p[x];
+        else
+        {
+            pTmp << p;
+            if (fmt & ossimLocalTmFormatDMY)
+                pTmp << ',';
+        }
+        if ((fmt & ossimLocalTmFormatDMY) && fmt & ossimLocalTmFormatSepSpace)
+            pTmp << ' ';
+    }
+    if (fmt & ossimLocalTmFormatYearFirst)
+        pYear (pTmp, fmt);
+    if (fmt & ossimLocalTmFormatMonFirst)
+        pMonth (pTmp, fmt);
+    pDate (pTmp, fmt);
+    if (!(fmt & ossimLocalTmFormatMonFirst))
+        pMonth (pTmp, fmt);
+    if (!(fmt & ossimLocalTmFormatYearFirst))
+        pYear (pTmp, fmt);
+
+    return os << pTmp.str();
+}
+
+std::ostream& ossimLocalTm::dump(std::ostream& os) const
+{
+   // Capture the original flags.
+   std::ios_base::fmtflags f = os.flags();
+
+   os << setiosflags(ios::fixed) << setprecision(8) << setiosflags(ios::left);
+
+   os << "fr_sec:   " << setw(12) << theFractionalSecond
+      << "fractional second\n"
+      << "tm_sec:   " << setw(12) << tm_sec
+      << "seconds [0-60] (1 leap second)\n"
+      << "tm_min:   " << setw(12) << tm_min   << "minutes [0-59]\n"
+      << "tm_hour:  " << setw(12) << tm_hour  << "hours [0-23]\n"
+      << "tm_mday:  " << setw(12) << tm_mday  << "day [1-31]\n"
+      << "tm_mon:   " << setw(12) << tm_mon   << "month [0-11]\n"
+      << "tm_year:  " << setw(12) << tm_year  << "year - 1900\n"
+      << "tm_wday:  " << setw(12) << tm_wday  << "day of week [0-6]\n"
+      << "tm_yday:  " << setw(12) << tm_yday  << "days in year[0-365]\n"
+      << "tm_isdst: " << setw(12) << tm_isdst << "DST.[-1/0/1]\n"
+      << std::endl;
+
+   // Reset flags.
+   os.setf(f);
+   
+   return os;
+}
+
+void ossimLocalTm::tSfx (std::ostream & os, int fmt, char ch) const
+{
+    if (fmt & ossimTimeFormatSepAbbrev)
+        os << ch;
+    if (fmt & ossimTimeFormatSepChar)
+        os << timech;
+    if (fmt & ossimTimeFormatSepSpace)
+        os << ' ';
+}
+
+void ossimLocalTm::pHour (std::ostream & os, int fmt) const
+{
+    if (fmt & ossimTimeFormatHour)
+    {
+        int hour = tm_hour;
+        if (!(fmt & ossimTimeFormat24hour))
+        {
+            if (hour > 12)
+                hour -= 12;
+            else if (!hour && (fmt & ossimTimeFormatAmPm))
+                hour += 12;
+        }
+        os << std::setw((fmt & ossimTimeFormatPadHour) ? 2 : 0);
+        os << std::setfill((fmt & ossimTimeFormatZeroHour) ? '0' : ' ');
+        os << hour;
+        if (!(fmt & ossimTimeFormatMins))
+            fmt &= ossimTimeFormatSepAbbrev;
+        tSfx (os, fmt, 'h');
+    }
+}
+
+void ossimLocalTm::pMins (std::ostream & os, int fmt) const
+{
+    if (fmt & ossimTimeFormatMins)
+    {
+        int min = tm_min;
+        int dig = 2;
+        if (!(fmt & ossimTimeFormatHour))
+        {
+            min += (tm_hour * 60);
+            dig += 2;
+        }
+        os << std::setw((fmt & ossimTimeFormatPadMins) ? dig : 0);
+        os << std::setfill((fmt & ossimTimeFormatZeroMins) ? '0' : ' ');
+        os << min;
+        if (!(fmt & ossimTimeFormatSecs))
+            fmt &= ossimTimeFormatSepAbbrev;
+        tSfx (os, fmt, 'm');
+    }
+}
+
+void ossimLocalTm::pSecs (std::ostream & os, int fmt) const
+{
+    if (fmt & ossimTimeFormatSecs)
+    {
+        int sec = tm_sec;
+        int dig = 2;
+        if (!(fmt & (ossimTimeFormatHour|ossimTimeFormatMins)))
+        {
+            sec += ((tm_hour * 60) + tm_min) + 60;
+            dig += 3;
+        }
+        os << std::setw((fmt & ossimTimeFormatPadSecs) ? dig : 0);
+        os << std::setfill((fmt & ossimTimeFormatZeroSecs) ? '0' : ' ');
+        os << sec;
+        if (fmt & ossimTimeFormatAmPm)
+            fmt &= ~ossimTimeFormatSepChar;
+        else
+            fmt &= (ossimTimeFormatSepAbbrev|ossimTimeFormatSepSpace);
+        tSfx (os, fmt, 's');
+    }
+}
+
+std::ostream &ossimLocalTm::printTime (std::ostream & os, int fmt) const
+{
+    std::ostringstream pTmp;
+    pHour (pTmp, fmt);
+    pMins (pTmp, fmt);
+    pSecs (pTmp, fmt);
+    if (fmt & ossimTimeFormatAmPm)
+    {
+        pTmp << (tm_hour > 11 ? "pm" : "am");
+    }
+
+    return os << pTmp.str();
+}
+
+
+int ossimLocalTm::getYear()const
+{
+   int result = tm_year;
+//   if (result < 200)
+   {
+      result += 1900;
+   }
+   return result;
+}
+
+int ossimLocalTm::getShortYear()const
+{
+   return (getYear()%100);
+}
+
+int ossimLocalTm::getMonth()const
+{
+   return ((tm_mon % 12)+1); 
+}
+
+int ossimLocalTm::getDay()const
+{
+   return tm_mday;
+}
+
+double ossimLocalTm::getJulian()const
+{
+   int J = getMonth();
+   int K = getDay();
+   int I = getYear();
+
+   return (K-32075+1461*(I+4800+(J-14)/12)/4+367*(J-2-(J-14)/12*12)
+           /12-3*((I+4900+(J-14)/12)/100)/4+
+           (getHour()/24.0)+
+           (getMin()/1440.0)+
+           ((getSec()+theFractionalSecond)/86400.0));
+}
+
+double ossimLocalTm::getModifiedJulian()const
+{
+   return getJulian() - 2400000.5;
+}
+
+ossimLocalTm& ossimLocalTm::setDay(int day)
+{
+   tm_mday = day;
+   
+   return *this;
+}
+
+ossimLocalTm& ossimLocalTm::setMonth(int month)
+{
+   tm_mon = month - 1;
+
+   return *this;
+}
+
+ossimLocalTm& ossimLocalTm::setYear(int year)
+{
+   if(year < 2099)
+   {
+      tm_year = year - 1900;
+   }
+   else
+   {
+      tm_year = year;
+   }
+
+   return *this;
+}
+
+ossimLocalTm& ossimLocalTm::setDateFromJulian(double jd)
+{
+   double fractional = jd - (long)jd;
+   long l;
+   long n;
+   long i;
+   long j;
+   long k;
+
+
+   l= (long)(jd+68569);
+   n= 4*l/146097;
+   l= l-(146097*n+3)/4;
+   i= 4000*(l+1)/1461001;
+   l= l-1461*i/4+31l;
+   j= 80*l/2447;
+   k= l-2447*j/80;
+   l= j/11;
+   j= j+2-12*l;
+   i= 100*(n-49)+i+l;
+   setDay(k);
+   setMonth(j);
+   setYear(i);
+
+   setFractionalDay(fractional);
+   
+   return *this;
+}
+
+ossimLocalTm& ossimLocalTm::setDateFromModifiedJulian(double mjd)
+{
+   setDateFromJulian(mjd + 2400000.5);
+
+   return *this;
+}
+
+void ossimLocalTm::setFractionalDay(double fractionalDay)
+{
+   int h, m, s;
+   double fractionalSecond;
+   extractHmsFromFractionalDay(fractionalDay, h, m, s, fractionalSecond);
+
+   setHour(h);
+   setMin(m);
+   setSec(s);
+   setFractionalSecond(fractionalSecond);
+}
+
+void ossimLocalTm::extractHmsFromFractionalDay(double fractionalDay,
+                                               int &h,
+                                               int &m,
+                                               int &s,
+                                               double& fractionalSecond)
+{
+   fractionalDay *=24;
+   h = (int)fractionalDay;
+   fractionalDay = fractionalDay-h;
+   fractionalDay*=60;
+   m = (int)fractionalDay;
+   fractionalDay = fractionalDay-m;
+   fractionalDay*=60;
+   s = (int)fractionalDay;
+   fractionalDay = fractionalDay-s;
+   fractionalSecond = fractionalDay;
+}
+
+int ossimLocalTm::getHour()const
+{
+   return tm_hour;
+}
+
+int ossimLocalTm::getMin()const
+{
+   return tm_min;
+}
+
+int ossimLocalTm::getSec()const
+{
+   return tm_sec;
+}
+
+double ossimLocalTm::getFractionalSecond()const
+{
+   return theFractionalSecond;
+}
+
+ossimLocalTm& ossimLocalTm::setHour(int h)
+{
+   tm_hour = h;
+
+   return *this;
+}
+
+ossimLocalTm& ossimLocalTm::setMin(int m)
+{
+   tm_min = m;
+
+   return *this;
+}
+
+ossimLocalTm& ossimLocalTm::setSec(int s)
+{
+   tm_sec = s;
+
+   return *this;
+}
+
+ossimLocalTm& ossimLocalTm::setFloatSec(double s)
+{
+   tm_sec = (int)s;
+   return setFractionalSecond(s-tm_sec);
+}
+
+ossimLocalTm& ossimLocalTm::setFractionalSecond(double fractionalSecond)
+{
+   theFractionalSecond = fractionalSecond;
+
+   return *this;
+}
+
+time_t ossimLocalTm::getTicks()const
+{
+   return getEpoc();
+}
+
+time_t ossimLocalTm::getEpoc()const
+{
+   std::tm temp = *this;
+
+   return mktime(&temp);
+}
+
+void ossimLocalTm::addSeconds(ossim_float64 n)
+{
+   // use julian to help in this addition.  Julian is in days
+   setDateFromJulian(getJulian() + (n/86400.0));
+}
+
+void ossimLocalTm::addMinutes(ossim_float64 n)
+{
+   setDateFromJulian(getJulian() + (n/1440.0));
+}
+
+void ossimLocalTm::addHours(ossim_float64 n)
+{
+   setDateFromJulian(getJulian() + (n/24.0));
+}
+
+void ossimLocalTm::addDays(ossim_float64 n)
+{
+   setDateFromJulian(getJulian() + n);
+}
+
+ossim_float64 ossimLocalTm::deltaInSeconds(const ossimLocalTm& d)const
+{
+   return (getJulian()-d.getJulian())*86400.0;
+}
+
+ossim_float64 ossimLocalTm::deltaInMinutes(const ossimLocalTm& d)const
+{
+   return (getJulian()-d.getJulian())*1440.0;
+}
+
+ossim_float64 ossimLocalTm::delatInHours(const ossimLocalTm& d)const
+{
+   return (getJulian()-d.getJulian())*24;
+}
+
+ossim_float64 ossimLocalTm::deltaInDays(const ossimLocalTm& d)const
+{
+   return (getJulian()-d.getJulian());
+}
+
+ossimLocalTm ossimLocalTm::convertToGmt()const
+{
+  m_mutex.lock();
+   struct tm gmt = *this;
+#if !defined(_MSC_VER) 
+   tzset();
+#else
+   _tzset();
+#endif
+
+#if ( defined(__APPLE__) || defined(__FreeBSD__)  || defined(__OpenBSD__) )
+   gmt.tm_sec -= tm_gmtoff; // Seconds east of UTC
+#else
+   gmt.tm_sec += timezone; // Seconds west of UTC
+   if ( tm_isdst )
+   {
+      gmt.tm_sec -= 3600; // Subtract an hour.
+   }
+#endif
+   
+   time_t t = mktime(&gmt);
+   std::tm localTime = *localtime(&t);
+
+m_mutex.unlock();
+   ossimLocalTm result(localTime);
+   
+   return result;
+}
+
+void ossimLocalTm::setTimeNoAdjustmentGivenEpoc(time_t ticks)
+{
+  OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_mutex);
+   *this = *gmtime(&ticks);
+}
+
+void ossimLocalTm::setTimeGivenEpoc(time_t ticks)
+{
+  OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_mutex);
+  *this = *localtime(&ticks);
+}
+
+
+static bool readIntegerFromString(ossim_int32& result,
+                                 const std::string& input,
+                                 std::string::size_type& currentPos,
+                                 int digits)
+{
+   ossimString number;
+   while((digits>0)&&
+         (currentPos < input.size()))
+   {
+      if(isdigit(input[currentPos]))
+      {
+         number += input[currentPos];
+         ++currentPos;
+         --digits;
+      }
+      else
+      {
+         return false;
+      }
+   }
+   result = number.toInt32();
+   return (digits <= 0);
+}
+
+static bool readTimeZoneOffset(ossim_int32& result,
+                               const std::string& input,
+                               std::string::size_type& currentPos)
+{
+   bool returnValue = false;
+   result = 0;
+   if(input[currentPos] == '+'||
+      input[currentPos] == '-')
+   {
+      returnValue = true;
+      ossim_int32 signMult = ((input[0] == '+')?1:-1);
+      ossim_int32 zoneMin = 0;
+      ossim_int32 zoneHour = 0;
+      ++currentPos;
+      if(readIntegerFromString(zoneHour,
+                               input,
+                               currentPos,
+                               2))
+      {
+         if(!isdigit(input[currentPos]))
+         {
+            ++currentPos; // skip :
+         }
+         if(readIntegerFromString(zoneMin,
+                                  input,
+                                  currentPos,
+                                  2))
+         {
+            result = signMult*(zoneMin*60 + zoneHour*3600);
+         }
+      }
+   }
+   
+   return returnValue;
+}
+
+bool ossimLocalTm::setIso8601(const std::string& timeString, bool shiftToGmtOffsetZero)
+{
+   ossimDate now;
+   std::string::size_type pos = 0;
+   ossim_int32 year  = 0;
+   ossim_int32 month = 0;
+   ossim_int32 day   = 0;
+   ossim_int32 timeZoneOffset = 0;
+   
+   if(timeString[0] != 'T') // make sure it's not time only
+   {
+      // look for year
+      //
+      if(readIntegerFromString(year,
+                               timeString,
+                               pos,
+                               4))
+      {
+         // retrieved the year portion
+         // now check for separator not digit
+         //
+         
+         // we at least have a year
+         // now check for others
+         setYear(year);
+         if(!isdigit(timeString[pos]))
+         {
+            // skip separator
+            ++pos;
+         }
+         if(readIntegerFromString(month,
+                                  timeString,
+                                  pos,
+                                  2))
+         
+         {
+            setMonth(month);
+            if(!isdigit(timeString[pos]))
+            {
+               // skip separator
+               ++pos;
+            }
+            if(readIntegerFromString(day,
+                                     timeString,
+                                     pos,
+                                     2))
+            {
+               setDay(day);
+            }
+         }
+      }
+      else
+      {
+         return false;
+      }
+   }
+   else // set year month day to current
+   {
+      setYear(now.getYear());
+      setMonth(now.getMonth());
+      setDay(now.getDay());
+   }
+   // check to see if we need to read time portion
+   if(timeString[pos] == 'T')
+   {
+      ++pos; // skip T character
+      ossim_int32 hours=0, minutes=0;
+      
+      if(readIntegerFromString(hours,
+                               timeString,
+                               pos,
+                               2))
+      {
+         setHour(hours);
+         
+         // now check for separator
+         if(!std::isdigit(timeString[pos]))
+         {
+            ++pos; // skip separator if present
+         }
+         if(readIntegerFromString(minutes,
+                                  timeString,
+                                  pos,
+                                  2))
+         {
+            setMin(minutes);
+            // now check for time zone if only a hour minute time
+            //
+            if(timeString[pos] == 'Z')
+            {
+              std::time_t t = mktime(this);
+              t += m_timezoneOffset*3600;
+              setTimeGivenEpoc(t);
+            }
+            else if(!readTimeZoneOffset(timeZoneOffset,
+                                       timeString,
+                                       pos))
+            {
+               double fractionalSeconds = 0.0;
+               if(!std::isdigit(timeString[pos]))
+               {
+                  ++pos;
+               }
+               std::string::size_type endPos = timeString.find_first_not_of("0123456789.", pos);
+               if(endPos == std::string::npos)
+               {
+                  fractionalSeconds = ossimString(timeString.begin()+pos,
+                                                  timeString.end()).toDouble();
+               }
+               else
+               {
+                  fractionalSeconds = ossimString(timeString.begin()+pos,
+                                                  timeString.begin()+endPos).toDouble();
+               }
+               setFloatSec(fractionalSeconds);
+               pos = endPos;
+               if(pos == std::string::npos)
+               {
+                  // we will not be too strict so if at the end then just return we got enough
+                  return true;
+               }
+               if(timeString[pos] == 'Z')
+               {
+                  std::time_t t = mktime(this);
+                  t += m_timezoneOffset*3600;
+                  setTimeGivenEpoc(t);
+                //std::cout << "OFFSET == " << m_timezoneOffset << std::endl;
+               }
+               else
+               {
+                  readTimeZoneOffset(timeZoneOffset,
+                                     timeString,
+                                     pos);
+               }
+            }
+         }
+      }
+      else
+      {
+         // need at least hours 
+         return false;
+      }
+   }
+   else if(std::isdigit(timeString[pos]))
+   {
+      ossim_int32 hours=0, minutes=0;
+      
+      if(readIntegerFromString(hours,
+                               timeString,
+                               pos,
+                               2))
+      {
+         setHour(hours);
+         
+         // now check for separator
+         if(!std::isdigit(timeString[pos]))
+         {
+            ++pos; // skip separator if present
+         }
+         if(readIntegerFromString(minutes,
+                                  timeString,
+                                  pos,
+                                  2))
+         {
+            setMin(minutes);
+            
+            if(!readTimeZoneOffset(timeZoneOffset,
+                                  timeString,
+                                  pos))
+            {
+               double fractionalSeconds = 0.0;
+               if(!std::isdigit(timeString[pos]))
+               {
+                  ++pos;
+               }
+               std::string::size_type endPos = timeString.find_first_not_of("0123456789.", pos);
+               if(endPos == std::string::npos)
+               {
+                  fractionalSeconds = ossimString(timeString.begin()+pos,
+                                                  timeString.end()).toDouble();
+               }
+               else
+               {
+                  fractionalSeconds = ossimString(timeString.begin()+pos,
+                                                  timeString.begin()+endPos).toDouble();
+               }
+               setFloatSec(fractionalSeconds);
+               pos = endPos;
+               if(pos == std::string::npos)
+               {
+                  // we will not be too strict so if at the end then just return we got enough
+                  return true;
+               }
+               if(timeString[pos] == 'Z')
+               {
+                  // For proper readouts we need to shift
+                  // to current time zone of the system
+                  //
+                //std::cout << "OFFSET == " << m_timezoneOffset << std::endl;
+               
+                  std::time_t t = mktime(this);
+                  t += m_timezoneOffset*3600;
+                  setTimeGivenEpoc(t);
+               }
+               else
+               {
+                  readTimeZoneOffset(timeZoneOffset,
+                                     timeString,
+                                     pos);
+               }
+            }
+         }
+      }  
+   }
+   else
+   {
+      // need at least hours 
+      return false;
+   }
+   
+   if(shiftToGmtOffsetZero && (timeZoneOffset!=0))
+   {
+      addSeconds(-timeZoneOffset);
+   }
+   return true;
+}
+
+ossimRefPtr<ossimXmlNode> ossimLocalTm::saveXml()const
+{
+   ossimRefPtr<ossimXmlNode> result = new ossimXmlNode;
+
+   result->setTag("ossimDate");
+   result->addAttribute("version", "1");
+   result->addChildNode("month", ossimString::toString(getMonth()));
+   result->addChildNode("day", ossimString::toString(getDay()));
+   result->addChildNode("year", ossimString::toString(getYear()));
+   result->addChildNode("hour", ossimString::toString(getHour()));
+   result->addChildNode("minutes", ossimString::toString(getMin()));
+   result->addChildNode("seconds", ossimString::toString(getSec()));
+   result->addChildNode("fractionalSecond", ossimString::toString(getFractionalSecond()));
+   
+   return result.get();
+}
+
+bool ossimLocalTm::loadXml(ossimRefPtr<ossimXmlNode> dateNode)
+{
+   bool result = true;
+   ossimRefPtr<ossimXmlNode> month = dateNode->findFirstNode("month");
+   ossimRefPtr<ossimXmlNode> day = dateNode->findFirstNode("day");
+   ossimRefPtr<ossimXmlNode> year = dateNode->findFirstNode("year");
+   ossimRefPtr<ossimXmlNode> hour = dateNode->findFirstNode("hour");
+   ossimRefPtr<ossimXmlNode> minutes = dateNode->findFirstNode("minutes");
+   ossimRefPtr<ossimXmlNode> seconds = dateNode->findFirstNode("seconds");
+   ossimRefPtr<ossimXmlNode> fractionalSecond = dateNode->findFirstNode("fractionalSecond");
+   ossimRefPtr<ossimXmlNode> julian = dateNode->findFirstNode("julian");
+   ossimRefPtr<ossimXmlNode> modifiedJulian = dateNode->findFirstNode("modifiedJulian");
+
+   if(month.valid()&&
+      day.valid()&&
+      year.valid()&&
+      hour.valid()&&
+      minutes.valid()&&
+      seconds.valid())
+   {
+      setMonth(month->getText().toInt32());
+      setDay(day->getText().toInt32());
+      setYear(year->getText().toInt32());
+      setHour(hour->getText().toInt32());
+      setMin(minutes->getText().toInt32());
+      setSec(seconds->getText().toInt32());
+      if(fractionalSecond.valid())
+      {
+         setFractionalSecond(fractionalSecond->getText().toDouble());
+      }
+      else
+      {
+         setFractionalSecond(0.0);
+      }
+   }
+   else if(modifiedJulian.valid())
+   {
+      setDateFromModifiedJulian(modifiedJulian->getText().toDouble());
+   }
+   else if(julian.valid())
+   {
+      setDateFromJulian(julian->getText().toDouble());
+   }
+   else
+   {
+      result = false;
+   }
+
+   return result;
+}
+
+ossimDate::ossimDate(int datefmt)
+   :ossimLocalTm(0), _fmt(datefmt)
+{}
+
+ossimDate::ossimDate (ossimLocalTm const & t,
+                      int dtfmt)
+   : ossimLocalTm (t), _fmt(dtfmt)
+{}
+
+ossimDate::ossimDate (time_t t, int dtfmt)
+   : ossimLocalTm (t), _fmt(dtfmt)
+{}
+
+ossimDate::ossimDate(int month,
+                     int day,
+                     int year,
+                     int dtfmt)
+   :ossimLocalTm (0), _fmt(dtfmt)
+{
+   setMonth(month);
+   setDay(day);
+   setYear(year);
+   setHour(0);
+   setMin(0);
+   setSec(0);
+   setFractionalSecond(0.0);
+}
+
+int ossimDate::fmt(int f)
+{
+   return _fmt = f;
+}
+
+int ossimDate::fmt(void) const
+{
+   return _fmt;
+}
+
+std::ostream& ossimDate::print (std::ostream & os) const
+{
+   return printDate (os, _fmt);
+}
+
+std::ostream& operator <<(std::ostream& out, const ossimTime& src)
+{
+   return src.print(out);
+}
+ossimTime::ossimTime(int tmfmt)
+      : ossimLocalTm(0), _fmt(tmfmt)
+{
+}
+ossimTime::ossimTime(ossimTime const & t,
+                      int tmfmt)
+      : ossimLocalTm (t), _fmt(tmfmt)
+{
+}
+
+ossimTime::ossimTime(time_t t, int tmfmt)
+      : ossimLocalTm (t), _fmt(tmfmt)
+{
+}
+      
+int ossimTime::fmt(int f)
+{
+   return _fmt = f;
+}
+
+int ossimTime::fmt(void) const
+{
+   return _fmt;
+}
+
+std::ostream& ossimTime::print (std::ostream & os) const
+{
+   return printTime(os, _fmt);
+}
+
diff --git a/ossim/src/ossim/base/ossimDateProperty.cpp b/ossim/src/ossim/base/ossimDateProperty.cpp
new file mode 100644
index 0000000..68e6c8c
--- /dev/null
+++ b/ossim/src/ossim/base/ossimDateProperty.cpp
@@ -0,0 +1,146 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// LICENSE: MIT see top level license.txt
+//
+// Author: Garrett Potts (gpotts at imagelinks.com)
+//
+//*************************************************************************
+// $Id: ossimDateProperty.cpp 23666 2015-12-14 20:01:22Z rashadkm $
+//
+
+#include <iostream>
+#include <iomanip>
+#include <sstream>
+#include <ossim/base/ossimDateProperty.h>
+
+
+RTTI_DEF1(ossimDateProperty, "ossimDateProperty", ossimProperty);
+
+ossimDateProperty::ossimDateProperty()
+      :ossimProperty("")
+{
+   setDate(ossimDate());
+}
+
+ossimDateProperty::ossimDateProperty(const ossimString& name,
+                                     const ossimString& value)
+      :ossimProperty(name)
+{
+   setValue(value);
+}
+
+ossimDateProperty::ossimDateProperty(const ossimString& name,
+                                     const ossimLocalTm& value)
+      :ossimProperty(name),
+       theValue(value)
+{
+}
+
+ossimDateProperty::ossimDateProperty(const ossimDateProperty& src)
+   :ossimProperty(src),
+    theValue(src.theValue)
+{
+}
+
+ossimObject* ossimDateProperty::dup()const
+{
+   return new ossimDateProperty(*this);
+}
+
+void ossimDateProperty::setDate(const ossimLocalTm& localTm)
+{
+   theValue = localTm;
+}
+
+const ossimLocalTm& ossimDateProperty::getDate()const
+{
+   return theValue;
+}
+
+bool ossimDateProperty::setValue(const ossimString& value)
+{
+   if(value.trim() == "")
+   {
+      theValue = ossimDate();
+      return true;
+   }
+   bool result = value.size() == 14;
+   
+   ossimString year;
+   ossimString month;
+   ossimString day;
+   ossimString hour;
+   ossimString min;
+   ossimString sec;
+
+   if(value.size() == 14)
+   {
+      year = ossimString(value.begin(),
+                         value.begin()+4);
+      month = ossimString(value.begin()+4,
+                          value.begin()+6);
+      day = ossimString(value.begin()+6,
+                        value.begin()+8);
+      hour = ossimString(value.begin()+8,
+                        value.begin()+10);
+      min = ossimString(value.begin()+10,
+                        value.begin()+12);
+      sec = ossimString(value.begin()+12,
+                        value.begin()+14);
+
+      theValue.setYear(year.toUInt32());
+      theValue.setMonth(month.toUInt32());
+      theValue.setDay(day.toUInt32());
+      theValue.setHour(hour.toUInt32());
+      theValue.setMin(min.toUInt32());
+      theValue.setSec(sec.toUInt32());
+   }
+
+   return result;
+}
+
+void ossimDateProperty::valueToString(ossimString& valueResult)const
+{
+    std::ostringstream out;
+
+   out << std::setw(4)
+       << std::setfill('0')
+       << theValue.getYear()
+       << std::setw(2)
+       << std::setfill('0')
+       << theValue.getMonth()
+       << std::setw(2)
+       << std::setfill('0')
+       << theValue.getDay()
+       << std::setw(2)
+       << std::setfill('0')
+       << theValue.getHour()
+       << std::setw(2)
+       << std::setfill('0')
+       << theValue.getMin()
+       << std::setw(2)
+       << std::setfill('0')
+       << theValue.getSec();
+   
+   valueResult =  out.str();
+  
+}
+
+const ossimProperty& ossimDateProperty::assign(const ossimProperty& rhs)
+{
+   ossimProperty::assign(rhs);
+
+   ossimDateProperty* rhsPtr = PTR_CAST(ossimDateProperty, &rhs);
+
+   if(rhsPtr)
+   {
+      theValue = rhsPtr->theValue;
+   }
+   else
+   {
+      setValue(rhs.valueToString());
+   }
+
+   return *this;
+}
diff --git a/src/ossim/base/ossimDatum.cpp b/ossim/src/ossim/base/ossimDatum.cpp
similarity index 100%
rename from src/ossim/base/ossimDatum.cpp
rename to ossim/src/ossim/base/ossimDatum.cpp
diff --git a/ossim/src/ossim/base/ossimDatumFactory.cpp b/ossim/src/ossim/base/ossimDatumFactory.cpp
new file mode 100644
index 0000000..c63ce9a
--- /dev/null
+++ b/ossim/src/ossim/base/ossimDatumFactory.cpp
@@ -0,0 +1,363 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+// Description:
+//
+// This holds the class definition of DatumFactory.
+//*******************************************************************
+//  $Id: ossimDatumFactory.cpp 22851 2014-08-05 12:02:55Z gpotts $
+
+#include <ossim/base/ossimDatumFactory.h>
+#include <ossim/base/ossimEllipsoidFactory.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimThreeParamDatum.h>
+#include <ossim/base/ossimSevenParamDatum.h>
+#include <ossim/base/ossimWgs84Datum.h>
+#include <ossim/base/ossimWgs72Datum.h>
+#include <ossim/base/ossimNadconNarDatum.h>
+#include <ossim/base/ossimNadconNasDatum.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimPreferences.h>
+#include "ossimDatumFactory.inc"
+
+#include <cstring> /* for strlen */
+#include <utility> /* for std::make_pair */
+
+
+static ossimString WGE = "WGE";
+static ossimString WGD = "WGD";
+
+
+
+ossimDatumFactory::ossimDatumFactory()
+   :theWgs84Datum(0),
+    theWgs72Datum(0)
+{
+   // datum depends on the creation of an ellipsoid factory
+   // so make sure an instance exists
+   ossimEllipsoidFactory::instance();
+   initializeDefaults();
+   theWgs84Datum = create(WGE);
+   theWgs72Datum = create(WGD);
+
+}
+
+ossimDatumFactory::~ossimDatumFactory()
+{
+   deleteAll();
+}
+
+ossimDatumFactory* ossimDatumFactory::instance()
+{
+   static ossimDatumFactory inst;
+
+   return &inst; 
+} 
+
+const ossimDatum* ossimDatumFactory::create(const ossimString &code)const
+{
+   if ( code.size() )
+   {
+      std::map<std::string, const ossimDatum*>::const_iterator datum = theDatumTable.find(code);
+      
+      if(datum != theDatumTable.end())
+      {
+         return (*datum).second;
+      }
+
+      if(code == "NAR") // User did not set "datum_grids" so map to NAR-C.
+      {
+         datum = theDatumTable.find("NAR-C");
+         if(datum != theDatumTable.end())
+         {
+            return (*datum).second;
+         }
+      }
+      else if(code == "NAS") // User did not set "datum_grids" so map to NAS-C."
+      {
+         datum = theDatumTable.find("NAS-C");
+         if(datum != theDatumTable.end())
+         {
+            return (*datum).second;
+         }
+      }
+   }
+   
+   return 0;
+}
+
+const ossimDatum* ossimDatumFactory::create(const ossimKeywordlist& kwl, const char *prefix) const
+{
+   ossimString alpha_code = kwl.find(prefix, ossimKeywordNames::DATUM_KW);
+   if(!alpha_code.empty())
+      return create(alpha_code);
+   return 0;
+}
+
+const ossimDatum* ossimDatumFactory::create(const ossimDatum* aDatum)const
+{
+   if (aDatum)
+      return create (aDatum->code());
+   else
+      return 0;
+}
+
+std::vector<ossimString> ossimDatumFactory::getList()const
+{
+   std::map<std::string, const ossimDatum*>::const_iterator datum = theDatumTable.begin();
+   std::vector<ossimString> result;
+
+   while(datum != theDatumTable.end())
+   {
+      result.push_back(ossimString((*datum).first) );
+      ++datum;
+   }
+   return result;
+}
+
+void ossimDatumFactory::getList(std::vector<ossimString>& list) const
+{
+   std::map<std::string, const ossimDatum*>::const_iterator datum =
+      theDatumTable.begin();
+
+   while(datum != theDatumTable.end())
+   {
+      list.push_back( ossimString((*datum).first) );
+      ++datum;
+   }
+}
+
+void ossimDatumFactory::deleteAll()
+{   
+   std::map<std::string, const ossimDatum*>::iterator datum;
+
+   datum = theDatumTable.begin();
+   while(datum != theDatumTable.end())
+   {
+      delete ((*datum).second);
+      ++datum;
+   }
+
+   theDatumTable.clear();
+
+}
+
+void ossimDatumFactory::initializeDefaults()
+{
+   //make the standards
+   theDatumTable.insert(std::make_pair(WGE.string(), new ossimWgs84Datum));
+   theDatumTable.insert(std::make_pair(WGD.string(), new ossimWgs72Datum));
+
+   ossim_uint32 idx = 0;     
+   while( std::strlen(threeParamDatum[idx].theCode) )
+   {
+      if( (threeParamDatum[idx].theCode != WGE) &&
+          (threeParamDatum[idx].theCode != WGD) )
+      {
+         theDatumTable.insert(std::make_pair(std::string(threeParamDatum[idx].theCode), 
+            new ossimThreeParamDatum(threeParamDatum[idx].theCode, 
+            threeParamDatum[idx].theName,
+            ossimEllipsoidFactory::instance()->create(ossimString(threeParamDatum[idx].theEllipsoidCode)),
+            threeParamDatum[idx].theSigmaX, 
+            threeParamDatum[idx].theSigmaY, 
+            threeParamDatum[idx].theSigmaZ, 
+            threeParamDatum[idx].theWestLongitude, 
+            threeParamDatum[idx].theEastLongitude, 
+            threeParamDatum[idx].theSouthLatitude, 
+            threeParamDatum[idx].theNorthLatitude, 
+            threeParamDatum[idx].theParam1, 
+            threeParamDatum[idx].theParam2, 
+            threeParamDatum[idx].theParam3)));
+      }
+
+      ++idx;
+   }
+   idx = 0;
+   while( std::strlen(sevenParamDatum[idx].theCode) )
+   {
+      theDatumTable.insert(std::make_pair(std::string(sevenParamDatum[idx].theCode), 
+         new ossimSevenParamDatum(sevenParamDatum[idx].theCode, 
+         sevenParamDatum[idx].theName,
+         ossimEllipsoidFactory::instance()->create(ossimString(sevenParamDatum[idx].theEllipsoidCode)),
+         sevenParamDatum[idx].theSigmaX, 
+         sevenParamDatum[idx].theSigmaY, 
+         sevenParamDatum[idx].theSigmaZ, 
+         sevenParamDatum[idx].theWestLongitude, 
+         sevenParamDatum[idx].theEastLongitude, 
+         sevenParamDatum[idx].theSouthLatitude, 
+         sevenParamDatum[idx].theNorthLatitude,
+         sevenParamDatum[idx].theParam1,
+         sevenParamDatum[idx].theParam2, 
+         sevenParamDatum[idx].theParam3,
+         sevenParamDatum[idx].theParam4, 
+         sevenParamDatum[idx].theParam5,
+         sevenParamDatum[idx].theParam6, 
+         sevenParamDatum[idx].theParam7)));
+      ++idx;
+   }
+
+   // Fetch the HARN grid filenames and add these datums to the table:
+   ossimFilename file = ossimPreferences::instance()->findPreference("datum_grids");
+
+   if(file != "")
+   {
+      if(!file.isDir())
+      {
+         file = file.path();
+      }
+
+      ossimFilename fileTest1 = file.dirCat("conus.las");
+      ossimFilename fileTest2 = file.dirCat("conus.los");
+
+      if (fileTest1.exists() && fileTest2.exists())
+      {
+         theDatumTable.insert(std::make_pair(std::string("NAS"), new ossimNadconNasDatum(file)));
+         theDatumTable.insert(std::make_pair(std::string("NAR"), new ossimNadconNarDatum(file)));
+      }
+   }
+}
+
+void ossimDatumFactory::writeCStructure(const ossimFilename& /*file*/)
+{
+#if 0
+   std::ofstream out(file.c_str());
+
+   if(!out) return;
+
+   out << "typedef struct ossimSevenParamDatumType" << std::endl
+      << "{" << std::endl
+      << "   ossimString theCode;\n"
+      << "   ossimString theName;\n"
+      << "   ossimString theEllipsoidCode;\n"
+      << "   ossim_float64 theSigmaX;\n"
+      << "   ossim_float64 theSigmaY;\n"
+      << "   ossim_float64 theSigmaZ;\n"
+      << "   ossim_float64 theWestLongitude;\n"
+      << "   ossim_float64 theEastLongitude;\n"
+      << "   ossim_float64 theSouthLatitude;\n"
+      << "   ossim_float64 theNorthLatitude;\n"
+      << "   ossim_float64 theParam1;\n"
+      << "   ossim_float64 theParam2;\n"
+      << "   ossim_float64 theParam3;\n"
+      << "   ossim_float64 theParam4;\n"
+      << "   ossim_float64 theParam5;\n"
+      << "   ossim_float64 theParam6;\n"
+      << "   ossim_float64 theParam7;\n"
+      << "};\n";
+
+   out << "typedef struct ossimThreeParamDatumType" << std::endl
+      << "{" << std::endl
+      << "   ossimString theCode;\n"
+      << "   ossimString theName;\n"
+      << "   ossimString theEllipsoidCode;\n"
+      << "   ossim_float64 theSigmaX;\n"
+      << "   ossim_float64 theSigmaY;\n"
+      << "   ossim_float64 theSigmaZ;\n"
+      << "   ossim_float64 theWestLongitude;\n"
+      << "   ossim_float64 theEastLongitude;\n"
+      << "   ossim_float64 theSouthLatitude;\n"
+      << "   ossim_float64 theNorthLatitude;\n"
+      << "   ossim_float64 theParam1;\n"
+      << "   ossim_float64 theParam2;\n"
+      << "   ossim_float64 theParam3;\n"
+      << "};\n";
+   out << "#define NUMBER_OF_SEVEN_PARAM_DATUMS " << 2 << std::endl;
+   if(out)
+   {
+      std::map<std::string, const ossimDatum*>::iterator datum;
+      out << "static ossimThreeParamDatumType threeParamDatum[] = {\n";
+      datum = theDatumTable.begin();
+      ossim_uint32 datumCount = 0;
+      while(datum != theDatumTable.end())
+      {
+         bool written = false;
+         if( ((*datum).first != "NAS") &&
+            ((*datum).first != "NAR")&&
+            ((*datum).first != "EUR-7")&&
+            ((*datum).first != "OGB-7"))
+         {
+            written = true;
+            const ossimDatum* d = (*datum).second;
+
+            out << "{\"" << d->code() << "\", "
+               << "\"" << d->name() << "\", "
+               << "\"" << d->ellipsoid()->code() << "\", "
+               << d->sigmaX() << ", "
+               << d->sigmaY() << ", "
+               << d->sigmaZ() << ", "
+               << d->westLongitude()*DEG_PER_RAD << ", "
+               << d->eastLongitude()*DEG_PER_RAD << ", "
+               << d->southLatitude()*DEG_PER_RAD << ", "
+               << d->northLatitude()*DEG_PER_RAD << ", "
+               << d->param1() << ", " 
+               << d->param2() << ", " 
+               << d->param3() << "}";
+            ++datumCount;
+         }
+         ++datum;
+         if(datum != theDatumTable.end()&&written)
+         {
+
+            out << "," << std::endl;
+         }
+         else if(datum == theDatumTable.end())
+         {
+            out << std::endl;
+         }
+      }
+      out << "};" << std::endl;
+
+      out << "#define NUMBER_OF_THREE_PARAM_DATUMS " << datumCount << std::endl;
+      out << "static ossimSevenParamDatumType sevenParamDatum[] = {\n";
+      const ossimDatum* d = create("EUR-7");
+      if(d)
+      {
+         out << "{\"" << d->code() << "\", "
+            << "\"" << d->name() << "\", "
+            << "\"" << d->ellipsoid()->code() << "\", "
+            << d->sigmaX() << ", "
+            << d->sigmaY() << ", "
+            << d->sigmaZ() << ", "
+            << d->westLongitude()*DEG_PER_RAD << ", "
+            << d->eastLongitude()*DEG_PER_RAD << ", "
+            << d->southLatitude()*DEG_PER_RAD << ", "
+            << d->northLatitude()*DEG_PER_RAD << ", "
+            << d->param1() << ", " 
+            << d->param2() << ", " 
+            << d->param3() << ", "
+            << d->param4() << ", "
+            << d->param5() << ", "
+            << d->param6() << ", "
+            << d->param7() << "},\n";
+      }
+      d = create("OGB-7");
+      if(d)
+      {
+         out << "{\"" << d->code() << "\", "
+            << "\"" << d->name() << "\", "
+            << "\"" << d->ellipsoid()->code() << "\", "
+            << d->sigmaX() << ", "
+            << d->sigmaY() << ", "
+            << d->sigmaZ() << ", "
+            << d->westLongitude()*DEG_PER_RAD << ", "
+            << d->eastLongitude()*DEG_PER_RAD << ", "
+            << d->southLatitude()*DEG_PER_RAD << ", "
+            << d->northLatitude()*DEG_PER_RAD << ", "
+            << d->param1() << ", " 
+            << d->param2() << ", " 
+            << d->param3() << ", "
+            << d->param4() << ", "
+            << d->param5() << ", "
+            << d->param6() << ", "
+            << d->param7() << "}\n";
+      }
+      out << "};" << std::endl;
+   }
+#endif
+}
+
diff --git a/ossim/src/ossim/base/ossimDatumFactory.inc b/ossim/src/ossim/base/ossimDatumFactory.inc
new file mode 100644
index 0000000..65926de
--- /dev/null
+++ b/ossim/src/ossim/base/ossimDatumFactory.inc
@@ -0,0 +1,287 @@
+//*************************************************************************
+// MIT
+// 
+// Author:  Garrett Potts
+//
+//**************************************************************************
+// $Id: ossimDatumFactory.inc 23668 2015-12-14 20:11:00Z rashadkm $
+
+struct ossimSevenParamDatumType
+{
+   const char* theCode;
+   const char* theName;
+   const char* theEllipsoidCode;
+   ossim_float64 theSigmaX;
+   ossim_float64 theSigmaY;
+   ossim_float64 theSigmaZ;
+   ossim_float64 theWestLongitude;
+   ossim_float64 theEastLongitude;
+   ossim_float64 theSouthLatitude;
+   ossim_float64 theNorthLatitude;
+   ossim_float64 theParam1;
+   ossim_float64 theParam2;
+   ossim_float64 theParam3;
+   ossim_float64 theParam4;
+   ossim_float64 theParam5;
+   ossim_float64 theParam6;
+   ossim_float64 theParam7;
+};
+
+struct ossimThreeParamDatumType
+{
+public:
+   const char* theCode;
+   const char* theName;
+   const char* theEllipsoidCode;
+   ossim_float64 theSigmaX;
+   ossim_float64 theSigmaY;
+   ossim_float64 theSigmaZ;
+   ossim_float64 theWestLongitude;
+   ossim_float64 theEastLongitude;
+   ossim_float64 theSouthLatitude;
+   ossim_float64 theNorthLatitude;
+   ossim_float64 theParam1;
+   ossim_float64 theParam2;
+   ossim_float64 theParam3;
+};
+
+#define NUMBER_OF_SEVEN_PARAM_DATUMS 2
+#define NUMBER_OF_THREE_PARAM_DATUMS 226
+
+static ossimThreeParamDatumType threeParamDatum[] = {
+{"ADI-A", "ADINDAN, Ethiopia", "CD", 3, 3, 3, 26, 50, -3, 25, -165, -11, 206},
+{"ADI-B", "ADINDAN, Sudan", "CD", 3, 5, 3, 15, 45, -3, 31, -161, -14, 205},
+{"ADI-C", "ADINDAN, Mali", "CD", 25, 25, 25, -20, 11, 3, 31, -123, -20, 220},
+{"ADI-D", "ADINDAN, Senegal", "CD", 25, 25, 25, -24, -5, 5, 23, -128, -18, 224},
+{"ADI-E", "ADINDAN, Burkina Faso", "CD", 25, 25, 25, -5, 8, 4, 22, -118, -14, 218},
+{"ADI-F", "ADINDAN, Cameroon", "CD", 25, 25, 25, 3, 23, -4, 19, -134, -2, 210},
+{"ADI-M", "ADINDAN, Mean", "CD", 5, 5, 3, 15, 55, -5, 31, -166, -15, 204},
+{"AFG", "AFGOOYE, Somalia", "KA", 25, 25, 25, 35, 60, -8, 19, -43, -163, 45},
+{"AIA", "ANTIGUA ISLAND ASTRO 1943", "CD", 25, 25, 25, -65, -61, 16, 20, -270, 13, 62},
+{"AIN-A", "AIN EL ABD 1970, Bahrain", "IN", 25, 25, 25, 49, 53, 24, 28, -150, -250, -1},
+{"AIN-B", "AIN EL ABD 1970, Saudi Arabia", "IN", 10, 10, 10, 28, 62, 8, 38, -143, -236, 7},
+{"AMA", "AMERICAN SAMOA 1962", "CC", 25, 25, 25, -174, -165, -19, -9, -115, 118, 426},
+{"ANO", "ANNA 1 ASTRO 1965, Cocos Is.", "AN", 25, 25, 25, 94, 99, -14, -10, -491, -22, 435},
+{"ARF-A", "ARC 1950, Botswana", "CD", 3, 5, 3, 13, 36, -33, -13, -138, -105, -289},
+{"ARF-B", "ARC 1950, Lesotho", "CD", 3, 3, 8, 21, 35, -36, -23, -125, -108, -295},
+{"ARF-C", "ARC 1950, Malawi", "CD", 9, 24, 8, 26, 42, -21, -3, -161, -73, -317},
+{"ARF-D", "ARC 1950, Swaziland", "CD", 15, 15, 15, 25, 40, -33, -20, -134, -105, -295},
+{"ARF-E", "ARC 1950, Zaire", "CD", 25, 25, 25, 4, 38, -21, 10, -169, -19, -278},
+{"ARF-F", "ARC 1950, Zambia", "CD", 21, 21, 27, 15, 40, -24, -1, -147, -74, -283},
+{"ARF-G", "ARC 1950, Zimbabwe", "CD", 5, 8, 11, 19, 39, -29, -9, -142, -96, -293},
+{"ARF-H", "ARC 1950, Burundi", "CD", 20, 20, 20, 21, 37, -11, 4, -153, -5, -292},
+{"ARF-M", "ARC 1950, Mean", "CD", 20, 33, 20, 4, 42, -36, 10, -143, -90, -294},
+{"ARS-A", "ARC 1960, Kenya", "CD", 4, 3, 3, 28, 47, -11, 8, -157, -2, -299},
+{"ARS-B", "ARC 1960, Tanzania", "CD", 6, 9, 10, 23, 47, -18, 5, -175, -23, -303},
+{"ARS-M", "ARC 1960, Kenya & Tanzania", "CD", 20, 20, 20, 23, 47, -18, 8, -160, -6, -302},
+{"ASC", "ASCENSION ISLAND 1958", "IN", 25, 25, 25, -16, -13, -9, -6, -205, 107, 53},
+{"ASM", "MONTSERRAT ISLAND ASTRO 1958", "CD", 25, 25, 25, -64, -61, 15, 18, 174, 359, 365},
+{"ASQ", "ASTRO STATION 1952, Marcus Is.", "IN", 25, 25, 25, 152, 156, 22, 26, 124, -234, -25},
+{"ATF", "ASTRO BEACON E 1845, Iwo Jima", "IN", 25, 25, 25, 140, 144, 22, 26, 145, 75, -272},
+{"AUA", "AUSTRALIAN GEODETIC 1966", "AN", 3, 3, 3, 109, 161, -46, -4, -133, -48, 148},
+{"AUG", "AUSTRALIAN GEODETIC 1984", "AN", 2, 2, 2, 109, 161, -46, -4, -134, -48, 149},
+{"BAT", "DJAKARTA, INDONESIA", "BR", 3, 3, 3, 89, 146, -16, 11, -377, 681, -50},
+{"BER", "BERMUDA 1957, Bermuda Islands", "CC", 20, 20, 20, -66, -63, 31, 34, -73, 213, 296},
+{"BID", "BISSAU, Guinea-Bissau", "IN", 25, 25, 25, -23, -7, 5, 19, -173, 253, 27},
+{"BOO", "BOGOTA OBSERVATORY, Columbia", "IN", 6, 5, 6, -85, -61, -10, 16, 307, 304, -318},
+{"BUR", "BUKIT RIMPAH, Banka & Belitung", "BR", -1, -1, -1, 103, 110, -6, 0, -384, 664, -48},
+{"CAC", "CAPE CANAVERAL, Fla & Bahamas", "CC", 3, 3, 3, -94, -12, 15, 38, -2, 151, 181},
+{"CAI", "CAMPO INCHAUSPE 1969, Arg.", "IN", 5, 5, 5, -72, -51, -58, -27, -148, 136, 90},
+{"CAO", "CANTON ASTRO 1966, Phoenix Is.", "IN", 15, 15, 15, -180, -165, -13, 3, 298, -304, -375},
+{"CAP", "CAPE, South Africa", "CD", 3, 6, 6, 10, 40, -43, -15, -136, -108, -292},
+{"CAZ", "CAMP AREA ASTRO, Camp McMurdo", "IN", -1, -1, -1, 135, 180, -85, -70, -104, -129, 239},
+{"CCD", "S-JTSK, Czech Republic", "BR", 4, 2, 3, 6, 28, 43, 56, 589, 76, 480},
+{"CGE", "CARTHAGE, Tunisia", "CD", 6, 9, 8, 2, 18, 24, 43, -263, 6, 431},
+{"CHI", "CHATHAM ISLAND ASTRO 1971, NZ", "IN", 15, 15, 15, -180, -174, -46, -42, 175, -38, 113},
+{"CHU", "CHUA ASTRO, Paraguay", "IN", 6, 9, 5, -69, -49, -33, -14, -134, 229, -29},
+{"COA", "CORREGO ALEGRE, Brazil", "IN", 5, 3, 5, -80, -29, -39, -2, -206, 172, -6},
+{"DAL", "DABOLA, Guinea", "CD", 15, 15, 15, 12, 11, 1, 19, -83, 37, 124},
+{"DID", "DECEPTION ISLAND", "CD", 20, 20, 20, 58, 62, -65, -62, 260, 12, -147},
+{"DOB", "GUX 1 ASTRO, Guadalcanal Is.", "IN", 25, 25, 25, 158, 163, -12, -8, 252, -209, -751},
+{"EAS", "EASTER ISLAND 1967", "IN", 25, 25, 25, -111, -108, -29, -26, 211, 147, 111},
+{"ENW", "WAKE-ENIWETOK 1960", "HO", 3, 3, 3, 159, 175, 1, 16, 102, 52, -38},
+{"EST", "ESTONIA, 1937", "BR", 2, 3, 3, 16, 34, 52, 65, 374, 150, 588},
+{"EUR-A", "EUROPEAN 1950, Western Europe", "IN", 3, 3, 3, -15, 25, 30, 78, -87, -96, -120},
+{"EUR-B", "EUROPEAN 1950, Greece", "IN", 25, 25, 25, 14, 34, 30, 48, -84, -95, -130},
+{"EUR-C", "EUROPEAN 1950, Norway & Finland", "IN", 3, 5, 3, -2, 38, 52, 80, -87, -95, -120},
+{"EUR-D", "EUROPEAN 1950, Portugal & Spain", "IN", 5, 6, 3, -15, 10, 30, 49, -84, -107, -120},
+{"EUR-E", "EUROPEAN 1950, Cyprus", "IN", 15, 15, 15, 31, 36, 33, 37, -104, -101, -140},
+{"EUR-F", "EUROPEAN 1950, Egypt", "IN", 6, 8, 8, 19, 42, 16, 38, -130, -117, -151},
+{"EUR-G", "EUROPEAN 1950, England, Channel", "IN", 3, 3, 3, -10, 3, 48, 62, -86, -96, -120},
+{"EUR-H", "EUROPEAN 1950, Iran", "IN", 9, 12, 11, 37, 69, 19, 47, -117, -132, -164},
+{"EUR-I", "EUROPEAN 1950, Sardinia(Italy)", "IN", 25, 25, 25, 6, 12, 37, 43, -97, -103, -120},
+{"EUR-J", "EUROPEAN 1950, Sicily(Italy)", "IN", 20, 20, 20, 10, 17, 35, 40, -97, -88, -135},
+{"EUR-K", "EUROPEAN 1950, England, Ireland", "IN", 3, 3, 3, -12, 3, 48, 62, -86, -96, -120},
+{"EUR-L", "EUROPEAN 1950, Malta", "IN", 25, 25, 25, 12, 16, 34, 38, -107, -88, -149},
+{"EUR-M", "EUROPEAN 1950, Mean (3 Param)", "IN", 3, 8, 5, 5, 33, 30, 80, -87, -98, -121},
+{"EUR-S", "EUROPEAN 1950, Iraq, Israel", "IN", -1, -1, -1, 36, 57, -38, -4, -103, -106, -141},
+{"EUR-T", "EUROPEAN 1950, Tunisia", "IN", 25, 25, 25, 2, 18, 24, 43, -112, -77, -145},
+{"EUS", "EUROPEAN 1979", "IN", 3, 3, 3, -15, 24, 30, 80, -86, -98, -119},
+{"FAH", "OMAN", "CD", 3, 3, 9, 46, 65, 10, 32, -346, -1, 224},
+{"FLO", "OBSERVATORIO MET. 1939, Flores", "IN", 20, 20, 20, -33, -30, 38, 41, -425, -169, 81},
+{"FOT", "FORT THOMAS 1955, Leeward Is.", "CD", 25, 25, 25, -64, -61, 16, 19, -7, 215, 225},
+{"GAA", "GAN 1970, Rep. of Maldives", "IN", 25, 25, 25, 71, 75, -2, 9, -133, -321, 50},
+{"GEO", "GEODETIC DATUM 1949, NZ", "IN", 5, 3, 5, 165, 180, -48, -33, 84, -22, 209},
+{"GIZ", "DOS 1968, Gizo Island", "IN", 25, 25, 25, 155, 158, -10, -7, 230, -199, -752},
+{"GRA", "GRACIOSA BASE SW 1948, Azores", "IN", 3, 3, 3, -30, -26, 37, 41, -104, 167, -38},
+{"GSE", "GUNUNG SEGARA, Indonesia", "BR", -1, -1, -1, 106, 121, -6, 9, -403, 684, 41},
+{"GUA", "GUAM 1963", "CC", 3, 3, 3, 143, 146, 12, 15, -100, -248, 259},
+{"HEN", "HERAT NORTH, Afghanistan", "IN", -1, -1, -1, 55, 81, 23, 44, -333, -222, 114},
+{"HER", "HERMANNSKOGEL, old Yugoslavia", "BR", -1, -1, -1, 7, 29, 35, 52, 682, -203, 480},
+{"HIT", "PROVISIONAL SOUTH CHILEAN 1963", "IN", 25, 25, 25, -83, -60, -64, -25, 16, 196, 93},
+{"HJO", "HJORSEY 1955, Iceland", "IN", 3, 3, 6, -24, -11, 61, 69, -73, 46, -86},
+{"HKD", "HONG KONG 1963", "IN", 25, 25, 25, 112, 116, 21, 24, -156, -271, -189},
+{"HTN", "HU-TZU-SHAN, Taiwan", "IN", 15, 15, 15, 117, 124, 20, 28, -637, -549, -203},
+{"IBE", "BELLEVUE (IGN), Efate Is.", "IN", 20, 20, 20, 167, 171, -20, -16, -127, -769, 472},
+{"IDN", "INDONESIAN 1974", "ID", 25, 25, 25, 89, 146, -16, 11, -24, -15, 5},
+{"IND-B", "INDIAN, Bangladesh", "EA", 10, 8, 12, 80, 100, 15, 33, 282, 726, 254},
+{"IND-I", "INDIAN, India & Nepal", "EC", 12, 10, 15, 62, 105, 2, 44, 295, 736, 257},
+{"IND-P", "INDIAN, Pakistan", "EA", -1, -1, -1, 55, 81, 17, 44, 283, 682, 231},
+{"INF-A", "INDIAN 1954, Thailand", "EA", 15, 6, 12, 91, 111, 0, 27, 217, 823, 299},
+{"ING-A", "INDIAN 1960, Vietnam 16N", "EA", 25, 25, 25, 101, 115, 11, 23, 198, 881, 317},
+{"ING-B", "INDIAN 1960, Con Son Island", "EA", 25, 25, 25, 104, 109, 6, 11, 182, 915, 344},
+{"INH-A", "INDIAN 1975, Thailand", "EA", 12, 10, 12, 91, 111, 0, 27, 209, 818, 290},
+{"INH-A1", "INDIAN 1975, Thailand", "EA", 3, 2, 3, 91, 111, 0, 27, 210, 814, 289},
+{"IRL", "IRELAND 1965", "AM", 3, 3, 3, -12, -4, 50, 57, 506, -122, 611},
+{"ISG", "ISTS 061 ASTRO 1968, S Georgia", "IN", 25, 25, 25, -38, -34, -56, -52, -794, 119, -298},
+{"IST", "ISTS 073 ASTRO 1969, Diego Garc", "IN", 25, 25, 25, 69, 75, -10, -4, 208, -435, -229},
+{"JOH", "JOHNSTON ISLAND 1961", "IN", 25, 25, 25, -76, -73, -46, -43, 189, -79, -202},
+{"KAN", "KANDAWALA, Sri Lanka", "EA", 20, 20, 20, 77, 85, 4, 12, -97, 787, 86},
+{"KEA", "KERTAU 1948, W Malaysia & Sing.", "EE", 10, 8, 6, 94, 112, -5, 12, -11, 851, 5},
+{"KEG", "KERGUELEN ISLAND 1949", "IN", 25, 25, 25, 139, 180, -81, -74, 145, -187, 103},
+{"KUS", "KUSAIE ASTRO 1951, Caroline Is.", "IN", 25, 25, 25, 134, 167, -1, 12, 647, 1777, -1124},
+{"LCF", "L.C. 5 ASTRO 1961, Cayman Brac", "CC", 25, 25, 25, -81, -78, 18, 21, 42, 124, 147},
+{"LEH", "LEIGON, Ghana", "CD", 2, 3, 2, -9, 7, -1, 17, -130, 29, 364},
+{"LIB", "LIBERIA 1964", "CD", 15, 15, 15, -17, -1, -1, 14, -90, 40, 88},
+{"LUZ-A", "LUZON, Phillipines", "CC", 8, 11, 9, 115, 128, 3, 23, -133, -77, -51},
+{"LUZ-B", "LUZON, Mindanao Island", "CC", 25, 25, 25, 120, 128, 4, 12, -133, -79, -72},
+{"MAS", "MASSAWA, Ethiopia", "BR", 25, 25, 25, 37, 53, 7, 25, 639, 405, 60},
+{"MER", "MERCHICH, Morocco", "CD", 5, 3, 3, -19, 5, 22, 42, 31, 146, 47},
+{"MID", "MIDWAY ASTRO 1961, Midway Is.", "IN", 25, 25, 25, -180, -169, 25, 30, 912, -58, 1227},
+{"MIK", "MAHE 1971, Mahe Is.", "CD", 25, 25, 25, 54, 57, -6, -3, 41, -220, -134},
+{"MIN-A", "MINNA, Cameroon", "CD", 25, 25, 25, 3, 23, -4, 19, -81, -84, 115},
+{"MIN-B", "MINNA, Nigeria", "CD", 3, 6, 5, -4, 20, -1, 21, -92, -93, 122},
+{"MOD", "ROME 1940, Sardinia", "IN", 25, 25, 25, 6, 12, 37, 43, -225, -65, 9},
+{"MPO", "M'PORALOKO, Gabon", "CD", 25, 25, 25, 3, 20, -10, 8, -74, -130, 42},
+{"MVS", "VITI LEVU 1916, Viti Levu Is.", "CD", 25, 25, 25, 176, 180, -20, -16, 51, 391, -36},
+{"NAH-A", "NAHRWAN, Masirah Island (Oman)", "CD", 25, 25, 25, 57, 60, 19, 22, -247, -148, 369},
+{"NAH-B", "NAHRWAN, United Arab Emirates", "CD", 25, 25, 25, 45, 62, 17, 32, -249, -156, 381},
+{"NAH-C", "NAHRWAN, Saudi Arabia", "CD", 25, 25, 20, 28, 62, 8, 38, -243, -192, 477},
+{"NAP", "NAPARIMA, Trinidad & Tobago", "IN", 15, 15, 15, -64, -59, 8, 13, -10, 375, 165},
+{"NAR-A", "NORTH AMERICAN 1983, Alaska", "RF", 2, 2, 2, -175, -135, 48, 78, 0, 0, 0},
+{"NAR-B", "NORTH AMERICAN 1983, Canada", "RF", 2, 2, 2, -150, -50, 36, 90, 0, 0, 0},
+{"NAR-C", "NORTH AMERICAN 1983, CONUS", "RF", 2, 2, 2, -135, -60, 15, 60, 0, 0, 0},
+{"NAR-D", "NORTH AMERICAN 1983, Mexico", "RF", 2, 2, 2, -122, -72, 11, 35, 0, 0, 0},
+{"NAR-E", "NORTH AMERICAN 1983, Aleutian", "RF", 5, 2, 5, -180, 180, 51, 74, -2, 0, 4},
+{"NAR-H", "NORTH AMERICAN 1983, Hawai'i", "RF", 2, 2, 2, -164, -153, 17, 24, 1, 1, -1},
+{"NAS-A", "NORTH AMERICAN 1927, Eastern US", "CC", 5, 5, 8, -102, -60, 18, 55, -9, 161, 179},
+{"NAS-B", "NORTH AMERICAN 1927, Western US", "CC", 5, 3, 3, -132, -87, 19, 55, -8, 159, 175},
+{"NAS-C", "NORTH AMERICAN 1927, CONUS", "CC", 5, 5, 6, -135, -60, 15, 60, -8, 160, 176},
+{"NAS-D", "NORTH AMERICAN 1927, Alaska", "CC", 5, 9, 5, -175, -130, 47, 78, -5, 135, 172},
+{"NAS-E", "NORTH AMERICAN 1927, Canada", "CC", 15, 11, 6, -150, -50, 36, 90, -10, 158, 187},
+{"NAS-F", "NORTH AMERICAN 1927, Alberta/BC", "CC", 8, 8, 6, -145, -105, 43, 65, -7, 162, 188},
+{"NAS-G", "NORTH AMERICAN 1927, E. Canada", "CC", 6, 6, 3, -85, -45, 38, 68, -22, 160, 190},
+{"NAS-H", "NORTH AMERICAN 1927, Man/Ont", "CC", 9, 5, 5, -108, -69, 36, 63, -9, 157, 184},
+{"NAS-I", "NORTH AMERICAN 1927, NW Terr.", "CC", 5, 5, 3, -144, -55, 43, 90, 4, 159, 188},
+{"NAS-J", "NORTH AMERICAN 1927, Yukon", "CC", 5, 8, 3, -147, -117, 53, 75, -7, 139, 181},
+{"NAS-L", "NORTH AMERICAN 1927, Mexico", "CC", 8, 6, 6, -122, -80, 10, 38, -12, 130, 190},
+{"NAS-N", "NORTH AMERICAN 1927, C. America", "CC", 8, 3, 5, -98, -77, 3, 25, 0, 125, 194},
+{"NAS-O", "NORTH AMERICAN 1927, Canal Zone", "CC", 20, 20, 20, -86, -74, 3, 15, 0, 125, 201},
+{"NAS-P", "NORTH AMERICAN 1927, Caribbean", "CC", 3, 9, 12, -87, -58, 8, 29, -3, 142, 183},
+{"NAS-Q", "NORTH AMERICAN 1927, Bahamas", "CC", 5, 3, 5, -83, -71, 19, 29, -4, 154, 178},
+{"NAS-R", "NORTH AMERICAN 1927, San Salv.", "CC", 25, 25, 25, -75, -74, 23, 26, 1, 140, 165},
+{"NAS-T", "NORTH AMERICAN 1927, Cuba", "CC", 25, 25, 25, -87, -72, 18, 25, -9, 152, 178},
+{"NAS-U", "NORTH AMERICAN 1927, Greenland", "CC", 25, 25, 25, 74, 56, 74, 81, 11, 114, 195},
+{"NAS-V", "NORTH AMERICAN 1927, Aleutian E", "CC", 6, 8, 10, -180, -161, 50, 58, -2, 152, 149},
+{"NAS-W", "NORTH AMERICAN 1927, Aleutian W", "CC", 10, 10, 10, 169, 180, 50, 58, 2, 204, 105},
+{"NSD", "NORTH SAHARA 1959, Algeria", "CD", 25, 25, 25, -15, 11, 13, 43, -186, -93, 310},
+{"NTF", "NOUVELLE TRIANGULATION DE LA FRANCE, FRANCE", "CE", 0, 0, 0, -6, 12, 41, 51, -168, -60, 320},
+{"OEG", "OLD EGYPTIAN 1907", "HE", 3, 6, 8, 19, 42, 16, 38, -130, 110, -13},
+{"OGB-A", "ORDNANCE GB 1936, England", "AA", 5, 5, 6, -12, 7, 44, 61, 371, -112, 434},
+{"OGB-B", "ORDNANCE GB 1936, Eng., Wales", "AA", 10, 10, 15, -12, 7, 44, 61, 371, -111, 434},
+{"OGB-C", "ORDNANCE GB 1936, Scotland", "AA", 10, 10, 10, -14, 4, 49, 66, 384, -111, 425},
+{"OGB-D", "ORDNANCE GB 1936, Wales", "AA", 20, 20, 20, -11, 3, 46, 59, 370, -108, 434},
+{"OGB-M", "ORDNANCE GB 1936, Mean (3 Para)", "AA", 10, 10, 15, -14, 7, 44, 66, 375, -111, 431},
+{"OHA-A", "OLD HAWAI'IAN (CC), Hawai'i", "CC", 25, 25, 25, -158, -153, 17, 22, 89, -279, -183},
+{"OHA-B", "OLD HAWAI'IAN (CC), Kauai", "CC", 20, 20, 20, -161, -158, 20, 24, 45, -290, -172},
+{"OHA-C", "OLD HAWAI'IAN (CC), Maui", "CC", 25, 25, 25, -158, -154, 19, 23, 65, -290, -190},
+{"OHA-D", "OLD HAWAI'IAN (CC), Oahu", "CC", 10, 6, 6, -160, -156, 20, 23, 58, -283, -182},
+{"OHA-M", "OLD HAWAI'IAN (CC), Mean", "CC", 25, 20, 20, -164, -153, 17, 24, 61, -285, -181},
+{"OHI-A", "OLD HAWAI'IAN (IN), Hawai'i", "IN", 25, 25, 25, -158, -153, 17, 22, 229, -222, -348},
+{"OHI-B", "OLD HAWAI'IAN (IN), Kauai", "IN", 20, 20, 20, -161, -158, 20, 24, 185, -233, -337},
+{"OHI-C", "OLD HAWAI'IAN (IN), Maui", "IN", 25, 25, 25, -158, -154, 19, 23, 205, -233, -355},
+{"OHI-D", "OLD HAWAI'IAN (IN), Oahu", "IN", 10, 6, 6, -160, -156, 20, 23, 198, -226, -347},
+{"OHI-M", "OLD HAWAI'IAN (IN), Mean", "IN", 25, 20, 20, -164, -153, 17, 24, 201, -228, -346},
+{"PHA", "AYABELLA LIGHTHOUSE, Bjibouti", "CD", 25, 25, 25, 36, 49, 5, 20, -79, -129, 145},
+{"PIT", "PITCAIRN ASTRO 1967", "IN", 25, 25, 25, -134, -119, -27, -21, 185, 165, 42},
+{"PLN", "PICO DE LAS NIEVES, Canary Is.", "IN", 25, 25, 25, -20, -12, 26, 31, -307, -92, 127},
+{"POS", "PORTO SANTO 1936, Madeira Is.", "IN", 25, 25, 25, -18, -15, 31, 35, -499, -249, 314},
+{"PRP-A", "PROV. S AMERICAN 1956, Bolivia", "IN", 5, 11, 14, -75, -51, -28, -4, -270, 188, -388},
+{"PRP-B", "PROV. S AMERICAN 1956, N Chile", "IN", 25, 25, 25, -83, -60, -45, -12, -270, 183, -390},
+{"PRP-C", "PROV. S AMERICAN 1956, S Chile", "IN", 20, 20, 20, -83, -60, -64, -20, -305, 243, -442},
+{"PRP-D", "PROV. S AMERICAN 1956, Colombia", "IN", 15, 15, 15, -85, -61, -10, 16, -282, 169, -371},
+{"PRP-E", "PROV. S AMERICAN 1956, Ecuador", "IN", 3, 5, 3, -85, -70, -11, 7, -278, 171, -367},
+{"PRP-F", "PROV. S AMERICAN 1956, Guyana", "IN", 6, 14, 5, -67, -51, -4, 14, -298, 159, -369},
+{"PRP-G", "PROV. S AMERICAN 1956, Peru", "IN", 6, 8, 12, -87, -63, -24, 5, -279, 175, -379},
+{"PRP-H", "PROV. S AMERICAN 1956, Venez", "IN", 9, 14, 15, -79, -54, -5, 18, -295, 173, -371},
+{"PRP-M", "PROV. S AMERICAN 1956, Mean", "IN", 17, 27, 27, -87, -51, -64, 18, -288, 175, -376},
+{"PTB", "POINT 58, Burkina Faso & Niger", "CD", 25, 25, 25, -15, 25, 0, 10, -106, -129, 165},
+{"PTN", "POINT NOIRE 1948", "CD", 25, 25, 25, 5, 25, -11, 10, -148, 51, -291},
+{"PUK", "PULKOVO 1942, Russia", "KA", -1, -1, -1, -180, 180, 36, 89, 28, -130, -95},
+{"PUR", "PUERTO RICO & Virgin Is.", "CC", 3, 3, 3, -69, -63, 16, 20, 11, 72, -101},
+{"QAT", "QATAR NATIONAL", "IN", 20, 20, 20, 45, 57, 19, 32, -128, -283, 22},
+{"QUO", "QORNOQ, South Greenland", "IN", 25, 25, 32, -77, -7, 57, 85, 164, 138, -189},
+{"REU", "REUNION, Mascarene Is.", "IN", 25, 25, 25, 47, 65, -27, -12, 94, -948, -1262},
+{"SAE", "SANTO (DOS) 1965", "IN", 22, 25, 25, 160, 169, -17, -13, 170, 42, 84},
+{"SAN-A", "SOUTH AMERICAN 1969, Argentina", "SA", 5, 5, 5, -76, -47, -62, -23, -62, -1, -37},
+{"SAN-B", "SOUTH AMERICAN 1969, Bolivia", "SA", 15, 15, 15, -75, -51, -28, -4, -61, 2, -48},
+{"SAN-C", "SOUTH AMERICAN 1969, Brazil", "SA", 3, 5, 5, -80, -29, -39, -2, -60, -2, -41},
+{"SAN-D", "SOUTH AMERICAN 1969, Chile", "SA", 15, 8, 11, -83, -60, -64, -12, -75, -1, -44},
+{"SAN-E", "SOUTH AMERICAN 1969, Colombia", "SA", 6, 6, 5, -85, -61, -10, 16, -44, 6, -36},
+{"SAN-F", "SOUTH AMERICAN 1969, Ecuador", "SA", 3, 3, 3, -85, -70, -11, 7, -48, 3, -44},
+{"SAN-G", "SOUTH AMERICAN 1969, Guyana", "SA", 9, 5, 5, -67, -51, -4, 14, -53, 3, -47},
+{"SAN-H", "SOUTH AMERICAN 1969, Paraguay", "SA", 15, 15, 15, -69, -49, -33, -14, -61, 2, -33},
+{"SAN-I", "SOUTH AMERICAN 1969, Peru", "SA", 5, 5, 5, -87, -63, -24, 5, -58, 0, -44},
+{"SAN-J", "SOUTH AMERICAN 1969, Baltra", "SA", 25, 25, 25, -92, -89, -2, 1, -47, 26, -42},
+{"SAN-K", "SOUTH AMERICAN 1969, Trinidad", "SA", 25, 25, 25, -68, -55, 4, 17, -45, 12, -33},
+{"SAN-L", "SOUTH AMERICAN 1969, Venezuela", "SA", 3, 6, 3, -79, -54, -5, 18, -45, 8, -33},
+{"SAN-M", "SOUTH AMERICAN 1969, Mean", "SA", 15, 6, 9, -90, -25, -65, -50, -57, 1, -41},
+{"SAO", "SAO BRAZ, Santa Maria Is.", "IN", 25, 25, 25, -27, -23, 35, 39, -203, 141, 53},
+{"SAP", "SAPPER HILL 1943, E Falkland Is", "IN", 1, 1, 1, -61, -56, -54, -50, -355, 21, 72},
+{"SCK", "SCHWARZECK, Namibia", "BN", 20, 20, 20, 5, 31, -35, -11, 616, 97, -251},
+{"SGM", "SELVAGEM GRADE 1938, Salvage Is", "IN", 25, 25, 25, -18, -14, 28, 32, -289, -124, 60},
+{"SHB", "ASTRO DOS 71/4, St. Helena Is.", "IN", 25, 25, 25, -7, -4, -18, -14, -320, 550, -494},
+{"SOA", "SOUTH ASIA, Singapore", "FA", 25, 25, 25, 102, 106, 0, 3, 7, -10, -26},
+{"SPK-A", "S-42 (PULKOVO 1942), Hungary", "KA", 2, 2, 2, 11, 29, 40, 54, 28, -121, -77},
+{"SPK-B", "S-42 (PULKOVO 1942), Poland", "KA", 4, 2, 4, 8, 30, 43, 60, 23, -124, -82},
+{"SPK-C", "S-42 (PK42) Former Czechoslov.", "KA", 3, 3, 2, 6, 28, 42, 57, 26, -121, -78},
+{"SPK-D", "S-42 (PULKOVO 1942), Latvia", "KA", 2, 2, 2, 15, 34, 50, 64, 24, -124, -82},
+{"SPK-E", "S-42 (PK 1942), Kazakhstan", "KA", 25, 25, 25, 41, 93, 35, 62, 15, -130, -84},
+{"SPK-F", "S-42 (PULKOVO 1942), Albania", "KA", 3, 3, 3, 14, 26, 34, 48, 24, -130, -92},
+{"SPK-G", "S-42 (PULKOVO 1942), Romania", "KA", 3, 5, 3, 15, 35, 38, 54, 28, -121, -77},
+{"SRL", "SIERRA LEONE 1960", "CD", 15, 15, 15, -19, -4, 1, 16, -88, 4, 101},
+{"TAN", "TANANARIVE OBSERVATORY 1925", "IN", -1, -1, -1, 40, 53, -34, -8, -189, -242, -91},
+{"TDC", "TRISTAN ASTRO 1968", "IN", 25, 25, 25, -14, -11, -39, -36, -632, 438, -609},
+{"TIL", "TIMBALAI 1948, Brunei & E Malay", "EA", 10, 10, 12, 101, 125, -5, 15, -679, 669, -48},
+{"TOY-A", "TOKYO, Japan", "BR", 8, 5, 8, 119, 156, 19, 51, -148, 507, 685},
+{"TOY-B", "TOKYO, South Korea", "BR", 8, 5, 8, 120, 139, 27, 45, -146, 507, 687},
+{"TOY-B1", "TOKYO, South Korea", "BR", 2, 2, 2, 120, 139, 27, 45, -147, 506, 687},
+{"TOY-C", "TOKYO, Okinawa", "BR", 20, 5, 20, 119, 134, 19, 31, -158, 507, 676},
+{"TOY-M", "TOKYO, Mean", "BR", 20, 5, 20, 120, 155, 23, 53, -148, 507, 685},
+{"TRN", "ASTRO TERN ISLAND (FRIG) 1961", "IN", 25, 25, 25, -166, -166, 22, 26, 114, -116, -333},
+{"VOI", "VOIROL 1874, Algeria", "CD", -1, -1, -1, -15, 11, 13, 43, -73, -247, 227},
+{"VOR", "VOIROL 1960, Algeria", "CD", 25, 25, 25, -15, 11, 13, 43, -123, -206, 219},
+{"WAK", "WAKE ISLAND ASTRO 1952", "IN", 25, 25, 25, -176, -171, 17, 21, 276, -57, 149},
+{"WGD", "World Geodetic System 1972", "WD", 0, 0, 0, -180.0, 180.0, -90, 90, 0, 0, 0},
+{"WGE", "World Geodetic System 1984", "WE", 0, 0, 0, -180.0, 180.0, -90, 90, 0, 0, 0},
+{"YAC", "YACARE, Uruguay", "IN", -1, -1, -1, -65, -47, -40, -25, -155, 171, 37},
+{"ZAN", "ZANDERIJ, Suriname", "IN", 5, 5, 8, -76, -47, -10, 20, -265, 120, -358},
+{"6055", "Popular Visualisation", "7059", 0, 0, 0, -180.0, 180.0, -85, 85, 0, 0, 0},
+{"", "", "", 0, 0, 0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0}
+};
+
+static ossimSevenParamDatumType sevenParamDatum[] = {
+{"EUR-7", "EUROPEAN 1950, Mean (7 Param)", "IN", 0, 0, 0, -180, 180, -90, 90, -102, -102, -129, 2.00228e-06, -8.92057e-07, 1.86653e-06, 2.4664e-06},
+{"OGB-7", "ORDNANCE GB 1936, Mean (7 Para)", "AA", 0, 0, 0, -180, 180, -90, 90, 446, -99, 544, -4.58149e-06, -1.26536e-06, -2.10894e-06, -2.08927e-05},
+{"", "", "", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+};
diff --git a/ossim/src/ossim/base/ossimDatumFactoryRegistry.cpp b/ossim/src/ossim/base/ossimDatumFactoryRegistry.cpp
new file mode 100644
index 0000000..2b3c6e2
--- /dev/null
+++ b/ossim/src/ossim/base/ossimDatumFactoryRegistry.cpp
@@ -0,0 +1,98 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file
+//
+// Author:  David Burken
+//
+// Description: Class definition of Registry (singleton) for datum factories.
+//
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/base/ossimDatumFactoryRegistry.h>
+#include <ossim/base/ossimDatumFactory.h>
+#include <ossim/base/ossimEpsgDatumFactory.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimString.h>
+
+//ossimDatumFactoryRegistry* ossimDatumFactoryRegistry::theInstance = 0;
+
+ossimDatumFactoryRegistry::~ossimDatumFactoryRegistry()
+{
+}
+
+ossimDatumFactoryRegistry* ossimDatumFactoryRegistry::instance()
+{
+   static ossimDatumFactoryRegistry inst;
+
+   return &inst;
+   //if (!theInstance)
+   //{
+   //   theInstance =  new ossimDatumFactoryRegistry;
+  // }
+  // return theInstance;
+}
+
+void ossimDatumFactoryRegistry::registerFactory(
+   ossimDatumFactoryInterface* factory)
+{
+   if (factory)
+   {
+      theFactoryList.push_back(factory);
+   }
+}
+
+const ossimDatum* ossimDatumFactoryRegistry::create(
+   const ossimString &code)const
+{
+   const ossimDatum* result = 0;
+
+   std::vector<ossimDatumFactoryInterface*>::const_iterator i =
+      theFactoryList.begin();
+
+   while (i != theFactoryList.end())
+   {
+      result = (*i)->create(code);
+      if (result)
+      {
+         break;
+      }
+      ++i; // go to next factory
+   }
+   return result;
+}
+
+const ossimDatum* ossimDatumFactoryRegistry::create(const ossimKeywordlist& kwl, 
+                                                    const char *prefix)const
+{
+   const ossimDatum* result = 0;
+   std::vector<ossimDatumFactoryInterface*>::const_iterator i = theFactoryList.begin();
+
+   while (i != theFactoryList.end())
+   {
+      result = (*i)->create(kwl, prefix);
+      if (result)
+         return result;
+
+      ++i; // go to next factory
+   }
+   return result;
+}
+
+void ossimDatumFactoryRegistry::getList(std::vector<ossimString>& list) const
+{
+   std::vector<ossimDatumFactoryInterface*>::const_iterator i =
+      theFactoryList.begin();
+   while (i != theFactoryList.end())
+   {
+      (*i)->getList(list);
+      ++i;
+   }
+}
+
+ossimDatumFactoryRegistry::ossimDatumFactoryRegistry()
+   : theFactoryList()
+{
+   registerFactory(ossimDatumFactory::instance());
+   registerFactory(ossimEpsgDatumFactory::instance());
+}
diff --git a/ossim/src/ossim/base/ossimDblGrid.cpp b/ossim/src/ossim/base/ossimDblGrid.cpp
new file mode 100644
index 0000000..2d973b1
--- /dev/null
+++ b/ossim/src/ossim/base/ossimDblGrid.cpp
@@ -0,0 +1,1225 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// AUTHOR:  Oscar Kramer (okramer at imagelinks.com)
+//
+// DESCRIPTION:
+//   Contains implementation of class ossimDblGrid. This class maintains
+//   a regular grid of floating point (double) values. Access methods to the
+//   grid include interpolation between grid nodes. Capability is included
+//   to address the grid in an arbitrary, floating-point x, y coordinate
+//   system. 
+//
+//*****************************************************************************
+//  $Id: ossimDblGrid.cpp 23329 2015-05-27 14:24:19Z dburken $
+
+#include <ossim/base/ossimDblGrid.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimTrace.h>
+
+#include <climits>
+#include <cstring>
+#include <iostream>
+#include <vector>
+using namespace std;
+
+//***
+// Define Trace flags for use within this file:
+//***
+static ossimTrace traceExec  ("ossimDblGrid:exec");
+static ossimTrace traceDebug ("ossimDblGrid:debug");
+
+static const ossimString MAGIC_NUMBER ("OSSIM_DBL_GRID");
+static const int   MAX_LENGTH_DESCR = 80;
+
+/*!****************************************************************************
+*  DEFAULT CONSTRUCTOR: ossimDblGrid
+*  
+*****************************************************************************/
+ossimDblGrid::ossimDblGrid()
+:
+theGridData       (0),
+theSize           (0, 0),
+theOrigin         (0.0, 0.0),
+theSpacing        (0.0, 0.0),
+theMinValue       (OSSIM_DEFAULT_MIN_PIX_DOUBLE),
+theMaxValue       (OSSIM_DEFAULT_MAX_PIX_DOUBLE),
+theNullValue      (OSSIM_DEFAULT_NULL_PIX_DOUBLE),
+theMeanIsComputed (false),
+theExtrapIsEnabled (true),
+theDomainType     (CONTINUOUS)
+{ }
+
+
+/*!****************************************************************************
+*  COPY CONSTRUCTOR: ossimDblGrid
+*  
+*****************************************************************************/
+ossimDblGrid::ossimDblGrid(const ossimDblGrid&  source)
+:
+theGridData   (0),
+theMinValue   (OSSIM_DEFAULT_MIN_PIX_DOUBLE),
+theMaxValue   (OSSIM_DEFAULT_MAX_PIX_DOUBLE),
+theExtrapIsEnabled (true),
+theDomainType (CONTINUOUS)
+{
+   static const char MODULE[] = "ossimDblGrid Constructor";
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering...\n";
+
+   *this = source;
+   /*!
+   * Allocate mem for the grid, and initialize:
+   */
+   //    int buflen = theSize.x * theSize.y;
+   //    theGridData = new double [buflen];
+
+   //    for (int i=0; i<buflen; i++)
+   //       theGridData[i] = source.theGridData[i];
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";
+}
+
+/*!****************************************************************************
+*  CONSTRUCTOR: ossimDblGrid
+*  
+*****************************************************************************/
+ossimDblGrid::ossimDblGrid(const ossimIpt&  size, 
+                           const ossimDpt&  origin,
+                           const ossimDpt&  spacing,
+                           double           null_value)
+                           :
+theGridData   (0),
+theMinValue   (OSSIM_DEFAULT_MIN_PIX_DOUBLE),
+theMaxValue   (OSSIM_DEFAULT_MAX_PIX_DOUBLE),
+theExtrapIsEnabled (true),
+theDomainType (CONTINUOUS)
+{
+   static const char MODULE[] = "ossimDblGrid Constructor";
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering...\n";
+
+   initialize(size, origin, spacing, null_value);
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";
+}
+
+/*!****************************************************************************
+*  CONSTRUCTOR: ossimDblGrid
+*  
+*****************************************************************************/
+ossimDblGrid::ossimDblGrid(const ossimDrect&  rect, 
+                           const ossimDpt&    spacing,
+                           double             null_value)
+                           :
+theGridData   (0),
+theMinValue   (OSSIM_DEFAULT_MIN_PIX_DOUBLE),
+theMaxValue   (OSSIM_DEFAULT_MAX_PIX_DOUBLE),
+theExtrapIsEnabled (true),
+theDomainType (CONTINUOUS)
+{
+   static const char MODULE[] = "ossimDblGrid Constructor";
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering...\n";
+
+   ossimIpt size ((int) (rect.width()/spacing.x)  + 1,
+      (int) (rect.height()/spacing.y) + 1);
+
+   initialize(size, rect.ul(), spacing, null_value);
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_WARN) << MODULE << " returning...\n";
+}
+
+//*****************************************************************************
+//  DESTRUCTOR: ~ossimDblGrid()
+//  
+//*****************************************************************************
+ossimDblGrid::~ossimDblGrid()
+{
+   if(theGridData)
+   {
+      delete [] theGridData;
+      theGridData = NULL;
+   }
+}
+
+//*****************************************************************************
+//  METHOD: ossimDblGrid::initialize()
+//  
+//  Permits initialization after construction
+//  
+//*****************************************************************************
+void ossimDblGrid::initialize(const ossimIpt&  size, 
+                              const ossimDpt&  origin,
+                              const ossimDpt&  spacing,
+                              double           null_value)
+{
+   static const char MODULE[] = "ossimDblGrid::initialize()";
+   if (traceExec())  ossimNotify(ossimNotifyLevel_WARN) << MODULE << " entering...\n";
+
+   //***
+   // Delete any existing grid:
+   //***
+   if (theGridData)
+   {
+      delete [] theGridData;
+      theGridData = 0;
+   }
+
+   //***
+   // Initialize data members:
+   //***
+   theSize           = size;
+   theOrigin         = origin;
+   theSpacing        = spacing;
+   theNullValue      = null_value;
+   theMinValue       = OSSIM_DEFAULT_MIN_PIX_DOUBLE;
+   theMaxValue       = OSSIM_DEFAULT_MAX_PIX_DOUBLE;
+   theMeanIsComputed = false;
+
+   /*!
+   * Allocate mem for the grid, and initialize:
+   */
+   ossim_uint32 buflen = theSize.x * theSize.y;
+   if(buflen > 0)
+   {
+      theGridData = new double [buflen];
+
+      for (ossim_uint32 i=0; i<buflen; i++)
+         theGridData[i] = theNullValue;
+   }   
+   if (traceExec())  ossimNotify(ossimNotifyLevel_WARN) << MODULE << " returning...\n";
+
+   return;
+}
+
+//*****************************************************************************
+//  METHOD: ossimDblGrid::initialize()
+//  
+//  Permits initialization after construction
+//  
+//*****************************************************************************
+void ossimDblGrid::initialize(const ossimDrect&  uv_rect, 
+                              const ossimDpt&    spacing,
+                              double null_value)
+{
+   static const char MODULE[] = "ossimDblGrid::initialize()";
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering...\n";
+
+   ossimIpt size ((int) (uv_rect.width()/spacing.x)  + 1,
+      (int) (uv_rect.height()/spacing.y) + 1);
+
+   initialize(size, uv_rect.ul(), spacing, null_value);
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";
+   return;
+}
+
+//**************************************************************************************************
+void ossimDblGrid::deallocate()
+{
+   if(theGridData)
+   {
+      delete [] theGridData;
+      theGridData = 0;
+   }
+   theSize = ossimIpt(0,0); 
+}
+
+/*!****************************************************************************
+* METHOD: ossimDblGrid::setNode(x, y) NON-CONST
+*
+*  This method is used to assign the grid data values.
+*  
+*****************************************************************************/
+void ossimDblGrid::setNode (int x, int y, const double& input) 
+{
+   if(!theGridData) return;
+
+   // Insure the value passed in is allowed:
+   double value = input;
+   constrain(value);
+
+   if ((x>=0)&&(x<theSize.x)&&(y>=0)&&(y<theSize.y))
+   {
+      theGridData[index(x, y)] = value;
+
+      if (value != theNullValue)
+      {
+         if (value < theMinValue)
+            theMinValue = value;
+         if (value > theMaxValue)
+            theMaxValue = value;
+      }
+
+      theMeanIsComputed = false;
+   }
+
+   return;
+}
+
+/*!****************************************************************************
+* METHOD: ossimDblGrid::setNearestNode(uv)
+*
+* Sets the node nearest the U,V point specified to the value given. This is
+* different from setNode() in that the UV coordinate system is used to
+* address a node instead of an XY grid point.
+*  
+*****************************************************************************/
+void ossimDblGrid::setNearestNode (const ossimDpt& uv_point,
+                                   const double&   input) 
+{
+   if(!theGridData) return;
+   
+   // Insure the value passed in is allowed:
+   double value = input;
+   constrain(value);
+
+   //***
+   // Establish the grid indexes:
+   //***
+   int xi = ossim::round<int>((uv_point.u - theOrigin.u)/theSpacing.x);
+   int yi = ossim::round<int>((uv_point.v - theOrigin.v)/theSpacing.y);
+
+   if (xi < 0)
+      xi = 0;
+   if (xi >= theSize.x)
+      xi = theSize.x - 1;
+   if (yi < 0)
+      yi = 0;
+   if (yi >= theSize.y)
+      yi = theSize.y - 1;
+
+   setNode (xi, yi, value);
+
+   return;
+}
+
+/*!****************************************************************************
+* METHOD: ossimDblGrid::getNode(x, y) CONST
+*
+*  This method is used to return the grid data values.
+*  
+*****************************************************************************/
+double ossimDblGrid::getNode (int x, int y) const
+{
+   if(!theGridData) return theNullValue;
+   if ((x>=0)&&(x<theSize.x)&&(y>=0)&&(y<theSize.y))
+   {
+      ossim_uint32 i = index(x, y);
+      double val = theGridData[i];
+      return val;
+   }
+   return theNullValue;
+}
+
+/*!****************************************************************************
+* METHOD: ossimDblGrid::operator(double, double)
+*
+*  This method interpolates between grid points given a fractional location
+*  in UV (external) world space.
+*  
+*****************************************************************************/
+double ossimDblGrid::operator() (const double& u, const double& v) const
+{
+   if(!theGridData) return theNullValue;
+
+   double xi = (u - theOrigin.u)/theSpacing.x;
+   double yi = (v - theOrigin.v)/theSpacing.y;
+
+   if ((xi >= 0.0) && (xi <= (double)theSize.x-1) && (yi >= 0.0) && (yi <= (double)theSize.y-1))
+      return interpolate(xi, yi);
+
+   else if (theExtrapIsEnabled)
+      return extrapolate(xi, yi);
+
+   return theNullValue;
+}
+
+//*************************************************************************************************
+//! Interpolates given non-integral point x, y
+//*************************************************************************************************
+double ossimDblGrid::interpolate(double xi, double yi) const
+{
+   if(!theGridData) 
+      return theNullValue;
+
+   // Establish the grid cell origin indices:
+   int x0 = (int) xi;
+   int y0 = (int) yi;
+
+   // Compute bilinear interpolation weights:
+   double wx1 = xi - x0;
+   double wy1 = yi - y0;
+   double wx0 = 1.0 - wx1;
+   double wy0 = 1.0 - wy1;
+   double w00 = wx0 * wy0;
+   double w01 = wx0 * wy1;
+   double w10 = wx1 * wy0;
+   double w11 = wx1 * wy1;
+
+   // Establish grid indices for 4 surrounding points:
+   int index00  = theSize.x*y0 + x0;
+   int index10 = index00;
+   int index11 = index00;
+   int index01 = index00;
+
+   if (x0 < (theSize.x-1)) index10 = index00 + 1;
+   if (y0 < (theSize.y-1)) index01 = index00 + theSize.x;
+   if (y0 < (theSize.y-1)) index01 = index00 + theSize.x;
+   if (x0 < (theSize.x-1)) index11 = index01 + 1;
+
+   // Safety check:
+   int max_idx = theSize.x * theSize.y;
+   if ((index00 > max_idx) || (index10 > max_idx) || (index11 > max_idx) || (index01 > max_idx))
+      return ossim::nan();
+
+   // Extract the four data points:
+   double p00 = theGridData[index00];
+   double p01 = theGridData[index01];
+   double p10 = theGridData[index10];
+   double p11 = theGridData[index11];
+
+   // Consider the numerical domain to catch any wrap condition:
+   if (theDomainType >= WRAP_180)
+   {
+      double dp01_00 = p01 - p00;
+      double dp10_00 = p10 - p00;
+      double dp11_00 = p11 - p00;
+
+      if (dp01_00 > 180.0)
+         p01 -= 360.0;
+      else if (dp01_00 < -180.0)
+         p01 += 360.0;
+
+      if (dp10_00 > 180.0)
+         p10 -= 360.0;
+      else if (dp10_00 < -180.0)
+         p10 += 360.0;
+
+      if (dp11_00 > 180.0)
+         p11 -= 360.0;
+      else if (dp11_00 < -180.0)
+         p11 += 360.0;
+   }
+
+   // Perform interpolation:
+   double value = (p00*w00 + p01*w01 + p10*w10 + p11*w11) / (w00 + w01 + w10 + w11);
+   constrain(value);
+
+   return value;
+}
+
+//**************************************************************************************************
+//  METHOD: ossimDblGrid::extrapolate()
+//  
+//  Establishes bilinear extrapolation value for point outside of the grid. 
+//
+//**************************************************************************************************
+double ossimDblGrid::extrapolate(double x, double y) const
+{
+   if(!theGridData) 
+      return theNullValue;
+
+
+   // Decide which extra-grid region contains the input point:
+   double dx=0, dy=0, dR_dx=0, dR_dy=0, R0;
+   if (y < 0)
+   {
+      // The point is above the top edge of grid space:
+      dy = y;
+      if (x < 0)
+      {
+         // The point is in the top-left region. Use UL corner alone as reference, and compute first
+         // and second partials:
+         R0 = getNode(0, 0);
+         dx = x;
+         dR_dx = getNode(1, 0) - R0;
+         dR_dy = getNode(0, 1) - R0;
+      }
+      else if (x <= theSize.x-1)
+      {
+         // The point directly above the grid, use the dR_dy of the edge pixel:
+         R0 = interpolate(x, 0);
+         dR_dy = interpolate(x, 1.0) - R0;
+      }
+      else
+      {
+         // The point is in the top-right region:
+         R0 = getNode(theSize.x - 1, 0);
+         dx = x - theSize.x + 1;
+         dR_dx = R0 - getNode(theSize.x-2, 0);
+         dR_dy = getNode(theSize.x-1, 1) - R0;
+      }
+   }
+   else if (y <= theSize.y-1)
+   {
+      // The point is either to the left, the right, or inside of the grid:
+      if (x < 0)
+      {
+         // The point is directly to the left of the grid:
+         R0 = interpolate(0, y);
+         dx = x;
+         dR_dx = interpolate(1.0, y) - R0;
+      }
+      else if (x <= theSize.x-1)
+      {
+         // The point is inside the grid. This should never happen, but handle just in case:
+         return interpolate(x, y);
+      }
+      else 
+      {
+         // The point directly to the right of the grid:
+         R0 = interpolate((double)theSize.x-1, y);
+         dx = x - theSize.x + 1;
+         dR_dx = R0 - interpolate((double)theSize.x-2, y);
+      }
+   }
+   else
+   {
+      // The point is below the bottom edge of grid space:
+      dy = y - theSize.y + 1;
+      if (x < 0)
+      {
+         // The point is in the bottom-left region:
+         R0 = getNode(0, theSize.y-1);
+         dx = x;
+         dR_dx = getNode(1, theSize.y-1) - R0;
+         dR_dy = R0 - getNode(0, theSize.y-2);
+      }
+      else if (x < theSize.x-1)
+      {
+         // The point directly below the grid:
+         R0 = interpolate(x, (double)theSize.y-1);
+         dR_dy = R0 - interpolate(x, (double)theSize.y-2);
+      }
+      else
+      {
+         // The point is in the bottom-right region:
+         R0 = getNode(theSize.x - 1, theSize.y-1);
+         dx = x - theSize.x + 1;
+         dR_dx = R0 - getNode(theSize.x-2, theSize.y-1);
+         dR_dy = R0 - getNode(theSize.x-1, theSize.y-2);
+      }
+   }
+
+   // Consider the numerical domain and adjust potential wrap conditions in the differences:
+   if (theDomainType >= WRAP_180)
+   {
+      if (dR_dx > 180.0) dR_dx -= 360.0;
+      else if (dR_dx < -180.0) dR_dx += 360.0;
+
+      if (dR_dy > 180.0) dR_dy -= 360.0;
+      else if (dR_dy < -180.0) dR_dy += 360.0;
+   }
+
+   double R = R0 + dR_dx*dx + dR_dy*dy;
+   constrain(R);
+   return R;
+}
+
+//*****************************************************************************
+//  OPERATOR: =
+//  
+//*****************************************************************************
+const ossimDblGrid& ossimDblGrid::operator = (const ossimDblGrid& source)
+{
+   if(&source == this) return *this;
+
+   if (theGridData)
+   {
+      delete [] theGridData;
+      theGridData = 0;
+   }
+
+   //***
+   // Assign data members:
+   //***
+   theSize           = source.theSize;
+   theOrigin         = source.theOrigin;
+   theSpacing        = source.theSpacing;
+   theMinValue       = source.theMinValue;
+   theMaxValue       = source.theMaxValue;
+   theNullValue      = source.theNullValue;
+   theMeanValue      = source.theMeanValue;
+   theDeviation      = source.theDeviation;
+   theMeanIsComputed = source.theMeanIsComputed;
+   theDomainType     = source.theDomainType;
+   theExtrapIsEnabled = source.theExtrapIsEnabled;
+
+   //***
+   // Allocate mem for the grid, and initialize:
+   //***
+   int buflen = theSize.x * theSize.y;
+   if(buflen>0)
+   {
+      theGridData = new double [buflen];
+
+      for (int i=0; i<buflen; i++)
+      {
+         theGridData[i] = source.theGridData[i];
+      }
+   }
+
+   return *this;
+}
+
+
+/*!****************************************************************************
+* METHOD: ossimDblGrid::meanValue()
+*  
+*****************************************************************************/
+double  ossimDblGrid::meanValue()
+{
+   static const char MODULE[] = "ossimDblGrid::meanValue()";
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering...\n";
+
+   if (!theMeanIsComputed)
+   {
+      computeMean();
+   }
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";
+   return theMeanValue;
+}
+
+/*!****************************************************************************
+* METHOD: ossimDblGrid::meanStdDev()
+*  
+*****************************************************************************/
+double  ossimDblGrid::meanStdDev()
+{
+   static const char MODULE[] = "ossimDblGrid::meanStdDev()";
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering...\n";
+
+   if (!theMeanIsComputed)
+      computeMean();
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";;
+   return theDeviation;
+}
+
+/*!****************************************************************************
+* METHOD: ossimDblGrid::computeMean()
+*  
+*****************************************************************************/
+void ossimDblGrid::computeMean()
+{
+   static const char MODULE[] = "ossimDblGrid::meanStdDev()";
+   if(!theGridData) return;
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "entering...\n";
+
+   if (!theMeanIsComputed)
+   {
+      double accum = 0.0;
+      double num_samples = 0.0;
+
+      /*!
+      * Loop to compute mean:
+      */
+      for (int i=0; i<(theSize.x*theSize.y); i++)
+      {
+         if (theGridData[i] != theNullValue)
+         {
+            accum += theGridData[i];
+            num_samples += 1.0;
+         }
+      }
+      theMeanValue = accum/num_samples;
+
+      /*!
+      * Loop again to compute deviation:
+      */
+      accum = 0.0;
+      double diff;
+      for (int i=0; i<(theSize.x*theSize.y); i++)
+      {
+         if (theGridData[i] != theNullValue)
+         {
+            diff = theMeanValue - theGridData[i];
+            accum += diff*diff;
+         }
+      }
+      theDeviation = sqrt(accum/num_samples);
+
+      theMeanIsComputed = true;
+   }
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";
+   return;
+}
+
+/*!****************************************************************************
+* INLINE METHOD: ossimDblGrid::isInside(const ossimDpt& pt) const
+*****************************************************************************/
+bool ossimDblGrid::isInside(const double& u, const double& v) const
+{
+   double xi = (u - theOrigin.u)/theSpacing.x;
+   double yi = (v - theOrigin.v)/theSpacing.y;
+   return ((xi >= 0.0) && (xi <= ((double)theSize.x - 1.0)) &&
+      (yi >= 0.0) && (yi <= ((double)theSize.y - 1.0)));
+   //return ((xi >= 0.0) && (xi < ((double)theSize.x)) &&
+   //        (yi >= 0.0) && (yi < ((double)theSize.y)));
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimDblGrid::save()
+//  
+//  Saves the grid to the stream in compact ASCII format (not necessarily
+//  human readable).
+//  
+//*****************************************************************************
+bool ossimDblGrid::save(ostream& os, const char* descr) const
+{
+   static const char MODULE[] = "ossimDblGrid::save()";
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering...\n";
+
+   //***
+   // Preserve the stream's settings:
+   //***
+   ios::fmtflags new_options = ios::scientific|ios::dec;
+   //ios::streamsize new_precision = 12;
+   int new_precision = 12;
+
+   ios::fmtflags old_options = os.flags(new_options);
+   int old_precision = os.precision(new_precision);
+
+   //***
+   // Verify the description string is not too long:
+   //***
+   char descr_buf[81];
+   std::strncpy(descr_buf, descr, 80);
+   descr_buf[80] = '\0';
+
+   //***
+   // write magic number tag and the grid size X, Y, num params:
+   //***
+   os << MAGIC_NUMBER << " " << descr_buf << "\n"
+      << theSize.x << "  "
+      << theSize.y << "  "
+      << theOrigin.u << "  "
+      << theOrigin.v << "  "
+      << theSpacing.u << "  "
+      << theSpacing.v << "  "
+      << theNullValue << "\n";
+
+   if(theGridData)
+   {
+      //***
+      // Loop to write grid points:
+      //***
+      int max_index = theSize.x*theSize.y;
+      for (int i=0; i<max_index; i++)
+         os << theGridData[i] << "  ";
+   }
+   os << "\n";
+
+   //***
+   // Restore the stream's state:
+   //***
+   os.flags(old_options);
+   os.precision(old_precision);
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";
+   return true;
+}
+
+//*****************************************************************************
+//  METHOD: ossimDblGrid::load()
+//  
+//  Loads the grid from the stream in compact ASCII format (not necessarily
+//  human readable).
+//  
+//*****************************************************************************
+bool ossimDblGrid::load(istream& is)
+{
+   static const char MODULE[] = "ossimDblGrid::load()";
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering...\n";
+
+   char strbuf[128];
+
+   //***
+   // Read magic number tag to insure it is an ossimDblGrid record:
+   //***
+   is >> strbuf;
+   if (std::strncmp(strbuf, MAGIC_NUMBER.c_str(), MAGIC_NUMBER.length()))
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << MODULE << "Error reading OSSIM_DBL_GRID magic number from stream. "
+         << "Aborting...\n";
+      return false;
+   }
+   is.getline(strbuf, 128, '\n');
+   theSize           = ossimDpt(0,0);
+   theOrigin         = ossimDpt(0,0);
+   theSpacing        = ossimDpt(0,0);
+   theMinValue       = OSSIM_DEFAULT_MAX_PIX_DOUBLE;
+   theMaxValue       =  OSSIM_DEFAULT_MIN_PIX_DOUBLE;
+  // theNullValue      = theNullValue;
+   theMeanIsComputed = false;
+
+
+   //***
+   // Read the grid size, origin, and spacing:
+   //***
+   ossimIpt size;
+   ossimDpt origin, spacing;
+   double null_value;
+   is >> size.x 
+      >> size.y 
+      >> origin.u 
+      >> origin.v 
+      >> spacing.u
+      >> spacing.v
+      >> null_value;
+
+   initialize(size, origin, spacing, null_value);
+
+   //***
+   // Loop to read grid points:
+   //***
+   int max_index = theSize.x*theSize.y;
+   for (int i=0; i<max_index; i++)
+   {
+      is >> theGridData[i];
+   }
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";
+
+   return true;
+}
+
+//*****************************************************************************
+//  PRIVATE FUNCTION: isBlocked()
+//  
+//  Used by interpolateNullValuedNodes. Returns true if the direction indicated
+//  by the vector (x, y) has been blocked from further sampling. This occurs if
+//  a sample has already been found in that general direction. The directions
+//  are discrete (16) evenly distributed about a "compass rose." Each index
+//  corresponds to one of the directions as illustrated here:
+//
+//                        15 0 1
+//                     14    |    2
+//                    13     |     3
+//                   12------+------4
+//                    11     |     5
+//                     10    |    6
+//                         9 8 7
+//
+//*****************************************************************************
+bool isBlocked(bool* blocked, int x, int y)
+{
+   if (y == 0)
+   {
+      if (x > 0) return blocked[4];
+      return blocked[12];
+   }
+
+   double r = x/y;
+   int c = 0;
+   int i;
+   if (x < 0.0) c = 8;
+
+   //***
+   // Test the tangent value instead of computing angle:
+   //***
+   if      (r >  5.02734) i = 12 + c;
+   else if (r >  1.49660) i = 13 + c;
+   else if (r >  0.66818) i = 14 + c;
+   else if (r >  0.19891) i = 15 + c;
+   else if (r > -0.19891) i =  0 + c;
+   else if (r > -0.66818) i =  1 + c;
+   else if (r > -1.49660) i =  2 + c;
+   else if (r > -5.02734) i =  3 + c;
+   else                   i =  4 + c;
+
+   if (i > 15) i -= 16;  // modulo 16
+
+   return blocked[i];
+}
+
+//*****************************************************************************
+//  PRIVATE FUNCTION: blockDirection()
+//  
+//  Used by interpolateNullValuedNodes. Blocks the resampler from exploring
+//  further in a general direction, specified by thevector (x, y). The blocking
+//  is requested when a sample is found. This prevents a sample that is shadowed
+//  by a closer sample from having influence.
+//
+//  See method isBlocked() above for a description of the compass rose indexing.
+//  
+//*****************************************************************************
+void blockDirection(bool* blocked, int x, int y)
+{
+   if (y == 0)
+   {
+      if (x > 0) blocked[4] = true;
+      else       blocked[12] = true;
+      return;
+   }
+
+   double r = x/y;
+   int c = 0;
+   int i;
+   if (x < 0.0) c = 8;
+
+   //***
+   // Test the tangent value instead of computing angle:
+   //***
+   if      (r >  5.02734) i = 12 + c;
+   else if (r >  1.49660) i = 13 + c;
+   else if (r >  0.66818) i = 14 + c;
+   else if (r >  0.19891) i = 15 + c;
+   else if (r > -0.19891) i =  0 + c;
+   else if (r > -0.66818) i =  1 + c;
+   else if (r > -1.49660) i =  2 + c;
+   else if (r > -5.02734) i =  3 + c;
+   else                   i =  4 + c;
+
+   if (i > 15) i -= 16;  // modulo 16
+   blocked[i] = true;
+
+   return;
+}
+
+//*****************************************************************************
+//   METHOD: ossimDblGrid::interpolateNullValuedNodes(decay_rate)
+//
+//   This method performs a resampling of the defined grid nodes in order to
+//   compute interpolated values for those uninitialized nodes. This is
+//   necessary when only a subset of nodes are available for initializing the
+//   grid.
+//
+//   The decay rate is a geometric (1/r) factor applied to the weights to
+//   amplify the rate at which a neighbor's influence diminishes. For a
+//   decay_rate = 1, the influence of a sample diminishes linearly with the
+//   distance.
+//  
+//*****************************************************************************
+void ossimDblGrid::interpolateNullValuedNodes(const double& decay_rate)
+{
+   static const char MODULE[] = "ossimDblGrid::interpolateNullValuedNodes()";
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering...\n";
+   if(!theGridData) return;
+
+   //***
+   // Allocate buffer to store resampled nodes:
+   //***
+   int buf_size = theSize.x*theSize.y;
+
+   //---
+   // Note: Changed resampled_grid from double* to vector<double> to fix
+   // coverity scan uninitialized error. This calls the fill constructor.
+   // drb - 20150527
+   //---
+   std::vector<double> resampled_grid( buf_size, 0.0 );
+
+   double min_weight_needed = 4.0/decay_rate;
+
+   int      start_x, start_y, end_x, end_y;
+   int      diameter;
+   double   sum_weights;
+   double   accumulator;
+   double   weight;
+   double   sample;
+   double   node_value;
+   bool     sample_found;
+   int      node_idx;
+   double   adj_delta;
+   int      dx, dy;
+   bool     blocked[16];
+
+   //***
+   // Loop over the entire grid to resample all NULL nodes:
+   //***
+   for (int y=0; y<theSize.y; ++y)
+   {
+      for (int x=0; x<theSize.x; ++x)
+      {
+         //***
+         // Only resample those nodes that contain NULL:
+         //***
+         node_idx = index(x, y);
+         node_value = theGridData[node_idx];
+         if (node_value != theNullValue)
+         {
+            //***
+            // This node had a value. Simply copy it into the resample_grid:
+            //***
+            resampled_grid[node_idx] = node_value;
+         }
+
+         else
+         {
+            //***
+            // Resampling is necessary. Initialize quantities used:
+            //***
+            start_x = x;
+            start_y = y;
+            diameter = 0;
+            sum_weights = 0;
+            accumulator = 0;
+            weight = 1.0;
+            sample_found = true;
+
+            for (int i=0; i<16; i++)
+               blocked[i] = false;
+
+            //***
+            // Loop collecting contributions from non-null neighbors. Begin with
+            // a small kernel size (diameter) and successively grow until a
+            // sufficient number of contributors is found:
+            //***
+            while ((sum_weights < min_weight_needed) && sample_found)
+            {
+               diameter += 2;
+               start_x -= 1;
+               start_y -= 1;
+               weight *= decay_rate;
+               sample_found = false;
+
+               //***
+               // Loop over each pixel in kernel and sum in it's contribution:
+               //***
+               end_y = start_y + diameter;
+               end_x = start_x + diameter;
+
+               for (int yn=start_y; yn<=end_y; ++yn)
+               {
+                  if ((yn == start_y) || (yn == end_y))
+                  {
+                     //***
+                     // This is the top edge or bottom edge, need samples from
+                     // each x along kernel edge:
+                     //***
+                     for (int xn=start_x; xn<=end_x; ++xn)
+                     {
+                        sample_found = sample_found || isInside(xn, yn);
+                        sample = getNode(xn, yn);
+                        if (sample != theNullValue)
+                        {
+                           dx = x - xn; dy = y - yn;
+                           if (!isBlocked(blocked, dx, dy))
+                           {
+                              adj_delta = weight*sqrt((double)(dx*dx + dy*dy));
+                              accumulator += sample/adj_delta;
+                              sum_weights += 1.0/adj_delta;
+                              blockDirection(blocked, dx, dy);
+                           }
+                        }
+                     }
+                  }
+                  else
+                  {
+                     //***
+                     // For the left/right edge of the kernel, need to sample
+                     // only the first (start_x) and last (end_x):
+                     //***
+                     sample_found = sample_found || isInside(start_x, yn);
+                     sample = getNode(start_x, yn);
+                     if (sample != theNullValue)
+                     {
+                        dx = x - start_x; dy = y - yn;
+                        if (!isBlocked(blocked, dx, dy))
+                        {
+                           adj_delta = weight*sqrt((double)(dx*dx + dy*dy));
+                           accumulator += sample/adj_delta;
+                           sum_weights += 1.0/adj_delta;
+                           blockDirection(blocked, dx, dy);
+                        }
+                     }
+
+                     sample_found = sample_found || isInside(end_x, yn);
+                     sample = getNode(end_x, yn);
+                     if (sample != theNullValue)
+                     {
+                        dx = x - end_x; dy = y - yn;
+                        if (!isBlocked(blocked, dx, dy))
+                        {
+                           adj_delta = weight*sqrt((double)(dx*dx + dy*dy));
+                           accumulator += sample/adj_delta;
+                           sum_weights += 1.0/adj_delta;
+                           blockDirection(blocked, dx, dy);
+                        }
+                     }
+                  } // end else
+               } // end for loop over all rows in kernel
+            } // end while loop inflating kernel size
+
+            //***
+            // Finished collecting sample contributions for this node. compute
+            // convolution and save in buffer:
+            //***
+            if (sum_weights != 0)
+               resampled_grid[node_idx] = accumulator/sum_weights;
+            else
+               resampled_grid[node_idx] = theNullValue;
+
+         } // end else (if input node is NULL)
+      } // end for loop over all columns in grid
+   } // end for loop over all lines in grid
+
+   //***
+   // Now copy the resampled grid back into the original buffer:
+   //***
+   for (node_idx=0; node_idx<buf_size; node_idx++)
+      theGridData[node_idx] = resampled_grid[node_idx];
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";
+   return;
+}
+
+//*****************************************************************************
+//  METHOD: ossimDblGrid::filter(size_x, size_y, kernel)
+//  
+//  Passes the grid data through a convolution filter given in the kernel array.
+//  The grid must not contain any NULL nodes as these are not scanned for.
+//  The kernel sizes should be odd numbers.
+//  
+//*****************************************************************************
+void ossimDblGrid::filter(int size_x, int size_y, double* kernel)
+{
+   static const char MODULE[] = "ossimDblGrid::filter()";
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << "entering...\n";
+   if(!theGridData) return;
+
+   int      rx      = (size_x - 1)/2;     // kernel radii
+   int      ry      = (size_y - 1)/2;     
+   int      start_x = rx;                 // indexes to start sampling grid
+   int      start_y = ry;
+   int      end_x   = theSize.x - rx;     // indexes to end buffer sampling
+   int      end_y   = theSize.y - ry;
+   int      knl_ctr = ry*size_x + rx;     // offset to center of kernel buffer
+   double   node_value, kernel_value;
+   int      resample_node_idx;
+   
+   // The resampled data is accumulated and stored in a temporary ossimDblGrid object so that we
+   // can take advantage of the extrapolation feature later in this method.
+   ossimIpt resample_grid_size(end_x-start_x, end_y-start_y);
+   ossimDpt resample_grid_origin(start_x, start_y);
+   ossimDpt resample_grid_spacing(1,1);
+   ossimDblGrid resample_grid(resample_grid_size, resample_grid_origin, resample_grid_spacing);
+   resample_grid.enableExtrapolation();
+   resample_grid.fill(0.0);
+
+   // Loop over the entire grid to resample all NULL nodes:
+   for (int y=start_y; y<end_y; y++)
+   {
+      for (int x=start_x; x<end_x; x++)
+      {
+         resample_node_idx = resample_grid.index(x-start_x, y-start_y);
+      
+         // Fetch samples for each kernel element, apply gain, then accumulate
+         // in output buffer:
+         for (int ky=-ry; ky<=ry; ky++)
+         {
+            for (int kx=-rx; kx<=rx; kx++)
+            {
+               node_value = theGridData[index(x+kx, y+ky)];
+               kernel_value = kernel[knl_ctr + ky*size_x + kx];
+               resample_grid.theGridData[resample_node_idx] += kernel_value*node_value;
+            }
+         }
+      }
+   }
+   
+   // Copy the resampled data to the original grid.
+   // Note: the grid margin has unfiltered data due to the kernel radius. Use the resample_grid's
+   // inherent extrapolator to fill in these unfiltered border nodes:
+   for (int y=0; y<theSize.y; y++)
+   {
+      for (int x=0; x<theSize.x; x++)
+      {
+         theGridData[index(x, y)] = resample_grid(x, y); // automatically extrapolates if necessary
+      }
+   }
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";
+   return;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimDblGrid::fill
+//  
+//  Fills the current grid with constant value provided.
+//  
+//*****************************************************************************
+void ossimDblGrid::fill(double fill_value)
+{
+   if (!theGridData)
+   {
+      return;
+   }
+
+   int size = theSize.x * theSize.y;
+   for (int i=0; i<size; i++)
+      theGridData[i] = fill_value;
+
+   return;
+}
+
+//*************************************************************************************************
+// Constrains the value to the numerical domain specified in theDomainType.
+//*************************************************************************************************
+void ossimDblGrid::constrain(double& value) const
+{
+   if ((theDomainType == CONTINUOUS) || (value == theNullValue))
+      return;
+      
+   // Consider again the domain to verify the value is within allowable range:
+   if (theDomainType == WRAP_180) 
+   {
+      if (value <= -180.0)
+         value += 360.0;
+      else if (value > 180.0) 
+         value -= 360.0;
+   }
+   else if (theDomainType == WRAP_360)
+   {
+      if (value < 0.0) 
+         value += 360.0;
+      else if (value >= 360.0) 
+         value -= 360.0;
+   }
+   //else if (theDomainType == SAWTOOTH_90)
+   //{
+   //   // Any adjustment here corrupts the data value since it is clipped:
+   //   if (value < -90.0) 
+   //      value = -90.0;
+   //   else if (value > 90.0) 
+   //      value = 90.0;
+   //}
+}
+
+//*****************************************************************************
+//  FRIEND OPERATOR: ostream& << (ostream&) 
+//  
+//*****************************************************************************
+ostream& operator<<(ostream& os, const ossimDblGrid& grid) 
+{
+   os << "\nDump of ossimDblGrid at " << (void*) &grid
+      << "\n  theSize: "           << grid.theSize
+      << "\n  theOrigin: "         << grid.theOrigin
+      << "\n  theSpacing: "        << grid.theSpacing
+      << "\n  theMinValue: "       << grid.theMinValue
+      << "\n  theMaxValue: "       << grid.theMaxValue
+      << "\n  theNullValue: "      << grid.theNullValue
+      << "\n  theMeanValue: "      << grid.theMeanValue
+      << "\n  theDeviation: "      << grid.theDeviation
+      << "\n  theMeanIsComputed: " << grid.theMeanIsComputed
+      << "\n";
+
+   if(grid.theGridData)
+   {
+
+      for (int y=0; y<grid.theSize.y; y++)
+      {
+         for (int x=0; x<grid.theSize.x; x++)
+         {
+            os << "\n  node(" << x << ", " << y << "): " << grid.getNode(x,y);
+         }
+      }
+   }
+
+   return os;
+}
diff --git a/ossim/src/ossim/base/ossimDirectory.cpp b/ossim/src/ossim/base/ossimDirectory.cpp
new file mode 100644
index 0000000..f980424
--- /dev/null
+++ b/ossim/src/ossim/base/ossimDirectory.cpp
@@ -0,0 +1,320 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+// 
+// Description: A brief description of the contents of the file.
+//
+//*************************************************************************
+// $Id: ossimDirectory.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstring> /* for strncasecmp */
+#include <iostream>
+
+#if defined (_WIN32)
+#include <io.h>
+#include <direct.h>
+#else
+#include <ossim/base/ossimDirectoryData.h>
+#endif
+#ifdef __BORLANDC__
+# include <dir.h>
+#include <direct.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <io.h>
+#define _chdir chdir
+#endif
+
+#include <ossim/base/ossimDirectory.h>
+#include <ossim/base/ossimRegExp.h>
+
+//#include "wx/filefn.h"          // for wxMatchWild
+
+// #include <sys/types.h>
+
+// #include <dirent.h>
+
+// ----------------------------------------------------------------------------
+// ossimDirectory construction/destruction
+// ----------------------------------------------------------------------------
+
+#if defined (_WIN32)
+ossimDirectory::ossimDirectory()
+   :
+      theData(0),
+      theDirectoryName(),
+      theFlags(0)
+{}
+
+ossimDirectory::ossimDirectory(const ossimFilename &dirname)
+   :
+      theData(0),
+      theDirectoryName(dirname),
+      theFlags(0)
+{
+   open(dirname);
+}
+
+ossimDirectory::~ossimDirectory()
+{
+   if (theData != 0) _findclose( theData );
+}
+
+bool ossimDirectory::open(const ossimFilename &dirname)
+{
+   // close out currently open directory
+   if (theData != 0)
+   {
+      _findclose( theData );
+      theData = 0;
+   }
+   
+   // set new directory name
+   theDirectoryName = dirname;
+
+	return (dirname.isDir());
+   // cd to the new directory
+//   if (_chdir( theDirectoryName) == -1)
+//   {
+//      return false;
+//   }
+   
+//   return true;
+}
+
+bool ossimDirectory::getFirst(ossimFilename &filename, int flags)
+{
+   struct _finddata_t c_file;
+   ossimFilename temp;
+   //long theData1 = _findfirst( "*.*", &c_file );
+   ossimFilename dirName = theDirectoryName.dirCat("*");
+   if( (theData = _findfirst( dirName.c_str(), &c_file )) != 0L )
+   {
+      setFlags(flags);
+      
+      temp = theDirectoryName.dirCat(c_file.name);
+      
+	  
+      while (!fileMatched(temp))
+      {
+         // look for next file in the directory
+         if (_findnext( theData, &c_file ) == 0 )
+         {
+            temp = theDirectoryName.dirCat(c_file.name);
+         }
+         else
+         {
+            // no more file in the directory
+            filename.clear();
+            return false;
+         }
+      }
+   }
+
+   // set the filenane that matches
+   filename = temp.trim();
+
+   return (filename!="");
+}
+
+bool ossimDirectory::getNext(ossimFilename &filename) const
+{
+   struct _finddata_t c_file;
+   bool matches = false;
+   ossimFilename temp;
+
+   while (!matches )
+   {
+      // look for next file in the directory
+      if (_findnext( theData, &c_file ) == 0 )
+      {
+         temp = theDirectoryName.dirCat(c_file.name);
+         matches = fileMatched(temp);
+      }
+      else
+      {
+         // no more file in the directory
+         filename.clear();
+         return false;
+      }
+   }
+
+   // set the filenane that matches
+   if (matches)
+   {
+      filename = temp.trim();
+   }
+
+   return (matches&&(filename!=""));
+}
+
+bool ossimDirectory::fileMatched(ossimFilename &filename) const
+{
+   bool matches = false;
+
+   // Don't return "." and ".." unless asked for.
+   if ( (filename.file() == "..") || (filename.file() == ".")   )
+   {
+      if (theFlags & ossimDirectory::OSSIM_DIR_DOTDOT)
+      {
+         matches = true;
+      }
+   }
+   else if((filename.isDir()) && (theFlags & ossimDirectory::OSSIM_DIR_DIRS))
+   {
+      matches = true;
+   }
+   else if((filename.isFile()) && (theFlags & ossimDirectory::OSSIM_DIR_FILES))
+   {
+      matches = true;
+   }
+
+   return matches;
+}
+
+bool ossimDirectory::isOpened() const
+{
+   return theDirectoryName.isDir();
+    //return theData != 0;
+}
+
+#else
+
+ossimDirectory::ossimDirectory()
+   :
+      theData(NULL)
+{}
+
+ossimDirectory::ossimDirectory(const ossimFilename &dirname)
+{
+    theData = NULL;
+    open(dirname);
+}
+
+bool ossimDirectory::open(const ossimFilename &dirname)
+{
+    delete theData;
+    theData = new ossimDirectoryData(dirname);
+
+    if ( theData &&
+         (!theData->isOk()) )
+    {
+        delete theData;
+        theData = NULL;
+
+        return false;
+    }
+
+    return true;
+}
+
+ossimDirectory::~ossimDirectory()
+{
+    delete theData;
+}
+
+// ----------------------------------------------------------------------------
+// ossimDirectory enumerating
+// ----------------------------------------------------------------------------
+
+bool ossimDirectory::getFirst(ossimFilename &filename,
+                              int flags)
+{
+   if(theData && isOpened())
+   {
+      theData->rewind();
+
+      theData->setFlags(flags);
+
+      return getNext(filename);
+   }
+
+   return false;
+}
+
+bool ossimDirectory::getNext(ossimFilename &filename) const
+{
+   if(theData && isOpened())
+   {
+      return theData->read(filename);
+   }
+
+   return false;
+}
+
+bool ossimDirectory::isOpened() const
+{
+    return theData != NULL;
+}
+
+#endif
+
+void ossimDirectory::findAllFilesThatMatch(std::vector<ossimFilename>& result,
+					   const ossimString& regularExpressionPattern,
+					   int flags)
+{
+   ossimFilename filename;
+   ossimRegExp   regExpr;
+   regExpr.compile(regularExpressionPattern.c_str());
+   if(getFirst(filename, flags))
+   {
+      do
+      {
+         ossimString fileOnly = filename.file();
+         if(regExpr.find(fileOnly.c_str()))
+         {
+            result.push_back(filename);
+         }
+      }while(getNext(filename));
+   }
+}
+
+// ESH 07/2008, Trac #234: OSSIM is case sensitive 
+// when using worldfile templates during ingest
+bool ossimDirectory::findCaseInsensitiveEquivalents(
+   const ossimFilename &filename, 
+   std::vector<ossimFilename>& result,
+   bool bExcludeExactMatch )
+{
+   bool bSuccess = false;
+   ossimFilename candidate;
+   bool bFoundCandidate = getFirst( candidate );
+   int compareSize = static_cast<int>( filename.length() );
+   
+   while( bFoundCandidate == true )
+   {
+      // Do a case insensitive string compare
+#if defined (_WIN32)
+      bool bFoundEquivalent = _strnicmp( filename.c_str(), candidate.c_str(), 
+                                         compareSize ) == 0 ? true : false;
+#else
+      //bool bFoundEquivalent =  strnicmp( filename.c_str(), candidate.c_str(), // 
+      //                                         compareSize ) == 0 ? true : false;
+      bool bFoundEquivalent =  strncasecmp( filename.c_str(), candidate.c_str(), 
+                                            compareSize ) == 0 ? true : false;
+#endif
+      
+      if ( bFoundEquivalent == true )
+      {
+         bool bFoundExact = ( filename == candidate.c_str() ) ? true : false;
+         bool bShouldExclude = ( bFoundExact == true && 
+                                 bExcludeExactMatch == true ) ? true : false;
+         
+         if ( bShouldExclude == false )
+         {
+            bSuccess = true;
+            result.push_back( candidate );
+         }
+      }
+      
+      bFoundCandidate = getNext( candidate );
+   }
+   
+   return bSuccess;
+}
+
diff --git a/src/ossim/base/ossimDirectoryData.cpp b/ossim/src/ossim/base/ossimDirectoryData.cpp
similarity index 100%
rename from src/ossim/base/ossimDirectoryData.cpp
rename to ossim/src/ossim/base/ossimDirectoryData.cpp
diff --git a/src/ossim/base/ossimDirectoryTree.cpp b/ossim/src/ossim/base/ossimDirectoryTree.cpp
similarity index 100%
rename from src/ossim/base/ossimDirectoryTree.cpp
rename to ossim/src/ossim/base/ossimDirectoryTree.cpp
diff --git a/src/ossim/base/ossimDisplayEventListener.cpp b/ossim/src/ossim/base/ossimDisplayEventListener.cpp
similarity index 100%
rename from src/ossim/base/ossimDisplayEventListener.cpp
rename to ossim/src/ossim/base/ossimDisplayEventListener.cpp
diff --git a/ossim/src/ossim/base/ossimDisplayInterface.cpp b/ossim/src/ossim/base/ossimDisplayInterface.cpp
new file mode 100644
index 0000000..f9ce2ce
--- /dev/null
+++ b/ossim/src/ossim/base/ossimDisplayInterface.cpp
@@ -0,0 +1,32 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimDisplayInterface.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/base/ossimDisplayInterface.h>
+
+RTTI_DEF(ossimDisplayInterface, "ossimDisplayInterface");
+
+ossimDisplayInterface::ossimDisplayInterface()
+{
+}
+
+ossimDisplayInterface::~ossimDisplayInterface()
+{
+}
+
+ossimString ossimDisplayInterface::getTitle()const
+{
+   ossimString result;
+   
+   getTitle(result);
+   
+   return result;
+}
+
diff --git a/src/ossim/base/ossimDisplayListEvent.cpp b/ossim/src/ossim/base/ossimDisplayListEvent.cpp
similarity index 100%
rename from src/ossim/base/ossimDisplayListEvent.cpp
rename to ossim/src/ossim/base/ossimDisplayListEvent.cpp
diff --git a/src/ossim/base/ossimDisplayRefreshEvent.cpp b/ossim/src/ossim/base/ossimDisplayRefreshEvent.cpp
similarity index 100%
rename from src/ossim/base/ossimDisplayRefreshEvent.cpp
rename to ossim/src/ossim/base/ossimDisplayRefreshEvent.cpp
diff --git a/src/ossim/base/ossimDms.cpp b/ossim/src/ossim/base/ossimDms.cpp
similarity index 100%
rename from src/ossim/base/ossimDms.cpp
rename to ossim/src/ossim/base/ossimDms.cpp
diff --git a/src/ossim/base/ossimDoubleGridProperty.cpp b/ossim/src/ossim/base/ossimDoubleGridProperty.cpp
similarity index 100%
rename from src/ossim/base/ossimDoubleGridProperty.cpp
rename to ossim/src/ossim/base/ossimDoubleGridProperty.cpp
diff --git a/src/ossim/base/ossimDpt.cpp b/ossim/src/ossim/base/ossimDpt.cpp
similarity index 100%
rename from src/ossim/base/ossimDpt.cpp
rename to ossim/src/ossim/base/ossimDpt.cpp
diff --git a/ossim/src/ossim/base/ossimDpt3d.cpp b/ossim/src/ossim/base/ossimDpt3d.cpp
new file mode 100644
index 0000000..13f0a8a
--- /dev/null
+++ b/ossim/src/ossim/base/ossimDpt3d.cpp
@@ -0,0 +1,207 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimDpt3d.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <sstream>
+#include <ossim/base/ossimDpt3d.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimString.h>
+
+
+ossimDpt3d::ossimDpt3d(const ossimDpt &aPt)
+   :x(aPt.x),
+    y(aPt.y),
+    z(0)
+{
+   if(aPt.isNan())
+   {
+      makeNan();
+   }
+}
+
+ossimDpt3d::ossimDpt3d(const ossimIpt &aPt)
+   :x(aPt.x),
+    y(aPt.y),
+    z(0)
+{
+   if(aPt.isNan())
+      makeNan();
+}
+
+ossimDpt3d::ossimDpt3d(const ossimGpt &gPt)
+{
+   if(gPt.hasNans())
+   {
+      makeNan();
+   }
+   else
+   {
+      ossimGpt wgs84Pt (gPt);
+      wgs84Pt.changeDatum(ossimDatumFactory::instance()->wgs84());
+      x = wgs84Pt.lon;
+      y = wgs84Pt.lat;
+      z = wgs84Pt.hgt;
+   }
+}
+
+
+std::string ossimDpt3d::toString(ossim_uint32 precision) const
+{
+   std::ostringstream os;
+   os <<  setprecision(precision);
+   
+   os << "(";
+   if ( ossim::isnan(x) == false)
+   {
+      os << x;
+   }
+   else
+   {
+      os << "nan";
+   }
+   os << ",";
+   if ( ossim::isnan(y) == false )
+   {
+      os << y;
+   }
+   else
+   {
+      os << "nan";
+   }
+   os << ",";
+   if ( ossim::isnan(z) == false )
+   {
+      os << z;
+   }
+   else
+   {
+      os << "nan";
+   }
+   os << ")";
+   
+   return os.str();
+}
+
+void ossimDpt3d::toPoint(const std::string& s)
+{
+   // Nan out the column vector for starters.
+   x = ossim::nan();
+   y = ossim::nan();
+   z = ossim::nan();
+  
+   std::istringstream is(s);
+
+   // Check the stream.
+   if (!is) return;
+
+   //---
+   // Expected input format:
+   // ( 0.0000000, 0.0000000, 0.00000000 )
+   //   -----x---- -----y---- -----z----
+   //---
+   
+   const int SZ = 64; // Handle real big number...
+   ossimString os;
+   char buf[SZ];
+   char c = 0;
+
+   //---
+   // X SECTION:
+   //---
+   
+   // Grab data up to the first comma.
+   is.get(buf, SZ, ',');
+
+   if (!is) return;
+
+   // Copy to ossim string.
+   os = buf;
+   
+   // Get rid of the '(' if there is any.
+   std::string::size_type pos = os.find('(');
+   if (pos != std::string::npos)
+   {
+      os.erase(pos, 1);
+   }   
+   
+   if (os.contains("nan") == false)
+   {
+      x = os.toFloat64();
+   }
+   else
+   {
+      x = ossim::nan();
+   }
+
+   // Eat the comma that we stopped at.
+   while (c != ',')
+   {
+      is.get(c);
+      if (!is) break;
+   }
+   
+   //---
+   // Y SECTION:
+   //---
+   
+   // Grab the data up to the next ','
+   is.get(buf, SZ, ',');
+
+   if (!is) return;
+   
+   // Copy to ossim string.
+   os = buf;
+   
+   if (os.contains("nan") == false)
+   {
+      y = os.toFloat64();
+   }
+   else
+   {
+      y = ossim::nan();
+   }
+   
+   // Eat the comma that we stopped at.
+   c = 0;
+   while (c != ',')
+   {
+      is.get(c);
+      if (!is) break;
+   }
+
+   //---
+   // Z SECTION:
+   //---
+   
+   // Grab the data up to the ')'
+   is.get(buf, SZ, ')');
+   
+   if (!is) return;
+   
+   // Copy to ossim string.
+   os = buf;
+   
+   if (os.contains("nan") == false)
+   {
+      z = os.toFloat64();
+   }
+   else
+   {
+      z = ossim::nan();
+   }
+}
+
+std::ostream& operator<< (std::ostream& out, const ossimDpt3d &rhs)
+{
+   std::string s = rhs.toString(15);
+   out << s;
+   return out;
+}
+
diff --git a/ossim/src/ossim/base/ossimDrect.cpp b/ossim/src/ossim/base/ossimDrect.cpp
new file mode 100644
index 0000000..923bc5f
--- /dev/null
+++ b/ossim/src/ossim/base/ossimDrect.cpp
@@ -0,0 +1,854 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Contains class definition for ossimDrect.
+//*******************************************************************
+//  $Id: ossimDrect.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <iostream>
+#include <sstream>
+
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimPolygon.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+
+// XXX not replaced with std::max since the test is backward here
+//     and will give a different answer in the case of nan.
+#define d_MAX(a,b)      (((a)>(b)) ? a : b)
+
+static int
+clip_1d (double *x0, 
+	 double *y0, 
+	 double *x1, 
+	 double *y1, 
+	 double maxdim)
+{
+   double m;			/* gradient of line */
+   if (*x0 < 0)
+   {				/* start of line is left of window */
+      if (*x1 < 0)		/* as is the end, so the line never cuts the window */
+         return 0;
+      m = (*y1 - *y0) / (double) (*x1 - *x0);	/* calculate the slope of the line */
+      /* adjust x0 to be on the left boundary (ie to be zero), and y0 to match */
+      *y0 -= m * *x0;
+      *x0 = 0;
+      /* now, perhaps, adjust the far end of the line as well */
+      if (*x1 > maxdim)
+      {
+         *y1 += m * (maxdim - *x1);
+         *x1 = maxdim;
+      }
+      return 1;
+   }
+   if (*x0 > maxdim)
+   {				/* start of line is right of window -
+				   complement of above */
+      if (*x1 > maxdim)		/* as is the end, so the line misses the window */
+         return 0;
+      m = (*y1 - *y0) / (double) (*x1 - *x0);	/* calculate the slope of the line */
+      *y0 += m * (maxdim - *x0);	/* adjust so point is on the right
+					   boundary */
+      *x0 = maxdim;
+      /* now, perhaps, adjust the end of the line */
+      if (*x1 < 0)
+      {
+         *y1 -= m * *x1;
+         *x1 = 0;
+      }
+      return 1;
+   }
+   /* the final case - the start of the line is inside the window */
+   if (*x1 > maxdim)
+   {				/* other end is outside to the right */
+      m = (*y1 - *y0) / (double) (*x1 - *x0);	/* calculate the slope of the line */
+      *y1 += m * (maxdim - *x1);
+      *x1 = maxdim;
+      return 1;
+   }
+   if (*x1 < 0)
+   {				/* other end is outside to the left */
+      m = (*y1 - *y0) / (double) (*x1 - *x0);	/* calculate the slope of the line */
+      *y1 -= m * *x1;
+      *x1 = 0;
+      return 1;
+   }
+   /* only get here if both points are inside the window */
+   return 1;
+}
+
+//*******************************************************************
+// Public Constructor: ossimDrect
+//
+//*******************************************************************
+ossimDrect::ossimDrect(const ossimIrect& rect)
+   :
+      theUlCorner(rect.ul()),
+      theUrCorner(rect.ur()),
+      theLrCorner(rect.lr()),
+      theLlCorner(rect.ll()),
+      theOrientMode(rect.orientMode())
+{
+   if(rect.isNan())
+   {
+      makeNan();
+   }
+}
+
+
+//*****************************************************************************
+//  CONSTRUCTOR: ossimDrect(const vector<ossimDpt>& points)
+//  
+//*****************************************************************************
+ossimDrect::ossimDrect(const ossimPolygon& polygon,
+                       ossimCoordSysOrientMode mode)
+   :
+      theOrientMode (mode)
+{
+   std::vector<ossimDpt> vertices;
+   ossimDpt point;
+   int index = 0;
+   while (polygon.vertex(index, point))
+   {
+      vertices.push_back(point);
+      index++;
+   }
+
+   initBoundingRect(vertices);
+}
+
+//*****************************************************************************
+//  CONSTRUCTOR: ossimDrect(const vector<ossimDpt>& points)
+//  
+//*****************************************************************************
+ossimDrect::ossimDrect(const std::vector<ossimDpt>& points,
+                       ossimCoordSysOrientMode mode)
+   :
+      theOrientMode (mode)
+{
+  if(points.size())
+   {
+      unsigned long index;
+      double minx, miny;
+      double maxx, maxy;
+      
+      minx = points[0].x;
+      miny = points[0].y;
+      maxx = points[0].x;
+      maxy = points[0].y;
+            
+      // find the bounds
+      for(index = 1; index < points.size();index++)
+      {
+         
+         minx = std::min(minx, points[index].x);
+         miny = std::min(miny, points[index].y);
+         maxx = std::max(maxx, points[index].x);
+         maxy = std::max(maxy, points[index].y);
+         
+      }
+      if(theOrientMode == OSSIM_LEFT_HANDED)
+      {
+         *this = ossimDrect(minx, miny, maxx, maxy, mode);
+      }
+      else
+      {
+         *this = ossimDrect(minx,maxy, maxx, miny, mode);
+      }
+   }
+   else
+   {
+      makeNan();
+   }
+}
+ossimDrect::ossimDrect(const ossimDpt& p1,
+                       const ossimDpt& p2,
+                       const ossimDpt& p3,
+                       const ossimDpt& p4,
+                       ossimCoordSysOrientMode mode)
+: theOrientMode(mode)
+{
+   if(p1.hasNans()||p2.hasNans()||p3.hasNans()||p4.hasNans())
+   {
+      makeNan();
+   }
+   else
+   {
+      double minx, miny;
+      double maxx, maxy;
+      
+      minx = std::min( p1.x, std::min(p2.x, std::min(p3.x, p4.x)));
+      miny = std::min( p1.y, std::min(p2.y, std::min(p3.y, p4.y)));
+      maxx = std::max( p1.x, std::max(p2.x, std::max(p3.x, p4.x)));
+      maxy = std::max( p1.y, std::max(p2.y, std::max(p3.y, p4.y)));
+      
+      if(mode == OSSIM_LEFT_HANDED)
+      {
+         *this = ossimDrect(minx, miny, maxx, maxy, mode);
+      }
+      else
+      {            
+         *this = ossimDrect(minx,maxy, maxx, miny, mode);
+      }
+   }
+}
+
+
+//*******************************************************************
+//! Constructs an ossimDrect surrounding the specified point, and of specified size.
+//*******************************************************************
+ossimDrect::ossimDrect(const ossimDpt& center, 
+                       const double&   size_x, 
+                       const double&   size_y,
+                       ossimCoordSysOrientMode mode)
+: theOrientMode(mode)
+{
+   double dx = fabs(size_x);
+   double dy = fabs(size_y);
+
+   double minx = center.x - dx/2.0;
+   double maxx = minx + dx;
+
+   double miny = center.y - dy/2.0;
+   double maxy = miny + dy;
+
+   if(mode == OSSIM_LEFT_HANDED)
+      *this = ossimDrect(minx, miny, maxx, maxy, mode);
+   else
+      *this = ossimDrect(minx,maxy, maxx, miny, mode);
+}
+
+ossimDrect::~ossimDrect()
+{
+}
+
+void ossimDrect::initBoundingRect(const std::vector<ossimDpt>& points)
+{
+   unsigned long index;
+
+   // initialize everyone to the first point
+   if(points.size() > 0)
+   {
+      theUlCorner.x = points[0].x;
+      theUlCorner.y = points[0].y;
+      theLrCorner.x = theUlCorner.x;
+      theLrCorner.y = theUlCorner.y;
+   }
+   
+   // find the bounds
+   for(index = 1; index < points.size();index++)
+   {
+      // find left most
+      if(points[index].x < theUlCorner.x)
+         theUlCorner.x = points[index].x;
+
+      // find right most
+      else if(points[index].x > theLrCorner.x)
+         theLrCorner.x = points[index].x;
+
+      if (theOrientMode == OSSIM_LEFT_HANDED)
+      {
+         //find top most
+         if(points[index].y < theUlCorner.y)
+            theUlCorner.y = points[index].y;
+
+         // find bottom most
+         else if(points[index].y > theLrCorner.y)
+            theLrCorner.y = points[index].y;
+      }
+
+      else // right handed coord system
+      {
+         if(points[index].y > theUlCorner.y)
+            theUlCorner.y = points[index].y;
+
+         // find bottom most
+         else if(points[index].y < theLrCorner.y)
+            theLrCorner.y = points[index].y;
+      }
+   }
+
+   // now set the other points for the rect.
+   theUrCorner.x = theLrCorner.x;
+   theUrCorner.y = theUlCorner.y;
+   theLlCorner.x = theUlCorner.x;
+   theLlCorner.y = theLrCorner.y;
+}
+
+//*******************************************************************
+// Public Method:
+//*******************************************************************
+bool ossimDrect::intersects(const ossimDrect& rect) const
+{
+   if(rect.hasNans() || hasNans())
+   {
+      return false;
+   }
+   if (theOrientMode != rect.theOrientMode)
+      return false;
+   
+   ossim_float64  ulx = ossim::max(rect.ul().x,ul().x);
+   ossim_float64  lrx = ossim::min(rect.lr().x,lr().x);
+   ossim_float64  uly, lry;
+   bool rtn=false;
+   if (theOrientMode == OSSIM_LEFT_HANDED)
+   {
+      uly  = ossim::max(rect.ul().y,ul().y);
+      lry  = ossim::min(rect.lr().y,lr().y);
+      rtn = ((ulx <= lrx) && (uly <= lry));
+   }
+   else
+   {
+      uly  = ossim::max(rect.ll().y,ll().y);
+      lry  = ossim::min(rect.ur().y,ur().y);
+      rtn = ((ulx <= lrx) && (uly <= lry));
+   }
+      
+   return (rtn);
+}
+
+//*******************************************************************
+// Public Method: ossimDrect::completely_within
+//*******************************************************************
+bool ossimDrect::completely_within(const ossimDrect& rect) const
+{
+   if(hasNans() || rect.hasNans())
+   {
+      return false;
+   }
+   if (theOrientMode != rect.theOrientMode)
+      return false;
+   
+   /*  --------------
+       |     1      |
+       | ---------- |
+       | |        | |
+       | |        | |
+       | |   2    | |
+       | |        | |
+       | |        | |
+       | ---------- |
+       |            |
+       --------------  */
+
+   bool rtn = true;
+   
+   if (theUlCorner.x < rect.ul().x)
+      rtn = false;
+   
+   else if (theLrCorner.x > rect.lr().x)
+      rtn = false;
+   
+   else if (theOrientMode == OSSIM_LEFT_HANDED)
+   {
+      if (theUlCorner.y < rect.ul().y)
+         rtn = false;
+   
+      else if (theLrCorner.y > rect.lr().y)
+         rtn = false;
+   }
+   
+   else
+   {
+      if (theUlCorner.y > rect.ul().y)
+         rtn = false;
+   
+      else if (theLrCorner.y < rect.lr().y)
+         rtn = false;
+   }
+
+   return rtn;
+}
+
+//*******************************************************************
+// Public Method: ossimDrect::stretchOut
+//*******************************************************************
+void ossimDrect::stretchOut()
+{
+   set_ulx(floor(theUlCorner.x));
+   set_lrx(ceil(theLrCorner.x));
+
+   if (theOrientMode == OSSIM_LEFT_HANDED)
+   {
+      set_uly(floor(theUlCorner.y));
+      set_lry(ceil(theLrCorner.y));
+   }
+   else
+   {
+      set_uly(ceil(theUlCorner.y));
+      set_lry(floor(theLrCorner.y));
+   }
+}
+
+void ossimDrect::stretchToTileBoundary(const ossimDpt& widthHeight)
+{
+   ossimDpt ul;
+   ossimDpt lr;
+   ossim_int32 evenDivision=0;
+
+   if(theOrientMode == OSSIM_LEFT_HANDED)
+   {
+      ul.x = theUlCorner.x;
+      if( fmod(theUlCorner.x, widthHeight.x) != 0)
+      {
+         ul.x = ((long)(ul.x / widthHeight.x))*widthHeight.x;
+         if(ul.x > theUlCorner.x)
+         {
+            ul.x -= widthHeight.x;
+         }
+      }
+      ul.y = theUlCorner.y;
+      if( fmod(theUlCorner.y, widthHeight.y) != 0)
+      {
+         ul.y = ((long)(ul.y / widthHeight.y))*widthHeight.y;
+         if(ul.y > theUlCorner.y)
+         {
+            ul.y -= widthHeight.y;
+         }
+      }
+      
+      evenDivision = fmod(theLrCorner.x, widthHeight.x) == 0;
+      lr.x = theLrCorner.x;
+      if(!evenDivision)
+      {
+         lr.x = ((long)((lr.x)/widthHeight.x)) * widthHeight.x;
+         if(lr.x < theLrCorner.x)
+         {
+            lr.x += widthHeight.x;
+         }
+      }
+
+      evenDivision = fmod(theLrCorner.y, widthHeight.y) == 0;
+      lr.y = theLrCorner.y;
+      if(!evenDivision)
+      {
+         lr.y = ((long)(lr.y/widthHeight.y)) * widthHeight.y;
+         if(lr.y < theLrCorner.y)
+         {
+            lr.y += widthHeight.y;
+         }
+      }
+   }
+   else
+   {
+      ul.x = theUlCorner.x;
+      ul.y = theUlCorner.y;
+      if( !ossim::almostEqual(fmod(theUlCorner.x, widthHeight.x), 0.0))
+      {
+         ul.x = ((long)(ul.x/ widthHeight.x))*widthHeight.x;
+         if(ul.x > theUlCorner.x)
+         {
+            ul.x -= widthHeight.x;
+         }
+      }
+      if( !ossim::almostEqual((double)fmod(theUlCorner.y, widthHeight.y), 0.0) )
+      {
+         ul.y = ((long)(ul.y / widthHeight.y))*widthHeight.y;
+         if(ul.y < theUlCorner.y)
+         {
+            ul.y += widthHeight.y;
+         }
+      }
+      
+      evenDivision = ossim::almostEqual( fmod(theLrCorner.x, widthHeight.x), 0.0);
+      lr.x = theLrCorner.x;
+      if(!evenDivision)
+      {
+         lr.x = ((long)(lr.x/widthHeight.x)) * widthHeight.x;
+         if(lr.x < theLrCorner.x)
+         {
+            lr.x += widthHeight.x;
+         }
+      }
+
+      evenDivision = ossim::almostEqual(fmod(theLrCorner.y, widthHeight.y), 0.0);
+      lr.y = theLrCorner.y;
+      if(!evenDivision)
+      {
+         lr.y = ((long)(lr.y/widthHeight.y)) * widthHeight.y;
+
+         if(lr.y > theLrCorner.y)
+         {
+            lr.y -= widthHeight.y;
+         }
+      }
+  }
+
+   *this = ossimDrect(ul, lr, theOrientMode);
+}
+
+const ossimDrect& ossimDrect::expand(const ossimDpt& padding)
+{
+   theUlCorner.x -= padding.x;
+   theUrCorner.x += padding.x;
+   theLrCorner.x += padding.x;
+   theLlCorner.x -= padding.x;
+   if(theOrientMode == OSSIM_LEFT_HANDED)
+   {
+      theUlCorner.y -= padding.y;
+      theUrCorner.y -= padding.y;
+      theLrCorner.y += padding.y;
+      theLlCorner.y += padding.y;
+   }
+   else
+   {
+      theUlCorner.y += padding.y;
+      theUrCorner.y += padding.y;
+      theLrCorner.y -= padding.y;
+      theLlCorner.y -= padding.y;
+   }
+   
+   return *this;
+}
+ossimString ossimDrect::toString()const
+{
+   ossimString result="(";
+   
+   if(theOrientMode == OSSIM_LEFT_HANDED)
+   {
+      ossimDpt origin = ul();
+      result += (ossimString::toString(origin.x,20) + ",");
+      result += (ossimString::toString(origin.y,20) + ",");
+      result += (ossimString::toString(width(),20) + ",");
+      result += (ossimString::toString(height(),20) + ",");
+      result += "LH";
+   }
+   else 
+   {
+      ossimDpt origin = ll();
+      result += (ossimString::toString(origin.x,20) + ",");
+      result += (ossimString::toString(origin.y,20) + ",");
+      result += (ossimString::toString(width(),20) + ",");
+      result += (ossimString::toString(height(),20) + ",");
+      result += "RH";
+   }
+   
+   result += ")";
+   return result;
+}
+
+bool ossimDrect::toRect(const ossimString& rectString)
+{
+   bool result = false;
+   
+   
+   std::istringstream in(rectString);
+   ossim::skipws(in);
+   char charString[2];
+   charString[1] = '\0';
+   ossimString interior;
+   if(in.peek() == '(')
+   {
+      in.ignore();
+      while((in.peek() != ')')&&
+            (in.peek() != '\n') &&
+            in.good())
+      {
+         charString[0] = in.get();
+         interior += charString;
+      }
+      if(in.peek() == ')')
+      {
+         result = true;
+      }
+   }
+   if(result)
+   {
+      std::vector<ossimString> splitArray;
+      interior.split(splitArray, ",");
+      
+      // assume left handed
+      if(splitArray.size() >= 4)
+      {
+         ossim_float64 x = splitArray[0].toDouble();
+         ossim_float64 y = splitArray[1].toDouble();
+         ossim_float64 w = splitArray[2].toDouble();
+         ossim_float64 h = splitArray[3].toDouble();
+         ossimString orientation = "lh";
+         if(splitArray.size() == 5)
+         {
+            orientation = splitArray[4].downcase();
+         }
+         if(orientation == "lh")
+         {
+            // origin upper left
+            *this = ossimDrect(x,y,x + (w-1), y+h-1, OSSIM_LEFT_HANDED);
+         }
+         else 
+         {
+            // origin lower left so construct and make an upper left
+            *this = ossimDrect(x,y+(h-1),x + (w-1), y, OSSIM_RIGHT_HANDED);
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      
+   }
+   return result;
+}
+
+bool ossimDrect::saveState(ossimKeywordlist& kwl,
+                           const char* prefix)const
+{
+   kwl.add(prefix,
+           ossimKeywordNames::TYPE_KW,
+           "ossimDrect",
+           true);
+
+   kwl.add(prefix, "rect", toString());
+
+   return true;
+}
+
+bool ossimDrect::loadState(const ossimKeywordlist& kwl,
+                           const char* prefix)
+{
+  const char* rect = kwl.find(prefix, "rect");
+  makeNan();
+
+  if(rect)
+  {
+      toRect(rect);
+  }
+   
+   return true;
+}
+
+//*******************************************************************
+// Public Method: ossimDrect::print
+//*******************************************************************
+void ossimDrect::print(std::ostream& os) const
+{
+   os << toString();
+}
+
+//*******************************************************************
+// friend function: operator<<
+//*******************************************************************
+std::ostream& operator<<(std::ostream& os, const ossimDrect& rect)
+{
+   rect.print(os);
+
+   return os;
+}
+
+//*******************************************************************
+// Public Method: ossimDrect::clip
+//*******************************************************************
+bool ossimDrect::clip(ossimDpt &p1, ossimDpt &p2)const
+{
+   if(p1.isNan() || p2.isNan())
+   {
+      return false;
+   }
+   ossimDpt shift(-theUlCorner.x,
+		  -theUlCorner.y);
+
+   ossimDpt tempShiftP1 = p1+shift;
+   ossimDpt tempShiftP2 = p2+shift;
+   double maxW = width()-1;
+   double maxH = height()-1;
+   if (clip_1d (&tempShiftP1.x, &tempShiftP1.y, 
+                &tempShiftP2.x, &tempShiftP2.y, 
+                maxW) == 0)
+   {
+      return false;
+   }
+   if(clip_1d (&tempShiftP1.y, 
+               &tempShiftP1.x, 
+               &tempShiftP2.y, 
+               &tempShiftP2.x, maxH) == 0)
+   {
+      return false;
+   }
+   p1 = tempShiftP1-shift;
+   p2 = tempShiftP2-shift;
+   return true;
+}
+
+//*******************************************************************
+// Public Method: ossimDrect::getCode
+//*******************************************************************
+long ossimDrect::getCode(const ossimDpt& aPoint,
+                         const ossimDrect& clipRect)
+{
+   long result=NONE; // initialize to inside rect
+   
+   if( (aPoint.x > clipRect.lr().x) )
+      result |= RIGHT;
+   else if( (aPoint.x < clipRect.ul().x) )
+      result |= LEFT;
+
+   if (clipRect.theOrientMode == OSSIM_LEFT_HANDED)
+   {
+      if( (aPoint.y < clipRect.ul().y) )
+         result |= TOP;
+      else if( (aPoint.y > clipRect.lr().y) )
+         result |= BOTTOM;
+   }
+   else
+   {
+      if( (aPoint.y > clipRect.ul().y) )
+         result |= TOP;
+      else if( (aPoint.y < clipRect.lr().y) )
+         result |= BOTTOM;
+   }
+      
+   return result;
+}
+
+
+void ossimDrect::splitToQuad(ossimDrect& ulRect,
+                             ossimDrect& urRect,
+                             ossimDrect& lrRect,
+                             ossimDrect& llRect)
+{
+   ossimDpt ulPt  = this->ul();
+   ossimDpt urPt  = this->ur();
+   ossimDpt lrPt  = this->lr();
+   ossimDpt llPt  = this->ll();
+   ossimIpt midPt = this->midPoint();
+   
+   ulRect = ossimDrect(ulPt.x,
+                       ulPt.y,
+                       midPt.x,
+                       midPt.y,
+                       theOrientMode);
+   
+   urRect = ossimDrect(midPt.x,
+                       ulPt.y,
+                       urPt.x,
+                       midPt.y,
+                       theOrientMode);
+   
+   if(theOrientMode  == OSSIM_LEFT_HANDED)
+   {
+      lrRect = ossimDrect(midPt.x,
+                          midPt.y,
+                          lrPt.x,
+                          theOrientMode);
+      llRect = ossimDrect(ulPt.x,
+                          midPt.y,
+                          midPt.x,
+                          llPt.y,
+                          theOrientMode);
+   }
+   else
+   {       
+      lrRect = ossimDrect(midPt.x,
+                          midPt.y,
+                          lrPt.x,
+                          theOrientMode);
+      llRect = ossimDrect(ulPt.x,
+                          midPt.y,
+                          midPt.x,
+                          llPt.y,
+                          theOrientMode);       
+   }
+   
+}
+
+//*******************************************************************
+// Public Method: ossimDrect::clipToRect
+//*******************************************************************
+ossimDrect ossimDrect::clipToRect(const ossimDrect& rect)const
+{
+   ossimDrect result;
+   result.makeNan();
+   if(rect.hasNans() || hasNans())
+   {
+      return result;
+   }
+   
+   if (theOrientMode != rect.theOrientMode)
+      return (*this);
+
+   double x0 = ossim::max(rect.ul().x, ul().x);
+   double x1 = ossim::min(rect.lr().x, lr().x);
+   double y0, y1;
+
+   if (theOrientMode == OSSIM_LEFT_HANDED)
+   {
+      y0 = ossim::max(rect.ul().y, ul().y);
+      y1 = ossim::min(rect.lr().y, lr().y);
+
+      if( (x1 < x0) || (y1 < y0) )
+      {
+         return result;
+      }
+      else
+      {
+         result = ossimDrect(x0, y0, x1, y1, theOrientMode);
+      }
+   }
+   else
+   {
+      y0 = ossim::max(rect.ll().y,ll().y);
+      y1 = ossim::min(rect.ur().y,ur().y);
+      if( (x1 < x0) || (y1 < y0) )
+      {
+         return result;
+      }
+      else
+      {
+         result = ossimDrect(x0, y1, x1, y0, theOrientMode);
+      }
+   }
+   return result;
+}
+
+const ossimDrect& ossimDrect::operator=(const ossimIrect& rect)
+{
+   if(rect.isNan())
+   {
+      makeNan();
+   }
+   else
+   {
+      theUlCorner   = rect.ul();
+      theUrCorner   = rect.ur();
+      theLrCorner   = rect.lr();
+      theLlCorner   = rect.ll();
+      theOrientMode = rect.orientMode();
+   }
+   
+   return *this;
+}
+
+//*************************************************************************************************
+// Finds the point on the rect boundary that is closest to the arg_point. Closest is defined as
+// the minimum perpendicular distance.
+//*************************************************************************************************
+ossimDpt ossimDrect::findClosestEdgePointTo(const ossimDpt& arg_point) const
+{
+   double dXleft  = theUlCorner.x - arg_point.x;
+   double dXright = theLrCorner.x - arg_point.x;
+   double dYupper = theUlCorner.y - arg_point.y;
+   double dYlower = theLrCorner.y - arg_point.y;
+
+   ossimDpt edge_point (theLrCorner);
+
+   if (dXleft*dXright < 0.0)
+      edge_point.x = arg_point.x;
+   else if (fabs(dXleft) < fabs(dXright))
+      edge_point.x = theUlCorner.x;
+
+   if (dYupper*dYlower < 0.0)
+      edge_point.y = arg_point.y;
+   else if (fabs(dYupper) < fabs(dYlower))
+      edge_point.y = theUlCorner.y;
+
+   return edge_point;
+}
+
+
diff --git a/ossim/src/ossim/base/ossimDuration.cpp b/ossim/src/ossim/base/ossimDuration.cpp
new file mode 100644
index 0000000..3867bf1
--- /dev/null
+++ b/ossim/src/ossim/base/ossimDuration.cpp
@@ -0,0 +1,270 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id$
+#include <ossim/base/ossimDuration.h>
+#include <ossim/base/ossimCommon.h>
+#include <sstream>
+#include <cctype>
+ossimDuration::ossimDuration(const ossimString& iso8601Duration)
+:theSign(1),
+theYears(0),
+theMonths(0),
+theWeeks(0),
+theDays(0),
+theHours(0),
+theMinutes(0),
+theSeconds(0)
+{
+   if(!iso8601Duration.empty())
+   {
+      setByIso8601DurationString(iso8601Duration);
+   }
+}
+
+void ossimDuration::clearFields()
+{
+   theSign = 1; 
+   theYears = 0;
+   theMonths = 0;
+   theWeeks = 0;
+   theDays = 0;
+   theHours = 0;
+   theMinutes = 0;
+   theSeconds = 0; 
+}
+
+static bool isWhiteSpace(int c)
+{
+   return ((c==' ') ||
+           (c=='\n')||
+           (c=='\r')||
+           (c=='\t'));
+}
+
+bool ossimDuration::readIso8601Encoding(std::istream& in)
+{
+   clearFields();
+   
+   if(in.peek()=='-')
+   {
+      theSign = -1;
+      in.ignore();
+   }
+   if(in.peek()!='P')
+   {
+      return false;
+   }
+   // skip the period indicater
+   in.ignore();
+   
+   // now we start parsing the date portion and the time portion
+   ossimString value;
+   bool doneFlag     = false;
+   bool badParseFlag = false;
+   bool doingTimeFlag = false;
+   while(!doneFlag)
+   {
+      int c = in.peek();
+      if(!in)
+      {
+         doneFlag = true;
+      }
+      else
+      {
+         if(isWhiteSpace(c))
+         {
+            doneFlag = true; // parse til blank character is met
+         }
+         else if(isalpha(c))
+         {
+            // we are done with current value 
+            //
+            // check to see if was a Time seaprator of value
+            // 'T'
+            if(c == 'T')
+            {
+               // then it was a time separator so do nothing
+               value = ""; // go ahead and null it out for now
+               doingTimeFlag = true; // now in time parsing portion
+            }
+            else
+            {
+               if(doingTimeFlag)
+               {
+                  // check time values
+                  if(c == 'H')
+                  {
+                     theHours = value.toUInt64();
+                  }
+                  else if(c == 'M')
+                  {
+                     theMinutes = value.toUInt64();
+                  }
+                  else if(c == 'S')
+                  {
+                     theSeconds = value.toFloat64();
+                  }
+                  else
+                  {
+                     doneFlag = true;
+                     badParseFlag = true;
+                  }
+                  value = ""; // reset the value
+               }
+               else // check date characters instead
+               {
+                  if(c == 'Y')
+                  {
+                     theYears = value.toUInt64();
+                  }
+                  else if(c == 'M')
+                  {
+                     theMonths = value.toUInt64();
+                  }
+                  else if(c == 'W')
+                  {
+                     theWeeks = value.toUInt64();
+                  }
+                  else if(c == 'D')
+                  {
+                     theDays = value.toUInt64();
+                  }
+                  else
+                  {
+                     doneFlag = true;
+                     badParseFlag = true;
+                  }
+                  value = ""; // reset the value
+               }
+            }
+         }
+         else if(isdigit(c)||(c=='.'))// not an alphabetic character so add it to the value string
+         {
+            value += static_cast<char>(c);
+         }
+         else
+         {
+            doneFlag = true;
+            badParseFlag = true;
+         }
+      }
+      if(!doneFlag)
+      {
+         in.ignore();
+      }
+   }
+   
+   return badParseFlag;
+}
+
+bool ossimDuration::setByIso8601DurationString(const ossimString& iso8601Duration)
+{
+   if(iso8601Duration.empty())
+   {
+      clearFields();
+      return true;
+   }
+   std::istringstream in(iso8601Duration);
+   return readIso8601Encoding(in);
+}
+
+void ossimDuration::toIso8601DurationString(ossimString& result)
+{
+   result = "";
+   bool hasDatePeriod = ((theYears!=0)||
+                         (theMonths!=0)||
+                         (theWeeks!=0)||
+                         (theDays!=0));
+   bool hasTimePeriod = ((theHours!=0)||
+                         (theMinutes!=0)||
+                         (!ossim::almostEqual(theSeconds, 0.0, .00000000001)));
+   // if no time or date period present then return empty
+   if(!(hasDatePeriod || hasTimePeriod))
+   {
+      return;
+   }
+   if(theSign < 0)
+   {
+      result += "-";
+   }
+   result += "P";
+   if(hasDatePeriod)
+   {
+      if(theYears > 0)
+      {
+         result+=ossimString::toString(theYears);
+         result+="Y";
+      }
+      if(theMonths>0)
+      {
+         result+=ossimString::toString(theMonths);
+         result+="M";
+      }
+      if(theWeeks>0)
+      {
+         result+=ossimString::toString(theWeeks);
+         result+="W";
+      }
+      if(theDays>0)
+      {
+         result+=ossimString::toString(theDays);
+         result+="D";
+      }
+   }
+   if(hasTimePeriod)
+   {
+      result+="T";
+      if(theHours>0)
+      {
+         result+=ossimString::toString(theHours);
+         result+="H";
+      }
+      if(theMinutes>0)
+      {
+         result+=ossimString::toString(theMinutes);
+         result+="M";
+      }
+      if(theSeconds>0)
+      {
+         result+=ossimString::toString(theSeconds, 15);
+         result+="S";
+      }
+   }
+}
+
+ossim_float64 ossimDuration::toSeconds()const
+{
+   ossim_float64 result = theSeconds;
+   
+   if(theMinutes > 0)
+   {
+      result += theMinutes*60.0;
+   }
+   if(theHours > 0)
+   {
+      result += theHours*3600.0;
+   }
+   if(theDays > 0)
+   {
+      result += theDays*86400.0;
+   }
+   if(theWeeks > 0)
+   {
+      result += theWeeks*604800;
+   }
+   if(theSign < 0)
+   {
+      result *= -1.0;
+   }
+   return result;
+}
+
+
+
diff --git a/src/ossim/base/ossimEbcdicToAscii.cpp b/ossim/src/ossim/base/ossimEbcdicToAscii.cpp
similarity index 100%
rename from src/ossim/base/ossimEbcdicToAscii.cpp
rename to ossim/src/ossim/base/ossimEbcdicToAscii.cpp
diff --git a/src/ossim/base/ossimEcefPoint.cpp b/ossim/src/ossim/base/ossimEcefPoint.cpp
similarity index 100%
rename from src/ossim/base/ossimEcefPoint.cpp
rename to ossim/src/ossim/base/ossimEcefPoint.cpp
diff --git a/src/ossim/base/ossimEcefRay.cpp b/ossim/src/ossim/base/ossimEcefRay.cpp
similarity index 100%
rename from src/ossim/base/ossimEcefRay.cpp
rename to ossim/src/ossim/base/ossimEcefRay.cpp
diff --git a/src/ossim/base/ossimEcefVector.cpp b/ossim/src/ossim/base/ossimEcefVector.cpp
similarity index 100%
rename from src/ossim/base/ossimEcefVector.cpp
rename to ossim/src/ossim/base/ossimEcefVector.cpp
diff --git a/src/ossim/base/ossimElevationManagerEvent.cpp b/ossim/src/ossim/base/ossimElevationManagerEvent.cpp
similarity index 100%
rename from src/ossim/base/ossimElevationManagerEvent.cpp
rename to ossim/src/ossim/base/ossimElevationManagerEvent.cpp
diff --git a/src/ossim/base/ossimElevationManagerEventListener.cpp b/ossim/src/ossim/base/ossimElevationManagerEventListener.cpp
similarity index 100%
rename from src/ossim/base/ossimElevationManagerEventListener.cpp
rename to ossim/src/ossim/base/ossimElevationManagerEventListener.cpp
diff --git a/ossim/src/ossim/base/ossimEllipsoid.cpp b/ossim/src/ossim/base/ossimEllipsoid.cpp
new file mode 100644
index 0000000..aed940b
--- /dev/null
+++ b/ossim/src/ossim/base/ossimEllipsoid.cpp
@@ -0,0 +1,691 @@
+///*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// DESCRIPTION:
+//   Contains implementation of class ossimEllipsoid. The implementation is
+//   actually for an OBLATE SPHEROID (x.radius = y.radius) as Earth is
+//   considered.
+//
+// SOFTWARE HISTORY:
+//>
+//   06Aug2001  Garrett Potts, Oscar Kramer
+//              Initial coding.
+//<
+//*****************************************************************************
+//  $Id: ossimEllipsoid.cpp 22858 2014-08-05 17:24:50Z dburken $
+
+#include <ossim/base/ossimEllipsoid.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimEllipsoidFactory.h>
+#include <ossim/base/ossimEcefRay.h>
+#include <ossim/base/ossimEcefPoint.h>
+#include <ossim/base/ossimEcefVector.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimMatrix4x4.h>
+
+//***
+// Define Trace flags for use within this file:
+//***
+#include <ossim/base/ossimTrace.h>
+#include <cmath>
+static ossimTrace traceExec  ("ossimEllipsoid:exec");
+static ossimTrace traceDebug ("ossimEllipsoid:debug");
+
+
+//*****************************************************************************
+//  CONSTRUCTOR: ossimEllipsoid #1 (COPY)
+//  
+//*****************************************************************************
+ossimEllipsoid::ossimEllipsoid(const ossimEllipsoid &ellipsoid)
+   :
+      theName(ellipsoid.theName),
+      theCode(ellipsoid.theCode),
+      theEpsgCode(ellipsoid.theEpsgCode),
+      theA(ellipsoid.theA),
+      theB(ellipsoid.theB),
+      theFlattening(ellipsoid.theFlattening),
+      theA_squared(ellipsoid.theA_squared),
+      theB_squared(ellipsoid.theB_squared),
+      theEccentricitySquared(ellipsoid.theEccentricitySquared)
+{
+   if ( theEpsgCode == 0 )
+   {
+      theEpsgCode = ossimEllipsoidFactory::instance()->findEpsgCode(theCode);
+   }
+}
+
+//*****************************************************************************
+//  CONSTRUCTOR: ossimEllipsoid #2
+//  
+//*****************************************************************************
+ossimEllipsoid::ossimEllipsoid(const ossimString &name,
+                               const ossimString &code,
+                               const double &a,
+                               const double &b,
+                               ossim_uint32 epsg_code)
+   :
+      theName(name),
+      theCode(code),
+      theEpsgCode(epsg_code),
+      theA(a),
+      theB(b),
+      theA_squared(a*a),
+      theB_squared(b*b)
+{
+   if (theEpsgCode == 0)
+   {
+      theEpsgCode = ossimEllipsoidFactory::instance()->findEpsgCode(theCode);
+   }
+
+   computeFlattening();   
+   theEccentricitySquared = 2*theFlattening - theFlattening*theFlattening;
+}
+
+ossimEllipsoid::ossimEllipsoid()
+{
+   const ossimEllipsoid* ellipse = ossimEllipsoidFactory::instance()->wgs84();
+   
+   *this = *ellipse;
+}
+
+//*****************************************************************************
+//  CONSTRUCTOR: ossimEllipsoid #3
+//  
+//*****************************************************************************
+ossimEllipsoid::ossimEllipsoid(const double &a,
+                               const double &b)
+   :
+      theName(""), // initialize to empty
+      theCode(""),
+      theEpsgCode(0),
+      theA(a),
+      theB(b),
+      theA_squared(a*a),
+      theB_squared(b*b)
+{
+   // First check if this is just WGS84:
+   const ossimEllipsoid* wgs84 = ossimEllipsoidFactory::instance()->wgs84();
+   if ((theA == wgs84->theA) && (theB == wgs84->theB))
+   {
+      *this = *wgs84;
+   }
+   else
+   {
+      computeFlattening();
+      theEccentricitySquared = 2*theFlattening - theFlattening*theFlattening;
+   }
+}
+
+//*****************************************************************************
+//  METHOD: ossimEllipsoid::nearestIntersection
+//  
+//*****************************************************************************
+bool ossimEllipsoid::nearestIntersection(const ossimEcefRay &ray,
+                                         ossimEcefPoint& rtnPt) const
+{
+   return nearestIntersection(ray, 0.0, rtnPt);
+}
+
+//*****************************************************************************
+//  METHOD: ossimEllipsoid::nearestIntersection
+//  
+//   geographic objects that are derive this class will asssume that
+//   the reference datum is wgs84 and that the ray origin is a
+//   geocentric coordinate relative to the wgs84 datum.  Will return
+//   true if the object was intersected and false otherwise.
+//  
+//   The nearest intersection will use the ray sphere intersection
+//   found in most ray tracers.  We will take a Ray defined by the
+//   parametric equation:
+//  
+//     x = x0 + dxt
+//     y = y0 + dyt
+//     z = z0 + dzt
+//  
+//   and intersect this with the equation of a spheroid:
+//  
+//     x^2/theXRadius^2 + y^2/theYRadius^2 + z^2/theZRadius^2 = 1
+//  
+//  
+//   the intersection is achived by substituting the parametric line
+//   into the equation of the sphereroid.  By doing this you should
+//   get a quadratic in t and the equation should look like this:
+//  
+//    a*t^2 + b*t + c = 0
+//  
+//      let a = dx^2/theXRadius^2 + dy^2/theYRadius^2 + dz^2/theZRadius^2
+//      let b = 2*(x0*dx/theXRadius^2 +y0*dy/theYRadius^2 + z0*dz/theZRadius^2
+//      let c = x0^2/theXRadius^2 + y0^2/theYRadius^2 + z0^2/theZRadius^2 - 1
+//  
+//  
+//    Now solve the quadratic (-b +- sqrt(b^2 - 4ac) ) / 2a
+//  
+//    After solving for t, the parameter is applied to the ray to determine
+//    the 3D point position in X,Y,Z, passed back in rtnPt. The boolean
+//    "true" is returned if an intersection was found.
+//
+//*****************************************************************************
+bool ossimEllipsoid::nearestIntersection(const ossimEcefRay& ray,
+                                         const double&       offset,
+                                         ossimEcefPoint&     rtnPt) const
+{
+   static const char MODULE[] = "ossimEllipsoid::nearestIntersection";
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG: " << MODULE << ", entering...\n";
+
+   
+   double A_squared = (theA + offset)*(theA + offset);
+   double B_squared = (theB + offset)*(theB + offset);
+
+//    double adjustedOffset = offset/theA;
+//    double bOverA = theB/theA;
+//    double A_squared = (1.0+adjustedOffset)*(1.0+adjustedOffset);
+//    double B_squared = ((bOverA+adjustedOffset)*(bOverA+adjustedOffset));//(theB + offset)*(theB + offset);
+   
+   //***
+   // get the origin and direction of ray:
+   //***
+   ossimEcefPoint  start = ray.origin();   
+   ossimEcefVector direction = ray.direction();
+//    start = ossimEcefPoint(start.x()/theA,
+//                           start.y()/theA,
+//                           start.z()/theA);
+   //***
+   // Solve the coefficents of the quadratic formula
+   //***
+   double a = ((direction.x() * direction.x())/A_squared) +
+              ((direction.y() * direction.y())/A_squared) +
+              ((direction.z() * direction.z())/B_squared);
+
+   double b = 2.0*( ((start.x()*direction.x())/A_squared) +
+                    ((start.y()*direction.y())/A_squared) +
+                    ((start.z()*direction.z())/B_squared) );
+
+   double c = ((start.x()*start.x())/A_squared) +
+              ((start.y()*start.y())/A_squared) +
+              ((start.z()*start.z())/B_squared) - 1.0;
+   
+   //***
+   // solve the quadratic
+   //***
+   double root = b*b - 4*a*c;
+   double t;
+   if(root < 0.0)
+   {
+      return false;
+   }
+   else
+   {
+      double squareRoot = sqrt(root);
+      double t1 = (-b + squareRoot ) / (2.0*a);
+      double t2 = (-b - squareRoot ) / (2.0*a);
+
+      //***
+      // sort t1 and t2 and take the nearest intersection if they
+      // are in front of the ray.
+      //***
+      if(t2 < t1)
+      {
+         double temp = t1;
+         t1 = t2;
+         t2 = temp;
+      }     
+
+       if(t1 > 0.0)
+          t = t1;
+       else
+          t = t2;
+//      t = t1;
+   }
+
+   //***
+   // Now apply solved t to ray to extrapolate correct distance to intersection
+   //***
+//    bool rtnval = false;
+//    if (t >= 0)
+//    {
+//       rtnval = true;
+//       rtnPt  = ray.extend(t); 
+// //       rtnPt  = ray.extend(t*theA); 
+//    }
+      
+   bool rtnval = true;
+   rtnPt  = ray.extend(t); 
+
+   return rtnval; 
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimEllipsoid::evaluate(ossimColumnVector3d)
+//  
+//  Returns neg number if inside, 0 if on, and pos number if outside of
+//  ellipsoid.
+//  
+//*****************************************************************************
+double ossimEllipsoid::evaluate(const ossimEcefPoint &location)const
+{
+   //***
+   // get the axis
+   //***
+   return (((location.x() * location.x())/theA_squared) +
+           ((location.y() * location.y())/theA_squared) +
+           ((location.z() * location.z())/theB_squared) - 1.0);   
+}
+ 
+//*****************************************************************************
+//  METHOD: ossimEllipsoid::gradient()  version A
+//  
+//  Returns vector normal to the ellipsoid at point specified.
+//  
+//*****************************************************************************
+void ossimEllipsoid::gradient(const ossimEcefPoint& location,
+                              ossimEcefVector&      result) const
+{
+   result.x() = (2.0*location.x())/theA_squared;
+   result.y() = (2.0*location.y())/theA_squared;
+   result.z() = (2.0*location.z())/theB_squared;
+}
+
+//*****************************************************************************
+//  METHOD: ossimEllipsoid::gradient()  version B
+//  
+//  Returns vector normal to the ellipsoid at point specified.
+//  
+//*****************************************************************************
+ossimEcefVector
+ossimEllipsoid::gradient(const ossimEcefPoint &location)const
+{
+   ossimEcefVector result;
+   gradient(location, result);
+   return result;
+}
+   
+   
+bool ossimEllipsoid::loadState(const ossimKeywordlist& kwl,
+                               const char* prefix)
+{
+   const char* lookup = kwl.find(prefix, ossimKeywordNames::ELLIPSE_CODE_KW);
+   bool foundCode = false;
+   if(lookup)
+   {
+      const ossimEllipsoid* ellipse = ossimEllipsoidFactory::instance()->create(ossimString(lookup));
+
+      if(ellipse)
+      {
+         foundCode = true;
+         *this = *ellipse;
+      }
+   }
+
+   lookup = kwl.find(prefix, ossimKeywordNames::ELLIPSE_EPSG_CODE_KW);
+   if (lookup)
+   {
+      theEpsgCode = ossimString(lookup).toUInt32();
+   }
+
+   if(!foundCode)
+   {     
+      const char* majorAxis = kwl.find(prefix,
+                                       ossimKeywordNames::MAJOR_AXIS_KW);
+      const char* minorAxis = kwl.find(prefix,
+                                       ossimKeywordNames::MAJOR_AXIS_KW);
+
+      theName = "";
+      theCode = "";
+      if(majorAxis && minorAxis)
+      {
+         theA = ossimString(majorAxis).toDouble();
+         theB = ossimString(minorAxis).toDouble();
+
+         computeFlattening();
+         theA_squared = theA*theA;
+         theB_squared = theB*theB;
+      }
+      else
+      {
+         const ossimEllipsoid* ellipse = ossimEllipsoidFactory::instance()->wgs84();
+         
+         *this = *ellipse;
+      }      
+   }
+
+   return true;
+}
+
+bool ossimEllipsoid::saveState(ossimKeywordlist& kwl,
+                               const char* prefix)const
+{
+   if(theCode != "")
+   {
+      kwl.add(prefix,
+              ossimKeywordNames::ELLIPSE_CODE_KW,
+              theCode.c_str(),
+              true);
+
+      kwl.add(prefix,
+              ossimKeywordNames::ELLIPSE_NAME_KW,
+              theName.c_str(),
+              true);
+   }
+   if (theEpsgCode)
+   {
+      kwl.add(prefix, ossimKeywordNames::ELLIPSE_EPSG_CODE_KW, theEpsgCode, true);
+   }
+
+   kwl.add(prefix,
+           ossimKeywordNames::MAJOR_AXIS_KW,
+           theA,
+           true);
+   
+   kwl.add(prefix,
+           ossimKeywordNames::MINOR_AXIS_KW,
+           theB,
+           true);
+
+   return true;
+}
+
+ 
+//*****************************************************************************
+//  METHOD: ossimEllipsoid::prinRadiiOfCurv()
+//  
+//  Computes the meridional radius and prime vertical at given point.
+//  
+//*****************************************************************************
+void ossimEllipsoid::prinRadiiOfCurv(const ossimEcefPoint& location,
+                                           double& merRadius,
+                                           double& primeVert) const
+{
+   double lat, lon, hgt;
+   XYZToLatLonHeight(location.x(), location.y(), location.z(), lat, lon, hgt);
+   
+   double sinPhi = sin(lat*RAD_PER_DEG);
+   double phiFac = 1.0 - theEccentricitySquared*sinPhi*sinPhi;
+   primeVert = theA / sqrt(phiFac);
+   merRadius = theA*(1.0-theEccentricitySquared) / sqrt(phiFac*phiFac*phiFac);
+}
+
+ 
+//*****************************************************************************
+//  METHOD: ossimEllipsoid::jacobianWrtEcef()
+//  
+//  Forms Jacobian of partials of geodetic WRT ECF at given point.
+//           -                           -
+//           | pLat/pX  pLat/pY  pLat/pZ |
+//    jMat = | pLon/pX  pLon/pY  pLon/pZ |
+//           | pHgt/pX  pHgt/pY  pHgt/pZ |
+//           -                           -
+//  
+//*****************************************************************************
+void ossimEllipsoid::jacobianWrtEcef(const ossimEcefPoint& location,
+                                           NEWMAT::Matrix& jMat) const
+{
+   double primeVert;
+   double merRadius;
+   double lat, lon, hgt;
+   
+   XYZToLatLonHeight(location.x(), location.y(), location.z(), lat, lon, hgt);
+   prinRadiiOfCurv(location, merRadius, primeVert);
+   
+   double sinPhi = sin(lat*RAD_PER_DEG);
+   double cosPhi = cos(lat*RAD_PER_DEG);
+   double sinLam = sin(lon*RAD_PER_DEG);
+   double cosLam = cos(lon*RAD_PER_DEG);
+   double N_plus_h = primeVert + hgt;
+   double M_plus_h = merRadius + hgt;
+   
+   jMat(1,1) = -sinPhi * cosLam / M_plus_h;
+   jMat(2,1) = -sinLam / (cosPhi * N_plus_h);
+   jMat(3,1) = cosPhi * cosLam;
+   jMat(1,2) = -sinPhi * sinLam / M_plus_h;
+   jMat(2,2) =  cosLam / (cosPhi * N_plus_h);
+   jMat(3,2) = cosPhi * sinLam;
+   jMat(1,3) = cosPhi / M_plus_h;
+   jMat(2,3) = 0.0;
+   jMat(3,3) = sinPhi;
+}
+
+ 
+//*****************************************************************************
+//  METHOD: ossimEllipsoid::jacobianWrtGeo()
+//  
+//  Forms Jacobian of partials of ECF WRT geodetic at given point.
+//           -                           -
+//           | pX/pLat  pX/pLon  pX/pHgt |
+//    jMat = | pY/pLat  pY/pLon  pY/pHgt |
+//           | pZ/pLat  pZ/pLon  pZ/pHgt |
+//           -                           -
+//  
+//*****************************************************************************
+void ossimEllipsoid::jacobianWrtGeo(const ossimEcefPoint& location,
+                                          NEWMAT::Matrix& jMat) const
+{
+   double primeVert;
+   double merRadius;
+   double lat, lon, hgt;
+   
+   XYZToLatLonHeight(location.x(), location.y(), location.z(), lat, lon, hgt);
+   prinRadiiOfCurv(location, merRadius, primeVert);
+   
+   double sinPhi = sin(lat*RAD_PER_DEG);
+   double cosPhi = cos(lat*RAD_PER_DEG);
+   double sinLam = sin(lon*RAD_PER_DEG);
+   double cosLam = cos(lon*RAD_PER_DEG);
+   double N_plus_h = primeVert + hgt;
+   double M_plus_h = merRadius + hgt;
+   
+   jMat(1,1) = -M_plus_h * sinPhi * cosLam;
+   jMat(2,1) = -M_plus_h * sinPhi * sinLam;
+   jMat(3,1) =  M_plus_h * cosPhi;
+   jMat(1,2) = -N_plus_h * cosPhi * sinLam;
+   jMat(2,2) =  N_plus_h * cosPhi * cosLam;
+   jMat(3,2) = 0.0;
+   jMat(1,3) = cosPhi * cosLam;
+   jMat(2,3) = cosPhi * sinLam;
+   jMat(3,3) = sinPhi;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimEllipsoid::geodeticRadius()
+//  
+//  Computes the "geodetic" radius for a given latitude in degrees
+//  
+//*****************************************************************************
+double ossimEllipsoid::geodeticRadius(const double& lat) const
+{
+   double cos_lat = ossim::cosd(lat);
+   double sin_lat = ossim::sind(lat);
+   double cos2_lat = cos_lat*cos_lat;
+   double sin2_lat = sin_lat*sin_lat;
+   double a2_cos = theA_squared*cos_lat;
+   double b2_sin = theB_squared*sin_lat;
+   
+   return sqrt( ( (a2_cos*a2_cos) + (b2_sin*b2_sin) )/ (theA_squared*cos2_lat + theB_squared*sin2_lat));
+}
+
+//*************************************************************************************************
+//  Computes the "geodetic" radius of curvature of the ellipsoid in the east-west (x) and
+//  north-south (y) directions for a given latitude in DEGREES.
+//  Taken from http://en.wikipedia.org/wiki/Earth_radius
+//*************************************************************************************************
+void ossimEllipsoid::geodeticRadii(const double& lat, ossimDpt& radii) const
+{
+   double cos_lat = ossim::cosd(lat);
+   double sin_lat = ossim::sind(lat);
+   double cos2_lat = cos_lat*cos_lat;
+   double sin2_lat = sin_lat*sin_lat;
+   double H = theA_squared*cos2_lat + theB_squared*sin2_lat;
+   double H3 = H*H*H;
+
+   radii.x = theA_squared/sqrt(H);
+   radii.y = theA_squared*theB_squared/sqrt(H3);
+}
+
+void ossimEllipsoid::latLonHeightToXYZ(double lat, double lon, double height,
+                                       double &x, double &y, double &z)const
+{
+    double sin_latitude = ossim::sind(lat);
+    double cos_latitude = ossim::cosd(lat);
+    double N = theA / sqrt( 1.0 - theEccentricitySquared*sin_latitude*sin_latitude);
+    x = (N+height)*cos_latitude*ossim::cosd(lon);
+    y = (N+height)*cos_latitude*ossim::sind(lon);
+    z = (N*(1-theEccentricitySquared)+height)*sin_latitude;
+}
+
+void ossimEllipsoid::XYZToLatLonHeight(double x, double y, double z,
+                                       double& lat, double& lon, double& height)const
+{
+
+#if 1
+  // Author: Norman J. Goldstein (ngoldstein at SystemSolutionsRD.com, 
+//                              normvcr at telus.net)
+
+  const double tol = 1e-15;
+  const double d = sqrt(x*x + y*y);
+  const int MAX_ITER = 10;
+
+  const double a2 = theA * theA;
+  const double b2 = theB * theB;
+  const double pa2 = d * d * a2;
+  const double qb2 = z * z * b2;
+  const double ae2 = a2 * eccentricitySquared();
+  const double ae4 = ae2 * ae2;
+
+  const double c3 = -( ae4/2 + pa2 + qb2 );          // s^2
+  const double c4 = ae2*( pa2 - qb2 );               // s^1
+  const double c5 = ae4/4 * ( ae4/4 - pa2 - qb2 );   // s^0
+
+  double s0 = 0.5 * (a2 + b2) * hypot( d/theA, z/theB );
+
+  for( int iterIdx = 0; iterIdx < MAX_ITER; ++iterIdx )
+  {
+    const double pol = c5 + s0 * ( c4 + s0 * ( c3 + s0 * s0 ) );
+    const double der = c4 + s0 * ( 2 * c3  + 4 * s0 * s0 );
+
+    const double ds = - pol / der;
+    s0 += ds;
+
+    if( fabs( ds ) < tol * s0 )
+    {
+      const double t = s0 - 0.5 * (a2 + b2);
+      const double x_ell = d / ( 1.0 + t/a2 );
+      const double y_ell = z / ( 1.0 + t/b2 );
+
+      height = ( d - x_ell ) * x_ell/a2 + ( z - y_ell ) * y_ell/b2;
+      height /= hypot( x_ell/a2 ,  y_ell/b2 );
+
+      lat = atan2( y_ell/b2, x_ell/a2 ) * DEG_PER_RAD;
+      lon = atan2( y, x ) * DEG_PER_RAD;
+
+      return;
+    }
+  }
+
+  #else
+   double d = sqrt(x*x + y*y);
+
+   double phi2 = z / ((1 - theEccentricitySquared) * d);
+   double p = 1.0;
+   double phi1 = 0.0;
+   double N1 = 0.0;
+   double height1 = 0.0;
+   int iterIdx = 0;
+   const int MAX_ITER = 10;
+   if (fabs(phi2) > 1e-16 )
+   {
+      while ( (p > 1e-17) && (iterIdx < MAX_ITER))
+      {
+         phi1 = phi2;
+         N1 = theA / sqrt(1.0 - (theEccentricitySquared * pow(sin(phi1), 2.0)));
+         height1 = (d / cos(phi1) - N1);
+         phi2 = atan((z / d) * (1.0 + (theEccentricitySquared * N1 * sin(phi1)) / z));
+         p = fabs(phi2 - phi1);
+         ++iterIdx;
+         /* printf("phi: %e   phi2: %e   p: %e  \n", phi1, phi2, p); */
+      }                                                                                           
+   }                                                                                                   
+   else
+   {                                                                                              
+      phi1 = phi2;                                                                                
+      N1 = theA / sqrt(1.0 - (theEccentricitySquared * pow(sin(phi1), 2.0)));                    
+      height1 = (d / cos(phi1)) - N1;                                                             
+   }                                                                                                   
+
+   /* *Latitude = phi2 * 180/PI; */
+   /* *Longitude = atan2(Y, X) * 180/PI; */
+   lat = phi2*DEG_PER_RAD; 
+   lon = atan2(y, x)*DEG_PER_RAD;                                                                
+   height = height1; 
+#endif
+}
+
+void ossimEllipsoid::computeLocalToWorldTransformFromXYZ(double x, double y, double z,
+                                                         ossimMatrix4x4& localToWorld)const
+{
+   localToWorld = ossimMatrix4x4::createIdentity();
+   NEWMAT::Matrix& m = localToWorld.getData();
+
+   // put in the translation
+   m[0][3] = x;
+   m[1][3] = y;
+   m[2][3] = z;
+   
+
+
+    // normalize X,Y,Z
+    double inverse_length = 1.0/sqrt(x*x + y*y + z*z);
+    
+    x *= inverse_length;
+    y *= inverse_length;
+    z *= inverse_length;
+
+    double length_XY = sqrt(x*x + y*y);
+    double inverse_length_XY = 1.0/length_XY;
+
+    // Vx = |(-Y,X,0)|
+    m[0][0] = -y*inverse_length_XY;
+    m[1][0] = x*inverse_length_XY;
+    m[2][0] = 0.0;
+
+    // Vy = /(-Z*X/(sqrt(X*X+Y*Y), -Z*Y/(sqrt(X*X+Y*Y),sqrt(X*X+Y*Y))| 
+    double Vy_x = -z*x*inverse_length_XY;
+    double Vy_y = -z*y*inverse_length_XY;
+    double Vy_z = length_XY;
+    inverse_length = 1.0/sqrt(Vy_x*Vy_x + Vy_y*Vy_y + Vy_z*Vy_z);            
+    m[0][1] = Vy_x*inverse_length;
+    m[1][1] = Vy_y*inverse_length;
+    m[2][1] = Vy_z*inverse_length;
+
+    // Vz = (X,Y,Z)
+    m[0][2] = x;
+    m[1][2] = y;
+    m[2][2] = z;
+   
+}
+
+ossim_uint32 ossimEllipsoid::getEpsgCode() const
+{
+   if (!theCode.empty() && (theEpsgCode == 0))
+      theEpsgCode = ossimEllipsoidFactory::instance()->findEpsgCode(theCode);
+   return theEpsgCode;
+}
+
+const ossimEllipsoid& ossimEllipsoid::operator=(const ossimEllipsoid& copy_me)
+{
+   if (this != &copy_me)
+   {
+      theName = copy_me.theName;
+      theCode = copy_me.theCode;
+      theEpsgCode = copy_me.theEpsgCode;
+      theA = copy_me.theA;  
+      theB = copy_me.theB;  
+      theFlattening = copy_me.theFlattening;
+      theA_squared = copy_me.theA_squared;
+      theB_squared = copy_me.theB_squared;
+      theEccentricitySquared = copy_me.theEccentricitySquared;
+   }
+   return *this;
+}
diff --git a/ossim/src/ossim/base/ossimEllipsoidFactory.cpp b/ossim/src/ossim/base/ossimEllipsoidFactory.cpp
new file mode 100644
index 0000000..6c6632d
--- /dev/null
+++ b/ossim/src/ossim/base/ossimEllipsoidFactory.cpp
@@ -0,0 +1,243 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+// 
+//*******************************************************************
+//  $Id: ossimEllipsoidFactory.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/base/ossimEllipsoidFactory.h>
+#include <ossim/base/ossimEllipsoid.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimString.h>
+
+ossimEllipsoidFactory* ossimEllipsoidFactory::instance()
+{
+   static ossimEllipsoidFactory inst;
+
+   //---
+   // Boolean test here is necessary to avoid infinite loop from Ellipsoid
+   // classes calling this factory's instance() method. Leave this convoluted
+   // code as is. (OLK 09/14)
+   //---
+   static bool testInst = false;
+   if(!testInst)
+   {
+      testInst = true;
+      inst.initializeTable();
+   }
+   
+   return &inst;
+} 
+
+ossimEllipsoidFactory::ossimEllipsoidFactory()
+{
+}
+
+ossimEllipsoidFactory::~ossimEllipsoidFactory()
+{
+   deleteAll();
+}
+
+const ossimEllipsoid* ossimEllipsoidFactory::create(const ossimString &code)const
+{
+   // Can be 2-letter code or EPSG integer code for ellipsoids (7000-series). Make sure it is alpha:
+   if ( code.empty() )
+   {
+      return 0;
+   }
+
+   const ossimEllipsoid* ellipsoid = 0;
+   ossimString alphaCode = code;
+
+   // Check if the code passed in was actually numeric EPSG (vs. two char alpha code):
+      ossim_uint32 epsg_code = code.toUInt32();
+      if (epsg_code)
+      {
+         // EPSG was specified, fetch the equivalent alpha code from the map:
+         EpsgTableType::const_iterator iter = theEpsgTable.find(epsg_code);
+         if (iter != theEpsgTable.end())
+            alphaCode = (*iter).second;
+         }
+
+      // Established two-letter code. Now fetch the ellipsoid instance:
+      TableType::const_iterator iter = theEllipsoidTable.find(alphaCode);
+      if(iter != theEllipsoidTable.end())
+         ellipsoid = iter->second;
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "ossimEllipsoidFactory::create WARNING:"
+            << "\nDid not create ellipsoid for code: " << code << std::endl;
+      }
+   
+   return ellipsoid;
+}
+
+void ossimEllipsoidFactory::initializeTable()
+{
+   // Do nothing if tables were already initialized:
+   if (!theEllipsoidTable.empty())
+   {
+      return;
+   }
+
+   // This table bridges between EPSG 7000-series codes to two-letter code:
+   theEpsgTable.insert(std::make_pair(7001, std::string("AA")));   
+   theEpsgTable.insert(std::make_pair(7002, std::string("AM")));
+   theEpsgTable.insert(std::make_pair(7003, std::string("AN")));
+   theEpsgTable.insert(std::make_pair(7004, std::string("BR")));
+   theEpsgTable.insert(std::make_pair(7006, std::string("BN")));
+   theEpsgTable.insert(std::make_pair(7008, std::string("CC")));
+   theEpsgTable.insert(std::make_pair(7012, std::string("CD")));
+   theEpsgTable.insert(std::make_pair(7011, std::string("CE")));
+   theEpsgTable.insert(std::make_pair(7015, std::string("EA")));
+   theEpsgTable.insert(std::make_pair(7016, std::string("EB")));
+   theEpsgTable.insert(std::make_pair(7044, std::string("EC")));
+   theEpsgTable.insert(std::make_pair(7056, std::string("ED")));
+   theEpsgTable.insert(std::make_pair(7018, std::string("EE")));
+   theEpsgTable.insert(std::make_pair(7019, std::string("RF")));
+   theEpsgTable.insert(std::make_pair(7020, std::string("HE")));
+   theEpsgTable.insert(std::make_pair(7053, std::string("HO")));
+   theEpsgTable.insert(std::make_pair(7021, std::string("ID")));
+   theEpsgTable.insert(std::make_pair(7022, std::string("IN")));
+   theEpsgTable.insert(std::make_pair(7024, std::string("KA")));
+   theEpsgTable.insert(std::make_pair(7003, std::string("SA"))); // Same as "AN"
+   theEpsgTable.insert(std::make_pair(7043, std::string("WD")));
+   theEpsgTable.insert(std::make_pair(7030, std::string("WE")));
+   theEpsgTable.insert(std::make_pair(7059, std::string("PV")));
+
+   theEllipsoidTable.insert(std::make_pair(std::string("AA"),
+      new ossimEllipsoid(std::string("Airy"), std::string("AA"), 
+      6377563.396, 6356256.9090, 7001)));   
+   theEllipsoidTable.insert(std::make_pair(std::string("AM"),
+      new ossimEllipsoid(std::string("Modified Airy"), std::string("AM"), 
+      6377340.189, 6356034.448, 7002)));
+   theEllipsoidTable.insert(std::make_pair(std::string("AN"),
+      new ossimEllipsoid(std::string("Australian National"), std::string("AN"), 
+      6378160.000, 6356774.7190, 7003)));
+   theEllipsoidTable.insert(std::make_pair(std::string("BR"),
+      new ossimEllipsoid(std::string("Bessel 1841"), std::string("BR"), 
+      6377397.155, 6356078.9630, 7004)));
+   theEllipsoidTable.insert(std::make_pair(std::string("BN"),
+      new ossimEllipsoid(std::string("Bessel 1841(Namibia)"), std::string("BN"), 
+      6377483.865, 6356165.3830, 7006)));
+   theEllipsoidTable.insert(std::make_pair(std::string("CC"),
+      new ossimEllipsoid(std::string("Clarke 1866"), std::string("CC"), 
+      6378206.400, 6356583.8000, 7008)));
+   theEllipsoidTable.insert(std::make_pair(std::string("CD"),
+      new ossimEllipsoid(std::string("Clarke 1880"), std::string("CD"), 
+      6378249.145, 6356514.8700, 7012)));
+   theEllipsoidTable.insert(std::make_pair(std::string("CE"),
+      new ossimEllipsoid(std::string("Clarke 1880 (IGN)EPSG 7011"), std::string("CE"), 
+      6378249.200, 6356515.0000, 7011)));
+   theEllipsoidTable.insert(std::make_pair(std::string("EA"),
+      new ossimEllipsoid(std::string("Everest"), std::string("EA"), 
+      6377276.345, 6356075.4130, 7015)));
+   theEllipsoidTable.insert(std::make_pair(std::string("EB"),
+      new ossimEllipsoid(std::string("Everest (E. Malasia, Brunei)"), std::string("EB"), 
+      6377298.556, 6356097.55, 7016)));
+   theEllipsoidTable.insert(std::make_pair(std::string("EC"),
+      new ossimEllipsoid(std::string("Everest 1956 (India)"), std::string("EC"), 
+      6377301.243, 6356100.228, 7044)));
+   theEllipsoidTable.insert(std::make_pair(std::string("ED"),
+      new ossimEllipsoid(std::string("Everest 1969 (West Malasia)"), std::string("ED"), 
+      6377295.664, 6356094.668, 7056)));
+   theEllipsoidTable.insert(std::make_pair(std::string("EE"),
+      new ossimEllipsoid(std::string("Everest 1948(W.Mals. & Sing.)"), std::string("EE"), 
+      6377304.063, 6356103.039, 7018)));
+
+   // No codes for next two:
+   theEllipsoidTable.insert(std::make_pair(std::string("EF"),
+      new ossimEllipsoid(std::string("Everest (Pakistan)"), std::string("EF"), 
+                         6377309.613, 6356109.571, 0)));
+   theEllipsoidTable.insert(std::make_pair(std::string("FA"),
+      new ossimEllipsoid(std::string("Mod. Fischer 1960(South Asia)"), std::string("FA"), 
+                         6378155.0, 6356773.32, 0)));
+      
+   theEllipsoidTable.insert(std::make_pair(std::string("RF"),
+      new ossimEllipsoid(std::string("GRS 80"), std::string("RF"), 
+      6378137.0, 6356752.3141, 7019)));
+   theEllipsoidTable.insert(std::make_pair(std::string("HE"),
+      new ossimEllipsoid(std::string("Helmert 1906"), std::string("HE"), 
+      6378200.0, 6356818.17, 7020)));
+   theEllipsoidTable.insert(std::make_pair(std::string("HO"),
+      new ossimEllipsoid(std::string("Hough"), std::string("HO"), 
+      6378270.0, 6356794.3430, 7053)));
+   theEllipsoidTable.insert(std::make_pair(std::string("ID"),
+      new ossimEllipsoid(std::string("Indonesian 1974"), std::string("ID"), 
+      6378160.0, 6356774.504, 7021)));
+   theEllipsoidTable.insert(std::make_pair(std::string("IN"),
+      new ossimEllipsoid(std::string("International 1924"), std::string("IN"), 
+      6378388.0, 6356911.946, 7022)));
+   theEllipsoidTable.insert(std::make_pair(std::string("KA"),
+      new ossimEllipsoid(std::string("Krassovsky"), std::string("KA"), 
+      6378245.0, 6356863.0190, 7024)));
+   theEllipsoidTable.insert(std::make_pair(std::string("SA"),
+      new ossimEllipsoid(std::string("South American 1969"),std::string("SA"), 
+      6378160.0, 6356774.719, 7003)));
+   theEllipsoidTable.insert(std::make_pair(std::string("WD"),
+      new ossimEllipsoid(std::string("WGS 72"), std::string("WD"), 
+      6378135.000, 6356750.5200, 7043)));
+   theEllipsoidTable.insert(std::make_pair(std::string("WE"),
+      new ossimEllipsoid(std::string("WGS 84"), std::string("WE"), 
+      6378137.000, 6356752.3142, 7030)));
+   theEllipsoidTable.insert(std::make_pair(std::string("PV"),
+      new ossimEllipsoid(std::string("Popular Visualization Sphere"), std::string("7059"), 
+      6378137.000, 6378137.000, 7059)));
+
+   theWgs84Ellipsoid = new ossimEllipsoid(std::string("WGS 84"), std::string("WE"), 
+      6378137.000, 6356752.3142, 7030);
+   theWgs72Ellipsoid = new ossimEllipsoid(std::string("WGS 72"), std::string("WD"), 
+      6378135.000, 6356750.5200, 7043);
+}
+
+void ossimEllipsoidFactory::deleteAll()
+{
+   TableType::const_iterator ellipsoid = theEllipsoidTable.begin();
+   
+   while(ellipsoid != theEllipsoidTable.end())
+   {
+      delete (*ellipsoid).second;
+      ++ellipsoid;
+   }
+
+   theEllipsoidTable.clear();
+   theEpsgTable.clear();
+
+   if (theWgs84Ellipsoid)
+   {
+      delete theWgs84Ellipsoid;
+      theWgs84Ellipsoid = 0;
+   }
+   if (theWgs72Ellipsoid)
+   {
+      delete theWgs72Ellipsoid;
+      theWgs72Ellipsoid = 0;
+   }
+}
+
+//*************************************************************************************************
+// Given an alpha code (for example "WE" for WGS84), returns the corresponding EPSG code or 0
+// if not found.
+//*************************************************************************************************
+ossim_uint32 ossimEllipsoidFactory::findEpsgCode(const ossimString& alpha_code) const
+{
+   ossim_uint32 epsg_code = 0;
+   if (alpha_code.empty())
+      return 0;
+
+   EpsgTableType::const_iterator iter = theEpsgTable.begin();
+   while ((iter != theEpsgTable.end()) && (epsg_code == 0))
+   {
+      if (iter->second == alpha_code.string())
+      {
+         epsg_code = iter->first;
+      }
+      iter++;
+   }
+   return epsg_code;
+}
+
diff --git a/src/ossim/base/ossimEndian.cpp b/ossim/src/ossim/base/ossimEndian.cpp
similarity index 100%
rename from src/ossim/base/ossimEndian.cpp
rename to ossim/src/ossim/base/ossimEndian.cpp
diff --git a/src/ossim/base/ossimEnvironmentUtility.cpp b/ossim/src/ossim/base/ossimEnvironmentUtility.cpp
similarity index 100%
rename from src/ossim/base/ossimEnvironmentUtility.cpp
rename to ossim/src/ossim/base/ossimEnvironmentUtility.cpp
diff --git a/ossim/src/ossim/base/ossimEpsgDatumFactory.cpp b/ossim/src/ossim/base/ossimEpsgDatumFactory.cpp
new file mode 100644
index 0000000..e8e7541
--- /dev/null
+++ b/ossim/src/ossim/base/ossimEpsgDatumFactory.cpp
@@ -0,0 +1,243 @@
+//*************************************************************************************************
+// 
+//                          OSSIM -- Open Source Software Image Map
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Oscar Kramer
+//
+// Description: Factory for creating datums from EPSG datum codes (a.k.a. GCS codes)
+// 
+//*************************************************************************************************
+//  $Id$
+
+#include <ossim/base/ossimEpsgDatumFactory.h>
+#include <ossim/base/ossimEllipsoidFactory.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimString.h>
+
+#include <cstring> /* for strlen */
+#include <utility> /* for std::make_pair */
+
+//ossimEpsgDatumFactory* ossimEpsgDatumFactory::m_instance = 0;
+
+//*************************************************************************************************
+//! Singleton implementation.
+//*************************************************************************************************
+ossimEpsgDatumFactory* ossimEpsgDatumFactory::instance()
+{
+   static ossimEpsgDatumFactory inst;
+
+   return &inst;
+  // if(!m_instance) 
+  //    m_instance = new ossimEpsgDatumFactory;
+  // return m_instance; 
+} 
+
+//*************************************************************************************************
+// Hidden constructor part of singleton implementation.
+// Intializes the map from EPSG numeric to OSSIM/Geotrans alpha codes
+// Datums marked questionable because of ambiguities in the name. Need to check the actual 
+// datum definition to make sure these are correct. (most are fairly obscure)
+//*************************************************************************************************
+ossimEpsgDatumFactory::ossimEpsgDatumFactory()
+{
+   m_epsgToAlphaMap.insert(std::make_pair(6135, std::string("OHI-M"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6139, std::string("PUR"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6152, std::string("NAR"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6154, std::string("EUR-M"))); // QUESTIONABLE  
+   m_epsgToAlphaMap.insert(std::make_pair(6155, std::string("DAL"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6156, std::string("CCD"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6158, std::string("NAP"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6165, std::string("BID"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6169, std::string("AMA"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6175, std::string("SRL")));   // QUESTIONABLE 
+   m_epsgToAlphaMap.insert(std::make_pair(6201, std::string("ADI-M"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6202, std::string("AUA"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6203, std::string("AUG"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6204, std::string("AIN-A"))); // QUESTIONABLE 
+   m_epsgToAlphaMap.insert(std::make_pair(6205, std::string("AFG"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6209, std::string("ARF-M"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6210, std::string("ARS-M"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6216, std::string("BER"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6218, std::string("BOO")));   // QUESTIONABLE 
+   m_epsgToAlphaMap.insert(std::make_pair(6219, std::string("BUR"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6221, std::string("CAI"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6222, std::string("CAP"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6223, std::string("CGE"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6224, std::string("CHU"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6236, std::string("HTN"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6238, std::string("IDN"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6239, std::string("INF-A"))); // QUESTIONABLE 
+   m_epsgToAlphaMap.insert(std::make_pair(6240, std::string("INH-A"))); // QUESTIONABLE 
+   m_epsgToAlphaMap.insert(std::make_pair(6244, std::string("KAN"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6245, std::string("KEA"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6248, std::string("PRP-M"))); // QUESTIONABLE 
+   m_epsgToAlphaMap.insert(std::make_pair(6250, std::string("LEH"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6251, std::string("LIB"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6253, std::string("LUZ-A"))); // QUESTIONABLE 
+   m_epsgToAlphaMap.insert(std::make_pair(6255, std::string("HEN"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6256, std::string("MIK"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6261, std::string("MER"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6262, std::string("MAS"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6263, std::string("MIN-A"))); // QUESTIONABLE 
+   m_epsgToAlphaMap.insert(std::make_pair(6266, std::string("MPO"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6267, std::string("NAS-C"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6269, std::string("NAR-C"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6270, std::string("NAH-C"))); // QUESTIONABLE
+   m_epsgToAlphaMap.insert(std::make_pair(6282, std::string("PTN"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6284, std::string("PUK"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6285, std::string("QAT")));   // QUESTIONABLE
+   m_epsgToAlphaMap.insert(std::make_pair(6287, std::string("QUO"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6292, std::string("SAP"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6293, std::string("SCK"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6297, std::string("TAN"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6298, std::string("TIL"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6301, std::string("TOY-M"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6304, std::string("VOI")));   // QUESTIONABLE 
+   m_epsgToAlphaMap.insert(std::make_pair(6307, std::string("NSD"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6309, std::string("YAC"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6311, std::string("ZAN"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6322, std::string("WGD"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6326, std::string("WGE"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6601, std::string("AIA"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6604, std::string("ASM"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6611, std::string("HKD")));   // QUESTIONABLE
+   m_epsgToAlphaMap.insert(std::make_pair(6613, std::string("GSE"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6615, std::string("POS"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6616, std::string("SGM"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6618, std::string("SAN-M"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6658, std::string("HJO"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6668, std::string("EUS"))); 
+   m_epsgToAlphaMap.insert(std::make_pair(6807, std::string("NTF"))); 
+} 
+
+//*************************************************************************************************
+//! Destructor
+//*************************************************************************************************
+ossimEpsgDatumFactory::~ossimEpsgDatumFactory()
+{
+}
+
+//*************************************************************************************************
+//! Creates given an EPSG spec in the form "EPSG:<datum_code>".
+//*************************************************************************************************
+const ossimDatum* ossimEpsgDatumFactory::create(const ossimString &epsg_spec) const
+{
+   if ( epsg_spec.size() )
+   {
+      ossim_uint32 gcs_code;
+      ossimString group; // assume we are working with EPSG codes
+      if (epsg_spec.contains(":"))
+      {
+         group = epsg_spec.before(":");
+         gcs_code = epsg_spec.after(":").toUInt32();
+      }
+      else
+      {
+         group = "EPSG"; // No group spec provided, assuming EPSG:
+         gcs_code = epsg_spec.toUInt32();
+      }
+      if ((group != "EPSG") || (gcs_code == 0))
+         return 0;
+
+      return create(gcs_code);
+   }
+   return 0;
+}
+
+//*************************************************************************************************
+//! Creates a datum instance given a KWL and prefix
+//*************************************************************************************************
+const ossimDatum* 
+ossimEpsgDatumFactory::create(const ossimKeywordlist& kwl, const char *prefix) const
+{
+   ossimString lookup = kwl.find(prefix, ossimKeywordNames::GCS_CODE_KW);
+   if(!lookup.empty())
+      return create(lookup);
+   return 0;
+
+}
+//*************************************************************************************************
+//! Creates given an EPSG spec in the form "EPSG:<datum_code>".
+//*************************************************************************************************
+const ossimDatum* ossimEpsgDatumFactory::create(ossim_uint32 datum_code) const
+{
+   // Geographic coordinate system codes (4XXX) are sometimes used in place of their corresponding
+   // datum code (6XXX). Check for this possibility and transpose the code if so:
+   if ((datum_code >= 4135) && (datum_code <= 4807))
+      datum_code += 2000;
+
+   // Find the datum code in the map in order to determine the corresponding OSSIM/Geotrans alpha
+   // code. Then use the datum factory to create the datum.
+   ossimString alphaCode = findAlphaCode(datum_code);
+   if (!alphaCode.empty())
+      return ossimDatumFactory::instance()->create(alphaCode);
+
+   return 0;
+}
+
+//*************************************************************************************************
+//! Returns list of all datums supported, in the form of "EPSG:<code>, <datum_name>".
+//*************************************************************************************************
+void ossimEpsgDatumFactory::getList(std::vector<ossimString>& list) const
+{
+   ossimDatumFactory* df = ossimDatumFactory::instance();
+   const ossimDatum* datum;
+   std::map<ossim_uint32, std::string>::const_iterator iter = m_epsgToAlphaMap.begin();
+
+   // Loop over all handled datum codes and instantiate the corresponding datum in order to
+   // get the corresponding OSSIM/Geotrans name. Eventually the datum info (including its name as
+   // it appears in the EPSG database) will be read directly from the Db without using
+   // ossimDatumFactory.
+   while(iter != m_epsgToAlphaMap.end())
+   {
+      datum = df->create(iter->second);
+      if (datum)
+      {
+         ossimString entry ("EPSG:");
+         entry += ossimString::toString(iter->first);
+         entry += ",";
+         entry += datum->name();
+         list.push_back(entry);
+      }
+      ++iter;
+   }
+}
+
+//*************************************************************************************************
+//! Specific to this factory only. Given an alpha-code, returns equivalent EPSG datum code or
+//! 0 if not found.
+//*************************************************************************************************
+ossim_uint32 ossimEpsgDatumFactory::findEpsgCode(const ossimString& alpha_code) const
+{
+   std::map<ossim_uint32, std::string>::const_iterator iter = m_epsgToAlphaMap.begin();
+   while (iter != m_epsgToAlphaMap.end())
+   {
+      if (iter->second == alpha_code.string())
+         return iter->first;
+      ++iter;
+   }
+   return 0;
+}
+
+//*************************************************************************************************
+//! Specific to this factory only. Given an EPSG, returns equivalent alpha-code datum code or
+//! empty string if not found.
+//*************************************************************************************************
+ossimString ossimEpsgDatumFactory::findAlphaCode(ossim_uint32 epsg_code) const
+{
+   ossimString result("");
+   std::map<ossim_uint32, std::string>::const_iterator iter = m_epsgToAlphaMap.find(epsg_code);
+   if (iter != m_epsgToAlphaMap.end())
+   {
+      result = iter->second;
+   }
+   return result;
+}
+
+
diff --git a/ossim/src/ossim/base/ossimEquTokenizer.cpp b/ossim/src/ossim/base/ossimEquTokenizer.cpp
new file mode 100644
index 0000000..6837588
--- /dev/null
+++ b/ossim/src/ossim/base/ossimEquTokenizer.cpp
@@ -0,0 +1,1817 @@
+//#define yyFlexLexer ossimEquTokenizerFlexLexer
+//#define yywrap ossimEquTokenizerwrap
+#include <ossim/base/ossimEquTokenizer.h>
+/* A lexical scanner generated by flex */
+
+/* Scanner skeleton version:
+ * $Header$
+ */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+
+
+
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
+#endif
+#endif
+
+
+#ifdef __cplusplus
+
+#include <cstdio> /* for EOF */
+#include <cstdlib>
+#include <iostream>
+#include <fstream>
+using namespace std;
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else	/* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_PROTOS
+#define YY_USE_CONST
+
+#endif	/* __STDC__ */
+#endif	/* ! __cplusplus */
+
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition.  This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state.  The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#define YY_BUF_SIZE 16384
+
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+
+extern int yyleng;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator).  This
+ * avoids problems with code like:
+ *
+ * 	if ( condition_holds )
+ *		yyless( 5 );
+ *	else
+ *		do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+		*yy_cp = yy_hold_char; \
+		YY_RESTORE_YY_MORE_OFFSET \
+		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+		} \
+	while ( 0 )
+
+#define unput(c) yyunput( c, yytext_ptr )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+typedef unsigned int yy_size_t;
+
+
+struct yy_buffer_state
+	{
+	istream* yy_input_file;
+
+	char *yy_ch_buf;		/* input buffer */
+	char *yy_buf_pos;		/* current position in input buffer */
+
+	/* Size of input buffer in bytes, not including room for EOB
+	 * characters.
+	 */
+	yy_size_t yy_buf_size;
+
+	/* Number of characters read into yy_ch_buf, not including EOB
+	 * characters.
+	 */
+	int yy_n_chars;
+
+	/* Whether we "own" the buffer - i.e., we know we created it,
+	 * and can realloc() it to grow it, and should free() it to
+	 * delete it.
+	 */
+	int yy_is_our_buffer;
+
+	/* Whether this is an "interactive" input source; if so, and
+	 * if we're using stdio for input, then we want to use getc()
+	 * instead of fread(), to make sure we stop fetching input after
+	 * each newline.
+	 */
+	int yy_is_interactive;
+
+	/* Whether we're considered to be at the beginning of a line.
+	 * If so, '^' rules will be active on the next match, otherwise
+	 * not.
+	 */
+	int yy_at_bol;
+
+	/* Whether to try to fill the input buffer when we reach the
+	 * end of it.
+	 */
+	int yy_fill_buffer;
+
+	int yy_buffer_status;
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+	/* When an EOF's been seen but there's still some text to process
+	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+	 * shouldn't try reading from the input source any more.  We might
+	 * still have a bunch of tokens to match, though, because of
+	 * possible backing-up.
+	 *
+	 * When we actually see the EOF, we change the status to "new"
+	 * (via yyrestart()), so that the user can continue scanning by
+	 * just pointing yyin at a new input file.
+	 */
+#define YY_BUFFER_EOF_PENDING 2
+	};
+
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ */
+#define YY_CURRENT_BUFFER yy_current_buffer
+
+
+
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
+static void yy_flex_free YY_PROTO(( void * ));
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+	{ \
+	if ( ! yy_current_buffer ) \
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+	yy_current_buffer->yy_is_interactive = is_interactive; \
+	}
+
+#define yy_set_bol(at_bol) \
+	{ \
+	if ( ! yy_current_buffer ) \
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+	yy_current_buffer->yy_at_bol = at_bol; \
+	}
+
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+
+typedef unsigned char YY_CHAR;
+#define yytext_ptr yytext
+#define YY_INTERACTIVE
+
+//#include <ossim/base/ossimFlexLexer.h>
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+	yytext_ptr = yy_bp; \
+	yyleng = (int) (yy_cp - yy_bp); \
+	yy_hold_char = *yy_cp; \
+	*yy_cp = '\0'; \
+	yy_c_buf_p = yy_cp;
+
+#define YY_NUM_RULES 52
+#define YY_END_OF_BUFFER 53
+static yyconst short int yy_accept[119] =
+    {   0,
+        0,    0,   53,   52,    1,   11,    7,   14,   15,    5,
+        9,    3,   10,   52,    4,    2,   49,   52,   47,   52,
+       12,   13,   16,   52,   52,   52,   52,   52,   52,   52,
+       52,   52,   52,    6,    8,    1,    2,    2,    2,    0,
+       50,   51,   46,   48,   19,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,   18,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    2,   35,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,   27,   22,   20,   38,
+       37,    0,   23,    0,   31,   17,    0,    2,   29,   25,
+        0,   33,   42,    0,    0,   44,   39,   28,    0,    0,
+
+       24,   36,   32,   30,   26,    0,   34,   41,   45,   21,
+       40,    0,    0,    0,    0,    0,   43,    0
+    } ;
+
+static yyconst int yy_ec[256] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    2,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    2,    1,    1,    1,    1,    3,    4,    1,    5,
+        6,    7,    8,    9,   10,   11,   12,   13,   14,   15,
+       15,   15,   15,   15,   15,   15,   15,    1,    1,   16,
+       17,   18,    1,    1,    1,    1,    1,    1,   19,    1,
+        1,    1,   20,    1,    1,    1,    1,    1,    1,   21,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+       22,    1,   23,   24,   25,    1,   26,   27,   28,   29,
+
+       30,   31,   32,   33,   34,    1,    1,   35,   36,   37,
+       38,   39,   40,   41,   42,   43,   44,   45,    1,   46,
+        1,    1,    1,   47,    1,   48,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1
+    } ;
+
+static yyconst int yy_meta[49] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1
+    } ;
+
+static yyconst short int yy_base[119] =
+    {   0,
+        0,    0,  170,  171,  167,  171,  171,  171,  171,  171,
+      171,  171,  171,   36,  171,   41,   40,  151,  150,  146,
+      171,  171,  171,   34,   33,   28,  119,  127,  125,   38,
+       40,  136,  123,  171,  171,  158,   68,   71,   78,   92,
+      171,  171,  171,  171,  171,  117,  120,   33,  131,  119,
+      111,   44,   57,  115,  171,  121,  106,  114,  116,  112,
+      107,  110,  105,  101,  104,  107,  171,  103,  107,  109,
+      105,  112,   99,  103,   99,   92,  107,  171,  121,  171,
+      171,  103,  104,   89,  102,  171,  110,  113,  101,  100,
+       81,   83,  171,   69,   65,  171,  171,  171,   90,   53,
+
+      171,  171,  171,  171,  171,   58,  171,  171,  171,  171,
+      171,   63,   52,   43,   28,   24,  171,  171
+    } ;
+
+static yyconst short int yy_def[119] =
+    {   0,
+      118,    1,  118,  118,  118,  118,  118,  118,  118,  118,
+      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
+      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
+      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
+      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
+      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
+      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
+      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
+      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
+      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
+
+      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
+      118,  118,  118,  118,  118,  118,  118,    0
+    } ;
+
+static yyconst short int yy_nxt[220] =
+    {   0,
+        4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
+       14,   15,   16,   16,   16,   17,   18,   19,    4,    4,
+       20,   21,   22,   23,    4,   24,   25,   26,    4,   27,
+        4,    4,    4,   28,   29,   30,    4,    4,    4,    4,
+        4,   31,   32,    4,    4,   33,   34,   35,   37,   37,
+       37,   38,  117,   39,   39,   39,   41,   42,   50,   40,
+       46,   47,   52,   57,  116,   53,   69,   51,  115,   74,
+       40,   58,   59,   60,   70,   48,   49,   75,  114,   61,
+       37,   37,   37,   37,   37,   37,   64,  113,   38,   40,
+       39,   39,   39,   76,  112,  111,   40,   64,   77,   65,
+
+       40,   65,  110,  109,   66,   66,   66,   40,   87,  108,
+       87,  107,  106,   88,   88,   88,   66,   66,   66,   66,
+       66,   66,   88,   88,   88,   88,   88,   88,  105,  104,
+      103,  102,  101,  100,   99,   98,   97,   96,   95,   94,
+       93,   92,   91,   90,   89,   86,   85,   84,   83,   82,
+       81,   80,   79,   78,   73,   72,   71,   68,   67,   36,
+       63,   62,   56,   55,   54,   45,   44,   43,   36,  118,
+        3,  118,  118,  118,  118,  118,  118,  118,  118,  118,
+      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
+      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
+
+      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
+      118,  118,  118,  118,  118,  118,  118,  118,  118
+    } ;
+
+static yyconst short int yy_chk[220] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,   14,   14,
+       14,   16,  116,   16,   16,   16,   17,   17,   25,   16,
+       24,   24,   26,   30,  115,   26,   48,   25,  114,   52,
+       16,   30,   31,   31,   48,   24,   24,   52,  113,   31,
+       37,   37,   37,   38,   38,   38,   37,  112,   39,   38,
+       39,   39,   39,   53,  106,  100,   39,   37,   53,   40,
+
+       38,   40,   99,   95,   40,   40,   40,   39,   64,   94,
+       64,   92,   91,   64,   64,   64,   65,   65,   65,   66,
+       66,   66,   87,   87,   87,   88,   88,   88,   90,   89,
+       85,   84,   83,   82,   79,   77,   76,   75,   74,   73,
+       72,   71,   70,   69,   68,   63,   62,   61,   60,   59,
+       58,   57,   56,   54,   51,   50,   49,   47,   46,   36,
+       33,   32,   29,   28,   27,   20,   19,   18,    5,    3,
+      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
+      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
+      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
+
+      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
+      118,  118,  118,  118,  118,  118,  118,  118,  118
+    } ;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+//#line 1 "ossimEquTokenizer.l"
+#define INITIAL 0
+//#line 2 "ossimEquTokenizer.l"
+#include <ossim/base/ossimEquTokenDefines.h>
+//#line 413 "lex.ossimEquTokenizer.cc"
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap YY_PROTO(( void ));
+#else
+extern int yywrap YY_PROTO(( void ));
+#endif
+#endif
+
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+#endif
+
+#ifndef YY_NO_INPUT
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
+#endif
+
+#else
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
+#endif
+
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines.  This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+
+#ifndef ECHO
+#define ECHO LexerOutput( yytext, yyleng )
+#endif
+
+/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+	if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
+		YY_FATAL_ERROR( "input in flex scanner failed" );
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) LexerError( msg )
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL int yyFlexLexer::yylex()
+#endif
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+	YY_USER_ACTION
+
+YY_DECL
+	{
+	register yy_state_type yy_current_state;
+	register char *yy_cp = NULL, *yy_bp = NULL;
+	register int yy_act;
+
+//#line 15 "ossimEquTokenizer.l"
+
+
+//#line 543 "lex.ossimEquTokenizer.cc"
+
+	if ( yy_init )
+		{
+		yy_init = 0;
+
+#ifdef YY_USER_INIT
+		YY_USER_INIT;
+#endif
+
+		if ( ! yy_start )
+			yy_start = 1;	/* first start state */
+
+		if ( ! yyin )
+			yyin = &cin;
+
+		if ( ! yyout )
+			yyout = &cout;
+
+		if ( ! yy_current_buffer )
+			yy_current_buffer =
+				yy_create_buffer( yyin, YY_BUF_SIZE );
+
+		yy_load_buffer_state();
+		}
+
+	while ( 1 )		/* loops until end-of-file is reached */
+		{
+		yy_cp = yy_c_buf_p;
+
+		/* Support of yytext. */
+		*yy_cp = yy_hold_char;
+
+		/* yy_bp points to the position in yy_ch_buf of the start of
+		 * the current run.
+		 */
+		yy_bp = yy_cp;
+
+		yy_current_state = yy_start;
+yy_match:
+		do
+                {
+                   register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+                   if ( yy_accept[yy_current_state] )
+                   {
+                      yy_last_accepting_state = yy_current_state;
+                      yy_last_accepting_cpos = yy_cp;
+                   }
+                   
+                   // yy_chk size == 119
+                   // yy_base size == 119
+                   
+                   while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+                   {
+                      yy_current_state = (int) yy_def[yy_current_state];
+                      if ( yy_current_state >= 119 )
+                      {
+                         yy_c = yy_meta[(unsigned int) yy_c];
+                      }
+                      
+                      //---
+                      // NOTE:
+                      // Need to test this!
+                      // Above condition yy_current_state >= 119  flaged by coverity scan
+                      // as an array out of bounds read. Both yy_chk and yy_base have
+                      // size of 119.  Added break to fix.
+                      // drb - 20150529
+                      //---
+                      if ( (yy_current_state >= 119) ||
+                           ( (yy_base[yy_current_state] + yy_c) >= 119 ) )
+                      {
+                         break;
+                      }
+                   }
+                   
+                   yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+                   ++yy_cp;
+                }
+		while ( yy_base[yy_current_state] != 171 );
+
+yy_find_action:
+		yy_act = yy_accept[yy_current_state];
+		if ( yy_act == 0 )
+			{ /* have to back up */
+			yy_cp = yy_last_accepting_cpos;
+			yy_current_state = yy_last_accepting_state;
+			yy_act = yy_accept[yy_current_state];
+			}
+
+		YY_DO_BEFORE_ACTION;
+
+
+do_action:	/* This label is used only to access EOF actions. */
+
+
+		switch ( yy_act )
+	{ /* beginning of action switch */
+			case 0: /* must back up */
+			/* undo the effects of YY_DO_BEFORE_ACTION */
+			*yy_cp = yy_hold_char;
+			yy_cp = yy_last_accepting_cpos;
+			yy_current_state = yy_last_accepting_state;
+			goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+//#line 17 "ossimEquTokenizer.l"
+/* skip blanks and tabs */
+	YY_BREAK
+case 2:
+YY_RULE_SETUP
+//#line 19 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_CONSTANT;
+           }
+	YY_BREAK
+case 3:
+YY_RULE_SETUP
+//#line 22 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_COMMA;
+           }
+	YY_BREAK
+case 4:
+YY_RULE_SETUP
+//#line 25 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_DIV;
+           }
+	YY_BREAK
+case 5:
+YY_RULE_SETUP
+//#line 29 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_MULT;
+           }
+	YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 33 "ossimEquTokenizer.l"
+{ 
+               return OSSIM_EQU_TOKEN_OR_BAR;
+           }
+	YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 37 "ossimEquTokenizer.l"
+{ 
+               return OSSIM_EQU_TOKEN_AMPERSAND;
+           }
+	YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 40 "ossimEquTokenizer.l"
+{ 
+               return OSSIM_EQU_TOKEN_TILDE;
+           }
+	YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 44 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_PLUS;
+           }
+	YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 47 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_MINUS;
+           }
+	YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 50 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_MOD;
+           }
+	YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 53 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_LEFT_ARRAY_BRACKET;
+           }
+	YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 56 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_RIGHT_ARRAY_BRACKET;
+           }
+	YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 59 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_LEFT_PAREN;
+        }
+	YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 62 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_RIGHT_PAREN;
+           }
+	YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 65 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_POWER;
+           }
+	YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 68 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_XOR;
+        }
+	YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 72 "ossimEquTokenizer.l"
+{
+             return OSSIM_EQU_TOKEN_IMAGE_VARIABLE;
+        }
+	YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 75 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_PI;
+           }
+	YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 78 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_LOG;
+           }
+	YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 81 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_LOG10;
+           }
+	YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 84 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_EXP;
+           } 
+	YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 87 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_SIN;
+           }
+	YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 90 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_SIND;
+           }
+	YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 93 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_ASIN;
+           }
+	YY_BREAK
+case 26:
+YY_RULE_SETUP
+#line 96 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_ASIND;
+           }
+	YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 99 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_COS;
+           }
+	YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 102 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_COSD;
+           }
+	YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 105 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_ACOS;
+           }
+	YY_BREAK
+case 30:
+YY_RULE_SETUP
+#line 108 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_ACOSD;
+           }
+	YY_BREAK
+case 31:
+YY_RULE_SETUP
+#line 111 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_TAN;
+           }
+	YY_BREAK
+case 32:
+YY_RULE_SETUP
+#line 114 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_TAND;
+           }
+	YY_BREAK
+case 33:
+YY_RULE_SETUP
+#line 117 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_ATAN;
+           }
+	YY_BREAK
+case 34:
+YY_RULE_SETUP
+#line 120 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_ATAND;
+           }
+	YY_BREAK
+case 35:
+YY_RULE_SETUP
+#line 123 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_ABS;
+           }
+	YY_BREAK
+case 36:
+YY_RULE_SETUP
+#line 126 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_SQRT;
+           }
+	YY_BREAK
+case 37:
+YY_RULE_SETUP
+#line 129 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_MIN;
+           }
+	YY_BREAK
+case 38:
+YY_RULE_SETUP
+#line 132 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_MAX;
+           }
+	YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 135 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_CONV;
+           }
+	YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 138 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_SHIFT;
+           }
+	YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 141 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_BLURR;
+           }
+	YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 144 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_BAND;
+           }
+	YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 147 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_ASSIGN_BAND;
+              }
+	YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 150 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_CLIP;
+        }
+	YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 153 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_CLAMP;
+        }
+	YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 156 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_BEQUAL;
+}
+	YY_BREAK
+case 47:
+YY_RULE_SETUP
+#line 159 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_BGREATER;
+}
+	YY_BREAK
+case 48:
+YY_RULE_SETUP
+#line 162 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_BGREATEROREQUAL;
+}
+	YY_BREAK
+case 49:
+YY_RULE_SETUP
+#line 165 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_BLESS;
+}
+	YY_BREAK
+case 50:
+YY_RULE_SETUP
+#line 168 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_BLESSOREQUAL;
+}
+	YY_BREAK
+case 51:
+YY_RULE_SETUP
+#line 171 "ossimEquTokenizer.l"
+{
+               return OSSIM_EQU_TOKEN_BDIFFERENT;
+}
+	YY_BREAK
+case 52:
+YY_RULE_SETUP
+#line 175 "ossimEquTokenizer.l"
+ECHO;
+	YY_BREAK
+#line 986 "lex.ossimEquTokenizer.cc"
+case YY_STATE_EOF(INITIAL):
+	yyterminate();
+
+	case YY_END_OF_BUFFER:
+		{
+		/* Amount of text matched not including the EOB char. */
+		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
+
+		/* Undo the effects of YY_DO_BEFORE_ACTION. */
+		*yy_cp = yy_hold_char;
+		YY_RESTORE_YY_MORE_OFFSET
+
+		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
+			{
+			/* We're scanning a new file or input source.  It's
+			 * possible that this happened because the user
+			 * just pointed yyin at a new source and called
+			 * yylex().  If so, then we have to assure
+			 * consistency between yy_current_buffer and our
+			 * globals.  Here is the right place to do so, because
+			 * this is the first action (other than possibly a
+			 * back-up) that will match for the new input source.
+			 */
+			yy_n_chars = yy_current_buffer->yy_n_chars;
+			yy_current_buffer->yy_input_file = yyin;
+			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+			}
+
+		/* Note that here we test for yy_c_buf_p "<=" to the position
+		 * of the first EOB in the buffer, since yy_c_buf_p will
+		 * already have been incremented past the NUL character
+		 * (since all states make transitions on EOB to the
+		 * end-of-buffer state).  Contrast this with the test
+		 * in input().
+		 */
+		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+			{ /* This was really a NUL. */
+			yy_state_type yy_next_state;
+
+			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+
+			yy_current_state = yy_get_previous_state();
+
+			/* Okay, we're now positioned to make the NUL
+			 * transition.  We couldn't have
+			 * yy_get_previous_state() go ahead and do it
+			 * for us because it doesn't know how to deal
+			 * with the possibility of jamming (and we don't
+			 * want to build jamming into it because then it
+			 * will run more slowly).
+			 */
+
+			yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+			yy_bp = yytext_ptr + YY_MORE_ADJ;
+
+			if ( yy_next_state )
+				{
+				/* Consume the NUL. */
+				yy_cp = ++yy_c_buf_p;
+				yy_current_state = yy_next_state;
+				goto yy_match;
+				}
+
+			else
+				{
+				yy_cp = yy_c_buf_p;
+				goto yy_find_action;
+				}
+			}
+
+		else switch ( yy_get_next_buffer() )
+			{
+			case EOB_ACT_END_OF_FILE:
+				{
+				yy_did_buffer_switch_on_eof = 0;
+
+				if ( yywrap() )
+					{
+					/* Note: because we've taken care in
+					 * yy_get_next_buffer() to have set up
+					 * yytext, we can now set up
+					 * yy_c_buf_p so that if some total
+					 * hoser (like flex itself) wants to
+					 * call the scanner after we return the
+					 * YY_NULL, it'll still work - another
+					 * YY_NULL will get returned.
+					 */
+					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+
+					yy_act = YY_STATE_EOF(YY_START);
+					goto do_action;
+					}
+
+				else
+					{
+					if ( ! yy_did_buffer_switch_on_eof )
+						YY_NEW_FILE;
+					}
+				break;
+				}
+
+			case EOB_ACT_CONTINUE_SCAN:
+				yy_c_buf_p =
+					yytext_ptr + yy_amount_of_matched_text;
+
+				yy_current_state = yy_get_previous_state();
+
+				yy_cp = yy_c_buf_p;
+				yy_bp = yytext_ptr + YY_MORE_ADJ;
+				goto yy_match;
+
+			case EOB_ACT_LAST_MATCH:
+				yy_c_buf_p =
+				&yy_current_buffer->yy_ch_buf[yy_n_chars];
+
+				yy_current_state = yy_get_previous_state();
+
+				yy_cp = yy_c_buf_p;
+				yy_bp = yytext_ptr + YY_MORE_ADJ;
+				goto yy_find_action;
+			}
+		break;
+		}
+
+	default:
+		YY_FATAL_ERROR(
+			"fatal flex scanner internal error--no action found" );
+	} /* end of action switch */
+		} /* end of scanning one token */
+	} /* end of yylex */
+
+yyFlexLexer::yyFlexLexer( istream* arg_yyin, ostream* arg_yyout )
+	{
+	yyin = arg_yyin;
+	yyout = arg_yyout;
+	yy_c_buf_p = 0;
+	yy_init = 1;
+	yy_start = 0;
+	yy_flex_debug = 0;
+	yylineno = 1;	// this will only get updated if %option yylineno
+
+	yy_did_buffer_switch_on_eof = 0;
+
+	yy_looking_for_trail_begin = 0;
+	yy_more_flag = 0;
+	yy_more_len = 0;
+	yy_more_offset = yy_prev_more_offset = 0;
+
+	yy_start_stack_ptr = yy_start_stack_depth = 0;
+	yy_start_stack = 0;
+
+	yy_current_buffer = 0;
+
+#ifdef YY_USES_REJECT
+	yy_state_buf = new yy_state_type[YY_BUF_SIZE + 2];
+#else
+	yy_state_buf = 0;
+#endif
+	}
+
+yyFlexLexer::~yyFlexLexer()
+	{
+	delete yy_state_buf;
+	yy_delete_buffer( yy_current_buffer );
+	}
+
+void yyFlexLexer::switch_streams( istream* new_in, ostream* new_out )
+	{
+	if ( new_in )
+		{
+		yy_delete_buffer( yy_current_buffer );
+		yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) );
+		}
+
+	if ( new_out )
+		yyout = new_out;
+	}
+
+#ifdef YY_INTERACTIVE
+int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )
+#else
+int yyFlexLexer::LexerInput( char* buf, int max_size )
+#endif
+	{
+	if ( yyin->eof() || yyin->fail() )
+		return 0;
+
+#ifdef YY_INTERACTIVE
+	yyin->get( buf[0] );
+
+	if ( yyin->eof() )
+		return 0;
+
+	if ( yyin->bad() )
+		return -1;
+
+	return 1;
+
+#else
+	(void) yyin->read( buf, max_size );
+
+	if ( yyin->bad() )
+		return -1;
+	else
+		return yyin->gcount();
+#endif
+	}
+
+void yyFlexLexer::LexerOutput( const char* buf, int size )
+	{
+	(void) yyout->write( buf, size );
+	}
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ *	EOB_ACT_LAST_MATCH -
+ *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ *	EOB_ACT_END_OF_FILE - end of file
+ */
+
+int yyFlexLexer::yy_get_next_buffer()
+	{
+	register char *dest = yy_current_buffer->yy_ch_buf;
+	register char *source = yytext_ptr;
+	register int number_to_move, i;
+	int ret_val;
+
+	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+		YY_FATAL_ERROR(
+		"fatal flex scanner internal error--end of buffer missed" );
+
+	if ( yy_current_buffer->yy_fill_buffer == 0 )
+		{ /* Don't try to fill the buffer, so this is an EOF. */
+		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+			{
+			/* We matched a single character, the EOB, so
+			 * treat this as a final EOF.
+			 */
+			return EOB_ACT_END_OF_FILE;
+			}
+
+		else
+			{
+			/* We matched some text prior to the EOB, first
+			 * process it.
+			 */
+			return EOB_ACT_LAST_MATCH;
+			}
+		}
+
+	/* Try to read more data. */
+
+	/* First move last chars to start of buffer. */
+	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+
+	for ( i = 0; i < number_to_move; ++i )
+		*(dest++) = *(source++);
+
+	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+		/* don't do the read, it's not guaranteed to return an EOF,
+		 * just force an EOF
+		 */
+		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
+
+	else
+		{
+		int num_to_read =
+			yy_current_buffer->yy_buf_size - number_to_move - 1;
+
+		while ( num_to_read <= 0 )
+			{ /* Not enough room in the buffer - grow it. */
+#ifdef YY_USES_REJECT
+			YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
+
+			/* just a shorter name for the current buffer */
+			YY_BUFFER_STATE b = yy_current_buffer;
+
+			int yy_c_buf_p_offset =
+				(int) (yy_c_buf_p - b->yy_ch_buf);
+
+			if ( b->yy_is_our_buffer )
+				{
+				int new_size = b->yy_buf_size * 2;
+
+				if ( new_size <= 0 )
+					b->yy_buf_size += b->yy_buf_size / 8;
+				else
+					b->yy_buf_size *= 2;
+
+				b->yy_ch_buf = (char *)
+					/* Include room in for 2 EOB chars. */
+					yy_flex_realloc( (void *) b->yy_ch_buf,
+							 b->yy_buf_size + 2 );
+				}
+			else
+				/* Can't grow it, we don't own it. */
+				b->yy_ch_buf = 0;
+
+			if ( ! b->yy_ch_buf )
+				YY_FATAL_ERROR(
+				"fatal error - scanner input buffer overflow" );
+
+			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+			num_to_read = yy_current_buffer->yy_buf_size -
+						number_to_move - 1;
+#endif
+			}
+
+		if ( num_to_read > YY_READ_BUF_SIZE )
+			num_to_read = YY_READ_BUF_SIZE;
+
+		/* Read in more data. */
+		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+			yy_n_chars, num_to_read );
+
+		yy_current_buffer->yy_n_chars = yy_n_chars;
+		}
+
+	if ( yy_n_chars == 0 )
+		{
+		if ( number_to_move == YY_MORE_ADJ )
+			{
+			ret_val = EOB_ACT_END_OF_FILE;
+			yyrestart( yyin );
+			}
+
+		else
+			{
+			ret_val = EOB_ACT_LAST_MATCH;
+			yy_current_buffer->yy_buffer_status =
+				YY_BUFFER_EOF_PENDING;
+			}
+		}
+
+	else
+		ret_val = EOB_ACT_CONTINUE_SCAN;
+
+	yy_n_chars += number_to_move;
+	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+
+	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+
+	return ret_val;
+	}
+
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+yy_state_type yyFlexLexer::yy_get_previous_state()
+	{
+	register yy_state_type yy_current_state;
+	register char *yy_cp;
+
+	yy_current_state = yy_start;
+
+	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+		{
+		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+		if ( yy_accept[yy_current_state] )
+			{
+			yy_last_accepting_state = yy_current_state;
+			yy_last_accepting_cpos = yy_cp;
+			}
+		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+			{
+			yy_current_state = (int) yy_def[yy_current_state];
+			if ( yy_current_state >= 119 )
+				yy_c = yy_meta[(unsigned int) yy_c];
+			}
+		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+		}
+
+	return yy_current_state;
+	}
+
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ *	next_state = yy_try_NUL_trans( current_state );
+ */
+
+yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
+	{
+	register int yy_is_jam;
+	register char *yy_cp = yy_c_buf_p;
+
+	register YY_CHAR yy_c = 1;
+	if ( yy_accept[yy_current_state] )
+		{
+		yy_last_accepting_state = yy_current_state;
+		yy_last_accepting_cpos = yy_cp;
+		}
+	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+		{
+		yy_current_state = (int) yy_def[yy_current_state];
+		if ( yy_current_state >= 119 )
+			yy_c = yy_meta[(unsigned int) yy_c];
+		}
+	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+	yy_is_jam = (yy_current_state == 118);
+
+	return yy_is_jam ? 0 : yy_current_state;
+	}
+
+
+void yyFlexLexer::yyunput( int c, register char* yy_bp )
+	{
+	register char *yy_cp = yy_c_buf_p;
+
+	/* undo effects of setting up yytext */
+	*yy_cp = yy_hold_char;
+
+	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+		{ /* need to shift things up to make room */
+		/* +2 for EOB chars. */
+		register int number_to_move = yy_n_chars + 2;
+		register char *dest = &yy_current_buffer->yy_ch_buf[
+					yy_current_buffer->yy_buf_size + 2];
+		register char *source =
+				&yy_current_buffer->yy_ch_buf[number_to_move];
+
+		while ( source > yy_current_buffer->yy_ch_buf )
+			*--dest = *--source;
+
+		yy_cp += (int) (dest - source);
+		yy_bp += (int) (dest - source);
+		yy_current_buffer->yy_n_chars =
+			yy_n_chars = yy_current_buffer->yy_buf_size;
+
+		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+			YY_FATAL_ERROR( "flex scanner push-back overflow" );
+		}
+
+	*--yy_cp = (char) c;
+
+
+	yytext_ptr = yy_bp;
+	yy_hold_char = *yy_cp;
+	yy_c_buf_p = yy_cp;
+	}
+
+
+int yyFlexLexer::yyinput()
+	{
+	int c;
+
+	*yy_c_buf_p = yy_hold_char;
+
+	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+		{
+		/* yy_c_buf_p now points to the character we want to return.
+		 * If this occurs *before* the EOB characters, then it's a
+		 * valid NUL; if not, then we've hit the end of the buffer.
+		 */
+		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+			/* This was really a NUL. */
+			*yy_c_buf_p = '\0';
+
+		else
+			{ /* need more input */
+			int offset = yy_c_buf_p - yytext_ptr;
+			++yy_c_buf_p;
+
+			switch ( yy_get_next_buffer() )
+				{
+				case EOB_ACT_LAST_MATCH:
+					/* This happens because yy_g_n_b()
+					 * sees that we've accumulated a
+					 * token and flags that we need to
+					 * try matching the token before
+					 * proceeding.  But for input(),
+					 * there's no matching to consider.
+					 * So convert the EOB_ACT_LAST_MATCH
+					 * to EOB_ACT_END_OF_FILE.
+					 */
+
+					/* Reset buffer status. */
+					yyrestart( yyin );
+
+					/* fall through */
+
+				case EOB_ACT_END_OF_FILE:
+					{
+					if ( yywrap() )
+						return EOF;
+
+					if ( ! yy_did_buffer_switch_on_eof )
+						YY_NEW_FILE;
+#ifdef __cplusplus
+					return yyinput();
+#else
+					return input();
+#endif
+					}
+
+				case EOB_ACT_CONTINUE_SCAN:
+					yy_c_buf_p = yytext_ptr + offset;
+					break;
+				}
+			}
+		}
+
+	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
+	*yy_c_buf_p = '\0';	/* preserve yytext */
+	yy_hold_char = *++yy_c_buf_p;
+
+
+	return c;
+	}
+
+void yyFlexLexer::yyrestart( istream* input_file )
+	{
+	if ( ! yy_current_buffer )
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+	yy_init_buffer( yy_current_buffer, input_file );
+	yy_load_buffer_state();
+	}
+
+
+void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+	{
+	if ( yy_current_buffer == new_buffer )
+		return;
+
+	if ( yy_current_buffer )
+		{
+		/* Flush out information for old buffer. */
+		*yy_c_buf_p = yy_hold_char;
+		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+		yy_current_buffer->yy_n_chars = yy_n_chars;
+		}
+
+	yy_current_buffer = new_buffer;
+	yy_load_buffer_state();
+
+	/* We don't actually know whether we did this switch during
+	 * EOF (yywrap()) processing, but the only time this flag
+	 * is looked at is after yywrap() is called, so it's safe
+	 * to go ahead and always set it.
+	 */
+	yy_did_buffer_switch_on_eof = 1;
+	}
+
+
+void yyFlexLexer::yy_load_buffer_state()
+	{
+	yy_n_chars = yy_current_buffer->yy_n_chars;
+	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+	yyin = yy_current_buffer->yy_input_file;
+	yy_hold_char = *yy_c_buf_p;
+	}
+
+
+YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( istream* file, int size )
+	{
+	YY_BUFFER_STATE b;
+
+	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+	b->yy_buf_size = size;
+
+	/* yy_ch_buf has to be 2 characters longer than the size given because
+	 * we need to put in 2 end-of-buffer characters.
+	 */
+	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+	if ( ! b->yy_ch_buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+	b->yy_is_our_buffer = 1;
+
+	yy_init_buffer( b, file );
+
+	return b;
+	}
+
+
+void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
+	{
+	if ( ! b )
+		return;
+
+	if ( b == yy_current_buffer )
+		yy_current_buffer = (YY_BUFFER_STATE) 0;
+
+	if ( b->yy_is_our_buffer )
+		yy_flex_free( (void *) b->yy_ch_buf );
+
+	yy_flex_free( (void *) b );
+	}
+
+
+void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, istream* file )
+
+	{
+	yy_flush_buffer( b );
+
+	b->yy_input_file = file;
+	b->yy_fill_buffer = 1;
+
+	b->yy_is_interactive = 0;
+	}
+
+
+void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
+	{
+	if ( ! b )
+		return;
+
+	b->yy_n_chars = 0;
+
+	/* We always need two end-of-buffer characters.  The first causes
+	 * a transition to the end-of-buffer state.  The second causes
+	 * a jam in that state.
+	 */
+	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+	b->yy_buf_pos = &b->yy_ch_buf[0];
+
+	b->yy_at_bol = 1;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	if ( b == yy_current_buffer )
+		yy_load_buffer_state();
+	}
+
+
+#ifndef YY_NO_SCAN_BUFFER
+#endif
+
+
+#ifndef YY_NO_SCAN_STRING
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#endif
+
+
+#ifndef YY_NO_PUSH_STATE
+void yyFlexLexer::yy_push_state( int new_state )
+	{
+	if ( yy_start_stack_ptr >= yy_start_stack_depth )
+		{
+		yy_size_t new_size;
+
+		yy_start_stack_depth += YY_START_STACK_INCR;
+		new_size = yy_start_stack_depth * sizeof( int );
+
+		if ( ! yy_start_stack )
+			yy_start_stack = (int *) yy_flex_alloc( new_size );
+
+		else
+			yy_start_stack = (int *) yy_flex_realloc(
+					(void *) yy_start_stack, new_size );
+
+		if ( ! yy_start_stack )
+			YY_FATAL_ERROR(
+			"out of memory expanding start-condition stack" );
+		}
+
+	yy_start_stack[yy_start_stack_ptr++] = YY_START;
+
+	BEGIN(new_state);
+	}
+#endif
+
+
+#ifndef YY_NO_POP_STATE
+void yyFlexLexer::yy_pop_state()
+	{
+	if ( --yy_start_stack_ptr < 0 )
+		YY_FATAL_ERROR( "start-condition stack underflow" );
+
+	BEGIN(yy_start_stack[yy_start_stack_ptr]);
+	}
+#endif
+
+
+#ifndef YY_NO_TOP_STATE
+int yyFlexLexer::yy_top_state()
+	{
+	return yy_start_stack[yy_start_stack_ptr - 1];
+	}
+#endif
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+
+void yyFlexLexer::LexerError( yyconst char msg[] )
+	{
+	cerr << msg << '\n';
+	exit( YY_EXIT_FAILURE );
+	}
+
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+		yytext[yyleng] = yy_hold_char; \
+		yy_c_buf_p = yytext + n; \
+		yy_hold_char = *yy_c_buf_p; \
+		*yy_c_buf_p = '\0'; \
+		yyleng = n; \
+		} \
+	while ( 0 )
+
+
+/* Internal utility routines. */
+
+#ifndef yytext_ptr
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+	{
+	register int i;
+	for ( i = 0; i < n; ++i )
+		s1[i] = s2[i];
+	}
+#endif
+
+#ifdef YY_NEED_STRLEN
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+	{
+	register int n;
+	for ( n = 0; s[n]; ++n )
+		;
+
+	return n;
+	}
+#endif
+
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+	{
+	return (void *) malloc( size );
+	}
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+	{
+	/* The cast to (char *) in the following accommodates both
+	 * implementations that use char* generic pointers, and those
+	 * that use void* generic pointers.  It works with the latter
+	 * because both ANSI C and C++ allow castless assignment from
+	 * any pointer type to void*, and deal with argument conversions
+	 * as though doing an assignment.
+	 */
+	return (void *) realloc( (char *) ptr, size );
+	}
+
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+	{
+	free( ptr );
+	}
+
+#if YY_MAIN
+int main()
+	{
+	yylex();
+	return 0;
+	}
+#endif
+#line 175 "ossimEquTokenizer.l"
+
+int yywrap()
+{
+   return 1;
+}
diff --git a/src/ossim/base/ossimEquTokenizer.l b/ossim/src/ossim/base/ossimEquTokenizer.l
similarity index 100%
rename from src/ossim/base/ossimEquTokenizer.l
rename to ossim/src/ossim/base/ossimEquTokenizer.l
diff --git a/src/ossim/base/ossimErrorCodes.cpp b/ossim/src/ossim/base/ossimErrorCodes.cpp
similarity index 100%
rename from src/ossim/base/ossimErrorCodes.cpp
rename to ossim/src/ossim/base/ossimErrorCodes.cpp
diff --git a/src/ossim/base/ossimErrorStatusInterface.cpp b/ossim/src/ossim/base/ossimErrorStatusInterface.cpp
similarity index 100%
rename from src/ossim/base/ossimErrorStatusInterface.cpp
rename to ossim/src/ossim/base/ossimErrorStatusInterface.cpp
diff --git a/src/ossim/base/ossimEvent.cpp b/ossim/src/ossim/base/ossimEvent.cpp
similarity index 100%
rename from src/ossim/base/ossimEvent.cpp
rename to ossim/src/ossim/base/ossimEvent.cpp
diff --git a/src/ossim/base/ossimException.cpp b/ossim/src/ossim/base/ossimException.cpp
similarity index 100%
rename from src/ossim/base/ossimException.cpp
rename to ossim/src/ossim/base/ossimException.cpp
diff --git a/src/ossim/base/ossimFactoryBaseTemplate.cpp b/ossim/src/ossim/base/ossimFactoryBaseTemplate.cpp
similarity index 100%
rename from src/ossim/base/ossimFactoryBaseTemplate.cpp
rename to ossim/src/ossim/base/ossimFactoryBaseTemplate.cpp
diff --git a/ossim/src/ossim/base/ossimFilename.cpp b/ossim/src/ossim/base/ossimFilename.cpp
new file mode 100644
index 0000000..155cd76
--- /dev/null
+++ b/ossim/src/ossim/base/ossimFilename.cpp
@@ -0,0 +1,1338 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Description: This class provides manipulation of filenames.
+//
+//*************************************************************************
+// $Id: ossimFilename.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/ossimConfig.h>  /* to pick up platform defines */
+
+#include <iostream>
+#include <fstream>
+using namespace std;
+
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <cerrno>
+#include <ossim/base/ossimDirectory.h>
+#include <ossim/base/ossimDate.h>
+#include <ossim/base/ossimEnvironmentUtility.h>
+
+#if defined(_WIN32)
+#  include <io.h>
+#  include <direct.h>
+#  include <sys/utime.h>
+#  include <windows.h>
+#else
+#  include <sys/types.h>
+#  include <utime.h>
+#  include <sys/stat.h>
+#  include <unistd.h>
+#  include <dirent.h>
+#  include <fcntl.h>
+#endif
+
+#include <sys/stat.h>
+
+#ifdef __BORLANDC__
+#  include <dir.h>
+#  include <direct.h>
+#  include <stdlib.h>
+#  include <io.h>
+#endif
+
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimRegExp.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimNotifyContext.h>
+
+#if defined(_WIN32)
+const char ossimFilename::thePathSeparator = '\\';
+#else
+const char ossimFilename::thePathSeparator = '/';
+#endif
+
+
+/**
+ * This was taken from Wx widgets for performing touch and access date stamps.
+ */ 
+#if defined(_WIN32)
+typedef WIN32_FIND_DATA FIND_STRUCT;
+typedef HANDLE FIND_DATA;
+typedef DWORD FIND_ATTR;
+
+class ossimFileHandle
+{
+public:
+   enum OpenMode
+   {
+      Read,
+      Write
+   };
+   
+   ossimFileHandle(const ossimString& filename, OpenMode mode)
+   {
+      m_hFile = ::CreateFile(
+         filename.c_str(),              // name
+         mode == Read ? GENERIC_READ    // access mask
+         : GENERIC_WRITE,
+         FILE_SHARE_READ |              // sharing mode
+         FILE_SHARE_WRITE,              // (allow everything)
+         NULL,                          // no secutity attr
+         OPEN_EXISTING,                 // creation disposition
+         0,                             // no flags
+         NULL                           // no template file
+         );
+      
+      if ( m_hFile == INVALID_HANDLE_VALUE )
+      {
+//             wxLogSysError(_("Failed to open '%s' for %s"),
+//                           filename.c_str(),
+//                           mode == Read ? _("reading") : _("writing"));
+      }
+   }
+   
+   ~ossimFileHandle()
+   {
+      if ( m_hFile != INVALID_HANDLE_VALUE )
+      {
+         if ( !::CloseHandle(m_hFile) )
+         {
+//                 wxLogSysError(_("Failed to close file handle"));
+         }
+      }
+   }
+   
+   // return true only if the file could be opened successfully
+   bool isOk() const { return m_hFile != INVALID_HANDLE_VALUE; }
+   
+   // get the handle
+   operator HANDLE() const { return m_hFile; }
+   
+private:
+   HANDLE m_hFile;
+};
+
+static void convertOssimToFileTime(FILETIME *ft, const ossimDate& dt)
+{
+   SYSTEMTIME st;
+   st.wDay = dt.getDay();
+   st.wMonth = (WORD)(dt.getMonth());
+   st.wYear = (WORD)dt.getYear();
+   st.wHour = dt.getHour();
+   st.wMinute = dt.getMin();
+   st.wSecond = dt.getSec();
+//     st.wMilliseconds = dt.GetMillisecond();
+
+   FILETIME ftLocal;
+   if ( !::SystemTimeToFileTime(&st, &ftLocal) )
+   {
+//         wxLogLastError(_T("SystemTimeToFileTime"));
+   }
+
+   if ( !::LocalFileTimeToFileTime(&ftLocal, ft) )
+   {
+//         wxLogLastError(_T("LocalFileTimeToFileTime"));
+   }
+}
+
+static void convertFileTimeToOssim(ossimLocalTm &dt, const FILETIME &ft)
+{
+   FILETIME ftcopy = ft;
+   FILETIME ftLocal;
+   if ( !::FileTimeToLocalFileTime(&ftcopy, &ftLocal) )
+   {
+//         wxLogLastError(_T("FileTimeToLocalFileTime"));
+   }
+
+   SYSTEMTIME st;
+   if ( !::FileTimeToSystemTime(&ftLocal, &st) )
+   {
+//         wxLogLastError(_T("FileTimeToSystemTime"));
+   }
+
+   dt.setDay(st.wDay);
+   dt.setMonth(st.wMonth);
+   dt.setYear(st.wYear);
+   dt.setHour(st.wHour);
+   dt.setMin(st.wMinute);
+   dt.setSec(st.wSecond);
+    
+//     dt->Set(st.wDay, wxDateTime::Month(st.wMonth - 1), st.wYear,
+//             st.wHour, st.wMinute, st.wSecond, st.wMilliseconds);
+}
+
+static inline bool IsFindDataOk(FIND_DATA fd)
+{
+   return fd != INVALID_HANDLE_VALUE;
+}
+
+static inline FIND_DATA FindFirst(const ossimString& spec,
+                                  FIND_STRUCT *finddata)
+{
+   return ::FindFirstFile(spec.c_str(), finddata);
+}
+
+static bool ossimGetDirectoryTimes(const ossimString& dirname,
+                                   FILETIME *ftAccess,
+                                   FILETIME *ftCreate,
+                                   FILETIME *ftMod)
+{
+
+   FIND_STRUCT fs;
+   FIND_DATA fd = FindFirst(dirname, &fs);
+   if ( !IsFindDataOk(fd) )
+   {
+      return false;
+   }
+
+   *ftAccess = fs.ftLastAccessTime;
+   *ftCreate = fs.ftCreationTime;
+   *ftMod = fs.ftLastWriteTime;
+
+   FindClose(fd);
+
+   return true;
+}
+#endif
+
+const ossimFilename ossimFilename::NIL=("");
+
+ossimFilename::ossimFilename()
+   : ossimString()
+{}
+
+ossimFilename::ossimFilename(const ossimFilename& src)
+   : ossimString(src)
+{
+}
+
+ossimFilename::ossimFilename(const ossimString& src)
+   : ossimString(src)
+{
+   if ( m_str.size() )
+   {
+      convertToNative();
+   }
+}
+
+ossimFilename::ossimFilename(const std::string& src)
+   : ossimString(src)
+{
+   if ( m_str.size() )
+   {
+      convertToNative();
+   }
+}
+
+ossimFilename::ossimFilename(const char* src)
+   : ossimString(src)
+{
+   if ( m_str.size() )
+   {
+      convertToNative();
+   }
+}
+
+template <class Iter> ossimFilename::ossimFilename(Iter s, Iter e)
+   : ossimString(s, e)
+{
+   if ( m_str.size() )
+   {
+      convertToNative();
+   }
+}
+
+bool ossimFilename::operator == (const ossimFilename& rhs)const
+{
+   return ossimString::operator==(rhs);
+}
+
+bool ossimFilename::operator == (const ossimString& rhs)const
+{
+   return ossimString::operator==(rhs);
+}
+
+bool ossimFilename::operator == (const char* rhs)const
+{
+   return ossimString::operator ==(rhs);
+}
+
+void ossimFilename::convertBackToForwardSlashes()
+{
+   std::string::iterator currentChar = this->begin();
+
+   while(currentChar != this->end())
+   {
+      if(*currentChar == '\\')
+      {
+         *currentChar = '/';
+      }
+      ++currentChar;
+   }
+}
+
+void ossimFilename::convertForwardToBackSlashes()
+{
+   std::string::iterator currentChar = this->begin();
+
+   while(currentChar != this->end())
+   {
+      if(*currentChar == '/')
+      {
+         *currentChar = '\\';
+      }
+      ++currentChar;
+   }
+}
+
+bool ossimFilename::setTimes(ossimLocalTm* accessTime,
+                             ossimLocalTm* modTime,
+#if defined(_WIN32)                             
+                             ossimLocalTm* createTime)const
+#else
+                             ossimLocalTm* /* createTime */ )const
+#endif
+{
+#if defined(_WIN32)
+   if(isDir())
+   {
+      // need to implement this later
+      return false;
+   }
+   else
+   {
+      ossimFileHandle fh(this->expand(), ossimFileHandle::Write);
+      if(fh.isOk())
+      {
+         FILETIME ftAccess, ftCreate, ftWrite;
+         
+         if ( createTime )
+         {
+            convertOssimToFileTime(&ftCreate, *createTime);
+         }
+         if ( accessTime )
+         {
+            convertOssimToFileTime(&ftAccess, *accessTime);
+         }
+         if ( modTime )
+         {
+            convertOssimToFileTime(&ftWrite, *modTime);
+         }
+         if ( ::SetFileTime(fh,
+                            createTime ? &ftCreate : NULL,
+                            accessTime ? &ftAccess : NULL,
+                            modTime ? &ftWrite : NULL) )
+         {
+            return true;
+         }
+      }
+   }
+#else
+   if ( !accessTime && !modTime )
+   {
+      // can't modify the creation time anyhow, don't try
+      return true;
+   }
+   utimbuf utm;
+   utm.actime = accessTime ? accessTime->getTicks() : modTime->getTicks();
+   utm.modtime = modTime ? modTime->getTicks() : accessTime->getTicks();
+   if ( utime(expand().c_str(), &utm) == 0 )
+   {
+      return true;
+   }
+    
+#endif
+
+   return false;
+}
+
+bool ossimFilename::getTimes(ossimLocalTm *accessTime,
+                             ossimLocalTm *modTime,
+                             ossimLocalTm *createTime) const
+{
+   if(!expand().exists()) return false;
+   
+#if defined(_WIN32)
+   // we must use different methods for the files and directories under
+   // Windows as CreateFile(GENERIC_READ) doesn't work for the directories and
+   // CreateFile(FILE_FLAG_BACKUP_SEMANTICS) works -- but only under NT and
+   // not 9x
+   bool ok;
+   FILETIME ftAccess, ftCreate, ftWrite;
+   if ( isDir() )
+   {
+      ok = ossimGetDirectoryTimes(expand().c_str(),
+                                  &ftAccess, &ftCreate, &ftWrite);
+      ok = false;
+   }
+   else // file
+   {
+      ossimFileHandle fh(expand().c_str(), ossimFileHandle::Read);
+      if ( fh.isOk() )
+      {
+         ok = ::GetFileTime(fh,
+                            createTime ? &ftCreate : NULL,
+                            accessTime ? &ftAccess : NULL,
+                            modTime ? &ftWrite : NULL) != 0;
+      }
+      else
+      {
+         ok = false;
+      }
+   }
+
+   if ( ok )
+   {
+      if ( createTime )
+      {
+         convertFileTimeToOssim(*createTime, ftCreate);
+      }
+      if ( accessTime )
+      {
+         convertFileTimeToOssim(*accessTime, ftAccess);
+      }
+      if ( modTime )
+      {
+         convertFileTimeToOssim(*modTime, ftWrite);
+      }
+        
+      return true;
+   }
+#else
+   struct stat sbuf;
+   stat(c_str(), &sbuf);
+   if ( stat( expand().c_str(), &sbuf) == 0 )
+   {
+      if ( accessTime )
+      {
+         *accessTime = ossimLocalTm(sbuf.st_atime);
+      }
+      if ( modTime )
+      {
+         *modTime = ossimLocalTm(sbuf.st_mtime);
+      }
+      if ( createTime )
+      {
+         *createTime = ossimLocalTm(sbuf.st_ctime);
+      }
+      return true;
+   }
+#endif // platforms
+
+
+   return false;
+}
+
+bool ossimFilename::touch()const
+{
+#if defined( _WIN32 )
+   ossimDate now;
+
+   return setTimes(&now, &now, 0);
+   
+#else
+   if ( utime(expand().c_str(), NULL) == 0 )
+   {
+      return true;
+   }
+   
+   return false;
+#endif   
+}
+
+ossimFilename ossimFilename::expand() const
+{
+   //---
+   // Note:  ossimEnvironmentUtility::getCurrentWorkingDir() is returning
+   // a blank string on windows with vs9.  This was resulting in seg faults
+   // in this method so added checks were added for size of returned result.
+   // (drb  20100113)
+   //---
+   ossimFilename result = "";
+   if ( size() )
+   {
+      result = *this;
+      
+      if ( needsExpansion() )
+      {
+
+//#if defined(_WIN32)
+//         result.convertBackToForwardSlashes();
+//#endif
+
+         bool addCwd = false;
+         
+         if ( (size() > 1) && (*(begin()) == '~') && (*(begin()+1) == thePathSeparator) )
+         {
+            ossimFilename homeDir =
+               ossimEnvironmentUtility::instance()->getUserDir();
+            
+            ossimFilename s( (result.begin()+2) , result.end());
+            result = homeDir.dirCat(s);
+         }
+         else if( (size() > 1) &&
+                  (*(begin()) == '.') && (*(begin()+1) == thePathSeparator) )
+         {
+            // dot slash i.e. ./foo
+            addCwd = true;
+         }
+         else if ( (size() > 2)  && (*(begin()) == '.')
+                   && (*(begin()+1) == '.') && (*(begin()+2) == thePathSeparator) )
+         {
+            // ../foo
+            addCwd = true;
+         }
+         else if (result == ".")
+         {
+            result = ossimEnvironmentUtility::instance()->
+               getCurrentWorkingDir();
+         }
+
+         if (addCwd)
+         {
+            ossimFilename cwd = ossimEnvironmentUtility::instance()->
+               getCurrentWorkingDir();
+            result = cwd.dirCat(result);
+         }
+         else if ( result.isRelative() )
+         {
+            if ( result.size() && ((*(result.begin())) != '$') )
+            {
+               ossimFilename cwd = ossimEnvironmentUtility::instance()->
+                  getCurrentWorkingDir();
+               result = cwd.dirCat(result);
+            }
+         }
+               
+         // Check result to see if we're finished.
+         if ( result.needsExpansion() )
+         {
+            // now expand any environment variable substitutions
+            
+            ossimFilename finalResult;
+            const char* tempPtr = result.c_str();
+            ossim_int32 startIdx = -1;
+            ossim_int32 resultSize = (ossim_uint32)result.size();
+            ossim_int32 scanIdx = 0;
+            while(scanIdx < resultSize)
+            {
+               // look for start of substitution pattern
+               if(tempPtr[scanIdx] == '$')
+               {
+                  if(tempPtr[scanIdx+1] == '(')
+                  {
+                     scanIdx +=2;
+                     startIdx = scanIdx;
+                  }
+               }
+               // look for an end pattern and apply if we found a start pattern
+               else if(tempPtr[scanIdx] == ')')
+               {
+                  if(startIdx != -1)
+                  {
+                     ossimFilename value(
+                        ossimEnvironmentUtility::instance()->
+                        getEnvironmentVariable(ossimString(tempPtr+startIdx,
+                                                           tempPtr+scanIdx)));
+#if defined(_WIN32) // do windows style replacment
+                     //                    value.convertBackToForwardSlashes();
+#endif
+                     finalResult += value;
+                     // reset start idx indicator to not set so we are ready for next pattern
+                     //
+                     startIdx = -1;
+                  }
+                  else // if no start then tack on the )
+                  {
+                     finalResult += tempPtr[scanIdx];
+                  }
+                  ++scanIdx;
+               }
+               else if(startIdx == -1)
+               {
+                  finalResult += tempPtr[scanIdx];
+                  ++scanIdx;
+               }
+               else
+               {
+                  ++scanIdx;
+               }
+            }
+#if defined(_WIN32)
+
+#else        
+            finalResult.gsub("//", "/", true);
+#endif       
+            result = finalResult;
+         
+         } // matches:  if ( result.needsExpansion() )
+
+#if defined(_WIN32)
+         //        result.convertForwardToBackSlashes();
+#endif        
+
+      } // matches: if ( needsExpansion() )
+
+      //---
+      // If we had a size before "expand()" and now we don't something went
+      // wrong...
+      //---
+      if (!result.size())
+      {
+         result = *this;
+      }
+      
+   } // matches: if ( size() )
+   
+   return result;
+}
+
+bool ossimFilename::exists() const
+{
+   bool result = false;
+#if defined(_WIN32)
+   result = (_access(c_str(), ossimFilename::OSSIM_EXIST) == 0);
+#else
+   result = ((access(c_str(), ossimFilename::OSSIM_EXIST)) == 0);
+#endif
+   return result;
+}
+
+bool ossimFilename::isFile() const
+{
+#if defined(_WIN32)
+
+   struct _stat sbuf;
+   if ( _stat(c_str(), &sbuf ) == -1)
+      return false;
+   return (_S_IFMT & sbuf.st_mode ? true : false);
+#else
+   struct stat sbuf;
+
+   stat(c_str(), &sbuf);
+   return ((sbuf.st_mode & S_IFMT) == S_IFREG);
+#endif
+}
+
+bool ossimFilename::isDir() const
+{
+   if ( empty() )
+   {
+      return false;
+   }
+   
+   ossimFilename temp = c_str();
+   const char& lastChar = temp[temp.size()-1];
+   if ( lastChar == '/' || lastChar == '\\' )
+   {
+      temp = temp.beforePos(temp.size() - 1);
+   }
+	
+#if defined(_WIN32)
+
+   struct _stat sbuf;
+   if ( _stat(temp.c_str(), &sbuf ) == -1)
+      return false;
+   return (_S_IFDIR & sbuf.st_mode ? true : false);
+#else
+   struct stat sbuf;
+   if (stat(temp.c_str(), &sbuf) == -1)
+      return false;
+   return (S_ISDIR(sbuf.st_mode));
+#endif
+}
+
+bool ossimFilename::isReadable() const
+{
+#if defined(_WIN32)
+   
+   struct _stat sbuf;
+   if ( _stat(c_str(), &sbuf ) == -1)
+      return false;
+   return (_S_IREAD & sbuf.st_mode ? true : false);
+#else
+   return (access(c_str(), ossimFilename::OSSIM_READ) == 0);
+#endif
+}
+
+bool ossimFilename::isWriteable() const
+{
+#if defined(_WIN32)
+
+   struct _stat sbuf;
+   if ( _stat(c_str(), &sbuf ) == -1)
+      return false;
+   return (_S_IWRITE & sbuf.st_mode ? true : false);
+#else
+   return (access(c_str(), ossimFilename::OSSIM_WRITE) == 0);
+#endif
+}
+
+bool ossimFilename::isExecutable() const
+{
+#if defined(_WIN32)
+
+   struct _stat sbuf;
+   if ( _stat(c_str(), &sbuf ) == -1)
+      return false;
+   return (_S_IEXEC & sbuf.st_mode ? true : false);
+#else
+   return (access(c_str(), ossimFilename::OSSIM_EXE) == 0);
+#endif
+}
+
+ossimString ossimFilename::ext() const
+{
+   ossimFilename file = *this;
+   std::string::size_type pos = file.m_str.rfind('.');
+   if (pos == std::string::npos)
+   {
+      return ossimFilename::NIL;
+   }
+
+   return ossimFilename(file.m_str.substr(pos+1));
+}
+
+ossimFilename ossimFilename::file() const
+{
+   ossimFilename file = *this;
+
+   //file.convertBackToForwardSlashes();
+
+   std::string::size_type pos = file.m_str.rfind(thePathSeparator);
+   if (pos == std::string::npos)
+      return *this;
+   else
+      return ossimFilename(file.m_str.substr(pos+1));
+}
+
+ossimFilename ossimFilename::path() const
+{
+   ossimFilename file = *this;
+   //file.convertBackToForwardSlashes();
+
+   // finds the last occurrence of the given string; in this case '/';
+   std::string::size_type pos = file.m_str.rfind(thePathSeparator);
+
+   if (pos == 0)
+      return ossimFilename(ossimFilename(thePathSeparator));
+   if (pos == std::string::npos)
+   {
+      // We got to the end of the file and did not find a path separator.
+      return ossimFilename::NIL;
+   }
+
+   return ossimFilename(file.m_str.substr(0, pos));
+}
+
+ossimFilename ossimFilename::drive()const
+{
+   ossimFilename tempFile(*this);
+   ossimFilename result;
+
+   tempFile.convertForwardToBackSlashes();
+
+   ossimRegExp regEx("^([a-z|A-Z])+:");
+
+   if(regEx.find(tempFile.c_str()))
+   {
+      result = ossimFilename(ossimString(this->begin() + regEx.start(),
+                                         this->begin() + regEx.end()));
+   }
+   else
+   {
+      result = "";
+   }
+
+   return result;
+}
+
+ossimFilename ossimFilename::fileNoExtension()const
+{
+   ossimFilename f = *this;
+   //f.convertBackToForwardSlashes();
+
+   std::string::size_type dot_pos   = f.m_str.rfind('.');
+   std::string::size_type slash_pos = f.m_str.rfind(thePathSeparator);
+
+   if(dot_pos == std::string::npos)
+   {
+      if(slash_pos == std::string::npos)
+      {
+         return *this;
+      }
+      else
+      {
+         return ossimFilename(this->begin()+slash_pos+1,
+                              this->end());
+      }
+   }
+   else if(slash_pos == std::string::npos)
+   {
+      return ossimFilename(this->begin(), this->begin()+dot_pos);
+   }
+   else if(slash_pos < dot_pos)
+   {
+      return ossimFilename(this->begin()+slash_pos+1,
+                           this->begin() + dot_pos);
+   }
+
+   return ossimFilename(this->begin()+slash_pos+1,
+                        this->end());
+
+}
+ossimFilename ossimFilename::noExtension()const
+{
+   ossimString drivePart;
+   ossimString pathPart;
+   ossimString filePart;
+   ossimString extPart;
+
+   split(drivePart, pathPart, filePart, extPart);
+
+   extPart.clear();
+
+   ossimFilename result;
+   
+   result.merge(drivePart, pathPart, filePart, extPart);
+   
+   return result;
+}
+
+ossimFilename& ossimFilename::setExtension(const ossimString& e)
+{
+   ossimString newExtPart = e;
+
+   //---
+   // If e has a dot "." in the front of it strip it off...
+   //---
+   if ( (e.begin() != e.end()) && ((*(e.begin())) == '.') )
+   {
+      newExtPart = ossimString(e.begin() + 1, e.end());
+   }
+
+   ossimString drivePart;
+   ossimString pathPart;
+   ossimString filePart;
+   ossimString extPart;
+
+   split(drivePart,
+         pathPart,
+         filePart,
+         extPart);
+
+   merge(drivePart,
+         pathPart,
+         filePart,
+         newExtPart);
+
+   return *this;
+}
+
+ossimFilename& ossimFilename::setDrive(const ossimString& d)
+{
+   ossimString drivePart;
+   ossimString pathPart;
+   ossimString filePart;
+   ossimString extPart;
+
+   split(drivePart,
+         pathPart,
+         filePart,
+         extPart);
+
+   merge(d,
+         pathPart,
+         filePart,
+         extPart);
+
+   return *this;
+}
+
+ossimFilename& ossimFilename::setPath(const ossimString& p)
+{
+   ossimString drivePart;
+   ossimString pathPart;
+   ossimString filePart;
+   ossimString extPart;
+
+   split(drivePart,
+         pathPart,
+         filePart,
+         extPart);
+
+   merge(drivePart,
+         p,
+         filePart,
+         extPart);
+
+   return *this;
+}
+
+ossimFilename& ossimFilename::setFile(const ossimString& f)
+{
+   ossimString drivePart;
+   ossimString pathPart;
+   ossimString filePart;
+   ossimString extPart;
+
+   split(drivePart,
+         pathPart,
+         filePart,
+         extPart);
+
+   merge(drivePart,
+         pathPart,
+         f,
+         extPart);
+
+   return *this;
+}
+
+
+void ossimFilename::split(ossimString& drivePart,
+                          ossimString& pathPart,
+                          ossimString& filePart,
+                          ossimString& extPart)const
+{
+   drivePart = drive();
+   pathPart  = path();
+   if(drivePart != "")
+   {
+      pathPart = pathPart.substitute(drivePart, "");
+   }
+   filePart  = fileNoExtension();
+   extPart   = ext();
+}
+
+void ossimFilename::merge(const ossimString& drivePart,
+                          const ossimString& pathPart,
+                          const ossimString& filePart,
+                          const ossimString& extPart)
+{
+   ossimFilename result = drivePart;
+
+   if(pathPart != "")
+   {
+      result = result.dirCat(ossimFilename(pathPart));
+   }
+
+   if(filePart!="")
+   {
+      result = result.dirCat(ossimFilename(filePart));
+   }
+
+   if(extPart != "")
+   {
+      result += ".";
+      result += extPart;
+   }
+
+   *this = result;
+}
+
+ossimFilename ossimFilename::dirCat(const ossimFilename& file) const
+{
+   // If this string is empty simply return the input file.
+   if (empty()) return file;
+   if (file.empty()) return *this;
+
+   ossimFilename dir      = *this;
+   ossimFilename tempFile = file;
+      
+   // Check the end and see if it already has a "/".
+   string::const_iterator i = dir.end();
+
+   --i; // decrement past the trailing null.
+
+   if ( (*i) != thePathSeparator)
+   {
+      dir += ossimString(thePathSeparator);
+   }
+
+   // check for dot slash or just slash: ./foo or /foo   
+   std::string::iterator iter = tempFile.begin();
+   if (iter != tempFile.end())
+   {
+      if ((*iter) == thePathSeparator)
+      {
+         ++iter; // skip slash
+      }
+      else if (tempFile.size() > 1)
+      {
+         if ( ((*iter) == '.') &&  ( *(iter + 1) == thePathSeparator) )
+         {
+            iter = iter + 2; // skip dot slash
+         }
+      }
+   }   
+
+   dir += std::string(iter, tempFile.end());
+
+   return dir;
+}
+
+ossim_int64 ossimFilename::fileSize() const
+{
+   struct stat sbuf;
+
+#ifndef __BORLANDC__
+   if (stat(c_str(), &sbuf) == 0)
+   {
+      return (ossim_int64)sbuf.st_size;
+   }
+   else
+   {
+      ifstream in(c_str());
+      if(in)
+      {
+         in.seekg(SEEK_END);
+         return (ossim_int64)in.tellg();
+      }
+   }
+#else
+   ifstream in(c_str());
+   if(in)
+   {
+      in.seekg(SEEK_END);
+      return (ossim_int64)in.tellg();
+   }
+#endif
+   return 0;
+}
+
+bool ossimFilename::createDirectory( bool recurseFlag,
+                                     int perm ) const
+{
+   if(exists()) return true;
+
+   if ( empty() ) return false;
+
+   if(recurseFlag)
+   {
+      ossimString tempString = this->expand().c_str();
+
+      vector<ossimString> result;
+      tempString.split(result,thePathSeparator);
+
+      if(result.size())
+      {
+         ossimString current = result[0];
+
+// Reconstruct UNC paths under Windows.
+#if defined(_WIN32)
+         bool bGotUNC = false;
+         if ( current.length() == 0 && tempString.length() > 2 )
+         {
+            const char* fstr = tempString.c_str();
+            const char fstar0 = fstr[0];
+            const char fstar1 = fstr[1];
+            if ( fstar0=='\\' && fstar1=='\\' )
+            {
+               bGotUNC = true;
+               current = thePathSeparator;
+            }
+         }
+#endif
+
+         for(ossim_uint32 i = 1; i < result.size(); ++i)
+         {
+            current += (thePathSeparator+result[i]);
+
+#if defined(_WIN32)
+            if ( bGotUNC == true && i==1 )
+            {
+               // The root of the UNC path is assumed to exist.
+               continue;
+            }
+#endif
+            
+            if(current != thePathSeparator)
+            {
+               if(!ossimFilename(current).exists())
+               {
+#if defined(__BORLANDC__)
+                  if ( _mkdir(current.c_str()) != 0 )
+#elif defined(_WIN32)
+                  if ( _mkdir(current.c_str()) != 0 )
+#else
+                  if ( mkdir(current.c_str(), perm) != 0 )
+#endif
+                  {
+                     return false;
+                  }
+               }
+            }
+         }
+      }
+   }
+   else
+   {
+#if defined (__BORLANDC__)
+      if ( _mkdir(c_str()) != 0 )
+#elif defined(_WIN32)
+      if ( _mkdir(c_str()) != 0 )
+#else
+      if ( mkdir(c_str(), perm) != 0 )
+#endif
+      {
+         return false;
+      }
+      else
+      {
+         return true;
+      }
+   }
+   return true;
+}
+
+bool ossimFilename::remove(const ossimFilename& pathname)
+{
+   bool result = true;
+
+#if defined(__VISUALC__)  || defined(__BORLANDC__) || defined(__WATCOMC__) || \
+   defined(__GNUWIN32__) || defined(_MSC_VER)
+
+   // Note: not sure if these work on all of the above flavors. drb - 14 Sep. 2011.
+   if(pathname.isDir())
+   {
+      // Note this only removes empty directories.
+      result = ( RemoveDirectory( pathname.c_str() ) != 0 );
+   }
+   else
+   {
+      result = ( DeleteFile( pathname.c_str() ) != 0 );
+   }
+#else /* Unix flavor from unistd.h. */
+   if(pathname.isDir())
+   {
+      result = ( rmdir( pathname.c_str() ) == 0 );
+   }
+   else
+   {
+      result = ( unlink( pathname.c_str() ) == 0 );
+   }
+#endif
+
+   return result;
+}
+
+bool ossimFilename::wildcardRemove(const ossimFilename& pathname)
+{
+   std::vector<ossimFilename> fileListToRemove;
+   ossimFilename tempPathname = pathname;
+   
+   if(!tempPathname.isDir())
+   {
+      ossimFilename file = tempPathname.file();
+      ossimFilename path = tempPathname.path();
+      if(path == "")
+      {
+         path = ".";
+      }
+      ossimDirectory dir;
+      if(dir.open(path))
+      {
+         dir.findAllFilesThatMatch(fileListToRemove,
+                                   file.c_str());
+      }
+      else
+      {
+      }
+   }
+   else
+   {
+      fileListToRemove.push_back(ossimFilename(pathname));
+   }
+   ossim_uint32 idx = 0;
+   bool result = true;
+   for(idx = 0; idx < fileListToRemove.size(); ++idx)
+   {
+#if defined(__VISUALC__)  || defined(__BORLANDC__) || defined(__WATCOMC__) || \
+   defined(__GNUWIN32__) || defined(_MSC_VER)
+      
+      if(remove(fileListToRemove[idx].c_str()) != 0)
+      {
+         result = false;
+      }
+#else
+      if (unlink(fileListToRemove[idx]) == -1)
+      {
+         result = false;
+      }
+#endif /* HAVE_UNISTD_H */
+   }
+   return result;
+}
+
+bool ossimFilename::rename(const ossimFilename& destFile, bool overwriteDestinationFlag)const
+{
+   if(!overwriteDestinationFlag)
+   {
+      if(destFile.exists())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "WARNING: "
+            << "ossimFilename::rename WARNING:"
+            << "\nDestination File Exists: " << destFile << std::endl;
+         return false;
+      }
+   }
+   else if(destFile.exists())
+   {
+      destFile.remove();
+   }
+   ::rename(this->c_str(), destFile.c_str());
+   
+   return true;
+}
+   
+bool ossimFilename::remove()const
+{
+   return ossimFilename::remove(*this);
+}
+
+bool ossimFilename::wildcardRemove()const
+{
+   return ossimFilename::wildcardRemove(*this);
+}
+
+bool ossimFilename::copyFileTo(const ossimFilename& outputFile) const
+{
+   bool result = false;
+   
+   std::ifstream is(this->c_str(), std::ios::in|std::ios::binary);
+   if ( is.good() )
+   {
+      ossimFilename f = outputFile;
+      if ( f.isDir() )
+      {
+         f = f.dirCat( this->file() );
+      }
+
+      if ( f != *this )
+      {
+         std::ofstream os( f.c_str(), std::ios::out|std::ios::binary );
+         if ( os.good() )
+         {
+            // Copy the file:
+            char c;
+            while(is.get(c))
+            {
+               os.put(c);
+            }
+            
+            if ( is.eof() &&  !os.fail())
+            {
+               result = true;
+            }
+            else
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << "WARNING: "
+                  << "ossimFilename::copyFileTo WARNING:"
+                  << "\nError detected writing from file "
+                  << this->c_str() << " to file " << f.c_str() << std::endl;
+            }
+         }
+         else
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "WARNING: "
+               << "ossimFilename::copyFileTo WARNING:"
+               << "\nCannot open: " << f.c_str() << std::endl;
+         }
+      } //  if ( f != *this )
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "WARNING: "
+            << "ossimFilename::copyFileTo WARNING:"
+            << "\nFiles the same!" << std::endl;
+      }
+      
+   } // if ( is.good() )
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "WARNING: "
+         << "ossimFilename::copyFileTo WARNING:"
+         << "\nCannot open: " << this->c_str() << std::endl;
+   }
+   
+   return result;
+}
+
+//---
+// We will only return false if we are absolutely sure absolutely sure we
+// are not relative. No pun intended:)
+//---
+bool ossimFilename::isRelative() const
+{
+   bool result = true;
+   if (size())
+   {
+      //---
+      // Look for unix "/"...
+      // ESH: Look for Windows "\" (with prepending escape character \)
+      //---
+      if ( (*(begin()) == '/') || (*(begin()) == '\\') )
+      {
+         result = false;
+      }
+      else
+      {
+         // Look for windows drive
+         ossimRegExp regEx("^([a-z|A-Z])+:");
+         if ( regEx.find(c_str()) == true)
+         {
+            result = false;
+         }
+      }
+   }
+   return result;
+}
+
+bool ossimFilename::needsExpansion() const
+{
+   bool result = false;
+   if ( size() )
+   {
+      result = isRelative();
+      if (result == false)
+      {
+         // Check for '$'
+         std::string::size_type pos = m_str.find('$', 0);
+         {
+            if (pos != std::string::npos)
+            {
+               // found '$'
+               result = true;
+            }
+         }
+      }    
+   }
+   return result;
+}
+
+char ossimFilename::getPathSeparator() const
+{
+   return thePathSeparator;
+}
+
+void ossimFilename::convertToNative()
+{
+#if defined(_WIN32)
+   convertForwardToBackSlashes();
+#else
+   convertBackToForwardSlashes();
+#endif
+	
+}
+
diff --git a/src/ossim/base/ossimFilenameProperty.cpp b/ossim/src/ossim/base/ossimFilenameProperty.cpp
similarity index 100%
rename from src/ossim/base/ossimFilenameProperty.cpp
rename to ossim/src/ossim/base/ossimFilenameProperty.cpp
diff --git a/src/ossim/base/ossimFontInformation.cpp b/ossim/src/ossim/base/ossimFontInformation.cpp
similarity index 100%
rename from src/ossim/base/ossimFontInformation.cpp
rename to ossim/src/ossim/base/ossimFontInformation.cpp
diff --git a/src/ossim/base/ossimFontProperty.cpp b/ossim/src/ossim/base/ossimFontProperty.cpp
similarity index 100%
rename from src/ossim/base/ossimFontProperty.cpp
rename to ossim/src/ossim/base/ossimFontProperty.cpp
diff --git a/src/ossim/base/ossimFpt.cpp b/ossim/src/ossim/base/ossimFpt.cpp
similarity index 100%
rename from src/ossim/base/ossimFpt.cpp
rename to ossim/src/ossim/base/ossimFpt.cpp
diff --git a/src/ossim/base/ossimFpt3d.cpp b/ossim/src/ossim/base/ossimFpt3d.cpp
similarity index 100%
rename from src/ossim/base/ossimFpt3d.cpp
rename to ossim/src/ossim/base/ossimFpt3d.cpp
diff --git a/ossim/src/ossim/base/ossimGeoPolygon.cpp b/ossim/src/ossim/base/ossimGeoPolygon.cpp
new file mode 100644
index 0000000..aef7fab
--- /dev/null
+++ b/ossim/src/ossim/base/ossimGeoPolygon.cpp
@@ -0,0 +1,402 @@
+//*****************************************************************************
+// FILE: ossimPolygon.h
+//
+// License:  See top level LICENSE.txt file.
+//
+// AUTHOR: Garrett Potts
+//
+//*****************************************************************************
+//  $Id: ossimGeoPolygon.cpp 23170 2015-02-25 20:59:10Z dburken $
+
+#include <ostream>
+#include <sstream>
+#include <algorithm>
+#include <ossim/base/ossimGeoPolygon.h>
+#include <ossim/base/ossimDatumFactoryRegistry.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+
+static const char* NUMBER_VERTICES_KW = "number_vertices";
+
+std::ostream& operator <<(std::ostream& out, const ossimGeoPolygon& poly)
+{
+   if(poly.size())
+   {
+      if(poly.size() >1)
+      {
+         for(ossim_uint32 i = 0; i <  poly.size()-1; ++i)
+         {
+            out << "P" << i << ": " << poly[i] << std::endl;
+         }
+         out << "P"  << (poly.size()-1)
+             << ": " << poly[poly.size()-1] << std::endl;
+      }
+      else
+      {
+         out << "P0: " << poly[0] << std::endl;
+      }
+   }
+
+   return out;
+}
+
+ossimGeoPolygon::ossimGeoPolygon()
+   :
+   theVertexList(),
+   theAttributeList(),
+   theHoleList(),
+   theCurrentVertex(-1),
+   theOrderingType(OSSIM_VERTEX_ORDER_UNKNOWN)
+{
+}
+
+ossimGeoPolygon::ossimGeoPolygon(const std::vector<ossimGpt>& points)
+   :
+   theVertexList(points),
+   theAttributeList(),
+   theHoleList(),
+   theCurrentVertex(0),
+   theOrderingType(OSSIM_VERTEX_ORDER_UNKNOWN)
+{
+}
+
+ossimGeoPolygon::ossimGeoPolygon(const ossimGeoPolygon& rhs)
+   :
+   theVertexList(rhs.theVertexList),
+   theAttributeList(rhs.theAttributeList),
+   theHoleList(rhs.theHoleList),
+   theCurrentVertex(rhs.theCurrentVertex),
+   theOrderingType(rhs.theOrderingType)
+{
+}
+
+const ossimGeoPolygon& ossimGeoPolygon::operator=(const ossimGeoPolygon& rhs)
+{
+   if ( this != &rhs )
+   {
+      theVertexList    = rhs.theVertexList;
+      theAttributeList = rhs.theAttributeList;
+      theHoleList      = rhs.theHoleList;
+      theCurrentVertex = rhs.theCurrentVertex;
+      theOrderingType  = rhs.theOrderingType;
+   }
+   return *this;
+}
+
+bool ossimGeoPolygon::addWmsBbox(const ossimString& wmsBbox)
+{
+   std::vector<ossimString> splitArray = wmsBbox.split(",");
+   bool result = true;
+   if(splitArray.size()>=4)
+   {
+      double minx = splitArray[0].trim().toDouble();
+      double miny = splitArray[1].trim().toDouble();
+      double maxx = splitArray[2].trim().toDouble();
+      double maxy = splitArray[3].trim().toDouble();
+
+      addPoint(miny, minx);//lower left
+      addPoint(maxy, minx);//upper left
+      addPoint(maxy, maxx);//upper right
+      addPoint(miny, maxx);//lower right
+   }
+   else
+   {
+      // error
+      result = false;
+   }
+
+   return result;
+}  
+
+bool ossimGeoPolygon::hasNans()const
+{
+   int upper = (int)theVertexList.size();
+   int i = 0;
+
+   for(i = 0; i < upper; ++i)
+   {
+      if(theVertexList[i].hasNans())
+      {
+         return true;
+      }
+   }
+
+   return false;
+}
+
+bool ossimGeoPolygon::vertex(int index, ossimGpt& v) const 
+{
+   if((index >= (int)theVertexList.size()) ||
+      (index < 0))
+   {
+      return false;
+   }
+
+   v = theVertexList[index];
+   theCurrentVertex = index;
+
+   return true;
+}
+
+bool ossimGeoPolygon::nextVertex(ossimDpt& v) const 
+{
+   ++theCurrentVertex;
+   if(theCurrentVertex >= (ossim_int32)theVertexList.size())
+   {
+      return false;
+   }
+   v = theVertexList[theCurrentVertex];
+   
+   return true;
+}
+
+void ossimGeoPolygon::stretchOut(ossimGeoPolygon& newPolygon,
+                                 double displacement)
+{
+   newPolygon.resize(size());
+   if(size() >= 3)
+   {
+      const ossimDatum* datum = theVertexList[0].datum();
+      checkOrdering();
+      double signMult = 1.0;
+      if(theOrderingType == OSSIM_COUNTERCLOCKWISE_ORDER)
+      {
+         signMult = -1.0;
+      }
+      
+      ossimDpt prev, current, next;
+
+      ossim_uint32 prevI;
+      ossim_uint32 currentI;
+      ossim_uint32 nextI;
+      ossim_uint32 i = 0;
+      ossim_uint32 upper = size();
+
+      bool equalEndsFlag = false;
+      if(theVertexList[0] == theVertexList[theVertexList.size()-1])
+      {
+         equalEndsFlag = true;
+         prevI    = 0;
+         currentI = 1;
+         nextI    = 2;
+         i = 1;
+         --upper;
+      }
+      else
+      {
+         equalEndsFlag = false;
+         prevI    = size()-1;
+         currentI = 0;
+         nextI    = 1;
+      }
+      for(; i < upper;++i)
+      {
+         prev    = theVertexList[prevI];
+         current = theVertexList[currentI];
+         next    = theVertexList[nextI];
+
+         ossimDpt averageNormal;
+         
+         ossimDpt diffPrev = current - prev;
+         ossimDpt diffNext = next - current;
+
+         diffPrev = diffPrev*(1.0/diffPrev.length());
+         diffNext = diffNext*(1.0/diffNext.length());
+
+         ossimDpt diffPrevNormal(-diffPrev.y,
+                                 diffPrev.x);
+         ossimDpt diffNextNormal(-diffNext.y,
+                                 diffNext.x);
+         
+         averageNormal     = (diffPrevNormal + diffNextNormal);
+         averageNormal     = averageNormal*(signMult*(1.0/averageNormal.length()));
+         ossimDpt newPoint = ossimDpt( theVertexList[i].lond(),
+                                       theVertexList[i].latd()) +
+                             averageNormal*displacement;
+         newPolygon[i].latd(newPoint.lat);
+         newPolygon[i].lond(newPoint.lon);
+         newPolygon[i].height(theVertexList[i].height());
+         newPolygon[i].datum(datum);
+         
+         ++prevI;
+         ++currentI;
+         ++nextI;
+
+         prevI%=size();
+         nextI%=size();
+      }
+      if(equalEndsFlag)
+      {
+         
+         prev    = theVertexList[theVertexList.size()-2];
+         current = theVertexList[0];
+         next    = theVertexList[1];
+         
+         ossimDpt averageNormal;
+         
+         ossimDpt diffPrev = current - prev;
+         ossimDpt diffNext = next - current;
+
+         diffPrev = diffPrev*(1.0/diffPrev.length());
+         diffNext = diffNext*(1.0/diffNext.length());
+
+         ossimDpt diffPrevNormal(-diffPrev.y,
+                                 diffPrev.x);
+         ossimDpt diffNextNormal(-diffNext.y,
+                                 diffNext.x);
+         
+         averageNormal     = (diffPrevNormal + diffNextNormal);
+         averageNormal     = averageNormal*(signMult*(1.0/averageNormal.length()));
+         ossimDpt newPoint = ossimDpt( theVertexList[i].lond(),
+                                       theVertexList[i].latd()) +
+                             averageNormal*displacement;
+         newPolygon[0].latd(newPoint.lat);
+         newPolygon[0].lond(newPoint.lon);
+         newPolygon[0].height(theVertexList[i].height());
+         newPolygon[0].datum(datum);
+         
+         newPolygon[(int)theVertexList.size()-1] = newPolygon[0];
+      }
+   }
+}
+
+
+double ossimGeoPolygon::area()const
+{
+   double area = 0;
+   ossim_uint32 i=0;
+   ossim_uint32 j=0;
+   ossim_uint32 size = (ossim_uint32)theVertexList.size();
+   
+   for (i=0;i<size;i++)
+   {
+      j = (i + 1) % size;
+      area += theVertexList[i].lon * theVertexList[j].lat;
+      area -= theVertexList[i].lat * theVertexList[j].lon;
+   }
+
+   area /= 2;
+
+   return area;
+}
+
+void ossimGeoPolygon::reverseOrder()
+{
+   std::reverse(theVertexList.begin(), theVertexList.end());
+   
+   if(theOrderingType == OSSIM_COUNTERCLOCKWISE_ORDER)
+   {
+      theOrderingType = OSSIM_CLOCKWISE_ORDER;
+   }
+   else if(theOrderingType == OSSIM_CLOCKWISE_ORDER)
+   {
+      theOrderingType =  OSSIM_COUNTERCLOCKWISE_ORDER;
+   }
+   
+}
+
+void ossimGeoPolygon::checkOrdering()const
+{
+   if(theOrderingType == OSSIM_VERTEX_ORDER_UNKNOWN)
+   {
+      double areaValue = area();
+      if(areaValue > 0)
+      {
+         theOrderingType = OSSIM_COUNTERCLOCKWISE_ORDER;
+      }
+      else if(areaValue <= 0)
+      {
+         theOrderingType = OSSIM_CLOCKWISE_ORDER;
+      }
+   }
+}
+
+ossimGpt ossimGeoPolygon::computeCentroid()const
+{
+   if(!size())
+   {
+      return ossimGpt();
+   }
+   ossimDpt average(0.0,0.0);
+   double height=0.0;
+   for(ossim_uint32 i = 0; i < size(); ++i)
+   {
+      average += ossimDpt(theVertexList[i]);
+      height  += theVertexList[i].height();
+   }
+
+   
+   average.x /= size();
+   average.y /= size();
+   height    /= size();
+
+   return ossimGpt(average.y, average.x, height, theVertexList[0].datum());
+}
+
+bool ossimGeoPolygon::saveState(ossimKeywordlist& kwl,
+                                const char* prefix)const
+{
+   int i = 0;
+
+   kwl.add(prefix,
+           ossimKeywordNames::TYPE_KW,
+           "ossimGeoPolygon",
+           true);
+   kwl.add(prefix,
+           NUMBER_VERTICES_KW,
+           static_cast<ossim_uint32>(theVertexList.size()),
+           true);
+   if(theVertexList.size())
+   {
+      kwl.add(prefix,
+              ossimKeywordNames::DATUM_KW,
+              theVertexList[0].datum()->code(),
+              true);
+   }
+   else
+   {
+      kwl.add(prefix,
+              ossimKeywordNames::DATUM_KW,
+              "WGE",
+              true);
+   }
+   
+   for(i = 0; i < (int)theVertexList.size();++i)
+   {
+      ossimString vert = "v"+ossimString::toString(i);
+      ossimString value = (ossimString::toString(theVertexList[i].latd()) + " " +
+                           ossimString::toString(theVertexList[i].lond())  + " " +
+                           ( theVertexList[i].isHgtNan()?ossimString("nan"):ossimString::toString(theVertexList[i].height())));
+      kwl.add(prefix,
+              vert.c_str(),
+              value.c_str(),
+              true);
+   }
+
+   return true;
+}
+
+bool ossimGeoPolygon::loadState(const ossimKeywordlist& kwl,
+                                const char* prefix)
+{
+   const char* number_vertices = kwl.find(prefix, NUMBER_VERTICES_KW);
+   ossimString datumStr = kwl.find(prefix, ossimKeywordNames::DATUM_KW);
+   const ossimDatum* datum = ossimDatumFactoryRegistry::instance()->create(datumStr);
+   
+   theVertexList.clear();
+   int i = 0;
+   int vertexCount = ossimString(number_vertices).toLong();
+   ossimString lat, lon, height;
+   for(i = 0; i < vertexCount; ++i)
+   {
+      ossimString v = kwl.find(prefix, (ossimString("v")+ossimString::toString(i)).c_str());
+      ossimString latString, lonString, heightString;
+      v = v.trim();
+      std::istringstream in(v);
+      in>>lat>>lon>>height;
+      theVertexList.push_back(ossimGpt(lat.toDouble(), lon.toDouble(), height.toDouble(), datum));
+   }
+
+   return true;
+}
diff --git a/src/ossim/base/ossimGeoTiffCoordTransformsLut.cpp b/ossim/src/ossim/base/ossimGeoTiffCoordTransformsLut.cpp
similarity index 100%
rename from src/ossim/base/ossimGeoTiffCoordTransformsLut.cpp
rename to ossim/src/ossim/base/ossimGeoTiffCoordTransformsLut.cpp
diff --git a/ossim/src/ossim/base/ossimGeoTiffDatumLut.cpp b/ossim/src/ossim/base/ossimGeoTiffDatumLut.cpp
new file mode 100644
index 0000000..a6b2280
--- /dev/null
+++ b/ossim/src/ossim/base/ossimGeoTiffDatumLut.cpp
@@ -0,0 +1,121 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Contains class definition for ossimGeoTiffDatumLut.
+//*******************************************************************
+//  $Id: ossimGeoTiffDatumLut.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/base/ossimGeoTiffDatumLut.h>
+#include <ossim/base/ossimString.h>
+
+static const int TABLE_SIZE = 24;
+
+//*******************************************************************
+// Public Constructor:
+//*******************************************************************
+ossimGeoTiffDatumLut::ossimGeoTiffDatumLut()
+   :
+      ossimLookUpTable(TABLE_SIZE)
+{
+   //***
+   // Complete initialization of data member "theTable".
+   // Note:  Scalar types defined in constants.h file.
+   //***
+   theTable[0].theKey    = GCS_Adindan;
+   theTable[0].theValue  = "ADI-M";
+   
+   theTable[1].theKey    = GCS_Arc_1950;
+   theTable[1].theValue  = "ARF-M";
+   
+   theTable[2].theKey    = GCS_Arc_1960;
+   theTable[2].theValue  = "ARS-M";
+   
+   theTable[3].theKey    = GCS_ED50;
+   theTable[3].theValue  = "EUR-M";
+   
+   theTable[4].theKey    = GCS_NAD27;
+   theTable[4].theValue  = "NAS-C";
+   
+   theTable[5].theKey    = GCS_NAD83;
+   theTable[5].theValue  = "NAR-C";
+   
+   theTable[6].theKey    = GCS_OSGB_1936;
+   theTable[6].theValue  = "OGB-M";
+   
+   theTable[7].theKey    = GCS_WGS_72;
+   theTable[7].theValue  = "WGD";
+   
+   theTable[8].theKey    = GCS_WGS_84;
+   theTable[8].theValue  = "WGE";
+   
+   theTable[9].theKey    = GCS_Tokyo;
+   theTable[9].theValue  = "TOY-M";
+   
+   theTable[10].theKey   = DatumE_WGS84;
+   theTable[10].theValue = "WGE";
+   
+   theTable[11].theKey   = Datum_Adindan;
+   theTable[11].theValue = "ADI-M";
+   
+   theTable[12].theKey   = Datum_Arc_1950;
+   theTable[12].theValue = "ARF-M";
+   
+   theTable[13].theKey   = Datum_Arc_1960;
+   theTable[13].theValue = "ARS-M";
+   
+   theTable[14].theKey   = Datum_European_Datum_1950;
+   theTable[14].theValue = "EUR-M";
+   
+   theTable[15].theKey   = Datum_North_American_Datum_1927;
+   theTable[15].theValue = "NAS-C";
+   
+   theTable[16].theKey   = Datum_North_American_Datum_1983;
+   theTable[16].theValue = "NAR-C";
+   
+   theTable[17].theKey   = Datum_OSGB_1936;
+   theTable[17].theValue = "OGB-M";
+   
+   theTable[18].theKey   = Datum_Tokyo;
+   theTable[18].theValue = "TOY-M";
+   
+   theTable[19].theKey   = Datum_WGS72;
+   theTable[19].theValue = "WGD";
+   
+   theTable[20].theKey   = Datum_WGS84;
+   theTable[20].theValue = "WGE";
+
+   theTable[21].theKey   = Datum_NAD83_HARN;
+   theTable[21].theValue = "NAR";
+
+   theTable[22].theKey   = GCS_NAD83_HARN;
+   theTable[22].theValue = "NAR";
+
+   //---
+   // Note:  This code implies a Clark 1866 ellipse with no datum.
+   // NAS-C used as work around for poor tag setting out of Erdas Imagine.
+   //---
+   theTable[23].theKey   = GCS_Clark_1866;
+   theTable[23].theValue = "NAS-C";
+   theTable[23].theKey   = 3785;
+   theTable[23].theValue = "6055";
+   theTable[23].theKey   = 900913;
+   theTable[23].theValue = "6055";
+}
+
+ossimGeoTiffDatumLut::~ossimGeoTiffDatumLut()
+{
+}
+
+ossimKeyword ossimGeoTiffDatumLut::getKeyword() const
+{
+   return ossimKeyword("geotiff_datum_code", "");
+}
+
diff --git a/src/ossim/base/ossimGeocent.c b/ossim/src/ossim/base/ossimGeocent.c
similarity index 100%
rename from src/ossim/base/ossimGeocent.c
rename to ossim/src/ossim/base/ossimGeocent.c
diff --git a/src/ossim/base/ossimGeodeticEvaluator.cpp b/ossim/src/ossim/base/ossimGeodeticEvaluator.cpp
similarity index 100%
rename from src/ossim/base/ossimGeodeticEvaluator.cpp
rename to ossim/src/ossim/base/ossimGeodeticEvaluator.cpp
diff --git a/src/ossim/base/ossimGeoid.cpp b/ossim/src/ossim/base/ossimGeoid.cpp
similarity index 100%
rename from src/ossim/base/ossimGeoid.cpp
rename to ossim/src/ossim/base/ossimGeoid.cpp
diff --git a/ossim/src/ossim/base/ossimGeoidEgm96.cpp b/ossim/src/ossim/base/ossimGeoidEgm96.cpp
new file mode 100644
index 0000000..186c39c
--- /dev/null
+++ b/ossim/src/ossim/base/ossimGeoidEgm96.cpp
@@ -0,0 +1,315 @@
+//*******************************************************************
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Burken
+//
+//*******************************************************************
+//  $Id: ossimGeoidEgm96.cpp 22900 2014-09-30 09:56:11Z dburken $
+
+#include <ossim/base/ossimGeoidEgm96.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h> /* for ossim::nan() */
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimDatumFactory.h>
+#include <fstream>
+
+static ossimTrace traceDebug ("ossimGeoidEgm96:debug");
+
+
+#define NumbGeoidCols 1441   /* 360 degrees of longitude at 15 minute spacing */
+#define NumbGeoidRows  721   /* 180 degrees of latitude  at 15 minute spacing */
+#define NumbHeaderItems 6    /* min, max lat, min, max long, lat, long spacing*/
+#define ScaleFactor     4    /* 4 grid cells per degree at 15 minute spacing  */
+#define NumbGeoidElevs NumbGeoidCols * NumbGeoidRows
+// #define PI              3.14159265358979323e0
+
+
+RTTI_DEF1(ossimGeoidEgm96, "ossimGeoidEgm96", ossimGeoid)
+
+ossimGeoidEgm96::ossimGeoidEgm96()
+   :theGeoidHeightBufferPtr(0)
+{
+}
+
+ossimGeoidEgm96::ossimGeoidEgm96(const ossimFilename& grid_file,
+                                 ossimByteOrder byteOrder)
+   :theGeoidHeightBufferPtr(0)
+{
+   open(grid_file, byteOrder);
+   if (getErrorStatus() != ossimErrorCodes::OSSIM_OK)
+   {
+      theGeoidHeightBuffer.clear();
+   }
+}
+
+ossimGeoidEgm96::~ossimGeoidEgm96()
+{
+}
+
+ossimString ossimGeoidEgm96::getShortName()const
+{
+   return "geoid1996";
+}
+
+bool ossimGeoidEgm96::open(const ossimFilename& grid_file,
+                           ossimByteOrder byteOrder)
+{
+   static const char MODULE[] = "ossimGeoidEgm96::open";
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " Entered...\n";
+   }
+
+   if(theGeoidHeightBuffer.size() != NumbGeoidElevs)
+   {
+      theGeoidHeightBuffer.resize(NumbGeoidElevs);
+      theGeoidHeightBufferPtr = &theGeoidHeightBuffer.front();
+   }
+   
+   // int   ItemsRead = 0;
+   long  ElevationsRead = 0;
+   // long  ItemsDiscarded = 0;
+   long  num = 0;
+
+   ossimFilename grid = grid_file;
+   if (grid_file.isDir())
+   {
+      grid = grid_file.dirCat("egm96.grd");
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " Grid file:" << grid << "\n";
+   }
+   
+   // Open the File READONLY, or Return Error Condition:
+   std::ifstream gridHeightFile(grid.c_str(), std::ios::in|std::ios::binary);
+//   FILE* GeoidHeightFile;
+
+   if ( gridHeightFile.fail())
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << MODULE << " could not open file "
+                                            << grid.c_str() << "\n";
+      }
+      setErrorStatus();
+      return false;
+   }
+  
+   // Skip the Header Line:
+   ossimEndian oe;
+   bool swap_bytes = (ossim::byteOrder() != byteOrder) ? true : false;
+   while ( (num < NumbHeaderItems)&&(!gridHeightFile.fail()))
+   {      
+      float f;
+      gridHeightFile.read( (char*)(&f), 4);
+      if (swap_bytes) oe.swap(f);
+      theGeoidHeightBuffer[num] = f;
+      ++num;
+   }
+   // Determine if header read properly, or NOT:
+   if ((!ossim::almostEqual(theGeoidHeightBuffer[0], (float)-90.0)) ||
+       (!ossim::almostEqual(theGeoidHeightBuffer[1], (float)90.0)) ||
+       (!ossim::almostEqual(theGeoidHeightBuffer[2], (float)0.0)) ||
+       (!ossim::almostEqual(theGeoidHeightBuffer[3],(float)360.0))||
+       (!ossim::almostEqual(theGeoidHeightBuffer[4],(float)(1.0 / ScaleFactor ))) ||
+       (!ossim::almostEqual(theGeoidHeightBuffer[5],(float)( 1.0 / ScaleFactor ))) ||
+       gridHeightFile.fail())
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << MODULE << " bad header file "
+                                            << grid.c_str() << "\n";
+      }
+      setErrorStatus();
+      return false;
+  }
+
+   // Extract elements from the file:
+   num = 0;
+   while ( (num < NumbGeoidElevs)&&(!gridHeightFile.fail()) )
+   {
+//       if (feof( GeoidHeightFile )) break;
+//       if (ferror( GeoidHeightFile )) break;
+      
+      float f;
+      gridHeightFile.read( (char*)(&f), 4);
+      if (swap_bytes) oe.swap(f);
+      theGeoidHeightBuffer[num] = f;
+      ++ElevationsRead;
+      ++num;
+   }
+
+//    fclose(GeoidHeightFile);
+   
+   // Determine if all elevations of file read properly, or NOT:
+   if (ElevationsRead != NumbGeoidElevs)
+   {
+      setErrorStatus();
+      ossimSetError("ossimGeoidEgm96::open",
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "Bad grid file...%s", grid.c_str());
+     return false;
+  }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "Opened geoid grid:  " << grid.c_str() << std::endl;
+   }
+   
+   return true;
+}
+
+double ossimGeoidEgm96::offsetFromEllipsoid(const ossimGpt& gpt)
+{
+   double offset = ossim::nan();
+   ossimGpt savedGpt = gpt;
+   if(ossimDatumFactory::instance()->wgs84())
+   {
+      savedGpt.changeDatum(ossimDatumFactory::instance()->wgs84());
+   }
+   
+   if (!theGeoidHeightBufferPtr)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << "ossimGeoidEgm96::offsetFromEllipsoid, "
+            << "Object not initialized!\n";
+      }
+
+      return offset;
+   }
+   
+   long    Index;
+   double DeltaX, DeltaY;
+   double ElevationSE, ElevationSW, ElevationNE, ElevationNW;
+   double LatitudeDD, LongitudeDD;
+   double OffsetX, OffsetY;
+   double PostX, PostY;
+   double UpperY, LowerY;
+
+   LatitudeDD  = savedGpt.latd();
+   
+   // Check for wrap.
+   if (LatitudeDD < -90.0)
+   {
+      LatitudeDD = -180.0 - LatitudeDD;
+   }
+   else if (LatitudeDD > 90.0)
+   {
+      LatitudeDD = 180.0 - LatitudeDD;
+   }
+
+   if ( (LatitudeDD < -90.0) || LatitudeDD > 90.0)
+   {
+      if(traceDebug())
+      {
+         // Latitude out of range
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << "FATAL: " << "ossimGeoidEgm96::offsetFromEllipsoid, "
+            << "Point out of range:  " << savedGpt << "\n";
+      }
+      return offset;
+   }
+   
+   LongitudeDD = savedGpt.lond();
+
+   // Check for wrap.
+   if (LongitudeDD < -180)
+   {
+      LongitudeDD = LongitudeDD + 360.0;
+   }
+   else if (LongitudeDD > 180.0)
+   {
+      LongitudeDD = LongitudeDD - 360.0;
+   }
+
+   if ( (LongitudeDD < -180.0) || (LongitudeDD > 180.0) )
+   {
+      // Longitude out of range
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << "FATAL: " << "ossimGeoidEgm96::offsetFromEllipsoid, "
+            << "Point out of range:  " << savedGpt << "\n";
+      }
+      return offset;
+   }
+   
+   // Compute X and Y Offsets into Geoid Height Array:
+   
+   if (LongitudeDD < 0.0)
+   {
+      OffsetX = ( LongitudeDD + 360.0 ) * ScaleFactor;
+   }
+   else
+   {
+      OffsetX = LongitudeDD * ScaleFactor;
+   }
+   OffsetY = ( 90.0 - LatitudeDD ) * ScaleFactor;
+   
+   //---
+   // Find Four Nearest Geoid Height Cells for specified Latitude,
+   // Longitude;  Assumes that (0,0) of Geoid Height Array is at
+   // Northwest corner:
+   //---
+   PostX = floor( OffsetX );
+   if ((PostX + 1) == NumbGeoidCols)
+      PostX--;
+   PostY = floor( OffsetY );
+   if ((PostY + 1) == NumbGeoidRows)
+      PostY--;
+   
+   Index = (long)(PostY * NumbGeoidCols + PostX);
+   ElevationNW = theGeoidHeightBufferPtr[ Index ];
+   ElevationNE = theGeoidHeightBufferPtr[ Index+ 1 ];
+   
+   Index = (long)((PostY + 1) * NumbGeoidCols + PostX);
+   ElevationSW = theGeoidHeightBufferPtr[ Index ];
+   ElevationSE = theGeoidHeightBufferPtr[ Index + 1 ];
+   
+   //Perform Bi-Linear Interpolation to compute Height above Ellipsoid:
+   DeltaX = OffsetX - PostX;
+   DeltaY = OffsetY - PostY;
+   
+   UpperY = ElevationNW + DeltaX * ( ElevationNE - ElevationNW );
+   LowerY = ElevationSW + DeltaX * ( ElevationSE - ElevationSW );
+   
+   offset = UpperY + DeltaY * ( LowerY - UpperY );
+   
+   return offset;
+}
+
+double ossimGeoidEgm96::geoidToEllipsoidHeight(double lat,
+                                               double lon,
+                                               double geoidHeight)
+{
+   ossimGpt gpt(lat, lon);
+   double height = offsetFromEllipsoid(gpt);
+   if (!ossim::isnan(height))
+   {
+      height += geoidHeight;
+   }
+   return height;
+}
+
+double ossimGeoidEgm96::ellipsoidToGeoidHeight(double lat,
+                                               double lon,
+                                               double ellipsoidHeight)
+{
+   ossimGpt gpt(lat, lon);
+   double height = offsetFromEllipsoid(gpt);
+   if (!ossim::isnan(height))
+   {
+      return (ellipsoidHeight - height);
+   }
+   return height; // nan
+}
diff --git a/ossim/src/ossim/base/ossimGeoidImage.cpp b/ossim/src/ossim/base/ossimGeoidImage.cpp
new file mode 100644
index 0000000..88667f3
--- /dev/null
+++ b/ossim/src/ossim/base/ossimGeoidImage.cpp
@@ -0,0 +1,364 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Generic geoid source which uses an image handler for reading the grid.
+// 
+//----------------------------------------------------------------------------
+
+#include <ossim/base/ossimGeoidImage.h>
+
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/projection/ossimProjection.h>
+#include <cmath>
+
+ossimGeoidImage::ossimGeoidImage()
+   : m_geom(0),
+     m_handler(0),
+     m_cacheTile(0),
+     m_geoidTypeName(),
+     m_memoryMapFlag(false),
+     m_enabledFlag(true),
+     m_imageRect()
+{
+}
+
+ossimGeoidImage::~ossimGeoidImage()
+{
+   m_geom = 0;
+   m_handler = 0;
+   m_cacheTile = 0;
+}
+
+bool ossimGeoidImage::open( const ossimFilename& file, ossimByteOrder /* byteOrder */ )
+{
+   static const char MODULE[] = "ossimGeoidImage::open";
+   
+   m_geom = 0;
+   m_cacheTile = 0;
+   if ( m_handler.valid() )
+   {
+      m_handler->close();
+   }
+
+   m_handler =
+      ossimImageHandlerRegistry::instance()->open(file,
+                                                  true, // try suffix 1st
+                                                  false); // open overview
+   if ( m_handler.valid() )
+   {
+      // Store the bounding rectangle:
+      m_imageRect = m_handler->getImageRectangle( 0 );
+
+      // Scalar type:
+      m_scalarType = m_handler->getOutputScalarType();
+      
+      // Get the geometry info.  Need this to compute grid indexes.
+      m_geom = m_handler->getImageGeometry();
+
+      if ( m_geom.valid() )
+      {
+         // Verify the geometry object has a good projection.
+         if ( m_geom->getProjection() )
+         {
+            if ( m_memoryMapFlag )
+            {
+               try
+               {
+                  m_cacheTile = m_handler->getTile( m_imageRect, 0 );
+                  
+                  if ( m_cacheTile.valid() )
+                  {
+                     // Close the image handler:
+                     m_handler->close();
+                     m_handler = 0;
+                  }
+               }
+               catch ( const ossimException& e )
+               {
+                  m_memoryMapFlag = false;
+                  m_cacheTile = 0;
+                  
+                  ossimNotify(ossimNotifyLevel_WARN)
+                     << MODULE << " ERROR: Caught Exception!"
+                     << "\n" << e.what()
+                     << "\nMemory mapping entire grid into memory has been disabled..."
+                     << std::endl;
+               }
+            }
+         }
+         else
+         {
+            m_handler = 0;
+            m_geom    = 0;
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << " ERROR:"
+               << "\nGeometry object has null projection!"
+               << std::endl;
+         }
+      }
+         
+      else
+      {
+         m_handler = 0;
+         ossimNotify(ossimNotifyLevel_WARN)
+            << MODULE << " ERROR:"
+            << "\nCould not get geometry info!"
+            << std::endl;
+      }
+   }
+   
+   return ( m_geom.valid() && (m_handler.valid() || (m_memoryMapFlag && m_cacheTile.valid()) ));
+}
+
+ossimString ossimGeoidImage::getShortName() const
+{
+   return m_geoidTypeName;
+}
+
+void ossimGeoidImage::setShortName( const std::string& geoidTypeName )
+{
+   m_geoidTypeName = geoidTypeName;
+}
+
+bool ossimGeoidImage::getMemoryMapFlag() const
+{
+   return m_memoryMapFlag;
+}
+
+void ossimGeoidImage::setMemoryMapFlag( bool flag )
+{
+   m_memoryMapFlag = flag; 
+}
+   
+bool ossimGeoidImage::saveState( ossimKeywordlist& kwl,
+                                 const char* prefix ) const
+{
+   std::string myPrefix = ( prefix ? prefix : "" );
+
+   // Save the connection string:
+   std::string key = "connection_string";
+   kwl.addPair( myPrefix, key, m_connectionString, true );
+
+   // Save the geoid type name:
+   key = "geoid.type";
+   kwl.addPair( myPrefix, key, m_geoidTypeName.string(), true );
+
+   // Save the memory map flag:
+   key = "memory_map";
+   std::string value = (m_memoryMapFlag ? "true" : "false");
+   kwl.addPair( myPrefix, key, value, true );
+
+   // Save the enabledFlag:
+   key = ossimKeywordNames::ENABLED_KW;
+   value = m_enabledFlag ? "true" : "false";
+   kwl.addPair( myPrefix, key, value, true );
+
+   // Save the type:
+   key = ossimKeywordNames::TYPE_KW;
+   value = "geoid_image";
+   kwl.addPair( myPrefix, key, value, true );
+   
+   return true;
+}
+
+bool ossimGeoidImage::loadState( const ossimKeywordlist& kwl,
+                                 const char* prefix )
+{
+   bool result = false;
+   
+   std::string myPrefix = prefix ? prefix : "";
+   
+   // Check the type name:
+   std::string key = ossimKeywordNames::TYPE_KW;
+   std::string value = kwl.findKey( myPrefix, key );
+
+   if ( (value == "geoid_image" ) || ( value == "ossimGeoidImage" ) )
+   {
+      // Get the geoid type name:
+      key = "geoid.type";
+      m_geoidTypeName = kwl.findKey( myPrefix, key );
+
+      // Get the memory map flag:
+      key = "memory_map";
+      value = kwl.findKey( myPrefix, key );
+      m_memoryMapFlag = ossimString( value ).toBool();
+
+      // Get the enabled flag:
+      key = ossimKeywordNames::ENABLED_KW;
+      value = kwl.findKey( myPrefix, key );
+      m_enabledFlag = ossimString( value ).toBool();
+      
+      // Get the connection string:
+      std::string key = "connection_string";
+      m_connectionString = kwl.findKey( myPrefix, key );
+      if ( m_connectionString.size() )
+      {
+         result = open( ossimFilename( m_connectionString ) );
+      }
+   }
+   
+   return result;
+}
+
+
+double ossimGeoidImage::offsetFromEllipsoid( const ossimGpt& gpt )
+{
+   double offset = ossim::nan();
+
+   if ( m_enabledFlag )
+   {
+      if ( m_geom.valid() &&
+           ( m_handler.valid() ||
+             ( m_memoryMapFlag && m_cacheTile.valid() )
+             )
+           )
+      {
+         switch(m_scalarType)
+         {
+            case OSSIM_SINT16:
+            {
+               offset = offsetFromEllipsoidTemplate((ossim_sint16)0, gpt);
+               break;
+            }
+            case OSSIM_FLOAT32:
+            {
+               offset = offsetFromEllipsoidTemplate((ossim_float32)0, gpt);
+               break;
+            }
+            case OSSIM_FLOAT64:
+            {
+               offset = offsetFromEllipsoidTemplate((ossim_float64)0, gpt);
+               break;
+            }
+            default:
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << "ossimGeoidImage::offsetFromEllipsoid ERROR:\n"
+                  << "Unhandled scalar type: "
+                  << ossimScalarTypeLut::instance()->getEntryString( m_scalarType )
+                  << std::endl;
+               break;
+            }
+         }
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimGeoidImage::offsetFromEllipsoid ERROR: Object not initialized!\n"
+            << std::endl;
+      }
+      
+   } // Matches: if ( m_enabledFlag )
+   
+   return offset;
+}
+
+template <class T>
+double ossimGeoidImage::offsetFromEllipsoidTemplate(T /* dummy */,
+                                                    const ossimGpt& gpt)
+{
+   double geoidOffset = ossim::nan();
+
+   // Change the datum if needed:
+   ossimGpt copyGpt = gpt;
+   if(ossimDatumFactory::instance()->wgs84())
+   {
+      copyGpt.changeDatum(ossimDatumFactory::instance()->wgs84());
+   }
+   
+   // Fix wrap conditions:
+   copyGpt.wrap();
+   
+   // Get the local image point for the input ground point.
+   ossimDpt imgDpt;
+   m_geom->worldToLocal( copyGpt, imgDpt );
+
+   if ( m_imageRect.pointWithin( ossimIpt( imgDpt ) ) )
+   {
+      ossim_int32 x0 = static_cast<ossim_int32>( imgDpt.x );
+      ossim_int32 y0 = static_cast<ossim_int32>( imgDpt.y );
+      
+      ossim_int32 IW = static_cast<ossim_int32>(m_imageRect.width());
+      ossim_int32 IH = static_cast<ossim_int32>(m_imageRect.height());
+      
+      if ( x0 == (IW-1) )
+      {
+         --x0;  // Move over one point.
+      }
+      if ( y0 == (IH-1) )
+      {
+         --y0; // Move over one point.
+      }
+
+      if ( !m_memoryMapFlag )
+      {
+         // Get the four points from the image handler.
+         ossimIrect tileRect(ossimIpt(x0, y0), ossimIpt(x0+1, y0+1));
+         m_cacheTile = m_handler->getTile( tileRect, 0 );
+      }
+      
+      if ( m_cacheTile.valid() )
+      {
+         // Get a pointer to the buffer.
+         const T* buf = static_cast<const T*>(m_cacheTile->getBuf());
+         
+         if ( buf )
+         {
+            const ossim_float64 NP = m_cacheTile->getNullPix(0);
+            const ossim_int64 TW = static_cast<ossim_int64>(m_cacheTile->getWidth());
+            ossim_int64 offset = (y0 - m_cacheTile->getOrigin().y) * TW +
+               (x0 - m_cacheTile->getOrigin().x);
+            ossim_int64 offset2 = offset + TW;
+            
+            double p00 = buf[offset];
+            double p01 = buf[offset+1];
+            double p10 = buf[offset2];
+            double p11 = buf[offset2+1];
+            
+            double xt0 = imgDpt.x - x0;
+            double yt0 = imgDpt.y - y0;
+            double xt1 = 1-xt0;
+            double yt1 = 1-yt0;
+            
+            double w00 = xt1*yt1;
+            double w01 = xt0*yt1;
+            double w10 = xt1*yt0;
+            double w11 = xt0*yt0;
+            
+            //---
+            // Test for null posts and set the corresponding weights to 0:
+            //---
+            if (p00 == NP) w00 = 0.0;
+            if (p01 == NP) w01 = 0.0;
+            if (p10 == NP) w10 = 0.0;
+            if (p11 == NP) w11 = 0.0;                  
+            
+            double sum_weights = w00 + w01 + w10 + w11;
+            if (sum_weights)
+            {
+               geoidOffset = (p00*w00 + p01*w01 + p10*w10 + p11*w11) / sum_weights;
+            }
+         }
+         
+      } // Matches: if ( m_cacheTile.valid() )
+      
+   } // Matches: if ( m_imageRect.pointWithin( imgPt ) )
+
+   return geoidOffset;
+}
+
+
diff --git a/ossim/src/ossim/base/ossimGeoidManager.cpp b/ossim/src/ossim/base/ossimGeoidManager.cpp
new file mode 100644
index 0000000..8e97ebb
--- /dev/null
+++ b/ossim/src/ossim/base/ossimGeoidManager.cpp
@@ -0,0 +1,349 @@
+//*****************************************************************************
+// FILE: ossimGeoidManager.cpp
+//
+// License:  See top level LICENSE.txt file.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Contains implementation of class ossimGeoidManager
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimGeoidManager.cpp 22906 2014-09-30 17:28:52Z dburken $
+
+
+#include <ossim/base/ossimGeoidManager.h>
+
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimEnvironmentUtility.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimGeoidNgs.h>
+#include <ossim/base/ossimGeoidEgm96.h>
+#include <ossim/base/ossimGeoidImage.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeyword.h>
+#include <ossim/base/ossimNotifyContext.h>
+//***
+// Define Trace flags for use within this file:
+//***
+#include <ossim/base/ossimTrace.h>
+static ossimTrace traceExec  ("ossimGeoidManager:exec");
+static ossimTrace traceDebug ("ossimGeoidManager:debug");
+
+RTTI_DEF1(ossimGeoidManager, "ossimGeoidManager", ossimGeoid);
+
+//ossimGeoidManager* ossimGeoidManager::theInstance = 0;
+
+//*****************************************************************************
+//  CONSTRUCTOR: ossimGeoidManager
+//  
+//*****************************************************************************
+ossimGeoidManager::ossimGeoidManager()
+{
+  // theInstance = this;
+   theIdentityGeoid = new ossimIdentityGeoid();
+}
+
+//*****************************************************************************
+//  DESTRUCTOR: ~ossimGeoidManager
+//  
+//*****************************************************************************
+ossimGeoidManager::~ossimGeoidManager()
+{
+//    vector<ossimGeoid*>::iterator g = theGeoidList.begin();
+//    while (g != theGeoidList.end())
+//    {
+//       delete *g;
+//       ++g;
+//    }
+   theGeoidList.clear();
+}
+
+//*****************************************************************************
+//  METHOD: ossimGeoidManager::instance()
+//  
+//*****************************************************************************
+ossimGeoidManager* ossimGeoidManager::instance()
+{
+   static ossimGeoidManager inst;
+//   if (!theInstance)
+//   {
+//      theInstance = new ossimGeoidManager();
+//   }
+   
+   //return theInstance;
+   return &inst;
+}
+
+//*****************************************************************************
+//  METHOD: ossimElevManager::addGeoidSource
+//  
+//*****************************************************************************
+void ossimGeoidManager::addGeoid(ossimRefPtr<ossimGeoid> geoid, bool toFrontFlag)
+{
+   if(!toFrontFlag)
+   {
+      theGeoidList.push_back(geoid);
+   }
+   else
+   {
+      theGeoidList.insert(theGeoidList.begin(), geoid);
+   }
+}
+
+bool ossimGeoidManager::saveState(ossimKeywordlist& /* kwl */,
+                                  const char* /* prefix */ ) const
+{
+   return true;
+}
+
+//*****************************************************************************
+//  METHOD: ossimGeoidManager::loadState()
+//  
+//*****************************************************************************
+bool ossimGeoidManager::loadState(const ossimKeywordlist& kwl,
+                                  const char* prefix)
+{
+   static const char MODULE[] = "ossimGeoidManager::loadState()";
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
+      << "DEBUG: " << MODULE << ", entering...\n";
+
+   //---
+   // Look for geoid sources:
+   // Note: the ossimInit::initializeElevation() does not pass a prefix to us
+   // as it should...
+   //---
+   std::string geoidMgrPrefix = prefix ? prefix : "geoid.manager.";
+
+   ossimString regExpression =  ossimString("^(") + geoidMgrPrefix.c_str() +
+      "geoid_source[0-9]+.)";
+
+   vector<ossimString> keys = kwl.getSubstringKeyList( regExpression );
+   if ( keys.size() )
+   {
+      for ( ossim_uint32 idx = 0; idx < keys.size(); ++idx )
+      {
+         std::string newPrefix = keys[idx];
+
+         // See if enable flag is set to false.
+         bool enabled = true;
+         std::string key = ossimKeywordNames::ENABLED_KW;
+         std::string value = kwl.findKey( newPrefix, key );
+         if ( value.size() )
+         {
+            enabled = ossimString( value ).toBool();
+         }
+
+         if ( enabled )
+         {
+            // Get the type:
+            key = ossimKeywordNames::TYPE_KW;
+            value = kwl.findKey( newPrefix, key );
+
+            if ( (value == "geoid_image" ) || ( value == "ossimGeoidImage" ) )
+            {
+               ossimRefPtr<ossimGeoid> geoid = new ossimGeoidImage();
+               if ( geoid->loadState( kwl, newPrefix.c_str() ) )
+               {
+                  if (traceDebug())
+                  {
+                     ossimNotify(ossimNotifyLevel_DEBUG)
+                        << "DEBUG: " << MODULE
+                        << "\nAdded geoid:  " << geoid->getShortName() << "\n";
+                  }
+                  addGeoid(geoid.get());
+               }
+            }
+         }
+      }
+   }
+
+   // End of "geoid_sources" block.
+   
+   // Look for the ngs geoid directories
+   const char* lookup = kwl.find(prefix, "geoid_99_directory");
+   ossimByteOrder geoidNgsByteOrder = OSSIM_LITTLE_ENDIAN;
+   const char* byteOrder = kwl.find(prefix, "geoid_99_directory.byte_order");
+   if (!lookup)
+   {
+      lookup = kwl.find(prefix, "geoid_ngs_directory");
+      byteOrder = kwl.find(prefix, "geoid_ngs_directory.byte_order");
+   }
+   if(byteOrder)
+   {
+      if(ossimString(byteOrder).contains("little"))
+      {
+         geoidNgsByteOrder = OSSIM_LITTLE_ENDIAN;
+      }
+      else
+      {
+         geoidNgsByteOrder = OSSIM_BIG_ENDIAN;
+      }
+   }
+   if(lookup)
+   {
+      ossimFilename f = lookup;
+      if (f.isDir())
+      {
+         ossimRefPtr<ossimGeoid> geoid = new ossimGeoidNgs(f, geoidNgsByteOrder);
+
+         if (geoid->getErrorStatus() == ossimErrorCodes::OSSIM_OK)
+         {
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << "DEBUG: " << MODULE
+                  << "\nAdded geoid dir:  " << f.c_str() << "\n";
+            }
+            addGeoid(geoid.get());
+         }
+         else
+         {
+            geoid = 0;
+         }
+      }
+   }
+
+   ossimFilename geoidGrid1996 = ossimEnvironmentUtility::instance()->getUserOssimSupportDir();
+   geoidGrid1996 = geoidGrid1996.dirCat("geoids");
+   geoidGrid1996 = geoidGrid1996.dirCat("geoid1996");
+   geoidGrid1996 = geoidGrid1996.dirCat("egm96.grd");
+
+   if(!geoidGrid1996.exists())
+   {
+      geoidGrid1996 = ossimEnvironmentUtility::instance()->getInstalledOssimSupportDir();
+      geoidGrid1996 = geoidGrid1996.dirCat("geoids");
+      geoidGrid1996 = geoidGrid1996.dirCat("geoid1996");
+      geoidGrid1996 = geoidGrid1996.dirCat("egm96.grd");
+   }
+
+   if( geoidGrid1996.exists() )
+   {
+      ossimRefPtr<ossimGeoid> geoid = new ossimGeoidEgm96(geoidGrid1996);
+      if (geoid->getErrorStatus() == ossimErrorCodes::OSSIM_OK)
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "DEBUG: " << MODULE
+               << "\nAdded geoid egm 96:  " << geoidGrid1996.c_str()
+               << "\n";
+         }
+         addGeoid(geoid.get());
+      }
+      else
+      {
+         geoid = 0;
+      }
+   }
+   else
+   {
+      // Look for the geoid Earth Gravity Model (EGM) 96 directory.
+      lookup = kwl.find(prefix, "geoid_egm_96_grid");
+      if (lookup)
+      {
+         ossimFilename f = lookup;
+         if (f.isDir() || f.isFile())
+         {
+            ossimRefPtr<ossimGeoid> geoid = new ossimGeoidEgm96(f);
+            
+            if (geoid->getErrorStatus() == ossimErrorCodes::OSSIM_OK)
+            {
+               if (traceDebug())
+               {
+                  ossimNotify(ossimNotifyLevel_DEBUG)
+                     << "DEBUG: " << MODULE
+                     << "\nAdded geoid egm 96:  " << f.c_str()
+                     << "\n";
+               }
+               
+               addGeoid(geoid.get());
+            }
+            else
+            {
+               geoid = 0;
+            }
+         }
+      }
+   }
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+      << "DEBUG: " << MODULE << ", returning...\n";
+   }
+   
+   return true;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimGeoidManager::open()
+//  
+//*****************************************************************************
+bool ossimGeoidManager::open(const ossimFilename& dir, ossimByteOrder byteOrder)
+{
+   std::vector<ossimRefPtr<ossimGeoid> >::iterator g = theGeoidList.begin();
+   bool status = true;
+   while (g != theGeoidList.end())
+   {
+      status &= (*g)->open(dir, byteOrder);
+      ++g;
+   }
+
+   return status;
+}
+
+//*****************************************************************************
+//  METHOD: ossimGeoidManager::open()
+//  
+//*****************************************************************************
+double ossimGeoidManager::offsetFromEllipsoid(const ossimGpt& gpt)
+{
+   double offset = ossim::nan();
+   std::vector<ossimRefPtr<ossimGeoid> >::iterator geoid =
+      theGeoidList.begin();
+   
+   while ( ossim::isnan(offset) && (geoid != theGeoidList.end()))
+   {
+      offset = ((*geoid))->offsetFromEllipsoid(gpt);
+      ++geoid;
+   }
+   
+   return offset;
+}
+
+ossimGeoid* ossimGeoidManager::findGeoidByShortName(const ossimString& shortName, bool caseSensitive)
+{
+   ossim_uint32 idx=0;
+   ossimString testString = shortName;
+   if(shortName == "identity")
+   {
+      return theIdentityGeoid.get();
+   }
+   if(!caseSensitive)
+   {
+      testString  = testString.downcase();
+   }
+   for(idx = 0; idx < theGeoidList.size(); ++idx)
+   {
+      if(!caseSensitive)
+      {
+         if(theGeoidList[idx]->getShortName().downcase() == testString)
+         {
+            return theGeoidList[idx].get();
+         }
+      }
+      else
+      {
+         if(theGeoidList[idx]->getShortName() == testString)
+         {
+            return theGeoidList[idx].get();
+         }
+      }
+   }
+   return 0;
+}
diff --git a/ossim/src/ossim/base/ossimGeoidNgs.cpp b/ossim/src/ossim/base/ossimGeoidNgs.cpp
new file mode 100644
index 0000000..8f01415
--- /dev/null
+++ b/ossim/src/ossim/base/ossimGeoidNgs.cpp
@@ -0,0 +1,274 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimGeoidNgs.cpp 22900 2014-09-30 09:56:11Z dburken $
+#include <ossim/base/ossimGeoidNgs.h>
+
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimDatumFactory.h>
+
+
+#include <stdlib.h>  /* standard C general utility library */
+#include <iostream>
+#include <fstream>
+using namespace std;
+
+RTTI_DEF1(ossimGeoidNgs, "ossimGeoidNgs", ossimGeoid)
+
+static ossimTrace traceDebug ("ossimGeoidNgs:debug");
+
+ossimGeoidNgs::ossimGeoidNgs()
+   :theShortName("")
+{
+}
+
+ossimGeoidNgs::ossimGeoidNgs(const ossimFilename& dir,
+                             ossimByteOrder /* byteOrder */)
+{
+   open(dir);
+}
+
+
+bool ossimGeoidNgs::open(const ossimFilename& dir,
+                         ossimByteOrder byteOrder)
+{
+   if (!dir.isDir())
+   {
+      return false;
+   }
+
+   if(dir.isDir())
+   {
+      ossimGeoidNgsHeader h;
+
+      if(dir.dirCat("g2003u01.bin").exists())
+      {
+         theShortName = "geoid2003";
+         addFile(dir.dirCat("g2003u01.bin"), byteOrder);
+      }
+      if(dir.dirCat("g2003u02.bin").exists())
+      {
+         theShortName = "geoid2003";
+         addFile(dir.dirCat("g2003u02.bin"), byteOrder);
+      }
+      if(dir.dirCat("g2003u03.bin").exists())
+      {
+         theShortName = "geoid2003";
+         addFile(dir.dirCat("g2003u03.bin"), byteOrder);
+      }
+      if(dir.dirCat("g2003u04.bin").exists())
+      {
+         theShortName = "geoid2003";
+         addFile(dir.dirCat("g2003u04.bin"), byteOrder);
+      }
+      if(dir.dirCat("g2003u05.bin").exists())
+      {
+         theShortName = "geoid2003";
+         addFile(dir.dirCat("g2003u05.bin"), byteOrder);
+      }
+      if(dir.dirCat("g2003u06.bin").exists())
+      {
+         theShortName = "geoid2003";
+         addFile(dir.dirCat("g2003u06.bin"), byteOrder);
+      }
+
+      if(dir.dirCat("g1999u01.bin").exists())
+      {
+         theShortName = "geoid1999";
+         addFile(dir.dirCat("g1999u01.bin"), byteOrder);
+      }
+      if(dir.dirCat("g1999u02.bin").exists())
+      {
+         theShortName = "geoid1999";
+         addFile(dir.dirCat("g1999u02.bin"), byteOrder);
+      }
+      if(dir.dirCat("g1999u03.bin").exists())
+      {
+         theShortName = "geoid1999";
+         addFile(dir.dirCat("g1999u03.bin"), byteOrder);
+      }
+      if(dir.dirCat("g1999u04.bin").exists())
+      {
+         theShortName = "geoid1999";
+         addFile(dir.dirCat("g1999u04.bin"), byteOrder);
+      }
+      if(dir.dirCat("g1999u05.bin").exists())
+      {
+         theShortName = "geoid1999";
+         addFile(dir.dirCat("g1999u05.bin"), byteOrder);
+      }
+      if(dir.dirCat("g1999u06.bin").exists())
+      {
+         theShortName = "geoid1999";
+         addFile(dir.dirCat("g1999u06.bin"), byteOrder);
+      }
+      if(dir.dirCat("g1999u07.bin").exists())
+      {
+         theShortName = "geoid1999";
+         addFile(dir.dirCat("g1999u07.bin"), byteOrder);
+      }
+      if(dir.dirCat("g1999u08.bin").exists())
+      {
+         theShortName = "geoid1999";
+         addFile(dir.dirCat("g1999u08.bin"), byteOrder);
+      }
+      if(dir.dirCat("g1999a01.bin").exists())
+      {
+         theShortName = "geoid1999";
+         addFile(dir.dirCat("g1999a01.bin"), byteOrder);
+      }
+      if(dir.dirCat("g1999a02.bin").exists())
+      {
+         theShortName = "geoid1999";
+         addFile(dir.dirCat("g1999a02.bin"), byteOrder);
+      }
+      if(dir.dirCat("g1999a03.bin").exists())
+      {
+         theShortName = "geoid1999";
+         addFile(dir.dirCat("g1999a03.bin"), byteOrder);
+      }
+      if(dir.dirCat("g1999a04.bin").exists())
+      {
+         theShortName = "geoid1999";
+         addFile(dir.dirCat("g1999a04.bin"), byteOrder);
+      }
+      if(dir.dirCat("g1999h01.bin"))
+      {
+         theShortName = "geoid1999";
+         addFile(dir.dirCat("g1999h01.bin"), byteOrder);
+      }
+      if(dir.dirCat("g1999p01.bin").exists())
+      {
+         theShortName = "geoid1999";
+         addFile(dir.dirCat("g1999p01.bin"), byteOrder);
+      }
+   }
+   else
+   {
+      addFile(dir, byteOrder);
+   }
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "Opened geoid grids from:  " << dir.c_str() << endl;
+   }
+   
+   return true;
+}
+
+ossimGeoidNgs::~ossimGeoidNgs()
+{
+}
+
+
+bool ossimGeoidNgs::addFile(const ossimFilename& file, ossimByteOrder byteOrder)
+{
+   bool result = false;
+   if(file.exists())
+   {
+      ossim_uint32 idx = 0;
+      for(idx = 0; idx < theGridVector.size();++idx)
+      {
+         if(file == theGridVector[idx].filename())
+         {
+            result = true;
+            return result;
+         }
+      }
+      ossimGeoidNgsHeader h;
+      result = h.initialize(file, byteOrder);
+      if(result)
+      {
+         theGridVector.push_back(h);
+      }
+   }
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimGeoidNgs::addFile: Adding file = " << file << std::endl;
+   }
+   return result;
+}
+
+double ossimGeoidNgs::offsetFromEllipsoid(const ossimGpt& gpt)
+{
+   ossimGpt savedGpt = gpt;
+   if(ossimDatumFactory::instance()->wgs84())
+   {
+      savedGpt.changeDatum(ossimDatumFactory::instance()->wgs84());
+   }
+   double lat = savedGpt.latd();
+   double lon = savedGpt.lond();
+   fixLatLon(lat, lon);
+   
+   return deltaHeight(lat, lon); 
+}
+
+double ossimGeoidNgs::geoidToEllipsoidHeight(double lat,
+                                             double lon,
+                                             double geoidHeight) const
+{
+
+   fixLatLon(lat, lon);
+   double delta = deltaHeight(lat, lon);
+   if (!ossim::isnan(delta))
+   {
+      return (geoidHeight + delta);
+   }
+   return delta; // nan
+}
+
+double ossimGeoidNgs::ellipsoidToGeoidHeight(double lat,
+                                      double lon,
+                                      double ellipsoidHeight) const
+{
+
+   fixLatLon(lat, lon);
+   double delta = deltaHeight(lat, lon);
+   if (!ossim::isnan(delta))
+   {
+      return (ellipsoidHeight - delta);
+   }
+   return delta; // nan
+}
+
+void ossimGeoidNgs::fixLatLon(double &lat, double &lon) const
+{
+   if(lat < 0)
+   {
+      lat += 180;
+   }
+   if(lon < 0)
+   {
+      lon += 360;
+   }
+}
+
+double ossimGeoidNgs::deltaHeight(double lat, double lon)const
+{
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx < theGridVector.size();++idx)
+   {
+      if( theGridVector[idx].pointWithin(lat, lon) )
+      {
+         return theGridVector[idx].getHeightDelta(lat,
+                                                  lon);
+      }
+   }
+   return ossim::nan();
+}
+
+ossimString ossimGeoidNgs::getShortName()const
+{
+   return theShortName;
+}
diff --git a/src/ossim/base/ossimGeoidNgsHeader.cpp b/ossim/src/ossim/base/ossimGeoidNgsHeader.cpp
similarity index 100%
rename from src/ossim/base/ossimGeoidNgsHeader.cpp
rename to ossim/src/ossim/base/ossimGeoidNgsHeader.cpp
diff --git a/src/ossim/base/ossimGeoref.cpp b/ossim/src/ossim/base/ossimGeoref.cpp
similarity index 100%
rename from src/ossim/base/ossimGeoref.cpp
rename to ossim/src/ossim/base/ossimGeoref.cpp
diff --git a/src/ossim/base/ossimGpt.cpp b/ossim/src/ossim/base/ossimGpt.cpp
similarity index 100%
rename from src/ossim/base/ossimGpt.cpp
rename to ossim/src/ossim/base/ossimGpt.cpp
diff --git a/ossim/src/ossim/base/ossimGrect.cpp b/ossim/src/ossim/base/ossimGrect.cpp
new file mode 100644
index 0000000..951bf71
--- /dev/null
+++ b/ossim/src/ossim/base/ossimGrect.cpp
@@ -0,0 +1,320 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// Description:
+//
+//*************************************************************************
+// $Id: ossimGrect.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/base/ossimGrect.h>
+using namespace std;
+
+ostream& operator<<(ostream& os, const ossimGrect& rect)
+{
+   return os << rect.theUlCorner << ", " << rect.theLrCorner << endl;
+}
+
+ossimGrect::ossimGrect(vector<ossimGpt>& points)
+   :
+   theUlCorner(0.0, 0.0, 0.0),
+   theLrCorner(0.0, 0.0, 0.0)
+{
+   // initialize everyone to the first point
+   if(points.size() > 0)
+   {
+      double minHgt = 0.0;
+      double maxHgt = 0.0;
+      theUlCorner = points[0];
+      theLrCorner = theUlCorner;
+      minHgt = theUlCorner.hgt;
+      maxHgt = minHgt;
+      
+      // find the bounds
+      for(ossim_uint32 index = 1; index < points.size(); index++)
+      {
+         // find left most
+         if(theUlCorner.lond() > points[index].lond())
+         {
+            theUlCorner.lond(points[index].lond());
+         } // find right most
+         else if(theLrCorner.lond() < points[index].lond())
+         {
+            theLrCorner.lond(points[index].lond());
+         }
+         //find top most
+         if(points[index].latd() > theUlCorner.latd())
+         {
+            theUlCorner.latd(points[index].latd());
+         }// find bottom most
+         else if(points[index].latd() < theLrCorner.latd())
+         {
+            theLrCorner.latd(points[index].latd());
+         }
+         
+         if (points[index].hgt > maxHgt)
+         {
+            maxHgt = points[index].hgt;
+         }
+         else if (points[index].hgt < minHgt)
+         {
+            minHgt = points[index].hgt;
+         }
+      }
+      
+      theUlCorner.hgt = maxHgt;
+      theLrCorner.hgt = minHgt;
+   }
+}
+
+ossimGrect::ossimGrect(const ossimGpt& p1, const ossimGpt& p2)
+{
+   if(p1.lon < p2.lon)
+   {
+      theUlCorner.lon = p1.lon;
+      theLrCorner.lon = p2.lon;
+   }
+   else
+   {
+      theUlCorner.lon = p2.lon;
+      theLrCorner.lon = p1.lon;
+   }
+
+   if(p1.lat > p2.lat)
+   {
+      theUlCorner.lat = p1.lat;
+      theLrCorner.lat = p2.lat;
+   }
+   else
+   {
+      theUlCorner.lat = p2.lat;
+      theLrCorner.lat = p1.lat;
+   }
+
+   if(p1.hgt > p2.hgt)
+   {
+      theUlCorner.hgt = p1.hgt;
+      theLrCorner.hgt = p2.hgt;
+   }
+   else
+   {
+      theUlCorner.hgt = p2.hgt;
+      theLrCorner.hgt = p1.hgt;
+   }
+}
+
+ossimGrect::ossimGrect(const ossimGpt& p1,
+                       const ossimGpt& p2,
+                       const ossimGpt& p3,
+                       const ossimGpt& p4)
+{
+   unsigned long index;
+   double minHgt, maxHgt;
+
+   std::vector<ossimGpt> points(4);
+   points[0] = p1;
+   points[1] = p2;
+   points[2] = p3;
+   points[3] = p4;
+
+   // initialize everyone to the first point
+   theUlCorner = points[0];
+   theLrCorner = theUlCorner;
+   minHgt = theUlCorner.hgt;
+   maxHgt = minHgt;
+   
+   // find the bounds
+   for(index = 1; index < points.size(); index++)
+   {
+      // find left most
+      if(theUlCorner.lond() > points[index].lond())
+      {
+         theUlCorner.lond(points[index].lond());
+      } // find right most
+      else if(theLrCorner.lond() < points[index].lond())
+      {
+         theLrCorner.lond(points[index].lond());
+      }
+      //find top most
+      if(points[index].latd() > theUlCorner.latd())
+      {
+         theUlCorner.latd(points[index].latd());
+      }// find bottom most
+      else if(points[index].latd() < theLrCorner.latd())
+      {
+         theLrCorner.latd(points[index].latd());
+      }
+
+      if (points[index].hgt > maxHgt)
+         maxHgt = points[index].hgt;
+      else if (points[index].hgt < minHgt)
+         minHgt = points[index].hgt;
+   }
+   theUlCorner.hgt = maxHgt;
+   theLrCorner.hgt = minHgt;
+}
+
+ossimGrect ossimGrect::stretchToEvenBoundary(double latSpacingInDegrees,
+                                             double lonSpacingInDegrees)const
+{
+   double ulLat = ((long)ceil(theUlCorner.latd()/latSpacingInDegrees))*
+                  latSpacingInDegrees;
+   double ulLon = ((long)floor(theUlCorner.lond()/lonSpacingInDegrees))*
+                  lonSpacingInDegrees;
+   double lrLat = ((long)floor(theLrCorner.latd()/latSpacingInDegrees))*
+                  latSpacingInDegrees;
+   double lrLon = ((long)ceil(theLrCorner.lond()/lonSpacingInDegrees))*
+                  lonSpacingInDegrees;
+   
+   ossimGpt ul (ulLat, ulLon, theUlCorner.hgt, theUlCorner.datum());
+   ossimGpt lr (lrLat, lrLon, theLrCorner.hgt, theLrCorner.datum());
+
+   return ossimGrect(ul, lr);
+}
+
+void ossimGrect::computeEvenTiles(std::vector<ossimGrect>& result,
+                                  double latSpacingInDegrees,
+                                  double lonSpacingInDegrees,
+                                  bool clipToGeographicBounds)const
+{
+   ossimGrect clipRect = ossimGrect(90, -180, -90, 180);
+   result.clear();
+   ossimGrect temp = stretchToEvenBoundary(latSpacingInDegrees,
+                                           lonSpacingInDegrees);
+
+   ossimGpt point = temp.ul();
+   
+   while(temp.pointWithin(point))
+   {
+      while(temp.pointWithin(point))
+      {
+         ossimGrect rect(point.latd(),
+                         point.lond(),
+                         point.latd()-latSpacingInDegrees,
+                         point.lond()+lonSpacingInDegrees);
+
+         rect.theUlCorner.datum( theUlCorner.datum());
+         rect.theLrCorner.datum( theUlCorner.datum());
+         if(clipToGeographicBounds)
+         {
+            rect = rect.clipToRect(clipRect);
+         }
+         result.push_back(rect);
+
+         point.lond(point.lond()+lonSpacingInDegrees);
+      }
+      point.lond(temp.ul().lond());
+      point.latd(point.latd()-latSpacingInDegrees);
+   }
+}
+
+//*******************************************************************
+// Public Method: ossimGrect::completely_within
+//*******************************************************************
+bool ossimGrect::completely_within(const ossimGrect& rect) const
+{
+   if(rect.isLonLatNan() || isLonLatNan())
+   {
+      return false;
+   }
+   
+   /*  --------------
+       |     1      |
+       | ---------- |
+       | |        | |
+       | |        | |
+       | |   2    | |
+       | |        | |
+       | |        | |
+       | ---------- |
+       |            |
+       --------------  */
+
+   bool rtn = true;
+   
+   if (theUlCorner.lon < rect.ul().lon)
+   {
+      rtn = false;
+   }
+   else if (theLrCorner.lon > rect.lr().lon)
+   {
+      rtn = false;
+   }
+   else if (theUlCorner.lat < rect.ul().lat)
+   {
+      rtn = false;
+   }
+   else if (theLrCorner.lat > rect.lr().lat)
+   {
+      rtn = false;
+   }
+
+   return rtn;
+}
+
+//*******************************************************************
+// Public Method: ossimGrect::intersects
+//*******************************************************************
+bool ossimGrect::intersects(const ossimGrect& rect) const
+{
+		
+   if(rect.isLonLatNan() || isLonLatNan())
+   {
+      return false;
+   }
+   
+   ossim_float64  ulx = ossim::max(rect.ul().lon, ul().lon);
+   ossim_float64  lrx = ossim::min(rect.lr().lon, lr().lon);
+   ossim_float64  uly, lry;
+   bool rtn;
+   
+   uly  = ossim::min(rect.ul().lat, ul().lat);
+   lry  = ossim::max(rect.lr().lat, lr().lat);
+   rtn = ((ulx <= lrx) && (uly >= lry));
+   
+      return (rtn);
+}
+
+ossim_float64 ossimGrect::heightMeters() const
+{
+   ossimDpt scale (midPoint().metersPerDegree());
+   return height()*scale.y;
+}
+
+ossim_float64 ossimGrect::widthMeters()  const
+{
+   ossimDpt scale (midPoint().metersPerDegree());
+   return width()*scale.x;
+}
+
+
+void ossimGrect::expandToInclude(const ossimGpt& gpt)
+{
+   if (isLonLatNan())
+   {
+      theUlCorner = gpt;
+      theLrCorner = gpt;
+   }
+   else if (!pointWithin(gpt, false))
+   {
+      if (gpt.lat > theUlCorner.lat)
+         theUlCorner.lat = gpt.lat;
+      else if (gpt.lat < theLrCorner.lat)
+         theLrCorner.lat = gpt.lat;
+      if (gpt.lon < theUlCorner.lon)
+         theUlCorner.lon = gpt.lon;
+      else if (gpt.lon > theLrCorner.lon)
+         theLrCorner.lon = gpt.lon;
+   }
+}
+
+void ossimGrect::expandToInclude(const ossimGrect& rect)
+{
+   expandToInclude(rect.ul());
+   expandToInclude(rect.lr());
+}
+
diff --git a/src/ossim/base/ossimGzStream.cpp b/ossim/src/ossim/base/ossimGzStream.cpp
similarity index 100%
rename from src/ossim/base/ossimGzStream.cpp
rename to ossim/src/ossim/base/ossimGzStream.cpp
diff --git a/src/ossim/base/ossimHexString.cpp b/ossim/src/ossim/base/ossimHexString.cpp
similarity index 100%
rename from src/ossim/base/ossimHexString.cpp
rename to ossim/src/ossim/base/ossimHexString.cpp
diff --git a/ossim/src/ossim/base/ossimHistogram.cpp b/ossim/src/ossim/base/ossimHistogram.cpp
new file mode 100644
index 0000000..9def392
--- /dev/null
+++ b/ossim/src/ossim/base/ossimHistogram.cpp
@@ -0,0 +1,1612 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author: Ken Melero (kmelero at imagelinks.com)
+//         Orginally developed by:
+//                   Copyright (c) 1997 TargetJr Consortium
+//               GE Corporate Research and Development (GE CRD)
+//                             1 Research Circle
+//                            Niskayuna, NY 12309
+//         Adapted from:  IUE v4.1.2
+// Description: 
+//      A ossimHistogram contains an array of "buckets", which represent finite
+// segments of some value axis, along with a corresponding array of
+// frequency counts for each of these buckets.
+//
+//********************************************************************
+// $Id: ossimHistogram.cpp 23236 2015-04-08 00:47:22Z gpotts $
+
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimHistogram.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimThinPlateSpline.h>
+#include <ossim/base/ossimDpt.h>
+#include <cmath>
+#include <cstdio>
+#include <fstream>
+#include <iostream>
+#include <iomanip>
+#include <sstream>
+using namespace std;
+
+
+
+// nonstandard versions that use operator>, so they behave differently
+// than std:::min/max and ossim::min/max.  kept here for now for that
+// reason.
+#ifndef MAX
+#  define MAX(x,y) ((x)>(y)?(x):(y))
+#  define MIN(x,y) ((x)>(y)?(y):(x))
+#endif
+
+
+static const int MEAN_FLAG = 1, SD_FLAG = 2;
+RTTI_DEF1(ossimHistogram, "ossimHistogram", ossimObject);
+ossimHistogram::ossimHistogram()
+   :
+   stats_consistent(MEAN_FLAG | SD_FLAG),
+   vals(new float [1]),
+   counts(new float [1]),
+   num(0),
+   delta(0.0),
+   vmin(0),
+   vmax(0),
+   mean(0.0),
+   standard_dev(0.0)
+{
+   vals[0] = 0.0;
+   counts[0] = 0.0;
+}
+
+ossimHistogram::ossimHistogram(int xres, float val1, float val2)
+   :
+   stats_consistent(MEAN_FLAG | SD_FLAG),
+   vals(new float [xres]),
+   counts(new float [xres]),
+   num(xres),
+   delta(0.0),
+   vmin(0),
+   vmax(0),
+   mean(0.0),
+   standard_dev(0.0)
+{
+   vmax = MAX(val1, val2);
+   vmin = MIN(val1, val2);
+
+   //---
+   // Set the delta which is used to index the bins.
+   // Note: that using "(vmax - vmin) / xres" was dropping the
+   // last bin on integer data.
+   //---
+   if ( (vmax - vmin + 1) == xres )
+   {
+      delta = 1.0;
+   }
+   else
+   {
+      delta = (vmax - vmin) / xres;
+   }
+
+   mean = (float)((vmax + vmin)/2.0);
+   standard_dev = (float)((vmax - vmin)/(2.0*sqrt(3.0)));
+   int i = 0;
+
+   if (vals == NULL || counts == NULL)
+   {
+      fprintf(stderr, "Histogram : Ran out of memory for arrays.\n");
+      vals = NULL;
+      counts = NULL;
+      num = 0;
+      vmin = 0;
+      vmax = 0;
+      delta = 0.0;
+   }
+   else
+   {
+      //std::cout << std::setprecision(15) << vmin << ", " << vmax <<  ", " <<delta <<", "<< xres << std::endl; 
+      for(i = 0; i < xres; i++)
+      {
+         vals[i] = vmin + delta * (float)(i + 0.5);
+         //std::cout << vals[i] << std::endl;
+         counts[i] = 0.0;
+      }
+   }
+}
+
+ossimHistogram::ossimHistogram(float* uvals, float* ucounts, int xres)
+   :
+   stats_consistent(MEAN_FLAG | SD_FLAG),
+   vals(uvals),
+   counts(ucounts),
+   num(xres),
+   delta(0.0),
+   vmin(0),
+   vmax(0),
+   mean(0.0),
+   standard_dev(0.0)
+{
+   if ( ( xres >= 2 ) && uvals && ucounts )
+   {
+      delta = vals[1] - vals[0]; // Changed this from delta = 1.0
+      //  vmax = GetMaxVal();
+      //  vmin = GetMinVal(); JAF version
+      vmin = uvals[0] - .5f*delta;
+      vmax = uvals[num-1] + .5f*delta;
+      mean = GetMean();
+      standard_dev = GetStandardDev();
+   }   
+}
+//-----------------------------------------------------------
+// -- Copy constructor
+ossimHistogram::ossimHistogram(const ossimHistogram& his)
+{
+
+   int i = 0;
+   num = his.GetRes();
+
+   vals = new float[num];
+   const float* his_vals = his.GetVals();
+
+   counts = new float[num];
+   const float* his_counts = his.GetCounts();
+
+   if (vals == NULL || counts == NULL)
+   {
+      fprintf(stderr, "Histogram : Ran out of memory for arrays.\n");
+      vals = NULL;
+      counts = NULL;
+      num = 0;
+      vmin = 0;
+      vmax = 0;
+      delta = 0.0;
+      stats_consistent = 0;
+      return;
+   }
+
+   mean = his.GetMean();
+   standard_dev = his.GetStandardDev();
+
+   for(i=0; i<num; i++)
+   {
+      vals[i] = his_vals[i];
+      counts[i] = his_counts[i];
+   }
+   vmax = his.GetMaxVal();
+   vmin = his.GetMinVal();
+   delta = his.GetBucketSize();
+
+   stats_consistent = 0;
+   stats_consistent |= (MEAN_FLAG | SD_FLAG);
+}
+
+
+//---------------------------------------
+// -- Resample a histogram
+
+ossimHistogram::ossimHistogram(const ossimHistogram* his, float width)
+{
+
+   stats_consistent =0;
+
+// Attributes of original histogram
+
+   float del = his->GetBucketSize();
+   int max_index = his->GetRes() - 1;
+   float minvalue = his->GetVals()[0] - del*.5f;
+   float maxvalue = his->GetVals()[max_index] + del*.5f;
+
+
+// Intialize a new histogram
+   if(width == del) num = his->GetRes();
+   else if(!(width == 0.0))
+      num = (int)ceil((maxvalue - minvalue)/width);
+   else
+      num = 1; // This shouldn't happen anyway.
+
+   vals = new float [num];
+   counts = new float [num];
+   delta = width;
+   float mean_val = (maxvalue + minvalue)/2.0f;
+   float half_range = (num * delta)/2.0f;
+   vmax =  mean_val + half_range;
+   vmin =  mean_val - half_range;
+   int i = 0;
+
+   if (vals == NULL || counts == NULL)
+   {
+      fprintf(stderr,
+              "Histogram : Ran out of memory for arrays.\n");
+      vals = NULL;
+      counts = NULL;
+      num = 0;
+      vmin = 0;
+      vmax = 0;
+      delta = 0.0;
+      mean = 0.0;
+      standard_dev = 0.0;
+      stats_consistent |= (MEAN_FLAG | SD_FLAG);
+      return;
+       
+   }
+   
+   else
+   {
+      for(i = 0; i < num; i++)
+      {
+         vals[i] = vmin + delta * (i + 0.5f);
+         counts[i] = 0.0;
+      }
+   }
+
+
+// Cases:
+
+
+   if(width == del)    // Then just copy his
+   {
+      const float* his_counts = his->GetCounts();
+      for(i=0; i<num; i++)
+         counts[i] = his_counts[i];
+      mean = GetMean();
+      standard_dev = GetStandardDev();
+      stats_consistent |= (MEAN_FLAG | SD_FLAG);
+      return;
+   }
+
+
+   if(del > width)     // Then interpolate his counts.
+   {
+
+// Boundary conditions:
+//    Start
+      float his_start = minvalue + .5f*del;
+      float start = vmin + .5f*delta;
+      float c0 = his->GetCount(his_start);
+      float c1 = his->GetCount(his_start + del);
+      float s0 = (c1 - c0)/del;
+
+      for(float x = start; x <= (his_start + del + delta);)
+      {
+         float interp = s0 * (x - his_start) + c0;
+         if(interp < 0) interp = 0; //Can be negative
+         SetCount(x,interp);
+         x += width;
+      }
+//    End
+      float his_end = maxvalue - .5f*del;
+      float end = vmax - .5f*delta;
+      float cn = his->GetCount(his_end);
+      float cn_1 = his->GetCount(his_end - del);
+      float sn = (cn_1 - cn)/del;
+
+      for(float y = end; y >= (his_end - del + delta);)
+      {
+         float interp = sn * (his_end - y) + cn;
+         if(interp < 0) interp = 0; //Can be negative
+         SetCount(y, interp);
+         y -= delta;
+      }
+// Interior Loop
+
+      for(float z = his_start + del; z <= (his_end - del);)
+      {
+         float ci = his->GetCount(z);
+         float ci_1 = his->GetCount(z-del);
+         float cip1 = his->GetCount(z+del);
+         float deriv = (cip1 - ci_1)/(2.0f*del);
+         float second_drv =
+            ((cip1 + ci_1)/2.0f - ci)/(del*del);
+         int fine_x_index = GetIndex(z);
+         if (fine_x_index < 0)
+         {
+            if (z<vmin) fine_x_index = 0;
+            else fine_x_index = num-1;
+         }
+         float fine_x = vals[fine_x_index];
+         for(float xfine = fine_x; xfine < z + del;)
+         {
+            float interp = ci + deriv*(xfine -z) +
+               second_drv*(xfine - z)*(xfine - z);
+
+            if(interp < 0) interp = 0; //Can be negative
+            SetCount(xfine, interp);
+            xfine += width;
+         }
+         z += del;
+      }
+   }
+
+
+   if(del < width)    //Just accumulate samples from his into larger bins
+   {
+      if( del != 0.0){
+         float his_start = minvalue + .5f*del;
+         float his_end = maxvalue - .5f*del;
+         for(float x = his_start; x <= his_end;)
+         {
+            SetCount(x, (GetCount(x) + his->GetCount(x)));
+            x += del;
+         }
+      }
+   }
+   mean = GetMean();
+   standard_dev = GetStandardDev();
+   stats_consistent =0;
+   stats_consistent |= (MEAN_FLAG | SD_FLAG);
+}
+
+void ossimHistogram::create(int xres, float val1, float val2)
+{
+   // clear all the data
+   deleteAll();
+
+   // now set it up and initialize;
+   xres = xres >0? xres:1;
+   
+   vals   = new float [xres];
+   counts = new float [xres];
+   num = xres;
+   vmax = MAX(val1, val2);
+   vmin = MIN(val1, val2);
+
+   delta = (vmax - vmin) / xres;
+   mean = (float)((vmax + vmin)/2.0);
+   standard_dev = (float)((vmax - vmin)/(2.0*sqrt(3.0)));
+   stats_consistent = 0;
+   stats_consistent |= (MEAN_FLAG | SD_FLAG);
+   int i = 0;
+   if (vals == NULL || counts == NULL)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "Histogram : Ran out of memory for arrays.\n";
+      vals = NULL;
+      counts = NULL;
+      num = 0;
+      vmin = 0;
+      vmax = 0;
+      delta = 0.0;
+   }
+   else
+   {
+      for(i = 0; i < xres; i++)
+      {
+         vals[i] = vmin + delta * (float)(i + 0.5);
+         counts[i] = 0.0;
+      }
+   }   
+}
+ossimHistogram* ossimHistogram::fillInteriorEmptyBins(int type)const
+{
+   if(num < 1) return 0;
+   ossimHistogram* result = new ossimHistogram(*this);
+   switch(type)
+   {
+      case HISTOGRAM_FILL_THIN_PLATE:
+      case HISTOGRAM_FILL_DEFAULT:
+      {
+         ossimThinPlateSpline spline(1);
+         double pvars[1];
+         float* new_counts = result->GetCounts();
+         ossim_int32 idxLeft = 0;
+         ossim_int32 idxRight = num-1;
+         while((idxLeft < num) && (new_counts[idxLeft]  == 0.0))++idxLeft;
+         while((idxRight > -1) && (new_counts[idxRight] == 0.0))--idxRight;
+         
+         if(idxLeft < idxRight)
+         {
+            ossim_int32 idx = idxLeft;
+            while(idx <= idxRight)
+            {
+               if(new_counts[idx]!=0.0)
+               {
+                  pvars[0] = new_counts[idx];
+                  spline.addPoint(idx, 0, pvars);
+               }
+               ++idx;
+            }
+            if(spline.solve())
+            {
+               idx = idxLeft;
+               while(idx <= idxRight)
+               {
+                  if(spline.getPoint(idx, 0, pvars))
+                  {
+                     new_counts[idx] = pvars[0];
+                  }
+                  ++idx;
+               }
+            }
+         }
+         
+         break;
+      }
+   }
+   
+   return result;
+}
+//--------------------------------------------------
+// -- Transform the value axis of a histogram by a
+//    translation, transl, and a scale factor, scale.
+//    The new histogram has the same resolution as his.
+
+ossimHistogram* ossimHistogram::Scale(float scale_factor)
+{
+
+// Extract attributes of self
+
+//    float lowvalue = vals[0];
+   float highvalue = vals[num-1];
+
+// Construct a new histogram
+
+   ossimHistogram* scaled_his = new ossimHistogram(this, delta);
+   float* new_counts = scaled_his->GetCounts();
+   int i = 0;
+   for(i=0; i < num; i++)  // Initialize
+      new_counts[i] = 0.0;
+
+// Compute scaled values
+// We assume that the new histogram is to be scaled down from his
+
+   float scale = scale_factor;
+   if(scale_factor > 1.0) scale = 1.0;
+
+   for(float x = highvalue; x > vmin;)
+   {
+      float trans_x = (x-vmin)*scale + vmin; // Scaled x.
+      int index = GetIndex(trans_x);
+      if (index < 0)
+      {
+         if (trans_x<vmin) index = 0;
+         else index = num-1;
+      }
+      float fraction = (trans_x - vals[index])/delta;
+      float abs_fraction = (float)fabs(fraction);
+      int x_index = GetIndex(x);
+      if (x_index < 0)
+      {
+         if (x<vmin) x_index = 0;
+         else x_index = num-1;
+      }
+
+// Distribute the counts in proportion
+
+      new_counts[index] += (1.0f - abs_fraction)*counts[x_index];
+      if(fraction > 0)
+         if(index < (num-1))
+            new_counts[index + 1] +=
+               abs_fraction*counts[x_index];
+         else
+            new_counts[index] +=
+               abs_fraction*counts[x_index];
+      else
+         if(index > 0)
+            new_counts[index - 1] +=
+               abs_fraction*counts[x_index];
+         else
+            new_counts[index] +=
+               abs_fraction*counts[x_index];
+      x -= delta;
+   }
+
+// Compute new Histogram attributes
+
+   mean = scaled_his->GetMean();
+   standard_dev = scaled_his->GetStandardDev();
+   return scaled_his;
+}
+
+//---------------------------------------------------------------------
+// -- Assuming that "this" is a histogram of population density,
+//    construct a new histogram which is the cumulative distribution.
+//    Each bin, xi, in his is assumed to represent a density, i.e.,
+//            {x | (xi - .5*delta) < x <= (xi + .5*delta)}
+//    Each bin, xi, in the result represents a cumulative distribution, i.e.,
+//            {x | x <= (xi + .5*delta)}
+ossimHistogram* ossimHistogram::CumulativeGreaterThanEqual()const
+{
+   ossimHistogram* cum_his = new ossimHistogram(*this);
+   const float* density_counts = this->GetCounts();
+   int res = this->GetRes();
+
+   // Intitialize cumulative counts
+   float* cum_counts = cum_his->GetCounts();
+   int i = 0;
+   for(i=0; i < res; i++)
+      cum_counts[i] = 0;
+  
+   cum_counts[res-1] = density_counts[res-1];
+   for(i = res-2; i>=0; --i)
+   {
+      cum_counts[i] += (density_counts[i] + cum_counts[i+1]);
+   }
+
+   return cum_his;
+}
+
+ossimHistogram* ossimHistogram::CumulativeLessThanEqual()const
+{
+   ossimHistogram* cum_his = new ossimHistogram(*this);
+   const float* density_counts = this->GetCounts();
+   int res = this->GetRes();
+
+   // Intitialize cumulative counts
+   float* cum_counts = cum_his->GetCounts();
+   int i = 0;
+   for(i=0; i < res; i++)
+      cum_counts[i] = 0;
+
+   cum_counts[0] = density_counts[0];
+   for(i = 1; i < res; i++)
+   {
+      cum_counts[i] += (density_counts[i] + cum_counts[i-1]);
+   }
+  
+   return cum_his;
+}
+
+//Provides the correct values for histogram counts when the bin index 
+//extends outside the valid range of the counts array.  This function
+//permits easy array access logic for the NonMaximumSuppression algorithm.
+//The cyclic flag indicates that the counts array index is circular, i.e,
+//cnts[0] equivalent to cnts[n_bins-1]
+inline float GetExtendedCount(int bin, int n_bins, float* cnts, bool cyclic)
+{
+   int nbm = n_bins-1;
+   if(!cyclic)
+   {
+      if(bin < 0)
+         return cnts[0];
+      if(bin >= n_bins)
+         return cnts[nbm];
+   }
+   else
+   {
+      if(bin<0)
+         return cnts[nbm+bin];
+      if(bin >= n_bins)
+         return cnts[bin-n_bins];
+   }
+   return cnts[bin];
+}
+//Prune any sequences of more than one maxium value
+//That is, it is possible to have a "flat" top peak with an arbitarily
+//long sequence of equal, but maximum values. The cyclic flag indictates
+//that the sequence wraps around, i.e. cnts[0] equivalent to cnts[nbins-1]
+inline void RemoveFlatPeaks(int nbins, float* cnts, bool cyclic)
+{
+   int nbm = nbins-1;
+
+   //Here we define a small state machine - parsing for runs of peaks
+   //init is the state corresponding to an initial run (starting at i ==0)
+   bool init=GetExtendedCount(0, nbins, cnts, cyclic);
+   int init_end =0;
+
+   //start is the state corresponding to any other run of peaks
+   bool start=false;  
+   int start_index=0; 
+   int i = 0;
+
+   //The scan of the state machine
+   for(i = 0; i < nbins; i++)
+   {
+      float v = GetExtendedCount(i, nbins, cnts, cyclic);
+
+      //State init: a string of non-zeroes at the begining.
+      if(init&&v!=0)
+         continue;
+
+      if(init&&v==0)
+      {
+         init_end = i;
+         init = false;
+         continue;
+      }
+
+      //State !init&&!start: a string of "0s"
+      if(!start&&v==0)
+         continue;
+
+      //State !init&&start: the first non-zero value
+      if(!start&&v!=0)
+      {
+         start_index = i;
+         start = true;
+         continue;
+      }
+      //State ending flat peak: encountered a subsequent zero after starting
+      if(start&&v==0)
+      {
+         int peak_location = (start_index+i-1)/2;//The middle of the run
+         int k = 0;
+         for(k = start_index; k<=(i-1); k++)
+	    if(k!=peak_location)
+               cnts[k] = 0;
+         start = false;
+      }
+   }
+   //Now handle the boundary conditions
+   //The non-cyclic case
+   if(!cyclic)
+   {
+      if(init_end!=0)  //Was there an initial run of peaks?
+      {
+         int init_location = (init_end-1)/2;
+         int k = 0;
+         for(k = 0; k<init_end; k++)
+	    if(k!=init_location)
+               cnts[k] = 0;
+      }
+      if(start)       // Did we reach the end of the array in a run of pks?
+      {
+         int end_location = (start_index + nbm)/2;
+         int k = 0;
+         for(k = start_index; k<nbins; k++)
+	    if(k!=end_location)
+               cnts[k] = 0;
+      }
+   }
+   else  //The cyclic case
+   {
+      if(init_end!=0)  //Is there a run which crosses the cyclic cut?
+      {
+         if(start)    
+         { //Yes, so define the peak location accordingly
+	    int peak_location = (start_index + init_end - nbm -1)/2;
+	    int k;
+	    if(peak_location < 0) //Is the peak to the left of the cut?
+            {// Yes, to the left
+               peak_location += nbm; 
+               for( k = 0; k< init_end; k++)
+		  cnts[k]=0;
+               for( k= start_index; k <nbins; k++)
+		  if(k!=peak_location)
+                     cnts[k] = 0;
+            }
+	    else   
+            {//No, on the right.
+               for( k = start_index; k< nbins; k++)
+		  cnts[k]=0;
+               for( k= 0; k < init_end; k++)
+		  if(k!=peak_location)
+                     cnts[k] = 0;
+            }
+         }
+         else  
+         {//There wasn't a final run so just clean up the initial run
+	    int init_location = (init_end-1)/2;
+	    int k = 0;
+	    for(k = start_index; k<init_end; k++)
+               if(k!=init_location)
+                  cnts[k] = 0;
+         }
+      }
+   }
+}
+
+//----------------------------------------------------------
+// -- Suppress values in the Histogram which are not locally 
+//    a maxium. The neighborhood for computing the local maximum
+//    is [radius X radius], e.g. for radius =1 the neighborhood
+//    is [-X-], for radius = 2, the neighborhood is [--X--], etc.
+//    If the cyclic flag is true then the index space is assumed to
+//    be equivalent to a circle. That is, elements "0" and (n_buckets-1)
+//    are in correspondence.
+ossimHistogram* ossimHistogram::NonMaximumSupress(int radius, bool cyclic)
+{
+   if((2*radius +1)> num/2)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)<<"ossimHistogram::NonMaximumSupress the radius is too large \n";
+      return NULL;
+   }
+   //Get the counts array of "this"
+   ossimHistogram* h_new = new ossimHistogram(*this);
+   int n_buckets = h_new->GetRes();
+   float* counts_old = this->GetCounts();
+
+   //Make a new Histogram for the suppressed version
+   float* counts_new = h_new->GetCounts();
+   int i;
+   for( i =0; i < n_buckets; i++)
+      counts_new[i] = 0;
+  
+   //Find local maxima
+   for( i = 0; i<  n_buckets; i++)
+   {
+      //find the maxium value in the current kernel
+      float max_count = counts_old[i];
+      int k = 0;
+      for(k = -radius; k <= radius ;k++)
+      {
+         int index = i+k;
+         float c = GetExtendedCount(index, n_buckets, counts_old, cyclic);
+         if( c > max_count)
+	    max_count = c;
+      }
+      //Is position i a local maxium?
+      if(max_count == counts_old[i])
+         counts_new[i] = max_count;//Yes. So set the counts to the max value
+   }
+   RemoveFlatPeaks(n_buckets, counts_new, cyclic);
+   return h_new;
+}
+//----------------------------------------------------------
+// -- Compute the mean of the histogram population
+float ossimHistogram::GetMean()const
+{
+   float xsum = 0.0;
+
+   if(MEAN_FLAG&stats_consistent)
+      return mean;
+   else
+   {
+      if( this->GetBucketSize() > 0.0){
+         for(float x=this->GetMinVal(); x<= this->GetMaxVal(); x +=this->GetBucketSize())
+            xsum += x*GetCount(x);
+      }
+
+      float area = ComputeArea(vmin, vmax);
+      if(area <= 0.0)
+      {
+         //	      fprintf(stderr, "Histogram : Area <= 0.0\n");
+         return 0.0;
+      }
+      else
+      {
+         stats_consistent |=1;
+         mean = xsum/area;
+         return mean;
+      }
+   }
+}
+
+
+
+float ossimHistogram::GetStandardDev()const
+{
+   float sum = 0.0;
+
+   if(SD_FLAG&stats_consistent)
+      return standard_dev;
+   else
+   {
+      float xm = this -> GetMean(); // Force an Update of Mean
+
+      if( this->GetBucketSize() > 0.0){
+         for(float x=this->GetMinVal();
+             x<= this->GetMaxVal();
+             x +=this->GetBucketSize())
+
+            sum += (x-xm)*(x-xm)*GetCount(x);
+      }
+
+      float area = ComputeArea(vmin, vmax);
+      if(area <= 0.0)
+      {
+         //	      fprintf(stderr, "Histogram : Area <= 0.0\n");
+         return 0.0;
+      }
+      else
+      {
+         stats_consistent |= 2;
+         standard_dev = (float)sqrt(sum/area);
+         return standard_dev;
+      }
+   }
+}
+
+int ossimHistogram::GetIndex(float pixelval)const
+{
+#if 1
+   if ((pixelval > vmax) || (pixelval < vmin)||(num==0))
+   {
+      return -1;
+   }
+//   ossim_float32 d = vmax-vmin;
+   int bandIdx = (ossim_int32)((pixelval-vmin)/delta);
+   return bandIdx<GetRes()?bandIdx:-1;
+//    if(bandIdx == num)
+//    {
+//       return num-1;
+//    }
+//    else if(bandIdx < num)
+//    {
+//       return bandIdx;
+//    }
+//    return -1;
+#else
+   if ((pixelval > vmax) || (pixelval < vmin))
+      return -1;
+
+   int idx = 0;
+   int i = 0;
+
+   for(i = 0; i < num; i++)
+   {
+      //std::cout << std::setprecision(15) << vals[i] << std::endl;
+      // RWMC: This is very dangerous - might get an intermediate
+      // value which is between vals[i]+0.5*delta and
+      // vals[i+1]-0.5*delta, which would then return index of 0.
+      // Changed to check range one-sided, which is safe because of
+      // previous check on range.
+      //       if ((pixelval > (vals[i] - 0.5 * delta)) &&
+      //           (pixelval <= (vals[i] + 0.5 * delta)))
+      if (pixelval <= (vals[i] + 0.5 * delta))
+      {
+         idx = i;
+         break;
+      }
+   }
+//std::cout << idx << std::endl;
+   return idx;
+#endif
+}
+
+
+int ossimHistogram::GetValIndex(float pixelval)const
+{
+   if ((pixelval > vmax) || (pixelval < vmin))
+      return -1;
+
+   int idx = 0;
+   int i = 0;
+
+   for(i = 0; i < num; i++)
+   {
+      if ((pixelval > (vals[i] - 0.5 * delta)) &&
+          (pixelval <= (vals[i] + 0.5 * delta)))
+      {
+         idx = i;
+         break;
+      }
+   }
+
+   return idx;
+}
+
+
+
+float ossimHistogram::GetCount(float pixelval)const
+{
+   int index = GetIndex(pixelval);
+
+   if (index < 0)
+      return -1;
+   else
+      return counts[index];
+}
+
+
+
+float ossimHistogram::GetMinVal()const
+{
+   register int i=0;
+
+   while (i<num-1 && !counts[i])
+      i++;
+
+   return vals[i];
+}
+
+
+
+
+float ossimHistogram::GetMaxVal()const
+{
+   register int i=num-1;
+
+   while (i>0 && !counts[i])
+      i--;
+
+   if (i < 0)
+      return 0.0;
+
+   return vals[i];
+}
+
+
+float ossimHistogram::GetMaxCount()const
+{
+   register int i=0;
+   float max;
+   max = 0.0;
+   for (i=0; i < num; i++)
+      if (counts[i] > max)
+         max = counts[i];
+   return max;
+}
+
+
+
+
+float ossimHistogram::SetCount(float pixelval, float count)
+{
+   stats_consistent = 0;
+
+   int index = GetIndex(pixelval);
+
+   if (index < 0)
+      return -1;
+   else
+   {
+      counts[index] = count;
+      return count;
+   }
+}
+
+
+void ossimHistogram::UpCount(float pixelval)
+{
+
+   stats_consistent = 0;
+   int idx = GetIndex(pixelval);
+   if (idx >= 0)  // Originally (index > 0)
+   {
+      counts[idx] += 1.0;
+   }
+}
+
+float ossimHistogram::ComputeArea(float low, float high)const
+{
+   float maxval = GetMaxVal();
+   float minval = GetMinVal();
+
+   if (low < minval) low = minval;
+   if (high > maxval) high = maxval;
+
+   if (low <= high)
+   {
+      int indexlow, indexhigh;
+      indexlow = (int) GetIndex(low);
+      if (indexlow < 0)
+      {
+         if (low<vmin) indexlow = 0;
+         else indexlow = num-1;
+      }
+      indexhigh = (int) GetIndex(high);
+      if (indexhigh < 0)
+      {
+         if (high<vmin) indexhigh = 0;
+         else indexhigh = num-1;
+      }
+      register int i=indexlow;
+      float sum = 0.0;
+
+      while (i<=indexhigh)
+      {
+         sum+= counts[i];
+         i++;
+      }
+      return sum;
+   }
+   else
+   {
+      //      fprintf(stderr, "Histogram : Range for ComputeArea is out of bounds.\n");
+      return 0.0;
+   }
+}
+//----------------------------------------------------------------------
+// --Compute the total area under the histogram
+//
+float ossimHistogram::ComputeArea()const
+{
+   float vmin = this->GetMinVal();
+   float vmax = this->GetMaxVal();
+   if(vmin>vmax)
+   {
+      float temp = vmin;
+      vmin = vmax;
+      vmax = temp;
+   }
+   return this->ComputeArea(vmin, vmax);
+}
+
+float ossimHistogram::getLowFractionFromValue(float val) const
+{
+   
+   float min = floor(GetMinVal());
+   float max = ceil(GetMaxVal());
+   if (val < min || val > max)
+   {
+      return ossim::nan();
+   }
+
+   int total_buckets = GetRes();
+   int cutoff_bucket = GetValIndex(val);
+   float partial_sum = 0.0;
+   float total_sum   = 0.0;
+   
+   for(int i = 0; i < total_buckets; ++i)
+   {
+      total_sum += counts[i];
+      if (i <= cutoff_bucket)
+      {
+         partial_sum += counts[i];
+      }
+   }
+
+   return (partial_sum/total_sum);
+}
+
+float ossimHistogram::getHighFractionFromValue(float val) const
+{
+   float min = floor(GetMinVal());
+   float max = ceil(GetMaxVal());
+   if (val < min || val > max)
+   {
+      return ossim::nan();
+   }
+
+   int total_buckets = GetRes();
+   int cutoff_bucket = GetValIndex(val);
+   float partial_sum = 0.0;
+   float total_sum   = 0.0;
+   
+   for(int i = (total_buckets-1); i >= 0; --i)
+   {
+      total_sum += counts[i];
+      if (i >= cutoff_bucket)
+      {
+         partial_sum += counts[i];
+      }
+   }
+
+   return (partial_sum/total_sum);
+}
+
+//----------------------------------------------------------------------
+//  -- Finds the lower bound value which elminates a given fraction of
+//     histogram area.
+//
+float ossimHistogram::LowClipVal(float clip_fraction)const
+{
+   if(clip_fraction<0) clip_fraction=0.0;
+   if(clip_fraction>1.0) clip_fraction=1.0;
+   float area = this->ComputeArea();
+   if(area==0.0) return this->GetMinVal();
+   if(clip_fraction==0.0) return this->GetMinVal();
+   if(clip_fraction==1.0) return this->GetMaxVal();
+   float clip_area = area*clip_fraction;
+   const float* COUNTS = this->GetCounts();
+   const float* VALS = this->GetVals();
+   int res = this->GetRes();
+   float sum = 0;
+   int i=0;
+   for(; i<res; i++)
+   {
+      sum+=COUNTS[i];
+      if(sum>=clip_area)
+         break;
+   }
+   return VALS[i];
+}
+
+//----------------------------------------------------------------------
+//  -- Finds the lower bound value which elminates a given fraction of
+//     histogram area.
+//
+float ossimHistogram::HighClipVal(float clip_fraction)const
+{
+   if(clip_fraction<0) clip_fraction=0.0;
+   if(clip_fraction>1.0) clip_fraction=1.0;
+   float area = this->ComputeArea();
+   if(area==0.0) return this->GetMaxVal();
+   if(clip_fraction==0.0) return this->GetMaxVal();
+   if(clip_fraction==1.0) return this->GetMinVal();
+   float clip_area = area*clip_fraction;
+   const float* COUNTS = this->GetCounts();
+   const float* VALS = this->GetVals();
+   int res = this->GetRes();
+   float sum = 0;
+   int i = (res-1);
+   for(; i>=0; i--)
+   {
+      sum+=COUNTS[i];
+      if(sum>=clip_area)
+         break;
+   }
+   return VALS[i];
+}
+
+//--------------------------------------------------------------------------
+// -- Prints histogram counts onto cout
+void ossimHistogram::Print()const
+{
+   ostream& out = ossimNotify(ossimNotifyLevel_INFO);
+   const float* VALS = this->GetVals();
+   const float* COUNTS = this->GetCounts();
+   int res = this->GetRes();
+   int width = 0;
+   int i = 0;
+   for(i =0; i < res; i++)
+   {
+      if(width++ > 5)
+      {
+         width = 0;
+         out << "\n";
+      }
+      out << VALS[i] << " "
+          << COUNTS[i] << " | " ;
+   }
+   out << "\n MaxVal " << this->GetMaxVal() << "\n";
+   out << " MinVal " << this->GetMinVal() << "\n";
+   out << " BucketSize " << this->GetBucketSize() << "\n";
+   out << " Resolution " << this->GetRes() << "\n";
+   out << " Area "
+       << this->ComputeArea(this->GetMinVal(),this->GetMaxVal()) << "\n";
+   out << "------------------------------------------------\n\n";
+}
+
+//---------------------------------------------------------------------------
+// --- dumps histogram  values  to file.
+
+void ossimHistogram::Dump(char *dumpfile)const
+{
+   FILE *dumpfp = fopen(dumpfile, "w");
+
+   if (!dumpfp)
+   {
+      fprintf(stderr, "Error opening histogram data file.\n");
+      return;
+   }
+   int i = 0;
+
+   for(i = 0; i < num; i++)
+      fprintf(dumpfp, "%f %f\n", vals[i], counts[i]);
+  
+   fclose(dumpfp);
+   return;
+}
+
+//---------------------------------------------------------------------------
+// -- Writes histogram in format suitable for plotting tools like Gnuplot.
+
+int ossimHistogram::WritePlot(const char *fname)const
+{
+   FILE *fp = fopen(fname, "w");
+
+   if (!fp)
+   {
+      fprintf(stderr, "Error opening histogram plot file.\n");
+      return 0;
+   }
+
+   int stat_res = this->GetRes();
+
+   float * x = new float[2*stat_res];
+   float * y = new float[2*stat_res];
+
+   const float * temp_x = this->GetVals();
+   const float * temp_y = this->GetCounts();
+   float     delt = this->GetBucketSize();
+
+   for (register int i=0; i < stat_res ;i++)
+   {
+      x[2*i] = temp_x[i] - 0.5f * delt;
+      x[2*i+1] = temp_x[i] + 0.5f * delt;
+      y[2*i] = temp_y[i];
+      y[2*i+1] = temp_y[i];
+   }
+
+
+   for(register int j = 0; j < 2*stat_res; j++)
+      fprintf(fp, "%f %f\n", x[j], y[j]);
+
+   delete [] x;
+   delete [] y;
+
+   fclose(fp);
+   return 1;
+}
+
+void ossimHistogram::deleteAll()
+{
+   if (vals)
+   {
+      delete []vals;
+      vals = NULL;
+   }
+   if (counts)
+   {
+      delete []counts;
+      counts = NULL;
+   }  
+}
+
+ossimHistogram::~ossimHistogram()
+{
+   deleteAll();
+}
+
+
+bool ossimHistogram::importHistogram(istream& in)
+{
+   ossimProprietaryHeaderInformation header;
+   bool binsCreated = false;
+   
+   if(header.parseStream(in))
+   {
+      long numberOfBins = header.getNumberOfBins();
+      
+      if(numberOfBins)
+      {
+         create(numberOfBins, 0, numberOfBins - 1);
+         binsCreated = true;
+
+         if(binsCreated)
+         {
+            ossimString buffer;
+            ossimString binNumber;
+            ossimString count;
+
+            while(in.good() &&
+                  !in.eof() &&
+                  *binNumber.c_str() != '.')
+            {
+               
+               getline(in, buffer);
+
+               istringstream s(buffer);
+
+               s >> binNumber >> count;
+               if(*binNumber.c_str() != (char)'.')
+               {
+                  SetCount((float)binNumber.toDouble(),
+                           (float)count.toDouble());
+               }
+            }
+         }
+      }
+      else
+      {
+         return false;
+      }
+   }  
+   return true;
+}
+
+bool ossimHistogram::importHistogram(const ossimFilename& inputFile)
+{
+   if(inputFile.exists())
+   {
+      ifstream input(inputFile.c_str());
+
+      return importHistogram(input);
+   }
+
+   return false;  
+}
+
+
+bool ossimHistogram::ossimProprietaryHeaderInformation::parseStream(istream& in)
+{
+   ossimString inputLine;
+   
+   getline(in, inputLine);  
+   if(inputLine.find("File Type") != string::npos)
+   {
+      std::string::size_type index = inputLine.find(":");
+      if(index != std::string::npos)
+      {
+         theFileType = inputLine.substr(index+1);
+         theFileType = theFileType.trim();
+      }
+      else
+      {
+         return false;
+      }
+
+   }
+   else
+   {
+      return false;
+   }
+
+   getline(in, inputLine);  
+   if(inputLine.find("Version") != string::npos)
+   {
+      std::string::size_type index = inputLine.find(":");
+      if(index != std::string::npos)
+      {
+         theVersion = inputLine.substr(index+1);
+         theVersion = theVersion.trim();
+      }
+      else
+      {
+         return false;
+      }
+   }
+   else
+   {
+      return false;
+   }
+
+   getline(in, inputLine);  
+   if(inputLine.find("Mapper Type") != string::npos)
+   {
+      std::string::size_type index = inputLine.find(":");
+      if(index != std::string::npos)
+      {
+         theMapperType = inputLine.substr(index+1);
+         theMapperType = theMapperType.trim();
+      }
+      else
+      {
+         return false;
+      }
+   }
+   else
+   {
+      return false;
+   }
+
+   getline(in, inputLine);  
+   if(inputLine.find("Number of Bins") != string::npos)
+   {
+      std::string::size_type index = inputLine.find(":");
+      if(index != std::string::npos)
+      {
+         theNumberOfBins = inputLine.substr(index+1);
+         theNumberOfBins = theNumberOfBins.trim();
+      }
+      else
+      {
+         return false;
+      }
+   }
+   else
+   {
+      return false;
+   }
+   
+   return true;   
+}
+
+bool ossimHistogram::saveState(ossimKeywordlist& kwl,
+                               const char* prefix)const
+{
+   kwl.add(prefix,
+           "type",
+           "ossimHistogram",
+           true);
+   kwl.add(prefix,
+           "number_of_bins",
+           num,
+           true);
+   kwl.add(prefix,
+           "min_value",
+           vmin,
+           true);
+   kwl.add(prefix,
+           "max_value",
+           vmax,
+           true);
+   
+
+
+   ossimString binArrayList = "(";
+   bool firstValue = true;
+
+   for(ossim_int32 index = 0; index < num; ++index)
+   {
+      if(fabs(counts[index]) > FLT_EPSILON)
+      {
+
+         if(!firstValue)
+         {
+            binArrayList += ",";
+         }
+         else
+         {
+            firstValue = false;
+         }
+         binArrayList += "("+ossimString::toString(index)+","+ossimString::toString(counts[index])+")";
+     }
+   }
+
+   binArrayList += ")";
+
+   kwl.add(prefix, "bins", binArrayList, true);
+#if 0
+   ossimString binValue = "";
+   for(ossim_int32 index = 0; index < num; ++index)
+   {
+      if(fabs(counts[index]) > FLT_EPSILON)
+      {
+         //     binValue = prefix;
+         binValue = "bin";
+         binValue += ossimString::toString(index);
+         
+         kwl.add(prefix,
+                 binValue.c_str(),
+                 counts[index],
+                 true);
+      }
+   }
+#endif   
+   return true;
+}
+
+bool ossimHistogram::loadState(const ossimKeywordlist& kwl,
+                               const char* prefix)
+{
+//   std::cout << "ossimHistogram::loadState!!!!\n";
+   const char* number_of_bins = kwl.find(prefix, "number_of_bins");
+
+//   std::cout << "NBINS = " << number_of_bins << std::endl;
+   if(number_of_bins)
+   {
+      ossim_uint32 bins = ossimString(number_of_bins).toUInt32();
+
+//      std::cout << "BINS ======== " << bins << std::endl;
+      if(bins > 0)
+      {
+         // setup some defaults
+         float minValue = 0;
+         float maxValue = bins - 1;
+
+         // see if there is a range set for the data
+         const char* min_value = kwl.find(prefix, "min_value");
+         const char* max_value = kwl.find(prefix, "max_value");
+
+         if(min_value)
+         {
+            minValue = (ossim_float32)ossimString(min_value).toDouble();
+         }
+         if(max_value)
+         {
+            maxValue = (ossim_float32)ossimString(max_value).toDouble();
+         }
+
+         create((int)bins, minValue, maxValue);
+         float* countsPtr = GetCounts();
+         memset(countsPtr, '\0', bins*sizeof(float));
+         // this is new style histogram creation
+         //
+         ossimString binsString = kwl.find(prefix, "bins");
+         if(!binsString.empty())
+         {
+            std::vector<ossimDpt> result;
+            ossim::toVector(result, binsString);
+            if(!result.empty())
+            {
+               ossim_uint32 idx = 0;
+               for(idx = 0; idx < result.size();++idx)
+               {
+                  ossim_uint32 binIdx = static_cast<ossim_uint32>(result[idx].x);
+                  if(binIdx < bins)
+                  {
+                     countsPtr[binIdx] = result[idx].y;
+                  }
+               }
+            }
+         }
+         else
+         {
+            ossimKeywordlist binsKwl;
+            ossim_uint32 offset = (ossim_uint32)(ossimString(prefix)+"bin").size();
+            ossimString regExpression =  ossimString("^(") + ossimString(prefix) + "bin[0-9]+)";
+            kwl.extractKeysThatMatch(binsKwl,regExpression);
+            const ossimKeywordlist::KeywordMap& kwlMap = binsKwl.getMap();
+            ossimKeywordlist::KeywordMap::const_iterator iter = kwlMap.begin();
+            while(iter != kwlMap.end())
+            {
+               ossimString numberStr(iter->first.begin() + offset,
+                                     iter->first.end());
+               countsPtr[numberStr.toUInt32()] = ossimString(iter->second).toDouble();
+               ++iter;
+            }
+         }
+
+//         ossimKeywordlist kwl;
+//         this->saveState(kwl);
+//         std::cout << kwl << std::endl;
+         
+         return true;
+#if 0
+         // create the bins
+         ossimString binNumber = "";
+         ossimString regExpression =  ossimString("^(") + ossimString(prefix) + "bin[0-9]+)";
+         vector<ossimString> keys = kwl.getSubstringKeyList( regExpression );
+         ossim_uint32 numberOfBins = (ossim_uint32)keys.size();
+         ossim_uint32 offset = (ossim_uint32)(ossimString(prefix)+"bin").size();
+
+         std::vector<ossim_uint32> theNumberList(numberOfBins);
+         ossim_uint32 idx = 0;
+         for(idx = 0; idx < theNumberList.size();++idx)
+         {
+            ossimString numberStr(keys[idx].begin() + offset,
+                                  keys[idx].end());
+            theNumberList[idx] = numberStr.toUInt32();
+
+         }
+         
+         float* countsPtr = GetCounts();
+         memset(countsPtr, '\0', bins*sizeof(float));
+         for(idx = 0; idx < numberOfBins;++idx)
+         {
+            const char* binCount = kwl.find(prefix, ossimString("bin") + ossimString::toString(theNumberList[idx]));
+            countsPtr[theNumberList[idx]] = (float)ossimString(binCount).toDouble();
+         }
+#endif
+      }
+   }
+   return true;
+}
+
+bool ossimHistogram::loadState(const ossimRefPtr<ossimXmlNode> xmlNode)
+{
+   ossimRefPtr<ossimXmlNode> binValues =  xmlNode->findFirstNode("binValues");
+   ossimRefPtr<ossimXmlNode> minValueNode  =  xmlNode->findFirstNode("minValue");
+   ossimRefPtr<ossimXmlNode> maxValueNode  =  xmlNode->findFirstNode("maxValue");
+
+   if(binValues.valid())
+   {
+      ossim_uint32 count = 0;
+      float minValue = 0.0;
+      float maxValue = 0.0;
+      std::vector<float> floatValues;
+      std::istringstream in(binValues->getText());
+      ossimString vString;
+      while(!in.fail())
+      {
+         in>>vString;
+         if(!in.fail())
+         {
+            floatValues.push_back(vString.toFloat32());
+         }
+      }
+      count = (ossim_uint32)floatValues.size();
+     
+      if(count)
+      {
+         minValue = 0;
+         maxValue = count - 1;
+
+         if(minValueNode.valid())
+         {
+            minValue = minValueNode->getText().toFloat32();
+         }
+         if(maxValueNode.valid())
+         {
+            maxValue = maxValueNode->getText().toFloat32();
+         }
+
+         create(count, minValue, maxValue);
+         float* countsPtr = GetCounts();
+         ossim_uint32 idx = 0;
+         for(idx = 0; idx < count; ++idx)
+         {
+            countsPtr[idx] = floatValues[idx];
+         }
+         return true;
+      }
+   }
+
+   return false;
+}
+
+bool ossimHistogram::saveState(ossimRefPtr<ossimXmlNode> xmlNode)const
+{
+   ossimRefPtr<ossimXmlNode> binValues = new ossimXmlNode;
+   xmlNode->setTag("ossimHistogram");
+   xmlNode->addChildNode("minValue", ossimString::toString(vmin));
+   xmlNode->addChildNode("maxValue", ossimString::toString(vmax));
+   xmlNode->addChildNode("standardDeviation", ossimString::toString(standard_dev));
+   xmlNode->addChildNode("mean", ossimString::toString(mean));
+   binValues->setTag("binValues");
+   std::ostringstream out;
+
+   ossim_int32 idx = 0;
+   if(num > 0)
+   {
+      for(idx = 0; idx < num;++idx)
+      {
+         out << ossimString::toString(counts[idx], 8) << " ";
+      }
+      binValues->setText(out.str());
+   }
+   xmlNode->addChildNode(binValues.get());
+   
+   return true;
+}
diff --git a/ossim/src/ossim/base/ossimHistogramSource.cpp b/ossim/src/ossim/base/ossimHistogramSource.cpp
new file mode 100644
index 0000000..bb9ce5e
--- /dev/null
+++ b/ossim/src/ossim/base/ossimHistogramSource.cpp
@@ -0,0 +1,107 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimHistogramSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/base/ossimHistogramSource.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimMultiResLevelHistogram.h>
+
+RTTI_DEF1(ossimHistogramSource, "ossimHistogramSource", ossimSource);
+
+
+ossimHistogramSource::ossimHistogramSource(ossimObject* owner,
+                                           ossim_uint32 numberOfInputs,
+                                           ossim_uint32 numberOfOutputs,
+                                           bool inputListFixedFlag,
+                                           bool outputListFixedFlag)
+   : ossimSource(owner,
+                 numberOfInputs,
+                 numberOfOutputs,
+                 inputListFixedFlag,
+                 outputListFixedFlag),
+     theHistogram(0),
+     theFilename()
+{
+}
+
+ossimHistogramSource::~ossimHistogramSource()
+{
+}
+
+ossimRefPtr<ossimMultiResLevelHistogram> ossimHistogramSource::getHistogram()
+{
+   return theHistogram;
+}
+
+bool ossimHistogramSource::loadState(const ossimKeywordlist& kwl,
+				     const char* prefix)
+{   
+   theHistogram = 0;
+   const char* externalFile = kwl.find(prefix,
+                                       ossimKeywordNames::FILENAME_KW);
+
+   theHistogram = new ossimMultiResLevelHistogram;
+   if(externalFile)
+   {
+      if(!theHistogram->importHistogram(ossimFilename(externalFile)))
+      {
+         theHistogram = 0;
+         theFilename = "";
+      }
+      theFilename = externalFile;
+   }
+   else
+   {
+      ossimString newPrefix = ossimString(prefix) + "histogram.";
+      if(!theHistogram->loadState(kwl, newPrefix))
+      {
+         theHistogram = 0;
+      }
+   }
+   
+   return ossimSource::loadState(kwl, prefix);
+}
+
+bool ossimHistogramSource::saveState(ossimKeywordlist& kwl,
+				     const char* prefix)const
+{
+   if(theHistogram.valid())
+   {
+      if(!theFilename.empty())      {
+         ossimKeywordlist kwl2;
+         
+         if(theHistogram->saveState(kwl2))
+         {
+            kwl2.write(theFilename.c_str());
+            kwl.add(prefix,
+                    ossimKeywordNames::FILENAME_KW,
+                    theFilename.c_str(),
+                    true);
+         }
+      }
+      else
+      {
+         ossimString newPrefix = ossimString(prefix) + "histogram.";
+         theHistogram->saveState(kwl, newPrefix);
+      }
+   }
+   
+   return ossimSource::saveState(kwl, prefix);
+}
+
+// Hidden from use.
+ossimHistogramSource::ossimHistogramSource(const ossimHistogramSource&)
+   :
+   theHistogram(0),
+   theFilename()
+{
+}
+
diff --git a/src/ossim/base/ossimHsiVector.cpp b/ossim/src/ossim/base/ossimHsiVector.cpp
similarity index 100%
rename from src/ossim/base/ossimHsiVector.cpp
rename to ossim/src/ossim/base/ossimHsiVector.cpp
diff --git a/src/ossim/base/ossimHsvVector.cpp b/ossim/src/ossim/base/ossimHsvVector.cpp
similarity index 100%
rename from src/ossim/base/ossimHsvVector.cpp
rename to ossim/src/ossim/base/ossimHsvVector.cpp
diff --git a/src/ossim/base/ossimHttpRequest.cpp b/ossim/src/ossim/base/ossimHttpRequest.cpp
similarity index 100%
rename from src/ossim/base/ossimHttpRequest.cpp
rename to ossim/src/ossim/base/ossimHttpRequest.cpp
diff --git a/src/ossim/base/ossimHttpResponse.cpp b/ossim/src/ossim/base/ossimHttpResponse.cpp
similarity index 100%
rename from src/ossim/base/ossimHttpResponse.cpp
rename to ossim/src/ossim/base/ossimHttpResponse.cpp
diff --git a/src/ossim/base/ossimId.cpp b/ossim/src/ossim/base/ossimId.cpp
similarity index 100%
rename from src/ossim/base/ossimId.cpp
rename to ossim/src/ossim/base/ossimId.cpp
diff --git a/src/ossim/base/ossimIdManager.cpp b/ossim/src/ossim/base/ossimIdManager.cpp
similarity index 100%
rename from src/ossim/base/ossimIdManager.cpp
rename to ossim/src/ossim/base/ossimIdManager.cpp
diff --git a/src/ossim/base/ossimImageAoiListener.cpp b/ossim/src/ossim/base/ossimImageAoiListener.cpp
similarity index 100%
rename from src/ossim/base/ossimImageAoiListener.cpp
rename to ossim/src/ossim/base/ossimImageAoiListener.cpp
diff --git a/src/ossim/base/ossimImageGeometryEvent.cpp b/ossim/src/ossim/base/ossimImageGeometryEvent.cpp
similarity index 100%
rename from src/ossim/base/ossimImageGeometryEvent.cpp
rename to ossim/src/ossim/base/ossimImageGeometryEvent.cpp
diff --git a/src/ossim/base/ossimImageGeometryEventListener.cpp b/ossim/src/ossim/base/ossimImageGeometryEventListener.cpp
similarity index 100%
rename from src/ossim/base/ossimImageGeometryEventListener.cpp
rename to ossim/src/ossim/base/ossimImageGeometryEventListener.cpp
diff --git a/src/ossim/base/ossimImageTypeLut.cpp b/ossim/src/ossim/base/ossimImageTypeLut.cpp
similarity index 100%
rename from src/ossim/base/ossimImageTypeLut.cpp
rename to ossim/src/ossim/base/ossimImageTypeLut.cpp
diff --git a/src/ossim/base/ossimInterleaveTypeLut.cpp b/ossim/src/ossim/base/ossimInterleaveTypeLut.cpp
similarity index 100%
rename from src/ossim/base/ossimInterleaveTypeLut.cpp
rename to ossim/src/ossim/base/ossimInterleaveTypeLut.cpp
diff --git a/ossim/src/ossim/base/ossimIoStream.cpp b/ossim/src/ossim/base/ossimIoStream.cpp
new file mode 100644
index 0000000..89e6b59
--- /dev/null
+++ b/ossim/src/ossim/base/ossimIoStream.cpp
@@ -0,0 +1,533 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+// Description:
+// 
+// Class definitiaons for:
+// 
+// ossimIStream
+// ossimOStream
+// ossimIOStream
+// ossimIOMemoryStream
+// ossimIMemoryStream
+// ossimOMemoryStream
+// ossimIOFStream
+// ossimIFStream
+// ossimOFStream
+//
+//*******************************************************************
+//  $Id: ossimIoStream.cpp 23002 2014-11-24 17:11:17Z dburken $
+#include <ossim/base/ossimIoStream.h>
+/*
+ossimIStream::ossimIStream()
+   : ossimStreamBase(),
+#if defined(_MSC_VER)
+   std::istream((std::_Uninitialized)0)
+#else
+   std::istream()
+#endif
+{}
+*/
+ossimIStream::ossimIStream(std::streambuf* sb)
+   : ossimStreamBase(),
+     std::basic_istream<char>(sb)
+{}
+
+ossimIStream::~ossimIStream()
+{}
+
+/*
+ossimOStream::ossimOStream()
+   : ossimStreamBase(),
+#ifdef _MSC_VER
+   std::ostream((std::_Uninitialized)0)
+#else
+   std::ostream()
+#endif
+{}
+*/
+ossimOStream::ossimOStream(std::streambuf* sb)
+   : ossimStreamBase(),
+     std::basic_ostream<char>(sb)
+{}
+
+ossimOStream::~ossimOStream()
+{}
+
+ossimIOStream::ossimIOStream(std::streambuf* sb)
+:std::basic_iostream<char>(sb)
+{
+
+}
+/*
+ossimIOStream::ossimIOStream()
+   : ossimStreamBase(),
+#ifdef _MSC_VER
+   std::iostream((std::_Uninitialized)0)
+#else
+   std::iostream()
+#endif
+{}
+*/
+ossimIOStream::~ossimIOStream()
+{}
+
+ossimIOMemoryStream::ossimIOMemoryStream()
+   : ossimIOStream(&theBuf),
+     theBuf(std::ios::in|std::ios::out)
+{
+   ossimIOStream::init(&theBuf);
+}
+
+ossimIOMemoryStream::~ossimIOMemoryStream()
+{
+}
+
+bool ossimIOMemoryStream::is_open()const
+{
+   return true;
+}
+
+void ossimIOMemoryStream::open(const char* /* protocolString */,
+                               int /* openMode */)
+{
+}
+
+ossimString ossimIOMemoryStream::str()
+{
+   return theBuf.str();
+}
+
+void ossimIOMemoryStream::close()
+{}
+
+ossim_uint64 ossimIOMemoryStream::size()const
+{
+   ossimIOMemoryStream*  thisPtr = const_cast<ossimIOMemoryStream*>(this);
+   std::streampos pos = thisPtr->tellg();
+   thisPtr->seekg(0, std::ios::end);
+   std::streampos endPos = thisPtr->tellg();
+   thisPtr->seekg(pos, std::ios::beg);
+   
+   return (ossim_uint64)(endPos);
+}
+
+ossimIMemoryStream::ossimIMemoryStream(const ossimString& inputBuf)
+   
+   : ossimIStream(&theBuf),
+     theBuf(inputBuf.c_str(), std::ios::in)
+{
+   ossimIStream::init(&theBuf);
+}
+
+ossimIMemoryStream::~ossimIMemoryStream()
+{
+}
+
+bool ossimIMemoryStream::is_open()const
+{
+   return true;
+}
+
+ossim_uint64 ossimIMemoryStream::size()const
+{
+   ossimIMemoryStream*  thisPtr = const_cast<ossimIMemoryStream*>(this);
+   std::streampos pos = thisPtr->tellg();
+   thisPtr->seekg(0, std::ios::end);
+   std::streampos endPos = thisPtr->tellg();
+   thisPtr->seekg(pos, std::ios::beg);
+   return (ossim_uint64)(endPos);
+}
+
+void ossimIMemoryStream::open(const char* /* protocolString */,
+                              int /* openMode */ )
+{
+}
+
+void ossimIMemoryStream::close()
+{}
+
+ossimString ossimIMemoryStream::str()
+{
+   return theBuf.str();
+}
+
+ossimOMemoryStream::ossimOMemoryStream()
+   : ossimOStream(&theBuf),
+     theBuf(std::ios::out)
+{
+   ossimOStream::init(&theBuf);
+}
+
+ossimOMemoryStream::~ossimOMemoryStream()
+{
+}
+
+bool ossimOMemoryStream::is_open()const
+{
+   return true;
+}
+
+ossim_uint64 ossimOMemoryStream::size()const
+{
+   ossimOMemoryStream*  thisPtr = const_cast<ossimOMemoryStream*>(this);
+   std::streampos pos = thisPtr->tellp();
+   thisPtr->seekp(0, std::ios::end);
+   std::streampos endPos = thisPtr->tellp();
+   thisPtr->seekp(pos, std::ios::beg);
+   return (ossim_uint64)(endPos);
+}
+
+void ossimOMemoryStream::open(const char* /* protocolString */,
+                              int /* openMode */ )
+{
+}
+
+void ossimOMemoryStream::close()
+{}
+
+ossimString ossimOMemoryStream::str()
+{
+   return theBuf.str();
+}
+
+ossimIOFStream::ossimIOFStream()
+   : ossimStreamBase(),
+     std::fstream()
+{
+}
+
+ossimIOFStream::ossimIOFStream(const char* name,
+                               std::ios_base::openmode mode)
+   : ossimStreamBase(),
+     std::fstream(name, mode)
+{
+}
+
+ossimIOFStream::~ossimIOFStream()
+{
+}
+
+ossimIFStream::ossimIFStream()
+   : ossimStreamBase(),
+     std::basic_ifstream<char>()
+{
+}
+ossimIFStream::ossimIFStream(const char* file, std::ios_base::openmode mode)
+   : ossimStreamBase(),
+     std::basic_ifstream<char>(file, mode)
+{
+}
+
+ossimIFStream::~ossimIFStream()
+{
+}
+
+ossimOFStream::ossimOFStream()
+   : ossimStreamBase(),
+     std::basic_ofstream<char>()
+{
+}
+
+ossimOFStream::ossimOFStream(const char* name, std::ios_base::openmode mode)
+   : ossimStreamBase(),
+     std::basic_ofstream<char>(name, mode)
+{
+}
+
+ossimOFStream::~ossimOFStream()
+{
+}
+#ifdef _MSC_VER
+
+  ossimIFStream64::ossimIFStream64(const char* pFilename, std::ios_base::openmode mode, int prot) :
+      std::basic_ifstream<char>(theFile = std::_Fiopen(pFilename, mode, prot))
+   {
+   }
+
+   ossimIFStream64::~ossimIFStream64()
+   {
+      if(is_open())
+      {
+         close();
+      }
+   }
+
+   void ossimIFStream64::seekg64(off_type off, ios_base::seekdir way)
+   {
+      _fseeki64(theFile, off, way);
+   }
+
+   void ossimIFStream64::seekg64(streampos pos, ios_base::seekdir way)
+   {
+      // Undo the potentially bad typecast done by _FPOSOFF when fpos is > max long
+      const off_type off(pos);
+      const fpos_t fpos = pos.seekpos();
+      seekg64(off - _FPOSOFF(fpos) + fpos, way);
+   }
+
+   void ossimIFStream64::seekg64(std::istream& str, off_type off, 
+                                 ios_base::seekdir way)
+   {
+      ossimIFStream64* pStream = dynamic_cast<ossimIFStream64*>(&str);
+      if (pStream != NULL)
+      {
+         pStream->seekg64(off, way);
+      }
+      else
+      {
+         str.seekg(off, way);
+      }
+   }
+
+   void ossimIFStream64::seekg64(std::istream& str, 
+                                 std::streampos pos, 
+                                 ios_base::seekdir way)
+   {
+      ossimIFStream64* pStream = dynamic_cast<ossimIFStream64*>(&str);
+      if (pStream != NULL)
+      {
+         pStream->seekg64(pos, way);
+      }
+      else
+      {
+         str.seekg(pos, way);
+      }
+   }
+
+   ossimOFStream64::ossimOFStream64(const char* pFilename, 
+      std::ios_base::openmode mode, 
+      int prot) :
+      std::basic_ofstream<char>(pFilename, mode, prot)
+   {
+   }
+
+   ossimOFStream64::~ossimOFStream64()
+   {
+      if(is_open())
+      {
+         close();
+      }
+   }
+
+   ossim_uint64 ossimOFStream64::tellp64()
+   {
+      // Undo the potentially bad typecast done by _FPOSOFF when fpos is > max long
+      const pos_type pos = tellp();
+      const off_type off(pos);
+      const fpos_t fpos = pos.seekpos();
+      return off - _FPOSOFF(fpos) + fpos;
+   }
+
+#else
+
+ossimIFStream64::ossimIFStream64(const char* pFilename, 
+                                 std::ios_base::openmode mode,
+                                 long /* prot */) :
+   std::basic_ifstream<char>(pFilename, mode)
+{
+}
+
+ossimIFStream64::~ossimIFStream64()
+{
+   if(is_open())
+   {
+      close();
+   }
+}
+
+void ossimIFStream64::seekg64(off_type off, ios_base::seekdir way)
+{
+   std::basic_ifstream<char>::seekg(off, way);
+}
+
+void ossimIFStream64::seekg64(std::istream& str, 
+                              off_type off, ios_base::seekdir way)
+{
+   str.seekg(off, way);
+}
+
+ossimOFStream64::ossimOFStream64(const char* pFilename, 
+                                 std::ios_base::openmode mode,
+                                 long /* prot */) :
+   std::basic_ofstream<char>(pFilename, mode)
+{
+}
+
+ossimOFStream64::~ossimOFStream64()
+{
+   if(is_open())
+   {
+      close();
+   }
+}
+
+ossim_uint64 ossimOFStream64::tellp64()
+{
+   return tellp();
+}
+
+#endif // _MSC_VER
+
+void operator >> (ossimIStream& in,ossimOStream& out)
+{
+   char buf[1024];
+   bool done = false;
+
+   while(!done&&!in.fail())
+   {
+      in.read(buf, 1024);
+      if(in.gcount() < 1024)
+      {
+         done = true;
+      }
+      if(in.gcount() > 0)
+      {
+         out.write(buf, in.gcount());
+      }
+   }
+}
+
+ossimIOStream& operator >> (ossimIStream& in,ossimIOStream& out)
+{
+   char buf[1024];
+   bool done = false;
+
+   while(!done&&!in.fail())
+   {
+      in.read(buf, 1024);
+      if(in.gcount() < 1024)
+      {
+         done = true;
+      }
+      if(in.gcount() > 0)
+      {
+         out.write(buf, in.gcount());
+      }
+   }
+   
+   return out;
+}
+
+void operator >> (ossimIOStream& in,ossimOStream& out)
+{
+   char buf[1024];
+   bool done = false;
+
+   while(!done&&!in.fail())
+   {
+      in.read(buf, 1024);
+      if(in.gcount() < 1024)
+      {
+         done = true;
+      }
+      if(in.gcount() > 0)
+      {
+         out.write(buf, in.gcount());
+      }
+   }
+}
+
+ossimIOStream& operator >> (ossimIOStream& in,ossimIOStream& out)
+{
+   char buf[1024];
+   bool done = false;
+
+   while(!done&&!in.fail())
+   {
+      in.read(buf, 1024);
+      if(in.gcount() < 1024)
+      {
+         done = true;
+      }
+      if(in.gcount() > 0)
+      {
+         out.write(buf, in.gcount());
+      }
+   }
+
+   return out;
+}
+
+void operator << (ossimOStream& out, ossimIStream& in)
+{
+   char buf[1024];
+   bool done = false;
+
+   while(!done&&!in.fail())
+   {
+      in.read(buf, 1024);
+      if(in.gcount() < 1024)
+      {
+         done = true;
+      }
+      if(in.gcount() > 0)
+      {
+         out.write(buf, in.gcount());
+      }
+   }
+}
+
+void operator << (ossimOStream& out, ossimIOStream& in)
+{
+   char buf[1024];
+   bool done = false;
+
+   while(!done&&!in.fail())
+   {
+      in.read(buf, 1024);
+      if(in.gcount() < 1024)
+      {
+         done = true;
+      }
+      if(in.gcount() > 0)
+      {
+         out.write(buf, in.gcount());
+      }
+   }
+}
+
+ossimIOStream& operator << (ossimIOStream& out, ossimIStream& in)
+{
+   char buf[1024];
+   bool done = false;
+
+   while(!done&&!in.fail())
+   {
+      in.read(buf, 1024);
+      if(in.gcount() < 1024)
+      {
+         done = true;
+      }
+      if(in.gcount() > 0)
+      {
+         out.write(buf, in.gcount());
+      }
+   }
+
+   return out;
+}
+
+ossimIOStream& operator << (ossimIOStream& out, ossimIOStream& in)
+{
+   char buf[1024];
+   bool done = false;
+
+   while(!done&&!in.fail())
+   {
+      in.read(buf, 1024);
+      if(in.gcount() < 1024)
+      {
+         done = true;
+      }
+      if(in.gcount() > 0)
+      {
+         out.write(buf, in.gcount());
+      }
+   }
+
+   return out;
+}
diff --git a/src/ossim/base/ossimIpt.cpp b/ossim/src/ossim/base/ossimIpt.cpp
similarity index 100%
rename from src/ossim/base/ossimIpt.cpp
rename to ossim/src/ossim/base/ossimIpt.cpp
diff --git a/src/ossim/base/ossimIrect.cpp b/ossim/src/ossim/base/ossimIrect.cpp
similarity index 100%
rename from src/ossim/base/ossimIrect.cpp
rename to ossim/src/ossim/base/ossimIrect.cpp
diff --git a/src/ossim/base/ossimJpegYCbCrVector.cpp b/ossim/src/ossim/base/ossimJpegYCbCrVector.cpp
similarity index 100%
rename from src/ossim/base/ossimJpegYCbCrVector.cpp
rename to ossim/src/ossim/base/ossimJpegYCbCrVector.cpp
diff --git a/src/ossim/base/ossimKeyword.cpp b/ossim/src/ossim/base/ossimKeyword.cpp
similarity index 100%
rename from src/ossim/base/ossimKeyword.cpp
rename to ossim/src/ossim/base/ossimKeyword.cpp
diff --git a/ossim/src/ossim/base/ossimKeywordNames.cpp b/ossim/src/ossim/base/ossimKeywordNames.cpp
new file mode 100644
index 0000000..e4bffd5
--- /dev/null
+++ b/ossim/src/ossim/base/ossimKeywordNames.cpp
@@ -0,0 +1,198 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License:  See top level LICENSE.txt file
+//
+// Author: Ken Melero (kmelero at remotesensing.org)
+// 
+// Description: Common file for global Keywords.
+//
+//*************************************************************************
+// $Id: ossimKeywordNames.cpp 23623 2015-11-13 18:24:28Z gpotts $
+
+#include <ossim/base/ossimKeywordNames.h>
+
+const char* ossimKeywordNames::AZIMUTH_ANGLE_KW = "azimuth_angle";
+const char* ossimKeywordNames::BAND_KW = "band";
+const char* ossimKeywordNames::BANDS_KW = "bands";
+const char* ossimKeywordNames::BORDER_SIZE_KW = "border_size";
+const char* ossimKeywordNames::BRUSH_COLOR_KW = "brush_color";
+const char* ossimKeywordNames::BYTE_ORDER_KW = "byte_order";
+const char* ossimKeywordNames::CE90_ABSOLUTE_KW = "ce90_absolute";
+const char* ossimKeywordNames::CE90_RELATIVE_KW = "ce90_relative";
+const char* ossimKeywordNames::CENTRAL_MERIDIAN_KW = "central_meridian";
+const char* ossimKeywordNames::CENTRAL_POINT1_LAT_KW = "central_point1_lat";
+const char* ossimKeywordNames::CENTRAL_POINT1_LON_KW = "central_point1_lon";
+const char* ossimKeywordNames::CENTRAL_POINT2_LAT_KW = "central_point2_lat";
+const char* ossimKeywordNames::CENTRAL_POINT2_LON_KW = "central_point2_lon";
+const char* ossimKeywordNames::CENTER_PIXEL_X_KW = "center_pixel_x";
+const char* ossimKeywordNames::CENTER_PIXEL_Y_KW = "center_pixel_y";
+const char* ossimKeywordNames::COMPRESS_KW = "compress";
+const char* ossimKeywordNames::COMPRESSION_QUALITY_KW = "compression_quality";
+const char* ossimKeywordNames::COMPRESSION_TYPE_KW = "compression_type";
+const char* ossimKeywordNames::CONVERGENCE_THRESHOLD_KW = "convergence_threshold";
+const char* ossimKeywordNames::CREATE_EXTERNAL_GEOMETRY_KW = "create_external_geometry";
+const char* ossimKeywordNames::CREATE_IMAGE_KW = "create_image";
+const char* ossimKeywordNames::CREATE_HISTOGRAM_KW = "create_histogram";
+const char* ossimKeywordNames::CREATE_OVERVIEW_KW = "create_overview";
+const char* ossimKeywordNames::DATA_FILE_KW = "data_file";
+const char* ossimKeywordNames::DATE_KW = "date";
+const char* ossimKeywordNames::DATE_YEAR_KW = "year";
+const char* ossimKeywordNames::DATE_MONTH_KW = "month";
+const char* ossimKeywordNames::DATE_DAY_KW = "day";
+const char* ossimKeywordNames::DATE_HOUR_KW = "hour";
+const char* ossimKeywordNames::DATE_MIN_KW = "min";
+const char* ossimKeywordNames::DATE_SEC_KW = "sec";
+const char* ossimKeywordNames::DATE_FRACT_SEC_KW = "fract_sec";
+const char* ossimKeywordNames::DATUM_KW = "datum";
+const char* ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT = "decimal_degrees_per_pixel_lat";
+const char* ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON = "decimal_degrees_per_pixel_lon";
+const char* ossimKeywordNames::DESCRIPTION_KW = "description";
+const char* ossimKeywordNames::ELEVATION_ANGLE_KW = "elevation_angle";
+const char* ossimKeywordNames::ELEVATION_CELL_KW = "elevation_cell";
+const char* ossimKeywordNames::ELEVATION_SOURCE_KW = "elevation_source";
+const char* ossimKeywordNames::ELEVATION_LOOKUP_FLAG_KW = "elevation_lookup_flag";
+const char* ossimKeywordNames::ELLIPSE_CODE_KW = "ellipse_code";
+const char* ossimKeywordNames::ELLIPSE_EPSG_CODE_KW = "ellipse_epsg_code";
+const char* ossimKeywordNames::ELLIPSE_NAME_KW = "ellipse_name";
+const char* ossimKeywordNames::ENABLED_KW = "enabled";
+const char* ossimKeywordNames::ENABLE_CACHE_KW = "enable_cache";
+const char* ossimKeywordNames::EXTRACT_VERTICES_KW = "extract_vertices";  
+const char* ossimKeywordNames::ENTRY_KW = "entry";
+const char* ossimKeywordNames::FALSE_EASTING_NORTHING_KW = "false_easting_northing";
+const char* ossimKeywordNames::FALSE_EASTING_NORTHING_UNITS_KW = "false_easting_northing_units";
+const char* ossimKeywordNames::FALSE_EASTING_KW = "false_easting";
+const char* ossimKeywordNames::FALSE_NORTHING_KW = "false_northing";
+const char* ossimKeywordNames::FEATURE_NAME_KW = "feature_name";
+const char* ossimKeywordNames::FILENAME_KW = "filename";
+const char* ossimKeywordNames::FILEPATH_KW = "filepath";
+const char* ossimKeywordNames::FILL_FLAG_KW = "fill_flag";
+const char* ossimKeywordNames::FRAME_INDEX_KW = "frame_index";
+const char* ossimKeywordNames::GCS_CODE_KW = "gcs_code";
+const char* ossimKeywordNames::GEOM_FILE_KW = "geom_file";
+const char* ossimKeywordNames::HEMISPHERE_KW = "hemisphere";
+const char* ossimKeywordNames::HORIZONTAL_SIZE_KW = "horizontal_size";
+const char* ossimKeywordNames::ID_KW ="id";
+const char* ossimKeywordNames::IMAGE_CE90_KW  = "estimated_image_ce90";
+const char* ossimKeywordNames::IMAGE_FILE_KW = "image_file";
+const char* ossimKeywordNames::IMAGE_ID_KW = "image_id";
+const char* ossimKeywordNames::IMAGE_MODEL_TRANSFORM_MATRIX_KW = "image_model_transform_matrix";
+const char* ossimKeywordNames::IMAGE_MODEL_TRANSFORM_UNIT_KW = "image_model_transform_unit";
+const char* ossimKeywordNames::IMAGE_PATH_KW = "image_path";
+const char* ossimKeywordNames::IMAGE_TYPE_KW = "image_type";
+const char* ossimKeywordNames::IMAGE_DATE_KW = "image_date";
+const char* ossimKeywordNames::IMAGE_FILE_SIZE_KW = "image_file_size";
+const char* ossimKeywordNames::INPUT_RR_LEVEL_KW = "input_rr_level";
+const char* ossimKeywordNames::INTERLEAVE_TYPE_KW = "interleave_type";
+const char* ossimKeywordNames::JULIAN_DAY_KW = "julian_day";
+const char* ossimKeywordNames::LAT_INCREMENT_KW = "lat_increment";
+const char* ossimKeywordNames::LL_LAT_KW = "ll_lat";
+const char* ossimKeywordNames::LL_LON_KW = "ll_lon";
+const char* ossimKeywordNames::LR_LAT_KW = "lr_lat";
+const char* ossimKeywordNames::LR_LON_KW = "lr_lon";
+const char* ossimKeywordNames::LL_X_KW = "ll_x";
+const char* ossimKeywordNames::LL_Y_KW = "ll_y";
+const char* ossimKeywordNames::LR_X_KW = "lr_x";
+const char* ossimKeywordNames::LR_Y_KW = "lr_y";
+const char* ossimKeywordNames::LON_INCREMENT_KW = "lon_increment";
+const char* ossimKeywordNames::MAJOR_AXIS_KW = "major_axis";
+const char* ossimKeywordNames::MAX_VALUE_KW = "max_value";
+const char* ossimKeywordNames::MAX_ITERATIONS_KW = "max_iterations";
+const char* ossimKeywordNames::MAX_QUADTREE_LEVELS_KW = "max_quadtree_levels";
+const char* ossimKeywordNames::METADATA_TYPE_KW = "metadata_type";
+const char* ossimKeywordNames::METERS_PER_PIXEL_KW = "meters_per_pixel";
+const char* ossimKeywordNames::METERS_PER_PIXEL_X_KW = "meters_per_pixel_x";
+const char* ossimKeywordNames::METERS_PER_PIXEL_Y_KW = "meters_per_pixel_y";
+const char* ossimKeywordNames::MINOR_AXIS_KW = "minor_axis";
+const char* ossimKeywordNames::MIN_VALUE_KW = "min_value";
+const char* ossimKeywordNames::NULL_VALUE_KW = "null_value";
+const char* ossimKeywordNames::NUMBER_BANDS_KW = "number_bands";
+const char* ossimKeywordNames::NUMBER_ENTRIES_KW = "number_entries";
+const char* ossimKeywordNames::NUMBER_INPUT_BANDS_KW = "number_input_bands";
+const char* ossimKeywordNames::NUMBER_INPUTS_KW = "number_inputs";
+const char* ossimKeywordNames::NUMBER_OUTPUTS_KW = "number_outputs";
+const char* ossimKeywordNames::NUMBER_OUTPUT_BANDS_KW = "number_output_bands";
+const char* ossimKeywordNames::NUMBER_LINES_KW = "number_lines";
+const char* ossimKeywordNames::NUMBER_REDUCED_RES_SETS_KW = "number_reduced_res_sets";
+const char* ossimKeywordNames::NUMBER_SAMPLES_KW = "number_samples";
+const char* ossimKeywordNames::ORIGIN_X_KW = "origin_x";
+const char* ossimKeywordNames::ORIGIN_Y_KW = "origin_y";
+const char* ossimKeywordNames::ORIGIN_LATITUDE_KW = "origin_latitude";
+const char* ossimKeywordNames::ORIGINAL_MAP_UNITS_KW = "original_map_units";
+const char* ossimKeywordNames::OUTPUT_FILE_KW = "output_file";
+const char* ossimKeywordNames::OUTPUT_FILE_PREFIX_KW = "output_file_prefix";
+const char* ossimKeywordNames::OUTPUT_FILE_EXTENSION_KW = "output_file_extension";
+const char* ossimKeywordNames::OUTPUT_TILE_SIZE_KW = "output_tile_size";
+const char* ossimKeywordNames::OVERVIEW_COMPRESSION_QUALITY_KW = "overview_compression_quality";
+const char* ossimKeywordNames::OVERVIEW_COMPRESSION_TYPE_KW = "overview_compression_type";
+const char* ossimKeywordNames::OVERVIEW_FILE_KW  = "overview_file";
+const char* ossimKeywordNames::OVERVIEW_STOP_DIMENSION_KW = "overview_stop_dimension";
+const char* ossimKeywordNames::PCS_CODE_KW = "pcs_code";
+const char* ossimKeywordNames::PEN_COLOR_KW = "pen_color";
+const char* ossimKeywordNames::PHOTOMETRIC_KW    = "photometric";
+const char* ossimKeywordNames::PIXEL_SCALE_XY_KW = "pixel_scale_xy";
+const char* ossimKeywordNames::PIXEL_SCALE_UNITS_KW = "pixel_scale_units";
+const char* ossimKeywordNames::PIXEL_TYPE_KW  = "pixel_type";
+const char* ossimKeywordNames::PLANAR_CONFIG_KW  = "planar_config";
+const char* ossimKeywordNames::POINT_WIDTH_HEIGHT_KW = "point_width_height";
+const char* ossimKeywordNames::PROJECTION_KW     = "projection";
+const char* ossimKeywordNames::QUALITY_KW        = "quality";
+const char* ossimKeywordNames::QUERY_KW = "query";
+const char* ossimKeywordNames::RADIOMETRY_KW = "radiometry";
+const char* ossimKeywordNames::REDUCED_RES_LEVEL_KW = "reduced_res_level";
+const char* ossimKeywordNames::REF_GPT_LAT_KW  = "ref_point_lat";
+const char* ossimKeywordNames::REF_GPT_LON_KW  = "ref_point_lon";
+const char* ossimKeywordNames::REF_GPT_HGT_KW  = "ref_point_hgt";
+const char* ossimKeywordNames::REF_IPT_LINE_KW = "ref_point_line";
+const char* ossimKeywordNames::REF_IPT_SAMP_KW = "ref_point_samp";
+const char* ossimKeywordNames::ROTATION_KW = "rotation";
+const char* ossimKeywordNames::SCALE_PER_PIXEL_X_KW = "scale_per_pixel_x";
+const char* ossimKeywordNames::SCALE_PER_PIXEL_Y_KW = "scale_per_pixel_y";
+const char* ossimKeywordNames::SCALAR_TYPE_KW    = "scalar_type";
+const char* ossimKeywordNames::SCALE_FACTOR_KW   = "scale_factor";
+const char* ossimKeywordNames::SCALE_FACTOR_X_KW = "scale_factor_x";
+const char* ossimKeywordNames::SCALE_FACTOR_Y_KW = "scale_factor_y";
+const char* ossimKeywordNames::SCALE_X_KW = "scale_x";
+const char* ossimKeywordNames::SCALE_Y_KW = "scale_y";
+const char* ossimKeywordNames::SENSOR_ID_KW = "sensor";
+const char* ossimKeywordNames::SRS_NAME_KW = "srs_name";
+const char* ossimKeywordNames::STD_PARALLEL_1_KW = "std_parallel_1";
+const char* ossimKeywordNames::STD_PARALLEL_2_KW = "std_parallel_2";
+const char* ossimKeywordNames::THICKNESS_KW = "thickness";
+const char* ossimKeywordNames::THREADS_KW = "threads";
+const char* ossimKeywordNames::TIE_POINT_EASTING_KW = "tie_point_easting";  // ????
+const char* ossimKeywordNames::TIE_POINT_NORTHING_KW = "tie_point_northing";  // ????
+const char* ossimKeywordNames::TIE_POINT_XY_KW = "tie_point_xy";  // ????
+const char* ossimKeywordNames::TIE_POINT_UNITS_KW = "tie_point_units";
+const char* ossimKeywordNames::TIE_POINT_LAT_KW = "tie_point_lat";
+const char* ossimKeywordNames::TIE_POINT_LON_KW = "tie_point_lon";
+const char* ossimKeywordNames::TILE_SIZE_X_KW = "tile_size_x";
+const char* ossimKeywordNames::TILE_SIZE_Y_KW = "tile_size_y";
+const char* ossimKeywordNames::TILE_SOURCE_KW = "tile_source";
+const char* ossimKeywordNames::TILE_TYPE_KW = "tile_type";
+const char* ossimKeywordNames::TRANSLATION_X_KW = "translation_x";
+const char* ossimKeywordNames::TRANSLATION_Y_KW = "translation_y";
+const char* ossimKeywordNames::TYPE_KW = "type";
+const char* ossimKeywordNames::UL_LAT_KW = "ul_lat";
+const char* ossimKeywordNames::UL_LON_KW = "ul_lon";
+const char* ossimKeywordNames::UNITS_KW = "units";
+const char* ossimKeywordNames::UR_LAT_KW = "ur_lat";
+const char* ossimKeywordNames::UR_LON_KW = "ur_lon";
+const char* ossimKeywordNames::UL_X_KW = "ul_x";
+const char* ossimKeywordNames::UL_Y_KW = "ul_y";
+const char* ossimKeywordNames::UR_X_KW = "ur_x";
+const char* ossimKeywordNames::UR_Y_KW = "ur_y";
+const char* ossimKeywordNames::VALID_VERTICES_KW = "valid_vertices_file";
+const char* ossimKeywordNames::VERTICAL_SIZE_KW = "vertical_size";
+const char* ossimKeywordNames::ZONE_KW = "zone";
+
+ossimKeywordNames::ossimKeywordNames()
+{}
+
+ossimKeywordNames::ossimKeywordNames(const ossimKeywordNames& /* rhs */)
+{}
+
+const ossimKeywordNames& ossimKeywordNames::operator=(const ossimKeywordNames& /* rhs */)
+{
+   return *this;
+}
diff --git a/ossim/src/ossim/base/ossimKeywordlist.cpp b/ossim/src/ossim/base/ossimKeywordlist.cpp
new file mode 100644
index 0000000..25c87e6
--- /dev/null
+++ b/ossim/src/ossim/base/ossimKeywordlist.cpp
@@ -0,0 +1,1411 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Description: This class provides capabilities for keywordlists.
+//
+//********************************************************************
+// $Id: ossimKeywordlist.cpp 23631 2015-11-19 20:40:01Z dburken $
+
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimDirectory.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimRegExp.h>
+#include <ossim/base/ossimTrace.h>
+
+#include <algorithm>
+#include <fstream>
+#include <list>
+#include <sstream>
+#include <utility>
+
+static ossimTrace traceDebug("ossimKeywordlist:debug");
+static const ossim_int32 MAX_LINE_LENGTH = 256;
+static const char NULL_KEY_NOTICE[]
+= "ossimKeywordlist Notice:  Null key passed to method.";
+
+
+#ifdef OSSIM_ID_ENABLED
+static const bool TRACE = false;
+static const char OSSIM_ID[] = "$Id: ossimKeywordlist.cpp 23631 2015-11-19 20:40:01Z dburken $";
+#endif
+
+const std::string ossimKeywordlist::NULL_KW = "";
+
+ossimKeywordlist::ossimKeywordlist(const ossimKeywordlist& src)
+:m_map(src.m_map),
+m_delimiter(src.m_delimiter),
+m_preserveKeyValues(src.m_preserveKeyValues),
+m_expandEnvVars(src.m_expandEnvVars)
+{
+}
+
+ossimKeywordlist::ossimKeywordlist(const std::map<std::string, std::string>& keywordMap)
+:m_map(keywordMap),
+m_delimiter(DEFAULT_DELIMITER),
+m_preserveKeyValues(true),
+m_expandEnvVars(true)
+{
+
+}
+
+ossimKeywordlist::ossimKeywordlist(char delimiter, 
+                                   bool expandEnvVars)
+:
+m_map(),
+m_delimiter(delimiter),
+m_preserveKeyValues(true),
+m_expandEnvVars(expandEnvVars)
+{
+#ifdef OSSIM_ID_ENABLED
+   if (TRACE) ossimNotify(ossimNotifyLevel_DEBUG) << OSSIM_ID << std::endl;
+#endif
+}
+
+ossimKeywordlist::ossimKeywordlist(const char* file,
+                                   char        delimiter,
+                                   bool        ignoreBinaryChars,
+                                   bool        expandEnvVars)
+:
+m_map(),
+m_delimiter(delimiter),
+m_preserveKeyValues(true),
+//m_lineContinuationCharacter('\\'),
+m_expandEnvVars(expandEnvVars)
+{
+   ossimFilename in_file(file);
+   
+   if (!parseFile(in_file, ignoreBinaryChars))
+   {
+      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+   }
+}
+
+ossimKeywordlist::ossimKeywordlist(const ossimFilename& file,
+                                   char                 delimiter,
+                                   bool                 ignoreBinaryChars,
+                                   bool                 expandEnvVars)
+:
+m_map(),
+m_delimiter(delimiter),
+m_preserveKeyValues(true),
+m_expandEnvVars(expandEnvVars)
+
+{
+   if (!parseFile(file, ignoreBinaryChars))
+   {
+      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+   }
+}
+
+ossimKeywordlist::~ossimKeywordlist()
+{
+   m_map.clear();
+}
+
+void ossimKeywordlist::setExpandEnvVarsFlag( bool flag )
+{
+   m_expandEnvVars = flag;
+}
+
+bool ossimKeywordlist::getExpandEnvVarsFlag( void ) const
+{
+   return m_expandEnvVars;
+}
+
+bool ossimKeywordlist::addFile(const char* file)
+{
+   ossimFilename in_file(file);
+   
+   return parseFile(in_file);
+}
+
+bool ossimKeywordlist::addFile(const ossimFilename& file)
+{
+   return parseFile(file);
+}
+
+void ossimKeywordlist::addList(const ossimKeywordlist &src, bool overwrite)
+{
+   KeywordMap::const_iterator i = src.m_map.begin();
+   
+   while (i != src.m_map.end())
+   {
+      addPair( (*i).first, (*i).second, overwrite );
+      i++;
+   }
+}
+
+void ossimKeywordlist::add(const ossimKeywordlist& kwl,
+                           const char* prefix,
+                           bool stripPrefix)
+{
+   std::map<std::string, std::string>::const_iterator iter = kwl.m_map.begin();
+   
+   ossimRegExp regExp;
+   
+   // Check for null prefix.
+   std::string tmpPrefix;
+   if (prefix) tmpPrefix = prefix;
+   
+   regExp.compile(("^("+tmpPrefix+")").c_str());
+   
+   while(iter != kwl.m_map.end())
+   {
+      ossimString newKey;
+      
+      if(regExp.find( (*iter).first.c_str()))
+      {
+         newKey = (*iter).first;
+         if(stripPrefix && prefix)
+         {
+            newKey = newKey.substitute(prefix, "");
+            
+         }
+         
+         addPair(newKey.string(), (*iter).second, true);
+      }
+      ++iter;
+   }
+}
+
+void ossimKeywordlist::add(const char* prefix,
+                           const ossimKeywordlist& kwl,
+                           bool overwrite)
+{
+   std::string p = prefix ? prefix : "";
+   std::map<std::string, std::string>::const_iterator iter = kwl.m_map.begin();
+   while(iter != kwl.m_map.end())
+   {
+      std::string k( p + (*iter).first );
+      addPair( k, (*iter).second, overwrite );
+      ++iter;
+   }
+}
+
+void ossimKeywordlist::addPair(const std::string& key,
+                               const std::string& value,
+                               bool               overwrite)
+{
+   if ( key.size() )
+   {
+      ossimString v = value;
+      if ( m_expandEnvVars == true )
+      {
+         v = v.expandEnvironmentVariable();
+      }
+      
+      KeywordMap::iterator i = getMapEntry(key);
+      
+      if (i == m_map.end())
+      {
+         m_map.insert(std::make_pair(key, v.string()));
+      }
+      else if (overwrite)
+      {
+         (*i).second = v.string();
+      }
+   }
+}
+
+void ossimKeywordlist::addPair(const std::string& prefix,
+                               const std::string& key,
+                               const std::string& value,
+                               bool               overwrite)
+{
+   std::string k(prefix + key);
+   addPair(k, value, overwrite);
+}
+
+void ossimKeywordlist::add(const char* key,
+                           const char* value,
+                           bool        overwrite)
+{
+   if ( key )
+   {
+      std::string k(key);
+      std::string v(value?value:"");
+      addPair(k, v, overwrite);
+   }
+}
+
+void ossimKeywordlist::add(const char* prefix,
+                           const char* key,
+                           const char* value,
+                           bool        overwrite)
+{
+   if ( key )
+   {
+      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
+      std::string v(value ? value : "");
+      addPair(k, v, overwrite);
+   }
+}
+
+void ossimKeywordlist::add(const char* key,
+                           char        value,
+                           bool        overwrite)
+{
+   if ( key )
+   {
+      std::string k(key);
+      std::string v(1, value);
+      addPair(k, v, overwrite);
+   }
+}
+
+void ossimKeywordlist::add(const char* prefix,
+                           const char* key,
+                           char        value,
+                           bool        overwrite)
+{
+   if ( key )
+   {
+      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
+      std::string v(1, value);
+      addPair(k, v, overwrite);
+   }
+}
+
+void ossimKeywordlist::add(const char* key,
+                           ossim_int16 value,
+                           bool overwrite)
+{
+   if ( key )
+   {
+      std::string k(key);
+      std::string v = ossimString::toString(value).string();
+      addPair(k, v, overwrite);
+   }
+}
+
+void ossimKeywordlist::add(const char* prefix,
+                           const char* key,
+                           ossim_int16 value,
+                           bool overwrite)
+{
+   if ( key )
+   {
+      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
+      std::string v = ossimString::toString(value).string();
+      addPair(k, v, overwrite);
+   }
+}
+
+void ossimKeywordlist::add(const char* key,
+                           ossim_uint16 value,
+                           bool overwrite)
+{
+   if ( key )
+   {
+      std::string k(key);
+      std::string v = ossimString::toString(value).string();
+      addPair(k, v, overwrite);
+   }
+}
+
+void ossimKeywordlist::add(const char* prefix,
+                           const char* key,
+                           ossim_uint16 value,
+                           bool overwrite)
+{
+   if ( key )
+   {
+      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
+      std::string v = ossimString::toString(value).string();
+      addPair(k, v, overwrite);
+   }
+}
+
+void ossimKeywordlist::add(const char* key,
+                           ossim_int32 value,
+                           bool overwrite)
+{
+   if ( key )
+   {
+      std::string k(key);
+      std::string v = ossimString::toString(value).string();
+      addPair(k, v, overwrite);
+   }
+}
+
+void ossimKeywordlist::add(const char*  prefix,
+                           const char*  key,
+                           ossim_int32 value,
+                           bool overwrite)
+{
+   if ( key )
+   {
+      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
+      std::string v = ossimString::toString(value).string();
+      addPair(k, v, overwrite);
+   }
+}
+
+void ossimKeywordlist::add(const char* key,
+                           ossim_uint32 value,
+                           bool overwrite)
+{
+   if ( key )
+   {
+      std::string k(key);
+      std::string v = ossimString::toString(value).string();
+      addPair(k, v, overwrite);
+   }
+}
+
+void ossimKeywordlist::add(const char*  prefix,
+                           const char*  key,
+                           ossim_uint32 value,
+                           bool overwrite)
+{
+   if ( key )
+   {
+      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
+      std::string v = ossimString::toString(value).string();
+      addPair(k, v, overwrite);
+   }
+}
+
+void ossimKeywordlist::add(const char* key,
+                           ossim_int64 value,
+                           bool overwrite)
+{
+   if ( key )
+   {
+      std::string k(key);
+      std::string v = ossimString::toString(value).string();
+      addPair(k, v, overwrite);
+   }
+}
+
+void ossimKeywordlist::add(const char*  prefix,
+                           const char*  key,
+                           ossim_int64 value,
+                           bool overwrite)
+{
+   if ( key )
+   {
+      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
+      std::string v = ossimString::toString(value).string();
+      addPair(k, v, overwrite);
+   }
+}
+
+void ossimKeywordlist::add(const char* key,
+                           ossim_uint64 value,
+                           bool overwrite)
+{
+   if ( key )
+   {
+      std::string k(key);
+      std::string v = ossimString::toString(value).string();
+      addPair(k, v, overwrite);
+   }
+}
+
+void ossimKeywordlist::add(const char*  prefix,
+                           const char*  key,
+                           ossim_uint64 value,
+                           bool overwrite)
+{
+   if ( key )
+   {
+      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
+      std::string v = ossimString::toString(value).string();
+      addPair(k, v, overwrite);
+   }
+}
+
+void ossimKeywordlist::add(const char* key,
+                           ossim_float32 value,
+                           bool overwrite,
+                           int precision)
+{
+   if ( key )
+   {
+      std::string k(key);
+      std::string v = ossimString::toString(value, precision).string();
+      addPair(k, v, overwrite);
+   }
+}
+
+void ossimKeywordlist::add(const char* prefix,
+                           const char* key,
+                           ossim_float32 value,
+                           bool overwrite,
+                           int precision)
+{
+   if ( key )
+   {
+      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
+      std::string v = ossimString::toString(value, precision).string();
+      addPair(k, v, overwrite);
+   }
+}
+
+void ossimKeywordlist::add(const char* key,
+                           ossim_float64 value,
+                           bool overwrite,
+                           int precision)
+{
+   if ( key )
+   {
+      std::string k(key);
+      std::string v = ossimString::toString(value, precision).string();
+      addPair(k, v, overwrite);
+   }
+}
+
+void ossimKeywordlist::add(const char* prefix,
+                           const char* key,
+                           ossim_float64 value,
+                           bool overwrite,
+                           int precision)
+{
+   if ( key )
+   {
+      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
+      std::string v = ossimString::toString(value, precision).string();
+      addPair(k, v, overwrite);
+   }
+}
+
+bool ossimKeywordlist::write(const char* file, 
+                             const char* comment) const
+{
+   std::ofstream filename(file);
+   if (!filename)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+      <<"ossimKeywordlist::write, Error opening file:  "
+      << file << std::endl;
+      return false;
+   }
+   
+   if ( comment != 0 )
+   {
+      ossimString commentStr("// ");
+      commentStr += comment;
+      
+      // Write out the input comment to the first line.
+      filename << commentStr.c_str() << std::endl;
+   }
+   
+   writeToStream(filename);
+   
+   filename.close();
+   
+   return true;
+}
+
+ossimString ossimKeywordlist::toString()const
+{
+   std::ostringstream out;
+   writeToStream(out);
+   
+#if 0
+   KeywordMap::const_iterator i;
+   ossimString result;
+   
+   for(i = m_map.begin(); i != m_map.end(); i++)
+   {
+      result += (*i).first;
+      result += delimiter_str().c_str();
+      result += " ";
+      result += (*i).second;
+      result += '\n';
+   }
+#endif
+   return ossimString(out.str());
+}
+
+void ossimKeywordlist::toString(ossimString& result)const
+{
+   std::ostringstream out;
+   writeToStream(out);
+   
+   result = out.str();
+#if 0
+   KeywordMap::const_iterator i;
+   
+   for(i = m_map.begin(); i != m_map.end(); i++)
+   {
+      result += (*i).first;
+      result += delimiter_str().c_str();
+      result += " ";
+      result += (*i).second;
+      result += '\n';
+   }
+#endif
+}
+
+void ossimKeywordlist::writeToStream(std::ostream& out) const
+{
+   KeywordMap::const_iterator i;
+   ossimString value;
+   ossimRegExp reg("\n|\r| $|^ ");
+   for(i = m_map.begin(); i != m_map.end(); ++i)
+   {
+      value = (*i).second;
+      if(!value.empty())
+      {
+         if(reg.find(value))
+         {
+            value = "\"\"\"" + value + "\"\"\"";
+         }
+      }
+      //      value = value.substitute('\n', "\\\n", true);
+      out << (*i).first  << delimiter_str().c_str() << "  "
+      << value << std::endl;
+   }
+}
+
+bool ossimKeywordlist::hasKey( const std::string& key ) const
+{
+   bool result = false;
+   KeywordMap::const_iterator i = m_map.find(key);
+   if (i != m_map.end())
+   {
+      result = true;
+   }
+   return result;
+}
+
+const std::string& ossimKeywordlist::findKey(const std::string& key) const
+{
+   // std::string result;
+   KeywordMap::const_iterator i = m_map.find(key);
+   if (i != m_map.end())
+   {
+      // result = (*i).second;
+      return (*i).second;
+   }
+   return ossimKeywordlist::NULL_KW;
+}
+
+const std::string& ossimKeywordlist::findKey(const std::string& prefix,
+                                             const std::string& key) const
+{
+   std::string k = prefix+key;
+   return findKey(k);
+}
+
+const char* ossimKeywordlist::find(const char* key) const
+{
+   const char* result = 0;
+   if (key)
+   {
+      std::string k = key;
+      KeywordMap::const_iterator i = m_map.find( k );
+      if (i != m_map.end())
+      {
+         result = (*i).second.c_str();
+      }
+   }
+   return result;
+}
+
+const char* ossimKeywordlist::find(const char* prefix,
+                                   const char* key) const
+{
+   const char* result = 0;
+   if (key)
+   {
+      std::string k;
+      if (prefix) k = prefix;
+      k += key;
+      KeywordMap::const_iterator i = m_map.find( k );
+      if (i != m_map.end())
+      {
+         result = (*i).second.c_str();
+      }
+   }
+   return result;
+}
+
+void ossimKeywordlist::remove(const char * key)
+{
+   ossimString k = key?key:"";
+   
+   KeywordMap::iterator i = m_map.find(k);
+   
+   if(i != m_map.end())
+   {
+      m_map.erase(i);
+   }
+}
+
+void ossimKeywordlist::remove(const char* prefix, const char * key)
+{
+   if (key)
+   {
+      ossimString k;
+      if (prefix) k = prefix;
+      k += key;
+      
+      KeywordMap::iterator i = m_map.find(k);
+      
+      if(i != m_map.end())
+      {
+         m_map.erase(i);
+      }
+   }
+}
+
+ossim_uint32 ossimKeywordlist::numberOf(const char* str) const
+{
+   ossim_uint32 count = 0;
+   
+   if (str)
+   {
+      KeywordMap::const_iterator i = m_map.begin();
+      
+      while (i != m_map.end())
+      {
+         if ( ossimString((*i).first).contains(str) )
+         {
+            ++count;
+         }
+         ++i;
+      }
+   }
+   
+   return count;
+}
+
+ossim_uint32 ossimKeywordlist::numberOf(const char* prefix,
+                                        const char* key) const
+{
+   if ( key ) // Must have key, sometimes no prefix.
+   {
+      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
+      return numberOf(k.c_str());
+   }
+   return 0;
+}
+
+void ossimKeywordlist::clear()
+{
+   m_map.clear();
+}
+
+ossimKeywordlist::KeywordMap::iterator
+ossimKeywordlist::getMapEntry(const char* key)
+{
+   if (key)
+   {
+      std::string k = key;
+      return m_map.find(k);
+   }
+   else
+   {
+      return m_map.end();
+   }
+}
+
+ossimKeywordlist::KeywordMap::iterator
+ossimKeywordlist::getMapEntry(const std::string& key)
+{
+   return m_map.find(key);
+}
+
+ossimKeywordlist::KeywordMap::iterator
+ossimKeywordlist::getMapEntry(const ossimString& key)
+{
+   return m_map.find(key.string());
+}
+
+
+//*******************************************************************
+// Private Method:
+//*******************************************************************
+bool ossimKeywordlist::parseFile(const ossimFilename& file,
+                                 bool ignoreBinaryChars)
+{
+   if(!file.exists()) return false;
+   bool result = false;
+   std::ifstream is;
+   is.open(file.c_str(), std::ios::in | std::ios::binary);
+   
+   if(!is.fail())
+   {
+      result = parseStream(is, ignoreBinaryChars);
+   }
+   
+   is.close();
+   
+   return result;
+}
+
+bool ossimKeywordlist::parseStream(std::istream& is, bool /* ignoreBinaryChars */)
+{
+   return parseStream(is);
+}
+
+bool ossimKeywordlist::parseString(const std::string& inString)
+{
+   std::istringstream in(inString);
+   
+   return parseStream(in);
+}
+
+bool ossimKeywordlist::isValidKeywordlistCharacter(ossim_uint8 c)const
+{
+   if((c>=0x20&&c<=0x7e))
+   {
+      return true;
+   }
+   switch(c)
+   {
+      case '\n':
+      case '\r':
+      case '\t':
+         return true;
+   }
+   return false;
+}
+
+void ossimKeywordlist::skipWhitespace(std::istream& in)const
+{
+   int c = in.peek();
+   while( !in.fail() &&
+         ( (c == ' ') || (c == '\t') || (c == '\n') || (c == '\r') ) )
+   {
+      in.ignore(1);
+      c = in.peek();
+   }
+}
+
+ossimKeywordlist::KeywordlistParseState ossimKeywordlist::readComments(ossimString& sequence, std::istream& in)const
+{
+   KeywordlistParseState result = KeywordlistParseState_FAIL;
+   char c = (char)in.peek();
+   if(c == '/')
+   {
+      sequence += (char)in.get();
+      c = in.peek();
+      if(c == '/')
+      {
+         result = KeywordlistParseState_OK;
+         sequence += c;
+         while(!in.bad()&&!in.eof())
+         {
+            c = (char)in.get();
+            if(!isValidKeywordlistCharacter(c))
+            {
+               result = KeywordlistParseState_BAD_STREAM;
+               break;
+            }
+            if((c == '\n')||
+               (c == '\r'))
+            {
+               break;
+            }
+            sequence += c;
+         }
+      }
+   }
+   return result;
+}
+
+ossimKeywordlist::KeywordlistParseState ossimKeywordlist::readKey(ossimString& sequence, std::istream& in)const
+{
+   KeywordlistParseState result = KeywordlistParseState_FAIL;
+   if(!sequence.empty())
+   {
+      if(*(sequence.begin()+(sequence.size()-1)) == m_delimiter)
+      {
+         sequence = ossimString(sequence.begin(), sequence.begin() + (sequence.size()-1));
+         return KeywordlistParseState_OK;
+      }
+   }
+   // not a comment so read til key delimeter
+   while(!in.eof() && in.good())
+   {
+      ossim_uint8 c = in.get();
+      if( isValidKeywordlistCharacter(c) )
+      {
+         if ( (c == '\n') || (c == '\r') ) 
+         {
+            // Hit end of line with no delimiter.
+            if ( in.peek() == EOF )
+            {
+               //---
+               // Allowing on last line only.
+               // Note the empty key will trigger parseStream to return true.
+               //---
+               sequence.clear();
+               result = KeywordlistParseState_OK;
+               break;
+            }
+            else // Line with no delimiter.
+            {
+               // mal formed input stream for keyword list specification
+               result = KeywordlistParseState_BAD_STREAM;
+               break;
+            }
+         }
+         else if(c != m_delimiter)
+         {
+            sequence += (char)c;
+         }
+         else // at m_delimiter
+         {
+            result = KeywordlistParseState_OK;
+            sequence = sequence.trim();
+            break;
+         }
+      }
+      else 
+      {
+         // mal formed input stream for keyword list specification
+         result = KeywordlistParseState_BAD_STREAM;
+         break;
+      }
+   }
+   // we never found a delimeter so we are mal formed
+   if(!sequence.empty()&&(result!=KeywordlistParseState_OK))
+   {
+      result = KeywordlistParseState_BAD_STREAM;
+   }
+   return result;
+}
+
+ossimKeywordlist::KeywordlistParseState ossimKeywordlist::readValue(ossimString& sequence, std::istream& in)const
+{
+   KeywordlistParseState result = KeywordlistParseState_OK;
+   
+   ossim_int32 quoteCount = 0; // mark as not set
+   
+   // make sure we check for a blank value
+   while(!in.eof()&&!in.bad())
+   {
+      if(in.peek() == ' '||
+         in.peek() == '\t')
+      {
+         in.ignore();
+      }
+      else if(in.peek() == '\n' ||
+              in.peek() == '\r')
+      {
+         in.ignore();
+         return result;
+      }
+      else 
+      {
+         break;
+      }
+   }
+   // The ifstream object will end in '�' (character 255 or -1) if the end-of-file indicator 
+   // will not be set(e.g \n). In this case, end-of-file conditions would never be detected. 
+   // add EOF (which is actually the integer -1 or 255) check here.
+   // Reference link http://www.cplusplus.com/forum/general/33821/
+   while(!in.eof()&&!in.bad()&&in.peek()!=EOF)
+   {
+      ossim_uint8 c = in.get();
+      if(isValidKeywordlistCharacter(c))
+      {
+         if(((c == '\n'||c=='\r') && !quoteCount) || in.eof())
+         {
+            break;
+         }
+         sequence += (char)c;
+         if(sequence.size() >2)
+         {
+            if(quoteCount < 1)
+            {
+               //---
+               // If string has leading tripple quoted bump the "quoteCount" so
+               // we start skipping line breaks, preserving paragraph style strings.
+               //---
+               if(ossimString(sequence.begin(), sequence.begin()+3) == "\"\"\"")
+               {
+                  ++quoteCount;
+               }
+            }
+            else // check for ending quotes 
+            {
+               if(ossimString(sequence.begin() + sequence.size()-3, sequence.end()) == "\"\"\"")
+               {
+                  ++quoteCount;
+               }
+            }
+         }
+         if(quoteCount > 1)
+         {
+            //---
+            // Have leading and trailing tripple quotes. Some tiff writers, e.g. Space
+            // Imaging are using four quotes.  Below code strips all quotes from each end.
+            //---
+            char quote = '"';
+            std::string::size_type startPos = sequence.string().find_first_not_of(quote);
+            std::string::size_type stopPos  = sequence.string().find_last_not_of(quote);
+            if ( ( startPos != std::string::npos ) && (stopPos != std::string::npos) )
+            {
+               sequence = sequence.string().substr( startPos, stopPos-startPos+1 );
+            }
+            break;
+         }
+      }
+      else 
+      {
+         result = KeywordlistParseState_BAD_STREAM;
+         break;
+      }
+   }
+   return result;
+}
+
+ossimKeywordlist::KeywordlistParseState ossimKeywordlist::readKeyAndValuePair(ossimString& key, ossimString& value, std::istream& in)const
+{
+   ossimKeywordlist::KeywordlistParseState keyState   = readKey(key, in);
+   if(keyState & KeywordlistParseState_BAD_STREAM) return keyState;
+   ossimKeywordlist::KeywordlistParseState valueState = readValue(value, in);
+   return static_cast<ossimKeywordlist::KeywordlistParseState>( (static_cast<int>(keyState) |
+                                                                 static_cast<int>(valueState)) );
+}
+
+bool ossimKeywordlist::parseStream(std::istream& is)
+{
+   if (!is) // Check stream state.
+   {
+      return false;
+   }
+   ossimString key;
+   ossimString value;
+   ossimString sequence;
+   KeywordlistParseState state = KeywordlistParseState_OK;
+   while(!is.eof() && !is.bad())
+   {
+      skipWhitespace(is);
+      if(is.eof() || is.bad()) return true; // we skipped to end so valid keyword list
+      state = readComments(sequence, is);
+      if(state & KeywordlistParseState_BAD_STREAM) return false;
+      // if we failed a comment parse then try key value parse.
+      if(state == KeywordlistParseState_FAIL)
+      {
+         key = sequence; // just in case there is a 1 token look ahead residual for a single slash test.
+         ossimKeywordlist::KeywordlistParseState testKeyValueState = readKeyAndValuePair(key, value, is);
+         if(testKeyValueState == KeywordlistParseState_OK)
+         {
+            key = key.trim();
+            if(key.empty())
+            {
+               return true;
+            }
+            if ( m_expandEnvVars == true )
+            {
+               ossimString result = value.expandEnvironmentVariable();
+               m_map.insert(std::make_pair(key.string(), result.string()));
+            }
+            else
+            {
+               m_map.insert(std::make_pair(key.string(), value.string()));
+            }
+         }
+         else if(testKeyValueState & KeywordlistParseState_BAD_STREAM)
+         {
+            return false;
+         }
+#if 0
+         // Commented out to allow an invalid line in keyword list without
+         // erroring out, effectively skipping bad line. drb - 01 Sep. 2001
+         else
+         {
+            return false;
+         }
+#endif
+      }
+      else if(state & KeywordlistParseState_BAD_STREAM)
+      {
+         return false;
+      }
+      sequence = key = value = "";
+   }   
+   
+   return true;
+}
+
+std::vector<ossimString> ossimKeywordlist::findAllKeysThatContains(const ossimString &searchString)const
+{
+   KeywordMap::const_iterator i;
+   std::vector<ossimString> result;
+   
+   for(i = m_map.begin(); i != m_map.end(); ++i)
+   {
+      if( ossimString((*i).first).contains(searchString))
+      {
+         result.push_back((*i).first);
+      }
+   }
+   
+   return result;
+}
+
+void ossimKeywordlist::findAllKeysThatMatch( std::vector<ossimString>& result,
+                                             const ossimString &regularExpression ) const
+{
+   KeywordMap::const_iterator i;
+   ossimRegExp regExp;
+   regExp.compile(regularExpression.c_str());
+   for(i = m_map.begin(); i != m_map.end(); ++i)
+   {
+      if(regExp.find( (*i).first.c_str()))
+      {
+         result.push_back((*i).first);
+      }
+   }
+}
+
+ossim_uint32  ossimKeywordlist::getNumberOfKeysThatMatch(
+   const ossimString &regularExpression ) const
+{
+   ossim_uint32 result = 0;
+   KeywordMap::const_iterator i;
+   ossimRegExp regExp;
+   regExp.compile(regularExpression.c_str());
+   for(i = m_map.begin(); i != m_map.end(); ++i)
+   {
+      if(regExp.find( (*i).first.c_str()))
+      {
+         ++result;
+      }
+   }
+   return result;
+}
+
+void ossimKeywordlist::extractKeysThatMatch(ossimKeywordlist& kwl,
+                                            const ossimString &regularExpression)const
+{
+   KeywordMap::const_iterator i;
+   std::vector<ossimString> result;
+   ossimRegExp regExp;
+   
+   regExp.compile(regularExpression.c_str());
+   
+   for(i = m_map.begin(); i != m_map.end(); ++i)
+   {
+      if(regExp.find( (*i).first.c_str()))
+      {
+         kwl.addPair((*i).first, (*i).second);
+      }
+   }
+}
+
+void ossimKeywordlist::removeKeysThatMatch(const ossimString &regularExpression)
+{
+   KeywordMap::const_iterator i;
+   std::vector<ossimString> result;
+   ossimRegExp regExp;
+   
+   regExp.compile(regularExpression.c_str());
+   
+   for(i = m_map.begin(); i != m_map.end(); ++i)
+   {
+      if(regExp.find( (*i).first.c_str()))
+      {
+         result.push_back((*i).first);
+      }
+   }
+   for(ossim_uint32 i2 = 0; i2 < result.size(); ++i2)
+   {
+      remove(result[i2]);
+   }
+}
+
+std::vector<ossimString> ossimKeywordlist::getSubstringKeyList(const ossimString& regularExpression)const
+{
+   std::vector<ossimString> result;
+   getSubstringKeyList(result, regularExpression);
+   return result;
+}
+
+void ossimKeywordlist::getSubstringKeyList(std::vector<ossimString>& result,
+                                           const ossimString& regularExpression)const
+{
+   KeywordMap::const_iterator i;
+   ossimRegExp regExp;
+   
+   regExp.compile(regularExpression.c_str());
+   
+   for(i = m_map.begin(); i != m_map.end(); ++i)
+   {
+      if(regExp.find( (*i).first.c_str()))
+      {
+         ossimString value = ossimString((*i).first.begin()+regExp.start(),
+                                         (*i).first.begin()+regExp.start()+regExp.end());
+         
+         if(std::find(result.begin(), result.end(), value) == result.end())
+         {
+            result.push_back(value);
+         }
+      }
+   }
+}
+
+ossim_uint32 ossimKeywordlist::getNumberOfSubstringKeys(const ossimString& regularExpression)const
+{
+   KeywordMap::const_iterator i;
+   std::list<ossimString> currentList;
+   ossim_uint32 result = 0;
+   ossimRegExp regExp;
+   
+   regExp.compile(regularExpression.c_str());
+   
+   for(i = m_map.begin(); i != m_map.end(); ++i)
+   {
+      if(regExp.find( (*i).first.c_str()))
+      {
+         ossimString value = ossimString((*i).first.begin()+regExp.start(),
+                                         (*i).first.begin()+regExp.start()+regExp.end());
+         
+         // make sure we have not already marked it as
+         // found
+         if(std::find(currentList.begin(),
+                      currentList.end(),
+                      value) == currentList.end())
+         {
+            currentList.push_back(value);
+            ++result;
+         }
+      }
+   }
+   
+   return result;
+}
+
+void ossimKeywordlist::addPrefixToAll(const ossimString& prefix)
+{
+   ossimKeywordlist tempKwl = *this;
+   
+   clear();
+   
+   KeywordMap::const_iterator values = tempKwl.m_map.begin();
+   
+   while(values != tempKwl.m_map.end())
+   {
+      std::string newKey = prefix.string() + (*values).first;
+      addPair(newKey, (*values).second, true);
+      ++values;
+   }
+}
+
+void ossimKeywordlist::addPrefixToKeysThatMatch(const ossimString& prefix,
+                                                const ossimString& regularExpression)
+{
+   ossimKeywordlist tempKwl = *this;
+   
+   clear();
+   
+   KeywordMap::const_iterator values = tempKwl.m_map.begin();
+   ossimRegExp regExp;
+   
+   regExp.compile(regularExpression.c_str());
+   
+   while(values != tempKwl.m_map.end())
+   {
+      std::string newKey = prefix.string()+(*values).first;
+      if(regExp.find( (*values).first.c_str()))
+      {
+         
+         addPair(newKey, (*values).second, true);
+      }
+      else
+      {
+         addPair((*values).first, (*values).second, true);
+      }
+      ++values;
+   }
+}
+
+void ossimKeywordlist::stripPrefixFromAll(const ossimString& regularExpression)
+{
+   ossimKeywordlist tempKwl = *this;
+   
+   clear();
+   
+   KeywordMap::const_iterator values = tempKwl.m_map.begin();
+   ossimRegExp regExp;
+   
+   regExp.compile(regularExpression.c_str());
+   
+   while(values != tempKwl.m_map.end())
+   {
+      std::string newKey = (*values).first;
+      if(regExp.find( (*values).first.c_str()))
+      {
+         newKey.erase(newKey.begin()+regExp.start(),
+                      newKey.begin()+regExp.start()+regExp.end());
+         
+         addPair(newKey, (*values).second, true);
+      }
+      else
+      {
+         addPair(newKey, (*values).second, true);
+      }
+      ++values;
+   }
+}
+
+ossim_uint32 ossimKeywordlist::getSize()const
+{
+   return (ossim_uint32)m_map.size();
+}
+
+const ossimKeywordlist::KeywordMap& ossimKeywordlist::getMap()const
+{
+   return m_map;
+}
+
+ossimKeywordlist::KeywordMap& ossimKeywordlist::getMap()
+{
+   return m_map;
+}
+
+void ossimKeywordlist::change_delimiter(char del)
+{
+   m_delimiter = del;
+}
+
+ossimString ossimKeywordlist::delimiter_str() const
+{
+   char tmp[2];
+   tmp[0] = m_delimiter;
+   tmp[1] = '\0';
+   return ossimString(tmp);
+}
+
+//*******************************************************************
+// Public Method:
+//*******************************************************************
+std::ostream& ossimKeywordlist::print(std::ostream& os) const
+{
+   writeToStream(os);
+#if 0
+   KeywordMap::const_iterator i;
+   
+   for(i = m_map.begin(); i != m_map.end(); ++i)
+   {
+      os << (*i).first << delimiter_str().c_str() << "  "
+      << (*i).second << std::endl;
+   }
+#endif
+   return os;
+}
+
+//*******************************************************************
+// friend function:
+//*******************************************************************
+OSSIMDLLEXPORT std::ostream& operator<<(std::ostream& os,
+                                        const ossimKeywordlist& kwl)
+{
+   kwl.print(os);
+   
+   return os;
+}
+
+
+bool ossimKeywordlist::operator ==(ossimKeywordlist& kwl)const
+{
+   if(this==&kwl) return true;
+   std::map<std::string, std::string>::const_iterator iter = m_map.begin();
+   
+   while(iter != m_map.end())
+   {
+      const char* value = kwl.find((*iter).first.c_str());
+      
+      if(ossimString(value) != (*iter).second)
+      {
+         return false;
+      }
+      ++iter;
+   }
+   
+   return true;
+}
+
+ossimKeywordlist&  ossimKeywordlist::downcaseKeywords()
+{
+   KeywordMap tempMap;
+   KeywordMap::iterator iter = m_map.begin();
+   
+   while(iter != m_map.end())
+   {
+      ossimString k(iter->first);
+      tempMap.insert(std::make_pair(k.downcase().string(), iter->second));
+      ++iter;
+   }
+   m_map = tempMap;
+   
+   return *this;
+}
+
+ossimKeywordlist& ossimKeywordlist::upcaseKeywords()
+{
+   KeywordMap tempMap;
+   KeywordMap::iterator iter = m_map.begin();
+   
+   while(iter != m_map.end())
+   {
+      ossimString k(iter->first);
+      tempMap.insert(std::make_pair(k.upcase().string(), iter->second));
+      ++iter;
+   }
+   m_map = tempMap;
+   
+   return *this;
+}
+
+ossimKeywordlist& ossimKeywordlist::trimAllValues(const ossimString& valueToTrim)
+{
+   KeywordMap::iterator iter = m_map.begin();
+   
+   while(iter != m_map.end())
+   {
+      iter->second = ossimString(iter->second).trim(valueToTrim).string();
+      ++iter;
+   }
+   
+   return *this;
+}
+
+ossimKeywordlist ossimKeywordlist::trimAllValues(const ossimString& valueToTrim)const
+{
+   ossimKeywordlist result(*this);
+   result.trimAllValues(valueToTrim);
+   return result;
+}
+
+
+//*************************************************************************************************
+//! [OLK, Aug/2008]
+//! Sets the boolean destination arg depending on value associated with keyword for values = 
+//! (yes|no|true|false|1|0). Returns TRUE if keyword found, otherwise false. Also returns false
+//! if none of the above permitted values are specified (rtn_val left unchanged in this case).
+//*************************************************************************************************
+bool ossimKeywordlist::getBoolKeywordValue(bool& rtn_val, 
+                                           const char* keyword, 
+                                           const char* prefix) const
+{
+   bool found = true;
+   const char* val_str = find(prefix, keyword);
+   if (val_str) 
+   {
+      found = true;
+      ossimString yesno (val_str);
+      yesno.upcase();
+      if ((yesno == "YES") || (yesno == "TRUE") || (yesno == "1"))
+         rtn_val = true;
+      else if ((yesno == "NO") || (yesno == "FALSE") || (yesno == "0"))
+         rtn_val = false;
+      else
+         found = false;
+   }
+   else
+      found = false;
+   
+   return found;
+}
+
diff --git a/src/ossim/base/ossimLagrangeInterpolator.cpp b/ossim/src/ossim/base/ossimLagrangeInterpolator.cpp
similarity index 100%
rename from src/ossim/base/ossimLagrangeInterpolator.cpp
rename to ossim/src/ossim/base/ossimLagrangeInterpolator.cpp
diff --git a/src/ossim/base/ossimLeastSquaresBilin.cpp b/ossim/src/ossim/base/ossimLeastSquaresBilin.cpp
similarity index 100%
rename from src/ossim/base/ossimLeastSquaresBilin.cpp
rename to ossim/src/ossim/base/ossimLeastSquaresBilin.cpp
diff --git a/ossim/src/ossim/base/ossimLeastSquaresPlane.cpp b/ossim/src/ossim/base/ossimLeastSquaresPlane.cpp
new file mode 100644
index 0000000..e794abe
--- /dev/null
+++ b/ossim/src/ossim/base/ossimLeastSquaresPlane.cpp
@@ -0,0 +1,128 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Description: Source code produced by Dave Knopp
+//
+//*******************************************************************
+//  $Id: ossimLeastSquaresPlane.cpp 23167 2015-02-24 22:07:14Z okramer $
+
+#include <ossim/base/ossimLeastSquaresPlane.h>
+#include <iostream>  // for debugging
+#include <ossim/base/ossimNotifyContext.h>
+
+using namespace std;
+
+ossimLeastSquaresPlane::ossimLeastSquaresPlane()
+: m_a(0.0),
+  m_b(0.0),
+  m_c(0.0),
+  AtA(NULL),
+  Atb(NULL),
+  m_numSamples(0)
+{
+   // allocate normal system accumulation matrices
+   AtA = new NEWMAT::Matrix(3,3);
+   Atb = new NEWMAT::Matrix(3,1);
+   
+   // ensure initilization to zero
+   *AtA = 0.0;
+   *Atb = 0.0;
+   
+   return;
+}
+
+ossimLeastSquaresPlane::ossimLeastSquaresPlane(const ossimLeastSquaresPlane &rhs)
+{
+   // allocate normal system accumulation matrices
+   AtA = new NEWMAT::Matrix(3,3);
+   Atb = new NEWMAT::Matrix(3,1);
+
+   m_a = rhs.m_a;
+   m_b = rhs.m_b;
+   m_c = rhs.m_c;
+   
+   *AtA  = *rhs.AtA;
+   *Atb  = *rhs.Atb;
+}
+
+ossimLeastSquaresPlane::~ossimLeastSquaresPlane()
+{
+   if(AtA)
+   {
+      delete AtA;
+      AtA = NULL;
+   }
+   if(Atb)
+   {
+      delete Atb;
+      Atb = NULL;
+   }
+}
+ossimLeastSquaresPlane & ossimLeastSquaresPlane::operator = (const ossimLeastSquaresPlane &rhs)
+{
+   m_a    = rhs.m_a;
+   m_b    = rhs.m_b;
+   m_c    = rhs.m_c;
+   
+   *AtA    = *rhs.AtA;
+   *Atb    = *rhs.Atb;
+   
+   return *this;
+}
+
+void ossimLeastSquaresPlane::clear()
+{
+   *AtA    = 0.0;
+   *Atb    = 0.0;  
+   m_a    = 0.0;
+   m_b    = 0.0;
+   m_c    = 0.0;
+}
+
+void ossimLeastSquaresPlane::addSample(double xx, double yy, double zmea)
+{
+   // form normal system layer
+   NEWMAT::Matrix AtA_layer(3,1);
+   AtA_layer(1,1) = xx;
+   AtA_layer(2,1) = yy;
+   AtA_layer(3,1) = 1.0;
+   
+   // accumulate layer into normal system
+   *AtA += AtA_layer * AtA_layer.t();
+   *Atb += AtA_layer * zmea;
+
+   ++m_numSamples;
+}
+
+bool ossimLeastSquaresPlane::solveLS()
+{
+   if (m_numSamples < 3)
+      return false;
+
+   NEWMAT::Matrix Soln(3,1);
+   Soln = AtA->i() * (*Atb);
+   m_a = Soln(1,1);
+   m_b = Soln(2,1);
+   m_c = Soln(3,1);
+   
+   return true;
+}
+
+bool ossimLeastSquaresPlane::getLSParms(double& pa, double& pb, double& pc) const
+{
+   pa = m_a;
+   pb = m_b;
+   pc = m_c;
+   
+   return true;
+}
+
+void ossimLeastSquaresPlane::setLSParams(double pa, double pb, double pc)
+{
+   m_a = pa;
+   m_b = pb;
+   m_c = pc;
+}
+
+                 
diff --git a/src/ossim/base/ossimLine.cpp b/ossim/src/ossim/base/ossimLine.cpp
similarity index 100%
rename from src/ossim/base/ossimLine.cpp
rename to ossim/src/ossim/base/ossimLine.cpp
diff --git a/ossim/src/ossim/base/ossimListener.cpp b/ossim/src/ossim/base/ossimListener.cpp
new file mode 100644
index 0000000..4127f24
--- /dev/null
+++ b/ossim/src/ossim/base/ossimListener.cpp
@@ -0,0 +1,52 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author:  Garrett Potts 
+//
+//*******************************************************************
+//  $Id: ossimListener.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/base/ossimListener.h>
+
+RTTI_DEF(ossimListener, "ossimListener");
+
+ossimListener::ossimListener()
+  :theListenerEnableFlag(true)
+{}
+
+ossimListener::~ossimListener()
+{
+}
+
+void ossimListener::processEvent(ossimEvent& /* event */)
+{
+}
+
+void ossimListener::enableListener()
+{
+  theListenerEnableFlag = true;
+}
+
+void ossimListener::disableListener()
+{
+  theListenerEnableFlag = false;
+}
+
+void ossimListener::setListenerEnableFlag(bool flag)
+{
+  theListenerEnableFlag = flag;
+}
+
+bool ossimListener::isListenerEnabled()const
+{
+  return theListenerEnableFlag;
+}
+
+bool ossimListener::getListenerEnableFlag()const
+{
+  return theListenerEnableFlag;
+}
+
diff --git a/src/ossim/base/ossimListenerManager.cpp b/ossim/src/ossim/base/ossimListenerManager.cpp
similarity index 100%
rename from src/ossim/base/ossimListenerManager.cpp
rename to ossim/src/ossim/base/ossimListenerManager.cpp
diff --git a/src/ossim/base/ossimLookUpTable.cpp b/ossim/src/ossim/base/ossimLookUpTable.cpp
similarity index 100%
rename from src/ossim/base/ossimLookUpTable.cpp
rename to ossim/src/ossim/base/ossimLookUpTable.cpp
diff --git a/src/ossim/base/ossimLsrPoint.cpp b/ossim/src/ossim/base/ossimLsrPoint.cpp
similarity index 100%
rename from src/ossim/base/ossimLsrPoint.cpp
rename to ossim/src/ossim/base/ossimLsrPoint.cpp
diff --git a/src/ossim/base/ossimLsrRay.cpp b/ossim/src/ossim/base/ossimLsrRay.cpp
similarity index 100%
rename from src/ossim/base/ossimLsrRay.cpp
rename to ossim/src/ossim/base/ossimLsrRay.cpp
diff --git a/src/ossim/base/ossimLsrSpace.cpp b/ossim/src/ossim/base/ossimLsrSpace.cpp
similarity index 100%
rename from src/ossim/base/ossimLsrSpace.cpp
rename to ossim/src/ossim/base/ossimLsrSpace.cpp
diff --git a/src/ossim/base/ossimLsrVector.cpp b/ossim/src/ossim/base/ossimLsrVector.cpp
similarity index 100%
rename from src/ossim/base/ossimLsrVector.cpp
rename to ossim/src/ossim/base/ossimLsrVector.cpp
diff --git a/src/ossim/base/ossimMatrix3x3.cpp b/ossim/src/ossim/base/ossimMatrix3x3.cpp
similarity index 100%
rename from src/ossim/base/ossimMatrix3x3.cpp
rename to ossim/src/ossim/base/ossimMatrix3x3.cpp
diff --git a/src/ossim/base/ossimMatrix4x4.cpp b/ossim/src/ossim/base/ossimMatrix4x4.cpp
similarity index 100%
rename from src/ossim/base/ossimMatrix4x4.cpp
rename to ossim/src/ossim/base/ossimMatrix4x4.cpp
diff --git a/src/ossim/base/ossimMatrixProperty.cpp b/ossim/src/ossim/base/ossimMatrixProperty.cpp
similarity index 100%
rename from src/ossim/base/ossimMatrixProperty.cpp
rename to ossim/src/ossim/base/ossimMatrixProperty.cpp
diff --git a/src/ossim/base/ossimMouseEvent.cpp b/ossim/src/ossim/base/ossimMouseEvent.cpp
similarity index 100%
rename from src/ossim/base/ossimMouseEvent.cpp
rename to ossim/src/ossim/base/ossimMouseEvent.cpp
diff --git a/src/ossim/base/ossimMouseListener.cpp b/ossim/src/ossim/base/ossimMouseListener.cpp
similarity index 100%
rename from src/ossim/base/ossimMouseListener.cpp
rename to ossim/src/ossim/base/ossimMouseListener.cpp
diff --git a/src/ossim/base/ossimMultiBandHistogram.cpp b/ossim/src/ossim/base/ossimMultiBandHistogram.cpp
similarity index 100%
rename from src/ossim/base/ossimMultiBandHistogram.cpp
rename to ossim/src/ossim/base/ossimMultiBandHistogram.cpp
diff --git a/src/ossim/base/ossimMultiResLevelHistogram.cpp b/ossim/src/ossim/base/ossimMultiResLevelHistogram.cpp
similarity index 100%
rename from src/ossim/base/ossimMultiResLevelHistogram.cpp
rename to ossim/src/ossim/base/ossimMultiResLevelHistogram.cpp
diff --git a/src/ossim/base/ossimNBandLutDataObject.cpp b/ossim/src/ossim/base/ossimNBandLutDataObject.cpp
similarity index 100%
rename from src/ossim/base/ossimNBandLutDataObject.cpp
rename to ossim/src/ossim/base/ossimNBandLutDataObject.cpp
diff --git a/src/ossim/base/ossimNadconGridDatum.cpp b/ossim/src/ossim/base/ossimNadconGridDatum.cpp
similarity index 100%
rename from src/ossim/base/ossimNadconGridDatum.cpp
rename to ossim/src/ossim/base/ossimNadconGridDatum.cpp
diff --git a/src/ossim/base/ossimNadconGridFile.cpp b/ossim/src/ossim/base/ossimNadconGridFile.cpp
similarity index 100%
rename from src/ossim/base/ossimNadconGridFile.cpp
rename to ossim/src/ossim/base/ossimNadconGridFile.cpp
diff --git a/src/ossim/base/ossimNadconGridHeader.cpp b/ossim/src/ossim/base/ossimNadconGridHeader.cpp
similarity index 100%
rename from src/ossim/base/ossimNadconGridHeader.cpp
rename to ossim/src/ossim/base/ossimNadconGridHeader.cpp
diff --git a/src/ossim/base/ossimNadconNarDatum.cpp b/ossim/src/ossim/base/ossimNadconNarDatum.cpp
similarity index 100%
rename from src/ossim/base/ossimNadconNarDatum.cpp
rename to ossim/src/ossim/base/ossimNadconNarDatum.cpp
diff --git a/src/ossim/base/ossimNadconNasDatum.cpp b/ossim/src/ossim/base/ossimNadconNasDatum.cpp
similarity index 100%
rename from src/ossim/base/ossimNadconNasDatum.cpp
rename to ossim/src/ossim/base/ossimNadconNasDatum.cpp
diff --git a/ossim/src/ossim/base/ossimNormRgbVector.cpp b/ossim/src/ossim/base/ossimNormRgbVector.cpp
new file mode 100644
index 0000000..f6e97d7
--- /dev/null
+++ b/ossim/src/ossim/base/ossimNormRgbVector.cpp
@@ -0,0 +1,183 @@
+//*******************************************************************
+// Copyright (C) 2005 Garrett Potts
+//
+// License: MIT
+// Author: Garrett Potts 
+// Description:
+//
+//*************************************************************************
+// $Id: ossimNormRgbVector.cpp 23666 2015-12-14 20:01:22Z rashadkm $
+#include <ossim/base/ossimNormRgbVector.h>
+#include <ossim/base/ossimRgbVector.h>
+#include <ossim/base/ossimJpegYCbCrVector.h>
+#include <ossim/base/ossimHsiVector.h>
+#include <ossim/base/ossimHsvVector.h>
+#include <ossim/base/ossimCmyVector.h>
+#include <ossim/base/ossimCommon.h>
+#include <math.h>
+
+ossimNormRgbVector::ossimNormRgbVector(const ossimRgbVector& rgb)
+{
+   theBuf[0] = rgb.getR()/255.0;
+   theBuf[1] = rgb.getG()/255.0;
+   theBuf[2] = rgb.getB()/255.0;
+}
+
+ossimNormRgbVector::ossimNormRgbVector(const ossimJpegYCbCrVector& YCbCr)
+{
+   (*this) = YCbCr;
+   
+}
+
+ossimNormRgbVector::ossimNormRgbVector(const ossimHsiVector& hsi)
+{
+   (*this)=hsi;
+}
+
+ossimNormRgbVector::ossimNormRgbVector(const ossimHsvVector& hsv)
+{
+   (*this) = hsv;
+}
+
+ossimNormRgbVector::ossimNormRgbVector(const ossimCmyVector& cmy)
+{
+   theBuf[0] = 255 - cmy.getC();
+   theBuf[1] = 255 - cmy.getM();
+   theBuf[2] = 255 - cmy.getY();
+}
+
+const ossimNormRgbVector& ossimNormRgbVector::operator =(const ossimHsvVector& hsv)
+{
+   // H is given on [0, 6] or UNDEFINED. S and V are given on [0, 1]. 
+   // RGB are each returned on [0, 1]. 
+   float h = hsv.getH(), // unnormalize it
+         s = hsv.getS(),
+         v = hsv.getV();
+   float m, n, f; 
+   int i; 
+   if(h == ossimHsvVector::OSSIM_HSV_UNDEFINED)
+   {
+      theBuf[0] = clamp(v);
+      theBuf[1] = clamp(v);
+      theBuf[2] = clamp(v);
+   }
+   else
+   {
+      h*=6.0; // unnormalize h
+      i = (int)floor(h); 
+      f = h - i; 
+      if(!(i & 1)) f = 1 - f; // if i is even 
+      m = v * (1 - s); 
+      n = v * (1 - s * f); 
+      switch (i)
+      { 
+      case 6: 
+      case 0:
+      {
+         theBuf[0] = clamp(v);
+         theBuf[1] = clamp(n);
+         theBuf[2] = clamp(m);
+         break;
+      }
+      case 1:
+      {
+         theBuf[0] = clamp(n);
+         theBuf[1] = clamp(v);
+         theBuf[2] = clamp(m);
+         break;
+      }
+      case 2:
+      {
+         theBuf[0] = clamp(m);
+         theBuf[1] = clamp(v);
+         theBuf[2] = clamp(n);
+         break;
+      }
+      case 3: 
+      {
+         theBuf[0] = clamp(m);
+         theBuf[1] = clamp(n);
+         theBuf[2] = clamp(v);
+         break;
+      }
+      case 4:
+      {
+         theBuf[0] = clamp(n);
+         theBuf[1] = clamp(m);
+         theBuf[2] = clamp(v);
+         break;
+      }
+      case 5: 
+      {
+         theBuf[0] = clamp(v);
+         theBuf[1] = clamp(m);
+         theBuf[2] = clamp(n);
+         break;
+      }
+      }
+   }
+   return *this;
+}
+
+const ossimNormRgbVector& ossimNormRgbVector::operator =(const ossimJpegYCbCrVector& YCbCr)
+{
+   theBuf[0] = clamp((YCbCr.getY() +
+                      1.402 * (YCbCr.getCr()-128.0))/255.0);
+   theBuf[1] = clamp((YCbCr.getY() -
+                      0.34414 *(YCbCr.getCb()-128.0) -
+                      0.71414*(YCbCr.getCr()-128.0))/255.0);
+   theBuf[2] = clamp((YCbCr.getY() +
+                      1.772 * ( YCbCr.getCb()-128.0))/255.0);
+
+   return *this;
+}
+
+const ossimNormRgbVector& ossimNormRgbVector::operator =(const ossimHsiVector& hsi)
+{
+   ossim_float32 h = hsi.getH();
+   ossim_float32 s = hsi.getS();
+   ossim_float32 i = hsi.getI();
+
+   ossim_float32 r=0;
+   ossim_float32 g=0;
+   ossim_float32 b=0;
+   
+   if(h <= 120.0)
+   {
+      b = i*(1-s);
+
+      r = i*(1 + s*cos(RAD_PER_DEG*h)/cos((60-h)*RAD_PER_DEG));
+      g = 3*i - (r+b);
+   }
+    else if(h <= 240.0)
+    {
+       h-=120;
+
+       r = i*(1-s);
+       g = i*(1 + s*cos(RAD_PER_DEG*h)/cos((60-h)*RAD_PER_DEG));
+       b = 3*i - (r+g);
+    }
+    else if(h <= 360.0)
+    {
+       h-=240;
+
+       g = i*(1-s);
+       b = i*(1 + s*cos(RAD_PER_DEG*h)/cos((60-h)*RAD_PER_DEG));
+       r = 3*i - (g+b);      
+    }
+   
+   theBuf[0] = clamp(r);
+   theBuf[1] = clamp(g);
+   theBuf[2] = clamp(b);
+   
+   return *this;
+}
+
+const ossimNormRgbVector& ossimNormRgbVector::operator =(const ossimCmyVector& cmy)
+{
+   theBuf[0] = (255 - cmy.getC())/255.0;
+   theBuf[1] = (255 - cmy.getM())/255.0;
+   theBuf[2] = (255 - cmy.getY())/255.0;
+
+   return *this;
+}
diff --git a/ossim/src/ossim/base/ossimNotify.cpp b/ossim/src/ossim/base/ossimNotify.cpp
new file mode 100644
index 0000000..c5a317a
--- /dev/null
+++ b/ossim/src/ossim/base/ossimNotify.cpp
@@ -0,0 +1,436 @@
+//*******************************************************************
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+// Contains class definition for ossimNotify.
+//*******************************************************************
+//  $Id: ossimNotify.cpp 23467 2015-08-14 13:59:09Z gpotts $
+
+#include <iostream>
+#include <cstdio>
+#include <cstdarg>
+#include <stack>
+#include <cstddef>
+
+#include <ossim/base/ossimNotify.h>
+#include <OpenThreads/Mutex>
+#include <OpenThreads/ScopedLock>
+
+static std::ostream* theOssimFatalStream  = &std::cerr;
+static std::ostream* theOssimWarnStream   = &std::cerr;
+static std::ostream* theOssimInfoStream   = &std::cout;
+static std::ostream* theOssimNoticeStream = &std::cout;
+static std::ostream* theOssimDebugStream  = &std::cout;
+static std::ostream* theOssimAlwaysStream = &std::cout;
+
+static OpenThreads::Mutex theMutex;
+static ossimNotifyFlags theNotifyFlags     = ossimNotifyFlags_ALL;
+std::stack<ossimNotifyFlags> theNotifyFlagsStack;
+
+template <class charT, class traits = std::char_traits<charT> >
+class ossimNullBufferStream : public std::basic_streambuf<charT, traits>
+{
+public:
+   ossimNullBufferStream(){};
+
+
+protected:
+
+   std::streamsize xsputn(const charT * /* pChar */, std::streamsize /* n */)
+      {
+         return 0;
+      }
+
+private:
+   ossimNullBufferStream(const ossimNullBufferStream&);
+   ossimNullBufferStream& operator=(const ossimNullBufferStream&);
+};
+
+template <class charT, class traits = std::char_traits<charT> >
+class ossimLogFileBufferStream : public std::basic_streambuf<charT, traits>
+{
+public:
+   ossimLogFileBufferStream(){};
+
+   void setLogFilename(const ossimFilename& file)
+      {
+         theLogFilename = file;
+      }
+   ossimFilename getLogFilename()const
+      {
+         return theLogFilename;
+      }
+
+protected:
+   ossimFilename theLogFilename;
+   OpenThreads::Mutex fileMutex;
+   virtual int overflow(int c)
+      {
+         OpenThreads::ScopedLock<OpenThreads::Mutex> scopedLock(fileMutex);
+         if(!traits::eq_int_type(c, traits::eof()))
+         {
+            tempString = tempString + ossimString((char)c);
+         }
+
+         return c;
+      }
+
+   virtual std::streamsize xsputn(const charT * pChar, std::streamsize n)
+      {
+         OpenThreads::ScopedLock<OpenThreads::Mutex> scopedLock(fileMutex);
+         
+         tempString = tempString + ossimString(pChar, pChar + n);
+
+         return n;
+      }
+
+   virtual int sync()
+      {
+         OpenThreads::ScopedLock<OpenThreads::Mutex> scopedLock(fileMutex);
+         flushBuffer();
+         return 0;
+      }
+
+private:
+   ossimString tempString;
+
+   void flushBuffer()
+   {
+         if((theLogFilename != "") && (tempString!=""))
+         {
+            std::ofstream outFile(theLogFilename.c_str(),
+                                  std::ios::app|std::ios::out);
+            if(outFile)
+            {
+               outFile.write(tempString.c_str(), (std::streamsize)tempString.length());
+            }
+            else
+            {
+            }
+            
+            tempString = "";
+         }
+   }
+   ossimLogFileBufferStream(const ossimLogFileBufferStream&);
+   ossimLogFileBufferStream& operator=(const ossimLogFileBufferStream&);
+};
+
+
+class ossimNullStream : public std::ostream
+{
+public:
+   ossimNullStream() : std::ostream(&nullBufferStream){}
+   virtual ~ossimNullStream()
+      {
+         nullBufferStream.pubsync();
+      }
+
+private:
+   ossimNullBufferStream<char> nullBufferStream;
+   // Copy & assignment are undefined in iostreams
+   ossimNullStream(const ossimNullStream&);
+   ossimNullStream & operator=(const ossimNullStream&);
+};
+
+class ossimLogFileStream : public std::ostream
+{
+public:
+   ossimLogFileStream() : std::ostream(&theLogFileBufferStream){}
+   virtual ~ossimLogFileStream()
+      {
+         theLogFileBufferStream.pubsync();
+      }
+   void setLogFilename(const ossimFilename& filename)
+      {
+         theLogFileBufferStream.setLogFilename(filename);
+      }
+   ossimFilename getLogFilename()const
+      {
+         return theLogFileBufferStream.getLogFilename();
+      }
+
+private:
+   ossimLogFileBufferStream<char> theLogFileBufferStream;
+   // Copy & assignment are undefined in iostreams
+   ossimLogFileStream(const ossimLogFileStream&);
+   ossimLogFileStream & operator=(const ossimLogFileStream&);
+};
+
+static ossimNullStream    theOssimNullStream;
+static ossimLogFileStream theLogFileStream;
+
+void ossimSetDefaultNotifyHandlers()
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   theOssimFatalStream  = &std::cerr;
+   theOssimWarnStream   = &std::cout;
+   theOssimInfoStream   = &std::cout;
+   theOssimNoticeStream = &std::cout;
+   theOssimDebugStream  = &std::cout;
+   theOssimAlwaysStream = &std::cout;
+}
+
+void ossimSetNotifyStream(std::ostream* outputStream,
+                          ossimNotifyFlags whichLevelsToRedirect)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   if(whichLevelsToRedirect&ossimNotifyFlags_FATAL)
+   {
+      theOssimFatalStream = outputStream;
+   }
+   if(whichLevelsToRedirect&ossimNotifyFlags_WARN)
+   {
+      theOssimWarnStream = outputStream;
+   }
+   if(whichLevelsToRedirect&ossimNotifyFlags_INFO)
+   {
+      theOssimInfoStream = outputStream;
+   }
+   if(whichLevelsToRedirect&ossimNotifyFlags_NOTICE)
+   {
+      theOssimNoticeStream = outputStream;
+   }
+   if(whichLevelsToRedirect&ossimNotifyFlags_DEBUG)
+   {
+      theOssimDebugStream = outputStream;
+   }
+}
+
+std::ostream* ossimGetNotifyStream(ossimNotifyLevel whichLevel)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   std::ostream* notifyStream = &theOssimNullStream;
+
+   switch(whichLevel)
+   {
+      case ossimNotifyLevel_ALWAYS:
+      {
+         notifyStream = theOssimAlwaysStream;
+         break;
+      }
+      case ossimNotifyLevel_FATAL:
+      {
+         notifyStream = theOssimFatalStream;
+         break;
+      }
+      case ossimNotifyLevel_WARN:
+      {
+         notifyStream = theOssimWarnStream;
+         break;
+      }
+      case ossimNotifyLevel_INFO:
+      {
+         notifyStream = theOssimInfoStream;
+         break;
+      }
+      case ossimNotifyLevel_NOTICE:
+      {
+         notifyStream = theOssimNoticeStream;
+         break;
+      }
+      case ossimNotifyLevel_DEBUG:
+      {
+         notifyStream = theOssimDebugStream;
+         break;
+      }
+   }
+   return notifyStream;
+}
+
+OSSIMDLLEXPORT std::ostream& ossimNotify(ossimNotifyLevel level)
+{
+   if(ossimIsReportingEnabled())
+   {
+      theMutex.lock();
+      if(theLogFileStream.getLogFilename() != "")
+      {
+         theMutex.unlock();
+         return theLogFileStream;
+      }
+      else
+      {
+         bool reportMessageFlag = false;
+         switch(level)
+         {
+            case ossimNotifyLevel_ALWAYS:
+            {
+               reportMessageFlag = true;
+               break;
+            }
+            case ossimNotifyLevel_FATAL:
+            {
+               if(theNotifyFlags&ossimNotifyFlags_FATAL)
+               {
+                  reportMessageFlag = true;
+               }
+               break;
+            }
+            case ossimNotifyLevel_WARN:
+            {
+               if(theNotifyFlags&ossimNotifyFlags_WARN)
+               {
+                  reportMessageFlag = true;
+               }
+               break;
+            }
+            case ossimNotifyLevel_INFO:
+            {
+               if(theNotifyFlags&ossimNotifyFlags_INFO)
+               {
+                  reportMessageFlag = true;
+               }
+               break;
+            }
+            case ossimNotifyLevel_NOTICE:
+            {
+               if(theNotifyFlags&ossimNotifyFlags_NOTICE)
+               {
+                  reportMessageFlag = true;
+               }
+               break;
+            }
+            case ossimNotifyLevel_DEBUG:
+            {
+               if(theNotifyFlags&ossimNotifyFlags_DEBUG)
+               {
+                  reportMessageFlag = true;
+               }
+               break;
+            }
+         }
+         if(reportMessageFlag)
+         {
+            theMutex.unlock();
+            return *ossimGetNotifyStream(level);
+         }
+      }
+
+      theMutex.unlock();
+      
+   } // matches: if(ossimIsReportingEnabled())
+
+   return theOssimNullStream;
+}
+
+void ossimSetLogFilename(const ossimFilename& filename)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   theLogFileStream.setLogFilename(filename);
+}
+
+/*
+const char* ossimGetLogFilename()
+{
+   return theLogFileStream.getLogFilename().c_str();
+}
+*/
+
+void ossimGetLogFilename(ossimFilename& logFile)
+{
+   logFile = theLogFileStream.getLogFilename();
+}
+
+ossimString ossimErrorV(const char *fmt, va_list args )
+{
+   char temp[2024];
+   if(fmt)
+   {
+      vsprintf(temp, fmt, args);
+   }
+   else
+   {
+      sprintf(temp,"%s", "");
+   }
+
+   return temp;
+}
+
+void ossimEnableNotify(ossimNotifyFlags flags)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   theNotifyFlags = (ossimNotifyFlags)(theNotifyFlags | flags);
+}
+
+void ossimDisableNotify(ossimNotifyFlags flags)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   theNotifyFlags = (ossimNotifyFlags)((ossimNotifyFlags_ALL^flags)&
+                                       theNotifyFlags);
+}
+
+void ossimSetNotifyFlag(ossimNotifyFlags notifyFlags)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   theNotifyFlags = notifyFlags;
+}
+
+void ossimPushNotifyFlags()
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   theNotifyFlagsStack.push(theNotifyFlags);
+}
+
+void ossimPopNotifyFlags()
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   if(theNotifyFlagsStack.empty())
+   {
+      return;
+   }
+   theNotifyFlags = theNotifyFlagsStack.top();
+   theNotifyFlagsStack.pop();
+}
+
+ossimNotifyFlags ossimGetNotifyFlags()
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   return theNotifyFlags;
+}
+
+
+
+bool ossimIsReportingEnabled()
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   return  (theNotifyFlags != ossimNotifyFlags_NONE);
+}
+
+
+void ossimNotify(ossimString msg,
+                 ossimNotifyLevel notifyLevel)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   ossimNotify(notifyLevel) << msg << "\n";
+}
+
+void ossimSetError( const char* /* className */,
+                    ossim_int32 /* error */,
+                    const char *fmtString, ...)
+{
+   // NOTE: This code has an infinite loop in it!!! (drb)
+   //OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   theMutex.lock();
+   va_list args;
+   
+   va_start(args, fmtString);
+   ossimString result = ossimErrorV(fmtString, args );
+   va_end(args);
+   theMutex.unlock();
+   ossimNotify(ossimNotifyLevel_WARN) << result << "\n";
+}
+
+void ossimSetInfo( const char* /* className */,
+                   const char *fmtString, ...)
+{
+   theMutex.lock();
+   va_list args;
+
+   va_start(args, fmtString);
+   ossimString result = ossimErrorV(fmtString, args );
+   va_end(args);
+   theMutex.unlock();
+   ossimNotify(ossimNotifyLevel_WARN) << result << "\n";
+}
diff --git a/src/ossim/base/ossimNumericProperty.cpp b/ossim/src/ossim/base/ossimNumericProperty.cpp
similarity index 100%
rename from src/ossim/base/ossimNumericProperty.cpp
rename to ossim/src/ossim/base/ossimNumericProperty.cpp
diff --git a/ossim/src/ossim/base/ossimObject.cpp b/ossim/src/ossim/base/ossimObject.cpp
new file mode 100644
index 0000000..e392dc5
--- /dev/null
+++ b/ossim/src/ossim/base/ossimObject.cpp
@@ -0,0 +1,133 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimObject.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimConnectableObject.h>
+#include <ossim/base/ossimVisitor.h>
+
+RTTI_DEF(ossimObject, "ossimObject")
+
+ossimObject::ossimObject()
+{}
+
+ossimObject::~ossimObject()
+{
+}
+   
+ossimObject* ossimObject::dup()const
+{
+   ossimObject* result = NULL;
+   ossimKeywordlist kwl;
+
+   saveState(kwl);
+   
+   result = ossimObjectFactoryRegistry::instance()->createObject(kwl);
+
+   if(!result)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "dup() not implemented for object = "
+         << getClassName() << ". Please implement!\n";
+   }
+   
+   return result;
+}
+
+ossimString ossimObject::getShortName()const
+{
+   return getClassName();
+}
+
+ossimString ossimObject::getLongName()const
+{
+   return getClassName();
+}
+
+ossimString ossimObject::getDescription()const
+{
+   return getLongName();
+}
+
+
+ossimString ossimObject::getClassName()const
+{
+   return TYPE_NAME(this);
+}
+
+RTTItypeid ossimObject::getType()const
+{
+   return TYPE_INFO(this);
+}
+
+bool ossimObject::canCastTo(ossimObject* obj)const
+{
+   if(obj)
+   {
+      return obj->getType().can_cast(this->getType());
+   }
+   
+   return false;
+}
+
+bool ossimObject::canCastTo(const ossimString& parentClassName)const
+{
+   return (getType().find_baseclass(parentClassName.c_str()) !=
+           getType().null_type());
+}
+
+bool ossimObject::canCastTo(const RTTItypeid& id)const
+{
+   return id.can_cast(this->getType());
+}
+
+bool ossimObject::saveState(ossimKeywordlist& kwl,
+                            const char* prefix)const
+{
+   kwl.add(prefix,
+           ossimKeywordNames::TYPE_KW,
+           getClassName(),
+           true);
+
+   return true;
+}
+
+bool ossimObject::isEqualTo(const ossimObject& obj, ossimCompareType /* compareType */)const
+{
+   return (getClassName() == obj.getClassName());
+}
+
+void ossimObject::accept(ossimVisitor& visitor)
+{
+   if(!visitor.stopTraversal()&&!visitor.hasVisited(this))
+   {
+      visitor.visit(this);
+   }
+}
+
+bool ossimObject::loadState(const ossimKeywordlist&, const char*)
+{
+   return true;
+}
+
+std::ostream& ossimObject::print(std::ostream& out) const
+{
+   return out;
+}
+
+std::ostream& operator<<(std::ostream& out, const ossimObject& obj)
+{
+   return obj.print(out);
+}
+
diff --git a/src/ossim/base/ossimObjectDestructingEvent.cpp b/ossim/src/ossim/base/ossimObjectDestructingEvent.cpp
similarity index 100%
rename from src/ossim/base/ossimObjectDestructingEvent.cpp
rename to ossim/src/ossim/base/ossimObjectDestructingEvent.cpp
diff --git a/src/ossim/base/ossimObjectFactory.cpp b/ossim/src/ossim/base/ossimObjectFactory.cpp
similarity index 100%
rename from src/ossim/base/ossimObjectFactory.cpp
rename to ossim/src/ossim/base/ossimObjectFactory.cpp
diff --git a/ossim/src/ossim/base/ossimObjectFactoryRegistry.cpp b/ossim/src/ossim/base/ossimObjectFactoryRegistry.cpp
new file mode 100644
index 0000000..24050c3
--- /dev/null
+++ b/ossim/src/ossim/base/ossimObjectFactoryRegistry.cpp
@@ -0,0 +1,175 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimObjectFactoryRegistry.cpp 22650 2014-02-28 14:39:20Z gpotts $
+
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+
+RTTI_DEF1(ossimObjectFactoryRegistry, "ossimObjectFactoryRegistry", ossimObject);
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+#include <ossim/base/ossimObjectFactory.h>
+#include <ossim/base/ossimBaseObjectFactory.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimRefPtr.h>
+using namespace std;
+
+
+ossimObjectFactoryRegistry::ossimObjectFactoryRegistry()
+{
+   registerFactory(ossimBaseObjectFactory::instance());
+}
+
+ossimObjectFactoryRegistry::~ossimObjectFactoryRegistry()
+{
+}
+
+ossimObjectFactoryRegistry* ossimObjectFactoryRegistry::instance()
+{
+   static ossimObjectFactoryRegistry sharedInstance;
+   
+   return &sharedInstance;
+}
+
+#if 0
+bool ossimObjectFactoryRegistry::addFactory(ossimObjectFactory* factory)
+{
+   return registerFactory(factory);
+}
+
+bool ossimObjectFactoryRegistry::registerFactory(ossimObjectFactory* factory)
+{
+   if(factory)
+   {
+      if(!findFactory(factory))
+      {
+         theFactoryList.push_back(factory);
+         return true;
+      }
+      else
+      {
+         return true;
+      }
+   }
+   
+   return false;
+}
+
+void ossimObjectFactoryRegistry::unregisterFactory(ossimObjectFactory* factory)
+{
+   vector<ossimObjectFactory*>::iterator iter = theFactoryList.begin();
+
+   while(iter != theFactoryList.end())
+   {
+      if( (*iter) == factory)
+      {
+         theFactoryList.erase(iter);
+         return;
+      }
+      ++iter;
+   }
+}
+
+ossimObject* ossimObjectFactoryRegistry::createObject(const ossimString& name)const
+{
+   ossimObject* result = NULL;
+   unsigned long index = 0;
+   
+   while((index < theFactoryList.size()) &&(!result))
+   {
+      result = theFactoryList[index]->createObject(name);
+      ++index;
+   }
+   return result;
+}
+
+ossimObject* ossimObjectFactoryRegistry::createObject(const ossimKeywordlist& kwl,
+                                                      const char* prefix)const
+{
+   ossimObject* result = NULL;
+   unsigned long index = 0;
+
+   while((index < theFactoryList.size()) &&(!result))
+   {
+      result = theFactoryList[index]->createObject(kwl,
+                                                   prefix);
+      ++index;
+   }
+
+   return result;
+}
+
+void ossimObjectFactoryRegistry::getTypeNameList(std::vector<ossimString>& typeList)const
+{
+   vector<ossimString> result;
+   vector<ossimObjectFactory*>::const_iterator iter = theFactoryList.begin();
+
+   while(iter != theFactoryList.end())
+   {
+      result.clear();
+      (*iter)->getTypeNameList(result);
+
+      typeList.insert(typeList.end(),
+                      result.begin(),
+                      result.end());
+      ++iter;
+   }
+}
+
+ossimObjectFactory* ossimObjectFactoryRegistry::findFactory(ossimObjectFactory* factory)const
+{
+   vector<ossimObjectFactory*>::const_iterator iter = theFactoryList.begin();
+
+   while(iter != theFactoryList.end())
+   {
+      if( (*iter) == factory)
+      {
+         return factory;
+      }
+      ++iter;
+   }
+
+   return NULL;
+}
+#endif
+
+void ossimObjectFactoryRegistry::getTypeNameList(std::vector<ossimString>& typeList,
+                                                 const ossimString& baseType)const
+{
+   vector<ossimString> allTypeList;
+
+   getTypeNameList(allTypeList);
+
+   if(baseType == "")
+   {
+      typeList.insert(typeList.end(),
+                      allTypeList.begin(),
+                      allTypeList.end());
+   }
+   else
+   {
+      int i = 0;
+      ossimRefPtr<ossimObject> obj;
+      for(i = 0; i < (int)allTypeList.size(); ++i)
+      {
+         obj = createObject(allTypeList[i]);
+         if(obj.valid())
+         {
+            if(obj->canCastTo(baseType))
+            {
+               typeList.push_back(allTypeList[i]);
+            }
+         }
+      }
+   }
+}
+
+
+void* ossimObjectFactoryRegistryGetInstance()
+{
+  return ossimObjectFactoryRegistry::instance();
+}
diff --git a/ossim/src/ossim/base/ossimObservationSet.cpp b/ossim/src/ossim/base/ossimObservationSet.cpp
new file mode 100644
index 0000000..a569e44
--- /dev/null
+++ b/ossim/src/ossim/base/ossimObservationSet.cpp
@@ -0,0 +1,228 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Hicks
+//
+// Description: Storage class for observations.
+//----------------------------------------------------------------------------
+#include <iostream>
+#include <iomanip>
+
+#include <ossim/base/ossimObservationSet.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+
+static ossimTrace traceExec  ("ossimObservationSet:exec");
+static ossimTrace traceDebug ("ossimObservationSet:debug");
+
+
+
+ossimObservationSet::ossimObservationSet() :
+theNumAdjPar(0),
+theNumMeas(0),
+theNumPartials(0)
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
+      << "DEBUG: ossimObservationSet(): returning..." << std::endl;
+}
+
+
+ossimObservationSet::~ossimObservationSet()
+{
+   for (ossim_uint32 i=0; i<theImageHandlers.size(); ++i)
+      theImageHandlers[i] = 0;
+   // for (int i=0; i<theObs.size(); ++i)
+   //    theObs[i] = 0;
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
+      << "DEBUG: ~ossimObservationSet(): returning..." << std::endl;
+}
+
+
+bool 
+ossimObservationSet::addObservation(ossimRefPtr<ossimPointObservation> obs)
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         <<"\n ossimObservationSet::addObservation: "<<obs->ID()<<endl;
+   }
+
+   theObs.push_back(obs);
+   theNumMeas += obs->numMeas();
+
+
+   // Update image list
+   for (ossim_uint32 i=0; i<obs->numImages(); ++i)
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)<<"  i="<<i<<endl;
+      }
+
+      bool found = false;
+
+      // Check for image already in list
+      for (ossim_uint32 j=0; j<theImageFiles.size(); ++j)
+      {
+         if (theImageFiles[j] == obs->imageFile(i))
+         {
+            found = true;
+            theImageIndex.push_back(j);
+            int nAdjPar = obs->numPars(i);
+            theNumPartials += nAdjPar;
+         }
+      }
+
+      // If not found yet, add to image list
+      if (!found)
+      {
+         theImageFiles.push_back(obs->imageFile(i));
+
+         // Geometry
+         ossimRefPtr<ossimImageHandler> ih;
+         ih = ossimImageHandlerRegistry::instance()->open(obs->imageFile(i));        
+         theImageHandlers.push_back(ih);
+
+         theImageIndex.push_back( (int)(theImageHandlers.size()-1) );
+
+         // Handle ossimAdjustableParameterInterface
+         ossimAdjustableParameterInterface* adjParIface = 
+            obs->getImageGeom(i)->getAdjustableParameterInterface();
+         if (!adjParIface)
+         {
+            return false;
+         }
+         else
+         {
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)<<"  Found new image... "<<i<<endl;
+            }
+            int nAdjPar = adjParIface->getNumberOfAdjustableParameters();
+            theNumAdjPar   += nAdjPar;
+            theNumPartials += nAdjPar;
+            theNumAdjParams.push_back(nAdjPar);
+         }
+      }
+   }
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)<<"    theNumAdjPar   = "<<theNumAdjPar<<endl;
+      ossimNotify(ossimNotifyLevel_DEBUG)<<"    theNumPartials = "<<theNumPartials<<endl;
+   }
+
+   return true;
+}
+
+
+ossimImageGeometry* ossimObservationSet::getImageGeom(const int index)
+{
+   return theImageHandlers[index]->getImageGeometry().get();
+}
+
+
+void ossimObservationSet::setImageGeom(const int index, ossimImageGeometry* geom)
+{
+   theImageHandlers[index]->setImageGeometry(geom);
+}
+
+
+bool ossimObservationSet::evaluate(NEWMAT::Matrix& measResiduals,
+                                   NEWMAT::Matrix& objPartials,
+                                   NEWMAT::Matrix& parPartials)
+{
+
+   // Dimension output matrices
+   measResiduals = NEWMAT::Matrix(numMeas(), 2);
+   objPartials   = NEWMAT::Matrix(numMeas()*3, 2);
+   parPartials   = NEWMAT::Matrix(theNumPartials, 2);
+
+   int img = 1;
+   int cParIndex = 1;
+   int cObjIndex = 1;
+   for (ossim_uint32 cObs=0; cObs<numObs(); ++cObs)
+   {
+      int numMeasPerObs = theObs[cObs]->numMeas();
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)<<"\n cObs= "<<cObs;
+      }
+
+      for (int cImg=0; cImg<numMeasPerObs; ++cImg)
+      {
+         NEWMAT::Matrix cResid(1, 2);
+         theObs[cObs]->getResiduals(cImg, cResid);
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               <<"\n   cImg, img, cObjIndex, cParIndex, cResid: "
+               <<cImg<<" "<<img<<" "<<cObjIndex<<" "<<cParIndex<<" "<<cResid;
+         }
+         measResiduals.Row(img) = cResid;
+         img++;
+
+         NEWMAT::Matrix cObjPar(3, 2);
+         theObs[cObs]->getObjSpacePartials(cImg, cObjPar);
+         objPartials.SubMatrix(cObjIndex,cObjIndex+2,1,2) << cObjPar;
+         cObjIndex += 3;
+
+         int numPar = theObs[cObs]->numPars(cImg);
+         NEWMAT::Matrix cParamPar(numPar, 2);
+         theObs[cObs]->getParameterPartials(cImg, cParamPar);
+         parPartials.SubMatrix(cParIndex,cParIndex+numPar-1,1,2) << cParamPar;
+         cParIndex += numPar;
+      }
+   }
+
+   return true;
+}
+
+
+std::ostream& ossimObservationSet::print(std::ostream& os) const
+{
+   int idx = 0;
+
+   os<<"\nImages:\n";
+   ossim_uint32 spaces = 0;
+   for (ossim_uint32 i=0; i<numImages(); ++i)
+   {
+      if (theImageFiles[i].size() > spaces)
+         spaces = (ossim_uint32)theImageFiles[i].size();
+   }
+   for (ossim_uint32 i=0; i<numImages(); ++i)
+   {
+      int nAdj = theNumAdjParams[i];
+      os << " "<<i+1<<": " << setw(spaces) << theImageFiles[i] << "   nPar: "<< setw(2) << nAdj <<endl;
+   }
+
+   os<<"\nObservations:";
+   for (ossim_uint32 cObs=0; cObs<numObs(); ++cObs)
+   {
+      os << "\n " << theObs[cObs]->ID();
+      if (ossim::isnan(theObs[cObs]->getScore()) == false)
+      {
+         os << std::setiosflags(std::ios::fixed) << std::setprecision(2);
+         os << "\t" << theObs[cObs]->getScore();
+      }
+      else
+      {
+         os << "\t" << "nan";
+      }
+      os << "\t";
+      theObs[cObs]->getGroundPoint().print(os);
+
+      int numMeasPerObs = theObs[cObs]->numMeas();
+      for (int cImg=0; cImg<numMeasPerObs; ++cImg)
+      {
+         os << "\n\t\t" << theImageIndex[idx]+1;
+         os << "\t";
+         theObs[cObs]->getMeasurement(cImg).print(os,1);
+         idx++;
+      }
+   }
+   return os;
+}
diff --git a/src/ossim/base/ossimOutputSource.cpp b/ossim/src/ossim/base/ossimOutputSource.cpp
similarity index 100%
rename from src/ossim/base/ossimOutputSource.cpp
rename to ossim/src/ossim/base/ossimOutputSource.cpp
diff --git a/src/ossim/base/ossimPackedBits.cpp b/ossim/src/ossim/base/ossimPackedBits.cpp
similarity index 100%
rename from src/ossim/base/ossimPackedBits.cpp
rename to ossim/src/ossim/base/ossimPackedBits.cpp
diff --git a/src/ossim/base/ossimPointObservation.cpp b/ossim/src/ossim/base/ossimPointObservation.cpp
similarity index 100%
rename from src/ossim/base/ossimPointObservation.cpp
rename to ossim/src/ossim/base/ossimPointObservation.cpp
diff --git a/ossim/src/ossim/base/ossimPolyArea2d.cpp b/ossim/src/ossim/base/ossimPolyArea2d.cpp
new file mode 100644
index 0000000..b8131d8
--- /dev/null
+++ b/ossim/src/ossim/base/ossimPolyArea2d.cpp
@@ -0,0 +1,837 @@
+//---
+// License:  See top level LICENSE.txt file.
+//
+// $Id: ossimPolyArea2d.cpp 23623 2015-11-13 18:24:28Z gpotts $
+//---
+
+#include <ossim/base/ossimPolyArea2d.h>
+
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimString.h>
+#include <geos/geom/Coordinate.h>
+#include <geos/geom/CoordinateArraySequence.h>
+#include <geos/geom/GeometryFactory.h>
+#include <geos/geom/LinearRing.h>
+#include <geos/opBuffer.h>
+#include <geos/geom/Point.h>
+#include <geos/geom/Polygon.h>
+#include <geos/geom/MultiPolygon.h>
+#include <geos/geom/PrecisionModel.h>
+#include <geos/io/WKTReader.h>
+#include <geos/io/WKTWriter.h>
+#include <geos/util/GEOSException.h>
+#include <geos/operation/valid/IsValidOp.h>
+#include <geos/opBuffer.h>
+#include <cstdlib>
+#include <exception>
+#include <vector>
+
+class ossimGeometryFactoryWrapper : public ossimReferenced
+{
+public:
+   ossimGeometryFactoryWrapper()
+      : m_geomFactory(0)
+   {
+      geos::geom::PrecisionModel *pm =
+         new geos::geom::PrecisionModel(geos::geom::PrecisionModel::FLOATING);
+      m_geomFactory = new geos::geom::GeometryFactory(pm, -1); 
+   }
+   virtual ~ossimGeometryFactoryWrapper(){if(m_geomFactory) delete m_geomFactory;m_geomFactory=0;}
+   
+   geos::geom::GeometryFactory* m_geomFactory;
+};
+
+class OssimPolyArea2dPrivate
+{
+public:
+   typedef geos::geom::Geometry* GeometryPtr;
+   typedef const geos::geom::Geometry* ConstGeometryPtr;
+   
+   OssimPolyArea2dPrivate(GeometryPtr geom=0);
+   ~OssimPolyArea2dPrivate();
+   
+   void deleteGeometry() { if(m_geometry) { delete m_geometry; m_geometry = 0; }}
+   void setGeometry(const ossimPolygon& polygon, const vector<ossimPolygon>& holes = vector<ossimPolygon>());
+   void setGeometry(GeometryPtr geom){deleteGeometry();m_geometry=geom;}
+   geos::geom::GeometryFactory* geomFactory(){{return m_globalFactory.valid()?m_globalFactory->m_geomFactory:0;}}
+   GeometryPtr m_geometry;
+   static ossimRefPtr<ossimGeometryFactoryWrapper> m_globalFactory; 
+};
+
+ossimRefPtr<ossimGeometryFactoryWrapper> OssimPolyArea2dPrivate::m_globalFactory;
+
+OssimPolyArea2dPrivate::OssimPolyArea2dPrivate(GeometryPtr geom)
+:m_geometry(geom)
+{
+   static OpenThreads::Mutex globalFactoryMutex;
+   
+   {
+      OpenThreads::ScopedLock<OpenThreads::Mutex> lock(globalFactoryMutex);
+      if(!m_globalFactory.valid())
+      {
+         m_globalFactory = new ossimGeometryFactoryWrapper();
+      }    
+   }
+}
+
+OssimPolyArea2dPrivate::~OssimPolyArea2dPrivate()
+{
+   deleteGeometry();
+}
+
+void OssimPolyArea2dPrivate::setGeometry(
+   const ossimPolygon& exteriorRing, const vector<ossimPolygon>& interiorRings)
+{
+   deleteGeometry();
+   
+   geos::geom::CoordinateArraySequence *cas = new geos::geom::CoordinateArraySequence();
+   
+   const std::vector<ossimDpt>& pts = exteriorRing.getVertexList();
+
+   int idx = 0;
+   int n = (int)pts.size();
+   
+   if(n > 0)
+   {
+      //fill the exterior ring
+      for (idx = 0; idx < n; idx++)
+      {
+         cas->add(geos::geom::Coordinate(pts[idx].x, pts[idx].y));
+      }
+      
+      //if the original polygon didn't have the first and last point the same, make it so
+      if((pts[0].x != pts[n-1].x) || (pts[0].y!=pts[n-1].y))
+      {
+         cas->add(geos::geom::Coordinate(pts[0].x, pts[0].y));
+      }
+      
+      //fill the interior rings
+      vector<geos::geom::Geometry*> *holes = new vector<geos::geom::Geometry*>();
+      for (ossim_uint32 interiorRingIdx = 0; interiorRingIdx < interiorRings.size(); ++interiorRingIdx)
+      {
+         geos::geom::CoordinateArraySequence *interiorCas =
+            new geos::geom::CoordinateArraySequence();
+         const std::vector<ossimDpt>& vertexPts = interiorRings[interiorRingIdx].getVertexList();
+         for(ossim_uint32 vertexIndex=0; vertexIndex < vertexPts.size(); ++vertexIndex)
+         {
+            interiorCas->add(geos::geom::Coordinate(vertexPts[vertexIndex].x,
+                                                    vertexPts[vertexIndex].y));
+         }
+         
+         //if the original polygon didn't have the first and last point the same, make it so
+         if((vertexPts[0].x != vertexPts[vertexPts.size()-1].x) ||
+            (vertexPts[0].y!=vertexPts[vertexPts.size()-1].y))
+         {
+            interiorCas->add(geos::geom::Coordinate(vertexPts[0].x, vertexPts[0].y));
+         }
+         
+         geos::geom::LinearRing *hole = geomFactory()->createLinearRing(interiorCas);
+         holes->push_back(hole);
+      }
+      
+      geos::geom::LinearRing* shell = geomFactory()->createLinearRing(cas);
+      if ( shell )
+      {
+         m_geometry = geomFactory()->createPolygon(shell, holes);
+      }
+      else
+      {
+         m_geometry = 0;
+      }
+   }
+}
+
+void ossimPolyArea2d::recurseVisibleGeometries(
+   std::vector<ossimPolygon>& polyList, const geos::geom::Geometry* geom) const
+{
+   int nGeoms = (int)geom->getNumGeometries();
+   
+   if(nGeoms < 2 )
+   {
+      const geos::geom::Polygon* poly = dynamic_cast<const geos::geom::Polygon*> (geom);
+      
+      if (poly)
+      {
+         const geos::geom::LineString* lineString = dynamic_cast<const geos::geom::LineString*> (poly->getExteriorRing());
+         if (lineString)
+         {
+            int currentPolyIdx = (int)polyList.size();
+            int nPoints = (int)lineString->getNumPoints();
+            int idx = 0;
+            
+            polyList.push_back(ossimPolygon());
+            
+            for (idx=0; idx<nPoints; idx++)
+            {
+               std::auto_ptr<const geos::geom::Point> point(lineString->getPointN(idx));
+               polyList[currentPolyIdx].addPoint(point->getX(), point->getY());
+            }
+         }
+      }
+   }
+   else
+   {
+      for (int idx=0; idx < nGeoms; ++idx)
+      {
+         recurseVisibleGeometries(polyList, geom->getGeometryN(idx));
+      }
+   }
+}
+
+void ossimPolyArea2d::recurseHoles(std::vector<ossimPolygon>& polyList,
+                                   const geos::geom::Geometry* geom) const
+{
+   int nGeoms = (int)geom->getNumGeometries();
+   
+   if(nGeoms < 2 )
+   {
+      const geos::geom::Polygon* poly = dynamic_cast<const geos::geom::Polygon*> (geom);
+
+      if (poly)
+      {
+         ossim_uint32 nInteriorRings = (ossim_uint32)poly->getNumInteriorRing();
+         ossim_uint32 idx = 0;
+         
+         for(idx = 0; idx < nInteriorRings; ++idx)
+         {
+            const geos::geom::LineString* lineString = poly->getInteriorRingN(idx);
+            if (lineString)
+            {
+               int currentPolyIdx = (int)polyList.size();
+               int nPoints = (int)lineString->getNumPoints();
+               int idx = 0;
+
+               polyList.push_back(ossimPolygon());
+
+               for (idx=0; idx<nPoints; idx++)
+               {
+                  std::auto_ptr<const geos::geom::Point> point(lineString->getPointN(idx));
+                  polyList[currentPolyIdx].addPoint(point->getX(), point->getY());
+               }
+            }
+         }
+      }
+   }
+   else
+   {
+      int idx = 0;
+      
+      for (idx=0; idx < nGeoms; idx++)
+      {
+         recurseHoles(polyList, geom->getGeometryN(idx));
+      }
+   }
+}
+
+void ossimPolyArea2d::recurseCompleteGeometries(std::vector<ossimPolyArea2d>& polyList,
+                                                const geos::geom::Geometry* geom) const
+{
+   int nGeoms = (int)geom->getNumGeometries();
+   if(nGeoms < 2 )
+   {
+      const geos::geom::Polygon* poly = dynamic_cast<const geos::geom::Polygon*> (geom);
+
+      if (poly)
+      {
+         //get exterior shell for the geometry
+         ossimPolygon shell;
+         const geos::geom::LineString* lineString =
+            dynamic_cast<const geos::geom::LineString*> (poly->getExteriorRing());
+         if (lineString)
+         {
+            int nPoints = (int)lineString->getNumPoints();
+            for (int idx = 0; idx<nPoints; idx++)
+            {
+               std::auto_ptr<const geos::geom::Point> point(lineString->getPointN(idx));
+               shell.addPoint(point->getX(), point->getY());
+            }
+         }
+         
+         // Get interior rings for the geometry.
+         std::size_t nInteriorRings = poly->getNumInteriorRing();
+         vector<ossimPolygon> holes(nInteriorRings);
+         for(std::size_t holeIdx = 0; holeIdx < nInteriorRings; ++holeIdx)
+         {
+            const geos::geom::LineString* lineString = poly->getInteriorRingN(holeIdx);
+            if (lineString)
+            {
+               std::size_t nPoints = lineString->getNumPoints();
+               for (std::size_t idx = 0; idx<nPoints; ++idx)
+               {
+                  std::auto_ptr<const geos::geom::Point> point(lineString->getPointN(idx));
+                  holes[holeIdx].addPoint(point->getX(), point->getY());
+               }
+            }
+         }
+         polyList.push_back(ossimPolyArea2d(shell, holes));
+      }
+   }
+   else
+   {
+      int idx = 0;
+      
+      for (idx=0; idx < nGeoms; idx++)
+      {
+         recurseCompleteGeometries(polyList, geom->getGeometryN(idx));
+      }
+   }
+}
+
+std::ostream& operator <<(std::ostream& out, const ossimPolyArea2d& rhs)
+{
+   if(rhs.m_privateData->m_geometry)
+   {
+      out << rhs.m_privateData->m_geometry->toString();
+   }
+   return out;
+}
+
+ossimPolyArea2d::ossimPolyArea2d()
+   :m_privateData(new OssimPolyArea2dPrivate)
+{
+}
+
+ossimPolyArea2d::ossimPolyArea2d(const vector<ossimGpt>& polygon)
+   :m_privateData(new OssimPolyArea2dPrivate)
+{
+   (*this) = polygon;
+}
+
+ossimPolyArea2d::ossimPolyArea2d(const ossimIrect& rect)
+   :m_privateData(new OssimPolyArea2dPrivate)
+{
+   (*this) = rect;
+}
+
+ossimPolyArea2d::ossimPolyArea2d(const ossimDrect& rect)
+   :m_privateData(new OssimPolyArea2dPrivate)
+{
+   (*this) = rect;
+}
+
+ossimPolyArea2d::ossimPolyArea2d(const ossimPolygon& polygon)
+   :m_privateData(new OssimPolyArea2dPrivate)
+{
+   (*this) = polygon;
+}
+
+ossimPolyArea2d::ossimPolyArea2d(const ossimPolygon& exteriorRing, const vector<ossimPolygon>& interiorRings)
+   :m_privateData(new OssimPolyArea2dPrivate)
+{	
+	m_privateData->setGeometry(exteriorRing, interiorRings);
+}
+
+ossimPolyArea2d::ossimPolyArea2d(const ossimPolyArea2d& rhs)
+   :m_privateData(new OssimPolyArea2dPrivate) 
+{
+   *this = rhs;
+}
+
+ossimPolyArea2d::ossimPolyArea2d(const ossimDpt& p1,
+                                 const ossimDpt& p2,
+                                 const ossimDpt& p3,
+                                 const ossimDpt& p4)
+   :
+   m_privateData(new OssimPolyArea2dPrivate)
+{
+   ossimPolygon temp(p1,p2,p3,p4);
+   *this = temp;
+}
+
+ossimPolyArea2d::~ossimPolyArea2d()
+{
+   if(m_privateData)
+   {
+      delete m_privateData;
+      m_privateData = 0;
+   }
+}
+
+const ossimPolyArea2d& ossimPolyArea2d::operator =(const ossimPolyArea2d& rhs)
+{ 
+   if(this != &rhs)
+   {
+      if(rhs.m_privateData->m_geometry)
+      {
+         m_privateData->setGeometry(rhs.m_privateData->m_geometry->clone());
+      }
+   }
+   return *this;
+}
+
+const ossimPolyArea2d& ossimPolyArea2d::operator =(const ossimPolygon& polygon)
+{
+   m_privateData->setGeometry(polygon);
+
+   return *this;
+}
+
+const ossimPolyArea2d& ossimPolyArea2d::operator =(const ossimIrect& rect)
+{
+   return (*this = ossimPolygon(rect));
+}
+
+const ossimPolyArea2d& ossimPolyArea2d::operator =(const ossimDrect& rect)
+{
+   return (*this = ossimPolygon(rect));
+}
+
+const ossimPolyArea2d& ossimPolyArea2d::operator =(const vector<ossimGpt>& polygon)
+{
+   std::vector<ossimDpt> pts;
+   int idx = 0;
+   int n = (int)polygon.size();
+   for(idx = 0; idx < n;++idx)
+   {
+      pts.push_back(polygon[idx]);
+   }
+  
+   return (*this = ossimPolygon(pts));
+}
+
+const ossimPolyArea2d& ossimPolyArea2d::operator =(const vector<ossimDpt>& polygon)
+{
+   return (*this = ossimPolygon(polygon));
+}
+
+bool ossimPolyArea2d::intersects(const ossimPolyArea2d& rhs)const
+{
+   bool result = false;
+
+   if(m_privateData->m_geometry&&rhs.m_privateData->m_geometry)
+   {
+      result = m_privateData->m_geometry->intersects(rhs.m_privateData->m_geometry); 
+   }
+
+   return result;
+}
+
+ossimPolyArea2d ossimPolyArea2d::operator &(const ossimPolyArea2d& rhs)const
+{
+   if((this!=&rhs) && m_privateData->m_geometry && rhs.m_privateData->m_geometry)
+   {
+      ossimPolyArea2d result;
+      try // GEOS code throws exceptions...
+      {
+         result.m_privateData->setGeometry(m_privateData->m_geometry->intersection(
+                                              rhs.m_privateData->m_geometry));
+      }
+      catch( const std::exception& e )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimPolyArea2d::operator& Caught exception: " << e.what() << std::endl;
+         result.clearPolygons();
+      }
+      catch( ... )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimPolyArea2d::operator& Caught exception!" << std::endl;
+         result.clearPolygons();
+      }
+      return result;
+   }
+   return *this;
+}
+
+ossimPolyArea2d ossimPolyArea2d::operator +(const ossimPolyArea2d& rhs)const
+{
+   if((this!=&rhs) && m_privateData->m_geometry && rhs.m_privateData->m_geometry)
+   {
+      ossimPolyArea2d result;
+      try // GEOS code throws exceptions...
+      {
+         result.m_privateData->setGeometry(m_privateData->m_geometry->Union(
+                                              rhs.m_privateData->m_geometry));
+      }  
+      catch( const std::exception& e )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimPolyArea2d::operator+ Caught exception: " << e.what() << std::endl;
+         result.clearPolygons();
+      }
+      catch( ... )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimPolyArea2d::operator+ Caught exception!" << std::endl;
+         result.clearPolygons();
+      }
+      return result;
+   }
+   return *this;
+}
+ossimPolyArea2d ossimPolyArea2d::operator -(const ossimPolyArea2d& rhs)const
+{
+   if((this!=&rhs) && m_privateData->m_geometry && rhs.m_privateData->m_geometry)
+   {
+      ossimPolyArea2d result;
+      try // GEOS code throws exceptions...
+      {
+         result.m_privateData->setGeometry(m_privateData->m_geometry->difference(
+                                              rhs.m_privateData->m_geometry));
+      }
+      catch( const std::exception& e )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimPolyArea2d::operator- Caught exception: " << e.what() << std::endl;
+         result.clearPolygons();
+      }
+      catch( ... )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimPolyArea2d::operator- Caught exception!" << std::endl;
+         result.clearPolygons();
+      }
+      return result;
+   }
+   return *this;
+}
+
+const ossimPolyArea2d& ossimPolyArea2d::operator &=(const ossimPolyArea2d& rhs)
+{
+   if((this!=&rhs) && m_privateData->m_geometry && rhs.m_privateData->m_geometry)
+   {
+      try // GEOS code throws exceptions...
+      {
+         m_privateData->setGeometry(m_privateData->m_geometry->intersection(
+                                       rhs.m_privateData->m_geometry));
+      }
+      catch( const std::exception& e )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimPolyArea2d::operator&= Caught exception: " << e.what() << std::endl;
+         this->clearPolygons();
+      }
+      catch( ... )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimPolyArea2d::operator&= Caught exception!" << std::endl;
+         this->clearPolygons();
+      }      
+   }
+   return *this;
+}
+
+const ossimPolyArea2d& ossimPolyArea2d::operator +=(const ossimPolyArea2d& rhs)
+{
+   if((this!=&rhs) && m_privateData->m_geometry && rhs.m_privateData->m_geometry)
+   {
+      try // GEOS code throws exceptions...
+      {
+         m_privateData->setGeometry(m_privateData->m_geometry->Union(
+                                       rhs.m_privateData->m_geometry));
+      }
+      catch( const std::exception& e )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimPolyArea2d::operator+= Caught exception: " << e.what() << std::endl;
+         this->clearPolygons();
+      }
+      catch( ... )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimPolyArea2d::operator+= Caught exception!" << std::endl;
+         this->clearPolygons();
+      }      
+   }
+   return *this;
+}
+
+const ossimPolyArea2d& ossimPolyArea2d::operator -=(const ossimPolyArea2d& rhs)
+{
+   if((this!=&rhs) && m_privateData->m_geometry && rhs.m_privateData->m_geometry)
+   {
+      try // GEOS code throws exceptions...
+      {
+         m_privateData->setGeometry(m_privateData->m_geometry->difference(
+                                       rhs.m_privateData->m_geometry));
+      }
+      catch( const std::exception& e )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimPolyArea2d::operator-= Caught exception: " << e.what() << std::endl;
+         this->clearPolygons();
+      }
+      catch( ... )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimPolyArea2d::operator-= Caught exception!" << std::endl;
+         this->clearPolygons();
+      }      
+   }
+   return *this;
+}
+
+void ossimPolyArea2d::add(const ossimPolyArea2d& rhs)
+{
+   geos::geom::Geometry* geom = m_privateData->m_geometry->Union(rhs.m_privateData->m_geometry);
+   if(geom) m_privateData->setGeometry(geom);
+}
+
+void ossimPolyArea2d::clearPolygons()
+{
+   m_privateData->deleteGeometry();
+#if 0
+   clearEngine();
+#endif
+}
+
+bool ossimPolyArea2d::getVisiblePolygons(vector<ossimPolygon>& polyList)const
+{
+   bool foundPolys = false;
+   if(m_privateData->m_geometry)
+   {
+      ossim_uint32 sizeBefore = (ossim_uint32)polyList.size();
+      recurseVisibleGeometries(polyList, m_privateData->m_geometry);
+      foundPolys = (sizeBefore != polyList.size());
+   }
+
+   return foundPolys;
+}
+
+bool ossimPolyArea2d::getPolygonHoles(vector<ossimPolygon>& polyList)const
+{
+   bool foundPolys = false;
+   if(m_privateData->m_geometry)
+   {
+      ossim_uint32 sizeBefore = (ossim_uint32)polyList.size();
+      recurseHoles(polyList, m_privateData->m_geometry);
+      foundPolys = (sizeBefore != polyList.size());
+   }
+
+   return foundPolys;
+}
+
+bool ossimPolyArea2d::getCompletePolygons(vector<ossimPolyArea2d>& polyList)const
+{
+	bool foundPolys = false;
+	if(m_privateData->m_geometry){
+		ossim_uint32 sizeBefore = (ossim_uint32)polyList.size();
+		recurseCompleteGeometries(polyList, m_privateData->m_geometry);
+		foundPolys = (sizeBefore != polyList.size());
+	}
+	return foundPolys;
+}
+
+bool ossimPolyArea2d::isEmpty()const
+{
+   bool result = true;
+   if (m_privateData&&m_privateData->m_geometry)
+   {
+      result = m_privateData->m_geometry->isEmpty();
+   }
+
+   return result;
+}
+
+bool ossimPolyArea2d::isValid(bool displayValidationError)const
+{
+   bool result = false;
+   
+   if(m_privateData&&m_privateData->m_geometry)
+   {
+      if(displayValidationError)
+      {
+         geos::operation::valid::IsValidOp validityCheck(m_privateData->m_geometry);
+         geos::operation::valid::TopologyValidationError*
+            topologyValidationError(validityCheck.getValidationError());
+         // if(topologyValidationError == nullptr)
+         if(topologyValidationError == 0)
+         {
+            result = true;
+         }
+         else
+         {
+            ossimNotify(ossimNotifyLevel_INFO)
+               << "ossimPolyArea2d::isValid: " << topologyValidationError->toString() << std::endl;
+         }
+      }
+      else
+      {
+         result = m_privateData->m_geometry->isValid();
+      }
+   }
+   
+   return result;
+}
+
+bool ossimPolyArea2d::isPointWithin(const ossimDpt& point)const
+{
+   return isPointWithin(point.x, point.y);
+}
+
+bool ossimPolyArea2d::isPointWithin(double x, double y)const
+{
+   bool result = false;
+
+   if(!isEmpty())
+   {
+      geos::geom::Coordinate c(x,y);
+      geos::geom::Geometry* geom = m_privateData->geomFactory()->createPoint(c);
+  
+      result = m_privateData->m_geometry->intersects(geom);
+
+      delete geom;
+   }
+
+   return result;
+}
+
+void ossimPolyArea2d::getBoundingRect(ossimDrect& rect)
+{
+   rect.makeNan();
+
+   if(!isEmpty())
+   {
+      const geos::geom::Envelope* envelope = m_privateData->m_geometry->getEnvelopeInternal();
+
+      rect = ossimDrect(envelope->getMinX(), envelope->getMinY(), envelope->getMaxX(), envelope->getMaxY());
+   }
+}
+
+std::string ossimPolyArea2d::toString()const
+{
+   std::string result = "";
+
+   if(m_privateData->m_geometry)
+   {
+      result = m_privateData->m_geometry->toString();
+   }
+
+   return result;
+}
+
+ossimPolyArea2d ossimPolyArea2d::getBufferedShape(double distance) const{
+	ossimPolyArea2d result;
+	try{
+		geos::operation::buffer::BufferOp buffer_operation(m_privateData->m_geometry);
+		result.m_privateData->setGeometry( buffer_operation.getResultGeometry(distance));
+	}catch( const std::exception& e ){
+		ossimNotify(ossimNotifyLevel_DEBUG)
+			<< "ossimPolyArea2d::getBufferedShape Caught exception: " << e.what() << std::endl;
+		result.clearPolygons();
+	}catch( ... ){
+		ossimNotify(ossimNotifyLevel_DEBUG)
+			<< "ossimPolyArea2d::getBufferedShape Caught exception!" << std::endl;
+		result.clearPolygons();
+	}
+	return result;
+}
+ossimPolyArea2d& ossimPolyArea2d::setToBufferedShape(double distance)
+{
+   try{
+      geos::operation::buffer::BufferOp buffer_operation(m_privateData->m_geometry);
+      m_privateData->setGeometry( buffer_operation.getResultGeometry(distance));
+   }catch( const std::exception& e ){
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimPolyArea2d::getBufferedShape Caught exception: " << e.what() << std::endl;
+   }catch( ... ){
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimPolyArea2d::getBufferedShape Caught exception!" << std::endl;
+   }
+   return *this;
+}
+
+ossimPolyArea2d& ossimPolyArea2d::toMultiPolygon()
+{
+
+
+   try{
+      if(m_privateData->m_geometry)
+      {
+         switch(m_privateData->m_geometry->getGeometryTypeId())
+         {
+            case geos::geom::GEOS_POLYGON:
+            {
+               std::vector<geos::geom::Geometry*> values;
+               values.push_back(m_privateData->m_geometry->clone());
+
+               m_privateData->setGeometry(m_privateData->m_geometry->getFactory()->createMultiPolygon(values));
+               break;
+            }
+            case geos::geom::GEOS_MULTIPOLYGON:
+            {
+               // intentionally left blank
+               break;
+            }
+            default:
+            {  
+               // might need an error at a later date
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << "ossimPolyArea2d::toMultiPolygon Geometry type can not be converted to a multi polygon: " <<m_privateData->m_geometry->getGeometryType()<< std::endl;
+
+               break;
+            }
+         }
+      }
+   }
+   catch(const std::exception& e)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimPolyArea2d::toMultiPolygon Caught exception: " << e.what() << std::endl;
+   }
+   catch(...)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimPolyArea2d::toMultiPolygon Caught exception!" << std::endl;
+   }
+
+   return *this;
+}
+
+bool ossimPolyArea2d::saveState(ossimKeywordlist& kwl,
+                                const char* prefix)const
+{
+   kwl.add(prefix,
+           ossimKeywordNames::TYPE_KW,
+           "ossimPolyArea2d",
+           true);
+
+   if(!isEmpty())
+   {
+      geos::io::WKTWriter writer;
+
+      kwl.add(prefix,
+              "wkt",
+              writer.write(m_privateData->m_geometry).c_str(),
+              true);
+   }
+   // else
+   // {
+   //
+   // }
+
+   return true;
+}
+
+bool ossimPolyArea2d::loadState(const ossimKeywordlist& kwl,
+                                const char* prefix)
+{
+   if(m_privateData)
+   {
+      ossimString wkt = kwl.find(prefix, "wkt");
+
+      if(!wkt.empty())
+      {
+         geos::io::WKTReader reader(m_privateData->geomFactory());
+         try
+         {
+            m_privateData->setGeometry(reader.read(wkt.c_str()));
+         }
+         catch( const std::exception& e )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "ossimPolyArea2d::loadState Caught exception: " << e.what() << std::endl;
+            this->clearPolygons();
+         }
+         catch(...)
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "ossimPolyArea2d::loadState Caught exception!" << std::endl;
+            this->clearPolygons(); 
+         }
+      }
+   }
+   return true;
+}
diff --git a/ossim/src/ossim/base/ossimPolyLine.cpp b/ossim/src/ossim/base/ossimPolyLine.cpp
new file mode 100644
index 0000000..a4cfa28
--- /dev/null
+++ b/ossim/src/ossim/base/ossimPolyLine.cpp
@@ -0,0 +1,561 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// AUTHOR: Garrett Potts (gpotts at imagelinks.com)
+//
+//*****************************************************************************
+//  $Id: ossimPolyLine.cpp 22532 2013-12-28 20:46:11Z dburken $
+//
+#include <ossim/base/ossimPolyLine.h>
+#include <ossim/base/ossimCommon.h>
+#include <algorithm>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimLine.h>
+#include <ossim/base/ossimPolygon.h>
+#include <sstream>
+#include <iterator>
+using namespace std;
+
+static const char* NUMBER_VERTICES_KW = "number_vertices";
+
+ossimPolyLine::ossimPolyLine(const vector<ossimIpt>& polyLine)
+   :theCurrentVertex(0)
+{
+   for (std::vector<ossimIpt>::const_iterator iter = polyLine.begin();
+      iter != polyLine.end(); ++iter)
+   {
+      theVertexList.push_back(ossimDpt(*iter));
+   }
+}
+
+ossimPolyLine::ossimPolyLine(const vector<ossimDpt>& polyLine)
+   :theCurrentVertex(0)
+{
+   theVertexList = polyLine;
+}
+
+//*****************************************************************************
+//  CONSTRUCTOR: ossimPolyLine(int numVertices, const ossimDpt* vertex_array)
+//  
+//*****************************************************************************
+ossimPolyLine::ossimPolyLine(int numVertices, const ossimDpt* v)
+   : theCurrentVertex(0)
+{
+   theVertexList.insert(theVertexList.begin(),
+                        v, v+numVertices);
+}
+
+//*****************************************************************************
+//  COPY CONSTRUCTOR: ossimPolyLine(ossimPolyLine)
+//  
+//*****************************************************************************
+ossimPolyLine::ossimPolyLine(const ossimPolyLine& polyLine)
+   :theCurrentVertex(0)
+{
+   *this = polyLine;
+}
+
+ossimPolyLine::ossimPolyLine(ossimDpt v1,
+                             ossimDpt v2,
+                             ossimDpt v3,
+                             ossimDpt v4)
+   : theVertexList(4),
+     theCurrentVertex(0)
+{
+   theVertexList[0] = v1;
+   theVertexList[1] = v2;
+   theVertexList[2] = v3;
+   theVertexList[3] = v4;
+}
+
+ossimPolyLine::ossimPolyLine(const ossimIrect& rect)
+   : theVertexList(4),
+     theCurrentVertex(0)
+{
+   theVertexList[0] = rect.ul();
+   theVertexList[1] = rect.ur();
+   theVertexList[2] = rect.lr();
+   theVertexList[3] = rect.ll();
+}
+
+ossimPolyLine::ossimPolyLine(const ossimDrect& rect)
+   : theVertexList(4),
+     theCurrentVertex(0)
+{
+   theVertexList[0] = rect.ul();
+   theVertexList[1] = rect.ur();
+   theVertexList[2] = rect.lr();
+   theVertexList[3] = rect.ll();
+}
+
+ossimPolyLine::ossimPolyLine(const ossimPolygon& polygon)
+   :theVertexList(polygon.getNumberOfVertices()+1),
+    theCurrentVertex(0)
+{
+   ossim_uint32 n = polygon.getNumberOfVertices();
+   
+   if(n)
+   {
+      for(ossim_uint32 i = 0; i < n; ++i)
+      {
+         theVertexList[i] = polygon[i];
+      }
+
+      theVertexList[n] = polygon[n-1];
+   }
+   else
+   {
+      theVertexList.clear();
+   }
+}
+
+//*****************************************************************************
+//  DESTRUCTOR: ~ossimPolyLine
+//  
+//*****************************************************************************
+ossimPolyLine::~ossimPolyLine()
+{
+}
+
+void ossimPolyLine::roundToIntegerBounds(bool compress)
+{
+  int i = 0;
+  for(i = 0; i < (int)theVertexList.size(); ++i)
+    {
+      theVertexList[i] = ossimIpt(theVertexList[i]);
+    }
+  if(compress&&theVertexList.size())
+    {
+      vector<ossimDpt> polyLine;
+      
+      polyLine.push_back(theVertexList[0]);
+      ossimDpt testPt = theVertexList[0];
+      for(i=1; i < (int)theVertexList.size(); ++i)
+	{
+	  if(testPt!=theVertexList[i])
+	    {
+	      testPt = theVertexList[i];
+	      polyLine.push_back(testPt);
+	    }
+	}
+      theVertexList    = polyLine;
+      theCurrentVertex = 0;
+    }
+}
+
+bool ossimPolyLine::hasNans()const
+{
+   int upper = (int)theVertexList.size();
+   int i = 0;
+
+   for(i = 0; i < upper; ++i)
+   {
+      if(theVertexList[i].hasNans())
+      {
+         return true;
+      }
+   }
+
+   return false;
+}
+
+void ossimPolyLine::getIntegerBounds(ossim_int32& minX,
+                                     ossim_int32& minY,
+                                     ossim_int32& maxX,
+                                     ossim_int32& maxY)const
+{
+   ossim_int32 npoly = (ossim_int32)theVertexList.size();
+   int i = 0;
+   
+   if(npoly)
+   {
+      minX = (ossim_int32)floor(theVertexList[0].x);
+      maxX = (ossim_int32)ceil(theVertexList[0].x);
+      minY = (ossim_int32)floor(theVertexList[0].y);
+      maxY = (ossim_int32)ceil(theVertexList[0].y);
+      
+      for(i =1; i < npoly; ++i)
+      {
+         minX = std::min((ossim_int32)floor(theVertexList[i].x),
+                         (ossim_int32)minX);
+         maxX = std::max((ossim_int32)ceil(theVertexList[i].x),
+                         (ossim_int32)maxX);
+         minY = std::min((ossim_int32)floor(theVertexList[i].y),
+                         (ossim_int32)minY);
+         maxY = std::max((ossim_int32)ceil(theVertexList[i].y),
+                         (ossim_int32)maxY);
+      }
+   }
+   else
+   {
+      minX = OSSIM_INT_NAN;
+      minY = OSSIM_INT_NAN;
+      maxX = OSSIM_INT_NAN;
+      maxY = OSSIM_INT_NAN;
+   }
+}
+
+void ossimPolyLine::getBounds(double& minX,
+                              double& minY,
+                              double& maxX,
+                              double& maxY)const
+{
+   ossim_int32 npoly = (ossim_int32)theVertexList.size();
+   
+   if(npoly)
+   {
+      int i = 0;
+      minX = theVertexList[0].x;
+      maxX = theVertexList[0].x;
+      minY = theVertexList[0].y;
+      maxY = theVertexList[0].y;
+      
+      for(i =1; i < npoly; ++i)
+      {
+         minX = std::min(theVertexList[i].x, minX);
+         maxX = std::max(theVertexList[i].x, maxX);
+         minY = std::min(theVertexList[i].y, minY);
+         maxY = std::max(theVertexList[i].y, maxY);
+      }
+   }
+   else
+   {
+      minX = ossim::nan();
+      minY = ossim::nan();
+      maxX = ossim::nan();
+      maxY = ossim::nan();
+   }
+}
+
+bool ossimPolyLine::isWithin(const ossimDrect& rect)const
+{
+   if(theVertexList.size() == 1)
+   {
+      return rect.pointWithin(theVertexList[0]);
+   }
+   else if(theVertexList.size() > 1)
+   {
+      for(ossim_uint32 i = 0; i < (theVertexList.size() - 1); ++i)
+      {
+         ossimDpt p1 = theVertexList[i];
+         ossimDpt p2 = theVertexList[i+1];
+         
+         if(rect.clip(p1, p2))
+         {
+            return true;
+         }
+      }
+   }
+
+   return false;
+}
+
+
+bool ossimPolyLine::clipToRect(vector<ossimPolyLine>& result,
+                              const ossimDrect& rect)const
+{
+   result.clear();
+   
+   if(theVertexList.size() <1) return false;
+
+   ossimPolyLine currentPoly;
+
+   if(theVertexList.size() == 1)
+   {
+      rect.pointWithin(theVertexList[0]);
+      currentPoly.addPoint(theVertexList[0]);
+      result.push_back(currentPoly);
+   }
+   else
+   {
+      ossimDpt pt1 = theVertexList[0];
+      ossimDpt pt2 = theVertexList[1];
+      ossim_uint32 i = 1;
+      
+      while(i < theVertexList.size())
+      {
+         
+         bool p1Inside = rect.pointWithin(pt1);
+         bool p2Inside = rect.pointWithin(pt2);
+
+         if(p1Inside&&p2Inside) // both inside so save the first
+         {
+            currentPoly.addPoint(pt1);
+            pt1 = pt2;            
+         }
+         // going from inside to outside
+         else if(p1Inside&&
+                 !p2Inside)
+         {
+            currentPoly.addPoint(pt1);
+            ossimDpt save = pt2;
+            if(rect.clip(pt1, pt2))
+            {
+               currentPoly.addPoint(pt2);
+               result.push_back(currentPoly);
+
+               currentPoly.clear();
+            }
+            pt2  = save;
+            pt1  = save;
+         }// going outside to the inside
+         else if(!p1Inside&&
+                 p2Inside)
+         {            
+            if(rect.clip(pt1, pt2))
+            {
+               currentPoly.addPoint(pt1);
+            }
+            pt1 = pt2;
+           
+         }
+         else // both outside must do a clip to see if crosses rect
+         {
+            ossimDpt p1 = pt1;
+            ossimDpt p2 = pt2;
+
+            if(rect.clip(p1, p2))
+            {
+               currentPoly.addPoint(p1);
+               currentPoly.addPoint(p2);
+            }
+            pt1 = pt2;
+         }
+         ++i;
+         
+         if(i < theVertexList.size())
+         {
+            pt2 = theVertexList[i];
+         }            
+      }
+      if(rect.pointWithin(pt2))
+      {
+         currentPoly.addPoint(pt2);
+      }
+   }
+
+   if(currentPoly.getNumberOfVertices() > 0)
+   {
+      result.push_back(currentPoly);
+   }
+   
+   return (result.size()>0);
+}   
+
+bool ossimPolyLine::isPointWithin(const ossimDpt& point) const
+{
+   if(theVertexList.size() == 1)
+   {
+      return (point == theVertexList[0]);
+   }
+   else
+   {
+      for(ossim_uint32 i = 1; i < theVertexList.size(); ++i)
+      {
+         if(ossimLine(theVertexList[i-1],
+                      theVertexList[i]).isPointWithin(point))
+         {
+            return true;
+         }
+      }
+   }
+   
+   return false;
+}
+
+bool ossimPolyLine::vertex(int index, ossimDpt& tbd_vertex) const 
+{
+   if((index >= (int)theVertexList.size()) ||
+      (index < 0))
+   {
+      return false;
+   }
+
+   tbd_vertex = theVertexList[index];
+   theCurrentVertex = index;
+
+   return true;
+}
+
+bool ossimPolyLine::nextVertex(ossimDpt& tbd_vertex) const 
+{
+   ++theCurrentVertex;
+   if(theCurrentVertex >= (ossim_int32)theVertexList.size())
+   {
+      return false;
+   }
+   tbd_vertex = theVertexList[theCurrentVertex];
+   
+   return true;
+}
+
+
+const ossimPolyLine&  ossimPolyLine::operator=(const ossimPolygon& polygon)
+{
+   theCurrentVertex = 0;
+   ossim_uint32 n = polygon.getNumberOfVertices();
+   
+   if(n)
+   {
+      theVertexList.resize(n+1);
+      
+      for(ossim_uint32 i = 0; i < n; ++i)
+      {
+         theVertexList[i] = polygon[i];
+      }
+      
+      theVertexList[n] = polygon[n-1];
+   }
+   else
+   {
+      theVertexList.clear();
+   }
+
+   return *this;
+}
+
+const ossimPolyLine&  ossimPolyLine::operator=(const ossimPolyLine& polyLine)
+{
+   theVertexList    = polyLine.theVertexList;
+   theCurrentVertex = polyLine.theCurrentVertex;
+   theAttributeList = polyLine.theAttributeList;
+   
+   return *this;
+}
+
+const ossimPolyLine& ossimPolyLine::operator= (const vector<ossimDpt>& vertexList)
+{
+   theVertexList    = vertexList;
+   theCurrentVertex = 0;
+   
+   return *this;
+}
+
+const ossimPolyLine& ossimPolyLine::operator= (const vector<ossimIpt>& vertexList)
+{
+   theVertexList.clear();
+   for (std::vector<ossimIpt>::const_iterator iter = vertexList.begin();
+      iter != vertexList.end(); ++iter)
+   {
+      theVertexList.push_back(*iter);
+   }
+   
+   theCurrentVertex = 0;
+   
+   return *this;
+}
+
+//*****************************************************************************
+//  METHOD: operator==()
+//  
+//*****************************************************************************
+bool ossimPolyLine::operator==(const ossimPolyLine& polyLine) const
+{
+   if( (theVertexList.size() != polyLine.theVertexList.size()))
+   {
+      return false;
+   }
+   if(!theVertexList.size() && polyLine.theVertexList.size())
+   {
+      return true;
+   }
+
+   return (theVertexList == polyLine.theVertexList);
+}
+
+const ossimPolyLine& ossimPolyLine::operator *=(const ossimDpt& scale)
+{
+   int upper = (int)theVertexList.size();
+   int i = 0;
+   
+   for(i = 0; i < upper; ++i)
+   {
+      theVertexList[i].x*=scale.x;
+      theVertexList[i].y*=scale.y;
+   }
+   
+   return *this;
+}
+
+ossimPolyLine ossimPolyLine::operator *(const ossimDpt& scale)const
+{
+   ossimPolyLine result(*this);
+
+   int i = 0;
+   int upper = (int)theVertexList.size();
+   for(i = 0; i < upper; ++i)
+   {
+      result.theVertexList[i].x*=scale.x;
+      result.theVertexList[i].y*=scale.y;
+   }
+
+   return result;
+}
+
+
+void ossimPolyLine::reverseOrder()
+{
+   std::reverse(theVertexList.begin(), theVertexList.end());   
+}
+
+//*****************************************************************************
+//  METHOD: ossimPolyLine::print(ostream)
+//  
+//*****************************************************************************
+void ossimPolyLine::print(ostream& os) const
+{
+   copy(theVertexList.begin(),
+        theVertexList.end(),
+        ostream_iterator<ossimDpt>(os, "\n"));
+}
+
+bool ossimPolyLine::saveState(ossimKeywordlist& kwl,
+                             const char* prefix)const
+{
+   int i = 0;
+   kwl.add(prefix,
+           ossimKeywordNames::TYPE_KW,
+           "ossimPolyLine",
+           true);
+   kwl.add(prefix,
+           NUMBER_VERTICES_KW,
+           (int)theVertexList.size(),
+           true);
+   for(i = 0; i < (int)theVertexList.size();++i)
+   {
+      ossimString vert = "v"+ossimString::toString(i);;
+      ossimString value = (ossimString::toString(theVertexList[i].x) + " " +
+                           ossimString::toString(theVertexList[i].y) );
+      kwl.add(prefix,
+              vert.c_str(),
+              value.c_str(),
+              true);
+   }
+   ossimString order = "";
+   
+   return true;
+}
+   
+bool ossimPolyLine::loadState(const ossimKeywordlist& kwl,
+                             const char* prefix)
+{
+   const char* number_vertices = kwl.find(prefix, NUMBER_VERTICES_KW);
+   int i = 0;
+
+   theVertexList.clear();
+   int vertexCount = ossimString(number_vertices).toLong();
+   double x = 0.0, y =0.0;
+   for(i = 0; i < vertexCount; ++i)
+   {
+      ossimString v = kwl.find(prefix, (ossimString("v")+ossimString::toString(i)).c_str());
+      v = v.trim();
+
+      istringstream vStream(v);
+      vStream >> x >> y;
+      theVertexList.push_back(ossimDpt(x,y));
+   }
+
+   return true;
+}
diff --git a/ossim/src/ossim/base/ossimPolygon.cpp b/ossim/src/ossim/base/ossimPolygon.cpp
new file mode 100644
index 0000000..7d91f44
--- /dev/null
+++ b/ossim/src/ossim/base/ossimPolygon.cpp
@@ -0,0 +1,1267 @@
+//*****************************************************************************
+// FILE: ossimPolygon.cpp
+//
+// License: MIT
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Contains implementation of class 
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimPolygon.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/base/ossimPolygon.h>
+#include <ossim/base/ossimLine.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimPolyArea2d.h>
+#include <ossim/base/ossimString.h>
+#include <algorithm>
+#include <iterator>
+#include <sstream>
+#include <iterator>
+
+static const char* NUMBER_VERTICES_KW = "number_vertices";
+static const char* VERTEX_ORDER_KW    = "order";
+
+static const int RECT_LEFT_EDGE   = 0;
+static const int RECT_TOP_EDGE    = 1;
+static const int RECT_RIGHT_EDGE  = 2;
+static const int RECT_BOTTOM_EDGE = 3;
+
+ossimPolygon::ossimPolygon()
+   : theOrderingType(OSSIM_VERTEX_ORDER_UNKNOWN),
+    theVertexList(),
+    theCurrentVertex(0)
+   
+{}
+
+ossimPolygon::ossimPolygon(const vector<ossimIpt>& polygon)
+   :theOrderingType(OSSIM_VERTEX_ORDER_UNKNOWN),
+   theVertexList(polygon.size()),
+   theCurrentVertex(0)
+   
+{
+   // Assign std::vector<ossimIpt> list to std::vector<ossimDpt> theVertexList.
+   for (std::vector<ossimIpt>::size_type i = 0; i < polygon.size(); ++i)
+   {
+      theVertexList[i] = polygon[i];
+   }
+}
+
+ossimPolygon::ossimPolygon(const vector<ossimDpt>& polygon)
+   :theOrderingType(OSSIM_VERTEX_ORDER_UNKNOWN),
+   theVertexList(polygon),
+    theCurrentVertex(0)
+{
+}
+
+//*****************************************************************************
+//  CONSTRUCTOR: ossimPolygon(int numVertices, const ossimDpt* vertex_array)
+//  
+//*****************************************************************************
+ossimPolygon::ossimPolygon(int numVertices, const ossimDpt* v)
+   : theOrderingType(OSSIM_VERTEX_ORDER_UNKNOWN),
+     theCurrentVertex(0)
+     
+{
+   theVertexList.insert(theVertexList.begin(),
+                        v, v+numVertices);
+}
+
+//*****************************************************************************
+//  COPY CONSTRUCTOR: ossimPolygon(ossimPolygon)
+//  
+//*****************************************************************************
+ossimPolygon::ossimPolygon(const ossimPolygon& polygon)
+   :theCurrentVertex(0)
+{
+   *this = polygon;
+}
+
+//*****************************************************************************
+//  CONSTRUCTOR: ossimPolygon(p1, p2, p3, p4)
+//  
+//  Provided for convenience. Does not imply the polygon is limited to four
+//  vertices
+//  
+//*****************************************************************************
+ossimPolygon::ossimPolygon(ossimDpt v1,
+                           ossimDpt v2,
+                           ossimDpt v3,
+                           ossimDpt v4)
+   : theOrderingType(OSSIM_VERTEX_ORDER_UNKNOWN),
+     theVertexList(4),
+     theCurrentVertex(0)
+     
+{
+   theVertexList[0] = v1;
+   theVertexList[1] = v2;
+   theVertexList[2] = v3;
+   theVertexList[3] = v4;
+}
+
+ossimPolygon::ossimPolygon(const ossimIrect& rect)
+: theOrderingType(OSSIM_CLOCKWISE_ORDER),
+  theVertexList(4),
+  theCurrentVertex(0)
+{
+   theVertexList[0] = rect.ul();
+   theVertexList[1] = rect.ur();
+   theVertexList[2] = rect.lr();
+   theVertexList[3] = rect.ll();
+}
+
+ossimPolygon::ossimPolygon(const ossimDrect& rect)
+: theOrderingType(OSSIM_CLOCKWISE_ORDER),
+theVertexList(4),
+theCurrentVertex(0)
+{
+   theVertexList[0] = rect.ul();
+   theVertexList[1] = rect.ur();
+   theVertexList[2] = rect.lr();
+   theVertexList[3] = rect.ll();
+}
+
+
+//*****************************************************************************
+//  DESTRUCTOR: ~ossimPolygon
+//  
+//*****************************************************************************
+ossimPolygon::~ossimPolygon()
+{
+}
+
+
+//*************************************************************************************************
+//! Returns polygon area. Negative indicates CW ordering of vertices (in right-handed coordinates
+//*************************************************************************************************
+double ossimPolygon::area()const
+{
+   double area = 0;
+   ossim_uint32 i=0;
+   ossim_uint32 j=0;
+   ossim_uint32 size = (ossim_uint32)theVertexList.size();
+   
+   for (i=0;i<size;i++)
+   {
+      j = (i + 1) % (int)size;
+      area += theVertexList[i].x * theVertexList[j].y;
+      area -= theVertexList[i].y * theVertexList[j].x;
+   }
+
+   area /= 2;
+
+   return area;
+}
+
+void ossimPolygon::roundToIntegerBounds(bool compress)
+{
+   int i = 0;
+   for(i = 0; i < (int)theVertexList.size(); ++i)
+   {
+      theVertexList[i] = ossimIpt(theVertexList[i]);
+   }
+
+  if(compress&&theVertexList.size())
+   {
+      vector<ossimDpt> polyLine;
+      
+      polyLine.push_back(theVertexList[0]);
+      ossimDpt testPt = theVertexList[0];
+      for(i=1; i < (int)theVertexList.size(); ++i)
+      {
+         if(testPt!=theVertexList[i])
+         {
+            testPt = theVertexList[i];
+            polyLine.push_back(testPt);
+         }
+      }
+      if(polyLine.size() == 1)
+      {
+         polyLine.push_back(polyLine[0]);
+      }
+      
+      if(theVertexList.size() == 1)
+      {
+         polyLine.push_back(testPt);
+      }
+      theVertexList    = polyLine;
+      theCurrentVertex = 0;
+   }
+}
+
+ossimDpt ossimPolygon::midPoint()const
+{
+   int upper = (int)theVertexList.size();
+   ossimDpt result(0.0, 0.0);
+   int i = 0;
+
+   if(!upper)
+   {
+      result.makeNan();
+   }
+   else
+   {
+      for(i = 0; i < upper; ++i)
+      {
+         result.x+=theVertexList[i].x;
+         result.y+=theVertexList[i].y;
+      }
+      result.x/=(double)upper;
+      result.y/=(double)upper;
+   }
+   
+   return result;
+}
+
+bool ossimPolygon::hasNans()const
+{
+   int upper = (int)theVertexList.size();
+   int i = 0;
+
+   for(i = 0; i < upper; ++i)
+   {
+      if(theVertexList[i].hasNans())
+      {
+         return true;
+      }
+   }
+
+   return false;
+}
+
+void ossimPolygon::getIntegerBounds(ossim_int32& minX,
+   ossim_int32& minY,
+   ossim_int32& maxX,
+   ossim_int32& maxY)const
+{
+   ossim_int32 npoly = (ossim_int32)theVertexList.size();
+   int i = 0;
+
+   if(npoly)
+   {
+      minX = (ossim_int32)floor(theVertexList[0].x);
+      maxX = (ossim_int32)ceil(theVertexList[0].x);
+      minY = (ossim_int32)floor(theVertexList[0].y);
+      maxY = (ossim_int32)ceil(theVertexList[0].y);
+
+      for(i =1; i < npoly; ++i)
+      {
+         minX = std::min((ossim_int32)floor(theVertexList[i].x),
+            (ossim_int32)minX);
+         maxX = std::max((ossim_int32)ceil(theVertexList[i].x),
+            (ossim_int32)maxX);
+         minY = std::min((ossim_int32)floor(theVertexList[i].y),
+            (ossim_int32)minY);
+         maxY = std::max((ossim_int32)ceil(theVertexList[i].y),
+            (ossim_int32)maxY);
+      }
+   }
+   else
+   {
+      minX = OSSIM_INT_NAN;
+      minY = OSSIM_INT_NAN;
+      maxX = OSSIM_INT_NAN;
+      maxY = OSSIM_INT_NAN;
+   }
+}
+
+void ossimPolygon::getFloatBounds(ossim_float64& minX,
+                                  ossim_float64& minY,
+                                  ossim_float64& maxX,
+                                  ossim_float64& maxY) const
+{
+   ossim_int32 npoly = (ossim_int32)theVertexList.size();
+   int i = 0;
+
+   if(npoly)
+   {
+      minX = floor(theVertexList[0].x);
+      maxX = ceil(theVertexList[0].x);
+      minY = floor(theVertexList[0].y);
+      maxY = ceil(theVertexList[0].y);
+
+      for(i =1; i < npoly; ++i)
+      {
+         minX = std::min<double>(floor(theVertexList[i].x), minX);
+         maxX = std::max<double>(ceil(theVertexList[i].x),  maxX);
+         minY = std::min<double>(floor(theVertexList[i].y), minY);
+         maxY = std::max<double>(ceil(theVertexList[i].y),  maxY);
+      }
+   }
+   else
+   {
+      minX = ossim::nan();
+      minY = ossim::nan();
+      maxX = ossim::nan();
+      maxY = ossim::nan();
+   }
+}
+
+bool ossimPolygon::clipToRect(vector<ossimPolygon>& result,
+                              const ossimDrect& rect)const
+{
+   result.clear();
+   ossimPolyArea2d p1(*this);
+   ossimPolyArea2d p2(rect.ul(), rect.ur(), rect.lr(), rect.ll());
+   
+   p1&=p2;
+
+   p1.getVisiblePolygons(result);
+
+   return (result.size() > 0);
+}   
+
+//*****************************************************************************
+//  METHOD: ossimPolygon::clipLineSegment(p1, p2)
+//  
+//  Implements Cyrus-Beck clipping algorithm as described in:
+//  http://www.daimi.au.dk/~mbl/cgcourse/wiki/cyrus-beck_line-clipping_.html
+//
+//  Clips the line segment defined by the two endpoints provided. The
+//  endpoints are modified as needed to represent the clipped line. Returns
+//  true if intersection present.
+//  
+//*****************************************************************************
+bool ossimPolygon::clipLineSegment(ossimDpt& P, ossimDpt& Q) const
+{
+   ossimDpt PQ (Q - P);
+   double tE = 0.0;
+   double tL = 1.0;
+   ossimLine edge, edgeE, edgeL;
+   bool intersected=false;
+   double num, denom, t;
+   ossim_uint32 npol = (ossim_uint32)theVertexList.size();
+
+   checkOrdering();
+   //***
+   // clip the segment against each edge of the polygon
+   //***
+   ossim_uint32 i = 0;
+   ossim_uint32 j = 0;
+   for(i = 0, j = 1; i < npol;)
+   {
+      edge = ossimLine(theVertexList[i],
+                       theVertexList[j]);
+      
+      ossimDpt normal = edge.normal();
+
+      // Fix from CChuah at observera.com for counter clockwise polygons. (drb)
+      if (theOrderingType == OSSIM_COUNTERCLOCKWISE_ORDER)
+      {
+         normal.x = -normal.x;
+         normal.y = -normal.y;
+      }
+      
+      denom = normal.x*PQ.x + normal.y*PQ.y;
+      
+      num = normal.x*(edge.theP1.x - P.x) + normal.y*(edge.theP1.y - P.y);
+      
+      if (denom < 0)
+      {
+         //***
+         // Appears to be entering:
+         //***
+         t = num / denom;
+         if (t > tE)
+         {
+            tE = t; //+ FLT_EPSILON;
+            edgeE = edge;
+         }
+      }
+      else if (denom > 0)
+      {
+         //***
+         // Appears to be leaving:
+         //***
+         t = num / denom;
+         if (t < tL)
+         {
+            tL = t;// - FLT_EPSILON;
+            edgeL = edge;
+         }
+      }
+
+      ++i;
+      ++j;
+      j%=npol;
+   } 
+   
+   //***
+   // Compute clipped end points:
+   //***
+   if(tL >= tE)
+   {
+       Q.x = P.x + tL*PQ.x;
+       Q.y = P.y + tL*PQ.y;
+       P.x += tE*PQ.x;
+       P.y += tE*PQ.y;
+       intersected = true;
+   }
+   
+   return intersected;
+}
+
+/**
+* METHOD: isRectWithin()
+* Returns true if all the corner points of the given rect fit within.
+*/
+bool ossimPolygon::isRectWithin(const ossimIrect &rect) const 
+{
+    if(isPointWithin(rect.ul()) &&
+       isPointWithin(rect.ur()) &&
+       isPointWithin(rect.ll()) &&
+       isPointWithin(rect.lr())) {
+       	return true;
+    }
+    return false;
+}
+/**
+* METHOD: isPolyWithin()
+* Returns true if all the vertices of the given polygon fit within.
+*/
+bool ossimPolygon::isPolyWithin(const ossimPolygon &poly) const 
+{
+   bool ret=false;
+   int numvertex=poly.getNumberOfVertices();
+   if(getNumberOfVertices()>1 && numvertex) {
+      ret=true;
+      for(int v=0;v<numvertex;v++) {
+         if(!isPointWithin(poly[v])) {
+            ret=false;
+            break;
+         }
+      }
+   }
+   return ret;
+}
+
+//*****************************************************************************
+//  METHOD: ossimPolygon::pointWithin(const ossimDpt& point)
+//  
+//  Returns TRUE if point is inside polygon.
+//  
+//*****************************************************************************
+bool ossimPolygon::isPointWithin(const ossimDpt& point) const
+{
+
+   int i, j, c = 0;
+   int npol = (int)theVertexList.size();
+
+   for (i = 0, j = npol-1; i < npol; j = i++)
+   {
+      if ((((theVertexList[i].y <= point.y) && (point.y < theVertexList[j].y)) ||
+           ((theVertexList[j].y <= point.y) && (point.y < theVertexList[i].y))) &&
+          (point.x < (theVertexList[j].x - theVertexList[i].x) * (point.y - theVertexList[i].y) /
+           (theVertexList[j].y - theVertexList[i].y) + theVertexList[i].x))
+      {
+         c = !c;
+      }
+   }
+
+   if(!c) // check if on if not within
+   {
+      for (i = 0, j = npol-1; i < npol; j = i++)
+      {
+         if(ossimLine(theVertexList[i], theVertexList[j]).isPointWithin(point))
+         {
+            return true;
+         }
+      }
+   }
+
+   return (c!=0);
+}
+
+//*****************************************************************************
+//  METHOD: ossimPolygon::vertex(int)
+//  
+//  Returns the ossimDpt vertex given the index. Also initializes the current
+//  edge (theCurrentEdge) to the edge corresponding to the index.
+//  
+//*****************************************************************************
+bool ossimPolygon::vertex(int index, ossimDpt& tbd_vertex) const 
+{
+   if((index >= (int)theVertexList.size()) ||
+      (index < 0))
+   {
+      return false;
+   }
+
+   tbd_vertex = theVertexList[index];
+   theCurrentVertex = index;
+
+   return true;
+}
+
+//*****************************************************************************
+//  METHOD: ossimPolygon::nextVertex()
+//  
+//  Assigns the ossimDpt tbd_vertex following the current vertex. The current
+//  vertex is initialized with a call to vertex(int), or after the last
+//  vertex is reached (initialized to theFirstEdge. Returns false if no vertex
+//  defined.
+//
+//*****************************************************************************
+bool ossimPolygon::nextVertex(ossimDpt& tbd_vertex) const 
+{
+   ++theCurrentVertex;
+   if(theCurrentVertex >= (ossim_int32)theVertexList.size())
+   {
+      return false;
+   }
+   tbd_vertex = theVertexList[theCurrentVertex];
+   
+   return true;
+}
+
+//*****************************************************************************
+//  METHOD: operator=()
+//  
+//*****************************************************************************
+const ossimPolygon& ossimPolygon::operator= (const ossimIrect& rect)
+{
+   theCurrentVertex = 0;
+   theVertexList.resize(4);
+   theVertexList[0] = rect.ul();
+   theVertexList[1] = rect.ur();
+   theVertexList[2] = rect.lr();
+   theVertexList[3] = rect.ll();
+
+   return *this;
+}
+
+const ossimPolygon& ossimPolygon::operator= (const ossimDrect& rect)
+{
+   theCurrentVertex = 0;
+   theVertexList.resize(4);
+   theVertexList[0] = rect.ul();
+   theVertexList[1] = rect.ur();
+   theVertexList[2] = rect.lr();
+   theVertexList[3] = rect.ll();
+
+   return *this;
+}
+
+const ossimPolygon&  ossimPolygon::operator=(const ossimPolygon& polygon)
+{
+   theVertexList    = polygon.theVertexList;
+   theCurrentVertex = polygon.theCurrentVertex;
+   theOrderingType  = polygon.theOrderingType;
+   
+   return *this;
+}
+
+const ossimPolygon& ossimPolygon::operator= (const vector<ossimDpt>& vertexList)
+{
+   theVertexList    = vertexList;
+   theCurrentVertex = 0;
+   theOrderingType = OSSIM_VERTEX_ORDER_UNKNOWN;
+   
+   return *this;
+}
+
+const ossimPolygon& ossimPolygon::operator=(const vector<ossimIpt>& vertexList)
+{
+   theVertexList.resize(vertexList.size());
+   
+   // Assign std::vector<ossimIpt> list to std::vector<ossimDpt> theVertexList.
+   for (std::vector<ossimIpt>::size_type i = 0; i < vertexList.size(); ++i)
+   {
+      theVertexList[i] = vertexList[i];
+   }
+   
+   theCurrentVertex = 0;
+   theOrderingType = OSSIM_VERTEX_ORDER_UNKNOWN;
+   
+   return *this;
+}
+
+//*****************************************************************************
+//  METHOD: operator==()
+//  
+//*****************************************************************************
+bool ossimPolygon::operator==(const ossimPolygon& polygon) const
+{
+   if( (theVertexList.size() != polygon.theVertexList.size()))
+   {
+      return false;
+   }
+   if(!theVertexList.size() && polygon.theVertexList.size())
+   {
+      return true;
+   }
+
+   return (theVertexList == polygon.theVertexList);
+}
+
+const ossimPolygon& ossimPolygon::operator *=(const ossimDpt& scale)
+{
+   ossim_uint32 upper = (ossim_uint32)theVertexList.size();
+   ossim_uint32 i = 0;
+   for(i = 0; i < upper; ++i)
+   {
+      theVertexList[i].x*=scale.x;
+      theVertexList[i].y*=scale.y;
+   }
+   
+   return *this;
+}
+
+ossimPolygon ossimPolygon::operator *(const ossimDpt& scale)const
+{
+   ossimPolygon result(*this);
+
+   ossim_uint32 upper = (ossim_uint32)theVertexList.size();
+   ossim_uint32 i = 0;
+   for(i = 0; i < upper; ++i)
+   {
+      result.theVertexList[i].x*=scale.x;
+      result.theVertexList[i].y*=scale.y;
+   }
+
+   return result;
+}
+
+
+void ossimPolygon::reverseOrder()
+{
+   std::reverse(theVertexList.begin(), theVertexList.end());
+   
+   if(theOrderingType == OSSIM_COUNTERCLOCKWISE_ORDER)
+   {
+      theOrderingType = OSSIM_CLOCKWISE_ORDER;
+   }
+   else if(theOrderingType == OSSIM_CLOCKWISE_ORDER)
+   {
+      theOrderingType =  OSSIM_COUNTERCLOCKWISE_ORDER;
+   }
+   
+}
+
+//*****************************************************************************
+//  METHOD: ossimPolygon::print(ostream)
+//  
+//*****************************************************************************
+void ossimPolygon::print(ostream& os) const
+{
+   copy(theVertexList.begin(),
+        theVertexList.end(),
+        ostream_iterator<ossimDpt>(os, "\n"));
+}
+
+
+ossimVertexOrdering ossimPolygon::checkOrdering()const
+{
+   if(theOrderingType == OSSIM_VERTEX_ORDER_UNKNOWN)
+   {
+      double areaValue = area();
+      if(areaValue > 0)
+      {
+         theOrderingType = OSSIM_COUNTERCLOCKWISE_ORDER;
+      }
+      else if(areaValue <= 0)
+      {
+         theOrderingType = OSSIM_CLOCKWISE_ORDER;
+      }
+   }
+
+   return theOrderingType;
+}
+
+void ossimPolygon::intersectEdge(ossimDpt& result,
+                                 const ossimLine& segment,
+                                 const ossimDrect& rect,
+                                 int edge)
+{
+   ossimLine edgeLine;
+   switch(edge)
+   {
+   case RECT_LEFT_EDGE:
+   {
+      edgeLine.theP1 = rect.ll();
+      edgeLine.theP2 = rect.ul();
+      break;
+   }
+   case RECT_TOP_EDGE:
+   {
+      edgeLine.theP1 = rect.ul();
+      edgeLine.theP2 = rect.ur();
+      break;
+   }
+   case RECT_RIGHT_EDGE:
+   {
+      edgeLine.theP1 = rect.ur();
+      edgeLine.theP2 = rect.lr();
+      break;
+   }
+   case RECT_BOTTOM_EDGE:
+   {
+      edgeLine.theP1 = rect.lr();
+      edgeLine.theP2 = rect.ll();
+      break;
+   }
+   }
+   
+   result = segment.intersectInfinite(edgeLine);
+}
+
+bool ossimPolygon::isInsideEdge(const ossimDpt& pt,
+                                const ossimDrect& rect,
+                                int edge)const
+{
+   switch(edge)
+   {
+   case RECT_LEFT_EDGE:
+   {
+      return (pt.x>rect.ul().x);
+      break;
+   }
+   case RECT_TOP_EDGE:
+   {
+      if(rect.orientMode() == OSSIM_LEFT_HANDED)
+      {
+         return (pt.y > rect.ul().y);
+      }
+      else
+      {
+         return (pt.y < rect.ul().y);
+      }
+      break;
+   }
+   case RECT_RIGHT_EDGE:
+   {
+      return (pt.x<rect.lr().x);
+      
+      break;
+   }
+   case RECT_BOTTOM_EDGE:
+   {
+      if(rect.orientMode() == OSSIM_LEFT_HANDED)
+      {
+         return (pt.y < rect.lr().y);
+      }
+      else
+      {
+         return (pt.y > rect.lr().y);
+      }
+      break;
+   }
+   }
+   return false;
+}
+
+
+bool ossimPolygon::saveState(ossimKeywordlist& kwl,
+                             const char* prefix)const
+{
+   kwl.add(prefix,
+           ossimKeywordNames::TYPE_KW,
+           "ossimPolygon",
+           true);
+   kwl.add(prefix,
+           NUMBER_VERTICES_KW,
+           static_cast<ossim_uint32>(theVertexList.size()),
+           true);
+   int i = 0;
+   for(i = 0; i < (int)theVertexList.size();++i)
+   {
+      ossimString vert = "v"+ossimString::toString(i);;
+      ossimString value = (ossimString::toString(theVertexList[i].x) + " " +
+                           ossimString::toString(theVertexList[i].y) );
+      kwl.add(prefix,
+              vert.c_str(),
+              value.c_str(),
+              true);
+   }
+   ossimString order = "";
+   
+   switch(theOrderingType)
+   {
+   case OSSIM_VERTEX_ORDER_UNKNOWN:
+   {
+      order = "unknown";
+      break;
+   }
+   case OSSIM_CLOCKWISE_ORDER:
+   {
+      order = "clockwise";
+      break;
+   }
+   case OSSIM_COUNTERCLOCKWISE_ORDER:
+   {
+      order = "counter_clockwise";
+      break;
+   }
+   }
+   kwl.add(prefix,
+           VERTEX_ORDER_KW,
+           order,
+           true);
+
+   return true;
+}
+   
+bool ossimPolygon::loadState(const ossimKeywordlist& kwl,
+                             const char* prefix)
+{
+   ossimString order = kwl.find(prefix, VERTEX_ORDER_KW);
+   const char* number_vertices = kwl.find(prefix, NUMBER_VERTICES_KW);
+   ossimString x,y;
+   if(order=="unknown")
+   {
+      theOrderingType = OSSIM_VERTEX_ORDER_UNKNOWN;
+   }
+   else if(order =="clockwise")
+   {
+      theOrderingType = OSSIM_CLOCKWISE_ORDER;
+   }
+   else if(order =="counter_clockwise")
+   {
+      theOrderingType = OSSIM_COUNTERCLOCKWISE_ORDER;
+   }
+
+   theVertexList.clear();
+   int vertexCount = ossimString(number_vertices).toLong();
+   int i = 0;
+   for(i = 0; i < vertexCount; ++i)
+   {
+      ossimString v = kwl.find(prefix, (ossimString("v")+ossimString::toString(i)).c_str());
+      v = v.trim();
+
+      istringstream vStream(v.string());
+      vStream >> x.string() >> y.string();
+      theVertexList.push_back(ossimDpt(x.toDouble(),y.toDouble()));
+   }
+
+   return true;
+}
+
+void ossimPolygon::getMinimumBoundingRect(ossimPolygon& minRect) const
+{
+   static const double MIN_STEP = (0.5)*M_PI/180.0;
+   double angle_step = M_PI/8.0;  // initial rotation step size for min area search = 22.5 deg
+   double theta;
+   double best_theta = M_PI/4.0;  // Initial guess is 45 deg orientation
+   double center_theta;
+   double cos_theta, sin_theta;
+   ossimPolygon rotatedPolygon(*this);
+   ossimDpt xlatedVertex;
+   ossimDpt rotatedVertex(0.0, 0.0);
+   double min_x, min_y, max_x, max_y;
+   double area;
+   double min_area = 1.0/DBL_EPSILON;
+   rotatedPolygon.theVertexList[0] = ossimDpt(0, 0);  // first vertex always at origin
+   bool first_time = true;
+   ossimDrect best_rect;
+   static const bool TESTING = false;
+
+   //***
+   // Loop to converge on best orientation angle for bounding polygon:
+   //***
+   while (angle_step > MIN_STEP)
+   {
+      //***
+      // Try four different rotations evenly centered about the current best guess:
+      //***
+      center_theta = best_theta;
+      for (int i=0; i<5; i++)
+      {
+         //***
+         // Check for i=2 (center angle) since already computed quantities for this in last iteration
+         // unless this is first time through:
+         //***
+         if ((i != 2) || (first_time)) 
+         {
+            theta = center_theta + (i - 2.0)*angle_step;
+            cos_theta = cos(theta);
+            sin_theta = sin(theta);
+            min_x = rotatedPolygon.theVertexList[0].x;
+            min_y = rotatedPolygon.theVertexList[0].y;
+            max_x = min_x;
+            max_y = min_y;
+
+            //***
+            // Translate polygon to origin and rotate all vertices by current theta:
+            //***
+            for (unsigned int vertex=1; vertex < theVertexList.size(); vertex++)
+            {
+               xlatedVertex.x = theVertexList[vertex].x - theVertexList[0].x;
+               xlatedVertex.y = theVertexList[vertex].y - theVertexList[0].y;
+               rotatedVertex.x = cos_theta*xlatedVertex.x + sin_theta*xlatedVertex.y;
+               rotatedVertex.y = cos_theta*xlatedVertex.y - sin_theta*xlatedVertex.x;
+               rotatedPolygon.theVertexList[vertex] = rotatedVertex;
+
+               //***
+               // Latch max and mins of bounding rect:
+               //***
+               if (min_x > rotatedVertex.x) min_x = rotatedVertex.x;
+               if (min_y > rotatedVertex.y) min_y = rotatedVertex.y;
+               if (max_x < rotatedVertex.x) max_x = rotatedVertex.x;
+               if (max_y < rotatedVertex.y) max_y = rotatedVertex.y;
+            }
+
+            if (TESTING)
+            {
+               ossimDpt v1 (cos_theta*min_x - sin_theta*max_y + theVertexList[0].x,
+                            cos_theta*max_y + sin_theta*min_x + theVertexList[0].y);
+               ossimDpt v2 (cos_theta*max_x - sin_theta*max_y + theVertexList[0].x,
+                            cos_theta*max_y + sin_theta*max_x + theVertexList[0].y);
+               ossimDpt v3 (cos_theta*max_x - sin_theta*min_y + theVertexList[0].x,
+                            cos_theta*min_y + sin_theta*max_x + theVertexList[0].y);
+               ossimDpt v4 (cos_theta*min_x - sin_theta*min_y + theVertexList[0].x,
+                            cos_theta*min_y + sin_theta*min_x + theVertexList[0].y);
+               cout << v1.x << "\t" << v1.y << endl;
+               cout << v2.x << "\t" << v2.y << endl;
+               cout << v3.x << "\t" << v3.y << endl;
+               cout << v4.x << "\t" << v4.y << endl << endl;
+            }
+
+            //***
+            // Establish bounding rect and area about rotated polygon:
+            //***
+            area = (max_x - min_x) * (max_y - min_y);
+            if (area < min_area)
+            {
+               best_theta = theta;
+               min_area = area;
+               best_rect = ossimDrect(min_x, max_y, max_x, min_y, OSSIM_RIGHT_HANDED);
+            }
+         } // end if (i != 2 || first_time)
+      }  // end for-loop over surrounding rotations
+
+      //***
+      // Adjust step size by half to repeat process:
+      //***
+      angle_step /= 2.0;
+      first_time = false;
+
+   } // end while loop for convergence
+
+   //***
+   // best_theta now contains optimum rotation of bounding rect. Need to apply reverse
+   // rotation and translation of best_rect:
+   //***
+   cos_theta = cos(best_theta);
+   sin_theta = sin(best_theta);
+   ossimDpt v1 (cos_theta*best_rect.ul().x - sin_theta*best_rect.ul().y + theVertexList[0].x,
+                cos_theta*best_rect.ul().y + sin_theta*best_rect.ul().x + theVertexList[0].y);
+   ossimDpt v2 (cos_theta*best_rect.ur().x - sin_theta*best_rect.ur().y + theVertexList[0].x,
+                cos_theta*best_rect.ur().y + sin_theta*best_rect.ur().x + theVertexList[0].y);
+   ossimDpt v3 (cos_theta*best_rect.lr().x - sin_theta*best_rect.lr().y + theVertexList[0].x,
+                cos_theta*best_rect.lr().y + sin_theta*best_rect.lr().x + theVertexList[0].y);
+   ossimDpt v4 (cos_theta*best_rect.ll().x - sin_theta*best_rect.ll().y + theVertexList[0].x,
+                cos_theta*best_rect.ll().y + sin_theta*best_rect.ll().x + theVertexList[0].y);
+    
+   if (TESTING)
+   {
+      cout << v1.x << "\t" << v1.y << endl;
+      cout << v2.x << "\t" << v2.y << endl;
+      cout << v3.x << "\t" << v3.y << endl;
+      cout << v4.x << "\t" << v4.y << endl << endl;
+   }
+
+   //***
+   // Assign return value rect:
+   //***
+   minRect.clear();
+   minRect.addPoint(v1);
+   minRect.addPoint(v2);
+   minRect.addPoint(v3);
+   minRect.addPoint(v4);
+
+   // Make sure we are always returning a positive clockwise area.
+   minRect.checkOrdering();
+   if(minRect.getOrdering()==OSSIM_COUNTERCLOCKWISE_ORDER)
+      minRect.reverseOrder();
+   return;
+}
+
+/**
+* METHOD: remove() 
+* Removes the vertex from the polygon.
+*/
+void ossimPolygon::removeVertex(int vertex)
+{
+   int numvertices=getNumberOfVertices();
+   if(vertex>numvertices) {
+      return;
+   } else {
+      vector<ossimDpt>::iterator it;
+      int v=0;
+      for(it=theVertexList.begin();it!=theVertexList.end();it++) {
+         if(v++==vertex) {
+            theVertexList.erase(it);
+            break;
+         }
+      }
+   }
+}
+
+/**
+* METHOD: removeSmallestContributingVertex() 
+* Removes the vertex that contributes the smallest area to the polygon.
+*/
+void ossimPolygon::removeSmallestContributingVertex()
+{
+   unsigned int numvertices=getNumberOfVertices();
+   if (!numvertices)
+      return;
+
+   int smallest_vertex=-1,n1,n2;
+   double smallest_area=1.0/DBL_EPSILON;
+   ossimPolygon tmp;
+
+   for(unsigned int v=0;v<numvertices;v++) {
+      tmp.clear();
+      if(v==0) {
+         n1=numvertices-1;
+         n2=1;
+      } else if(v==numvertices-1) {
+         n1=numvertices-2;
+         n2=0;
+      } else {
+         n1=v-1;
+         n2=v+1;
+      }
+
+      tmp.addPoint(theVertexList[n1]);
+      tmp.addPoint(theVertexList[v]);
+      tmp.addPoint(theVertexList[n2]);
+
+      if(fabs(tmp.area())<smallest_area) {
+         smallest_area=fabs(tmp.area());
+         smallest_vertex=v;
+      }
+   }
+   removeVertex(smallest_vertex);
+}
+
+
+ossimDpt& ossimPolygon::operator[](int index)
+{
+   return theVertexList[index];
+}
+
+const ossimDpt& ossimPolygon::operator[](int index)const
+{
+   return theVertexList[index];
+}
+
+ossim_uint32 ossimPolygon::getVertexCount()const
+{
+   return getNumberOfVertices();
+}
+
+ossim_uint32 ossimPolygon::getNumberOfVertices()const
+{
+   return (ossim_uint32)theVertexList.size();
+}
+
+void ossimPolygon::getBoundingRect(ossimIrect& rect)const
+{
+   ossim_int32 minX;
+   ossim_int32 minY;
+   ossim_int32 maxX;
+   ossim_int32 maxY;
+   getIntegerBounds(minX, minY, maxX, maxY);
+   rect = ossimIrect(minX, minY, maxX, maxY);
+}
+
+void ossimPolygon::getBoundingRect(ossimDrect& rect)const
+{
+   ossim_float64 minX;
+   ossim_float64 minY;
+   ossim_float64 maxX;
+   ossim_float64 maxY;
+   getFloatBounds(minX, minY, maxX, maxY);
+   rect = ossimDrect(minX, minY, maxX, maxY);
+}
+
+void ossimPolygon::clear()
+{
+   theVertexList.clear();
+   theOrderingType = OSSIM_VERTEX_ORDER_UNKNOWN;
+}
+
+void ossimPolygon::addPoint(const ossimDpt& pt)
+{
+   theVertexList.push_back(pt);
+   theOrderingType = OSSIM_VERTEX_ORDER_UNKNOWN;
+}
+
+void ossimPolygon::addPoint(double x, double y)
+{
+   theVertexList.push_back(ossimDpt(x, y));
+   theOrderingType = OSSIM_VERTEX_ORDER_UNKNOWN;
+}
+
+const vector<ossimDpt>& ossimPolygon::getVertexList()const
+{
+   return theVertexList;
+}
+
+ bool ossimPolygon::pointWithin(const ossimDpt& point) const
+{
+   return isPointWithin(point);
+}
+
+const ossimPolygon& ossimPolygon::operator *=(double scale)
+{
+   return ((*this)*=ossimDpt(scale, scale));
+}
+
+ossimPolygon ossimPolygon::operator *(double scale)const
+{
+   return ((*this)*ossimDpt(scale, scale));
+}
+
+void ossimPolygon::resize(ossim_uint32 newSize)
+{
+   theVertexList.resize(newSize);
+   theOrderingType  = OSSIM_VERTEX_ORDER_UNKNOWN;
+   theCurrentVertex = 0;
+}
+
+ossimVertexOrdering ossimPolygon::getOrdering()const
+{
+   return theOrderingType;
+}
+
+bool ossimPolygon::operator!=(const ossimPolygon& compare_this) const
+{
+   return !(*this == compare_this);
+}
+
+ostream& operator<<(ostream& os, const ossimPolygon& polygon)
+{
+   polygon.print(os);
+   return os;
+}
+
+/**
+* METHOD: getCentroid() 
+* Assigns the ossimDpt centroid the polygon.
+* Warning: centroid is not guaranteed to be inside the polygon!
+*/
+void ossimPolygon::getCentroid(ossimDpt &centroid) const
+{
+   int numpts = (int)theVertexList.size();
+   unsigned int next;
+   double area=0,parea;
+
+   centroid=ossimDpt(0,0);
+   for(int i=0;i<numpts;i++) {
+      if(i<numpts-1) {
+         next=i+1;
+      } else {
+         next=0;
+      }
+      parea=theVertexList[i].x*theVertexList[next].y-theVertexList[next].x*theVertexList[i].y;
+      area+=parea;
+      centroid.x+=(theVertexList[i].x+theVertexList[next].x)*parea;
+      centroid.y+=(theVertexList[i].y+theVertexList[next].y)*parea;
+   }
+   area=area/2.0;
+   centroid=centroid/(area*6.0);
+}
+
+/**
+* METHOD: fitCircleInsideVertex() 
+* Assigns destPt the point that fits a circle of given radius inside the polygon vertex.
+* Warning: destPt is not guaranteed to be inside the polygon!
+* (you may not be able to fit a circle of the given radius inside the polygon)
+*/
+void ossimPolygon::fitCircleInsideVertex(ossimDpt &destPt, unsigned int vertex, double radius) const
+{
+   ossim_uint32 num_vertices=(int)theVertexList.size(),n1,n2;
+   ossimDpt side1,side2,bisection,currpt;
+   double length_out,side1_side2_cross;
+   bool concave=true;
+
+   // don't be doing that dude.
+   if(num_vertices<3 || vertex>=num_vertices) {
+      destPt=ossimDpt(0,0);
+      return;
+   }
+ 
+   if(vertex==0) {
+      n1=num_vertices-1;
+      n2=vertex+1;
+   } else if(vertex==num_vertices-1) {
+      n1=num_vertices-2;
+      n2=0;
+   } else {
+      n1=vertex-1;
+      n2=vertex+1;
+   }
+
+   currpt=theVertexList[vertex];
+   // get the side vectors
+   side1=theVertexList[n1]-currpt;
+   side2=theVertexList[n2]-currpt;
+
+   // normalize the sides
+   side1 = side1/side1.length();
+   side2 = side2/side2.length();
+
+   side1_side2_cross=side1.x*side2.y-side2.x*side1.y;
+
+   checkOrdering();
+   if(getOrdering()==OSSIM_COUNTERCLOCKWISE_ORDER) {
+      if(side1_side2_cross<0)
+         concave=false;
+   } else { //clockwise
+      if(side1_side2_cross>0)
+         concave=false;
+   }
+
+   bisection = side1+side2;
+   bisection = bisection/bisection.length();
+
+   if(concave) {
+      bisection=bisection*-1.0;
+      length_out=radius;
+   } else {
+      double cos_theta=(side1.x*bisection.x+side1.y*bisection.y);
+      length_out=radius/sqrt(1-cos_theta*cos_theta);
+   }
+   destPt=ossimDpt(currpt+bisection*length_out);
+   return;
+}
+
+
+/**
+//! Shrinks this polygon by radius. Effectively, circles of given radius are placed inside 
+//! the vertices just tangent to the polygon edges (via fitCircleInsideVertex()). The new
+//! polygon's vertices will be the center of these circles. Return true if success. 
+*/
+bool ossimPolygon::shrink(ossimPolygon &dest, double inset) const 
+{
+   int numpts = (int) theVertexList.size();
+   ossimDpt pt;
+   
+   //don't let people shrink themselves, that isn't going to work
+   if(&dest==this) return false;
+
+   dest.clear();
+   for(int i=0;i<numpts;i++) {
+      fitCircleInsideVertex(pt,i,inset);
+      dest.addPoint(pt);
+   }
+   if(isPolyWithin(dest)) {
+      return true;
+   } else {
+      //return an empty polygon
+      dest=ossimPolygon();
+      return false;
+   }
+}
+
+
+
+
diff --git a/src/ossim/base/ossimPreferences.cpp b/ossim/src/ossim/base/ossimPreferences.cpp
similarity index 100%
rename from src/ossim/base/ossimPreferences.cpp
rename to ossim/src/ossim/base/ossimPreferences.cpp
diff --git a/ossim/src/ossim/base/ossimProcessInterface.cpp b/ossim/src/ossim/base/ossimProcessInterface.cpp
new file mode 100644
index 0000000..b06f82a
--- /dev/null
+++ b/ossim/src/ossim/base/ossimProcessInterface.cpp
@@ -0,0 +1,145 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimProcessInterface.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ostream>
+
+#include <ossim/base/ossimProcessInterface.h>
+#include <ossim/base/ossimListenerManager.h>
+
+RTTI_DEF(ossimProcessInterface, "ossimProcessInterface");
+
+ossimProcessInterface::ossimProcessInterface()
+   :thePercentComplete(0.0),
+    theProcessStatus(PROCESS_STATUS_NOT_EXECUTING),
+    theMessage(""),
+    theEventFlag(true)
+{
+}
+
+ossimProcessInterface::~ossimProcessInterface()
+{
+}
+
+void ossimProcessInterface::abort()
+{
+   if(theProcessStatus == PROCESS_STATUS_EXECUTING)
+   {
+      setProcessStatus(PROCESS_STATUS_ABORT_REQUEST);
+   }
+}
+
+bool ossimProcessInterface::needsAborting() const
+{
+   return ( isAborted()|| isAbortRequested() );
+}
+
+bool ossimProcessInterface::isAbortRequested()const
+{
+   return (theProcessStatus == PROCESS_STATUS_ABORT_REQUEST);
+}
+
+bool ossimProcessInterface::isAborted()const
+{
+   return (theProcessStatus==PROCESS_STATUS_ABORTED);
+}
+
+bool ossimProcessInterface::isExecuting()const
+{
+   return ((theProcessStatus==PROCESS_STATUS_EXECUTING)||
+           (theProcessStatus==PROCESS_STATUS_ABORT_REQUEST));
+}
+
+ossimProcessInterface::ossimProcessStatus ossimProcessInterface::getProcessStatus()const
+{
+   return theProcessStatus;
+}
+
+void ossimProcessInterface::setProcessStatus(ossimProcessStatus processStatus)
+{
+   theProcessStatus = processStatus;
+}
+
+double ossimProcessInterface::getPercentComplete()const
+{
+   return thePercentComplete;
+}
+
+void ossimProcessInterface::setPercentComplete(double percentComplete)
+{
+   thePercentComplete = percentComplete;
+
+   ossimListenerManager* manager = getManager();
+   if(theEventFlag&&manager)
+   {
+      ossimProcessProgressEvent event(getObject(),
+                                      thePercentComplete,
+                                      theMessage,
+                                      false);
+      manager->fireEvent(event);
+   }
+}
+
+ossimListenerManager* ossimProcessInterface::getManager()
+{
+   return PTR_CAST(ossimListenerManager, getObject());
+}
+
+void ossimProcessInterface::enableEvents()
+{
+   theEventFlag = true;
+}
+   
+void ossimProcessInterface::disableEvents()
+{
+   theEventFlag = false;
+}
+
+void ossimProcessInterface::setCurrentMessage(const ossimString& message)
+{
+   theMessage = message;
+
+   ossimListenerManager* manager = getManager();
+   if(theEventFlag&&manager)
+   {
+      ossimProcessProgressEvent event(getObject(),
+                                      thePercentComplete,
+                                      theMessage,
+                                      true);
+      manager->fireEvent(event);
+   }   
+}
+
+std::ostream& ossimProcessInterface::print(std::ostream& out) const
+{
+   out << "process status: ";
+   if(theProcessStatus == PROCESS_STATUS_EXECUTING)
+   {
+      out << "executing" << std::endl;
+   }
+   else if(theProcessStatus == PROCESS_STATUS_ABORTED)
+   {
+      out << "aborted" << std::endl;
+   }
+   else if(theProcessStatus == PROCESS_STATUS_NOT_EXECUTING)
+   {
+      out << "not executing" << std::endl;
+   }
+   out << "percent_complete: " << thePercentComplete;
+   
+   return out;
+}
+
+std::ostream& operator<<(std::ostream& out, const ossimProcessInterface& data)
+{
+   return data.print(out);
+}
+
diff --git a/ossim/src/ossim/base/ossimProcessListener.cpp b/ossim/src/ossim/base/ossimProcessListener.cpp
new file mode 100644
index 0000000..379a7e5
--- /dev/null
+++ b/ossim/src/ossim/base/ossimProcessListener.cpp
@@ -0,0 +1,45 @@
+//----------------------------------------------------------------------------
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+// $Id: ossimProcessListener.cpp 23664 2015-12-14 14:17:27Z dburken $
+//----------------------------------------------------------------------------
+
+#include <ossim/base/ossimProcessListener.h>
+#include <ossim/base/ossimProcessProgressEvent.h>
+
+RTTI_DEF1(ossimProcessListener, "ossimProcessListener", ossimListener);
+
+ossimProcessListener::ossimProcessListener()
+   : ossimListener()
+{}
+
+ossimProcessListener::~ossimProcessListener()
+{}
+
+void ossimProcessListener::processEvent(ossimEvent& event)
+{
+   switch(event.getId())
+   {
+   case OSSIM_EVENT_PROCESS_PROGRESS_ID:
+   {
+      ossimProcessProgressEvent* eventCast = static_cast<ossimProcessProgressEvent*>(&event);
+      processProgressEvent(*eventCast);
+      break;
+   }
+   default:
+   {
+      ossimListener::processEvent(event);
+      break;
+   }
+   }
+}
+
+void ossimProcessListener::processProgressEvent(ossimProcessProgressEvent& /* event */ )
+{}
+
diff --git a/ossim/src/ossim/base/ossimProcessProgressEvent.cpp b/ossim/src/ossim/base/ossimProcessProgressEvent.cpp
new file mode 100644
index 0000000..5018a38
--- /dev/null
+++ b/ossim/src/ossim/base/ossimProcessProgressEvent.cpp
@@ -0,0 +1,69 @@
+//----------------------------------------------------------------------------
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+// Description: Event for process progress.
+//
+// $Id: ossimProcessProgressEvent.cpp 23664 2015-12-14 14:17:27Z dburken $
+//----------------------------------------------------------------------------
+#include <ossim/base/ossimProcessProgressEvent.h>
+
+RTTI_DEF1(ossimProcessProgressEvent, "ossimProcessProgressEvent", ossimEvent);
+
+ossimProcessProgressEvent::ossimProcessProgressEvent(ossimObject* owner,
+                                                     double percentComplete,
+                                                     const ossimString message,
+                                                     bool outputMessageFlag)
+   :
+      ossimEvent(owner, OSSIM_EVENT_PROCESS_PROGRESS_ID),
+      thePercentComplete(percentComplete),
+      theMessage(message),
+      theOutputMessageFlag(outputMessageFlag)
+{
+}
+
+ossimObject* ossimProcessProgressEvent::dup()const
+{
+   return new ossimProcessProgressEvent(*this);
+}
+
+double ossimProcessProgressEvent::getPercentComplete()const
+{
+   return thePercentComplete;
+}
+   
+ossimString ossimProcessProgressEvent::getMessage()const
+{
+   return theMessage;
+}
+
+void ossimProcessProgressEvent::getMessage(ossimString& message)const
+{
+   message = theMessage;
+}
+   
+void ossimProcessProgressEvent::setPercentComplete(double percentComplete)
+{
+   thePercentComplete = percentComplete;
+}
+
+void ossimProcessProgressEvent::setMessage(const ossimString& message)
+{
+   theMessage = message;
+}
+
+void ossimProcessProgressEvent::setOutputMessageFlag(bool flag)
+{
+   theOutputMessageFlag = flag;
+}
+
+bool ossimProcessProgressEvent::getOutputMessageFlag() const
+{
+   return theOutputMessageFlag;
+}
+
diff --git a/src/ossim/base/ossimProperty.cpp b/ossim/src/ossim/base/ossimProperty.cpp
similarity index 100%
rename from src/ossim/base/ossimProperty.cpp
rename to ossim/src/ossim/base/ossimProperty.cpp
diff --git a/src/ossim/base/ossimPropertyInterface.cpp b/ossim/src/ossim/base/ossimPropertyInterface.cpp
similarity index 100%
rename from src/ossim/base/ossimPropertyInterface.cpp
rename to ossim/src/ossim/base/ossimPropertyInterface.cpp
diff --git a/src/ossim/base/ossimPropertyInterfaceFactory.cpp b/ossim/src/ossim/base/ossimPropertyInterfaceFactory.cpp
similarity index 100%
rename from src/ossim/base/ossimPropertyInterfaceFactory.cpp
rename to ossim/src/ossim/base/ossimPropertyInterfaceFactory.cpp
diff --git a/src/ossim/base/ossimPropertyInterfaceRegistry.cpp b/ossim/src/ossim/base/ossimPropertyInterfaceRegistry.cpp
similarity index 100%
rename from src/ossim/base/ossimPropertyInterfaceRegistry.cpp
rename to ossim/src/ossim/base/ossimPropertyInterfaceRegistry.cpp
diff --git a/ossim/src/ossim/base/ossimQuadTreeWarp.cpp b/ossim/src/ossim/base/ossimQuadTreeWarp.cpp
new file mode 100644
index 0000000..f58d8e4
--- /dev/null
+++ b/ossim/src/ossim/base/ossimQuadTreeWarp.cpp
@@ -0,0 +1,1651 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimQuadTreeWarp.cpp 23324 2015-05-27 12:57:14Z dburken $
+
+#include <ossim/base/ossimQuadTreeWarp.h>
+#include <algorithm>
+#include <stack>
+#include <iostream>
+
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimNotifyContext.h>
+
+static ossimTrace traceExec  ("ossimQuadTreeWarp:exec");
+static ossimTrace traceDebug ("ossimQuadTreeWarp:debug");
+
+RTTI_DEF1(ossimQuadTreeWarp, "ossimQuadTreeWarp", ossim2dTo2dTransform);
+
+ossimQuadTreeWarpVertex::ossimQuadTreeWarpVertex(
+   const ossimDpt& position, const ossimDpt& delta)
+   :thePosition(position),
+    theDelta(delta),
+    theLockedFlag(false)
+{
+}
+
+ossimQuadTreeWarpVertex::~ossimQuadTreeWarpVertex()
+{
+   for(ossim_uint32 i = 0;i< theSharedNodeList.size();++i)
+   {
+      theSharedNodeList[i]->removeVertex(this);
+   }
+                  
+}
+
+void ossimQuadTreeWarpVertex::setPosition(const ossimDpt& position)
+{
+   thePosition = position;
+}
+
+void ossimQuadTreeWarpVertex::setDelta(const ossimDpt& delta)
+{
+   theDelta    = delta;
+}
+
+const ossimDpt& ossimQuadTreeWarpVertex::getDelta()const
+{
+   return theDelta;
+}
+
+const ossimDpt& ossimQuadTreeWarpVertex::getPosition()const
+{
+   return thePosition;
+}
+
+void ossimQuadTreeWarpVertex::addSharedNode(ossimQuadTreeWarpNode* node)
+{
+   if(node)
+   {
+      theSharedNodeList.push_back(node);
+   }
+}
+
+void ossimQuadTreeWarpVertex::removeNode(ossimQuadTreeWarpNode* node)
+{
+   std::vector<ossimQuadTreeWarpNode*>::iterator iter = theSharedNodeList.begin();
+   bool found = false;
+   ossimQuadTreeWarpNode* removedNode = NULL;
+   while((iter != theSharedNodeList.end())&&!found)
+   {
+      if(*iter == node)
+      {
+         removedNode = *iter;
+         iter = theSharedNodeList.erase(iter);
+         found = true;
+      }
+      else
+      {
+         ++iter;
+      }
+   }
+
+   if(removedNode)
+   {
+      removedNode->removeVertex(this);
+   }
+}
+
+bool ossimQuadTreeWarpVertex::isShared()const
+{
+   return (theSharedNodeList.size() > 0);
+}
+
+bool ossimQuadTreeWarpVertex::saveState(ossimKeywordlist& kwl,
+                                      const char* prefix)const
+{
+   kwl.add(prefix,
+           "x",
+           thePosition.x,
+           true);
+   kwl.add(prefix,
+           "y",
+           thePosition.y,
+           true);
+   kwl.add(prefix,
+           "dx",
+           theDelta.x,
+           true);
+   kwl.add(prefix,
+           "dy",
+           theDelta.y,
+           true);
+   kwl.add(prefix,
+           "lock_flag",
+           (int)theLockedFlag,
+           true);
+   
+   return true;
+}
+
+bool ossimQuadTreeWarpVertex::loadState(const ossimKeywordlist& kwl,
+                                        const char* prefix)
+{
+   const char* x = kwl.find(prefix,
+                            "x");
+   const char* y = kwl.find(prefix,
+                            "y");
+   const char* dx = kwl.find(prefix,
+                             "dx");
+   const char* dy = kwl.find(prefix,
+                             "dy");
+   const char* lockedFlag = kwl.find(prefix,
+                                     "lock_flag");
+   if(x&&y&&dx&&dy&&lockedFlag)
+   {
+      thePosition.x = ossimString(x).toDouble();
+      thePosition.y = ossimString(y).toDouble();
+      theDelta.x    = ossimString(dx).toDouble();
+      theDelta.y    = ossimString(dy).toDouble();
+      theLockedFlag = ossimString(lockedFlag).toBool();
+      
+      return true;
+   }
+   
+   return false;
+}
+
+ossimQuadTreeWarpNode::ossimQuadTreeWarpNode()
+   :
+   theUlVertex(NULL),
+   theUrVertex(NULL),
+   theLrVertex(NULL),
+   theLlVertex(NULL),
+   theParent(NULL)
+{
+   theBoundingRect.makeNan();
+}
+
+ossimQuadTreeWarpNode::ossimQuadTreeWarpNode(
+   const ossimDrect& bounds,
+   ossimQuadTreeWarpNode* parent,
+   ossimQuadTreeWarpVertex* ulVertex,
+   ossimQuadTreeWarpVertex* urVertex,
+   ossimQuadTreeWarpVertex* lrVertex,
+   ossimQuadTreeWarpVertex* llVertex)
+   :
+   theBoundingRect(bounds),
+   theUlVertex(ulVertex),
+   theUrVertex(urVertex),
+   theLrVertex(lrVertex),
+   theLlVertex(llVertex),
+   theParent(parent)
+{
+}
+
+ossimQuadTreeWarpNode::~ossimQuadTreeWarpNode()
+{
+   removeVertices();
+
+   theUlVertex = NULL;
+   theUrVertex = NULL;
+   theLrVertex = NULL;
+   theLlVertex = NULL;
+   
+}
+
+bool ossimQuadTreeWarpNode::hasValidVertices()const
+{
+   return (theUlVertex&&theUrVertex&&theLrVertex&&theLlVertex);
+}
+
+void ossimQuadTreeWarpNode::removeVertex(ossimQuadTreeWarpVertex* v)
+{
+   if(!v) return;
+   
+   if(theUlVertex == v)
+   {
+      theUlVertex = NULL;
+      v->removeNode(this);
+   }
+   if(theUrVertex == v)
+   {
+      theUrVertex = NULL;
+      v->removeNode(this);
+   }
+   if(theLrVertex == v)
+   {
+      theLrVertex = NULL;
+      v->removeNode(this);
+   }
+   if(theLlVertex == v)
+   {
+      theLlVertex = NULL;
+      v->removeNode(this);
+   }
+}
+void ossimQuadTreeWarpNode::removeVertices()
+{
+   removeVertex(theUlVertex);
+   removeVertex(theUrVertex);
+   removeVertex(theLrVertex);
+   removeVertex(theLlVertex);
+}
+
+bool ossimQuadTreeWarpNode::isLeaf()const
+{
+   return (theChildren.size() == 0);
+}
+
+void ossimQuadTreeWarpNode::clear()
+{
+   theBoundingRect.makeNan();
+   theChildren.clear();
+   theParent = NULL;
+   removeVertex(theUlVertex);
+   removeVertex(theUrVertex);
+   removeVertex(theLrVertex);
+   removeVertex(theLlVertex);
+}
+
+void ossimQuadTreeWarpNode::removeChild(ossimQuadTreeWarpNode* node)
+{
+   std::vector<ossimQuadTreeWarpNode*>::iterator iter =  theChildren.begin();
+
+   while(iter != theChildren.end())
+   {
+      if(*iter == node)
+      {
+         theChildren.erase(iter);
+         return;
+      }
+      ++iter;
+   }
+}
+
+bool ossimQuadTreeWarpNode::saveState(ossimKeywordlist& kwl,
+                                      const char* prefix)const
+{
+   kwl.add(prefix,
+           ossimKeywordNames::UL_X_KW,
+           theBoundingRect.ul().x,
+           true);
+   kwl.add(prefix,
+           ossimKeywordNames::UL_Y_KW,
+           theBoundingRect.ul().y,
+           true);
+   kwl.add(prefix,
+           ossimKeywordNames::LR_X_KW,
+           theBoundingRect.lr().x,
+           true);
+   kwl.add(prefix,
+           ossimKeywordNames::LR_Y_KW,
+           theBoundingRect.lr().y,
+           true);
+   
+   return true;
+}
+
+bool ossimQuadTreeWarpNode::loadState(const ossimKeywordlist& kwl,
+                                      const char* prefix)
+{
+   const char* ul_x = kwl.find(prefix, ossimKeywordNames::UL_X_KW);
+   const char* ul_y = kwl.find(prefix, ossimKeywordNames::UL_Y_KW);
+   const char* lr_x = kwl.find(prefix, ossimKeywordNames::LR_X_KW);
+   const char* lr_y = kwl.find(prefix, ossimKeywordNames::LR_Y_KW);
+
+   if(ul_x&&ul_y&&lr_x&&lr_y)
+   {
+      theBoundingRect = ossimDrect(ossimString(ul_x).toDouble(),
+                                   ossimString(ul_y).toDouble(),
+                                   ossimString(lr_x).toDouble(),
+                                   ossimString(lr_y).toDouble());
+      return true;
+   }
+   
+   return false;
+}
+
+
+ossimQuadTreeWarp::ossimQuadTreeWarp()
+   :theTree(NULL)
+{
+}
+
+ossimQuadTreeWarp::ossimQuadTreeWarp(const ossimDrect& boundingRect,
+                                     const ossimDpt& ulShift,
+                                     const ossimDpt& urShift,
+                                     const ossimDpt& lrShift,
+                                     const ossimDpt& llShift)
+   :theTree(NULL)
+{
+   create(boundingRect, ulShift, urShift, lrShift, llShift);
+}
+
+ossimQuadTreeWarp::ossimQuadTreeWarp(const ossimQuadTreeWarp& rhs)
+   :ossim2dTo2dTransform(),
+    theWarpEnabledFlag(true),
+    theTree(NULL)
+{
+   ossimKeywordlist kwl;
+   
+   rhs.saveState(kwl);
+   
+   loadState(kwl);
+}
+
+ossimObject* ossimQuadTreeWarp::dup()const
+{
+   return new ossimQuadTreeWarp(*this);
+}
+
+ossimQuadTreeWarp::~ossimQuadTreeWarp()
+{
+   clear();
+}
+   
+ossimDpt ossimQuadTreeWarp::getOrigin()const
+{
+   if(!isEmpty())
+   {
+      if(!theTree->theBoundingRect.hasNans())
+      {
+         return theTree->theBoundingRect.midPoint();
+      }
+      
+   }
+   
+   return ossimDpt(0,0);
+}
+
+void ossimQuadTreeWarp::create(const ossimDrect& boundingRect,
+                               const ossimDpt& ulShift,
+                               const ossimDpt& urShift,
+                               const ossimDpt& lrShift,
+                               const ossimDpt& llShift)
+{
+   clear();
+
+   theTree = new ossimQuadTreeWarpNode(boundingRect);
+
+   ossimQuadTreeWarpVertex* ul = new ossimQuadTreeWarpVertex(boundingRect.ul(),
+                                                             ulShift);
+   ossimQuadTreeWarpVertex* ur = new ossimQuadTreeWarpVertex(boundingRect.ur(),
+                                                             urShift);
+   ossimQuadTreeWarpVertex* lr = new ossimQuadTreeWarpVertex(boundingRect.lr(),
+                                                             lrShift);
+   ossimQuadTreeWarpVertex* ll = new ossimQuadTreeWarpVertex(boundingRect.ll(),
+                                                             llShift);
+   ul->addSharedNode(theTree);
+   ur->addSharedNode(theTree);
+   lr->addSharedNode(theTree);
+   ll->addSharedNode(theTree);
+
+   theVertexList.push_back(ul);
+   theVertexList.push_back(ur);
+   theVertexList.push_back(lr);
+   theVertexList.push_back(ll);
+   
+   theTree->theUlVertex = ul;
+   theTree->theUrVertex = ur;
+   theTree->theLrVertex = lr;
+   theTree->theLlVertex = ll;
+   
+}
+
+void ossimQuadTreeWarp::printVertices(std::ostream& out)const
+{
+   for(ossim_uint32 i = 0; i < theVertexList.size();++i)
+   {
+      out << *theVertexList[i] << "\n";
+   }
+}
+
+ossimQuadTreeWarpNode* ossimQuadTreeWarp::getRoot()
+{
+   return theTree;
+}
+
+const ossimQuadTreeWarpNode* ossimQuadTreeWarp::getRoot()const
+{
+   return theTree;
+}
+
+bool ossimQuadTreeWarp::isEmpty()const
+{
+   return (theTree==NULL);
+}
+
+std::ostream& ossimQuadTreeWarp::print(std::ostream& out) const
+{
+   if(!isEmpty())
+   {
+      out << "___________VERTEX LIST____________________\n";
+      printVertices(out);
+      out << "___________TREE LIST____________________\n";
+      
+      recursivePrint(out, theTree);
+   }
+   else
+   {
+      out << "<empty tree>\n";
+   }
+   return out;
+}
+
+ossimQuadTreeWarpVertex* ossimQuadTreeWarp::findClosestVertex(ossimDpt& position)
+{
+   if(position.hasNans()) return (ossimQuadTreeWarpVertex*)NULL;
+      
+   double dist = 1.0/DBL_EPSILON;
+   ossimQuadTreeWarpVertex* result = (ossimQuadTreeWarpVertex*)NULL;
+   for(ossim_uint32 i = 0; i < theVertexList.size(); ++i)
+   {
+      double d = (position-theVertexList[i]->thePosition).length();
+      if( d < dist)
+      {
+         result = theVertexList[i];
+         dist = d;
+      }
+   }
+
+   return result;
+//    ossimQuadTreeWarpNode* node = findNode(position);
+
+//    if(node&&node->hasValidVertices())
+//    {
+//       double ulDist = (position-node->theUlVertex->thePosition).length();
+//       double urDist = (position-node->theUrVertex->thePosition).length();
+//       double lrDist = (position-node->theLrVertex->thePosition).length();
+//       double llDist = (position-node->theLlVertex->thePosition).length();
+
+//       double minDist = std::min(ulDist, std::min(urDist, std::min(lrDist, llDist)));
+
+//       if(minDist == ulDist)
+//       {
+//          return node->theUlVertex;
+//       }
+//       else if(minDist == urDist)
+//       {
+//          return node->theUrVertex;
+//       }
+//       else if(minDist == lrDist)
+//       {
+//          return node->theLrVertex;
+//       }
+//       else if(minDist == llDist)
+//       {
+//          return node->theLlVertex;
+//       }
+//    }
+
+//    return ((ossimQuadTreeWarpVertex*)NULL);
+}
+
+
+ossimQuadTreeWarpVertex* ossimQuadTreeWarp::findVertex(const ossimDpt& position)
+{
+   ossim_uint32 i = 0;
+   ossimQuadTreeWarpVertex* result = (ossimQuadTreeWarpVertex*)NULL;
+   ossimQuadTreeWarpNode*   currentNode = theTree;
+   
+   if((currentNode)&&
+      (currentNode->theBoundingRect.pointWithin(position)))
+   {
+      while((currentNode)&&
+            (!currentNode->isLeaf()))
+      {
+         for(i = 0; i < currentNode->theChildren.size(); ++i)
+         {
+            if(currentNode->theChildren[i]->theBoundingRect.pointWithin(position))
+            {
+               currentNode = currentNode->theChildren[i];
+               break;
+            }
+         }
+      }
+
+      if(currentNode&&currentNode->hasValidVertices())
+      {
+         if(currentNode->theUlVertex->thePosition == position)
+         {
+            result = currentNode->theUlVertex;
+         }
+         else if(currentNode->theUrVertex->thePosition == position)
+         {
+            result = currentNode->theUrVertex;            
+         }
+         else if(currentNode->theLrVertex->thePosition == position)
+         {
+            result = currentNode->theLrVertex;
+         }
+         else if(currentNode->theLlVertex->thePosition == position)
+         {
+            result = currentNode->theLlVertex;
+         }
+      }
+               
+   }
+
+   return result;   
+}
+
+ossimQuadTreeWarpVertex* ossimQuadTreeWarp::getVertex(const ossimDpt& position)
+{
+   std::vector<ossimQuadTreeWarpVertex*>::iterator iter = theVertexList.begin();
+
+   while(iter != theVertexList.end())
+   {
+      if(position == (*iter)->getPosition())
+      {
+         return (*iter);
+      }
+      ++iter;
+   }
+   
+   return (ossimQuadTreeWarpVertex*)NULL;
+}
+
+void ossimQuadTreeWarp::clear()
+{
+   if(theTree)
+   {     
+      recursiveDelete(theTree);
+      theTree = NULL;
+   }
+
+   for(ossim_uint32 i = 0; i < theVertexList.size(); ++i)
+   {
+      delete theVertexList[i];
+   }
+   
+   theVertexList.clear();
+}
+
+void ossimQuadTreeWarp::forward(const ossimDpt& pt,
+                                ossimDpt& result)const
+{
+   if(theWarpEnabledFlag)
+   {
+      ossimDpt shift;
+      
+      getShift(shift,
+               pt);
+      
+      result = pt + shift;
+   }
+   else
+   {
+      result = pt;
+   }
+}
+
+void ossimQuadTreeWarp::forward(ossimDpt& pt)const
+{
+   if(theWarpEnabledFlag)
+   {
+      ossimDpt shift;
+      
+      getShift(shift,
+               pt);
+      
+      pt += shift;
+   }
+}
+
+void ossimQuadTreeWarp::getShift(ossimDpt& result,
+                                 const ossimDpt& pt)const
+{
+   getShift(result,
+            findNode(pt),
+            pt);
+}
+
+void ossimQuadTreeWarp::split(const ossimDpt& point,
+                              double splitHoriCoefficient,
+                              double splitVertCoefficient)
+{
+   ossimQuadTreeWarpNode* node = findNode(point);
+
+   if(node)
+   {
+      if(splitHoriCoefficient == 0.0)
+      {
+         splitHoriCoefficient = (point.x - node->theBoundingRect.ul().x)/
+                                node->theBoundingRect.width();
+      }
+      if(splitVertCoefficient == 0.0)
+      {
+         splitVertCoefficient = (point.y - node->theBoundingRect.ul().y)/
+                                node->theBoundingRect.height();
+      }
+      split(node,
+            splitHoriCoefficient,
+            splitVertCoefficient);
+   }
+}
+
+
+void ossimQuadTreeWarp::split(ossimQuadTreeWarpNode* node,
+                              double splitHoriCoefficient,
+                              double splitVertCoefficient)
+{
+   if(!node) return;
+
+   splitHoriCoefficient = splitHoriCoefficient>1?1:splitHoriCoefficient;
+   splitHoriCoefficient = splitHoriCoefficient<0?0:splitHoriCoefficient;
+   splitVertCoefficient = splitVertCoefficient>1?1:splitVertCoefficient;
+   splitVertCoefficient = splitVertCoefficient<0?0:splitVertCoefficient;
+
+   if( ((splitHoriCoefficient == 0)&&(splitVertCoefficient == 0)) ||
+       ((splitHoriCoefficient == 1)&&(splitVertCoefficient == 1)))
+   {
+      return;
+   }
+
+   if(node->isLeaf())
+   {
+      if(node->theBoundingRect.hasNans())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)  << "WARNING: " << "ossimQuadTreeWarp::split, Node has nans for the rect and can't split\n";
+      }
+      else
+      {
+         ossimDpt ul = node->theBoundingRect.ul();
+         ossimDpt ur = node->theBoundingRect.ur();
+         ossimDpt lr = node->theBoundingRect.lr();
+         ossimDpt ll = node->theBoundingRect.lr();
+         
+         
+         double xmid = ul.x + (ur.x - ul.x)*splitHoriCoefficient;
+         double ymid = ul.y + (ll.y - ul.y)*splitVertCoefficient;
+         
+         ossimDpt left(ul.x, ymid);
+         
+         ossimDpt right(ur.x,
+                        ymid);
+         
+         ossimDpt top(xmid,
+                      ul.y);
+         
+         ossimDpt bottom(xmid,
+                         lr.y);
+
+
+         ossimDrect ulRect(ul.x,
+                           ul.y,
+                           xmid,
+                           ymid);
+         
+         ossimDrect urRect(top.x,
+                           top.y,
+                           right.x,
+                           right.y);
+         
+         ossimDrect lrRect(xmid,
+                           ymid,
+                           lr.x,
+                           lr.y);
+         
+         ossimDrect llRect(left.x,
+                           left.y,
+                           bottom.x,
+                           bottom.y);
+         
+         ossimQuadTreeWarpNode* ulNode=(ossimQuadTreeWarpNode*)NULL;
+         ossimQuadTreeWarpNode* urNode=(ossimQuadTreeWarpNode*)NULL;
+         ossimQuadTreeWarpNode* lrNode=(ossimQuadTreeWarpNode*)NULL;
+         ossimQuadTreeWarpNode* llNode=(ossimQuadTreeWarpNode*)NULL;
+
+         getNewQuads(node,
+                     ulRect,
+                     urRect,
+                     lrRect,
+                     llRect,
+                     ulNode,
+                     urNode,
+                     lrNode,
+                     llNode);
+
+         if(ulNode&&urNode&&lrNode&&llNode)
+         {
+            node->theChildren.push_back(ulNode);
+            node->theChildren.push_back(urNode);
+            node->theChildren.push_back(lrNode);
+            node->theChildren.push_back(llNode);            
+            
+            // it's no longer a leaf so remove the vertices
+            // from the list
+            node->removeVertex(node->theUlVertex);
+            node->removeVertex(node->theUrVertex);
+            node->removeVertex(node->theLrVertex);
+            node->removeVertex(node->theLlVertex);
+         }         
+      }
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "WARNING: " << "ossimQuadTreeWarp::split, can only split leaf nodes\n";
+   }
+   
+   updateAllVericeLockFlags();
+}
+
+void ossimQuadTreeWarp::getNewQuads(ossimQuadTreeWarpNode* parent,
+                                    const ossimDrect& ul,
+                                    const ossimDrect& ur,
+                                    const ossimDrect& lr,
+                                    const ossimDrect& ll,
+                                    ossimQuadTreeWarpNode*& ulNode,
+                                    ossimQuadTreeWarpNode*& urNode,
+                                    ossimQuadTreeWarpNode*& lrNode,
+                                    ossimQuadTreeWarpNode*& llNode)
+{
+   ossimDpt midShift;
+   getShift(midShift, parent, ul.lr());
+   
+   ossimQuadTreeWarpVertex* midV = new ossimQuadTreeWarpVertex(ul.lr(),
+                                                               midShift);
+
+   ulNode = new ossimQuadTreeWarpNode(ul, parent);
+   urNode = new ossimQuadTreeWarpNode(ur, parent);
+   lrNode = new ossimQuadTreeWarpNode(lr, parent);
+   llNode = new ossimQuadTreeWarpNode(ll, parent);
+
+   midV->addSharedNode(ulNode);
+   midV->addSharedNode(urNode);
+   midV->addSharedNode(lrNode);
+   midV->addSharedNode(llNode);
+   
+   // get the shared vertices first.  We will add ourself
+   // to the pointer list. when we construct
+   // the quad nodes.  Note the mid point will be shared
+   // by all quads and will be marked as adjustable
+   //
+   ossimQuadTreeWarpVertex* ulSharedV = getVertex(ul.ul());
+   ossimQuadTreeWarpVertex* urSharedV = getVertex(ur.ur());
+   ossimQuadTreeWarpVertex* lrSharedV = getVertex(lr.lr());
+   ossimQuadTreeWarpVertex* llSharedV = getVertex(ll.ll());
+   
+   if( !ulSharedV || !urSharedV|| !lrSharedV || !llSharedV )
+   {
+      delete ulNode;
+      delete urNode;
+      delete lrNode;
+      delete llNode;
+      ulNode = 0;
+      urNode = 0;
+      lrNode = 0;
+      llNode = 0;
+      delete midV;
+      midV = 0;
+      
+      ossimNotify(ossimNotifyLevel_FATAL)
+         << "FATAL: ossimQuadTreeWarp::split, can't locating shared vertices.  This Shouldn't happen!!!\n";
+      return;
+   }
+
+   // we know that the midpoint is new and is shared by all quads
+   // so we have 2 more to check
+   ossimQuadTreeWarpVertex* topSharedV    = getVertex(ul.ur());
+   ossimQuadTreeWarpVertex* bottomSharedV = getVertex(lr.ll());
+
+   ossimQuadTreeWarpVertex* leftSharedV   = getVertex(ul.ll());
+   ossimQuadTreeWarpVertex* rightSharedV  = getVertex(ur.lr());
+   
+   ossimDpt tempShift;
+   
+   if(!topSharedV)
+   {
+      getShift(tempShift, parent, ul.ur());
+      topSharedV = new ossimQuadTreeWarpVertex(ul.ur(),
+                                               tempShift);
+      theVertexList.push_back(topSharedV);
+   }
+   if(!bottomSharedV)
+   {
+      getShift(tempShift, parent, ll.lr());
+      bottomSharedV = new ossimQuadTreeWarpVertex(ll.lr(),
+                                                  tempShift);
+      
+      theVertexList.push_back(bottomSharedV);
+   }
+   if(!leftSharedV)
+   {
+      getShift(tempShift, parent, ul.ll());
+      leftSharedV = new ossimQuadTreeWarpVertex(ul.ll(),
+                                               tempShift);
+      theVertexList.push_back(leftSharedV);
+   }
+   if(!rightSharedV)
+   {
+      getShift(tempShift, parent, ur.lr());
+      rightSharedV = new ossimQuadTreeWarpVertex(ur.lr(),
+                                               tempShift);
+      theVertexList.push_back(rightSharedV);
+   }
+   theVertexList.push_back(midV);
+
+   topSharedV->addSharedNode(ulNode);
+   topSharedV->addSharedNode(urNode);
+   
+   bottomSharedV->addSharedNode(llNode);
+   bottomSharedV->addSharedNode(lrNode);
+   leftSharedV->addSharedNode(ulNode);
+   leftSharedV->addSharedNode(llNode);
+   rightSharedV->addSharedNode(urNode);
+   rightSharedV->addSharedNode(lrNode);
+
+   ulSharedV->addSharedNode(ulNode); 
+   urSharedV->addSharedNode(urNode);
+   lrSharedV->addSharedNode(lrNode);
+   llSharedV->addSharedNode(llNode);
+  
+   ulNode->theUlVertex = ulSharedV;
+   ulNode->theUrVertex = topSharedV;
+   ulNode->theLrVertex = midV;
+   ulNode->theLlVertex = leftSharedV;
+
+   urNode->theUlVertex = topSharedV;
+   urNode->theUrVertex = urSharedV;
+   urNode->theLrVertex = rightSharedV;
+   urNode->theLlVertex = midV;
+
+   lrNode->theUlVertex = midV;
+   lrNode->theUrVertex = rightSharedV;
+   lrNode->theLrVertex = lrSharedV;
+   lrNode->theLlVertex = bottomSharedV;
+
+   llNode->theUlVertex = leftSharedV;
+   llNode->theUrVertex = midV;
+   llNode->theLrVertex = bottomSharedV;
+   llNode->theLlVertex = llSharedV;   
+}
+
+void ossimQuadTreeWarp::getShift(ossimDpt& result,
+                                 const ossimQuadTreeWarpNode* node,
+                                 const ossimDpt& pt)const
+{
+   result.x = 0.0;
+   result.y = 0.0;
+
+   if(!node)
+   {
+      return;
+   }
+   if(!node->isLeaf())
+   {
+      return;
+   }
+
+   if(node->hasValidVertices())
+   {
+      ossimDpt ulShift = node->theUlVertex->getDelta();
+      ossimDpt urShift = node->theUrVertex->getDelta();
+      ossimDpt lrShift = node->theLrVertex->getDelta();
+      ossimDpt llShift = node->theLlVertex->getDelta();
+
+      ossimDpt ul = node->theBoundingRect.ul();
+      ossimDpt ur = node->theBoundingRect.ur();
+      ossimDpt ll = node->theBoundingRect.ll();
+      
+      double horizontalPercent = fabs((pt.x-ul.x))/
+                                 (ur.x-ul.x);
+      
+      double verticalPercent   = fabs((pt.y - ul.y))/
+                                 (ll.y-ul.y);
+
+      ossimDpt upper = ulShift + (urShift - ulShift)*horizontalPercent;
+      ossimDpt lower = llShift + (lrShift - llShift)*horizontalPercent;
+      
+      result = upper + (lower - upper)*verticalPercent;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "WARNING: ossimQuadTreeWarp::getShift, " << "Node does not have valid vertices in ossimQuadTreeWarp::getShift\n";
+   }
+}
+
+void ossimQuadTreeWarp::pruneTree(ossimQuadTreeWarpNode* node)
+{
+   if(node&&
+      !node->isLeaf())
+   {
+      ossimQuadTreeWarpVertex* ulV = getVertex(node->theBoundingRect.ul());
+      ossimQuadTreeWarpVertex* urV = getVertex(node->theBoundingRect.ur());
+      ossimQuadTreeWarpVertex* lrV = getVertex(node->theBoundingRect.lr());
+      ossimQuadTreeWarpVertex* llV = getVertex(node->theBoundingRect.ll());
+      
+      recursivePruneTree(node);
+
+      if(ulV&&urV&&lrV&&llV)
+      {
+         node->theUlVertex = ulV;
+         node->theUrVertex = urV;
+         node->theLrVertex = lrV;
+         node->theLlVertex = llV;
+
+         ulV->addSharedNode(node);
+         urV->addSharedNode(node);
+         lrV->addSharedNode(node);
+         llV->addSharedNode(node);
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "WARNING: ossimQuadTreeWarp::pruneTree, invlaid vertex find\n";
+      }
+      pruneSharedVertices();
+      updateAllVericeLockFlags();
+   }
+}
+
+void ossimQuadTreeWarp::recursivePruneTree(ossimQuadTreeWarpNode* node)
+{
+   if(!node||node->isLeaf()) return;
+   
+   for(ossim_uint32 i = 0; i < node->theChildren.size(); ++i)
+   {
+      recursivePruneTree(node->theChildren[i]);
+      delete node->theChildren[i];
+      node->theChildren[i] = NULL;
+   }
+   node->theChildren.clear();
+}
+
+
+ossimQuadTreeWarpNode* ossimQuadTreeWarp::findNode(const ossimDpt& pt)
+{
+   if((!pt.hasNans())&&(!isEmpty()))
+   {
+      if(theTree->theBoundingRect.pointWithin(pt))
+      {
+         return findNode(theTree,
+                         pt);
+      }
+   }
+   
+   return (ossimQuadTreeWarpNode*)NULL;
+}
+
+ossimDpt ossimQuadTreeWarp::getShift(const ossimDpt& pt)const
+{
+   ossimDpt result;
+   
+   getShift(result, pt);
+   
+   return result;
+}
+
+const ossimQuadTreeWarpNode* ossimQuadTreeWarp::findNode(const ossimDpt& pt)const
+{
+   if((!pt.hasNans())&&(!isEmpty()))
+   {
+      if(theTree->theBoundingRect.pointWithin(pt))
+      {
+         return findNode(theTree,
+                         pt);
+      }
+   }
+   
+   return (const ossimQuadTreeWarpNode*)NULL;
+}
+
+ossimQuadTreeWarpNode* ossimQuadTreeWarp::findNode(ossimQuadTreeWarpNode* node,
+                                                   const ossimDpt& pt)
+{
+   ossimQuadTreeWarpNode* result = (ossimQuadTreeWarpNode*)NULL;
+   
+   if(!node)
+   {
+      return result;
+   }
+   if(node->isLeaf())
+   {
+      result = node;
+   }
+   else
+   {
+      bool found = false;
+      for(ossim_uint32 i = 0; (i < node->theChildren.size())&&(!found); ++i)
+      {
+         if(node->theChildren[i]->theBoundingRect.pointWithin(pt))
+         {
+            result = findNode(node->theChildren[i],
+                              pt);
+            found = true;
+         }
+      }
+   }
+
+   return result;
+}
+
+void ossimQuadTreeWarp::findAllNodes(std::vector<ossimQuadTreeWarpNode*>& result,
+                                     const ossimDpt& pt)
+{
+   if((!pt.hasNans())&&(!isEmpty()))
+   {
+      if(theTree->theBoundingRect.pointWithin(pt))
+      {
+         findAllNodes(result,
+                      theTree,
+                      pt);
+      }
+   }
+   
+}
+
+void ossimQuadTreeWarp::findAllNodes(std::vector<const ossimQuadTreeWarpNode*>& result,
+                                     const ossimDpt& pt)const
+{
+   if(!pt.hasNans()&&(!isEmpty()))
+   {
+      if(theTree->theBoundingRect.pointWithin(pt))
+      {
+         findAllNodes(result,
+                      theTree,
+                      pt);
+      }
+   }
+   
+}
+
+const ossimQuadTreeWarpNode* ossimQuadTreeWarp::findNode(const ossimQuadTreeWarpNode* node,
+                                                         const ossimDpt& pt)const
+{
+   const ossimQuadTreeWarpNode* result = (const ossimQuadTreeWarpNode*)NULL;
+   
+   if(!node)
+   {
+      return result;
+   }
+   if(node->isLeaf())
+   {
+      result = node;
+   }
+   else
+   {
+      bool found = false;
+      for(ossim_uint32 i = 0; (i < node->theChildren.size())&&(!found); ++i)
+      {
+         if(node->theChildren[i]->theBoundingRect.pointWithin(pt))
+         {
+            result = findNode(node->theChildren[i],
+                              pt);
+            found = true;
+         }
+      }
+   }
+
+   return result;
+}
+
+void ossimQuadTreeWarp::findAllNodes(std::vector<ossimQuadTreeWarpNode*>& result,
+                                     ossimQuadTreeWarpNode* node,
+                                     const ossimDpt& pt)
+{   
+   if(node->isLeaf())
+   {
+      result.push_back(node);
+   }
+   else
+   {
+      for(ossim_uint32 i = 0;
+          i < node->theChildren.size();
+          ++i)
+      {
+         if(node->theChildren[i]->theBoundingRect.pointWithin(pt))
+         {
+            findAllNodes(result,
+                         node->theChildren[i],
+                         pt);
+         }
+      }
+   }
+}
+
+void ossimQuadTreeWarp::findAllNodes(std::vector<const ossimQuadTreeWarpNode*>& result,
+                                     ossimQuadTreeWarpNode* node,
+                                     const ossimDpt& pt)const
+{   
+   if(!node) return;
+   if(node->isLeaf())
+   {
+      result.push_back(node);
+   }
+   else
+   {
+      for(ossim_uint32 i = 0;
+          i < node->theChildren.size();
+          ++i)
+      {
+         if(node->theChildren[i]->theBoundingRect.pointWithin(pt))
+         {
+            findAllNodes(result,
+                         node->theChildren[i],
+                         pt);
+         }
+      }
+   }
+}
+void ossimQuadTreeWarp::pruneSharedVertices()
+{
+   std::vector<ossimQuadTreeWarpVertex*>::iterator iter = theVertexList.begin();
+
+   while(iter != theVertexList.end())
+   {
+      if( !(*iter)->isShared())
+      {
+         delete (*iter);
+         iter = theVertexList.erase(iter);
+      }
+      else
+      {
+         ++iter;
+      }
+   }
+}
+
+void ossimQuadTreeWarp::removeSharedVertex(ossimQuadTreeWarpVertex* v)
+{
+   std::vector<ossimQuadTreeWarpVertex*>::iterator iter = std::find(theVertexList.begin(),
+                                                                    theVertexList.end(),
+                                                                    v);
+   if(iter != theVertexList.end())
+   {
+      delete (*iter);
+      iter = theVertexList.erase(iter);
+   }
+}
+
+
+void ossimQuadTreeWarp::recursivePrint(std::ostream& out,
+                                       ossimQuadTreeWarpNode* node)const
+{
+   if(node)
+   {
+      out << (*node) << "\n";
+   }
+
+   if(!node->isLeaf())
+   {
+      for(ossim_uint32 i =0; i < node->theChildren.size();++i)
+      {
+         recursivePrint(out, node->theChildren[i]);
+      }
+   }
+}
+
+void ossimQuadTreeWarp::recursiveDelete(ossimQuadTreeWarpNode* node)
+{
+   if(node->isLeaf())
+   {
+      delete node;
+   }
+   else
+   {
+      for(ossim_uint32 i = 0; i < node->theChildren.size(); ++ i)
+      {
+         recursiveDelete(node->theChildren[i]);
+      }
+      
+      delete node;
+   }
+}
+ 
+bool ossimQuadTreeWarp::isOnEdge(ossimQuadTreeWarpNode* node,
+                                 const ossimDpt& point)const
+{
+   if(!node) return false;
+
+   if(node->theBoundingRect.pointWithin(point))
+   {
+      double minx, maxx;
+      double miny, maxy;
+      node->theBoundingRect.getBounds(minx, miny, maxx, maxy);
+
+      return ( (point.x == minx) ||
+               (point.x == miny) ||
+               (point.y == miny) ||
+               (point.y == maxy) );
+   }
+
+   return false;
+}
+
+bool ossimQuadTreeWarp::isOnPoint(ossimQuadTreeWarpNode* node,
+                                 const ossimDpt& point)const
+{
+   if(!node) return false;
+
+   return ( (point == node->theBoundingRect.ul())||
+            (point == node->theBoundingRect.ur())||
+            (point == node->theBoundingRect.lr())||
+            (point == node->theBoundingRect.ll()) );
+}
+
+void ossimQuadTreeWarp::updateLockFlag(ossimQuadTreeWarpVertex* v)
+{
+   std::vector<ossimQuadTreeWarpNode*> nodeList;
+   
+   findAllNodes(nodeList,
+                v->getPosition());
+
+   if(nodeList.size() != v->theSharedNodeList.size())
+   {
+      if(isOnEdge(theTree, v->getPosition()))
+      {
+         v->theLockedFlag = false;
+      }
+      else
+      {
+         v->theLockedFlag = true;
+      }
+   }
+   else
+   {
+      v->theLockedFlag = false;
+   }
+
+   // if the original was not locked
+   // then we need to make sure we change the delta
+   // along the locked edge so to produce no artifacts
+   //
+   if(v->theLockedFlag)
+   {
+      updateDelta(v);
+   }
+}
+
+void ossimQuadTreeWarp::updateDelta(ossimQuadTreeWarpVertex* v)
+{
+   ossimQuadTreeWarpVertex* top    = NULL;
+   ossimQuadTreeWarpVertex* bottom = NULL;
+   ossimQuadTreeWarpVertex* left   = NULL;
+   ossimQuadTreeWarpVertex* right  = NULL;
+
+   std::vector<ossimQuadTreeWarpVertex*>::iterator iter = theVertexList.begin();
+   
+   while(iter != theVertexList.end())
+   {
+      ossimQuadTreeWarpVertex* testV = (*iter);
+
+      // test along the vertical
+      if( (testV->thePosition.x == v->thePosition.x)&&
+          (testV->thePosition.y != v->thePosition.y)&&
+          (!testV->theLockedFlag))
+      {
+         if(testV->thePosition.y >  v->thePosition.y)
+         {
+            if(bottom)
+            {
+               if(bottom->thePosition.y > testV->thePosition.y)
+               {
+                  bottom = testV;
+               }
+            }
+            else
+            {
+               bottom = testV;
+            }
+         }
+         else
+         {
+            if(top)
+            {
+               if(top->thePosition.y < testV->thePosition.y)
+               {
+                  top = testV;
+               }
+            }
+            else
+            {
+               top = testV;
+            }            
+         }
+      }
+
+      if( (testV->thePosition.y == v->thePosition.y)&&
+          (testV->thePosition.x != v->thePosition.x)&&
+          (!testV->theLockedFlag))
+      {
+         if(testV->thePosition.x >  v->thePosition.x)
+         {
+            if(right)
+            {
+               if(right->thePosition.x > testV->thePosition.x)
+               {
+                  right = testV;
+               }
+            }
+            else
+            {
+               right = testV;
+            }
+         }
+         else
+         {
+            if(left)
+            {
+               if(left->thePosition.x < testV->thePosition.x)
+               {
+                  left = testV;
+               }
+            }
+            else
+            {
+               left = testV;
+            }            
+         }
+      }
+      
+      ++iter;
+   }
+   ossimDpt topBottomDelta;
+   ossimDpt leftRightDelta;
+
+   topBottomDelta.makeNan();
+   leftRightDelta.makeNan();
+   
+   if(top&&bottom)
+   {
+      double t = (v->thePosition.y - top->thePosition.y)/
+                 (bottom->thePosition.y - top->thePosition.y);
+      
+      topBottomDelta = top->theDelta + (bottom->theDelta-top->theDelta)*t;
+      v->theDelta = topBottomDelta;
+      
+   }
+   if(left&&right)
+   {
+      double t = (v->thePosition.x - left->thePosition.x)/
+                 (right->thePosition.x - left->thePosition.x);
+      
+      leftRightDelta = left->theDelta + (right->theDelta-left->theDelta)*t;
+      v->theDelta = leftRightDelta;
+   }
+
+   if(top&&bottom&&left&&right)
+   {
+      v->theDelta = (topBottomDelta+leftRightDelta)*.5;
+   }
+}
+   
+void ossimQuadTreeWarp::updateAllVericeLockFlags()
+{
+   std::vector<ossimQuadTreeWarpVertex*>::iterator iter = theVertexList.begin();
+
+   while(iter != theVertexList.end())
+   {
+      if(*iter)
+      {
+         updateLockFlag(*iter);
+      }
+      
+      ++iter;
+   }
+}
+
+const std::vector<ossimQuadTreeWarpVertex*>& ossimQuadTreeWarp::getVertices()const
+{
+   return theVertexList;
+}
+
+void ossimQuadTreeWarp::setWarpEnabledFlag(bool flag)
+{
+   theWarpEnabledFlag = flag;
+}
+
+void ossimQuadTreeWarp::setToIdentity()
+{
+   for(ossim_uint32 i = 0; i < theVertexList.size(); ++i)
+   {
+      theVertexList[i]->theDelta = ossimDpt(0,0);
+   }
+}
+
+bool ossimQuadTreeWarp::saveState(ossimKeywordlist& kwl,
+                                  const char* prefix)const
+{
+   for(ossim_uint32 i = 0; i < theVertexList.size(); ++i)
+   {
+      ossimString newPrefix = ossimString(prefix)+ "v" + ossimString::toString(i) +".";
+
+      theVertexList[i]->saveState(kwl, newPrefix.c_str());
+   }
+
+   recursiveSave(theTree, kwl, prefix);
+   
+   return ossim2dTo2dTransform::saveState(kwl, prefix);   
+}
+
+bool ossimQuadTreeWarp::loadState(const ossimKeywordlist& kwl,
+                                  const char* prefix)
+{
+   clear();
+   ossimString newPrefix = ossimString(prefix);
+
+   // load the vertices first
+   //
+   ossimString regExpression =  ossimString("^(") + newPrefix + "v[0-9]+\\.)";
+
+   ossim_uint32 result = kwl.getNumberOfSubstringKeys(regExpression);
+   
+   ossim_uint32 numberOfMatches = 0;
+   ossim_uint32 count = 0;
+   while(numberOfMatches < result)
+   {
+      ossimString newPrefix = ossimString(prefix)+ossimString("v") + ossimString::toString(count) +".";
+      
+      ossimQuadTreeWarpVertex* vert = new ossimQuadTreeWarpVertex;
+      
+      if(!vert->loadState(kwl, newPrefix.c_str()))
+      {
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL: "<< " ossimQuadTreeWarp::loadState, invalid load on vertex\n";
+         delete vert;
+         clear();
+         
+         return false;
+      }
+      else
+      {
+         ++numberOfMatches;
+         theVertexList.push_back(vert);
+      }
+      
+      ++count;
+   }
+
+   theTree = new ossimQuadTreeWarpNode;
+
+   if(!theTree->loadState(kwl, prefix))
+   {
+      clear();
+      return false;
+   }
+   if(!recursiveLoad(theTree, kwl, prefix))
+   {
+      clear();
+      return false;
+   }
+   
+   if(!ossim2dTo2dTransform::loadState(kwl, prefix))
+   {
+      clear();
+      return false;
+   }
+
+   return true;
+}
+
+bool ossimQuadTreeWarp::recursiveSave(ossimQuadTreeWarpNode* node,
+                                      ossimKeywordlist& kwl,
+                                      const char* prefix)const
+{
+   if(!node) return false;
+   
+   if(!node->saveState(kwl,
+                      prefix))
+   {
+      return false;
+   }
+   
+   if(node->isLeaf())
+   {
+      return true;
+   }
+   else
+   {
+     for(ossim_uint32 i = 0; i < node->theChildren.size(); ++ i)
+       {
+	 ossimString newPrefix = ossimString(prefix) + ossimString::toString(i) + ".";
+      
+	 if(!recursiveSave(node->theChildren[i],
+                           kwl,
+                           newPrefix.c_str()))
+         {
+            return false;
+         }
+       }
+   }
+
+   return true;
+}
+
+bool ossimQuadTreeWarp::recursiveLoad(ossimQuadTreeWarpNode* node,
+                                      const ossimKeywordlist& kwl,
+                                      const char* prefix)
+{
+   if(!node) return false;
+   ossimString copyPrefix = prefix;
+   
+   ossimQuadTreeWarpNode* ul = new ossimQuadTreeWarpNode;
+   ossimQuadTreeWarpNode* ur = new ossimQuadTreeWarpNode;
+   ossimQuadTreeWarpNode* lr = new ossimQuadTreeWarpNode;
+   ossimQuadTreeWarpNode* ll = new ossimQuadTreeWarpNode;
+   
+   ossimString ulPre = copyPrefix + "0.";
+   ossimString urPre = copyPrefix + "1.";
+   ossimString lrPre = copyPrefix + "2.";
+   ossimString llPre = copyPrefix + "3.";
+
+   if(ul->loadState(kwl,
+                    ulPre.c_str()))
+   {
+      ul->theParent = node;
+      node->theChildren.push_back(ul);
+      recursiveLoad(ul,
+                    kwl,
+                    ulPre.c_str());
+   }
+   else
+   {
+      delete ul;
+      ul = NULL;
+   }
+   
+   if(ur->loadState(kwl,
+                    urPre.c_str()))
+   {
+      ur->theParent = node;
+      node->theChildren.push_back(ur);
+      recursiveLoad(ur,
+                    kwl,
+                    urPre.c_str());
+   }
+   else
+   {
+      delete ur;
+      ur = NULL;
+   }
+
+   if(lr->loadState(kwl,
+                    lrPre.c_str()))
+   {
+      lr->theParent = node;
+      node->theChildren.push_back(lr);
+      recursiveLoad(lr,
+                    kwl,
+                    lrPre.c_str());
+   }
+   else
+   {
+      delete lr;
+      lr = NULL;
+   }
+
+   if(ll->loadState(kwl,
+                    llPre.c_str()))
+   {
+      ll->theParent = node;
+      node->theChildren.push_back(ll);
+      recursiveLoad(ll,
+                    kwl,
+                    llPre.c_str());
+   }
+   else
+   {
+      delete ll;
+      ll = NULL;
+   }
+
+   if(node->isLeaf())
+   {
+      node->theUlVertex = getVertex(node->theBoundingRect.ul());
+      node->theUrVertex = getVertex(node->theBoundingRect.ur());
+      node->theLrVertex = getVertex(node->theBoundingRect.lr());
+      node->theLlVertex = getVertex(node->theBoundingRect.ll());
+
+      if(node->hasValidVertices())
+      {
+         node->theUlVertex->addSharedNode(node);
+         node->theUrVertex->addSharedNode(node);
+         node->theLrVertex->addSharedNode(node);
+         node->theLlVertex->addSharedNode(node);
+      }
+      else
+      {
+         return false;
+      }
+   }
+   
+   return true;
+}
+
+std::ostream& operator<<(std::ostream& out, const ossimQuadTreeWarpVertex& rhs)
+{
+   out << "Position:     " << rhs.thePosition
+       << "\nDelta:        " << rhs.theDelta
+       << "\nLocked flag:  " << rhs.theLockedFlag
+       << "\nShared nodes: " << rhs.theSharedNodeList.size() << std::endl;
+   
+   return out;
+}
+
+std::ostream& operator <<(std::ostream& out,
+                          const ossimQuadTreeWarpNode& rhs)
+{
+   out << "Bounding rect: " << rhs.theBoundingRect << std::endl;
+   
+   if(rhs.theUlVertex)
+   {
+      out << "ulVertex:\n" << *rhs.theUlVertex<< std::endl;
+   }
+   if(rhs.theUrVertex)
+   {
+      out << "urVertex:\n" << *rhs.theUrVertex<< std::endl;
+   }
+   if(rhs.theLrVertex)
+   {
+      out << "lrVertex:\n" << *rhs.theLrVertex<< std::endl;
+   }
+   if(rhs.theLlVertex)
+   {
+      out << "llVertex:\n" << *rhs.theLlVertex;
+   }
+   
+   return out;
+}
+
+std::ostream& operator<<(std::ostream& out, const ossimQuadTreeWarp& rhs)
+{
+   rhs.print(out);
+   
+   return out;
+}
+
diff --git a/src/ossim/base/ossimQuadrilateralMap.cpp b/ossim/src/ossim/base/ossimQuadrilateralMap.cpp
similarity index 100%
rename from src/ossim/base/ossimQuadrilateralMap.cpp
rename to ossim/src/ossim/base/ossimQuadrilateralMap.cpp
diff --git a/src/ossim/base/ossimQuaternion.cpp b/ossim/src/ossim/base/ossimQuaternion.cpp
similarity index 100%
rename from src/ossim/base/ossimQuaternion.cpp
rename to ossim/src/ossim/base/ossimQuaternion.cpp
diff --git a/src/ossim/base/ossimROIEvent.cpp b/ossim/src/ossim/base/ossimROIEvent.cpp
similarity index 100%
rename from src/ossim/base/ossimROIEvent.cpp
rename to ossim/src/ossim/base/ossimROIEvent.cpp
diff --git a/src/ossim/base/ossimROIEventListener.cpp b/ossim/src/ossim/base/ossimROIEventListener.cpp
similarity index 100%
rename from src/ossim/base/ossimROIEventListener.cpp
rename to ossim/src/ossim/base/ossimROIEventListener.cpp
diff --git a/src/ossim/base/ossimRationalNumber.cpp b/ossim/src/ossim/base/ossimRationalNumber.cpp
similarity index 100%
rename from src/ossim/base/ossimRationalNumber.cpp
rename to ossim/src/ossim/base/ossimRationalNumber.cpp
diff --git a/ossim/src/ossim/base/ossimRectanglePartitioner.cpp b/ossim/src/ossim/base/ossimRectanglePartitioner.cpp
new file mode 100644
index 0000000..e598600
--- /dev/null
+++ b/ossim/src/ossim/base/ossimRectanglePartitioner.cpp
@@ -0,0 +1,249 @@
+//----------------------------------------------------------------------------
+// Copyright (C) 2004 David Burken, all rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+// Utility class to partition up a rectangle.
+//
+// $Id: ossimRectanglePartitioner.cpp 23664 2015-12-14 14:17:27Z dburken $
+//----------------------------------------------------------------------------
+
+#include <ossim/base/ossimRectanglePartitioner.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimTrace.h>
+using namespace std;
+
+static ossimTrace traceDebug("ossimRectanglePartitioner:degug");
+
+ossimRectanglePartitioner::ossimRectanglePartitioner()
+{
+}
+
+ossimRectanglePartitioner::~ossimRectanglePartitioner()
+{
+}
+
+void ossimRectanglePartitioner::binaryPartition(
+   const ossimIrect& inputRectangle,
+   vector<ossimIrect>& result,
+   ossim_uint64 maxSizeInBytes,
+   ossim_uint32 bands,
+   ossim_uint32 bytesPerPixel,
+   ossim_uint32 internalOverlapPixels) const
+{
+   // Clear the result rect for starters.
+   result.clear();
+
+   // Some sanity checks.
+   if (maxSizeInBytes == 0)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "Waning:  0 passed for max size in bytes.  Returning..."
+         << endl;
+      return;
+   }
+   if (bands == 0)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "Waning:  0 passed for number of bands.  Returning..."
+         << endl;
+      return;
+   }
+   if (bytesPerPixel == 0)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "Waning:  0 passed for bytes per pixel.  Returning..."
+         << endl;
+      return;
+   }
+   if (inputRectangle.hasNans())
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "Waning:  Input rectangle has nans in it!  Returning..."
+         << endl;
+      return;
+   }
+   if ( (maxSizeInBytes / (bands*bytesPerPixel)) < 4)
+   {
+      // Come on now you have to have at least four pixels.
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "Waning:  Max size in bytes too small.  Returning..."
+         << endl;
+      return;
+   }
+   // End of sanity checks...
+
+   // Check the size... We could already be there.
+   if (getSize(inputRectangle, bands, bytesPerPixel) <= maxSizeInBytes)
+   {
+      result.push_back(inputRectangle);
+
+      if (traceDebug())
+      {
+         trace(inputRectangle, result, maxSizeInBytes, bands, bytesPerPixel);
+      }
+      
+      return;
+   }   
+
+   // OK, find the rectangle size that gets that will fit the max size.
+   ossimIrect tileRect = inputRectangle;
+   
+   splitUntilLessThanMax(tileRect,
+                         maxSizeInBytes,
+                         bands,
+                         bytesPerPixel,
+                         internalOverlapPixels);
+
+   ossim_int32 input_width  = static_cast<ossim_int32>(inputRectangle.width());
+   ossim_int32 input_height = static_cast<ossim_int32>(inputRectangle.height());
+
+   ossim_int32 tile_width   = static_cast<ossim_int32>(tileRect.width());
+   ossim_int32 tile_height  = static_cast<ossim_int32>(tileRect.height());
+
+   ossim_int32 tiles_wide   = (input_width % tile_width) ?
+      ( (input_width/tile_width)+1) : (input_width/tile_width);
+   ossim_int32 tiles_high   = (input_height % tile_height) ?
+      ( (input_height/tile_height)+1) : (input_height/tile_height);
+
+   ossim_int32 y_start = inputRectangle.ul().y;
+   ossim_int32 y_stop  = y_start + tile_height - 1 + internalOverlapPixels;
+
+   for (ossim_int32 y = 0; y < tiles_high; ++y)
+   {
+      // Clip to bottom if needed.
+      if (y_stop > inputRectangle.lr().y)
+      {
+         y_stop = inputRectangle.lr().y;
+      }
+      
+      ossim_int32 x_start = inputRectangle.ul().x;
+      ossim_int32 x_stop  = x_start + tile_width - 1 + internalOverlapPixels;
+      
+      for (ossim_int32 x = 0; x < tiles_wide; ++x)
+      {
+         // Clip to right edge is needed.
+         if (x_stop > inputRectangle.lr().x)
+         {
+            x_stop = inputRectangle.lr().x;
+         }
+
+         ossimIrect r(x_start, y_start, x_stop, y_stop);
+
+         // Add it to the result.
+         result.push_back(r);
+         
+         if( 0 == x )
+         {
+            x_start += tile_width - internalOverlapPixels;
+         }
+         else
+         {
+            x_start += tile_width;
+         }
+         x_stop  += tile_width;
+         
+      } // End of tiles_wide loop.
+      
+      if( 0 == y )
+      {
+         y_start += tile_height - internalOverlapPixels;
+      }
+      else
+      {
+         y_start += tile_height;
+      }
+      y_stop  += tile_height;
+      
+   } // End of tiles_high loop.
+   
+   if (traceDebug())
+   {
+      trace(inputRectangle, result, maxSizeInBytes, bands, bytesPerPixel);
+   }
+}
+
+void ossimRectanglePartitioner::splitUntilLessThanMax(
+   ossimIrect& rect,
+   ossim_uint64 maxSizeInBytes,
+   ossim_uint32 bands,
+   ossim_uint32 bytesPerPixel,
+   ossim_uint32 internalOverlapPixels) const
+{
+   do
+   {
+      splitRect(rect);
+
+   } while ( getSize(rect,
+                     bands,
+                     bytesPerPixel,
+                     internalOverlapPixels) > maxSizeInBytes );
+}
+
+void ossimRectanglePartitioner::splitRect(ossimIrect& rect) const
+{
+   ossim_int32 width  = static_cast<ossim_int32>(rect.width());
+   ossim_int32 height = static_cast<ossim_int32>(rect.height());
+   ossim_int32 new_width;
+   ossim_int32 new_height;
+   
+   if (height > width)
+   {
+      new_width  = width;
+      new_height = (height % 2) ? ( (height/2) + 1 ) : (height/2);
+   }
+   else
+   {
+      new_width  = (width % 2) ? ( (width/2) + 1) : (width/2);
+      new_height = height;
+   }
+   
+   rect = ossimIrect(0, 0, new_width-1, new_height-1);
+}
+
+ossim_uint64 ossimRectanglePartitioner::getSize(
+   const ossimIrect& rect,
+   ossim_uint32 bands,
+   ossim_uint32 bytesPerPixel,
+   ossim_uint32 internalOverlapPixels) const
+{
+   return( ( rect.width()  + 2 * internalOverlapPixels ) *
+           ( rect.height() + 2 * internalOverlapPixels ) *
+           bands * bytesPerPixel );
+}
+
+void ossimRectanglePartitioner::trace(const ossimIrect& r,
+                                      const std::vector<ossimIrect>& v,
+                                      ossim_uint64 maxSizeInBytes,
+                                      ossim_uint32 bands,
+                                      ossim_uint32 bytesPerPixel) const
+{
+   ossimNotify(ossimNotifyLevel_DEBUG)
+      << "ossimRectanglePartitioner DEBUG:"
+      << "\nInput rectangle:            " << r
+      << "\nInput rectangle byte size:  " << getSize(r, bands, bytesPerPixel)
+      << "\nTile max size in bytes:     " << maxSizeInBytes
+      << "\nbands:                      " << bands
+      << "\nbytesPerPixel:              " << bytesPerPixel
+      << "\nNumber of output tiles:     " << v.size()
+      << "\nTiled rectangles:\n";
+
+   int index = 0;
+   vector<ossimIrect>::const_iterator i = v.begin();
+   while(i != v.end())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "tile[" << index << "]:  " << *i
+         << "\nsize in bytes:  " << getSize(*i, bands, bytesPerPixel)
+         << endl;
+      ++i;
+      ++index;
+   }
+}
+
diff --git a/ossim/src/ossim/base/ossimRectilinearDataObject.cpp b/ossim/src/ossim/base/ossimRectilinearDataObject.cpp
new file mode 100644
index 0000000..e4f2918
--- /dev/null
+++ b/ossim/src/ossim/base/ossimRectilinearDataObject.cpp
@@ -0,0 +1,309 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// Contributor: David A. Horner (DAH) - http://dave.thehorners.com
+//
+//*************************************************************************
+// $Id: ossimRectilinearDataObject.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/base/ossimRectilinearDataObject.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <sstream>
+
+RTTI_DEF1(ossimRectilinearDataObject, "ossimRectilinearDataObject", ossimDataObject);
+
+ossimRectilinearDataObject::ossimRectilinearDataObject()
+   : ossimDataObject(),
+     m_numberOfDataComponents(0),
+     m_scalarType(),
+     m_dataBuffer(),
+     m_spatialExtents()
+{
+}
+
+ossimRectilinearDataObject::ossimRectilinearDataObject(
+   const ossimRectilinearDataObject& rhs)
+   : ossimDataObject(rhs),
+     m_numberOfDataComponents(rhs.m_numberOfDataComponents),
+     m_scalarType(rhs.m_scalarType),
+     m_dataBuffer(rhs.m_dataBuffer),
+     m_spatialExtents(rhs.m_spatialExtents)
+{
+}
+
+ossimRectilinearDataObject::ossimRectilinearDataObject(
+   ossim_uint32 numberOfSpatialComponents,
+   ossimSource* owner,
+   ossim_uint32 numberOfDataComponents,
+   ossimScalarType   scalarType,
+   ossimDataObjectStatus /* status */)
+   :ossimDataObject(owner, OSSIM_NULL),
+    m_numberOfDataComponents(numberOfDataComponents),
+    m_scalarType(scalarType),
+    m_dataBuffer(0),
+    m_spatialExtents(numberOfSpatialComponents)
+{
+}
+
+ossimRectilinearDataObject::ossimRectilinearDataObject(
+   ossimSource* owner,
+   ossim_uint32 numberOfDataComponents,
+   ossim_uint32 length,
+   ossimScalarType   scalarType,
+   ossimDataObjectStatus /* status */ )
+   :ossimDataObject(owner, OSSIM_NULL),
+    m_numberOfDataComponents(numberOfDataComponents),
+    m_scalarType(scalarType),
+    m_dataBuffer(0),
+    m_spatialExtents(1)
+{
+   m_spatialExtents[0] = length;
+}
+
+ossimRectilinearDataObject::ossimRectilinearDataObject(
+   ossimSource* owner,
+   ossim_uint32 numberOfDataComponents,
+   ossim_uint32 width,
+   ossim_uint32 height,
+   ossimScalarType   scalarType,
+   ossimDataObjectStatus /* status */)
+   :ossimDataObject(owner, OSSIM_NULL),
+    m_numberOfDataComponents(numberOfDataComponents),
+    m_scalarType(scalarType),
+    m_dataBuffer(0),
+    m_spatialExtents(2)
+{
+   m_spatialExtents[0] = width;
+   m_spatialExtents[1] = height;
+}
+
+ossimRectilinearDataObject::ossimRectilinearDataObject(
+   ossimSource* owner,
+   ossim_uint32 numberOfDataComponents,
+   ossim_uint32 width,
+   ossim_uint32 height,
+   ossim_uint32 depth,
+   ossimScalarType   scalarType,
+   ossimDataObjectStatus /* status */)
+   :ossimDataObject(owner, OSSIM_NULL),
+    m_numberOfDataComponents(numberOfDataComponents),
+    m_scalarType(scalarType),
+    m_dataBuffer(0),
+    m_spatialExtents(3)
+{
+   m_spatialExtents[0] = width;
+   m_spatialExtents[1] = height;
+   m_spatialExtents[2] = depth;
+}
+
+ossimRectilinearDataObject::~ossimRectilinearDataObject()
+{
+}
+
+ossim_uint32 ossimRectilinearDataObject::computeSpatialProduct()const
+{
+   ossim_uint32 spatialProduct = 0;
+   for(ossim_uint32 index = 0; index < m_spatialExtents.size(); ++index)
+   {
+      spatialProduct *= m_spatialExtents[index];
+   }
+   return spatialProduct;
+}
+
+void ossimRectilinearDataObject::setNumberOfDataComponents(ossim_uint32 n)
+{
+   m_numberOfDataComponents = n;
+}
+
+void ossimRectilinearDataObject::setSpatialExtents(ossim_uint32* extents,
+                                                   ossim_uint32 size)
+{
+   if (extents)
+   {
+      m_spatialExtents.resize(size);
+      for(ossim_uint32 i =0; i < size; ++i)
+      {
+         m_spatialExtents[i] = extents[i];
+      }
+   }
+}
+
+void ossimRectilinearDataObject::setScalarType(ossimScalarType type)
+{
+   m_scalarType = type;
+}
+
+ossim_uint32 ossimRectilinearDataObject::getNumberOfDataComponents() const
+{
+   return m_numberOfDataComponents;
+}
+
+ossim_uint32 ossimRectilinearDataObject::getNumberOfSpatialComponents() const
+{
+   return (ossim_uint32)m_spatialExtents.size();
+}
+
+const ossim_uint32* ossimRectilinearDataObject::getSpatialExtents()const
+{
+   return &(m_spatialExtents.front());
+}
+
+ossimScalarType ossimRectilinearDataObject::getScalarType() const
+{
+   return m_scalarType;
+}
+
+ossim_uint32 ossimRectilinearDataObject::getScalarSizeInBytes() const
+{
+   return ossim::scalarSizeInBytes(getScalarType());
+}
+
+void* ossimRectilinearDataObject::getBuf()
+{
+   if (m_dataBuffer.size() > 0)
+   {
+      return static_cast<void*>(&m_dataBuffer.front());
+   }
+   return NULL;
+}
+
+const void* ossimRectilinearDataObject::getBuf()const
+{
+   if (m_dataBuffer.size() > 0)
+   {
+      return static_cast<const void*>(&m_dataBuffer.front());
+   }
+   return NULL;
+}
+
+void ossimRectilinearDataObject::assign(const ossimRectilinearDataObject* data)
+{
+   if(data)
+   {
+      if (this != data)
+      {
+         ossimDataObject::assign(data);
+         
+         m_numberOfDataComponents    = data->m_numberOfDataComponents;
+         m_scalarType                = data->m_scalarType;
+         m_dataBuffer                = data->m_dataBuffer;
+         m_spatialExtents            = data->m_spatialExtents;
+      }
+   }
+}
+
+void ossimRectilinearDataObject::initialize()
+{
+   if (m_dataBuffer.size() != getDataSizeInBytes())
+   {
+      // std::vector::resize can throw a std::bad_alloc so wrap it...
+      try
+      {
+         m_dataBuffer.resize( getDataSizeInBytes() );
+      }
+      catch( std::exception& e )
+      {
+         std::ostringstream errMsg;
+         errMsg << "ossimRectilinearDataObject::initialize caught exception on resize:\n"
+                << "Buffer size in bytes: " << getDataSizeInBytes()
+                << "\n" << e.what() << std::endl;
+         throw ossimException( errMsg.str() );
+      }
+      
+      setDataObjectStatus(OSSIM_STATUS_UNKNOWN);
+   }
+}
+
+ossim_uint32 ossimRectilinearDataObject::getDataSizeInBytes()const
+{
+   return (ossim_uint32)(getScalarSizeInBytes()*
+                         computeSpatialProduct()*
+                         m_numberOfDataComponents);
+}
+
+std::ostream& ossimRectilinearDataObject::print(std::ostream& out) const
+{
+   out << "ossimRectilinearDataObject::print:"
+       << "\nm_numberOfDataComponents:     " << m_numberOfDataComponents
+       << "\ntheNumberOfSpatialComponents:  " << m_spatialExtents.size()
+       << "\nm_scalarType:                 "
+       << (ossimScalarTypeLut::instance()->getEntryString(m_scalarType))
+       << endl;
+   
+   return ossimDataObject::print(out);
+}
+
+const ossimRectilinearDataObject& ossimRectilinearDataObject::operator=(
+   const ossimRectilinearDataObject& rhs)
+{
+   if (this != &rhs)
+   {
+      // ossimDataObject initialization:
+      ossimDataObject::operator=(rhs);
+
+      // ossimRectilinearDataObject (this) initialization:
+      m_numberOfDataComponents    = rhs.m_numberOfDataComponents;
+      m_scalarType                = rhs.m_scalarType;
+      m_dataBuffer                = rhs.m_dataBuffer;
+      m_spatialExtents            = rhs.m_spatialExtents;
+   }
+   return *this;
+}
+
+bool ossimRectilinearDataObject::saveState(ossimKeywordlist& kwl, const char* prefix)const
+{
+   ossimString byteEncoded;
+   ossim::toSimpleStringList(byteEncoded, m_dataBuffer);
+   kwl.add(prefix, "data_buffer", byteEncoded, true);
+   ossim::toSimpleStringList(byteEncoded, m_spatialExtents);
+   kwl.add(prefix, "spatial_extents", byteEncoded, true);
+   kwl.add(prefix, ossimKeywordNames::SCALAR_TYPE_KW, ossimScalarTypeLut::instance()->getEntryString(m_scalarType));
+   
+   return ossimDataObject::saveState(kwl, prefix);
+}
+
+bool ossimRectilinearDataObject::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   if(!ossimDataObject::loadState(kwl, prefix)) return false;
+   
+   const char* spatial_extents = kwl.find(prefix, "spatial_extents");
+   const char* data_buffer = kwl.find(prefix, "data_buffer");
+   const char* scalar_type = kwl.find(prefix, ossimKeywordNames::SCALAR_TYPE_KW);
+   m_spatialExtents.clear();
+   m_dataBuffer.clear();
+                                 
+   if(spatial_extents)
+   {
+      if(!ossim::toSimpleVector(m_spatialExtents, ossimString(spatial_extents)))
+      {
+         return false;
+      }
+   }
+   if(data_buffer)
+   {
+      if(!ossim::toSimpleVector(m_dataBuffer, ossimString(kwl.find(prefix, "data_buffer"))))
+      {
+         return false;
+      }
+   }
+   if(scalar_type)
+   {
+      ossimScalarTypeLut::instance()->getScalarTypeFromString(scalar_type);
+   }
+   else 
+   {
+      m_scalarType = OSSIM_SCALAR_UNKNOWN;
+   }
+
+   m_numberOfDataComponents = (ossim_uint32) m_spatialExtents.size();
+   
+   return true;
+   
+}                     
+
diff --git a/src/ossim/base/ossimReferenced.cpp b/ossim/src/ossim/base/ossimReferenced.cpp
similarity index 100%
rename from src/ossim/base/ossimReferenced.cpp
rename to ossim/src/ossim/base/ossimReferenced.cpp
diff --git a/src/ossim/base/ossimRefreshEvent.cpp b/ossim/src/ossim/base/ossimRefreshEvent.cpp
similarity index 100%
rename from src/ossim/base/ossimRefreshEvent.cpp
rename to ossim/src/ossim/base/ossimRefreshEvent.cpp
diff --git a/ossim/src/ossim/base/ossimRegExp.cpp b/ossim/src/ossim/base/ossimRegExp.cpp
new file mode 100644
index 0000000..6719a29
--- /dev/null
+++ b/ossim/src/ossim/base/ossimRegExp.cpp
@@ -0,0 +1,1299 @@
+ 
+//
+// Copyright (C) 1991 Texas Instruments Incorporated.
+//
+// Permission is granted to any individual or institution to use, copy, modify,
+// and distribute this software, provided that this complete copyright and
+// permission notice is maintained, intact, in all copies and supporting
+// documentation.
+//
+// Texas Instruments Incorporated provides this software "as is" without
+// express or implied warranty.
+//
+//
+// Created: MNF 06/13/89  Initial Design and Implementation
+// Updated: LGO 08/09/89  Inherit from Generic
+// Updated: MBN 09/07/89  Added conditional exception handling
+// Updated: MBN 12/15/89  Sprinkled "const" qualifiers all over the place!
+// Updated: DLS 03/22/91  New lite version
+//
+// This  is the header file  for the regular  expression class.   An object of
+// this class contains a regular expression,  in  a special "compiled" format.
+// This  compiled format consists  of  several slots   all kept as the objects
+// private data.  The  RegExp class  provides a convenient  way  to  represent
+// regular  expressions.  It makes it easy   to search  for  the  same regular
+// expression in many different strings without having to  compile a string to
+// regular expression format more than necessary.
+//
+// A regular  expression allows a programmer to  specify complex patterns that
+// can be searched for  and  matched against the  character string of a String
+// object.  In  its  simplest case, a   regular expression  is a  sequence  of
+// characters with which you can search for exact character matches.  However,
+// many times you may not know the exact sequence you want to find, or you may
+// only want to find a match at the beginning or end of  a String.  The RegExp
+// object  allows specification of  such patterns by  utilizing the  following
+// regular  expression  meta-characters   (note   that  more  one  of    these
+// meta-characters  can  be used in a single  regular  expression in  order to
+// create complex search patterns):
+//
+//         ^    Match at beginning of line
+//         $    Match at end of line
+//         .    Match any single character
+//         [ ]  Match any one character inside the brackets
+//         [^ ] Match any character NOT inside the brackets
+//         -    Match any character in range on either side of dash
+//         *    Match preceding pattern zero or more times
+//         +    Match preceding pattern one or more times
+//         ?    Match preceding pattern zero or once only
+//         ()   Save a matched expression and use it in a further match.
+//
+// There are three constructors for RegExp.  One  just creates an empty RegExp
+// object.  Another creates a RegExp object  and initializes it with a regular
+// expression  that is given  in  the form of a   char*.   The  third  takes a
+// reference  to  a RegExp  object    as an  argument    and creates an object
+// initialized with the information from the given RegExp object.
+//
+// The  find  member function  finds   the  first  occurence   of  the regualr
+// expression of that object in the string given to find as an argument.  Find
+// returns a boolean, and  if true,  mutates  the private  data appropriately.
+// Find sets pointers to the beginning and end of  the thing last  found, they
+// are pointers into the actual string  that was searched.   The start and end
+// member functions return indicies  into the searched string that  correspond
+// to the beginning   and  end pointers  respectively.   The    compile member
+// function takes a char* and puts the  compiled version of the char* argument
+// into the object's private data fields.  The == and  != operators only check
+// the  to see  if   the compiled  regular  expression   is the same, and  the
+// deep_equal functions also checks  to see if the  start and end pointers are
+// the same.  The is_valid  function returns false if  program is set to NULL,
+// (i.e. there is no valid compiled exression).  The set_invalid function sets
+// the  program to NULL  (Warning: this deletes the compiled  expression). The
+// following examples may help clarify regular expression usage:
+//
+//   *  The regular expression  "^hello" matches  a "hello"  only at  the
+//      beginning of a  line.  It would match "hello  there" but not "hi,
+//      hello there".
+//
+//   *  The regular expression "long$" matches a  "long"  only at the end
+//      of a line. It would match "so long\0", but not "long ago".
+//
+//   *  The regular expression "t..t..g"  will match anything that  has a
+//      "t" then any two characters, another "t", any  two characters and
+//      then a "g".   It will match  "testing", or "test again" but would
+//      not match "toasting"
+//
+//   *  The regular  expression "[1-9ab]" matches any  number one through
+//      nine, and the characters  "a" and  "b".  It would match "hello 1"
+//      or "begin", but would not match "no-match".
+//
+//   *  The  regular expression "[^1-9ab]"  matches any character that is
+//      not a number one  through nine, or  an "a" or "b".   It would NOT
+//      match "hello 1" or "begin", but would match "no-match".
+//
+//   *  The regular expression "br* " matches  something that begins with
+//      a "b", is followed by zero or more "r"s, and ends in a space.  It
+//      would match "brrrrr ", and "b ", but would not match "brrh ".
+//
+//   *  The regular expression "br+ " matches something  that begins with
+//      a "b", is followed by one or more "r"s, and ends in  a space.  It
+//      would match "brrrrr ",  and  "br ", but would not  match "b  " or
+//      "brrh ".
+//
+//   *  The regular expression "br? " matches  something that begins with
+//      a "b", is followed by zero or one "r"s, and ends in  a space.  It
+//      would  match  "br ", and "b  ", but would not match  "brrrr "  or
+//      "brrh ".
+//
+//   *  The regular expression "(..p)b" matches  something ending with pb
+//      and beginning with whatever the two characters before the first p
+//      encounterd in the line were.  It would find  "repb" in "rep drepa
+//      qrepb".  The regular expression "(..p)a"  would find "repa qrepb"
+//      in "rep drepa qrepb"
+//
+//   *  The regular expression "d(..p)" matches something ending  with p,
+//      beginning with d, and having  two characters  in between that are
+//      the same as the two characters before  the first p  encounterd in
+//      the line.  It would match "drepa qrepb" in "rep drepa qrepb".
+//
+
+#include <cstring>
+#include <cstdio>
+#include <ossim/base/ossimRegExp.h>
+#include <iostream>
+// ossimRegExp -- Copies the given regular expression.
+
+ossimRegExp::ossimRegExp (const ossimRegExp& rxp) :
+  regstart(0),     // Internal use only
+  reganch(0),      // Internal use only
+  regmust(0),      // Internal use only
+  regmlen(0),     // Internal use only
+  program(0),   
+  progsize(0),
+  searchstring(0),
+
+ // work variables
+  regparse(0),
+  regnpar(0),  // () count.
+  regdummy(0),
+  regcode(0),  // Code-emit pointer; &regdummy = don't.
+  regsize(0),  // Code size.
+  reginput(0),  // String-input pointer.
+  regbol(0),  // Beginning of input, for ^ check.
+  regstartp(0), // Pointer to startp array.
+  regendp(0) // Ditto for endp.
+{
+   if(rxp.program)
+   {
+      int ind = 0; 
+      this->progsize = rxp.progsize;		// Copy regular expression size
+      this->program = new char[this->progsize];	// Allocate storage
+      for(ind=this->progsize; ind-- != 0;)		// Copy regular expresion
+         this->program[ind] = rxp.program[ind];
+      this->startp[0] = rxp.startp[0];		// Copy pointers into last
+      this->endp[0] = rxp.endp[0];			// Successful "find" operation
+      this->regmust = rxp.regmust;			// Copy field
+      if (rxp.regmust != NULL) {
+         char* dum = rxp.program;
+         ind = 0;
+         while (dum != rxp.regmust) {
+            ++dum;
+            ++ind;
+         }
+         this->regmust = this->program + ind;
+      }
+      this->regstart = rxp.regstart;		// Copy starting index
+      this->reganch = rxp.reganch;			// Copy remaining private data
+      this->regmlen = rxp.regmlen;			// Copy remaining private data
+   }
+}
+
+
+// operator== -- Returns true if two regular expressions have the same
+// compiled program for pattern matching.
+
+bool ossimRegExp::operator== (const ossimRegExp& rxp) const {
+  if (this != &rxp) {				// Same address?
+    ossim_uint32 ind = this->progsize;		// Get regular expression size
+    if (ind != rxp.progsize)			// If different size regexp
+      return false;				// Return failure
+    while(ind-- != 0)				// Else while still characters
+      if(this->program[ind] != rxp.program[ind]) // If regexp are different    
+	return false;				 // Return failure             
+  }
+  return true;					// Else same, return success  
+}
+
+
+// deep_equal -- Returns true if have the same compiled regular expressions
+// and the same start and end pointers.
+
+bool ossimRegExp::deep_equal (const ossimRegExp& rxp) const {
+  ossim_uint32 ind = this->progsize;		// Get regular expression size
+  if (ind != rxp.progsize)			// If different size regexp
+    return false;				// Return failure
+  while(ind-- != 0)		 		// Else while still characters
+    if(this->program[ind] != rxp.program[ind])	// If regexp are different    
+      return false;				// Return failure             
+  return (this->startp[0] == rxp.startp[0] && 	// Else if same start/end ptrs,
+	  this->endp[0] == rxp.endp[0]);	// Return true
+}   
+
+// The remaining code in this file is derived from the  regular expression code
+// whose  copyright statement appears  below.  It has been  changed to work
+// with the class concepts of C++ and COOL.
+
+/*
+ * compile and find 
+ *
+ *	Copyright (c) 1986 by University of Toronto.
+ *	Written by Henry Spencer.  Not derived from licensed software.
+ *
+ *	Permission is granted to anyone to use this software for any
+ *	purpose on any computer system, and to redistribute it freely,
+ *	subject to the following restrictions:
+ *
+ *	1. The author is not responsible for the consequences of use of
+ *		this software, no matter how awful, even if they arise
+ *		from defects in it.
+ *
+ *	2. The origin of this software must not be misrepresented, either
+ *		by explicit claim or by omission.
+ *
+ *	3. Altered versions must be plainly marked as such, and must not
+ *		be misrepresented as being the original software.
+ *
+ * Beware that some of this code is subtly aware of the way operator
+ * precedence is structured in regular expressions.  Serious changes in
+ * regular-expression syntax might require a total rethink.
+ */
+
+/*
+ * The "internal use only" fields in regexp.h are present to pass info from
+ * compile to execute that permits the execute phase to run lots faster on
+ * simple cases.  They are:
+ *
+ * regstart	char that must begin a match; '\0' if none obvious
+ * reganch	is the match anchored (at beginning-of-line only)?
+ * regmust	string (pointer into program) that match must include, or NULL
+ * regmlen	length of regmust string
+ *
+ * Regstart and reganch permit very fast decisions on suitable starting points
+ * for a match, cutting down the work a lot.  Regmust permits fast rejection
+ * of lines that cannot possibly match.  The regmust tests are costly enough
+ * that compile() supplies a regmust only if the r.e. contains something
+ * potentially expensive (at present, the only such thing detected is * or +
+ * at the start of the r.e., which can involve a lot of backup).  Regmlen is
+ * supplied because the test in find() needs it and compile() is computing
+ * it anyway.
+ */
+
+/*
+ * Structure for regexp "program".  This is essentially a linear encoding
+ * of a nondeterministic finite-state machine (aka syntax charts or
+ * "railroad normal form" in parsing technology).  Each node is an opcode
+ * plus a "next" pointer, possibly plus an operand.  "Next" pointers of
+ * all nodes except BRANCH implement concatenation; a "next" pointer with
+ * a BRANCH on both ends of it is connecting two alternatives.  (Here we
+ * have one of the subtle syntax dependencies:  an individual BRANCH (as
+ * opposed to a collection of them) is never concatenated with anything
+ * because of operator precedence.)  The operand of some types of node is
+ * a literal string; for others, it is a node leading into a sub-FSM.  In
+ * particular, the operand of a BRANCH node is the first node of the branch.
+ * (NB this is *not* a tree structure:  the tail of the branch connects
+ * to the thing following the set of BRANCHes.)  The opcodes are:
+ */
+
+// definition	number	opnd?	meaning
+#define	END	0		// no	End of program.
+#define	BOL	1		// no	Match "" at beginning of line.
+#define	EOL	2		// no	Match "" at end of line.
+#define	ANY	3		// no	Match any one character.
+#define	ANYOF	4		// str	Match any character in this string.
+#define	ANYBUT	5		// str	Match any character not in this
+				// string.
+#define	BRANCH	6		// node	Match this alternative, or the
+				// next...
+#define	BACK	7		// no	Match "", "next" ptr points backward.
+#define	EXACTLY	8		// str	Match this string.
+#define	NOTHING	9		// no	Match empty string.
+#define	STAR	10		// node	Match this (simple) thing 0 or more
+				// times.
+#define	PLUS	11		// node	Match this (simple) thing 1 or more
+				// times.
+#define	OPEN	20		// no	Mark this point in input as start of
+				// #n.
+// OPEN+1 is number 1, etc.
+#define	CLOSE	30		// no	Analogous to OPEN.
+
+/*
+ * Opcode notes:
+ *
+ * BRANCH	The set of branches constituting a single choice are hooked
+ *		together with their "next" pointers, since precedence prevents
+ *		anything being concatenated to any individual branch.  The
+ *		"next" pointer of the last BRANCH in a choice points to the
+ *		thing following the whole choice.  This is also where the
+ *		final "next" pointer of each individual branch points; each
+ *		branch starts with the operand node of a BRANCH node.
+ *
+ * BACK		Normal "next" pointers all implicitly point forward; BACK
+ *		exists to make loop structures possible.
+ *
+ * STAR,PLUS	'?', and complex '*' and '+', are implemented as circular
+ *		BRANCH structures using BACK.  Simple cases (one character
+ *		per match) are implemented with STAR and PLUS for speed
+ *		and to minimize recursive plunges.
+ *
+ * OPEN,CLOSE	...are numbered at compile time.
+ */
+
+/*
+ * A node is one char of opcode followed by two chars of "next" pointer.
+ * "Next" pointers are stored as two 8-bit pieces, high order first.  The
+ * value is a positive offset from the opcode of the node containing it.
+ * An operand, if any, simply follows the node.  (Note that much of the
+ * code generation knows about this implicit relationship.)
+ *
+ * Using two bytes for the "next" pointer is vast overkill for most things,
+ * but allows patterns to get big without disasters.
+ */
+
+#define	OP(p)		(*(p))
+#define	NEXT(p)		(((*((p)+1)&0377)<<8) + (*((p)+2)&0377))
+#define	OPERAND(p)	((p) + 3)
+
+const unsigned char MAGIC = 0234;
+/*
+ * Utility definitions.
+ */
+
+#define	UCHARAT(p)	((const unsigned char*)(p))[0]
+
+
+#define	FAIL(m)	{ regerror(m); return(NULL); }
+#define	ISMULT(c)	((c) == '*' || (c) == '+' || (c) == '?')
+#define	META	"^$.[()|?+*\\"
+
+
+/*
+ * Flags to be passed up and down.
+ */
+#define	HASWIDTH	01	// Known never to match null string.
+#define	SIMPLE		02	// Simple enough to be STAR/PLUS operand.
+#define	SPSTART		04	// Starts with * or +.
+#define	WORST		0	// Worst case.
+
+
+
+/////////////////////////////////////////////////////////////////////////
+//
+//  COMPILE AND ASSOCIATED FUNCTIONS
+//
+/////////////////////////////////////////////////////////////////////////
+
+
+/*
+ * Global work variables for compile().
+ */
+// static const char* regparse;	// Input-scan pointer.
+// static       int   regnpar;	// () count.
+// static       char  regdummy;
+// static       char* regcode;	// Code-emit pointer; &regdummy = don't.
+// static       long  regsize;	// Code size.
+
+/*
+ * Forward declarations for compile()'s friends.
+ */
+// #ifndef static
+// #define	static	static
+// #endif
+// static       char* reg (int, int*);
+// static       char* regbranch (int*);
+// static       char* regpiece (int*);
+// static       char* regatom (int*);
+// static       char* regnode (char);
+// static const char* regnext (register const char*);
+// static       char* regnext (register char*);
+// static void        regc (unsigned char);
+// static void        reginsert (char, char*);
+// static void        regtail (char*, const char*);
+// static void        regoptail (char*, const char*);
+
+// #ifdef STRCSPN
+// static int strcspn ();
+// #endif
+
+
+
+/*
+ * We can't allocate space until we know how big the compiled form will be,
+ * but we can't compile it (and thus know how big it is) until we've got a
+ * place to put the code.  So we cheat:  we compile it twice, once with code
+ * generation turned off and size counting turned on, and once "for real".
+ * This also means that we don't allocate space until we are sure that the
+ * thing really will compile successfully, and we never have to move the
+ * code and thus invalidate pointers into it.  (Note that it has to be in
+ * one piece because free() must be able to free it all.)
+ *
+ * Beware that the optimization-preparation code in here knows about some
+ * of the structure of the compiled regexp.
+ */
+
+
+// compile -- compile a regular expression into internal code
+// for later pattern matching.
+
+void ossimRegExp::compile (const char* exp) {
+    register const char* scan;
+    register const char* longest;
+    register unsigned long len;
+             int         flags;
+
+    if (exp == NULL) {
+      //RAISE Error, SYM(ossimRegExp), SYM(No_Expr),
+      printf ("ossimRegExp::compile(): No expression supplied.\n");
+      return;
+    }
+
+    // First pass: determine size, legality.
+    regparse = exp;
+    regnpar = 1;
+    regsize = 0L;
+    regcode = ®dummy;
+    regc(MAGIC);
+    if(!reg(0, &flags))
+      {
+	printf ("ossimRegExp::compile(): Error in compile.\n");
+	return;
+      }
+    this->startp[0] = this->endp[0] = this->searchstring = NULL;
+
+    // Small enough for pointer-storage convention? 
+    if (regsize >= 32767L) {	// Probably could be 65535L. 
+      //RAISE Error, SYM(ossimRegExp), SYM(Expr_Too_Big),
+      printf ("ossimRegExp::compile(): Expression too big.\n");
+      return;
+    }
+
+    // Allocate space. 
+//#ifndef WIN32
+    if (this->program != NULL) delete [] this->program;  
+//#endif
+    this->program = new char[regsize];
+    this->progsize = (int) regsize;
+
+    if (this->program == NULL) {
+      //RAISE Error, SYM(ossimRegExp), SYM(Out_Of_Memory),
+      printf ("ossimRegExp::compile(): Out of memory.\n"); 
+      return;
+    }
+
+    // Second pass: emit code.
+    regparse = exp;
+    regnpar = 1;
+    regcode = this->program;
+    regc(MAGIC);
+    reg(0, &flags);
+
+    // Dig out information for optimizations.
+    this->regstart = '\0';		// Worst-case defaults.
+    this->reganch = 0;
+    this->regmust = NULL;
+    this->regmlen = 0;
+    scan = this->program + 1;	// First BRANCH.
+    if (OP(regnext(scan)) == END) {	// Only one top-level choice.
+	scan = OPERAND(scan);
+
+	// Starting-point info.
+	if (OP(scan) == EXACTLY)
+	    this->regstart = *OPERAND(scan);
+	else if (OP(scan) == BOL)
+	    this->reganch++;
+
+	 //
+	 // If there's something expensive in the r.e., find the longest
+	 // literal string that must appear and make it the regmust.  Resolve
+	 // ties in favor of later strings, since the regstart check works
+	 // with the beginning of the r.e. and avoiding duplication
+	 // strengthens checking.  Not a strong reason, but sufficient in the
+	 // absence of others. 
+	 //
+	if (flags & SPSTART) {
+	    longest = NULL;
+	    len = 0;
+	    for (; scan != NULL; scan = regnext(scan))
+		if (OP(scan) == EXACTLY && strlen(OPERAND(scan)) >= len) {
+		    longest = OPERAND(scan);
+		    len = (unsigned long)strlen(OPERAND(scan));
+		}
+	    this->regmust = longest;
+	    this->regmlen = len;
+	}
+    }
+}
+
+
+/*
+ - reg - regular expression, i.e. main body or parenthesized thing
+ *
+ * Caller must absorb opening parenthesis.
+ *
+ * Combining parenthesis handling with the base level of regular expression
+ * is a trifle forced, but the need to tie the tails of the branches to what
+ * follows makes it hard to avoid.
+ */
+char* ossimRegExp::reg (int paren, int *flagp) {
+    register char* ret;
+    register char* br;
+    register char* ender;
+    register int   parno =0;
+             int   flags;
+
+    *flagp = HASWIDTH;		// Tentatively.
+
+    // Make an OPEN node, if parenthesized.
+    if (paren) {
+	if (regnpar >= NSUBEXP) {
+	  //RAISE Error, SYM(ossimRegExp), SYM(Too_Many_Parens),
+	  printf ("ossimRegExp::compile(): Too many parentheses.\n");
+	  return 0;
+        }
+	parno = regnpar;
+	regnpar++;
+	ret = regnode(OPEN + parno);
+    }
+    else
+	ret = NULL;
+
+    // Pick up the branches, linking them together.
+    br = regbranch(&flags);
+    if (br == NULL)
+	return (NULL);
+    if (ret != NULL)
+	regtail(ret, br);	// OPEN -> first.
+    else
+	ret = br;
+    if (!(flags & HASWIDTH))
+	*flagp &= ~HASWIDTH;
+    *flagp |= flags & SPSTART;
+    while (*regparse == '|') {
+	regparse++;
+	br = regbranch(&flags);
+	if (br == NULL)
+	    return (NULL);
+	regtail(ret, br);	// BRANCH -> BRANCH.
+	if (!(flags & HASWIDTH))
+	    *flagp &= ~HASWIDTH;
+	*flagp |= flags & SPSTART;
+      }
+
+    // Make a closing node, and hook it on the end.
+    ender = regnode((paren) ? CLOSE + parno : END);
+    regtail(ret, ender);
+
+    // Hook the tails of the branches to the closing node.
+    for (br = ret; br != NULL; br = regnext(br))
+	regoptail(br, ender);
+
+    // Check for proper termination.
+    if (paren && *regparse++ != ')') {
+        //RAISE Error, SYM(ossimRegExp), SYM(Unmatched_Parens),
+        printf ("ossimRegExp::compile(): Unmatched parentheses.\n");
+	return 0;
+    }
+    else if (!paren && *regparse != '\0') {
+        if (*regparse == ')') {
+            //RAISE Error, SYM(ossimRegExp), SYM(Unmatched_Parens),
+            printf ("ossimRegExp::compile(): Unmatched parentheses.\n");
+	    return 0;
+	}
+	else {
+	    //RAISE Error, SYM(ossimRegExp), SYM(Internal_Error),
+	    printf ("ossimRegExp::compile(): Internal error.\n");
+	    return 0;
+        }
+	// NOTREACHED
+    }
+    return (ret);
+}
+
+
+/*
+ - regbranch - one alternative of an | operator
+ *
+ * Implements the concatenation operator.
+ */
+char* ossimRegExp::regbranch (int *flagp) {
+    register char* ret;
+    register char* chain;
+    register char* latest;
+    int                  flags;
+
+    *flagp = WORST;		// Tentatively.
+
+    ret = regnode(BRANCH);
+    chain = NULL;
+    while (*regparse != '\0' && *regparse != '|' && *regparse != ')') {
+	latest = regpiece(&flags);
+	if (latest == NULL)
+	    return (NULL);
+	*flagp |= flags & HASWIDTH;
+	if (chain == NULL)	// First piece.
+	    *flagp |= flags & SPSTART;
+	else
+	    regtail(chain, latest);
+	chain = latest;
+    }
+    if (chain == NULL)		// Loop ran zero times.
+	regnode(NOTHING);
+
+    return (ret);
+}
+
+
+/*
+ - regpiece - something followed by possible [*+?]
+ *
+ * Note that the branching code sequences used for ? and the general cases
+ * of * and + are somewhat optimized:  they use the same NOTHING node as
+ * both the endmarker for their branch list and the body of the last branch.
+ * It might seem that this node could be dispensed with entirely, but the
+ * endmarker role is not redundant.
+ */
+char* ossimRegExp::regpiece (int *flagp) {
+    register char* ret;
+    register char  op;
+    register char* next;
+    int            flags;
+
+    ret = regatom(&flags);
+    if (ret == NULL)
+	return (NULL);
+
+    op = *regparse;
+    if (!ISMULT(op)) {
+	*flagp = flags;
+	return (ret);
+    }
+
+    if (!(flags & HASWIDTH) && op != '?') {
+        //RAISE Error, SYM(ossimRegExp), SYM(Empty_Operand),
+        printf ("ossimRegExp::compile() : *+ operand could be empty.\n");
+	return 0;
+    }
+    *flagp = (op != '+') ? (WORST | SPSTART) : (WORST | HASWIDTH);
+
+    if (op == '*' && (flags & SIMPLE))
+	reginsert(STAR, ret);
+    else if (op == '*') {
+	// Emit x* as (x&|), where & means "self".
+	reginsert(BRANCH, ret);	// Either x
+	regoptail(ret, regnode(BACK));	// and loop
+	regoptail(ret, ret);	// back
+	regtail(ret, regnode(BRANCH));	// or
+	regtail(ret, regnode(NOTHING));	// null.
+    }
+    else if (op == '+' && (flags & SIMPLE))
+	reginsert(PLUS, ret);
+    else if (op == '+') {
+	// Emit x+ as x(&|), where & means "self".
+	next = regnode(BRANCH);	// Either
+	regtail(ret, next);
+	regtail(regnode(BACK), ret);	// loop back
+	regtail(next, regnode(BRANCH));	// or
+	regtail(ret, regnode(NOTHING));	// null.
+    }
+    else if (op == '?') {
+	// Emit x? as (x|)
+	reginsert(BRANCH, ret);	// Either x
+	regtail(ret, regnode(BRANCH));	// or
+	next = regnode(NOTHING);// null.
+	regtail(ret, next);
+	regoptail(ret, next);
+    }
+    regparse++;
+    if (ISMULT(*regparse)) {
+        //RAISE Error, SYM(ossimRegExp), SYM(Nested_Operand),
+        printf ("ossimRegExp::compile(): Nested *?+.\n");
+	return 0;
+    }
+    return (ret);
+}
+
+
+/*
+ - regatom - the lowest level
+ *
+ * Optimization:  gobbles an entire sequence of ordinary characters so that
+ * it can turn them into a single node, which is smaller to store and
+ * faster to run.  Backslashed characters are exceptions, each becoming a
+ * separate node; the code is simpler that way and it's not worth fixing.
+ */
+char* ossimRegExp::regatom (int *flagp) {
+    register char* ret;
+             int   flags;
+
+    *flagp = WORST;		// Tentatively.
+
+    switch (*regparse++) {
+	case '^':
+	    ret = regnode(BOL);
+	    break;
+	case '$':
+	    ret = regnode(EOL);
+	    break;
+	case '.':
+	    ret = regnode(ANY);
+	    *flagp |= HASWIDTH | SIMPLE;
+	    break;
+	case '[':{
+		register int    rxpclass;
+		register int    rxpclassend;
+
+		if (*regparse == '^') {	// Complement of range.
+		    ret = regnode(ANYBUT);
+		    regparse++;
+		}
+		else
+		    ret = regnode(ANYOF);
+		if (*regparse == ']' || *regparse == '-')
+		    regc(*regparse++);
+		while (*regparse != '\0' && *regparse != ']') {
+		    if (*regparse == '-') {
+			regparse++;
+			if (*regparse == ']' || *regparse == '\0')
+			    regc('-');
+			else {
+			    rxpclass = UCHARAT(regparse - 2) + 1;
+			    rxpclassend = UCHARAT(regparse);
+			    if (rxpclass > rxpclassend + 1) {
+			       //RAISE Error, SYM(ossimRegExp), SYM(Invalid_Range),
+			       printf ("ossimRegExp::compile(): Invalid range in [].\n");
+			       return 0;
+                            }
+			    for (; rxpclass <= rxpclassend; rxpclass++)
+				regc(rxpclass);
+			    regparse++;
+			}
+		    }
+		    else
+			regc(*regparse++);
+		}
+		regc('\0');
+		if (*regparse != ']') {
+                    //RAISE Error, SYM(ossimRegExp), SYM(Unmatched_Bracket),
+                    printf ("ossimRegExp::compile(): Unmatched [].\n");
+		    return 0;
+	        }
+		regparse++;
+		*flagp |= HASWIDTH | SIMPLE;
+	    }
+	    break;
+	case '(':
+	    ret = reg(1, &flags);
+	    if (ret == NULL)
+		return (NULL);
+	    *flagp |= flags & (HASWIDTH | SPSTART);
+	    break;
+	case '\0':
+	case '|':
+	case ')':
+	    //RAISE Error, SYM(ossimRegExp), SYM(Internal_Error),
+            printf ("ossimRegExp::compile(): Internal error.\n"); // Never here
+	    return 0;
+	case '?':
+	case '+':
+	case '*':
+	    //RAISE Error, SYM(ossimRegExp), SYM(No_Operand),
+            printf ("ossimRegExp::compile(): ?+* follows nothing.\n");
+	    return 0;
+	case '\\':
+	    if (*regparse == '\0') {
+	        //RAISE Error, SYM(ossimRegExp), SYM(Trailing_Backslash),
+                printf ("ossimRegExp::compile(): Trailing backslash.\n");
+		return 0;
+            }
+	    ret = regnode(EXACTLY);
+	    regc(*regparse++);
+	    regc('\0');
+	    *flagp |= HASWIDTH | SIMPLE;
+	    break;
+	default:{
+		register int    len;
+		register char   ender;
+
+		regparse--;
+		len = (int)strcspn(regparse, META);
+		if (len <= 0) {
+		    //RAISE Error, SYM(ossimRegExp), SYM(Internal_Error),
+                    printf ("ossimRegExp::compile(): Internal error.\n");
+		    return 0;
+                }
+		ender = *(regparse + len);
+		if (len > 1 && ISMULT(ender))
+		    len--;	// Back off clear of ?+* operand.
+		*flagp |= HASWIDTH;
+		if (len == 1)
+		    *flagp |= SIMPLE;
+		ret = regnode(EXACTLY);
+		while (len > 0) {
+		    regc(*regparse++);
+		    len--;
+		}
+		regc('\0');
+	    }
+	    break;
+    }
+    return (ret);
+}
+
+
+/*
+ - regnode - emit a node
+   Location.
+ */
+char* ossimRegExp::regnode (char op) {
+    register char* ret;
+    register char* ptr;
+
+    ret = regcode;
+    if (ret == &regdummy) {
+	regsize += 3;
+	return (ret);
+    }
+
+    ptr = ret;
+    *ptr++ = op;
+    *ptr++ = '\0';		// Null "next" pointer.
+    *ptr++ = '\0';
+    regcode = ptr;
+
+    return (ret);
+}
+
+
+/*
+ - regc - emit (if appropriate) a byte of code
+ */
+void ossimRegExp::regc (unsigned char b) {
+    if (regcode != &regdummy)
+	*regcode++ = b;
+    else
+	regsize++;
+}
+
+
+/*
+ - reginsert - insert an operator in front of already-emitted operand
+ *
+ * Means relocating the operand.
+ */
+void ossimRegExp::reginsert (char op, char* opnd) {
+    register char* src;
+    register char* dst;
+    register char* place;
+
+    if (regcode == &regdummy) {
+	regsize += 3;
+	return;
+    }
+
+    src = regcode;
+    regcode += 3;
+    dst = regcode;
+    while (src > opnd)
+	*--dst = *--src;
+
+    place = opnd;		// Op node, where operand used to be.
+    *place++ = op;
+    *place++ = '\0';
+    *place++ = '\0';
+}
+
+
+/*
+ - regtail - set the next-pointer at the end of a node chain
+ */
+void ossimRegExp::regtail (char* p, const char* val) {
+    register char* scan;
+    register char* temp;
+    register int   offset;
+
+    if (p == &regdummy)
+	return;
+
+    // Find last node.
+    scan = p;
+    for (;;) {
+	temp = regnext(scan);
+	if (temp == NULL)
+	    break;
+	scan = temp;
+    }
+
+    if (OP(scan) == BACK)
+	offset = (const char*)scan - val;
+    else
+	offset = val - scan;
+    *(scan + 1) = (offset >> 8) & 0377;
+    *(scan + 2) = offset & 0377;
+}
+
+
+/*
+ - regoptail - regtail on operand of first argument; nop if operandless
+ */
+void ossimRegExp::regoptail (char* p, const char* val) {
+    // "Operandless" and "op != BRANCH" are synonymous in practice.
+    if (p == NULL || p == &regdummy || OP(p) != BRANCH)
+	return;
+    regtail(OPERAND(p), val);
+}
+
+
+
+////////////////////////////////////////////////////////////////////////
+// 
+//  find and friends
+// 
+////////////////////////////////////////////////////////////////////////
+
+
+/*
+ * Global work variables for find().
+ */
+// static const char*  reginput;	// String-input pointer.
+// static const char*  regbol;	// Beginning of input, for ^ check.
+// static const char* *regstartp;	// Pointer to startp array.
+// static const char* *regendp;	// Ditto for endp.
+
+/*
+ * Forwards.
+ */
+// static int regtry (const char*, const char* *,
+// 		   const char* *, const char*);
+// static int regmatch (const char*);
+// static int regrepeat (const char*);
+
+// #ifdef DEBUG
+// int          regnarrate = 0;
+// void         regdump ();
+// static char* regprop ();
+// #endif
+
+
+
+// find -- Matches the regular expression to the given string.
+// Returns true if found, and sets start and end indexes accordingly.
+
+bool ossimRegExp::find (const char* string) {
+    register const char* s = 0;
+
+	if(!string) return false;
+    this->searchstring = string;
+
+     // Check validity of program.
+    if (!this->program || UCHARAT(this->program) != MAGIC) {
+        //RAISE Error, SYM(ossimRegExp), SYM(Internal_Error),
+        printf ("ossimRegExp::find(): Compiled regular expression corrupted.\n");
+        return 0;
+    }
+    
+    // If there is a "must appear" string, look for it.
+    if (this->regmust != NULL) {
+	s = string;
+	while ((s = strchr(s, this->regmust[0])) != NULL) {
+	    if (strncmp(s, this->regmust, this->regmlen) == 0)
+		break;		// Found it.
+	    s++;
+	}
+	if (s == NULL)		// Not present.
+	    return (0);
+    }
+     
+    // Mark beginning of line for ^ .
+    regbol = string;
+
+    // Simplest case:  anchored match need be tried only once.
+    if (this->reganch)
+	return (regtry(string, this->startp, this->endp, this->program));
+    
+    // Messy cases:  unanchored match.
+    s = string;
+    if (this->regstart != '\0')
+	// We know what char it must start with.
+	while ((s = strchr(s, this->regstart)) != NULL) {
+	    if (regtry(s, this->startp, this->endp, this->program))
+		return (1);
+	    s++;
+	  
+	}
+    else
+	// We don't -- general case.
+	do {
+	    if (regtry(s, this->startp, this->endp, this->program))
+		return (1);
+	} while (*s++ != '\0');
+    
+    // Failure.
+    return (0);
+}
+
+
+/*
+ - regtry - try match at specific point
+   0 failure, 1 success
+ */
+int ossimRegExp::regtry (const char* string, const char* *start,
+		   const char* *end, const char* prog) {
+    register       int    i;
+    register const char* *sp1;
+    register const char* *ep;
+
+    reginput = string;
+    regstartp = start;
+    regendp = end;
+
+    sp1 = start;
+    ep = end;
+    for (i = NSUBEXP; i > 0; i--) {
+	*sp1++ = NULL;
+	*ep++ = NULL;
+    }
+    if (regmatch(prog + 1)) {
+	start[0] = string;
+	end[0] = reginput;
+	return (1);
+    }
+    else
+	return (0);
+}
+
+
+/*
+ - regmatch - main matching routine
+ *
+ * Conceptually the strategy is simple:  check to see whether the current
+ * node matches, call self recursively to see whether the rest matches,
+ * and then act accordingly.  In practice we make some effort to avoid
+ * recursion, in particular by going through "ordinary" nodes (that don't
+ * need to know whether the rest of the match failed) by a loop instead of
+ * by recursion.
+ * 0 failure, 1 success
+ */
+int ossimRegExp::regmatch (const char* prog) {
+    register const char* scan;	// Current node.
+             const char* next;	// Next node.
+
+    scan = prog;
+
+    while (scan != NULL) {
+
+	next = regnext(scan);
+
+	switch (OP(scan)) {
+	    case BOL:
+		if (reginput != regbol)
+		    return (0);
+		break;
+	    case EOL:
+		if (*reginput != '\0')
+		    return (0);
+		break;
+	    case ANY:
+		if (*reginput == '\0')
+		    return (0);
+		reginput++;
+		break;
+	    case EXACTLY:{
+		    register int         len;
+		    register const char* opnd;
+
+		    opnd = OPERAND(scan);
+		    // Inline the first character, for speed.
+		    if (*opnd != *reginput)
+			return (0);
+		    len = (int)strlen(opnd);
+		    if (len > 1 && strncmp(opnd, reginput, len) != 0)
+			return (0);
+		    reginput += len;
+		}
+		break;
+	    case ANYOF:
+		if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) == NULL)
+		    return (0);
+		reginput++;
+		break;
+	    case ANYBUT:
+		if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) != NULL)
+		    return (0);
+		reginput++;
+		break;
+	    case NOTHING:
+		break;
+	    case BACK:
+		break;
+	    case OPEN + 1:
+	    case OPEN + 2:
+	    case OPEN + 3:
+	    case OPEN + 4:
+	    case OPEN + 5:
+	    case OPEN + 6:
+	    case OPEN + 7:
+	    case OPEN + 8:
+	    case OPEN + 9:{
+		    register       int    no;
+		    register const char* save;
+
+		    no = OP(scan) - OPEN;
+		    save = reginput;
+
+		    if (regmatch(next)) {
+
+			//
+			// Don't set startp if some later invocation of the
+			// same parentheses already has. 
+			//
+			if (regstartp[no] == NULL)
+			    regstartp[no] = save;
+			return (1);
+		    }
+		    else
+			return (0);
+		}
+//		break;
+	    case CLOSE + 1:
+	    case CLOSE + 2:
+	    case CLOSE + 3:
+	    case CLOSE + 4:
+	    case CLOSE + 5:
+	    case CLOSE + 6:
+	    case CLOSE + 7:
+	    case CLOSE + 8:
+	    case CLOSE + 9:{
+		    register       int    no;
+		    register const char* save;
+
+		    no = OP(scan) - CLOSE;
+		    save = reginput;
+
+		    if (regmatch(next)) {
+
+			//
+			// Don't set endp if some later invocation of the
+			// same parentheses already has. 
+			//
+			if (regendp[no] == NULL)
+			    regendp[no] = save;
+			return (1);
+		    }
+		    else
+			return (0);
+		}
+//		break;
+	    case BRANCH:{
+	      
+	      register const char* save;
+
+		    if (OP(next) != BRANCH)	// No choice.
+			next = OPERAND(scan);	// Avoid recursion.
+		    else {
+			do {
+			    save = reginput;
+			    if (regmatch(OPERAND(scan)))
+				return (1);
+			    reginput = save;
+			    scan = regnext(scan);
+			} while (scan != NULL && OP(scan) == BRANCH);
+			return (0);
+			// NOTREACHED
+		    }
+		}
+		break;
+	    case STAR:
+	    case PLUS:{
+	      register char   nextch;
+		    register int        no;
+		    register const char* save;
+		    register int        min_no;
+
+		    //
+		    // Lookahead to avoid useless match attempts when we know
+		    // what character comes next. 
+		    //
+		    nextch = '\0';
+		    if (OP(next) == EXACTLY)
+			nextch = *OPERAND(next);
+		    min_no = (OP(scan) == STAR) ? 0 : 1;
+		    save = reginput;
+		    no = regrepeat(OPERAND(scan));
+		    while (no >= min_no) {
+			// If it could work, try it.
+			if (nextch == '\0' || *reginput == nextch)
+			    if (regmatch(next))
+				return (1);
+			// Couldn't or didn't -- back up.
+			no--;
+			reginput = save + no;
+		    }
+		    return (0);
+		}
+//		break;
+	    case END:
+ 		return (1);	// Success!
+
+	    default:
+	        //RAISE Error, SYM(ossimRegExp), SYM(Internal_Error),
+                printf ("ossimRegExp::find(): Internal error -- memory corrupted.\n");
+		return 0;
+	}
+	scan = next;
+    }
+
+    // 
+    //  We get here only if there's trouble -- normally "case END" is the
+    //  terminating point. 
+    // 
+    //RAISE Error, SYM(ossimRegExp), SYM(Internal_Error),
+    printf ("ossimRegExp::find(): Internal error -- corrupted pointers.\n");
+    return (0);
+}
+
+
+/*
+ - regrepeat - repeatedly match something simple, report how many
+ */
+int ossimRegExp::regrepeat (const char* p) {
+    register       int   count = 0;
+    register const char* scan;
+    register const char* opnd;
+
+    scan = reginput;
+    opnd = OPERAND(p);
+    switch (OP(p)) {
+	case ANY:
+	    count = (int)strlen(scan);
+	    scan += count;
+	    break;
+	case EXACTLY:
+	    while (*opnd == *scan) {
+		count++;
+		scan++;
+	    }
+	    break;
+	case ANYOF:
+	    while (*scan != '\0' && strchr(opnd, *scan) != NULL) {
+		count++;
+		scan++;
+	    }
+	    break;
+	case ANYBUT:
+	    while (*scan != '\0' && strchr(opnd, *scan) == NULL) {
+		count++;
+		scan++;
+	    }
+	    break;
+	default:		// Oh dear.  Called inappropriately.
+	    //RAISE Error, SYM(ossimRegExp), SYM(Internal_Error),
+	    printf ("ossimRegExp::find(): Internal error.\n");
+	    return 0;
+    }
+    reginput = scan;
+    return (count);
+}
+
+
+/*
+ - regnext - dig the "next" pointer out of a node
+ */
+const char* ossimRegExp::regnext (register const char* p) {
+    register int offset;
+
+    if (p == &regdummy)
+	return (NULL);
+
+    offset = NEXT(p);
+    if (offset == 0)
+	return (NULL);
+
+    if (OP(p) == BACK)
+	return (p - offset);
+    else
+	return (p + offset);
+}
+
+
+char* ossimRegExp::regnext (register char* p) {
+    register int offset;
+
+    if (p == &regdummy)
+	return (NULL);
+
+    offset = NEXT(p);
+    if (offset == 0)
+	return (NULL);
+
+    if (OP(p) == BACK)
+	return (p - offset);
+    else
+	return (p + offset);
+}
diff --git a/ossim/src/ossim/base/ossimRgbLutDataObject.cpp b/ossim/src/ossim/base/ossimRgbLutDataObject.cpp
new file mode 100644
index 0000000..1a100b3
--- /dev/null
+++ b/ossim/src/ossim/base/ossimRgbLutDataObject.cpp
@@ -0,0 +1,280 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimRgbLutDataObject.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/base/ossimRgbLutDataObject.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimColumnVector3d.h>
+#include <ossim/base/ossimNotifyContext.h>
+
+#include <sstream>
+using namespace std;
+
+RTTI_DEF1(ossimRgbLutDataObject, "ossimRgbLutDataObject", ossimObject);
+
+ostream& operator <<(ostream& out,
+                     const ossimRgbLutDataObject& lut)
+{
+   for(ossim_uint32 index = 0; index < lut.theNumberOfEntries; ++index)
+   {
+      out << "entry" << index << " " << lut[index] << endl;
+   }
+
+   return out;
+}
+
+ossimRgbLutDataObject::ossimRgbLutDataObject(unsigned long numberOfEntries)
+   :
+      theLut(NULL),
+      theNumberOfEntries(numberOfEntries)
+{
+   if(theNumberOfEntries > 0)
+   {
+      // allocate 256 entries for the data object;
+      theLut = new ossimRgbVector[theNumberOfEntries];
+   }
+      
+}
+
+ossimRgbLutDataObject::ossimRgbLutDataObject(const ossimRgbLutDataObject& lut)
+   :
+      theLut(NULL),
+      theNumberOfEntries(0)
+{
+   theNumberOfEntries = lut.theNumberOfEntries;
+   if(theNumberOfEntries > 0)
+   {
+      theLut = new ossimRgbVector[theNumberOfEntries];
+      for(ossim_uint32 index = 0; index < theNumberOfEntries; ++index)
+      {
+         theLut[index] = lut.theLut[index];
+      }
+   }
+}
+
+ossimRgbLutDataObject::~ossimRgbLutDataObject()
+{
+   if(theLut)
+   {
+      delete [] theLut;
+      theLut = NULL;
+   }
+   theNumberOfEntries = 0;
+}
+
+int ossimRgbLutDataObject::findIndex(ossim_uint8 r, ossim_uint8 g, ossim_uint8 b)
+{
+   ossim_uint32 distance = 0x7FFFFFFF; // max 4 byte signed
+   ossim_int32 result   = 0;
+
+   if(theNumberOfEntries > 0)
+   {
+      for(ossim_uint32 i = 0; i < theNumberOfEntries; ++i)
+      {
+         ossim_uint32 rDelta = r - theLut[i].getR();
+         ossim_uint32 gDelta = g - theLut[i].getG();
+         ossim_uint32 bDelta = b - theLut[i].getB();
+
+         ossim_uint32 deltaSumSquare = (rDelta*rDelta +
+                                        gDelta*gDelta +
+                                        bDelta*bDelta);
+         if(deltaSumSquare == 0)
+         {
+            return static_cast<int>(i);
+         }
+         else if( deltaSumSquare < distance)
+         {
+            result = static_cast<int>(i);
+            distance = deltaSumSquare;
+         }
+      }
+   }
+
+   return result;
+}
+
+ossimRgbLutDataObject ossimRgbLutDataObject::rotate(long numberOfElements)const
+{
+   if(numberOfElements < 0)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL: Negative rotation is not supported yet in ossimRgbLutDataObject::rotate" << endl;
+      return *this;
+   }
+   ossimRgbLutDataObject lut;
+   for(ossim_uint32 index = 0; index < theNumberOfEntries; ++index)
+   {
+      int adjustedDestinationIndex = (index+numberOfElements)%theNumberOfEntries;
+      lut[adjustedDestinationIndex] = theLut[index] ;
+   }
+
+   return lut;
+}
+
+ossimRgbLutDataObject& ossimRgbLutDataObject::rotate(long numberOfElements)
+{
+   if(numberOfElements < 0)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL: Negative rotation is not supported yet in ossimRgbLutDataObject::rotate" << endl;
+      return *this;
+   }
+   const ossimRgbLutDataObject* temp = this;
+
+   *this = temp->rotate(numberOfElements);
+
+   return *this;
+}
+
+const ossimRgbLutDataObject& ossimRgbLutDataObject::operator =(const ossimRgbLutDataObject& lut)
+{
+   if(theNumberOfEntries != lut.theNumberOfEntries)
+   {
+      delete [] theLut;
+      theLut = NULL;
+   }
+
+   theNumberOfEntries = lut.theNumberOfEntries;
+   if(!theLut&&(theNumberOfEntries > 0))
+   {
+      theLut = new ossimRgbVector[theNumberOfEntries];
+   }
+   for(unsigned long index = 0; index < theNumberOfEntries; ++index)
+   {
+      theLut[index] = lut.theLut[index];
+   }
+
+   return *this;
+}
+
+bool ossimRgbLutDataObject::operator ==(const ossimRgbLutDataObject& lut)const
+{
+   if(theNumberOfEntries != lut.theNumberOfEntries)
+   {
+      return false;
+   }
+   for(unsigned long index = 0; index < theNumberOfEntries; ++index)
+   {
+      if(theLut[index] != lut.theLut[index])
+      {
+         return false;
+      }
+   }
+   return true;
+}
+
+bool ossimRgbLutDataObject::saveState(ossimKeywordlist& kwl, const char* prefix)const
+{
+   kwl.add(prefix,
+           "type",
+           getClassName(),
+           true);
+   kwl.add(prefix,
+           "number_of_entries",
+           ossimString::toString(theNumberOfEntries).c_str(),
+           true);
+   for(ossim_uint32 index = 0; index < theNumberOfEntries; ++index)
+   {
+      ossimString newPrefix = "entry";
+      newPrefix += ossimString::toString(index);
+      ostringstream ostr;
+      ostr << (int)(theLut[index].getR())
+           << " " << (int)(theLut[index].getG())
+           << " " << (int)(theLut[index].getB());
+      kwl.add(prefix,
+              newPrefix,
+              ostr.str().c_str(),
+              true);
+   }
+
+   return true;
+}
+
+bool ossimRgbLutDataObject::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   const char* lutFile = kwl.find(prefix, "lut_file");
+   ossimKeywordlist fileLut;
+   ossimKeywordlist* tempKwl = (const_cast<ossimKeywordlist*>(&kwl));
+   ossimString tempPrefix = prefix;
+
+   // this should have been used instead of lut_file.  We will still look
+   // for lut_file for backward compatibility.
+   //
+   if(!lutFile)
+   {
+      lutFile = kwl.find(prefix, "filename");
+   }
+   // check to see if we should open an external file
+   // if so point the fileLut to the one that we use
+   if(lutFile)
+   {
+      ossimFilename filename(lutFile);
+      if(filename.exists())
+      {
+         fileLut.addFile(filename.c_str());
+         tempKwl = &fileLut;
+         tempPrefix = "";
+      }
+   }
+ 
+   const char* numberOfEntries = tempKwl->find(tempPrefix, "number_of_entries");
+   if(!numberOfEntries)
+   {
+      numberOfEntries = tempKwl->find(tempPrefix, "number_entries");
+   }
+   if(!numberOfEntries) return false;
+   theNumberOfEntries = ossimString(numberOfEntries).toULong();
+
+   delete [] theLut;
+   theLut = new ossimRgbVector[theNumberOfEntries];
+
+   if(tempKwl->find(tempPrefix, "entry0"))
+   {
+      for(ossim_uint32 index = 0; index < theNumberOfEntries; ++index)
+      {
+         ossimString newPrefix = "entry";
+         newPrefix += ossimString::toString(index);
+         ossimString v = tempKwl->find(tempPrefix, newPrefix.c_str());
+         istringstream istr(v);
+
+         ossimString r, g, b;
+         istr >> r >> g >> b;
+         theLut[index].setR((unsigned char)r.toInt32());
+         theLut[index].setG((unsigned char)g.toInt32());
+         theLut[index].setB((unsigned char)b.toInt32());
+      }
+   }
+   else
+   {
+      for(ossim_uint32 index = 0; index < theNumberOfEntries; ++index)
+      {
+         ossimString newPrefix = "entry";
+         newPrefix += ossimString::toString(index);
+         
+         const char* r = tempKwl->find(tempPrefix, (newPrefix+".r").c_str());
+         const char* g = tempKwl->find(tempPrefix, (newPrefix+".g").c_str());
+         const char* b = tempKwl->find(tempPrefix, (newPrefix+".b").c_str());
+         
+         if(r)
+         {
+            theLut[index].setR((unsigned char)ossimString(r).toLong());
+         }
+         if(g)
+         {
+            theLut[index].setG((unsigned char)ossimString(g).toLong());
+         }
+         if(b)
+         {
+            theLut[index].setB((unsigned char)ossimString(b).toLong());
+         }
+      }
+   }
+   return true;
+}
+
diff --git a/src/ossim/base/ossimRgbVector.cpp b/ossim/src/ossim/base/ossimRgbVector.cpp
similarity index 100%
rename from src/ossim/base/ossimRgbVector.cpp
rename to ossim/src/ossim/base/ossimRgbVector.cpp
diff --git a/ossim/src/ossim/base/ossimRtti.cpp b/ossim/src/ossim/base/ossimRtti.cpp
new file mode 100644
index 0000000..489ce78
--- /dev/null
+++ b/ossim/src/ossim/base/ossimRtti.cpp
@@ -0,0 +1,153 @@
+
+#include <iostream>
+#include <cstring>
+#include <cstdlib>
+#include <algorithm>
+#include <iostream>
+using namespace std;
+
+#include <ossim/base/ossimRtti.h>
+
+static const RTTITypeinfo* RTTI_base_null_type[] = { 0 };
+
+const RTTITypeinfo* RTTIdyntypeid::a[] = { 0 };
+
+const RTTITypeinfo RTTITypeinfo::null_type = RTTITypeinfo("NULL", RTTI_base_null_type,0,0);
+
+void RTTITypeinfo::add_subtype(const RTTITypeinfo* t)		//Adds t as last RTTITypeinfo in the
+{		
+  subtypes.push_back(t);
+  ns = subtypes.size();
+							//'subtypes' list. For this, the
+/*   const RTTITypeinfo** ptr = new const RTTITypeinfo*[ns+1];		//list is realloc'd with one extra entry.
+   int i; for(i=0;i<ns;i++) ptr[i] = subtypes[i];
+   ptr[i] = t;
+   ns++;
+   delete[] subtypes;
+   subtypes = ptr;
+   */
+}
+
+void RTTITypeinfo::del_subtype(const RTTITypeinfo* t) 		//Searches for t in the subtypes list
+{	
+
+  SubtypesConstVector::iterator iter = std::find(subtypes.begin(), subtypes.end(), t);
+  if(iter != subtypes.end())
+  {
+    subtypes.erase(iter);
+    ns = subtypes.size();
+  }
+								//of this and removes it, if found.
+
+//   int i; for(i=0;i<ns && subtypes[i]!=t;i++);
+//   if (i<ns)
+//     for(;i<ns-1;i++) subtypes[i] = subtypes[i+1];
+}
+
+RTTITypeinfo::RTTITypeinfo(const char* name,
+                           const RTTITypeinfo* bb[],
+                           void* (*f1)(int,void*),
+                           void* (*f2)())
+{
+  n = "";
+  if(name) n = name;
+  b = bb; //ns = 0; subtypes = 0;		//Create default RTTITypeinfo
+  cast    = f1;								//Attach casting func
+  new_obj = f2;								//Attach creation func
+  int i = 0;
+  for(i=0;b[i];i++)							//Add this as subtype to all its basetypes
+     ((RTTITypeinfo**)b)[i]->add_subtype(this);				//REMARK: Harmless const castaway
+}
+
+const char* RTTITypeinfo::getname() const
+{
+  return n.c_str();
+}
+
+
+RTTITypeinfo::~RTTITypeinfo()
+{
+//   if(n)
+//   {
+//      free(n);
+//      n = NULL;
+//   }
+   int i = 0;
+   for(i=0;b[i];i++)
+   {
+      //Del this subtype from all its basetypes
+      ((RTTITypeinfo**)b)[i]->del_subtype(this); //REMARK: Harmless const castaway
+   }
+}
+
+int RTTITypeinfo::has_base(const RTTITypeinfo* p) const
+{
+  int i = 0;
+   for(i=0;b[i];i++)							//for all bases of this...
+      if (p->same(b[i]) || b[i]->has_base(p)) return 1;				//match found, return 1 or no match, search deeper
+   return 0;									//no match at all, return 0
+}
+
+void* RTTITypeinfo::create(const RTTITypeinfo* bt, const char* c) const	//Tries to create an obj of type-name
+{										//given by char*. Searches for this type in the
+   void* p = 0; int i;								//type-DAG rooted by this, creates it and returns
+										//it as cast to 'bt', where bt is either this or a
+										//direct base of this.
+   if (!strcmp(c,getname()))								//Want to create an obj of this type ?
+      p = (new_obj)? new_obj() : 0;						//Yes, do it if this type is instantiable.
+   else										//No, try with subclasses...
+      for(i=0;i<ns && !((p=subtypes[i]->create(this,c)));i++);			//Succeeded creating on ith subclass branch ?
+   if (!p) return 0;								//Couldn't create it in any way, abort.
+   if (bt==this) i = -1;							//Must cast to this's own type (i==-1)
+   else for(i=0;b[i] && b[i]!=bt;i++);						//Search to which base of this we should cast
+									        //Found: cast to ith base of this
+   return cast(i,p);								//Cast to ith base of to this, return as void*
+}
+
+RTTItypeid RTTItypeid::find_baseclass(const char* name)const
+{
+   if(strcmp(name, getname())==0)
+   {
+      return *this;
+   }
+   else if(num_baseclasses() == 0)
+   {
+      if(strcmp(name, getname()) == 0)
+      {
+         return *this;
+      }
+      return null_type();
+   }
+   else
+   {
+      int index = 0;
+
+      while(index < num_baseclasses())
+      {
+         RTTItypeid typeId = baseclass(index);
+         if(typeId == *this)
+         {
+	   return *this;//null_type();
+         }
+         if(strcmp(name, typeId.getname()) == 0)
+         {
+            return *this;
+         }
+         ++index;
+      }
+      index = 0;
+      while(index < num_baseclasses())
+      {
+         RTTItypeid typeId = baseclass(index);
+         if(typeId.find_baseclass(name) == typeId.null_type())
+         {
+            ++index;
+         }
+         else
+         {
+            return typeId;
+         }
+      }
+   }
+   return null_type();
+}
diff --git a/src/ossim/base/ossimScalarTypeLut.cpp b/ossim/src/ossim/base/ossimScalarTypeLut.cpp
similarity index 100%
rename from src/ossim/base/ossimScalarTypeLut.cpp
rename to ossim/src/ossim/base/ossimScalarTypeLut.cpp
diff --git a/src/ossim/base/ossimSevenParamDatum.cpp b/ossim/src/ossim/base/ossimSevenParamDatum.cpp
similarity index 100%
rename from src/ossim/base/ossimSevenParamDatum.cpp
rename to ossim/src/ossim/base/ossimSevenParamDatum.cpp
diff --git a/ossim/src/ossim/base/ossimSource.cpp b/ossim/src/ossim/base/ossimSource.cpp
new file mode 100644
index 0000000..d94ccbf
--- /dev/null
+++ b/ossim/src/ossim/base/ossimSource.cpp
@@ -0,0 +1,168 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/base/ossimSource.h>
+#include <ossim/base/ossimDataObject.h>
+#include <ossim/base/ossimIdManager.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimBooleanProperty.h>
+
+RTTI_DEF2(ossimSource, "ossimSource",
+          ossimConnectableObject, ossimErrorStatusInterface)
+
+
+ossimSource::ossimSource(ossimObject* owner)
+   :
+      ossimConnectableObject(owner),
+      theEnableFlag(true),
+      theInitializedFlag(false)
+{
+}
+
+ossimSource::ossimSource(const ossimSource &rhs)
+   :
+      ossimConnectableObject(rhs),
+      theEnableFlag(rhs.theEnableFlag),
+      theInitializedFlag(rhs.theInitializedFlag)
+{
+}
+
+ossimSource::ossimSource(ossimObject* owner,
+                         ossim_uint32 inputListSize,
+                         ossim_uint32 outputListSize,
+                         bool inputListIsFixedFlag,
+                         bool outputListIsFixedFlag)
+   :
+      ossimConnectableObject(owner, inputListSize, outputListSize,
+                             inputListIsFixedFlag, outputListIsFixedFlag),
+      theEnableFlag(true),
+      theInitializedFlag(false)
+{}
+
+ossimSource::~ossimSource()   
+{
+}
+
+bool ossimSource::saveState(ossimKeywordlist& kwl,
+                            const char* prefix)const
+{
+   kwl.add(prefix,
+           ossimKeywordNames::ENABLED_KW,
+           (int)theEnableFlag,
+           true);
+
+   return ossimConnectableObject::saveState(kwl, prefix);
+}
+
+bool ossimSource::loadState(const ossimKeywordlist& kwl,
+                            const char* prefix)
+{
+   const char* lookup = kwl.find(prefix,
+                                 ossimKeywordNames::ENABLED_KW);
+   if(lookup)
+   {
+      theEnableFlag = ossimString(lookup).toBool();
+   }
+
+   return ossimConnectableObject::loadState(kwl, prefix);
+}
+
+bool ossimSource::isSourceEnabled()const
+{
+   return theEnableFlag;
+}
+
+void ossimSource::enableSource()
+{
+   setEnableFlag(true);
+}
+
+void ossimSource::disableSource()
+{
+   setEnableFlag(false);
+}
+
+bool ossimSource::getEnableFlag() const
+{
+   return theEnableFlag;
+}
+
+void ossimSource::setEnableFlag(bool flag)
+{
+   theEnableFlag = flag;
+}
+
+bool ossimSource::isInitialized() const
+{
+   return theInitializedFlag;
+}
+
+void ossimSource::setInitializedFlag(bool flag)
+{
+   theInitializedFlag = flag;
+}
+
+void ossimSource::initialize()
+{
+}
+
+void ossimSource::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property.valid()) return;
+
+   ossimString name = property->getName();
+   name = name.downcase();
+   
+   if(name == ossimKeywordNames::ENABLED_KW)
+   {
+      ossimString value;
+      
+      property->valueToString(value);
+      setEnableFlag(value.toBool());
+   }
+   else
+   {
+      ossimConnectableObject::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimSource::getProperty(const ossimString& name)const
+{
+   if( (name == "Enabled") || (name == ossimKeywordNames::ENABLED_KW) )
+   {
+      return new ossimBooleanProperty(ossimKeywordNames::ENABLED_KW,theEnableFlag);
+   }
+   return ossimConnectableObject::getProperty(name);
+}
+
+void ossimSource::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimConnectableObject::getPropertyNames(propertyNames);
+   
+   propertyNames.push_back(ossimKeywordNames::ENABLED_KW);
+}
+
+const ossimSource& ossimSource::operator=(const ossimSource& /* rhs */)
+{
+   return *this;
+}
+
+std::ostream& ossimSource::print(std::ostream& out) const
+{
+   out << "ossimSource::print:\n"
+      << "theEnableFlag:       " << theEnableFlag
+      << "\ntheInitializedFlag:  " << theInitializedFlag
+      << endl;
+
+   return ossimErrorStatusInterface::print(out);
+}
+
diff --git a/src/ossim/base/ossimStateChangedEvent.cpp b/ossim/src/ossim/base/ossimStateChangedEvent.cpp
similarity index 100%
rename from src/ossim/base/ossimStateChangedEvent.cpp
rename to ossim/src/ossim/base/ossimStateChangedEvent.cpp
diff --git a/ossim/src/ossim/base/ossimStdOutProgress.cpp b/ossim/src/ossim/base/ossimStdOutProgress.cpp
new file mode 100644
index 0000000..1008a58
--- /dev/null
+++ b/ossim/src/ossim/base/ossimStdOutProgress.cpp
@@ -0,0 +1,62 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimStdOutProgress.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <iomanip>
+#include <ossim/base/ossimStdOutProgress.h>
+
+RTTI_DEF1(ossimStdOutProgress, "ossimStdOutProgress", ossimProcessListener);
+
+ossimStdOutProgress theStdOutProgress;
+
+ossimStdOutProgress::ossimStdOutProgress(ossim_uint32 precision,
+                                         bool flushStream)
+   :
+      ossimProcessListener(),
+      thePrecision(precision),
+      theFlushStreamFlag(flushStream)
+{
+}
+
+void ossimStdOutProgress::processProgressEvent(ossimProcessProgressEvent& event)
+{
+   if (event.getOutputMessageFlag())
+   {
+      ossimString s;
+      event.getMessage(s);
+      if (!s.empty())
+      {
+		  ossimNotify(ossimNotifyLevel_NOTICE) << s.c_str() << std::endl;
+      }
+      return; // Don't output percentage on a message update.
+   }
+
+   
+   double p = event.getPercentComplete();
+   ossimNotify(ossimNotifyLevel_NOTICE)
+	   << std::setiosflags(std::ios::fixed)
+      << std::setprecision(thePrecision)
+      << p << "%\r";
+   
+   if(theFlushStreamFlag)
+   {
+      (p != 100.0) ?
+         ossimNotify(ossimNotifyLevel_NOTICE).flush() :
+         ossimNotify(ossimNotifyLevel_NOTICE) << "\n";
+   }
+}
+
+void ossimStdOutProgress::setFlushStreamFlag(bool flag)
+{
+   theFlushStreamFlag = flag;
+}
+
+
diff --git a/src/ossim/base/ossimStreamBase.cpp b/ossim/src/ossim/base/ossimStreamBase.cpp
similarity index 100%
rename from src/ossim/base/ossimStreamBase.cpp
rename to ossim/src/ossim/base/ossimStreamBase.cpp
diff --git a/ossim/src/ossim/base/ossimStreamFactory.cpp b/ossim/src/ossim/base/ossimStreamFactory.cpp
new file mode 100644
index 0000000..16a80c5
--- /dev/null
+++ b/ossim/src/ossim/base/ossimStreamFactory.cpp
@@ -0,0 +1,94 @@
+//*******************************************************************
+// Copyright (C) 2005 Garrett Potts
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//
+//*******************************************************************
+//  $Id: ossimStreamFactory.cpp 23664 2015-12-14 14:17:27Z dburken $
+//
+#include <ossim/base/ossimStreamFactory.h>
+#include <fstream>
+#include <ossim/ossimConfig.h>
+#include <ossim/base/ossimFilename.h>
+#if OSSIM_HAS_LIBZ
+#include <ossim/base/ossimGzStream.h>
+#endif
+
+
+ossimStreamFactory* ossimStreamFactory::theInstance = 0;
+
+ossimStreamFactory::ossimStreamFactory()
+   : ossimStreamFactoryBase()
+{
+}
+
+ossimStreamFactory::~ossimStreamFactory()
+{
+}
+
+ossimStreamFactory* ossimStreamFactory::instance()
+{
+   if(!theInstance)
+   {
+      theInstance = new ossimStreamFactory();
+   }
+
+   return theInstance;
+}
+
+ossimRefPtr<ossimIFStream> ossimStreamFactory::createNewIFStream(
+   const ossimFilename& file,
+   std::ios_base::openmode openMode) const
+{
+   ossimRefPtr<ossimIFStream> result = 0;
+   
+#if OSSIM_HAS_LIBZ
+   ossimFilename copyFile = file;
+
+   if(!copyFile.exists())
+   {
+      ossimString ext = copyFile.ext();
+      copyFile.setExtension("gz");
+      if(!copyFile.exists())
+      {
+         copyFile.setExtension(ext);
+         copyFile += ".gz";
+
+         if(!copyFile.exists())
+         {
+            return result;
+         }
+      }
+   }
+   
+   std::ifstream in(copyFile.c_str(), std::ios::in|std::ios::binary);
+
+   if(!in) return result;
+
+   unsigned char buf[2];
+
+   in.read((char*)buf, 2);
+   in.close();
+   // check for gzip magic number
+   //
+   if((buf[0] == 0x1F) &&
+      (buf[1] == 0x8B))
+   {
+      result = new ossimIgzStream(copyFile.c_str(), openMode);
+   }
+#endif
+   return result;
+}
+
+ossimStreamFactory::ossimStreamFactory(const ossimStreamFactory&)
+   : ossimStreamFactoryBase()
+{}
+
+
+
+
diff --git a/ossim/src/ossim/base/ossimStreamFactoryRegistry.cpp b/ossim/src/ossim/base/ossimStreamFactoryRegistry.cpp
new file mode 100644
index 0000000..97249c0
--- /dev/null
+++ b/ossim/src/ossim/base/ossimStreamFactoryRegistry.cpp
@@ -0,0 +1,75 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimStreamFactoryRegistry.cpp 22648 2014-02-28 14:34:29Z gpotts $
+//
+#include <ossim/base/ossimStreamFactoryRegistry.h>
+#include <ossim/base/ossimStreamFactory.h>
+#include <ossim/base/ossimIoStream.h>
+#include <ossim/base/ossimFilename.h>
+
+#include <fstream>
+#include <algorithm>
+
+ossimStreamFactoryRegistry* ossimStreamFactoryRegistry::theInstance = 0;
+
+ossimStreamFactoryRegistry::ossimStreamFactoryRegistry()
+{
+}
+
+ossimStreamFactoryRegistry::~ossimStreamFactoryRegistry()
+{
+}
+
+ossimStreamFactoryRegistry* ossimStreamFactoryRegistry::instance()
+{
+   if(!theInstance)
+   {
+      theInstance = new ossimStreamFactoryRegistry();
+      theInstance->registerFactory(ossimStreamFactory::instance());
+   }
+
+   return theInstance;
+}
+
+ossimRefPtr<ossimIFStream>
+ossimStreamFactoryRegistry::createNewIFStream(
+   const ossimFilename& file,
+   std::ios_base::openmode openMode) const
+{
+   ossim_uint32 idx = 0;
+   ossimRefPtr<ossimIFStream> result = 0;
+   for(idx = 0; ((idx < theFactoryList.size())&&(!result)); ++idx)
+   {
+      result = theFactoryList[idx]->createNewIFStream(file, openMode);
+   }
+
+   if(!result)
+   {
+      result = new ossimIFStream(file.c_str(),
+                                 openMode);
+//       result = new std::ifstream(file.c_str(),
+//                                  openMode);
+   }
+   
+   return result;
+}
+
+
+void ossimStreamFactoryRegistry::registerFactory(ossimStreamFactoryBase* factory)
+{
+   std::vector<ossimStreamFactoryBase*>::iterator iter = std::find(theFactoryList.begin(),
+                                                                  theFactoryList.end(),
+                                                                  factory);
+   if(iter == theFactoryList.end())
+   {
+      theFactoryList.push_back(factory);
+   }
+}
+
+ossimStreamFactoryRegistry::ossimStreamFactoryRegistry(const ossimStreamFactoryRegistry&)
+{}
diff --git a/ossim/src/ossim/base/ossimString.cpp b/ossim/src/ossim/base/ossimString.cpp
new file mode 100644
index 0000000..038346b
--- /dev/null
+++ b/ossim/src/ossim/base/ossimString.cpp
@@ -0,0 +1,1088 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: This class extends the stl's string class.
+// 
+//********************************************************************
+// $Id: ossimString.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cctype> /* for toupper */
+#include <cstdlib> /* for getenv() */
+#include <stack> 
+#include <iostream>
+#include <iomanip>
+#include <sstream>
+#include <stdlib.h>
+#include <algorithm>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimRegExp.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimHexString.h>
+
+static ossimTrace traceDebug("ossimString:debug");
+
+#ifdef OSSIM_ID_ENABLED
+static char OSSIM_ID[] = "$Id: ossimString.cpp 23664 2015-12-14 14:17:27Z dburken $";
+#endif
+
+ossimString ossimString::upcase(const ossimString& aString)
+{
+   std::string s = aString.string();
+   
+   std::string::iterator eachCharacter = s.begin();
+   while(eachCharacter != s.end())
+   {
+      *eachCharacter = toupper(*eachCharacter);
+      eachCharacter++;
+   }
+
+   return s;
+}
+
+ossimString ossimString::downcase(const ossimString& aString)
+{
+   std::string s = aString.m_str;
+
+   std::string::iterator eachCharacter = s.begin();
+   while(eachCharacter != s.end())
+   {
+      *eachCharacter = tolower(*eachCharacter);
+      ++eachCharacter;
+   }
+
+   return ossimString(s);
+}
+
+ossimString& ossimString::upcase()
+{
+   std::string::iterator eachCharacter = m_str.begin();
+   while(eachCharacter != m_str.end())
+   {
+      *eachCharacter = toupper(*eachCharacter);
+      ++eachCharacter;
+   }
+
+   return *this;
+}
+
+ossimString ossimString::upcase()const
+{
+   ossimString result(*this);
+   result.upcase();
+   return result;
+}
+
+ossimString& ossimString::downcase()
+{
+   std::string::iterator eachCharacter = m_str.begin();
+   while(eachCharacter != m_str.end())
+   {
+      *eachCharacter = tolower(*eachCharacter);
+      ++eachCharacter;
+   }
+   
+   return *this;
+}
+
+ossimString ossimString::downcase()const
+{
+   ossimString result(*this);
+   result.downcase();
+   return result;
+}
+
+char* ossimString::stringDup()const
+{
+   char *result = 0;
+
+   if(length() == 0)
+   {
+      result = new char[1];
+      result[0] = '\0';
+   }
+   else
+   {  
+      ossim_uint32 index = 0;
+      ossim_uint32 len = (ossim_uint32)m_str.length();
+      result = new char[len+1];
+      const char* sourceString = m_str.c_str();
+
+      while(index < len) 
+      {
+         result[index] = sourceString[index];
+         ++index;
+      }
+      result[len] = '\0';
+   }
+   return result;
+}
+
+ossimString ossimString::stripLeading(const ossimString &value, char characterToStrip)
+{
+   std::string s;
+   ossimString::const_iterator stringIter = value.m_str.begin();
+   
+   while((*stringIter == characterToStrip)&&(stringIter!=value.m_str.end()))
+   {
+      ++stringIter;
+   }
+
+   while(stringIter != value.m_str.end())
+   {
+      s += *stringIter;
+      ++stringIter;
+   }
+   
+   return ossimString(s);
+}
+
+ossimString ossimString::substitute(const ossimString &searchKey,
+                                    const ossimString &replacementValue,
+                                    bool replaceAll)const
+{
+   std::string result = m_str;
+
+   size_type pos = result.find(searchKey.m_str);
+   
+   if (pos == std::string::npos) return result;  // Search key not found.
+   
+   if(replaceAll)
+   {
+      while(pos != std::string::npos)
+      {
+         result.replace(pos, searchKey.m_str.size(), replacementValue.m_str.c_str());
+         pos = result.find(searchKey.m_str, pos+replacementValue.m_str.size());
+      }
+   }
+   else  // Replace only the first instance.
+   {
+      result.replace(pos, searchKey.m_str.size(), replacementValue.m_str.c_str());
+   }
+
+   return ossimString(result);
+}
+
+ossimString& ossimString::gsub(const ossimString &searchKey,
+                               const ossimString &replacementValue,
+                               bool replaceAll)
+{
+   size_type pos = m_str.find(searchKey.m_str);
+   
+   if (pos == std::string::npos) return *this;  // Search key not found.
+   
+   if(replaceAll)
+   {
+      while(pos < m_str.size())
+      {
+         m_str.replace(pos, searchKey.m_str.size(), replacementValue.m_str.c_str());
+         pos = find(searchKey.m_str, pos+replacementValue.m_str.size());
+      }
+   }
+   else  // Replace only the first instance.
+   {
+      m_str.replace(pos, searchKey.m_str.size(), replacementValue.m_str.c_str());
+   }
+
+   return *this;
+}
+
+ossimString  ossimString::trim(const ossimString& valueToTrim) const
+{
+   ossimString tempString(*this);
+   
+   return tempString.trim(valueToTrim);
+}
+
+ossimString& ossimString::trim(const ossimString& valueToTrim)
+{
+   if(m_str.size() == 0) return *this;
+   if(valueToTrim.empty()) return *this;
+   iterator startPos = (*this).begin();
+   iterator endPos   = (*this).begin() + ((*this).size()-1);
+
+   while( ( startPos != (*this).end() ) &&
+          (std::find(valueToTrim.begin(),
+                     valueToTrim.end(),
+                     *startPos)!=valueToTrim.end()) ) ++startPos;
+
+   if(startPos == (*this).end())
+   {
+      *this = "";
+      return *this;
+   }
+   
+   while( (endPos!=startPos)&& (std::find(valueToTrim.begin(),
+                                          valueToTrim.end(),
+                                          *endPos)!=valueToTrim.end())) --endPos;
+
+   *this = ossimString(startPos, endPos+1);
+
+   return *this;
+}
+
+ossimString ossimString::beforePos(std::string::size_type pos)const
+{
+   ossimString result = *this;
+
+   if(pos < length())
+   {
+      result.erase(pos, std::string::npos);
+   }
+
+   return result;
+}
+
+ossimString ossimString::afterPos(std::string::size_type pos)const
+{
+   ossimString result = *this;
+
+   if(pos < length())
+   {
+      result.erase(0, pos+1);
+   }
+   else
+   {
+      return "";
+   }
+
+   return result;
+   
+}
+
+std::vector<ossimString> ossimString::explode(const ossimString& delimeter) const
+{
+   ossimString exp_str = *this;
+   std::vector<ossimString> result;
+   char* tokenPtr;
+
+   tokenPtr = strtok((char*)exp_str.c_str(), (char*)delimeter.c_str());
+
+   while(tokenPtr != NULL)
+   {
+      result.push_back(tokenPtr);
+      tokenPtr = strtok(NULL, delimeter.c_str());
+   }
+
+   return result;
+}
+
+ossimString ossimString::expandEnvironmentVariable() const
+{
+   ossimString result(*this);
+   std::stack<ossim_uint32> startChars;
+   ossimRegExp regExpStart("\\$\\(");
+
+   if(regExpStart.find(result.c_str()))
+   {
+      startChars.push(regExpStart.start());
+      while(!startChars.empty())
+      {
+         ossim_uint32 offset = startChars.top() + 2; // skip over the $(
+         
+         // We will replace like a stack by looking at the right most $(
+         //
+         if(regExpStart.find(result.c_str()+offset))
+         {
+            // maintain absolute offset to the original string
+            startChars.push(regExpStart.start()+offset);
+         }
+         else 
+         {
+            // now look for a closing ) for the stating $(
+            ossimRegExp regExpEnd("\\)");
+            if(regExpEnd.find(result.c_str()+startChars.top()))
+            {
+               ossimString envVarStr(result.begin()+startChars.top()+2,
+                                     result.begin()+startChars.top()+regExpEnd.start());
+               const char* lookup = getenv( envVarStr.c_str() );
+               if ( lookup )
+               {
+                  result.replace(result.begin()+startChars.top(),
+                                 result.begin()+startChars.top()+regExpEnd.start()+1,
+                                 ossimString(lookup));
+               }
+               else 
+               {
+                  if(traceDebug())
+                  {
+                     ossimNotify(ossimNotifyLevel_WARN)
+                     << "In member function ossimString::expandEnvironmentVariable() "
+                     << "\n\tERROR: Environment variable("
+                     << envVarStr.c_str()
+                     << ") not found!"
+                     << std::endl;
+                  }
+                  result.replace(result.begin()+startChars.top(),
+                                 result.begin()+startChars.top()+regExpEnd.start()+1,
+                                 "");
+               }
+            }
+            startChars.pop();
+         }
+      }
+   }
+   
+   
+   return result;
+}
+
+//---
+// Regular expression pattern utilities
+//---
+
+ossimString ossimString::beforeRegExp(const char *regularExpressionPattern) const
+{   
+   ossimRegExp anExpression;
+   
+   anExpression.compile(regularExpressionPattern);
+
+   if(anExpression.find(c_str()))
+   {
+      if (anExpression.start() > 0)
+      {
+         return substr(0, anExpression.start());
+      }
+   }
+   
+   return ossimString("");
+}
+
+ossimString ossimString::fromRegExp(const char *regularExpressionPattern) const
+{   
+   ossimRegExp anExpression;
+   
+   anExpression.compile(regularExpressionPattern);
+
+   if(anExpression.find(c_str()))
+   {
+      if (anExpression.start() < size())
+      {
+         return substr(anExpression.start(), (size()-anExpression.start()));
+      }
+   }
+   
+   return ossimString("");
+}
+
+ossimString ossimString::afterRegExp(const char *regularExpressionPattern) const
+{   
+   ossimRegExp anExpression;
+   
+   anExpression.compile(regularExpressionPattern);
+
+   if(anExpression.find(c_str()))
+   {
+      if (anExpression.end() < size())
+      {
+         return substr(anExpression.end(), (size()-anExpression.end()));
+      }
+   }
+   
+   return ossimString("");
+}
+
+ossimString ossimString::match(const char *regularExpressionPattern) const
+{   
+   ossimRegExp anExpression;
+   
+   anExpression.compile(regularExpressionPattern);
+
+   if((anExpression.find(this->c_str())) &&
+      (anExpression.start() !=anExpression.end()))
+   {
+      return this->substr(anExpression.start(),
+                          anExpression.end() - anExpression.start() );
+   }
+
+   
+   return ossimString("");
+}
+
+ossimString ossimString::replaceAllThatMatch(const char *regularExpressionPattern,
+                                             const char *value) const
+{
+   ossimString result = *this;
+   ossimRegExp anExpression;
+   std::string::size_type offset     = 0;
+   std::string::size_type valueLength = ossimString(value).length();
+   anExpression.compile(regularExpressionPattern);
+   if(!anExpression.is_valid())
+   {
+      return *this;
+   }
+   while(anExpression.find(result.c_str()+offset))
+   {
+      if(anExpression.start() < anExpression.end())
+      {
+         result.replace(anExpression.start() + offset,
+                        anExpression.end()-anExpression.start(),
+                        value);
+         offset += anExpression.start() + valueLength;
+      }
+      else
+      {
+         break;
+      }
+   }
+
+   return result;
+}
+
+ossimString ossimString::replaceStrThatMatch(const char *regularExpressionPattern,
+                                             const char *value) const
+{
+   ossimString result = *this;
+   ossimRegExp anExpression;
+   anExpression.compile(regularExpressionPattern);
+   if(!anExpression.is_valid())
+   {
+      return *this;
+   }
+   if(anExpression.find(result.c_str()))
+   {
+      if(anExpression.start() < anExpression.end())
+      {
+         result.replace(anExpression.start(),
+                        anExpression.end()-anExpression.start(),
+                        value);
+      }
+   }
+
+   return result;
+}
+
+bool ossimString::toBool()const
+{
+   ossimString s = c_str();
+   if (s.empty())
+   {
+      return false;
+   }
+   
+   s = s.downcase();
+   if ( (s == "true") ||
+        (s == "yes")  ||
+        (s == "y")    ||
+        (s == "1") )
+   {
+      return true;
+   }
+   else if ( (s == "false") ||
+             (s == "no")    ||
+             (s == "n")     ||
+             (s == "0") )
+   {
+      return false;
+      
+   }
+   else if (toInt32())
+   {
+      return true;
+   }
+
+   return false;
+}
+
+bool ossimString::toBool(const ossimString& aString)
+{
+   // Check for true or false, yes or no, y or n, and 1 or 0...
+   ossimString s = aString;
+   if (s.empty())
+   {
+      return false;
+   }
+   s.downcase();
+   if ( (s == "true") ||
+        (s == "yes")  ||
+        (s == "y")    ||
+        (s == "1") )
+   {
+      return true;
+   }
+   else if ( (s == "false") ||
+             (s == "no")    ||
+             (s == "n")     ||
+             (s == "0") )
+   {
+      return false;
+      
+   }
+   else if (aString.toInt32())
+   {
+      return true;
+   }
+
+   return false;
+}
+
+ossim_uint8 ossimString::toUInt8()const
+{
+   // Note the std::istringstream::operator>> does not work with unsigned 8 bit.
+   ossim_uint16 i = 0;
+   if (!empty())
+   {
+      std::istringstream is(m_str);
+      is >> i;
+      if(is.fail())
+      {
+        i = 0;
+      }
+   }
+   return static_cast<ossim_uint8>(i);
+}
+
+ossim_uint8 ossimString::toUInt8(const ossimString& aString)
+{
+   return aString.toUInt8();
+}
+
+int ossimString::toInt()const
+{
+   int i = 0;
+   if (!empty())
+   {
+      std::istringstream is(m_str);
+      is >> i;
+      if(is.fail())
+      {
+         i = 0;
+      }
+   }
+   return i;
+}
+
+int ossimString::toInt(const ossimString& aString)
+{
+   return aString.toInt();
+}
+
+ossim_int16 ossimString::toInt16()const
+{
+   ossim_int16 i = 0;
+   if (!empty())
+   {
+      std::istringstream is(m_str);
+      is >> i;
+      if(is.fail())
+      {
+         i = 0;
+      }
+   }
+   return i;
+}
+
+ossim_int16 ossimString::toInt16(const ossimString& aString)
+{
+   return aString.toInt16();
+}
+
+ossim_uint16 ossimString::toUInt16()const
+{
+   ossim_uint16 i = 0;
+   if (!empty())
+   {
+      std::istringstream is(m_str);
+      is >> i;
+      if(is.fail())
+      {
+         i = 0;
+      }
+   }
+   return i;
+}
+
+ossim_uint16 ossimString::toUInt16(const ossimString& aString)
+{
+   return aString.toUInt16();
+}
+
+ossim_int32 ossimString::toInt32()const
+{
+   ossim_int32 i = 0;
+   if (!empty())
+   {
+      std::istringstream is(m_str);
+      is >> i;
+      if(is.fail())
+      {
+         i = 0;
+      }
+   }
+   return i;
+}
+
+ossim_int32 ossimString::toInt32(const ossimString& aString)
+{
+   return aString.toInt32();
+}
+
+ossim_uint32 ossimString::toUInt32()const
+{
+   ossim_uint32 i = 0;
+   if (!empty())
+   {
+      std::istringstream is(m_str);
+      is >> i;
+      if(is.fail())
+      {
+         i = 0;
+      }
+   }
+   return i;
+}
+
+ossim_uint32 ossimString::toUInt32(const ossimString& aString)
+{
+   return aString.toUInt32();
+}
+
+ossim_int64 ossimString::toInt64()const
+{
+   ossim_int64 i = 0;
+   if (!empty())
+   {
+      std::istringstream is(m_str);
+      is >> i;
+      if(is.fail())
+      {
+         i = 0;
+      }
+   }
+   return i;
+}
+
+ossim_int64 ossimString::toInt64(const ossimString& aString)
+{
+   return aString.toInt64();
+}
+
+ossim_uint64 ossimString::toUInt64()const
+{
+   ossim_uint64 i = 0;
+   if (!empty())
+   {
+      std::istringstream is(m_str);
+      is >> i;
+      if(is.fail())
+      {
+         i = 0;
+      }
+   }
+   return i;
+}
+
+ossim_uint64 ossimString::toUInt64(const ossimString& aString)
+{
+   return aString.toUInt64();
+}
+
+long ossimString::toLong()const
+{
+  long i = 0;
+   if (!empty())
+   {
+      std::istringstream is(m_str);
+      is >> i;
+      if(is.fail())
+      {
+         i = 0;
+      }
+   }
+   return i;
+}
+
+long ossimString::toLong(const ossimString& aString)
+{
+   return aString.toLong();
+}
+
+unsigned long  ossimString::toULong()const
+{
+   unsigned long i = 0;
+   if (!empty())
+   {
+      std::istringstream is(m_str);
+      is >> i;
+      if(is.fail())
+      {
+         i = 0;
+      }
+   }
+   return i;
+}
+
+unsigned long ossimString::toULong(const ossimString& aString)
+{
+   return aString.toULong();
+}
+
+ossim_float32 ossimString::toFloat32()const
+{
+   if(contains("nan"))
+   {
+      return ossim::nan();
+   }
+   ossim_float32 d = 0.0;
+   // this part is core dumping under mingw in ossimPlanet.
+   // There is a possibility that this isn't a thread safe implementation
+   // in mingw stl.  Let's resort back to atof for now
+
+#if 0
+   d = (ossim_float32)atof(c_str());
+#endif
+#if 1
+   if (!empty())
+   {
+      std::istringstream is(c_str());
+      is >> d;
+      if(is.fail())
+      {
+         d = 0.0;
+      }
+   }
+#endif
+   return d;
+}
+
+ossim_float32 ossimString::toFloat32(const ossimString& aString)
+{
+   return aString.toFloat32();
+}
+
+ossim_float64 ossimString::toFloat64()const
+{
+   if(contains("nan"))
+   {
+      return ossim::nan();
+   }
+   ossim_float64 d = 0.0;
+   // this part is core dumping under mingw in ossimPlanet.
+   // There is a possibility that this isn't a thread safe implementation
+   // in mingw stl.  Let's resort back to atof for now
+
+#if 0
+   d = (ossim_float64)atof(c_str());
+#endif
+#if 1
+   if (!empty())
+   {
+      std::istringstream is(c_str());
+      is >> d;
+      if(is.fail())
+      {
+         d = 0.0;
+      }
+   }
+#endif
+   return d;
+}
+
+ossim_float64 ossimString::toFloat64(const ossimString& aString)
+{
+   return aString.toFloat64();
+}
+
+double ossimString::toDouble()const
+{
+   if(contains("nan"))
+   {
+      return ossim::nan();
+   }
+   double d = 0.0;
+
+   // this part is core dumping under mingw in ossimPlanet.
+   // There is a possibility that this isn't a thread safe implementation
+   // in mingw stl.  Let's resort back to atof for now
+
+   if (!empty())
+   {
+#if 0
+      d = atof(c_str());
+#endif
+#if 1
+      if(!empty())
+      {
+         std::istringstream is(c_str());
+         is >> d;
+         if(is.fail())
+         {
+            d = 0.0;
+         }
+      }
+#endif
+   }
+   return d;
+}
+
+double ossimString::toDouble(const ossimString& aString)
+{
+   return aString.toDouble();
+}
+
+ossimString ossimString::toString(bool aValue)
+{
+   std::ostringstream s;
+   s << aValue;
+   ossimString result(s.str());
+   return result;
+}
+
+ossimString ossimString::toString(ossim_int16 aValue)
+{
+   std::ostringstream s;
+   s << aValue;
+   ossimString result(s.str());
+   return result;
+}
+
+ossimString ossimString::toString(ossim_uint16 aValue)
+{
+   std::ostringstream s;
+   s << aValue;
+   ossimString result(s.str());
+   return result;
+}
+
+ossimString ossimString::toString(ossim_int32 aValue)
+{
+   std::ostringstream s;
+   s << aValue;
+   ossimString result(s.str());
+   return result;
+}
+
+ossimString ossimString::toString(ossim_uint32 aValue)
+{
+   std::ostringstream s;
+   s << aValue;
+   ossimString result(s.str());
+   return result;
+}
+
+ossimString ossimString::toString(ossim_int64 aValue)
+{
+   std::ostringstream s;
+   s << aValue;
+   ossimString result(s.str());
+   return result;
+}
+
+ossimString ossimString::toString(ossim_uint64 aValue)
+{
+   std::ostringstream s;
+   s << aValue;
+   ossimString result(s.str());
+   return result;
+}
+
+ossimString ossimString::toString(ossim_float32 aValue,
+                                  ossim_int32 precision,
+                                  bool fixed)
+{
+   if ( ossim::isnan(aValue) )
+   {
+      return ossimString("nan");
+   }
+
+   std::ostringstream s;
+   s << std::setprecision(precision);
+   
+   if (fixed)
+   {
+      s << std::setiosflags(std::ios::fixed); 
+   }
+   
+   s << aValue;
+   
+   return ossimString(s.str());
+}
+
+ossimString ossimString::toString(ossim_float64 aValue,
+                                  ossim_int32 precision,
+                                  bool fixed)
+{
+   if ( ossim::isnan(aValue) )
+   {
+      return ossimString("nan");
+   }
+   
+   std::ostringstream s;
+   s << std::setprecision(precision);
+   
+   if (fixed)
+   {
+      s << std::setiosflags(std::ios::fixed); 
+   }
+   
+   s << aValue;
+   
+   return ossimString(s.str());
+}
+
+ossimString ossimString::before(const ossimString& str,
+                                std::string::size_type pos)const
+{
+   if(*this == "") return ossimString();
+
+   size_type last = find(str.c_str(), pos);
+   if(last >= std::string::npos) return *this;
+   
+   return ossimString( substr(0, last) );
+}
+
+ossimString ossimString::after(const ossimString& str,
+                               std::string::size_type pos)const
+{
+   size_type last = find(str.c_str(), pos);
+   if (last >= std::string::npos) return ossimString();
+   
+   return ossimString( substr(last+str.length()) );
+}
+
+//*************************************************************************************************
+// Splits this string into a vector of strings (fields) using the delimiter list specified.
+// If a delimiter is encountered at the beginning or the end of this, or two delimiters are 
+// contiguous, a blank field is inserted in the vector, unless skipBlankFields is true.
+//*************************************************************************************************
+void ossimString::split(std::vector<ossimString>& result,
+                        const ossimString& separatorList,
+                        bool skipBlankFields)const
+{
+	if(this->empty()) return;
+   
+   std::string::const_iterator iterStart = m_str.begin();
+   std::string::const_iterator iterCurrent = m_str.begin();
+   
+   while(iterCurrent != m_str.end())
+   {
+      if(std::find(separatorList.m_str.begin(), separatorList.m_str.end(), *iterCurrent) != separatorList.m_str.end())
+      {
+         if(iterStart == iterCurrent)
+         {
+            if(!skipBlankFields)
+            {
+               result.push_back(ossimString());
+            }
+         }
+         else 
+         {
+            result.push_back(ossimString(iterStart, iterCurrent));
+         }
+
+         ++iterCurrent;
+         iterStart = iterCurrent;
+      }
+      else 
+      {
+         ++iterCurrent;
+      }
+   }
+   if(iterStart!=iterCurrent)
+   {
+      result.push_back(ossimString(iterStart, iterCurrent));
+   }
+   
+#if 0   
+//   result = split(separatorList);
+   ossimString copyString = *this;
+
+   char* s = strtok(const_cast<char*>(copyString.c_str()),
+                    separatorList.c_str());
+
+   for(std::string::size_type i = 0; i < separatorList.size(); ++ i)
+   {
+      if (((*(this->begin())) == separatorList.c_str()[i]) && !skipBlankFields)
+         result.push_back("");
+   }
+   while(s)
+   {
+      result.push_back(ossimString(s));
+      if ((*s != 0) || !skipBlankFields)
+         s = strtok(NULL, separatorList.c_str());
+   }
+   for(std::string::size_type i = 0; i < separatorList.size(); ++ i)
+   {
+      if (((*(this->end()-1)) == separatorList.c_str()[i]) && !skipBlankFields)
+         result.push_back("");
+   }
+#endif
+}
+
+std::vector<ossimString> ossimString:: split(const ossimString& separatorList,
+                                             bool skipBlankFields)const
+{
+   std::vector<ossimString> result;
+
+   split(result, separatorList, skipBlankFields);
+   
+   return result;
+}
+
+const ossimString& ossimString::join(const std::vector<ossimString>& stringList,
+                                     const ossimString& separator)
+{
+   *this = "";
+   if(stringList.size())
+   {
+      for(long i = 0; i < ((long)stringList.size()-1); ++i)
+      {
+         *this += stringList[i];
+         *this += separator;
+      }
+      *this += stringList[stringList.size()-1];
+   }
+
+   return *this;
+}
+
+ossimString ossimString::urlEncode()const
+{
+   ossimString::const_iterator iter = begin();
+   ossimString result;
+   while(iter != end())
+   {
+      ossim_uint8 c = *iter;
+      
+      if(c > 47 && c < 58)
+      {
+         result += c;
+      }
+      else if(c > 64 && c < 91)
+      {
+         result += c;
+      }
+      else if(c > 96 && c < 123)
+      {
+         result+=c;
+      }
+      else if (c == 32)
+      {
+         result+="+";
+      }
+      else
+      {
+         result += ("%" + ossimHexString(c));
+      }
+      
+      ++iter;
+   }
+
+  return result;
+   
+}
+
+ossimString ossimString::getOssimId() const
+{
+#ifdef OSSIM_ID_ENABLED
+   return ossimString(OSSIM_ID);
+#endif
+   return ossimString("");
+}
+
+
diff --git a/src/ossim/base/ossimStringListProperty.cpp b/ossim/src/ossim/base/ossimStringListProperty.cpp
similarity index 100%
rename from src/ossim/base/ossimStringListProperty.cpp
rename to ossim/src/ossim/base/ossimStringListProperty.cpp
diff --git a/ossim/src/ossim/base/ossimStringProperty.cpp b/ossim/src/ossim/base/ossimStringProperty.cpp
new file mode 100644
index 0000000..1e3c1bd
--- /dev/null
+++ b/ossim/src/ossim/base/ossimStringProperty.cpp
@@ -0,0 +1,127 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// LICENSE: MIT see top level license.txt
+// 
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimStringProperty.cpp 23666 2015-12-14 20:01:22Z rashadkm $
+#include <ossim/base/ossimStringProperty.h>
+#include <algorithm>
+RTTI_DEF1(ossimStringProperty, "ossimStringProperty", ossimProperty);
+
+ossimStringProperty::ossimStringProperty(const ossimString& name,
+                                         const ossimString& value,
+                                         bool editableFlag,
+                                         const std::vector<ossimString>& constraintList)
+   :ossimProperty(name),
+    theValue(value),
+    theEditableFlag(editableFlag),
+    theConstraints(constraintList)
+{
+}
+
+ossimStringProperty::ossimStringProperty(const ossimStringProperty& rhs)
+   :ossimProperty(rhs),
+    theValue(rhs.theValue),
+    theEditableFlag(rhs.theEditableFlag),
+    theConstraints(rhs.theConstraints)
+{
+}
+
+ossimObject* ossimStringProperty::dup()const
+{
+   return new ossimStringProperty(*this);
+}
+
+const ossimProperty& ossimStringProperty::assign(const ossimProperty& rhs)
+{
+   ossimProperty::assign(rhs);
+   
+   ossimStringProperty* rhsPtr = PTR_CAST(ossimStringProperty,
+					  &rhs);
+   
+   theValue        = rhs.valueToString();
+   
+   if(rhsPtr)
+     {
+       theEditableFlag = rhsPtr->theEditableFlag;
+       theConstraints  = rhsPtr->theConstraints;
+     }
+   
+   return *this;
+}
+
+
+void ossimStringProperty::setEditableFlag(bool flag)
+{
+   theEditableFlag = flag;
+}
+
+bool ossimStringProperty::getEditableFlag()const
+{
+   return theEditableFlag;
+}
+
+bool ossimStringProperty::isEditable()const
+{
+   return (getEditableFlag() == true);
+}
+
+
+void ossimStringProperty::clearConstraints()
+{
+   theConstraints.clear();
+}
+
+void ossimStringProperty::setConstraints(const std::vector<ossimString>& constraintList)
+{
+   theConstraints = constraintList;
+}
+
+void ossimStringProperty::addConstraint(const ossimString& value)
+{
+   theConstraints.push_back(value);
+}
+
+const std::vector<ossimString>& ossimStringProperty::getConstraints()const
+{
+   return theConstraints;
+}
+
+bool ossimStringProperty::hasConstraints()const
+{
+   return (theConstraints.size() > 0);
+}
+
+bool ossimStringProperty::setValue(const ossimString& value)
+{
+   bool result = true;
+   
+   if(theConstraints.size() > 0)
+   {
+      if(std::find(theConstraints.begin(),
+                   theConstraints.end(),
+                   value)
+                    != theConstraints.end())
+      {
+         theValue = value;
+      }
+      else
+      {
+         result = false;
+      }
+   }
+   else
+   {
+      theValue = value;
+   }
+
+   return result;
+}
+
+void ossimStringProperty::valueToString(ossimString& valueResult)const
+{
+   valueResult = theValue;
+}
diff --git a/src/ossim/base/ossimTDpt.cpp b/ossim/src/ossim/base/ossimTDpt.cpp
similarity index 100%
rename from src/ossim/base/ossimTDpt.cpp
rename to ossim/src/ossim/base/ossimTDpt.cpp
diff --git a/ossim/src/ossim/base/ossimTempFilename.cpp b/ossim/src/ossim/base/ossimTempFilename.cpp
new file mode 100644
index 0000000..1379cb9
--- /dev/null
+++ b/ossim/src/ossim/base/ossimTempFilename.cpp
@@ -0,0 +1,116 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// Description: This is a tmeporary filename class it will create a temporary
+//              file and will also delete it upon destruction
+//
+//*************************************************************************
+// $Id: ossimTempFilename.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <stdlib.h>
+#include <fstream>
+#include <ossim/base/ossimTempFilename.h>
+#include <ossim/base/ossimEnvironmentUtility.h>
+#include <time.h>
+
+ossimTempFilename::ossimTempFilename(const ossimString& tempDir,
+                                     const ossimString& prefix,
+                                     const ossimString& extension,
+                                     bool autodelete,
+                                     bool useWildcardDelete)
+   :theTempDir(tempDir),
+    thePrefix(prefix),
+    theExtension(extension),
+    theAutoDeleteFlag(autodelete),
+    theWildCardDeleteFlag(useWildcardDelete)
+{
+}
+
+ossimTempFilename::~ossimTempFilename()
+{
+   if(*((ossimFilename*)this) != "")
+   {
+      
+      if(theAutoDeleteFlag)
+      {
+         if(theWildCardDeleteFlag)
+         {
+            wildcardRemove(*this + ".*");
+         }
+         else
+         {
+            remove();
+         }
+      }
+   }
+}
+
+void  ossimTempFilename::generateRandomFile()
+{
+   generate(false);
+}
+
+void ossimTempFilename::generateRandomDir()
+{
+   generate(true);
+}
+
+void ossimTempFilename::generate(bool createAsDirectoryFlag)
+{
+   srand(time(0));
+   ossimString tempDirCopy = theTempDir;
+
+   if(tempDirCopy == "")
+   {
+      tempDirCopy = ossimEnvironmentUtility::instance()->getEnvironmentVariable("TEMP");
+      if(tempDirCopy=="")
+      {
+         tempDirCopy  = ossimEnvironmentUtility::instance()->getEnvironmentVariable("TMP");
+      }
+      if(tempDirCopy == "")
+      {
+         if(ossimFilename("/tmp").exists())
+         {
+            tempDirCopy = "/tmp";
+         }
+      }
+   }
+
+   int count = 0;
+   int randNumber1 = rand();
+   ossimFilename prefixDir = ossimFilename(tempDirCopy);
+   ossimFilename result = prefixDir.dirCat(thePrefix+
+                                           ossimString::toString(randNumber1));
+   
+   while((count < RAND_MAX)&&result.exists())
+   {
+      randNumber1 = rand();
+      result = prefixDir.dirCat(thePrefix+
+                                ossimString::toString(randNumber1));
+      
+      ++count;
+   }
+
+   if(theExtension != "")
+   {
+      result = result.setExtension(theExtension);
+   }
+   *((ossimFilename*)this) = result;
+   if(result != "")
+   {
+      if(createAsDirectoryFlag)
+      {
+         createDirectory();
+      }
+      else
+      {
+         std::ofstream out(result.c_str());
+         out.close();
+      }
+   }
+}
+
diff --git a/src/ossim/base/ossimTextProperty.cpp b/ossim/src/ossim/base/ossimTextProperty.cpp
similarity index 100%
rename from src/ossim/base/ossimTextProperty.cpp
rename to ossim/src/ossim/base/ossimTextProperty.cpp
diff --git a/src/ossim/base/ossimThinPlateSpline.cpp b/ossim/src/ossim/base/ossimThinPlateSpline.cpp
similarity index 100%
rename from src/ossim/base/ossimThinPlateSpline.cpp
rename to ossim/src/ossim/base/ossimThinPlateSpline.cpp
diff --git a/src/ossim/base/ossimThreeParamDatum.cpp b/ossim/src/ossim/base/ossimThreeParamDatum.cpp
similarity index 100%
rename from src/ossim/base/ossimThreeParamDatum.cpp
rename to ossim/src/ossim/base/ossimThreeParamDatum.cpp
diff --git a/src/ossim/base/ossimTieGpt.cpp b/ossim/src/ossim/base/ossimTieGpt.cpp
similarity index 100%
rename from src/ossim/base/ossimTieGpt.cpp
rename to ossim/src/ossim/base/ossimTieGpt.cpp
diff --git a/src/ossim/base/ossimTieGptSet.cpp b/ossim/src/ossim/base/ossimTieGptSet.cpp
similarity index 100%
rename from src/ossim/base/ossimTieGptSet.cpp
rename to ossim/src/ossim/base/ossimTieGptSet.cpp
diff --git a/ossim/src/ossim/base/ossimTileHash.cpp b/ossim/src/ossim/base/ossimTileHash.cpp
new file mode 100644
index 0000000..cc7ee9f
--- /dev/null
+++ b/ossim/src/ossim/base/ossimTileHash.cpp
@@ -0,0 +1,124 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken Copied from TiledImageHash.
+//
+// Description: Hashing function for tiled rectangles.  WIll hash a
+//              dpt or a to a single index value.
+//
+// NOTE:  This works with rectangles that are positive in the line up
+//        (y) direction.
+//              
+//*******************************************************************
+//  $Id: ossimTileHash.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cfloat> // for FLT_EPSILON
+
+#include <ossim/base/ossimTileHash.h>
+
+ossimTileHash::ossimTileHash(const ossimDrect& imageRect,
+                             double tileWidth,
+                             double tileHeight)
+   :
+      ossimPointHash(),
+      theImageRect(imageRect)
+{
+   // make sure that the width of the tile is not larger than
+   // the width of the image rectangle.
+   if(theImageRect.width() <= tileWidth)
+   {
+      theTileWidth = theImageRect.width();
+      theNumberOfHorizTiles = 1;
+   }
+   else
+   {
+      theTileWidth          = tileWidth;
+      double tempDiv        = theImageRect.width()/theTileWidth;
+      double overFlow       = tempDiv  - static_cast<long>(tempDiv);
+      theNumberOfHorizTiles = static_cast<long>(tempDiv);
+      
+      if(fabs(overFlow) > FLT_EPSILON) // if the extent went beyond a tile
+      {
+         theNumberOfHorizTiles ++;      // we must say it has another tile
+      }
+   }
+
+   // make sure the height of the tile is not larger than the
+   // height of the image rectangle.
+   if(theImageRect.height() <= tileHeight)
+   {
+      theTileHeight = theImageRect.height();
+      theNumberOfVertTiles = 1;
+   }
+   else
+   {
+      theTileHeight         = tileHeight;
+      double tempDiv        = theImageRect.height()/theTileHeight;
+      double overFlow       = tempDiv  - static_cast<long>(tempDiv);
+      theNumberOfVertTiles = static_cast<long>(tempDiv);
+
+      if(fabs(overFlow) > FLT_EPSILON) // if the extent went beyond a tile
+      {
+         theNumberOfVertTiles ++;      // we must say it has another tile
+      }
+   }
+}
+
+ossimTileHash::~ossimTileHash()
+{
+}
+
+long ossimTileHash::operator()(const ossimFpt& aPoint)
+{
+   if ( (aPoint.x >= theImageRect.ul().x) &&
+        (aPoint.x <= theImageRect.lr().x) &&
+        (aPoint.y <= theImageRect.ul().y) &&
+        (aPoint.y >= theImageRect.lr().y) )
+   {
+      // how far is the point horizontally  from the upper left corner
+      double deltaWidth  = aPoint.x - theImageRect.ul().x;
+
+      // how far is the point vertically from the upper left point
+      double deltaHeight = theImageRect.ul().y - aPoint.y;
+
+      // solve the horizontal and vertical index numbers
+      long indexWidth  = static_cast<long>(deltaWidth  / theTileWidth);
+      long indexHeight = static_cast<long>(deltaHeight / theTileHeight);
+
+      // Map to a linear array.
+      // Just like you would index a 2-D array in memory
+      return static_cast<long>(theNumberOfHorizTiles*indexHeight + indexWidth);
+   }
+
+   return -1;
+}
+
+long ossimTileHash::operator()(const ossimDpt& aPoint)
+{
+   if ( (aPoint.x >= theImageRect.ul().x) &&
+        (aPoint.x <= theImageRect.lr().x) &&
+        (aPoint.y <= theImageRect.ul().y) &&
+        (aPoint.y >= theImageRect.lr().y) )
+   {
+      // how far is the point horizontally  from the upper left corner
+      double deltaWidth  = aPoint.x - theImageRect.ul().x;
+
+      // how far is the point vertically from the upper left point
+      double deltaHeight = theImageRect.ul().y - aPoint.y;
+
+      // solve the horizontal and vertical index numbers
+      long indexWidth  = static_cast<long>(deltaWidth  / theTileWidth);
+      long indexHeight = static_cast<long>(deltaHeight / theTileHeight);
+
+      // Map to a linear array.
+      // Just like you would index a 2-D array in memory
+      return static_cast<long>(theNumberOfHorizTiles*indexHeight + indexWidth);
+   }
+
+   return -1;
+}
+
diff --git a/ossim/src/ossim/base/ossimTiledImageHash.cpp b/ossim/src/ossim/base/ossimTiledImageHash.cpp
new file mode 100644
index 0000000..7b30ed3
--- /dev/null
+++ b/ossim/src/ossim/base/ossimTiledImageHash.cpp
@@ -0,0 +1,141 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+// Description: Hashing function for tiled rectangles.  WIll hash a
+//              dpt to a single index value.
+//              
+//*******************************************************************
+//  $Id: ossimTiledImageHash.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cfloat> // for FLT_EPSILON
+
+#include <ossim/base/ossimTiledImageHash.h>
+
+
+ossimTiledImageHash::ossimTiledImageHash(const ossimDrect &imageRect,
+                                         double tileWidth,
+                                         double tileHeight)
+   :ossimPointHash(),
+    theImageRect(imageRect)
+{
+   // make sure that the width of the tile is not larger than
+   // the width of the image rectangle.
+   if(theImageRect.width() < tileWidth)
+   {
+      theTileWidth = theImageRect.width();
+      theNumberOfHorizTiles = 1;
+   }
+   else
+   {
+      theTileWidth          = tileWidth;
+      double tempDiv        = theImageRect.width()/theTileWidth;
+      double overFlow       = tempDiv  - static_cast<long>(tempDiv);
+      theNumberOfHorizTiles = static_cast<long>(tempDiv);
+      
+      if(fabs(overFlow) >= FLT_EPSILON) // if the extent went beyond a tile
+      {
+         theNumberOfHorizTiles ++;      // we must say it has another tile
+      }
+   }
+
+   // make sure the height of the tile is not larger than the
+   // height of the image rectangle.
+   if(theImageRect.height() < tileHeight)
+   {
+      theTileHeight = theImageRect.height();
+      theNumberOfVertTiles = 1;
+   }
+   else
+   {
+      theTileHeight         = tileHeight;
+      double tempDiv        = theImageRect.height()/theTileHeight;
+      double overFlow       = tempDiv  - static_cast<long>(tempDiv);
+      theNumberOfVertTiles = static_cast<long>(tempDiv);
+
+      if(fabs(overFlow) >= FLT_EPSILON) // if the extent went beyond a tile
+      {
+         theNumberOfVertTiles ++;      // we must say it has another tile
+      }
+   }
+
+}
+
+ossimTiledImageHash::~ossimTiledImageHash()
+{
+}
+
+long ossimTiledImageHash::operator()(const ossimDpt &aPoint)
+{
+   if(aPoint.x >= theImageRect.ul().x && aPoint.y >= theImageRect.ul().y)
+   {
+      // how far is the point horizontally  from the upper left corner
+      double deltaWidth  = aPoint.x - theImageRect.ul().x;
+
+      // how far is the point vertically from the upper left point
+      double deltaHeight = aPoint.y - theImageRect.ul().y;
+
+      // if deltas are negative then we are outside the
+      // bounds
+      if((deltaWidth < 0) || (deltaHeight < 0)) 
+      {
+         return -1;
+      }
+
+      // check if outside the rectangle
+      if( (deltaWidth > theNumberOfHorizTiles*theTileWidth)||
+          (deltaHeight > theNumberOfVertTiles*theTileHeight))
+      {
+         return -1;
+      }
+      // solve the horizontal and vertical index numbers
+      long indexWidth  = static_cast<long>(deltaWidth  / theTileWidth);
+      long indexHeight = static_cast<long>(deltaHeight / theTileHeight);
+
+      // map to a linear array.  Just like you would index a 2-D array in memory
+      return static_cast<long>(theNumberOfHorizTiles*indexHeight + indexWidth);
+   }
+
+   return -1;
+}
+
+long ossimTiledImageHash::operator()(const ossimFpt &aPoint)
+{
+   if(aPoint.x >= theImageRect.ul().x && aPoint.y >= theImageRect.ul().y)
+   {
+      // how far is the point horizontally  from the upper left corner
+      double deltaWidth  = aPoint.x - theImageRect.ul().x;
+
+      // how far is the point vertically from the upper left point
+      double deltaHeight = aPoint.y - theImageRect.ul().y;
+
+      // if deltas are negative then we are outside the
+      // bounds
+      if((deltaWidth < 0) || (deltaHeight < 0)) 
+      {
+         return -1;
+      }
+
+      // check if outside the rectangle
+      if( (deltaWidth > theNumberOfHorizTiles*theTileWidth)||
+          (deltaHeight > theNumberOfVertTiles*theTileHeight))
+      {
+         return -1;
+      }
+      // solve the horizontal and vertical index numbers
+      long indexWidth  = static_cast<long>(deltaWidth  / theTileWidth);
+      long indexHeight = static_cast<long>(deltaHeight / theTileHeight);
+
+      // map to a linear array.  Just like you would index a 2-D array in memory
+      return static_cast<long>(theNumberOfHorizTiles*indexHeight + indexWidth);
+   }
+
+   return -1;
+}
+
+
diff --git a/src/ossim/base/ossimTimer.cpp b/ossim/src/ossim/base/ossimTimer.cpp
similarity index 100%
rename from src/ossim/base/ossimTimer.cpp
rename to ossim/src/ossim/base/ossimTimer.cpp
diff --git a/ossim/src/ossim/base/ossimTrace.cpp b/ossim/src/ossim/base/ossimTrace.cpp
new file mode 100644
index 0000000..55073d4
--- /dev/null
+++ b/ossim/src/ossim/base/ossimTrace.cpp
@@ -0,0 +1,41 @@
+//*****************************************************************************
+// FILE: ossimTrace.cc
+//
+// Copyright (C) 2001 ImageLinks, Inc.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// DESCRIPTION:
+//   Contains implementation of class ossimTrace
+//
+// SOFTWARE HISTORY:
+//>
+//   24Apr2001  Oscar Kramer
+//              Initial coding.
+//<
+//*****************************************************************************
+// $Id: ossimTrace.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimTraceManager.h>
+#include <ossim/base/ossimCommon.h>
+//*****************************************************************************
+//  CONSTRUCTOR: ossimTrace
+//  
+//*****************************************************************************
+ossimTrace::ossimTrace(const ossimString& trace_name)
+   :
+      theTraceName   (trace_name),
+      theEnabledFlag (false)
+{
+   ossimTraceManager::instance()->addTrace(this);
+}
+
+ossimTrace::~ossimTrace()
+{
+   ossimTraceManager::instance()->removeTrace(this);
+}
+
+
diff --git a/ossim/src/ossim/base/ossimTraceManager.cpp b/ossim/src/ossim/base/ossimTraceManager.cpp
new file mode 100644
index 0000000..6e5abc9
--- /dev/null
+++ b/ossim/src/ossim/base/ossimTraceManager.cpp
@@ -0,0 +1,106 @@
+//*****************************************************************************
+// Copyright (C) 2005 Garrett Potts, all rights reserved.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+// 
+// DESCRIPTION:
+//   Contains declaration of class ossimTraceManager.
+//
+//*****************************************************************************
+// $Id: ossimTraceManager.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <algorithm>
+
+#include <ossim/base/ossimTraceManager.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimRegExp.h>
+
+ossimTraceManager* ossimTraceManager::theInstance = 0;
+
+ossimTraceManager::ossimTraceManager()
+{
+   theInstance = this;
+}
+
+ossimTraceManager* ossimTraceManager::instance()
+{
+   if(!theInstance)
+   {
+      theInstance = new ossimTraceManager;
+   }
+   
+   return theInstance;
+}
+
+void ossimTraceManager::setTracePattern(const ossimString& pattern)
+{
+   thePattern = pattern;
+   setTraceFlags(true);
+}
+
+void ossimTraceManager::addTrace(ossimTrace* traceObj)
+{
+   if(!traceObj)
+   {
+      return;
+   }
+   
+   std::vector<ossimTrace*>::iterator iter = std::find(theTraceList.begin(),
+                                                       theTraceList.end(),
+                                                       traceObj);
+   if(iter == theTraceList.end())
+   {
+      theTraceList.push_back(traceObj);
+
+      if(thePattern.size())
+      {
+         ossimRegExp rxp;
+         rxp.compile(thePattern.c_str());
+         if(rxp.find(traceObj->getTraceName().c_str()))
+         {
+            // Found a match so set the flag and increment the counter.
+            traceObj->setTraceFlag(true);
+         }
+         else
+         {
+            traceObj->setTraceFlag(false);
+         }
+      }
+      else
+      {
+         traceObj->setTraceFlag(false);
+      } 
+   }
+}
+
+void ossimTraceManager::removeTrace(ossimTrace* traceObj)
+{
+   std::vector<ossimTrace*>::iterator iter = std::find(theTraceList.begin(),
+                                                       theTraceList.end(),
+                                                       traceObj);
+
+   if(iter !=  theTraceList.end())
+   {
+      theTraceList.erase(iter);
+   }
+}
+
+void ossimTraceManager::setTraceFlags(bool flag)
+{
+   ossimRegExp rxp;
+   rxp.compile(thePattern.c_str());
+   
+   for(ossim_uint32 idx = 0; idx < theTraceList.size(); ++idx)
+   {
+      if (rxp.find(theTraceList[idx]->getTraceName().c_str()))
+      {
+         // Found a match so set the flag and increment the counter.
+         theTraceList[idx]->setTraceFlag(flag);
+      }
+   }
+}
+
diff --git a/ossim/src/ossim/base/ossimUnitConversionTool.cpp b/ossim/src/ossim/base/ossimUnitConversionTool.cpp
new file mode 100644
index 0000000..462e643
--- /dev/null
+++ b/ossim/src/ossim/base/ossimUnitConversionTool.cpp
@@ -0,0 +1,436 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimUnitConversionTool.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <iostream>
+#include <iomanip>
+#include <ossim/base/ossimUnitConversionTool.h>
+#include <ossim/base/ossimGpt.h>
+
+std::ostream& operator<<(std::ostream& out,
+                         const ossimUnitConversionTool& data)
+{
+   out << std::setprecision(15) << std::setiosflags(std::ios::fixed)
+       << "Meters:           " << data.getMeters()
+       << "\nFeet:             " << data.getFeet()
+       << "\nU.S. Survey Feet: " << data.getUsSurveyFeet()
+       << "\nNautical miles:   " << data.getNauticalMiles()
+       << "\nDegrees:          " << data.getDegrees()
+       << "\nMinutes:          " << data.getMinutes()
+       << "\nSeconds:          " << data.getSeconds() << std::endl;
+   
+   return out;
+}
+
+ossimUnitConversionTool::ossimUnitConversionTool(double value,
+                                                 ossimUnitType unitType)
+   : theValue(value),
+     theUnitType(unitType),
+     theOrigin()
+{
+}
+
+ossimUnitConversionTool::ossimUnitConversionTool(const ossimGpt& origin,
+                                                 double value,
+                                                 ossimUnitType unitType)
+   : theValue(value),
+     theUnitType(unitType),
+     theOrigin(origin)
+{
+}
+
+void ossimUnitConversionTool::setOrigin(const ossimGpt& gpt)
+{
+   theOrigin = gpt;
+}
+
+ossimGpt ossimUnitConversionTool::getOrigin()const
+{
+   return theOrigin;
+}
+
+void ossimUnitConversionTool::getOrigin(ossimGpt& result)const
+{
+   result = theOrigin;
+}
+
+void ossimUnitConversionTool::setValue(double value,
+                                       ossimUnitType unitType)
+{
+   theValue    = value;
+   theUnitType = unitType;
+}
+
+double ossimUnitConversionTool::getValue(ossimUnitType unitType) const
+{
+   switch(unitType)
+   {
+      case OSSIM_METERS:
+      {
+         return getMeters();
+      }
+      case OSSIM_RADIANS:
+      {
+         return getRadians();
+      }
+      case OSSIM_DEGREES:
+      {
+         return getDegrees();
+      }
+      case OSSIM_US_SURVEY_FEET:
+      {
+         return getUsSurveyFeet();
+      }
+      case OSSIM_FEET:
+      {
+         return getFeet();
+      }
+      case OSSIM_SECONDS:
+      {
+         return getSeconds();
+      }
+      case OSSIM_MINUTES:
+      {
+         return getMinutes();
+      }
+      case OSSIM_NAUTICAL_MILES:
+      {
+         return getNauticalMiles();
+      }
+      case OSSIM_MILES:
+      {
+         return getMiles();
+      }
+      case OSSIM_MICRONS:
+      {
+         return getMicrons();
+      }
+      case OSSIM_CENTIMETERS:
+      {
+         return getCentimeters();
+      }
+      case OSSIM_MILLIMETERS:
+      {
+         return getMillimeters();
+      }
+      case OSSIM_YARDS:
+      {
+         return getYards();
+      }
+      case OSSIM_INCHES:
+      {
+         return getInches();
+      }
+      case OSSIM_KILOMETERS:
+      {
+         return getKilometers();
+      }
+      default:
+         break;
+   }
+
+   return ossim::nan();
+}
+
+void ossimUnitConversionTool::setMeters(double value)
+{
+   setValue(value, OSSIM_METERS);
+}
+
+void ossimUnitConversionTool::setRadians(double value)
+{
+   setValue(value, OSSIM_RADIANS);
+}
+
+void ossimUnitConversionTool::setDegrees(double value)
+{
+   setValue(value, OSSIM_DEGREES);
+}
+
+void ossimUnitConversionTool::setMinutes(double value)
+{
+   setValue(value, OSSIM_MINUTES);
+}
+
+void ossimUnitConversionTool::setSeconds(double value)
+{
+   setValue(value, OSSIM_SECONDS);
+}
+
+void ossimUnitConversionTool::setUsSurveyFeet(double value)
+{
+   setValue(value, OSSIM_US_SURVEY_FEET);
+}
+
+void ossimUnitConversionTool::setFeet(double value)
+{
+   setValue(value, OSSIM_FEET);
+}
+
+void ossimUnitConversionTool::setNauticalMiles(double value)
+{
+   setValue(value, OSSIM_NAUTICAL_MILES);
+}
+
+void ossimUnitConversionTool::setMiles(double value)
+{
+   setValue(value, OSSIM_MILES);
+}
+
+void ossimUnitConversionTool::setMillimeters(double value)
+{
+   setValue(value, OSSIM_MILLIMETERS);
+}
+
+void ossimUnitConversionTool::setMicrons(double value)
+{
+   setValue(value, OSSIM_MICRONS);
+}
+
+void ossimUnitConversionTool::setCentimeters(double value)
+{
+   setValue(value, OSSIM_CENTIMETERS);
+}
+
+void ossimUnitConversionTool::setYards(double value)
+{
+   setValue(value, OSSIM_YARDS);
+}
+
+void ossimUnitConversionTool::setInches(double value)
+{
+   setValue(value, OSSIM_INCHES);
+}
+
+void ossimUnitConversionTool::setKilometers(double value)
+{
+   setValue(value, OSSIM_KILOMETERS);
+}
+
+double ossimUnitConversionTool::getMeters()const
+{
+   if(theUnitType == OSSIM_METERS)
+   {
+      return theValue;
+   }
+   
+   return computeMeters();
+}
+
+double ossimUnitConversionTool::getRadians()const
+{
+   if(theUnitType == OSSIM_RADIANS)
+   {
+      return theValue;
+   }
+   return getDegrees()*RAD_PER_DEG;
+}
+
+double ossimUnitConversionTool::getDegrees()const
+{
+   switch (theUnitType)
+   {
+      case OSSIM_DEGREES:
+      {
+         return theValue;
+      }
+      case OSSIM_MINUTES:
+      {
+         return (theValue / 60.0);
+      }
+      case OSSIM_SECONDS:
+      {
+         return (theValue / 3600.0);
+      }
+      case OSSIM_RADIANS:
+      {
+         return (theValue * DEG_PER_RAD);
+      }
+      default:
+         break;
+   }
+   
+   ossimDpt pt = theOrigin.metersPerDegree();
+   return (computeMeters() /((pt.x+pt.y)*.5));
+}
+
+double ossimUnitConversionTool::getMinutes()const
+{
+   if(theUnitType == OSSIM_MINUTES)
+   {
+      return theValue;
+   }
+   return (getDegrees()*60.0);
+}
+
+double ossimUnitConversionTool::getSeconds()const
+{
+   if(theUnitType == OSSIM_SECONDS)
+   {
+      return theValue;
+   }
+   return (getDegrees()*3600.0);
+}
+
+double ossimUnitConversionTool::getUsSurveyFeet()const
+{
+   if(theUnitType == OSSIM_US_SURVEY_FEET)
+   {
+      return theValue;
+   }
+   return (computeMeters()/US_METERS_PER_FT);
+}
+
+double ossimUnitConversionTool::getFeet()const
+{
+   if(theUnitType == OSSIM_FEET)
+   {
+      return theValue;
+   }
+   return (computeMeters()*FT_PER_MTRS);
+}
+
+double ossimUnitConversionTool::getNauticalMiles()const
+{
+   if(theUnitType == OSSIM_NAUTICAL_MILES)
+   {
+      return theValue;
+   }
+   
+   return (computeMeters()/(theOrigin.metersPerDegree().y/60.0));
+}
+
+double ossimUnitConversionTool::getMiles()const
+{
+   if(theUnitType == OSSIM_MILES)
+   {
+      return theValue;
+   }
+   return ((computeMeters()*FT_PER_MTRS)/FT_PER_MILE);
+}
+
+double ossimUnitConversionTool::getMillimeters()const
+{
+   if(theUnitType == OSSIM_MILLIMETERS)
+   {
+      return theValue;
+   }
+   return ((computeMeters()*1e3));
+}
+
+double ossimUnitConversionTool::getMicrons()const
+{
+   if(theUnitType == OSSIM_MICRONS)
+   {
+      return theValue;
+   }
+   return ((computeMeters()*1e6));
+}
+
+double ossimUnitConversionTool::getCentimeters()const
+{
+   if(theUnitType == OSSIM_KILOMETERS)
+   {
+      return theValue;
+   }
+
+   return ((computeMeters()*1e2));   
+}
+
+double ossimUnitConversionTool::getYards()const
+{
+   if(theUnitType == OSSIM_INCHES)
+   {
+      return theValue;
+   }
+
+   return ((computeMeters()/0.914));   
+}
+
+double ossimUnitConversionTool::getInches()const
+{
+   if(theUnitType == OSSIM_INCHES)
+   {
+      return theValue;
+   }
+
+   return ((getFeet()*12.0));   
+}
+
+double ossimUnitConversionTool::getKilometers()const
+{
+   if(theUnitType == OSSIM_KILOMETERS)
+   {
+      return theValue;
+   }
+   return ((computeMeters()*1e-3));
+}
+
+double ossimUnitConversionTool::computeMeters()const
+{
+   switch(theUnitType)
+   {
+      case OSSIM_METERS:
+      {
+         return theValue;
+         break;
+      }
+      case OSSIM_RADIANS:
+      {
+         ossimDpt pt = theOrigin.metersPerDegree();
+         return (theValue*DEG_PER_RAD)*((pt.x+pt.y)*.5);
+      }
+      case OSSIM_DEGREES:
+      {
+         ossimDpt pt = theOrigin.metersPerDegree();
+         return theValue*((pt.x+pt.y)*.5);
+      }
+      case OSSIM_US_SURVEY_FEET:
+      {
+         return  US_METERS_PER_FT*theValue;
+      }
+      case OSSIM_FEET:
+      {
+         return MTRS_PER_FT*theValue;
+      }
+      case OSSIM_SECONDS:
+      {
+         ossimDpt pt = theOrigin.metersPerDegree();
+         return (theValue/3600.0)*((pt.x+pt.y)*.5);
+      }
+      case OSSIM_MINUTES:
+      {
+         ossimDpt pt = theOrigin.metersPerDegree();
+         return (theValue/60.0)*((pt.x+pt.y)*.5);
+      }
+      case OSSIM_NAUTICAL_MILES:
+      {
+         return (theOrigin.metersPerDegree().y/60.0)*theValue;
+      }
+      case OSSIM_MILES:
+      {
+         return MTRS_PER_FT*FT_PER_MILE*theValue;
+      }
+      case OSSIM_MILLIMETERS:
+      {
+         return (theValue/(1e3));
+      }
+      case OSSIM_MICRONS:
+      {
+         return (theValue/(1e6));
+      }
+      default:
+         break;
+   }
+
+   return ossim::nan();
+}
+
diff --git a/ossim/src/ossim/base/ossimUnitTypeLut.cpp b/ossim/src/ossim/base/ossimUnitTypeLut.cpp
new file mode 100644
index 0000000..e4ae133
--- /dev/null
+++ b/ossim/src/ossim/base/ossimUnitTypeLut.cpp
@@ -0,0 +1,100 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimUnitTypeLut.cpp 22857 2014-08-05 15:02:58Z gpotts $
+
+#include <ossim/base/ossimUnitTypeLut.h>
+
+//ossimUnitTypeLut* ossimUnitTypeLut::theInstance = NULL;
+
+static const int TABLE_SIZE = 17;
+
+ossimUnitTypeLut* ossimUnitTypeLut::instance()
+{
+   static ossimUnitTypeLut inst;
+
+   return &inst;
+//   if (!theInstance)
+//   {
+//      theInstance = new ossimUnitTypeLut;
+//   }
+//   return theInstance;
+}
+
+ossimUnitTypeLut::ossimUnitTypeLut()
+  :ossimLookUpTable(TABLE_SIZE)
+{
+   theTable[0].theKey    = OSSIM_UNIT_UNKNOWN;
+   theTable[0].theValue  = "unknown";
+   theTable[1].theKey    = OSSIM_METERS;
+   theTable[1].theValue  = "meters";
+   theTable[2].theKey    = OSSIM_FEET;
+   theTable[2].theValue  = "feet";
+   theTable[3].theKey    = OSSIM_US_SURVEY_FEET;
+   theTable[3].theValue  = "us_survey_feet";
+   theTable[4].theKey    = OSSIM_DEGREES;
+   theTable[4].theValue  = "degrees";
+   theTable[5].theKey    = OSSIM_RADIANS;
+   theTable[5].theValue  = "radians";
+   theTable[6].theKey    = OSSIM_NAUTICAL_MILES;
+   theTable[6].theValue  = "nautical_miles";
+   theTable[7].theKey    = OSSIM_SECONDS;
+   theTable[7].theValue  = "seconds";
+   theTable[8].theKey    = OSSIM_MINUTES;
+   theTable[8].theValue  = "minutes";
+   theTable[9].theKey    = OSSIM_PIXEL;
+   theTable[9].theValue  = "pixel";
+   theTable[10].theKey   = OSSIM_MILES;
+   theTable[10].theValue = "miles";
+   theTable[11].theKey   = OSSIM_MILLIMETERS;
+   theTable[11].theValue = "millimeters";
+   theTable[12].theKey   = OSSIM_MICRONS;
+   theTable[12].theValue = "microns";
+   theTable[13].theKey   = OSSIM_CENTIMETERS;
+   theTable[13].theValue = "centimeters";
+   theTable[14].theKey   = OSSIM_YARDS;
+   theTable[14].theValue = "yards";
+   theTable[15].theKey   = OSSIM_INCHES;
+   theTable[15].theValue = "inches";
+   theTable[16].theKey   = OSSIM_KILOMETERS;
+   theTable[16].theValue = "kilometers";
+}
+
+ossimUnitTypeLut::~ossimUnitTypeLut()
+{
+}
+ossim_int32 ossimUnitTypeLut::getEntryNumber(const char* entry_string,
+                                             bool case_insensitive) const
+{
+   ossim_int32 result
+      = ossimLookUpTable::getEntryNumber(entry_string, case_insensitive);
+   if(result < 0)
+   {
+      return (ossim_int32)OSSIM_UNIT_UNKNOWN;
+   }
+   
+   return result;
+}
+
+ossim_int32 ossimUnitTypeLut::getEntryNumber(const ossimKeywordlist& kwl,
+                                             const char* prefix,
+                                             bool case_insensitive) const
+{
+   ossim_int32 result =
+      ossimLookUpTable::getEntryNumber(kwl, prefix, case_insensitive);
+   if(result < 0)
+   {
+      return (ossim_int32)OSSIM_UNIT_UNKNOWN;
+   }
+   return result;
+}
+
+ossimKeyword ossimUnitTypeLut::getKeyword() const
+{
+   return ossimKeyword(ossimKeywordNames::UNITS_KW, "");
+}
diff --git a/src/ossim/base/ossimUrl.cpp b/ossim/src/ossim/base/ossimUrl.cpp
similarity index 100%
rename from src/ossim/base/ossimUrl.cpp
rename to ossim/src/ossim/base/ossimUrl.cpp
diff --git a/src/ossim/base/ossimUsgsQuad.cpp b/ossim/src/ossim/base/ossimUsgsQuad.cpp
similarity index 100%
rename from src/ossim/base/ossimUsgsQuad.cpp
rename to ossim/src/ossim/base/ossimUsgsQuad.cpp
diff --git a/src/ossim/base/ossimViewController.cpp b/ossim/src/ossim/base/ossimViewController.cpp
similarity index 100%
rename from src/ossim/base/ossimViewController.cpp
rename to ossim/src/ossim/base/ossimViewController.cpp
diff --git a/src/ossim/base/ossimViewEvent.cpp b/ossim/src/ossim/base/ossimViewEvent.cpp
similarity index 100%
rename from src/ossim/base/ossimViewEvent.cpp
rename to ossim/src/ossim/base/ossimViewEvent.cpp
diff --git a/src/ossim/base/ossimViewInterface.cpp b/ossim/src/ossim/base/ossimViewInterface.cpp
similarity index 100%
rename from src/ossim/base/ossimViewInterface.cpp
rename to ossim/src/ossim/base/ossimViewInterface.cpp
diff --git a/src/ossim/base/ossimViewListener.cpp b/ossim/src/ossim/base/ossimViewListener.cpp
similarity index 100%
rename from src/ossim/base/ossimViewListener.cpp
rename to ossim/src/ossim/base/ossimViewListener.cpp
diff --git a/ossim/src/ossim/base/ossimVisitor.cpp b/ossim/src/ossim/base/ossimVisitor.cpp
new file mode 100644
index 0000000..38cb4ec
--- /dev/null
+++ b/ossim/src/ossim/base/ossimVisitor.cpp
@@ -0,0 +1,419 @@
+// $Id: ossimVisitor.cpp 22790 2014-05-16 19:19:30Z gpotts $
+
+#include <ossim/base/ossimVisitor.h>
+#include <ossim/base/ossimConnectableObject.h>
+#include <ossim/base/ossimPropertyEvent.h>
+#include <ossim/base/ossimViewInterface.h>
+#include <ossim/base/ossimSource.h>
+
+
+ossimVisitor::ossimVisitor(int visitorType)
+:m_visitorType(static_cast<VisitorType>(visitorType)),
+m_stopTraversalFlag(false)
+{
+   
+}
+
+ossimVisitor::ossimVisitor(const ossimVisitor& src)
+:m_visitorType(src.m_visitorType),
+m_markNode(src.m_markNode),
+m_stopTraversalFlag(src.m_stopTraversalFlag)
+{
+}
+
+ossimVisitor::VisitorType ossimVisitor::getVisitorType()const
+{
+   return m_visitorType;
+}
+
+void  ossimVisitor::setVisitorType(int vType, bool on)
+{
+   if(on)
+   {
+      m_visitorType = (VisitorType)((vType|m_visitorType)&VISIT_ALL);
+   }
+   else 
+   {
+      m_visitorType = (VisitorType)(((~vType) & m_visitorType)&VISIT_ALL);
+   }
+}
+
+void ossimVisitor::turnOffVisitorType(int vType)
+{
+   setVisitorType(vType, false);
+}
+
+void ossimVisitor::reset()
+{
+   m_markNode.clear();
+   m_stopTraversalFlag = false;
+}
+
+void ossimVisitor::visit(ossimObject* obj)
+{
+   m_markNode.insert(obj);
+}
+
+void ossimVisitor::visit(ossimConnectableObject* obj)
+{
+   visit(static_cast<ossimObject*>(obj));
+}
+
+bool ossimVisitor::hasVisited(ossimObject* obj)const
+{
+   return m_markNode.find(obj) != m_markNode.end(); 
+}
+
+bool ossimVisitor::stopTraversal()const
+{
+   return m_stopTraversalFlag;
+}
+
+
+ossimIdVisitor::ossimIdVisitor()
+   :
+   ossimVisitor(ossimVisitor::VISIT_INPUTS|ossimVisitor::VISIT_CHILDREN),
+   m_object(0),
+   m_id(0)
+{
+}
+
+ossimIdVisitor::ossimIdVisitor(int visitorType)
+   :
+   ossimVisitor(visitorType),
+   m_object(0),
+   m_id(0)
+{
+}
+
+ossimIdVisitor::ossimIdVisitor(const ossimId& id, int visitorType)
+   :
+   ossimVisitor(visitorType),
+   m_object(0),
+   m_id(id)
+{
+}
+
+ossimIdVisitor::ossimIdVisitor(const ossimIdVisitor& src)
+   :
+   ossimVisitor(src),
+   m_object(src.m_object),
+   m_id(src.m_id)
+{
+}
+
+ossimRefPtr<ossimVisitor> ossimIdVisitor::dup()const
+{
+   return new ossimIdVisitor(*this);
+}
+
+void ossimIdVisitor::visit(ossimConnectableObject* obj)
+{
+   if ( !hasVisited(obj) )
+   {
+      if(obj->getId() == m_id)
+      {
+         m_object = obj;
+         m_stopTraversalFlag = true;
+      }
+      ossimVisitor::visit(obj);
+   }
+}
+
+void ossimIdVisitor::reset()
+{
+   ossimVisitor::reset();
+   m_object = 0;
+}
+
+ossimConnectableObject* ossimIdVisitor::getObject()
+{
+   return m_object;
+}
+
+const ossimConnectableObject* ossimIdVisitor::getObject()const
+{
+   return m_object;
+}
+
+void ossimIdVisitor::setId(const ossimId& id)
+{
+   m_id = id;
+}
+
+const ossimId& ossimIdVisitor::getId()const
+{
+   return m_id;
+}
+
+ossimCollectionVisitor::ossimCollectionVisitor(int visitorType)
+:ossimVisitor(visitorType)
+{
+}
+
+ossimCollectionVisitor::ossimCollectionVisitor(const ossimCollectionVisitor& src)
+:m_collection(src.m_collection)
+{
+}
+
+ossimCollectionVisitor::ListRef& ossimCollectionVisitor::getObjects()
+{
+   return m_collection;
+}
+
+const ossimCollectionVisitor::ListRef& ossimCollectionVisitor::getObjects()const
+{
+   return m_collection;
+}
+
+ossimObject* ossimCollectionVisitor::getObject(ossim_uint32 idx)
+{
+   if(idx < m_collection.size())
+   {
+      return m_collection[idx].get();
+   }
+   return 0;
+}
+
+const ossimObject* ossimCollectionVisitor::getObject(ossim_uint32 idx)const
+{
+   if(idx < m_collection.size())
+   {
+      return m_collection[idx].get();
+   }
+   return 0;
+}
+
+void ossimCollectionVisitor::reset()
+{
+   ossimVisitor::reset();
+   m_collection.clear();
+}
+
+ossimTypeNameVisitor::ossimTypeNameVisitor(int visitorType)
+   :ossimCollectionVisitor(visitorType),
+    m_typeName(),
+    m_firstOfTypeFlag(false)
+{
+}
+
+ossimTypeNameVisitor::ossimTypeNameVisitor(const ossimString& typeName,
+                                           bool firstOfTypeFlag,
+                                           int visitorType)
+   :
+   ossimCollectionVisitor(visitorType),
+   m_typeName(typeName),
+   m_firstOfTypeFlag(firstOfTypeFlag)
+{
+}
+
+ossimTypeNameVisitor::ossimTypeNameVisitor(const ossimTypeNameVisitor& src)
+:m_typeName(src.m_typeName),
+ m_firstOfTypeFlag(src.m_firstOfTypeFlag)
+{
+}
+
+ossimRefPtr<ossimVisitor> ossimTypeNameVisitor::dup()const
+{
+   return new ossimTypeNameVisitor(*this);
+}
+
+void ossimTypeNameVisitor::visit(ossimObject* obj)
+{
+   if(!hasVisited(obj))
+   {
+      ossimCollectionVisitor::visit(obj);
+      if(obj&&obj->canCastTo(m_typeName))
+      {
+         m_collection.push_back(obj);
+         if(m_firstOfTypeFlag) m_stopTraversalFlag = true;
+      }
+  }
+}
+
+void ossimTypeNameVisitor::setTypeName(const ossimString& typeName)
+{
+   m_typeName = typeName;
+}
+
+const ossimString& ossimTypeNameVisitor::getTypeName()const
+{
+   return m_typeName;
+}
+
+void ossimTypeNameVisitor::setFirstOfTypeFlag(bool flag)
+{
+   m_firstOfTypeFlag = flag;
+}
+
+bool ossimTypeNameVisitor::getFirstOfTypeFlag() const
+{
+   return m_firstOfTypeFlag;
+}
+
+ossimTypeIdVisitor::ossimTypeIdVisitor(int visitorType)
+:ossimCollectionVisitor(visitorType)
+{
+}
+
+ossimTypeIdVisitor::ossimTypeIdVisitor(const RTTItypeid& typeId, bool firstOfTypeFlag, int visitorType)
+:ossimCollectionVisitor(visitorType),
+m_typeId(typeId),
+m_firstOfTypeFlag(firstOfTypeFlag)
+{
+}
+
+ossimTypeIdVisitor::ossimTypeIdVisitor(const ossimTypeIdVisitor& src)
+:m_typeId(src.m_typeId),
+m_firstOfTypeFlag(src.m_firstOfTypeFlag)
+{
+}
+
+ossimRefPtr<ossimVisitor> ossimTypeIdVisitor::dup()const
+{
+   return new ossimTypeIdVisitor(*this);
+}
+
+void ossimTypeIdVisitor::setTypeId(const RTTItypeid& typeId)
+{
+   m_typeId = typeId;
+}
+
+const RTTItypeid& ossimTypeIdVisitor::getTypeId()const
+{
+   return m_typeId;
+}
+
+void ossimTypeIdVisitor::visit(ossimObject* obj)
+{
+   if(!hasVisited(obj))
+   {
+      ossimCollectionVisitor::visit(obj);
+      if(obj&&obj->canCastTo(m_typeId))
+      {
+         m_collection.push_back(obj);
+         if(m_firstOfTypeFlag) m_stopTraversalFlag = true;
+      }
+   }
+}
+
+ossimEventVisitor::ossimEventVisitor(ossimEvent* evt, int visitorType)
+:ossimVisitor(visitorType),
+m_event(evt)
+{
+}
+ossimEventVisitor::ossimEventVisitor(const ossimEventVisitor& src)
+:ossimVisitor(src),
+m_event(src.m_event)
+{
+}
+
+ossimRefPtr<ossimVisitor> ossimEventVisitor::dup()const
+{
+   return new ossimEventVisitor(*this);
+}
+
+void ossimEventVisitor::visit(ossimObject* obj)
+{
+   if(!hasVisited(obj))
+   {
+      ossimListenerManager* manager = dynamic_cast<ossimListenerManager*> (obj);
+      if(manager)
+      {
+         manager->fireEvent(*m_event);
+         ossimVisitor::visit(obj);
+      }
+   }
+}
+
+ossimViewInterfaceVisitor::ossimViewInterfaceVisitor(ossimObject* view, int visitorType)
+   :
+   ossimVisitor(visitorType),
+   m_view(view)
+{
+}
+
+ossimViewInterfaceVisitor::ossimViewInterfaceVisitor(const ossimViewInterfaceVisitor& src)
+   :
+   ossimVisitor(src),
+   m_view(src.m_view)
+{
+}
+
+ossimRefPtr<ossimVisitor> ossimViewInterfaceVisitor::dup()const
+{
+   return new ossimViewInterfaceVisitor(*this);
+}
+
+ossimObject* ossimViewInterfaceVisitor::getView()
+{
+   return m_view.get();
+}
+
+const ossimObject* ossimViewInterfaceVisitor::getView()const
+{
+   return m_view.get();
+}
+
+void ossimViewInterfaceVisitor::visit(ossimObject* obj)
+{
+   if( !hasVisited(obj) )
+   {
+      if ( m_view.get() )
+      {
+         ossimViewInterface* vi = dynamic_cast<ossimViewInterface*>(obj);
+         if ( vi )
+         {
+            // Set the view:
+            vi->setView( m_view.get() );
+
+            // Send property event for outputs connected to us.
+            ossimRefPtr<ossimEvent> propEvent = new ossimPropertyEvent(obj);
+            ossimEventVisitor ev( propEvent.get(), VISIT_OUTPUTS );
+            obj->accept(ev);
+         }
+      }
+      
+      // This will put the obj in the m_markNode for hasVisited method.
+      ossimVisitor::visit(obj);
+   }
+}
+
+
+
+
+
+
+
+
+ossimSourceInitializeVisitor::ossimSourceInitializeVisitor(int visitorType)
+   :
+   ossimVisitor(visitorType)
+{
+}
+
+ossimSourceInitializeVisitor::ossimSourceInitializeVisitor(const ossimSourceInitializeVisitor& src)
+   :ossimVisitor(src)
+{
+}
+
+ossimRefPtr<ossimVisitor> ossimSourceInitializeVisitor::dup()const
+{
+   return new ossimSourceInitializeVisitor(*this);
+}
+
+void ossimSourceInitializeVisitor::visit(ossimObject* obj)
+{
+   if( !hasVisited(obj) )
+   {
+      ossimSource* vi = dynamic_cast<ossimSource*>(obj);
+
+      if ( vi )
+      {
+         vi->initialize();
+      }
+      
+      // This will put the obj in the m_markNode for hasVisited method.
+      ossimVisitor::visit(obj);
+   }
+}
diff --git a/ossim/src/ossim/base/ossimVrect.cpp b/ossim/src/ossim/base/ossimVrect.cpp
new file mode 100644
index 0000000..a1548e5
--- /dev/null
+++ b/ossim/src/ossim/base/ossimVrect.cpp
@@ -0,0 +1,42 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+// Contains class declaration for vrect.
+// Container class for four double points representing a rectangle
+// where y is up
+// 
+//*******************************************************************
+//  $Id: ossimVrect.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/base/ossimVrect.h>
+
+//*******************************************************************
+// Public Method:
+//*******************************************************************
+void ossimVrect::print(std::ostream& os) const
+{
+   os << theUlCorner << theLrCorner;
+}
+
+//*******************************************************************
+// friend function:
+//*******************************************************************
+std::ostream& operator<<(std::ostream& os, const ossimVrect& rect)
+{
+   rect.print(os);
+
+   return os;
+}
+
+ossimVrect::~ossimVrect()
+{
+}
+
diff --git a/src/ossim/base/ossimWLSBundleSolution.cpp b/ossim/src/ossim/base/ossimWLSBundleSolution.cpp
similarity index 100%
rename from src/ossim/base/ossimWLSBundleSolution.cpp
rename to ossim/src/ossim/base/ossimWLSBundleSolution.cpp
diff --git a/src/ossim/base/ossimWebRequest.cpp b/ossim/src/ossim/base/ossimWebRequest.cpp
similarity index 100%
rename from src/ossim/base/ossimWebRequest.cpp
rename to ossim/src/ossim/base/ossimWebRequest.cpp
diff --git a/src/ossim/base/ossimWebRequestFactoryBase.cpp b/ossim/src/ossim/base/ossimWebRequestFactoryBase.cpp
similarity index 100%
rename from src/ossim/base/ossimWebRequestFactoryBase.cpp
rename to ossim/src/ossim/base/ossimWebRequestFactoryBase.cpp
diff --git a/src/ossim/base/ossimWebRequestFactoryRegistry.cpp b/ossim/src/ossim/base/ossimWebRequestFactoryRegistry.cpp
similarity index 100%
rename from src/ossim/base/ossimWebRequestFactoryRegistry.cpp
rename to ossim/src/ossim/base/ossimWebRequestFactoryRegistry.cpp
diff --git a/src/ossim/base/ossimWebResponse.cpp b/ossim/src/ossim/base/ossimWebResponse.cpp
similarity index 100%
rename from src/ossim/base/ossimWebResponse.cpp
rename to ossim/src/ossim/base/ossimWebResponse.cpp
diff --git a/ossim/src/ossim/base/ossimWgs72Datum.cpp b/ossim/src/ossim/base/ossimWgs72Datum.cpp
new file mode 100644
index 0000000..0d2671e
--- /dev/null
+++ b/ossim/src/ossim/base/ossimWgs72Datum.cpp
@@ -0,0 +1,207 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author: Garrett Potts (gpotts at imagelinks.com)
+//
+// Description:
+//
+// Wgs72Datum.  Special hardcoded datum.  It will create a static
+// instance of a Wgs72Ellipsoid and set the initial defaults for
+// that are specific to a Wgs72Datum
+//*******************************************************************
+//  $Id: ossimWgs72Datum.cpp 22321 2013-07-22 11:40:45Z gpotts $
+
+#include <iostream>
+using namespace std;
+#include <ossim/base/ossimWgs72Datum.h>
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimDatumFactory.h>
+#include <ossim/base/ossimEllipsoidFactory.h>
+#include <ossim/base/ossimEllipsoid.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimNotifyContext.h>
+
+/***************************************************************************/
+/*
+ *                               DEFINES FROM GEOTRANS
+ */
+
+RTTI_DEF1(ossimWgs72Datum, "ossimWgs72Datum", ossimThreeParamDatum);
+ossimWgs72Datum::ossimWgs72Datum()
+   :ossimThreeParamDatum("WGD",
+                         "World Geodetic System 1972",
+                         ossimEllipsoidFactory::instance()->wgs72(),
+                         0.0,
+                         0.0,
+                         0.0,
+                         -180,
+                         180,
+                         -90,
+                         90,
+                         0.0,
+                         0.0,
+                         0.0)
+{
+   if(!ellipsoid())
+   {
+      //ERROR
+   }
+}
+
+ossimGpt ossimWgs72Datum::shift(const ossimGpt &aPt)const
+{
+   const ossimDatum *aDatum = aPt.datum();
+   
+   if( (ellipsoid()->getA()== aPt.datum()->ellipsoid()->getA())&&
+       (ellipsoid()->getB()== aPt.datum()->ellipsoid()->getB()))
+   {
+      return ossimGpt(aPt.latd(), aPt.lond(), aPt.height(), this);
+   }
+   
+   if(aDatum)
+   {  
+      return shiftFromWgs84(aDatum->shiftToWgs84(aPt));
+   }
+
+   return aPt;
+}
+
+ossimGpt ossimWgs72Datum::shiftToWgs84(const ossimGpt &aPt)const
+{
+/* Begin Geodetic_Shift_WGS72_To_WGS84 */
+  /*
+   *  This function shifts a geodetic coordinate (latitude, longitude in radians
+   *  and height in meters) relative to WGS72 to a geodetic coordinate 
+   *  (latitude, longitude in radians and height in meters) relative to WGS84.
+   *
+   *  WGS72_Lat : Latitude in radians relative to WGS72     (input)
+   *  WGS72_Lon : Longitude in radians relative to WGS72    (input)
+   *  WGS72_Hgt : Height in meters relative to WGS72        (input)
+   *  WGS84_Lat : Latitude in radians relative to WGS84     (output)
+   *  WGS84_Lon : Longitude in radians relative to WGS84    (output)
+   *  WGS84_Hgt : Height in meters  relative to WGS84       (output)
+   */
+   double Delta_Lat;
+   double Delta_Lon;
+   double Delta_Hgt;
+   double WGS84_a;       /* Semi-major axis of WGS84 ellipsoid               */
+   double WGS84_f;       /* Flattening of WGS84 ellipsoid                    */
+   double WGS72_a;       /* Semi-major axis of WGS72 ellipsoid               */
+   double WGS72_f;       /* Flattening of WGS72 ellipsoid                    */
+   double da;            /* WGS84_a - WGS72_a                                */
+   double df;            /* WGS84_f - WGS72_f                                */
+   double Q;
+   double sin_Lat;
+   double sin2_Lat;
+   
+   const ossimDatum *wgs84 = ossimDatumFactory::instance()->wgs84();
+   const ossimDatum *wgs72 = ossimDatumFactory::instance()->wgs72();
+   const ossimEllipsoid *wgs84Ellipsoid = ossimEllipsoidFactory::instance()->wgs84();
+   const ossimEllipsoid *wgs72Ellipsoid = ossimEllipsoidFactory::instance()->wgs72();
+
+   if(!wgs84 || !wgs72 || !wgs72Ellipsoid || !wgs84Ellipsoid)
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "ossimWgs72Datum::shiftToWgs84, NULL pointer found and no shift will be performed\n";
+      return (aPt);
+   }
+   
+   WGS84_a = wgs84Ellipsoid->a();
+   WGS84_f = wgs84Ellipsoid->flattening();
+   WGS72_a = wgs72Ellipsoid->a();
+   WGS72_f = wgs72Ellipsoid->flattening();
+   da = WGS84_a - WGS72_a;
+   df = WGS84_f - WGS72_f;
+   Q = M_PI /  648000;
+   sin_Lat = sin(aPt.latr());
+   sin2_Lat = sin_Lat * sin_Lat;
+   
+   Delta_Lat = (4.5 * cos(aPt.latr())) / (WGS72_a*Q) + (df * sin(2*aPt.latr())) / Q;
+   Delta_Lat /= SEC_PER_RAD;
+   Delta_Lon = 0.554 / SEC_PER_RAD;
+   Delta_Hgt = 4.5 * sin_Lat + WGS72_a * df * sin2_Lat - da + 1.4;
+
+   if(aPt.isHgtNan())
+   {
+      return ossimGpt(aPt.latd() + Delta_Lat*DEG_PER_RAD,
+                      aPt.lond() + Delta_Lon*DEG_PER_RAD,
+                      Delta_Hgt,
+                      wgs84);
+   }
+   return ossimGpt(aPt.latd() + Delta_Lat*DEG_PER_RAD,
+                   aPt.lond() + Delta_Lon*DEG_PER_RAD,
+                   aPt.height() + Delta_Hgt,
+                   wgs84);
+   /* End Geodetic_Shift_WGS72_To_WGS84 */
+}
+
+ossimGpt ossimWgs72Datum::shiftFromWgs84(const ossimGpt &aPt)const
+{
+ /* Begin Geodetic_Shift_WGS84_To_WGS72 */
+  /*
+   *  This function shifts a geodetic coordinate (latitude, longitude in radians
+   *  and height in meters) relative to WGS84 to a geodetic coordinate 
+   *  (latitude, longitude in radians and height in meters) relative to WGS72.
+   *
+   *  WGS84_Lat : Latitude in radians relative to WGS84     (input)
+   *  WGS84_Lon : Longitude in radians relative to WGS84    (input)
+   *  WGS84_Hgt : Height in meters  relative to WGS84       (input)
+   *  WGS72_Lat : Latitude in radians relative to WGS72     (output)
+   *  WGS72_Lon : Longitude in radians relative to WGS72    (output)
+   *  WGS72_Hgt : Height in meters relative to WGS72        (output)
+   */
+   double Delta_Lat;
+   double Delta_Lon;
+   double Delta_Hgt;
+   double WGS84_a;       /* Semi-major axis of WGS84 ellipsoid               */
+   double WGS84_f;       /* Flattening of WGS84 ellipsoid                    */
+   double WGS72_a;       /* Semi-major axis of WGS72 ellipsoid               */
+   double WGS72_f;       /* Flattening of WGS72 ellipsoid                    */
+   double da;            /* WGS72_a - WGS84_a                                */
+   double df;            /* WGS72_f - WGS84_f                                */
+   double Q;
+   double sin_Lat;
+   double sin2_Lat;
+   const ossimDatum *wgs84 = ossimDatumFactory::instance()->wgs84();
+   const ossimDatum *wgs72 = ossimDatumFactory::instance()->wgs72();
+   const ossimEllipsoid *wgs84Ellipsoid = ossimEllipsoidFactory::instance()->wgs84();
+   const ossimEllipsoid *wgs72Ellipsoid = ossimEllipsoidFactory::instance()->wgs72();
+   
+   if(!wgs84 || !wgs72 || !wgs72Ellipsoid || !wgs84Ellipsoid)
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "ossimWgs72Datum::shiftFromWgs84, NULL pointer found and no shift will be performed\n";
+      
+      return (aPt);
+   }
+   
+   WGS84_a = wgs84Ellipsoid->a();
+   WGS84_f = wgs84Ellipsoid->flattening();
+   WGS72_a = wgs72Ellipsoid->a();
+   WGS72_f = wgs72Ellipsoid->flattening();
+   
+   da = WGS72_a - WGS84_a;
+   df = WGS72_f - WGS84_f;
+   Q = M_PI / 648000;
+   sin_Lat = sin(aPt.latr());
+   sin2_Lat = sin_Lat * sin_Lat;
+
+   Delta_Lat = (-4.5 * cos(aPt.latr())) / (WGS84_a*Q)
+               + (df * sin(2*aPt.latr())) / Q;
+   Delta_Lat /= SEC_PER_RAD;
+   Delta_Lon = -0.554 / SEC_PER_RAD;
+   Delta_Hgt = -4.5 * sin_Lat + WGS84_a * df * sin2_Lat - da - 1.4;
+
+   if(aPt.isHgtNan())
+   {
+      
+      return ossimGpt(aPt.latd() + Delta_Lat*DEG_PER_RAD,
+                      aPt.lond() + Delta_Lon*DEG_PER_RAD,
+                      Delta_Hgt,
+                      this);
+   }
+   return ossimGpt(aPt.latd() + Delta_Lat*DEG_PER_RAD,
+                   aPt.lond() + Delta_Lon*DEG_PER_RAD,
+                   aPt.height() + Delta_Hgt,
+                   this);
+}
diff --git a/ossim/src/ossim/base/ossimWgs84Datum.cpp b/ossim/src/ossim/base/ossimWgs84Datum.cpp
new file mode 100644
index 0000000..0fe5237
--- /dev/null
+++ b/ossim/src/ossim/base/ossimWgs84Datum.cpp
@@ -0,0 +1,66 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author: Garrett Potts (gpotts at imagelinks.com)
+//
+// Description:
+//
+// Wgs84Datum.  Special hardcoded datum.  It will create a static
+// instance of a Wgs84Ellipsoid and set the initial defaults for
+// that are specific to a Wgs84Datum
+//*******************************************************************
+//  $Id: ossimWgs84Datum.cpp 22321 2013-07-22 11:40:45Z gpotts $
+
+#include <ossim/base/ossimWgs84Datum.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimEllipsoidFactory.h>
+#include <ossim/base/ossimEllipsoid.h>
+
+
+RTTI_DEF1(ossimWgs84Datum, "ossimWgs84Datum", ossimThreeParamDatum);
+
+ossimWgs84Datum::ossimWgs84Datum()
+   :ossimThreeParamDatum("WGE",
+                         "World Geodetic System 1984",
+                         ossimEllipsoidFactory::instance()->wgs84(),
+                         0.0, 0.0, 0.0,
+                         -180.0,180.0,-90.0,90.0,
+                         0.0, 0.0, 0.0)
+{
+   if(!ellipsoid())
+   {
+      //ERROR
+   }
+}
+
+
+ossimGpt ossimWgs84Datum::shift(const ossimGpt &aPt)const
+{
+   const ossimDatum *aDatum = aPt.datum();
+   
+    if( aPt.datum()->code() == code())
+    {
+       return ossimGpt(aPt.latd(), aPt.lond(), aPt.height(), this);
+    }
+   
+    if(aDatum)
+    {
+       return aDatum->shiftToWgs84(aPt);
+    }
+
+   return aPt;      
+}
+
+ossimGpt ossimWgs84Datum::shiftToWgs84(const ossimGpt &aPt)const
+{
+   return ossimGpt(aPt.latd(),
+                   aPt.lond(),
+                   aPt.height(),
+                   ossimDatumFactory::instance()->wgs84());
+}
+
+ossimGpt ossimWgs84Datum::shiftFromWgs84(const ossimGpt &aPt)const
+{
+   return aPt;
+}
diff --git a/src/ossim/base/ossimWms.cpp b/ossim/src/ossim/base/ossimWms.cpp
similarity index 100%
rename from src/ossim/base/ossimWms.cpp
rename to ossim/src/ossim/base/ossimWms.cpp
diff --git a/ossim/src/ossim/base/ossimXmlAttribute.cpp b/ossim/src/ossim/base/ossimXmlAttribute.cpp
new file mode 100644
index 0000000..53cada7
--- /dev/null
+++ b/ossim/src/ossim/base/ossimXmlAttribute.cpp
@@ -0,0 +1,247 @@
+//*******************************************************************
+// Copyright (C) 2001 ImageLinks Inc.  All rights reserved.
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Oscar Kramer (ossim port by D. Burken)
+//
+// Description:
+//
+// Contains definition of class ossimXmlAttribute.
+//
+//*****************************************************************************
+// $Id: ossimXmlAttribute.cpp 23623 2015-11-13 18:24:28Z gpotts $
+
+#include <iostream>
+#include <sstream>
+
+#include <ossim/base/ossimXmlAttribute.h>
+#include <ossim/base/ossimNotifyContext.h>
+
+RTTI_DEF2(ossimXmlAttribute, "ossimXmlAttribute", ossimObject, ossimErrorStatusInterface)
+
+static std::istream& xmlskipws(std::istream& in)
+{
+   int c = in.peek();
+   while((!in.fail())&&
+         ((c == ' ') ||
+          (c == '\t') ||
+          (c == '\n')||
+          (c == '\r')))
+   {
+      in.ignore(1);
+      c = in.peek();
+   }
+
+   return in;
+}
+
+ossimXmlAttribute::ossimXmlAttribute(ossimString& spec)
+{
+   std::stringstream in(spec);
+
+   read(in);
+}
+
+ossimXmlAttribute::ossimXmlAttribute(const ossimXmlAttribute& src)
+   :theName(src.theName),
+    theValue(src.theValue)
+{
+}
+
+bool ossimXmlAttribute::read(std::istream& in)
+{
+   xmlskipws(in);
+   if(in.fail()) return false;
+   if(readName(in))
+   {
+      xmlskipws(in);
+      if((in.peek() != '=')||
+         (in.fail()))
+      {
+         setErrorStatus();
+         return false;
+      }
+      in.ignore(1);
+      if(readValue(in))
+      {
+         return true;
+      }
+      else
+      {
+         setErrorStatus();
+         return false;
+      }
+   }
+   return false;
+
+#if 0
+   //
+   // Pull out name:
+   //
+   theName = spec.before('=');
+   theName = theName.trim();
+   if (theName.empty())
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "ossimXmlAttribute::ossimXmlAttribute \n"
+                                           << "Bad attribute format encountered near:\n\""<< spec<<"\"\n"
+                                           << "Parsing aborted...\n";
+      setErrorStatus();
+
+      return;
+   }
+   spec = spec.after('=');
+
+   //***
+   // Read value:
+   //***
+   char quote_char = spec[0];
+   spec = spec.after(quote_char);  // after first quote
+   theValue = spec.before(quote_char); // before second quote
+
+   //
+   // Reposition attribute specification to the start of next attribute or end
+   // of tag:
+   //
+   spec = spec.after(quote_char);  // after second quote
+   ossimString next_entry ("-?[+0-9A-Za-z<>]+");
+   spec = spec.fromRegExp(next_entry.c_str());
+#endif
+}
+
+ossimXmlAttribute::~ossimXmlAttribute()
+{
+}
+
+ossimXmlAttribute::ossimXmlAttribute()
+{
+}
+
+ossimXmlAttribute::ossimXmlAttribute(const ossimString& name,
+                                     const ossimString& value)
+{
+   setNameValue(name, value);
+}
+
+const ossimString& ossimXmlAttribute::getName()  const
+{
+   return theName;
+}
+
+const ossimString& ossimXmlAttribute::getValue() const
+{
+   return theValue;
+}
+
+void ossimXmlAttribute::setNameValue(const ossimString& name,
+                                     const ossimString& value)
+{
+   theName  = name;
+   theValue = value;
+}
+
+void ossimXmlAttribute::setName(const ossimString& name)
+{
+   theName = name;
+}
+
+void ossimXmlAttribute::setValue(const ossimString& value)
+{
+   theValue = value;
+}
+
+std::ostream& operator << (std::ostream& os, const ossimXmlAttribute* xml_attr)
+{
+   os << " " << xml_attr->theName << "=\"" << xml_attr->theValue << "\"";
+
+   return os;
+}
+
+
+bool ossimXmlAttribute::readName(std::istream& in)
+{
+   xmlskipws(in);
+   theName = "";
+   char c = in.peek();
+   while((c != ' ')&&
+         (c != '\n')&&
+	 (c != '\r')&&
+         (c != '\t')&&
+         (c != '=')&&
+         (c != '<')&&
+         (c != '/')&&
+         (c != '>')&&
+         (!in.fail()))
+   {
+      theName += (char)in.get();
+      c = in.peek();
+   }
+
+   return ((!in.fail())&&
+           (theName != ""));
+}
+
+bool ossimXmlAttribute::readValue(std::istream& in)
+{
+   xmlskipws(in);
+   if(in.fail()) return false;
+   theValue = "";
+   char c = in.peek();
+   bool done = false;
+	char startQuote = '\0';
+   if((c == '\'')||
+      (c == '"'))
+   {
+      startQuote = c;
+      theValue += in.get();
+    while(!done&&!in.fail())
+      {
+         c = in.peek();
+         if(c==startQuote)
+         {
+            theValue += c;
+            done = true;
+            in.ignore(1);
+         }
+         else if(c == '\n')
+         {
+            done = true;
+         }
+         else
+         {
+            theValue += in.get();
+         }
+      }
+   }
+
+   bool is_empty = false;
+   std::string::size_type p = 0;
+   //then this could be empty with two qoutes
+    if(theValue.size() == 2 && theValue[p] == startQuote && theValue[p+1] == startQuote)
+    {
+       theValue = "";
+       is_empty = true;
+    }
+   if(theValue != "")
+   {
+      std::string::iterator startIter = theValue.begin();
+      std::string::iterator endIter   = theValue.end();
+      --endIter;
+      if(*startIter == startQuote)
+      {
+         ++startIter;
+      }
+      else
+      {
+         return false;
+         setErrorStatus();
+      }
+      if(*endIter != startQuote)
+      {
+         return false;
+         setErrorStatus();
+      }
+      theValue = ossimString(startIter, endIter);
+   }
+   return ((!in.bad())&& (is_empty || theValue !=""));
+}
diff --git a/ossim/src/ossim/base/ossimXmlDocument.cpp b/ossim/src/ossim/base/ossimXmlDocument.cpp
new file mode 100644
index 0000000..3c37be0
--- /dev/null
+++ b/ossim/src/ossim/base/ossimXmlDocument.cpp
@@ -0,0 +1,431 @@
+//*******************************************************************
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Oscar Kramer (ossim port by D. Burken)
+//
+// Description:  
+//
+// Contains definition of class ossimXmlDocument. This class provides read-only
+// parsing and accessing of an XML document file.
+//*****************************************************************************
+// $Id: ossimXmlDocument.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+
+#include <ossim/base/ossimXmlDocument.h>
+#include <ossim/base/ossimXmlAttribute.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimRegExp.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <stack>
+#include <iostream>
+#include <fstream>
+
+
+// Static trace for debugging
+#include <ossim/base/ossimTrace.h>
+static ossimTrace traceDebug("ossimXmlDocument:debug");
+
+static std::istream& xmlskipws(std::istream& in)
+{
+   int c = in.peek();
+   while((!in.fail())&&
+         (( (c == ' ') || (c == '\t') || (c == '\n')|| (c == '\r') || (c<0x20) || (c>=0x7f) )))//|| (c<0x20) || (c >=0x2f) )))
+   {
+      in.ignore(1);
+      c = in.peek();
+   }
+   
+   return in;
+}
+
+static const int BUFFER_MAX_LEN = 1000;
+static const ossimString XPATH_DELIM ("/");
+
+RTTI_DEF1(ossimXmlDocument, "ossimXmlDocument", ossimObject)
+ossimXmlDocument::ossimXmlDocument(const ossimFilename& xmlFileName)
+   :
+   theRootNode  (0),
+   theXmlHeader("<?xml version='1.0'?>"),
+   theStrictCheckFlag(false)
+{
+   if(xmlFileName != "")
+   {
+      openFile(xmlFileName);
+   }
+}
+
+ossimXmlDocument::ossimXmlDocument(const ossimXmlDocument& src)
+:ossimObject(src),
+theRootNode(src.theRootNode.valid()?(ossimXmlNode*)src.theRootNode->dup():(ossimXmlNode*)0),
+theXmlHeader(src.theXmlHeader),
+theFilename(src.theFilename),
+theStrictCheckFlag(src.theStrictCheckFlag)
+{
+   
+}
+
+ossimXmlDocument::~ossimXmlDocument()
+{
+}
+
+bool ossimXmlDocument::write(const ossimFilename& file)
+{
+   std::ofstream out(file.c_str());
+
+   if(out)
+   {
+      out << *this << std::endl;
+   }
+   else
+   {
+      return false;
+   }
+
+   return true;
+}
+
+bool ossimXmlDocument::openFile(const ossimFilename& filename)
+{
+   
+   theFilename = filename;
+
+   if(theFilename == "")
+   {
+      return false;
+   }
+
+   //
+   // Open XML File:
+   // Note: Opening text document binary to overcome an apparent windows bug.
+   //
+   ifstream xml_stream (filename.c_str(), ios::binary);
+   if (!xml_stream)
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG: ossimXmlDocument::ossimXmlDocument\n"
+            << "encountered opening file <" << filename << "> for "
+            << "reading. Aborting..." << endl;
+      }
+      return false;
+   }
+
+   return read(xml_stream);
+}
+
+bool ossimXmlDocument::read(std::istream& in)
+{
+//   char buffer[BUFFER_MAX_LEN];
+//   streampos file_pos;
+//   bool readingHeader = true;
+   bool startTagCharacterFound = false;
+   char c = in.peek();
+
+   // Initially we will do our own skipping to make sure we ar not binary.
+   while(!in.bad() && (c != '<') && (c >= 0x20) && (c <= 0x7e))
+   {
+      in.ignore(1);
+      c = in.peek();
+   }
+
+   if (in.bad() || (c!='<'))
+   {
+      setErrorStatus();
+      return false;
+   }
+   startTagCharacterFound = true;
+
+   if(readHeader(in))
+   {
+      if(theXmlHeader=="")
+      {
+         if(startTagCharacterFound)
+         {
+            theXmlHeader = "<?xml version='1.0'?>";
+         }
+      }
+   }
+   if((!theXmlHeader.contains("xml version")) && theStrictCheckFlag)
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "FATAL: ossimXmlDocument::ossimXmlDocument"
+            << "encountered parsing XML file <" << theFilename
+            << ">. The file does not appear to be XML v1.0. \n"
+            << "Header = \n" << theXmlHeader <<"\n"
+            << endl;
+      }
+      setErrorStatus();
+      return false;
+   }
+   theRootNode = new ossimXmlNode(in, 0);
+   setErrorStatus(theRootNode->getErrorStatus());
+   return (getErrorStatus()==ossimErrorCodes::OSSIM_OK);
+}
+
+void ossimXmlDocument::findNodes(const ossimString& arg_xpath,
+                            vector<ossimRefPtr<ossimXmlNode> >& result) const
+{
+   //
+   // First verify the root node exists:
+   //
+   if (!theRootNode.valid())
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "WARNING: ossimXmlDocument::findNodes,\n"
+            << "No root node has been instantiated. Returning null "
+            << "node list..." << endl;
+      }
+      return;
+   }
+
+   //
+   // Make a copy to manipulate:
+   //
+   ossimString xpath (arg_xpath);
+   if (xpath.empty())
+      return;
+   
+   //
+   // Check if absolute path:
+   //
+   if (xpath[static_cast<std::string::size_type>(0)] !=
+       XPATH_DELIM[static_cast<std::string::size_type>(0)])
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "WARNING: ossimXmlDocument::findNodes\n"
+            << "Only absolute XPaths are supported. Returning null "
+            << "node list..." << endl;
+      }
+      return;
+   }
+
+   //
+   // Check that root tag matches path root:
+   //
+   ossimString rel_xpath (xpath.after(XPATH_DELIM));
+   ossimString root_tag (rel_xpath);
+   if (root_tag.contains(XPATH_DELIM))
+       root_tag = rel_xpath.before(XPATH_DELIM);
+   
+   if (root_tag != theRootNode->getTag())
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "WARNING: ossimXmlDocument::findNodes\n"
+            << "XPath's root node <"<<root_tag<<"> does not match the "
+            << "stored root node's tag <" << theRootNode->getTag() << ">. "
+            << "Returning null node list..." << endl;
+      }
+      return;
+   }
+
+   //
+   // If the root node was the requested node, return it alone:
+   //
+   rel_xpath = rel_xpath.after(XPATH_DELIM);
+   if (rel_xpath.empty())
+   {
+      result.push_back(theRootNode);
+      return;
+   }
+   
+   //
+   // Pass the node request on to the root node with the relative path:
+   //
+   theRootNode->findChildNodes(rel_xpath, result);
+}
+
+ostream& operator << (ostream& os, const ossimXmlDocument& xml_doc) 
+{
+   os << xml_doc.theXmlHeader << endl;
+   if (xml_doc.theRootNode.valid())
+   {
+      os << (xml_doc.theRootNode.get()) << endl;
+   }
+//    else
+//       os << "-- no root node assigned -- " << endl;
+   
+   return os;
+}
+
+void ossimXmlDocument::initRoot(ossimRefPtr<ossimXmlNode> node)
+{
+   theRootNode = node;
+}
+
+ossimRefPtr<ossimXmlNode> ossimXmlDocument::getRoot()
+{
+   return theRootNode;
+}
+
+const ossimRefPtr<ossimXmlNode> ossimXmlDocument::getRoot()const
+{
+   return theRootNode;
+}
+
+ossimRefPtr<ossimXmlNode> ossimXmlDocument::removeRoot()
+{
+   ossimRefPtr<ossimXmlNode> root = theRootNode;
+
+   theRootNode = 0;
+
+   return root;
+}
+
+
+void ossimXmlDocument::fromKwl(const ossimKeywordlist& kwlToConvert)
+{
+
+   ossimKeywordlist kwl = kwlToConvert;
+   theRootNode = 0;
+   theRootNode = new ossimXmlNode;
+
+   
+   ossimString prefix = "";
+   ossimKeywordlist::KeywordMap& map              = kwl.getMap();
+   ossimKeywordlist::KeywordMap::iterator mapIter = map.begin();
+
+   while(mapIter != map.end())
+   {
+      ossimString key = mapIter->first;
+      key = key.substitute(".", "/", true);
+      theRootNode->addNode(key, mapIter->second);
+      ++mapIter;
+   }
+
+   // now collapse all keywordlist styles to the XML style
+   //
+   std::stack<ossimRefPtr<ossimXmlNode> > tempStack;
+   tempStack.push(theRootNode);
+   while(!tempStack.empty())
+   {
+      
+      ossimRefPtr<ossimXmlNode> node = tempStack.top();
+      tempStack.pop();
+      vector<ossimRefPtr<ossimXmlNode> >& childNodes = node->getChildNodes();
+      ossim_uint32 idx = 0;
+      for(idx = 0; idx < childNodes.size(); ++idx)
+      {
+         tempStack.push(childNodes[idx]);
+      }
+      if(node->getChildNodes().size() > 0)
+      {
+         if(node->getTag()!="")
+         {
+            node->addAttribute("name", node->getTag());
+         }
+         node->setTag("object");
+      }
+      
+      if(node->getTag() == "type")
+      {
+         if(node->getParentNode())
+         {
+            node->getParentNode()->removeChild("type");
+            node->getParentNode()->addAttribute("type", node->getText());
+         }
+      }
+      else if(node->getChildNodes().size() < 1)
+      {
+         if(node->getTag()!="")
+         {
+            node->addAttribute("name", node->getTag());
+         }
+         if(!node->getText().contains("\n"))
+         {
+            if(node->getText()!="")
+            {
+               node->addAttribute("value", node->getText());
+               node->setText("");
+            }
+         }
+         node->setTag("property");
+      }
+   }
+}
+
+void ossimXmlDocument::toKwl(ossimKeywordlist& kwl ,
+                             const ossimString& prefix)const
+{
+   if(theRootNode.valid())
+   {
+      theRootNode->toKwl(kwl, prefix);
+   }
+//    const std::vector<ossimRefPtr<ossimXmlNode> >& children = theRootNode->getChildNodes();
+   
+//    ossim_uint32 idx = 0;
+   
+//    for(idx = 0; idx < children.size(); ++idx)
+//    {
+//       children[idx]->toKwl(kwl, prefix);
+//    }
+}
+
+bool ossimXmlDocument::readHeader(std::istream& in)
+{
+   //---
+   // Clear the existing header so we don't get double:
+   // <?xml version='1.0'?><?xml version='1.0'?>
+   //---
+   theXmlHeader.clear();
+   
+   char c;
+   in>>xmlskipws;
+
+   while(in.peek() == '<')
+   {
+      std::stack<char> theLessThanStack;
+      theLessThanStack.push('<');
+      in.ignore(1);
+      c = in.peek();
+      // we will for now skip things like !DOCTYPE and any other things in the header of the document that start with <? or <!
+      if((c == '?')||
+         (c == '!'))
+      {
+         theXmlHeader += "<";
+         theXmlHeader += (char)in.get();
+         
+         while(!theLessThanStack.empty()&&
+               (!in.bad()))
+         {
+            if(in.peek() == '<')
+            {
+               theLessThanStack.push('<');
+            }
+            else if(in.peek() == '>')
+            {
+               theLessThanStack.pop();
+            }
+            theXmlHeader += (char)in.get();
+         }
+         if(!in.bad())
+         {
+            if(in.peek()=='\n'||
+               in.peek()=='\r')
+            {
+               theXmlHeader += (char)in.get();
+            }
+         }
+//          if(!in.bad())
+//          {
+//             theXmlHeader += (char)in.get();
+//          }
+         in>>xmlskipws;
+      }
+   }
+
+   return (!in.bad());
+}
+
diff --git a/src/ossim/base/ossimXmlNode.cpp b/ossim/src/ossim/base/ossimXmlNode.cpp
similarity index 100%
rename from src/ossim/base/ossimXmlNode.cpp
rename to ossim/src/ossim/base/ossimXmlNode.cpp
diff --git a/ossim/src/ossim/base/ossimXmlString.cpp b/ossim/src/ossim/base/ossimXmlString.cpp
new file mode 100644
index 0000000..3952823
--- /dev/null
+++ b/ossim/src/ossim/base/ossimXmlString.cpp
@@ -0,0 +1,98 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author: Ken Melero (kmelero at remotesensing.org)
+// Description: This class provides manipulation of filenames.
+//
+//*************************************************************************
+// $Id: ossimXmlString.cpp 22326 2013-07-25 17:13:55Z gpotts $
+#include <ossim/base/ossimXmlString.h>
+
+bool ossimXmlString::containsSpecialXmlCharacters(const ossimString& value)
+{
+   for(ossimString::const_iterator it = value.begin();
+      it != value.end();++it)
+   {
+      switch(*it)
+      {
+         case '&':
+         case '<':
+         case '>':
+         case '"':
+         case '\'':
+         {
+            return true;
+         }
+         default:
+         {
+            break;
+         }
+      }
+
+   }
+   return false;
+}
+
+const ossimXmlString& ossimXmlString::assign(const ossimString& s)
+{
+   ossimString result = s;
+   
+   std::string::size_type pos = 0;
+
+   pos = result.find("&");
+   // do ampersand first
+   //
+   while(pos != std::string::npos)
+   {
+      ossimString s1(result.begin() + pos,
+                     result.begin()+pos+5);
+      ossimString s2(result.begin() + pos,
+                     result.begin()+pos+4);
+      ossimString s3(result.begin() + pos,
+                     result.begin()+pos+3);
+      
+      if((s2 != "&amp")&&
+         (s1 != "&quot")&&
+         (s3 != "&gt")&&
+         (s3 != "&lt")&&
+         (s1 != "&apos"))
+      {
+         result.replace(pos, 1, "&amp");
+      }
+      
+      pos = result.find("&", pos+4);
+   }
+
+   result = result.substitute("\"",
+                              "&quot",
+                              true);
+   result = result.substitute("<",
+                              "&lt",
+                              true);
+   result = result.substitute(">",
+                              "&gt",
+                              true);
+   result = result.substitute("'",
+                              "&apos",
+                              true);
+                     
+   *((ossimString*)this) = result;
+
+   return *this;
+}
+
+ossimString ossimXmlString::wrapCDataIfNeeded(const ossimString& input)
+{
+   if(containsSpecialXmlCharacters(input))
+   {
+      return wrapCData(input);
+   }
+
+   return input;
+}
+ossimString ossimXmlString::wrapCData(const ossimString& input)
+{
+   return "<![CDATA[" + input + "]]>";
+}
+
diff --git a/src/ossim/dll_main/Makefile b/ossim/src/ossim/dll_main/Makefile
similarity index 100%
rename from src/ossim/dll_main/Makefile
rename to ossim/src/ossim/dll_main/Makefile
diff --git a/src/ossim/dll_main/makefile.vc b/ossim/src/ossim/dll_main/makefile.vc
similarity index 100%
rename from src/ossim/dll_main/makefile.vc
rename to ossim/src/ossim/dll_main/makefile.vc
diff --git a/src/ossim/dll_main/ossimDllMain.cpp b/ossim/src/ossim/dll_main/ossimDllMain.cpp
similarity index 100%
rename from src/ossim/dll_main/ossimDllMain.cpp
rename to ossim/src/ossim/dll_main/ossimDllMain.cpp
diff --git a/src/ossim/elevation/makefile.vc b/ossim/src/ossim/elevation/makefile.vc
similarity index 100%
rename from src/ossim/elevation/makefile.vc
rename to ossim/src/ossim/elevation/makefile.vc
diff --git a/ossim/src/ossim/elevation/ossimDtedElevationDatabase.cpp b/ossim/src/ossim/elevation/ossimDtedElevationDatabase.cpp
new file mode 100644
index 0000000..ecdef9a
--- /dev/null
+++ b/ossim/src/ossim/elevation/ossimDtedElevationDatabase.cpp
@@ -0,0 +1,260 @@
+#include <ossim/elevation/ossimDtedElevationDatabase.h>
+#include <ossim/base/ossimGeoidManager.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimDirectory.h>
+#include <ossim/base/ossimTrace.h>
+#include <sstream>
+#include <iomanip>
+#include <cstdlib> /* for abs(int) */
+#include <OpenThreads/Thread> //### TODO: for debug, remove
+
+static ossimTrace traceDebug("ossimDtedElevationDatabase:debug");
+static OpenThreads::Mutex d_mutex; // for debug
+RTTI_DEF1(ossimDtedElevationDatabase, "ossimDtedElevationDatabase", ossimElevationCellDatabase);
+
+double ossimDtedElevationDatabase::getHeightAboveMSL(const ossimGpt& gpt)
+{
+   if(!isSourceEnabled())
+      return ossim::nan();
+
+   double result = ossim::nan();
+   m_mutex.lock();
+   if(m_lastHandler.valid() && m_lastHandler->pointHasCoverage(gpt))
+   {
+      result = m_lastHandler->getHeightAboveMSL(gpt);
+   }
+   else
+   {
+      m_lastHandler = getOrCreateCellHandler(gpt);
+      if(m_lastHandler.valid())
+         result = m_lastHandler->getHeightAboveMSL(gpt);
+   }
+
+#if 0
+   d_mutex.lock();
+   cout << "THREAD ID: "<<OpenThreads::Thread::CurrentThread()->getThreadId()<<"  "
+         <<"ossimDtedElevationDatabase @ "<<(unsigned long)this<<"  m_lastHandler @ "
+         <<(unsigned long)m_lastHandler.get()<<endl; //### TODO: for debug, remove
+   d_mutex.unlock();
+#endif
+
+   m_mutex.unlock();
+   return result;
+}
+
+double ossimDtedElevationDatabase::getHeightAboveEllipsoid(const ossimGpt& gpt)
+{
+   double h = getHeightAboveMSL(gpt);
+   if(h != ossim::nan())
+   {
+      double offset = getOffsetFromEllipsoid(gpt);
+      
+      h += offset;
+   }
+   
+   return h;
+}
+bool ossimDtedElevationDatabase::open(const ossimString& connectionString)
+{
+   bool result = false;
+   ossimFilename file = ossimFilename(connectionString);
+   
+   result = openDtedDirectory(file);
+
+   return result;
+}
+
+bool ossimDtedElevationDatabase::openDtedDirectory(const ossimFilename& dir)
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimDtedElevationDatabase::open entered ...\n";
+   }
+   bool result = dir.isDir();
+   if(result)
+   {
+      ossim_uint32 count = 0;
+      ossim_uint32 maxCount = 10;
+      ossimDirectory od;
+      result = od.open(dir);
+      if(result)
+      {
+         result = false;
+         ossimFilename f;
+         // Get the first directory.
+         od.getFirst(f, ossimDirectory::OSSIM_DIR_DIRS);
+         
+         do
+         {
+            ++count;
+            // Must be a directory.
+            if (f.isDir())
+            {
+               // Discard any full path.
+               ossimFilename fileOnly = f.file();
+               
+               // Downcase it.
+              fileOnly.downcase();
+               // Must start with 'e' or 'w'.
+               bool foundCell = ( ((fileOnly.c_str()[0] == 'e') || ( fileOnly.c_str()[0] == 'w')) &&
+                         (fileOnly.size() == 4));
+               if(foundCell)
+               {
+                  ossim_uint32 maxCount2 = 10;
+                  ossim_uint32 count2 = 0;
+                  ossimDirectory d2;
+                  if(d2.open(f))
+                  {
+                     d2.getFirst(f, ossimDirectory::OSSIM_DIR_FILES);
+                     do
+                     {
+                        ossimRefPtr<ossimDtedHandler> dtedHandler = new ossimDtedHandler();
+                        if(dtedHandler->open(f, false))
+                        {
+                           if(traceDebug())
+                           {
+                              ossimNotify(ossimNotifyLevel_DEBUG) << "ossimDtedElevationDatabase::open: Found dted file " << f << "\n";
+                           }
+                           result = true;
+                           m_extension = "."+f.ext();
+                           m_connectionString = dir;
+                           m_meanSpacing = dtedHandler->getMeanSpacingMeters();
+                       }
+                        dtedHandler->close();
+                        dtedHandler = 0;
+                        ++count2;
+                     }while(!result&&d2.getNext(f)&&(count2 < maxCount2));
+                  }
+               }
+            }
+         }while(!result&&(od.getNext(f))&&(count < maxCount));
+      }
+   }
+   
+   if(result)
+   {
+      if(!m_geoid.valid())
+      {
+         m_geoid = ossimGeoidManager::instance()->findGeoidByShortName("geoid1996", false);
+      }
+      
+      if(!m_geoid.valid()&&traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << "ossimDtedElevationDatabase::open: Unable to load goeid grid 1996 for DTED database\n";
+      }
+   }
+   
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimDtedElevationDatabase::open leaving ...\n";
+   }
+   return result;
+}
+
+bool ossimDtedElevationDatabase::getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const
+{
+   bool result = false;
+   
+   m_mutex.lock();
+   ossimDtedElevationDatabase* thisPtr = const_cast<ossimDtedElevationDatabase*>(this);
+   ossimRefPtr<ossimElevCellHandler> tempHandler = thisPtr->getOrCreateCellHandler(gpt);
+   m_mutex.unlock();
+
+   if(tempHandler.valid())
+   {
+      result = tempHandler->getAccuracyInfo(info, gpt);
+   }
+  return result;
+}
+
+void ossimDtedElevationDatabase::createRelativePath(ossimFilename& file, const ossimGpt& gpt)const
+{
+   ossimFilename lon, lat;
+   int ilon = static_cast<int>(floor(gpt.lond()));
+   
+   if (ilon < 0)
+   {
+      lon = "w";
+   }
+   else
+   {
+      lon = "e";
+   }
+   
+   ilon = abs(ilon);
+   std::ostringstream  s1;
+   s1 << std::setfill('0') << std::setw(3)<< ilon;
+   
+   lon += s1.str().c_str();//ossimString::toString(ilon);
+   
+   int ilat =  static_cast<int>(floor(gpt.latd()));
+   if (ilat < 0)
+   {
+      lat += "s";
+   }
+   else
+   {
+      lat += "n";
+   }
+   
+   ilat = abs(ilat);
+   std::ostringstream  s2;
+   
+   s2<< std::setfill('0') << std::setw(2)<< ilat;
+   
+   lat += s2.str().c_str();
+   
+   file = lon.dirCat(lat+m_extension);
+}
+ossimRefPtr<ossimElevCellHandler> ossimDtedElevationDatabase::createCell(const ossimGpt& gpt)
+{
+  ossimRefPtr<ossimElevCellHandler> result = 0;
+  ossimFilename f;
+  createFullPath(f, gpt);
+  if(f.exists())
+  {
+     ossimRefPtr<ossimDtedHandler> h = new ossimDtedHandler(f, m_memoryMapCellsFlag);
+     if (!(h->getErrorStatus()))
+     {
+        result = h.get();
+     }
+  }
+
+  return result;
+}
+
+bool ossimDtedElevationDatabase::loadState(const ossimKeywordlist& kwl, const char* prefix )
+{
+   bool result = ossimElevationCellDatabase::loadState(kwl, prefix);
+   if(result)
+   {
+      if(!m_connectionString.empty()&&ossimFilename(m_connectionString).exists())
+      {
+         result = open(m_connectionString);
+      }
+      else
+      {
+         // can't open the connection because it does not exists or empty
+         result = false;
+      }
+   }
+   
+   return result;
+}
+
+bool ossimDtedElevationDatabase::saveState(ossimKeywordlist& kwl, const char* prefix)const
+{
+   bool result = ossimElevationCellDatabase::saveState(kwl, prefix);
+   
+   return result;
+}
+
+std::ostream& ossimDtedElevationDatabase::print(ostream& out) const
+{
+   ossimKeywordlist kwl;
+   saveState(kwl);
+   out << "\nossimDtedElevationDatabase @ "<< (ossim_uint64) this << "\n"
+         << kwl <<ends;
+   return out;
+}
+
diff --git a/src/ossim/elevation/ossimDtedFactory.cpp b/ossim/src/ossim/elevation/ossimDtedFactory.cpp
similarity index 100%
rename from src/ossim/elevation/ossimDtedFactory.cpp
rename to ossim/src/ossim/elevation/ossimDtedFactory.cpp
diff --git a/src/ossim/elevation/ossimDtedHandler.cpp b/ossim/src/ossim/elevation/ossimDtedHandler.cpp
similarity index 100%
rename from src/ossim/elevation/ossimDtedHandler.cpp
rename to ossim/src/ossim/elevation/ossimDtedHandler.cpp
diff --git a/ossim/src/ossim/elevation/ossimElevCellHandler.cpp b/ossim/src/ossim/elevation/ossimElevCellHandler.cpp
new file mode 100644
index 0000000..572ec8e
--- /dev/null
+++ b/ossim/src/ossim/elevation/ossimElevCellHandler.cpp
@@ -0,0 +1,103 @@
+//*****************************************************************************
+// FILE: ossimElevCellHandler.cc
+//
+// License:  See top level LICENSE.txt file.
+//
+// DESCRIPTION:
+//   Contains implementation of class ossimElevCellHandler. This is the base
+//   class for all DEM file readers including DTED. Each file shall have its
+//   corresponding ossimElevCellHandler. When more than one file is accessed,
+//   an ossimElevCombiner is used which owns multiple instances of this class.
+//
+// SOFTWARE HISTORY:
+//>
+//   19Apr2001  Oscar Kramer
+//              Initial coding.
+//<
+//*****************************************************************************
+// $Id: ossimElevCellHandler.cpp 23623 2015-11-13 18:24:28Z gpotts $
+
+#include <ossim/elevation/ossimElevCellHandler.h>
+#include <ossim/base/ossimKeyword.h>
+#include <ossim/base/ossimGpt.h>
+
+RTTI_DEF1(ossimElevCellHandler, "ossimElevCellHandler" , ossimElevSource)
+
+//***
+// Define Trace flags for use within this file:
+//***
+#include <ossim/base/ossimTrace.h>
+static ossimTrace traceExec  ("ossimElevCellHandler:exec");
+static ossimTrace traceDebug ("ossimElevCellHandler:debug");
+
+static const ossimKeyword DEM_FILENAME_KW ("dem_filename",
+                                           "Name of DEM file to load.");
+static const ossimIpt ZERO_SIZE_IPT (0, 0);
+
+ossimElevCellHandler::ossimElevCellHandler ()
+   : ossimElevSource(),
+     theFilename(),
+     theMeanSpacing(0.0),
+     theAbsLE90(0.0),
+     theAbsCE90(0.0)
+{
+}
+
+ossimElevCellHandler::ossimElevCellHandler (const ossimElevCellHandler& src)
+   : ossimElevSource(src),
+     theFilename    (src.theFilename),
+     theMeanSpacing (src.theMeanSpacing),
+     theAbsLE90     (src.theAbsLE90),
+     theAbsCE90     (src.theAbsCE90)
+{
+}
+
+ossimElevCellHandler::ossimElevCellHandler(const char* filename)
+   : ossimElevSource(),
+     theFilename(filename),
+     theMeanSpacing(0.0),
+     theAbsLE90(0.0),
+     theAbsCE90(0.0)
+{}
+
+ossimElevCellHandler::~ossimElevCellHandler()
+{}
+
+const ossimFilename& ossimElevCellHandler::getFilename() const
+{
+   return theFilename;
+}
+
+double ossimElevCellHandler::getMeanSpacingMeters() const
+{
+   return theMeanSpacing;
+}
+
+bool ossimElevCellHandler::getAccuracyInfo(ossimElevationAccuracyInfo& info,
+                                           const ossimGpt& /* gpt*/ ) const
+{
+  info.m_confidenceLevel = .9;
+  info.m_absoluteLE = theAbsLE90;
+  info.m_absoluteCE = theAbsCE90;
+
+  return info.hasValidAbsoluteError();
+}
+
+bool ossimElevCellHandler::canConnectMyInputTo(
+   ossim_int32 /* inputIndex */,
+   const ossimConnectableObject* /* object */) const
+{         
+   return false;
+}
+
+std::ostream& ossimElevCellHandler::print(ostream& out) const
+{
+   out << "\nossimElevCellHandler @ "<< (ossim_uint64) this
+         << "\n theFilename = "<< theFilename
+         << "\n theMeanSpacing = "<< theMeanSpacing
+         << "\n theAbsLE90 = "<< theAbsLE90
+         << "\n theAbsCE90 = "<< theAbsCE90;
+         //<< ossimElevSource::print(out);
+   return out;
+}
+
diff --git a/ossim/src/ossim/elevation/ossimElevCellHandlerFactory.cpp b/ossim/src/ossim/elevation/ossimElevCellHandlerFactory.cpp
new file mode 100644
index 0000000..cb29ed3
--- /dev/null
+++ b/ossim/src/ossim/elevation/ossimElevCellHandlerFactory.cpp
@@ -0,0 +1,131 @@
+//*****************************************************************************
+// FILE: ossimElevCellHandlerFactory.cc
+//
+// Copyright (C) 2001 ImageLinks, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// DESCRIPTION:
+//   Contains implementation of class ossimElevCellHandlerFactory. This is
+//   a "super-factory" owning a list of subfactories for each particular DEM
+//   format class.
+//
+//   NOT CURRENTLY UTILIZED -- USE DTED MANAGER
+//
+// LIMITATIONS:
+//   The intention of this factory is to produce individual instances of
+//   elevation cell handlers. Presently this is not supported since DTED is
+//   the only elevation source being handled. DTED is loaded via the
+//   ossimDtedManager class as a DB interface, and not by accessing individual
+//   DTED handlers.
+//
+// SOFTWARE HISTORY:
+//>
+//   01Aug2001  Oscar Kramer (okramer at imagelinks.com)
+//              Initial coding.
+//<
+//*****************************************************************************
+//  $Id: ossimElevCellHandlerFactory.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/elevation/ossimElevCellHandlerFactory.h>
+#include <ossim/base/ossimString.h>
+
+ossimElevCellHandlerFactory* ossimElevCellHandlerFactory::theInstance = 0;
+
+//*****************************************************************************
+//  STATIC METHOD: instance()
+//  
+//*****************************************************************************
+ossimElevCellHandlerFactory* ossimElevCellHandlerFactory::instance()
+{
+   if(!theInstance)
+      theInstance = new ossimElevCellHandlerFactory;
+ 
+   return (ossimElevCellHandlerFactory*) theInstance; 
+} 
+
+//*****************************************************************************
+//  PROTECTED DEFAULT CONSTRUCTOR: ossimElevCellHandlerFactory
+//  
+//*****************************************************************************
+ossimElevCellHandlerFactory::ossimElevCellHandlerFactory()
+{
+   //***
+   // Add default sub factories to this factory's registry list:
+   // NOTE: DTED handlers are managed by their own ossimDtedManager so should
+   // never be created individually via a factory. This will be the typical
+   // pattern for all but custom DEM files.
+   //***
+//   registerFactory(ossimUsgsDemCellFactory::instance());
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimElevCellHandlerFactory::create(kwl, prefix)
+//  
+//*****************************************************************************
+ossimElevCellHandler*
+ossimElevCellHandlerFactory::create(const ossimKeywordlist &keywordList,
+                                    const char *prefix) const
+{
+   std::list<ossimFactoryBase<ossimElevCellHandler>*>::const_iterator
+      elevCellFactory;
+
+   ossimElevCellHandler* product = 0;
+   
+   elevCellFactory = theRegistry.begin();
+   while((elevCellFactory != theRegistry.end()) && (!product))
+   {
+      product = (*elevCellFactory)->create(keywordList, prefix);
+      elevCellFactory++;
+   }
+
+   return product;
+}
+
+//*****************************************************************************
+//  METHOD: ossimElevCellHandlerFactory::create(proj_name)
+//  
+//*****************************************************************************
+ossimElevCellHandler*
+ossimElevCellHandlerFactory::create(const ossimString &name) const 
+{
+   std::list<ossimFactoryBase<ossimElevCellHandler>*>::const_iterator
+      elevCellFactory;
+
+   ossimElevCellHandler* product = 0;
+   
+   elevCellFactory = theRegistry.begin();
+   while((elevCellFactory != theRegistry.end()) && (!product))
+   {
+      product = (*elevCellFactory)->create(name);
+      elevCellFactory++;
+   }
+
+   return product;
+}
+
+//*****************************************************************************
+//  METHOD: ossimElevCellHandlerFactory::getList()
+//  
+//*****************************************************************************
+std::list<ossimString> ossimElevCellHandlerFactory::getList() const 
+{
+   std::list<ossimString> rtn_list;
+   std::list<ossimString> sub_list;
+   std::list<ossimFactoryBase<ossimElevCellHandler>*>::const_iterator factory_iter;
+
+   factory_iter = theRegistry.begin();
+   while(factory_iter != theRegistry.end())
+   {
+      sub_list = (*factory_iter)->getList();
+      rtn_list.merge(sub_list);
+      factory_iter++;
+   }
+
+   return rtn_list;
+}
+
+
diff --git a/ossim/src/ossim/elevation/ossimElevManager.cpp b/ossim/src/ossim/elevation/ossimElevManager.cpp
new file mode 100644
index 0000000..20a4f02
--- /dev/null
+++ b/ossim/src/ossim/elevation/ossimElevManager.cpp
@@ -0,0 +1,656 @@
+//**************************************************************************
+// FILE: ossimElevManager.cpp
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// DESCRIPTION:
+//   Contains implementation of class ossimElevManager. This object 
+//   provides a single interface for accessing multiple elevation
+//   sources. This object owns one or more elevation sources in an ordered
+//   list. When queried for an elevation at a particular point, it searches
+//   the available sources for the best result, instantiating new sources if
+//   necessary.
+//
+// SOFTWARE HISTORY:
+//>
+//   23Apr2001  Oscar Kramer
+//              Initial coding.
+//<
+//**************************************************************************
+// $Id: ossimElevManager.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/elevation/ossimElevManager.h>
+#include <ossim/base/ossimEnvironmentUtility.h>
+#include <ossim/elevation/ossimElevationCellDatabase.h>
+#include <ossim/base/ossimDirectory.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimGeoidManager.h>
+#include <ossim/elevation/ossimElevationDatabaseRegistry.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <algorithm>
+
+//ossimElevManager* ossimElevManager::m_instance = 0;
+static ossimTrace traceDebug("ossimElevManager:debug");
+
+//---
+// For std::sort of ElevationDatabaseListType
+// e.g.: std::sort( dbList.begin(), dbList.end(), dbSort );
+//---
+bool dbSort(ossimRefPtr<ossimElevationDatabase> a, ossimRefPtr<ossimElevationDatabase> b)
+{
+   bool result = false;
+   if ( a.valid() && b.valid() )
+   {
+      result = ( a->getMeanSpacingMeters() < b->getMeanSpacingMeters() );
+   }
+   return result;
+}
+
+ossimElevManager::ConnectionStringVisitor::ConnectionStringVisitor( const ossimString& value )
+   :
+   m_connectionString(value),
+   m_database(0)
+{}
+
+void ossimElevManager::ConnectionStringVisitor::visit(ossimObject* obj)
+{
+   if(!hasVisited(obj))
+   {
+      ossimElevationDatabase* databsase = dynamic_cast<ossimElevationDatabase*>(obj);
+      if(databsase)
+      {
+         if(m_connectionString == databsase->getConnectionString())
+         {
+            m_database = databsase;
+            m_stopTraversalFlag = true;
+         }
+      }
+   }
+}
+
+ossimElevManager* ossimElevManager::instance()
+{
+   static ossimElevManager inst;
+   return &inst;
+}
+
+ossimElevManager::ossimElevManager()
+   :ossimElevSource(),
+    m_maxRoundRobinSize(1),
+    m_defaultHeightAboveEllipsoid(ossim::nan()),
+    m_elevationOffset(ossim::nan()),
+    m_useGeoidIfNullFlag(false),
+    m_currentDatabaseIdx(0),
+    m_mutex()
+{
+   loadStandardElevationPaths();
+}
+
+ossimElevManager::~ossimElevManager()
+{
+   clear();
+}
+
+double ossimElevManager::getHeightAboveEllipsoid(const ossimGpt& gpt)
+{
+   double result = ossim::nan();
+
+   if (!isSourceEnabled())
+      return result;
+
+   ElevationDatabaseListType& elevDbList = getNextElevDbList();
+   for (ossim_uint32 idx = 0; (idx < elevDbList.size()) && ossim::isnan(result); ++idx)
+   {
+      result = elevDbList[idx]->getHeightAboveEllipsoid(gpt);
+   }
+
+   if (ossim::isnan(result))
+   {
+      // No elevation value was returned from the database, so try next best alternatives depending
+      // on ossim_preferences settings. Priority goes to default ellipsoid height if available:
+      if (!ossim::isnan(m_defaultHeightAboveEllipsoid))
+      {
+         result = m_defaultHeightAboveEllipsoid;
+      }
+      else if (m_useGeoidIfNullFlag)
+      {
+         result = ossimGeoidManager::instance()->offsetFromEllipsoid(gpt);
+      }
+   }
+
+   // Next, ossim_preferences may have indicated an elevation offset to use (top of trees, error
+   // bias, etc):
+   if (!ossim::isnan(m_elevationOffset) && !ossim::isnan(result))
+      result += m_elevationOffset;
+
+   return result;
+}
+
+double ossimElevManager::getHeightAboveMSL(const ossimGpt& gpt)
+{
+   double result = ossim::nan();
+
+   if (!isSourceEnabled())
+      return result;
+
+   ElevationDatabaseListType& elevDbList = getNextElevDbList();
+   for (ossim_uint32 idx = 0; (idx < elevDbList.size()) && ossim::isnan(result); ++idx)
+   {
+      result = elevDbList[idx]->getHeightAboveMSL(gpt);
+   }
+
+   if (ossim::isnan(result) && m_useGeoidIfNullFlag)
+   {
+      // No elevation value was returned from the database, so try next best alternatives depending
+      // on ossim_preferences settings. First default to height at MSL itself:
+      result = 0.0; // MSL
+      if (!ossim::isnan(m_defaultHeightAboveEllipsoid))
+      {
+         // Use the default height above ellipsoid corrected for best guess of MSL above ellipsoid
+         // (i.e., the geoid):
+         double dh = ossimGeoidManager::instance()->offsetFromEllipsoid(gpt);
+         if (!ossim::isnan(dh))
+            result = m_defaultHeightAboveEllipsoid - dh;
+      }
+   }
+
+   // ossim_preferences may have indicated an elevation offset to use (top of trees, error bias, etc)
+   if (!ossim::isnan(result) && (!ossim::isnan(m_elevationOffset)))
+      result += m_elevationOffset;
+
+   return result;
+}
+
+void ossimElevManager::loadStandardElevationPaths()
+{
+   ossimFilename userDir    = ossimEnvironmentUtility::instance()->getUserOssimSupportDir();
+   ossimFilename installDir = ossimEnvironmentUtility::instance()->getInstalledOssimSupportDir();
+   
+   userDir = userDir.dirCat("elevation");
+   installDir = installDir.dirCat("elevation");
+   
+   loadElevationPath(userDir);
+   loadElevationPath(installDir);
+   
+   ossimString paths = ossimEnvironmentUtility::instance()->getEnvironmentVariable("OSSIM_ELEVATION_PATH");
+   std::vector<ossimString> pathArray;
+   ossimString pathSeparator = ":";
+#if defined(WIN32) && !defined(CYGWIN)
+   pathSeparator = ";";
+#endif
+   
+   if(!paths.empty())
+   {
+      paths.split(pathArray, pathSeparator);
+      if(!pathArray.empty())
+      {
+         ossim_uint32 idx = 0;
+         for(idx = 0; idx < pathArray.size(); ++idx)
+         {
+            ossimFilename file(pathArray[idx]);
+            
+            if(file.exists())
+            {
+               loadElevationPath(file);
+            }
+         }
+      }
+   }
+}
+
+bool ossimElevManager::loadElevationPath(const ossimFilename& path)
+{
+   bool result = false;
+   ossimElevationDatabase* database = ossimElevationDatabaseRegistry::instance()->open(path);
+   
+   if(!database&&path.isDir())
+   {
+      ossimDirectory dir;
+      
+      if(dir.open(path))
+      {
+         ossimFilename file;
+         dir.getFirst(file, ossimDirectory::OSSIM_DIR_DIRS);
+         do
+         {
+            database = ossimElevationDatabaseRegistry::instance()->open(file);
+            if(database)
+            {
+               result = true;
+               addDatabase(database);
+            }
+         }while(dir.getNext(file));
+      }
+   }
+   else if(database)
+   {
+      result = true;
+      addDatabase(database);
+   }
+   
+   return result;
+}
+
+void ossimElevManager::getOpenCellList(std::vector<ossimFilename>& list) const
+{
+   if ( m_dbRoundRobin.size() )
+   {
+      ElevationDatabaseListType& elevDbList = m_dbRoundRobin[0];
+      for(ossim_uint32 idx = 0; idx < elevDbList.size(); ++idx)
+      {
+         // If this is a cell based database get the files:
+         ossimRefPtr<const ossimElevationCellDatabase> db =
+            dynamic_cast<const ossimElevationCellDatabase*>( elevDbList[idx].get() );
+         if ( db.valid() )
+         {
+            db->getOpenCellList(list);
+         }
+      }
+   }
+}
+
+void ossimElevManager::getCellsForBounds( const std::string& connectionString,
+                                          const ossim_float64& minLat,
+                                          const ossim_float64& minLon,
+                                          const ossim_float64& maxLat,
+                                          const ossim_float64& maxLon,
+                                          std::vector<std::string>& cells, 
+                                          ossim_uint32 maxNumberOfCells)
+{
+   ossimRefPtr<ossimElevationCellDatabase> cellDatabase = 0;
+
+   // See if the connectionString is already opened:
+   ossimString os = connectionString;
+   ossimElevManager::ConnectionStringVisitor visitor( os );
+   accept( visitor );
+   cellDatabase = dynamic_cast<ossimElevationCellDatabase*>( visitor.getElevationDatabase() );
+
+   if ( cellDatabase.valid() == false )
+   {
+      // Try to open it:
+      ossimRefPtr<ossimElevationDatabase> db =
+         ossimElevationDatabaseRegistry::instance()->open( ossimString(connectionString) );
+
+      if ( db.valid() )
+      {
+         cellDatabase = dynamic_cast<ossimElevationCellDatabase*>( db.get() );
+      }
+   }
+
+   // Lastly get the files:
+   if ( cellDatabase.valid() )
+   {
+      cellDatabase->getCellsForBounds( minLat, minLon, maxLat, maxLon, cells, maxNumberOfCells );
+   }
+   else
+   {
+      // Bummer:
+      cells.clear();
+   }
+}
+
+void ossimElevManager::getCellsForBounds( const ossim_float64& minLat,
+                                          const ossim_float64& minLon,
+                                          const ossim_float64& maxLat,
+                                          const ossim_float64& maxLon,
+                                          std::vector<std::string>& cells, 
+                                          ossim_uint32 maxNumberOfCells )
+{
+   //TODO: Presently incrementing by 0.1 deg. If an elev cell
+   // is smaller than this, it may be missed. Need to generalize to support arbitrary cell sizes.
+
+   //TODO: This method relies on the caching of open cells. If the bounds are too large too permit
+   // all cells to remain open, this method will incorrectly return a subset of all cells providing
+   // coverage.
+
+   // Ping the collection of databases for elevation values at regular intervals inside the bounds.
+   // This will autoload the best cells:
+   cells.clear();
+   const ossim_float64 DELTA_DEG = 0.1; // degree
+   ossimGpt gpt;
+   for (gpt.lat=minLat; gpt.lat<=maxLat; gpt.lat+=DELTA_DEG)
+   {
+      for (gpt.lon=minLon; gpt.lon<=maxLon; gpt.lon+=DELTA_DEG)
+      {
+         getHeightAboveMSL(gpt);
+      }
+   }
+
+   // Convert filename list to string list (why are they different)?
+   ossim_uint32 limitCells = maxNumberOfCells>0?maxNumberOfCells:static_cast<ossim_uint32>(9999999999);
+   std::vector<ossimFilename> open_cells;
+   getOpenCellList(open_cells);
+   std::vector<ossimFilename>::iterator iter = open_cells.begin();
+   while ((iter != open_cells.end()) && (cells.size() < limitCells))
+   {
+      cells.push_back(iter->string());
+      ++iter;
+   }
+}
+
+
+void ossimElevManager::getCellsForBounds( const ossimGrect& bbox,
+                                          std::vector<std::string>& cells,
+                                          ossim_uint32 maxCells)
+{
+   getCellsForBounds(bbox.lr().lat, bbox.ul().lon, bbox.ul().lat, bbox.lr().lon, cells, maxCells);
+}
+
+void ossimElevManager::clear()
+{
+   std::vector<ElevationDatabaseListType>::iterator i = m_dbRoundRobin.begin();
+   while ( i != m_dbRoundRobin.end() )
+   {
+      i->clear();
+      ++i;
+   }
+}
+
+void ossimElevManager::accept(ossimVisitor& visitor)
+{
+   std::vector<ElevationDatabaseListType>::iterator rri = m_dbRoundRobin.begin();
+   while ( rri != m_dbRoundRobin.end() )
+   {
+      ElevationDatabaseListType& elevDbList = *rri;
+
+      ossimElevManager::ElevationDatabaseListType::iterator i = elevDbList.begin();
+      while ( i != elevDbList.end() )
+      {
+         if ( (*i).valid() )
+         {
+            (*i)->accept( visitor );
+
+            if ( visitor.stopTraversal() )
+            {
+               break;
+            }
+         }
+         ++i;
+      }
+      ++rri;
+   }
+}
+
+bool ossimElevManager::getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const
+{
+   ElevationDatabaseListType& elevDbList = getNextElevDbList();
+   for(ossim_uint32 idx = 0;(idx < elevDbList.size()); ++idx)
+   {
+      if(elevDbList[idx]->getAccuracyInfo(info, gpt))
+      {
+         return true;
+      }
+   }
+
+   return false;
+}
+
+bool ossimElevManager::pointHasCoverage(const ossimGpt& gpt) const
+{
+   if ( m_dbRoundRobin.size() )
+   {
+      ElevationDatabaseListType& elevDbList = m_dbRoundRobin[0];
+      for(ossim_uint32 idx = 0;(idx < elevDbList.size()); ++idx)
+      {
+         if(elevDbList[idx]->pointHasCoverage(gpt))
+         {
+            return true;
+         }
+      }
+   }
+   return false;
+}
+
+bool ossimElevManager::saveState(ossimKeywordlist& kwl, const char* prefix) const
+{
+   kwl.add(prefix, "elevation_offset", m_elevationOffset, true);
+   kwl.add(prefix, "default_height_above_ellipsoid", m_defaultHeightAboveEllipsoid, true);
+   kwl.add(prefix, "use_geoid_if_null", m_useGeoidIfNullFlag, true);
+   kwl.add(prefix, "threads", ossimString::toString(m_maxRoundRobinSize), true);
+
+   return ossimElevSource::saveState(kwl, prefix);
+}
+
+/**
+ * Method to the load (recreate) the state of an object from a keyword
+ * list.  Return true if ok or false on error.
+ */
+bool ossimElevManager::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+      << "DEBUG ossimElevManager::loadState: Entered..."
+      << std::endl;
+   }
+   if(!ossimElevSource::loadState(kwl, prefix))
+   {
+      return false;
+   }
+   ossimString copyPrefix(prefix);
+   ossimString elevationOffset = kwl.find(copyPrefix, "elevation_offset");
+   ossimString defaultHeightAboveEllipsoid = kwl.find(copyPrefix, "default_height_above_ellipsoid");
+   ossimString useGeoidIfNull = kwl.find(copyPrefix, "use_geoid_if_null");
+   ossimString elevRndRbnSize = kwl.find(copyPrefix, "threads");
+
+   if(!elevationOffset.empty())
+   {
+      m_elevationOffset = elevationOffset.toDouble();
+   }
+   if(!defaultHeightAboveEllipsoid.empty())
+   {
+      m_defaultHeightAboveEllipsoid = defaultHeightAboveEllipsoid.toDouble();
+   }
+   if(!useGeoidIfNull.empty())
+   {
+      m_useGeoidIfNullFlag = useGeoidIfNull.toBool();
+   }
+
+   ossim_uint32 numThreads = 1;
+   if(!elevRndRbnSize.empty())
+   {
+      if (elevRndRbnSize.contains("yes") || elevRndRbnSize.contains("true"))
+         numThreads = ossim::getNumberOfThreads();
+      else if (elevRndRbnSize.contains("no") || elevRndRbnSize.contains("false"))
+         numThreads = 1;
+      else
+      {
+         numThreads = elevRndRbnSize.toUInt32();
+         numThreads = numThreads > 0 ? numThreads : 1;
+      }
+   }
+   setRoundRobinMaxSize(numThreads);
+
+   ossimString regExpression =  ossimString("^(") + copyPrefix + "elevation_source[0-9]+.)";
+   vector<ossimString> keys = kwl.getSubstringKeyList( regExpression );
+   long numberOfSources = (long)keys.size();
+   ossim_uint32 offset = (ossim_uint32)(copyPrefix+"elevation_source").size();
+   ossim_uint32 idx = 0;
+   std::vector<int> theNumberList(numberOfSources);
+   for(idx = 0; idx < theNumberList.size();++idx)
+   {
+      ossimString numberStr(keys[idx].begin() + offset,
+                            keys[idx].end());
+      theNumberList[idx] = numberStr.toInt();
+   }
+   std::sort(theNumberList.begin(), theNumberList.end());
+   
+   for(idx=0;idx < theNumberList.size();++idx)
+   {
+      ossimString newPrefix = copyPrefix;
+      newPrefix += ossimString("elevation_source");
+      newPrefix += ossimString::toString(theNumberList[idx]);
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimElevManager::loadState:"
+         << "\nLooking for key:  " << newPrefix
+         << std::endl;
+      }
+
+      //---
+      // Check for enabled key first.  Default, if not found is true for
+      // legacy compatibility.
+      //---
+      bool enabled = true;
+      std::string key = newPrefix.string();
+      key += ".";
+      key += ossimKeywordNames::ENABLED_KW;
+      std::string value = kwl.findKey( key );
+      if ( value.size() )
+      {
+         enabled = ossimString(value).toBool();
+      }
+
+      if ( enabled )
+      {
+         // first check if new way is supported
+         ossimRefPtr<ossimElevationDatabase> database =
+            ossimElevationDatabaseRegistry::instance()->createDatabase(kwl, newPrefix+".");
+         if(database.valid())
+         {
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << "DEBUG ossimElevManager::loadState:"
+                  << "\nadding elevation database:  "
+                  << database->getClassName()
+                  << ": " << database->getConnectionString()
+                  << std::endl;
+            }  
+            addDatabase(database.get());
+         }
+         else
+         {
+            // if not new elevation load verify the old way by
+            // looking at the filename
+            //
+            ossimString fileKey = newPrefix;
+            fileKey += ".";
+            fileKey += ossimKeywordNames::FILENAME_KW;
+            ossimString lookup = kwl.find(prefix, fileKey.c_str());
+            if (!lookup.empty())
+            {
+               loadElevationPath(ossimFilename(lookup));
+            } // end if lookup
+         }
+      }
+
+   } // end for loop
+
+   return true;
+}
+
+void ossimElevManager::setRoundRobinMaxSize(ossim_uint32 new_size)
+{
+   m_maxRoundRobinSize = new_size;
+
+#ifdef DYNAMICALLY_ALLOCATE_ROUND_ROBIN
+   // Resize the round robin, preserves at least the first entry if any:
+   if (new_size < m_dbRoundRobin.size())
+      m_dbRoundRobin.resize(new_size);
+#else
+   // OLK 02/2015 -- Was hoping to dynamically allocate the round robin as needed but was running
+   // into issues, so just allocating full set here (containing empty lists at this point). The
+   // heavy lifting is in addDatabase() where copies are made for each entry in the round robin. It
+   // would have been best to keep the size of the round robin to an as-needed basis to avoid
+   // unnecessary duplicate lists. However, this is only relevant for small apps (like ossim-info)
+   // where minimal number of elevation look-ups are done. TODO: Figure out why MT run core dumps
+   // when dynamically sizing m_dbRoundRobin.
+   m_dbRoundRobin.resize(new_size);
+#endif
+
+}
+
+inline ossimElevManager::ElevationDatabaseListType& ossimElevManager::getNextElevDbList() const
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock (m_mutex);
+
+   // Quickly grab the DB to be used by this thread and increment DB index to be used by next thread
+   // May need to grow the list round robin as it is dynamically set as needed):
+   if (m_currentDatabaseIdx >= m_dbRoundRobin.size())
+   {
+      ossim_uint32 index = m_dbRoundRobin.size();
+      m_dbRoundRobin.resize(index+1);
+
+      // An entry existed prior, duplicate its contents for all Db lists in the round robin. Only
+      // duplicate as needed beyond what already existed:
+      ElevationDatabaseListType::iterator iter = m_dbRoundRobin[0].begin();
+      while (iter != m_dbRoundRobin[0].end())
+      {
+         ossimRefPtr<ossimElevationDatabase> dupDb = (ossimElevationDatabase*) (*iter)->dup();
+         m_dbRoundRobin[index].push_back(dupDb);
+         ++iter;
+      }
+   }
+
+   ossim_uint32 index = m_currentDatabaseIdx++;
+   if (m_currentDatabaseIdx == m_maxRoundRobinSize)
+      m_currentDatabaseIdx = 0;
+
+   return m_dbRoundRobin[index];
+}
+
+void ossimElevManager::addDatabase(ossimElevationDatabase* database)
+{
+   if(!database)
+      return;
+
+   if (m_dbRoundRobin.empty())
+      m_dbRoundRobin.resize(1);
+
+   std::vector<ElevationDatabaseListType>::iterator rri = m_dbRoundRobin.begin();
+   if (std::find(rri->begin(), rri->end(), database) == rri->end())
+   {
+      (*rri).push_back(database);
+      ++rri;
+
+      // Populate the parallel lists in the round-robin with duplicates:
+      while ( rri != m_dbRoundRobin.end() )
+      {
+         ossimRefPtr<ossimElevationDatabase> dupDb = (ossimElevationDatabase*) database->dup();
+         (*rri).push_back(dupDb);
+         ++rri;
+      }
+   }
+}
+
+double ossimElevManager::getMeanSpacingMeters() const
+{
+   double spacing = ossim::nan();
+   if ( m_dbRoundRobin.size() )
+   {
+       ElevationDatabaseListType& elevDbList = m_dbRoundRobin[0];
+      for(ossim_uint32 idx = 0;(idx < elevDbList.size()); ++idx)
+      {
+         double d_idx = elevDbList[idx]->getMeanSpacingMeters();
+         if (ossim::isnan(spacing) || (d_idx < spacing))
+         {
+            spacing = d_idx;
+         }
+      }
+   }
+   return spacing;
+}
+
+std::ostream& ossimElevManager::print(ostream& out) const
+{
+   out << "\nossimElevManager @ "<< (ossim_uint64) this
+         << "\nm_defaultHeightAboveEllipsoid = "<<m_defaultHeightAboveEllipsoid
+         << "\nm_elevationOffset = "<<m_elevationOffset
+         << "\nm_useGeoidIfNullFlag = "<<m_useGeoidIfNullFlag
+         << "\nm_currentDatabaseIdx = "<<m_currentDatabaseIdx
+         << "\nm_dbRoundRobin.size = "<<m_dbRoundRobin.size();
+   for (ossim_uint32 i=0; i<m_dbRoundRobin.size(); ++i)
+   {
+      out<<"\nm_dbRoundRobin["<<i<<"].size = "<<m_dbRoundRobin[i].size()<<endl;
+      for (ossim_uint32 j=0; j<m_dbRoundRobin[i].size(); ++j)
+         out<<"m_dbRoundRobin["<<i<<"]["<<j<<"] = "<<m_dbRoundRobin[i][j]->print(out)<<endl;
+   }
+   cout<<"\n"<<ossimElevSource::print(cout);
+   return out;
+}
+
+
diff --git a/ossim/src/ossim/elevation/ossimElevSource.cpp b/ossim/src/ossim/elevation/ossimElevSource.cpp
new file mode 100644
index 0000000..1d7ea62
--- /dev/null
+++ b/ossim/src/ossim/elevation/ossimElevSource.cpp
@@ -0,0 +1,276 @@
+//*****************************************************************************
+// FILE: ossimElevSource.cc
+//
+// License:  See top level LICENSE.txt file.
+//
+// DESCRIPTION:
+//   Contains implementation of class ossimElevSource. This is the base class
+//   for all sources of elevation data. it maintains a single common static
+//   instance of the geoid for use by all instances of objects derived from
+//   this one. 
+//
+// SOFTWARE HISTORY:
+//>
+//   18Apr2001  Oscar Kramer
+//              Initial coding.
+//<
+//*****************************************************************************
+// $Id: ossimElevSource.cpp 23117 2015-01-29 22:33:13Z okramer $
+
+#include <ossim/elevation/ossimElevSource.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimEcefRay.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimEllipsoid.h>
+#include <ossim/base/ossimNotifyContext.h>
+
+RTTI_DEF1(ossimElevSource, "ossimElevSource" , ossimSource)
+
+//***
+// Define Trace flags for use within this file:
+//***
+#include <ossim/base/ossimTrace.h>
+static ossimTrace traceExec  ("ossimElevSource:exec");
+static ossimTrace traceDebug ("ossimElevSource:debug");
+
+
+static const char ENABLE_STATS_KW[] = "elevation.compute_statistics.enabled";
+
+ossimElevSource::ossimElevSource()
+   :
+      theMinHeightAboveMSL (0.0),
+      theMaxHeightAboveMSL (0.0),
+      theNullHeightValue   (ossim::nan()),
+      theSeaLevelValue     (OSSIM_DEFAULT_MEAN_SEA_LEVEL),
+      theGroundRect(),
+      theComputeStatsFlag(false)
+   
+{
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimElevSource::ossimElevSource: entering..."
+         << std::endl;
+   }
+   
+   // User can turn on off with a keyword.
+   const char* lookup =
+      ossimPreferences::instance()->findPreference(ENABLE_STATS_KW);
+   if (lookup)
+   {
+     theComputeStatsFlag = ossimString(lookup).toBool();
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG:"
+         << "\ntheComputeStatsFlag:  "
+         << (theComputeStatsFlag?"true":"false")
+         << endl;
+   }
+
+
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimElevSource::ossimElevSource: returning..."
+         << std::endl;
+   }
+}
+
+ossimElevSource::ossimElevSource(const ossimElevSource& src)
+   :ossimSource(src),
+    theMinHeightAboveMSL(src.theMinHeightAboveMSL),
+    theMaxHeightAboveMSL(src.theMaxHeightAboveMSL),
+    theNullHeightValue(src.theNullHeightValue),
+    theSeaLevelValue(src.theSeaLevelValue),
+    theGroundRect(src.theGroundRect),
+    theComputeStatsFlag(src.theComputeStatsFlag)
+{
+}
+
+ossimElevSource::~ossimElevSource()
+{}
+
+double ossimElevSource::getHeightAboveEllipsoid(const ossimGpt& /* argGpt */)
+{
+   ossimNotify(ossimNotifyLevel_FATAL)
+      << "FATAL ossimElevSource::getHeightAboveEllipsoid Not implemented..."
+      << std::endl;
+   return theNullHeightValue;
+}
+
+//*****************************************************************************
+//  METHOD: intersectRay()
+//  
+//  Service method for intersecting a ray with the elevation surface to
+//  arrive at a ground point. The ray is expected to originate ABOVE the
+//  surface and pointing down.
+//
+//  NOTE: the gpt argument is expected to be initialized with the desired
+//  datum, including ellipsoid, for the proper intersection point to be
+//  computed.
+//
+//  LIMITATION: This release supports only single valued solutions, i.e., it
+//  is possible a ray passing through one side of a mountain and out the other
+//  will return an intersection with the far side. Eventually, a more robust
+//  algorithm will be employed.
+//
+//*****************************************************************************
+bool ossimElevSource::intersectRay(const ossimEcefRay& ray, ossimGpt& gpt, double defaultElevValue)
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimElevSource::intersectRay: entering..." << std::endl;
+
+   static const double CONVERGENCE_THRESHOLD = 0.001; // meters
+   static const int    MAX_NUM_ITERATIONS    = 50;
+   
+   double          h_ellips; // height above ellipsoid
+   bool            intersected;
+   ossimEcefPoint  prev_intersect_pt (ray.origin());
+   ossimEcefPoint  new_intersect_pt;
+   double          distance;
+   bool            done = false;
+   int             iteration_count = 0;
+
+   if(ray.hasNans()) 
+   {
+      gpt.makeNan();
+      return false;
+   }
+   //***
+   // Set the initial guess for horizontal intersect position as the ray's
+   // origin, and establish the datum and ellipsoid:
+   //***
+   const ossimDatum*     datum     = gpt.datum();
+   const ossimEllipsoid* ellipsoid = datum->ellipsoid();
+//    double lat, lon, h;
+
+//    ellipsoid->XYZToLatLonHeight(ray.origin().x(),
+//                                 ray.origin().y(),
+//                                 ray.origin().z(),
+//                                 lat, lon, h);
+//    ossimGpt nadirGpt(lat, lon, h);
+
+//    std::cout << "nadir pt = " << nadirGpt << std::endl;
+   
+   gpt = ossimGpt(prev_intersect_pt, datum);
+
+   //
+   // Loop to iterate on ray intersection with variable elevation surface:
+   //
+   do
+   {
+      //
+      // Intersect ray with ellipsoid inflated by h_ellips:
+      //
+      h_ellips = getHeightAboveEllipsoid(gpt);
+      if ( ossim::isnan(h_ellips) ) h_ellips = defaultElevValue;
+      
+      intersected = ellipsoid->nearestIntersection(ray,
+                                                   h_ellips,
+                                                   new_intersect_pt);
+      if (!intersected)
+      {
+         //
+         // No intersection (looking over the horizon), so set ground point
+         // to NaNs:
+         //
+         gpt.makeNan();
+         done = true;
+      }
+      else
+      {
+         //
+         // Assign the ground point to the latest iteration's intersection
+         // point:
+         //
+         gpt = ossimGpt(new_intersect_pt, datum);
+         
+         //
+         // Determine if convergence achieved:
+         //
+         distance = (new_intersect_pt - prev_intersect_pt).magnitude();
+         if (distance < CONVERGENCE_THRESHOLD)
+            done = true;
+         else
+         {
+            prev_intersect_pt = new_intersect_pt;
+         }
+      }
+
+      iteration_count++;
+
+   } while ((!done) && (iteration_count < MAX_NUM_ITERATIONS));
+
+   if (iteration_count == MAX_NUM_ITERATIONS)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimElevSource::intersectRay: Max number of iterations reached solving for ground "
+                                            << "point. Result is probably inaccurate." << std::endl;
+      }
+   }
+   
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimElevSource::intersectRay: returning..." << std::endl;
+   return intersected;
+}
+
+double ossimElevSource::getMinHeightAboveMSL() const
+{
+   return theMinHeightAboveMSL;
+}
+
+double ossimElevSource::getMaxHeightAboveMSL() const
+{
+   return theMaxHeightAboveMSL;
+}
+
+double ossimElevSource::getNullHeightValue() const
+{
+   return theNullHeightValue;
+}
+
+double ossimElevSource::getSeaLevelValue() const
+{
+   return theSeaLevelValue;
+}
+
+const ossimGrect& ossimElevSource::getBoundingGndRect() const
+{
+   return theGroundRect;
+}
+
+bool ossimElevSource::canConnectMyInputTo(ossim_int32 /* inputIndex */,
+                                          const ossimConnectableObject* /* object */)const
+{
+   return false;
+}
+
+void ossimElevSource::initialize()
+{}
+
+
+bool ossimElevSource::getComputeStatisticsFlag() const
+{
+   return theComputeStatsFlag;
+}
+
+void ossimElevSource::setComputeStatisticsFlag(bool flag)
+{
+   theComputeStatsFlag = flag;
+}
+
+std::ostream& ossimElevSource::print(std::ostream& out) const
+{
+   out << "\nossimElevSource @ "<< (ossim_uint64) this
+         << "\ntheMinHeightAboveMSL = "<<theMinHeightAboveMSL
+         << "\ntheMaxHeightAboveMSL = "<<theMaxHeightAboveMSL
+         << "\ntheNullHeightValue = "<<theNullHeightValue
+         << "\ntheSeaLevelValue = "<<theSeaLevelValue
+         << "\ntheGroundRect = "<<theGroundRect
+         << ossimSource::print(out);
+   return out;
+}
+
diff --git a/ossim/src/ossim/elevation/ossimElevSourceFactory.cpp b/ossim/src/ossim/elevation/ossimElevSourceFactory.cpp
new file mode 100644
index 0000000..9149404
--- /dev/null
+++ b/ossim/src/ossim/elevation/ossimElevSourceFactory.cpp
@@ -0,0 +1,44 @@
+//----------------------------------------------------------------------------
+// FILE: ossimElevSourceFactory.cc
+//
+// Copyright (C) 2002 ImageLinks, Inc.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Class definition for ossimElevSourceFactory.
+//
+// This is the base class interface for elevation source factories.  Contains
+// pure virtual methods that all elevation source factories must implement.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimElevSourceFactory.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/elevation/ossimElevSourceFactory.h>
+
+RTTI_DEF1(ossimElevSourceFactory, "ossimElevSourceFactory" , ossimObject)
+
+ossimElevSourceFactory::ossimElevSourceFactory()
+   : theDirectory(ossimFilename::NIL)
+{
+}
+
+ossimElevSourceFactory::~ossimElevSourceFactory()
+{
+}
+
+ossimFilename ossimElevSourceFactory::getDirectory() const
+{
+   return theDirectory;
+}
+
+void ossimElevSourceFactory::setDirectory(const ossimFilename& directory)
+{
+   theDirectory = directory;
+}
+
diff --git a/ossim/src/ossim/elevation/ossimElevationCellDatabase.cpp b/ossim/src/ossim/elevation/ossimElevationCellDatabase.cpp
new file mode 100644
index 0000000..496bb33
--- /dev/null
+++ b/ossim/src/ossim/elevation/ossimElevationCellDatabase.cpp
@@ -0,0 +1,171 @@
+#include <ossim/elevation/ossimElevationCellDatabase.h>
+
+RTTI_DEF1(ossimElevationCellDatabase, "ossimElevationCellDatabase", ossimElevationDatabase);
+
+void ossimElevationCellDatabase::getOpenCellList(std::vector<ossimFilename>& list) const
+{
+   CellMap::const_iterator iter = m_cacheMap.begin();
+
+   while(iter!=m_cacheMap.end())
+   {
+      list.push_back(iter->second->m_handler->getFilename());
+      ++iter;
+   }
+
+}
+
+void ossimElevationCellDatabase::getCellsForBounds( const ossim_float64& minLat,
+                                                    const ossim_float64& minLon,
+                                                    const ossim_float64& maxLat,
+                                                    const ossim_float64& maxLon,
+                                                    std::vector<std::string>& cells,
+                                                    ossim_uint32 maxNumberOfCells )
+{
+   const ossim_float64 SEARCH_SPACING = 0.1;
+   ossimGpt gpt(0.0, 0.0, 0.0);
+   std::string f;
+   ossim_uint32 limitNumberOfCells = maxNumberOfCells>0?maxNumberOfCells:static_cast<ossim_uint32>(9999999999);
+   // Latitude loop:
+   ossim_float64 lat = minLat;
+   while ( (lat <= maxLat) &&(cells.size() < limitNumberOfCells))
+   {
+      gpt.lat = lat;
+
+      // Longitude loop:
+      ossim_float64 lon = minLon;
+      while ( (lon <= maxLon ) &&(cells.size()< limitNumberOfCells))
+      {
+         gpt.lon = lon;
+
+         ossimRefPtr<ossimElevCellHandler> h = getOrCreateCellHandler( gpt );
+         if ( h.valid() )
+         {
+            // Get the file name:
+            f = h->getFilename().string();
+            
+            if ( f.size() )
+            {
+               // See if it's already in the list, i.e. duplicate:
+               std::vector<std::string>::const_iterator i = cells.begin();
+               while ( i != cells.end() )
+               {
+                  if ( f == (*i) )
+                  {
+                     break;
+                  }
+                  ++i;
+               }
+               
+               if ( i == cells.end() )
+               {
+                  // Add it to the list:
+                  cells.push_back( f );
+               }
+            }
+         }
+
+         if ( lon < maxLon )
+         {
+            lon = ossim::min<ossim_float64>( (lon+SEARCH_SPACING), maxLon );
+         }
+         else
+         {
+            break;
+         }
+         
+      } // Matches: while ( lon <= maxLon )
+
+      if ( lat < maxLat )
+      {
+         lat = ossim::min<ossim_float64>( (lat+SEARCH_SPACING), maxLat );
+      }
+      else
+      {
+         break;
+      }
+      
+   } // Matches: while ( lat <= maxLat )
+   
+} // End: ossimElevationCellDatabase::getCellsForBounds( ... )
+
+ossimRefPtr<ossimElevCellHandler> ossimElevationCellDatabase::getOrCreateCellHandler(const ossimGpt& gpt)
+{
+  ossimRefPtr<ossimElevCellHandler> result = 0;
+  ossim_uint64 id = createId(gpt);
+  
+  {
+    OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_cacheMapMutex);
+    CellMap::iterator iter = m_cacheMap.find(id);
+    if(iter != m_cacheMap.end())
+    {
+      iter->second->updateTimestamp();
+      result = iter->second->m_handler.get();
+      
+      return result.get();
+    }
+  }
+  
+  result = createCell(gpt);
+  
+  {
+    OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_cacheMapMutex);
+    if(result.valid())
+    {
+      m_cacheMap.insert(std::make_pair(id, new CellInfo(id, result.get())));
+
+      // Check the map size and purge cells if needed.
+      if(m_cacheMap.size() > m_maxOpenCells)
+      {
+         flushCacheToMinOpenCells();
+      }
+    }
+  }
+
+  return result;
+}
+
+bool ossimElevationCellDatabase::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   ossimString minOpenCells = kwl.find(prefix, "min_open_cells");
+   ossimString maxOpenCells = kwl.find(prefix, "max_open_cells");
+   if(!minOpenCells.empty()&&
+      !maxOpenCells.empty())
+   {
+      m_minOpenCells = minOpenCells.toUInt32();
+      m_maxOpenCells = maxOpenCells.toUInt32();
+      if(m_maxOpenCells < m_minOpenCells)
+      {
+         std::swap(m_minOpenCells, m_maxOpenCells);
+      }
+   }
+   ossimString memoryMapCellsFlag = kwl.find(prefix, "memory_map_cells");
+   if(!memoryMapCellsFlag.empty())
+   {
+      m_memoryMapCellsFlag = memoryMapCellsFlag.toBool();
+   }
+   return ossimElevationDatabase::loadState(kwl, prefix);
+}
+
+bool ossimElevationCellDatabase::saveState(ossimKeywordlist& kwl, const char* prefix)const
+{
+   kwl.add(prefix, "memory_map_cells", m_memoryMapCellsFlag, true);
+   kwl.add(prefix, "min_open_cells", m_minOpenCells, true);
+   kwl.add(prefix, "max_open_cells", m_maxOpenCells, true);
+
+   if(m_geoid.valid())
+   {
+      kwl.add(prefix, "geoid.type", m_geoid->getShortName(), true);
+   }
+
+   return ossimElevationDatabase::saveState(kwl, prefix);
+}
+
+std::ostream& ossimElevationCellDatabase::print(ostream& out) const
+{
+   ossimKeywordlist kwl;
+   saveState(kwl);
+   out << "\nossimElevationCellDatabase @ "<< (ossim_uint64) this << kwl << ends;
+   return out;
+}
+
+
diff --git a/ossim/src/ossim/elevation/ossimElevationDatabase.cpp b/ossim/src/ossim/elevation/ossimElevationDatabase.cpp
new file mode 100644
index 0000000..303a9b3
--- /dev/null
+++ b/ossim/src/ossim/elevation/ossimElevationDatabase.cpp
@@ -0,0 +1,61 @@
+#include <ossim/elevation/ossimElevationDatabase.h>
+
+RTTI_DEF1(ossimElevationDatabase, "ossimElevationDatabase", ossimObject);
+
+double ossimElevationDatabase::getOffsetFromEllipsoid(const ossimGpt& gpt)
+{
+   double result = 0.0;
+   if(m_geoid.valid())
+   {
+      result = m_geoid->offsetFromEllipsoid(gpt);
+   }
+   else 
+   {
+      result = ossimGeoidManager::instance()->offsetFromEllipsoid(gpt);
+   }
+   
+   if(ossim::isnan(result))
+   {
+      result = 0.0;
+   }
+   
+   return result;
+}
+
+bool ossimElevationDatabase::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   m_connectionString = kwl.find(prefix, "connection_string");
+   ossimString geoidType = kwl.find(prefix, "geoid.type");
+   if(m_connectionString.empty())
+   {
+      // try backward compatability to a filename
+      //
+      m_connectionString = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
+   }
+   if(!geoidType.empty())
+   {
+      m_geoid = ossimGeoidManager::instance()->findGeoidByShortName(geoidType);
+   }
+   return ossimSource::loadState(kwl, prefix);
+}
+
+bool ossimElevationDatabase::saveState(ossimKeywordlist& kwl, const char* prefix)const
+{
+   kwl.add(prefix, "connection_string", m_connectionString, true);
+   
+   if(m_geoid.valid())
+   {
+      kwl.add(prefix, "geoid.type", m_geoid->getShortName(), true);
+   }
+   
+   return ossimSource::saveState(kwl, prefix);
+}
+
+std::ostream& ossimElevationDatabase::print(ostream& out) const
+{
+   ossimKeywordlist kwl;
+   saveState(kwl);
+   out << "\nossimElevationDatabase @ "<< (ossim_uint64) this
+         << kwl <<ends;
+   return out;
+}
diff --git a/ossim/src/ossim/elevation/ossimElevationDatabaseFactory.cpp b/ossim/src/ossim/elevation/ossimElevationDatabaseFactory.cpp
new file mode 100644
index 0000000..52b7800
--- /dev/null
+++ b/ossim/src/ossim/elevation/ossimElevationDatabaseFactory.cpp
@@ -0,0 +1,115 @@
+#include <ossim/elevation/ossimElevationDatabaseFactory.h>
+#include <ossim/elevation/ossimElevationDatabase.h>
+#include <ossim/elevation/ossimDtedElevationDatabase.h>
+#include <ossim/elevation/ossimSrtmElevationDatabase.h>
+#include <ossim/elevation/ossimGeneralRasterElevationDatabase.h>
+#include <ossim/elevation/ossimImageElevationDatabase.h>
+#include <ossim/base/ossimKeywordNames.h>
+
+ossimElevationDatabaseFactory* ossimElevationDatabaseFactory::m_instance = 0;
+ossimElevationDatabaseFactory* ossimElevationDatabaseFactory::instance()
+{
+   if(!m_instance)
+   {
+      m_instance = new ossimElevationDatabaseFactory();
+   }
+   
+   return m_instance;
+}
+
+ossimElevationDatabase* ossimElevationDatabaseFactory::createDatabase(const ossimString& typeName)const
+{
+   if((typeName == STATIC_TYPE_NAME(ossimDtedElevationDatabase)) ||
+      (typeName == "dted")||
+      (typeName == "dted_directory"))
+      
+   {
+      return new ossimDtedElevationDatabase();
+   }
+   else if((typeName == STATIC_TYPE_NAME(ossimSrtmElevationDatabase)) ||
+           (typeName == "srtm")||
+           (typeName == "srtm_directory"))
+      
+   {
+      return new ossimSrtmElevationDatabase();
+   }
+   else if((typeName == STATIC_TYPE_NAME(ossimGeneralRasterElevationDatabase)) ||
+           (typeName == "general_raster")||
+           (typeName == "general_raster_directory"))
+      
+   {
+      return new ossimGeneralRasterElevationDatabase();
+   }
+   else if( (typeName == "ossimImageElevationDatabase") ||
+            (typeName == "image_directory"))
+      
+   {
+      return new ossimImageElevationDatabase();
+   }
+   
+   return 0;
+}
+
+ossimElevationDatabase* ossimElevationDatabaseFactory::createDatabase(const ossimKeywordlist& kwl,
+                                                                      const char* prefix)const
+{
+   ossimRefPtr<ossimElevationDatabase> result = 0;
+   ossimString type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
+   if(!type.empty())
+   {
+      result = createDatabase(type);
+      if(result.valid())
+      {
+         if(!result->loadState(kwl, prefix))
+         {
+            result = 0;
+         }
+      }
+   }
+   
+   return result.release();
+}
+
+ossimElevationDatabase* ossimElevationDatabaseFactory::open(const ossimString& connectionString)const
+{
+   ossimRefPtr<ossimElevationDatabase> result = new ossimDtedElevationDatabase();
+   if(!result->open(connectionString))
+   {
+      result = new ossimSrtmElevationDatabase;
+      if(!result->open(connectionString))
+      {
+         result = new ossimGeneralRasterElevationDatabase;
+         if(!result->open(connectionString))
+         {
+            result = 0;
+         }
+         
+#if 0         
+         //---
+         // Commented out as the ossimImageElevationDatabase can load any type and the
+         // elevation manager is passing in elevation. This stops it opening your entire
+         // elevation directory if you happen to start you application where there is an
+         // elevation directory in there. Note you can still explicitly declare a
+         // "image_directory in your preferences.  drb - 20110509
+         //---
+         if(!result->open(connectionString))
+         {
+            result = new ossimImageElevationDatabase;
+            if(!result->open(connectionString))
+            {
+               result = 0;
+            }
+         }
+#endif
+      }
+   }
+   return result.release();
+}
+
+void ossimElevationDatabaseFactory::getTypeNameList(std::vector<ossimString>& typeList)const
+{
+   typeList.push_back(STATIC_TYPE_NAME(ossimDtedElevationDatabase));
+   typeList.push_back(STATIC_TYPE_NAME(ossimSrtmElevationDatabase));
+   typeList.push_back(STATIC_TYPE_NAME(ossimGeneralRasterElevationDatabase));
+   typeList.push_back(STATIC_TYPE_NAME(ossimImageElevationDatabase));
+}
diff --git a/ossim/src/ossim/elevation/ossimElevationDatabaseRegistry.cpp b/ossim/src/ossim/elevation/ossimElevationDatabaseRegistry.cpp
new file mode 100644
index 0000000..80ac4b7
--- /dev/null
+++ b/ossim/src/ossim/elevation/ossimElevationDatabaseRegistry.cpp
@@ -0,0 +1,54 @@
+#include <ossim/elevation/ossimElevationDatabaseRegistry.h>
+#include <ossim/elevation/ossimElevationDatabaseFactory.h>
+#include <ossim/elevation/ossimElevationDatabase.h>
+
+ossimElevationDatabaseRegistry* ossimElevationDatabaseRegistry::m_instance = 0;
+ossimElevationDatabaseRegistry* ossimElevationDatabaseRegistry::instance()
+{
+   if(!m_instance)
+   {
+      m_instance = new ossimElevationDatabaseRegistry;
+      
+      m_instance->registerFactory(ossimElevationDatabaseFactory::instance());
+   }
+   
+   return m_instance;
+}
+
+ossimElevationDatabase* ossimElevationDatabaseRegistry::createDatabase(const ossimString& typeName)const
+{
+   ossimElevationDatabase* result = 0;
+   ossim_uint32 idx = 0;
+   for(;((idx < m_factoryList.size())&&!result); ++idx)
+   {
+      result = m_factoryList[idx]->createDatabase(typeName);
+   }
+   
+   return result;
+   
+}
+ossimElevationDatabase* ossimElevationDatabaseRegistry::createDatabase(const ossimKeywordlist& kwl,
+                                                                       const char* prefix)const
+{
+   ossimElevationDatabase* result = 0;
+   ossim_uint32 idx = 0;
+   for(;((idx < m_factoryList.size())&&!result); ++idx)
+   {
+      result = m_factoryList[idx]->createDatabase(kwl, prefix);
+   }
+   
+   return result;
+}
+
+ossimElevationDatabase* ossimElevationDatabaseRegistry::open(const ossimString& connectionString)
+{
+   ossimElevationDatabase* result = 0;
+   ossim_uint32 idx = 0;
+   for(;((idx < m_factoryList.size())&&!result); ++idx)
+   {
+      result = m_factoryList[idx]->open(connectionString);
+   }
+   
+   return result;
+}
+
diff --git a/src/ossim/elevation/ossimGeneralRasterElevFactory.cpp b/ossim/src/ossim/elevation/ossimGeneralRasterElevFactory.cpp
similarity index 100%
rename from src/ossim/elevation/ossimGeneralRasterElevFactory.cpp
rename to ossim/src/ossim/elevation/ossimGeneralRasterElevFactory.cpp
diff --git a/ossim/src/ossim/elevation/ossimGeneralRasterElevHandler.cpp b/ossim/src/ossim/elevation/ossimGeneralRasterElevHandler.cpp
new file mode 100644
index 0000000..1a5bf6f
--- /dev/null
+++ b/ossim/src/ossim/elevation/ossimGeneralRasterElevHandler.cpp
@@ -0,0 +1,725 @@
+#include <ossim/elevation/ossimGeneralRasterElevHandler.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimStreamFactoryRegistry.h>
+#include <ossim/base/ossimDirectory.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimUnitTypeLut.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimImageViewTransform.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimGpt.h>
+#include <OpenThreads/ScopedLock>
+
+RTTI_DEF1(ossimGeneralRasterElevHandler, "ossimGeneralRasterElevHandler", ossimElevCellHandler);
+
+ossimGeneralRasterElevHandler::ossimGeneralRasterElevHandler(const ossimFilename& file)
+   :ossimElevCellHandler(file.c_str()),
+    m_streamOpen(false)
+{
+   if(!open(file))
+   {
+      setErrorStatus();
+   }
+}
+
+ossimGeneralRasterElevHandler::ossimGeneralRasterElevHandler(const ossimGeneralRasterElevHandler& src)
+   :ossimElevCellHandler(src),
+    theGeneralRasterInfo(src.theGeneralRasterInfo),
+    m_streamOpen(false), // ????
+    m_memoryMap(src.m_memoryMap)
+{
+}
+
+ossimGeneralRasterElevHandler::ossimGeneralRasterElevHandler(const ossimGeneralRasterElevHandler::GeneralRasterInfo& generalRasterInfo)
+   : m_streamOpen(false)
+{
+
+   close();
+   theGeneralRasterInfo = generalRasterInfo;
+   if(!open(theGeneralRasterInfo.theFilename))
+   {
+      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+   }
+}
+
+ossimGeneralRasterElevHandler::~ossimGeneralRasterElevHandler()
+{
+}
+
+double ossimGeneralRasterElevHandler::getHeightAboveMSL(const ossimGpt& gpt)
+{
+   ossim_float64 result = theGeneralRasterInfo.theNullHeightValue;
+
+   if(m_memoryMap.empty())
+   {
+      switch(theGeneralRasterInfo.theScalarType)
+      {
+         case OSSIM_SINT8:
+         {
+            result = getHeightAboveMSLFileTemplate((ossim_sint8)0,
+                                                   theGeneralRasterInfo,
+                                                   gpt);
+            break;
+         }
+         case OSSIM_UINT8:
+         {
+            result = getHeightAboveMSLFileTemplate((ossim_uint8)0,
+                                                   theGeneralRasterInfo,
+                                                   gpt);
+            break;
+         }
+         case OSSIM_SINT16:
+         {
+            result = getHeightAboveMSLFileTemplate((ossim_sint16)0,
+                                                   theGeneralRasterInfo,
+                                                   gpt);
+            break;
+         }
+         case OSSIM_UINT16:
+         {
+            result = getHeightAboveMSLFileTemplate((ossim_uint16)0,
+                                                   theGeneralRasterInfo,
+                                                   gpt);
+            break;
+         }
+         case OSSIM_SINT32:
+         {
+            result = getHeightAboveMSLFileTemplate((ossim_sint32)0,
+                                                   theGeneralRasterInfo,
+                                                   gpt);
+            break;
+         }
+         case OSSIM_UINT32:
+         {
+            result = getHeightAboveMSLFileTemplate((ossim_uint32)0,
+                                                   theGeneralRasterInfo,
+                                                   gpt);
+            break;
+         }
+         case OSSIM_FLOAT32:
+         {
+            result =  getHeightAboveMSLFileTemplate((ossim_float32)0,
+                                                    theGeneralRasterInfo,
+                                                    gpt);
+            break;
+         }
+         case OSSIM_FLOAT64:
+         {
+            result = getHeightAboveMSLFileTemplate((ossim_float64)0,
+                                                   theGeneralRasterInfo,
+                                                   gpt);
+            break;
+         }
+         default:
+         {
+            break;
+         }
+      }
+   }
+   else
+   {
+      switch(theGeneralRasterInfo.theScalarType)
+      {
+         case OSSIM_SINT8:
+         {
+            result = getHeightAboveMSLMemoryTemplate((ossim_sint8)0,
+                                                   theGeneralRasterInfo,
+                                                   gpt);
+            break;
+         }
+         case OSSIM_UINT8:
+         {
+            result = getHeightAboveMSLMemoryTemplate((ossim_uint8)0,
+                                                   theGeneralRasterInfo,
+                                                   gpt);
+            break;
+         }
+         case OSSIM_SINT16:
+         {
+            result = getHeightAboveMSLMemoryTemplate((ossim_sint16)0,
+                                                   theGeneralRasterInfo,
+                                                   gpt);
+            break;
+         }
+         case OSSIM_UINT16:
+         {
+            result = getHeightAboveMSLMemoryTemplate((ossim_uint16)0,
+                                                   theGeneralRasterInfo,
+                                                   gpt);
+            break;
+         }
+         case OSSIM_SINT32:
+         {
+            result = getHeightAboveMSLMemoryTemplate((ossim_sint32)0,
+                                                   theGeneralRasterInfo,
+                                                   gpt);
+            break;
+         }
+         case OSSIM_UINT32:
+         {
+            result = getHeightAboveMSLMemoryTemplate((ossim_uint32)0,
+                                                   theGeneralRasterInfo,
+                                                   gpt);
+            break;
+         }
+         case OSSIM_FLOAT32:
+         {
+            result =  getHeightAboveMSLMemoryTemplate((ossim_float32)0,
+                                                    theGeneralRasterInfo,
+                                                    gpt);
+            break;
+         }
+         case OSSIM_FLOAT64:
+         {
+            result = getHeightAboveMSLMemoryTemplate((ossim_float64)0,
+                                                   theGeneralRasterInfo,
+                                                   gpt);
+            break;
+         }
+         default:
+         {
+            break;
+         }
+      }
+      
+   }
+
+   return result;
+}
+
+ossimIpt ossimGeneralRasterElevHandler::getSizeOfElevCell() const
+{
+   return ossimIpt(theGeneralRasterInfo.theWidth, theGeneralRasterInfo.theHeight);
+}
+   
+double ossimGeneralRasterElevHandler::getPostValue(const ossimIpt& /* gridPt */) const
+{
+   ossimNotify(ossimNotifyLevel_WARN)
+      << "ossimGeneralRasterElevHandler::getPostValue(const ossimIpt& gridPt):  NEED TO IMPLEMENT TO NEW INTERFACE\n";
+   return ossim::nan();
+}
+
+bool ossimGeneralRasterElevHandler::isOpen()const
+{
+   if(!m_memoryMap.empty()) return true;
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_inputStreamMutex);
+
+   //---
+   // Change to use flag as is_open is non-const on some old compilers.
+   return m_streamOpen;
+   // return (m_inputStream.is_open());
+}
+
+bool ossimGeneralRasterElevHandler::open(const ossimFilename& file, bool memoryMapFlag)
+{
+   close();
+   if(!setFilename(file)) return false;
+   m_inputStream.clear();
+   m_inputStream.open(theGeneralRasterInfo.theFilename.c_str(), ios::in | ios::binary);
+
+   if(memoryMapFlag)
+   {
+      if(!m_inputStream.bad())
+      {
+         m_memoryMap.resize(theGeneralRasterInfo.theFilename.fileSize());
+         if(!m_memoryMap.empty())
+         {
+           m_inputStream.read((char*)(&m_memoryMap.front()), (streamsize)m_memoryMap.size());
+         }
+      }
+      m_inputStream.close();
+   }
+
+   // Capture the stream state for non-const is_open on old compiler.
+   m_streamOpen = m_inputStream.is_open();
+   
+   return m_streamOpen;
+}
+
+/**
+ * Closes the stream to the file.
+ */
+void ossimGeneralRasterElevHandler::close()
+{
+   m_inputStream.close();
+   m_memoryMap.clear();
+   m_streamOpen = false;
+}
+
+bool ossimGeneralRasterElevHandler::setFilename(const ossimFilename& file)
+{
+   if(file.trim() == "")
+   {
+      return false;
+   }
+   theFilename = file;
+   ossimFilename hdrFile  = file;
+   ossimFilename geomFile = file;
+   theGeneralRasterInfo.theFilename = file;
+   theGeneralRasterInfo.theWidth = 0;
+   theGeneralRasterInfo.theHeight = 0;
+   theNullHeightValue = ossim::nan();
+   hdrFile = hdrFile.setExtension("omd");
+   geomFile = geomFile.setExtension("geom");
+
+   if(!hdrFile.exists()||
+      !geomFile.exists())
+   {
+      return false;
+   }
+   ossimKeywordlist kwl(hdrFile);
+   if (kwl.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
+   {
+      return false;
+   }
+   
+   kwl.add(ossimKeywordNames::FILENAME_KW, file.c_str(), true);
+   ossimGeneralRasterInfo generalInfo;
+   
+   if(!generalInfo.loadState(kwl))
+   {
+      return false;
+   }
+   if(generalInfo.numberOfBands() != 1)
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "ossimGeneralRasterElevHandler::initializeInfo WARNING:The number of bands are not specified in the header file" << std::endl;
+      return false;
+   }
+
+   kwl.clear();
+   if(kwl.addFile(geomFile))
+   {
+      theGeneralRasterInfo.theNullHeightValue = generalInfo.getImageMetaData().getNullPix(0);
+      theGeneralRasterInfo.theImageRect       = generalInfo.imageRect();
+      theGeneralRasterInfo.theUl              = theGeneralRasterInfo.theImageRect.ul();
+      theGeneralRasterInfo.theLr              = theGeneralRasterInfo.theImageRect.lr();
+      theGeneralRasterInfo.theWidth           = theGeneralRasterInfo.theImageRect.width();
+      theGeneralRasterInfo.theHeight          = theGeneralRasterInfo.theImageRect.height();
+      theGeneralRasterInfo.theImageRect       = generalInfo.imageRect();
+      theGeneralRasterInfo.theByteOrder       = generalInfo.getImageDataByteOrder();
+      theGeneralRasterInfo.theScalarType      = generalInfo.getImageMetaData().getScalarType();
+      theGeneralRasterInfo.theBytesPerRawLine = generalInfo.bytesPerRawLine();
+
+      //add  by simbla
+
+      // ---
+      // Try to determine if there is a prefix like "image0." or not.
+      // ---
+      std::string prefix = "";
+      if ( kwl.find("image0.type") )
+      {
+         prefix = "image0.";
+      }
+      
+      theGeneralRasterInfo.theGeometry = new ossimImageGeometry;
+      if(!theGeneralRasterInfo.theGeometry->loadState( kwl, prefix.c_str() ))
+      {
+         theGeneralRasterInfo.theGeometry = 0;
+      }
+      
+      if(!theGeneralRasterInfo.theGeometry.valid())
+      {
+         return false;
+      }
+      ossimGpt defaultDatum;
+      ossimGpt ulGpt;
+      ossimGpt urGpt;
+      ossimGpt lrGpt;
+      ossimGpt llGpt;
+      theGeneralRasterInfo.theDatum = defaultDatum.datum();
+      theGeneralRasterInfo.theGeometry->localToWorld(theGeneralRasterInfo.theImageRect.ul(), ulGpt);
+      theGeneralRasterInfo.theGeometry->localToWorld(theGeneralRasterInfo.theImageRect.ur(), urGpt);
+      theGeneralRasterInfo.theGeometry->localToWorld(theGeneralRasterInfo.theImageRect.lr(), lrGpt);
+      theGeneralRasterInfo.theGeometry->localToWorld(theGeneralRasterInfo.theImageRect.ll(), llGpt);
+      
+      ulGpt.changeDatum(theGeneralRasterInfo.theDatum);
+      urGpt.changeDatum(theGeneralRasterInfo.theDatum);
+      lrGpt.changeDatum(theGeneralRasterInfo.theDatum);
+      llGpt.changeDatum(theGeneralRasterInfo.theDatum);
+      theMeanSpacing = theGeneralRasterInfo.theGeometry->getMetersPerPixel().y;
+      theGroundRect = ossimGrect(ulGpt, urGpt, lrGpt, llGpt);
+      theGeneralRasterInfo.theWgs84GroundRect = ossimDrect(ulGpt, urGpt, lrGpt, llGpt, OSSIM_RIGHT_HANDED);
+      theNullHeightValue = theGeneralRasterInfo.theNullHeightValue;
+   }
+   else
+   {
+      return false;
+   }
+   
+   return true;
+}
+
+#if 0
+void ossimGeneralRasterElevHandler::initializeList(const ossimFilename& file)
+{
+   close();
+   theFilename = file;
+   theBoundingRectInfoList.clear();
+   if(theFilename.exists())
+   {
+      if(theFilename.isDir())
+      {
+         ossimDirectory dir(theFilename);
+
+         ossimFilename file;
+         ossim_uint32 maxCount = 10;
+         ossim_uint32 count = 0;
+         bool foundOne = false;
+         if(dir.getFirst(file))
+         {
+            do
+            {
+               ++count;
+               ossimString ext = file.ext();
+               ext = ext.downcase();
+               if(ext == "ras")
+               {
+                  ossimGeneralRasterElevHandler::BoundingRectInfo info;
+                  if(initializeInfo(info, file))
+                  {
+                     foundOne = true;
+                     addInfo(info);
+                  }
+               }
+            } while(dir.getNext(file) &&
+                   (!foundOne &&
+                    (count < maxCount)));
+         }
+#if 0
+         std::vector<ossimFilename> result;
+         
+         dir.findAllFilesThatMatch(result,
+                                   ".*\\.ras");
+      
+         if(result.size())
+         {
+            ossimGeneralRasterElevHandler::BoundingRectInfo info;
+            ossim_uint32 idx = 0;
+            for(idx = 0; idx < result.size(); ++idx)
+            {
+               if(initializeInfo(info, ossimFilename(result[idx])))
+               {
+                  addInfo(info);
+               }
+            }
+         }
+#endif
+         if(theBoundingRectInfoList.size()>0)
+         {
+            theNullHeightValue = theBoundingRectInfoList[0].theNullHeightValue;
+         }
+      }
+      else
+      {
+         ossimGeneralRasterElevHandler::BoundingRectInfo info;
+         if(initializeInfo(info, theFilename))
+         {
+            addInfo(info);
+         }
+      }
+   }
+}
+#endif
+template <class T>
+double ossimGeneralRasterElevHandler::getHeightAboveMSLFileTemplate(
+   T /* dummy */,
+   const ossimGeneralRasterElevHandler::GeneralRasterInfo& info,
+   const ossimGpt& gpt)
+{
+   ossimEndian endian;
+   
+   ossimGpt shiftedPoint = gpt;
+   shiftedPoint.changeDatum(info.theDatum);
+   if(!info.theWgs84GroundRect.pointWithin(shiftedPoint))
+   {
+      return ossim::nan();
+   }
+   
+   ossimDpt pt;
+   info.theGeometry->worldToLocal(shiftedPoint,pt);
+   double xi = pt.x;
+   double yi = pt.y;
+   
+   xi -= info.theUl.x;
+   yi -= info.theUl.y;
+   
+   //modifed by simbla  2008 7.17
+   //double xi = (shiftedPoint.lond() - info.theUlGpt.lond())/info.thePostSpacing.x;
+   //double yi = (info.theUlGpt.latd() -
+   //             shiftedPoint.latd())/info.thePostSpacing.y;
+   
+   
+   ossim_sint64 x0 = static_cast<ossim_sint64>(xi);
+   ossim_sint64 y0 = static_cast<ossim_sint64>(yi);
+   
+   double xt0 = xi - x0;
+   double yt0 = yi - y0;
+   double xt1 = 1-xt0;
+   double yt1 = 1-yt0;
+   
+   double w00 = xt1*yt1;
+   double w01 = xt0*yt1;
+   double w10 = xt1*yt0;
+   double w11 = xt0*yt0;
+   
+   
+   if ( xi < 0 || yi < 0 ||
+       x0 > (info.theWidth  - 1.0) ||
+       y0 > (info.theHeight  - 1.0) )
+   {
+      return ossim::nan();
+   }
+   
+   if(x0 == (info.theWidth  - 1.0))
+   {
+      --x0;
+   }
+   if(y0 == (info.theHeight  - 1.0))
+   {
+      --y0;
+   }
+   T p[4];
+   
+   ossim_uint64 bytesPerLine  = info.theBytesPerRawLine;
+   
+   std::streampos offset = y0*bytesPerLine + x0*sizeof(T);
+   
+   {
+      OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_inputStreamMutex);
+      if(m_inputStream.fail())
+      {
+         m_inputStream.clear();
+      }
+      m_inputStream.seekg(offset, ios::beg);
+      m_inputStream.read((char*)p, sizeof(T));
+      
+      // Get the second post.
+      m_inputStream.read((char*)(p+1), sizeof(T));
+      
+      //   offset += (bytesPerLine-2*sizeof(T));
+      
+      m_inputStream.ignore(bytesPerLine-2*sizeof(T));
+      // Get the third post.
+      m_inputStream.read((char*)(p+2), sizeof(T));
+      
+      // Get the fourth post.
+      m_inputStream.read((char*)(p+3), sizeof(T));
+      
+      if(m_inputStream.fail())
+      {
+         m_inputStream.clear();
+         return ossim::nan();
+      }
+   }
+   if(endian.getSystemEndianType() != info.theByteOrder)
+   {
+      endian.swap((T*)p, (ossim_uint32)4);
+   }
+   double p00 = p[0];
+   double p01 = p[1];
+   double p10 = p[2];
+   double p11 = p[3];
+   
+   if (p00 == info.theNullHeightValue)
+      w00 = 0.0;
+   if (p01 == info.theNullHeightValue)
+      w01 = 0.0;
+   if (p10 == info.theNullHeightValue)
+      w10 = 0.0;
+   if (p11 == info.theNullHeightValue)
+      w11 = 0.0;
+   
+#if 0 /* Serious debug only... */
+   cout << "\np00:  " << p00
+   << "\np01:  " << p01
+   << "\np10:  " << p10
+   << "\np11:  " << p11
+   << "\nw00:  " << w00
+   << "\nw01:  " << w01
+   << "\nw10:  " << w10
+   << "\nw11:  " << w11
+   << endl;
+#endif
+   
+   double sum_weights = w00 + w01 + w10 + w11;
+   
+   if (sum_weights)
+   {
+      return (p00*w00 + p01*w01 + p10*w10 + p11*w11) / sum_weights;
+   }
+   
+   return ossim::nan();
+}
+
+template <class T>
+double ossimGeneralRasterElevHandler::getHeightAboveMSLMemoryTemplate(
+   T /* dummy */,
+   const ossimGeneralRasterElevHandler::GeneralRasterInfo& info,
+   const ossimGpt& gpt)
+{
+   ossimEndian endian;
+   
+   ossimGpt shiftedPoint = gpt;
+   shiftedPoint.changeDatum(info.theDatum);
+   if(!info.theWgs84GroundRect.pointWithin(shiftedPoint))
+   {
+      return ossim::nan();
+   }
+   
+   ossimDpt pt;
+   info.theGeometry->worldToLocal(shiftedPoint,pt);
+   double xi = pt.x;
+   double yi = pt.y;
+   
+   xi -= info.theUl.x;
+   yi -= info.theUl.y;
+   
+   //modifed by simbla  2008 7.17
+   //double xi = (shiftedPoint.lond() - info.theUlGpt.lond())/info.thePostSpacing.x;
+   //double yi = (info.theUlGpt.latd() -
+   //             shiftedPoint.latd())/info.thePostSpacing.y;
+   
+   
+   ossim_sint64 x0 = static_cast<ossim_sint64>(xi);
+   ossim_sint64 y0 = static_cast<ossim_sint64>(yi);
+   
+   double xt0 = xi - x0;
+   double yt0 = yi - y0;
+   double xt1 = 1-xt0;
+   double yt1 = 1-yt0;
+   
+   double w00 = xt1*yt1;
+   double w01 = xt0*yt1;
+   double w10 = xt1*yt0;
+   double w11 = xt0*yt0;
+   if ( xi < 0 || yi < 0 ||
+       x0 > (info.theWidth  - 1.0) ||
+       y0 > (info.theHeight  - 1.0) )
+   {
+      return ossim::nan();
+   }
+   
+   if(x0 == (info.theWidth  - 1.0))
+   {
+      --x0;
+   }
+   if(y0 == (info.theHeight  - 1.0))
+   {
+      --y0;
+   }
+   ossim_uint64 bytesPerLine  = info.theBytesPerRawLine;
+   
+   ossim_uint64 offset = y0*bytesPerLine + x0*sizeof(T);
+   ossim_uint64 offset2 = offset+bytesPerLine;
+   
+   T v00 = *(reinterpret_cast<T*> (&m_memoryMap[offset]));
+   T v01 = *(reinterpret_cast<T*> (&m_memoryMap[offset + sizeof(T)]));
+   T v10 = *(reinterpret_cast<T*> (&m_memoryMap[offset2]));
+   T v11 = *(reinterpret_cast<T*> (&m_memoryMap[offset2 + sizeof(T)]));
+   if(endian.getSystemEndianType() != info.theByteOrder)
+   {
+      endian.swap(v00);
+      endian.swap(v01);
+      endian.swap(v10);
+      endian.swap(v11);
+   }
+   double p00 = v00;
+   double p01 = v01;
+   double p10 = v10;
+   double p11 = v11;
+   
+   if (p00 == info.theNullHeightValue)
+      w00 = 0.0;
+   if (p01 == info.theNullHeightValue)
+      w01 = 0.0;
+   if (p10 == info.theNullHeightValue)
+      w10 = 0.0;
+   if (p11 == info.theNullHeightValue)
+      w11 = 0.0;
+   
+#if 0 /* Serious debug only... */
+   cout << "\np00:  " << p00
+   << "\np01:  " << p01
+   << "\np10:  " << p10
+   << "\np11:  " << p11
+   << "\nw00:  " << w00
+   << "\nw01:  " << w01
+   << "\nw10:  " << w10
+   << "\nw11:  " << w11
+   << endl;
+#endif
+   
+   double sum_weights = w00 + w01 + w10 + w11;
+   
+   if (sum_weights)
+   {
+      return (p00*w00 + p01*w01 + p10*w10 + p11*w11) / sum_weights;
+   }
+   
+   return ossim::nan();
+}
+#if 0
+void ossimGeneralRasterElevHandler::addInfo(const ossimGeneralRasterElevHandler::BoundingRectInfo& info)
+{
+   if(theBoundingRectInfoList.empty())
+   {
+      theBoundingRectInfoList.push_back(info);
+      theNullHeightValue = info.theNullHeightValue;
+      theBoundingRect = info.theBounds;
+   }
+   else
+   {
+      BoundingRectListType::iterator iter = theBoundingRectInfoList.begin();
+      bool found = false;
+//       if(theNullHeightValue ==  info.theNullHeightValue)
+//       {
+      while((iter!=theBoundingRectInfoList.end())&&
+            (!found))
+      {
+         if(info.thePostSpacing.length() <= iter->thePostSpacing.length())
+         {
+            theBoundingRectInfoList.insert(iter, info);
+            theBoundingRect = theBoundingRect.combine(info.theBounds);
+            found = true;
+         }
+         else
+         {
+            ++iter;
+         }
+      }
+      if(!found)
+      {
+         theBoundingRectInfoList.push_back(info);
+      }
+   }
+}
+#endif
+ossimDrect ossimGeneralRasterElevHandler::getBoundingRect()const
+{
+   return theGeneralRasterInfo.theWgs84GroundRect;
+}
+
+bool ossimGeneralRasterElevHandler::pointHasCoverage(const ossimGpt& gpt) const
+{
+   ossimDpt pt = gpt;
+
+   return theGeneralRasterInfo.theWgs84GroundRect.pointWithin(pt);
+//    BoundingRectListType::const_iterator i = theBoundingRectInfoList.begin();
+//    while (i != theBoundingRectInfoList.end())
+//    {
+//       if ((*i).theBounds.pointWithin(pt))
+//       {
+//          return true;
+//       }
+//       ++i;
+//    }
+//    return false;
+}
+const ossimGeneralRasterElevHandler::GeneralRasterInfo& ossimGeneralRasterElevHandler::generalRasterInfo()const
+{
+   return theGeneralRasterInfo;
+}
diff --git a/ossim/src/ossim/elevation/ossimGeneralRasterElevationDatabase.cpp b/ossim/src/ossim/elevation/ossimGeneralRasterElevationDatabase.cpp
new file mode 100644
index 0000000..30f0412
--- /dev/null
+++ b/ossim/src/ossim/elevation/ossimGeneralRasterElevationDatabase.cpp
@@ -0,0 +1,156 @@
+#include <ossim/elevation/ossimGeneralRasterElevationDatabase.h>
+#include <ossim/base/ossimGeoidManager.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimDirectory.h>
+#include <sstream>
+#include <iomanip>
+
+RTTI_DEF1(ossimGeneralRasterElevationDatabase, "ossimGeneralRasterElevationDatabase", ossimElevationCellDatabase);
+
+double ossimGeneralRasterElevationDatabase::getHeightAboveMSL(const ossimGpt& gpt)
+{
+   if(!isSourceEnabled()) return ossim::nan();
+   ossimRefPtr<ossimElevCellHandler> handler = getOrCreateCellHandler(gpt);
+
+   if(handler.valid())
+   {
+      return handler->getHeightAboveMSL(gpt); // still need to shift
+   }
+   return ossim::nan();
+}
+double ossimGeneralRasterElevationDatabase::getHeightAboveEllipsoid(const ossimGpt& gpt)
+{
+   double h = getHeightAboveMSL(gpt);
+   if(h != ossim::nan())
+   {
+      h += getOffsetFromEllipsoid(gpt);
+   }
+   
+   return h;
+}
+bool ossimGeneralRasterElevationDatabase::open(const ossimString& connectionString)
+{
+   bool result = false;
+   ossimFilename file = ossimFilename(connectionString);
+   m_connectionString = connectionString;
+   result = openGeneralRasterDirectory(file);
+   
+   return result;
+}
+
+bool ossimGeneralRasterElevationDatabase::openGeneralRasterDirectory(const ossimFilename& dir)
+{
+   m_cellHandler = new ossimGeneralRasterElevHandler;
+   bool foundOne = false;
+   
+   if(dir.exists())
+   {
+      if(dir.isDir())
+      {
+         ossimDirectory d(dir);
+         
+         ossimFilename file;
+         ossim_uint32 maxCount = 10; // search at least the first 10 files to see if there are any here
+         ossim_uint32 count = 0;
+         if(d.getFirst(file))
+         {
+            do
+            {
+               ++count;
+               ossimString ext = file.ext();
+               ext = ext.downcase();
+               if(ext == "ras")
+               {
+                  if(m_cellHandler->open(file, m_memoryMapCellsFlag))
+                  {
+                     m_meanSpacing = m_cellHandler->getMeanSpacingMeters();
+                     foundOne = true;
+                  }
+               }
+            } while(d.getNext(file) &&
+                    (foundOne ||
+                     (!foundOne && (count < maxCount))));
+         }
+      }
+   }  
+   
+   if(!foundOne)
+   {
+      m_cellHandler = 0;
+   }
+   
+   return m_cellHandler.valid();
+}
+
+bool ossimGeneralRasterElevationDatabase::pointHasCoverage(const ossimGpt& gpt) const
+{
+   bool result = false;
+   
+   if(m_cellHandler.valid())
+   {
+      result = m_cellHandler->pointHasCoverage(gpt);
+   }
+   
+   return result;
+}
+
+void ossimGeneralRasterElevationDatabase::createRelativePath(
+   ossimFilename& /* file */, const ossimGpt& /* gpt */)const
+{
+}
+
+ossimRefPtr<ossimElevCellHandler> ossimGeneralRasterElevationDatabase::createHandler(const ossimGpt&  gpt )
+{
+   if(pointHasCoverage(gpt))
+   {
+      return m_cellHandler.get();
+   }
+   return 0;
+}
+
+ossimRefPtr<ossimElevCellHandler> ossimGeneralRasterElevationDatabase::createCell(const ossimGpt& gpt)
+{
+   if(pointHasCoverage(gpt))
+   {
+      return m_cellHandler.get();
+   }
+   return 0;
+}
+
+
+bool ossimGeneralRasterElevationDatabase::loadState(const ossimKeywordlist& kwl, const char* prefix )
+{
+   bool result = ossimElevationCellDatabase::loadState(kwl, prefix);
+   if(result)
+   {
+      if(!m_connectionString.empty()&&ossimFilename(m_connectionString).exists())
+      {
+         result = open(m_connectionString);
+      }
+      else
+      {
+         // can't open the connection because it does not exists or empty
+         result = false;
+      }
+   }
+   
+   return result;
+}
+
+bool ossimGeneralRasterElevationDatabase::saveState(ossimKeywordlist& kwl, const char* prefix)const
+{
+   bool result = ossimElevationCellDatabase::saveState(kwl, prefix);
+   
+   return result;
+}
+
+
+std::ostream& ossimGeneralRasterElevationDatabase::print(ostream& out) const
+{
+   ossimKeywordlist kwl;
+   saveState(kwl);
+   out << "\nossimGeneralRasterElevationDatabase @ "<< (ossim_uint64) this << "\n"
+         << kwl <<ends;
+   return out;
+}
+
diff --git a/src/ossim/elevation/ossimHgtRef.cpp b/ossim/src/ossim/elevation/ossimHgtRef.cpp
similarity index 100%
rename from src/ossim/elevation/ossimHgtRef.cpp
rename to ossim/src/ossim/elevation/ossimHgtRef.cpp
diff --git a/ossim/src/ossim/elevation/ossimImageElevationDatabase.cpp b/ossim/src/ossim/elevation/ossimImageElevationDatabase.cpp
new file mode 100644
index 0000000..c201c7b
--- /dev/null
+++ b/ossim/src/ossim/elevation/ossimImageElevationDatabase.cpp
@@ -0,0 +1,468 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimImageElevationDatabase.cpp
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:  See class desciption in header file.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/elevation/ossimImageElevationDatabase.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/elevation/ossimImageElevationHandler.h>
+#include <ossim/util/ossimFileWalker.h>
+#include <cmath>
+
+static ossimTrace traceDebug(ossimString("ossimImageElevationDatabase:debug"));
+
+RTTI_DEF1(ossimImageElevationDatabase, "ossimImageElevationDatabase", ossimElevationCellDatabase);
+
+ossimImageElevationDatabase::ossimImageElevationDatabase()
+   :
+   ossimElevationCellDatabase(),
+   ossimFileProcessorInterface(),
+   m_entryMap(),
+   m_lastMapKey(0),
+   m_lastAccessedId(0)
+{
+}
+
+// Protected destructor as this is derived from ossimRefenced.
+ossimImageElevationDatabase::~ossimImageElevationDatabase()
+{
+}
+
+bool ossimImageElevationDatabase::open(const ossimString& connectionString)
+{
+   // return false; // tmp drb...
+   
+   static const char M[] = "ossimImageElevationDatabase::open";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << M << " entered...\n"
+         << "\nConnection string: " << connectionString << "\n";
+   }                   
+   
+   bool result = false;
+
+   close();
+
+   if ( connectionString.size() )
+   {
+      m_connectionString = connectionString.c_str();
+
+      loadFileMap();
+
+      if ( m_entryMap.size() )
+      {
+         result = true;
+      }
+      else
+      {
+         m_connectionString.clear();
+      }
+   }
+   
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " result=" << (result?"true\n":"false\n");
+   }
+
+   return result;
+}
+
+void ossimImageElevationDatabase::close()
+{
+   m_meanSpacing = 0.0;
+   m_geoid = 0;
+   m_connectionString.clear();
+}
+
+double ossimImageElevationDatabase::getHeightAboveMSL(const ossimGpt& gpt)
+{
+   double h = ossim::nan();
+   if(isSourceEnabled())
+   {
+      ossimRefPtr<ossimElevCellHandler> handler = getOrCreateCellHandler(gpt);
+      if(handler.valid())
+      {
+         h = handler->getHeightAboveMSL(gpt); // still need to shift
+      }
+   }
+
+   return h;
+}
+
+double ossimImageElevationDatabase::getHeightAboveEllipsoid(const ossimGpt& gpt)
+{
+   double h = getHeightAboveMSL(gpt);
+   if(!ossim::isnan(h))
+   {
+      h += getOffsetFromEllipsoid(gpt);
+   }
+   return h;
+}
+
+ossimRefPtr<ossimElevCellHandler> ossimImageElevationDatabase::createCell(
+   const ossimGpt& gpt)
+{
+   ossimRefPtr<ossimElevCellHandler> result = 0;
+   
+   std::map<ossim_uint64, ossimImageElevationFileEntry>::iterator i = m_entryMap.begin();
+   while ( i != m_entryMap.end() )
+   {
+      if ( (*i).second.m_loadedFlag == false )
+      {
+         // not loaded
+         ossimRefPtr<ossimImageElevationHandler> h = new ossimImageElevationHandler();
+
+         if ( (*i).second.m_rect.isLonLatNan() )
+         {
+            if ( h->open( (*i).second.m_file ) )
+            {
+               // First time opened.  Capture the rectangle. for next time.
+               (*i).second.m_rect = h->getBoundingGndRect();
+            }
+            else
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << "ossimImageElevationDatabase::createCell WARN:\nCould not open: "
+                  << (*i).second.m_file << "\nRemoving file from map!" << std::endl;
+
+               // Get a copy of the iterator to delet.
+               std::map<ossim_uint64, ossimImageElevationFileEntry>::iterator badIter = i;
+               
+               ++i; // Go to next image.
+
+               // Must put lock around erase.
+               m_cacheMapMutex.lock();
+               m_entryMap.erase(badIter);
+               m_cacheMapMutex.unlock();
+               
+               continue; // Skip the rest of this loop.
+            }
+         }
+
+         // Check the North up bounding rectangle for intersect.
+         if ( (*i).second.m_rect.pointWithin(gpt) )
+         {
+            if ( h->isOpen() == false )
+            {
+               h->open( (*i).second.m_file );
+            }
+
+            if ( h->isOpen() )
+            {
+               //---
+               // Check point coverage again as image may not be geographic and pointHasCoverage
+               // has a check on worldToLocal point.
+               //---
+               if (  h->pointHasCoverage(gpt) )
+               {
+                  m_lastAccessedId = (*i).first;
+                  (*i).second.m_loadedFlag = true;
+                  result = h.get();
+                  break;
+               }
+               else
+               {
+                  h = 0;
+               }
+            }
+         }
+         else
+         {
+            h = 0;
+         }
+      }
+
+      ++i;
+   }
+   
+   return result;
+}
+
+ossimRefPtr<ossimElevCellHandler> ossimImageElevationDatabase::getOrCreateCellHandler(
+   const ossimGpt& gpt)
+{
+   ossimRefPtr<ossimElevCellHandler> result = 0;
+   
+   // Note: Must do mutex lock / unlock around any cach map access.
+   m_cacheMapMutex.lock();
+
+   if ( m_cacheMap.size() )
+   {
+      //---
+      // Look in existing map for handler.
+      //
+      // Note: Cannot key off of id from gpt as cells can be any arbituary dimensions.
+      //---
+
+      CellMap::iterator lastAccessedCellIter = m_cacheMap.find(m_lastAccessedId);
+      CellMap::iterator iter = lastAccessedCellIter;
+        
+      // Check from last accessed to end.
+      while ( iter != m_cacheMap.end() )
+      {
+         if ( iter->second->m_handler->pointHasCoverage(gpt) )
+         {
+            result = iter->second->m_handler.get();
+            break;
+         }
+         ++iter;
+      }
+     
+      if ( result.valid() == false )
+      {
+         iter = m_cacheMap.begin();
+              
+         // Beginning to last accessed.
+         while ( iter != lastAccessedCellIter)
+         {
+            if ( iter->second->m_handler->pointHasCoverage(gpt) )
+            {
+               result = iter->second->m_handler.get();
+               break;
+            }
+            ++iter;
+         }
+      }
+
+      if ( result.valid() )
+      {
+         m_lastAccessedId  = iter->second->m_id;
+         iter->second->updateTimestamp();
+      }
+   }
+   m_cacheMapMutex.unlock();
+  
+   if ( result.valid() == false )
+   {
+      // Not in m_cacheMap.  Create a new cell for point if we have coverage.
+      result = createCell(gpt);
+
+      if(result.valid())
+      {
+         OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_cacheMapMutex);
+
+         //---
+         // Add the cell to map.
+         // NOTE: ossimImageElevationDatabase::createCell sets m_lastAccessedId to that of
+         // the entries map key.
+         //---
+         m_cacheMap.insert(std::make_pair(m_lastAccessedId,
+                                          new CellInfo(m_lastAccessedId, result.get())));
+
+         ++m_lastMapKey;
+
+         // Check the map size and purge cells if needed.
+         if(m_cacheMap.size() > m_maxOpenCells)
+         {
+            flushCacheToMinOpenCells();
+         }
+      }
+   }
+
+   return result;
+}
+
+bool ossimImageElevationDatabase::pointHasCoverage(const ossimGpt& gpt) const
+{
+   //---
+   // NOTE:
+   //
+   // The bounding rect is the North up rectangle.  So if the underlying image projection is not
+   // a geographic projection and there is a rotation this could return false positives.  Inside
+   // the ossimImageElevationDatabase::createCell there is a call to
+   // ossimImageElevationHandler::pointHasCoverage which does a real check from the
+   // ossimImageGeometry of the image.
+   //---
+   bool result = false;
+   std::map<ossim_uint64, ossimImageElevationFileEntry>::const_iterator i = m_entryMap.begin();
+   while ( i != m_entryMap.end() )
+   {
+      if ( (*i).second.m_rect.pointWithin(gpt) )
+      {
+         result = true;
+         break;
+      }
+      ++i;
+   }
+   return result;
+}
+
+
+void ossimImageElevationDatabase::getBoundingRect(ossimGrect& rect) const
+{
+   // The bounding rect is the North up rectangle.  So if the underlying image projection is not
+   // a geographic projection and there is a rotation this will include null coverage area.
+   rect.makeNan();
+   std::map<ossim_uint64, ossimImageElevationFileEntry>::const_iterator i = m_entryMap.begin();
+   ossimGrect subRect;
+   while ( i != m_entryMap.end() )
+   {
+      subRect = i->second.m_rect;
+      if (subRect.isLonLatNan())
+      {
+         // The DEM source was not yet initialized:
+         ossimRefPtr<ossimImageElevationHandler> h = new ossimImageElevationHandler();
+         if ( h->open( i->second.m_file ) )
+            subRect = h->getBoundingGndRect();
+         else
+         {
+            ++i;
+            continue;
+         }
+      }
+      if (rect.isLonLatNan())
+         rect = subRect;
+      else
+         rect = rect.combine(subRect);
+      ++i;
+   }
+}
+
+
+bool ossimImageElevationDatabase::getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const
+{
+   if(pointHasCoverage(gpt))
+   {
+     info.m_surfaceName = "Image Elevation";
+   }
+
+   return false;
+}
+
+bool ossimImageElevationDatabase::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   static const char M[] = "ossimImageElevationDatabase::loadState";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << M << " entered..." << "\nkwl:\n" << kwl << "\n";
+   }     
+   bool result = false;
+   const char* lookup = kwl.find(prefix, "type");
+   if ( lookup )
+   {
+      std::string type = lookup;
+      if ( ( type == "image_directory" ) || ( type == "ossimImageElevationDatabase" ) )
+      {
+         result = ossimElevationCellDatabase::loadState(kwl, prefix);
+
+         if ( result )
+         {
+            loadFileMap();
+         }
+      }
+   }
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " result=" << (result?"true\n":"false\n");
+   }
+
+   return result;
+}
+
+bool ossimImageElevationDatabase::saveState(ossimKeywordlist& kwl, const char* prefix) const
+{
+   return ossimElevationCellDatabase::saveState(kwl, prefix);
+}
+
+void ossimImageElevationDatabase::processFile(const ossimFilename& file)
+{
+   static const char M[] = "ossimImageElevationDatabase::processFile";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << M << " entered...\n" << "file: " << file << "\n";
+   }
+
+   // Add the file.
+   m_entryMap.insert( std::make_pair(m_lastMapKey++, ossimImageElevationFileEntry(file)) );
+
+   if(traceDebug())
+   {
+      // Since ossimFileWalker is threaded output the file so we know which job exited.
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << "\nfile: " << file << "\nexited...\n";
+   } 
+}
+
+void ossimImageElevationDatabase::loadFileMap()
+{
+   if ( m_connectionString.size() )
+   {
+      // Create a file walker which will find files we can load from the connection string.
+      ossimFileWalker* fw = new ossimFileWalker();
+      
+      fw->initializeDefaultFilterList();
+
+      // This links the file walker back to our "processFile" method.
+      fw->setFileProcessor( this );
+      
+      ossimFilename f = m_connectionString;
+
+      // ossimFileWalker::walk will in turn call back to processFile method for each file it finds.
+      fw->walk(f); 
+      
+      delete fw;
+      fw = 0;
+   }
+}
+
+// Hidden from use:
+ossimImageElevationDatabase::ossimImageElevationDatabase(const ossimImageElevationDatabase& copy)
+: ossimElevationCellDatabase(copy)
+{
+   m_entryMap = copy.m_entryMap;
+   m_lastMapKey = copy.m_lastMapKey;
+   m_lastAccessedId = copy.m_lastAccessedId;
+}
+
+// Private container class:
+ossimImageElevationDatabase::ossimImageElevationFileEntry::ossimImageElevationFileEntry()
+   : m_file(),
+     m_rect(),
+     m_loadedFlag(false)
+{
+   m_rect.makeNan();
+}
+
+// Private container class:
+ossimImageElevationDatabase::ossimImageElevationFileEntry::ossimImageElevationFileEntry(
+   const ossimFilename& file)
+   : m_file(file),
+     m_rect(),
+     m_loadedFlag(false)
+{
+   m_rect.makeNan();
+}
+
+ossimImageElevationDatabase::ossimImageElevationFileEntry::ossimImageElevationFileEntry
+(const ossimImageElevationFileEntry& copy_this)
+   : m_file(copy_this.m_file),
+     m_rect(copy_this.m_rect),
+     m_loadedFlag(copy_this.m_loadedFlag)
+{
+}
+
+std::ostream& ossimImageElevationDatabase::print(ostream& out) const
+{
+   ossimKeywordlist kwl;
+   saveState(kwl);
+   out << "\nossimImageElevationDatabase @ "<< (ossim_uint64) this << "\n"
+         << kwl <<ends;
+   return out;
+}
+
+
diff --git a/ossim/src/ossim/elevation/ossimImageElevationHandler.cpp b/ossim/src/ossim/elevation/ossimImageElevationHandler.cpp
new file mode 100644
index 0000000..ddee794
--- /dev/null
+++ b/ossim/src/ossim/elevation/ossimImageElevationHandler.cpp
@@ -0,0 +1,260 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimImageElevationHandler.cpp
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:  See class desciption in header file.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/elevation/ossimImageElevationHandler.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+
+#include <iostream> // tmp drb
+using namespace std;
+
+#include <cmath>
+
+RTTI_DEF1(ossimImageElevationHandler, "ossimImageElevationHandler" , ossimElevCellHandler)
+
+// Define Trace flags for use within this file:
+static ossimTrace traceDebug ("ossimImageElevationHandler:debug");
+
+ossimImageElevationHandler::ossimImageElevationHandler()
+   :
+   ossimElevCellHandler(),
+   m_ih(0),
+   m_geom(0),
+   m_rect(),
+   m_mutex()
+{
+}
+
+ossimImageElevationHandler::ossimImageElevationHandler(const ossimFilename& file)
+   :
+   ossimElevCellHandler(),
+   m_ih(0),
+   m_geom(0),
+   m_rect(),
+   m_mutex()
+{
+   open(file);
+}
+
+bool ossimImageElevationHandler::open(const ossimFilename& file)
+{
+   static const char M[] = "ossimImageElevationHandler::open";
+   
+   bool result = false;
+
+   if ( isOpen() ) close();
+   
+   if ( file.size() )
+   {
+      //---
+      // NOTE: The false passed to open is flag to NOT open overviews. If code is ever changed
+      // to go between reduced resolution levels this should be changed.
+      //---
+      m_ih = ossimImageHandlerRegistry::instance()->open(file, true, false);
+      if ( m_ih.valid() )
+      {
+         m_geom = m_ih->getImageGeometry();
+         if ( m_geom.valid() )
+         {
+            result = true;
+
+            //---
+            // Image rect stored as a drect for ossimImageElevationHandler::pointHasCoverage
+            // method.
+            //---
+            m_rect = ossimDrect(0.0, 0.0,
+                                m_ih->getNumberOfSamples()-1, m_ih->getNumberOfLines()-1);
+
+            // Initialize base class stuff.
+            theFilename = file;
+
+            theMeanSpacing = (m_geom->getMetersPerPixel().x + m_geom->getMetersPerPixel().y) / 2.0;
+
+            // Set the ossimElevSource::theGroundRect
+            std::vector<ossimGpt> corner(4);
+            if ( m_geom->getCornerGpts(corner[0], corner[1], corner[2], corner[3]) )
+            {
+               ossimGpt ulGpt(corner[0]);
+               ossimGpt lrGpt(corner[0]);
+               for ( ossim_uint32 i = 1; i < 4; ++i )
+               {
+                  if ( corner[i].lon < ulGpt.lon ) ulGpt.lon = corner[i].lon;
+                  if ( corner[i].lat > ulGpt.lat ) ulGpt.lat = corner[i].lat;
+                  if ( corner[i].lon > lrGpt.lon ) lrGpt.lon = corner[i].lon;
+                  if ( corner[i].lat < lrGpt.lat ) lrGpt.lat = corner[i].lat;
+               }
+               theGroundRect = ossimGrect(ulGpt, lrGpt);
+            }
+            else
+            {
+               theGroundRect.makeNan();
+            }
+         }
+         // theAbsLE90 ???
+         // theAbsCE90 ???
+      }
+   }
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << M << " DEBUG:"
+         << "\nmean spacing(meters): " << theMeanSpacing
+         << "\nunding rect: " << theGroundRect
+         << "\nreturn status: " << (result?"true\n":"false\n");
+   }
+         
+   return result;
+}
+
+
+ossimImageElevationHandler::~ossimImageElevationHandler()
+{
+   close();
+}
+
+double ossimImageElevationHandler::getHeightAboveMSL(const ossimGpt& gpt)
+{
+   double height = ossim::nan();
+
+   // Get the image point for the world point.
+   ossimDpt dpt;
+   m_geom->worldToLocal(gpt, dpt);
+
+   if ( m_rect.pointWithin(dpt) )
+   {
+      // Cast it to an int which will shift to nearest upper left post.
+      ossim_int32 x0 = static_cast<ossim_int32>(dpt.x);
+      ossim_int32 y0 = static_cast<ossim_int32>(dpt.y);
+      
+      // Right edge check.
+      if(x0 == static_cast<ossim_int32>(m_rect.lr().x))
+      {
+         --x0;
+      }
+      
+      // Bottom edge check.
+      if(y0 == static_cast<ossim_int32>(m_rect.lr().y))
+      {
+         --y0;
+      }
+
+      m_mutex.lock(); // Call to getTile not thread safe.
+      ossimRefPtr<ossimImageData> data = m_ih->getTile( ossimIrect(x0, y0, x0+1, y0+1), 0 );
+      if ( data.valid() )
+      {
+         ossimIrect dataRect = data->getImageRectangle();
+
+         double p00 = data->getPix( ossimIpt(x0,   y0)   );
+         double p01 = data->getPix( ossimIpt(x0+1, y0)   );
+         double p10 = data->getPix( ossimIpt(x0,   y0+1) );
+         double p11 = data->getPix( ossimIpt(x0+1, y0+1) );
+         
+         double xt0 = dpt.x - x0;
+         double yt0 = dpt.y - y0;
+         double xt1 = 1-xt0;
+         double yt1 = 1-yt0;
+         
+         double w00 = xt1*yt1;
+         double w01 = xt0*yt1;
+         double w10 = xt1*yt0;
+         double w11 = xt0*yt0;
+         
+         // Test for null posts and set the corresponding weights to 0:
+         const double NP = data->getNullPix(0);
+         
+         if (p00 == NP)
+            w00 = 0.0;
+         if (p01 == NP)
+            w01 = 0.0;
+         if (p10 == NP)
+            w10 = 0.0;
+         if (p11 == NP)
+            w11 = 0.0;
+         
+#if 0 /* Serious debug only... */
+         cout << "\np00:  " << p00
+              << "\np01:  " << p01
+              << "\np10:  " << p10
+              << "\np11:  " << p11
+              << "\nw00:  " << w00
+              << "\nw01:  " << w01
+              << "\nw10:  " << w10
+              << "\nw11:  " << w11
+              << endl;
+#endif
+         
+         double sum_weights = w00 + w01 + w10 + w11;
+         
+         if (sum_weights)
+            height = (p00*w00 + p01*w01 + p10*w10 + p11*w11) / sum_weights;
+
+      } // if ( data.valid() )
+
+      m_mutex.unlock();
+      
+   } // if ( m_rect.pointWithin(dpt) )
+
+   return height;
+}
+
+ossimIpt ossimImageElevationHandler::getSizeOfElevCell() const
+{
+   ossimIpt sz(0,0);
+   if ( m_ih.valid() )
+   {
+      sz.x = static_cast<ossim_int32>(m_ih->getNumberOfSamples(0));
+      sz.y = static_cast<ossim_int32>(m_ih->getNumberOfLines(0));
+   }
+   return sz;
+}
+
+double ossimImageElevationHandler::getPostValue(const ossimIpt& gridPt ) const
+{
+   double height = ossim::nan();
+   if ( m_rect.pointWithin(ossimDpt(gridPt)) )
+   {
+      ossimRefPtr<ossimImageHandler> ih = const_cast<ossimImageHandler*>(m_ih.get());
+      
+      m_mutex.lock(); // Call to getTile(...) not thread safe.
+      ossimRefPtr<ossimImageData> data =
+         ih->getTile( ossimIrect(gridPt.x, gridPt.y, gridPt.x+1, gridPt.y+1), 0 );
+      if ( data.valid() )
+      {
+         height = data->getPix(0, 0);
+         if (height == data->getNullPix(0))
+            height = ossim::nan();
+      }
+      m_mutex.unlock();
+   }
+   return height;
+}
+
+ossimImageElevationHandler::ossimImageElevationHandler(const ossimImageElevationHandler& copy)
+{
+   *this = copy;
+}
+
+const ossimImageElevationHandler&
+ossimImageElevationHandler::operator=(const ossimImageElevationHandler& rhs)
+{
+   open(rhs.theFilename);
+   return *this;
+}
+
diff --git a/ossim/src/ossim/elevation/ossimSrtmElevationDatabase.cpp b/ossim/src/ossim/elevation/ossimSrtmElevationDatabase.cpp
new file mode 100644
index 0000000..93af011
--- /dev/null
+++ b/ossim/src/ossim/elevation/ossimSrtmElevationDatabase.cpp
@@ -0,0 +1,243 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/elevation/ossimSrtmElevationDatabase.h>
+#include <ossim/base/ossimGeoidManager.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimDirectory.h>
+#include <ossim/base/ossimTrace.h>
+#include <sstream>
+#include <iomanip>
+#include <cstdlib> /* for abs(int) */
+
+static ossimTrace traceDebug("ossimSrtmElevationDatabase:debug");
+
+RTTI_DEF1(ossimSrtmElevationDatabase, "ossimSrtmElevationDatabase", ossimElevationCellDatabase);
+
+double ossimSrtmElevationDatabase::getHeightAboveMSL(const ossimGpt& gpt)
+{
+   if(isSourceEnabled())
+   {
+      ossimRefPtr<ossimElevCellHandler> handler = getOrCreateCellHandler(gpt);
+      if(handler.valid())
+      {
+         return handler->getHeightAboveMSL(gpt); // still need to shift
+      }
+   }
+   return ossim::nan();
+}
+
+double ossimSrtmElevationDatabase::getHeightAboveEllipsoid(const ossimGpt& gpt)
+{
+   double h = getHeightAboveMSL(gpt);
+   if(h != ossim::nan())
+   {
+      h += getOffsetFromEllipsoid(gpt);
+   }
+   
+   return h;
+}
+bool ossimSrtmElevationDatabase::open(const ossimString& connectionString)
+{
+   bool result = false;
+   ossimFilename file = ossimFilename(connectionString);
+   m_connectionString = connectionString;
+   result = openSrtmDirectory(file);
+   
+   return result;
+}
+
+bool ossimSrtmElevationDatabase::getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const
+{
+   bool result = false;
+   info.makeNan();
+
+   if(pointHasCoverage(gpt))
+   {
+      result = true;
+      if(m_meanSpacing > 100.0)
+      {
+         // 30 arc second
+         info.m_absoluteCE  = 20.0;
+         info.m_absoluteLE = 16.0;
+         info.m_surfaceName = "SRTM30";
+
+      }
+      else if (m_meanSpacing > 40.0)
+      {
+        // SRTM 3 arc
+         info.m_absoluteCE  = 20.0;
+         info.m_absoluteLE = 16.0;
+         info.m_surfaceName = "SRTM3";
+      }
+      else
+      {
+          // SRTM 1 arc
+         info.m_absoluteCE = 20.0;
+         info.m_absoluteLE = 10.0;
+         info.m_surfaceName = "SRTM1";
+       }
+   }
+
+   return result;
+}
+
+bool ossimSrtmElevationDatabase::openSrtmDirectory(const ossimFilename& dir)
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimSrtmElevationDatabase::open: Entered....\n";
+   }
+   if(!m_geoid.valid())
+   {
+      m_geoid = ossimGeoidManager::instance()->findGeoidByShortName("geoid1996", false);
+   }
+   
+   //---
+   // Sample format:
+   //            dir
+   //         |          |
+   //    N35W121.hgt N35W121.hgt
+   //---
+   ossim_uint32 count = 0;
+   ossim_uint32 maxCount = 25;
+   if (!dir.isDir())
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << "ossimSrtmElevationDatabase::open: Not a directory, leaving ... " << dir << "\n";
+      }
+      return false;
+   }
+   
+   ossimDirectory od(dir);
+   if (od.isOpened() == false)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << "ossimSrtmElevationDatabase::open: Unable to open directory " << dir << ", Leaving ... \n";
+      }
+      return false;
+   }
+   
+   ossimFilename f;
+   //ossimSrtmSupportData sd;
+   ossimRefPtr<ossimSrtmHandler> handler = new ossimSrtmHandler;
+   if(od.getFirst(f, ossimDirectory::OSSIM_DIR_FILES))
+   {
+      do
+      {
+         ++count;
+         if(handler->open(f))
+         {
+            m_meanSpacing = handler->getMeanSpacingMeters();
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << "ossimSrtmElevationDatabase::open: Found file " << f << "\n";
+               if(!m_geoid.valid())
+               {
+                  ossimNotify(ossimNotifyLevel_DEBUG) << "ossimSrtmElevationDatabase::open: Unable to load goeid grid 1996 for SRTM database\n";
+               }
+            }
+            return true;
+         }
+      }while((od.getNext(f)) &&(count < maxCount));
+   }
+   
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimSrtmElevationDatabase::open: Leaving ... \n";
+   }
+   return false;
+}
+
+void ossimSrtmElevationDatabase::createRelativePath(ossimFilename& file, const ossimGpt& gpt)const
+{
+   int ilat =  static_cast<int>(floor(gpt.latd()));
+   if (ilat < 0)
+   {
+      file = "S";
+   }
+   else
+   {
+      file = "N";
+   }
+   
+   ilat = abs(ilat);
+   std::ostringstream  os1;
+   
+   os1 << std::setfill('0') << std::setw(2) <<ilat;
+   
+   file += os1.str().c_str();
+   
+   int ilon = static_cast<int>(floor(gpt.lond()));
+   
+   if (ilon < 0)
+   {
+      file += "W";
+   }
+   else
+   {
+      file += "E";
+   }
+   
+   ilon = abs(ilon);
+   std::ostringstream  os2;
+   os2 << std::setfill('0') << std::setw(3) << ilon;
+   
+   file += os2.str().c_str();
+   file.setExtension("hgt");
+}
+
+bool ossimSrtmElevationDatabase::loadState(const ossimKeywordlist& kwl, const char* prefix )
+{
+   bool result = ossimElevationCellDatabase::loadState(kwl, prefix);
+   if(result)
+   {
+      if(!m_connectionString.empty()&&ossimFilename(m_connectionString).exists())
+      {
+         result = open(m_connectionString);
+      }
+      else
+      {
+         // can't open the connection because it does not exists or empty
+         result = false;
+      }
+   }
+   
+   return result;
+}
+
+bool ossimSrtmElevationDatabase::saveState(ossimKeywordlist& kwl, const char* prefix)const
+{
+   bool result = ossimElevationCellDatabase::saveState(kwl, prefix);
+   
+   return result;
+}
+
+ossimRefPtr<ossimElevCellHandler>
+ossimSrtmElevationDatabase::createCell(const ossimGpt& gpt)
+{
+
+  ossimRefPtr<ossimElevCellHandler> result = 0;
+  ossimFilename f;
+  createFullPath(f, gpt);
+
+  if(f.exists())
+  {
+     ossimRefPtr<ossimSrtmHandler> h = new ossimSrtmHandler();
+     if (h->open(f, m_memoryMapCellsFlag))
+     {
+        result = h.get();
+     }
+  }
+
+  return result;
+}
+
diff --git a/src/ossim/elevation/ossimSrtmFactory.cpp b/ossim/src/ossim/elevation/ossimSrtmFactory.cpp
similarity index 100%
rename from src/ossim/elevation/ossimSrtmFactory.cpp
rename to ossim/src/ossim/elevation/ossimSrtmFactory.cpp
diff --git a/ossim/src/ossim/elevation/ossimSrtmHandler.cpp b/ossim/src/ossim/elevation/ossimSrtmHandler.cpp
new file mode 100644
index 0000000..98f5c61
--- /dev/null
+++ b/ossim/src/ossim/elevation/ossimSrtmHandler.cpp
@@ -0,0 +1,497 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Burken
+//
+// Description:
+// 
+// Shuttle Radar Topography Mission (SRTM) elevation source.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimSrtmHandler.cpp 23117 2015-01-29 22:33:13Z okramer $
+
+#include <ossim/elevation/ossimSrtmHandler.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimStreamFactoryRegistry.h>
+
+RTTI_DEF1(ossimSrtmHandler, "ossimSrtmHandler" , ossimElevCellHandler)
+
+//***
+// Define Trace flags for use within this file:
+//***
+#include <ossim/base/ossimTrace.h>
+static ossimTrace traceDebug ("ossimSrtmElevSource:debug");
+
+ossimSrtmHandler::ossimSrtmHandler()
+   :
+      ossimElevCellHandler(),
+      m_streamOpen(false),
+      m_numberOfLines(0),
+      m_numberOfSamples(0),
+      m_srtmRecordSizeInBytes(0),
+      m_latSpacing(0.0),
+      m_lonSpacing(0.0),
+      m_nwCornerPost(),
+      m_swapper(0)
+{
+}
+
+ossimSrtmHandler::~ossimSrtmHandler()
+{
+   if (m_swapper)
+   {
+      delete m_swapper;
+      m_swapper = 0;
+   }
+   close();
+}
+
+double ossimSrtmHandler::getHeightAboveMSL(const ossimGpt& gpt)
+{
+   if(!isOpen()) return ossim::nan();
+   if(!m_memoryMap.empty())
+   {
+      switch(m_scalarType)
+      {
+         case OSSIM_SINT16:
+         {
+            return getHeightAboveMSLMemoryTemplate((ossim_sint16)0, gpt);
+         }
+         case OSSIM_FLOAT32:
+         {
+            return getHeightAboveMSLMemoryTemplate((ossim_float32)0, gpt);
+         }
+         default:
+         {
+            break;
+         }
+      }
+   }
+   else
+   {
+      switch(m_scalarType)
+      {
+         case OSSIM_SINT16:
+         {
+            return getHeightAboveMSLFileTemplate((ossim_sint16)0, gpt);
+         }
+         case OSSIM_FLOAT32:
+         {
+            return getHeightAboveMSLFileTemplate((ossim_float32)0, gpt);
+         }
+         default:
+         {
+            break;
+         }
+      }
+   }
+
+   return ossim::nan();
+}
+
+template <class T>
+double ossimSrtmHandler::getHeightAboveMSLFileTemplate(T /* dummy */, const ossimGpt& gpt)
+{
+   // Establish the grid indexes:
+   double xi = (gpt.lon - m_nwCornerPost.lon) / m_lonSpacing;
+   double yi = (m_nwCornerPost.lat - gpt.lat) / m_latSpacing;
+
+   int x0 = static_cast<int>(xi);
+   int y0 = static_cast<int>(yi);
+
+   if(x0 == (m_numberOfSamples-1))
+   {
+      --x0; // Move over one post.
+   }
+   
+   // Check for top edge.
+   //    if (gpt.lat == theGroundRect.ul().lat)
+   if(y0 == (m_numberOfLines-1))
+   {
+      --y0; // Move down one post.
+   }
+
+
+   // Do some error checking.
+   if ( xi < 0.0 || yi < 0.0 ||
+        x0 > (m_numberOfSamples  - 2.0) ||
+        y0 > (m_numberOfLines    - 2.0) )
+   {
+      return ossim::nan();
+   }
+
+   T p[4];
+   
+   double p00;
+   double p01;
+   double p10;
+   double p11;
+
+   //---
+   // Grab the four points from the srtm cell needed.
+   //---
+   std::streampos offset = y0 * m_srtmRecordSizeInBytes + x0 * sizeof(T);
+
+   {
+      OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_fileStrMutex);
+
+      // lets a seek cur
+      // 
+      // Put the file pointer at the start of the first elevation post.
+      m_fileStr.seekg(offset, std::ios::beg);
+      // Get the first post.
+      m_fileStr.read((char*)p, sizeof(T));
+      
+      // Get the second post.
+      m_fileStr.read((char*)(p+1), sizeof(T));
+      
+      // Move over to the next column.
+      offset += m_srtmRecordSizeInBytes;
+      
+      m_fileStr.seekg(offset, std::ios::beg);
+      
+      // Get the third post.
+      m_fileStr.read((char*)(p+2), sizeof(T));
+      
+      // Get the fourth post.
+      m_fileStr.read((char*)(p+3), sizeof(T));
+      
+      if(m_fileStr.fail())
+      {
+         return ossim::nan();
+      }
+   }
+   if (m_swapper)
+   {
+      m_swapper->swap((T*)p, 4);
+   }
+
+   p00 = p[0];
+   p01 = p[1];
+   p10 = p[2];
+   p11 = p[3];
+   
+   // Perform bilinear interpolation:
+
+   double xt0 = xi - x0;
+   double yt0 = yi - y0;
+   double xt1 = 1-xt0;
+   double yt1 = 1-yt0;
+
+   double w00 = xt1*yt1;
+   double w01 = xt0*yt1;
+   double w10 = xt1*yt0;
+   double w11 = xt0*yt0;
+
+   //***
+   // Test for null posts and set the corresponding weights to 0:
+   //***
+   if (p00 == theNullHeightValue)
+      w00 = 0.0;
+   if (p01 == theNullHeightValue)
+      w01 = 0.0;
+   if (p10 == theNullHeightValue)
+      w10 = 0.0;
+   if (p11 == theNullHeightValue)
+      w11 = 0.0;
+
+#if 0 /* Serious debug only... */
+   cout << "\np00:  " << p00
+        << "\np01:  " << p01
+        << "\np10:  " << p10
+        << "\np11:  " << p11
+        << "\nw00:  " << w00
+        << "\nw01:  " << w01
+        << "\nw10:  " << w10
+        << "\nw11:  " << w11
+        << endl;
+#endif
+
+   double sum_weights = w00 + w01 + w10 + w11;
+
+   if (sum_weights)
+   {
+      return (p00*w00 + p01*w01 + p10*w10 + p11*w11) / sum_weights;
+   }
+
+   return ossim::nan();
+}
+
+
+template <class T>
+double ossimSrtmHandler::getHeightAboveMSLMemoryTemplate(T /* dummy */,
+                                                         const ossimGpt& gpt)
+{
+   // Establish the grid indexes:
+   double xi = (gpt.lon - m_nwCornerPost.lon) / m_lonSpacing;
+   double yi = (m_nwCornerPost.lat - gpt.lat) / m_latSpacing;
+   
+   int x0 = static_cast<int>(xi);
+   int y0 = static_cast<int>(yi);
+   
+   if(x0 == (m_numberOfSamples-1))
+   {
+      --x0; // Move over one post.
+   }
+   
+   // Check for top edge.
+   //    if (gpt.lat == theGroundRect.ul().lat)
+   if(y0 == (m_numberOfLines-1))
+   {
+      --y0; // Move down one post.
+   }
+#if 0
+   // Check for right edge.
+   if (ossim::almostEqual(gpt.lon,theGroundRect.lr().lon))
+   {
+      --x0; // Move over one post to the left.
+   }
+   
+   // Check for bottom edge.
+   if (ossim::almostEqual(gpt.lat,theGroundRect.lr().lat))
+   {
+      --y0; // Move up one post.
+   }
+#endif
+   // Do some error checking.
+   if ( xi < 0.0 || yi < 0.0 ||
+       x0 > (m_numberOfSamples  - 2.0) ||
+       y0 > (m_numberOfLines    - 2.0) )
+   {
+      //       std::cout << "ossimSrtmHandler::getHeightAboveMSLTemplate: leaving 1" << std::endl;
+      return ossim::nan();
+   }
+
+   // Grab the four points from the srtm cell needed.
+   ossim_uint64 offset = y0 * m_srtmRecordSizeInBytes + x0 * sizeof(T);
+   ossim_uint64 offset2 =offset+m_srtmRecordSizeInBytes;
+   T v00 = *(reinterpret_cast<T*> (&m_memoryMap[offset]));
+   T v01 = *(reinterpret_cast<T*> (&m_memoryMap[offset + sizeof(T)]));
+   T v10 = *(reinterpret_cast<T*> (&m_memoryMap[offset2]));
+   T v11 = *(reinterpret_cast<T*> (&m_memoryMap[offset2 + sizeof(T)]));
+   if (m_swapper)
+   {
+      m_swapper->swap(v00);
+      m_swapper->swap(v01);
+      m_swapper->swap(v10);
+      m_swapper->swap(v11);
+   }
+   double p00 = v00;
+   double p01 = v01;
+   double p10 = v10;
+   double p11 = v11;
+   
+   double xt0 = xi - x0;
+   double yt0 = yi - y0;
+   double xt1 = 1-xt0;
+   double yt1 = 1-yt0;
+   
+   double w00 = xt1*yt1;
+   double w01 = xt0*yt1;
+   double w10 = xt1*yt0;
+   double w11 = xt0*yt0;
+   
+   //***
+   // Test for null posts and set the corresponding weights to 0:
+   //***
+   if (p00 == theNullHeightValue)
+      w00 = 0.0;
+   if (p01 == theNullHeightValue)
+      w01 = 0.0;
+   if (p10 == theNullHeightValue)
+      w10 = 0.0;
+   if (p11 == theNullHeightValue)
+      w11 = 0.0;
+   
+#if 0 /* Serious debug only... */
+   cout << "\np00:  " << p00
+   << "\np01:  " << p01
+   << "\np10:  " << p10
+   << "\np11:  " << p11
+   << "\nw00:  " << w00
+   << "\nw01:  " << w01
+   << "\nw10:  " << w10
+   << "\nw11:  " << w11
+   << endl;
+#endif
+   
+   double sum_weights = w00 + w01 + w10 + w11;
+   
+   if (sum_weights)
+   {
+      return (p00*w00 + p01*w01 + p10*w10 + p11*w11) / sum_weights;
+   }
+   
+   return ossim::nan();
+}
+
+double ossimSrtmHandler::getPostValue(const ossimIpt& /* gridPt */) const
+{
+   ossimNotify(ossimNotifyLevel_WARN)
+      << "ossimSrtmHandler::getPostValue(const ossimIpt& gridPt):  NEED TO IMPLEMENT TO NEW INTERFACE\n";
+   
+   return theNullHeightValue;
+#if 0
+   static const char MODULE[] = "ossimSrtmHandler::getPostValue";
+   
+   if(!theFileStr.valid()) return ossim::nan();
+   
+   // Do some error checking.
+   if ( gridPt.x < 0.0 || gridPt.y < 0.0 ||
+        gridPt.x > (theNumberOfSamples  - 1) ||
+        gridPt.y > (theNumberOfLines - 1) )
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "WARNING " << MODULE << ": No intersection..." << std::endl;
+      }
+      return ossim::nan();
+   }
+
+   if (!isOpen())
+   {
+      return ossim::nan();
+   }
+
+   std::streampos offset = gridPt.y * theSrtmRecordSizeInBytes + gridPt.x * 2;
+
+   // Put the file pointer at the start of the first elevation post.
+   m_fileStr.seekg(offset, std::ios::beg);
+
+   ossim_sint16 p;
+
+   // Get the post.
+   m_fileStr.read((char*)&p, 2);
+   if (theSwapper)
+   {
+      theSwapper->swap(p);
+   }
+   return p;
+#endif
+}
+
+ossimIpt ossimSrtmHandler::getSizeOfElevCell() const
+{
+   return ossimIpt(m_numberOfSamples, m_numberOfLines);
+}
+
+ossimSrtmHandler::ossimSrtmHandler(const ossimSrtmHandler& src)
+:ossimElevCellHandler(src),
+m_supportData(src.m_supportData),
+m_streamOpen(src.m_streamOpen),
+m_numberOfLines(src.m_numberOfLines),
+m_numberOfSamples(src.m_numberOfSamples),
+m_srtmRecordSizeInBytes(src.m_srtmRecordSizeInBytes),
+m_latSpacing(src.m_latSpacing),
+m_lonSpacing(src.m_lonSpacing),
+m_nwCornerPost(src.m_nwCornerPost),
+m_swapper(src.m_swapper?new ossimEndian:0),
+m_scalarType(src.m_scalarType),
+m_memoryMap(src.m_memoryMap)
+{
+   if(m_memoryMap.empty()&&src.isOpen())
+   {
+      m_fileStr.open(src.getFilename().c_str(),
+                     std::ios::binary|std::ios::in);
+   }
+}
+
+bool ossimSrtmHandler::isOpen()const
+{
+   if(!m_memoryMap.empty()) return true;
+   
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_fileStrMutex);
+   return m_streamOpen;
+   // return (m_fileStr.is_open());
+}
+
+
+bool ossimSrtmHandler::open(const ossimFilename& file, bool memoryMapFlag)
+{
+   theFilename = file;
+   clearErrorStatus();
+   if (!m_supportData.setFilename(file, false) )
+   {
+      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+      return false;
+   }
+   if(m_swapper) {delete m_swapper;m_swapper=0;}
+   m_scalarType = m_supportData.getScalarType();
+   // SRTM is stored in big endian.
+   if ( ossim::byteOrder() == OSSIM_LITTLE_ENDIAN)
+   {
+      m_swapper = new ossimEndian();
+   }
+   m_streamOpen = false;
+   m_numberOfLines         = m_supportData.getNumberOfLines();
+   m_numberOfSamples       = m_supportData.getNumberOfSamples();
+   m_srtmRecordSizeInBytes = m_numberOfSamples * ossim::scalarSizeInBytes(m_scalarType);
+   m_latSpacing            = m_supportData.getLatitudeSpacing();
+   m_lonSpacing            = m_supportData.getLongitudeSpacing();
+   m_nwCornerPost.lon      = m_supportData.getSouthwestLongitude();
+   m_nwCornerPost.lat      = m_supportData.getSouthwestLatitude()+1.0;
+   m_scalarType            = m_supportData.getScalarType();
+   theGroundRect = ossimGrect(ossimGpt(m_nwCornerPost.lat,
+                                       m_nwCornerPost.lon,
+                                       0.0),
+                              ossimGpt(m_nwCornerPost.lat-1.0,
+                                       m_nwCornerPost.lon+1.0,
+                                       0.0));
+   theMeanSpacing = (m_latSpacing*ossimGpt().metersPerDegree().y);
+   
+   // Set the base class null height value.
+   theNullHeightValue = -32768.0;
+
+   m_fileStr.clear();
+   m_fileStr.open(theFilename.c_str(), std::ios::in | std::ios::binary);
+   if(!m_fileStr)
+   {
+      return false;
+   }
+   
+   if(memoryMapFlag)
+   {
+      m_memoryMap.resize(theFilename.fileSize());
+      m_fileStr.read((char*)&m_memoryMap.front(), (streamsize)m_memoryMap.size());
+      m_fileStr.close();
+   }
+   m_streamOpen = true;
+   // Capture the stream state for non-const is_open on old compiler.
+   
+   return m_streamOpen;
+#if 0
+   // theMinHeightAboveMSL;
+   // theMaxHeightAboveMSL;
+   if(theFileStr.valid())
+   {
+      if(!m_fileStr.fail())
+      {
+         return true;
+      }
+   }
+   theFileStr = 0;
+
+   
+   theFileStr = ossimStreamFactoryRegistry::instance()->createNewIFStream(theFilename,
+                                                                          std::ios::in | std::ios::binary);   
+
+   if(theFileStr.valid())
+   {
+      return (!m_fileStr.fail());
+   }
+   return false;
+#endif
+}
+
+void ossimSrtmHandler::close()
+{
+   m_fileStr.close();
+   m_memoryMap.clear();
+   m_streamOpen = false;
+}
diff --git a/ossim/src/ossim/elevation/ossimTiledElevationDatabase.cpp b/ossim/src/ossim/elevation/ossimTiledElevationDatabase.cpp
new file mode 100644
index 0000000..c1a5e5d
--- /dev/null
+++ b/ossim/src/ossim/elevation/ossimTiledElevationDatabase.cpp
@@ -0,0 +1,656 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimTiledElevationDatabase.cpp
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: See class desciption in header file.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/elevation/ossimTiledElevationDatabase.h>
+#include <ossim/base/ossimDblGrid.h>
+#include <ossim/base/ossimDirectory.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimOrthoImageMosaic.h>
+#include <ossim/imaging/ossimSingleImageChain.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/util/ossimFileWalker.h>
+#include <cmath>
+
+static ossimTrace traceDebug(ossimString("ossimTiledElevationDatabase:debug"));
+
+RTTI_DEF1(ossimTiledElevationDatabase, "ossimTiledElevationDatabase", ossimElevationDatabase);
+
+ossimTiledElevationDatabase::ossimTiledElevationDatabase()
+   :
+   ossimElevationDatabase(),
+   ossimFileProcessorInterface(), 
+   m_entries(0),
+   m_grid(0),
+   m_referenceProj(0),
+   m_requestedRect(),
+   m_entryListRect(),
+   m_fileWalker(0)
+{
+   m_requestedRect.makeNan();
+   m_entryListRect.makeNan();
+
+   //---
+   // Use the ossimElevSource::theGroundRect to hold the mapped rect expanded to even post
+   // boundaries.
+   //---
+   theGroundRect.makeNan();
+}
+
+// Protected destructor as this is derived from ossimRefenced.
+ossimTiledElevationDatabase::~ossimTiledElevationDatabase()
+{
+   m_referenceProj = 0;   
+   m_entries.clear();
+   if ( m_grid )
+   {
+      delete m_grid;
+      m_grid = 0;
+   }
+   if ( m_fileWalker )
+   {
+      delete m_fileWalker;
+      m_fileWalker = 0;
+   }
+}
+
+bool ossimTiledElevationDatabase::open(const ossimString& connectionString)
+{
+   static const char M[] = "ossimTiledElevationDatabase::open";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << M << " entered...\n"
+         << "\nConnection string: " << connectionString << "\n";
+   }                   
+   
+   bool result = false;
+
+   close();
+
+   if ( connectionString.size() )
+   {
+      m_connectionString = connectionString.c_str();
+      result = true;
+   }
+
+   if ( m_entries.size() ) result = true;
+   
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " result=" << (result?"true\n":"false\n");
+   }
+
+   return result;
+}
+
+void ossimTiledElevationDatabase::close()
+{
+   m_entryListRect.makeNan();
+   m_requestedRect.makeNan();
+   theGroundRect.makeNan();
+   m_referenceProj = 0;
+   m_entries.clear();
+   if ( m_grid )
+   {
+      delete m_grid;
+      m_grid = 0;
+   }
+   m_meanSpacing = 0.0;
+   m_geoid = 0;
+   m_connectionString.clear();
+}
+
+void ossimTiledElevationDatabase::mapRegion(const ossimGrect& region)
+{
+   static const char M[] = "ossimTiledElevationDatabase::mapRegion";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << M << " entered...\n" << "region: " << region << "\n";
+   }
+   
+   if ( m_connectionString.size() )
+   {
+      // Wrap in try catch block as excptions can be thrown under the hood.
+      try
+      {
+         m_requestedRect = region;
+         
+         ossimFilename f = m_connectionString;
+         if ( f.exists() )
+         {
+            if ( !m_fileWalker )
+            {
+               m_fileWalker = new ossimFileWalker();
+               m_fileWalker->initializeDefaultFilterList();
+
+               m_fileWalker->setNumberOfThreads( ossim::getNumberOfThreads() );
+
+               // Must set this so we can stop recursion on directory based images.
+               m_fileWalker->setWaitOnDirFlag( true );
+
+               // This links the file walker back to our "processFile" method.
+               m_fileWalker->setFileProcessor( this );
+            }
+
+            // Walk the directory:
+            m_fileWalker->walk(f);
+
+            mapRegion();
+         }
+         else
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << M << " ERROR: Connection string does not exists: "
+               << m_connectionString.c_str()  << endl;
+         }
+      }
+      catch (const ossimException& e)
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "Caught exception: " << e.what() << endl;
+         m_entries. clear();
+      }
+
+      // cleanup:
+      if ( m_fileWalker )
+      {
+         delete m_fileWalker;
+         m_fileWalker = 0;
+      }
+}
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
+   }
+}
+
+void ossimTiledElevationDatabase::processFile(const ossimFilename& file)
+{
+   static const char M[] = "ossimTiledElevationDatabase::processFile";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << M << " entered...\n" << "file: " << file << "\n";
+   }
+
+   ossimRefPtr<ossimSingleImageChain> sic = new ossimSingleImageChain();
+   if ( sic->open(file, false) ) // False for do not open overviews.
+   {
+      if ( isDirectoryBasedImage( sic->getImageHandler() ) )
+      {
+         // Tell the walker not to recurse this directory.
+         m_fileWalker->setRecurseFlag(false);
+      }
+     
+      ossimRefPtr<ossimImageHandler> ih = sic->getImageHandler();
+      if ( ih.valid() && (m_requestedRect.isLonLatNan() == false) )
+      {
+         ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
+         if ( geom.valid() == false )
+         {
+            std::string errMsg = M;
+            errMsg += " ERROR:\nNo image geometry for image: ";
+            errMsg += ih->getFilename().string();
+            throw ossimException(errMsg);
+         }
+         
+         ossimRefPtr<ossimProjection> proj = geom->getProjection();
+         if ( proj.valid() == false )
+         {
+            std::string errMsg = M;
+            errMsg += " ERROR:\nNo image projection for image: ";
+            errMsg += ih->getFilename().string();
+            throw ossimException(errMsg);
+         }
+         
+         // Get the bounding rect:
+         ossimGrect boundingRect;
+         getBoundingRect(geom, boundingRect);
+         
+         if ( boundingRect.isLonLatNan() )
+         {
+            std::string errMsg = M;
+            errMsg += " ERROR:\nBounding rect has nans for image: ";
+            errMsg += ih->getFilename().string();
+            throw ossimException(errMsg); 
+         }
+         
+         if ( boundingRect.intersects(m_requestedRect) )
+         {
+            bool addEntryToList = false;
+            
+            if ( m_entries.size() == 0 ) // First time through.
+            {
+               addEntryToList = true;
+               m_entryListRect = boundingRect;
+               m_referenceProj = proj;
+               m_meanSpacing = (geom->getMetersPerPixel().x + geom->getMetersPerPixel().y) / 2.0;
+            }
+            else 
+            {
+               addEntryToList = isCompatible( ih.get(), geom.get(), proj.get() );
+               if ( addEntryToList )
+               {
+                  // Expand the rectangle.
+                  m_entryListRect.combine(boundingRect);
+               }
+            }
+            
+            if ( addEntryToList )
+            {
+               // If we're keeping it add a cache to the chain.
+               sic->addCache();
+               
+               //---
+               // Create the entry and give to addEntry which checks for duplicates in case
+               // mapRegion was called consecutively.
+               //---
+               ossimTiledElevationEntry entry(boundingRect, sic);
+               addEntry(entry);
+
+               // Once the requested rect is filled abort the file walk.
+               if ( m_requestedRect.completely_within( m_entryListRect ) )
+               {
+                  m_fileWalker->setAbortFlag(true);
+               }
+            }
+         }
+      }
+      else
+      {
+         std::string errMsg = M;
+         errMsg += " ERROR:\nNo image geometry for image: ";
+         errMsg += ih->getFilename().string();
+         throw ossimException(errMsg);
+      }
+   }
+
+   if(traceDebug())
+   {
+      // Since ossimFileWalker is threaded output the file so we know which job exited.
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << "\nfile: " << file << "\nexited...\n";
+   }   
+}
+
+void ossimTiledElevationDatabase::addEntry(const ossimTiledElevationEntry& entry)
+{
+   bool result = true;
+   std::vector<ossimTiledElevationEntry>::const_iterator i = m_entries.begin();
+   while ( i != m_entries.end() )
+   {
+      if ( (*i).m_sic->getFilename() == entry.m_sic->getFilename() )
+      {
+         result = false; // In list already.
+         break;
+      }
+      ++i;
+   }
+   if ( result )
+   {
+      m_entries.push_back(entry); // Add to list.
+   }
+}
+
+void ossimTiledElevationDatabase::initializeReferenceProjection()
+{
+   if ( m_entries.size() )
+   {
+      ossimRefPtr<ossimImageHandler> ih = m_entries[0].m_sic->getImageHandler();
+      if ( ih.valid() )
+      {
+         ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
+         if ( geom.valid() )
+         {
+            m_referenceProj = geom->getProjection();
+         }
+         // else throw exception ??? (drb)
+      }
+   }
+}
+
+double ossimTiledElevationDatabase::getHeightAboveMSL(const ossimGpt& gpt)
+{
+   if ( m_grid )
+   {
+      return (*m_grid)(gpt.lon, gpt.lat);
+   }
+   return ossim::nan();
+}
+
+double ossimTiledElevationDatabase::getHeightAboveEllipsoid(const ossimGpt& gpt)
+{
+   double h = getHeightAboveMSL(gpt);
+   if(h != ossim::nan())
+   {
+      h += getOffsetFromEllipsoid(gpt);
+   }
+   return h;
+}
+ 
+bool ossimTiledElevationDatabase::pointHasCoverage(const ossimGpt& gpt) const
+{
+   if ( theGroundRect.isLonLatNan() == false)
+   {
+      return theGroundRect.pointWithin(gpt);
+   }
+   return false;
+}
+
+bool ossimTiledElevationDatabase::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   static const char M[] = "ossimTiledElevationDatabase::loadState";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << M << " entered..." << "\nkwl:\n" << kwl << "\n";
+   }     
+   bool result = false;
+   const char* lookup = kwl.find(prefix, "type");
+   if ( lookup )
+   {
+      std::string type = lookup;
+      if ( ( type == "image_directory" ) || ( type == "ossimTiledElevationDatabase" ) )
+      {
+         result = ossimElevationDatabase::loadState(kwl, prefix);
+      }
+   }
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " result=" << (result?"true\n":"false\n");
+   }
+
+   return result;
+}
+
+bool ossimTiledElevationDatabase::saveState(ossimKeywordlist& kwl, const char* prefix) const
+{
+   return ossimElevationDatabase::saveState(kwl, prefix);
+}
+
+// Private method:
+bool ossimTiledElevationDatabase::isDirectoryBasedImage(ossimRefPtr<ossimImageHandler> ih)
+{
+   bool result = false;
+   if ( ih.valid() )
+   {
+      // Get the image handler name.
+      ossimString imageHandlerName = ih->getClassName();
+      if ( (imageHandlerName == "ossimAdrgTileSource") ||
+           (imageHandlerName == "ossimCibCadrgTileSource") )  
+      {
+         result = true;
+      }
+   }
+   return result;
+}
+
+bool ossimTiledElevationDatabase::isCompatible(ossimImageHandler* ih,
+                                               ossimImageGeometry* geom,
+                                               ossimProjection* proj) const
+{
+   //---
+   // Check for match of the following against the first entry:
+   // bands
+   // projection
+   // scalar type
+   // scale
+   //---
+   bool result = false;
+
+   if ( m_entries.size() && ih && geom && proj )
+   {
+      ossimRefPtr<const ossimImageHandler> entry0_ih = m_entries[0].m_sic->getImageHandler();
+      
+      // Check scalar type and bands.
+      if ( (entry0_ih->getOutputScalarType() == ih->getOutputScalarType()) &&
+           (entry0_ih->getNumberOfOutputBands() == ih->getNumberOfOutputBands()) )
+      {
+         // Check the scale.
+         ossimRefPtr<const ossimMapProjection> mapProj =
+            dynamic_cast<const ossimMapProjection*>(proj);
+         if ( mapProj.valid() )
+         {
+            ossimRefPtr<const ossimMapProjection> refMapProj =
+               dynamic_cast<const ossimMapProjection*>(m_referenceProj.get());
+            
+            if ( mapProj->isGeographic() )
+            {
+               if ( refMapProj->getDecimalDegreesPerPixel() ==
+                    mapProj->getDecimalDegreesPerPixel() )
+               {
+                  result = true;
+               }
+               else if ( refMapProj->getMetersPerPixel() ==
+                         mapProj->getMetersPerPixel() )
+               {
+                  result = true;
+               }
+            }
+         }
+         else // sensor model
+         {
+            if ( proj->getMetersPerPixel() == m_referenceProj->getMetersPerPixel() )
+            {
+               result = true;
+            }
+         }
+      }
+   }
+   
+   return result;
+}
+
+void ossimTiledElevationDatabase::getBoundingRect(
+   ossimRefPtr<ossimImageGeometry> geom, ossimGrect& boundingRect) const
+{
+   if ( geom.valid() )
+   {
+      std::vector<ossimGpt> corner(4);
+      if ( geom->getCornerGpts(corner[0], corner[1], corner[2], corner[3]) )
+      {
+         ossimGpt ulGpt(corner[0]);
+         ossimGpt lrGpt(corner[0]);
+         for ( ossim_uint32 i = 1; i < 4; ++i )
+         {
+            if ( corner[i].lon < ulGpt.lon ) ulGpt.lon = corner[i].lon;
+            if ( corner[i].lat > ulGpt.lat ) ulGpt.lat = corner[i].lat;
+            if ( corner[i].lon > lrGpt.lon ) lrGpt.lon = corner[i].lon;
+            if ( corner[i].lat < lrGpt.lat ) lrGpt.lat = corner[i].lat;
+         }
+         boundingRect = ossimGrect(ulGpt, lrGpt);
+      }
+      else
+      {
+         boundingRect.makeNan();
+      }
+   }
+}
+void ossimTiledElevationDatabase::mapRegion()
+{
+   static const char M[] = "ossimTiledElevationDatabase::mapRegion";
+   
+   if ( m_entries.size() && ( m_requestedRect.isLonLatNan() == false ) )
+   {
+      ossimRefPtr<ossimOrthoImageMosaic> mosaic = new ossimOrthoImageMosaic();
+      std::vector<ossimTiledElevationEntry>::iterator i = m_entries.begin();
+      while ( i != m_entries.end() )
+      {
+         mosaic->connectMyInputTo( (*i).m_sic.get() );
+         ++i;
+      }
+
+      // Compute the requested rectangle in view space.
+      ossimRefPtr<ossimImageGeometry> geom = mosaic->getImageGeometry();
+      if ( geom.valid() )
+      {
+         ossimDpt ulDpt;
+         ossimDpt lrDpt;
+         geom->worldToLocal(m_requestedRect.ul(), ulDpt);
+         geom->worldToLocal(m_requestedRect.lr(), lrDpt);
+
+         // Expand out to fall on even view coordinates.
+         ulDpt.x = std::floor(ulDpt.x);
+         ulDpt.y = std::floor(ulDpt.y);
+         lrDpt.x = std::ceil(lrDpt.x);
+         lrDpt.y = std::floor(lrDpt.y);
+
+         // Get new(expanded) corners in ground space.
+         ossimGpt ulGpt;
+         ossimGpt lrGpt;
+         geom->localToWorld(ulDpt, ulGpt);
+         geom->localToWorld(lrDpt, lrGpt);
+         theGroundRect = ossimGrect(ulGpt, lrGpt);
+            
+         // Expanded requested rect in view space.
+         ossimIpt ulIpt = ulDpt;
+         ossimIpt lrIpt = lrDpt;
+         const ossimIrect VIEW_RECT(ulIpt, lrIpt);
+
+         // Get the data.
+         ossimRefPtr<ossimImageData> data = mosaic->getTile(VIEW_RECT, 0);
+         if ( data.valid() )
+         {
+            // Initialize the grid:
+            const ossimIpt SIZE( data->getWidth(), data->getHeight() );
+            const ossimDpt ORIGIN(ulGpt.lon, lrGpt.lat); // SouthWest corner
+            const ossimDpt SPACING( (lrGpt.lon-ulGpt.lon)/(SIZE.x-1),
+                                    (ulGpt.lat-lrGpt.lat)/(SIZE.y-1) );
+            if ( !m_grid ) m_grid = new ossimDblGrid();
+            m_grid->initialize(SIZE, ORIGIN, SPACING, ossim::nan());
+
+            if ( traceDebug() )
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << M
+                  << "\nrequested view rect: " << VIEW_RECT
+                  << "\nexpanded ground rect: " << theGroundRect
+                  << "\norigin:  " << ORIGIN
+                  << "\nsize:    " << SIZE
+                  << "\nspacing: " << SPACING << std::endl;
+            }
+
+            // Fill the grid:
+            switch( data->getScalarType() )
+            {
+               case OSSIM_SINT16:
+               {
+                  fillGrid(ossim_sint16(0), data);
+                  break;
+               }
+               case OSSIM_SINT32:
+               {
+                  fillGrid(ossim_sint32(0), data);
+                  break;
+               }
+               case OSSIM_FLOAT32:
+               {
+                  fillGrid(ossim_float32(0), data);
+                  break;
+               }
+               case OSSIM_FLOAT64:
+               {
+                  fillGrid(ossim_float64(0), data);
+                  break;
+               }
+               case OSSIM_UINT8:
+               case OSSIM_SINT8:
+               case OSSIM_USHORT11:
+               case OSSIM_UINT16:
+               case OSSIM_UINT32:
+               case OSSIM_NORMALIZED_DOUBLE:
+               case OSSIM_NORMALIZED_FLOAT:
+               case OSSIM_SCALAR_UNKNOWN:
+               default:
+               {
+                  std::string errMsg = M;
+                  errMsg += " ERROR:\nUnhandled scalar type: ";
+                  errMsg += data->getScalarTypeAsString().string();
+                  throw ossimException(errMsg);
+               }
+            }
+            
+         } // if ( data.valid() )
+
+      } // if ( geom.valid() )
+
+   } // if ( m_entries.size() && ...
+}
+
+template <class T> void ossimTiledElevationDatabase::fillGrid(T /* dummyTemplate */,
+                                                              ossimRefPtr<ossimImageData> data)
+{
+   if ( data.valid() )
+   {
+      // Copy to grid reversing the lines as the ossimDblGrid's origin is the SW corner.
+      const ossim_float64 NP  = data->getNullPix(0);
+      const T* buf = static_cast<T*>(data->getBuf(0));
+      if ( buf )
+      {
+         const ossimIpt SIZE( data->getWidth(), data->getHeight() );
+         ossim_int32 bufIdx = (SIZE.y-1) * data->getWidth();
+         ossim_int32 grdY = 0;
+         for (ossim_int32 y = SIZE.y-1; y >= 0; --y)
+         {
+            for (ossim_int32 x = 0; x < SIZE.x; ++ x)
+            {
+               ossim_float64 v = static_cast<ossim_float64>(buf[bufIdx+x]);
+               m_grid->setNode(x, grdY, (v!=NP?v:ossim::nan()) );
+            }
+            bufIdx -= data->getWidth();
+            ++grdY;
+         }
+      }
+   }
+}
+
+// Hidden from use...
+ossimTiledElevationDatabase::ossimTiledElevationDatabase(
+   const ossimTiledElevationDatabase& /* copy_this */)
+{
+}
+
+// Private container class:
+ossimTiledElevationDatabase::ossimTiledElevationEntry::ossimTiledElevationEntry()
+   : m_rect(),
+     m_sic(0)
+{}
+                                                   
+ossimTiledElevationDatabase::ossimTiledElevationEntry::ossimTiledElevationEntry(
+   const ossimGrect& rect, ossimRefPtr<ossimSingleImageChain> sic )
+   : m_rect(rect),
+     m_sic(sic)
+{}
+
+std::ostream& ossimTiledElevationDatabase::print(ostream& out) const
+{
+   ossimKeywordlist kwl;
+   saveState(kwl,0);
+   out << "\nossimTiledElevationDatabase @ "<< (ossim_uint64) this << "\n"
+         << kwl <<ends;
+   return out;
+}
+
+
diff --git a/src/ossim/font/makefile.vc b/ossim/src/ossim/font/makefile.vc
similarity index 100%
rename from src/ossim/font/makefile.vc
rename to ossim/src/ossim/font/makefile.vc
diff --git a/src/ossim/font/ossimFont.cpp b/ossim/src/ossim/font/ossimFont.cpp
similarity index 100%
rename from src/ossim/font/ossimFont.cpp
rename to ossim/src/ossim/font/ossimFont.cpp
diff --git a/src/ossim/font/ossimFontFactoryRegistry.cpp b/ossim/src/ossim/font/ossimFontFactoryRegistry.cpp
similarity index 100%
rename from src/ossim/font/ossimFontFactoryRegistry.cpp
rename to ossim/src/ossim/font/ossimFontFactoryRegistry.cpp
diff --git a/src/ossim/font/ossimFreeTypeFont.cpp b/ossim/src/ossim/font/ossimFreeTypeFont.cpp
similarity index 100%
rename from src/ossim/font/ossimFreeTypeFont.cpp
rename to ossim/src/ossim/font/ossimFreeTypeFont.cpp
diff --git a/src/ossim/font/ossimFreeTypeFontFactory.cpp b/ossim/src/ossim/font/ossimFreeTypeFontFactory.cpp
similarity index 100%
rename from src/ossim/font/ossimFreeTypeFontFactory.cpp
rename to ossim/src/ossim/font/ossimFreeTypeFontFactory.cpp
diff --git a/src/ossim/font/ossimGdBitmapFont.cpp b/ossim/src/ossim/font/ossimGdBitmapFont.cpp
similarity index 100%
rename from src/ossim/font/ossimGdBitmapFont.cpp
rename to ossim/src/ossim/font/ossimGdBitmapFont.cpp
diff --git a/src/ossim/imaging/makefile.vc b/ossim/src/ossim/imaging/makefile.vc
similarity index 100%
rename from src/ossim/imaging/makefile.vc
rename to ossim/src/ossim/imaging/makefile.vc
diff --git a/ossim/src/ossim/imaging/ossim3x3ConvolutionFilter.cpp b/ossim/src/ossim/imaging/ossim3x3ConvolutionFilter.cpp
new file mode 100644
index 0000000..5e9f80d
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossim3x3ConvolutionFilter.cpp
@@ -0,0 +1,634 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossim3x3ConvolutionFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstdlib>
+#include <ossim/imaging/ossim3x3ConvolutionFilter.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimMatrixProperty.h>
+
+RTTI_DEF1(ossim3x3ConvolutionFilter, "ossim3x3ConvolutionFilter", ossimImageSourceFilter);
+
+ossim3x3ConvolutionFilter::ossim3x3ConvolutionFilter(ossimObject* owner)
+   :ossimImageSourceFilter(owner),
+    theTile(NULL),
+    theNullPixValue(0),
+    theMinPixValue(0),
+    theMaxPixValue(0)
+{
+   theKernel[0][0] = 0.0; theKernel[0][1] = 0.0; theKernel[0][2] = 0.0;
+   theKernel[1][0] = 0.0; theKernel[1][1] = 1.0; theKernel[1][2] = 0.0;
+   theKernel[2][0] = 0.0; theKernel[2][1] = 0.0; theKernel[2][2] = 0.0;
+   
+}
+
+ossim3x3ConvolutionFilter::~ossim3x3ConvolutionFilter()
+{
+}
+
+ossimRefPtr<ossimImageData> ossim3x3ConvolutionFilter::getTile(
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   if(!theInputConnection)
+   {
+      return theTile;
+   }
+
+   if(!isSourceEnabled())
+   {
+      return theInputConnection->getTile(tileRect, resLevel);
+   }
+
+   //---
+   // We have a 3x3 matrix so stretch the rect out to cover
+   // the required pixels.  We only need 1 pixel to the left
+   // and right of the center pixel.
+   //---
+   ossimIrect newRect(ossimIpt(tileRect.ul().x - 1,
+                               tileRect.ul().y - 1),
+                      ossimIpt(tileRect.lr().x + 1,
+                               tileRect.lr().y + 1));
+   
+   ossimRefPtr<ossimImageData> data = theInputConnection->getTile(newRect,
+                                                                  resLevel);
+
+   if(!data.valid() || !data->getBuf())
+   {
+      return data;
+   }
+
+    // First time through or after an initialize()...
+   if (!theTile.valid())
+   {
+      allocate();
+      if (!theTile.valid()) // Should never happen!
+      {
+         return data;
+      }
+   }
+
+   // First time through, after an initialize() or a setKernel()...
+   if (!theNullPixValue.size())
+   {
+      computeNullMinMax();
+      if (!theNullPixValue.size()) // Should never happen!
+      {
+         return data;
+      }
+   }
+
+   theTile->setImageRectangle(tileRect);
+   theTile->makeBlank();
+   
+   switch(data->getScalarType())
+   {
+      case OSSIM_UCHAR:
+      {
+         if(data->getDataObjectStatus() == OSSIM_FULL)
+         {
+            convolveFull(static_cast<ossim_uint8>(0), data, theTile);
+         }
+         else
+         {
+            convolvePartial(static_cast<ossim_uint8>(0), data, theTile);
+         }
+         break;
+      }
+      case OSSIM_FLOAT: 
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         if(data->getDataObjectStatus() == OSSIM_FULL)
+         {
+            convolveFull(static_cast<float>(0), data, theTile);
+         }
+         else
+         {
+            convolvePartial(static_cast<float>(0), data, theTile);
+         }
+         break;
+      }
+      case OSSIM_USHORT16:
+      case OSSIM_USHORT11:
+      {
+         if(data->getDataObjectStatus() == OSSIM_FULL)
+         {
+            convolveFull(static_cast<ossim_uint16>(0), data, theTile);
+         }
+         else
+         {
+            convolvePartial(static_cast<ossim_uint16>(0), data, theTile);
+         }
+         break;
+      }
+      case OSSIM_SSHORT16:
+      {
+         if(data->getDataObjectStatus() == OSSIM_FULL)
+         {
+            convolveFull(static_cast<ossim_sint16>(0), data, theTile);
+         }
+         else
+         {
+            convolvePartial(static_cast<ossim_sint16>(0), data, theTile);
+         }
+         break;
+      }
+      case OSSIM_DOUBLE:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         if(data->getDataObjectStatus() == OSSIM_FULL)
+         {
+            convolveFull(static_cast<double>(0), data, theTile);
+      }
+      else
+      {
+         convolvePartial(static_cast<double>(0), data, theTile);
+      }
+         break;
+      }
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossim3x3ConvolutionFilter::getTile WARNING:\n"
+            << "Scalar type = " << theTile->getScalarType()
+            << " Not supported by ossim3x3ConvolutionFilter" << endl;
+         break;
+      }
+   }
+   theTile->validate();
+   
+   return theTile;
+}
+
+
+template<class T> void ossim3x3ConvolutionFilter::convolvePartial(
+   T,
+   ossimRefPtr<ossimImageData> inputData,
+   ossimRefPtr<ossimImageData> outputData)
+{
+   // let's set up some temporary variables so we don't
+   // have to call the functions in loops.  Iknow that compilers
+   // typically optimize this out but if we are in debug mode 
+   // with no optimization it will still run fast
+   //
+   double sum = 0.0;
+   ossim_int32 inputW          = (ossim_int32)inputData->getWidth();
+   ossim_int32 outputW         = (ossim_int32)outputData->getWidth();
+   ossim_int32 outputH         = (ossim_int32)outputData->getHeight();
+   ossim_int32 numberOfBands   = (ossim_int32)inputData->getNumberOfBands();
+   ossimIpt outputOrigin  = outputData->getOrigin();
+   ossimIpt inputOrigin   = inputData->getOrigin();
+   
+   ossim_int32 startInputOffset = std::abs(outputOrigin.y - inputOrigin.y)*
+      inputW + std::abs(outputOrigin.x - inputOrigin.x);
+   ossim_int32 ulKernelStart    = -inputW - 1;
+   ossim_int32 leftKernelStart  = -1;
+   ossim_int32 llKernelStart    = inputW  - 1;
+   
+   T* ulKernelStartBuf    = NULL;
+   T* leftKernelStartBuf  = NULL;
+   T* llKernelStartBuf    = NULL;
+   
+   for(ossim_int32 band = 0; band < numberOfBands; ++band)
+   {
+      T* inputBuf  = static_cast<T*>(inputData->getBuf(band))+startInputOffset;
+      T* outputBuf = static_cast<T*>(outputData->getBuf(band));
+      T maxPix     = static_cast<T>(getMaxPixelValue(band));
+      T minPix     = static_cast<T>(getMinPixelValue(band));      
+      T nullPix    = static_cast<T>(inputData->getNullPix(band));
+      T oNullPix   = static_cast<T>(getNullPixelValue(band));
+      
+      if(inputBuf&&outputBuf)
+      {
+         for(ossim_int32 row = 0; row < outputW; ++row)
+         {
+            ossim_int32 rowOffset    = inputW*row;
+            ulKernelStartBuf   = inputBuf + (rowOffset + ulKernelStart);
+            leftKernelStartBuf = inputBuf + (rowOffset + leftKernelStart);
+            llKernelStartBuf   = inputBuf + (rowOffset + llKernelStart);
+            for(ossim_int32 col = 0; col < outputH; ++col)
+            {
+
+               if((ulKernelStartBuf[0]   != nullPix)&&
+                  (ulKernelStartBuf[1]   != nullPix)&&
+                  (ulKernelStartBuf[2]   != nullPix)&&
+                  (leftKernelStartBuf[0] != nullPix)&&
+                  (leftKernelStartBuf[1] != nullPix)&&
+                  (leftKernelStartBuf[2] != nullPix)&&
+                  (llKernelStartBuf[0]   != nullPix)&&
+                  (llKernelStartBuf[1]   != nullPix)&&
+                  (llKernelStartBuf[2]   != nullPix))
+               {
+                  sum = theKernel[0][0]*(double)ulKernelStartBuf[0] +
+                        theKernel[0][1]*(double)ulKernelStartBuf[1] +
+                        theKernel[0][2]*(double)ulKernelStartBuf[2] +
+                        theKernel[1][0]*(double)leftKernelStartBuf[0] +
+                        theKernel[1][1]*(double)leftKernelStartBuf[1] +
+                        theKernel[1][2]*(double)leftKernelStartBuf[2] +
+                        theKernel[2][0]*(double)llKernelStartBuf[0] +
+                        theKernel[2][1]*(double)llKernelStartBuf[1] +
+                        theKernel[2][2]*(double)llKernelStartBuf[2];
+                  
+                  if(sum > maxPix)
+                  {
+                     *outputBuf = maxPix;
+                  }
+                  else if(sum < minPix)
+                  {
+                     *outputBuf = minPix;
+                  }
+                  else
+                  {
+                     *outputBuf = static_cast<T>(sum);
+                  }
+               }
+               else {
+                  *outputBuf = oNullPix;
+               }
+               //
+               // Need to implement the convolution here
+               //
+               
+               ++ulKernelStartBuf;
+               ++leftKernelStartBuf;
+               ++llKernelStartBuf;
+               ++outputBuf;
+            }
+         }
+      }
+   }
+}
+
+template<class T> void ossim3x3ConvolutionFilter::convolveFull(
+   T,
+   ossimRefPtr<ossimImageData> inputData,
+   ossimRefPtr<ossimImageData> outputData)
+{
+   // let's set up some temporary variables so we don't
+   // have to call the functions in loops.  Iknow that compilers
+   // typically optimize this out but if we are in debug mode 
+   // with no optimization it will still run fast
+   //
+   double sum = 0.0;
+   ossim_int32 inputW = static_cast<ossim_int32>(inputData->getWidth());
+   ossim_uint32 outputW       = outputData->getWidth();
+   ossim_uint32 outputH       = outputData->getHeight();
+   ossim_uint32 numberOfBands = inputData->getNumberOfBands();
+   ossimIpt outputOrigin = outputData->getOrigin();
+   ossimIpt inputOrigin  = inputData->getOrigin();
+   
+   ossim_int32 startInputOffset = std::abs(outputOrigin.y - inputOrigin.y)*
+      inputW + std::abs(outputOrigin.x - inputOrigin.x);
+   ossim_int32 ulKernelStart    = -inputW - 1;
+   ossim_int32 leftKernelStart  = -1;
+   ossim_int32 llKernelStart    = inputW  - 1;
+   
+   T* ulKernelStartBuf   = NULL;
+   T* leftKernelStartBuf = NULL;
+   T* llKernelStartBuf   = NULL;
+   
+   for(ossim_uint32 band = 0; band < numberOfBands; ++band)
+   {
+      T* inputBuf  = static_cast<T*>(inputData->getBuf(band))+startInputOffset;
+      T* outputBuf = static_cast<T*>(outputData->getBuf(band));
+      T maxPix     = static_cast<T>(getMaxPixelValue(band));
+      T minPix     = static_cast<T>(getMinPixelValue(band));
+      
+      if(inputBuf&&outputBuf)
+      {
+         for(ossim_uint32 row = 0; row < outputW; ++row)
+         {
+            ossim_int32 rowOffset    = inputW*row;
+            ulKernelStartBuf   = inputBuf + (rowOffset + ulKernelStart);
+            leftKernelStartBuf = inputBuf + (rowOffset + leftKernelStart);
+            llKernelStartBuf   = inputBuf + (rowOffset + llKernelStart);
+            for(ossim_uint32 col = 0; col < outputH; ++col)
+            {
+               sum = theKernel[0][0]*(double)ulKernelStartBuf[0] +
+                     theKernel[0][1]*(double)ulKernelStartBuf[1] +
+                     theKernel[0][2]*(double)ulKernelStartBuf[2] +
+                     theKernel[1][0]*(double)leftKernelStartBuf[0] +
+                     theKernel[1][1]*(double)leftKernelStartBuf[1] +
+                     theKernel[1][2]*(double)leftKernelStartBuf[2] +
+                     theKernel[2][0]*(double)llKernelStartBuf[0] +
+                     theKernel[2][1]*(double)llKernelStartBuf[1] +
+                     theKernel[2][2]*(double)llKernelStartBuf[2];
+               
+               if(sum > maxPix)
+               {
+                  *outputBuf = maxPix;
+               }
+               else if(sum < minPix)
+               {
+                  *outputBuf = minPix;
+               }
+               else
+               {
+                  *outputBuf = static_cast<T>(sum);
+               }
+               //
+               // Need to implement the convolution here.
+               //
+
+               
+               ++ulKernelStartBuf;
+               ++leftKernelStartBuf;
+               ++llKernelStartBuf;
+               ++outputBuf;
+            }
+         }
+      }
+   }
+}
+
+void ossim3x3ConvolutionFilter::initialize()
+{
+   //---
+   // NOTE:
+   // Since initialize get called often sequentially we will wipe things slick
+   // but not reallocate to avoid multiple delete/allocates.
+   //
+   // On the first getTile call things will be reallocated/computed.
+   //---
+   theTile = NULL;
+   clearNullMinMax();
+}
+
+void ossim3x3ConvolutionFilter::allocate()
+{   
+   if(theInputConnection)
+   {
+      ossimImageDataFactory* idf = ossimImageDataFactory::instance();
+      
+      theTile = idf->create(this,
+                            this);
+      
+      theTile->initialize();
+   }
+}
+
+void ossim3x3ConvolutionFilter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property) return;
+   if(property->getName() == "Kernel")
+   {
+      ossimMatrixProperty* matrixProperty = PTR_CAST(ossimMatrixProperty,
+                                                     property.get());
+      if(matrixProperty)
+      {
+         theKernel[0][0] = (*matrixProperty)(0,0);
+         theKernel[1][0] = (*matrixProperty)(1,0);
+         theKernel[2][0] = (*matrixProperty)(2,0);
+         theKernel[0][1] = (*matrixProperty)(0,1);
+         theKernel[1][1] = (*matrixProperty)(1,1);
+         theKernel[2][1] = (*matrixProperty)(2,1);
+         theKernel[0][2] = (*matrixProperty)(0,2);
+         theKernel[1][2] = (*matrixProperty)(1,2);
+         theKernel[2][2] = (*matrixProperty)(2,2);
+
+      }
+      else
+      {
+         ossimImageSourceFilter::setProperty(property);
+      }
+   }
+   else
+   {
+      ossimImageSourceFilter::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossim3x3ConvolutionFilter::getProperty(const ossimString& name)const
+{
+   if(name == "Kernel")
+   {
+      ossimMatrixProperty* property = new ossimMatrixProperty(name);
+      property->resize(3,3);
+      (*property)(0,0) = theKernel[0][0];
+      (*property)(1,0) = theKernel[1][0];
+      (*property)(2,0) = theKernel[2][0];
+      (*property)(0,1) = theKernel[0][1];
+      (*property)(1,1) = theKernel[1][1];
+      (*property)(2,1) = theKernel[2][1];
+      (*property)(0,2) = theKernel[0][2];
+      (*property)(1,2) = theKernel[1][2];
+      (*property)(2,2) = theKernel[2][2];
+      property->setCacheRefreshBit();
+
+      return property;
+   }
+   return ossimImageSourceFilter::getProperty(name);
+}
+
+void ossim3x3ConvolutionFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageSourceFilter::getPropertyNames(propertyNames);
+   propertyNames.push_back("Kernel");
+}
+
+bool ossim3x3ConvolutionFilter::saveState(ossimKeywordlist& kwl,
+                                          const char* prefix)const
+{   
+   kwl.add(prefix,
+           "rows",
+           3,
+           true);
+   
+   kwl.add(prefix,
+           "cols",
+           3,
+           true);
+   
+   for(ossim_int32 row = 0; row < 3; ++row)
+   {
+      for(ossim_int32 col =0; col < 3; ++col)
+      {
+         ossimString newPrefix = "m" +
+                                 ossimString::toString(row+1) + "_" +
+                                 ossimString::toString(col+1);
+         kwl.add(prefix,
+                 newPrefix,
+                 theKernel[row][col],
+                 true);          
+      }
+   }
+
+   
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
+
+bool ossim3x3ConvolutionFilter::loadState(const ossimKeywordlist& kwl,
+                                          const char* prefix)
+{
+   ossimString newPrefix = prefix;
+   newPrefix += ossimString("m");
+   
+   for(ossim_int32 r = 0; r < 3; r++)
+   {
+      for(ossim_int32 c = 0; c < 3; c++)
+      {
+         theKernel[r][c] = 0.0;
+         
+         ossimString value = ossimString::toString(r+1);
+         value += "_";
+         value += ossimString::toString(c+1);
+         
+         const char* v = kwl.find(newPrefix.c_str(),
+                                  value.c_str());
+         if(v)
+         {
+            theKernel[r][c] = ossimString(v).toDouble();
+         }
+      }
+   }
+   
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
+void ossim3x3ConvolutionFilter::getKernel(double kernel[3][3])
+{
+   kernel[0][0] = theKernel[0][0];
+   kernel[0][1] = theKernel[0][1];
+   kernel[0][2] = theKernel[0][2];
+   kernel[1][0] = theKernel[1][0];
+   kernel[1][1] = theKernel[1][1];
+   kernel[1][2] = theKernel[1][2];
+   kernel[2][0] = theKernel[2][0];
+   kernel[2][1] = theKernel[2][1];
+   kernel[2][2] = theKernel[2][2];
+}
+
+void ossim3x3ConvolutionFilter::setKernel(double kernel[3][3])
+{
+   theKernel[0][0] = kernel[0][0];
+   theKernel[0][1] = kernel[0][1];
+   theKernel[0][2] = kernel[0][2];
+   theKernel[1][0] = kernel[1][0];
+   theKernel[1][1] = kernel[1][1];
+   theKernel[1][2] = kernel[1][2];
+   theKernel[2][0] = kernel[2][0];
+   theKernel[2][1] = kernel[2][1];
+   theKernel[2][2] = kernel[2][2];
+
+   // Will be recomputed first getTile call.
+   clearNullMinMax();
+}
+
+double ossim3x3ConvolutionFilter::getNullPixelValue(ossim_uint32 band)const
+{
+   if( isSourceEnabled() && (band < theNullPixValue.size()) )
+   {
+      return theNullPixValue[band];
+   }
+
+   return ossim::defaultNull(getOutputScalarType());
+}
+
+double ossim3x3ConvolutionFilter::getMinPixelValue(ossim_uint32 band)const
+{
+   if( isSourceEnabled() && (band < theMinPixValue.size()) )
+   {
+      return theMinPixValue[band];
+   }
+   
+   return ossimImageSource::getMinPixelValue(band);
+}
+
+double ossim3x3ConvolutionFilter::getMaxPixelValue(ossim_uint32 band)const
+{
+   if( isSourceEnabled() && (band < theMaxPixValue.size()) )
+   {
+      return theMaxPixValue[band];
+   }
+
+   return ossimImageSource::getMaxPixelValue(band);
+}
+
+void ossim3x3ConvolutionFilter::clearNullMinMax()
+{
+   theNullPixValue.clear();
+   theMinPixValue.clear();
+   theMaxPixValue.clear();
+}
+
+void ossim3x3ConvolutionFilter::computeNullMinMax()
+{
+   const ossim_uint32 BANDS = getNumberOfOutputBands();
+
+   theNullPixValue.resize(BANDS);
+   theMinPixValue.resize(BANDS);
+   theMaxPixValue.resize(BANDS);
+
+   ossim_float64 defaultNull = ossim::defaultNull(getOutputScalarType());
+   ossim_float64 defaultMin = ossim::defaultMin(getOutputScalarType());
+   ossim_float64 defaultMax = ossim::defaultMax(getOutputScalarType());
+  
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      if(theInputConnection)
+      {
+         ossim_float64 inputNull = theInputConnection->getNullPixelValue(band);
+         ossim_float64 inputMin  = theInputConnection->getMinPixelValue(band);
+         ossim_float64 inputMax  = theInputConnection->getMaxPixelValue(band);
+         ossim_float64 tempMin   = 0.0;
+         ossim_float64 tempMax   = 0.0;
+         ossim_float64 k         = 0.0;
+         for(int i=0;i<3;++i)
+         {
+            for(int j=0;j<3;++j)
+            {
+               k=theKernel[i][j];
+               tempMin += (k<0.0) ? k*inputMax : k*inputMin;
+               tempMax += (k>0.0) ? k*inputMax : k*inputMin;
+            }
+         }
+
+         if((inputNull < getMinPixelValue(band)) ||
+            (inputNull > getMaxPixelValue(band)))
+         {
+            theNullPixValue[band] = inputNull;
+         }
+         else
+         {
+            theNullPixValue[band] = defaultNull;
+         }
+
+         if((tempMin >= defaultMin) && (tempMin <= defaultMax))
+         {
+            theMinPixValue[band] = tempMin;
+         }
+         else
+         {
+            theMinPixValue[band] = defaultMin;
+         }
+
+         if((tempMax >= defaultMin) && (tempMax <= defaultMax))
+         {
+            theMaxPixValue[band] = tempMax;
+         }
+         else
+         {
+            theMaxPixValue[band] = defaultMax;
+         }
+         
+      }
+      else // No input connection...
+      {
+         theNullPixValue[band] = defaultNull;
+         theMinPixValue[band]  = defaultMin;
+         theMaxPixValue[band]  = defaultMax;
+      }
+      
+   } // End of band loop.
+}
+
diff --git a/ossim/src/ossim/imaging/ossimAOD.cpp b/ossim/src/ossim/imaging/ossimAOD.cpp
new file mode 100644
index 0000000..ea212fe
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimAOD.cpp
@@ -0,0 +1,238 @@
+//*******************************************************************
+// Copyright (C) 2002 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Kathy Minear
+//
+// Description:
+// 
+// Class to compute Aerosol Optical Depth (AOD) for with atmospheric
+// correction.
+// 
+//
+//*************************************************************************
+// $Id: ossimAOD.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <math.h>
+#include <ossim/imaging/ossimAOD.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimU8ImageData.h>
+
+
+RTTI_DEF1(ossimAOD, "ossimAOD", ossimImageSourceFilter)
+
+static ossimTrace traceDebug("ossimAOD:debug");
+
+ossimAOD::ossimAOD(ossimObject* owner)
+   :
+      ossimImageSourceFilter  (owner),  // base class
+      theTile                 (NULL)
+{
+   //***
+   // Set the base class "theEnableFlag" to off since no adjustments have been
+   // made yet.
+   //***
+   disableSource();
+
+   // Construction not complete.
+}
+
+ossimAOD::ossimAOD(ossimImageSource* inputSource)
+   :
+      ossimImageSourceFilter  (NULL, inputSource),  // base class
+      theTile                 (NULL)
+{
+   //***
+   // Set the base class "theEnableFlag" to off since no adjustments have been
+   // made yet.
+   //***
+   disableSource();
+
+   if (inputSource == NULL)
+   {
+      setErrorStatus();
+      cerr << "ossimAOD::ossimAOD ERROR:"
+           << "\nNull input source passed to constructor!" << endl;
+      return;
+   }
+
+   initialize();
+}
+
+
+ossimAOD::ossimAOD(ossimObject* owner,
+                                         ossimImageSource* inputSource)
+   :
+      ossimImageSourceFilter  (owner, inputSource),  // base class     
+      theTile                 (NULL)
+{
+   //***
+   // Set the base class "theEnableFlag" to off since no adjustments have been
+   // made yet.
+   //***
+   disableSource();
+
+   if (inputSource == NULL)
+   {
+      setErrorStatus();
+      cerr << "ossimAOD::ossimAOD ERROR:"
+           << "\nNull input source passed to constructor!" << endl;
+      return;
+   }
+
+   initialize();
+}
+
+ossimAOD::~ossimAOD()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimAOD::getTile(const ossimIrect& tile_rect,
+                                              ossim_uint32 resLevel)
+{
+   if (!theInputConnection)
+   {
+      return ossimRefPtr<ossimImageData>();
+   }
+      
+   // Fetch tile from pointer from the input source.
+   ossimRefPtr<ossimImageData> inputTile = theInputConnection->getTile(tile_rect,
+                                                                       resLevel);
+
+
+   if (!inputTile.valid())  // Just in case...
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimAOD::getTile ERROR:"
+         << "\nReceived null pointer to tile from input source!"
+         << "\nReturning blank tile."
+         << endl;
+      return inputTile;
+   }
+
+   ossimDataObjectStatus tile_status = inputTile->getDataObjectStatus();
+
+   if ( !theEnableFlag ||
+        (tile_status == OSSIM_NULL) ||
+        (tile_status == OSSIM_EMPTY) )
+   {
+      return inputTile;
+   }
+   
+   if (!theTile.valid())
+   {
+      allocate();
+      if (!theTile.valid())
+      {
+         return inputTile;
+      }
+   }
+
+   ossim_uint32 w     = tile_rect.width();
+   ossim_uint32 h     = tile_rect.height();
+   ossim_uint32 tw    = theTile->getWidth();
+   ossim_uint32 th    = theTile->getHeight();
+   // ossim_uint32 bands = theTile->getNumberOfBands();
+
+   // Set the origin of the output tile.
+   theTile->setOrigin(tile_rect.ul());
+
+   if(w*h != tw*th)
+   {
+      theTile->setWidthHeight(w, h);
+      theTile->initialize();
+   }
+   return theTile;
+}
+
+void ossimAOD::initialize()
+{
+   ossimImageSourceFilter::initialize();
+}
+
+void ossimAOD::allocate()
+{
+   if(theInputConnection)
+   {
+      theTile = ossimImageDataFactory::instance()->create(this,
+                                                          theInputConnection);
+      theTile->initialize();
+      setInitializedFlag(true);
+      clearErrorStatus();
+   }
+   else
+   {
+      setInitializedFlag(false);
+      setErrorStatus();
+      cerr << "ossimAOD::initialize ERROR:"
+           << "\nCannot call method when input connection is NULL!"
+           << endl;
+   };
+
+   verifyEnabled();
+}
+
+bool ossimAOD::loadState(const ossimKeywordlist& /* kwl */, const char* /* prefix */)
+{
+   static const char MODULE[] = "ossimAOD::loadState()";
+
+   if (traceDebug())  CLOG << "entering..." << endl;
+
+   if (!theTile)
+   {
+      cerr << MODULE << " ERROR:"
+           << "Not initialized..." << endl;
+      return false;
+   }
+
+   if (traceDebug())
+   {
+      CLOG << "DEBUG:"
+           << *this
+           << "\nreturning..."
+           << endl;
+   }
+   
+   return true;
+}
+
+
+void ossimAOD::verifyEnabled()
+{
+   // Check all the pointers...
+   if ( !theInputConnection    || !theTile )
+   {
+      disableSource();
+      return;
+   }
+
+   enableSource();
+}
+
+ostream& ossimAOD::print(ostream& os) const
+{
+   os << "ossimAOD:"
+      << "\ntheEnableFlag:  " << (theEnableFlag?"enabled":"disabled")
+      << endl;
+
+   return os;
+}
+
+ostream& operator<<(ostream& os, const ossimAOD& hr)
+{
+   return hr.print(os);
+}
+
+void ossimAOD::writeTemplate(ostream& /* os */)
+{
+}
+
+ossimString ossimAOD::getShortName() const
+{
+   return ossimString("Aerosol Optical Depth");
+}
+
diff --git a/src/ossim/imaging/ossimAdrgHeader.cpp b/ossim/src/ossim/imaging/ossimAdrgHeader.cpp
similarity index 100%
rename from src/ossim/imaging/ossimAdrgHeader.cpp
rename to ossim/src/ossim/imaging/ossimAdrgHeader.cpp
diff --git a/src/ossim/imaging/ossimAdrgTileSource.cpp b/ossim/src/ossim/imaging/ossimAdrgTileSource.cpp
similarity index 100%
rename from src/ossim/imaging/ossimAdrgTileSource.cpp
rename to ossim/src/ossim/imaging/ossimAdrgTileSource.cpp
diff --git a/src/ossim/imaging/ossimAnnotationEllipseObject.cpp b/ossim/src/ossim/imaging/ossimAnnotationEllipseObject.cpp
similarity index 100%
rename from src/ossim/imaging/ossimAnnotationEllipseObject.cpp
rename to ossim/src/ossim/imaging/ossimAnnotationEllipseObject.cpp
diff --git a/src/ossim/imaging/ossimAnnotationFontObject.cpp b/ossim/src/ossim/imaging/ossimAnnotationFontObject.cpp
similarity index 100%
rename from src/ossim/imaging/ossimAnnotationFontObject.cpp
rename to ossim/src/ossim/imaging/ossimAnnotationFontObject.cpp
diff --git a/src/ossim/imaging/ossimAnnotationGdBitmapFont.cpp b/ossim/src/ossim/imaging/ossimAnnotationGdBitmapFont.cpp
similarity index 100%
rename from src/ossim/imaging/ossimAnnotationGdBitmapFont.cpp
rename to ossim/src/ossim/imaging/ossimAnnotationGdBitmapFont.cpp
diff --git a/ossim/src/ossim/imaging/ossimAnnotationLineObject.cpp b/ossim/src/ossim/imaging/ossimAnnotationLineObject.cpp
new file mode 100644
index 0000000..c6f3c7f
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimAnnotationLineObject.cpp
@@ -0,0 +1,185 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimAnnotationLineObject.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimAnnotationLineObject.h>
+#include <ossim/imaging/ossimRgbImage.h>
+
+RTTI_DEF1(ossimAnnotationLineObject,
+          "ossimAnnotationLineObject",
+          ossimAnnotationObject)
+
+ossimAnnotationLineObject::ossimAnnotationLineObject()
+   :ossimAnnotationObject(),
+    theStart(0,0),
+    theEnd(0,0),
+    theBoundingRect(0,0,0,0)
+{
+}
+
+ossimAnnotationLineObject::ossimAnnotationLineObject(const ossimIpt& start,
+                                                     const ossimIpt& end,
+                                                     unsigned char r,
+                                                     unsigned char g,
+                                                     unsigned char b,
+                                                     long thickness)
+   :ossimAnnotationObject(r, g, b, thickness),
+    theStart(start),
+    theEnd(end)
+{
+   computeBoundingRect();
+}
+
+ossimAnnotationLineObject::ossimAnnotationLineObject(long x1,
+                                                     long y1,
+                                                     long x2,
+                                                     long y2,
+                                                     unsigned char r,
+                                                     unsigned char g,
+                                                     unsigned char b,
+                                                     long thickness)
+   :ossimAnnotationObject(r, g, b, thickness),
+    theStart(x1, y1),
+    theEnd(x2, y2)
+{
+   computeBoundingRect();
+}
+
+ossimAnnotationLineObject::ossimAnnotationLineObject(const ossimAnnotationLineObject& rhs)
+      :ossimAnnotationObject(rhs),
+       theStart(rhs.theStart),
+       theEnd(rhs.theEnd),
+       theBoundingRect(rhs.theBoundingRect)
+{
+}
+
+ossimObject* ossimAnnotationLineObject::dup()const
+{
+   return new ossimAnnotationLineObject(*this);
+}
+
+void ossimAnnotationLineObject::applyScale(double x, double y)
+{
+   theStart.x = ossim::round<int>(theStart.x*x);
+   theStart.y = ossim::round<int>(theStart.y*y);
+   theEnd.x   = ossim::round<int>(theEnd.x*x);
+   theEnd.y   = ossim::round<int>(theEnd.y*y);
+   computeBoundingRect();
+}
+
+ossimAnnotationObject* ossimAnnotationLineObject::getNewClippedObject(const ossimDrect& rect)const
+{
+   ossimAnnotationLineObject* result = (ossimAnnotationLineObject*)NULL;
+   ossimDpt start = theStart;
+   ossimDpt end   = theEnd;
+   
+   if(rect.clip(start, end))
+   {
+      result = (ossimAnnotationLineObject*)dup();
+      result->setLine(start, end);
+   }
+   
+   return result;
+}
+
+bool ossimAnnotationLineObject::intersects(const ossimDrect& rect)const
+{
+   ossimDpt start = theStart;
+   ossimDpt end   = theEnd;
+   
+   return rect.clip(start, end);
+}
+
+void ossimAnnotationLineObject::draw(ossimRgbImage& anImage)const
+{
+   if(anImage.getImageData().valid())
+   {
+      anImage.setDrawColor(theRed, theGreen, theBlue);
+      anImage.setThickness(theThickness);
+      ossimDrect imageRect = anImage.getImageData()->getImageRectangle();
+      ossimDpt start = theStart;
+      ossimDpt end   = theEnd;
+      
+      if(anImage.getImageData().valid())
+      {
+         // we need to extend it by a couple of pixels since
+         // if a pixel lies on the edge and then another pixel is just off
+         // the edge we will get a stair step and so for several pixels
+         // the line might be inside the image rectangle but the clip
+         // algorithm will only draw 1 pixel since it thinks the first
+         // point is inside and the second point is outside and will
+         // execute the clip algorithm keeping only the first
+         // point.
+         ossimDrect clipRect(imageRect.ul().x - 10,
+                             imageRect.ul().y - 10,
+                             imageRect.lr().x + 10,
+                             imageRect.lr().y + 10);
+         // now we can draw.
+         if(clipRect.clip(start, end))
+         {
+            anImage.drawLine(ossimIpt((int)start.x,
+                                      (int)start.y),
+                             ossimIpt((int)end.x,
+                                      (int)end.y));
+         }
+      }
+   }
+}
+
+std::ostream& ossimAnnotationLineObject::print(std::ostream& out)const
+{
+   out << "line_start:    " << theStart << endl
+       << "line_end:      " << theEnd   << endl
+       << "bounding_rect: " << theBoundingRect << endl;
+   return out;
+}
+
+void ossimAnnotationLineObject::getBoundingRect(ossimDrect& rect)const
+{
+   rect = theBoundingRect;
+}
+
+void ossimAnnotationLineObject::computeBoundingRect()
+{
+   vector<ossimDpt> pts(2);
+      
+   pts[0] = theStart;
+   pts[1] = theEnd;
+
+   theBoundingRect = ossimDrect(pts);
+}
+
+void ossimAnnotationLineObject::setLine(const ossimDpt& start,
+                                        const ossimDpt& end)
+{
+   theStart = start;
+   theEnd   = end;
+   computeBoundingRect();
+}
+void ossimAnnotationLineObject::getLine(ossimDpt& start, ossimDpt& end)
+{
+   start = theStart;
+   end   = theEnd;
+}
+
+bool ossimAnnotationLineObject::isPointWithin(const ossimDpt& point)const
+{
+  if(theBoundingRect.pointWithin(point))
+  {
+    // we will use the implicit form of a line to determine if the point is
+    // on the line.  For now we will just return true if it is within the 
+    // bounding rect.
+    return true;
+  }
+
+  return false;
+}
+
diff --git a/src/ossim/imaging/ossimAnnotationMultiEllipseObject.cpp b/ossim/src/ossim/imaging/ossimAnnotationMultiEllipseObject.cpp
similarity index 100%
rename from src/ossim/imaging/ossimAnnotationMultiEllipseObject.cpp
rename to ossim/src/ossim/imaging/ossimAnnotationMultiEllipseObject.cpp
diff --git a/ossim/src/ossim/imaging/ossimAnnotationMultiLineObject.cpp b/ossim/src/ossim/imaging/ossimAnnotationMultiLineObject.cpp
new file mode 100644
index 0000000..f0231a7
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimAnnotationMultiLineObject.cpp
@@ -0,0 +1,192 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimAnnotationMultiLineObject.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimAnnotationMultiLineObject.h>
+
+RTTI_DEF1(ossimAnnotationMultiLineObject,
+          "ossimAnnotationMultiLineObject",
+          ossimAnnotationObject);
+
+void ossimAnnotationMultiLineObject::draw(ossimRgbImage& anImage)const
+{
+   if(anImage.getImageData().valid())
+   {
+      anImage.setDrawColor(theRed, theGreen, theBlue);
+      anImage.setThickness(theThickness);
+      ossimDrect imageRect = anImage.getImageData()->getImageRectangle();
+
+      
+      
+      if(theBoundingRect.intersects(imageRect))
+      {
+         // we need to extend it by a couple of pixels since
+         // if a pixel lies on the edge and then another pixel is just off
+         // the edge we will get a stair step and so for several pixels
+         // the line might be inside the image rectangle but the clip
+         // algorithm will only draw 1 pixel since it thinks the first
+         // point is inside and the second point is outside and will
+         // execute the clip algorithm keeping only the first
+         // point.
+         ossimDrect clipRect(imageRect.ul().x - 10,
+                             imageRect.ul().y - 10,
+                             imageRect.lr().x + 10,
+                             imageRect.lr().y + 10);
+         
+         for(ossim_uint32 i = 0; i < thePolyLineList.size(); ++i)
+         {
+            const vector<ossimDpt>& vList = thePolyLineList[i].getVertexList();
+            
+            if(vList.size() == 1)
+            {
+               anImage.drawLine(ossimIpt(vList[0]),
+                                ossimIpt(vList[0]));
+            }
+            else
+            {
+               for(ossim_uint32 i2 = 0; i2 < (vList.size()-1); ++i2)
+               {
+                  ossimDpt start = vList[i2];
+                  ossimDpt end   = vList[i2+1];
+                  // now we can draw.
+                  if(clipRect.clip(start, end))
+                  {
+                     anImage.drawLine(ossimIpt((int)start.x,
+                                               (int)start.y),
+                                      ossimIpt((int)end.x,
+                                               (int)end.y));
+                  }
+               }
+            }
+         }
+      }
+   }
+}
+
+bool ossimAnnotationMultiLineObject::intersects(const ossimDrect& rect)const
+{
+
+   for(ossim_uint32 i = 0; i < thePolyLineList.size(); ++i)
+   {
+      if(thePolyLineList[i].isWithin(rect))
+      {
+         return true;
+      }
+   }
+   return false;
+}
+
+
+void ossimAnnotationMultiLineObject::applyScale(double x,
+                                                double y)
+{
+   for(ossim_uint32 i=0; i < thePolyLineList.size(); ++i)
+   {
+      vector<ossimDpt>& vList = thePolyLineList[i].getVertexList();
+      
+      for(ossim_uint32 i2 = 0; i2 < vList.size(); ++i2)
+      {
+         vList[i].x *= x;
+         vList[i].y *= y;
+         vList[i].x *= x;
+         vList[i].y *= y;
+      }
+   }
+   theBoundingRect *= ossimDpt(x, y);
+}
+
+ossimAnnotationObject* ossimAnnotationMultiLineObject::getNewClippedObject(const ossimDrect& rect)const
+{
+   ossimAnnotationMultiLineObject* result = (ossimAnnotationMultiLineObject*)NULL;
+
+   if(intersects(rect))
+   {
+      vector<ossimPolyLine> lineList;
+      vector<ossimPolyLine> tempResult;
+      
+      ossimDrect clipRect(rect.ul().x - 10,
+                          rect.ul().y - 10,
+                          rect.lr().x + 10,
+                          rect.lr().y + 10);
+
+      for(ossim_uint32 i =0; i< thePolyLineList.size();++i)
+      {
+         if(thePolyLineList[i].clipToRect(tempResult, clipRect))
+         {
+            lineList.insert(lineList.end(),
+                            tempResult.begin(),
+                            tempResult.end());
+         }
+      }
+      
+      if(lineList.size() > 0)
+      {
+         result = new ossimAnnotationMultiLineObject(lineList,
+                                                     theRed,
+                                                     theGreen,
+                                                     theBlue,
+                                                     theThickness);
+      }
+   }
+   
+   return result;
+}
+
+bool ossimAnnotationMultiLineObject::isPointWithin(const ossimDpt& imagePoint)const
+{
+   for(ossim_uint32 i=0; i < thePolyLineList.size(); ++i)
+   {
+      if(thePolyLineList[i].isPointWithin(imagePoint))
+      {
+         return true;
+      }
+      
+   }
+
+   return false;
+}
+
+void ossimAnnotationMultiLineObject::computeBoundingRect()
+{
+   theBoundingRect.makeNan();
+   
+   if(thePolyLineList.size() == 1)
+   {
+      theBoundingRect = thePolyLineList[0].getBoundingRect();
+   }
+   else if(thePolyLineList.size() > 1)
+   {
+      for(ossim_uint32 i = 0; i < thePolyLineList.size(); ++i)
+      {
+         ossimDrect rect = thePolyLineList[i].getBoundingRect();
+         if(theBoundingRect.hasNans())
+         {
+            theBoundingRect = rect;
+         }
+         else if(!rect.hasNans())
+         {
+            theBoundingRect = theBoundingRect.combine(rect);
+         }
+      }
+   }
+}
+
+std::ostream& ossimAnnotationMultiLineObject::print(std::ostream& out)const
+{
+   ossimAnnotationObject::print(out);
+
+   for(ossim_uint32 i = 0; i < thePolyLineList.size();++i)
+   {
+      out << thePolyLineList[i] << endl
+          <<"______________________________________"<<endl;
+   }
+   return out;
+}
+
diff --git a/src/ossim/imaging/ossimAnnotationMultiPolyLineObject.cpp b/ossim/src/ossim/imaging/ossimAnnotationMultiPolyLineObject.cpp
similarity index 100%
rename from src/ossim/imaging/ossimAnnotationMultiPolyLineObject.cpp
rename to ossim/src/ossim/imaging/ossimAnnotationMultiPolyLineObject.cpp
diff --git a/src/ossim/imaging/ossimAnnotationMultiPolyObject.cpp b/ossim/src/ossim/imaging/ossimAnnotationMultiPolyObject.cpp
similarity index 100%
rename from src/ossim/imaging/ossimAnnotationMultiPolyObject.cpp
rename to ossim/src/ossim/imaging/ossimAnnotationMultiPolyObject.cpp
diff --git a/src/ossim/imaging/ossimAnnotationObject.cpp b/ossim/src/ossim/imaging/ossimAnnotationObject.cpp
similarity index 100%
rename from src/ossim/imaging/ossimAnnotationObject.cpp
rename to ossim/src/ossim/imaging/ossimAnnotationObject.cpp
diff --git a/src/ossim/imaging/ossimAnnotationObjectFactory.cpp b/ossim/src/ossim/imaging/ossimAnnotationObjectFactory.cpp
similarity index 100%
rename from src/ossim/imaging/ossimAnnotationObjectFactory.cpp
rename to ossim/src/ossim/imaging/ossimAnnotationObjectFactory.cpp
diff --git a/src/ossim/imaging/ossimAnnotationPolyObject.cpp b/ossim/src/ossim/imaging/ossimAnnotationPolyObject.cpp
similarity index 100%
rename from src/ossim/imaging/ossimAnnotationPolyObject.cpp
rename to ossim/src/ossim/imaging/ossimAnnotationPolyObject.cpp
diff --git a/src/ossim/imaging/ossimAnnotationSource.cpp b/ossim/src/ossim/imaging/ossimAnnotationSource.cpp
similarity index 100%
rename from src/ossim/imaging/ossimAnnotationSource.cpp
rename to ossim/src/ossim/imaging/ossimAnnotationSource.cpp
diff --git a/ossim/src/ossim/imaging/ossimAppFixedTileCache.cpp b/ossim/src/ossim/imaging/ossimAppFixedTileCache.cpp
new file mode 100644
index 0000000..13e566a
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimAppFixedTileCache.cpp
@@ -0,0 +1,431 @@
+//******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: This file contains the Application cache algorithm
+//
+//***********************************
+// $Id: ossimAppFixedTileCache.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <algorithm>
+#include <sstream>
+#include <ossim/imaging/ossimAppFixedTileCache.h>
+#include <ossim/imaging/ossimFixedTileCache.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimTrace.h>
+#include <OpenThreads/ScopedLock>
+
+ossimAppFixedTileCache* ossimAppFixedTileCache::theInstance = 0;
+ossimAppFixedTileCache::ossimAppFixedCacheId ossimAppFixedTileCache::theUniqueAppIdCounter = 0;
+const ossim_uint32 ossimAppFixedTileCache::DEFAULT_SIZE = 1024*1024*80;
+
+static const ossimTrace traceDebug("ossimAppFixedTileCache:debug");
+std::ostream& operator <<(std::ostream& out, const ossimAppFixedTileCache& rhs)
+{
+   std::map<ossimAppFixedTileCache::ossimAppFixedCacheId, ossimFixedTileCache*>::const_iterator iter = rhs.theAppCacheMap.begin();
+
+   if(iter == rhs.theAppCacheMap.end())
+   {
+      ossimNotify(ossimNotifyLevel_NOTICE)
+         << "***** APP CACHE EMPTY *****" << endl;
+   }
+   else
+   {
+      while(iter != rhs.theAppCacheMap.end())
+      {
+         out << "Cache id = "<< (*iter).first << " size = " << (*iter).second->getCacheSize() << endl;
+         ++iter;
+      }
+   }
+
+   return out;
+}
+
+
+ossimAppFixedTileCache::ossimAppFixedTileCache()
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimAppFixedTileCache::ossimAppFixedTileCache() DEBUG: entered ..." << std::endl;
+   }
+   theInstance = this;
+   theTileSize = ossimIpt(64, 64);
+   theCurrentCacheSize = 0;
+
+   // ossim::defaultTileSize(theTileSize);
+   
+   ossim_uint32 cacheSize = ossimString(ossimPreferences::instance()->findPreference("cache_size")).toUInt32()*(1024*1024);
+   const char* tileSize = ossimPreferences::instance()->findPreference("tile_size");
+   if(tileSize)
+   {
+      ossimString tempString(tileSize);
+      std::vector<ossimString> splitString;
+      tempString = tempString.trim();
+      tempString.split(splitString, " ");
+      if(splitString.size() > 1)
+      {
+         theTileSize.x = splitString[0].toInt32();
+         theTileSize.y = splitString[1].toInt32();
+      }
+      else 
+      {
+         theTileSize = ossimIpt(64,64);
+      }
+         
+    }
+   if(cacheSize)
+   {
+      setMaxCacheSize(cacheSize);
+   }
+   else
+   {
+      setMaxCacheSize(DEFAULT_SIZE);
+   }
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG: cache tile size = " << theTileSize << std::endl
+         << "Cache size = " << cacheSize << " bytes" << std::endl;
+   }
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimAppFixedTileCache::ossimAppFixedTileCache() DEBUG: leaving ..." << std::endl;
+   }
+}
+
+ossimAppFixedTileCache::~ossimAppFixedTileCache()
+{
+   deleteAll();
+}
+
+ossimAppFixedTileCache *ossimAppFixedTileCache::instance(ossim_uint32  maxSize)
+{
+   if(!theInstance)
+   {
+      theInstance = new ossimAppFixedTileCache;
+      if(maxSize)
+	{
+	  theInstance->setMaxCacheSize(maxSize);
+	}
+   }
+   return theInstance;
+}
+
+void ossimAppFixedTileCache::setMaxCacheSize(ossim_uint32 cacheSize)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   theMaxGlobalCacheSize = cacheSize;
+   theMaxCacheSize = cacheSize;
+   //   theMaxCacheSize      = (ossim_uint32)(theMaxGlobalCacheSize*.2);
+}
+
+void ossimAppFixedTileCache::flush()
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   std::map<ossimAppFixedCacheId, ossimFixedTileCache*>::iterator currentIter = theAppCacheMap.begin();
+   
+   while(currentIter != theAppCacheMap.end())
+   {
+      (*currentIter).second->flush();
+      ++currentIter;
+   }
+   theCurrentCacheSize = 0;
+}
+
+void ossimAppFixedTileCache::flush(ossimAppFixedCacheId cacheId)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   ossimFixedTileCache* cache = getCache(cacheId);
+   {
+      if(cache)
+      {
+         theCurrentCacheSize -= cache->getCacheSize();
+         cache->flush();
+      }
+   }
+}
+
+void ossimAppFixedTileCache::deleteCache(ossimAppFixedCacheId cacheId)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   ossimRefPtr<ossimFixedTileCache> cache = getCache(cacheId);
+   {
+      std::map<ossimAppFixedCacheId, ossimFixedTileCache*>::iterator iter = theAppCacheMap.find(cacheId);
+      
+      if(cache.valid())
+      {
+         theAppCacheMap.erase(iter);
+         theCurrentCacheSize -= cache->getCacheSize();
+      }
+      cache = 0;
+   }
+}
+
+ossimAppFixedTileCache::ossimAppFixedCacheId ossimAppFixedTileCache::newTileCache(const ossimIrect& tileBoundaryRect,
+                                                                                  const ossimIpt& tileSize)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   ossimAppFixedCacheId result = -1; 
+   ossimFixedTileCache* newCache = new ossimFixedTileCache;
+   if(tileSize.x == 0 ||
+      tileSize.y == 0)
+   {
+      // newCache->setRect(tileBoundaryRect, theTileSize);
+      newCache->setRect(tileBoundaryRect,
+                        newCache->getTileSize());
+   }
+   else
+   {
+      newCache->setRect(tileBoundaryRect, tileSize);
+   }
+   result = theUniqueAppIdCounter;
+   theAppCacheMap.insert(std::make_pair(result, newCache));
+   ++theUniqueAppIdCounter;
+   
+   return result;
+}
+
+ossimAppFixedTileCache::ossimAppFixedCacheId ossimAppFixedTileCache::newTileCache()
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   ossimAppFixedCacheId result = -1;
+   ossimFixedTileCache* newCache = new ossimFixedTileCache;
+   
+   {
+      result = theUniqueAppIdCounter;
+      theAppCacheMap.insert(std::make_pair(result, newCache));
+      ++theUniqueAppIdCounter;
+   }
+   
+   return result;
+   
+}
+
+void ossimAppFixedTileCache::setRect(ossimAppFixedCacheId cacheId,
+                                     const ossimIrect& boundaryTileRect)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   ossimFixedTileCache* cache = getCache(cacheId);
+   if(cache)
+   {
+      
+      ossim_uint32 cacheSize = cache->getCacheSize();
+      // cache->setRect(boundaryTileRect, theTileSize);
+      cache->setRect(boundaryTileRect,
+                     cache->getTileSize());      
+      theCurrentCacheSize += (cache->getCacheSize() - cacheSize);
+   }
+}
+
+void ossimAppFixedTileCache::setTileSize(ossimAppFixedCacheId cacheId,
+                                         const ossimIpt& tileSize)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   ossimFixedTileCache* cache = getCache(cacheId);
+   if(cache)
+   {
+      ossim_uint32 cacheSize = cache->getCacheSize();
+      cache->setRect(cache->getTileBoundaryRect(), tileSize);
+      theCurrentCacheSize += (cache->getCacheSize() - cacheSize);
+      theTileSize = cache->getTileSize();
+   }
+}
+
+ossimRefPtr<ossimImageData> ossimAppFixedTileCache::getTile(
+   ossimAppFixedCacheId cacheId,
+   const ossimIpt& origin)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   ossimRefPtr<ossimImageData> result = 0;
+   ossimFixedTileCache* cache = getCache(cacheId);
+   if(cache)
+   {
+      result = cache->getTile(origin);
+   }
+
+   return result;
+}
+
+
+ossimRefPtr<ossimImageData> ossimAppFixedTileCache::addTile(
+                                                            ossimAppFixedCacheId cacheId,
+                                                            ossimRefPtr<ossimImageData> data,
+                                                            bool duplicateData)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   ossimRefPtr<ossimImageData> result = 0;
+   ossimFixedTileCache *aCache = this->getCache(cacheId);
+   if(!aCache)
+   {         
+      return result;
+   }
+   ossim_uint32 dataSize = data->getDataSizeInBytes();
+
+   if( (theCurrentCacheSize+dataSize) > theMaxGlobalCacheSize)
+   {
+      shrinkGlobalCacheSize((ossim_int32)(theMaxGlobalCacheSize*0.1));
+   }
+
+   ossim_uint32 cacheSize = 0;
+   {
+      cacheSize = aCache->getCacheSize();
+   }
+   if(cacheSize > theMaxCacheSize)
+   {
+//       shrinkCacheSize(aCache,
+//                       (ossim_int32)(aCache->getCacheSize()*.1));
+      shrinkCacheSize(aCache,
+                      (ossim_int32)(1024*1024));
+   }
+   {
+      cacheSize = aCache->getCacheSize();
+      result    = aCache->addTile(data, duplicateData);
+   
+      theCurrentCacheSize += (aCache->getCacheSize() - cacheSize);
+   }
+   
+   return result;
+}
+
+void ossimAppFixedTileCache::deleteAll()
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   theCurrentCacheSize = 0;
+   theAppCacheMap.clear();
+}
+
+ossimRefPtr<ossimImageData> ossimAppFixedTileCache::removeTile(
+   ossimAppFixedCacheId cacheId,
+   const ossimIpt& origin)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   ossimRefPtr<ossimImageData> result = 0;
+   
+   ossimFixedTileCache* cache = getCache(cacheId);
+   if(cache)
+   {
+      ossim_uint32 cacheSize = cache->getCacheSize();
+      result = cache->removeTile(origin);
+      theCurrentCacheSize += (cache->getCacheSize() - cacheSize);
+   }
+
+   return result;
+}
+
+void ossimAppFixedTileCache::deleteTile(ossimAppFixedCacheId cacheId,
+                                        const ossimIpt& origin)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   ossimFixedTileCache* cache = getCache(cacheId);
+   if(cache)
+   {
+      ossim_uint32 cacheSize = cache->getCacheSize();
+      cache->deleteTile(origin);
+      theCurrentCacheSize += (cache->getCacheSize() - cacheSize);
+   }
+}
+
+ossimFixedTileCache* ossimAppFixedTileCache::getCache(
+   ossimAppFixedCacheId cacheId)
+{   
+   std::map<ossimAppFixedCacheId, ossimFixedTileCache*>::const_iterator
+      currentIter = theAppCacheMap.find(cacheId);
+   ossimFixedTileCache* result = 0;
+   
+   if(currentIter != theAppCacheMap.end())
+   {
+      result = (*currentIter).second;
+   }
+
+   return result;
+}
+
+void ossimAppFixedTileCache::shrinkGlobalCacheSize(ossim_int32 byteCount)
+{
+   if(static_cast<ossim_uint32>(byteCount) >= theCurrentCacheSize)
+   {
+      flush();
+   }
+   else
+   {
+      while(byteCount > 0)
+      {
+         std::map<ossimAppFixedCacheId, ossimFixedTileCache*>::iterator iter = theAppCacheMap.begin();
+         while( (iter != theAppCacheMap.end())&&(byteCount>0))
+         {
+            ossimFixedTileCache* cache = getCache((*iter).first);
+            if(cache)
+            {
+               ossim_uint32 before = cache->getCacheSize();
+               cache->deleteTile();
+               ossim_uint32 after = cache->getCacheSize();
+               ossim_uint32 delta = (before - after);
+               byteCount -= delta;
+               theCurrentCacheSize -= (delta);
+            }
+            ++iter;
+         }
+      }
+   }
+}
+
+void ossimAppFixedTileCache::shrinkCacheSize(ossimAppFixedCacheId id,
+                                             ossim_int32 byteCount)
+{
+   ossimFixedTileCache* cache = getCache(id);
+
+   if(cache)
+   {
+      shrinkCacheSize(cache, byteCount);
+   }
+}
+
+void ossimAppFixedTileCache::shrinkCacheSize(ossimFixedTileCache* cache,
+                                             ossim_int32 byteCount)
+{
+   if(cache)
+   {
+      ossim_int32 cacheSize = cache->getCacheSize();
+      if(cacheSize <= byteCount)
+      {
+         cache->flush();
+      }
+      else
+      {
+         while(byteCount > 0)
+         {
+            ossim_uint32 before = cache->getCacheSize();
+            cache->deleteTile();
+            ossim_uint32 after = cache->getCacheSize();
+            ossim_uint32 delta = std::abs((int)(before - after));
+            if(delta)
+            {
+               byteCount -= delta;
+               theCurrentCacheSize -= (delta);
+            }
+            else
+            {
+               byteCount = 0;
+            }
+         }
+      }
+   }
+}
+
+const ossimIpt& ossimAppFixedTileCache::getTileSize(ossimAppFixedCacheId cacheId)
+{
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
+   ossimFixedTileCache* cache = getCache(cacheId);
+   if(cache)
+   {
+      return cache->getTileSize();
+   }
+   return theTileSize;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimAppTileCache.cpp b/ossim/src/ossim/imaging/ossimAppTileCache.cpp
new file mode 100644
index 0000000..f4c92ee
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimAppTileCache.cpp
@@ -0,0 +1,303 @@
+//******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+// Description: This file contains the Application cache algorithm
+//
+//***********************************
+// $Id: ossimAppTileCache.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimAppTileCache.h>
+#include <ossim/imaging/ossimTileCache.h>
+#include <ossim/base/ossimDataObject.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimPreferences.h>
+
+ossimAppTileCache* ossimAppTileCache::theInstance = 0;
+
+// we will need to grab this from the preferences
+const ossim_uint32 ossimAppTileCache::DEFAULT_SIZE          = 80*1024*1024;
+const ossim_uint32 ossimAppTileCache::DEFAULT_BUCKET_SIZE          = 293;
+ossimAppTileCache::ossimAppCacheId ossimAppTileCache::theUniqueAppIdCounter = 1;
+
+ossimAppTileCache *ossimAppTileCache::instance(ossim_uint32  maxSize)
+{
+   if(!theInstance)
+   {
+      if(maxSize < 1)
+      {
+         ossimString cacheSize = ossimPreferences::instance()->findPreference("cache_size");
+         if(cacheSize!="")
+         {
+            maxSize = cacheSize.toUInt32()*1024*1024;
+         }
+         else
+         {
+            maxSize = DEFAULT_SIZE;
+         }
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << "Setting SIZE----------------------- " << maxSize << std::endl;
+      }
+      theInstance = new ossimAppTileCache(maxSize);
+   }
+
+   return theInstance;
+}
+
+ossimAppTileCache::~ossimAppTileCache()
+{
+   deleteAll();
+}
+
+ossimAppTileCache::ossimAppCacheId ossimAppTileCache::newTileCache(ossim_uint32 bucketSize)
+{
+   ossimTileCache *aCache = 0;
+   ossimAppCacheId result = 0;
+
+   aCache = new ossimTileCache(bucketSize);
+
+   if(aCache)
+   {
+      theAppCache.insert(make_pair(theUniqueAppIdCounter, aCache));
+      result = theUniqueAppIdCounter;
+      ++theUniqueAppIdCounter;
+   }
+
+   return result;
+}
+
+/*!
+ * Will retrieve a tile from the cache.
+ */
+ossimDataObject *ossimAppTileCache::get(ossimAppCacheId id,
+                                        const ossimDpt3d &origin,
+                                        ossim_uint32 resLevel)
+{
+   ossimDataObject* result = 0;
+   if(id>0)
+   {
+      ossimTileCache *aCache = this->get(id);
+      if(aCache)
+      {
+         result = aCache->get(origin,
+                              resLevel);
+         if(result)
+         {
+            adjustQueue(id, origin, resLevel);
+         }
+      }
+   }
+
+   return result;
+}
+
+ossimRefPtr<ossimDataObject> ossimAppTileCache::removeTile(ossimAppCacheId id,
+                                              const ossimDpt3d &origin,
+                                              unsigned long resLevel)
+{
+   ossimRefPtr<ossimDataObject> result = 0;
+   if(id>0)
+   {
+      ossimTileCache *aCache = this->get(id);
+      if(aCache)
+      {
+         // remove from cache
+         result = aCache->remove(origin,
+                                 resLevel);
+         // adjust the byte count
+         if(result.valid())
+         {
+            theCurrentCacheSize -= result->getDataSizeInBytes();
+         }
+         removeTileFromQueue(id, origin, resLevel);
+      }
+   }
+
+   return result;
+}
+
+ossimRefPtr<ossimDataObject> ossimAppTileCache::insert(ossimAppCacheId appId,
+                                                       const ossimDpt3d &origin,
+                                                       const ossimDataObject* data,
+                                                       ossim_uint32 resLevel)
+{
+   static const char MODULE[] = "ossimAppTileCache::insert";
+   ossimDataObject *result = 0;
+
+   // find the cache and if it's not there then return NULL
+   ossimTileCache *aCache = this->get(appId);
+   if(!aCache)
+   {         
+      return result;
+   }
+   
+   ossimRefPtr<ossimDataObject> tileToInsert = 0;
+   long dataSize = data->getDataSizeInBytes();
+   
+   if( (theCurrentCacheSize+dataSize) > theMaxCacheSize)
+   {
+      do
+      {
+         ossimRefPtr<ossimDataObject> tile = removeTile();
+      }while((theCurrentCacheSize+dataSize) > theMaxCacheSize);
+   }
+
+   if(data)
+   {
+      tileToInsert = (ossimDataObject*)data->dup();
+
+      result = aCache->insert(origin,
+                              tileToInsert.get(),
+                              resLevel);
+      if(!result)
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << MODULE << " ERROR: can't insert and should not happen"
+            << endl;
+
+         tileToInsert = 0;
+      }
+      else
+      {
+         theCurrentCacheSize += dataSize;
+         theUsedQueue.push_back(ossimAppCacheTileInfo(appId,
+                                                 origin,
+                                                 resLevel));
+      }
+   }
+
+   return result;
+}
+
+
+ossimTileCache* ossimAppTileCache::get(ossimAppCacheId id)
+{
+   ossimTileCache *result=0;
+   
+   AppIdIterator anIterator = theAppCache.find(id);
+   
+   if(anIterator != theAppCache.end())
+   {
+      result = (*anIterator).second;
+   }
+
+   return result;
+}
+
+void ossimAppTileCache::deleteCache(ossimAppCacheId appId)
+{
+   // first delete the cache
+   AppIdIterator anIterator = theAppCache.find(appId);
+   if(anIterator != theAppCache.end())
+   {
+      ossimTileCache *aCache = (*anIterator).second;
+      theCurrentCacheSize -= aCache->sizeInBytes();
+
+      delete aCache;
+
+      theAppCache.erase(anIterator);      
+   }
+   // now delete all occurences of the appCacheId in the queue
+   // used for LRU algorithm.
+   deleteAppCacheFromQueue(appId);
+}
+
+void ossimAppTileCache::deleteAll()
+{
+   AppIdIterator iter = theAppCache.begin();
+
+   while(iter != theAppCache.end())
+   {
+      delete (*iter).second;
+      ++iter;
+   }
+   
+   theAppCache.clear();
+}
+
+void ossimAppTileCache::removeTileFromQueue(ossimAppCacheId appId,
+                                       const ossimDpt3d &origin,
+                                       ossim_uint32 resLevel)
+{
+   list<ossimAppCacheTileInfo>::iterator anIterator;
+
+   anIterator = theUsedQueue.begin();
+   while(anIterator != theUsedQueue.end())
+   {
+      if( ((*anIterator).theAppCacheId == appId) &&
+          ((*anIterator).theOrigin     == origin)&&
+          ((*anIterator).theResLevel   == resLevel))
+      {
+         theUsedQueue.erase(anIterator);
+         return;
+      }
+      else
+      {
+         ++anIterator;
+      }
+   }
+}
+
+void ossimAppTileCache::deleteAppCacheFromQueue(ossimAppCacheId appId)
+{
+   list<ossimAppCacheTileInfo>::iterator anIterator;
+
+   anIterator = theUsedQueue.begin();
+   while(anIterator != theUsedQueue.end())
+   {
+      if( (*anIterator).theAppCacheId == appId)
+      {
+         anIterator = theUsedQueue.erase(anIterator);
+      }
+      else
+      {
+         ++anIterator;
+      }
+   }
+}
+
+ossimRefPtr<ossimDataObject> ossimAppTileCache::removeTile()
+{
+   ossimRefPtr<ossimDataObject> result;
+   if(!theUsedQueue.empty())
+   {
+      ossimAppCacheTileInfo &info = *(theUsedQueue.begin());
+
+      ossimTileCache *aCache = get(info.theAppCacheId);
+      if(aCache)
+      {
+         result            = aCache->remove(info.theOrigin,
+                                            info.theResLevel);
+         theCurrentCacheSize -= result->getDataSizeInBytes();
+      }
+      theUsedQueue.erase(theUsedQueue.begin());
+   }
+
+   return result;
+}
+
+void ossimAppTileCache::adjustQueue(ossimAppCacheId id,
+                                    const ossimDpt3d &origin,
+                                    ossim_uint32 resLevel)
+{
+   list<ossimAppCacheTileInfo>::iterator anIterator = theUsedQueue.begin();
+   ossimAppCacheTileInfo info(id, origin, resLevel);
+   
+   while(anIterator != theUsedQueue.end())
+   {
+     
+      if((*anIterator) == info)
+      {
+         theUsedQueue.erase(anIterator);
+         theUsedQueue.push_back(info);
+         return;
+      }
+      ++anIterator;
+   }              
+}
+
diff --git a/ossim/src/ossim/imaging/ossimArcInfoGridWriter.cpp b/ossim/src/ossim/imaging/ossimArcInfoGridWriter.cpp
new file mode 100644
index 0000000..5cd532c
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimArcInfoGridWriter.cpp
@@ -0,0 +1,371 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimArcInfoGridWriter.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstring>
+#include <cstdio>
+#include <fstream>
+#include <iostream>
+
+#include <ossim/imaging/ossimArcInfoGridWriter.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/imaging/ossimCastTileSourceFilter.h>
+
+#include <ossim/support_data/ossimAigStatistics.h>
+#include <ossim/support_data/ossimAigHeader.h>
+#include <ossim/support_data/ossimAigBounds.h>
+#include <ossim/support_data/ossimAigIndexFileHeader.h>
+#include <ossim/support_data/ossimAigDataFileHeader.h>
+
+#include <ossim/imaging/ossimCastTileSourceFilter.h>
+
+static const ossimTrace traceDebug("ossimArcInfoGridWriter:debug");
+
+RTTI_DEF1(ossimArcInfoGridWriter,
+          "ossimArcInfoGridWriter",
+          ossimImageFileWriter);
+
+//*******************************************************************
+// Constructor:
+//*******************************************************************
+ossimArcInfoGridWriter::ossimArcInfoGridWriter()
+   : ossimImageFileWriter(),
+     theOutputTileSize(256, 4)
+{
+}
+
+ossimArcInfoGridWriter::ossimArcInfoGridWriter(ossimImageSource* inputSource,
+                                 const ossimFilename& filename)
+   :ossimImageFileWriter(filename, inputSource)
+{
+}
+
+//*******************************************************************
+// Destructor
+//*******************************************************************
+ossimArcInfoGridWriter::~ossimArcInfoGridWriter()
+{
+   close();
+}
+
+bool ossimArcInfoGridWriter::writeFile()
+{
+   const char* MODULE = "ossimArcInfoGridWriter::writeFile";
+   if(!theInputConnection)
+   {
+      return false;
+   }
+   
+   ossimRefPtr<ossimCastTileSourceFilter> filter = new ossimCastTileSourceFilter;
+   filter->setOutputScalarType(OSSIM_FLOAT);
+   filter->connectMyInputTo(theInputConnection.get());
+   filter->initialize();
+   
+   open();
+
+   // make sure we have a region of interest
+   if(theAreaOfInterest.hasNans())
+   {
+      theInputConnection->initialize();
+      theAreaOfInterest = theInputConnection->getAreaOfInterest();
+   }
+   else
+   {
+      theInputConnection->setAreaOfInterest(theAreaOfInterest);
+   }
+   
+   if(theAreaOfInterest.hasNans()) return false;   
+   
+   theInputConnection->setTileSize(theOutputTileSize);
+   theInputConnection->setToStartOfSequence();
+   
+   bool result = writeBinaryAigHeader()&&
+                 writeBinaryAigBounds()&&
+                 writeBinaryAigStats();
+   if(result)
+   {
+      ossimFilename indexFile=ossimFilename(theFilename+"/"+"w001001x.adf");
+      ossimFilename dataFile=ossimFilename(theFilename+"/"+"w001001.adf");
+      
+      std::ofstream indexFileStream(indexFile.c_str(),
+                               ios::out|ios::binary);
+      std::ofstream dataFileStream(dataFile.c_str(),
+                              ios::out|ios::binary);
+      ossimEndian endian;
+
+      if(indexFileStream&&dataFileStream)
+      {
+         ossimAigIndexFileHeader aigIndexHeader;
+         ossimAigDataFileHeader  aigDataFileHeader;
+         
+         ossimRefPtr<ossimImageData> currentTile =
+            theInputConnection->getNextTile();
+         long tileNumber = 0;
+         long totalNumberOfTiles = theInputConnection->getNumberOfTiles();
+         ossim_int32 tileOffsetShorts = 0;
+         ossim_int32 tileSizeShorts   = 0;
+
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << "Tile height  = " << theInputConnection->getTileHeight()
+            << std::endl
+            << "Tile width   = " << theInputConnection->getTileWidth()
+            << std::endl;
+         ossim_int32 tileSizeInShorts = 2*(theInputConnection->getTileHeight()*
+                                           theInputConnection->getTileWidth());
+         // Note: this is in shorts
+         //
+         aigIndexHeader.theFileSize += (4*totalNumberOfTiles);
+
+         // Note this is in shorts
+         //
+         
+         aigDataFileHeader.theFileSize = 50+
+                                         (tileSizeInShorts*totalNumberOfTiles) +
+                                         totalNumberOfTiles;
+         aigDataFileHeader.theTileSize = tileSizeInShorts;
+         
+         aigIndexHeader.writeStream(indexFileStream);
+         aigDataFileHeader.writeStream(dataFileStream);
+
+         if(traceDebug())
+         {
+            CLOG << "AIG INDEX HEADER = \n" << aigIndexHeader << std::endl;
+            CLOG << "AIG DATA FILE HEADER\n"
+                 << "file size = " << aigDataFileHeader.theFileSize
+                 << std::endl;
+         }
+         
+         while(currentTile.valid())
+         {
+            currentTile = filter->applyCast(currentTile);
+            
+            if(!currentTile->getBuf())
+            {
+               currentTile->initialize();
+            }
+
+            tileOffsetShorts = dataFileStream.tellp()/2;
+            tileSizeShorts   = 2*currentTile->getHeight()*currentTile->getWidth();
+            ossim_int16 tileSizeShorts16 = 2*currentTile->getHeight()*currentTile->getWidth();
+            if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
+            {
+               endian.swap(tileOffsetShorts);
+               endian.swap(tileSizeShorts);
+               endian.swap(tileSizeShorts16);
+               endian.swap((ossim_float32*)currentTile->getBuf(),
+                           currentTile->getWidth()*
+                           currentTile->getHeight());
+            }
+            
+            indexFileStream.write((char*)(&tileOffsetShorts), 4);
+            indexFileStream.write((char*)(&tileSizeShorts), 4);
+            dataFileStream.write((char*)(&tileSizeShorts16),
+                                 2);
+            dataFileStream.write((char*)(currentTile->getBuf()),
+                                 currentTile->getWidth()*currentTile->getHeight()*4);
+            
+            currentTile = theInputConnection->getNextTile();
+            ++tileNumber;
+         }
+      }
+   }
+   
+   close();
+   filter = 0;
+   return result;
+}
+
+bool ossimArcInfoGridWriter::saveState(ossimKeywordlist& kwl,
+                                const char* prefix)const
+{
+   return ossimImageFileWriter::saveState(kwl, prefix);
+}
+
+bool ossimArcInfoGridWriter::loadState(const ossimKeywordlist& kwl,
+                                const char* prefix)
+{
+   
+   return ossimImageFileWriter::loadState(kwl, prefix);
+}
+
+bool ossimArcInfoGridWriter::isOpen()const
+{
+   return (theFilename.isDir() && theFilename.exists());
+}
+
+bool ossimArcInfoGridWriter::open()
+{
+   if(theFilename.isDir()&&
+      theFilename.exists())
+   {
+      return true;
+   }
+   else
+   {
+      theFilename = theFilename.path();
+      if(theFilename.isDir()&&
+         theFilename.exists())
+      {
+         return true;
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimArcInfoGridWriter::open(): Directory "
+            << theFilename << " doesn't exist" << std::endl;
+      }
+      
+   }
+   return false;   
+}
+
+void ossimArcInfoGridWriter::close()
+{
+}
+
+
+bool ossimArcInfoGridWriter::writeBinaryAigHeader()
+{
+   const char* MODULE = "ossimArcInfoGridWriter::writeBinaryAigHeader";
+   ossimAigHeader aigHeader;
+
+   ossimFilename file=ossimFilename(theFilename+"/"+"hdr.adf");
+
+   if(isOpen())
+   {
+      switch(theInputConnection->getOutputScalarType())
+      {
+         case OSSIM_UCHAR:
+         case OSSIM_SSHORT16:
+         case OSSIM_USHORT11:
+         case OSSIM_USHORT16:
+//      {
+//         aigHeader.setIntCoverage();
+//         break;
+//      }
+         case OSSIM_DOUBLE:
+         case OSSIM_FLOAT:
+         case OSSIM_NORMALIZED_FLOAT:
+         case OSSIM_NORMALIZED_DOUBLE:
+         {
+            aigHeader.setFloatCoverage();
+            break;
+         }
+         default:
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimArcInfoGridWriter::writeBinaryAigHeader: "
+               << "unkown scalar type" << std::endl;
+         }
+      }
+      
+      // need to set pixel size
+      //
+
+      // code goes here
+      
+      // now setting number of tiles per row
+      aigHeader.theNumberOfTilesPerRow    = theInputConnection->getNumberOfTilesHorizontal();
+      aigHeader.theNumberOfTilesPerColumn = theInputConnection->getNumberOfTilesVertical();
+      aigHeader.theWidthOfTileInPixels    = theInputConnection->getTileWidth();
+      aigHeader.theHeightOfTileInPixels   = theInputConnection->getTileHeight();
+      
+      std::ofstream out;
+      out.open(file.c_str(), ios::out|ios::binary);
+
+      if(out)
+      {
+         if(traceDebug())
+         {
+            CLOG << "AIG_HEADER = \n" << aigHeader << std::endl;
+         }
+         return aigHeader.writeStream(out);
+      }
+   }
+   
+   return false;
+}
+
+bool ossimArcInfoGridWriter::writeBinaryAigBounds()
+{
+   const char* MODULE = "ossimArcInfoGridWriter::writeBinaryAigBounds";
+   ossimAigBounds aigBounds;
+   
+
+   // setup bounds
+   ossimIrect bounds = theInputConnection->getBoundingRect();
+   if(!bounds.hasNans())
+   {
+      aigBounds.ll_x = -.5;
+      aigBounds.ll_y = -.5;
+      aigBounds.ur_x = bounds.width()-.5;
+      aigBounds.ur_y = bounds.height()-.5;
+      
+      //
+      ossimFilename file=ossimFilename(theFilename+"/"+"dblbnd.adf");
+      
+      if(isOpen())
+      {
+         std::ofstream out;
+         out.open(file.c_str(), ios::out|ios::binary);
+         
+         if(out)
+         {
+            if(traceDebug())
+            {
+               CLOG << "AIG BOUNDS =\n" <<aigBounds << std::endl;
+            }
+            return aigBounds.writeStream(out);
+         }
+      }
+   }
+   
+   return false;
+}
+
+bool ossimArcInfoGridWriter::writeBinaryAigStats()
+{
+   ossimAigStatistics aigStats;
+
+
+   // setup bounds
+   aigStats.theMin  = theInputConnection->getMinPixelValue();
+   aigStats.theMax  = theInputConnection->getMaxPixelValue();
+   aigStats.theMean = (aigStats.theMax-aigStats.theMin)/2.0;
+
+   //
+   ossimFilename file=ossimFilename(theFilename+"/"+"sta.adf");
+
+   if(isOpen())
+   {
+      std::ofstream out;
+      out.open(file.c_str(), ios::out|ios::binary);
+      
+      if(out)
+      {
+         return aigStats.writeStream(out);
+      }
+   }
+
+   return false;
+}
+
+ossimString ossimArcInfoGridWriter::getExtension() const
+{
+   return ossimString("aig");
+}
+
diff --git a/src/ossim/imaging/ossimAtCorrGridRemapper.cpp b/ossim/src/ossim/imaging/ossimAtCorrGridRemapper.cpp
similarity index 100%
rename from src/ossim/imaging/ossimAtCorrGridRemapper.cpp
rename to ossim/src/ossim/imaging/ossimAtCorrGridRemapper.cpp
diff --git a/ossim/src/ossim/imaging/ossimAtCorrRemapper.cpp b/ossim/src/ossim/imaging/ossimAtCorrRemapper.cpp
new file mode 100644
index 0000000..4702b59
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimAtCorrRemapper.cpp
@@ -0,0 +1,731 @@
+//*******************************************************************
+// Copyright (C) 2002 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Kathy Minear
+//
+// Description:
+// Takes in DNs for any number of bands
+// Converts DNs to Radiance at the satellite values Lsat
+// Converts Lsat to Surface Reflectance values
+//
+//*************************************************************************
+// $Id: ossimAtCorrRemapper.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstdlib>
+#include <cmath>
+
+#include <ossim/imaging/ossimAtCorrRemapper.h>
+#include <ossim/imaging/ossimAtCorrKeywords.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+
+
+RTTI_DEF1(ossimAtCorrRemapper, "ossimAtCorrRemapper", ossimImageSourceFilter);
+
+static ossimTrace traceDebug("ossimAtCorrRemapper:debug");
+
+ossimAtCorrRemapper::ossimAtCorrRemapper(ossimObject* owner,
+                                         ossimImageSource* inputSource,
+                                         const ossimString& sensorType)
+      :
+      ossimImageSourceFilter  (owner, inputSource),  // base class     
+      theTile                 (NULL),
+      theSurfaceReflectance   (NULL),
+      theUseInterpolationFlag(false),
+      theMinPixelValue        (0),  
+      theMaxPixelValue        (0),
+      theXaArray              (0),
+      theXbArray              (0),
+      theXcArray              (0),
+      theBiasArray            (0),
+      theGainArray            (0),
+      theCalCoefArray         (0),
+      theBandWidthArray       (0),
+      theSensorType(sensorType)
+{
+   //***
+   // Set the base class "theEnableFlag" to off since no adjustments have been
+   // made yet.
+   //***
+   disableSource();
+
+   initialize();
+}
+
+ossimAtCorrRemapper::~ossimAtCorrRemapper()
+{
+   if (theSurfaceReflectance)
+   {
+      delete [] theSurfaceReflectance;
+      theSurfaceReflectance = NULL;
+   }
+}
+
+ossimRefPtr<ossimImageData> ossimAtCorrRemapper::getTile(
+   const ossimIrect& tile_rect,
+   ossim_uint32 resLevel)
+{
+#if 0
+   if (traceDebug())
+   {
+      cout << "ossimAtCorrRemapper::getTile DEBUG:"
+           << "\ntile_rect:  " << tile_rect << endl;
+   }
+#endif
+   
+   if (!isInitialized()||!theInputConnection)
+   {
+       cerr << "ossimAtCorrRemapper::getTile ERROR:"
+            << "\nNot initialized!"
+            << endl;
+       return ossimRefPtr<ossimImageData>();
+   }
+
+   if(!theTile.valid())
+   {
+      initialize();
+      if(!theTile)
+      {
+         return ossimRefPtr<ossimImageData>();
+      }
+   }
+   
+   // Fetch tile from pointer from the input source.
+   ossimRefPtr<ossimImageData> inputTile = theInputConnection->getTile(tile_rect,
+                                                                       resLevel);
+
+   if (!inputTile.valid())  // Just in case...
+   {
+      return ossimRefPtr<ossimImageData>();
+   }
+
+   // Check for remap bypass or empty / null input tile.
+   ossimDataObjectStatus tile_status = inputTile->getDataObjectStatus();
+   if (!theEnableFlag || tile_status == OSSIM_NULL ||
+       tile_status == OSSIM_EMPTY)
+   {
+      return inputTile;
+   }
+
+   ossim_uint32 w     = tile_rect.width();
+   ossim_uint32 h     = tile_rect.height();
+   ossim_uint32 tw    = theTile->getWidth();
+   ossim_uint32 th    = theTile->getHeight();
+   ossim_uint32 bands = theTile->getNumberOfBands();
+
+   // Set the origin of the output tile.
+   theTile->setOrigin(tile_rect.ul());
+
+   if(w*h != tw*th)
+   {
+      theTile->setWidthHeight(w, h);
+      theTile->initialize();
+      if(theSurfaceReflectance)
+      {
+         delete [] theSurfaceReflectance;
+         theSurfaceReflectance = NULL;
+      }
+   }
+   
+   if(!theSurfaceReflectance)
+   {
+      ossim_uint32 size  = tw*th*bands;
+#if 0
+      if (traceDebug())
+      {
+         cout << "ossimAtCorrRemapper::getTile DEBUG:"
+              << "\ntile_rect:    " << tile_rect
+              << "\ntile width:   " << tw
+              << "\ntile height:  " << th
+              << "\nbands:        " << bands
+              << "\nBuffer size:  " << size << endl;
+      }
+#endif
+      
+      theSurfaceReflectance = new double[size];
+   }
+
+   ossim_uint32 buffer_index = 0;
+   ossimIpt ul = tile_rect.ul();
+   ossimIpt lr = tile_rect.lr();
+   const double MP = theTile->getMinNormalizedPix(); // Minimum normalized pix.
+   double a, b, c;
+   buffer_index = 0;
+
+   cout << setprecision(6);
+   for (ossim_uint32 band=0; band < bands; ++band)
+   {
+      for(ossim_sint32 idxy = ul.y; idxy <= lr.y; ++idxy)
+      {
+         for(ossim_sint32 idxx = ul.x; idxx <= lr.x; ++idxx)
+         {
+            double p = inputTile->getPix(buffer_index);
+            
+            if (p>0.0)
+            {
+               if(!theUseInterpolationFlag)
+               {
+                  a = theXaArray[band];
+                  b = theXbArray[band];
+                  c = theXcArray[band];
+               }
+               else
+               {
+                  interpolate(ossimDpt(idxx, idxy),
+                              band,
+                              a,
+                              b,
+                              c);
+               }
+               if(theSensorType == "ls7ms")
+               {
+                  double radiance_at_satellite
+                     = (theGainArray[band] * p) + theBiasArray[band];
+                  
+                  double y =  (radiance_at_satellite * a) -  b;
+                  
+                  p = (y / (1.0 + (c * y)) );
+               }
+               else if(theSensorType == "qbms")
+               {
+                  double radiance_at_satellite
+                     = theCalCoefArray[band] * p / theBandWidthArray[band];
+                  
+                  double y =  (radiance_at_satellite * a) - b;
+                  
+                  p = (y / (1.0 + (c * y)) );
+               }
+               else if(theSensorType == "ikms")
+               {
+                  
+                 
+                  double radiance_at_satellite
+                     =   p  /((theCalCoefArray[band]/1.0)/ theBandWidthArray[band]);
+                  double y =  (radiance_at_satellite * a) -  b;
+    
+                  p = (y / (1.0 + (c * y)) );
+     
+               }  
+                   
+               // Note that "p" should now be normalized between 0.0 and 1.0;
+               
+               // ***
+               // Since it wasn't null to start with clip / clamp between minimum
+               // normalized pixel and one(max).
+               // ***
+               p =  ( p > MP ? ( p < 1.0 ? p : 1.0) : MP );
+               
+               // Scan the new tile and set the min / max.
+               if (p < theMinPixelValue[band])
+               {
+                  theMinPixelValue[band] = p;
+               }
+               else if (p > theMaxPixelValue[band])
+               {
+                  theMaxPixelValue[band] = p;
+               }
+               
+               theSurfaceReflectance[buffer_index] = p;
+            }
+            else
+            {
+               theSurfaceReflectance[buffer_index] = 0.0;  // pixel was null...
+            }
+            
+            ++buffer_index;
+            
+         }  // End of sample loop...
+         
+      } // End of line loop...
+      
+   } // End of band loop...
+
+   // Copy the buffer to the output tile at the same time unnormalizing it.
+   theTile->copyNormalizedBufferToTile(theSurfaceReflectance);
+   
+   // Validate the output to set the tile status.
+   theTile->validate();
+   
+   return theTile;
+}
+
+void ossimAtCorrRemapper::initialize()
+{
+   if(theInputConnection)
+   {
+      theTile = ossimImageDataFactory::instance()->create(this,
+                                                          theInputConnection);
+      theTile->initialize();
+
+      if(theSurfaceReflectance)
+      {
+         delete []theSurfaceReflectance;
+         theSurfaceReflectance = NULL;
+      }
+      
+      ossim_uint32 tw    = theTile->getWidth();
+      ossim_uint32 th    = theTile->getHeight();
+      ossim_uint32 bands = theTile->getNumberOfBands();
+      ossim_uint32 size  = tw*th*bands;
+      if (traceDebug())
+      {
+         cout << "ossimAtCorrRemapper::initialize DEBUG:"
+              << "\ntile width:   " << tw
+              << "\ntile height:  " << th
+              << "\nbands:        " << bands
+              << "\nBuffer size:  " << size << endl;
+      }
+      
+      theSurfaceReflectance = new double[size];
+
+      setInitializedFlag(true);
+      clearErrorStatus();
+   }
+   else
+   {
+      setInitializedFlag(false);
+      setErrorStatus();
+   };
+
+   verifyEnabled();
+
+   if (traceDebug())
+   {
+      cout << "ossimAtCorrRemapper::initialize DEBUG:"
+           << *this
+           << endl;
+   }
+
+}
+
+bool ossimAtCorrRemapper::loadState(const ossimKeywordlist& kwl,
+                                    const char* prefix)
+{
+   static const char MODULE[] = "ossimAtCorrRemapper::loadState()";
+
+   if (traceDebug())  CLOG << "entering..." << endl;
+
+   if (!theTile || !theSurfaceReflectance)
+   {
+      cerr << MODULE << " ERROR:"
+           << "Not initialized..." << endl;
+      return false;
+   }
+
+   ossim_uint32 bands = theTile->getNumberOfBands();
+
+   // Clear out the old values.
+   theMinPixelValue.clear();
+   theMaxPixelValue.clear();   
+   theXaArray.clear();
+   theXbArray.clear();
+   theXcArray.clear();
+   theBiasArray.clear();
+   theGainArray.clear();
+   theCalCoefArray.clear();
+   theBandWidthArray.clear();
+ 
+   
+   // Now resize them.
+
+   // Start with arbitrary big number.
+   theMinPixelValue.resize(bands, 1.0);
+
+   // Start with arbitrary small number.
+   theMaxPixelValue.resize(bands, 0.0);
+
+   
+   theXaArray.resize(bands, 1.0);
+   theXbArray.resize(bands, 1.0);
+   theXcArray.resize(bands, 1.0);
+   
+   theBiasArray.resize(bands, 0.0);
+   theGainArray.resize(bands, 1.0);
+   theCalCoefArray.resize(bands);
+   theBandWidthArray.resize(bands);
+   
+   for(ossim_uint32 band = 0; band < bands; ++band)
+   {
+      const char* lookup = NULL;
+      ossimString band_string = ".band";
+      band_string += ossimString::toString(band+1);
+      
+      ossimString kw = AT_CORR_XA_KW;
+      kw += band_string;
+      lookup = kwl.find(prefix, kw.c_str());
+      if (lookup)
+      {
+         theXaArray[band] = atof(lookup);
+      }
+      else
+      {
+         if (traceDebug())
+         {
+            CLOG << "DEBUG:"
+                 << "\nlookup failed for keyword:  " << kw.c_str() << endl;
+         }
+      }
+      
+      kw = AT_CORR_XB_KW;
+      kw += band_string;
+      lookup = kwl.find(prefix, kw.c_str());
+      if (lookup)
+      {
+         theXbArray[band] = atof(lookup);
+      }
+      else
+      {
+         if (traceDebug())
+         {
+            CLOG << "DEBUG:"
+                 << "\nlookup failed for keyword:  " << kw.c_str()
+                 << endl;
+         }
+      }
+      
+      kw = AT_CORR_XC_KW;
+      kw += band_string;
+      lookup = kwl.find(prefix, kw.c_str());
+      if (lookup)
+      {
+         theXcArray[band] = atof(lookup);
+      }
+      else
+      {
+         if (traceDebug())
+         {
+            CLOG << "DEBUG:"
+                 << "\nlookup failed for keyword:  " << kw.c_str()
+                 << endl;
+         }
+      }
+      
+      if(theSensorType == "ls7ms")
+      {
+         kw = AT_CORR_BIAS_KW;
+         kw += band_string;
+         lookup = kwl.find(prefix, kw.c_str());
+         if (lookup)
+         {
+            theBiasArray[band] = atof(lookup);
+         }
+         else
+         {
+            if (traceDebug())
+            {
+               CLOG << "DEBUG:"
+                    << "\nlookup failed for keyword:  " << kw.c_str()
+                    << endl;
+            }
+         }
+         
+         kw = AT_CORR_GAIN_KW;
+         kw += band_string;
+         lookup = kwl.find(prefix, kw.c_str());
+         if (lookup)
+         {
+            theGainArray[band] = atof(lookup);
+         }
+         else
+         {
+            if (traceDebug())
+            {
+               CLOG << "DEBUG:"
+                    << "\nlookup failed for keyword:  " << kw.c_str()
+                    << endl;
+            }
+         }
+      }
+      
+      if(theSensorType == "qbms")
+      {
+         kw = AT_CORR_CALCOEF_KW;
+         kw += band_string;
+         lookup = kwl.find(prefix, kw.c_str());
+         if (lookup)
+         {
+            theCalCoefArray[band] = atof(lookup);
+         }
+         else
+         {
+            if (traceDebug())
+            {
+               CLOG << "DEBUG:"
+                    << "\nlookup failed for keyword:  " << kw.c_str()
+                    << endl;
+            }
+         }
+         
+         kw = AT_CORR_BANDWIDTH_KW;
+         kw += band_string;
+         lookup = kwl.find(prefix, kw.c_str());
+         if (lookup)
+         {
+            theBandWidthArray[band] = atof(lookup);
+         }
+         else
+         {
+            if (traceDebug())
+            {
+               CLOG << "DEBUG:"
+                    << "\nlookup failed for keyword:  " << kw.c_str()
+                    << endl;
+            }
+         }
+      }
+      if(theSensorType == "ikms")
+      {
+         kw = AT_CORR_CALCOEF_KW;
+         kw += band_string;
+         lookup = kwl.find(prefix, kw.c_str());
+         if (lookup)
+         {
+            theCalCoefArray[band] = atof(lookup);
+         }
+         else
+         {
+            if (traceDebug())
+            {
+               CLOG << "DEBUG:"
+                    << "\nlookup failed for keyword:  " << kw.c_str()
+                    << endl;
+            }
+         }
+         
+         kw = AT_CORR_BANDWIDTH_KW;
+         kw += band_string;
+         lookup = kwl.find(prefix, kw.c_str());
+         if (lookup)
+         {
+            theBandWidthArray[band] = atof(lookup);
+         }
+         else
+         {
+            if (traceDebug())
+            {
+               CLOG << "DEBUG:"
+                    << "\nlookup failed for keyword:  " << kw.c_str()
+                    << endl;
+            }
+         }
+      }
+   }
+   
+   verifyEnabled();
+
+   if (theEnableFlag)
+   {
+      //***
+      // Call the base class to pick up the enable flag.  Note that this
+      // can override the state set from verifyEnabled() method.
+      //***
+      ossimString pref;
+      if (prefix) pref += prefix;
+      pref += "atmospheric_correction.";
+
+   }
+   
+   if (traceDebug())
+   {
+      CLOG << "DEBUG:"
+           << *this
+           << "returning..."
+           << endl;
+   }
+   
+   return true;
+}
+
+void ossimAtCorrRemapper::verifyEnabled()
+{
+   // Check all the pointers...
+   if ( !theInputConnection    || !theTile ||
+        !theSurfaceReflectance )
+   {
+      disableSource();
+      return;
+   }
+
+   ossim_uint32 bands = theTile->getNumberOfBands();
+   if ( (theMinPixelValue.size() != bands) ||
+        (theMaxPixelValue.size() != bands) ||
+        (theXaArray.size()       != bands) ||
+        (theXbArray.size()       != bands) ||
+        (theXcArray.size()       != bands) ||
+        (theBiasArray.size()     != bands) ||
+        (theGainArray.size()     != bands) ||
+        (theCalCoefArray.size()  != bands) ||
+        (theBandWidthArray.size()!= bands))
+   {
+      disableSource(); 
+      return;
+   }
+
+   enableSource();
+}
+
+ossimString ossimAtCorrRemapper::getShortName() const
+{
+   return ossimString("Atmospheric Correction Remapper");
+}
+
+vector<double> ossimAtCorrRemapper::getNormMinPixelValues() const
+{
+   return theMinPixelValue;
+}
+
+vector<double> ossimAtCorrRemapper::getNormMaxPixelValues() const
+{
+   return theMaxPixelValue;
+}
+
+void ossimAtCorrRemapper::getNormMinPixelValues(vector<double>& v) const
+{
+   v = theMinPixelValue;
+}
+
+void ossimAtCorrRemapper::getNormMaxPixelValues(vector<double>& v) const
+{
+   v = theMaxPixelValue;
+}
+
+const ossimString& ossimAtCorrRemapper::getSensorType() const
+{
+   return theSensorType;
+}
+
+void ossimAtCorrRemapper::setSensorType(const ossimString& sensorType)
+{
+   theSensorType = sensorType;
+}
+
+void ossimAtCorrRemapper::interpolate(const ossimDpt& /* pt */,
+                                      int band,
+                                      double& a,
+                                      double& b,
+                                      double& c)const
+{
+   a = theXaArray[band];
+   b = theXbArray[band];
+   c = theXcArray[band];
+}
+
+ostream& ossimAtCorrRemapper::print(ostream& os) const
+{
+   os << "ossimAtCorrRemapper:"
+      << "\ntheEnableFlag:  " << (theEnableFlag?"enabled":"disabled")
+      << endl;
+
+   os << setprecision(15) << setiosflags(ios::fixed);
+
+   ossim_uint32 band = 1;
+   vector<double>::const_iterator i = theMinPixelValue.begin();
+   while (i != theMinPixelValue.end())
+   {
+      os << "band[" << band << "] min:  " << (*i) << endl;
+      ++i;
+      ++band;
+   }
+
+   band = 1;
+   i = theMaxPixelValue.begin();
+   while (i != theMaxPixelValue.end())
+   {
+      os << "band[" << band << "] max:  " << (*i) << endl;
+      ++i;
+      ++band;
+   }
+
+   band = 1;
+   i = theXaArray.begin();
+   while (i != theXaArray.end())
+   {
+      os << "band[" << band << "] xa:  " << (*i) << endl;
+      ++i;
+      ++band;
+   }
+
+   band = 1;
+   i = theXbArray.begin();
+   while (i != theXbArray.end())
+   {
+      os << "band[" << band << "] xb:  " << (*i) << endl;
+      ++i;
+      ++band;
+   }
+
+   band = 1;
+   i = theXcArray.begin();
+   while (i != theXcArray.end())
+   {
+      os << "band[" << band << "] xc:  " << (*i) << endl;
+      ++i;
+      ++band;
+   }
+
+   if(theSensorType == "ls7ms")
+   {
+      band = 1;
+      i = theBiasArray.begin();
+      while (i != theBiasArray.end())
+      {
+         os << "band[" << band << "] bias:  " << (*i) << endl;
+         ++i;
+         ++band;
+      }
+      
+      band = 1;
+      i = theGainArray.begin();
+      while (i != theGainArray.end())
+      {
+         os << "band[" << band << "] gain:  " << (*i) << endl;
+         ++i;
+         ++band;
+      }
+   }
+   if(theSensorType == "qbms")
+   {
+      band = 1;
+      i = theCalCoefArray.begin();
+      while (i != theCalCoefArray.end())
+      {
+         os << "band[" << band << "] calcoef:  " << (*i) << endl;
+         ++i;
+         ++band;
+      }
+
+      band = 1;
+      i = theBandWidthArray.begin();
+      while (i != theBandWidthArray.end())
+      {
+         os << "band[" << band << "] bandwidth:  " << (*i) << endl;
+         ++i;
+         ++band;
+      }
+   }
+   if(theSensorType == "ikms")
+   {
+      band = 1;
+      i = theCalCoefArray.begin();
+      while (i != theCalCoefArray.end())
+      {
+         os << "band[" << band << "] calcoef:  " << (*i) << endl;
+         ++i;
+         ++band;
+      }
+
+   }
+   return os;
+}
+
+ostream& operator<<(ostream& os, const ossimAtCorrRemapper& hr)
+{
+   return hr.print(os);
+}
+
+
+
diff --git a/src/ossim/imaging/ossimAtbController.cpp b/ossim/src/ossim/imaging/ossimAtbController.cpp
similarity index 100%
rename from src/ossim/imaging/ossimAtbController.cpp
rename to ossim/src/ossim/imaging/ossimAtbController.cpp
diff --git a/src/ossim/imaging/ossimAtbMatchPoint.cpp b/ossim/src/ossim/imaging/ossimAtbMatchPoint.cpp
similarity index 100%
rename from src/ossim/imaging/ossimAtbMatchPoint.cpp
rename to ossim/src/ossim/imaging/ossimAtbMatchPoint.cpp
diff --git a/src/ossim/imaging/ossimAtbPointSource.cpp b/ossim/src/ossim/imaging/ossimAtbPointSource.cpp
similarity index 100%
rename from src/ossim/imaging/ossimAtbPointSource.cpp
rename to ossim/src/ossim/imaging/ossimAtbPointSource.cpp
diff --git a/ossim/src/ossim/imaging/ossimBandAverageFilter.cpp b/ossim/src/ossim/imaging/ossimBandAverageFilter.cpp
new file mode 100644
index 0000000..a0525a7
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimBandAverageFilter.cpp
@@ -0,0 +1,395 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimBandAverageFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimBandAverageFilter.h>
+
+// used for constructing and an ossimImageData object
+#include <ossim/imaging/ossimImageDataFactory.h>
+
+// used for error reporting and for general info reporting such as warnings
+#include <ossim/base/ossimErrorContext.h>
+
+#include <sstream>
+#include <iterator>
+
+static const char* WEIGHTS_KW = "weights";
+
+RTTI_DEF1(ossimBandAverageFilter,
+          "ossimBandAverageFilter",
+          ossimImageSourceFilter);
+
+ossimBandAverageFilter::ossimBandAverageFilter()
+   :ossimImageSourceFilter(),
+    theTile(NULL)
+{
+}
+
+ossimBandAverageFilter::ossimBandAverageFilter(ossimImageSource* input,
+                                               const std::vector<double>& weights)
+   :ossimImageSourceFilter(input),
+    theTile(NULL),
+    theWeights(weights)
+{
+}
+
+ossimBandAverageFilter::~ossimBandAverageFilter()
+{
+}
+
+ossim_uint32 ossimBandAverageFilter::getNumberOfOutputBands()const
+{
+   if(isSourceEnabled())
+   {
+      return 1;
+   }
+   
+   return ossimImageSourceFilter::getNumberOfOutputBands();
+}
+
+ossimRefPtr<ossimImageData> ossimBandAverageFilter::getTile(const ossimIrect& rect, ossim_uint32 resLevel)
+{
+   // first we will check to see if we have an input connection
+   //
+   if(!theInputConnection)
+   {
+      // this will probably be null since we aren't initialized.
+      // we really need to creae a default blank tile in OSSIM that is returned
+      return theTile;
+   }
+
+   ossimRefPtr<ossimImageData> inputData =
+      theInputConnection->getTile(rect, resLevel);
+
+   if(!inputData.valid())
+   {
+      return inputData;
+   }
+   
+   // If we are disabled or if the data object is empty or NULL or
+   // not enough bands we don't need to run our algorithm so return the input
+   // tile.
+   if(!isSourceEnabled() ||
+      (inputData->getDataObjectStatus() == OSSIM_NULL)||
+      (inputData->getDataObjectStatus() == OSSIM_EMPTY)||
+      (inputData->getNumberOfBands() < 2))
+   {
+      return inputData;
+   }
+
+   // check to see if we are initialized
+   if(!theTile.valid())
+   {
+      initialize();
+   }
+   
+   theTile->setImageRectangle(rect);
+
+   // now lets set up the template method to operate in native type and run
+   // the algorithm
+   //
+   switch(inputData->getScalarType())
+   {
+   case OSSIM_UCHAR:
+   {
+      averageInput((ossim_uint8)0, // setup template variable
+                   inputData);
+      break;
+   }
+   case OSSIM_USHORT11:
+   case OSSIM_USHORT16:
+   {
+      averageInput((ossim_uint16)0, // setup template variable
+                   inputData);
+      break;
+   }
+   case OSSIM_SSHORT16:
+   {
+      averageInput((ossim_sint16)0, // setup template variable
+                   inputData);
+      break;
+   }
+   case OSSIM_NORMALIZED_FLOAT:
+   case OSSIM_FLOAT:
+   {
+      averageInput((float)0, // setup template variable
+                   inputData);
+      break;
+   }
+   case OSSIM_NORMALIZED_DOUBLE:
+   case OSSIM_DOUBLE:
+   {
+      averageInput((double)0, // setup template variable
+                   inputData);
+      break;
+   }
+   default:
+   {
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "Unsupported scalar type in file %d at line %d",
+                    __FILE__,
+                    __LINE__);
+
+      
+      theTile->makeBlank();
+      break;
+   }
+   }
+   
+   theTile->validate();
+
+   
+   return theTile;
+}
+
+
+
+void ossimBandAverageFilter::initialize()
+{
+   ossimImageSourceFilter::initialize();
+   
+   // theInputConnection is defined in ossimImageSourceFilter
+   // It is automatically set when an input is connected to this
+   // object
+   if(theInputConnection)
+   {
+      theTile = ossimImageDataFactory::instance()->create(this, this);
+
+      // now initialize the tile
+      theTile->initialize();
+      checkWeights();
+   }
+}
+
+double ossimBandAverageFilter::getNullPixelValue(ossim_uint32 band)const
+{
+   if(!isSourceEnabled())
+   {
+      return ossimImageSourceFilter::getNullPixelValue(band);
+   }
+   // lets use the first band's null value as our null
+   return ossimImageSourceFilter::getMinPixelValue(0);
+}
+
+double ossimBandAverageFilter::getMinPixelValue(ossim_uint32 band)const
+{
+   if(!isSourceEnabled()||!theInputConnection)
+   {
+      return ossimImageSourceFilter::getMinPixelValue(band);
+   }
+
+   // loop through each band and find the min pix value
+   ossim_uint32 bandIndex = 0;
+   ossim_uint32 inputBands = theInputConnection->getNumberOfOutputBands();
+   double minValue = ossim::defaultMax(OSSIM_DOUBLE);
+   for(bandIndex = 0; bandIndex < inputBands; ++bandIndex)
+   {
+      double minPix = theInputConnection->getMinPixelValue(bandIndex);
+
+      if(minPix < minValue)
+      {
+         minValue = minPix;
+      }
+   }
+
+   return minValue;
+}
+
+double ossimBandAverageFilter::getMaxPixelValue(ossim_uint32 band)const
+{
+   if(!isSourceEnabled())
+   {
+      return ossimImageSourceFilter::getMaxPixelValue(band);
+   }
+   
+   // loop through each band and find the max pix value
+   ossim_uint32 bandIndex = 0;
+   ossim_uint32 inputBands = theInputConnection->getNumberOfOutputBands();
+   double maxValue = ossim::defaultMin(OSSIM_DOUBLE);
+   for(bandIndex = 0; bandIndex < inputBands; ++bandIndex)
+   {
+      double maxPix = theInputConnection->getMaxPixelValue(bandIndex);
+
+      if(maxPix > maxValue)
+      {
+         maxValue = maxPix;
+      }
+   }
+   
+   return maxValue;
+}
+
+void ossimBandAverageFilter::checkWeights()
+{
+   // we have not been initialzed yet
+   //
+   if(!theTile)
+   {
+      return;
+   }
+
+   // Check to see if the weights array is the same size as the input
+   // list.  If not then resize it and populate them with the same weight
+   // value.  It does not matter if they sum to one since we will perform
+   // a weighted average in the execution of the algorithm
+   //
+   if(theWeights.size() != theInputConnection->getNumberOfOutputBands())
+   {
+      theWeights.resize(theInputConnection->getNumberOfOutputBands());  
+
+      std::fill(theWeights.begin(), theWeights.end(), 1);
+   }
+}
+
+
+template<class T> void ossimBandAverageFilter::averageInput(
+   T /* dummyVariable */, // used only for template type, value ignored
+   ossimRefPtr<ossimImageData> inputDataObject)
+{
+   // since we have already checked the input for empty or
+   // null we will now execute the algorithm.  We will make
+   //
+   // 
+   std::vector<T*> inputBands(inputDataObject->getNumberOfBands());
+   std::vector<double> nullValues(inputDataObject->getNumberOfBands());
+   ossim_uint32 i = 0;
+
+   // for efficiency we will copy the band pointers and
+   // null values so we don't have extra function calls
+   // on a per band basis
+   //
+   for(i = 0; i < inputDataObject->getNumberOfBands(); ++i)
+   {
+      inputBands[i] = static_cast<T*>(inputDataObject->getBuf(i));
+      nullValues[i] = inputDataObject->getNullPix(i);
+   }
+
+   // store the output buffer pointer
+   T* outputBuf = static_cast<T*>(theTile->getBuf(0));
+
+   // setup index values and boundary values
+   ossim_uint32 upperBound = theTile->getWidth()*theTile->getHeight();
+   ossim_uint32 bandIndex = 0;
+   ossim_uint32 numberOfBands = inputDataObject->getNumberOfBands();
+   double outputNullPix = theTile->getNullPix(0);
+   
+   for(i = 0; i < upperBound; ++i)
+   {
+      double value=0.0;
+      double sumWeights=0.0;
+
+      // loop over each band only using the valid pixel data
+      // in the weighted average.
+      //
+      for(bandIndex = 0; bandIndex < numberOfBands; ++bandIndex)
+      {
+         // if valid then muliply the value by the weight and add it to
+         // current pixel value
+         if(*inputBands[bandIndex] != nullValues[bandIndex])
+         {
+            value += theWeights[bandIndex]*((double)*inputBands[bandIndex]);
+            sumWeights += theWeights[bandIndex];
+         }
+         // increment to the next pixel for the next time around
+         ++inputBands[bandIndex];
+      }
+
+      // check to see if we had any valid data.  If we did the weight
+      // should be greater than 0
+      if(sumWeights != 0.0)
+      {
+         value /= sumWeights;
+      }
+      else
+      {
+         // else we set the pixel to the output null value
+         value = outputNullPix;
+      }
+      // store the result in the outputBuffer.
+      *outputBuf = static_cast<T>(value);
+
+      // advance the output buffer to the next pixel value
+      ++outputBuf;
+   }
+}
+
+
+bool ossimBandAverageFilter::loadState(const ossimKeywordlist& kwl,
+                                       const char* prefix)
+{
+   // get the value of the stored keyword
+   ossimString weightString = kwl.find(prefix, WEIGHTS_KW);
+   weightString = weightString.trim();
+   
+
+   theWeights.clear();
+   if(weightString != "")
+   {
+      // split the string list into an array of strings
+      std::vector<ossimString> weightList = weightString.split(" ");
+
+      // resize the weights to the size of the weight list
+      //
+      theWeights.resize(weightList.size());
+      ossim_uint32 i = 0;
+
+      // now store the weights to the array
+      for(i = 0; i < theWeights.size(); ++i)
+      {
+         theWeights[i] = weightList[i].toDouble();
+      }
+   }
+
+   // call base class to continue the load state
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
+bool ossimBandAverageFilter::saveState(ossimKeywordlist& kwl,
+                                       const char* prefix)const
+{
+   std::stringstream out;
+
+   // copy the weights  to a memory stream separated by space
+   std::copy(theWeights.begin(),
+             theWeights.end(),
+             ostream_iterator<double>(out, " "));
+
+   ossimString weightString = out.str();
+   weightString = weightString.trim();
+
+   
+   kwl.add(prefix, // prefix to help uniquely id or attributes
+           WEIGHTS_KW, // the keyword to identity our attribute
+           weightString.c_str(),     // the value 
+           true); // overwrite if already in the keywordlist
+   
+   // call base classes save to allow us to pass the information up
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
+double ossimBandAverageFilter::getWeight(ossim_uint32 band)const
+{
+   if(band < theWeights.size())
+   {
+      return theWeights[band];
+   }
+   
+   return 0.0;
+}
+
+void ossimBandAverageFilter::setWeight(ossim_uint32 band, double weight)
+{
+   if(band < theWeights.size())
+   {
+      theWeights[band] = fabs(weight);
+   }
+}
+
diff --git a/ossim/src/ossim/imaging/ossimBandClipFilter.cpp b/ossim/src/ossim/imaging/ossimBandClipFilter.cpp
new file mode 100644
index 0000000..c200e6b
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimBandClipFilter.cpp
@@ -0,0 +1,699 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimBandClipFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimBandClipFilter.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/imaging/ossimImageData.h>
+
+RTTI_DEF1(ossimBandClipFilter, "ossimBandClipFilter", ossimImageSourceFilter);
+
+ossimBandClipFilter::ossimBandClipFilter()
+   :ossimImageSourceFilter(),
+    theClipType(ossimBandClipType_NONE),
+    theTile(NULL)
+{
+   theTile = new ossimImageData(this, // I am the owner,
+                                OSSIM_NORMALIZED_FLOAT,
+                                1);
+   theTile->initialize();
+}
+
+ossimBandClipFilter::ossimBandClipFilter(ossimImageSource* inputSource,
+                                           const vector<double>& minPix,
+                                           const vector<double>& maxPix,
+                                           ossimBandClipType clipType)
+   :ossimImageSourceFilter(inputSource),
+    theClipType(clipType),
+    theTile(NULL)
+{
+   theTile = new ossimImageData(this, // I am the owner,
+                                OSSIM_NORMALIZED_FLOAT,
+                                1);
+   theTile->initialize();
+   setMinMaxPix(minPix, maxPix);
+}
+
+ossimBandClipFilter::ossimBandClipFilter(ossimImageSource* inputSource,
+                                         double minPix,
+                                         double maxPix,
+                                         ossimBandClipType clipType)
+   :ossimImageSourceFilter(inputSource),
+    theClipType(clipType),
+    theTile(NULL)
+{
+   theTile = new ossimImageData(this, // I am the owner,
+                                OSSIM_NORMALIZED_FLOAT,
+                                1);
+   theTile->initialize();
+   
+   theMinPix.push_back(minPix);
+   theMaxPix.push_back(maxPix);
+}
+
+ossimBandClipFilter::~ossimBandClipFilter()
+{
+}
+
+void ossimBandClipFilter::setClipType(ossimBandClipType clipType)
+{
+   theClipType = clipType;
+}
+
+ossimBandClipFilter::ossimBandClipType ossimBandClipFilter::getClipType()const
+{
+   return theClipType;
+}
+
+ossim_uint32 ossimBandClipFilter::getNumberOfValues()const
+{
+   // We make sure that all arrays have the same number
+   // of elements so we can use the size of any of them.
+   return (ossim_uint32)theMinPix.size();
+}
+
+void ossimBandClipFilter::setNumberOfValues(ossim_uint32 size)
+{
+
+   // lets do a non destructive set.  That way we can
+   // grow or shrink the list without destroying
+   // the original values.
+   //
+   if(!size)
+   {
+      theMinPix.clear();
+      theMaxPix.clear();
+      theMedian.clear();
+      return;
+   }
+
+   
+   vector<double> tempMin    = theMinPix;
+   vector<double> tempMax    = theMaxPix;
+   
+   theMinPix.resize(size);
+   theMaxPix.resize(size);
+   theMedian.resize(size);
+    
+   ossim_uint32 upperBound = (ossim_uint32)min(theMinPix.size(), tempMin.size());
+   ossim_uint32 index = 0;
+
+   for(index = 0; index < upperBound; ++index)
+   {
+      theMinPix[index] = tempMin[index];
+      theMaxPix[index] = tempMax[index];
+      
+      theMinPix[index] = theMinPix[index]>1?1:theMinPix[index];
+      theMinPix[index] = theMinPix[index]<0?0:theMinPix[index];
+      theMaxPix[index] = theMaxPix[index]>1?1:theMaxPix[index];
+      theMaxPix[index] = theMaxPix[index]<0?0:theMaxPix[index];
+      
+      theMedian[index] = (theMaxPix[index] + theMinPix[index])/2.0;
+   }
+   
+   for(;index < theMinPix.size();++index)
+   {
+      theMinPix[index] = OSSIM_DEFAULT_MIN_PIX_NORM_FLOAT;
+      theMaxPix[index] = OSSIM_DEFAULT_MAX_PIX_NORM_FLOAT;
+      theMedian[index] = (theMaxPix[index] + theMinPix[index])/2.0;
+            
+      theMedian[index] = (theMaxPix[index] + theMinPix[index])/2.0;
+   }
+}
+
+void ossimBandClipFilter::setMinMaxPix(const vector<double>& minPix,
+                                       const vector<double>& maxPix)
+{
+   theMinPix = minPix;
+   theMaxPix = maxPix;
+
+   setNumberOfValues((ossim_uint32)max(theMinPix.size(), theMaxPix.size()));
+}
+
+const std::vector<double>& ossimBandClipFilter::getMinPixList()const
+{
+   return theMinPix;
+}
+
+const std::vector<double> ossimBandClipFilter::getMaxPixList()const
+{
+   return theMaxPix;
+}
+
+double ossimBandClipFilter::getMinPix(ossim_uint32 index)const
+{
+   return index<theMinPix.size()?theMinPix[index]:0;
+}
+
+double ossimBandClipFilter::getMaxPix(ossim_uint32 index)const
+{
+   return index<theMaxPix.size()?theMaxPix[index]:0;
+}
+
+ossimRefPtr<ossimImageData> ossimBandClipFilter::getTile(
+   const ossimIrect& rect,
+   ossim_uint32 resLevel)
+{
+   if(!theInputConnection)
+   {
+      return NULL;
+   }
+   
+   ossimRefPtr<ossimImageData> data =
+      theInputConnection->getTile(rect, resLevel);
+   if(!data.get())
+   {
+      return data;
+   }
+   ossimDataObjectStatus status = data->getDataObjectStatus();
+   if((status != OSSIM_NULL) &&
+      (status != OSSIM_EMPTY))
+   {
+      ossim_uint32 dw = data->getWidth();
+      ossim_uint32 dh = data->getHeight();
+      ossim_uint32 db = data->getNumberOfBands();
+
+      ossim_uint32 tw = theTile->getWidth();
+      ossim_uint32 th = theTile->getHeight();
+      ossim_uint32 tb = theTile->getNumberOfBands();
+
+      if(((tw*th)!=(dw*dh))||
+         (tb != db))
+      {
+         theTile = new ossimImageData(this,
+                                      OSSIM_NORMALIZED_FLOAT,
+                                      db,
+                                      dw,
+                                      dh);
+         theTile->initialize();
+      }
+
+      if(getNumberOfValues() != theTile->getNumberOfBands())
+      {
+         // Should this go on??? (drb)
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimBandClipFilter::getTile\n"
+            << "getNumberOfValues() != theTile->getNumberOfBands"
+            << endl;
+      }
+      
+      data->copyTileToNormalizedBuffer(static_cast<float*>(theTile->getBuf()));
+      theTile->setDataObjectStatus(data->getDataObjectStatus());
+      
+      switch(theClipType)
+      {
+         case ossimBandClipType_CLIP:
+         {
+            runClip();
+            break;
+         }
+         case ossimBandClipType_CLAMP:
+         {
+            runClamp();
+            break;
+         }
+         case ossimBandClipType_LINEAR_STRETCH:
+         {
+            runLinearStretch();
+            break;
+         }
+         case ossimBandClipType_MEDIAN_STRETCH:
+         {
+            runMedianStretch();
+            break;
+         }
+         default:
+            break;
+      }
+      data->copyNormalizedBufferToTile(static_cast<float*>(theTile->getBuf()));
+   }
+   
+   return data;
+}
+
+void ossimBandClipFilter::runClip()
+{
+   ossim_uint32 offset = 0;
+   ossim_uint32 upperBound = theTile->getWidth()*theTile->getHeight();
+   for(ossim_uint32 band =0; band < theTile->getNumberOfBands(); ++band)
+   {
+      float *buf     = static_cast<float*>(theTile->getBuf(band));
+      float  minPix  = theMinPix[band];
+      float  maxPix  = theMaxPix[band];
+      float  nullPix = theTile->getNullPix(band);
+      
+      if(buf)
+      {
+         for(offset = 0; offset < upperBound; ++offset)
+         {
+            if((*buf < minPix)||
+               (*buf > maxPix))
+            {
+               *buf = nullPix;
+            }
+            ++buf;
+         }
+      }
+   }
+   theTile->validate();
+}
+
+void ossimBandClipFilter::runClamp()
+{
+   ossim_uint32 offset = 0;
+   ossim_uint32 upperBound = theTile->getWidth()*theTile->getHeight();
+   for(ossim_uint32 band =0; band < theTile->getNumberOfBands(); ++band)
+   {
+      float *buf     = static_cast<float*>(theTile->getBuf(band));
+      float  minPix  = theMinPix[band];
+      float  maxPix  = theMaxPix[band];
+      float  nullPix = theTile->getNullPix(band);
+      
+      if(buf)
+      {
+         if(theTile->getDataObjectStatus() == OSSIM_PARTIAL)
+         {
+            for(offset = 0; offset < upperBound; ++offset)
+            {
+               if(*buf != nullPix)
+               {
+                  if(*buf < minPix)
+                  {
+                     *buf = minPix;
+                  }
+                  else if(*buf > maxPix)
+                  {
+                     *buf = maxPix;
+                  }
+               }
+               ++buf;
+            }
+         }
+         else
+         {
+            for(offset = 0; offset < upperBound; ++offset)
+            {
+               if(*buf < minPix)
+               {
+                  *buf = minPix;
+               }
+               else if(*buf > maxPix)
+               {
+                  *buf = maxPix;
+               }
+               ++buf;
+            }
+         }
+      }
+   }
+}
+
+void ossimBandClipFilter::runLinearStretch()
+{   
+   ossim_uint32 bands = (ossim_uint32)min(theTile->getNumberOfBands(), (ossim_uint32)theMinPix.size());
+   ossim_uint32 w     = theTile->getWidth();
+   ossim_uint32 h     = theTile->getHeight();
+   ossim_uint32 upperBound = w*h;
+   const double* minPixArray = theTile->getMinPix();
+   const double* maxPixArray = theTile->getMaxPix();
+      
+   float* *bandArray = new float*[bands];
+   ossim_uint32 band = 0;
+   for(band = 0; band < bands; ++band)
+   {
+      bandArray[band] = static_cast<float*>(theTile->getBuf(band));
+   }
+   
+   if(theTile->getDataObjectStatus() == OSSIM_PARTIAL)
+   {
+      for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+      {
+         if(!theTile->isNull(offset))
+         {
+            for(band = 0; band < bands; ++band)
+            {
+               double delta = theMaxPix[band] - theMinPix[band];
+               double t     = (bandArray[band][offset] - theMinPix[band])/delta;
+               if(t < 0)
+               {
+                 bandArray[band][offset] = minPixArray[band];
+               }
+               else if(t > 1)
+               {
+                 bandArray[band][offset] = maxPixArray[band];
+               }
+               else
+               {
+                  bandArray[band][offset] = t;
+               }
+            }
+         }
+      }
+   }
+   else if(theTile->getDataObjectStatus() == OSSIM_FULL)
+   {
+      for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+         {
+            for(band = 0; band < bands; ++band)
+            {
+               double delta = theMaxPix[band] - theMinPix[band];
+               double t     = (bandArray[band][offset] - theMinPix[band])/delta;
+               
+              if(t < 0)
+              {
+                 bandArray[band][offset] = minPixArray[band];
+              }
+              else if(t > 1)
+              {
+                 bandArray[band][offset] = maxPixArray[band];
+              }
+              else
+              {
+                 bandArray[band][offset] = t;
+              }
+            }
+         }
+   }
+   delete [] bandArray;
+   
+}
+
+void ossimBandClipFilter::runMedianStretch()
+{
+   ossim_uint32 bands = theTile->getNumberOfBands();
+   float* *bandArray = new float*[bands];
+   ossim_uint32 band = 0;
+
+   for(band = 0; band < bands; ++band)
+   {
+      bandArray[band] = static_cast<float*>(theTile->getBuf(band));
+   }
+   ossim_uint32 upperBound = theTile->getWidth()*theTile->getHeight();
+   
+   if(theTile->getDataObjectStatus() == OSSIM_PARTIAL)
+   {
+      for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+      {
+         if(!theTile->isNull(offset))
+         {
+            for(band = 0; band < bands; ++band)
+            {
+               double side = (theMedian[band] - (double)bandArray[band][offset]);
+               
+               if(side > 0) // on the left
+               {
+                  double delta = fabs(theMedian[band] - theMinPix[band]);
+                  double t     = ((double)bandArray[band][offset] - theMinPix[band])/delta;
+                  if(t < 0)
+                  {
+                     bandArray[band][offset] = OSSIM_DEFAULT_MIN_PIX_NORM_FLOAT;
+                  }
+                  else if(t > 1)
+                  {
+                     bandArray[band][offset] = theMedian[band];
+                  }
+                  else
+                  {
+                     bandArray[band][offset] = theMedian[band]*t;
+                  }
+               }
+               else // on the right
+               {
+                  double delta = theMaxPix[band] - theMedian[band];
+                  double t = ((double)bandArray[band][offset] - theMedian[band])/delta;
+                  
+                  if(t < 0)
+                  {
+                     bandArray[band][offset] = theMedian[band];
+                  }
+                  else if(t > 1)
+                  {
+                     bandArray[band][offset] = OSSIM_DEFAULT_MAX_PIX_NORM_FLOAT;
+                  }
+                  else
+                  {
+                     bandArray[band][offset] = theMedian[band]+delta*t;
+                  }
+               }
+            }
+         }
+      }
+   }
+   else if(theTile->getDataObjectStatus() == OSSIM_FULL)
+   {
+      for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+      {
+         for(band = 0; band < bands; ++band)
+         {
+            double side = (theMedian[band] - (double)bandArray[band][offset]);
+            
+            if(side > 0) // on the left
+            {
+               double delta = fabs(theMedian[band] - theMinPix[band]);
+               double t     = ((double)bandArray[band][offset] - theMinPix[band])/delta;
+               if(t < 0)
+               {
+                  bandArray[band][offset] = OSSIM_DEFAULT_MIN_PIX_NORM_FLOAT;
+               }
+               else if(t > 1)
+               {
+                  bandArray[band][offset] = theMedian[band];
+               }
+               else
+               {
+                  bandArray[band][offset] = theMedian[band]*t;
+               }
+            }
+            else // on the right
+            {
+               double delta = theMaxPix[band] - theMedian[band];
+               double t = ((double)bandArray[band][offset] - theMedian[band])/delta;
+               
+               if(t < 0)
+               {
+                  bandArray[band][offset] = theMedian[band];
+               }
+               else if(t > 1)
+               {
+                  bandArray[band][offset] = OSSIM_DEFAULT_MAX_PIX_NORM_FLOAT;
+               }
+               else
+               {
+                  bandArray[band][offset] = theMedian[band]+delta*t;
+               }
+            }
+         }
+      }
+   }
+
+   delete [] bandArray;
+}   
+
+void ossimBandClipFilter::initialize()
+{
+   ossimImageSourceFilter::initialize();
+   
+   if(theInputConnection)
+   {
+      ossim_uint32 bands = theInputConnection->getNumberOfOutputBands();
+
+      if(bands)
+      {
+         if(theMinPix.size() != bands)
+         {
+            setNumberOfValues(bands);
+         }
+      }
+   }
+}
+
+bool ossimBandClipFilter::loadState(const ossimKeywordlist& kwl,
+                                    const char* prefix)
+{
+   bool result = ossimImageSourceFilter::loadState(kwl, prefix);
+
+   if(result)
+   {
+      ossimString minRegExpression    = ossimString("^(") +
+                                        ossimString(prefix) +
+                                        "min[0-9]+)";
+      ossimString maxRegExpression    = ossimString("^(") +
+                                        ossimString(prefix) +
+                                        "max[0-9]+)";
+      ossimString medianRegExpression = ossimString("^(") +
+                                        ossimString(prefix) +
+                                        "median[0-9]+)";
+      
+      ossim_uint32 numberOfMins    = kwl.getNumberOfSubstringKeys(minRegExpression);
+      ossim_uint32 numberOfMaxs    = kwl.getNumberOfSubstringKeys(maxRegExpression);
+      ossim_uint32 numberOfMedians = kwl.getNumberOfSubstringKeys(medianRegExpression);
+      theMinPix.clear();
+      theMaxPix.clear();
+      theMedian.clear();
+
+      if(numberOfMins != numberOfMaxs)
+      {
+         ossim_int32 temp = (ossim_int32)min(numberOfMins, numberOfMaxs);
+         numberOfMins = temp;
+         numberOfMaxs = temp;
+      }
+      if(numberOfMins> 0)
+      {
+         ossimString prefixMin    = ossimString(prefix) + "min";
+         ossimString prefixMax    = ossimString(prefix) + "max";
+         ossimString prefixMedian = ossimString(prefix) + "median";
+         
+         ossim_uint32 numberOfMatches = 0;
+         ossim_uint32 index = 0;
+         const char* value=(const char*)NULL;
+         
+         while(numberOfMatches < numberOfMins)
+         {
+            value = kwl.find(prefixMin.c_str(),
+                             ossimString::toString(index).c_str());
+            if(value)
+            {
+               theMinPix.push_back(ossimString(value).toDouble());
+               ++numberOfMatches;
+            }
+            ++index;
+         }
+         index = 0;
+         numberOfMatches = 0;
+         while(numberOfMatches < numberOfMaxs)
+         {
+            value = kwl.find(prefixMax.c_str(),
+                             ossimString::toString(index).c_str());
+            if(value)
+            {
+               theMaxPix.push_back(ossimString(value).toDouble());
+               ++numberOfMatches;
+            }
+            ++index;
+         }
+         if(numberOfMedians != numberOfMins)
+         {
+            for(index = 0; index <  theMaxPix.size(); ++index)
+            {
+               theMedian.push_back((theMinPix[index]+theMaxPix[index])/2.0);
+            }
+         }
+         else
+         {
+            index = 0;
+            numberOfMatches = 0;
+            while(numberOfMatches < numberOfMedians)
+            {
+               value = kwl.find(prefixMedian.c_str(),
+                                ossimString::toString(index).c_str());
+               if(value)
+               {
+                  theMedian.push_back(ossimString(value).toDouble());
+                  ++numberOfMatches;
+               }
+               ++index;
+            }
+         }
+      }
+   }
+   const char* clip_type = kwl.find(prefix, "clip_type");
+   if(clip_type)
+   {
+     ossimString clipType = clip_type;
+      clipType = clipType.upcase().trim();
+
+      if(clipType == "NONE")
+      {
+         theClipType = ossimBandClipType_NONE;
+      }
+      else if(clipType == "CLIP")
+      {
+         theClipType = ossimBandClipType_CLIP;
+      }
+      else if(clipType == "LINEAR_STRETCH")
+      {
+         theClipType = ossimBandClipType_LINEAR_STRETCH;
+      }
+      else if(clipType == "MEDIAN_STRETCH")
+      {
+         theClipType = ossimBandClipType_MEDIAN_STRETCH;
+      }
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_NOTICE)
+         << "ossimBandClipFilter::loadState NOTICE:\n"
+         << "Clip type not given defaulting to NONE" << endl;
+      theClipType = ossimBandClipType_NONE;
+   }
+
+   return result;
+}
+
+bool ossimBandClipFilter::saveState(ossimKeywordlist& kwl,
+                                    const char* prefix)const
+{
+   ossimString minPrefix    = ossimString("min");
+   ossimString maxPrefix    = ossimString("max");
+   ossimString medianPrefix = ossimString("median");
+
+   for(ossim_uint32 index = 1; index <= getNumberOfValues(); ++index)
+   {
+      ossimString value = (minPrefix+ossimString::toString(index));
+      kwl.add(prefix,
+              value.c_str(),
+              theMinPix[index-1],
+              true);
+      value = (maxPrefix+ossimString::toString(index));
+      kwl.add(prefix,
+              value.c_str(),
+              theMaxPix[index-1],
+              true);
+      value = (medianPrefix+ossimString::toString(index));
+      kwl.add(prefix,
+              value.c_str(),
+              theMedian[index-1],
+              true);
+   }
+   ossimString clipType;
+   switch(theClipType)
+   {
+      case ossimBandClipType_NONE:
+      {
+         clipType = "NONE";
+         break;
+      }
+      case ossimBandClipType_CLIP:
+      {
+         clipType = "CLIP";
+         break;
+      }
+      case ossimBandClipType_LINEAR_STRETCH:
+      {
+         clipType = "LINEAR_STRETCH";
+         break;
+      }
+      case ossimBandClipType_MEDIAN_STRETCH:
+      {
+         clipType = "MEDIAN_STRETCH";
+         break;
+      }
+      default:
+         break;
+   }
+   kwl.add(prefix,
+           "clip_type",
+           clipType.c_str(),
+           true);
+   
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
diff --git a/ossim/src/ossim/imaging/ossimBandMergeSource.cpp b/ossim/src/ossim/imaging/ossimBandMergeSource.cpp
new file mode 100644
index 0000000..915f2eb
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimBandMergeSource.cpp
@@ -0,0 +1,287 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimBandMergeSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimBandMergeSource.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimIrect.h>
+
+RTTI_DEF1(ossimBandMergeSource, "ossimBandMergeSource", ossimImageCombiner)
+
+ossimBandMergeSource::ossimBandMergeSource()
+   :ossimImageCombiner(),
+    theNumberOfOutputBands(0),
+    theTile(NULL)
+{
+}
+
+ossimBandMergeSource::ossimBandMergeSource(ossimConnectableObject::ConnectableObjectList& inputSources)
+   :ossimImageCombiner(inputSources),
+    theNumberOfOutputBands(0),
+    theTile(NULL)
+{
+   initialize();
+}
+
+ossimBandMergeSource::~ossimBandMergeSource()
+{
+   theNumberOfOutputBands = 0;
+}
+
+ossimRefPtr<ossimImageData> ossimBandMergeSource::getTile(const ossimIrect& tileRect,
+                                                          ossim_uint32 resLevel)
+{
+   ossim_uint32 layerIdx = 0;
+   if( ( getNumberOfInputs() == 1) || !isSourceEnabled() )
+   {
+      return getNextTile(layerIdx, 0, tileRect, resLevel);
+   }
+
+   // test if initialized
+   if(!theTile.get())
+   {
+      allocate();
+   }
+   
+   if(!theTile.get())
+   {
+      return getNextTile(layerIdx, 0, tileRect, resLevel);
+   }
+   
+   long w     = tileRect.width();
+   long h     = tileRect.height();
+   long tileW = theTile->getWidth();
+   long tileH = theTile->getHeight();
+   if ((w != tileW) || (h != tileH))
+   {
+      theTile->setWidth(w);
+      theTile->setHeight(h);
+      if((w*h)!=(tileW*tileH))
+      {
+         theTile->initialize();
+      }
+      else
+      {
+         theTile->makeBlank();
+      }
+   }
+   else
+   {
+      theTile->makeBlank();
+   }
+
+   theTile->setOrigin(tileRect.ul());
+   getTile(theTile.get(), resLevel);
+
+   return theTile;
+}
+
+bool ossimBandMergeSource::getTile(ossimImageData* tile, ossim_uint32 resLevel)
+{
+   if (!tile)
+      return false;
+
+   ossim_uint32 layerIdx = 0;
+   if( ( getNumberOfInputs() == 1) || !isSourceEnabled() )
+   {
+      return getNextTile(layerIdx, 0, tile, resLevel);
+   }
+
+   tile->makeBlank();
+   ossim_uint32 currentBand = 0;
+   ossim_uint32 maxBands = tile->getNumberOfBands();
+   ossim_uint32 inputIdx = 0;
+   ossimRefPtr<ossimImageData> currentTile;
+   for(inputIdx = 0; inputIdx < getNumberOfInputs(); ++inputIdx)
+   {
+      ossimImageSource* input = PTR_CAST(ossimImageSource, getInput(inputIdx));
+      ossim_uint32 maxInputBands = 1;
+
+      if(input)
+      {
+         currentTile = input->getTile(tile->getImageRectangle(), resLevel);
+         if(currentTile.valid())
+         {
+            maxInputBands = currentTile->getNumberOfBands();
+            //std::cout << "MAX INPUT BANDS === " << maxInputBands << "\n";
+            if (maxInputBands == 0)
+               maxInputBands = 1;
+         }
+      }
+      else
+      {
+         currentTile = 0;
+      }
+
+      if(currentTile.valid()&&(currentTile->getBuf()))
+      {
+         for(ossim_uint32 band = 0; (band < maxInputBands) && (currentBand < maxBands); ++band)
+         {
+            //std::cout << "Actual Band, BAND == " << currentBand << ", " << band << "\n";
+            // clear the band with the actual NULL
+            tile->fill(currentBand, tile->getNullPix(band));
+
+            if(currentTile.valid())
+            {
+               if((currentTile->getDataObjectStatus() != OSSIM_NULL) &&
+                  (currentTile->getDataObjectStatus() != OSSIM_EMPTY))
+               {
+                  memmove(tile->getBuf(currentBand),
+                          currentTile->getBuf(band),
+                          currentTile->getSizePerBandInBytes());
+               }
+            }
+            ++currentBand;
+         }
+      }
+   }
+   tile->validate();
+   return true;
+}
+
+double ossimBandMergeSource::getNullPixelValue(ossim_uint32 band)const
+{
+   ossim_uint32 currentBandCount = 0;
+   ossim_uint32 idx              = 0;
+
+   ossim_uint32 maxBands = getNumberOfOutputBands();
+   if(!maxBands) return 0.0;
+   
+   while((currentBandCount < maxBands)&&
+	 (idx < getNumberOfInputs()))
+   {
+      ossimImageSource* temp = PTR_CAST(ossimImageSource, getInput(idx));
+      if(temp)
+      {
+	ossim_uint32 previousCount = currentBandCount;
+	currentBandCount += temp->getNumberOfOutputBands();
+
+         if(band < currentBandCount)
+         {
+            return temp->getNullPixelValue(band - previousCount);
+         }
+      }
+      ++idx;
+   }
+   
+   return ossim::nan();
+}
+
+double ossimBandMergeSource::getMinPixelValue(ossim_uint32 band)const
+{
+   ossim_uint32 currentBandCount = 0;
+   ossim_uint32 idx              = 0;
+
+   ossim_uint32 maxBands = getNumberOfOutputBands();
+   if(!maxBands) return 0.0;
+   
+   while((currentBandCount < maxBands)&&
+	 (idx < getNumberOfInputs()))
+   {
+      ossimImageSource* temp = PTR_CAST(ossimImageSource, getInput(idx));
+      if(temp)
+      {
+	ossim_uint32 previousCount = currentBandCount;
+	currentBandCount += temp->getNumberOfOutputBands();
+
+         if(band < currentBandCount)
+         {
+            return temp->getMinPixelValue(band - previousCount); 
+         }
+      }
+      ++idx;
+   }
+   
+   return 0.0;
+}
+
+double ossimBandMergeSource::getMaxPixelValue(ossim_uint32 band)const
+{
+   ossim_uint32 currentBandCount = 0;
+   ossim_uint32 idx              = 0;
+
+   ossim_uint32 maxBands = getNumberOfOutputBands();
+   if(!maxBands) return 0.0;
+   
+   while((currentBandCount < maxBands)&&
+	 (idx < getNumberOfInputs()))
+   {
+      ossimImageSource* temp = PTR_CAST(ossimImageSource, getInput(idx));
+      if(temp)
+      {
+	ossim_uint32 previousCount = currentBandCount;
+	currentBandCount += temp->getNumberOfOutputBands();
+
+         if(band < currentBandCount)
+         {
+            return temp->getMaxPixelValue(band - previousCount);
+         }
+      }
+      ++idx;
+   }
+   
+   return ossim::nan();
+}
+
+void ossimBandMergeSource::initialize()
+{
+   ossimImageCombiner::initialize();
+
+   if(theTile.get())
+   {
+      theTile = NULL;
+   }
+   
+   theNumberOfOutputBands = computeNumberOfInputBands();
+}
+
+void ossimBandMergeSource::allocate()
+{
+   if(theNumberOfOutputBands)
+   {
+      theTile = ossimImageDataFactory::instance()->create(this,
+                                                          this);
+      theTile->initialize();
+   }
+}
+
+ossim_uint32 ossimBandMergeSource::computeNumberOfInputBands()const
+{
+   ossim_uint32 result = 0;
+   ossim_uint32 size   = getNumberOfInputs();
+   for(ossim_uint32 index = 0; index < size; ++index)
+   {
+      ossimImageSource* temp = PTR_CAST(ossimImageSource, getInput(index));
+      if(temp)
+      {
+         if(temp->getNumberOfOutputBands() == 0)
+         {
+            ++result;
+         }
+         else
+         {
+            result += temp->getNumberOfOutputBands();
+         }
+      }
+   }
+   return result;
+}
+
+ossim_uint32 ossimBandMergeSource::getNumberOfOutputBands() const
+{
+   if(!theNumberOfOutputBands)
+   {
+      return computeNumberOfInputBands();
+   }
+   
+   return theNumberOfOutputBands;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimBandSelector.cpp b/ossim/src/ossim/imaging/ossimBandSelector.cpp
new file mode 100644
index 0000000..5c7f9e4
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimBandSelector.cpp
@@ -0,0 +1,713 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License:  See top level LICENSE.txt.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+// Contains class declaration for ossimBandSelector.
+// 
+//*******************************************************************
+//  $Id: ossimBandSelector.cpp 23426 2015-07-15 14:51:23Z okramer $
+
+#include <ossim/imaging/ossimBandSelector.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimVisitor.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <iostream>
+#include <algorithm>
+
+static ossimTrace traceDebug("ossimBandSelector:debug");
+
+RTTI_DEF1(ossimBandSelector,"ossimBandSelector", ossimImageSourceFilter)
+
+ossimBandSelector::ossimBandSelector()
+   :
+      ossimImageSourceFilter(),
+      theTile(0),
+      theOutputBandList(0),
+      theWithinRangeFlag(ossimBandSelectorWithinRangeFlagState_NOT_SET),
+      thePassThroughFlag(false),
+      theDelayLoadRgbFlag(false)
+   
+
+{
+//   theEnableFlag = false; // Start off disabled.
+   theEnableFlag = true; 
+}
+
+ossimBandSelector::~ossimBandSelector()
+{
+   theTile = 0;
+}
+
+ossimRefPtr<ossimImageData> ossimBandSelector::getTile(
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   if (!theInputConnection)
+   {
+      return ossimRefPtr<ossimImageData>();
+   }
+
+   // Get the tile from the source.
+   ossimRefPtr<ossimImageData> t = theInputConnection->getTile(tileRect, resLevel);
+
+   if (!isSourceEnabled())
+   {
+      return t;  // This tile source bypassed, return the input tile source.
+   }
+
+//   if (theOrderedCorrectlyFlag)
+//   {
+//      return t; // Input band order same as output band order.
+//   }
+
+   if(!theTile.valid()) // First time through, might not be initialized...
+   {
+      allocate();
+      if (!theTile.valid())
+      {
+         // Should never happen...
+         return t; // initialize failed.
+      }
+   }
+
+   theTile->setImageRectangle(tileRect);
+   if(theWithinRangeFlag == ossimBandSelectorWithinRangeFlagState_NOT_SET)
+   {
+      theWithinRangeFlag = ((outputBandsWithinInputRange() == true) ?
+                            ossimBandSelectorWithinRangeFlagState_IN_RANGE:
+                            ossimBandSelectorWithinRangeFlagState_OUT_OF_RANGE);
+   }
+   if(theWithinRangeFlag == ossimBandSelectorWithinRangeFlagState_OUT_OF_RANGE)
+   {
+      theTile->makeBlank();
+      return theTile;
+   }
+
+   if ( !t.valid() ||
+        (t->getDataObjectStatus() == OSSIM_EMPTY) ||
+        (t->getDataObjectStatus() == OSSIM_NULL))
+   {
+      //---
+      // Since we're enabled, we must return our tile not "t" so the
+      // correct number of bands goes through the chain.
+      //---
+      theTile->makeBlank();
+      return theTile;
+   }
+
+   // Copy selected bands to our tile.
+   for (ossim_uint32 i=0; i<theOutputBandList.size(); i++)
+   {
+      theTile->assignBand(t.get(), theOutputBandList[i], i);
+   }
+   
+   theTile->validate();
+
+   return theTile;
+}
+
+void ossimBandSelector::setOutputBandList( const vector<ossim_uint32>& outputBandList,
+                                           bool disablePassThru)
+{
+   if (outputBandList.size() == 0)
+      return;
+
+   theOutputBandList = outputBandList;  // Assign the new list.
+   if (disablePassThru)
+      return;
+
+   bool setBands = false;
+   ossimRefPtr<ossimImageHandler> ih = getBandSelectableImageHandler();
+   if ( ih.valid() )
+   {
+      // Our input is a single image chain that can do band selection.
+      if ( ih->setOutputBandList( outputBandList ) )
+      {
+         thePassThroughFlag = true;
+         setBands = true;
+         theTile = 0; // Don't need.
+      }
+   }
+
+   if ( setBands == false )
+   {
+      if ( theTile.valid() && ( theTile->getNumberOfBands() != outputBandList.size() ) )
+      {
+         theTile = 0;       // Force an allocate call next getTile.
+      }
+      theWithinRangeFlag = ossimBandSelectorWithinRangeFlagState_NOT_SET;
+      checkPassThrough();
+      //theOrderedCorrectlyFlag = isOrderedCorrectly();
+   }
+}
+
+ossim_uint32 ossimBandSelector::getNumberOfOutputBands() const
+{
+   ossim_uint32 bands;
+   
+   if(isSourceEnabled())
+   {
+      bands = static_cast<ossim_uint32>(theOutputBandList.size());
+   }
+   else
+   {
+      //---
+      // Note:
+      // This returns theInputConnection->getNumberOfOutputBands() which is our
+      // input.  Calling ossimBandSelector::getNumberOfInputBands() will produce
+      // an error if we are bypassed due to a band selectable image handler.
+      //---
+      bands = ossimImageSourceFilter::getNumberOfInputBands();
+   }
+
+   return bands;
+}
+
+ossim_uint32 ossimBandSelector::getNumberOfInputBands() const
+{
+   ossim_uint32 bands;
+
+   // See if we have a single image chain with band selectable image handler.
+   ossimRefPtr<ossimImageHandler> ih = getBandSelectableImageHandler();
+   if ( ih.valid() )
+   {
+      bands = ih->getNumberOfInputBands();
+   }
+   else
+   {
+      bands = ossimImageSourceFilter::getNumberOfInputBands();
+   }
+   
+   return bands;
+}
+
+void ossimBandSelector::initialize()
+{
+   // Base class will recapture "theInputConnection".
+   ossimImageSourceFilter::initialize();
+   
+   theWithinRangeFlag = ossimBandSelectorWithinRangeFlagState_NOT_SET;
+
+   if(theInputConnection)
+   {
+      if ( !theOutputBandList.size() ) 
+      {
+         // First time through...
+         if ( theDelayLoadRgbFlag )
+         {
+            //---
+            // "bands" key was set to "rgb" in loadState but there was not a
+            // connection to derive rgb bands from image handler.
+            //---
+            if ( getRgbBandList( theOutputBandList ) == false )
+            {
+               //---
+               // Could not derive from input. Assuming caller wanted three bands.
+               // Call to checkPassThrough()->outputBandsWithinInputRange()
+               // will check the range of output band list.
+               //---
+               theOutputBandList.resize(3);
+               theOutputBandList[0] = 0;
+               theOutputBandList[1] = 1;
+               theOutputBandList[2] = 2;
+            }
+            theDelayLoadRgbFlag = false; // clear flag.
+         }
+
+         if ( !theOutputBandList.size() )
+         {
+            // Set the output band list to input if not set above.
+            theInputConnection->getOutputBandList(theOutputBandList);
+         }
+      }
+
+      // NOTE: The following code was already being done in setOutputBandList(), so ignored here
+      // until someone complains. Need the ability to force this selector to be active even if
+      // the input handler is a band-selectable variety. (OLK Jul/2015)
+#if 0
+      // See if we have a single image chain with band selectable image handler.
+      ossimRefPtr<ossimImageHandler> ih = getBandSelectableImageHandler();
+      if ( ih.valid() )
+      {
+         if ( theOutputBandList.size() )
+         {
+            ih->setOutputBandList( theOutputBandList );
+         }
+         thePassThroughFlag = true;
+      }
+      else
+      {
+         checkPassThrough();
+      }
+#endif
+
+      if ( isSourceEnabled() )
+      {
+         // theOrderedCorrectlyFlag = isOrderedCorrectly();
+         
+         if ( theTile.valid() )
+         {
+            //---
+            // Check for:
+            // - ordered correctly
+            // - band change
+            // - scalar change
+            //---
+            if( ( theTile->getNumberOfBands() != theOutputBandList.size() ) ||
+                ( theTile->getScalarType() !=
+                  theInputConnection->getOutputScalarType() ) )
+            {
+               theTile = 0; // Don't need it.
+            }
+         }
+      }
+   }
+
+   if ( !isSourceEnabled() )
+   {
+      theTile = 0;
+   }
+}
+
+void ossimBandSelector::allocate()
+{
+   //initialize(); // Update the connection.
+   //theOrderedCorrectlyFlag = isOrderedCorrectly();
+   theTile = ossimImageDataFactory::instance()->create(this, this);
+   theTile->initialize();
+}
+
+bool ossimBandSelector::isSourceEnabled()const
+{
+   bool result = ossimImageSourceFilter::isSourceEnabled();
+   if(result)
+   {
+      // if I am not marked to pass information on through then enable me
+      result = !thePassThroughFlag;
+   }
+   
+   return result;
+}
+
+double ossimBandSelector::getMinPixelValue(ossim_uint32 band)const
+{
+   if(theInputConnection)
+   {
+      if (isSourceEnabled())
+      {
+         if(band < theOutputBandList.size())
+         {
+            return theInputConnection->
+               getMinPixelValue(theOutputBandList[band]);
+         }
+         else
+         {
+            return theInputConnection->getMinPixelValue(band);
+         }
+      }
+      else
+      {
+         return theInputConnection->getMinPixelValue(band);
+      }
+   }
+   return 0;
+}
+
+double ossimBandSelector::getNullPixelValue(ossim_uint32 band)const
+{
+   if(theInputConnection)
+   {
+      if (isSourceEnabled())
+      {
+         if(band < theOutputBandList.size())
+         {
+            return theInputConnection->
+               getNullPixelValue(theOutputBandList[band]);
+         }
+         else
+         {
+            return theInputConnection->getNullPixelValue(band);
+         }
+      }
+      else
+      {
+         return theInputConnection->getNullPixelValue(band);
+      }
+   }
+   
+   return 0;
+}
+
+double ossimBandSelector::getMaxPixelValue(ossim_uint32 band)const
+{
+   if(theInputConnection)
+   {
+      if (isSourceEnabled())
+      {
+         if(band < theOutputBandList.size())
+         {
+            return theInputConnection->
+               getMaxPixelValue(theOutputBandList[band]);
+         }
+         else
+         {
+            return theInputConnection->getMaxPixelValue(band);
+         }
+      }
+      else
+      {
+        return theInputConnection->getMaxPixelValue(band);
+      }
+   }
+   return 1.0/DBL_EPSILON;
+}
+
+bool ossimBandSelector::saveState(ossimKeywordlist& kwl,
+                                  const char* prefix)const
+{
+   ossimString temp;
+
+   kwl.add(prefix,
+           ossimKeywordNames::NUMBER_OUTPUT_BANDS_KW,
+           static_cast<int>(theOutputBandList.size()),
+           true);
+   
+   ossimString bandsString;
+   ossim::toSimpleStringList(bandsString,
+                             theOutputBandList);
+   kwl.add(prefix,
+           ossimKeywordNames::BANDS_KW,
+           bandsString,
+           true);
+/*   
+   for(ossim_uint32 counter = 0; counter < theOutputBandList.size();counter++)
+   {
+      temp  = ossimKeywordNames::BAND_KW;
+      temp += ossimString::toString(counter+1);
+      
+      kwl.add(prefix,
+              temp.c_str(),
+              ossimString::toString(theOutputBandList[counter]+1).c_str());
+   }
+*/   
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
+bool ossimBandSelector::loadState(const ossimKeywordlist& kwl,
+                                  const char* prefix)
+{
+   bool result = false;
+   
+   ossimImageSourceFilter::loadState(kwl, prefix);
+
+   theOutputBandList.clear();
+   
+   ossimString copyPrefix = prefix;
+   
+   ossimString bands = kwl.find(prefix, ossimKeywordNames::BANDS_KW);
+   if(!bands.empty())
+   {
+      ossimString bs = bands;
+      bs.downcase();
+      if ( bs == "rgb" )
+      {
+         // Flag initialize() to set the band list on first connection.
+         theDelayLoadRgbFlag = true;
+      }
+      else
+      {
+         // Load from key:value, e.g. bands:(2,1,0)
+         ossim::toSimpleVector(theOutputBandList, bands);
+         result = true;
+      }
+   }
+   else
+   {
+      ossimString regExpression =  ossimString("^(") + copyPrefix + "band[0-9]+)";
+      
+      vector<ossimString> keys = kwl.getSubstringKeyList( regExpression );
+      long numberOfBands = (long)keys.size();
+      ossim_uint32 offset = (ossim_uint32)(copyPrefix+"band").size();
+      std::vector<int>::size_type idx = 0;
+      std::vector<int> numberList(numberOfBands);
+      for(idx = 0; idx < keys.size();++idx)
+      {
+         ossimString numberStr(keys[idx].begin() + offset,
+                               keys[idx].end());
+         numberList[idx] = numberStr.toInt();
+      }
+      std::sort(numberList.begin(), numberList.end());
+      for(idx=0;idx < numberList.size();++idx)
+      {
+         const char* bandValue =
+         kwl.find(copyPrefix,
+                  ("band"+ossimString::toString(numberList[idx])).c_str());
+         theOutputBandList.push_back( ossimString(bandValue).toLong()-1);
+      }
+      result = true;
+   }
+
+   initialize();
+   
+   return result;
+}
+
+void ossimBandSelector::checkPassThrough()
+{
+   thePassThroughFlag = ((theInputConnection == 0)||!outputBandsWithinInputRange());
+   
+   // check if marked with improper bands
+   if(thePassThroughFlag) return;
+   
+   if(theInputConnection)
+   {
+      std::vector<ossim_uint32> inputList;
+      theInputConnection->getOutputBandList(inputList);
+
+      if ( inputList.size() == theOutputBandList.size() )
+      {
+         const std::vector<ossim_uint32>::size_type SIZE =
+            theOutputBandList.size();
+      
+         std::vector<ossim_uint32>::size_type i = 0;
+         while (i < SIZE)
+         {
+            if ( inputList[i] != theOutputBandList[i] )
+            {
+               break;
+            }
+            ++i;
+         }
+         if (i == SIZE)
+         {
+            thePassThroughFlag = true;
+         }
+      }
+   }
+   else
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimBandSelector::isOrderedCorrectly() ERROR:"
+         << "Method called prior to initialization!\n";
+      }
+   }
+
+}
+
+bool ossimBandSelector::outputBandsWithinInputRange() const
+{
+   bool result = false;
+   
+   if(theInputConnection)
+   {
+      result = true;
+      const ossim_uint32 HIGHEST_BAND = getNumberOfInputBands() - 1;
+      const ossim_uint32 OUTPUT_BANDS = (ossim_uint32)theOutputBandList.size();
+      for (ossim_uint32 i=0; i<OUTPUT_BANDS; ++i)
+      {
+         if (theOutputBandList[i] > HIGHEST_BAND)
+         {
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimBandSelector::outputBandsWithinInputRange() ERROR:"
+               << "Output band greater than highest input band. "
+               << theOutputBandList[i] << " > " << HIGHEST_BAND << "."
+               << std::endl;
+            }
+            result = false;
+            break;
+         }
+      }
+   }
+   else
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimBandSelector::outputBandsWithinInputRange() ERROR:"
+         << "Method called prior to initialization!" << std::endl;
+      }
+   }
+   return result;
+}
+
+void ossimBandSelector::getOutputBandList(std::vector<ossim_uint32>& bandList) const
+{
+   if ( isSourceEnabled()&&theOutputBandList.size() )
+   {
+      bandList = theOutputBandList;
+   }
+   else if (theInputConnection)
+   {
+      theInputConnection->getOutputBandList(bandList);
+   }
+   else
+   {
+      bandList.clear();
+   }
+}
+
+ossimString ossimBandSelector::getLongName()const
+{
+   return ossimString("Band Selector, maps an input band to the output band.");
+}
+
+ossimString ossimBandSelector::getShortName()const
+{
+   return ossimString("Band Selector");
+}
+
+void ossimBandSelector::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property) return;
+
+   if(property->getName() == "bandSelection")
+   {
+     ossimString str = property->valueToString();
+     std::vector<ossimString> str_vec;
+     std::vector<ossim_uint32> int_vec;
+     
+     str.split( str_vec, " " );
+     
+     for ( ossim_uint32 i = 0; i < str_vec.size(); ++i )
+     {
+        if(!str_vec[i].empty())
+        {
+           int_vec.push_back( str_vec[i].toUInt32() );
+        }
+     }
+     setOutputBandList( int_vec );
+   }
+   else if(property->getName() == "bands")
+   {
+      std::vector<ossim_uint32> selection;
+      if(ossim::toSimpleVector(selection, property->valueToString()))
+      {
+         theOutputBandList = selection;
+      }
+   }
+   else
+   {
+      ossimImageSourceFilter::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimBandSelector::getProperty(const ossimString& name)const
+{
+   if(name == "bandSelection")
+   {
+      std::vector<ossim_uint32> bands;
+	  
+	  getOutputBandList( bands );
+	  	  
+      std::vector<ossimString> bandNames;
+
+      for(ossim_uint32 i = 0; i < bands.size(); i++)
+      {
+         bandNames.push_back( ossimString::toString( bands[i] ) );
+      }
+	  
+	  ossimString str;
+	  
+	  str.join( bandNames, " " );
+	  
+      ossimStringProperty* stringProp = new ossimStringProperty(name, str);
+									
+      stringProp->clearChangeType();
+      stringProp->setReadOnlyFlag(false);
+      stringProp->setCacheRefreshBit();
+      
+      return stringProp;
+   }
+   else if(name == "bands")
+   {
+      ossimString bandsString;
+      ossim::toSimpleStringList(bandsString,
+                                theOutputBandList);
+      ossimStringProperty* stringProp = new ossimStringProperty(name, bandsString);
+      
+      stringProp->clearChangeType();
+      stringProp->setReadOnlyFlag(false);
+      stringProp->setCacheRefreshBit();
+      
+      return stringProp;
+   }
+   return ossimImageSourceFilter::getProperty(name);
+}
+
+void ossimBandSelector::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageSourceFilter::getPropertyNames(propertyNames);
+   propertyNames.push_back("bands");
+}
+
+ossimRefPtr<ossimImageHandler> ossimBandSelector::getBandSelectableImageHandler() const
+{
+   ossimRefPtr<ossimImageHandler> ih = 0;
+
+   if ( theInputConnection )
+   {
+      ossimTypeNameVisitor visitor(ossimString("ossimImageHandler"),
+                                   true,
+                                   ossimVisitor::VISIT_CHILDREN|ossimVisitor::VISIT_INPUTS);
+      
+      theInputConnection->accept(visitor);
+
+      // If there are multiple image handlers, e.g. a mosaic do not uses.
+      if ( visitor.getObjects().size() == 1 )
+      {
+         ih = visitor.getObjectAs<ossimImageHandler>( 0 );
+         if ( ih.valid() )
+         {
+            if ( ih->isBandSelector() == false )
+            {
+               ih = 0;
+            }
+         }
+      }
+      
+   } // Matches: if ( theInputConnection )
+   return ih;
+   
+} // End: ossimBandSelector::getBandSelectableImageHandler()
+
+bool ossimBandSelector::getRgbBandList(std::vector<ossim_uint32>& bandList) const
+{
+   bool result = false;
+   
+   if ( theInputConnection )
+   {
+      ossimTypeNameVisitor visitor(ossimString("ossimImageHandler"),
+                                   true,
+                                   ossimVisitor::VISIT_CHILDREN|ossimVisitor::VISIT_INPUTS);
+      
+      theInputConnection->accept(visitor);
+
+      // If there are multiple image handlers, e.g. a mosaic do not uses.
+      if ( visitor.getObjects().size() == 1 )
+      {
+         ossimRefPtr<ossimImageHandler> ih = visitor.getObjectAs<ossimImageHandler>( 0 );
+         if ( ih.valid() )
+         {
+            result = ih->getRgbBandList( bandList );
+         }
+      }
+      
+   } // Matches: if ( theInputConnection )
+
+   return result;
+   
+} // End: ossimBandSelector::getRgbBandList( ... )
diff --git a/ossim/src/ossim/imaging/ossimBandSeparateHandler.cpp b/ossim/src/ossim/imaging/ossimBandSeparateHandler.cpp
new file mode 100644
index 0000000..08da120
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimBandSeparateHandler.cpp
@@ -0,0 +1,284 @@
+//*************************************************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Oscar Kramer
+//
+// Description:
+// 
+// Image handler used when the multi-band image has each band represented by a different disk file.
+// This is the case for some Ikonos imagery. 
+//
+//*************************************************************************************************
+//  $Id: ossimBandSeparateHandler.cpp 2644 2011-05-26 15:20:11Z oscar.kramer $
+
+#include <ossim/imaging/ossimBandSeparateHandler.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <algorithm>
+
+RTTI_DEF1(ossimBandSeparateHandler, "ossimBandSeparateHandler", ossimImageHandler)
+
+//*************************************************************************************************
+//!  Constructor (default):
+//*************************************************************************************************
+ossimBandSeparateHandler::ossimBandSeparateHandler()
+{ }
+
+//*************************************************************************************************
+//! Destructor:
+//*************************************************************************************************
+ossimBandSeparateHandler::~ossimBandSeparateHandler()
+{
+   close();
+}
+
+//*************************************************************************************************
+// Opens multiple band-files based on info in metadata file.
+//*************************************************************************************************
+bool ossimBandSeparateHandler::open()
+{
+   if (isOpen())
+      close();
+
+   // Fetch the list of band filenames:
+   vector<ossimFilename> file_names;
+   getBandFileNames(file_names);
+
+   // There should be a list of filenames populated:
+   if (file_names.size() == 0)
+      return false;
+
+   m_mergeSource = new ossimBandMergeSource;
+   ossimRefPtr<ossimImageHandler> handler = 0;
+   for (ossim_uint32 band=0; band<file_names.size(); ++band)
+   {
+      // Open input band file:
+      handler = ossimImageHandlerRegistry::instance()->open(file_names[band], true, false);
+      if (!handler.valid())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)<<"ossimBandSeparateHandler::open() -- "
+            "Expected to find band file at <"<<file_names[band]<<"> but could not open file."
+            " Image not opened."<<endl;
+         close();
+         return false;
+      }
+
+      // Add this band file to the merge source:
+      m_bandFiles.push_back(handler);
+      m_mergeSource->connectMyInputTo(band, handler.get());
+   }
+
+   completeOpen();
+   return true;
+}
+
+//*************************************************************************************************
+//! Deletes the overview and clears the valid image vertices.  Derived
+//! classes should implement.
+//*************************************************************************************************
+void ossimBandSeparateHandler::close()
+{
+   vector<ossimRefPtr<ossimImageHandler> >::iterator iter = m_bandFiles.begin();
+   while (iter != m_bandFiles.end())
+   {
+      (*iter)->close();
+      *iter = 0;
+      ++iter;
+   }
+   m_bandFiles.clear();
+   m_mergeSource = 0;
+}
+
+//*************************************************************************************************
+//! Derived classes must implement this method to be concrete.
+//! @return true if open, false if not.
+//*************************************************************************************************
+bool ossimBandSeparateHandler::isOpen()const
+{
+   if (m_bandFiles.size() > 0)
+      return true;
+
+   return false;
+}
+
+//*************************************************************************************************
+//! Fills the requested tile by pulling pixels from multiple file tiles as needed.
+//*************************************************************************************************
+ossimRefPtr<ossimImageData> ossimBandSeparateHandler::getTile(const ossimIrect& tile_rect, 
+                                                              ossim_uint32 resLevel)
+{
+   // First verify that there are band-files available:
+   if ((m_bandFiles.size() == 0) || !m_mergeSource.valid())
+      return ossimRefPtr<ossimImageData>();
+
+   // Check if res level represents data in the overview:
+   if (theOverview.valid() && (resLevel > 0))
+      return theOverview->getTile(tile_rect, resLevel);
+
+   // Just pass getTile call on to contained bandMergeSource:
+   return m_mergeSource->getTile(tile_rect, resLevel);
+}
+
+//*************************************************************************************************
+//! @param resLevel Reduced resolution level to return lines of.
+//! Default = 0
+//! @return The number of lines for specified reduced resolution level.
+//*************************************************************************************************
+ossim_uint32 ossimBandSeparateHandler::getNumberOfLines(ossim_uint32 resLevel) const
+{
+   if ((m_bandFiles.size() == 0))
+      return 0;
+
+   // Using simple decimation by powers of 2:
+   ossim_uint32 numlines = m_bandFiles[0]->getNumberOfLines() >> resLevel;
+   return numlines;
+}
+
+//*************************************************************************************************
+//! @param resLevel Reduced resolution level to return samples of.
+//! Default = 0
+//! @return The number of samples for specified reduced resolution level.
+//*************************************************************************************************
+ossim_uint32 ossimBandSeparateHandler::getNumberOfSamples(ossim_uint32 resLevel) const
+{
+   if ((m_bandFiles.size() == 0))
+      return 0;
+
+   // Using simple decimation by powers of 2:
+   ossim_uint32 numsamps = m_bandFiles[0]->getNumberOfSamples() >> resLevel;
+   return numsamps;
+}
+
+//*************************************************************************************************
+//! Method to save the state of an object to a keyword list.
+//! Return true if ok or false on error.
+//*************************************************************************************************
+bool ossimBandSeparateHandler::saveState(ossimKeywordlist& kwl, const char* prefix) const
+{
+   return ossimImageHandler::saveState(kwl, prefix);
+}
+
+//*************************************************************************************************
+//! Method to the load (recreate) the state of an object from a keyword
+//! list.  Return true if ok or false on error.
+//*************************************************************************************************
+bool ossimBandSeparateHandler::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   if (!ossimImageHandler::loadState(kwl, prefix))
+      return false;
+
+   return open();
+}
+
+//*************************************************************************************************
+// Returns the number of bands of the first tile since all tiles need to have the same pixel type.
+//*************************************************************************************************
+ossim_uint32 ossimBandSeparateHandler::getNumberOfInputBands() const
+{
+   return (ossim_uint32) m_bandFiles.size();
+}
+
+//*************************************************************************************************
+//! Returns scalar type of first tile (should be the same for all tiles)
+//*************************************************************************************************
+ossimScalarType ossimBandSeparateHandler::getOutputScalarType() const
+{
+   if ((m_bandFiles.size() == 0) || (!m_bandFiles[0].valid()))
+      return OSSIM_SCALAR_UNKNOWN;
+
+   return m_bandFiles[0]->getOutputScalarType();
+}
+
+//*************************************************************************************************
+//! Overrides base connection method to connect output of merge source.
+// Returns TRUE if connection possible
+//*************************************************************************************************
+bool ossimBandSeparateHandler::canConnectMyOutputTo(ossim_int32 index, 
+                                                    const ossimConnectableObject* obj)
+{
+   if (!m_mergeSource.valid())
+      return false;
+
+   return m_mergeSource->canConnectMyOutputTo(index, obj);
+}
+
+//*************************************************************************************************
+//! Fetches the list of band file names from the header file. The header file name is contained
+//! in ossimImageHandler::theImageFile.
+//! NOTE TO PROGRAMMER: This class is presently tailored to the Ikonos metadata file specifying
+//! the individual band files. If other "metadata" formats are to be supported, then this class
+//! should be derived from. This method would therefore be pure virtual in this base-class and only 
+//! this method would need to be implemented in the derived classes.
+//*************************************************************************************************
+void ossimBandSeparateHandler::getBandFileNames(vector<ossimFilename>& file_names)
+{
+   file_names.clear();
+
+   // Ikonos expects metadata file with text extension:
+   if (theImageFile.ext() != "txt")
+      return;
+
+   // Attempt to open the metadata file:
+   ifstream is (theImageFile.chars());
+   if (is.fail())
+   {
+      ossimNotify(ossimNotifyLevel_WARN)<<"ossimBandSeparateHandler::open() -- "
+         "Cannot open text file at <"<<theImageFile<<">. Image not opened."<<endl;
+      return;
+   }
+
+   vector<ossimString> fname_list;
+   const ossimString separator (" ");
+   char line_buf[4096];
+   while (!is.eof())
+   {
+      is.getline(line_buf, 4096);
+      ossimString line_str (line_buf);
+
+      // Look for mention of multiple band files. It must indicate "separate files". This comes 
+      // before the list of band files:
+      if (line_str.contains("Multispectral Files:"))
+      {
+         if (!line_str.contains("Separate Files"))
+            return;
+      }
+
+      // Look for list of band files:
+      if (line_str.contains("Tile File Name:"))
+      {
+         ossimString file_list_str = line_str.after(":");
+         file_list_str.split(fname_list, separator, true);
+         break;
+      }
+   }
+   is.close();
+
+   // Set the path of individual band files to match metadata file path:
+   ossimFilename pathName (theImageFile.path());
+   for (size_t i=0; i<fname_list.size(); ++i)
+   {
+      ossimFilename fname (fname_list[i]);
+      fname.setPath(pathName);
+      file_names.push_back(fname);
+   }
+}
+
+//*************************************************************************************************
+//! Returns the geometry of the first band.
+//*************************************************************************************************
+ossimRefPtr<ossimImageGeometry> ossimBandSeparateHandler::getImageGeometry()
+{
+   if ((m_bandFiles.size() == 0) || (!m_bandFiles[0].valid()))
+      return 0;
+
+   return m_bandFiles[0]->getImageGeometry();
+}
+
diff --git a/ossim/src/ossim/imaging/ossimBitMaskTileSource.cpp b/ossim/src/ossim/imaging/ossimBitMaskTileSource.cpp
new file mode 100644
index 0000000..889afa1
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimBitMaskTileSource.cpp
@@ -0,0 +1,386 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Oscar Kramer
+//
+// Description:
+//
+// Contains class definition for ossimBitMaskTileSource.
+//*******************************************************************
+//  $Id: ossimBitMaskTileSource.cpp 2644 2011-05-26 15:20:11Z oscar.kramer $
+
+#include <ossim/imaging/ossimBitMaskTileSource.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimErrorContext.h>
+#include <ossim/base/ossimInterleaveTypeLut.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimBitMaskWriter.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <cmath>
+
+RTTI_DEF1_INST(ossimBitMaskTileSource, "ossimBitMaskTileSource", ossimImageHandler);
+
+//*******************************************************************
+// Public Constructor:
+//*******************************************************************
+ossimBitMaskTileSource::ossimBitMaskTileSource()
+   :
+   ossimImageHandler(),
+   m_tile(NULL)
+{
+}
+
+//*************************************************************************************************
+// Destructor must free the buffers for each res level
+//*************************************************************************************************
+ossimBitMaskTileSource::~ossimBitMaskTileSource()
+{
+   close();
+}
+
+//*************************************************************************************************
+// Reset
+//*************************************************************************************************
+void ossimBitMaskTileSource::close()
+{
+   ossimImageHandler::close();  // base class
+
+   // Wipe the mask buffers:
+   vector<ossim_uint8*>::iterator iter = m_buffers.begin();
+   while (iter != m_buffers.end())
+   {
+      delete [] (*iter);
+      iter++;
+   }
+   m_buffers.clear();
+   m_bufferSizes.clear();
+   m_tile = NULL;
+}
+
+//*************************************************************************************************
+// Opens an OSSIM Bit Mask raster file. This is a custom formatted file with header info
+//**************************************************************************************************
+bool ossimBitMaskTileSource::open()
+{
+   static const char MODULE[] = "ossimBitMaskTileSource::open()";
+
+   if (!isSupportedExtension())
+   {
+      close();
+      return false;
+   }
+
+   close();
+
+   // Open the mask file and verify magic number, read header info as well and verify good values:
+   std::ifstream fileStream(theImageFile.chars(), ios::in|ios::binary);
+   if (!fileStream.good())
+      return false;
+   ossimString magic_number;
+   int num_res_levels = 0;
+   char space;
+   fileStream >> magic_number;
+   if (magic_number == ossimBitMaskWriter::MASK_FILE_MAGIC_NUMBER)
+   {
+      // This is a next-generation mask file with header:
+      fileStream >> theStartingResLevel >> num_res_levels;
+      for (int r=0; r<num_res_levels; r++)
+      {
+         ossimIpt buffer_size;
+         fileStream >> buffer_size.x >> buffer_size.y;
+         m_bufferSizes.push_back(buffer_size);
+      }
+      fileStream >> space;
+   }
+   else
+   {
+      // This is the old headerless "Ming mask" format. Need to query the source image for image size.
+      // This format implies a starting res level of 1:
+      if (!m_handler.valid())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << MODULE << " ERROR:\nInput file <"<<theImageFile<<"> has no header information and "
+            "no valid source image has been provided. Cannot process mask" << std::endl;
+         fileStream.close();
+         close();
+         return false;
+      }
+      theStartingResLevel = 1;
+      num_res_levels = m_handler->getNumberOfDecimationLevels() - 1;
+      fileStream.seekg(0);
+
+      // Need to compute buffer sizes since they are not available in the mask header:
+      ossimIpt image_size = m_handler->getBoundingRect(1).size();
+      ossimIpt buffer_size ((image_size.x+7)/8, image_size.y);
+      for (int r=0; r<num_res_levels; r++)
+      {
+          m_bufferSizes.push_back(buffer_size);
+          buffer_size.x = (buffer_size.x+1)/2;
+          buffer_size.y = (buffer_size.y+1)/2;
+      }
+   }
+
+   if (m_bufferSizes.empty())
+   {
+      ossimNotify(ossimNotifyLevel_FATAL)
+         << MODULE << " ERROR:\nInput file <"<<theImageFile<<"> is not recognized or has invalid "
+         "header information." << std::endl;
+      fileStream.close();
+      close();
+      return false;
+   }
+
+   // Good to go, Need to now establish sizes for and offsets to each res level:
+   for (int r=0; r<num_res_levels; ++r)
+   {
+      // Allocate buffer for this res level:
+      ossim_uint32 size = m_bufferSizes[r].x * m_bufferSizes[r].y; 
+      ossim_uint8* buffer = new ossim_uint8[size];
+      m_buffers.push_back((ossim_uint8*) buffer);
+
+      // Read from disk:
+      fileStream.read((char*)buffer, size);
+      if (fileStream.fail())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << MODULE << " ERROR:"
+            << "\nError encountered reading mask file <" << theImageFile << ">"<<std::endl;
+         fileStream.close();
+         close();
+         return false;
+      }
+   }
+
+   fileStream.close();
+
+   // Allocate the mask tile. This will be 8-bits per pixel (i.e., decompressed):
+   m_tile = ossimImageDataFactory::instance()->create(this, this);
+   m_tile->initialize();
+
+   // Computes decimation factors for additional reduced res sets:
+   establishDecimationFactors();
+
+   return true;
+}
+
+//**************************************************************************************************
+// "Open" here means only that the mask buffers are valid and ready for access
+//**************************************************************************************************
+bool ossimBitMaskTileSource::isOpen() const
+{
+   return ((m_buffers.size() != 0) || (m_maskWriter.valid()));
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+bool ossimBitMaskTileSource::isSupportedExtension()
+{
+   ossimString ext = theImageFile.ext();
+   if (ext == "mask")
+      return true;
+
+   return false;
+}
+
+//*************************************************************************************************
+// Unpacks the mask data into a destination tile
+//*************************************************************************************************
+ossimRefPtr<ossimImageData> ossimBitMaskTileSource::getTile(const ossimIrect& tile_rect, 
+                                                            ossim_uint32 resLevel)
+{
+   static const ossim_uint8 MASK_BITS[] = {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01};
+
+   // Allocate the mask tile. This will be 8-bits per pixel (i.e., decompressed):
+   if (!m_tile.valid())
+   {
+      m_tile = ossimImageDataFactory::instance()->create(this, this);
+      m_tile->initialize();
+   }
+
+   // Initial screening:
+   if (!(isOpen() && isSourceEnabled() && isValidRLevel(resLevel)))
+      return NULL;
+
+   // Check if requested rect falls inside valid mask area:
+   if (!getImageRectangle(resLevel).intersects(tile_rect))
+      return NULL;
+
+   // Check if tile size matches requested size:
+   if ((m_tile->getWidth() != tile_rect.width()) || (m_tile->getHeight() != tile_rect.height()))
+   {
+      m_tile->setWidthHeight(tile_rect.width(), tile_rect.height());
+      m_tile->initialize();
+   }
+   m_tile->setImageRectangle(tile_rect);
+
+   // Start with blank tile if rect partially intersects defined mask area:
+   ossimIrect image_rect (getImageRectangle(resLevel));
+   if (!tile_rect.completely_within(image_rect))
+      m_tile->makeBlank();
+   
+   //##### START DEBUG CODE #########################
+   // This else if identifies unassigned mask pixels being returned by this method incorrectly.
+   // See ossimMaskFilter::executeMaskFilterSelection() (OLK 2/11)
+   //m_tile->fill(128.0);//###
+   //##### END DEBUG CODE #########################
+
+   ossimIpt image_size (image_rect.size());
+   ossim_uint32 num_mask_cols = (image_size.x+7)/8; 
+   ossim_uint8* tilebuf = (ossim_uint8*) m_tile->getBuf(0);
+   ossim_uint32 tile_index = 0, mask_index = 0, start_bit=0;
+   ossimIpt ul (tile_rect.ul());
+   ossimIpt lr (tile_rect.lr());
+
+   // Decide if we use our own mask buffer (read from file) or borrow tha active mask writer's
+   // buffer:
+   ossim_uint8* maskbuf;
+   if (m_maskWriter.valid())
+      maskbuf = m_maskWriter->m_buffers[resLevel-theStartingResLevel];
+   else
+      maskbuf = m_buffers[resLevel-theStartingResLevel];
+
+   // Nested loop to fill tile:
+   for (int y=ul.y; (y<=lr.y)&&(y<image_size.y); y++)
+   {
+      mask_index = y*num_mask_cols + ul.x/8;
+      start_bit = ul.x % 8; // may not start on even mask byte boundary
+      for (int x=ul.x; x<=lr.x;)
+      {
+         if (x < image_size.x)
+         {
+            // fetch mask pixel and isolate bit of interest:
+            for (ossim_uint32 mask_bit=start_bit; mask_bit<8; ++mask_bit)
+            {
+               if (maskbuf[mask_index] & MASK_BITS[mask_bit])
+                  tilebuf[tile_index++] = 255;
+               else
+                  tilebuf[tile_index++] = 0;
+
+               // Advance the pixel column and check for end of image rect:
+               ++x;
+               if ((x >= image_size.x) || (x>lr.x))
+                  break;
+            }
+
+            ++mask_index; // advance the mask buffer index 1 after processing 8 tile samples
+            start_bit = 0;
+         }
+         else
+         {
+            // Tile buffer extends beyond valid mask rect, so assume it is masked (0):
+            tilebuf[tile_index++] = 0;
+            ++x;
+         }
+      }
+   }
+   
+   m_tile->validate();
+   return m_tile;
+}
+
+//*******************************************************************
+// Argument res_Level is relative to the full image
+//*******************************************************************
+bool ossimBitMaskTileSource::isValidRLevel(ossim_uint32 res_Level) const
+{
+   ossim_uint32 num_rlevels;
+   if (m_maskWriter.valid())
+      num_rlevels = (ossim_uint32) m_maskWriter->m_buffers.size();
+   else
+      num_rlevels = (ossim_uint32) m_buffers.size();
+
+   return ((res_Level >= theStartingResLevel) && 
+           ((res_Level-theStartingResLevel) < num_rlevels));
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+ossim_uint32 ossimBitMaskTileSource::getNumberOfLines(ossim_uint32 res_Level) const
+{
+   if (!isValidRLevel(res_Level))
+      return 0;
+
+   if (m_maskWriter.valid())
+      return m_maskWriter->m_bufferSizes[res_Level-theStartingResLevel].y;
+
+   return m_bufferSizes[res_Level-theStartingResLevel].y;
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+ossim_uint32 ossimBitMaskTileSource::getNumberOfSamples(ossim_uint32 res_Level) const
+{
+   if (!isValidRLevel(res_Level))
+      return 0;
+
+   ossim_uint32 n = 0;
+   if (m_maskWriter.valid())
+      n = m_maskWriter->m_bufferSizes[res_Level-theStartingResLevel].x;
+   else
+      n = m_bufferSizes[res_Level-theStartingResLevel].x;
+
+   return n*8; // 8 pixels represented in one mask byte entry
+}
+
+ossimRefPtr<ossimImageGeometry> ossimBitMaskTileSource::getImageGeometry()
+{
+   return 0;
+}
+
+//*******************************************************************
+//! Overrides base class implementation.
+//*******************************************************************
+ossim_uint32 ossimBitMaskTileSource::getNumberOfDecimationLevels() const
+{
+   return (ossim_uint32) theDecimationFactors.size();
+}
+
+//*******************************************************************
+//! Overrides base class implementation.
+//*******************************************************************
+void ossimBitMaskTileSource::establishDecimationFactors()
+{
+   theDecimationFactors.clear();
+   ossim_uint32 num_res_levels = (ossim_uint32) m_buffers.size();
+   ossimDpt decimation(1, 1);
+   for (ossim_uint32 r=0; r<num_res_levels; r++)
+   {
+      theDecimationFactors.push_back(decimation);
+      decimation = decimation/2.0;
+   }
+}
+
+//*************************************************************************************************
+//! This class can be used during overview generation, in which case there will be a simultaneous
+//! mask writing. Instead of accessing a mask file (which may not yet exist), the mask buffer
+//! of the writer will be accessed directly instead of our own buffer.
+//*************************************************************************************************
+void ossimBitMaskTileSource::setAssociatedMaskWriter(ossimBitMaskWriter* maskWriter)
+{ 
+   m_maskWriter = maskWriter; 
+   if (m_maskWriter.valid())
+      theStartingResLevel = m_maskWriter->m_startingResLevel;
+}
+
+//*************************************************************************************************
+//! For backward compatibility with older mask format ("Ming Mask"), provide for associating
+//! the mask with an image handler:
+//*************************************************************************************************
+void ossimBitMaskTileSource::setAssociatedImageHandler(ossimImageHandler* handler)
+{
+   m_handler = handler;
+}
+
+
diff --git a/ossim/src/ossim/imaging/ossimBitMaskWriter.cpp b/ossim/src/ossim/imaging/ossimBitMaskWriter.cpp
new file mode 100644
index 0000000..f5c23c5
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimBitMaskWriter.cpp
@@ -0,0 +1,482 @@
+//*************************************************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Oscar Kramer
+//
+// Description: Contains implementation of class for computing a mask from an input image.
+//   The mask is stored in a compressed format where one byte represents 8 bit-masks for masking
+//   8 image pixels. 
+//*************************************************************************************************
+//  $Id: ossimBitMaskWriter.cpp 3081 2011-12-22 16:34:12Z oscar.kramer $
+
+#include <ossim/imaging/ossimBitMaskWriter.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimVisitor.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageHandler.h>
+
+const char* ossimBitMaskWriter::MASK_FILE_MAGIC_NUMBER = "OSSIM_BIT_MASK";
+const char* ossimBitMaskWriter::BM_STARTING_RLEVEL_KW = "starting_rlevel";
+
+//*************************************************************************************************
+// Constructor accepts handler to the source imagery being used to compute the mask.
+//*************************************************************************************************
+ossimBitMaskWriter::ossimBitMaskWriter()
+   :
+   m_flipper(0),
+   m_startingResLevel(0)
+{
+}
+
+//*************************************************************************************************
+// Destructor
+//*************************************************************************************************
+ossimBitMaskWriter::~ossimBitMaskWriter()
+{
+   // Make sure the mask file was written out before disappearing:
+   if (isOpen())
+      close();
+}
+
+//*************************************************************************************************
+// Returns true if buffers allocated:
+//*************************************************************************************************
+bool ossimBitMaskWriter::isOpen() const
+{
+   return (m_buffers.size() != 0);
+}
+
+//*************************************************************************************************
+// Returns true if buffers allocated:
+//*************************************************************************************************
+bool ossimBitMaskWriter::open()
+{
+   // Nothing to do yet. Eventually want to open the output stream here and write the buffer after
+   // each R-level is completed, so we don't need to keep vector of buffers in memory.
+   return true; 
+}
+
+//*************************************************************************************************
+// Reset
+//*************************************************************************************************
+void ossimBitMaskWriter::reset()
+{
+   // Wipe the mask buffers:
+   vector<ossim_uint8*>::iterator iter = m_buffers.begin();
+   while (iter != m_buffers.end())
+   {
+      delete [] (*iter);
+      iter++;
+   }
+   m_buffers.clear();
+   m_bufferSizes.clear();
+}
+
+//*************************************************************************************************
+//! Sets the NULL pixel value to consider when computing mask:
+//*************************************************************************************************
+void ossimBitMaskWriter::setBogusPixel(double pixel_value)
+{
+   if (!m_flipper.valid())
+      initializeFlipper();
+
+   m_flipper->setTargetValue(pixel_value);
+}
+
+//*************************************************************************************************
+//! Sets the range of pixels (inclusive) to be regarded as NULL pixels when computing mask
+//*************************************************************************************************
+void ossimBitMaskWriter::setBogusPixelRange(double min, double max)
+{
+   if (!m_flipper.valid())
+      initializeFlipper();
+
+   m_flipper->setTargetRange(min, max);
+}
+
+//*************************************************************************************************
+// Given a source's tile, derives the alpha mask and saves it in buffer for later writing to disk.
+//*************************************************************************************************
+void ossimBitMaskWriter::generateMask(ossimRefPtr<ossimImageData> tile, ossim_uint32 rLevel)
+{
+   static const ossim_uint8 MASK_BITS_0[] = {0x7F, 0xBF, 0xDF, 0xEF, 0xF7, 0xFB, 0xFD, 0xFE};
+   static const ossim_uint8 MASK_BITS_1[] = {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01};
+
+   // We don't start doing anything until starting res or higher requested:
+   ossim_uint32 mask_rlevel = rLevel - m_startingResLevel;
+   if (!tile.valid())
+      return;
+
+   // We should have had this done by now, but just in case:
+   if (!m_flipper.valid())
+      initializeFlipper();
+
+   // The flipper is used to identify null pixels since it has more sophisticated filtering 
+   // than available from the tile object:
+   switch (tile->getScalarType())
+   {
+   case OSSIM_UCHAR:
+      m_flipper->flipPixels(ossim_uint8(0), tile.get(), rLevel);
+      break;
+   case OSSIM_UINT16:
+   case OSSIM_USHORT11:
+      m_flipper->flipPixels(ossim_uint16(0), tile.get(), rLevel);
+      break;
+   case OSSIM_SSHORT16:
+      m_flipper->flipPixels(ossim_sint16(0), tile.get(), rLevel);
+      break;
+   case OSSIM_UINT32:
+      m_flipper->flipPixels(ossim_uint32(0), tile.get(), rLevel);
+      break;
+   case OSSIM_SINT32:
+      m_flipper->flipPixels(ossim_sint32(0), tile.get(), rLevel);
+      break;
+   case OSSIM_FLOAT32:
+   case OSSIM_NORMALIZED_FLOAT:
+      m_flipper->flipPixels(float(0), tile.get(), rLevel);
+      break;
+   case OSSIM_NORMALIZED_DOUBLE:
+   case OSSIM_FLOAT64:
+      m_flipper->flipPixels(ossim_float64(0), tile.get(), rLevel);
+      break;
+   case OSSIM_SCALAR_UNKNOWN:
+   default:
+      ossimNotify(ossimNotifyLevel_WARN) << "ossimBitMaskWriter::generateMask()-- "
+         "Unsupported scalar type!" << endl;
+      break;
+   }
+
+   ossimIpt image_size = computeImageSize(rLevel, tile.get());
+   ossim_uint32 num_mask_cols = (image_size.x+7)/8; // size of mask buffer after compression
+   ossim_uint32 num_mask_rows = image_size.y;
+   ossim_uint8* maskbuf = 0;
+
+   // Check if mask buffer for this R-level has already been allocated:
+   if (m_buffers.size() <= mask_rlevel)
+   {
+      ossim_uint32 size_of_maskbuf = num_mask_rows * num_mask_cols;
+      maskbuf = new ossim_uint8[size_of_maskbuf];
+      memset(maskbuf, 0, size_of_maskbuf);
+      m_buffers.push_back(maskbuf);
+      m_bufferSizes.push_back(ossimIpt(num_mask_cols, num_mask_rows));
+   }
+   else
+      maskbuf = m_buffers[mask_rlevel];
+
+   ossim_uint32 mask_index=0, tile_index=0, start_bit=0;
+   ossimIrect tile_rect (tile->getImageRectangle());
+   ossimIpt ul (tile_rect.ul());
+   ossimIpt lr (tile_rect.lr());
+
+   // Scan each pixel in the source tile and decide on mask value:
+   for (int y=ul.y; (y<=lr.y)&&(y<image_size.y); y++)
+   {
+      mask_index = y*num_mask_cols + ul.x/8;
+      start_bit = ul.x % 8; // may not start on even mask byte boundary
+
+      for (int x=ul.x; (x<=lr.x); /* incremented in bit loop below */ )         
+      {
+         if ( x < image_size.x )
+         {
+            // Process 8 samples and pack resultant mask into one byte:
+            maskbuf[mask_index] = 0;
+            for (ossim_uint32 mask_bit=start_bit; mask_bit<8; ++mask_bit)
+            {
+               // Decide whether to mask depending on pixel flipper outputting a NULL pixel. 
+               // if (tile->isNull(tile_index++))
+               if (tile->isNull(tile_index++))                  
+                  maskbuf[mask_index] &=  MASK_BITS_0[mask_bit];
+               else
+                  maskbuf[mask_index] |= MASK_BITS_1[mask_bit];
+               
+               // Advance the pixel column and check for end of image rect:
+               ++x;
+               if ((x >= image_size.x) || (x > lr.x))
+                  break;
+            }
+            ++mask_index; // advance the mask buffer index 1 after processing 8 tile samples
+            start_bit = 0;
+         }
+         else
+         {
+            ++x;
+            
+            ++tile_index;
+         }
+      }
+   } // Finished looping over all pixels in input tile
+
+   return;
+}
+
+//*************************************************************************************************
+//! Writes the mask file to path specified. Returns TRUE if successful.
+//*************************************************************************************************
+void ossimBitMaskWriter::close()
+{
+   static const char* MODULE = "ossimBitMaskWriter::writeMask()";
+   static const ossimString MASK_EXTENSION ("mask");
+
+   // Open the output file. Use default name if none provided.
+   if (theOutputName.empty()) // Couldn't figure out the name
+   {
+      ossimNotify(ossimNotifyLevel_WARN)<<MODULE<<" -- Error encountered trying to create mask file" 
+         " for writing because output file name was never initialized.";
+      return;
+   }
+
+   ofstream maskFileStream (theOutputName.chars(), ios::out|ios::binary);
+   if (!maskFileStream.is_open())
+   {
+      ossimNotify(ossimNotifyLevel_WARN)<<MODULE<<" -- Error encountered trying to create mask file" 
+         "<"<<theOutputName<<"> for writing. Cannot write mask.";
+      return;
+   }
+
+   // Write the header info:
+   ossim_uint32 num_rlevels = (ossim_uint32) m_buffers.size();
+   maskFileStream << MASK_FILE_MAGIC_NUMBER <<" "<< m_startingResLevel <<" "<< num_rlevels<<" ";
+   for (ossim_uint32 r=0; r<num_rlevels; r++)
+      maskFileStream << m_bufferSizes[r].x <<" "<< m_bufferSizes[r].y <<" "; 
+   maskFileStream << ends;
+
+   // Loop over each res level and write buffers to disk:
+   for (ossim_uint32 rlevel = 0; rlevel<num_rlevels; ++rlevel)
+   {
+      ossim_uint32 bufsize = m_bufferSizes[rlevel].x * m_bufferSizes[rlevel].y;
+      maskFileStream.write((char*)(m_buffers[rlevel]), bufsize);
+   }
+
+   maskFileStream.close();
+   reset();
+
+   return;
+}
+
+//*************************************************************************************************
+//! Constructor accepts keywordlist with all info necessary to compute a mask. The caller will
+//! still need to call writeMask().
+//*************************************************************************************************
+bool ossimBitMaskWriter::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   // static const char* MODULE = "ossimBitMaskWriter::writeMask(kwl)";
+
+   initializeFlipper();
+
+   // Fetch optional output filename:
+   theOutputName = kwl.find(prefix, ossimKeywordNames::OUTPUT_FILE_KW);
+
+   // Initialize the pixel flipper. This filter is used to identify pixels targeted for masking by
+   // remapping them to the null pixel:
+   m_flipper->loadState(kwl, prefix);
+
+   // Read Starting res level:
+   m_startingResLevel = 0;
+   ossimString kw_value = kwl.find(prefix, BM_STARTING_RLEVEL_KW);
+   if (!kw_value.empty())
+      m_startingResLevel = kw_value.toUInt32();
+
+   return true;
+}
+
+//*************************************************************************************************
+// 
+//*************************************************************************************************
+void ossimBitMaskWriter::initializeFlipper()
+{
+   if (!m_flipper.valid())
+   {
+      m_flipper = new ossimPixelFlipper();
+      m_flipper->setReplacementMode(ossimPixelFlipper::REPLACE_ONLY_FULL_TARGETS);
+      m_flipper->setTargetValue(0);
+      m_flipper->setReplacementValue(0);
+   }
+
+   // This method gets called when an input connection is made as well as other times, so keep an
+   // eye out for valid input connection:
+   if (theInputObjectList.size() != 0)
+   {
+      m_flipper->connectMyInputTo(theInputObjectList[0].get());
+   }
+}
+
+//*************************************************************************************************
+// 
+//*************************************************************************************************
+bool ossimBitMaskWriter::canConnectMyInputTo(ossim_int32 /*myInputIndex*/, 
+                                             const ossimConnectableObject* object) const
+{
+   const ossimImageSource* ois = dynamic_cast<const ossimImageSource*>(object);
+   return (ois != NULL);
+}
+
+//*************************************************************************************************
+// 
+//*************************************************************************************************
+ossim_int32 ossimBitMaskWriter::connectMyInputTo (ossimConnectableObject *inputObject, 
+                                                  bool makeOutputConnection, 
+                                                  bool createEventFlag)
+{
+   ossimImageSource* input_source = dynamic_cast<ossimImageSource*>(inputObject);
+   if (input_source == NULL)
+      return -1;
+
+   // Base class takes care of connection with this object:
+   ossimConnectableObject::connectMyInputTo(input_source, makeOutputConnection, createEventFlag);
+
+   // This input should be an image handler, but may need to search the objects inputs in case
+   // it is chained:
+   ossimImageHandler* handler = dynamic_cast<ossimImageHandler*>(input_source);
+   if (handler == NULL)
+   {
+      // Need to search:
+      ossimTypeNameVisitor visitor(ossimString("ossimImageHandler"),
+                                   true,
+                                   ossimVisitor::VISIT_CHILDREN|ossimVisitor::VISIT_INPUTS);
+      
+      input_source->accept(visitor);
+      ossimRefPtr<ossimObject> obj = visitor.getObject();
+      if ( obj.valid() )
+      {
+         handler = dynamic_cast<ossimImageHandler*>( obj.get() );
+      }
+   }
+
+   // Should have a handler:
+   if (!handler)
+   { 
+      disconnectAllInputs();
+      return -1;
+   }
+
+   // A handler has been identified. Need the filename:
+   ossimFilename imageFile =  handler->getFilename();
+   if (imageFile.contains("ovr.tmp"))
+   {
+      // The handler is actually an overview, need some massaging to work since the overview may
+      // not have an R0 entry and R1 rect must be requested instead:
+      m_imageSize = handler->getBoundingRect(1).size() * 2; 
+      imageFile = imageFile.noExtension();
+   }
+   else
+   {
+      // This is normal image handler so it is OK to request R0 rect:
+      m_imageSize = handler->getBoundingRect(0).size(); 
+   }
+   if (theOutputName.empty())
+      theOutputName = imageFile.setExtension("mask");
+
+   // Check if the pixel flipper was initialized:
+   if (m_flipper.valid())
+      m_flipper->connectMyInputTo(input_source);
+   else
+      initializeFlipper();
+
+   return 0;
+}
+
+//*************************************************************************************************
+//! Since overviews may not yet exist when the mask is being written, we must compute the
+//! size of the mask buffer based on the original R0 image size.
+//*************************************************************************************************
+ossimIpt ossimBitMaskWriter::computeImageSize(ossim_uint32 rlevel, ossimImageData* tile) const
+{
+   if (rlevel == 0)
+      return m_imageSize;
+
+   ossimIpt isize (m_imageSize);
+   for (ossim_uint32 r=1; r<=rlevel; r++)
+   {
+      isize.x = (isize.x + 1) / 2;
+      isize.y = (isize.y + 1) / 2;
+   }
+
+   // Adjust size n X direction to even mask boundary:
+   ossimIpt tile_size (tile->getWidth(), tile->getHeight());
+   isize.x = ((int)(isize.x+7)/8) * 8;
+
+   return isize;
+}
+
+//*************************************************************************************************
+// For imagery that already has overviews built, but with artifact edge pixels (such as JP2-
+// compressed data), it is preferred to build the mask overviews directly from the R0 mask.
+// This method will build the specified number of R-levels (including R0) from the last defined
+// mask buffer. Returns TRUE if successful.
+// disk.
+//*************************************************************************************************
+bool ossimBitMaskWriter::buildOverviews(ossim_uint32 total_num_rlevels)
+{
+   // First establish the remaining number of R-levels to generate, and the last valid R-level
+   // currently in memory:
+   if (m_buffers.size() == 0)
+      return false;
+   if (m_buffers.size() == total_num_rlevels)
+      return true; // nothing to do
+   ossim_uint32 ref_rlevel = m_startingResLevel + (ossim_uint32) m_buffers.size() - 1;
+   ossim_uint32 ovr_rlevel = ref_rlevel + 1;
+
+   ossimIpt ref_size (m_bufferSizes[ref_rlevel-m_startingResLevel]);
+   ossim_uint8 *ref_buf = m_buffers[ref_rlevel-m_startingResLevel];
+   ossim_uint32 ref_index = 0, ovr_index = 0;
+   ossim_uint8 *ovr_buf = 0;
+   ossim_uint32 size_of_refbuf = ref_size.x * ref_size.y;
+
+   // Loop over all remaining res levels:
+   while (ovr_rlevel != total_num_rlevels)
+   {
+      // Allocate the buffer at this R-level:
+      ossimIpt ovr_size ((ref_size.x+1)/2, (ref_size.y+1)/2);
+      ossim_uint32 size_of_ovrbuf = ovr_size.x * ovr_size.y;
+      if (size_of_ovrbuf == 0)
+         return false;
+      ovr_buf = new ossim_uint8[size_of_ovrbuf];
+      memset(ovr_buf, 0, size_of_ovrbuf);
+      m_buffers.push_back(ovr_buf);
+      m_bufferSizes.push_back(ovr_size);
+
+      // Loop over each output overview pixel, considering the underlying rlevel (equivalent to
+      // nearest-neighbor resampling for overview at 2X decimation):
+      for (int y=0; y<ovr_size.y; y++)
+      {
+         ref_index = 2*y*ref_size.x;
+         ovr_index = y*ovr_size.x;
+
+         for (int x=0; x<ovr_size.x; x++)
+         {
+            ossim_uint8 a = 0;
+            ossim_uint8 b = 0;
+            if (ref_index < size_of_refbuf)
+            {
+               a = ref_buf[ref_index++];
+               if ((x < (ovr_size.x-1)) || !(ref_size.x & 1))
+                  b = ref_buf[ref_index++];
+            }
+            ovr_buf[ovr_index++] = ( (a & 0x80)       |
+                                    ((a & 0x20) << 1) |
+                                    ((a & 0x08) << 2) |
+                                    ((a & 0x02) << 3) |
+                                    ((b & 0x80) >> 4) |
+                                    ((b & 0x20) >> 3) |
+                                    ((b & 0x08) >> 2) |
+                                    ((b & 0x02) >> 1));
+
+         }
+      }
+
+      // Advance to next rlevel:
+      ref_buf = ovr_buf;
+      ref_size = ovr_size;
+      size_of_refbuf = size_of_ovrbuf;
+      ++ovr_rlevel;
+   }
+
+   return true;
+}
+
+
diff --git a/src/ossim/imaging/ossimBlendMosaic.cpp b/ossim/src/ossim/imaging/ossimBlendMosaic.cpp
similarity index 100%
rename from src/ossim/imaging/ossimBlendMosaic.cpp
rename to ossim/src/ossim/imaging/ossimBlendMosaic.cpp
diff --git a/src/ossim/imaging/ossimBrightnessContrastSource.cpp b/ossim/src/ossim/imaging/ossimBrightnessContrastSource.cpp
similarity index 100%
rename from src/ossim/imaging/ossimBrightnessContrastSource.cpp
rename to ossim/src/ossim/imaging/ossimBrightnessContrastSource.cpp
diff --git a/ossim/src/ossim/imaging/ossimBrightnessMatch.cpp b/ossim/src/ossim/imaging/ossimBrightnessMatch.cpp
new file mode 100644
index 0000000..8e2cfc5
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimBrightnessMatch.cpp
@@ -0,0 +1,248 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: A brief description of the contents of the file.
+//
+//*************************************************************************
+// $Id: ossimBrightnessMatch.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimBrightnessMatch.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimNormRgbVector.h>
+#include <ossim/base/ossimHsiVector.h>
+#include <ossim/base/ossimContainerProperty.h>
+#include <ossim/base/ossimNumericProperty.h>
+
+RTTI_DEF1(ossimBrightnessMatch,
+          "ossimBrightnessMatch",
+          ossimImageSourceFilter)
+   
+ossimBrightnessMatch::ossimBrightnessMatch()
+   :ossimImageSourceFilter(),
+    theTargetBrightness(0.5),
+    theInputBrightness(0.5)
+{
+   theInputBrightness = ossim::nan();
+   theBrightnessContrastSource = new ossimBrightnessContrastSource;
+}
+
+
+ossimBrightnessMatch::~ossimBrightnessMatch()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimBrightnessMatch::getTile(
+   const ossimIrect& tileRect, ossim_uint32 resLevel)
+{
+   if(!isSourceEnabled())
+   {
+      return ossimImageSourceFilter::getTile(tileRect, resLevel);
+   }
+   if(theInputConnection)
+   {
+      if(ossim::isnan(theInputBrightness))
+      {
+         computeInputBrightness();
+      }
+      return theBrightnessContrastSource->getTile(tileRect, resLevel);
+   }
+   return 0;
+}
+
+void ossimBrightnessMatch::initialize()
+{
+   theBrightnessContrastSource->connectMyInputTo(0, getInput());
+   theNormTile = 0;
+}
+
+void ossimBrightnessMatch::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property)
+   {
+      return;
+   }
+   ossimString name = property->getName();
+   if(name == "input_brightness")
+   {
+      theInputBrightness = property->valueToString().toDouble();
+      theBrightnessContrastSource->setBrightness(theTargetBrightness-theInputBrightness);
+   }
+   else if(name == "target_brightness")
+   {
+      theTargetBrightness = property->valueToString().toDouble();
+      theBrightnessContrastSource->setBrightness(theTargetBrightness-theInputBrightness);
+   }
+   else
+   {
+      ossimImageSourceFilter::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimBrightnessMatch::getProperty(const ossimString& name)const
+{
+   if(name == "target_brightness")
+   {
+      ossimNumericProperty* numeric = new ossimNumericProperty(name,
+                                                               ossimString::toString(theTargetBrightness),
+                                                               0.0, 1.0);
+      numeric->setNumericType(ossimNumericProperty::ossimNumericPropertyType_FLOAT64);
+      numeric->setCacheRefreshBit();
+      return numeric;
+   }
+   else if(name == "input_brightness")
+   {
+      ossimNumericProperty* numeric = new ossimNumericProperty(name,
+                                                               ossimString::toString(theInputBrightness),
+                                                               0.0, 1.0);
+      numeric->setNumericType(ossimNumericProperty::ossimNumericPropertyType_FLOAT64);
+      numeric->setCacheRefreshBit();
+      return numeric;
+   }
+
+    return ossimImageSourceFilter::getProperty(name);
+}
+
+void ossimBrightnessMatch::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageSourceFilter::getPropertyNames(propertyNames);
+   
+   propertyNames.push_back("input_brightness");
+   propertyNames.push_back("target_brightness");
+}
+
+
+bool ossimBrightnessMatch::loadState(const ossimKeywordlist& kwl,
+                                              const char* prefix)
+{
+   const char* input_brightness = kwl.find(prefix, "input_brightness");
+   const char* target_brightness = kwl.find(prefix, "target_brightness");
+
+   if(input_brightness)
+   {
+      theInputBrightness = ossimString(input_brightness).toDouble();
+   }
+   if(target_brightness)
+   {
+      theTargetBrightness = ossimString(target_brightness).toDouble();
+   }
+   
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
+bool ossimBrightnessMatch::saveState(ossimKeywordlist& kwl,
+                                              const char* prefix)const
+{
+   kwl.add(prefix,
+           "input_brightness",
+           theInputBrightness,
+           true);
+   kwl.add(prefix,
+           "target_brightness",
+           theTargetBrightness,
+            true);
+
+   return ossimImageSourceFilter::saveState(kwl, prefix);   
+}
+
+
+void ossimBrightnessMatch::computeInputBrightness()
+{
+   if(theInputConnection)
+   {
+      ossimIrect inputRect = getBoundingRect();
+      ossim_uint32 rlevel = 0;
+      ossim_uint32 nlevels = getNumberOfDecimationLevels();
+      if(nlevels>1)
+      {
+         while((ossim::max(inputRect.width(), inputRect.height()) > 2048)&&
+               (rlevel < nlevels))
+         {
+            ++rlevel;
+            inputRect = getBoundingRect(rlevel);
+         }
+      }
+      ossimIpt centerPt = inputRect.midPoint();
+      centerPt.x -= 1024;
+      centerPt.y -= 1024;
+      ossimIrect reqRect(centerPt.x,
+                         centerPt.y,
+                         centerPt.x + 2047,
+                         centerPt.x + 2047);
+      reqRect = reqRect.clipToRect(inputRect);
+      ossimRefPtr<ossimImageData> inputTile = theInputConnection->getTile(reqRect, rlevel);
+
+      if(inputTile.valid())
+      {
+         theNormTile = new ossimImageData(0,
+                                          OSSIM_FLOAT32,
+                                          inputTile->getNumberOfBands());
+         theNormTile->initialize();
+         theNormTile->setImageRectangle(reqRect);
+         inputTile->copyTileToNormalizedBuffer((ossim_float32*)theNormTile->getBuf());
+         theNormTile->setDataObjectStatus(inputTile->getDataObjectStatus());
+         ossim_uint32 maxIdx = theNormTile->getWidth()*theNormTile->getHeight();
+         ossim_float32* bands[3];
+         double averageI = 0.0;
+         double count = 0.0;
+         ossim_uint32 offset = 0;
+         
+         bands[0] = (ossim_float32*)theNormTile->getBuf();
+         if(theNormTile->getNumberOfBands()>2)
+         {
+            bands[1] = (ossim_float32*)theNormTile->getBuf(1);
+            bands[2] = (ossim_float32*)theNormTile->getBuf(2);
+         }
+         else
+         {
+            bands[1] = bands[0];
+            bands[2] = bands[0];
+         }
+         ossimHsiVector hsi;
+         if(theNormTile->getDataObjectStatus() == OSSIM_FULL)
+         {
+            count = maxIdx;
+            
+            for(offset = 0; offset < maxIdx; ++offset)
+            {
+               hsi = ossimNormRgbVector(bands[0][offset], bands[1][offset], bands[2][offset]);
+               
+               averageI += hsi.getI();
+            }
+         }
+         else
+         {
+            for(offset = 0; offset < maxIdx; ++offset)
+            {
+               if((bands[0][offset] != 0.0)&&
+                  (bands[1][offset] != 0.0)&&
+                  (bands[2][offset] != 0.0))
+               {
+                  hsi = ossimNormRgbVector(bands[0][offset], bands[1][offset], bands[2][offset]);
+                  averageI += hsi.getI();
+                  
+                  ++count;
+               }
+            }
+         }
+         theInputBrightness = averageI / count;
+         theBrightnessContrastSource->setBrightness(theTargetBrightness-theInputBrightness);
+      }
+      else
+      {
+         theInputBrightness = .5;
+      }
+   }
+   theNormTile = 0;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimBumpShadeTileSource.cpp b/ossim/src/ossim/imaging/ossimBumpShadeTileSource.cpp
new file mode 100644
index 0000000..7650150
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimBumpShadeTileSource.cpp
@@ -0,0 +1,539 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimBumpShadeTileSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimBumpShadeTileSource.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimTilePatch.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/base/ossimColumnVector3d.h>
+#include <ossim/base/ossimNumericProperty.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimKeyword.h>
+#include <ossim/base/ossimMatrix3x3.h>
+#include <ossim/base/ossimRgbVector.h>
+
+static const char COLOR_RED_KW[]   = "color_red";
+static const char COLOR_GREEN_KW[] = "color_green";
+static const char COLOR_BLUE_KW[]  = "color_blue";
+
+RTTI_DEF1(ossimBumpShadeTileSource,
+          "ossimBumpShadeTileSource",
+          ossimImageCombiner);
+
+
+ossimBumpShadeTileSource::ossimBumpShadeTileSource()
+   :ossimImageCombiner(0, 2, 0, true, false),
+    m_tile(0),
+    m_lightSourceElevationAngle(45.0),
+    m_lightSourceAzimuthAngle(45.0),
+    m_lightDirection(3),
+    m_r(255),
+    m_g(255),
+    m_b(255)
+{
+   initialize();
+}
+
+ossimBumpShadeTileSource::~ossimBumpShadeTileSource()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimBumpShadeTileSource::getTile(
+   const  ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   if (!getInput(0))
+      return 0;
+
+   if(!m_tile.get())
+   {
+      allocate();
+   }
+   if(!m_tile.valid())
+   {
+      return m_tile;
+   }
+
+   m_tile->setImageRectangle(tileRect);
+   m_tile->initialize();
+   getTile(m_tile.get(), resLevel);
+   return m_tile;
+   
+}
+
+bool ossimBumpShadeTileSource::getTile(ossimImageData* tile, ossim_uint32 resLevel)
+{
+   if (!getInput(0) || !tile) return false;
+   if(!isSourceEnabled()) return true;
+   
+   tile->makeBlank();
+   
+   ossimIrect tileRect = tile->getImageRectangle();
+   ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(1));
+   ossimRefPtr<ossimImageData> colorData = 0;
+   if(colorSource)
+   {
+      colorData = new ossimImageData(colorSource, colorSource->getOutputScalarType(),
+                                     colorSource->getNumberOfOutputBands(),
+                                     tile->getWidth(), tile->getHeight());
+
+      // Caution: Must set rect prior to getTile:
+      colorData->setImageRectangle(tileRect);
+      
+      colorSource->getTile(colorData.get(), resLevel);
+   }
+
+   ossimImageSource* normalSource = PTR_CAST(ossimImageSource, getInput(0));
+   ossimRefPtr<ossimImageData> normalData =
+         new ossimImageData(normalSource, normalSource->getOutputScalarType(),
+                            normalSource->getNumberOfOutputBands(),
+                            tile->getWidth(), tile->getHeight());
+
+   // Caution: Must set rect prior to getTile:
+   normalData->setImageRectangle(tileRect);
+
+   normalSource->getTile(normalData.get(), resLevel);
+   ossimDataObjectStatus status = normalData->getDataObjectStatus();
+   if ((status == OSSIM_NULL) || (status == OSSIM_EMPTY) ||
+       (normalData->getNumberOfBands() != 3) ||
+       (normalData->getScalarType() != OSSIM_DOUBLE))
+   {
+      return false;
+   }
+
+   ossim_float64* normalBuf[3];
+   normalBuf[0] = static_cast<ossim_float64*>(normalData->getBuf(0));
+   normalBuf[1] = static_cast<ossim_float64*>(normalData->getBuf(1));
+   normalBuf[2] = static_cast<ossim_float64*>(normalData->getBuf(2));
+   ossim_float64 normalNp = normalData->getNullPix(0);
+
+   //---
+   // If we have some color data then use it for the bump
+   // else we will default to a grey scale bump shade.
+   //---
+   if ( colorData.get() &&
+        (colorData->getDataObjectStatus() != OSSIM_EMPTY) &&
+        (colorData->getDataObjectStatus() != OSSIM_NULL) )
+   {
+      switch(colorData->getScalarType())
+      {
+         case OSSIM_UCHAR:
+         {
+            ossim_uint8* resultBuf[3];
+            ossim_uint8* colorBuf[3];
+            resultBuf[0] = static_cast<ossim_uint8*>(tile->getBuf(0));
+            resultBuf[1] = static_cast<ossim_uint8*>(tile->getBuf(1));
+            resultBuf[2] = static_cast<ossim_uint8*>(tile->getBuf(2));
+            colorBuf[0]  = static_cast<ossim_uint8*>(colorData->getBuf(0));
+            if(colorData->getBuf(1))
+            {
+               colorBuf[1] = static_cast<ossim_uint8*>(colorData->getBuf(1));
+            }
+            else
+            {
+               colorBuf[1] = colorBuf[0];
+            }
+            if(colorData->getBuf(2))
+            {
+               colorBuf[2] = static_cast<ossim_uint8*>(colorData->getBuf(2));
+            }
+            else
+            {
+               colorBuf[2] = colorBuf[0];
+            }
+
+            long h = m_tile->getHeight();
+            long w = m_tile->getWidth();
+            for(long y = 0; y < h; ++y)
+            {
+               for(long x = 0; x < w; ++x)
+               {
+                  if((*normalBuf[0] != normalNp) &&
+                     (*normalBuf[1] != normalNp) &&
+                     (*normalBuf[2] != normalNp) )
+                  {
+                     if((*colorBuf[0])||(*colorBuf[1])||(*colorBuf[2]))
+                     {
+                        computeColor(*resultBuf[0],
+                                     *resultBuf[1],
+                                     *resultBuf[2],
+                                     *normalBuf[0],
+                                     *normalBuf[1],
+                                     *normalBuf[2],
+                                     *colorBuf[0],
+                                     *colorBuf[1],
+                                     *colorBuf[2]);
+                     }
+                     else
+                     {
+                        computeColor(*resultBuf[0],
+                                     *resultBuf[1],
+                                     *resultBuf[2],
+                                     *normalBuf[0],
+                                     *normalBuf[1],
+                                     *normalBuf[2],
+                                     m_r,
+                                     m_g,
+                                     m_b);
+                     }
+                  }
+                  else
+                  {
+                     *resultBuf[0] = *colorBuf[0];
+                     *resultBuf[1] = *colorBuf[1];
+                     *resultBuf[2] = *colorBuf[2];
+                  }
+                  resultBuf[0]++;
+                  resultBuf[1]++;
+                  resultBuf[2]++;
+                  colorBuf[0]++;
+                  colorBuf[1]++;
+                  colorBuf[2]++;
+                  normalBuf[0]++;
+                  normalBuf[1]++;
+                  normalBuf[2]++;
+               }
+            }
+            break;
+         }
+         default:
+         {
+            ossimNotify(ossimNotifyLevel_NOTICE)
+               << "ossimBumpShadeTileSource::getTile NOTICE:\n"
+               << "only 8-bit unsigned char is supported." << endl;
+         }
+      }
+   }
+   else
+   {
+      ossim_uint8* resultBuf[3];
+      resultBuf[0] = static_cast<ossim_uint8*>(tile->getBuf(0));
+      resultBuf[1] = static_cast<ossim_uint8*>(tile->getBuf(1));
+      resultBuf[2] = static_cast<ossim_uint8*>(tile->getBuf(2));
+      long h = tile->getHeight();
+      long w = tile->getWidth();
+      for(long y = 0; y < h; ++y)
+      {
+         for(long x = 0; x < w; ++x)
+         {
+            if((*normalBuf[0] != normalNp) &&
+                  (*normalBuf[1] != normalNp) &&
+                  (*normalBuf[2] != normalNp) )
+            {
+               computeColor(*resultBuf[0],
+                            *resultBuf[1],
+                            *resultBuf[2],
+                            *normalBuf[0],
+                            *normalBuf[1],
+                            *normalBuf[2],
+                            m_r,
+                            m_g,
+                            m_b);
+            }
+            else
+            {
+               *resultBuf[0] = 0;
+               *resultBuf[1] = 0;
+               *resultBuf[2] = 0;
+            }
+            resultBuf[0]++;
+            resultBuf[1]++;
+            resultBuf[2]++;
+            normalBuf[0]++;
+            normalBuf[1]++;
+            normalBuf[2]++;
+         }
+      }
+   }
+
+   tile->validate();
+   return true;
+}
+
+void ossimBumpShadeTileSource::computeColor(ossim_uint8& r,
+                                            ossim_uint8& g,
+                                            ossim_uint8& b,
+                                            ossim_float64 normalX,
+                                            ossim_float64 normalY,
+                                            ossim_float64 normalZ,
+                                            ossim_uint8 dr,
+                                            ossim_uint8 dg,
+                                            ossim_uint8 db)const
+{
+   double c = /*fabs*/(normalX*m_lightDirection[0] +
+                   normalY*m_lightDirection[1] +
+                   normalZ*m_lightDirection[2]);
+   
+   r = ossimRgbVector::clamp(ossim::round<int>(c*dr), 1, 255);
+   g = ossimRgbVector::clamp(ossim::round<int>(c*dg), 1, 255);
+   b = ossimRgbVector::clamp(ossim::round<int>(c*db), 1, 255);
+}
+
+void ossimBumpShadeTileSource::initialize()
+{
+   ossimImageCombiner::initialize();
+
+   ossimImageSource* normalSource = dynamic_cast<ossimImageSource*>( getInput(0) );
+   if ( normalSource )
+   {
+      normalSource->initialize();
+   }
+   
+   ossimImageSource* colorSource = dynamic_cast<ossimImageSource*>( getInput(1) );
+   if ( colorSource )
+   {
+      colorSource->initialize();
+   }
+   
+   m_tile = 0;
+   
+   computeLightDirection();
+}
+
+void ossimBumpShadeTileSource::allocate()
+{
+   m_tile = ossimImageDataFactory::instance()->create(this, this);
+   m_tile->initialize();
+}
+
+void ossimBumpShadeTileSource::computeLightDirection()
+{
+   NEWMAT::Matrix m = ossimMatrix3x3::createRotationMatrix(m_lightSourceElevationAngle,
+                                                           0.0,
+                                                           -m_lightSourceAzimuthAngle); // make positive rotation clockwise for azimuth
+   NEWMAT::ColumnVector v(3);
+   v[0] = 0;
+   v[1] = 1;
+   v[2] = 0;
+   v = m*v;
+   // reflect Z.  We need the Z pointing up from the surface and not into it.
+   //
+   ossimColumnVector3d d(v[0], v[1], -v[2]);
+   d = d.unit();
+   m_lightDirection[0] = d[0];
+   m_lightDirection[1] = d[1];
+   m_lightDirection[2] = d[2];
+}
+
+bool ossimBumpShadeTileSource::loadState(const ossimKeywordlist& kwl,
+                                         const char* prefix)
+{
+   const char* elevationAngle = kwl.find(prefix, ossimKeywordNames::ELEVATION_ANGLE_KW);
+   const char* azimuthAngle   = kwl.find(prefix, ossimKeywordNames::AZIMUTH_ANGLE_KW);
+   
+   
+   if(elevationAngle)
+   {
+      m_lightSourceElevationAngle = ossimString(elevationAngle).toDouble();
+   }
+
+   if(azimuthAngle)
+   {
+      m_lightSourceAzimuthAngle = ossimString(azimuthAngle).toDouble();
+   }
+
+   const char* lookup = kwl.find(prefix, COLOR_RED_KW);
+   if (lookup)
+   {
+      m_r = ossimString(lookup).toUInt8();
+   }
+   
+   lookup = kwl.find(prefix, COLOR_GREEN_KW);
+   if (lookup)
+   {
+      m_g = ossimString(lookup).toUInt8();
+   }
+   
+   lookup = kwl.find(prefix, COLOR_BLUE_KW);
+   if (lookup)
+   {
+      m_b = ossimString(lookup).toUInt8();
+   }
+    
+
+   computeLightDirection();
+
+   bool result = ossimImageSource::loadState(kwl, prefix);
+
+   theInputListIsFixedFlag  = true;
+   theOutputListIsFixedFlag = false;
+   if(!getNumberOfInputs()) setNumberOfInputs(2);
+   
+   return result;
+}
+
+bool ossimBumpShadeTileSource::saveState(ossimKeywordlist& kwl,
+                                         const char* prefix)const
+{
+   kwl.add(prefix,
+           ossimKeywordNames::ELEVATION_ANGLE_KW,
+           m_lightSourceElevationAngle,
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::AZIMUTH_ANGLE_KW,
+           m_lightSourceAzimuthAngle,
+           true);
+
+   kwl.add(prefix, COLOR_RED_KW,   m_r, true);
+   kwl.add(prefix, COLOR_GREEN_KW, m_g, true);
+   kwl.add(prefix, COLOR_BLUE_KW,  m_b, true);
+   
+   return ossimImageSource::saveState(kwl, prefix);
+}
+
+ossimString ossimBumpShadeTileSource::getShortName()const
+{
+   return ossimString("bump shader");
+}
+
+ossimString ossimBumpShadeTileSource::getLongName()const
+{
+   return ossimString("Blinn's bump map filter");
+}
+
+ossim_uint32 ossimBumpShadeTileSource::getNumberOfOutputBands() const
+{
+   return 3;
+}
+
+ossimScalarType ossimBumpShadeTileSource::getOutputScalarType() const
+{
+   return OSSIM_UCHAR;
+}
+
+double ossimBumpShadeTileSource::getNullPixelValue()const
+{
+   return 0.0;
+}
+
+double ossimBumpShadeTileSource::getMinPixelValue(ossim_uint32 /* band */)const
+{
+   return 1.0;
+}
+
+double ossimBumpShadeTileSource::getMaxPixelValue(ossim_uint32 /* band */)const
+{
+   return 255.0;
+}
+
+double ossimBumpShadeTileSource::getAzimuthAngle()const
+{
+   return m_lightSourceAzimuthAngle;
+}
+
+double ossimBumpShadeTileSource::getElevationAngle()const
+{
+   return m_lightSourceElevationAngle;
+}
+
+void ossimBumpShadeTileSource::setAzimuthAngle(double angle)
+{
+   m_lightSourceAzimuthAngle = angle;
+}
+
+void ossimBumpShadeTileSource::setElevationAngle(double angle)
+{
+   m_lightSourceElevationAngle = angle;
+}
+
+bool ossimBumpShadeTileSource::canConnectMyInputTo(ossim_int32 inputIndex,
+                                                   const ossimConnectableObject* object)const
+{
+   return (object&&
+           ( (inputIndex>=0) && inputIndex < 2)&&
+           PTR_CAST(ossimImageSource, object));
+   
+}
+
+void ossimBumpShadeTileSource::connectInputEvent(ossimConnectionEvent& /* event */)
+{
+   initialize();
+}
+
+void ossimBumpShadeTileSource::disconnectInputEvent(ossimConnectionEvent& /* event */)
+{
+   initialize();
+}
+
+void ossimBumpShadeTileSource::propertyEvent(ossimPropertyEvent& /* event */)
+{
+   initialize();
+}
+
+void ossimBumpShadeTileSource::refreshEvent(ossimRefreshEvent& /* event */)
+{
+   initialize();
+}
+
+void ossimBumpShadeTileSource::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   ossimString name = property->getName();
+   if(name == "lightSourceElevationAngle")
+   {
+      m_lightSourceElevationAngle = property->valueToString().toDouble();
+   }
+   else if(name == "lightSourceAzimuthAngle")
+   {
+      m_lightSourceAzimuthAngle = property->valueToString().toDouble();
+   }
+   else
+   {
+      ossimImageCombiner::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimBumpShadeTileSource::getProperty(const ossimString& name)const
+{
+   if(name == "lightSourceElevationAngle")
+   {
+      ossimProperty* prop = new ossimNumericProperty(name, ossimString::toString(m_lightSourceElevationAngle), 0.0, 90.0);
+      prop->setCacheRefreshBit();
+      return prop;
+   }
+   else if(name == "lightSourceAzimuthAngle")
+   {
+      ossimProperty* prop = new ossimNumericProperty(name, ossimString::toString(m_lightSourceAzimuthAngle), 0, 360);
+      prop->setCacheRefreshBit();
+      return prop;
+   }
+   
+   return ossimImageCombiner::getProperty(name);
+}
+
+void ossimBumpShadeTileSource::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageCombiner::getPropertyNames(propertyNames);
+   propertyNames.push_back("lightSourceElevationAngle");
+   propertyNames.push_back("lightSourceAzimuthAngle");
+}
+
+void ossimBumpShadeTileSource::setRgbColorSource(ossim_uint8 r,
+                                                 ossim_uint8 g,
+                                                 ossim_uint8 b)
+{
+   m_r = r;
+   m_g = g;
+   m_b = b;
+}
+
+void ossimBumpShadeTileSource::getRgbColorSource(ossim_uint8& r,
+                                                 ossim_uint8& g,
+                                                 ossim_uint8& b) const
+{
+   r = m_r;
+   g = m_g;
+   b = m_b;
+}
+
diff --git a/src/ossim/imaging/ossimCacheTileSource.cpp b/ossim/src/ossim/imaging/ossimCacheTileSource.cpp
similarity index 100%
rename from src/ossim/imaging/ossimCacheTileSource.cpp
rename to ossim/src/ossim/imaging/ossimCacheTileSource.cpp
diff --git a/ossim/src/ossim/imaging/ossimCastTileSourceFilter.cpp b/ossim/src/ossim/imaging/ossimCastTileSourceFilter.cpp
new file mode 100644
index 0000000..14cbb46
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimCastTileSourceFilter.cpp
@@ -0,0 +1,689 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimCastTileSourceFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimCastTileSourceFilter.h>
+#include <ossim/imaging/ossimU8ImageData.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/base/ossimStringProperty.h>
+
+RTTI_DEF1( ossimCastTileSourceFilter,
+           "ossimCastTileSourceFilter",
+           ossimImageSourceFilter );
+
+ossimCastTileSourceFilter::ossimCastTileSourceFilter(ossimImageSource* input,
+						     ossimScalarType scalarType)
+   :ossimImageSourceFilter(NULL,input),
+    theTile(NULL),
+    theOutputScalarType(scalarType)
+{
+}
+
+ossimCastTileSourceFilter::~ossimCastTileSourceFilter()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimCastTileSourceFilter::getTile(
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   ossimRefPtr<ossimImageData> inputTile;
+   
+   if(theInputConnection)
+   {
+      inputTile = theInputConnection->getTile(tileRect, resLevel);
+   }
+   return applyCast(inputTile);
+}
+
+ossimScalarType ossimCastTileSourceFilter::getOutputScalarType() const
+{
+   if(isSourceEnabled())
+   {
+      return theOutputScalarType;
+   }
+   else if(theInputConnection)
+   {
+      return theInputConnection->getOutputScalarType();
+   }
+
+   return OSSIM_SCALAR_UNKNOWN;
+}
+
+double ossimCastTileSourceFilter::getNullPixelValue(ossim_uint32 band)const
+{
+   if(!isSourceEnabled())
+   {
+      if(theInputConnection)
+      {
+         return theInputConnection->getNullPixelValue(band);
+      }
+   }
+   return ossim::defaultNull(getOutputScalarType());
+}
+
+double ossimCastTileSourceFilter::getMinPixelValue(ossim_uint32 band)const
+{
+   if(!isSourceEnabled())
+   {
+      if(theInputConnection)
+      {
+         return theInputConnection->getMinPixelValue(band);
+      }
+   }
+
+   if(theInputConnection)
+   {
+      double tempMin    = theInputConnection->getMinPixelValue(band);
+      
+      double defaultMin = ossim::defaultMin(theOutputScalarType);
+      double defaultMax = ossim::defaultMax(theOutputScalarType);
+
+      if((tempMin >= defaultMin) && (tempMin <= defaultMax))
+      {
+         defaultMin = tempMin;
+      }
+
+      return defaultMin;
+   }
+   
+   return ossimImageSource::getMinPixelValue(band);
+}
+
+double ossimCastTileSourceFilter::getMaxPixelValue(ossim_uint32 band)const
+{
+   if(!isSourceEnabled())
+   {
+      if(theInputConnection)
+      {
+         return theInputConnection->getMaxPixelValue(band);
+      }
+   }
+   if(theInputConnection)
+   {
+      double tempMax    = theInputConnection->getMaxPixelValue(band);
+      
+      double defaultMax = ossim::defaultMax(theOutputScalarType);
+      double defaultMin = ossim::defaultMin(theOutputScalarType);
+
+      if((tempMax >= defaultMin) && (tempMax <= defaultMax))
+      {
+         defaultMax = tempMax;
+      }
+
+      return defaultMax;
+   }
+   return ossimImageSource::getMaxPixelValue(band);
+}
+
+ossimRefPtr<ossimImageData> ossimCastTileSourceFilter::applyCast(
+   ossimRefPtr<ossimImageData> inputTile)
+{
+   if(!inputTile.valid())
+   {
+      return inputTile;
+   }
+   
+   if(!theTile.valid() ||
+      (theTile->getNumberOfBands() != inputTile->getNumberOfBands()))
+   {
+      allocate(inputTile);
+   }
+   else
+   {
+      ossim_int32 tw =inputTile->getWidth(); 
+      ossim_int32 th =inputTile->getHeight(); 
+      ossim_int32 w = theTile->getWidth();
+      ossim_int32 h = theTile->getHeight();
+      theTile->setWidthHeight(tw, th);
+      
+      if((w*h != tw*th))
+      {
+         theTile->initialize();
+      }
+      else
+      {
+         theTile->makeBlank();
+      }
+      theTile->setOrigin(inputTile->getOrigin());
+   }
+   
+   if( (inputTile->getDataObjectStatus()==OSSIM_EMPTY) ||
+       (inputTile->getDataObjectStatus()==OSSIM_NULL))
+   {
+      return theTile;
+   }
+   
+   switch(inputTile->getScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         ossim_uint8** bands = new ossim_uint8*[inputTile->getNumberOfBands()];
+         
+         for(ossim_uint32 band = 0;
+             band < inputTile->getNumberOfBands();
+             ++band)
+         {
+            bands[band] = static_cast<ossim_uint8*>(inputTile->getBuf(band));
+         }
+         castInputToOutput(bands,
+                           inputTile->getNullPix(),
+                           inputTile->getDataObjectStatus()==OSSIM_PARTIAL);
+         delete [] bands;
+         break;
+      }
+      case OSSIM_SINT8:
+      {
+         ossim_sint8** bands = new ossim_sint8*[inputTile->getNumberOfBands()];
+         
+         for(ossim_uint32 band = 0;
+             band < inputTile->getNumberOfBands();
+             ++band)
+         {
+            bands[band] = static_cast<ossim_sint8*>(inputTile->getBuf(band));
+         }
+         castInputToOutput(bands,
+                           inputTile->getNullPix(),
+                           inputTile->getDataObjectStatus()==OSSIM_PARTIAL);
+         delete [] bands;
+         break;
+      }
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+      {
+         ossim_uint16** bands =
+            new ossim_uint16*[inputTile->getNumberOfBands()];
+         
+         for(ossim_uint32 band = 0;
+             band < inputTile->getNumberOfBands();
+             ++band)
+         {
+            bands[band] = static_cast<ossim_uint16*>(inputTile->getBuf(band));
+         }
+         castInputToOutput(bands,
+                           inputTile->getNullPix(),
+                           inputTile->getDataObjectStatus()==OSSIM_PARTIAL);
+         delete [] bands;
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         ossim_sint16** bands =
+            new ossim_sint16*[inputTile->getNumberOfBands()];
+         
+         for(ossim_uint32 band = 0;
+             band < inputTile->getNumberOfBands();
+             ++band)
+         {
+            bands[band] = static_cast<ossim_sint16*>(inputTile->getBuf(band));
+         }
+         castInputToOutput(bands,
+                           inputTile->getNullPix(),
+                           inputTile->getDataObjectStatus()==OSSIM_PARTIAL);
+         delete [] bands;
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         ossim_sint32** bands =
+            new ossim_sint32*[inputTile->getNumberOfBands()];
+         
+         for(ossim_uint32 band = 0;
+             band < inputTile->getNumberOfBands();
+             ++band)
+         {
+            bands[band] = static_cast<ossim_sint32*>(inputTile->getBuf(band));
+         }
+         castInputToOutput(bands,
+                           inputTile->getNullPix(),
+                           inputTile->getDataObjectStatus()==OSSIM_PARTIAL);
+         delete [] bands;
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         ossim_uint32** bands =
+            new ossim_uint32*[inputTile->getNumberOfBands()];
+         
+         for(ossim_uint32 band = 0;
+             band < inputTile->getNumberOfBands();
+             ++band)
+         {
+            bands[band] = static_cast<ossim_uint32*>(inputTile->getBuf(band));
+         }
+         castInputToOutput(bands,
+                           inputTile->getNullPix(),
+                           inputTile->getDataObjectStatus()==OSSIM_PARTIAL);
+         delete [] bands;
+         break;
+      }
+      case OSSIM_FLOAT32: 
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         float** bands = new float*[inputTile->getNumberOfBands()];
+         
+         for(ossim_uint32 band = 0;
+             band < inputTile->getNumberOfBands();
+             ++band)
+         {
+            bands[band] = static_cast<float*>(inputTile->getBuf(band));
+         }
+         castInputToOutput(bands,
+                           inputTile->getNullPix(),
+                           inputTile->getDataObjectStatus()==OSSIM_PARTIAL);
+         delete [] bands;
+         break;
+      }
+      case OSSIM_FLOAT64:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         double** bands = new double*[inputTile->getNumberOfBands()];
+         
+         for(ossim_uint32 band = 0;
+             band < inputTile->getNumberOfBands();
+             ++band)
+         {
+            bands[band] = static_cast<double*>(inputTile->getBuf(band));
+         }
+         castInputToOutput(bands,
+                           inputTile->getNullPix(),
+                           inputTile->getDataObjectStatus()==OSSIM_PARTIAL);
+         delete [] bands;
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         break;
+      }
+   }
+
+//   theTile->setDataObjectStatus(inputTile->getDataObjectStatus());
+   theTile->validate();
+   return theTile;
+}
+
+void ossimCastTileSourceFilter::setOutputScalarType(ossimScalarType scalarType)
+{
+   ossimScalarType old_type = theOutputScalarType;
+   theOutputScalarType = scalarType;
+
+   if ( (theOutputScalarType != old_type))
+   {
+      // must reinitialize...
+      theTile = NULL;
+      initialize();
+   }
+}
+
+void ossimCastTileSourceFilter::setOutputScalarType(ossimString scalarType)
+{
+   int scalar =
+      ossimScalarTypeLut::instance()->getEntryNumber(scalarType.c_str());
+   
+   if (scalar != ossimLookUpTable::NOT_FOUND)
+   {
+      setOutputScalarType(static_cast<ossimScalarType>(scalar));
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimCastTileSourceFilter::setOutputScalarType WARN:"
+         << "\nUnknown scalar type:  " << scalarType.c_str() << endl;
+   }
+}
+
+ossimString ossimCastTileSourceFilter::getOutputScalarTypeString()const
+{
+   return ossimScalarTypeLut::instance()->getEntryString(theOutputScalarType);
+}
+
+void ossimCastTileSourceFilter::initialize()
+{
+   ossimImageSourceFilter::initialize();
+
+   if (theOutputScalarType == OSSIM_SCALAR_UNKNOWN)
+   {
+      // default to OSSIM_UCHAR
+      theOutputScalarType = OSSIM_UCHAR;
+   }
+}
+
+bool ossimCastTileSourceFilter::saveState(ossimKeywordlist& kwl,
+                                          const char* prefix) const
+{
+   ossimImageSourceFilter::saveState(kwl, prefix);
+
+   kwl.add(prefix,
+           ossimKeywordNames::SCALAR_TYPE_KW,
+           ossimScalarTypeLut::instance()->getEntryString(theOutputScalarType),
+           true);
+
+   return true;
+}
+
+bool ossimCastTileSourceFilter::loadState(const ossimKeywordlist& kwl,
+                                          const char* prefix)
+{
+   ossimImageSourceFilter::loadState(kwl, prefix);
+
+   if (kwl.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimScalarRemapper::loadState WARN:\n"
+         << " ERROR detected in keyword list!  State not loaded."
+         << endl;
+      return false;
+   }
+
+   int scalar = ossimScalarTypeLut::instance()->getEntryNumber(kwl, prefix);
+
+   if (scalar != ossimLookUpTable::NOT_FOUND)
+   {
+      theOutputScalarType = static_cast<ossimScalarType>(scalar);
+   }
+
+   return true;
+}
+
+template<class inType>
+void ossimCastTileSourceFilter::castInputToOutput(inType **inBuffer,
+                                                  const double  *nullPix,
+                                                  bool   inPartialFlag)
+{
+   switch(theTile->getScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         ossim_uint8** bands = new ossim_uint8*[theTile->getNumberOfBands()];
+
+         for(ossim_uint32 band = 0; band < theTile->getNumberOfBands(); ++band)
+         {
+            bands[band] = static_cast<ossim_uint8*>(theTile->getBuf(band));
+         }
+      
+         castInputToOutput(inBuffer,
+                           nullPix,
+                           inPartialFlag,
+                           bands,
+                           theTile->getNullPix(),
+                           theTile->getNumberOfBands());
+         delete [] bands;
+         break;
+      }
+      case OSSIM_SINT8:
+      {
+         ossim_sint8** bands = new ossim_sint8*[theTile->getNumberOfBands()];
+
+         for(ossim_uint32 band = 0; band < theTile->getNumberOfBands(); ++band)
+         {
+            bands[band] = static_cast<ossim_sint8*>(theTile->getBuf(band));
+         }
+      
+         castInputToOutput(inBuffer,
+                           nullPix,
+                           inPartialFlag,
+                           bands,
+                           theTile->getNullPix(),
+                           theTile->getNumberOfBands());
+         delete [] bands;
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         ossim_sint16** bands = new ossim_sint16*[theTile->getNumberOfBands()];
+
+         for(ossim_uint32 band = 0; band < theTile->getNumberOfBands(); ++band)
+         {
+            bands[band] = static_cast<ossim_sint16*>(theTile->getBuf(band));
+         }
+      
+         castInputToOutput(inBuffer,
+                           nullPix,
+                           inPartialFlag,
+                           bands,
+                           theTile->getNullPix(),
+                           theTile->getNumberOfBands());
+         delete [] bands;
+         break;
+      }
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+      {
+         ossim_uint16** bands = new ossim_uint16*[theTile->getNumberOfBands()];
+
+         for(ossim_uint32 band = 0; band < theTile->getNumberOfBands(); ++band)
+         {
+            bands[band] = static_cast<ossim_uint16*>(theTile->getBuf(band));
+         }
+      
+         castInputToOutput(inBuffer,
+                           nullPix,
+                           inPartialFlag,
+                           bands,
+                           theTile->getNullPix(),
+                           theTile->getNumberOfBands());
+         delete [] bands;
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         ossim_uint32** bands = new ossim_uint32*[theTile->getNumberOfBands()];
+
+         for(ossim_uint32 band = 0; band < theTile->getNumberOfBands(); ++band)
+         {
+            bands[band] = static_cast<ossim_uint32*>(theTile->getBuf(band));
+         }
+      
+         castInputToOutput(inBuffer,
+                           nullPix,
+                           inPartialFlag,
+                           bands,
+                           theTile->getNullPix(),
+                           theTile->getNumberOfBands());
+         delete [] bands;
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         ossim_sint32** bands = new ossim_sint32*[theTile->getNumberOfBands()];
+
+         for(ossim_uint32 band = 0; band < theTile->getNumberOfBands(); ++band)
+         {
+            bands[band] = static_cast<ossim_sint32*>(theTile->getBuf(band));
+         }
+      
+         castInputToOutput(inBuffer,
+                           nullPix,
+                           inPartialFlag,
+                           bands,
+                           theTile->getNullPix(),
+                           theTile->getNumberOfBands());
+         delete [] bands;
+         break;
+      }
+      
+      case OSSIM_FLOAT32: 
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         float** bands = new float*[theTile->getNumberOfBands()];
+
+         for(ossim_uint32 band = 0; band < theTile->getNumberOfBands(); ++band)
+         {
+            bands[band] = static_cast<float*>(theTile->getBuf(band));
+         }
+      
+         castInputToOutput(inBuffer,
+                           nullPix,
+                           inPartialFlag,
+                           bands,
+                           theTile->getNullPix(),
+                           theTile->getNumberOfBands());
+         delete [] bands;
+         break;
+      }
+      case OSSIM_FLOAT64:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         double** bands = new double*[theTile->getNumberOfBands()];
+
+         for(ossim_uint32 band = 0; band < theTile->getNumberOfBands(); ++band)
+         {
+            bands[band] = static_cast<double*>(theTile->getBuf(band));
+         }
+      
+         castInputToOutput(inBuffer,
+                           nullPix,
+                           inPartialFlag,
+                           bands,
+                           theTile->getNullPix(),
+                           theTile->getNumberOfBands());
+         delete [] bands;
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimCastTileSourceFilter::castInputToOutput WARN:\n"
+            << "Scalar not set in ossimCastTileSourceFilter" << endl;
+         break;
+      }
+   }
+}
+
+template<class inType, class outType>
+void ossimCastTileSourceFilter::castInputToOutput(inType *inBuffer[],
+                                                  const double  *nullInPix,
+                                                  bool   inPartialFlag,
+                                                  outType *outBuffer[],
+                                                  const double  *nullOutPix,
+                                                  ossim_uint32   numberOfBands)
+{
+   ossim_uint32 size = theTile->getWidth()*theTile->getHeight();
+   if(!inPartialFlag)
+   {
+      for(ossim_uint32 band = 0; band < numberOfBands; ++band)
+      {
+         outType outMin = static_cast<outType>(theTile->getMinPix(band));
+         outType outMax = static_cast<outType>(theTile->getMaxPix(band));
+         
+         for(ossim_uint32 offset = 0; offset < size; ++offset)
+         {
+            double temp = inBuffer[band][offset];
+            if(temp < outMin) temp = outMin;
+            if(temp > outMax) temp = outMax;
+            outBuffer[band][offset] = static_cast<outType>(temp);
+         }
+      }
+   }
+   else
+   {
+      for(ossim_uint32 band = 0; band < numberOfBands; ++band)
+      {
+         inType np      = static_cast<inType>(nullInPix[band]);
+	     outType outNp  = static_cast<outType>(nullOutPix[band]);
+         outType outMin = static_cast<outType>(theTile->getMinPix(band));
+         outType outMax = static_cast<outType>(theTile->getMaxPix(band));
+         
+         for(ossim_uint32 offset = 0; offset < size; ++offset)
+         {
+            if(inBuffer[band][offset] != np)
+            {
+               double temp = inBuffer[band][offset];
+               if(temp < outMin) temp = outMin;
+               if(temp > outMax) temp = outMax;
+               outBuffer[band][offset] = static_cast<outType>(temp);
+            }
+	    else
+	    {
+		outBuffer[band][offset] = static_cast<outType>(outNp);
+		
+	    }
+         }
+      }
+   }
+}
+
+void ossimCastTileSourceFilter::allocate(const ossimRefPtr<ossimImageData> inputTile)
+{
+   theTile = ossimImageDataFactory::instance()->create(
+      this,
+      getOutputScalarType(),
+      inputTile->getNumberOfBands(),
+      inputTile->getWidth(),
+      inputTile->getHeight());
+   theTile->initialize();
+   theTile->setOrigin(inputTile->getOrigin());
+}
+
+void ossimCastTileSourceFilter::propertyEvent(ossimPropertyEvent& /* event */)
+{
+}
+
+void ossimCastTileSourceFilter::refreshEvent(ossimRefreshEvent& /* event */)
+{
+}
+
+void ossimCastTileSourceFilter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(property->getName() == ossimKeywordNames::SCALAR_TYPE_KW)
+   {
+      int scalar = ossimScalarTypeLut::instance()->getEntryNumber(property->valueToString());
+      
+      if (scalar != ossimLookUpTable::NOT_FOUND)
+      {
+         setOutputScalarType(static_cast<ossimScalarType>(scalar));
+      }
+   }
+   else
+   {
+      ossimImageSourceFilter::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimCastTileSourceFilter::getProperty(const ossimString& name)const
+{
+   ossimRefPtr<ossimProperty> resultProperty;
+   if(name == ossimKeywordNames::SCALAR_TYPE_KW)
+   {
+      ossimStringProperty* stringProperty = new ossimStringProperty(name,
+                                                                    ossimScalarTypeLut::instance()->getEntryString(theOutputScalarType),
+                                                                    false);
+
+      stringProperty->addConstraint(ossimScalarTypeLut::instance()->getEntryString(OSSIM_UINT8));
+      stringProperty->addConstraint(ossimScalarTypeLut::instance()->getEntryString(OSSIM_SINT8));
+      stringProperty->addConstraint(ossimScalarTypeLut::instance()->getEntryString(OSSIM_UINT16));
+      stringProperty->addConstraint(ossimScalarTypeLut::instance()->getEntryString(OSSIM_SINT16));
+      stringProperty->addConstraint(ossimScalarTypeLut::instance()->getEntryString(OSSIM_UINT32));
+      stringProperty->addConstraint(ossimScalarTypeLut::instance()->getEntryString(OSSIM_SINT32));
+      stringProperty->addConstraint(ossimScalarTypeLut::instance()->getEntryString(OSSIM_FLOAT32));
+      stringProperty->addConstraint(ossimScalarTypeLut::instance()->getEntryString(OSSIM_FLOAT64));
+
+      stringProperty->setCacheRefreshBit();
+      resultProperty = stringProperty;
+   }
+   else
+   {
+      resultProperty = ossimImageSourceFilter::getProperty(name);
+   }
+   return resultProperty;
+}
+
+void ossimCastTileSourceFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageSourceFilter::getPropertyNames(propertyNames);
+   
+   propertyNames.push_back(ossimKeywordNames::SCALAR_TYPE_KW);
+}
+   
+
diff --git a/src/ossim/imaging/ossimCcfHead.cpp b/ossim/src/ossim/imaging/ossimCcfHead.cpp
similarity index 100%
rename from src/ossim/imaging/ossimCcfHead.cpp
rename to ossim/src/ossim/imaging/ossimCcfHead.cpp
diff --git a/ossim/src/ossim/imaging/ossimCcfTileSource.cpp b/ossim/src/ossim/imaging/ossimCcfTileSource.cpp
new file mode 100644
index 0000000..19b929c
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimCcfTileSource.cpp
@@ -0,0 +1,902 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Contains class definition for ossimCcfTileSource.
+//*******************************************************************
+//  $Id: ossimCcfTileSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <algorithm>
+#include <ossim/imaging/ossimCcfTileSource.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimContainerProperty.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimDirectory.h>
+#include <ossim/base/ossimInterleaveTypeLut.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+
+using namespace std;
+
+RTTI_DEF1(ossimCcfTileSource, "ossimCcfTileSource", ossimImageHandler);
+
+//***
+// Define Trace flags for use within this file:
+//***
+
+static ossimTrace traceExec  ("ossimCcfTileSource:exec");
+static ossimTrace traceDebug ("ossimCcfTileSource:debug");
+
+// For interleave type enum to string conversions.
+static const ossimInterleaveTypeLut ILUT;
+
+ossimCcfTileSource::ossimCcfTileSource()
+   :
+      ossimImageHandler(),
+      theCcfHead(),
+      theTile(NULL),
+      theChipBuffer(NULL),
+      theFileStr(NULL),
+      theOutputBandList(1),
+      theByteOrder(ossim::byteOrder())
+{}
+
+ossimCcfTileSource::~ossimCcfTileSource()
+{
+  close();
+}
+
+ossimRefPtr<ossimImageData> ossimCcfTileSource::getTile(
+   const  ossimIrect& rect, ossim_uint32 resLevel)
+{
+   if (theTile.valid())
+   {
+      // Image rectangle must be set prior to calling getTile.
+      theTile->setImageRectangle(rect);
+      
+      if ( getTile( theTile.get(), resLevel ) == false )
+      {
+         if (theTile->getDataObjectStatus() != OSSIM_NULL)
+         {
+            theTile->makeBlank();
+         }
+      }
+   }
+
+   return theTile;
+}
+
+bool ossimCcfTileSource::getTile(ossimImageData* result,
+                                 ossim_uint32 resLevel)
+{
+   bool status = false;
+
+   //---
+   // Not open, this tile source bypassed, or invalid res level,
+   // return a blank tile.
+   //---
+   if( isOpen() && isSourceEnabled() && isValidRLevel(resLevel) &&
+       result && (result->getNumberOfBands() == getNumberOfOutputBands()) )
+   {
+      result->ref();  // Increment ref count.
+
+      //---
+      // Check for overview tile.  Some overviews can contain r0 so always
+      // call even if resLevel is 0.  Method returns true on success, false
+      // on error.
+      //---
+      status = getOverviewTile(resLevel, result);
+      
+      if (!status) // Did not get an overview tile.
+      {
+         status = true;
+         
+         ossimIrect tile_rect = result->getImageRectangle();
+         
+         ossimIrect image_rect = theCcfHead.imageRect(resLevel);
+   
+         //---
+         // See if any point of the requested tile is in the image.
+         //---
+         if ( tile_rect.intersects(image_rect) )
+         {
+            ossimIrect clip_rect = tile_rect.clipToRect(image_rect);
+            
+            if ( !tile_rect.completely_within(clip_rect) )
+            {
+               // Start with a blank tile.
+               result->makeBlank();
+            }
+            
+            // Load the tile buffer with data from the ccf.
+            status = fillBuffer(tile_rect,
+                                clip_rect,
+                                image_rect,
+                                resLevel,
+                                result);
+            if (status)
+            {
+               result->validate();
+            }
+         }
+      }
+      
+      result->unref();  // Decrement ref count.
+   }
+
+   return status;
+}
+
+//*******************************************************************
+// Private Method:
+//*******************************************************************
+bool ossimCcfTileSource::fillBuffer(const ossimIrect& tile_rect,
+                                    const ossimIrect& clip_rect,
+                                    const ossimIrect& image_rect,
+                                    ossim_uint32 reduced_res_level,
+                                    ossimImageData* tile)
+{
+   bool status = false;
+   
+   //***
+   // Determine the pixel type and make the appropriate tiles.
+   //***
+   switch (theCcfHead.pixelType())
+   {
+      case OSSIM_UCHAR:
+         status = fillUcharBuffer(tile_rect,
+                                  clip_rect,
+                                  image_rect,
+                                  reduced_res_level,
+                                  tile);
+         break;
+      case OSSIM_USHORT11:
+      case OSSIM_USHORT16:
+         status = fillUshortBuffer(tile_rect,
+                                   clip_rect,
+                                   image_rect,
+                                   reduced_res_level,
+                                   tile);
+         break;
+      default:
+         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimCcfTileSource fillBuffer ERROR:"
+            << "\nUnsupported pixel type!"
+            << "\nBuffer not filled.  Returning error." << endl;
+         break;
+   }
+
+   return status;
+}
+
+//*******************************************************************
+// Private Method:
+//*******************************************************************
+bool ossimCcfTileSource::fillUcharBuffer(const ossimIrect& tile_rect,
+                                         const ossimIrect& clip_rect,
+                                         const ossimIrect& /* image_rect */,
+                                         ossim_uint32 reduced_res_level,
+                                         ossimImageData* tile)
+{
+   if(!isOpen()) return false;
+      
+   const ossim_uint32 TILE_SIZE_PER_BAND     = tile->getSizePerBand();
+   const ossim_uint32 CHIP_SIZE_PER_BAND     = theCcfHead.chipSizePerBand();
+   const ossim_uint32 SAMPLES_PER_CHIP       = theCcfHead.samplesPerChip();
+   const ossim_uint32 LINES_PER_CHIP         = theCcfHead.linesPerChip();
+   const ossim_uint32 BYTES_PER_CHUNK        = theCcfHead.bytesPerChunk();
+   const ossim_uint32 BYTES_PER_CHIP         = theCcfHead.bytesPerChip();
+   const ossim_uint32 CHIPS_IN_SAMPLE_DIR    = theCcfHead.sampleChipsPerChunk();
+   const ossim_uint32 CHIPS_IN_LINE_DIR      = theCcfHead.lineChipsPerChunk();
+   const ossim_uint32 NUMBER_OF_INPUT_BANDS  = theCcfHead.numberOfBands();
+   const ossim_uint32 CHUNKS_IN_SAMPLE_DIR   = theCcfHead.chunksInSampleDir(reduced_res_level);
+   const ossim_uint32 CHUNK_SIDE_SIZE        = SAMPLES_PER_CHIP *
+                                        CHIPS_IN_SAMPLE_DIR;
+   const ossim_uint32 CHIP_OFFSET_TO_END     = SAMPLES_PER_CHIP - 1;
+
+   //***
+   // Shift the upper left corner of the "clip_rect" to the an even chunk
+   // boundry.
+   //***
+   ossimIpt chunkOrigin = clip_rect.ul();
+   adjustToStartOfChunk(chunkOrigin);
+
+   //***
+   // Calculate the number of chunks needed in the line/sample directions.
+   //***
+   ossim_uint32 size_in_x
+      = static_cast<ossim_uint32>(clip_rect.lr().x - chunkOrigin.x + 1);
+   ossim_uint32 size_in_y
+      = static_cast<ossim_uint32>(clip_rect.lr().y - chunkOrigin.y + 1);
+   ossim_uint32 w = (CHIPS_IN_SAMPLE_DIR*SAMPLES_PER_CHIP);
+   ossim_uint32 h = (CHIPS_IN_LINE_DIR*LINES_PER_CHIP);
+   ossim_uint32 chunks_in_x_dir = size_in_x / w  + (size_in_x % w  ? 1 : 0);
+   ossim_uint32 chunks_in_y_dir = size_in_y / h + (size_in_y % h ? 1 : 0);
+   
+   
+   //***
+   // Get the start of data for the "reduced_res_level" passed in.
+   //***
+   streampos startOfData = theCcfHead.startOfData(reduced_res_level);
+   ossimIpt ulChunkPt = chunkOrigin;
+
+   // Chunk loop in line direction.
+   for (ossim_uint32 y=0; y<chunks_in_y_dir; ++y)
+   {
+      ulChunkPt.x = chunkOrigin.x;
+
+      // Chunk loop in sample direction.
+      for (ossim_uint32 x=0; x<chunks_in_x_dir; ++x)
+      {
+         //***
+         // Sequence through the chips in the chunk.
+         // Grab the ccf data and stuff the tile buffer.
+         //***
+         ossimIpt chip_pt = ulChunkPt;
+
+         // Chip loop in line direction.
+         for (ossim_uint32 y_chip=0; y_chip<CHIPS_IN_LINE_DIR; ++y_chip) 
+         {
+            chip_pt.x = ulChunkPt.x;  // Reset x back to front of chunk.
+
+            // Chip loop in sample direction.
+            for (ossim_uint32 x_chip=0; x_chip<CHIPS_IN_SAMPLE_DIR; ++x_chip)
+            {
+               ossimIrect chip_rect(chip_pt.x,
+                               chip_pt.y,
+                               chip_pt.x + CHIP_OFFSET_TO_END,
+                               chip_pt.y + CHIP_OFFSET_TO_END);
+               
+               if (chip_rect.intersects(clip_rect))
+               {
+                  //***
+                  // Some point in the chip intersect the tile so grab the
+                  // data.
+                  //***
+
+                  //***
+                  // Get the seek position for the chunk.
+                  //***
+                  streampos tmp_offset
+                     = ( ulChunkPt.y / CHUNK_SIDE_SIZE * BYTES_PER_CHUNK *
+                         CHUNKS_IN_SAMPLE_DIR ) +
+                     ( ulChunkPt.x / CHUNK_SIDE_SIZE * BYTES_PER_CHUNK );
+
+                  streampos seek_position = startOfData + tmp_offset;
+
+                  // Now move it to the chip.
+                  tmp_offset
+                     = ( y_chip *  BYTES_PER_CHIP * CHIPS_IN_SAMPLE_DIR ) +
+                     (x_chip * BYTES_PER_CHIP);
+
+                  seek_position += tmp_offset;
+
+                  // Seek to the chip
+                  theFileStr->seekg(seek_position, ios::beg);
+
+                  //***
+                  // Read the chip from the ccf file into the chip buffer.
+                  // This will get all the bands.  Bands are interleaved by
+                  // chip.
+                  //***
+                  if (!theFileStr->read((char*)theChipBuffer, BYTES_PER_CHIP))
+                  {
+                     theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+                     cerr << "ossimCcfTileSource fillUchBuffer READ ERROR!"
+                          << "\nReturning from method." << endl;
+                     return false;
+                  }
+                  
+                  ossimIrect chip_clip_rect = clip_rect.clipToRect(chip_rect);
+
+                  //***
+                  // Band loop in sample direction.  Bands are interleaved by
+                  // chip.
+                  //***
+                  for (ossim_uint32 band=0; band<NUMBER_OF_INPUT_BANDS; ++band)
+                  {
+                     //***
+                     // Get a pointer positioned at the first valid pixel in
+                     // the chip.
+                     //***
+                     ossim_uint8* s
+                        = theChipBuffer +
+                        band * CHIP_SIZE_PER_BAND + 
+                        (chip_clip_rect.ul().y - chip_rect.ul().y) *
+                        SAMPLES_PER_CHIP + chip_clip_rect.ul().x -
+                        chip_rect.ul().x;
+                                
+                     //***
+                     // Get a pointer positioned at the first valid pixel in
+                     // the tile.
+                     //***
+                     ossim_uint8* d
+                        = (ossim_uint8*)tile->getBuf() +
+                        band * TILE_SIZE_PER_BAND +
+                        (chip_clip_rect.ul().y - tile_rect.ul().y) *
+                        tile->getWidth() + chip_clip_rect.ul().x -
+                        tile_rect.ul().x;      
+
+                     // Line loop through a chip.
+                     for (ossim_int32 chip_line = chip_clip_rect.ul().y;
+                          chip_line <= chip_clip_rect.lr().y;
+                          chip_line++)
+                     {
+                        // Sample loop through a chip.
+                        ossim_uint32 i=0;
+                        for (ossim_int32 chip_sample = chip_clip_rect.ul().x;
+                             chip_sample <= chip_clip_rect.lr().x;
+                             chip_sample++)
+                        {
+                           d[i] = s[i];
+                           i++;
+                        }
+
+                        // Increment the pointers by one line.
+                        s += SAMPLES_PER_CHIP;
+                        d += tile->getWidth();
+                     }
+                     
+                  } // End of band loop.
+                  
+               } // End of if (chip_rect.intersects(clip_rect))
+               
+               chip_pt.x += SAMPLES_PER_CHIP;
+               
+            } // End of chip loop in the sample direction.
+
+           chip_pt.y += LINES_PER_CHIP; 
+            
+         } // End of chip loop in the line direction.
+         
+         ulChunkPt.x += CHUNK_SIDE_SIZE;
+         
+      }  // End of chunk loop in the sample direction.
+
+      ulChunkPt.y += CHUNK_SIDE_SIZE;
+      
+   }  // End of chunk loop in the line direction.
+
+   return true;
+}
+
+//*******************************************************************
+// Private Method:
+//*******************************************************************
+bool ossimCcfTileSource::fillUshortBuffer(const ossimIrect& tile_rect,
+                                          const ossimIrect& clip_rect,
+                                          const ossimIrect& /* image_rect */,
+                                          ossim_uint32 reduced_res_level,
+                                          ossimImageData* tile)
+{
+   const ossim_uint32 TILE_SIZE_PER_BAND     = tile->getSizePerBand();
+   const ossim_uint32 CHIP_SIZE_PER_BAND     = theCcfHead.chipSizePerBand();
+   const ossim_uint32 SAMPLES_PER_CHIP       = theCcfHead.samplesPerChip();
+   const ossim_uint32 LINES_PER_CHIP         = theCcfHead.linesPerChip();
+   const ossim_uint32 BYTES_PER_CHUNK        = theCcfHead.bytesPerChunk();
+   const ossim_uint32 BYTES_PER_CHIP         = theCcfHead.bytesPerChip();
+   const ossim_uint32 CHIPS_IN_SAMPLE_DIR    = theCcfHead.sampleChipsPerChunk();
+   const ossim_uint32 CHIPS_IN_LINE_DIR      = theCcfHead.lineChipsPerChunk();
+   const ossim_uint32 NUMBER_OF_INPUT_BANDS  = theCcfHead.numberOfBands();
+   const ossim_uint32 CHUNKS_IN_SAMPLE_DIR   = theCcfHead.
+                                        chunksInSampleDir(reduced_res_level);
+   const ossim_uint32 CHUNK_SIDE_SIZE        = SAMPLES_PER_CHIP *
+                                        CHIPS_IN_SAMPLE_DIR;
+   const ossim_uint32 CHIP_OFFSET_TO_END     = SAMPLES_PER_CHIP - 1;
+   
+   //***
+   // Shift the upper left corner of the "clip_rect" to the an even chunk
+   // boundry.
+   //***
+   ossimIpt chunkOrigin = clip_rect.ul();
+   adjustToStartOfChunk(chunkOrigin);
+
+   //***
+   // Calculate the number of chunks needed in the line/sample directions.
+   //***
+   
+   ossim_uint32 size_in_x = clip_rect.lr().x - chunkOrigin.x + 1;
+   ossim_uint32 size_in_y = clip_rect.lr().y - chunkOrigin.y + 1;
+   ossim_uint32 w = (CHIPS_IN_SAMPLE_DIR*SAMPLES_PER_CHIP);
+   ossim_uint32 h = (CHIPS_IN_LINE_DIR*LINES_PER_CHIP);
+   ossim_uint32 chunks_in_x_dir = size_in_x / w  + (size_in_x % w  ? 1 : 0);
+   ossim_uint32 chunks_in_y_dir = size_in_y / h + (size_in_y % h ? 1 : 0);
+   //***
+   // Get the start of data for the "reduced_res_level" passed in.
+   //***
+   streampos startOfData = theCcfHead.startOfData(reduced_res_level);
+   ossimIpt ulChunkPt = chunkOrigin;
+
+   // Chunk loop in line direction.
+   for (ossim_uint32 y=0; y<chunks_in_y_dir; ++y)
+   {
+      ulChunkPt.x = chunkOrigin.x;
+
+      // Chunk loop in sample direction.
+      for (ossim_uint32 x=0; x<chunks_in_x_dir; ++x)
+      {
+         //***
+         // Sequence through the chips in the chunk.
+         // Grab the ccf data and stuff the tile buffer.
+         //***
+         ossimIpt chip_pt = ulChunkPt;
+
+         // Chip loop in line direction.
+         for (ossim_uint32 y_chip=0; y_chip<CHIPS_IN_LINE_DIR; ++y_chip) 
+         {
+            chip_pt.x = ulChunkPt.x;  // Reset x back to front of chunk.
+
+            // Chip loop in sample direction.
+            for (ossim_uint32 x_chip=0; x_chip<CHIPS_IN_SAMPLE_DIR; ++x_chip)
+            {
+               ossimIrect chip_rect(chip_pt.x,
+                               chip_pt.y,
+                               chip_pt.x + CHIP_OFFSET_TO_END,
+                               chip_pt.y + CHIP_OFFSET_TO_END);
+               
+               if (chip_rect.intersects(clip_rect))
+               {
+                  //***
+                  // Some point in the chip intersect the tile so grab the
+                  // data.
+                  //***
+
+                  //***
+                  // Get the seek position for the chunk.
+                  //***
+                  streampos tmp_offset
+                     = ( ulChunkPt.y / CHUNK_SIDE_SIZE * BYTES_PER_CHUNK *
+                         CHUNKS_IN_SAMPLE_DIR ) +
+                     ( ulChunkPt.x / CHUNK_SIDE_SIZE * BYTES_PER_CHUNK );
+
+                  streampos seek_position = startOfData + tmp_offset;
+
+                  // Now move it to the chip.
+                  tmp_offset
+                     = ( y_chip *  BYTES_PER_CHIP * CHIPS_IN_SAMPLE_DIR ) +
+                     (x_chip * BYTES_PER_CHIP);
+
+                  seek_position += tmp_offset;
+
+                  // Seek to the chip
+                  theFileStr->seekg(seek_position, ios::beg);
+
+                  //***
+                  // Read the chip from the ccf file into the chip buffer.
+                  // This will get all the bands.  Bands are interleaved by
+                  // chip.
+                  //***
+                  if (!theFileStr->read((char*)theChipBuffer, BYTES_PER_CHIP))
+                  {
+                     theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+                     cerr << "ossimCcfTileSource fillUshortBuffer READ ERROR!"
+                          << "Returning from method." << endl;
+                     return false;
+                  }
+                  
+                  ossimIrect chip_clip_rect = clip_rect.clipToRect(chip_rect);
+
+                  //***
+                  // Band loop in sample direction.  Bands are interleaved by
+                  // chip.
+                  //***
+                  for (ossim_uint32 band=0; band<NUMBER_OF_INPUT_BANDS; band++)
+                  {
+                     //***
+                     // Get a pointer positioned at the first valid pixel in
+                     // the chip.
+                     //***
+                     ossim_uint16* s
+                        = (ossim_uint16*)theChipBuffer +
+                        band * CHIP_SIZE_PER_BAND + 
+                        (chip_clip_rect.ul().y - chip_rect.ul().y) *
+                        SAMPLES_PER_CHIP + chip_clip_rect.ul().x -
+                        chip_rect.ul().x;       
+                     
+                     //***
+                     // Get a pointer positioned at the first valid pixel in
+                     // the tile.
+                     //***
+                     ossim_uint16* d
+                        = (ossim_uint16*)tile->getBuf() +
+                        band * TILE_SIZE_PER_BAND +
+                        (chip_clip_rect.ul().y - tile_rect.ul().y) *
+                        tile->getWidth() + chip_clip_rect.ul().x -
+                        tile_rect.ul().x;
+                     
+                     // Line loop through a chip.
+                     for (ossim_int32 chip_line = chip_clip_rect.ul().y;
+                          chip_line <= chip_clip_rect.lr().y;
+                          ++chip_line)
+                     {
+                        // Sample loop through a chip.
+                        ossim_uint32 i=0;
+                        for (ossim_int32 chip_sample = chip_clip_rect.ul().x;
+                             chip_sample <= chip_clip_rect.lr().x;
+                             ++chip_sample)
+                        {
+                           if (theByteOrder == OSSIM_LITTLE_ENDIAN)
+                           {
+                              //***
+                              // CCF data alway stored in big endian byte
+                              // order so swap the bytes.
+                              //***
+                              d[i] = (s[i] << 8) | (s[i] >> 8);
+                           }
+                           else
+                           {
+                              d[i] = s[i];
+                           }
+                           
+                           ++i;
+                        }
+
+                        // Increment the pointers by one line.
+                        s += SAMPLES_PER_CHIP;
+                        d += tile->getWidth();
+                     }
+                     
+                  } // End of band loop.
+                  
+               } // End of if (chip_rect.intersects(clip_rect))
+               
+               chip_pt.x += SAMPLES_PER_CHIP;
+               
+            } // End of chip loop in the sample direction.
+
+           chip_pt.y += LINES_PER_CHIP; 
+            
+         } // End of chip loop in the line direction.
+         
+         ulChunkPt.x += CHUNK_SIDE_SIZE;
+         
+      }  // End of chunk loop in the sample direction.
+
+      ulChunkPt.y += CHUNK_SIDE_SIZE;
+      
+   }  // End of chunk loop in the line direction.
+
+   return true;
+}
+   
+            
+//*******************************************************************
+// Public Method:
+//*******************************************************************
+ossimIrect
+ossimCcfTileSource::getImageRectangle(ossim_uint32 reduced_res_level) const
+{
+   return theCcfHead.imageRect(reduced_res_level);
+}
+
+//*******************************************************************
+// Public Method:
+//*******************************************************************
+bool ossimCcfTileSource::setOutputBandList(const vector<ossim_uint32>& outputBandList)
+{
+   static const char MODULE[] = "ossimCcfTileSource::setOutputBandList";
+   if (traceExec())  CLOG << "entering..." << endl;
+   
+   if (outputBandList.size() != theOutputBandList.size())
+   {
+      //***
+      // Verify that each individual band does not bust the range of input
+      // bands.
+      //***
+      for (ossim_uint32 i=0; i<outputBandList.size(); i++)
+      {
+         if (outputBandList[i] > (getNumberOfInputBands() - 1))
+         {
+            setErrorStatus();
+
+            cerr << MODULE << " ERROR:"
+                 << "\nOutput band number in list is greater than the "
+                 << "number of bands in the image source!"
+                 << "\noutputBandList[" << i << "]:  "
+                 << "\nHighest availabe band:  "
+                 << (getNumberOfInputBands() - 1)
+                 << "\nError status has been set!  Returning..."
+                 << endl;
+            return false;            
+         }
+      }
+
+      // Remove the old tiles and reallocate with the new size.
+      theTile = NULL;
+   }
+
+   theOutputBandList = outputBandList;  // Assign the new list.
+
+   if (traceExec())  CLOG << "returning..." << endl;
+   return true;
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+bool ossimCcfTileSource::saveState(ossimKeywordlist& kwl,
+                                   const char* prefix) const
+{
+   // Currently nothing to do here.
+   return ossimImageHandler::saveState(kwl, prefix);
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+bool ossimCcfTileSource::loadState(const ossimKeywordlist& kwl,
+                                   const char* prefix)
+{
+   if (ossimImageHandler::loadState(kwl, prefix))
+   {
+      if (open())
+      {
+         return true;
+      }
+   }
+
+   return false;
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+bool ossimCcfTileSource::open()
+{
+   static const char MODULE[] = "ossimCcfTileSource::open";
+   if (traceExec())  CLOG << "entering..." << endl;
+
+   if(isOpen())
+   {
+      close();
+   }
+   
+   if (traceDebug())
+   {
+      CLOG << "DEBUG -- "
+           << "\n\t theImageFile: " << theImageFile << endl;
+   }
+   
+   if (theCcfHead.parseCcfHeader(theImageFile.c_str()) == false)
+   {
+      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+      if (traceExec())  CLOG << "returning with error..." << endl;
+      return false;
+   }
+
+   if (traceDebug())
+   {
+      CLOG << "DEBUG -- "
+           << "\n\t theImageFile: " << theImageFile
+           << "\n\t theCcfHead: " << theCcfHead
+           << endl;
+   }
+
+   theFileStr = new std::ifstream;
+   // Open up the file for reading.
+   theFileStr->open(theImageFile.c_str(), ios::in | ios::binary);
+   
+   if (!(*theFileStr))
+   {
+      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+      
+      cerr << MODULE << " ERROR!"
+           << "\nCould not open file:  " << theImageFile.c_str()
+           << "\nReturning..." << endl;
+      if (traceExec())  CLOG << "returning with error..." << endl;
+
+      delete theFileStr;
+      theFileStr = NULL;
+      return false;
+   }
+
+   theTile = ossimImageDataFactory::instance()->create(this, this);
+   theTile->initialize();
+     
+   theChipBuffer  = new ossim_uint8[theCcfHead.bytesPerChip()];
+   
+   // Initialize the output band list.
+   if (getNumberOfInputBands() > theOutputBandList.size())
+   {
+      theOutputBandList.resize(getNumberOfInputBands());
+   }
+   
+   for (ossim_uint32 i=0; i<getNumberOfInputBands(); ++i)
+   {
+      theOutputBandList[i] = i; // One to one for initial setup.
+   }
+   
+   completeOpen();
+   
+   if (traceDebug() && theTile.valid())
+   {
+      CLOG << "DEBUG:"
+           << "\ntheTile:\n" << *theTile << endl;
+   }
+
+   if (traceExec())  CLOG << "returning..." << endl;
+   return true;
+}
+
+void ossimCcfTileSource::close()
+{
+   theTile = NULL;
+   if (theChipBuffer)
+   {
+      delete [] theChipBuffer;
+      theChipBuffer = NULL;
+   }
+   if(theFileStr)
+   {
+      theFileStr->close();
+      theFileStr->clear();
+      delete theFileStr;
+      theFileStr = NULL;
+   }
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+ossimScalarType ossimCcfTileSource::getOutputScalarType() const
+{
+   return theCcfHead.pixelType();
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+ossim_uint32 ossimCcfTileSource::getTileWidth() const
+{
+   return ( theTile.valid() ? theTile->getWidth() : 0 );
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+ossim_uint32 ossimCcfTileSource::getTileHeight() const
+{
+   return ( theTile.valid() ? theTile->getHeight() : 0 );
+}
+
+ossim_uint32 ossimCcfTileSource::getImageTileWidth() const
+{
+   return 32;
+}
+
+ossim_uint32 ossimCcfTileSource::getImageTileHeight() const
+{
+   return 32;
+}
+
+void ossimCcfTileSource::initVerticesFromHeader()
+{
+   theValidImageVertices.clear();
+   
+   const vector<ossimIpt>& validImageVertices
+      = theCcfHead.getValidImageVertices();
+   
+   ossim_uint32 upper = (ossim_uint32)validImageVertices.size();
+   if(!upper) return;
+   for(ossim_uint32 index = 0; index < upper; ++index)
+   {
+      theValidImageVertices.push_back(validImageVertices[index]);
+   }
+
+   if (traceDebug())
+   {
+      cout << "ossimCcfTileSource::initVerticesFromHeader DEBUG:"
+           << "\nValid image vertices:"
+           << endl;
+      for (ossim_uint32 i=0; i<upper; ++i)
+      {
+         cout << "\npoint[" << i << "]:  " << theValidImageVertices[i];
+      }
+      cout << endl;
+   }
+}
+
+bool ossimCcfTileSource::isEcgGeom(const ossimFilename& filename)const
+{
+   ossimFilename file = filename;
+   file.setExtension("geom");
+   
+   if(file.exists())
+   {
+      char bytes[3];
+      ifstream in(file.c_str());
+      
+      in.read((char*)bytes, 3);
+      ossimString testEcg(bytes,
+                          bytes + 3);
+      testEcg = testEcg.downcase();
+      if(in&&(testEcg == "ecg"))
+      {
+         return true;
+      }
+   }
+   return false;
+}
+
+ossimString ossimCcfTileSource::getShortName()const
+{
+   return ossimString("ccf");
+}
+
+ossimString ossimCcfTileSource::getLongName()const
+{
+   return ossimString("ccf reader");
+}
+
+ossim_uint32 ossimCcfTileSource::getNumberOfInputBands() const
+{
+   return theCcfHead.numberOfBands();
+}
+
+ossim_uint32 ossimCcfTileSource::getNumberOfOutputBands()const
+{
+   return getNumberOfInputBands();
+}
+
+ossim_uint32 ossimCcfTileSource::getNumberOfLines(ossim_uint32 reduced_res_level) const
+{
+   return theCcfHead.numberOfLines(reduced_res_level);
+}
+
+ossim_uint32 ossimCcfTileSource::getNumberOfSamples(ossim_uint32 reduced_res_level) const
+{
+   return theCcfHead.numberOfSamples(reduced_res_level);
+}
+
+ossim_uint32 ossimCcfTileSource::getNumberOfDecimationLevels() const
+{
+   return theCcfHead.numberOfReducedResSets();
+}
+
+bool ossimCcfTileSource::isOpen()const
+{
+   return (theFileStr != NULL);
+}
+
+ossimRefPtr<ossimProperty> ossimCcfTileSource::getProperty(const ossimString& name)const
+{
+	if(name == "file_type")
+	{
+		
+		return new ossimStringProperty(name, "CCF");
+	}
+	return ossimImageHandler::getProperty(name);
+}
+
+void ossimCcfTileSource::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+	ossimImageHandler::getPropertyNames(propertyNames);
+	propertyNames.push_back("file_type");
+}
+
+void ossimCcfTileSource::adjustToStartOfChunk(ossimIpt& pt) const
+{
+   pt.x &= 0xffffff00;
+   pt.y &= 0xffffff00;
+}
+
+void ossimCcfTileSource::adjustToStartOfChip(ossimIpt& pt) const
+{
+   pt.x &= 0xffffffe0;
+   pt.y &= 0xffffffe0;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimCibCadrgTileSource.cpp b/ossim/src/ossim/imaging/ossimCibCadrgTileSource.cpp
new file mode 100644
index 0000000..8d287f2
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimCibCadrgTileSource.cpp
@@ -0,0 +1,1334 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//********************************************************************
+// $Id: ossimCibCadrgTileSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <algorithm>
+
+#include <ossim/imaging/ossimCibCadrgTileSource.h>
+
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimNBandLutDataObject.h>
+#include <ossim/imaging/ossimHistogramWriter.h>
+#include <ossim/imaging/ossimImageHistogramSource.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimContainerProperty.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimEllipsoid.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/support_data/ossimRpfFrame.h>
+#include <ossim/support_data/ossimRpfHeader.h>
+#include <ossim/support_data/ossimRpfToc.h>
+#include <ossim/support_data/ossimRpfTocEntry.h>
+#include <ossim/support_data/ossimRpfCompressionSection.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/projection/ossimCylEquAreaProjection.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimTrace.h>
+
+static ossimTrace traceDebug = ossimTrace("ossimCibCadrgTileSource:debug");
+
+#ifdef OSSIM_ID_ENABLED
+static const char OSSIM_ID[] = "$Id: ossimCibCadrgTileSource.cpp 23664 2015-12-14 14:17:27Z dburken $";
+#endif
+
+RTTI_DEF1(ossimCibCadrgTileSource, "ossimCibCadrgTileSource", ossimImageHandler)
+
+const ossim_uint32 ossimCibCadrgTileSource::CIBCADRG_FRAME_WIDTH  = 1536;
+const ossim_uint32 ossimCibCadrgTileSource::CIBCADRG_FRAME_HEIGHT = 1536;
+
+ossimCibCadrgTileSource::ossimCibCadrgTileSource()
+   :ossimImageHandler(),
+    theCompressedBuffer(0),
+    theUncompressedBuffer(0),
+    theNumberOfLines(0),
+    theNumberOfSamples(0),
+    theTile(0),
+    theTableOfContents(0),
+    theEntryToRender(0),
+    theEntryNumberToRender(1),
+    theTileSize(128, 128),
+    theProductType(OSSIM_PRODUCT_TYPE_UNKNOWN),
+    theSkipEmptyCheck(false)
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimCibCadrgTileSource::ossimCibCadrgTileSource entered...\n";
+#ifdef OSSIM_ID_ENABLED
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "OSSIM_ID:  " << OSSIM_ID << "\n";
+#endif      
+   }
+   theWorkFrame = new ossimRpfFrame;
+   
+   // a CADRG and CIBis a 64*64*12 bit buffer and must divide by 8 to
+   // convert to bytes
+   theCompressedBuffer   = new ossim_uint8[(64*64*12)/8];
+
+   // whether CIB or CADRG we will alocate the buffer
+   // to the larger of the 2 (CADRG is 3 bands)
+   theUncompressedBuffer = new ossim_uint8[256*256*3];
+                           
+}
+
+ossimCibCadrgTileSource::~ossimCibCadrgTileSource()
+{
+   if(theCompressedBuffer)
+   {
+      delete [] theCompressedBuffer;
+      theCompressedBuffer = 0;
+   }
+   if(theUncompressedBuffer)
+   {
+      delete [] theUncompressedBuffer;
+      theUncompressedBuffer = 0;
+   }
+   if(theWorkFrame)
+   {
+      delete theWorkFrame;
+      theWorkFrame = 0;
+   }
+   close();
+}
+
+ossimString ossimCibCadrgTileSource::getShortName()const
+{
+   return ossimString("CIB/CADRG");
+}
+
+ossimString ossimCibCadrgTileSource::getLongName()const
+{
+   return ossimString("CIB/CADRG reader");
+}
+
+
+void ossimCibCadrgTileSource::close()
+{
+   deleteAll();
+   ossimImageHandler::close();
+}
+
+bool ossimCibCadrgTileSource::isOpen()const
+{
+   return (theTableOfContents!=0);
+}
+
+bool ossimCibCadrgTileSource::open()
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimCibCadrgTileSource::open(): Entered....."
+         << "\ntheImageFile: " << theImageFile << std::endl;
+   }
+
+   bool result = false;
+   
+   if(isOpen())
+   {
+      close();
+   }
+
+   theTableOfContents = new ossimRpfToc;
+   
+   if(theTableOfContents)
+   {      
+      if(theTableOfContents->parseFile(theImageFile) == ossimErrorCodes::OSSIM_OK)
+      {
+         if(theTableOfContents->getNumberOfEntries() > 0)
+         {
+            vector<ossimString> scaleList = getProductScaleList();
+            if(scaleList.size() > 0)
+            {
+               std::vector<ossim_uint32> entryList;
+               getEntryList(entryList);
+               if(entryList.size() > 0)
+               {
+                  setCurrentEntry(entryList[0]);
+                  
+                  if(theEntryToRender)
+                  {
+                     // a CADRG is 1536x1536 per frame.
+                     theNumberOfLines   = theEntryToRender->getNumberOfLines();
+                     theNumberOfSamples = theEntryToRender->getNumberOfSamples();
+                  }
+
+                  if(theEntryToRender->getProductType().trim().upcase() == "CADRG")
+                  {
+                     theProductType = OSSIM_PRODUCT_TYPE_CADRG;
+                     result = true;
+                  }
+                  else if(theEntryToRender->getProductType().trim().upcase() == "CIB")
+                  {
+                     theProductType = OSSIM_PRODUCT_TYPE_CIB;
+                     result = true;
+                  }
+                  if ( result )
+                  {
+                     // This initializes tiles and buffers.
+                     allocateForProduct();
+                  }
+               }
+            }
+         }
+      }
+   }
+
+   if(!result)
+   {
+      theImageFile.clear();
+      close();
+   }
+
+#if 0 /* 20100414 - drb */
+   else
+   {
+      //---
+      // Adjust image rect so not to go over the -180 to 180 and -90 to 90
+      // bounds.
+      //---
+      // Note this did not do any boundary checking and was in conflict with setTocEntryToRender
+      // method calculation of lines and samps.
+      // setActualImageRect();
+
+      std::ifstream in(theImageFile.c_str(), std::ios::in|std::ios::binary);
+      if(in.good()&&theTableOfContents->getRpfHeader())
+      {
+      }
+      completeOpen();
+
+      theTile = ossimImageDataFactory::instance()->create(this, this);
+      theTile->initialize();
+   }
+#endif
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimCibCadrgTileSource::open(): Leaving at line " << __LINE__
+         << " result=" << (result?"true":"false") << std::endl;
+   }
+
+   return result;
+}
+
+void ossimCibCadrgTileSource::setSkipEmptyCheck( bool bSkipEmptyCheck )
+{
+   theSkipEmptyCheck = bSkipEmptyCheck;
+}
+
+ossimRefPtr<ossimImageData> ossimCibCadrgTileSource::getTile(
+   const  ossimIrect& rect, ossim_uint32 resLevel)
+{
+   if (theTile.valid())
+   {
+      // Image rectangle must be set prior to calling getTile.
+      theTile->setImageRectangle(rect);
+      
+      if ( getTile( theTile.get(), resLevel ) == false )
+      {
+         if (theTile->getDataObjectStatus() != OSSIM_NULL)
+         {
+            theTile->makeBlank();
+         }
+      }
+   }
+   
+   return theTile;
+}
+
+bool ossimCibCadrgTileSource::getTile(ossimImageData* result,
+                                      ossim_uint32 resLevel)
+{
+   bool status = false;
+
+   //---
+   // Not open, this tile source bypassed, or invalid res level,
+   // return a blank tile.
+   //---
+   if( isOpen() && isSourceEnabled() && isValidRLevel(resLevel) &&
+       result && (result->getNumberOfBands() == getNumberOfOutputBands()) &&
+       (theProductType != OSSIM_PRODUCT_TYPE_UNKNOWN) )
+   {
+      if ( resLevel > 0 )
+      {
+         //---
+         // Check for overview tile.  Some overviews can contain r0 so always
+         // call even if resLevel is 0 (if overview is not virtual).  Method 
+         // returns true on success, false on error.
+         //---
+         status = getOverviewTile(resLevel, result);
+      }
+
+      if (!status) // Did not get an overview tile.
+      {
+         status = true;
+
+         ossimIrect rect = result->getImageRectangle();
+
+         ossimIrect imageRect = getImageRectangle();
+
+         if ( rect.intersects(imageRect) )
+         {
+            //---
+            // Start with a blank tile in case there is not total coverage
+            // for rect.
+            //---
+            result->makeBlank();
+   
+            vector<ossimFrameEntryData> frames = getIntersectingEntries(rect);
+            if(frames.size() > 0)
+            {
+               //---
+               // Now lets render each frame.  Note we will have to find
+               // subframes
+               // that intersect the rectangle of interest for each frame.
+               //---
+               fillTile(rect, frames, result);
+               
+               // Revalidate tile status.
+               result->validate();
+            }
+         }
+         else
+         {
+            result->makeBlank();
+         }
+      }
+   }
+   
+   return status;
+}
+
+ossim_uint32 ossimCibCadrgTileSource::getNumberOfInputBands()const
+{
+   switch(theProductType)
+   {
+      case  OSSIM_PRODUCT_TYPE_UNKNOWN:
+      {
+         return 0;
+      }
+      case OSSIM_PRODUCT_TYPE_CIB:
+      {
+         return 1;
+      }
+      case OSSIM_PRODUCT_TYPE_CADRG:
+      {
+         return 3;
+      }
+   }
+   
+   return 0;
+}
+
+ossim_uint32 ossimCibCadrgTileSource::getNumberOfOutputBands()const
+{
+   switch(theProductType)
+   {
+      case  OSSIM_PRODUCT_TYPE_UNKNOWN:
+      {
+         return 0;
+      }
+      case OSSIM_PRODUCT_TYPE_CIB:
+      {
+         return 1;
+      }
+      case OSSIM_PRODUCT_TYPE_CADRG:
+      {
+         return 3;
+      }
+   }
+   
+   return 0;
+}
+
+ossim_uint32 ossimCibCadrgTileSource::getNumberOfLines(ossim_uint32 reduced_res_level) const
+{
+   if (reduced_res_level == 0)
+   {
+      return theNumberOfLines;
+   }
+   else if (theOverview.valid())
+   {
+      return theOverview->getNumberOfLines(reduced_res_level);
+   }
+
+   return 0;
+}
+
+ossim_uint32 ossimCibCadrgTileSource::getNumberOfSamples(ossim_uint32 reduced_res_level) const
+{
+   if (reduced_res_level == 0)
+   {
+      return theNumberOfSamples;
+   }
+   else if (theOverview.valid())
+   {
+      return theOverview->getNumberOfSamples(reduced_res_level);
+   }
+
+   return 0;
+}
+
+ossimIrect ossimCibCadrgTileSource::getImageRectangle(ossim_uint32 reduced_res_level) const
+{
+   return ossimIrect(0,                         // upper left x
+                     0,                         // upper left y
+                     getNumberOfSamples(reduced_res_level) - 1,  // lower right x
+                     getNumberOfLines(reduced_res_level)   - 1); // lower right y                     
+}
+   
+ossimRefPtr<ossimImageGeometry> ossimCibCadrgTileSource::getImageGeometry()
+{
+   if ( !theGeometry )
+   {
+      // Check for external geom:
+      theGeometry = getExternalImageGeometry();
+      
+      if ( !theGeometry && theEntryToRender )
+      {
+         theGeometry = theEntryToRender->getImageGeometry();
+      }
+
+      // Set image things the geometry object should know about.
+      initImageParameters( theGeometry.get() );
+   }
+
+   return theGeometry;
+}
+   
+ossimScalarType ossimCibCadrgTileSource::getOutputScalarType() const
+{
+   return OSSIM_UCHAR;
+}
+
+ossim_uint32 ossimCibCadrgTileSource::getTileWidth() const
+{
+   return theTileSize.x;
+}
+   
+ossim_uint32 ossimCibCadrgTileSource::getTileHeight() const
+{
+   return theTileSize.y;
+}
+
+ossim_uint32 ossimCibCadrgTileSource::getCurrentEntry()const
+{
+   return (ossim_uint32)theEntryNumberToRender;
+}
+
+bool ossimCibCadrgTileSource::setCurrentEntry(ossim_uint32 entryIdx)
+{
+   bool result = false;
+
+   theDecimationFactors.clear();
+   
+   // Clear the geometry.
+   theGeometry = 0;
+   
+   // Must clear or openOverview will use last entries.
+   theOverviewFile.clear();
+   
+   if(setEntryToRender(entryIdx))
+   {
+      completeOpen();
+      result = true;
+   }
+
+   return result;
+}
+
+void ossimCibCadrgTileSource::getEntryList(std::vector<ossim_uint32>& entryList)const
+{
+   std::vector<ossimString> scaleList = getProductScaleList();
+   ossim_uint32 scaleIdx = 0;
+   ossim_uint32 entryIdx = 0;
+   for(scaleIdx = 0; scaleIdx < scaleList.size(); ++scaleIdx)
+   {
+      std::vector<ossim_int32> eList = getProductEntryList(scaleList[scaleIdx]);
+      
+      for(entryIdx = 0; entryIdx < eList.size(); ++entryIdx)
+      {
+         entryList.push_back(eList[entryIdx]);
+      }
+   }
+
+}
+
+bool ossimCibCadrgTileSource::setEntryToRender(ossim_uint32 index)
+{
+   if(isOpen())
+   {
+      const ossimRpfTocEntry *temp = theTableOfContents->getTocEntry(index);
+
+      if(temp)
+      {
+         if(!(temp->getBoundaryInformation().getCoverage().isGeographicRectNull()))
+         {
+            setTocEntryToRender(temp);
+            theEntryNumberToRender = index;
+            if(theEntryToRender)
+            {
+               if(theEntryToRender->getProductType().trim().upcase() == "CADRG")
+               {
+                  theProductType = OSSIM_PRODUCT_TYPE_CADRG;
+               }
+               else if(theEntryToRender->getProductType().trim().upcase() == "CIB")
+               {
+                  theProductType = OSSIM_PRODUCT_TYPE_CIB;
+               }
+               else
+               {
+                  theProductType = OSSIM_PRODUCT_TYPE_UNKNOWN;
+               }
+            }
+            
+            populateLut();
+            
+            return true;
+         }
+      }
+   }
+   
+   return false;
+}
+
+void ossimCibCadrgTileSource::setTocEntryToRender(const ossimRpfTocEntry* entry)
+{
+   if(isOpen()&&entry)
+   {
+      theEntryToRender = entry;
+      theNumberOfLines   = theEntryToRender->getNumberOfLines();
+      theNumberOfSamples = theEntryToRender->getNumberOfSamples();
+      theEntryNumberToRender = theTableOfContents->getTocEntryIndex(entry);
+   }
+}
+
+ossim_int32 ossimCibCadrgTileSource::getCurrentEntryIndex()const
+{
+   return theEntryNumberToRender;
+}
+
+const ossimRpfTocEntry* ossimCibCadrgTileSource::getCurrentTocEntry()const
+{
+   return theEntryToRender;
+}
+
+const ossimRpfToc*  ossimCibCadrgTileSource::getToc()const
+{
+   return theTableOfContents;
+}
+
+bool ossimCibCadrgTileSource::isValidRLevel(ossim_uint32 reduced_res_level) const
+{
+   if (reduced_res_level == 0)
+   {
+      return true;
+   }
+   else if (theOverview.valid())
+   {
+      return theOverview->isValidRLevel(reduced_res_level);
+   }
+   else
+   {
+      return false;
+   }
+}
+
+vector<ossimString> ossimCibCadrgTileSource::getProductScaleList()const
+{
+   vector<ossimString> result;
+   
+   if(isOpen())
+   {
+      ossim_int32 upperBound = theTableOfContents->getNumberOfEntries();
+
+      for(ossim_int32 index = 0; index < upperBound; ++index)
+      {
+         const ossimRpfTocEntry* entry = theTableOfContents->getTocEntry(index);
+         ossimString scale = entry->getBoundaryInformation().getScale();
+
+         scale = scale.trim().upcase();
+         if(scale!="")
+         {
+            // CIB will have product scales like 5M or 10M
+            // and CADRG's will have product scales like
+            // 1:50K and 1:250K ...
+            // So if these patterns exist then add it to
+            // the product list.
+            if( ( std::find(scale.begin(), scale.end(), ':') != scale.end() )
+                ||
+                (scale[scale.size()-1]=='M'))
+            {
+               // only add it if it doesn't already exist
+               // on the list.
+               if(find(result.begin(), result.end(), scale) == result.end())
+               {
+                  result.push_back(scale);
+               }
+            }
+         }
+      }
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimCibCadrgTileSource::getProductScaleList DEBUG:"
+         << endl;
+
+      std::vector<ossimString>::const_iterator i = result.begin();
+      ossim_uint32 index = 0;
+      while (i != result.end())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "scale[" << index << "]:  " << (*i) << endl;
+         ++index;
+         ++i;
+      }
+   }
+   
+   return result;
+}
+
+vector<ossim_int32> ossimCibCadrgTileSource::getProductEntryList(const ossimString& productScale)const
+{
+   vector<ossim_int32> result;
+   
+   if(isOpen())
+   {
+      ossim_int32 upperBound = theTableOfContents->getNumberOfEntries();
+
+      for(ossim_int32 index = 0; index < upperBound; ++index)
+      {
+         const ossimRpfTocEntry* entry = theTableOfContents->getTocEntry(index);
+
+         if(entry)
+         {
+            // If the "skip empty check" is true, we don't check to see if the
+            // actual frame images exist. Otherwise the check is carried out,
+            // which is the default situation.
+            bool bIsEmpty = (theSkipEmptyCheck==false) ? entry->isEmpty() : false;
+
+            // if the entry is not empty then add it to the list.
+            if( bIsEmpty == false )
+            {
+               ossimString scale = entry->getBoundaryInformation().getScale();
+               scale = scale.trim().upcase();
+               if(scale==productScale)
+               {
+                  result.push_back(index);
+               }
+            }
+         }
+      }
+   }
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimCibCadrgTileSource::getProductEntryList DEBUG:"
+         << endl;
+
+      std::vector<ossim_int32>::const_iterator i = result.begin();
+      ossim_uint32 index = 0;
+      while (i != result.end())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "scale[" << index << "]:  " << (*i) << endl;
+         ++index;
+         ++i;
+      }
+   }
+   
+   return result;
+   
+}
+
+vector<ossimCibCadrgTileSource::ossimFrameEntryData> ossimCibCadrgTileSource::getIntersectingEntries(const ossimIrect& rect)
+{
+   vector<ossimFrameEntryData> result;
+
+   // make sure we have the Toc entry to render
+   if(!isOpen()) return result;
+   
+   ossimIrect imageRect = getImageRectangle();
+   if(rect.intersects(imageRect))
+   {
+      ossimIrect clipRect  = rect.clipToRect(imageRect);
+      ossimIrect frameRect(clipRect.ul().x/CIBCADRG_FRAME_WIDTH,
+                           clipRect.ul().y/CIBCADRG_FRAME_HEIGHT,
+                           clipRect.lr().x/CIBCADRG_FRAME_WIDTH,
+                           clipRect.lr().y/CIBCADRG_FRAME_HEIGHT);
+
+      ossimRpfFrameEntry tempEntry;
+
+      
+     for(ossim_int32 row = frameRect.ul().y; row <= frameRect.lr().y; ++row)
+      {
+         for(ossim_int32 col = frameRect.ul().x; col <= frameRect.lr().x; ++col)
+         {
+            if(theEntryToRender->getEntry((theEntryToRender->getNumberOfFramesVertical()-1) - row,
+                                          col,
+                                          tempEntry))
+            {
+               if(tempEntry.exists())
+               {
+                   result.push_back(ossimFrameEntryData(row,
+                                                        col,
+                                                        row*CIBCADRG_FRAME_HEIGHT,
+                                                        col*CIBCADRG_FRAME_WIDTH,
+                                                        tempEntry));
+               }
+            }
+         }
+      }
+   }
+   
+   return result;
+}
+
+void ossimCibCadrgTileSource::fillTile(
+   const ossimIrect& tileRect,
+   const vector<ossimFrameEntryData>& framesInvolved,
+   ossimImageData* tile)
+{
+   ossim_uint32 idx = 0;
+   for(idx = 0;
+       idx < framesInvolved.size();
+       ++idx)
+   {
+
+      if(theWorkFrame->parseFile(framesInvolved[idx].theFrameEntry.getFullPath())
+         == ossimErrorCodes::OSSIM_OK)
+      {
+         // we will fill a subtile.  We pass in which frame it is and the position of the frame.
+         // the actual pixel will be 1536*row and 1536 *col.
+         if(theProductType == OSSIM_PRODUCT_TYPE_CIB)
+         {
+            fillSubTileCib(*theWorkFrame,
+                           tileRect,
+                           framesInvolved[idx],
+                           tile);
+         }
+         else
+         {
+            fillSubTileCadrg(*theWorkFrame,
+                             tileRect,
+                             framesInvolved[idx],
+                             tile);
+         }
+      }
+   }
+}
+
+void ossimCibCadrgTileSource::fillSubTileCadrg(
+   const ossimRpfFrame&  aFrame,
+   const ossimIrect& tileRect,
+   const ossimFrameEntryData& frameEntryData,
+   ossimImageData* tile)
+{
+   // first let's grab the absolute position of the frame rectangle in pixel space
+   ossimIrect frameRect(frameEntryData.thePixelCol,
+                        frameEntryData.thePixelRow,
+                        frameEntryData.thePixelCol + CIBCADRG_FRAME_WIDTH  - 1,
+                        frameEntryData.thePixelRow + CIBCADRG_FRAME_HEIGHT - 1);
+
+   
+   // now clip it to the tile
+   ossimIrect clipRect = tileRect.clipToRect(frameRect);
+   
+   const ossimRpfCompressionSection* compressionSection = aFrame.getCompressionSection();
+   
+   if(!compressionSection)
+   {
+      return;
+   }
+
+   const vector<ossimRpfColorGrayscaleTable>& colorTable =
+      aFrame.getColorGrayscaleTable();
+
+   // ESH 03/2009 -- Partial fix for ticket #646.
+   // Crash fix on reading RPFs: Make sure the colorTable vector 
+   // has entries before trying to make use of them. 
+   int numTables = (int)colorTable.size();
+   if ( numTables <= 0 )
+   {
+      return;
+   }
+
+   ossim_uint8 *tempRows[3];
+   
+   tempRows[0] = theUncompressedBuffer;
+   tempRows[1] = (theUncompressedBuffer + 256*256);
+   tempRows[2] = (tempRows[1] + 256*256);
+   
+   // find the shift to 0,0
+   ossimIpt tempDelta(clipRect.ul().x - frameEntryData.thePixelCol,
+                      clipRect.ul().y - frameEntryData.thePixelRow);
+   
+   
+   // In order to compute the subframe we will need the corner offsets of
+   // the upper left of the frame and the upper left of the clip rect.  The
+   // clip rect should be completely within the frame.  This just translates the value
+   // to make the upper left of the frame be 0,0.
+   //
+   ossimIrect offsetRect(tempDelta.x,
+                         tempDelta.y,
+                         tempDelta.x + clipRect.width()-1,
+                         tempDelta.y + clipRect.height()-1);
+   
+   // each subframe is 64x64.  We will actually use 256x256 since
+   // we will be uncompressing them.  Note CADRG is a 256x256 tile
+   // compressed to 64x64x12 bit data
+   //
+    ossimIrect subFrameRect(offsetRect.ul().x/256,
+                            offsetRect.ul().y/256,
+                            (offsetRect.lr().x)/256,
+                            (offsetRect.lr().y)/256);
+   
+   ossim_uint32 readPtr  = 0;
+
+   ossim_int32 row = 0;
+   ossim_int32 col = 0;
+   ossim_uint32 i = 0;
+   ossim_uint32 j = 0;
+   ossim_int32 upperY = subFrameRect.lr().y;
+   ossim_int32 upperX = subFrameRect.lr().x;
+   ossim_int32 lowerY = subFrameRect.ul().y;
+   ossim_int32 lowerX = subFrameRect.ul().x; 
+   for(row = lowerY; row <= upperY; ++row)
+   {
+      for(col = lowerX; col <= upperX; ++col)
+      {
+         readPtr = 0;
+         if(aFrame.fillSubFrameBuffer(theCompressedBuffer, 0, row, col))
+         {
+            for (i = 0; i < 256; i += 4)
+            {
+               for (j = 0; j < 256; j += 8)
+               {
+                  ossim_uint16 firstByte  = theCompressedBuffer[readPtr++] & 0xff;
+                  ossim_uint16 secondByte = theCompressedBuffer[readPtr++] & 0xff;
+                  ossim_uint16 thirdByte  = theCompressedBuffer[readPtr++] & 0xff;
+                  
+                  //because dealing with half-bytes is hard, we
+                  //uncompress two 4x4 tiles at the same time. (a
+                  //4x4 tile compressed is 12 bits )
+                  // this little code was grabbed from openmap software.
+                  
+                  /* Get first 12-bit value as index into VQ table */
+                  // I think we need to swap
+                  ossim_uint16 val1 = (firstByte << 4) | (secondByte >> 4);
+                  
+                  /* Get second 12-bit value as index into VQ table*/
+                  ossim_uint16 val2 = ((secondByte & 0x000F) << 8) | thirdByte;
+                  
+                  for (ossim_uint32 t = 0; t < 4; ++t)
+                  {
+                     for (ossim_uint32 e = 0; e < 4; ++e)
+                     {
+                        ossim_uint16 tableVal1 = compressionSection->getTable()[t].theData[val1*4 + e] & 0xff;
+                        ossim_uint16 tableVal2 = compressionSection->getTable()[t].theData[val2*4 + e] & 0xff;
+
+                        ossim_uint32 pixindex = ((i+t)*256) +
+                                                 (j + e);
+                        const ossim_uint8* color1 = colorTable[0].getStartOfData(tableVal1);
+                        const ossim_uint8* color2 = colorTable[0].getStartOfData(tableVal2);
+                        
+                        
+                        tempRows[0][pixindex] = color1[0];
+                        tempRows[1][pixindex] = color1[1];
+                        tempRows[2][pixindex] = color1[2];
+                        
+                        tempRows[0][pixindex+4] = color2[0];
+                        tempRows[1][pixindex+4] = color2[1];
+                        tempRows[2][pixindex+4] = color2[2];
+                     } //for e
+                  } //for t
+               }  /* for j */
+            } //for i
+         }
+         else
+         {
+            memset(theUncompressedBuffer, 0, 256*256*3);
+         }
+         ossim_int32 tempCol = col*256;
+         ossim_int32 tempRow = row*256;
+         ossimIrect subRectToFill(frameRect.ul().x + tempCol,
+                                  frameRect.ul().y + tempRow,
+                                  frameRect.ul().x + tempCol + 255,
+                                  frameRect.ul().y + tempRow + 255);
+         tile->loadTile(theUncompressedBuffer,
+                        subRectToFill,
+                        OSSIM_BSQ);
+      }
+   }
+}
+
+void ossimCibCadrgTileSource::fillSubTileCib(
+   const ossimRpfFrame&  aFrame,
+   const ossimIrect& tileRect,
+   const ossimFrameEntryData& frameEntryData,
+   ossimImageData* tile)
+{
+   // first let's grab the absolute position of the frame rectangle in pixel
+   // space
+   ossimIrect frameRect(frameEntryData.thePixelCol,
+                        frameEntryData.thePixelRow,
+                        frameEntryData.thePixelCol + CIBCADRG_FRAME_WIDTH  - 1,
+                        frameEntryData.thePixelRow + CIBCADRG_FRAME_HEIGHT - 1);
+
+   
+   // now clip it to the tile
+   ossimIrect clipRect = tileRect.clipToRect(frameRect);
+
+   const ossimRpfCompressionSection* compressionSection = aFrame.getCompressionSection();
+   
+   if(!compressionSection)
+   {
+      return;
+   }
+
+   const vector<ossimRpfColorGrayscaleTable>& colorTable =
+      aFrame.getColorGrayscaleTable();
+
+   // ESH 03/2009 -- Partial fix for ticket #646.
+   // Crash fix on reading RPFs: Make sure the colorTable vector 
+   // has entries before trying to make use of them. 
+   int numTables = (int)colorTable.size();
+   if ( numTables <= 0 )
+   {
+      return;
+   }
+
+   // check to see if it does overlap.  If it doesn't then the width and height
+   // will be a single point
+   {
+      ossim_uint8 *tempRow;
+
+      tempRow = theUncompressedBuffer;
+      
+      // find the shift to 0,0
+      ossimIpt tempDelta(clipRect.ul().x - frameEntryData.thePixelCol,
+                         clipRect.ul().y - frameEntryData.thePixelRow);
+      
+      // In order to compute the subframe we will need the corner offsets of
+      // the upper left of the frame and the upper left of the clip rect.  The
+      // clip rect should be completely within the frame.  This just translates the value
+      // to make the upper left of the frame be 0,0.
+      //
+      ossimIrect offsetRect(tempDelta.x,
+                            tempDelta.y,
+                            tempDelta.x + clipRect.width()-1,
+                            tempDelta.y + clipRect.height()-1);
+
+      // each subframe is 64x64.  We will actually use 256x256 since
+      // we will be uncompressing them.  Note CADRG is a 256x256 tile
+      // compressed to 64x64x12 bit data
+      //
+      ossimIrect subFrameRect(offsetRect.ul().x/256,
+                              offsetRect.ul().y/256,
+                              (offsetRect.lr().x)/256,
+                              (offsetRect.lr().y)/256);
+
+      ossim_int32 row = 0;
+      ossim_int32 col = 0;
+      ossim_uint32 i = 0;
+      ossim_uint32 j = 0;
+      ossim_uint32 readPtr = 0;
+      for(row = subFrameRect.ul().y; row <= subFrameRect.lr().y; ++row)
+      {
+         for(col = subFrameRect.ul().x; col <= subFrameRect.lr().x; ++col)
+         {
+            readPtr = 0;
+            if(aFrame.fillSubFrameBuffer(theCompressedBuffer, 0, row, col))
+            {
+               for (i = 0; i < 256; i += 4)
+               {
+                  for (j = 0; j < 256; j += 8)
+                  {
+                     ossim_uint16 firstByte  = theCompressedBuffer[readPtr++] & 0xff;
+                     ossim_uint16 secondByte = theCompressedBuffer[readPtr++] & 0xff;
+                     ossim_uint16 thirdByte  = theCompressedBuffer[readPtr++] & 0xff;
+                     
+                     //because dealing with half-bytes is hard, we
+                     //uncompress two 4x4 tiles at the same time. (a
+                     //4x4 tile compressed is 12 bits )
+                     // this little code was grabbed from openmap software.
+                     
+                     /* Get first 12-bit value as index into VQ table */
+                     // I think we need to swap
+                     ossim_uint16 val1 = (firstByte << 4) | (secondByte >> 4);
+                     
+                     /* Get second 12-bit value as index into VQ table*/
+                     ossim_uint16 val2 = ((secondByte & 0x000F) << 8) | thirdByte;
+
+                     for (ossim_uint32 t = 0; t < 4; ++t)
+                     {
+                        for (ossim_uint32 e = 0; e < 4; ++e)
+                        {
+                           ossim_uint16 tableVal1 = compressionSection->getTable()[t].theData[val1*4 + e] & 0xff;
+                           ossim_uint16 tableVal2 = compressionSection->getTable()[t].theData[val2*4 + e] & 0xff;
+
+                           ossim_uint32 pixindex = ((i+t)*256) + (j + e);
+                           const ossim_uint8* color1 = colorTable[0].getStartOfData(tableVal1);
+                           const ossim_uint8* color2 = colorTable[0].getStartOfData(tableVal2);
+
+                           
+                           tempRow[pixindex]      = color1[0];
+                           tempRow[pixindex + 4]  = color2[0];
+                        } //for e
+                     } //for t
+                  }  /* for j */
+               } //for i
+            }
+            else
+            {
+               memset(theUncompressedBuffer, 0, 256*256);
+            }
+            ossim_int32 tCol = col*256;
+            ossim_int32 tRow = row*256;
+            ossimIrect subRectToFill(frameRect.ul().x + tCol,
+                                     frameRect.ul().y + tRow,
+                                     frameRect.ul().x + tCol + 255,
+                                     frameRect.ul().y + tRow + 255);
+            tile->loadTile(theUncompressedBuffer,
+                           subRectToFill,
+                           OSSIM_BSQ);
+         }
+      }
+   }  
+}
+
+void ossimCibCadrgTileSource::allocateForProduct()
+{
+   if(theProductType ==  OSSIM_PRODUCT_TYPE_UNKNOWN)
+   {
+      return;
+   }
+   if(theUncompressedBuffer)
+   {
+      delete [] theUncompressedBuffer;
+      theUncompressedBuffer = 0;
+   }
+   if(theCompressedBuffer)
+   {
+      delete [] theCompressedBuffer;
+      theCompressedBuffer = 0;
+   }
+   
+   // a CADRG and CIBis a 64*64*12 bit buffer and must divide by 8 to
+   // convert to bytes
+   theCompressedBuffer   = new ossim_uint8[(64*64*12)/8];
+   if(theProductType == OSSIM_PRODUCT_TYPE_CIB)
+   {
+      theUncompressedBuffer = new ossim_uint8[256*256];
+   }
+   else
+   {
+      theUncompressedBuffer = new ossim_uint8[256*256*3];
+   }
+   
+   theTile = ossimImageDataFactory::instance()->create(this, this);
+   theTile->initialize();
+}
+
+const ossimRpfTocEntry* ossimCibCadrgTileSource::findFirstFrame()
+{
+   vector<ossimString> products = getProductScaleList();
+   vector<ossim_int32> indexProducts;
+
+   if(products.size() > 0)
+   {
+      indexProducts = getProductEntryList(products[0]);
+
+      if(indexProducts.size()>0)
+      {
+         theEntryNumberToRender = indexProducts[0];
+         
+         return theTableOfContents->getTocEntry(indexProducts[0]);
+      }
+   }
+   
+   return 0;
+}
+
+
+void ossimCibCadrgTileSource::deleteAll()
+{
+   theOverview = 0;
+   if(theTableOfContents)
+   {
+      delete theTableOfContents;
+      theTableOfContents = 0;
+   }
+}
+
+bool ossimCibCadrgTileSource::saveState(ossimKeywordlist& kwl,
+                                     const char* prefix)const
+{
+   bool result = ossimImageHandler::saveState(kwl, prefix);
+
+   kwl.add(prefix, 
+	   "entry",
+	   theEntryNumberToRender,
+	   true);
+
+   return result;
+}
+   
+bool ossimCibCadrgTileSource::loadState(const ossimKeywordlist& kwl,
+                                        const char* prefix)
+{
+   const char* MODULE = "ossimCibCadrgTileSource::loadState";
+
+   if(traceDebug())
+   {
+      CLOG << "Entering..." << endl;
+   }
+   bool result = ossimImageHandler::loadState(kwl, prefix);
+
+   if(!result)
+   {
+	   if(traceDebug())
+	   {
+          CLOG << "Leaving..." << endl;
+       }
+      return false;
+   }
+   const char* lookup = 0;
+   lookup = kwl.find(ossimString(prefix), "entry");
+   ossim_int32 entry = ossimString(lookup).toInt32();
+
+   // if an entry is specified then
+   // call the open with an entry number
+   if(lookup)
+   {
+      if(traceDebug())
+      {
+         CLOG << "Leaving..." << endl;
+      }
+      result = ossimImageHandler::open(theImageFile);
+      setCurrentEntry(entry);
+      return result;
+   }
+
+   result = ossimImageHandler::open(theImageFile);
+   
+   return result;
+}
+
+ossim_uint32 ossimCibCadrgTileSource::getImageTileWidth() const
+{
+   return 256;
+}
+
+ossim_uint32 ossimCibCadrgTileSource::getImageTileHeight() const
+{
+   return 256;
+}
+
+bool ossimCibCadrgTileSource::isCib() const
+{
+   return (theProductType==OSSIM_PRODUCT_TYPE_CIB);
+}
+
+bool ossimCibCadrgTileSource::isCadrg() const
+{
+   return (theProductType==OSSIM_PRODUCT_TYPE_CADRG);
+}
+
+ossimString ossimCibCadrgTileSource::getProductScale() const
+{
+   ossimString result;
+   
+   const ossimRpfTocEntry* entry =
+      theTableOfContents->getTocEntry(theEntryNumberToRender);
+
+   if (entry)
+   {
+      result = entry->getBoundaryInformation().getScale();
+   }
+
+   return result;
+}
+
+ossimString ossimCibCadrgTileSource::getSecurityClassification()const
+{
+   ossimString result;
+   
+   const ossimRpfHeader* header =
+      theTableOfContents->getRpfHeader();
+
+   if (header)
+   {
+      result = header->getSecurityClassification();
+   }
+
+   return result;
+}
+
+ossimRefPtr<ossimProperty> ossimCibCadrgTileSource::getProperty(const ossimString& name)const
+{
+   if(name == "file_type")
+   {
+      if(theProductType == OSSIM_PRODUCT_TYPE_CIB)
+      {
+         return new ossimStringProperty("file_type", "CIB");
+      }
+      else if(theProductType == OSSIM_PRODUCT_TYPE_CADRG)
+      {
+         return new ossimStringProperty("file_type", "CADRG");
+      }
+      return 0;
+   }
+   return ossimImageHandler::getProperty(name);
+}
+
+void ossimCibCadrgTileSource::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageHandler::getPropertyNames(propertyNames);
+   propertyNames.push_back("file_type");
+
+   /**
+    * This code is crashing and not sure why in here. Looks like a bad GeoEye
+    * baseline merge.
+    */
+#if 0 
+   const ossimRpfHeader* header =
+      theTableOfContents->getRpfHeader();
+   if(header)
+   {
+      std::ifstream in(theImageFile.c_str(), std::ios::in|std::ios::binary);
+   }
+#endif
+}
+
+void ossimCibCadrgTileSource::populateLut()
+{
+   theLut = 0;
+   if(theEntryToRender)
+   {
+      ossim_uint32 w = theEntryToRender->getNumberOfFramesHorizontal();
+      ossim_uint32 h = theEntryToRender->getNumberOfFramesVertical();
+      ossim_uint32 wi, hi;
+      bool found = false;
+      ossimRpfFrameEntry tempEntry;
+      ossimRpfFrame aFrame;
+      for(wi = 0; ((wi < w)&&(!found)); ++wi)
+      {
+         for(hi = 0; ((hi < h)&&(!found)); ++hi)
+         {
+            theEntryToRender->getEntry(hi,
+                                       wi,
+                                       tempEntry);
+            if(tempEntry.getFullPath().exists())
+            {
+               found = true;
+            }
+         }
+      }
+      if(aFrame.parseFile(tempEntry.getFullPath())
+         == ossimErrorCodes::OSSIM_OK)
+      {
+         const vector<ossimRpfColorGrayscaleTable>& colorTable =
+            aFrame.getColorGrayscaleTable();
+
+         // ESH 03/2009 -- Partial fix for ticket #646.
+         // Crash fix on reading RPFs: Make sure the colorTable vector 
+         // has entries before trying to make use of them. 
+         int numTables = (int)colorTable.size();
+
+         ossim_uint32 numElements = (numTables > 0) ? colorTable[0].getNumberOfElements() : 0;
+         if(numElements > 0)
+         {
+            if((theProductType == OSSIM_PRODUCT_TYPE_CIB)||
+               (theProductType == OSSIM_PRODUCT_TYPE_CADRG))
+            {
+               theLut = new ossimNBandLutDataObject(numElements,
+                                                    3,
+                                                    OSSIM_UINT8);
+            }
+            else
+            {
+               theLut = 0;
+               return;
+            }
+            ossim_uint32 idx = 0;
+
+            for(idx = 0; idx < numElements;++idx)
+            {
+               const ossim_uint8* startOfData = colorTable[0].getStartOfData(idx);
+               switch(theProductType)
+               {
+                  case OSSIM_PRODUCT_TYPE_CIB:
+                  {
+                     (*theLut)[idx][0] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[0]);
+                     (*theLut)[idx][1] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[0]);
+                     (*theLut)[idx][2] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[0]);
+                     break;
+                  }
+                  case OSSIM_PRODUCT_TYPE_CADRG:
+                  {
+                     (*theLut)[idx][0] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[0]);
+                     (*theLut)[idx][1] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[1]);
+                     (*theLut)[idx][2] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[2]);
+                     break;
+                  }
+                  default:
+                  {
+                     break;
+                  }
+               }
+            }
+         }
+      }
+   }
+}
+
+void ossimCibCadrgTileSource::updatePropertiesToFirstValidFrame()
+{
+   if(theEntryToRender)
+   {
+      ossim_uint32 w = theEntryToRender->getNumberOfFramesHorizontal();
+      ossim_uint32 h = theEntryToRender->getNumberOfFramesVertical();
+      ossim_uint32 wi, hi;
+      bool found = false;
+      ossimRpfFrameEntry tempEntry;
+      ossimRpfFrame aFrame;
+      for(wi = 0; ((wi < w)&&(!found)); ++wi)
+      {
+         for(hi = 0; ((hi < h)&&(!found)); ++hi)
+         {
+            theEntryToRender->getEntry(hi,
+                                       wi,
+                                       tempEntry);
+            if(tempEntry.getFullPath().exists())
+            {
+               found = true;
+            }
+         }
+      }
+      if(found)
+      {
+         if(aFrame.parseFile(tempEntry.getFullPath()) == ossimErrorCodes::OSSIM_OK)
+         {
+            
+         }
+      }	
+   }
+}
+
diff --git a/ossim/src/ossim/imaging/ossimClosestToCenterCombiner.cpp b/ossim/src/ossim/imaging/ossimClosestToCenterCombiner.cpp
new file mode 100644
index 0000000..90f889c
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimClosestToCenterCombiner.cpp
@@ -0,0 +1,143 @@
+//*******************************************************************
+// Copyright (C) 2005 Garrett Potts. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimClosestToCenterCombiner.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimClosestToCenterCombiner.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+
+RTTI_DEF1(ossimClosestToCenterCombiner, "ossimClosestToCenterCombiner", ossimImageMosaic);
+
+ossimClosestToCenterCombiner::ossimClosestToCenterCombiner()
+   :ossimImageMosaic()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimClosestToCenterCombiner::getTile(const ossimIrect& rect,
+                                                                  ossim_uint32 resLevel)
+{
+   ossim_uint32 layerIdx = 0;
+   if(!isSourceEnabled())
+   {
+      return ossimImageMosaic::getTile(rect, resLevel);
+   }
+   if(!theTile.valid())
+   {
+      allocate();
+      if(!theTile.valid())
+      {
+         return 0;
+      }
+   }
+   theTile->setImageRectangle(rect);
+   theTile->makeBlank();
+   std::vector<ossimClosestToCenterCombinerInfo > normTileList;
+   ossimRefPtr<ossimImageData> currentTile = getNextNormTile(layerIdx, 0, rect);
+   while(currentTile.valid())
+   {
+      normTileList.push_back(ossimClosestToCenterCombinerInfo((ossimImageData*)currentTile->dup(),
+                                                              layerIdx));
+      currentTile = getNextNormTile(layerIdx, rect, resLevel);
+   }
+
+   
+   if(normTileList.size() == 1)
+   {
+      theTile->copyNormalizedBufferToTile((ossim_float32*)normTileList[0].theTile->getBuf());
+   }
+   else if(normTileList.size() > 1)
+   {
+      ossimRefPtr<ossimImageData> copyTile    = ossimImageDataFactory::instance()->create(0,
+                                                                                          OSSIM_NORMALIZED_FLOAT);
+      copyTile->setImageRectangleAndBands(rect,
+                                          getNumberOfOutputBands());
+      copyTile->initialize();
+                                                                                          
+      ossim_int32 idx   = 0;
+      ossim_uint32 w     = rect.width();
+      ossim_uint32 h     = rect.height();
+      ossim_uint32 idxW  = 0;
+      ossim_uint32 idxH  = 0;
+      ossimIpt origin    = rect.ul();
+      ossimIpt ulPt      = rect.ul();
+      ossim_uint32 band  = 0;
+      ossim_uint32 bands = copyTile->getNumberOfBands();
+      ossim_uint32 srcBandIdx = 0;
+      std::vector<ossim_float32*> bandList(bands);
+
+      for(band = 0; band < bands; ++band)
+      {
+         bandList[band] = (ossim_float32*)copyTile->getBuf(band);
+      }
+      ossim_uint32 offset   = 0;
+      origin.y = ulPt.y;
+      for(idxH = 0; idxH < h; ++idxH)
+      {
+         origin.x = ulPt.x;
+         for(idxW = 0; idxW < w;++idxW)
+         {
+            idx = findIdx(normTileList, origin, offset);
+
+            if(idx >=0)
+            {
+               for(band = 0; band < bands; ++band)
+               {
+                  srcBandIdx = ossim::min(normTileList[idx].theTile->getNumberOfBands(), band);
+                  
+                  bandList[band][offset] = *(((ossim_float32*)normTileList[idx].theTile->getBuf(srcBandIdx))+offset);
+               }
+            }
+            ++offset;
+            ++origin.x;
+         }
+         ++origin.y;
+      }
+      theTile->copyNormalizedBufferToTile((ossim_float32*)copyTile->getBuf());
+   }
+
+   theTile->validate();
+   
+   return theTile;
+
+}
+
+ossim_int32 ossimClosestToCenterCombiner::findIdx(const std::vector<ossimClosestToCenterCombinerInfo >& normTileList,
+                                                  const ossimIpt& pt, ossim_uint32 offset)const
+{
+   ossim_float32 distance = 1000000;
+   ossim_int32 returnIdx = -1;
+   ossim_float32 tempDistance;
+   ossim_int32 idx = 0;
+   ossim_int32 maxIdx = (ossim_int32)normTileList.size();
+   ossimIpt midPt;
+   ossimIrect rect;
+   for(idx = 0; idx < maxIdx; ++ idx)
+   {
+      rect = theFullResBounds[ normTileList[idx].theIndex ];
+      midPt = rect.midPoint();
+      
+      tempDistance = (pt-midPt).length();
+      if(tempDistance < distance)
+      {
+         if(normTileList[idx].theTile->getDataObjectStatus() == OSSIM_FULL)
+         {
+            distance = tempDistance;
+            returnIdx = idx;
+         }
+         else if(!normTileList[idx].theTile->isNull(offset))
+         {
+            distance = tempDistance;
+            returnIdx = idx;
+         }
+      }
+   }
+
+   return returnIdx;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimCodecBase.cpp b/ossim/src/ossim/imaging/ossimCodecBase.cpp
new file mode 100644
index 0000000..ccc2e1d
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimCodecBase.cpp
@@ -0,0 +1,3 @@
+#include <ossim/imaging/ossimCodecBase.h>
+
+RTTI_DEF2(ossimCodecBase, "ossimCodecBase", ossimObject, ossimPropertyInterface);
\ No newline at end of file
diff --git a/ossim/src/ossim/imaging/ossimCodecFactory.cpp b/ossim/src/ossim/imaging/ossimCodecFactory.cpp
new file mode 100644
index 0000000..ce626e9
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimCodecFactory.cpp
@@ -0,0 +1,84 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:  Factory class definition for codec(encoder/decoder).
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/imaging/ossimCodecFactory.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimString.h>
+
+#include <ossim/imaging/ossimJpegCodec.h>
+
+#include <string>
+
+ossimCodecFactory* ossimCodecFactory::theInstance = 0;
+
+static const std::string TYPE_KW    = "type";
+
+ossimCodecFactory::~ossimCodecFactory()
+{}
+
+ossimCodecFactory* ossimCodecFactory::instance()
+{
+   if ( !theInstance )
+   {
+      theInstance = new ossimCodecFactory();
+   }
+   return theInstance;
+}
+ossimCodecBase* ossimCodecFactory::createCodec(const ossimString& type)const
+{
+   ossimRefPtr<ossimCodecBase> result;
+
+   if((type.downcase() == "jpeg") ||
+      (type == "ossimJpegCodec"))
+   {
+      result =  new ossimJpegCodec();
+   }
+
+   return result.release();
+}
+
+ossimCodecBase* ossimCodecFactory::createCodec(const ossimKeywordlist& kwl, const char* prefix)const
+{
+   ossimString type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
+   ossimCodecBase* result = 0;
+   if(!type.empty())
+   {
+      result = this->createCodec(type);
+      if(result)
+      {
+         result->loadState(kwl, prefix);
+      }
+   }
+
+   return result;
+}
+
+void ossimCodecFactory::getTypeNameList(std::vector<ossimString>& typeNames)const
+{
+   typeNames.push_back("jpeg");
+}
+
+ossimCodecFactory::ossimCodecFactory()
+{}
+
+ossimCodecFactory::ossimCodecFactory(const ossimCodecFactory& /* obj */ )
+{}
+
+const ossimCodecFactory& ossimCodecFactory::operator=(
+   const ossimCodecFactory& /* rhs */)
+{
+   return *this;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimCodecFactoryInterface.cpp b/ossim/src/ossim/imaging/ossimCodecFactoryInterface.cpp
new file mode 100644
index 0000000..434c8d6
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimCodecFactoryInterface.cpp
@@ -0,0 +1,14 @@
+#include <ossim/imaging/ossimCodecFactoryInterface.h>
+#include <ossim/base/ossimObject.h>
+#include <ossim/imaging/ossimCodecBase.h>
+
+ossimObject* ossimCodecFactoryInterface::createObject(const ossimString& type)const
+{
+  return createCodec(type);
+}
+
+ossimObject* ossimCodecFactoryInterface::createObject(const ossimKeywordlist& kwl, const char* prefix)const
+{
+  return createCodec(kwl, prefix);
+}
+
diff --git a/ossim/src/ossim/imaging/ossimCodecFactoryRegistry.cpp b/ossim/src/ossim/imaging/ossimCodecFactoryRegistry.cpp
new file mode 100644
index 0000000..e2a6b0a
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimCodecFactoryRegistry.cpp
@@ -0,0 +1,55 @@
+#include <ossim/imaging/ossimCodecFactoryRegistry.h>
+#include <ossim/imaging/ossimCodecFactory.h>
+
+ossimCodecFactoryRegistry* ossimCodecFactoryRegistry::m_instance=0;
+
+/** hidden from use default constructor */
+ossimCodecFactoryRegistry::ossimCodecFactoryRegistry()
+{
+   m_instance = this;
+}
+
+/** hidden from use copy constructor */
+ossimCodecFactoryRegistry::ossimCodecFactoryRegistry(const ossimCodecFactoryRegistry& /* obj */)
+{
+   m_instance = this;
+}
+
+/** hidden from use operator = */
+const ossimCodecFactoryRegistry& ossimCodecFactoryRegistry::operator=(const ossimCodecFactoryRegistry& /* rhs */)
+{
+   return *this;
+}
+
+ossimCodecFactoryRegistry* ossimCodecFactoryRegistry::instance()
+{
+   if(!m_instance)
+   {
+      m_instance = new ossimCodecFactoryRegistry();
+      m_instance->registerFactory(ossimCodecFactory::instance());
+   }
+   
+   return m_instance;
+}
+
+ossimCodecFactoryRegistry::~ossimCodecFactoryRegistry()
+{
+   m_instance = 0;
+}
+
+
+ossimCodecBase* ossimCodecFactoryRegistry::createCodec(const ossimString& type)const
+{
+   return createNativeObjectFromRegistry(type);
+}
+
+ossimCodecBase* ossimCodecFactoryRegistry::createCodec(const ossimKeywordlist& kwl, 
+                                                       const char* prefix)const
+{
+   return createNativeObjectFromRegistry(kwl, prefix);
+}
+
+void ossimCodecFactoryRegistry::getTypeNameList(std::vector<ossimString>& typeNames)const
+{
+   getAllTypeNamesFromRegistry(typeNames);
+}
diff --git a/ossim/src/ossim/imaging/ossimColorNormalizedFusion.cpp b/ossim/src/ossim/imaging/ossimColorNormalizedFusion.cpp
new file mode 100644
index 0000000..444663c
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimColorNormalizedFusion.cpp
@@ -0,0 +1,146 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: Color normalized fusion
+//
+//*************************************************************************
+// $Id: ossimColorNormalizedFusion.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimColorNormalizedFusion.h>
+#include <ossim/base/ossimErrorCodes.h>
+#include <ossim/base/ossimErrorContext.h>
+#include <ossim/imaging/ossimImageData.h>
+
+RTTI_DEF1(ossimColorNormalizedFusion,
+          "ossimColorNormalizedFusion",
+          ossimFusionCombiner);
+
+ossimColorNormalizedFusion::ossimColorNormalizedFusion()
+   : ossimFusionCombiner()
+{
+}
+
+ossimColorNormalizedFusion::ossimColorNormalizedFusion(ossimObject* owner)
+   : ossimFusionCombiner(owner)
+{
+}
+
+ossimColorNormalizedFusion::~ossimColorNormalizedFusion()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimColorNormalizedFusion::getTile(
+   const ossimIrect& rect,
+   ossim_uint32 resLevel)
+{
+   ossimRefPtr<ossimImageData> inputTile = getNormTile(rect, resLevel);
+
+   if(!inputTile.valid())
+   {
+      return NULL;
+   }
+   if(!theInputConnection||!theIntensityConnection)
+   {
+      return NULL;
+   }
+   
+   if((inputTile->getDataObjectStatus() == OSSIM_NULL)||
+      (inputTile->getDataObjectStatus() == OSSIM_EMPTY))
+   {
+      return NULL;
+   }
+
+   if(theTile.valid())
+   {
+      theTile->setImageRectangleAndBands(rect, inputTile->getNumberOfBands());
+   }
+
+   
+   ossim_float32* redBuff = (ossim_float32*)inputTile->getBuf(0);
+   ossim_float32* grnBuff = (ossim_float32*)inputTile->getBuf(1);
+   ossim_float32* bluBuff = (ossim_float32*)inputTile->getBuf(2);
+
+   if(!redBuff||!grnBuff||!bluBuff)
+   {
+      return 0;
+   }
+   ossimRefPtr<ossimImageData> inputIntensity = getNormIntensity(rect, resLevel);
+
+   if((!inputIntensity.valid()) ||
+      (!inputIntensity->getBuf()) ||
+      (inputIntensity->getDataObjectStatus() == OSSIM_EMPTY))
+   {
+      return 0;
+   }
+   
+   ossim_float32* mono_buff = (ossim_float32*)inputIntensity->getBuf(0);
+
+   // Since NULL_PIX_VALUE is only used for Pix8 comparisons cast it now.
+   const float NULL_PIX_VALUE = (ossim_float32)inputIntensity->getNullPix(0);
+   const float MIN_PIX_VALUE = (ossim_float32)inputIntensity->getMinPix(0);
+   const float MAX_PIX_VALUE = (ossim_float32)inputIntensity->getMaxPix(0);
+
+   float  rgb_sum;
+   float  r_wt; // Weight of red to rgb_sum.
+   float  g_wt; // Weight of green to rgb_sum.
+   float  b_wt; // Weight of blue to rgb_sum.
+   float  iVal;
+   float  redVal;
+   float  greenVal;
+   float  blueVal;
+
+   int size = theTile->getWidth()*theTile->getHeight();
+   
+   for (int i = 0; i < size;  i++)
+   {
+      //***
+      // If no intensity source, or, no rgb source make output pixels null.
+      //***
+      if ( (mono_buff[i] == NULL_PIX_VALUE) ||
+           (redBuff[i]   == NULL_PIX_VALUE &&
+            grnBuff[i]   == NULL_PIX_VALUE &&
+            bluBuff[i]   == NULL_PIX_VALUE) )
+           
+      {
+         redBuff[i] = NULL_PIX_VALUE;
+         grnBuff[i] = NULL_PIX_VALUE;
+         bluBuff[i] = NULL_PIX_VALUE;
+      }
+      else
+      {
+         redVal    = redBuff[i];
+         greenVal  = grnBuff[i];
+         blueVal   = bluBuff[i];
+         rgb_sum   = redVal + greenVal + blueVal + 3;
+	 r_wt      = 3 * (redVal + 1)   / rgb_sum;
+	 g_wt      = 3 * (greenVal + 1) / rgb_sum;
+	 b_wt      = 3 * (blueVal + 1)  / rgb_sum;
+         iVal      = mono_buff[i] + 1;
+	 
+	 redVal    = r_wt * iVal - 1;
+         greenVal  = g_wt * iVal - 1;
+	 blueVal   = b_wt * iVal - 1;
+
+         // Clip to max pixel value of radiometry.
+         if (redVal   > MAX_PIX_VALUE) redVal   = MAX_PIX_VALUE;
+         if (greenVal > MAX_PIX_VALUE) greenVal = MAX_PIX_VALUE;
+         if (blueVal  > MAX_PIX_VALUE) blueVal  = MAX_PIX_VALUE;
+
+         // Assign chip value, clamp to min pixel value of radiometry if zero.
+         redBuff[i] = (float)(redVal>0.0 ? redVal : MIN_PIX_VALUE);
+         grnBuff[i] = (float)(greenVal>0.0 ? greenVal : MIN_PIX_VALUE);
+         bluBuff[i] = (float)(blueVal>0.0 ? blueVal : MIN_PIX_VALUE);
+      }
+   } // End of loop through pixels in chip.
+   theTile->copyNormalizedBufferToTile((float*)inputTile->getBuf());
+   theTile->validate();
+
+   return theTile;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimConvolutionFilter1D.cpp b/ossim/src/ossim/imaging/ossimConvolutionFilter1D.cpp
new file mode 100644
index 0000000..56f82d8
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimConvolutionFilter1D.cpp
@@ -0,0 +1,669 @@
+//*******************************************************************
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//*************************************************************************
+// $Id: ossimConvolutionFilter1D.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+
+#include <ossim/imaging/ossimConvolutionFilter1D.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimMatrixProperty.h>
+#include <ossim/base/ossimBooleanProperty.h>
+#include <ossim/base/ossimNumericProperty.h>
+
+RTTI_DEF1(ossimConvolutionFilter1D, "ossimConvolutionFilter1D", ossimImageSourceFilter);
+
+#define PROPNAME_KERNELSIZE "KernelSize"
+#define PROPNAME_KERNEL "Kernel"
+#define PROPNAME_ISHZ   "Horizontal"
+#define PROPNAME_CENTEROFFSET "CenterOffset"
+#define PROPNAME_STRICTNODATA "StrictNoData"
+
+ossimConvolutionFilter1D::ossimConvolutionFilter1D(ossimObject* owner)
+   :ossimImageSourceFilter(owner),
+    theCenterOffset(0),
+    theTile(NULL),
+    theIsHz(true),
+    theStrictNoData(true),
+    theNullPixValue(0),
+    theMinPixValue(0),
+    theMaxPixValue(0)
+{
+   //sets up an identity convolution
+   theKernel.push_back(1.0);
+}
+
+ossimConvolutionFilter1D::~ossimConvolutionFilter1D()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimConvolutionFilter1D::getTile(
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   if(!theInputConnection)
+   {
+      return theTile;
+   }
+
+   if(!isSourceEnabled())
+   {
+      return theInputConnection->getTile(tileRect, resLevel);
+   }
+
+   //---
+   // We have a 1xn or nx1 matrix, + a center offset
+   // so stretch the input rect out to cover the required pixels
+   //---
+   ossimIrect  newRect;
+   ossim_uint32 kl = (ossim_uint32)theKernel.size(); //kernel length
+   if (theIsHz)
+   {
+      //horizontal kernel (row kernel)
+      newRect = ossimIrect(ossimIpt(tileRect.ul().x - theCenterOffset,
+                                    tileRect.ul().y),
+                           ossimIpt(tileRect.lr().x - theCenterOffset + kl -1,
+                                    tileRect.lr().y));
+   } else {
+      //vertical kernel
+      newRect = ossimIrect(ossimIpt(tileRect.ul().x,
+                                    tileRect.ul().y - theCenterOffset),
+                           ossimIpt(tileRect.lr().x,
+                                    tileRect.lr().y - theCenterOffset + kl -1));
+   }
+   ossimRefPtr<ossimImageData> data = theInputConnection->getTile(newRect,
+                                                                  resLevel);
+
+   if(!data.valid() || !data->getBuf())
+   {
+      return data;
+   }
+
+    // First time through or after an initialize()...
+   if (!theTile.valid())
+   {
+      allocate();
+      if (!theTile.valid()) // Should never happen!
+      {
+         return data;
+      }
+   }
+
+   // First time through, after an initialize() or a setKernel()...
+   if (!theNullPixValue.size())
+   {
+      computeNullMinMax();
+      if (!theNullPixValue.size()) // Should never happen!
+      {
+         return data;
+      }
+   }
+
+   theTile->setImageRectangle(tileRect);
+   theTile->makeBlank();
+   
+   switch(data->getScalarType())
+   {
+      case OSSIM_UCHAR:
+      {
+         if(data->getDataObjectStatus() == OSSIM_FULL)
+         {
+            convolveFull(static_cast<ossim_uint8>(0), data, theTile);
+         }
+         else
+         {
+            convolvePartial(static_cast<ossim_uint8>(0), data, theTile);
+         }
+         break;
+      }
+      case OSSIM_FLOAT: 
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         if(data->getDataObjectStatus() == OSSIM_FULL)
+         {
+            convolveFull(static_cast<float>(0), data, theTile);
+         }
+         else
+         {
+            convolvePartial(static_cast<float>(0), data, theTile);
+         }
+         break;
+      }
+      case OSSIM_USHORT16:
+      case OSSIM_USHORT11:
+      {
+         if(data->getDataObjectStatus() == OSSIM_FULL)
+         {
+            convolveFull(static_cast<ossim_uint16>(0), data, theTile);
+         }
+         else
+         {
+            convolvePartial(static_cast<ossim_uint16>(0), data, theTile);
+         }
+         break;
+      }
+      case OSSIM_SSHORT16:
+      {
+         if(data->getDataObjectStatus() == OSSIM_FULL)
+         {
+            convolveFull(static_cast<ossim_sint16>(0), data, theTile);
+         }
+         else
+         {
+            convolvePartial(static_cast<ossim_sint16>(0), data, theTile);
+         }
+         break;
+      }
+      case OSSIM_DOUBLE:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         if(data->getDataObjectStatus() == OSSIM_FULL)
+         {
+            convolveFull(static_cast<double>(0), data, theTile);
+      }
+      else
+      {
+         convolvePartial(static_cast<double>(0), data, theTile);
+      }
+         break;
+      }
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimConvolutionFilter1D::getTile WARNING:\n"
+            << "Scalar type = " << theTile->getScalarType()
+            << " Not supported by ossimConvolutionFilter1D" << endl;
+         break;
+      }
+   }
+   theTile->validate();
+   
+   return theTile;
+}
+
+
+template<class T> void ossimConvolutionFilter1D::convolvePartial(
+   T,
+   ossimRefPtr<ossimImageData> inputData,
+   ossimRefPtr<ossimImageData> outputData)
+{
+   // there may be NULL pixels in the input
+   ossim_int32 inputW = static_cast<ossim_int32>(inputData->getWidth());
+   ossim_uint32 outputW       = outputData->getWidth();
+   ossim_uint32 outputH       = outputData->getHeight();
+   ossim_uint32 numberOfBands = inputData->getNumberOfBands();
+   
+   ossim_uint32 klength=(ossim_uint32)theKernel.size(),k;
+   ossim_int32 incrK = theIsHz ? 1 : inputW; //kernel increment in input : one col or one row
+   ossim_int32 iRow  = inputW - outputW; //jump to go to next row
+
+   double sum=0.0;
+   T* iKP; //kernel covered input pointer
+
+   ossim_int32 iCo = incrK*theCenterOffset; //center  pixel offset within the input buffer
+
+   for(ossim_uint32 band = 0; band < numberOfBands; ++band)
+   {
+      T* inputBuf  = static_cast<T*>(inputData->getBuf(band));
+      T* outputBuf = static_cast<T*>(outputData->getBuf(band));
+      T maxPix     = static_cast<T>(getMaxPixelValue(band));
+      T minPix     = static_cast<T>(getMinPixelValue(band));
+      T nullPix    = static_cast<T>(inputData->getNullPix(band));
+      T oNullPix   = static_cast<T>(getNullPixelValue(band));
+      
+      if(inputBuf&&outputBuf)
+      {
+         for(ossim_uint32 row = 0; row < outputH; ++row)
+         {
+            for(ossim_uint32 col = 0; col < outputW; ++col)
+            {
+               //center pixel may not be NULL
+               if (inputBuf[iCo] != nullPix)
+               {
+                  iKP = inputBuf; 
+                  sum = 0.0;
+                  for(k=0;k<klength;++k)
+                  {
+                     if (*iKP != nullPix) //just sum on non-NULL pixels (potential normailzation issue)
+                     {
+                        sum += theKernel[k] * (double)(*iKP);                   
+                     } else if (theStrictNoData)
+                     {
+                        break;
+                     }                     
+                     iKP += incrK;
+                  }
+                  if (k==klength)
+                  {
+                     if(sum > maxPix)
+                     {
+                        *outputBuf = maxPix;
+                     }
+                     else if(sum < minPix)
+                     {
+                        *outputBuf = minPix;
+                     }
+                     else
+                     {
+                        *outputBuf = static_cast<T>(sum);
+                     }
+                  } else {
+                     //theStrictNoData
+                     *outputBuf = oNullPix;
+                  }
+               } else {
+                  *outputBuf = oNullPix;
+               }
+               // move curent center position
+               inputBuf  += 1;
+               outputBuf += 1;
+            }
+            //move current center position
+            inputBuf  += iRow;
+            //outputBuf += 0;
+         }
+      }
+   }
+    
+   
+}
+
+template<class T> void ossimConvolutionFilter1D::convolveFull(
+   T,
+   ossimRefPtr<ossimImageData> inputData,
+   ossimRefPtr<ossimImageData> outputData)
+{
+   //inputData must be displaced according to the Kernel size and theCenterOffset +isHz
+   ossim_int32 inputW = static_cast<ossim_int32>(inputData->getWidth());
+   ossim_uint32 outputW       = outputData->getWidth();
+   ossim_uint32 outputH       = outputData->getHeight();
+   ossim_uint32 numberOfBands = inputData->getNumberOfBands();
+   
+   ossim_uint32 klength=(ossim_uint32)theKernel.size(), k;
+   ossim_int32 incrK = theIsHz ? 1 : inputW; //kernel increment in input : one col or one row
+   ossim_int32 iRow  = inputW - outputW; //jump to go to next row
+
+   double sum=0.0;
+   T* iKP; //kernel covered input pointer
+
+   for(ossim_uint32 band = 0; band < numberOfBands; ++band)
+   {
+      T* inputBuf  = static_cast<T*>(inputData->getBuf(band));
+      T* outputBuf = static_cast<T*>(outputData->getBuf(band));
+      T maxPix     = static_cast<T>(getMaxPixelValue(band));
+      T minPix     = static_cast<T>(getMinPixelValue(band));
+      
+      if(inputBuf&&outputBuf)
+      {
+         for(ossim_uint32 row = 0; row < outputH; ++row)
+         {
+            for(ossim_uint32 col = 0; col < outputW; ++col)
+            {
+               sum = 0.0;
+               iKP = inputBuf;
+               for(k=0;k<klength;++k)
+               {
+                  sum += theKernel[k] * (double)(*iKP);
+                  iKP += incrK;
+               }
+               
+               if(sum > maxPix)
+               {
+                  *outputBuf = maxPix;
+               }
+               else if(sum < minPix)
+               {
+                  *outputBuf = minPix;
+               }
+               else
+               {
+                  *outputBuf = static_cast<T>(sum);
+               }
+               // move curent center position
+               inputBuf  += 1;
+               outputBuf += 1;
+            }
+            //move current center position
+            inputBuf  += iRow;
+            //outputBuf += 0;
+         }
+      }
+   }
+}
+
+void ossimConvolutionFilter1D::initialize()
+{
+   //---
+   // NOTE:
+   // Since initialize get called often sequentially we will wipe things slick
+   // but not reallocate to avoid multiple delete/allocates.
+   //
+   // On the first getTile call things will be reallocated/computed.
+   //---
+   theTile = NULL;
+   clearNullMinMax();
+}
+
+void ossimConvolutionFilter1D::allocate()
+{   
+   if(theInputConnection)
+   {
+      ossimImageDataFactory* idf = ossimImageDataFactory::instance();
+      
+      theTile = idf->create(this,
+                            this);
+      
+      theTile->initialize();
+   }
+}
+
+void ossimConvolutionFilter1D::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property) return;
+
+   if(property->getName() == PROPNAME_KERNEL)
+   {
+      ossimMatrixProperty* matrixProperty = PTR_CAST(ossimMatrixProperty,
+                                                     property.get());
+      if(matrixProperty)
+      {
+         ossim_uint32 nc=matrixProperty->getNumberOfCols();
+         theKernel.resize(nc);
+         for(ossim_uint32 i=0;i<nc;++i)
+         {
+             theKernel[i] = (*matrixProperty)(0,i);
+         }
+         clearNullMinMax();
+      }
+      else
+      {
+         ossimImageSourceFilter::setProperty(property);
+      }
+   } else if (property->getName() == PROPNAME_ISHZ)  {
+      ossimBooleanProperty* booleanProperty = PTR_CAST(ossimBooleanProperty,
+                                                     property.get());
+      if(booleanProperty)
+      {
+         theIsHz = booleanProperty->getBoolean();
+      }
+   } else if (property->getName() == PROPNAME_STRICTNODATA)  {
+      ossimBooleanProperty* booleanProperty = PTR_CAST(ossimBooleanProperty,
+                                                     property.get());
+      if(booleanProperty)
+      {
+         theStrictNoData = booleanProperty->getBoolean();
+      }
+   } else if (property->getName() == PROPNAME_CENTEROFFSET)  {
+      ossimNumericProperty* numProperty = PTR_CAST(ossimNumericProperty,
+                                                     property.get());
+      if(numProperty)
+      {
+         theCenterOffset = numProperty->asInt32();
+      }
+   } else if (property->getName() == PROPNAME_KERNELSIZE)  {
+      ossimNumericProperty* numProperty = PTR_CAST(ossimNumericProperty,
+                                                     property.get());
+      if(numProperty)
+      {
+         theKernel.resize(numProperty->asUInt32());
+         clearNullMinMax();
+      }
+   } else {
+      ossimImageSourceFilter::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimConvolutionFilter1D::getProperty(const ossimString& name)const
+{
+   if(name == PROPNAME_KERNEL)
+   {
+      ossimMatrixProperty* property = new ossimMatrixProperty(name);
+      property->resize(1,(int)theKernel.size());
+      for(ossim_uint32 i=0;i<theKernel.size();++i)
+      {
+        (*property)(0,i) = theKernel[i];
+      }
+      property->setCacheRefreshBit();
+      return property;
+   } else if (name==PROPNAME_ISHZ) {
+      ossimBooleanProperty* property = new ossimBooleanProperty(name,theIsHz);
+      property->setCacheRefreshBit();
+      return property;
+   } else if (name==PROPNAME_STRICTNODATA) {
+      ossimBooleanProperty* property = new ossimBooleanProperty(name,theStrictNoData);
+      property->setCacheRefreshBit();
+      return property;
+   } else if (name==PROPNAME_CENTEROFFSET) {
+      ossimNumericProperty* property = new ossimNumericProperty(name,ossimString::toString(theCenterOffset));
+      property->setNumericType(ossimNumericProperty::ossimNumericPropertyType_INT); //restrict to int type
+      property->setCacheRefreshBit();
+      return property;
+   } else if (name == PROPNAME_KERNELSIZE) {
+      ossimNumericProperty* property = new ossimNumericProperty(name,ossimString::toString((ossim_uint32)theKernel.size()),1.0,100.0);
+      property->setNumericType(ossimNumericProperty::ossimNumericPropertyType_INT); //restrict to int type
+      property->setCacheRefreshBit();
+      return property;
+   }
+   return ossimImageSourceFilter::getProperty(name);
+}
+
+void ossimConvolutionFilter1D::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageSourceFilter::getPropertyNames(propertyNames);
+   propertyNames.push_back(PROPNAME_KERNELSIZE);
+   propertyNames.push_back(PROPNAME_KERNEL);
+   propertyNames.push_back(PROPNAME_CENTEROFFSET);
+   propertyNames.push_back(PROPNAME_ISHZ);
+   propertyNames.push_back(PROPNAME_STRICTNODATA);
+}
+
+bool ossimConvolutionFilter1D::saveState(ossimKeywordlist& kwl,
+                                         const char* prefix)const
+{   
+   kwl.add(prefix,
+           PROPNAME_KERNELSIZE,
+           static_cast<ossim_uint32>(theKernel.size()),
+           true);
+   kwl.add(prefix,
+          PROPNAME_CENTEROFFSET,
+           theCenterOffset,
+           true);
+   kwl.add(prefix,
+          PROPNAME_ISHZ,
+           theIsHz?"true":"false", //use string instead of boolean
+           true);
+   kwl.add(prefix,
+          PROPNAME_STRICTNODATA,
+           theStrictNoData?"true":"false", //use string instead of boolean
+           true);
+
+   for(ossim_uint32 row = 0; row < theKernel.size(); ++row)
+   {
+         ossimString newPrefix = "k" + ossimString::toString(row);
+         kwl.add(prefix,
+                 newPrefix,
+                 theKernel[row],
+                 true);          
+   }
+   
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
+
+bool ossimConvolutionFilter1D::loadState(const ossimKeywordlist& kwl,
+                                          const char* prefix)
+{
+   //find kernel size
+   ossim_uint32 iks=0;
+   const char* ks = kwl.find(prefix, PROPNAME_KERNELSIZE);
+   if(ks)
+   {
+      iks = ossimString(ks).toUInt32();
+      if (iks<1)
+      {
+         cerr<<"ossimConvolutionFilter1D : warning bad "<< PROPNAME_KERNELSIZE <<" in state"<<endl;
+         iks=0;
+      }
+   } else {
+      iks=0;
+      cerr<<"ossimConvolutionFilter1D : warning no "<< PROPNAME_KERNELSIZE <<" in state"<<endl;
+   }
+
+   //load other props
+   const char* co = kwl.find(prefix, PROPNAME_CENTEROFFSET);
+   if(co)
+   {      
+      setCenterOffset(ossimString(co).toUInt32());
+   } else {
+      cerr<<"ossimConvolutionFilter1D : warning no "<< PROPNAME_CENTEROFFSET<<" in state"<<endl;
+   }
+   const char* ih = kwl.find(prefix, PROPNAME_ISHZ);
+   if(ih)
+   {      
+      setIsHorizontal(ossimString(ih).toBool());
+   } else {
+      cerr<<"ossimConvolutionFilter1D : warning no "<<PROPNAME_ISHZ<<" in state"<<endl;
+   }
+   const char* sn = kwl.find(prefix, PROPNAME_STRICTNODATA);
+   if(sn)
+   {      
+      setStrictNoData(ossimString(sn).toBool());
+   } else {
+      cerr<<"ossimConvolutionFilter1D : warning no "<<PROPNAME_STRICTNODATA<<" in state"<<endl;
+   }
+   //load kernel values
+   ossimString newPrefix = prefix;
+   newPrefix += ossimString("k");
+   theKernel.resize(iks);
+   for(ossim_uint32 r=0; r<iks; ++r)
+   {      
+      ossimString value = ossimString::toString(r);
+      
+      const char* v = kwl.find(newPrefix.c_str(),
+                               value.c_str());
+      if(v)
+      {
+         theKernel[r] = ossimString(v).toDouble();
+      } else {
+         cerr<<"ossimConvolutionFilter1D : warning no value for "<<newPrefix<<" in state"<<endl;
+         theKernel[r] = 0.0;
+      }
+   }
+   clearNullMinMax();
+   
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
+void ossimConvolutionFilter1D::setKernel(const std::vector<ossim_float64>& aKernel)
+{
+   theKernel = aKernel;
+   // Will be recomputed first getTile call.
+   clearNullMinMax();
+}
+
+double ossimConvolutionFilter1D::getNullPixelValue(ossim_uint32 band)const
+{
+   if( isSourceEnabled() && (band < theNullPixValue.size()) )
+   {
+      return theNullPixValue[band];
+   }
+
+   return ossim::defaultNull(getOutputScalarType());
+}
+
+double ossimConvolutionFilter1D::getMinPixelValue(ossim_uint32 band)const
+{
+   if( isSourceEnabled() && (band < theMinPixValue.size()) )
+   {
+      return theMinPixValue[band];
+   }
+   
+   return ossimImageSource::getMinPixelValue(band);
+}
+
+double ossimConvolutionFilter1D::getMaxPixelValue(ossim_uint32 band)const
+{
+   if( isSourceEnabled() && (band < theMaxPixValue.size()) )
+   {
+      return theMaxPixValue[band];
+   }
+
+   return ossimImageSource::getMaxPixelValue(band);
+}
+
+void ossimConvolutionFilter1D::clearNullMinMax()
+{
+   theNullPixValue.clear();
+   theMinPixValue.clear();
+   theMaxPixValue.clear();
+}
+
+void ossimConvolutionFilter1D::computeNullMinMax()
+{
+   const ossim_uint32 BANDS = getNumberOfOutputBands();
+
+   theNullPixValue.resize(BANDS);
+   theMinPixValue.resize(BANDS);
+   theMaxPixValue.resize(BANDS);
+
+   ossim_float64 defaultNull = ossim::defaultNull(getOutputScalarType());
+   ossim_float64 defaultMin = ossim::defaultMin(getOutputScalarType());
+   ossim_float64 defaultMax = ossim::defaultMax(getOutputScalarType());
+  
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      if(theInputConnection)
+      {
+         ossim_float64 inputNull = theInputConnection->getNullPixelValue(band);
+         ossim_float64 inputMin  = theInputConnection->getMinPixelValue(band);
+         ossim_float64 inputMax  = theInputConnection->getMaxPixelValue(band);
+         ossim_float64 tempMin   = 0.0;
+         ossim_float64 tempMax   = 0.0;
+         ossim_float64 k         = 0.0;
+         for(ossim_uint32 i=0;i<theKernel.size();++i)
+         {          
+               k=theKernel[i];
+               tempMin += (k<0.0) ? k*inputMax : k*inputMin;
+               tempMax += (k>0.0) ? k*inputMax : k*inputMin;          
+         }
+         
+         if((tempMin >= defaultMin) && (tempMin <= defaultMax))
+         {
+            theMinPixValue[band] = tempMin;
+         }
+         else
+         {
+            theMinPixValue[band] = defaultMin;
+         }
+
+         if((tempMax >= defaultMin) && (tempMax <= defaultMax))
+         {
+            theMaxPixValue[band] = tempMax;
+         }
+         else
+         {
+            theMaxPixValue[band] = defaultMax;
+         }
+         if((inputNull < theMinPixValue[band]) ||
+            (inputNull > theMaxPixValue[band]))
+         {
+            theNullPixValue[band] = inputNull;
+         }
+         else
+         {
+            theNullPixValue[band] = defaultNull;
+         }
+         
+      }
+      else // No input connection...
+      {
+         theNullPixValue[band] = defaultNull;
+         theMinPixValue[band]  = defaultMin;
+         theMaxPixValue[band]  = defaultMax;
+      }
+      
+   } // End of band loop.
+}
+
diff --git a/ossim/src/ossim/imaging/ossimConvolutionSource.cpp b/ossim/src/ossim/imaging/ossimConvolutionSource.cpp
new file mode 100644
index 0000000..3169678
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimConvolutionSource.cpp
@@ -0,0 +1,527 @@
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimConvolutionSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimConvolutionSource.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimDiscreteConvolutionKernel.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeyword.h>
+
+static const ossimKeyword NUMBER_OF_MATRICES = ossimKeyword("number_of_matrices", "");
+static const ossimKeyword NUMBER_OF_ROWS = ossimKeyword("rows", "");
+static const ossimKeyword NUMBER_OF_COLS = ossimKeyword("cols", "");
+
+RTTI_DEF1(ossimConvolutionSource, "ossimConvolutionSource", ossimImageSourceFilter);
+
+ossimConvolutionSource::ossimConvolutionSource()
+   : ossimImageSourceFilter(),
+     theTile(NULL)
+{
+}
+
+ossimConvolutionSource::ossimConvolutionSource(ossimImageSource* inputSource,
+                                               const NEWMAT::Matrix& convolutionMatrix)
+   : ossimImageSourceFilter(inputSource),
+     theTile(NULL)
+{
+   theConvolutionKernelList.push_back(new ossimDiscreteConvolutionKernel(convolutionMatrix));
+   setKernelInformation();
+   initialize();
+}
+
+ossimConvolutionSource::ossimConvolutionSource(ossimImageSource* inputSource,
+                                               const vector<NEWMAT::Matrix>& convolutionList)
+   : ossimImageSourceFilter(inputSource),
+     theTile(NULL)
+{
+   setConvolutionList(convolutionList);
+}
+
+ossimConvolutionSource::~ossimConvolutionSource()
+{
+   deleteConvolutionList();
+}
+
+void ossimConvolutionSource::setConvolution(const double* kernel,
+                                            int nrows,
+                                            int ncols,
+                                            bool doWeightedAverage)
+{
+   NEWMAT::Matrix m(nrows, ncols);
+   const double* tempPtr = kernel;
+   for(int row = 0; row < nrows; ++row)
+   {
+      for(int col = 0; col < ncols; ++col)
+      {
+         m[row][col] =*tempPtr;
+         ++tempPtr;
+      }
+   }
+   
+   setConvolution(m, doWeightedAverage);
+}
+
+void ossimConvolutionSource::setConvolutionList(const vector<NEWMAT::Matrix>& convolutionList,
+                                                bool doWeightedAverage)
+{
+   deleteConvolutionList();
+   ossim_uint32 idx;
+   for(idx = 0; idx < convolutionList.size(); ++idx)
+   {
+      theConvolutionKernelList.push_back(new ossimDiscreteConvolutionKernel(convolutionList[idx],
+                                                                            doWeightedAverage));
+   }
+
+   setKernelInformation();
+}
+
+ossimRefPtr<ossimImageData> ossimConvolutionSource::getTile(
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   if(!theInputConnection) return ossimRefPtr<ossimImageData>();
+
+   if((!isSourceEnabled())||
+      (theConvolutionKernelList.size() < 1))
+   {
+      return theInputConnection->getTile(tileRect, resLevel);
+   }
+   
+   if(!theTile.valid())
+   {
+      allocate();
+      if(!theTile.valid())  // Throw exception???
+      {
+         return theInputConnection->getTile(tileRect, resLevel);
+      }
+   }
+   
+   ossim_uint32 w  = tileRect.width();
+   ossim_uint32 h  = tileRect.height();
+   ossim_uint32 tw = theTile->getWidth();
+   ossim_uint32 th = theTile->getHeight();
+   theTile->setWidth(w);
+   theTile->setHeight(h);
+   if((w*h)!=(tw*th))
+   {
+      theTile->initialize();
+      theTile->makeBlank();
+   }
+   else
+   {
+      theTile->makeBlank();
+   }
+   theTile->setOrigin(tileRect.ul());
+   long offsetX = (theMaxKernelWidth)/2;
+   long offsetY = (theMaxKernelHeight)/2;
+   ossimIrect requestRect(tileRect.ul().x - offsetX,
+                          tileRect.ul().y - offsetY,
+                          tileRect.lr().x + offsetX,
+                          tileRect.lr().y + offsetY);
+   
+   ossimRefPtr<ossimImageData> input = theInputConnection->getTile(requestRect,
+                                                                   resLevel);
+
+   if(!input.valid() ||
+      (input->getDataObjectStatus() == OSSIM_NULL)||
+      (input->getDataObjectStatus() == OSSIM_EMPTY))
+   {
+      return input;
+   }
+   switch(theTile->getScalarType())
+   {
+   case OSSIM_UCHAR:
+   {
+      if(theConvolutionKernelList.size() == 1)
+      {
+         convolve(static_cast<ossim_uint8>(0),
+                  input,
+                  theConvolutionKernelList[0]);
+      }
+      else
+      {
+         ossim_uint32 upperBound = (ossim_uint32)theConvolutionKernelList.size();
+         ossim_uint32 idx;
+         for(idx = 0; idx < upperBound; ++idx)
+         {
+            convolve(static_cast<ossim_uint8>(0),
+                     input,
+                     theConvolutionKernelList[idx]);
+            input->loadTile(theTile.get());
+         }
+      }
+      break;
+   }
+   case OSSIM_USHORT16:
+   case OSSIM_USHORT11:
+   {
+      if(theConvolutionKernelList.size() == 1)
+      {
+         convolve(static_cast<ossim_uint16>(0),
+                  input,
+                  theConvolutionKernelList[0]);
+      }
+      else
+      {
+         ossim_uint32 upperBound = (ossim_uint32)theConvolutionKernelList.size();
+         ossim_uint32 idx;
+         for(idx = 0; idx < upperBound; ++idx)
+         {
+            convolve(static_cast<ossim_uint16>(0),
+                     input,
+                     theConvolutionKernelList[idx]);
+            input->loadTile(theTile.get());
+         }
+      }
+      break;
+   }
+   case OSSIM_SSHORT16:
+   {
+      if(theConvolutionKernelList.size() == 1)
+      {
+         convolve(static_cast<ossim_sint16>(0),
+                  input,
+                  theConvolutionKernelList[0]);
+      }
+      else
+      {
+         ossim_uint32 upperBound = (ossim_uint32)theConvolutionKernelList.size();
+         ossim_uint32 idx;
+         for(idx = 0; idx < upperBound; ++idx)
+         {
+            convolve(static_cast<ossim_sint16>(0),
+                     input,
+                     theConvolutionKernelList[idx]);
+            input->loadTile(theTile.get());
+         }
+      }
+      break;
+   }
+   case OSSIM_FLOAT:
+   case OSSIM_NORMALIZED_FLOAT:
+   {
+      if(theConvolutionKernelList.size() == 1)
+      {
+         convolve(static_cast<float>(0),
+                  input,
+                  theConvolutionKernelList[0]);
+      }
+      else
+      {
+         ossim_uint32 upperBound = (ossim_uint32)theConvolutionKernelList.size();
+         ossim_uint32 idx;
+         for(idx = 0; idx < upperBound; ++idx)
+         {
+            convolve(static_cast<float>(0),
+                     input,
+                     theConvolutionKernelList[idx]);
+            input->loadTile(theTile.get());
+         }
+      }
+      break;
+   }
+   case OSSIM_DOUBLE:
+   case OSSIM_NORMALIZED_DOUBLE:
+   {
+      if(theConvolutionKernelList.size() == 1)
+      {
+         convolve(static_cast<double>(0),
+                  input,
+                  theConvolutionKernelList[0]);
+      }
+      else
+      {
+         ossim_uint32 upperBound = (ossim_uint32)theConvolutionKernelList.size();
+         ossim_uint32 idx;
+         for(idx = 0; idx < upperBound; ++idx)
+         {
+            convolve(static_cast<double>(0),
+                     input,
+                     theConvolutionKernelList[idx]);
+            input->loadTile(theTile.get());
+         }
+      }
+      break;
+   }
+   default:
+   {
+      theTile->loadTile(input.get());
+   }
+   }
+   theTile->validate();
+   return theTile;
+}
+   
+template <class T>
+void ossimConvolutionSource::convolve(T /* dummyVariable */,
+                                      ossimRefPtr<ossimImageData> inputTile,
+                                      ossimDiscreteConvolutionKernel* kernel)
+{
+   ossimIpt startOrigin   = theTile->getOrigin();
+
+   // Make sure that the patch is not empty or NULL
+   //
+   ossimIpt startDelta(startOrigin.x - inputTile->getOrigin().x,
+                       startOrigin.y - inputTile->getOrigin().y);
+
+   ossimDataObjectStatus status = inputTile->getDataObjectStatus();
+   // let's setup some variables that we will need to do the
+   // convolution algorithm.
+   //
+   ossimIrect patchRect   = inputTile->getImageRectangle();
+   long tileHeight        = theTile->getHeight();
+   long tileWidth         = theTile->getWidth();
+   long outputBands       = theTile->getNumberOfBands();
+   long convolutionWidth  = kernel->getWidth();
+   long convolutionHeight = kernel->getHeight();
+   long convolutionOffsetX= convolutionWidth/2;
+   long convolutionOffsetY= convolutionHeight/2;
+   long patchWidth        = patchRect.width();
+   long convolutionTopLeftOffset = 0;
+   long convolutionCenterOffset  = 0;
+   
+   long outputOffset          = 0;
+   T np = 0;
+   
+   const double minPix  = ossim::defaultMin(getOutputScalarType());
+   const double maxPix  = ossim::defaultMax(getOutputScalarType());
+//   const double* maxPix  = inputTile->getMaxPix();
+   const double* nullPix = inputTile->getNullPix();
+   double convolveResult = 0;
+   
+   if(status == OSSIM_PARTIAL) // must check for NULLS
+   {
+      for(long y = 0; y <tileHeight; y++)
+      {
+         convolutionCenterOffset  = patchWidth*(startDelta.y + y) + startDelta.x;
+         convolutionTopLeftOffset = patchWidth*(startDelta.y + y - convolutionOffsetY) + startDelta.x-convolutionOffsetX;
+         
+         for(long x =0; x < tileWidth; x++)
+         {
+            if(!inputTile->isNull(convolutionCenterOffset))
+            {
+               for(long b = 0; b < outputBands; ++b)
+               {
+                  T* buf    = (T*)(inputTile->getBuf(b)) + convolutionTopLeftOffset;
+                  T* outBuf = (T*)(theTile->getBuf(b));
+                  kernel->convolveSubImage(buf,
+                                           patchWidth,
+                                           convolveResult,
+                                           (T)nullPix[b]);
+
+                  convolveResult = convolveResult < minPix? minPix:convolveResult;
+                  convolveResult = convolveResult > maxPix? maxPix:convolveResult;
+                  
+                  outBuf[outputOffset] = (T)convolveResult;
+               }
+            }
+            else
+            {
+               theTile->setNull(outputOffset);
+               
+            }
+            ++convolutionCenterOffset;
+            ++convolutionTopLeftOffset;
+            ++outputOffset;
+         }
+      }
+   }
+   else  // do not need to check for nulls here.
+   {
+      for(long b = 0; b < outputBands; ++b)
+      {                  
+         double convolveResult = 0;
+         const T* buf = (const T*)inputTile->getBuf(b);
+         T* outBuf    = (T*)(theTile->getBuf(b));
+         np =(T)nullPix[b];
+         outputOffset = 0;
+         
+         for(long y = 0; y <tileHeight; y++)
+         {
+            convolutionTopLeftOffset = patchWidth*(startDelta.y + y - convolutionOffsetY) + startDelta.x-convolutionOffsetX;
+            
+            for(long x =0; x < tileWidth; x++)
+            {
+               kernel->convolveSubImage(&buf[convolutionTopLeftOffset],
+                                        patchWidth,
+                                        convolveResult,
+                                        np);
+// NOT SURE IF I WANT TO CLAMP IN A CONVOLUTION SOURCE  
+// seems better to clamp to a scalar range instead of an input min max
+               convolveResult = convolveResult < minPix? (T)minPix:convolveResult;
+               convolveResult = convolveResult > maxPix?(T)maxPix:convolveResult;
+               outBuf[outputOffset] = (T)convolveResult;
+               ++outputOffset;
+               ++convolutionTopLeftOffset;
+            }
+         }
+      }
+   }
+}
+
+void ossimConvolutionSource::initialize()
+{
+   ossimImageSourceFilter::initialize();
+   theTile = NULL;
+}
+
+void ossimConvolutionSource::allocate()
+{
+   if(theInputConnection)
+   {
+      theTile = ossimImageDataFactory::instance()->create(this,
+                                                          theInputConnection);
+      theTile->initialize();
+   }
+}
+
+bool ossimConvolutionSource::saveState(ossimKeywordlist& kwl,
+                                       const char* prefix)const
+{
+   ossim_uint32 numberOfMatrices = 0;
+   for(ossim_uint32 m = 0; m < theConvolutionKernelList.size();++m)
+   {
+      if(theConvolutionKernelList[m])
+      {
+         ++numberOfMatrices;
+         const NEWMAT::Matrix& kernel = theConvolutionKernelList[m]->getKernel();
+         ossimString mPrefix = "m" +
+                               ossimString::toString(numberOfMatrices) +
+                               ".";
+         kwl.add(prefix,
+                 (mPrefix + "rows").c_str(),
+                 kernel.Nrows(),
+                 true);
+         
+         kwl.add(prefix,
+                 (mPrefix + "cols").c_str(),
+                 kernel.Ncols(),
+                 true);
+         
+         for(ossim_int32 row = 0; row < kernel.Nrows(); ++row)
+         {
+            for(ossim_int32 col =0; col < kernel.Ncols(); ++col)
+            {
+               ossimString newPrefix = mPrefix +
+                                       ossimString::toString(row+1) + "_" +
+                                       ossimString::toString(col+1);
+               kwl.add(prefix,
+                       newPrefix,
+                       kernel[row][col],
+                       true);          
+            }
+         }
+      }
+   }
+
+   
+   kwl.add(prefix,
+           NUMBER_OF_MATRICES,
+           numberOfMatrices,
+           true);
+      
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
+
+bool ossimConvolutionSource::loadState(const ossimKeywordlist& kwl,
+                                       const char* prefix)
+{
+   deleteConvolutionList();
+
+   const char* numberOfMatrices = kwl.find(prefix, NUMBER_OF_MATRICES);
+
+   ossim_int32 matrixCount = ossimString(numberOfMatrices).toLong();
+   ossim_int32 numberOfMatches = 0;
+   ossim_int32 index = 0;
+   while(numberOfMatches < matrixCount)
+   {
+      ossimString newPrefix = prefix;
+      newPrefix += ossimString("m");
+      newPrefix += ossimString::toString(index);
+      newPrefix += ossimString(".");
+
+      const char* rows = kwl.find((newPrefix+NUMBER_OF_ROWS.key()).c_str());
+      const char* cols = kwl.find((newPrefix+NUMBER_OF_COLS.key()).c_str());
+
+      if(rows&&cols)
+      {
+         ++numberOfMatches;
+         ossim_int32 numberOfRows = ossimString(rows).toLong();
+         ossim_int32 numberOfCols = ossimString(cols).toLong();
+         NEWMAT::Matrix convolutionMatrix(numberOfRows, numberOfCols);
+         
+         
+         for(ossim_int32 r = 1; r <= numberOfRows; r++)
+         {
+            for(ossim_int32 c = 1; c <= numberOfCols; c++)
+            {
+               convolutionMatrix[r-1][c-1] = 0.0;
+               
+               ossimString value = ossimString::toString(r);
+               value += "_";
+               value += ossimString::toString(c);
+
+               const char* v = kwl.find(newPrefix.c_str(),
+                                        value.c_str());
+               if(v)
+               {
+                  convolutionMatrix[r-1][c-1] = ossimString(v).toDouble();
+               }
+            }
+         }
+         theConvolutionKernelList.push_back(new ossimDiscreteConvolutionKernel(convolutionMatrix));
+      }
+      ++index;
+   }
+   setKernelInformation();
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
+void ossimConvolutionSource::setKernelInformation()
+{
+   ossim_uint32 index;
+   
+   if(theConvolutionKernelList.size() > 0)
+   {
+      theMaxKernelWidth  = theConvolutionKernelList[0]->getWidth();
+      theMaxKernelHeight = theConvolutionKernelList[0]->getHeight();
+      
+      for(index = 1; index < theConvolutionKernelList.size(); ++index)
+      {
+         ossim_int32 w = theConvolutionKernelList[index]->getWidth();
+         ossim_int32 h = theConvolutionKernelList[index]->getHeight();
+         theMaxKernelWidth  = theMaxKernelWidth < w?w:theMaxKernelWidth;
+         theMaxKernelHeight = theMaxKernelHeight < h?h:theMaxKernelHeight;
+      }
+   }
+}
+
+void ossimConvolutionSource::deleteConvolutionList()
+{
+   for(ossim_int32 index = 0; index < (ossim_int32)theConvolutionKernelList.size(); ++index)
+   {
+      delete theConvolutionKernelList[index];
+   }
+
+   theConvolutionKernelList.clear();
+}
+
+void ossimConvolutionSource::setConvolution(const NEWMAT::Matrix& convolutionMatrix, bool doWeightedAverage)
+{
+   std::vector<NEWMAT::Matrix> m;
+   
+   m.push_back(convolutionMatrix);
+   
+   setConvolutionList(m, doWeightedAverage);
+}
+
diff --git a/src/ossim/imaging/ossimDdffield.cpp b/ossim/src/ossim/imaging/ossimDdffield.cpp
similarity index 100%
rename from src/ossim/imaging/ossimDdffield.cpp
rename to ossim/src/ossim/imaging/ossimDdffield.cpp
diff --git a/ossim/src/ossim/imaging/ossimDdffielddefn.cpp b/ossim/src/ossim/imaging/ossimDdffielddefn.cpp
new file mode 100644
index 0000000..d77617f
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimDdffielddefn.cpp
@@ -0,0 +1,867 @@
+/******************************************************************************
+ * Copied from "gdal" project. See licence below.
+ *
+ * Project:  ISO 8211 Access
+ * Purpose:  Implements the DDFFieldDefn class.
+ * Author:   Frank Warmerdam, warmerdam at pobox.com
+ *
+ ******************************************************************************
+ * Copyright (c) 1999, Frank Warmerdam
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ * $Id: ossimDdffielddefn.cpp 23346 2015-05-29 13:13:12Z dburken $
+ */
+
+#include <cstring>
+#include <ossim/imaging/ossimIso8211.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimCplUtil.h>
+#include <ossim/base/ossimTrace.h>
+#include <ctype.h>
+
+// Static trace for debugging
+static ossimTrace traceDebug("ossimDDFFieldDefn:debug");
+
+
+/************************************************************************/
+/*                            DDFFieldDefn()                            */
+/************************************************************************/
+
+ossimDDFFieldDefn::ossimDDFFieldDefn()
+
+{
+    poModule = NULL;
+    pszTag = NULL;
+    _fieldName = NULL;
+    _arrayDescr = NULL;
+    _formatControls = NULL;
+    nSubfieldCount = 0;
+    papoSubfields = NULL;
+    bRepeatingSubfields = false;
+    nFixedWidth = 0;
+}
+
+/************************************************************************/
+/*                           ~DDFFieldDefn()                            */
+/************************************************************************/
+
+ossimDDFFieldDefn::~ossimDDFFieldDefn()
+
+{
+    int   i;
+
+    free( pszTag );
+    free( _fieldName );
+    free( _arrayDescr );
+    free( _formatControls );
+
+    for( i = 0; i < nSubfieldCount; i++ )
+        delete papoSubfields[i];
+    free( papoSubfields );
+}
+
+/************************************************************************/
+/*                            AddSubfield()                             */
+/************************************************************************/
+
+void ossimDDFFieldDefn::AddSubfield( const char *pszName, 
+                                const char *pszFormat )
+
+{
+    ossimDDFSubfieldDefn *poSFDefn = new ossimDDFSubfieldDefn;
+
+    poSFDefn->SetName( pszName );
+    poSFDefn->SetFormat( pszFormat );
+    AddSubfield( poSFDefn );
+}
+
+/************************************************************************/
+/*                            AddSubfield()                             */
+/************************************************************************/
+
+void ossimDDFFieldDefn::AddSubfield( ossimDDFSubfieldDefn *poNewSFDefn,
+                                int bDontAddToFormat )
+
+{
+    nSubfieldCount++;
+    papoSubfields = (ossimDDFSubfieldDefn ** )
+        realloc( papoSubfields, sizeof(void*) * nSubfieldCount );
+    papoSubfields[nSubfieldCount-1] = poNewSFDefn;
+    
+    if( bDontAddToFormat )
+        return;
+
+/* -------------------------------------------------------------------- */
+/*      Add this format to the format list.  We don't bother            */
+/*      aggregating formats here.                                       */
+/* -------------------------------------------------------------------- */
+    if( _formatControls == NULL || strlen(_formatControls) == 0 )
+    {
+        free( _formatControls );
+        _formatControls = strdup( "()" );
+    }
+    
+    int nOldLen = (int)strlen(_formatControls);
+    
+    char *pszNewFormatControls = (char *) 
+        malloc(nOldLen+3+strlen(poNewSFDefn->GetFormat()));
+    
+    strcpy( pszNewFormatControls, _formatControls );
+    pszNewFormatControls[nOldLen-1] = '\0';
+    if( pszNewFormatControls[nOldLen-2] != '(' )
+        strcat( pszNewFormatControls, "," );
+    
+    strcat( pszNewFormatControls, poNewSFDefn->GetFormat() );
+    strcat( pszNewFormatControls, ")" );
+    
+    free( _formatControls );
+    _formatControls = pszNewFormatControls;
+
+/* -------------------------------------------------------------------- */
+/*      Add the subfield name to the list.                              */
+/* -------------------------------------------------------------------- */
+    if( _arrayDescr == NULL )
+        _arrayDescr = strdup("");
+
+    _arrayDescr = (char *) 
+        realloc(_arrayDescr, 
+                   strlen(_arrayDescr)+strlen(poNewSFDefn->GetName())+2);
+    if( strlen(_arrayDescr) > 0 )
+        strcat( _arrayDescr, "!" );
+    strcat( _arrayDescr, poNewSFDefn->GetName() );
+}
+
+/************************************************************************/
+/*                               Create()                               */
+/*                                                                      */
+/*      Initialize a new field defn from application input, instead     */
+/*      of from an existing file.                                       */
+/************************************************************************/
+
+int ossimDDFFieldDefn::Create( const char *pszTag, const char *pszFieldName, 
+                          const char *pszDescription, 
+                          DDF_data_struct_code eDataStructCode,
+                          DDF_data_type_code   eDataTypeCode,
+                          const char *pszFormat )
+
+{
+   // assert( this->pszTag == NULL );
+   poModule = NULL;
+   this->pszTag = strdup( pszTag );
+   _fieldName = strdup( pszFieldName );
+   _arrayDescr = strdup( pszDescription );
+   _formatControls = strdup( "" );
+   
+   _data_struct_code = eDataStructCode;
+   _data_type_code = eDataTypeCode;
+   
+   if( pszFormat != NULL )
+      _formatControls = strdup( pszFormat );
+   
+   if( pszDescription != NULL && *pszDescription == '*' )
+      bRepeatingSubfields = true;
+   
+   return true;
+}
+
+/************************************************************************/
+/*                          GenerateDDREntry()                          */
+/************************************************************************/
+
+int ossimDDFFieldDefn::GenerateDDREntry( char **ppachData, 
+                                    int *pnLength )
+
+{
+    *pnLength = 9 + (int)strlen(_fieldName) + 1 
+        + (int)strlen(_arrayDescr) + 1
+        + (int)strlen(_formatControls) + 1;
+
+    if( strlen(_formatControls) == 0 )
+        *pnLength -= 1;
+
+    if( ppachData == NULL )
+        return true;
+
+    *ppachData = (char *) malloc( *pnLength+1 );
+    
+    if( _data_struct_code == dsc_elementary )
+        (*ppachData)[0] = '0';
+    else if( _data_struct_code == dsc_vector )
+        (*ppachData)[0] = '1';
+    else if( _data_struct_code == dsc_array )
+        (*ppachData)[0] = '2';
+    else if( _data_struct_code == dsc_concatenated )
+        (*ppachData)[0] = '3';
+    
+    if( _data_type_code == dtc_char_string )
+        (*ppachData)[1] = '0';
+    else if( _data_type_code == dtc_implicit_point )
+        (*ppachData)[1] = '1';
+    else if( _data_type_code == dtc_explicit_point )
+        (*ppachData)[1] = '2';
+    else if( _data_type_code == dtc_explicit_point_scaled )
+        (*ppachData)[1] = '3';
+    else if( _data_type_code == dtc_char_bit_string )
+        (*ppachData)[1] = '4';
+    else if( _data_type_code == dtc_bit_string )
+        (*ppachData)[1] = '5';
+    else if( _data_type_code == dtc_mixed_data_type )
+        (*ppachData)[1] = '6';
+
+    (*ppachData)[2] = '0';
+    (*ppachData)[3] = '0';
+    (*ppachData)[4] = ';';
+    (*ppachData)[5] = '&';
+    (*ppachData)[6] = ' ';
+    (*ppachData)[7] = ' ';
+    (*ppachData)[8] = ' ';
+    sprintf( *ppachData + 9, "%s%c%s", 
+             _fieldName, OSSIM_DDF_UNIT_TERMINATOR, _arrayDescr );
+
+    if( strlen(_formatControls) > 0 )
+        sprintf( *ppachData + strlen(*ppachData), "%c%s",
+                 OSSIM_DDF_UNIT_TERMINATOR, _formatControls );
+    sprintf( *ppachData + strlen(*ppachData), "%c", OSSIM_DDF_FIELD_TERMINATOR );
+
+    return true;
+}
+
+/************************************************************************/
+/*                             Initialize()                             */
+/*                                                                      */
+/*      Initialize the field definition from the information in the     */
+/*      DDR record.  This is called by DDFModule::Open().               */
+/************************************************************************/
+
+int ossimDDFFieldDefn::Initialize( ossimDDFModule * poModuleIn,
+                              const char * pszTagIn, 
+                              int nFieldEntrySize,
+                              const char * pachFieldArea )
+
+{
+    int         iFDOffset = poModuleIn->GetFieldControlLength();
+    int         nCharsConsumed;
+
+    poModule = poModuleIn;
+    
+    pszTag = strdup( pszTagIn );
+
+/* -------------------------------------------------------------------- */
+/*      Set the data struct and type codes.                             */
+/* -------------------------------------------------------------------- */
+    switch( pachFieldArea[0] )
+    {
+      case '0':
+        _data_struct_code = dsc_elementary;
+        break;
+
+      case '1':
+        _data_struct_code = dsc_vector;
+        break;
+
+      case '2':
+        _data_struct_code = dsc_array;
+        break;
+
+      case '3':
+        _data_struct_code = dsc_concatenated;
+        break;
+
+      default:
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "Unrecognised data_struct_code value %c.\n"
+               << "Field %s initialization incorrect.\n"
+               << pachFieldArea[0]
+               << pszTag
+               << std::endl;
+         }
+        _data_struct_code = dsc_elementary;
+    }
+
+    switch( pachFieldArea[1] )
+    {
+      case '0':
+        _data_type_code = dtc_char_string;
+        break;
+        
+      case '1':
+        _data_type_code = dtc_implicit_point;
+        break;
+        
+      case '2':
+        _data_type_code = dtc_explicit_point;
+        break;
+        
+      case '3':
+        _data_type_code = dtc_explicit_point_scaled;
+        break;
+        
+      case '4':
+        _data_type_code = dtc_char_bit_string;
+        break;
+        
+      case '5':
+        _data_type_code = dtc_bit_string;
+        break;
+        
+      case '6':
+        _data_type_code = dtc_mixed_data_type;
+        break;
+
+      default:
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "Unrecognised data_type_code value %c.\n"
+               << "Field %s initialization incorrect.\n"
+               << pachFieldArea[1] << pszTag << std::endl;
+         }
+        _data_type_code = dtc_char_string;
+    }
+    
+/* -------------------------------------------------------------------- */
+/*      Capture the field name, description (sub field names), and      */
+/*      format statements.                                              */
+/* -------------------------------------------------------------------- */
+
+    _fieldName =
+        ossimDDFFetchVariable( pachFieldArea + iFDOffset,
+                          nFieldEntrySize - iFDOffset,
+                          OSSIM_DDF_UNIT_TERMINATOR,
+                          OSSIM_DDF_FIELD_TERMINATOR,
+                          &nCharsConsumed );
+    iFDOffset += nCharsConsumed;
+    
+    _arrayDescr =
+        ossimDDFFetchVariable( pachFieldArea + iFDOffset,
+                               nFieldEntrySize - iFDOffset,
+                               OSSIM_DDF_UNIT_TERMINATOR,
+                               OSSIM_DDF_FIELD_TERMINATOR, 
+                               &nCharsConsumed );
+    iFDOffset += nCharsConsumed;
+    
+    _formatControls =
+        ossimDDFFetchVariable( pachFieldArea + iFDOffset,
+                               nFieldEntrySize - iFDOffset,
+                               OSSIM_DDF_UNIT_TERMINATOR,
+                               OSSIM_DDF_FIELD_TERMINATOR, 
+                               &nCharsConsumed );
+    
+/* -------------------------------------------------------------------- */
+/*      Parse the subfield info.                                        */
+/* -------------------------------------------------------------------- */
+    if( _data_struct_code != dsc_elementary )
+    {
+        if( !BuildSubfields() )
+            return false;
+
+        if( !ApplyFormats() )
+            return false;
+    }
+    
+    return true;
+}
+
+/************************************************************************/
+/*                                Dump()                                */
+/************************************************************************/
+
+/**
+ * Write out field definition info to debugging file.
+ *
+ * A variety of information about this field definition, and all it's
+ * subfields is written to the give debugging file handle.
+ *
+ * @param fp The standard io file handle to write to.  ie. stderr
+ */
+
+void ossimDDFFieldDefn::Dump( FILE * fp )
+
+{
+    const char  *pszValue = "";
+    
+    fprintf( fp, "  DDFFieldDefn:\n" );
+    fprintf( fp, "      Tag = `%s'\n", pszTag );
+    fprintf( fp, "      _fieldName = `%s'\n", _fieldName );
+    fprintf( fp, "      _arrayDescr = `%s'\n", _arrayDescr );
+    fprintf( fp, "      _formatControls = `%s'\n", _formatControls );
+
+    switch( _data_struct_code )
+    {
+      case dsc_elementary:
+        pszValue = "elementary";
+        break;
+        
+      case dsc_vector:
+        pszValue = "vector";
+        break;
+        
+      case dsc_array:
+        pszValue = "array";
+        break;
+        
+      case dsc_concatenated:
+        pszValue = "concatenated";
+        break;
+        
+      default:
+         // assert( false );
+        pszValue = "(unknown)";
+    }
+
+    fprintf( fp, "      _data_struct_code = %s\n", pszValue );
+
+    switch( _data_type_code )
+    {
+      case dtc_char_string:
+        pszValue = "char_string";
+        break;
+        
+      case dtc_implicit_point:
+        pszValue = "implicit_point";
+        break;
+        
+      case dtc_explicit_point:
+        pszValue = "explicit_point";
+        break;
+        
+      case dtc_explicit_point_scaled:
+        pszValue = "explicit_point_scaled";
+        break;
+        
+      case dtc_char_bit_string:
+        pszValue = "char_bit_string";
+        break;
+        
+      case dtc_bit_string:
+        pszValue = "bit_string";
+        break;
+        
+      case dtc_mixed_data_type:
+        pszValue = "mixed_data_type";
+        break;
+
+      default:
+         // assert( false );
+        pszValue = "(unknown)";
+        break;
+    }
+    
+    fprintf( fp, "      _data_type_code = %s\n", pszValue );
+
+    for( int i = 0; i < nSubfieldCount; i++ )
+        papoSubfields[i]->Dump( fp );
+}
+
+/************************************************************************/
+/*                           BuildSubfields()                           */
+/*                                                                      */
+/*      Based on the _arrayDescr build a set of subfields.              */
+/************************************************************************/
+
+int ossimDDFFieldDefn::BuildSubfields()
+
+{
+    char        **papszSubfieldNames;
+    const char  *pszSublist = _arrayDescr;
+
+    if( pszSublist[0] == '*' )
+    {
+        bRepeatingSubfields = true;
+        pszSublist++;
+    }
+
+    papszSubfieldNames = ossimCSLTokenizeStringComplex( pszSublist, "!",
+                                                   false, false );
+
+    int nSFCount = ossimCSLCount( papszSubfieldNames );
+    for( int iSF = 0; iSF < nSFCount; iSF++ )
+    {
+        ossimDDFSubfieldDefn *poSFDefn = new ossimDDFSubfieldDefn;
+        
+        poSFDefn->SetName( papszSubfieldNames[iSF] );
+        AddSubfield( poSFDefn, true );
+    }
+
+    ossimCSLDestroy( papszSubfieldNames );
+
+    return true;
+}
+
+/************************************************************************/
+/*                          ExtractSubstring()                          */
+/*                                                                      */
+/*      Extract a substring terminated by a comma (or end of            */
+/*      string).  Commas in brackets are ignored as terminated with     */
+/*      bracket nesting understood gracefully.  If the returned         */
+/*      string would being and end with a bracket then strip off the    */
+/*      brackets.                                                       */
+/*                                                                      */
+/*      Given a string like "(A,3(B,C),D),X,Y)" return "A,3(B,C),D".    */
+/*      Give a string like "3A,2C" return "3A".                         */
+/************************************************************************/
+
+char *ossimDDFFieldDefn::ExtractSubstring( const char * pszSrc )
+
+{
+    int         nBracket=0, i;
+    char        *pszReturn;
+
+    for( i = 0;
+         pszSrc[i] != '\0' && (nBracket > 0 || pszSrc[i] != ',');
+         i++ )
+    {
+        if( pszSrc[i] == '(' )
+            nBracket++;
+        else if( pszSrc[i] == ')' )
+            nBracket--;
+    }
+
+    if( pszSrc[0] == '(' )
+    {
+        pszReturn = strdup( pszSrc + 1 );
+        pszReturn[i-2] = '\0';
+    }
+    else
+    {
+        pszReturn = strdup( pszSrc  );
+        pszReturn[i] = '\0';
+    }
+
+    return pszReturn;
+}
+
+/************************************************************************/
+/*                            ExpandFormat()                            */
+/************************************************************************/
+
+char *ossimDDFFieldDefn::ExpandFormat( const char * pszSrc )
+
+{
+    int         nDestMax = 32;
+    char       *pszDest = (char *) malloc(nDestMax+1);
+    int         iSrc, iDst;
+    int         nRepeat = 0;
+
+    iSrc = 0;
+    iDst = 0;
+    pszDest[0] = '\0';
+
+    while( pszSrc[iSrc] != '\0' )
+    {
+        /* This is presumably an extra level of brackets around some
+           binary stuff related to rescaning which we don't care to do
+           (see 6.4.3.3 of the standard.  We just strip off the extra
+           layer of brackets */
+        if( (iSrc == 0 || pszSrc[iSrc-1] == ',') && pszSrc[iSrc] == '(' )
+        {
+            char       *pszContents = ExtractSubstring( pszSrc+iSrc );
+            char       *pszExpandedContents = ExpandFormat( pszContents );
+
+            if( (int) (strlen(pszExpandedContents) + strlen(pszDest) + 1)
+                > nDestMax )
+            {
+                nDestMax = 2 * ((int)strlen(pszExpandedContents) + (int)strlen(pszDest));
+                pszDest = (char *) realloc(pszDest,nDestMax+1);
+            }
+
+            strcat( pszDest, pszExpandedContents );
+            iDst = (int)strlen(pszDest);
+            
+            iSrc = iSrc + (int)strlen(pszContents) + 2;
+
+            free( pszContents );
+            free( pszExpandedContents );
+        }
+
+        /* this is a repeated subclause */
+        else if( (iSrc == 0 || pszSrc[iSrc-1] == ',')
+                 && isdigit(pszSrc[iSrc]) )
+        {
+            const char *pszNext;
+            nRepeat = atoi(pszSrc+iSrc);
+            
+            // skip over repeat count.
+            for( pszNext = pszSrc+iSrc; isdigit(*pszNext); pszNext++ )
+                iSrc++;
+
+            char       *pszContents = ExtractSubstring( pszNext );
+            char       *pszExpandedContents = ExpandFormat( pszContents );
+                
+            for( int i = 0; i < nRepeat; i++ )
+            {
+                if( (int) (strlen(pszExpandedContents) + strlen(pszDest) + 1)
+                    > nDestMax )
+                {
+                    nDestMax = 
+                        2 * ((int)strlen(pszExpandedContents) + (int)strlen(pszDest));
+                    pszDest = (char *) realloc(pszDest,nDestMax+1);
+                }
+
+                strcat( pszDest, pszExpandedContents );
+                if( i < nRepeat-1 )
+                    strcat( pszDest, "," );
+            }
+
+            iDst = (int)strlen(pszDest);
+            
+            if( pszNext[0] == '(' )
+                iSrc = iSrc + (int)strlen(pszContents) + 2;
+            else
+                iSrc = iSrc + (int)strlen(pszContents);
+
+            free( pszContents );
+            free( pszExpandedContents );
+        }
+        else
+        {
+            if( iDst+1 >= nDestMax )
+            {
+                nDestMax = 2 * iDst;
+                pszDest = (char *) realloc(pszDest,nDestMax);
+            }
+
+            pszDest[iDst++] = pszSrc[iSrc++];
+            pszDest[iDst] = '\0';
+        }
+    }
+
+    return pszDest;
+}
+                                 
+/************************************************************************/
+/*                            ApplyFormats()                            */
+/*                                                                      */
+/*      This method parses the format string partially, and then        */
+/*      applies a subfield format string to each subfield object.       */
+/*      It in turn does final parsing of the subfield formats.          */
+/************************************************************************/
+
+int ossimDDFFieldDefn::ApplyFormats()
+
+{
+    char        *pszFormatList;
+    char        **papszFormatItems;
+    
+/* -------------------------------------------------------------------- */
+/*      Verify that the format string is contained within brackets.     */
+/* -------------------------------------------------------------------- */
+    if( strlen(_formatControls) < 2
+        || _formatControls[0] != '('
+        || _formatControls[strlen(_formatControls)-1] != ')' )
+    {
+       ossimNotify(ossimNotifyLevel_WARN)
+          << "Format controls for `%s' field missing brackets:%s\n"
+          << pszTag << _formatControls << std::endl;
+        
+        return false;
+    }
+
+/* -------------------------------------------------------------------- */
+/*      Duplicate the string, and strip off the brackets.               */
+/* -------------------------------------------------------------------- */
+
+    pszFormatList = ExpandFormat( _formatControls );
+
+/* -------------------------------------------------------------------- */
+/*      Tokenize based on commas.                                       */
+/* -------------------------------------------------------------------- */
+    papszFormatItems =
+        ossimCSLTokenizeStringComplex(pszFormatList, ",", false, false );
+
+    free( pszFormatList );
+
+/* -------------------------------------------------------------------- */
+/*      Apply the format items to subfields.                            */
+/* -------------------------------------------------------------------- */
+    int iFormatItem;
+    
+    for( iFormatItem = 0;
+         papszFormatItems[iFormatItem] != NULL;
+         iFormatItem++ )
+    {
+        const char      *pszPastPrefix;
+
+        pszPastPrefix = papszFormatItems[iFormatItem];
+        while( *pszPastPrefix >= '0' && *pszPastPrefix <= '9' )
+            pszPastPrefix++;
+
+        ///////////////////////////////////////////////////////////////
+        // Did we get too many formats for the subfields created
+        // by names?  This may be legal by the 8211 specification, but
+        // isn't encountered in any formats we care about so we just
+        // blow.
+        
+        if( iFormatItem >= nSubfieldCount )
+        {
+           ossimNotify(ossimNotifyLevel_WARN)
+              << "Got more formats than subfields for field `%s'.\n"
+              << pszTag << std::endl;
+            break;
+        }
+        
+        if( !papoSubfields[iFormatItem]->SetFormat(pszPastPrefix) )
+            return false;
+    }
+
+/* -------------------------------------------------------------------- */
+/*      Verify that we got enough formats, cleanup and return.          */
+/* -------------------------------------------------------------------- */
+    ossimCSLDestroy( papszFormatItems );
+
+    if( iFormatItem < nSubfieldCount )
+    {
+       ossimNotify(ossimNotifyLevel_DEBUG)
+          << "Got less formats than subfields for field `%s',\n"
+          << pszTag << std::endl;
+        return false;
+    }
+
+/* -------------------------------------------------------------------- */
+/*      If all the fields are fixed width, then we are fixed width      */
+/*      too.  This is important for repeating fields.                   */
+/* -------------------------------------------------------------------- */
+    nFixedWidth = 0;
+    for( int i = 0; i < nSubfieldCount; i++ )
+    {
+        if( papoSubfields[i]->GetWidth() == 0 )
+        {
+            nFixedWidth = 0;
+            break;
+        }
+        else
+            nFixedWidth += papoSubfields[i]->GetWidth();
+    }
+
+    return true;
+}
+
+/************************************************************************/
+/*                          FindSubfieldDefn()                          */
+/************************************************************************/
+
+/**
+ * Find a subfield definition by it's mnemonic tag.  
+ *
+ * @param pszMnemonic The name of the field.
+ *
+ * @return The subfield pointer, or NULL if there isn't any such subfield.
+ */
+ 
+
+ossimDDFSubfieldDefn *ossimDDFFieldDefn::FindSubfieldDefn( const char * pszMnemonic )
+
+{
+    for( int i = 0; i < nSubfieldCount; i++ )
+    {
+       ossimString s = papoSubfields[i]->GetName();
+       if( s == pszMnemonic )
+            return papoSubfields[i];
+    }
+
+    return NULL;
+}
+
+/************************************************************************/
+/*                            GetSubfield()                             */
+/*                                                                      */
+/*      Fetch a subfield by it's index.                                 */
+/************************************************************************/
+
+/**
+ * Fetch a subfield by index.
+ *
+ * @param i The index subfield index. (Between 0 and GetSubfieldCount()-1)
+ *
+ * @return The subfield pointer, or NULL if the index is out of range.
+ */
+
+ossimDDFSubfieldDefn *ossimDDFFieldDefn::GetSubfield( int i )
+
+{
+    if( i < 0 || i >= nSubfieldCount )
+    {
+       // assert( false );
+       return NULL;
+    }
+             
+    return papoSubfields[i];
+}
+
+/************************************************************************/
+/*                          GetDefaultValue()                           */
+/************************************************************************/
+
+/**
+ * Return default data for field instance.
+ */
+
+char *ossimDDFFieldDefn::GetDefaultValue( int *pnSize )
+
+{                                                                       
+/* -------------------------------------------------------------------- */
+/*      Loop once collecting the sum of the subfield lengths.           */
+/* -------------------------------------------------------------------- */
+    int iSubfield;
+    int nTotalSize = 0;
+
+    for( iSubfield = 0; iSubfield < nSubfieldCount; iSubfield++ )
+    {
+        int nSubfieldSize;
+
+        if( !papoSubfields[iSubfield]->GetDefaultValue( NULL, 0, 
+                                                        &nSubfieldSize ) )
+            return NULL;
+        nTotalSize += nSubfieldSize;
+    }
+
+/* -------------------------------------------------------------------- */
+/*      Allocate buffer.                                                */
+/* -------------------------------------------------------------------- */
+    char *pachData = (char *) malloc( nTotalSize );
+
+    if( pnSize != NULL )
+        *pnSize = nTotalSize;
+
+/* -------------------------------------------------------------------- */
+/*      Loop again, collecting actual default values.                   */
+/* -------------------------------------------------------------------- */
+    int nOffset = 0;
+    for( iSubfield = 0; iSubfield < nSubfieldCount; iSubfield++ )
+    {
+        int nSubfieldSize;
+
+        if( !papoSubfields[iSubfield]->GetDefaultValue( 
+                pachData + nOffset, nTotalSize - nOffset, &nSubfieldSize ) )
+        {
+           // assert( false );
+           free( pachData );
+           return NULL;
+        }
+
+        nOffset += nSubfieldSize;
+    }
+
+    // assert( nOffset == nTotalSize );
+
+    return pachData;
+}
diff --git a/src/ossim/imaging/ossimDdfmodule.cpp b/ossim/src/ossim/imaging/ossimDdfmodule.cpp
similarity index 100%
rename from src/ossim/imaging/ossimDdfmodule.cpp
rename to ossim/src/ossim/imaging/ossimDdfmodule.cpp
diff --git a/src/ossim/imaging/ossimDdfrecord.cpp b/ossim/src/ossim/imaging/ossimDdfrecord.cpp
similarity index 100%
rename from src/ossim/imaging/ossimDdfrecord.cpp
rename to ossim/src/ossim/imaging/ossimDdfrecord.cpp
diff --git a/ossim/src/ossim/imaging/ossimDdfsubfielddefn.cpp b/ossim/src/ossim/imaging/ossimDdfsubfielddefn.cpp
new file mode 100644
index 0000000..36c7be2
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimDdfsubfielddefn.cpp
@@ -0,0 +1,997 @@
+/******************************************************************************
+ * Copied from "gdal" project. See licence below.
+ *
+ * Project:  ISO 8211 Access
+ * Purpose:  Implements the DDFSubfieldDefn class.
+ * Author:   Frank Warmerdam, warmerda at home.com
+ *
+ ******************************************************************************
+ * Copyright (c) 1999, Frank Warmerdam
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ******************************************************************************
+ * $Id: ossimDdfsubfielddefn.cpp 23245 2015-04-08 20:53:04Z rashadkm $
+ */
+
+#include <cstring>
+#include <ossim/imaging/ossimIso8211.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimCommon.h>
+
+/************************************************************************/
+/*                          DDFSubfieldDefn()                           */
+/************************************************************************/
+
+ossimDDFSubfieldDefn::ossimDDFSubfieldDefn()
+
+{
+    pszName = NULL;
+    
+    bIsVariable = true;
+    nFormatWidth = 0;
+    chFormatDelimeter = OSSIM_DDF_UNIT_TERMINATOR;
+    eBinaryFormat = NotBinary;
+    eType = DDFString;
+    
+    pszFormatString = strdup("");
+
+    nMaxBufChars = 0;
+    pachBuffer = NULL;
+}
+
+/************************************************************************/
+/*                          ~DDFSubfieldDefn()                          */
+/************************************************************************/
+
+ossimDDFSubfieldDefn::~ossimDDFSubfieldDefn()
+
+{
+    free( pszName );
+    free( pszFormatString );
+    free( pachBuffer );
+}
+
+/************************************************************************/
+/*                              SetName()                               */
+/************************************************************************/
+
+void ossimDDFSubfieldDefn::SetName( const char * pszNewName )
+
+{
+    int         i;
+    
+    free( pszName );
+
+    pszName = strdup( pszNewName );
+
+    for( i = (int)strlen(pszName)-1; i > 0 && pszName[i] == ' '; i-- )
+        pszName[i] = '\0';
+}
+
+/************************************************************************/
+/*                             SetFormat()                              */
+/*                                                                      */
+/*      While interpreting the format string we don't support:          */
+/*                                                                      */
+/*       o Passing an explicit terminator for variable length field.    */
+/*       o 'X' for unused data ... this should really be filtered       */
+/*         out by DDFFieldDefn::ApplyFormats(), but isn't.              */
+/*       o 'B' bitstrings that aren't a multiple of eight.              */
+/************************************************************************/
+
+int ossimDDFSubfieldDefn::SetFormat( const char * pszFormat )
+
+{
+    free( pszFormatString );
+    pszFormatString = strdup( pszFormat );
+
+/* -------------------------------------------------------------------- */
+/*      These values will likely be used.                               */
+/* -------------------------------------------------------------------- */
+    if( pszFormatString[1] == '(' )
+    {
+        nFormatWidth = atoi(pszFormatString+2);
+        bIsVariable = nFormatWidth == 0;
+    }
+    else
+        bIsVariable = true;
+    
+/* -------------------------------------------------------------------- */
+/*      Interpret the format string.                                    */
+/* -------------------------------------------------------------------- */
+    switch( pszFormatString[0] )
+    {
+      case 'A':
+      case 'C':         // It isn't clear to me how this is different than 'A'
+        eType = DDFString;
+        break;
+
+      case 'R':
+        eType = DDFFloat;
+        break;
+        
+      case 'I':
+      case 'S':
+        eType = DDFInt;
+        break;
+
+      case 'B':
+      case 'b':
+        // Is the width expressed in bits? (is it a bitstring)
+        bIsVariable = false;
+        if( pszFormatString[1] == '(' )
+        {
+           // CPLAssert( atoi(pszFormatString+2) % 8 == 0 );
+            
+            nFormatWidth = atoi(pszFormatString+2) / 8;
+            eBinaryFormat = SInt; // good default, works for SDTS.
+
+            if( nFormatWidth < 5 )
+                eType = DDFInt;
+            else
+                eType = DDFBinaryString;
+        }
+        
+        // or do we have a binary type indicator? (is it binary)
+        else
+        {
+            eBinaryFormat = (DDFBinaryFormat) (pszFormatString[1] - '0');
+            nFormatWidth = atoi(pszFormatString+2);
+
+            if( eBinaryFormat == SInt || eBinaryFormat == UInt )
+                eType = DDFInt;
+            else
+                eType = DDFFloat;
+        }
+        break;
+
+      case 'X':
+        // 'X' is extra space, and shouldn't be directly assigned to a
+        // subfield ... I haven't encountered it in use yet though.
+        ossimNotify(ossimNotifyLevel_WARN)
+           << "Format type of `%c' not supported.\n"
+           << pszFormatString[0] << std::endl;
+        
+        // CPLAssert( false );
+        return false;
+        
+      default:
+        ossimNotify(ossimNotifyLevel_WARN)
+           << "Format type of `%c' not recognised.\n"
+           << pszFormatString[0] << std::endl;
+        
+        // CPLAssert( false );
+        return false;
+    }
+    
+    return true;
+}
+
+/************************************************************************/
+/*                                Dump()                                */
+/************************************************************************/
+
+/**
+ * Write out subfield definition info to debugging file.
+ *
+ * A variety of information about this field definition is written to the
+ * give debugging file handle.
+ *
+ * @param fp The standard io file handle to write to.  ie. stderr
+ */
+
+void ossimDDFSubfieldDefn::Dump( FILE * fp )
+
+{
+    fprintf( fp, "    DDFSubfieldDefn:\n" );
+    fprintf( fp, "        Label = `%s'\n", pszName );
+    fprintf( fp, "        FormatString = `%s'\n", pszFormatString );
+}
+
+/************************************************************************/
+/*                           GetDataLength()                            */
+/*                                                                      */
+/*      This method will scan for the end of a variable field.          */
+/************************************************************************/
+
+/**
+ * Scan for the end of variable length data.  Given a pointer to the data
+ * for this subfield (from within a DDFRecord) this method will return the
+ * number of bytes which are data for this subfield.  The number of bytes
+ * consumed as part of this field can also be fetched.  This number may
+ * be one longer than the length if there is a terminator character
+ * used.<p>
+ *
+ * This method is mainly for internal use, or for applications which
+ * want the raw binary data to interpret themselves.  Otherwise use one
+ * of ExtractStringData(), ExtractIntData() or ExtractFloatData().
+ *
+ * @param pachSourceData The pointer to the raw data for this field.  This
+ * may have come from DDFRecord::GetData(), taking into account skip factors
+ * over previous subfields data.
+ * @param nMaxBytes The maximum number of bytes that are accessable after
+ * pachSourceData.
+ * @param pnConsumedBytes Pointer to an integer into which the number of
+ * bytes consumed by this field should be written.  May be NULL to ignore.
+ *
+ * @return The number of bytes at pachSourceData which are actual data for
+ * this record (not including unit, or field terminator).  
+ */
+
+int ossimDDFSubfieldDefn::GetDataLength( const char * pachSourceData,
+                                    int nMaxBytes, int * pnConsumedBytes )
+
+{
+    if( !bIsVariable )
+    {
+        if( nFormatWidth > nMaxBytes )
+        {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "Only %d bytes available for subfield %s with\n"
+               << "format string %s ... returning shortened data."
+               << nMaxBytes << pszName << pszFormatString << std::endl;
+
+            if( pnConsumedBytes != NULL )
+                *pnConsumedBytes = nMaxBytes;
+
+            return nMaxBytes;
+        }
+        else
+        {
+            if( pnConsumedBytes != NULL )
+                *pnConsumedBytes = nFormatWidth;
+
+            return nFormatWidth;
+        }
+    }
+    else
+    {
+        int     nLength = 0;
+        int     bCheckFieldTerminator = true;
+
+        /* We only check for the field terminator because of some buggy 
+         * datasets with missing format terminators.  However, we have found
+         * the field terminator is a legal character within the fields of
+         * some extended datasets (such as JP34NC94.000).  So we don't check
+         * for the field terminator if the field appears to be multi-byte
+         * which we established by the first character being out of the 
+         * ASCII printable range (32-127). 
+         */
+
+        if( pachSourceData[0] < 32 || pachSourceData[0] >= 127 )
+            bCheckFieldTerminator = false;
+        
+        while( nLength < nMaxBytes
+               && pachSourceData[nLength] != chFormatDelimeter )
+        {
+            if( bCheckFieldTerminator 
+                && pachSourceData[nLength] == OSSIM_DDF_FIELD_TERMINATOR )
+                break;
+
+            nLength++;
+        }
+
+        if( pnConsumedBytes != NULL )
+        {
+            if( nMaxBytes == 0 )
+                *pnConsumedBytes = nLength;
+            else
+                *pnConsumedBytes = nLength+1;
+        }
+        
+        return nLength;
+    }
+}
+
+/************************************************************************/
+/*                         ExtractStringData()                          */
+/************************************************************************/
+
+/**
+ * Extract a zero terminated string containing the data for this subfield.
+ * Given a pointer to the data
+ * for this subfield (from within a DDFRecord) this method will return the
+ * data for this subfield.  The number of bytes
+ * consumed as part of this field can also be fetched.  This number may
+ * be one longer than the string length if there is a terminator character
+ * used.<p>
+ *
+ * This function will return the raw binary data of a subfield for
+ * types other than DDFString, including data past zero chars.  This is
+ * the standard way of extracting DDFBinaryString subfields for instance.<p>
+ *
+ * @param pachSourceData The pointer to the raw data for this field.  This
+ * may have come from DDFRecord::GetData(), taking into account skip factors
+ * over previous subfields data.
+ * @param nMaxBytes The maximum number of bytes that are accessable after
+ * pachSourceData.
+ * @param pnConsumedBytes Pointer to an integer into which the number of
+ * bytes consumed by this field should be written.  May be NULL to ignore.
+ * This is used as a skip factor to increment pachSourceData to point to the
+ * next subfields data.
+ *
+ * @return A pointer to a buffer containing the data for this field.  The
+ * returned pointer is to an internal buffer which is invalidated on the
+ * next ExtractStringData() call on this DDFSubfieldDefn().  It should not
+ * be freed by the application.
+ *
+ * @see ExtractIntData(), ExtractFloatData()
+ */
+
+const char *
+ossimDDFSubfieldDefn::ExtractStringData( const char * pachSourceData,
+                                    int nMaxBytes, int * pnConsumedBytes )
+
+{
+    int         nLength = GetDataLength( pachSourceData, nMaxBytes,
+                                         pnConsumedBytes );
+
+/* -------------------------------------------------------------------- */
+/*      Do we need to grow the buffer.                                  */
+/* -------------------------------------------------------------------- */
+    if( nMaxBufChars < nLength+1 )
+    {
+        free( pachBuffer );
+        
+        nMaxBufChars = nLength+1;
+        pachBuffer = (char *) malloc(nMaxBufChars);
+    }
+
+/* -------------------------------------------------------------------- */
+/*      Copy the data to the buffer.  We use memcpy() so that it        */
+/*      will work for binary data.                                      */
+/* -------------------------------------------------------------------- */
+    memcpy( pachBuffer, pachSourceData, nLength );
+    pachBuffer[nLength] = '\0';
+
+    return pachBuffer;
+}
+
+/************************************************************************/
+/*                          ExtractFloatData()                          */
+/************************************************************************/
+
+/**
+ * Extract a subfield value as a float.  Given a pointer to the data
+ * for this subfield (from within a DDFRecord) this method will return the
+ * floating point data for this subfield.  The number of bytes
+ * consumed as part of this field can also be fetched.  This method may be
+ * called for any type of subfield, and will return zero if the subfield is
+ * not numeric.
+ *
+ * @param pachSourceData The pointer to the raw data for this field.  This
+ * may have come from DDFRecord::GetData(), taking into account skip factors
+ * over previous subfields data.
+ * @param nMaxBytes The maximum number of bytes that are accessable after
+ * pachSourceData.
+ * @param pnConsumedBytes Pointer to an integer into which the number of
+ * bytes consumed by this field should be written.  May be NULL to ignore.
+ * This is used as a skip factor to increment pachSourceData to point to the
+ * next subfields data.
+ *
+ * @return The subfield's numeric value (or zero if it isn't numeric).
+ *
+ * @see ExtractIntData(), ExtractStringData()
+ */
+
+double
+ossimDDFSubfieldDefn::ExtractFloatData( const char * pachSourceData,
+                                   int nMaxBytes, int * pnConsumedBytes )
+
+{
+    switch( pszFormatString[0] )
+    {
+      case 'A':
+      case 'I':
+      case 'R':
+      case 'S':
+      case 'C':
+        return atof(ExtractStringData(pachSourceData, nMaxBytes,
+                                      pnConsumedBytes));
+
+      case 'B':
+      case 'b':
+      {
+          unsigned char   abyData[8];
+
+          // CPLAssert( nFormatWidth <= nMaxBytes );
+          if( pnConsumedBytes != NULL )
+              *pnConsumedBytes = nFormatWidth;
+
+          // Byte swap the data if it isn't in machine native format.
+          // In any event we copy it into our buffer to ensure it is
+          // word aligned.
+#ifdef CPL_LSB
+          if( pszFormatString[0] == 'B' )
+#else            
+              if( pszFormatString[0] == 'b' )
+#endif            
+              {
+                  for( int i = 0; i < nFormatWidth; i++ )
+                      abyData[nFormatWidth-i-1] = pachSourceData[i];
+              }
+              else
+              {
+                  memcpy( abyData, pachSourceData, nFormatWidth );
+              }
+
+          // Interpret the bytes of data.
+          switch( eBinaryFormat )
+          {
+             case UInt:
+                if( nFormatWidth == 1 )
+                {
+                   return( abyData[0] );
+                }
+                else if( nFormatWidth == 2 )
+                {
+                   ossim_uint16* ptr = (ossim_uint16*) abyData;
+                   return *ptr;
+                }
+                else if( nFormatWidth == 4 )
+                {
+                   ossim_uint32* ptr = (ossim_uint32*) abyData;
+                   return *ptr;
+                }
+                else
+                {
+                   // CPLAssert( false );
+                   return 0.0;
+                }
+                
+             case SInt:
+                if( nFormatWidth == 1 )
+                {
+                   signed char* ptr = (signed char*) abyData;
+                   return *ptr;
+                }
+                else if( nFormatWidth == 2 )
+                {
+                   ossim_int16* ptr = (ossim_int16*) abyData;
+                   return *ptr;
+                }
+                else if( nFormatWidth == 4 )
+                {
+                   ossim_int32* ptr = (ossim_int32*) abyData;
+                   return *ptr;
+                }
+                else
+                {
+                   // CPLAssert( false );
+                   return 0.0;
+                }
+            
+             case FloatReal:
+                if( nFormatWidth == 4 )
+                {
+                   float* ptr = (float*) abyData;
+                   return *ptr;
+                }
+                else if( nFormatWidth == 8 )
+                {
+                   double* ptr = (double*) abyData;
+                   return *ptr;
+                }
+                else
+                {
+                   // CPLAssert( false );
+                   return 0.0;
+                }
+                
+             case NotBinary:            
+             case FPReal:
+             case FloatComplex:
+                // CPLAssert( false );
+                return 0.0;
+          }
+          break;
+          // end of 'b'/'B' case.
+      }
+
+      default:
+        // CPLAssert( false );
+        return 0.0;
+    }
+
+    // CPLAssert( false );
+    return 0.0;
+}
+
+/************************************************************************/
+/*                           ExtractIntData()                           */
+/************************************************************************/
+
+/**
+ * Extract a subfield value as an integer.  Given a pointer to the data
+ * for this subfield (from within a DDFRecord) this method will return the
+ * int data for this subfield.  The number of bytes
+ * consumed as part of this field can also be fetched.  This method may be
+ * called for any type of subfield, and will return zero if the subfield is
+ * not numeric.
+ *
+ * @param pachSourceData The pointer to the raw data for this field.  This
+ * may have come from DDFRecord::GetData(), taking into account skip factors
+ * over previous subfields data.
+ * @param nMaxBytes The maximum number of bytes that are accessable after
+ * pachSourceData.
+ * @param pnConsumedBytes Pointer to an integer into which the number of
+ * bytes consumed by this field should be written.  May be NULL to ignore.
+ * This is used as a skip factor to increment pachSourceData to point to the
+ * next subfields data.
+ *
+ * @return The subfield's numeric value (or zero if it isn't numeric).
+ *
+ * @see ExtractFloatData(), ExtractStringData()
+ */
+
+int
+ossimDDFSubfieldDefn::ExtractIntData( const char * pachSourceData,
+                                 int nMaxBytes, int * pnConsumedBytes )
+
+{
+    switch( pszFormatString[0] )
+    {
+      case 'A':
+      case 'I':
+      case 'R':
+      case 'S':
+      case 'C':
+        return atoi(ExtractStringData(pachSourceData, nMaxBytes,
+                                      pnConsumedBytes));
+
+      case 'B':
+      case 'b':
+      {
+          unsigned char   abyData[8];
+
+          if( nFormatWidth > nMaxBytes )
+          {
+              ossimNotify(ossimNotifyLevel_WARN)
+                 << "Attempt to extract int subfield %s with format %s\n"
+                 << "failed as only %d bytes available.  Using zero."
+                 << pszName << pszFormatString << nMaxBytes << std::endl;
+              return 0;
+          }
+
+          if( pnConsumedBytes != NULL )
+              *pnConsumedBytes = nFormatWidth;
+
+          // Byte swap the data if it isn't in machine native format.
+          // In any event we copy it into our buffer to ensure it is
+          // word aligned.
+#ifdef CPL_LSB
+          if( pszFormatString[0] == 'B' )
+#else            
+              if( pszFormatString[0] == 'b' )
+#endif            
+              {
+                  for( int i = 0; i < nFormatWidth; i++ )
+                      abyData[nFormatWidth-i-1] = pachSourceData[i];
+              }
+              else
+              {
+                  memcpy( abyData, pachSourceData, nFormatWidth );
+              }
+
+          // Interpret the bytes of data.
+          switch( eBinaryFormat )
+          {
+            case UInt:
+              if( nFormatWidth == 4 )
+              {
+                 ossim_uint32* ptr = (ossim_uint32*) abyData;
+                 return *ptr;
+              }
+              else if( nFormatWidth == 1 )
+              {
+                 return( abyData[0] );
+              }
+              else if( nFormatWidth == 2 )
+              {
+                 ossim_uint16* ptr = (ossim_uint16*)abyData;
+                 return *ptr;
+              }
+              else
+              {
+                 // CPLAssert( false );
+                 return 0;
+              }
+              
+             case SInt:
+                if( nFormatWidth == 4 )
+                {
+                   ossim_int32* ptr = (ossim_int32 *) abyData;
+                   return *ptr;
+                }
+                else if( nFormatWidth == 1 )
+                {
+                   signed char* ptr = (signed char *) abyData;
+                   return *ptr;
+                }
+                else if( nFormatWidth == 2 )
+                {
+                   ossim_int16* ptr = (ossim_int16 *) abyData;
+                   return *ptr;
+                }
+                else
+                {
+                   // CPLAssert( false );
+                   return 0;
+                }
+                
+             case FloatReal:
+                if( nFormatWidth == 4 )
+                {
+                   float* ptr = (float *) abyData;
+                   return (int) *ptr;
+                }
+                else if( nFormatWidth == 8 )
+                {
+                   double* ptr = (double *) abyData;
+                   return (int) *ptr;
+                }
+                else
+                {
+                   // CPLAssert( false );
+                   return 0;
+                }
+
+             case NotBinary:            
+             case FPReal:
+             case FloatComplex:
+                // CPLAssert( false );
+                return 0;
+          }
+          break;
+          // end of 'b'/'B' case.
+      }
+      
+       default:
+          // CPLAssert( false );
+          return 0;
+    }
+    
+    // CPLAssert( false );
+    return 0;
+}
+
+/************************************************************************/
+/*                              DumpData()                              */
+/*                                                                      */
+/*      Dump the instance data for this subfield from a data            */
+/*      record.  This fits into the output dump stream of a DDFField.   */
+/************************************************************************/
+
+/**
+ * Dump subfield value to debugging file.
+ *
+ * @param pachData Pointer to data for this subfield.
+ * @param nMaxBytes Maximum number of bytes available in pachData.
+ * @param fp File to write report to.
+ */
+
+void ossimDDFSubfieldDefn::DumpData( const char * pachData, int nMaxBytes,
+                                FILE * fp )
+
+{
+    if( eType == DDFFloat )
+        fprintf( fp, "      Subfield `%s' = %f\n",
+                 pszName,
+                 ExtractFloatData( pachData, nMaxBytes, NULL ) );
+    else if( eType == DDFInt )
+        fprintf( fp, "      Subfield `%s' = %d\n",
+                 pszName,
+                 ExtractIntData( pachData, nMaxBytes, NULL ) );
+    else if( eType == DDFBinaryString )
+    {
+        int     nBytes, i;
+        ossim_uint8   *pabyBString = (ossim_uint8 *) ExtractStringData( pachData, nMaxBytes, &nBytes );
+
+        fprintf( fp, "      Subfield `%s' = 0x", pszName );
+        for( i = 0; i < std::min(nBytes,24); i++ )
+            fprintf( fp, "%02X", pabyBString[i] );
+
+        if( nBytes > 24 )
+            fprintf( fp, "%s", "..." );
+
+        fprintf( fp, "\n" );
+    }
+    else
+        fprintf( fp, "      Subfield `%s' = `%s'\n",
+                 pszName,
+                 ExtractStringData( pachData, nMaxBytes, NULL ) );
+}
+
+/************************************************************************/
+/*                          GetDefaultValue()                           */
+/************************************************************************/
+
+/**
+ * Get default data. 
+ *
+ * Returns the default subfield data contents for this subfield definition.
+ * For variable length numbers this will normally be "0<unit-terminator>". 
+ * For variable length strings it will be "<unit-terminator>".  For fixed
+ * length numbers it is zero filled.  For fixed length strings it is space
+ * filled.  For binary numbers it is binary zero filled. 
+ *
+ * @param pachData the buffer into which the returned default will be placed.
+ * May be NULL if just querying default size.
+ * @param nBytesAvailable the size of pachData in bytes. 
+ * @param pnBytesUsed will receive the size of the subfield default data in
+ * bytes.
+ *
+ * @return true on success or false on failure or if the passed buffer is too
+ * small to hold the default.
+ */
+
+int ossimDDFSubfieldDefn::GetDefaultValue( char *pachData, int nBytesAvailable, 
+                                      int *pnBytesUsed )
+
+{
+    int nDefaultSize;
+
+    if( !bIsVariable )
+        nDefaultSize = nFormatWidth;
+    else
+        nDefaultSize = 1;
+
+    if( pnBytesUsed != NULL )
+        *pnBytesUsed = nDefaultSize;
+
+    if( pachData == NULL )
+        return true;
+
+    if( nBytesAvailable < nDefaultSize )
+        return false;
+
+    if( bIsVariable )
+    {
+        pachData[0] = OSSIM_DDF_UNIT_TERMINATOR;
+    }
+    else
+    {
+        if( GetBinaryFormat() == NotBinary )
+        {
+            if( GetType() == DDFInt || GetType() == DDFFloat )
+                memset( pachData, 0, nDefaultSize );
+            else
+                memset( pachData, ' ', nDefaultSize );
+        }
+        else
+            memset( pachData, 0, nDefaultSize );
+    }
+
+    return true;
+}
+
+/************************************************************************/
+/*                         FormatStringValue()                          */
+/************************************************************************/
+
+/**
+ * Format string subfield value.
+ *
+ * Returns a buffer with the passed in string value reformatted in a way
+ * suitable for storage in a DDFField for this subfield.  
+ */
+
+int ossimDDFSubfieldDefn::FormatStringValue( char *pachData, int nBytesAvailable, 
+                                        int *pnBytesUsed, 
+                                        const char *pszValue,
+                                        int nValueLength )
+
+{
+    int nSize;
+
+    if( nValueLength == -1 )
+        nValueLength = (int)strlen(pszValue);
+
+    if( bIsVariable )
+    {
+        nSize = nValueLength + 1;
+    }
+    else
+    {                                                                  
+        nSize = nFormatWidth;
+    }
+
+    if( pnBytesUsed != NULL )
+        *pnBytesUsed = nSize;
+
+    if( pachData == NULL )
+        return true;
+
+    if( nBytesAvailable < nSize )
+        return false;
+
+    if( bIsVariable )
+    {
+        strncpy( pachData, pszValue, nSize-1 );
+        pachData[nSize-1] = OSSIM_DDF_UNIT_TERMINATOR;
+    }
+    else
+    {
+        if( GetBinaryFormat() == NotBinary )
+        {
+            memset( pachData, ' ', nSize );
+            memcpy( pachData, pszValue, std::min(nValueLength,nSize) );
+        }
+        else
+        {
+            memset( pachData, 0, nSize );
+            memcpy( pachData, pszValue, std::min(nValueLength,nSize) );
+        }
+    }
+
+    return true;
+}
+
+/************************************************************************/
+/*                           FormatIntValue()                           */
+/************************************************************************/
+
+/**
+ * Format int subfield value.
+ *
+ * Returns a buffer with the passed in int value reformatted in a way
+ * suitable for storage in a DDFField for this subfield.  
+ */
+
+int ossimDDFSubfieldDefn::FormatIntValue( char *pachData, int nBytesAvailable, 
+                                     int *pnBytesUsed, int nNewValue )
+
+{
+    int nSize;
+    char szWork[30];
+
+    sprintf( szWork, "%d", nNewValue );
+
+    if( bIsVariable )
+    {
+        nSize = (int)strlen(szWork) + 1;
+    }
+    else
+    {                                                                  
+        nSize = nFormatWidth;
+
+        if( GetBinaryFormat() == NotBinary && (int) strlen(szWork) > nSize )
+            return false;
+    }
+
+    if( pnBytesUsed != NULL )
+        *pnBytesUsed = nSize;
+
+    if( pachData == NULL )
+        return true;
+
+    if( nBytesAvailable < nSize )
+        return false;
+
+    if( bIsVariable )
+    {
+        strncpy( pachData, szWork, nSize-1 );
+        pachData[nSize-1] = OSSIM_DDF_UNIT_TERMINATOR;
+    }
+    else
+    {
+        ossim_uint32 nMask = 0xff;
+        int i;
+
+        switch( GetBinaryFormat() )
+        {
+          case NotBinary:
+            memset( pachData, '0', nSize );
+            strncpy( pachData + nSize - strlen(szWork), szWork,
+                     strlen(szWork) );
+            break;
+
+          case UInt:
+          case SInt:
+            for( i = 0; i < nFormatWidth; i++ )
+            {
+                int iOut;
+
+                // big endian required?
+                if( pszFormatString[0] == 'B' )
+                    iOut = nFormatWidth - i - 1;
+                else
+                    iOut = i;
+
+                pachData[iOut] = (nNewValue & nMask) >> (i*8);
+                nMask *= 256;
+            }
+            break;
+
+          case FloatReal:
+            // CPLAssert( false );
+            break;
+
+          default:
+            // CPLAssert( false );
+            break;
+        }
+    }
+
+    return true;
+}
+
+/************************************************************************/
+/*                          FormatFloatValue()                          */
+/************************************************************************/
+
+/**
+ * Format float subfield value.
+ *
+ * Returns a buffer with the passed in float value reformatted in a way
+ * suitable for storage in a DDFField for this subfield.  
+ */
+
+int ossimDDFSubfieldDefn::FormatFloatValue( char *pachData, int nBytesAvailable, 
+                                       int *pnBytesUsed, double dfNewValue )
+
+{
+    int nSize;
+    char szWork[120];
+
+    sprintf( szWork, "%.16g", dfNewValue );
+
+    if( bIsVariable )
+    {
+        nSize = (int)strlen(szWork) + 1;
+    }
+    else
+    {
+        nSize = nFormatWidth;
+
+        if( GetBinaryFormat() == NotBinary && (int) strlen(szWork) > nSize )
+            return false;
+    }
+
+    if( pnBytesUsed != NULL )
+        *pnBytesUsed = nSize;
+
+    if( pachData == NULL )
+        return true;
+
+    if( nBytesAvailable < nSize )
+        return false;
+
+    if( bIsVariable )
+    {
+        strncpy( pachData, szWork, nSize-1 );
+        pachData[nSize-1] = OSSIM_DDF_UNIT_TERMINATOR;
+    }
+    else
+    {
+        if( GetBinaryFormat() == NotBinary )
+        {
+            memset( pachData, '0', nSize );
+            strncpy( pachData + nSize - strlen(szWork), szWork,
+                     strlen(szWork) );
+        }
+        else
+        {
+            // CPLAssert( false );
+            /* implement me */
+        }
+    }
+
+    return true;
+}
diff --git a/src/ossim/imaging/ossimDdfutils.cpp b/ossim/src/ossim/imaging/ossimDdfutils.cpp
similarity index 100%
rename from src/ossim/imaging/ossimDdfutils.cpp
rename to ossim/src/ossim/imaging/ossimDdfutils.cpp
diff --git a/ossim/src/ossim/imaging/ossimDespeckleFilter.cpp b/ossim/src/ossim/imaging/ossimDespeckleFilter.cpp
new file mode 100644
index 0000000..3131929
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimDespeckleFilter.cpp
@@ -0,0 +1,237 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Oscar Kramer
+//
+//*******************************************************************
+//  $Id: ossimDespeckleFilter.cpp 2644 2011-05-26 15:20:11Z oscar.kramer $
+
+#include <ossim/imaging/ossimDespeckleFilter.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeyword.h>
+#include <ossim/base/ossimNumericProperty.h>
+
+static const ossimKeyword FILTER_RADIUS_KW = ossimKeyword("filter_radius", "");
+
+RTTI_DEF1(ossimDespeckleFilter, "ossimDespeckleFilter", ossimImageSourceFilter);
+
+ossimDespeckleFilter::ossimDespeckleFilter()
+   : ossimImageSourceFilter(),
+     theTile(NULL),
+     theFilterRadius(1)
+{
+}
+
+ossimDespeckleFilter::ossimDespeckleFilter(ossimImageSource* inputSource, ossim_uint32 filter_radius)
+   : ossimImageSourceFilter(inputSource),
+     theTile(NULL),
+     theFilterRadius(filter_radius)
+{
+   initialize();
+}
+
+ossimDespeckleFilter::~ossimDespeckleFilter()
+{
+   theTile = 0;
+}
+
+ossimRefPtr<ossimImageData> 
+ossimDespeckleFilter::getTile(const ossimIrect& tileRect,ossim_uint32 resLevel)
+{
+   if (!theInputConnection) 
+      return NULL;
+
+   if (!isSourceEnabled())
+      return theInputConnection->getTile(tileRect, resLevel);
+   
+   if (!theTile.valid())
+   {
+      allocate();
+      if (!theTile.valid())  // Throw exception???
+         return theInputConnection->getTile(tileRect, resLevel);
+   }
+   
+   // Fetch input tile with kernel margins:
+   ossimIrect requestRect(tileRect.ul().x - theFilterRadius,
+                          tileRect.ul().y - theFilterRadius,
+                          tileRect.lr().x + theFilterRadius,
+                          tileRect.lr().y + theFilterRadius);
+   ossimRefPtr<ossimImageData> inputTile = theInputConnection->getTile(requestRect, resLevel);
+   if (!inputTile.valid())
+      return NULL;
+
+   ossim_uint32 w  = tileRect.width();
+   ossim_uint32 h  = tileRect.height();
+   ossim_uint32 tw = theTile->getWidth();
+   ossim_uint32 th = theTile->getHeight();
+   theTile->setWidth(w);
+   theTile->setHeight(h);
+   if((w*h)!=(tw*th))
+      theTile->initialize();
+      
+   theTile->makeBlank();
+   theTile->setOrigin(tileRect.ul());
+   
+   ossimDataObjectStatus status = inputTile->getDataObjectStatus();
+   if ((status == OSSIM_NULL) || (status == OSSIM_EMPTY))
+      return inputTile;
+
+   switch(inputTile->getScalarType())
+   {
+   case OSSIM_UCHAR:
+      despeckle(static_cast<ossim_uint8>(0), inputTile);
+      break;
+   
+   case OSSIM_USHORT16:
+   case OSSIM_USHORT11:
+      despeckle(static_cast<ossim_uint16>(0), inputTile);
+      break;
+
+   case OSSIM_SSHORT16:
+      despeckle(static_cast<ossim_sint16>(0), inputTile);
+      break;
+
+   case OSSIM_FLOAT:
+   case OSSIM_NORMALIZED_FLOAT:
+      despeckle(static_cast<float>(0), inputTile);
+      break;
+
+   case OSSIM_DOUBLE:
+   case OSSIM_NORMALIZED_DOUBLE:
+      despeckle(static_cast<double>(0), inputTile);
+      break;
+
+   default:
+      theTile->loadTile(inputTile.get());
+   }
+   
+   theTile->validate();
+   return theTile;
+}
+   
+template <class T>
+void ossimDespeckleFilter::despeckle(T /* dummyVariable */, ossimRefPtr<ossimImageData> inputTile)
+{
+   ossimIpt inUL  (inputTile->getImageRectangle().ul());
+   ossimIpt inLR  (inputTile->getImageRectangle().lr());
+   ossimIpt outUL (theTile->getImageRectangle().ul());
+   ossimIpt outLR (theTile->getImageRectangle().lr());
+   long inWidth   = inputTile->getWidth();
+   long outWidth  = theTile->getWidth();
+   long num_bands = theTile->getNumberOfBands();
+   
+      // Loop over all bands first:
+   for(long b = 0; b < num_bands; ++b)
+   {                  
+      const T* inbuf = (const T*) inputTile->getBuf(b);
+      T* outBuf = (T*) theTile->getBuf(b);
+      T null_pixel = (T) inputTile->getNullPix(b);
+
+      for (long y=outUL.y; y<=outLR.y; y++)
+      {
+         for (long x=outUL.x; x<=outLR.x; x++)
+         {
+            bool found_valid = false;
+            long idx = (y - inUL.y)*inWidth + x - inUL.x; // index to input buffer
+            long odx = (y-outUL.y)*outWidth + x - outUL.x;// index to output buffer
+          
+            T pixel = inbuf[idx];
+            if (pixel != null_pixel)
+            {
+               // Inside loop over input "kernel" pixels centered at x, y:
+               for (long iy=-theFilterRadius; (iy<=theFilterRadius) && !found_valid; iy++)
+               {
+                  // Compute row number in image space and skip this row if outside input tile:
+                  long row = y + iy;
+                  if ((row < inUL.y) || (row > inLR.y))
+                     continue;
+
+                  for (long ix=-theFilterRadius; (ix<=theFilterRadius) && !found_valid; ix++)
+                  {
+                     // Compute column number in image space and skip this col if outside input tile:
+                     long col = x + ix;
+                     if ((col < inUL.x) || (col > inLR.x))
+                        continue;
+
+                     // Compute offset into input buffer for the neighbor pixel. If we aren't at the 
+                     // kernel center, consider if valid neighbor was found:
+                     idx = (row - inUL.y)*inWidth + col - inUL.x;
+                     if ( ((iy != 0) || (ix != 0)) && (inbuf[idx] != null_pixel) )
+                        found_valid = true;
+                  }
+               }
+            }
+
+            // Finished scanning neighborhood. Save output to tile buffer:
+            if (found_valid)
+               outBuf[odx] = pixel;
+            else
+               outBuf[odx] = null_pixel;
+         }
+      }
+   }
+}
+
+void ossimDespeckleFilter::initialize()
+{
+   ossimImageSourceFilter::initialize();
+   theTile = NULL;
+}
+
+void ossimDespeckleFilter::allocate()
+{
+   if(theInputConnection)
+   {
+      theTile = ossimImageDataFactory::instance()->create(this, theInputConnection);
+      theTile->initialize();
+   }
+}
+
+bool ossimDespeckleFilter::saveState(ossimKeywordlist& kwl, const char* prefix) const
+{
+   kwl.add(prefix, FILTER_RADIUS_KW, theFilterRadius, true);
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
+
+bool ossimDespeckleFilter::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   const char* lookup = kwl.find(prefix, FILTER_RADIUS_KW);
+   if (lookup)
+      theFilterRadius = ossimString(lookup).toInt32();
+
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
+void ossimDespeckleFilter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   ossimString name = property->getName();
+   if(name == "Filter Radius")
+      theFilterRadius = property->valueToString().toInt32();
+   else
+      ossimImageSourceFilter::setProperty(property);
+}
+
+ossimRefPtr<ossimProperty> ossimDespeckleFilter::getProperty(const ossimString& name)const
+{
+   if(name == "Filter Radius")
+   {
+      ossimProperty* prop = new ossimNumericProperty(name, ossimString::toString(theFilterRadius), 1, 16.0);
+      prop->setCacheRefreshBit();
+      return prop;
+   }
+   return ossimImageSourceFilter::getProperty(name);
+}
+
+void ossimDespeckleFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageSourceFilter::getPropertyNames(propertyNames);
+   propertyNames.push_back("Filter Radius");
+}
+
+
diff --git a/ossim/src/ossim/imaging/ossimDilationFilter.cpp b/ossim/src/ossim/imaging/ossimDilationFilter.cpp
new file mode 100644
index 0000000..dbfe1e2
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimDilationFilter.cpp
@@ -0,0 +1,308 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimDilationFilter.cpp 21631 2012-09-06 18:10:55Z dburken $
+
+#include <ossim/imaging/ossimDilationFilter.h>
+#include <ossim/base/ossimNumericProperty.h>
+#include <ossim/base/ossimBooleanProperty.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <vector>
+#include <numeric>
+
+using namespace std;
+
+RTTI_DEF1(ossimDilationFilter, "ossimDilationFilter", ossimImageSourceFilter);
+
+// Keywords used throughout.
+static const ossimString WINDOW_SIZE_KW = "window_size";
+static const ossimString RECURSIVE_DILATION_KW = "recursive_dilation";
+
+ossimDilationFilter::ossimDilationFilter(ossimObject* owner)
+   :ossimImageSourceFilter(owner),
+    theTile(0),
+    theTempTile(0),
+    theWindowSize(15),
+    theRecursiveFlag(false),
+    theNullFoundFlag(false)
+{
+   setDescription(ossimString("Dilation Filter"));
+}
+
+ossimDilationFilter::~ossimDilationFilter()
+{
+}
+
+void ossimDilationFilter::initialize()
+{
+   ossimImageSourceFilter::initialize();
+   theTile = NULL;
+}
+
+ossimRefPtr<ossimImageData> ossimDilationFilter::getTile(const ossimIrect& rect,
+                                                         ossim_uint32 resLevel)
+{
+   if(!isSourceEnabled())
+      return ossimImageSourceFilter::getTile(rect, resLevel);
+
+   ossimRefPtr<ossimImageData> inputData;
+   if (theRecursiveFlag)
+      inputData =  ossimImageSourceFilter::getTile(rect, resLevel);
+   else
+   {
+      ossim_uint32 halfSize = getWindowSize()>>1;
+      ossimIrect requestRect(rect.ul().x - halfSize,
+                             rect.ul().y - halfSize,
+                             rect.lr().x + halfSize,
+                             rect.lr().y + halfSize);
+
+      inputData =  ossimImageSourceFilter::getTile(requestRect, resLevel);
+   }
+
+   if(!inputData.valid() || !inputData->getBuf())
+      return inputData;
+
+   vector<ossimIpt> viv;
+   ossimImageSourceFilter::getValidImageVertices(viv, OSSIM_CLOCKWISE_ORDER, resLevel);
+   theValidImagePoly = ossimPolygon(viv);
+
+   if(!theTile.valid())
+   {
+      theTile = (ossimImageData*)inputData->dup();
+      theTile->setImageRectangle(rect);
+   }
+   else
+   {
+      theTile->setImageRectangleAndBands(rect, inputData->getNumberOfBands());
+   }
+
+   theNullFoundFlag = false;
+   switch(inputData->getScalarType())
+   {
+      case OSSIM_UINT8:
+         doDilation(ossim_uint8(0), inputData);
+         break;
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+         doDilation(ossim_uint16(0), inputData);
+         break;
+      case OSSIM_SINT16:
+         doDilation(ossim_sint16(0), inputData);
+         break;
+      case OSSIM_UINT32:
+         doDilation(ossim_uint32(0), inputData);
+         break;
+      case OSSIM_FLOAT32:
+      case OSSIM_NORMALIZED_FLOAT:
+         doDilation(ossim_float32(0), inputData);
+         break;
+      case OSSIM_FLOAT64:
+      case OSSIM_NORMALIZED_DOUBLE:
+         doDilation(ossim_float64(0), inputData);
+         break;
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimDilationFilter::applyFilter WARNING:\n"
+            << "Unhandled scalar type!" << endl;
+      }
+   }
+   return theTile;
+}
+
+template <class T>
+void ossimDilationFilter::doDilation(T scalarType , ossimRefPtr<ossimImageData>& inputData)
+{
+   ossimDataObjectStatus status = inputData->getDataObjectStatus();
+
+   if ((status == OSSIM_FULL) || (status == OSSIM_EMPTY))
+   {
+      // Nothing to do just copy the tile.
+      theTile->loadTile(inputData.get());
+      return;
+   }
+
+   ossim_int32 halfWindow = (ossim_int32)(theWindowSize >> 1);
+   ossim_int32 x, y, kernelX, kernelY;   
+   ossim_int32 iw = (ossim_int32)inputData->getWidth();
+   ossim_int32 ih = (ossim_int32)inputData->getHeight();
+   ossim_int32 ow = (ossim_int32)theTile->getWidth();
+   ossim_int32 oh = (ossim_int32)theTile->getHeight();
+   ossim_uint32 numBands = ossim::min(theTile->getNumberOfBands(), inputData->getNumberOfBands());
+
+   // It may be that the input rect is the same size as the output (i.e., the tile bounds aren't
+   // expanded in the input's request to permit full kernels for output edge pixels:
+   ossim_uint32 i_offset = 0;
+   ossim_int32 delta = (ossim_int32)((iw - ow) >> 1);
+   ossim_int32 xi, yi;
+   if (delta > 0)
+      i_offset = (ossim_uint32) halfWindow*(iw + 1);
+
+   ossimIpt tile_ul (theTile->getImageRectangle().ul());
+   vector<double> values;
+   for(ossim_uint32 bandIdx = 0; bandIdx < numBands; ++bandIdx)
+   {
+      T* inputBuf     = (T*)inputData->getBuf(bandIdx);
+      T* outputBuf    = (T*)theTile->getBuf(bandIdx);
+      if (!inputBuf || !outputBuf)
+      {
+         return; // Shouldn't happen...
+      }
+
+      const T NP = (T)inputData->getNullPix(bandIdx);
+
+      for(y = 0; y < oh; ++y)
+      {
+         for(x = 0; x < ow; ++x)
+         {
+            // Get the center input pixel. Only process those points inside the valid image
+            // (to avoid dilation beyond valid image)
+            const T CP = *(inputBuf+i_offset);
+            ossimDpt ipt (tile_ul.x+x, tile_ul.y+y);
+            if ((CP == NP) && theValidImagePoly.isPointWithin(ipt))
+            {
+               theNullFoundFlag = true; // Needed for recursion
+               values.clear();
+               for(kernelY = -halfWindow; kernelY <= halfWindow; ++kernelY)
+               {
+                  yi = y + kernelY + delta;
+                  if ((yi < 0) || (y > ih))
+                     continue;
+
+                  for(kernelX = -halfWindow; kernelX <= halfWindow; ++kernelX)
+                  {
+                     xi = x + kernelX + delta;
+                     if ((xi < 0) || (x > iw))
+                        continue;
+
+                     T tempValue = *(inputBuf+kernelX+delta + (kernelY+delta)*iw);
+                     if(tempValue != NP)
+                        values.push_back((double)tempValue);
+                  }
+               }
+
+               if(values.size() > 0)
+               {
+                  double accum = accumulate(values.begin(), values.end(), 0.0);
+                  double average = accum/(double)values.size();
+                  (*outputBuf) = (T)average;
+               }
+               else
+               {
+                  (*outputBuf) = NP;
+               }
+
+            }
+            else // Center pixel (CP) not null.
+            {
+               (*outputBuf) = CP;
+            }
+
+            // Move over...
+            ++inputBuf;
+            ++outputBuf;
+
+         } // End of loop in x direction.
+
+         // Move down...
+         inputBuf += iw - ow;
+
+      }  // End of loop in y direction.
+
+   }  // End of band loop.
+
+   theTile->validate();
+
+   // Set up recursion for "dilation fill mode", we'll keep calling this getTile until all pixels
+   // are filled with non-null values:
+   if (theRecursiveFlag)
+   {
+      //cout << "Percent Full: "<<theTile->percentFull()<<endl; //###
+      //theTile->write("filtered.ras"); //###
+
+      status = theTile->getDataObjectStatus();
+      if (theNullFoundFlag)
+      {
+         theNullFoundFlag = false; // assume will fill, set true in next recursion if null found
+         theTempTile = new ossimImageData(*theTile.get());
+         doDilation(scalarType, theTempTile);
+      }
+   }
+}
+
+void ossimDilationFilter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if (!property.valid())
+      return;
+
+   ossimString name = property->getName();
+
+   if (name == WINDOW_SIZE_KW)
+   {
+      theWindowSize = property->valueToString().toUInt32();
+   }
+   else if (name == RECURSIVE_DILATION_KW)
+   {
+      ossimString value;
+      property->valueToString(value);
+      setRecursiveFlag(value.toBool());
+   }
+   else
+   {
+      ossimImageSourceFilter::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimDilationFilter::getProperty(const ossimString& name)const
+{
+   ossimRefPtr<ossimProperty> prop = 0;
+   if (name == WINDOW_SIZE_KW)
+   {
+      prop = new ossimNumericProperty(WINDOW_SIZE_KW, ossimString::toString(theWindowSize), 3, 25);
+      prop->setCacheRefreshBit();
+      return prop;
+   }
+   else if (name == RECURSIVE_DILATION_KW)
+   {
+      prop = new ossimBooleanProperty(RECURSIVE_DILATION_KW, getRecursiveFlag());
+      prop->setFullRefreshBit();
+      return prop;
+   }
+   return ossimImageSourceFilter::getProperty(name);
+}
+
+void ossimDilationFilter::getPropertyNames(vector<ossimString>& propertyNames) const
+{
+   propertyNames.push_back(WINDOW_SIZE_KW);
+   propertyNames.push_back(RECURSIVE_DILATION_KW);
+   ossimImageSourceFilter::getPropertyNames(propertyNames);
+}
+
+bool ossimDilationFilter::saveState(ossimKeywordlist& kwl, const char* prefix)const
+{
+   kwl.add(prefix, WINDOW_SIZE_KW.c_str(), theWindowSize, true);
+   kwl.add(prefix, RECURSIVE_DILATION_KW.c_str(), (theRecursiveFlag?"true":"false"), true);
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
+bool ossimDilationFilter::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   const char* lookup = kwl.find(prefix, WINDOW_SIZE_KW.c_str());
+   if (lookup)
+      theWindowSize = ossimString(lookup).toUInt32();
+   
+   lookup = kwl.find(prefix, RECURSIVE_DILATION_KW.c_str());
+   if (lookup)
+      setRecursiveFlag(ossimString(lookup).toBool());
+
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
diff --git a/src/ossim/imaging/ossimDiscrete3x3HatFilter.cpp b/ossim/src/ossim/imaging/ossimDiscrete3x3HatFilter.cpp
similarity index 100%
rename from src/ossim/imaging/ossimDiscrete3x3HatFilter.cpp
rename to ossim/src/ossim/imaging/ossimDiscrete3x3HatFilter.cpp
diff --git a/src/ossim/imaging/ossimDiscreteConvolutionKernel.cpp b/ossim/src/ossim/imaging/ossimDiscreteConvolutionKernel.cpp
similarity index 100%
rename from src/ossim/imaging/ossimDiscreteConvolutionKernel.cpp
rename to ossim/src/ossim/imaging/ossimDiscreteConvolutionKernel.cpp
diff --git a/ossim/src/ossim/imaging/ossimDoqqTileSource.cpp b/ossim/src/ossim/imaging/ossimDoqqTileSource.cpp
new file mode 100644
index 0000000..108302e
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimDoqqTileSource.cpp
@@ -0,0 +1,261 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimDoqqTileSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimDoqqTileSource.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimContainerProperty.h>
+#include <ossim/imaging/ossimGeneralRasterInfo.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/support_data/ossimDoqq.h>
+
+RTTI_DEF1(ossimDoqqTileSource,
+          "ossimDoqqTileSource",
+          ossimGeneralRasterTileSource);
+
+ossimDoqqTileSource::ossimDoqqTileSource()
+   :theHeaderInformation(0)
+{
+}
+
+ossimDoqqTileSource::~ossimDoqqTileSource()
+{
+   theHeaderInformation = 0;
+}
+
+bool ossimDoqqTileSource::open(const ossimFilename& filename)
+{
+   bool result = false;
+   
+   theHeaderInformation = new ossimDoqq(filename);
+   if(theHeaderInformation->errorStatus() == ossimDoqq::OSSIM_ERROR)
+   {
+      theHeaderInformation = 0;
+      
+      return result;
+   }
+   else
+   {
+     // Set the Acquisition Date
+     theAcqDate = theHeaderInformation->theAcqYear;
+     theAcqDate += "-";
+     theAcqDate += theHeaderInformation->theAcqMonth;
+     theAcqDate += "-";
+     theAcqDate += theHeaderInformation->theAcqDay;
+
+     vector<ossimFilename> f;
+     f.push_back(filename);
+     ossimGeneralRasterInfo genRasterInfo(f,
+					  OSSIM_UCHAR,
+					  OSSIM_BIP,
+					  theHeaderInformation->theRgb,
+					  theHeaderInformation->theLine,
+					  theHeaderInformation->theSample,
+					  theHeaderInformation->theHeaderSize,
+					  ossimGeneralRasterInfo::NONE,
+					  0);
+     
+     result = ossimGeneralRasterTileSource::open(genRasterInfo);
+   }
+
+   return result;
+} 
+
+//**************************************************************************************************
+//! Returns the image geometry object associated with this tile source or NULL if non defined.
+//! The geometry contains full-to-local image transform as well as projection (image-to-world)
+//**************************************************************************************************
+ossimRefPtr<ossimImageGeometry> ossimDoqqTileSource::getImageGeometry()
+{
+   if (theGeometry.valid()) return theGeometry;
+   
+   if(theHeaderInformation.valid())
+   {
+      ossimKeywordlist kwl;
+      const char* prefix = 0; // legacy
+
+      ossimString proj  = theHeaderInformation->theProjection.trim().upcase();
+      ossimString datum = theHeaderInformation->theDatum.trim().upcase();
+
+      if(proj == ossimString("UTM") || proj == ossimString("1"))
+      {
+         kwl.add(prefix,
+                 ossimKeywordNames::TYPE_KW,
+                 "ossimUtmProjection",
+                 true);
+         kwl.add(prefix,
+                 ossimKeywordNames::ZONE_KW,
+                 theHeaderInformation->theUtmZone,
+                 true);
+      }
+      else
+      {
+         return ossimRefPtr<ossimImageGeometry>();
+      }
+
+      if(datum == ossimString("NAR") || datum == ossimString("4"))
+      {
+         kwl.add(prefix,
+                 ossimKeywordNames::DATUM_KW,
+                 "NAR-C", // North American Conus 1983
+                 true);
+      }
+      else if(datum == ossimString("NAS") || datum == ossimString("1"))
+      {
+         kwl.add(prefix,
+                 ossimKeywordNames::DATUM_KW,
+                 "NAS-C", // North American Conus 1927
+                 true);
+      }
+      else if(datum == ossimString("2"))
+      {
+         kwl.add(prefix,
+                 ossimKeywordNames::DATUM_KW,
+                 "WGD", // WGS 72
+                 true);
+      }
+      else if(datum == ossimString("3"))
+      {
+         kwl.add(prefix,
+                 ossimKeywordNames::DATUM_KW,
+                 "WGE", // WGS 84
+                 true);
+      }
+      else
+      {
+         return ossimRefPtr<ossimImageGeometry>();
+      }
+
+      kwl.add(prefix,
+              ossimKeywordNames::METERS_PER_PIXEL_X_KW,
+              theHeaderInformation->theGsd.x,
+              true);
+
+      kwl.add(prefix,
+              ossimKeywordNames::METERS_PER_PIXEL_Y_KW,
+              theHeaderInformation->theGsd.y,
+              true);
+      kwl.add(prefix,
+              ossimKeywordNames::TIE_POINT_EASTING_KW,
+//            theHeaderInformation->theUE + (theHeaderInformation->theGsd/2.0),
+	      theHeaderInformation->theEasting,
+              true);
+
+      kwl.add(prefix,
+              ossimKeywordNames::TIE_POINT_NORTHING_KW,
+//            theHeaderInformation->theUN - (theHeaderInformation->theGsd/2.0),
+	      theHeaderInformation->theNorthing,
+              true);
+
+      // Capture this for next time.
+      theGeometry = new ossimImageGeometry;
+      theGeometry->loadState(kwl, prefix);
+
+      // Set image things the geometry object should know about.
+      initImageParameters( theGeometry.get() );
+      
+      return theGeometry;
+   }
+   return ossimRefPtr<ossimImageGeometry>();
+}
+
+ossimRefPtr<ossimProperty> ossimDoqqTileSource::getProperty(const ossimString& name)const
+{
+	if(name == "acquisition_date")
+	{
+		if(theHeaderInformation.valid())
+		{
+			std::stringstream out;
+			out << std::setw(4) << std::setfill(' ') << theHeaderInformation->theAcqYear.c_str()
+			<< std::setw(2) << setfill('0') << theHeaderInformation->theAcqMonth.c_str()
+			<< std::setw(2) << setfill('0') << theHeaderInformation->theAcqDay.c_str();
+			return new ossimStringProperty("acquisition_date", out.str());
+		}
+		return 0;
+	}
+	else if(name == "file_type")
+	{
+		return new ossimStringProperty("file_type", "DOQQ");
+	}
+	return ossimImageHandler::getProperty(name);
+}
+
+void ossimDoqqTileSource::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+	ossimImageHandler::getPropertyNames(propertyNames);
+	propertyNames.push_back("acquisition_date");
+	propertyNames.push_back("file_type");
+	
+}
+
+bool ossimDoqqTileSource::loadState(const ossimKeywordlist& kwl,
+                                    const char* prefix)
+{
+   const char* lookup = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
+   if(!ossimImageHandler::loadState(kwl, prefix))
+   {
+      return false;
+   }
+
+   if(lookup)
+   {
+      theHeaderInformation = new ossimDoqq(ossimFilename(lookup));
+      if(theHeaderInformation->errorStatus() != ossimDoqq::OSSIM_OK)
+      {
+         theHeaderInformation = 0;
+         return false;
+      }
+      else
+      {
+         ossimFilename filename(lookup);
+         vector<ossimFilename> f;
+         f.push_back(filename);
+         ossimGeneralRasterInfo genRasterInfo(f,
+                                              OSSIM_UCHAR,
+                                              OSSIM_BIP,
+                                              theHeaderInformation->theRgb,
+                                              theHeaderInformation->theLine,
+                                              theHeaderInformation->theSample,
+                                              theHeaderInformation->theHeaderSize,
+                                              ossimGeneralRasterInfo::NONE,
+                                              0);
+         return open(genRasterInfo);
+      }
+   }
+   else
+   {
+      return false;
+   }
+   
+   return true;
+}
+
+ossimString ossimDoqqTileSource::getShortName()const
+{
+   return ossimString("doqq");
+}
+
+ossimString ossimDoqqTileSource::getLongName()const
+{
+   return ossimString("doqq handler");
+}
+
+bool ossimDoqqTileSource::open(const ossimGeneralRasterInfo& info)
+{
+   return ossimGeneralRasterTileSource::open(info);
+}
+
+ossimString ossimDoqqTileSource::acqdate() const
+{
+   return theAcqDate;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimDtedTileSource.cpp b/ossim/src/ossim/imaging/ossimDtedTileSource.cpp
new file mode 100644
index 0000000..d4671e9
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimDtedTileSource.cpp
@@ -0,0 +1,683 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Contains class declaration for ossimDtedTileSource.
+//
+//********************************************************************
+// $Id: ossimDtedTileSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimDtedTileSource.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimEllipsoid.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimTiffTileSource.h>
+#include <ossim/support_data/ossimDtedInfo.h>
+#include <cstdlib>
+#include <iostream>
+using namespace std;
+
+RTTI_DEF1(ossimDtedTileSource, "ossimDtedTileSource", ossimImageHandler)
+
+// Static trace for debugging
+static ossimTrace traceDebug("ossimDtedTileSource:debug");
+
+
+ossimDtedTileSource::ossimDtedTileSource()
+   :
+      ossimImageHandler(),
+      theTile(NULL),
+      theFileStr(),
+      theTileWidth(0),
+      theTileHeight(0),
+      theNumberOfLines(0),
+      theNumberOfSamps(0),
+      theOffsetToFirstDataRecord(0),
+      theDataRecordSize(0),
+      theMinHeight(0),
+      theMaxHeight(0),
+      thePostSpacing(0.0, 0.0),
+      theSwapBytesFlag(false)
+{
+   if (ossim::byteOrder() == OSSIM_LITTLE_ENDIAN)
+   {
+      theSwapBytesFlag = true;
+   }
+
+   // Set the tile size to the default.
+   ossimIpt defaultTileSize;
+   ossim::defaultTileSize(defaultTileSize);
+   theTileWidth  = static_cast<ossim_uint32>(defaultTileSize.x);
+   theTileHeight = static_cast<ossim_uint32>(defaultTileSize.y);
+   
+   // Construction not complete.  Users should call "open" method.
+}
+
+ossimDtedTileSource::~ossimDtedTileSource()
+{
+   close();
+}
+
+ossimString ossimDtedTileSource::getShortName()const
+{
+   return ossimString("dted");
+}
+
+ossimString ossimDtedTileSource::getLongName()const
+{
+   return ossimString("dted reader");
+}
+
+ossimRefPtr<ossimImageData> ossimDtedTileSource::getTile(
+   const  ossimIrect& tile_rect, ossim_uint32 resLevel)
+{
+   if (!theTile.valid())
+   {
+      allocate(); // First getTile call or after changeTileSize.
+      if (!theTile.valid())
+      {
+         return ossimRefPtr<ossimImageData>(); // Throw exception???
+      }
+   }
+
+   // Image rectangle must be set prior to calling getTile.
+   theTile->setImageRectangle(tile_rect);
+   
+   if ( getTile( theTile.get(), resLevel ) == false )
+   {
+      if (theTile->getDataObjectStatus() != OSSIM_NULL)
+      {
+         theTile->makeBlank();
+      }
+   }
+
+   return theTile;
+}
+
+bool ossimDtedTileSource::getTile(ossimImageData* result,
+                                  ossim_uint32 resLevel)
+{
+   bool status = false;
+   
+   //---
+   // Not open, this tile source bypassed, or invalid res level,
+   // return a blank tile.
+   //---
+   if( isOpen() && isSourceEnabled() && isValidRLevel(resLevel) &&
+       result && (result->getNumberOfBands() == getNumberOfOutputBands()) )
+   {
+      result->ref(); // Increment ref count.
+
+      //---
+      // Check for overview tile.  Some overviews can contain r0 so always
+      // call even if resLevel is 0.  Method returns true on success, false
+      // on error.
+      //---
+      status = getOverviewTile(resLevel, result);
+
+      if ( !status )  // Did not get an overview tile.
+      {  
+         ossimIrect image_rect = getImageRectangle(resLevel);
+
+         ossimIrect tile_rect = result->getImageRectangle();
+         
+         //---
+         // See if any point of the requested tile is in the image.
+         //---
+         if ( tile_rect.intersects(image_rect) )
+         {
+            ossimIrect clip_rect = tile_rect.clipToRect(image_rect);
+            
+            if ( !tile_rect.completely_within(clip_rect) )
+            {
+               // Start with a blank tile.
+               result->makeBlank();
+            }
+
+            // Load the tile buffer with data from the dted cell.
+            status = fillBuffer(tile_rect, clip_rect, result);
+            
+         } // End of if ( tile_rect.intersects(image_rect) )
+      }
+
+       result->unref(); // Decrement ref count.
+   }
+   
+   return status;
+}
+
+//*******************************************************************
+// Private Method:
+//*******************************************************************
+bool ossimDtedTileSource::fillBuffer(const ossimIrect& tile_rect,
+                                     const ossimIrect& clip_rect,
+                                     ossimImageData* tile)
+{
+   //***
+   // NOTE:
+   // Elevation posts are organized positive line up.
+   // The "tile_rect" and "clip_rect" is organized positive line down.
+   //***
+
+   const ossim_int32 TILE_WIDTH = tile->getWidth();
+   
+   //***
+   // Position the file pointer to the first record needed.
+   // Posts are organized positive line up so we're going to start at
+   // the lower left side of the cell so all reads are going forward in
+   // the file.
+   //***
+   ossim_int32 seek_position = theOffsetToFirstDataRecord +
+                         (clip_rect.ul().x * theDataRecordSize);
+   seek_position += DATA_RECORD_OFFSET_TO_POST +
+                    (theNumberOfLines - 1 - clip_rect.lr().y) * 2;
+   
+   //***
+   // Get a pointer positioned at the first valid pixel in
+   // the tile.  Tiles are organized positive line down.
+   //***
+   ossim_sint16* d = static_cast<ossim_sint16*>(tile->getBuf());
+   
+   // Loop in the longitude or sample direction.
+   for (ossim_int32 samp = clip_rect.ul().x; samp <= clip_rect.lr().x; samp++)
+   {
+      ossim_int32 d_offset = (clip_rect.lr().y - tile_rect.ul().y) *
+                       TILE_WIDTH +
+                       (samp - tile_rect.ul().x);
+
+      theFileStr.seekg(seek_position, ios::beg); // Seek to the first post.
+
+      for (ossim_int32 line = clip_rect.lr().y; line >= clip_rect.ul().y; line--)
+      {
+         // Grab all the post needed from the column.
+         ossim_uint16 temp;
+         ossim_sint16 s;
+         theFileStr.read((char*)&temp, POST_SIZE);
+         s = convertSignedMagnitude(temp);
+         d[d_offset] = s;
+         d_offset -= TILE_WIDTH;
+      }
+      seek_position += theDataRecordSize;
+   }
+
+   tile->validate();
+   
+   return true;
+}
+
+ossim_uint32 ossimDtedTileSource::getNumberOfOutputBands()const
+{
+   return getNumberOfInputBands();
+}
+
+ossimIrect
+ossimDtedTileSource::getImageRectangle(ossim_uint32 reduced_res_level) const
+{
+   return ossimIrect(0,
+                     0,
+                     getNumberOfSamples(reduced_res_level) - 1,
+                     getNumberOfLines(reduced_res_level)   - 1);
+}
+
+bool ossimDtedTileSource::isOpen()const
+{
+   return theFileStr.is_open();
+}
+
+void ossimDtedTileSource::close()
+{
+   theFileStr.close();
+}
+
+bool ossimDtedTileSource::open()
+{
+   static const char MODULE[] = "ossimDtedTileSource::open";
+
+   if (traceDebug())
+   {
+      CLOG << "DEBUG:"
+           << "\nAttempting to parse file:  " << theImageFile.c_str()
+           << endl;
+   }
+   
+   if (!theImageFile.exists()) // See if file exists.
+   {
+      if (traceDebug())
+      {
+         CLOG << "DEBUG:"
+              << "\nFile " << theImageFile.c_str() << " does not exist!"
+              << endl;
+      }
+      return false;
+   }
+
+   // Open up the file for reading.
+   theFileStr.open(theImageFile.c_str(), ios::in | ios::binary);
+   if (!theFileStr)
+   {
+      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+      
+	  if(traceDebug())
+	  {
+		  ossimNotify(ossimNotifyLevel_WARN) << MODULE << " ERROR!"
+											 << "\nCould not open file:  " << theImageFile.c_str()
+											 << "\nReturning..." << endl;
+		  CLOG << "returning with error..." << endl;
+	  }
+      return false;
+   }
+                                   
+   if(!theFileStr)
+   {
+      if (traceDebug())
+      {
+         CLOG << "DEBUG:"
+              << "\nCannot open:  " << theImageFile.c_str()
+              << endl;
+      }
+      theFileStr.close();
+      return false;
+   }
+   m_vol.parse(theFileStr);
+   m_hdr.parse(theFileStr);
+   m_uhl.parse(theFileStr);
+   m_dsi.parse(theFileStr);
+   m_acc.parse(theFileStr);
+   
+   //***
+   // Check for errors.  Must have uhl, dsi and acc records.  vol and hdr
+   // are for magnetic tape only; hence, may or may not be there.
+   //***
+   if (m_uhl.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR ||
+       m_dsi.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR ||
+       m_acc.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
+   {
+      if (traceDebug())
+      {
+         CLOG << "DEBUG:"
+              << "\nError parsing file:  " << theImageFile.c_str()
+              << "\nPossibly not a dted file.\n";
+      }
+      
+      theFileStr.close();
+      return false;
+   }
+
+   // Get the cell specific info needed for later.
+   theNumberOfLines = m_uhl.numLatPoints();
+   theNumberOfSamps = m_uhl.numLonLines();
+   thePostSpacing.x = m_uhl.lonInterval();
+   thePostSpacing.y = m_uhl.latInterval();
+   theOffsetToFirstDataRecord = m_acc.stopOffset();
+   theDataRecordSize = DATA_RECORD_OFFSET_TO_POST +
+                       (theNumberOfLines * sizeof(ossim_sint16)) +
+                       DATA_RECORD_CHECKSUM_SIZE;
+
+   //---
+   // Note:
+   // Complete open calls loadMetaData which we have overriden to check for
+   // dot omd or dot statistics file.  If not there it will call
+   // gatherStatistics which will scan the file for min/max values.
+   //---
+   completeOpen();
+
+   if (traceDebug())
+   {
+      CLOG << "DEBUG:"
+           << "\nNull pix:  " << getNullPixelValue(0)
+           << "\nMin  pix:  " << getMinPixelValue(0)
+           << "\nMax  pix:  " << getMaxPixelValue(0)
+           << "\ntheNumberOfLines:  " << theNumberOfLines
+           << "\ntheNumberOfSamps:  " << theNumberOfSamps
+           << "\ntheOffsetToFirstDataRecord:  " << theOffsetToFirstDataRecord
+           << "\ntheDataRecordSize:  " << theDataRecordSize << "\n";
+   }
+
+   return true;
+}
+
+void ossimDtedTileSource::allocate()
+{
+   //---
+   // Set up the tiles.  Note the blank tile will not get initialized to save
+   // memory.  This includes setting the min and max pixel value gathered
+   // from the statistics.
+   //---
+   theTile = ossimImageDataFactory::instance()->create(this, this);
+   if(theTile.valid())
+   {
+      theTile->initialize();
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG:"
+         << "\ntheTile:\n" << *theTile << "\n";
+   }
+}
+
+bool ossimDtedTileSource::saveState(ossimKeywordlist& kwl,
+                                    const char* prefix) const
+{
+   // Currently nothing to do here.
+   return ossimImageHandler::saveState(kwl, prefix);
+}
+
+bool ossimDtedTileSource::loadState(const ossimKeywordlist& kwl,
+                                    const char* prefix)
+{
+   if (ossimImageHandler::loadState(kwl, prefix))
+   {
+      if (ossimImageHandler::open(theImageFile))
+      {
+         return true;
+      }
+   }
+
+   return false;
+}
+
+//**************************************************************************************************
+// Returns the image geometry object associated with this tile source or NULL if not defined.
+// The geometry contains full-to-local image transform as well as projection (image-to-world)
+//**************************************************************************************************
+ossimRefPtr<ossimImageGeometry> ossimDtedTileSource::getImageGeometry()
+{
+   if ( theGeometry.valid() )
+      return theGeometry;
+
+   // Compute the projection tie point (UL corner of dted cell). The UHL supplies the SW (LL) corner
+   // coordinates, so need to compute the UL lat from the cell spacing:
+   const ossimDatum* datum = ossimDatumFactory::instance()->wgs84();
+   ossim_float64 ul_lat = m_uhl.latOrigin() + (m_uhl.latInterval() * (m_uhl.numLatPoints()-1.0));
+   ossim_float64 ul_lon = m_uhl.lonOrigin();
+   ossimGpt tie(ul_lat, ul_lon, 0.0, datum);
+
+   //---
+   // This code is backed out as it affects the corner.
+   // E.g.: image0.ur_lon:  -88.999999999995
+   // Should be -89.0
+   // Used ossimImageGeometry::::getMetersPerPixel for a center of the image gsd. (drb)
+   // 
+   // We also need to define an origin for the projection as the center of the cell for proper GSD
+   // calculation (OLK 01/11: Used to set origin at 0,0 causing incorrect meters GSD to be
+   // computed)
+   // ossim_float64 mid_lat = m_uhl.latOrigin() + (m_uhl.latInterval()*m_uhl.numLatPoints()/2.0);
+   // ossim_float64 mid_lon = m_uhl.lonOrigin() + (m_uhl.lonInterval()*m_uhl.numLonLines()/2.0);
+   // ossimGpt origin (mid_lat, mid_lon, 0.0, datum);
+   //---
+   ossimGpt origin (0.0, 0.0, 0.0, datum);
+
+   // Make an Equidistant Cylindrical projection.
+   ossimRefPtr<ossimEquDistCylProjection> eq =
+      new ossimEquDistCylProjection(*(datum->ellipsoid()));
+      
+      // Set the scale:
+   eq->setOrigin(origin);
+   eq->setUlTiePoints(tie);
+   ossimDpt gsd(m_uhl.lonInterval(), m_uhl.latInterval());
+   eq->setDecimalDegreesPerPixel(gsd);
+
+   // Give it to the geometry object.
+   ossimRefPtr<ossimProjection> proj = eq.get();
+   
+   // Make the geometry:
+   theGeometry = new ossimImageGeometry;
+   
+   // Set the projection.
+   theGeometry->setProjection( proj.get() );
+
+   // Set image things the geometry object should know about.
+   initImageParameters( theGeometry.get() );
+   
+   return theGeometry;
+}
+
+ossimScalarType ossimDtedTileSource::getOutputScalarType() const
+{
+   return OSSIM_SSHORT16;  // Always signed 16 bit.
+}
+
+ossim_uint32 ossimDtedTileSource::getTileWidth() const
+{
+   return theTileWidth;
+}
+
+ossim_uint32 ossimDtedTileSource::getTileHeight() const
+{
+   return theTileHeight;
+}
+
+ossim_uint32 ossimDtedTileSource::getNumberOfLines(ossim_uint32 reduced_res_level) const
+{
+   if (reduced_res_level == 0)
+   {
+      return theNumberOfLines;
+   }
+   else if (theOverview.valid())
+   {
+      return theOverview->getNumberOfLines(reduced_res_level);
+   }
+
+   return 0;
+}
+
+ossim_uint32 ossimDtedTileSource::getNumberOfSamples(ossim_uint32 reduced_res_level) const
+{
+   if (reduced_res_level == 0)
+   {
+      return theNumberOfSamps;
+   }
+   else if (theOverview.valid())
+   {
+      return theOverview->getNumberOfSamples(reduced_res_level);
+   }
+
+   return 0;
+}
+
+void ossimDtedTileSource::loadMetaData()
+{
+   ossimKeywordlist kwl;
+   const char* min_str = 0;
+   const char* max_str = 0;
+   
+   ossimFilename f = theImageFile.fileNoExtension();
+
+   // Check for omd file.
+   f.setExtension("omd");
+   if ( f.exists() )
+   {
+      kwl.addFile(f);
+      min_str = kwl.find("band1.min_value");
+      max_str = kwl.find("band1.max_value");
+   }
+
+   if ( !min_str || !max_str )
+   {
+      f.setExtension("statistics");
+      if ( f.exists() )
+      {
+         kwl.addFile(f);
+         min_str = kwl.find(ossimKeywordNames::MIN_VALUE_KW);
+         max_str = kwl.find(ossimKeywordNames::MAX_VALUE_KW);
+      }
+   }
+
+   if ( min_str || max_str )
+   {
+      theMinHeight = atoi(min_str);
+      theMaxHeight = atoi(max_str);
+   } 
+   else
+   {
+      gatherStatistics(false);
+   }
+}
+
+void ossimDtedTileSource::gatherStatistics(bool writeStatsFile)
+{
+   // Scan the cell and gather the statistics...
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimDtedTileSource::gatherStatistics() scanning for min/max"
+         << "\nThis may take a while...\n";
+   }
+   
+   // Start off with the min and max pegged.
+   theMinHeight =  32767;
+   theMaxHeight = -32767;
+   
+   // Put the file pointer at the start of the first elevation post.
+   theFileStr.seekg(theOffsetToFirstDataRecord, ios::beg);
+   
+   //---
+   // Loop through all records and scan for lowest min and highest max.
+   // Each record contains a row of latitude points for a given longitude.
+   // There are eight bytes in front of the post and four checksum bytes at
+   // the end so ignore them.
+   //---
+   for (ossim_uint32 i=0; i<theNumberOfSamps; i++)  // longitude direction
+   {
+      theFileStr.seekg(DATA_RECORD_OFFSET_TO_POST, ios::cur);
+      
+      for (ossim_uint32 j=0; j<theNumberOfLines; j++) // latitude direction
+      {
+         ossim_uint16 temp;
+         ossim_sint16 s;
+         theFileStr.read((char*)&temp, POST_SIZE);
+         s = convertSignedMagnitude(temp);
+         if (s < theMinHeight && s != NULL_PIXEL) theMinHeight = s;
+         if (s > theMaxHeight) theMaxHeight = s;
+      }
+      
+      theFileStr.seekg(DATA_RECORD_CHECKSUM_SIZE, ios::cur);
+   }
+   
+   if ( writeStatsFile )
+   {
+      // Add the stats to the keyword list.
+      ossimKeywordlist kwl;
+      kwl.add(ossimKeywordNames::MIN_VALUE_KW, theMinHeight);
+      kwl.add(ossimKeywordNames::MAX_VALUE_KW, theMaxHeight);
+      
+      // Write out the statistics file.
+      ossimFilename f = theImageFile.fileNoExtension();
+      f.setExtension("statistics");
+      kwl.write( f.c_str() );
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimDtedTileSource::gatherStatistics DEBUG:"
+         << "\ntheMinHeight:  " << theMinHeight
+         << "\ntheMaxHeight:  " << theMaxHeight
+         << "\n";
+   }
+}
+
+ossim_uint32 ossimDtedTileSource::getImageTileWidth() const
+{
+   return 0;
+}
+
+ossim_uint32 ossimDtedTileSource::getImageTileHeight() const
+{
+   return 0;
+}
+
+ossim_uint32 ossimDtedTileSource::getNumberOfInputBands() const
+{
+   return 1;
+}
+
+double ossimDtedTileSource::getNullPixelValue(ossim_uint32 /* band */)const
+{
+   if(theMetaData.getNumberOfBands())
+   {
+      return theMetaData.getNullPix(0);
+   }
+   return -32767.0;
+}
+double ossimDtedTileSource::getMinPixelValue(ossim_uint32 band)const
+{
+   if(theMetaData.getNumberOfBands())
+   {
+      return theMetaData.getMinPix(band);
+   }
+   return theMinHeight;
+}
+
+ double ossimDtedTileSource::getMaxPixelValue(ossim_uint32 band)const
+{
+   if(theMetaData.getNumberOfBands())
+   {
+      return theMetaData.getMaxPix(band);
+   }
+   return theMaxHeight;
+}
+
+void ossimDtedTileSource::getPostSpacing(ossimDpt& postSpacing) const
+{
+   postSpacing.x = thePostSpacing.x;
+   postSpacing.y = thePostSpacing.y;
+}
+
+ossimRefPtr<ossimProperty> ossimDtedTileSource::getProperty(
+   const ossimString& name)const
+{
+   // look in base class.
+   ossimRefPtr<ossimProperty> result = ossimImageHandler::getProperty(name);
+
+   if (result.valid() == false)
+   {
+      ossimDtedInfo info;
+      if (info.open(theImageFile))
+      {
+         result = info.getProperty(name);
+      }
+   }
+
+   return result;
+}
+
+void ossimDtedTileSource::getPropertyNames(
+   std::vector<ossimString>& propertyNames) const
+{
+   ossimImageHandler::getPropertyNames(propertyNames);
+
+   ossimDtedInfo info;
+   if (info.open(theImageFile))
+   {
+      info.getPropertyNames(propertyNames);
+   }
+}
+
+const ossimDtedTileSource& ossimDtedTileSource::operator=(const  ossimDtedTileSource& rhs)
+{
+   return rhs;
+} 
+
+ossimDtedTileSource::ossimDtedTileSource(const ossimDtedTileSource&)
+{
+}
+
+
diff --git a/src/ossim/imaging/ossimERSFileWriter.cpp b/ossim/src/ossim/imaging/ossimERSFileWriter.cpp
similarity index 100%
rename from src/ossim/imaging/ossimERSFileWriter.cpp
rename to ossim/src/ossim/imaging/ossimERSFileWriter.cpp
diff --git a/ossim/src/ossim/imaging/ossimERSTileSource.cpp b/ossim/src/ossim/imaging/ossimERSTileSource.cpp
new file mode 100644
index 0000000..334d823
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimERSTileSource.cpp
@@ -0,0 +1,220 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Chong-Ket Chuah
+//
+// Description:
+//
+// Implementation for the class "ossimERSTileSource".  ossimERSTileSource
+// is used for reading ER Mapper raster file format.  The format consists
+// of a raster file with no extension and a header file with the same name 
+// as the raster file but with an .ers extension.
+//
+//*******************************************************************
+//  $Id: ossimERSTileSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimERSTileSource.h>
+#include <ossim/support_data/ossimERS.h>
+
+#include <ossim/base/ossimDirectory.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/imaging/ossimImageGeometryRegistry.h>
+
+RTTI_DEF1(ossimERSTileSource, "ossimERSTileSource", ossimGeneralRasterTileSource);
+
+//*******************************************************************
+// Public Constructor:
+//*******************************************************************
+ossimERSTileSource::ossimERSTileSource()
+   :  ossimGeneralRasterTileSource(),
+      theHdr(NULL)
+{
+}
+
+//*******************************************************************
+// Public Constructor:
+//*******************************************************************
+ossimERSTileSource::ossimERSTileSource(const ossimKeywordlist& kwl,
+                                               const char* prefix)
+   :  ossimGeneralRasterTileSource(),
+      theHdr(NULL)
+{
+   if (loadState(kwl, prefix) == false)
+   {
+      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+   }
+}
+
+//*******************************************************************
+// Destructor:
+//*******************************************************************
+ossimERSTileSource::~ossimERSTileSource()
+{
+   if (theHdr)
+   {
+      delete theHdr;
+      theHdr = NULL;
+   }
+}
+
+bool ossimERSTileSource::open(const ossimFilename& fileName)
+{
+   // Open and parse the header file
+   theHdr = new ossimERS(fileName);
+   
+//   theHdr->dump(cout);
+   
+   if(theHdr->errorStatus() == ossimErrorCodes::OSSIM_ERROR)
+   {
+      delete theHdr;
+      theHdr = NULL;
+      return false;
+   }
+   else
+   {
+      vector<ossimFilename> f;
+	  ossimFilename fne;
+	  ossimFilename fpath = fileName.path();
+	  if (fpath.empty())
+		fne = fileName.fileNoExtension();
+	  else
+		fne = fpath+"/"+fileName.fileNoExtension();
+      f.push_back(fne);
+      ossimGeneralRasterInfo genRasterInfo(f,
+                                           theHdr->theCelltype,
+                                           OSSIM_BIL,
+                                           theHdr->theBands,
+                                           theHdr->theLine,
+                                           theHdr->theSample,
+                                           0,
+                                           ossimGeneralRasterInfo::NONE,
+                                           0);
+      if(theHdr->theHasNullCells)
+      {
+         ossim_uint32 i = 0;
+         ossim_uint32 bands = static_cast<ossim_uint32>(theHdr->theBands);
+         for(i = 0; i < bands; ++i)
+         {
+            genRasterInfo.getImageMetaData().setNullPix(i, theHdr->theNullCell);
+         }
+      }
+      ossimFilename metadataFile = fne;
+      metadataFile = metadataFile + ".omd";
+
+      if(metadataFile.exists())
+      {
+         ossimKeywordlist kwl;
+      
+         kwl.addFile(metadataFile.c_str());
+      
+         theMetaData.loadState(kwl);
+         ossim_uint32 i = 0;
+         ossim_uint32 bands = static_cast<ossim_uint32>(theHdr->theBands);
+         for(i = 0; i < bands; ++i)
+         {
+            if(theMetaData.getMinValuesValidFlag())
+            {
+               genRasterInfo.getImageMetaData().setMinPix(i, theMetaData.getMinPix(i));
+            }
+            if(theMetaData.getMaxValuesValidFlag())
+            {
+               genRasterInfo.getImageMetaData().setMaxPix(i, theMetaData.getMaxPix(i));
+            }
+            if(theMetaData.getNullValuesValidFlag())
+            {
+               genRasterInfo.getImageMetaData().setNullPix(i, theMetaData.getNullPix(i));
+            }
+         }
+      }
+      ossimNotify(ossimNotifyLevel_INFO)
+         << "general raster info is\n";
+      genRasterInfo.print(ossimNotify(ossimNotifyLevel_INFO));
+      ossimGeneralRasterTileSource::open(genRasterInfo);
+   }
+	   
+   return true;
+}
+   
+
+ossimRefPtr<ossimImageGeometry> ossimERSTileSource::getImageGeometry()
+{
+   if ( !theGeometry )
+   {
+      // Check for external geom:
+      theGeometry = getExternalImageGeometry();
+      
+      if ( !theGeometry )
+      {
+         
+         theGeometry = new ossimImageGeometry;
+
+         if(theHdr)
+         {
+            ossimKeywordlist kwl;
+            if ( theHdr->toOssimProjectionGeom(kwl) )
+            {
+               theGeometry->loadState(kwl);  
+            }
+         }
+
+         // At this point it is assured theGeometry is set.
+         
+         //---
+         // WARNING:
+         // Must create/set the geometry at this point or the next call to
+         // ossimImageGeometryRegistry::extendGeometry will put us in an infinite loop
+         // as it does a recursive call back to ossimImageHandler::getImageGeometry().
+         //---         
+         
+         // Check for set projection.
+         if ( !theGeometry->getProjection() )
+         {
+            // Try factories for projection.
+            ossimImageGeometryRegistry::instance()->extendGeometry(this);
+         }
+      }
+
+      // Set image things the geometry object should know about.
+      initImageParameters( theGeometry.get() );
+   }
+   return theGeometry;
+}
+
+bool ossimERSTileSource::loadState(const ossimKeywordlist& kwl,
+                                       const char* prefix)
+{
+   const char* lookup = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
+
+   if (lookup)
+   {
+      ossimFilename fileName = lookup;
+
+      bool result =  open(fileName);
+      ossimImageSource::loadState(kwl, prefix);
+      return result;
+   }
+      
+   return ossimGeneralRasterTileSource::loadState(kwl, prefix);
+}
+
+ossimString ossimERSTileSource::getShortName() const
+{
+   return ossimString("ERS");
+}
+
+ossimString ossimERSTileSource::getLongName() const
+{
+   return ossimString("ER Mapper Raster");
+}
+
+ossimString  ossimERSTileSource::className() const
+{
+   return ossimString("ossimERSTileSource");
+}
+
+
diff --git a/ossim/src/ossim/imaging/ossimEastingNorthingCutter.cpp b/ossim/src/ossim/imaging/ossimEastingNorthingCutter.cpp
new file mode 100644
index 0000000..eff7d7f
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimEastingNorthingCutter.cpp
@@ -0,0 +1,203 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+// $Id: ossimEastingNorthingCutter.cpp 23664 2015-12-14 14:17:27Z dburken $
+//----------------------------------------------------------------------------
+
+#include <sstream>
+#include <ossim/imaging/ossimEastingNorthingCutter.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimTrace.h>
+
+RTTI_DEF2(ossimEastingNorthingCutter, "ossimEastingNorthingCutter", ossimRectangleCutFilter, ossimViewInterface);
+
+static ossimTrace traceDebug(ossimString("ossimEastingNorthingCutter:debug"));
+
+
+ossimEastingNorthingCutter::ossimEastingNorthingCutter(ossimObject* owner,
+                                                       ossimImageSource* inputSource)
+   :ossimRectangleCutFilter(owner,
+                            inputSource),
+    ossimViewInterface(0),
+    theViewProjection(0)
+{
+   theUlEastingNorthing.makeNan();
+   theLrEastingNorthing.makeNan();
+   theCutType = OSSIM_RECTANGLE_NULL_OUTSIDE;
+}
+
+ossimEastingNorthingCutter::ossimEastingNorthingCutter(ossimImageSource* inputSource)
+   :ossimRectangleCutFilter(inputSource),
+    ossimViewInterface(0),
+    theViewProjection(0)
+{
+   theUlEastingNorthing.makeNan();
+   theLrEastingNorthing.makeNan();
+   theCutType = OSSIM_RECTANGLE_NULL_OUTSIDE;
+}
+
+ossimEastingNorthingCutter::~ossimEastingNorthingCutter()
+{
+}
+
+void ossimEastingNorthingCutter::setEastingNorthingRectangle(const ossimDpt& ul,
+                                                             const ossimDpt& lr)
+{
+   theUlEastingNorthing = ul;
+   theLrEastingNorthing = lr;
+
+   transformVertices();
+}
+
+ossimDpt ossimEastingNorthingCutter::getUlEastingNorthing()const
+{
+   return theUlEastingNorthing;
+}
+
+ossimDpt ossimEastingNorthingCutter::getLrEastingNorthing()const
+{
+   return theLrEastingNorthing;
+}
+
+
+void ossimEastingNorthingCutter::initialize()
+{
+   ossimRectangleCutFilter::initialize();
+   transformVertices();
+}
+
+bool ossimEastingNorthingCutter::saveState(ossimKeywordlist& kwl,
+                                           const char* prefix)const
+{
+   kwl.add(prefix,
+           "ul_en",
+           ossimString::toString(theUlEastingNorthing.x) + " " +
+           ossimString::toString(theUlEastingNorthing.y),
+           true);
+   kwl.add(prefix,
+           "lr_en",
+           ossimString::toString(theLrEastingNorthing.x) + " " +
+           ossimString::toString(theLrEastingNorthing.y),
+           true);
+
+   return ossimRectangleCutFilter::saveState(kwl, prefix);
+}
+
+bool ossimEastingNorthingCutter::loadState(const ossimKeywordlist& kwl,
+                                           const char* prefix)
+{
+   const char *ul = kwl.find(prefix,
+                             "ul_en");
+   const char *lr = kwl.find(prefix,
+                             "lr_en");
+
+   theUlEastingNorthing.makeNan();
+   theLrEastingNorthing.makeNan();
+   
+   if(ul)
+   {
+      istringstream in(ul);
+      ossimString x;
+      ossimString y;
+      
+      in >> x >> y;
+      
+      theUlEastingNorthing.x = x.toDouble();
+      theUlEastingNorthing.y = y.toDouble();
+      
+   }
+   
+   if(lr)
+   {
+      istringstream in(lr);
+      ossimString x;
+      ossimString y;
+      
+      in >> x >> y;
+      
+      theLrEastingNorthing.x = x.toDouble();
+      theLrEastingNorthing.y = y.toDouble();
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimEastingNorthingCutter::loadState DEBUG:"
+         << "\ntheUlEastingNorthing:  " << theUlEastingNorthing
+         << "\ntheLrEastingNorthing:  " << theLrEastingNorthing
+         << endl;
+   }
+
+   return ossimRectangleCutFilter::loadState(kwl, prefix);
+}
+
+bool ossimEastingNorthingCutter::setView(ossimObject* baseObject)
+{
+   ossimProjection* tempProj = PTR_CAST(ossimProjection,
+                                        baseObject);
+   if(!tempProj)
+   {
+      return false;
+   }
+   
+
+   theViewProjection = tempProj;
+
+   transformVertices();
+
+   return true;
+}
+
+ossimObject* ossimEastingNorthingCutter::getView()
+{
+   return theViewProjection.get();
+}
+
+const ossimObject* ossimEastingNorthingCutter::getView()const
+{
+   return theViewProjection.get();
+}
+
+void ossimEastingNorthingCutter::transformVertices()
+{
+   theRectangle.makeNan();
+
+   if(theUlEastingNorthing.hasNans()||
+      theLrEastingNorthing.hasNans()||
+      (!theViewProjection))
+   {
+      return;
+   }
+
+   ossimMapProjection* mapProj = PTR_CAST(ossimMapProjection,
+                                          theViewProjection.get());
+   ossimDpt ul;
+   ossimDpt lr;
+   ossimDpt easting;
+   ossimDpt northing;
+   if(mapProj)
+   {
+      mapProj->eastingNorthingToLineSample(theUlEastingNorthing, ul);
+      mapProj->eastingNorthingToLineSample(theLrEastingNorthing, lr);
+
+      ossimDrect drect(ul.x, ul.y, lr.x, lr.y);
+
+      theRectangle = drect;
+
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimEastingNorthingCutter::transformVertices DEBUG:"
+            << "original drect:  " << drect
+            << "\ntheRectangle:  " << theRectangle
+            << endl;
+      }
+   }
+}
+
diff --git a/ossim/src/ossim/imaging/ossimEdgeFilter.cpp b/ossim/src/ossim/imaging/ossimEdgeFilter.cpp
new file mode 100644
index 0000000..904858c
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimEdgeFilter.cpp
@@ -0,0 +1,650 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimEdgeFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimEdgeFilter.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/base/ossimStringProperty.h>
+
+RTTI_DEF1(ossimEdgeFilter, "ossimEdgeFilter", ossimImageSourceFilter);
+
+#define PROP_EDGE_FILTER "Edge type"
+
+ossimEdgeFilter::ossimEdgeFilter(ossimObject* owner)
+   :ossimImageSourceFilter(owner),
+    theTile(NULL),
+    theFilterType("Sobel")
+{
+}
+
+ossimEdgeFilter::ossimEdgeFilter(ossimImageSource* inputSource)
+   :ossimImageSourceFilter(inputSource),
+    theTile(NULL),
+    theFilterType("Sobel")
+{
+}
+
+ossimEdgeFilter::ossimEdgeFilter(ossimObject* owner,
+                                   ossimImageSource* inputSource)
+   :ossimImageSourceFilter(owner, inputSource),
+    theTile(NULL),
+    theFilterType("Sobel")
+{
+}
+
+ossimRefPtr<ossimImageData> ossimEdgeFilter::getTile(const ossimIrect& rect,
+                                                     ossim_uint32 resLevel)
+{
+   if(!isSourceEnabled())
+   {
+      return ossimImageSourceFilter::getTile(rect, resLevel);
+   }
+
+   // expand the rect out to cver the 3x3 horizontal and vertical
+   // kernel.
+   //
+   ossimIrect requestRect = rect;
+
+   adjustRequestRect(requestRect);
+   
+   ossimRefPtr<ossimImageData> inputData =
+      ossimImageSourceFilter::getTile(requestRect, resLevel);
+
+   if(!inputData.valid() || (!inputData->getBuf()))
+   {
+      return inputData;
+   }
+
+   if(!theTile.valid()) initialize();
+   if(!theTile.valid()) return theTile;
+      
+   theTile->setImageRectangleAndBands(rect, inputData->getNumberOfBands());
+   
+   switch(theTile->getScalarType())
+   {
+   case OSSIM_UCHAR:
+   {
+      runFilter((ossim_uint8)0,
+                inputData);
+      break;
+   }
+   case OSSIM_FLOAT:
+   case OSSIM_NORMALIZED_FLOAT:
+   {
+      runFilter((ossim_float32)0,
+                inputData);
+      break;
+   }
+   case OSSIM_USHORT16:
+   case OSSIM_USHORT11:
+   {
+      runFilter((ossim_uint16)0,
+                inputData);
+      break;
+   }
+   case OSSIM_SSHORT16:
+   {
+      runFilter((ossim_sint16)0,
+                inputData);
+      break;
+   }
+   case OSSIM_DOUBLE:
+   case OSSIM_NORMALIZED_DOUBLE:
+   {
+      runFilter((ossim_float64)0,
+                inputData);
+      break;
+   }
+   default:
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "ossimEdgeFilter::getTile WARN: Scalar type = " << theTile->getScalarType()
+                                         << " Not supported by ossimEdgeFilter" << std::endl;
+      break;
+   }
+   }
+
+   return theTile;
+}
+
+void ossimEdgeFilter::initialize()
+{
+   ossimImageSourceFilter::initialize();
+
+   theTile = NULL;
+
+   if(!isSourceEnabled())
+   {
+      return;
+   }
+   
+   theTile = ossimImageDataFactory::instance()->create(this, this);
+   if(theTile.valid())
+   {
+      theTile->initialize();
+   }
+
+}
+
+
+void ossimEdgeFilter::getFilterTypeNames(
+   std::vector<ossimString>& filterNames)const
+{
+   filterNames.push_back("Laplacian");
+   filterNames.push_back("Prewitt");
+   filterNames.push_back("Roberts");
+   filterNames.push_back("Sobel");
+   filterNames.push_back("LocalMax8");
+}
+
+ossimString ossimEdgeFilter::getFilterType()const
+{
+   return theFilterType;
+}
+
+void ossimEdgeFilter::setFilterType(const ossimString& filterType)
+{
+   ossimString tempFilterType = filterType;
+   tempFilterType = tempFilterType.downcase();
+   
+   if(tempFilterType.contains("sob"))
+   {
+      theFilterType = "Sobel";
+   }
+   else if(tempFilterType.contains("lap"))
+   {
+      theFilterType = "Laplacian";
+   }
+   else if(tempFilterType.contains("prew"))
+   {
+      theFilterType = "Prewitt";
+   }
+   else if(tempFilterType.contains("rob"))
+   {
+      theFilterType = "Roberts";
+   }
+   else if(tempFilterType.contains("localmax"))
+   {
+      theFilterType = "LocalMax8";
+   }
+   else
+   {
+      theFilterType = "Sobel";
+   }
+}
+
+void ossimEdgeFilter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property) return;
+   
+   if(property->getName() == PROP_EDGE_FILTER)
+   {
+      theFilterType = property->valueToString();
+   }
+   else 
+   {
+      ossimImageSourceFilter::setProperty(property.get());
+   }
+
+}
+
+ossimRefPtr<ossimProperty> ossimEdgeFilter::getProperty(const ossimString& name)const
+{
+   if(name == PROP_EDGE_FILTER)
+   {
+      std::vector<ossimString> filterNames;
+      
+      getFilterTypeNames(filterNames);
+      ossimStringProperty* stringProp = new ossimStringProperty(PROP_EDGE_FILTER,
+								theFilterType,
+								false,
+								filterNames);
+      stringProp->clearChangeType();
+      stringProp->setReadOnlyFlag(false);
+      stringProp->setCacheRefreshBit();
+
+      return stringProp;
+   }
+
+   return ossimImageSourceFilter::getProperty(name);
+}
+
+void ossimEdgeFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageSourceFilter::getPropertyNames(propertyNames);
+   
+   propertyNames.push_back(PROP_EDGE_FILTER);
+}
+
+
+void ossimEdgeFilter::adjustRequestRect(ossimIrect& requestRect)const
+{
+   ossimString filterType = theFilterType;
+   filterType = filterType.downcase();
+   ossimIrect rect = requestRect;
+   if(filterType.contains("sob")||
+      filterType.contains("lap")||
+      filterType.contains("pre")||
+      filterType.contains("localmax"))
+   {
+      requestRect = ossimIrect(rect.ul().x - 1,
+                               rect.ul().y - 1,
+                               rect.lr().x + 1,
+                               rect.lr().y + 1);
+   }
+   else if(filterType.contains("rob"))
+   {
+      requestRect = ossimIrect(rect.ul().x,
+                               rect.ul().y,
+                               rect.lr().x + 1,
+                               rect.lr().y + 1);
+   }
+   else
+   {
+      requestRect = ossimIrect(rect.ul().x - 1,
+                               rect.ul().y - 1,
+                               rect.lr().x + 1,
+                               rect.lr().y + 1);
+   }
+}
+
+template <class T>
+void ossimEdgeFilter::runFilter(T dummyVariable,
+                                ossimRefPtr<ossimImageData> inputData)
+{
+   ossimString filterType = theFilterType;
+   filterType = filterType.downcase();
+   
+   if(filterType.contains("sobel"))
+   {
+      runSobelFilter(dummyVariable, inputData);
+   }
+   else if(filterType.contains("lap"))
+   {
+      runLaplacianFilter(dummyVariable, inputData);
+   }
+   else if(filterType.contains("pre"))
+   {
+      runPrewittFilter(dummyVariable, inputData);
+   }
+   else if(filterType.contains("rob"))
+   {
+      runRobertsFilter(dummyVariable, inputData);
+   }
+   else if(filterType.contains("localmax"))
+   {
+      runLocalMax8Filter(dummyVariable, inputData);
+   }
+   else 
+   {
+      theTile->makeBlank();
+   }
+}
+
+template <class T>
+void ossimEdgeFilter::runSobelFilter(T /* dummyVariable */,
+                                     ossimRefPtr<ossimImageData> inputData)
+{
+   ossim_uint32 bandIdx = 0;
+   ossim_uint32 numberOfBands = inputData->getNumberOfBands();
+   double horizontalValue = 0.0;
+   double verticalValue = 0.0;
+   double value = 0.0;
+   // ossim_uint32 valueIdx = 0;
+   ossim_uint32 x = 0;
+   ossim_uint32 y = 0;
+   ossim_uint32 width  = theTile->getWidth();
+   ossim_uint32 height = theTile->getHeight();
+   ossim_int32 rowIncrement  = inputData->getWidth();
+   ossim_int32 rowIncrement2 = 2*inputData->getWidth();
+   
+   for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
+   {
+      T* inputBuf  = static_cast<T*>(inputData->getBuf(bandIdx));
+      T* outputBuf = static_cast<T*>(theTile->getBuf(bandIdx));
+      T np         = static_cast<T>(theTile->getNullPix(bandIdx));
+      T minP       = static_cast<T>(theTile->getMinPix(bandIdx));
+      T maxP       = static_cast<T>(theTile->getMaxPix(bandIdx));
+
+      if(inputBuf&&outputBuf)
+      {
+         for(y = 0; y < height; ++y)
+         {
+            for(x = 0; x < width; ++x)
+            {
+               if( (*(inputBuf + rowIncrement + 1) != np))
+               {
+                  horizontalValue = ((double)inputBuf[0] - (double)inputBuf[rowIncrement2]) +
+                                    ((double)(inputBuf[1]*2.0) - (double)( inputBuf[rowIncrement2+1]*2.0)) +
+                                    ((double)(inputBuf[2]) - (double)(inputBuf[rowIncrement2+2]));
+
+                   verticalValue   = ((double)(inputBuf[2]) + (double)inputBuf[rowIncrement+2]*2.0 + (double)inputBuf[rowIncrement2+2]) -
+                                     (double)(inputBuf[0] + 2.0*(double)inputBuf[rowIncrement] + (double)inputBuf[rowIncrement2]);
+                  
+                  value = sqrt(horizontalValue*horizontalValue +  verticalValue*verticalValue);
+
+                  if((value == np) ||
+                     (value < minP))
+                  {
+                     *outputBuf = (static_cast<T>(minP));
+                  }
+                  else if(value > maxP)
+                  {
+                     *outputBuf = (static_cast<T>(maxP));
+                  }
+                  else
+                  {
+                     *outputBuf = (static_cast<T>(value));
+                  }
+                  
+               }
+               else
+               {
+                  *outputBuf = np;
+               }
+               ++outputBuf;
+               ++inputBuf;
+            }
+            inputBuf+=2;
+         }
+      }
+   }
+   theTile->validate();
+}
+
+template <class T>
+void ossimEdgeFilter::runPrewittFilter(T /* dummyVariable */,
+                                       ossimRefPtr<ossimImageData> inputData)
+{
+   ossim_uint32 bandIdx = 0;
+   ossim_uint32 numberOfBands = inputData->getNumberOfBands();
+   double horizontalValue = 0.0;
+   double verticalValue = 0.0;
+   double value = 0.0;
+   // ossim_uint32 valueIdx = 0;
+   ossim_uint32 x = 0;
+   ossim_uint32 y = 0;
+   ossim_uint32 width  = theTile->getWidth();
+   ossim_uint32 height = theTile->getHeight();
+   ossim_int32 rowIncrement  = inputData->getWidth();
+   ossim_int32 rowIncrement2 = 2*inputData->getWidth();
+   
+   for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
+   {
+      T* inputBuf  = static_cast<T*>(inputData->getBuf(bandIdx));
+      T* outputBuf = static_cast<T*>(theTile->getBuf(bandIdx));
+      T np         = static_cast<T>(theTile->getNullPix(bandIdx));
+      T minP       = static_cast<T>(theTile->getMinPix(bandIdx));
+      T maxP       = static_cast<T>(theTile->getMaxPix(bandIdx));
+
+      if(inputBuf&&outputBuf)
+      {
+         for(y = 0; y < height; ++y)
+         {
+            for(x = 0; x < width; ++x)
+            {
+               if( (*(inputBuf + rowIncrement + 1) != np))
+               {
+                  horizontalValue = ((double)inputBuf[0] - (double)inputBuf[rowIncrement2]) +
+                                    ((double)(inputBuf[1]) - (double)( inputBuf[rowIncrement2+1])) +
+                                    ((double)(inputBuf[2]) - (double)(inputBuf[rowIncrement2+2]));
+
+                   verticalValue   = ((double)(inputBuf[2]) + (double)inputBuf[rowIncrement+2] + (double)inputBuf[rowIncrement2+2]) -
+                                     ((double)inputBuf[0] + (double)inputBuf[rowIncrement] + (double)inputBuf[rowIncrement2]);
+                  
+                  value = sqrt(horizontalValue*horizontalValue +  verticalValue*verticalValue);
+
+                  if((value == np) ||
+                     (value < minP))
+                  {
+                     *outputBuf = (static_cast<T>(minP));
+                  }
+                  else if(value > maxP)
+                  {
+                     *outputBuf = (static_cast<T>(maxP));
+                  }
+                  else
+                  {
+                     *outputBuf = (static_cast<T>(value));
+                  }
+                  
+               }
+               else
+               {
+                  *outputBuf = np;
+               }
+               ++outputBuf;
+               ++inputBuf;
+            }
+            inputBuf+=2;
+         }
+      }
+   }
+   theTile->validate();
+}
+
+template <class T>
+void ossimEdgeFilter::runRobertsFilter(T /* dummyVariable */,
+                                       ossimRefPtr<ossimImageData> inputData)
+{
+   ossim_uint32 bandIdx = 0;
+   ossim_uint32 numberOfBands = inputData->getNumberOfBands();
+   double v1 = 0.0;
+   double v2 = 0.0;
+   double value = 0.0;
+   // ossim_uint32 valueIdx = 0;
+   ossim_uint32 x = 0;
+   ossim_uint32 y = 0;
+   ossim_uint32 width  = theTile->getWidth();
+   ossim_uint32 height = theTile->getHeight();
+   ossim_int32 rowIncrement  = inputData->getWidth();
+   
+   for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
+   {
+      T* inputBuf  = static_cast<T*>(inputData->getBuf(bandIdx));
+      T* outputBuf = static_cast<T*>(theTile->getBuf(bandIdx));
+      T np         = static_cast<T>(theTile->getNullPix(bandIdx));
+      T minP       = static_cast<T>(theTile->getMinPix(bandIdx));
+      T maxP       = static_cast<T>(theTile->getMaxPix(bandIdx));
+
+      if(inputBuf&&outputBuf)
+      {
+         for(y = 0; y < height; ++y)
+         {
+            for(x = 0; x < width; ++x)
+            {
+               if( (*inputBuf) != np)
+               {
+                  v1 = (double)inputBuf[0] - (double)(inputBuf[rowIncrement+1]);
+
+                  v2   = (double)inputBuf[1] - (double)inputBuf[rowIncrement];
+                  
+                  value = sqrt(v1*v1 +  v2*v2);
+
+                  if((value == np) ||
+                     (value < minP))
+                  {
+                     *outputBuf = (static_cast<T>(minP));
+                  }
+                  else if(value > maxP)
+                  {
+                     *outputBuf = (static_cast<T>(maxP));
+                  }
+                  else
+                  {
+                     *outputBuf = (static_cast<T>(value));
+                  }
+                  
+               }
+               else
+               {
+                  *outputBuf = np;
+               }
+               ++outputBuf;
+               ++inputBuf;
+            }
+            ++inputBuf;
+         }
+      }
+   }
+   theTile->validate();
+}
+
+template <class T>
+void ossimEdgeFilter::runLaplacianFilter(T /* dummyVariable */,
+                                         ossimRefPtr<ossimImageData> inputData)
+{
+   ossim_uint32 bandIdx = 0;
+   ossim_uint32 numberOfBands = inputData->getNumberOfBands();
+   // double horizontalValue = 0.0;
+   // double verticalValue = 0.0;
+   double value = 0.0;
+   // ossim_uint32 valueIdx = 0;
+   ossim_uint32 x = 0;
+   ossim_uint32 y = 0;
+   ossim_uint32 width  = theTile->getWidth();
+   ossim_uint32 height = theTile->getHeight();
+   ossim_int32 rowIncrement  = inputData->getWidth();
+   ossim_int32 rowIncrement2 = 2*inputData->getWidth();
+   
+   for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
+   {
+      T* inputBuf  = static_cast<T*>(inputData->getBuf(bandIdx));
+      T* outputBuf = static_cast<T*>(theTile->getBuf(bandIdx));
+      T np         = static_cast<T>(theTile->getNullPix(bandIdx));
+      T minP       = static_cast<T>(theTile->getMinPix(bandIdx));
+      T maxP       = static_cast<T>(theTile->getMaxPix(bandIdx));
+
+      if(inputBuf&&outputBuf)
+      {
+         for(y = 0; y < height; ++y)
+         {
+            for(x = 0; x < width; ++x)
+            {
+               if( (*(inputBuf + rowIncrement + 1) != np))
+               {
+                  
+                  value = fabs(((double)inputBuf[rowIncrement + 1]*4.0) -
+                               ((double)inputBuf[1] + (double)inputBuf[rowIncrement] + (double)inputBuf[rowIncrement + 2] + (double)inputBuf[rowIncrement2+1]));
+
+                  if((value == np) ||
+                     (value < minP))
+                  {
+                     *outputBuf = (static_cast<T>(minP));
+                  }
+                  else if(value > maxP)
+                  {
+                     *outputBuf = (static_cast<T>(maxP));
+                  }
+                  else
+                  {
+                     *outputBuf = (static_cast<T>(value));
+                  }
+                  
+               }
+               else
+               {
+                  *outputBuf = np;
+               }
+               ++outputBuf;
+               ++inputBuf;
+            }
+            inputBuf+=2;
+         }
+      }
+   }
+   theTile->validate();
+}
+
+template <class T>
+void ossimEdgeFilter::runLocalMax8Filter(T /* dummyVariable */,
+                                         ossimRefPtr<ossimImageData> inputData)
+{
+   ossim_uint32 bandIdx = 0;
+   ossim_uint32 numberOfBands = inputData->getNumberOfBands();
+  
+   ossim_uint32 x = 0;
+   ossim_uint32 y = 0;
+   ossim_uint32 width  = theTile->getWidth();
+   ossim_uint32 height = theTile->getHeight();
+   ossim_int32 rowIncrement  = inputData->getWidth();
+   ossim_int32 rowIncrement2 = 2*inputData->getWidth(); 
+         
+   for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
+   {
+      //inputBuf has a 1 pixel edge compared to outputBuf
+      T* inputBuf  = static_cast<T*>(inputData->getBuf(bandIdx));
+      T* outputBuf = static_cast<T*>(theTile->getBuf(bandIdx));
+      T np         = static_cast<T>(inputData->getNullPix(bandIdx)); //changed to input Null            
+
+      if(inputBuf&&outputBuf)
+      {
+         //one pass: maybe faster if changed to two passes
+         T* outB;
+         T* inB;
+         
+      	outB = outputBuf;         
+         inB  = inputBuf;         
+         for(y = 0; y < height; ++y)
+         {
+            for(x = 0; x < width; ++x)
+            {
+               if (inB[1+rowIncrement] != np)
+               {
+                  *outB = max<T>(
+                           max<T>(
+                            max<T>(inB[0],inB[1]),
+                            max<T>(inB[2],inB[rowIncrement])),
+                           max<T>(
+                            max<T>(inB[rowIncrement+2],inB[rowIncrement2]),
+                            max<T>(inB[rowIncrement2+1],inB[rowIncrement2+2])
+                            ));
+               }
+               else
+               {
+                  *outB = np;
+               }
+               ++outB;
+               ++inB;
+            }
+            inB+=2; //go to next line, jump due to edge
+         }       
+      }      
+   }
+   theTile->validate();
+}
+
+bool ossimEdgeFilter::saveState(ossimKeywordlist& kwl,
+                                          const char* prefix)const
+{   
+   kwl.add(prefix,
+           PROP_EDGE_FILTER,
+           getFilterType(),
+           true);
+   
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
+
+bool ossimEdgeFilter::loadState(const ossimKeywordlist& kwl,
+                                          const char* prefix)
+{
+   const char* value = kwl.find(prefix,
+                                PROP_EDGE_FILTER );
+   if(value)
+   {
+      setFilterType(ossimString(value));
+   } else {
+      ossimNotify(ossimNotifyLevel_WARN) << "ossimEdgeFilter::loadState WARN: no filter type found" << std::endl;
+   }
+         
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
diff --git a/ossim/src/ossim/imaging/ossimElevImageSource.cpp b/ossim/src/ossim/imaging/ossimElevImageSource.cpp
new file mode 100644
index 0000000..902db87
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimElevImageSource.cpp
@@ -0,0 +1,822 @@
+//*******************************************************************
+// Copyright (C) 2002 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:  Class provides an elevation image source from the elevation
+// manager.
+// 
+//*******************************************************************
+//  $Id: ossimElevImageSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimElevImageSource.h>
+#include <ossim/elevation/ossimElevManager.h>
+#include <ossim/projection/ossimLlxyProjection.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ctime>
+
+RTTI_DEF1(ossimElevImageSource, "ossimElevImageSource", ossimImageSource)
+
+// Static trace for debugging
+static ossimTrace traceDebug("ossimElevImage:debug");
+   
+ossimElevImageSource::ossimElevImageSource()
+   :
+      ossimImageSource(NULL,
+                       0,
+                       0,
+                       true,
+                       false),// output list is not fixed
+      theElevManager(NULL),
+      theTile(NULL),
+      theTiePoint(),
+      theLatSpacing(0.0),
+      theLonSpacing(0.0),
+      theNumberOfLines(0),
+      theNumberOfSamps(0)
+{}
+
+ossimElevImageSource::ossimElevImageSource(ossimObject* owner)
+   :
+      ossimImageSource(owner,
+                       0,
+                       0,
+                       true,
+                       false),// output list is not fixed
+      theElevManager(NULL),
+      theTile(NULL),
+      theTiePoint(),
+      theLatSpacing(0.0),
+      theLonSpacing(0.0),
+      theNumberOfLines(0),
+      theNumberOfSamps(0)
+{}
+
+ossimElevImageSource::ossimElevImageSource(ossimObject* owner,
+                                           const ossimGpt& tie,
+                                           double latSpacing,
+                                           double lonSpacing,
+                                           ossim_uint32 numberLines,
+                                           ossim_uint32 numberSamples)
+   :
+      ossimImageSource(owner,
+                       0,
+                       0,
+                       true,
+                       false),// output list is not fixed
+      theElevManager(NULL),
+      theTile(NULL),
+      theTiePoint(tie),
+      theLatSpacing(latSpacing),
+      theLonSpacing(lonSpacing),
+      theNumberOfLines(numberLines),
+      theNumberOfSamps(numberSamples)
+{
+   initialize();
+}
+
+ossimElevImageSource::ossimElevImageSource(ossimObject* owner,
+                                           const ossimKeywordlist& kwl,
+                                           const char* prefix)
+   :
+      ossimImageSource(owner,
+                       0,
+                       0,
+                       true,
+                       false),
+      theElevManager(NULL),
+      theTile(NULL),
+      theTiePoint(),
+      theLatSpacing(0),
+      theLonSpacing(0),
+      theNumberOfLines(0),
+      theNumberOfSamps(0)
+{
+   if (loadState(kwl, prefix) == false)
+   {
+      setErrorStatus();
+   }
+}
+
+ossimElevImageSource::~ossimElevImageSource()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimElevImageSource::getTile(
+   const  ossimIrect& tile_rect,
+   ossim_uint32 resLevel)
+{
+   if (!theTile.get())
+   {
+      return theTile;
+   }
+   
+   // First make sure our tile is the right size.
+   ossim_int32 w = tile_rect.width();
+   ossim_int32 h = tile_rect.height();
+   ossim_int32 tileW = theTile->getWidth();
+   ossim_int32 tileH = theTile->getHeight();
+   if( (w != tileW) || (h != tileH) )
+   {
+      theTile->setWidth(w);
+      theTile->setHeight(h);
+      if((w*h)!=(tileW*tileH))
+      {
+         theTile->initialize();
+
+         //***
+         // Initialize can reset the min max to defaults if the min happens
+         // to be "0" so reset it just in case.
+         // NOTE:  We need to fix initialize!
+         //***
+         theTile->setMinPix(theElevManager->getMinHeightAboveMSL(), 0);
+         theTile->setMaxPix(theElevManager->getMaxHeightAboveMSL(), 0);
+      }
+   }
+
+   // Set the origin.
+   theTile->setOrigin(tile_rect.ul());
+      
+   
+   if(!isSourceEnabled())
+   {
+      // This tile source bypassed.
+      theTile->makeBlank();
+      return theTile;
+   }
+
+   //***
+   // No overview support yet...
+   //***
+   if (resLevel)
+   {
+      // NOTE:  Need to add overview support.
+      cerr << "ossimElevImageSource::getTile ERROR:\nOverviews not supported!"
+           << endl;
+      theTile->makeBlank();
+      return theTile;
+   }
+
+   ossimIrect image_rect = getImageRectangle(0);
+
+   if ( !tile_rect.intersects(image_rect) )
+   {
+      // No point in the tile falls within the set boundaries of this source.
+      theTile->makeBlank();
+      return theTile;
+   }
+
+   // Ok fill the tile with the data from the post...
+   ossimIrect clip_rect = tile_rect.clipToRect(image_rect);
+
+   if ( !tile_rect.completely_within(clip_rect) )
+   {
+      // Start with a blank tile since it won't be filled all the way.
+      theTile->makeBlank();
+   }
+
+
+   // Move the buffer pointer to the first valid pixel.
+   ossim_uint32 tile_width = theTile->getWidth();
+   
+   ossim_int32 start_offset = (clip_rect.lr().y - tile_rect.ul().y) * tile_width +
+      clip_rect.ul().x - tile_rect.ul().x;
+
+   //***
+   // Since most elevation formats have posts organized positive line up,
+   // start at the lower left side of the cell so all reads are going
+   // forward in the file.
+   //***
+   double start_lat = theTiePoint.latd() - theLatSpacing *
+      (clip_rect.lr().y - image_rect.ul().y);
+   if (start_lat < -90.0)
+   {
+      start_lat = -(start_lat + 180.0);  // Wrapped around the south poll.
+   }
+
+   double lon = theTiePoint.lond() + theLonSpacing *
+      (clip_rect.ul().x  - image_rect.ul().x);
+   if (lon > 180.0)
+   {
+      lon -= 360.0; // Went across the central meridian.
+   }
+
+   // Copy the data.
+   ossim_uint32 clipHeight = clip_rect.height();
+   ossim_uint32 clipWidth  = clip_rect.width();
+
+   // Get a pointer to the tile buffer.
+   ossim_float32* buf = static_cast<ossim_float32*>(theTile->getBuf());
+
+   for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
+   {
+      double lat = start_lat;
+      ossim_int32 offset = start_offset;
+      for (ossim_uint32 line = 0; line < clipHeight; ++line)
+      {
+         ossimGpt gpt(lat, lon);
+         buf[offset+sample] = theElevManager->getHeightAboveMSL(gpt);
+         
+         lat += theLatSpacing;
+         if (lat > 90) lat = 180.0 - lat;
+
+         offset -= tile_width;
+      }
+      
+      lon += theLonSpacing;
+      if (lon > 180.0) lon = lon - 360.0; // Went across the central meridian.
+   }
+   
+#if 0   
+   for (ossim_uint32 line = 0; line < clipHeight; ++line)
+   {
+      double lon = start_lon;
+      for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
+      {
+         ossimGpt gpt(lat, lon);
+         buf[sample] = theElevManager->getHeightAboveMSL(gpt);
+         lon += theLonSpacing;
+         if (start_lon > 180.0)
+         {
+            start_lon -= 360.0; // Went across the central meridian.
+         }
+      }
+
+      buf += tile_width;
+      lat -= theLatSpacing;
+      if (lat < -90.0) lat = -(lat + 180.0);// Wrapped around the south poll.
+   }
+#endif
+   
+   theTile->validate();
+   return theTile;
+}
+
+bool ossimElevImageSource::saveState(ossimKeywordlist& kwl,
+                                  const char* prefix) const
+{
+   static const char MODULE[] = "ossimElevImageSource::saveState";
+
+   if (kwl.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
+   {
+      cerr << MODULE
+           << " ERROR detected in keyword list!  State not saved."
+           << endl;
+      return false;
+   }
+
+   // Save the state of the base class.
+   ossimImageSource::saveState(kwl, prefix);
+
+   // Save the tie point.
+   kwl.add(prefix,
+           ossimKeywordNames::TIE_POINT_LAT_KW,
+           theTiePoint.latd(),
+           true);
+   kwl.add(prefix,
+           ossimKeywordNames::TIE_POINT_LON_KW,
+           theTiePoint.lond(),
+           true);
+
+   // Save the post spacing.
+   kwl.add(prefix,
+           ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT,
+           theLatSpacing,
+           true);
+   kwl.add(prefix,
+           ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON,
+           theLonSpacing,
+           true);
+
+   // Save the image size
+   kwl.add(prefix,
+           ossimKeywordNames::NUMBER_LINES_KW,
+           theNumberOfLines,
+           true);
+   kwl.add(prefix,
+           ossimKeywordNames::NUMBER_SAMPLES_KW,
+           theNumberOfSamps,
+           true);
+
+   // Save the min / max pixel values.
+   kwl.add(prefix,
+           ossimKeywordNames::MIN_VALUE_KW,
+           getMinPixelValue(0),
+           true);
+   kwl.add(prefix,
+           ossimKeywordNames::MAX_VALUE_KW,
+           getMaxPixelValue(0),
+           true);
+
+   return true;
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+bool ossimElevImageSource::loadState(const ossimKeywordlist& kwl,
+                                     const char* prefix)
+{
+   static const char MODULE[] = "ossimElevImageSource::loadState";
+
+   if (kwl.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
+   {
+      cerr << MODULE
+           << " ERROR detected in keyword list!  State not load."
+           << endl;
+      return false;
+   }
+
+   // Base class...
+   ossimImageSource::loadState(kwl, prefix);
+   
+   const char* lookup;
+
+   // Get the tie point.
+   lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_LAT_KW);
+   if (lookup)
+   {
+      theTiePoint.latd(ossimString(lookup).toDouble());
+   }
+   else
+   {
+      if (traceDebug())
+      {
+         CLOG << "DEBUG:"
+              << "\nRequired keyword not found:  "
+              << ossimKeywordNames::TIE_POINT_LAT_KW
+              << "\nReturning false"
+              << endl;
+      }
+
+      return false;
+   }
+   
+   lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_LON_KW);
+   if (lookup)
+   {
+      theTiePoint.lond(ossimString(lookup).toDouble());
+   }
+   else
+   {
+      if (traceDebug())
+      {
+         CLOG << "DEBUG:"
+              << "\nRequired keyword not found:  "
+              << ossimKeywordNames::TIE_POINT_LON_KW
+              << "\nReturning false"
+              << endl;
+      }
+
+      return false;
+   }
+
+   // Get the post spacing.
+   lookup = kwl.find(prefix, ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT);
+   if (lookup)
+   {
+      theLatSpacing = ossimString(lookup).toDouble();
+   }
+   else
+   {
+      if (traceDebug())
+      {
+         CLOG << "DEBUG:"
+              << "\nRequired keyword not found:  "
+              << ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT
+              << "\nReturning false"
+              << endl;
+      }
+
+      return false;
+   }
+
+   lookup = kwl.find(prefix, ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON);
+   if (lookup)
+   {
+      theLonSpacing = ossimString(lookup).toDouble();
+   }
+   else
+   {
+      if (traceDebug())
+      {
+         CLOG << "DEBUG:"
+              << "\nRequired keyword not found:  "
+              << ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON
+              << "\nReturning false"
+              << endl;
+      }
+
+      return false;
+   }
+
+   // Get the image size.
+   lookup = kwl.find(prefix, ossimKeywordNames::NUMBER_LINES_KW);
+   if (lookup)
+   {
+      theNumberOfLines = ossimString(lookup).toULong();
+   }
+   else
+   {
+      if (traceDebug())
+      {
+         CLOG << "DEBUG:"
+              << "\nRequired keyword not found:  "
+              << ossimKeywordNames::NUMBER_LINES_KW
+              << "\nReturning false"
+              << endl;
+      }
+
+      return false;
+   }
+
+   lookup = kwl.find(prefix, ossimKeywordNames::NUMBER_SAMPLES_KW);
+   if (lookup)
+   {
+      theNumberOfSamps = ossimString(lookup).toULong();
+   }
+   else
+   {
+      if (traceDebug())
+      {
+         CLOG << "DEBUG:"
+              << "\nRequired keyword not found:  "
+              << ossimKeywordNames::NUMBER_SAMPLES_KW
+              << "\nReturning false"
+              << endl;
+      }
+
+      return false;
+   }
+
+   initialize();
+
+   //***
+   // See if the min / max keyword was set and reset it.
+   // Note this must be done after initialize since it sets the min / max from
+   // the elevation manager.
+   //***
+   lookup = kwl.find(prefix, ossimKeywordNames::MIN_VALUE_KW);
+   if (lookup)
+   {
+      setMinPixelValue(ossimString(lookup).toDouble());
+   }
+   lookup = kwl.find(prefix, ossimKeywordNames::MAX_VALUE_KW);
+   if (lookup)
+   {
+      setMaxPixelValue(ossimString(lookup).toDouble());
+   }
+
+   if (getErrorStatus() != ossimErrorCodes::OSSIM_OK)
+   {
+      return false;
+   }
+
+   //***
+   // Reset the base class to have a fixed input list of "0" size.
+   // Note:  To not do this will result in a core dump destroying objects
+   // connected to this output.
+   //***
+   theInputObjectList.clear();
+   theInputListIsFixedFlag = true;
+   theOutputListIsFixedFlag = false;
+  
+   return true;
+}
+
+void ossimElevImageSource::initialize()
+{
+   static const char MODULE[] = "ossimElevImageSource::initialize";
+   
+   if (traceDebug()) CLOG << " Entered..." << endl;
+   
+   //***
+   // First see if the manager pointer has been captured.
+   //***
+   if (!theElevManager) theElevManager = ossimElevManager::instance();
+
+   if (!theElevManager)
+   {
+      setErrorStatus();
+      cerr << MODULE << "ERROR:\nNULL elevation manager pointer!"
+           << "\nObject not initialized!" << endl;
+      return;
+   }
+
+   // Basic sanity checks.
+   if (!theLatSpacing || !theLonSpacing ||
+       !theNumberOfLines || !theNumberOfSamps)
+   {
+      setErrorStatus();
+      cerr << MODULE << "ERROR:"
+           << "\nMust set latitude/longitude spacing and number of line and"
+           << " samples."
+           << "Object not initialized!" << endl;
+      return;
+      
+   }
+
+   // Check the ground point.
+   if ( theTiePoint.latd() > 90.0  || theTiePoint.latd() < -90.0  ||
+        theTiePoint.lond() > 180.0 || theTiePoint.lond() < -180.0 )
+   {
+      setErrorStatus();
+      cerr << MODULE << "ERROR:\nBogus tie point."
+           << "\nObject not initialized!" << endl;
+      return;
+   }
+
+   if (traceDebug())
+   {
+      CLOG << "DEBUG:"
+           << "\nTie point:  " << theTiePoint
+           << "\nLatitude spacing:  " << theLatSpacing
+           << "\nLongitude spacing:  " << theLonSpacing
+           << "\nLines:              " << theNumberOfLines
+           << "\nSamples:            " << theNumberOfSamps
+           << endl;
+   }
+   
+   //***
+   // Since this will return float data we need to set the min / max values
+   // of the data so that anybody who remaps it to eight bit will do it
+   // properly.  So scan the entire image rectangle using the manager.
+   // This will do two things, force the elevation manager to load all the
+   // cells, and at the same time the min / max elevation value will be set.
+   // NOTE:
+   // ??? Should the elevation manager clear the list of sources prior to
+   // the code segment so that the min / max is only from the cells we
+   // need!
+   //***
+
+   cout << "Initializing elevation manager..." << endl;
+
+#if 0
+   // Loop in the longitude or sample direction.
+   time_t start_t = time(NULL);
+   double lon = theTiePoint.lond();
+   for (ossim_uint32 samp = 0; samp < theNumberOfSamps; ++samp)
+   {
+      double lat = theTiePoint.latd() - theLatSpacing * (theNumberOfLines - 1);
+      if (lat < -90.0) lat = -(lat + 180.0); // Wrapped around the south poll.
+      
+      for (ossim_uint32 line = 0; line < theNumberOfLines; ++line)
+      {
+         ossimGpt gpt(lat, lon);
+         theElevManager->getHeightAboveMSL(gpt);
+
+         lat += theLatSpacing;
+         if (lat > 90) lat = 180 - lat; // Went across poll.
+      }
+      
+      lon += theLonSpacing;
+      if (lon > 180.0) lon -= 360.0; // Went across the central meridian.
+   }
+   time_t stop_t = time(NULL);
+   cout << "Finished loop two..." << endl;
+   cout << "Elapsed time for loop two:  " << (stop_t - start_t) << endl;
+#endif
+   
+   theTile = new ossimImageData(this,
+                                OSSIM_FLOAT);
+   theTile->initialize();
+
+   // Set the min / max for any normalization down the chain...
+   theTile->setMinPix(theElevManager->getMinHeightAboveMSL(), 0);
+   theTile->setMaxPix(theElevManager->getMaxHeightAboveMSL(), 0);
+
+   if (traceDebug())
+   {
+      CLOG << "DEBUG:"
+           << "\nMin pix:            " << theTile->getMinPix(0)
+           << "\nMax pix:            " << theTile->getMaxPix(0)
+           << endl;
+   }
+}
+
+ossimIrect ossimElevImageSource::getImageRectangle(ossim_uint32 reduced_res_level) const
+{
+   ossimIrect result(0, 0, theNumberOfSamps-1, theNumberOfLines-1);
+   
+   if (reduced_res_level != 0)
+   {
+      cerr << "ossimElevImageSource::getImageRectangle ERROR:"
+           << "\nOnly R0 is supported." << endl;
+   }
+
+   return result;
+}
+
+bool ossimElevImageSource::getImageGeometry(ossimKeywordlist& kwl,
+                                            const char* prefix)
+{
+   // Save off the image dimensions.
+   kwl.add(prefix,
+           ossimKeywordNames::NUMBER_LINES_KW,
+           theNumberOfLines,
+           true);
+   kwl.add(prefix,
+           ossimKeywordNames::NUMBER_SAMPLES_KW,
+           theNumberOfLines,
+           true);
+
+   // Save off the projection info (tie and post spacing).
+   ossimLlxyProjection proj(theTiePoint, theLatSpacing, theLonSpacing);
+   return proj.saveState(kwl, prefix);
+}
+
+void ossimElevImageSource::getDecimationFactor(ossim_uint32 resLevel, ossimDpt& result) const
+{
+   if (resLevel)
+   {
+      cerr << "ossimElevImageSource::getDecimationFactor ERROR:"
+           << "\nReduced res sets currently not supported!"
+           << endl;
+   }
+
+   result.line = 1.0;
+   result.samp = 1.0;
+}
+
+void ossimElevImageSource::getDecimationFactors(vector<ossimDpt>& decimations) const
+{
+   ossimDpt pt(1.0, 1.0);
+   decimations.clear();
+   decimations.push_back(pt);
+}
+
+ossim_uint32 ossimElevImageSource::getNumberOfDecimationLevels()const
+{
+   return 1;
+}
+
+ossim_uint32 ossimElevImageSource::getNumberOfInputBands() const
+{
+   return 1;
+}
+
+ossimScalarType ossimElevImageSource::getOutputScalarType() const
+{
+   return OSSIM_FLOAT;
+}
+
+ossim_uint32 ossimElevImageSource::getTileWidth() const
+{
+   if (theTile.get()) return theTile->getWidth();
+
+   return 0;
+}
+
+ossim_uint32 ossimElevImageSource::getTileHeight() const
+{
+   if (theTile.get()) return theTile->getHeight();
+
+   return 0;
+}
+
+void ossimElevImageSource::changeTileSize(const ossimIpt& size)
+{
+   if (traceDebug())
+   {
+      cout << "ossimElevImageSource::changeTileSize DEBUG:"
+           << "\nx size:  " << size.x
+           << "\ny size:  " << size.y
+           << endl;
+   }
+
+   if (!theTile)
+   {
+      cerr << "ossimElevImageSource::changeTileSize ERROR:"
+           << "\nObject not initialized!  Returning..." << endl;
+      return;
+   }
+
+   theTile = new ossimImageData(this,
+                                OSSIM_FLOAT,
+                                1,
+                                size.x,
+                                size.y);
+   theTile->initialize();
+   
+   // Set the min / max for any normalization down the chain...
+   theTile->setMinPix(theElevManager->getMinHeightAboveMSL(), 0);
+   theTile->setMaxPix(theElevManager->getMaxHeightAboveMSL(), 0);
+}
+
+ossim_uint32 ossimElevImageSource::getNumberOfLines(ossim_uint32 reduced_res_level) const
+{
+   if (reduced_res_level)
+   {
+      cerr << "ossimElevImageSource::getNumberOfLines ERROR:"
+           << "\nReduced res sets currently not supported!"
+           << endl;
+      return 0;
+   }
+
+   return theNumberOfLines;
+}
+
+ossim_uint32 ossimElevImageSource::getNumberOfSamples(ossim_uint32 reduced_res_level) const
+{
+   if (reduced_res_level)
+   {
+      cerr << "ossimElevImageSource::getNumberOfSamples ERROR:"
+           << "\nReduced res sets currently not supported!"
+           << endl;
+      return 0;
+   }
+
+   return theNumberOfSamps;
+}
+
+double ossimElevImageSource::getMinPixelValue(ossim_uint32 band) const
+{
+   if (band)
+   {
+      cerr << "ossimElevImageSource::getMinPixelValue ERROR:"
+           << "\nReduced res sets currently not supported!"
+           << endl;
+      return 0.0;
+   }
+
+   if (theTile.get())
+   {
+      return theTile->getMinPix(0);
+   }
+   else if (theElevManager)
+   {
+      return theElevManager->getMinHeightAboveMSL();
+   }
+
+   return 0.0;
+}
+
+double ossimElevImageSource::getMaxPixelValue(ossim_uint32 band) const
+{
+   if (band)
+   {
+      cerr << "ossimElevImageSource::getMaxPixelValue ERROR:"
+           << "\nReduced res sets currently not supported!"
+           << endl;
+      return 0.0;
+   }
+
+   if (theTile.get())
+   {
+      return theTile->getMaxPix(0);
+   }
+   else if (theElevManager)
+   {
+      return theElevManager->getMaxHeightAboveMSL();
+   }
+
+   return 0.0;
+}
+
+void ossimElevImageSource::setMinPixelValue(ossim_float64 min_pix)
+{
+   if (theTile.get()) 
+   {
+      theTile->setMinPix(min_pix, 0);
+      if (traceDebug())
+      {
+         cout << "ossimElevImageSource::setMinPixelValue DEBUG:"
+              << "\nMin pixel value:  " << min_pix
+              << endl;
+      }
+   }
+   else
+   {
+      cerr << "ossimElevImageSource::setMinPixelValue ERROR:"
+           << "\nObject not initialized!"
+           << endl;
+   }
+}
+
+void ossimElevImageSource::setMaxPixelValue(ossim_float64 max_pix)
+{
+   if (theTile.get()) 
+   {
+      theTile->setMaxPix(max_pix, 0);
+      if (traceDebug())
+      {
+         cout << "ossimElevImageSource::setMaxPixelValue DEBUG:"
+              << "\nMax pixel value:  " << max_pix
+              << endl;
+      }
+   }
+   else
+   {
+      cerr << "ossimElevImageSource::setMinPixelValue ERROR:"
+           << "\nObject not initialized!"
+           << endl;
+   }
+}      
+
diff --git a/ossim/src/ossim/imaging/ossimEnviHeaderFileWriter.cpp b/ossim/src/ossim/imaging/ossimEnviHeaderFileWriter.cpp
new file mode 100644
index 0000000..bd2fe71
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimEnviHeaderFileWriter.cpp
@@ -0,0 +1,102 @@
+//----------------------------------------------------------------------------
+// Copyright (c) 2005, David Burken, all rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+// 
+// Class definition for ossimEnviHeaderFileWriter.  Meta data class for
+// writing an ENVI (The Environment for Visualizing Images) header file.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimEnviHeaderFileWriter.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimEnviHeaderFileWriter.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimMapProjectionInfo.h>
+
+
+RTTI_DEF1(ossimEnviHeaderFileWriter,
+          "ossimEnviHeaderFileWriter",
+          ossimMetadataFileWriter)
+
+ossimEnviHeaderFileWriter::ossimEnviHeaderFileWriter()
+   :
+   ossimMetadataFileWriter(),
+   theHdr()
+{
+}
+
+ossimEnviHeaderFileWriter::~ossimEnviHeaderFileWriter()
+{
+}
+
+bool ossimEnviHeaderFileWriter::loadState(const ossimKeywordlist& kwl,
+                                          const char* prefix)
+{
+   bool result = false;
+   
+   if (ossimMetadataFileWriter::loadState(kwl, prefix))
+   {
+      result = theHdr.loadState(kwl, prefix);
+   }
+   
+   return result;
+}
+
+bool writeFile()
+{
+   bool result = true;
+
+   return result;
+}
+
+bool ossimEnviHeaderFileWriter::writeFile()
+{
+   theHdr.setLines(theAreaOfInterest.height());
+   theHdr.setSamples(theAreaOfInterest.width());
+   theHdr.setBands(theInputConnection->getNumberOfOutputBands());
+   
+   // Get the geometry from the input.
+   // Get the geometry from the input.
+   ossimMapProjection* mapProj = 0;
+   ossimRefPtr<ossimImageGeometry> inputGeom = theInputConnection->getImageGeometry();
+   if ( inputGeom.valid() ) mapProj = PTR_CAST(ossimMapProjection, inputGeom->getProjection());
+   if (mapProj)
+   {
+      // Create the projection info.
+      ossimRefPtr<ossimMapProjectionInfo> projectionInfo
+         = new ossimMapProjectionInfo(mapProj, theAreaOfInterest);
+
+      // Set the tie points in the keyword list.
+      ossimKeywordlist kwl;
+      projectionInfo->getGeom(kwl);
+
+      // Pass it on to envi header to set the map info string from geometry.
+      theHdr.setMapInfo(kwl);
+   }
+
+   return theHdr.writeFile(theFilename);
+}
+
+void ossimEnviHeaderFileWriter::getMetadatatypeList(
+   std::vector<ossimString>& metadatatypeList) const
+{
+   metadatatypeList.push_back(ossimString("envi_header")); 
+}
+
+bool ossimEnviHeaderFileWriter::hasMetadataType(
+   const ossimString& metadataType)const
+{
+   return (metadataType == "envi_header");
+}
+
diff --git a/src/ossim/imaging/ossimEnviTileSource.cpp b/ossim/src/ossim/imaging/ossimEnviTileSource.cpp
similarity index 100%
rename from src/ossim/imaging/ossimEnviTileSource.cpp
rename to ossim/src/ossim/imaging/ossimEnviTileSource.cpp
diff --git a/ossim/src/ossim/imaging/ossimEquationCombiner.cpp b/ossim/src/ossim/imaging/ossimEquationCombiner.cpp
new file mode 100644
index 0000000..de715dc
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimEquationCombiner.cpp
@@ -0,0 +1,3573 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimEquationCombiner.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstdlib>
+#include <sstream>
+using namespace std;
+
+#include <ossim/imaging/ossimEquationCombiner.h>
+#include <ossim/imaging/ossimCastTileSourceFilter.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimConvolutionSource.h>
+#include <ossim/imaging/ossimSubImageTileSource.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/matrix/newmatio.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/base/ossimNotifyContext.h>
+
+RTTI_DEF1(ossimEquationCombiner, "ossimEquationCombiner", ossimImageCombiner);
+
+static const char* EQUATION_KW = "equation";
+
+
+class ossimBinaryOpAdd : public ossimEquationCombiner::ossimBinaryOp
+{
+public:
+   virtual double apply(double v1, double v2)const
+      {
+         return v1 + v2;
+      }
+};
+
+class ossimBinaryOpAnd : public ossimEquationCombiner::ossimBinaryOp
+{
+public:
+   virtual double apply(double v1, double v2)const
+      {
+         return (double)(((ossim_uint32)v1) & ((ossim_uint32)v2));
+      }
+};
+
+class ossimBinaryOpOr : public ossimEquationCombiner::ossimBinaryOp
+{
+public:
+   virtual double apply(double v1, double v2)const
+      {
+         return (double)(((ossim_uint32)v1) | ((ossim_uint32)v2));
+      }
+};
+
+class ossimBinaryOpXor : public ossimEquationCombiner::ossimBinaryOp
+{
+public:
+   virtual double apply(double v1, double v2)const
+      {
+         return (double)(((ossim_uint32)v1) ^ ((ossim_uint32)v2));
+      }
+};
+
+class ossimBinaryOpSub : public ossimEquationCombiner::ossimBinaryOp
+{
+public:
+   virtual double apply(double v1, double v2)const
+      {
+         return v1 - v2;
+      }
+};
+
+class ossimBinaryOpMax : public ossimEquationCombiner::ossimBinaryOp
+{
+public:
+   virtual double apply(double v1, double v2)const
+      {
+         return std::max(v1, v2);
+      }
+};
+
+class ossimBinaryOpMin : public ossimEquationCombiner::ossimBinaryOp
+{
+public:
+   virtual double apply(double v1, double v2)const
+      {
+         return std::min(v1, v2);
+      }
+};
+
+class ossimBinaryOpMul : public ossimEquationCombiner::ossimBinaryOp
+{
+public:
+   virtual double apply(double v1, double v2)const
+      {
+         return v1 * v2;
+      }
+};
+
+class ossimBinaryOpDiv : public ossimEquationCombiner::ossimBinaryOp
+{
+public:
+   virtual double apply(double v1, double v2)const
+      {
+         if(fabs(v2)>FLT_EPSILON)
+            return v1 / v2;
+         
+         return 1.0/FLT_EPSILON;
+      }
+};
+
+class ossimBinaryOpMod : public ossimEquationCombiner::ossimBinaryOp
+{
+public:
+   virtual double apply(double v1, double v2)const
+      {
+         if(fabs(v2)>FLT_EPSILON)
+            return fmod(v1,v2);
+         
+         return 1.0/FLT_EPSILON;
+      }
+};
+
+class ossimBinaryOpPow : public ossimEquationCombiner::ossimBinaryOp
+{
+public:
+   virtual double apply(double v1, double v2)const
+      {
+         return pow(v1, v2);
+      }
+};
+// boolean operators
+class ossimBinaryOpEqual : public ossimEquationCombiner::ossimBinaryOp
+{
+public:
+   virtual double apply(double v1, double v2)const
+      {
+         return (v1==v2)?1.0:0.0;
+      }
+};
+class ossimBinaryOpGreater : public ossimEquationCombiner::ossimBinaryOp
+{
+public:
+   virtual double apply(double v1, double v2)const
+      {
+         return (v1>v2)?1.0:0.0;
+      }
+};
+class ossimBinaryOpGreaterOrEqual : public ossimEquationCombiner::ossimBinaryOp
+{
+public:
+   virtual double apply(double v1, double v2)const
+      {
+         return (v1>=v2)?1.0:0.0;
+      }
+};
+class ossimBinaryOpLess : public ossimEquationCombiner::ossimBinaryOp
+{
+public:
+   virtual double apply(double v1, double v2)const
+      {
+         return (v1<v2)?1.0:0.0;
+      }
+};
+class ossimBinaryOpLessOrEqual : public ossimEquationCombiner::ossimBinaryOp
+{
+public:
+   virtual double apply(double v1, double v2)const
+      {
+         return (v1<=v2)?1.0:0.0;
+      }
+};
+class ossimBinaryOpDifferent : public ossimEquationCombiner::ossimBinaryOp
+{
+public:
+   virtual double apply(double v1, double v2)const
+      {
+         return (v1!=v2)?1.0:0.0;
+      }
+};
+class ossimUnaryOpNot : public ossimEquationCombiner::ossimUnaryOp
+{
+public:
+   virtual double apply(double v)const
+      {
+         return 1-v;
+      }
+};
+
+class ossimUnaryOpAbs : public ossimEquationCombiner::ossimUnaryOp
+{
+public:
+   virtual double apply(double v)const
+      {
+         return fabs(v);
+      }
+};
+
+class ossimUnaryOpOnesComplement : public ossimEquationCombiner::ossimUnaryOp
+{
+public:
+   virtual double apply(double v)const
+      {
+         return (double)((ossim_uint8)~((ossim_uint8)v));
+      }
+};
+
+class ossimUnaryOpLog : public ossimEquationCombiner::ossimUnaryOp
+{
+public:
+   virtual double apply(double v)const
+      {
+         return log(v);
+      }
+};
+
+class ossimUnaryOpLog10 : public ossimEquationCombiner::ossimUnaryOp
+{
+public:
+   virtual double apply(double v)const
+      {
+         return log10(v);
+      }
+};
+
+class ossimUnaryOpNeg : public ossimEquationCombiner::ossimUnaryOp
+{
+public:
+   virtual double apply(double v)const
+      {
+         return -v;
+      }
+};
+
+class ossimUnaryOpSqrt : public ossimEquationCombiner::ossimUnaryOp
+{
+public:
+   virtual double apply(double v)const
+      {
+         if(v >= 0)
+         {
+            return sqrt(v);
+         }
+         
+         return -1;
+      }
+};
+
+class ossimUnaryOpExp : public ossimEquationCombiner::ossimUnaryOp
+{
+public:
+   virtual double apply(double v)const
+      {
+         return exp(v);
+      }
+};
+
+class ossimUnaryOpSin : public ossimEquationCombiner::ossimUnaryOp
+{
+public:
+   virtual double apply(double v)const
+      {
+         return sin(v);
+      }
+};
+
+class ossimUnaryOpSind : public ossimEquationCombiner::ossimUnaryOp
+{
+public:
+   virtual double apply(double v)const
+      {
+         return sin(v*M_PI/180.0);
+      }
+};
+
+class ossimUnaryOpASin : public ossimEquationCombiner::ossimUnaryOp
+{
+public:
+   virtual double apply(double v)const
+      {
+         if(v > 1) v = 1;
+         if(v < -1) v = -1;
+         return asin(v);
+      }
+};
+
+class ossimUnaryOpASind : public ossimEquationCombiner::ossimUnaryOp
+{
+public:
+   virtual double apply(double v)const
+      {
+         if(v > 1) v = 1;
+         if(v < -1) v = -1;
+         return (180/M_PI)*asin(v);
+      }
+};
+
+class ossimUnaryOpACos : public ossimEquationCombiner::ossimUnaryOp
+{
+public:
+   virtual double apply(double v)const
+      {
+         if(v > 1) v = 1;
+         if(v < -1) v = -1;
+         return acos(v);
+      }
+};
+
+class ossimUnaryOpACosd : public ossimEquationCombiner::ossimUnaryOp
+{
+public:
+   virtual double apply(double v)const
+      {
+         if(v > 1) v = 1;
+         if(v < -1) v = -1;
+         return (180/M_PI)*acos(v);
+      }
+};
+
+class ossimUnaryOpCos : public ossimEquationCombiner::ossimUnaryOp
+{
+public:
+   virtual double apply(double v)const
+      {
+         return cos(v);
+      }
+};
+
+class ossimUnaryOpCosd : public ossimEquationCombiner::ossimUnaryOp
+{
+public:
+   virtual double apply(double v)const
+      {
+         return cos(v*M_PI/180.0);
+      }
+};
+
+class ossimUnaryOpTan : public ossimEquationCombiner::ossimUnaryOp
+{
+public:
+   virtual double apply(double v)const
+      {
+         return tan(v);
+      }
+};
+
+class ossimUnaryOpTand : public ossimEquationCombiner::ossimUnaryOp
+{
+public:
+   virtual double apply(double v)const
+      {
+         return tan(v*M_PI/180.0);
+      }
+};
+
+class ossimUnaryOpATan : public ossimEquationCombiner::ossimUnaryOp
+{
+public:
+   virtual double apply(double v)const
+      {
+         return atan(v);
+      }
+};
+
+class ossimUnaryOpATand : public ossimEquationCombiner::ossimUnaryOp
+{
+public:
+   virtual double apply(double v)const
+      {
+         return (180/M_PI)*atan(v);
+      }
+};
+
+
+ossimEquationCombiner::ossimEquationCombiner()
+   :ossimImageCombiner(),
+    theOutputScalarType(OSSIM_FLOAT64),
+    theEquation(""),
+    theLexer(NULL),
+    theTile(NULL),
+    theCastFilter(NULL),
+    theCastOutputFilter(NULL)
+{
+   theLexer      = new ossimEquTokenizer;
+   theCastFilter = new ossimCastTileSourceFilter;
+   theCastFilter->setOutputScalarType(OSSIM_FLOAT64);
+}
+
+ossimEquationCombiner::ossimEquationCombiner(ossimConnectableObject::ConnectableObjectList& inputs)
+   :ossimImageCombiner(inputs),
+    theOutputScalarType(OSSIM_FLOAT64),
+    theEquation(""),
+    theLexer(NULL),
+    theTile(NULL),
+    theCastFilter(NULL),
+    theCastOutputFilter(NULL)
+{
+   theLexer      = new ossimEquTokenizer;
+   theCastFilter = new ossimCastTileSourceFilter;
+   theCastFilter->setOutputScalarType(OSSIM_FLOAT64);
+}
+
+ossimEquationCombiner::~ossimEquationCombiner()
+{
+   if(theLexer)
+   {
+      delete theLexer;
+      theLexer = NULL;
+   }
+
+   if(theCastFilter.valid())
+   {
+      theCastFilter->disconnect();
+      theCastFilter = 0;
+   }
+
+   if(theCastOutputFilter.valid())
+   {
+      theCastOutputFilter->disconnect();
+      theCastOutputFilter = 0;
+   }
+   // make sure they are cleared
+   clearStacks();
+}
+
+double ossimEquationCombiner::getNullPixelValue(ossim_uint32 band)const
+{
+   
+   if(theEquation == "")
+   {
+      if(getInput())
+      {
+         ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput());
+         if(inter)
+         {
+            return inter->getNullPixelValue(band);
+         }
+      }
+   }
+   return ossim::defaultNull(getOutputScalarType());
+}   
+
+double ossimEquationCombiner::getMinPixelValue(ossim_uint32 band)const
+{
+   if(theEquation == "")
+   {
+      if(getInput())
+      {
+         ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput());
+         if(inter)
+         {
+            return inter->getMinPixelValue(band);
+         }
+      }
+   }
+   return ossim::defaultMin(getOutputScalarType());
+}
+
+double ossimEquationCombiner::getMaxPixelValue(ossim_uint32 band)const
+{
+   if(theEquation == "")
+   {
+      if(getInput())
+      {
+         ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput());
+         if(inter)
+         {
+            return inter->getMaxPixelValue(band);
+         }
+      }
+   }
+   return ossim::defaultMax(getOutputScalarType());         
+}
+
+ossimScalarType ossimEquationCombiner::getOutputScalarType() const
+{
+
+   if(theEquation == "")
+   {
+      if(getInput())
+      {
+         ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput());
+         if(inter)
+         {
+            return inter->getOutputScalarType();
+         }
+      }
+   }
+   
+   return theOutputScalarType;
+}
+
+
+ossimRefPtr<ossimImageData> ossimEquationCombiner::getTile(
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   if(!theTile)
+   {
+      initialize();
+   }
+   long w = tileRect.width();
+   long h = tileRect.height();
+   long tw = theTile->getWidth();
+   long th = theTile->getHeight();
+   
+   if(theEquation != "")
+   {
+      theTile->setImageRectangle(tileRect);
+      
+      if(w*h != tw*th)
+      {
+         theTile->initialize();
+      }
+      else
+      {
+         theTile->makeBlank();
+      }
+      theCurrentResLevel = resLevel;
+      
+      ossimRefPtr<ossimImageData> outputTile =  parseEquation();
+
+      if(theCastOutputFilter.valid())
+      {
+         outputTile = theCastOutputFilter->applyCast(outputTile);
+      }
+      
+      return outputTile;
+   }
+   else
+   {
+      if(getInput())
+      {
+         ossimImageSource* inter =
+            PTR_CAST(ossimImageSource, getInput());
+         if(inter)
+         {
+            return inter->getTile(tileRect, resLevel);
+         }
+      }
+   }
+
+   return ossimRefPtr<ossimImageData>();
+}
+
+void ossimEquationCombiner::setOutputScalarType(ossimScalarType scalarType)
+{
+   if(theOutputScalarType != scalarType)
+   {
+      theOutputScalarType = scalarType;
+
+      if(theOutputScalarType == OSSIM_SCALAR_UNKNOWN)
+      {
+         theOutputScalarType = OSSIM_FLOAT64;
+      }
+      if(theCastOutputFilter.valid())
+      {
+         theCastOutputFilter = 0;
+      }
+
+      if(theOutputScalarType != OSSIM_FLOAT64)
+      {
+         theCastOutputFilter = new ossimCastTileSourceFilter;
+         theCastOutputFilter->setOutputScalarType(theOutputScalarType);
+         theCastOutputFilter->connectMyInputTo(0, this);
+         theCastOutputFilter->initialize();
+      }
+   }
+}
+
+void ossimEquationCombiner::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property) return;
+   
+   if(property->getName() == "Equation")
+   {
+      theEquation = property->valueToString();
+   }
+   else if(property->getName() == "Output scalar type")
+   {
+      setOutputScalarType(ossimScalarTypeLut::instance()->
+                          getScalarTypeFromString(property->valueToString()));
+   }
+   else
+   {
+      ossimImageCombiner::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimEquationCombiner::getProperty(const ossimString& name)const
+{
+   if(name == "Equation")
+   {
+      ossimStringProperty* stringProp = new ossimStringProperty("Equation",
+								theEquation,
+								false);
+      stringProp->clearChangeType();
+      stringProp->setReadOnlyFlag(false);
+      stringProp->setCacheRefreshBit();
+      
+      return stringProp;
+   }
+   else if(name == "Output scalar type")
+   {
+      ossimScalarTypeLut* sl = ossimScalarTypeLut::instance();
+      
+      std::vector<ossimString> scalarNames;
+
+      ossim_int32 tableSize = (ossim_int32)sl->getTableSize();
+      ossim_int32 idx;
+
+      for(idx = 0; idx < tableSize; ++idx)
+      {
+         scalarNames.push_back(sl->getEntryString(idx));
+      }
+      ossimStringProperty* stringProp = new ossimStringProperty("Output scalar type",
+								sl->getEntryString((ossim_int32)theOutputScalarType),
+								false,
+								scalarNames);
+      stringProp->clearChangeType();
+      stringProp->setReadOnlyFlag(false);
+      stringProp->setCacheRefreshBit();
+      
+      return stringProp;
+      
+   }
+
+   return ossimImageCombiner::getProperty(name);
+}
+
+void ossimEquationCombiner::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageCombiner::getPropertyNames(propertyNames);
+   propertyNames.push_back("Equation");
+   propertyNames.push_back("Output scalar type");
+}
+
+
+void ossimEquationCombiner::initialize()
+{
+   ossimImageCombiner::initialize();
+
+   theTile = ossimImageDataFactory::instance()->create(this, OSSIM_FLOAT64, getNumberOfOutputBands(), getTileWidth(), getTileHeight());
+   theTile->initialize();
+   if(theCastOutputFilter.valid())
+   {
+      theCastOutputFilter->initialize();
+   }
+}
+
+void ossimEquationCombiner::assignValue()
+{
+   if(!theValueStack.empty())
+   {
+      if(theValueStack.top().type == OSSIM_EQU_IMAGE_DATA_TYPE)
+      {
+         ossimImageData* topData = theValueStack.top().d.imageDataValue;
+         ossim_uint32 minBands = std::min(theTile->getNumberOfBands(),
+                                    topData->getNumberOfBands());
+         ossim_uint32 maxBands = theTile->getNumberOfBands();
+         ossim_uint32 band   = 0;
+         ossim_uint32 offset = 0;
+         ossim_uint32 size = theTile->getWidth()*theTile->getHeight();
+
+         if(topData->getDataObjectStatus() == OSSIM_PARTIAL)
+         {
+            for(band = 0; band < minBands; ++band)
+            {
+               double* inBuf  = (double*)topData->getBuf(band);
+               double* outBuf = (double*)theTile->getBuf(band);
+               double np      = topData->getNullPix(band);
+               if(outBuf && inBuf)
+               {
+                  for(offset = 0; offset < size; ++offset)
+                  {
+                     if(*inBuf != np)
+                     {
+                        *outBuf = *inBuf;
+                     }
+                     ++outBuf;
+                     ++inBuf;
+                  }
+               }
+            }
+            for(;band < maxBands; ++band)
+            {
+               double* inBuf  = (double*)topData->getBuf(minBands-1);
+               double* outBuf = (double*)theTile->getBuf(band);
+               double np      = topData->getNullPix(band);
+               
+               if(outBuf && inBuf)
+               {
+                  for(offset = 0; offset < size; ++offset)
+                  {
+                     if(*inBuf != np)
+                     {
+                        *outBuf = *inBuf;
+                     }
+                     ++outBuf;
+                     ++inBuf;
+                  }
+               }
+            }
+
+         }
+         else if(topData->getDataObjectStatus() == OSSIM_FULL)
+         {
+            for(band = 0; band < minBands; ++band)
+            {
+               double* inBuf  = (double*)theValueStack.top().d.imageDataValue->getBuf(band);
+               double* outBuf = (double*)theTile->getBuf(band);
+               if(outBuf && inBuf)
+               {
+                  for(offset = 0; offset < size; ++offset)
+                  {
+                     *outBuf = *inBuf;
+                     ++outBuf;
+                     ++inBuf;
+                  }
+               }
+            }
+            for(;band < maxBands; ++band)
+            {
+               double* inBuf  = (double*)theValueStack.top().d.imageDataValue->getBuf(minBands-1);
+               double* outBuf = (double*)theTile->getBuf(band);
+               
+               if(outBuf && inBuf)
+               {
+                  for(offset = 0; offset < size; ++offset)
+                  {
+                     *outBuf = *inBuf;
+                     ++outBuf;
+                     ++inBuf;
+                  }
+               }
+            }
+         }
+         
+         // Delete the object indirectly through an ossimRefPtr.
+         ossimRefPtr<ossimImageData> id = theValueStack.top().d.imageDataValue;
+         id = NULL;
+      }
+      else
+      {
+         double* buf  = static_cast<double*>(theTile->getBuf());
+         ossim_uint32 size = theTile->getSize();
+         double value = (double)theValueStack.top().d.doubleValue;
+         
+         for(ossim_uint32 offset = 0; offset < size; ++offset)
+         {
+            *buf = value;
+            ++buf;
+         }
+      }
+      
+      theValueStack.pop();
+   }
+}
+
+void ossimEquationCombiner::clearStacks()
+{
+
+   while(!theValueStack.empty())
+   {
+      if(theValueStack.top().type == OSSIM_EQU_IMAGE_DATA_TYPE)
+      {
+         // Delete the object indirectly through an ossimRefPtr.
+         ossimRefPtr<ossimImageData> id = theValueStack.top().d.imageDataValue;
+         id = NULL;
+      }
+
+      theValueStack.pop();
+   }
+}
+
+void ossimEquationCombiner::clearArgList(vector<ossimEquValue>& argList)
+{
+   for(ossim_uint32 i = 0; i < argList.size(); ++i)
+   {
+      if(argList[i].type == OSSIM_EQU_IMAGE_DATA_TYPE)
+      {
+         if(argList[i].d.imageDataValue)
+         {
+            // Delete the object indirectly through an ossimRefPtr.
+            ossimRefPtr<ossimImageData> id = argList[i].d.imageDataValue;
+            id = NULL;
+            argList[i].d.imageDataValue = (ossimImageData*)NULL;
+         }
+      }
+   }
+   argList.clear();
+}
+
+void ossimEquationCombiner::deleteArgList(vector<ossimEquValue>& args)
+{
+   int i = 0;
+
+   for(i = 0; i < (int)args.size(); ++i)
+   {
+      if(args[i].type == OSSIM_EQU_IMAGE_DATA_TYPE)
+      {
+         if(args[i].d.imageDataValue)
+         {
+            // Delete the object indirectly through an ossimRefPtr.
+            ossimRefPtr<ossimImageData> id = args[i].d.imageDataValue;
+            id = NULL;
+            args[i].d.imageDataValue = NULL;
+         }
+      }
+   }
+   
+   args.clear();
+}
+
+bool ossimEquationCombiner::parseArgList(vector<ossimEquValue>& args,
+                                         bool popValueStack)
+{
+   bool result = true;
+   
+   if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
+   {
+      theCurrentId = theLexer->yylex();
+      do
+      {
+         if(parseExpression())
+         {
+            if(!theValueStack.empty())
+            {
+               args.push_back(theValueStack.top());
+               if(popValueStack)
+               {
+                  theValueStack.pop();
+               }
+            }
+            else
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << "The expression at  arg " << (args.size()+1)
+                  << " is empty" << endl;
+               
+               result = false;
+            }
+         }
+         else
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               <<"Unable to parse expression" << endl;
+            result = false;
+         }
+         
+         if(theCurrentId == OSSIM_EQU_TOKEN_COMMA)
+         {
+            theCurrentId = theLexer->yylex();
+         }
+         else if(theCurrentId != OSSIM_EQU_TOKEN_RIGHT_PAREN)
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               <<"Missing comma in argument list" << endl;
+            result = false;
+         }
+         
+      }while(result&&(theCurrentId != OSSIM_EQU_TOKEN_RIGHT_PAREN));
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "Starting left parenthesis missing from arg list" << endl;
+      result = false;
+   }
+   
+   if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
+   {
+      theCurrentId = theLexer->yylex(); // skip past right parenthesis
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         <<"No matching right parenthesis for arg list" << endl;
+      result = false;
+   }
+
+   if(!result && popValueStack)
+   {
+      clearArgList(args);
+   }
+   return result;
+}
+
+bool ossimEquationCombiner::parseAssignBand()
+{
+   bool result = true;
+   
+   vector<ossimEquValue> argList;
+
+   if(parseArgList(argList))
+   {
+      if((argList.size() == 3) ||
+         (argList.size() == 4))
+      {
+         ossimEquValue v3 = argList[2];
+         ossimEquValue v2 = argList[1];
+         ossimEquValue v1 = argList[0];
+         
+         if(argList.size() == 3)
+         {
+            if((v1.type == OSSIM_EQU_IMAGE_DATA_TYPE) &&
+               (v2.type == OSSIM_EQU_DOUBLE_TYPE))
+            {
+               ossimImageData *data = (ossimImageData*)v1.d.imageDataValue->dup();
+               ossimEquValue v;
+               
+               if(v3.type == OSSIM_EQU_IMAGE_DATA_TYPE)
+               {
+                  if(data->getBuf()&&
+                     v3.d.imageDataValue->getBuf())
+                  {
+                     if((ossim_uint32)(v2.d.doubleValue) < data->getNumberOfBands())
+                     {
+                        data->assignBand(v3.d.imageDataValue,
+                                         0,
+                                         (ossim_uint32)v2.d.doubleValue);
+                        
+                     }
+                  }
+               }
+               else
+               {
+                  if(data->getBuf()&&
+                     (ossim_uint32)v2.d.doubleValue < data->getNumberOfBands())
+                  {  
+                     ossim_uint32 upper = data->getWidth()*data->getHeight();
+                     double* buf = (double*)data->getBuf((ossim_uint32)v2.d.doubleValue);
+                     double value = v3.d.doubleValue;
+                     if(buf)
+                     {
+                        for(ossim_uint32 i = 0; i < upper; ++i)
+                        {
+                           *buf = value;
+                           ++buf;
+                        }  
+                     }
+                     else
+                     {
+                        result = false;
+                     }
+                  }
+               }
+               if(result)
+               {
+                  data->validate();
+                  v.type = OSSIM_EQU_IMAGE_DATA_TYPE;
+                  v.d.imageDataValue = data;
+                  theValueStack.push(v);
+               }
+            }
+            else
+            {
+               result = false;
+            }
+         }
+         else 
+         {
+            ossimEquValue v4 = argList[3];
+            if((v1.type == OSSIM_EQU_IMAGE_DATA_TYPE) &&
+               (v2.type == OSSIM_EQU_DOUBLE_TYPE)&&
+               (v3.type == OSSIM_EQU_IMAGE_DATA_TYPE)&&
+               (v4.type == OSSIM_EQU_DOUBLE_TYPE))
+            {
+               ossimImageData *data = (ossimImageData*)v1.d.imageDataValue->dup();
+               ossimEquValue v;
+               v.type = OSSIM_EQU_IMAGE_DATA_TYPE;
+               v.d.imageDataValue = data;
+               if(data->getBuf()&&v3.d.imageDataValue->getBuf())
+               {
+                  
+                  ossim_uint32 index1 = (ossim_uint32)v4.d.doubleValue;
+                  ossim_uint32 index2 = (ossim_uint32)v2.d.doubleValue;
+                  
+                  if((index1 > data->getNumberOfBands()) ||
+                     (index1 > v3.d.imageDataValue->getNumberOfBands()))
+                  {
+                     result = false;
+                  }
+                  else
+                  {     
+                     data->assignBand(v3.d.imageDataValue,
+                                      index1,
+                                      index2);
+                     data->validate();
+                  }
+                  
+               }
+               
+               theValueStack.push(v);
+            }
+         }
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "Invalid number of arguments to assign_band" << endl;
+         result = false;
+      }
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "unable to parse arguments for assign band" << endl;
+      result = false;
+   }
+
+   clearArgList(argList);
+
+   return result;
+}
+
+bool ossimEquationCombiner::parseStdFuncs()
+{
+   bool result = true;
+
+   switch(theCurrentId)
+   {
+   case OSSIM_EQU_TOKEN_ASSIGN_BAND:
+   {
+      theCurrentId = theLexer->yylex();
+      if(!parseAssignBand())
+      {
+         result = false;
+      }
+      
+      break;
+   }
+   case OSSIM_EQU_TOKEN_CONV:
+   {
+      theCurrentId = theLexer->yylex();
+      vector<ossimEquValue> args;
+      if(parseArgList(args))
+      {
+         ossimImageData* resultImage = (ossimImageData*)NULL;
+         if(applyConvolution(resultImage,
+                              args))
+         {
+            if(resultImage)
+            {
+               ossimEquValue v;
+               v.type = OSSIM_EQU_IMAGE_DATA_TYPE;
+               v.d.imageDataValue = resultImage;
+               
+               theValueStack.push(v);
+            }
+            else
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << "function conv error: resulting image is NULL" << endl;
+               result = false;
+            }
+         }
+         else
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "Unable to apply convolution" << endl;
+            result = false;
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      
+      break;
+   }
+   case OSSIM_EQU_TOKEN_CLAMP:
+   {
+      theCurrentId = theLexer->yylex();
+      vector<ossimEquValue> args;
+      if(parseArgList(args))
+      {
+         ossimImageData* resultImage = (ossimImageData*)NULL;
+         if(applyClamp(resultImage,
+                       args))
+         {
+            if(resultImage)
+            {
+               ossimEquValue v;
+               v.type = OSSIM_EQU_IMAGE_DATA_TYPE;
+               v.d.imageDataValue = resultImage;
+               
+               theValueStack.push(v);
+            }
+            else
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << "function clamp error: resulting image is NULL" << endl;
+               result = false;
+            }
+            
+         }
+         else
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "Unable to apply clamp" << endl;
+            result = false;
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      
+      break;
+   }
+   case OSSIM_EQU_TOKEN_BAND:
+   {
+    // need to parse the following rule for blurr function
+      //
+      // band(image data, number)
+      theCurrentId = theLexer->yylex();
+
+
+      vector<ossimEquValue> argList;
+
+      if(parseArgList(argList))
+      {
+         if(argList.size() == 2)
+         {
+            ossimEquValue v1 = argList[0];
+            ossimEquValue v2 = argList[1];
+            ossimImageData* tempData = NULL;
+            ossim_uint32 bandNumber           = 0;
+            if(v1.type == OSSIM_EQU_IMAGE_DATA_TYPE)
+            {
+               tempData = v1.d.imageDataValue;
+            }
+            else
+            {
+               result = false;
+            }
+            if(v2.type == OSSIM_EQU_DOUBLE_TYPE)
+            {
+               bandNumber = (ossim_uint32)(v2.d.doubleValue);
+            }
+            else
+            {
+               result = false;
+            }
+            if(bandNumber > tempData->getNumberOfBands())
+            {
+               result = false;
+            }
+            if(result)
+            {
+               ossimImageData* data = new ossimImageData(this,
+                                                         OSSIM_FLOAT64,
+                                                         1);
+               data->setWidthHeight(tempData->getWidth(),
+                                    tempData->getHeight());
+               data->setOrigin(tempData->getOrigin());
+               data->setNullPix(tempData->getNullPix(bandNumber),
+                                0);
+               data->setMinPix(tempData->getMinPix(bandNumber),
+                               0);
+               data->setMaxPix(tempData->getMaxPix(bandNumber),
+                               0);
+               data->initialize();
+               
+               if((tempData->getBuf())&&
+                  (bandNumber < tempData->getNumberOfBands()))
+               {
+                  data->assignBand(tempData,
+                                   bandNumber,
+                                   0);                           
+                  data->validate();
+               }
+               ossimEquValue v;
+               v.type = OSSIM_EQU_IMAGE_DATA_TYPE;
+               v.d.imageDataValue = data;
+               theValueStack.push(v);
+            }
+            
+            if(tempData)
+            {
+               // Delete the object indirectly through an ossimRefPtr.
+               ossimRefPtr<ossimImageData> id = tempData;
+               tempData = NULL;
+            }
+         }
+         else
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "Invalid number of args in function band" << endl;
+            
+            result = false;
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      
+      break;
+   }
+   case OSSIM_EQU_TOKEN_BLURR:
+   {
+      theCurrentId = theLexer->yylex();
+      vector<ossimEquValue> args;
+      if(parseArgList(args))
+      {
+         ossimImageData* resultImage = (ossimImageData*)NULL;
+         if(applyBlurr(resultImage,
+                       args))
+         {
+            if(resultImage)
+            {
+               ossimEquValue v;
+               v.type = OSSIM_EQU_IMAGE_DATA_TYPE;
+               v.d.imageDataValue = resultImage;
+               
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+         }
+         else
+         {
+            result = false;
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      
+      break;
+   }
+   case OSSIM_EQU_TOKEN_SHIFT:
+   {
+      theCurrentId = theLexer->yylex();
+      vector<ossimEquValue> args;
+      if(parseArgList(args))
+      {
+         ossimImageData* resultImage = (ossimImageData*)NULL;
+         if(applyShift(resultImage,
+                       args))
+         {
+            if(resultImage)
+            {
+               ossimEquValue v;
+               v.type = OSSIM_EQU_IMAGE_DATA_TYPE;
+               v.d.imageDataValue = resultImage;
+               
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+         }
+         else
+         {
+            result = false;
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      
+      break;
+   }
+   case OSSIM_EQU_TOKEN_MAX:
+   case OSSIM_EQU_TOKEN_MIN:
+   {
+      ossimBinaryOp* op = NULL;
+      if(theCurrentId == OSSIM_EQU_TOKEN_MIN) op = new ossimBinaryOpMin;
+      else op = new ossimBinaryOpMax;
+      
+      int argCount = 0;
+      theCurrentId = theLexer->yylex();
+      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
+      {
+         theCurrentId = theLexer->yylex();
+         bool done = false;
+         while(!done)
+         {
+            if(parseExpression())
+            {
+               
+               ++argCount;
+               if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
+               {
+                  theCurrentId = theLexer->yylex();
+                  
+                  done = true;
+               }
+               else if(theCurrentId == OSSIM_EQU_TOKEN_COMMA)
+               {
+                  theCurrentId = theLexer->yylex();
+               }
+               else
+               {
+                  result = false;
+                  done = true;
+               }
+            }
+            else
+            {
+               done = true;
+               result = false;
+            }
+         }
+         if((argCount > 1)&&result)
+         {
+            result = true;
+            
+            ossimEquValue v;
+            ossimEquValue v1;
+            ossimEquValue v2;
+
+            v2 = theValueStack.top();
+            theValueStack.pop();
+            v1 = theValueStack.top();
+            theValueStack.pop();
+            argCount -=2;
+
+            do
+            {
+               if(applyOp(*op,
+                          v,
+                          v1,
+                          v2))
+               {
+                  theValueStack.push(v);
+               }
+               else
+               {
+                  result = false;
+                  argCount = 0;
+                  
+               }
+               --argCount;
+               
+               if((argCount>0)&&result)
+               {
+                  v2 = theValueStack.top();
+                  theValueStack.pop();
+                  v1 = theValueStack.top();
+                  theValueStack.pop();
+               }
+               
+            }while((argCount > 0)&&(result));
+         }
+         else
+         {
+            result = false;
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      if(op)
+      {
+         delete op;
+         op = NULL;
+      }
+      break;
+   }
+   case OSSIM_EQU_TOKEN_ABS:
+   {
+      theCurrentId = theLexer->yylex();
+      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
+      {
+         theCurrentId = theLexer->yylex();
+         result = parseExpression();
+         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
+         {
+            if(theValueStack.size() > 0)
+            {
+               theCurrentId = theLexer->yylex();
+               ossimEquValue v;
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+               
+               applyOp(ossimUnaryOpAbs(),
+                       v,
+                       v1);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      break;
+   }
+   case OSSIM_EQU_TOKEN_SIN:
+   {
+      theCurrentId = theLexer->yylex();
+      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
+      {
+         theCurrentId = theLexer->yylex();
+         result = parseExpression();
+         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
+         {
+            if(theValueStack.size() > 0)
+            {
+               theCurrentId = theLexer->yylex();
+               ossimEquValue v;
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+               
+               applyOp(ossimUnaryOpSin(),
+                       v,
+                       v1);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      break;
+   }
+   case OSSIM_EQU_TOKEN_SIND:
+   {
+      theCurrentId = theLexer->yylex();
+      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
+      {
+         theCurrentId = theLexer->yylex();
+         result = parseExpression();
+         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
+         {
+            if(theValueStack.size() > 0)
+            {
+               theCurrentId = theLexer->yylex();
+               ossimEquValue v;
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+               
+               applyOp(ossimUnaryOpSind(),
+                       v,
+                       v1);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      break;
+   }
+   case OSSIM_EQU_TOKEN_ASIN:
+   {
+      theCurrentId = theLexer->yylex();
+      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
+      {
+         theCurrentId = theLexer->yylex();
+         result = parseExpression();
+         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
+         {
+            if(theValueStack.size() > 0)
+            {
+               theCurrentId = theLexer->yylex();
+               ossimEquValue v;
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+               
+               applyOp(ossimUnaryOpASin(),
+                       v,
+                       v1);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      break;
+   }
+   case OSSIM_EQU_TOKEN_ASIND:
+   {
+      theCurrentId = theLexer->yylex();
+      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
+      {
+         theCurrentId = theLexer->yylex();
+         result = parseExpression();
+         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
+         {
+            if(theValueStack.size() > 0)
+            {
+               theCurrentId = theLexer->yylex();
+               ossimEquValue v;
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+               
+               applyOp(ossimUnaryOpASind(),
+                       v,
+                       v1);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      break;
+   }
+   case OSSIM_EQU_TOKEN_COS:
+   {
+      theCurrentId = theLexer->yylex();
+      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
+      {
+         theCurrentId = theLexer->yylex();
+         result = parseExpression();
+         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
+         {
+            if(theValueStack.size() > 0)
+            {
+               theCurrentId = theLexer->yylex();
+               ossimEquValue v;
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+               
+               applyOp(ossimUnaryOpCos(),
+                       v,
+                       v1);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      break;
+   }
+   case OSSIM_EQU_TOKEN_COSD:
+   {
+      theCurrentId = theLexer->yylex();
+      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
+      {
+         theCurrentId = theLexer->yylex();
+         result = parseExpression();
+         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
+         {
+            if(theValueStack.size() > 0)
+            {
+               theCurrentId = theLexer->yylex();
+               ossimEquValue v;
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+               
+               applyOp(ossimUnaryOpCosd(),
+                       v,
+                       v1);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      break;
+   }
+   case OSSIM_EQU_TOKEN_ACOS:
+   {
+      theCurrentId = theLexer->yylex();
+      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
+      {
+         theCurrentId = theLexer->yylex();
+         result = parseExpression();
+         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
+         {
+            if(theValueStack.size() > 0)
+            {
+               theCurrentId = theLexer->yylex();
+               ossimEquValue v;
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+               
+               applyOp(ossimUnaryOpACos(),
+                       v,
+                       v1);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      break;
+   }
+   case OSSIM_EQU_TOKEN_ACOSD:
+   {
+      theCurrentId = theLexer->yylex();
+      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
+      {
+         theCurrentId = theLexer->yylex();
+         result = parseExpression();
+         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
+         {
+            if(theValueStack.size() > 0)
+            {
+               theCurrentId = theLexer->yylex();
+               ossimEquValue v;
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+               
+               applyOp(ossimUnaryOpACosd(),
+                       v,
+                       v1);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      break;
+   }
+   case OSSIM_EQU_TOKEN_TAN:
+   {
+      theCurrentId = theLexer->yylex();
+      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
+      {
+         theCurrentId = theLexer->yylex();
+         result = parseExpression();
+         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
+         {
+            if(theValueStack.size() > 0)
+            {
+               theCurrentId = theLexer->yylex();
+               ossimEquValue v;
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+               
+               applyOp(ossimUnaryOpTan(),
+                       v,
+                       v1);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      break;
+   }
+   case OSSIM_EQU_TOKEN_TAND:
+   {
+      theCurrentId = theLexer->yylex();
+      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
+      {
+         theCurrentId = theLexer->yylex();
+         result = parseExpression();
+         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
+         {
+            if(theValueStack.size() > 0)
+            {
+               theCurrentId = theLexer->yylex();
+               ossimEquValue v;
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+               
+               applyOp(ossimUnaryOpTand(),
+                       v,
+                       v1);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      break;
+   }
+   case OSSIM_EQU_TOKEN_ATAN:
+   {
+      theCurrentId = theLexer->yylex();
+      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
+      {
+         theCurrentId = theLexer->yylex();
+         result = parseExpression();
+         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
+         {
+            if(theValueStack.size() > 0)
+            {
+               theCurrentId = theLexer->yylex();
+               ossimEquValue v;
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+               
+               applyOp(ossimUnaryOpATan(),
+                       v,
+                       v1);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      break;
+   }
+   case OSSIM_EQU_TOKEN_ATAND:
+   {
+      theCurrentId = theLexer->yylex();
+      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
+      {
+         theCurrentId = theLexer->yylex();
+         result = parseExpression();
+         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
+         {
+            if(theValueStack.size() > 0)
+            {
+               theCurrentId = theLexer->yylex();
+               ossimEquValue v;
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+               
+               applyOp(ossimUnaryOpATand(),
+                       v,
+                       v1);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      break;
+   }
+   case OSSIM_EQU_TOKEN_LOG:
+   {
+      theCurrentId = theLexer->yylex();
+      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
+      {
+         theCurrentId = theLexer->yylex();
+         result = parseExpression();
+         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
+         {
+            if(theValueStack.size() > 0)
+            {
+               theCurrentId = theLexer->yylex();
+               ossimEquValue v;
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+               
+               applyOp(ossimUnaryOpLog(),
+                       v,
+                       v1);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      break;
+   }
+   case OSSIM_EQU_TOKEN_LOG10:
+   {
+      theCurrentId = theLexer->yylex();
+      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
+      {
+         theCurrentId = theLexer->yylex();
+         result = parseExpression();
+         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
+         {
+            if(theValueStack.size() > 0)
+            {
+               theCurrentId = theLexer->yylex();
+               ossimEquValue v;
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+               
+               applyOp(ossimUnaryOpLog10(),
+                       v,
+                       v1);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      break;
+   }
+   case OSSIM_EQU_TOKEN_SQRT:
+   {
+      theCurrentId = theLexer->yylex();
+      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
+      {
+         theCurrentId = theLexer->yylex();
+         result = parseExpression();
+         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
+         {
+            if(theValueStack.size() > 0)
+            {
+               theCurrentId = theLexer->yylex();
+               ossimEquValue v;
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+               
+               applyOp(ossimUnaryOpSqrt(),
+                       v,
+                       v1);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      break;
+   }
+   case OSSIM_EQU_TOKEN_EXP:
+   {
+      theCurrentId = theLexer->yylex();
+      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
+      {
+         theCurrentId = theLexer->yylex();
+         result = parseExpression();
+         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
+         {
+            if(theValueStack.size() > 0)
+            {
+               theCurrentId = theLexer->yylex();
+               ossimEquValue v;
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+               
+               applyOp(ossimUnaryOpExp(),
+                       v,
+                       v1);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      break;
+   }
+   default:
+   {
+      result = false;
+   }
+   }
+
+   return result;
+}
+
+bool ossimEquationCombiner::parseUnaryFactor()
+{
+   bool result = false;
+
+   
+   if(theCurrentId == OSSIM_EQU_TOKEN_MINUS)
+   {
+      theCurrentId = theLexer->yylex();
+
+      if(parseFactor())
+      {
+         if(theValueStack.size() > 0)
+         {
+            ossimEquValue v;
+            ossimEquValue v1 = theValueStack.top();
+            theValueStack.pop();
+            
+            applyOp(ossimUnaryOpNeg(),
+                    v,
+                    v1);
+            
+            theValueStack.push(v);
+         }
+         else
+         {
+            result = false;
+         }
+
+         result = true;
+      }
+      else
+      {
+         result = false;
+      }
+   }
+   else if(theCurrentId == OSSIM_EQU_TOKEN_TILDE)
+   {
+      theCurrentId = theLexer->yylex();
+
+      if(parseFactor())
+      {
+         if(theValueStack.size() > 0)
+         {
+            ossimEquValue v;
+            ossimEquValue v1 = theValueStack.top();
+            theValueStack.pop();
+            
+            applyOp(ossimUnaryOpOnesComplement(),
+                    v,
+                    v1);
+            
+            theValueStack.push(v);
+         }
+         else
+         {
+            result = false;
+         }
+
+         result = true;
+      }
+      else
+      {
+         result = false;
+      }
+   }
+   return result;
+}
+
+bool ossimEquationCombiner::parseFactor()
+{
+   bool result = false;
+
+   switch(theCurrentId)
+   {
+   case OSSIM_EQU_TOKEN_CONSTANT:
+   {
+      ossimEquValue v;
+
+      v.type = OSSIM_EQU_DOUBLE_TYPE;
+      v.d.doubleValue = atof(theLexer->YYText());
+      theValueStack.push(v);
+      
+      theCurrentId = theLexer->yylex();
+      
+      result =  true;
+      break;
+   }
+   case OSSIM_EQU_TOKEN_PI:
+   {
+      ossimEquValue v;
+
+      v.type = OSSIM_EQU_DOUBLE_TYPE;
+      v.d.doubleValue = M_PI;
+      theValueStack.push(v);
+      
+      theCurrentId = theLexer->yylex();
+      
+      result =  true;
+      break;      
+   }
+   case OSSIM_EQU_TOKEN_IMAGE_VARIABLE:
+   {
+      theCurrentId = theLexer->yylex();
+      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_ARRAY_BRACKET)
+      {
+         theCurrentId = theLexer->yylex();
+         if(parseExpression())
+         {
+            if(!theValueStack.empty())
+            {
+               if(theValueStack.top().type == OSSIM_EQU_DOUBLE_TYPE)
+               {
+                  if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_ARRAY_BRACKET)
+                  {
+                     theCurrentId = theLexer->yylex();
+                     ossim_uint32 index = (ossim_uint32)theValueStack.top().d.doubleValue;
+                     theValueStack.pop();
+                     ossimRefPtr<ossimImageData> data = getNewImageData(index);
+                     result = true;
+                     if(data.valid())
+                     {
+                        ossimEquValue v;
+                        v.type = OSSIM_EQU_IMAGE_DATA_TYPE;
+                        v.d.imageDataValue = data.release();
+                        theValueStack.push(v);
+
+                     }
+                     else
+                     {
+                        ossimNotify(ossimNotifyLevel_WARN)
+                           <<"Data is NULL for array operation" << endl;
+                     }
+                     result = true;
+                  }
+                  else
+                  {
+                     ossimNotify(ossimNotifyLevel_WARN)
+                        << "Mismatched Right array bracket" << endl;
+                  }
+               }
+               else
+               {
+                  ossimNotify(ossimNotifyLevel_WARN)
+                     << "Expression between array brackets is not a number"
+                     << endl;
+               }
+            }
+            else
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << "no expression within array brackets" << endl;
+            }
+         }
+         else
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "Unabel to parse expression"<<endl;
+         }
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            <<"Need left array brackets to access an input source"<<endl;
+      }
+      
+      break;
+   }
+   case OSSIM_EQU_TOKEN_LEFT_PAREN:
+   {
+      theCurrentId = theLexer->yylex();
+      if(parseExpression())
+      {
+         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
+         {
+            result       =  true;
+            theCurrentId = theLexer->yylex();
+         }
+         else
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "Right parenthesis missing" << endl;
+            result = false;
+         }
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "Unable to parse expression within parenthesis" << endl;
+         result = false;
+      }
+      
+      break;
+   }
+   }
+   if(!result) result = parseUnaryFactor();
+   
+   if(!result) result = parseStdFuncs();
+   
+   return result;
+}
+
+bool ossimEquationCombiner::parseRestOfTerm()
+{
+   //---
+   // Parse the following rule:
+   // RestOfTerm: * Factor RestOfTerm | / Factor RestOfTerm |
+   // ^ Factor RestOfTerm
+   //---
+   bool result = true;
+   
+   switch(theCurrentId)
+   {
+      case OSSIM_EQU_TOKEN_MULT:
+      {
+         theCurrentId = theLexer->yylex();
+         if(parseFactor())
+         {
+            if(theValueStack.size() > 1)
+            {
+               ossimEquValue v;
+            
+               ossimEquValue v2 = theValueStack.top();
+               theValueStack.pop();
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+            
+               applyOp(ossimBinaryOpMul(),
+                       v,
+                       v1,
+                       v2);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << "Multiplication requires two arguments" << endl;
+               result = false;
+            }
+            if(result)
+            {
+               result = parseRestOfTerm();
+            }
+         }
+         else
+         {
+            result = false;
+         }
+         break;
+      }
+      case OSSIM_EQU_TOKEN_DIV:
+      {
+         theCurrentId = theLexer->yylex();
+         if(parseFactor())
+         {
+            if(theValueStack.size() > 1)
+            {
+               ossimEquValue v;
+            
+               ossimEquValue v2 = theValueStack.top();
+               theValueStack.pop();
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+            
+               applyOp(ossimBinaryOpDiv(),
+                       v,
+                       v1,
+                       v2);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+            if(result)
+            {
+               result = parseRestOfTerm();
+            }
+         }
+         else
+         {
+            result = false;
+         }
+
+         break;
+      }
+      case OSSIM_EQU_TOKEN_XOR:
+      {
+         theCurrentId = theLexer->yylex();
+         if(parseFactor())
+         {
+            if(theValueStack.size() > 1)
+            {
+               ossimEquValue v;
+            
+               ossimEquValue v2 = theValueStack.top();
+               theValueStack.pop();
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+            
+               applyOp(ossimBinaryOpXor(),
+                       v,
+                       v1,
+                       v2);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+            if(result)
+            {
+               result = parseRestOfTerm();
+            }
+         }
+         else
+         {
+            result = false;
+         }
+
+         break;
+      }
+      case OSSIM_EQU_TOKEN_AMPERSAND:
+      {
+         theCurrentId = theLexer->yylex();
+         if(parseFactor())
+         {
+            if(theValueStack.size() > 1)
+            {
+               ossimEquValue v;
+            
+               ossimEquValue v2 = theValueStack.top();
+               theValueStack.pop();
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+            
+               applyOp(ossimBinaryOpAnd(),
+                       v,
+                       v1,
+                       v2);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+            if(result)
+            {
+               result = parseRestOfTerm();
+            }
+         }
+         else
+         {
+            result = false;
+         }
+
+         break;
+      }
+      case OSSIM_EQU_TOKEN_OR_BAR:
+      {
+         theCurrentId = theLexer->yylex();
+         if(parseFactor())
+         {
+            if(theValueStack.size() > 1)
+            {
+               ossimEquValue v;
+            
+               ossimEquValue v2 = theValueStack.top();
+               theValueStack.pop();
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+            
+               applyOp(ossimBinaryOpOr(),
+                       v,
+                       v1,
+                       v2);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+            if(result)
+            {
+               result = parseRestOfTerm();
+            }
+         }
+         else
+         {
+            result = false;
+         }
+
+         break;
+      }
+      case OSSIM_EQU_TOKEN_MOD:
+      {
+         theCurrentId = theLexer->yylex();
+         if(parseFactor())
+         {
+            if(theValueStack.size() > 1)
+            {
+               ossimEquValue v;
+            
+               ossimEquValue v2 = theValueStack.top();
+               theValueStack.pop();
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+            
+               applyOp(ossimBinaryOpMod(),
+                       v,
+                       v1,
+                       v2);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+            if(result)
+            {
+               result = parseRestOfTerm();
+            }
+         }
+         else
+         {
+            result = false;
+         }
+
+         break;
+      }
+      case OSSIM_EQU_TOKEN_POWER:
+      {
+         theCurrentId = theLexer->yylex();
+         if(parseFactor())
+         {
+            if(theValueStack.size() > 1)
+            {
+               ossimEquValue v;
+            
+               ossimEquValue v2 = theValueStack.top();
+               theValueStack.pop();
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+            
+               applyOp(ossimBinaryOpPow(),
+                       v,
+                       v1,
+                       v2);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+            if(result)
+            {
+               result = parseRestOfTerm();
+            }
+         }
+         else
+         {
+            result = false;
+         }
+         break;
+      }
+      case OSSIM_EQU_TOKEN_BEQUAL:
+      {
+         theCurrentId = theLexer->yylex();
+         if(parseFactor())
+         {
+            if(theValueStack.size() > 1)
+            {
+               ossimEquValue v;
+            
+               ossimEquValue v2 = theValueStack.top();
+               theValueStack.pop();
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+            
+               applyOp(ossimBinaryOpEqual(),
+                       v,
+                       v1,
+                       v2);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+            if(result)
+            {
+               result = parseRestOfTerm();
+            }
+         }
+         else
+         {
+            result = false;
+         }
+
+         break;
+      }
+      case OSSIM_EQU_TOKEN_BGREATER:
+      {
+         theCurrentId = theLexer->yylex();
+         if(parseFactor())
+         {
+            if(theValueStack.size() > 1)
+            {
+               ossimEquValue v;
+            
+               ossimEquValue v2 = theValueStack.top();
+               theValueStack.pop();
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+            
+               applyOp(ossimBinaryOpGreater(),
+                       v,
+                       v1,
+                       v2);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+            if(result)
+            {
+               result = parseRestOfTerm();
+            }
+         }
+         else
+         {
+            result = false;
+         }
+
+         break;
+      }
+      case OSSIM_EQU_TOKEN_BGREATEROREQUAL:
+      {
+         theCurrentId = theLexer->yylex();
+         if(parseFactor())
+         {
+            if(theValueStack.size() > 1)
+            {
+               ossimEquValue v;
+            
+               ossimEquValue v2 = theValueStack.top();
+               theValueStack.pop();
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+            
+               applyOp(ossimBinaryOpGreaterOrEqual(),
+                       v,
+                       v1,
+                       v2);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+            if(result)
+            {
+               result = parseRestOfTerm();
+            }
+         }
+         else
+         {
+            result = false;
+         }
+
+         break;
+      }
+      case OSSIM_EQU_TOKEN_BLESS:
+      {
+         theCurrentId = theLexer->yylex();
+         if(parseFactor())
+         {
+            if(theValueStack.size() > 1)
+            {
+               ossimEquValue v;
+            
+               ossimEquValue v2 = theValueStack.top();
+               theValueStack.pop();
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+            
+               applyOp(ossimBinaryOpLess(),
+                       v,
+                       v1,
+                       v2);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+            if(result)
+            {
+               result = parseRestOfTerm();
+            }
+         }
+         else
+         {
+            result = false;
+         }
+
+         break;
+      }
+      case OSSIM_EQU_TOKEN_BLESSOREQUAL:
+      {
+         theCurrentId = theLexer->yylex();
+         if(parseFactor())
+         {
+            if(theValueStack.size() > 1)
+            {
+               ossimEquValue v;
+            
+               ossimEquValue v2 = theValueStack.top();
+               theValueStack.pop();
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+            
+               applyOp(ossimBinaryOpLessOrEqual(),
+                       v,
+                       v1,
+                       v2);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+            if(result)
+            {
+               result = parseRestOfTerm();
+            }
+         }
+         else
+         {
+            result = false;
+         }
+
+         break;
+      }
+      case OSSIM_EQU_TOKEN_BDIFFERENT:
+      {
+         theCurrentId = theLexer->yylex();
+         if(parseFactor())
+         {
+            if(theValueStack.size() > 1)
+            {
+               ossimEquValue v;
+            
+               ossimEquValue v2 = theValueStack.top();
+               theValueStack.pop();
+               ossimEquValue v1 = theValueStack.top();
+               theValueStack.pop();
+            
+               applyOp(ossimBinaryOpDifferent(),
+                       v,
+                       v1,
+                       v2);
+            
+               theValueStack.push(v);
+            }
+            else
+            {
+               result = false;
+            }
+            if(result)
+            {
+               result = parseRestOfTerm();
+            }
+         }
+         else
+         {
+            result = false;
+         }
+
+         break;
+      }
+
+   }
+   
+   return result;
+}
+
+bool ossimEquationCombiner::parseTerm()
+{
+   // parse the following rule:
+   //
+   // Term : Factor RestOfTerm
+   
+   bool result = false;
+
+   result = parseFactor();
+   
+   if(result)
+   {
+      result = parseRestOfTerm();
+   }
+   
+   return result;
+}
+
+bool ossimEquationCombiner::parseRestOfExp()
+{
+   // parse the following rule:
+   // RestOfExpression : + Term RestOfExpression | - Term RestOfExpression | epsilon
+   //
+   bool result = true;
+   
+   if(theCurrentId == OSSIM_EQU_TOKEN_PLUS)
+   {
+      theCurrentId = theLexer->yylex();
+      if(parseTerm())
+      {
+
+         if(theValueStack.size() > 1)
+         {
+            ossimEquValue v;
+            
+            ossimEquValue v2 = theValueStack.top();
+            theValueStack.pop();
+            ossimEquValue v1 = theValueStack.top();
+            theValueStack.pop();
+            
+            
+            applyOp(ossimBinaryOpAdd(),
+                    v,
+                    v1,
+                    v2);              
+            
+            theValueStack.push(v);
+         }
+         else
+         {
+            result = false;
+         }
+         if(result)
+         {
+            result = parseRestOfExp();
+         }
+      }
+      else
+      {
+        result =  false;
+      }
+   }
+   else if(theCurrentId == OSSIM_EQU_TOKEN_MINUS)
+   {
+      theCurrentId = theLexer->yylex();
+      if(parseTerm())
+      {
+         if(theValueStack.size() > 1)
+         {
+            ossimEquValue v;
+            
+            ossimEquValue v2 = theValueStack.top();
+            theValueStack.pop();
+            ossimEquValue v1 = theValueStack.top();
+            theValueStack.pop();
+            
+            applyOp(ossimBinaryOpSub(),
+                    v,
+                    v1,
+                    v2);
+            
+            theValueStack.push(v);
+         }
+         else
+         {
+            result = false;
+         }
+         if(result)
+         {
+            result = parseRestOfExp();
+         }
+      }
+      else
+      {
+         result =  false;
+      }
+   }
+   
+   return result;
+}
+
+ossimRefPtr<ossimImageData> ossimEquationCombiner::getImageData(ossim_uint32 index)
+{
+   ossimRefPtr<ossimImageData> result;
+   ossimConnectableObject* obj = getInput(index);
+   
+   if(obj)
+   {
+      theCastFilter->connectMyInputTo(0, obj);
+      result= (theCastFilter->getTile(theTile->getImageRectangle(),
+                                      theCurrentResLevel));
+      
+      if(result.valid())
+      {
+         result->setMinPix(theTile->getMinPix(), theTile->getNumberOfBands());
+         result->setMaxPix(theTile->getMaxPix(), theTile->getNumberOfBands());
+      }
+   }
+
+   return result;
+}
+
+ossimRefPtr<ossimImageData> ossimEquationCombiner::getNewImageData(
+   ossim_uint32 index)
+{
+   ossimRefPtr<ossimImageData> result = getImageData(index);
+
+   if(result.valid())
+   {
+      if(result->getBuf())
+      {
+         result = (ossimImageData*)result->dup();
+      }
+   }
+
+   return result;
+}
+
+bool ossimEquationCombiner::parseExpression()
+{
+   // parse the following rule:
+   // expression : Term ResOfExpression
+   //
+   
+   bool result = false;
+   
+   if(parseTerm())
+   {
+      result =  parseRestOfExp();
+   }
+
+   return result;
+}
+
+ossimRefPtr<ossimImageData> ossimEquationCombiner::parseEquation()
+{
+   ostringstream s;
+
+   s << theEquation;
+
+   istringstream inS(s.str());
+   theLexer->switch_streams(&inS, &ossimNotify(ossimNotifyLevel_WARN));
+
+   theCurrentId = theLexer->yylex();
+
+   while(theCurrentId)
+   {
+      if(!parseExpression())
+      {
+         break;
+      }
+   }
+
+   if(!theValueStack.empty())
+   {
+      assignValue();
+      theTile->validate();
+      clearStacks();
+   }
+   
+   return theTile;
+}    
+
+bool ossimEquationCombiner::applyClamp(ossimImageData* &result,
+                                       const vector<ossimEquValue>& argList)
+{
+   if(result)
+   {
+      // Delete the object indirectly through an ossimRefPtr.
+      ossimRefPtr<ossimImageData> id = result;
+      id = NULL;
+      result = (ossimImageData*) NULL;
+   }
+   if(argList.size() <3)
+   {
+      return false;
+   }
+
+   if(argList[0].type == OSSIM_EQU_DOUBLE_TYPE)
+   {
+      return false;
+   }
+   else if( (argList[1].type == OSSIM_EQU_DOUBLE_TYPE)&&
+            (argList[2].type == OSSIM_EQU_DOUBLE_TYPE))
+   {
+      result = argList[0].d.imageDataValue;
+      
+      if(argList[0].d.imageDataValue)
+      {
+         ossimDataObjectStatus status = result->getDataObjectStatus();
+         if((status != OSSIM_NULL) &&
+            (status != OSSIM_EMPTY))
+         {
+            double minValue = argList[1].d.doubleValue;
+            double maxValue = argList[2].d.doubleValue;
+            
+            if(minValue > maxValue)
+            {
+               std::swap(minValue, maxValue);
+            }
+            
+            int band   = 0;
+            int offset = 0;
+            
+            int upperBoundBand   = result->getNumberOfBands();
+            int offsetUpperBound = result->getWidth()*result->getHeight();
+
+            if(status == OSSIM_PARTIAL)
+            {
+               for(band = 0; band < upperBoundBand; ++band)
+               {
+                  double np = static_cast<double>(result->getNullPix(band));
+                  double *buf = static_cast<double*>(result->getBuf(band));
+                  for(offset = 0; offset < offsetUpperBound; ++ offset)
+                  {
+                     if( *buf != np )
+                     {
+                        if( (*buf) < minValue) *buf = minValue;
+                        else if( (*buf) >maxValue) *buf = maxValue;
+                     }
+                     ++buf;
+                  }
+               }
+            }
+            else
+            {
+               for(band = 0; band < upperBoundBand; ++band)
+               {
+                  double *buf = static_cast<double*>(result->getBuf(band));
+                  for(offset = 0; offset < offsetUpperBound; ++ offset)
+                  {
+                     if( (*buf) < minValue) *buf = minValue;
+                     else if( (*buf) >maxValue) *buf = maxValue;
+                     ++buf;
+                  }
+               }
+            }
+         }
+      }
+         
+      return true;
+   }
+   return false;
+}
+
+bool ossimEquationCombiner::applyConvolution(ossimImageData* &result,
+                                             const vector<ossimEquValue>& argList)
+{
+   if(result)
+   {
+      // Delete the object indirectly through an ossimRefPtr.
+      ossimRefPtr<ossimImageData> id = result;
+      id = NULL;
+      result = (ossimImageData*) NULL;
+   }
+   if(argList.size() <4) return false;
+   
+   for(ossim_uint32 i = 0; i < argList.size(); ++i)
+   {
+      if(argList[i].type != OSSIM_EQU_DOUBLE_TYPE)
+      {
+         return false;
+      }
+   }
+
+   ossim_uint32 index = (ossim_uint32)argList[0].d.doubleValue;
+   int rows = (int)argList[1].d.doubleValue;
+   int cols = (int)argList[2].d.doubleValue;
+   
+   if((rows*cols) != (int)(argList.size()-3))
+   {
+      return false;
+   }
+   
+   NEWMAT::Matrix m(rows,cols);
+
+    int count = 3;
+    for(int r = 0; r< rows;++r)
+    {
+       for(int c=0;c<cols;++c)
+       {
+          m[r][c] = argList[count].d.doubleValue;
+          ++count;
+       }
+    }
+   ossimConnectableObject* obj = getInput(index);
+   if(obj)
+   {
+      ossimRefPtr<ossimConvolutionSource> conv = new ossimConvolutionSource(NULL, m);
+
+      conv->connectMyInputTo(0, obj);
+      theCastFilter->connectMyInputTo(0, conv.get());
+      
+      ossimRefPtr<ossimImageData> tempData =
+         theCastFilter->getTile(theTile->getImageRectangle(),
+                                theCurrentResLevel);
+      if(tempData.valid())
+      {
+         result = (ossimImageData*)tempData->dup();
+      }
+      else
+      {
+         result = (ossimImageData*)theTile->dup();
+      }
+      conv->disconnect();
+      conv = 0;
+   }
+   if(result)
+   {
+      return true;
+   }
+
+   return false;
+}
+
+bool ossimEquationCombiner::applyBlurr(ossimImageData* &result,
+                                       const vector<ossimEquValue>& argList)
+{
+   if(result)
+   {
+      // Delete the object indirectly through an ossimRefPtr.
+      ossimRefPtr<ossimImageData> id = result;
+      id = NULL;
+      result = (ossimImageData*) NULL;
+   }
+   if(argList.size() !=3) return false;
+   
+   for(ossim_uint32 i = 0; i < argList.size(); ++i)
+   {
+      if(argList[i].type != OSSIM_EQU_DOUBLE_TYPE)
+      {
+         return false;
+      }
+   }
+
+   ossim_uint32 index = (ossim_uint32)argList[0].d.doubleValue;
+   int rows = (int)argList[1].d.doubleValue;
+   int cols = (int)argList[2].d.doubleValue;
+   
+   NEWMAT::Matrix m(rows, cols);
+
+   m = 1.0/(rows*cols);
+
+   ossimConnectableObject* obj = getInput(index);
+   if(obj)
+   {
+      ossimRefPtr<ossimConvolutionSource> conv = new ossimConvolutionSource(NULL,
+                                                                m);
+
+      conv->connectMyInputTo(0, obj);
+      theCastFilter->connectMyInputTo(0, conv.get());
+      theCastFilter->initialize();
+
+      ossimRefPtr<ossimImageData> tempData =
+         theCastFilter->getTile(theTile->getImageRectangle(),
+                                theCurrentResLevel);
+      if(tempData.valid())
+      {
+         result = (ossimImageData*)tempData->dup();
+      }
+      conv->disconnect();
+      conv = 0;
+   }
+
+   if(result)
+   {
+      return true;
+   }
+
+   return false;
+}
+
+bool ossimEquationCombiner::applyShift(ossimImageData* &result,
+                                       const vector<ossimEquValue>& argList)
+{
+   if(result)
+   {
+      // Delete the object indirectly through an ossimRefPtr.
+      ossimRefPtr<ossimImageData> id = result;
+      id = NULL;
+      result = (ossimImageData*) NULL;
+   }
+   if(argList.size() !=3) return false;
+   
+   for(ossim_uint32 i = 0; i < argList.size(); ++i)
+   {
+      if(argList[i].type != OSSIM_EQU_DOUBLE_TYPE)
+      {
+         return false;
+      }
+   }
+
+   ossim_uint32 index = (ossim_uint32)argList[0].d.doubleValue;
+   int x = (int)argList[1].d.doubleValue;
+   int y = (int)argList[2].d.doubleValue;
+
+   ossimConnectableObject* obj = getInput(index);
+   if(obj)
+   {
+      ossimRefPtr<ossimSubImageTileSource> shiftSource =
+         new ossimSubImageTileSource(NULL, ossimIpt(x, y));
+
+      shiftSource->connectMyInputTo(0, obj);
+      theCastFilter->connectMyInputTo(0, shiftSource.get());
+
+       ossimRefPtr<ossimImageData> tempData =
+          theCastFilter->getTile(theTile->getImageRectangle(),
+                                 theCurrentResLevel);
+       if(tempData.valid())
+       {
+          result = (ossimImageData*)tempData->dup();
+       }
+      shiftSource->disconnect();
+      shiftSource = 0;
+   }
+
+   if(result)
+   {
+      return true;
+   }
+
+   return false;
+}
+
+bool ossimEquationCombiner::applyOp(const ossimBinaryOp& op,
+                                    ossimEquValue& result,
+                                    ossimEquValue& v1,
+                                    ossimEquValue& v2)
+{
+   bool returnValue = true;
+   
+   if(v1.type == OSSIM_EQU_DOUBLE_TYPE)
+   {
+      if(v2.type == OSSIM_EQU_DOUBLE_TYPE)
+      {
+         result.type = OSSIM_EQU_DOUBLE_TYPE;
+         result.d.doubleValue = op.apply(v1.d.doubleValue, v2.d.doubleValue);
+      }
+      else if(v2.type == OSSIM_EQU_IMAGE_DATA_TYPE)
+      {
+         returnValue = applyOp(op,
+                               v1.d.doubleValue,
+                               v2.d.imageDataValue);
+         
+         result.type = OSSIM_EQU_IMAGE_DATA_TYPE;
+         result.d.imageDataValue = v2.d.imageDataValue;
+      }
+      else
+      {
+         returnValue = false;
+      }
+   }
+   else if(v1.type == OSSIM_EQU_IMAGE_DATA_TYPE)
+   {
+      if(v2.type == OSSIM_EQU_DOUBLE_TYPE)
+      {
+         
+         returnValue = applyOp(op,
+                               v1.d.imageDataValue,
+                               v2.d.doubleValue);
+         
+         result.type = OSSIM_EQU_IMAGE_DATA_TYPE;
+         result.d.imageDataValue = v1.d.imageDataValue;
+         returnValue = true;
+      }
+      else if(v2.type == OSSIM_EQU_IMAGE_DATA_TYPE)
+      {
+         returnValue = applyOp(op,
+                               v1.d.imageDataValue,
+                               v2.d.imageDataValue);
+         result.type = OSSIM_EQU_IMAGE_DATA_TYPE;
+         result.d.imageDataValue = v1.d.imageDataValue;
+
+         // Delete the object indirectly through an ossimRefPtr.
+         ossimRefPtr<ossimImageData> id = v2.d.imageDataValue;
+         id = NULL;
+         v2.d.imageDataValue = (ossimImageData*)NULL;
+         returnValue = true;
+      }
+      else
+      {
+         returnValue = false;
+      }
+   }
+   else
+   {
+      returnValue = false;
+   }
+   
+   return returnValue;
+}
+
+bool ossimEquationCombiner::applyOp(const ossimBinaryOp& op,
+                                    ossimImageData* v1,
+                                    double          v2)
+{   
+   double* buf = static_cast<double*>(v1->getBuf());
+   if(!buf) return true;
+   ossimDataObjectStatus status = v1->getDataObjectStatus();
+
+   if(status == OSSIM_EMPTY || status == OSSIM_NULL)
+   {
+      return true;
+   }
+
+   if(status == OSSIM_FULL )
+   {
+      ossim_uint32 size = v1->getSize();
+      double value = (static_cast<double>(v2));
+     
+      for(ossim_uint32 i = 0; i < size; ++i)
+      {
+         *buf = (double)op.apply(*buf, value);
+         ++buf;
+      }
+   }
+   else
+   {
+      ossim_uint32 sizePerBand = v1->getSizePerBand();
+      ossim_uint32 numberOfBands = v1->getNumberOfBands();
+
+      if(numberOfBands)
+      {
+         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
+         {
+            double* buf = static_cast<double*>(v1->getBuf(band));
+
+            if(buf)
+            {
+               double  np  = static_cast<double>(v1->getNullPix()[band]);
+               
+               for(ossim_uint32 offset = 0; offset < sizePerBand;++offset)
+               {
+                  if(*buf != np)
+                  {
+                     *buf = (double)op.apply(*buf, v2);
+                  }
+                  ++buf;
+               }
+            }
+         }
+      }
+   }
+   return true;
+}
+
+bool ossimEquationCombiner::applyOp(const ossimBinaryOp& op,
+                                    double          v1,
+                                    ossimImageData* v2)
+{   
+   double* buf = static_cast<double*>(v2->getBuf());
+   if(!buf) return true;
+   ossimDataObjectStatus status = v2->getDataObjectStatus();
+
+   if(status == OSSIM_EMPTY || status == OSSIM_NULL)
+   {
+      return true;
+   }
+
+   if(status == OSSIM_FULL )
+   {
+      ossim_uint32 size = v2->getSize();
+      double value = (static_cast<double>(v1));
+     
+      for(ossim_uint32 i = 0; i < size; ++i)
+      {
+         *buf = (double)op.apply(value, *buf);
+         ++buf;
+      }
+   }
+   else
+   {
+      ossim_uint32 sizePerBand = v2->getSizePerBand();
+      ossim_uint32 numberOfBands = v2->getNumberOfBands();
+
+      if(numberOfBands)
+      {
+         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
+         {
+            double* buf = static_cast<double*>(v2->getBuf(band));
+
+            if(buf)
+            {
+               double  np  = static_cast<double>(v2->getNullPix()[band]);
+               
+               for(ossim_uint32 offset = 0; offset < sizePerBand; ++offset)
+               {
+                  if(*buf != np)
+                  {
+                     *buf = (double)op.apply((double)v1, *buf);
+                  }
+                  ++buf;
+               }
+            }
+         }
+      }
+   }
+   
+   return true;
+}
+
+bool ossimEquationCombiner::applyOp(const ossimBinaryOp& op,
+                                    ossimImageData* v1,
+                                    ossimImageData* v2)
+{
+   ossim_uint32 minNumberOfBands = std::min(v1->getNumberOfBands(), v2->getNumberOfBands());
+   ossim_uint32 maxNumberOfBands = std::max(v1->getNumberOfBands(), v2->getNumberOfBands());
+   
+   ossim_uint32 size = v1->getWidth()*v1->getHeight();
+   ossimDataObjectStatus status1 = v1->getDataObjectStatus();
+   ossimDataObjectStatus status2 = v2->getDataObjectStatus();
+
+   double** bandV1   = new double*[maxNumberOfBands];
+   double** bandV2   = new double*[maxNumberOfBands];
+   double* bandV1Np  = new double[maxNumberOfBands];
+   double* bandV2Np  = new double[maxNumberOfBands];
+   ossim_uint32 band = 0;
+   for(band = 0; band < minNumberOfBands; ++band)
+   {
+      bandV1[band]   = (double*)v1->getBuf(band);
+      bandV2[band]   = (double*)v2->getBuf(band);
+      bandV1Np[band] = (double)v1->getNullPix(band);
+      bandV2Np[band] = (double)v2->getNullPix(band);
+   }
+   if(v1->getNumberOfBands() < v2->getNumberOfBands())
+   {
+      for(band = 0; band < maxNumberOfBands; ++band)
+      {
+         bandV1[band]   = (double*)v1->getBuf(minNumberOfBands-1);
+         bandV2[band]   = (double*)v2->getBuf(band);
+         bandV1Np[band] = (double)v1->getNullPix(minNumberOfBands-1);
+         bandV2Np[band] = (double)v2->getNullPix(band);
+      }
+   }
+   else if(v2->getNumberOfBands() < v1->getNumberOfBands())
+   {
+      for(band = 0; band < maxNumberOfBands; ++band)
+      {
+         bandV1[band]   = (double*)v1->getBuf(band);
+         bandV2[band]   = (double*)v2->getBuf(minNumberOfBands-1);
+         bandV1Np[band] = (double)v1->getNullPix(band);
+         bandV2Np[band] = (double)v2->getNullPix(minNumberOfBands-1);
+      }
+   }
+
+   if(status1 == OSSIM_EMPTY)
+   {
+      if(status2 == OSSIM_FULL)
+      {
+         for(band = 0; band < maxNumberOfBands; ++band)
+         {
+            double* buf1 = bandV1[band];
+            double* buf2 = bandV2[band];
+            
+            for(ossim_uint32 i = 0; i < size; ++i)
+            {
+               *buf1 = *buf2;
+               ++buf1;
+               ++buf2;
+            }
+         }
+      }
+      else if(status2 == OSSIM_PARTIAL)
+      {
+         for(band = 0; band < maxNumberOfBands; ++band)
+         {
+            double* buf1 = bandV1[band];
+            double* buf2 = bandV2[band];
+            double  nullPix2 = bandV2Np[band];
+            for(ossim_uint32 i = 0; i < size; ++i)
+            {
+               if(*buf2 != nullPix2)
+               {
+                  *buf1 = *buf2;
+               }
+               ++buf1;
+               ++buf2;
+            }
+         }
+      }
+      v1->setDataObjectStatus(status2);
+   }
+   else if((status1 == OSSIM_FULL)&&
+           (status2 == OSSIM_FULL))
+   { 
+      for(band = 0; band < maxNumberOfBands; ++band)
+      {
+         double* buf1 = bandV1[band];
+         double* buf2 = bandV2[band];
+         
+         for(ossim_uint32 i = 0; i < size; ++i)
+         {
+            *buf1 = op.apply(*buf1, *buf2);
+            ++buf1;
+            ++buf2;
+         }
+      }
+   }
+   else if((status1 == OSSIM_FULL)&&
+           (status2 == OSSIM_PARTIAL))
+   {
+      for(band = 0; band < maxNumberOfBands; ++band)
+      {
+         double* buf1 = bandV1[band];
+         double* buf2 = bandV2[band];
+         double  nullPix2 = bandV2Np[band];
+         for(ossim_uint32 i = 0; i < size; ++i)
+         {
+            if(*buf2 != nullPix2)
+            {
+               *buf1 = op.apply(*buf1, *buf2);
+            }
+               
+            ++buf1;
+            ++buf2;
+         }
+      }
+   }
+   else if((status1 == OSSIM_PARTIAL)&&
+           (status2 == OSSIM_FULL))
+   {
+      for(band = 0; band < maxNumberOfBands; ++band)
+      {
+         double* buf1 = bandV1[band];
+         double* buf2 = bandV2[band];
+         double  nullPix1 = bandV1Np[band];
+         for(ossim_uint32 i = 0; i < size; ++i)
+         {
+            if(*buf1 != nullPix1)
+            {
+               *buf1 = op.apply(*buf1, *buf2);
+            }
+               
+            ++buf1;
+            ++buf2;
+         }
+      }
+   }
+   else if((status1 == OSSIM_PARTIAL)&&
+           (status2 == OSSIM_PARTIAL))
+   {
+      for(band = 0; band < maxNumberOfBands; ++band)
+      {
+         double* buf1 = bandV1[band];
+         double* buf2 = bandV2[band];
+         double  nullPix1 = bandV1Np[band];
+         double  nullPix2 = bandV2Np[band];
+         for(ossim_uint32 i = 0; i < size; ++i)
+         {
+            if((*buf1 != nullPix1)&&
+               (*buf2 != nullPix2))
+            {
+               *buf1 = op.apply(*buf1, *buf2);
+            }
+               
+            ++buf1;
+            ++buf2;
+         }
+      }
+   }
+
+   delete [] bandV1;
+   delete [] bandV2;
+   delete [] bandV1Np;
+   delete [] bandV2Np;
+   
+   return true;
+}
+
+
+bool ossimEquationCombiner::applyOp(const ossimUnaryOp& op,
+                                    ossimEquValue& result,
+                                    ossimEquValue& v)
+{
+   bool returnValue = true;
+   
+   if(v.type == OSSIM_EQU_DOUBLE_TYPE)
+   {
+      result.type = OSSIM_EQU_DOUBLE_TYPE;
+      result.d.doubleValue = op.apply(v.d.doubleValue);
+   }
+   else if(v.type == OSSIM_EQU_IMAGE_DATA_TYPE)
+   {
+      returnValue = applyOp(op,
+                            v.d.imageDataValue);
+      result.type = OSSIM_EQU_IMAGE_DATA_TYPE;
+      result.d.imageDataValue = v.d.imageDataValue;
+      returnValue = true;
+   }
+   else
+   {
+      returnValue = false;
+   }
+   
+   return returnValue;
+}
+
+bool ossimEquationCombiner::applyOp(const ossimUnaryOp& op,
+                                    ossimImageData* v)
+{   
+   double* buf = static_cast<double*>(v->getBuf());
+   if(!buf) return true;
+   ossimDataObjectStatus status = v->getDataObjectStatus();
+
+   if(status == OSSIM_EMPTY || status == OSSIM_NULL)
+   {
+      return true;
+   }
+
+   if(status == OSSIM_FULL )
+   {
+      ossim_uint32 size = v->getSize();
+     
+      for(ossim_uint32 i = 0; i < size; ++i)
+      {
+         *buf = (double)op.apply(*buf);
+         ++buf;
+      }
+   }
+   else
+   {
+      ossim_uint32 sizePerBand   = v->getSizePerBand();
+      ossim_uint32 numberOfBands = v->getNumberOfBands();
+
+      if(numberOfBands)
+      {
+         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
+         {
+            double* buf = static_cast<double*>(v->getBuf(band));
+
+            if(buf)
+            {
+               double  np  = static_cast<double>(v->getNullPix()[band]);
+               
+               for(ossim_uint32 offset = 0; offset < sizePerBand;++offset)
+               {
+                  if(*buf != np)
+                  {
+                     *buf = (double)op.apply(*buf);
+                  }
+                  ++buf;
+               }
+            }
+         }
+      }
+   }
+   
+   return true;
+}
+
+bool ossimEquationCombiner::saveState(ossimKeywordlist& kwl,
+                                      const char* prefix)const
+{
+   ossimString outputScalarType =
+      ossimScalarTypeLut::instance()->getEntryString(theOutputScalarType);
+   
+   kwl.add(prefix,
+           EQUATION_KW,
+           theEquation.c_str(),
+           true);
+
+   kwl.add(prefix,
+           "output_scalar_type",
+           outputScalarType.c_str(),
+           true);
+   
+   return ossimImageCombiner::saveState(kwl,
+                                        prefix);
+}
+
+bool ossimEquationCombiner::loadState(const ossimKeywordlist& kwl,
+                                      const char* prefix)
+{
+   const char* equ    = kwl.find(prefix, EQUATION_KW);
+   const char* scalar = kwl.find(prefix, "output_scalar_type");
+   
+   bool result = ossimImageCombiner::loadState(kwl,
+                                               prefix);
+   
+   if(equ)
+   {
+      theEquation = equ;
+   }
+
+   if(scalar)
+   {      
+      setOutputScalarType(ossimScalarTypeLut::instance()->
+                          getScalarTypeFromString(scalar));
+   }
+
+   return result;
+}
+
+
diff --git a/src/ossim/imaging/ossimEsriShapeFileInterface.cpp b/ossim/src/ossim/imaging/ossimEsriShapeFileInterface.cpp
similarity index 100%
rename from src/ossim/imaging/ossimEsriShapeFileInterface.cpp
rename to ossim/src/ossim/imaging/ossimEsriShapeFileInterface.cpp
diff --git a/ossim/src/ossim/imaging/ossimFeatherMosaic.cpp b/ossim/src/ossim/imaging/ossimFeatherMosaic.cpp
new file mode 100644
index 0000000..a5eb157
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimFeatherMosaic.cpp
@@ -0,0 +1,476 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimFeatherMosaic.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimFeatherMosaic.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimLine.h>
+#include <ossim/base/ossimTrace.h>
+
+static ossimTrace traceDebug("ossimFeatherMosaic:debug");
+
+RTTI_DEF1(ossimFeatherMosaic, "ossimFeatherMosaic", ossimImageMosaic);
+
+ossimFeatherMosaic::ossimFeatherMosaic()
+   :ossimImageMosaic(),
+    theInputFeatherInformation(NULL),
+    theAlphaSum(NULL),
+    theResult(NULL),
+    theFeatherInfoSize(0)
+{
+}
+
+ossimFeatherMosaic::ossimFeatherMosaic(ossimConnectableObject::ConnectableObjectList& inputSources)
+   :ossimImageMosaic(inputSources),
+    theInputFeatherInformation(NULL),
+    theAlphaSum(NULL),
+    theResult(NULL),
+    theFeatherInfoSize(0)
+{
+   initialize();
+}
+
+ossimFeatherMosaic::~ossimFeatherMosaic()
+{
+   if(theInputFeatherInformation)
+   {
+      delete [] theInputFeatherInformation;
+      theInputFeatherInformation = NULL;
+   }
+   theFeatherInfoSize = 0;
+}
+
+ossimRefPtr<ossimImageData> ossimFeatherMosaic::getTile(const ossimIrect& tileRect,
+                                            ossim_uint32 resLevel)
+{
+   long w = tileRect.width();
+   long h = tileRect.height();
+   ossimIpt origin = tileRect.ul();
+   
+   if(!isSourceEnabled())
+   {
+      return ossimImageMosaic::getTile(tileRect, resLevel);
+   }
+   if(!theTile||!theAlphaSum||!theResult||!theInputFeatherInformation)
+   {
+      initialize();
+
+      if(!theTile||!theAlphaSum||!theResult||!theInputFeatherInformation)
+      {
+         return ossimImageMosaic::getTile(tileRect, resLevel);
+      }
+   }
+   ossim_uint32 size = getNumberOfInputs();
+   theAlphaSum->setImageRectangle(tileRect);
+   theResult->setImageRectangle(tileRect);
+   
+   if(size == 0)
+   {
+      return ossimRefPtr<ossimImageData>();
+   }
+
+   if(size == 1)
+   {
+      return ossimImageMosaic::getTile(tileRect, resLevel);
+   }
+
+   long tileW = theTile->getWidth();
+   long tileH = theTile->getHeight();
+   if((w != tileW)||
+      (h != tileH))
+   {
+      theTile->setWidth(w);
+      theTile->setHeight(h);
+      if((w*h)!=(tileW*tileH))
+      {
+         theTile->initialize();
+      }
+   }
+   theTile->setOrigin(origin);
+   theTile->makeBlank();
+      
+   switch(theTile->getScalarType())
+   {
+      case OSSIM_UCHAR:
+      {
+         return combine(static_cast<ossim_uint8>(0),
+                        tileRect, resLevel);
+      }
+      case OSSIM_USHORT16:
+      case OSSIM_USHORT11:
+      {
+         return combine(static_cast<ossim_uint16>(0),
+                        tileRect, resLevel);
+      }
+      case OSSIM_SSHORT16:
+      {
+         return combine(static_cast<ossim_sint16>(0),
+                        tileRect, resLevel);
+      }
+      case OSSIM_DOUBLE:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         return combine(static_cast<double>(0),
+                        tileRect, resLevel);
+      }
+      case OSSIM_FLOAT:
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         return combine(static_cast<float>(0),
+                        tileRect, resLevel);
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimFeatherMosaic::getTile: error, unknown scalar type!!!"
+            << std::endl;
+      }
+   }
+   return ossimRefPtr<ossimImageData>();
+}
+
+
+template <class T> ossimRefPtr<ossimImageData> ossimFeatherMosaic::combine(
+   T,
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   ossimRefPtr<ossimImageData> currentImageData;
+   ossim_uint32 band;
+   long upperBound = theTile->getWidth()*theTile->getHeight();
+   long offset = 0;
+   long row    = 0;
+   long col    = 0;
+   long numberOfTilesProcessed = 0;
+   float *sumBand       = static_cast<float*>(theAlphaSum->getBuf());
+   float         *bandRes = NULL;
+   ossimIpt point;
+   
+   theAlphaSum->fill(0.0);
+   theResult->fill(0.0);
+   
+   T** srcBands  = new T*[theLargestNumberOfInputBands];
+   T** destBands = new T*[theLargestNumberOfInputBands];
+   ossim_uint32 layerIdx = 0;
+   currentImageData  = getNextTile(layerIdx,
+                                   0,
+                                   tileRect,
+                                   resLevel);
+   if(!currentImageData.valid())
+   {
+      delete [] srcBands;
+      delete [] destBands;
+      return currentImageData;
+   }
+   ossim_uint32 minNumberOfBands = currentImageData->getNumberOfBands();
+   for(band = 0; band < minNumberOfBands; ++band)
+   {
+      srcBands[band]  = static_cast<T*>(currentImageData->getBuf(band));
+      destBands[band] = static_cast<T*>(theTile->getBuf(band));
+   }
+   // if the src is smaller than the destination in number
+   // of bands we will just duplicate the last band.
+   for(;band < theLargestNumberOfInputBands; ++band)
+   {
+      srcBands[band]  = srcBands[minNumberOfBands - 1];
+      destBands[band] = static_cast<T*>(theTile->getBuf(band));
+   }
+
+   // most of the time we will not overlap so let's
+   // copy the first tile into destination and check later.
+   //
+   for(band = 0; band < theTile->getNumberOfBands();++band)
+   {
+      T* destBand = destBands[band];
+      T* srcBand  = srcBands[band];
+      if(destBand&&srcBand)
+      {
+         for(offset = 0; offset < upperBound;++offset)
+         {
+            *destBand = *srcBand;
+            ++srcBand; ++destBand;
+         }
+      }
+   }
+   theTile->setDataObjectStatus(currentImageData->getDataObjectStatus());
+
+   while(currentImageData.valid())
+   {
+      ossimDataObjectStatus currentStatus     = currentImageData->getDataObjectStatus();
+      point = currentImageData->getOrigin();
+      long h = (long)currentImageData->getHeight();
+      long w = (long)currentImageData->getWidth();
+      if( (currentStatus != OSSIM_EMPTY) &&
+          (currentStatus != OSSIM_NULL))
+      {
+         ++numberOfTilesProcessed;
+         offset = 0;
+         minNumberOfBands = currentImageData->getNumberOfBands();
+         for(band = 0; band < minNumberOfBands; ++band)
+         {
+            srcBands[band]  = static_cast<T*>(currentImageData->getBuf(band));
+         }
+         // if the src is smaller than the destination in number
+         // of bands we will just duplicate the last band.
+         for(;band < theLargestNumberOfInputBands; ++band)
+         {
+            srcBands[band]  = srcBands[minNumberOfBands - 1];
+         }
+          if(currentStatus == OSSIM_PARTIAL)
+          {
+            for(row = 0; row < h; ++row)
+            {
+               for(col = 0; col < w; ++col)
+               {
+                  if(!currentImageData->isNull(offset))
+                  {
+                     double weight = computeWeight(layerIdx,
+                                                   ossimDpt(point.x+col,
+                                                            point.y+row));
+                     
+                     for(band = 0; band < theLargestNumberOfInputBands; ++band)
+                     {
+                        bandRes = static_cast<float*>(theResult->getBuf(band));
+                        bandRes[offset] += (srcBands[band][offset]*weight);
+                     }
+                     sumBand[offset] += weight;
+                  }
+                  ++offset;
+               }
+            }
+         }
+         else
+         {
+            offset = 0;
+            
+            for(row = 0; row < h; ++row)
+            {
+               for(col = 0; col < w; ++col)
+               {
+                     double weight = computeWeight(layerIdx,
+                                                   ossimDpt(point.x+col,
+                                                            point.y+row));
+                     
+                     for(band = 0; band < theLargestNumberOfInputBands; ++band)
+                     {
+                        bandRes     = static_cast<float*>(theResult->getBuf(band));
+                        
+                        bandRes[offset] += (srcBands[band][offset]*weight);
+                     }
+                     sumBand[offset] += weight;
+                     ++offset;
+               }
+            }
+         }
+      }
+      currentImageData = getNextTile(layerIdx, tileRect, resLevel);
+   }
+   upperBound = theTile->getWidth()*theTile->getHeight();
+
+   if(numberOfTilesProcessed > 1)
+   {
+      const double* minPix = theTile->getMinPix();
+      const double* maxPix = theTile->getMaxPix();
+      const double* nullPix= theTile->getNullPix();
+      for(offset = 0; offset < upperBound;++offset)
+      {
+         for(band = 0; band < theTile->getNumberOfBands();++band)
+         {
+            T* destBand      = static_cast<T*>(theTile->getBuf(band));
+            float* weightedBand = static_cast<float*>(theResult->getBuf(band));
+
+            // this should be ok to test 0.0 instead of
+            // FLT_EPSILON range for 0 since we set it.
+            if(sumBand[offset] != 0.0)
+            {            
+               weightedBand[offset] = (weightedBand[offset])/sumBand[offset];
+               if(weightedBand[offset]<minPix[band])
+               {
+                  weightedBand[offset] = minPix[band];   
+               }
+               else if(weightedBand[offset] > maxPix[band])
+               {
+                  weightedBand[offset] = maxPix[band];                   
+               }
+            }
+            else
+            {
+               weightedBand[offset] = nullPix[band];
+            }
+            destBand[offset] = static_cast<T>(weightedBand[offset]);
+         }
+      }
+      theTile->validate();
+   }
+
+   delete [] srcBands;
+   delete [] destBands;
+
+   return theTile;
+}
+
+double ossimFeatherMosaic::computeWeight(long index,
+                                         const ossimDpt& point)const
+{
+   ossimFeatherInputInformation& info = theInputFeatherInformation[index];
+   double result = 0.0;
+   ossimDpt delta = point-info.theCenter;
+   
+   double length1 = fabs(delta.x*info.theAxis1.x + delta.y*info.theAxis1.y)/info.theAxis1Length;
+   double length2 = fabs(delta.x*info.theAxis2.x + delta.y*info.theAxis2.y)/info.theAxis2Length;
+
+   if(length1 > length2)
+   {
+      result = (1.0 - length1);
+   }
+   else
+   {
+      result = (1.0 - length2);
+   }
+   if(result < 0) result = 0;
+   
+   return result;
+}
+
+void ossimFeatherMosaic::initialize()
+{
+   ossimImageMosaic::initialize();
+
+   allocate();
+   if(theTile.valid())
+   {
+      theAlphaSum = new ossimImageData(this,
+                                       OSSIM_FLOAT,
+                                       1,
+                                       theTile->getWidth(),
+                                       theTile->getHeight());
+      theResult = new ossimImageData(this,
+                                     OSSIM_FLOAT,
+                                     theLargestNumberOfInputBands,
+                                     theTile->getWidth(),
+                                     theTile->getHeight());
+      theAlphaSum->initialize();
+      theResult->initialize();
+   }
+   std::vector<ossimIpt> validVertices;
+   if(!getNumberOfInputs()) return;
+
+   if(theInputFeatherInformation)
+   {
+      delete [] theInputFeatherInformation;
+      theInputFeatherInformation = NULL;
+   }
+   theFeatherInfoSize = getNumberOfInputs();
+   theInputFeatherInformation = new ossimFeatherInputInformation[theFeatherInfoSize];
+   for(long index = 0; index < theFeatherInfoSize; ++ index)
+   {
+      validVertices.clear();
+      ossimImageSource* temp = PTR_CAST(ossimImageSource, getInput(index));
+      if(temp)
+      {
+         temp->getValidImageVertices(validVertices, OSSIM_CLOCKWISE_ORDER);
+         theInputFeatherInformation[index].setVertexList(validVertices);
+      }
+   }
+}
+
+
+ossimFeatherMosaic::ossimFeatherInputInformation::ossimFeatherInputInformation(const std::vector<ossimIpt>& validVertices)
+{
+   setVertexList(validVertices);
+}
+
+
+void ossimFeatherMosaic::ossimFeatherInputInformation::setVertexList(const std::vector<ossimIpt>& validVertices)
+{
+   const char* MODULE = "ossimFeatherMosaic::ossimFeatherInputInformation::setVertexList()";
+   
+   theValidVertices = validVertices;
+
+   theCenter       = ossimDpt(0,0);
+   theAxis1        = ossimDpt(1, 0);
+   theAxis2        = ossimDpt(0, 1);
+   theAxis1Length  = 1;
+   theAxis2Length  = 1;
+
+   double xSum=0.0, ySum=0.0;
+   ossim_uint32 upperBound = (ossim_uint32)validVertices.size();
+   if(upperBound)
+   {
+      for(ossim_uint32 index = 0; index < upperBound; ++index)
+      {
+         xSum += validVertices[index].x;
+         ySum += validVertices[index].y;
+      }
+
+      theCenter.x = xSum/upperBound;
+      theCenter.y = ySum/upperBound;
+
+      // for now we just want a quick implementation of something
+      // and we know that we have 4 vertices for the bounding valid
+      // vertices.
+      //
+      if(upperBound == 4)
+      {
+         ossimDpt edgeDirection1 = validVertices[1] - validVertices[0];
+         ossimDpt edgeDirection2 = validVertices[2] - validVertices[1];
+
+         theAxis1 = ossimDpt(-edgeDirection1.y, edgeDirection1.x);
+         
+         theAxis2 = ossimDpt(-edgeDirection2.y, edgeDirection2.x);
+
+         theAxis1 = theAxis1/theAxis1.length();
+         theAxis2 = theAxis2/theAxis2.length();
+
+         ossimLine line1(theCenter,
+                         theCenter + theAxis1*2);
+         ossimLine line2(validVertices[1],
+                         validVertices[0]);
+         ossimLine line3(theCenter,
+                         theCenter + theAxis2*2);
+         ossimLine line4(validVertices[2],
+                         validVertices[1]);
+         
+         ossimDpt intersectionPoint1 = line1.intersectInfinite(line2);
+         ossimDpt intersectionPoint2 = line3.intersectInfinite(line4);
+
+         
+         theAxis1Length = ossim::round<int>((theCenter-intersectionPoint1).length());
+         theAxis2Length = ossim::round<int>((theCenter-intersectionPoint2).length());
+
+          if(traceDebug())
+          {
+             CLOG << "theAxis1Length:       " << theAxis1Length << endl
+                  << "theAxis2Length:       " << theAxis2Length << endl
+                  << "center:               " << theCenter      << endl;
+          }
+      }
+   }
+}
+
+ostream& operator<<(ostream& out,
+                    const ossimFeatherMosaic::ossimFeatherInputInformation& data)
+{
+   out << "center: " << data.theCenter << endl
+       << "axis1:  " << data.theAxis1  << endl
+       << "axis2:  " << data.theAxis2  << endl
+       << "axis1_length: " << data.theAxis1Length << endl
+       << "axis2_length: " << data.theAxis2Length << endl
+       << "valid vertices: " << endl;
+   std::copy(data.theValidVertices.begin(),
+             data.theValidVertices.end(),
+             std::ostream_iterator<ossimDpt>(out, "\n"));
+   return out;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimFftFilter.cpp b/ossim/src/ossim/imaging/ossimFftFilter.cpp
new file mode 100644
index 0000000..5ccef66
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimFftFilter.cpp
@@ -0,0 +1,473 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimFftFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimFftFilter.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/matrix/newmat.h>
+#include <ossim/matrix/newmatap.h>
+#include <ossim/imaging/ossimScalarRemapper.h>
+#include <ossim/base/ossimStringProperty.h>
+
+RTTI_DEF1(ossimFftFilter, "ossimFftFilter", ossimImageSourceFilter);
+
+ossimFftFilter::ossimFftFilter(ossimObject* owner)
+   :ossimImageSourceFilter(owner),
+    theTile(0),
+    theDirectionType(ossimFftFilterDirectionType_FORWARD),
+    theScalarRemapper(new ossimScalarRemapper())
+{
+   theScalarRemapper->setOutputScalarType(OSSIM_DOUBLE);
+}
+
+ossimFftFilter::ossimFftFilter(ossimImageSource* inputSource)
+   :ossimImageSourceFilter(inputSource),
+    theTile(0),
+    theDirectionType(ossimFftFilterDirectionType_FORWARD),
+    theScalarRemapper(new ossimScalarRemapper())
+{
+   theScalarRemapper->setOutputScalarType(OSSIM_DOUBLE);
+}
+
+ossimFftFilter::ossimFftFilter(ossimObject* owner,
+                               ossimImageSource* inputSource)
+   :ossimImageSourceFilter(owner, inputSource),
+    theTile(0),
+    theDirectionType(ossimFftFilterDirectionType_FORWARD),
+    theScalarRemapper(new ossimScalarRemapper())
+{
+   theScalarRemapper->setOutputScalarType(OSSIM_DOUBLE);
+}
+
+ossimFftFilter::~ossimFftFilter()
+{
+   if(theScalarRemapper.valid())
+   {
+      theScalarRemapper->disconnect();
+      theScalarRemapper = 0;
+   }
+}
+
+ossimRefPtr<ossimImageData> ossimFftFilter::getTile(const ossimIrect& rect,
+                                                    ossim_uint32 resLevel)
+{
+   if(!isSourceEnabled())
+   {
+      return ossimImageSourceFilter::getTile(rect, resLevel);
+   }
+   
+   ossimIrect tempRequest = rect;
+
+   ossim_uint32 w = rect.width();
+   ossim_uint32 h = rect.height();
+   
+   if(w & 1)
+   {
+      ++w;
+   }
+   if(h&1)
+   {
+      ++h;
+   }
+
+   tempRequest = ossimIrect(rect.ul().x,
+                            rect.ul().y,
+                            rect.ul().x + (w-1),
+                            rect.ul().y + (h-1));
+   
+   ossimRefPtr<ossimImageData> input;
+   input  = theScalarRemapper->getTile(tempRequest, resLevel);
+
+   if(!input.valid()) return input;
+   
+   if(!theTile.valid()) initialize();
+   if(!theTile.valid()) return theTile;
+   
+   theTile->setImageRectangle(rect);
+   ossimRefPtr<ossimImageData> tempTile = theTile;
+   
+   if(!input->getBuf())
+   {
+      return theTile;
+   }
+
+   if(rect != tempRequest)
+   {
+      tempTile = (ossimImageData*)theTile->dup();
+      tempTile->setImageRectangle(tempRequest);
+   }
+
+   runFft((ossim_float64)0, input, tempTile);
+          
+   if(tempTile != theTile)
+   {
+      theTile->loadTile(tempTile.get());
+   }
+   
+   theTile->validate();
+
+   return theTile;
+}
+
+void ossimFftFilter::initialize()
+{
+   ossimImageSourceFilter::initialize();
+
+   theTile = ossimImageDataFactory::instance()->create(this, this);
+   
+   if(theTile.valid())
+   {
+      theTile->initialize();
+   }
+   if(theDirectionType == ossimFftFilterDirectionType_FORWARD)
+   {
+      theScalarRemapper->setOutputScalarType(OSSIM_NORMALIZED_DOUBLE);
+   }
+   else
+   {
+      theScalarRemapper->setOutputScalarType(OSSIM_DOUBLE);
+   }
+   theScalarRemapper->connectMyInputTo(0, getInput());
+}
+
+ossimScalarType ossimFftFilter::getOutputScalarType() const
+{
+   if(!isSourceEnabled())
+   {
+      return ossimImageSourceFilter::getOutputScalarType();
+   }
+   
+   if(theDirectionType == ossimFftFilterDirectionType_FORWARD)
+   {
+      return OSSIM_DOUBLE;
+   }
+   
+   return OSSIM_NORMALIZED_DOUBLE;
+}
+
+double ossimFftFilter::getNullPixelValue(ossim_uint32 band)const
+{
+   if(!isSourceEnabled())
+   {
+      return ossimImageSourceFilter::getNullPixelValue(band);
+   }
+   if(theDirectionType == ossimFftFilterDirectionType_FORWARD)
+   {
+      return ossim::nan();
+   }
+
+   // it will invert to a normalized float output
+   return 0.0;
+}
+
+double ossimFftFilter::getMinPixelValue(ossim_uint32 band)const
+{
+   if(!isSourceEnabled())
+   {
+      return ossimImageSourceFilter::getMinPixelValue(band);
+   }
+   if(theDirectionType == ossimFftFilterDirectionType_FORWARD)
+   {
+      return OSSIM_DEFAULT_MIN_PIX_DOUBLE;
+   }
+   return OSSIM_DEFAULT_MIN_PIX_NORM_DOUBLE;
+}
+
+double ossimFftFilter::getMaxPixelValue(ossim_uint32 band)const
+{
+   if(!isSourceEnabled())
+   {
+      return ossimImageSourceFilter::getMaxPixelValue(band);
+   }
+   if(theDirectionType == ossimFftFilterDirectionType_FORWARD)
+   {
+      return OSSIM_DEFAULT_MAX_PIX_DOUBLE;
+   }
+   return OSSIM_DEFAULT_MAX_PIX_NORM_DOUBLE;
+}
+
+ossim_uint32 ossimFftFilter::getNumberOfOutputBands() const
+{
+   if(!isSourceEnabled())
+   {
+      return ossimImageSourceFilter::getNumberOfOutputBands();
+   }
+   ossim_uint32 bands = ossimImageSourceFilter::getNumberOfOutputBands();
+   
+   if(theDirectionType == ossimFftFilterDirectionType_FORWARD)
+   {
+      bands *=2;
+   }
+   else 
+   {
+      bands /=2;
+   }
+
+   return bands;
+}
+
+void ossimFftFilter::setForward()
+{
+   theDirectionType = ossimFftFilterDirectionType_FORWARD;
+}
+
+void ossimFftFilter::setInverse()
+{
+   theDirectionType = ossimFftFilterDirectionType_INVERSE;
+}
+
+ossimString ossimFftFilter::getDirectionTypeAsString()const
+{
+   if(theDirectionType == ossimFftFilterDirectionType_FORWARD)
+   {
+      return "Forward";
+   }
+
+   return "Inverse";
+}
+
+void ossimFftFilter::setDirectionType(const ossimString& directionType)
+{
+   ossimString tempDirectionType = directionType;
+   tempDirectionType = tempDirectionType.downcase();
+   
+   if(tempDirectionType.contains("forward"))
+   {
+      setDirectionType(ossimFftFilterDirectionType_FORWARD);
+   }
+   else
+   {
+      setDirectionType(ossimFftFilterDirectionType_INVERSE);
+   }
+}
+
+void ossimFftFilter::setDirectionType(ossimFftFilterDirectionType directionType)
+{
+   theDirectionType = directionType;
+   if(theTile.valid())
+   {
+      theTile = NULL;
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimFftFilter::getProperty(const ossimString& name)const
+{
+   if(name == "FFT Direction")
+   {
+      std::vector<ossimString> filterNames;
+      filterNames.push_back("Forward");
+      filterNames.push_back("Inverse");
+      ossimStringProperty* stringProp = new ossimStringProperty("FFT Direction",
+								getDirectionTypeAsString(),
+								false,
+								filterNames);
+      stringProp->setCacheRefreshBit();
+
+      return stringProp;
+   }
+
+   return ossimImageSourceFilter::getProperty(name);
+}
+
+void ossimFftFilter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property) return;
+   
+   if(property->getName() == "FFT Direction")
+   {
+      if(theTile.valid())
+      {
+         theTile = NULL;
+      }
+      setDirectionType(property->valueToString());
+   }
+   else
+   {
+      ossimImageSourceFilter::setProperty(property);
+   }
+}
+
+void ossimFftFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageSourceFilter::getPropertyNames(propertyNames);
+   propertyNames.push_back("FFT Direction");
+}
+
+
+template <class T>
+void ossimFftFilter::runFft(T /* dummy */,
+                            ossimRefPtr<ossimImageData>& input,
+                            ossimRefPtr<ossimImageData>& output)
+{
+   // T*             inputBand  = 0;
+
+   NEWMAT::Matrix* realIn = new NEWMAT::Matrix(input->getHeight(),
+                                               input->getWidth());
+   NEWMAT::Matrix* imgIn = new NEWMAT::Matrix(input->getHeight(),
+                                              input->getWidth());
+   NEWMAT::Matrix* realOut = new NEWMAT::Matrix(input->getHeight(),
+                                                input->getWidth());
+   NEWMAT::Matrix* imgOut = new NEWMAT::Matrix(input->getHeight(),
+                                               input->getWidth());
+   ossim_uint32 bandIdx = 0;
+   ossim_uint32 w = input->getWidth();
+   ossim_uint32 h = input->getHeight();
+   ossim_uint32 x = 0;
+   ossim_uint32 y = 0;
+   if(theDirectionType == ossimFftFilterDirectionType_FORWARD)
+   {
+      ossim_uint32 bands = input->getNumberOfBands();
+      for(bandIdx = 0; bandIdx < bands; ++bandIdx)
+      {
+         ossim_float64* bandReal = 0;
+         ossim_float64* bandImg  = 0;
+         fillMatrixForward((T*)input->getBuf(bandIdx),
+                           (T)input->getNullPix(bandIdx),
+                           *realIn,
+                           *imgIn);
+         NEWMAT::FFT2(*realIn, *imgIn, *realOut, *imgOut);
+         bandReal = (ossim_float64*)output->getBuf(2*bandIdx);
+         bandImg  = (ossim_float64*)output->getBuf(2*bandIdx + 1);
+         if(bandReal&&bandImg)
+         {
+            for(y = 0; y < h; ++y)
+            {
+               for(x = 0; x < w; ++x)
+               {
+                  *bandReal = (ossim_float64)((*realOut)[y][x]);
+                  *bandImg  = (ossim_float64)((*imgOut)[y][x]);
+                  ++bandReal;
+                  ++bandImg;
+               }
+            }
+         }
+      }
+   }
+   else
+   {
+      ossim_float64* bandReal = 0;
+      ossim_uint32 bands = input->getNumberOfBands();
+      for(bandIdx = 0; bandIdx < bands; bandIdx+=2)
+      {
+         bandReal = (ossim_float64*)output->getBuf(bandIdx/2);
+         if(input->getBuf(bandIdx)&&
+            input->getBuf(bandIdx+1))
+         {
+            fillMatrixInverse((T*)input->getBuf(bandIdx),
+                              (T*)input->getBuf(bandIdx+1),
+                              *realIn,
+                              *imgIn);
+            NEWMAT::FFT2I(*realIn, *imgIn, *realOut, *imgOut);
+            for(y = 0; y < h; ++y)
+            {
+               for(x = 0; x < w; ++x)
+               {
+                  *bandReal = (ossim_float64)((*realOut)[y][x]);
+                  if(*bandReal > 1.0)
+                  {
+                     *bandReal = 1.0;
+               }
+                  if(*bandReal < 0.0)
+                  {
+                     *bandReal = 0.0;
+                  }
+                  ++bandReal;
+               }
+            }
+         }
+      }
+   }
+   
+   delete realIn;
+   delete imgIn;
+   delete realOut;
+   delete imgOut;
+}
+
+template <class T>
+void ossimFftFilter::fillMatrixForward(T *realPart,
+                                       T nullPix,
+                                       NEWMAT::Matrix& real,
+                                       NEWMAT::Matrix& img)const
+{
+   ossim_uint32 w = real.Ncols();
+   ossim_uint32 h = real.Nrows();
+   ossim_uint32 yIdx = 0;
+   ossim_uint32 xIdx = 0;
+   
+   for(yIdx = 0; yIdx < h; ++yIdx)
+   {
+      for(xIdx = 0; xIdx < w; ++xIdx)
+      {
+         if((double)(*realPart) != nullPix)
+         {
+            real[yIdx][xIdx] = (double)(*realPart);
+         }
+         else
+         {
+            real[yIdx][xIdx] = 0.0;
+         }
+         
+         img[yIdx][xIdx]  = 0.0;
+         
+         ++realPart;
+      }
+   }
+}
+
+template <class T>
+void ossimFftFilter::fillMatrixInverse(T *realPart,
+                                       T *imgPart,
+                                       NEWMAT::Matrix& real,
+                                       NEWMAT::Matrix& img)const
+{
+   ossim_uint32 w = real.Ncols();
+   ossim_uint32 h = real.Nrows();
+   ossim_uint32 yIdx = 0;
+   ossim_uint32 xIdx = 0;
+   
+   for(yIdx = 0; yIdx < h; ++yIdx)
+   {
+      for(xIdx = 0; xIdx < w; ++xIdx)
+      {
+         real[yIdx][xIdx] = (double)(*realPart);
+         img[yIdx][xIdx]  = (double)(*imgPart);
+         
+         ++realPart;
+         ++imgPart;
+      }
+   }
+}
+
+
+bool ossimFftFilter::loadState(const ossimKeywordlist& kwl,
+                               const char* prefix)
+{
+   const char* direction = kwl.find(prefix, "fft_direction");
+   if(direction)
+   {
+      setDirectionType(ossimString(direction));
+   }
+   
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
+bool ossimFftFilter::saveState(ossimKeywordlist& kwl,
+                               const char* prefix)const
+{
+   kwl.add(prefix,
+           "fft_direction",
+           getDirectionTypeAsString(),
+           true);
+   
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
diff --git a/ossim/src/ossim/imaging/ossimFgdcFileWriter.cpp b/ossim/src/ossim/imaging/ossimFgdcFileWriter.cpp
new file mode 100644
index 0000000..a1cc6c3
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimFgdcFileWriter.cpp
@@ -0,0 +1,956 @@
+//----------------------------------------------------------------------------
+// Copyright (c) 2005, David Burken, all rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Class to write out meta data in a Federal Geographic Data
+// Committe (FGDC) format.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimFgdcFileWriter.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+
+#include <ossim/imaging/ossimFgdcFileWriter.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimXmlNode.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimMapProjectionInfo.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <fstream>
+using namespace std;
+
+RTTI_DEF1(ossimFgdcFileWriter, "ossimFgdcFileWriter", ossimMetadataFileWriter)
+
+static ossimTrace traceDebug("ossimFgdcFileWriter:debug");
+
+   
+ossimFgdcFileWriter::ossimFgdcFileWriter()
+   :
+   theIndentionLevel(0),
+   theTabString("\t"),
+   theTemplate(),
+   theSourceImageFilename()
+{
+}
+
+ossimFgdcFileWriter::~ossimFgdcFileWriter()
+{
+}
+
+bool ossimFgdcFileWriter::writeFile()
+{
+   if(theFilename == ossimFilename::NIL)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimFgdcFileWriter::writeFile no filename set!" << endl;
+      return false;
+   }
+   
+   if( !theInputConnection )
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimFgdcFileWriter::writeFile no input connection!" << endl;
+      return false;
+   }
+
+   ofstream os(theFilename.c_str());
+   if (!os)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimFgdcFileWriter::writeFile no input connection!" << endl;
+      return false;
+   }
+
+   // Get the geometry from the input.
+   ossimMapProjection* mapProj = 0;
+   ossimRefPtr<ossimImageGeometry> inputGeom = theInputConnection->getImageGeometry();
+   if ( inputGeom.valid() ) mapProj = PTR_CAST(ossimMapProjection, inputGeom->getProjection());
+   if (!mapProj)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimFgdcFileWriter::writeFile Not map projected."
+         << endl;
+      return false;
+   }
+
+   ossimMapProjectionInfo mpi(mapProj, theInputConnection->getBoundingRect());
+
+   os << "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n"
+      << "<?xml-stylesheet type=\"text/xsl\" href=\"/common/fgdc_classic.xsl\" ?>\n";
+   openTag(os, ossimString("metadata"),  true);
+   openTag(os, ossimString("idinfo"),    true);
+   openTag(os, ossimString("citation"),  true);
+   openTag(os, ossimString("citeinfo"),  true);
+   
+   openTag(os, ossimString("origin"),    false);
+   os << find(ossimString("/metadata/idinfo/citation/citeinfo/origin"));
+   closeTag(os, ossimString("origin"),   false);
+   
+   openTag(os, ossimString("pubdate"),    false);
+   os << find(ossimString("/metadata/idinfo/citation/citeinfo/pubdate"));
+   closeTag(os, ossimString("pubdate"),   false);
+
+   openTag(os, ossimString("title"),    false);
+   // os << find(ossimString("/metadata/idinfo/citation/citeinfo/title"));
+   os << theSourceImageFilename.c_str();
+   closeTag(os, ossimString("title"),   false);
+
+   openTag(os, ossimString("edition"),    false);
+   os << find(ossimString("/metadata/idinfo/citation/citeinfo/edition"));
+   closeTag(os, ossimString("edition"),   false);
+
+   openTag(os, ossimString("geoform"),    false);
+   os << find(ossimString("/metadata/idinfo/citation/citeinfo/geoform"));
+   closeTag(os, ossimString("geoform"),   false);
+
+   openTag(os, ossimString("serinfo"),  true);
+   openTag(os, ossimString("sername"),    false);
+   os << find(ossimString("/metadata/idinfo/citation/citeinfo/serinfo/sername"));
+   closeTag(os, ossimString("sername"),   false);
+
+   openTag(os, ossimString("issue"),    false);
+   os << theSourceImageFilename.c_str();
+   closeTag(os, ossimString("issue"),   false);
+
+   closeTag(os, ossimString("serinfo"),  true);
+
+   openTag(os, ossimString("pubinfo"),  true);
+
+   openTag(os, ossimString("pubplace"),    false);
+   os << find(ossimString("/metadata/idinfo/citation/citeinfo/pubinfo/pubplace"));
+   closeTag(os, ossimString("pubplace"),   false);
+
+   openTag(os, ossimString("publish"),    false);
+   os << find(ossimString("/metadata/idinfo/citation/citeinfo/pubinfo/publish"));
+   closeTag(os, ossimString("publish"),   false);
+
+   closeTag(os, ossimString("pubinfo"),  true);
+   closeTag(os, ossimString("citeinfo"),  true);
+   closeTag(os, ossimString("citation"),  true);
+
+   openTag(os, ossimString("descript"),  true);
+
+   openTag(os, ossimString("abstract"),    false);
+   os << find(ossimString("/metadata/idinfo/descript/abstract"));
+   closeTag(os, ossimString("abstract"),   false);
+
+   openTag(os, ossimString("purpose"),    false);
+   os << find(ossimString("/metadata/idinfo/descript/purpose"));
+   closeTag(os, ossimString("purpose"),   false);
+
+   openTag(os, ossimString("supplinf"),    false);
+   os << find(ossimString("/metadata/idinfo/descript/supplinf"));
+   closeTag(os, ossimString("supplinf"),   false);
+
+   closeTag(os, ossimString("descript"),  true);
+
+   openTag(os, ossimString("timeperd"),  true);
+   openTag(os, ossimString("timeinfo"),  true);
+   openTag(os, ossimString("sngdate"),  true);
+
+   openTag(os, ossimString("caldate"),    false);
+   os << find(ossimString("/metadata/idinfo/timeperd/timeinfo/sngdate/caldate"));
+   closeTag(os, ossimString("caldate"),   false);
+   
+   closeTag(os, ossimString("sngdate"),  true);
+   closeTag(os, ossimString("timeinfo"),  true);
+
+   
+   openTag(os, ossimString("current"),    false);
+   os << find(ossimString("/metadata/idinfo/timeperd/current"));
+   closeTag(os, ossimString("current"),   false);
+
+   closeTag(os, ossimString("timeperd"),  true);
+
+   openTag(os, ossimString("status"),  true);
+
+   openTag(os, ossimString("progress"),    false);
+   os << find(ossimString("/metadata/idinfo/status/progress"));
+   closeTag(os, ossimString("progress"),   false);
+
+   openTag(os, ossimString("update"),    false);
+   os << find(ossimString("/metadata/idinfo/status/update"));
+   closeTag(os, ossimString("update"),   false);
+
+   closeTag(os, ossimString("status"),  true);
+
+   openTag(os, ossimString("spdom"),  true);
+   openTag(os, ossimString("bounding"),  true);
+
+   if (mapProj->isGeographic())
+   {
+      openTag(os, ossimString("westbc"),    false);
+      os << ossimString::toString(mpi.ulGroundPt().lon);
+      closeTag(os, ossimString("westbc"),   false);
+      
+      openTag(os, ossimString("eastbc"),    false);
+      os << ossimString::toString(mpi.lrGroundPt().lon);
+      closeTag(os, ossimString("eastbc"),   false);
+      
+      openTag(os, ossimString("northbc"),    false);
+      os << ossimString::toString(mpi.ulGroundPt().lat);
+      closeTag(os, ossimString("northbc"),   false);
+      
+      openTag(os, ossimString("southbc"),    false);
+      os << ossimString::toString(mpi.lrGroundPt().lat);
+      closeTag(os, ossimString("southbc"),   false);
+   }
+   else
+   {
+      openTag(os, ossimString("westbc"),    false);
+      os << ossimString::toString(mpi.ulEastingNorthingPt().x);
+      closeTag(os, ossimString("westbc"),   false);
+      
+      openTag(os, ossimString("eastbc"),    false);
+      os << ossimString::toString(mpi.lrEastingNorthingPt().x);
+      closeTag(os, ossimString("eastbc"),   false);
+      
+      openTag(os, ossimString("northbc"),    false);
+      os << ossimString::toString(mpi.ulEastingNorthingPt().y);
+      closeTag(os, ossimString("northbc"),   false);
+      
+      openTag(os, ossimString("southbc"),    false);
+      os << ossimString::toString(mpi.ulEastingNorthingPt().y);
+      closeTag(os, ossimString("southbc"),   false);
+   }
+   
+   closeTag(os, ossimString("bounding"),  true);
+   closeTag(os, ossimString("spdom"),    true);
+
+   openTag(os, ossimString("keywords"), true);
+
+   openTag(os, ossimString("theme"), true);
+
+   openTag(os, ossimString("themekt"), false);
+   os << find(ossimString("/metadata/idinfo/keywords/theme/themekt"));
+   closeTag(os, ossimString("themekt"), false);
+
+   openTag(os, ossimString("themekey"), false);
+   os << find(ossimString("/metadata/idinfo/keywords/theme/themekey"));
+   closeTag(os, ossimString("themekey"), false);
+   
+   closeTag(os, ossimString("theme"), true);
+
+   closeTag(os, ossimString("keywords"), true);
+
+   openTag(os, ossimString("accconst"), false);
+   os << find(ossimString("/metadata/idinfo/accconst"));
+   closeTag(os, ossimString("accconst"), false);
+
+   openTag(os, ossimString("useconst"), false);
+   os << find(ossimString("/metadata/idinfo/useconst"));
+   closeTag(os, ossimString("useconst"), false);
+
+   openTag(os, ossimString("ptcontac"), true);
+   
+   openTag(os, ossimString("cntinfo"), true);
+   
+   openTag(os, ossimString("cntperp"), true);
+   openTag(os, ossimString("cntper"), false);
+   os << find(ossimString("/metadata/idinfo/ptcontac/cntinfo/cntperp/cntper"));
+   closeTag(os, ossimString("cntper"), false);
+   closeTag(os, ossimString("cntperp"), true);
+
+   openTag(os, ossimString("cntaddr"), true);
+
+   openTag(os, ossimString("addrtype"), false);
+   os << find(ossimString("/metadata/idinfo/ptcontac/cntinfo/cntaddr/addrtype"));
+   closeTag(os, ossimString("addrtype"), false);
+
+   openTag(os, ossimString("address"), false);
+   os << find(ossimString("/metadata/idinfo/ptcontac/cntinfo/cntaddr/address"));
+   closeTag(os, ossimString("address"), false);
+
+   openTag(os, ossimString("city"), false);
+   os << find(ossimString("/metadata/idinfo/ptcontac/cntinfo/cntaddr/city"));
+   closeTag(os, ossimString("city"), false);
+
+   openTag(os, ossimString("state"), false);
+   os << find(ossimString("/metadata/idinfo/ptcontac/cntinfo/cntaddr/state"));
+   closeTag(os, ossimString("state"), false);
+
+   openTag(os, ossimString("postal"), false);
+   os << find(ossimString("/metadata/idinfo/ptcontac/cntinfo/cntaddr/postal"));
+   closeTag(os, ossimString("postal"), false);
+
+   openTag(os, ossimString("country"), false);
+   os << find(ossimString("/metadata/idinfo/ptcontac/cntinfo/cntaddr/country"));
+   closeTag(os, ossimString("country"), false);
+
+   closeTag(os, ossimString("cntaddr"), true);
+
+   openTag(os, ossimString("cntvoice"), false);
+   os << find(ossimString("/metadata/idinfo/ptcontac/cntinfo/cntvoice"));
+   closeTag(os, ossimString("cntvoice"), false);
+  
+   openTag(os, ossimString("cntfax"), false);
+
+   os << find(ossimString("/metadata/idinfo/ptcontac/cntinfo/cntfax"));
+   closeTag(os, ossimString("cntfax"), false);
+  
+   openTag(os, ossimString("cntemail"), false);
+   os << find(ossimString("/metadata/idinfo/ptcontac/cntinfo/cntemail"));
+   closeTag(os, ossimString("cntemail"), false);
+   
+   closeTag(os, ossimString("cntinfo"), true);
+   closeTag(os, ossimString("ptcontac"), true);
+
+   openTag(os, ossimString("secinfo"), true);
+
+   openTag(os, ossimString("secclass"), false);
+   os << find(ossimString("/metadata/idinfo/secinfo/secclass"));
+   closeTag(os, ossimString("secclass"), false);
+
+   openTag(os, ossimString("secsys"), false);
+   os << find(ossimString("/metadata/idinfo/secinfo/secsys"));
+   closeTag(os, ossimString("secsys"), false);
+
+   openTag(os, ossimString("sechandl"), false);
+   os << find(ossimString("/metadata/idinfo/secinfo/sechandl"));
+   closeTag(os, ossimString("sechandl"), false);
+
+   closeTag(os, ossimString("secinfo"), true);
+   closeTag(os, ossimString("idinfo"), true);
+   
+   openTag(os, ossimString("distinfo"), true);
+   openTag(os, ossimString("distrib"), true);
+   openTag(os, ossimString("cntinfo"), true);
+   openTag(os, ossimString("cntperp"), true);
+   openTag(os, ossimString("cntper"), false);
+   os << find(ossimString("/metadata/distinfo/distrib/cntinfo/cntperp/cntper"));
+
+   closeTag(os, ossimString("cntper"), false);
+   closeTag(os, ossimString("cntperp"), true);
+
+   openTag(os, ossimString("cntaddr"), true);
+
+   openTag(os, ossimString("addrtype"), false);
+   os << find(ossimString("/metadata/distinfo/distrib/cntinfo/cntaddr/addrtype"));
+   closeTag(os, ossimString("addrtype"), false);
+
+   openTag(os, ossimString("address"), false);
+   os << find(ossimString("/metadata/distinfo/distrib/cntinfo/cntaddr/address"));
+   closeTag(os, ossimString("address"), false);
+
+   openTag(os, ossimString("city"), false);
+   os << find(ossimString("/metadata/distinfo/distrib/cntinfo/cntaddr/city"));
+   closeTag(os, ossimString("city"), false);
+
+   openTag(os, ossimString("state"), false);
+   os << find(ossimString("/metadata/distinfo/distrib/cntinfo/cntaddr/state"));
+   closeTag(os, ossimString("state"), false);
+
+   openTag(os, ossimString("postal"), false);
+   os << find(ossimString("/metadata/distinfo/distrib/cntinfo/cntaddr/postal"));
+   closeTag(os, ossimString("postal"), false);
+
+   openTag(os, ossimString("country"), false);
+   os << find(ossimString("/metadata/distinfo/distrib/cntinfo/cntaddr/country"));
+   closeTag(os, ossimString("country"), false);
+
+   closeTag(os, ossimString("cntaddr"), true);
+
+   openTag(os, ossimString("cntvoice"), false);
+   os << find(ossimString("/metadata/distinfo/distrib/cntinfo/cntvoice"));
+   closeTag(os, ossimString("cntvoice"), false);
+  
+   openTag(os, ossimString("cntfax"), false);
+   os << find(ossimString("/metadata/distinfo/distrib/cntinfo/cntfax"));
+   closeTag(os, ossimString("cntfax"), false);
+  
+   openTag(os, ossimString("cntemail"), false);
+   os << find(ossimString("/metadata/distinfo/distrib/cntinfo/cntemail"));
+   closeTag(os, ossimString("cntemail"), false);
+   
+   closeTag(os, ossimString("cntinfo"), true);
+   closeTag(os, ossimString("distrib"), true);
+
+   openTag(os, ossimString("resdesc"), false);
+   os << find(ossimString("/metadata/distinfo/resdesc"));
+   closeTag(os, ossimString("resdesc"), false);
+
+   openTag(os, ossimString("distliab"), false);
+   os << find(ossimString("/metadata/distinfo/distliab"));
+   closeTag(os, ossimString("distliab"), false);
+
+   openTag(os, ossimString("stdorder"), true);
+   openTag(os, ossimString("digform"), true);
+   openTag(os, ossimString("digtinfo"), true);
+   
+   openTag(os, ossimString("formname"), false);
+   os << find(ossimString("/metadata/distinfo/stdorder/digform/digtinfo/formname"));
+   closeTag(os, ossimString("formname"), false);
+
+   closeTag(os, ossimString("digtinfo"), true);
+
+   openTag(os, ossimString("digtopt"), true);
+   openTag(os, ossimString("onlinopt"), true);   
+   openTag(os, ossimString("computer"), true);
+   openTag(os, ossimString("networka"), true);
+
+   openTag(os, ossimString("networkr"), false);
+   os << find(ossimString("/metadata/distinfo/stdorder/digform/digtopt/onlinopt/computer/networka/networkr"));
+   closeTag(os, ossimString("networkr"), false);
+
+   closeTag(os, ossimString("networka"), true);
+   closeTag(os, ossimString("computer"), true);
+   closeTag(os, ossimString("onlinopt"), true);
+   closeTag(os, ossimString("digtopt"), true);
+   closeTag(os, ossimString("digform"), true);
+
+   openTag(os, ossimString("fees"), false);
+   os << find(ossimString("/metadata/distinfo/stdorder/fees"));
+   closeTag(os, ossimString("fees"), false);
+
+   closeTag(os, ossimString("stdorder"), true);
+   closeTag(os, ossimString("distinfo"), true);
+
+   openTag(os, ossimString("metainfo"), true);
+
+   openTag(os, ossimString("metd"), false);
+   os << find(ossimString("/metadata/metainfo/metd"));
+   closeTag(os, ossimString("metd"), false);
+
+   openTag(os, ossimString("metc"), true);
+   openTag(os, ossimString("cntinfo"), true);
+   openTag(os, ossimString("cntperp"), true);
+   
+   openTag(os, ossimString("cntper"), false);
+   os << find(ossimString("/metadata/metainfo/metc/cntinfo/cntperp/cntper"));
+   closeTag(os, ossimString("cntper"), false);
+
+   closeTag(os, ossimString("cntperp"), true);
+   
+   openTag(os, ossimString("cntaddr"), true);
+
+   openTag(os, ossimString("addrtype"), false);
+   os << find(ossimString("/metadata/metainfo/metc/cntinfo/cntaddr/addrtype"));
+   closeTag(os, ossimString("addrtype"), false);
+
+   openTag(os, ossimString("address"), false);
+   os << find(ossimString("/metadata/metainfo/metc/cntinfo/cntaddr/address"));
+   closeTag(os, ossimString("address"), false);
+
+   openTag(os, ossimString("city"), false);
+   os << find(ossimString("/metadata/metainfo/metc/cntinfo/cntaddr/city"));
+   closeTag(os, ossimString("city"), false);
+
+   openTag(os, ossimString("state"), false);
+   os << find(ossimString("/metadata/metainfo/metc/cntinfo/cntaddr/state"));
+   closeTag(os, ossimString("state"), false);
+
+   openTag(os, ossimString("postal"), false);
+   os << find(ossimString("/metadata/metainfo/metc/cntinfo/cntaddr/postal"));
+   closeTag(os, ossimString("postal"), false);
+
+   openTag(os, ossimString("country"), false);
+   os << find(ossimString("/metadata/metainfo/metc/cntinfo/cntaddr/country"));
+   closeTag(os, ossimString("country"), false);
+
+   closeTag(os, ossimString("cntaddr"), true);
+
+   openTag(os, ossimString("cntvoice"), false);
+   os << find(ossimString("/metadata/metainfo/metc/cntinfo/cntvoice"));
+   closeTag(os, ossimString("cntvoice"), false);
+  
+   openTag(os, ossimString("cntfax"), false);
+   os << find(ossimString("/metadata/metainfo/metc/cntinfo/cntfax"));
+   closeTag(os, ossimString("cntfax"), false);
+  
+   openTag(os, ossimString("cntemail"), false);
+   os << find(ossimString("/metadata/metainfo/metc/cntinfo/cntemail"));
+   closeTag(os, ossimString("cntemail"), false);
+   
+   closeTag(os, ossimString("cntinfo"), true);
+   closeTag(os, ossimString("metc"), true);
+
+   openTag(os, ossimString("metstdn"), false);
+   os << find(ossimString("/metadata/metainfo/metstdn"));
+   closeTag(os, ossimString("metstdn"), false);
+
+   openTag(os, ossimString("metstdv"), false);
+   os << find(ossimString("/metadata/metainfo/metstdv"));
+   closeTag(os, ossimString("metstdv"), false);
+
+   closeTag(os, ossimString("metainfo"), true);
+   closeTag(os, ossimString("metadata"), true);
+
+   os.close();
+
+   return true;
+}
+
+bool ossimFgdcFileWriter::writeTemplate(const ossimFilename& file) const
+{
+   ofstream os(file.c_str());
+   if (!os)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimFgdcFileWriter::writeTemplate Could not open: " << file
+         << endl;
+      return false;
+   }
+
+   os << "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n"
+      << "<?xml-stylesheet type=\"text/xsl\" href=\"/common/fgdc_classic.xsl\" ?>\n";
+   openTag(os, ossimString("metadata"),  true);
+   openTag(os, ossimString("idinfo"),    true);
+   openTag(os, ossimString("citation"),  true);
+   openTag(os, ossimString("citeinfo"),  true);
+   
+   openTag(os, ossimString("origin"),    false);
+   closeTag(os, ossimString("origin"),   false);
+   
+   openTag(os, ossimString("pubdate"),    false);
+   closeTag(os, ossimString("pubdate"),   false);
+
+   openTag(os, ossimString("title"),    false);
+   closeTag(os, ossimString("title"),   false);
+
+   openTag(os, ossimString("edition"),    false);
+   closeTag(os, ossimString("edition"),   false);
+
+   openTag(os, ossimString("geoform"),    false);
+   closeTag(os, ossimString("geoform"),   false);
+
+   openTag(os, ossimString("serinfo"),  true);
+   openTag(os, ossimString("sername"),    false);
+
+   closeTag(os, ossimString("sername"),   false);
+
+   openTag(os, ossimString("issue"),    false);
+   closeTag(os, ossimString("issue"),   false);
+
+   closeTag(os, ossimString("serinfo"),  true);
+
+   openTag(os, ossimString("pubinfo"),  true);
+
+   openTag(os, ossimString("pubplace"),    false);
+
+   closeTag(os, ossimString("pubplace"),   false);
+
+   openTag(os, ossimString("publish"),    false);
+   closeTag(os, ossimString("publish"),   false);
+
+   closeTag(os, ossimString("pubinfo"),  true);
+   closeTag(os, ossimString("citeinfo"),  true);
+   closeTag(os, ossimString("citation"),  true);
+
+   openTag(os, ossimString("descript"),  true);
+
+   openTag(os, ossimString("abstract"),    false);
+   closeTag(os, ossimString("abstract"),   false);
+
+   openTag(os, ossimString("purpose"),    false);
+   closeTag(os, ossimString("purpose"),   false);
+
+   openTag(os, ossimString("supplinf"),    false);
+   closeTag(os, ossimString("supplinf"),   false);
+
+   closeTag(os, ossimString("descript"),  true);
+
+   openTag(os, ossimString("timeperd"),  true);
+   openTag(os, ossimString("timeinfo"),  true);
+   openTag(os, ossimString("sngdate"),  true);
+
+   openTag(os, ossimString("caldate"),    false);
+   closeTag(os, ossimString("caldate"),   false);
+   
+   closeTag(os, ossimString("sngdate"),  true);
+   closeTag(os, ossimString("timeinfo"),  true);
+
+   
+   openTag(os, ossimString("current"),    false);
+   closeTag(os, ossimString("current"),   false);
+
+   closeTag(os, ossimString("timeperd"),  true);
+
+   openTag(os, ossimString("status"),  true);
+
+   openTag(os, ossimString("progress"),    false);
+   closeTag(os, ossimString("progress"),   false);
+
+   openTag(os, ossimString("update"),    false);
+   closeTag(os, ossimString("update"),   false);
+
+   closeTag(os, ossimString("status"),  true);
+
+   openTag(os, ossimString("spdom"),  true);
+   openTag(os, ossimString("bounding"),  true);
+
+   openTag(os, ossimString("westbc"),    false);
+   closeTag(os, ossimString("westbc"),   false);
+   openTag(os, ossimString("eastbc"),    false);
+
+   closeTag(os, ossimString("eastbc"),   false);
+   openTag(os, ossimString("northbc"),    false);
+
+   closeTag(os, ossimString("northbc"),   false);
+   openTag(os, ossimString("southbc"),    false);
+
+   closeTag(os, ossimString("southbc"),   false);
+
+   closeTag(os, ossimString("bounding"),  true);
+   closeTag(os, ossimString("spdom"),    true);
+
+   openTag(os, ossimString("keywords"), true);
+
+   openTag(os, ossimString("theme"), true);
+
+   openTag(os, ossimString("themekt"), false);
+   closeTag(os, ossimString("themekt"), false);
+
+   openTag(os, ossimString("themekey"), false);
+   closeTag(os, ossimString("themekey"), false);
+   
+   closeTag(os, ossimString("theme"), true);
+
+   closeTag(os, ossimString("keywords"), true);
+
+   openTag(os, ossimString("accconst"), false);
+   closeTag(os, ossimString("accconst"), false);
+
+   openTag(os, ossimString("useconst"), false);
+   closeTag(os, ossimString("useconst"), false);
+
+   openTag(os, ossimString("ptcontac"), true);
+   
+   openTag(os, ossimString("cntinfo"), true);
+   
+   openTag(os, ossimString("cntperp"), true);
+   openTag(os, ossimString("cntper"), false);
+   closeTag(os, ossimString("cntper"), false);
+   closeTag(os, ossimString("cntperp"), true);
+
+   openTag(os, ossimString("cntaddr"), true);
+
+   openTag(os, ossimString("addrtype"), false);
+   closeTag(os, ossimString("addrtype"), false);
+
+   openTag(os, ossimString("address"), false);
+   closeTag(os, ossimString("address"), false);
+
+   openTag(os, ossimString("city"), false);
+   closeTag(os, ossimString("city"), false);
+
+   openTag(os, ossimString("state"), false);
+   closeTag(os, ossimString("state"), false);
+
+   openTag(os, ossimString("postal"), false);
+   closeTag(os, ossimString("postal"), false);
+
+   openTag(os, ossimString("country"), false);
+   closeTag(os, ossimString("country"), false);
+
+   closeTag(os, ossimString("cntaddr"), true);
+
+   openTag(os, ossimString("cntvoice"), false);
+   closeTag(os, ossimString("cntvoice"), false);
+  
+   openTag(os, ossimString("cntfax"), false);
+   closeTag(os, ossimString("cntfax"), false);
+  
+   openTag(os, ossimString("cntemail"), false);
+   closeTag(os, ossimString("cntemail"), false);
+   
+   closeTag(os, ossimString("cntinfo"), true);
+   
+   closeTag(os, ossimString("ptcontac"), true);
+
+   openTag(os, ossimString("secinfo"), true);
+   openTag(os, ossimString("secclass"), false);
+   closeTag(os, ossimString("secclass"), false);
+   openTag(os, ossimString("secsys"), false);
+   closeTag(os, ossimString("secsys"), false);
+   openTag(os, ossimString("sechandl"), false);
+   closeTag(os, ossimString("sechandl"), false);
+   closeTag(os, ossimString("secinfo"), true);
+
+   closeTag(os, ossimString("idinfo"), true);
+
+   openTag(os, ossimString("distinfo"), true);
+   openTag(os, ossimString("distrib"), true);
+   openTag(os, ossimString("cntinfo"), true);
+   openTag(os, ossimString("cntperp"), true);
+   openTag(os, ossimString("cntper"), false);
+   closeTag(os, ossimString("cntper"), false);
+   closeTag(os, ossimString("cntperp"), true);
+
+   openTag(os, ossimString("cntaddr"), true);
+
+   openTag(os, ossimString("addrtype"), false);
+   closeTag(os, ossimString("addrtype"), false);
+
+   openTag(os, ossimString("address"), false);
+   closeTag(os, ossimString("address"), false);
+
+   openTag(os, ossimString("city"), false);
+   closeTag(os, ossimString("city"), false);
+
+   openTag(os, ossimString("state"), false);
+   closeTag(os, ossimString("state"), false);
+
+   openTag(os, ossimString("postal"), false);
+   closeTag(os, ossimString("postal"), false);
+
+   openTag(os, ossimString("country"), false);
+   closeTag(os, ossimString("country"), false);
+
+   closeTag(os, ossimString("cntaddr"), true);
+
+   openTag(os, ossimString("cntvoice"), false);
+   closeTag(os, ossimString("cntvoice"), false);
+  
+   openTag(os, ossimString("cntfax"), false);
+   closeTag(os, ossimString("cntfax"), false);
+  
+   openTag(os, ossimString("cntemail"), false);
+   closeTag(os, ossimString("cntemail"), false);
+   
+   closeTag(os, ossimString("cntinfo"), true);
+   closeTag(os, ossimString("distrib"), true);
+
+   openTag(os, ossimString("resdesc"), false);
+   closeTag(os, ossimString("resdesc"), false);
+
+   openTag(os, ossimString("distliab"), false);
+   closeTag(os, ossimString("distliab"), false);
+
+   openTag(os, ossimString("stdorder"), true);
+   openTag(os, ossimString("digform"), true);
+   openTag(os, ossimString("digtinfo"), true);
+   
+   openTag(os, ossimString("formname"), false);
+   closeTag(os, ossimString("formname"), false);
+
+   closeTag(os, ossimString("digtinfo"), true);
+
+   openTag(os, ossimString("digtopt"), true);
+   openTag(os, ossimString("onlinopt"), true);   
+   openTag(os, ossimString("computer"), true);
+   openTag(os, ossimString("networka"), true);
+
+   openTag(os, ossimString("networkr"), false);
+   closeTag(os, ossimString("networkr"), false);
+
+   closeTag(os, ossimString("networka"), true);
+   closeTag(os, ossimString("computer"), true);
+   closeTag(os, ossimString("onlinopt"), true);
+   closeTag(os, ossimString("digtopt"), true);
+   closeTag(os, ossimString("digform"), true);
+
+   openTag(os, ossimString("fees"), false);
+   closeTag(os, ossimString("fees"), false);
+
+   closeTag(os, ossimString("stdorder"), true);
+   closeTag(os, ossimString("distinfo"), true);
+
+   openTag(os, ossimString("metainfo"), true);
+
+   openTag(os, ossimString("metd"), false);
+   closeTag(os, ossimString("metd"), false);
+
+   openTag(os, ossimString("metc"), true);
+   openTag(os, ossimString("cntinfo"), true);
+   openTag(os, ossimString("cntperp"), true);
+   
+   openTag(os, ossimString("cntper"), false);
+   closeTag(os, ossimString("cntper"), false);
+
+   closeTag(os, ossimString("cntperp"), true);
+   
+   openTag(os, ossimString("cntaddr"), true);
+
+   openTag(os, ossimString("addrtype"), false);
+   closeTag(os, ossimString("addrtype"), false);
+
+   openTag(os, ossimString("address"), false);
+   closeTag(os, ossimString("address"), false);
+
+   openTag(os, ossimString("city"), false);
+   closeTag(os, ossimString("city"), false);
+
+   openTag(os, ossimString("state"), false);
+   closeTag(os, ossimString("state"), false);
+
+   openTag(os, ossimString("postal"), false);
+   closeTag(os, ossimString("postal"), false);
+
+   openTag(os, ossimString("country"), false);
+   closeTag(os, ossimString("country"), false);
+
+   closeTag(os, ossimString("cntaddr"), true);
+
+   openTag(os, ossimString("cntvoice"), false);
+   closeTag(os, ossimString("cntvoice"), false);
+  
+   openTag(os, ossimString("cntfax"), false);
+   closeTag(os, ossimString("cntfax"), false);
+  
+   openTag(os, ossimString("cntemail"), false);
+   closeTag(os, ossimString("cntemail"), false);
+   
+   closeTag(os, ossimString("cntinfo"), true);
+   closeTag(os, ossimString("metc"), true);
+
+   openTag(os, ossimString("metstdn"), false);
+   closeTag(os, ossimString("metstdn"), false);
+
+   openTag(os, ossimString("metstdv"), false);
+   closeTag(os, ossimString("metstdv"), false);
+
+   closeTag(os, ossimString("metainfo"), true);
+   closeTag(os, ossimString("metadata"), true);
+
+   os.close();
+
+	if(traceDebug())
+	{
+		ossimNotify(ossimNotifyLevel_NOTICE)
+      << "Wrote file:  " << file.c_str() << endl;
+	}
+   
+   return true;
+}
+   
+bool ossimFgdcFileWriter::loadState (const ossimKeywordlist& kwl,
+                                     const char* prefix)
+{
+   const char* lookup = kwl.find(prefix, "template");
+   if (lookup)
+   {
+      setTemplate(ossimFilename(lookup));
+   }
+   lookup = kwl.find(prefix, "source_image_filename");
+   if (lookup)
+   {
+      theSourceImageFilename = lookup;
+   }
+   lookup = kwl.find(prefix, "tab_string");
+   if (lookup)
+   {
+      theTabString = lookup;
+   }
+   lookup = kwl.find(prefix, "fgdc_template_doc");
+   if (lookup)
+   {
+      setTemplate(ossimFilename(lookup));
+   }
+   
+   return ossimMetadataFileWriter::loadState(kwl, prefix);
+}
+
+ossim_uint32 ossimFgdcFileWriter::getIndentionLevel() const
+{
+   return theIndentionLevel;
+}
+
+void ossimFgdcFileWriter::setIndentionLevel(ossim_uint32 level)
+{
+   theIndentionLevel = level;
+}
+
+ossimString ossimFgdcFileWriter::getTabString() const
+{
+   return theTabString;
+}
+
+void ossimFgdcFileWriter::setTabString(const ossimString& tabString)
+{
+   theTabString = tabString;
+}
+
+void ossimFgdcFileWriter::openTag(std::ostream& os,
+                                  const ossimString& tag,
+                                  bool newLine) const
+{
+   if ( theIndentionLevel && theTabString.size() )
+   {
+      ossimString tab;
+      for (ossim_uint32 i = 0; i < theIndentionLevel; ++i)
+      {
+         tab += theTabString;
+      }
+
+      os << tab.c_str();
+   }
+   
+   os << "<" << tag.c_str() << ">";
+
+   if (newLine)
+   {
+      os << "\n";
+      ++theIndentionLevel;
+   }
+}
+
+void ossimFgdcFileWriter::closeTag(std::ostream& os,
+                                   const ossimString& tag,
+                                   bool decrementLevel) const
+{
+   if ( decrementLevel && (theIndentionLevel > 1) && theTabString.size() )
+   {
+      ossimString tab;
+      for (ossim_uint32 i = 0; i < theIndentionLevel-1; ++i)
+      {
+         tab += theTabString;
+      }
+
+      os << tab.c_str();
+   }
+   
+   os << "</" << tag.c_str() << ">\n";
+
+   if (theIndentionLevel && decrementLevel)
+   {
+      --theIndentionLevel;
+   }
+}
+
+void ossimFgdcFileWriter::setTemplate(const ossimFilename& xmlTemplateFile)
+{
+   theTemplate.openFile(xmlTemplateFile);
+}
+
+ossimString ossimFgdcFileWriter::find(const ossimString& xpath) const
+{
+   ossimString result;
+
+   if (theTemplate.getErrorStatus())
+   {
+      return result;
+   }
+   
+   vector< ossimRefPtr<ossimXmlNode> > xml_nodes;
+   theTemplate.findNodes(xpath, xml_nodes);
+
+   if (xml_nodes.size())
+   {
+      if (xml_nodes[0].valid())
+      {
+         result = xml_nodes[0]->getText();
+      }
+   }
+   return result;
+}
+
+void ossimFgdcFileWriter::getMetadatatypeList(
+   std::vector<ossimString>& metadatatypeList) const
+{
+   metadatatypeList.push_back(ossimString("ossim_fgdc")); 
+}
+
+bool ossimFgdcFileWriter::hasMetadataType(
+   const ossimString& metadataType)const
+{
+   return (metadataType == "ossim_fgdc");
+}
+
diff --git a/ossim/src/ossim/imaging/ossimFilter.cpp b/ossim/src/ossim/imaging/ossimFilter.cpp
new file mode 100644
index 0000000..41515b4
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimFilter.cpp
@@ -0,0 +1,334 @@
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%                        ZZZZZ   OOO    OOO   M   M                           %
+%                           ZZ  O   O  O   O  MM MM                           %
+%                         ZZZ   O   O  O   O  M M M                           %
+%                        ZZ     O   O  O   O  M   M                           %
+%                        ZZZZZ   OOO    OOO   M   M                           %
+%                                                                             %
+%                                                                             %
+%                      ImageMagick Image Zoom Methods                         %
+%                                                                             %
+%                                                                             %
+%                              Software Design                                %
+%                                John Cristy                                  %
+%                                 July 1992                                   %
+%                                                                             %
+%                                                                             %
+%  Copyright (C) 2000 ImageMagick Studio, a non-profit organization dedicated %
+%  to making software imaging solutions freely available.                     %
+%                                                                             %
+%  Permission is hereby granted, free of charge, to any person obtaining a    %
+%  copy of this software and associated documentation files ("ImageMagick"),  %
+%  to deal in ImageMagick without restriction, including without limitation   %
+%  the rights to use, copy, modify, merge, publish, distribute, sublicense,   %
+%  and/or sell copies of ImageMagick, and to permit persons to whom the       %
+%  ImageMagick is furnished to do so, subject to the following conditions:    %
+%                                                                             %
+%  The above copyright notice and this permission notice shall be included in %
+%  all copies or substantial portions of ImageMagick.                         %
+%                                                                             %
+%  The software is provided "as is", without warranty of any kind, express or %
+%  implied, including but not limited to the warranties of merchantability,   %
+%  fitness for a particular purpose and noninfringement.  In no event shall   %
+%  ImageMagick Studio be liable for any claim, damages or other liability,    %
+%  whether in an action of contract, tort or otherwise, arising from, out of  %
+%  or in connection with ImageMagick or the use or other dealings in          %
+%  ImageMagick.                                                               %
+%                                                                             %
+%  Except as contained in this notice, the name of the ImageMagick Studio     %
+%  shall not be used in advertising or otherwise to promote the sale, use or  %
+%  other dealings in ImageMagick without prior written authorization from the %
+%  ImageMagick Studio.                                                        %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%
+%
+*/
+#include <ossim/base/ossimConstants.h>
+#include <ossim/imaging/ossimFilter.h>
+#include <ossim/matrix/newmat.h>
+#include <iostream>
+
+
+RTTI_DEF(ossimFilter, "ossimFilter");
+RTTI_DEF1(ossimBoxFilter, "ossimBoxFilter",ossimFilter);
+RTTI_DEF1(ossimSincFilter, "ossimSincFilter",ossimFilter);
+RTTI_DEF1(ossimBellFilter, "ossimBellFilter",ossimFilter);
+RTTI_DEF1(ossimNearestNeighborFilter, "ossimNearestNeighborFilter",ossimFilter);
+RTTI_DEF1(ossimBesselFilter, "ossimBesselFilter",ossimFilter);
+RTTI_DEF1(ossimBesselOrderOneFilter, "ossimBesselOrderOneFilter",ossimFilter);
+RTTI_DEF1(ossimBlackmanFilter, "ossimBlackmanFilter",ossimFilter);
+RTTI_DEF1(ossimBlackmanSincFilter, "ossimBlackmanSincFilter",ossimFilter);
+RTTI_DEF1(ossimBlackmanBesselFilter, "ossimBlackmanBesselFilter",ossimFilter);
+RTTI_DEF1(ossimCatromFilter, "ossimCatromFilter",ossimFilter);
+RTTI_DEF1(ossimCubicFilter, "ossimCubicFilter",ossimFilter);
+RTTI_DEF1(ossimBSplineFilter, "ossimBSplineFilter",ossimFilter);
+RTTI_DEF1(ossimGaussianFilter, "ossimGaussianFilter",ossimFilter);
+RTTI_DEF1(ossimHanningFilter, "ossimHanningFilter",ossimFilter);
+RTTI_DEF1(ossimHammingFilter, "ossimHammingFilter",ossimFilter);
+RTTI_DEF1(ossimHermiteFilter, "ossimHermiteFilter",ossimFilter);
+RTTI_DEF1(ossimLanczosFilter, "ossimLanczosFilter",ossimFilter);
+RTTI_DEF1(ossimMitchellFilter, "ossimMitchellFilter",ossimFilter);
+RTTI_DEF1(ossimQuadraticFilter, "ossimQuadraticFilter",ossimFilter);
+RTTI_DEF1(ossimTriangleFilter, "ossimTriangleFilter",ossimFilter);
+RTTI_DEF1(ossimMagicFilter, "ossimMagicFilter",ossimFilter);
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
++   B e s s e l O r d e r O n e                                               %
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%  Method BesselOrderOne computes the Bessel function of x of the first kind
+%  of order 0:
+%
+%    Reduce x to |x| since j1(x)= -j1(-x), and for x in (0,8]
+%
+%       j1(x) = x*j1(x);
+%
+%    For x in (8,inf)
+%
+%       j1(x) = sqrt(2/(pi*x))*(p1(x)*cos(x1)-q1(x)*sin(x1))
+%
+%    where x1 = x-3*pi/4. Compute sin(x1) and cos(x1) as follow:
+%
+%       cos(x1) =  cos(x)cos(3pi/4)+sin(x)sin(3pi/4)
+%               =  1/sqrt(2) * (sin(x) - cos(x))
+%       sin(x1) =  sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
+%               = -1/sqrt(2) * (sin(x) + cos(x))
+%
+%  The format of the BesselOrderOne method is:
+%
+%      double BesselOrderOne(double x)
+%
+%  A description of each parameter follows:
+%
+%    o value: Method BesselOrderOne returns the Bessel function of x of the
+%      first kind of orders 1.
+%
+%    o x: double value.
+%
+%
+*/
+
+static double J1(double x)
+{
+  double
+    p,
+    q;
+
+  register int
+    i;
+
+  static const double
+    Pone[] =
+    {
+       0.581199354001606143928050809e+21,
+      -0.6672106568924916298020941484e+20,
+       0.2316433580634002297931815435e+19,
+      -0.3588817569910106050743641413e+17,
+       0.2908795263834775409737601689e+15,
+      -0.1322983480332126453125473247e+13,
+       0.3413234182301700539091292655e+10,
+      -0.4695753530642995859767162166e+7,
+       0.270112271089232341485679099e+4
+    },
+    Qone[] =
+    {
+      0.11623987080032122878585294e+22,
+      0.1185770712190320999837113348e+20,
+      0.6092061398917521746105196863e+17,
+      0.2081661221307607351240184229e+15,
+      0.5243710262167649715406728642e+12,
+      0.1013863514358673989967045588e+10,
+      0.1501793594998585505921097578e+7,
+      0.1606931573481487801970916749e+4,
+      0.1e+1
+    };
+
+  p=Pone[8];
+  q=Qone[8];
+  for (i=7; i >= 0; i--)
+  {
+    p=p*x*x+Pone[i];
+    q=q*x*x+Qone[i];
+  }
+  return(p/q);
+}
+
+static double P1(double x)
+{
+  double
+    p,
+    q;
+
+  register int
+    i;
+
+  static const double
+    Pone[] =
+    {
+      0.352246649133679798341724373e+5,
+      0.62758845247161281269005675e+5,
+      0.313539631109159574238669888e+5,
+      0.49854832060594338434500455e+4,
+      0.2111529182853962382105718e+3,
+      0.12571716929145341558495e+1
+    },
+    Qone[] =
+    {
+      0.352246649133679798068390431e+5,
+      0.626943469593560511888833731e+5,
+      0.312404063819041039923015703e+5,
+      0.4930396490181088979386097e+4,
+      0.2030775189134759322293574e+3,
+      0.1e+1
+    };
+
+  p=Pone[5];
+  q=Qone[5];
+  for (i=4; i >= 0; i--)
+  {
+    p=p*(8.0/x)*(8.0/x)+Pone[i];
+    q=q*(8.0/x)*(8.0/x)+Qone[i];
+  }
+  return(p/q);
+}
+
+static double Q1(double x)
+{
+   double
+      p,
+      q;
+   
+   register int
+      i;
+   
+   static const double
+      Pone[] =
+   {
+      0.3511751914303552822533318e+3,
+      0.7210391804904475039280863e+3,
+      0.4259873011654442389886993e+3,
+      0.831898957673850827325226e+2,
+      0.45681716295512267064405e+1,
+      0.3532840052740123642735e-1
+   },
+      Qone[] =
+      {
+         0.74917374171809127714519505e+4,
+         0.154141773392650970499848051e+5,
+         0.91522317015169922705904727e+4,
+         0.18111867005523513506724158e+4,
+         0.1038187585462133728776636e+3,
+         0.1e+1
+      };
+      
+      p=Pone[5];
+      q=Qone[5];
+      for (i=4; i >= 0; i--)
+      {
+         p=p*(8.0/x)*(8.0/x)+Pone[i];
+         q=q*(8.0/x)*(8.0/x)+Qone[i];
+      }
+      return(p/q);
+}
+
+double ossimBesselOrderOneFilter::filter(double x, double /* support */)const
+{
+   double
+      p,
+      q;
+   
+   if (x == 0.0)
+      return(0.0);
+   p=x;
+   if (x < 0.0)
+      x=(-x);
+   if (x < 8.0)
+      return(p*J1(x));
+   q=sqrt(2.0/(M_PI*x))*(P1(x)*(1.0/sqrt(2.0)*(sin(x)-cos(x)))-8.0/x*Q1(x)*
+                         (-1.0/sqrt(2.0)*(sin(x)+cos(x))));
+   if (p < 0.0)
+      q=(-q);
+   return(q);
+
+}
+
+void ossimFilter::createMatrix(NEWMAT::Matrix& m,
+                               long width,
+                               double middle,
+                               double scale)const
+{
+   NEWMAT::ColumnVector colVec(width);
+   NEWMAT::RowVector    rowVec(width);
+
+   double t = 0.0;
+   double val = 0.0;
+   if(width == 1)
+   {
+      t = 0;
+      val = filter(t, getSupport());
+      colVec[0] = val;
+      rowVec[0] = val;
+   }
+   else
+   {
+      for(long index = 0; index < width; index++)
+      {
+         t = (double)index/(double)(width-1);
+         t = middle + (t - .5)*scale;
+         val = filter(t, getSupport());
+         colVec[index] = val;
+         rowVec[index] = val;
+      }
+   }
+
+   // do the outer product to construct the
+   // filter matrix
+   m = colVec * rowVec;
+}
+
+
+NEWMAT::Matrix *ossimFilter::newMatrix(long width,
+                                       double middle,
+                                       double scale)const
+{
+   NEWMAT::Matrix *result = new NEWMAT::Matrix(width, width);
+
+   createMatrix(*result,
+                width,
+                middle,
+                scale);
+
+   return result;
+}
+
+NEWMAT::RowVector *ossimFilter::newVector(long width,
+                                          double middle,
+                                          double scale)const
+{
+   NEWMAT::RowVector *result = new NEWMAT::RowVector(width);
+
+
+   double t = 0.0;
+   double val = 0.0;
+   for(long index = 0; index < width; index++)
+   {
+      t = (double)index/(double)(width-1);
+      t = middle + (t- .5)*scale;
+      val = filter(t, getSupport());
+      (*result)[index] = val;
+   }
+
+   return result;
+}
diff --git a/ossim/src/ossim/imaging/ossimFilterResampler.cpp b/ossim/src/ossim/imaging/ossimFilterResampler.cpp
new file mode 100644
index 0000000..897adc4
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimFilterResampler.cpp
@@ -0,0 +1,951 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+
+// Contributor:
+//         David A. Horner (DAH) http://dave.thehorners.com
+//
+//*************************************************************************
+// $Id: ossimFilterResampler.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimFilterResampler.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/imaging/ossimFilterTable.h>
+ossimFilterResampler::ossimFilterResampler()
+   :theMinifyFilter(new ossimNearestNeighborFilter()),
+    theMagnifyFilter(new ossimNearestNeighborFilter()),
+    theMinifyFilterType(ossimFilterResampler_NEAREST_NEIGHBOR),
+    theMagnifyFilterType(ossimFilterResampler_NEAREST_NEIGHBOR),
+    theScaleFactor(1.0, 1.0),
+    theInverseScaleFactor(1.0, 1.0),
+    theBlurFactor(1.0)
+{
+   setScaleFactor(ossimDpt(1.0, 1.0));
+   loadState(ossimPreferences::instance()->preferencesKWL(),"resampler.");
+
+}
+
+ossimFilterResampler::~ossimFilterResampler()
+{
+   if(theMinifyFilter)
+   {
+      delete theMinifyFilter;
+      theMinifyFilter = NULL;
+   }
+   if(theMagnifyFilter)
+   {
+      delete theMagnifyFilter;
+      theMagnifyFilter = NULL;
+   }
+}
+
+
+void ossimFilterResampler::resample(const ossimRefPtr<ossimImageData>& input,
+				    ossimRefPtr<ossimImageData>& output,
+				    const ossimDpt& ul,
+				    const ossimDpt& ur,
+				    const ossimDpt& deltaUl,
+				    const ossimDpt& deltaUr,
+				    const ossimDpt& length)
+{
+   resample(input,
+            output,
+            output->getImageRectangle(),
+            ul,
+            ur,
+            deltaUl,
+            deltaUr,
+            length);
+}
+
+void ossimFilterResampler::resample(const ossimRefPtr<ossimImageData>& input,
+				    ossimRefPtr<ossimImageData>& output,
+				    const ossimIrect& outputSubRect,
+				    const ossimDpt& ul,
+				    const ossimDpt& ur,
+				    const ossimDpt& deltaUl,
+				    const ossimDpt& deltaUr,
+				    const ossimDpt& length)
+{
+   if(!input.valid()   ||
+      !output.valid()  ||
+      !input->getBuf() ||
+      !output->getBuf())
+   {
+      return;
+   }
+   
+   ossimScalarType scalarType = input->getScalarType();
+   switch(scalarType)
+   {
+      case OSSIM_UINT8:
+      {
+         resampleBilinearTile(ossim_uint8(0), // dummy template variable
+			      input,
+			      output,
+			      outputSubRect,
+			      ul,
+			      ur,
+			      deltaUl,
+			      deltaUr,
+			      length);
+         break;
+      }
+      case OSSIM_SINT8:
+      {
+         resampleBilinearTile(ossim_sint8(0), // dummy template variable
+			      input,
+			      output,
+			      outputSubRect,
+			      ul,
+			      ur,
+			      deltaUl,
+			      deltaUr,
+			      length);
+         break;
+      }
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+      {
+	 resampleBilinearTile(ossim_uint16(0), // dummy template variable
+			      input,
+			      output,
+			      outputSubRect,
+			      ul,
+			      ur,
+			      deltaUl,
+			      deltaUr,
+			      length);
+	 break;
+      }
+      case OSSIM_SINT16:
+      {
+	 resampleBilinearTile(ossim_sint16(0), // dummy template variable
+			      input,
+			      output,
+			      outputSubRect,
+			      ul,
+			      ur,
+			      deltaUl,
+			      deltaUr,
+			      length);
+	 break;
+      }      
+      case OSSIM_UINT32:
+      {
+	 resampleBilinearTile(ossim_uint32(0), // dummy template variable
+			      input,
+			      output,
+			      outputSubRect,
+			      ul,
+			      ur,
+			      deltaUl,
+			      deltaUr,
+			      length);
+	 break;
+      }      
+      case OSSIM_SINT32:
+      {
+	 resampleBilinearTile(ossim_sint32(0), // dummy template variable
+			      input,
+			      output,
+			      outputSubRect,
+			      ul,
+			      ur,
+			      deltaUl,
+			      deltaUr,
+			      length);
+	 break;
+      }      
+      case OSSIM_FLOAT32:
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+	 resampleBilinearTile(ossim_float32(0.0), // dummy template variable
+			      input,
+			      output,
+			      outputSubRect,
+			      ul,
+               ur,
+			      deltaUl,
+			      deltaUr,
+			      length);
+	 break;
+      }
+      case OSSIM_FLOAT64:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+	 resampleBilinearTile(ossim_float64(0.0), // dummy template variable
+			      input,
+			      output,
+			      outputSubRect,
+			      ul,
+			      ur,
+			      deltaUl,
+			      deltaUr,
+			      length);
+         break;
+      }
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimFilterResampler::resample error: unknown scalar type:  "
+            << scalarType << endl;
+      }
+   }
+}
+
+
+ossimFilter* ossimFilterResampler::createNewFilter(
+   ossimFilterResamplerType filterType,
+   ossimFilterResamplerType& result)
+{
+   switch(filterType)
+   {
+      case ossimFilterResampler_NEAREST_NEIGHBOR:
+      {
+         return new ossimNearestNeighborFilter();
+      }
+      case ossimFilterResampler_BOX:
+      {
+         return new ossimBoxFilter();
+      }
+      case ossimFilterResampler_GAUSSIAN:
+      {
+         return new ossimGaussianFilter();
+      }
+      case ossimFilterResampler_CUBIC:
+      {
+         return new ossimCubicFilter();
+      }
+      case ossimFilterResampler_HANNING:
+      {
+         return new ossimHanningFilter();
+      }
+      case ossimFilterResampler_HAMMING:
+      {
+         return new ossimHammingFilter();
+      }
+      case ossimFilterResampler_LANCZOS:
+      {
+         return new ossimLanczosFilter();
+      }
+      case ossimFilterResampler_CATROM:
+      {
+         return new ossimCatromFilter();
+      }
+      case ossimFilterResampler_MITCHELL:
+      {
+         return new ossimMitchellFilter();
+      }
+      case ossimFilterResampler_BLACKMAN:
+      {
+         return new ossimBlackmanFilter();
+      }
+      case ossimFilterResampler_BLACKMAN_SINC:
+      {
+         return new ossimBlackmanSincFilter();
+      }
+      case ossimFilterResampler_BLACKMAN_BESSEL:
+      {
+         return new ossimBlackmanBesselFilter();
+      }
+      case ossimFilterResampler_QUADRATIC:
+      {
+         return new ossimQuadraticFilter();
+      }
+      case ossimFilterResampler_TRIANGLE:
+      {
+         return new ossimTriangleFilter();
+      }
+      case ossimFilterResampler_HERMITE:
+      {
+         return new ossimHermiteFilter();
+      }
+      case ossimFilterResampler_BELL:
+      {
+         return new ossimGaussianFilter();
+      }
+      case ossimFilterResampler_BSPLINE:
+      {
+         return new ossimBSplineFilter();
+      }
+      case ossimFilterResampler_MAGIC:
+      {
+         return new ossimBSplineFilter();
+      }
+   }
+
+   result = ossimFilterResampler_NEAREST_NEIGHBOR;
+   return new ossimNearestNeighborFilter();
+}
+
+void ossimFilterResampler::setScaleFactor(const ossimDpt& scale)
+{
+   theScaleFactor = scale;
+   if(fabs(theScaleFactor.x) <= FLT_EPSILON)
+   {
+      theScaleFactor.x = 1.0;
+   }
+   if(fabs(theScaleFactor.y) <= FLT_EPSILON)
+   {
+      theScaleFactor.y = 1.0;
+   }
+
+   theInverseScaleFactor.x = 1.0/theScaleFactor.x;
+   theInverseScaleFactor.y = 1.0/theScaleFactor.y;
+}
+
+template <class T> void ossimFilterResampler::resampleBilinearTile(
+   T /* dummy */,
+   const ossimRefPtr<ossimImageData>& input,
+   ossimRefPtr<ossimImageData>& output,
+   const ossimIrect& outputSubRect,
+   const ossimDpt& inputUl,
+   const ossimDpt& inputUr,
+   const ossimDpt& deltaUl,
+   const ossimDpt& deltaUr,
+   const ossimDpt& outLength)
+{
+#if 0 /* Please leave for debug. */
+   std::cout << "INPUT  = \n" << *input << std::endl
+             << "OUTPUT = \n" << *output << std::endl
+             << "inputUL= " << inputUl << std::endl
+             << "inputUR= " << inputUr << std::endl
+             << "deltaUL= " << deltaUl << std::endl
+             << "deltaUr= " << deltaUr << std::endl
+             << "outlength= " << outLength << std::endl;
+#endif
+   
+   ossim_uint32  band, centerOffset;
+   ossim_float64 tmpFlt64, stepSizeWidth;
+
+   if(outLength.x>1) {
+      stepSizeWidth  = 1.0/(outLength.x-1.0);
+   } else {
+      stepSizeWidth   = 1.0;
+   }
+
+   // INPUT INFORMATION
+   ossim_uint32       inWidth      = input->getWidth();
+   ossim_uint32       inBandSize   = input->getSizePerBand();  // fix for out-of-bounds check OLK 06/2005
+   ossim_uint32       BANDS        = input->getNumberOfBands();
+   ossimIrect         inputRect    = input->getImageRectangle();
+
+   // OUTPUT INFORMATION
+   const ossim_float64* NULL_PIX      = output->getNullPix(); 
+   const ossim_float64* MIN_PIX       = output->getMinPix(); 
+   const ossim_float64* MAX_PIX       = output->getMaxPix(); 
+   ossimIrect           outputRect    = output->getImageRectangle();
+   ossim_uint32         resultRectH   = outputSubRect.height();
+   ossim_uint32         resultRectW   = outputSubRect.width();
+   ossim_uint32         outputRectW   = outputRect.width();
+
+   // calculate the offset into the data so we can refer to it at 0 index.
+   ossim_uint32 resultOffset=(outputSubRect.ul().y - outputRect.ul().y)*outputRectW +
+                             (outputSubRect.ul().x - outputRect.ul().x);
+
+   // make a local copy of the band pointers (at resultOffset)
+   ossim_float64 *densityvals=new ossim_float64[BANDS];
+   ossim_float64 *pixelvals=new ossim_float64[BANDS];
+   const T* *inputBuf  = new const T*[BANDS];
+   T* *resultBuf = new T*[BANDS];
+   if(!pixelvals||!inputBuf||!resultBuf)
+   {
+      return;
+   }
+   
+   for(band = 0; band < BANDS; ++band)
+   {
+      inputBuf[band] = static_cast<const T*>(input->getBuf(band));
+      resultBuf[band] = static_cast<T*>(output->getBuf(band))+resultOffset;
+   }
+
+   // FILTER INFORMAION
+   ossim_uint32 xkernel_width  = theFilterTable.getWidth();;
+   ossim_uint32 ykernel_height = theFilterTable.getHeight();
+   double xkernel_half_width   = theFilterTable.getXSupport();
+   double ykernel_half_height  = theFilterTable.getYSupport();
+
+   double initialx  = inputUl.x-inputRect.ul().x;
+   double initialy  = inputUl.y-inputRect.ul().y;
+   double terminalx = inputUr.x-inputRect.ul().x;
+   double terminaly = inputUr.y-inputRect.ul().y;
+   double pointx,pointy,deltaX,deltaY;
+   ossim_int32 starty,startx; 
+
+   if(xkernel_width==0 || ykernel_height==0)
+   {
+      // USING NEAREST NEIGHBOR
+      for(ossim_uint32 resultY = 0; resultY < resultRectH; ++resultY)
+      {
+//          deltaX = (terminalx-initialx) * stepSizeWidth;
+//          deltaY = (terminaly-initialy) * stepSizeHeight;
+         // this should be stepsize width for both since we are traversing horizontal
+         deltaX = (terminalx-initialx) * stepSizeWidth;
+         deltaY = (terminaly-initialy) * stepSizeWidth;
+         pointx = initialx;
+         pointy = initialy;
+         for(ossim_uint32 resultX = 0; resultX < resultRectW; ++resultX)
+         {
+            // just sample center in input space.
+            centerOffset = ossim::round<int>(pointy)*inWidth + ossim::round<int>(pointx);
+            for(band=0;band<BANDS;++band)
+            {
+               resultBuf[band][resultX] = inputBuf[band][centerOffset];
+            }
+            pointy += deltaY;
+            pointx += deltaX;
+         } // End of loop in x direction.
+         
+         // increment pointers to where we are now.
+         for(band=0;band<BANDS;++band)
+         {
+            resultBuf[band] += outputRectW;
+         }
+         initialx += deltaUl.x;
+         initialy += deltaUl.y;
+         terminalx  += deltaUr.x;
+         terminaly  += deltaUr.y;
+      } // End of loop in y direction.
+      
+   }
+   else
+   {
+      // USING A KERNEL
+      const double* kernel;
+      ossim_uint32 iy,ix,sourceIndex,nullCount;
+      for(ossim_uint32 resultY = 0; resultY < resultRectH; ++resultY)
+      {
+         deltaX = (terminalx-initialx) * stepSizeWidth;
+         deltaY = (terminaly-initialy) * stepSizeWidth;
+         pointx = initialx;
+         pointy = initialy;
+         for(ossim_uint32 resultX = 0; resultX < resultRectW; ++resultX)
+         {
+            starty  = ossim::round<int>(pointy - ykernel_half_height + .5);
+            startx  = ossim::round<int>(pointx - xkernel_half_width + .5);
+            centerOffset = ossim::round<int>(pointy)*inWidth + ossim::round<int>(pointx);
+            sourceIndex = starty*inWidth+startx;
+
+            // look at center pixel, make sure they aren't all null.
+            nullCount=0;
+            if(centerOffset<inBandSize)
+            {
+               for (band=0;band<BANDS;++band)
+               {
+                  if(inputBuf[band][centerOffset]==static_cast<T>(NULL_PIX[band]))
+                  {
+                     ++nullCount;
+                  }
+               }
+               // the center of the kernel is outside the input space, just set null.
+            }
+            else
+            {
+               nullCount=BANDS;
+            }
+
+            // make sure we have non-null data and we fit within the inputBuf.
+            if ( nullCount==BANDS || (sourceIndex>=inBandSize))
+            {
+               // we don't need to continue, just assign null!
+               for (band=0;band<BANDS;++band)
+               {
+                  resultBuf[band][resultX] = static_cast<T>(NULL_PIX[band]);
+               }
+            }
+            else
+            {  
+               kernel = theFilterTable.getClosestWeights(pointx,pointy);
+               if(kernel)
+               {
+                  // reset the pixel/density sums for each band to zero.
+                  memset(densityvals,'\0',sizeof(ossim_float64)*BANDS);
+                  memset(pixelvals,'\0',sizeof(ossim_float64)*BANDS);
+
+                  // apply kernel to input space.
+                  for (iy=0;((iy<ykernel_height)&&(sourceIndex<inBandSize));++iy)
+                  {
+                     for (ix = 0;((ix<xkernel_width)&&(sourceIndex<inBandSize));++ix)
+                     {
+                        tmpFlt64=*kernel; // pixel weight;
+                        for(band=0;band<BANDS;++band)
+                        {
+                           if(inputBuf[band][sourceIndex]!=NULL_PIX[band])
+                           {
+                              densityvals[band] += tmpFlt64;
+                              pixelvals[band] += (inputBuf[band][sourceIndex]*tmpFlt64);
+                           }
+                        }
+                        ++sourceIndex;
+                        ++kernel;
+                        if(sourceIndex>=inBandSize)
+                        {
+                           break;
+                        }
+                     }
+                     sourceIndex+=(inWidth-xkernel_width);
+                  }
+
+                  // actually assign the value to the output
+                  for (band = 0; band < BANDS; ++band)
+                  {
+                     if(densityvals[band]<=FLT_EPSILON)
+                     {
+                        //---
+                        // Setting tempFlt64 to pixelvals[band] causing 0's where -32768
+                        // should be when null check was skipped above.
+                        // tmpFlt64 = pixelvals[band];
+                        //---
+                        tmpFlt64 = NULL_PIX[band];
+                     }
+                     else
+                     {
+                        // normalize
+                        tmpFlt64 = pixelvals[band]/densityvals[band];
+                     }
+                     
+                     // clamp
+                     tmpFlt64 = (tmpFlt64>=MIN_PIX[band]?(tmpFlt64<MAX_PIX[band]?tmpFlt64:MAX_PIX[band]):MIN_PIX[band]); 
+                     // set resultant pixel value.
+                     resultBuf[band][resultX] = static_cast<T>(tmpFlt64);
+                  }
+
+                  // we didn't get a filter kernel, just set NULL in this disaster.
+               }
+               else
+               {
+                  for (band=0;band<BANDS;++band)
+                  {
+                     resultBuf[band][resultX] = static_cast<T>(NULL_PIX[band]);
+                  }
+               }                  
+            }
+            pointy += deltaY;
+            pointx += deltaX;
+         } // End of loop in x direction.
+
+         // increment pointers to where we are now.
+         for(band=0;band<BANDS;++band)
+         {
+            resultBuf[band] += outputRectW;
+         }
+         initialx += deltaUl.x;
+         initialy += deltaUl.y;
+         terminalx  += deltaUr.x;
+         terminaly  += deltaUr.y;
+      } // End of loop in y direction.
+   } // USING A KERNEL END
+
+   delete [] densityvals;
+   delete [] pixelvals;
+   delete [] resultBuf;
+   delete [] inputBuf;
+}
+
+ossimString ossimFilterResampler::getFilterTypeAsString(ossimFilterResamplerType type)const
+{
+   switch(type)
+   {
+      case ossimFilterResampler_NEAREST_NEIGHBOR:
+      {
+         return "nearest neighbor";
+      }
+      case ossimFilterResampler_BOX:
+      {
+         return "box";
+      }
+      case ossimFilterResampler_GAUSSIAN:
+      {
+         return "gaussian";
+      }
+      case ossimFilterResampler_CUBIC:
+      {
+         return "cubic";
+      }
+      case ossimFilterResampler_HANNING:
+      {
+         return "hanning";
+      }
+      case ossimFilterResampler_HAMMING:
+      {
+         return "hamming";
+      }
+      case ossimFilterResampler_LANCZOS:
+      {
+         return "lanczos";
+      }
+      case ossimFilterResampler_MITCHELL:
+      {
+         return "mitchell";
+      }
+      case ossimFilterResampler_CATROM:
+      {
+         return "catrom";
+      }
+      case ossimFilterResampler_BLACKMAN:
+      {
+         return "blackman";
+      }
+      case ossimFilterResampler_BLACKMAN_SINC:
+      {
+         return "sinc";
+      }
+      case ossimFilterResampler_BLACKMAN_BESSEL:
+      {
+         return "bessel";
+      }
+      case ossimFilterResampler_QUADRATIC:
+      {
+         return "quadratic";
+      }
+      case ossimFilterResampler_TRIANGLE:
+      {
+         return "bilinear";
+      }
+      case ossimFilterResampler_HERMITE:
+      {
+         return "hermite";
+      }
+      case ossimFilterResampler_BELL:
+      {
+         return "gaussian";
+      }
+      case ossimFilterResampler_BSPLINE:
+      {
+         return "bspline";
+      }
+      case ossimFilterResampler_MAGIC:
+      {
+         return "magic";
+      }
+   }
+
+   return "nearest neighbor";
+}
+
+void ossimFilterResampler::getFilterTypes(std::vector<ossimString>& filterTypes)const
+{
+  filterTypes.push_back("nearest neighbor");
+  filterTypes.push_back("bilinear");
+  filterTypes.push_back("cubic");
+//  filterTypes.push_back("bell");
+  filterTypes.push_back("bessel");
+  filterTypes.push_back("blackman");
+  filterTypes.push_back("box");
+  filterTypes.push_back("bspline");
+  filterTypes.push_back("catrom");
+  filterTypes.push_back("gaussian");
+  filterTypes.push_back("hanning");
+  filterTypes.push_back("hamming");
+  filterTypes.push_back("hermite");
+  filterTypes.push_back("lanczos");
+  filterTypes.push_back("mitchell");
+  filterTypes.push_back("quadratic");
+  filterTypes.push_back("sinc");
+  filterTypes.push_back("magic");
+}
+
+
+ossimFilterResampler::ossimFilterResamplerType ossimFilterResampler::getFilterType(const ossimString& type)const
+{
+   ossimString typeUpper = type;
+   typeUpper = typeUpper.upcase();
+
+   if(typeUpper.contains("BOX"))
+   {
+      return ossimFilterResampler_BOX;
+   }
+   else if(typeUpper.contains("NEAREST"))
+   {
+      return ossimFilterResampler_NEAREST_NEIGHBOR;
+   }
+   else if(typeUpper.contains("GAUSSIAN"))
+   {
+      return ossimFilterResampler_GAUSSIAN;
+   }
+   else if(typeUpper.contains("HANNING"))
+   {
+      return ossimFilterResampler_HANNING;
+   }
+   else if(typeUpper.contains("HAMMING"))
+   {
+      return ossimFilterResampler_HAMMING;
+   }
+   else if(typeUpper.contains("LANCZOS"))
+   {
+      return ossimFilterResampler_LANCZOS;
+   }
+   else if(typeUpper.contains("MITCHELL"))
+   {
+      return ossimFilterResampler_MITCHELL;
+   }
+   else if(typeUpper.contains("CATROM"))
+   {
+      return ossimFilterResampler_CATROM;
+   }
+   else if(typeUpper.contains("CUBIC"))
+   {
+      return ossimFilterResampler_CUBIC;
+   }
+   else if(typeUpper.contains("BESSEL"))
+   {
+      return ossimFilterResampler_BLACKMAN_BESSEL;
+   }
+   else if(typeUpper.contains("SINC"))
+   {
+      return ossimFilterResampler_BLACKMAN_SINC;
+   }
+   else if(typeUpper.contains("BLACKMAN"))
+   {
+      return ossimFilterResampler_BLACKMAN;
+   }
+   else if(typeUpper.contains("QUADRATIC"))
+   {
+      return ossimFilterResampler_QUADRATIC;
+   }
+   else if(typeUpper.contains("TRIANGLE"))
+   {
+      return ossimFilterResampler_TRIANGLE;
+   }
+   else if(typeUpper.contains("BILINEAR"))
+   {
+      return ossimFilterResampler_TRIANGLE;
+   }
+   else if(typeUpper.contains("HERMITE"))
+   {
+      return ossimFilterResampler_HERMITE;
+   }
+//    else if(typeUpper.contains("BELL"))
+//    {
+//       return ossimFilterResampler_BELL;
+//    }
+   else if(typeUpper.contains("BSPLINE"))
+   {
+      return ossimFilterResampler_BSPLINE;
+   }
+   else if(typeUpper.contains("MAGIC"))
+   {
+      return ossimFilterResampler_MAGIC;
+   }
+   
+   return ossimFilterResampler_NEAREST_NEIGHBOR;
+}
+
+void ossimFilterResampler::getKernelSupport(double& x, double& y)const
+{
+   const ossimFilter* horizontalFilter = getHorizontalFilter();
+   const ossimFilter* verticalFilter   = getVerticalFilter();
+
+   if(!horizontalFilter)
+   {
+      x = 0.0;
+   }
+   else
+   {
+//       x = theBlurFactor*ossim::max(1.0/theScaleFactor.x, 1.0)*
+//           horizontalFilter->getSupport();
+      x = horizontalFilter->getSupport();
+   }
+
+   if(!verticalFilter)
+   {
+      y = 0.0;
+   }
+   else
+   {
+//       y = theBlurFactor*ossim::max(1.0/theScaleFactor.y, 1.0)*
+//           verticalFilter->getSupport();
+      y = verticalFilter->getSupport();
+   }
+}
+
+const ossimFilter* ossimFilterResampler::getHorizontalFilter()const
+{
+   if(theScaleFactor.x < 1)
+   {
+      return theMinifyFilter;
+   }
+
+   return theMagnifyFilter;
+}
+
+const ossimFilter* ossimFilterResampler::getVerticalFilter()const
+{
+   if(theScaleFactor.y < 1)
+   {
+      return theMinifyFilter;
+   }
+
+   return theMagnifyFilter;
+}
+
+void ossimFilterResampler::setFilterType(const ossimString& type)
+{
+   setFilterType(type, type);
+}
+
+void ossimFilterResampler::setFilterType(ossimFilterResamplerType filterType)
+{
+   setFilterType(filterType, filterType);
+}
+void ossimFilterResampler::setFilterType(const ossimString& minifyType,
+                                         const ossimString& magnifyType)
+{
+   setFilterType(getFilterType(minifyType),
+                 getFilterType(magnifyType));
+}
+
+void ossimFilterResampler::setMinifyFilterType(const ossimString& minifyType)
+{
+   setMinifyFilterType(getFilterType(minifyType));
+}
+
+void ossimFilterResampler::setMagnifyFilterType(const ossimString& magnifyType)
+{
+   setMagnifyFilterType(getFilterType(magnifyType));
+}
+
+void ossimFilterResampler::setMinifyFilterType(ossimFilterResamplerType filterType)
+{
+   setFilterType(filterType,
+                 theMagnifyFilterType);
+}
+
+void ossimFilterResampler::setMagnifyFilterType(ossimFilterResamplerType filterType)
+{
+   setFilterType(theMinifyFilterType,filterType);
+}
+
+ossimString ossimFilterResampler::getMinifyFilterTypeAsString()const
+{
+   return getFilterTypeAsString(theMinifyFilterType);
+}
+
+ossimString ossimFilterResampler::getMagnifyFilterTypeAsString()const
+{
+   return getFilterTypeAsString(theMagnifyFilterType);
+}
+
+void ossimFilterResampler::setFilterType(
+   ossimFilterResamplerType minifyFilterType,
+   ossimFilterResamplerType magnifyFilterType)
+{
+   if(theMinifyFilter)
+   {
+      delete theMinifyFilter;
+      theMinifyFilter = NULL;
+   }
+   if(theMagnifyFilter)
+   {
+      delete theMagnifyFilter;
+      theMagnifyFilter = NULL;
+   }
+   
+   theMinifyFilterType  = minifyFilterType;
+   theMagnifyFilterType = magnifyFilterType;
+   
+   theMinifyFilter  = createNewFilter(minifyFilterType, theMinifyFilterType);
+   theMagnifyFilter = createNewFilter(magnifyFilterType, theMagnifyFilterType);
+   computeTable();
+}
+
+ossim_float64 ossimFilterResampler::getBlurFactor()const
+{
+   return theBlurFactor;
+}
+
+void ossimFilterResampler::setBlurFactor(ossim_float64 blur)
+{
+   theBlurFactor = blur;
+}
+
+bool ossimFilterResampler::saveState(ossimKeywordlist& kwl,
+                                     const char* prefix)const
+{
+   kwl.add(prefix,
+           ossimKeywordNames::SCALE_X_KW,
+           theScaleFactor.x,
+           true);
+   kwl.add(prefix,
+           ossimKeywordNames::SCALE_Y_KW,
+           theScaleFactor.y,
+           true);
+   kwl.add(prefix,
+           "minify_type",
+           getFilterTypeAsString(theMinifyFilterType),
+           true);
+   kwl.add(prefix,
+           "magnify_type",
+           getFilterTypeAsString(theMagnifyFilterType),
+           true);
+
+   return true;
+}
+
+bool ossimFilterResampler::loadState(const ossimKeywordlist& kwl,
+                                     const char* prefix)
+{
+   const char* lookup = 0;
+
+   lookup = kwl.find(prefix, ossimKeywordNames::SCALE_X_KW);
+   if (lookup)
+   {
+      theScaleFactor.x = ossimString(lookup).toDouble();
+   }
+
+   lookup = kwl.find(prefix, ossimKeywordNames::SCALE_Y_KW);
+   if (lookup)
+   {
+      theScaleFactor.y = ossimString(lookup).toDouble();
+   }
+
+   ossimString minify;
+   lookup = kwl.find(prefix, "minify_type");
+   if (lookup)
+   {
+      minify = lookup;
+   }
+
+   ossimString magnify;
+   lookup = kwl.find(prefix, "magnify_type");
+   if (lookup)
+   {
+      magnify = lookup;
+   }
+
+   if(fabs(theScaleFactor.x) <= FLT_EPSILON)
+   {
+      theScaleFactor.x = 1.0;
+   }
+   if(fabs(theScaleFactor.y) <= FLT_EPSILON)
+   {
+      theScaleFactor.y = 1.0;
+   }
+
+   theInverseScaleFactor.x = 1.0/theScaleFactor.x;
+   theInverseScaleFactor.y = 1.0/theScaleFactor.y;
+   
+   setFilterType(getFilterType(minify),
+                 getFilterType(magnify));
+
+   return true;
+}
+
+void ossimFilterResampler::computeTable()
+{
+  theFilterTable.buildTable(32, *theMagnifyFilter);
+}
+
+
diff --git a/ossim/src/ossim/imaging/ossimFilterTable.cpp b/ossim/src/ossim/imaging/ossimFilterTable.cpp
new file mode 100644
index 0000000..ee385d0
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimFilterTable.cpp
@@ -0,0 +1,148 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimFilterTable.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <iostream>
+#include <ossim/imaging/ossimFilterTable.h>
+#include <ossim/imaging/ossimFilter.h>
+
+ossimFilterTable::ossimFilterTable()
+   :theWeights(0),
+    theWidth(0),
+    theHeight(0),
+    theWidthHeight(0),
+    theXSupport(0),
+    theYSupport(0),
+    theFilterSteps(0)
+{
+   
+}
+
+ossimFilterTable::~ossimFilterTable()
+{
+   if(theWeights)
+   {
+      delete [] theWeights;
+      theWeights = 0;
+   }
+}
+
+void ossimFilterTable::buildTable(ossim_uint32  filterSteps,
+                                  const ossimFilter& filter)
+{
+   buildTable(filterSteps, filter, filter);
+}
+
+void ossimFilterTable::buildTable(ossim_uint32  filterSteps,
+                                  const ossimFilter& xFilter,
+                                  const ossimFilter& yFilter)
+{
+   ossim_int32 subpixelSample=0;
+   ossim_int32 subpixelLine=0;
+   double dx   = 0.0;
+   double dy   = 0.0;
+   double kernelH   = 0.0;
+   double kernelV   = 0.0;
+   double x = 0;
+   double y = 0;
+
+   double xsupport = ceil(xFilter.getSupport());
+   double ysupport = ceil(yFilter.getSupport());
+   double left    = 0;
+   double right   = 0;
+   double top     = 0;
+   double bottom  = 0;
+
+   theXSupport = (ossim_uint32)xsupport;
+   theYSupport = (ossim_uint32)ysupport;
+   theFilterSteps = filterSteps;
+   theWidth  = (2*theXSupport);
+   theHeight = (2*theYSupport);
+   theWidthHeight = theWidth*theHeight;
+   
+   allocateWeights();
+   left   = -(xsupport-1);
+   right  = xsupport;
+   top    = -(ysupport-1);
+   bottom = ysupport;
+   ossim_uint32 idx = 0;
+      
+   for (subpixelLine = 0; subpixelLine < (int)filterSteps; 
+        subpixelLine++)
+   {
+     
+     // Calculate subpixel sample step.
+     // ---------------------------------- 
+       dy = subpixelLine / (double)(filterSteps);
+       for (subpixelSample = 0; subpixelSample < (int)filterSteps; subpixelSample++)
+       {
+        
+         // Calculate subpixel sample step.
+         // ---------------------------------- 
+         dx = subpixelSample / (double)(filterSteps);
+         
+         for (kernelV=top; kernelV<=bottom;
+              kernelV++)
+         {
+             y = kernelV - dy;
+             double tempWeight = yFilter.filter(y, yFilter.getSupport());
+             for(kernelH=left; kernelH<=right;++kernelH)
+             {
+               x = kernelH - dx;
+                   
+               // Get the weight for the current pixel.
+               //   ----------------------------------------
+               theWeights[idx] = tempWeight*xFilter.filter(x, xFilter.getSupport());
+               ++idx;
+             }
+          }
+        }
+     }
+}
+
+ossim_uint32 ossimFilterTable::getWidthByHeight()const
+{
+   return theWidthHeight;
+}
+
+ossim_uint32 ossimFilterTable::getXSupport()const
+{
+   return theXSupport;
+}
+
+ossim_uint32 ossimFilterTable::getYSupport()const
+{
+   return theYSupport;
+}
+
+ossim_uint32 ossimFilterTable::getWidth()const
+{
+   return theWidth;
+}
+
+ossim_uint32 ossimFilterTable::getHeight()const
+{
+   return theHeight;
+}
+
+void ossimFilterTable::allocateWeights()
+{
+   if(theWeights)
+   {
+      delete [] theWeights;
+      theWeights = 0;
+   }
+
+   ossim_uint32 size = (theWidthHeight*(theFilterSteps*theFilterSteps));
+
+   if(size)
+   {
+      theWeights = new double[size];
+   }
+}
diff --git a/src/ossim/imaging/ossimFixedTileCache.cpp b/ossim/src/ossim/imaging/ossimFixedTileCache.cpp
similarity index 100%
rename from src/ossim/imaging/ossimFixedTileCache.cpp
rename to ossim/src/ossim/imaging/ossimFixedTileCache.cpp
diff --git a/src/ossim/imaging/ossimFusionCombiner.cpp b/ossim/src/ossim/imaging/ossimFusionCombiner.cpp
similarity index 100%
rename from src/ossim/imaging/ossimFusionCombiner.cpp
rename to ossim/src/ossim/imaging/ossimFusionCombiner.cpp
diff --git a/ossim/src/ossim/imaging/ossimGammaRemapper.cpp b/ossim/src/ossim/imaging/ossimGammaRemapper.cpp
new file mode 100644
index 0000000..404680f
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimGammaRemapper.cpp
@@ -0,0 +1,435 @@
+//*******************************************************************
+// Copyright (C) 2002 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Kathy Minear
+//
+// Description: Takes in DNs for any number of bands
+// Converts DNs to Radiance at the satellite values Lsat
+// Converts Lsat to Surface Reflectance values
+//
+//*************************************************************************
+// $Id: ossimGammaRemapper.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstdlib>
+#include <cmath>
+
+#include <ossim/imaging/ossimGammaRemapper.h>
+#include <ossim/imaging/ossimAtCorrKeywords.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimMultiBandHistogram.h>
+#include <ossim/base/ossimHistogram.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+
+
+RTTI_DEF1(ossimGammaRemapper, "ossimGammaRemapper", ossimImageSourceFilter)
+
+static const double DEFAULT_GAMMA = 1.0;
+
+
+static ossimTrace traceDebug("ossimGammaRemapper:debug");
+
+ossimGammaRemapper::ossimGammaRemapper(ossimObject* owner)
+   :
+      ossimImageSourceFilter  (owner),  // base class
+      theTile                 (NULL),
+      theBuffer               (NULL), 
+      theMinPixelValue        (0),
+      theMaxPixelValue        (0),
+      theGamma                (0),
+      theUserDisabledFlag     (false)
+{
+   //***
+   // Set the base class "theEnableFlag" to off since no adjustments have been
+   // made yet.
+   //***
+   disableSource();
+
+   // Construction not complete.
+}
+
+
+ossimGammaRemapper::ossimGammaRemapper(ossimImageSource* inputSource)
+   :
+      ossimImageSourceFilter  (NULL, inputSource),  // base class
+      theTile                 (NULL),
+      theBuffer               (NULL),
+      theMinPixelValue        (0),
+      theMaxPixelValue        (0),
+      theGamma                (0),
+      theUserDisabledFlag     (false)
+{
+   //***
+   // Set the base class "theEnableFlag" to off since no adjustments have been
+   // made yet.
+   //***
+   disableSource();
+
+   if (inputSource == NULL)
+   {
+      setErrorStatus();
+      cerr << "ossimGammaRemapper::ossimGammaRemapper ERROR:"
+           << "\nNull input source passed to constructor!" << endl;
+      return;
+   }
+
+   initialize();
+}
+
+
+ossimGammaRemapper::ossimGammaRemapper(ossimObject* owner,
+                                         ossimImageSource* inputSource)
+   :
+      ossimImageSourceFilter  (owner, inputSource),  // base class     
+      theTile                 (NULL),
+      theBuffer               (NULL),
+      theMinPixelValue        (0),
+      theMaxPixelValue        (0),
+      theGamma                (0)
+{
+   //***
+   // Set the base class "theEnableFlag" to off since no adjustments have been
+   // made yet.
+   //***
+   disableSource();
+
+   if (inputSource == NULL)
+   {
+      setErrorStatus();
+      cerr << "ossimGammaRemapper::ossimGammaRemapper ERROR:"
+           << "\nNull input source passed to constructor!" << endl;
+      return;
+   }
+
+   initialize();
+}
+
+ossimGammaRemapper::~ossimGammaRemapper()
+{
+   if (theBuffer)
+   {
+      delete [] theBuffer;
+      theBuffer = NULL;
+   }
+}
+
+ossimRefPtr<ossimImageData> ossimGammaRemapper::getTile(const ossimIrect& tile_rect,
+                                            ossim_uint32 resLevel)
+{
+   if (!isInitialized())
+   {
+      cerr << "ossimGammaRemapper::getTile ERROR:"
+           << "\nNot initialized!"
+           << endl;
+      return ossimRefPtr<ossimImageData>();
+   }
+      
+   // Fetch tile from pointer from the input source.
+   ossimRefPtr<ossimImageData> inputTile = theInputConnection->getTile(
+      tile_rect, resLevel);
+
+   if (!inputTile.valid())  // Just in case...
+   {
+      cerr << "ossimGammaRemapper::getTile ERROR:"
+           << "\nReceived null pointer to tile from input source!"
+           << "\nReturning blank tile."
+           << endl;
+      theTile->makeBlank();
+      return theTile;
+   }
+
+   // Get its status.
+   ossimDataObjectStatus tile_status = inputTile->getDataObjectStatus();
+   
+   //---
+   // Check for remap bypass:
+   //---
+   if (!theEnableFlag || tile_status == OSSIM_NULL ||!theTile.valid() ||
+       tile_status == OSSIM_EMPTY)
+   {
+      return inputTile;
+   }
+
+   ossim_uint32 w     = tile_rect.width();
+   ossim_uint32 h     = tile_rect.height();
+   ossim_uint32 tw    = theTile->getWidth();
+   ossim_uint32 th    = theTile->getHeight();
+   ossim_uint32 bands = theTile->getNumberOfBands();
+
+   // Set the origin of the output tile.
+   theTile->setOrigin(tile_rect.ul());
+
+   if(w*h != tw*th)
+   {
+      theTile->setWidthHeight(w, h);
+      theTile->initialize();
+      if(theBuffer)
+      {
+         delete [] theBuffer;
+         theBuffer = NULL;
+      }
+   }   
+   
+   if(!theBuffer)
+   {
+      theBuffer = new double[w*h*bands];
+   }
+   
+   // Copy the source tile into the buffer at the same time normalizing it.
+   inputTile->copyTileToNormalizedBuffer(theBuffer);
+   
+   // for each band, get the radiance value
+
+   ossim_uint32 buffer_index = 0;
+   const double MP = theTile->getMinNormalizedPix(); // Minimum normalized pix.
+   const ossim_uint32 PPTB = theTile->getSizePerBand();  // Pixels Per Tile Band
+
+   for (ossim_uint32 band=0; band<bands; ++band)
+   {
+      for (ossim_uint32 i=0; i<PPTB; ++i)
+      {
+         double p = theBuffer[buffer_index]; // input pixel
+         // double p = getPix(buffer_index);
+
+         if (p)
+         {
+            // cout<<"p before:  "<<p<<endl;
+            // Stretch it...
+            p = (p - theMinPixelValue[band]) /
+               (theMaxPixelValue[band] -
+                theMinPixelValue[band]);
+            
+            p = pow(p, theGamma[band]);
+           
+            
+            //***
+            // Since it wasn't null to start with clip / clamp between minimum
+            // normalized pixel and one(max).
+            //*** 
+            p =  ( p > MP ? ( p < 1.0 ? p : 1.0) : MP );  
+
+            theBuffer[buffer_index] = p;
+         }
+         else
+         {
+            theBuffer[buffer_index] = 0.0;
+         }
+         
+         ++buffer_index;
+      }
+   }
+   
+   // Copy the buffer to the output tile at the same time unnormalizing it.
+   theTile->copyNormalizedBufferToTile(theBuffer);
+   
+   // Set the status to that of the input tile.
+   theTile->setDataObjectStatus(tile_status);
+
+   return theTile;
+}
+
+void ossimGammaRemapper::initialize()
+{
+   if(theInputConnection)
+   {
+      theTile = ossimImageDataFactory::instance()->create(this,
+                                                          theInputConnection);
+      theTile->initialize();
+
+      if(theBuffer)
+      {
+         delete []theBuffer;
+         theBuffer = NULL;
+      }
+      
+      ossim_uint32 tw    = theTile->getWidth();
+      ossim_uint32 th    = theTile->getHeight();
+      ossim_uint32 bands = theTile->getNumberOfBands();
+      
+      theBuffer = new double[tw*th*bands];
+      memset(theBuffer, '\0', tw*th*bands);
+
+      setInitializedFlag(true);
+      clearErrorStatus();
+   }
+   else
+   {
+      setInitializedFlag(false);
+      setErrorStatus();
+      cerr << "ossimGammaRemapper::initialize ERROR:"
+           << "\nCannot call method when input connection is NULL!"
+           << endl;
+   };
+
+   verifyEnabled();
+}
+
+void ossimGammaRemapper::setMinMaxPixelValues(const vector<double>& v_min,
+                                              const vector<double>& v_max)
+{
+   theMinPixelValue = v_min;
+   theMaxPixelValue = v_max;
+   verifyEnabled();
+}
+
+void ossimGammaRemapper::verifyEnabled()
+{
+   // Check all the pointers...
+   if ( !theInputConnection || !theTile || !theBuffer )
+   {
+      disableSource();
+      return;
+   }
+
+   ossim_uint32 bands = theTile->getNumberOfBands();
+   if ( (theMinPixelValue.size() != bands) ||
+        (theMaxPixelValue.size() != bands) )
+   {
+      disableSource(); 
+      return;
+   }
+
+   if (theUserDisabledFlag == false)
+   {
+      enableSource();
+   }
+
+   if (traceDebug())
+   {
+      cout << *this << endl;
+   }
+}
+
+bool ossimGammaRemapper::loadState(const ossimKeywordlist& kwl,
+                                   const char* prefix)
+{
+   //***
+   // Call the base class to pick up the enable flag.  Note that the
+   // verifyEnabled flag can override this.
+   //***
+   ossimString pref;
+   if (prefix) pref += prefix;
+   pref += "gamma_remapper.";
+
+   if (!theTile)
+   {
+      cerr << "ossimGammaRemapper::loadState:  ERROR"
+           << "Not initialized yet!" << endl;
+      return false;
+   }
+
+   //---
+   // NOTE:
+   // base class seems to call initialize which in turn errors if you don't
+   // have a connection yet, so check for the enable keyword here...
+   // ossimSource::loadState(kwl, pref.c_str());
+   //---
+   cout << "pref:  " << pref
+        << "kw:  " << ossimKeywordNames::ENABLED_KW    << endl;
+   
+   const char* lookup = kwl.find(pref, ossimKeywordNames::ENABLED_KW);
+   if(lookup)
+   {
+      theEnableFlag = ossimString(lookup).toBool();
+      if (theEnableFlag == false)
+      {
+         // User want filter disabled...
+         theUserDisabledFlag = true;
+      }
+   }
+
+   ossim_uint32 bands = theTile->getNumberOfBands();
+
+   theGamma.clear();
+   theGamma.resize(bands, 1.0);
+
+   for(ossim_uint32 band = 0; band < bands; ++band)
+   {
+      ossimString band_string = ".band";
+      band_string += ossimString::toString(band+1);  // Start at one.
+
+      ossimString kw = GAMMA_REMAPPER_GAMMA_KW;
+      kw += band_string;
+      lookup = kwl.find(prefix, kw.c_str());
+      if (lookup)
+      {
+         theGamma[band] = atof(lookup);
+      }
+      else
+      {
+         cout << "MODULE NOTICE:"
+              << "\nlookup failed for keyword:  " << kw.c_str()
+              << "\nGamma set to " << DEFAULT_GAMMA << " for band:  "
+              << (band+1) << endl;
+         theGamma[band] = DEFAULT_GAMMA;
+      }
+   }
+
+   if (traceDebug())
+   {
+      cout << "ossimGammaRemapper DEBUG:"
+           << *this
+           << endl;
+   }
+   
+   return true;
+}
+
+ostream& ossimGammaRemapper::print(ostream& os) const
+{
+   os << setprecision(15) << setiosflags(ios::fixed)
+      << "ossimGammaRemapper:"
+      << "\ntheEnableFlag:  " << (theEnableFlag?"enabled":"disabled")
+      << endl;
+
+   ossim_uint32 band = 1;
+   vector<double>::const_iterator i = theMinPixelValue.begin();
+   while (i != theMinPixelValue.end())
+   {
+      os << "band[" << band << "] min:  " << (*i) << endl;
+      ++i;
+      ++band;
+   }
+
+   band = 1;
+   i = theMaxPixelValue.begin();
+   while (i != theMaxPixelValue.end())
+   {
+      os << "band[" << band << "] max:  " << (*i) << endl;
+      ++i;
+      ++band;
+   }
+   
+   band = 1;
+   i = theGamma.begin();
+   while (i != theGamma.end())
+   {
+      os << "band[" << band << "] gamma:  " << (*i) << endl;
+      ++i;
+      ++band;
+   }
+
+   return os;
+}
+
+void ossimGammaRemapper::enableSource()
+{
+   // Clear the flag...
+   theUserDisabledFlag = false;
+   ossimSource::enableSource();
+}
+
+ossimString ossimGammaRemapper::getShortName() const
+{
+   return ossimString("Gamma Remapper");
+}
+
+ostream& operator<<(ostream& os, const ossimGammaRemapper& hr)
+{
+   return hr.print(os);
+}
+
diff --git a/ossim/src/ossim/imaging/ossimGeneralRasterInfo.cpp b/ossim/src/ossim/imaging/ossimGeneralRasterInfo.cpp
new file mode 100644
index 0000000..a50351f
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimGeneralRasterInfo.cpp
@@ -0,0 +1,1299 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+// Contains class definition for ossimGeneralRasterInfo
+//*******************************************************************
+// $Id: ossimGeneralRasterInfo.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimGeneralRasterInfo.h>
+#include <ossim/base/ossimInterleaveTypeLut.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimImageMetaData.h>
+#include <ossim/support_data/ossimEnviHeader.h>
+#include <ossim/support_data/ossimFgdcXmlDoc.h>
+
+#include <iostream>
+#include <iomanip>
+
+static const ossimKeyword
+NUMBER_LINES("number_lines",
+             "Number of lines in the raster image.");
+
+static const ossimKeyword
+NUMBER_SAMPLES("number_samples",
+               "Number of samples in the raster image.");
+
+static const ossimKeyword
+VALID_START_LINE("valid_start_line",
+                 "First valid line of raster image(zero based).");
+
+static const ossimKeyword
+VALID_STOP_LINE("valid_stop_line",
+                "Last valid line of raster image(zero based).");
+
+static const ossimKeyword
+VALID_START_SAMPLE("valid_start_sample",
+                   "First valid sample of raster image(zero based).");
+
+static const ossimKeyword
+VALID_STOP_SAMPLE("valid_stop_sample",
+                  "Last valid sample of raster image(zero based).");
+
+static const ossimKeyword
+SUB_IMAGE_OFFSET_LINE(
+   "sub_image_offset_line",
+   "Pixel line offset of sub-image in the full-image pixel space.");
+
+static const ossimKeyword
+SUB_IMAGE_OFFSET_SAMP(
+   "sub_image_offset_samp",
+   "Pixel sample offset of sub-image in the full-image pixel space."); 
+
+static const ossimKeyword
+HEADER_SIZE("header_size",
+            "Header size in bytes.");
+
+static const ossimKeyword
+SET_NULLS("set_fill_to_nulls_mode",
+          "0 = do nothing to pixels,\n1 = all zeroes to min values,\
+\n2 = zeroes to null on edges only.");
+
+static const ossimKeyword
+PIXELS_TO_CHOP("pixels_to_chop",
+               "Ammount of pixels to chop from edge.");
+
+static const ossimInterleaveTypeLut INTERLEAVE_TYPE_LUT;
+
+static ossimTrace traceDebug("ossimGeneralRasterInfo:debug");
+
+ossimGeneralRasterInfo::ossimGeneralRasterInfo()
+   :
+   theMetaData(),
+   theImageFileList(),
+   theInterleaveType(OSSIM_BIL),
+   theRawImageRect(),
+   theValidImageRect(),
+   theImageRect(),
+   theSubImageOffset(0,0),
+   theHeaderSize(0),
+   theSetNullsMode(NONE),
+   thePixelsToChop(0),
+   theImageDataByteOrder(OSSIM_LITTLE_ENDIAN)
+{
+   theRawImageRect.makeNan();
+   theValidImageRect.makeNan();
+   theImageRect.makeNan();
+}
+
+ossimGeneralRasterInfo::ossimGeneralRasterInfo(const std::vector<ossimFilename>& imageFileList,
+                                               ossimScalarType     pixelType,
+                                               ossimInterleaveType il_type,
+                                               ossim_int32         numberOfBands,
+                                               ossim_int32         lines,
+                                               ossim_int32         samples,
+                                               ossim_int32         headerSize,
+                                               ossimFillMode       nullsMode,
+                                               ossim_int32         pixelsToChop)
+   :
+   theMetaData(pixelType, numberOfBands),
+   theImageFileList(imageFileList),
+   theInterleaveType(il_type),
+   theRawImageRect(0,0,0,0),
+   theValidImageRect(0,0,0,0),
+   theImageRect(0,0,0,0),
+   theSubImageOffset(0,0),
+   theHeaderSize(headerSize),
+   theSetNullsMode(nullsMode),
+   thePixelsToChop(pixelsToChop),
+   theImageDataByteOrder(OSSIM_LITTLE_ENDIAN)
+{
+   theRawImageRect.set_lry(lines - 1);
+   theRawImageRect.set_lrx(samples - 1);
+   theValidImageRect = theRawImageRect;
+   theImageRect = theRawImageRect;
+}
+
+ossimGeneralRasterInfo::ossimGeneralRasterInfo(const ossimKeywordlist& kwl,
+                     const char* prefix)
+   :
+   theImageFileList(),
+   theInterleaveType(OSSIM_BIL),
+   theRawImageRect(0,0,0,0),
+   theValidImageRect(0,0,0,0),
+   theImageRect(0,0,0,0),
+   theSubImageOffset(0,0),
+   theHeaderSize(0),
+   theSetNullsMode(NONE),
+   thePixelsToChop(0),
+   theImageDataByteOrder(OSSIM_LITTLE_ENDIAN)
+{
+   theRawImageRect.makeNan();
+   theValidImageRect.makeNan();
+   theImageRect.makeNan();
+   
+   loadState(kwl, prefix);
+}
+
+ossimGeneralRasterInfo::ossimGeneralRasterInfo( const ossimGeneralRasterInfo& obj )
+   :
+   theMetaData           ( obj.theMetaData ),
+   theImageFileList      ( obj.theImageFileList ),
+   theInterleaveType     ( obj.theInterleaveType ),
+   theRawImageRect       ( obj.theRawImageRect ),
+   theValidImageRect     ( obj.theValidImageRect ),
+   theImageRect          ( obj.theImageRect ),
+   theSubImageOffset     ( obj.theSubImageOffset ),
+   theHeaderSize         ( obj.theHeaderSize ),
+   theSetNullsMode       ( obj.theSetNullsMode ),
+   thePixelsToChop       ( obj.thePixelsToChop ),
+   theImageDataByteOrder ( obj.theImageDataByteOrder )
+{
+}
+
+const ossimGeneralRasterInfo& ossimGeneralRasterInfo::operator=(
+   const ossimGeneralRasterInfo& rhs )
+{
+   if ( this != &rhs )
+   {
+      theMetaData           = rhs.theMetaData;
+      theImageFileList      = rhs.theImageFileList;
+      theInterleaveType     = rhs.theInterleaveType;
+      theRawImageRect       = rhs.theRawImageRect;
+      theValidImageRect     = rhs.theValidImageRect;
+      theImageRect          = rhs.theImageRect;
+      theSubImageOffset     = rhs.theSubImageOffset;
+      theHeaderSize         = rhs.theHeaderSize;
+      theSetNullsMode       = rhs.theSetNullsMode;
+      thePixelsToChop       = rhs.thePixelsToChop;
+      theImageDataByteOrder = rhs.theImageDataByteOrder;
+   }
+   return *this;
+}
+
+ossimGeneralRasterInfo::~ossimGeneralRasterInfo()
+{
+}
+
+void ossimGeneralRasterInfo::clear()
+{
+   theMetaData.clear();
+   theImageFileList.clear();
+   theInterleaveType = OSSIM_BIL;
+   theRawImageRect.makeNan();
+   theValidImageRect.makeNan();
+   theImageRect.makeNan();
+   theSubImageOffset.x = 0;
+   theSubImageOffset.y = 0;
+   theHeaderSize = 0;
+   theSetNullsMode = NONE;
+   thePixelsToChop = 0;
+   theImageDataByteOrder = OSSIM_LITTLE_ENDIAN;
+}
+
+const ossimIrect& ossimGeneralRasterInfo::imageRect() const
+{
+   return theImageRect;
+}
+
+const ossimIrect& ossimGeneralRasterInfo::validImageRect() const
+{
+   return theValidImageRect;
+}
+
+const ossimIrect& ossimGeneralRasterInfo::rawImageRect() const
+{
+   return theRawImageRect;
+}
+
+const ossimIpt& ossimGeneralRasterInfo::subImageOffset() const
+{
+   return theSubImageOffset;
+}
+
+ossim_int32 ossimGeneralRasterInfo::headerSize() const
+{
+   return theHeaderSize;
+}
+
+ossim_uint32 ossimGeneralRasterInfo::fillToNullsMode() const
+{
+   return theSetNullsMode;
+}
+  
+std::ostream& ossimGeneralRasterInfo::print(std::ostream& out) const
+{
+   //---
+   // This will print in a keyword format that can be read by the constructor.
+   // that takes a keyword list.
+   //---
+   ossimKeywordlist kwl;
+   saveState( kwl, 0 );
+   out << kwl << std::endl;
+   return out;
+}
+
+void ossimGeneralRasterInfo::setFillToNullsMode(ossim_uint32 mode)
+{
+   static const char MODULE[] = "ossimGeneralRasterInfo::setFillToNullMode";
+   if(mode < 3)
+   {
+      theSetNullsMode = (ossimFillMode)mode;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE << " ERROR:"
+         << "\nmode out of bounds(0 - 2):  " << mode << std::endl
+         << "\nmode has not been changed." << std::endl;
+   }
+}
+
+ossim_int32 ossimGeneralRasterInfo::pixelsToChop() const
+{
+   return thePixelsToChop;
+} 
+
+ossimInterleaveType ossimGeneralRasterInfo::interleaveType() const
+{
+   return theInterleaveType;
+}
+
+const std::vector<ossimFilename>& ossimGeneralRasterInfo::getImageFileList() const
+{
+   return theImageFileList;
+}
+
+void ossimGeneralRasterInfo::setImageFileList(const std::vector<ossimFilename>& list)
+{
+   theImageFileList = list;
+}
+
+void ossimGeneralRasterInfo::setImageFile(const ossimFilename& file)
+{
+   theImageFileList.clear();
+   theImageFileList.push_back( file );
+}   
+
+void ossimGeneralRasterInfo::setImageDataByteOrder(ossimByteOrder byteOrder)
+{
+   theImageDataByteOrder = byteOrder;
+}
+
+void ossimGeneralRasterInfo::setHeaderSize(ossim_int32 headerSize)
+{
+   theHeaderSize = headerSize;
+}
+
+void ossimGeneralRasterInfo::setInterleaveType(ossimInterleaveType il_type)
+{
+   theInterleaveType = il_type;
+}
+
+void ossimGeneralRasterInfo::setImageRect(const ossimIrect& imageRect)
+{
+   theImageRect = imageRect;
+}
+
+void ossimGeneralRasterInfo::setValidImageRect(const ossimIrect &imageRect)
+{
+   theValidImageRect = imageRect;
+}
+
+void ossimGeneralRasterInfo::setRawImageRect(const ossimIrect &imageRect)
+{
+   theRawImageRect = imageRect;
+}
+
+void ossimGeneralRasterInfo::setSubImageOffset(const ossimIpt& d)
+{
+   theSubImageOffset = d;
+}
+
+ossimByteOrder ossimGeneralRasterInfo::getImageDataByteOrder() const
+{
+   return theImageDataByteOrder;
+}  
+
+bool ossimGeneralRasterInfo::saveState(ossimKeywordlist& kwl,
+                                       const char* prefix) const
+{
+   for (ossim_uint32 i=0; i<theImageFileList.size(); ++i)
+   {
+      ossimString kw = ossimKeywordNames::FILENAME_KW;
+      kw += ossimString::toString(i+1);
+      kwl.add(prefix, theImageFileList[i].c_str());
+   }
+
+   theMetaData.saveState(kwl, prefix);
+
+   kwl.add(prefix,
+           NUMBER_LINES,
+           ossimString::toString( rawLines() ), true);
+   kwl.add(prefix,
+           NUMBER_SAMPLES,
+           ossimString::toString( rawSamples() ),
+           true);
+   kwl.add(prefix,
+           HEADER_SIZE,
+           ossimString::toString(theHeaderSize),
+           true);
+   kwl.add(prefix,
+           SUB_IMAGE_OFFSET_LINE,
+           theSubImageOffset.line,
+           true);
+   kwl.add(prefix,
+           SUB_IMAGE_OFFSET_SAMP,
+           theSubImageOffset.samp,
+           true);
+   kwl.add(prefix,
+           VALID_START_LINE,
+           theValidImageRect.ul().y,
+           true);
+   kwl.add(prefix,
+           VALID_STOP_LINE,
+           theValidImageRect.lr().y,
+           true);
+   kwl.add(prefix,
+           VALID_START_SAMPLE,
+           theValidImageRect.ul().x,
+           true);
+   kwl.add(prefix,
+           VALID_STOP_SAMPLE,
+           theValidImageRect.ur().x,
+           true);
+   kwl.add(prefix,
+           ossimKeywordNames::INTERLEAVE_TYPE_KW,
+           INTERLEAVE_TYPE_LUT.getEntryString(theInterleaveType),
+           true);
+
+   kwl.add(prefix,
+           PIXELS_TO_CHOP,
+           thePixelsToChop,
+           true);
+
+   kwl.add(prefix,
+           SET_NULLS,
+           theSetNullsMode,
+           true);
+
+
+   if (bytesPerPixel() > 1)
+   {
+      kwl.add(prefix,
+              ossimKeywordNames::BYTE_ORDER_KW,
+              (theImageDataByteOrder == OSSIM_LITTLE_ENDIAN ? "little_endian" :
+               "big_endian"),
+              true);
+   }
+
+   return true;
+}
+
+bool ossimGeneralRasterInfo::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   static const char MODULE[] = "ossimGeneralRasterInfo::loadState";
+   if ( traceDebug() )
+   {
+      CLOG << "DEBUG: entered..."
+           << "\nprefix:  " << (prefix ? prefix : "")
+           << "\nInput keyword list:\n"
+           << kwl
+           << std::endl;
+   }   
+
+   bool result = false;
+
+   //---
+   // Look for required and option keyword.  Break from loop if required
+   // keyword is not found.
+   //---
+   while( 1 )
+   {
+      // Check for errors in the ossimKeywordlist.
+      if(kwl.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
+      {
+        if(traceDebug())
+        {
+          ossimNotify(ossimNotifyLevel_WARN)
+            << MODULE << " ERROR:\n"
+            << "Detected an error in the keywordlist:  " << kwl
+            << std::endl;
+        }
+         break;
+      }
+
+      std::string key;
+      ossimString value; // Use for keyword list lookups.
+      ossim_int32 lines = 0;
+      ossim_int32 samples = 0;
+
+      // Lines (required):
+      key = NUMBER_LINES;
+      value.string() = kwl.findKey( key );  // Required to have this.
+      if ( value.size() )
+      {
+         lines = value.toInt32();
+         if ( !lines )
+         {
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << " ERROR:\n"
+                  << "Required number of lines is 0!" << std::endl;
+            }
+            break;
+         } 
+      }
+      else
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << " ERROR:\n"
+               << "Required keyword not found:  " << key << std::endl;
+         }
+         break;
+      }
+
+      // Samples (required):
+      key = NUMBER_SAMPLES;
+      value.string() = kwl.findKey( key );  // Required to have this.
+      if ( value.size() )
+      {
+         samples = value.toInt32();
+         if ( !samples )
+         {
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << " ERROR:\n"
+                  << "Required number of samples is 0!" << std::endl;
+            }
+            break;
+         }          
+      }
+      else
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << " ERROR:\n"
+               << "Required keyword not found:  " << key << std::endl;
+         }
+         break;
+      }
+      
+      // Bands ossimImageMetaData::loadState checks for required bands:
+      if(!theMetaData.loadState(kwl, prefix))
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << " Error loading meta data!\n" << std::endl;
+         }
+         break;
+      }
+
+      // If we get here assign the rectangles:
+      theRawImageRect   = ossimIrect( 0, 0, samples - 1, lines - 1 );
+      theValidImageRect = theRawImageRect;
+      theImageRect      = theRawImageRect;
+
+      int tmp = INTERLEAVE_TYPE_LUT.getEntryNumber(kwl);
+      if (tmp == ossimLookUpTable::NOT_FOUND)
+      {
+         theInterleaveType = OSSIM_BIL;
+      }
+      else
+      {
+         theInterleaveType = static_cast<ossimInterleaveType>(tmp);
+      }
+      
+      // Get the image files.
+      if (theInterleaveType != OSSIM_BSQ_MULTI_FILE)
+      {
+         // Look for "filename" first, then deprecated "image_file".
+         key = ossimKeywordNames::FILENAME_KW;
+         value.string() = kwl.findKey( key );
+         if ( value.empty() )
+         {
+            // deprecated keyword...
+            key = ossimKeywordNames::IMAGE_FILE_KW;
+            value.string() = kwl.findKey( key );
+         }
+         
+         if ( value.size() )
+         {
+            //---
+            // omd (ossim metadata) files can have just the base filename, e.g. image.ras,
+            // in which case open will fail if not in the image dir.  So only put it in
+            // the list if it doesn't exits.
+            //---
+            ossimFilename f = value;
+            if ( f.exists() )
+            {
+               theImageFileList.clear();
+               theImageFileList.push_back(ossimFilename(value));
+            }
+         }
+
+         if ( theImageFileList.empty() )
+         {
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << "ERROR:\n"
+                  << "Required keyword not found:  "
+                  << ossimKeywordNames::FILENAME_KW << std::endl;
+            }
+            break;
+         }
+      }
+      else
+      {
+         // multiple file names.
+         ossim_int32 count = 0;
+         
+         // look for image file key word with no number.
+         // Required to have this.
+         key = ossimKeywordNames::FILENAME_KW;
+         value.string() = kwl.findKey( key );
+         if ( value.empty() )
+         {
+            // deprecated keyword...
+            key = ossimKeywordNames::IMAGE_FILE_KW;
+            value.string() = kwl.findKey( key );
+         }
+         
+         if ( value.size() )
+         {
+            theImageFileList.push_back(ossimFilename(value));
+            ++count;
+         }
+         
+         ossim_int32 i = 0;
+         while ( (count < numberOfBands()) && (i < 1000) )
+         {
+            key = ossimKeywordNames::FILENAME_KW;
+            key += ossimString::toString(i).string();
+            value.string() = kwl.findKey( key );
+            if ( value.empty() )
+            {
+               // Lookup for deprecated keyword.
+               key = ossimKeywordNames::IMAGE_FILE_KW;
+               key += ossimString::toString(i).string();
+               value.string() = kwl.findKey( key );
+            }
+            
+            if ( value.size() )
+            {
+               theImageFileList.push_back(ossimFilename(value));
+               ++count;
+            }
+            ++i;
+         }
+         
+         if (count != numberOfBands())  // Error, count should equal bands!
+         {
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << " ERROR:\n"
+                  << "Required keyword not found:  "
+                  << ossimKeywordNames::FILENAME_KW
+                  << "\nInterleave type is multi file; however,"
+                  << " not enough were pick up!"  << std::endl;
+            }
+            break;
+         }
+      }
+
+      key = VALID_START_LINE;
+      value.string() = kwl.findKey( key ); // Default is zero.
+      if ( value.size() )
+      {
+         theValidImageRect.set_uly( value.toInt32() );
+      }
+
+      key = VALID_STOP_LINE;
+      value.string() = kwl.findKey( key ); // Default is last line.
+      if ( value.size() )
+      {
+         theValidImageRect.set_lry( value.toInt32() );
+      }
+      
+      if (theValidImageRect.lr().y < theValidImageRect.ul().y)
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << " ERROR:"
+            << "\nValid stop line < start line."
+            << "\nValid start line:  " << theValidImageRect.ul().y
+            << "\nValid stop line:   " << theValidImageRect.lr().y
+            << "\nError status has been set.  Returning." << std::endl;
+         break;
+      }
+
+      key = VALID_START_SAMPLE;
+      value.string() = kwl.findKey( key ); // Default is zero.
+      if ( value.size() )
+      {
+         theValidImageRect.set_ulx( value.toInt32() );
+      }
+
+      key = VALID_STOP_SAMPLE;
+      value.string() = kwl.findKey( key ); // Default is last sample.
+      if ( value.size() ) 
+      {
+         theValidImageRect.set_lrx( value.toInt32() );
+      }
+      
+      if (theValidImageRect.lr().x < theValidImageRect.ul().x)
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << " ERROR:"
+            << "\nValid stop samp < start samp."
+            << "\nValid start samp:  " << theValidImageRect.ul().x
+            << "\nValid stop samp:   " << theValidImageRect.lr().x
+            << "\nError status has been set.  Returning." << std::endl;
+         break;
+      }
+      
+      theImageRect.set_lry(theValidImageRect.lr().y -
+                           theValidImageRect.ul().y);
+      theImageRect.set_lrx(theValidImageRect.lr().x -
+                           theValidImageRect.ul().x);
+      
+      key = SUB_IMAGE_OFFSET_LINE;
+      value.string() = kwl.findKey( key ); // Default is zero.
+      if ( value.size() )
+      {
+         theSubImageOffset.line = value.toInt32();
+      }
+
+      key = SUB_IMAGE_OFFSET_SAMP;
+      value.string() = kwl.findKey( key ); // Default is zero.
+      if ( value.size() )
+      {
+         theSubImageOffset.samp = atoi(value);
+      }
+
+      key = HEADER_SIZE;
+      value.string() = kwl.findKey( key ); // Default is zero.
+      if ( value.size() )
+      {
+         theHeaderSize = value.toInt32();
+      }
+
+      key = SET_NULLS;
+      value.string() = kwl.findKey( key ); // Default is 2.
+      if ( value.size() )
+      {
+         int tmp;
+         tmp = atoi(value);
+         if ((tmp < 3) && (tmp > -1))
+         {
+            theSetNullsMode = (ossimFillMode)tmp;
+         }
+         else
+         {
+            theSetNullsMode = ZEROES_TO_NULL_EDGES_ONLY;  // 2
+            ossimNotify(ossimNotifyLevel_WARN)
+               << " WARNING:"
+               << "\nset_fill_to_nulls_mode value out of range."
+               << "\nDefaulted to 2" << std::endl;
+         }
+      }
+
+      key = PIXELS_TO_CHOP;
+      value.string() = kwl.findKey( key ); // Default is zero.
+      if ( value.size() )
+      {
+         thePixelsToChop = value.toInt32();
+      }
+      
+      if (bytesPerPixel() > 1)
+      {
+         // get the byte order of the data.
+         key = ossimKeywordNames::BYTE_ORDER_KW;
+         value.string() = kwl.findKey( key );
+         if ( value.size() )
+         {
+            ossimString s(value);
+            if (s.trim() != "")  // Check for empty string.
+            {
+               s.downcase();
+               if (s.contains("big"))
+               {
+                  theImageDataByteOrder = OSSIM_BIG_ENDIAN;
+               }
+               else if(s.contains("little"))
+               {
+                  theImageDataByteOrder = OSSIM_LITTLE_ENDIAN;
+               }
+            }
+         }
+      }
+
+      // End of while forever loop.
+      result = true;
+      break;
+
+   } // Matches: while (1)
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE  << " Exit status: " << (result?"true":"false") << std::endl;
+   }      
+   
+   return result;
+   
+} // End: bool ossimGeneralRasterInfo::loadState
+
+bool ossimGeneralRasterInfo::open( const ossimFilename& imageFile )
+{
+   static const char MODULE[] = "ossimGeneralRasterInfo::open";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " entered..." << "\nimageFile: " << imageFile << std::endl;
+   }
+
+   bool result = false;
+
+   // Wipe any previous state slick.
+   clear();
+
+   ossimFilename copyFile = imageFile;
+   if ( !imageFile.exists() )
+   {
+      copyFile = imageFile.expand();
+   }
+
+   // Look for the headrer of omd file as they are written out by img2rr.
+   ossimFilename hdr = copyFile;
+   hdr.setExtension("hdr"); // image.hdr
+   if ( !hdr.exists() )
+   {
+      hdr = imageFile;
+      hdr.string() += ".hdr"; // image.ras.hdr
+      if ( ! hdr.exists() )
+      {
+         hdr = imageFile;
+         hdr.setExtension("xml"); // image.xml
+      }
+   }
+
+   if ( hdr.exists() )
+   {
+      if ( traceDebug() )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << "header file: " << hdr << std::endl;
+      }
+      
+      ossimString ext = hdr.ext().downcase();
+      
+      if ( ext == "hdr" )
+      {
+         if ( ossimEnviHeader::isEnviHeader( hdr ) )
+         {
+            result = initializeFromEnviHdr( hdr );
+         }
+         else
+         {
+            result = initializeFromHdr( imageFile, hdr );
+         }
+
+         if ( !result )
+         {
+            // Could be an ossim meta data file:
+            ossimKeywordlist kwl( hdr );
+            result = loadState( kwl, 0 );
+         }
+      }
+      else if ( ext == "xml" )
+      {
+         result = initializeFromXml( imageFile, hdr );
+      }
+   }
+   
+   //---
+   // Set the file name.  Needed for ossimGeneralRasterTileSource::open.
+   // Note set here above loadState call to stop loadState from returning
+   // false if no image file found.
+   //---
+   if ( theImageFileList.empty() )
+   {
+      setImageFile( imageFile );
+   }
+   
+   ossimFilename omd = imageFile;
+   omd.setExtension("omd"); // image.omd
+   if ( !omd.exists() )
+   {
+      omd.setExtension("kwl"); // image.kwl
+   }
+
+   if ( omd.exists() )
+   {
+      if ( traceDebug() )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << "omd file: " << omd << std::endl;
+      }
+
+      ossimKeywordlist kwl( omd );
+
+      if ( result && theMetaData.getNumberOfBands() )
+      {
+         //---
+         // Just update the band info in case it has min/max values from
+         // a compute min/max scan.
+         //---
+         theMetaData.updateMetaData( kwl, std::string("") );
+      }
+      else
+      {
+         // We're not initialized yet so do a loadState:
+         result = loadState( kwl, 0 );
+      }
+   }
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE  << " Exit status: " << (result?"true":"false") << std::endl;
+   }
+   
+   return result;
+}
+
+bool ossimGeneralRasterInfo::initializeFromHdr( const ossimFilename& imageFile,
+                                                const ossimFilename& headerFile )
+{
+   bool result = false;
+
+   ossimKeywordlist kwl;
+   char delimeter = ' ';
+   kwl.change_delimiter(delimeter);
+
+   if ( kwl.addFile(headerFile) )
+   {
+      kwl.downcaseKeywords();
+      ossimString value;
+   
+      while( 1 ) 
+      {
+         //---
+         // Go through the data members in order.
+         // If a required item is not found break from loop.
+         //--
+         theMetaData.clear();
+
+         // scalar ( default ) - adjusted below :
+         theMetaData.setScalarType( OSSIM_UINT8 );
+
+         // Image file name:
+         theImageFileList.clear();
+         theImageFileList.push_back( imageFile );
+         
+         // interleave ( not required - default=BIL)
+         theInterleaveType = OSSIM_BIL;
+         value.string() = kwl.findKey( std::string("layout") );
+         if ( value.size() )
+         {
+            ossimInterleaveTypeLut lut;
+            ossim_int32 intrlv = lut.getEntryNumber( value.string().c_str(), true );
+            if ( intrlv != ossimLookUpTable::NOT_FOUND )
+            {
+               theInterleaveType = static_cast<ossimInterleaveType>(intrlv);
+            }
+         }
+
+         // bands ( required ):
+         ossim_uint32 bands = 0;
+         value.string() = kwl.findKey( std::string("nbands") );
+         if ( value.size() )
+         {
+            bands = value.toUInt32();
+         }
+         if ( !bands )
+         {
+            break;
+         }
+         theMetaData.setNumberOfBands( bands );
+
+         // lines ( required ):
+         ossim_int32 lines = 0;
+         value.string() = kwl.findKey( std::string("nrows") );
+         if ( value.size() )
+         {
+            lines = value.toInt32();
+         }
+         if ( !lines )
+         {
+            break;
+         }
+         
+         // samples ( required ):
+         ossim_int32 samples = 0;
+         value.string() = kwl.findKey( std::string("ncols") );
+         if ( value.size() )
+         {
+            samples = value.toInt32();
+         }
+         if ( !samples )
+         {
+            break;
+         }
+
+         // nodata or null value ( not required )
+         value.string() = kwl.findKey( std::string("nodata") );
+         if ( value.empty() )
+         {
+            value.string() = kwl.findKey( std::string("nodata_value") );
+         }
+         if ( value.size() )
+         {
+            ossim_float64 nullValue = value.toUInt32();
+            for ( ossim_uint32 band = 0; band < theMetaData.getNumberOfBands(); ++band )
+            {
+               theMetaData.setNullPix( band, nullValue );
+            }
+            theMetaData.setNullValuesValid(true);
+         }
+
+         // Set the rectangles:
+         theRawImageRect   = ossimIrect( 0, 0, samples - 1, lines - 1 );
+         theValidImageRect = theRawImageRect;
+         theImageRect      = theRawImageRect;         
+
+         // sample start ( not required ):
+         theSubImageOffset.x = 0;
+
+         // line start ( not required ):
+         theSubImageOffset.y = 0;
+
+         // header offset ( not required ):
+         theHeaderSize = 0;
+
+         // null mode:
+         theSetNullsMode = ossimGeneralRasterInfo::NONE;
+
+         // pixels to chop:
+         thePixelsToChop = 0; 
+
+         // Byte order, ( not required - defaulted to system if not found.
+         theImageDataByteOrder = ossim::byteOrder();
+         value.string() = kwl.findKey( std::string("byteorder") );
+         if ( value.size() )
+         {
+            ossim_uint32 i = value.toUInt32();
+            if ( i == 0 )
+            {
+               theImageDataByteOrder = OSSIM_LITTLE_ENDIAN;
+            }
+            else
+            {
+               theImageDataByteOrder = OSSIM_BIG_ENDIAN;
+            }
+         }
+
+         // Pixel type used for scalar below:
+         std::string pixelType = "N"; // not defined
+         value.string() = kwl.findKey( std::string("pixeltype") );
+         if ( value.size() )
+         {
+            pixelType = value.string();
+         }
+         
+         ossim_int32 nbits = -1;
+         value.string() = kwl.findKey( std::string("nbits") );
+         if ( value.size() )
+         {
+            nbits = value.toInt32();
+         }
+         else
+         {
+            nbits = getBitsPerPixel( imageFile );
+         }
+
+         switch( nbits )
+         {
+            case 8:
+            {
+               theMetaData.setScalarType( OSSIM_UINT8 );
+               break;
+            }
+            case 16:
+            {
+               if (pixelType == "S")
+               {
+                  theMetaData.setScalarType( OSSIM_SINT16 );
+               }
+               else
+               {
+                  theMetaData.setScalarType( OSSIM_UINT16 );
+               }
+               break;
+            }
+            case 32:
+            {
+               if( pixelType == "S")
+               {
+                  theMetaData.setScalarType( OSSIM_SINT32 );
+               }
+               else if( pixelType == "F")
+               {
+                  theMetaData.setScalarType( OSSIM_FLOAT32 );
+               }
+               else
+               {
+                  theMetaData.setScalarType( OSSIM_UINT32 );
+               }
+               break;
+            }
+            default:
+            {
+               if( (nbits < 8) && (nbits >= 1 ) )
+               {
+                  theMetaData.setScalarType( OSSIM_UINT8 );
+               }
+               break;
+            }
+         }
+
+         result = true;
+         break; // Trailing break to get out.
+      }
+   }
+
+   return result;
+   
+} // End: ossimGeneralRasterInfo::initializeFromHdr
+
+
+bool ossimGeneralRasterInfo::initializeFromEnviHdr( const ossimFilename& headerFile )
+{
+   bool result = false;
+   ossimEnviHeader hdr;
+   if( hdr.open( headerFile ) )
+   {
+      result = initializeFromEnviHdr( hdr );
+   }
+   return result;
+}
+
+bool ossimGeneralRasterInfo::initializeFromEnviHdr( const ossimEnviHeader& enviHdr )
+{
+   bool result = false;
+
+   while( 1 ) 
+   {
+      //---
+      // Go through the data members in order.
+      // If a required item is not found break from loop.
+      //--
+      theMetaData.clear();
+      
+      // scalar ( required ) :
+      if( enviHdr.getOssimScalarType() != OSSIM_SCALAR_UNKNOWN )
+      {
+         theMetaData.setScalarType( enviHdr.getOssimScalarType() );
+      }
+      else
+      {
+         break;
+      }
+      
+      theImageFileList.clear();
+      
+      // interleave ( required ):
+      theInterleaveType = enviHdr.getOssimInterleaveType();
+      if ( theInterleaveType == OSSIM_INTERLEAVE_UNKNOWN )
+      {
+         break;
+      }
+      
+      // bands ( required ):
+      if ( !enviHdr.getBands() )
+      {
+         break;
+      }
+      theMetaData.setNumberOfBands( enviHdr.getBands() );
+      
+      // lines ( required ):
+      ossim_uint32 lines = enviHdr.getLines();
+      if ( !lines )
+      {
+         break;
+      }
+      
+      // samples ( required ):
+      ossim_uint32 samples = enviHdr.getSamples();
+      if ( !samples )
+      {
+         break;
+      }
+      
+      // Set the rectangles:
+      theRawImageRect   = ossimIrect( 0, 0, samples - 1, lines - 1 );
+      theValidImageRect = theRawImageRect;
+      theImageRect      = theRawImageRect;         
+
+      // sample start ( not required ):
+      theSubImageOffset.x = enviHdr.getXStart();
+      
+      // line start ( not required ):
+      theSubImageOffset.y = enviHdr.getYStart();
+      
+      // header offset ( not required ):
+      theHeaderSize = enviHdr.getHeaderOffset();
+      
+      // null mode:
+      theSetNullsMode = ossimGeneralRasterInfo::NONE;
+      
+      // pixels to chop:
+      thePixelsToChop = 0; 
+      
+      // Byte order, this will be system if not found.
+      theImageDataByteOrder = enviHdr.getByteOrder();
+      
+      result = true;
+      break; // Trailing break to get out.
+   }
+   return result;
+   
+} // End: ossimGeneralRasterInfo::initializeFromEnviHdr( const ossimEnviHeader& )
+
+bool ossimGeneralRasterInfo::initializeFromXml( const ossimFilename& imageFile,
+                                                const ossimFilename& headerFile )
+{
+   bool result = false;
+
+   ossimFgdcXmlDoc file;
+   if (file.open( headerFile ))
+   {
+      while( 1 ) 
+      {
+         //---
+         // Go through the data members in order.
+         // If a required item is not found break from loop.
+         //--
+         theMetaData.clear();
+
+         // scalar ( default ) - adjusted below :
+         theMetaData.setScalarType( OSSIM_UINT8 );
+
+         // Image file name:
+         theImageFileList.clear();
+         theImageFileList.push_back( imageFile );
+
+         // interleave ( defaulted ):
+         theInterleaveType = OSSIM_BIL;
+
+         // bands ( required ):
+         if ( !file.getNumberOfBands() )
+         {
+            break;
+         }
+         theMetaData.setNumberOfBands( file.getNumberOfBands() );
+         
+         ossimIpt size;
+         if ( file.getImageSize(size) ) // Lines, samples not image file size.
+         {
+            // lines, samples ( required ):
+            if ( !size.x || !size.y )
+            {
+               break;
+            }
+         }
+         else
+         {
+            break;
+         }
+
+         // Set the rectangles:
+         theRawImageRect   = ossimIrect( 0, 0, size.x - 1, size.y - 1 );
+         theValidImageRect = theRawImageRect;
+         theImageRect      = theRawImageRect;         
+
+         // sample start ( not required ):
+         theSubImageOffset.x = 0;
+
+         // line start ( not required ):
+         theSubImageOffset.y = 0;
+
+         // header offset ( not required ):
+         theHeaderSize = 0;
+
+         // null mode:
+         theSetNullsMode = ossimGeneralRasterInfo::NONE;
+
+         // pixels to chop:
+         thePixelsToChop = 0; 
+
+         // Byte order *** need this ***, defaulting to system for now:
+         theImageDataByteOrder = ossim::byteOrder();
+
+         // Adjust scalar if needed, note defaulted to 8 bit above:
+         ossimString eainfo;
+         file.getPath("/metadata/eainfo/detailed/enttyp/enttypd", eainfo);
+         ossim_int32 numBits = 0;
+         ossim_int64 fileSize = imageFile.fileSize(); // Image file size.
+         ossim_int32 numBytes = fileSize / size.x / size.y / numberOfBands();
+         if( numBytes > 0 && numBytes != 3 )
+         {
+            numBits = numBytes*8;
+         }
+         if( numBits == 16 )
+         {
+            theMetaData.setScalarType( OSSIM_UINT16 );
+         }
+         else if( numBits == 32 )
+         {
+            if(eainfo.contains("float"))
+            {
+               theMetaData.setScalarType( OSSIM_FLOAT32 );
+            }
+            else
+            {
+               theMetaData.setScalarType( OSSIM_UINT32 );
+            }
+         }
+
+         result = true;
+         break; // Trailing break to get out.
+      }
+   }
+
+   return result;
+   
+} // End: ossimGeneralRasterInfo::initializeFromXml
+
+ossim_int32 ossimGeneralRasterInfo::getBitsPerPixel( const ossimFilename& imageFile ) const
+{
+   // Note currently does not consider header size.
+   ossim_int32 result = 0;
+   
+   ossim_int64 fileSize = imageFile.size();
+   ossimIpt rectSize = theRawImageRect.size();
+   if ( fileSize && rectSize.x && rectSize.y && numberOfBands() )
+   {
+      result = ( fileSize / rectSize.x / rectSize.y / numberOfBands() ) * 8;
+   }
+   return result;
+}
+
+
diff --git a/ossim/src/ossim/imaging/ossimGeneralRasterTileSource.cpp b/ossim/src/ossim/imaging/ossimGeneralRasterTileSource.cpp
new file mode 100644
index 0000000..1f7eb7b
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimGeneralRasterTileSource.cpp
@@ -0,0 +1,1601 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Contains class definition for ossimGeneralRasterTileSource.
+//*******************************************************************
+//  $Id: ossimGeneralRasterTileSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimGeneralRasterTileSource.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimErrorContext.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimInterleaveTypeLut.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/base/ossimStreamFactoryRegistry.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimImageGeometryRegistry.h>
+#include <ossim/projection/ossimMapProjectionFactory.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/support_data/ossimFgdcXmlDoc.h>
+
+RTTI_DEF1_INST(ossimGeneralRasterTileSource,
+               "ossimGeneralRasterTileSource",
+               ossimImageHandler)
+
+static ossimTrace traceDebug("ossimGeneralRasterTileSource:debug");
+
+// For interleave type enum to string conversions.
+static const ossimInterleaveTypeLut ILUT;
+
+//*******************************************************************
+// Public Constructor:
+//*******************************************************************
+ossimGeneralRasterTileSource::ossimGeneralRasterTileSource()
+   :
+      ossimImageHandler(),
+      m_tile(0),
+      m_buffer(0),
+      m_lineBuffer(0),
+      m_bufferInterleave(OSSIM_BIL),
+      m_fileStrList(0),
+      m_rasterInfo(),
+      m_bufferRect(0, 0, 0, 0),
+      m_swapBytesFlag(false),
+      m_bufferSizeInPixels(0),
+      m_outputBandList(0)
+{}
+
+ossimGeneralRasterTileSource::~ossimGeneralRasterTileSource()
+{
+   close();
+}
+
+ossimRefPtr<ossimImageData> ossimGeneralRasterTileSource::getTile(
+   const ossimIrect& tile_rect, ossim_uint32 resLevel)
+{
+   if ( m_tile.valid() == false )
+   {
+      allocateTile(); // First time through...
+   }
+   
+   if (m_tile.valid())
+   {
+      // Image rectangle must be set prior to calling getTile.
+      m_tile->setImageRectangle(tile_rect);
+      
+      if ( getTile( m_tile.get(), resLevel ) == false )
+      {
+         if (m_tile->getDataObjectStatus() != OSSIM_NULL)
+         {
+            m_tile->makeBlank();
+         }
+      }
+   }
+   
+   return m_tile;
+}
+
+bool ossimGeneralRasterTileSource::getTile(ossimImageData* result,
+                                           ossim_uint32 resLevel)
+{
+   bool status = false;
+   
+   //---
+   // Not open, this tile source bypassed, or invalid res level,
+   // return a blank tile.
+   //---
+   if( isOpen() && isSourceEnabled() && isValidRLevel(resLevel)  &&
+       result && (result->getNumberOfBands() == getNumberOfOutputBands()) )
+   {
+      //---
+      // Check for overview tile.  Some overviews can contain r0 so always
+      // call even if resLevel is 0.  Method returns true on success, false
+      // on error.
+      //---
+      status = getOverviewTile(resLevel, result);
+      if (status)
+      {
+         if(getOutputScalarType() == OSSIM_USHORT11)
+         {
+            //---
+            // Temp fix:
+            // The overview handler could return a tile of OSSIM_UINT16 if
+            // the max sample value was not set to 2047.
+            //---
+            result->setScalarType(OSSIM_USHORT11);
+         }
+      }
+      
+      if (!status) // Did not get an overview tile.
+      {
+         status = true;
+         
+         //---
+         // Subtract any sub image offset to get the zero based image space
+         // rectangle.
+         //---
+         ossimIrect tile_rect = result->getImageRectangle();
+         
+         // This should be the zero base image rectangle for this res level.
+         ossimIrect image_rect = getImageRectangle(resLevel);
+         
+         //---
+         // See if any point of the requested tile is in the image.
+         //---
+         if ( tile_rect.intersects(image_rect) )
+         {
+            // Make the tile rectangle zero base.
+            result->setImageRectangle(tile_rect);
+
+            // Initialize the tile if needed as we're going to stuff it.
+            if (result->getDataObjectStatus() == OSSIM_NULL)
+            {
+               result->initialize();
+            }
+
+            ossimIrect clip_rect = tile_rect.clipToRect(image_rect);
+
+            if ( ! tile_rect.completely_within(m_bufferRect) )
+            {
+               // A new buffer must be loaded.
+               if ( !tile_rect.completely_within(clip_rect) )
+               {
+                  //---
+                  // Start with a blank tile since the whole tile buffer will
+                  // not be
+                  // filled.
+                  //---
+                  result->makeBlank();
+               }
+
+               // Reallocate the buffer if needed.
+               if ( m_bufferSizeInPixels != result->getSize() )
+               {
+                  allocateBuffer( result );
+               }
+
+               ossimIpt size(static_cast<ossim_int32>(result->getWidth()),
+                             static_cast<ossim_int32>(result->getHeight()));
+
+               if( !fillBuffer(clip_rect.ul(), size) )
+               {
+                  ossimNotify(ossimNotifyLevel_WARN)
+                     << "Error from fill buffer..."
+                     << std::endl;
+                  //---
+                  // Error in filling buffer.
+                  //---
+                  setErrorStatus();
+                  status = false;
+               }
+            }
+            
+            result->loadTile(m_buffer,
+                             m_bufferRect,
+                             clip_rect,
+                             m_bufferInterleave);
+            result->validate();
+
+            // Set the rectangle back.
+            result->setImageRectangle(tile_rect);
+            
+         }
+         else // No intersection.
+         {
+            result->makeBlank();
+         }
+      }
+   }
+   return status;
+}
+
+bool ossimGeneralRasterTileSource::fillBuffer(const ossimIpt& origin, const ossimIpt& size)
+{
+
+   static const char MODULE[] = "ossimGeneralRasterTileSource::fillBuffer";
+
+   // Note:  InterleaveType enumerations in "constants.h" file.
+   bool status = false;
+   switch ( m_rasterInfo.interleaveType() )
+   {
+      case OSSIM_BIP:
+      {
+         status = fillBIP(origin, size);
+         break;
+      }
+      case OSSIM_BIL:
+      {
+         status = fillBIL(origin, size);
+         break;
+      }
+      case OSSIM_BSQ:
+      {
+         status = fillBSQ(origin, size);
+         break;
+      }
+      case OSSIM_BSQ_MULTI_FILE:
+      {
+         status = fillBsqMultiFile(origin, size);
+         break;
+      }
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << MODULE << " ERROR:\n"
+            << " Unsupported interleave type:  "
+            << ILUT.getEntryString(m_rasterInfo.interleaveType())
+            << std::endl;
+      }
+   }
+   
+   if (status && m_swapBytesFlag)
+   {
+      ossimEndian oe;
+      oe.swap(m_rasterInfo.getImageMetaData().getScalarType(),
+              m_buffer,
+              m_bufferSizeInPixels);
+   }
+
+   return status;
+}
+
+bool ossimGeneralRasterTileSource::fillBIP(const ossimIpt& origin, const ossimIpt& size )
+{
+   static const char MODULE[] = "ossimGeneralRasterTileSource::fillBIP ";
+
+   m_bufferRect.set_ul(origin);
+   m_bufferRect.set_lry(min( (origin.y + size.y -1),
+                              m_rasterInfo.imageRect().lr().y));
+   m_bufferRect.set_lrx(min( (origin.x + size.x -1),
+                              m_rasterInfo.imageRect().lr().x));
+
+   const ossim_int32 WIDTH                  = static_cast<ossim_int32>( m_bufferRect.width() ); 
+   const ossim_int32 HEIGHT                 = static_cast<ossim_int32>( m_bufferRect.height() ); 
+   const ossim_int32 INPUT_BANDS            = m_rasterInfo.numberOfBands();
+   const ossim_int32 OUTPUT_BANDS           = static_cast<ossim_int32>( m_outputBandList.size() );
+   const ossim_int32 BYTES_PER_PIXEL        = m_rasterInfo.bytesPerPixel();
+   const ossim_int32 INPUT_BYTES_PER_SAMPLE = BYTES_PER_PIXEL * INPUT_BANDS;
+   const ossim_int32 OUTPUT_BYTES_PER_SAMPLE = BYTES_PER_PIXEL * OUTPUT_BANDS;
+   
+   // Seek position.
+   std::streamoff rasterOffset = m_rasterInfo.offsetToFirstValidSample() +
+        origin.y * m_rasterInfo.bytesPerRawLine() +
+        origin.x * INPUT_BYTES_PER_SAMPLE;
+
+    // Input line buffer, all bands.
+   std::streamsize inputLineBufferWidth = WIDTH * INPUT_BYTES_PER_SAMPLE;
+  
+   // Output buffer width:
+   std::streamsize outputLineBufferWidth = WIDTH * OUTPUT_BYTES_PER_SAMPLE;
+
+#if 0 /* Please keep for debug. (drb) */
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "\nDEBUG:"
+         << "\norigin:                 " << origin
+         << "\nSeek position:          " << rasterOffset
+         << "\ninputLineBufferWidth:   " << inputLineBufferWidth
+         << "\noutputLineBufferWidth:  " << outputLineBufferWidth
+         << "\nINPUT_BANDS:            " << INPUT_BANDS
+         << "\nOUTPUT_BANDS:           " << OUTPUT_BANDS
+         << std::endl;
+#endif
+   
+   ossim_int32 bufferOffset = 0;   
+   
+   // Line loop:
+   ossim_int32 currentLine = 0;
+   while ( currentLine < HEIGHT )
+   {
+      // Seek to line.
+      m_fileStrList[0]->seekg(rasterOffset, ios::beg);
+      if (!(*m_fileStrList[0]))
+      {
+         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+         ossimNotify(ossimNotifyLevel_WARN)
+            << MODULE << " ERROR:\n"
+            << " Seek error!  Returning with error..." << std::endl;
+         return false;
+      }
+
+      // Read image data from line for all bands into line buffer.   
+      m_fileStrList[0]->read( (char*)m_lineBuffer, inputLineBufferWidth );
+      if ( m_fileStrList[0]->gcount() != inputLineBufferWidth ) 
+      {
+         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+         ossimNotify(ossimNotifyLevel_WARN)
+            << MODULE << "\nERROR:  Reading image line." << std::endl;
+         return false;
+      }
+      
+      // Sample loop:
+      for ( ossim_int32 sample = 0; sample < WIDTH; ++sample )
+      {
+         // Band loop:
+         for ( ossim_int32 band = 0; band < OUTPUT_BANDS; ++band )
+         {
+            ossim_int32 selectedBand = static_cast<ossim_int32>(m_outputBandList[band]);
+            memcpy( (void*)(m_buffer + bufferOffset +
+                            sample * OUTPUT_BYTES_PER_SAMPLE +
+                            band * BYTES_PER_PIXEL),
+                    (void*)(m_lineBuffer +
+                            sample * INPUT_BYTES_PER_SAMPLE + 
+                            selectedBand * BYTES_PER_PIXEL),
+                    BYTES_PER_PIXEL );
+         }
+      }
+               
+      ++currentLine;
+      bufferOffset += outputLineBufferWidth;
+      rasterOffset += m_rasterInfo.bytesPerRawLine();
+   }
+   
+   return true;
+   
+} // End: bool ossimGeneralRasterTileSource::fillBipBandSelect(...
+
+bool ossimGeneralRasterTileSource::fillBIL(const ossimIpt& origin,
+                                           const ossimIpt& size)
+{
+   static const char MODULE[] = "ossimGeneralRasterTileSource::fillBIL";
+   
+   //***
+   // This will fill a buffer the full width of valid samples * tileHeight().
+   //***
+   m_bufferRect.set_ul(origin);
+   m_bufferRect.set_lry(min((origin.y + size.y - 1),
+                             m_rasterInfo.imageRect().lr().y));
+   m_bufferRect.set_lrx(min((origin.x + size.x - 1),
+                             m_rasterInfo.imageRect().lr().x));
+   
+   ossim_sint64 currentLine = origin.y;
+
+   // Bytes in one line all bands.
+   const std::streamoff LINE_OFFSET =
+      m_rasterInfo.bytesPerRawLine() * m_rasterInfo.numberOfBands();
+
+   // Start seek position.
+   std::streamoff offset = ( m_rasterInfo.offsetToFirstValidSample() +
+                             currentLine * LINE_OFFSET +
+                             origin.x * m_rasterInfo.bytesPerPixel() );
+
+   //---
+   // Loop through and process lines. 
+   //---
+   ossim_int32 linesProcessed = 0;
+   std::streamsize buffer_width = m_bufferRect.width() * m_rasterInfo.bytesPerPixel();
+   ossim_uint8* buf = m_buffer;
+
+#if 0 /* Please leave for debug.  (drb) */
+   ossimNotify(ossimNotifyLevel_DEBUG)
+      << "\nDEBUG:"
+      << "\norigin:                 " << origin
+      << "\nSeek position:          " << offset
+      << "\nStarting line number:   " << currentLine
+      << "\nbuffer_width:           " << buffer_width << std::endl;
+#endif
+
+   // Line loop:
+   while ((currentLine <= static_cast<ossim_sint64>(m_rasterInfo.imageRect().lr().y)) &&
+          linesProcessed < size.y)
+   {
+      // Band loop:
+      std::vector<ossim_uint32>::const_iterator i = m_outputBandList.begin();
+      while ( i != m_outputBandList.end() )
+      {
+         ossim_int64 band = static_cast<ossim_sint64>( (*i) );
+         const std::streamoff bandOffset = band * m_rasterInfo.bytesPerRawLine();
+         
+         // Seek to line.
+         m_fileStrList[0]->seekg(offset + bandOffset, ios::beg);
+         if (!m_fileStrList[0])
+         {
+            theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << " ERROR:\n"
+               << " Seek error!  Returning with error..." << std::endl;
+            return false;
+         }
+         
+         // Read the line of image data.   
+         m_fileStrList[0]->read( (char*)buf, buffer_width );
+
+         if ( m_fileStrList[0]->gcount() != buffer_width ) 
+         {
+            theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << "\nERROR:  Reading image line."
+               << "\ncurrentLine:  " << currentLine << std::endl;
+            return false;
+         }
+         
+         buf += buffer_width;
+         ++i;
+
+      } // End of band loop.
+      
+      ++linesProcessed;
+      ++currentLine;
+      offset += LINE_OFFSET;
+      
+   } // End: line loop
+   
+   return true;
+}
+   
+//*******************************************************************
+// Private Method:
+//*******************************************************************
+bool ossimGeneralRasterTileSource::fillBSQ(const ossimIpt& origin,
+                                           const ossimIpt& size)
+{
+   static const char MODULE[] = "ossimGeneralRasterTileSource::fillBSQ";
+
+   // This will fill a buffer the full width of valid samples * tileHeight().
+
+   m_bufferRect.set_ul(origin);
+   
+   m_bufferRect.set_lry(min((origin.y + size.y -1),
+                             m_rasterInfo.imageRect().lr().y));
+   m_bufferRect.set_lrx(min((origin.x + size.x - 1),
+                             m_rasterInfo.imageRect().lr().x));
+   
+   // Start seek position.
+   std::streamoff startSeekPosition
+      = m_rasterInfo.offsetToFirstValidSample() +
+        origin.y * m_rasterInfo.bytesPerRawLine() +
+        origin.x * m_rasterInfo.bytesPerPixel();
+
+   std::streamsize buffer_width = m_bufferRect.width() * m_rasterInfo.bytesPerPixel();
+   
+   ossim_uint8* buf = (ossim_uint8*)m_buffer;
+
+   std::streamoff bandOffset
+      = m_rasterInfo.bytesPerRawLine() * m_rasterInfo.rawLines();
+
+#if 0 /* Please leave for debug. (drb) */
+   ossimNotify(ossimNotifyLevel_DEBUG)
+      << "\nDEBUG:"
+      << "\norigin:                 " << origin
+      << "\nSeek position:          " << startSeekPosition
+      << "\nStarting line number:   " << origin.y
+      << "\nbuffer_width:           " << buffer_width
+      << "\nbytesPerRawLine():      "
+      << m_rasterInfo.bytesPerRawLine()
+      << "\nm_rasterInfo.offsetToFirstValidSample():  "
+      << m_rasterInfo.offsetToFirstValidSample()
+      << "\nbandOffset: " << bandOffset << std::endl;
+#endif
+
+   ossim_int32 num_bands = m_rasterInfo.numberOfBands();
+   ossim_int32 height    = size.y;
+
+   // Band loop:
+   for (ossim_int32 band = 0; band < num_bands; ++band)
+   {
+      ossim_sint64 currentLine    = origin.y;
+      ossim_sint64 linesProcessed = 0;
+
+      std::streamoff offset = startSeekPosition + (band * bandOffset);
+
+      // Line loop:
+      while (currentLine <= m_rasterInfo.imageRect().lr().y &&
+             linesProcessed < height)
+      {
+         // Seek to line.
+         m_fileStrList[0]->seekg(offset, ios::beg);
+         if (!m_fileStrList[0])
+         {
+            theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << " ERROR:\n"
+               << " Seek error!  Returning with error..." << std::endl;
+            return false;
+         }
+         
+         // Read the line of image data.   
+         m_fileStrList[0]->read( (char*)buf, buffer_width );
+         if ( m_fileStrList[0]->gcount() != buffer_width ) 
+         {
+            theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << "\nERROR:  Reading image line."
+               << "\ncurrentLine:  " << currentLine << std::endl;
+            return false;
+         }
+
+         // Increment everybody accordingly.
+         buf += buffer_width;
+         offset += m_rasterInfo.bytesPerRawLine();
+         ++linesProcessed;
+         ++currentLine;
+
+      } // End of line loop.
+
+   } // End of band loop.
+   
+   return true;
+}
+
+//*******************************************************************
+// Private Method:
+//*******************************************************************
+bool ossimGeneralRasterTileSource::fillBsqMultiFile(const ossimIpt& origin, const ossimIpt& size)
+{
+   static const char MODULE[] = "ossimGeneralRasterTileSource::fillBsqMultiFile";
+
+   if (traceDebug()) CLOG << " Entered..." << std::endl;
+   
+
+   // This will fill a buffer the full width of valid samples * tileHeight().
+   m_bufferRect.set_ul(origin);
+   
+   m_bufferRect.set_lry(min((origin.y + size.y -1),
+                             m_rasterInfo.imageRect().lr().y));
+   m_bufferRect.set_lrx(min((origin.x + size.x - 1),
+                             m_rasterInfo.imageRect().lr().x));
+   
+   //---
+   // Start seek position.
+   //---
+   std::streamoff startSeekPosition = m_rasterInfo.offsetToFirstValidSample() +
+      origin.y * m_rasterInfo.bytesPerRawLine() +
+      origin.x * m_rasterInfo.bytesPerPixel();
+   
+   //---
+   // Loop through and process lines. 
+   //---
+   std::streamsize buffer_width = m_bufferRect.width() * m_rasterInfo.bytesPerPixel();
+   
+   ossim_uint8* buf = (ossim_uint8*)m_buffer;
+
+#if 0
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "\nDEBUG:"
+         << "\norigin:                 " << origin
+         << "\nSeek position:          " << startSeekPosition
+         << "\nStarting line number:   " << origin.y
+         << "\nbuffer_width:           " << buffer_width
+         << "\nbuffer_rect:            " << m_bufferRect
+         << "\nbytesPerRawLine():      "
+         << m_rasterInfo.bytesPerRawLine()
+         << "\nm_rasterInfo.offsetToFirstValidSample():  "
+         << m_rasterInfo.offsetToFirstValidSample() << std::endl;
+   }
+#endif
+
+   // ossim_int32 num_bands = m_rasterInfo.numberOfBands();
+   std::vector<ossim_uint32>::const_iterator bandIter = m_outputBandList.begin();
+   while ( bandIter != m_outputBandList.end() )
+   {
+      ossim_int32 currentLine    = origin.y;
+      ossim_int32 linesProcessed = 0;
+      ossim_int64 offset         = startSeekPosition;
+      
+      while (currentLine <= m_rasterInfo.imageRect().lr().y && linesProcessed < size.y)
+      {
+         //---
+         // Seek to line.
+         //---
+         m_fileStrList[ *bandIter ]->seekg(offset, ios::beg);
+
+         if ( !m_fileStrList[ *bandIter ] )
+         {
+            theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << " ERROR:\n"
+               << " Seek error!  Returning with error..." << std::endl;
+            return false;
+         }
+         
+         //---
+         // Read the line of image data.   
+         //---
+         m_fileStrList[ *bandIter ]->read((char*)buf, buffer_width);
+         
+         if ( m_fileStrList[ *bandIter ]->gcount() != buffer_width) 
+         {
+            theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << "\nERROR:  Reading image line."
+               << "\ncurrentLine:  " << currentLine << std::endl;
+            return false;
+         }
+
+         // Increment everybody accordingly.
+         buf += buffer_width;
+         offset += m_rasterInfo.bytesPerRawLine();
+         ++linesProcessed;
+         ++currentLine;
+         
+      } // End of line loop.
+
+      ++bandIter; // Next band...
+
+   } // End: while ( bandIter ! = m_outputBandList.end() )
+   
+   return true;
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+bool ossimGeneralRasterTileSource::saveState(ossimKeywordlist& kwl,
+                                             const char* prefix) const
+{   
+   // Our stuff:
+   m_rasterInfo.saveState(kwl, prefix);
+
+   // Base class:
+   bool result = ossimImageHandler::saveState(kwl, prefix);
+   
+   if ( result && isBandSelector() && m_outputBandList.size() )
+   {
+      if ( isIdentityBandList( m_outputBandList ) == false )
+      {
+         // If we're not identity output the bands.
+         ossimString bandsString;
+         ossim::toSimpleStringList(bandsString, m_outputBandList);
+         kwl.add(prefix,
+                 ossimKeywordNames::BANDS_KW,
+                 bandsString,
+                 true);
+      }
+   }
+   
+   return result;
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+bool ossimGeneralRasterTileSource::loadState(const ossimKeywordlist& kwl,
+                                             const char* prefix)
+{
+   bool result = false;
+   m_outputBandList.clear();
+
+   if ( ossimImageHandler::loadState(kwl, prefix) )
+   {  
+      // Set the band list if key is present.
+      std::string pfx = ( prefix ? prefix : "" );
+      std::string key = ossimKeywordNames::BANDS_KW;
+      ossimString value;
+      value.string() = kwl.findKey( pfx, key );
+      if ( value.size() )
+      {
+         ossim::toSimpleVector( m_outputBandList, value );
+      }
+      result = open();
+   }
+   return result;
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+ossimScalarType ossimGeneralRasterTileSource::getOutputScalarType() const
+{
+   return m_rasterInfo.getImageMetaData().getScalarType();
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+ossim_uint32 ossimGeneralRasterTileSource::getTileWidth() const
+{
+   ossim_uint32 result = 0;
+   if ( m_tile.valid() )
+   {
+      m_tile->getWidth();
+   }
+   else
+   {
+      ossimIpt tileSize;
+      ossim::defaultTileSize(tileSize);
+      result = tileSize.x;
+   }
+   return result;
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+ossim_uint32 ossimGeneralRasterTileSource::getTileHeight() const
+{
+   ossim_uint32 result = 0;
+   if ( m_tile.valid() )
+   {
+      m_tile->getHeight();
+   }
+   else
+   {
+      ossimIpt tileSize;
+      ossim::defaultTileSize(tileSize);
+      result = tileSize.y;
+   }
+   return result;
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+bool
+ossimGeneralRasterTileSource::isValidRLevel(ossim_uint32 reduced_res_level) const
+{
+   static const char MODULE[] = "ossimGeneralRasterTileSource::isValidRLevel";
+   
+   if (reduced_res_level == 0)
+   {
+      return true;
+   }
+   else if (theOverview.valid())
+   {
+      return theOverview->isValidRLevel(reduced_res_level);
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE
+         << " Invalid reduced_res_level:  " << reduced_res_level
+         << "\nHighest available:  " << (getNumberOfDecimationLevels() - 1)
+         << std::endl;
+      return false;
+   }
+}
+
+
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+ossim_uint32
+ossimGeneralRasterTileSource::getNumberOfLines(ossim_uint32 reduced_res_level) const
+{
+   if (reduced_res_level == 0)
+   {
+      return m_rasterInfo.validLines();
+   }
+   else if (theOverview.valid())
+   {
+      return theOverview->getNumberOfLines(reduced_res_level);
+   }
+
+   return 0;
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+ossim_uint32 ossimGeneralRasterTileSource::getNumberOfSamples(
+   ossim_uint32 reduced_res_level) const
+{
+   if (reduced_res_level == 0)
+   {
+      return m_rasterInfo.validSamples();
+   }
+   else if (theOverview.valid())
+   {
+      return theOverview->getNumberOfSamples(reduced_res_level);
+   }
+
+   return 0;
+}
+
+double ossimGeneralRasterTileSource::getNullPixelValue(ossim_uint32 band) const
+{
+   return m_rasterInfo.getImageMetaData().getNullPix(band);
+}
+
+double ossimGeneralRasterTileSource::getMinPixelValue(ossim_uint32 band)const
+{
+   return m_rasterInfo.getImageMetaData().getMinPix(band);
+}
+
+double ossimGeneralRasterTileSource::getMaxPixelValue(ossim_uint32 band)const
+{
+   return m_rasterInfo.getImageMetaData().getMaxPix(band);
+}
+
+bool ossimGeneralRasterTileSource::open()
+{
+   static const char MODULE[] = "ossimGeneralRasterTileSource::open";
+
+   if (traceDebug()) CLOG << " Entered..." << std::endl;
+   
+   bool result = false;
+   
+   if(isOpen())
+   {
+      close();
+   }
+   
+   //---
+   // Find the header file:
+   //
+   // We need lines, samples, bands, scalar and interleave at a minimum:
+   // 
+   // A general raster image requires a keyword list to get essential image
+   // information or meta data as its sometimes called.  The meta data file
+   // can have four types of extensions: ".omd", ".hdr", ".kwl" and xml.
+   // Look for them in that order.
+   // Note that the ".omd" extension is for "Ossim Meta Data" and was made
+   // up to avoid conflicting with other software packages ".hdr" files.
+   //---
+   if ( m_rasterInfo.open( theImageFile ) )
+   {
+      theMetaData = m_rasterInfo.getImageMetaData();
+      
+      result = initializeHandler();
+      if ( result )
+      {
+         completeOpen();
+
+         if ( isBandSelector() && m_outputBandList.size() &&
+              ( isIdentityBandList( m_outputBandList ) == false ) )
+         {
+            // This does range checking and will pass to overview if open.
+            setOutputBandList( m_outputBandList );
+         }
+      }
+   }
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " Exit status: " << (result?"true":"false") << std::endl;
+   }
+   return result;
+}
+                                             
+bool ossimGeneralRasterTileSource::open( const ossimGeneralRasterInfo& info )
+{
+   if( isOpen() )
+   {
+      close();
+   }
+   
+   m_rasterInfo = info;
+
+   bool result = initializeHandler();
+
+   if ( result )
+   {
+      completeOpen();  
+
+      if ( isBandSelector() && m_outputBandList.size() &&
+           ( isIdentityBandList( m_outputBandList ) == false ) )
+      { 
+         // This does range checking and will pass to overview if open.
+         setOutputBandList( m_outputBandList );
+      }
+   }
+   
+   return result;
+}
+
+bool ossimGeneralRasterTileSource::initializeHandler()
+{
+   //---
+   // This private method assumes that "m_rasterInfo" object has been
+   // initialized.  Note that "close() should have already been called if
+   // there was an open file prior to this.
+   //---
+   std::vector<ossimFilename> aList = m_rasterInfo.getImageFileList();
+
+   for (ossim_uint32 i=0; i<aList.size(); ++i)
+   {
+      ossimFilename f = aList[i];
+      
+      // open it...
+      ossimRefPtr<ossimIFStream> is = ossimStreamFactoryRegistry::instance()->
+         createNewIFStream(f, std::ios::in|std::ios::binary);
+
+      // check the stream...
+      if(is.valid())
+      {
+         // Check the file stream.
+         if ( is->fail() )
+         {
+            theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimGeneralRasterTileSource::open" << " ERROR:\n"
+               << "Cannot open:  " << f.c_str() << std::endl;
+            is = 0;
+            return false;
+         }
+      }
+
+      // Check the file size (removed).
+
+      m_fileStrList.push_back(is); // Add it to the list...
+   }
+
+   if ((aList.size()==1) && theImageFile.empty())
+   {
+      theImageFile = aList[0];
+   }
+
+   // Set the buffer interleave type.
+   m_bufferInterleave = m_rasterInfo.interleaveType();
+   if (m_bufferInterleave == OSSIM_BSQ_MULTI_FILE)
+   {
+      m_bufferInterleave = OSSIM_BSQ;
+   }
+
+   if ( m_outputBandList.empty() )
+   {
+      // Set starting output band list to identity.
+      ossimImageSource::getOutputBandList( m_outputBandList );
+   }
+
+   //---
+   // Get the byte order of the image data and host machine.  If different,
+   // set the swap bytes flag...
+   //---
+   if (m_rasterInfo.getImageDataByteOrder() != ossim::byteOrder())
+   {
+      m_swapBytesFlag = true;
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimGeneralRasterTileSource::initializeHandler()" << " DEBUG:"
+         << "\nScalar type:  "
+         << ossimScalarTypeLut::instance()->
+         getEntryString(m_rasterInfo.getImageMetaData().getScalarType())
+         << "\nByte swapping is "
+         << (m_swapBytesFlag?"enabled.":"not enabled.")
+         // << "\nm_bufferSizeInPixels:  " << m_bufferSizeInPixels
+         // << "\nbuffer size:  " << buffer_size
+         << "\nRasterInfo:\n";
+      m_rasterInfo.print(ossimNotify(ossimNotifyLevel_DEBUG));
+   }
+   
+   return true;
+}
+
+bool ossimGeneralRasterTileSource::isOpen() const
+{
+   bool result = false;
+   if (m_fileStrList.size() > 0)
+   {
+      if(m_fileStrList[0].valid())
+      {
+         result = !(m_fileStrList[0]->fail());
+      }
+   }
+   return result;
+}
+
+void ossimGeneralRasterTileSource::close()
+{
+   ossimImageHandler::close();  // base class
+
+   m_tile = 0; // Not a leak, ref ptr.
+   
+   if ( m_buffer )
+   {
+      delete [] m_buffer;
+      m_buffer = 0;
+      m_bufferSizeInPixels = 0; // Must zero out for check in getTile method.
+   }
+
+   if ( m_lineBuffer )
+   {
+      delete [] m_lineBuffer;
+      m_lineBuffer = 0;
+   }
+
+   std::vector<ossimRefPtr<ossimIFStream> >::iterator is = m_fileStrList.begin();
+   while (is != m_fileStrList.end())
+   {
+      (*is)->close();
+      // delete (*is);
+      // (*is) = 0;
+      ++is;
+   }
+   m_fileStrList.clear();
+}
+
+ossim_uint32 ossimGeneralRasterTileSource::getImageTileWidth() const
+{
+   return 0;
+}
+
+ossim_uint32 ossimGeneralRasterTileSource::getImageTileHeight() const
+{
+   return 0;
+}
+
+ossimString ossimGeneralRasterTileSource::getShortName()const
+{
+   return ossimString("ossim_raster");
+}
+
+ossimString ossimGeneralRasterTileSource::getLongName()const
+{
+   return ossimString("general raster reader");
+}
+
+ossim_uint32 ossimGeneralRasterTileSource::getNumberOfInputBands() const
+{
+   return m_rasterInfo.getImageMetaData().getNumberOfBands();
+}
+
+ossim_uint32 ossimGeneralRasterTileSource::getNumberOfOutputBands() const
+{
+   ossim_uint32 result = 0;
+   if ( isBandSelector() && m_outputBandList.size() )
+   {
+      result = (ossim_uint32)m_outputBandList.size();
+   }
+   else
+   {
+      result = m_rasterInfo.getImageMetaData().getNumberOfBands();
+   }  
+   return result;
+}
+
+ossimKeywordlist ossimGeneralRasterTileSource::getHdrInfo(ossimFilename hdrFile)
+{
+   ossimKeywordlist kwl;
+   char delimeter = ' ';
+   kwl.change_delimiter(delimeter);
+   kwl.addFile(hdrFile);
+   kwl.downcaseKeywords();
+
+   ossimKeywordlist geoKwl;
+   ossim_uint32 lines = 0;
+   ossim_uint32 samples = 0;
+   ossim_float32 noData = -9999;
+   ossimString scalarType = "ossim_uint8";
+   ossim_int32 numBands = 1;
+   // ossim_int32 skipBytes = 0;
+   ossim_int32 numBits = -1; 
+   ossimString chPixelType = "N"; // not defined
+   ossimString interleaveType = "BIL";
+   ossimString byteOrder;
+   bool noDataFound = false;
+
+   const char* lookup = kwl.find("ncols");
+   if (lookup)
+   {
+      samples = ossimString(lookup).toUInt32();
+      geoKwl.add(ossimKeywordNames::NUMBER_SAMPLES_KW, samples);
+   }
+
+   lookup = kwl.find("nrows");
+   if (lookup)
+   {
+      lines = ossimString(lookup).toUInt32();
+      geoKwl.add(ossimKeywordNames::NUMBER_LINES_KW, lines);
+   }
+
+   // lookup = kwl.find("skipbytes");
+   // if (lookup)
+   // {
+   //    skipBytes = ossimString(lookup).toInt();
+   // }
+
+   lookup = kwl.find("nbands");
+   if (lookup)
+   {
+      numBands = ossimString(lookup).toInt();
+   }
+
+   lookup = kwl.find("nodata");
+   if (lookup)
+   {
+      noData = ossimString(lookup).toFloat32();
+      noDataFound = true;
+   }
+   lookup = kwl.find("nodata_value");
+   if (lookup)
+   {
+      noData = ossimString(lookup).toFloat32();
+      noDataFound = true;
+   }
+
+   lookup = kwl.find("nbits");
+   if (lookup)
+   {
+      numBits = ossimString(lookup).toInt();
+   }
+
+   lookup = kwl.find("pixeltype");
+   if (lookup)
+   {
+      chPixelType = ossimString(lookup);
+   }
+
+   lookup = kwl.find("layout");
+   if (lookup)
+   {
+      interleaveType = ossimString(lookup);
+   }
+
+   lookup = kwl.find("byteorder");
+   if (lookup)
+   {
+      byteOrder = ossimString(lookup);
+   }
+
+   if (numBits == -1)
+   {
+      FILE* fp;
+      ossim_int64 size = 0;
+      fp = fopen(theImageFile.c_str(), "r");
+      if (fp != 0)
+      {
+         fseek(fp, 0, SEEK_END);
+         size = ftell(fp);
+      }
+      fclose(fp);
+
+      if (lines > 0 && samples > 0)
+      {
+         ossim_int32 numBytes = size/samples/lines/numBands;
+         if( numBytes > 0 && numBytes != 3 )
+         {
+            numBits = numBytes*8;
+
+            if( numBytes == 4 )
+            {
+               chPixelType = "F";
+            }
+         }
+      }
+   }
+
+   if( numBits == 16 )
+   {
+      if (chPixelType == "S")
+      {
+         scalarType = "ossim_sint16";
+      }
+      else
+      {
+         scalarType = "ossim_uint16"; // default
+      }
+   }
+   else if( numBits == 32 )
+   {
+      if( chPixelType == "S")
+      {
+         scalarType = "ossim_sint32";
+      }
+      else if( chPixelType == "F")
+      {
+         scalarType = "ossim_float32";
+      }
+      else
+      {
+         scalarType = "ossim_uint32"; // default 
+      }
+   }
+   else if( numBits == 8 )
+   {
+      scalarType = "ossim_uint8";
+      numBits = 8;
+   }
+   else if( numBits < 8 && numBits >= 1 )
+   {
+      scalarType = "ossim_uint8";
+   }
+   else if(numBits == -1)
+   {
+      if( chPixelType == "F")
+      {
+         scalarType = "ossim_float32";
+         numBits = 32;
+      }
+      else
+      {
+         scalarType = "ossim_uint8";
+         numBits = 8;
+      }
+   }
+
+   if (noDataFound)
+   {
+      for (ossim_int32 i = 0; i < numBands; i++)
+      {
+         ossimString prefix = "band" + ossimString::toString(i+1) + ": ";
+         geoKwl.add(prefix, ossimKeywordNames::NULL_VALUE_KW, noData);
+      }
+   }
+
+   geoKwl.add(ossimKeywordNames::NUMBER_BANDS_KW, numBands);
+   geoKwl.add(ossimKeywordNames::SCALAR_TYPE_KW, scalarType);
+   geoKwl.add(ossimKeywordNames::INTERLEAVE_TYPE_KW, interleaveType);
+
+   return geoKwl;
+}
+
+ossimKeywordlist ossimGeneralRasterTileSource::getXmlInfo(ossimFilename xmlFile)
+{
+   ossimKeywordlist kwl;
+   ossimFgdcXmlDoc file;
+   if (file.open(xmlFile))
+   {
+
+      ossimString scalarType = "ossim_uint8";
+      ossim_int32 numBits = -1; 
+      ossimString interleaveType = "BIL";
+
+      ossimIpt size;
+      ossim_int32 samples = 0;
+      ossim_int32 lines = 0;
+      if (file.getImageSize(size))
+      {
+         samples = size.x;
+         lines = size.y;
+      }
+      if (samples > 0)
+      {
+         kwl.add(ossimKeywordNames::NUMBER_SAMPLES_KW, samples);
+      }
+      if (lines > 0)
+      {
+         kwl.add(ossimKeywordNames::NUMBER_LINES_KW, lines);
+      }
+
+      ossim_int32 bands = file.getNumberOfBands();
+      if (bands > 0)
+      {
+         kwl.add(ossimKeywordNames::NUMBER_BANDS_KW, bands);
+      }
+      else
+      {
+         if (samples > 0 && lines > 0)//if there is no bands info but samples and lines info, default number of bands to 1
+         {
+            bands = 1;
+            kwl.add(ossimKeywordNames::NUMBER_BANDS_KW, bands);
+         }
+      }
+
+      ossimString eainfo;
+      file.getPath("/metadata/eainfo/detailed/enttyp/enttypd", eainfo);
+
+      if (numBits == -1)
+      {
+         if ( (lines > 0) && (samples > 0) && (bands > 0) )
+         {
+            ossim_int64 size = theImageFile.fileSize();            
+            ossim_int32 numBytes = size/samples/lines/bands;
+            if( numBytes > 0 && numBytes != 3 )
+            {
+               numBits = numBytes*8;
+            }
+         }
+      }
+
+      if( numBits == 16 )
+      {
+         scalarType = "ossim_uint16"; // default
+      }
+      else if( numBits == 32 )
+      {
+         if(eainfo.contains("float"))
+         {
+            scalarType = "ossim_float32";
+         }
+         else
+         {
+            scalarType = "ossim_uint32"; // default 
+         }
+      }
+      else if( numBits == 8 )
+      {
+         scalarType = "ossim_uint8";
+         numBits = 8;
+      }
+      else if( numBits < 8 && numBits >= 1 )
+      {
+         scalarType = "ossim_uint8";
+      }
+
+      kwl.add(ossimKeywordNames::SCALAR_TYPE_KW, scalarType);
+      kwl.add(ossimKeywordNames::INTERLEAVE_TYPE_KW, interleaveType);
+   }
+   return kwl;
+}
+
+ossimRefPtr<ossimImageGeometry> ossimGeneralRasterTileSource::getImageGeometry()
+{
+   if ( !theGeometry.valid() )
+   {
+      // Check for external geom:
+      theGeometry = getExternalImageGeometry();
+
+      if ( !theGeometry.valid() )
+      {
+         theGeometry = new ossimImageGeometry();
+         
+         ossimString ext = theImageFile.ext();
+         ossimFilename hdrFile = theImageFile;
+         ossimFilename xmlFile = theImageFile;
+         hdrFile = hdrFile.setExtension("hdr");
+         xmlFile = xmlFile.setExtension("xml");
+         if (hdrFile.exists())
+         {
+            ossimKeywordlist geoKwl;
+            ossimKeywordlist kwl(hdrFile, ' ');
+            kwl.downcaseKeywords();
+            
+            ossim_uint32 lines = 0;
+            ossim_uint32 samples = 0;
+            ossim_float32 ll_lon = 0.0;
+            ossim_float32 ll_lat = 0.0;
+            ossim_float32 xCellSize = 1.0;
+            ossim_float32 yCellSize = 1.0;
+            
+            const char* lookup = kwl.find("ncols");
+            if (lookup)
+            {
+               samples = ossimString(lookup).toUInt32();
+               geoKwl.add(ossimKeywordNames::NUMBER_SAMPLES_KW, samples);
+            }
+            
+            lookup = kwl.find("nrows");
+            if (lookup)
+            {
+               lines = ossimString(lookup).toUInt32();
+               geoKwl.add(ossimKeywordNames::NUMBER_LINES_KW, lines);
+            }
+            
+            lookup = kwl.find("cellsize");
+            if (lookup)
+            {
+               xCellSize = ossimString(lookup).toFloat32();
+               yCellSize = xCellSize;
+               geoKwl.add(ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT, yCellSize);
+               geoKwl.add(ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON, xCellSize);
+            }
+            
+            lookup = kwl.find("xdim");
+            if (lookup)
+            {
+               xCellSize = ossimString(lookup).toFloat32();
+               geoKwl.add(ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON, xCellSize);
+            }
+            
+            lookup = kwl.find("ydim");
+            if (lookup)
+            {
+               yCellSize = ossimString(lookup).toFloat32();
+               geoKwl.add(ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT, yCellSize);
+            }
+            
+            lookup = kwl.find("xllcenter");
+            if (lookup)
+            {
+               ossim_float32 centerX = ossimString(lookup).toFloat32();
+               ll_lon = centerX + xCellSize * 0.5;
+               geoKwl.add(ossimKeywordNames::TIE_POINT_LON_KW, ll_lon);
+            }
+            
+            lookup = kwl.find("yllcenter");
+            if (lookup)
+            {
+               ossim_float32 centerY = ossimString(lookup).toFloat32();
+               ll_lat = (centerY + (lines - 1) * yCellSize) + yCellSize * 0.5;
+               geoKwl.add(ossimKeywordNames::TIE_POINT_LAT_KW, ll_lat);
+            }
+            
+            lookup = kwl.find("xllcorner");
+            if (lookup)
+            {
+               ll_lon = ossimString(lookup).toFloat32();
+               geoKwl.add(ossimKeywordNames::TIE_POINT_LON_KW, ll_lon);
+            }
+            
+            lookup = kwl.find("yllcorner");
+            if (lookup)
+            {
+               ossim_uint32 centerY = ossimString(lookup).toFloat32();
+               ll_lat = centerY + lines * yCellSize;
+               geoKwl.add(ossimKeywordNames::TIE_POINT_LAT_KW, ll_lat);
+            }
+            
+            lookup = kwl.find("ulxmap");
+            if (lookup)
+            {
+               ll_lon = ossimString(lookup).toFloat32();
+               geoKwl.add(ossimKeywordNames::TIE_POINT_LON_KW, ll_lon);
+            }
+            
+            lookup = kwl.find("ulymap");
+            if (lookup)
+            {
+               ossim_uint32 centerY = ossimString(lookup).toFloat32();
+               ll_lat = centerY + lines * yCellSize;
+               geoKwl.add(ossimKeywordNames::TIE_POINT_LAT_KW, ll_lat);
+            }
+            
+            kwl.add(ossimKeywordNames::ORIGIN_LATITUDE_KW, ll_lat);
+            
+            geoKwl.add(ossimKeywordNames::TYPE_KW, "ossimEquDistCylProjection");
+            
+            geoKwl.add(ossimKeywordNames::DATUM_KW, ossimDatumFactory::instance()->wgs84()->
+                       code());
+            
+            ossimRefPtr<ossimProjection> proj = ossimMapProjectionFactory::instance()->
+               createProjection(geoKwl);
+
+            if ( proj.valid() )
+            {
+               theGeometry->setProjection(proj.get());
+            }
+         }
+         else if (xmlFile.exists())
+         {
+            ossimFgdcXmlDoc file;
+            if ( file.open(xmlFile) )
+            {
+               ossimRefPtr<ossimProjection> proj = file.getProjection();
+               if ( !proj.valid() )
+               {
+                  proj = file.getGridCoordSysProjection();
+               }
+               if ( proj.valid() )
+               {
+                  theGeometry->setProjection(proj.get());
+               }
+            }
+            
+         } // xml file exist...
+
+      } // Matches second if ( !theGeometry.valid() )
+
+      //---
+      // WARNING:
+      // Must have theGeometry at this point or the next call to
+      // ossimImageGeometryRegistry::extendGeometry will put us in an infinite loop
+      // as it does a recursive call back to ossimImageHandler::getImageGeometry().
+      //---         
+      
+      // Check for set projection.
+      if ( !theGeometry->getProjection() )
+      {
+         // Try factories for projection.
+         ossimImageGeometryRegistry::instance()->extendGeometry(this);
+      }
+
+      // Set image things the geometry object should know about.
+      initImageParameters( theGeometry.get() );
+      
+   } // Matches first if ( !theGeometry.valid() )
+
+   return theGeometry;
+}
+
+bool ossimGeneralRasterTileSource::isBandSelector() const
+{
+   bool result = false;
+   if ( ( m_rasterInfo.interleaveType() == OSSIM_BSQ_MULTI_FILE ) ||
+        ( m_rasterInfo.interleaveType() == OSSIM_BIP ) ||
+        ( m_rasterInfo.interleaveType() == OSSIM_BIL ) )
+   {
+      result = true;
+   }
+
+   if ( result && theOverview.valid() )
+   {
+      result = theOverview->isBandSelector();
+   }   
+   return result;
+}
+
+bool ossimGeneralRasterTileSource::setOutputBandList(const std::vector<ossim_uint32>& band_list)
+{
+   bool result = false;
+   if ( isBandSelector() )
+   {
+      // Making a copy as passed in list could be our m_outputBandList.
+      std::vector<ossim_uint32> inputList = band_list;
+      result = ossimImageHandler::setOutputBandList( inputList, m_outputBandList );
+      if ( result && m_tile.valid() )
+      {
+         if ( m_tile->getNumberOfBands() != m_outputBandList.size() )
+         {
+            m_tile = 0; // Force a reinitialize on next getTile.
+         }
+      }
+   }
+   return result;
+}
+
+void ossimGeneralRasterTileSource::getOutputBandList(std::vector<ossim_uint32>& bandList) const
+{
+   bandList = m_outputBandList;
+}
+
+void ossimGeneralRasterTileSource::allocateTile()
+{
+   m_tile = 0;
+   ossim_uint32 bands = 0;
+   if ( m_outputBandList.empty() )
+   {
+      bands = m_rasterInfo.numberOfBands();
+   }
+   else
+   {
+      bands = (ossim_uint32)m_outputBandList.size();
+   }
+   
+   if ( bands )
+   {
+      m_tile = ossimImageDataFactory::instance()->create(
+         this, m_rasterInfo.getImageMetaData().getScalarType(), bands );
+      
+      if ( m_tile.valid() )
+      {
+         // These values can be overridden by loadState...
+         for(ossim_uint32 band = 0; band < bands; ++ band)
+         {
+            m_tile->setNullPix(m_rasterInfo.getImageMetaData().getNullPix(band), band);
+            m_tile->setMinPix(m_rasterInfo.getImageMetaData().getMinPix(band), band);
+            m_tile->setMaxPix(m_rasterInfo.getImageMetaData().getMaxPix(band), band);
+         }
+         m_tile->initialize(); // This does a makeBlank().
+      }
+   }
+}
+
+void ossimGeneralRasterTileSource::allocateBuffer( const ossimImageData* tile )
+{
+   if( m_buffer )
+   {
+      delete [] m_buffer;
+      m_buffer = 0;
+      m_bufferSizeInPixels = 0; // Must zero out for check in getTile method.
+   }
+   if ( m_lineBuffer )
+   {
+      delete [] m_lineBuffer;
+      m_lineBuffer = 0;
+   }
+   
+   if ( tile )
+   {
+      // Store the size of the buffer in pixels for swapping bytes.
+      m_bufferSizeInPixels = tile->getSize();
+      if ( m_bufferSizeInPixels )
+      {
+         // Initialize buffer. This is bytes, not pixels.
+         m_buffer = new ossim_uint8[ tile->getSizeInBytes() ];
+         
+         // Zero out the buffer rect.
+         m_bufferRect = ossimIrect(0, 0, 0, 0);
+      }
+
+      if ( m_rasterInfo.interleaveType() == OSSIM_BIP )
+      {
+         // Big enough to hold a whole line all bands.
+         ossim_uint32 widthInBytes =
+            tile->getWidth() * m_rasterInfo.getImageMetaData().getNumberOfBands() *
+            m_rasterInfo.getImageMetaData().getBytesPerPixel();
+         
+         m_lineBuffer = new ossim_uint8[ widthInBytes ];
+      }
+   }
+}
+
diff --git a/src/ossim/imaging/ossimGeneralRasterWriter.cpp b/ossim/src/ossim/imaging/ossimGeneralRasterWriter.cpp
similarity index 100%
rename from src/ossim/imaging/ossimGeneralRasterWriter.cpp
rename to ossim/src/ossim/imaging/ossimGeneralRasterWriter.cpp
diff --git a/ossim/src/ossim/imaging/ossimGeoAnnotationBitmap.cpp b/ossim/src/ossim/imaging/ossimGeoAnnotationBitmap.cpp
new file mode 100644
index 0000000..cc615fc
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimGeoAnnotationBitmap.cpp
@@ -0,0 +1,205 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimGeoAnnotationBitmap.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimGeoAnnotationBitmap.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/projection/ossimImageProjectionModel.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimIrect.h>
+
+RTTI_DEF1(ossimGeoAnnotationBitmap,
+          "ossimGeoAnnotationBitmap",
+          ossimGeoAnnotationObject)
+   
+ossimGeoAnnotationBitmap::ossimGeoAnnotationBitmap(
+   const ossimGpt& center,
+   ossimRefPtr<ossimImageData> imageData,
+   unsigned char r,
+   unsigned char g,
+   unsigned char b)
+   :ossimGeoAnnotationObject(r, g, b),
+    theCenterPoint(center),
+    theProjectedPoint(0,0),
+    theImageData(NULL)
+{
+   if(imageData.valid() &&
+      (imageData->getScalarType()==OSSIM_UCHAR))
+   {
+      theImageData = imageData;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimGeoAnnotationBitmap::ossimGeoAnnotationBitmap\n"
+         << "Invalid image data passed to ossimGeoAnnotationBitmap "
+         << "constructor" << endl;
+   }
+}
+
+ossimGeoAnnotationBitmap::ossimGeoAnnotationBitmap(
+   const ossimGeoAnnotationBitmap& rhs)
+   :
+   ossimGeoAnnotationObject(rhs),
+   theCenterPoint(rhs.theCenterPoint),
+   theProjectedPoint(rhs.theProjectedPoint),
+   theImageData(rhs.theImageData)
+{
+}
+
+ossimGeoAnnotationBitmap::~ossimGeoAnnotationBitmap()
+{
+}
+
+ossimObject* ossimGeoAnnotationBitmap::dup()const
+{
+   return new ossimGeoAnnotationBitmap(*this);
+}
+
+bool ossimGeoAnnotationBitmap::intersects(const ossimDrect& rect) const
+{
+   if(theImageData.valid())
+   {
+      return theImageData->getImageRectangle().intersects(rect);
+   }
+   
+   return false;
+}
+
+ossimGeoAnnotationBitmap* ossimGeoAnnotationBitmap::getNewClippedObject(
+   const ossimDrect& /* rect */)const
+{
+   ossimGeoAnnotationBitmap* result = (ossimGeoAnnotationBitmap*)dup();
+   
+   ossimNotify(ossimNotifyLevel_WARN)
+      << "ossimGeoAnnotationBitmap::getNewClippedObject WRNING: "
+      << "not implemented" << std::endl;
+   
+   return result;
+}
+
+void ossimGeoAnnotationBitmap::applyScale(double /* x */, double /* y */)
+{
+     ossimNotify(ossimNotifyLevel_WARN)
+      << "ossimGeoAnnotationBitmap::applyScale WRNING: not implemented"
+      << std::endl; 
+}
+
+
+std::ostream& ossimGeoAnnotationBitmap::print(std::ostream& out)const
+{
+   out << "center:    " << theCenterPoint << endl;
+   return out;
+}
+
+void ossimGeoAnnotationBitmap::draw(ossimRgbImage& anImage)const
+{
+   ossimRefPtr<ossimImageData> destination = anImage.getImageData();
+
+   if(!destination)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimGeoAnnotationBitmap::draw\n"
+         << "ERROR: can't draw annotation bitmap to NULL buffer" << endl;
+      
+      return;
+   }
+   ossimIrect destinationRect = destination->getImageRectangle();
+   ossimIrect srcRect         = theImageData->getImageRectangle();
+   if(!srcRect.intersects(destinationRect))
+   {
+      return;
+   }
+   ossimIrect clipRect        = srcRect.clipToRect(destinationRect);
+   
+   long clipHeight = (long)clipRect.height();
+   long clipWidth  = (long)clipRect.width();
+
+
+   if(clipRect.width() != 1.0 &&
+      clipRect.height() != 1.0)
+   {         
+      long destinationOffset   = (long)(((clipRect.ul().y - destinationRect.ul().y)* destinationRect.width()) +
+                                        (clipRect.ul().x - destinationRect.ul().x));
+      long srcOffset   = (long)(((clipRect.ul().y - srcRect.ul().y)*srcRect.width()) +
+                         (clipRect.ul().x - srcRect.ul().x));
+      long destinationIndex = destinationOffset;
+      long srcIndex         = srcOffset;
+      long num_bands        = destination->getNumberOfBands();
+      ossim_int32 s_width = (ossim_int32)srcRect.width();
+      ossim_int32 d_width = (ossim_int32)destinationRect.width();
+      
+      num_bands = num_bands > 3? 3:num_bands;
+      
+      const ossim_uint8* imageDataBuf = static_cast<const ossim_uint8*>(theImageData->getBuf());
+      unsigned char colorArray[3];
+      colorArray[0] = theRed;
+      colorArray[1] = theGreen;
+      colorArray[2] = theBlue;
+      for (long band=0; band<num_bands; ++band)
+      {
+         ossim_uint8* destinationBand = static_cast<ossim_uint8*>(destination->getBuf(band));
+         destinationIndex       = destinationOffset;
+         srcIndex               = srcOffset;
+         for(long line = 0; line < clipHeight; ++line)
+         {
+            for(long col = 0; col < clipWidth; ++col)
+            {
+               if(imageDataBuf[srcIndex + col])
+               {
+                  destinationBand[destinationIndex + col] = colorArray[band];
+               }
+            }
+            srcIndex += s_width;
+            destinationIndex += d_width;
+         }
+      } 
+   }
+}
+
+void ossimGeoAnnotationBitmap::getBoundingRect(ossimDrect& rect)const
+{
+   rect = ossimDrect(0,0,0,0);
+
+   if(theImageData.valid())
+   {
+      rect = theImageData->getImageRectangle();
+   }
+}
+
+void ossimGeoAnnotationBitmap::transform(ossimImageGeometry* projection)
+{
+   if(projection)
+   {
+      projection->worldToLocal(theCenterPoint, theProjectedPoint);
+      theProjectedPoint = ossimIpt(theProjectedPoint);
+      if(theImageData.valid())
+      {
+         ossimDpt origin(theProjectedPoint.x - theImageData->getWidth()/2.0,
+                         theProjectedPoint.y - theImageData->getHeight()/2.0);
+         
+         theImageData->setOrigin(origin);
+      }
+   }
+}
+
+void ossimGeoAnnotationBitmap::setImageData(
+   ossimRefPtr<ossimImageData>& imageData)
+{
+   theImageData = imageData;
+}
+
+void ossimGeoAnnotationBitmap::computeBoundingRect()
+{
+   // nothing to be done since we don't support
+   // rotated bitmaps yet.
+}
+
diff --git a/src/ossim/imaging/ossimGeoAnnotationEllipseObject.cpp b/ossim/src/ossim/imaging/ossimGeoAnnotationEllipseObject.cpp
similarity index 100%
rename from src/ossim/imaging/ossimGeoAnnotationEllipseObject.cpp
rename to ossim/src/ossim/imaging/ossimGeoAnnotationEllipseObject.cpp
diff --git a/src/ossim/imaging/ossimGeoAnnotationFontObject.cpp b/ossim/src/ossim/imaging/ossimGeoAnnotationFontObject.cpp
similarity index 100%
rename from src/ossim/imaging/ossimGeoAnnotationFontObject.cpp
rename to ossim/src/ossim/imaging/ossimGeoAnnotationFontObject.cpp
diff --git a/src/ossim/imaging/ossimGeoAnnotationGdBitmapFont.cpp b/ossim/src/ossim/imaging/ossimGeoAnnotationGdBitmapFont.cpp
similarity index 100%
rename from src/ossim/imaging/ossimGeoAnnotationGdBitmapFont.cpp
rename to ossim/src/ossim/imaging/ossimGeoAnnotationGdBitmapFont.cpp
diff --git a/src/ossim/imaging/ossimGeoAnnotationLineObject.cpp b/ossim/src/ossim/imaging/ossimGeoAnnotationLineObject.cpp
similarity index 100%
rename from src/ossim/imaging/ossimGeoAnnotationLineObject.cpp
rename to ossim/src/ossim/imaging/ossimGeoAnnotationLineObject.cpp
diff --git a/ossim/src/ossim/imaging/ossimGeoAnnotationMultiEllipseObject.cpp b/ossim/src/ossim/imaging/ossimGeoAnnotationMultiEllipseObject.cpp
new file mode 100644
index 0000000..e98325f
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimGeoAnnotationMultiEllipseObject.cpp
@@ -0,0 +1,181 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimGeoAnnotationMultiEllipseObject.cpp 23239 2015-04-08 01:02:44Z gpotts $
+
+#include <ossim/imaging/ossimGeoAnnotationMultiEllipseObject.h>
+#include <ossim/imaging/ossimAnnotationMultiEllipseObject.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/projection/ossimImageProjectionModel.h>
+#include <ossim/base/ossimException.h>
+
+ossimGeoAnnotationMultiEllipseObject::ossimGeoAnnotationMultiEllipseObject()
+   :ossimGeoAnnotationObject(),
+    theProjectedObject(new ossimAnnotationMultiEllipseObject()),
+    theWidthHeight(1,1),
+    theFillFlag(false)
+{
+   theProjectedObject->setFillFlag(false);
+}
+ossimGeoAnnotationMultiEllipseObject::~ossimGeoAnnotationMultiEllipseObject()
+{
+  if(theProjectedObject)
+  {
+    delete theProjectedObject;
+    theProjectedObject = 0;
+  }
+}
+ossimGeoAnnotationMultiEllipseObject::ossimGeoAnnotationMultiEllipseObject(const std::vector<ossimGpt>& pointList,
+                                                                           const ossimDpt& widthHeight,
+                                                                           bool enableFill,
+                                                                           unsigned char r,
+                                                                           unsigned char g,
+                                                                           unsigned char b,
+                                                                           long thickness)
+   :ossimGeoAnnotationObject(r, g, b, thickness),
+    theProjectedObject(new ossimAnnotationMultiEllipseObject(widthHeight,enableFill, r, g, b, thickness )),
+    thePointList(pointList),
+    theWidthHeight(widthHeight),
+    theFillFlag(enableFill)
+{
+   
+}
+
+ossimGeoAnnotationMultiEllipseObject::ossimGeoAnnotationMultiEllipseObject(const ossimDpt& widthHeight,
+                                                                           bool enableFill,
+                                                                           unsigned char r,
+                                                                           unsigned char g,
+                                                                           unsigned char b,
+                                                                           long thickness)
+   :ossimGeoAnnotationObject(r, g, b,thickness),
+    theProjectedObject(new ossimAnnotationMultiEllipseObject(widthHeight,enableFill, r, g, b, thickness )),
+    theWidthHeight(widthHeight),
+    theFillFlag(enableFill)
+{
+}
+
+ossimGeoAnnotationMultiEllipseObject::ossimGeoAnnotationMultiEllipseObject(const ossimGeoAnnotationMultiEllipseObject& rhs)
+   :ossimGeoAnnotationObject(rhs),
+    theProjectedObject((ossimAnnotationMultiEllipseObject*)rhs.theProjectedObject->dup()),
+    thePointList(rhs.thePointList),
+    theWidthHeight(rhs.theWidthHeight),
+    theFillFlag(rhs.theFillFlag)
+{
+}
+   
+void ossimGeoAnnotationMultiEllipseObject::transform(
+   ossimImageGeometry* projection)
+{
+   const std::vector<ossimGpt>::size_type BOUNDS = thePointList.size();
+   theProjectedObject->resize((ossim_uint32)BOUNDS);
+   for(std::vector<ossimGpt>::size_type i = 0; i < BOUNDS; ++i)
+   {
+      projection->worldToLocal(thePointList[(int)i], (*theProjectedObject)[(int)i]);
+      
+   }
+   computeBoundingRect();
+}
+
+void ossimGeoAnnotationMultiEllipseObject::setFillFlag(bool fillFlag)
+{
+   theProjectedObject->setFillFlag(fillFlag);
+   theFillFlag = fillFlag;
+}
+
+void ossimGeoAnnotationMultiEllipseObject::setColor(unsigned char r,
+                                                    unsigned char g,
+                                                    unsigned char b)
+{
+   ossimAnnotationObject::setColor(r,g,b);
+   if(theProjectedObject)
+   {
+      theProjectedObject->setColor(r,g,b);
+   }
+}
+
+void ossimGeoAnnotationMultiEllipseObject::setThickness(ossim_uint8 thickness)
+{
+   ossimAnnotationObject::setThickness(thickness);
+   if(theProjectedObject)
+   {
+      theProjectedObject->setThickness(thickness);
+   }
+}
+
+
+void ossimGeoAnnotationMultiEllipseObject::applyScale(double /* x */,
+                                                      double /* y */)
+{
+   ossimNotify(ossimNotifyLevel_NOTICE)
+      << "ossimGeoAnnotationMultiEllipseObject::applyScale NOT IMPLEMENTED"
+      << endl;
+}
+
+void ossimGeoAnnotationMultiEllipseObject::draw(ossimRgbImage& anImage)const
+{
+   theProjectedObject->draw(anImage); 
+}
+
+bool ossimGeoAnnotationMultiEllipseObject::intersects(const ossimDrect& rect)const
+{
+   return theProjectedObject->intersects(rect);
+}
+
+void ossimGeoAnnotationMultiEllipseObject::setWidthHeight(const ossimDpt& widthHeight)
+{
+   theWidthHeight = widthHeight;
+   theProjectedObject->setWidthHeight(widthHeight);
+}
+
+std::ostream& ossimGeoAnnotationMultiEllipseObject::print(std::ostream& out)const
+{
+   theProjectedObject->print(out);
+   return out;
+}
+
+void ossimGeoAnnotationMultiEllipseObject::getBoundingRect(ossimDrect& rect)const
+{
+   theProjectedObject->getBoundingRect(rect);
+}
+
+void ossimGeoAnnotationMultiEllipseObject::computeBoundingRect()
+{
+   theProjectedObject->computeBoundingRect();
+}
+
+ossimObject* ossimGeoAnnotationMultiEllipseObject::dup()const
+{
+   return new ossimGeoAnnotationMultiEllipseObject(*this);
+}
+
+ossimAnnotationObject* ossimGeoAnnotationMultiEllipseObject::getNewClippedObject(
+   const ossimDrect& /* rect */)const
+{
+   ossimNotify(ossimNotifyLevel_NOTICE)
+      << "ossimGeoAnnotationMultiEllipseObject::getNewClippedObject "
+      << "NOT IMPLEMENTED" << endl;
+   return (ossimAnnotationObject*)dup();
+}
+
+void ossimGeoAnnotationMultiEllipseObject::addPoint(const ossimGpt& point)
+{
+   thePointList.push_back(point);
+}
+
+void ossimGeoAnnotationMultiEllipseObject::setPoint(int i,
+                                                    const ossimGpt& point)
+{
+   thePointList[i] = point;
+}
+
+void ossimGeoAnnotationMultiEllipseObject::resize(ossim_uint32 newSize)
+{
+   if(newSize)
+   {
+      thePointList.resize(newSize);
+   }
+}
diff --git a/src/ossim/imaging/ossimGeoAnnotationMultiPolyLineObject.cpp b/ossim/src/ossim/imaging/ossimGeoAnnotationMultiPolyLineObject.cpp
similarity index 100%
rename from src/ossim/imaging/ossimGeoAnnotationMultiPolyLineObject.cpp
rename to ossim/src/ossim/imaging/ossimGeoAnnotationMultiPolyLineObject.cpp
diff --git a/src/ossim/imaging/ossimGeoAnnotationMultiPolyObject.cpp b/ossim/src/ossim/imaging/ossimGeoAnnotationMultiPolyObject.cpp
similarity index 100%
rename from src/ossim/imaging/ossimGeoAnnotationMultiPolyObject.cpp
rename to ossim/src/ossim/imaging/ossimGeoAnnotationMultiPolyObject.cpp
diff --git a/src/ossim/imaging/ossimGeoAnnotationObject.cpp b/ossim/src/ossim/imaging/ossimGeoAnnotationObject.cpp
similarity index 100%
rename from src/ossim/imaging/ossimGeoAnnotationObject.cpp
rename to ossim/src/ossim/imaging/ossimGeoAnnotationObject.cpp
diff --git a/src/ossim/imaging/ossimGeoAnnotationPolyLineObject.cpp b/ossim/src/ossim/imaging/ossimGeoAnnotationPolyLineObject.cpp
similarity index 100%
rename from src/ossim/imaging/ossimGeoAnnotationPolyLineObject.cpp
rename to ossim/src/ossim/imaging/ossimGeoAnnotationPolyLineObject.cpp
diff --git a/src/ossim/imaging/ossimGeoAnnotationPolyObject.cpp b/ossim/src/ossim/imaging/ossimGeoAnnotationPolyObject.cpp
similarity index 100%
rename from src/ossim/imaging/ossimGeoAnnotationPolyObject.cpp
rename to ossim/src/ossim/imaging/ossimGeoAnnotationPolyObject.cpp
diff --git a/src/ossim/imaging/ossimGeoAnnotationSource.cpp b/ossim/src/ossim/imaging/ossimGeoAnnotationSource.cpp
similarity index 100%
rename from src/ossim/imaging/ossimGeoAnnotationSource.cpp
rename to ossim/src/ossim/imaging/ossimGeoAnnotationSource.cpp
diff --git a/ossim/src/ossim/imaging/ossimGeoPolyCutter.cpp b/ossim/src/ossim/imaging/ossimGeoPolyCutter.cpp
new file mode 100644
index 0000000..0c53334
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimGeoPolyCutter.cpp
@@ -0,0 +1,375 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author: Garrett Potts (gpotts at imagelinks.com)
+//
+//*************************************************************************
+// $Id: ossimGeoPolyCutter.cpp 22303 2013-07-04 18:15:52Z dburken $
+
+#include <ossim/imaging/ossimGeoPolyCutter.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <algorithm>
+
+static const char* NUMBER_POLYGONS_KW = "number_polygons";
+
+RTTI_DEF2(ossimGeoPolyCutter, "ossimGeoPolyCutter", ossimPolyCutter, ossimViewInterface)
+
+ossimGeoPolyCutter::ossimGeoPolyCutter()
+   : ossimPolyCutter(),
+     ossimViewInterface(0),
+     m_viewGeometry(0),
+     m_geoPolygonList(0)
+{
+   ossimViewInterface::theObject = this;
+   m_geoPolygonList.push_back(ossimGeoPolygon());
+}
+
+ossimGeoPolyCutter::~ossimGeoPolyCutter()
+{
+}
+
+bool ossimGeoPolyCutter::saveState(ossimKeywordlist& kwl,
+                                   const char* prefix)const
+{
+    ossimString newPrefix = prefix;
+
+    for(int i = 0; i < (int)thePolygonList.size();++i)
+    {
+       newPrefix = ossimString(prefix) + "geo_polygon" + ossimString::toString(i)+".";
+
+       m_geoPolygonList[i].saveState(kwl, newPrefix.c_str());
+    }
+    kwl.add(prefix,
+            NUMBER_POLYGONS_KW,
+            static_cast<ossim_uint32>(m_geoPolygonList.size()),
+            true);
+   
+    ossimString fillType = "null_inside";
+    if(theCutType == OSSIM_POLY_NULL_OUTSIDE)
+    {
+       fillType = "null_outside";
+    }
+    kwl.add(prefix,
+            "cut_type",
+            fillType.c_str(),
+            true);   
+
+    if(m_viewGeometry.valid())
+    {
+       ossimString viewPrefix = prefix;
+       viewPrefix += "view.";
+
+       m_viewGeometry->saveState(kwl, viewPrefix.c_str());
+    }
+  
+   return ossimImageSourceFilter::saveState(kwl, prefix);;
+}
+
+bool ossimGeoPolyCutter::loadState(const ossimKeywordlist& kwl,
+                                const char* prefix)
+{
+   ossimString copyPrefix(prefix);
+   ossimString polygons =  ossimString("^(") + copyPrefix + "geo_polygon[0-9]+.)";
+   vector<ossimString> keys =
+      kwl.getSubstringKeyList( polygons );
+   int offset = (int)(copyPrefix+"geo_polygon").size();
+   
+   std::vector<int> numberList(keys.size());
+   for(int idx = 0; idx < (int)numberList.size();++idx)
+   {
+      ossimString numberStr(keys[idx].begin() + offset,
+                            keys[idx].end());
+      numberList[idx] = numberStr.toInt();
+   }
+   std::sort(numberList.begin(), numberList.end());
+   
+   ossimString newPrefix;
+   thePolygonList.clear();
+   for(int i = 0; i < (int)numberList.size();++i)
+   {
+      m_geoPolygonList.push_back(ossimGeoPolygon());
+      newPrefix = copyPrefix+"geo_polygon"+ossimString::toString(numberList[i])+".";
+      m_geoPolygonList[i].loadState(kwl, newPrefix.c_str());
+   }
+   
+   const char* lookup = kwl.find(prefix,
+                                 "cut_type");
+   if(lookup)
+   {
+      theCutType = OSSIM_POLY_NULL_INSIDE;
+      ossimString test = lookup;
+      if(test == "null_outside")
+      {
+         theCutType = OSSIM_POLY_NULL_OUTSIDE;
+      }
+   }
+   else
+   {
+      theCutType = OSSIM_POLY_NULL_OUTSIDE;
+   }
+
+   ossimString viewPrefix = prefix;
+   viewPrefix += "view.";
+   m_viewGeometry = new ossimImageGeometry();
+   if(m_viewGeometry->loadState(kwl,
+                                viewPrefix))
+   {
+      transformVertices();
+   }
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
+
+void ossimGeoPolyCutter::setPolygon(const vector<ossimDpt>& polygon,
+                                    ossim_uint32 index)
+{
+   if(m_viewGeometry.valid())
+   {
+      ossimPolyCutter::setPolygon(polygon);
+      invertPolygon(index);
+   }
+}
+
+void ossimGeoPolyCutter::setPolygon(const vector<ossimIpt>& polygon,
+                                    ossim_uint32 index)
+{
+   if(m_viewGeometry.valid())
+   {
+      ossimPolyCutter::setPolygon(polygon);
+      invertPolygon(index);
+   }
+}
+
+void ossimGeoPolyCutter::setPolygon(const vector<ossimGpt>& polygon,
+                                    ossim_uint32 i)
+{
+   if(i < m_geoPolygonList.size())
+   {
+      m_geoPolygonList[i] = polygon;
+
+      transformVertices(i);
+   }
+}
+
+void ossimGeoPolyCutter::setPolygon(const ossimGeoPolygon& polygon,
+                                    ossim_uint32 i)
+{
+   if(i < m_geoPolygonList.size())
+   {
+      m_geoPolygonList[i] = polygon.getVertexList();
+
+      transformVertices(i);
+   }
+}
+
+
+void ossimGeoPolyCutter::addPolygon(const vector<ossimGpt>& polygon)
+{
+   m_geoPolygonList.push_back(polygon);
+   thePolygonList.push_back(ossimPolygon());
+
+   if(m_viewGeometry.valid())
+   {
+      transformVertices(((int)m_geoPolygonList.size())-1);
+   }
+}
+
+void ossimGeoPolyCutter::addPolygon(const vector<ossimIpt>& polygon)
+{
+   if(m_viewGeometry.valid())
+   {
+      ossimPolyCutter::addPolygon(polygon);
+      m_geoPolygonList.push_back(ossimGeoPolygon());
+      invertPolygon((int)thePolygonList.size()-1);
+   }
+}
+
+void ossimGeoPolyCutter::addPolygon(const vector<ossimDpt>& polygon)
+{
+   if(m_viewGeometry.valid())
+   {
+      ossimPolyCutter::addPolygon(polygon);
+      m_geoPolygonList.push_back(ossimGeoPolygon());
+      invertPolygon((int)thePolygonList.size()-1);
+   }
+}
+
+void ossimGeoPolyCutter::addPolygon(const ossimPolygon& polygon)
+{
+   if(m_viewGeometry.valid())
+   {
+      ossimPolyCutter::addPolygon(polygon);
+      m_geoPolygonList.push_back(ossimGeoPolygon());
+      invertPolygon((int)thePolygonList.size()-1);
+   }
+}
+
+void ossimGeoPolyCutter::addPolygon(const ossimGeoPolygon& polygon)
+{
+   ossimPolyCutter::addPolygon(ossimPolygon());
+   m_geoPolygonList.push_back(polygon);
+   
+   if(m_viewGeometry.valid())
+   {
+      transformVertices(((int)m_geoPolygonList.size())-1);
+   }
+}
+
+void ossimGeoPolyCutter::setNumberOfPolygons(ossim_uint32 count)
+{
+   if(!count)
+   {
+      m_geoPolygonList.clear();
+   }
+   else
+   {
+      m_geoPolygonList.resize(count);
+   }
+   ossimPolyCutter::setNumberOfPolygons(count);
+}
+
+std::vector<ossimGeoPolygon>& ossimGeoPolyCutter::getGeoPolygonList()
+{
+   return m_geoPolygonList;
+}
+
+const std::vector<ossimGeoPolygon>& ossimGeoPolyCutter::getGeoPolygonList() const
+{
+   return m_geoPolygonList;
+}
+
+void ossimGeoPolyCutter::invertPolygon(int polygonNumber)
+{
+   if(!m_viewGeometry) return;
+   
+   
+   ossimPolygon& poly      = thePolygonList[polygonNumber];
+   ossimGeoPolygon& gpoly  = m_geoPolygonList[polygonNumber];
+   
+   gpoly.clear();
+   gpoly.resize(poly.getVertexCount());
+   int j = 0;
+   for(j = 0; j < (int)poly.getVertexCount(); ++j)
+   {
+      m_viewGeometry->localToWorld(poly[j], gpoly[j]);
+   }
+}
+
+bool ossimGeoPolyCutter::setView(ossimObject* baseObject)
+{
+   if ( baseObject )
+   {
+      ossimRefPtr<ossimImageGeometry> origGeom = m_viewGeometry;
+
+      ossimRefPtr<ossimImageGeometry> geom = dynamic_cast<ossimImageGeometry*>(baseObject);
+      if ( geom.valid() )
+      {
+         m_viewGeometry = geom;
+      }
+      else
+      {
+         ossimRefPtr<ossimProjection> proj = dynamic_cast<ossimProjection*>(baseObject);
+         if( proj.valid() )
+         {
+            m_viewGeometry = new ossimImageGeometry( 0, proj.get() );
+         }
+         else
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimGeoPolyCutter::setView WARNING: Invalid class type!"
+               << std::endl;
+         }
+      }
+      
+      if ( m_viewGeometry.valid() )
+      {
+         // If view changed transform points...
+         if ( !origGeom ||
+              ( m_viewGeometry->isEqualTo( *( (ossimObject*)(origGeom.get()) ) ) == false )
+              )
+         {
+            transformVertices();
+         }
+      }
+   }
+
+   return m_viewGeometry.valid();
+   
+} // End: ossimGeoPolyCutter::setView(ossimObject* baseObject)
+
+ossimObject* ossimGeoPolyCutter::getView()
+{
+   return m_viewGeometry.get();
+}
+
+const ossimObject* ossimGeoPolyCutter::getView()const
+{
+   return m_viewGeometry.get();
+}
+
+void ossimGeoPolyCutter::transformVertices()
+{
+   if( m_viewGeometry.valid() )
+   {
+      if( m_geoPolygonList.size() )
+      {
+         if(m_geoPolygonList.size() != thePolygonList.size())
+         {
+            thePolygonList.resize(m_geoPolygonList.size());
+         }
+         int i = 0;
+         int j = 0;
+         for(i = 0; i < (int)m_geoPolygonList.size(); ++i)
+         {
+            ossimGeoPolygon& gpoly = m_geoPolygonList[i];
+            ossimPolygon&    poly  = thePolygonList[i];
+            int nvert = (int)gpoly.size();
+            if((int)poly.getVertexCount() != nvert)
+            {
+               poly.resize(nvert);
+            }
+            for(j = 0; j < nvert; ++j)
+            {
+//	   ossimDpt error;
+               m_viewGeometry->worldToLocal(gpoly[j], poly[j]);
+//	    m_viewGeometry->getRoundTripError(ossimIpt(poly[j]), error);
+//	    poly[j] = poly[j] + error;
+               poly[j] = ossimDpt(ossim::round<int>(poly[j].x),
+                                  ossim::round<int>(poly[j].y));
+            }
+         }
+         computeBoundingRect();
+      }
+   }
+}
+
+void ossimGeoPolyCutter::transformVertices(int i)
+{
+   if( m_viewGeometry.valid() )
+   {
+      ossimGeoPolygon& gpoly = m_geoPolygonList[i];
+      ossimPolygon&    poly  = thePolygonList[i];
+      int nvert = (int)gpoly.size();
+      if((int)poly.getVertexCount() != nvert)
+      {
+         poly.resize(nvert);
+      }
+      int j = 0;
+      for(j = 0; j < nvert; ++j)
+      {
+//     ossimDpt error;
+         m_viewGeometry->worldToLocal(gpoly[j], poly[j]);
+//     m_viewGeometry->getRoundTripError(poly[j], error);
+//     poly[j] = poly[j] + error;
+         poly[j] = ossimDpt(ossim::round<int>(poly[j].x),
+                            ossim::round<int>(poly[j].y));
+      }
+      
+      computeBoundingRect();
+   }
+}
diff --git a/src/ossim/imaging/ossimGeographicAnnotationGrid.cpp b/ossim/src/ossim/imaging/ossimGeographicAnnotationGrid.cpp
similarity index 100%
rename from src/ossim/imaging/ossimGeographicAnnotationGrid.cpp
rename to ossim/src/ossim/imaging/ossimGeographicAnnotationGrid.cpp
diff --git a/src/ossim/imaging/ossimGeomFileWriter.cpp b/ossim/src/ossim/imaging/ossimGeomFileWriter.cpp
similarity index 100%
rename from src/ossim/imaging/ossimGeomFileWriter.cpp
rename to ossim/src/ossim/imaging/ossimGeomFileWriter.cpp
diff --git a/src/ossim/imaging/ossimGridRemapEngine.cpp b/ossim/src/ossim/imaging/ossimGridRemapEngine.cpp
similarity index 100%
rename from src/ossim/imaging/ossimGridRemapEngine.cpp
rename to ossim/src/ossim/imaging/ossimGridRemapEngine.cpp
diff --git a/ossim/src/ossim/imaging/ossimGridRemapEngineFactory.cpp b/ossim/src/ossim/imaging/ossimGridRemapEngineFactory.cpp
new file mode 100644
index 0000000..c56c8ca
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimGridRemapEngineFactory.cpp
@@ -0,0 +1,45 @@
+//*****************************************************************************
+// FILE: ossimGridRemapEngineFactory.cc
+//
+// Copyright (C) 2001 ImageLinks, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Contains implementation of class ossimGridRemapEngineFactory
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimGridRemapEngineFactory.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimGridRemapEngineFactory.h>
+#include <ossim/imaging/ossimHsvGridRemapEngine.h>
+#include <ossim/imaging/ossimRgbGridRemapEngine.h>
+#include <ossim/imaging/ossimMonoGridRemapEngine.h>
+
+//*****************************************************************************
+//  STATIC METHOD: ossimGridRemapEngineFactory::create()
+//  
+//*****************************************************************************
+ossimGridRemapEngine* ossimGridRemapEngineFactory::create(const char* s)
+{
+   if (!s)
+      return 0;
+   
+   if (strcmp(s, "ossimHsvGridRemapEngine") == 0)
+      return new ossimHsvGridRemapEngine;
+
+   else  if (strcmp(s, "ossimRgbGridRemapEngine") == 0)
+      return new ossimRgbGridRemapEngine;
+
+   else  if (strcmp(s, "ossimMonoGridRemapEngine") == 0)
+      return new ossimMonoGridRemapEngine;
+
+   return 0;
+}
+
+
diff --git a/src/ossim/imaging/ossimGridRemapSource.cpp b/ossim/src/ossim/imaging/ossimGridRemapSource.cpp
similarity index 100%
rename from src/ossim/imaging/ossimGridRemapSource.cpp
rename to ossim/src/ossim/imaging/ossimGridRemapSource.cpp
diff --git a/ossim/src/ossim/imaging/ossimHistoMatchRemapper.cpp b/ossim/src/ossim/imaging/ossimHistoMatchRemapper.cpp
new file mode 100644
index 0000000..530a23b
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimHistoMatchRemapper.cpp
@@ -0,0 +1,350 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimHistoMatchRemapper.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimHistoMatchRemapper.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimKeywordlist.h>
+
+ossimHistoMatchRemapper::ossimHistoMatchRemapper()
+   : ossimImageSourceFilter()
+{
+   theBlankTile = NULL;
+}
+
+ossimHistoMatchRemapper::ossimHistoMatchRemapper(ossimImageSource* inputSource,
+                                                 const vector<double>& targetMeanPerBand,
+                                                 const vector<double>& targetSigmaPerBand,
+                                                 const vector<double>& inputMeanPerBand,
+                                                 const vector<double>& inputSigmaPerBand)
+   : ossimImageSourceFilter(inputSource),
+     theTargetMeanPerBand(targetMeanPerBand),
+     theTargetSigmaPerBand(targetSigmaPerBand),
+     theInputMeanPerBand(inputMeanPerBand),
+     theInputSigmaPerBand(inputSigmaPerBand)
+{
+   theBlankTile = NULL;
+}
+
+
+ossimHistoMatchRemapper::~ossimHistoMatchRemapper()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimHistoMatchRemapper::getTile(
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   ossimRefPtr<ossimImageData> tile;
+   if(theInputConnection)
+   {
+      tile = theInputConnection->getTile(tileRect, resLevel);
+   }
+   if(!tile.valid())
+   {
+      return NULL;
+   }
+   if((tile.valid() &&
+       ((tile->getDataObjectStatus()==OSSIM_NULL) ||
+        (tile->getDataObjectStatus()==OSSIM_EMPTY))))
+      
+   {
+      return tile;
+   }
+
+   theBlankTile->setOrigin(tileRect.ul());
+   ossim_uint32 numberOfBands = (ossim_uint32)theInputMeanPerBand.size();
+
+   numberOfBands = numberOfBands>tile->getNumberOfBands()?tile->getNumberOfBands():numberOfBands;
+   double result = 0;
+   if(isSourceEnabled())
+   {
+      long offsetBound = (long)(tile->getWidth()*tile->getHeight());
+      if(tile->getScalarType() == OSSIM_UCHAR)
+      {
+         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
+         {
+            unsigned char* buf = static_cast<unsigned char*>(tile->getBuf(band));
+            for(long offset=0; offset < offsetBound;++offset)
+            {
+               // if the input has no deviation we will just
+               // do a shift to the target mean
+               if(fabs(theInputSigmaPerBand[band]) < FLT_EPSILON)
+               {
+                  result = transLean(buf[offset],
+                                     theInputMeanPerBand[band],
+                                     theTargetMeanPerBand[band],
+                                     0,
+                                     255);
+               }
+               else
+               {
+                  result = transLeanStretch(buf[offset],
+                                            theInputMeanPerBand[band],
+                                            theInputSigmaPerBand[band],
+                                            theTargetMeanPerBand[band],
+                                            theTargetSigmaPerBand[band],
+                                            0,
+                                            255);
+               }
+               result = ((result>255)?255:result);
+               result = ((result<0)?0:result);
+               
+               buf[offset] = (unsigned char)result;
+            }
+         }
+      }
+   }
+
+   return tile;
+}
+
+void ossimHistoMatchRemapper::initialize()
+{
+   if(!theInputConnection)
+   {
+      return;
+   }
+   theBlankTile = new ossimImageData(this,
+                                     theInputConnection->getOutputScalarType(),
+                                     theInputConnection->getNumberOfOutputBands());
+}
+
+const vector<double>& ossimHistoMatchRemapper::getInputMeanValues()const
+{
+   return theInputMeanPerBand;
+}
+
+const vector<double>& ossimHistoMatchRemapper::getInputSigmaValues()const
+{
+   return theInputSigmaPerBand;
+}
+
+const vector<double>& ossimHistoMatchRemapper::getTargetMeanValues()const
+{
+   return theTargetMeanPerBand;
+}
+
+const vector<double>& ossimHistoMatchRemapper::getTargetSigmaValues()const
+{
+   return theTargetSigmaPerBand;
+}
+
+void ossimHistoMatchRemapper::setInputMeanValues(const vector<double>& newValues)
+{
+   theInputMeanPerBand = newValues;
+}
+
+void ossimHistoMatchRemapper::setInputSigmaValues(const vector<double>& newValues)
+{
+   theInputSigmaPerBand = newValues;
+}
+
+void ossimHistoMatchRemapper::setTargetMeanValues(const vector<double>& newValues)
+{
+   theTargetMeanPerBand = newValues;
+}
+
+void ossimHistoMatchRemapper::setTargetSigmaValues(const vector<double>& newValues)
+{
+   theTargetSigmaPerBand = newValues;
+}
+
+double  ossimHistoMatchRemapper::transLean   // returns vOut
+(
+   double vIn         //!< input value to be transformed
+   , double vBias       //!< bias value to be removed
+   , double vTarget     //!< value that will replace bias
+   , double vMin        //!< minimum valid value of vIn (inclusive)
+   , double vMax        //!< maximum valid value of vIn (inclusive)
+)
+{
+   // max change
+   const double vDelta = vTarget - vBias;
+   double weight=0.0;
+   
+   // weight max change dependend on proximity to end points
+   if (vIn <= vBias)
+   {
+      weight = fabs((vIn - vMin) / (vBias - vMin));
+   }
+   else
+   {
+      weight = fabs((vMax - vIn) / (vMax - vBias));
+   }
+   return  (vIn + (vDelta * weight));
+};
+
+double  ossimHistoMatchRemapper::transLeanStretch   // returns vOut
+        (
+          double vIn              //!< input value to be transformed
+        , double vBias            //!< bias value to be removed
+        , double vBiasStretch     //!< dispersion (+/-) about vBias
+        , double vTarget          //!< value that will replace bias
+        , double vTargetStretch   //!< dispersion (+/-) about vTarget
+        , double vMin             //!< minimum valid value of vIn (inclusive)
+        , double vMax             //!< maximum valid value of vIn (inclusive)
+        )
+{
+
+        // line segment end points
+        const double x1 = vMin;
+        const double x2 = vBias - vBiasStretch;
+        const double x3 = vBias + vBiasStretch;
+        const double x4 = vMax;
+        const double y1 = 0.0;
+        const double y2 = (vTarget + vTargetStretch) - (vBias + vBiasStretch);
+        const double y3 = (vTarget - vTargetStretch) - (vBias - vBiasStretch);
+        const double y4 = 0.0;
+
+
+        // perform appropriate linear lookup operation based on input value
+        double vOut = vIn;
+        if (vIn <= x2)
+        {
+                vOut = (vIn - x1) * (y2-y1)/(x2-x1) + y1 + vIn;
+        }
+        else
+        if (vIn <= x3)
+        {
+                vOut = (vIn - x2) * (y3-y2)/(x3-x2) + y2 + vIn;
+        }
+        else
+        {
+                vOut = (vIn - x3) * (y4-y3)/(x4-x3) + y3 + vIn;
+        }
+        
+        return vOut;
+}
+
+bool ossimHistoMatchRemapper::loadState(const ossimKeywordlist& kwl,
+                                        const char* prefix)
+{
+   theTargetMeanPerBand.clear();
+   theTargetSigmaPerBand.clear();
+   theInputMeanPerBand.clear();
+   theInputSigmaPerBand.clear();
+   ossim_uint32 result = kwl.getNumberOfSubstringKeys(ossimString(prefix) + "target_mean[0-9]");
+   ossim_uint32 numberOfMatches=0;
+   ossim_uint32 index=0;
+
+   // load target mean
+   while(numberOfMatches < result)
+   {
+      ossimString key = prefix;
+      key += ossimString("target_mean");
+      key += ossimString::toString(index);
+      const char* lookup = kwl.find(key.c_str());
+      if(lookup)
+      {
+         theTargetMeanPerBand.push_back(ossimString(lookup).toDouble());
+         ++numberOfMatches;
+      }
+      ++index;
+   }
+   numberOfMatches = 0;
+   index = 0;
+   result = kwl.getNumberOfSubstringKeys(ossimString(prefix) + "target_sigma[0-9]");
+   // load target sigma
+   while(numberOfMatches < result)
+   {
+      ossimString key = prefix;
+      key += ossimString("target_sigma");
+      key += ossimString::toString(index);
+      const char* lookup = kwl.find(key.c_str());
+      if(lookup)
+      {
+         theTargetSigmaPerBand.push_back(ossimString(lookup).toDouble());
+         ++numberOfMatches;
+      }
+      ++index;
+   }
+
+   numberOfMatches = 0;
+   index = 0;
+   result = kwl.getNumberOfSubstringKeys(ossimString(prefix) + "input_mean[0-9]");
+   // load input mean
+   while(numberOfMatches < result)
+   {
+      ossimString key = prefix;
+      key += ossimString("input_mean");
+      key += ossimString::toString(index);
+      const char* lookup = kwl.find(key.c_str());
+      if(lookup)
+      {
+         theInputMeanPerBand.push_back(ossimString(lookup).toDouble());
+         ++numberOfMatches;
+      }
+      ++index;
+   }
+   
+   numberOfMatches = 0;
+   index = 0;
+   result = kwl.getNumberOfSubstringKeys(ossimString(prefix) + "input_sigma[0-9]");
+   // load input sigma
+   while(numberOfMatches < result)
+   {
+      ossimString key = prefix;
+      key += ossimString("input_sigma");
+      key += ossimString::toString(index);
+      const char* lookup = kwl.find(key.c_str());
+      if(lookup)
+      {
+         theInputSigmaPerBand.push_back(ossimString(lookup).toDouble());
+         ++numberOfMatches;
+      }
+      ++index;
+   }
+   
+   return true;
+}
+
+bool ossimHistoMatchRemapper::saveState(ossimKeywordlist& kwl,
+                                        const char* prefix)
+{
+   ossim_uint32 index = 1;
+   for(index=1;index <= theTargetMeanPerBand.size();++index)
+   {
+      ossimString key = ossimString("target_mean") + ossimString::toString(index);
+      kwl.add(prefix,
+              key.c_str(),
+              theTargetMeanPerBand[index-1],
+              true);
+   }
+   for(index=1;index <= theTargetSigmaPerBand.size();++index)
+   {
+      ossimString key = ossimString("target_sigma") + ossimString::toString(index);
+      kwl.add(prefix,
+              key.c_str(),
+              theTargetSigmaPerBand[index-1],
+              true);
+   }
+   for(index=1;index <= theInputMeanPerBand.size();++index)
+   {
+      ossimString key = ossimString("input_mean") + ossimString::toString(index);
+      kwl.add(prefix,
+              key.c_str(),
+              theInputMeanPerBand[index-1],
+              true);
+   }
+   for(index=1;index <= theInputSigmaPerBand.size();++index)
+   {
+      ossimString key = ossimString("input_sigma") + ossimString::toString(index);
+      kwl.add(prefix,
+              key.c_str(),
+              theInputSigmaPerBand[index-1],
+              true);
+   }
+   return true;  
+}
+                       
+
diff --git a/ossim/src/ossim/imaging/ossimHistogramEqualization.cpp b/ossim/src/ossim/imaging/ossimHistogramEqualization.cpp
new file mode 100644
index 0000000..5413613
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimHistogramEqualization.cpp
@@ -0,0 +1,539 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimHistogramEqualization.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimHistogramEqualization.h>
+#include <ossim/base/ossimMultiResLevelHistogram.h>
+#include <ossim/base/ossimMultiBandHistogram.h>
+#include <ossim/base/ossimHistogram.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimKeyword.h>
+
+RTTI_DEF1(ossimHistogramEqualization, "ossimHistogramEqualization", ossimImageSourceHistogramFilter)
+   
+static const ossimKeyword HISTOGRAM_INVERSE_FLAG_KW("inverse_flag",
+                                                    "specifies whether the inverse should be done for the getTile");
+
+static ossimTrace traceDebug("ossimHistogramEqualization:debug");
+
+ossimHistogramEqualization::ossimHistogramEqualization()
+   : ossimImageSourceHistogramFilter(),
+     theTile(NULL),
+     theAccumulationHistogram(NULL),
+     theInverseFlag(false)
+{
+}
+
+ossimHistogramEqualization::ossimHistogramEqualization(ossimImageSource* inputSource,
+                                                       ossimRefPtr<ossimMultiResLevelHistogram> histogram)
+   : ossimImageSourceHistogramFilter(inputSource, histogram),
+     theTile(0),
+     theAccumulationHistogram(0),
+     theInverseFlag(false)
+{
+   if(getHistogram().valid())
+   {
+      theAccumulationHistogram = getHistogram()->createAccumulationLessThanEqual();
+      initializeLuts();
+   }
+}
+
+ossimHistogramEqualization::ossimHistogramEqualization(ossimImageSource* inputSource,
+                                                       ossimRefPtr<ossimMultiResLevelHistogram> histogram,
+                                                       bool inverseFlag)
+   : ossimImageSourceHistogramFilter(inputSource, histogram),
+     theTile(NULL),
+     theAccumulationHistogram(0),
+     theInverseFlag(inverseFlag)
+{
+   if(getHistogram().valid())
+   {
+      theAccumulationHistogram = getHistogram()->createAccumulationLessThanEqual();
+      initializeLuts();
+   }
+}
+
+ossimHistogramEqualization::~ossimHistogramEqualization()
+{
+   deleteLuts();
+}
+
+ossimRefPtr<ossimImageData> ossimHistogramEqualization::getTile(
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   if(!theInputConnection)
+   {
+      return NULL;
+   }
+   
+   ossimRefPtr<ossimImageData> inputTile = theInputConnection->getTile(tileRect,
+                                                                       resLevel);
+
+   if(!inputTile.valid()) return inputTile;
+   
+   if (!isSourceEnabled())
+   {
+      return inputTile;
+   }
+   
+   if(!theTile.valid())
+   {
+      allocate(); // First time through...
+   }
+   
+   // if (!theTile) throw exception!
+   
+   // Set the origin, resize if needed of the output tile.
+   theTile->setImageRectangleAndBands(inputTile->getImageRectangle(),
+				      inputTile->getNumberOfBands());
+   
+   if( !inputTile.valid() ||
+       inputTile->getDataObjectStatus() == OSSIM_NULL ||
+       inputTile->getDataObjectStatus() == OSSIM_EMPTY )
+   {
+      return theTile;
+   }
+
+   if(!theAccumulationHistogram)
+   {
+      computeAccumulationHistogram();
+   }
+   if(theForwardLut.size() == 0 ||
+      theInverseLut.size() == 0)
+   {
+      initializeLuts();
+   }
+   if((theForwardLut.size() == 0) ||
+      (theInverseLut.size() == 0))
+   {
+      return inputTile;
+   }
+   
+   switch(inputTile->getScalarType())
+   {
+      case OSSIM_UCHAR:
+      {
+         return runEqualizationAlgorithm(static_cast<ossim_uint8>(0),
+                                         inputTile);
+      }
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+      {
+         return runEqualizationAlgorithm(static_cast<ossim_uint16>(0),
+                                         inputTile);
+      }
+      case OSSIM_SINT16:
+      {
+         return runEqualizationAlgorithm(static_cast<ossim_sint16>(0),
+                                         inputTile);
+      }
+      case OSSIM_UINT32:
+      {
+         return runEqualizationAlgorithm(static_cast<ossim_uint32>(0),
+                                         inputTile);
+      }
+      case OSSIM_SINT32:
+      {
+         return runEqualizationAlgorithm(static_cast<ossim_sint32>(0),
+                                         inputTile);
+      }
+      case OSSIM_FLOAT32:
+      {
+         return runEqualizationAlgorithm(static_cast<ossim_float32>(0),
+                                         inputTile);
+      }
+      case OSSIM_FLOAT64:
+      {
+         return runEqualizationAlgorithm(static_cast<ossim_float64>(0),
+                                         inputTile);
+      }
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimHistogramEqualization::getTile WARNING: Unsupported scalar type."
+            << endl;
+         break;
+      }
+   }
+   
+   return inputTile;
+}
+
+void ossimHistogramEqualization::setHistogram(ossimRefPtr<ossimMultiResLevelHistogram> histogram)
+{
+   ossimImageSourceHistogramFilter::setHistogram(histogram);
+   computeAccumulationHistogram();
+   initializeLuts();
+}
+
+bool ossimHistogramEqualization::saveState(ossimKeywordlist& kwl,
+                                           const char* prefix)const
+{
+   bool result = ossimImageSourceHistogramFilter::saveState(kwl, prefix);
+
+   kwl.add(prefix,
+           HISTOGRAM_INVERSE_FLAG_KW,
+           theInverseFlag,
+           true);
+   
+   return result;
+}
+
+bool ossimHistogramEqualization::loadState(const ossimKeywordlist& kwl,
+                                           const char* prefix)
+{
+   static const char MODULE[] = "ossimHistogramEqualization::loadState";
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << " Entered..."
+         << "\nprefix:  " << prefix << endl;
+   }
+
+   const char* lookup = kwl.find(prefix,
+                                 HISTOGRAM_INVERSE_FLAG_KW);
+   if(lookup)
+   {
+      theInverseFlag = ossimString(lookup).toBool();
+   }
+   if(ossimImageSourceHistogramFilter::loadState(kwl, prefix))
+   {
+//      computeAccumulationHistogram();
+//      initializeLuts();
+   }
+   else
+   {
+      return false;
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:" << MODULE;
+      this->print(ossimNotify(ossimNotifyLevel_DEBUG));
+      ossimNotify(ossimNotifyLevel_DEBUG) << "\nExited..." << endl;
+   }
+   
+   return true;
+}
+
+void ossimHistogramEqualization::computeAccumulationHistogram()
+{
+   if(getHistogram().valid())
+   {
+      theAccumulationHistogram = getHistogram()->createAccumulationLessThanEqual();
+   }
+}
+
+template <class T>
+ossimRefPtr<ossimImageData> ossimHistogramEqualization::runEqualizationAlgorithm(T, ossimRefPtr<ossimImageData> tile)
+{
+   
+   if(!theAccumulationHistogram ||
+      !getHistogram())
+   {
+      return tile;
+   }
+
+   // for now we will always pull from res 0 information
+   ossimRefPtr<ossimMultiBandHistogram> histo = getHistogram()->getMultiBandHistogram(0);
+
+   if(histo.valid())
+   {
+      ossim_uint32 maxBands = ( (histo->getNumberOfBands() >
+                                 tile->getNumberOfBands())?
+                                tile->getNumberOfBands():
+                                histo->getNumberOfBands());
+      
+      long offsetUpperBound = tile->getHeight()*tile->getWidth();
+
+      for(ossim_uint32 band = 0; band < maxBands; ++band)
+      {
+         ossimRefPtr<ossimHistogram> bandHisto = histo->getHistogram(band);
+         T* buf = static_cast<T*>(tile->getBuf(band));
+         double *histoLut = band<theForwardLut.size()?theForwardLut[band]:NULL;
+         ossim_uint32 actualBand = theBandList[band];
+         if(bandHisto.valid())
+         {
+            if(buf&&histoLut&&(actualBand <  histo->getNumberOfBands()))
+            {
+               if(theInverseFlag)
+               {
+                  histoLut = theInverseLut[actualBand];
+               }
+               if(histoLut)
+               {
+                  if(tile->getDataObjectStatus() == OSSIM_FULL)
+                  {
+                     T minPix = (T)tile->getMinPix(actualBand);
+                     T maxPix = (T)tile->getMaxPix(actualBand);
+                     for(long offset = 0; offset < offsetUpperBound; ++offset)
+                     {
+                        ossim_int32 idx = bandHisto->GetIndex(buf[offset]);
+                           
+                        if(idx>=0)
+                        {
+                           T value = (T)(histoLut[idx]);
+
+                           //---
+                           // Assign clamping to min max.
+                           // 
+                           // ESH 03/2009 -- Clamping to within min-max fixed
+                           //--- 
+                           buf[offset] = value < minPix ? minPix :
+                              (value > maxPix ? maxPix : value);
+                        }
+                     }
+                  }
+                  else
+                  {
+                     T minPix  = (T)tile->getMinPix(actualBand);
+                     T maxPix  = (T)tile->getMaxPix(actualBand);
+                     T nullPix = (T)tile->getNullPix(actualBand);
+                     for(long offset = 0; offset < offsetUpperBound; ++offset)
+                     {
+                        ossim_int32 idx = bandHisto->GetIndex(buf[offset]);
+                        
+                        if((buf[offset]!=nullPix)&&(idx>=0))
+                        {
+                           T value = (T)(histoLut[idx]);
+
+                           //---
+                           // Assign clamping to min max.
+                           // 
+                           // ESH 03/2009 -- Clamping to within min-max fixed
+                           //--- 
+                           buf[offset] = value < minPix ? minPix :
+                              (value > maxPix ? maxPix : value);
+                        }
+                        else
+                        {
+                           buf[offset] = nullPix;
+                        }
+                     }
+                  }
+               }
+            }
+         }
+      }
+      
+      tile->validate();
+   }
+   
+   return tile;
+}
+
+void ossimHistogramEqualization::initialize()
+{
+   // Base class will recapture "theInputConnection".
+   ossimImageSourceHistogramFilter::initialize();
+   if(theTile.valid())
+   {
+      theTile = NULL;
+   }
+}
+
+void ossimHistogramEqualization::allocate()
+{
+   theBandList.clear();
+   
+   if(theTile.valid())
+   {
+      theTile = NULL;
+   }
+   
+   if(theInputConnection)
+   {
+      theInputConnection->getOutputBandList(theBandList);
+      theTile = ossimImageDataFactory::instance()->create(this, this);
+      if(theTile.valid())
+      {
+         theTile->initialize();
+      }
+   }
+}
+
+void ossimHistogramEqualization::initializeLuts()
+{
+   if(theForwardLut.size() != 0 ||
+      theInverseLut.size() != 0)
+   {
+      deleteLuts();
+   }
+   if(!theAccumulationHistogram||!getHistogram())
+   {
+      return;
+   }
+   ossimRefPtr<ossimMultiBandHistogram> accumHisto = theAccumulationHistogram->getMultiBandHistogram(0);
+   ossimRefPtr<ossimMultiBandHistogram> histogram  = getHistogram()->getMultiBandHistogram(0);
+   ossimKeywordlist kwl;
+   theAccumulationHistogram->saveState(kwl);
+
+   if(accumHisto.valid()&&histogram.valid())
+   {
+      long maxBands = accumHisto->getNumberOfBands();
+      
+      for(long band = 0; band < maxBands; ++band)
+      {
+         // first we grab pointers to the histogram and the accumulation
+         // histogram
+         ossimRefPtr<ossimHistogram> h  = accumHisto->getHistogram(band);
+         ossimRefPtr<ossimHistogram> h2 = histogram->getHistogram(band);
+
+         if(h.valid()&&h2.valid())
+         {
+            // lets get the number of indices.
+            ossim_uint32 numberOfIndices = (ossim_uint32)h2->GetRes();
+            vector<double> countForInverse(numberOfIndices);
+            
+            theForwardLut.push_back(new double[numberOfIndices]);
+            theInverseLut.push_back(new double[numberOfIndices]);
+            
+            // let's grab the counts array
+            const float* histoCounts = h->GetCounts();
+
+//         double maxIntensity      = h2->GetMaxVal();
+            double maxIntensity      = h2->GetRangeMax();
+            double maxCount          = h->GetMaxCount();
+            
+            // now pre compute the transforms
+            double *forwardLut = theForwardLut[band];
+            double *inverseLut = theInverseLut[band];
+            
+//         double minIntensity  = h2->GetMinVal();
+            double minIntensity  = h2->GetRangeMin();
+            double delta = maxIntensity-minIntensity;
+            ossim_uint32 idx = 0;
+            
+            // clear out the inverse
+            //
+            for(idx = 0; idx < numberOfIndices; ++ idx)
+            {
+               inverseLut[idx] = ossim::nan();
+            }
+            for(idx = 0; idx < numberOfIndices; ++ idx)
+            {
+               forwardLut[idx]   = minIntensity + (histoCounts[idx]/maxCount)*delta;
+               
+               ossim_int32 inverseIdx = h2->GetIndex(forwardLut[idx]);
+               if(inverseIdx >= 0)
+               {
+                  inverseLut[inverseIdx]   = minIntensity + delta*(idx/(ossim_float32)numberOfIndices);
+               }
+            }
+            
+            // now solve the inverse lut
+            //
+            ossim_uint32 idxStart = 0;
+            ossim_uint32 idxEnd = 0;
+            
+            while((ossim::isnan(inverseLut[idxEnd]))&&(idxEnd <numberOfIndices)){ ++idxEnd;}
+            if((idxStart!=idxEnd)&&(idxEnd<numberOfIndices))
+            {
+               std::fill(inverseLut,
+                         inverseLut+idxEnd,
+                         inverseLut[idxEnd]);
+            }
+            idxStart = numberOfIndices-1;
+            while((ossim::isnan(inverseLut[idxStart]))&&(idxStart > 0)){ --idxStart;}
+            if(idxStart !=0)
+            {
+               std::fill(inverseLut+idxStart,
+                         inverseLut+numberOfIndices,
+                         inverseLut[idxStart]);
+            }
+            
+            idxStart = 0;
+            idxEnd   = 0;
+            ossim_float32 valueStart = 0.0;
+            ossim_float32 valueEnd = 0.0;
+            
+            while(idxStart < numberOfIndices)
+            {
+               idxEnd = idxStart;
+               if(ossim::isnan(inverseLut[idxStart]))
+               {
+                  while(ossim::isnan(inverseLut[idxEnd])&&(idxEnd < (numberOfIndices-1))) ++idxEnd;
+                  double length = (idxEnd-idxStart)+1;
+                  valueEnd = inverseLut[idxEnd];
+                  double deltaVal = (valueEnd-valueStart);
+                  ossim_uint32 tempIdx = idxStart;
+                  ossim_float32 count = 1.0;
+                  double t = 0.0;
+                  while(tempIdx < idxEnd)
+                  {
+                     t = (count/length);
+                     t = t>1.0?1.0:t;
+                     inverseLut[tempIdx] = valueStart + deltaVal*t;
+                     ++count;
+                     ++tempIdx;
+                  }
+                  idxStart = idxEnd;
+                  valueStart = valueEnd;
+               }
+               else
+               {
+                  valueStart = inverseLut[idxStart];
+                  ++idxStart;
+               }
+            }
+         }
+      }
+   }
+}
+
+bool ossimHistogramEqualization::setHistogram(const ossimFilename& filename)
+{
+   return ossimImageSourceHistogramFilter::setHistogram(filename);
+}
+
+bool ossimHistogramEqualization::getInverseFlag()const
+{
+   return theInverseFlag;
+}
+
+void ossimHistogramEqualization::setInverseFlag(bool inverseFlag)
+{
+   theInverseFlag = inverseFlag;
+}
+
+void ossimHistogramEqualization::deleteLuts()
+{
+   long band = 0;
+   
+   for(band = 0; band < (long)theForwardLut.size(); ++band)
+   {
+      delete [] theForwardLut[band];
+   }
+   theForwardLut.clear();
+   
+   for(band = 0; band < (long)theInverseLut.size(); ++band)
+   {
+      delete [] theInverseLut[band];      
+   }
+   
+   theInverseLut.clear();
+}
+
+const ossimFilename& ossimImageSourceHistogramFilter::getHistogramFilename() const
+{
+   return theFilename;
+}
+
+std::ostream& ossimHistogramEqualization::print(std::ostream& out) const
+{
+   // Base class...
+   return ossimImageSourceHistogramFilter::print(out);
+}
+
diff --git a/src/ossim/imaging/ossimHistogramMatchFilter.cpp b/ossim/src/ossim/imaging/ossimHistogramMatchFilter.cpp
similarity index 100%
rename from src/ossim/imaging/ossimHistogramMatchFilter.cpp
rename to ossim/src/ossim/imaging/ossimHistogramMatchFilter.cpp
diff --git a/ossim/src/ossim/imaging/ossimHistogramRemapper.cpp b/ossim/src/ossim/imaging/ossimHistogramRemapper.cpp
new file mode 100644
index 0000000..6b33e62
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimHistogramRemapper.cpp
@@ -0,0 +1,2065 @@
+//*******************************************************************
+// 
+// See top level LICENSE.txt file.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Histogram remapper class declaration.  Derived from ossimTableRemapper.
+//
+// Remaps a tile based on mode and histogram clip points.
+//
+//*************************************************************************
+// $Id: ossimHistogramRemapper.cpp 23182 2015-03-09 14:30:52Z okramer $
+
+#include <ossim/imaging/ossimHistogramRemapper.h>
+#include <ossim/base/ossimMultiResLevelHistogram.h>
+#include <ossim/base/ossimMultiBandHistogram.h>
+#include <ossim/base/ossimHistogram.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimHistogramSource.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <cstdlib>
+#include <iomanip>
+
+RTTI_DEF1(ossimHistogramRemapper, "ossimHistogramRemapper", ossimTableRemapper)
+
+static ossimTrace traceDebug("ossimHistogramRemapper:debug");
+
+static const char* STRETCH_MODE[] = { "linear_one_piece",
+                                      "linear_1std_from_mean",
+                                      "linear_2std_from_mean",
+                                      "linear_3std_from_mean",
+                                      "linear_auto_min_max",
+                                      "stretch_unknown" };
+
+static const char NORMALIZED_LOW_CLIP_POINT_KW[] = "normalized_low_clip_point";
+static const char NORMALIZED_HIGH_CLIP_POINT_KW[]="normalized_high_clip_point";
+static const char MID_POINT_KW[] = "mid_point";
+static const char MIN_OUTPUT_VALUE_KW[] = "min_output_value";
+static const char MAX_OUTPUT_VALUE_KW[] = "max_output_value";
+static const char STRETCH_MODE_KW[] = "stretch_mode";
+static const char HISTOGRAM_FILENAME_KW[] = "histogram_filename";
+
+#ifdef OSSIM_ID_ENABLED
+static const char OSSIM_ID[] = "$Id: ossimHistogramRemapper.cpp 23182 2015-03-09 14:30:52Z okramer $";
+#endif
+
+ossimHistogramRemapper::ossimHistogramRemapper()
+   :
+   ossimTableRemapper(),  // base class
+   theStretchMode(ossimHistogramRemapper::LINEAR_ONE_PIECE),
+   theDirtyFlag(false),
+   theHistogram(0),
+   theNormalizedLowClipPoint(),
+   theNormalizedHighClipPoint(),
+   theMidPoint(),
+   theMinOutputValue(),
+   theMaxOutputValue(),
+   theBandList(),
+   theBypassFlag(true),
+   theResetBandIndicesFlag(false)
+{
+   setNumberOfInputs(2);
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimHistogramRemapper::ossimHistogramRemapper entered...\n";
+#ifdef OSSIM_ID_ENABLED
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "OSSIM_ID:  " << OSSIM_ID << "\n";
+#endif      
+   }
+}
+
+ossimHistogramRemapper::~ossimHistogramRemapper()
+{
+}
+
+void ossimHistogramRemapper::initialize()
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimHistogramRemapper::initialize entered..." << endl;
+   }
+
+   theResetBandIndicesFlag=(dynamic_cast<const ossimHistogramSource*>(getInput(1))!=0);
+
+   //---
+   // Call the base class initialize.
+   // Note:  This will reset "theInputConnection" if it changed...
+   //---
+   ossimTableRemapper::initialize();
+	
+   // Check the band list to see if it's changes.
+   vector<ossim_uint32> bandList;
+   getOutputBandList(bandList);
+   ossim_uint32 idx = 0;
+   // bool emptyOutput = theBandList.empty();
+
+   if(theResetBandIndicesFlag)
+   {
+      for(idx = 0; idx < bandList.size();++idx)
+      {
+         bandList[idx] = idx;
+      }
+   }
+   if (theBandList.size() != 0 && bandList.size())
+   {
+      if (theBandList.size() != bandList.size())
+      {
+         // Somethings changed.  Set everthing back.
+         initializeClips();
+         setNullCount();
+         theTable.clear();
+         theDirtyFlag = true;
+      }
+      else
+      {
+         // Sizes same check the order.
+         for(ossim_uint32 band = 0; band < theBandList.size(); ++band)
+         {
+            if (theBandList[band] != bandList[band])
+            {
+               //initializeClips();
+               //setNullCount();
+               theDirtyFlag = true;
+               break;
+            }            
+         }
+      }
+   }
+   else
+   {
+      initializeMinMaxOutput();
+   }
+
+   // Update the band list with the latest.
+   theBandList = bandList;
+	
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimHistogramRemapper::initialize exited..." << endl;
+   }
+   verifyEnabled();
+
+}
+
+void ossimHistogramRemapper::reset()
+{
+   // We could delete theTable to free up memory???
+   setStretchMode(LINEAR_ONE_PIECE, false);
+   initializeClips();
+   verifyEnabled();
+}
+
+void
+ossimHistogramRemapper::setHistogram(ossimRefPtr<ossimMultiResLevelHistogram> histogram)
+{
+   theHistogram = histogram;
+   setNullCount();
+	
+   // Note: initializeClips before setNullCount since it relies on clips.
+   initializeClips();
+   theTable.clear();
+   theDirtyFlag = true;
+}
+
+bool ossimHistogramRemapper::openHistogram(const ossimFilename& histogram_file)
+{
+   ossimRefPtr<ossimMultiResLevelHistogram> h = new ossimMultiResLevelHistogram();
+   if (h->importHistogram(histogram_file))
+   {
+      setHistogram(h);
+      return true;
+   }
+	
+   // Import failed if here!
+   return false;
+}
+
+ossimRefPtr<ossimImageData> ossimHistogramRemapper::getTile(
+   const ossimIrect& tile_rect,
+   ossim_uint32 resLevel)
+{
+   
+#if 0 /* Please leave for debug. (drb) */
+   cout << "\ntheEnableFlag: " << theEnableFlag
+        << "\ntheBypassFlag: " << theBypassFlag
+        << "\ntheDirtyFlag:  " << theDirtyFlag
+        << endl;
+#endif
+   
+   if ( !theInputConnection )
+      return 0;
+
+   // Rebuild the table if dirty flag set:
+   if ( theDirtyFlag )
+      makeClean();
+
+   if ( !theEnableFlag || theBypassFlag )
+      return theInputConnection->getTile(tile_rect, resLevel);
+
+   ossimRefPtr<ossimImageData> inputTile = theInputConnection->getTile(tile_rect, resLevel);
+   if(!inputTile.valid())
+      return 0;
+
+   ossimDataObjectStatus tile_status = inputTile->getDataObjectStatus();
+   if ( (tile_status == OSSIM_NULL) || (tile_status == OSSIM_EMPTY) )
+      return inputTile;
+
+   if (!theTile)
+      allocate(tile_rect);
+
+   theTile->setImageRectangle(tile_rect);
+   theTile->makeBlank();
+   switch (theOutputScalarType)
+   {
+   case OSSIM_UINT8:
+      applyLinearStretch(ossim_uint8(0), inputTile);
+      break;
+
+   case OSSIM_USHORT11:
+   case OSSIM_USHORT16:
+      applyLinearStretch(ossim_uint16(0), inputTile);
+      break;
+
+   case OSSIM_SSHORT16:
+      applyLinearStretch(ossim_sint16(0), inputTile);
+      //remapFromNativeTable(ossim_sint16(0), inputTile);
+      break;
+
+   case OSSIM_NORMALIZED_FLOAT:
+   case OSSIM_FLOAT:
+      applyLinearStretch(ossim_float32(0), inputTile);
+      //remapFromNativeTable(ossim_float32(0), inputTile);
+      break;
+
+   case OSSIM_NORMALIZED_DOUBLE:
+   case OSSIM_DOUBLE:
+      applyLinearStretch(ossim_float64(0), inputTile);
+      //remapFromNativeTable(ossim_float64(0), inputTile);
+      break;
+
+   case OSSIM_SCALAR_UNKNOWN:
+   default:
+      // Shouldn't hit this.
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "ossimHistogramRemapper::getTile"
+         << "\nOutput scalar type is OSSIM_SCALAR_UNKNOWN!\n";
+      }
+   } // End of "switch (theTableType)"
+
+   theTile->validate();
+   return theTile;
+}
+
+template <class T> void ossimHistogramRemapper::applyLinearStretch(
+   T /* dummy */,
+   ossimRefPtr<ossimImageData>& inputTile)
+{
+   const ossim_uint32 BANDS = inputTile->getNumberOfBands();
+
+   // Sanity check.
+   if (theNormalizedLowClipPoint.size() != BANDS || !getHistogram(0).valid())
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimHistogramRemapper::buildTable ERROR!"
+            << " Line:  " << __LINE__ << endl;
+      }
+      return;
+   }
+
+
+   
+//   T* table = reinterpret_cast<T*>(&theTable.front());
+//   ossim_uint32 index = 0;
+   
+   // Finally, build the table...
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      ossimRefPtr<ossimHistogram> h  = getHistogram(band);
+      T* bandPtr = static_cast<T*>(inputTile->getBuf(band));
+      T* outputPtr = static_cast<T*>(theTile->getBuf(band));
+      if (h.get()&&bandPtr&&outputPtr)
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "ossimHistogramRemapper::buildLinearTable DEBUG:"
+               << "\nband:  " << band
+               << "\nmean:  " << h->GetMean()
+               << "\nstddev:  " << h->GetStandardDev()
+               << endl;
+         }
+      }
+      else
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimHistogramRemapper::buildTable ERROR!"
+            << " Line:  " << __LINE__ << endl;
+         }
+         return; 
+      }
+      //std::cout << "MIN OUTPUT ==== " << theMinOutputValue[band] << std::endl;
+      const T NULL_PIX = static_cast<T>(getNullPixelValue(band));
+      const T MIN_PIX  = static_cast<T>(theMinOutputValue[band]);
+      const T MAX_PIX  = static_cast<T>(theMaxOutputValue[band]);
+
+      ossim_float64 min_clip_value =
+         h->LowClipVal(theNormalizedLowClipPoint[band]);
+      ossim_float64 max_clip_value =
+         h->HighClipVal(1.0-theNormalizedHighClipPoint[band]);
+      min_clip_value = floor(min_clip_value);
+      max_clip_value = ceil(max_clip_value);
+      //ossim_float64 gain = (MAX_PIX-MIN_PIX+1)/(max_clip_value-min_clip_value);
+      ossim_float64 gain = (MAX_PIX-MIN_PIX+1)/(max_clip_value-min_clip_value);
+      // ossim_float64 distMin = fabs(min_clip_value - MIN_PIX);
+      // ossim_float64 distMax = fabs(max_clip_value - MAX_PIX);
+      // ossim_float64 mean = (max_clip_value+min_clip_value)*0.5;
+
+      const ossim_uint32 PPB   = inputTile->getSizePerBand(); // pixels per band
+
+      ossim_uint32 idx = 0;
+      for(idx = 0; idx < PPB;++idx)
+      {
+         if ( bandPtr[idx] != NULL_PIX )
+         {
+            ossim_float64 p = bandPtr[idx];
+            if (p < min_clip_value)
+            {
+               p = MIN_PIX;
+            }
+            else if (p > max_clip_value)
+            {
+               p = MAX_PIX;
+            }
+            else
+            {
+               p = ((p - min_clip_value) * gain) + MIN_PIX;// - 1.0;
+            }
+
+            // Final range check:
+            outputPtr[idx] =
+               static_cast<T>( p >= MIN_PIX ? ( p <= MAX_PIX ? p : MAX_PIX ) : MIN_PIX );
+         }
+         else
+         {
+            outputPtr[idx] = NULL_PIX;
+         }
+      }
+
+   } // End of band loop.
+
+}
+
+void ossimHistogramRemapper::setLowNormalizedClipPoint(const ossim_float64& clip)
+{
+   const ossim_uint32 BANDS = getNumberOfInputBands();
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      setLowNormalizedClipPoint(clip, band);
+   }
+}
+
+void ossimHistogramRemapper::makeClean()
+{
+   if (theEnableFlag && theDirtyFlag) // Enabled and dirty.
+   {
+      // Always rebuild table if dirty.
+      buildTable();
+      
+      // Check for internal bypass.
+      verifyEnabled();
+
+      // Always clear the dirty flag.
+      theDirtyFlag = false;
+   }
+}
+
+void ossimHistogramRemapper::setLowNormalizedClipPoint(const ossim_float64& clip,
+                                                  ossim_uint32 zero_based_band)
+{
+   const ossim_uint32 BANDS = getNumberOfInputBands();
+	
+   if (zero_based_band >= BANDS)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHistogramRemapper::setLowNormalizedClipPoint ERROR:"
+         << "\nband " << zero_based_band << " is out of range!"
+         << "\nhighest band:  " << (BANDS-1) << endl;
+   }
+	
+   if (theNormalizedLowClipPoint.size() != BANDS)
+   {
+      initializeClips();
+   }
+	
+   if ( clip != theNormalizedLowClipPoint[zero_based_band] &&
+        clip < theNormalizedHighClipPoint[zero_based_band] )
+   {
+      theDirtyFlag = true;
+      theNormalizedLowClipPoint[zero_based_band] = clip;
+   }
+}
+
+void
+ossimHistogramRemapper::setHighNormalizedClipPoint(const ossim_float64& clip)
+{
+   const ossim_uint32 BANDS = getNumberOfInputBands();
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      setHighNormalizedClipPoint(clip, band);
+   }
+}
+
+void ossimHistogramRemapper::setHighNormalizedClipPoint(
+   const ossim_float64& clip, ossim_uint32 zero_based_band)
+{
+   const ossim_uint32 BANDS = getNumberOfInputBands();
+	
+   if (zero_based_band >= BANDS)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHistogramRemapper::setHighNormalizedClipPoint ERROR:"
+         << "\nband " << zero_based_band << " is out of range!"
+         << "\nhighest band:  " << (BANDS-1) << endl;
+   }
+	
+   if (theNormalizedHighClipPoint.size() != BANDS)
+   {
+      initializeClips();
+   }
+	
+   if ( clip != theNormalizedHighClipPoint[zero_based_band] &&
+        clip > theNormalizedLowClipPoint[zero_based_band] )
+   {
+      theDirtyFlag = true;
+      theNormalizedHighClipPoint[zero_based_band] = clip;
+   }
+}
+
+void ossimHistogramRemapper::setLowClipPoint(const ossim_float64& clip)
+{
+   const ossim_uint32 BANDS = getNumberOfInputBands();
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      setLowClipPoint(clip, band);
+   }
+}
+
+void ossimHistogramRemapper::setLowClipPoint(const ossim_float64& clip,
+                                             ossim_uint32 zero_based_band)
+{
+   // allow the call to getHistogram to happen this way we can calculate a histogram if 
+   // a histosource is connected to this object
+   //
+   //   if (!theHistogram) return;
+	
+   ossimRefPtr<ossimHistogram> h = getHistogram(zero_based_band);
+   if (h.valid())
+   {
+      ossim_float64 d = h->getLowFractionFromValue(clip);
+      if (ossim::isnan(d) == false)
+      {
+         setLowNormalizedClipPoint(d, zero_based_band);
+      }
+   }
+}
+
+void ossimHistogramRemapper::setHighClipPoint(const ossim_float64& clip)
+{
+   const ossim_uint32 BANDS = getNumberOfInputBands();
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      setHighClipPoint(clip, band);
+   }
+}
+
+void ossimHistogramRemapper::setHighClipPoint(const ossim_float64& clip,
+                                              ossim_uint32 zero_based_band)
+{
+   // allow the call to getHistogram to happen this way we can calculate a histogram if 
+   // a histosource is connected to this object
+   //
+   //   if (!theHistogram) return;
+	
+   ossimRefPtr<ossimHistogram> h = getHistogram(zero_based_band);
+   if (h.valid())
+   {
+      ossim_float64 d = h->getHighFractionFromValue(clip);
+      if (ossim::isnan(d) == false)
+      {
+         d = 1.0-d;
+         setHighNormalizedClipPoint(d, zero_based_band);
+      }
+   }
+}
+
+void ossimHistogramRemapper::setMidPoint(const ossim_float64& value)
+{
+   const ossim_uint32 BANDS = getNumberOfInputBands();
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      setMidPoint(value, band);
+   }
+}
+
+void ossimHistogramRemapper::setMidPoint(const ossim_float64& value,
+                                         ossim_uint32 zero_based_band)
+{
+   const ossim_uint32 BANDS = getNumberOfInputBands();
+	
+   if (zero_based_band >= BANDS)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHistogramRemapper::setMidPoint ERROR:"
+         << "\nband " << zero_based_band << " is out of range!"
+         << "\nhighest band:  " << (BANDS-1) << endl;
+   }
+	
+   if (theMidPoint.size() != BANDS)
+   {
+      initializeClips();
+   }
+	
+   if (theMidPoint[zero_based_band] != value)
+   {
+      theDirtyFlag = true;
+      theMidPoint[zero_based_band] = value;
+   }
+}
+
+void ossimHistogramRemapper::setMinOutputValue(const ossim_float64& value)
+{
+   const ossim_uint32 BANDS = getNumberOfInputBands();
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      setMinOutputValue(value, band);
+   }
+}
+
+void ossimHistogramRemapper::setMinOutputValue(const ossim_float64& value,
+                                               ossim_uint32 zero_based_band)
+{
+   if (theInputConnection)
+   {
+      const ossim_uint32 BANDS = getNumberOfInputBands();
+      
+      if (zero_based_band >= BANDS)
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimHistogramRemapper::setMinOutputValue ERROR:"
+            << "\nband " << zero_based_band << " is out of range!"
+            << "\nhighest band:  " << (BANDS-1) << endl;
+      }
+      
+      if (theMinOutputValue.size() != BANDS)
+      {
+         initializeClips();
+      }
+      
+      if ( value != theMinOutputValue[zero_based_band] &&
+           value >= theInputConnection->getMinPixelValue(zero_based_band) &&
+           value < theMaxOutputValue[zero_based_band] )
+      {
+         theDirtyFlag = true;
+         theMinOutputValue[zero_based_band] = value;
+      }
+   }
+}
+
+void ossimHistogramRemapper::setMaxOutputValue(const ossim_float64& value)
+{
+   const ossim_uint32 BANDS = getNumberOfInputBands();
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      setMaxOutputValue(value, band);
+   }
+}
+
+void ossimHistogramRemapper::setMaxOutputValue(const ossim_float64& value,
+                                               ossim_uint32 zero_based_band)
+{
+   if (theInputConnection)
+   {
+      const ossim_uint32 BANDS = getNumberOfInputBands();
+      
+      if (zero_based_band >= BANDS)
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimHistogramRemapper::setMidPoint ERROR:"
+            << "\nband " << zero_based_band << " is out of range!"
+            << "\nhighest band:  " << (BANDS-1) << endl;
+      }
+      
+      if (theMaxOutputValue.size() != BANDS)
+      {
+         initializeClips();
+      }
+      
+      if ( value != theMaxOutputValue[zero_based_band] &&
+           value <= theInputConnection->getMaxPixelValue(zero_based_band) &&
+           value >  theMinOutputValue[zero_based_band] )
+      {
+         theDirtyFlag = true;
+         theMaxOutputValue[zero_based_band] = value;
+      }
+   }
+}
+
+ossim_float64 ossimHistogramRemapper::getLowNormalizedClipPoint(ossim_uint32 zero_based_band) const
+{
+   if (theNormalizedLowClipPoint.size() == 0 ||
+       zero_based_band >= getNumberOfInputBands())
+   {
+      return ossim::nan();
+   }
+   
+   if (zero_based_band >= theNormalizedLowClipPoint.size())
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHistogramRemapper::getLowNormalizedClipPoint ERROR:"
+         << "\nband " << zero_based_band << " is out of range!"
+         << "\nhighest band:  " << (theNormalizedLowClipPoint.size()-1)
+         << endl;
+      return ossim::nan();
+   }
+	
+   return theNormalizedLowClipPoint[zero_based_band];
+}
+
+ossim_float64 ossimHistogramRemapper::getLowNormalizedClipPoint() const
+{
+   if (theNormalizedLowClipPoint.size() == 0)
+   {
+      return ossim::nan();
+   }
+   
+   ossim_float64 d = 0.0;
+   const ossim_uint32 BANDS = (ossim_uint32)theNormalizedLowClipPoint.size();
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      d += getLowNormalizedClipPoint(band);
+   }
+   
+   return (d / BANDS);
+}
+
+ossim_float64 ossimHistogramRemapper::getHighNormalizedClipPoint(ossim_uint32 zero_based_band) const
+{
+   if (theNormalizedHighClipPoint.size() == 0 ||
+       zero_based_band >= getNumberOfInputBands())
+   {
+      return ossim::nan();
+   }
+   
+   if (zero_based_band >= theNormalizedHighClipPoint.size())
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHistogramRemapper::getHighNormalizedClipPoint ERROR:"
+         << "\nband " << zero_based_band << " is out of range!"
+         << "\nhighest band:  " << (theNormalizedHighClipPoint.size()-1)
+         << endl;
+      return ossim::nan();
+   }
+	
+   return theNormalizedHighClipPoint[zero_based_band];
+}
+
+ossim_float64 ossimHistogramRemapper::getHighNormalizedClipPoint() const
+{
+   if (theNormalizedHighClipPoint.size() == 0)
+   {
+      return ossim::nan();
+   }
+   
+   ossim_float64 d = 0.0;
+   const ossim_uint32 BANDS = (ossim_uint32)theNormalizedHighClipPoint.size();
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      d += getHighNormalizedClipPoint(band);
+   }
+   
+   return (d / BANDS);
+}
+
+ossim_float64 ossimHistogramRemapper::getLowClipPoint(ossim_uint32 zero_based_band) const
+{
+   if(zero_based_band >= getNumberOfInputBands() ||
+      !theHistogram || zero_based_band >= theNormalizedLowClipPoint.size())
+   {
+      return ossim::nan();
+   }
+	
+   if (theNormalizedLowClipPoint[zero_based_band] == 0.0)
+   {
+      return getMinPixelValue(zero_based_band);
+   }   
+	
+   ossimRefPtr<ossimHistogram> h = getHistogram(zero_based_band);
+   if (h.valid())
+   {
+      ossim_float64 d =
+         h->LowClipVal(theNormalizedLowClipPoint[zero_based_band]);
+		
+      return floor(d);
+   }
+	
+   return ossim::nan();
+}
+
+ossim_float64 ossimHistogramRemapper::getLowClipPoint() const
+{
+   if (theNormalizedLowClipPoint.size() == 0 || !theHistogram)
+   {
+      return ossim::nan();
+   }
+   
+   ossim_float64 d = 0.0;
+   const ossim_uint32 BANDS = getNumberOfInputBands();
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      d += getLowClipPoint(band);
+   }
+   
+   return (d / BANDS);
+}
+
+ossim_float64 ossimHistogramRemapper::getHighClipPoint(ossim_uint32 zero_based_band) const
+{
+   if(zero_based_band >= getNumberOfInputBands() ||
+      !theHistogram || zero_based_band >= theNormalizedHighClipPoint.size())
+   {
+      return ossim::nan();
+   }
+	
+   if (theNormalizedHighClipPoint[zero_based_band] == 1.0)
+   {
+      return getMaxPixelValue(zero_based_band);
+   }
+	
+   ossimRefPtr<ossimHistogram> h = getHistogram(zero_based_band);
+   if (h.valid())
+   {
+      ossim_float64 d =
+         h->HighClipVal(1.0-theNormalizedHighClipPoint[zero_based_band]);
+      return ceil(d);
+   }
+   
+   return ossim::nan();
+}
+
+ossim_float64 ossimHistogramRemapper::getHighClipPoint() const
+{
+   if (theNormalizedHighClipPoint.size() == 0 || !theHistogram)
+   {
+      return ossim::nan();
+   }
+   
+   ossim_float64 d = 0.0;
+   const ossim_uint32 BANDS = getNumberOfInputBands();
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      d += getHighClipPoint(band);
+   }
+   
+   return (d / BANDS);
+}
+
+ossim_float64 ossimHistogramRemapper::getMidPoint(ossim_uint32 zero_based_band) const
+{
+   if (theMidPoint.size() == 0 ||
+       zero_based_band >= getNumberOfInputBands())
+   {
+      return ossim::nan();
+   }
+   
+   if (zero_based_band >= theMidPoint.size())
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHistogramRemapper::getMidPoint ERROR:"
+         << "\nband " << zero_based_band << " is out of range!"
+         << "\nhighest band:  " << (theMidPoint.size()-1)
+         << endl;
+      return ossim::nan();
+   }
+	
+   return theMidPoint[zero_based_band];
+}
+
+ossim_float64 ossimHistogramRemapper::getMidPoint() const
+{
+   if (theMidPoint.size() == 0)
+   {
+      return ossim::nan();
+   }
+   
+   ossim_float64 d = 0.0;
+   const ossim_uint32 BANDS = (ossim_uint32)theMidPoint.size();
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      d += getMidPoint(band);
+   }
+   
+   return (d / BANDS);
+}
+
+ossim_float64 ossimHistogramRemapper::getMinOutputValue(ossim_uint32 zero_based_band) const
+{
+   if (theMinOutputValue.size() == 0 ||
+       zero_based_band >= getNumberOfInputBands())
+   {
+      return ossim::nan();
+   }
+   
+   if (zero_based_band >= theMinOutputValue.size())
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHistogramRemapper::getMinOutputValue ERROR:"
+         << "\nband " << zero_based_band << " is out of range!"
+         << "\nhighest band:  " << (theMinOutputValue.size()-1)
+         << endl;
+      return ossim::nan();
+   }
+	
+   return theMinOutputValue[zero_based_band];
+}
+
+ossim_float64 ossimHistogramRemapper::getMinOutputValue() const
+{
+   if (theMinOutputValue.size() == 0)
+   {
+      return ossim::nan();
+   }
+   
+   ossim_float64 d = 0.0;
+   const ossim_uint32 BANDS = (ossim_uint32)theMinOutputValue.size();
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      d += getMinOutputValue(band);
+   }
+   
+   return (d / BANDS);
+}
+
+ossim_float64 ossimHistogramRemapper::getMaxOutputValue(ossim_uint32 zero_based_band) const
+{
+   if (theMaxOutputValue.size() == 0 ||
+       zero_based_band >= getNumberOfInputBands())
+   {
+      return ossim::nan();
+   }
+   
+   if (zero_based_band >= theMaxOutputValue.size())
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHistogramRemapper::getMaxOutputValue ERROR:"
+         << "\nband " << zero_based_band << " is out of range!"
+         << "\nhighest band:  " << (theMaxOutputValue.size()-1)
+         << endl;
+      return ossim::nan();
+   }
+	
+   return theMaxOutputValue[zero_based_band];
+}
+
+ossim_float64 ossimHistogramRemapper::getMaxOutputValue() const
+{
+   if (theMaxOutputValue.size() == 0)
+   {
+      return ossim::nan();
+   }
+   
+   ossim_float64 d = 0.0;
+   const ossim_uint32 BANDS = (ossim_uint32)theMaxOutputValue.size();
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      d += getMaxOutputValue(band);
+   }
+   
+   return (d / BANDS); 
+}
+
+bool ossimHistogramRemapper::loadState(const ossimKeywordlist& kwl,
+                                       const char* prefix)
+{
+   static const char MODULE[] = "ossimHistogramRemapper::loadState";
+   if (traceDebug())
+   {
+      CLOG << " Entered..."
+           << "\nprefix:  " << prefix << endl;
+   }
+   // Load the base class states...
+   bool status = ossimTableRemapper::loadState(kwl, prefix);
+   if (status)
+   {
+      const char* lookup = 0;
+      ossimString keyword;
+      
+      lookup = kwl.find(prefix, HISTOGRAM_FILENAME_KW);
+      if (lookup)
+      {
+         if ( !openHistogram(ossimFilename(lookup)) )
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimHistogramRemapper::loadState ERROR!"
+               << "\nCould not open file:  " << lookup
+               << "\nReturning..." << endl;
+            return false;
+         }
+      }
+     
+      //---
+      // Get the band specific keywords.
+      // NOTES:
+      // -  This loadState assumes the all keywords will have the same number
+      //    of bands.
+      // -  The set methods cannot be used here as there may not be a connection
+      //    yet that they need.
+      //---
+      ossim_uint32 bands = 0;
+      lookup = kwl.find(prefix, ossimKeywordNames::NUMBER_BANDS_KW);
+      if (lookup)
+      {
+         bands = ossimString::toUInt32(lookup);
+      }
+      else  // For backwards compatibility.
+      {
+         // Use the low clip to find number of bands...
+         keyword = NORMALIZED_LOW_CLIP_POINT_KW;
+         bands = kwl.numberOf(prefix, keyword);
+      }
+      //if(!bands&&theHistogram.valid())
+     // {
+     //    bands = theHistogram->getNumberOfBands();
+     // }
+
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimHistogramRemapper::loadState DEBUG:"
+            << "\nBands:  " << bands
+            << endl;
+      }
+      if (bands)
+      {
+         // Start with fresh clips.
+         initializeClips(bands);
+        for (ossim_uint32 band = 0; band < bands; ++band)
+         {
+            // Get the low clip.
+            keyword = NORMALIZED_LOW_CLIP_POINT_KW;
+            keyword += ".";
+            keyword += ossimKeywordNames::BAND_KW;
+            keyword += ossimString::toString(band+1);
+            lookup = kwl.find(prefix, keyword);
+            if(lookup)
+            {
+               theNormalizedLowClipPoint[band] = atof(lookup);
+            }
+            
+            // Get the high clip.
+            keyword = NORMALIZED_HIGH_CLIP_POINT_KW;
+            keyword += ".";
+            keyword += ossimKeywordNames::BAND_KW;
+            keyword += ossimString::toString(band+1);
+            lookup = kwl.find(prefix, keyword);
+            if(lookup)
+            {
+               theNormalizedHighClipPoint[band] = atof(lookup);
+            }
+            
+            // Get the mid point.
+            keyword = MID_POINT_KW;
+            keyword += ".";
+            keyword += ossimKeywordNames::BAND_KW;
+            keyword += ossimString::toString(band+1);
+            lookup = kwl.find(prefix, keyword);
+            if(lookup)
+            {
+               theMidPoint[band] = atof(lookup);
+            }
+            
+            // Get the min output value.
+            keyword = MIN_OUTPUT_VALUE_KW;
+            keyword += ".";
+            keyword += ossimKeywordNames::BAND_KW;
+            keyword += ossimString::toString(band+1);
+            lookup = kwl.find(prefix, keyword);
+            if(lookup)
+            {
+               theMinOutputValue[band] = atof(lookup);
+            }
+            
+            // Get the max output value.
+            keyword = MAX_OUTPUT_VALUE_KW;
+            keyword += ".";
+            keyword += ossimKeywordNames::BAND_KW;
+            keyword += ossimString::toString(band+1);
+            lookup = kwl.find(prefix, keyword);
+            if(lookup)
+            {
+               theMaxOutputValue[band] = atof(lookup);
+            }      
+         }
+     }
+     
+      lookup = kwl.find(prefix, STRETCH_MODE_KW);
+      if (lookup)
+      {
+         ossimString s = lookup;
+         s.downcase();
+         if (s == STRETCH_MODE[ossimHistogramRemapper::LINEAR_ONE_PIECE])
+         {
+            theStretchMode = ossimHistogramRemapper::LINEAR_ONE_PIECE;
+         }
+         else if (s == STRETCH_MODE[ossimHistogramRemapper::LINEAR_1STD_FROM_MEAN])
+         {
+            theStretchMode = ossimHistogramRemapper::LINEAR_1STD_FROM_MEAN;
+         }
+         else if (s == STRETCH_MODE[ossimHistogramRemapper::LINEAR_2STD_FROM_MEAN])
+         {
+            theStretchMode = ossimHistogramRemapper::LINEAR_2STD_FROM_MEAN;
+         }
+         else if (s == STRETCH_MODE[ossimHistogramRemapper::LINEAR_3STD_FROM_MEAN])
+         {
+            theStretchMode = ossimHistogramRemapper::LINEAR_3STD_FROM_MEAN;
+         }
+         else if (s == STRETCH_MODE[ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX])
+         {
+            theStretchMode = ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX;
+         }
+         else
+         {
+            theStretchMode = ossimHistogramRemapper::STRETCH_UNKNOWN;
+         }
+      }
+
+      // Always set the dirty flag.
+      theDirtyFlag = true;
+   }
+   verifyEnabled();
+
+   if (traceDebug())
+   {
+      CLOG << "ossimHistogramRemapper::loadState DEBUG:"
+           << *this
+           << "\nExited..." << endl;
+   }
+   return status;
+}
+
+bool ossimHistogramRemapper::saveState(ossimKeywordlist& kwl,
+                                       const char* prefix) const
+{
+   if (theHistogram.valid())
+   {
+      kwl.add(prefix,
+              HISTOGRAM_FILENAME_KW,
+              theHistogram->getHistogramFile().c_str(),
+              true);
+   }
+   kwl.add(prefix,
+           STRETCH_MODE_KW,
+           getStretchModeString().c_str(),
+           true);
+	
+   const ossim_uint32 BANDS = (ossim_uint32)theNormalizedLowClipPoint.size();
+   
+   kwl.add(prefix,
+           ossimKeywordNames::NUMBER_BANDS_KW,
+           BANDS,
+           true);
+	
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      ossimString keyword;
+		
+      // Save the low clip.
+      keyword = NORMALIZED_LOW_CLIP_POINT_KW;
+      keyword += ".";
+      keyword += ossimKeywordNames::BAND_KW;
+      keyword += ossimString::toString(band+1);
+      kwl.add(prefix,
+              keyword,
+              theNormalizedLowClipPoint[band],
+              true);
+		
+      // Save the high clip.
+      keyword = NORMALIZED_HIGH_CLIP_POINT_KW;
+      keyword += ".";
+      keyword += ossimKeywordNames::BAND_KW;
+      keyword += ossimString::toString(band+1);
+      kwl.add(prefix,
+              keyword,
+              theNormalizedHighClipPoint[band],
+              true);
+		
+      // Save the mid point.
+      keyword = MID_POINT_KW;
+      keyword += ".";
+      keyword += ossimKeywordNames::BAND_KW;
+      keyword += ossimString::toString(band+1);
+      kwl.add(prefix,
+              keyword,
+              theMidPoint[band],
+              true);
+		
+      // Save the min output value.
+
+      keyword = MIN_OUTPUT_VALUE_KW;
+      keyword += ".";
+      keyword += ossimKeywordNames::BAND_KW;
+      keyword += ossimString::toString(band+1);
+      kwl.add(prefix,
+              keyword,
+              theMinOutputValue[band],
+              true);
+		
+      // Save the max output value.
+      keyword = MAX_OUTPUT_VALUE_KW;
+      keyword += ".";
+      keyword += ossimKeywordNames::BAND_KW;
+      keyword += ossimString::toString(band+1);
+
+      kwl.add(prefix,
+              keyword,
+              theMaxOutputValue[band],
+              true);
+   }
+
+   return ossimTableRemapper::saveState(kwl, prefix);
+}
+
+void ossimHistogramRemapper::setStretchMode(StretchMode mode,
+                                            bool rebuildTable)
+{
+   if (theStretchMode != mode)
+   {
+      theStretchMode = mode;
+
+      if (rebuildTable)
+      {
+         buildTable();
+
+         // Check for internal bypass.
+         verifyEnabled();
+
+         // Clear the dirty flag.
+         theDirtyFlag = false;
+      }
+      else
+      {
+         theDirtyFlag = true;
+      }
+   }
+}
+
+void ossimHistogramRemapper::setStretchModeAsString(const ossimString& mode,
+                                                    bool rebuildTable)
+{
+   if( mode == "linear_one_piece")
+   {
+      setStretchMode(LINEAR_ONE_PIECE, rebuildTable);
+   }
+   else if(mode == "linear_1std_from_mean")
+   {
+      setStretchMode(LINEAR_1STD_FROM_MEAN, rebuildTable);
+   }
+   else if(mode == "linear_2std_from_mean")
+   {
+      setStretchMode(LINEAR_2STD_FROM_MEAN, rebuildTable);
+   }
+   else if(mode == "linear_3std_from_mean")
+   {
+      setStretchMode(LINEAR_3STD_FROM_MEAN, rebuildTable);
+   }
+   else if(mode == "linear_auto_min_max")
+   {
+      setStretchMode(LINEAR_AUTO_MIN_MAX, rebuildTable);
+   }
+   else
+   {
+      setStretchMode(STRETCH_UNKNOWN, false);
+   }   
+}
+
+void ossimHistogramRemapper::buildTable()
+{
+   setupTable();
+   switch(theStretchMode)
+   {
+      case ossimHistogramRemapper::LINEAR_ONE_PIECE:
+      {
+         buildLinearTable();
+         break;
+      }
+      case ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX:
+      {
+         buildAutoLinearMinMaxTable();
+         break;
+      }
+      case ossimHistogramRemapper::LINEAR_1STD_FROM_MEAN:
+      case ossimHistogramRemapper::LINEAR_2STD_FROM_MEAN:
+      case ossimHistogramRemapper::LINEAR_3STD_FROM_MEAN:
+         buildLinearTableStdFromMean();
+         break;
+         
+      default:
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimHistogramRemapper::buildTable ERROR!"
+               << "\nUnknown stretch type!" << endl;
+         }
+         break;
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimHistogramRemapper::buildTable DEBUG:\n" << endl;
+      print(ossimNotify(ossimNotifyLevel_DEBUG));
+   }
+}
+
+void ossimHistogramRemapper::buildLinearTable()
+{
+   switch (getOutputScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         buildLinearTable(ossim_uint8(0));
+         break;
+      }
+			
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+      {
+         buildLinearTable(ossim_uint16(0));
+         break;
+      }
+			
+      case OSSIM_SINT16:
+      {
+         buildLinearTable(ossim_sint16(0));
+         break;
+      }
+
+      case OSSIM_UINT32:
+      {
+         buildLinearTable(ossim_uint32(0));
+         break;
+      }
+			
+      case OSSIM_SINT32:
+      {
+         buildLinearTable(ossim_sint32(0));
+         break;
+      }
+			
+      case OSSIM_NORMALIZED_FLOAT:      
+      case OSSIM_FLOAT:
+      {
+         buildLinearTable(ossim_float32(0));
+         break;
+      }
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_DOUBLE:
+      {
+         buildLinearTable(ossim_float64(0));
+         break;
+      }
+			
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         if(traceDebug())
+         {
+            // Shouldn't hit this.
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimHistogramRemapper::buildLinearTable OSSIM_SCALAR_UNKNOWN!" << endl;
+         }
+         break;
+      }
+			
+   } // End of "switch (theTableType)"
+}
+
+void ossimHistogramRemapper::buildAutoLinearMinMaxTable()
+{
+   switch (getOutputScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         buildAutoLinearMinMaxTableTemplate(ossim_uint8(0));
+         break;
+      }
+			
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+      {
+         buildAutoLinearMinMaxTableTemplate(ossim_uint16(0));
+         break;
+      }
+			
+      case OSSIM_SINT16:
+      {
+         buildAutoLinearMinMaxTableTemplate(ossim_sint16(0));
+         break;
+      }
+			
+      case OSSIM_NORMALIZED_FLOAT:      
+      case OSSIM_FLOAT:
+      {
+         buildAutoLinearMinMaxTableTemplate(ossim_float32(0));
+         break;
+      }
+			
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_DOUBLE:
+      {
+         buildAutoLinearMinMaxTableTemplate(ossim_float64(0));
+         break;
+      }
+			
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         if(traceDebug())
+         {
+         // Shouldn't hit this.
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimTableRemapper::buildTable OSSIM_SCALAR_UNKNOWN!"
+               << endl;
+         }
+         break;
+      }
+			
+   } // End of "switch (theTableType)"
+}
+
+template <class T> void ossimHistogramRemapper::buildLinearTable(T /* dummy */)
+{
+   // This builds a native table.
+   theTableType = ossimTableRemapper::NATIVE;
+   
+   const ossim_uint32 BANDS = getNumberOfInputBands();
+
+   // Sanity check.
+   if (theNormalizedLowClipPoint.size() != BANDS || !getHistogram(0).valid())
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimHistogramRemapper::buildTable ERROR!"
+            << " Line:  " << __LINE__ << endl;
+      }
+      return;
+   }
+   
+   T* table = reinterpret_cast<T*>(&theTable.front());
+   ossim_uint32 index = 0;
+   
+   // Finally, build the table...
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      ossimRefPtr<ossimHistogram> h  = getHistogram(band);
+      if (h.get())
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "ossimHistogramRemapper::buildLinearTable DEBUG:"
+               << "\nband:  " << band
+               << "\nmean:  " << h->GetMean()
+               << "\nstddev:  " << h->GetStandardDev()
+               << endl;
+         }
+      }
+      else
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimHistogramRemapper::buildTable ERROR!"
+            << " Line:  " << __LINE__ << endl;
+         }
+         return; 
+      }
+		//std::cout << "MIN OUTPUT ==== " << theMinOutputValue[band] << std::endl;
+      const T NULL_PIX = static_cast<T>(getNullPixelValue(band));
+      const T MIN_PIX  = static_cast<T>(theMinOutputValue[band]);
+      const T MAX_PIX  = static_cast<T>(theMaxOutputValue[band]);
+
+      ossim_float64 min_clip_value =
+         h->LowClipVal(theNormalizedLowClipPoint[band]);
+      ossim_float64 max_clip_value =
+         h->HighClipVal(1.0-theNormalizedHighClipPoint[band]);
+      min_clip_value = floor(min_clip_value);
+      max_clip_value = ceil(max_clip_value);
+      ossim_float64 gain = (MAX_PIX-MIN_PIX+1)/(max_clip_value-min_clip_value);
+      
+      table[index] = NULL_PIX;
+      ++index;
+
+      for (ossim_uint32 pix = 1; pix < theTableBinCount; ++pix)
+      {
+         ossim_float64 p = pix;
+         if (p <= min_clip_value)
+         {
+            p = MIN_PIX;
+         }
+         else if (p >= max_clip_value)
+         {
+            p = MAX_PIX;
+         }
+         else
+         {
+            p = ((p - min_clip_value) * gain) + MIN_PIX - 1.0;
+         }
+
+         if(p == NULL_PIX)
+         {
+            p = MIN_PIX;
+         }
+         table[index] = static_cast<T>(p+0.5);
+			
+         ++index;
+      }
+   } // End of band loop.
+
+   // Clear the dirty flag so the table's not rebuilt on the next getTile.
+   theDirtyFlag = false;
+}
+
+template <class T> void ossimHistogramRemapper::buildAutoLinearMinMaxTableTemplate(T /* dummy */)
+{
+   const ossim_uint32 BANDS = getNumberOfInputBands();
+
+   // Sanity check.
+   if (theNormalizedLowClipPoint.size() != BANDS || !getHistogram(0).valid())
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimHistogramRemapper::buildAutoLinearMinMaxTableTemplate ERROR!"
+            << " Line:  " << __LINE__ << endl;
+      }
+      return;
+   }
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      ossimRefPtr<ossimHistogram> h      = getHistogram(band);
+      T nullPix = static_cast<T>(getNullPixelValue(band));
+      if(h.valid())
+      {
+         ossim_uint32 n     = h->GetRes();
+         ossim_float64 low  = h->GetMinVal();
+         ossim_float64 high = h->GetMaxVal();
+
+         double percentChange = .006;
+         if(n > 0)
+         {
+            double newCount       = 0.0;
+            double nextPercentage = 0.0;
+            double percentage = 0.0;
+            int idx = 0;
+            float * counts = h->GetCounts();
+            double count   = h->ComputeArea();
+				
+            for(idx = 0; idx < (ossim_int32)(n-1); ++idx)
+            {
+               if(nullPix != idx)
+               {
+                  newCount += counts[idx];
+               }
+               percentage = newCount / count;
+               nextPercentage =
+                  (newCount + counts[idx+1]) / count;
+//               if (std::fabs(percentage - 0.006) <
+//                   std::fabs(nextPercentage - 0.006))
+                  if (std::fabs(percentage - percentChange) <
+                      std::fabs(nextPercentage - percentChange))
+               {
+                  low = idx+1;
+                  break;
+               }
+               
+            }
+            newCount = 0.0;
+            for (idx = n-1; idx > 0; idx--)
+            {
+               newCount += counts[idx];
+               percentage = newCount / count;
+               nextPercentage =
+                  (newCount + counts[idx-1]) / count;
+               if (std::fabs(percentage - percentChange) <
+                   std::fabs(nextPercentage - percentChange))
+               {
+                  high=idx-1;
+                  break;
+               }
+            }
+            if(low > high)
+            {
+               low = 0;
+               high = n - 1;
+            }
+            //theMinOutputValue[band] = 1;
+            //theMaxOutputValue[band] = 65535;
+
+            //std::cout << "LOW ===== " << low << std::endl;
+            //std::cout << "HIGH ===== " << high << std::endl;
+            setLowClipPoint(low, band);
+            setHighClipPoint(high, band);
+         }
+      }
+   }
+   
+   buildLinearTable();
+}
+
+void ossimHistogramRemapper::buildLinearTableStdFromMean()
+{
+   const ossim_uint32 BANDS = getNumberOfInputBands();
+	
+   // Sanity check.
+   if (theNormalizedLowClipPoint.size() != BANDS || !getHistogram(0).valid())
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimHistogramRemapper::buildTable ERROR!"
+            << " Line:  " << __LINE__ << endl;
+      }
+      return;
+   }
+   
+   ossim_float64 multiplier = 1.0;
+   if (theStretchMode == LINEAR_2STD_FROM_MEAN)
+   {
+      multiplier =  2.0;
+   }
+   else if (theStretchMode == LINEAR_3STD_FROM_MEAN)
+   {
+      multiplier =  3.0;
+   }
+	
+   // Finally, build the table...
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      ossimRefPtr<ossimHistogram> h      = getHistogram(band);
+      ossim_float64 mean = 0.0;
+      ossim_float64 stdDev = 0.0;
+      if(h.valid())
+      {
+         mean     = h->GetMean();
+         stdDev   = h->GetStandardDev();
+      }
+      ossim_float64 lowClip  = mean - (stdDev * multiplier);
+      ossim_float64 highClip = mean + (stdDev * multiplier);
+		
+      // Clamp to min/max.
+      if (lowClip < theMinOutputValue[band])
+      {
+         lowClip = theMinOutputValue[band];
+      }
+      if (highClip > theMaxOutputValue[band])
+      {
+         highClip = theMaxOutputValue[band];
+      }
+      
+      setLowClipPoint(lowClip, band);
+      setMidPoint(mean, band);
+      setHighClipPoint(highClip, band);
+      
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimHistogramRemapper::buildLinearStdFromMean DEBUG:"
+            << "\nband:       " << band
+            << "\nmean:       " << mean
+            << "\nstddev:     " << stdDev
+            << "\nlow clip:   " << lowClip
+            << "\nhigh clip:  " << highClip
+            << endl;
+      }
+   }
+   
+   buildLinearTable();
+}
+
+void ossimHistogramRemapper::initializeClips()
+{
+   initializeClips(getNumberOfInputBands());
+}
+
+void ossimHistogramRemapper::initializeClips(ossim_uint32 bands)
+{
+   //---
+   // NOTE: This method deoes not set theDirtyFlag by design.
+   //---
+   if (bands)
+   {
+      theNormalizedLowClipPoint.resize(bands);
+      theNormalizedHighClipPoint.resize(bands);
+      theMidPoint.resize(bands);
+      theMinOutputValue.resize(bands);
+      theMaxOutputValue.resize(bands);
+      
+      for (ossim_uint32 band = 0; band < bands; ++band)
+      {
+         theNormalizedLowClipPoint[band]  = 0.0;
+         theNormalizedHighClipPoint[band] = 1.0;
+         theMidPoint[band] = 0.0;
+         
+         // Must have an output scalar type for getMin/Max call.
+         if (theOutputScalarType != OSSIM_SCALAR_UNKNOWN)
+         {
+            theMinOutputValue[band] = ossim::defaultMin(theOutputScalarType);//getMinPixelValue(band);
+            theMaxOutputValue[band] = ossim::defaultMax(theOutputScalarType);//getMaxPixelValue(band);
+         }
+         else
+         {
+            theMinOutputValue[band] = 0.0;
+            theMaxOutputValue[band] = 0.0;
+         }
+      }
+   }
+}
+
+void ossimHistogramRemapper::initializeMinMaxOutput()
+{
+   ossim_uint32 nBands = getNumberOfInputBands();
+   theMinOutputValue.resize(nBands);
+   theMaxOutputValue.resize(nBands);
+   for (ossim_uint32 band = 0; band < nBands; ++band)
+   {
+         // Must have an output scalar type for getMin/Max call.
+         if (theOutputScalarType != OSSIM_SCALAR_UNKNOWN)
+         {
+            theMinOutputValue[band] = ossim::defaultMin(theOutputScalarType);//getMinPixelValue(band);
+            theMaxOutputValue[band] = ossim::defaultMax(theOutputScalarType);//getMaxPixelValue(band);
+         }
+         else
+         {
+            theMinOutputValue[band] = 0.0;
+            theMaxOutputValue[band] = 0.0;
+         }
+  }
+
+}
+
+void ossimHistogramRemapper::setNullCount()
+{
+   // This will set the null bucket for all res zero bands to zero!
+   if (getHistogram(0).valid())
+   {
+      const ossim_uint32 BANDS = theHistogram->getNumberOfBands();
+      for (ossim_uint32 band = 0; band < BANDS; ++band)
+      {
+         ossimRefPtr<ossimHistogram> h = theHistogram->getHistogram(band);
+         if (h.valid())
+         {
+            h->SetCount(0, 0);
+         }
+      }
+   }
+}
+
+ossimHistogramRemapper::StretchMode ossimHistogramRemapper::getStretchMode() const
+{
+   return theStretchMode;
+}
+
+ossimString ossimHistogramRemapper::getStretchModeString() const
+{
+   return ossimString(STRETCH_MODE[theStretchMode]);
+}
+
+ossim_uint32 ossimHistogramRemapper::getNumberOfStretchModes() const
+{
+   return ossimHistogramRemapper::STRETCH_UNKNOWN; // last index
+}
+
+ossimString
+ossimHistogramRemapper::getStretchModeString(ossim_uint32 index) const
+{
+   if (index < ossimHistogramRemapper::STRETCH_UNKNOWN)
+   {
+      return ossimString(STRETCH_MODE[index]);
+   }
+	
+   return ossimString(STRETCH_MODE[ossimHistogramRemapper::STRETCH_UNKNOWN]);
+   
+}
+
+ostream& ossimHistogramRemapper::print(ostream& os) const
+{
+   os << setiosflags(ios::fixed) << setprecision(15)
+      << "\nossimHistogramRemapper::print:"
+      << "\ntheStretchMode:         " << getStretchModeString().c_str()
+      << "\ntheDirtyFlag:           " << (theDirtyFlag?"true":"false")
+      << "\ntheBypassFlag:          " << (theBypassFlag?"true":"false")
+      
+      << "\ntheHistogram:           " << (theHistogram.valid()?"initialized":"null")
+      << "\ntheTableSizeInBytes:    " << theTable.size()
+      << endl;
+	
+   const ossim_uint32 BANDS = (ossim_uint32)theNormalizedLowClipPoint.size();
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      os << "\ntheNormalizedLowClipPoint[" << band << "]:   "
+         << theNormalizedLowClipPoint[band]
+         << "\ntheNormalizedHighClipPoint[" << band << "]:  "
+         << theNormalizedHighClipPoint[band]
+         << "\ntheMidPoint[" << band << "]:                 "
+         << theMidPoint[band]
+         << "\ntheMinOutputValue[" << band << "]:           "
+         << theMinOutputValue[band]
+         << "\ntheMaxOutputValue[" << band << "]:           "
+         << theMaxOutputValue[band]
+         << endl;
+   }
+	
+   for (ossim_uint32 i = 0; i < theBandList.size(); ++i)
+   {
+      os << "theBandList[" << i << "]:  " << theBandList[i] << endl;
+   }
+
+   // Note: To set table call ossimTableRemapper::print or turn trace on
+   // for "ossimTableRemapper:debug"
+   
+   return os;
+}
+
+void ossimHistogramRemapper::setupTable()
+{
+   const ossim_uint32 BANDS = getNumberOfInputBands();
+   
+   if (theNormalizedLowClipPoint.size() == 0)
+   {
+      initializeClips(BANDS);
+   }
+   
+   ossim_uint32 values_per_band = 0;
+   ossim_uint32 bytes_per_pixel = 0;
+   
+   switch (theOutputScalarType)
+   {
+      case OSSIM_UINT8:
+         values_per_band = 256;  // 2 ^ 8
+         bytes_per_pixel = 1;
+         theTableType = ossimTableRemapper::NATIVE;
+         break;
+         
+      case OSSIM_USHORT11:
+         values_per_band = 2048; // 2 ^ 11
+         bytes_per_pixel = 2;
+         theTableType = ossimTableRemapper::NATIVE;
+         break;
+         
+      case OSSIM_UINT16:
+      case OSSIM_SINT16:
+         values_per_band = 65536; // 2 ^ 16
+         bytes_per_pixel = 2;
+         theTableType = ossimTableRemapper::NATIVE;
+         break;
+         
+      case OSSIM_UINT32:
+      case OSSIM_SINT32:
+         values_per_band = 65536; // 2 ^ 16
+         bytes_per_pixel = 4;
+         theTableType = ossimTableRemapper::NATIVE;
+         break;
+			
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT:
+         bytes_per_pixel = 4;
+         break;
+			
+      case OSSIM_NORMALIZED_DOUBLE:         
+      case OSSIM_DOUBLE:
+         bytes_per_pixel = 8;
+         theTableType = ossimTableRemapper::NORMALIZED;
+         break;
+         
+      default:
+         break;
+   }
+	
+   if ( theOutputScalarType == OSSIM_FLOAT ||
+        theOutputScalarType == OSSIM_DOUBLE ||
+        theOutputScalarType == OSSIM_NORMALIZED_FLOAT ||
+        theOutputScalarType == OSSIM_NORMALIZED_DOUBLE )
+   {
+      for (ossim_uint32 band = 0; band < BANDS; ++band)
+      {
+         ossimRefPtr<ossimHistogram> h  = getHistogram(band);
+			
+         if (h.valid())
+         {
+            if (h->GetRes() > static_cast<ossim_int32>(values_per_band))
+            {
+               values_per_band = h->GetRes();
+            }
+         }
+      }
+   }      
+   
+   theTableBinCount  = values_per_band;
+   theTableBandCount = BANDS;
+
+   ossim_uint32 size_in_bytes = values_per_band * BANDS * bytes_per_pixel;
+   theTable.resize(size_in_bytes);
+
+   ossimImageSource* input = dynamic_cast<ossimImageSource*>(getInput());
+   double minPix = ossim::defaultMin(getOutputScalarType());
+   double maxPix = ossim::defaultMax(getOutputScalarType());
+   
+   if(input)
+   {
+      //---
+      // Last check for NaNs in key data members and set to some default if so.
+      // This could occur if someone stripped a keyword list down to a minimal
+      // set of keywords.
+      //---
+      for (ossim_uint32 band = 0; band < BANDS; ++band)
+      {
+         minPix = input->getMinPixelValue(band);
+         maxPix = input->getMaxPixelValue(band);
+         if ( ossim::isnan(theMinOutputValue[band]) )
+         {
+            theMinOutputValue[band] = minPix;
+         }
+         if ( ossim::isnan(theMaxOutputValue[band]) )
+         {
+            theMaxOutputValue[band] = maxPix;
+         }
+      }   
+   }
+   else
+   {
+      //---
+      // Last check for NaNs in key data members and set to some default if so.
+      // This could occur if someone stripped a keyword list down to a minimal
+      // set of keywords.
+      //---
+      for (ossim_uint32 band = 0; band < BANDS; ++band)
+      {
+         if ( ossim::isnan(theMinOutputValue[band]) )
+         {
+            theMinOutputValue[band] = minPix;
+         }
+         if ( ossim::isnan(theMaxOutputValue[band]) )
+         {
+            theMaxOutputValue[band] = maxPix;
+         }
+      }   
+   }
+}
+
+void ossimHistogramRemapper::verifyEnabled()
+{
+   //---
+   // Since this filter can be constructed with no input connection do not
+   // output and error, simply return.
+   //---	
+      setBypassFlag(true);
+   //if (theInputConnection)
+   {
+
+#if 1     
+      // Start off bypassed.
+
+      if (theStretchMode != STRETCH_UNKNOWN)
+      {
+         if(theHistogram.valid())
+         {
+            setBypassFlag(false);
+         }
+/*         
+         const ossim_uint32 BANDS =
+            (ossim_uint32)theNormalizedLowClipPoint.size();
+         for (ossim_uint32 band = 0; band < BANDS; ++band)
+         {
+            //const double MIN = ossimTableRemapper::getMinPixelValue(band);
+            //const double MAX = ossimTableRemapper::getMaxPixelValue(band);
+            if ( theNormalizedLowClipPoint[band]  != 0.0   ||
+                 theNormalizedHighClipPoint[band] != 1.0 )
+                // theMinOutputValue[band] != MIN ||
+                 //theMaxOutputValue[band] != MAX )
+            {
+               // Need to turn filter on.
+               setBypassFlag(false);
+               break;
+            }
+         }
+         */
+      }
+#endif
+   }
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimHistogramRemapper::verifyEnabled theBypassFlag: "
+         << (theBypassFlag ? "true" : "false") << endl;
+   }
+}
+
+ossimRefPtr<ossimMultiResLevelHistogram> ossimHistogramRemapper::getHistogram()
+{
+   return ossimRefPtr<ossimMultiResLevelHistogram>(theHistogram.get());
+}
+
+ossimRefPtr<const ossimMultiResLevelHistogram> ossimHistogramRemapper::getHistogram()const
+{
+   return ossimRefPtr<const ossimMultiResLevelHistogram>(theHistogram.get());
+}
+
+ossimRefPtr<ossimHistogram>
+ossimHistogramRemapper::getHistogram(ossim_uint32 zero_based_band,
+                                     ossim_uint32 res_level) const
+{
+   ossim_uint32 histogram_band = getHistogramBand(zero_based_band);
+   
+   if(!theHistogram.valid())
+   {
+      const ossimHistogramSource* source = dynamic_cast<const ossimHistogramSource*>(getInput(1));
+      if(source)
+      {
+         theHistogram = const_cast<ossimHistogramSource*>(source)->getHistogram();
+      }      
+   }
+   
+   if (theHistogram.valid())
+   {
+      if (histogram_band < theHistogram->getNumberOfBands())
+      {
+         return theHistogram->getHistogram(histogram_band, res_level);
+      }
+   }
+	
+   return 0;
+}
+
+ossimFilename ossimHistogramRemapper::getHistogramFile() const
+{
+   if (theHistogram.valid())
+   {
+      return theHistogram->getHistogramFile();
+   }
+	
+   return ossimFilename::NIL;
+}
+
+ossim_uint32
+ossimHistogramRemapper::getHistogramBand(ossim_uint32 input_band) const
+{
+   if(theResetBandIndicesFlag) return input_band;
+   vector<ossim_uint32> bandList;
+   getOutputBandList(bandList);
+   
+   const ossim_uint32 BANDS = (ossim_uint32)bandList.size();
+	
+   if (BANDS == 0)
+   {
+      return 0;
+   }
+	
+   return bandList[input_band];
+}
+
+ossimString ossimHistogramRemapper::getLongName()const
+{
+   return ossimString("Histogram Remapper, filter with controls for histogram stretching.");
+}
+
+ossimString ossimHistogramRemapper::getShortName()const
+{
+   return ossimString("Histogram Remapper");
+}
+
+// Private to disallow use...
+ossimHistogramRemapper::ossimHistogramRemapper(const ossimHistogramRemapper&)
+{
+}
+
+// Private to disallow use...
+ossimHistogramRemapper& ossimHistogramRemapper::operator=(const ossimHistogramRemapper&)
+{
+   return *this;
+}
+
+void ossimHistogramRemapper::setBypassFlag(bool flag)
+{
+   if (theBypassFlag != flag)
+   {
+      //---
+      // If switching from bypassed to enabled set
+      // the dirty flag.  We don't care about going the other way.
+      //---
+      if ( theBypassFlag && !flag )
+      {
+         theDirtyFlag = true;
+      }
+      theBypassFlag = flag;
+   }
+}
+
+double ossimHistogramRemapper::getMinPixelValue(ossim_uint32 band)const
+{
+   double result = ossimTableRemapper::getMinPixelValue(band);
+   if(theEnableFlag&&!theBypassFlag &&(band < theMinOutputValue.size()))
+   {
+      result = theMinOutputValue[band];
+   }
+  // if(theOutputScalarType != OSSIM_SCALAR_UNKNOWN)
+  // {
+  //    return ossim::defaultMin(theOutputScalarType);
+  // }
+
+   return result;
+}
+
+double ossimHistogramRemapper::getMaxPixelValue(ossim_uint32 band)const
+{
+   double result = ossimTableRemapper::getMaxPixelValue(band);
+
+   if(theEnableFlag&&!theBypassFlag &&(band < theMaxOutputValue.size()))
+   {
+      result = theMaxOutputValue[band];
+   }
+   //if(theOutputScalarType != OSSIM_SCALAR_UNKNOWN)
+  // {
+  //    result = ossim::defaultMax(theOutputScalarType);
+  // }
+
+   return result;
+}
+
+bool ossimHistogramRemapper::canConnectMyInputTo(ossim_int32 inputIndex,
+                                                 const ossimConnectableObject* object)const
+{
+   // we will alloe the histogram source only to be connected to input slot 2 and
+   // the first slot will be reserved for the ossimImageSource.
+   //
+   bool result = false;
+   if(inputIndex == 0) result = dynamic_cast<const ossimImageSource*>(object)!=0;
+   if(inputIndex == 1) result = dynamic_cast<const ossimHistogramSource*>(object)!=0;
+   
+   return result;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimHistogramThreshholdFilter.cpp b/ossim/src/ossim/imaging/ossimHistogramThreshholdFilter.cpp
new file mode 100644
index 0000000..549cf9e
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimHistogramThreshholdFilter.cpp
@@ -0,0 +1,261 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimHistogramThreshholdFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimHistogramThreshholdFilter.h>
+#include <ossim/base/ossimMultiResLevelHistogram.h>
+#include <ossim/base/ossimMultiBandHistogram.h>
+#include <ossim/base/ossimHistogram.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeyword.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/base/ossimErrorContext.h>
+
+static const ossimKeyword MIN_VALUE_PERCENT_KW("min_percent",
+                                               "min percentage clip");
+
+static const ossimKeyword MAX_VALUE_PERCENT_KW("max_percent",
+                                               "max percentage value");
+
+
+RTTI_DEF1(ossimHistogramThreshholdFilter, "ossimHistogramThreshholdFilter", ossimImageSourceHistogramFilter)
+   
+ossimHistogramThreshholdFilter::ossimHistogramThreshholdFilter()
+   : ossimImageSourceHistogramFilter(),
+     theMinValuePercent(0.0),
+     theMaxValuePercent(0.0)
+{
+}
+
+ossimHistogramThreshholdFilter::ossimHistogramThreshholdFilter(double minValuePercent,
+                                                               double maxValuePercent,
+                                                               ossimImageSource* inputSource,
+                                                               ossimMultiResLevelHistogram* histogram)
+   : ossimImageSourceHistogramFilter(inputSource, histogram),
+     theMinValuePercent(minValuePercent),
+     theMaxValuePercent(maxValuePercent)
+{
+}
+
+ossimHistogramThreshholdFilter::~ossimHistogramThreshholdFilter()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimHistogramThreshholdFilter::getTile(
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   if(!theInputConnection) return NULL;
+   
+   ossimRefPtr<ossimImageData> inputTile =
+      theInputConnection->getTile(tileRect, resLevel);
+
+   if(!isSourceEnabled())
+   {
+      return inputTile;
+   }
+   if(inputTile.valid()  &&
+      inputTile->getBuf() &&
+      (inputTile->getDataObjectStatus()!=OSSIM_EMPTY))
+   {
+      switch(inputTile->getScalarType())
+      {
+         case OSSIM_UCHAR:
+         {
+            return runThreshholdStretchAlgorithm((ossim_uint8)0,
+                                                 inputTile);
+         }
+         case OSSIM_USHORT16:
+         case OSSIM_USHORT11:
+         {
+            return runThreshholdStretchAlgorithm((ossim_uint16)0,
+                                                 inputTile);
+         }
+         case OSSIM_SSHORT16:
+         {
+            return runThreshholdStretchAlgorithm(static_cast<ossim_sint16>(0),
+                                                 inputTile);
+         }
+         case OSSIM_DOUBLE:
+         case OSSIM_NORMALIZED_DOUBLE:
+         {
+            return runThreshholdStretchAlgorithm(static_cast<double>(0),
+                                                 inputTile);
+         }
+         case OSSIM_FLOAT:
+         case OSSIM_NORMALIZED_FLOAT:
+         {
+            return runThreshholdStretchAlgorithm(static_cast<float>(0),
+                                                 inputTile);
+         }
+         case OSSIM_SCALAR_UNKNOWN:
+         default:
+         {
+            ossimSetError("ossimHistogramThreshholdFilter",
+                          ossimErrorCodes::OSSIM_ERROR,
+                          "Unknown scalar type");
+            break;
+         }
+      }
+   }
+
+   return inputTile;
+}
+
+
+bool ossimHistogramThreshholdFilter::loadState(const ossimKeywordlist& kwl,
+                                           const char* prefix)
+{
+   if(ossimImageSourceHistogramFilter::loadState(kwl, prefix))
+   {
+      const char* minPercent = kwl.find(prefix, MIN_VALUE_PERCENT_KW);
+      const char* maxPercent = kwl.find(prefix, MAX_VALUE_PERCENT_KW);
+
+      if(minPercent)
+      {
+         theMinValuePercent = ossimString(minPercent).toDouble();
+      }
+      else
+      {
+         theMinValuePercent = 0.0;
+      }
+      if(maxPercent)
+      {
+         theMaxValuePercent = ossimString(maxPercent).toDouble();
+      }
+      else
+      {
+         theMaxValuePercent = 0.0;
+      }
+   }
+   else
+   {
+      return false;
+   }
+
+   return true;
+}
+
+bool ossimHistogramThreshholdFilter::saveState(ossimKeywordlist& kwl,
+                                           const char* prefix)const
+{
+   if(ossimImageSourceHistogramFilter::saveState(kwl, prefix))
+   {
+      kwl.add(prefix,
+              MIN_VALUE_PERCENT_KW,
+              theMinValuePercent,
+              true);
+      kwl.add(prefix,
+              MAX_VALUE_PERCENT_KW,
+              theMaxValuePercent,
+              true);
+   }
+   else
+   {
+      return false;
+   }
+
+   return true;
+}
+
+void ossimHistogramThreshholdFilter::initialize()
+{
+   ossimImageSourceHistogramFilter::initialize();
+}
+
+template <class T>
+ossimRefPtr<ossimImageData> ossimHistogramThreshholdFilter::runThreshholdStretchAlgorithm(
+   T /* dummyVariable */,
+   ossimRefPtr<ossimImageData>& tile)
+{
+   if(!getHistogram())
+   {
+      return tile;
+   }
+   
+   ossimRefPtr<ossimMultiBandHistogram> histo    = getHistogram()->getMultiBandHistogram(0);
+   if(histo.valid())
+   {
+      ossim_uint32 maxBands = ( (histo->getNumberOfBands() >
+                                 tile->getNumberOfBands())?
+                                tile->getNumberOfBands():
+                                histo->getNumberOfBands());
+      
+      long offsetUpperBound = tile->getHeight()*tile->getWidth();
+
+      for(ossim_uint32 band = 0; band < maxBands; ++band)
+      {
+         ossimRefPtr<ossimHistogram> h  = histo->getHistogram(band);
+         T* buf   = static_cast<T*>(tile->getBuf(band));
+         
+         if(h.valid()&&buf)
+         {
+            T np     = static_cast<T>(tile->getNullPix(band));
+            T minPix = static_cast<T>(tile->getMinPix(band));
+            T maxPix = static_cast<T>(tile->getMaxPix(band));
+            double range  = (maxPix - minPix);
+            double maxClip = (h->HighClipVal(theMaxValuePercent/100.0)/(double)h->GetRes());
+            double minClip = (h->LowClipVal(theMinValuePercent/100.0)/(double)h->GetRes());
+            ossim_float64 normPix;
+            double delta   = fabs(maxClip - minClip);
+            if(delta > 0.0)
+            {
+               for(long offset = 0; offset < offsetUpperBound; ++offset)
+               {
+                  if(buf[offset] != np)
+                  {
+                     normPix = ((double)buf[offset]-minPix)/range;
+                     if(normPix <= minClip)
+                     {
+                        buf[offset] = minPix;
+                     }
+                     else if(normPix >= maxClip)
+                     {
+                        buf[offset] = maxPix;
+                     }
+                     else 
+                     {
+                        double t = (normPix - minClip)/delta;
+                        T value = static_cast<T>(minPix + range*t);
+                        buf[offset] = value;
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+      tile->validate();
+   }
+   
+   return tile;
+}
+
+void ossimHistogramThreshholdFilter::setMinValuePercent(double minValue)
+{
+   theMinValuePercent = minValue;
+}
+
+void ossimHistogramThreshholdFilter::setMaxValuePercent(double maxValue)
+{
+   theMaxValuePercent = maxValue;
+}
+
+double ossimHistogramThreshholdFilter::getMinValuePercent()const
+{
+   return theMinValuePercent;
+}
+
+double ossimHistogramThreshholdFilter::getMaxValuePercent()const
+{
+   return theMaxValuePercent;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimHistogramWriter.cpp b/ossim/src/ossim/imaging/ossimHistogramWriter.cpp
new file mode 100644
index 0000000..b923323
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimHistogramWriter.cpp
@@ -0,0 +1,310 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimHistogramWriter.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/base/ossimProcessListener.h>
+#include <ossim/imaging/ossimHistogramWriter.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/imaging/ossimImageSourceSequencer.h>
+#include <ossim/base/ossimMultiResLevelHistogram.h>
+#include <ossim/base/ossimMultiBandHistogram.h>
+#include <ossim/imaging/ossimImageHistogramSource.h>
+#include <ossim/base/ossimTrace.h>
+
+static ossimTrace traceDebug("ossimHistogramWriter:debug");
+class ossimHistogramWriterProcessListener : public ossimProcessListener
+{
+public:
+   ossimHistogramWriterProcessListener(ossimConnectableObject* passon)
+      :thePassonTo(passon)
+      {
+      }
+   virtual void processProgressEvent(ossimProcessProgressEvent& event)
+      {
+         if(thePassonTo)
+         {
+            event.setObject(thePassonTo);
+            thePassonTo->fireEvent(event);
+         }
+      }
+
+   ossimConnectableObject* thePassonTo;  
+   
+};
+
+RTTI_DEF3(ossimHistogramWriter,
+          "ossimHistogramWriter",
+          ossimOutputSource,
+          ossimProcessInterface,
+          ossimConnectableObjectListener);
+
+ossimHistogramWriter::ossimHistogramWriter(ossimImageSource* inputSource,
+                                           ossimObject* owner)
+   : ossimOutputSource(owner,
+                       1,
+                       0,
+                       true,
+                       false),
+     theAreaOfInterest(),
+     theFilename(),
+     theFileStream(0),
+     theProcessListener(0),
+     theHistogramSource(0)
+{
+   theProcessListener = new ossimHistogramWriterProcessListener(this);
+   
+   theAreaOfInterest.makeNan();
+   connectMyInputTo(0, inputSource);
+}
+
+ossimHistogramWriter::~ossimHistogramWriter()
+{
+   if(isOpen())
+   {
+      close();
+   }
+   if(theProcessListener)
+   {
+      delete theProcessListener;
+      theProcessListener = 0;
+   }
+
+   // This does not need to be deleted here.  Simply stored for abort.
+   if (theHistogramSource)
+   {
+      theHistogramSource = 0;
+   }
+}
+
+void ossimHistogramWriter::setAreaOfInterest(const ossimIrect& rect)
+{
+   theAreaOfInterest = rect;
+}
+
+ossimObject* ossimHistogramWriter::getObject()
+{
+   return this;
+}
+
+bool ossimHistogramWriter::isOpen()const
+{
+   return (theFileStream != 0);
+}
+
+bool ossimHistogramWriter::open()
+{
+   if(isOpen())
+   {
+      close();
+   }
+   
+   theFileStream = new std::ofstream(theFilename.c_str());
+   
+   return theFileStream->good();
+}
+
+bool ossimHistogramWriter::open(const ossimFilename& filename)
+{
+   return ossimOutputSource::open(filename);
+}
+
+void ossimHistogramWriter::close()
+{
+   delete theFileStream;
+   theFileStream = 0;
+}
+
+void ossimHistogramWriter::setOutputName(const ossimString& outputName)
+{
+   ossimOutputSource::setOutputName(outputName);
+   setFilename(outputName);
+}
+
+void ossimHistogramWriter::setFilename(const ossimFilename& filename)
+{
+   theFilename = filename;
+}
+   
+bool ossimHistogramWriter::canConnectMyInputTo(
+   ossim_int32 inputIndex, const ossimConnectableObject* object)const
+{
+   return (object&&(inputIndex == 0)&& 
+           (PTR_CAST(ossimHistogramSource, object)||
+            PTR_CAST(ossimImageSource, object)));
+}
+
+const ossimObject* ossimHistogramWriter::getObject()const
+{
+   return this;
+}
+
+void ossimHistogramWriter::processProgressEvent(
+   ossimProcessProgressEvent& event)
+{
+   // we will raise the event if its coming from our
+   // input.  This means that we are connected to a
+   // ossimHistogramSource.
+   //
+   if(event.getObject() != this)
+   {
+      ossimProcessInterface::setCurrentMessage(event.getMessage());
+      setPercentComplete(event.getPercentComplete());
+   }
+}
+
+void ossimHistogramWriter::connectInputEvent(
+   ossimConnectionEvent& event)
+{
+   if(event.getObject() == this)
+   {
+      if(event.getOldObject())
+      {
+         event.getOldObject()->removeListener((ossimProcessListener*)this);
+      }
+      if(getInput(0)&&
+         PTR_CAST(ossimHistogramSource, getInput(0)))
+      {
+         getInput(0)->addListener( (ossimProcessListener*)this);
+      }
+   }
+}
+
+void ossimHistogramWriter::disconnectInputEvent(
+   ossimConnectionEvent& event)
+{
+   if(event.getOldObject()&&
+      PTR_CAST(ossimHistogramSource, getInput(0)))
+   {
+      event.getOldObject()->removeListener((ossimProcessListener*)this);
+   }
+}
+
+bool ossimHistogramWriter::saveState(ossimKeywordlist& kwl,
+                                     const char* prefix)const
+{
+   bool result = ossimOutputSource::saveState(kwl, prefix);
+
+
+   return result;
+}
+
+bool ossimHistogramWriter::loadState(const ossimKeywordlist& kwl,
+                                     const char* prefix)
+{
+   bool result = ossimOutputSource::loadState(kwl, prefix);
+
+   if(result)
+   {
+      if(!getNumberOfInputs())
+      {
+         setNumberOfInputs(1);
+      }
+   }
+
+   return result;
+}
+
+bool ossimHistogramWriter::execute()
+{
+   writeHistogram();
+   
+   return true;
+}
+
+void ossimHistogramWriter::writeHistogram()
+{
+   if(!getInput(0))
+   {
+      cerr << "ossimHistogramWriter::writeHistogram is not connected" << endl;
+      return;
+   }
+   ossimHistogramSource* histoSource = PTR_CAST(ossimHistogramSource, getInput(0));
+   bool deleteHistoSource = false;
+   if(!histoSource)
+   {
+      histoSource = new ossimImageHistogramSource;
+      histoSource->connectMyInputTo(0, getInput(0));
+      histoSource->enableSource();
+      deleteHistoSource = true;
+
+      //---
+      // Capture the pointer for abort call.  Note a ossimHistogramSource has
+      // no abort so the abort will only work through the
+      // ossimImageHistogramSource pointer.
+      //---
+      theHistogramSource = (ossimImageHistogramSource*)histoSource;
+   }
+
+   // Capture the pointer for abort call.
+   theHistogramSource = histoSource;
+   
+   histoSource->addListener( theProcessListener);
+   
+   ossimRefPtr<ossimMultiResLevelHistogram> histo = histoSource->getHistogram();
+
+   // Don't write histogram if abort flag was set...
+   if(histo.valid() && !isAborted() )
+   {
+      ossimKeywordlist kwl;
+      histo->saveState(kwl);
+      if(!isOpen())
+      {
+         open();
+         if(!isOpen())
+         {
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_WARN) << "unable to open file " << theFilename << endl;
+            }
+         }
+      }
+      if( isOpen() )
+      {
+         kwl.writeToStream(*theFileStream);
+      }
+   }
+   histoSource->removeListener(theProcessListener);
+   
+   if(deleteHistoSource)
+   {
+      delete histoSource;
+      histoSource = 0;
+   }
+   theHistogramSource = 0;
+   
+   close();
+}
+
+void ossimHistogramWriter::abort()
+{
+   //---
+   // Call base abort. This sets the status to PROCESS_STATUS_ABORT_REQUEST so the processor
+   // knows to abort.
+   //---
+   ossimProcessInterface::abort();
+
+   // Propagate to histo source.
+   if (theHistogramSource)
+   {
+      ossimImageHistogramSource* histoSource =
+         PTR_CAST(ossimImageHistogramSource, theHistogramSource);
+      if (histoSource)
+      {
+         histoSource->abort();
+      }
+   }
+
+   //---
+   // Now set status to "ABORTED" so ossimProcessInterface::isAborted returns true so the
+   // writeHistogram method doesn't write the file if the process was aborted.
+   //---
+   setProcessStatus(PROCESS_STATUS_ABORTED);
+}
+
diff --git a/ossim/src/ossim/imaging/ossimHsiRemapper.cpp b/ossim/src/ossim/imaging/ossimHsiRemapper.cpp
new file mode 100644
index 0000000..9387a24
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimHsiRemapper.cpp
@@ -0,0 +1,3193 @@
+//*******************************************************************
+// Copyright (C) 2002 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Remapper to adjust hue, saturation and intensity.
+//
+//*************************************************************************
+// $Id: ossimHsiRemapper.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstdlib>
+#include <ossim/imaging/ossimHsiRemapper.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimNormRgbVector.h>
+#include <ossim/base/ossimHsiVector.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimNumericProperty.h>
+
+RTTI_DEF1(ossimHsiRemapper, "ossimHsiRemapper", ossimImageSourceFilter)
+
+static ossimTrace traceDebug("ossimHsiRemapper:debug");
+
+//***
+// State keywords:
+//***
+static const char MASTER_HUE_OFFSET_KW[] = "hsi_master_hue_offset";
+static const char MASTER_SATURATION_OFFSET_KW[] = "hsi_master_saturation_offset";
+static const char MASTER_INTENSITY_OFFSET_KW[] = "hsi_master_intensity_offset";
+static const char MASTER_INTENSITY_LOW_CLIP_KW[] = "hsi_master_intensity_low_clip";
+static const char MASTER_INTENSITY_HIGH_CLIP_KW[] = "hsi_master_intensity_high_clip";
+
+static const char RED_HUE_OFFSET_KW[] = "hsi_red_hue_offset";
+static const char RED_HUE_LOW_RANGE_KW[] = "hsi_red_hue_low_range";
+static const char RED_HUE_HIGH_RANGE_KW[] = "hsi_red_hue_high_range";
+static const char RED_HUE_BLEND_RANGE_KW[] = "hsi_red_hue_blend_range";
+static const char RED_SATURATION_OFFSET_KW[] = "hsi_red_saturation_offset";
+static const char RED_INTENSITY_OFFSET_KW[] = "hsi_red_intensity_offset";
+
+static const char YELLOW_HUE_OFFSET_KW[] = "hsi_yellow_hue_offset";
+static const char YELLOW_HUE_LOW_RANGE_KW[] = "hsi_yellow_hue_low_range";
+static const char YELLOW_HUE_HIGH_RANGE_KW[] = "hsi_yellow_hue_high_range";
+static const char YELLOW_HUE_BLEND_RANGE_KW[] = "hsi_yellow_hue_blend_range";
+static const char YELLOW_SATURATION_OFFSET_KW[] = "hsi_yellow_saturation_offset";
+static const char YELLOW_INTENSITY_OFFSET_KW[] = "hsi_yellow_intensity_offset";
+
+static const char GREEN_HUE_OFFSET_KW[] = "hsi_green_hue_offset";
+static const char GREEN_HUE_LOW_RANGE_KW[] = "hsi_green_hue_low_range";
+static const char GREEN_HUE_HIGH_RANGE_KW[] = "hsi_green_hue_high_range";
+static const char GREEN_HUE_BLEND_RANGE_KW[] = "hsi_green_hue_blend_range";
+static const char GREEN_SATURATION_OFFSET_KW[] = "hsi_green_saturation_offset";
+static const char GREEN_INTENSITY_OFFSET_KW[] = "hsi_green_intensity_offset";
+
+static const char CYAN_HUE_OFFSET_KW[] = "hsi_cyan_hue_offset";
+static const char CYAN_HUE_LOW_RANGE_KW[] = "hsi_cyan_hue_low_range";
+static const char CYAN_HUE_HIGH_RANGE_KW[] = "hsi_cyan_hue_high_range";
+static const char CYAN_HUE_BLEND_RANGE_KW[] = "hsi_cyan_hue_blend_range";
+static const char CYAN_SATURATION_OFFSET_KW[] = "hsi_cyan_saturation_offset";
+static const char CYAN_INTENSITY_OFFSET_KW[] = "hsi_cyan_intensity_offset";
+
+static const char BLUE_HUE_OFFSET_KW[] = "hsi_blue_hue_offset";
+static const char BLUE_HUE_LOW_RANGE_KW[] = "hsi_blue_hue_low_range";
+static const char BLUE_HUE_HIGH_RANGE_KW[] = "hsi_blue_hue_high_range";
+static const char BLUE_HUE_BLEND_RANGE_KW[] = "hsi_blue_hue_blend_range";
+static const char BLUE_SATURATION_OFFSET_KW[] = "hsi_blue_saturation_offset";
+static const char BLUE_INTENSITY_OFFSET_KW[] = "hsi_blue_intensity_offset";
+
+static const char MAGENTA_HUE_OFFSET_KW[] = "hsi_magenta_hue_offset";
+static const char MAGENTA_HUE_LOW_RANGE_KW[] = "hsi_magenta_hue_low_range";
+static const char MAGENTA_HUE_HIGH_RANGE_KW[] = "hsi_magenta_hue_high_range";
+static const char MAGENTA_HUE_BLEND_RANGE_KW[] = "hsi_magenta_hue_blend_range";
+static const char MAGENTA_SATURATION_OFFSET_KW[] = "hsi_magenta_saturation_offset";
+static const char MAGENTA_INTENSITY_OFFSET_KW[] = "hsi_magenta_intensity_offset";
+
+static const char WHITE_OBJECT_CLIP_KW[] = "hsi_white_object_clip";
+
+static const double DEFAULT_BLEND = 15.0;
+static const double MAX_BLEND     = 30.0;
+
+ossimHsiRemapper::ossimHsiRemapper()
+   :
+      ossimImageSourceFilter      (),  // base class
+      
+      theTile                     (NULL),
+      theBuffer                   (NULL),
+      theNormalizedMinPix         (0.0),
+
+      theMasterHueOffset          (0.0),
+      theMasterSaturationOffset   (0.0),
+      theMasterIntensityOffset    (0.0),
+      theMasterIntensityLowClip   (0.0),
+      theMasterIntensityHighClip  (1.0),
+      
+      theRedHueOffset             (0.0),
+      theRedHueLowRange           (-30.0),
+      theRedHueHighRange          (30.0),
+      theRedHueBlendRange         (DEFAULT_BLEND),
+      theRedSaturationOffset      (0.0),
+      theRedIntensityOffset       (0.0),
+      
+      theYellowHueOffset          (0.0),
+      theYellowHueLowRange        (30.0),
+      theYellowHueHighRange       (90.0),
+      theYellowHueBlendRange      (DEFAULT_BLEND),
+      theYellowSaturationOffset   (0.0),
+      theYellowIntensityOffset    (0.0),
+      
+      theGreenHueOffset           (0.0),
+      theGreenHueLowRange         (90.0),
+      theGreenHueHighRange        (150.0),
+      theGreenHueBlendRange       (DEFAULT_BLEND),
+      theGreenSaturationOffset    (0.0),
+      theGreenIntensityOffset     (0.0),
+      
+      theCyanHueOffset            (0.0),
+      theCyanHueLowRange          (150.0),
+      theCyanHueHighRange         (210.0),
+      theCyanHueBlendRange        (DEFAULT_BLEND),
+      theCyanSaturationOffset     (0.0),
+      theCyanIntensityOffset      (0.0),
+      
+      theBlueHueOffset            (0.0),
+      theBlueHueLowRange          (210.0),
+      theBlueHueHighRange         (270.0),
+      theBlueHueBlendRange        (DEFAULT_BLEND),
+      theBlueSaturationOffset     (0.0),
+      theBlueIntensityOffset      (0.0),
+      
+      theMagentaHueOffset         (0.0),
+      theMagentaHueLowRange       (270.0),
+      theMagentaHueHighRange      (330.0),
+      theMagentaHueBlendRange     (DEFAULT_BLEND),
+      theMagentaSaturationOffset  (0.0),
+      theMagentaIntensityOffset   (0.0),
+
+      theWhiteObjectClip          (1.0)
+{
+   //***
+   // Set the base class "theEnableFlag" to off since no adjustments have been
+   // made yet.
+   //***
+   //disableSource();
+   theValidFlag = false;
+   // Construction not complete.
+}
+
+ossimHsiRemapper::~ossimHsiRemapper()
+{
+   theTile = NULL;
+   if (theBuffer)
+   {
+      delete [] theBuffer;
+      theBuffer = NULL;
+   }
+}
+
+ossimRefPtr<ossimImageData> ossimHsiRemapper::getTile(
+   const ossimIrect& tile_rect,
+   ossim_uint32 resLevel)
+{
+   if(!theInputConnection)
+   {
+      return ossimRefPtr<ossimImageData>();
+   }
+
+   // Fetch tile from pointer from the input source.
+   ossimRefPtr<ossimImageData> inputTile = theInputConnection->getTile(
+      tile_rect, resLevel);
+
+   // Check for remap bypass or a null tile return from input:
+   if (!isSourceEnabled() || !inputTile||!theValidFlag)
+   {
+      return inputTile;
+   }
+
+   // Check for first time through or size change.
+   if ( !theTile.valid() ||  
+        tile_rect.height() != theTile->getHeight() ||
+        tile_rect.width()  != theTile->getWidth() )
+   {
+      allocate(tile_rect);
+   }
+
+   //---
+   // Set the image rectangle of the tile.
+   // Note that this will resize the tiles buffers if 
+   theTile->setImageRectangle(tile_rect);
+
+   // Get its status.
+   ossimDataObjectStatus tile_status = inputTile->getDataObjectStatus();
+   if ( (tile_status == OSSIM_NULL) || (tile_status == OSSIM_EMPTY) )
+   {
+      theTile->makeBlank();
+      return theTile;
+   }
+
+   double* rgbBuf[3];
+   const ossim_uint32 PPT = theTile->getSizePerBand();  // Pixels Per Tile
+
+   rgbBuf[0] = theBuffer;
+   rgbBuf[1] = &(theBuffer[PPT]);
+   rgbBuf[2] = &(rgbBuf[1][PPT]);
+   
+   switch(inputTile->getNumberOfBands())
+   {
+      case 1:
+      case 2:
+      {
+         // Copy the first band only.
+         inputTile->copyTileBandToNormalizedBuffer(0, rgbBuf[0]);
+         memcpy(rgbBuf[1], rgbBuf[0], PPT*sizeof(double));
+         memcpy(rgbBuf[2], rgbBuf[0], PPT*sizeof(double));
+	 break;
+      }
+      case 3:
+      {
+         inputTile->copyTileToNormalizedBuffer(theBuffer);
+         break;
+      }
+      default:
+      {
+         inputTile->copyTileBandToNormalizedBuffer(0, rgbBuf[0]);
+         inputTile->copyTileBandToNormalizedBuffer(1, rgbBuf[1]);
+         inputTile->copyTileBandToNormalizedBuffer(2, rgbBuf[2]);
+	 break;
+      }
+   }   
+
+   ossimNormRgbVector rgb;
+   ossimHsiVector     hsi;
+   double r = 0.0;
+   double g = 0.0;
+   double b = 0.0;
+   double h = 0.0;
+   double s = 0.0;
+   double i = 0.0;
+   ossim_uint32 idx;
+   // Convert the rgb value to hsi and adjust values.
+   for (idx=0; idx<PPT; ++idx)
+   {
+      r = rgbBuf[0][idx];
+      g = rgbBuf[1][idx];
+      b = rgbBuf[2][idx];
+      
+      rgb = ossimNormRgbVector(r,g,b);
+      hsi = rgb;
+
+      h   = hsi.getH();
+      s   = hsi.getS();
+      i   = hsi.getI();
+      
+      if(i > FLT_EPSILON)
+      {
+         double h_offset = theMasterHueOffset;
+         double s_offset = theMasterSaturationOffset;
+         double i_offset = theMasterIntensityOffset;
+
+         //***
+         // Note:  For the purpose of checking to see if in the red range,
+         //        make the hue negative if it's >= 315.0 and < 360.0.
+         //        The red low and high ranges are stored in the same manner.
+         //***
+         double red_hue  = h;
+         if (red_hue  >= 315.0 && red_hue  < 360.0) red_hue  = red_hue - 360.0;
+                          
+         if ( red_hue >= theRedHueLowRange && red_hue <= theRedHueHighRange)
+         {
+            // Adjust the reds.
+            
+            double bf = 1.0; // blend factor
+            if ( red_hue < (theRedHueLowRange + theRedHueBlendRange) )
+            {
+               bf = (red_hue - theRedHueLowRange) / theRedHueBlendRange;
+            }
+            else if ( red_hue > (theRedHueHighRange - theRedHueBlendRange) )
+            {
+               bf = (theRedHueHighRange - red_hue) / theRedHueBlendRange;
+            }
+            
+            h_offset += (theRedHueOffset        * bf);
+            s_offset += (theRedSaturationOffset * bf);
+            i_offset += (theRedIntensityOffset  * bf);
+         }
+            
+         if (h >= theYellowHueLowRange && h <= theYellowHueHighRange) 
+         {
+            // Adjust the yellows.
+            
+            double bf = 1.0; // blend factor
+            if ( h < (theYellowHueLowRange + theYellowHueBlendRange) )
+            {
+               bf = (h - theYellowHueLowRange) / theYellowHueBlendRange;
+            }
+            else if ( h > (theYellowHueHighRange - theYellowHueBlendRange) )
+            {
+               bf = (theYellowHueHighRange - h) / theYellowHueBlendRange;
+            }
+            
+            h_offset += (theYellowHueOffset        * bf);
+            s_offset += (theYellowSaturationOffset * bf);
+            i_offset += (theYellowIntensityOffset  * bf);
+         }
+         
+         if (h >= theGreenHueLowRange && h <= theGreenHueHighRange) 
+         {
+            // Adjust the greens. 
+
+            double bf = 1.0; // blend factor
+            if ( h < (theGreenHueLowRange + theGreenHueBlendRange) )
+            {
+               bf = (h - theGreenHueLowRange) / theGreenHueBlendRange;
+            }
+            else if ( h > (theGreenHueHighRange - theGreenHueBlendRange) )
+            {
+               bf = (theGreenHueHighRange - h) / theGreenHueBlendRange;
+            }
+            
+            h_offset += (theGreenHueOffset        * bf);
+            s_offset += (theGreenSaturationOffset * bf);
+            i_offset += (theGreenIntensityOffset  * bf);
+         }
+
+         if (h >= theCyanHueLowRange && h <= theCyanHueHighRange) 
+         {
+            // Adjust the cyans.
+            
+            double bf = 1.0; // blend factor
+            if ( h < (theCyanHueLowRange + theCyanHueBlendRange) )
+            {
+               bf = (h - theCyanHueLowRange) / theCyanHueBlendRange;
+            }
+            else if ( h > (theCyanHueHighRange - theCyanHueBlendRange) )
+            {
+               bf = (theCyanHueHighRange - h) / theCyanHueBlendRange;
+            }
+            
+            h_offset += (theCyanHueOffset        * bf);
+            s_offset += (theCyanSaturationOffset * bf);
+            i_offset += (theCyanIntensityOffset  * bf);
+         }
+
+         if (h >= theBlueHueLowRange && h <= theBlueHueHighRange) 
+         {
+            // Adjust the blues.
+            
+            double bf = 1.0; // blend factor
+            if ( h < (theBlueHueLowRange + theBlueHueBlendRange) )
+            {
+               bf = (h - theBlueHueLowRange) / theBlueHueBlendRange;
+            }
+            else if ( h > (theBlueHueHighRange - theBlueHueBlendRange) )
+            {
+               bf = (theBlueHueHighRange - h) / theBlueHueBlendRange;
+            }
+            
+            h_offset += (theBlueHueOffset        * bf);
+            s_offset += (theBlueSaturationOffset * bf);
+            i_offset += (theBlueIntensityOffset  * bf);
+         }
+
+         if (h >= theMagentaHueLowRange && h <= theMagentaHueHighRange) 
+         {
+            // Adjust the magentas.
+            
+            double bf = 1.0; // blend factor
+            if ( h < (theMagentaHueLowRange + theMagentaHueBlendRange) )
+            {
+               bf = (h - theMagentaHueLowRange) / theMagentaHueBlendRange;
+            }
+            else if ( h > (theMagentaHueHighRange - theMagentaHueBlendRange) )
+            {
+               bf = (theMagentaHueHighRange - h) / theMagentaHueBlendRange;
+            }
+            
+            h_offset += (theMagentaHueOffset        * bf);
+            s_offset += (theMagentaSaturationOffset * bf);
+            i_offset += (theMagentaIntensityOffset  * bf);
+         }
+         
+         // Apply the hue offset.
+         h += h_offset;
+
+         // Make sure the hue is between 0 and 360...
+         if (h < 0.0) h += 360.0;
+         else if (h >= 360) h -= 360.0;
+
+         // Apply the saturation offset clamping/clipping to 0.0/1.0.
+         s += s_offset;
+         s = (s > 0.0 ? (s < 1.0 ? s : 1.0) : 0.0);
+         
+         // Apply the intensity offset clamping/clipping to 0.0/1.0.
+         i += i_offset;
+         i = (i > 0.0 ? (i < 1.0 ? i : 1.0) : 0.0);
+
+         // Stretch the intensity channel.
+//          i = (i - theMasterIntensityLowClip) *
+//              ( 1.0 / (theMasterIntensityHighClip -
+//                       theMasterIntensityLowClip) );
+         i = (i - theMasterIntensityLowClip)/(theMasterIntensityHighClip -
+                                              theMasterIntensityLowClip);
+         
+         hsi.setH(h);
+         hsi.setS(s);
+         hsi.setI(i);
+
+         rgb = hsi;
+         
+         r = rgb.getR();
+         g = rgb.getG();
+         b = rgb.getB();
+         if ( (theWhiteObjectClip < 1.0) &&
+              (r > theWhiteObjectClip)   &&
+              (g > theWhiteObjectClip)   &&
+              (b > theWhiteObjectClip) )
+         {
+            r = theWhiteObjectClip;
+            g = theWhiteObjectClip;
+            b = theWhiteObjectClip;
+         }
+         // Do min/max range check and assign back to buffer.
+         rgbBuf[0][idx] = r > theNormalizedMinPix ? (r < 1.0 ? r : 1.0) :
+            theNormalizedMinPix;
+         rgbBuf[1][idx] = g > theNormalizedMinPix ? (g < 1.0 ? g : 1.0) :
+            theNormalizedMinPix;
+         rgbBuf[2][idx] = b > theNormalizedMinPix ? (b < 1.0 ? b : 1.0) :
+            theNormalizedMinPix;
+      } // End of "if(i > FLT_EPSILON)"
+      else
+      {
+         rgbBuf[0][idx] = 0.0;
+         rgbBuf[1][idx] = 0.0;
+         rgbBuf[2][idx] = 0.0;
+      }
+         
+   }  // End of loop through pixels in a tile.
+   // Copy the buffer to the output tile.
+   theTile->copyNormalizedBufferToTile(theBuffer);
+   
+   // Update the tile status.
+   theTile->validate();
+
+   return theTile;
+}
+
+void ossimHsiRemapper::initialize()
+{
+   ossimImageSourceFilter::initialize();
+   if (theTile.valid())
+   {
+      theTile = NULL;
+      if(theBuffer)
+      {
+         delete []theBuffer;
+         theBuffer = NULL;
+      }
+   }
+}
+
+void ossimHsiRemapper::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property.valid()) return;
+   ossimString name = property->getName();
+   if(name == MASTER_HUE_OFFSET_KW)
+   {
+      setMasterHueOffset(property->valueToString().toDouble());
+   }
+   else if(name == MASTER_SATURATION_OFFSET_KW)
+   {
+      setMasterSaturationOffset(property->valueToString().toDouble());
+   }
+   else if(name == MASTER_INTENSITY_OFFSET_KW)
+   {
+      setMasterIntensityOffset(property->valueToString().toDouble());
+   }
+   else if(name == MASTER_INTENSITY_LOW_CLIP_KW)
+   {
+      setMasterIntensityLowClip(property->valueToString().toDouble());
+   }
+   else if(name == MASTER_INTENSITY_HIGH_CLIP_KW)
+   {
+      setMasterIntensityHighClip(property->valueToString().toDouble());
+   }
+   else if(name == RED_HUE_OFFSET_KW)
+   {
+      setRedHueOffset(property->valueToString().toDouble());
+   }
+   else if(name == RED_HUE_LOW_RANGE_KW)
+   {
+      setRedHueLowRange(property->valueToString().toDouble());
+   }
+   else if(name == RED_HUE_HIGH_RANGE_KW)
+   {
+      setRedHueHighRange(property->valueToString().toDouble());
+   }
+   else if(name == RED_HUE_BLEND_RANGE_KW)
+   {
+      setRedHueBlendRange(property->valueToString().toDouble());
+   }
+   else if(name == RED_SATURATION_OFFSET_KW)
+   {
+      setRedSaturationOffset(property->valueToString().toDouble());
+   }
+   else if(name == RED_INTENSITY_OFFSET_KW)
+   {
+      setRedIntensityOffset(property->valueToString().toDouble());
+  }
+   else if(name == YELLOW_HUE_OFFSET_KW)
+   {
+      setYellowHueOffset(property->valueToString().toDouble());
+   }
+   else if(name == YELLOW_HUE_LOW_RANGE_KW)
+   {
+      setYellowHueLowRange(property->valueToString().toDouble());
+   }
+   else if(name == YELLOW_HUE_HIGH_RANGE_KW)
+   {
+      setYellowHueHighRange(property->valueToString().toDouble());
+   }
+   else if(name == YELLOW_HUE_BLEND_RANGE_KW)
+   {
+      setYellowHueBlendRange(property->valueToString().toDouble());
+   }
+   else if(name == YELLOW_SATURATION_OFFSET_KW)
+   {
+      setYellowSaturationOffset(property->valueToString().toDouble());
+   }
+   else if(name == YELLOW_INTENSITY_OFFSET_KW)
+   {
+      setYellowIntensityOffset(property->valueToString().toDouble());
+   }
+   else if(name == GREEN_HUE_OFFSET_KW)
+   {
+      setGreenHueOffset(property->valueToString().toDouble());
+   }
+   else if(name == GREEN_HUE_LOW_RANGE_KW)
+   {
+      setGreenHueLowRange(property->valueToString().toDouble());
+   }
+   else if(name == GREEN_HUE_HIGH_RANGE_KW)
+   {
+      setGreenHueHighRange(property->valueToString().toDouble());
+   }
+   else if(name == GREEN_HUE_BLEND_RANGE_KW)
+   {
+      setGreenHueBlendRange(property->valueToString().toDouble());
+   }
+   else if(name == GREEN_SATURATION_OFFSET_KW)
+   {
+      setGreenSaturationOffset(property->valueToString().toDouble());
+   }
+   else if(name == GREEN_INTENSITY_OFFSET_KW)
+   {
+      setGreenIntensityOffset(property->valueToString().toDouble());
+   }
+   else if(name == CYAN_HUE_OFFSET_KW)
+   {
+      setCyanHueOffset(property->valueToString().toDouble());
+   }
+   else if(name == CYAN_HUE_LOW_RANGE_KW)
+   {
+      setCyanHueLowRange(property->valueToString().toDouble());
+   }
+   else if(name == CYAN_HUE_HIGH_RANGE_KW)
+   {
+      setCyanHueHighRange(property->valueToString().toDouble());
+   }
+   else if(name == CYAN_HUE_BLEND_RANGE_KW)
+   {
+      setCyanHueBlendRange(property->valueToString().toDouble());
+   }
+   else if(name == CYAN_SATURATION_OFFSET_KW)
+   {
+      setCyanSaturationOffset(property->valueToString().toDouble());
+   }
+   else if(name == CYAN_INTENSITY_OFFSET_KW)
+   {
+      setCyanIntensityOffset(property->valueToString().toDouble());
+   }
+   else if(name == BLUE_HUE_OFFSET_KW)
+   {
+      setBlueHueOffset(property->valueToString().toDouble());
+   }
+   else if(name == BLUE_HUE_LOW_RANGE_KW)
+   {
+      setBlueHueLowRange(property->valueToString().toDouble());
+   }
+   else if(name == BLUE_HUE_HIGH_RANGE_KW)
+   {
+      setBlueHueHighRange(property->valueToString().toDouble());
+   }
+   else if(name == BLUE_HUE_BLEND_RANGE_KW)
+   {
+      setBlueHueBlendRange(property->valueToString().toDouble());
+   }
+   else if(name == BLUE_SATURATION_OFFSET_KW)
+   {
+      setBlueSaturationOffset(property->valueToString().toDouble());
+   }
+   else if(name == BLUE_INTENSITY_OFFSET_KW)
+   {
+      setBlueIntensityOffset(property->valueToString().toDouble());
+   }
+   else if(name == MAGENTA_HUE_OFFSET_KW)
+   {
+      setMagentaHueOffset(property->valueToString().toDouble());
+   }
+   else if(name == MAGENTA_HUE_LOW_RANGE_KW)
+   {
+      setMagentaHueLowRange(property->valueToString().toDouble());
+   }
+   else if(name == MAGENTA_HUE_HIGH_RANGE_KW)
+   {
+      setMagentaHueHighRange(property->valueToString().toDouble());
+   }
+   else if(name == MAGENTA_HUE_BLEND_RANGE_KW)
+   {
+      setMagentaHueBlendRange(property->valueToString().toDouble());
+   }
+   else if(name == MAGENTA_SATURATION_OFFSET_KW)
+   {
+      setMagentaSaturationOffset(property->valueToString().toDouble());
+   }
+   else if(name == MAGENTA_INTENSITY_OFFSET_KW)
+   {
+      setMagentaIntensityOffset(property->valueToString().toDouble());
+   }
+   else if(name == WHITE_OBJECT_CLIP_KW)
+   {
+      setWhiteObjectClip(property->valueToString().toDouble());
+   }
+   else
+   {
+      ossimImageSourceFilter::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimHsiRemapper::getProperty(const ossimString& name)const
+{
+   ossimRefPtr<ossimProperty> result;
+   if(name == MASTER_HUE_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theMasterHueOffset), -180, 180);
+      result->setCacheRefreshBit();
+   }
+   else if(name == MASTER_SATURATION_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theMasterSaturationOffset), -1, 1);
+      result->setCacheRefreshBit();
+  }
+   else if(name == MASTER_INTENSITY_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theMasterIntensityOffset), -1, 1);
+      result->setCacheRefreshBit();
+   }
+   else if(name == MASTER_INTENSITY_LOW_CLIP_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theMasterIntensityLowClip), 0, 1);
+      result->setCacheRefreshBit();
+   }
+   else if(name == MASTER_INTENSITY_HIGH_CLIP_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theMasterIntensityHighClip), 0, 1);
+      result->setCacheRefreshBit();
+   }
+   else if(name == RED_HUE_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theRedHueOffset), -180, 180);
+      result->setCacheRefreshBit();
+   }
+   else if(name == RED_HUE_LOW_RANGE_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theRedHueLowRange), -30, 30);
+      result->setCacheRefreshBit();
+   }
+   else if(name == RED_HUE_HIGH_RANGE_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theRedHueHighRange), -30, 30);
+      result->setCacheRefreshBit();
+   }
+   else if(name == RED_HUE_BLEND_RANGE_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theRedHueBlendRange), 0, 30);
+      result->setCacheRefreshBit();
+   }
+   else if(name == RED_SATURATION_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theRedSaturationOffset), -1, 1);
+      result->setCacheRefreshBit();
+   }
+   else if(name == RED_INTENSITY_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theRedIntensityOffset), -1, 1);
+      result->setCacheRefreshBit();
+   }
+   else if(name == YELLOW_HUE_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theYellowHueOffset), -180, 180);
+      result->setCacheRefreshBit();
+   }
+   else if(name == YELLOW_HUE_LOW_RANGE_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theYellowHueLowRange), 30, 90);
+      result->setCacheRefreshBit();
+   }
+   else if(name == YELLOW_HUE_HIGH_RANGE_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theYellowHueHighRange), 30, 90);
+      result->setCacheRefreshBit();
+   }
+   else if(name == YELLOW_HUE_BLEND_RANGE_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theYellowHueBlendRange), 0, 30);
+      result->setCacheRefreshBit();
+   }
+   else if(name == YELLOW_SATURATION_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theYellowSaturationOffset), -1, 1);
+      result->setCacheRefreshBit();
+   }
+   else if(name == YELLOW_INTENSITY_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theYellowIntensityOffset), -1, 1);
+      result->setCacheRefreshBit();
+   }
+   else if(name == GREEN_HUE_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theGreenHueOffset), -180, 180);
+      result->setCacheRefreshBit();
+   }
+   else if(name == GREEN_HUE_LOW_RANGE_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theGreenHueLowRange), 90, 150);
+      result->setCacheRefreshBit();
+   }
+   else if(name == GREEN_HUE_HIGH_RANGE_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theGreenHueHighRange), 90, 150);
+      result->setCacheRefreshBit();
+   }
+   else if(name == GREEN_HUE_BLEND_RANGE_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theGreenHueBlendRange), 0, 30);
+      result->setCacheRefreshBit();
+   }
+   else if(name == GREEN_SATURATION_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theGreenSaturationOffset), -1, 1);
+      result->setCacheRefreshBit();
+   }
+   else if(name == GREEN_INTENSITY_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theGreenIntensityOffset), -1, 1);
+      result->setCacheRefreshBit();
+   }
+   else if(name == CYAN_HUE_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theCyanHueOffset), -180, 180);
+      result->setCacheRefreshBit();
+   }
+   else if(name == CYAN_HUE_LOW_RANGE_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theCyanHueLowRange), 150, 210);
+      result->setCacheRefreshBit();
+   }
+   else if(name == CYAN_HUE_HIGH_RANGE_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theCyanHueHighRange), 150, 210);
+      result->setCacheRefreshBit();
+   }
+   else if(name == CYAN_HUE_BLEND_RANGE_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theCyanHueBlendRange), 0, 30);
+      result->setCacheRefreshBit();
+   }
+   else if(name == CYAN_SATURATION_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theCyanSaturationOffset), -1, 1);
+      result->setCacheRefreshBit();
+   }
+   else if(name == CYAN_INTENSITY_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theCyanIntensityOffset), -1, 1);
+      result->setCacheRefreshBit();
+   }
+   else if(name == BLUE_HUE_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theBlueHueOffset), -180, 180);
+      result->setCacheRefreshBit();
+   }
+   else if(name == BLUE_HUE_LOW_RANGE_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theBlueHueLowRange), 210, 270);
+      result->setCacheRefreshBit();
+   }
+   else if(name == BLUE_HUE_HIGH_RANGE_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theBlueHueHighRange), 210, 270);
+      result->setCacheRefreshBit();
+   }
+   else if(name == BLUE_HUE_BLEND_RANGE_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theBlueHueBlendRange), 0, 30);
+      result->setCacheRefreshBit();
+   }
+   else if(name == BLUE_SATURATION_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theBlueSaturationOffset), -1, 1);
+      result->setCacheRefreshBit();
+   }
+   else if(name == BLUE_INTENSITY_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theBlueIntensityOffset), -1, 1);
+      result->setCacheRefreshBit();
+   }
+   else if(name == MAGENTA_HUE_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theMagentaHueOffset), -180, 180);
+      result->setCacheRefreshBit();
+   }
+   else if(name == MAGENTA_HUE_LOW_RANGE_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theMagentaHueLowRange), 270, 330);
+      result->setCacheRefreshBit();
+   }
+   else if(name == MAGENTA_HUE_HIGH_RANGE_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theMagentaHueHighRange), 270, 330);
+      result->setCacheRefreshBit();
+   }
+   else if(name == MAGENTA_HUE_BLEND_RANGE_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theMagentaHueBlendRange), 0, 30);
+      result->setCacheRefreshBit();
+   }
+   else if(name == MAGENTA_SATURATION_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theMagentaSaturationOffset), -1, 1);
+      result->setCacheRefreshBit();
+   }
+   else if(name == MAGENTA_INTENSITY_OFFSET_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theMagentaIntensityOffset), -1, 1);
+      result->setCacheRefreshBit();
+   }
+   else if(name == WHITE_OBJECT_CLIP_KW)
+   {
+      result = new ossimNumericProperty(name, ossimString::toString(theWhiteObjectClip), 0.8, 1.0);
+      result->setCacheRefreshBit();
+   }
+   else
+   {
+     result = ossimImageSourceFilter::getProperty(name);
+   }
+   
+   return result;
+}
+
+void ossimHsiRemapper::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageSourceFilter::getPropertyNames(propertyNames);
+   propertyNames.push_back(MASTER_HUE_OFFSET_KW);
+   propertyNames.push_back(MASTER_SATURATION_OFFSET_KW);
+   propertyNames.push_back(MASTER_INTENSITY_OFFSET_KW);
+   propertyNames.push_back(MASTER_INTENSITY_LOW_CLIP_KW);
+   propertyNames.push_back(MASTER_INTENSITY_HIGH_CLIP_KW);
+   propertyNames.push_back(RED_HUE_OFFSET_KW);
+   propertyNames.push_back(RED_HUE_LOW_RANGE_KW);
+   propertyNames.push_back(RED_HUE_HIGH_RANGE_KW);
+   propertyNames.push_back(RED_HUE_BLEND_RANGE_KW);
+   propertyNames.push_back(RED_SATURATION_OFFSET_KW);
+   propertyNames.push_back(RED_INTENSITY_OFFSET_KW);
+   propertyNames.push_back(YELLOW_HUE_OFFSET_KW);
+   propertyNames.push_back(YELLOW_HUE_LOW_RANGE_KW);
+   propertyNames.push_back(YELLOW_HUE_HIGH_RANGE_KW);
+   propertyNames.push_back(YELLOW_HUE_BLEND_RANGE_KW);
+   propertyNames.push_back(YELLOW_SATURATION_OFFSET_KW);
+   propertyNames.push_back(YELLOW_INTENSITY_OFFSET_KW);
+   propertyNames.push_back(GREEN_HUE_OFFSET_KW);
+   propertyNames.push_back(GREEN_HUE_LOW_RANGE_KW);
+   propertyNames.push_back(GREEN_HUE_HIGH_RANGE_KW);
+   propertyNames.push_back(GREEN_HUE_BLEND_RANGE_KW);
+   propertyNames.push_back(GREEN_SATURATION_OFFSET_KW);
+   propertyNames.push_back(GREEN_INTENSITY_OFFSET_KW);
+   propertyNames.push_back(CYAN_HUE_OFFSET_KW);
+   propertyNames.push_back(CYAN_HUE_LOW_RANGE_KW);
+   propertyNames.push_back(CYAN_HUE_HIGH_RANGE_KW);
+   propertyNames.push_back(CYAN_HUE_BLEND_RANGE_KW);
+   propertyNames.push_back(CYAN_SATURATION_OFFSET_KW);
+   propertyNames.push_back(CYAN_INTENSITY_OFFSET_KW);
+   propertyNames.push_back(BLUE_HUE_OFFSET_KW);
+   propertyNames.push_back(BLUE_HUE_LOW_RANGE_KW);
+   propertyNames.push_back(BLUE_HUE_HIGH_RANGE_KW);
+   propertyNames.push_back(BLUE_HUE_BLEND_RANGE_KW);
+   propertyNames.push_back(BLUE_SATURATION_OFFSET_KW);
+   propertyNames.push_back(BLUE_INTENSITY_OFFSET_KW);
+   propertyNames.push_back(MAGENTA_HUE_OFFSET_KW);
+   propertyNames.push_back(MAGENTA_HUE_LOW_RANGE_KW);
+   propertyNames.push_back(MAGENTA_HUE_HIGH_RANGE_KW);
+   propertyNames.push_back(MAGENTA_HUE_BLEND_RANGE_KW);
+   propertyNames.push_back(MAGENTA_SATURATION_OFFSET_KW);
+   propertyNames.push_back(MAGENTA_INTENSITY_OFFSET_KW);
+   propertyNames.push_back(WHITE_OBJECT_CLIP_KW);
+}
+
+
+void ossimHsiRemapper::allocate(const ossimIrect& rect)
+{
+   
+   if(theInputConnection)
+   {
+      theTile = ossimImageDataFactory::instance()->create(this,this);
+      theTile->initialize();
+
+      ossim_uint32 width  = rect.width();
+      ossim_uint32 height = rect.height();
+      if(theBuffer)
+      {
+         delete [] theBuffer;
+         theBuffer = 0;
+      }
+      ossim_uint32 size = width * height * 3; // Buffer always 3 bands.
+      theBuffer = new double[size];
+      memset(theBuffer, '\0', sizeof(double) * size);
+      
+      // Get the minimum normalized pixel value.
+      theNormalizedMinPix = calculateMinNormValue();
+   }
+}
+
+bool ossimHsiRemapper::loadState(const ossimKeywordlist& kwl,
+                                 const char* prefix)
+{
+   static const char MODULE[] = "ossimHsiRemapper::loadState()";
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " entering..." << endl;
+   }
+
+   // Make a prefix.
+   ossimString tmpPrefix;
+   if (prefix) tmpPrefix += prefix;
+   
+   const char* lookupReturn;
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), MASTER_HUE_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setMasterHueOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), MASTER_SATURATION_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setMasterSaturationOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), MASTER_INTENSITY_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setMasterIntensityOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), MASTER_INTENSITY_LOW_CLIP_KW);
+   if(lookupReturn)
+   {
+      setMasterIntensityLowClip(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), MASTER_INTENSITY_HIGH_CLIP_KW);
+   if(lookupReturn)
+   {
+      setMasterIntensityHighClip(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), RED_HUE_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setRedHueOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), RED_HUE_LOW_RANGE_KW);
+   if(lookupReturn)
+   {
+      setRedHueLowRange(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), RED_HUE_HIGH_RANGE_KW);
+   if(lookupReturn)
+   {
+      setRedHueHighRange(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), RED_HUE_BLEND_RANGE_KW);
+   if(lookupReturn)
+   {
+      setRedHueBlendRange(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), RED_SATURATION_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setRedSaturationOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), RED_INTENSITY_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setRedIntensityOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), YELLOW_HUE_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setYellowHueOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), YELLOW_HUE_LOW_RANGE_KW);
+   if(lookupReturn)
+   {
+      setYellowHueLowRange(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), YELLOW_HUE_HIGH_RANGE_KW);
+   if(lookupReturn)
+   {
+      setYellowHueHighRange(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), YELLOW_HUE_BLEND_RANGE_KW);
+   if(lookupReturn)
+   {
+      setYellowHueBlendRange(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), YELLOW_SATURATION_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setYellowSaturationOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), YELLOW_INTENSITY_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setYellowIntensityOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), GREEN_HUE_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setGreenHueOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), GREEN_HUE_LOW_RANGE_KW);
+   if(lookupReturn)
+   {
+      setGreenHueLowRange(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), GREEN_HUE_HIGH_RANGE_KW);
+   if(lookupReturn)
+   {
+      setGreenHueHighRange(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), GREEN_HUE_BLEND_RANGE_KW);
+   if(lookupReturn)
+   {
+      setGreenHueBlendRange(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), GREEN_SATURATION_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setGreenSaturationOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), GREEN_INTENSITY_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setGreenIntensityOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), CYAN_HUE_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setCyanHueOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), CYAN_HUE_LOW_RANGE_KW);
+   if(lookupReturn)
+   {
+      setCyanHueLowRange(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), CYAN_HUE_HIGH_RANGE_KW);
+   if(lookupReturn)
+   {
+      setCyanHueHighRange(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), CYAN_HUE_BLEND_RANGE_KW);
+   if(lookupReturn)
+   {
+      setCyanHueBlendRange(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), CYAN_SATURATION_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setCyanSaturationOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), CYAN_INTENSITY_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setCyanIntensityOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), BLUE_HUE_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setBlueHueOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), BLUE_HUE_LOW_RANGE_KW);
+   if(lookupReturn)
+   {
+      setBlueHueLowRange(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), BLUE_HUE_HIGH_RANGE_KW);
+   if(lookupReturn)
+   {
+      setBlueHueHighRange(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), BLUE_HUE_BLEND_RANGE_KW);
+   if(lookupReturn)
+   {
+      setBlueHueBlendRange(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), BLUE_SATURATION_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setBlueSaturationOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), BLUE_INTENSITY_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setBlueIntensityOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), MAGENTA_HUE_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setMagentaHueOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), MAGENTA_HUE_LOW_RANGE_KW);
+   if(lookupReturn)
+   {
+      setMagentaHueLowRange(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), MAGENTA_HUE_HIGH_RANGE_KW);
+   if(lookupReturn)
+   {
+      setMagentaHueHighRange(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), MAGENTA_HUE_BLEND_RANGE_KW);
+   if(lookupReturn)
+   {
+      setMagentaHueBlendRange(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), MAGENTA_SATURATION_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setMagentaSaturationOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), MAGENTA_INTENSITY_OFFSET_KW);
+   if(lookupReturn)
+   {
+      setMagentaIntensityOffset(atof(lookupReturn));
+   }
+
+   lookupReturn = kwl.find(tmpPrefix.c_str(), WHITE_OBJECT_CLIP_KW);
+   if(lookupReturn)
+   {
+      setWhiteObjectClip(atof(lookupReturn));
+   }
+
+   //***
+   // Initialize the base class.  Do this last so that the enable/disable
+   // doesn't get overridden by the "set*" methods.
+   //***
+   ossimImageSourceFilter::loadState(kwl, tmpPrefix.c_str());
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << ""
+         << *this
+         << "\nreturning..."
+         << endl;
+   }
+
+   return true;
+}
+
+bool ossimHsiRemapper::saveState(ossimKeywordlist& kwl,
+                                 const char* prefix) const
+{
+   static const char MODULE[] = "ossimHsiRemapper::saveStateTo()";
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << "entering..." << endl;
+   }
+
+   // Call the base class getStateFrom.
+   ossimImageSourceFilter::saveState(kwl, prefix);
+
+   kwl.add(prefix, MASTER_HUE_OFFSET_KW, theMasterHueOffset);
+
+   kwl.add(prefix, MASTER_SATURATION_OFFSET_KW, theMasterSaturationOffset);
+
+   kwl.add(prefix, MASTER_INTENSITY_OFFSET_KW, theMasterIntensityOffset);
+
+   kwl.add(prefix, MASTER_INTENSITY_LOW_CLIP_KW, theMasterIntensityLowClip);
+
+   kwl.add(prefix, MASTER_INTENSITY_HIGH_CLIP_KW, theMasterIntensityHighClip);
+
+   kwl.add(prefix, RED_HUE_OFFSET_KW, theRedHueOffset);
+
+   kwl.add(prefix, RED_HUE_LOW_RANGE_KW, theRedHueLowRange);
+
+   kwl.add(prefix, RED_HUE_HIGH_RANGE_KW, theRedHueHighRange);
+
+   kwl.add(prefix, RED_HUE_BLEND_RANGE_KW, theRedHueBlendRange);
+
+   kwl.add(prefix, RED_SATURATION_OFFSET_KW, theRedSaturationOffset);
+           
+   kwl.add(prefix, RED_INTENSITY_OFFSET_KW, theRedIntensityOffset);
+
+   kwl.add(prefix, YELLOW_HUE_OFFSET_KW, theYellowHueOffset);
+
+   kwl.add(prefix, YELLOW_HUE_LOW_RANGE_KW, theYellowHueLowRange);
+
+   kwl.add(prefix, YELLOW_HUE_HIGH_RANGE_KW, theYellowHueHighRange);
+           
+   kwl.add(prefix, YELLOW_HUE_BLEND_RANGE_KW, theYellowHueBlendRange);
+
+   kwl.add(prefix, YELLOW_SATURATION_OFFSET_KW, theYellowSaturationOffset);
+
+   kwl.add(prefix, YELLOW_INTENSITY_OFFSET_KW, theYellowIntensityOffset);
+
+   kwl.add(prefix, GREEN_HUE_OFFSET_KW, theGreenHueOffset);
+
+   kwl.add(prefix, GREEN_HUE_LOW_RANGE_KW, theGreenHueLowRange);
+
+   kwl.add(prefix, GREEN_HUE_HIGH_RANGE_KW, theGreenHueHighRange);
+
+   kwl.add(prefix, GREEN_HUE_BLEND_RANGE_KW, theGreenHueBlendRange);
+           
+   kwl.add(prefix, GREEN_SATURATION_OFFSET_KW, theGreenSaturationOffset);
+           
+   kwl.add(prefix, GREEN_INTENSITY_OFFSET_KW, theGreenIntensityOffset);
+
+   kwl.add(prefix, CYAN_HUE_OFFSET_KW, theCyanHueOffset);
+
+   kwl.add(prefix, CYAN_HUE_LOW_RANGE_KW, theCyanHueLowRange);
+
+   kwl.add(prefix, CYAN_HUE_HIGH_RANGE_KW, theCyanHueHighRange);
+           
+   kwl.add(prefix, CYAN_HUE_BLEND_RANGE_KW, theCyanHueBlendRange);
+           
+   kwl.add(prefix, CYAN_SATURATION_OFFSET_KW, theCyanSaturationOffset);
+           
+   kwl.add(prefix, CYAN_INTENSITY_OFFSET_KW, theCyanIntensityOffset);
+
+   kwl.add(prefix, BLUE_HUE_OFFSET_KW, theBlueHueOffset);
+
+   kwl.add(prefix, BLUE_HUE_LOW_RANGE_KW, theBlueHueLowRange);
+
+   kwl.add(prefix, BLUE_HUE_HIGH_RANGE_KW, theBlueHueHighRange);
+
+   kwl.add(prefix, BLUE_HUE_BLEND_RANGE_KW, theBlueHueBlendRange);
+
+   kwl.add(prefix, BLUE_SATURATION_OFFSET_KW, theBlueSaturationOffset);
+           
+   kwl.add(prefix, BLUE_INTENSITY_OFFSET_KW, theBlueIntensityOffset);
+           
+   kwl.add(prefix, MAGENTA_HUE_OFFSET_KW, theMagentaHueOffset);
+           
+   kwl.add(prefix, MAGENTA_HUE_LOW_RANGE_KW, theMagentaHueLowRange);
+           
+   kwl.add(prefix, MAGENTA_HUE_HIGH_RANGE_KW, theMagentaHueHighRange);
+           
+   kwl.add(prefix, MAGENTA_HUE_BLEND_RANGE_KW, theMagentaHueBlendRange);
+           
+   kwl.add(prefix, MAGENTA_SATURATION_OFFSET_KW, theMagentaSaturationOffset);
+
+   kwl.add(prefix, MAGENTA_INTENSITY_OFFSET_KW, theMagentaIntensityOffset);
+
+   kwl.add(prefix, WHITE_OBJECT_CLIP_KW, theWhiteObjectClip);
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << "returning..." << endl;
+   }
+
+   return true;
+}
+
+void ossimHsiRemapper::resetGroup(int color_group)
+{
+   switch (color_group)
+   {
+      case RED:
+         resetRed();
+         break;
+      case YELLOW:
+         resetYellow();
+         break;
+      case GREEN:
+         resetGreen();
+         break;
+      case CYAN:
+         resetCyan();
+         break;
+      case BLUE:
+         resetBlue();
+         break;
+      case MAGENTA:
+         resetMagenta();
+         break;
+      case ALL:
+         resetMaster();
+         break;
+      default:
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << "ossimHsiRemapper::setSaturationOffset NOTICE:  Range error!"
+            << endl;
+         break;
+   }
+   verifyEnabled();
+}
+
+void ossimHsiRemapper::resetAll()
+{
+   theMasterHueOffset          = 0.0;
+   theMasterSaturationOffset   = 0.0;
+   theMasterIntensityOffset    = 0.0;
+   theMasterIntensityLowClip   = 0.0;
+   theMasterIntensityHighClip  = 1.0;
+   
+   theRedHueOffset             = 0.0;
+   theRedHueLowRange           = -30.0;
+   theRedHueHighRange          = 30.0;
+   theRedHueBlendRange         = DEFAULT_BLEND;
+   theRedSaturationOffset      = 0.0;
+   theRedIntensityOffset       = 0.0;
+   
+   theYellowHueOffset          = 0.0;
+   theYellowHueLowRange        = 30.0;
+   theYellowHueHighRange       = 90.0;
+   theYellowHueBlendRange      = DEFAULT_BLEND;
+   theYellowSaturationOffset   = 0.0;
+   theYellowIntensityOffset    = 0.0;
+   
+   theGreenHueOffset           = 0.0;
+   theGreenHueLowRange         = 90.0;
+   theGreenHueHighRange        = 150.0;
+   theGreenHueBlendRange       = DEFAULT_BLEND;
+   theGreenSaturationOffset    = 0.0;
+   theGreenIntensityOffset     = 0.0;
+   
+   theCyanHueOffset            = 0.0;
+   theCyanHueLowRange          = 150.0;
+   theCyanHueHighRange         = 210.0;
+   theCyanHueBlendRange        = DEFAULT_BLEND;
+   theCyanSaturationOffset     = 0.0;
+   theCyanIntensityOffset      = 0.0;
+   
+   theBlueHueOffset            = 0.0;
+   theBlueHueLowRange          = 210.0;
+   theBlueHueHighRange         = 270.0;
+   theBlueHueBlendRange        = DEFAULT_BLEND;
+   theBlueSaturationOffset     = 0.0;
+   theBlueIntensityOffset      = 0.0;
+   
+   theMagentaHueOffset         = 0.0;
+   theMagentaHueLowRange       = 270.0;
+   theMagentaHueHighRange      = 330.0;
+   theMagentaHueBlendRange     = DEFAULT_BLEND;
+   theMagentaSaturationOffset  = 0.0;
+   theMagentaIntensityOffset   = 0.0;
+
+   theWhiteObjectClip          = 1.0;
+   theValidFlag = false;
+   //disableSource();
+}
+
+void ossimHsiRemapper::resetMaster()
+{
+   theMasterHueOffset          = 0.0;
+   theMasterSaturationOffset   = 0.0;
+   theMasterIntensityOffset    = 0.0;
+   theMasterIntensityLowClip   = 0.0;
+   theMasterIntensityHighClip  = 1.0;
+
+   verifyEnabled();
+}
+
+void ossimHsiRemapper::resetRed()
+{
+   theRedHueOffset             = 0.0;
+   theRedHueLowRange           = -30.0;
+   theRedHueHighRange          = 30.0;
+   theRedHueBlendRange         = DEFAULT_BLEND;
+   theRedSaturationOffset      = 0.0;
+   theRedIntensityOffset       = 0.0;
+
+   verifyEnabled();
+}
+
+void ossimHsiRemapper::resetYellow()
+{
+   theYellowHueOffset          = 0.0;
+   theYellowHueLowRange        = 30.0;
+   theYellowHueHighRange       = 90.0;
+   theYellowHueBlendRange      = DEFAULT_BLEND;
+   theYellowSaturationOffset   = 0.0;
+   theYellowIntensityOffset    = 0.0;
+
+   verifyEnabled();
+}
+
+void ossimHsiRemapper::resetGreen()
+{
+   theGreenHueOffset           = 0.0;
+   theGreenHueLowRange         = 90.0;
+   theGreenHueHighRange        = 150.0;
+   theGreenHueBlendRange       = DEFAULT_BLEND;
+   theGreenSaturationOffset    = 0.0;
+   theGreenIntensityOffset     = 0.0;
+
+   verifyEnabled();
+}
+
+void ossimHsiRemapper::resetCyan()
+{
+   theCyanHueOffset            = 0.0;
+   theCyanHueLowRange          = 150.0;
+   theCyanHueHighRange         = 210.0;
+   theCyanHueBlendRange        = DEFAULT_BLEND;
+   theCyanSaturationOffset     = 0.0;
+   theCyanIntensityOffset      = 0.0;
+
+   verifyEnabled();
+}
+
+void ossimHsiRemapper::resetBlue()
+{
+   theBlueHueOffset            = 0.0;
+   theBlueHueLowRange          = 210.0;
+   theBlueHueHighRange         = 270.0;
+   theBlueHueBlendRange        = DEFAULT_BLEND;
+   theBlueSaturationOffset     = 0.0;
+   theBlueIntensityOffset      = 0.0;
+
+   verifyEnabled();
+}
+
+void ossimHsiRemapper::resetMagenta()
+{
+   theMagentaHueOffset         = 0.0;
+   theMagentaHueLowRange       = 270.0;
+   theMagentaHueHighRange      = 330.0;
+   theMagentaHueBlendRange     = DEFAULT_BLEND;
+   theMagentaSaturationOffset  = 0.0;
+   theMagentaIntensityOffset   = 0.0;
+
+   verifyEnabled();
+}
+
+void ossimHsiRemapper::verifyEnabled()
+{
+   // Start off disabled...
+   //disableSource();
+   theValidFlag = false;
+   if (!theInputConnection)
+   {
+      //***
+      // Since this filter can be constructed with no input connection do not
+      // output and error, simply return.
+      //***
+      return;
+   }
+   
+   //***
+   // Add all the offsets and the low clips.
+   // If greater than zero enable getTile method.
+   //***
+   double d = theMasterHueOffset         +
+           theMasterSaturationOffset  +
+           theMasterIntensityOffset   +
+           theMasterIntensityLowClip  +
+           theRedHueOffset            +
+           theRedSaturationOffset     +
+           theRedIntensityOffset      +
+           theYellowHueOffset         +
+           theYellowSaturationOffset  +
+           theYellowIntensityOffset   +
+           theGreenHueOffset          +
+           theGreenSaturationOffset   +
+           theGreenIntensityOffset    +
+           theCyanHueOffset           +
+           theCyanSaturationOffset    +
+           theCyanIntensityOffset     +
+           theBlueHueOffset           +
+           theBlueSaturationOffset    +
+           theBlueIntensityOffset     +
+           theMagentaHueOffset        +
+           theMagentaSaturationOffset +
+           theMagentaIntensityOffset;
+   
+   if ( d != 0.0 ||
+        theMasterIntensityHighClip != 1.0 ||
+        theWhiteObjectClip != 1.0 )
+   {
+      theValidFlag = true;
+     // enableSource();
+   }
+}
+
+void ossimHsiRemapper::setMasterHueOffset(double offset)
+{
+   if (offset >= -180.0 && offset <= 180.0)
+   {
+      theMasterHueOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setMasterHueOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -180.0 and less than"
+         << "\nor equal to 180.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setMasterSaturationOffset(double offset)
+{
+   if (offset >= -1.0 && offset <= 1.0)
+   {
+      theMasterSaturationOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setMasterSaturationOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -1.0 and less than"
+         << "\nor equal to 1.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setMasterIntensityOffset(double offset)
+{
+   if (offset >= -1.0 && offset <= 1.0)
+   {
+      theMasterIntensityOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setMasterIntensityOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -1.0 and less than"
+         << "\nor equal to 1.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setMasterIntensityLowClip(double clip)
+{
+   if (clip >= 0.0 && clip < theMasterIntensityHighClip)
+   {
+      theMasterIntensityLowClip = clip;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setMasterIntensityClip range error:"
+         << "\nLow clip of " << clip << " is out of range!"
+         << "\nMust be equal to or greater than 0.0 and less than"
+         << "\nthe high clip of " << theMasterIntensityHighClip
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setMasterIntensityHighClip(double clip)
+{
+   if (clip <= 1.0 && clip > theMasterIntensityLowClip)
+   {
+      theMasterIntensityHighClip = clip;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setMasterIntensityHighClip range error:"
+         << "\nHigh clip of " << clip << " is out of range!"
+         << "\nMust be greater than low clip of "
+         << theMasterIntensityLowClip << " and less than 1.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setRedHueOffset(double offset)
+{
+   if (offset >= -180.0 && offset <= 180.0)
+   {
+      theRedHueOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setRedHueOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -180.0 and less than"
+         << "\nor equal to 180.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setRedHueLowRange(double range)
+{
+   //***
+   // Default red range: 330 - 30
+   // Allow 315 to 15 as long as it's less than the high range.
+   // Note:  Store the range as a negative if it's between 315 and 360.
+   //***
+   double r  = range;
+   double h  = theRedHueHighRange;
+
+   if (r >= 315.0 && r < 360.0) r = r - 360.0;
+   if (h >= 315.0 && h < 360.0) h = h - 360.0;
+
+   if (r >= -45.0 && r <= 15.0 && r < h)
+   {
+      theRedHueLowRange = r;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setRedHueLow range error:"
+         << "\nRange of " << range << " is out of range!"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setRedHueHighRange(double range)
+{
+   if (range == 360.0) range = 0.0;
+   
+   //***
+   // Default red range: 330 - 30
+   // Allow 345 to 45 as long as it's greater than the low range.
+   // Note:  Store the range as a negative if it's between 345 and 360.
+   //***
+
+   double r = range;
+   double l = theRedHueLowRange;
+
+   if (r >= 315.0 && r < 360.0) r = r - 360.0;
+   if (l >= 315.0 && l < 360.0) l = l - 360.0;
+
+   if (r >= -15.0 && r <= 45 && l < r)
+   {
+      theRedHueHighRange = r;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setRedHueHigh range error:"
+         << "\nRange of " << range << " is out of range!"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setRedHueBlendRange(double range)
+{
+   //***
+   // Allowable range: 0.0 to 30.0 as long as it's not greater than the
+   // half range.  If so snap it to half range.
+   //***
+   if ( range >= 0.0  &&
+        range <= MAX_BLEND )
+   {
+      double half_range = (theRedHueHighRange - theRedHueLowRange) / 2.0;
+
+      if (range <= half_range)
+      {
+         theRedHueBlendRange = range;
+      }
+      else
+      {
+         // Put it in the middle of the range.
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimHsiRemapper::setRedHueBlendRange range error:"
+            << "\nRange of " << range << " is greater than the full range"
+            << "\ndivided by 2!"
+            << endl;
+         
+         theRedHueBlendRange = half_range;
+      }
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setRedHueBlendRange range error:"
+         << "\nRange of " << range << " is out of range!"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setRedSaturationOffset(double offset)
+{
+   if (offset >= -1.0 && offset <= 1.0)
+   {
+      theRedSaturationOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setRedSaturationOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -1.0 and less than"
+         << "\nor equal to 1.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setRedIntensityOffset(double offset)
+{
+   if (offset >= -1.0 && offset <= 1.0)
+   {
+      theRedIntensityOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setRedIntensityOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -1.0 and less than"
+         << "\nor equal to 1.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setYellowHueOffset(double offset)
+{
+   if (offset >= -180.0 && offset <= 180.0)
+   {
+      theYellowHueOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setYellowHueOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -180.0 and less than"
+         << "\nor equal to 180.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setYellowHueLowRange(double range)
+{
+   //***
+   // Default yellow range: 30 - 90
+   // Allow 15 to 75 as long as it's less than the high range.
+   //***
+   if ( range >= 15.0 &&
+        range <= 75.0 &&
+        range < theYellowHueHighRange )
+   {
+      theYellowHueLowRange = range;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setYellowHueLowRange range error:"
+         << "\nRange of " << range << " is out of range!"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setYellowHueHighRange(double range)
+{
+   //***
+   // Default yellow range: 30 - 90
+   // Allow 45 to 105 as long as it's greater than the low range.
+   //***
+   if ( range >= 45.0  &&
+        range <= 105.0 &&
+        range > theYellowHueLowRange )
+   {
+      theYellowHueHighRange = range;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setYellowHueHighRange range error:"
+         << "\nRange of " << range << " is out of range!"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setYellowHueBlendRange(double range)
+{
+   //***
+   // Allowable range: 0.0 to 30.0 as long as it's not greater than the
+   // half range.  If so snap it to half range.
+   //***
+   if ( range >= 0.0  &&
+        range <= MAX_BLEND )
+   {
+      double half_range = (theYellowHueHighRange - theYellowHueLowRange) / 2.0;
+      
+      if (range <= half_range)
+      {
+         theYellowHueBlendRange = range;
+      }
+      else
+      {
+         // Put it in the middle of the range.
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimHsiRemapper::setYellowHueBlendRange range error:"
+            << "\nRange of " << range << " is greater than the full range"
+            << "\ndivided by 2!"
+            << endl;
+         
+         theYellowHueBlendRange = half_range;
+      } 
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setYellowHueBlendRange range error:"
+         << "\nRange of " << range << " is out of range!"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setYellowSaturationOffset(double offset)
+{
+   if (offset >= -1.0 && offset <= 1.0)
+   {
+      theYellowSaturationOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setYellowSaturationOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -1.0 and less than"
+         << "\nor equal to 1.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setYellowIntensityOffset(double offset)
+{
+   if (offset >= -1.0 && offset <= 1.0)
+   {
+      theYellowIntensityOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setYellowIntensityOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -1.0 and less than"
+         << "\nor equal to 1.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setGreenHueOffset(double offset)
+{
+   if (offset >= -180.0 && offset <= 180.0)
+   {
+      theGreenHueOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setGreenHueOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -180.0 and less than"
+         << "\nor equal to 180.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setGreenHueLowRange(double range)
+{
+   //***
+   // Default green range:  90 - 150
+   // Allow 75 to 135 as long as it's less than the high range.
+   //***
+
+   if ( range >= 75.0 &&
+        range <= 135.0 &&
+        range < theGreenHueHighRange )
+   {
+      theGreenHueLowRange = range;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setGreenHueLowRange range error:"
+         << "\nRange of " << range << " is out of range!"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setGreenHueHighRange(double range)
+{
+   //***
+   // Default green range:  90 - 150
+   // Allow 105 to 165 as long as it's greater than the low range.
+   //***
+
+   if ( range >= 105.0  &&
+        range <= 165.0 &&
+        range > theGreenHueLowRange )
+   {
+      theGreenHueHighRange = range;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setGreenHueHighRange range error:"
+         << "\nRange of " << range << " is out of range!"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setGreenHueBlendRange(double range)
+{
+   //***
+   // Allowable range: 0.0 to 30.0 as long as it's not greater than the
+   // half range.  If so snap it to half range.
+   //***
+   if ( range >= 0.0  &&
+        range <= MAX_BLEND )
+   {
+      double half_range = (theGreenHueHighRange - theGreenHueLowRange) / 2.0;
+
+      if (range <= half_range)
+      {
+         theGreenHueBlendRange = range;
+      }
+      else
+      {
+         // Put it in the middle of the range.
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimHsiRemapper::setGreenHueBlendRange range error:"
+            << "\nRange of " << range << " is greater than the full range"
+            << "\ndivided by 2!"
+            << endl;
+         
+         theGreenHueBlendRange = half_range;
+      }
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setGreenHueBlendRange range error:"
+         << "\nRange of " << range << " is out of range!"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setGreenSaturationOffset(double offset)
+{
+   if (offset >= -1.0 && offset <= 1.0)
+   {
+      theGreenSaturationOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setGreenSaturationOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -1.0 and less than"
+         << "\nor equal to 1.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setGreenIntensityOffset(double offset)
+{
+   if (offset >= -1.0 && offset <= 1.0)
+   {
+      theGreenIntensityOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setGreenIntensityOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -1.0 and less than"
+         << "\nor equal to 1.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setCyanHueOffset(double offset)
+{
+   if (offset >= -180.0 && offset <= 180.0)
+   {
+      theCyanHueOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setCyanHueOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -180.0 and less than"
+         << "\nor equal to 180.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setCyanHueLowRange(double range)
+{
+   //***
+   // Default cyan range: 150 - 210
+   // Allow 135 to 195 as long as it's less than the high range.
+   //***
+   
+   if ( range >= 135.0 &&
+        range <= 195.0 &&
+        range < theCyanHueHighRange )
+   {
+      theCyanHueLowRange = range;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setCyanHueLowRange range error:"
+         << "\nRange of " << range << " is out of range!"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setCyanHueHighRange(double range)
+{
+   //***
+   // Default cyan range: 150 - 210
+   // Allow 165 to 225 as long as it's greater than the low range.
+   //***
+   
+   if ( range >= 165.0 &&
+        range <= 225.0 &&
+        range > theCyanHueLowRange )
+   {
+      theCyanHueHighRange = range;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setCyanHueHighRange range error:"
+         << "\nRange of " << range << " is out of range!"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setCyanHueBlendRange(double range)
+{
+   //***
+   // Allowable range: 0.0 to 30.0 as long as it's not greater than the
+   // half range.  If so snap it to half range.
+   //***
+   if ( range >= 0.0  &&
+        range <= MAX_BLEND )
+   {
+      double half_range = (theCyanHueHighRange - theCyanHueLowRange) / 2.0;
+      
+      if (range <= half_range)
+      {
+         theCyanHueBlendRange = range;
+      }
+      else
+      {
+         // Put it in the middle of the range.
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimHsiRemapper::setCyanHueBlendRange range error:"
+            << "\nRange of " << range << " is greater than the full range"
+            << "\ndivided by 2!"
+            << endl;
+         
+         theCyanHueBlendRange = half_range;
+      } 
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setCyanHueBlendRange range error:"
+         << "\nRange of " << range << " is out of range!"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setCyanSaturationOffset(double offset)
+{
+   if (offset >= -1.0 && offset <= 1.0)
+   {
+      theCyanSaturationOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setCyanSaturationOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -1.0 and less than"
+         << "\nor equal to 1.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setCyanIntensityOffset(double offset)
+{
+   if (offset >= -1.0 && offset <= 1.0)
+   {
+      theCyanIntensityOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setCyanIntensityOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -1.0 and less than"
+         << "\nor equal to 1.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setBlueHueOffset(double offset)
+{
+   if (offset >= -180.0 && offset <= 180.0)
+   {
+      theBlueHueOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setBlueHueOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -180.0 and less than"
+         << "\nor equal to 180.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setBlueHueLowRange(double range)
+{
+   //***
+   // Default blue range: 210 - 270
+   // Allow 195 to 255 as long as it's less than the high range.
+   //***
+   if ( range >= 195.0 &&
+        range <= 255.0 &&
+        range < theBlueHueHighRange )
+   {
+      theBlueHueLowRange = range;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setBlueHueLowRange range error:"
+         << "\nRange of " << range << " is out of range!"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setBlueHueHighRange(double range)
+{
+   //***
+   // Default blue range: 210 - 270
+   // Allow 225 to 285 as long as it's greater than the low range.
+   //***
+   if ( range >= 225.0  &&
+        range <= 285.0 &&
+        range > theBlueHueLowRange )
+   {
+      theBlueHueHighRange = range;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setBlueHueHighRange range error:"
+         << "\nRange of " << range << " is out of range!"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setBlueHueBlendRange(double range)
+{
+   //***
+   // Allowable range: 0.0 to 30.0 as long as it's not greater than the
+   // half range.  If so snap it to half range.
+   //***
+   if ( range >= 0.0  &&
+        range <= MAX_BLEND )
+   {
+      double half_range = (theBlueHueHighRange - theBlueHueLowRange) / 2.0;
+
+      if (range <= half_range)
+      {
+         theBlueHueBlendRange = range;
+      }
+      else
+      {
+         // Put it in the middle of the range.
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimHsiRemapper::setBlueHueBlendRange range error:"
+            << "\nRange of " << range << " is greater than the full range"
+            << "\ndivided by 2!"
+            << endl;
+         
+         theBlueHueBlendRange = half_range;
+      }
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setBlueHueBlendRange range error:"
+         << "\nRange of " << range << " is out of range!"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setBlueSaturationOffset(double offset)
+{
+   if (offset >= -1.0 && offset <= 1.0)
+   {
+      theBlueSaturationOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setBlueSaturationOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -1.0 and less than"
+         << "\nor equal to 1.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setBlueIntensityOffset(double offset)
+{
+   if (offset >= -1.0 && offset <= 1.0)
+   {
+      theBlueIntensityOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setBlueIntensityOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -1.0 and less than"
+         << "\nor equal to 1.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setMagentaHueOffset(double offset)
+{
+   if (offset >= -180.0 && offset <= 180.0)
+   {
+      theMagentaHueOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setMagentaHueOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -180.0 and less than"
+         << "\nor equal to 180.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setMagentaHueLowRange(double range)
+{
+   //***
+   // Default magenta range:  270 - 330
+   // Allow 255 to 315 as long as it's less than the high range.
+   //***
+   if ( range >= 255.0 &&
+        range <= 315.0 &&
+        range < theMagentaHueHighRange )
+   {
+      theMagentaHueLowRange = range;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setMagentaHueLowRange range error:"
+         << "\nRange of " << range << " is out of range!"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setMagentaHueHighRange(double range)
+{
+   //***
+   // Default magenta range:  270 - 330
+   // Allow 285 to 345 as long as it's greater than the low range.
+   //***
+   if ( range >= 285.0  &&
+        range <= 345.0 &&
+        range > theMagentaHueLowRange )
+   {
+      theMagentaHueHighRange = range;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setMagentaHueHighRange range error:"
+         << "\nRange of " << range << " is out of range!"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setMagentaHueBlendRange(double range)
+{
+   //***
+   // Allowable range: 0.0 to 30.0 as long as it's not greater than the
+   // half range.  If so snap it to half range.
+   //***
+   if ( range >= 0.0  &&
+        range <= MAX_BLEND )
+   {
+      double half_range = (theMagentaHueHighRange-theMagentaHueLowRange)/2.0;
+
+      if (range <= half_range)
+      {
+         theMagentaHueBlendRange = range;
+      }
+      else
+      {
+         // Put it in the middle of the range.
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimHsiRemapper::setMagentaHueBlendRange range error:"
+            << "\nRange of " << range << " is greater than the full range"
+            << "\ndivided by 2!"
+            << endl;
+         
+         theMagentaHueBlendRange = half_range;
+      }
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setMagentaHueBlendRange range error:"
+         << "\nRange of " << range << " is out of range!"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setMagentaSaturationOffset(double offset)
+{
+   if (offset >= -1.0 && offset <= 1.0)
+   {
+      theMagentaSaturationOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setMagentaSaturationOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -1.0 and less than"
+         << "\nor equal to 1.0"
+         << endl;
+   }
+}
+
+void ossimHsiRemapper::setMagentaIntensityOffset(double offset)
+{
+   if (offset >= -1.0 && offset <= 1.0)
+   {
+      theMagentaIntensityOffset = offset;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimHsiRemapper::setMagentaIntensityOffset range error:"
+         << "\nOffset of " << offset << " is out of range!"
+         << "\nMust be equal to or greater than -1.0 and less than"
+         << "\nor equal to 1.0"
+         << endl;
+   }
+}
+
+double ossimHsiRemapper::calculateMinNormValue()
+{
+   static const char MODULE[] = "ossimHsiRemapper::calculateMinNormValue";
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " Entered..." << endl;
+   }
+   
+   if (!theTile)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE << " ERROR:"
+         << "\nClass not initialized!"
+         << endl;
+      return 0.0;
+   }
+
+   double min_pix = theTile->getMinPix(0);
+   double max_pix = theTile->getMaxPix(0);
+
+   for (ossim_uint32 band=1; band<theTile->getNumberOfBands(); ++band)
+   {
+      if (min_pix != theTile->getMinPix(band))
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << MODULE << " Warning:"
+            << "\nMixed minimum values for bands..."
+            << endl;
+      }
+      if (max_pix != theTile->getMaxPix(band))
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << " Warning:"
+              << "\nMixed maximum values for bands..."
+              << endl;
+      }
+   }
+
+   if (min_pix < 0.0)
+   {
+      //
+      // Assigning some arbituary number for float data.
+      // This should really come from the normalizer (ossimImageData) of
+      // the data.
+      //
+      return OSSIM_DEFAULT_MIN_PIX_NORM_DOUBLE;
+   }
+
+   return (min_pix / max_pix);
+}
+
+ossim_uint32 ossimHsiRemapper::getNumberOfOutputBands() const
+{
+   if (isSourceEnabled()&&theValidFlag) // Always rgb tile out...
+   {
+      return 3;
+   }
+
+   // Filter bypassed so getTile will return input tile.
+   return ossimImageSourceFilter::getNumberOfInputBands();
+}
+
+
+double ossimHsiRemapper::getMasterHueOffset () const
+{
+   return theMasterHueOffset;
+}
+
+double ossimHsiRemapper::getMasterSaturationOffset() const
+{
+   return theMasterSaturationOffset;
+}
+
+double ossimHsiRemapper::getMasterIntensityOffset() const
+{
+   return theMasterIntensityOffset;
+}
+
+double ossimHsiRemapper::getMasterIntensityLowClip() const
+{
+   return theMasterIntensityLowClip;
+}
+
+double ossimHsiRemapper::getMasterIntensityHighClip() const
+{
+   return theMasterIntensityHighClip;
+}
+
+double ossimHsiRemapper::getRedHueOffset() const
+{
+   return theRedHueOffset;
+}
+
+double ossimHsiRemapper::getRedHueLowRange() const
+{
+   return theRedHueLowRange;
+}
+
+double ossimHsiRemapper::getRedHueHighRange() const
+{
+   return theRedHueHighRange;
+}
+
+double ossimHsiRemapper::getRedHueBlendRange() const
+{
+   return theRedHueBlendRange;
+}
+
+double ossimHsiRemapper::getRedSaturationOffset() const
+{
+   return theRedSaturationOffset;
+}
+
+double ossimHsiRemapper::getRedIntensityOffset() const
+{
+   return theRedIntensityOffset;
+}
+
+double ossimHsiRemapper::getYellowHueOffset () const
+{
+   return theYellowHueOffset;
+}
+
+double ossimHsiRemapper::getYellowHueLowRange() const
+{
+   return theYellowHueLowRange;
+}
+
+double ossimHsiRemapper::getYellowHueHighRange() const
+{
+   return theYellowHueHighRange;
+}
+
+double ossimHsiRemapper::getYellowHueBlendRange() const
+{
+   return theYellowHueBlendRange;
+}
+
+double ossimHsiRemapper::getYellowSaturationOffset() const
+{
+   return theYellowSaturationOffset;
+}
+
+double ossimHsiRemapper::getYellowIntensityOffset() const
+{
+   return theYellowIntensityOffset;
+}
+
+double ossimHsiRemapper::getGreenHueOffset () const
+{
+   return theGreenHueOffset;
+}
+
+double ossimHsiRemapper::getGreenHueLowRange() const
+{
+   return theGreenHueLowRange;
+}
+
+double ossimHsiRemapper::getGreenHueHighRange() const
+{
+   return theGreenHueHighRange;
+}
+
+double ossimHsiRemapper::getGreenHueBlendRange() const
+{
+   return theGreenHueBlendRange;
+}
+
+double ossimHsiRemapper::getGreenSaturationOffset() const
+{
+   return theGreenSaturationOffset;
+}
+
+double ossimHsiRemapper::getGreenIntensityOffset() const
+{
+   return theGreenIntensityOffset;
+}
+
+double ossimHsiRemapper::getCyanHueOffset () const
+{
+   return theCyanHueOffset;
+}
+
+double ossimHsiRemapper::getCyanHueLowRange() const
+{
+   return theCyanHueLowRange;
+}
+
+double ossimHsiRemapper::getCyanHueHighRange() const
+{
+   return theCyanHueHighRange;
+}
+
+double ossimHsiRemapper::getCyanHueBlendRange() const
+{
+   return theCyanHueBlendRange;
+}
+
+double ossimHsiRemapper::getCyanSaturationOffset() const
+{
+   return theCyanSaturationOffset;
+}
+
+double ossimHsiRemapper::getCyanIntensityOffset() const
+{
+   return theCyanIntensityOffset;
+}
+
+double ossimHsiRemapper::getBlueHueOffset () const
+{
+   return theBlueHueOffset;
+}
+
+double ossimHsiRemapper::getBlueHueLowRange() const
+{
+   return theBlueHueLowRange;
+}
+
+double ossimHsiRemapper::getBlueHueHighRange() const
+{
+   return theBlueHueHighRange;
+}
+
+double ossimHsiRemapper::getBlueHueBlendRange() const
+{
+   return theBlueHueBlendRange;
+}
+
+double ossimHsiRemapper::getBlueSaturationOffset() const
+{
+   return theBlueSaturationOffset;
+}
+
+double ossimHsiRemapper::getBlueIntensityOffset() const
+{
+   return theBlueIntensityOffset;
+}
+
+double ossimHsiRemapper::getMagentaHueOffset () const
+{
+   return theMagentaHueOffset;
+}
+
+double ossimHsiRemapper::getMagentaHueLowRange() const
+{
+   return theMagentaHueLowRange;
+}
+
+double ossimHsiRemapper::getMagentaHueHighRange() const
+{
+   return theMagentaHueHighRange;
+}
+
+double ossimHsiRemapper::getMagentaHueBlendRange() const
+{
+   return theMagentaHueBlendRange;
+}
+
+double ossimHsiRemapper::getMagentaSaturationOffset() const
+{
+   return theMagentaSaturationOffset;
+}
+
+double ossimHsiRemapper::getMagentaIntensityOffset() const
+{
+   return theMagentaIntensityOffset;
+}
+
+void ossimHsiRemapper::setHueOffset(int color_group, double offset)
+{
+   switch (color_group)
+   {
+      case RED:
+         setRedHueOffset(offset);
+         break;
+      case YELLOW:
+         setYellowHueOffset(offset);
+         break;
+      case GREEN:
+         setGreenHueOffset(offset);
+         break;
+      case CYAN:
+         setCyanHueOffset(offset);
+         break;
+      case BLUE:
+         setBlueHueOffset(offset);
+         break;
+      case MAGENTA:
+         setMagentaHueOffset(offset);
+         break;
+      case ALL:
+         setMasterHueOffset(offset);
+         break;
+      default:
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << "ossimHsiRemapper::setHueOffset NOTICE:  Range error!" << endl;
+   }
+}
+
+void ossimHsiRemapper::setHueLowRange(int color_group, double range)
+{
+   switch (color_group)
+   {
+      case RED:
+         setRedHueLowRange(range);
+         break;
+      case YELLOW:
+         setYellowHueLowRange(range);
+         break;
+      case GREEN:
+         setGreenHueLowRange(range);
+         break;
+      case CYAN:
+         setCyanHueLowRange(range);
+         break;
+      case BLUE:
+         setBlueHueLowRange(range);
+         break;
+      case MAGENTA:
+         setMagentaHueLowRange(range);
+         break;
+      default:
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << "ossimHsiRemapper::setHueLowRange NOTICE:  Range error!"
+            << endl;
+   }
+}
+
+void ossimHsiRemapper::setHueHighRange(int color_group, double range)
+{
+   switch (color_group)
+   {
+      case RED:
+         setRedHueHighRange(range);
+         break;
+      case YELLOW:
+         setYellowHueHighRange(range);
+         break;
+      case GREEN:
+         setGreenHueHighRange(range);
+         break;
+      case CYAN:
+         setCyanHueHighRange(range);
+         break;
+      case BLUE:
+         setBlueHueHighRange(range);
+         break;
+      case MAGENTA:
+         setMagentaHueHighRange(range);
+         break;
+      default:
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << "ossimHsiRemapper::setHueHighRange NOTICE:  Range error!"
+            << endl;
+   }
+}
+
+void ossimHsiRemapper::setHueBlendRange(int color_group, double range)
+{
+   switch (color_group)
+   {
+      case RED:
+         setRedHueBlendRange(range);
+         break;
+      case YELLOW:
+         setYellowHueBlendRange(range);
+         break;
+      case GREEN:
+         setGreenHueBlendRange(range);
+         break;
+      case CYAN:
+         setCyanHueBlendRange(range);
+         break;
+      case BLUE:
+         setBlueHueBlendRange(range);
+         break;
+      case MAGENTA:
+         setMagentaHueBlendRange(range);
+         break;
+      default:
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << "ossimHsiRemapper::setHueBlendRange NOTICE:  Range error!"
+            << endl;
+   }
+}
+
+void ossimHsiRemapper::setSaturationOffset(int color_group, double offset)
+{
+   switch (color_group)
+   {
+      case RED:
+         setRedSaturationOffset(offset);
+         break;
+      case YELLOW:
+         setYellowSaturationOffset(offset);
+         break;
+      case GREEN:
+         setGreenSaturationOffset(offset);
+         break;
+      case CYAN:
+         setCyanSaturationOffset(offset);
+         break;
+      case BLUE:
+         setBlueSaturationOffset(offset);
+         break;
+      case MAGENTA:
+         setMagentaSaturationOffset(offset);
+         break;
+      case ALL:
+         setMasterSaturationOffset(offset);
+         break;
+      default:
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << "ossimHsiRemapper::setSaturationOffset NOTICE:  Range error!"
+            << endl;
+         break;
+   }
+}
+
+void ossimHsiRemapper::setIntensityOffset(int color_group, double offset)
+{
+   switch (color_group)
+   {
+      case RED:
+         setRedIntensityOffset(offset);
+         break;
+      case YELLOW:
+         setYellowIntensityOffset(offset);
+         break;
+      case GREEN:
+         setGreenIntensityOffset(offset);
+         break;
+      case CYAN:
+         setCyanIntensityOffset(offset);
+         break;
+      case BLUE:
+         setBlueIntensityOffset(offset);
+         break;
+      case MAGENTA:
+         setMagentaIntensityOffset(offset);
+         break;
+      case ALL:
+         setMasterIntensityOffset(offset);
+         break;
+      default:
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << "ossimHsiRemapper::setIntensityOffset NOTICE:  Range error!"
+            << endl;
+         break;
+   }
+}
+
+double ossimHsiRemapper::getHueOffset(int color_group) const
+{
+   switch (color_group)
+   {
+      case RED:
+         return getRedHueOffset();
+         break;
+      case YELLOW:
+         return getYellowHueOffset();
+         break;
+      case GREEN:
+         return getGreenHueOffset();
+         break;
+      case CYAN:
+         return getCyanHueOffset();
+         break;
+      case BLUE:
+         return getBlueHueOffset();
+         break;
+      case MAGENTA:
+         return getMagentaHueOffset();
+         break;
+      case ALL:
+         return getMasterHueOffset();
+         break;
+      default:
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << "ossimHsiRemapper::getHueOffset NOTICE:  Range error!"
+            << endl;
+         break;
+   }
+   return 0.0;
+}
+
+double ossimHsiRemapper::getHueLowRange(int color_group) const
+{
+   switch (color_group)
+   {
+      case RED:
+         return getRedHueLowRange();
+         break;
+      case YELLOW:
+         return getYellowHueLowRange();
+         break;
+      case GREEN:
+         return getGreenHueLowRange();
+         break;
+      case CYAN:
+         return getCyanHueLowRange();
+         break;
+      case BLUE:
+         return getBlueHueLowRange();
+         break;
+      case MAGENTA:
+         return getMagentaHueLowRange();
+         break;
+      default:
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << "ossimHsiRemapper::getHueLowRange NOTICE:  Range error!"
+            << endl;
+         break;
+   }
+   return 0.0;
+}
+
+double ossimHsiRemapper::getHueHighRange(int color_group) const
+{
+   switch (color_group)
+   {
+      case RED:
+         return getRedHueHighRange();
+         break;
+      case YELLOW:
+         return getYellowHueHighRange();
+         break;
+      case GREEN:
+         return getGreenHueHighRange();
+         break;
+      case CYAN:
+         return getCyanHueHighRange();
+         break;
+      case BLUE:
+         return getBlueHueHighRange();
+         break;
+      case MAGENTA:
+         return getMagentaHueHighRange();
+         break;
+      default:
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << "ossimHsiRemapper::getHueHighRange NOTICE:  Range error!"
+            << endl;
+         break;
+   }
+   return 0.0;
+}
+
+double ossimHsiRemapper::getHueBlendRange(int color_group) const
+{
+   switch (color_group)
+   {
+      case RED:
+         return getRedHueBlendRange();
+         break;
+      case YELLOW:
+         return getYellowHueBlendRange();
+         break;
+      case GREEN:
+         return getGreenHueBlendRange();
+         break;
+      case CYAN:
+         return getCyanHueBlendRange();
+         break;
+      case BLUE:
+         return getBlueHueBlendRange();
+         break;
+      case MAGENTA:
+         return getMagentaHueBlendRange();
+         break;
+      default:
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << "ossimHsiRemapper::getHueBlendRange NOTICE:  Range error!"
+            << endl;
+         break;
+   }
+   return 0.0;
+}
+
+double ossimHsiRemapper::getSaturationOffset(int color_group) const
+{
+   switch (color_group)
+   {
+      case RED:
+         return getRedSaturationOffset();
+         break;
+      case YELLOW:
+         return getYellowSaturationOffset();
+         break;
+      case GREEN:
+         return getGreenSaturationOffset();
+         break;
+      case CYAN:
+         return getCyanSaturationOffset();
+         break;
+      case BLUE:
+         return getBlueSaturationOffset();
+         break;
+      case MAGENTA:
+         return getMagentaSaturationOffset();
+         break;
+      case ALL:
+         return getMasterSaturationOffset();
+         break;
+      default:
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << "ossimHsiRemapper::getSaturationOffset NOTICE:  Range error!"
+            << endl;
+         break;
+   }
+   return 0.0;
+}
+
+double ossimHsiRemapper::getIntensityOffset(int color_group) const
+{
+   switch (color_group)
+   {
+      case RED:
+         return getRedIntensityOffset();
+         break;
+      case YELLOW:
+         return getYellowIntensityOffset();
+         break;
+      case GREEN:
+         return getGreenIntensityOffset();
+         break;
+      case CYAN:
+         return getCyanIntensityOffset();
+         break;
+      case BLUE:
+         return getBlueIntensityOffset();
+         break;
+      case MAGENTA:
+         return getMagentaIntensityOffset();
+         break;
+      case ALL:
+         return getMasterIntensityOffset();
+         break;
+      default:
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << "ossimHsiRemapper::getIntensityOffset NOTICE:  Range error!"
+            << endl;
+         break;
+   }
+   return 0.0;
+}
+
+void ossimHsiRemapper::setWhiteObjectClip(double clip)
+{
+   if ( (clip >= .8) && (clip <= 1.0) )
+   {
+      theWhiteObjectClip = clip;
+      verifyEnabled();
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "HsiRemapper::setWhiteObjectClip range error:"
+         << "\nClip of " << clip << " is out of range!"
+         << "\nMust be between .8 and 1.0"
+         << endl;
+   }
+}
+
+double ossimHsiRemapper::getWhiteObjectClip() const
+{
+   return theWhiteObjectClip;
+}
+
+void ossimHsiRemapper::resetWhiteObjectClip()
+{
+   theWhiteObjectClip = 1.0;
+   verifyEnabled();
+}
+
+ossimString ossimHsiRemapper::getLongName()const
+{
+   return ossimString("HSI Remapper, filter with controls for all HSI(Hue, Saturation, and Intensity) adjustments.");
+}
+
+ossimString ossimHsiRemapper::getShortName()const
+{
+   return ossimString("HSI Remapper");
+}
+
+ostream& ossimHsiRemapper::print(ostream& os) const
+{
+   os << setiosflags(ios::fixed) << setprecision(2)
+      << "\nossimHsiRemapper:"
+      << "\ntheEnableFlag:                " << theEnableFlag
+
+      << "\ntheMasterHueOffset:           " << theMasterHueOffset
+      << "\ntheMasterSaturationOffset:    " << theMasterSaturationOffset
+      << "\ntheMasterIntensityOffset:     " << theMasterIntensityOffset
+      << "\ntheMasterIntensityLowClip:    " << theMasterIntensityLowClip
+      << "\ntheMasterIntensityHighClip:   " << theMasterIntensityHighClip
+      
+      << "\ntheRedHueOffset:              " << theRedHueOffset
+      << "\ntheRedHueLowRange:            " << theRedHueLowRange
+      << "\ntheRedHueHighRange:           " << theRedHueHighRange
+      << "\ntheRedSaturationOffset:       " << theRedSaturationOffset
+      << "\ntheRedIntensityOffset:        " << theRedIntensityOffset
+      
+      << "\ntheYellowHueOffset:           " << theYellowHueOffset
+      << "\ntheYellowHueLowRange:         " << theYellowHueLowRange
+      << "\ntheYellowHueHighRange:        " << theYellowHueHighRange
+      << "\ntheYellowSaturationOffset:    " << theYellowSaturationOffset
+      << "\ntheYellowIntensityOffset:     " << theYellowIntensityOffset
+      
+      << "\ntheGreenHueOffset:            " << theGreenHueOffset
+      << "\ntheGreenHueLowRange:          " << theGreenHueLowRange
+      << "\ntheGreenHueHighRange:         " << theGreenHueHighRange
+      << "\ntheGreenSaturationOffset:     " << theGreenSaturationOffset
+      << "\ntheGreenIntensityOffset:      " << theGreenIntensityOffset
+      
+      << "\ntheCyanHueOffset:             " << theCyanHueOffset
+      << "\ntheCyanHueLowRange:           " << theCyanHueLowRange
+      << "\ntheCyanHueHighRange:          " << theCyanHueHighRange
+      << "\ntheCyanSaturationOffset:      " << theCyanSaturationOffset
+      << "\ntheCyanIntensityOffset:       " << theCyanIntensityOffset
+      
+      << "\ntheBlueHueOffset:             " << theBlueHueOffset
+      << "\ntheBlueHueLowRange:           " << theBlueHueLowRange
+      << "\ntheBlueHueHighRange:          " << theBlueHueHighRange
+      << "\ntheBlueSaturationOffset:      " << theBlueSaturationOffset
+      << "\ntheBlueIntensityOffset:       " << theBlueIntensityOffset
+      
+      << "\ntheMagentaHueOffset:          " << theMagentaHueOffset
+      << "\ntheMagentaHueLowRange:        " << theMagentaHueLowRange
+      << "\ntheMagentaHueHighRange:       " << theMagentaHueHighRange
+      << "\ntheMagentaSaturationOffset:   " << theMagentaSaturationOffset
+      << "\ntheMagentaIntensityOffset:    " << theMagentaIntensityOffset
+
+      << "\ntheWhiteObjectClip:           " << theWhiteObjectClip
+      << endl;
+   
+   return os;
+}
+
+ostream& operator<<(ostream& os, const ossimHsiRemapper& hr)
+{
+   return hr.print(os);
+}
+
diff --git a/ossim/src/ossim/imaging/ossimHsiToRgbSource.cpp b/ossim/src/ossim/imaging/ossimHsiToRgbSource.cpp
new file mode 100644
index 0000000..05027dd
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimHsiToRgbSource.cpp
@@ -0,0 +1,148 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimHsiToRgbSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimHsiToRgbSource.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimHsiVector.h>
+#include <ossim/base/ossimRgbVector.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+
+RTTI_DEF1(ossimHsiToRgbSource, "ossimHsiToRgbSource", ossimImageSourceFilter)
+
+ossimHsiToRgbSource::ossimHsiToRgbSource()
+   :ossimImageSourceFilter(),
+    theBlankTile(NULL),
+    theTile(NULL)
+{
+}
+
+ossimHsiToRgbSource::ossimHsiToRgbSource(ossimImageSource* inputSource)
+   : ossimImageSourceFilter(inputSource),
+    theBlankTile(NULL),
+    theTile(NULL)
+{
+}
+
+ossimHsiToRgbSource::~ossimHsiToRgbSource()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimHsiToRgbSource::getTile(
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   if(!theInputConnection)
+   {
+      return NULL;  // This filter requires an input.
+   }
+   
+   ossimRefPtr<ossimImageData> inputTile =
+      theInputConnection->getTile(tileRect, resLevel);   
+   if(!isSourceEnabled())
+   {
+      return inputTile;
+   }
+   
+   if(!theTile.valid())
+   {
+      allocate(); // First time through...
+   }
+   
+   if( !inputTile.valid() ||
+       inputTile->getDataObjectStatus() == OSSIM_NULL ||
+       inputTile->getDataObjectStatus() == OSSIM_EMPTY )
+   {
+      theBlankTile->setImageRectangle(tileRect);
+      return theBlankTile;
+   }
+
+   if((inputTile->getNumberOfBands()==3)&&
+      (inputTile->getScalarType()==OSSIM_NORMALIZED_FLOAT)&&
+      (inputTile->getDataObjectStatus()!=OSSIM_NULL))
+   {
+      // Set the origin, resize if needed of the output tile.
+      theTile->setImageRectangle(tileRect);
+      
+      ossim_uint8* outputBands[3];
+      float* inputBands[3];
+      outputBands[0] = static_cast<ossim_uint8*>(theTile->getBuf(0));
+      outputBands[1] = static_cast<ossim_uint8*>(theTile->getBuf(1));
+      outputBands[2] = static_cast<ossim_uint8*>(theTile->getBuf(2));
+      inputBands[0] = static_cast<float*>(inputTile->getBuf(0));
+      inputBands[1] = static_cast<float*>(inputTile->getBuf(1));
+      inputBands[2] = static_cast<float*>(inputTile->getBuf(2));
+      
+      long height = inputTile->getHeight();
+      long width  = inputTile->getWidth();
+      long offset = 0;
+      for(long row = 0; row < height; ++row)
+      {
+         for(long col = 0; col < width; ++col)
+         {
+            ossimHsiVector hsi(inputBands[0][offset],
+                               inputBands[1][offset],
+                               inputBands[2][offset]);
+            
+            ossimRgbVector rgb(hsi);
+            
+            
+            outputBands[0][offset] = rgb.getR();
+            outputBands[1][offset] = rgb.getG();
+            outputBands[2][offset] = rgb.getB();
+            
+            ++offset;
+         }
+      }
+   }
+   else
+   {
+      return inputTile;
+   }
+
+   theTile->validate();
+
+   return theTile;
+}
+
+void ossimHsiToRgbSource::initialize()
+{
+   ossimImageSourceFilter::initialize();
+}
+
+void ossimHsiToRgbSource::allocate()
+{
+   theBlankTile = ossimImageDataFactory::instance()->create(this, this);
+   theTile = (ossimImageData*)theBlankTile->dup();
+   theTile->initialize();
+}
+
+ossimScalarType ossimHsiToRgbSource::getOutputScalarType() const
+{
+   return OSSIM_UCHAR;
+}
+
+double ossimHsiToRgbSource::getNullPixelValue()const
+{
+   return 0.0;
+}
+
+double ossimHsiToRgbSource::getMinPixelValue(ossim_uint32 /* band */)const
+{
+   return OSSIM_DEFAULT_MIN_PIX_UCHAR;
+}
+
+double ossimHsiToRgbSource::getMaxPixelValue(ossim_uint32 /* band */)const
+{
+   return OSSIM_DEFAULT_MAX_PIX_UCHAR;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimHsvGridRemapEngine.cpp b/ossim/src/ossim/imaging/ossimHsvGridRemapEngine.cpp
new file mode 100644
index 0000000..9a49b8d
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimHsvGridRemapEngine.cpp
@@ -0,0 +1,277 @@
+//*****************************************************************************
+// FILE: ossimHsvGridRemapEngine.cc
+//
+// Copyright (C) 2001 ImageLinks, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Contains implementation of class 
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimHsvGridRemapEngine.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimHsvGridRemapEngine.h>
+
+RTTI_DEF1(ossimHsvGridRemapEngine, "ossimHsvGridRemapEngine",
+          ossimGridRemapEngine);
+
+#include <ossim/imaging/ossimGridRemapSource.h>
+#include <ossim/imaging/ossimAtbPointSource.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimDblGrid.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/base/ossimRgbVector.h>
+#include <ossim/base/ossimHsvVector.h>
+
+//***
+// Define Trace flags for use within this file:
+//***
+#include <ossim/base/ossimTrace.h>
+static ossimTrace traceExec  ("ossimHsvGridRemapEngine:exec");
+static ossimTrace traceDebug ("ossimHsvGridRemapEngine:debug");
+
+//*****************************************************************************
+//  METHOD: ossimHsvGridRemapEngine::remapTile
+//  
+//*****************************************************************************
+ossimObject* ossimHsvGridRemapEngine::dup() const
+{
+   return new ossimHsvGridRemapEngine;
+}
+
+//*****************************************************************************
+//  METHOD: ossimHsvGridRemapEngine::remapTile
+//  
+//*****************************************************************************
+void ossimHsvGridRemapEngine::remapTile(const ossimDpt&       origin,
+                                        ossimGridRemapSource* remapper,
+                                        ossimRefPtr<ossimImageData>& tile)
+{
+   static const char MODULE[] = "ossimHsvGridRemapEngine::remapTile";
+   if (traceExec())  CLOG << "entering..." << endl;
+
+   //***
+   // Fetch tile size and NULL pixel value:
+   //***
+   int    width         = tile->getWidth();
+   int    height        = tile->getHeight();
+   int    offset        = 0;
+   
+   void* red_buf = tile->getBuf(0);
+   void* grn_buf = tile->getBuf(1);
+   void* blu_buf = tile->getBuf(2);
+
+   ossimDblGrid& gridH = *(remapper->getGrid(0));
+   ossimDblGrid& gridS = *(remapper->getGrid(1));
+   ossimDblGrid& gridV = *(remapper->getGrid(2));
+      
+   //---
+   // Remap according to pixel type:
+   //---
+   switch(tile->getScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         for (double line=origin.line; line<origin.line+height; line+=1.0)
+         {
+            for (double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
+            {
+               //---
+               // Fetch pixel from the input tile band buffers and convert
+               // to HSV:
+               //---
+               ossimRgbVector rgb_pixel (((ossim_uint8*)red_buf)[offset],
+                                         ((ossim_uint8*)grn_buf)[offset],
+                                         ((ossim_uint8*)blu_buf)[offset]);
+               ossimHsvVector hsv_pixel (rgb_pixel);
+               
+               //---
+               // Remap pixel HSV  with spatially variant bias value:
+               //---
+               hsv_pixel.setH(hsv_pixel.getH() + gridH(samp,line));
+               hsv_pixel.setS(hsv_pixel.getS() + gridS(samp,line));
+               hsv_pixel.setV(hsv_pixel.getV() + gridV(samp,line));
+               
+               //---
+               // Convert back to RGB and write to the tile:
+               //---
+               rgb_pixel = hsv_pixel;  // auto-clamped
+               ((ossim_uint8*)red_buf)[offset] = rgb_pixel.getR();
+               ((ossim_uint8*)grn_buf)[offset] = rgb_pixel.getG();
+               ((ossim_uint8*)blu_buf)[offset] = rgb_pixel.getB();
+               
+               offset++;
+            }
+         }
+         break;
+      }
+      
+      case OSSIM_USHORT11:
+         break;
+         
+      case OSSIM_UINT16:
+         break;
+         
+      case OSSIM_SINT16:
+         break;	
+
+      case OSSIM_FLOAT64:
+         break;	
+
+      case OSSIM_NORMALIZED_DOUBLE:
+         break;	
+
+      case OSSIM_FLOAT32:
+         break;	
+
+      case OSSIM_NORMALIZED_FLOAT:
+         break;	
+
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+         break;
+
+   }   // end switch statement
+
+   if (traceExec())  CLOG << "returning..." << endl;
+   return;
+};
+
+//*****************************************************************************
+//  METHOD: ossimHsvGridRemapEngine::assignRemapValues
+//
+//  This engine defines the target value as an HSV vector of doubles, computed
+//  as the mean of all contributor HSV values.
+//  
+//*****************************************************************************
+void ossimHsvGridRemapEngine::assignRemapValues (
+   vector<ossimAtbPointSource*>& sources_list)
+{
+   static const char MODULE[] = "ossimHsvGridRemapEngine::assignRemapValues";
+   if (traceExec())  CLOG << "entering..." << endl;
+
+   int i; // index to individual sources
+
+   //***
+   // Declare a 2D array that will contain all of the contributing sources'
+   // HSV mean values. Also declare the accumulator target vector.
+   //***
+   int num_contributors = (int)sources_list.size();
+   double** contributor_pixel = new double* [num_contributors];
+   for (i=0; i<num_contributors; i++)
+      contributor_pixel[i] = new double[3];
+   double target_pixel[3] = {0.0, 0.0, 0.0};
+
+   //***
+   // Now loop over each remaining contributor and sum in its contribution:
+   //***
+   vector<ossimAtbPointSource*>::iterator source;
+   i = 0;
+   for(source  = sources_list.begin();
+       source != sources_list.end();
+       source++)
+   {
+      (*source)->getSourceValue(contributor_pixel[i]);
+
+      target_pixel[0] += contributor_pixel[i][0]/(double)num_contributors;
+      target_pixel[1] += contributor_pixel[i][1]/(double)num_contributors;
+      target_pixel[2] += contributor_pixel[i][2]/(double)num_contributors;
+
+      i++;
+   }
+
+   //***
+   // The target pixel has been established. Now need to compute the actual
+   // remap quantities that will be written to the appropriate remap grids:
+   //***
+   i = 0;
+   for(source  = sources_list.begin();
+       source != sources_list.end();
+       source++)
+   {
+      computeRemapNode(*source, contributor_pixel[i], target_pixel);
+      i++;
+   }
+
+   //***
+   // Delete locally allocated memory:
+   //***
+   for (i=0; i<num_contributors; i++)
+      delete [] contributor_pixel[i];
+   delete [] contributor_pixel;
+   
+   if (traceExec())  CLOG << "returning..." << endl;
+   return;
+}
+
+//*****************************************************************************
+//  METHOD: ossimHsvGridRemapEngine::computeSourceValue
+//  
+//*****************************************************************************
+void ossimHsvGridRemapEngine::computeSourceValue(
+   ossimRefPtr<ossimImageData>& source, void* result)
+{
+   static const char MODULE[]="ossimHsvGridRemapEngine::computeSourceValue";
+   if (traceExec())  CLOG << "entering..." << endl;
+
+   //***
+   // This engine defines "value" as the HSV vector corresponding to the mean
+   // RGB pixel value of the source data:
+   //***
+   ossimRgbVector rgb_vector;
+   rgb_vector.setR((unsigned char) source->computeAverageBandValue(0));
+   rgb_vector.setG((unsigned char) source->computeAverageBandValue(1));
+   rgb_vector.setB((unsigned char) source->computeAverageBandValue(2));
+
+   //***
+   // Assign the HSV components to the result vector:
+   //***
+   ossimHsvVector hsv_vector (rgb_vector);
+   ((double*)result)[0] = (double) hsv_vector.getH();
+   ((double*)result)[1] = (double) hsv_vector.getS();
+   ((double*)result)[2] = (double) hsv_vector.getV();
+   
+   if (traceExec())  CLOG << "returning..." << endl;
+   return;
+}
+
+//*****************************************************************************
+//  METHOD: ossimHsvGridRemapEngine::computeRemapNode
+//
+//  This engine defines the remap value as the difference between the target
+//  HSV vector and the individual point source's value vector.
+//
+//*****************************************************************************
+void ossimHsvGridRemapEngine::computeRemapNode(ossimAtbPointSource* ps,
+                                              void* source_value,
+                                              void* target_value)
+{
+   static const char MODULE[] = "ossimHsvGridRemapEngine::computeRemapNode";
+   if (traceExec())  CLOG << "entering..." << endl;
+
+   //***
+   // Compute the remap grid node value specific to this HSV implementation:
+   //***
+   double node[3];
+   node[0] = ((double*)target_value)[0] - ((double*)source_value)[0];
+   node[1] = ((double*)target_value)[1] - ((double*)source_value)[1];
+   node[2] = ((double*)target_value)[2] - ((double*)source_value)[2];
+
+   //***
+   // Fetch a pointer to the remapper feeding this point source in order to
+   // pass it the node value:
+   //***
+   ossimGridRemapSource* remapper = ps->getRemapSource();
+   remapper->setGridNode(ps->getViewPoint(), node);
+                         
+   if (traceExec())  CLOG << "returning..." << endl;
+   return;
+}
+
+
diff --git a/ossim/src/ossim/imaging/ossimHsvToRgbSource.cpp b/ossim/src/ossim/imaging/ossimHsvToRgbSource.cpp
new file mode 100644
index 0000000..a2e01ce
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimHsvToRgbSource.cpp
@@ -0,0 +1,160 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimHsvToRgbSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimHsvToRgbSource.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimHsvVector.h>
+#include <ossim/base/ossimRgbVector.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+
+RTTI_DEF1(ossimHsvToRgbSource, "ossimHsvToRgbSource", ossimImageSourceFilter)
+
+ossimHsvToRgbSource::ossimHsvToRgbSource()
+   :ossimImageSourceFilter(),
+    theBlankTile(NULL),
+    theTile(NULL)
+{
+}
+
+ossimHsvToRgbSource::ossimHsvToRgbSource(ossimImageSource* inputSource)
+   : ossimImageSourceFilter(inputSource),
+     theBlankTile(NULL),
+     theTile(NULL)
+{
+}
+
+ossimHsvToRgbSource::~ossimHsvToRgbSource()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimHsvToRgbSource::getTile(
+   const  ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   if(theInputConnection)
+   {
+      ossimRefPtr<ossimImageData> imageData =
+         theInputConnection->getTile(tileRect, resLevel);
+
+      if(!imageData.valid()) return theBlankTile;
+      
+      if(!isSourceEnabled())
+      {
+         return imageData;
+      }
+
+      if(!theTile.valid()) allocate();
+      if(!theTile.valid())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "Unable to initialize ossimHsvToRgbSource in getTile"
+            << std::endl;
+         return ossimRefPtr<ossimImageData>();
+      }
+      
+      long w  = tileRect.width();
+      long h  = tileRect.height();
+      long tw = theTile->getWidth();
+      long th = theTile->getHeight();
+      
+      theBlankTile->setOrigin(tileRect.ul());
+      theBlankTile->setWidthHeight(w, h);
+      theTile->setWidthHeight(w, h);
+      theTile->setOrigin(tileRect.ul());
+      if( (tw*th) != (w*h))
+      {
+         theTile->initialize();
+      }
+      else
+      {
+         theTile->makeBlank();
+      }
+      
+      if((imageData->getNumberOfBands()==3)&&
+         (imageData->getScalarType()==OSSIM_NORMALIZED_FLOAT)&&
+         (imageData->getDataObjectStatus()!=OSSIM_NULL))
+      {
+         ossim_uint8* outputBands[3];
+         float* inputBands[3];
+         outputBands[0] = static_cast<ossim_uint8*>(theTile->getBuf(0));
+         outputBands[1] = static_cast<ossim_uint8*>(theTile->getBuf(1));
+         outputBands[2] = static_cast<ossim_uint8*>(theTile->getBuf(2));
+         inputBands[0] = static_cast<float*>(imageData->getBuf(0));
+         inputBands[1] = static_cast<float*>(imageData->getBuf(1));
+         inputBands[2] = static_cast<float*>(imageData->getBuf(2));
+         
+         long height = imageData->getHeight();
+         long width  = imageData->getWidth();
+         long offset = 0;
+         for(long row = 0; row < height; ++row)
+         {
+            for(long col = 0; col < width; ++col)
+            {
+               ossimHsvVector hsv(inputBands[0][offset],
+                                  inputBands[1][offset],
+                                  inputBands[2][offset]);
+               
+               ossimRgbVector rgb(hsv);
+
+               outputBands[0][offset] = rgb.getR();
+               outputBands[1][offset] = rgb.getG();
+               outputBands[2][offset] = rgb.getB();
+
+               ++offset;
+            }
+         }
+      }
+      else
+      {
+         return imageData;
+      }
+      theTile->validate();
+      return theTile;
+   }
+   
+   return theBlankTile;
+}
+
+void ossimHsvToRgbSource::initialize()
+{
+   theBlankTile = NULL;
+   theTile      = NULL;
+}
+
+void ossimHsvToRgbSource::allocate()
+{
+   theBlankTile = ossimImageDataFactory::instance()->create(this, this);
+   theTile = (ossimImageData*)theBlankTile->dup();
+   theTile->initialize();
+}
+
+ossimScalarType ossimHsvToRgbSource::getOutputScalarType() const
+{
+   return OSSIM_UINT8;
+}
+
+double ossimHsvToRgbSource::getNullPixelValue()const
+{
+   return 0;
+}
+
+double ossimHsvToRgbSource::getMinPixelValue(ossim_uint32 /* band */)const
+{
+   return OSSIM_DEFAULT_MIN_PIX_UCHAR;
+}
+
+double ossimHsvToRgbSource::getMaxPixelValue(ossim_uint32 /* band */)const
+{
+   return OSSIM_DEFAULT_MAX_PIX_UCHAR;
+}  
+
diff --git a/ossim/src/ossim/imaging/ossimIgenGenerator.cpp b/ossim/src/ossim/imaging/ossimIgenGenerator.cpp
new file mode 100644
index 0000000..8416e00
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimIgenGenerator.cpp
@@ -0,0 +1,682 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimIgenGenerator.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimIgenGenerator.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/imaging/ossimImageChain.h>
+#include <ossim/imaging/ossimGeoPolyCutter.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimUsgsQuad.h>
+
+void ossimIgenGenerator::generateSpecList(bool outputToFileFlag)
+{
+   if(theTilingFlag&&
+      (theTileSpacingUnits!=OSSIM_UNIT_UNKNOWN)&&
+      (!theTileSpacing.hasNans()))
+   {
+      generateTiledSpecList(outputToFileFlag);
+   }
+   else
+   {
+      generateNoTiledSpecList(outputToFileFlag);
+   }
+   
+}
+
+void ossimIgenGenerator::getImageFilenamesFromSpecList(std::vector<ossimFilename>& filenameList)
+{
+   if(!theSpecList.size())
+   {
+      generateSpecList();
+   }
+   if(theSpecList.size())
+   {
+      filenameList.clear();
+      for(ossim_uint32 i = 0; i < theSpecList.size(); ++i)
+      {
+         const char* filename = theSpecList[i].find("object2.",  ossimKeywordNames::FILENAME_KW);
+
+         if(filename)
+         {
+            filenameList.push_back(ossimFilename(filename));
+         }
+         else
+         {
+            filenameList.clear();
+            return;
+         }
+      }
+   }
+   
+}
+
+ossimGrect ossimIgenGenerator::getBoundingGround()const
+{
+   return ossimGrect(theOutputGeoPolygon[0],
+                     theOutputGeoPolygon[1],
+                     theOutputGeoPolygon[2],
+                     theOutputGeoPolygon[3]);
+}
+
+void ossimIgenGenerator::executeSpecList()
+{
+}
+
+void ossimIgenGenerator::setInput(ossimConnectableObject* input)
+{
+   theSpecList.clear();
+   generateInputKwl(input);
+   ossimImageSource* inputInterface = PTR_CAST(ossimImageSource,
+                                                        input);
+   if(inputInterface)
+   {
+      theInputBoundingRect = inputInterface->getBoundingRect();
+   }
+}
+
+
+void ossimIgenGenerator::generateChainForMultiInput(ossimConnectableObject* connectable)
+{
+   std::stack<ossimConnectableObject*> aStack;
+
+   generateChainForMultiInputRecurse(aStack, connectable);
+
+   ossim_int32 objectIndex = 1;
+   while(!aStack.empty())
+   {
+      ossimConnectableObject* current = aStack.top();
+      aStack.pop();
+      ossimString prefix = ossimString("object") + ossimString::toString(objectIndex) + ".";
+
+      current->saveState(theInputKwl, prefix.c_str());
+
+      ++objectIndex;
+   }
+   theInputKwl.add("type",
+                   "ossimImageChain",
+                   true);
+   
+}
+
+void ossimIgenGenerator::generateChainForMultiInputRecurse(std::stack<ossimConnectableObject*>& aStack,
+                                                           ossimConnectableObject* connectable)
+{
+   
+
+   if(connectable)
+   {
+      aStack.push(connectable);
+      for(ossim_uint32 i = 0; i < connectable->getNumberOfInputs(); ++i)
+      {
+         generateChainForMultiInputRecurse(aStack,
+                                           connectable->getInput(i));
+      }
+   }   
+}
+
+
+ossimProjection* ossimIgenGenerator::createProductProjection()const
+{
+   return ossimProjectionFactoryRegistry::instance()->createProjection(theViewKwl);
+}
+
+ossimObject* ossimIgenGenerator::createOutput()const
+{
+   return ossimObjectFactoryRegistry::instance()->createObject(theOutputKwl);
+}
+
+ossimObject* ossimIgenGenerator::createInput()const
+{
+   return ossimObjectFactoryRegistry::instance()->createObject(theInputKwl);
+}
+
+void ossimIgenGenerator::generateInputKwl(ossimConnectableObject* connectable)
+{
+   theInputKwl.clear();
+   if(connectable)
+   {
+      // if it has at least one non null input
+      // then  we must build a chain and save it out
+      if(connectable->getInput())
+      {
+         generateChainForMultiInput(connectable);
+      }
+      else // it is a single input
+      {
+         connectable->saveState(theInputKwl);
+      }
+   }
+}
+
+void ossimIgenGenerator::generateOutputKwl(ossimConnectableObject* connectable)
+{
+   theOutputKwl.clear();
+   if(connectable)
+   {
+      connectable->saveState(theOutputKwl);
+   }
+}
+
+void ossimIgenGenerator::generateViewKwl(ossimObject* view)
+{
+   theViewKwl.clear();
+   if(view)
+   {
+      view->saveState(theViewKwl);
+   }
+}
+   
+void ossimIgenGenerator::setDefaultOutput()
+{
+   
+}
+
+void ossimIgenGenerator::generateTiledSpecList(bool outputToFileFlag)
+{
+   theSpecList.clear();
+   theSpecFileList.clear();
+   ossimDpt spacing = theTileSpacing;
+
+   switch(theTileSpacingUnits)
+   {
+      case OSSIM_MINUTES:
+      {
+         spacing.x /= 60;
+         spacing.y /= 60;
+         generateGeoTiledSpecList(spacing, outputToFileFlag);
+         break;
+      }
+      case OSSIM_SECONDS:
+      {
+         spacing.x /= 3600;
+         spacing.y /= 3600;
+         generateGeoTiledSpecList(spacing, outputToFileFlag);
+         break;
+      }
+      case OSSIM_DEGREES:
+      {
+         generateGeoTiledSpecList(spacing, outputToFileFlag);
+         break;
+      }
+      case OSSIM_PIXEL:
+      {
+         generatePixelTiledSpecList(outputToFileFlag);
+         break;
+      }
+      default:
+         break;
+   }
+}
+
+void ossimIgenGenerator::generatePixelTiledSpecList(bool outputToFileFlag)
+{
+   ossimRefPtr<ossimProjection> proj = createProductProjection();
+
+   if((!proj)||(theOutputGeoPolygon.size() != 4))
+   {
+      return;
+   }
+   
+   ossimIrect inputRect = getInputBoundingRect();
+   inputRect.stretchToTileBoundary(theTileSpacing);
+   ossimGeoPolygon tempPoly;
+   ossimObject* obj = createInput();
+   ossimImageChain* chain = PTR_CAST(ossimImageChain,
+                                     obj);
+   ossimGeoPolyCutter* cutter = new ossimGeoPolyCutter;
+   chain->add(cutter);
+   
+   ossimKeywordlist kwl;
+   ossimFilename outfile = theOutputKwl.find(ossimKeywordNames::FILENAME_KW);
+   
+   if(outfile == "")
+   {
+      cerr << "Valid filename not given, returning!" << endl;
+   }
+   
+   kwl.add("object2.", theOutputKwl, true);
+   kwl.add("product.projection.",theViewKwl, true);
+   addPixelType(kwl, "product.");   
+   ossimDpt p1;
+   ossimDpt p2;
+   ossimDpt p3;
+   ossimDpt p4;
+
+   
+   proj->worldToLineSample(theOutputGeoPolygon[0], p1);
+   proj->worldToLineSample(theOutputGeoPolygon[1], p2);
+   proj->worldToLineSample(theOutputGeoPolygon[2], p3);
+   proj->worldToLineSample(theOutputGeoPolygon[3], p4);
+
+   ossimIrect bounds(p1, p2, p3, p4);
+   if(inputRect.completely_within(bounds))
+   {
+      inputRect = bounds;
+   }
+
+   bounds.stretchToTileBoundary(theTileSpacing);
+   
+   ossim_sint32 i = 1;
+   for(ossim_sint32 ulY = bounds.ul().y; ulY < bounds.lr().y; ulY+=(ossim_sint32)theTileSpacing.y)
+   {
+      for(ossim_sint32 ulX = bounds.ul().x; ulX < bounds.lr().x; ulX+=(ossim_sint32)theTileSpacing.x)
+      {
+         ossimDrect rect(ulX,
+                         ulY,
+                         ulX + (theTileSpacing.x - 1),
+                         ulY + (theTileSpacing.y - 1));
+         ossimGpt gpt1;
+         ossimGpt gpt2;
+         ossimGpt gpt3;
+         ossimGpt gpt4;
+
+         proj->lineSampleToWorld(rect.ul(), gpt1);
+         proj->lineSampleToWorld(rect.ur(), gpt2);
+         proj->lineSampleToWorld(rect.lr(), gpt3);
+         proj->lineSampleToWorld(rect.ll(), gpt4);
+         
+         tempPoly.clear();
+         tempPoly.addPoint(gpt1);
+         tempPoly.addPoint(gpt2);
+         tempPoly.addPoint(gpt3);
+         tempPoly.addPoint(gpt4);
+         addPadding(tempPoly, tempPoly);
+         cutter->setPolygon(tempPoly);
+         chain->saveState(kwl, "object1.");
+         
+         ossimFilename specName(theSpecFileLocation);
+         specName = specName.dirCat(ossimFilename("igen" + ossimString::toString(i) + ".spec"));
+         ossimFilename tilename = outfile.path();
+         if(theTileNamingConvention == "id")
+         {
+            int tileId = getTileId(inputRect, ossimDpt(ulX+theTileSpacing.x/2, ulY+theTileSpacing.y/2), theTileSpacing);
+            tilename = tilename.dirCat(ossimFilename(outfile.fileNoExtension() + "_" +
+                                                     ossimString::toString(tileId)));
+            tilename.setExtension(outfile.ext());
+         }
+         
+         kwl.add("object2.",
+                 ossimKeywordNames::FILENAME_KW,
+                 tilename,
+                 true);
+         kwl.add("object2.input_connection1",
+                 kwl.find("object1.id"),
+                 true);
+         theSpecFileList.push_back(specName);
+         if(outputToFileFlag)
+         {
+            kwl.write(specName.c_str());
+         }
+         else
+         {
+            theSpecList.push_back(kwl);
+         }
+         i++;
+      }
+   }
+}
+
+void ossimIgenGenerator::generateGeoTiledSpecList(const ossimDpt& spacing, bool outputToFileFlag)
+{
+   ossimRefPtr<ossimProjection> proj = createProductProjection();
+   if((proj.valid())&&(theOutputGeoPolygon.size() == 4))
+   {
+      ossimDrect rect;
+
+      ossimIrect inputRect = getInputBoundingRect();
+      ossimGpt gpt1;
+      ossimGpt gpt2;
+      ossimGpt gpt3;
+      ossimGpt gpt4;
+      proj->lineSampleToWorld(inputRect.ul(), gpt1);
+      proj->lineSampleToWorld(inputRect.ur(), gpt2);
+      proj->lineSampleToWorld(inputRect.lr(), gpt3);
+      proj->lineSampleToWorld(inputRect.ll(), gpt4);
+
+      ossimDrect inputGroundRect(gpt1,
+                                 gpt2,
+                                 gpt3,
+                                 gpt4,
+                                 OSSIM_RIGHT_HANDED);
+      
+      rect = ossimDrect(theOutputGeoPolygon[0],
+                        theOutputGeoPolygon[1],
+                        theOutputGeoPolygon[2],
+                        theOutputGeoPolygon[3],
+                        OSSIM_RIGHT_HANDED);
+
+      rect.stretchToTileBoundary(spacing);
+      inputGroundRect.stretchToTileBoundary(spacing);
+      double ulLat = rect.ul().lat;
+      double ulLon = rect.ul().lon;
+      ossimGeoPolygon tempPoly;
+      ossimObject* obj = createInput();
+      ossimImageChain* chain = PTR_CAST(ossimImageChain,
+                                        obj);
+      ossimGeoPolyCutter* cutter = new ossimGeoPolyCutter;
+      chain->add(cutter);
+      
+      ossimKeywordlist kwl;
+      ossimFilename outfile = theOutputKwl.find(ossimKeywordNames::FILENAME_KW);
+
+      if(outfile == "")
+      {
+         cerr << "Valid filename not given, returning!" << endl;
+      }
+      
+      kwl.add("object2.", theOutputKwl, true);
+      kwl.add("object2.input_connection1",
+              kwl.find("object1.id"),
+              true);
+      kwl.add("product.projection.",theViewKwl, true);
+      addPixelType(kwl, "product.");   
+      int i = 1;
+      int row = 0;
+      int col = 0;
+      //      int tileId = 0;
+      while(ulLat > rect.ll().lat)
+      {
+         ulLon = rect.ul().lon;
+         col = 0;
+         while(ulLon < rect.ur().lon)
+         {
+            tempPoly.clear();
+            tempPoly.addPoint(ulLat, ulLon, ossim::nan(), theOutputGeoPolygon[0].datum());
+            tempPoly.addPoint(ulLat, ulLon+spacing.lon, ossim::nan(), theOutputGeoPolygon[0].datum());
+            tempPoly.addPoint(ulLat-spacing.lat, ulLon+spacing.lon, ossim::nan(), theOutputGeoPolygon[0].datum());
+            tempPoly.addPoint(ulLat-spacing.lat, ulLon, ossim::nan(), theOutputGeoPolygon[0].datum());
+            
+            addPadding(tempPoly, tempPoly);
+            cutter->setPolygon(tempPoly);
+            chain->saveState(kwl, "object1.");
+
+            ossimFilename specName(theSpecFileLocation);
+            specName = specName.dirCat(ossimFilename("igen" + ossimString::toString(i) + ".spec"));
+	    ossimFilename tilename = outfile.path();
+	    if(theTileNamingConvention == "id")
+	      {
+		int tileId = getTileId(inputGroundRect, ossimDpt(ulLon, ulLat), spacing);
+		tilename = tilename.dirCat(ossimFilename(outfile.fileNoExtension() + "_" +
+							 ossimString::toString(tileId)));
+		tilename.setExtension(outfile.ext());
+	      }
+	    else
+	      {
+                 ossimUsgsQuad quad(ossimGpt(ulLat - (spacing.x), ulLon+(spacing.x), 0.0));
+                 if(spacing.x == 7.5/60.0)
+                 {
+                    tilename = tilename.dirCat(ossimFilename(quad.quarterQuadName().downcase().trim()));
+                 }
+                 else
+                 {
+                    tilename = tilename.dirCat(ossimFilename(quad.quarterQuadSegName().downcase().trim()));
+                 }
+                 
+                 tilename.setExtension(outfile.ext());
+	      }
+
+	    kwl.add("object2.",
+		    ossimKeywordNames::FILENAME_KW,
+		    tilename,
+		    true);
+            kwl.add("object2.input_connection1",
+                    kwl.find("object1.id"),
+                    true);
+            theSpecFileList.push_back(specName);
+            if(outputToFileFlag)
+            {
+               kwl.write(specName.c_str());
+            }
+            else
+            {
+               theSpecList.push_back(kwl);
+            }
+            ulLon += spacing.lon;
+            ++i;
+            ++col;
+         }
+         ++row;
+         ulLat -= spacing.lat;
+      }
+
+   }   
+}
+
+
+void ossimIgenGenerator::generateNoTiledSpecList(bool outputToFileFlag)
+{
+   theSpecList.clear();
+   theSpecFileList.clear();
+   
+   if(theViewKwl.getSize()&&
+      theInputKwl.getSize()&&
+      theOutputKwl.getSize())
+   {
+      ossimKeywordlist kwl;
+      if(theOutputGeoPolygon.size())
+      {
+         ossimRefPtr<ossimObject> obj = createInput();
+         ossimRefPtr<ossimImageChain> chain = PTR_CAST(ossimImageChain,
+                                                       obj.get());
+         if(chain.valid())
+         {
+            ossimGeoPolyCutter* cutter = new ossimGeoPolyCutter;
+            
+            cutter->setPolygon(theOutputGeoPolygon);
+            
+            chain->add(cutter);
+            chain->saveState(kwl, "object1.");
+         }
+         else
+         {
+            kwl.add("object1.",theInputKwl, true);
+         }
+         obj = 0;
+      }
+      else
+      {
+         kwl.add("object1.",theInputKwl, true);
+      }
+      kwl.add("object2.", theOutputKwl, true);
+      kwl.add("object2.input_connection1",
+              kwl.find("object1.id"),
+              true);
+      kwl.add("product.projection.",theViewKwl, true);
+      addPixelType(kwl, "product.");   
+
+      ossimFilename specName(theSpecFileLocation +
+                             "/"+
+                             "igen1.spec");
+      
+      theSpecFileList.push_back(specName);
+      if(outputToFileFlag)
+      {
+         kwl.write(specName.c_str());
+      }
+      else
+      {
+         theSpecList.push_back(kwl);
+      }
+      
+      kwl.clear();
+   }
+}
+
+int ossimIgenGenerator::getTileId(const ossimDrect& rect,
+				  const ossimDpt& currentPt,
+				  const ossimDpt& spacing)const
+{
+   ossimDpt ul(rect.ul());
+   
+   double relY = fabs(ul.y - currentPt.y);
+   double relX = fabs(ul.x - currentPt.x);
+   
+   
+   ossim_int32 spacingY           = (ossim_int32)(relY/spacing.y);
+   ossim_int32 spacingX           = (ossim_int32)(relX/spacing.x);
+   ossim_int32 maxHorizontalTiles = (ossim_int32)( (rect.width()-1)/spacing.x);
+   
+   return spacingY*maxHorizontalTiles + spacingX;
+}
+
+
+ossimIrect ossimIgenGenerator::getInputBoundingRect()const
+{
+   ossimRefPtr<ossimObject> obj = createInput();
+   ossimImageSource* inter = PTR_CAST(ossimImageSource, obj.get());
+   ossimIrect result;
+
+   result.makeNan();
+   if(inter)
+   {
+      result = inter->getBoundingRect();
+   }
+   return result;
+}
+
+void ossimIgenGenerator::addPadding(ossimGeoPolygon& output,
+                                    const ossimGeoPolygon& input)const
+{
+   output = input;
+   switch(theTilePaddingUnits)
+   {
+      case OSSIM_PIXEL:
+      {
+         ossimRefPtr<ossimProjection> proj = createProductProjection();
+         if(proj.valid())
+         {
+            ossimDpt ul;
+            ossimDpt ur;
+            ossimDpt lr;
+            ossimDpt ll;
+
+            if(input.getOrdering() == OSSIM_CLOCKWISE_ORDER)
+            {
+               proj->worldToLineSample(input[0], ul);
+               proj->worldToLineSample(input[1], ur);
+               proj->worldToLineSample(input[2], lr);
+               proj->worldToLineSample(input[3], ll);
+            }
+            else
+            {
+               proj->worldToLineSample(input[0], ul);
+               proj->worldToLineSample(input[1], ll);
+               proj->worldToLineSample(input[2], lr);
+               proj->worldToLineSample(input[3], ur);
+            
+            }
+            
+            ul -= theTilePadding;
+            ur += ossimDpt(theTilePadding.x,
+                           -theTilePadding.y);
+            lr += theTilePadding;
+            ll += ossimDpt(-theTilePadding.x,
+                           theTilePadding.y);
+
+            proj->lineSampleToWorld(ul, output[0]);
+            proj->lineSampleToWorld(ur, output[1]);
+            proj->lineSampleToWorld(lr, output[2]);
+            proj->lineSampleToWorld(ll, output[3]);
+
+            output.setOrdering(OSSIM_CLOCKWISE_ORDER);
+         
+         }
+         break;
+      }
+      case OSSIM_DEGREES:
+      case OSSIM_MINUTES:
+      case OSSIM_SECONDS:
+      {
+         ossimGpt ul;
+         ossimGpt ur;
+         ossimGpt lr;
+         ossimGpt ll;
+         ossimDpt spacing = theTilePadding;
+
+         if(theTilePaddingUnits==OSSIM_MINUTES)
+         {
+            spacing.x /= 60;
+            spacing.y /= 60;
+         }
+         else if(theTilePaddingUnits==OSSIM_MINUTES)
+         {
+            spacing.x /= 3600;
+            spacing.y /= 3600;
+         }
+      
+         if(input.getOrdering() == OSSIM_CLOCKWISE_ORDER)
+         {
+            ul = input[0];
+            ur = input[1];
+            lr = input[2];
+            ll = input[3];
+         }
+         else
+         {
+            ul = input[0];
+            ll = input[1];
+            lr = input[2];
+            ur = input[3];
+         }
+         ul.lat += spacing.lat;
+         ul.lon -= spacing.lon;
+         ur.lat += spacing.lat;
+         ur.lon += spacing.lon;
+         lr.lat -= spacing.lat;
+         lr.lon += spacing.lon;
+         ll.lat -= spacing.lat;
+         ll.lon -= spacing.lon;
+
+         output[0] = ul;
+         output[1] = ur;
+         output[2] = lr;
+         output[3] = ll;
+         output.setOrdering(OSSIM_CLOCKWISE_ORDER);
+      
+         break;
+      }
+      case OSSIM_METERS:
+      {
+         break;
+      }
+      default:
+         break;
+   }
+}
+
+void ossimIgenGenerator::addPixelType(ossimKeywordlist& kwl, const char* prefix)
+{
+   if(thePixelType == OSSIM_PIXEL_IS_POINT)
+   {
+      kwl.add(prefix,
+              ossimKeywordNames::PIXEL_TYPE_KW,
+              "PIXEL_IS_POINT",
+              true);
+   }
+   else
+   {
+      kwl.add(prefix,
+              ossimKeywordNames::PIXEL_TYPE_KW,
+              "PIXEL_IS_AREA",
+              true);
+   }
+}
+
+void ossimIgenGenerator::setOutput(const ossimKeywordlist& kwl)
+{
+   theOutputKwl.clear();
+
+   theOutputKwl = kwl;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimImageCacheBase.cpp b/ossim/src/ossim/imaging/ossimImageCacheBase.cpp
new file mode 100644
index 0000000..1be233a
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageCacheBase.cpp
@@ -0,0 +1,662 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Mingjie Su
+//
+//********************************************************************
+// $Id: ossimImageCacheBase.cpp 2685 2011-06-07 16:24:41Z david.burken $
+#include <algorithm>
+using namespace std;
+
+#include <ossim/imaging/ossimImageCacheBase.h>
+
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimNBandLutDataObject.h>
+#include <ossim/imaging/ossimHistogramWriter.h>
+#include <ossim/imaging/ossimImageHistogramSource.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimContainerProperty.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimEllipsoid.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/support_data/ossimRpfFrame.h>
+#include <ossim/support_data/ossimRpfToc.h>
+#include <ossim/support_data/ossimRpfTocEntry.h>
+#include <ossim/support_data/ossimRpfCompressionSection.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/projection/ossimCylEquAreaProjection.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimPolygon.h>
+
+static ossimTrace traceDebug = ossimTrace("ossimImageCacheBase:debug");
+
+#ifdef OSSIM_ID_ENABLED
+static const char OSSIM_ID[] = "$Id: ossimImageCacheBase.cpp 2685 2011-06-07 16:24:41Z david.burken $";
+#endif
+
+RTTI_DEF1(ossimImageCacheBase, "ossimImageCacheBase", ossimImageHandler)
+
+ossimImageCacheBase::ossimImageCacheBase()
+   :
+   ossimImageHandler(),
+   m_actualImageRect(),
+   m_numberOfLines(0),
+   m_numberOfSamples(0),
+   m_numberOfBands(0),
+   m_fileNames(),
+   m_tileSize(128, 128),
+   m_workFrame(new ossimRpfFrame),
+   m_bBox_LL_Lon(0.0),
+   m_bBox_LL_Lat(0.0),
+   m_bBox_UR_Lon(0.0),
+   m_bBox_UR_Lat(0.0),
+   m_numOfFramesVertical(0),
+   m_numOfFramesHorizontal(0),
+   m_frame_width(0),
+   m_frame_height(0),
+   m_frameEntryArray()
+{
+  if (traceDebug())
+  {
+    ossimNotify(ossimNotifyLevel_DEBUG)
+      << "ossimImageCacheBase::ossimImageCacheBase entered...\n";
+#ifdef OSSIM_ID_ENABLED
+    ossimNotify(ossimNotifyLevel_DEBUG)
+      << "OSSIM_ID:  " << OSSIM_ID << "\n";
+#endif      
+  }
+
+  m_actualImageRect.makeNan();
+
+}
+
+ossimImageCacheBase::~ossimImageCacheBase()
+{
+  if(m_workFrame)
+  {
+    delete m_workFrame;
+    m_workFrame = 0;
+  }
+  close();
+}
+
+void ossimImageCacheBase::close()
+{
+  deleteAll();
+}
+
+bool ossimImageCacheBase::isOpen()const
+{
+  //return (theTableOfContents!=0);
+  ossimString ext = theImageFile.ext().downcase();
+
+  if(ext == "rpf")
+  {
+    return true;
+  }
+  else
+  {
+    return false;
+  }
+}
+
+bool ossimImageCacheBase::buildFrameEntryArray(ossimFilename imageFile, 
+                                               ossim_uint32 frameWidth, 
+                                               ossim_uint32 frameHeight)
+{
+   static const char MODULE[] = "ossimImageCacheBase::buildFrameEntryArray";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered..." << endl;
+   }
+
+   // use to check if tiles have overlap pixels
+   ossim_float64 avgLat = 0.0;
+   ossim_float64 avgLon = 0.0;
+
+   m_frame_width = frameWidth;
+   m_frame_height = frameHeight;
+
+   std::ifstream in((imageFile).c_str() );
+   
+   std::string line;
+   ossim_uint32 index = 0; // used throughout
+   while( in.good() )
+   {
+      // Read in a line.
+      std::getline(in, line);
+
+      ossimString tmpStr = ossimString(line);
+      if (!tmpStr.empty())
+      {
+         if (index == 0)
+         {
+            std::vector<ossimString> box_lat_lon;
+            tmpStr.split(box_lat_lon, "|");
+            
+            if (box_lat_lon.size() > 2)
+            {
+               std::vector<ossimString> ll;
+               std::vector<ossimString> ur;
+               
+               box_lat_lon[0].split(ll, ",");
+               box_lat_lon[1].split(ur, ",");
+               ossimString bandStr = box_lat_lon[2];
+               
+               m_bBox_LL_Lon = ll[0].toFloat64();
+               m_bBox_LL_Lat = ll[1].toFloat64();
+               m_bBox_UR_Lon = ur[0].toFloat64();
+               m_bBox_UR_Lat = ur[1].toFloat64();
+               
+               checkLongitude(m_bBox_LL_Lon, m_bBox_UR_Lon);
+               
+               m_numberOfBands = ossimString(bandStr).toInt32();
+            }
+            else
+            {
+               return false;
+            }
+         }
+         else if (index == 1)
+         {
+            m_fileNames.push_back(tmpStr);
+            std::vector<ossimString> frame_lat_lon = tmpStr.split("|");
+            if (frame_lat_lon.size() > 2)
+            {
+               ossimString ll_lon_lat = frame_lat_lon[1];
+               ossimString ur_lon_lat = frame_lat_lon[2];
+               ossim_float64 ll_lon = ossimString(ll_lon_lat.split(",")[0]).toDouble();
+               ossim_float64 ll_lat = ossimString(ll_lon_lat.split(",")[1]).toDouble();
+               ossim_float64 ur_lon = ossimString(ur_lon_lat.split(",")[0]).toDouble();
+               ossim_float64 ur_lat = ossimString(ur_lon_lat.split(",")[1]).toDouble();
+
+               checkLongitude(ll_lon, ur_lon);
+               
+               ossim_float64 bBox_lat_diff = std::fabs(m_bBox_UR_Lat - m_bBox_LL_Lat);
+               ossim_float64 bBox_lon_diff = std::fabs(m_bBox_UR_Lon - m_bBox_LL_Lon);
+               
+               ossim_float64 lat_diff = std::fabs(ur_lat - ll_lat);
+               ossim_float64 lon_diff = std::fabs(ur_lon - ll_lon);
+               
+               m_numOfFramesVertical   = static_cast<ossim_uint32>(bBox_lat_diff/lat_diff + 0.5);
+               m_numOfFramesHorizontal = static_cast<ossim_uint32>(bBox_lon_diff/lon_diff + 0.5);
+
+               avgLon = std::fabs(bBox_lon_diff/m_numOfFramesHorizontal);
+               avgLat = std::fabs(bBox_lat_diff/m_numOfFramesVertical);
+               
+               m_numberOfLines   = m_numOfFramesVertical*m_frame_height;
+               m_numberOfSamples = m_numOfFramesHorizontal*m_frame_width;
+
+               if ( traceDebug() )
+               {
+                  ossimNotify(ossimNotifyLevel_DEBUG)
+                     << "\nscene height in degrees: " << bBox_lat_diff
+                     << "\nscene width in degrees:  " << bBox_lon_diff
+                     << "\nframe height in degrees: " << lat_diff
+                     << "\nframe width in degrees:  " << lon_diff
+                     << "\nframes vertical:         " << m_numOfFramesVertical
+                     << "\nframes horizontal:       " << m_numOfFramesHorizontal
+                     << "\nlines:                   " << m_numberOfLines
+                     << "\nsamples:                 " << m_numberOfSamples << "\n";
+               }
+            }
+            else
+            {
+               return false;
+            }
+         }
+         else
+         {
+            m_fileNames.push_back(tmpStr);
+         }
+         
+      } // matches: if (!tmpStr.empty())
+      
+      ++index;
+      
+   } // matches: while( in.good() )
+   in.close();
+
+   m_frameEntryArray.resize(m_numOfFramesVertical);
+   for(index = 0; index < m_frameEntryArray.size(); ++index)
+   {
+      m_frameEntryArray[index].resize(m_numOfFramesHorizontal);
+   }
+
+   for(index = 0; index < m_fileNames.size(); ++index)
+   {
+      ossimString tmpStr = m_fileNames[index];
+      std::vector<ossimString> frameInfos = tmpStr.split("|");
+      if (frameInfos.size() > 1)
+      {
+         ossimString fileName = frameInfos[0];
+         ossimString ll_lon_lat = frameInfos[1];
+         ossimString ur_lon_lat = frameInfos[2];
+         double ll_lon = ossimString(ll_lon_lat.split(",")[0]).toDouble();
+         double ll_lat = ossimString(ll_lon_lat.split(",")[1]).toDouble();
+         double ur_lon = ossimString(ur_lon_lat.split(",")[0]).toDouble();
+         double ur_lat = ossimString(ur_lon_lat.split(",")[1]).toDouble();
+         
+         checkLongitude(ll_lon, ur_lon);
+         
+         ossim_float64 tmpColPostion = std::fabs(ll_lon - m_bBox_LL_Lon);
+         ossim_float64 tmpFrameLon = std::fabs(ur_lon - ll_lon);
+
+         if (std::fabs(tmpFrameLon - avgLon) > 0.002)
+         {
+            ossimNotify(ossimNotifyLevel_WARN) << fileName << " has overlap pixels with other image." << std::endl;
+            return false;
+         }
+         
+         ossim_float64 tmpRowPostion = std::fabs(m_bBox_UR_Lat - ur_lat);
+         ossim_float64 tmpFrameLat = std::fabs(ur_lat - ll_lat);
+
+         if (std::fabs(tmpFrameLat - avgLat) > 0.002)
+         {
+            ossimNotify(ossimNotifyLevel_WARN) << fileName << " has overlap pixels with other image." << std::endl;
+            return false;
+         }
+         
+         ossim_uint32 colNum = static_cast<ossim_uint32>(tmpColPostion/tmpFrameLon + 0.5);
+         ossim_uint32 rowNum = static_cast<ossim_uint32>(tmpRowPostion/tmpFrameLat + 0.5);
+         
+         if (colNum >= m_numOfFramesHorizontal)
+         {
+            colNum = m_numOfFramesHorizontal-1; // Clamp to last column.
+         }
+         
+         if (rowNum >= m_numOfFramesVertical)
+         {
+            rowNum = m_numOfFramesVertical-1; // Clamp to last row.
+         }
+
+         ossimRpfFrameEntry tempEntry;
+         tempEntry.setEntry(ossimFilename(""), fileName);
+         m_frameEntryArray[rowNum][colNum] = tempEntry;
+      }
+      else
+      {
+         return false;
+      }
+   }
+
+   return true;
+}
+
+void ossimImageCacheBase::checkLongitude(ossim_float64& leftLon,
+                                             const ossim_float64& rightLon) const
+{
+   //---
+   // Test for scene coordinates being 180 to 180 and adjust leftLon to -180
+   // if so.
+   //
+   // NOTE:
+   // Setting tolerance to 1/7200 about 15 meters.
+   // Not sure if this is too loose or not. (drb)
+   //---
+   const ossim_float64 TOLERANCE = 0.000138889; // 1/7200 about 15 meters.
+
+   if ( ossim::almostEqual(leftLon, 180.0, TOLERANCE) )
+   {
+      if ( ossim::almostEqual(rightLon, 180.0, TOLERANCE) )
+      {
+         leftLon = -180.0;
+      }
+   }
+}
+
+ossim_uint32 ossimImageCacheBase::getNumberOfInputBands()const
+{
+   return m_numberOfBands;
+}
+
+ossim_uint32 ossimImageCacheBase::getNumberOfOutputBands()const
+{
+  return m_numberOfBands;
+}
+
+ossim_uint32 ossimImageCacheBase::getNumberOfLines(ossim_uint32 reduced_res_level) const
+{
+   if (reduced_res_level == 0)
+   {
+      return m_numberOfLines;
+   }
+   else if (theOverview.valid())
+   {
+      return theOverview->getNumberOfLines(reduced_res_level);
+   }
+   
+   return 0;
+}
+
+ossim_uint32 ossimImageCacheBase::getNumberOfSamples(ossim_uint32 reduced_res_level) const
+{
+   if (reduced_res_level == 0)
+   {
+      return m_numberOfSamples;
+   }
+   else if (theOverview.valid())
+   {
+      return theOverview->getNumberOfSamples(reduced_res_level);
+   }
+   
+   return 0;
+}
+
+void ossimImageCacheBase::setActualImageRect()
+{
+   m_actualImageRect = ossimIrect(0,0,m_numberOfLines, m_numberOfSamples);
+}
+
+ossimIrect ossimImageCacheBase::getImageRectangle(ossim_uint32 reduced_res_level) const
+{
+   return ossimIrect(0,                         // upper left x
+                     0,                         // upper left y
+                     getNumberOfSamples(reduced_res_level) - 1,  // lower right x
+                     getNumberOfLines(reduced_res_level)   - 1); // lower right y                     
+}
+
+
+
+ossim_uint32 ossimImageCacheBase::getTileWidth() const
+{
+   return m_tileSize.x;
+}
+
+ossim_uint32 ossimImageCacheBase::getTileHeight() const
+{
+   return m_tileSize.y;
+}
+
+void ossimImageCacheBase::getEntryList(std::vector<ossim_uint32>& entryList)const
+{
+   entryList.push_back(0);
+}
+
+bool ossimImageCacheBase::isValidRLevel(ossim_uint32 reduced_res_level) const
+{
+   if (reduced_res_level == 0)
+   {
+      return true;
+   }
+   else if (theOverview.valid())
+   {
+      return theOverview->isValidRLevel(reduced_res_level);
+   }
+   else
+   {
+      return false;
+   }
+}
+
+vector<ossimImageCacheBase::ossimFrameEntryData> ossimImageCacheBase::getIntersectingEntries(const ossimIrect& rect)
+{
+   vector<ossimFrameEntryData> result;
+
+   // make sure we have the Toc entry to render
+   if(!isOpen()) return result;
+
+   ossimIrect imageRect = getImageRectangle();
+   if(rect.intersects(imageRect))
+   {
+      ossimIrect clipRect  = rect.clipToRect(imageRect);
+      ossimIrect frameRect(clipRect.ul().x/m_frame_width,
+                           clipRect.ul().y/m_frame_height,
+                           clipRect.lr().x/m_frame_width,
+                           clipRect.lr().y/m_frame_height);
+
+      for(ossim_int32 row = frameRect.ul().y; row <= frameRect.lr().y; ++row)
+      {
+         for(ossim_int32 col = frameRect.ul().x; col <= frameRect.lr().x; ++col)
+         {
+            ossimRpfFrameEntry tempEntry = m_frameEntryArray[row][col];
+            if(tempEntry.exists())
+            {
+               result.push_back(ossimFrameEntryData(row,
+                                                    col,
+                                                    row*m_frame_height,
+                                                    col*m_frame_width,
+                                                    tempEntry));
+            }
+         }
+      }
+   }
+
+   return result;
+}
+
+void ossimImageCacheBase::deleteAll()
+{
+   theOverview = 0;
+}
+
+bool ossimImageCacheBase::saveState(ossimKeywordlist& kwl,
+                                        const char* prefix)const
+{
+   bool result = ossimImageHandler::saveState(kwl, prefix);
+
+   return result;
+}
+
+bool ossimImageCacheBase::loadState(const ossimKeywordlist& kwl,
+                                        const char* prefix)
+{
+   const char* MODULE = "ossimImageCacheBase::loadState";
+
+   if(traceDebug())
+   {
+      CLOG << "Entering..." << endl;
+   }
+   bool result = ossimImageHandler::loadState(kwl, prefix);
+
+   if(!result)
+   {
+      if(traceDebug())
+      {
+         CLOG << "Leaving..." << endl;
+      }
+      return false;
+   }
+   const char* lookup = 0;
+   lookup = kwl.find(ossimString(prefix), "entry");
+   ossim_int32 entry = ossimString(lookup).toInt32();
+
+   // if an entry is specified then
+   // call the open with an entry number
+   if(lookup)
+   {
+      if(traceDebug())
+      {
+         CLOG << "Leaving..." << endl;
+      }
+      result = ossimImageHandler::open(theImageFile);
+      setCurrentEntry(entry);
+      return result;
+   }
+
+   result = ossimImageHandler::open(theImageFile);
+
+   return result;
+}
+
+ossim_uint32 ossimImageCacheBase::getImageTileWidth() const
+{
+   return 256;
+}
+
+ossim_uint32 ossimImageCacheBase::getImageTileHeight() const
+{
+   return 256;
+}
+
+void ossimImageCacheBase::establishDecimationFactors()
+{
+   theDecimationFactors.clear();
+   
+   // Just needed to set the first R level here, the base class can do the rest:
+   ossimImageHandler::establishDecimationFactors();
+}
+
+ossimRefPtr<ossimImageGeometry> ossimImageCacheBase::getImageGeometry()
+{
+   if (theGeometry.valid()) return theGeometry;
+
+   // datum
+   // WGS 84
+   ossimKeywordlist kwl;
+   const char* prefix = 0; // legacy
+   kwl.add(prefix,
+      ossimKeywordNames::DATUM_KW,
+      "WGE",
+      true);   
+
+   ossimGpt ul(m_bBox_UR_Lat,m_bBox_LL_Lon);
+   ossimGpt ll(m_bBox_LL_Lat,m_bBox_LL_Lon);
+   ossimGpt ur(m_bBox_UR_Lat,m_bBox_UR_Lon);
+   ossimGpt lr(m_bBox_LL_Lat,m_bBox_UR_Lon);
+
+   double latInterval = fabs(ul.latd() - lr.latd())/ getNumberOfLines();
+   double lonInterval = fabs(ul.lond() - ur.lond())/ getNumberOfSamples();
+
+   kwl.add(prefix,
+      ossimKeywordNames::UL_LAT_KW,
+      ul.latd(),//-(latInterval/2.0),
+      true);
+
+   kwl.add(prefix,
+      ossimKeywordNames::UL_LON_KW,
+      ul.lond(),//+(lonInterval/2.0),
+      true);
+
+   kwl.add(prefix,
+      ossimKeywordNames::LL_LAT_KW,
+      ll.latd(),//+(latInterval/2.0),
+      true);
+
+   kwl.add(prefix,
+      ossimKeywordNames::LL_LON_KW,
+      ll.lond(),//+(lonInterval/2.0),
+      true);
+
+   kwl.add(prefix,
+      ossimKeywordNames::LR_LAT_KW,
+      lr.latd(),//+(latInterval/2.0),
+      true);
+
+   kwl.add(prefix,
+      ossimKeywordNames::LR_LON_KW,
+      lr.lond(),//-(lonInterval/2.0),
+      true);
+
+   kwl.add(prefix,
+      ossimKeywordNames::UR_LAT_KW,
+      ur.latd(),//-(latInterval/2.0),
+      true);
+
+   kwl.add(prefix,
+      ossimKeywordNames::UR_LON_KW,
+      ur.lond(),//-(latInterval/2.0),
+      true);
+
+   kwl.add(prefix,
+      ossimKeywordNames::NUMBER_INPUT_BANDS_KW,
+      getNumberOfInputBands(),
+      true);
+
+   kwl.add(prefix,
+      ossimKeywordNames::NUMBER_OUTPUT_BANDS_KW,
+      getNumberOfOutputBands(),
+      true);
+
+   kwl.add(prefix,
+      ossimKeywordNames::NUMBER_LINES_KW,
+      getNumberOfLines(),
+      true);
+
+   kwl.add(prefix,
+      ossimKeywordNames::NUMBER_SAMPLES_KW,
+      getNumberOfSamples(),
+      true);
+
+
+   //---
+   // Make a projection to get the easting / northing of the tie point and
+   // the scale in meters.  This will only be used by the CIB.
+   //---
+   kwl.add(prefix,
+      ossimKeywordNames::DATUM_KW,
+      "WGE",
+      true);
+
+   ossimGpt origin((ul.latd()+lr.latd())*.5,
+      (ul.lond()+lr.lond())*.5,
+      0.0);
+
+   double deltaLatPerPixel = latInterval;
+   double deltaLonPerPixel = lonInterval;
+
+   ossimDpt tie;
+
+   tie.lat = ul.latd() - deltaLatPerPixel/2.0;
+   tie.lon = ul.lond() + deltaLonPerPixel/2.0;
+
+   kwl.add(prefix, 
+      ossimKeywordNames::TIE_POINT_XY_KW,
+      tie.toString(),
+      true);
+
+   kwl.add(prefix,
+      ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT,
+      deltaLatPerPixel,
+      true);
+
+   kwl.add(prefix,
+      ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON,
+      deltaLonPerPixel,
+      true);
+
+   kwl.add(prefix,
+      ossimKeywordNames::ORIGIN_LATITUDE_KW,
+      origin.latd(),
+      true);
+
+   kwl.add(prefix,
+      ossimKeywordNames::CENTRAL_MERIDIAN_KW,
+      origin.lond(),
+      true);
+
+   kwl.add(prefix,
+      ossimKeywordNames::TIE_POINT_LAT_KW,
+      ul.latd()-(deltaLatPerPixel/2.0),
+      true);
+
+   kwl.add(prefix,
+      ossimKeywordNames::TIE_POINT_LON_KW,
+      ul.lond()+(deltaLonPerPixel/2.0),
+      true);
+
+   kwl.add(prefix,
+      ossimKeywordNames::TYPE_KW,
+      "ossimEquDistCylProjection",
+      true);
+
+   // Capture this for next time.
+   theGeometry = new ossimImageGeometry;
+   theGeometry->loadState(kwl, prefix);
+
+   // Set image things the geometry object should know about.
+   initImageParameters( theGeometry.get() ); 
+
+   return theGeometry;
+}
+
+
diff --git a/ossim/src/ossim/imaging/ossimImageCacheTileSource.cpp b/ossim/src/ossim/imaging/ossimImageCacheTileSource.cpp
new file mode 100644
index 0000000..3cf83cf
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageCacheTileSource.cpp
@@ -0,0 +1,438 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Mingjie Su   
+//
+//********************************************************************
+// $Id: ossimImageCacheTileSource.cpp 2644 2011-05-26 15:20:11Z oscar.kramer $
+#include <algorithm>
+using namespace std;
+
+#include <ossim/imaging/ossimImageCacheTileSource.h>
+
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimNBandLutDataObject.h>
+#include <ossim/imaging/ossimHistogramWriter.h>
+#include <ossim/imaging/ossimImageHistogramSource.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimContainerProperty.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimEllipsoid.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/support_data/ossimRpfFrame.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimPolygon.h>
+
+static ossimTrace traceDebug = ossimTrace("ossimImageCacheTileSource:debug");
+
+#ifdef OSSIM_ID_ENABLED
+static const char OSSIM_ID[] = "$Id: ossimImageCacheTileSource.cpp 2644 2011-05-26 15:20:11Z oscar.kramer $";
+#endif
+
+RTTI_DEF1(ossimImageCacheTileSource, "ossimImageCacheTileSource", ossimImageCacheBase)
+
+ossimImageCacheTileSource::ossimImageCacheTileSource()
+   :
+   ossimImageCacheBase(),
+   m_tile(0),
+   m_imageHandler(0),
+   m_minPixelValue(ossim::nan()),
+   m_maxPixelValue(ossim::nan()),
+   m_nullPixelValue(ossim::nan())
+{
+}
+
+ossimImageCacheTileSource::~ossimImageCacheTileSource()
+{
+   if(m_imageHandler.valid())
+   {
+      m_imageHandler = 0;
+   }
+  close();
+}
+
+ossimString ossimImageCacheTileSource::getShortName()const
+{
+  return ossimString("ImageCache");
+}
+
+ossimString ossimImageCacheTileSource::getLongName()const
+{
+  return ossimString("ImageCache reader");
+}
+
+
+void ossimImageCacheTileSource::close()
+{
+  deleteAll();
+}
+
+bool ossimImageCacheTileSource::open()
+{
+  if(traceDebug())
+  {
+    ossimNotify(ossimNotifyLevel_DEBUG) << "ossimImageCacheTileSource::open(): Entered....." << std::endl;
+  }
+
+  ossimFilename imageFile = theImageFile;
+  bool result = true;
+
+  if(isOpen() == false)
+  {
+    close();
+    result = false;
+  }
+
+  if(result)
+  {
+    if (m_fileNames.size() == 0 && m_frameEntryArray.size() == 0)
+    {
+      if (buildFrameEntryArray(imageFile) == false)
+      {
+        return false;
+      }
+    }
+
+    //---
+    // Adjust image rect so not to go over the -180 to 180 and -90 to 90
+    // bounds.
+    //---
+    setActualImageRect();
+
+    // Set the base class image file name.
+    theImageFile = imageFile;
+    m_tile = ossimImageDataFactory::instance()->create(this, this);
+    m_tile->initialize();
+    completeOpen();
+  }
+
+  if(traceDebug())
+  {
+    ossimNotify(ossimNotifyLevel_DEBUG) << "ossimImageCacheTileSource::open(): Leaving at line" << __LINE__ << std::endl;
+  }
+
+  return result;
+}
+
+bool ossimImageCacheTileSource::buildFrameEntryArray(ossimFilename imageFile)
+{
+   static const char MODULE[] = "ossimImageCacheTileSource::buildFrameEntryArray";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered..." << endl;
+   }
+
+   std::ifstream in((imageFile).c_str() );
+   std::string line;
+   ossim_uint32 index = 0; // used throughout
+   ossim_uint32 frameWidth = 0;
+   ossim_uint32 frameHeight = 0;
+   while( in.good() )
+   {
+      // Read in a line.
+      std::getline(in, line);
+      ossimString tmpStr = ossimString(line);
+      if (index == 0)
+      {
+         std::vector<ossimString> box_lat_lon;
+         tmpStr.split(box_lat_lon, "|");
+         if (box_lat_lon.size() == 4)
+         {
+            std::vector<ossimString> pixelInfos = box_lat_lon[3].split(",");
+            if (pixelInfos.size() == 3)
+            {
+               m_minPixelValue = ossimString::toFloat64(pixelInfos[0]);
+               m_maxPixelValue = ossimString::toFloat64(pixelInfos[1]);
+               m_nullPixelValue = ossimString::toFloat64(pixelInfos[2]);
+            }
+         }
+      }
+      else if (index == 1)
+      {
+         std::vector<ossimString> frame_lat_lon = tmpStr.split("|");
+         ossimFilename firstFile = frame_lat_lon[0];
+         if(m_workFrame->parseFile(firstFile) == ossimErrorCodes::OSSIM_ERROR)
+         {
+            m_imageHandler = ossimImageHandlerRegistry::instance()->open(firstFile);
+            if (m_imageHandler.valid())
+            {
+               frameWidth = m_imageHandler->getBoundingRect().width();
+               frameHeight = m_imageHandler->getBoundingRect().height();
+               break;
+            }
+         }
+         else
+         {
+            return false;
+         }
+      }
+      ++index;
+   }
+   in.close();
+
+   return ossimImageCacheBase::buildFrameEntryArray(imageFile, frameWidth, frameHeight);
+}
+
+ossimRefPtr<ossimImageData> ossimImageCacheTileSource::getTile(
+  const  ossimIrect& rect, ossim_uint32 resLevel)
+{
+  if (m_tile.valid())
+  {
+    // Image rectangle must be set prior to calling getTile.
+    m_tile->setImageRectangle(rect);
+
+    if ( getTile( m_tile.get(), resLevel ) == false )
+    {
+      if (m_tile->getDataObjectStatus() != OSSIM_NULL)
+      {
+        m_tile->makeBlank();
+      }
+    }
+  }
+
+  return m_tile;
+}
+
+bool ossimImageCacheTileSource::getTile(ossimImageData* result,
+                                      ossim_uint32 resLevel)
+{
+   bool status = false;
+   
+   //---
+   // Not open, this tile source bypassed, or invalid res level,
+   // return a blank tile.
+   //---
+   if( isOpen() && isSourceEnabled() && isValidRLevel(resLevel) &&
+       result && (result->getNumberOfBands() == getNumberOfOutputBands()))
+   {
+      if ( resLevel > 0 )
+      {
+         status = getOverviewTile(resLevel, result);
+      }
+      
+      if (!status) // Did not get an overview tile.
+      {
+         status = true;
+         
+         ossimIrect rect = result->getImageRectangle();
+         
+         ossimIrect imageRect = getImageRectangle();
+         
+         if ( rect.intersects(imageRect) )
+         {
+            //---
+            // Start with a blank tile in case there is not total coverage
+            // for rect.
+            //---
+            result->makeBlank();
+            
+            vector<ossimFrameEntryData> frames = getIntersectingEntries(rect);
+            if(frames.size() > 0)
+            {
+               //---
+               // Now lets render each frame.  Note we will have to find
+               // subframes
+               // that intersect the rectangle of interest for each frame.
+               //---
+               fillTile(rect, frames, result);
+               
+               // Revalidate tile status.
+               result->validate();
+            }
+         }
+         else
+         {
+            result->makeBlank();
+         }
+      }
+   }
+   return status;
+}
+
+void ossimImageCacheTileSource::fillTile(
+   const ossimIrect& tileRect,
+   const vector<ossimFrameEntryData>& framesInvolved,
+   ossimImageData* tile)
+{
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx < framesInvolved.size(); ++idx)
+   {
+      if (m_imageHandler.valid())
+      {
+         if (m_imageHandler->getFilename() != framesInvolved[idx].theFrameEntry.getFullPath())
+         {
+            m_imageHandler = 0;
+            m_imageHandler = ossimImageHandlerRegistry::instance()->open(framesInvolved[idx].theFrameEntry.getFullPath());
+         }
+      }
+      else
+      {
+         m_imageHandler = ossimImageHandlerRegistry::instance()->open(framesInvolved[idx].theFrameEntry.getFullPath());
+      }
+
+      if (m_imageHandler.valid())
+      {
+         if (m_imageHandler->isOpen() == false)
+         {
+            m_imageHandler->open(framesInvolved[idx].theFrameEntry.getFullPath());
+         }
+
+         ossimIrect frameRect(framesInvolved[idx].thePixelCol,
+            framesInvolved[idx].thePixelRow,
+            framesInvolved[idx].thePixelCol + m_frame_width  - 1,
+            framesInvolved[idx].thePixelRow + m_frame_height - 1);
+
+         ossimIrect clipRect = tileRect.clipToRect(frameRect);
+
+         ossimIpt tempDelta(clipRect.ul().x - framesInvolved[idx].thePixelCol,
+            clipRect.ul().y - framesInvolved[idx].thePixelRow);
+
+         ossimIrect offsetRect(tempDelta.x,
+            tempDelta.y,
+            tempDelta.x + clipRect.width()-1,
+            tempDelta.y + clipRect.height()-1);
+
+         //if the current image size is different from the default size, resample the image data
+         if ( ( m_imageHandler->getBoundingRect().width() != m_frame_width ) ||
+              ( m_imageHandler->getBoundingRect().height() != m_frame_height ) )
+         {
+
+            //calculate the ratio
+            ossim_float64 widthRatio = static_cast<ossim_float64>(m_imageHandler->getBoundingRect().width())/static_cast<ossim_float64>(m_frame_width);
+            ossim_float64 heightRatio = static_cast<ossim_float64>(m_imageHandler->getBoundingRect().height())/static_cast<ossim_float64>(m_frame_height);
+
+            //initialize the rect bounding for getting image data from image handler
+            ossimDpt ul(offsetRect.ul().x*widthRatio, offsetRect.ul().y*heightRatio);
+            ossimDpt lr(offsetRect.lr().x*widthRatio, offsetRect.lr().y*heightRatio);
+
+            //---
+            // Floor, ceil to avoid rect size of zero from ul, lr, delta being only fractional
+            // resulting in size of 0 if cast to an int or passed to ossim<int>::round().
+            //---
+            ossimIrect actualOffsetRect(static_cast<ossim_int32>(std::floor(ul.x)),
+                                        static_cast<ossim_int32>(std::floor(ul.y)),
+                                        static_cast<ossim_int32>(std::ceil(lr.x)),
+                                        static_cast<ossim_int32>(std::ceil(lr.y)));
+
+            //get accurate rect in case the actual rect is larger than the rect of image 
+            actualOffsetRect = actualOffsetRect.clipToRect(m_imageHandler->getBoundingRect());
+            
+            ossimRefPtr<ossimImageData> imageData = m_imageHandler->getTile(actualOffsetRect);
+            if (imageData.valid())
+            {
+               ossimFilterResampler* resampler = new ossimFilterResampler();
+               
+               double denominatorY = 1.0;
+               double denominatorX = 1.0;
+               if(clipRect.height() > 2) // Cannot be zero.
+               {
+                  denominatorY = clipRect.height()-1.0;
+               }
+               if(clipRect.width() > 2) // Cannot be zero.
+               {
+                  denominatorX = clipRect.width()-1.0;
+               }
+
+               //create a tile and set the rect size
+               ossimRefPtr<ossimImageData> tmpTile = (ossimImageData*)imageData->dup();
+               tmpTile->setImageRectangle(offsetRect);
+               tmpTile->makeBlank();
+
+               ossimDpt deltaUl(((actualOffsetRect.ll().x - actualOffsetRect.ul().x)/denominatorX),
+                                ((actualOffsetRect.ll().y - actualOffsetRect.ul().y)/denominatorY));
+               ossimDpt deltaUr(((actualOffsetRect.lr().x - actualOffsetRect.ur().x)/denominatorX),
+                                ((actualOffsetRect.lr().y - actualOffsetRect.ur().y)/denominatorY));
+               ossimDpt length(offsetRect.width(),offsetRect.height());
+               
+               //resample the image data
+               resampler->resample(imageData, 
+                                   tmpTile,
+                                   actualOffsetRect.ul(),
+                                   actualOffsetRect.ur(),
+                                   deltaUl,
+                                   deltaUr,
+                                   length);
+
+               tile->loadTile(tmpTile->getBuf(), clipRect, OSSIM_BSQ);
+
+               tmpTile = 0;
+               delete resampler;
+               resampler = 0;
+            }
+         }
+         else
+         {
+            ossimRefPtr<ossimImageData> imageData = m_imageHandler->getTile(offsetRect);
+            if (imageData.valid())
+            {
+               tile->loadTile(imageData->getBuf(), clipRect, OSSIM_BSQ);
+            }
+         }
+      }
+   }
+}
+
+ossimScalarType ossimImageCacheTileSource::getOutputScalarType() const
+{
+   if (m_imageHandler.valid())
+   {
+      return m_imageHandler->getOutputScalarType();
+   }
+   return OSSIM_UCHAR;
+}
+
+double ossimImageCacheTileSource::getMinPixelValue(ossim_uint32 band)const
+{
+   if (ossim::isnan(m_minPixelValue))
+   {
+      return ossimImageHandler::getMinPixelValue(band);
+   }
+   return m_minPixelValue;
+}
+
+double ossimImageCacheTileSource::getMaxPixelValue(ossim_uint32 band)const
+{
+   if (ossim::isnan(m_maxPixelValue))
+   {
+      return ossimImageHandler::getMaxPixelValue(band);
+   }
+   return m_maxPixelValue;
+}
+
+double ossimImageCacheTileSource::getNullPixelValue(ossim_uint32 band)const
+{
+   if (ossim::isnan(m_nullPixelValue))
+   {
+      return ossimImageHandler::getNullPixelValue(band);
+   }
+   return m_nullPixelValue;
+}
+
+ossim_uint32 ossimImageCacheTileSource::getNumberOfInputBands()const
+{
+   if (m_imageHandler.valid())
+   {
+      return m_imageHandler->getNumberOfInputBands();
+   }
+   return m_numberOfBands;
+}
+
+ossim_uint32 ossimImageCacheTileSource::getNumberOfOutputBands()const
+{
+   if (m_imageHandler.valid())
+   {
+      return m_imageHandler->getNumberOfInputBands();
+   }
+   return m_numberOfBands;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimImageChain.cpp b/ossim/src/ossim/imaging/ossimImageChain.cpp
new file mode 100644
index 0000000..ddea903
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageChain.cpp
@@ -0,0 +1,1834 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimImageChain.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimImageChain.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimConnectableContainer.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimEventIds.h>
+#include <ossim/base/ossimObjectEvents.h>
+#include <ossim/base/ossimIdManager.h>
+#include <ossim/base/ossimVisitor.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <algorithm>
+#include <iostream>
+#include <iterator>
+
+static ossimTrace traceDebug("ossimImageChain");
+
+
+RTTI_DEF3(ossimImageChain, "ossimImageChain", ossimImageSource,
+          ossimConnectableObjectListener, ossimConnectableContainerInterface);
+
+void ossimImageChain::processEvent(ossimEvent& event)
+{
+   ossimConnectableObjectListener::processEvent(event);
+   ossimConnectableObject* obj = PTR_CAST(ossimConnectableObject, event.getCurrentObject());
+   
+   if((ossimConnectableObject*)getFirstSource() == obj)
+   {
+      if(event.isPropagatingToOutputs())
+      {
+         ossimConnectableObject::ConnectableObjectList& outputList = getOutputList();
+         ossim_uint32 idx = 0;
+         for(idx = 0; idx < outputList.size();++idx)
+         {
+            if(outputList[idx].valid())
+            {
+               outputList[idx]->fireEvent(event);
+               outputList[idx]->propagateEventToOutputs(event);
+            }
+         }
+      }
+   }
+}
+
+ossimImageChain::ossimImageChain()
+:ossimImageSource(0,
+                  0, // number of inputs
+                  0, // number of outputs
+                  false, // input's fixed
+                  false), // outputs are not fixed
+    ossimConnectableContainerInterface((ossimObject*)NULL),
+    theBlankTile(NULL),
+    theLoadStateFlag(false)
+{
+   ossimConnectableContainerInterface::theBaseObject = this;
+   //thePropagateEventFlag = false;
+   addListener((ossimConnectableObjectListener*)this);
+}
+
+ossimImageChain::~ossimImageChain()
+{
+   removeListener((ossimConnectableObjectListener*)this);
+   deleteList();
+}
+
+bool ossimImageChain::addFirst(ossimConnectableObject* obj)
+{
+   ossimConnectableObject* rightOfThisObj =
+      (ossimConnectableObject*)getFirstObject();
+
+   return insertRight(obj, rightOfThisObj);
+}
+
+bool ossimImageChain::addLast(ossimConnectableObject* obj)
+{
+   if(imageChainList().size() > 0)
+   {
+      ossimConnectableObject* lastSource = imageChainList()[ imageChainList().size() -1].get();
+//      if(dynamic_cast<ossimImageSource*>(obj)&&lastSource)
+      if(lastSource)
+      {
+//         obj->disconnect();
+         ossimConnectableObject::ConnectableObjectList tempIn = getInputList();
+         lastSource->disconnectAllInputs();
+         lastSource->connectMyInputTo(obj);
+         obj->changeOwner(this);
+         obj->connectInputList(tempIn);
+
+         tempIn = obj->getInputList();
+         theInputListIsFixedFlag = obj->getInputListIsFixedFlag();
+         setNumberOfInputs(obj->getNumberOfInputs());
+         imageChainList().push_back(obj);
+         
+         obj->addListener((ossimConnectableObjectListener*)this);
+         // Send an event to any listeners.
+         ossimContainerEvent event((ossimObject*)this,
+                                   OSSIM_EVENT_ADD_OBJECT_ID);
+         event.setObjectList(obj);
+         fireEvent(event);
+         return true;
+      }
+   }
+   else
+   {
+      return add(obj);
+   }
+
+   return false;;
+}
+
+ossimImageSource* ossimImageChain::getFirstSource()
+{
+   if(imageChainList().size()>0)
+   {
+      return dynamic_cast<ossimImageSource*>(imageChainList()[0].get());
+   }
+
+   return 0;
+}
+
+const ossimImageSource* ossimImageChain::getFirstSource() const
+{
+   if(imageChainList().size()>0)
+      return dynamic_cast<const ossimImageSource*>(imageChainList()[0].get());
+
+   return 0;
+}
+
+ossimObject* ossimImageChain::getFirstObject()
+{
+   if(imageChainList().size()>0)
+   {
+      return dynamic_cast<ossimImageSource*>(imageChainList()[0].get());
+   }
+
+   return 0;
+}
+
+ossimImageSource* ossimImageChain::getLastSource()
+{
+   if(imageChainList().size()>0)
+   {
+      return dynamic_cast<ossimImageSource*>((*(imageChainList().end()-1)).get());
+   }
+
+   return NULL;
+}
+
+const ossimImageSource* ossimImageChain::getLastSource() const
+{
+   if(imageChainList().size()>0)
+      return dynamic_cast<const ossimImageSource*>((*(imageChainList().end()-1)).get());
+
+   return NULL;
+}
+
+ossimObject* ossimImageChain::getLastObject()
+{
+   if(imageChainList().size()>0)
+   {
+      return dynamic_cast<ossimImageSource*>((*(imageChainList().end()-1)).get());
+   }
+
+   return 0;
+}
+
+ossimConnectableObject* ossimImageChain::findObject(const ossimId& id,
+                                                    bool /* recurse */)
+{
+   std::vector<ossimRefPtr<ossimConnectableObject> >::iterator current =  imageChainList().begin();
+   
+   while(current != imageChainList().end())
+   {
+      if((*current).get())
+      {
+         if(id == (*current)->getId())
+         {
+            return (*current).get();
+         }
+      }
+      
+      ++current;
+   }
+   
+   current =  imageChainList().begin();
+   
+   while(current != imageChainList().end())
+   {
+      ossimConnectableContainerInterface* child=PTR_CAST(ossimConnectableContainerInterface,
+                                                         (*current).get());
+      
+      if(child)
+      {
+         ossimConnectableObject* object = child->findObject(id, true);
+
+         if(object) return object;
+      }
+      ++current;
+   }
+   
+   return NULL;
+}
+
+ossimConnectableObject* ossimImageChain::findObject(const ossimConnectableObject* obj,
+                                                    bool /* recurse */)
+{
+   std::vector<ossimRefPtr<ossimConnectableObject> >::iterator current =  imageChainList().begin();
+   
+   while(current != imageChainList().end())
+   {
+      if((*current).valid())
+      {
+         if(obj == (*current).get())
+         {
+            return (*current).get();
+         }
+      }
+      
+      ++current;
+   }
+   
+   current =  imageChainList().begin();
+   
+   while(current != imageChainList().end())
+   {
+      ossimConnectableContainerInterface* child=PTR_CAST(ossimConnectableContainerInterface, (*current).get());
+      
+      if(child)
+      {
+         ossimConnectableObject* object = child->findObject(obj, true);
+
+         if(object) return object;
+      }
+      ++current;
+   }
+   
+   return 0;
+}
+
+ossimConnectableObject* ossimImageChain::findFirstObjectOfType(const RTTItypeid& typeInfo,
+                                                               bool recurse)
+{
+   vector<ossimRefPtr<ossimConnectableObject> >::iterator current =  imageChainList().begin();
+   
+   while(current != imageChainList().end())
+   {
+      if((*current).valid()&&
+         (*current)->canCastTo(typeInfo))
+      {
+         return (*current).get();
+      }
+      ++current;
+   }
+
+   if(recurse)
+   {
+      current =  imageChainList().begin();
+      while(current != imageChainList().end())
+      {
+         ossimConnectableContainerInterface* child=PTR_CAST(ossimConnectableContainerInterface, 
+                                                            (*current).get());
+         
+         if(child)
+         {
+            ossimConnectableObject* temp = child->findFirstObjectOfType(typeInfo, recurse);
+            if(temp)
+            {
+               return temp;
+            }
+         }
+         ++current;
+      }
+   }
+   
+   return (ossimConnectableObject*)NULL;   
+}
+
+ossimConnectableObject* ossimImageChain::findFirstObjectOfType(const ossimString& className,
+                                                               bool recurse)
+{
+   vector<ossimRefPtr<ossimConnectableObject> >::iterator current =  imageChainList().begin();
+   
+   while(current != imageChainList().end())
+   {
+      if((*current).valid()&&
+         (*current)->canCastTo(className) )
+      {
+         return (*current).get();
+      }
+      ++current;
+   }
+
+   if(recurse)
+   {
+      current =  imageChainList().begin();
+      while(current != imageChainList().end())
+      {
+         ossimConnectableContainerInterface* child=PTR_CAST(ossimConnectableContainerInterface, (*current).get());
+         
+         if(child)
+         {
+            ossimConnectableObject* temp = child->findFirstObjectOfType(className, recurse);
+            if(temp)
+            {
+               return temp;
+            }
+         }
+         ++current;
+      }
+   }
+   
+   return (ossimConnectableObject*)0;   
+}
+
+ossimConnectableObject::ConnectableObjectList ossimImageChain::findAllObjectsOfType(const RTTItypeid& typeInfo,
+                                                                           bool recurse)
+{
+   ossimConnectableObject::ConnectableObjectList result;
+   ossimConnectableObject::ConnectableObjectList::iterator current =  imageChainList().begin();
+   
+   while(current != imageChainList().end())
+   {
+      if((*current).valid()&&
+         (*current)->canCastTo(typeInfo))
+      {
+         ossimConnectableObject::ConnectableObjectList::iterator iter = std::find(result.begin(), 
+                                                                                      result.end(), 
+                                                                                      (*current).get());
+         if(iter == result.end())
+         {
+            result.push_back((*current).get());
+         }
+      }
+      ++current;
+   }
+
+   if(recurse)
+   {
+      current =  imageChainList().begin();
+      while(current != imageChainList().end())
+      {
+         ossimConnectableContainerInterface* child=PTR_CAST(ossimConnectableContainerInterface, (*current).get());
+         
+         if(child)
+         {
+            ossimConnectableObject::ConnectableObjectList temp;
+            temp = child->findAllObjectsOfType(typeInfo, recurse);
+            for(long index=0; index < (long)temp.size();++index)
+            {
+               ossimConnectableObject::ConnectableObjectList::iterator iter = std::find(result.begin(), result.end(), temp[index]);
+               if(iter == result.end())
+               {
+                  result.push_back(temp[index]);
+               }
+            }
+         }
+         ++current;
+      }
+   }
+   
+   return result;
+   
+}
+
+ossimConnectableObject::ConnectableObjectList ossimImageChain::findAllObjectsOfType(const ossimString& className,
+                                                                           bool recurse)
+{
+   ossimConnectableObject::ConnectableObjectList result;
+   ossimConnectableObject::ConnectableObjectList::iterator current =  imageChainList().begin();
+   
+   while(current != imageChainList().end())
+   {
+      if((*current).valid()&&
+         (*current)->canCastTo(className))
+      {
+         ossimConnectableObject::ConnectableObjectList::iterator iter = std::find(result.begin(), 
+                                                                         result.end(), 
+                                                                         (*current).get());
+         if(iter == result.end())
+         {
+            result.push_back((*current).get());
+         }
+      }
+      ++current;
+   }
+
+   if(recurse)
+   {
+      current =  imageChainList().begin();
+      while(current != imageChainList().end())
+      {
+         ossimConnectableContainerInterface* child=PTR_CAST(ossimConnectableContainerInterface, (*current).get());
+         
+         if(child)
+         {
+            ossimConnectableObject::ConnectableObjectList temp;
+            temp = child->findAllObjectsOfType(className, recurse);
+            for(long index=0; index < (long)temp.size();++index)
+            {
+               ossimConnectableObject::ConnectableObjectList::iterator iter = std::find(result.begin(), result.end(), temp[index]);
+               if(iter == result.end())
+               {
+                  result.push_back(temp[index]);
+               }
+            }
+         }
+         ++current;
+      }
+   }
+   
+   return result;
+   
+}
+
+void ossimImageChain::makeUniqueIds()
+{
+   setId(ossimIdManager::instance()->generateId());
+   for(long index = 0; index < (long)imageChainList().size(); ++index)
+   {
+      ossimConnectableContainerInterface* container = PTR_CAST(ossimConnectableContainerInterface,
+                                                               imageChainList()[index].get());
+      if(container)
+      {
+         container->makeUniqueIds();
+      }
+      else
+      {
+         if(imageChainList()[index].valid())
+         {
+            imageChainList()[index]->setId(ossimIdManager::instance()->generateId());
+         }
+      }
+   }
+}
+
+ossim_uint32 ossimImageChain::getNumberOfObjects(bool recurse)const
+{
+   ossim_uint32 result = (ossim_uint32)imageChainList().size();
+   
+   if(recurse)
+   {
+      for(ossim_uint32 i = 0; i < imageChainList().size(); ++i)
+      {
+         ossimConnectableContainerInterface* child=PTR_CAST(ossimConnectableContainerInterface, imageChainList()[i].get());
+         if(child)
+         {
+            result += child->getNumberOfObjects(true);
+         }
+      }
+   }
+   
+   return result;   
+}
+
+ossim_uint32 ossimImageChain::getNumberOfSources() const
+{
+   ossimNotify(ossimNotifyLevel_NOTICE)
+      << "ossimImageChain::getNumberOfSources is deprecated!"
+      << "\nUse: ossimImageChain::getNumberOfObjects(false)"
+      << std::endl;
+   return getNumberOfObjects(false);
+}
+
+bool ossimImageChain::addChild(ossimConnectableObject* object)
+{
+   return add(object);
+}
+
+bool ossimImageChain::removeChild(ossimConnectableObject* object)
+{
+   bool result = false;
+   vector<ossimRefPtr<ossimConnectableObject> >::iterator current =  std::find(imageChainList().begin(), imageChainList().end(), object);
+   
+   
+   if(current!=imageChainList().end())
+   {
+      result = true;
+      object->removeListener((ossimConnectableObjectListener*)this);
+      if(current == imageChainList().begin())
+      {
+         object->removeListener((ossimConnectableObjectListener*)this);
+      }
+      if(imageChainList().size() == 1)
+      {
+         object->changeOwner(0);
+         current = imageChainList().erase(current);
+      }
+      else 
+      {
+         ossimConnectableObject::ConnectableObjectList input  = object->getInputList();
+         ossimConnectableObject::ConnectableObjectList output = object->getOutputList();
+         object->changeOwner(0);// set the owner to 0
+         bool erasingBeginning = (current == imageChainList().begin());
+         // bool erasingEnd = (current+1) == imageChainList().end();
+         current = imageChainList().erase(current);
+         object->disconnect();
+         
+         if(!imageChainList().empty())
+         {
+            if(erasingBeginning) // the one that receives the first getTile
+            {
+               (*imageChainList().begin())->addListener(this);
+            }
+            
+            else if(current==imageChainList().end()) // one that receives the last getTIle
+            {
+               current = imageChainList().begin()+(imageChainList().size()-1);
+               (*current)->connectInputList(input);
+               theInputObjectList = (*current)->getInputList();
+               theInputListIsFixedFlag = (*current)->getInputListIsFixedFlag();
+            }
+            else
+            {
+               // prepare interior setup and removal and connect surrounding nodes
+               // take the  outputs of the node we are removing and connect them to the old inputs 
+               ossim_uint32 outIndex = 0;
+               for(outIndex = 0; outIndex < output.size();++outIndex)
+               {
+                  output[outIndex]->connectInputList(input);
+               }
+            }
+         }
+      }
+
+      // Send an event to any listeners.
+      ossimContainerEvent event((ossimObject*)this,
+                                OSSIM_EVENT_REMOVE_OBJECT_ID);
+      event.setObjectList(object);
+      fireEvent(event);
+   }
+   
+   return result;
+}
+
+ossimConnectableObject* ossimImageChain::removeChild(const ossimId& id)
+{
+   ossimIdVisitor visitor( id,
+                           (ossimVisitor::VISIT_CHILDREN|ossimVisitor::VISIT_INPUTS ) );
+   accept( visitor );
+   ossimConnectableObject* obj = visitor.getObject();
+   if ( obj )
+   {
+      removeChild(obj);
+   }
+   return obj;
+}
+
+void ossimImageChain::getChildren(vector<ossimConnectableObject*>& children,
+                                  bool immediateChildrenOnlyFlag)
+{
+   ossim_uint32 i = 0;
+   
+   vector<ossimConnectableObject*> temp;
+   for(i = 0; i < imageChainList().size();++i)
+   {
+      temp.push_back(imageChainList()[i].get());
+   }
+
+   for(i = 0; i < temp.size();++i)
+   {
+      ossimConnectableContainerInterface* interface = PTR_CAST(ossimConnectableContainerInterface,
+                                                               temp[i]);
+      if(immediateChildrenOnlyFlag)
+      {
+         children.push_back(temp[i]);
+      }
+      else if(!interface)
+      {
+         children.push_back(temp[i]);         
+      }
+   }
+   
+   if(!immediateChildrenOnlyFlag)
+   {
+      for(i = 0; i < temp.size();++i)
+      {
+         ossimConnectableContainerInterface* interface = PTR_CAST(ossimConnectableContainerInterface,
+                                                                  temp[i]);
+         if(interface)
+         {
+            interface->getChildren(children, false);
+         }
+      }
+   }
+}
+
+bool ossimImageChain::add(ossimConnectableObject* source)
+{
+   bool result = false;
+//   if(PTR_CAST(ossimImageSource, source))
+   {
+     source->changeOwner(this);
+     if(imageChainList().size() > 0)
+     {
+        source->disconnectAllOutputs();
+        theOutputListIsFixedFlag = source->getOutputListIsFixedFlag();
+        imageChainList()[0]->removeListener(this);
+        imageChainList().insert(imageChainList().begin(), source);
+        imageChainList()[0]->addListener(this);
+        source->addListener((ossimConnectableObjectListener*)this);
+        imageChainList()[0]->connectMyInputTo(imageChainList()[1].get());
+        result = true;
+     }
+     else
+     {
+        theInputListIsFixedFlag = false;
+        theOutputListIsFixedFlag = false;
+        
+        if(!theInputObjectList.empty())
+        {
+           source->connectInputList(getInputList());
+        }
+        theInputObjectList = source->getInputList();
+        theInputListIsFixedFlag = source->getInputListIsFixedFlag();
+     //   theOutputObjectList     = source->getOutputList();
+     //   theOutputListIsFixedFlag= source->getOutputListIsFixedFlag();
+        imageChainList().push_back(source);
+        source->addListener((ossimConnectableObjectListener*)this);
+        source->addListener(this);
+        result = true;
+     }
+   }
+
+   if (result && source)
+   {
+      ossimContainerEvent event(this, OSSIM_EVENT_ADD_OBJECT_ID);
+      event.setObjectList(source);
+      fireEvent(event);
+   }
+   
+   return result;
+}
+
+bool ossimImageChain::insertRight(ossimConnectableObject* newObj,
+                                  ossimConnectableObject* rightOfThisObj)
+{
+   if(!newObj&&!rightOfThisObj) return false;
+   if(!imageChainList().size())
+   {
+      return add(newObj);
+   }
+   std::vector<ossimRefPtr<ossimConnectableObject> >::iterator iter = std::find(imageChainList().begin(), imageChainList().end(), rightOfThisObj);
+   
+   if(iter!=imageChainList().end())
+   {
+      if(iter == imageChainList().begin())
+      {
+         return add(newObj);
+      }
+      else //if(PTR_CAST(ossimImageSource, newObj))
+      {
+         ossimConnectableObject::ConnectableObjectList outputList = rightOfThisObj->getOutputList();
+         rightOfThisObj->disconnectAllOutputs();
+
+         // Core dump fix.  Connect input prior to outputs. (drb)
+         newObj->connectMyInputTo(rightOfThisObj); 
+         newObj->connectOutputList(outputList);
+         newObj->changeOwner(this);
+         newObj->addListener((ossimConnectableObjectListener*)this);
+         imageChainList().insert(iter, newObj);
+         // Send event to any listeners.
+         ossimContainerEvent event(this, OSSIM_EVENT_ADD_OBJECT_ID);
+         event.setObjectList(newObj);
+         fireEvent(event);
+         return true;
+      }
+   }
+
+   return false;
+}
+
+bool ossimImageChain::insertRight(ossimConnectableObject* newObj,
+                                  const ossimId& id)
+{
+
+#if 1
+   ossimIdVisitor visitor( id, ossimVisitor::VISIT_CHILDREN );
+   accept( visitor );
+   ossimConnectableObject* obj = visitor.getObject();
+   if ( obj )
+   {
+      return insertRight(newObj, obj);
+   }
+   return false;
+#else
+   ossimConnectableObject* obj = findObject(id, false);
+   if(obj)
+   {
+      return insertRight(newObj, obj);
+   }
+
+   return false;
+#endif
+}
+
+bool ossimImageChain::insertLeft(ossimConnectableObject* newObj,
+                                 ossimConnectableObject* leftOfThisObj)
+{
+   if(!newObj&&!leftOfThisObj) return false;
+   if(!imageChainList().size())
+   {
+      return add(newObj);
+   }
+   std::vector<ossimRefPtr<ossimConnectableObject> >::iterator iter = std::find(imageChainList().begin(), imageChainList().end(), leftOfThisObj);
+   if(iter!=imageChainList().end())
+   {
+      if((iter+1)==imageChainList().end())
+      {
+         return addLast(newObj);
+      }
+      else
+      {
+         ossimConnectableObject::ConnectableObjectList inputList = leftOfThisObj->getInputList();
+         
+         newObj->connectInputList(inputList);
+         
+         leftOfThisObj->disconnectAllInputs();
+         leftOfThisObj->connectMyInputTo(newObj);
+         newObj->changeOwner(this);
+         newObj->addListener((ossimConnectableObjectListener*)this);
+         imageChainList().insert(iter+1, newObj);
+         // Send an event to any listeners.
+         ossimContainerEvent event(this, OSSIM_EVENT_ADD_OBJECT_ID);
+         event.setObjectList(newObj);
+         fireEvent(event);
+         return true;
+      }
+   }
+
+   return false;
+}
+
+bool ossimImageChain::insertLeft(ossimConnectableObject* newObj,
+                                 const ossimId& id)
+{
+#if 1
+   ossimIdVisitor visitor( id,
+                           ossimVisitor::VISIT_CHILDREN|ossimVisitor::VISIT_INPUTS);
+   accept( visitor );
+   ossimConnectableObject* obj = visitor.getObject();
+   if ( obj )
+   {
+      return insertLeft(newObj, obj);
+   }
+   return false;
+#else
+   ossimConnectableObject* obj = findObject(id, false);
+   if(obj)
+   {
+      return insertLeft(newObj, obj);
+   }
+   return false;
+#endif   
+}
+
+bool ossimImageChain::replace(ossimConnectableObject* newObj,
+                              ossimConnectableObject* oldObj)
+{
+   ossim_int32 idx = indexOf(oldObj);
+   if(idx >= 0)
+   {
+      ossimConnectableObject::ConnectableObjectList& inputList  = oldObj->getInputList();
+      ossimConnectableObject::ConnectableObjectList& outputList = oldObj->getOutputList();
+      oldObj->removeListener((ossimConnectableObjectListener*)this);
+      oldObj->removeListener(this);
+      oldObj->changeOwner(0);
+      imageChainList()[idx] = newObj;
+      newObj->connectInputList(inputList);
+      newObj->connectOutputList(outputList);
+      newObj->changeOwner(this);
+      newObj->addListener((ossimConnectableObjectListener*)this);
+      if(idx == 0)
+      {
+         newObj->addListener(this);
+      }
+   }
+   
+   return (idx >= 0);
+}
+
+ossimRefPtr<ossimImageData> ossimImageChain::getTile(
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   if((imageChainList().size() > 0)&&(isSourceEnabled()))
+   {
+      ossimImageSource* inputSource = PTR_CAST(ossimImageSource,
+                                             imageChainList()[0].get());
+      
+      if(inputSource)
+      {
+         // make sure we initialize in reverse order.
+         // some source may depend on the initialization of
+         // its inputs
+         return inputSource->getTile(tileRect, resLevel);
+      }  
+   }
+   else
+   {
+      if(getInput(0))
+      {
+         ossimImageSource* inputSource = PTR_CAST(ossimImageSource, getInput(0));
+         if(inputSource)
+         {
+            ossimRefPtr<ossimImageData> inputTile = inputSource->getTile(tileRect, resLevel);
+//            if(inputTile.valid())
+//            {
+//               std::cout << *(inputTile.get()) << std::endl;
+//            }
+            return inputTile.get();
+         }
+      }
+   }
+//   std::cout << "RETURNING A BLANK TILE!!!!" << std::endl;
+/*
+   if(theBlankTile.get())
+   {
+      theBlankTile->setImageRectangle(tileRect);
+   }
+   return theBlankTile;
+ */
+   return 0;
+}
+
+ossim_uint32 ossimImageChain::getNumberOfInputBands() const
+{
+   if((imageChainList().size() > 0)&&(isSourceEnabled()))
+   {
+      ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                      imageChainList()[0].get());
+      if(interface)
+      {
+         return interface->getNumberOfOutputBands();
+      }
+   }
+   else
+   {
+      if(getInput(0))
+      {
+         ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                         getInput(0));
+         if(interface)
+         {
+            return interface->getNumberOfOutputBands();
+         }
+      }
+   }
+
+   return 0;
+}
+
+double ossimImageChain::getNullPixelValue(ossim_uint32 band)const
+{
+   if((imageChainList().size() > 0)&&(isSourceEnabled()))
+   {
+      ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                      imageChainList()[0].get());
+      if(interface)
+      {
+         return interface->getNullPixelValue(band);
+      }
+   }
+   else
+   {
+      if(getInput(0))
+      {
+         ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                         getInput(0));
+         if(interface)
+         {
+            return interface->getNullPixelValue(band);
+         }
+      }
+   }
+   
+   return ossim::defaultNull(getOutputScalarType());
+}
+
+double ossimImageChain::getMinPixelValue(ossim_uint32 band)const
+{
+   if((imageChainList().size() > 0)&&(isSourceEnabled()))
+   {
+      ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                      imageChainList()[0].get());
+      if(interface)
+      {
+         return interface->getMinPixelValue(band);
+      }
+   }
+   else
+   {
+      if(getInput(0))
+      {
+         ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                         getInput(0));
+         if(interface)
+         {
+            return interface->getMinPixelValue(band);
+         }
+      }
+   }
+
+   return ossim::defaultMin(getOutputScalarType());
+}
+
+double ossimImageChain::getMaxPixelValue(ossim_uint32 band)const
+{
+   if((imageChainList().size() > 0)&&(isSourceEnabled()))
+   {
+      ossimImageSource* inter = PTR_CAST(ossimImageSource,
+                                                  imageChainList()[0].get());
+      if(inter)
+      {
+         return inter->getMaxPixelValue(band);
+      }
+   }
+   else
+   {
+      if(getInput(0))
+      {
+         ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                         getInput(0));
+         if(interface)
+         {
+            return interface->getMaxPixelValue(band);
+         }
+      }
+   }
+
+   return ossim::defaultMax(getOutputScalarType());
+}
+
+void ossimImageChain::getOutputBandList(std::vector<ossim_uint32>& bandList) const
+{
+   if( (imageChainList().size() > 0) && isSourceEnabled() )
+   {
+      ossimRefPtr<const ossimImageSource> inter =
+         dynamic_cast<const ossimImageSource*>( imageChainList()[0].get() );
+      if( inter.valid() )
+      {
+         // cout << "cn: " << inter->getClassName() << endl;
+         inter->getOutputBandList(bandList);
+      }
+   }
+}
+   
+ossimScalarType ossimImageChain::getOutputScalarType() const
+{
+   if((imageChainList().size() > 0)&&(isSourceEnabled()))
+   {
+      ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                      imageChainList()[0].get());
+      if(interface)
+      {
+         return interface->getOutputScalarType();
+      }
+   }
+   else
+   {
+      if(getInput(0))
+      {
+         ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                         getInput(0));
+         if(interface)
+         {
+            return interface->getOutputScalarType();
+         }
+      }
+   }
+   
+   return OSSIM_SCALAR_UNKNOWN;
+}
+
+ossim_uint32 ossimImageChain::getTileWidth()const
+{
+   if((imageChainList().size() > 0)&&(isSourceEnabled()))
+   {
+         ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                         imageChainList()[0].get());
+         if(interface)
+         {
+            return interface->getTileWidth();;
+         }
+   }
+   else
+   {
+      if(getInput(0))
+      {
+         ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                         getInput(0));
+         if(interface)
+         {
+            return interface->getTileWidth();
+         }
+      }
+   }
+   
+   return 0;   
+}
+
+ossim_uint32 ossimImageChain::getTileHeight()const
+{
+   if((imageChainList().size() > 0)&&(isSourceEnabled()))
+   {
+         ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                         imageChainList()[0].get());
+         if(interface)
+         {
+            return interface->getTileHeight();
+         }
+   }
+   else
+   {
+      if(getInput(0))
+      {
+         ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                         getInput(0));
+         if(interface)
+         {
+            return interface->getTileHeight();
+         }
+      }
+   }
+   
+   return 0;   
+}
+   
+ossimIrect ossimImageChain::getBoundingRect(ossim_uint32 resLevel)const
+{
+   if((imageChainList().size() > 0)&&(isSourceEnabled()))
+   {
+
+      ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                      imageChainList()[0].get());
+
+      if(interface)
+      {
+         return interface->getBoundingRect(resLevel);
+      }
+   }
+   else
+   {
+      if(getInput(0))
+      {
+         ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                         getInput(0));
+         if(interface)
+         {
+            return interface->getBoundingRect();
+         }
+      }
+   }
+   ossimDrect rect;
+   rect.makeNan();
+   
+   return rect;
+   
+}
+
+void ossimImageChain::getValidImageVertices(vector<ossimIpt>& validVertices,
+                                            ossimVertexOrdering ordering,
+                                            ossim_uint32 resLevel)const
+{
+   if((imageChainList().size() > 0)&&(isSourceEnabled()))
+   {
+      ossimImageSource* interface =PTR_CAST(ossimImageSource,
+                                                     imageChainList()[0].get());
+
+      if(interface)
+      {
+         interface->getValidImageVertices(validVertices,
+                                          ordering,
+                                          resLevel);
+      }
+   }
+   else
+   {
+      if(getInput(0))
+      {
+         ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                         getInput(0));
+         if(interface)
+         {
+            interface->getValidImageVertices(validVertices,
+                                             ordering,
+                                             resLevel);
+         }
+      }
+   }
+}
+
+ossimRefPtr<ossimImageGeometry> ossimImageChain::getImageGeometry()
+{
+   if((imageChainList().size() > 0)&&(isSourceEnabled()))
+   {
+      ossimImageSource* interface = PTR_CAST(ossimImageSource, imageChainList()[0].get());
+      if( interface )
+      {
+         return interface->getImageGeometry();
+      }
+   }
+   else
+   {
+      if(getInput(0))
+      {
+         ossimImageSource* interface = PTR_CAST(ossimImageSource, getInput(0));
+         if(interface)
+         {
+            return interface->getImageGeometry();
+         }
+      }
+   }
+   return ossimRefPtr<ossimImageGeometry>();
+}
+
+void ossimImageChain::getDecimationFactor(ossim_uint32 resLevel,
+                                          ossimDpt& result) const
+{
+   if((imageChainList().size() > 0)&&(isSourceEnabled()))
+   {
+      ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                      imageChainList()[0].get());
+      if(interface)
+      {
+         interface->getDecimationFactor(resLevel,
+                                        result);
+         return;
+      }
+   }
+   else
+   {
+      if(getInput(0))
+      {
+         ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                         getInput(0));
+         if(interface)
+         {
+            interface->getDecimationFactor(resLevel, result);
+            return;
+         }
+      }
+   }
+
+   result.makeNan();
+}
+
+void ossimImageChain::getDecimationFactors(vector<ossimDpt>& decimations) const
+{
+   if((imageChainList().size() > 0)&&(isSourceEnabled()))
+   {
+      ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                      imageChainList()[0].get());
+      if(interface)
+      {
+         interface->getDecimationFactors(decimations);
+      }
+   }
+   else
+   {
+      if(getInput(0))
+      {
+         ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                         getInput(0));
+         if(interface)
+         {
+            interface->getDecimationFactors(decimations);
+            return;
+         }
+      }
+   }
+}
+
+ossim_uint32 ossimImageChain::getNumberOfDecimationLevels()const
+{
+   if((imageChainList().size() > 0)&&(isSourceEnabled()))
+   {
+      ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                      imageChainList()[0].get());
+
+      if(interface)
+      {
+         return interface->getNumberOfDecimationLevels();
+      }
+   }
+   else
+   {
+      if(getInput(0))
+      {
+         ossimImageSource* interface = PTR_CAST(ossimImageSource,
+                                                         getInput(0));
+         if(interface)
+         {
+            return interface->getNumberOfDecimationLevels();
+         }
+      }
+   }
+
+   return 1;
+}
+
+bool ossimImageChain::addAllSources(map<ossimId, vector<ossimId> >& idMapping,
+                                    const ossimKeywordlist& kwl,
+                                    const char* prefix)
+{
+   static const char* MODULE = "ossimImageChain::addAllSources";
+   ossimString copyPrefix = prefix;
+   bool result =  ossimImageSource::loadState(kwl, copyPrefix.c_str());
+
+   if(!result)
+   {
+      return result;
+   }
+   long index = 0;
+
+//   ossimSource* source = NULL;
+
+   vector<ossimId> inputConnectionIds;
+   ossimString regExpression =  ossimString("^(") + copyPrefix + "object[0-9]+.)";
+   vector<ossimString> keys =
+      kwl.getSubstringKeyList( regExpression );
+   long numberOfSources = (long)keys.size();//kwl.getNumberOfSubstringKeys(regExpression);
+
+   int offset = (int)(copyPrefix+"object").size();
+   int idx = 0;
+   std::vector<int> theNumberList(numberOfSources);
+   for(idx = 0; idx < (int)theNumberList.size();++idx)
+     {
+       ossimString numberStr(keys[idx].begin() + offset,
+			     keys[idx].end());
+       theNumberList[idx] = numberStr.toInt();
+     }
+   std::sort(theNumberList.begin(), theNumberList.end());
+   for(idx=0;idx < (int)theNumberList.size();++idx)
+   {
+      ossimString newPrefix = copyPrefix;
+      newPrefix += ossimString("object");
+      newPrefix += ossimString::toString(theNumberList[idx]);
+      newPrefix += ossimString(".");
+
+      if(traceDebug())
+      {
+         CLOG << "trying to create source with prefix: " << newPrefix
+              << std::endl;
+      }
+      ossimRefPtr<ossimObject> object = ossimObjectFactoryRegistry::instance()->createObject(kwl,
+                                                                                 newPrefix.c_str());
+      ossimConnectableObject* source = PTR_CAST(ossimConnectableObject, object.get());
+      
+      if(source)
+      {
+         // we did find a source so include it in the count
+         if(traceDebug())
+         {
+            CLOG << "Created source with prefix: " << newPrefix << std::endl;
+         }
+         //if(PTR_CAST(ossimImageSource, source))
+         {
+            ossimId id = source->getId();
+            inputConnectionIds.clear();
+            
+            findInputConnectionIds(inputConnectionIds,
+                                   kwl,
+                                   newPrefix);
+            if(inputConnectionIds.size() == 0)
+            {
+               // we will try to do a default connection
+               //
+               
+               if(imageChainList().size())
+               {
+                  if(traceDebug())
+                  {
+                     CLOG << "connecting " << source->getClassName() << " to "
+                          << imageChainList()[0]->getClassName() << std::endl;
+                  }
+                  source->connectMyInputTo(0, imageChainList()[0].get());
+               }
+            }
+            else
+            {
+               // we remember the connection id's so we can connect this later.
+               // this way we make sure all sources were actually
+               // allocated.
+               //
+               idMapping.insert(std::make_pair(id, inputConnectionIds));
+            }
+            add(source);
+         }
+      //   else
+      //   {
+            source = 0;
+      //   }
+      }
+      else
+      {
+         object = 0;
+         source = 0;
+      }
+      
+      ++index;
+   }
+   if(imageChainList().size())
+   {
+     ossimConnectableObject* obj = imageChainList()[(ossim_int32)imageChainList().size()-1].get();
+     if(obj)
+     {
+        setNumberOfInputs(obj->getNumberOfInputs());
+     }
+   }
+   
+   return result;
+}
+
+void ossimImageChain::findInputConnectionIds(vector<ossimId>& result,
+                                             const ossimKeywordlist& kwl,
+                                             const char* prefix)
+{
+   ossimString copyPrefix = prefix;
+   ossim_uint32 idx = 0;
+   
+   ossimString regExpression =  ossimString("^") + ossimString(prefix) + "input_connection[0-9]+";
+   vector<ossimString> keys =
+      kwl.getSubstringKeyList( regExpression );
+   
+   ossim_int32 offset = (ossim_int32)(copyPrefix+"input_connection").size();
+   ossim_uint32 numberOfKeys = (ossim_uint32)keys.size();
+   std::vector<int> theNumberList(numberOfKeys);
+   for(idx = 0; idx < theNumberList.size();++idx)
+   {
+      ossimString numberStr(keys[idx].begin() + offset,
+                            keys[idx].end());
+      theNumberList[idx] = numberStr.toInt();
+   }
+   std::sort(theNumberList.begin(), theNumberList.end());
+   copyPrefix += ossimString("input_connection");
+   for(idx=0;idx < theNumberList.size();++idx)
+   {
+      const char* lookup = kwl.find(copyPrefix,ossimString::toString(theNumberList[idx]));
+      if(lookup)
+      {
+         long id = ossimString(lookup).toLong();
+         result.push_back(ossimId(id));
+      }
+   }
+}
+                    
+
+bool ossimImageChain::connectAllSources(const map<ossimId, vector<ossimId> >& idMapping)
+{
+   // cout << "this->getId(): " << this->getId() << endl;
+   
+   if(idMapping.size())
+   {
+      map<ossimId, vector<ossimId> >::const_iterator iter = idMapping.begin();
+
+      
+      while(iter != idMapping.end())
+      {
+         // cout << "(*iter).first): " << (*iter).first << endl;
+#if 0
+         ossimConnectableObject* currentSource = findObject((*iter).first);
+#else
+         ossimIdVisitor visitor( (*iter).first,
+                                 (ossimVisitor::VISIT_CHILDREN ) );
+                                  // ossimVisitor::VISIT_INPUTS ) );
+         accept( visitor );
+         ossimConnectableObject* currentSource = visitor.getObject();
+#endif
+
+         if(currentSource)
+         {
+            // cout << "currentSource->getClassName: " << currentSource->getClassName() << endl;
+            long upperBound = (long)(*iter).second.size();
+            for(long index = 0; index < upperBound; ++index)
+            {
+               //cout << "(*iter).second[index]: " << (*iter).second[index] << endl;
+               
+               if((*iter).second[index].getId() > -1)
+               {
+#if 0
+                  ossimConnectableObject* inputSource =
+                      PTR_CAST(ossimConnectableObject, findObject((*iter).second[index]));
+#else
+                  visitor.reset();
+                  visitor.setId( (*iter).second[index] );
+                  accept( visitor );
+                  ossimConnectableObject* inputSource = visitor.getObject();
+#endif
+                  // cout << "inputSource is " << (inputSource?"good...":"null...") << endl;
+                  if ( inputSource )
+                  {
+                     // cout << "inputSource->getClassName(): " << inputSource->getClassName() << endl;
+ 
+                     // Check for connection to self.
+                     if ( this != inputSource )
+                     {
+                        currentSource->connectMyInputTo(index, inputSource);
+                     }
+                     // else warning???
+                  }
+               }
+               else // -1 id
+               {
+                  currentSource->disconnectMyInput((ossim_int32)index);
+               }
+            }
+         }
+         else
+         {
+            cerr << "Could not find " << (*iter).first << " for source: ";
+            return false;
+         }
+         ++iter;
+      }
+   }
+
+   // abort();
+   return true;
+}
+
+bool ossimImageChain::saveState(ossimKeywordlist& kwl,
+                                const char* prefix)const
+{
+   bool result = true;
+   
+   result = ossimImageSource::saveState(kwl, prefix);
+
+   if(!result)
+   {
+      return result;
+   }
+   ossim_uint32 upper = (ossim_uint32)imageChainList().size();
+   ossim_uint32 counter = 1;
+
+   if (upper)
+   {
+      ossim_int32 idx = upper-1;
+      // start with the tail and go to the head fo the list.
+      for(;((idx >= 0)&&result);--idx, ++counter)
+      {
+         ossimString newPrefix = prefix;
+         
+         newPrefix += (ossimString("object") +
+                       ossimString::toString(counter) +
+                       ossimString("."));
+         result = imageChainList()[idx]->saveState(kwl, newPrefix.c_str());
+      }
+   }
+
+   return result;
+}
+
+bool ossimImageChain::loadState(const ossimKeywordlist& kwl,
+                                const char* prefix)
+{
+   static const char* MODULE = "ossimImageChain::loadState(kwl, prefix)";
+   deleteList();
+
+   ossimImageSource::loadState(kwl, prefix);
+   
+   
+   theLoadStateFlag = true;
+   bool result = true;
+   
+   map<ossimId, vector<ossimId> > idMapping;
+   result = addAllSources(idMapping, kwl, prefix);
+   if(!result)
+   {
+      CLOG << "problems adding sources" << std::endl;
+   }
+   result = connectAllSources(idMapping);
+   if(!result)
+   {
+      CLOG << "problems connecting sources" << std::endl;
+   }
+   
+   theLoadStateFlag = false;
+   return result;
+}
+
+
+void ossimImageChain::initialize()
+{
+   static const char* MODULE = "ossimImageChain::initialize()";
+   if (traceDebug()) CLOG << " Entered..." << std::endl;
+   
+   long upper = (ossim_uint32)imageChainList().size();
+   
+   for(long index = upper - 1; index >= 0; --index)
+   {
+      if(traceDebug())
+      {
+         CLOG << "initilizing source: "
+              << imageChainList()[index]->getClassName()
+              << std::endl;
+      }
+      if(imageChainList()[index].valid())
+      {
+         ossimSource* interface =
+            PTR_CAST(ossimSource, imageChainList()[index].get());
+
+         if(interface)
+         {
+            // make sure we initialize in reverse order.
+            // some source may depend on the initialization of
+            // its inputs
+            interface->initialize();
+         }
+      }
+   }
+   if (traceDebug()) CLOG << " Exited..." << std::endl;
+}
+
+void ossimImageChain::enableSource()
+{
+   ossim_int32 upper = static_cast<ossim_int32>(imageChainList().size());
+   ossim_int32 index = 0;
+   for(index = upper - 1; index >= 0; --index)
+   {
+      // make sure we initialize in reverse order.
+      // some source may depend on the initialization of
+      // its inputs
+     ossimSource* source = PTR_CAST(ossimSource, imageChainList()[index].get());
+     if(source)
+     {
+        source->enableSource();
+     }
+   }
+   
+   theEnableFlag = true;
+}
+
+void ossimImageChain::disableSource()
+{
+   long upper = (ossim_uint32)imageChainList().size();
+   
+   for(long index = upper - 1; index >= 0; --index)
+   {
+      // make sure we initialize in reverse order.
+      // some source may depend on the initialization of
+      // its inputs
+     ossimSource* source = PTR_CAST(ossimSource, imageChainList()[index].get());
+     if(source)
+     {
+        source->disableSource();
+     }
+   }
+   
+   theEnableFlag = false;
+}
+
+void ossimImageChain::prepareForRemoval(ossimConnectableObject* connectableObject)
+{
+   if(connectableObject)
+   {
+      connectableObject->removeListener((ossimConnectableObjectListener*)this);
+      connectableObject->changeOwner(0);
+      connectableObject->disconnect();   
+   }
+}
+
+bool ossimImageChain::deleteFirst()
+{
+   if (imageChainList().size() == 0) return false;
+
+   ossimContainerEvent event(this, OSSIM_EVENT_REMOVE_OBJECT_ID);
+   prepareForRemoval(imageChainList()[0].get());
+   // Clear any listeners, memory.
+   event.setObjectList(imageChainList()[0].get());
+   imageChainList()[0] = 0;
+   // Remove from the vector.
+   std::vector<ossimRefPtr<ossimConnectableObject> >::iterator i = imageChainList().begin();
+   imageChainList().erase(i);
+   fireEvent(event);
+   return true;
+}
+
+bool ossimImageChain::deleteLast()
+{
+   if (imageChainList().size() == 0) return false;
+
+   ossimContainerEvent event(this, OSSIM_EVENT_REMOVE_OBJECT_ID);
+  // Clear any listeners, memory.
+   ossim_uint32 idx = (ossim_uint32)imageChainList().size() - 1;
+   prepareForRemoval(imageChainList()[idx].get());
+   event.setObjectList(imageChainList()[idx].get());
+   imageChainList()[idx] = 0;
+   // Remove from the vector.
+   imageChainList().pop_back();
+   fireEvent(event);
+   return true; 
+}
+
+void ossimImageChain::deleteList()
+{
+   ossim_uint32 upper = (ossim_uint32) imageChainList().size();
+   ossim_uint32 idx = 0;
+   ossimContainerEvent event(this, OSSIM_EVENT_REMOVE_OBJECT_ID);
+   for(; idx < upper; ++idx)
+   {
+      if(imageChainList()[idx].valid())
+      {
+         event.getObjectList().push_back(imageChainList()[idx].get());
+         prepareForRemoval(imageChainList()[idx].get());
+         imageChainList()[idx] = 0;
+      }
+   }
+  
+   imageChainList().clear();
+   fireEvent(event);
+}
+
+
+void ossimImageChain::disconnectInputEvent(ossimConnectionEvent& event)
+{
+   if(imageChainList().size())
+   {
+      if(event.getObject()==this)
+      {
+         if(imageChainList()[imageChainList().size()-1].valid())
+         {
+            for(ossim_uint32 i = 0; i < event.getNumberOfOldObjects(); ++i)
+            {
+               imageChainList()[imageChainList().size()-1]->disconnectMyInput(event.getOldObject(i));
+            }
+         }
+      }
+   }
+}
+
+void ossimImageChain::disconnectOutputEvent(ossimConnectionEvent& /* event */)
+{
+}
+
+void ossimImageChain::connectInputEvent(ossimConnectionEvent& event)
+{
+   if(imageChainList().size())
+   {
+      if(event.getObject()==this)
+      {
+         if(imageChainList()[imageChainList().size()-1].valid())
+         {
+            for(ossim_uint32 i = 0; i < event.getNumberOfNewObjects(); ++i)
+            {
+               ossimConnectableObject* obj = event.getNewObject(i);
+               imageChainList()[imageChainList().size()-1]->connectMyInputTo(findInputIndex(obj),
+                                                                               obj,
+                                                                               false);
+            }
+         }
+      }
+      else if(event.getObject() == imageChainList()[0].get())
+      {
+         if(!theLoadStateFlag)
+         {
+//            theInputObjectList = imageChainList()[0]->getInputList();
+         }
+      }
+      initialize();
+   }
+}
+
+void ossimImageChain::connectOutputEvent(ossimConnectionEvent& /* event */)
+{
+} 
+
+// void ossimImageChain::propertyEvent(ossimPropertyEvent& event)
+// {
+//    if(imageChainList().size())
+//    {
+//       ossimConnectableObject* obj = PTR_CAST(ossimConnectableObject,
+//                                              event.getObject());
+      
+//       if(obj)
+//       {
+//          ossimImageSource* interface = findSource(obj->getId());
+         
+//          if(interface)
+//          {
+//             ossimConnectableObject* obj = PTR_CAST(ossimConnectableObject,
+//                                                    interface.getObject());
+//             if(obj)
+//             {
+               
+//             }
+//          }
+//       }
+//    }
+// }
+
+void ossimImageChain::objectDestructingEvent(ossimObjectDestructingEvent& event)
+{
+   if(!event.getObject()) return;
+
+   if(imageChainList().size()&&(event.getObject()!=this))
+   {
+      removeChild(PTR_CAST(ossimConnectableObject,
+                           event.getObject()));
+   }
+}
+void ossimImageChain::propagateEventToOutputs(ossimEvent& event)
+{
+   //if(thePropagateEventFlag) return;
+
+   //thePropagateEventFlag = true;
+   if(imageChainList().size())
+   {
+      if(imageChainList()[imageChainList().size()-1].valid())
+      {
+         imageChainList()[imageChainList().size()-1]->fireEvent(event);
+         imageChainList()[imageChainList().size()-1]->propagateEventToOutputs(event);
+      }
+   }
+   //ossimConnectableObject::propagateEventToOutputs(event);
+  // thePropagateEventFlag = false;
+}
+void ossimImageChain::propagateEventToInputs(ossimEvent& event)
+{
+//   if(thePropagateEventFlag) return;
+
+//   thePropagateEventFlag = true;
+   if(imageChainList().size())
+   {
+      if(imageChainList()[0].valid())
+      {
+         imageChainList()[0]->fireEvent(event);
+         imageChainList()[0]->propagateEventToInputs(event);
+      }
+   }
+//   thePropagateEventFlag = false;
+}
+
+ossimConnectableObject* ossimImageChain::operator[](ossim_uint32 index)
+{
+   return getConnectableObject(index);
+}
+
+ossimConnectableObject* ossimImageChain::getConnectableObject(
+   ossim_uint32 index)
+{
+   if(imageChainList().size() && (index < imageChainList().size()))
+   {
+      return imageChainList()[index].get();
+   }
+   
+   return 0; 
+}
+
+ossim_int32 ossimImageChain::indexOf(ossimConnectableObject* obj)const
+{
+   ossim_uint32 idx = 0;
+   
+   for(idx = 0; idx < imageChainList().size();++idx)
+   {
+      if(imageChainList()[idx] == obj)
+      {
+         return (ossim_int32)idx;
+      }
+   }
+   
+   return -1;
+}
+
+void ossimImageChain::accept(ossimVisitor& visitor)
+{
+   if(!visitor.hasVisited(this))
+   {
+      visitor.visit(this);
+      ossimVisitor::VisitorType currentType = visitor.getVisitorType();
+      //---
+      // Lets make sure inputs and outputs are turned off for we are traversing all children
+      // and we should not have to have that enabled.
+      //---
+      visitor.turnOffVisitorType(ossimVisitor::VISIT_INPUTS|ossimVisitor::VISIT_OUTPUTS);
+      if(visitor.getVisitorType() & ossimVisitor::VISIT_CHILDREN)
+      {
+         ConnectableObjectList::reverse_iterator current = imageChainList().rbegin();
+         while((current != imageChainList().rend())&&!visitor.stopTraversal())
+         {
+            ossimRefPtr<ossimConnectableObject> currentObject = (*current);
+            if(currentObject.get() && !visitor.hasVisited(currentObject.get())) currentObject->accept(visitor);
+            ++current;
+         }
+      }
+      visitor.setVisitorType(currentType);
+      ossimConnectableObject::accept(visitor);
+   }
+}
+
+//**************************************************************************************************
+// Inserts all of its children and inputs into the container provided. Since ossimImageChain is
+// itself a form of container, this method will consolidate this chain with the argument
+// container. Therefore this chain object will not be represented in the container (but its
+// children will be, with correct input and output connections to external objects).
+// Returns TRUE if successful.
+//**************************************************************************************************
+bool ossimImageChain::fillContainer(ossimConnectableContainer& container)
+{
+   // Grab the first source in the chain and let it fill the container with itself and inputs. This
+   // will traverse down the chain and will even pick up external sources that feed this chain:
+   ossimRefPtr<ossimConnectableObject> first_source = getFirstSource();
+   if (!first_source.valid())
+      return false;
+   first_source->fillContainer(container);
+
+   // Instead of adding ourselves, make sure my first source is properly connected to my output,
+   // thus obviating the need for this image chain (my chain items become part of 'container':
+   ConnectableObjectList& obj_list = getOutputList();
+   ossimRefPtr<ossimConnectableObject> output_connection = 0;
+   while (!obj_list.empty())
+   {
+      // Always pick off the beginning of the list since it is shrinking with each disconnect:
+      output_connection = obj_list[0];
+      disconnectMyOutput(output_connection.get(), true, false);
+      first_source->connectMyOutputTo(output_connection.get());
+   }
+   return true;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimImageCombiner.cpp b/ossim/src/ossim/imaging/ossimImageCombiner.cpp
new file mode 100644
index 0000000..f921df7
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageCombiner.cpp
@@ -0,0 +1,688 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimImageCombiner.cpp 23108 2015-01-27 17:00:20Z okramer $
+#include <ossim/imaging/ossimImageCombiner.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/base/ossimTrace.h>
+
+using namespace std;
+
+RTTI_DEF2(ossimImageCombiner, "ossimImageCombiner", ossimImageSource, ossimConnectableObjectListener)
+static ossimTrace traceDebug ("ossimImageCombiner:debug");
+
+ossimImageCombiner::ossimImageCombiner()
+   :ossimImageSource(NULL,
+                     0,
+                     0,
+                     false,
+                     false),
+    theLargestNumberOfInputBands(0),
+    theInputToPassThrough(0),
+    theHasDifferentInputs(false),
+    theNormTile(NULL),
+    theCurrentIndex(0)
+{
+	theComputeFullResBoundsFlag = true;
+   // until something is set we will just set the blank tile
+   // to a 1 band unsigned char type
+   addListener((ossimConnectableObjectListener*)this);
+}
+ossimImageCombiner::ossimImageCombiner(ossimObject* owner,
+                                       int numberOfInputs,
+                                       int numberOfOutputs,
+                                       bool inputListIsFixedFlag,
+                                       bool outputListIsFixedFlag)
+   :ossimImageSource(owner,
+                     numberOfInputs,
+                     numberOfOutputs,
+                     inputListIsFixedFlag,
+                     outputListIsFixedFlag),
+    theLargestNumberOfInputBands(0),
+    theInputToPassThrough(0),
+    theHasDifferentInputs(false),
+    theNormTile(NULL),
+    theCurrentIndex(0)
+{
+   addListener((ossimConnectableObjectListener*)this);
+   theComputeFullResBoundsFlag = true;
+}
+
+ossimImageCombiner::ossimImageCombiner(ossimConnectableObject::ConnectableObjectList& inputSources)
+   :ossimImageSource(NULL,
+                     (ossim_uint32)inputSources.size(),
+                     0,
+                     false,
+                     false),
+                     theLargestNumberOfInputBands(0),
+                     theInputToPassThrough(0),
+                     theHasDifferentInputs(false),
+                     theNormTile(NULL),
+                     theCurrentIndex(0)
+{
+	theComputeFullResBoundsFlag = true;
+   for(ossim_uint32 index = 0; index < inputSources.size(); ++index)
+   {
+      connectMyInputTo(index, inputSources[index].get());
+   }
+   addListener((ossimConnectableObjectListener*)this);
+   initialize();
+}
+
+ossimImageCombiner::~ossimImageCombiner()
+{
+   removeListener((ossimConnectableObjectListener*)this);
+}
+
+ossimIrect ossimImageCombiner::getBoundingRect(ossim_uint32 resLevel)const
+{
+   static const char* MODULE = "ossimImageCombiner::getBoundingRect";
+   ossimIrect result;
+   if(theComputeFullResBoundsFlag)
+   {
+      precomputeBounds();
+   }
+   
+   double scale = 1.0/std::pow(2.0, (double)resLevel);
+   ossimDpt scalar(scale, scale);
+   result.makeNan();
+   
+   ossim_uint32 inputIndex = 0;
+   ossimImageSource* interface;
+   for(inputIndex = 0;inputIndex < getNumberOfInputs(); ++inputIndex)
+   {
+      interface = PTR_CAST(ossimImageSource, getInput(inputIndex));
+      if(interface)
+      {
+         ossimIrect rect  = theFullResBounds[inputIndex];
+         if(result.hasNans())
+         {
+            result = rect;
+         }
+         else if(!rect.hasNans())
+         {
+            if(traceDebug())
+            {
+               CLOG << "rect " << inputIndex << " = " << result << endl;
+            }
+            rect = rect*scale;
+            result = result.combine(rect);
+         }
+      }
+   }
+   if(traceDebug())
+   {
+      CLOG << "resulting bounding rect =  " << result << endl;
+   }
+   
+   return result;
+}
+
+ossim_uint32 ossimImageCombiner::getNumberOfInputBands() const
+{
+   return theLargestNumberOfInputBands;
+}
+
+ossimScalarType ossimImageCombiner::getOutputScalarType() const
+{
+   if(getInput(theInputToPassThrough))
+   {
+      ossimImageSource* temp = PTR_CAST(ossimImageSource, getInput(theInputToPassThrough));
+      if(temp)
+      {
+         return temp->getOutputScalarType();
+      }
+   }
+
+   return OSSIM_SCALAR_UNKNOWN;
+}
+
+ossim_uint32 ossimImageCombiner::getTileWidth()const
+{
+   if(getInput(theInputToPassThrough))
+   {
+      ossimImageSource* temp = PTR_CAST(ossimImageSource, getInput(theInputToPassThrough));
+      if(temp)
+      {
+         return temp->getTileWidth();
+      }     
+   }
+   
+   return 1;
+}
+
+ossim_uint32 ossimImageCombiner::getTileHeight()const
+{
+   if(getInput(theInputToPassThrough))
+   {
+      ossimImageSource* temp = PTR_CAST(ossimImageSource, getInput(theInputToPassThrough));
+      if(temp)
+      {
+         return temp->getTileHeight();
+      }     
+   }
+   
+   return 1;
+}
+
+double ossimImageCombiner::getNullPixelValue(ossim_uint32 band)const
+{
+   if(getInput(theInputToPassThrough))
+   {
+      ossimImageSource* temp = PTR_CAST(ossimImageSource, getInput(theInputToPassThrough));
+      if(temp)
+      {
+         ossim_uint32 bands = temp->getNumberOfOutputBands();
+         if(band < bands)
+         {
+            return temp->getNullPixelValue(band);
+         }
+         else
+         {
+            return temp->getNullPixelValue(bands-1);
+         }
+      }     
+   }
+   
+   return 0.0;
+}
+
+double ossimImageCombiner::getMinPixelValue(ossim_uint32 band)const
+{
+   const char* MODULE = "ossimImageCombiner::getMinPixelValue";
+
+   if(!getNumberOfInputs())
+   {
+      return ossim::nan();
+   }
+   double result = 1.0/DBL_EPSILON;
+   
+   for(ossim_uint32 index = 0; index < getNumberOfInputs();++index)
+   {
+      ossimImageSource* input = PTR_CAST(ossimImageSource, getInput(index));
+      if(input)
+      {
+         ossim_uint32 bands = input->getNumberOfOutputBands();
+         double temp = 0;
+         if(band < bands)
+         {
+            temp = input->getMinPixelValue(band);
+         }
+         else
+         {
+            temp = input->getMinPixelValue(0);
+         }
+         
+         if(temp < result)
+         {
+            result = temp;
+         }
+      }
+   }
+   if(traceDebug())
+   {
+      CLOG << "min pixel returned is = " << result;
+   }
+
+   return result;
+}
+
+double ossimImageCombiner::getMaxPixelValue(ossim_uint32 band)const
+{
+   const char* MODULE = "ossimImageCombiner::getMaxPixelValue";
+
+   if(!getNumberOfInputs())
+   {
+      return ossim::nan();
+   }
+   double result = -1.0/DBL_EPSILON;
+   
+   for(ossim_uint32 idx = 0; idx < getNumberOfInputs();++idx)
+   {
+      ossimImageSource* input = PTR_CAST(ossimImageSource, getInput(idx));
+      if(input)
+      {
+         ossim_uint32 bands = input->getNumberOfOutputBands();
+         double temp = 0;
+         if(band < bands)
+         {
+            temp = input->getMaxPixelValue(band);
+         }
+         else
+         {
+            temp = input->getMaxPixelValue(0);
+         }
+         if(temp > result)
+         {
+            result = temp;
+         }
+      }
+   }
+
+   if(traceDebug())
+   {
+      CLOG << "max pixel returned is = " << result;
+   }
+   
+   return result;
+}
+
+void ossimImageCombiner::initialize()
+{
+   
+   theLargestNumberOfInputBands = 0;
+   theComputeFullResBoundsFlag = true;
+
+   // now find the largest number of bands
+   //
+   ossim_uint32 size = getNumberOfInputs();
+   ossimScalarType scalarType = OSSIM_SCALAR_UNKNOWN;
+   ossim_uint32 scalarSizeInBytes = 0;
+   theInputToPassThrough = 0;
+   theHasDifferentInputs= false;
+   if(size > 0)
+   {
+      for(ossim_uint32 idx = 0; idx < size; ++idx)
+      {
+         ossimImageSource* temp = PTR_CAST(ossimImageSource, getInput(idx));
+         if(temp)
+         {
+            ossim_uint32 numberOfBands = temp->getNumberOfOutputBands();
+            if(numberOfBands > theLargestNumberOfInputBands)
+            {
+               theLargestNumberOfInputBands = numberOfBands;
+            }
+            ossimScalarType current = temp->getOutputScalarType();
+            if(current != scalarType)
+            {
+               if(scalarType == OSSIM_SCALAR_UNKNOWN)
+               {
+                  scalarType = current;
+                  scalarSizeInBytes = ossim::scalarSizeInBytes(scalarType);
+                  theInputToPassThrough = idx;
+               }
+               else
+               {
+                  theHasDifferentInputs = true;
+                  if(scalarSizeInBytes < ossim::scalarSizeInBytes(current))
+                  {
+                     scalarType        = current;
+                     scalarSizeInBytes = ossim::scalarSizeInBytes(current);
+                     theInputToPassThrough = idx;
+                  }
+               }
+            }
+         }
+      }
+   }
+}
+
+bool ossimImageCombiner::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   bool result = ossimImageSource::loadState(kwl, prefix);
+
+   return result;
+}
+
+void ossimImageCombiner::updateRects()
+{
+	theComputeFullResBoundsFlag = true;
+}
+
+// ossimRefPtr<ossimImageData> ossimImageCombiner::getNextTile(ossim_uint32& returnedIdx,
+//                                                             ossim_uint32 idx,
+//                                                             const ossimIpt& tileRect,
+//                                                             ossim_uint32 resLevel)
+// {
+//    theCurrentIndex  = idx;
+//    return getNextTile(returnedIdx, origin, resLevel);
+// }
+
+// ossimRefPtr<ossimImageData> ossimImageCombiner::getNextTile(ossim_uint32& returnedIdx,
+//                                                             ossim_uint32 idx,
+//                                                             const ossimIpt& origin,
+//                                                             ossim_uint32 resLevel)
+// {
+//    theCurrentIndex  = idx;
+//    return getNextTile(returnedIdx, origin, resLevel);
+// }
+
+ossimRefPtr<ossimImageData> ossimImageCombiner::getNextTile(ossim_uint32& returnedIdx,
+                                                            const ossim_uint32 startIdx,
+                                                            const ossimIrect& tileRect,
+                                                            ossim_uint32 resLevel)
+{
+   theCurrentIndex = startIdx;   
+   return getNextTile(returnedIdx, tileRect, resLevel);
+}
+
+// ossimRefPtr<ossimImageData> ossimImageCombiner::getNextTile(ossim_uint32& returnedIdx,
+//                                                             const ossimIpt& origin,
+//                                                             ossim_uint32 resLevel)
+// {
+//    ossim_int32 w = getTileWidth();
+//    ossim_int32 h = getTileHeight();
+   
+//    return getNextTile(returnedIndex,
+//                       ossimIrect(origin.x,
+//                                  origin.y,
+//                                  origin.x + w-1,
+//                                  origin.y + h-1),
+//                       resLevel);
+// }
+
+ossimRefPtr<ossimImageData> ossimImageCombiner::getNextTile(ossim_uint32& returnedIdx,
+                                                            const ossimIrect& tileRect,
+                                                            ossim_uint32 resLevel)
+{
+   ossim_uint32 size = getNumberOfInputs();
+   if ( theCurrentIndex >= size)
+   {
+      return 0;
+   }
+   
+   if(theComputeFullResBoundsFlag)
+   {
+      precomputeBounds();
+   }
+   
+   ossimImageSource* temp = 0;
+   ossimRefPtr<ossimImageData> result = 0;
+   ossimDataObjectStatus status = OSSIM_NULL;
+
+   double scale = 1.0/std::pow(2.0, (double)resLevel);
+   ossimDpt scalar(scale, scale);
+
+   while( (theCurrentIndex<size) && !result)
+   {
+      ossimIrect rect = theFullResBounds[theCurrentIndex];
+      if(!rect.hasNans())
+      {
+         rect = rect * scalar;
+         temp = PTR_CAST(ossimImageSource,
+                         getInput(theCurrentIndex));
+         
+         if(rect.intersects(tileRect)&&temp)
+         {
+            result = temp->getTile(tileRect, resLevel);
+            status = (result.valid() ?
+                      result->getDataObjectStatus():OSSIM_NULL);
+            if((status == OSSIM_NULL)||
+               (status == OSSIM_EMPTY))
+            {
+               result = 0;
+            }
+         }
+         else
+         {
+            status = OSSIM_NULL;
+            result = 0;
+         }
+      }
+      else
+      {
+         status = OSSIM_NULL;
+         result = NULL;
+      }
+      
+      // Go to next source.
+      ++theCurrentIndex;
+   }
+   returnedIdx = theCurrentIndex;
+   if(result.valid())
+   {
+      --returnedIdx;
+   }
+
+   return result;
+}
+
+
+bool ossimImageCombiner::getNextTile(ossim_uint32& returnedIdx,
+                                     const ossim_uint32 startIdx,
+                                     ossimImageData* tile,
+                                     ossim_uint32 resLevel)
+{
+   if (!tile)
+      return false;
+
+   ossim_uint32 size = getNumberOfInputs();
+   theCurrentIndex = startIdx;
+
+   if(theComputeFullResBoundsFlag)
+      precomputeBounds();
+
+   ossimImageSource* temp = 0;
+   ossimDataObjectStatus status = OSSIM_NULL;
+
+   double scale = 1.0/std::pow(2.0, (double)resLevel);
+   ossimDpt scalar(scale, scale);
+
+   while( (theCurrentIndex<size))
+   {
+      ossimIrect rect = theFullResBounds[theCurrentIndex];
+      if(!rect.hasNans())
+      {
+         rect = rect * scalar;
+         temp = PTR_CAST(ossimImageSource,
+                         getInput(theCurrentIndex));
+
+         if(rect.intersects(tile->getImageRectangle()) && temp)
+         {
+            temp->getTile(tile, resLevel);
+            status = tile->getDataObjectStatus();
+            if((status != OSSIM_NULL) && (status != OSSIM_EMPTY))
+            {
+               break;
+            }
+         }
+      }
+
+      // Go to next source.
+      ++theCurrentIndex;
+   }
+
+   returnedIdx = theCurrentIndex;
+   if((status == OSSIM_NULL) || (status == OSSIM_EMPTY))
+   {
+      --returnedIdx;
+      return false;
+   }
+
+   return true;
+}
+
+
+// ossimRefPtr<ossimImageData> ossimImageCombiner::getNextNormTile(ossim_uint32& returnedIdx,
+//                                                                 ossim_uint32 index,
+//                                                                 const ossimIpt& origin,
+//                                                                 ossim_uint32 resLevel)
+// {
+//    theCurrentIndex = index;
+//    return getNextNormTile(returnedIdx, origin, resLevel);
+// }
+
+ossimRefPtr<ossimImageData> ossimImageCombiner::getNextNormTile(ossim_uint32& returnedIdx,
+                                                                const ossim_uint32 startIdx,
+                                                                const ossimIrect& tileRect,
+                                                                ossim_uint32 resLevel)
+{
+   theCurrentIndex = startIdx;
+   return getNextNormTile(returnedIdx, tileRect, resLevel);
+}
+
+// ossimRefPtr<ossimImageData> ossimImageCombiner::getNextNormTile(ossim_uint32& returnedIdx,
+//                                                                 const ossimIpt& origin,
+//                                                                 ossim_uint32 resLevel)
+// {
+//    ossim_int32 w = getTileWidth();
+//    ossim_int32 h = getTileHeight();
+   
+//    return getNextNormTile(returnedIdx,
+//                           ossimIrect(origin.x,
+//                                      origin.y,
+//                                      origin.x + w-1,
+//                                      origin.y + h-1),
+//                           resLevel);
+// }
+
+
+ossimRefPtr<ossimImageData> ossimImageCombiner::getNextNormTile(ossim_uint32& returnedIdx,
+                                                                const ossimIrect& tileRect,
+                                                                ossim_uint32 resLevel)
+{
+   ossim_uint32 size = getNumberOfInputs();
+
+   if(theCurrentIndex >= size)
+   {
+      return 0;
+   }
+   
+   if(!theNormTile)
+   {
+      theNormTile = new ossimImageData(this,
+                                       OSSIM_NORMALIZED_FLOAT);
+      theNormTile->initialize();
+   }
+
+   ossimRefPtr<ossimImageData> result = getNextTile(returnedIdx, tileRect, resLevel);
+
+   if(result.valid())
+   {
+      theNormTile->setImageRectangleAndBands(result->getImageRectangle(),
+                                             result->getNumberOfBands());
+      result->copyTileToNormalizedBuffer((float*)theNormTile->getBuf());
+
+      theNormTile->setDataObjectStatus(result->getDataObjectStatus());
+      result = theNormTile;
+   }
+   
+   return result;
+}
+
+ossim_uint32 ossimImageCombiner::getNumberOfOverlappingImages(const ossimIrect& rect,
+                                                              ossim_uint32 resLevel)const
+{
+   if(theComputeFullResBoundsFlag)
+   {
+      precomputeBounds();
+   }
+   double scale = 1.0/std::pow(2.0, (double)resLevel);
+   ossimDpt scalar(scale, scale);
+   ossim_uint32 result = 0;
+   ossim_uint32 maxIndex = getNumberOfInputs();
+   for(ossim_uint32 inputIndex = 0; inputIndex < maxIndex; ++inputIndex)
+   {
+      if(!theFullResBounds[inputIndex].hasNans())
+      {
+         ossimIrect boundingRect = theFullResBounds[inputIndex] * scalar;
+         if(rect.intersects(boundingRect))
+         {
+            ++result;
+         }
+      }
+   }
+   
+   return result;
+}
+
+void ossimImageCombiner::getOverlappingImages(std::vector<ossim_uint32>& result,
+					      const ossimIrect& rect,
+                                              ossim_uint32 resLevel)const
+{
+   if(theComputeFullResBoundsFlag)
+   {
+      precomputeBounds();
+   }
+   double scale = 1.0/std::pow(2.0, (double)resLevel);
+   ossimDpt scalar(scale, scale);
+   
+   ossim_uint32 inputIndex;
+   ossimIrect boundingRect;
+   for(inputIndex = 0; inputIndex < getNumberOfInputs(); ++inputIndex)
+   {
+      if(!theFullResBounds[inputIndex].hasNans())
+      {
+         boundingRect = theFullResBounds[inputIndex]*scalar;
+         if(rect.intersects(boundingRect))
+         {
+            result.push_back(inputIndex);
+         }
+      }
+   }
+}
+
+void ossimImageCombiner::connectInputEvent(ossimConnectionEvent& /* event */)
+{
+   initialize();
+}
+
+void ossimImageCombiner::disconnectInputEvent(ossimConnectionEvent& /* event */)
+{ 
+   initialize();
+}
+
+void ossimImageCombiner::propertyEvent(ossimPropertyEvent& /* event */)
+{
+   initialize();
+}
+
+void ossimImageCombiner::refreshEvent(ossimRefreshEvent& /* event */)
+{
+   initialize();
+}
+
+bool ossimImageCombiner::hasDifferentInputs()const
+{
+   return theHasDifferentInputs;
+}
+
+bool ossimImageCombiner::saveState(ossimKeywordlist& kwl,
+                                   const char* prefix) const
+{
+   return ossimImageSource::saveState(kwl, prefix);
+}
+
+bool ossimImageCombiner::canConnectMyInputTo(ossim_int32 /* inputIndex */,
+                                             const ossimConnectableObject* object)const
+{
+   return (object&& PTR_CAST(ossimImageSource, object));
+}
+
+void ossimImageCombiner::precomputeBounds()const
+{
+   
+   ossim_uint32 inputSize = getNumberOfInputs();
+
+   if(inputSize)
+   {
+      ossimImageSource* tempInterface=0;
+      if(theFullResBounds.size() != inputSize)
+      {
+         theFullResBounds.resize(inputSize);
+      }
+      for(ossim_uint32 inputIndex = 0; inputIndex < inputSize; ++inputIndex)
+      {
+         tempInterface = PTR_CAST(ossimImageSource, getInput(inputIndex));
+         if(tempInterface)
+         {
+            theFullResBounds[inputIndex] = tempInterface->getBoundingRect();
+         }
+         else
+         {
+            theFullResBounds[inputIndex].makeNan();
+         }
+      }
+      theComputeFullResBoundsFlag = false;
+   }
+   else
+   {
+      theFullResBounds.clear();
+   }
+}
diff --git a/ossim/src/ossim/imaging/ossimImageData.cpp b/ossim/src/ossim/imaging/ossimImageData.cpp
new file mode 100644
index 0000000..9c54c9d
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageData.cpp
@@ -0,0 +1,7326 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimImageData.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimErrorCodes.h>
+//#include <ossim/base/ossimErrorContext.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimHistogram.h>
+//#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimMultiBandHistogram.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimRtti.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+//#include <ossim/base/ossimSource.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <algorithm>
+#include <cstring>
+#include <fstream>
+#include <iostream>
+#include <iterator>
+//#include <ostream>
+
+
+RTTI_DEF1(ossimImageData, "ossimImageData", ossimRectilinearDataObject)
+
+ossimImageData::ossimImageData()
+   : ossimRectilinearDataObject(2,            // 2d
+                                0,         // owner
+                                1,            // bands
+                                OSSIM_UINT8), // scalar
+     m_nullPixelValue(0),
+     m_minPixelValue(0),
+     m_maxPixelValue(0),
+     m_alpha(0),
+     m_origin(0, 0),
+     m_indexedFlag(false)
+{
+   ossimIpt tileSize;
+   ossim::defaultTileSize(tileSize);
+   m_spatialExtents[0] = tileSize.x;
+   m_spatialExtents[1] = tileSize.y;
+   initializeDefaults();
+}
+
+ossimImageData::ossimImageData(ossimSource*    owner,
+                               ossimScalarType scalar,
+                               ossim_uint32    bands)
+   : ossimRectilinearDataObject(2,
+                                owner,
+                                bands,
+                                scalar),
+     m_nullPixelValue(0),
+     m_minPixelValue(0),
+     m_maxPixelValue(0),
+     m_alpha(0),
+     m_origin(0, 0),
+     m_indexedFlag(false)
+{
+   ossimIpt tileSize;
+   ossim::defaultTileSize(tileSize);
+   m_spatialExtents[0] = tileSize.x;
+   m_spatialExtents[1] = tileSize.y;
+   initializeDefaults();
+}
+
+ossimImageData::ossimImageData(ossimSource* owner,
+                               ossimScalarType scalar,
+                               ossim_uint32 bands,
+                               ossim_uint32 width,
+                               ossim_uint32 height)
+   : ossimRectilinearDataObject(owner,
+                               bands,
+                               width, // 2-D array
+                               height,
+                               scalar),
+     m_nullPixelValue(0),
+     m_minPixelValue(0),
+     m_maxPixelValue(0),
+     m_alpha(0),
+     m_origin(0, 0),
+     m_indexedFlag(false)
+{   
+   m_spatialExtents[0] = width;
+   m_spatialExtents[1] = height;
+   initializeDefaults();
+}
+
+ossimImageData::ossimImageData(const ossimImageData &rhs)
+   : ossimRectilinearDataObject(rhs),
+     m_nullPixelValue(rhs.m_nullPixelValue),
+     m_minPixelValue(rhs.m_minPixelValue),
+     m_maxPixelValue(rhs.m_maxPixelValue),
+     m_alpha(rhs.m_alpha),
+     m_origin(rhs.m_origin),
+     m_indexedFlag(rhs.m_indexedFlag)
+{
+}
+
+const ossimImageData& ossimImageData::operator=(const ossimImageData& rhs)
+{
+   if (this != &rhs)
+   {
+      // ossimRectilinearDataObject initialization:
+      ossimRectilinearDataObject::operator=(rhs);
+      
+      // ossimImageData (this) members:
+      m_nullPixelValue = rhs.m_nullPixelValue;
+      m_minPixelValue  = rhs.m_minPixelValue;
+      m_maxPixelValue  = rhs.m_maxPixelValue;
+      m_alpha          = rhs.m_alpha;
+      m_origin         = rhs.m_origin;
+      m_indexedFlag    = rhs.m_indexedFlag;
+   }
+   return *this;
+}
+
+ossimImageData::~ossimImageData()
+{
+}
+
+bool ossimImageData::isValidBand(ossim_uint32 band) const
+{
+   return (band<getNumberOfDataComponents());
+}
+
+ossim_uint32 ossimImageData::getSize() const
+{
+   return (getSizePerBand() * getNumberOfDataComponents());
+}
+
+ossim_uint32 ossimImageData::getSizePerBand() const
+{
+   return (getHeight() * getWidth());
+}
+
+ossim_uint32 ossimImageData::getSizeInBytes() const
+{
+   return (getSizePerBandInBytes() * getNumberOfDataComponents());
+}
+
+ossim_uint32 ossimImageData::getSizePerBandInBytes() const
+{
+   return (getHeight() * getWidth() * getScalarSizeInBytes());
+}
+
+const ossim_uint8* ossimImageData::getAlphaBuf() const
+{
+   if (m_alpha.size() > 0)
+   {
+      return &m_alpha.front();
+   }
+   return 0;
+}
+
+ossim_uint8* ossimImageData::getAlphaBuf()
+{
+   if (m_alpha.size() > 0)
+   {
+      return &m_alpha.front();
+   }
+   return 0;
+}
+
+const void* ossimImageData::getBuf() const
+{
+   if (m_dataBuffer.size() > 0)
+   {
+      return static_cast<const void*>(&m_dataBuffer.front());
+   }
+   return 0;
+}
+
+void* ossimImageData::getBuf()
+{
+   if (m_dataBuffer.size() > 0)
+   {
+      return static_cast<void*>(&m_dataBuffer.front());
+   }
+   return 0;
+}
+
+const void* ossimImageData::getBuf(ossim_uint32 band) const
+{
+   const ossim_uint8* b = static_cast<const ossim_uint8*>(getBuf());
+   
+   if (isValidBand(band) && b != 0)
+   {
+      b += (band * getSizePerBandInBytes());
+      return static_cast<const void*>(b);
+   }
+   return 0;
+}
+
+void* ossimImageData::getBuf(ossim_uint32 band)
+{
+   ossim_uint8* b = static_cast<ossim_uint8*>(getBuf());
+   
+   if (isValidBand(band) && b != 0)
+   {
+      b += (band * getSizePerBandInBytes());
+      return static_cast<void*>(b);
+   }
+   return 0;
+}
+
+const ossim_uint8* ossimImageData::getUcharBuf() const
+{
+   if (m_scalarType == OSSIM_UINT8)
+   {
+      return static_cast<const ossim_uint8*>(getBuf());
+   }
+   return 0;
+}
+
+const ossim_uint16* ossimImageData::getUshortBuf() const
+{
+   if (m_scalarType == OSSIM_UINT16 ||
+       m_scalarType == OSSIM_USHORT11)
+   {
+      return static_cast<const ossim_uint16*>(getBuf());
+   }
+   return 0;
+}
+
+const ossim_sint16* ossimImageData::getSshortBuf() const
+{
+   if (m_scalarType == OSSIM_SINT16)
+   {
+      return static_cast<const ossim_sint16*>(getBuf());
+   }
+   return 0;
+}
+
+const ossim_float32* ossimImageData::getFloatBuf() const
+{
+   if (m_scalarType == OSSIM_FLOAT32 ||
+       m_scalarType == OSSIM_NORMALIZED_FLOAT)
+   {
+      return static_cast<const ossim_float32*>(getBuf());
+   }
+   return 0;
+}
+
+const ossim_float64* ossimImageData::getDoubleBuf() const
+{
+   if (m_scalarType == OSSIM_FLOAT64 ||
+       m_scalarType == OSSIM_NORMALIZED_DOUBLE)
+   {
+      return static_cast<const ossim_float64*>(getBuf());
+   }
+   return 0;
+}
+
+ossim_uint8* ossimImageData::getUcharBuf() 
+{
+   if (m_scalarType == OSSIM_UINT8)
+   {
+      return static_cast<ossim_uint8*>(getBuf());
+   }
+   return 0;
+}
+
+ossim_uint16* ossimImageData::getUshortBuf() 
+{
+   if (m_scalarType == OSSIM_UINT16 ||
+       m_scalarType == OSSIM_USHORT11)
+   {
+      return static_cast<ossim_uint16*>(getBuf());
+   }
+   return 0;
+}
+
+ossim_sint16* ossimImageData::getSshortBuf() 
+{
+   if (m_scalarType == OSSIM_SINT16)
+   {
+      return static_cast<ossim_sint16*>(getBuf());
+   }
+   return 0;
+}
+
+ossim_float32* ossimImageData::getFloatBuf() 
+{
+   if (m_scalarType == OSSIM_FLOAT32 ||
+       m_scalarType == OSSIM_NORMALIZED_FLOAT)
+   {
+      return static_cast<ossim_float32*>(getBuf());
+   }
+   return 0;
+}
+
+ossim_float64* ossimImageData::getDoubleBuf() 
+{
+   if (m_scalarType == OSSIM_FLOAT64 ||
+       m_scalarType == OSSIM_NORMALIZED_DOUBLE)
+   {
+      return static_cast<ossim_float64*>(getBuf());
+   }
+   return 0;
+}
+
+const ossim_uint8* ossimImageData::getUcharBuf(ossim_uint32 band) const
+{
+   if (m_scalarType == OSSIM_UINT8)
+   {
+      return static_cast<const ossim_uint8*>(getBuf(band));
+   }
+   return 0;
+}
+
+const ossim_uint16* ossimImageData::getUshortBuf(ossim_uint32 band) const
+{
+   if (m_scalarType == OSSIM_UINT16 ||
+       m_scalarType == OSSIM_USHORT11)
+   {
+      return static_cast<const ossim_uint16*>(getBuf(band));
+   }
+   return 0;
+}
+
+const ossim_sint16* ossimImageData::getSshortBuf(ossim_uint32 band) const
+{
+   if (m_scalarType == OSSIM_SINT16)
+   {
+      return static_cast<const ossim_sint16*>(getBuf(band));
+   }
+   return 0;
+}
+
+const ossim_float32* ossimImageData::getFloatBuf(ossim_uint32 band) const
+{
+   if (m_scalarType == OSSIM_FLOAT32 ||
+       m_scalarType == OSSIM_NORMALIZED_FLOAT)
+   {
+      return static_cast<const ossim_float32*>(getBuf(band));
+   }
+   return 0;
+}
+
+const ossim_float64* ossimImageData::getDoubleBuf(ossim_uint32 band) const
+{
+   if (m_scalarType == OSSIM_FLOAT64 ||
+       m_scalarType == OSSIM_NORMALIZED_DOUBLE)
+   {
+      return static_cast<const ossim_float64*>(getBuf(band));
+   }
+   return 0;
+}
+
+ossim_uint8* ossimImageData::getUcharBuf(ossim_uint32 band) 
+{
+   if (m_scalarType == OSSIM_UINT8)
+   {
+      return static_cast<ossim_uint8*>(getBuf(band));
+   }
+   return 0;
+}
+
+ossim_uint16* ossimImageData::getUshortBuf(ossim_uint32 band) 
+{
+   if (m_scalarType == OSSIM_UINT16 ||
+       m_scalarType == OSSIM_USHORT11)
+   {
+      return static_cast<ossim_uint16*>(getBuf(band));
+   }
+   return 0;
+}
+
+ossim_sint16* ossimImageData::getSshortBuf(ossim_uint32 band) 
+{
+   if (m_scalarType == OSSIM_SINT16)
+   {
+      return static_cast<ossim_sint16*>(getBuf(band));
+   }
+   return 0;
+}
+
+ossim_float32* ossimImageData::getFloatBuf(ossim_uint32 band) 
+{
+   if (m_scalarType == OSSIM_FLOAT32 ||
+       m_scalarType == OSSIM_NORMALIZED_FLOAT)
+   {
+      return static_cast<ossim_float32*>(getBuf(band));
+   }
+   return 0;
+}
+
+ossim_float64* ossimImageData::getDoubleBuf(ossim_uint32 band) 
+{
+   if (m_scalarType == OSSIM_FLOAT64 ||
+       m_scalarType == OSSIM_NORMALIZED_DOUBLE)
+   {
+      return static_cast<ossim_float64*>(getBuf(band));
+   }
+   return 0;
+}
+
+void ossimImageData::getNormalizedFloat(ossim_uint32 offset,
+                                        ossim_uint32 bandNumber,
+                                        ossim_float32& result)const
+{
+   // Make sure that the types and width and height are good.
+   if( (getDataObjectStatus() != OSSIM_NULL) && (bandNumber < getNumberOfDataComponents()) )
+   {
+      ossim_float32 p = 0.0;
+
+      switch (getScalarType())
+      {
+         case OSSIM_UINT8:
+         {
+            const unsigned char* sourceBuf = getUcharBuf(bandNumber);
+            p = sourceBuf[offset];
+            break;
+         }
+         case OSSIM_SINT8:
+         {
+            const ossim_sint8* sourceBuf = static_cast<const ossim_sint8*>(getBuf(bandNumber));
+            p = sourceBuf[offset];
+            break;
+         }
+         case OSSIM_USHORT11:
+         case OSSIM_UINT16:
+         {
+            const ossim_uint16* sourceBuf = getUshortBuf(bandNumber);
+            p = sourceBuf[offset];
+            break;
+         }
+         case OSSIM_SINT16:
+         {
+            const ossim_sint16* sourceBuf = getSshortBuf(bandNumber);
+            p = sourceBuf[offset];
+            break;
+         }
+         case OSSIM_UINT32:
+         {
+            const ossim_uint32* sourceBuf =
+               static_cast<const ossim_uint32*>(getBuf(bandNumber));
+            p = sourceBuf[offset];
+            break;
+         }
+         case OSSIM_SINT32:
+         {
+            const ossim_sint32* sourceBuf = static_cast<const ossim_sint32*>(getBuf(bandNumber));
+            p = sourceBuf[offset];
+            break;
+         }
+         case OSSIM_NORMALIZED_FLOAT:
+         case OSSIM_FLOAT32:
+         {
+            const ossim_float32* sourceBuf = getFloatBuf(bandNumber);
+            p = sourceBuf[offset];
+            break;
+         }
+         case OSSIM_FLOAT64:
+         case OSSIM_NORMALIZED_DOUBLE:
+         {
+            const ossim_float64* sourceBuf = getDoubleBuf(bandNumber);
+            p = sourceBuf[offset];
+            break;
+         }
+         case OSSIM_SCALAR_UNKNOWN:
+         default:
+         {
+            // Shouldn't hit this.
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimImageData::setNormalizedFloat Unsupported scalar type!"
+               << std::endl;
+         }
+         
+      } // Matches: switch (getScalarType())
+
+      if ( p != m_nullPixelValue[bandNumber] )
+      {
+         const ossim_float32 DELTA = m_maxPixelValue[bandNumber] - m_minPixelValue[bandNumber] - 1;
+         const ossim_float32 OFFSET_TO_ONE = 1 - m_minPixelValue[bandNumber];
+         
+         result = ( p <= m_maxPixelValue[bandNumber] ) ?
+            ( ( p >= m_minPixelValue[bandNumber] ) ? ( p + OFFSET_TO_ONE ) / DELTA : 0.0 ) : 1.0;
+      }
+      else
+      {
+         result = 0.0;
+      }
+      
+   } // Matches: if( (getDataObjectStatus() ...
+   
+} // End: ossimImageData::getNormalizedFloat
+
+void ossimImageData::setNormalizedFloat(ossim_uint32 offset,
+                                        ossim_uint32 bandNumber,
+                                        ossim_float32 inputValue)
+{
+   // Make sure that the types and width and height are good.
+   if( (getDataObjectStatus() != OSSIM_NULL) && (bandNumber < getNumberOfDataComponents()) )
+   {
+
+      ossim_float32 p = 0.0;
+
+      if ( inputValue )
+      {
+         const ossim_float32 DELTA = m_maxPixelValue[bandNumber] - m_minPixelValue[bandNumber] - 1;
+         const ossim_float32 OFFSET_TO_MIN = m_minPixelValue[bandNumber] - 1;
+         p = inputValue * DELTA + OFFSET_TO_MIN + 0.5;
+         if ( p > m_maxPixelValue[bandNumber] )
+         {
+            p = m_maxPixelValue[bandNumber];
+         }
+      }
+      else
+      {
+         p = m_nullPixelValue[bandNumber];
+      }
+   
+      switch (getScalarType())
+      {
+         case OSSIM_UINT8:
+         {
+            unsigned char* sourceBuf = getUcharBuf(bandNumber);
+            sourceBuf[offset] = static_cast<ossim_uint8>( p );
+            break;
+         }
+         case OSSIM_SINT8:
+         {
+            ossim_sint8* sourceBuf = static_cast<ossim_sint8*>(getBuf(bandNumber));
+            sourceBuf[offset] = static_cast<ossim_sint8>( p );
+            break;
+         }
+         case OSSIM_USHORT11:
+         case OSSIM_UINT16:
+         {
+            ossim_uint16* sourceBuf = getUshortBuf(bandNumber);
+            sourceBuf[offset] = static_cast<ossim_uint16>( p );
+            break;
+         }
+         case OSSIM_SINT16:
+         {
+            ossim_sint16* sourceBuf = getSshortBuf(bandNumber);
+            sourceBuf[offset] = static_cast<ossim_sint16>( p );
+            break;
+         }
+         case OSSIM_UINT32:
+         {
+            ossim_uint32* sourceBuf = static_cast<ossim_uint32*>(getBuf(bandNumber));
+            sourceBuf[offset] = static_cast<ossim_uint32>( p );
+            break;
+         }
+         case OSSIM_SINT32:
+         {
+            ossim_sint32* sourceBuf = static_cast<ossim_sint32*>(getBuf(bandNumber));
+            sourceBuf[offset] = static_cast<ossim_sint32>( p );
+            break;
+         }
+         case OSSIM_NORMALIZED_FLOAT:
+         case OSSIM_FLOAT32:
+         {
+            ossim_float32* sourceBuf = getFloatBuf(bandNumber);
+            sourceBuf[offset] = p;
+            break;
+         }
+         case OSSIM_FLOAT64:
+         case OSSIM_NORMALIZED_DOUBLE:
+         {
+            ossim_float64* sourceBuf = getDoubleBuf(bandNumber);
+            sourceBuf[offset] = p;
+            break;
+         }
+         case OSSIM_SCALAR_UNKNOWN:
+         default:
+            // Shouldn't hit this.
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimImageData::setNormalizedFloat Unsupported scalar type!"
+               << std::endl;
+            
+      } // Matches: switch (getScalarType())
+
+   } // Matches: if( (getDataObjectStatus() ...
+   
+} // End: ossimImageData::setNormalizedFloat
+
+void ossimImageData::convertToNormalizedFloat(ossimImageData* result)const
+{
+   if(!result)
+   {
+      return;
+   }
+   // make sure that the types and width and height are
+   // good.
+   if( (result->getScalarType() != OSSIM_NORMALIZED_FLOAT) ||
+       (result->getNumberOfBands() != this->getNumberOfBands())||
+       (result->getWidth() != this->getWidth()) ||
+       (result->getHeight() != this->getHeight())||
+       (result->getDataObjectStatus() == OSSIM_NULL) ||
+       (getDataObjectStatus() == OSSIM_NULL))
+   {
+      return;
+   }
+
+   copyTileToNormalizedBuffer((ossim_float32*)result->getBuf());
+   result->setDataObjectStatus(getDataObjectStatus());
+}
+
+ossimRefPtr<ossimImageData> ossimImageData::newNormalizedFloat()const
+{
+   ossimRefPtr<ossimImageData> result =
+      new ossimImageData(0,
+                         OSSIM_NORMALIZED_FLOAT,
+                         this->getNumberOfBands(),
+                         this->getWidth(),
+                         this->getHeight());
+   
+   result->initialize();
+   
+   convertToNormalizedFloat(result.get());
+   
+   return result;
+}
+
+void ossimImageData::convertToNormalizedDouble(ossimImageData* result)const
+{
+   if(!result)
+   {
+      return;
+   }
+   // make sure that the types and width and height are
+   // good.
+   if( (result->getScalarType() != OSSIM_NORMALIZED_DOUBLE) ||
+       (result->getNumberOfBands() != this->getNumberOfBands())||
+       (result->getWidth() != this->getWidth()) ||
+       (result->getHeight() != this->getHeight())||
+       (result->getDataObjectStatus() == OSSIM_NULL) ||
+       (getDataObjectStatus() == OSSIM_NULL))
+   {
+      return;
+   }
+
+   copyTileToNormalizedBuffer((ossim_float64*)result->getBuf());
+   result->setDataObjectStatus(getDataObjectStatus());
+}
+
+ossimImageData* ossimImageData::newNormalizedDouble()const
+{
+   ossimImageData* result = new ossimImageData(0,
+                                               OSSIM_NORMALIZED_DOUBLE,
+                                               this->getNumberOfBands(),
+                                               this->getWidth(),
+                                               this->getHeight());
+   result->initialize();
+
+   convertToNormalizedDouble(result);
+   
+   return result;   
+}
+
+
+void ossimImageData::unnormalizeInput(ossimImageData* normalizedInput)
+{
+   if((normalizedInput->getScalarType() != OSSIM_NORMALIZED_FLOAT) &&
+      (normalizedInput->getScalarType() != OSSIM_NORMALIZED_DOUBLE) )
+   {
+      //ERROR
+      return;
+   }
+
+   if(normalizedInput->getScalarType() == OSSIM_NORMALIZED_DOUBLE)
+   {
+      copyNormalizedBufferToTile((ossim_float64*)normalizedInput->getBuf());
+   }
+   else
+   {
+      copyNormalizedBufferToTile((ossim_float32*)normalizedInput->getBuf());
+   }
+}
+
+ossim_float64 ossimImageData::computeMeanSquaredError(
+   ossim_float64 meanValue,
+   ossim_uint32 bandNumber) const
+{
+   ossim_float64 result = -1; // invalid MSE
+   
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         result = computeMeanSquaredError(ossim_uint8(0),
+                                          meanValue,
+                                          bandNumber);
+         break;
+      }
+      case OSSIM_SINT8:
+      {
+         result = computeMeanSquaredError(ossim_sint8(0),
+                                          meanValue,
+                                          bandNumber);
+         break;
+      }
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+      {
+         result = computeMeanSquaredError(ossim_uint16(0),
+                                          meanValue,
+                                          bandNumber);
+         break;
+      }  
+      case OSSIM_SINT16:
+      {
+         result = computeMeanSquaredError(ossim_sint16(0),
+                                          meanValue,
+                                          bandNumber);
+         break;
+      }  
+      case OSSIM_UINT32:
+      {
+         result = computeMeanSquaredError(ossim_uint32(0),
+                                          meanValue,
+                                          bandNumber);
+         break;
+      }  
+      case OSSIM_SINT32:
+      {
+         result = computeMeanSquaredError(ossim_sint32(0),
+                                          meanValue,
+                                          bandNumber);
+         break;
+      }  
+      case OSSIM_FLOAT32:
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         result = computeMeanSquaredError(ossim_float32(0.0),
+                                          meanValue,
+                                          bandNumber);
+         break;
+      }  
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+      {
+         result = computeMeanSquaredError(ossim_float64(0.0),
+                                          meanValue,
+                                          bandNumber);
+         break;
+      }  
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         setDataObjectStatus(OSSIM_STATUS_UNKNOWN);
+         ossimSetError(getClassName(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "ossimImageData::computeMeanSquaredError File %s line %d\n\
+Invalid scalar type:  %d",
+                       __FILE__,
+                       __LINE__,
+                       getScalarType());
+         break;
+      }
+   }
+
+   return result;
+}
+   
+template <class T> ossim_float64 ossimImageData::computeMeanSquaredError(
+   T, /* dummyTemplate */
+   ossim_float64 meanValue,
+   ossim_uint32 bandNumber) const
+{
+   ossim_float64  result               = -1.0; // invalid MSE
+
+   if ( (getDataObjectStatus() == OSSIM_NULL) ||
+        (getDataObjectStatus() == OSSIM_EMPTY) )
+   {
+      return result;
+   }
+   
+   ossim_uint32  index           = 0;
+   ossim_float64 delta           = 0.0;
+   ossim_uint32  validPixelCount = 0;
+
+   const T* BUFFER = static_cast<const T*>(getBuf(bandNumber));
+   if(BUFFER)
+   {
+      const ossim_uint32 BOUNDS = getSizePerBand();
+      for(index = 0; index < BOUNDS; ++index)
+      {
+         if(!isNull(index))
+         {
+            delta = BUFFER[index] - meanValue;
+            result += (delta*delta);
+            ++validPixelCount;
+         }
+      }
+      if(validPixelCount > 0)
+      {
+         result /= validPixelCount;
+      }
+   }
+
+   return result;
+}
+
+
+//******************************************************************
+//
+// NOTE: I was checking for null and not adding it to the histogram.
+//       this was messing up the equalization algorithms since the
+//       accumulation histogram did not represent the area of the
+//       image.  For now I will leave out the check for "is null" and
+//       add this to the count so that the total accumulation is the
+//       area of the image.
+//
+//******************************************************************
+void ossimImageData::populateHistogram(ossimRefPtr<ossimMultiBandHistogram> histo)
+{
+   ossim_uint32 numberOfBands = getNumberOfBands();
+
+   if( (getDataObjectStatus() == OSSIM_NULL) ||
+       (getDataObjectStatus() == OSSIM_EMPTY)||
+       (!histo))
+   {
+      return;
+   }
+   switch(getScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
+         {
+            ossimRefPtr<ossimHistogram> currentHisto = histo->getHistogram(band);
+            if(currentHisto.valid())
+            {
+               float* histoBins = currentHisto->GetCounts();
+               int binCount = currentHisto->GetRes();
+               ossim_uint8* buffer = (ossim_uint8*)getBuf(band);
+               ossim_uint32 upperBound = getWidth()*getHeight();
+               if ( binCount == 256 )
+               {
+                  for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+                  {
+                     ++histoBins[ buffer[offset] ];
+                  }
+               }
+               else
+               {
+                 for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+                  {
+                     currentHisto->UpCount((float)buffer[offset]);
+                  }
+               }
+            }
+         }
+         break;
+      }
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+      {
+         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
+         {
+            ossimRefPtr<ossimHistogram> currentHisto = histo->getHistogram(band);
+	 
+             ossim_uint16* buffer = (ossim_uint16*)getBuf(band);
+             if(currentHisto.valid())
+             {
+                ossim_uint32 upperBound = getWidth()*getHeight();
+                for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+                {
+                  currentHisto->UpCount((float)buffer[offset]);
+                }
+             }
+         }
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
+         {
+            ossimRefPtr<ossimHistogram> currentHisto = histo->getHistogram(band);
+            ossim_sint16* buffer = (ossim_sint16*)getBuf(band);
+            
+            if(currentHisto.valid())
+            {
+               ossim_uint32 upperBound = getWidth()*getHeight();
+               for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+               {
+                  currentHisto->UpCount((float)buffer[offset]);
+               }
+            }
+         }
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
+         {
+            ossimRefPtr<ossimHistogram> currentHisto = histo->getHistogram(band);
+            ossim_sint32* buffer = (ossim_sint32*)getBuf(band);
+            
+            if(currentHisto.valid())
+            {
+               ossim_uint32 upperBound = getWidth()*getHeight();
+               for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+               {
+                  currentHisto->UpCount((float)buffer[offset]);
+               }
+            }
+         }
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
+         {
+            ossimRefPtr<ossimHistogram> currentHisto = histo->getHistogram(band);
+            ossim_uint32* buffer = (ossim_uint32*)getBuf(band);
+            
+            if(currentHisto.valid())
+            {
+               ossim_uint32 upperBound = getWidth()*getHeight();
+               for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+               {
+                  currentHisto->UpCount((float)buffer[offset]);
+               }
+            }
+         }
+         break;
+      }
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+      {
+         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
+         {
+            ossimRefPtr<ossimHistogram> currentHisto = histo->getHistogram(band);
+            ossim_float64* buffer = (ossim_float64*)getBuf(band);
+            
+            if(currentHisto.valid())
+            {
+               ossim_uint32 upperBound = getWidth()*getHeight();
+               for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+               {
+                  currentHisto->UpCount((float)buffer[offset]);
+               }
+            }
+         }
+         break;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+      {
+         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
+         {
+            ossimRefPtr<ossimHistogram> currentHisto = histo->getHistogram(band);
+            ossim_float32* buffer = (ossim_float32*)getBuf(band);
+            
+            if(currentHisto.valid())
+            {
+               ossim_uint32 upperBound = getWidth()*getHeight();
+               for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+               {
+                  currentHisto->UpCount((float)buffer[offset]);
+               }
+            }
+         }
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         //ERROR
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimImageData::populateHistogram\n"
+            << "Unknown scalar type." << std::endl;
+      }
+   }  // end of switch
+}
+
+ossim_float64 ossimImageData::computeAverageBandValue(ossim_uint32 bandNumber) const
+{
+   ossim_float64 result = 0.0;
+   
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         result = computeAverageBandValue(ossim_uint8(0),
+                                          bandNumber);
+         break;
+      }  
+      case OSSIM_SINT8:
+      {
+         result = computeAverageBandValue(ossim_sint8(0),
+                                          bandNumber);
+         break;
+      }  
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+      {
+         result = computeAverageBandValue(ossim_uint16(0),
+                                          bandNumber);
+         break;
+      }  
+      case OSSIM_SINT16:
+      {
+         result = computeAverageBandValue(ossim_sint16(0),
+                                          bandNumber);
+         break;
+      }  
+      case OSSIM_UINT32:
+      {
+         result = computeAverageBandValue(ossim_uint32(0),
+                                          bandNumber);
+         break;
+      }  
+      case OSSIM_SINT32:
+      {
+         result = computeAverageBandValue(ossim_sint32(0),
+                                          bandNumber);
+         break;
+      }  
+      case OSSIM_FLOAT32:
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         result = computeAverageBandValue(ossim_float32(0.0),
+                                          bandNumber);
+         break;
+      }  
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+      {
+         result = computeAverageBandValue(ossim_float64(0.0),
+                                          bandNumber);
+         break;
+      }  
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         setDataObjectStatus(OSSIM_STATUS_UNKNOWN);
+         ossimSetError(getClassName(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "ossimImageData::computeAverageBandValue File %s line %d\n\
+Invalid scalar type:  %d",
+                       __FILE__,
+                       __LINE__,
+                       getScalarType());
+         break;
+      }
+   }
+
+   return result;
+}
+
+template <class T> ossim_float64 ossimImageData::computeAverageBandValue(
+   T, /* dummy */
+   ossim_uint32 bandNumber) const
+{
+   ossim_float64  result = 0.0;
+
+   if ( (getDataObjectStatus() == OSSIM_NULL) ||
+        (getDataObjectStatus() == OSSIM_EMPTY) )
+   {
+      return result;
+   }
+   
+   ossim_uint32 index = 0;
+   ossim_uint32 validPixelCount = 0;
+
+   const T* BUFFER = static_cast<const T*>(getBuf(bandNumber));
+   if(BUFFER)
+   {
+      const ossim_uint32 BOUNDS = getSizePerBand();
+      for(index = 0; index < BOUNDS; ++index)
+      {
+         if(!isNull(index))
+         {
+            result += BUFFER[index];
+            ++validPixelCount;
+         }
+      }
+      if(validPixelCount > 0)
+      {
+         result /= validPixelCount;
+      }
+   }
+
+   return result;
+}
+
+ossimDataObjectStatus ossimImageData::validate() const
+{
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         return validate(ossim_uint8(0));
+      }
+      case OSSIM_SINT8:
+      {
+         return validate(ossim_sint8(0));
+      }
+         
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+      {
+         return validate(ossim_uint16(0));
+      }  
+      case OSSIM_SINT16:
+      {
+         return validate(ossim_sint16(0));
+      }
+         
+      case OSSIM_UINT32:
+      {
+         return validate(ossim_uint32(0));
+      }  
+      case OSSIM_SINT32:
+      {
+         return validate(ossim_sint32(0));
+      }  
+      case OSSIM_FLOAT32:
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         return validate(ossim_float32(0.0));
+      }
+         
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+      {
+         return validate(ossim_float64(0.0));
+      }  
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         setDataObjectStatus(OSSIM_STATUS_UNKNOWN);
+         break;
+      }
+   }
+
+   return OSSIM_STATUS_UNKNOWN;
+}
+
+template <class T>
+ossimDataObjectStatus ossimImageData::validate(T /* dummyTemplate */ ) const
+{
+   if (m_dataBuffer.size() == 0)
+   {
+      setDataObjectStatus(OSSIM_NULL);
+      m_percentFull = 0;
+      return OSSIM_NULL;
+   }
+
+   ossim_uint32       count           = 0;
+   const ossim_uint32 SIZE            = getSize();
+   const ossim_uint32 BOUNDS          = getSizePerBand();
+   const ossim_uint32 NUMBER_OF_BANDS = getNumberOfBands();
+   
+   for(ossim_uint32 band = 0; band < NUMBER_OF_BANDS; ++band)
+   {
+      const T NP = static_cast<T>(m_nullPixelValue[band]);
+      const T* p = static_cast<const T*>(getBuf(band));
+      
+      for (ossim_uint32 i = 0; i < BOUNDS; ++i)
+      {
+         // check if the band is null
+         if (p[i] != NP) ++count;         
+      }
+   }
+
+   if (!count)
+   {
+      setDataObjectStatus(OSSIM_EMPTY);
+      m_percentFull = 0;
+   }
+   else if (count == SIZE)
+   {
+      setDataObjectStatus(OSSIM_FULL);
+      m_percentFull = 100;
+   }
+   else
+   {
+      setDataObjectStatus(OSSIM_PARTIAL);
+      m_percentFull = 100.0 * count / SIZE;
+   }
+   return getDataObjectStatus();
+}
+
+void ossimImageData::makeBlank()
+{
+   if ( (m_dataBuffer.size() == 0) || (getDataObjectStatus() == OSSIM_EMPTY) )
+   {
+      return; // nothing to do...
+   }
+
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         makeBlank(ossim_uint8(0));
+         return;
+      }  
+      case OSSIM_SINT8:
+      {
+         makeBlank(ossim_sint8(0));
+         return;
+      }  
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+      {
+         makeBlank(ossim_uint16(0));
+         return;
+      }  
+      case OSSIM_SINT16:
+      {
+         makeBlank(ossim_sint16(0));
+         return;
+      }  
+      case OSSIM_UINT32:
+      {
+         makeBlank(ossim_uint32(0));
+         return;
+      }
+      case OSSIM_SINT32:
+      {
+         makeBlank(ossim_sint32(0));
+         return;
+      }  
+      case OSSIM_FLOAT32:
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         makeBlank(ossim_float32(0.0));
+         return;
+      }  
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+      {
+         makeBlank(ossim_float64(0.0));
+         return;
+      }  
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         setDataObjectStatus(OSSIM_STATUS_UNKNOWN);
+         ossimSetError(getClassName(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "ossimImageData::makeBlank File %s line %d\n\
+Invalid scalar type:  %d",
+                       __FILE__,
+                       __LINE__,
+                       getScalarType());
+         break;
+      }
+   }
+}
+
+template <class T> void ossimImageData::makeBlank(T /* dummyTemplate */ )
+{
+   // Note: Empty buffer or already OSSIM_EMPTY checked in public method.
+   
+   const ossim_uint32 BANDS = getNumberOfBands();
+   const ossim_uint32 SPB   = getSizePerBand();
+   ossim_uint32 sizePerBandInBytes = getSizePerBandInBytes();
+   for(ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      const T NP = static_cast<T>(m_nullPixelValue[band]);
+      if(NP == 0.0)
+      {
+         // do an optimize byte fill
+         memset(getBuf(band), '\0', sizePerBandInBytes);
+      }
+      else
+      {
+         // slower assign call
+         T* p = static_cast<T*>(getBuf(band));
+         for (ossim_uint32 i = 0; i < SPB; ++i)
+         {
+            p[i] = NP;
+         }
+      }
+   }
+   
+   setDataObjectStatus(OSSIM_EMPTY);
+}
+
+void ossimImageData::initialize()
+{
+   // let the base class allocate a buffer
+   ossimRectilinearDataObject::initialize();
+   
+   if (m_dataBuffer.size() > 0)
+   {
+      makeBlank();  // Make blank will set the status.
+   }
+}
+
+// Write the tile out to disk with a general raster header file.
+bool ossimImageData::write(const ossimFilename& f) const
+{
+   bool result = false;
+
+   std::ofstream os;
+   os.open(f.c_str(), ios::out | ios::binary);
+   if (os.good())
+   {
+      // Write the tile out.
+      os.write(static_cast<const char*>(getBuf()),
+               static_cast<std::streamsize>(getSizeInBytes()));
+      
+      result = os.good();
+      if (result)
+      {
+         // Write a header file that we can use to read the tile.
+         os.close();
+         ossimFilename hdrFile = f;
+         hdrFile.setExtension("hdr");
+         os.open(hdrFile.c_str(), ios::out);
+         result = os.good();
+         if (result)
+         {
+            os << "filename: " << f.c_str()
+               << "\nimage_type:  general_raster_bsq"
+               << "\nindexed: " << m_indexedFlag               
+               << "\ninterleave_type:  bsq"
+               << "\norigin: " << m_origin
+               << "\nnumber_bands: " << ossimString::toString(getNumberOfBands())
+               << "\nnumber_lines: " << ossimString::toString(getHeight())
+               << "\nnumber_samples: " << ossimString::toString(getWidth())
+               << "\nscalar_type: "
+               << ossimScalarTypeLut::instance()->getEntryString(getScalarType())
+               << "\n";
+            for(ossim_uint32 band=0; band < getNumberOfBands(); ++band)
+            {
+               ossimString bs = "band";
+               bs += ossimString::toString(band+1); 
+               os << bs.c_str() << ".min_value: " << m_minPixelValue[band] << "\n"
+                  << bs.c_str() << ".max_value: " << m_maxPixelValue[band] << "\n"
+                  << bs.c_str() << ".null_value: " << m_nullPixelValue[band]
+                  << std::endl;
+            }
+         }
+      }
+   }
+   os.close();
+   
+   return result;
+}
+
+bool ossimImageData::isWithin(ossim_int32 x, ossim_int32 y)
+{
+   return ((x >= m_origin.x) &&
+           (x <  m_origin.x + static_cast<ossim_int32>(m_spatialExtents[0])) &&
+           (y >= m_origin.y) &&
+           (y <  m_origin.y + static_cast<ossim_int32>(m_spatialExtents[1])));
+           
+}
+
+void ossimImageData::setValue(ossim_int32 x, ossim_int32 y, ossim_float64 color)
+{
+   if(m_dataBuffer.size() > 0 && isWithin(x, y))
+   {
+      ossim_uint32 band=0;
+
+      //***
+      // Compute the offset into the buffer for (x,y).  This should always
+      // come out positive.
+      //***
+      ossim_uint32 ux = static_cast<ossim_uint32>(x - m_origin.x);
+      ossim_uint32 uy = static_cast<ossim_uint32>(y - m_origin.y);
+      
+      ossim_uint32 offset = uy * m_spatialExtents[0] + ux;
+      
+      switch (getScalarType())
+      {
+         case OSSIM_UINT8:
+         {
+            for(band = 0; band < m_numberOfDataComponents; band++)
+            {
+               unsigned char* buf = static_cast<unsigned char*>(getBuf(band))+
+                  offset;
+               *buf = (unsigned char)color;
+            }
+            break;
+         }
+         case OSSIM_SINT8:
+         {
+            for(band = 0; band < m_numberOfDataComponents; band++)
+            {
+               ossim_sint8* buf = static_cast<ossim_sint8*>(getBuf(band))+
+                  offset;
+               *buf = (ossim_sint8)color;
+            }
+            break;
+         }
+         case OSSIM_UINT16:
+         case OSSIM_USHORT11:
+         {
+            for(band = 0; band < m_numberOfDataComponents; band++)
+            {
+               ossim_uint16* buf = static_cast<ossim_uint16*>(getBuf(band))+
+                  offset;
+               *buf = (ossim_uint16)color;
+            }
+            break;
+         }
+         case OSSIM_SINT16:
+         {
+            for(band = 0; band < m_numberOfDataComponents; band++)
+            {
+               signed short* buf = static_cast<signed short*>(getBuf(band))+
+                  offset;
+               *buf = (signed short)color;
+            }
+            break;
+         }
+         case OSSIM_UINT32:
+         {
+            for(band = 0; band < m_numberOfDataComponents; band++)
+            {
+               ossim_uint32* buf = static_cast<ossim_uint32*>(getBuf(band))+
+                  offset;
+               *buf = (ossim_uint32)color;
+            }
+            break;
+         }
+         case OSSIM_SINT32:
+         {
+            for(band = 0; band < m_numberOfDataComponents; band++)
+            {
+               ossim_sint32* buf = static_cast<ossim_sint32*>(getBuf(band))+
+                  offset;
+               *buf = (ossim_sint32)color;
+            }
+            break;
+         }
+         case OSSIM_NORMALIZED_FLOAT:
+         case OSSIM_FLOAT32:
+         {
+            for(band = 0; band < m_numberOfDataComponents; band++)
+            {
+               ossim_float32* buf = static_cast<ossim_float32*>(getBuf(band))+offset;
+               *buf = (ossim_float32)color;
+            }
+            break;
+         }
+         case OSSIM_FLOAT64:
+         case OSSIM_NORMALIZED_DOUBLE:
+         {
+            for(band = 0; band < m_numberOfDataComponents; band++)
+            {
+               ossim_float64* buf = static_cast<ossim_float64*>(getBuf(band))+offset;
+               *buf = color;
+            }
+            break;
+         }
+         case OSSIM_SCALAR_UNKNOWN:
+         default:
+         {
+            //ERROR
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimImageData::setValue Unsupported scalar type!"
+               << std::endl;
+            
+         }
+         
+      } // End of:  switch (getScalarType())
+   }
+}
+
+void ossimImageData::initializeDefaults()
+{
+   initializeMinDefault();
+   initializeMaxDefault();
+   initializeNullDefault();
+}
+
+void ossimImageData::initializeMinDefault()
+{
+   if(!m_numberOfDataComponents)
+   {
+      return;
+   }
+
+   m_minPixelValue.resize(m_numberOfDataComponents);
+
+   ossim_float64 value = ossim::defaultMin( getScalarType() );
+   
+   for(ossim_uint32 band = 0; band < m_numberOfDataComponents; ++band)
+   {
+      m_minPixelValue[band]  = value;
+   }
+}
+
+void ossimImageData::initializeMaxDefault()
+{
+   if(!m_numberOfDataComponents)
+   {
+      return;
+   }
+
+   m_maxPixelValue.resize(m_numberOfDataComponents);
+
+   ossim_float64 value = ossim::defaultMax( getScalarType() );
+      
+   for(ossim_uint32 band = 0; band < m_numberOfDataComponents; ++band)
+   {
+      m_maxPixelValue[band]  = value;
+   }
+}
+
+void ossimImageData::initializeNullDefault()
+{
+   if(!m_numberOfDataComponents)
+   {
+      return;
+   }
+
+   m_nullPixelValue.resize(m_numberOfDataComponents);
+
+   ossim_float64 value = ossim::defaultNull( getScalarType() );
+   
+   for(ossim_uint32 band = 0; band < m_numberOfDataComponents; ++band)
+   {
+      m_nullPixelValue[band]  = value;
+   }
+}
+
+bool ossimImageData::isEqualTo(const ossimDataObject& rhs,
+                               bool deepTest)const
+{
+   ossimImageData* rhsPtr = PTR_CAST(ossimImageData, &rhs);
+   if(!rhsPtr) return false;
+   bool result = ( (m_scalarType         == rhsPtr->m_scalarType)&&
+                   (m_numberOfDataComponents == rhsPtr->m_numberOfDataComponents)&&
+                   (m_origin             == rhsPtr->m_origin)&&
+                   (getWidth()            == rhsPtr->getWidth())&&
+                   (getHeight()           == rhsPtr->getHeight()));
+
+   if(result)
+   {
+      bool test=true;
+      for(ossim_uint32 index = 0; index < m_numberOfDataComponents; ++index)
+      {
+         if(m_minPixelValue[index] != rhsPtr->m_minPixelValue[index])
+         {
+            test = false;
+            break;
+         }
+         if(m_maxPixelValue[index] != rhsPtr->m_maxPixelValue[index])
+         {
+            test = false;
+            break;
+         }
+         if(m_nullPixelValue[index] != rhsPtr->m_nullPixelValue[index])
+         {
+            test = false;
+            break;
+         }
+      }
+      result = test;
+   }
+   if(deepTest&&result)
+   {
+      if(getBuf() != 0 && rhsPtr->getBuf() != 0)
+      {
+         if(memcmp(getBuf(), rhsPtr->getBuf(), getSizeInBytes()) != 0)
+         {
+            result = false;
+         }
+      }
+      else if(getBuf() == 0 && rhsPtr->getBuf() == 0)
+      {
+         // nothing both are null so don't change the result.
+      }
+      else // one is null so not equal.
+      {
+         result = false;
+      }
+   }
+
+   return result;
+}
+
+ossimString ossimImageData::getScalarTypeAsString() const
+{
+   return ossimScalarTypeLut::instance()->getEntryString(getScalarType());
+}
+
+ossim_uint32 ossimImageData::getNumberOfBands() const
+{
+   return getNumberOfDataComponents();
+}
+
+ossim_float64 ossimImageData::getPix(const ossimIpt& position,
+                              ossim_uint32 band) const
+{
+   ossimIpt relative( position.x - m_origin.x,
+                      position.y - m_origin.y);
+   if((relative.x < 0) || (relative.x >= (ossim_int32)m_spatialExtents[0])) return 0.0;
+   if((relative.y < 0) || (relative.y >= (ossim_int32)m_spatialExtents[1])) return 0.0;
+   return getPix((m_spatialExtents[0])*relative.y + relative.x, band);
+}
+
+ossim_float64 ossimImageData::getPix(ossim_uint32 offset, ossim_uint32 band) const
+{
+   switch(m_scalarType)
+   {
+      case OSSIM_UINT8:
+      {
+         const ossim_uint8* buf = getUcharBuf(band);
+         if(buf)
+         {
+            return (ossim_float64)buf[offset];
+         }
+         break;
+      }
+      case OSSIM_SINT8:
+      {
+         const ossim_sint8* buf = static_cast<const ossim_sint8*>(getBuf(band));
+         if(buf)
+         {
+            return (ossim_float64)buf[offset];
+         }
+         break;
+      }
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+      {
+         const ossim_uint16* buf = getUshortBuf(band);
+         if(buf)
+         {
+            return (ossim_float64)buf[offset];
+         }
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         const ossim_sint16* buf = getSshortBuf(band);
+         if(buf)
+         {
+            return (ossim_float64)buf[offset];
+         }
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         const ossim_sint32* buf = static_cast<const ossim_sint32*>(getBuf(band));
+         if(buf)
+         {
+            return (ossim_float64)buf[offset];
+         }
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         const ossim_uint32* buf = static_cast<const ossim_uint32*>(getBuf(band));
+         if(buf)
+         {
+            return (ossim_float64)buf[offset];
+         }
+         break;
+      }
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+      {
+         const ossim_float64* buf = getDoubleBuf(band);
+         if(buf)
+         {
+            return (ossim_float64)buf[offset];
+         }      
+         break;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+      {
+         const ossim_float32* buf = getFloatBuf(band);
+         if(buf)
+         {
+            return (ossim_float64)buf[offset];
+         }
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+         // Shouldn't hit this.
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimImageData::fill Unsupported scalar type!"
+            << std::endl;   
+   }
+
+   return 0.0;
+}
+
+void ossimImageData::fill(ossim_uint32 band, ossim_float64 value)
+{
+   void* s         = getBuf(band);
+
+   if (s == 0) return; // nothing to do...
+
+   ossim_uint32 size_in_pixels = getWidth()*getHeight();
+   
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         ossim_uint8* p = getUcharBuf(band);
+         ossim_uint8 np = static_cast<ossim_uint8>(value);
+         for (ossim_uint32 i=0; i<size_in_pixels; i++) p[i] = np;
+         
+         break;
+      }
+      case OSSIM_SINT8:
+      {
+         ossim_sint8* p = static_cast<ossim_sint8*>(getBuf(band));
+         ossim_sint8 np = static_cast<ossim_sint8>(value);
+         for (ossim_uint32 i=0; i<size_in_pixels; i++) p[i] = np;
+         
+         break;
+      }
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+      {
+         ossim_uint16* p = getUshortBuf(band);
+         ossim_uint16 np = static_cast<ossim_uint16>(value);
+         for (ossim_uint32 i=0; i<size_in_pixels; i++) p[i] = np;
+         
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         ossim_sint16* p = getSshortBuf(band);
+         ossim_sint16 np = static_cast<ossim_sint16>(value);
+         for (ossim_uint32 i=0; i<size_in_pixels; i++) p[i] = np;
+         
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         ossim_uint32* p = static_cast<ossim_uint32*>(getBuf(band));
+         ossim_uint32 np = static_cast<ossim_uint32>(value);
+         for (ossim_uint32 i=0; i<size_in_pixels; i++) p[i] = np;
+         
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         ossim_sint32* p = static_cast<ossim_sint32*>(getBuf(band));
+         ossim_sint32 np = static_cast<ossim_sint32>(value);
+         for (ossim_uint32 i=0; i<size_in_pixels; i++) p[i] = np;
+         
+         break;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+      {
+         ossim_float32* p = getFloatBuf(band);
+         ossim_float32 np = static_cast<ossim_float32>(value);
+         for (ossim_uint32 i=0; i<size_in_pixels; i++) p[i] = np;
+         
+         break;
+      }
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+      {
+         ossim_float64* p = getDoubleBuf(band);
+         ossim_float64 np = static_cast<ossim_float64>(value);
+         for (ossim_uint32 i=0; i<size_in_pixels; i++) p[i] = np;
+         
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+         ossimSetError(getClassName(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "ossimImageData::makeBlank File %s line %d\n\
+Invalid scalar type:  %d",
+                       __FILE__,
+                       __LINE__,
+                       getScalarType());
+         return;
+   }
+   
+   setDataObjectStatus(OSSIM_EMPTY);
+   
+}
+
+void ossimImageData::fill(ossim_float64 value)
+{
+   ossim_uint32 valueNullCount= 0;
+   for(ossim_uint32 band=0; band < getNumberOfBands(); ++band)
+   {
+      if (value == m_nullPixelValue[band])
+      {
+         ++valueNullCount;
+      }
+      
+      fill(band, value);
+   }
+
+   if (valueNullCount==0)
+   {
+      setDataObjectStatus(OSSIM_FULL);
+   }
+   else if(valueNullCount==getNumberOfBands())
+   {
+      setDataObjectStatus(OSSIM_EMPTY);
+   }
+   else
+   {
+      setDataObjectStatus(OSSIM_PARTIAL);
+   }
+}
+
+
+void ossimImageData::createTestTile()
+{
+   // Check the status and allocate memory if needed.
+   if (getDataObjectStatus() == OSSIM_NULL)
+   {
+      initialize();
+   }
+
+   if ( getDataObjectStatus() != OSSIM_NULL )
+   {
+      switch (getScalarType())
+      {
+         case OSSIM_UINT8:
+         {
+            createTestTile(ossim_uint8(0));
+            break;
+         }
+         case OSSIM_SINT8:
+         {
+            createTestTile(ossim_sint8(0));
+            break;
+         }
+         case OSSIM_UINT16:
+         case OSSIM_USHORT11:
+         {
+            createTestTile(ossim_uint16(0));
+            break;
+         }
+         case OSSIM_SINT16:
+         {
+            createTestTile(ossim_sint16(0));
+            break;
+         }
+         case OSSIM_UINT32:
+         {
+            createTestTile(ossim_uint32(0));
+            break;
+         }
+         case OSSIM_SINT32:
+         {
+            createTestTile(ossim_sint32(0));
+            break;
+         }
+         case OSSIM_FLOAT32:
+         case OSSIM_NORMALIZED_FLOAT:
+         {
+            createTestTile(ossim_float32(0));
+            break;
+         }
+         case OSSIM_NORMALIZED_DOUBLE:
+         case OSSIM_FLOAT64:
+         {
+            createTestTile(ossim_float64(0));
+            break;
+         }
+         case OSSIM_SCALAR_UNKNOWN:
+         default:
+            ossimSetError(getClassName(),
+                          ossimErrorCodes::OSSIM_ERROR,
+                          "ossimImageData::createTestTile File %s line %d\nInvalid or unhandled scalar type:  %d",
+                          __FILE__,
+                          __LINE__,
+                          getScalarType());
+      }
+   }
+   else
+   {
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "ossimImageData::createTestTile File %s line %d\nTile must be initialed!",
+                    __FILE__,
+                    __LINE__,
+                    getScalarType());
+   }
+   
+} // End: ossimImageData::createTestTile()
+
+
+template <class T> void ossimImageData::createTestTile(T)
+{
+   if (getDataObjectStatus() != OSSIM_NULL)
+   {
+      const ossim_uint32  BANDS   = getNumberOfBands();
+      const ossim_uint32  LINES   = getHeight();
+      const ossim_uint32  SAMPS   = getWidth();
+      const ossim_float64 NP      = getNullPix(0);
+      const ossim_float64 MAX_PIX = getMaxPix(0);
+
+      const T STEP = static_cast<T>( (MAX_PIX-NP) / (LINES-1) );
+      
+      for(ossim_uint32 band = 0; band < BANDS; ++band)
+      {
+         T* s = (T*)getBuf(band);
+         T p = (T)NP;
+
+         for ( ossim_uint32 line = 0; line < LINES; ++line )
+         {
+            for ( ossim_uint32 samp = 0; samp < SAMPS; ++samp )
+            {
+               s[samp] = p;
+            }
+            p += STEP;
+            s += SAMPS;
+            
+         }
+      }
+
+      validate();
+   }
+   
+} // End: ossimImageData::createTestTile() template implementation.
+
+bool ossimImageData::isNull(ossim_uint32 offset)const
+{
+   ossim_uint32 numberOfBands = getNumberOfBands();
+   ossim_uint32 band=0;
+   if(!getBuf())
+   {
+      return true;
+   }
+
+   switch(getScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         for(band = 0; band < numberOfBands; ++band)  
+         {
+            const ossim_uint8* buf = static_cast<const ossim_uint8*>(getBuf(band))+offset;
+            if((*buf) != (ossim_uint8)getNullPix(band))
+            {
+               return false;
+            }
+         }
+         break;
+      }
+      case OSSIM_SINT8:
+      {
+         for(band = 0; band < numberOfBands; ++band)  
+         {
+            const ossim_sint8* buf = static_cast<const ossim_sint8*>(getBuf(band))+offset;
+            if((*buf) != (ossim_uint8)getNullPix(band))
+            {
+               return false;
+            }
+         }
+         break;
+      }
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+      {
+         for(band = 0; band < numberOfBands; band++)
+         {
+            const ossim_uint16* buf = static_cast<const ossim_uint16*>(getBuf(band))+offset;
+            if((*buf) != (ossim_uint16)getNullPix(band))
+            {
+               return false;
+            }
+         }
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         for(band = 0; band < numberOfBands; band++)
+         {
+            const ossim_sint16* buf = static_cast<const ossim_sint16*>(getBuf(band))+offset;
+            if((*buf) != (ossim_sint16)getNullPix(band))
+            {
+               return false;
+            }
+         }
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         for(band = 0; band < numberOfBands; band++)
+         {
+            const ossim_uint32* buf = static_cast<const ossim_uint32*>(getBuf(band))+offset;
+            if((*buf) != (ossim_uint32)getNullPix(band))
+            {
+               return false;
+            }
+         }
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         for(band = 0; band < numberOfBands; band++)
+         {
+            const ossim_sint32* buf = static_cast<const ossim_sint32*>(getBuf(band))+offset;
+            if((*buf) != (ossim_sint32)getNullPix(band))
+            {
+               return false;
+            }
+         }
+         break;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         for(band = 0; band < numberOfBands; band++)
+         {
+            const ossim_float32* buf = static_cast<const ossim_float32*>(getBuf(band))+offset;
+            if((*buf) != 0.0)
+            {
+               return false;
+            }
+         }
+         break;
+      }
+      case OSSIM_FLOAT32:
+      {
+         for(band = 0; band < numberOfBands; band++)
+         {
+            const ossim_float32* buf = static_cast<const ossim_float32*>(getBuf(band))+offset;
+            if((*buf) != (ossim_float32)getNullPix(band))
+            {
+               return false;
+            }
+         }
+         break;
+      }
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         for(band = 0; band < numberOfBands; band++)
+         {
+            const ossim_float64* buf = static_cast<const ossim_float64*>(getBuf(band))+offset;
+            if((*buf) != 0.0)
+            {
+               return false;
+            }
+         }
+         break;
+      }
+      case OSSIM_FLOAT64:
+      {
+         for(band = 0; band < numberOfBands; band++)
+         {
+            const ossim_float64* buf = static_cast<const ossim_float64*>(getBuf(band))+offset;
+            if((*buf) != getNullPix(band))
+            {
+               return false;
+            }
+         }
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         //ERROR
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimImageData::isNull Unsupported scalar type!"
+            << std::endl;
+      }
+   }
+   return true;
+}
+
+bool ossimImageData::isNull(ossim_uint32 offset, ossim_uint32 band)const
+{
+   switch(getScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         const ossim_uint8* buf =
+            static_cast<const ossim_uint8*>(getBuf(band))+offset;
+         
+         if((*buf) != (ossim_uint8)getNullPix(band))
+         {
+            return false;
+         }
+         break;
+      }
+      case OSSIM_SINT8:
+      {
+         const ossim_sint8* buf =
+            static_cast<const ossim_sint8*>(getBuf(band))+offset;
+         
+         if((*buf) != (ossim_sint8)getNullPix(band))
+         {
+            return false;
+         }
+         break;
+      }
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+      {
+         const ossim_uint16* buf =
+            static_cast<const ossim_uint16*>(getBuf(band))+offset;
+         if((*buf) != (ossim_uint16)getNullPix(band))
+         {
+            return false;
+         }
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         const ossim_sint16* buf =
+            static_cast<const ossim_sint16*>(getBuf(band))+offset;
+         if((*buf) != (ossim_sint16)getNullPix(band))
+         {
+            return false;
+         }
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         const ossim_uint32* buf =
+            static_cast<const ossim_uint32*>(getBuf(band))+offset;
+         if((*buf) != (ossim_uint32)getNullPix(band))
+         {
+            return false;
+         }
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         const ossim_sint32* buf =
+            static_cast<const ossim_sint32*>(getBuf(band))+offset;
+         if((*buf) != (ossim_sint32)getNullPix(band))
+         {
+            return false;
+         }
+         break;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+      {
+         const ossim_float32* buf = static_cast<const ossim_float32*>(getBuf(band))+offset;
+         if((*buf) != (ossim_float32)getNullPix(band))
+         {
+            return false;
+         }
+         break;
+      }
+      case OSSIM_FLOAT64:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         const ossim_float64* buf = static_cast<const ossim_float64*>(getBuf(band))+offset;
+         if((*buf) != getNullPix(band))
+         {
+            return false;
+         }
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         //ERROR
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimImageData::isNull Unsupported scalar type!"
+            << std::endl;
+      }
+   }
+   return true;
+}
+
+bool ossimImageData::isNull(const ossimIpt& pt)const
+{
+   ossim_int32 xNew = (pt.x - m_origin.x);
+   ossim_int32 yNew = (pt.y - m_origin.y);
+   if(xNew < 0 || xNew >= static_cast<ossim_int32>(m_spatialExtents[0]) ||
+      yNew < 0 || yNew >= static_cast<ossim_int32>(m_spatialExtents[1]) )
+   {
+      return true;
+   }
+   ossim_uint32 offset = getWidth()*yNew + xNew;
+   
+   return isNull(offset);
+}
+
+bool ossimImageData::isNull(const ossimIpt& pt, ossim_uint32 band)const
+{
+   ossim_int32 xNew = (pt.x - m_origin.x);
+   ossim_int32 yNew = (pt.y - m_origin.y);
+   if(xNew < 0 || xNew >= static_cast<ossim_int32>(m_spatialExtents[0]) ||
+      yNew < 0 || yNew >= static_cast<ossim_int32>(m_spatialExtents[1]) )
+   {
+      return true;
+   }
+   ossim_uint32 offset = getWidth()*yNew + xNew;
+
+   return isNull(offset, band);
+}
+
+void ossimImageData::setNull(ossim_uint32 offset)
+{
+   ossim_uint32 numberOfBands = getNumberOfBands();
+   ossim_uint32 band=0;
+   switch(getScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         for(band = 0; band < numberOfBands; ++band)  
+         {
+            ossim_uint8* buf = static_cast<ossim_uint8*>(getBuf(band))+offset;
+            *buf       = (ossim_uint8)getNullPix(band);
+         }
+         break;
+      }
+      case OSSIM_SINT8:
+      {
+         for(band = 0; band < numberOfBands; ++band)  
+         {
+            ossim_sint8* buf = static_cast<ossim_sint8*>(getBuf(band))+offset;
+            *buf       = (ossim_sint8)getNullPix(band);
+         }
+         break;
+      }
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+      {
+         for(band = 0; band < numberOfBands; band++)
+         {
+            ossim_uint16* buf = static_cast<ossim_uint16*>(getBuf(band))+
+               offset;
+            *buf = (ossim_uint16)getNullPix(band);
+         }
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         for(band = 0; band < numberOfBands; band++)
+         {
+            ossim_sint16* buf = static_cast<ossim_sint16*>(getBuf(band))+
+               offset;
+            *buf = (ossim_sint16)getNullPix(band);
+         }
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         for(band = 0; band < numberOfBands; band++)
+         {
+            ossim_uint32* buf = static_cast<ossim_uint32*>(getBuf(band))+
+               offset;
+            *buf = (ossim_uint32)getNullPix(band);
+         }
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         for(band = 0; band < numberOfBands; band++)
+         {
+            ossim_sint32* buf = static_cast<ossim_sint32*>(getBuf(band))+
+               offset;
+            *buf = (ossim_sint32)getNullPix(band);
+         }
+         break;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+      {
+         for(band = 0; band < numberOfBands; band++)
+         {
+            ossim_float32* buf = static_cast<ossim_float32*>(getBuf(band))+offset;
+            *buf = (ossim_float32)getNullPix(band);
+         }
+         break;
+      }
+      case OSSIM_FLOAT64:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         for(band = 0; band < numberOfBands; band++)
+         {
+            ossim_float64* buf = static_cast<ossim_float64*>(getBuf(band))+offset;
+            *buf = getNullPix(band);
+         }
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         //ERROR
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimImageData::isNull Unsupported scalar type!"
+            << std::endl;
+      }
+   }
+}
+
+void ossimImageData::setNull(ossim_uint32 offset, ossim_uint32 band)
+{
+   switch(getScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         ossim_uint8* buf = static_cast<ossim_uint8*>(getBuf(band))+offset;
+         *buf       = (ossim_uint8)getNullPix(band);
+         break;
+      }
+      case OSSIM_SINT8:
+      {
+         ossim_sint8* buf = static_cast<ossim_sint8*>(getBuf(band))+offset;
+         *buf       = (ossim_sint8)getNullPix(band);
+         break;
+      }
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+      {
+         ossim_uint16* buf = static_cast<ossim_uint16*>(getBuf(band))+offset;
+         *buf = (ossim_uint16)getNullPix(band);
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         ossim_sint16* buf = static_cast<ossim_sint16*>(getBuf(band))+offset;
+         *buf = (ossim_sint16)getNullPix(band);
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         ossim_uint32* buf = static_cast<ossim_uint32*>(getBuf(band))+offset;
+         *buf       = (ossim_uint32)getNullPix(band);
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         ossim_sint32* buf = static_cast<ossim_sint32*>(getBuf(band))+offset;
+         *buf       = (ossim_sint32)getNullPix(band);
+         break;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+      {
+         ossim_float32* buf = static_cast<ossim_float32*>(getBuf(band))+offset;
+         *buf = (ossim_float32)getNullPix(band);
+         break;
+      }
+      case OSSIM_FLOAT64:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         ossim_float64* buf = static_cast<ossim_float64*>(getBuf(band))+offset;
+         *buf = getNullPix(band);
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         //ERROR
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimImageData::isNull Unsupported scalar type!"
+            << std::endl;
+      }
+   }
+}
+
+void ossimImageData::setNull(const ossimIpt& pt)
+{
+   ossim_int32 xNew = (pt.x - m_origin.x);
+   ossim_int32 yNew = (pt.y - m_origin.y);
+   
+   if(xNew < 0 || xNew >= (int)m_spatialExtents[0] ||
+      yNew < 0 || yNew >= (int)m_spatialExtents[1])
+   {
+      return;
+   }
+   ossim_uint32 offset = ((int)getWidth())*yNew + xNew;
+   
+   setNull(offset);
+}
+
+void ossimImageData::setNull(const ossimIpt& pt, ossim_uint32 band)
+{
+   ossim_int32 xNew = (pt.x - m_origin.x);
+   ossim_int32 yNew = (pt.y - m_origin.y);
+   
+   if(xNew < 0 || xNew >= (int)m_spatialExtents[0] ||
+      yNew < 0 || yNew >= (int)m_spatialExtents[1])
+   {
+      return;
+   }
+   ossim_uint32 offset = ((int)getWidth())*yNew + xNew;
+   
+   setNull(offset, band);
+}
+
+void ossimImageData::setNullPix(ossim_float64 null_pix)
+{
+   if(!m_numberOfDataComponents)
+   {
+      return;
+   }
+   m_nullPixelValue.resize(m_numberOfDataComponents);
+   for(ossim_uint32 band = 0; band < m_numberOfDataComponents; ++band)
+   {
+      m_nullPixelValue[band] = null_pix;
+   }
+}
+
+void ossimImageData::setNullPix(ossim_float64 null_pix, ossim_uint32 band)
+{
+   if( !m_numberOfDataComponents || (band >= m_numberOfDataComponents) )
+   {
+      return;
+   }
+   if (m_nullPixelValue.size() != m_numberOfDataComponents)
+   {
+      initializeNullDefault();
+   }
+   m_nullPixelValue[band] = null_pix;
+}
+
+void ossimImageData::setNullPix(const ossim_float64* nullPixArray,
+                                ossim_uint32 numberOfValues)
+{
+   if(!nullPixArray || !m_numberOfDataComponents)
+   {
+      return;
+   }
+
+   if (m_nullPixelValue.size() != m_numberOfDataComponents)
+   {
+      initializeNullDefault();
+   }
+   
+   for(ossim_uint32 band = 0;
+       (band < numberOfValues) && (band < m_numberOfDataComponents);
+       ++band)
+   {
+      m_nullPixelValue[band] = nullPixArray[band];
+   }
+}
+
+void ossimImageData::setMinPix(ossim_float64 min_pix)
+{
+   if(!m_numberOfDataComponents)
+   {
+      return;
+   }
+   m_minPixelValue.resize(m_numberOfDataComponents);
+   for(ossim_uint32 band = 0; band < m_minPixelValue.size(); ++band)
+   {
+      m_minPixelValue[band] = min_pix;
+   }
+}
+
+void ossimImageData::setMinPix(ossim_float64 min_pix, ossim_uint32 band)
+{
+   if( !m_numberOfDataComponents || (band >= m_numberOfDataComponents) )
+   {
+      return;
+   }
+   if (m_minPixelValue.size() != m_numberOfDataComponents)
+   {
+      initializeMinDefault();
+   }
+   m_minPixelValue[band] = min_pix;
+}
+
+void ossimImageData::setMinPix(const ossim_float64* minPixArray,
+                               ossim_uint32 numberOfValues)
+{
+   if( !minPixArray || !m_numberOfDataComponents )
+   {
+      return;
+   }
+
+   if (m_minPixelValue.size() != m_numberOfDataComponents)
+   {
+      initializeMinDefault();
+   }
+   
+   for(ossim_uint32 band = 0;
+       (band < numberOfValues) && (band < m_numberOfDataComponents);
+       ++band)
+   {
+      m_minPixelValue[band] = minPixArray[band];
+   }
+}
+
+void ossimImageData::setMaxPix(ossim_float64 max_pix)
+{
+   if(!m_numberOfDataComponents)
+   {
+      return;
+   }
+   m_maxPixelValue.resize(m_numberOfDataComponents);
+   for(ossim_uint32 band = 0; band < m_numberOfDataComponents; ++band)
+   {
+      m_maxPixelValue[band] = max_pix;
+   }
+}
+
+void ossimImageData::setMaxPix(ossim_float64 max_pix, ossim_uint32 band)
+{
+   if( !m_numberOfDataComponents || (band >= m_numberOfDataComponents) )
+   {
+      return;
+   }
+   if (m_maxPixelValue.size() != m_numberOfDataComponents)
+   {
+      initializeMaxDefault();
+   }
+   m_maxPixelValue[band] = max_pix;
+}
+
+void ossimImageData::setMaxPix(const ossim_float64* maxPixArray,
+                               ossim_uint32 /* numberOfValues */)
+{
+   if(!maxPixArray || !m_numberOfDataComponents )
+   {
+      return;
+   }
+
+   if (m_maxPixelValue.size() != m_numberOfDataComponents)
+   {
+      initializeMaxDefault();
+   }
+   
+   for(ossim_uint32 band = 0;
+       (band < m_numberOfDataComponents) &&
+          (band < m_numberOfDataComponents);
+       ++band)
+   {
+      m_maxPixelValue[band] = maxPixArray[band];
+   }
+}
+
+void ossimImageData::setNumberOfBands(ossim_uint32 bands,
+                                      bool reallocate)
+{
+   ossim_uint32 b  = getNumberOfBands();
+   if(bands && (b != bands))
+   {
+      setNumberOfDataComponents(bands);
+      if(reallocate)
+      {
+         ossimRectilinearDataObject::initialize();
+      }
+      
+      ossim_uint32 minBands = ossim::min(b, bands);
+
+
+      vector<ossim_float64> newNull(bands);
+      vector<ossim_float64> newMin(bands);
+      vector<ossim_float64> newMax(bands);
+
+      ossim_uint32 i = 0;
+      while (i < minBands)
+      {
+         newNull[i] = m_nullPixelValue[i];
+         newMin[i]  = m_minPixelValue[i];
+         newMax[i]  = m_maxPixelValue[i];
+         ++i;
+      }
+
+      if(b)
+      {
+        while (i < bands)
+        {
+           newNull[i] = m_nullPixelValue[b-1];
+           newMin[i]  = m_minPixelValue[b-1];
+           newMax[i]  = m_maxPixelValue[b-1];
+           ++i;
+        }
+      }
+      
+      m_nullPixelValue = newNull;
+      m_minPixelValue  = newMin;
+      m_maxPixelValue  = newMax;
+   }
+}
+
+void ossimImageData::setImageRectangleAndBands(const ossimIrect& rect,
+                                               ossim_uint32 numberOfBands)
+{
+   if(rect.hasNans())
+   {
+      return;
+   }
+   
+   ossim_uint32 bands   = getNumberOfBands();
+   ossim_uint32 w       = getWidth();
+   ossim_uint32 h       = getHeight();
+   ossim_uint32 nw      = rect.width();
+   ossim_uint32 nh      = rect.height();
+
+   setOrigin(rect.ul());
+   setWidthHeight(nw, nh);
+   setNumberOfBands(numberOfBands, false);
+   
+   // we will try to be non destructive on the resize of the number of bands
+   if( ( (w*h != nw*nh)  || ( bands != numberOfBands) ) &&
+       (theDataObjectStatus != OSSIM_NULL) )
+   {
+      initialize();
+   }
+}
+
+void ossimImageData::setImageRectangle(const ossimIrect& rect)
+{
+   if(rect.hasNans())
+   {
+      return;
+   }
+   
+   ossim_uint32 w  = getWidth();
+   ossim_uint32 h  = getHeight();
+   ossim_uint32 nw = rect.width();
+   ossim_uint32 nh = rect.height();
+
+   setOrigin(rect.ul());
+   setWidthHeight(nw, nh);
+
+   // we will try to be non destructive on the resize of the number of bands
+   if ( (w*h != nw*nh) && (theDataObjectStatus != OSSIM_NULL) )
+   {
+      initialize();
+   }
+}
+
+void ossimImageData::assign(const ossimDataObject* data)
+{
+   if(!data) return;
+   ossimImageData* d = PTR_CAST(ossimImageData, data);
+   if(d)
+   {
+      assign(d);
+   }
+}
+
+void ossimImageData::assign(const ossimImageData* data)
+{
+   ossimSource* tmp_owner = getOwner();
+   
+   ossimRectilinearDataObject::assign(data);
+
+   //***
+   // The data member "theSource" will be overwritten so capture it and then
+   // set it back.
+   //***
+   setOwner(tmp_owner);
+
+   if(this != data)
+   {
+      ossim_uint32 numberOfBands = getNumberOfBands();
+      if(!numberOfBands)
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimImageData::assign\n"
+            << "Number of components is 0, can't assign" << std::endl;
+         return;
+      }
+      m_origin = data->m_origin;
+
+      m_minPixelValue  = data->m_minPixelValue;
+      m_maxPixelValue  = data->m_maxPixelValue;
+      m_nullPixelValue = data->m_nullPixelValue;
+
+      if (m_minPixelValue.size() == 0 ||
+          m_maxPixelValue.size() == 0 ||
+          m_nullPixelValue.size() == 0)
+      {
+         initializeDefaults();
+      }
+   }
+}
+
+void ossimImageData::assignBand(const ossimImageData* data,
+                                ossim_uint32 source_band,
+                                ossim_uint32 output_band)
+{
+   //***
+   // This method requires this image data to be initialized to the same
+   // size as the source data being copied.
+   //***
+
+   // Some basic error checking...
+   if ( !data->isValidBand(source_band) )
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::assignBand ERROR:"
+         << "\nInvalid source band!" << std::endl;
+      return;
+   }
+   if ( !isValidBand(output_band) )
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::assignBand ERROR:"
+         << "\nInvalid output band!" << std::endl;
+      return;
+   }
+   if (data->getDataObjectStatus() == OSSIM_NULL)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::assignBand ERROR:"
+         << "\nSource data status is null!" << std::endl;
+      return;
+   }
+   if (getDataObjectStatus() == OSSIM_NULL)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::assignBand ERROR:"
+         << "\nThis status is null!" << std::endl;
+      return;
+   }
+   
+   //***
+   // Make sure this buffer is the same size; if not, return.
+   //***
+   ossim_uint32 source_size = data->getSizePerBandInBytes();
+      
+   if ( source_size != getSizePerBandInBytes() )
+   {
+      return;
+   }
+
+   // Get the pointers to the bands.
+   const void*  s = data->getBuf(source_band);
+   void*        d = getBuf(output_band);
+
+   // One last check.
+   if (s == 0 || d == 0)
+   {
+      return;
+   }
+
+   // Ok copy the image data...
+   memcpy(d, s, source_size);
+}
+
+void ossimImageData::loadBand(const void* src,
+                              const ossimIrect& src_rect,
+                              ossim_uint32 band)
+{
+   // Call the appropriate load method.
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+         loadBandTemplate(ossim_uint8(0), src, src_rect, band);
+         return;
+
+      case OSSIM_SINT8:
+         loadBandTemplate(ossim_sint8(0), src, src_rect, band);
+         return;
+         
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+         loadBandTemplate(ossim_uint16(0), src, src_rect, band);
+         return;
+         
+      case OSSIM_SINT16:
+         loadBandTemplate(ossim_sint16(0), src, src_rect, band);
+         return;
+         
+      case OSSIM_UINT32:
+         loadBandTemplate(ossim_uint32(0), src, src_rect, band);
+         return;
+
+      case OSSIM_SINT32:
+         loadBandTemplate(ossim_sint32(0), src, src_rect, band);
+         return;
+         
+      case OSSIM_FLOAT32:
+      case OSSIM_NORMALIZED_FLOAT:
+         loadBandTemplate(ossim_float32(0), src, src_rect, band);
+         return;
+      
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+         loadBandTemplate(ossim_float64(0), src, src_rect, band);
+         return;
+         
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+         ossimSetError(getClassName(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "ossimImageData::loadBand\n\
+File %s line %d\nUnknown scalar type!",
+                       __FILE__,
+                       __LINE__);      
+         return;
+   }
+}
+
+void ossimImageData::loadBand(const void* src,
+                              const ossimIrect& src_rect,
+                              const ossimIrect& clip_rect,
+                              ossim_uint32 band)
+{
+   // Call the appropriate load method.
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+         loadBandTemplate(ossim_uint8(0), src, src_rect, clip_rect, band);
+         return;
+
+      case OSSIM_SINT8:
+         loadBandTemplate(ossim_sint8(0), src, src_rect, clip_rect, band);
+         return;
+         
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+         loadBandTemplate(ossim_uint16(0), src, src_rect, clip_rect, band);
+         return;
+         
+      case OSSIM_SINT16:
+         loadBandTemplate(ossim_sint16(0), src, src_rect, clip_rect, band);
+         return;
+         
+      case OSSIM_UINT32:
+         loadBandTemplate(ossim_uint32(0), src, src_rect, clip_rect, band);
+         return;
+
+      case OSSIM_SINT32:
+         loadBandTemplate(ossim_sint32(0), src, src_rect, clip_rect, band);
+         return;
+         
+      case OSSIM_FLOAT32:
+      case OSSIM_NORMALIZED_FLOAT:
+         loadBandTemplate(ossim_float32(0), src, src_rect, clip_rect, band);
+         return;
+         
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+         loadBandTemplate(ossim_float64(0), src, src_rect, clip_rect, band);
+         return;
+         
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+         ossimSetError(getClassName(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "ossimImageData::loadBand\n\
+File %s line %d\nUnknown scalar type!",
+                       __FILE__,
+                       __LINE__);      
+         return;
+   }
+}
+
+template <class T> void ossimImageData::loadBandTemplate(T, // dummy template variable
+                                                         const void* src,
+                                                         const ossimIrect& src_rect,
+                                                         ossim_uint32 band)
+{
+   const ossimIrect img_rect = getImageRectangle();
+
+   // Get the clip rect.
+   const ossimIrect clip_rect = img_rect.clipToRect(src_rect);
+
+   
+   loadBandTemplate(T(0), src, src_rect, clip_rect, band);
+}
+
+template <class T> void ossimImageData::loadBandTemplate(T, // dummy template variable
+                                                         const void* src,
+                                                         const ossimIrect& src_rect,
+                                                         const ossimIrect& clip_rect,
+                                                         ossim_uint32 band)
+{
+   static const char  MODULE[] = "ossimImageData::loadBand";
+   
+   // Check the pointer.
+   if (!src)
+   {
+      // Set the error...
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "%s File %s line %d\nNULL pointer passed to method!",
+                    MODULE,
+                    __FILE__,
+                    __LINE__);
+      return;
+   }
+   
+   // Check the band.
+   if (!isValidBand(band))
+   {
+      // Set the error...
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "%s File %s line %d\nInvalid band:  %d",
+                    MODULE,
+                    __FILE__,
+                    __LINE__,
+                    band);
+      return;
+   }
+   
+   const ossimIrect img_rect = getImageRectangle();
+   
+   // Check for intersect.
+   if ( ! img_rect.intersects(src_rect) )
+   {
+      return; // Nothing to do here.
+   }
+
+   // Check the clip rect.
+   if (!clip_rect.completely_within(img_rect))
+   {
+      return;
+   }
+   
+   // Check the status and allocate memory if needed.
+   if (getDataObjectStatus() == OSSIM_NULL) initialize();
+
+   // Get the width of the buffers.
+   ossim_uint32 s_width = src_rect.width();
+   ossim_uint32 d_width = getWidth();
+   
+   const T* s = static_cast<const T*>(src);
+   T* d = static_cast<T*>(getBuf(band));
+
+   // Move the pointers to the first valid pixel.
+   s += (clip_rect.ul().y - src_rect.ul().y) * s_width +
+        clip_rect.ul().x - src_rect.ul().x;
+   
+   d += (clip_rect.ul().y - img_rect.ul().y) * d_width +
+        clip_rect.ul().x - img_rect.ul().x;
+   
+   // Copy the data.
+   ossim_uint32 clipHeight = clip_rect.height();
+   ossim_uint32 clipWidth  = clip_rect.width();
+  
+   for (ossim_uint32 line = 0; line < clipHeight; ++line)
+   {
+      for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
+      {
+         d[sample] = s[sample];
+      }
+
+      s += s_width;
+      d += d_width;
+   }
+}
+
+void ossimImageData::loadTile(const ossimImageData* src)
+{
+   if (!src)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::loadTile ERROR:"
+         << "Null tile passed to method!" << std::endl;
+      return;
+   }
+
+   if (!src->getBuf())
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::loadTile ERROR:"
+         << "Source tile buff is null!" << std::endl;
+      return;
+   }
+
+   if (!this->getBuf())
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::loadTile ERROR:"
+         << "This tile not initialized!" << std::endl;
+      return;
+   }
+
+   if (src->getNumberOfBands() != this->getNumberOfBands())
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::loadTile ERROR:"
+         << "Tiles do not have same number of bands!" << std::endl;
+      return;
+   }
+
+   //***
+   // Set the status of this tile to the status of the source tile.
+   // Do this in place of validate.
+   //***
+   setDataObjectStatus(src->getDataObjectStatus());
+   
+   if(getScalarType() == src->getScalarType())
+   {      
+      loadTile((void*)(src->getBuf()),
+               src->getImageRectangle(),
+               OSSIM_BSQ);
+      setNullPix(src->getNullPix(), src->getNumberOfBands());
+   }
+   else // do a slow generic normalize to unnormalize copy
+   {
+      // Check the pointer.
+      ossimIrect src_rect = src->getImageRectangle();
+      const ossimIrect img_rect = getImageRectangle();
+      
+      // Check for intersect.
+      if ( !img_rect.intersects(src_rect) )
+      {
+         return; // Nothing to do here.
+      }
+
+      // Get the clip rect.
+      const ossimIrect clip_rect = img_rect.clipToRect(src_rect);
+
+      // Check the status and allocate memory if needed.
+      if (getDataObjectStatus() == OSSIM_NULL) initialize();
+      
+      // Get the width of the buffers.
+      ossim_uint32 num_bands     = getNumberOfBands();
+      ossim_uint32 s_width       = src_rect.width();
+      ossim_uint32 d_width       = getWidth();
+            
+      ossim_uint32 band;
+      
+      ossim_uint32 sourceOffset = (clip_rect.ul().y - src_rect.ul().y) *
+         s_width + (clip_rect.ul().x - src_rect.ul().x);      
+      
+      ossim_uint32 destinationOffset = (clip_rect.ul().y - img_rect.ul().y) *
+         d_width + (clip_rect.ul().x - img_rect.ul().x);
+      
+      ossim_uint32 clipHeight = clip_rect.height();
+      ossim_uint32 clipWidth  = clip_rect.width();
+
+      // Copy the data.
+      for (band=0; band<num_bands; ++band)
+      {
+         ossim_uint32 sourceIndex      = sourceOffset;
+         ossim_uint32 destinationIndex = destinationOffset;
+         ossim_float32 tempResult      = 0.0;
+
+         for (ossim_uint32 line = 0; line < clipHeight; ++line)
+         {
+            for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
+            {
+               src->getNormalizedFloat(sourceIndex + sample,
+                                       band,
+                                       tempResult);
+               
+               this->setNormalizedFloat(destinationIndex + sample,
+                                        band,
+                                        tempResult);
+            }
+            sourceIndex      += s_width;
+            destinationIndex += d_width;
+         }
+      }
+   }
+}
+
+void ossimImageData::loadTile(const void* src,
+                              const ossimIrect& src_rect,
+                              ossimInterleaveType il_type)
+{
+   switch (il_type)
+   {
+   case OSSIM_BIP:
+      loadTileFromBip(src, src_rect);
+      return;
+   case OSSIM_BIL:
+      loadTileFromBil(src, src_rect);
+      return;
+   case OSSIM_BSQ:
+      loadTileFromBsq(src, src_rect);
+      return;
+   default:
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::loadTile ERROR:  unsupported interleave type!"
+         << std::endl;
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "ossimImageData::loadTile\n\
+File %s line %d\nUnknown interleave type!",
+                    __FILE__,
+                    __LINE__);      
+      return;
+   } // End of "switch (type)"
+}
+
+void ossimImageData::loadTileWithAlpha(const void* src,
+                              const ossimIrect& src_rect,
+                              ossimInterleaveType il_type)
+{
+   switch (il_type)
+   {
+   case OSSIM_BIP:
+      loadTileFromBipAlpha(src, src_rect);
+      return;
+/*   case OSSIM_BIL:
+      loadTileFromBil(src, src_rect);
+      return;
+   case OSSIM_BSQ:
+      loadTileFromBsq(src, src_rect);
+      return;
+      */
+   default:
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::loadTileWithAlpha ERROR:  unsupported interleave type!"
+         << std::endl;
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "ossimImageData::loadTile\n\
+File %s line %d\nUnknown interleave type!",
+                    __FILE__,
+                    __LINE__);      
+      return;
+   } // End of "switch (type)"
+}
+
+void ossimImageData::loadTile(const void* src,
+                              const ossimIrect& src_rect,
+                              const ossimIrect& clip_rect,
+                              ossimInterleaveType il_type)
+{
+   switch (il_type)
+   {
+   case OSSIM_BIP:
+      loadTileFromBip(src, src_rect, clip_rect);
+      return;
+   case OSSIM_BIL:
+      loadTileFromBil(src, src_rect, clip_rect);
+      return;
+   case OSSIM_BSQ:
+      loadTileFromBsq(src, src_rect, clip_rect);
+      return;
+   default:
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::loadTile ERROR:  unsupported interleave type!"
+         << std::endl;
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "ossimImageData::loadTile\n\
+File %s line %d\nUnknown interleave type!",
+                    __FILE__,
+                    __LINE__);      
+      return;
+   } // End of "switch (type)"
+}
+
+
+void ossimImageData::nullTileAlpha(const ossim_uint8* src,
+                                   const ossimIrect& src_rect,
+                                   bool multiplyAlphaFlag)
+{
+   const ossimIrect img_rect = getImageRectangle();
+   
+   // Get the clip rect.
+   const ossimIrect clip_rect = img_rect.clipToRect(src_rect);
+
+   nullTileAlpha(src, src_rect, clip_rect, multiplyAlphaFlag);
+}
+
+void ossimImageData::nullTileAlpha(const ossim_uint8* src,
+                                   const ossimIrect& src_rect,
+                                   const ossimIrect& clip_rect,
+                                   bool multiplyAlphaFlag)
+{
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+         nullTileAlphaTemplate(ossim_uint8(0), src, src_rect, clip_rect, multiplyAlphaFlag);
+         return;
+
+      case OSSIM_SINT8:
+         nullTileAlphaTemplate(ossim_sint8(0), src, src_rect, clip_rect, multiplyAlphaFlag);
+         return;
+         
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+         nullTileAlphaTemplate(ossim_uint16(0), src, src_rect, clip_rect, multiplyAlphaFlag);
+         return;
+         
+      case OSSIM_SINT16:
+         nullTileAlphaTemplate(ossim_sint16(0), src, src_rect, clip_rect, multiplyAlphaFlag);
+         return;
+         
+      case OSSIM_UINT32:
+         nullTileAlphaTemplate(ossim_uint32(0), src, src_rect, clip_rect, multiplyAlphaFlag);
+         return;
+
+      case OSSIM_SINT32:
+         nullTileAlphaTemplate(ossim_sint32(0), src, src_rect, clip_rect, multiplyAlphaFlag);
+         return;
+         
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+         nullTileAlphaTemplate(ossim_float32(0), src, src_rect, clip_rect, multiplyAlphaFlag);
+         return;
+         
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+         nullTileAlphaTemplate(ossim_float64(0), src, src_rect, clip_rect, multiplyAlphaFlag);
+         return;
+         
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+         ossimSetError(getClassName(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "ossimImageData::nullTileAlpha\n\
+File %s line %d\nUnsupported scalar type for method!",
+                       __FILE__,
+                       __LINE__);      
+         return;
+   }
+   
+}
+
+void ossimImageData::loadTileFromBip(const void* src,
+                                     const ossimIrect& src_rect)
+{
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+         loadTileFromBipTemplate(ossim_uint8(0), src, src_rect);
+         return;
+
+      case OSSIM_SINT8:
+         loadTileFromBipTemplate(ossim_sint8(0), src, src_rect);
+         return;
+         
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+         loadTileFromBipTemplate(ossim_uint16(0), src, src_rect);
+         return;
+         
+      case OSSIM_SINT16:
+         loadTileFromBipTemplate(ossim_sint16(0), src, src_rect);
+         return;
+         
+      case OSSIM_UINT32:
+         loadTileFromBipTemplate(ossim_uint32(0), src, src_rect);
+         return;
+
+      case OSSIM_SINT32:
+         loadTileFromBipTemplate(ossim_sint32(0), src, src_rect);
+         return;
+         
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+         loadTileFromBipTemplate(ossim_float32(0), src, src_rect);
+         return;
+         
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+         loadTileFromBipTemplate(ossim_float64(0), src, src_rect);
+         return;
+         
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+         ossimSetError(getClassName(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "ossimImageData::loadTileFromBip\n\
+File %s line %d\nUnsupported scalar type for method!",
+                       __FILE__,
+                       __LINE__);      
+         return;
+   }
+}
+
+void ossimImageData::loadTileFromBipAlpha(const void* src,
+                                     const ossimIrect& src_rect)
+{
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+         loadTileFromBipAlphaTemplate(ossim_uint8(0), src, src_rect);
+         return;
+
+      case OSSIM_SINT8:
+         loadTileFromBipAlphaTemplate(ossim_sint8(0), src, src_rect);
+         return;
+         
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+         loadTileFromBipAlphaTemplate(ossim_uint16(0), src, src_rect);
+         return;
+         
+      case OSSIM_SINT16:
+         loadTileFromBipAlphaTemplate(ossim_sint16(0), src, src_rect);
+         return;
+         
+      case OSSIM_UINT32:
+         loadTileFromBipAlphaTemplate(ossim_uint32(0), src, src_rect);
+         return;
+
+      case OSSIM_SINT32:
+         loadTileFromBipAlphaTemplate(ossim_sint32(0), src, src_rect);
+         return;
+         
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+         loadTileFromBipAlphaTemplate(ossim_float32(0), src, src_rect);
+         return;
+         
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+         loadTileFromBipAlphaTemplate(ossim_float64(0), src, src_rect);
+         return;
+         
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+         ossimSetError(getClassName(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "ossimImageData::loadTileFromBip\n\
+File %s line %d\nUnsupported scalar type for method!",
+                       __FILE__,
+                       __LINE__);      
+         return;
+   }
+}
+
+void ossimImageData::loadTileFromBip(const void* src,
+                                     const ossimIrect& src_rect,
+                                     const ossimIrect& clip_rect)
+{
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+         loadTileFromBipTemplate(ossim_uint8(0), src, src_rect, clip_rect);
+         return;
+
+      case OSSIM_SINT8:
+         loadTileFromBipTemplate(ossim_sint8(0), src, src_rect, clip_rect);
+         return;
+
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+         loadTileFromBipTemplate(ossim_uint16(0), src, src_rect, clip_rect);
+         return;
+      
+      case OSSIM_SINT16:
+         loadTileFromBipTemplate(ossim_sint16(0), src, src_rect, clip_rect);
+         return;
+      
+      case OSSIM_UINT32:
+         loadTileFromBipTemplate(ossim_uint32(0), src, src_rect, clip_rect);
+         return;
+
+      case OSSIM_SINT32:
+         loadTileFromBipTemplate(ossim_sint32(0), src, src_rect, clip_rect);
+         return;
+      
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+         loadTileFromBipTemplate(ossim_float32(0), src, src_rect, clip_rect);
+         return;
+      
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+         loadTileFromBipTemplate(ossim_float64(0), src, src_rect, clip_rect);
+         return;
+
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+         ossimSetError(getClassName(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "ossimImageData::loadTileFromBip\n\
+File %s line %d\nUnsupported scalar type for method!",
+                       __FILE__,
+                       __LINE__);      
+         return;
+   }
+}
+
+void ossimImageData::loadTileFromBil(const void* src,
+                                     const ossimIrect& src_rect)
+{
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+         loadTileFromBilTemplate(ossim_uint8(0), src, src_rect);
+         return;
+
+      case OSSIM_SINT8:
+         loadTileFromBilTemplate(ossim_sint8(0), src, src_rect);
+         return;
+
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+         loadTileFromBilTemplate(ossim_uint16(0), src, src_rect);
+         return;
+      
+      case OSSIM_SINT16:
+         loadTileFromBilTemplate(ossim_sint16(0), src, src_rect);
+         return;
+      
+      case OSSIM_UINT32:
+         loadTileFromBilTemplate(ossim_uint32(0), src, src_rect);
+         return;
+
+      case OSSIM_SINT32:
+         loadTileFromBilTemplate(ossim_sint32(0), src, src_rect);
+         return;
+      
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+         loadTileFromBilTemplate(ossim_float32(0), src, src_rect);
+         return;
+      
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+         loadTileFromBilTemplate(ossim_float64(0), src, src_rect);
+         return;
+
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+         ossimSetError(getClassName(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "ossimImageData::loadTileFromBil\n\
+File %s line %d\nUnsupported scalar type for method!",
+                       __FILE__,
+                       __LINE__);      
+         return;
+   }
+}
+
+void ossimImageData::loadTileFromBil(const void* src,
+                                     const ossimIrect& src_rect,
+                                     const ossimIrect& clip_rect)
+{
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+         loadTileFromBilTemplate(ossim_uint8(0), src, src_rect, clip_rect);
+         return;
+
+      case OSSIM_SINT8:
+         loadTileFromBilTemplate(ossim_sint8(0), src, src_rect, clip_rect);
+         return;
+
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+         loadTileFromBilTemplate(ossim_uint16(0), src, src_rect, clip_rect);
+         return;
+      
+      case OSSIM_SINT16:
+         loadTileFromBilTemplate(ossim_sint16(0), src, src_rect, clip_rect);
+         return;
+      
+      case OSSIM_UINT32:
+         loadTileFromBilTemplate(ossim_uint32(0), src, src_rect, clip_rect);
+         return;
+
+      case OSSIM_SINT32:
+         loadTileFromBilTemplate(ossim_sint32(0), src, src_rect, clip_rect);
+         return;
+      
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+         loadTileFromBilTemplate(ossim_float32(0), src, src_rect, clip_rect);
+         return;
+      
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+         loadTileFromBilTemplate(ossim_float64(0), src, src_rect, clip_rect);
+         return;
+
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+         ossimSetError(getClassName(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "ossimImageData::loadTileFromBil\n\
+File %s line %d\nUnsupported scalar type for method!",
+                       __FILE__,
+                       __LINE__);      
+         return;
+   }
+}
+
+void ossimImageData::loadTileFromBsq(const void* src,
+                                     const ossimIrect& src_rect)
+{
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+         loadTileFromBsqTemplate(ossim_uint8(0), src, src_rect);
+         return;
+
+      case OSSIM_SINT8:
+         loadTileFromBsqTemplate(ossim_sint8(0), src, src_rect);
+         return;
+
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+         loadTileFromBsqTemplate(ossim_uint16(0), src, src_rect);
+         return;
+      
+      case OSSIM_SINT16:
+         loadTileFromBsqTemplate(ossim_sint16(0), src, src_rect);
+         return;
+      
+      case OSSIM_UINT32:
+         loadTileFromBsqTemplate(ossim_uint32(0), src, src_rect);
+         return;
+
+      case OSSIM_SINT32:
+         loadTileFromBsqTemplate(ossim_sint32(0), src, src_rect);
+         return;
+      
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+         loadTileFromBsqTemplate(ossim_float32(0), src, src_rect);
+         return;
+      
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+         loadTileFromBsqTemplate(ossim_float64(0), src, src_rect);
+         return;
+      
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+         ossimSetError(getClassName(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "ossimImageData::loadTileFromBsq\n\
+File %s line %d\nUnsupported scalar type for method!",
+                       __FILE__,
+                       __LINE__);      
+         return;
+   }
+}
+
+void ossimImageData::loadTileFromBsq(const void* src,
+                                     const ossimIrect& src_rect,
+                                     const ossimIrect& clip_rect)
+{
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+         loadTileFromBsqTemplate(ossim_uint8(0), src, src_rect, clip_rect);
+         return;
+
+      case OSSIM_SINT8:
+         loadTileFromBsqTemplate(ossim_sint8(0), src, src_rect, clip_rect);
+         return;
+         
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+         loadTileFromBsqTemplate(ossim_uint16(0), src, src_rect, clip_rect);
+         return;
+         
+      case OSSIM_SINT16:
+         loadTileFromBsqTemplate(ossim_sint16(0), src, src_rect, clip_rect);
+         return;
+         
+      case OSSIM_UINT32:
+         loadTileFromBsqTemplate(ossim_uint32(0), src, src_rect, clip_rect);
+         return;
+
+      case OSSIM_SINT32:
+         loadTileFromBsqTemplate(ossim_sint32(0), src, src_rect, clip_rect);
+         return;
+      
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+         loadTileFromBsqTemplate(ossim_float32(0), src, src_rect, clip_rect);
+         return;
+         
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+         loadTileFromBsqTemplate(ossim_float64(0), src, src_rect, clip_rect);
+         return;
+         
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+         ossimSetError(getClassName(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "ossimImageData::loadTileFromBsq\n\
+File %s line %d\nUnsupported scalar type for method!",
+                       __FILE__,
+                       __LINE__);      
+         return;
+   }
+}
+
+void ossimImageData::computeMinMaxPix(vector<ossim_float64>& minBands,
+                                      vector<ossim_float64>& maxBands) const
+{
+   if ( (getDataObjectStatus() == OSSIM_NULL) || 
+        (getDataObjectStatus() == OSSIM_EMPTY) )
+   {
+      return;
+   }
+
+   switch(m_scalarType)
+   {
+      case OSSIM_UINT8:
+      {
+         computeMinMaxPix((ossim_uint8)0,
+                          minBands,
+                          maxBands);
+         break;
+      }
+      case OSSIM_SINT8:
+      {
+         computeMinMaxPix((ossim_sint8)0,
+                          minBands,
+                          maxBands);
+         break;
+         
+      }
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+      {
+         computeMinMaxPix((ossim_uint16)0,
+                          minBands,
+                          maxBands);
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         computeMinMaxPix((ossim_sint16)0,
+                          minBands,
+                          maxBands);
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         computeMinMaxPix((ossim_uint32)0,
+                          minBands,
+                          maxBands);
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         computeMinMaxPix((ossim_sint32)0,
+                          minBands,
+                          maxBands);
+         break;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+      {
+         computeMinMaxPix((ossim_float32)0.0,
+                          minBands,
+                          maxBands);
+         break;
+      }
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+      {
+         computeMinMaxPix((ossim_float64)0.0,
+                          minBands,
+                          maxBands);
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         // Shouldn't hit this.
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimImageData::computeMinPix Unsupported scalar type!"
+            << std::endl;
+         break;
+      }
+   }
+}
+
+template <class T>
+void ossimImageData::computeMinMaxPix(T /* dummyValue */,
+                                      vector<ossim_float64>& minBands,
+                                      vector<ossim_float64>& maxBands) const
+{
+   const ossim_uint32 BANDS = getNumberOfBands();
+   const ossim_uint32 SPB   = getSizePerBand(); 
+   
+   if( minBands.size() != BANDS ||
+       maxBands.size() != BANDS )
+   {
+      minBands.resize(BANDS);
+      maxBands.resize(BANDS);
+      for (ossim_uint32 band = 0; band < BANDS; ++band)
+      {
+         // Set min to max and max to min for starters.
+         minBands[band] = getMaxPix(band);
+         maxBands[band] = getMinPix(band);
+      }
+   }
+   
+   for(ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      const T* bandBuffer = (const T*)getBuf(band);
+      if(bandBuffer)
+      {
+         const T NP   = static_cast<T>(getNullPix(band));
+         ossim_float64 currentMin = minBands[band];
+         ossim_float64 currentMax = maxBands[band];
+         for(ossim_uint32 offset = 0; offset < SPB; ++offset)
+         {
+            T p = bandBuffer[offset];
+            if(p != NP)
+            {
+               if(p < currentMin)
+               {
+                  currentMin = p;
+               }
+               else if(p > currentMax)
+               {
+                  currentMax = p;
+               }
+            }
+         }
+         minBands[band] = currentMin;
+         maxBands[band] = currentMax;
+      }
+   }
+}
+
+void ossimImageData::computeMinMaxNulPix(vector<ossim_float64>& minBands,
+                                         vector<ossim_float64>& maxBands,
+                                         vector<ossim_float64>& nulBands) const
+{
+   if ( getDataObjectStatus() == OSSIM_NULL )
+   {
+      return;
+   }
+   
+   switch(m_scalarType)
+   {
+      case OSSIM_UINT8:
+      {
+         computeMinMaxNulPix((ossim_uint8)0,
+                             minBands,
+                             maxBands,
+                             nulBands);
+         break;
+      }
+      case OSSIM_SINT8:
+      {
+         computeMinMaxNulPix((ossim_sint8)0,
+                             minBands,
+                             maxBands,
+                             nulBands);
+         break;  
+      }
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+      {
+         computeMinMaxNulPix((ossim_uint16)0,
+                             minBands,
+                             maxBands,
+                             nulBands);
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         computeMinMaxNulPix((ossim_sint16)0,
+                             minBands,
+                             maxBands,
+                             nulBands);
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         computeMinMaxNulPix((ossim_uint32)0,
+                             minBands,
+                             maxBands,
+                             nulBands);
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         computeMinMaxNulPix((ossim_sint32)0,
+                             minBands,
+                             maxBands,
+                             nulBands);
+         break;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+      {
+         computeMinMaxNulPix((ossim_float32)0.0,
+                             minBands,
+                             maxBands,
+                             nulBands);
+         break;
+      }
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+      {
+         computeMinMaxNulPix((ossim_float64)0.0,
+                             minBands,
+                             maxBands,
+                             nulBands);
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         // Shouldn't hit this.
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimImageData::computeMinNulPix Unsupported scalar type!"
+            << std::endl;
+         break;
+      }
+   }
+}
+
+template <class T>
+void ossimImageData::computeMinMaxNulPix(T /* dummyValue */,
+                                         vector<ossim_float64>& minBands,
+                                         vector<ossim_float64>& maxBands,
+                                         vector<ossim_float64>& nulBands) const
+{
+   const ossim_uint32 BANDS = getNumberOfBands();
+   const ossim_uint32 SPB   = getSizePerBand(); 
+   T DEFAULT_NULL = static_cast<T>(ossim::defaultNull(getScalarType()));   
+
+   if( minBands.size() != BANDS ||
+       maxBands.size() != BANDS ||
+       nulBands.size() != BANDS )
+   {
+      // First time through.
+      minBands.resize(BANDS);
+      maxBands.resize(BANDS);
+      nulBands.resize(BANDS);
+      for (ossim_uint32 band = 0; band < BANDS; ++band)
+      {
+         // Set min to max and max to min for starters.
+         minBands[band] = getMaxPix(band);
+         maxBands[band] = getMinPix(band);
+         nulBands[band] = getMaxPix(band);
+      }
+   }
+   
+   for(ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      const T* bandBuffer = (const T*)getBuf(band);
+      if(bandBuffer)
+      {
+         ossim_float64 currentMin = minBands[band];
+         ossim_float64 currentMax = maxBands[band];
+         ossim_float64 currentNul = nulBands[band];
+         for(ossim_uint32 offset = 0; offset < SPB; ++offset)
+         {
+            T p = bandBuffer[offset];
+
+            // Since we are scanning for nulls this is making an assumption that the default
+            // null is incorrect and should be ignored in this scan as it could have been
+            // introduced by a make blank on a partial tile so ignore it.
+            // NOTE (OLK 03/2015): It is a bad idea to ignore pixels with default nulls, as it may
+            // be the actual null value being used. By ignoring it, a new null will be latched
+            // corresponding to actual, non-null, minimum value. Unfortunately, when tiles are
+            // initialized, they are filled with default nulls since (with float-data), the
+            // null (if any exists) is not yet known -- effectively creating two null pixel values.
+            // The recommendation (if you're looking at this code, then you're probably having the
+            // problem that your nulls aren't being recognized), is to turn off the flag in your
+            // ossim prefs file with: overview_builder.scan_for_min_max_null_if_float: false
+            // (or just delete that line)
+            if ( p != DEFAULT_NULL )
+            {
+               // Must do null first as min depends on null.
+               if ( p < currentNul )
+               {
+                  currentNul = p;
+               }
+               if( ( p < currentMin ) && ( p > currentNul ) )
+               {
+                  currentMin = p;
+               }
+               else if( p > currentMax )
+               {
+                  currentMax = p;
+               }
+            }
+         }
+         minBands[band] = currentMin;
+         maxBands[band] = currentMax;
+         nulBands[band] = currentNul;
+      }
+   }
+}
+
+template <class T>
+void ossimImageData::loadTileFromBipTemplate(T, // dummy template variable
+                                             const void* src,
+                                             const ossimIrect& src_rect)
+{
+   const ossimIrect img_rect = getImageRectangle();
+   
+   // Get the clip rect.
+   const ossimIrect clip_rect = img_rect.clipToRect(src_rect);
+
+   loadTileFromBipTemplate(T(0), src, src_rect, clip_rect);
+}
+template <class T>
+void ossimImageData::loadTileFromBipAlphaTemplate(T, // dummy template variable
+                                             const void* src,
+                                             const ossimIrect& src_rect)
+{
+   const ossimIrect img_rect = getImageRectangle();
+   
+   // Get the clip rect.
+   const ossimIrect clip_rect = img_rect.clipToRect(src_rect);
+
+   loadTileFromBipAlphaTemplate(T(0), src, src_rect, clip_rect);
+}
+
+template <class T>
+void ossimImageData::loadTileFromBipTemplate(T, // dummy template variable
+                                             const void* src,
+                                             const ossimIrect& src_rect,
+                                             const ossimIrect& clip_rect)
+{
+   static const char  MODULE[] = "ossimImageData::loadTileFromBip";
+   
+   // Check the pointer.
+   if (!src)
+   {
+      // Set the error...
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                     "%s File %s line %d\nNULL pointer passed to method!",
+                    MODULE,
+                    __FILE__,
+                    __LINE__);
+      return;
+   }
+   
+   const ossimIrect img_rect = getImageRectangle();
+   
+   // Check for intersect.
+   if ( ! img_rect.intersects(src_rect) )
+   {
+      return; // Nothing to do here.
+   }
+   
+   // Check the clip rect.
+   if (!clip_rect.completely_within(img_rect))
+   {
+      return;
+   }
+   
+   // Check the status and allocate memory if needed.
+   if (getDataObjectStatus() == OSSIM_NULL) initialize();
+
+   // Get the width of the buffers.
+   ossim_uint32 num_bands  = getNumberOfBands();
+   ossim_uint32 s_width    = (src_rect.width()) * num_bands;
+   ossim_uint32 d_width    = getWidth();
+   ossim_uint32 band       = 0;
+   const T* s        = static_cast<const T*>(src);
+   T** d             = new T*[num_bands];
+   
+   // Make destination pointers to each one.
+   for (band=0; band<num_bands; band++)
+   {
+      d[band] = static_cast<T*>(getBuf(band));
+      
+      // Move the pointers to the first valid pixel.
+      d[band] += (clip_rect.ul().y - img_rect.ul().y) * d_width +
+                 clip_rect.ul().x - img_rect.ul().x;
+   }
+   
+   // Move the source pointer to the first valid pixel.
+   s += (clip_rect.ul().y - src_rect.ul().y) * s_width +
+        (clip_rect.ul().x - src_rect.ul().x) * num_bands;
+   
+   // Copy the data.
+   ossim_uint32 clipHeight = clip_rect.height();
+   ossim_uint32 clipWidth  = clip_rect.width();
+   
+   for (ossim_uint32 line = 0; line < clipHeight; ++line)
+   {
+      ossim_uint32 j = 0;
+      for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
+      {
+         for (band=0; band<num_bands; band++)
+         {
+            d[band][sample] = s[j+band];
+         }
+         j += num_bands;
+      }
+      
+      s += s_width;
+      for (band=0; band<num_bands; band++)
+      {
+         d[band] += d_width;
+      }
+   }
+   
+   delete [] d;
+}
+
+template <class T>
+void ossimImageData::loadTileFromBipAlphaTemplate(T, // dummy template variable
+                                             const void* src,
+                                             const ossimIrect& src_rect,
+                                             const ossimIrect& clip_rect)
+{
+   static const char  MODULE[] = "ossimImageData::loadTileFromBip";
+   
+   // Check the pointer.
+   if (!src)
+   {
+      // Set the error...
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                     "%s File %s line %d\nNULL pointer passed to method!",
+                    MODULE,
+                    __FILE__,
+                    __LINE__);
+      return;
+   }
+   
+   const ossimIrect img_rect = getImageRectangle();
+   
+   // Check for intersect.
+   if ( ! img_rect.intersects(src_rect) )
+   {
+      return; // Nothing to do here.
+   }
+   
+   // Check the clip rect.
+   if (!clip_rect.completely_within(img_rect))
+   {
+      return;
+   }
+   
+   // Check the status and allocate memory if needed.
+   if (getDataObjectStatus() == OSSIM_NULL) initialize();
+
+   // Get the width of the buffers.
+   ossim_uint32 num_bands  = getNumberOfBands();
+   ossim_uint32 s_width    = (src_rect.width()) * (num_bands+1);
+   ossim_uint32 d_width    = getWidth();
+   ossim_uint32 band       = 0;
+   const T* s        = static_cast<const T*>(src);
+   T** d             = new T*[num_bands];
+   
+   // Make destination pointers to each one.
+   for (band=0; band<num_bands; band++)
+   {
+      d[band] = static_cast<T*>(getBuf(band));
+      
+      // Move the pointers to the first valid pixel.
+      d[band] += (clip_rect.ul().y - img_rect.ul().y) * d_width +
+                 clip_rect.ul().x - img_rect.ul().x;
+   }
+   
+   // Move the source pointer to the first valid pixel. 
+   s += (clip_rect.ul().y - src_rect.ul().y) * s_width +
+        (clip_rect.ul().x - src_rect.ul().x) * (num_bands+1); // +1 for the alpha
+   
+   // Copy the data.
+   ossim_uint32 clipHeight = clip_rect.height();
+   ossim_uint32 clipWidth  = clip_rect.width();
+   
+   for (ossim_uint32 line = 0; line < clipHeight; ++line)
+   {
+      ossim_uint32 j = 0;
+      for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
+      {
+         for (band=0; band<num_bands; band++)
+         {
+            d[band][sample] = s[j+band];
+         }
+         j += (num_bands+1); // need to offset by the alpha channel
+      }
+      
+      s += s_width;
+      for (band=0; band<num_bands; band++)
+      {
+         d[band] += d_width;
+      }
+   }
+   
+   delete [] d;
+}
+   
+template <class T>
+void ossimImageData::loadTileFromBilTemplate(T, // dummy template variable
+                                             const void* src,
+                                             const ossimIrect& src_rect)
+{
+   const ossimIrect img_rect = getImageRectangle();
+   
+   // Get the clip rect.
+   const ossimIrect clip_rect = img_rect.clipToRect(src_rect);
+
+   loadTileFromBilTemplate(T(0), src, src_rect, clip_rect);
+}
+   
+template <class T>
+void ossimImageData::loadTileFromBilTemplate(T, // dummy template variable
+                                             const void* src,
+                                             const ossimIrect& src_rect,
+                                             const ossimIrect& clip_rect)
+{
+   static const char  MODULE[] = "ossimImageData::loadTileFromBil";
+   
+   // Check the pointer.
+   if (!src)
+   {
+      // Set the error...
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "%s File %s line %d\nNULL pointer passed to method!",
+                    MODULE,
+                    __FILE__,
+                    __LINE__);
+      return;
+   }
+   
+   const ossimIrect img_rect = getImageRectangle();
+   
+   // Check for intersect.
+   if ( ! img_rect.intersects(src_rect) )
+   {
+      return; // Nothing to do here.
+   }
+   
+   // Check the clip rect.
+   if (!clip_rect.completely_within(img_rect))
+   {
+      return;
+   }
+
+   // Check the status and allocate memory if needed.
+   if (getDataObjectStatus() == OSSIM_NULL) initialize();
+   
+   // Get the width of the buffers.
+   ossim_uint32 num_bands = getNumberOfBands();
+   ossim_uint32 s_width = (src_rect.lr().x - src_rect.ul().x + 1);
+   ossim_uint32 d_width = getWidth();
+   ossim_uint32 band = 0;
+   ossim_uint32 d_offset = (clip_rect.ul().y - img_rect.ul().y) * d_width +
+                     clip_rect.ul().x - img_rect.ul().x;
+   
+   const T* s = static_cast<const T*>(src);
+
+   // Get the number of bands and make destination pointers to each one.
+   T** d = new T*[num_bands];
+   
+   for (band=0; band<num_bands; band++)
+   {
+      d[band] = static_cast<T*>(getBuf(band));
+      
+      // Move the pointers to the first valid pixel.
+      d[band] += d_offset;
+   }
+   
+   // Move the source pointer to the first valid pixel.
+   s += (clip_rect.ul().y - src_rect.ul().y) * s_width * num_bands +
+        clip_rect.ul().x - src_rect.ul().x;
+   
+   // Copy the data.
+   ossim_uint32 clipHeight = clip_rect.height();
+   ossim_uint32 clipWidth  = clip_rect.width();
+
+   for (ossim_uint32 line = 0; line < clipHeight; ++line)
+   {
+      for (band = 0; band < num_bands; ++band)
+      {
+         for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
+         {
+            d[band][sample] = s[sample];
+         }
+         s       += s_width;
+         d[band] += d_width;
+      }
+   }
+
+   delete [] d;
+}
+   
+template <class T>
+void ossimImageData::loadTileFromBsqTemplate(T, // dummy template variable
+                                             const void* src,
+                                             const ossimIrect& src_rect)
+{
+   const ossimIrect img_rect = getImageRectangle();
+   
+   // Get the clip rect.
+   const ossimIrect clip_rect = img_rect.clipToRect(src_rect);
+
+   loadTileFromBsqTemplate(T(0), src, src_rect, clip_rect);
+}
+
+template <class T>
+void ossimImageData::loadTileFromBsqTemplate(T, // dummy template variable
+                                             const void* src,
+                                             const ossimIrect& src_rect,
+                                             const ossimIrect& clip_rect)
+{
+   static const char  MODULE[] = "ossimImageData::loadTileFromBsq";
+   
+   // Check the pointer.
+   if (!src)
+   {
+      // Set the error...
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "%s File %s line %d\nNULL pointer passed to method!",
+                    MODULE,
+                    __FILE__,
+                    __LINE__);
+      return;
+   }
+   
+   const ossimIrect img_rect = getImageRectangle();
+   
+   // Check for intersect.
+   if ( ! img_rect.intersects(src_rect) )
+   {
+      return; // Nothing to do here.
+   }
+
+   // Check the clip rect.
+   if (!clip_rect.completely_within(img_rect))
+   {
+      return;
+   }
+   
+   // Check the status and allocate memory if needed.
+   if (getDataObjectStatus() == OSSIM_NULL) initialize();
+   
+   // Get the width of the buffers.
+   ossim_uint32 num_bands = getNumberOfBands();
+   ossim_uint32 s_width = src_rect.width();
+   ossim_uint32 d_width = getWidth();
+   ossim_uint32 s_band_offset = s_width * src_rect.height();
+   
+   const T* s = static_cast<const T*>(src);
+   
+   ossim_uint32 band;
+   ossim_uint32 destinationOffset = (clip_rect.ul().y - img_rect.ul().y) * d_width +
+                              (clip_rect.ul().x - img_rect.ul().x);
+   ossim_uint32 destinationIndex = destinationOffset;
+   ossim_uint32 sourceOffset = (clip_rect.ul().y - src_rect.ul().y) * s_width +
+                         (clip_rect.ul().x - src_rect.ul().x);
+   ossim_uint32 sourceIndex = sourceOffset;
+   ossim_uint32 clipHeight = clip_rect.height();
+   ossim_uint32 clipWidth = clip_rect.width();
+
+   // Copy the data.
+   for (band=0; band<num_bands; band++)
+   {
+      T* destinationBand = static_cast<T*>(getBuf(band));
+      destinationIndex = destinationOffset;
+      sourceIndex = sourceOffset + s_band_offset*band;
+      
+      for (ossim_uint32 line = 0; line < clipHeight; ++line)
+      {
+         for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
+         {
+            destinationBand[destinationIndex + sample]
+               = s[sourceIndex+sample];
+         }
+         sourceIndex += s_width;
+         destinationIndex += d_width;
+      }
+   }
+}
+
+void ossimImageData::loadTileFrom1Band(const void* src,
+				       const ossimIrect& src_rect)
+{
+   ossim_uint32 bands = getNumberOfBands();
+   for(ossim_uint32 band = 0; band < bands; ++band)
+   {
+      loadBand(src, src_rect, band);
+   }
+}
+
+void ossimImageData::loadTileFrom1Band(const ossimImageData* src)
+{
+  if(!src) return;
+  loadTileFrom1Band((const void*)src->getBuf(),
+		    src->getImageRectangle());
+}
+
+void ossimImageData::loadShortBand(const void* src,
+                                   const ossimIrect& src_rect,
+                                   ossim_uint32 band,
+                                   bool swap_bytes)
+{
+   static const char  MODULE[] = "ossimImageData::loadShortBand";
+
+   // Check the pointer.
+   if (!src)
+   {
+      // Set the error...
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "%s File %s line %d\nNULL pointer passed to method!",
+                    MODULE,
+                    __FILE__,
+                    __LINE__);
+      return;
+   }
+
+   // Check the band.
+   if (!isValidBand(band))
+   {
+      // Set the error...
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "%s File %s line %d\nInvalid band:  %d",
+                    MODULE,
+                    __FILE__,
+                    __LINE__,
+                    band);
+      return;
+   }
+
+   const ossimIrect img_rect = getImageRectangle();
+   
+   // Check for intersect.
+   if ( ! img_rect.intersects(src_rect) )
+   {
+      return; // Nothing to do here.
+   }
+
+   // Get the clip rect.
+   const ossimIrect clip_rect = img_rect.clipToRect(src_rect);
+
+   // Check the status and allocate memory if needed.
+   if (getDataObjectStatus() == OSSIM_NULL) initialize();
+
+   // Get the width of the buffers.
+   ossim_uint32 s_width = src_rect.width();
+   ossim_uint32 d_width = getWidth();
+
+   const ossim_uint16* s = static_cast<const ossim_uint16*>(src);
+   ossim_uint16* d = getUshortBuf(band);
+
+   // Move the pointers to the first valid pixel.
+   s += (clip_rect.ul().y - src_rect.ul().y) * s_width +
+        clip_rect.ul().x - src_rect.ul().x;
+   
+   d += (clip_rect.ul().y - img_rect.ul().y) * d_width +
+        clip_rect.ul().x - img_rect.ul().x;
+   
+   // Copy the data.
+   for (ossim_int32 line=clip_rect.ul().y; line<=clip_rect.lr().y; line++)
+   {
+      ossim_uint32 i = 0;
+      for (ossim_int32 sample=clip_rect.ul().x; sample<=clip_rect.lr().x; sample++)
+      {
+         d[i] = (swap_bytes ? ( (s[i] << 8) | (s[i] >> 8) ) :
+                 s[i]);
+         ++i;
+      }
+
+      s += s_width;
+      d += d_width;
+   }
+
+   validate();
+}
+
+bool ossimImageData::isPointWithin(const ossimIpt& point)const
+{
+   return ((point.x >= m_origin.x)&&
+           (point.y >= m_origin.y)&&
+           ((point.x - m_origin.x)<static_cast<ossim_int32>(m_spatialExtents[0]))&&
+           ((point.y - m_origin.y)<static_cast<ossim_int32>(m_spatialExtents[1])));
+}
+
+bool ossimImageData::isPointWithin(ossim_int32 x, ossim_int32 y)const
+{
+   return ((x >= m_origin.x)&&
+           (y >= m_origin.y)&&
+           ((x - m_origin.x) < static_cast<ossim_int32>(m_spatialExtents[0]))&&
+           ((y - m_origin.y) < static_cast<ossim_int32>(m_spatialExtents[1])));
+}
+
+void ossimImageData::unloadTile(void* dest,
+                                const ossimIrect& dest_rect,
+                                ossimInterleaveType type) const
+{
+   unloadTile(dest, dest_rect, getImageRectangle(), type);
+}
+
+void ossimImageData::unloadTile(void* dest,
+                                const ossimIrect& dest_rect,
+                                const ossimIrect& clip_rect,
+                                ossimInterleaveType type) const
+{
+   switch (type)
+   {
+      case OSSIM_BIP:
+         unloadTileToBip(dest, dest_rect, clip_rect);
+         return;
+      case OSSIM_BIL:
+         unloadTileToBil(dest, dest_rect, clip_rect);
+         return;
+      case OSSIM_BSQ:
+         unloadTileToBsq(dest, dest_rect, clip_rect);
+         return;
+      default:
+         ossimSetError(getClassName(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "ossimImageData::unloadTile\n\
+File %s line %d\nUnknown scalar type!",
+                       __FILE__,
+                       __LINE__);      
+         return;
+   }
+}
+
+void ossimImageData::unloadTileToBip(void* dest,
+                                     const ossimIrect& dest_rect,
+                                     const ossimIrect& clip_rect) const
+{
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+         unloadTileToBipTemplate(ossim_uint8(0), dest, dest_rect, clip_rect);
+         return;
+
+      case OSSIM_SINT8:
+         unloadTileToBipTemplate(ossim_sint8(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+         unloadTileToBipTemplate(ossim_uint16(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_SINT16:
+         unloadTileToBipTemplate(ossim_sint16(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_UINT32:
+         unloadTileToBipTemplate(ossim_uint32(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_SINT32:
+         unloadTileToBipTemplate(ossim_sint32(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+         unloadTileToBipTemplate(ossim_float32(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+         unloadTileToBipTemplate(ossim_float64(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+         ossimSetError(getClassName(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "ossimImageData::unloadTileToBip\n\
+File %s line %d\nUnsupported scalar type for method!",
+                       __FILE__,
+                       __LINE__);      
+         return;
+   }
+}
+
+void ossimImageData::unloadTileToBipAlpha(void* dest,
+                                          const ossimIrect& dest_rect,
+                                          const ossimIrect& clip_rect) const
+{
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+         unloadTileToBipAlphaTemplate(ossim_uint8(0), dest, dest_rect, clip_rect);
+         return;
+
+      case OSSIM_SINT8:
+         unloadTileToBipAlphaTemplate(ossim_sint8(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+         unloadTileToBipAlphaTemplate(ossim_uint16(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_SINT16:
+         unloadTileToBipAlphaTemplate(ossim_sint16(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_UINT32:
+         unloadTileToBipAlphaTemplate(ossim_uint32(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_SINT32:
+         unloadTileToBipAlphaTemplate(ossim_sint32(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+         unloadTileToBipAlphaTemplate(ossim_float32(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+         unloadTileToBipAlphaTemplate(ossim_float64(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+         ossimSetError(getClassName(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "ossimImageData::unloadTileToBipAlpha\n\
+File %s line %d\nUnsupported scalar type for method!",
+                       __FILE__,
+                       __LINE__);      
+         return;
+   }
+}
+
+void ossimImageData::unloadTileToBil(void* dest,
+                                     const ossimIrect& dest_rect,
+                                     const ossimIrect& clip_rect) const
+{
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+         unloadTileToBilTemplate(ossim_uint8(0), dest, dest_rect, clip_rect);
+         return;
+
+      case OSSIM_SINT8:
+         unloadTileToBilTemplate(ossim_sint8(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+         unloadTileToBilTemplate(ossim_uint16(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_SINT16:
+         unloadTileToBilTemplate(ossim_sint16(0), dest, dest_rect, clip_rect);
+         return;
+
+      case OSSIM_UINT32:
+         unloadTileToBilTemplate(ossim_uint32(0), dest, dest_rect, clip_rect);
+         return;
+
+      case OSSIM_SINT32:
+         unloadTileToBilTemplate(ossim_sint32(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+         unloadTileToBilTemplate(ossim_float32(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+         unloadTileToBilTemplate(ossim_float64(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+         ossimSetError(getClassName(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "ossimImageData::unloadTileToBil\n\
+File %s line %d\nUnsupported scalar type for method!",
+                       __FILE__,
+                       __LINE__);      
+         return;
+   }
+}
+
+void ossimImageData::unloadTileToBsq(void* dest,
+                                     const ossimIrect& dest_rect,
+                                     const ossimIrect& clip_rect) const
+{
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+         unloadTileToBsqTemplate(ossim_uint8(0), dest, dest_rect, clip_rect);
+         return;
+
+      case OSSIM_SINT8:
+         unloadTileToBsqTemplate(ossim_sint8(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+         unloadTileToBsqTemplate(ossim_uint16(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_SINT16:
+         unloadTileToBsqTemplate(ossim_sint16(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_UINT32:
+         unloadTileToBsqTemplate(ossim_uint32(0), dest, dest_rect, clip_rect);
+         return;
+
+      case OSSIM_SINT32:
+         unloadTileToBsqTemplate(ossim_sint32(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+         unloadTileToBsqTemplate(ossim_float32(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+         unloadTileToBsqTemplate(ossim_float64(0), dest, dest_rect, clip_rect);
+         return;
+         
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+         ossimSetError(getClassName(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "ossimImageData::unloadTileToBsq\n\
+File %s line %d\nUnsupported scalar type for method!",
+                       __FILE__,
+                       __LINE__);      
+         return;
+   }
+}
+
+void ossimImageData::unloadBand(void* dest,
+                                const ossimIrect& dest_rect,
+                                ossim_uint32 band) const
+{
+   unloadBand(dest, dest_rect, getImageRectangle(), band);
+}
+
+void ossimImageData::unloadBand(void* dest,
+                                const ossimIrect& dest_rect,
+                                const ossimIrect& clip_rect,
+                                ossim_uint32 band) const
+{
+   // Call the appropriate load method.
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+         unloadBandTemplate(ossim_uint8(0), dest, dest_rect, clip_rect, band);
+         return;
+
+      case OSSIM_SINT8:
+         unloadBandTemplate(ossim_sint8(0), dest, dest_rect, clip_rect, band);
+         return;
+         
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+         unloadBandTemplate(ossim_uint16(0), dest, dest_rect, clip_rect, band);
+         return;
+         
+      case OSSIM_SINT16:
+         unloadBandTemplate(ossim_sint16(0), dest, dest_rect, clip_rect, band);
+         return;
+         
+      case OSSIM_UINT32:
+         unloadBandTemplate(ossim_uint32(0), dest, dest_rect, clip_rect, band);
+         return;
+
+      case OSSIM_SINT32:
+         unloadBandTemplate(ossim_sint32(0), dest, dest_rect, clip_rect, band);
+         return;
+         
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+         unloadBandTemplate(ossim_float32(0), dest, dest_rect, clip_rect, band);
+         return;
+         
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+         unloadBandTemplate(ossim_float64(0), dest, dest_rect, clip_rect, band);
+         return;
+         
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+         ossimSetError(getClassName(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "ossimImageData::unloadBand\n\
+File %s line %d\nUnsupported scalar type for method!",
+                       __FILE__,
+                       __LINE__);      
+         return;
+   }
+}
+
+void ossimImageData::unloadBand( void* dest,
+                                 ossim_uint32 src_band,
+                                 ossim_uint32 dest_band,
+                                 const ossimIrect& dest_rect,
+                                 ossimInterleaveType il_type,
+                                 OverwriteBandRule ow_type ) const
+{
+   unloadBand( dest, src_band, dest_band, dest_rect, getImageRectangle(), il_type, ow_type );
+}
+
+void ossimImageData::unloadBand( void* dest,
+                                 ossim_uint32 src_band,
+                                 ossim_uint32 dest_band,
+                                 const ossimIrect& dest_rect,
+                                 const ossimIrect& clip_rect,
+                                 ossimInterleaveType il_type,
+                                 OverwriteBandRule ow_type ) const
+{
+   static const char  MODULE[] = "ossimImageData::unloadBand";
+
+   if ( il_type == OSSIM_BSQ )
+   {
+      unloadBandToBsq( dest, src_band, dest_band, dest_rect, clip_rect, ow_type );
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE << " NOTICE:"
+         << "\nUnsupported interleave type:  " << il_type << "  Returning..."
+         << std::endl;
+   }
+}
+
+void ossimImageData::unloadBandToBsq( void* dest,
+                                      ossim_uint32 src_band,
+                                      ossim_uint32 dest_band,
+                                      const ossimIrect& dest_rect,
+                                      const ossimIrect& clip_rect,
+                                      OverwriteBandRule ow_type ) const
+{
+   switch (getScalarType())
+   {
+      case OSSIM_UINT8:
+         unloadBandToBsqTemplate(ossim_uint8(0), dest, src_band, dest_band, dest_rect, clip_rect, ow_type );
+         return;
+
+      case OSSIM_SINT8:
+         unloadBandToBsqTemplate(ossim_sint8(0), dest, src_band, dest_band, dest_rect, clip_rect, ow_type );
+         return;
+
+      case OSSIM_UINT16:
+      case OSSIM_USHORT11:
+         unloadBandToBsqTemplate(ossim_uint16(0), dest, src_band, dest_band, dest_rect, clip_rect, ow_type );
+         return;
+
+      case OSSIM_SINT16:
+         unloadBandToBsqTemplate(ossim_sint16(0), dest, src_band, dest_band, dest_rect, clip_rect, ow_type );
+         return;
+
+      case OSSIM_UINT32:
+         unloadBandToBsqTemplate(ossim_uint32(0), dest, src_band, dest_band, dest_rect, clip_rect, ow_type );
+         return;
+
+      case OSSIM_SINT32:
+         unloadBandToBsqTemplate(ossim_sint32(0), dest, src_band, dest_band, dest_rect, clip_rect, ow_type );
+         return;
+
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+         unloadBandToBsqTemplate(ossim_float32(0), dest, src_band, dest_band, dest_rect, clip_rect, ow_type );
+         return;
+
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+         unloadBandToBsqTemplate(ossim_float64(0), dest, src_band, dest_band, dest_rect, clip_rect, ow_type );
+         return;
+
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+         ossimSetError(getClassName(),
+            ossimErrorCodes::OSSIM_ERROR,
+            "ossimImageData::unloadBandToBsq\n\
+            File %s line %d\nUnsupported scalar type for method!",
+            __FILE__,
+            __LINE__);      
+         return;
+   }
+}
+
+template <class T>
+void ossimImageData::unloadBandTemplate(T, // dummy template variable
+                                        void* dest,
+                                        const ossimIrect& dest_rect,
+                                        const ossimIrect& clip_rect,
+                                        ossim_uint32 band) const
+{
+   static const char  MODULE[] = "ossimImageData::unloadBand";
+
+   // Check the pointers.
+   if (!dest)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE << " ERROR:"
+         << "\nNULL pointer passed to method!  Returning..." << std::endl;
+      return;
+   }
+
+   if (getDataObjectStatus() == OSSIM_NULL)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE << " ERROR:"
+         << "\nThis object is null! Returning..." << std::endl;
+      return;
+   }
+   
+   ossimIrect img_rect = getImageRectangle();
+   
+   // Clip the clip_rect to the tile rect.
+   ossimIrect output_clip_rect = clip_rect.clipToRect(img_rect);
+
+   // Clip it again to the destination rect.
+   output_clip_rect = dest_rect.clipToRect(output_clip_rect);
+   
+   // Check the output clip rect for intersection.
+   if (!output_clip_rect.intersects(img_rect))
+   {
+      return;
+   }
+   if ( !(output_clip_rect.intersects(dest_rect)) )
+   {
+      return;
+   }
+
+   // Check for valid band.
+   if (!isValidBand(band))
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE << " NOTICE:"
+         << "\nInvalid band:  " << band << "  Returning..."
+         << std::endl;
+      return;
+   }
+   
+   ossim_uint32 buf_width = dest_rect.lr().x - dest_rect.ul().x + 1;
+
+   // Get a pointer to the source band buffer.
+   const T* s = reinterpret_cast<const T*>(getBuf(band));
+
+   // Get the offset for each source band.
+   ossim_uint32 src_offset = (output_clip_rect.ul().y - img_rect.ul().y) *
+      getWidth() + output_clip_rect.ul().x - img_rect.ul().x;
+   
+   // Move the pointers to the start.
+   T* d = reinterpret_cast<T*>(dest);
+
+   ossim_uint32 dest_offset = (output_clip_rect.ul().y - dest_rect.ul().y) *
+      buf_width + output_clip_rect.ul().x - dest_rect.ul().x;
+
+   d += dest_offset;
+   s += src_offset;
+
+   for (ossim_int32 line=output_clip_rect.ul().y;
+        line<=output_clip_rect.lr().y; ++line)
+   {
+      ossim_uint32 i=0;
+      for (ossim_int32 samp=clip_rect.ul().x;
+           samp<=output_clip_rect.lr().x; ++samp)
+      {
+         d[i] = s[i];
+         ++i;
+      }
+      d += buf_width;
+      s += getWidth();
+   }
+}
+
+template <class T> void
+ossimImageData::unloadTileToBipTemplate(T, // dummy template variable
+                                        void* dest,
+                                        const ossimIrect& dest_rect,
+                                        const ossimIrect& clip_rect) const
+{
+   static const char  MODULE[] = "ossimImageData::unloadTileToBip";
+   
+   // Check the pointer.
+   if (!dest)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE << " ERROR:"
+         << "\nNULL pointer passed to method!  Returning..." << std::endl;
+      return;
+   }
+   
+   bool  dataIsNull = false;
+   if (getDataObjectStatus() == OSSIM_NULL)
+   {
+      dataIsNull = true;
+   }
+   
+   ossimIrect img_rect = getImageRectangle();
+   
+   // Clip the clip_rect to the tile rect.
+   ossimIrect output_clip_rect = clip_rect.clipToRect(img_rect);
+
+   // Clip it again to the destination rect.
+   output_clip_rect = dest_rect.clipToRect(output_clip_rect);
+   
+   // Check the output clip rect for intersection.
+   if (output_clip_rect.hasNans())
+   {
+      return;
+   }
+   if ( !(output_clip_rect.intersects(dest_rect)) )
+   {
+      return;
+   }
+   
+   ossim_int32 num_bands = getNumberOfBands();
+   
+   ossim_int32 buf_width = dest_rect.width() * num_bands;
+
+   if(!dataIsNull)
+   {
+      // Get the number of bands and grab a pointers to each one.
+      const T** s = new const T*[num_bands];
+      
+      ossim_int32 band;
+      ossim_int32 s_width = getWidth();
+      
+      for (band=0; band<num_bands; band++)
+      {
+         s[band] = reinterpret_cast<const T*>(getBuf(band));
+      }
+      
+      // Move the pointers to the start.
+      T* d = reinterpret_cast<T*>(dest);      
+      
+      d += (output_clip_rect.ul().y - dest_rect.ul().y) * buf_width +
+           (output_clip_rect.ul().x - dest_rect.ul().x) * num_bands;
+      
+      // Get the offset for each source band.
+      ossim_int32 src_offset = (output_clip_rect.ul().y - img_rect.ul().y) *
+         s_width + (output_clip_rect.ul().x - img_rect.ul().x);
+      
+      ossim_int32 output_clip_width  = output_clip_rect.width();
+      ossim_int32 output_clip_height = output_clip_rect.height();
+      
+      for (band=0; band<(ossim_int32)getNumberOfBands(); band++)
+      {
+         s[band] += src_offset;
+      }
+      
+      ossim_int32 j;
+      for (ossim_int32 line=0; line<output_clip_height; ++line)
+      {
+         j = 0;
+         for (ossim_int32 samp=0; samp<output_clip_width; ++samp, j+=num_bands)
+         {
+            for (band=0; band<num_bands; ++band)
+            {
+               d[j+band] = s[band][samp];
+            }
+         }
+         
+         // increment to next line...
+         d += buf_width;
+         for (band=0; band<num_bands; ++band)
+         {
+            s[band] += s_width;
+         }
+      
+      }
+      delete [] s;
+   }
+   else
+   {
+      ossim_int32 band = 0;
+      T* nulls = new T[num_bands];
+      for(band = 0; band < num_bands; ++band)
+      {
+         nulls[band] = static_cast<T>(m_nullPixelValue[band]);
+      }
+      // Move the pointers to the start.
+      T* d = reinterpret_cast<T*>(dest);
+      
+      d += (output_clip_rect.ul().y - dest_rect.ul().y) * buf_width +
+           (output_clip_rect.ul().x - dest_rect.ul().x) * num_bands;
+
+      for (ossim_int32 line=output_clip_rect.ul().y;
+           line<=output_clip_rect.lr().y; ++line)
+      {
+         ossim_int32 i=0;
+         ossim_int32 j=0;
+         for (ossim_int32 samp=output_clip_rect.ul().x;
+              samp<=output_clip_rect.lr().x; ++samp)
+         {
+            for (band=0; band<num_bands; ++band)
+            {
+               d[j+band] = nulls[band];
+            }
+            ++i;  // increment to next pixel...
+            j+= num_bands;
+         }
+         
+         // increment to next line...
+         d += buf_width;
+      }
+      delete [] nulls;
+      nulls = 0;
+   }
+}
+
+template <class T> void
+ossimImageData::unloadTileToBipAlphaTemplate(T, // dummy template variable
+                                             void* dest,
+                                             const ossimIrect& dest_rect,
+                                             const ossimIrect& clip_rect) const
+{
+   static const char  M[] = "ossimImageData::unloadTileToBipAlphaTemplate";
+
+   // Sanity checks:
+
+   // Are we null:
+   if (getDataObjectStatus() == OSSIM_NULL)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << M << " ERROR:"
+         << "\nAttempting to copy null tile!  Returning..." << std::endl;
+      return;
+   }
+   
+   // Check the pointer.
+   if (!dest)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << M << " ERROR:"
+         << "\nNULL pointer passed to method!  Returning..." << std::endl;
+      return;
+   }
+
+   if ( !hasAlpha() )
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << M << " ERROR:"
+         << "\nTile has no alpha!  Returning..." << std::endl;
+      return; 
+   }
+   
+   ossimIrect img_rect = getImageRectangle();
+   
+   // Clip the clip_rect to the tile rect.
+   ossimIrect output_clip_rect = clip_rect.clipToRect(img_rect);
+
+   // Clip it again to the destination rect.
+   output_clip_rect = dest_rect.clipToRect(output_clip_rect);
+   
+   // Check the output clip rect for intersection.
+   if (output_clip_rect.hasNans())
+   {
+      return;
+   }
+   if ( !(output_clip_rect.intersects(dest_rect)) )
+   {
+      return;
+   }
+   
+   const ossim_int32 NUM_DATA_BANDS = getNumberOfBands();
+   const ossim_int32 BANDS = NUM_DATA_BANDS + 1; // Has data plus alpha.
+   const ossim_float64 MAX_PIX = static_cast<T>(getMaxPix(0));
+   const ossim_float64 ALPHA_MAX_PIX = 255.00;
+   const ossim_int32 S_WIDTH = getWidth();
+   const ossim_int32 D_WIDTH = dest_rect.width() * BANDS;
+   const ossim_int32 OUTPUT_CLIP_WIDTH  = output_clip_rect.width();
+   const ossim_int32 OUTPUT_CLIP_HEIGHT = output_clip_rect.height();
+
+   bool uint8Flag = ( getScalarType() == OSSIM_UINT8 );
+   
+   // Get the offset for each source band relative to start of clip rect.
+   const ossim_int32 SRC_OFFSET = (output_clip_rect.ul().y - img_rect.ul().y) *
+      S_WIDTH + (output_clip_rect.ul().x - img_rect.ul().x);
+   
+   // Get pointers to each one band of image data.
+   std::vector<const T*> s(NUM_DATA_BANDS);
+   ossim_int32 band;
+   for (band = 0; band < NUM_DATA_BANDS; ++band)
+   {
+      s[band] = reinterpret_cast<const T*>(getBuf(band));
+
+      // Move to start of clip rect.
+      s[band] += SRC_OFFSET;
+   }
+
+   // Get pointer to the alpha channel:
+   const ossim_uint8* a = getAlphaBuf();
+
+   // Move to start of clip rect.
+   a += SRC_OFFSET;
+
+   // Pointer to the destination buffer.
+   T* d = reinterpret_cast<T*>(dest); 
+
+   // Move to start of clip rect.
+   d += (output_clip_rect.ul().y - dest_rect.ul().y) * D_WIDTH +
+      (output_clip_rect.ul().x - dest_rect.ul().x) * BANDS;
+   
+
+   // Loop to copy data:
+   for (ossim_int32 line = 0; line < OUTPUT_CLIP_HEIGHT; ++line)
+   {
+      ossim_int32 j = 0;
+      ossim_int32 alphaIdx = 0;
+      for (ossim_int32 samp = 0; samp < OUTPUT_CLIP_WIDTH; ++samp, j +=BANDS)
+      {
+         // Copy the pixels:
+         for (band = 0; band < NUM_DATA_BANDS; ++band)
+         {
+            d[j+band] = s[band][samp];
+         }
+         
+         // Copy alpha channel converting to scalar type.
+         if ( uint8Flag )
+         {
+            d[j+NUM_DATA_BANDS] = a[alphaIdx++];
+         }
+         else
+         {
+            d[j+NUM_DATA_BANDS] =
+               static_cast<T>( (a[alphaIdx++]/ALPHA_MAX_PIX) * MAX_PIX );
+         }
+      }
+      
+      // Increment pointers to next line...
+      d += D_WIDTH;
+      for (band = 0; band < NUM_DATA_BANDS; ++band)
+      {
+         s[band] += S_WIDTH;
+      }
+      a += S_WIDTH;
+   }
+}
+
+template <class T> void
+ossimImageData::unloadTileToBilTemplate(T,  // dummy template arg...
+                                        void* dest,
+                                        const ossimIrect& dest_rect,
+                                        const ossimIrect& clip_rect) const
+{
+  static const char  MODULE[] = "ossimImageData::unloadTileToBil";
+
+   // Check the pointers.
+   if (!dest)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE << " ERROR:"
+         << "\nNULL pointer passed to method!  Returning..." << std::endl;
+      return;
+   }
+   bool dataIsNull = false;
+   if (getDataObjectStatus() == OSSIM_NULL)
+   {
+      dataIsNull = true;
+   }
+
+   ossimIrect img_rect = getImageRectangle();
+   
+   // Clip the clip_rect to the tile rect.
+   ossimIrect output_clip_rect = clip_rect.clipToRect(img_rect);
+
+   // Clip it again to the destination rect.
+   output_clip_rect = dest_rect.clipToRect(output_clip_rect);
+   
+   // Check the output clip rect for intersection.
+   if (output_clip_rect.hasNans())
+   {
+      return;
+   }
+   if ( !(output_clip_rect.intersects(dest_rect)) )
+   {
+      return;
+   }
+
+   ossim_uint32 num_bands = getNumberOfBands();
+
+   ossim_uint32 buf_width = dest_rect.width();
+
+   if(!dataIsNull)
+   {
+      // Get the number of bands and grab a pointers to each one.
+      const T** s = new const T*[num_bands];
+      
+      ossim_uint32 band;
+      
+      for (band=0; band<num_bands; band++)
+      {
+         s[band] = reinterpret_cast<const T*>(getBuf(band));
+      }
+      
+      // Get the offset for each source band.
+      ossim_uint32 src_offset = (output_clip_rect.ul().y - img_rect.ul().y) *
+         getWidth() + (output_clip_rect.ul().x - img_rect.ul().x);
+      
+      // Move the pointers to the start.
+      T* d = reinterpret_cast<T*>(dest);
+
+      d += (output_clip_rect.ul().y - dest_rect.ul().y) *
+         buf_width * num_bands +
+         (output_clip_rect.ul().x-dest_rect.ul().x);
+      
+      for (band=0; band<num_bands; ++band)
+      {
+         s[band] += src_offset;
+      }
+      
+      for (ossim_int32 line=output_clip_rect.ul().y;
+           line<=output_clip_rect.lr().y; ++line)
+      {
+         for (band=0; band<num_bands; ++band)
+         {
+            ossim_uint32 i=0;
+            for (ossim_int32 samp=output_clip_rect.ul().x;
+                 samp<=output_clip_rect.lr().x; ++samp)
+            {
+               d[i] = s[band][i];
+               ++i;
+            }
+            d       += buf_width;
+            s[band] += getWidth();
+         }
+      }
+      // Free up memory allocated for pointers.
+      delete [] s;
+   }
+   else
+   {
+      ossim_uint32 band = 0;
+      T* nulls = new T[num_bands];
+      for(band = 0; band < num_bands; ++band)
+      {
+         nulls[band] = static_cast<T>(m_nullPixelValue[band]);
+      }
+      
+      // Move the pointers to the start.
+      T* d = reinterpret_cast<T*>(dest);
+
+      d += (output_clip_rect.ul().y - dest_rect.ul().y) *
+           buf_width * num_bands + (output_clip_rect.ul().x - dest_rect.ul().x);
+      
+      for (ossim_int32 line=output_clip_rect.ul().y;
+           line<=output_clip_rect.lr().y; ++line)
+      {
+         for (band=0; band<num_bands; ++band)
+         {
+            ossim_uint32 i=0;
+            for (ossim_int32 samp=output_clip_rect.ul().x;
+                 samp<=output_clip_rect.lr().x; ++samp)
+            {
+               d[i] = nulls[band];
+               ++i;
+            }
+            d += buf_width;
+         }
+      }
+      delete [] nulls;
+   }
+}
+
+template <class T> void ossimImageData::nullTileAlphaTemplate(
+   T,
+   const ossim_uint8* src,
+   const ossimIrect& src_rect,
+   const ossimIrect& clip_rect,
+   bool multiplyAlphaFlag)
+{
+   static const char  MODULE[] = "ossimImageData::nullTileAlphaTemplate";
+   
+   // Check the pointer.
+   if (!src)
+   {
+      // Set the error...
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "%s File %s line %d\nNULL pointer passed to method!",
+                    MODULE,
+                    __FILE__,
+                    __LINE__);
+      return;
+   }
+   
+   const ossimIrect img_rect = getImageRectangle();
+   
+   // Check for intersect.
+   if ( ! img_rect.intersects(src_rect) )
+   {
+      return; // Nothing to do here.
+   }
+
+   // Check the clip rect.
+   if (!clip_rect.completely_within(img_rect))
+   {
+      return;
+   }
+   
+   // Check the status and allocate memory if needed.
+   if (getDataObjectStatus() == OSSIM_NULL) initialize();
+   
+   // Get the width of the buffers.
+   ossim_uint32 num_bands = getNumberOfBands();
+   ossim_uint32 s_width = src_rect.width();
+   ossim_uint32 d_width = getWidth();
+   ossim_uint32 band;
+   ossim_uint32 destinationOffset = (clip_rect.ul().y - img_rect.ul().y) * d_width +
+                              (clip_rect.ul().x - img_rect.ul().x);
+   ossim_uint32 destinationIndex = destinationOffset;
+   ossim_uint32 sourceOffset = (clip_rect.ul().y - src_rect.ul().y) * s_width +
+                         (clip_rect.ul().x - src_rect.ul().x);
+   ossim_uint32 sourceIndex = sourceOffset;
+   ossim_uint32 clipHeight = clip_rect.height();
+   ossim_uint32 clipWidth = clip_rect.width();
+
+   if(!multiplyAlphaFlag)
+   {
+      // Copy the data.
+      for (band=0; band<num_bands; band++)
+      {
+         T* destinationBand = static_cast<T*>(getBuf(band));
+         destinationIndex = destinationOffset;
+         sourceIndex = sourceOffset;
+         T nullPix = (T)getNullPix(band);
+         T minPix = (T)getMinPix(band);
+         for (ossim_uint32 line = 0; line < clipHeight; ++line)
+         {
+            for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
+            {
+               if(src[sourceIndex+sample] == 0)
+               {
+                  destinationBand[destinationIndex + sample] = nullPix;
+               }
+               else if(destinationBand[destinationIndex + sample] == nullPix)
+               {
+                  destinationBand[destinationIndex + sample] = minPix;
+               }
+            }
+            sourceIndex += s_width;
+            destinationIndex += d_width;
+         }
+      }
+   }
+   else
+   {
+      ossim_float64 normalizer = 1.0/255.0;
+      // Copy the data.
+      for (band=0; band<num_bands; band++)
+      {
+         T* destinationBand = static_cast<T*>(getBuf(band));
+         destinationIndex = destinationOffset;
+         sourceIndex = sourceOffset;
+         T nullPix = (T)getNullPix(band);
+         T minPix = (T)getMinPix(band);
+         for (ossim_uint32 line = 0; line < clipHeight; ++line)
+         {
+            for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
+            {
+               if(src[sourceIndex+sample] != 255)
+               {
+                  if(src[sourceIndex+sample] != 0)
+                  {
+                     destinationBand[destinationIndex + sample] = (T)(destinationBand[destinationIndex + sample]*
+                                                                      (src[sourceIndex+sample]*normalizer));
+                     if(destinationBand[destinationIndex + sample] == nullPix)
+                     {
+                        destinationBand[destinationIndex + sample] = minPix;
+                     }
+                  }
+                  else
+                  {
+                     destinationBand[destinationIndex + sample] = nullPix;
+                  }
+               }
+               else if(destinationBand[destinationIndex + sample] == nullPix)
+               {
+                  destinationBand[destinationIndex + sample] = minPix;
+               }
+            }
+            sourceIndex += s_width;
+            destinationIndex += d_width;
+         }
+      }
+      
+   }
+}
+
+template <class T> void
+ossimImageData::unloadTileToBsqTemplate(T,  // dummy template arg...
+                                        void* dest,
+                                        const ossimIrect& dest_rect,
+                                        const ossimIrect& clip_rect) const
+{
+   static const char  MODULE[] = "ossimImageData::unloadTileToBsq";
+   
+   // Check the pointers.
+   if (!dest)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE << " ERROR:"
+         << "\nNULL pointer passed to method!  Returning..." << std::endl;
+      return;
+   }
+
+   bool dataIsNull = false;
+   if (getDataObjectStatus() == OSSIM_NULL)
+   {
+      dataIsNull = true;
+   }
+
+   ossimIrect img_rect = getImageRectangle();
+   
+   // Clip the clip_rect to the tile rect.
+   ossimIrect output_clip_rect = clip_rect.clipToRect(img_rect);
+
+   // Clip it again to the destination rect.
+   output_clip_rect = dest_rect.clipToRect(output_clip_rect);
+   
+   // Check the output clip rect for intersection.
+   if (output_clip_rect.hasNans())
+   {
+      return;
+   }
+   if ( !(output_clip_rect.intersects(dest_rect)) )
+   {
+      return;
+   }
+
+   ossim_uint32 num_bands = getNumberOfBands();
+   ossim_uint32 band      = 0;
+   if(!dataIsNull)
+   {
+      ossim_uint32 d_width       = dest_rect.lr().x - dest_rect.ul().x + 1;
+      ossim_uint32 d_band_offset = d_width * (dest_rect.lr().y-dest_rect.ul().y+1);
+      ossim_uint32 s_width       = getWidth();
+      ossim_uint32 s_offset      = (output_clip_rect.ul().y - img_rect.ul().y) *
+                                   s_width + (output_clip_rect.ul().x - img_rect.ul().x);
+
+      T* d        = static_cast<T*>(dest);
+      const T** s = new const T*[num_bands];
+
+      // Grab a pointers to each one.
+      for (band=0; band<num_bands; ++band)
+      {
+         s[band] = reinterpret_cast<const T*>(getBuf(band));
+
+         // Move to first valid pixel.
+         s[band] += s_offset;
+      }
+
+      // Move to first valid pixel.
+      d += (output_clip_rect.ul().y - dest_rect.ul().y) * d_width +
+           (output_clip_rect.ul().x - dest_rect.ul().x);
+
+      for (band=0; band<num_bands; ++band)
+      {
+         ossim_uint32 d_buf_offset = 0;
+
+         for (ossim_int32 line=output_clip_rect.ul().y;
+              line<=output_clip_rect.lr().y; ++line)
+         {
+            ossim_int32 i=0;
+            for (ossim_int32 samp=output_clip_rect.ul().x;
+                 samp<=output_clip_rect.lr().x; ++samp)
+            {
+               d[d_buf_offset+i] = s[band][i];
+               ++i;
+            }
+
+            d_buf_offset += d_width;
+            s[band]      += s_width;
+         }
+         d += d_band_offset;
+      }
+      
+      // Free up memory allocated for pointers.
+      delete [] s;
+   }
+   else
+   {
+      ossim_uint32 d_width       = dest_rect.lr().x - dest_rect.ul().x + 1;
+      ossim_uint32 d_band_offset = d_width * (dest_rect.lr().y-dest_rect.ul().y+1);
+      
+      ossim_uint8* d = static_cast<ossim_uint8*>(dest);
+            
+      // Move to first valid pixel.
+      d += (output_clip_rect.ul().y - dest_rect.ul().y) * d_width +
+           (output_clip_rect.ul().x - dest_rect.ul().x);
+      
+      for (band=0; band<num_bands; ++band)
+      {
+         ossim_uint8 np = static_cast<ossim_uint8>(m_nullPixelValue[band]);
+         ossim_uint32 d_buf_offset = 0;
+         
+         for (ossim_int32 line=output_clip_rect.ul().y;
+              line<=output_clip_rect.lr().y; ++line)
+         {
+            ossim_int32 i=0;
+            for (ossim_int32 samp=output_clip_rect.ul().x;
+                 samp<=output_clip_rect.lr().x; ++samp)
+            {
+               d[d_buf_offset+i] = np;
+               ++i;
+            }
+            
+            d_buf_offset += d_width;
+         }
+         d += d_band_offset;
+      }
+   }
+}
+
+template <class T> void
+ossimImageData::unloadBandToBsqTemplate(T,  // dummy template arg...
+                                        void* dest,
+                                        ossim_uint32 src_band,
+                                        ossim_uint32 dest_band,
+                                        const ossimIrect& dest_rect,
+                                        const ossimIrect& clip_rect,
+                                        OverwriteBandRule ow_type) const
+{
+   static const char  MODULE[] = "ossimImageData::unloadBandToBsq";
+
+   // Check the pointers.
+   if (!dest)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE << " ERROR:"
+         << "\nNULL pointer passed to method!  Returning..." << std::endl;
+      return;
+   }
+
+   bool dataIsNull = false;
+   if (getDataObjectStatus() == OSSIM_NULL)
+   {
+      dataIsNull = true;
+   }
+
+   ossimIrect img_rect = getImageRectangle();
+
+   // Clip the clip_rect to the tile rect.
+   ossimIrect output_clip_rect = clip_rect.clipToRect(img_rect);
+
+   // Clip it again to the destination rect.
+   output_clip_rect = dest_rect.clipToRect(output_clip_rect);
+
+   // Check the output clip rect for intersection.
+   if (output_clip_rect.hasNans())
+   {
+      return;
+   }
+   if ( !(output_clip_rect.intersects(dest_rect)) )
+   {
+      return;
+   }
+
+   ossim_uint32 num_bands = getNumberOfBands();
+   ossim_uint32 band      = 0;
+   if(!dataIsNull)
+   {
+      ossim_uint32 d_width       = dest_rect.lr().x - dest_rect.ul().x + 1;
+      ossim_uint32 d_band_offset = d_width * (dest_rect.lr().y-dest_rect.ul().y+1);
+      ossim_uint32 s_width  = getWidth();
+      ossim_uint32 s_offset = (output_clip_rect.ul().y - img_rect.ul().y) *
+         s_width + (output_clip_rect.ul().x - img_rect.ul().x);
+
+      T* d        = static_cast<T*>(dest);
+      const T** s = new const T*[num_bands];
+
+      // Grab a pointers to each one.
+      for (band=0; band<num_bands; ++band)
+      {
+         s[band] = reinterpret_cast<const T*>(getBuf(band));
+
+         // Move to first valid pixel.
+         s[band] += s_offset;
+      }
+
+      // Move to first valid pixel.
+      d += (output_clip_rect.ul().y - dest_rect.ul().y) * d_width +
+           (output_clip_rect.ul().x - dest_rect.ul().x);
+
+      ossim_uint32 d_dest_band_offset = dest_band * d_band_offset;
+      ossim_uint32 d_buf_offset = 0;
+
+      for (ossim_int32 line=output_clip_rect.ul().y;
+         line<=output_clip_rect.lr().y; ++line)
+      {
+         ossim_int32 i=0;
+         for (ossim_int32 samp=output_clip_rect.ul().x;
+            samp<=output_clip_rect.lr().x; ++samp)
+         {
+            ossim_uint32 d_pixel_offset = d_buf_offset+i;
+            ossim_uint32 d_dest_band_pixel_offset = d_pixel_offset + d_dest_band_offset;
+
+            switch( ow_type )
+            {
+               case COLOR_DISCREPANCY:
+               case COLOR_DISCREPANCY_OF_ANY_FROM_DEST:
+               {
+                  T d_dest_band = d[d_dest_band_pixel_offset];
+
+                  for ( band=0; band<num_bands && band!=dest_band; ++band )
+                  {
+                     T d_other_band = d[d_pixel_offset + (band * d_band_offset)];
+
+                     // test for color discrepancy
+                     if ( d_other_band != d_dest_band )
+                     {
+                        d[d_dest_band_pixel_offset] = s[src_band][i];
+                        break;
+                     }
+                  }
+               }
+               break;
+
+               case COLOR_DISCREPANCY_OF_ALL_FROM_DEST:
+               {
+                  T d_dest_band = d[d_dest_band_pixel_offset];
+
+                  bool bFoundSameValue = false;
+                  for ( band=0; band<num_bands && band!=dest_band; ++band )
+                  {
+                     T d_other_band = d[d_pixel_offset + (band * d_band_offset)];
+
+                     // test for color sameness
+                     if ( d_other_band == d_dest_band )
+                     {
+                        bFoundSameValue = true;
+                        break;
+                     }
+                  }
+                  if ( bFoundSameValue == false )
+                  {
+                     d[d_dest_band_pixel_offset] = s[src_band][i];
+                  }
+               }
+               break;
+
+               case COLOR_EQUALITY_OF_ANY_TO_SRC:
+               {
+                  T d_src_band = s[src_band][i];
+
+                  for ( band=0; band<num_bands && band!=dest_band; ++band )
+                  {
+                     T d_other_band = d[d_pixel_offset + (band * d_band_offset)];
+
+                     // test for color discrepancy
+                     if ( d_other_band == d_src_band )
+                     {
+                        d[d_dest_band_pixel_offset] = s[src_band][i];
+                        break;
+                     }
+                  }
+               }
+               break;
+
+               case COLOR_EQUALITY_OF_ALL_TO_SRC:
+               {
+                  T d_src_band = s[src_band][i];
+
+                  bool bFoundDifferentValue = false;
+                  for ( band=0; band<num_bands && band!=dest_band; ++band )
+                  {
+                     T d_other_band = d[d_pixel_offset + (band * d_band_offset)];
+
+                     // test for color discrepancy
+                     if ( d_other_band != d_src_band )
+                     {
+                        bFoundDifferentValue = true;
+                        break;
+                     }
+                  }
+                  if ( bFoundDifferentValue == false )
+                  {
+                     d[d_dest_band_pixel_offset] = s[src_band][i];
+                  }
+               }
+               break;
+
+               case NULL_RULE:
+               default:
+               {
+                  d[d_dest_band_pixel_offset] = s[src_band][i];
+               }
+               break;
+            }
+
+            ++i;
+         }
+
+         d_buf_offset += d_width;
+         s[src_band]  += s_width;
+      }
+
+      // Free up memory allocated for pointers.
+      delete [] s;
+   }
+   else
+   {
+      ossim_uint32 d_width       = dest_rect.lr().x - dest_rect.ul().x + 1;
+      ossim_uint32 d_band_offset = d_width * (dest_rect.lr().y-dest_rect.ul().y+1);
+
+      ossim_uint8* d = static_cast<ossim_uint8*>(dest);
+
+      // Move to first valid pixel.
+      d += (output_clip_rect.ul().y - dest_rect.ul().y) * d_width +
+         (output_clip_rect.ul().x - dest_rect.ul().x);
+
+      for (band=0; band<num_bands; ++band)
+      {
+         ossim_uint8 np = static_cast<ossim_uint8>(m_nullPixelValue[band]);
+         ossim_uint32 d_buf_offset = 0;
+
+         for (ossim_int32 line=output_clip_rect.ul().y;
+            line<=output_clip_rect.lr().y; ++line)
+         {
+            ossim_int32 i=0;
+            for (ossim_int32 samp=output_clip_rect.ul().x;
+               samp<=output_clip_rect.lr().x; ++samp)
+            {
+               d[d_buf_offset+i] = np;
+               ++i;
+            }
+
+            d_buf_offset += d_width;
+         }
+         d += d_band_offset;
+      }
+   }
+}
+
+ossimObject* ossimImageData::dup() const
+{
+   return new ossimImageData(*this);
+}
+
+void ossimImageData::copyTileToNormalizedBuffer(ossim_float64* buf)const
+{
+   if (!buf)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::copyTileToNormalizedBuffer ERROR:"
+         << "\nNull buffer passed to method!  Returning..." << std::endl;
+      return;
+   }
+
+   if (getDataObjectStatus() == OSSIM_NULL)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::copyTileToNormalizedBuffer ERROR:"
+         << "\nThis object is null! Returning..." << std::endl;
+      return;
+   }
+   
+   switch(getScalarType())
+   {
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         memmove(buf, getBuf(), getDataSizeInBytes());
+         break;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         ossim_uint32 upperBound = getWidth()*getHeight()*getNumberOfBands();
+         const ossim_float32* inputBuf = static_cast<const ossim_float32*>(getBuf());
+         for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+         {
+            buf[offset] = inputBuf[offset];
+         }
+         break;
+      }
+      case OSSIM_FLOAT32:
+      {
+         copyTileToNormalizedBuffer((ossim_float32)0, buf);
+         break;
+      }
+      case OSSIM_FLOAT64:
+      {
+         copyTileToNormalizedBuffer((ossim_float64)0, buf);
+         break;
+      }
+      case OSSIM_UINT8:
+      {
+         copyTileToNormalizedBuffer((ossim_uint8)0, buf);
+         break;
+      
+      }
+      case OSSIM_SINT8:
+      {
+         copyTileToNormalizedBuffer((ossim_sint8)0, buf);
+         break;
+      
+      }
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+      {
+         copyTileToNormalizedBuffer((ossim_uint16)0, buf);
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         copyTileToNormalizedBuffer((ossim_sint16)0, buf);
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         copyTileToNormalizedBuffer((ossim_uint32)0, buf);
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         copyTileToNormalizedBuffer((ossim_sint32)0, buf);
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "NOTICE:  copyTileToNormalizedBuffer not implemented yet"
+            << std::endl;
+      }
+      
+   }  // End of "switch(getScalarType())"
+}
+
+template <class T>
+void ossimImageData::copyTileToNormalizedBuffer(T /* dummyTemplate */,
+                                                ossim_float64* buf) const
+{
+   const ossim_uint32 SIZE  = getSizePerBand();
+   const ossim_uint32 BANDS = getNumberOfBands();
+   
+   for(ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      const ossim_float64 MIN_PIX = getMinPix(band);
+      const ossim_float64 MAX_PIX = getMaxPix(band);
+      const ossim_float64 RANGE   = (MAX_PIX-MIN_PIX);
+      const ossim_float64 NP      = getNullPix(band);
+
+      const T* s = (T*)getBuf(band);  // source
+      ossim_float64* d = (ossim_float64*)(buf + (band*SIZE));  // destination
+      
+      for(ossim_uint32 offset = 0; offset < SIZE; ++offset)
+      {
+         ossim_float64 p = s[offset];
+         if(p != NP)
+         {
+            if( p == MIN_PIX)
+            {
+               d[offset] = OSSIM_DEFAULT_MIN_PIX_NORM_DOUBLE;
+            }
+            else
+            {
+               d[offset] = (p-MIN_PIX)/RANGE;
+            }
+         }
+         else
+         {
+            d[offset] = 0.0;
+         }
+      }
+   }   
+}
+
+template <class T>
+void ossimImageData::copyTileToNormalizedBuffer(T /* dummyTemplate */,
+                                                ossim_float32* buf) const
+{
+   const ossim_uint32 SIZE  = getSizePerBand();
+   const ossim_uint32 BANDS = getNumberOfBands();
+   
+   for(ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      const ossim_float64 MIN_PIX = getMinPix(band);
+      const ossim_float64 MAX_PIX = getMaxPix(band);
+      const ossim_float64 RANGE   = (MAX_PIX-MIN_PIX);
+      const ossim_float64 NP      = getNullPix(band);
+      
+      const T* s = (T*)getBuf(band);  // source
+      ossim_float32* d = (ossim_float32*)(buf + (band*SIZE));  // destination
+      
+      for(ossim_uint32 offset = 0; offset < SIZE; ++offset)
+      {
+         ossim_float64 p = s[offset];
+         if(p != NP)
+         {
+            if( p == MIN_PIX)
+            {
+               d[offset] = OSSIM_DEFAULT_MIN_PIX_NORM_FLOAT;
+            }
+            else
+            {
+               d[offset] = (p-MIN_PIX)/RANGE;
+            }
+         }
+         else
+         {
+            d[offset] = 0.0;
+         }
+      }
+   }   
+}
+
+template <class T>
+void ossimImageData::copyTileToNormalizedBuffer(T /* dummyTemplate */,
+                                                ossim_uint32 band,
+                                                ossim_float64* buf) const
+{
+   const ossim_uint32  SIZE    = getSizePerBand();
+   const ossim_float64 MIN_PIX = getMinPix(band);
+   const ossim_float64 MAX_PIX = getMaxPix(band);
+   const ossim_float64 RANGE   = (MAX_PIX-MIN_PIX);
+   const ossim_float64 NP      = getNullPix(band);
+   
+   const T* s = (T*)getBuf(band);  // source
+   ossim_float64* d = (ossim_float64*)(buf);  // destination
+   
+   for(ossim_uint32 offset = 0; offset < SIZE; ++offset)
+   {
+         ossim_float64 p = s[offset];
+         if(p != NP)
+         {
+            if( p == MIN_PIX)
+            {
+               d[offset] = OSSIM_DEFAULT_MIN_PIX_NORM_DOUBLE;
+            }
+            else
+            {
+               d[offset] = (p-MIN_PIX)/RANGE;
+            }
+         }
+         else
+         {
+            d[offset] = 0.0;
+         }
+   }   
+}
+
+template <class T>
+void ossimImageData::copyTileToNormalizedBuffer(T /* dummyTemplate */,
+                                                ossim_uint32 band,
+                                                ossim_float32* buf) const
+{
+   const ossim_uint32  SIZE    = getSizePerBand();
+   const ossim_float64 MIN_PIX = getMinPix(band);
+   const ossim_float64 MAX_PIX = getMaxPix(band);
+   const ossim_float64 RANGE   = (MAX_PIX-MIN_PIX);
+   const ossim_float64 NP      = getNullPix(band);
+   
+   const T* s = (T*)getBuf(band);  // source
+   ossim_float32* d     = (ossim_float32*)(buf);  // destination
+   
+   for(ossim_uint32 offset = 0; offset < SIZE; ++offset)
+   {
+      ossim_float64 p = s[offset];
+      if(p != NP)
+      {
+         if( p == MIN_PIX)
+         {
+            d[offset] = OSSIM_DEFAULT_MIN_PIX_NORM_FLOAT;
+         }
+         else
+         {
+            d[offset] = (p-MIN_PIX)/RANGE;
+         }
+      }
+      else
+      {
+         d[offset] = 0.0;
+      }
+   }   
+}
+
+template <class T>
+void ossimImageData::copyNormalizedBufferToTile(T /* dummyTemplate */,
+                                                ossim_float64* buf)
+{
+   const ossim_uint32 SIZE  = getSizePerBand();
+   const ossim_uint32 BANDS = getNumberOfBands();
+   
+   for(ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      const ossim_float64 MIN_PIX = getMinPix(band);
+      const ossim_float64 MAX_PIX = getMaxPix(band);
+      const ossim_float64 RANGE   = (MAX_PIX-MIN_PIX);
+      const T NP                  = (T)getNullPix(band);
+      
+      ossim_float64* s = buf + (band*SIZE); // source
+      T* d   = (T*)getBuf(band); // destination
+      
+      for(ossim_uint32 offset = 0; offset < SIZE; ++offset)
+      {
+         const ossim_float64 P = s[offset];
+         if(P != 0.0)
+         {
+            d[offset] = (T)(MIN_PIX + RANGE*P);
+         }
+         else
+         {
+            d[offset] = NP;
+         }
+      }
+   }
+}
+
+template <class T>
+void ossimImageData::copyNormalizedBufferToTile(T /* dummyTemplate */,
+                                                ossim_float32* buf)
+{
+   const ossim_uint32 SIZE  = getSizePerBand();
+   const ossim_uint32 BANDS = getNumberOfBands();
+   
+   for(ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      const ossim_float64 MIN_PIX = getMinPix(band);
+      const ossim_float64 MAX_PIX = getMaxPix(band);
+      const ossim_float64 RANGE   = (MAX_PIX-MIN_PIX);
+      const T             NP      = (T)getNullPix(band);
+      
+      ossim_float32* s = buf + (band*SIZE); // source
+      T* d   = (T*)getBuf(band); // destination
+      
+      for(ossim_uint32 offset = 0; offset < SIZE; ++offset)
+      {
+         const ossim_float64 P = s[offset];
+         if(P != 0.0)
+         {
+	   ossim_float64 test = MIN_PIX + RANGE*P;
+	   if(test > MAX_PIX) test = MAX_PIX;
+	   d[offset] = (T)test;
+         }
+         else
+         {
+            d[offset] = NP;
+         }
+      }
+   }
+}
+
+template <class T>
+void ossimImageData::copyNormalizedBufferToTile(T /* dummyTemplate */,
+                                                ossim_uint32 band,
+                                                ossim_float64* buf)
+{
+   const ossim_uint32  SIZE    = getSizePerBand();
+   const ossim_float64 MIN_PIX = getMinPix(band);
+   const ossim_float64 MAX_PIX = getMaxPix(band);
+   const ossim_float64 RANGE   = (MAX_PIX-MIN_PIX);
+   const T             NP      = (T)getNullPix(band);
+   
+   ossim_float64* s = buf; // source
+   T* d   = (T*)getBuf(band); // destination
+   
+   for(ossim_uint32 offset = 0; offset < SIZE; ++offset)
+   {
+      const ossim_float64 P = s[offset];
+      if(P != 0.0)
+      {
+	   ossim_float64 test = MIN_PIX + RANGE*P;
+	   if(test > MAX_PIX) test = MAX_PIX;
+	   d[offset] = (T)test;
+      }
+      else
+      {
+         d[offset] = NP;
+      }
+   }
+}
+
+template <class T>
+void ossimImageData::copyNormalizedBufferToTile(T /* dummyTemplate */,
+                                                ossim_uint32 band,
+                                                ossim_float32* buf)
+{
+   const ossim_uint32 SIZE     = getSizePerBand();
+   const ossim_float64 MIN_PIX = getMinPix(band);
+   const ossim_float64 MAX_PIX = getMaxPix(band);
+   const ossim_float64 RANGE   = (MAX_PIX-MIN_PIX);
+   const T NP                  = (T)getNullPix(band);
+   
+   ossim_float32* s = buf; // source
+   T* d   = (T*)getBuf(band); // destination
+   
+   for(ossim_uint32 offset = 0; offset < SIZE; ++offset)
+   {
+      const ossim_float64 P = s[offset];
+      if(P != 0.0)
+      {
+	   ossim_float64 test = MIN_PIX + RANGE*P;
+	   if(test > MAX_PIX) test = MAX_PIX;
+	   d[offset] = (T)test;
+      }
+      else
+      {
+         d[offset] = NP;
+      }
+   }
+}
+
+void ossimImageData::copyTileBandToNormalizedBuffer(ossim_uint32 band,
+                                                    ossim_float64* buf) const
+{
+   if (!buf)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::copyTileBandToNormalizedBuffer ERROR:"
+         << "\nNull buffer passed to method!  Returning..." << std::endl;
+      return;
+   }
+
+   if (getDataObjectStatus() == OSSIM_NULL)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::copyTileBandToNormalizedBuffer ERROR:"
+         << "\nThis object is null! Returning..." << std::endl;
+      return;
+   }
+   
+   if(!getBuf(band)) return;
+
+   switch(getScalarType())
+   {
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         memmove(buf, getBuf(band), getDataSizeInBytes());
+         break;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         ossim_uint32 upperBound = getWidth()*getHeight();
+         const ossim_float32* inputBuf = static_cast<const ossim_float32*>(getBuf(band));
+         for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+         {
+            buf[offset] = inputBuf[offset];
+         }
+         break;
+      }
+      case OSSIM_FLOAT32:
+      {
+         copyTileToNormalizedBuffer((ossim_float32)0, band, buf);
+         break;
+      }
+      case OSSIM_FLOAT64:
+      {
+         copyTileToNormalizedBuffer((ossim_float64)0, band, buf);
+         break;
+      }
+      case OSSIM_UINT8:
+      {
+         copyTileToNormalizedBuffer((ossim_uint8)0, band, buf);
+         break;
+      
+      }
+      case OSSIM_SINT8:
+      {
+         copyTileToNormalizedBuffer((ossim_sint8)0, band, buf);
+         break;
+      
+      }
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+      {
+         copyTileToNormalizedBuffer((ossim_uint16)0, band, buf);
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         copyTileToNormalizedBuffer((ossim_sint16)0, band, buf);
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         copyTileToNormalizedBuffer((ossim_uint32)0, band, buf);
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         copyTileToNormalizedBuffer((ossim_sint32)0, band, buf);
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimImageData::copyTileBandToNormalizedBuffer ERROR:"
+            << " Unknown scalar type!"
+            << std::endl;
+      }
+      
+   }  // End of "switch(getScalarType())"
+   
+}
+
+void ossimImageData::copyTileToNormalizedBuffer(ossim_float32* buf)const
+{
+   
+   if (!buf)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::copyTileToNormalizedBuffer ERROR:"
+         << "\nNull buffer passed to method!  Returning..." << std::endl;
+      return;
+   }
+
+   if (getDataObjectStatus() == OSSIM_NULL)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::copyTileToNormalizedBuffer ERROR:"
+         << "\nThis object is null! Returning..." << std::endl;
+      return;
+   }
+
+   switch(getScalarType())
+   {
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         ossim_uint32 upperBound = getWidth()*getHeight()*getNumberOfBands();
+         const ossim_float32* inputBuf = static_cast<const ossim_float32*>(getBuf());
+         for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+         {
+            buf[offset] = inputBuf[offset];
+         }
+         break;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         memmove(buf, getBuf(), getDataSizeInBytes());
+         break;
+      }
+      case OSSIM_FLOAT32:
+      {
+         copyTileToNormalizedBuffer((ossim_float32)0, buf);
+         break;
+      }
+      case OSSIM_FLOAT64:
+      {
+         copyTileToNormalizedBuffer((ossim_float64)0, buf);
+         break;
+      }
+      case OSSIM_UINT8:
+      {
+         copyTileToNormalizedBuffer((ossim_uint8)0, buf);
+         break;
+      
+      }
+      case OSSIM_SINT8:
+      {
+         copyTileToNormalizedBuffer((ossim_sint8)0, buf);
+         break;
+      
+      }
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+      {
+         copyTileToNormalizedBuffer((ossim_uint16)0, buf);
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         copyTileToNormalizedBuffer((ossim_sint16)0, buf);
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         copyTileToNormalizedBuffer((ossim_uint32)0, buf);
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         copyTileToNormalizedBuffer((ossim_sint32)0, buf);
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "NOTICE:  copyTileToNormalizedBuffer not implemented yet"
+            << std::endl;
+      }
+      
+   }  // End of "switch(getScalarType())"
+}
+
+void ossimImageData::copyTileBandToNormalizedBuffer(ossim_uint32 band,
+                                                    ossim_float32* buf)const
+{
+   if (!buf)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::copyTileBandToNormalizedBuffer ERROR:"
+         << "\nNull buffer passed to method!  Returning..." << std::endl;
+      return;
+   }
+
+   if (getDataObjectStatus() == OSSIM_NULL)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::copyTileBandToNormalizedBuffer ERROR:"
+         << "\nThis object is null! Returning..." << std::endl;
+      return;
+   }
+
+   switch(getScalarType())
+   {
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         ossim_uint32 upperBound = getWidth()*getHeight();
+         const ossim_float32* inputBuf = static_cast<const ossim_float32*>(getBuf(band));
+         for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+         {
+            buf[offset] = inputBuf[offset];
+         }
+         break;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         memmove(buf, getBuf(band), getSizePerBandInBytes());
+         break;
+      }
+      case OSSIM_FLOAT32:
+      {
+         copyTileToNormalizedBuffer((ossim_float32)0, band, buf);
+         break;
+      }
+      case OSSIM_FLOAT64:
+      {
+         copyTileToNormalizedBuffer((ossim_float64)0, band, buf);
+         break;
+      }
+      case OSSIM_UINT8:
+      {
+         copyTileToNormalizedBuffer((ossim_uint8)0, band, buf);
+         break;
+      
+      }
+      case OSSIM_SINT8:
+      {
+         copyTileToNormalizedBuffer((ossim_sint8)0, band, buf);
+         break;
+      
+      }
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+      {
+         copyTileToNormalizedBuffer((ossim_uint16)0, band, buf);
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         copyTileToNormalizedBuffer((ossim_sint16)0, band, buf);
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         copyTileToNormalizedBuffer((ossim_uint32)0, band, buf);
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         copyTileToNormalizedBuffer((ossim_sint32)0, band, buf);
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimImageData::copyTileBandToNormalizedBuffer ERROR:"
+            << " Unknown scalar type"
+            << std::endl;
+      }
+
+   }  // End of "switch(getScalarType())"
+}
+
+
+void ossimImageData::copyNormalizedBufferToTile(ossim_float64* buf)
+{
+   if (!buf)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::copyNormalizedBufferToTile ERROR:"
+         << "\nNull buffer passed to method!  Returning..." << std::endl;
+      return;
+   }
+
+   if (getDataObjectStatus() == OSSIM_NULL)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::copyNormalizedBufferToTile ERROR:"
+         << "\nThis object is null! Returning..." << std::endl;
+      return;
+   }
+   
+   switch(getScalarType())
+   {
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         memmove(getBuf(), buf, getDataSizeInBytes());
+         break;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         ossim_uint32 upperBound = getWidth()*getHeight()*getNumberOfBands();
+         ossim_float32* inputBuf = static_cast<ossim_float32*>(getBuf());
+         for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+         {
+            inputBuf[offset] = static_cast<ossim_float32>(buf[offset]);
+         }
+         break;
+      }
+      case OSSIM_FLOAT32:
+      {
+         copyNormalizedBufferToTile((ossim_float32)0, buf);
+         break;
+      }
+      case OSSIM_FLOAT64:
+      {
+         copyNormalizedBufferToTile((ossim_float64)0, buf);
+         break;
+      }
+      case OSSIM_UINT8:
+      {
+         copyNormalizedBufferToTile((ossim_uint8)0, buf);
+         break;
+      
+      }
+      case OSSIM_SINT8:
+      {
+         copyNormalizedBufferToTile((ossim_sint8)0, buf);
+         break;
+      
+      }
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+      {
+         copyNormalizedBufferToTile((ossim_uint16)0, buf);
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         copyNormalizedBufferToTile((ossim_sint16)0, buf);
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         copyNormalizedBufferToTile((ossim_uint32)0, buf);
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         copyNormalizedBufferToTile((ossim_sint32)0, buf);
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimImageData::copyNormalizedBufferToTile\n"
+            << "Unknown scalar type!" << std::endl;
+      }
+      
+   } // End of "switch(getScalarType())".
+}
+
+void ossimImageData::copyNormalizedBufferToTile(ossim_uint32 band,
+                                                ossim_float64* buf)
+{
+   if (!buf)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::copyNormalizedBufferToTile ERROR:"
+         << "\nNull buffer passed to method!  Returning..." << std::endl;
+      return;
+   }
+
+   if (getDataObjectStatus() == OSSIM_NULL)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::copyNormalizedBufferToTile ERROR:"
+         << "\nThis object is null! Returning..." << std::endl;
+      return;
+   }
+
+   if(band < getNumberOfBands())
+   {
+      switch(getScalarType())
+      {
+         case OSSIM_NORMALIZED_DOUBLE:
+         {
+            memmove(getBuf(band), buf, getSizePerBandInBytes());
+            break;
+         }
+         case OSSIM_NORMALIZED_FLOAT:
+         {
+            ossim_uint32 upperBound = getWidth()*getHeight();
+            ossim_float32* inputBuf = static_cast<ossim_float32*>(getBuf(band));
+            for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+            {
+               inputBuf[offset] = static_cast<ossim_float32>(buf[offset]);
+            }
+            break;
+         }
+         case OSSIM_FLOAT32:
+         {
+            copyNormalizedBufferToTile((ossim_float32)0, band, buf);
+            break;
+         }
+         case OSSIM_FLOAT64:
+         {
+            copyNormalizedBufferToTile((ossim_float64)0, band, buf);
+            break;
+         }
+         case OSSIM_UINT8:
+         {
+            copyNormalizedBufferToTile((ossim_uint8)0, band, buf);
+            break;
+         
+         }
+         case OSSIM_SINT8:
+         {
+            copyNormalizedBufferToTile((ossim_sint8)0, band, buf);
+            break;
+         
+         }
+         case OSSIM_USHORT11:
+         case OSSIM_UINT16:
+         {
+            copyNormalizedBufferToTile((ossim_uint16)0, band, buf);
+            break;
+         }
+         case OSSIM_SINT16:
+         {
+            copyNormalizedBufferToTile((ossim_sint16)0, band, buf);
+            break;
+         }
+         case OSSIM_UINT32:
+         {
+            copyNormalizedBufferToTile((ossim_uint32)0, band, buf);
+            break;
+         }
+         case OSSIM_SINT32:
+         {
+            copyNormalizedBufferToTile((ossim_sint32)0, band, buf);
+            break;
+         }
+         case OSSIM_SCALAR_UNKNOWN:
+         default:
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimImageData::copyNormalizedBufferToTile\n"
+               << "Unknown scalar type." << std::endl;
+         }
+         
+      } // End of "switch(getScalarType())".
+   }
+}
+
+void ossimImageData::copyNormalizedBufferToTile(ossim_float32* buf)
+{
+   if (!buf)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::copyNormalizedBufferToTile ERROR:"
+         << "\nNull buffer passed to method!  Returning..." << std::endl;
+      return;
+   }
+
+   if (getDataObjectStatus() == OSSIM_NULL)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::copyNormalizedBufferToTile ERROR:"
+         << "\nThis object is null! Returning..." << std::endl;
+      return;
+   }
+
+   switch(getScalarType())
+   {
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         ossim_uint32 upperBound = getWidth()*getHeight()*getNumberOfBands();
+         ossim_float64* inputBuf = static_cast<ossim_float64*>(getBuf());
+         for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+         {
+            inputBuf[offset] = buf[offset];
+         }
+         break;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         memmove(getBuf(), buf, getDataSizeInBytes());
+         break;
+      }
+      case OSSIM_FLOAT32:
+      {
+         copyNormalizedBufferToTile((ossim_float32)0, buf);
+         break;
+      }
+      case OSSIM_FLOAT64:
+      {
+         copyNormalizedBufferToTile((ossim_float64)0, buf);
+         break;
+      }
+      case OSSIM_UINT8:
+      {
+         copyNormalizedBufferToTile((ossim_uint8)0, buf);
+         break;
+         
+      }
+      case OSSIM_SINT8:
+      {
+         copyNormalizedBufferToTile((ossim_sint8)0, buf);
+         break;
+         
+      }
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+      {
+         copyNormalizedBufferToTile((ossim_uint16)0, buf);
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         copyNormalizedBufferToTile((ossim_sint16)0, buf);
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         copyNormalizedBufferToTile((ossim_uint32)0, buf);
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         copyNormalizedBufferToTile((ossim_sint32)0, buf);
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimImageDatacopyNormalizedBufferToTile\n"
+            << "Unknown scalar type!" << std::endl;
+      }
+      
+   }  // End of "switch(getScalarType())".
+}
+
+void ossimImageData::copyNormalizedBufferToTile(ossim_uint32 band,
+                                                ossim_float32* buf)
+{
+   if (!buf)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::copyNormalizedBufferToTile ERROR:"
+         << "\nNull buffer passed to method!  Returning..." << std::endl;
+      return;
+   }
+
+   if (getDataObjectStatus() == OSSIM_NULL)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageData::copyNormalizedBufferToTile ERROR:"
+         << "\nThis object is null! Returning..." << std::endl;
+      return;
+   }
+
+   switch(getScalarType())
+   {
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         ossim_uint32 upperBound = getWidth()*getHeight();
+         ossim_float64* inputBuf = static_cast<ossim_float64*>(getBuf(band));
+         for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+         {
+            inputBuf[offset] = buf[offset];
+         }
+         break;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         memmove(getBuf(band), buf, getSizePerBandInBytes());
+         break;
+      }
+      case OSSIM_FLOAT32:
+      {
+         copyNormalizedBufferToTile((ossim_float32)0, band, buf);
+         break;
+      }
+      case OSSIM_FLOAT64:
+      {
+         copyNormalizedBufferToTile((ossim_float64)0, band, buf);
+         break;
+      }
+      case OSSIM_UINT8:
+      {
+         copyNormalizedBufferToTile((ossim_uint8)0, band, buf);
+         break;
+         
+      }
+      case OSSIM_SINT8:
+      {
+         copyNormalizedBufferToTile((ossim_sint8)0, band, buf);
+         break;
+         
+      }
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+      {
+         copyNormalizedBufferToTile((ossim_uint16)0, band, buf);
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         copyNormalizedBufferToTile((ossim_sint16)0, band, buf);
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         copyNormalizedBufferToTile((ossim_uint32)0, band, buf);
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         copyNormalizedBufferToTile((ossim_sint32)0, band, buf);
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimImageData::copyNormalizedBufferToTile\n"
+            << "Unknown scalar type!" << std::endl;
+      }
+
+   }  // End of "switch(getScalarType())".
+}
+
+ossim_float64 ossimImageData::getMinNormalizedPix() const
+{
+   if (m_scalarType == OSSIM_NORMALIZED_DOUBLE ||
+       m_scalarType == OSSIM_NORMALIZED_FLOAT)
+   {
+      return m_minPixelValue[0];  // Already normalized.
+   }
+   return (1.0 / (m_maxPixelValue[0] - m_minPixelValue[0] + 1.0));
+}
+
+std::ostream& ossimImageData::print(std::ostream& out) const
+{
+   out << getClassName() << "::print:"
+       << "\nm_origin:  " << m_origin << "\n";
+   if(m_nullPixelValue.size())
+   {
+      out << "Null values: ";
+      
+      copy(m_nullPixelValue.begin(),
+           m_nullPixelValue.begin() + getNumberOfBands(),
+           std::ostream_iterator<ossim_float64>(out, " "));
+      out << "\n";
+   }
+   if(m_minPixelValue.size())
+   {
+      out << "Min values:  ";
+      
+      copy(m_minPixelValue.begin(),
+           m_minPixelValue.begin() + getNumberOfBands(),
+           std::ostream_iterator<ossim_float64>(out, " "));
+      out << "\n";
+   }
+   if(m_maxPixelValue.size())
+   {
+      out << "Max values:  ";
+      
+      copy(m_maxPixelValue.begin(),
+           m_maxPixelValue.begin() + getNumberOfBands(),
+           std::ostream_iterator<ossim_float64>(out, " "));
+      out << "\n";
+   }
+   out << "width:            " << getWidth()
+       << "\nheight:           " << getHeight()
+       << "\nimage rectangle:  " << getImageRectangle()
+       << "\nindexed:          " << m_indexedFlag
+       << "\nalpha size:       " << m_alpha.size()
+       << std::endl;
+
+   return ossimRectilinearDataObject::print(out);
+}
+
+void ossimImageData::stretchMinMax()
+{
+   if ( (getDataObjectStatus() != OSSIM_NULL) &&
+        (getDataObjectStatus() != OSSIM_EMPTY) )
+   {
+      switch (getScalarType())
+      {
+         case OSSIM_UINT8:
+         {
+            stretchMinMax(ossim_uint8(0));
+            return;
+         }  
+         case OSSIM_SINT8:
+         {
+            stretchMinMax(ossim_sint8(0));
+            return;
+         }  
+         case OSSIM_UINT16:
+         case OSSIM_USHORT11:
+         {
+            stretchMinMax(ossim_uint16(0));
+            return;
+         }  
+         case OSSIM_SINT16:
+         {
+            stretchMinMax(ossim_sint16(0));
+            return;
+         }  
+         case OSSIM_UINT32:
+         {
+            stretchMinMax(ossim_uint32(0));
+            return;
+         }
+         case OSSIM_SINT32:
+         {
+            stretchMinMax(ossim_sint32(0));
+            return;
+         }  
+         case OSSIM_FLOAT32:
+         case OSSIM_NORMALIZED_FLOAT:
+         {
+            stretchMinMax(ossim_float32(0.0));
+            return;
+         }  
+         case OSSIM_NORMALIZED_DOUBLE:
+         case OSSIM_FLOAT64:
+         {
+            stretchMinMax(ossim_float64(0.0));
+            return;
+         }  
+         case OSSIM_SCALAR_UNKNOWN:
+         default:
+         {
+            setDataObjectStatus(OSSIM_STATUS_UNKNOWN);
+            ossimSetError(getClassName(),
+                          ossimErrorCodes::OSSIM_ERROR,
+                          "ossimImageData::stretchMinMax File %s line %d\n\
+Invalid scalar type:  %d",
+                          __FILE__,
+                          __LINE__,
+                          getScalarType());
+            break;
+         }
+      }
+   }
+}
+
+template <class T> void ossimImageData::stretchMinMax(T /* dummyTemplate */)
+{
+   const ossim_uint32 BANDS  = getNumberOfBands();
+   const ossim_uint32 SPB    = getSizePerBand();
+
+   // scalar min
+   const ossim_float64 S_MIN = ossim::defaultMin(getScalarType());
+
+   // scalar max
+   const ossim_float64 S_MAX = ossim::defaultMax(getScalarType());
+
+   // scalar null
+   const ossim_float64 S_NUL = ossim::defaultNull(getScalarType());
+
+   // scalar range
+   const ossim_float64 S_RNG = S_MAX-S_MIN+1.0;
+
+   for(ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      T* s = static_cast<T*>(getBuf(band));
+
+      if (s)
+      {
+         const ossim_float64 T_NUL = m_nullPixelValue[band]; // tile null
+         const ossim_float64 T_MIN = m_minPixelValue[band];  // tile min
+         const ossim_float64 T_MAX = m_maxPixelValue[band];  // tile max
+         const ossim_float64 T_RNG = (T_MAX-T_MIN)+1;           // tile range
+         const ossim_float64 SPP = S_RNG / T_RNG; // stretch per pixel
+         
+         for(ossim_uint32 i = 0; i < SPB; ++i)
+         {
+            ossim_float64 p = s[i];
+            if ( p == T_NUL )
+            {
+               p = S_NUL;
+            }
+            else if (p <= T_MIN)
+            {
+               p = S_MIN;
+            }
+            else if (p >= T_MAX)
+            {
+               p = S_MAX;
+            }
+            else
+            {
+               // Stretch...
+               p = (p - T_MIN + 1.0) * SPP + S_MIN - 1.0;
+            }
+            s[i] = ossim::round<T>(p);
+         }
+
+         // Set the min, max, null:
+         m_minPixelValue[band]  = S_MIN;
+         m_maxPixelValue[band]  = S_MAX;
+         m_nullPixelValue[band] = S_NUL;
+         
+      }
+   } 
+}
+
+void ossimImageData::computeAlphaChannel()
+{
+   if ( getDataObjectStatus() != OSSIM_NULL )
+   {
+      switch (getScalarType())
+      {
+         case OSSIM_UINT8:
+         {
+            computeAlphaChannel(ossim_uint8(0));
+            return;
+         }  
+         case OSSIM_SINT8:
+         {
+            computeAlphaChannel(ossim_sint8(0));
+            return;
+         }  
+         case OSSIM_UINT16:
+         case OSSIM_USHORT11:
+         {
+            computeAlphaChannel(ossim_uint16(0));
+            return;
+         }  
+         case OSSIM_SINT16:
+         {
+            computeAlphaChannel(ossim_sint16(0));
+            return;
+         }  
+         case OSSIM_UINT32:
+         {
+            computeAlphaChannel(ossim_uint32(0));
+            return;
+         }
+         case OSSIM_SINT32:
+         {
+            computeAlphaChannel(ossim_sint32(0));
+            return;
+         }  
+         case OSSIM_FLOAT32:
+         case OSSIM_NORMALIZED_FLOAT:
+         {
+            computeAlphaChannel(ossim_float32(0.0));
+            return;
+         }  
+         case OSSIM_NORMALIZED_DOUBLE:
+         case OSSIM_FLOAT64:
+         {
+            computeAlphaChannel(ossim_float64(0.0));
+            return;
+         }  
+         case OSSIM_SCALAR_UNKNOWN:
+         default:
+         {
+            setDataObjectStatus(OSSIM_STATUS_UNKNOWN);
+            ossimSetError(getClassName(),
+                          ossimErrorCodes::OSSIM_ERROR,
+                          "ossimImageData::computeAlphaChannel File %s line %d\n\
+Invalid scalar type:  %d",
+                          __FILE__,
+                          __LINE__,
+                          getScalarType());
+            break;
+         }
+      }
+   }
+}
+
+template <class T> void ossimImageData::computeAlphaChannel(T /* dummyTemplate */)
+{
+   const ossim_uint32 SPB = getSizePerBand();
+   const ossim_uint8  ANP = 0;   // Alpha Null Pixel
+   const ossim_uint8  AVP = 255; // Alpha Valid Pixel
+
+   // Allocate the alpha channel if not already.
+   if (m_alpha.size() != SPB)
+   {
+      m_alpha.resize(SPB);
+   }
+
+   if (getDataObjectStatus() == OSSIM_FULL)
+   {
+      memset( static_cast<void*>(&m_alpha.front()),
+              static_cast<int>(AVP),
+              static_cast<int>(SPB) );
+   }
+   else if (getDataObjectStatus() == OSSIM_EMPTY)
+   {
+      // Start with alpha being set to 0.  
+      memset( static_cast<void*>(&m_alpha.front()),
+              static_cast<int>(ANP),
+              static_cast<int>(SPB) );
+   }
+   else // Partial must check each pixel.
+   {
+      const ossim_uint32 BANDS = getNumberOfBands();
+
+      std::vector<T> null_pix(BANDS);
+      std::vector<const T*> buf(BANDS); // Pointer to pixel data.
+      ossim_uint32 band;
+      for(band = 0; band < BANDS; ++band)
+      {
+         buf[band] = static_cast<const T*>(getBuf(band));
+         null_pix[band] = static_cast<T>(m_nullPixelValue[band]);
+      }
+   
+      for(ossim_uint32 i = 0; i < SPB; ++i)
+      {
+         //---
+         // Start with alpha being set to 0.  If any band has a valid pixel set
+         // to 255 and break from band loop.
+         //---
+         m_alpha[i] = ANP;
+         for(band = 0; band < BANDS; ++band)
+         {
+            if (buf[band][i] != null_pix[band])
+            {
+               m_alpha[i] = AVP;
+               break;
+            }
+         }
+      }
+   }
+   
+}  //  End: template <class T> void ossimImageData::computeAlphaChannel
+
+ossim_uint32 ossimImageData::getWidth()const
+{
+   return m_spatialExtents[0];
+}
+
+ossim_uint32 ossimImageData::getHeight()const
+{
+   return m_spatialExtents[1];
+}
+
+void ossimImageData::getWidthHeight(ossim_uint32& w, ossim_uint32& h)
+{
+   w = m_spatialExtents[0];
+   h = m_spatialExtents[1];
+}
+
+void ossimImageData::setWidth(ossim_uint32 width)
+{
+   m_spatialExtents[0] = width;
+}
+
+void ossimImageData::setHeight(ossim_uint32 height)
+{
+   m_spatialExtents[1] = height;
+}
+
+void ossimImageData::setWidthHeight(ossim_uint32 w, ossim_uint32 h)
+{
+   m_spatialExtents[0] = w;
+   m_spatialExtents[1] = h;
+}
+
+void ossimImageData::setOrigin(const ossimIpt& origin)
+{
+   m_origin = origin;
+}
+
+ossim_uint32 ossimImageData::getDataSizeInBytes()const
+{
+   return getSizeInBytes();
+}
+
+void ossimImageData::copyLine(const void* src,
+                              ossim_int32 lineNumber,
+                              ossim_int32 lineStartSample,
+                              ossim_int32 lineStopSample,
+                              ossimInterleaveType lineInterleave)
+{
+   switch(m_scalarType)
+   {
+      case OSSIM_UINT8:
+      {
+         copyLineTemplate((ossim_uint8)0, src, lineNumber, lineStartSample,
+                          lineStopSample, lineInterleave);
+         break;
+      }
+      case OSSIM_SINT8:
+      {
+         copyLineTemplate((ossim_sint8)0, src, lineNumber, lineStartSample,
+                          lineStopSample, lineInterleave);
+         break;
+         
+      }
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+      {
+         copyLineTemplate((ossim_uint16)0, src, lineNumber, lineStartSample,
+                          lineStopSample, lineInterleave);
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         copyLineTemplate((ossim_sint16)0, src, lineNumber, lineStartSample,
+                          lineStopSample, lineInterleave);
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         copyLineTemplate((ossim_uint32)0, src, lineNumber, lineStartSample,
+                          lineStopSample, lineInterleave);
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         copyLineTemplate((ossim_sint32)0, src, lineNumber, lineStartSample,
+                          lineStopSample, lineInterleave);
+         break;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT32:
+      {
+         copyLineTemplate((ossim_float32)0.0, src, lineNumber, lineStartSample,
+                          lineStopSample, lineInterleave);
+         break;
+      }
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+      {
+         copyLineTemplate((ossim_float64)0.0, src, lineNumber, lineStartSample,
+                          lineStopSample, lineInterleave);
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         // Shouldn't hit this.
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimImageData::copyLine Unsupported scalar type!"
+            << std::endl;
+         break;
+      }
+   }
+   
+} // End: void ossimImageData::copyLine
+
+template <class T>
+void ossimImageData::copyLineTemplate(T /* dummyTemplate */,
+                                      const void* src,
+                                      ossim_int32 lineNumber,
+                                      ossim_int32 lineStartSample,
+                                      ossim_int32 lineStopSample,
+                                      ossimInterleaveType lineInterleave)
+{
+   if (src)
+   {
+      const ossimIrect RECT = getImageRectangle();
+
+      // Check for intersect:
+      if ( ( lineNumber       >= RECT.ul().y)     &&
+           ( lineNumber       <= RECT.lr().y)     &&
+           ( lineStartSample  <  lineStopSample)  &&
+           ( lineStartSample  <= RECT.lr().x)     &&
+           ( lineStopSample   >= RECT.ul().x) )
+      {
+         const ossim_int32 BANDS = static_cast<ossim_int32>(m_numberOfDataComponents);
+         const ossim_int32 START_SAMP =
+            (lineStartSample > RECT.ul().x)?lineStartSample:RECT.ul().x;
+         const ossim_int32 STOP_SAMP  =
+            (lineStopSample  < RECT.lr().x)?lineStopSample:RECT.lr().x;
+         const ossim_int32 SAMPS = STOP_SAMP - START_SAMP + 1;
+
+         std::vector<T*> d(BANDS);
+
+         ossim_int32 band;
+         for (band = 0; band < BANDS; ++band)
+         {
+            d[band] = static_cast<T*>(getBuf(band));
+
+            // Position at start sample.
+            d[band] +=  (lineNumber - RECT.ul().y) * RECT.width() + (START_SAMP - RECT.ul().x);
+         }
+         
+         if (lineInterleave == OSSIM_BIP)
+         {
+            const T* S = static_cast<const T*>(src); // Source buffer:
+            
+            // Position at start sample.
+            S += (START_SAMP - lineStartSample) * BANDS;
+            
+            ossim_int32 srcOffset = 0;
+            for (ossim_int32 samp = 0; samp < SAMPS; ++samp)
+            {
+               for (band = 0; band < BANDS; ++band)
+               {
+                  d[band][samp] = S[srcOffset++];
+               }
+            }
+         }
+         else
+         {
+            const ossim_int32 W = lineStopSample - lineStartSample + 1;
+            std::vector<const T*> S(BANDS);
+            for (band = 0; band < BANDS; ++band)
+            {
+               S[band] = static_cast<const T*>(src) + (START_SAMP - lineStartSample);
+               if (band)
+               {
+                  S[band] += band * W; // Move to line.
+               }
+            }
+
+            for (band = 0; band < BANDS; ++band)
+            {
+               for (ossim_int32 samp = 0; samp < SAMPS; ++samp)
+               {
+                  d[band][samp] = S[band][samp];
+               }
+            }
+         }
+         
+      } // intersect check
+      
+   } // if (src)
+   
+} // End: template <class T> void ossimImageData::copyLineTemplate
+
+void ossimImageData::setIndexedFlag(bool flag)
+{
+   m_indexedFlag = flag;
+}
+
+bool ossimImageData::getIndexedFlag() const
+{
+   return m_indexedFlag;
+}
+
+bool ossimImageData::saveState(ossimKeywordlist& kwl, const char* prefix)const
+{
+   bool result = ossimRectilinearDataObject::saveState(kwl, prefix);
+   ossimString null_pixels;
+   ossimString min_pixels;
+   ossimString max_pixels;
+   ossim::toSimpleStringList(null_pixels, m_nullPixelValue);
+   ossim::toSimpleStringList(min_pixels, m_minPixelValue);
+   ossim::toSimpleStringList(max_pixels, m_maxPixelValue);
+   
+   kwl.add(prefix, "null_pixels", null_pixels, true);
+   kwl.add(prefix, "min_pixels", min_pixels, true);
+   kwl.add(prefix, "max_pixels", max_pixels, true);
+   
+   ossimString alpha;
+   ossim::toSimpleStringList(alpha, m_alpha);
+   kwl.add(prefix, "alpha", alpha, true);
+   kwl.add(prefix, "indexed", m_indexedFlag, true);
+   kwl.add(prefix, "origin", m_origin.toString(), true);
+   return result;
+   
+}
+
+bool ossimImageData::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   bool result = ossimRectilinearDataObject::loadState(kwl, prefix);
+   m_spatialExtents.resize(2);
+   if(result)
+   {
+      const char* null_pixels = kwl.find(prefix, "null_pixels");
+      const char* min_pixels = kwl.find(prefix, "min_pixels");
+      const char* max_pixels = kwl.find(prefix, "max_pixels");
+      const char* alpha = kwl.find(prefix, "alpha");
+      const char* origin = kwl.find(prefix, "origin");
+      const char* indexed = kwl.find(prefix, "indexed");
+      ossimString rectString = kwl.find(prefix, "rect");
+      const char* numberOfBands = kwl.find(prefix, "number_bands");
+      m_nullPixelValue.clear();
+      m_minPixelValue.clear();
+      m_maxPixelValue.clear();
+      m_alpha.clear();
+      if(null_pixels)
+      {
+         if(!ossim::toSimpleVector(m_nullPixelValue, ossimString(null_pixels)))
+         {
+            return false;
+         }
+      }
+      if(min_pixels)
+      {
+         if(!ossim::toSimpleVector(m_minPixelValue, ossimString(min_pixels)))
+         {
+            return false;
+         }
+      }
+      if(max_pixels)
+      {
+         if(!ossim::toSimpleVector(m_maxPixelValue, ossimString(max_pixels)))
+         {
+            return false;
+         }
+      }
+      if(alpha)
+      {
+         if(!ossim::toSimpleVector(m_alpha, ossimString(alpha)))
+         {
+            return false;
+         }
+      }
+      if(origin)
+      {
+         m_origin.toPoint(origin);
+      }
+      m_indexedFlag = false;
+      if(indexed)
+      {
+         m_indexedFlag = ossimString(indexed).toBool();
+      }
+      if(!rectString.empty())
+      {
+        ossimIrect rect;
+
+        if(rect.toRect(rectString))
+        {
+          setImageRectangle(rect);
+        }
+      }
+      if(numberOfBands)
+      {
+        ossim_uint32 nBands = ossimString(numberOfBands).toUInt32();
+        setNumberOfDataComponents(nBands);
+        if(m_nullPixelValue.empty()||
+          m_minPixelValue.empty()||
+          m_maxPixelValue.empty())
+          {
+            initializeDefaults();
+          }
+      }
+   }
+   
+   return result;
+}                     
+
diff --git a/ossim/src/ossim/imaging/ossimImageDataFactory.cpp b/ossim/src/ossim/imaging/ossimImageDataFactory.cpp
new file mode 100644
index 0000000..7f2287d
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageDataFactory.cpp
@@ -0,0 +1,260 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// Contributor: David A. Horner (DAH) - http://dave.thehorners.com
+// 
+//*************************************************************************
+// $Id: ossimImageDataFactory.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimU8ImageData.h>
+#include <ossim/imaging/ossimU11ImageData.h>
+#include <ossim/imaging/ossimU16ImageData.h>
+#include <ossim/imaging/ossimS16ImageData.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+
+// Static trace for debugging
+static ossimTrace traceDebug("ossimImageDataFactory:debug");
+
+ossimImageDataFactory* ossimImageDataFactory::theInstance = 0;
+OpenThreads::Mutex ossimImageDataFactory::theInstanceMutex;
+ossimImageDataFactory::ossimImageDataFactory() 
+{
+   theInstance = 0;
+}
+
+ossimImageDataFactory::~ossimImageDataFactory()
+{
+   if(theInstance)
+   {
+      //delete theInstance;
+      theInstance = 0;
+   }
+}
+
+ossimImageDataFactory* ossimImageDataFactory::instance()
+{
+   theInstanceMutex.lock();
+   if(!theInstance)
+   {
+      theInstance = new ossimImageDataFactory;
+   }
+   theInstanceMutex.unlock();
+   return theInstance;
+}
+
+ossimRefPtr<ossimImageData> ossimImageDataFactory::create(
+   ossimSource* owner,
+   ossimScalarType scalar,
+   ossim_uint32 bands)const
+{
+   ossimIpt tileSize;
+   ossim::defaultTileSize(tileSize);
+   ossim_uint32 width  = tileSize.x;
+   ossim_uint32 height = tileSize.y;
+   
+   // do some bounds checking and initialize to a default
+   bands  = (bands>0)?bands:1;
+   scalar = scalar != OSSIM_SCALAR_UNKNOWN?scalar:OSSIM_UINT8;
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimImageDataFactory::create DEBUG:"
+         << "\nCaller:  "
+         << (owner ? owner->getClassName().c_str() : "unknown")
+         << "\nbands:   " << bands
+         << "\nwidth:   " << width
+         << "\nheight:  " << height
+         << "\nScalar type:  "
+         << (ossimScalarTypeLut::instance()->getEntryString(scalar))
+         << std::endl;
+   }
+   
+   ossimRefPtr<ossimImageData> result = 0;
+   switch(scalar)
+   {
+      case OSSIM_UINT8:
+      {
+         result = new ossimU8ImageData(owner, bands, width, height);
+         break;
+      }
+      case OSSIM_USHORT11:
+      {
+         result = new ossimU11ImageData(owner, bands, width, height);
+         break;
+      }
+      case OSSIM_UINT16:
+      {
+         result = new ossimU16ImageData(owner, bands, width, height);
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         result = new ossimS16ImageData(owner, bands, width, height);
+         break;
+      }
+      default:
+      {
+         // create a generic image data implementation.
+         result = new ossimImageData(owner, scalar, bands, width, height);
+
+         // Set the scalar type for stretching.
+         ossimImageSource* inputSource = dynamic_cast<ossimImageSource*>(owner);
+         if( inputSource )
+         {
+            for(ossim_uint32 band = 0; band < bands; ++band)
+            {
+               result->setMinPix(inputSource->getMinPixelValue(band), band);
+               result->setMaxPix(inputSource->getMaxPixelValue(band), band);
+               result->setNullPix(inputSource->getNullPixelValue(band), band);
+            }
+         }
+         break;
+      }
+   }
+
+   return result;
+}
+
+ossimRefPtr<ossimImageData> ossimImageDataFactory::create(
+   ossimSource* owner,
+   ossimScalarType scalar,
+   ossim_uint32 bands,
+   ossim_uint32 width,
+   ossim_uint32 height)const
+{
+   ossimIpt tileSize;
+   ossim::defaultTileSize(tileSize);
+   // do some bounds checking and initialize to a default
+   bands  = bands  > 0?bands:1;
+   width  = width  > 0?width:tileSize.x;
+   height = height > 0?height:tileSize.y;
+   scalar = scalar != OSSIM_SCALAR_UNKNOWN?scalar:OSSIM_UINT8;
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimImageDataFactory::create DEBUG:"
+         << "\nCaller:  "
+         << (owner ? owner->getClassName().c_str() : "unknown")
+         << "\nbands:   " << bands
+         << "\nwidth:   " << width
+         << "\nheight:  " << height
+         << "\nScalar type:  "
+         << (ossimScalarTypeLut::instance()->getEntryString(scalar))
+         << std::endl;
+   }
+   
+   ossimRefPtr<ossimImageData> result = 0;
+   switch(scalar)
+   {
+      case OSSIM_UINT8:
+      {
+         result = new ossimU8ImageData(owner, bands, width, height);
+         break;
+      }
+      case OSSIM_USHORT11:
+      {
+         result = new ossimU11ImageData(owner, bands, width, height);
+         break;
+      }
+      case OSSIM_UINT16:
+      {
+         result = new ossimU16ImageData(owner, bands, width, height);
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         result = new ossimS16ImageData(owner, bands, width, height);
+         break;
+      }
+      default:
+      {
+         // create a generic image data implementation.
+         result = new ossimImageData(owner, scalar, bands, width, height);
+         break;
+      }
+   }
+
+   return result;
+}
+
+ossimRefPtr<ossimImageData> ossimImageDataFactory::create(
+   ossimSource* owner,
+   ossim_uint32 bands,
+   ossimImageSource* inputSource)const
+{
+   ossimRefPtr<ossimImageData> result = 0;
+
+   if(inputSource)
+   {
+      ossimScalarType scalar = inputSource->getOutputScalarType();
+      ossim_uint32 width  = inputSource->getTileWidth();
+      ossim_uint32 height = inputSource->getTileHeight();
+
+      result = create(owner, scalar, bands, width, height);
+      if ( result.valid() )
+      {
+         for(ossim_uint32 band = 0; band < bands; ++band)
+         {
+            result->setMinPix(inputSource->getMinPixelValue(band),   band);
+            result->setMaxPix(inputSource->getMaxPixelValue(band),   band);
+            result->setNullPix(inputSource->getNullPixelValue(band), band);
+         }
+      }
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageDataFactory::create ERROR:"
+         << "\nNULL input source!" << std::endl;
+   }
+   
+   return result;
+}
+
+
+ossimRefPtr<ossimImageData> ossimImageDataFactory::create(
+   ossimSource* owner,
+   ossimImageSource* inputSource)const
+{
+   ossimRefPtr<ossimImageData> result = 0;
+
+   if(inputSource)
+   {
+      ossimScalarType scalar = inputSource->getOutputScalarType();
+      ossim_uint32 bands  = inputSource->getNumberOfOutputBands();
+      ossim_uint32 width  = inputSource->getTileWidth();
+      ossim_uint32 height = inputSource->getTileHeight();
+
+      result = create(owner, scalar, bands, width, height);
+      if ( result.valid() )
+      {
+         for(ossim_uint32 band = 0; band < bands; ++band)
+         {
+            result->setMinPix(inputSource->getMinPixelValue(band),   band);
+            result->setMaxPix(inputSource->getMaxPixelValue(band),   band);
+            result->setNullPix(inputSource->getNullPixelValue(band), band);
+         }
+      }
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimImageDataFactory::create ERROR:"
+         << "\nNULL input source!" << std::endl;
+   }
+
+   return result;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimImageDataHelper.cpp b/ossim/src/ossim/imaging/ossimImageDataHelper.cpp
new file mode 100644
index 0000000..a5e6600
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageDataHelper.cpp
@@ -0,0 +1,608 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimImageDataHelper.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimImageDataHelper.h>
+#include <ossim/base/ossimPolyArea2d.h>
+#include <ossim/base/ossimLine.h>
+#include <vector>
+#include <algorithm>
+
+ossimImageDataHelper::ossimImageDataHelper(ossimImageData* imageData)
+{
+   setImageData(imageData);
+}
+
+
+void ossimImageDataHelper::setImageData(ossimImageData* imageData)
+{
+   theImageData = imageData;
+   if(theImageData)
+   {
+      theImageRectangle     = theImageData->getImageRectangle();
+      thePolyImageRectangle = theImageRectangle;
+//       thePolyImageRectangle = ossimPolyArea2d(theImageRectangle.ul(),
+//                                               theImageRectangle.ur(),
+//                                               theImageRectangle.lr(),
+//                                               theImageRectangle.ll());
+      theOrigin = theImageRectangle.ul();
+   }
+}
+
+void ossimImageDataHelper::copyInputToThis(const void* input,
+                                           const ossimPolygon& region,
+                                           bool clipPoly)
+{
+   if(!theImageData) return;
+   switch(theImageData->getScalarType())
+   {
+      case OSSIM_UCHAR:
+      {
+         copyInputToThis(reinterpret_cast<const ossim_uint8*>(input),
+                         region,
+                         clipPoly);
+         break;
+      }
+      case OSSIM_USHORT16:
+      case OSSIM_USHORT11:
+      {
+         copyInputToThis(reinterpret_cast<const ossim_uint16*>(input),
+                         region,
+                         clipPoly);
+         break;
+      }
+      case OSSIM_SSHORT16:
+      {
+         copyInputToThis(reinterpret_cast<const ossim_sint16*>(input),
+                         region,
+                         clipPoly);
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+          copyInputToThis(reinterpret_cast<const ossim_sint32*>(input),
+                          region,
+                          clipPoly);
+          break;
+      }
+      case OSSIM_FLOAT:
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         copyInputToThis(reinterpret_cast<const float*>(input),
+                         region,
+                         clipPoly);
+         break;
+      }
+      case OSSIM_DOUBLE:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         copyInputToThis(reinterpret_cast<const double*>(input),
+                         region,
+                         clipPoly);
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         break;
+      }
+   }   
+}
+
+void ossimImageDataHelper::fill(const ossimRgbVector& color,
+                                std::vector<ossimPolygon>& regionList,
+                                bool clipPoly)
+{
+   int i = 0;
+
+   for(i = 0; i < (int)regionList.size();++i)
+   {
+      fill(color,
+           regionList[i],
+           clipPoly);
+   }
+}
+
+
+void ossimImageDataHelper::fill(const double* values,
+                                std::vector<ossimPolygon>& regionList,
+                                bool clipPoly)
+{
+   int i = 0;
+
+   for(i = 0; i < (int)regionList.size();++i)
+   {
+      fill(values,
+           regionList[i],
+           clipPoly);
+   }
+}
+
+void ossimImageDataHelper::fill(const ossimRgbVector& color,
+                                const ossimPolygon& region,
+                                bool clipPoly)
+{
+   double colorArray[3];
+
+   colorArray[0] = color.getR();
+   colorArray[1] = color.getG();
+   colorArray[2] = color.getB();
+   switch(theImageData->getScalarType())
+   {
+      case OSSIM_UCHAR:
+      {
+         if(theImageData->getNumberOfBands() <= 3)
+         {
+            fill(static_cast<ossim_uint8>(0),
+                 (const double*)colorArray,
+                 region,
+                 clipPoly);
+            
+         }
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      case OSSIM_USHORT16:
+      case OSSIM_USHORT11:
+      case OSSIM_SSHORT16:
+      case OSSIM_FLOAT:
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_DOUBLE:
+      case OSSIM_NORMALIZED_DOUBLE:
+      default:
+      {
+         break;
+      }
+   }
+}
+
+void ossimImageDataHelper::fill(const ossimRgbVector& color,
+                                const ossimIrect& region,
+                                bool clipPoly)
+{
+   double colorArray[3];
+
+   colorArray[0] = color.getR();
+   colorArray[1] = color.getG();
+   colorArray[2] = color.getB();
+
+   switch(theImageData->getScalarType())
+   {
+      case OSSIM_UCHAR:
+      {
+         if(theImageData->getNumberOfBands() <= 3)
+         {
+            fill(static_cast<ossim_uint8>(0),
+                 colorArray,
+                 region,
+                 clipPoly);
+            
+         }
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      case OSSIM_USHORT16:
+      case OSSIM_USHORT11:
+      case OSSIM_SSHORT16:
+      case OSSIM_FLOAT:
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_DOUBLE:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         break;
+      }
+      default:
+         break;
+   }
+}
+
+void ossimImageDataHelper::fill(const double*  values,
+                                const ossimPolygon& region,
+                                bool clipPoly)
+{
+   switch(theImageData->getScalarType())
+   {
+      case OSSIM_UCHAR:
+      {
+         fill(static_cast<ossim_uint8>(0),
+              values,
+              region,
+              clipPoly);
+         break;
+      }
+      case OSSIM_USHORT16:
+      case OSSIM_USHORT11:
+      {
+         fill(static_cast<ossim_uint16>(0),
+              values,
+              region,
+              clipPoly);
+         break;
+      }
+      case OSSIM_SSHORT16:
+      {
+         fill(static_cast<ossim_sint16>(0),
+              values,
+              region,
+              clipPoly);
+         break;
+      }
+      case OSSIM_FLOAT:
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         fill(static_cast<float>(0),
+              values,
+              region,
+              clipPoly);
+         break;
+      }
+      case OSSIM_DOUBLE:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         fill(static_cast<double>(0),
+              values,
+              region,
+              clipPoly);
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         break;
+      }
+   }
+}
+
+void ossimImageDataHelper::fill(const double*  values,
+                                const ossimIrect& region,
+                                bool clipPoly)
+{
+   switch(theImageData->getScalarType())
+   {
+      case OSSIM_UCHAR:
+      {
+         fill(static_cast<ossim_uint8>(0),
+              values,
+              region,
+              clipPoly);
+         break;
+      }
+      case OSSIM_USHORT16:
+      case OSSIM_USHORT11:
+      {
+         fill(static_cast<ossim_uint16>(0),
+              values,
+              region,
+              clipPoly);
+         break;
+      }
+      case OSSIM_SSHORT16:
+      {
+         fill(static_cast<ossim_sint16>(0),
+              values,
+              region,
+              clipPoly);
+         break;
+      }
+      case OSSIM_FLOAT:
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         fill(static_cast<float>(0),
+              values,
+              region,
+              clipPoly);
+         break;
+      }
+      case OSSIM_DOUBLE:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         fill(static_cast<double>(0),
+              values,
+              region,
+              clipPoly);
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         break;
+      }
+   }
+}
+
+
+
+template <class T>
+void ossimImageDataHelper::copyInputToThis(const T* inputBuf,
+                                           const ossimPolygon& region,
+                                           bool clipPoly)
+{
+   if(clipPoly)
+   {
+      ossimPolyArea2d polyArea(region);
+      ossimPolyArea2d clipArea = polyArea&thePolyImageRectangle;
+      
+      vector<ossimPolygon> clipList;
+      //      clipArea.getAllVisiblePolygons(clipList);
+      clipArea.getVisiblePolygons(clipList);
+
+      for(ossim_uint32 i = 0; i < clipList.size();++i)
+      {
+         copyInputToThis( inputBuf, clipList[i] );
+      }
+   }
+   else
+   {
+      copyInputToThis( inputBuf, region );
+   }
+}
+
+template <class T>
+void ossimImageDataHelper::copyInputToThis(const T* inputBuf,
+                                           const ossimPolygon& region)
+{ 
+   int n;
+   int i;
+   int y;
+   ossim_int32 miny, maxy, minx, maxx;
+   int x1, y1;
+   int x2, y2;
+   int ind1, ind2;
+   // int ints;
+   vector<int> polyInts;
+   T* buf = reinterpret_cast<T*>(theImageData->getBuf());
+   
+   ossim_int32 blockLength=theImageData->getWidth()*theImageData->getHeight();
+   ossim_int32 bandOffset = 0;
+   
+   region.getIntegerBounds(minx, miny, maxx, maxy);
+   ossim_int32 rowOffset = (miny-theOrigin.y)*theImageData->getWidth();
+   n = region.getVertexCount();
+   /* Fix in 1.3: count a vertex only once */
+   for (y = miny; (y <= maxy); y++)
+   {
+      polyInts.clear();
+      // ints = 0;
+      for (i = 0; (i < n); i++)
+      {
+         if (!i)
+         {
+            ind1 = n - 1;
+            ind2 = 0;
+         }
+         else
+         {
+            ind1 = i - 1;
+            ind2 = i;
+         }
+         y1 = ossim::round<int>(region[ind1].y);
+         y2 = ossim::round<int>(region[ind2].y);
+         if (y1 < y2)
+         {
+            x1 = ossim::round<int>(region[ind1].x);
+            x2 = ossim::round<int>(region[ind2].x);
+         }
+         else if (y1 > y2)
+         {
+            y2 = ossim::round<int>(region[ind1].y);
+            y1 = ossim::round<int>(region[ind2].y);
+            x2 = ossim::round<int>(region[ind1].x);
+            x1 = ossim::round<int>(region[ind2].x);
+         }
+         else
+         {
+            continue;
+         }
+         if ((y >= y1) && (y < y2))
+         {
+            polyInts.push_back((y - y1) * (x2 - x1) / (y2 - y1) + x1);
+         }
+         else if ((y == maxy) && (y > y1) && (y <= y2))
+         {
+            polyInts.push_back((y - y1) * (x2 - x1) / (y2 - y1) + x1);
+         }
+      }
+      std::sort(polyInts.begin(), polyInts.end());
+      
+      for (i = 0; (i < (int)polyInts.size()); i += 2)
+      {
+         ossim_int32 startX = polyInts[i]-theOrigin.x;
+         ossim_int32 endX   = polyInts[i+1]-theOrigin.x;
+         while(startX <= endX)
+         {
+            bandOffset = 0;
+	    int band;
+            for(band = 0; band < (ossim_int32)theImageData->getNumberOfBands();++band)
+            {
+               buf[rowOffset+bandOffset+startX] = (inputBuf[rowOffset+bandOffset+startX]);
+               bandOffset += blockLength;
+            }
+            ++startX;
+         }
+      }
+      rowOffset += theImageData->getWidth();
+   }
+}
+
+template <class T>
+void ossimImageDataHelper::fill(T dummyVariable,
+                                const double* values,
+                                const ossimPolygon& region,
+                                bool clipPoly)
+{
+   if(clipPoly)
+   {
+      ossimPolyArea2d polyArea(region);
+      ossimPolyArea2d clipArea = polyArea&thePolyImageRectangle;
+      
+      vector<ossimPolygon> clipList;
+      
+      clipArea.getVisiblePolygons(clipList);
+      
+      for(ossim_uint32 i = 0; i < clipList.size();++i)
+      {
+         fill( dummyVariable, values, clipList[i] );
+      }
+   }
+   else
+   {
+      fill( dummyVariable, values, region );
+   }
+}
+
+template <class T>
+void ossimImageDataHelper::fill(T dummyVariable,
+                                const double* values,
+                                const ossimIrect& region,
+                                bool clipPoly)
+{
+   if(clipPoly)
+   {
+      fill(dummyVariable,
+           values,
+           region.clipToRect(theImageData->getImageRectangle()));
+   }
+   else
+   {
+      fill(dummyVariable,
+           values,
+           region);
+   }
+}
+
+template <class T>
+void ossimImageDataHelper::fill(T /* dummyVariable */,
+                                const double* values,
+                                const ossimPolygon& region)
+{
+   int n;
+   int i;
+   int y;
+   ossim_int32 miny, maxy, minx, maxx;
+   int x1, y1;
+   int x2, y2;
+   int ind1, ind2;
+   // int ints;
+   vector<int> polyInts;
+   T* buf = reinterpret_cast<T*>(theImageData->getBuf());
+   
+   ossim_int32 blockLength=theImageData->getWidth()*theImageData->getHeight();
+   ossim_int32 bandOffset = 0;
+   
+   region.getIntegerBounds(minx, miny, maxx, maxy);
+   ossim_int32 rowOffset = (miny-theOrigin.y)*theImageData->getWidth();
+   n = region.getVertexCount();
+   /* Fix in 1.3: count a vertex only once */
+   for (y = miny; (y <= maxy); y++)
+   {
+      polyInts.clear();
+      // ints = 0;
+      for (i = 0; (i < n); i++)
+      {
+         if (!i)
+         {
+            ind1 = n - 1;
+            ind2 = 0;
+         }
+         else
+         {
+            ind1 = i - 1;
+            ind2 = i;
+         }
+         y1 = ossim::round<int>(region[ind1].y);
+         y2 = ossim::round<int>(region[ind2].y);
+         if (y1 < y2)
+         {
+            x1 = ossim::round<int>(region[ind1].x);
+            x2 = ossim::round<int>(region[ind2].x);
+         }
+            else if (y1 > y2)
+            {
+               y2 = ossim::round<int>(region[ind1].y);
+               y1 = ossim::round<int>(region[ind2].y);
+               x2 = ossim::round<int>(region[ind1].x);
+               x1 = ossim::round<int>(region[ind2].x);
+            }
+         else
+         {
+            continue;
+         }
+         if ((y >= y1) && (y < y2))
+         {
+            polyInts.push_back((y - y1) * (x2 - x1) / (y2 - y1) + x1);
+         }
+         else if ((y == maxy) && (y > y1) && (y <= y2))
+         {
+            polyInts.push_back((y - y1) * (x2 - x1) / (y2 - y1) + x1);
+         }
+      }
+      std::sort(polyInts.begin(), polyInts.end());
+      
+      for (i = 0; (i < (int)polyInts.size()); i += 2)
+      {
+         ossim_int32 startX = std::abs(polyInts[i]-theOrigin.x);
+         ossim_int32 endX   = std::abs(polyInts[i+1]-theOrigin.x);
+         while(startX <= endX)
+         {
+            bandOffset = 0;
+	    int band;
+            for(band = 0; band < (int)theImageData->getNumberOfBands();++band)
+            {
+               buf[rowOffset+bandOffset+startX] = (T)(values[band]);
+               bandOffset += blockLength;
+            }
+            ++startX;
+         }
+      }
+      rowOffset += theImageData->getWidth();
+   }
+}
+
+template <class T>
+void ossimImageDataHelper::fill(T /* dummyVariable */,
+                                const double* values,
+                                const ossimIrect& region)
+{
+   T* buf = reinterpret_cast<T*>(theImageData->getBuf());
+   
+   ossim_int32 blockLength=theImageData->getWidth()*theImageData->getHeight();
+   ossim_int32 bandOffset = 0;
+   ossim_int32 miny,maxy;
+   ossim_int32 minx, maxx;
+   ossim_int32 y = 0;
+   miny = region.ul().y-theOrigin.y;
+   maxy = region.lr().y-theOrigin.y;
+   minx = region.ul().x-theOrigin.x;
+   maxx = region.lr().x-theOrigin.x;
+   
+   ossim_int32 rowOffset = (miny)*theImageData->getWidth();
+   ossim_int32 startX = minx;
+   ossim_int32 endX   = maxx;
+   ossim_int32 bands  = (ossim_int32)theImageData->getNumberOfBands();
+
+   for (y = miny; (y <= maxy); ++y)
+   {
+      startX=minx;
+      while(startX <= endX)
+      {
+         bandOffset = 0;
+	 int band = 0;
+         for(band = 0; band < bands;++band)
+         {
+            buf[rowOffset+bandOffset+startX] = (T)(values[band]);
+            bandOffset += blockLength;
+         }
+         ++startX;
+      }
+      rowOffset += theImageData->getWidth();
+   }
+}
+ 
+
diff --git a/src/ossim/imaging/ossimImageDisplayWriter.cpp b/ossim/src/ossim/imaging/ossimImageDisplayWriter.cpp
similarity index 100%
rename from src/ossim/imaging/ossimImageDisplayWriter.cpp
rename to ossim/src/ossim/imaging/ossimImageDisplayWriter.cpp
diff --git a/ossim/src/ossim/imaging/ossimImageFileWriter.cpp b/ossim/src/ossim/imaging/ossimImageFileWriter.cpp
new file mode 100644
index 0000000..2019dee
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageFileWriter.cpp
@@ -0,0 +1,1653 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Frank Warmerdam (warmerdam at pobox.com)
+//
+// Description:
+//
+// Contains class declaration for ossimImageFileWriter.
+//*******************************************************************
+//  $Id: ossimImageFileWriter.cpp 23068 2015-01-07 23:08:29Z okramer $
+
+
+#include <tiff.h> /* for tiff compression defines */
+
+#include <ossim/ossimConfig.h>
+#include <ossim/imaging/ossimImageFileWriter.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimMultiResLevelHistogram.h>
+#include <ossim/base/ossimMultiBandHistogram.h>
+#include <ossim/base/ossimHistogram.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimErrorContext.h>
+#include <ossim/base/ossimImageTypeLut.h>
+#include <ossim/base/ossimIoStream.h>
+#include <ossim/base/ossimUnitTypeLut.h>
+#include <ossim/imaging/ossimTiffOverviewBuilder.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimHistogramWriter.h>
+#include <ossim/imaging/ossimImageHistogramSource.h>
+#include <ossim/imaging/ossimMetadataFileWriter.h>
+#include <ossim/imaging/ossimGeomFileWriter.h>
+#include <ossim/imaging/ossimEnviHeaderFileWriter.h>
+#include <ossim/imaging/ossimERSFileWriter.h>
+#include <ossim/imaging/ossimFgdcFileWriter.h>
+#include <ossim/imaging/ossimReadmeFileWriter.h>
+#include <ossim/imaging/ossimScalarRemapper.h>
+#include <ossim/imaging/ossimWorldFileWriter.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimFilenameProperty.h>
+#include <ossim/base/ossimBooleanProperty.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimMapProjectionInfo.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+
+static ossimTrace traceDebug("ossimImageFileWriter:debug");
+static const ossimString AUTO_CREATE_DIRECTORY_KW("auto_create_directory");
+
+#if OSSIM_ID_ENABLED
+static const char OSSIM_ID[] = "$Id: ossimImageFileWriter.cpp 23068 2015-01-07 23:08:29Z okramer $";
+#endif
+
+RTTI_DEF3(ossimImageFileWriter,
+          "ossimImageFileWriter",
+          ossimImageWriter,
+          ossimProcessInterface,
+          ossimConnectableObjectListener)
+
+static const char SCALE_TO_EIGHT_BIT_KW[] = "scale_to_eight_bit";
+
+ossimImageFileWriter::ossimImageFileWriter(const ossimFilename& file,
+                                           ossimImageSource* inputSource,
+                                           ossimObject* owner)
+   : ossimImageWriter(owner,
+                      1,
+                      0,
+                      true,
+                      false),
+     ossimProcessInterface(),
+     ossimConnectableObjectListener(),
+     theViewController(NULL),
+     theProgressListener(NULL),
+     theFilename(file),
+     theOutputImageType(ossimImageTypeLut().getEntryString(OSSIM_IMAGE_TYPE_UNKNOWN)),
+     theWriteImageFlag(true),
+     theWriteOverviewFlag(false),
+     theWriteHistogramFlag(false),
+     theScaleToEightBitFlag(false),
+     theOverviewCompressType(COMPRESSION_NONE),
+     theOverviewJpegCompressQuality(75),
+     theWriteEnviHeaderFlag(false),
+     theWriteErsHeaderFlag(false),     
+     theWriteExternalGeometryFlag(false),
+     theWriteFgdcFlag(false),
+     theWriteJpegWorldFileFlag(false),
+     theWriteReadmeFlag(false),
+     theWriteTiffWorldFileFlag(false),
+     theWriteWorldFileFlag(false),
+     theAutoCreateDirectoryFlag(true),
+     theLinearUnits(OSSIM_UNIT_UNKNOWN),
+     thePixelType(OSSIM_PIXEL_IS_POINT)
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimImageFileWriter::ossimImageFileWriter entered..."
+         << std::endl;
+#ifdef OSSIM_ID_ENABLED
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "OSSIM_ID:  " << OSSIM_ID << std::endl;
+#endif
+   }
+
+   theInputConnection = new ossimImageSourceSequencer(inputSource);
+
+   // now map the sequencer to the same input
+   connectMyInputTo(0, inputSource);
+   initialize();
+
+   // make sure we listen to our input changes so we can change
+   // it for the sequencer as well.
+   ossimImageWriter::addListener((ossimConnectableObjectListener*)this);
+
+   theInputConnection->connectMyInputTo(0, inputSource, false);
+   theAreaOfInterest.makeNan();
+}
+
+ossimImageFileWriter::~ossimImageFileWriter()
+{
+   theInputConnection = 0;
+   theProgressListener = NULL;
+   removeListener((ossimConnectableObjectListener*)this);
+}
+
+void ossimImageFileWriter::initialize()
+{
+   if(theInputConnection.valid())
+   {
+      theInputConnection->initialize();
+
+      //---
+      // Area Of Interest(AOI):
+      // There are two AOIs to keep in sync.
+      // One owned by this base: ossimImageWriter::theAreaOfInterest
+      // One owned by the theInputConntion: ossimImageSourceSequencer::theAreaOfInterest
+      //---
+      if ( theAreaOfInterest.hasNans() == false )
+      {
+         //---
+         // ossimImageSourceSequencer::setAreaOfInterest does more than just set the
+         // variable, so only call if out of sync to avoid wasted cycles.
+         //--- 
+         if ( theAreaOfInterest != theInputConnection->getBoundingRect() )
+         {
+            theInputConnection->setAreaOfInterest( theAreaOfInterest );
+         }
+      }
+      else
+      {
+         // Set this AOI to bounding rect of input.
+         theAreaOfInterest = theInputConnection->getBoundingRect();
+      }
+   }
+}
+
+void ossimImageFileWriter::changeSequencer(ossimImageSourceSequencer* sequencer)
+{
+   if( sequencer )
+   {
+      theInputConnection = sequencer;
+      theInputConnection->connectMyInputTo(0, getInput(0));
+   }
+}
+
+bool ossimImageFileWriter::saveState(ossimKeywordlist& kwl,
+                                 const char* prefix)const
+{
+   kwl.add(prefix,
+           ossimKeywordNames::TYPE_KW,
+           TYPE_NAME(this),
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::FILENAME_KW,
+           theFilename.c_str(),
+           true);
+
+   kwl.add(prefix,
+           "create_envi_hdr",
+           (ossim_uint32)theWriteEnviHeaderFlag,
+           true);
+
+   kwl.add(prefix,
+           "create_ers_hdr",
+           (ossim_uint32)theWriteErsHeaderFlag,
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::CREATE_EXTERNAL_GEOMETRY_KW,
+           (ossim_uint32)theWriteExternalGeometryFlag,
+           true);
+
+   kwl.add(prefix,
+           "create_fgdc",
+           (ossim_uint32)theWriteFgdcFlag,
+           true);
+   
+   kwl.add(prefix,
+           "create_jpeg_world_file",
+           (ossim_uint32)theWriteJpegWorldFileFlag,
+           true);
+
+   kwl.add(prefix,
+           "create_readme",
+           (ossim_uint32)theWriteReadmeFlag,
+           true);
+   
+   kwl.add(prefix,
+           "create_tiff_world_file",
+           (ossim_uint32)theWriteTiffWorldFileFlag,
+           true);
+
+   kwl.add(prefix,
+           "create_world_file",
+           (ossim_uint32)theWriteWorldFileFlag,
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::CREATE_IMAGE_KW,
+           (ossim_uint32)theWriteImageFlag,
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::CREATE_OVERVIEW_KW,
+           (ossim_uint32)theWriteOverviewFlag,
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::CREATE_HISTOGRAM_KW,
+           (ossim_uint32)theWriteHistogramFlag,
+           true);
+
+   kwl.add(prefix,
+           SCALE_TO_EIGHT_BIT_KW,
+           (ossim_uint32)theScaleToEightBitFlag,
+           true);
+   kwl.add(prefix,
+           AUTO_CREATE_DIRECTORY_KW,
+           theAutoCreateDirectoryFlag,
+           true);
+   kwl.add(prefix,
+           ossimKeywordNames::OVERVIEW_COMPRESSION_TYPE_KW,
+           theOverviewCompressType,
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::OVERVIEW_COMPRESSION_QUALITY_KW,
+           theOverviewJpegCompressQuality,
+           true);
+
+   ossimImageTypeLut lut;
+   kwl.add(prefix,
+           ossimKeywordNames::IMAGE_TYPE_KW,
+           theOutputImageType,
+           true);
+
+   //---
+   // When "theLinearUnits" == "unknown" that is a key to the writer to just
+   // use whatever units makes sense for the projection.  Since "unknown"
+   // doesn't look good to the average user in a spec file, change to
+   // "default" if "unknown".  When read back in by the lookup table since
+   // "default" is not a valid "string" theLinearUnits will remain "unknown".
+   // Kind of a hack but it works:)  (drb)
+   //---
+   ossimString os = ossimUnitTypeLut::instance()->
+      getEntryString(theLinearUnits);
+   if (os == "unknown")
+   {
+      os = "default";  // Avoid saving as unknown for user readability.
+   }
+   kwl.add(prefix, "linear_units", os, true);
+
+   // Set the pixel type.
+   ossimString pixelType;
+   getPixelTypeString(pixelType);
+   kwl.add(prefix,
+           ossimKeywordNames::PIXEL_TYPE_KW,
+           pixelType.c_str(),
+           true);
+
+   return ossimSource::saveState(kwl, prefix);
+}
+
+bool ossimImageFileWriter::loadState(const ossimKeywordlist& kwl,
+                                     const char* prefix)
+{
+   // Load the state of the base class.
+   bool result = ossimSource::loadState(kwl, prefix);
+
+   // Get the filename...
+   const char* lookup = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
+   if(lookup)
+   {
+      ossimString filename = lookup;
+
+      lookup =  kwl.find(prefix, ossimKeywordNames::FILEPATH_KW);
+      if(lookup)
+      {
+         filename = ossimString(lookup) + filename;
+      }
+
+      setFilename(filename);
+   }
+
+   lookup = kwl.find(prefix, ossimKeywordNames::PIXEL_TYPE_KW);
+   if(lookup)
+   {
+      if(ossimString(lookup).downcase().contains("area"))
+      {
+         thePixelType = OSSIM_PIXEL_IS_AREA;
+      }
+      else
+      {
+         thePixelType = OSSIM_PIXEL_IS_POINT;
+      }
+   }
+
+   lookup = kwl.find(prefix, "linear_units");
+   if(lookup)
+   {
+      ossimUnitType units = (ossimUnitType)ossimUnitTypeLut::instance()->
+         getEntryNumber(lookup, true);
+      if ( (units == OSSIM_METERS) ||
+           (units == OSSIM_FEET)   ||
+           (units == OSSIM_US_SURVEY_FEET) )
+      {
+         theLinearUnits = units;
+      }
+   }
+
+   lookup = kwl.find(prefix, ossimKeywordNames::CREATE_EXTERNAL_GEOMETRY_KW);
+   if(lookup)
+   {
+      ossimString s = lookup;
+      theWriteExternalGeometryFlag = s.toBool();
+   }
+   
+   lookup = kwl.find(prefix, "create_envi_hdr");
+   if(lookup)
+   {
+      ossimString s = lookup;
+      theWriteEnviHeaderFlag = s.toBool();
+   }
+   
+   lookup = kwl.find(prefix, "create_ers_hdr");
+   if(lookup)
+   {
+      ossimString s = lookup;
+      theWriteErsHeaderFlag = s.toBool();
+   }
+
+   lookup = kwl.find(prefix, "create_fgdc");
+   if(lookup)
+   {
+      ossimString s = lookup;
+      theWriteFgdcFlag = s.toBool();
+   }
+   
+   lookup = kwl.find(prefix, "create_jpeg_world_file");
+   if(lookup)
+   {
+      ossimString s = lookup;
+      theWriteJpegWorldFileFlag = s.toBool();
+   }
+   
+   lookup = kwl.find(prefix, "create_readme");
+   if(lookup)
+   {
+      ossimString s = lookup;
+      theWriteReadmeFlag = s.toBool();
+   }
+   
+   lookup = kwl.find(prefix, "create_tiff_world_file");
+   if(lookup)
+   {
+      ossimString s = lookup;
+      theWriteTiffWorldFileFlag = s.toBool();
+   }
+
+   lookup = kwl.find(prefix, "create_world_file");
+   if(lookup)
+   {
+      ossimString s = lookup;
+      theWriteWorldFileFlag = s.toBool();
+   }
+
+   lookup = kwl.find(prefix, ossimKeywordNames::CREATE_IMAGE_KW);
+   if(lookup)
+   {
+      ossimString s = lookup;
+      theWriteImageFlag = s.toBool();
+   }
+
+   lookup = kwl.find(prefix, ossimKeywordNames::CREATE_OVERVIEW_KW);
+   if(lookup)
+   {
+      ossimString s = lookup;
+      theWriteOverviewFlag = s.toBool();
+   }
+
+   lookup = kwl.find(prefix, ossimKeywordNames::CREATE_HISTOGRAM_KW);
+   if(lookup)
+   {
+      ossimString s = lookup;
+      theWriteHistogramFlag = s.toBool();
+   }
+
+   lookup = kwl.find(prefix, SCALE_TO_EIGHT_BIT_KW);
+   if(lookup)
+   {
+      ossimString s = lookup;
+      theScaleToEightBitFlag = s.toBool();
+   }
+
+   lookup = kwl.find(prefix, AUTO_CREATE_DIRECTORY_KW);
+   if(lookup)
+   {
+      theAutoCreateDirectoryFlag = ossimString(lookup).toBool();
+   }
+   lookup = kwl.find(prefix, ossimKeywordNames::OVERVIEW_COMPRESSION_TYPE_KW);
+   if(lookup)
+   {
+      ossimString s = lookup;
+      theOverviewCompressType = static_cast<ossim_uint16>(s.toUInt32());
+   }
+
+   lookup = kwl.find(prefix, ossimKeywordNames::OVERVIEW_COMPRESSION_QUALITY_KW);
+   if(lookup)
+   {
+      ossimString s = lookup;
+      theOverviewJpegCompressQuality = s.toInt32();
+   }
+
+   const char* outputImageType = kwl.find(prefix, ossimKeywordNames::IMAGE_TYPE_KW);
+   if(outputImageType)
+   {
+      theOutputImageType = outputImageType;
+   }
+
+   if(theInputObjectList.size() != 2)
+   {
+      theInputObjectList.resize(2);
+      theInputListIsFixedFlag = true;
+   }
+
+   theOutputListIsFixedFlag = false;
+
+   return result;
+}
+
+bool ossimImageFileWriter::writeOverviewFile(ossim_uint16 tiff_compress_type,
+                                             ossim_int32 jpeg_compress_quality, 
+                                             bool includeR0) 
+{
+   if(theFilename == "") return false;
+
+   // Get an image handler for the source file.
+   ossimRefPtr<ossimImageHandler> ih
+      = ossimImageHandlerRegistry::instance()->open(theFilename);
+
+   if (ih.valid() == false)
+   {
+      // Set the error...
+      return false;
+   }
+
+   ossimRefPtr<ossimTiffOverviewBuilder> ob = new ossimTiffOverviewBuilder();
+   
+   if ( ob->setInputSource(ih.get()) )
+   {
+      // Give the listener to the overview builder if set.
+      if (theProgressListener)
+      {
+         ob->addListener(theProgressListener);
+      }
+      
+      // Build a new file name for the overview.
+      ossimFilename overview_file = theFilename;
+      overview_file.setExtension(ossimString("ovr"));
+      ob->setCompressionType(tiff_compress_type);
+      ob->setJpegCompressionQuality(jpeg_compress_quality);
+      ob->setOutputFile(overview_file);
+      ob->setCopyAllFlag(includeR0);
+      ob->execute();
+
+      // Remove the listener from the overview builder.
+      if (theProgressListener)
+      {
+         ob->removeListener(theProgressListener);
+      }
+   }
+
+   return true;
+}
+
+bool ossimImageFileWriter::writeEnviHeaderFile() 
+{
+   if( (theFilename == "") || !theInputConnection ||
+       theAreaOfInterest.hasNans())
+   {
+      return false;
+   }
+
+   // Make the file name.
+   ossimFilename outputFile = theFilename;
+   outputFile.setExtension(ossimString("hdr"));
+
+   // Make the writer.
+   ossimRefPtr<ossimMetadataFileWriter> writer =
+      new ossimEnviHeaderFileWriter();
+   
+   // Set things up.
+   writer->connectMyInputTo(0, theInputConnection.get());
+   writer->initialize();
+   writer->setFilename(outputFile);
+   writer->setPixelType(thePixelType);
+   writer->setAreaOfInterest(theAreaOfInterest);
+   
+   // Write it to disk.
+   return writer->execute();
+}
+
+bool ossimImageFileWriter::writeErsHeaderFile() 
+{
+   if( (theFilename == "") || !theInputConnection ||
+       theAreaOfInterest.hasNans())
+   {
+      return false;
+   }
+   
+   // Make the file name.
+   ossimFilename outputFile = theFilename;
+   outputFile.setExtension(ossimString("ers"));
+
+   // Make the writer.
+   ossimRefPtr<ossimMetadataFileWriter> writer =
+	   new ossimERSFileWriter();
+   
+   // Set things up.
+   writer->connectMyInputTo(0, theInputConnection.get());
+   writer->initialize();
+   writer->setFilename(outputFile);
+   writer->setPixelType(thePixelType);
+   writer->setAreaOfInterest(theAreaOfInterest);
+   
+   // Write it to disk.
+   return writer->execute();
+}
+
+bool ossimImageFileWriter::writeExternalGeometryFile() 
+{
+   if( (theFilename == "") || !theInputConnection ||
+       theAreaOfInterest.hasNans())
+   {
+      return false;
+   }
+
+   // Make the file name.
+   ossimFilename geomFile = theFilename;
+   geomFile.setExtension(ossimString("geom"));
+
+   // Make the writer.
+   ossimRefPtr<ossimMetadataFileWriter> writer = new ossimGeomFileWriter();
+
+   // Set things up.
+//   writer->connectMyInputTo(0, theInputConnection.get());
+   writer->connectMyInputTo(0, theInputConnection.get());
+   writer->setFilename(geomFile);
+   writer->initialize();
+   writer->setPixelType(thePixelType);
+   writer->setAreaOfInterest(theAreaOfInterest);
+
+   // Write it to disk.
+   return writer->execute();
+}
+
+bool ossimImageFileWriter::writeFgdcFile() 
+{
+   if( (theFilename == "") || !theInputConnection ||
+       theAreaOfInterest.hasNans())
+   {
+      return false;
+   }
+
+   // Make the file name.
+   ossimFilename outputFile = theFilename;
+   outputFile.setExtension(ossimString("xml"));
+
+   // Make the writer.
+   ossimRefPtr<ossimMetadataFileWriter> writer = new ossimFgdcFileWriter();
+   
+   // Set things up.
+   writer->connectMyInputTo(0, theInputConnection.get());
+   writer->initialize();
+   writer->setFilename(outputFile);
+   writer->setPixelType(thePixelType);
+   writer->setAreaOfInterest(theAreaOfInterest);
+   
+   // Write it to disk.
+   return writer->execute();
+}
+
+bool ossimImageFileWriter::writeJpegWorldFile() 
+{
+   if(theFilename == "")
+   {
+      return false;
+   }
+   
+   // Make the file name.
+   ossimFilename file = theFilename;
+   file.setExtension(ossimString("jpw")); // jpw???
+
+   return writeWorldFile(file);
+}
+
+bool ossimImageFileWriter::writeReadmeFile() 
+{
+   if( (theFilename == "") || !theInputConnection ||
+       theAreaOfInterest.hasNans())
+   {
+      return false;
+   }
+
+   // Make the file name.
+   ossimFilename outputFile = theFilename.noExtension();
+   
+   outputFile += "_readme.txt";
+
+   // Make the writer.
+   ossimRefPtr<ossimMetadataFileWriter> writer =
+      new ossimReadmeFileWriter();
+   
+   // Set things up.
+   writer->connectMyInputTo(0, theInputConnection.get());
+   writer->initialize();
+   writer->setFilename(outputFile);
+   writer->setPixelType(thePixelType);
+   writer->setAreaOfInterest(theAreaOfInterest);
+   
+   // Write it to disk.
+   return writer->execute();
+}
+
+bool ossimImageFileWriter::writeTiffWorldFile() 
+{
+   if(theFilename == "")
+   {
+      return false;
+   }
+   
+   // Make the file name.
+   ossimFilename file = theFilename;
+   file.setExtension(ossimString("tfw"));
+
+   return writeWorldFile(file);
+}
+
+bool ossimImageFileWriter::writeMetaDataFiles() 
+{
+   bool status = true;
+   
+   if(theWriteEnviHeaderFlag&&!needsAborting())
+   {
+      if(writeEnviHeaderFile() == false)
+      {
+         status = false;
+
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "Write of envi header file failed!" << endl;
+      }
+   }
+
+   if(theWriteErsHeaderFlag&&!needsAborting())
+   {
+      if(writeErsHeaderFile() == false)
+      {
+         status = false;
+
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "Write of ers header file failed!" << endl;
+      }
+   }
+
+   if (theWriteExternalGeometryFlag&&!needsAborting())
+   {
+      if( writeExternalGeometryFile() == false)
+      {
+         status = false;
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+            << "Write of geometry file failed!" << endl;
+         }
+      }
+   }
+   if(theWriteFgdcFlag&&!needsAborting())
+   {
+      if(writeFgdcFile() == false)
+      {
+         status = false;
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+            << "Write of fgdc file failed!" << endl;
+         }
+      }
+   }
+   if(theWriteJpegWorldFileFlag&&!needsAborting())
+   {
+      if(writeJpegWorldFile() == false)
+      {
+         status = false;
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+            << "Write of jpeg world file failed!" << endl;
+         }
+      }
+   }
+   if(theWriteReadmeFlag&&!needsAborting())
+   {
+      if(writeReadmeFile() == false)
+      {
+         status = false;
+         
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+            << "Write of readme file failed!" << endl;
+         }
+      }
+   }
+   if(theWriteTiffWorldFileFlag&&!needsAborting())
+   {
+      if(writeTiffWorldFile() == false)
+      {
+         status = false;
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+            << "Write of tiff world file failed!" << endl;
+         }
+      }
+   }
+
+   if(theWriteWorldFileFlag&&!needsAborting())
+   {
+      if(writeWorldFile() == false)
+      {
+         status = false;
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+            << "Write of world file failed!" << endl;
+         }
+      }
+   }
+   
+   if (theWriteHistogramFlag&&!needsAborting())
+   {
+      if (!writeHistogramFile())
+      {
+         status = false;
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+            << "Write of histogram file failed!" << endl;
+         }
+      }
+   }
+
+   return status;
+}
+
+bool ossimImageFileWriter::writeHistogramFile() 
+{
+   if(needsAborting()) return false;
+   if(theFilename == "") return false;
+
+   ossimFilename histogram_file = theFilename;
+   histogram_file.setExtension(ossimString("his"));
+
+   ossimRefPtr<ossimImageHandler> handler = ossimImageHandlerRegistry::instance()->
+      open(theFilename);
+
+   if (!handler)
+   {
+      return false;
+   }
+
+   ossimRefPtr<ossimImageHistogramSource> histoSource = new ossimImageHistogramSource;
+
+   ossimRefPtr<ossimHistogramWriter> writer = new ossimHistogramWriter;
+   histoSource->setMaxNumberOfRLevels(1); // Only compute for r0.
+   histoSource->connectMyInputTo(0, handler.get());
+   histoSource->enableSource();
+   writer->connectMyInputTo(0, histoSource.get());
+   writer->setFilename(histogram_file);
+   writer->addListener(&theStdOutProgress);
+   writer->execute();
+   writer->disconnect();
+   histoSource->disconnect();
+   handler->disconnect();
+   writer = 0; histoSource = 0; handler = 0;
+   return true;
+}
+
+void ossimImageFileWriter::disconnectInputEvent(ossimConnectionEvent& /* event */)
+{
+   if(!getInput(0))
+   {
+      theInputConnection->disconnectMyInput((ossim_int32)0, false);
+   }
+   theViewController = PTR_CAST(ossimViewController, getInput(1));
+
+   initialize();
+}
+
+void ossimImageFileWriter::connectInputEvent(ossimConnectionEvent& /* event */)
+{
+   theInputConnection->connectMyInputTo((ossim_int32)0,
+                                        getInput(0),
+                                        false);
+   theViewController = PTR_CAST(ossimViewController, getInput(1));
+   initialize();
+}
+
+void ossimImageFileWriter::propertyEvent(ossimPropertyEvent& /* event */)
+{
+   initialize();
+}
+
+void ossimImageFileWriter::setOutputImageType(const ossimString& type)
+{
+   theOutputImageType = type;
+}
+
+void ossimImageFileWriter::setOutputImageType(ossim_int32 type)
+{
+   ossimImageTypeLut lut;
+   theOutputImageType = lut.getEntryString(type);
+}
+
+ossimString ossimImageFileWriter::getOutputImageTypeString() const
+{
+   return theOutputImageType;
+
+}
+
+ossim_int32 ossimImageFileWriter::getOutputImageType() const
+{
+   ossimImageTypeLut lut;
+   return lut.getEntryNumber(theOutputImageType);
+}
+
+
+bool ossimImageFileWriter::getWriteImageFlag() const
+{
+   return theWriteImageFlag;
+}
+
+bool ossimImageFileWriter::getWriteHistogramFlag() const
+{
+   return theWriteHistogramFlag;
+}
+
+bool ossimImageFileWriter::getWriteOverviewFlag() const
+{
+   return theWriteOverviewFlag;
+}
+
+bool ossimImageFileWriter::getScaleToEightBitFlag() const
+{
+   return theScaleToEightBitFlag;
+}
+
+bool ossimImageFileWriter::getWriteEnviHeaderFlag() const
+{
+   return theWriteEnviHeaderFlag;
+}
+
+bool ossimImageFileWriter::getWriteErsHeaderFlag() const
+{
+   return theWriteErsHeaderFlag;
+}
+
+bool ossimImageFileWriter::getWriteExternalGeometryFlag() const
+{
+   return theWriteExternalGeometryFlag;
+}
+
+bool ossimImageFileWriter::getWriteFgdcFlag() const
+{
+   return theWriteFgdcFlag;
+}
+
+bool ossimImageFileWriter::getWriteJpegWorldFileFlag() const
+{
+   return theWriteJpegWorldFileFlag;
+}
+
+bool ossimImageFileWriter::getWriteReadmeFlag() const
+{
+   return theWriteReadmeFlag;
+}
+
+bool ossimImageFileWriter::getWriteTiffWorldFileFlag() const
+{
+   return theWriteTiffWorldFileFlag;
+}
+
+bool ossimImageFileWriter::getWriteWorldFileFlag() const
+{
+   return theWriteWorldFileFlag;
+}
+
+void ossimImageFileWriter::setWriteOverviewFlag(bool flag)
+{
+   theWriteOverviewFlag = flag;
+}
+
+void ossimImageFileWriter::setWriteImageFlag(bool flag)
+{
+   theWriteImageFlag = flag;
+}
+
+void ossimImageFileWriter::setWriteHistogramFlag(bool flag)
+{
+   theWriteHistogramFlag = flag;
+}
+
+void ossimImageFileWriter::setScaleToEightBitFlag(bool flag)
+{
+   theScaleToEightBitFlag = flag;
+}
+
+void ossimImageFileWriter::setWriteEnviHeaderFlag(bool flag)
+{
+   theWriteEnviHeaderFlag = flag;
+}
+
+void ossimImageFileWriter::setWriteErsHeaderFlag(bool flag)
+{
+   theWriteErsHeaderFlag = flag;
+}
+
+void ossimImageFileWriter::setWriteExternalGeometryFlag(bool flag)
+{
+   theWriteExternalGeometryFlag = flag;
+}
+
+void ossimImageFileWriter::setWriteFgdcFlag(bool flag)
+{
+   theWriteFgdcFlag = flag;
+}
+
+void ossimImageFileWriter::setWriteJpegWorldFile(bool flag)
+{
+   theWriteJpegWorldFileFlag  = flag;
+}
+
+void ossimImageFileWriter::setWriteReadme(bool flag)
+{
+   theWriteReadmeFlag = flag;
+}
+
+void ossimImageFileWriter::setWriteTiffWorldFile(bool flag)
+{
+   theWriteTiffWorldFileFlag  = flag;
+}
+
+void ossimImageFileWriter::setWriteWorldFile(bool flag)
+{
+   theWriteWorldFileFlag  = flag;
+}
+
+ossimObject* ossimImageFileWriter::getObject()
+{
+   return this;
+}
+
+const ossimObject* ossimImageFileWriter::getObject() const
+{
+   return this;
+}
+
+void ossimImageFileWriter::setAreaOfInterest(const ossimIrect& inputRect)
+{
+   // This sets "theAreaOfInterest".
+   ossimImageWriter::setAreaOfInterest(inputRect);
+   
+   if( theInputConnection.valid() )
+   {
+      //---
+      // ossimImageSourceSequencer::setAreaOfInterest does more than just set the
+      // variable, so only call if out of sync to avoid wasted cycles.
+      //--- 
+      if ( theAreaOfInterest != theInputConnection->getBoundingRect() )
+      {
+         // Set the sequencer area of interest.
+         theInputConnection->setAreaOfInterest(inputRect);
+      }
+   }
+}
+
+ossimImageSourceSequencer* ossimImageFileWriter::getSequencer()
+{
+   return theInputConnection.get();
+}
+
+bool ossimImageFileWriter::execute()
+{
+   static const char MODULE[] = "ossimImageFileWriter::execute";
+   
+   if (!theInputConnection) // Must have a sequencer...
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << " DEBUG:\ntheInputConnection is NULL!" << endl;
+      }
+      return false;
+   }
+   
+   if (theFilename == "") // Must have a filename...
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << " DEBUG:\ntheFilename is empty!" << endl;
+      }
+      return false;
+   }
+   
+   
+   // make sure we have a region of interest
+   if(theAreaOfInterest.hasNans())
+   {
+      theInputConnection->initialize();
+      theAreaOfInterest = theInputConnection->getAreaOfInterest();
+   }
+   else
+   {
+      theInputConnection->setAreaOfInterest(theAreaOfInterest);
+   }
+
+   if(theAreaOfInterest.hasNans()) // Must have an area of interest...
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << " ERROR:  Area of interest has nans!"
+            << "Area of interest:  "
+            << theAreaOfInterest
+            << "\nReturning..." << endl;
+      }
+
+      return false;
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " DEBUG:\n"
+         << "Area of interest:  " << theAreaOfInterest << endl;
+   }
+   
+   ossimRefPtr<ossimImageSource> savedInput;
+   if (theScaleToEightBitFlag)
+   {
+      if(theInputConnection->getOutputScalarType() != OSSIM_UINT8)
+      {
+         savedInput = new ossimScalarRemapper;
+         
+         savedInput->connectMyInputTo(0, theInputConnection->getInput(0));
+         theInputConnection->connectMyInputTo(0, savedInput.get());
+         theInputConnection->initialize();
+      }
+   }
+
+   ossimFilename path = theFilename.path();
+   if (!path.empty() && !path.exists() )
+   {
+      path.createDirectory(true);
+   }
+   setProcessStatus(ossimProcessInterface::PROCESS_STATUS_EXECUTING);
+   //setPercentComplete(0.0); let writeFile set the precent complete
+   bool wroteFile = true;
+   bool result    = true;
+   if (theWriteImageFlag)
+   {
+      wroteFile = writeFile();
+   }
+  
+   /*
+   if(needsAborting())
+   {
+      setProcessStatus(ossimProcessInterface::PROCESS_STATUS_ABORTED);
+   }
+   else
+   {
+      setProcessStatus(ossimProcessInterface::PROCESS_STATUS_NOT_EXECUTING);
+   }
+   */
+   if (theWriteOverviewFlag&&!needsAborting())
+   {
+      // Writing overviews has been mpi'd so do on all processes.
+      if (!writeOverviewFile(theOverviewCompressType,
+                             theOverviewJpegCompressQuality))
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+            << "Write of overview file failed!" << endl;
+         }
+      }
+   }
+
+   if(!needsAborting())
+   {
+      // Do these only on the master process. Note left to right precedence!
+      if (getSequencer() && getSequencer()->isMaster())
+      {
+         if (wroteFile)
+         {
+            if (writeMetaDataFiles() == false)
+            {
+               if(traceDebug())
+               {
+                  ossimNotify(ossimNotifyLevel_WARN)
+                  << "Write of metadata file failed!" << endl;
+               }
+               result = false;
+            }
+         }
+         
+      } // End of "if (getSequencer() && getSequencer()->isMaster()))
+   }
+
+   if(savedInput.valid())
+   {
+      ossimConnectableObject* obj = theInputConnection->getInput(0);
+      if(obj)
+      {
+         theInputConnection->connectMyInputTo(0, obj->getInput(0));
+      }
+   }
+   if(!needsAborting())
+   {
+      setProcessStatus(ossimProcessInterface::PROCESS_STATUS_NOT_EXECUTING);
+   }
+   else 
+   {
+      setProcessStatus(ossimProcessInterface::PROCESS_STATUS_ABORTED);   
+   }
+
+   savedInput = 0;
+   return result;
+}
+
+bool ossimImageFileWriter::writeStream()
+{
+   //---
+   // Not implemented in this class. Derived classed should implement if
+   // they can write to a stream.
+   //--- 
+   return false;
+}
+
+ossimRefPtr<ossimOStream> ossimImageFileWriter::getOutputStream() const
+{
+   //---
+   // Not implemented in this class. Derived classed should implement if
+   // they can write to a stream.
+   //--- 
+   return ossimRefPtr<ossimOStream>();  
+}
+
+bool ossimImageFileWriter::setOutputStream(
+   ossimRefPtr<ossimOStream> /* stream */ )
+{
+   //---
+   // Not implemented in this class. Derived classed should implement if
+   // they can write to a stream.
+   //---
+   return false;
+}
+
+bool ossimImageFileWriter::setOutputStream(std::ostream& /* str */)
+{
+   //---
+   // Not implemented in this class. Derived classed should implement if
+   // they can write to a stream.
+   //---
+   return false;
+}
+
+
+void ossimImageFileWriter::setPercentComplete(double percentComplete)
+{
+   ossimProcessInterface::setPercentComplete(percentComplete);
+   ossimProcessProgressEvent event(this, percentComplete);
+   fireEvent(event);
+}
+
+void ossimImageFileWriter::setOutputName(const ossimString& outputName)
+{
+   ossimImageWriter::setOutputName(outputName);
+   setFilename(ossimFilename(outputName));
+}
+
+void ossimImageFileWriter::setFilename(const ossimFilename& file)
+{
+   theFilename = file;
+}
+
+const ossimFilename& ossimImageFileWriter::getFilename()const
+{
+   return theFilename;
+}
+
+bool ossimImageFileWriter::canConnectMyInputTo(ossim_int32 inputIndex,
+                                               const ossimConnectableObject* object)const
+{
+   return (object&&
+           ( (PTR_CAST(ossimImageSource, object)&&inputIndex == 0)||
+             (PTR_CAST(ossimViewController, object)&&inputIndex == 1)) );
+}
+
+ossim_uint16 ossimImageFileWriter::getOverviewCompressType() const
+{
+   return theOverviewCompressType;
+}
+
+ossim_int32  ossimImageFileWriter::getOverviewJpegCompressQuality() const
+{
+   return theOverviewJpegCompressQuality;
+}
+
+void ossimImageFileWriter::setOverviewCompressType(ossim_uint16 type)
+{
+   theOverviewCompressType = type;
+}
+
+void ossimImageFileWriter::setOverviewJpegCompressQuality(ossim_int32 quality)
+{
+   theOverviewJpegCompressQuality = quality;
+}
+
+void ossimImageFileWriter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property) return;
+   
+   if(property->getName() == ossimKeywordNames::FILENAME_KW)
+   {
+      theFilename = property->valueToString();
+   }
+   else if (property->getName() == "create_envi_hdr")
+   {
+      theWriteEnviHeaderFlag = property->valueToString().toBool();
+   }
+   else if (property->getName() == "create_ers_hdr")
+   {
+      theWriteErsHeaderFlag = property->valueToString().toBool();
+   }
+   else if (property->getName() ==
+            ossimKeywordNames::CREATE_EXTERNAL_GEOMETRY_KW)
+   {
+      theWriteExternalGeometryFlag = property->valueToString().toBool();
+   }
+   else if (property->getName() == "create_fgdc")
+   {
+      theWriteFgdcFlag = property->valueToString().toBool();
+   }
+   else if (property->getName() == "create_jpeg_world_file")
+   {
+      theWriteJpegWorldFileFlag = property->valueToString().toBool();
+   }
+   else if (property->getName() == "create_readme")
+   {
+      theWriteReadmeFlag = property->valueToString().toBool();
+   }
+   else if (property->getName() == "create_tiff_world_file")
+   {
+      theWriteTiffWorldFileFlag = property->valueToString().toBool();
+   }
+   else if (property->getName() == "create_world_file")
+   {
+      theWriteWorldFileFlag = property->valueToString().toBool();
+   }
+   else if (property->getName() == ossimKeywordNames::CREATE_IMAGE_KW)
+   {
+      theWriteImageFlag = property->valueToString().toBool();
+   }
+   else if (property->getName() == ossimKeywordNames::CREATE_OVERVIEW_KW)
+   {
+      theWriteOverviewFlag = property->valueToString().toBool();
+   }
+   else if (property->getName() == ossimKeywordNames::CREATE_HISTOGRAM_KW)
+   {
+      theWriteHistogramFlag = property->valueToString().toBool();
+   }
+   else if (property->getName() == SCALE_TO_EIGHT_BIT_KW)
+   {
+      theScaleToEightBitFlag = property->valueToString().toBool();
+   }
+   else if(property->getName() == AUTO_CREATE_DIRECTORY_KW)
+   {
+      theAutoCreateDirectoryFlag = property->valueToString().toBool();
+   }
+   else if (property->getName() == "linear_units")
+   {
+      theLinearUnits = (ossimUnitType)
+         (ossimUnitTypeLut::instance()->
+          getEntryNumber(property->valueToString()));
+   }
+   else if(property->getName() == ossimKeywordNames::IMAGE_TYPE_KW)
+   {
+      setOutputImageType(property->valueToString());
+   }
+   else if(property->getName() == ossimKeywordNames::PIXEL_TYPE_KW)
+   {
+      ossimStringProperty* stringProperty = PTR_CAST(ossimStringProperty,
+                                                     property.get());
+      if (stringProperty)
+      {
+         ossimString s;
+         stringProperty->valueToString(s);
+         setPixelType(s);
+      }
+   }
+   else
+   {
+      ossimImageWriter::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimImageFileWriter::getProperty(const ossimString& name)const
+{
+   if(name == ossimKeywordNames::FILENAME_KW)
+   {
+      ossimFilenameProperty* filenameProp =
+         new ossimFilenameProperty(name, theFilename);
+
+      filenameProp->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_OUTPUT);
+
+      return filenameProp;
+   }
+   else if(name == ossimKeywordNames::IMAGE_TYPE_KW)
+   {
+      ossimStringProperty* prop =  new ossimStringProperty(name, theOutputImageType, false);
+      std::vector<ossimString> typeList;
+      getImageTypeList(typeList);
+      if(typeList.size() > 1)
+      {
+         prop->setReadOnlyFlag(false);
+         prop->setConstraints(typeList);
+         prop->setChangeType(ossimProperty::ossimPropertyChangeType_AFFECTS_OTHERS);
+      }
+      else
+      {
+         prop->setReadOnlyFlag(true);
+      }
+      return prop;
+   }
+   else if(name == AUTO_CREATE_DIRECTORY_KW)
+   {
+      return new ossimBooleanProperty(name, theAutoCreateDirectoryFlag);
+   }
+   else if (name == "create_envi_hdr")
+   {
+      return new ossimBooleanProperty(name, theWriteEnviHeaderFlag);
+   }
+   else if (name == "create_ers_hdr")
+   {
+      return new ossimBooleanProperty(name, theWriteErsHeaderFlag);
+   }
+   else if (name == ossimKeywordNames::CREATE_EXTERNAL_GEOMETRY_KW)
+   {
+      return new ossimBooleanProperty(name, theWriteExternalGeometryFlag);
+   }
+   else if (name == "create_fgdc")
+   {
+      return new ossimBooleanProperty(name, theWriteFgdcFlag);
+   }
+   else if (name == "create_jpeg_world_file")
+   {
+      return new ossimBooleanProperty(name, theWriteJpegWorldFileFlag);
+   }
+   else if (name == "create_readme")
+   {
+      return new ossimBooleanProperty(name, theWriteReadmeFlag);
+   }
+   else if (name == "create_tiff_world_file")
+   {
+      return new ossimBooleanProperty(name, theWriteTiffWorldFileFlag);
+   }
+   else if (name == "create_world_file")
+   {
+      return new ossimBooleanProperty(name, theWriteWorldFileFlag);
+   }
+   else if (name == ossimKeywordNames::CREATE_IMAGE_KW)
+   {
+      return new ossimBooleanProperty(name, theWriteImageFlag);
+   }
+   else if (name == ossimKeywordNames::CREATE_OVERVIEW_KW)
+   {
+      return new ossimBooleanProperty(name, theWriteOverviewFlag);
+   }
+   else if (name == ossimKeywordNames::CREATE_HISTOGRAM_KW)
+   {
+      return new ossimBooleanProperty(name, theWriteHistogramFlag);
+   }
+   else if (name == SCALE_TO_EIGHT_BIT_KW)
+   {
+      return new ossimBooleanProperty(name, theScaleToEightBitFlag);
+   }
+   else if (name == "linear_units")
+   {
+      // property value
+      ossimString value = ossimUnitTypeLut::instance()->
+         getEntryString(theLinearUnits);
+      
+      //---
+      // theLinearUnits is set to unknown as a default.  This keys the
+      // writer to use whatever makes sense for the given output.
+      // Since "unknown" is a bad name to present to users, we will
+      // use "default" if theLinearUnits is == "unknown".
+      //---
+      if (value == "unknown")
+      {
+         value = "default";
+      }
+      
+      // constraint list
+      vector<ossimString> constraintList;
+      constraintList.push_back(ossimString("default"));
+      constraintList.push_back(ossimString("meters"));
+      constraintList.push_back(ossimString("feet"));
+      constraintList.push_back(ossimString("us_survey_feet"));
+      
+      return new ossimStringProperty(name,
+                                     value,
+                                     false, // not editable
+                                     constraintList);
+   }
+   else if (name == ossimKeywordNames::PIXEL_TYPE_KW)
+   {
+      ossimString value;
+      getPixelTypeString(value);
+      ossimStringProperty* stringProp =
+         new ossimStringProperty(name,
+                                 value,
+                                 false); // editable flag
+      stringProp->addConstraint(ossimString("point"));
+      stringProp->addConstraint(ossimString("area"));
+      return stringProp;
+   }
+
+   return ossimImageWriter::getProperty(name);
+}
+
+void ossimImageFileWriter::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageWriter::getPropertyNames(propertyNames);
+
+   propertyNames.push_back(ossimString(ossimKeywordNames::FILENAME_KW));
+   propertyNames.push_back(ossimString("create_envi_hdr"));  
+   propertyNames.push_back(ossimString(ossimKeywordNames::CREATE_EXTERNAL_GEOMETRY_KW));
+   propertyNames.push_back(ossimString("create_fgdc"));
+   propertyNames.push_back(ossimString("create_jpeg_world_file"));
+   propertyNames.push_back(ossimString("create_readme"));
+   propertyNames.push_back(ossimString("create_tiff_world_file"));
+   propertyNames.push_back(ossimString("create_world_file"));   
+   propertyNames.push_back(ossimString(ossimKeywordNames::CREATE_IMAGE_KW));
+   propertyNames.push_back(ossimString(ossimKeywordNames::CREATE_OVERVIEW_KW));
+   propertyNames.push_back(ossimString(ossimKeywordNames::CREATE_HISTOGRAM_KW));
+   propertyNames.push_back(ossimString(AUTO_CREATE_DIRECTORY_KW));
+   propertyNames.push_back(ossimString(SCALE_TO_EIGHT_BIT_KW));
+   propertyNames.push_back(ossimString("linear_units"));
+   propertyNames.push_back(ossimString(ossimKeywordNames::PIXEL_TYPE_KW));
+   propertyNames.push_back(ossimString(ossimKeywordNames::IMAGE_TYPE_KW));
+
+}
+
+ossimString ossimImageFileWriter::getExtension() const
+{
+   // default unknown file extension
+   return ossimString("ext");
+}
+
+bool ossimImageFileWriter::getOutputHasInternalOverviews( void ) const
+{
+   // default value: don't assume internal overviews will
+   // be generated by image writers.
+   return false;
+}
+
+bool ossimImageFileWriter::hasImageType(const ossimString& imageType) const
+{
+   std::vector<ossimString> imageTypeList;
+   getImageTypeList(imageTypeList);
+
+   std::vector<ossimString>::const_iterator i = imageTypeList.begin();
+
+   while (i != imageTypeList.end())
+   {
+      if ( (*i) == imageType )
+      {
+         return true;
+      }
+      ++i;
+   }
+
+   return false; // not found...
+}
+
+bool ossimImageFileWriter::addListener(ossimListener* listener)
+{
+   theProgressListener = listener;
+   return ossimImageWriter::addListener(listener);
+}
+
+bool ossimImageFileWriter::removeListener(ossimListener* listener)
+{
+   if (listener == theProgressListener)
+   {
+      theProgressListener = NULL;
+   }
+   return ossimImageWriter::removeListener(listener);
+}
+
+void ossimImageFileWriter::setPixelType(ossimPixelType type)
+{
+   thePixelType = type;
+}
+
+void ossimImageFileWriter::setPixelType(const ossimString& type)
+{
+   ossimString s = type;
+   s.downcase();
+   if (s == "point")
+   {
+      setPixelType(OSSIM_PIXEL_IS_POINT);
+   }
+   else if (s == "area")
+   {
+      setPixelType(OSSIM_PIXEL_IS_AREA);
+   }
+}
+
+ossimPixelType ossimImageFileWriter::getPixelType() const
+{
+   return thePixelType;
+}
+
+void ossimImageFileWriter::getPixelTypeString(ossimString& type) const
+{
+   if (thePixelType == OSSIM_PIXEL_IS_POINT)
+   {
+      type = "point";
+   }
+   else
+   {
+      type = "area";
+   }
+}
+
+void ossimImageFileWriter::setTileSize(const ossimIpt& tileSize)
+{
+   if (theInputConnection.valid())
+   {
+      theInputConnection->setTileSize(tileSize);
+   }
+}
+
+bool ossimImageFileWriter::writeWorldFile() 
+{
+   bool result = false;
+   
+   if( theFilename.size() )
+   {
+      // Make the file name.
+      ossimFilename file = theFilename;
+      ossimString ext = file.ext().downcase();
+      
+      ossimString wfExt = ""; // World file extension.
+      
+      if ( ( ext == "tif" ) || ( ext == "tiff" ) )
+      {
+         wfExt = "tfw";
+      }
+      else if ( ( ext == "jpg" ) || ( ext == "jpeg" ) )
+      {
+         wfExt = "jpw";
+      }
+      else if ( ext == "png" )
+      {
+         wfExt = "pgw";
+      }
+      else if ( ext == "sid" )
+      {
+         wfExt = "sdw";
+      }
+      
+      if ( ext.size() )
+      {
+         file.setExtension(wfExt);
+         
+         result = writeWorldFile(file);
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "Could not derive world file extension for: " << theFilename << "\n"; 
+      }
+   }
+   
+   if ( !result )
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "Write of world file failed!\n";
+   }   
+   
+   return result;
+}
+
+bool ossimImageFileWriter::writeWorldFile(const ossimFilename& file) 
+{
+   if( !theInputConnection || theAreaOfInterest.hasNans())
+   {
+      return false;
+   }
+
+   // Make the writer.
+   ossimRefPtr<ossimWorldFileWriter> writer = new ossimWorldFileWriter();
+   
+   // Set things up.
+   writer->connectMyInputTo(0, theInputConnection.get());
+   writer->initialize();
+   writer->setFilename(file);
+   writer->setAreaOfInterest(theAreaOfInterest);
+   writer->setLinearUnits(theLinearUnits);
+   writer->setPixelType(thePixelType);
+   
+   // Write it to disk.
+   return writer->execute(); 
+}
diff --git a/ossim/src/ossim/imaging/ossimImageGaussianFilter.cpp b/ossim/src/ossim/imaging/ossimImageGaussianFilter.cpp
new file mode 100644
index 0000000..5e2b0fd
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageGaussianFilter.cpp
@@ -0,0 +1,246 @@
+//*******************************************************************
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// class ossimImageGaussianFilter : tile source
+//*******************************************************************
+// $Id: ossimImageGaussianFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimImageGaussianFilter.h>
+#include <ossim/base/ossimNumericProperty.h>
+#include <ossim/base/ossimBooleanProperty.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <cmath>
+
+RTTI_DEF1(ossimImageGaussianFilter, "ossimImageGaussianFilter", ossimImageSourceFilter);
+
+/** 
+ * property names
+ */
+static const char* PROPERTYNAME_GAUSSSTD     = "GaussStd";
+static const char* PROPERTYNAME_STRICTNODATA = "StrictNoData";
+
+ossimImageGaussianFilter::ossimImageGaussianFilter()
+   : ossimImageSourceFilter(),
+     theGaussStd(0.5),
+     theStrictNoData(true)
+{
+   // ingredients: 
+   // 2x  ConvolutionFilter1D
+   theHF=new ossimConvolutionFilter1D();
+   theVF=new ossimConvolutionFilter1D();
+
+   theHF->setIsHorizontal(true);
+   theVF->setIsHorizontal(false);
+   updateKernels();
+
+   theHF->setStrictNoData(theStrictNoData);
+   theVF->setStrictNoData(theStrictNoData);
+
+   //tie them up
+   theVF->connectMyInputTo(0,theHF.get());
+}
+
+ossimImageGaussianFilter::~ossimImageGaussianFilter()
+{
+   if(theHF.valid())
+   {
+      theHF->disconnect();
+      theHF = 0;
+   }
+   if(theVF.valid())
+   {
+      theVF->disconnect();
+      theVF = 0;
+   }
+}
+
+void ossimImageGaussianFilter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property) return;
+
+   if (property->getName() == PROPERTYNAME_GAUSSSTD) {
+      ossimNumericProperty* sProperty = PTR_CAST(ossimNumericProperty,
+                                                     property.get());
+      if(sProperty)
+      {
+         setGaussStd(sProperty->asFloat64());
+      }
+   } else if (property->getName() == PROPERTYNAME_STRICTNODATA) {
+      ossimBooleanProperty* booleanProperty = PTR_CAST(ossimBooleanProperty,
+                                                     property.get());
+      if(booleanProperty)
+      {
+         setStrictNoData(booleanProperty->getBoolean());
+      }
+   } else {
+      ossimImageSourceFilter::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimImageGaussianFilter::getProperty(const ossimString& name)const
+{
+   if (name == PROPERTYNAME_GAUSSSTD) {
+      ossimNumericProperty* property = new ossimNumericProperty(name,ossimString::toString(getGaussStd()),1e-13,100.0);
+      property->setCacheRefreshBit();
+      return property;
+   } else if (name == PROPERTYNAME_STRICTNODATA) {
+      ossimBooleanProperty* property = new ossimBooleanProperty(name,isStrictNoData());
+      property->setCacheRefreshBit();
+      return property;
+   }
+   return ossimImageSourceFilter::getProperty(name);
+}
+
+void ossimImageGaussianFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageSourceFilter::getPropertyNames(propertyNames);
+   propertyNames.push_back(PROPERTYNAME_GAUSSSTD);
+   propertyNames.push_back(PROPERTYNAME_STRICTNODATA);
+}
+
+bool ossimImageGaussianFilter::saveState(ossimKeywordlist& kwl,
+                                          const char* prefix)const
+{   
+   kwl.add(prefix,
+           PROPERTYNAME_GAUSSSTD,
+           theGaussStd,
+           true);
+   kwl.add(prefix,
+           PROPERTYNAME_STRICTNODATA,
+           isStrictNoData()?"true":"false", //use string instead of boolean
+           true);
+   
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
+
+bool ossimImageGaussianFilter::loadState(const ossimKeywordlist& kwl,
+                                          const char* prefix)
+{
+   const char* gs = kwl.find(prefix, PROPERTYNAME_GAUSSSTD);
+   if(gs)
+   {      
+      setGaussStd(ossimString(gs).toDouble());
+   } else {
+      cerr<<"ossimImageGaussianFilter : warning no "<< PROPERTYNAME_GAUSSSTD<<" in loadState"<<endl;
+   }
+   const char* sn = kwl.find(prefix, PROPERTYNAME_STRICTNODATA);
+   if(sn)
+   {      
+      setStrictNoData(ossimString(sn).toBool());
+   } else {
+      cerr<<"ossimConvolutionFilter1D : warning no "<<PROPERTYNAME_STRICTNODATA<<" in state"<<endl;
+   }
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
+void ossimImageGaussianFilter::setGaussStd(const ossim_float64& v)
+{
+   theGaussStd = v;
+   updateKernels();
+}
+
+void ossimImageGaussianFilter::setStrictNoData(bool aStrict)
+{
+   theStrictNoData = aStrict;
+   theHF->setStrictNoData(aStrict);
+   theVF->setStrictNoData(aStrict);
+}
+
+void
+ossimImageGaussianFilter::initialize()
+{
+   ossimImageSourceFilter::initialize();
+   initializeProcesses();
+}
+
+ossimRefPtr<ossimImageData>
+ossimImageGaussianFilter::getTile(const ossimIrect &tileRect,ossim_uint32 resLevel)
+{
+    if(isSourceEnabled())
+    {
+       return theVF->getTile(tileRect, resLevel);
+    }
+    if(theInputConnection)
+    {
+       return theInputConnection->getTile(tileRect, resLevel);
+    }
+
+    return 0;
+}
+
+void
+ossimImageGaussianFilter::initializeProcesses()
+{
+   theHF->initialize();
+   theVF->initialize();
+}
+
+void
+ossimImageGaussianFilter::connectInputEvent(ossimConnectionEvent &event)
+{
+    ossimImageSourceFilter::connectInputEvent(event);
+    if(getInput())
+    {
+       theHF->connectMyInputTo(0, getInput());
+       initializeProcesses();
+    }
+    else
+    {
+       theHF->disconnectMyInput(0, false, false);
+       initializeProcesses();
+    }
+}
+
+void
+ossimImageGaussianFilter::disconnectInputEvent(ossimConnectionEvent &event)
+{
+    ossimImageSourceFilter::disconnectInputEvent(event);
+    if(getInput())
+    {
+       theHF->connectMyInputTo(0, getInput());
+       initializeProcesses();
+    }
+    else
+    {
+       theHF->disconnectMyInput(0, false, false);
+       initializeProcesses();
+    }
+}
+void
+ossimImageGaussianFilter::updateKernels()
+{
+   //update kernels based on GaussStd value :2.5 sigma on each side
+   // symetric kernel
+   static const ossim_float64 sigmaN = 2.5;
+   ossim_float64 sig22   = getGaussStd()*getGaussStd()*2.0;
+
+   ossim_uint32 halfw   = (ossim_uint32)(std::floor(getGaussStd() * sigmaN + 0.5));
+   ossim_uint32 supsize = 2*halfw + 1;
+
+   //fill with sym. gaussian (unnormalized)
+   vector<ossim_float64> newk(supsize);
+   ossim_float64 sum=1.0;
+   ossim_float64 v;
+   newk[halfw] = 1.0;
+   for(ossim_int32 i=(ossim_int32)halfw; i>0 ;--i) //reverse for summing
+   {
+      newk[halfw + i] = newk[halfw - i] = v = std::exp(-i*i/sig22);
+      sum += 2.0 * v;
+   }
+
+   //normalize
+   ossim_float64   invsum=1.0/sum;
+   for(ossim_uint32 i=0; i<supsize ;++i)
+   {
+      newk[i] *= invsum;
+   }
+
+   //send to 1d conv filters
+   theHF->setKernel(newk);
+   theVF->setKernel(newk);
+   theHF->setCenterOffset(halfw);
+   theVF->setCenterOffset(halfw);
+}
+
diff --git a/ossim/src/ossim/imaging/ossimImageGeometry.cpp b/ossim/src/ossim/imaging/ossimImageGeometry.cpp
new file mode 100644
index 0000000..30166ef
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageGeometry.cpp
@@ -0,0 +1,1750 @@
+//**************************************************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Oscar Kramer
+//
+// Description: Class implementation of ossimImageGeometry. See .h file for class documentation.
+//
+//**************************************************************************************************
+// $Id$
+
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimGrect.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossim2dTo2dTransformRegistry.h>
+#include <ossim/elevation/ossimElevManager.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <cmath>
+
+RTTI_DEF1(ossimImageGeometry, "ossimImageGeometry", ossimObject);
+
+//**************************************************************************************************
+// Default constructor defaults to unity transform with no projection  
+//**************************************************************************************************
+ossimImageGeometry::ossimImageGeometry()
+:   
+m_transform (0),
+m_projection(0),
+m_decimationFactors(0),
+m_imageSize(),
+m_targetRrds(0)
+{
+   m_imageSize.makeNan();
+}
+
+//**************************************************************************************************
+// Copy constructor -- performs a deep copy. This is needed when an imageSource in the chain
+// needs to modify the image geometry at that point in the chain. The image geometry to the left
+// of that imageSource must remain unchanged. This constructor permits that imageSource to 
+// maintain its own geometry based on the input geometry. All objects in the chain and to the right
+// would see this alternate geometry. See ossimScaleFilter for an example of this case.
+//**************************************************************************************************
+ossimImageGeometry::ossimImageGeometry(const ossimImageGeometry& copy_this)
+:
+ossimObject(copy_this),
+m_transform(copy_this.m_transform.valid()?(ossim2dTo2dTransform*)copy_this.m_transform->dup():((ossim2dTo2dTransform*)0)),
+m_projection(copy_this.m_projection.valid()?(ossimProjection*)copy_this.m_projection->dup():(ossimProjection*)0),
+m_decimationFactors(copy_this.m_decimationFactors),
+m_imageSize(copy_this.m_imageSize),
+m_targetRrds(copy_this.m_targetRrds)
+{
+}
+
+//**************************************************************************************************
+//! Constructs with projection and transform objects available for referencing. Either pointer
+//! can be NULL -- the associated mapping would be identity.
+//**************************************************************************************************
+ossimImageGeometry::ossimImageGeometry(ossim2dTo2dTransform* transform, ossimProjection* proj)
+:
+ossimObject(),
+m_transform(transform),
+m_projection(proj),
+m_decimationFactors(0),
+m_imageSize(),
+m_targetRrds(0)   
+{
+   m_imageSize.makeNan();
+}
+
+//**************************************************************************************************
+// Destructor is hidden. Only accessible via ossimRefPtr centrally managed
+//**************************************************************************************************
+ossimImageGeometry::~ossimImageGeometry()
+{
+   // Nothing to do
+}
+
+void ossimImageGeometry::rnToRn(const ossimDpt& inRnPt, ossim_uint32 inResolutionLevel,
+                                ossim_uint32 outResolutionLevel, ossimDpt& outRnPt) const
+{
+   if (inResolutionLevel != outResolutionLevel)
+   {
+      // Back out the decimation.
+      ossimDpt pt;
+      undecimatePoint(inRnPt, inResolutionLevel, pt);
+
+      // Decimate to new level.
+      decimatePoint(pt, outResolutionLevel, outRnPt);
+   }
+   else
+   {
+      outRnPt = inRnPt; // No transform required.
+   }
+}
+
+void ossimImageGeometry::rnToFull(const ossimDpt& rnPt,
+                                  ossim_uint32 resolutionLevel,
+                                  ossimDpt& fullPt) const
+{
+   // Back out the decimation.
+   ossimDpt localPt;
+   undecimatePoint(rnPt, resolutionLevel, localPt);
+
+   // Remove any shift/rotation.
+   if ( m_transform.valid() && !localPt.hasNans() )
+   {
+      m_transform->forward(localPt, fullPt);
+   }
+   else
+   {
+      fullPt = localPt; // No transform (shift/rotation)
+   }
+}
+
+void ossimImageGeometry::fullToRn(const ossimDpt& fullPt,
+                                  ossim_uint32 resolutionLevel,
+                                  ossimDpt& rnPt) const
+{
+   // Apply shift/rotation.
+   ossimDpt localPt;
+   if (m_transform.valid())
+   {
+      m_transform->inverse(fullPt, localPt);
+   }
+   else
+   {
+      localPt = fullPt; // No transform (shift/rotation)
+   }
+
+   // Apply the decimation.
+   decimatePoint(localPt, resolutionLevel, rnPt);
+}
+
+void ossimImageGeometry::rnToWorld(const ossimDpt& rnPt,
+                                   ossim_uint32 resolutionLevel,
+                                   ossimGpt& wpt) const
+{
+   ossimDpt localPt;
+   rnToRn(rnPt, resolutionLevel, m_targetRrds, localPt);
+   localToWorld(localPt, wpt);
+}
+
+void ossimImageGeometry::worldToRn(const ossimGpt& wpt,
+                                   ossim_uint32 resolutionLevel,
+                                   ossimDpt& rnPt) const
+{   
+   ossimDpt localPt;
+   worldToLocal(wpt, localPt);
+   rnToRn(localPt, m_targetRrds, resolutionLevel, rnPt);
+}
+
+//**************************************************************************************************
+//! Exposes the 3D projection from image to world coordinates. The caller should verify that
+//! a valid projection exists before calling this method. Returns TRUE if a valid ground point
+//! is available in the ground_pt argument. This method depends on the existence of elevation
+//! information. If no DEM is available, the results will be incorrect or inaccurate.
+//**************************************************************************************************
+bool ossimImageGeometry::localToWorld(const ossimDpt& local_pt, ossimGpt& world_pt) const
+{
+   //! Return a NAN point of no projection is defined:
+   if (!m_projection.valid())
+   {
+      world_pt.makeNan();
+      return false;
+   }
+
+   // First transform local pixel to full-image pixel:
+   ossimDpt full_image_pt;
+   rnToFull(local_pt, m_targetRrds, full_image_pt);
+
+   // Perform projection to world coordinates:
+   m_projection->lineSampleToWorld(full_image_pt, world_pt);
+
+    // Put longitude between -180 and +180 and latitude between -90 and +90 if not so. 
+    world_pt.wrap();
+    
+   return true;
+}
+
+//**************************************************************************************************
+//! Exposes the 3D projection from image to world coordinates given a constant height above 
+//! ellipsoid. The caller should verify that a valid projection exists before calling this
+//! method. Returns TRUE if a valid ground point is available in the ground_pt argument.
+//**************************************************************************************************
+bool ossimImageGeometry::localToWorld(const ossimDpt& local_pt, 
+                                      const double& h_ellipsoid, 
+                                      ossimGpt& world_pt) const
+{
+   //! Return a NAN point of no projection is defined:
+   if (!m_projection.valid())
+   {
+      world_pt.makeNan();
+      return false;
+   }
+
+   // First transform local pixel to full-image pixel:
+   ossimDpt full_image_pt;
+   rnToFull(local_pt, m_targetRrds, full_image_pt);
+
+   // Perform projection to world coordinates:
+   m_projection->lineSampleHeightToWorld(full_image_pt, h_ellipsoid, world_pt);
+
+   // Put longitude between -180 and +180 and latitude between -90 and +90 if not so. 
+   world_pt.wrap();
+    
+   return true;
+}
+
+//**************************************************************************************************
+//! Exposes the 3D world-to-local image coordinate reverse projection. The caller should verify 
+//! that a valid projection exists before calling this method. Returns TRUE if a valid image 
+//! point is available in the local_pt argument.
+//**************************************************************************************************
+bool ossimImageGeometry::worldToLocal(const ossimGpt& world_pt, ossimDpt& local_pt) const
+{
+   bool result = true;
+   
+   if ( m_projection.valid() )
+   {
+      //const ossimEquDistCylProjection* eqProj =
+      //   dynamic_cast<const ossimEquDistCylProjection*>( m_projection.get() );
+      
+      ossimDpt full_image_pt;
+
+      //***** GCP
+      // I am having major problems with the call and is messing up on Image that are edge to edge -180 to 180.
+      // It appears to wrap and think that the image is onl 1 pixel wide.  I am commenting out for now
+      // until a better solution can be done for points that wrap.  We need a general implementation that will work
+      // with any projector
+      //
+
+      //if ( eqProj && (m_imageSize.hasNans() == false) )
+     // {
+         // Call specialized method to handle wrapping...
+     //    eqProj->worldToLineSample( world_pt, m_imageSize, full_image_pt );
+     // }
+     // else if( isAffectedByElevation() )
+      if( isAffectedByElevation() )
+      {
+         ossimGpt copyPt( world_pt );
+         if(world_pt.isHgtNan())
+         {
+            copyPt.hgt = ossimElevManager::instance()->getHeightAboveEllipsoid(copyPt);
+         }     
+
+         // Perform projection from world coordinates to full-image space:
+         m_projection->worldToLineSample(copyPt, full_image_pt);
+      }
+      else
+      {
+         // Perform projection from world coordinates to full-image space:
+         m_projection->worldToLineSample(world_pt, full_image_pt);
+      }
+      
+      // Transform to local space:
+      fullToRn(full_image_pt, m_targetRrds, local_pt);
+   }
+   else // No projection set:
+   {
+      local_pt.makeNan();
+      result = false;  
+   }
+   
+   return result;
+   
+} // End: ossimImageGeometry::worldToLocal(const ossimGpt&, ossimDpt&)
+
+//**************************************************************************************************
+//! Sets the transform to be used for local-to-full-image coordinate transformation
+//**************************************************************************************************
+void ossimImageGeometry::setTransform(ossim2dTo2dTransform* transform) 
+{ 
+   m_transform = transform; 
+}
+
+//**************************************************************************************************
+//! Sets the projection to be used for local-to-world coordinate transformation
+//**************************************************************************************************
+void ossimImageGeometry::setProjection(ossimProjection* projection) 
+{ 
+   m_projection = projection; 
+}
+
+//**************************************************************************************************
+//! Returns TRUE if this geometry is sensitive to elevation
+//**************************************************************************************************
+bool ossimImageGeometry::isAffectedByElevation() const
+{
+    if (m_projection.valid())
+        return m_projection->isAffectedByElevation();
+    return false;
+}
+
+//*************************************************************************************************
+//! Returns  GSD in meters in x- and y-directions. This may not be the same as the member 
+//! projection's stated resolution since a transform may be involved.
+//*************************************************************************************************
+ossimDpt ossimImageGeometry::getMetersPerPixel() const
+{
+   ossimDpt gsd;
+   getMetersPerPixel(gsd);
+   return gsd;
+}
+
+//*************************************************************************************************
+//! Computes GSD in meters in x- and y-directions. This may not be the same as the member 
+//! projection's stated resolution since a transform may be involved.
+//*************************************************************************************************
+void ossimImageGeometry::getMetersPerPixel( ossimDpt& gsd ) const
+{
+   if (m_projection.valid() && !m_transform.valid())
+   {
+      // No transform present, so simply query the projection for GSD:
+      gsd = m_projection->getMetersPerPixel();
+   }
+   else if (m_projection.valid() && (m_imageSize.hasNans() == false))
+   {
+      // A transform is involved, so need to use localToWorld call below:
+      ossimDpt pL0 (m_imageSize/2);
+      ossimDpt pLx (pL0.x+1, pL0.y);
+      ossimDpt pLy (pL0.x, pL0.y+1);
+      ossimGpt g0, gx, gy;
+
+      localToWorld(pL0, g0);
+      localToWorld(pLx, g0.height(), gx);
+      localToWorld(pLy, g0.height(), gy);
+
+      // Compute horizontal distance for one pixel:
+      gsd.x = g0.distanceTo(gx);
+      gsd.y = g0.distanceTo(gy);
+   }
+   else
+   {
+      // This object is not fully initialized:
+      gsd.makeNan();
+   }
+}
+
+//*************************************************************************************************
+// Returns the resolution of this image in degrees/pixel. Note that this only
+// makes sense if there is a projection associated with the image. Returns NaNs if no 
+// projection defined.
+//*************************************************************************************************
+ossimDpt ossimImageGeometry::getDegreesPerPixel() const
+{
+   ossimDpt dpp;
+   getDegreesPerPixel(dpp);
+   return dpp;
+}
+
+//*************************************************************************************************
+// Computes the resolution of this image in degrees/pixel. Note that this only
+// makes sense if there is a projection associated with the image. Returns NaNs if no 
+// projection defined.
+//*************************************************************************************************
+void ossimImageGeometry::getDegreesPerPixel( ossimDpt& dpp ) const
+{
+   const ossimMapProjection *map_proj = dynamic_cast<const ossimMapProjection *>(m_projection.get());
+   if (map_proj && !m_transform.valid())
+   {
+      // No transform present, so simply query the projection for resolution:
+      dpp = map_proj->getDecimalDegreesPerPixel();
+   }
+   else if (m_projection.valid() && (m_imageSize.hasNans() == false))
+   {
+      // A transform is involved, so need to use localToWorld call below:
+      ossimDpt pL0 (m_imageSize/2);
+      ossimDpt pLx (pL0.x+1, pL0.y);
+      ossimDpt pLy (pL0.x, pL0.y+1);
+      ossimGpt g0, gx, gy;
+
+      localToWorld(pL0, g0);
+      localToWorld(pLx, g0.height(), gx);
+      localToWorld(pLy, g0.height(), gy);
+
+      // Compute horizontal distance for one pixel:
+      double dlatx = std::fabs(g0.lat - gx.lat);
+      double dlaty = std::fabs(g0.lat - gy.lat);
+      double dlonx = std::fabs(g0.lon - gx.lon);
+      double dlony = std::fabs(g0.lon - gy.lon);
+      dpp.lat = sqrt(dlatx*dlatx + dlaty*dlaty);
+      dpp.lon = sqrt(dlonx*dlonx + dlony*dlony);
+   }
+   else
+   {
+      // This object is not fully initialized:
+      dpp.makeNan();
+   }
+}
+
+//**************************************************************************************************
+//! Prints contents to output stream.
+//**************************************************************************************************
+std::ostream& ossimImageGeometry::print(std::ostream& out) const
+{
+   out << "type: ossimImageGeometry" << std::endl;
+   if(m_transform.valid())
+   {
+      out << "  m_transform: ";
+      m_transform->print(out);
+   }
+   else
+   {
+      out << "  No transform defined. Using identity transform.\n";
+   }
+   
+   if(m_projection.valid())
+   {
+      out << "  m_projection: ";
+      m_projection->print(out);
+   }
+   else
+   {
+      out << "  No projection defined. ";
+   }
+
+   for ( std::vector<ossimDpt>::size_type i = 0; i < m_decimationFactors.size(); ++i )
+   {
+      cout << "m_decimationFactors[" << i << "]: " << m_decimationFactors[i] << "\n";
+   }
+
+   out << "m_imageSize: " << m_imageSize
+       << "\nm_targetRrds: " << m_targetRrds << "\n";
+
+   return out;
+}
+
+//**************************************************************************************************
+//! Returns TRUE if argument geometry has exactly the same instances for transform and 
+//! m_projection. This may need to be expanded to permit different instances of same transforms
+//**************************************************************************************************
+bool ossimImageGeometry::operator==(const ossimImageGeometry& other) const
+{
+    return ((m_transform == other.m_transform) && (m_projection == other.m_projection) &&
+            (decimationFactor(0) == other.decimationFactor(0)) );
+}
+
+//**************************************************************************************************
+//! Returns the decimation factor from R0 for the resolution level specified. For r_index=0, the 
+//! decimation factor is by definition 1.0. For the non-discrete case, r_index=1 returns a 
+//! decimation of 0.5. If the vector of discrete decimation factors (m_decimationFactors) is 
+//! empty, the factor will be computed as f=1/2^n
+//**************************************************************************************************
+ossimDpt ossimImageGeometry::decimationFactor(ossim_uint32 r_index) const
+{
+   ossim_uint32 size = (ossim_uint32)m_decimationFactors.size();
+   if (size)
+   {
+      if (r_index < size)
+      {
+         return m_decimationFactors[r_index];
+      }
+      
+      // Return the last defined decimation if the index requested exceeds list size:
+      return m_decimationFactors[size-1];
+   }
+
+   // Compute the decimation factor:
+   ossim_float64 factor = 1.0/(ossim_float64)(1 << r_index);
+   
+   return ossimDpt(factor, factor);
+}
+
+void ossimImageGeometry::decimationFactor(ossim_uint32 r_index,
+                                          ossimDpt& result) const
+{
+   const ossim_uint32 SIZE = (ossim_uint32)m_decimationFactors.size();
+   if (SIZE)
+   {
+      if (r_index < SIZE)
+      {
+         result = m_decimationFactors[r_index];
+      }
+      else
+      {
+         //---
+         // Return the last defined decimation if the index requested
+         // exceeds list size:
+         //---
+         result = m_decimationFactors[SIZE-1];
+      }
+   }
+   else
+   {
+      // Compute the decimation factor:
+      ossim_float64 factor = 1.0/(ossim_float64)(1 << r_index);
+      result.x = factor;
+      result.y = factor;
+   }
+}
+
+void ossimImageGeometry::decimationFactors(
+   std::vector<ossimDpt>& decimations) const
+{
+   decimations = m_decimationFactors;
+}
+
+//*****************************************************************************
+//! Attempts to initialize a transform and a projection given the KWL.
+//! Returns TRUE if no error encountered.
+//*****************************************************************************
+bool ossimImageGeometry::loadState(const ossimKeywordlist& kwl,
+                                   const char* prefix)
+{
+   const char* lookup = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
+   if (lookup)
+   {
+      if ( ossimString(lookup) == STATIC_TYPE_NAME(ossimImageGeometry) )
+      {
+         ossimObject::loadState(kwl, prefix);
+
+         // m_transform
+         ossimString transformPrefix = ossimString(prefix) + "transform.";
+         ossimRefPtr<ossim2dTo2dTransform> transform = ossim2dTo2dTransformRegistry::instance()->
+            createNativeObjectFromRegistry(kwl, transformPrefix.c_str());
+         if( transform.valid() )
+         {
+            m_transform = transform;
+         }
+
+         // m_projection:
+         ossimString projectionPrefix = ossimString(prefix) + "projection.";
+         ossimRefPtr<ossimProjection> projection = ossimProjectionFactoryRegistry::instance()->
+            createProjection(kwl, projectionPrefix.c_str());
+         if( projection.valid() )
+         {
+            m_projection = projection;
+         }
+
+         // m_decimationFactors:
+         ossimString decimations = kwl.find(prefix, "decimations");
+         if( decimations.size() )
+         {
+            m_decimationFactors.clear();
+            ossim::toVector(m_decimationFactors, decimations);
+         }
+
+         // m_imageSize:
+         ossimString imageSize = kwl.find(prefix, "image_size");
+         if( imageSize.size() )
+         {
+            m_imageSize.toPoint(imageSize);
+         }
+
+         // m_targetRrds:
+         ossimString targetRrds = kwl.find(prefix, "target_rrds");
+         if ( targetRrds.size() )
+         {
+            m_targetRrds = ossimString(targetRrds).toUInt32();
+         }
+      }
+      else
+      {
+         // Now look for projection spec (for backwards compatibility):
+         ossimProjection* projection = ossimProjectionFactoryRegistry::instance()->
+            createProjection(kwl, prefix);
+         if (projection)
+         {
+            setProjection(projection);
+         }
+      }
+   }
+   else
+   {
+      //---
+      // Old geometry file with no type keyword:
+      //---
+      ossimProjection* projection = ossimProjectionFactoryRegistry::instance()->
+         createProjection(kwl, prefix);
+      if (projection)
+      {
+         setProjection(projection);
+      } 
+   }
+   
+   return true;
+}
+
+//**************************************************************************************************
+//! Saves the transform (if any) and projection (if any) states to the KWL.
+//**************************************************************************************************
+bool ossimImageGeometry::saveState(ossimKeywordlist& kwl, const char* prefix) const
+{
+   bool good_save = true;
+
+   // m_transform:
+   if (m_transform.valid())
+   {
+      ossimString transformPrefix = ossimString(prefix) + "transform.";
+      good_save = m_transform->saveState(kwl, transformPrefix.c_str());
+   }
+
+   // m_projection:
+   if (m_projection.valid())
+   {
+      ossimString projectionPrefix = ossimString(prefix) + "projection.";
+      good_save &= m_projection->saveState(kwl, projectionPrefix.c_str());
+   }
+
+   // m_gsd:
+   ossimDpt gsd;
+   getMetersPerPixel(gsd);
+   kwl.add(prefix, "gsd", gsd.toString(), true);
+
+   // m_decimationFactors:
+   if(m_decimationFactors.size())
+   {
+      ossimString resultPoints;
+      ossim::toStringList(resultPoints, m_decimationFactors);
+      kwl.add(prefix, "decimations", resultPoints, true);
+   }
+   else
+   {
+      kwl.add(prefix, "decimations", "", true);
+   }
+
+   // m_imageSize:
+   kwl.add(prefix, "image_size", m_imageSize.toString(), true);
+
+   // m_targetRrds;
+   kwl.add(prefix, "target_rrds", m_targetRrds, true);
+
+   // Base class:
+   good_save &= ossimObject::saveState(kwl, prefix);
+   
+   return good_save;
+}
+
+void ossimImageGeometry::setTargetRrds(ossim_uint32 rrds)
+{
+   m_targetRrds = rrds;
+}
+
+ossim_uint32 ossimImageGeometry::getTargetRrds() const
+{
+   return m_targetRrds;
+}
+
+//**************************************************************************************************
+//! Replaces any existing transform and projection with those in the copy_this object
+//**************************************************************************************************
+const ossimImageGeometry& ossimImageGeometry::operator=(const ossimImageGeometry& copy_this)
+{
+   if (this != &copy_this)
+   {
+      // Get deep copy of 2D transform if one exists:
+      if (copy_this.m_transform.valid())
+      {
+         m_transform = (ossim2dTo2dTransform*) copy_this.m_transform->dup();
+      }
+      
+      // Now establish a deep copy of the projection, if any:
+      if (copy_this.m_projection.valid())
+      {
+         m_projection = (ossimProjection*) copy_this.m_projection->dup();
+      }
+      
+      // the Gsd should already be solved from the source we are copying from
+      m_imageSize         = copy_this.m_imageSize;
+      m_decimationFactors = copy_this.m_decimationFactors;
+      m_targetRrds        = copy_this.m_targetRrds;
+   }
+   return *this;
+}
+
+//**************************************************************************************************
+//! Returns the ossimGpts for the four image corner points
+//**************************************************************************************************
+bool ossimImageGeometry::getCornerGpts(ossimGpt& gul, ossimGpt& gur, 
+                                       ossimGpt& glr, ossimGpt& gll) const
+{
+   ossimDpt iul (0,0);
+   ossimDpt iur (m_imageSize.x-1, 0);
+   ossimDpt ilr (m_imageSize.x-1, m_imageSize.y-1);
+   ossimDpt ill (0, m_imageSize.y-1);
+
+   bool status = true;
+
+   status &= localToWorld(iul, gul);
+   status &= localToWorld(iur, gur);
+   status &= localToWorld(ilr, glr);
+   status &= localToWorld(ill, gll);
+
+   return status;
+}
+
+void ossimImageGeometry::getTiePoint(ossimGpt& tie, bool edge) const
+{
+   ossimGrect grect;
+   getBoundingGroundRect(grect);
+   if ( m_projection.valid() && (m_imageSize.hasNans() == false) )
+   {
+      // Use the easting/northing version of this method if underlying projection is meters:
+      const ossimMapProjection* map_proj = 
+         dynamic_cast<const ossimMapProjection*>(m_projection.get());
+      if (map_proj)
+      {
+         if(!map_proj->isGeographic())
+         {
+            ossimDpt enTie;
+            getTiePoint(enTie, edge);
+            if (!enTie.hasNans())
+               tie = m_projection->inverse(enTie);
+            else
+               tie.makeNan();
+         }
+         else
+         {
+            ossimDpt dpp = map_proj->getDecimalDegreesPerPixel();
+            dpp.lat*=0.5;
+            dpp.lon*=0.5;
+            tie = grect.ul();
+            if(edge)
+            {
+               tie.lat -= dpp.lat;
+               tie.lon += dpp.lon; 
+            }
+         }
+      }
+      else
+      {
+
+         // must be a sensor model so we will set to the upper left bounds of the image
+         tie = grect.ul();
+//         std::cout << "GRECT ======= " << grect << "\n";
+//         std::cout << m_projection->getClassName() << std::endl;
+//         ossimDpt pt = m_projection->forward( tie );
+//         std::cout << "FORWARD:" <<pt << std::endl;
+      }
+   }
+
+
+#if 0
+  // std::cout << "GRECT ======= " << grect << "\n";
+   if ( m_projection.valid() && (m_imageSize.hasNans() == false) )
+   {
+      // Use the easting/northing version of this method if underlying projection is meters:
+      const ossimMapProjection* map_proj = 
+         dynamic_cast<const ossimMapProjection*>(m_projection.get());
+      if (map_proj && !map_proj->isGeographic())
+      {
+         ossimDpt enTie;
+         getTiePoint(enTie, edge);
+         if (!enTie.hasNans())
+            tie = m_projection->inverse(enTie);
+         else
+            tie.makeNan();
+         return; // return here only because it bugs Dave
+      }
+
+      // Use projection to ground to establish UL extreme of image:
+      ossimDpt iul (0,0);
+      ossimDpt iur (m_imageSize.x-1, 0);
+      ossimDpt ilr (m_imageSize.x-1, m_imageSize.y-1);
+      ossimDpt ill (0, m_imageSize.y-1);
+      ossimDpt iRight(1, 0);
+      ossimDpt iDown(0, 1);
+      
+      ossimGpt gul;
+      ossimGpt gur; 
+      ossimGpt glr;
+      ossimGpt gll;
+      ossimGpt gRight;
+      ossimGpt gDown;
+      
+      localToWorld(iul, gul);
+      localToWorld(iur, gur);
+      localToWorld(ilr, glr);
+      localToWorld(ill, gll);
+      localToWorld(iRight, gRight);
+      localToWorld(iDown, gDown);
+      
+      std::cout << "gul: " << gul << "\n"
+                << "gur: " << gur << "\n"
+                << "glr: " << glr << "\n"
+                << "gll: " << gll << "\n"
+                << "gRight: " << gRight << "\n"
+                << "gDown:  " << gDown << "\n";
+      // Determine the direction of the image:
+      if ( gul.lat > gDown.lat ) // oriented north up
+      {
+         if ( gul.lat >= gRight.lat ) // straight up or leaning right
+         {
+            std::cout << "ONE\n";
+            tie.lat = gul.lat;
+            tie.lon = gll.lon;
+         }
+         else // leaning left
+         {
+            std::cout << "TWO\n";
+            tie.lat = gur.lat;
+            tie.lon = gul.lon;
+         }
+      }
+      else // south or on side
+      {
+         if ( gRight.lat >= gul.lat ) // straight down or leaning right
+         {
+            std::cout << "THREE\n";
+            tie.lat = glr.lat;
+            tie.lon = gur.lon;
+         }
+         else // leaning left
+         {
+            std::cout << "FOUR\n";
+            tie.lat = gll.lat;
+            tie.lon = glr.lon;
+         }   
+      }
+      std::cout << "TIE BEFORE ==== " << tie << "\n";
+
+      if ( edge )
+      {
+         ossimDpt pt = m_projection->forward( tie );
+         ossimDpt half_pixel_shift = m_projection->getMetersPerPixel() * 0.5;
+         pt.y += half_pixel_shift.y;
+         pt.x -= half_pixel_shift.x;
+         tie = m_projection->inverse( pt );
+      }
+      
+      std::cout << "TIE ==== " << tie << "\n";
+   } // if ( (m_imageSize.hasNans() == false) && m_projection.valid() )
+   else
+   { 
+      tie.lat = ossim::nan();
+      tie.lon = ossim::nan();
+   }
+#endif
+}
+
+//**************************************************************************************************
+// Assigns tie to the UL easting northing of the image. If edge is true, the E/N will be for the 
+// pixel-is-area representation
+//**************************************************************************************************
+void ossimImageGeometry::getTiePoint(ossimDpt& tie, bool edge) const
+{
+   if (!m_projection.valid() || m_imageSize.hasNans())
+   {
+      tie.makeNan();
+      return; // return here only because it bugs Dave
+   }
+
+   // Use the geographic version of this method if underlying projection is NOT map in meters:
+   const ossimMapProjection* map_proj = dynamic_cast<const ossimMapProjection*>(m_projection.get());
+   if (!map_proj || map_proj->isGeographic())
+   {
+      // Use the geographic version of this method to establish UL:
+      ossimGpt gTie;
+      gTie.hgt = 0.0;
+      getTiePoint(gTie, edge);
+      if (!gTie.hasNans())
+         tie = m_projection->forward( gTie );
+      else
+         tie.makeNan();
+      return; // return here only because it bugs Dave
+   }
+
+   // The underlying projection is a proper map projection in meters. Use easting northing 
+   // directly to avoid shifting the UL tiepoint because of skewed edge in geographic. Note:
+   // assume the image is North up:
+   ossimDpt iul (0,0);
+   ossimDpt ful;
+   rnToFull(iul, 0, ful);
+   map_proj->lineSampleToEastingNorthing(ful, tie);
+   if (edge && !tie.hasNans())
+   {
+      // Shift from pixel-is-point to pixel-is-area
+      ossimDpt half_pixel_shift = map_proj->getMetersPerPixel() * 0.5;
+      tie.y += half_pixel_shift.y;
+      tie.x -= half_pixel_shift.x;
+   }
+}
+
+//**************************************************************************************************
+void ossimImageGeometry::undecimatePoint(const ossimDpt& rnPt,
+                                         ossim_uint32 resolutionLevel,
+                                         ossimDpt& outPt) const
+{
+   // Back out the decimation.
+   ossimDpt decimation = decimationFactor(resolutionLevel);
+   
+   //---
+   // If no nans and one or both of the factors is not 1.0 decimation should
+   // be applied.
+   //---
+   if ( (decimation.x != 1.0) || (decimation.y != 1.0) ) 
+   {
+      if ( !decimation.hasNans() && !rnPt.hasNans() )
+      {
+         outPt.x = rnPt.x * (1.0/decimation.x);
+         outPt.y = rnPt.y * (1.0/decimation.y);
+      }
+      else
+      {
+         outPt.makeNan();
+      }
+   }
+   else
+   {
+      outPt = rnPt; // No decimation.
+   }
+}
+
+//**************************************************************************************************
+void ossimImageGeometry::decimatePoint(const ossimDpt& inPt,
+                                       ossim_uint32 resolutionLevel,
+                                       ossimDpt& rnPt) const
+{
+   
+   // Apply the decimation.
+   ossimDpt decimation = decimationFactor(resolutionLevel);
+
+   //---
+   // If no nans and one or both of the factors is not 1.0 decimation should
+   // be applied.
+   //---
+   if ( (decimation.x != 1.0) || (decimation.y != 1.0) ) 
+   {
+      if ( !decimation.hasNans() && !inPt.hasNans() )
+      {
+         rnPt.x = inPt.x * decimation.x;
+         rnPt.y = inPt.y * decimation.y;
+      }
+      else
+      {
+        rnPt.makeNan(); 
+      }
+   }
+   else
+   {
+      rnPt = inPt; // No decimation.
+   }
+}
+
+bool ossimImageGeometry::isEqualTo(const ossimObject& obj, ossimCompareType compareType)const
+{
+   bool result = ossimObject::isEqualTo(obj, compareType);
+   const ossimImageGeometry* rhs = dynamic_cast<const ossimImageGeometry*> (&obj);
+   if(rhs&&result) // we know the types are the same
+   {
+      result = ((m_decimationFactors.size() == rhs->m_decimationFactors.size())&&
+                m_imageSize.isEqualTo(rhs->m_imageSize)&& 
+                (m_targetRrds == rhs->m_targetRrds)); 
+      
+      if(result)
+      {
+         ossim_uint32 decimationIdx = 0;
+         for(decimationIdx = 0; result&&(decimationIdx < m_decimationFactors.size());++decimationIdx)
+         {
+            result = m_decimationFactors[decimationIdx].isEqualTo(rhs->m_decimationFactors[decimationIdx]);
+         }
+      }
+      
+      if(result && compareType==OSSIM_COMPARE_IMMEDIATE)
+      {
+         result = ((m_transform.get()  == rhs->m_transform.get())&& 
+                   (m_projection.get() == rhs->m_projection.get()));  //!< Maintains full_image-to-world_space transformation
+         
+      }
+      else
+      {
+         if(m_transform.valid()&&rhs->m_transform.valid())
+         {
+            result = m_transform->isEqualTo(*rhs->m_transform.get());
+         }
+         else if(reinterpret_cast<ossim_uint64>(m_transform.get()) | reinterpret_cast<ossim_uint64>(rhs->m_transform.get())) // one is null
+         {
+            result = false;
+         }
+         if(m_projection.valid()&&rhs->m_projection.valid())
+         {
+            result = m_projection->isEqualTo(*rhs->m_projection.get());
+         }
+         else if(reinterpret_cast<ossim_uint64>(m_projection.get()) | reinterpret_cast<ossim_uint64>(rhs->m_projection.get())) // one is null
+         {
+            result = false;
+         }
+         
+      }
+   }
+   return result;
+}
+
+bool ossimImageGeometry::getCrossesDateline()const
+{
+   bool result = false;
+   ossimIrect rect;
+   ossimGpt ul;
+   ossimGpt ur;
+   ossimGpt lr;
+   ossimGpt ll;
+   ossimGpt center;
+   ossimGpt wgs84;
+
+   getBoundingRect(rect);
+
+   localToWorld(rect.ul(), ul);
+   localToWorld(rect.ur(), ur);
+   localToWorld(rect.lr(), lr);
+   localToWorld(rect.ll(), ll);
+   localToWorld(rect.midPoint(), center);
+
+   if(ul.isLonNan()||ur.isLonNan()||lr.isLonNan()||ll.isLonNan()||center.isLonNan())
+   {
+      return result;
+   }
+   else
+   {
+      ul.changeDatum(wgs84.datum());
+      ur.changeDatum(wgs84.datum());
+      lr.changeDatum(wgs84.datum());
+      ll.changeDatum(wgs84.datum());
+      center.changeDatum(wgs84.datum());
+      result = ( (fabs(center.lond()-ul.lond()) > 180.0) ||
+                 (fabs(center.lond()-ur.lond()) > 180.0) ||
+                 (fabs(center.lond()-lr.lond()) > 180.0) ||
+                 (fabs(center.lond()-ll.lond()) > 180.0));
+   }
+
+   return result; 
+}
+
+void ossimImageGeometry::calculatePolyBounds(ossimPolyArea2d& result, ossim_int32 partitions)const
+{
+   if(!m_imageSize.hasNans())
+   {
+      ossim_int64 delta = 0;
+      ossim_int64 stepSizex = m_imageSize.x/partitions;
+      ossim_int64 stepSizey = m_imageSize.y/partitions;
+      ossim_int64 w1        = m_imageSize.x-1;
+      ossim_int64 h1        = m_imageSize.y-1;
+      ossimGpt    gpt;
+      ossimGpt t1,t2,t3,t4;
+      localToWorld(ossimDpt(0,0), t1);
+      localToWorld(ossimDpt(w1,0), t2);
+      localToWorld(ossimDpt(w1,h1), t3);
+      localToWorld(ossimDpt(0,h1), t4);
+      if(t1.isLatLonNan()||t2.isLatLonNan()||t3.isLatLonNan()||t4.isLatLonNan())
+      {
+         // need to print error if a corners are nan
+         return;
+      }
+
+      // set initial point
+      gpt = t1;
+      if(getCrossesDateline())
+      {
+         // make sure we have enough samples to cross the dateline properly
+         if(partitions < 20) partitions = 20;
+         stepSizex = m_imageSize.x/partitions;
+         stepSizey = m_imageSize.y/partitions;
+
+         ossimGpt previousPoint;
+         std::vector<std::vector<ossimDpt> > polygons(2);
+         ossim_uint32 whichPoly = 0;
+         //localToWorld(ossimDpt(0,0), gpt);
+         //gpt = t1;
+ 
+         polygons[whichPoly].push_back(gpt);
+
+         previousPoint = gpt;
+
+         // top
+         for(delta = stepSizex; delta < w1;delta+=stepSizex)
+         {
+            localToWorld(ossimDpt(delta, 0), gpt);
+            if(!gpt.isLatLonNan())
+            {
+            // need to print error if a corner is nan
+
+               if(fabs(gpt.lond()-previousPoint.lond()) > 180.0)
+               {
+                  ossimGpt tempGpt;
+                  ossim_uint32 currentPolyIndex = whichPoly;
+                  whichPoly ^= 1;
+
+                  localToWorld(ossimDpt( (delta-stepSizex) + .5, 0), tempGpt);
+
+                  if(!tempGpt.isLatLonNan())
+                  {
+                     ossimDpt start = previousPoint;
+                     ossimDpt end   = tempGpt;
+                     ossimDpt deltaPoint = end-start;
+
+                     if(gpt.lond() > 0) // crossing negative to positive
+                     {
+                        ossim_float64 t = ((-180-start.x)/deltaPoint.x);
+                        ossim_float64 lat = (start.y+deltaPoint.y*t);
+                        polygons[currentPolyIndex].push_back(ossimGpt(lat, -180.0));
+                        polygons[whichPoly].push_back(ossimGpt(lat, 180.0));
+                        //std::cout << "LON ==== " << -180 << " LAT === " << (start.y+deltaPoint.y*t) << "\n";
+
+                        //std::cout << "TOP CROSSING NEGATIVE TO POSITIVE\n";
+                     }
+                     else // crossing positive to negative 
+                     {
+                        ossim_float64 t = ((180-start.x)/deltaPoint.x);
+                        ossim_float64 lat = (start.y+deltaPoint.y*t);
+                        polygons[currentPolyIndex].push_back(ossimGpt(lat, 180.0));
+                        polygons[whichPoly].push_back(ossimGpt(lat, -180.0));
+
+                        //std::cout << "TOP CROSSING POSITIVE TO NEGATIVE\n";
+                     }
+                     //std::cout << ossimDpt(previousPoint) << " --> " << ossimDpt(gpt) << "\n";
+                  }
+               }
+               polygons[whichPoly].push_back(gpt);
+               previousPoint = gpt;
+            }
+         }
+         // right
+         for(delta = stepSizey; delta<h1; delta+=stepSizey)
+         {
+            localToWorld(ossimDpt(w1, delta), gpt);
+            if(!gpt.isLatLonNan())
+            {
+
+               if(fabs(gpt.lond()-previousPoint.lond()) > 180.0)
+               {
+                  ossimGpt tempGpt;
+                  ossim_uint32 currentPolyIndex = whichPoly;
+                  whichPoly ^= 1;
+
+                  localToWorld(ossimDpt( w1, (delta-stepSizey)+0.5), tempGpt);
+                  if(!tempGpt.isLatLonNan())
+                  {
+                     ossimDpt start = previousPoint;
+                     ossimDpt end   = tempGpt;
+                     ossimDpt deltaPoint = end-start;
+
+                     if(gpt.lond() > 0) // crossing negative to positive
+                     {
+                        ossim_float64 t = ((-180-start.x)/deltaPoint.x);
+                        ossim_float64 lat = (start.y+deltaPoint.y*t);
+                        polygons[currentPolyIndex].push_back(ossimGpt(lat, -180.0));
+                        polygons[whichPoly].push_back(ossimGpt(lat, 180.0));
+                       // std::cout << "RIGHT CROSSING NEGATIVE TO POSITIVE\n";
+                     }
+                     else // crossing positive to negative 
+                     {
+                        ossim_float64 t = ((180-start.x)/deltaPoint.x);
+                        ossim_float64 lat = (start.y+deltaPoint.y*t);
+                        polygons[currentPolyIndex].push_back(ossimGpt(lat, 180.0));
+                        polygons[whichPoly].push_back(ossimGpt(lat, -180.0));
+                        //std::cout << "RIGHT CROSSING POSITIVE TO NEGATIVE\n";
+                     }
+                     //std::cout << ossimDpt(previousPoint) << " --> " << ossimDpt(gpt) << "\n";
+                  }
+               }
+               polygons[whichPoly].push_back(gpt);
+               previousPoint = gpt;
+            }
+         }
+
+         // bottom
+         for(delta = w1; delta > 0;delta-=stepSizex)
+         {
+            localToWorld(ossimDpt(delta, h1), gpt);
+            if(!gpt.isLatLonNan())
+            {
+               if(fabs(gpt.lond()-previousPoint.lond()) > 180.0)
+               {
+                  ossimGpt tempGpt;
+                  ossim_uint32 currentPolyIndex = whichPoly;
+                  whichPoly ^= 1;
+
+                  localToWorld(ossimDpt( (delta+stepSizex)-0.5, h1), tempGpt);
+                  if(!tempGpt.isLatLonNan())
+                  {
+                     ossimDpt start = previousPoint;
+                     ossimDpt end   = tempGpt;
+                     ossimDpt deltaPoint = end-start;
+
+                     if(gpt.lond() > 0) // crossing negative to positive
+                     {
+                        ossim_float64 t = ((-180-start.x)/deltaPoint.x);
+                        ossim_float64 lat = (start.y+deltaPoint.y*t);
+                        polygons[currentPolyIndex].push_back(ossimGpt(lat, -180.0));
+                        polygons[whichPoly].push_back(ossimGpt(lat, 180.0));
+                        //std::cout << "BOTTOM CROSSING NEGATIVE TO POSITIVE\n";
+                     }
+                     else // crossing positive to negative 
+                     {
+                        ossim_float64 t = ((180-start.x)/deltaPoint.x);
+                        ossim_float64 lat = (start.y+deltaPoint.y*t);
+                        polygons[currentPolyIndex].push_back(ossimGpt(lat, 180.0));
+                        polygons[whichPoly].push_back(ossimGpt(lat, -180.0));
+                        //std::cout << "BOTTOM CROSSING POSITIVE TO NEGATIVE\n";
+                     }
+                     //std::cout << ossimDpt(previousPoint) << " --> " << ossimDpt(gpt) << "\n";
+                  }
+               }
+               polygons[whichPoly].push_back(gpt);
+               previousPoint = gpt;
+            }
+         }
+         // left
+         for(delta = h1; delta > 0;delta-=stepSizey)
+         {
+            localToWorld(ossimDpt(0, delta), gpt);
+
+            if(!gpt.isLatLonNan())
+            {
+
+
+               if(fabs(gpt.lond()-previousPoint.lond()) > 180.0)
+               {
+                  ossimGpt tempGpt;
+                  ossim_uint32 currentPolyIndex = whichPoly;
+                  whichPoly ^= 1;
+
+                  localToWorld(ossimDpt( 0, (delta+stepSizey)-0.5), tempGpt);
+
+                  if(!tempGpt.isLatLonNan())
+                  {
+                     ossimDpt start = previousPoint;
+                     ossimDpt end   = tempGpt;
+                     ossimDpt deltaPoint = end-start;
+
+                     if(gpt.lond() > 0) // crossing negative to positive
+                     {
+                        ossim_float64 t = ((-180-start.x)/deltaPoint.x);
+                        ossim_float64 lat = (start.y+deltaPoint.y*t);
+                        polygons[currentPolyIndex].push_back(ossimDpt(-180.0, lat));
+                        polygons[whichPoly].push_back(ossimDpt(180.0, lat));
+                        //std::cout << "LEFT CROSSING NEGATIVE TO POSITIVE\n";
+                     }
+                     else // crossing positive to negative 
+                     {
+                        ossim_float64 t = ((180-start.x)/deltaPoint.x);
+                        ossim_float64 lat = (start.y+deltaPoint.y*t);
+                        polygons[currentPolyIndex].push_back(ossimDpt(180.0, lat));
+                        polygons[whichPoly].push_back(ossimDpt(-180.0, lat));
+                        //std::cout << "LEFT CROSSING POSITIVE TO NEGATIVE\n";
+                     }
+                     //std::cout << ossimDpt(previousPoint) << " --> " << ossimDpt(gpt) << "\n";
+                  }
+
+               }
+               polygons[whichPoly].push_back(gpt);
+               previousPoint = gpt;
+            }
+         }
+         if(polygons[0].size() > 0) polygons[0].push_back(polygons[0][0]);
+         if(polygons[1].size() > 0) polygons[1].push_back(polygons[1][0]);
+
+         if((polygons[0].size() > 3)&&
+            (polygons[1].size() > 3))
+         {
+            result  = polygons[0];
+            if(!result.isValid()) result.setToBufferedShape();
+            ossimPolyArea2d tempPolyArea;
+            tempPolyArea = polygons[1];
+            if(!tempPolyArea.isValid()) tempPolyArea.setToBufferedShape();
+            result.add(tempPolyArea);
+         }
+
+      }
+      else
+      {
+         std::vector<ossimGpt> poly;
+         // if(!isAffectedByElevation())
+         // {
+         //    poly.push_back(t1);
+         //    poly.push_back(t2);
+         //    poly.push_back(t3);
+         //    poly.push_back(t4);
+         //    poly.push_back(t5);
+         // }
+         // else
+         {
+         //localToWorld(ossimDpt(0,0), gpt);
+            poly.push_back(gpt);
+            
+            // top
+            for(delta = stepSizex; delta < w1;delta+=stepSizex)
+            {
+               localToWorld(ossimDpt(delta, 0), gpt);
+               if(!gpt.isLatLonNan())
+               {
+                  poly.push_back(gpt);
+               }
+            }
+            localToWorld(ossimDpt(w1, 0), gpt);
+            if(!gpt.isLatLonNan())
+            {
+               poly.push_back(gpt);
+            }
+
+            //right
+            for(delta = stepSizey; delta<h1; delta+=stepSizey)
+            {
+               localToWorld(ossimDpt(w1, delta), gpt);
+               if(!gpt.isLatLonNan())
+               {
+                  poly.push_back(gpt);
+               }
+            }
+            localToWorld(ossimDpt(w1, h1), gpt);
+            if(!gpt.isLatLonNan())
+            {
+               poly.push_back(gpt);
+            }
+
+            //bottom
+            for(delta = w1; delta > 0;delta-=stepSizex)
+            {
+               localToWorld(ossimDpt(delta, h1), gpt);
+               if(!gpt.isLatLonNan())
+               {
+                  poly.push_back(gpt);
+               }
+            }
+            localToWorld(ossimDpt(0, h1), gpt);
+            if(!gpt.isLatLonNan())
+            {
+               poly.push_back(gpt);
+            }
+
+            //left
+            for(delta = h1; delta > 0;delta-=stepSizey)
+            {
+               localToWorld(ossimDpt(0, delta), gpt);
+               if(!gpt.isLatLonNan())
+               {
+                  poly.push_back(gpt);
+               }
+            }
+            localToWorld(ossimDpt(0, 0), gpt);
+            if(!gpt.isLatLonNan())
+            {
+               poly.push_back(gpt);
+            }
+            
+         }
+
+         result = poly;
+         if(!result.isValid()) result.setToBufferedShape();
+      }
+   }
+}
+
+
+void ossimImageGeometry::getBoundingRect(ossimIrect& bounding_rect) const
+{
+   if (m_imageSize.hasNans())
+   {
+      bounding_rect.makeNan();
+   }
+   else
+   {
+      bounding_rect.set_ulx(0);
+      bounding_rect.set_uly(0);
+      bounding_rect.set_lrx(m_imageSize.x-1);
+      bounding_rect.set_lry(m_imageSize.y-1);
+   }
+}
+
+void ossimImageGeometry::getBoundingRect(ossimDrect& bounding_rect) const
+{
+   if (m_imageSize.hasNans())
+   {
+      bounding_rect.makeNan();
+   }
+   else
+   {
+      bounding_rect.set_ulx(0);
+      bounding_rect.set_uly(0);
+      bounding_rect.set_lrx(m_imageSize.x-1);
+      bounding_rect.set_lry(m_imageSize.y-1);
+   }
+}
+
+void ossimImageGeometry::getBoundingGroundRect(ossimGrect& bounding_grect) const
+{
+   ossimGpt ul, ur, lr, ll;
+   getCornerGpts(ul, ur, lr, ll);
+   bounding_grect.ul().lat = ul.lat > ur.lat ? ul.lat : ur.lat;
+   bounding_grect.ul().lon = ul.lon < ll.lon ? ul.lon : ll.lon;
+   bounding_grect.lr().lat = ll.lat < lr.lat ? ll.lat : lr.lat;
+   bounding_grect.lr().lon = ur.lon > lr.lon ? ur.lon : lr.lon;
+}
+
+void ossimImageGeometry::applyScale(const ossimDpt& scale, bool recenterTiePoint)
+{
+   if ((scale.x != 0.0) && (scale.y != 0.0))
+   {
+      ossimMapProjection* map_Proj = dynamic_cast<ossimMapProjection*>(m_projection.get());
+      if ( map_Proj )
+      {
+         m_imageSize.x = ossim::round<ossim_int32>(m_imageSize.x / scale.x);
+         m_imageSize.y = ossim::round<ossim_int32>(m_imageSize.y / scale.y);
+         map_Proj->applyScale(scale, recenterTiePoint);
+      }
+   }
+}
+
+ossimAdjustableParameterInterface* ossimImageGeometry::getAdjustableParameterInterface()
+{
+   return PTR_CAST(ossimAdjustableParameterInterface, getProjection());
+}
+
+const ossimAdjustableParameterInterface* ossimImageGeometry::getAdjustableParameterInterface()const
+{
+   return dynamic_cast<const ossimAdjustableParameterInterface*>(getProjection());
+
+}
+
+bool ossimImageGeometry::computeImageToGroundPartialsWRTAdjParam(ossimDpt& result,
+                                                                           const ossimGpt& gpt,
+                                                                           ossim_uint32 idx,
+                                                                           ossim_float64 paramDelta)
+{
+   double den = 0.5/paramDelta; // this is the same as dividing by 2*delta
+   
+   result = ossimDpt(0.0,0.0);
+   ossimAdjustableParameterInterface* adjustableParamInterface = getAdjustableParameterInterface();
+   
+   if(!adjustableParamInterface) return false;
+   if(idx >= adjustableParamInterface->getNumberOfAdjustableParameters()) return false;
+   
+   ossimDpt p1, p2;
+   // double middle = adjustableParamInterface->getAdjustableParameter(idx);
+   double middle = adjustableParamInterface->getParameterCenter(idx);
+   
+   //set parm to high value
+   // adjustableParamInterface->setAdjustableParameter(idx, middle + paramDelta, true);
+   adjustableParamInterface->setParameterCenter(idx, middle + paramDelta, true);
+   worldToLocal(gpt, p1);
+   
+   //set parm to low value and gte difference
+   // adjustableParamInterface->setAdjustableParameter(idx, middle - paramDelta, true);
+   adjustableParamInterface->setParameterCenter(idx, middle - paramDelta, true);
+   worldToLocal(gpt, p2);
+   
+   //get partial derivative
+   result = (p2-p1)*den;
+   
+   //reset param
+   // adjustableParamInterface->setAdjustableParameter(idx, middle, true);
+   adjustableParamInterface->setParameterCenter(idx, middle, true);
+   
+   return !result.hasNans();
+}
+                         
+bool ossimImageGeometry::computeImageToGroundPartialsWRTAdjParams(NEWMAT::Matrix& result, 
+                                                                            const ossimGpt& gpt,
+                                                                            ossim_float64 paramDelta)
+{
+   ossimAdjustableParameterInterface* adjustableParamInterface = getAdjustableParameterInterface();
+   
+   ossim_uint32 nAdjustables = adjustableParamInterface->getNumberOfAdjustableParameters();
+   
+   ossim_uint32 idx = 0;
+   
+   result = NEWMAT::Matrix(nAdjustables, 2);
+   for(;idx < nAdjustables; ++idx)
+   {
+      ossimDpt paramResResult;
+      computeImageToGroundPartialsWRTAdjParam(paramResResult,
+                                                        gpt,
+                                                        idx,
+                                                        paramDelta);
+      result[idx][0] = paramResResult.x;
+      result[idx][1] = paramResResult.y;
+   }
+   
+   return true;
+}
+
+bool ossimImageGeometry::computeImageToGroundPartialsWRTAdjParams(NEWMAT::Matrix& result,
+                                                                            const ossimGpt& gpt,
+                                                                            const DeltaParamList& deltas)
+{
+   
+   ossimAdjustableParameterInterface* adjustableParamInterface = getAdjustableParameterInterface();
+   
+   ossim_uint32 nAdjustables = adjustableParamInterface->getNumberOfAdjustableParameters();
+   
+   if(nAdjustables != deltas.size()) return false;
+   ossim_uint32 idx = 0;
+   
+   result = NEWMAT::Matrix(nAdjustables, 2);
+   for(;idx < nAdjustables; ++idx)
+   {
+      ossimDpt paramResResult;
+      computeImageToGroundPartialsWRTAdjParam(paramResResult,
+                                                        gpt,
+                                                        idx,
+                                                        deltas[idx]);
+      // ROWxCOL
+      result[idx][0] = paramResResult.x;
+      result[idx][1] = paramResResult.y;
+   }
+   
+   return true;
+}
+
+bool ossimImageGeometry::computeGroundToImagePartials(NEWMAT::Matrix& result,
+                                                      const ossimGpt& gpt,
+                                                      const ossimDpt3d& deltaLlh)
+{
+   if(!getProjection()) return false;
+   ossimDpt p1;
+   ossimDpt p2;
+   
+   ossimDpt deltaWithRespectToLon;
+   ossimDpt deltaWithRespectToLat;
+   ossimDpt deltaWithRespectToH;
+   ossim_float64 h = ossim::isnan(gpt.height())?0.0:gpt.height();
+
+   // do the change in lon first for the dx, dy
+   //
+   worldToLocal(ossimGpt(gpt.latd(), gpt.lond()+deltaLlh.x, h, gpt.datum()), p1);
+   worldToLocal(ossimGpt(gpt.latd(), gpt.lond()-deltaLlh.x, h, gpt.datum()), p2);
+   
+   double den = 0.5/deltaLlh.x; // this is the same as dividing by 2*delta
+   deltaWithRespectToLon = (p2-p1)*den;
+   
+    
+   // do the change in lat for the dx, dy
+   //
+   worldToLocal(ossimGpt(gpt.latd()+deltaLlh.y, gpt.lond(), h, gpt.datum()), p1);
+   worldToLocal(ossimGpt(gpt.latd()-deltaLlh.y, gpt.lond(), h, gpt.datum()), p2);
+   
+   den = 0.5/deltaLlh.y; // this is the same as dividing by 2*delta
+   deltaWithRespectToLat = (p2-p1)*den;
+
+   
+   // do the change in height first for the dx, dy
+   //
+   worldToLocal(ossimGpt(gpt.latd(), gpt.lond(), h+deltaLlh.z, gpt.datum()), p1);
+   worldToLocal(ossimGpt(gpt.latd(), gpt.lond(), h-deltaLlh.z, gpt.datum()), p2);
+   
+   den = 0.5/deltaLlh.z; // this is the same as dividing by 2*delta
+   deltaWithRespectToH = (p2-p1)*den;
+   
+   
+   result = NEWMAT::Matrix(3,2);
+   
+   // set the matrix
+   //
+   result[1][0] = deltaWithRespectToLon.x*DEG_PER_RAD; 
+   result[1][1] = deltaWithRespectToLon.y*DEG_PER_RAD; 
+   result[0][0] = deltaWithRespectToLat.x*DEG_PER_RAD; 
+   result[0][1] = deltaWithRespectToLat.y*DEG_PER_RAD; 
+   result[2][0] = deltaWithRespectToH.x; 
+   result[2][1] = deltaWithRespectToH.y; 
+   
+   
+   return true; 
+}
+
+bool ossimImageGeometry::computeGroundToImagePartials(NEWMAT::Matrix& result,
+                                                      const ossimGpt& gpt)
+{
+   ossimDpt mpp = getMetersPerPixel();
+   ossimGpt originPoint;
+   ossim_float64 len = mpp.length();
+   
+   if(len > FLT_EPSILON)
+   {
+      ossim_float64 delta = originPoint.metersPerDegree().length();
+   
+      delta = len/delta;
+      
+      return computeGroundToImagePartials(result, 
+                                          gpt, 
+                                          ossimDpt3d(delta,
+                                                     delta,
+                                                     len));
+   }
+   
+   return false;
+}
+
+ossim_float64 ossimImageGeometry::upIsUpAngle() const
+{
+   ossim_float64 result = ossim::nan();
+
+   if ( m_projection.valid() )
+   {
+      if ( m_projection->isAffectedByElevation() )
+      {
+         const int NUMBER_OF_SAMPLES = 9;
+         
+         // In meters.  This is about a height of a 6 to 7 story building.
+         const double ELEVATION_DISPLACEMENT = 20;
+         
+         ossimDrect bounds;
+         getBoundingRect( bounds );
+         
+         if( !bounds.hasNans() )
+         {
+            ossim_float64 widthPercent  = bounds.width()*.1;
+            ossim_float64 heightPercent = bounds.height()*.1;
+            
+            //---
+            // Sanity check to make sure that taking 10 percent out on the image
+            // gets us to at least 1 pixel away.
+            //---
+            if(widthPercent < 1.0) widthPercent = 1.0;
+            if(heightPercent < 1.0) heightPercent = 1.0;
+            
+            // set up some work variables to help calculate the average partial
+            //
+            std::vector<ossimDpt> ipts(NUMBER_OF_SAMPLES);
+            std::vector<ossimGpt> gpts(NUMBER_OF_SAMPLES);
+            std::vector<ossimDpt> iptsDisplacement(NUMBER_OF_SAMPLES);
+            std::vector<ossimDpt> partials(NUMBER_OF_SAMPLES);
+            ossimDpt averageDelta(0.0,0.0);
+            
+            ossimDpt centerIpt = bounds.midPoint();
+            
+            //---
+            // Lets take an average displacement about the center point (3x3 grid)
+            // we will go 10 percent out of the width and height of the image and
+            // look at the displacement at those points and average them we will
+            // use the average displacement to compute the up is up rotation.
+            //---
+            
+            // top row:
+
+            // 45 degree left quadrant
+            // RP - FIX POINTS IN FIRST ROW
+            ipts[0] = centerIpt + ossimDpt(-widthPercent, -heightPercent);
+            // 45 degree middle top 
+            ipts[1] = centerIpt + ossimDpt(0.0,heightPercent);
+            // 45 degree right quadrant
+            ipts[2] = centerIpt + ossimDpt(widthPercent, -heightPercent);
+            
+            // middle row
+            ipts[3] = centerIpt + ossimDpt(-widthPercent, 0.0); // left middle
+            ipts[4] = centerIpt;
+            ipts[5] = centerIpt + ossimDpt(widthPercent, 0.0);
+            
+            // bottom row
+            ipts[6] = centerIpt + ossimDpt(-widthPercent, heightPercent);
+            ipts[7] = centerIpt + ossimDpt(0.0, heightPercent);
+            ipts[8] = centerIpt + ossimDpt(widthPercent, heightPercent);
+            
+            ossim_uint32 idx = 0;
+            for(idx = 0; idx < ipts.size(); ++idx)
+            {
+               double h = 0.0;
+               localToWorld(ipts[idx], gpts[idx]);
+               h = gpts[idx].height();
+               if(ossim::isnan(h)) h = 0.0;
+               gpts[idx].height(h + ELEVATION_DISPLACEMENT);
+               worldToLocal(gpts[idx], iptsDisplacement[idx]);
+               averageDelta = averageDelta + (iptsDisplacement[idx] - ipts[idx]);
+            }
+            
+            ossim_float64 averageLength = averageDelta.length();
+            if(averageLength < 1) return false;
+            
+            if(!ossim::almostEqual((double)0.0, (double)averageLength))
+            {
+               averageDelta = averageDelta/averageLength;
+            }
+            // RP - the rest of this calculation seems to be leading to less accurate results.  
+            // We already have the average image space displacement from raising the height for 9 points in the image 
+            // Just rotate based on this displacement, 
+            // scaling based on the image size distorts the direction of the up vector, leading to inaccurate results for non-square images
+            //
+            //ossimDpt averageLocation =  (ossimDpt(averageDelta.x*bounds.width(), 
+            //                                      averageDelta.y*bounds.height())+centerIpt) ;
+            //ossimGpt averageLocationGpt;
+            //ossimGpt centerGpt;
+            
+            //localToWorld(averageLocation, averageLocationGpt);
+            //localToWorld(ipts[0], centerGpt);
+            
+            ossimDpt deltaPt = averageDelta; //averageLocation - centerIpt; 
+            ossimDpt deltaUnitPt = deltaPt;
+            double len = deltaPt.length();
+            if(len > FLT_EPSILON)
+            {
+               deltaUnitPt  = deltaUnitPt/len;
+            }
+            
+            // Image space model positive y is down.  Let's reflect to positve y up.
+            deltaUnitPt.y *= -1.0; // Reflect y to be right handed.
+            
+            result = ossim::atan2d(deltaUnitPt.x, deltaUnitPt.y);
+            
+            //---
+            // We are essentially simulating camera rotation so negate the rotation
+            // value.
+            //---
+            result *= -1;
+            
+            if(result < 0) result += 360.0;
+            
+         }  // Matches: if( bounds.hasNans() == false )
+      }
+      else
+      {
+         result = 0;
+      }
+      
+   } // Matches: if ( m_projection.valid() && m_projection->isAffectedByElevation() )
+
+   return result;
+   
+} // End: ossimImageGeometry::upIsUpAngle()
+
+ossim_float64 ossimImageGeometry::northUpAngle()const
+{
+   ossim_float64 result = ossim::nan();
+
+   if ( m_projection.valid() )
+   {
+      ossimDrect bounds;
+      getBoundingRect( bounds );
+      
+      if( !bounds.hasNans() )
+      {
+         ossimDpt centerIpt = bounds.midPoint();
+
+         ossimDpt midBottomIpt( centerIpt.x, bounds.lr().y );
+         ossimDpt midTopIpt( centerIpt.x, bounds.ul().y );
+
+         ossimGpt midBottomGpt;
+         ossimGpt midTopGpt;
+         
+         localToWorld( midBottomIpt, midBottomGpt );
+         localToWorld( midTopIpt, midTopGpt );
+
+         if ( !midBottomGpt.hasNans() && !midTopGpt.hasNans() )
+         {
+            result = midBottomGpt.azimuthTo( midTopGpt );
+
+            if(result < 0) result += 360.0;
+         }
+      }
+      
+   } // Matches: if ( m_projection.valid() )
+
+   return result;
+   
+} // End: ossimImageGeometry::northUpAngle()
+
diff --git a/ossim/src/ossim/imaging/ossimImageGeometryFactory.cpp b/ossim/src/ossim/imaging/ossimImageGeometryFactory.cpp
new file mode 100644
index 0000000..58c7fde
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageGeometryFactory.cpp
@@ -0,0 +1,228 @@
+//*****************************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: Class implementation of ossimImageGeometryFactory.
+// See .h file for class documentation.
+//
+//*****************************************************************************
+// $Id$
+#include <ossim/imaging/ossimImageGeometryFactory.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossim2dTo2dShiftTransform.h>
+#include <ossim/imaging/ossimNitfTileSource.h>
+#include <ossim/imaging/ossimTiffTileSource.h>
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+#include <ossim/support_data/ossimNitfIchipbTag.h>
+#include <ossim/support_data/ossimNitfStdidcTag.h>
+#include <ossim/projection/ossimSensorModel.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/base/ossim2dTo2dTransformRegistry.h>
+
+ossimImageGeometryFactory* ossimImageGeometryFactory::m_instance = 0;
+
+ossimImageGeometryFactory::ossimImageGeometryFactory()
+{
+   m_instance = this;
+}
+
+ossimImageGeometryFactory* ossimImageGeometryFactory::instance()
+{
+   if(!m_instance)
+   {
+      m_instance = new ossimImageGeometryFactory();
+   }
+   
+   return m_instance;
+}
+
+ossimImageGeometry* ossimImageGeometryFactory::createGeometry(
+   const ossimString& typeName)const
+{
+   if(typeName == "ossimImageGeometry")
+   {
+      return new ossimImageGeometry();
+   }
+   
+   return 0;
+}
+
+ossimImageGeometry* ossimImageGeometryFactory::createGeometry(
+   const ossimKeywordlist& kwl, const char* prefix)const
+{
+   ossimRefPtr<ossimImageGeometry> result = 0;
+   ossimString type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
+   if(!type.empty())
+   {
+      result = createGeometry(type);
+      if(result.valid()&&!result->loadState(kwl, prefix))
+      {
+         result = 0;
+      }
+   }
+   
+   return result.release();
+}
+
+ossimImageGeometry* ossimImageGeometryFactory::createGeometry(
+   const ossimFilename& /* filename */, ossim_uint32 /* entryIdx */)const
+{
+   // currently don't support this option just yet by this factory
+   return 0;
+}
+
+bool ossimImageGeometryFactory::extendGeometry(ossimImageHandler* handler)const
+{
+   bool result = false;
+   if (handler)
+   {
+      bool add2D = true;
+      ossimRefPtr<ossimImageGeometry> geom = handler->getImageGeometry();
+      if(geom.valid())
+      {
+         if(!geom->getProjection())
+         {
+            geom->setProjection(createProjection(handler));
+            result = geom->hasProjection();
+         }
+         if(geom->getProjection())
+         {
+            if( !(dynamic_cast<ossimSensorModel*>(geom->getProjection())))
+            {
+               add2D = false;
+            }
+         }
+         if(!geom->getTransform()&&add2D)
+         {
+            geom->setTransform(createTransform(handler));
+            result |= geom->hasTransform();
+        }
+      }
+   }
+   return result;
+}
+
+void ossimImageGeometryFactory::getTypeNameList(
+   std::vector<ossimString>& typeList)const
+{
+   typeList.push_back("ossimImageGeometry");
+}
+
+ossim2dTo2dTransform* ossimImageGeometryFactory::createTransform(
+   ossimImageHandler* handler)const
+{
+   // Currently nothing to do...
+   
+   ossimRefPtr<ossim2dTo2dTransform> result = 0;
+   
+   ossimNitfTileSource* nitf = dynamic_cast<ossimNitfTileSource*> (handler);
+   
+   if(nitf)
+   {
+      result = createTransformFromNitf(nitf);
+   }
+   
+   return result.release();
+}
+
+ossimProjection* ossimImageGeometryFactory::createProjection(
+   ossimImageHandler* handler) const
+{
+   ossimRefPtr<ossimProjection> result =
+      ossimProjectionFactoryRegistry::instance()->createProjection(handler);
+
+   return result.release();
+}
+
+ossim2dTo2dTransform* ossimImageGeometryFactory::createTransformFromNitf(ossimNitfTileSource* nitf)const
+{
+   ossim2dTo2dTransform* result = 0;
+   
+   ossimRefPtr<ossimNitfImageHeader> hdr = nitf->getCurrentImageHeader();
+   if (!hdr)
+   {
+      return result;
+   }
+   
+   //---
+   // Test for the ichipb tag and set the sub image if needed.
+   // 
+   // NOTE # 1:
+   // 
+   // There are nitf writers that set the ichipb offsets and only have
+   // IGEOLO field present.  For these it has been determined
+   // (but still in question) that we should not apply the sub image offset.
+   //
+   // See trac # 1578
+   // http://trac.osgeo.org/ossim/ticket/1578
+   //
+   // NOTE # 2:
+   //
+   // Let the ICHIPB have precedence over the STDIDC tag as we could have a
+   // chip of a segment.
+   //---
+   ossimRefPtr<ossimNitfRegisteredTag> tag =
+   hdr->getTagData(ossimString("ICHIPB"));
+   if (tag.valid())
+   {
+      ossimNitfIchipbTag* ichipb = PTR_CAST(ossimNitfIchipbTag, tag.get());
+      if (ichipb)
+      {
+//         const ossimRefPtr<ossimNitfRegisteredTag> blocka =
+//         hdr->getTagData(ossimString("BLOCKA"));
+//         const ossimRefPtr<ossimNitfRegisteredTag> rpc00a =
+//         hdr->getTagData(ossimString("RPC00A"));              
+//         const ossimRefPtr<ossimNitfRegisteredTag> rpc00b =
+//         hdr->getTagData(ossimString("RPC00B"));
+         
+         //---
+         // If any of these tags are present we will use the sub image from
+         // the ichipb tag.
+         //---
+//         if ( blocka.get() || rpc00a.get() || rpc00b.get() )
+         
+         // ************************* THERE ARE PROBLEMS NOT SETTING THIS AT SITE.  GO AHEAD AND ALWAYS INIT THE SHIFT
+         {
+            result = ichipb->newTransform();
+         }
+      }
+   }
+   
+   if ( !result)
+   {
+      //---
+      // Look for the STDIDC tag for a sub image (segment) offset.
+      //
+      // See: STDI-002 Table 7.3 for documentation.
+      //---
+      tag = hdr->getTagData(ossimString("STDIDC"));
+      if (tag.valid() && (hdr->getIMode() == "B") )
+      {
+         ossimDpt shift;
+         ossimNitfStdidcTag* stdidc = PTR_CAST(ossimNitfStdidcTag, tag.get());
+         if (stdidc)
+         {
+            ossim_int32 startCol = stdidc->getStartColumn().toInt32();
+            ossim_int32 startRow = stdidc->getStartRow().toInt32();
+            if ( (startCol > 0) && (startRow > 0) )
+            {
+               
+               // field are one based; hence, the - 1.
+               shift.x = (startCol-1) * hdr->getNumberOfPixelsPerBlockHoriz();
+               shift.y = (startRow-1) * hdr->getNumberOfPixelsPerBlockVert();
+            }
+            if(shift.x > 0 ||
+               shift.y > 0)
+            {
+               result = new ossim2dTo2dShiftTransform(shift);
+            }
+         }
+      }
+   }
+   
+   return result;
+}
+
+
diff --git a/ossim/src/ossim/imaging/ossimImageGeometryRegistry.cpp b/ossim/src/ossim/imaging/ossimImageGeometryRegistry.cpp
new file mode 100644
index 0000000..89027e1
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageGeometryRegistry.cpp
@@ -0,0 +1,75 @@
+//**************************************************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: Class implementation of ossimImageGeometryRegistry. See .h file for class documentation.
+//
+//**************************************************************************************************
+// $Id$
+#include <ossim/imaging/ossimImageGeometryRegistry.h>
+#include <ossim/imaging/ossimImageGeometryFactory.h>
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+ossimImageGeometryRegistry* ossimImageGeometryRegistry::m_instance = 0;
+RTTI_DEF1(ossimImageGeometryRegistry, "ossimImageGeometryRegistry", ossimImageGeometryFactoryBase);
+ossimImageGeometryRegistry* ossimImageGeometryRegistry::instance()
+{
+   if(!m_instance)
+   {
+      m_instance = new ossimImageGeometryRegistry();
+      m_instance->registerFactory(ossimImageGeometryFactory::instance());
+      ossimObjectFactoryRegistry::instance()->registerFactory(m_instance);
+   }
+   
+   return m_instance;
+}
+
+bool ossimImageGeometryRegistry::extendGeometry(ossimImageHandler* handler)const
+{
+   bool result = false;
+   ossim_uint32 idx = 0;
+   for(;((idx < m_factoryList.size())&&!result); ++idx)
+   {
+      result = m_factoryList[idx]->extendGeometry(handler);
+   }
+   
+   return result;
+}
+
+ossimImageGeometry* ossimImageGeometryRegistry::createGeometry(const ossimString& typeName)const
+{
+   ossimRefPtr<ossimObject> obj = createObjectFromRegistry(typeName);
+   
+   ossimRefPtr<ossimImageGeometry> geomResult = dynamic_cast<ossimImageGeometry*>(obj.get());
+   
+   obj = 0;
+   
+   return geomResult.release();
+}
+
+ossimImageGeometry* ossimImageGeometryRegistry::createGeometry(const ossimKeywordlist& kwl,
+                                                               const char* prefix)const
+{
+   ossimRefPtr<ossimObject> obj = createObjectFromRegistry(kwl, prefix);
+   
+   ossimRefPtr<ossimImageGeometry> geomResult = dynamic_cast<ossimImageGeometry*>(obj.get());
+   
+   obj = 0;
+   
+   return geomResult.release();
+}
+
+ossimImageGeometry* ossimImageGeometryRegistry::createGeometry(const ossimFilename& filename,
+                                                                       ossim_uint32 entryIdx)const
+{
+   ossimImageGeometry* result = 0;
+   ossim_uint32 idx = 0;
+   for(;((idx < m_factoryList.size())&&!result); ++idx)
+   {
+      result = m_factoryList[idx]->createGeometry(filename, entryIdx);
+   }
+   
+   return result;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimImageHandler.cpp b/ossim/src/ossim/imaging/ossimImageHandler.cpp
new file mode 100644
index 0000000..4a24e5b
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageHandler.cpp
@@ -0,0 +1,1689 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+// 
+// This class defines an abstract image handler which all loaders should
+// derive from.
+//
+//*******************************************************************
+//  $Id: ossimImageHandler.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/base/ossimBooleanProperty.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimContainerEvent.h>
+#include <ossim/base/ossimEventIds.h>
+#include <ossim/base/ossimFilenameProperty.h>
+#include <ossim/base/ossimNumericProperty.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimPolygon.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/imaging/ossimHistogramWriter.h>
+#include <ossim/imaging/ossimImageGeometryRegistry.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimImageHistogramSource.h>
+#include <ossim/imaging/ossimTiffTileSource.h>
+#include <ossim/imaging/ossimTiffOverviewBuilder.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <algorithm>
+
+RTTI_DEF1(ossimImageHandler, "ossimImageHandler", ossimImageSource)
+
+// Static trace for debugging
+static ossimTrace traceDebug("ossimImageHandler:debug");
+
+// Property keywords.
+static const char HAS_LUT_KW[]                 = "has_lut";
+static const char OPEN_OVERVIEW_FLAG_KW[]      = "open_overview_flag";
+static const char START_RES_LEVEL_KW[]         = "start_res_level";
+static const char SUPPLEMENTARY_DIRECTORY_KW[] = "supplementary_directory";
+static const char VALID_VERTICES_FILE_KW[]     = "valid_vertices_file";
+
+#ifdef OSSIM_ID_ENABLED
+static const char OSSIM_ID[] = "$Id: ossimImageHandler.cpp 23664 2015-12-14 14:17:27Z dburken $";
+#endif
+
+// GARRETT! All of the decimation factors are scattered throughout. We want to fold that into 
+// the image geometry object. The code is ready in ossimImageGeometry for this (more or less), but
+// the ossimImageGeometry::m_decimationFactors is not being set nor referenced. Can you do this?
+// I'm a little foggy on how we want to incorporate R-level scaling into the geometry object.
+   
+ossimImageHandler::ossimImageHandler()
+:
+ossimImageSource(0, 0, 0, true, false /* output list is not fixed */ ),
+theImageFile(ossimFilename::NIL),
+theOverviewFile(ossimFilename::NIL),
+theSupplementaryDirectory(ossimFilename::NIL),
+theOverview(0),
+theValidImageVertices(0),
+theMetaData(),
+theGeometry(),
+theLut(0),
+theDecimationFactors(0),
+theImageID(""),
+theStartingResLevel(0),
+theOpenOverviewFlag(true),
+thePixelType(OSSIM_PIXEL_IS_POINT)
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimImageHandler::ossimImageHandler() DEBUG:" << std::endl;
+#ifdef OSSIM_ID_ENABLED
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "OSSIM_ID:  "
+         << OSSIM_ID
+         << std::endl;
+#endif      
+   }
+}
+
+ossimImageHandler::~ossimImageHandler()
+{
+   theOverview = 0;
+}
+
+void ossimImageHandler::initialize()
+{
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+bool ossimImageHandler::saveState(ossimKeywordlist& kwl,
+                                  const char* prefix) const
+{
+   static const char MODULE[] = "ossimImageHandler::saveState";
+
+   ossimImageSource::saveState(kwl, prefix);
+   if (kwl.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE
+         << " ERROR detected in keyword list!  State not saved."
+         << std::endl;
+      return false;
+   }
+
+   kwl.add(prefix, ossimKeywordNames::FILENAME_KW, theImageFile.c_str(), true);
+   kwl.add(prefix, HAS_LUT_KW, (theLut.valid()?"true":"false"), true);
+   kwl.add(prefix, ossimKeywordNames::IMAGE_ID_KW, theImageID, true);
+   kwl.add(prefix, ossimKeywordNames::OVERVIEW_FILE_KW, theOverviewFile.c_str(), true);
+   kwl.add(prefix, SUPPLEMENTARY_DIRECTORY_KW, theSupplementaryDirectory.c_str(), true);
+   kwl.add(prefix, START_RES_LEVEL_KW, theStartingResLevel, true);
+   kwl.add(prefix, OPEN_OVERVIEW_FLAG_KW, (theOpenOverviewFlag?"1":"0"), true);
+   kwl.add(prefix, ossimKeywordNames::PIXEL_TYPE_KW, (ossim_uint16) thePixelType, true);
+
+   return true;
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+bool ossimImageHandler::loadState(const ossimKeywordlist& kwl,
+                                  const char* prefix)
+{
+   static const char MODULE[] = "ossimImageHandler::loadState(kwl, prefix)";
+   theDecimationFactors.clear();
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " DEBUG: entered ..."
+         << std::endl;
+   }
+   
+   ossimImageSource::loadState(kwl, prefix);
+   
+   if (kwl.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE
+         << "WARNING: error detected in keyword list!  State not load."
+         << std::endl;
+      
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << " DEBUG: "
+            << "leaving with error in kwl ..." << std::endl;
+      }
+      return false;
+   }
+   
+   const char* lookup = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
+   if (!lookup)
+   {
+      // Deprecated...
+      lookup = kwl.find(prefix, ossimKeywordNames::IMAGE_FILE_KW);
+   }
+   
+   if (lookup)
+   {
+      theImageFile = lookup;
+   }
+   
+   lookup = kwl.find(prefix, ossimKeywordNames::OVERVIEW_FILE_KW);
+   if(lookup)
+   {
+      theOverviewFile = ossimFilename(lookup);
+   }
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " DEBUG:\n"
+         << "filename = " << theImageFile << std::endl;
+   }
+   
+   // Check for an external geometry file to initialize our image geometry object:
+   lookup = kwl.find(prefix, ossimKeywordNames::GEOM_FILE_KW);
+   if (lookup)
+   {
+      ossimKeywordlist geomKwl;
+      if (geomKwl.addFile(lookup) == true)
+      {
+         theGeometry = new ossimImageGeometry;
+         theGeometry->loadState(geomKwl);
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << MODULE << " DEBUG:"
+               << "Loaded external geometry file:  "
+               << lookup
+               << "\n" << geomKwl << std::endl;
+         }
+      }
+   }
+   
+   // Check for an valid image vetices file.
+   lookup = kwl.find(prefix, VALID_VERTICES_FILE_KW);
+   if (lookup)
+   {
+      initVertices(lookup);
+   }
+
+   // Starting resolution level.
+   lookup = kwl.find(prefix, START_RES_LEVEL_KW);
+   if (lookup)
+   {
+      theStartingResLevel = ossimString(lookup).toUInt32();
+   }
+
+   // Open overview flag.
+   lookup = kwl.find(prefix, OPEN_OVERVIEW_FLAG_KW);
+   if (lookup)
+   {
+      setOpenOverviewFlag( ossimString(lookup).toBool() );
+   }
+
+   // The supplementary directory for finding the overview
+   lookup = kwl.find(prefix, SUPPLEMENTARY_DIRECTORY_KW);
+   if (lookup)
+   {
+      theSupplementaryDirectory = ossimFilename(lookup);
+   }
+
+   if(getNumberOfInputs())
+   {
+      theInputObjectList.clear();
+   }
+   theInputListIsFixedFlag = true;
+   
+   // Read image id if present:
+   theImageID = kwl.find(prefix, ossimKeywordNames::IMAGE_ID_KW);
+
+   lookup = kwl.find(prefix, ossimKeywordNames::PIXEL_TYPE_KW);
+   if (lookup)
+   {
+      thePixelType = (ossimPixelType) atoi(lookup);
+   }
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " DEBUG: Leaving Ok ..."
+         << std::endl;
+   }
+   return true;
+}
+
+bool ossimImageHandler::initVertices(const char* file)
+{
+   static const char MODULE[] = "ossimImageHandler::initVertices";
+
+   ossimFilename f = file;
+   if (!f.exists()) return false;
+
+   ossimKeywordlist kwl(file);
+   
+   if (kwl.getErrorStatus() != ossimErrorCodes::OSSIM_OK)
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimImageHandler::initVertices NOTICE:"
+            << "\nError reading valid vertice file:  " << file << std::endl;
+      }
+      return false;
+   }
+
+   // Clean out any old vertices...
+   theValidImageVertices.clear();
+
+   ossim_uint32 number_of_points = kwl.numberOf("point", "x");
+
+   for (ossim_uint32 i=0; i<number_of_points; ++i)
+   {
+      ossimIpt pt;
+      const char* lookup;
+      ossimString p = "point";
+      p += ossimString::toString(i);
+      
+      ossimString px = p + ".x";
+      lookup = kwl.find(px.c_str());
+      if (lookup)
+      {
+         pt.x = atoi(lookup);
+      }
+      else
+      {
+         if (traceDebug())
+         {
+            CLOG << " ERROR:"
+                 << "\nlookup failed for:  " << px.c_str()
+                 << "\nReturning..."
+                 << std::endl;
+         }
+         return false;
+      }
+         
+      ossimString py = p + ".y";
+      lookup = kwl.find(py.c_str());
+      if (lookup)
+      {
+         pt.y = atoi(lookup);
+      }
+      else
+      {
+         if (traceDebug())
+         {
+            CLOG << " ERROR:"
+                 << "\nLookup failed for:  " << py.c_str()
+                 << "\nReturning..."
+                 << std::endl;
+         }
+         return false;
+      }
+
+      theValidImageVertices.push_back(pt);
+   }
+
+   
+   if (traceDebug())
+   {
+      CLOG << " DEBUG:"
+           << "\nVertices file:  " << f
+           << "\nValid image vertices:"
+           << std::endl;
+      for (ossim_uint32 i=0; i<theValidImageVertices.size(); ++i)
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "\npoint[" << i << "]:  " << theValidImageVertices[i];
+      }
+      ossimNotify(ossimNotifyLevel_DEBUG) << std::endl;
+   }
+   
+   return true;
+}
+
+ossim_uint32 ossimImageHandler::getNumberOfDecimationLevels() const
+{
+   ossim_uint32 result = 1; // Add r0
+   if (theOverview.valid())
+   {
+      result += theOverview->getNumberOfDecimationLevels();
+   }
+   return result;
+}
+
+ossim_uint32 ossimImageHandler::getNumberOfReducedResSets() const
+{
+   return getNumberOfDecimationLevels();
+}
+
+ossimIrect ossimImageHandler::getImageRectangle(ossim_uint32 resLevel) const
+{
+   ossimIrect result;
+   
+   if( isOpen() && isValidRLevel(resLevel) )
+   {
+      ossim_int32 lines   = getNumberOfLines(resLevel);
+      ossim_int32 samples = getNumberOfSamples(resLevel);
+      if( !lines || !samples )
+      {
+         result.makeNan();
+      }
+      else
+      {
+         result = ossimIrect(0, 0, samples-1, lines-1);
+      }
+   }
+   else
+   {
+      result.makeNan();
+   }
+
+   return result;
+}
+
+ossimIrect ossimImageHandler::getBoundingRect(ossim_uint32 resLevel) const
+{
+   return getImageRectangle(resLevel);
+}
+
+
+void ossimImageHandler::getDecimationFactor(ossim_uint32 resLevel, ossimDpt& result) const
+{
+   if (resLevel < theDecimationFactors.size())
+      result = theDecimationFactors[resLevel];
+   else
+      result.makeNan();
+}
+
+void ossimImageHandler::getDecimationFactors(vector<ossimDpt>& decimations) const
+{
+   decimations = theDecimationFactors;
+}
+
+//*************************************************************************************************
+// Method determines the decimation factors at each resolution level. This
+// base class implementation computes the decimation by considering the ratios in image size
+// between resolution levels, with fuzzy logic for rounding ratios to the nearest power of 2
+// if possible. Derived classes need to override this method if the decimations are provided
+// as part of the image metadata. In some cases (cf. ossimNitfTileSource), the derived class can
+// set the first R-level (R0) decimation in the case that it is not unity, and then invoke this
+// base class implementation to compute remaining R-levels, respecting the R0 decimation previously
+// set by derived class.
+//*************************************************************************************************
+void ossimImageHandler::establishDecimationFactors() 
+{
+   double line_decimation, samp_decimation, decimation, ratio;
+   ossim_uint32 num_lines, num_samps;
+   
+   // The error margin here is effectively the percent error tolerated between ideal number of 
+   // pixels for given power-of-2 decimation, and the actual number of pixels found at this 
+   // decimation level. Typically, the last level will have fewer pixels than expected, hence the 
+   // need for this logic...
+   static const double ERROR_MARGIN = 1.1;  // 10% allowance
+
+   // NOTE -- Until the end of this method, all decimation values are actually inverse quantities,
+   // i.e., a decimation of 0.5 typical for rlevel 1 is represented here as 2. This facilitates the
+   // fuzzy logic for recognizing powers of 2 (as integers)
+
+   // Default implementation assumes R0 is not decimated. Check for R0 defined by derived class
+   // however, in case this is not the case:
+   ossimDpt decimation_r0 (1.0, 1.0);
+   if (theDecimationFactors.size() > 0)
+   {
+      decimation_r0.x = 1.0/theDecimationFactors[0].x; // note use of inverse decimation
+      decimation_r0.y = 1.0/theDecimationFactors[0].y; 
+   }
+   else
+      theDecimationFactors.push_back(decimation_r0);
+
+   // Variables used in loop below:
+   ossim_uint32 num_lines_r0 = getNumberOfLines(0);
+   ossim_uint32 num_samps_r0 = getNumberOfSamples(0);
+   ossim_uint32 power_of_2_decimation = (ossim_uint32) decimation_r0.x;
+
+   // Remaining res levels are computed as a ratio of image size at R0 to image size at Rn:
+   ossim_uint32 nRlevels = getNumberOfDecimationLevels();
+   for(ossim_uint32 res_level = 1; res_level < nRlevels; ++res_level)
+   {
+      num_lines = getNumberOfLines(res_level);
+      num_samps = getNumberOfSamples(res_level);
+      
+      if ((num_lines < 2) || (num_samps < 2)) 
+         break;
+
+      line_decimation = decimation_r0.y * num_lines_r0 / (double)num_lines;
+      samp_decimation = decimation_r0.x * num_samps_r0 / (double)num_samps;
+      decimation = line_decimation<samp_decimation ? line_decimation:samp_decimation;
+
+      // Check for possible error due to inexact ratios.
+      // Loop until reasonable effort was made to establish the corresponding power-of-2 decimation.
+      // If close match is found, the exact integer value is assigned:
+      do 
+      {
+         power_of_2_decimation *= 2;
+         ratio = (double)power_of_2_decimation / decimation;
+         if (ratio < 1.0)
+            ratio = 1.0/ratio;
+         if (ratio < ERROR_MARGIN)
+            decimation = (double) power_of_2_decimation;
+
+      } while ((double) power_of_2_decimation < decimation);
+
+      // Convert the computed decimation back to fractional form before saving in the factors list:
+      decimation = 1.0/decimation;
+      theDecimationFactors.push_back(ossimDpt(decimation, decimation));
+   }
+}
+
+
+bool ossimImageHandler::buildHistogram(int numberOfRLevels)
+{
+   if(isOpen())
+   {
+      ossimFilename file =
+         getFilenameWithThisExtension(ossimString(".his"));
+      
+      ossimRefPtr<ossimImageHistogramSource> histoSource = new ossimImageHistogramSource;
+      ossimRefPtr<ossimHistogramWriter> writer = new ossimHistogramWriter;
+      
+      if(numberOfRLevels)
+      {
+         histoSource->setMaxNumberOfRLevels(numberOfRLevels);
+      }
+      else
+      {
+         histoSource->setMaxNumberOfRLevels(getNumberOfDecimationLevels());
+      }
+      histoSource->connectMyInputTo(0, this);
+      histoSource->enableSource();
+      writer->connectMyInputTo(0, histoSource.get());
+      writer->setFilename(file);
+      writer->addListener(&theStdOutProgress);
+      writer->execute();
+      histoSource->disconnect();
+      writer->disconnect();
+      histoSource = 0;
+      writer = 0;
+   }
+   else
+   {
+      return false;
+   }
+   
+   return true;
+}
+
+bool ossimImageHandler::buildAllHistograms(int numberOfRLevels)
+{
+   ossim_uint32 currentEntry = getCurrentEntry();
+   std::vector<ossim_uint32> entryList;
+   getEntryList(entryList);
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx < entryList.size(); ++idx)
+   {
+      setCurrentEntry(entryList[idx]);
+      if(!buildHistogram(numberOfRLevels))
+      {
+         setCurrentEntry(currentEntry);
+         return false;
+      }
+   }
+   
+   setCurrentEntry(currentEntry);
+   return true;
+}
+
+bool ossimImageHandler::buildOverview(ossimImageHandlerOverviewCompressionType compressionType,
+                                      ossim_uint32 quality,
+                                      ossimFilterResampler::ossimFilterResamplerType resampleType,
+                                      bool includeFullResFlag)
+{
+   ossimFilename file = getFilenameWithThisExtension(ossimString(".ovr"));
+
+   theOverviewFile = file;
+   if(buildOverview(file, compressionType, quality, resampleType, includeFullResFlag))
+   {
+      openOverview();
+   }
+
+   return true;
+}
+
+bool ossimImageHandler::buildAllOverviews(ossimImageHandlerOverviewCompressionType compressionType,
+                                          ossim_uint32 quality,
+                                          ossimFilterResampler::ossimFilterResamplerType resampleType,
+                                          bool includeFullResFlag)
+{
+   ossim_uint32 currentEntry = getCurrentEntry();
+   std::vector<ossim_uint32> entryList;
+   getEntryList(entryList);
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx < entryList.size(); ++idx)
+   {
+      setCurrentEntry(entryList[idx]);
+      if(!buildOverview(compressionType, quality, resampleType, includeFullResFlag))
+      {
+         setCurrentEntry(currentEntry);
+         return false;
+      }
+   }
+   
+   setCurrentEntry(currentEntry);
+   return true;
+}
+
+
+bool ossimImageHandler::buildOverview(const ossimFilename& filename,
+                                      ossimImageHandlerOverviewCompressionType compressionType,
+                                      ossim_uint32 quality,
+                                      ossimFilterResampler::ossimFilterResamplerType resampleType,
+                                      bool includeFullResFlag)
+{
+   closeOverview();
+   if(!isOpen())
+   {
+      return false;
+   }
+
+   theOverviewFile = filename;
+   ossimTiffOverviewBuilder tiffBuilder;
+   if ( tiffBuilder.setInputSource(this) == false )
+   {
+      return false;
+   }
+   
+   ossim_uint16 cType = COMPRESSION_NONE;
+   switch(compressionType)
+   {
+      case OSSIM_OVERVIEW_COMPRESSION_NONE:
+      {
+         cType = COMPRESSION_NONE;
+         break;
+      }
+      case OSSIM_OVERVIEW_COMPRESSION_JPEG:
+      {
+         cType = COMPRESSION_JPEG;
+         break;
+      }
+      case OSSIM_OVERVIEW_COMPRESSION_LZW:
+      {
+         cType = COMPRESSION_LZW;
+         break;
+      }
+      case OSSIM_OVERVIEW_COMPRESSION_DEFLATE:
+      {
+
+         cType = COMPRESSION_DEFLATE;
+         break;
+      }
+      case OSSIM_OVERVIEW_COMPRESSION_PACKBITS:
+      {
+         cType = COMPRESSION_PACKBITS;
+         break;
+      }
+   }
+   tiffBuilder.setJpegCompressionQuality(quality);
+   tiffBuilder.setCompressionType(cType);
+   tiffBuilder.setResampleType(resampleType);
+   tiffBuilder.buildOverview(filename, includeFullResFlag);
+
+   return true;
+}
+
+//*****************************************************************************
+//! Returns the image geometry object associated with this tile source or
+//! NULL if non defined.
+//! The geometry contains full-to-local image transform as well as projection
+//! (image-to-world).
+//*****************************************************************************
+ossimRefPtr<ossimImageGeometry> ossimImageHandler::getImageGeometry()
+{
+   if ( !theGeometry )
+   {
+      //---
+      // Check factory for external geom:
+      //---
+      theGeometry = getExternalImageGeometry();
+
+      if ( !theGeometry )
+      {
+         //---
+         // WARNING:
+         // Must create/set the geometry at this point or the next call to
+         // ossimImageGeometryRegistry::extendGeometry will put us in an infinite loop
+         // as it does a recursive call back to ossimImageHandler::getImageGeometry().
+         //---
+         theGeometry = new ossimImageGeometry();
+
+         //---
+         // And finally allow factories to extend the internal geometry.
+         // This allows plugins for tagged formats with tags not know in the base
+         // to extend the internal geometry.
+         //
+         // Plugins can do handler->getImageGeometry() then modify/extend.
+         //---
+         if(!ossimImageGeometryRegistry::instance()->extendGeometry( this ))
+         {
+            //---
+            // Check for internal, for geotiff, nitf and so on as last resort for getting some
+            // kind of geometry loaded
+            //---
+            theGeometry = getInternalImageGeometry();
+         }
+      }
+
+      // Set image things the geometry object should know about.
+      initImageParameters( theGeometry.get() );
+   }
+   return theGeometry;
+}
+
+ossimRefPtr<ossimImageGeometry> ossimImageHandler::getExternalImageGeometry() const
+{
+   ossimRefPtr<ossimImageGeometry> geom = 0;
+
+   // No geometry object has been set up yet. Check for external geometry file.
+   // Try "foo.geom" if image is "foo.tif":
+   ossimFilename filename = getFilenameWithThisExtension(ossimString(".geom"), false);
+   if(!filename.exists())
+   {
+      // Try "foo_e0.tif" if image is "foo.tif" where "e0" is entry index.
+      filename = getFilenameWithThisExtension(ossimString(".geom"), true);
+   }
+   if(!filename.exists())
+   {
+      // Try supplementary data directory for remote geometry:
+      filename = getFilenameWithThisExtension(ossimString(".geom"), false);
+      filename = theSupplementaryDirectory.dirCat(filename.file());
+   }
+   if(!filename.exists())
+   {
+      // Try supplementary data directory for remote geometry with entry index:
+      filename = getFilenameWithThisExtension(ossimString(".geom"), true);
+      filename = theSupplementaryDirectory.dirCat(filename.file());
+   }
+
+   if(filename.exists())
+   {
+      // Open the geom file as a KWL and initialize our geometry object:
+      filename = filename.expand();
+      ossimKeywordlist geomKwl(filename);
+
+      // Try loadState with no prefix.
+      std::string prefix = "";
+      std::string key = ossimKeywordNames::TYPE_KW;
+      std::string value = geomKwl.findKey(prefix, key);
+
+      if ( value.empty() || (value != "ossimImageGeometry") )
+      {
+         // Try with "image0." type prefix.
+         prefix += std::string("image") + ossimString::toString(getCurrentEntry()).string() +
+            std::string(".");
+         value = geomKwl.findKey(prefix, key);
+         
+         if ( value.empty() || (value != "ossimImageGeometry") )
+         {
+            // Try with "image0.geometry." prefix.
+            prefix += std::string( "geometry." );
+            value = geomKwl.findKey(prefix, key);
+            
+            if ( value.empty() || (value != "ossimImageGeometry") )
+            {
+               // Try with "geometry." prefix.
+               prefix = std::string( "geometry." );
+               value = geomKwl.findKey(prefix, key);
+            }
+         }
+      }
+      
+      if ( value == "ossimImageGeometry" )
+      {
+         geom = new ossimImageGeometry;
+         if( !geom->loadState(geomKwl, prefix.c_str()) )
+         {
+            geom = 0;
+         }
+      }
+   }
+   
+   return geom;
+}
+
+ossimRefPtr<ossimImageGeometry> ossimImageHandler::getInternalImageGeometry() const
+{
+   // Default, derived classes should override.
+   ossimRefPtr<ossimImageGeometry> geom = new ossimImageGeometry();
+   return geom;
+}
+
+void ossimImageHandler::setImageGeometry( ossimImageGeometry* geom)
+{
+   theGeometry = geom;
+}
+
+void ossimImageHandler::saveImageGeometry() const
+{
+   ossimFilename geometryFile = getFilenameWithThisExtension(ossimString(".geom"));
+   saveImageGeometry(geometryFile);
+}
+
+void ossimImageHandler::saveImageGeometry(const ossimFilename& geometry_file) const
+{
+   if (theGeometry.valid())
+   {
+      ossimKeywordlist kwl;
+      theGeometry->saveState(kwl);
+      kwl.write(geometry_file.chars());
+   }
+}
+
+void ossimImageHandler::closeOverview()
+{
+   theOverview = 0;
+}
+
+const ossimImageHandler* ossimImageHandler::getOverview() const
+{
+   return theOverview.get();
+}
+
+bool ossimImageHandler::hasOverviews() const
+{
+   return (getNumberOfDecimationLevels() > 1);
+}
+
+bool ossimImageHandler::openOverview(const ossimFilename& overview_file)
+{
+   bool result = false;
+   
+   closeOverview();
+
+   if (overview_file != theImageFile) // Make sure we don't open ourselves.
+   {
+      //---
+      // Get the number of level before the call to opening the overview so
+      // the overview can be told what it's starting res level is.
+      //---
+      ossim_uint32 overviewStartingResLevel = getNumberOfDecimationLevels();
+
+
+      // Try to open:
+      theOverview = ossimImageHandlerRegistry::instance()->openOverview( overview_file );
+
+      if (theOverview.valid())
+      {
+         result = true;
+         
+         //---
+         // Set the owner in case the overview reader needs to get something
+         // from the it like min/max/null.
+         //---
+         theOverview->changeOwner(this);
+         
+         // Set the starting res level of the overview.
+         theOverview->setStartingResLevel(overviewStartingResLevel);
+         
+         // Capture the file name.
+         theOverviewFile = overview_file;
+
+         //---
+         // Some overview handlers cannot store what the null is.  Like dted
+         // null is -32767 not default -32768 so this allows passing this to the
+         // overview reader provided it overrides setMin/Max/NullPixel value
+         // methods. (drb)
+         //---
+         const ossim_uint32 BANDS = getNumberOfOutputBands();
+         for (ossim_uint32 band = 0; band < BANDS; ++band)
+         {
+            theOverview->setMinPixelValue(band, getMinPixelValue(band));
+            theOverview->setMaxPixelValue(band, getMaxPixelValue(band));
+            theOverview->setNullPixelValue(band, getNullPixelValue(band));
+         }
+
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "overview starting res level: " << overviewStartingResLevel
+               << "\noverview levels: "
+               << theOverview->getNumberOfDecimationLevels()
+               << "\nlevels: " << getNumberOfDecimationLevels()
+               << endl;
+         }
+         
+         //---
+         // This is not really a container event; however, using for now.
+         //---
+         ossimContainerEvent event(this,
+                                   OSSIM_EVENT_ADD_OBJECT_ID);
+         event.setObjectList(theOverview.get());
+         fireEvent(event);
+      }
+   }
+   
+   return result;
+}
+
+bool ossimImageHandler::openOverview()
+{
+   closeOverview();
+   
+   // 1) ESH 03/2009 -- Use the overview file set e.g. using a .spec file.
+   ossimFilename overviewFilename = getOverviewFile();
+   
+   if (overviewFilename.empty() || (overviewFilename.exists() == false) )
+   {
+      // 2) Generate the name from image name.
+      overviewFilename = createDefaultOverviewFilename();
+      
+      if (overviewFilename.empty() || (overviewFilename.exists() == false) )
+      {  
+         // 3) For backward compatibility check if single entry and _e0.ovr
+         overviewFilename = getFilenameWithThisExtension(ossimString(".ovr"), true);
+         if (overviewFilename.empty() || (overviewFilename.exists() == false) )
+         {
+            // 4) For overviews built with gdal look for foo.tif.ovr
+            overviewFilename = getFilename();
+            overviewFilename += ".ovr";
+         }
+      }
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "Looking for " << overviewFilename
+         << " overview file..." << std::endl;
+   }
+
+   bool status = false;
+   
+   if ( overviewFilename.exists() )
+   {
+      status = openOverview( overviewFilename );
+   }
+
+   if ( !status  && traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimImageHandler::openOverview NOTICE:"
+         << "\nCould not find an overview." << std::endl;
+   }
+
+   return status;
+}
+
+
+bool ossimImageHandler::writeValidImageVertices(const std::vector<ossimIpt>& vertices, const ossimFilename& file)
+{
+   ossimFilename tempFile = file;
+   if(tempFile == "")
+   {
+      tempFile = createDefaultValidVerticesFilename();
+   }
+   ossim_uint32 i = 0;
+   ossimKeywordlist tempKwl;
+   ossimPolygon poly(vertices);
+   
+   poly.checkOrdering();
+
+   // Capture the vertices.
+   theValidImageVertices = vertices;
+   
+   if(poly.getOrdering() == OSSIM_COUNTERCLOCKWISE_ORDER)
+   {
+      std::reverse(theValidImageVertices.begin(), theValidImageVertices.end());
+   }
+   
+   if(theValidImageVertices.size())
+   {
+      for(i = 0; i < theValidImageVertices.size(); ++i)
+      {
+         ossimString prefix = ossimString("point") + ossimString::toString(i) + ".";
+         tempKwl.add(prefix.c_str(),
+                     "x",
+                     theValidImageVertices[i].x,
+                     true);
+	 tempKwl.add(prefix.c_str(),
+                     "y",
+                     theValidImageVertices[i].y,
+                     true);
+      }
+      
+      tempKwl.write(tempFile.c_str());
+   }
+
+   if ( tempFile.exists() )
+   {
+      return true;
+   }
+
+   return false; // Write of file failed.
+}
+
+bool ossimImageHandler::openValidVertices(const ossimFilename& vertices_file)
+{
+   return initVertices(vertices_file);
+}
+
+bool ossimImageHandler::openValidVertices()
+{
+   ossimFilename vertices_file;
+   vertices_file = theImageFile.path();
+   vertices_file = vertices_file.dirCat(theImageFile.fileNoExtension());
+   if(getNumberOfEntries() > 1)
+   {
+      vertices_file += ossimString("_vertices") + "_e" + ossimString::toString(getCurrentEntry()) + ".kwl";
+   }
+   else
+   {
+      vertices_file += "_vertices.kwl";
+   }
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "Looking for " << vertices_file
+         << " vertices file..." << std::endl;
+   }
+
+   return openValidVertices(vertices_file);
+}
+
+bool ossimImageHandler::open(const ossimFilename& imageFile)
+{
+   if(isOpen())
+   {
+      close();
+   }
+
+   setFilename(imageFile);
+   
+   return open();
+}
+
+bool ossimImageHandler::open(const ossimFilename& imageFile,
+                             ossim_uint32 entryIndex)
+{
+   if(isOpen())
+   {
+      close();
+   }
+   setFilename(imageFile);
+   
+   bool result = open();
+
+   if(result)
+   {
+      return setCurrentEntry(entryIndex);
+   }
+
+   return result;
+}
+
+bool ossimImageHandler::isValidRLevel(ossim_uint32 resLevel) const
+{
+   bool result = false;
+   
+   const ossim_uint32 LEVELS = getNumberOfDecimationLevels();
+   
+   if ( !theStartingResLevel) // Not an overview.
+   {
+      result = (resLevel < LEVELS);
+   }
+   else  // Used as overview.
+   {
+      if (resLevel >= theStartingResLevel)
+      {
+         //---
+         // Adjust the res level to be zero based for this overview before
+         // checking.
+         //---
+         result = ( (resLevel - theStartingResLevel) < LEVELS);
+      }
+   }
+   
+   return result;
+}
+
+void ossimImageHandler::getValidImageVertices(vector<ossimIpt>& validVertices,
+                                              ossimVertexOrdering ordering,
+                                              ossim_uint32 resLevel) const
+{
+   ossimDpt decimation;
+   getDecimationFactor(resLevel, decimation);
+   if(decimation.hasNans())
+   {
+      return;
+   }
+   if (theValidImageVertices.size() != 0)
+   {
+      validVertices.clear();
+      for (ossim_uint32 i=0; i<theValidImageVertices.size(); ++i)
+      {
+         ossimIpt pt(ossim::round<int>(theValidImageVertices[i].x*decimation.x),
+                     ossim::round<int>(theValidImageVertices[i].y*decimation.y));
+         validVertices.push_back(pt);
+      }
+
+      if(ordering == OSSIM_COUNTERCLOCKWISE_ORDER)
+      {
+         std::reverse(validVertices.begin()+1, validVertices.end());
+      }
+   }
+   else
+   {
+      // Call the base class method which will set to bounding rectangle.
+      ossimImageSource::getValidImageVertices(validVertices, ordering, resLevel);
+   }
+}
+
+void ossimImageHandler::close()
+{
+   theOverview = 0;
+   theGeometry = 0;
+   theValidImageVertices.clear();
+   theDecimationFactors.clear();
+}
+
+bool ossimImageHandler::isBandSelector() const
+{
+   return false;
+}
+
+bool ossimImageHandler::setOutputBandList(const std::vector<ossim_uint32>& /* band_list */)
+{
+   return false;
+}
+
+bool ossimImageHandler::getRgbBandList(
+   std::vector<ossim_uint32>& /* bandList */) const
+{
+   return false;
+}
+
+bool ossimImageHandler::setOutputToInputBandList()
+{
+   bool result = false;
+   if ( isBandSelector() )
+   {
+      std::vector<ossim_uint32> bandList;
+      ossimImageSource::getOutputBandList( bandList );
+      result = setOutputBandList( bandList );
+   }
+   return result;
+}
+
+bool ossimImageHandler::isIdentityBandList( const std::vector<ossim_uint32>& bandList ) const
+{
+   bool result = false;
+   const ossim_uint32 BANDS = bandList.size();
+   if ( BANDS )
+   {
+      std::vector<ossim_uint32> inputList;
+      ossimImageSource::getOutputBandList( inputList ); // This populates an identity band list.
+
+      if ( inputList.size() == BANDS )
+      {
+         ossim_uint32 band = 0;
+         while ( band < BANDS )
+         {
+            if ( inputList[band] != bandList[band] )
+            {
+               break;
+            }
+            ++band;
+         }
+         if ( band == BANDS )
+         {
+            result = true;
+         }
+      }
+   }
+   return result;
+}
+
+// Protected convenience method:
+bool ossimImageHandler::setOutputBandList(const std::vector<ossim_uint32>& inBandList,
+                                          std::vector<ossim_uint32>& outBandList)
+{
+   bool result = false;
+
+   const ossim_uint32 INPUT_BANDS  = getNumberOfInputBands();
+   const ossim_uint32 OUTPUT_BANDS = inBandList.size();
+
+   if ( INPUT_BANDS && OUTPUT_BANDS )
+   {
+      result = true;
+      outBandList.resize( OUTPUT_BANDS );
+      for ( ossim_uint32 band = 0; band < OUTPUT_BANDS; ++band )
+      {
+         if ( inBandList[band] < INPUT_BANDS )
+         {
+            outBandList[band] = inBandList[band];
+         }
+         else // Out of range...
+         {
+            result = false;
+            break;
+         }
+      }
+      if ( result && theOverview.valid() )
+      {
+         result = theOverview->setOutputBandList( inBandList );
+      }
+   }
+
+   if ( result == false )
+   {
+      ossimImageSource::getOutputBandList( outBandList ); // Set to identity.
+   }
+
+   return result;
+}
+
+bool ossimImageHandler::isImageTiled() const
+{
+   return (getImageTileWidth() && getImageTileHeight());
+}
+
+void ossimImageHandler::loadMetaData()
+{
+  theMetaData.clear();
+
+  ossimFilename filename = getFilenameWithThisExtension(ossimString(".omd"), false);
+  if ( filename.exists() == false )
+  {
+     filename = getFilenameWithThisExtension(ossimString(".omd"), true);
+  }
+  if(filename.exists())
+  {
+     ossimKeywordlist kwl;
+     
+     kwl.addFile(filename.c_str());
+     
+     theMetaData.loadState(kwl);
+  }
+  else
+  {
+     theMetaData.setScalarType(getOutputScalarType());
+  }
+}
+
+double ossimImageHandler::getMinPixelValue(ossim_uint32 band)const
+{
+   if(theMetaData.getNumberOfBands())
+   {
+      return theMetaData.getMinPix(band);
+   }
+   return ossim::defaultMin(getOutputScalarType());
+}
+
+double ossimImageHandler::getMaxPixelValue(ossim_uint32 band)const
+{
+   if(theMetaData.getNumberOfBands())
+   {
+      return theMetaData.getMaxPix(band);
+   }
+   return ossim::defaultMax(getOutputScalarType());
+}
+
+double ossimImageHandler::getNullPixelValue(ossim_uint32 band)const
+{
+   if(theMetaData.getNumberOfBands())
+   {
+      return theMetaData.getNullPix(band);
+   }
+   
+   return ossim::defaultNull(getOutputScalarType());
+}
+
+void ossimImageHandler::setMinPixelValue(ossim_uint32 band,
+                                         const ossim_float64& pix)
+{
+   theMetaData.setMinPix(band, pix);
+}
+
+void ossimImageHandler::setMaxPixelValue(ossim_uint32 band,
+                                         const ossim_float64& pix)
+{
+   theMetaData.setMaxPix(band, pix); 
+}
+
+void ossimImageHandler::setNullPixelValue(ossim_uint32 band,
+                                          const ossim_float64& pix)
+{
+   theMetaData.setNullPix(band, pix);  
+}
+
+ossim_uint32 ossimImageHandler::getCurrentEntry()const
+{
+   return 0;
+}
+
+bool ossimImageHandler::setCurrentEntry(ossim_uint32 /* entryIdx */)
+{
+   return true;
+}
+
+ossimFilename ossimImageHandler::getOverviewFile()const
+{
+   return theOverviewFile;
+}
+
+void ossimImageHandler::getEntryList(std::vector<ossim_uint32>& entryList)const
+{
+   entryList.push_back(0);
+}
+
+bool ossimImageHandler::useEntryIndex() const
+{
+   bool result = false;
+   if ( isOpen() )
+   {
+      std::vector<ossim_uint32> entryList;
+      getEntryList(entryList);
+
+      if ( entryList.size() )
+      {
+         if ( (entryList.size() > 1) || (entryList[0] != 0) ) result = true;
+      }
+   }
+   return result;
+}
+
+ossim_uint32 ossimImageHandler::getNumberOfEntries()const
+{
+   std::vector<ossim_uint32> tempList;
+   getEntryList(tempList);
+   
+   return (ossim_uint32)tempList.size();
+}
+
+void ossimImageHandler::getEntryNames(std::vector<ossimString>& entryStringList) const
+{
+   entryStringList.clear();
+}
+
+void ossimImageHandler::getEntryName( ossim_uint32 entryIdx, std::string& name ) const
+{
+   name = "";
+   std::vector<ossimString> entryNames;
+   getEntryNames(entryNames);
+   if (entryIdx < entryNames.size())
+      name = entryNames[entryIdx].string();
+}
+
+void ossimImageHandler::completeOpen()
+{
+   loadMetaData();
+   if ( theOpenOverviewFlag )
+   {
+      openOverview();
+   }
+   establishDecimationFactors();
+   openValidVertices();
+}
+
+bool ossimImageHandler::canConnectMyInputTo(ossim_int32 /* inputIndex */,
+                                            const ossimConnectableObject* /* object */)const
+{      
+   return false;
+}
+
+bool ossimImageHandler::hasMetaData()const
+{
+   return theMetaData.isValid();
+}
+
+void ossimImageHandler::setFilename(const ossimFilename& filename)
+{
+   theImageFile = filename;
+}
+
+const ossimFilename& ossimImageHandler::getFilename()const
+{
+   return theImageFile;
+}
+
+void ossimImageHandler::setSupplementaryDirectory(const ossimFilename& dir)
+{
+   if (dir.isDir())
+      theSupplementaryDirectory = dir;
+   else
+      theSupplementaryDirectory = dir.path();
+
+   // A change in supplementary directory presents an opportunity to find the OVR that could not be
+   // opened previously, as well as other support data items:
+   if (!theOverview.valid())
+   {
+      if (theDecimationFactors.size() > 0)
+      {
+        theDecimationFactors.clear();
+      }
+      completeOpen();
+   }
+}
+
+const ossimFilename& ossimImageHandler::getSupplementaryDirectory()const
+{
+   return theSupplementaryDirectory;
+}
+
+void ossimImageHandler::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if ( property.valid() )
+   {
+      if(property->getName() == ossimKeywordNames::ENTRY_KW)
+      {
+         setCurrentEntry(property->valueToString().toUInt32());
+      }
+      else if ( property->getName() == OPEN_OVERVIEW_FLAG_KW )
+      {
+         setOpenOverviewFlag( property->valueToString().toBool() );
+      }
+      else
+      {
+         ossimImageSource::setProperty(property);
+      }
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimImageHandler::getProperty(const ossimString& name)const
+{
+
+   if(name == ossimKeywordNames::ENTRY_KW)
+   {
+      std::vector<ossim_uint32> entryList;
+      getEntryList(entryList);
+      
+      ossimStringProperty* stringProperty = new ossimStringProperty(name,
+                                                                    ossimString::toString(getCurrentEntry()));
+      ossim_uint32 idx = 0;
+      for(idx = 0; idx < entryList.size(); ++idx)
+      {
+         stringProperty->addConstraint(ossimString::toString(entryList[idx]));
+      }
+      stringProperty->setFullRefreshBit();
+      stringProperty->setEditableFlag(false);
+
+      return stringProperty;
+   }
+   else if(name == ossimKeywordNames::NUMBER_SAMPLES_KW)
+   {
+      ossimNumericProperty* prop = new ossimNumericProperty(name, ossimString::toString(getNumberOfSamples()));
+      prop->setReadOnlyFlag(true);
+      
+      return prop;
+   }
+   else if(name == ossimKeywordNames::NUMBER_LINES_KW)
+   {
+      ossimNumericProperty* prop = new ossimNumericProperty(name, ossimString::toString(getNumberOfLines()));
+      prop->setReadOnlyFlag(true);
+      
+      return prop;
+   }
+   else if(name == ossimKeywordNames::NUMBER_BANDS_KW)
+   {
+      ossimNumericProperty* prop = new ossimNumericProperty(name, ossimString::toString(getNumberOfInputBands()));
+      prop->setReadOnlyFlag(true);
+      
+      return prop;
+   }
+   else if(name == ossimKeywordNames::NUMBER_REDUCED_RES_SETS_KW)
+   {
+      ossimNumericProperty* prop = new ossimNumericProperty(name, ossimString::toString(getNumberOfDecimationLevels()));
+      prop->setReadOnlyFlag(true);
+      
+      return prop;
+   }
+   else if(name == ossimKeywordNames::SCALAR_TYPE_KW)
+   {
+      ossimStringProperty* prop = new ossimStringProperty(name, ossimScalarTypeLut::instance()->getEntryString(getOutputScalarType()));
+      prop->setReadOnlyFlag(true);
+      
+      return prop;
+   }
+   else if(name == "histogram_filename")
+   {
+      ossimFilenameProperty* filenameProp =
+         new ossimFilenameProperty(name, createDefaultHistogramFilename());
+      
+      filenameProp->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_INPUT);
+      filenameProp->setCacheRefreshBit();
+      
+      return filenameProp;
+      
+   }
+   else if(name == "geometry_filename")
+   {
+      ossimFilenameProperty* filenameProp =
+         new ossimFilenameProperty(name, createDefaultGeometryFilename());
+      
+      filenameProp->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_INPUT);
+      filenameProp->setCacheRefreshBit();
+      
+      return filenameProp;
+      
+   }
+   else if(name == "valid_vertices_filename")
+   {
+      ossimFilenameProperty* filenameProp =
+         new ossimFilenameProperty(name, createDefaultValidVerticesFilename());
+      
+      filenameProp->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_INPUT);
+      filenameProp->setCacheRefreshBit();
+      
+      return filenameProp;
+   }
+   else if(name == "metadata_filename")
+   {
+      ossimFilenameProperty* filenameProp =
+         new ossimFilenameProperty(name, createDefaultMetadataFilename());
+      
+      filenameProp->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_INPUT);
+      filenameProp->setCacheRefreshBit();
+      
+      return filenameProp;
+   }
+   else if(name == "overview_filename")
+   {
+      ossimFilenameProperty* filenameProp =
+         new ossimFilenameProperty(name, createDefaultOverviewFilename());
+      
+      filenameProp->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_INPUT);
+      filenameProp->setCacheRefreshBit();
+      
+      return filenameProp;
+   }
+   else if(name == "filename")
+   {
+      ossimFilenameProperty* filenameProp =
+         new ossimFilenameProperty(name, getFilename());
+      
+      filenameProp->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_INPUT);
+      filenameProp->setFullRefreshBit();
+      
+      return filenameProp;
+   }
+   else if ( name == OPEN_OVERVIEW_FLAG_KW)
+   {
+      ossimRefPtr<ossimProperty> result =
+         new ossimBooleanProperty(ossimString(OPEN_OVERVIEW_FLAG_KW), theOpenOverviewFlag); 
+      return result;
+   }
+   
+   return ossimImageSource::getProperty(name);
+}
+
+void ossimImageHandler::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageSource::getPropertyNames(propertyNames);
+   propertyNames.push_back(ossimKeywordNames::ENTRY_KW);
+   propertyNames.push_back(ossimKeywordNames::NUMBER_SAMPLES_KW);
+   propertyNames.push_back(ossimKeywordNames::NUMBER_LINES_KW);
+   propertyNames.push_back(ossimKeywordNames::NUMBER_BANDS_KW);
+   propertyNames.push_back(ossimKeywordNames::NUMBER_REDUCED_RES_SETS_KW);
+   propertyNames.push_back(ossimKeywordNames::SCALAR_TYPE_KW);
+   propertyNames.push_back(OPEN_OVERVIEW_FLAG_KW);
+}
+
+ossimFilename ossimImageHandler::getFilenameWithThisExtension(
+   const ossimString& ext,
+   bool set_e0_prefix) const
+{
+   // Get the image file.
+   ossimFilename f = getFilename();
+
+   // If the supplementary directory is set, find the extension
+   // at that location instead of at the default.
+   if ( theSupplementaryDirectory.size() )
+   {
+      
+      ossimString drivePart;
+      ossimString pathPart;
+      ossimString filePart;
+      ossimString extPart;
+
+      f.split(drivePart,
+              pathPart,
+              filePart,
+              extPart);
+
+      ossimFilename newDrivePart = theSupplementaryDirectory.drive();
+      ossimFilename newPathPart  = theSupplementaryDirectory.after(newDrivePart);
+
+      f.merge( newDrivePart, newPathPart, filePart, extPart );
+   }
+
+   // Wipe out the extension.
+   f.setExtension("");
+
+   if (set_e0_prefix || (getNumberOfEntries() > 1))
+   {
+      f += "_e";
+      f += ossimString::toString(getCurrentEntry());
+   }
+   if (ext.size())
+   {
+      if (ext[static_cast<std::string::size_type>(0)] != '.')
+      {
+         f += ".";
+      }
+      f += ext;
+   }
+   return f;
+}
+
+bool ossimImageHandler::getOverviewTile(ossim_uint32 resLevel,
+                                        ossimImageData* result)
+{
+   bool status = false;
+   
+   if (theOverview.valid())
+   {
+      if (theOverview->isValidRLevel(resLevel) && result &&
+          (result->getNumberOfBands() == getNumberOfOutputBands()) )
+      {
+         status = theOverview->getTile(result, resLevel);
+      }
+   }
+   
+   return status;
+}
+
+ossimRefPtr<ossimNBandLutDataObject> ossimImageHandler::getLut()const
+{
+   return theLut;
+}
+
+bool ossimImageHandler::hasLut() const
+{
+   return theLut.valid();
+}
+
+ossimFilename ossimImageHandler::createDefaultOverviewFilename() const
+{
+   return getFilenameWithThisExtension("ovr");
+}
+   
+ossimFilename ossimImageHandler::createDefaultGeometryFilename() const
+{
+   return getFilenameWithThisExtension("geom");
+}
+
+ossimFilename ossimImageHandler::createDefaultMetadataFilename() const
+{
+   return getFilenameWithThisExtension("omd");
+}
+
+ossimFilename ossimImageHandler::createDefaultHistogramFilename() const
+{
+   return getFilenameWithThisExtension("his");
+}
+
+ossimFilename ossimImageHandler::createDefaultValidVerticesFilename() const
+{
+   ossimFilename result;
+   
+   result = theImageFile.path();
+   result = result.dirCat(theImageFile.fileNoExtension());
+   result += "_vertices";
+   if(getNumberOfEntries() > 1)
+   {
+      result += "_e";
+      result += ossimString::toString(getCurrentEntry());
+   }
+   result += ".kwl";
+   
+   return result;
+}
+
+ossim_uint32 ossimImageHandler::getStartingResLevel() const
+{
+   return theStartingResLevel;
+}
+
+void ossimImageHandler::setStartingResLevel(ossim_uint32 level)
+{
+   theStartingResLevel = level;
+}
+
+bool ossimImageHandler::getOpenOverviewFlag() const
+{
+   return theOpenOverviewFlag;
+}
+   
+void ossimImageHandler::setOpenOverviewFlag(bool flag)
+{
+   theOpenOverviewFlag = flag;
+
+   // If false close overview if open??? (drb)
+}
+
+void ossimImageHandler::initImageParameters(ossimImageGeometry* geom) const
+{
+   if ( geom )
+   {
+      // Set decimation levels
+      ossim_uint32 num_levels = getNumberOfDecimationLevels();
+      if ((num_levels > 0) && (num_levels != geom->getNumberOfDecimations()))
+      {
+         geom->setDiscreteDecimation(theDecimationFactors);
+      }
+
+      // Set image size.
+      if(geom->getImageSize().hasNans())
+      {
+         ossimIrect rect = getBoundingRect();
+         geom->setImageSize(ossimIpt(rect.width(), rect.height()));
+      } 
+   }
+}
+
diff --git a/ossim/src/ossim/imaging/ossimImageHandlerFactory.cpp b/ossim/src/ossim/imaging/ossimImageHandlerFactory.cpp
new file mode 100644
index 0000000..3ef7d5e
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageHandlerFactory.cpp
@@ -0,0 +1,905 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimImageHandlerFactory.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimImageHandlerFactory.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimRegExp.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimAdrgTileSource.h>
+#include <ossim/imaging/ossimCcfTileSource.h>
+#include <ossim/imaging/ossimCibCadrgTileSource.h>
+#include <ossim/imaging/ossimDoqqTileSource.h>
+#include <ossim/imaging/ossimDtedTileSource.h>
+#include <ossim/imaging/ossimEnviTileSource.h>
+#include <ossim/imaging/ossimNitfTileSource.h>
+// #include <ossim/imaging/ossimPdfReader.h>
+#include <ossim/imaging/ossimQuickbirdNitfTileSource.h>
+#include <ossim/imaging/ossimSrtmTileSource.h>
+#include <ossim/imaging/ossimQuickbirdTiffTileSource.h>
+#include <ossim/imaging/ossimTiffTileSource.h>
+#include <ossim/imaging/ossimUsgsDemTileSource.h>
+#include <ossim/imaging/ossimLandsatTileSource.h>
+#include <ossim/imaging/ossimGeneralRasterTileSource.h>
+#include <ossim/imaging/ossimERSTileSource.h>
+#include <ossim/imaging/ossimVpfTileSource.h>
+#include <ossim/imaging/ossimJpegTileSource.h>
+#include <ossim/imaging/ossimRpfCacheTileSource.h>
+#include <ossim/imaging/ossimImageCacheTileSource.h>
+#include <ossim/imaging/ossimQbTileFilesHandler.h>
+#include <ossim/imaging/ossimBitMaskTileSource.h>
+#include <ossim/imaging/ossimBandSeparateHandler.h>
+#include <ossim/imaging/ossimRangeDomeTileSource.h>
+#include <ossim/parallel/ossimImageHandlerMtAdaptor.h>
+
+#define ENABLE_POINT_CLOUD_HANDLER
+#ifdef ENABLE_POINT_CLOUD_HANDLER
+#include <ossim/point_cloud/ossimPointCloudImageHandler.h>
+#endif
+
+static const ossimTrace traceDebug("ossimImageHandlerFactory:debug");
+
+RTTI_DEF1(ossimImageHandlerFactory, "ossimImageHandlerFactory", ossimImageHandlerFactoryBase);
+
+ossimImageHandlerFactory* ossimImageHandlerFactory::theInstance = 0;
+ossimImageHandlerFactory::~ossimImageHandlerFactory()
+{
+   theInstance = (ossimImageHandlerFactory*)0;
+}
+
+ossimImageHandlerFactory* ossimImageHandlerFactory::instance()
+{
+   if(!theInstance)
+   {
+      theInstance = new ossimImageHandlerFactory;
+
+      // let's turn off tiff error reporting
+      TIFFSetErrorHandler(0);
+      TIFFSetWarningHandler(0);
+   }
+
+   return theInstance;
+}
+
+ossimImageHandler* ossimImageHandlerFactory::open(const ossimFilename& fileName,
+                                                  bool openOverview) const
+{
+   static const char* M = "ossimImageHandlerFactory::open(filename) -- ";
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG) << M <<" Entering..." << std::endl;
+
+   ossimFilename copyFilename = fileName;
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "Attempting to open file: " << fileName.c_str()
+         << "\nopen overview flag: " << (openOverview?"true":"false") << "\n";
+   }
+
+   ossimRefPtr<ossimImageHandler> result = 0;
+   while (true)
+   {
+      // Check for empty file.
+      copyFilename.trim();
+      if (copyFilename.empty()) break;
+
+      // for all of our imagehandlers the filename must exist.
+      // if we have any imagehandlers that require an encoded string and is contrlled in this factory then
+      // we need to move this.
+      if (!copyFilename.exists())  break;
+
+      ossimString ext = copyFilename.ext().downcase();
+      if(ext == "gz")
+         copyFilename = copyFilename.setExtension("");
+
+      // Try opening from extension logic first (this is faster than instantiating each type).
+//      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying via extension...";
+//      result = openFromExtension(copyFilename);
+//      if (result.valid())  break;
+
+      //---
+      // If here do it the brute force way by going down the list of available
+      // readers...
+      //---
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying RPF Cache Image...\n";
+      result = new ossimRpfCacheTileSource;
+      result->setOpenOverviewFlag(openOverview);
+      if (result->open(copyFilename)) break;
+
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying RPF Image Cache Image...\n";
+      result = new ossimImageCacheTileSource;
+      result->setOpenOverviewFlag(openOverview);
+      if (result->open(copyFilename)) break;
+
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying JPEG...\n";
+      result = new ossimJpegTileSource;
+      result->setOpenOverviewFlag(openOverview);      
+      if (result->open(copyFilename)) break;
+
+      // this must be checked first before the TIFF handler
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying Quickbird TIFF...\n";
+      result = new ossimQuickbirdTiffTileSource;
+      result->setOpenOverviewFlag(openOverview);      
+      if (result->open(copyFilename)) break;
+
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying TIFF...\n";
+      result = new ossimTiffTileSource;
+      result->setOpenOverviewFlag(openOverview);      
+      if (result->open(copyFilename))  break;
+
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying CIB/CADRG...\n";
+      result = new ossimCibCadrgTileSource;
+      result->setOpenOverviewFlag(openOverview);      
+      if (result->open(copyFilename))  break;
+
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying DOQQ...\n";
+      result = new ossimDoqqTileSource;
+      result->setOpenOverviewFlag(openOverview);      
+      if (result->open(copyFilename))  break;
+
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying DTED...\n";
+      result = new ossimDtedTileSource;
+      result->setOpenOverviewFlag(openOverview);      
+      if (result->open(copyFilename))  break;
+
+      // this must be checked first before the NITF raw handler
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying Quickbird Nitf...\n";
+      result = new ossimQuickbirdNitfTileSource;
+      result->setOpenOverviewFlag(openOverview);      
+      if (result->open(copyFilename))  break;
+
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying NITF...\n";
+      result = new ossimNitfTileSource;
+      result->setOpenOverviewFlag(openOverview);      
+      if (result->open(copyFilename))  break;
+
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying USGS Dem...\n";
+      result = new ossimUsgsDemTileSource;
+      result->setOpenOverviewFlag(openOverview);      
+      if (result->open(copyFilename))  break;
+
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying Landsat...\n";
+      result = new ossimLandsatTileSource;
+      result->setOpenOverviewFlag(openOverview);      
+      if (result->open(copyFilename))  break;
+
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying VPF...\n";
+      result = new ossimVpfTileSource;
+      result->setOpenOverviewFlag(openOverview);      
+      if (result->open(copyFilename))  break;
+
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying ERS...\n";
+      result = new ossimERSTileSource;
+      result->setOpenOverviewFlag(openOverview);      
+      if (result->open(copyFilename))  break;
+
+      //---
+      // The srtm and general raser readers were picking up j2k overviews because the
+      // matching base file has an "omd" file that the raster reader can load
+      // so added extension check.  (drb - 20100709)
+      //---
+      if (copyFilename.ext() != "ovr")
+      {
+         // Note:  ENVI should be in front of general raster..
+         if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying ENVI...\n";
+         result = new ossimEnviTileSource;
+         result->setOpenOverviewFlag(openOverview);         
+         if (result->open(copyFilename))  break;
+
+         // Note:  SRTM should be in front of general raster..
+         if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying SRTM...\n";
+         result = new ossimSrtmTileSource;
+         result->setOpenOverviewFlag(openOverview);         
+         if (result->open(copyFilename))  break;
+
+         if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying General Raster...\n";
+         result = new ossimGeneralRasterTileSource; 
+         result->setOpenOverviewFlag(openOverview);        
+         if (result->open(copyFilename))  break;
+      }
+
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying ADRG...\n";
+      result = new ossimAdrgTileSource();
+      result->setOpenOverviewFlag(openOverview);      
+      if (result->open(copyFilename))  break;
+
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying ossimQbTileFilesHandler...\n";
+      result = new ossimQbTileFilesHandler();
+      result->setOpenOverviewFlag(openOverview);
+      if (result->open(copyFilename))  break;
+
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying Bit Mask...\n";
+      result = new ossimBitMaskTileSource();
+      result->setOpenOverviewFlag(openOverview);
+      if (result->open(copyFilename))  break;
+
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying band-separated files...\n";
+      result = new ossimBandSeparateHandler();
+      result->setOpenOverviewFlag(openOverview);      
+      if (result->open(copyFilename))  break;
+
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying CCF...\n";
+      result->setOpenOverviewFlag(openOverview);      
+      result = new ossimCcfTileSource();
+      if (result->open(copyFilename))  break;
+
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying OSSIM Range Domes...\n";
+      result->setOpenOverviewFlag(openOverview);
+      result = new ossimRangeDomeTileSource();
+      if (result->open(copyFilename))  break;
+
+#ifdef ENABLE_POINT_CLOUD_HANDLER
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying Point Cloud...\n";
+      result->setOpenOverviewFlag(openOverview);
+      result = new ossimPointCloudImageHandler();
+      if (result->open(copyFilename))  break;
+#endif
+      result = 0;
+      break;
+   }
+
+   if (traceDebug())
+   {
+      if (result.valid())
+         ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "   SUCCESS" << std::endl;
+      else
+         ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "   Open FAILED" << std::endl;
+   }
+
+   return result.release();
+}
+
+ossimImageHandler* ossimImageHandlerFactory::open(const ossimKeywordlist& kwl,
+                                                  const char* prefix)const
+{
+   static const char* M = "ossimImageHandlerFactory::open(kwl,prefix) -- ";
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG) << M <<" entered..." << std::endl;
+
+   ossimRefPtr<ossimImageHandler> result = 0;
+   while (true)
+   {
+      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying adrg...\n";
+      result = new ossimAdrgTileSource();
+      if (result->loadState(kwl, prefix))  break;
+
+      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying ccf...\n";
+      result  = new ossimCcfTileSource();
+      if (result->loadState(kwl, prefix))  break;
+
+      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M << "trying CIB/CADRG...\n";
+      result  = new ossimCibCadrgTileSource();
+      if (result->loadState(kwl, prefix))  break;
+
+      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "trying RpfCache...\n";
+      result  = new ossimRpfCacheTileSource();
+      if (result->loadState(kwl, prefix))  break;
+
+      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "trying Rpf ImageCache...\n";
+      result  = new ossimImageCacheTileSource();
+      if (result->loadState(kwl, prefix))  break;
+
+      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M << "trying DOQQ...\n";
+      result  = new ossimDoqqTileSource();
+      if (result->loadState(kwl, prefix))  break;
+
+      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying DTED...\n";
+      result  = new ossimDtedTileSource();
+      if (result->loadState(kwl, prefix))  break;
+
+      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying jpeg...\n";
+      result  = new ossimJpegTileSource();
+      if (result->loadState(kwl, prefix))  break;
+
+      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying Quickbird NITF...\n";
+      result = new ossimQuickbirdNitfTileSource;
+      if (result->loadState(kwl, prefix))  break;
+
+      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M << "trying Nitf...\n";
+      result  = new ossimNitfTileSource();
+      if (result->loadState(kwl, prefix))  break;
+
+      // Must be before tiff...
+      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying Quickbird TIFF...\n";
+      result = new ossimQuickbirdTiffTileSource;
+      if (result->loadState(kwl, prefix))  break;
+
+      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying tiff...\n";
+      result  = new ossimTiffTileSource();
+      if (result->loadState(kwl, prefix))  break;
+
+      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying USGS Dem...\n";
+      result  = new ossimUsgsDemTileSource();
+      if (result->loadState(kwl, prefix))  break;
+
+      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying Landsat...\n";
+      result  = new ossimLandsatTileSource();
+      if (result->loadState(kwl, prefix))  break;
+
+      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying VPF...\n";
+      result = new ossimVpfTileSource;
+      if (result->loadState(kwl, prefix))  break;
+
+      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying ERS...\n";
+      result = new ossimERSTileSource;
+      if (result->loadState(kwl, prefix))  break;
+
+      // Note:  ENVI should be in front of general raster...
+      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying ENVI...\n"<< std::endl;
+      result  = new ossimEnviTileSource();
+      if (result->loadState(kwl, prefix))  break;
+
+      // Note:  SRTM should be in front of general raster...
+      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying SRTM...\n"<< std::endl;
+      result  = new ossimSrtmTileSource();
+      if (result->loadState(kwl, prefix))  break;
+
+      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG) << M << "trying General Raster...\n"<< std::endl;
+      result  = new ossimGeneralRasterTileSource();
+      if (result->loadState(kwl, prefix))  break;
+
+      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"trying ossimQbTileFilesHandler...\n"<<std::endl;
+      result = new ossimQbTileFilesHandler;
+      if (result->loadState(kwl, prefix))  break;
+
+      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"trying ossimQbTileFilesHandler...\n"<<std::endl;
+      result = new ossimQbTileFilesHandler;
+      if (result->loadState(kwl, prefix))  break;
+
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying band-separated files...\n";
+      result = new ossimBandSeparateHandler();
+      if (result->loadState(kwl, prefix))  break;
+
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying Range Domes CSV...\n";
+      result = new ossimRangeDomeTileSource();
+      if (result->loadState(kwl, prefix))  break;
+
+#ifdef ENABLE_POINT_CLOUD_HANDLER
+      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying ossimPointCloudImageHandler...\n";
+      result = new ossimPointCloudImageHandler();
+      if (result->loadState(kwl, prefix))  break;
+#endif
+      result = 0;
+      break;
+   }
+
+   if (traceDebug())
+   {
+      if (result.valid())
+         ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "   SUCCESS" << std::endl;
+      else
+         ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "   Open FAILED" << std::endl;
+   }
+
+   return result.release();
+}
+
+ossimRefPtr<ossimImageHandler> ossimImageHandlerFactory::openOverview(
+   const ossimFilename& file ) const
+{
+   ossimRefPtr<ossimImageHandler> result = 0;
+   if ( file.size() )
+   {
+      result = new ossimTiffTileSource;
+      
+      result->setOpenOverviewFlag( false ); // Always false.
+
+      if ( result->open( file ) == false )
+      {
+         result = 0;
+      }
+   }
+   return result;
+}
+
+#if 0
+ossimImageHandler* ossimImageHandlerFactory::openFromExtension(const ossimFilename& fileName) const
+{
+   
+   static const char* M = "ossimImageHandlerFactory::openFromExtension() -- ";
+   if(traceDebug()) 
+      ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Attempting to open <"<<fileName<<">"<<std::endl;
+
+   ossimString ext = fileName.ext().downcase();
+   ossimRefPtr<ossimImageHandler> result = 0;
+   
+   
+   while (true)
+   {
+      // OVR can be combined with "tif" once we get rid of ossimQuickbirdTiffTileSource
+      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying OVR...\n";
+      if (ext == "ovr")
+      {
+         result = new ossimTiffTileSource;
+         if(result->open(fileName)) break;
+      }
+
+      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying TIF or TIFF...\n";
+      if ( (ext == "tif") || (ext == "tiff") )
+      {
+         // this must be checked first before the TIFF handler
+         result = new ossimQuickbirdTiffTileSource;
+         if(result->open(fileName)) break;
+         result = new ossimTiffTileSource;
+         if(result->open(fileName)) break;
+      }
+
+      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying NTF or NITF...\n";
+      if ( (ext == "ntf") || (ext == "nitf") )
+      {
+         // this must be checked first before the NITF raw handler
+         result = new ossimQuickbirdNitfTileSource;
+         if(result->open(fileName)) break;
+         result = new ossimNitfTileSource;
+         if(result->open(fileName)) break;
+      }
+
+      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying RPF...\n";
+      if ( (fileName == "rpf"))
+      {
+         result = new ossimRpfCacheTileSource;
+         if(result->open(fileName)) break;
+
+         result = new ossimImagefCacheTileSource;
+         if(result->open(fileName)) break;
+      }
+
+      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying TOC...\n";
+      if ( (fileName == "a.toc") || (ext == "toc"))
+      {
+         result = new ossimCibCadrgTileSource;
+         if(result->open(fileName)) break;
+      }
+
+      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying JPG or JPEG...\n";
+      if ( (ext == "jpg") || (ext == "jpeg") )
+      {
+         result = new ossimJpegTileSource;
+         if(result->open(fileName)) break;
+      }
+
+      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying DOQ or DOQQ...\n";
+      if ( (ext == "doq") || (ext == "doqq") )
+      {
+         result = new ossimDoqqTileSource;
+         if(result->open(fileName)) break;
+      }
+
+      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying DTn...\n";
+      if ( (ext == "dt2") || (ext == "dt1") || (ext == "dt3") ||
+         (ext == "dt4") || (ext == "dt5") || (ext == "dt0") )
+      {
+         result = new ossimDtedTileSource;
+         if(result->open(fileName)) break;
+      }
+
+      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying HGT...\n";
+      if (ext == "hgt")
+      {
+         result = new ossimSrtmTileSource;
+         if(result->open(fileName)) break;
+      }  
+
+      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying HRI,HSI\n";
+      if ( (ext == "hri") || (ext == "hsi") )
+      {
+         result = new ossimEnviTileSource;
+         if(result->open(fileName)) break;
+      }  
+
+      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying DEM...\n";
+      if (ext == "dem")
+      {
+         result = new ossimUsgsDemTileSource;
+         if(result->open(fileName)) break;
+      }
+
+      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying FST...\n";
+      if (ext == "fst")
+      {
+         result = new ossimLandsatTileSource;
+         if(result->open(fileName)) break;
+      }
+
+      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying RAS or RAW...\n";
+      if ( (ext == "ras") || (ext == "raw") )
+      {
+         result = new ossimGeneralRasterTileSource;
+         if(result->open(fileName)) break;
+      }
+
+      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying IMG...\n";
+      if (ext == "img")
+      {
+         result  = new ossimAdrgTileSource;
+         if(result->open(fileName)) break;
+      }
+
+      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying CCF...\n";
+      if (ext == "ccf")
+      {
+         result = new ossimCcfTileSource;
+         if(result->open(fileName)) break;
+      }
+
+      result = 0;
+      break;
+   }
+   if (traceDebug())
+   {
+      if (result.valid())
+         ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "   SUCCESS" << std::endl;
+      else
+         ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "   Open FAILED" << std::endl;
+   }
+   return result.release();
+}
+#endif
+ossimObject* ossimImageHandlerFactory::createObject(const ossimString& typeName)const
+{
+   if(STATIC_TYPE_NAME(ossimAdrgTileSource) == typeName)
+   {
+      return new ossimAdrgTileSource();
+   }
+   if(STATIC_TYPE_NAME(ossimCcfTileSource) == typeName)
+   {
+      return new ossimCcfTileSource();
+   }
+   if(STATIC_TYPE_NAME(ossimCibCadrgTileSource) == typeName)
+   {
+      return new ossimCibCadrgTileSource();
+   }
+   if(STATIC_TYPE_NAME(ossimRpfCacheTileSource) == typeName)
+   {
+     return new ossimRpfCacheTileSource();
+   }
+   if(STATIC_TYPE_NAME(ossimImageCacheTileSource) == typeName)
+   {
+      return new ossimImageCacheTileSource();
+   }
+   if(STATIC_TYPE_NAME(ossimDoqqTileSource) == typeName)
+   {
+      return new ossimDoqqTileSource();
+   }
+   if(STATIC_TYPE_NAME(ossimDtedTileSource) == typeName)
+   {
+      return new ossimDtedTileSource();
+   }
+   if(STATIC_TYPE_NAME(ossimEnviTileSource) == typeName)
+   {
+      return new ossimEnviTileSource();
+   }
+   if(STATIC_TYPE_NAME(ossimJpegTileSource) == typeName)
+   {
+      return new ossimJpegTileSource();
+   }
+   if(STATIC_TYPE_NAME(ossimNitfTileSource) == typeName)
+   {
+      return new ossimNitfTileSource();
+   }
+   if(STATIC_TYPE_NAME(ossimTiffTileSource) == typeName)
+   {
+      return new ossimTiffTileSource();
+   }
+   if(STATIC_TYPE_NAME(ossimUsgsDemTileSource) == typeName)
+   {
+      return new ossimUsgsDemTileSource();
+   }
+   if(STATIC_TYPE_NAME(ossimLandsatTileSource) == typeName)
+   {
+      return new ossimLandsatTileSource();
+   }
+   if(STATIC_TYPE_NAME(ossimERSTileSource) == typeName)
+   {
+      return new ossimERSTileSource();
+   }
+   if(STATIC_TYPE_NAME(ossimSrtmTileSource) == typeName)
+   {
+      return new ossimSrtmTileSource();
+   }
+   if(STATIC_TYPE_NAME(ossimGeneralRasterTileSource) == typeName)
+   {
+      return new ossimGeneralRasterTileSource();
+   }
+   if(STATIC_TYPE_NAME(ossimQuickbirdNitfTileSource) == typeName)
+   {
+      return new ossimQuickbirdNitfTileSource();
+   }
+   if(STATIC_TYPE_NAME(ossimQbTileFilesHandler) == typeName)
+   {
+      return new ossimQbTileFilesHandler();
+   }
+   if(STATIC_TYPE_NAME(ossimBitMaskTileSource) == typeName)
+   {
+      return new ossimBitMaskTileSource();
+   }
+   if(STATIC_TYPE_NAME(ossimBandSeparateHandler) == typeName)
+   {
+      return new ossimBandSeparateHandler();
+   }
+   if(STATIC_TYPE_NAME(ossimRangeDomeTileSource) == typeName)
+   {
+      return new ossimRangeDomeTileSource();
+   }
+#ifdef ENABLE_POINT_CLOUD_HANDLER
+   if(STATIC_TYPE_NAME(ossimPointCloudImageHandler) == typeName)
+   {
+      return new ossimPointCloudImageHandler();
+   }
+#endif
+   if(STATIC_TYPE_NAME(ossimImageHandlerMtAdaptor) == typeName)
+   {
+      return new ossimImageHandlerMtAdaptor();
+   }
+   
+   return (ossimObject*)0;
+}
+
+void ossimImageHandlerFactory::getSupportedExtensions(ossimImageHandlerFactoryBase::UniqueStringList& extensionList)const
+{
+   extensionList.push_back("img");
+   extensionList.push_back("ccf"); 
+   extensionList.push_back("toc");
+   extensionList.push_back("tif");
+   extensionList.push_back("tiff");
+   extensionList.push_back("doq");
+   extensionList.push_back("doqq");
+   extensionList.push_back("dt0");
+   extensionList.push_back("dt1");
+   extensionList.push_back("dt2");
+   extensionList.push_back("dt3");
+   extensionList.push_back("jpg");
+   extensionList.push_back("jpeg");
+   extensionList.push_back("dem");
+   extensionList.push_back("fst");
+   extensionList.push_back("hdr");
+   extensionList.push_back("ras");
+   extensionList.push_back("hgt");
+   extensionList.push_back("nsf");
+   extensionList.push_back("nitf");
+   extensionList.push_back("ntf");
+   extensionList.push_back("til");
+   extensionList.push_back("mask");
+   extensionList.push_back("txt");
+   extensionList.push_back("csv");
+}
+
+void ossimImageHandlerFactory::getImageHandlersBySuffix(ossimImageHandlerFactoryBase::ImageHandlerList& result, const ossimString& ext)const
+{
+   static const char* M = "ossimImageHandlerFactory::getImageHandlersBySuffix() -- ";
+   // OVR can be combined with "tif" once we get rid of ossimQuickbirdTiffTileSource
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying OVR...\n";
+   ossimString testExt = ext.downcase();
+   if (testExt == "ovr")
+   {
+      result.push_back(new ossimTiffTileSource);
+      return;
+   }
+   
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing TIF or TIFF...\n";
+   if ( (testExt == "tif") || (testExt == "tiff") )
+   {
+      // this must be checked first before the TIFF handler
+      result.push_back(new ossimQuickbirdTiffTileSource);
+      result.push_back(new ossimTiffTileSource);
+      return;
+   }
+   
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing NTF or NITF...\n";
+   if ( (testExt == "ntf") || (testExt == "nitf") )
+   {
+      // this must be checked first before the NITF raw handler
+      result.push_back(new ossimQuickbirdNitfTileSource);
+      result.push_back(new ossimNitfTileSource);
+      return;
+   }
+   
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing RPF...\n";
+   if ( (testExt == "rpf"))
+   {
+      result.push_back(new ossimRpfCacheTileSource);
+      result.push_back(new ossimImageCacheTileSource);
+      return;
+   }
+   
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing TOC...\n";
+   if ( testExt == "toc")
+   {
+      result.push_back(new ossimCibCadrgTileSource);
+      return;
+   }
+   
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing JPG or JPEG...\n";
+   if ( (testExt == "jpg") || (testExt == "jpeg") )
+   {
+      result.push_back(new ossimJpegTileSource);
+      return;
+   }
+   
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing DOQ or DOQQ...\n";
+   if ( (testExt == "doq") || (testExt == "doqq") )
+   {
+      result.push_back(new ossimDoqqTileSource);
+      return;
+   }
+   
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing DTn...\n";
+   ossimString regExpStr = "dt[0-9]";
+   ossimRegExp regExp(regExpStr);
+   if(regExp.find(testExt))
+   {
+      result.push_back(new ossimDtedTileSource);
+      return;
+   }
+   
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing HGT...\n";
+   if (testExt == "hgt")
+   {
+      result.push_back(new ossimSrtmTileSource);
+      return;
+   }  
+   
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing HRI,HSI...\n";
+   if ( (testExt == "hri") || (testExt == "hsi") )
+   {
+      result.push_back(new ossimEnviTileSource);
+      return;
+   }  
+   
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing DEM...\n";
+   if (testExt == "dem")
+   {
+      result.push_back(new ossimUsgsDemTileSource);
+      return;
+   }
+   
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing FST...\n";
+   if (testExt == "fst")
+   {
+      result.push_back(new ossimLandsatTileSource);
+      return;
+   }
+   
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing RAS or RAW or General Raster...\n";
+   if ( (testExt == "ras") || (testExt == "raw") || (testExt == "bil"))
+   {
+      result.push_back(new ossimGeneralRasterTileSource);
+      return;
+   }
+   
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing IMG...\n";
+   if (testExt == "img")
+   {
+      result.push_back(new ossimAdrgTileSource);
+      return;
+   }
+   
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing CCF...\n";
+   if (testExt == "ccf")
+   {
+      result.push_back(new ossimCcfTileSource);
+      return;
+   }
+   
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing TIL...\n";
+   if (testExt == "til")
+   {
+      result.push_back(new ossimQbTileFilesHandler);
+      return;
+   }
+
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing MASK...\n";
+   if (testExt == "mask")
+   {
+      result.push_back(new ossimBitMaskTileSource);
+      return;
+   }
+   
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing TXT...\n";
+   if (testExt == "txt")
+   {
+      result.push_back(new ossimBandSeparateHandler);
+      return;
+   }
+
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing CSV...\n";
+   if (testExt == "csv")
+   {
+      result.push_back(new ossimRangeDomeTileSource);
+      return;
+   }
+}
+
+void ossimImageHandlerFactory::getImageHandlersByMimeType(ossimImageHandlerFactoryBase::ImageHandlerList& result, const ossimString& mimeType)const
+{
+   ossimString test(mimeType.begin(), mimeType.begin()+6);
+   if(test == "image/")
+   {
+      ossimString mimeTypeTest(mimeType.begin() + 6, mimeType.end());
+      getImageHandlersBySuffix(result, mimeTypeTest);
+      if(mimeTypeTest == "dted")
+      {
+         result.push_back(new ossimDtedTileSource);
+      }
+   }
+}
+
+ossimObject* ossimImageHandlerFactory::createObject(const ossimKeywordlist& kwl,
+                                                    const char* prefix)const
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimImageHandlerFactory::createObject(kwl, prefix) DEBUG:"
+         << " entering ..." << std::endl;
+   }
+   ossimObject* result = (ossimObject*)0;
+   const char* type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
+
+   if(type)
+   {
+      if (ossimString(type).trim() == STATIC_TYPE_NAME(ossimImageHandler))
+      {
+         const char* lookup = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
+
+         if (lookup)
+         {
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << "BEBUG: filename " << lookup << std::endl;
+            }
+            // Call the open that takes a filename...
+            result = this->open(kwl, prefix);//ossimFilename(lookup));
+         }
+      }
+      else
+      {
+         result = createObject(ossimString(type));
+         if(result)
+         {
+            result->loadState(kwl, prefix);
+         }
+      }
+   }
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimImageHandlerFactory::createObject(kwl, prefix) DEBUG: returning result ..." << std::endl;
+   }
+   return result;
+}
+
+void ossimImageHandlerFactory::getTypeNameList(std::vector<ossimString>& typeList)const
+{
+   typeList.push_back(STATIC_TYPE_NAME(ossimAdrgTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimCcfTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimCibCadrgTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimEnviTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimRpfCacheTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimImageCacheTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimDoqqTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimDtedTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimJpegTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimNitfTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimTiffTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimUsgsDemTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimLandsatTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimERSTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimSrtmTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimGeneralRasterTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimQuickbirdNitfTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimQuickbirdTiffTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimQbTileFilesHandler));
+   typeList.push_back(STATIC_TYPE_NAME(ossimBitMaskTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimRangeDomeTileSource));
+
+#ifdef ENABLE_POINT_CLOUD_HANDLER
+   typeList.push_back(STATIC_TYPE_NAME(ossimPointCloudImageHandler));
+#endif
+
+   typeList.push_back(STATIC_TYPE_NAME(ossimImageHandlerMtAdaptor));
+}
+
diff --git a/ossim/src/ossim/imaging/ossimImageHandlerFactoryBase.cpp b/ossim/src/ossim/imaging/ossimImageHandlerFactoryBase.cpp
new file mode 100644
index 0000000..fd56487
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageHandlerFactoryBase.cpp
@@ -0,0 +1,36 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author:  Garrett Potts (gpotts at imagelinks.com)
+//
+//*******************************************************************
+//  $Id: ossimImageHandlerFactoryBase.cpp 22632 2014-02-20 00:53:14Z dburken $
+#include <ossim/imaging/ossimImageHandlerFactoryBase.h>
+
+RTTI_DEF1(ossimImageHandlerFactoryBase, "ossimImageHandlerFactoryBase", ossimObjectFactory);
+
+void ossimImageHandlerFactoryBase::getImageHandlersBySuffix(ImageHandlerList& /*result*/,
+                                                            const ossimString& /*ext*/)const
+{
+}
+
+void ossimImageHandlerFactoryBase::getImageHandlersByMimeType(ImageHandlerList& /*result*/,
+                                                              const ossimString& /*mimeType*/)const
+{
+}
+
+ossimRefPtr<ossimImageHandler> ossimImageHandlerFactoryBase::openOverview(
+   const ossimFilename& /* file */ ) const
+{
+   return ossimRefPtr<ossimImageHandler>(0);
+}
+
+
+ossimRefPtr<ossimImageHandler> ossimImageHandlerFactoryBase::open(
+   std::istream* /* str */,
+   std::streamoff /* restartPosition */,
+   bool /* youOwnIt */ ) const
+{
+   return ossimRefPtr<ossimImageHandler>(0);
+}
diff --git a/ossim/src/ossim/imaging/ossimImageHandlerRegistry.cpp b/ossim/src/ossim/imaging/ossimImageHandlerRegistry.cpp
new file mode 100644
index 0000000..c47b5e0
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageHandlerRegistry.cpp
@@ -0,0 +1,283 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author:  Garrett Potts
+//
+// Description:
+//
+// Contains class definition for ImageHandlerRegistry.
+//
+//*******************************************************************
+//  $Id: ossimImageHandlerRegistry.cpp 22636 2014-02-23 17:55:50Z dburken $
+
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageHandlerFactory.h>
+#include <ossim/imaging/ossimImageHandlerFactoryBase.h>
+#include <algorithm>
+
+RTTI_DEF1(ossimImageHandlerRegistry, "ossimImageHandlerRegistry", ossimObjectFactory);
+
+//ossimImageHandlerRegistry* ossimImageHandlerRegistry::theInstance = 0;
+
+ossimImageHandlerRegistry::ossimImageHandlerRegistry()
+{
+   ossimObjectFactoryRegistry::instance()->registerFactory(this);
+   registerFactory(ossimImageHandlerFactory::instance());
+}
+
+ossimImageHandlerRegistry* ossimImageHandlerRegistry::instance()
+{
+   static ossimImageHandlerRegistry sharedInstance;
+   
+   return &sharedInstance;
+}
+
+ossimImageHandlerRegistry::~ossimImageHandlerRegistry()
+{
+   unregisterAllFactories();
+}
+
+
+ossimObject* ossimImageHandlerRegistry::createObject(const ossimKeywordlist& kwl,
+                                                     const char* prefix)const
+{
+   ossimObject* result = createObjectFromRegistry(kwl, prefix);
+   if(!result)
+   {
+      result = open(kwl, prefix);
+   }
+   return result;
+}
+
+ossimRefPtr<ossimImageHandler> ossimImageHandlerRegistry::openBySuffix(const ossimFilename& file,
+                                                                       bool openOverview)const
+{
+   std::vector<ossimRefPtr<ossimImageHandler> > handlers;
+   
+   getImageHandlersBySuffix(handlers, file.ext());
+   ossim_uint32 idx = 0;
+   ossim_uint32 size = (ossim_uint32) handlers.size();
+   
+   for(idx = 0; idx < size; ++idx)
+   {
+      handlers[idx]->setOpenOverviewFlag(openOverview);
+      if(handlers[idx]->open(file))
+      {
+         return handlers[idx];
+      }
+   }
+   
+   return ossimRefPtr<ossimImageHandler>(0);
+}
+
+void ossimImageHandlerRegistry::getImageHandlersBySuffix(ossimImageHandlerFactoryBase::ImageHandlerList& result,
+                                                         const ossimString& ext)const
+{
+   vector<ossimImageHandlerFactoryBase*>::const_iterator iter = m_factoryList.begin();
+   ossimImageHandlerFactoryBase::ImageHandlerList temp;
+   while(iter != m_factoryList.end())
+   {
+      temp.clear();
+      (*iter)->getImageHandlersBySuffix(temp, ext);
+      
+      if(!temp.empty())
+      {
+         
+         // now append to the end of the typeList.
+         result.insert(result.end(),
+                       temp.begin(),
+                       temp.end());
+      }
+      ++iter;
+   }
+}
+
+void ossimImageHandlerRegistry::getImageHandlersByMimeType(
+   ossimImageHandlerFactoryBase::ImageHandlerList& result, const ossimString& mimeType)const
+{
+   vector<ossimImageHandlerFactoryBase*>::const_iterator iter = m_factoryList.begin();
+   ossimImageHandlerFactoryBase::ImageHandlerList temp;
+   while(iter != m_factoryList.end())
+   {
+      temp.clear();
+      (*iter)->getImageHandlersByMimeType(temp, mimeType);
+      
+      if(!temp.empty())
+      {
+         
+         // now append to the end of the typeList.
+         result.insert(result.end(),
+                       temp.begin(),
+                       temp.end());
+      }
+      ++iter;
+   }
+}
+
+void ossimImageHandlerRegistry::getTypeNameList( std::vector<ossimString>& typeList ) const
+{
+   getAllTypeNamesFromRegistry(typeList);
+}
+
+void ossimImageHandlerRegistry::getSupportedExtensions(
+   ossimImageHandlerFactoryBase::UniqueStringList& extensionList)const
+{
+   vector<ossimString> result;
+   vector<ossimImageHandlerFactoryBase*>::const_iterator iter = m_factoryList.begin();
+
+   while(iter != m_factoryList.end())
+   {
+      (*iter)->getSupportedExtensions(extensionList);
+
+      ++iter;
+   }
+   
+}
+
+ossimImageHandler* ossimImageHandlerRegistry::open(const ossimFilename& fileName,
+                                                   bool trySuffixFirst,
+                                                   bool openOverview)const
+{
+   if(trySuffixFirst)
+   {
+      ossimRefPtr<ossimImageHandler> h = openBySuffix(fileName, openOverview);
+      if(h.valid())
+      {
+         return h.release();
+      }
+   }
+   
+   // now try magic number opens
+   //
+   ossimImageHandler*                   result = NULL;
+   vector<ossimImageHandlerFactoryBase*>::const_iterator factory;
+
+   factory = m_factoryList.begin();
+   while((factory != m_factoryList.end()) && !result)
+   {
+      result = (*factory)->open(fileName, openOverview);
+      ++factory;
+   }
+   
+   return result;
+}
+
+ossimImageHandler* ossimImageHandlerRegistry::open(const ossimKeywordlist& kwl,
+                                                   const char* prefix)const
+{
+   ossimImageHandler*                   result = NULL;
+   vector<ossimImageHandlerFactoryBase*>::const_iterator factory;
+   
+   factory = m_factoryList.begin();
+   while((factory != m_factoryList.end()) && !result)
+   {
+      result = (*factory)->open(kwl, prefix);
+      ++factory;
+   }
+   
+   return result;
+}
+
+ossimRefPtr<ossimImageHandler> ossimImageHandlerRegistry::open( std::istream* str,
+                                                                std::streamoff restartPosition,
+                                                                bool youOwnIt ) const
+{
+   ossimRefPtr<ossimImageHandler> result = 0;
+   vector<ossimImageHandlerFactoryBase*>::const_iterator factory = m_factoryList.begin();
+   while( factory != m_factoryList.end() )
+   {
+      result = (*factory)->open( str, restartPosition, youOwnIt );
+      if ( result.valid() )
+      {
+         break;
+      }
+      ++factory;
+   }  
+   return result; 
+}
+
+ossimRefPtr<ossimImageHandler> ossimImageHandlerRegistry::openOverview(
+   const ossimFilename& file ) const
+{
+   ossimRefPtr<ossimImageHandler> result = 0;
+   vector<ossimImageHandlerFactoryBase*>::const_iterator factory = m_factoryList.begin();
+   while( factory != m_factoryList.end() )
+   {
+      result = (*factory)->openOverview( file );
+      if ( result.valid() )
+      {
+         break;
+      }
+      ++factory;
+   }  
+   return result;
+}
+
+ossimObject* ossimImageHandlerRegistry::createObject(const ossimString& typeName) const
+{
+   return createObjectFromRegistry(typeName);
+}
+
+std::ostream& ossimImageHandlerRegistry::printReaderProps(std::ostream& out) const
+{
+   // Loop through factories:
+   vector<ossimImageHandlerFactoryBase*>::const_iterator factory = m_factoryList.begin();
+   while( factory != m_factoryList.end() )
+   {
+      out << "factory: " << (*factory)->getClassName() << "\n";
+      
+      // Loop through factory image handlers:
+      std::vector<ossimString> readerList;
+      (*factory)->getTypeNameList(readerList);
+
+      std::vector<ossimString>::const_iterator i = readerList.begin();
+      while ( i != readerList.end() )
+      {
+         ossimRefPtr<ossimImageHandler> ih =
+            dynamic_cast<ossimImageHandler*>( (*factory)->createObject( (*i) ) );
+         if ( ih.valid() )
+         {
+            std::vector<ossimString> propertyList;
+            ih->getPropertyNames(propertyList);
+            out << "reader: " << ih->getClassName() << "\n";
+            
+            if ( propertyList.size() )
+            {
+               // Loop through image handler properties:
+               out << "properties:\n";
+               std::vector<ossimString>::const_iterator p = propertyList.begin();
+               while ( p != propertyList.end() )
+               {
+                  out << (*p) << "\n";
+                  ++p;
+               }
+            }
+         }
+         ++i;
+      }
+      ++factory;
+   }
+   out << std::endl;
+   return out;
+}
+
+ossimImageHandlerRegistry::ossimImageHandlerRegistry(const ossimImageHandlerRegistry& /* rhs */)
+   :  ossimObjectFactory()
+{}
+
+const ossimImageHandlerRegistry&
+ossimImageHandlerRegistry::operator=(const ossimImageHandlerRegistry& rhs)
+{ return rhs; }
+
+extern "C"
+{
+  void* ossimImageHandlerRegistryGetInstance()
+  {
+    return ossimImageHandlerRegistry::instance();
+  }
+}
diff --git a/ossim/src/ossim/imaging/ossimImageHistogramSource.cpp b/ossim/src/ossim/imaging/ossimImageHistogramSource.cpp
new file mode 100644
index 0000000..bff2c33
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageHistogramSource.cpp
@@ -0,0 +1,524 @@
+//*******************************************************************
+//
+// License:  See LICENSE.txt file in the top level directory.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimImageHistogramSource.cpp 22737 2014-04-16 18:53:57Z gpotts $
+
+#include <ossim/imaging/ossimImageHistogramSource.h>
+#include <ossim/base/ossimMultiResLevelHistogram.h>
+#include <ossim/base/ossimMultiBandHistogram.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageSourceSequencer.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimTrace.h>
+
+static ossimTrace traceDebug("ossimImageHistogramSource:debug");
+
+  RTTI_DEF3(ossimImageHistogramSource, "ossimImageHistogramSource", ossimHistogramSource, ossimConnectableObjectListener, ossimProcessInterface);
+
+ossimImageHistogramSource::ossimImageHistogramSource(ossimObject* owner)
+   :ossimHistogramSource(owner,
+                         1,     // one input
+                         0,     // no outputs
+                         true,  // input list is fixed
+                         false),// output can still grow though
+    theHistogramRecomputeFlag(true),
+    theMaxNumberOfResLevels(1),
+    theComputationMode(OSSIM_HISTO_MODE_NORMAL),
+    theNumberOfTilesToUseInFastMode(100)
+{
+   theAreaOfInterest.makeNan();
+   addListener((ossimConnectableObjectListener*)this);
+	
+   theMinValueOverride     = ossim::nan();
+   theMaxValueOverride     = ossim::nan();
+   theNumberOfBinsOverride = -1;
+}
+
+ossimImageHistogramSource::~ossimImageHistogramSource()
+{
+   removeListener((ossimConnectableObjectListener*)this);
+}
+
+ossimObject* ossimImageHistogramSource::getObject()
+{
+   return this;
+}
+
+const ossimObject* ossimImageHistogramSource::getObject()const
+{
+   return this;
+}
+
+void ossimImageHistogramSource::setAreaOfInterest(const ossimIrect& rect)
+{
+   if(rect != theAreaOfInterest)
+   {
+      theHistogramRecomputeFlag = true;
+   }
+   theAreaOfInterest = rect;
+}
+
+ossimIrect ossimImageHistogramSource::getAreaOfInterest()const
+{
+   return theAreaOfInterest;
+}
+
+void ossimImageHistogramSource::getAreaOfInterest(ossimIrect& rect)const
+{
+   rect = theAreaOfInterest;
+}
+
+ossim_uint32 ossimImageHistogramSource::getMaxNumberOfRLevels()const
+{
+   return theMaxNumberOfResLevels;
+}
+
+void ossimImageHistogramSource::setMaxNumberOfRLevels(ossim_uint32 number)
+{
+   if(number != theMaxNumberOfResLevels)
+   {
+      theHistogramRecomputeFlag = true;
+   }
+   theMaxNumberOfResLevels = number;
+}
+
+ossimRefPtr<ossimMultiResLevelHistogram> ossimImageHistogramSource::getHistogram(const ossimIrect& rect)
+{
+   if((theAreaOfInterest != rect)||
+      (theAreaOfInterest.hasNans()))
+   {
+      theAreaOfInterest = rect;
+      theHistogramRecomputeFlag = true;
+   }
+	
+   return getHistogram();
+}
+
+bool ossimImageHistogramSource::execute()
+{
+   if(!isSourceEnabled())
+   {
+      return theHistogram.valid();
+   }
+   
+   setProcessStatus(ossimProcessInterface::PROCESS_STATUS_EXECUTING);
+   if(theHistogramRecomputeFlag)
+   {
+      if(theAreaOfInterest.hasNans())
+      {
+         ossimImageSource* interface = PTR_CAST(ossimImageSource, getInput(0));
+         if(interface)
+         {
+            theAreaOfInterest = interface->getBoundingRect();
+         }
+      }
+      switch(theComputationMode)
+      {
+         case OSSIM_HISTO_MODE_FAST:
+         {
+            computeFastModeHistogram();
+            break;
+         }
+         case OSSIM_HISTO_MODE_NORMAL:
+         default:
+         {
+            computeNormalModeHistogram();
+            break;
+         }
+      }
+   }
+   
+   if (needsAborting())
+   {
+      setProcessStatus(ossimProcessInterface::PROCESS_STATUS_ABORTED);
+      theHistogramRecomputeFlag = false;
+   }
+   else
+   {
+      setProcessStatus(ossimProcessInterface::PROCESS_STATUS_NOT_EXECUTING);
+   }
+   
+   return true;
+}
+
+bool ossimImageHistogramSource::canConnectMyInputTo(ossim_int32 myInputIndex,
+                                                    const ossimConnectableObject* object)const
+{
+   return ((myInputIndex==0)&&PTR_CAST(ossimImageSource,
+                                       object));
+}
+
+void ossimImageHistogramSource::setNumberOfBinsOverride(ossim_int32 numberOfBinsOverride)
+{
+   theNumberOfBinsOverride = numberOfBinsOverride;
+}
+
+void ossimImageHistogramSource::setMinValueOverride(ossim_float32 minValueOverride)
+{
+   theMinValueOverride = minValueOverride;
+}
+void ossimImageHistogramSource::setMaxValueOverride(ossim_float32 maxValueOverride)
+{
+   theMaxValueOverride = maxValueOverride;
+}
+
+ossimHistogramMode ossimImageHistogramSource::getComputationMode()const
+{
+   return theComputationMode;
+}
+
+void ossimImageHistogramSource::setComputationMode(ossimHistogramMode mode)
+{
+   theComputationMode = mode;
+}
+
+void ossimImageHistogramSource::propertyEvent(ossimPropertyEvent& /* event */)
+{
+   theHistogramRecomputeFlag = true;
+}
+
+void ossimImageHistogramSource::connectInputEvent(ossimConnectionEvent& /* event */)
+{
+   theHistogramRecomputeFlag = true;
+}
+
+ossimRefPtr<ossimMultiResLevelHistogram> ossimImageHistogramSource::getHistogram()
+{
+   execute();
+   return theHistogram;
+}
+
+void ossimImageHistogramSource::getBinInformation(ossim_uint32& numberOfBins,
+                                                  ossim_float64& minValue,
+                                                  ossim_float64& maxValue,
+                                                  ossim_uint32 band)const
+{
+   numberOfBins = 0;
+   minValue     = 0;
+   maxValue     = 0;
+	
+   ossimImageSource* input = PTR_CAST(ossimImageSource, getInput(0));
+   if(input)
+   {
+      minValue = input->getMinPixelValue(band);
+      maxValue = input->getMaxPixelValue(band);
+      switch(input->getOutputScalarType())
+      {
+         case OSSIM_UINT8:
+         {
+            minValue     = 0;
+            maxValue     = OSSIM_DEFAULT_MAX_PIX_UCHAR;
+            numberOfBins = 256;
+				
+            break;
+         }
+         case OSSIM_USHORT11:
+         {
+            minValue     = 0;
+            maxValue     = OSSIM_DEFAULT_MAX_PIX_UINT11;
+            numberOfBins = OSSIM_DEFAULT_MAX_PIX_UINT11 + 1;
+				
+            break;
+         }
+         case OSSIM_UINT16:
+         {
+            minValue     = 0;
+            maxValue     = OSSIM_DEFAULT_MAX_PIX_UINT16;
+            numberOfBins = OSSIM_DEFAULT_MAX_PIX_UINT16 + 1;
+				
+            break;
+         }
+         case OSSIM_SINT16:
+         {
+            minValue     = OSSIM_DEFAULT_MIN_PIX_SINT16;
+            maxValue     = OSSIM_DEFAULT_MAX_PIX_SINT16;
+            numberOfBins = (OSSIM_DEFAULT_MAX_PIX_SINT16-OSSIM_DEFAULT_MIN_PIX_SINT16) + 1;
+            break;
+         }
+         case OSSIM_SINT32:
+         case OSSIM_UINT32:
+         case OSSIM_FLOAT32:
+         case OSSIM_FLOAT64:
+         {
+				numberOfBins = OSSIM_DEFAULT_MAX_PIX_UINT16+1;
+            break;
+         }
+         case OSSIM_NORMALIZED_FLOAT:
+         case OSSIM_NORMALIZED_DOUBLE:
+         {
+            minValue     = 0;
+            maxValue     = 1.0;
+            numberOfBins = OSSIM_DEFAULT_MAX_PIX_UINT16+1;
+            break;
+         }
+         default:
+         {
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << "Unsupported scalar type in ossimImageHistogramSource::computeHistogram()" << endl;
+            }
+            return;
+         }
+      }
+   }
+	
+   if(ossim::isnan(theMinValueOverride) == false)
+   {
+      minValue = (float)theMinValueOverride;
+   }
+   if(ossim::isnan(theMaxValueOverride) == false)
+   {
+      maxValue = (float)theMaxValueOverride;
+   }
+   if(theNumberOfBinsOverride > 0)
+   {
+      numberOfBins = theNumberOfBinsOverride;
+   }
+}
+
+void ossimImageHistogramSource::computeNormalModeHistogram()
+{
+   // ref ptr, not a leak.
+   theHistogram = new ossimMultiResLevelHistogram;
+	
+   ossimImageSource* input = PTR_CAST(ossimImageSource, getInput(0));
+   if(!input)
+   {
+      setPercentComplete(100.0);
+      return;
+   }
+   
+   if(getInput(0))
+   {
+      // sum up all tiles needing processing.  We will use the sequencer.
+      //      ossim_uint32 numberOfResLevels = input->getNumberOfDecimationLevels();
+      ossim_uint32 index = 0;
+      double tileCount   = 0.0;
+      double totalTiles  = 0.0;
+      ossim_uint32 numberOfBands = input->getNumberOfOutputBands();
+      ossim_uint32 numberOfBins  = 0;
+      ossim_float64 minValue     = 0;
+      ossim_float64 maxValue     = 0;
+      getBinInformation(numberOfBins, minValue, maxValue, 0);
+		
+      ossimRefPtr<ossimImageSourceSequencer> sequencer = new ossimImageSourceSequencer;
+      sequencer->connectMyInputTo(0, getInput(0));
+      sequencer->initialize();
+      
+      vector<ossimDpt> decimationFactors;
+      input->getDecimationFactors(decimationFactors);
+      if ( !decimationFactors.size() )
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimImageHistogramSource::computeNormalModeHistogram WARNING:"
+            << "\nNo decimation factors from input.  returning..." << std::endl;
+         return;
+      }
+      
+      ossim_uint32 resLevelsToCompute = ossim::min((ossim_uint32)theMaxNumberOfResLevels,
+                                                   (ossim_uint32)decimationFactors.size());
+         
+      if( decimationFactors.size() < theMaxNumberOfResLevels)
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "Number Decimations is smaller than the request number of r-levels defaulting to the smallest of the 2 numbers" << endl;
+      }
+
+      theHistogram->create(resLevelsToCompute);
+      for(index = 0; index < resLevelsToCompute; ++index)
+      {
+         sequencer->setAreaOfInterest(theAreaOfInterest*decimationFactors[index]);
+         
+         totalTiles += sequencer->getNumberOfTiles();
+      }
+      
+      
+      if(numberOfBins > 0)
+      {
+         setPercentComplete(0.0);
+         for(index = 0;
+             (index < resLevelsToCompute);
+             ++index)
+         {
+            // Check for abort request.
+            if (needsAborting())
+            {
+               setPercentComplete(100);
+               break;
+            }
+            
+            //sequencer->setAreaOfInterest(input->getBoundingRect(index));
+            sequencer->setAreaOfInterest(theAreaOfInterest*decimationFactors[index]);
+            
+            sequencer->setToStartOfSequence();
+            theHistogram->getMultiBandHistogram(index)->create(numberOfBands,
+                                                               numberOfBins,
+                                                               minValue,
+                                                               maxValue);
+            
+            ossimRefPtr<ossimImageData> data = sequencer->getNextTile(index);
+            ++tileCount;
+            setPercentComplete((100.0*(tileCount/totalTiles)));
+            
+            ossim_uint32 resLevelTotalTiles = sequencer->getNumberOfTiles();
+            for (ossim_uint32 resLevelTileCount = 0;
+                 resLevelTileCount < resLevelTotalTiles;
+                 ++resLevelTileCount)
+            {
+               if(data.valid()&&data->getBuf()&&(data->getDataObjectStatus() != OSSIM_EMPTY))
+               {
+                  data->populateHistogram(theHistogram->getMultiBandHistogram(index));
+               }
+               
+               // Check for abort request.
+               if (needsAborting())
+               {
+                  setPercentComplete(100);
+                  break;
+               }
+               
+               
+               data = sequencer->getNextTile(index);
+               ++tileCount;
+               setPercentComplete((100.0*(tileCount/totalTiles)));
+            }
+         }
+      }
+      sequencer->disconnect();
+      sequencer = 0;
+   }
+}
+
+void ossimImageHistogramSource::computeFastModeHistogram()
+{
+   // We will only compute a full res histogram in fast mode.  and will only do a MAX of 100 tiles.
+   //
+   ossim_uint32 resLevelsToCompute = 1;
+	
+   // ref ptr, not a leak.
+   theHistogram = new ossimMultiResLevelHistogram;
+   theHistogram->create(resLevelsToCompute);
+   ossimImageSource* input = PTR_CAST(ossimImageSource, getInput(0));
+   if(!input)
+   {
+      setPercentComplete(100.0);
+      return;
+   }
+   // sum up all tiles needing processing.  We will use the sequencer.
+   //      ossim_uint32 numberOfResLevels = input->getNumberOfDecimationLevels();
+   double tileCount   = 0.0;
+   double totalTiles  = 0.0;
+   ossim_uint32 numberOfBands = input->getNumberOfOutputBands();
+   ossim_uint32 numberOfBins  = 0;
+   ossim_float64 minValue     = 0;
+   ossim_float64 maxValue     = 0;
+   getBinInformation(numberOfBins, minValue, maxValue, 0);
+	
+   ossimIrect tileBoundary = theAreaOfInterest;
+   ossimIpt tileSize(ossim::max((ossim_uint32)input->getTileWidth(), (ossim_uint32)64),
+                     ossim::max((ossim_uint32)input->getTileHeight(), (ossim_uint32)64));
+	
+   tileBoundary.stretchToTileBoundary(tileSize);
+   ossim_uint32 tilesWide = (tileBoundary.width()/tileSize.x);
+   ossim_uint32 tilesHigh = (tileBoundary.height()/tileSize.y);
+   totalTiles = tilesWide*tilesHigh;
+   
+   if(totalTiles > theNumberOfTilesToUseInFastMode)
+   {
+      ossim_uint32 testTiles = (ossim_uint32) (std::sqrt((double)theNumberOfTilesToUseInFastMode)+.5);
+      tilesWide = testTiles>tilesWide?tilesWide:testTiles;
+      tilesHigh = testTiles>tilesHigh?tilesHigh:testTiles;
+   }
+   if(numberOfBins > 0)
+   {
+      ossimIpt origin = theAreaOfInterest.ul();
+		
+      ossim_uint32 widthWithExcess  = (ossim_uint32)(((ossim_float64)tileBoundary.width()/(tilesWide*tileSize.x))*tileSize.x);
+      ossim_uint32 heightWithExcess = ((ossim_uint32)((ossim_float64)tileBoundary.height()/(tilesHigh*tileSize.y))*tileSize.y);
+      theHistogram->getMultiBandHistogram(0)->create(numberOfBands,
+                                                     numberOfBins,
+                                                     minValue,
+                                                     maxValue);
+		
+      ossim_uint32 x = 0;
+      ossim_uint32 y = 0;
+      tileCount = 0;
+      totalTiles = tilesWide*tilesHigh;
+      for(y = 0; y < tilesHigh; ++y)
+      {
+         for(x = 0; x < tilesWide; ++x)
+         {
+            ossimIpt ul(origin.x + (x*widthWithExcess),
+                        origin.y + (y*heightWithExcess));
+            ossimIrect tileRect(ul.x, ul.y, ul.x + tileSize.x-1, ul.y + tileSize.y-1);
+            ossimRefPtr<ossimImageData> data = input->getTile(tileRect);
+				
+            if(data.valid()&&data->getBuf()&&(data->getDataObjectStatus() != OSSIM_EMPTY))
+            {
+               data->populateHistogram(theHistogram->getMultiBandHistogram(0));
+            }
+            ++tileCount;
+            setPercentComplete((100.0*(tileCount/totalTiles)));
+         }
+      }
+   }
+}
+
+bool ossimImageHistogramSource::loadState(const ossimKeywordlist& kwl,
+                                          const char* prefix)
+{
+   ossimHistogramSource::loadState(kwl, prefix);  
+   setNumberOfInputs(2);
+   ossimString rect = kwl.find(prefix, "rect");
+
+   if(!rect.empty())
+   {
+      loadState(kwl, prefix);
+   }
+   else 
+   {
+      ossimString newPrefix = ossimString(prefix) + "area_of_interest.";
+      theAreaOfInterest.loadState(kwl, newPrefix);
+   }
+   
+   ossimString mode = kwl.find(prefix, "mode");
+   mode = mode.downcase();
+   if(mode == "normal")
+   {
+      theComputationMode = OSSIM_HISTO_MODE_NORMAL;
+   }
+   else if(mode == "fast")
+   {
+      theComputationMode = OSSIM_HISTO_MODE_FAST;
+   }
+   if(getNumberOfInputs()!=1)
+   {
+      setNumberOfInputs(1);
+   }
+   
+   ossimString numberOfTiles = kwl.find(prefix, "number_of_tiles");
+   if(!numberOfTiles.empty())
+   {
+      theNumberOfTilesToUseInFastMode = numberOfTiles.toUInt32();
+   }
+   theInputListIsFixedFlag = true;
+   theOutputListIsFixedFlag = false;
+	
+   return true;
+}
+
+bool ossimImageHistogramSource::saveState(ossimKeywordlist& kwl,
+                                          const char* prefix)const
+{
+   bool result = ossimHistogramSource::saveState(kwl, prefix);
+   if(result)
+   {
+      ossimString newPrefix = ossimString(prefix) + "area_of_interest.";
+      theAreaOfInterest.saveState(kwl, newPrefix);
+   }
+   return result;
+}
diff --git a/src/ossim/imaging/ossimImageMetaData.cpp b/ossim/src/ossim/imaging/ossimImageMetaData.cpp
similarity index 100%
rename from src/ossim/imaging/ossimImageMetaData.cpp
rename to ossim/src/ossim/imaging/ossimImageMetaData.cpp
diff --git a/src/ossim/imaging/ossimImageMetaDataWriterFactory.cpp b/ossim/src/ossim/imaging/ossimImageMetaDataWriterFactory.cpp
similarity index 100%
rename from src/ossim/imaging/ossimImageMetaDataWriterFactory.cpp
rename to ossim/src/ossim/imaging/ossimImageMetaDataWriterFactory.cpp
diff --git a/ossim/src/ossim/imaging/ossimImageMetaDataWriterFactoryBase.cpp b/ossim/src/ossim/imaging/ossimImageMetaDataWriterFactoryBase.cpp
new file mode 100644
index 0000000..b7f618c
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageMetaDataWriterFactoryBase.cpp
@@ -0,0 +1,29 @@
+//----------------------------------------------------------------------------
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//----------------------------------------------------------------------------
+// $Id: ossimImageMetaDataWriterFactoryBase.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimImageMetaDataWriterFactoryBase.h>
+
+RTTI_DEF1(ossimImageMetaDataWriterFactoryBase,
+          "ossimImageMetaDataWriterFactoryBase",
+          ossimObjectFactory);
+
+ossimImageMetaDataWriterFactoryBase::ossimImageMetaDataWriterFactoryBase()
+{
+}
+
+ossimImageMetaDataWriterFactoryBase::ossimImageMetaDataWriterFactoryBase(
+   const ossimImageMetaDataWriterFactoryBase&)
+{
+}
+
+const ossimImageMetaDataWriterFactoryBase&
+ossimImageMetaDataWriterFactoryBase::operator=(
+   const ossimImageMetaDataWriterFactoryBase&)
+{
+   return *this;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimImageMetaDataWriterRegistry.cpp b/ossim/src/ossim/imaging/ossimImageMetaDataWriterRegistry.cpp
new file mode 100644
index 0000000..50f3267
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageMetaDataWriterRegistry.cpp
@@ -0,0 +1,172 @@
+//----------------------------------------------------------------------------
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//----------------------------------------------------------------------------
+// $Id: ossimImageMetaDataWriterRegistry.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+
+#include <ossim/imaging/ossimImageMetaDataWriterRegistry.h>
+#include <ossim/imaging/ossimImageMetaDataWriterFactory.h>
+#include <ossim/imaging/ossimMetadataFileWriter.h>
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+#include <algorithm>
+
+//ossimImageMetaDataWriterRegistry*
+//ossimImageMetaDataWriterRegistry::theInstance= NULL;
+
+ossimImageMetaDataWriterRegistry::ossimImageMetaDataWriterRegistry()
+{
+   registerFactory(ossimImageMetaDataWriterFactory::instance());
+   ossimObjectFactoryRegistry::instance()->registerFactory(this);
+}
+
+ossimImageMetaDataWriterRegistry::~ossimImageMetaDataWriterRegistry()
+{
+   ossimObjectFactoryRegistry::instance()->unregisterFactory(this);
+}
+
+ossimImageMetaDataWriterRegistry* ossimImageMetaDataWriterRegistry::instance()
+{
+   static ossimImageMetaDataWriterRegistry sharedInstance;
+
+   return &sharedInstance;
+}
+
+void ossimImageMetaDataWriterRegistry::registerFactory(
+   ossimImageMetaDataWriterFactoryBase* factory)
+{
+   if(factory&&!findFactory(factory))
+   {
+      theFactoryList.push_back(factory);
+   }
+}
+
+void ossimImageMetaDataWriterRegistry::unregisterFactory(
+   ossimImageMetaDataWriterFactoryBase* factory)
+{
+   std::vector<ossimImageMetaDataWriterFactoryBase*>::iterator iter =
+      std::find(theFactoryList.begin(),
+                theFactoryList.end(),
+                factory);
+   if(iter != theFactoryList.end())
+   {
+      theFactoryList.erase(iter);
+   }
+}
+
+bool ossimImageMetaDataWriterRegistry::findFactory(
+   ossimImageMetaDataWriterFactoryBase* factory)const
+{
+   return (std::find(theFactoryList.begin(),
+                     theFactoryList.end(),
+                     factory)!=theFactoryList.end());
+}
+
+
+ossimObject* ossimImageMetaDataWriterRegistry::createObject(
+   const ossimString& typeName) const
+{
+   ossimObject* result = NULL;
+   std::vector<ossimImageMetaDataWriterFactoryBase*>::const_iterator factory;
+   
+   factory = theFactoryList.begin();
+   while((factory != theFactoryList.end()) && !result)
+   {
+      result = (*factory)->createObject(typeName);
+      ++factory;
+   }
+   
+   return result;
+}
+
+ossimObject* ossimImageMetaDataWriterRegistry::createObject(
+   const ossimKeywordlist& kwl,
+   const char* prefix) const
+{
+   ossimObject* result = NULL;
+   std::vector<ossimImageMetaDataWriterFactoryBase*>::const_iterator factory;
+
+   factory = theFactoryList.begin();
+   while((factory != theFactoryList.end()) && !result)
+   {
+     result = (*factory)->createObject(kwl, prefix);
+     ++factory;
+   }
+   return result;
+}
+
+ossimRefPtr<ossimMetadataFileWriter>
+ossimImageMetaDataWriterRegistry::createWriter(const ossimString& type) const
+{
+   ossimRefPtr<ossimMetadataFileWriter> result = NULL;
+   
+   std::vector<ossimImageMetaDataWriterFactoryBase*>::const_iterator factory;
+   factory = theFactoryList.begin();
+   while((factory != theFactoryList.end()) && !result)
+   {
+     result = (*factory)->createWriter(type);
+     ++factory;
+   }
+   return result;
+}
+
+void ossimImageMetaDataWriterRegistry::getTypeNameList(
+   std::vector<ossimString>& typeList) const
+{
+   std::vector<ossimString> result;
+   std::vector<ossimImageMetaDataWriterFactoryBase*>::const_iterator iter =
+      theFactoryList.begin();
+
+   while(iter != theFactoryList.end())
+   {
+      result.clear();
+      (*iter)->getTypeNameList(result);
+
+      // now append to the end of the typeList.
+      typeList.insert(typeList.end(),
+                      result.begin(),
+                      result.end());
+      ++iter;
+   }
+}
+
+void ossimImageMetaDataWriterRegistry::getMetadatatypeList(
+   std::vector<ossimString>& metadatatypeList) const
+{
+   //---
+   // Since this is the master registry for all meta data writer factories
+   // we will start with a cleared list.
+   //---
+   metadatatypeList.clear();
+   
+   std::vector<ossimImageMetaDataWriterFactoryBase*>::const_iterator iter =
+      theFactoryList.begin();
+   
+   while(iter != theFactoryList.end())
+   {
+      (*iter)->getMetadatatypeList(metadatatypeList);
+      ++iter;
+   } 
+}
+
+ossimImageMetaDataWriterRegistry::ossimImageMetaDataWriterRegistry(
+   const ossimImageMetaDataWriterRegistry& /* rhs */)
+{
+}
+
+const ossimImageMetaDataWriterRegistry&
+ossimImageMetaDataWriterRegistry::operator=(
+   const ossimImageMetaDataWriterRegistry& /* rhs */)
+{
+   return *this;
+}
+
+extern "C"
+{
+   void* ossimImageMetaDataWriterRegistryGetInstance()
+   {
+      return ossimImageMetaDataWriterRegistry::instance();
+   }
+}
+
diff --git a/ossim/src/ossim/imaging/ossimImageModel.cpp b/ossim/src/ossim/imaging/ossimImageModel.cpp
new file mode 100644
index 0000000..b69bc78
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageModel.cpp
@@ -0,0 +1,155 @@
+//-----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Class definition of ossimImageModel.
+//
+//-----------------------------------------------------------------------------
+// $Id$
+
+#include <string>
+
+#include <ossim/imaging/ossimImageModel.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/imaging/ossimImageHandler.h>
+
+RTTI_DEF1(ossimImageModel, "ossimImageModel", ossimObject);
+
+ossimImageModel::ossimImageModel()
+   : ossimObject(),
+     theSubImageOffset(),
+     theDecimationFactors(),
+     theLines(0),
+     theSamples(0),
+     theTargetRrds(0)
+{
+}
+
+ossimImageModel::~ossimImageModel()
+{
+}
+
+void ossimImageModel::initialize(const ossimImageHandler& ih)
+{
+   theSubImageOffset = ossimDpt();
+   theLines          = ih.getNumberOfLines(0);
+   theSamples        = ih.getNumberOfSamples(0);
+   ih.getDecimationFactors(theDecimationFactors);
+}
+
+void ossimImageModel::rnToR0(ossim_uint32 rrds,
+                             const ossimDpt& rnPt,
+                             ossimDpt& r0Pt) const
+{
+   if ( rrds < theDecimationFactors.size() )
+   {
+      r0Pt.x = rnPt.x / theDecimationFactors[rrds].x;
+      r0Pt.y = rnPt.y / theDecimationFactors[rrds].y;
+   }
+   else
+   {
+      std::string e = "ossimImageModel::rnToR0 rrds out of range!";
+      throw ossimException(e);
+   }
+}
+void ossimImageModel::rnToR0(const ossimDpt& rnPt, ossimDpt& r0Pt) const
+{
+   rnToR0(theTargetRrds, rnPt, r0Pt);
+}
+   
+void ossimImageModel::r0ToRn(ossim_uint32 rrds,
+                             const ossimDpt& r0Pt,
+                             ossimDpt& rnPt) const
+{
+   if ( rrds < theDecimationFactors.size() )
+   {
+      rnPt.x = r0Pt.x * theDecimationFactors[rrds].x;
+      rnPt.y = r0Pt.y * theDecimationFactors[rrds].y;
+   }
+   else
+   {
+      std::string e = "ossimImageModel::r0ToRn rrds out of range!";
+      throw ossimException(e);
+   }
+}
+
+void ossimImageModel::r0ToRn(const ossimDpt& r0Pt, ossimDpt& rnPt) const
+{
+   r0ToRn(theTargetRrds, r0Pt, rnPt);
+}
+
+void ossimImageModel::getSubImageOffset(ossim_uint32 rrds,
+                                        ossimDpt& offset) const
+{
+   if ( rrds < theDecimationFactors.size() )
+   {
+      offset.x = theSubImageOffset.x * theDecimationFactors[rrds].x;
+      offset.y = theSubImageOffset.y * theDecimationFactors[rrds].y;
+   }
+   else
+   {
+      std::string e = "ossimImageModel::getSubImageOffset rrds out of range!";
+      throw ossimException(e);
+   } 
+}
+
+void ossimImageModel::getImageRectangle(ossim_uint32 rrds,
+                                        ossimDrect& rect) const
+{
+   if ( rrds < theDecimationFactors.size() )
+   {
+      ossim_float64 lrX = theSamples * theDecimationFactors[rrds].x - 1.0;
+      ossim_float64 lrY = theLines   * theDecimationFactors[rrds].y - 1.0;
+      ossimDrect r(0.0, 0.0, lrX, lrY);
+      rect = r;
+   }
+   else
+   {
+      std::string e = "ossimImageModel::getImageRectangle rrds out of range!";
+      throw ossimException(e);
+   } 
+}
+
+void ossimImageModel::getBoundingRectangle(ossim_uint32 rrds,
+                                           ossimDrect& rect) const
+{
+   if ( rrds < theDecimationFactors.size() )
+   {
+      ossim_float64 urX = theSubImageOffset.x * theDecimationFactors[rrds].x;
+      ossim_float64 urY = theSubImageOffset.y * theDecimationFactors[rrds].y;
+      
+      ossim_float64 lrX = urX + theSamples*theDecimationFactors[rrds].x - 1.0;
+      ossim_float64 lrY = urY + theLines  *theDecimationFactors[rrds].y - 1.0;
+      ossimDrect r(0, 0, lrX, lrY);
+      rect = r;
+   }
+   else
+   {
+      std::string e =
+         "ossimImageModel::getBoundingRectangle rrds out of range!";
+      throw ossimException(e);
+   }  
+}
+ossim_uint32 ossimImageModel::getNumberOfDecimationLevels()const
+{
+   return (ossim_uint32)theDecimationFactors.size();
+}
+
+void ossimImageModel::setTargetRrds(ossim_uint32 rrds)
+{
+   theTargetRrds = rrds;
+}
+
+ossim_uint32 ossimImageModel::getTargetRrds() const
+{
+   return theTargetRrds;
+}
+
+   
+
+
diff --git a/src/ossim/imaging/ossimImageMosaic.cpp b/ossim/src/ossim/imaging/ossimImageMosaic.cpp
similarity index 100%
rename from src/ossim/imaging/ossimImageMosaic.cpp
rename to ossim/src/ossim/imaging/ossimImageMosaic.cpp
diff --git a/src/ossim/imaging/ossimImageReconstructionFilterFactory.cpp b/ossim/src/ossim/imaging/ossimImageReconstructionFilterFactory.cpp
similarity index 100%
rename from src/ossim/imaging/ossimImageReconstructionFilterFactory.cpp
rename to ossim/src/ossim/imaging/ossimImageReconstructionFilterFactory.cpp
diff --git a/src/ossim/imaging/ossimImageReconstructionFilterRegistry.cpp b/ossim/src/ossim/imaging/ossimImageReconstructionFilterRegistry.cpp
similarity index 100%
rename from src/ossim/imaging/ossimImageReconstructionFilterRegistry.cpp
rename to ossim/src/ossim/imaging/ossimImageReconstructionFilterRegistry.cpp
diff --git a/ossim/src/ossim/imaging/ossimImageRenderer.cpp b/ossim/src/ossim/imaging/ossimImageRenderer.cpp
new file mode 100644
index 0000000..9b1e5dd
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageRenderer.cpp
@@ -0,0 +1,2401 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimImageRenderer.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimImageRenderer.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimDpt3d.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimPolyArea2d.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimProcessProgressEvent.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimConnectableContainerInterface.h>
+#include <ossim/base/ossimViewController.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimNumericProperty.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimDiscrete3x3HatFilter.h>
+#include <ossim/imaging/ossimDiscreteNearestNeighbor.h>
+#include <ossim/imaging/ossimFilterResampler.h>
+#include <ossim/projection/ossimImageViewProjectionTransform.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/projection/ossimImageViewTransformFactory.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <iostream>
+using namespace std;
+
+#ifdef OSSIM_ID_ENABLED
+static const char OSSIM_ID[] = "$Id: ossimImageRenderer.cpp 23664 2015-12-14 14:17:27Z dburken $";
+#endif
+
+static ossimTrace traceDebug("ossimImageRenderer:debug");
+
+RTTI_DEF2(ossimImageRenderer, "ossimImageRenderer", ossimImageSourceFilter, ossimViewInterface);
+
+
+
+void ossimImageRenderer::ossimRendererSubRectInfo::splitHorizontal(std::vector<ossimRendererSubRectInfo>& result)const
+{
+   ossimIrect vrect(m_Vul,
+                    m_Vur,
+                    m_Vlr,
+                    m_Vll);
+   ossim_int32 w  = vrect.width();
+   // ossim_int32 h  = vrect.height();
+   ossim_int32 w2 = w>>1;
+   ossimIrect tempLeftRect(m_Vul.x, 
+                           m_Vul.y, 
+                           m_Vul.x+w2-1, 
+                           m_Vlr.y);
+   ossimIrect tempRightRect(tempLeftRect.ur().x+1, 
+                            m_Vul.y, 
+                            m_Vur.x, 
+                            m_Vlr.y);
+
+
+   ossimRendererSubRectInfo left(m_transform.get());
+   ossimRendererSubRectInfo right(m_transform.get());
+
+   left.m_viewBounds = m_viewBounds;
+   right.m_viewBounds = m_viewBounds;
+
+   left.m_Vul = tempLeftRect.ul();
+   left.m_Vur = tempLeftRect.ur();
+   left.m_Vlr = tempLeftRect.lr();
+   left.m_Vll = tempLeftRect.ll();
+
+   right.m_Vul = tempRightRect.ul();
+   right.m_Vur = tempRightRect.ur();
+   right.m_Vlr = tempRightRect.lr();
+   right.m_Vll = tempRightRect.ll();
+
+   left.transformViewToImage();
+   right.transformViewToImage();
+
+   if(left.imageIsNan())
+   {
+      if(left.m_viewBounds->intersects(left.getViewRect()))
+      {
+         result.push_back(left);
+      }
+   }
+   else
+   {
+      result.push_back(left);
+   }
+   if(right.imageIsNan())
+   {
+      if(right.m_viewBounds->intersects(right.getViewRect()))
+      {
+         result.push_back(right);
+      }
+   }
+   else
+   {
+      result.push_back(right);
+   }
+}
+
+void ossimImageRenderer::ossimRendererSubRectInfo::splitVertical(std::vector<ossimRendererSubRectInfo>& result)const
+{
+   ossimIrect vrect(m_Vul,
+                    m_Vur,
+                    m_Vlr,
+                    m_Vll);
+   // ossim_int32 w  = vrect.width();
+   ossim_int32 h  = vrect.height();
+   ossim_int32 h2 = h>>1;
+   ossimIrect tempTopRect(m_Vul.x, 
+                          m_Vul.y, 
+                          m_Vlr.x, 
+                          m_Vul.y+h2-1);
+   ossimIrect tempBottomRect(m_Vul.x, 
+                             tempTopRect.lr().y+1, 
+                             m_Vlr.x, 
+                             m_Vlr.y);
+
+   ossimRendererSubRectInfo top(m_transform.get());
+   ossimRendererSubRectInfo bottom(m_transform.get());
+
+   top.m_viewBounds    = m_viewBounds;
+   bottom.m_viewBounds = m_viewBounds;
+
+   top.m_Vul = tempTopRect.ul();
+   top.m_Vur = tempTopRect.ur();
+   top.m_Vlr = tempTopRect.lr();
+   top.m_Vll = tempTopRect.ll();
+
+   bottom.m_Vul = tempBottomRect.ul();
+   bottom.m_Vur = tempBottomRect.ur();
+   bottom.m_Vlr = tempBottomRect.lr();
+   bottom.m_Vll = tempBottomRect.ll();
+
+   top.transformViewToImage();
+   bottom.transformViewToImage();
+
+   if(top.imageIsNan())
+   {
+      if(top.m_viewBounds->intersects(top.getViewRect()))
+      {
+         result.push_back(top);
+      }
+   }
+   else
+   {
+      result.push_back(top);
+   }
+   if(bottom.imageIsNan())
+   {
+      if(bottom.m_viewBounds->intersects(bottom.getViewRect()))
+      {
+         result.push_back(bottom);
+      }
+   }
+   else
+   {
+      result.push_back(bottom);
+   }
+}
+
+void ossimImageRenderer::ossimRendererSubRectInfo::splitAll(std::vector<ossimRendererSubRectInfo>& result)const
+{
+   //std::cout << "FULL Split\n" << std::endl;
+   // let splitAll for now.  We can still optimize but will do that later
+   ossimIrect tempUlRect;
+   ossimIrect tempUrRect;
+   ossimIrect tempLrRect;
+   ossimIrect tempLlRect;
+   ossimIrect vrect(m_Vul,
+                    m_Vur,
+                    m_Vlr,
+                    m_Vll);
+   ossim_int32 w  = vrect.width();
+   ossim_int32 h  = vrect.height();
+   ossim_int32 w2 = w>>1;
+   ossim_int32 h2 = h>>1;
+
+   tempUlRect = ossimIrect(m_Vul.x,
+                           m_Vul.y,
+                           m_Vul.x + (w2 - 1),
+                           m_Vul.y + (h2 - 1));
+  
+   tempUrRect = ossimIrect(tempUlRect.ur().x+1,
+                           m_Vul.y,
+                           m_Vur.x,
+                           m_Vul.y + (h2 - 1));
+  
+   tempLrRect = ossimIrect(tempUlRect.lr().x,
+                           tempUlRect.lr().y+1,
+                           m_Vlr.x,
+                           m_Vlr.y);
+  
+   tempLlRect = ossimIrect(m_Vul.x,
+                           tempUlRect.ll().y+1,
+                           tempLrRect.ul().x,
+                           tempLrRect.ll().y);
+
+//  std::cout << "VR: " << vrect.width() << ", " << vrect.height() << "\n"
+//            << "UL: " << tempUlRect.width() << ", " << tempUlRect.height() << "\n"
+//            << "UR: " << tempUrRect.width() << ", " << tempUrRect.height() << "\n"
+//            << "LR: " << tempLrRect.width() << ", " << tempLrRect.height() << "\n"
+//            << "LL: " << tempLlRect.width() << ", " << tempLlRect.height() << "\n";
+
+   ossimRendererSubRectInfo ul(m_transform.get(),tempUlRect.ul(), tempUlRect.ur(),tempUlRect.lr(), tempUlRect.ll());
+   ossimRendererSubRectInfo ur(m_transform.get(),tempUrRect.ul(), tempUrRect.ur(),tempUrRect.lr(), tempUrRect.ll());
+   ossimRendererSubRectInfo lr(m_transform.get(),tempLrRect.ul(), tempLrRect.ur(),tempLrRect.lr(), tempLrRect.ll());
+   ossimRendererSubRectInfo ll(m_transform.get(),tempLlRect.ul(), tempLlRect.ur(),tempLlRect.lr(), tempLlRect.ll());
+
+   ul.m_viewBounds = m_viewBounds;
+   ur.m_viewBounds = m_viewBounds;
+   lr.m_viewBounds = m_viewBounds;
+   ll.m_viewBounds = m_viewBounds;
+
+   ul.transformViewToImage();
+   ur.transformViewToImage();
+   lr.transformViewToImage();
+   ll.transformViewToImage();
+
+   if(ul.imageIsNan())
+   {
+      if(ul.m_viewBounds->intersects(ul.getViewRect()))
+      {
+         result.push_back(ul);
+      }
+   }
+   else
+   {
+      result.push_back(ul);
+   }
+   if(ur.imageIsNan())
+   {
+      if(ur.m_viewBounds->intersects(ur.getViewRect()))
+      {
+         result.push_back(ur);
+      }
+   }
+   else
+   {
+      result.push_back(ur);
+   }
+   if(lr.imageIsNan())
+   {
+      if(lr.m_viewBounds->intersects(lr.getViewRect()))
+      {
+         result.push_back(lr);
+      }
+   }
+   else
+   {
+      result.push_back(lr);
+   }
+   if(ll.imageIsNan())
+   {
+      if(ll.m_viewBounds->intersects(ll.getViewRect()))
+      {
+         result.push_back(ll);
+      }
+   }
+   else
+   {
+      result.push_back(ll);
+   }
+}
+
+void ossimImageRenderer::ossimRendererSubRectInfo::splitView(std::vector<ossimRendererSubRectInfo>& result)const
+{
+  ossim_uint16 splitFlags = getSplitFlags();
+  // just do horizontal split for test
+
+  ossimIrect vrect(m_Vul,
+                  m_Vur,
+                  m_Vlr,
+                  m_Vll);
+  ossim_int32 w  = vrect.width();
+  ossim_int32 h  = vrect.height();
+  ossim_int32 w2 = w>>1;
+  ossim_int32 h2 = h>>1;
+  
+  if((w2 <2)&&(h2<2))
+  {
+    if(splitFlags)
+    {
+      ossimRendererSubRectInfo rect(m_transform.get(),m_Vul, 
+                              m_Vul, 
+                              m_Vul, 
+                              m_Vul);
+      rect.m_viewBounds = m_viewBounds;
+      rect.transformViewToImage();
+
+      if(rect.imageIsNan())
+      {
+        if(rect.m_viewBounds->intersects(rect.getViewRect()))
+        {
+          result.push_back(rect);
+        }
+      }
+      else
+      {
+        result.push_back(rect);
+      }
+    }
+  }
+  // horizontal split if only the upper left and lower left 
+  // vertices need splitting 
+  else if((splitFlags==(UPPER_LEFT_SPLIT_FLAG|LOWER_LEFT_SPLIT_FLAG))||
+          (splitFlags==(UPPER_RIGHT_SPLIT_FLAG|LOWER_RIGHT_SPLIT_FLAG)))
+  {
+   // std::cout << "Horizontal Split\n" << std::endl;    
+    if(w > 1)
+    {
+      splitHorizontal(result);
+    }
+  }  
+  // check vertical only split
+  else if((splitFlags==(UPPER_LEFT_SPLIT_FLAG|UPPER_RIGHT_SPLIT_FLAG))||
+          (splitFlags==(LOWER_RIGHT_SPLIT_FLAG|LOWER_LEFT_SPLIT_FLAG)))
+  {
+    //std::cout << "Vertical Split\n" << std::endl;
+
+    if(h>1)
+    {
+      splitVertical(result);
+    }
+  }
+  else if(splitFlags)//if((w>1)&&(h>1)&&(splitFlags))
+  {
+    if((w<2)&&(h>1))
+    {
+      splitVertical(result);
+    }
+    else if((w>1)&&(h<2))
+    {
+      splitHorizontal(result);
+    }
+    else
+    {
+      splitAll(result);
+    }
+  }
+}
+void ossimImageRenderer::ossimRendererSubRectInfo::transformImageToView()
+{
+   ossimDpt vul;
+   ossimDpt vur;
+   ossimDpt vlr;
+   ossimDpt vll;
+   m_transform->imageToView(m_Iul,
+                          vul);
+   m_transform->imageToView(m_Iur,
+                          vur);
+   m_transform->imageToView(m_Ilr,
+                          vlr);
+   m_transform->imageToView(m_Ill,
+                          vll);
+   
+   m_Vul = vul;
+   m_Vur = vur;
+   m_Vlr = vlr;
+   m_Vll = vll;
+}
+
+bool ossimImageRenderer::ossimRendererSubRectInfo::tooBig()const
+{
+  ossimDrect vRect = getViewRect();
+
+  return ((vRect.width() > 64) || (vRect.height() > 64));
+}
+
+ossim_uint16 ossimImageRenderer::ossimRendererSubRectInfo::getSplitFlags()const
+{
+  ossim_uint16 result = SPLIT_NONE;
+  ossimDrect vRect = getViewRect();
+
+  if(imageIsNan())
+  {
+    if(m_viewBounds->intersects(getViewRect()))
+    {
+//      result = SPLIT_ALL;
+    }
+    else
+    {
+      return result;
+    }
+  }
+  /*
+  if(result != SPLIT_ALL)
+  {
+    if(m_ulRoundTripError.hasNans()&&m_urRoundTripError.hasNans()&&
+        m_lrRoundTripError.hasNans()&&m_llRoundTripError.hasNans())
+    {
+      if(m_viewBounds->intersects(getViewRect()))
+      {
+        result = SPLIT_ALL;
+      }
+      return result;
+    }
+    else if(tooBig())
+    {
+      result = SPLIT_ALL;
+    }
+  }
+
+  if(result != SPLIT_ALL)
+  {
+    if(m_ulRoundTripError.hasNans()) result |= UPPER_LEFT_SPLIT_FLAG;
+    if(m_urRoundTripError.hasNans()) result |= UPPER_RIGHT_SPLIT_FLAG;
+    if(m_lrRoundTripError.hasNans()) result |= LOWER_RIGHT_SPLIT_FLAG;
+    if(m_llRoundTripError.hasNans()) result |= LOWER_LEFT_SPLIT_FLAG;
+  }
+*/
+  if(result != SPLIT_ALL)
+  {
+    ossim_float64 sensitivityScale = m_ImageToViewScale.length();
+    //std::cout << sensitivityScale << std::endl;
+    if(sensitivityScale < 1.0) sensitivityScale = 1.0/sensitivityScale;
+
+
+     // if((m_ulRoundTripError.length() > sensitivityScale)||
+     //    (m_urRoundTripError.length() > sensitivityScale)||
+     //    (m_lrRoundTripError.length() > sensitivityScale)||
+     //    (m_llRoundTripError.length() > sensitivityScale))
+     // {
+     //   std::cout << "________________\n";
+
+     //   std::cout << "Sens:  " << sensitivityScale << "\n"
+     //             << "View:  " << getViewRect() << "\n"
+     //             << "UL:    " << m_ulRoundTripError.length() << "\n"
+     //             << "UR:   " << m_urRoundTripError.length() << "\n"
+     //             << "LR:   " << m_lrRoundTripError.length() << "\n"
+     //             << "LL:   " << m_llRoundTripError.length() << "\n";
+     // }
+   // if(m_ulRoundTripError.length() > sensitivityScale) result |= UPPER_LEFT_SPLIT_FLAG;
+   // if(m_urRoundTripError.length() > sensitivityScale) result |= UPPER_RIGHT_SPLIT_FLAG;
+   // if(m_lrRoundTripError.length() > sensitivityScale) result |= LOWER_RIGHT_SPLIT_FLAG;
+   // if(m_llRoundTripError.length() > sensitivityScale) result |= LOWER_LEFT_SPLIT_FLAG;
+       // std::cout << result << " == " << SPLIT_ALL << "\n";
+
+    if((result!=SPLIT_ALL)&&!canBilinearInterpolate(sensitivityScale))
+    {
+      // std::cout << "TESTING BILINEAR!!!!\n";
+      result = SPLIT_ALL;
+
+    }
+    else
+    {
+      // std::cout << "CAN BILINEAR!!!!\n";
+    }
+  }
+
+  return result;
+}
+
+void ossimImageRenderer::ossimRendererSubRectInfo::transformViewToImage()
+{
+//  std::cout << "TRANSFORM VIEW TO IMAGE!!!!!!!!!!!!!!\n";
+
+   ossimDrect vrect = getViewRect();
+   ossim_float64 w = vrect.width();
+   ossim_float64 h = vrect.height();
+   // ossim_float64 w2 = w*0.5;
+   // ossim_float64 h2 = h*0.5;
+
+   m_transform->viewToImage(m_Vul, m_Iul);
+   m_transform->viewToImage(m_Vur, m_Iur);
+   m_transform->viewToImage(m_Vlr, m_Ilr);
+   m_transform->viewToImage(m_Vll, m_Ill);
+
+//  m_ulRoundTripError = m_transform->getRoundTripErrorView(m_Vul);
+//  m_urRoundTripError = m_transform->getRoundTripErrorView(m_Vur);
+//  m_lrRoundTripError = m_transform->getRoundTripErrorView(m_Vlr);;
+//  m_llRoundTripError = m_transform->getRoundTripErrorView(m_Vll);;
+
+#if 1
+   m_VulScale = computeViewToImageScale(m_Vul, ossimDpt(w,h));
+   m_VurScale = computeViewToImageScale(m_Vur, ossimDpt(-w,h));
+   m_VlrScale = computeViewToImageScale(m_Vlr, ossimDpt(-w,-h));
+   m_VllScale = computeViewToImageScale(m_Vll, ossimDpt(w,-h));
+
+   ossim_int32 n = 0;
+   m_ViewToImageScale.x = 0.0;
+   m_ViewToImageScale.y = 0.0;
+
+   if(!m_VulScale.hasNans())
+   {
+      m_ViewToImageScale += m_VulScale; 
+      ++n;
+   }
+   if(!m_VurScale.hasNans())
+   {
+      m_ViewToImageScale += m_VurScale; 
+      ++n;
+   }
+   if(!m_VlrScale.hasNans())
+   {
+      m_ViewToImageScale += m_VlrScale; 
+      ++n;
+   }
+   if(!m_VllScale.hasNans())
+   {
+      m_ViewToImageScale += m_VllScale; 
+      ++n;
+   }
+
+   if(!n)
+   {
+      m_ViewToImageScale.makeNan();
+      m_ImageToViewScale.makeNan();
+   }
+   else
+   {
+      m_ViewToImageScale.x/=n;
+      m_ViewToImageScale.y/=n;
+
+      m_ImageToViewScale.x = 1.0/m_ViewToImageScale.x;
+      m_ImageToViewScale.y = 1.0/m_ViewToImageScale.y;
+   }
+
+
+//std::cout << m_ViewToImageScale << std::endl;
+#else
+   {
+      m_ViewToImageScale = ossimDpt(1.0, 1.0);
+      
+      ossimDpt topDelta    = m_Iur - m_Iul;
+      ossimDpt rightDelta  = m_Ilr - m_Iur;
+      ossimDpt bottomDelta = m_Ill - m_Ilr;
+      ossimDpt leftDelta   = m_Iul - m_Ill;
+      
+      double topLen    = topDelta.length();
+      double bottomLen = bottomDelta.length();
+      double rightLen  = rightDelta.length();
+      double leftLen   = leftDelta.length();
+      
+      double averageHoriz = ((topLen)  + (bottomLen))*.5;
+      double averageVert  = ((leftLen) + (rightLen))*.5;
+      
+      ossimDpt deltaViewP1P2 = m_Vul - m_Vur;
+      ossimDpt deltaViewP1P3 = m_Vul - m_Vll;
+      
+      double lengthViewP1P2 = deltaViewP1P2.length();//+1;
+      double lengthViewP1P3 = deltaViewP1P3.length();//+1;
+
+      if(lengthViewP1P2 > FLT_EPSILON)
+      {
+         m_ViewToImageScale.x = averageHoriz/lengthViewP1P2;
+      }
+      else
+      {
+         m_ViewToImageScale.makeNan();
+      }
+      if(lengthViewP1P3 > FLT_EPSILON)
+      {
+         m_ViewToImageScale.y = averageVert/lengthViewP1P3;
+      }
+      else
+      {
+         m_ViewToImageScale.makeNan();
+      }
+
+      if(!m_ViewToImageScale.hasNans())
+      {
+         m_ImageToViewScale.x = 1.0/m_ViewToImageScale.x;
+         m_ImageToViewScale.y = 1.0/m_ViewToImageScale.y;
+      }
+      else
+      {
+         m_ImageToViewScale.makeNan();
+      }
+   }
+#endif
+}
+
+ossimDpt ossimImageRenderer::ossimRendererSubRectInfo::computeViewToImageScale(const ossimDpt& viewPt,
+                           const ossimDpt& delta)const
+{
+  ossimDpt result;
+  result.makeNan();
+  if(viewPt.hasNans()) return result; 
+  ossimDpt ipt;
+  m_transform->viewToImage(viewPt, ipt);
+
+  if(!ipt.isNan())
+  {
+//    ossimDpt delta;
+//    transform->viewToImage(viewPt+ossimDpt(0.5,0.5), delta);
+
+//    delta = delta-ipt;
+//    result.x = delta.length()/std::sqrt(2);
+ //   result.y = result.x;
+
+    ossimDpt dx;
+    ossimDpt dy;
+
+    m_transform->viewToImage(viewPt + ossimDpt(delta.x,0.0), dx);
+    m_transform->viewToImage(viewPt + ossimDpt(0.0,delta.y), dy);
+    dx = dx-ipt;
+    dy = dy-ipt;
+
+    result.x = dx.length()/fabs(delta.x);
+    result.y = dy.length()/fabs(delta.y);
+  }
+
+  return result;
+}
+
+void ossimImageRenderer::ossimRendererSubRectInfo::stretchImageOut(bool enableRound)
+{
+   ossimDpt topDelta    = m_Iur - m_Iul;
+   ossimDpt rightDelta  = m_Ilr - m_Iur;
+   ossimDpt bottomDelta = m_Ill - m_Ilr;
+   ossimDpt leftDelta   = m_Iul - m_Ill;
+
+   topDelta = topDelta*(1.0/topDelta.length());
+   rightDelta = rightDelta*(1.0/rightDelta.length());
+   bottomDelta = bottomDelta*(1.0/bottomDelta.length());
+   leftDelta = leftDelta*(1.0/leftDelta.length());
+
+   m_Iul = m_Iul + ((leftDelta - topDelta)*.5);
+   m_Iur = m_Iur + ((topDelta - rightDelta)*.5);
+   m_Ilr = m_Ilr + ((rightDelta - bottomDelta)*.5);
+   m_Ill = m_Ill + ((bottomDelta - leftDelta)*.5);
+
+   if(enableRound)
+   {
+      m_Iul = ossimIpt(ossim::round<int>(m_Iul.x),
+                        ossim::round<int>(m_Iul.y));
+      m_Iur = ossimIpt(ossim::round<int>(m_Iur.x),
+                        ossim::round<int>(m_Iur.y));
+      m_Ilr = ossimIpt(ossim::round<int>(m_Ilr.x),
+                        ossim::round<int>(m_Ilr.y));
+      m_Ill = ossimIpt(ossim::round<int>(m_Ill.x),
+                        ossim::round<int>(m_Ill.y));
+   }
+}
+
+bool ossimImageRenderer::ossimRendererSubRectInfo::isIdentity()const
+{
+//    ossimDpt deltaP1P2 = m_Iul - m_Iur;
+//    ossimDpt deltaP1P3 = m_Iul - m_Ill;
+   
+//    ossimDpt deltaViewP1P2 = m_Vul - m_Vur;
+//    ossimDpt deltaViewP1P3 = m_Vul - m_Vll;
+   
+//    bool horizontalSigns = ossimGetSign(deltaP1P2.x)==ossimGetSign(deltaViewP1P2.x);
+//    bool verticalSigns   = ossimGetSign(deltaP1P3.y)==ossimGetSign(deltaViewP1P3.y);
+
+//    // check first to see if any horizontal or vertical flipping
+//    //
+//    if(horizontalSigns && verticalSigns)
+//    {
+//       // check scales to see if they are 1
+//       if(fabs(1-m_ViewToImageScale.x) <= FLT_EPSILON &&
+//          fabs(1-m_ViewToImageScale.y) <= FLT_EPSILON)
+//       {
+//          return true;
+//       }
+//    }
+
+    double iulDelta = (m_Iul-m_Vul).length();
+    double iurDelta = (m_Iur-m_Vur).length();
+    double ilrDelta = (m_Ilr-m_Vlr).length();
+    double illDelta = (m_Ill-m_Vll).length();
+
+    return ((iulDelta <= FLT_EPSILON)&&
+            (iurDelta <= FLT_EPSILON)&&
+            (ilrDelta <= FLT_EPSILON)&&
+            (illDelta <= FLT_EPSILON));
+}
+
+
+bool ossimImageRenderer::ossimRendererSubRectInfo::canBilinearInterpolate(double error)const
+{
+  bool result = false;
+
+      // now check point placement
+  ossimDpt imageToViewScale = getAbsValueImageToViewScales();
+
+  double testScale = imageToViewScale.length();
+
+//  ossimDpt errorUl = transform->getRoundTripErrorView(m_Vul);
+//  ossimDpt errorUr = transform->getRoundTripErrorView(m_Vur);
+//  ossimDpt errorLr = transform->getRoundTripErrorView(m_Vlr);
+//  ossimDpt errorLl = transform->getRoundTripErrorView(m_Vll);
+
+//  if((errorUl.length() > 2 )||
+//     (errorUr.length() > 2 )||
+//     (errorLr.length() > 2 )||
+//     (errorLl.length() > 2))
+//     {
+//        return result;
+//     }
+//  std::cout << "_______________________\n"
+//            << "errorUl: " << errorUl << "\n"
+//            << "errorUr: " << errorUr << "\n"
+//            << "errorLr: " << errorLr << "\n"
+//            << "errorLl: " << errorLl << "\n";
+
+  // if there is a large shrink or expansion then just return true.
+  // You are probably not worried about error in bilinear interpolation
+  //
+  if((testScale > 256)||
+     (testScale < 1.0/256.0))
+  {
+     return true;
+  }
+
+  if(m_VulScale.hasNans()||
+     m_VurScale.hasNans()||
+     m_VlrScale.hasNans()||
+     m_VllScale.hasNans())
+  {
+    return result;
+  }
+
+//  std::cout << "ulScale: " << m_VulScale << "\n"
+//            << "urScale: " << m_VurScale << "\n"
+//            << "lrScale: " << m_VlrScale << "\n"
+//            << "llScale: " << m_VllScale << "\n";
+
+
+  // check overage power of 2 variance
+  // If there is a variance of 1 resolution level
+  // then we must split further
+  //
+  ossim_float64 averageUlScale = m_VulScale.length();
+  ossim_float64 averageUrScale = m_VurScale.length();
+  ossim_float64 averageLrScale = m_VlrScale.length();
+  ossim_float64 averageLlScale = m_VllScale.length();
+
+  // std::cout << "_________________________\n";
+  // std::cout << log(averageUlScale)/(log(2)) << "\n";
+  // std::cout << log(averageUrScale)/(log(2)) << "\n";
+  // std::cout << log(averageLrScale)/(log(2)) << "\n";
+  // std::cout << log(averageLlScale)/(log(2)) << "\n";
+
+
+  ossim_float64 ratio1 = averageUlScale/averageUrScale;
+  ossim_float64 ratio2 = averageUlScale/averageLrScale;
+  ossim_float64 ratio3 = averageUlScale/averageLlScale;
+
+  // std::cout << "_________________________\n";
+  // std::cout << "ratio1: " << ratio1 << "\n";
+  // std::cout << "ratio2: " << ratio2 << "\n";
+  // std::cout << "ratio3: " << ratio3 << "\n";
+
+  
+  // make sure all are within a power of 2 shrink or expand
+  // which means the range of each ratio should be 
+  // between .5 and 2
+  result = (((ratio1 < 2) && (ratio1 > 0.5))&&
+            ((ratio2 < 2) && (ratio2 > 0.5))&&
+            ((ratio3 < 2) && (ratio3 > 0.5))); 
+
+  //result = ((diff1<=2)&&(diff2<=2)&&(diff3<=2));
+  //std::cout << "DIFF1: " << diff1 << std::endl;
+  //std::cout << "DIFF2: " << diff2 << std::endl;
+  //std::cout << "DIFF3: " << diff3 << std::endl;
+
+
+  if(result)
+  {
+#if 1
+    ossimDpt vUpper, vRight, vBottom, vLeft, vCenter;
+    ossimDpt iUpper, iRight, iBottom, iLeft, iCenter;
+    ossimDpt testUpper, testRight, testBottom, testLeft, testCenter;
+
+    getViewMids(vUpper, vRight, vBottom, vLeft, vCenter);
+    getImageMids(iUpper, iRight, iBottom, iLeft, iCenter);
+    
+    // get the model centers for the mid upper left right bottom
+    m_transform->viewToImage(vCenter, testCenter);
+
+    if(testCenter.hasNans())
+    {
+       return false;
+    }
+
+    m_transform->viewToImage(vUpper, testUpper);
+    if(testCenter.hasNans())
+    {
+       return false;
+    }
+    m_transform->viewToImage(vRight, testRight);
+    if(testRight.hasNans())
+    {
+       return false;
+    }
+    m_transform->viewToImage(vBottom, testBottom);
+    if(testBottom.hasNans())
+    {
+       return false;
+    }
+    m_transform->viewToImage(vLeft, testLeft);
+    if(testLeft.hasNans())
+    {
+       return false;
+    }
+
+    // now get the model error to bilinear estimate of those points
+    double errorCheck1 = (testCenter - iCenter).length();
+    double errorCheck2 = (testUpper - iUpper).length();
+    double errorCheck3 = (testRight - iRight).length();
+    double errorCheck4 = (testBottom - iBottom).length();
+    double errorCheck5 = (testLeft - iLeft).length();
+    result = ((errorCheck1 < error)&&
+              (errorCheck2 < error)&&
+              (errorCheck3 < error)&&
+              (errorCheck4 < error)&&
+              (errorCheck5 < error));
+   // std::cout <<"__________________________\n"
+   //       << "ERROR1:" <<errorCheck1 << "\n" 
+   //       << "ERROR2:" <<errorCheck2 << "\n" 
+   //       << "ERROR3:" <<errorCheck3 << "\n" 
+   //       << "ERROR4:" <<errorCheck4 << "\n" 
+   //       << "ERROR5:" <<errorCheck5 << "\n"
+   //       << "SENS:  " << error <<  "\n"; 
+
+#else
+    ossimDpt vUpper, vRight, vBottom, vLeft, vCenter;
+    ossimDpt iUpper, iRight, iBottom, iLeft, iCenter;
+
+    ossimDpt testCenter;
+    getViewMids(vUpper, vRight, vBottom, vLeft, vCenter);
+    getImageMids(iUpper, iRight, iBottom, iLeft, iCenter);
+
+    ossimDpt iFullRes(iCenter.x*imageToViewScale.x,
+          iCenter.y*imageToViewScale.y);
+
+    m_transform->viewToImage(vCenter, testCenter);
+
+    if(testCenter.hasNans())
+    {
+       return false;
+    }
+    ossimDpt testFullRes(testCenter.x*imageToViewScale.x,
+             testCenter.y*imageToViewScale.y);
+
+    double errorCheck1 = (testFullRes - iFullRes).length();
+
+    iFullRes = ossimDpt(iUpper.x*imageToViewScale.x,
+            iUpper.y*imageToViewScale.y);
+
+    m_transform->viewToImage(vUpper, testCenter);
+    if(testCenter.hasNans())
+    {
+       return false;
+    }
+    testFullRes = ossimDpt(testCenter.x*imageToViewScale.x,
+         testCenter.y*imageToViewScale.y);
+    double errorCheck2 = (testFullRes - iFullRes).length();
+
+    iFullRes = ossimDpt(iRight.x*imageToViewScale.x,
+            iRight.y*imageToViewScale.y);
+
+    m_transform->viewToImage(vRight, testCenter);
+    if(testCenter.hasNans())
+    {
+       return false;
+    }
+    testFullRes = ossimDpt(testCenter.x*imageToViewScale.x,
+         testCenter.y*imageToViewScale.y);
+    double errorCheck3 = (testFullRes - iFullRes).length();
+
+    iFullRes = ossimDpt(iBottom.x*imageToViewScale.x,
+            iBottom.y*imageToViewScale.y);
+
+    m_transform->viewToImage(vBottom, testCenter);
+    if(testCenter.hasNans())
+    {
+       return false;
+    }
+    testFullRes = ossimDpt(testCenter.x*imageToViewScale.x,
+         testCenter.y*imageToViewScale.y);
+    double errorCheck4 = (testFullRes - iFullRes).length();
+
+    iFullRes = ossimDpt(iLeft.x*imageToViewScale.x,
+            iLeft.y*imageToViewScale.y);
+
+    m_transform->viewToImage(vLeft, testCenter);
+    testFullRes = ossimDpt(testCenter.x*imageToViewScale.x,
+         testCenter.y*imageToViewScale.y);
+    double errorCheck5 = (testFullRes - iFullRes).length();
+
+   std::cout <<"__________________________\n"
+         << "ERROR1:" <<errorCheck1 << "\n" 
+         << "ERROR2:" <<errorCheck2 << "\n" 
+         << "ERROR3:" <<errorCheck3 << "\n" 
+         << "ERROR4:" <<errorCheck4 << "\n" 
+         << "ERROR5:" <<errorCheck5 << "\n"
+         << "SENS:  " << error <<  "\n"; 
+
+    result = ((errorCheck1 < error)&&
+      (errorCheck2 < error)&&
+      (errorCheck3 < error)&&
+      (errorCheck4 < error)&&
+      (errorCheck5 < error));
+    // std::cout << "CAN INTERPOLATE? " << result <<"\n";
+#endif
+  }
+  return result;
+
+}
+
+void ossimImageRenderer::ossimRendererSubRectInfo::getViewMids(ossimDpt& upperMid,
+				     ossimDpt& rightMid,
+				     ossimDpt& bottomMid,
+				     ossimDpt& leftMid,
+				     ossimDpt& center)const
+{
+  
+  upperMid  = (m_Vul + m_Vur)*.5;
+  rightMid  = (m_Vur + m_Vlr)*.5;
+  bottomMid = (m_Vlr + m_Vll)*.5;
+  leftMid   = (m_Vul + m_Vll)*.5;
+  center    = (m_Vul + m_Vur + m_Vlr + m_Vll)*.25;
+}
+
+void ossimImageRenderer::ossimRendererSubRectInfo::getImageMids(ossimDpt& upperMid,
+				      ossimDpt& rightMid,
+				      ossimDpt& bottomMid,
+				      ossimDpt& leftMid,
+				      ossimDpt& center)const
+{
+  if(imageHasNans())
+  {
+    upperMid.makeNan();
+    rightMid.makeNan();
+    bottomMid.makeNan();
+    leftMid.makeNan();
+    center.makeNan();
+  }
+  else
+  {
+    upperMid  = (m_Iul + m_Iur)*.5;
+    rightMid  = (m_Iur + m_Ilr)*.5;
+    bottomMid = (m_Ilr + m_Ill)*.5;
+    leftMid   = (m_Iul + m_Ill)*.5;
+    center    = (m_Iul + m_Iur + m_Ilr + m_Ill)*.25;
+  }
+}
+
+ossimDpt ossimImageRenderer::ossimRendererSubRectInfo::getParametricCenter(const ossimDpt& ul, const ossimDpt& ur, 
+									   const ossimDpt& lr, const ossimDpt& ll)const
+{
+  ossimDpt top    = ur - ul;
+  ossimDpt bottom = lr - ll;
+  
+  ossimDpt centerTop = ul + top * .5;
+  ossimDpt centerBottom = ll + bottom * .5;
+
+  return centerBottom + (centerBottom - centerTop)*.5;
+}
+
+ossimImageRenderer::ossimImageRenderer()
+:
+ossimImageSourceFilter(),
+ossimViewInterface(0),
+m_Resampler(0),
+m_BlankTile(0),
+m_Tile(0),
+m_TemporaryBuffer(0),
+m_StartingResLevel(0),
+m_ImageViewTransform(0),
+m_inputR0Rect(),
+m_viewRect(),
+m_rectsDirty(true),
+m_MaxRecursionLevel(5),
+m_AutoUpdateInputTransform(true),
+m_MaxLevelsToCompute(999999) // something large so it will always compute
+{
+    ossimViewInterface::theObject = this;
+    m_Resampler = new ossimFilterResampler();
+    m_ImageViewTransform = new ossimImageViewProjectionTransform;
+}
+
+ossimImageRenderer::ossimImageRenderer(ossimImageSource* inputSource,
+                                       ossimImageViewTransform* imageViewTrans)
+   : ossimImageSourceFilter(inputSource),
+     ossimViewInterface(0),
+     m_Resampler(0),
+     m_BlankTile(0),
+     m_Tile(0),
+     m_TemporaryBuffer(0),
+     m_StartingResLevel(0),
+     m_ImageViewTransform(imageViewTrans),
+     m_inputR0Rect(),
+     m_viewRect(),
+     m_rectsDirty(true),
+     m_MaxRecursionLevel(5),
+     m_AutoUpdateInputTransform(true),
+     m_MaxLevelsToCompute(999999) // something large so it will always compute
+{
+   ossimViewInterface::theObject = this;
+   m_Resampler = new ossimFilterResampler();
+   if(!m_ImageViewTransform.valid())
+   {
+      m_ImageViewTransform = new ossimImageViewProjectionTransform;
+   }
+}
+
+ossimImageRenderer::~ossimImageRenderer()
+{
+  m_ImageViewTransform = 0;
+
+   if(m_Resampler)
+   {
+      delete m_Resampler;
+      m_Resampler = 0;
+   }
+}
+
+ossimRefPtr<ossimImageData> ossimImageRenderer::getTile(
+   const  ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+  // std::cout << "_________________________\n";
+   static const char MODULE[] = "ossimImageRenderer::getTile";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " Requesting view rect = "
+         << tileRect << endl;
+   }
+
+   // long w = tileRect.width();
+   // long h = tileRect.height();
+   // ossimIpt origin = tileRect.ul();
+   
+   if( !m_BlankTile.valid() || !m_Tile.valid() )
+   {
+      allocate();
+      if ( !m_BlankTile.valid() || !m_Tile.valid() )
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimImageRenderer::getTile tile allocation failure!\n"
+               << endl;
+         }
+         return ossimImageSourceFilter::getTile(tileRect, resLevel);
+      }
+   }
+
+   m_BlankTile->setImageRectangle(tileRect);
+   
+   if(!theInputConnection)
+   {
+      return m_BlankTile;
+   }
+   
+   if ( !isSourceEnabled()||(!m_ImageViewTransform.valid())||
+        (!m_ImageViewTransform->isValid()) )
+   {
+      // This tile source bypassed, return the input tile source.
+      return theInputConnection->getTile(tileRect, resLevel);  
+   }
+
+   if( m_rectsDirty )
+   {
+      initializeBoundingRects();
+
+      // We can't go on without these...
+      if ( m_rectsDirty )
+      {
+         return m_BlankTile;
+      }
+   }
+   
+   if(m_viewRect.width() < 4 && m_viewRect.height() < 4)
+   {
+      return m_BlankTile;
+   }
+
+   if( !theInputConnection || !m_viewRect.intersects(tileRect) )
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << "No intersection, Returning...." << endl;
+      }
+      return m_BlankTile;
+   }
+   
+   if(!m_Tile)
+   {
+      return theInputConnection->getTile(tileRect, resLevel);
+   }
+
+   // long tw = m_Tile->getWidth();
+   // long th = m_Tile->getHeight();
+   
+   m_Tile->setImageRectangle(tileRect);
+   m_Tile->makeBlank();
+ 
+
+  //if(!(m_viewArea.intersects(ossimPolyArea2d(tileRect))))
+  //{
+  //  return m_BlankTile;
+  //} 
+
+#if 0
+   // expand a small patch just to alleviate errors in the size of the rect when resampling
+     // ossimIrect viewRectClip = tileRect.clipToRect(ossimIrect(m_viewRect.ul() + ossimIpt(-8,-8),
+     //                                                          m_viewRect.lr() + ossimIpt(8,8)));
+   ossimIrect viewRectClip = tileRect.clipToRect(m_viewRect);
+   std::cout << "_____________________" << std::endl;
+   std::cout << "viewRectClip = " <<  viewRectClip << std::endl;
+//   std::cout << "tileRect = " <<  tileRect << std::endl;
+//   std::cout << "m_viewRect = " <<  m_viewRect << std::endl;
+   ossimRendererSubRectInfo subRectInfo(viewRectClip.ul(),
+                                        viewRectClip.ur(),
+                                        viewRectClip.lr(),
+                                        viewRectClip.ll());
+#else
+   ossimRendererSubRectInfo subRectInfo(m_ImageViewTransform.get(),
+                                        tileRect.ul(),
+                                        tileRect.ur(),
+                                        tileRect.lr(),
+                                        tileRect.ll());
+
+
+#endif
+   subRectInfo.m_viewBounds = &m_viewArea;
+   subRectInfo.transformViewToImage();
+
+   if((!m_viewArea.intersects(subRectInfo.getViewRect())))
+   {
+     return m_BlankTile;
+   }
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " image rect = " << subRectInfo.getImageRect() << std::endl;
+   }
+
+   // If the image rect is completely outside of the valid image, there is no need to resample:
+   // (OLK 11/18)
+//   if ((!subRectInfo.imageHasNans())&&!m_inputR0Rect.intersects(subRectInfo.getImageRect()))
+//   {
+//      return m_Tile;
+//   }
+   recursiveResample(m_Tile, subRectInfo, 1);
+   
+   if(m_Tile.valid())
+   {
+      m_Tile->validate();
+   }
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << "Returning...." << endl;
+   }
+   return m_Tile;
+}
+
+void ossimImageRenderer::recursiveResample(ossimRefPtr<ossimImageData> outputData,
+                                           const ossimRendererSubRectInfo& rectInfo,
+                                           ossim_uint32 level)
+{
+   ossimIrect tempViewRect = rectInfo.getViewRect();
+   //std::cout << rectInfo << std::endl;
+   if(rectInfo.imageIsNan())
+   {
+    if(!rectInfo.tooBig()) return;
+   } 
+
+  if(tempViewRect.width() <2 &&
+      tempViewRect.height() <2)
+  {
+      if(!rectInfo.imageHasNans())
+      {
+         fillTile(outputData,
+                  rectInfo);
+      }
+      return;
+  }
+  //
+  std::vector<ossimRendererSubRectInfo> splitRects;
+  rectInfo.splitView(splitRects);
+
+//std::cout << "SHOULD BE SPLITTING: " << splitRects.size() <<"\n";
+  ossim_uint32 idx = 0;
+  if(!splitRects.empty())
+  {
+   // std::cout << "SPLITTING " << level << ", " << tempViewRect << "\n";
+    for(idx = 0; idx < splitRects.size();++idx)
+    {
+      recursiveResample(outputData,
+                        splitRects[idx],
+                        level + 1);
+    }
+  }
+  else if(!rectInfo.imageHasNans())
+  {
+    fillTile(outputData,
+            rectInfo);
+  }
+}
+
+#define RSET_SEARCH_THRESHHOLD 0.1
+
+void ossimImageRenderer::fillTile(ossimRefPtr<ossimImageData> outputData,
+                                  const ossimRendererSubRectInfo& rectInfo)
+{
+   if(!outputData.valid() || !outputData->getBuf() || rectInfo.imageHasNans())
+   {
+      return;
+   }
+   ossimDrect vrect = rectInfo.getViewRect();
+   
+   ossimDpt imageToViewScale = rectInfo.getAbsValueImageToViewScales();
+   
+   if(imageToViewScale.hasNans()) return;
+   
+   ossimDpt tile_size = ossimDpt(vrect.width(), vrect.height());
+   double kernelSupportX, kernelSupportY;
+   
+   double resLevelX = log( 1.0 / imageToViewScale.x )/ log( 2.0 );
+   double resLevelY = log( 1.0 / imageToViewScale.y )/ log( 2.0 );
+   double resLevel0 = resLevelX < resLevelY ? resLevelX : resLevelY;
+   long closestFitResLevel = (long)floor( resLevel0 );
+   
+   //double averageScale = (imageToViewScale.x + imageToViewScale.y) / 2.0;
+   //long closestFitResLevel = (long)floor( log( 1.0 / averageScale )/ log( 2.0 ) );
+   
+   ossim_uint32 resLevel = closestFitResLevel<0 ? 0:closestFitResLevel;
+   resLevel += m_StartingResLevel;
+
+   //---
+   // ESH 02/2009: If requested resLevel is too high, let's lower it to one
+   // that is ok.
+   //---
+#if 0
+   const ossim_uint32 NUM_LEVELS = theInputConnection->getNumberOfDecimationLevels();
+   if ( (NUM_LEVELS > 0) && (resLevel >=  NUM_LEVELS) )
+   {
+      resLevel = NUM_LEVELS - 1;
+   }
+#endif
+   //---
+   // ESH 11/2008: Check the rset at the calculated resLevel to see
+   // if it has the expected decimation factor. It it does, we can 
+   // use this rset and assume it is at resLevel.
+   //--- 
+   ossimDpt decimation;
+   decimation.makeNan(); // initialize to nan.
+   theInputConnection->getDecimationFactor(resLevel, decimation);
+   double requestScale = 1.0 / (1<<resLevel);
+   double closestScale = decimation.hasNans() ? requestScale : decimation.x;
+
+#if 0
+   double differenceTest = 0.0;
+   if (closestScale != 0.0)
+   {
+      differenceTest = (1.0/closestScale) - (1.0/requestScale);
+   }
+
+   //---
+   // ESH 11/2008: Add in threshold test so search only happens when 
+   //              necessary.
+   // We do an rset search if 1 of 2 conditions is met: either
+   //   1) the rset is really different in size from the requested size, or
+   //   2) they're similar in size, and the actual rset is smaller than 
+   //      the requested size.
+   //---
+   if ( (fabs(differenceTest) > RSET_SEARCH_THRESHHOLD) || 
+        ((fabs(differenceTest) < RSET_SEARCH_THRESHHOLD) &&
+         (differenceTest < 0.0) ) )
+   {
+      //---
+      // ESH 11/2008: We test for the best rset. We assume 
+      // that decimation level always decreases as resLevel increases, so 
+      // the search can end before testing all rsets.
+      //---
+      ossim_uint32 savedResLevel = resLevel;
+      closestScale = 1.0; // resLevel 0
+      resLevel = 0;
+      ossim_uint32 i;
+      for( i=1; i<NUM_LEVELS; ++i )
+      {
+         theInputConnection->getDecimationFactor(i, decimation);
+         if(decimation.hasNans() == false )
+         {
+            double testDiscrepancy = decimation.x - requestScale;
+            if ( testDiscrepancy < 0.0 ) // we're done
+            {
+               break;
+            }
+            else
+            {
+               closestScale = decimation.x;
+               resLevel = i;
+            }
+         }
+         else // use the default value
+         {
+            closestScale = requestScale;
+            resLevel = savedResLevel;
+            break;
+         }
+      }
+   }
+#endif
+   ossimDpt nul(rectInfo.m_Iul.x*closestScale,
+                rectInfo.m_Iul.y*closestScale);
+   ossimDpt nll(rectInfo.m_Ill.x*closestScale,
+                rectInfo.m_Ill.y*closestScale);
+   ossimDpt nlr(rectInfo.m_Ilr.x*closestScale,
+                rectInfo.m_Ilr.y*closestScale);
+   ossimDpt nur(rectInfo.m_Iur.x*closestScale,
+                rectInfo.m_Iur.y*closestScale);
+   
+   m_Resampler->getKernelSupport( kernelSupportX, kernelSupportY );
+   
+   ossimDrect boundingRect = ossimDrect( nul, nll, nlr, nur );
+   
+
+   boundingRect = ossimIrect((ossim_int32)floor(boundingRect.ul().x - (kernelSupportX)-.5),
+                             (ossim_int32)floor(boundingRect.ul().y - (kernelSupportY)-.5),
+                             (ossim_int32)ceil (boundingRect.lr().x + (kernelSupportX)+.5),
+                             (ossim_int32)ceil (boundingRect.lr().y + (kernelSupportY)+.5));
+   
+   ossimDrect requestRect = boundingRect;
+   
+   ossimRefPtr<ossimImageData> data = getTileAtResLevel(requestRect, resLevel);
+   
+   ossimDataObjectStatus status = OSSIM_NULL;
+   if( data.valid() )
+   {
+      status = data->getDataObjectStatus();
+   }
+   if( (status == OSSIM_NULL) || (status == OSSIM_EMPTY) )
+   {
+      return;
+   }
+   
+   if((boundingRect.width() <2)&&(boundingRect.height()<2))
+   {
+              
+//    return;
+   }// std::cout << "SMALL RECT!!!!!!\n";
+   else
+   {
+     ossimDrect inputRect = m_inputR0Rect;
+     inputRect = inputRect*ossimDpt(closestScale, closestScale);
+     m_Resampler->setBoundingInputRect(inputRect);
+     
+     double denominatorY = 1.0;
+     if(tile_size.y > 2)
+     {
+        denominatorY = tile_size.y-1.0;
+     }
+     
+     ossimDpt newScale( imageToViewScale.x / closestScale,
+                       imageToViewScale.y / closestScale );
+     m_Resampler->setScaleFactor(newScale);
+     
+
+  //std::cout << "SPLIT VIEW RECT: " << vrect << std::endl;
+  //std::cout << "VIEW RECT: " << outputData->getImageRectangle() << std::endl;
+
+
+     m_Resampler->resample(data,
+                           outputData,
+                           vrect,
+                           nul,
+                           nur,
+                           ossimDpt( ( (nll.x - nul.x)/denominatorY ),
+                                     ( (nll.y - nul.y)/denominatorY ) ),
+                           ossimDpt( ( (nlr.x - nur.x)/denominatorY ),
+                                     ( (nlr.y - nur.y)/denominatorY ) ),
+                           tile_size);
+   }
+   
+}
+
+long ossimImageRenderer::computeClosestResLevel(const std::vector<ossimDpt>& decimationFactors,
+                                                double scale)const
+{
+   long result = 0;
+   long upper  = (long)decimationFactors.size();
+   bool done   = false;
+   
+   if(upper > 1)
+   {
+      while((result < upper)&&!done)
+      {
+         if(scale < decimationFactors[result].x)
+         {
+            ++result;
+         }
+         else
+         {
+            done = true;
+         }
+      }
+      
+      // now use the higher res level and resample down
+      //
+      if(result)
+      {
+         --result;
+      }
+   }
+   return result;
+}
+
+ossimIrect ossimImageRenderer::getBoundingRect(ossim_uint32 resLevel)const
+{
+   //---
+   // 01 November 2011:
+   // Backed out expand code as the ossimImageViewProjectionTransform::getImageToViewBounds
+   // does not handle image on the edge of international date line. D. Burken
+   //---
+   
+   // The input bounding rect as returned here corresponds to "pixel-is-point", i.e., the center
+   // of the pixel area for the corners and not the edges which extend 1/2 pixel in all 
+   // directions. Because the view is probably a different GSD, first expand the input
+   // bounding rect to the edge before transforming to a view rect. Then shrink the view rect by
+   // 1/2 pixel to get it to the pixel center (OSSIM convention for bounding rect -- this may 
+   // need to be revisited in light of the need to match edges, not pixel centers, OLK 09/11).
+
+   // Code functionality moved to below method. (drb - 08 Nov. 2011)
+   
+   ossimIrect result;
+   getBoundingRect( result, resLevel );
+   return result;
+}
+
+void ossimImageRenderer::getBoundingRect(ossimIrect& rect, ossim_uint32 resLevel) const
+{
+   if ( isSourceEnabled() )
+   {
+      rect = m_viewRect;
+   }
+   else if ( theInputConnection )
+   {
+      rect = theInputConnection->getBoundingRect(resLevel);
+   }
+   else
+   {
+      rect.makeNan();
+   }
+
+#if 0 /* Please leave for debug. */
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimImageRenderer::getBoundingRect(rect, resLevel) debug:\nbounds  = "
+         << rect << "\n";
+   }
+#endif  
+}
+
+void ossimImageRenderer::initializeBoundingRects()
+{
+   m_rectsDirty = true;
+   
+   // Get the input bounding rect:
+   if ( theInputConnection && m_ImageViewTransform.valid())
+   {
+      m_inputR0Rect = theInputConnection->getBoundingRect(0);
+      if (!m_inputR0Rect.hasNans() )
+      {
+         // This will call ossim::round<int> on the dpt's.
+         m_viewRect = m_ImageViewTransform->getImageToViewBounds(m_inputR0Rect);
+         if ( m_viewRect.hasNans() == false )
+         {
+            // Clear the dirty flag:
+            m_rectsDirty = false;
+         }
+         
+         // now get a coarse estimate of the boundary poly
+         ossimDpt uli = m_inputR0Rect.ul();
+         ossimDpt uri = m_inputR0Rect.ur();
+         ossimDpt lri = m_inputR0Rect.lr();
+         ossimDpt lli = m_inputR0Rect.ll();
+         ossim_int32 stepSize = 50;
+
+         std::vector<ossimDpt> poly;
+
+         ossimDpt deltaUpper = (uri-uli)*(1.0/stepSize);
+         ossimDpt deltaRight = (lri-uri)*(1.0/stepSize);
+         ossimDpt deltaLower = (lli-lri)*(1.0/stepSize);
+         ossimDpt deltaLeft  = (uli-lli)*(1.0/stepSize);
+
+         ossimDpt p;
+         ossim_int32 idx = 0;
+         ossimDpt initialPoint= uli;
+
+         for(idx = 0; idx < stepSize;++idx)
+         {
+            m_ImageViewTransform->imageToView(initialPoint, p);
+            if(!p.hasNans())
+            {
+               poly.push_back(p);
+            }
+            initialPoint.x+=deltaUpper.x;
+            initialPoint.y+=deltaUpper.y;
+         }
+
+         initialPoint= uri;
+         for(idx = 0; idx < stepSize;++idx)
+         {
+            m_ImageViewTransform->imageToView(initialPoint, p);
+            if(!p.hasNans())
+            {
+               poly.push_back(p);
+            }
+            initialPoint.x+=deltaRight.x;
+            initialPoint.y+=deltaRight.y;
+         }
+
+         initialPoint= lri;
+         for(idx = 0; idx < stepSize;++idx)
+         {
+            m_ImageViewTransform->imageToView(initialPoint, p);
+            if(!p.hasNans())
+            {
+               poly.push_back(p);
+            }
+            initialPoint.x+=deltaLower.x;
+            initialPoint.y+=deltaLower.y;
+         }
+
+         initialPoint= lli;
+         for(idx = 0; idx < stepSize;++idx)
+         {
+            m_ImageViewTransform->imageToView(initialPoint, p);
+            if(!p.hasNans())
+            {
+               poly.push_back(p);
+            }
+            initialPoint.x+=deltaLeft.x;
+            initialPoint.y+=deltaLeft.y;
+         }
+
+         // Close the polygon and set the view area:
+         if (poly.size() >= 4)
+         {
+            poly.push_back(poly[0]);
+            m_viewArea = ossimPolyArea2d(ossimPolygon(poly));
+         }
+      }
+      
+      //ossimPolyArea2d testPolyarea = polyArea&ossimPolyArea2d(tileRect);
+   }
+
+   if ( m_rectsDirty )
+   {
+      m_viewRect.makeNan();
+   }
+   
+#if 0 /* Please leave for debug. */
+   ossimNotify(ossimNotifyLevel_DEBUG)
+      << "ossimImageRenderer::initializeBoundingRects() debug:\n"
+      << "\ninput rect: " << m_inputR0Rect
+      << "\nview rect:  " << m_viewRect << endl;
+#endif
+}
+
+void ossimImageRenderer::initialize()
+{
+   // Call the base class initialize.
+   // Note:  This will reset "theInputConnection" if it changed...
+   ossimImageSourceFilter::initialize();
+
+   deallocate();
+
+   m_rectsDirty = true;
+
+   // we will only do this if we are enabled for this could be expensive
+   if (m_ImageViewTransform.valid() && !m_ImageViewTransform->isValid() && isSourceEnabled())
+   {
+      checkIVT(); // This can initialize bounding rects and clear dirty flag.
+   }
+
+   if ( m_rectsDirty )
+   {
+      initializeBoundingRects();
+   }
+}
+
+void ossimImageRenderer::deallocate()
+{
+   m_Tile            = 0;
+   m_BlankTile       = 0;
+   m_TemporaryBuffer = 0;
+}
+
+void ossimImageRenderer::allocate()
+{
+   deallocate();
+
+   if(theInputConnection)
+   {
+      m_Tile = ossimImageDataFactory::instance()->create(this, this);
+      m_BlankTile  = ossimImageDataFactory::instance()->create(this, this);
+      
+      m_Tile->initialize();
+   }
+}
+
+bool ossimImageRenderer::saveState(ossimKeywordlist& kwl,
+                                   const char* prefix)const
+{
+   if(m_ImageViewTransform.valid())
+   {
+      ossimString newPrefix = ossimString(prefix) + ossimString("image_view_trans.");
+      
+      m_ImageViewTransform->saveState(kwl, newPrefix.c_str());
+   }
+   if(m_Resampler)
+   {
+      m_Resampler->saveState(kwl,
+                              (ossimString(prefix)+"resampler.").c_str());
+   }
+   kwl.add(prefix,
+           "max_levels_to_compute",
+           m_MaxLevelsToCompute);
+   
+   return ossimImageSource::saveState(kwl, prefix);
+}
+
+bool ossimImageRenderer::loadState(const ossimKeywordlist& kwl,
+                                   const char* prefix)
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimImageRenderer::loadState entered..." << endl;
+      
+#ifdef OSSIM_ID_ENABLED
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "OSSIM_ID:  " << OSSIM_ID << endl;
+#endif      
+   }
+   
+   ossimString newPrefix = ossimString(prefix) + ossimString("image_view_trans.");
+   bool result = ossimImageSourceFilter::loadState(kwl, prefix);
+   
+   if(m_Resampler)
+   {
+      m_Resampler->loadState(kwl,
+                              (ossimString(prefix)+"resampler.").c_str());
+   }
+   m_ImageViewTransform = 0;
+   m_ImageViewTransform = ossimImageViewTransformFactory::instance()->createTransform(kwl, newPrefix.c_str());
+   if(!m_ImageViewTransform)
+   {
+      m_ImageViewTransform = new ossimImageViewProjectionTransform;
+   }
+   const char* maxLevelsToCompute = kwl.find(prefix,
+                                             "max_levels_to_compute");
+   if(maxLevelsToCompute)
+   {
+      m_MaxLevelsToCompute = ossimString(maxLevelsToCompute).toUInt32();
+   }
+   
+   return result;
+}
+
+void ossimImageRenderer::setImageViewTransform(ossimImageViewTransform* ivt)
+{
+   m_ImageViewTransform = ivt;
+   
+   m_rectsDirty = true; // Want to recompute bounding rects.
+   
+   if ( m_ImageViewTransform.valid() && !m_ImageViewTransform->isValid() && isSourceEnabled() )
+   {
+      checkIVT(); // This can initialize bounding rects and clear dirty flag.
+   }
+   
+   if ( m_rectsDirty ) 
+   {
+      initializeBoundingRects();
+   }
+}
+
+bool ossimImageRenderer::setView(ossimObject* baseObject)
+{
+   bool new_view_set = false;
+   if(m_ImageViewTransform.valid())
+   {
+      new_view_set = m_ImageViewTransform->setView(baseObject);
+
+      // If view changes reset the bounding rects.
+      initializeBoundingRects();
+   }
+   return new_view_set;
+}
+
+ossimObject* ossimImageRenderer::getView()
+{
+   if(m_ImageViewTransform.valid())
+   {
+      return m_ImageViewTransform->getView();
+   }
+   return 0;
+}
+
+const ossimObject* ossimImageRenderer::getView()const
+{
+   if(m_ImageViewTransform.valid())
+   {
+      return m_ImageViewTransform->getView();
+   }
+   return 0;
+}
+
+void ossimImageRenderer::getValidImageVertices(vector<ossimIpt>& validVertices,
+                                               ossimVertexOrdering ordering,
+                                               ossim_uint32 resLevel)const
+{
+   if(theInputConnection&&m_ImageViewTransform.valid()&&m_ImageViewTransform->isValid())
+   {
+      theInputConnection->getValidImageVertices(validVertices, ordering, resLevel);
+      if(isSourceEnabled())
+      {
+         ossim_uint32 inputSize = (ossim_uint32)validVertices.size();
+         if(inputSize)
+         {
+            ossimDpt viewPt;
+            ossim_uint32 idx = 0;
+            // transform each point to the view
+            for(idx = 0; idx < inputSize; ++idx)
+            {
+               m_ImageViewTransform->imageToView(validVertices[idx], viewPt);
+               
+               // round it to the nearest pixel
+               //
+               validVertices[idx] = ossimIpt(viewPt);
+            }
+         }
+      }
+   }
+}
+
+//*************************************************************************************************
+// Returns the geometry associated with the image being served out of the renderer. This
+// corresponds to the view geometry defined in theIVT.
+//*************************************************************************************************
+ossimRefPtr<ossimImageGeometry> ossimImageRenderer::getImageGeometry()
+{
+   // Make sure the IVT was properly initialized
+   if (m_ImageViewTransform.valid() && !m_ImageViewTransform->isValid())
+      checkIVT();
+
+   ossimImageViewProjectionTransform* ivpt = PTR_CAST(ossimImageViewProjectionTransform, 
+                                                      m_ImageViewTransform.get());
+   if (ivpt)
+   {
+      // we need to return the right side since the geometry changed to a view geometry
+      return ivpt->getViewGeometry();
+   }
+
+   return ossimRefPtr<ossimImageGeometry>();
+}
+
+void ossimImageRenderer::connectInputEvent(ossimConnectionEvent& /* event */)
+{
+   theInputConnection = PTR_CAST(ossimImageSource, getInput(0));
+   if(!m_ImageViewTransform.valid())
+      m_ImageViewTransform  = new ossimImageViewProjectionTransform;
+   
+   checkIVT();
+   initialize();
+}
+
+void ossimImageRenderer::disconnectInputEvent(ossimConnectionEvent& /* event */)
+{
+   ossimImageViewProjectionTransform* ivpt = PTR_CAST(ossimImageViewProjectionTransform,
+                                                      m_ImageViewTransform.get());
+   if(ivpt)
+      ivpt->setImageGeometry(0);
+   
+   theInputConnection = 0;
+}
+
+void ossimImageRenderer::propertyEvent(ossimPropertyEvent& /* event */)
+{
+   checkIVT();
+   initialize();
+}
+
+void ossimImageRenderer::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   ossimString tempName = property->getName();
+   
+   if((tempName == "Filter type")||
+      (tempName == "filter_type"))
+   {
+      if(m_Resampler)
+      {
+         m_Resampler->setFilterType(property->valueToString());
+      }
+   }
+   //   else if(tempName == "Blur factor")
+   //     {
+   //       if(m_Resampler)
+   // 	{
+   // 	  m_Resampler->setBlurFactor(property->valueToString().toDouble());
+   // 	}
+   //     }
+   else
+   {
+      ossimImageSourceFilter::setProperty(property);
+   }
+}
+      
+ossimRefPtr<ossimProperty> ossimImageRenderer::getProperty(const ossimString& name)const
+{
+   ossimString tempName = name;
+   
+   if((tempName == "Filter type")||
+      (tempName == "filter_type"))
+   {
+      std::vector<ossimString> filterNames;
+      m_Resampler->getFilterTypes(filterNames);
+      
+      ossimStringProperty* stringProp = new ossimStringProperty("filter_type",
+								m_Resampler->getMinifyFilterTypeAsString(),
+								false,
+								filterNames);
+      stringProp->clearChangeType();
+      stringProp->setReadOnlyFlag(false);
+      stringProp->setCacheRefreshBit();
+      
+      return stringProp;
+   }
+//   else if(tempName == "Blur factor")
+//   {
+//      ossimNumericProperty* numericProperty = new ossimNumericProperty("Blur factor",
+//                                                                       ossimString::toString((double)m_Resampler->getBlurFactor()));
+   
+//      numericProperty->setConstraints(0.0, 50.0);
+//      numericProperty->setNumericType(ossimNumericProperty::ossimNumericPropertyType_FLOAT64);
+//      numericProperty->setCacheRefreshBit();
+   
+//      return numericProperty;
+//   }
+   
+   return ossimImageSourceFilter::getProperty(name);
+}
+
+void ossimImageRenderer::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+  ossimImageSourceFilter::getPropertyNames(propertyNames);
+
+  propertyNames.push_back("Filter type");
+//  propertyNames.push_back("Blur factor");
+}
+
+//*************************************************************************************************
+// Insures that a proper IVT is established.
+//*************************************************************************************************
+void ossimImageRenderer::checkIVT()
+{
+   if(!isSourceEnabled())
+      return;
+
+   // Check validity of the IVT:
+   if (m_ImageViewTransform->isValid())
+      return;
+
+   // Detected uninitialized IVT. We are only concerned with projection IVTs (IVPTs) so 
+   // make sure that's what we're working with:
+   ossimImageViewProjectionTransform* ivpt = 
+      PTR_CAST(ossimImageViewProjectionTransform, m_ImageViewTransform.get());
+   ossimImageSource* inputSrc = PTR_CAST(ossimImageSource, getInput(0));
+
+   if(!ivpt || !inputSrc) 
+      return; // nothing to do here yet.
+
+   // Fetch the input image geometry from the IVPT to see if one needs to be established:
+   ossimRefPtr<ossimImageGeometry> inputGeom = ivpt->getImageGeometry();
+   if ( !inputGeom )
+   {
+      // Ask the input source for a geometry:
+      inputGeom = inputSrc->getImageGeometry();
+      if ( !inputGeom )
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)<<"ossimImageRenderer::checkTransform() -- "
+            "No input image geometry could be established for this renderer."<<endl;
+         }
+         return;
+      }
+      ivpt->setImageGeometry( inputGeom.get() );
+      m_rectsDirty = true;
+   }
+
+   // Now check the output view geometry:
+   ossimRefPtr<ossimImageGeometry> outputGeom = ivpt->getViewGeometry();
+   if (!outputGeom)
+   {
+      ossimRefPtr<ossimImageGeometry> myOutGeom = new ossimImageGeometry;
+
+      //---
+      // If the input geometry sports a map projection instead of a 3D
+      // projector, use the same map projection for the view.
+      // 
+      // Note: Don't use map projections with model transforms as they don't
+      // allow for changing resolution.
+      //---
+      const ossimProjection*  inputProj = inputGeom->getProjection();
+      const ossimMapProjection* mapProj = PTR_CAST(ossimMapProjection, inputProj);
+      if (mapProj && !mapProj->hasModelTransform() )
+      {
+         ossimProjection* my_proj = PTR_CAST(ossimProjection, mapProj->dup());
+         myOutGeom->setProjection(my_proj);
+      }
+      else 
+      {
+         // The input geometry uses a 3D projection, so let's default here to a
+         // ossimEquDistCylProjection for the view:
+         ossimMapProjection* myMapProj = new ossimEquDistCylProjection;
+         ossimDpt meters = inputGeom->getMetersPerPixel();
+         double GSD = (meters.x + meters.y)/2.0;
+         meters.x = GSD;
+         meters.y = GSD;
+         if(inputProj)
+         {
+            //---
+            // Update the map projection.  Since ossimMapProjection::setOrigin calls
+            // ossimMapProjection::update we do that before setUlTiePoints as it in
+            // turn calls setUlEastingNorthing(forward(gpt)) which depends on the orgin.
+            //---
+            myMapProj->setOrigin(inputProj->origin());
+            myMapProj->setUlTiePoints( inputProj->origin() );
+
+         }
+         myMapProj->setMetersPerPixel(meters);
+         myOutGeom->setProjection(myMapProj);
+      }
+      
+      // Set up our IVT with the new output geometry:
+      ivpt->setViewGeometry(myOutGeom.get());
+
+      // Must reinitialize bounding rects before calling ossimImageGeometry::setImageSize().
+      initializeBoundingRects();
+
+      // Set the size on the ossimImageGeometry.
+      ossimIrect rect;
+      getBoundingRect(rect, 0);
+      myOutGeom->setImageSize( rect.size() );
+   }
+
+   if ( m_rectsDirty )
+   {
+      initializeBoundingRects();
+   }
+}
+
+void ossimImageRenderer::getDecimationFactor(ossim_uint32 resLevel,
+					     ossimDpt& result)const
+{
+   if(isSourceEnabled())
+   {
+      result = ossimDpt(1,1);
+   }
+   else
+   {
+      ossimImageSourceFilter::getDecimationFactor(resLevel,
+						  result);
+   }
+}
+
+void ossimImageRenderer::getDecimationFactors(vector<ossimDpt>& decimations)const
+{
+   if(isSourceEnabled())
+   {
+      decimations.push_back(ossimDpt(1,1));
+   }
+   else
+   {
+      ossimImageSourceFilter::getDecimationFactors(decimations);
+   }
+}
+
+ossim_uint32 ossimImageRenderer::getNumberOfDecimationLevels()const
+{
+   if(isSourceEnabled())
+   {
+      return 1;
+   }
+   
+   return ossimImageSourceFilter::getNumberOfDecimationLevels();
+}
+
+void ossimImageRenderer::stretchQuadOut(const ossimDpt& amount,
+                                        ossimDpt& ul,
+                                        ossimDpt& ur,
+                                        ossimDpt& lr,
+                                        ossimDpt& ll)
+{
+   ossimDpt upper  = ur - ul;
+   ossimDpt right  = lr - ur;
+   ossimDpt bottom = ll - lr;
+   ossimDpt left   = ul - ll;
+   
+   upper = (upper*(1.0 / upper.length()));
+   upper.x *= amount.x;
+   upper.y *= amount.y;
+   right = (right*(1.0 / right.length()));
+   right.x *= amount.x;
+   right.y *= amount.y;
+   bottom = (bottom*(1.0 / bottom.length()));
+   bottom.x *= amount.x;
+   bottom.y *= amount.y;
+   left = (left*(1.0 / left.length()));
+   left.x *= amount.x;
+   left.y *= amount.y;
+   
+   
+   ul = ul - upper + left;
+   ur = ur + upper - right;
+   lr = lr + left - bottom;
+   ll = ll - left + bottom;
+}
+
+ossimRefPtr<ossimImageData>  ossimImageRenderer::getTileAtResLevel(const ossimIrect& boundingRect,
+                                                       ossim_uint32 resLevel)
+{
+   if(!theInputConnection)
+   {
+      m_BlankTile->setImageRectangle(boundingRect);
+      
+      return m_BlankTile;
+   }
+   
+   ossim_uint32 levels = theInputConnection->getNumberOfDecimationLevels();
+   
+   // ossim_uint32 maxValue = (ossim_uint32)ossim::max((ossim_uint32)m_BoundingRect.width(),
+   //                                            (ossim_uint32)m_BoundingRect.height());
+   if(resLevel == 0)
+   {
+      return theInputConnection->getTile(boundingRect);
+   }
+   if(resLevel < levels)
+   {
+      if(theInputConnection)
+      {
+         return theInputConnection->getTile(boundingRect,
+                                            resLevel);
+      }
+      else
+      {
+         return m_BlankTile;
+      }
+   }
+   else if((resLevel - levels) < m_MaxLevelsToCompute)
+   {
+      // check to see how many decimations we must achiev for the
+      // request
+      //
+      int decimations = (resLevel - (levels-1));
+      ossimIpt tileSize(theInputConnection->getTileWidth(),
+                        theInputConnection->getTileHeight());
+      
+      ossim_int32 multiplier = (1 << decimations);
+      
+      ossim_int32 xIndex = 0;
+      ossim_int32 yIndex = 0;
+      
+      // adjust the tilesize so it at least will cover the multiplier
+      // We will probably come up with something better later but for now
+      // this will do.
+      if(multiplier > tileSize.x)
+      {
+         tileSize.x = multiplier;
+      }
+      if(multiplier > tileSize.y)
+      {
+         tileSize.y = multiplier;
+      }
+      
+      // set the rect that covers the requested RLevel to the valid RLevel. 
+      // the valid RLevel is what is available on the input side.
+      //
+      ossimIrect requestedRectAtValidRLevel = boundingRect;
+      requestedRectAtValidRLevel.stretchToTileBoundary(tileSize);
+      ossimIrect mappedRequestedRect = requestedRectAtValidRLevel;
+      requestedRectAtValidRLevel  = requestedRectAtValidRLevel*((double)multiplier);
+      
+      if(!m_TemporaryBuffer)
+      {
+         m_TemporaryBuffer = (ossimImageData*)m_BlankTile->dup();
+         m_TemporaryBuffer->setImageRectangle(mappedRequestedRect);
+         m_TemporaryBuffer->initialize();
+      }
+      else
+      {
+         m_TemporaryBuffer->setImageRectangle(mappedRequestedRect);
+         m_TemporaryBuffer->makeBlank();
+      }
+      
+     // ossim_uint32 totalCount   = ((requestedRectAtValidRLevel.lr().y-requestedRectAtValidRLevel.ul().y)*
+   //                                (requestedRectAtValidRLevel.lr().x-requestedRectAtValidRLevel.ul().x));
+      ossim_uint32 currentCount = 0;
+      ossimIrect boundingRect = theInputConnection->getBoundingRect(levels-1);
+      for(yIndex = requestedRectAtValidRLevel.ul().y;yIndex < requestedRectAtValidRLevel.lr().y; yIndex += tileSize.y)
+      {
+         for(xIndex = requestedRectAtValidRLevel.ul().x; xIndex < requestedRectAtValidRLevel.lr().x; xIndex+=tileSize.x)
+         {
+            ossimIrect request(xIndex,
+                               yIndex,
+                               xIndex + (tileSize.x-1),
+                               yIndex + (tileSize.y-1));
+            ossimRefPtr<ossimImageData> data = theInputConnection->getTile(request, levels-1);
+            
+            if(data.valid() && (data->getDataObjectStatus()!=OSSIM_EMPTY)&&
+               data->getBuf()&&
+               boundingRect.intersects(request))
+            {
+               switch(data->getScalarType())
+               {
+                  case OSSIM_UINT8:
+                  {
+                     resampleTileToDecimation((ossim_uint8)0,
+                                              m_TemporaryBuffer,
+                                              data,
+                                              multiplier);
+                     break;
+                  }
+                  case OSSIM_SINT16:
+                  {
+                     resampleTileToDecimation((ossim_sint16)0,
+                                              m_TemporaryBuffer,
+                                              data,
+                                              multiplier);
+                     break;
+                  }
+                  case OSSIM_UINT16:
+                  case OSSIM_USHORT11:
+                  {
+                     resampleTileToDecimation((ossim_uint16)0,
+                                              m_TemporaryBuffer,
+                                              data,
+                                              multiplier);
+                     break;
+                  }
+                  case OSSIM_FLOAT32:
+                  case OSSIM_NORMALIZED_FLOAT:
+                  {
+                     resampleTileToDecimation((ossim_float32)0,
+                                              m_TemporaryBuffer,
+                                              data,
+                                              multiplier);
+                     break;
+                  }
+                  case OSSIM_FLOAT64:
+                  case OSSIM_NORMALIZED_DOUBLE:
+                  {
+                     resampleTileToDecimation((ossim_float64)0,
+                                              m_TemporaryBuffer,
+                                              data,
+                                              multiplier);
+                     break;
+                  }
+                  case OSSIM_SCALAR_UNKNOWN:
+                  default:
+                  {
+                     break;
+                  }
+               }
+            }
+            ++currentCount;
+         }
+      }
+      m_TemporaryBuffer->validate();
+      return m_TemporaryBuffer;
+   }
+
+   return 0;
+}
+
+void ossimImageRenderer::setMaxLevelsToCompute(ossim_uint32 maxLevels)
+{
+   m_MaxLevelsToCompute = maxLevels;
+}
+
+ossim_uint32 ossimImageRenderer::getMaxLevelsToCompute()const
+{
+   return m_MaxLevelsToCompute;
+}
+
+template <class T>
+void ossimImageRenderer::resampleTileToDecimation(T /* dummyVariable */,
+						  ossimRefPtr<ossimImageData> result,
+						  ossimRefPtr<ossimImageData> tile,
+						  ossim_uint32 multiplier)
+{
+   if(tile->getDataObjectStatus() == OSSIM_EMPTY ||
+      !tile->getBuf())
+   {
+      return;
+   }
+   
+   ossim_int32 maxX     = (ossim_int32)tile->getWidth();
+   ossim_int32 maxY     = (ossim_int32)tile->getHeight();
+   ossim_int32 resultHeight = result->getHeight();
+   ossim_int32* offsetX = new ossim_int32[maxX];
+   ossim_int32* offsetY = new ossim_int32[maxY];
+   ossim_int32 i        = 0;
+   ossim_int32 resultWidth     = (ossim_int32)result->getWidth();
+   ossimIpt tileOrigin   = tile->getOrigin();
+   ossimIpt resultOrigin = result->getOrigin();
+   
+   // create a lookup table. that maps the tile to the result
+   for(i = 0; i < maxX; ++i)
+   {
+      offsetX[i] = (i+tileOrigin.x)/(ossim_int32)multiplier - resultOrigin.x;
+      if(offsetX[i] < 0 )
+      {
+         offsetX[i] = 0;
+      }
+      else if(offsetX[i] >= resultWidth)
+      {
+         offsetX[i] = resultWidth-1;
+      }
+   }
+   for(i = 0; i < maxY; ++i)
+   {
+      offsetY[i] = ( ((i+tileOrigin.y)/(ossim_int32)multiplier) - resultOrigin.y);
+      if(offsetY[i] < 0 )
+      {
+         offsetY[i] = 0;
+      }
+      else if(offsetY[i] >= resultHeight)
+      {
+         offsetY[i] = resultHeight-1;
+      }
+      offsetY[i] *= resultWidth;
+   }
+   
+   if(tile->getDataObjectStatus() == OSSIM_FULL)
+   {
+      ossim_int32 numberOfBands = (ossim_int32)std::min(result->getNumberOfBands(),
+                                                        tile->getNumberOfBands());
+      ossim_int32 band = 0;
+      for(band = 0; band < numberOfBands; ++band)
+      {
+         T* tileBuf   = static_cast<T*>(tile->getBuf(band));
+         T* resultBuf = static_cast<T*>(result->getBuf(band));
+         ossim_int32 dx = 0;
+         ossim_int32 dy = 0;
+         ossim_int32 boxAverageX = 0;
+         ossim_int32 boxAverageY = 0;
+         for(dy = 0; dy < maxY; dy+=multiplier)
+         {
+            for(dx = 0; dx < maxX; dx+=multiplier)
+            {
+               double sum = 0.0;
+               for(boxAverageY = 0; 
+                   ((boxAverageY < (ossim_int32)multiplier)&& 
+                    ((boxAverageY+dy)<maxY)); ++boxAverageY)
+               {
+                  for(boxAverageX = 0; 
+                      ((boxAverageX < (ossim_int32)multiplier)&& 
+                       ((boxAverageX+dx)<maxX)); ++boxAverageX)
+                  {
+                     sum += tileBuf[((boxAverageY+dy)*maxX + boxAverageX + dx)];
+                  }
+               }
+               sum /= (double)(multiplier*multiplier);
+               resultBuf[ offsetX[dx] + offsetY[dy] ] = (T)sum;
+            }
+         }
+      }
+   }
+   else
+   {
+      ossim_int32 numberOfBands = (ossim_int32)std::min(result->getNumberOfBands(),
+                                                        tile->getNumberOfBands());
+      ossim_int32 band = 0;
+      for(band = 0; band < numberOfBands; ++band)
+      {
+         T* tileBuf   = static_cast<T*>(tile->getBuf(band));
+         T* resultBuf = static_cast<T*>(result->getBuf(band));
+         T tileBufNp  = static_cast<T>(tile->getNullPix(band));
+         ossim_int32 dx = 0;
+         ossim_int32 dy = 0;
+         ossim_int32 boxAverageX = 0;
+         ossim_int32 boxAverageY = 0;
+         for(dy = 0; dy < maxY; dy+=multiplier)
+         {
+            for(dx = 0; dx < maxX; dx+=multiplier)
+            {
+               double sum = 0.0;
+               if(tileBuf[((dy+(multiplier>>1))*maxX + dx+(multiplier>>1))] != tileBufNp)
+               {
+                  ossim_uint32 nullCount = 0;
+                  for(boxAverageY = 0; 
+                      ((boxAverageY < (ossim_int32)multiplier)&& 
+                       ((boxAverageY+dy)<maxY)); ++boxAverageY)
+                  {
+                     for(boxAverageX = 0; 
+                         ((boxAverageX < (ossim_int32)multiplier)&& 
+                          ((boxAverageX+dx)<maxX)); ++boxAverageX)
+                     {
+                        T value = tileBuf[((boxAverageY+dy)*maxX + boxAverageX + dx)];
+                        if(value != tileBufNp)
+                        {
+                           sum += value;
+                        }
+                        else
+                        {
+                           ++nullCount;
+                        }
+                     }
+                  }
+                  ossim_uint32 area = multiplier*multiplier;
+                  sum /= (double)(area);
+                  if(nullCount!= area)
+                  {
+                     resultBuf[ offsetX[dx] + offsetY[dy] ] = (T)sum;
+                  }
+               }
+            }
+         }
+      }
+      
+   }
+   
+  delete [] offsetX;
+  delete [] offsetY;
+}
+
+ossimString ossimImageRenderer::getLongName() const
+{
+   return ossimString("Image Renderer");
+}
+
+ossimString ossimImageRenderer::getShortName() const
+{
+   return ossimString("Image Renderer"); 
+}
+
+void ossimImageRenderer::refreshEvent(ossimRefreshEvent& event)
+{
+   ossimImageSourceFilter::refreshEvent(event);
+   ossimImageSourceFilter::initialize(); // init connections
+   if((event.getObject()!=this)&&
+      (event.getRefreshType() & ossimRefreshEvent::REFRESH_GEOMETRY))
+   {
+      ossimRefPtr<ossimImageGeometry> inputGeom =
+         theInputConnection?theInputConnection->getImageGeometry():0;
+      if(inputGeom.valid())
+      {
+         ossimImageViewProjectionTransform* ivpt = PTR_CAST(ossimImageViewProjectionTransform, 
+                                                            m_ImageViewTransform.get());
+         if(ivpt)
+         {
+            ivpt->setImageGeometry(inputGeom.get());
+         }
+      }
+   }
+   initialize();
+}
+
+void ossimImageRenderer::enableSource()
+{
+   if ( isSourceEnabled() == false )
+   {
+      setEnableFlag( true );
+   }
+}
+
+void ossimImageRenderer::disableSource()
+{
+   if ( isSourceEnabled() )
+   {
+      setEnableFlag( false );
+   }
+}
+
+void ossimImageRenderer::setEnableFlag(bool flag)
+{
+   if ( getEnableFlag() != flag )
+   {
+      ossimImageSourceFilter::setEnableFlag( flag );
+      checkIVT();
+      initialize();
+   }
+}
+
diff --git a/ossim/src/ossim/imaging/ossimImageSharpenFilter.cpp b/ossim/src/ossim/imaging/ossimImageSharpenFilter.cpp
new file mode 100644
index 0000000..0772f5d
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageSharpenFilter.cpp
@@ -0,0 +1,226 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimImageSharpenFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <cstdlib> /* for abs() */
+#include <ossim/imaging/ossimImageSharpenFilter.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimNumericProperty.h>
+
+RTTI_DEF1(ossimImageSharpenFilter, "ossimImageSharpenFilter", ossimImageSourceFilter);
+
+static const char* KERNEL_WIDTH_KW = "kernel_width";
+static const char* KERNEL_SIGMA_KW = "kernel_sigma";
+
+ossimImageSharpenFilter::ossimImageSharpenFilter(ossimObject* owner)
+   :ossimImageSourceFilter(owner),
+   theWidth(3),
+   theSigma(.5)
+{
+   theConvolutionSource = new ossimConvolutionSource;
+}
+
+ossimImageSharpenFilter::~ossimImageSharpenFilter()
+{
+}
+
+void ossimImageSharpenFilter::setWidthAndSigma(ossim_uint32 w, ossim_float64 sigma)
+{
+   theWidth = w;
+   theWidth |= 1;
+   if(theWidth < 3) theWidth = 3;
+   theSigma = sigma;
+   buildConvolutionMatrix();
+}
+
+ossimRefPtr<ossimImageData> ossimImageSharpenFilter::getTile(
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   if(!theInputConnection)
+   {
+      return NULL;
+   }
+   if(!isSourceEnabled())
+   {
+      return theInputConnection->getTile(tileRect, resLevel);
+   }
+   return theConvolutionSource->getTile(tileRect, resLevel);   
+}
+
+void ossimImageSharpenFilter::initialize()
+{
+   ossimImageSourceFilter::initialize();
+   if(theConvolutionSource->getInput()!=getInput())
+   {
+      theConvolutionSource->disconnectAllInputs();
+      theConvolutionSource->connectMyInputTo(0, getInput());
+   }
+   buildConvolutionMatrix();   
+}
+
+void ossimImageSharpenFilter::buildConvolutionMatrix()
+{
+   std::vector<double> theKernel(theWidth*theWidth);
+   double* kernel = &theKernel.front();
+   //width = findWidth(sigma);
+   ossim_int32 i = 0 ;
+   ossim_int32 u = 0 ;
+   ossim_int32 v = 0 ;
+   double normalize = 0.0 ;
+   ossim_int32 w2 = theWidth>>1;
+   for (v = -w2; v <= w2; ++v)
+   {
+      for (u = -w2; u <= w2; ++u)
+      {
+         double value = laplacianOfGaussian(u, v, theSigma);
+         kernel[i] = value;
+         normalize += kernel[i] ;
+         ++i ;
+      }
+   }
+   if (fabs(normalize) <= 1e-6)
+   {
+      normalize = 1.0;
+   }
+   normalize=(1.0/normalize);
+   ossim_int32 size = static_cast<ossim_int32>(theWidth*theWidth);
+   for (i = 0; i < size; ++i)
+   {
+      kernel[i]=kernel[i]*normalize;
+   } 
+      
+#if 0
+   // print the kernel
+   for (i = 0; i < theWidth*theWidth; ++i)
+   {
+      if((i%theWidth)==0)
+      {
+         std::cout << std::endl;
+      }
+      std::cout << kernel[i] <<", ";
+   } 
+   std::cout << std::endl;
+#endif
+   theConvolutionSource->setConvolution(kernel, theWidth, theWidth, false);
+}
+
+void ossimImageSharpenFilter::connectInputEvent(ossimConnectionEvent &event)
+{
+   ossimImageSourceFilter::connectInputEvent(event);
+   theConvolutionSource->connectMyInputTo(0, getInput());
+   buildConvolutionMatrix();
+}
+
+void ossimImageSharpenFilter::disconnectInputEvent(ossimConnectionEvent &event)
+{
+   ossimImageSourceFilter::disconnectInputEvent(event);
+   theConvolutionSource->connectMyInputTo(0, getInput());
+}
+
+ossimString ossimImageSharpenFilter::getShortName() const
+{
+   return ossimString("Sharpen");
+}
+
+ossimString ossimImageSharpenFilter::getLongName() const
+{
+   return ossimString("Sharpens the input");
+}
+
+void ossimImageSharpenFilter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   //std::cout << "ossimImageSharpenFilter::setProperty with name = " << property->getName() << std::endl;
+   if(!property) return;
+   if(property->getName() == KERNEL_WIDTH_KW)
+   {
+      theWidth = property->valueToString().toUInt32();
+      theWidth |=1;
+      if(theWidth < 3) theWidth = 3;
+      initialize();
+   }
+   else if(property->getName() == KERNEL_SIGMA_KW)
+   {
+      theSigma = property->valueToString().toDouble();
+      if(theSigma < .1) theSigma = .1;
+      initialize();
+   }
+   else
+   {
+      ossimImageSourceFilter::setProperty(property.get());
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimImageSharpenFilter::getProperty(const ossimString& name)const
+{
+   ossimRefPtr<ossimProperty> property = 0;
+   if(name == KERNEL_WIDTH_KW)
+   {
+      property = new ossimNumericProperty(name,
+                                          ossimString::toString(theWidth),
+                                          3.0,
+                                          64.0);
+      property->setCacheRefreshBit();
+      
+   }
+   else if(name == KERNEL_SIGMA_KW)
+   {
+      property = new ossimNumericProperty(name,
+                                          ossimString::toString(theSigma),
+                                          .1,
+                                          32);
+      property->setCacheRefreshBit();
+   }
+   else 
+   {
+      property = ossimImageSourceFilter::getProperty(name);
+   }
+   
+   return property.get();
+}
+
+void ossimImageSharpenFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageSourceFilter::getPropertyNames(propertyNames);
+   propertyNames.push_back(KERNEL_WIDTH_KW);
+   propertyNames.push_back(KERNEL_SIGMA_KW);
+}
+
+bool ossimImageSharpenFilter::loadState(const ossimKeywordlist& kwl,
+                                        const char* prefix)
+{
+   bool result = ossimImageSourceFilter::loadState(kwl, prefix);
+   ossimString kernelWidth = kwl.find(prefix, KERNEL_WIDTH_KW);
+   ossimString kernelSigma = kwl.find(prefix, KERNEL_SIGMA_KW);
+   kernelWidth = kernelWidth.trim();
+   kernelSigma = kernelSigma.trim();
+   if(!kernelWidth.empty())
+   {
+      theWidth = kernelWidth.toUInt32();
+      theWidth |= 1; // make it odd and check for size
+      if(theWidth < 3) theWidth = 3;
+   }
+   if(!kernelSigma.empty())
+   {
+      theSigma = kernelSigma.toFloat64();
+   }
+   buildConvolutionMatrix();
+   return result;
+}
+
+bool ossimImageSharpenFilter::saveState(ossimKeywordlist& kwl,
+                                        const char* prefix)const
+{
+   kwl.add(prefix, KERNEL_WIDTH_KW, theWidth, true);
+   kwl.add(prefix, KERNEL_SIGMA_KW, theSigma, true);
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
diff --git a/ossim/src/ossim/imaging/ossimImageSource.cpp b/ossim/src/ossim/imaging/ossimImageSource.cpp
new file mode 100644
index 0000000..43c1c5a
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageSource.cpp
@@ -0,0 +1,379 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimImageSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/base/ossimProperty.h>
+#include <ossim/base/ossimKeywordNames.h>
+
+RTTI_DEF1(ossimImageSource,
+          "ossimImageSource" ,
+          ossimSource)
+
+ossimImageSource::ossimImageSource(ossimObject* owner)
+   :ossimSource(owner, 0,0,false,false)
+{
+}
+
+ossimImageSource::ossimImageSource(ossimObject* owner,
+                                   ossim_uint32 inputListSize,
+                                   ossim_uint32 outputListSize,
+                                   bool inputListIsFixedFlag,
+                                   bool outputListIsFixedFlag)
+   :
+      ossimSource(owner, inputListSize, outputListSize,
+                  inputListIsFixedFlag, outputListIsFixedFlag)
+{
+}
+
+ossimImageSource::~ossimImageSource()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimImageSource::getTile(const ossimIpt& origin,
+                                                      ossim_uint32 resLevel)
+{
+   ossimIrect tileRect(origin.x,
+                       origin.y,
+                       origin.x + getTileWidth()  - 1,
+                       origin.y + getTileHeight() - 1);
+   
+   return getTile(tileRect, resLevel);
+}
+
+ossimRefPtr<ossimImageData> ossimImageSource::getTile(const ossimIrect& rect,
+                                                      ossim_uint32 resLevel)
+{
+   ossimImageSource* inter = PTR_CAST(ossimImageSource,
+                                      getInput(0));
+   if(inter)
+   {
+      return inter->getTile(rect, resLevel);
+   }
+   return NULL;
+}
+
+
+bool ossimImageSource::getTile(ossimImageData* result, ossim_uint32 resLevel)
+{
+   // This is the default implementation that is not thread-friendly as it uses the object's tile
+   // then simply assigns its buffer to the provided tile. Eventually, all image sources should
+   // override this method.
+   bool status = true;
+   if (result)
+   {
+      ossimIrect tileRect = result->getImageRectangle();
+      ossimRefPtr<ossimImageData> id = getTile(tileRect, resLevel);
+      if (id.valid())
+      {
+         *result = *(id.get());
+         result->loadTile(id.get()); // Deep copy
+      }
+      else
+      {
+         status = false;
+      }
+   }
+
+   return status;
+}
+
+void ossimImageSource::getDecimationFactor(ossim_uint32 resLevel,
+                                           ossimDpt& result)const
+{
+   ossimImageSource* inter = PTR_CAST(ossimImageSource,
+                                               getInput(0));
+   if(inter)
+   {
+      inter->getDecimationFactor(resLevel, result);
+   }
+}
+
+void ossimImageSource::getDecimationFactors(std::vector<ossimDpt>& decimations)const
+{
+   ossimImageSource* inter = PTR_CAST(ossimImageSource,
+                                               getInput(0));
+   if(inter)
+   {
+      inter->getDecimationFactors(decimations);
+   }
+}
+
+ossim_uint32 ossimImageSource::getNumberOfDecimationLevels() const
+{
+   ossimImageSource* inter = PTR_CAST(ossimImageSource,
+                                               getInput(0));
+   if(inter)
+   {
+      return inter->getNumberOfDecimationLevels();
+   }
+   return 0;
+}
+
+ossimScalarType ossimImageSource::getOutputScalarType() const
+{
+   ossimImageSource* inter = PTR_CAST(ossimImageSource,
+                                               getInput(0));
+   if(inter)
+   {
+      return inter->getOutputScalarType();
+   }
+   
+   return OSSIM_SCALAR_UNKNOWN;
+}
+
+ossim_uint32 ossimImageSource::getTileWidth()  const
+{
+   ossimImageSource* inter = PTR_CAST(ossimImageSource,
+                                               getInput(0));
+   if(inter)
+   {
+      return inter->getTileWidth();
+   }
+   ossimIpt tileSize;
+   ossim::defaultTileSize(tileSize);
+   
+   return tileSize.x;
+}
+
+ossim_uint32 ossimImageSource::getTileHeight() const
+{
+   ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput(0));
+   if(inter)
+   {
+      return inter->getTileHeight();
+   }
+   
+   ossimIpt tileSize;
+   ossim::defaultTileSize(tileSize);
+   
+   return tileSize.y;
+}
+
+ossimIrect ossimImageSource::getBoundingRect(ossim_uint32 resLevel)const
+{
+   ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput(0));
+   if(inter)
+   {
+      return inter->getBoundingRect(resLevel);
+   }
+   ossimIrect rect;
+   rect.makeNan();
+   return rect;
+}
+
+void ossimImageSource::getBoundingRect(ossimIrect& rect, ossim_uint32 resLevel) const
+{
+   rect = getBoundingRect( resLevel );
+}
+
+bool ossimImageSource::saveState(ossimKeywordlist& kwl,
+                                 const char* prefix)const
+{
+   return ossimSource::saveState(kwl, prefix);
+}
+
+bool ossimImageSource::loadState(const ossimKeywordlist& kwl,
+                                 const char* prefix)
+{
+   return ossimSource::loadState(kwl, prefix);
+}
+
+//*****************************************************************************
+//  METHOD: ossimImageSource::getValidImageVertices()
+//*****************************************************************************
+void ossimImageSource::getValidImageVertices(std::vector<ossimIpt>& validVertices,
+                                             ossimVertexOrdering ordering,
+                                             ossim_uint32 resLevel)const
+{
+  ossimImageSource* inter = PTR_CAST(ossimImageSource,
+					      getInput(0));
+  if(inter)
+    {
+      return inter->getValidImageVertices(validVertices,
+					  ordering,
+                                          resLevel);
+    }
+   ossimIrect boundingRect = getBoundingRect(resLevel);
+   validVertices.clear();
+   
+   if(ordering == OSSIM_CLOCKWISE_ORDER)
+   {
+      validVertices.push_back(boundingRect.ul());
+      validVertices.push_back(boundingRect.ur());
+      validVertices.push_back(boundingRect.lr());
+      validVertices.push_back(boundingRect.ll());
+   }
+   else
+   {
+      validVertices.push_back(boundingRect.ul());
+      validVertices.push_back(boundingRect.ll());
+      validVertices.push_back(boundingRect.lr());
+      validVertices.push_back(boundingRect.ur());
+   }
+}
+
+double ossimImageSource::getNullPixelValue(ossim_uint32 band)const
+{
+   ossimImageSource* inter = PTR_CAST(ossimImageSource,
+                                               getInput(0));
+   if(inter)
+   {
+      return inter->getNullPixelValue(band);
+   }
+   
+   return ossim::defaultNull(getOutputScalarType());
+}
+
+double ossimImageSource::getMinPixelValue(ossim_uint32 band)const
+{
+   ossimImageSource* inter = PTR_CAST(ossimImageSource,
+                                               getInput(0));
+   if(inter)
+   {
+      return inter->getMinPixelValue(band);
+   }
+   return ossim::defaultMin(getOutputScalarType());
+}
+
+double ossimImageSource::getMaxPixelValue(ossim_uint32 band)const
+{
+   ossimImageSource* inter = PTR_CAST(ossimImageSource,
+                                               getInput(0));
+   if(inter)
+   {
+      return inter->getMaxPixelValue(band);
+   }
+   
+   return ossim::defaultMax(getOutputScalarType());
+}
+
+//**************************************************************************************************
+// Default implementation returns the image geometry object associated with the first input source 
+// (if any) connected to this source, or NULL.
+//**************************************************************************************************
+ossimRefPtr<ossimImageGeometry> ossimImageSource::getImageGeometry()
+{
+   ossimRefPtr<ossimImageGeometry> result = 0;
+   if ( getInput(0) )
+   {
+      ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput(0));
+      if( inter )
+      {
+         result = inter->getImageGeometry();
+      }
+   }
+   return result;
+}
+
+//**************************************************************************************************
+//! Default implementation sets geometry of the first input to the geometry specified.
+//**************************************************************************************************
+void ossimImageSource::setImageGeometry(const ossimImageGeometry* geom)
+{
+   ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput(0));
+   if (inter)
+   {
+      inter->setImageGeometry(geom);
+   }
+}
+
+void ossimImageSource::saveImageGeometry() const
+{
+   ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput(0));
+   if (inter)
+   {
+      inter->saveImageGeometry();
+   }
+}
+
+void ossimImageSource::saveImageGeometry(const ossimFilename& geometry_file) const
+{
+   ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput(0));
+   if (inter)
+   {
+      inter->saveImageGeometry(geometry_file);
+   }
+}
+
+void ossimImageSource::getOutputBandList(std::vector<ossim_uint32>& bandList) const
+{
+   const ossim_uint32 INPUT_BANDS = getNumberOfInputBands();
+   if ( INPUT_BANDS )
+   {
+      bandList.resize( INPUT_BANDS );
+      for ( ossim_uint32 band = 0; band < INPUT_BANDS; ++band )
+      {
+         bandList[band] = band;
+      }
+   }
+   else
+   {
+      bandList.clear();
+   }
+}
+
+ossim_uint32 ossimImageSource::getNumberOfOutputBands() const
+{
+   return getNumberOfInputBands();
+}
+
+ossimRefPtr<ossimProperty> ossimImageSource::getProperty(const ossimString& name)const
+{
+   ossimRefPtr<ossimProperty> result = ossimSource::getProperty(name);
+
+   ossimString tempName = name;
+   if(result.valid())
+   {
+      if(tempName.downcase() == ossimKeywordNames::ENABLED_KW)
+      {
+         result->clearChangeType();
+         
+         // we will at least say its a radiometric change
+         //
+         result->setFullRefreshBit();
+      }
+   }
+
+   return result;
+}
+
+void ossimImageSource::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   ossimSource::setProperty(property);
+}
+
+void ossimImageSource::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimSource::getPropertyNames(propertyNames);
+}
+
+bool ossimImageSource::isIndexedData() const
+{
+   bool result = false;
+   ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput(0));
+   if (inter)
+   {
+      result = inter->isIndexedData();
+   }
+   return result;
+}
+
+// Protected to hide from use...
+ossimImageSource::ossimImageSource (const ossimImageSource& /* rhs */)
+   :ossimSource() 
+{}
+
+// Protected to hide from use...
+const ossimImageSource& ossimImageSource::operator=(const ossimImageSource&)
+{
+   return *this;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimImageSourceFactory.cpp b/ossim/src/ossim/imaging/ossimImageSourceFactory.cpp
new file mode 100644
index 0000000..afe4546
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageSourceFactory.cpp
@@ -0,0 +1,591 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: This is the image source factory.
+//              It will try to create image filters
+//              first then it will try the image writers
+//              and image handlers (image readers)
+//
+//*************************************************************************
+// $Id: ossimImageSourceFactory.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimImageSourceFactory.h>
+#include <ossim/imaging/ossimConvolutionFilter1D.h>
+#include <ossim/imaging/ossimImageGaussianFilter.h>
+#include <ossim/imaging/ossimImageRenderer.h>
+#include <ossim/imaging/ossimCacheTileSource.h>
+#include <ossim/imaging/ossimFeatherMosaic.h>
+#include <ossim/imaging/ossimHistogramRemapper.h>
+#include <ossim/imaging/ossimNullPixelFlip.h>
+#include <ossim/imaging/ossimImageMosaic.h>
+#include <ossim/imaging/ossimClosestToCenterCombiner.h>
+#include <ossim/imaging/ossimBlendMosaic.h>
+#include <ossim/imaging/ossimMaxMosaic.h>
+#include <ossim/imaging/ossimOrthoImageMosaic.h>
+#include <ossim/imaging/ossimPiecewiseRemapper.h>
+#include <ossim/imaging/ossimColorNormalizedFusion.h>
+#include <ossim/imaging/ossimLocalCorrelationFusion.h>
+#include <ossim/imaging/ossimSFIMFusion.h>
+#include <ossim/imaging/ossimTopographicCorrectionFilter.h>
+#include <ossim/imaging/ossimBandSelector.h>
+#include <ossim/imaging/ossimNBandToIndexFilter.h>
+#include <ossim/imaging/ossimRgbToGreyFilter.h>
+#include <ossim/imaging/ossimRgbToJpegYCbCrSource.h>
+#include <ossim/imaging/ossimRgbToHsvSource.h>
+#include <ossim/imaging/ossimRgbToHsiSource.h>
+#include <ossim/imaging/ossimHsiToRgbSource.h>
+#include <ossim/imaging/ossimHsvToRgbSource.h>
+#include <ossim/imaging/ossimHsiRemapper.h>
+#include <ossim/imaging/ossimJpegYCbCrToRgbSource.h>
+#include <ossim/imaging/ossimPolyCutter.h>
+#include <ossim/imaging/ossimGeoPolyCutter.h>
+#include <ossim/imaging/ossimHistogramEqualization.h>
+#include <ossim/imaging/ossimHistogramMatchFilter.h>
+#include <ossim/imaging/ossimHistogramThreshholdFilter.h>
+#include <ossim/imaging/ossimConvolutionSource.h>
+#include <ossim/imaging/ossimSICDToDetectedImage.h>
+#include <ossim/imaging/ossimBrightnessContrastSource.h>
+#include <ossim/imaging/ossimBrightnessMatch.h>
+#include <ossim/imaging/ossimScalarRemapper.h>
+#include <ossim/imaging/ossimBandMergeSource.h>
+#include <ossim/imaging/ossimIndexToRgbLutFilter.h>
+#include <ossim/imaging/ossimBumpShadeTileSource.h>
+#include <ossim/imaging/ossimSubImageTileSource.h>
+#include <ossim/imaging/ossimRLevelFilter.h>
+#include <ossim/imaging/ossimBandClipFilter.h>
+#include <ossim/imaging/ossimValueAssignImageSourceFilter.h>
+#include <ossim/imaging/ossimImageSharpenFilter.h>
+#include <ossim/imaging/ossim3x3ConvolutionFilter.h>
+#include <ossim/imaging/ossimCastTileSourceFilter.h>
+#include <ossim/imaging/ossimEquationCombiner.h>
+#include <ossim/imaging/ossimImageGaussianFilter.h>
+#include <ossim/imaging/ossimMaskFilter.h>
+#include <ossim/imaging/ossimPixelFlipper.h>
+#include <ossim/imaging/ossimElevImageSource.h>
+#include <ossim/imaging/ossimLandsatTopoCorrectionFilter.h>
+#include <ossim/imaging/ossimGeoAnnotationSource.h>
+#include <ossim/imaging/ossimMapCompositionSource.h>
+#include <ossim/imaging/ossimScaleFilter.h>
+#include <ossim/imaging/ossimEastingNorthingCutter.h>
+#include <ossim/imaging/ossimEdgeFilter.h>
+#include <ossim/imaging/ossimFftFilter.h>
+#include <ossim/imaging/ossimWatermarkFilter.h>
+#include <ossim/imaging/ossimTrimFilter.h>
+#include <ossim/imaging/ossimTwoColorView.h>
+#include <ossim/imaging/ossimMemoryImageSource.h>
+#include <ossim/imaging/ossimGridRemapSource.h>
+#include <ossim/imaging/ossimImageChain.h>
+#include <ossim/imaging/ossimHistogramWriter.h>
+#include <ossim/imaging/ossimRectangleCutFilter.h>
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+#include <ossim/imaging/ossimImageHistogramSource.h>
+#include <ossim/imaging/ossimMultiBandHistogramTileSource.h>
+#include <ossim/imaging/ossimBandAverageFilter.h>
+#include <ossim/imaging/ossimImageToPlaneNormalFilter.h>
+#include <ossim/imaging/ossimAtCorrGridRemapper.h>
+#include <ossim/imaging/ossimAtCorrRemapper.h>
+#include <ossim/imaging/ossimDilationFilter.h>
+
+// Not sure if we want to keep this here
+#include <ossim/imaging/ossimAtbController.h>
+
+#include <ossim/base/ossimTrace.h>
+
+RTTI_DEF1(ossimImageSourceFactory, "ossimImageSourceFactory", ossimImageSourceFactoryBase);
+
+static ossimTrace traceDebug("ossimImageSourceFactory:debug");
+
+ossimImageSourceFactory* ossimImageSourceFactory::theInstance=NULL;
+
+ossimImageSourceFactory::~ossimImageSourceFactory()
+{
+   theInstance = NULL;
+   ossimObjectFactoryRegistry::instance()->unregisterFactory(this);
+}
+ossimImageSourceFactory* ossimImageSourceFactory::instance()
+{
+   if(!theInstance)
+   {
+      theInstance = new ossimImageSourceFactory;
+   }
+
+   return theInstance;
+}
+
+ossimObject* ossimImageSourceFactory::createObject(const ossimString& name)const
+{
+
+   // lets do the filters first
+   if( name == STATIC_TYPE_NAME(ossimBandSelector) ||
+       name == "ossimNativeBandSelectorTileSource" ) 
+   {
+      //---
+      // For backwards compatibility check old name:
+      // "ossimNativeBandSelectorTileSource"
+      //---
+      return new ossimBandSelector;
+   }
+   else if(name ==  STATIC_TYPE_NAME(ossimNullPixelFlip))
+   {
+      return new ossimNullPixelFlip;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimImageRenderer))
+   {
+      return new ossimImageRenderer;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimCacheTileSource))
+   {
+      return new ossimCacheTileSource;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimColorNormalizedFusion))
+   {
+      return new ossimColorNormalizedFusion;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimLocalCorrelationFusion))
+   {
+      return new ossimLocalCorrelationFusion;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimSFIMFusion))
+   {
+      return new ossimSFIMFusion;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimBlendMosaic))
+   {
+      return new ossimBlendMosaic;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimMaxMosaic))
+   {
+      return new ossimMaxMosaic;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimHistogramRemapper))
+   {
+      return new ossimHistogramRemapper;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimImageMosaic))
+   {
+      return new ossimImageMosaic;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimClosestToCenterCombiner))
+   {
+      return new ossimClosestToCenterCombiner;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimRgbToGreyFilter))
+   {
+      return new ossimRgbToGreyFilter;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimNBandToIndexFilter))
+   {
+      return new ossimNBandToIndexFilter;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimImageChain))
+   {
+      return new ossimImageChain;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimPolyCutter))
+   {
+      return new ossimPolyCutter;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimGeoPolyCutter))
+   {
+      return new ossimGeoPolyCutter;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimJpegYCbCrToRgbSource))
+   {
+      return new ossimJpegYCbCrToRgbSource;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimRgbToJpegYCbCrSource))
+   {
+      return new ossimRgbToJpegYCbCrSource;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimHsiToRgbSource))
+   {
+      return new ossimHsiToRgbSource;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimRgbToHsiSource))
+   {
+      return new ossimRgbToHsiSource;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimHsvToRgbSource))
+   {
+      return new ossimHsvToRgbSource;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimRgbToHsvSource))
+   {
+      return new ossimRgbToHsvSource;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimHistogramEqualization))
+   {
+      return new ossimHistogramEqualization;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimHistogramMatchFilter))
+   {
+      return new ossimHistogramMatchFilter;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimHistogramThreshholdFilter))
+   {
+      return new ossimHistogramThreshholdFilter;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimGeoAnnotationSource))
+   {
+      return new ossimGeoAnnotationSource;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimConvolutionSource))
+   {
+      return new ossimConvolutionSource;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimSICDToDetectedImage))
+   {
+	   return new ossimSICDToDetectedImage;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimBrightnessContrastSource))
+   {
+      return new ossimBrightnessContrastSource;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimBrightnessMatch))
+   {
+      return new ossimBrightnessMatch;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimScalarRemapper))
+   {
+      return new ossimScalarRemapper;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimBandMergeSource))
+   {
+      return new ossimBandMergeSource;
+   }  
+   else if(name == STATIC_TYPE_NAME(ossimFeatherMosaic))
+   {
+      return new ossimFeatherMosaic;
+   }  
+   else if(name == STATIC_TYPE_NAME(ossimGridRemapSource))
+   {
+      return new ossimGridRemapSource;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimEquationCombiner))
+   {
+      return new ossimEquationCombiner;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimConvolutionFilter1D))
+   {
+      return new ossimConvolutionFilter1D;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimImageGaussianFilter))
+   {
+      return new ossimImageGaussianFilter;
+   }
+   // Not sure if we want to keep this here
+   else if(name == STATIC_TYPE_NAME(ossimAtbController))
+   {
+      return new ossimAtbController;
+   }  
+   else if(name == STATIC_TYPE_NAME(ossimIndexToRgbLutFilter))
+   {
+      return new ossimIndexToRgbLutFilter;
+   }
+   else if(name ==  STATIC_TYPE_NAME(ossimBumpShadeTileSource))
+   {
+      return new ossimBumpShadeTileSource;
+   }
+   else if(name ==  STATIC_TYPE_NAME(ossimSubImageTileSource))
+   {
+      return new ossimSubImageTileSource;
+   }
+   else if(name ==  STATIC_TYPE_NAME(ossimRLevelFilter))
+   {
+      return new ossimRLevelFilter;
+   }
+   else if(name ==  STATIC_TYPE_NAME(ossimBandClipFilter))
+   {
+      return new ossimBandClipFilter;
+   }
+   else if(name ==  STATIC_TYPE_NAME(ossimHsiRemapper))
+   {
+      return new ossimHsiRemapper;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimHistogramWriter))
+   {
+      return new ossimHistogramWriter;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimImageHistogramSource))
+   {
+      return new ossimImageHistogramSource;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimRectangleCutFilter))
+   {
+      return new ossimRectangleCutFilter;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimCastTileSourceFilter))
+   {
+      return new ossimCastTileSourceFilter;
+   }
+   // all the image handlers
+   else if(name == STATIC_TYPE_NAME(ossimValueAssignImageSourceFilter))
+   {
+      return new ossimValueAssignImageSourceFilter;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimImageSharpenFilter))
+   {
+      return new ossimImageSharpenFilter;
+   }
+   else if(name == STATIC_TYPE_NAME(ossim3x3ConvolutionFilter))
+   {
+      return new ossim3x3ConvolutionFilter;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimOrthoImageMosaic))
+   {
+      return new ossimOrthoImageMosaic;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimPiecewiseRemapper))
+   {
+      return new ossimPiecewiseRemapper;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimMapCompositionSource))
+   {
+      return new ossimMapCompositionSource;
+   }
+   else if(name ==  STATIC_TYPE_NAME(ossimElevImageSource))
+   {
+      return new ossimElevImageSource;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimMaskFilter))
+   {
+      return new ossimMaskFilter;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimMultiBandHistogramTileSource))
+   {
+      return new ossimMultiBandHistogramTileSource;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimBandAverageFilter))
+   {
+      return new ossimBandAverageFilter;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimPixelFlipper))
+   {
+      return new ossimPixelFlipper();
+   }
+   else if(name == STATIC_TYPE_NAME(ossimScaleFilter))
+   {
+      return new ossimScaleFilter();
+   }
+   else if(name == STATIC_TYPE_NAME(ossimImageToPlaneNormalFilter))
+   {
+      return new ossimImageToPlaneNormalFilter();
+   }
+   else if(name == STATIC_TYPE_NAME(ossimTopographicCorrectionFilter))
+   {
+      return new ossimTopographicCorrectionFilter();
+   }
+   else if(name == STATIC_TYPE_NAME(ossimLandsatTopoCorrectionFilter))
+   {
+      return new ossimLandsatTopoCorrectionFilter();
+   }
+   else if(name == STATIC_TYPE_NAME(ossimAtCorrRemapper))
+   {
+      return new ossimAtCorrRemapper();
+   }
+   else if(name == STATIC_TYPE_NAME(ossimAtCorrGridRemapper))
+   {
+      return new ossimAtCorrGridRemapper();
+   }
+   else if(name == STATIC_TYPE_NAME(ossimEastingNorthingCutter))
+   {
+      return new ossimEastingNorthingCutter();
+   }
+   else if(name == STATIC_TYPE_NAME(ossimEdgeFilter))
+   {
+      return new ossimEdgeFilter();
+   }
+   else if(name == STATIC_TYPE_NAME(ossimFftFilter))
+   {
+      return new ossimFftFilter();
+   }
+   else if(name == STATIC_TYPE_NAME(ossimWatermarkFilter))
+   {
+      return new ossimWatermarkFilter();
+   }
+   else if(name == STATIC_TYPE_NAME(ossimImageGaussianFilter))
+   {
+      return new ossimImageGaussianFilter();
+   }
+   else if(name == STATIC_TYPE_NAME(ossimTrimFilter))
+   {
+      return new ossimTrimFilter();
+   }
+   else if(name == STATIC_TYPE_NAME(ossimTwoColorView))
+   {
+      return new ossimTwoColorView;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimImageHistogramSource))
+   {
+      return new ossimImageHistogramSource();
+   }
+   else if(name == STATIC_TYPE_NAME(ossimImageSourceFilter))
+   {
+      // this is just a pass through source
+      return new ossimImageSourceFilter;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimMemoryImageSource))
+   {
+      // this is just a pass through source
+      return new ossimMemoryImageSource;
+   }
+   else if(name == STATIC_TYPE_NAME(ossimDilationFilter))
+   {
+      return new ossimDilationFilter();
+   }
+   return NULL;
+}
+
+ossimObject* ossimImageSourceFactory::createObject(const ossimKeywordlist& kwl,
+                                                   const char* prefix)const
+{
+   static const char* MODULE = "ossimImageSourceFactory::createSource";
+   
+   ossimString copyPrefix;
+   if (prefix)
+   {
+      copyPrefix = prefix;
+   }
+   
+   ossimObject* result = NULL;
+   
+   if(traceDebug())
+   {
+      CLOG << "looking up type keyword for prefix = " << copyPrefix << endl;
+   }
+
+   const char* lookup = kwl.find(copyPrefix, "type");
+   if(lookup)
+   {
+      ossimString name = lookup;
+      result           = createObject(name);
+      
+      if(result)
+      {
+         if(traceDebug())
+         {
+            CLOG << "found source " << result->getClassName() << " now loading state" << endl;
+         }
+         result->loadState(kwl, copyPrefix.c_str());
+      }
+      else
+      {
+         if(traceDebug())
+         {
+            CLOG << "type not found " << lookup << endl;
+         }
+      }
+   }
+   else
+   {
+      if(traceDebug())
+      {
+         CLOG << "type keyword not found" << endl;
+      }
+   }
+   return result;
+}
+
+void ossimImageSourceFactory::getTypeNameList(std::vector<ossimString>& typeList)const
+{
+   typeList.push_back(STATIC_TYPE_NAME(ossimBandSelector));
+   typeList.push_back(STATIC_TYPE_NAME(ossimImageRenderer));
+   typeList.push_back(STATIC_TYPE_NAME(ossimCacheTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimBlendMosaic));
+   typeList.push_back(STATIC_TYPE_NAME(ossimMaxMosaic));   
+   typeList.push_back(STATIC_TYPE_NAME(ossimNullPixelFlip));
+   typeList.push_back(STATIC_TYPE_NAME(ossimColorNormalizedFusion));
+   typeList.push_back(STATIC_TYPE_NAME(ossimLocalCorrelationFusion));
+   typeList.push_back(STATIC_TYPE_NAME(ossimSFIMFusion));
+   typeList.push_back(STATIC_TYPE_NAME(ossimHistogramRemapper));
+   typeList.push_back(STATIC_TYPE_NAME(ossimImageMosaic));
+   typeList.push_back(STATIC_TYPE_NAME(ossimClosestToCenterCombiner));
+   typeList.push_back(STATIC_TYPE_NAME(ossimRgbToGreyFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimNBandToIndexFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimImageChain));
+   typeList.push_back(STATIC_TYPE_NAME(ossimPolyCutter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimGeoPolyCutter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimJpegYCbCrToRgbSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimRgbToJpegYCbCrSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimHsiToRgbSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimRgbToHsiSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimHsvToRgbSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimRgbToHsvSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimHistogramEqualization));
+   typeList.push_back(STATIC_TYPE_NAME(ossimHistogramMatchFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimHistogramThreshholdFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimGeoAnnotationSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimConvolutionSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimSICDToDetectedImage));
+   typeList.push_back(STATIC_TYPE_NAME(ossimBrightnessContrastSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimBrightnessMatch));
+   typeList.push_back(STATIC_TYPE_NAME(ossimScalarRemapper));
+   typeList.push_back(STATIC_TYPE_NAME(ossimBandMergeSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimFeatherMosaic));
+   typeList.push_back(STATIC_TYPE_NAME(ossimGridRemapSource));
+   // Not sure if we want to keep this here
+   typeList.push_back(STATIC_TYPE_NAME(ossimAtbController));
+   typeList.push_back(STATIC_TYPE_NAME(ossimIndexToRgbLutFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimBumpShadeTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimSubImageTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimRLevelFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimBandClipFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimHsiRemapper));
+   typeList.push_back(STATIC_TYPE_NAME(ossimHistogramWriter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimImageHistogramSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimRectangleCutFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimElevImageSource));
+   
+   typeList.push_back(STATIC_TYPE_NAME(ossimValueAssignImageSourceFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimImageSharpenFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossim3x3ConvolutionFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimOrthoImageMosaic));
+   typeList.push_back(STATIC_TYPE_NAME(ossimPiecewiseRemapper));
+   typeList.push_back(STATIC_TYPE_NAME(ossimMapCompositionSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimCastTileSourceFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimEquationCombiner));
+   typeList.push_back(STATIC_TYPE_NAME(ossimConvolutionFilter1D));
+   typeList.push_back(STATIC_TYPE_NAME(ossimImageGaussianFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimMaskFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimMultiBandHistogramTileSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimBandAverageFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimPixelFlipper));
+   typeList.push_back(STATIC_TYPE_NAME(ossimScaleFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimImageToPlaneNormalFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimTopographicCorrectionFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimLandsatTopoCorrectionFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimAtCorrRemapper));
+   typeList.push_back(STATIC_TYPE_NAME(ossimAtCorrGridRemapper));
+   typeList.push_back(STATIC_TYPE_NAME(ossimEastingNorthingCutter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimEdgeFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimFftFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimWatermarkFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimImageGaussianFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimTrimFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimTwoColorView));
+   typeList.push_back(STATIC_TYPE_NAME(ossimImageHistogramSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimImageSourceFilter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimMemoryImageSource));
+   typeList.push_back(STATIC_TYPE_NAME(ossimDilationFilter));
+}
+
+// Hide from use...
+ossimImageSourceFactory::ossimImageSourceFactory()
+   :ossimImageSourceFactoryBase()
+{}
+
+ossimImageSourceFactory::ossimImageSourceFactory(const ossimImageSourceFactory&)
+   :ossimImageSourceFactoryBase()
+{}
+
+const ossimImageSourceFactory& ossimImageSourceFactory::operator=(ossimImageSourceFactory&)
+{
+   return *this;
+}
+
diff --git a/src/ossim/imaging/ossimImageSourceFactoryBase.cpp b/ossim/src/ossim/imaging/ossimImageSourceFactoryBase.cpp
similarity index 100%
rename from src/ossim/imaging/ossimImageSourceFactoryBase.cpp
rename to ossim/src/ossim/imaging/ossimImageSourceFactoryBase.cpp
diff --git a/src/ossim/imaging/ossimImageSourceFactoryRegistry.cpp b/ossim/src/ossim/imaging/ossimImageSourceFactoryRegistry.cpp
similarity index 100%
rename from src/ossim/imaging/ossimImageSourceFactoryRegistry.cpp
rename to ossim/src/ossim/imaging/ossimImageSourceFactoryRegistry.cpp
diff --git a/ossim/src/ossim/imaging/ossimImageSourceFilter.cpp b/ossim/src/ossim/imaging/ossimImageSourceFilter.cpp
new file mode 100644
index 0000000..755dfee
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageSourceFilter.cpp
@@ -0,0 +1,216 @@
+
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+//*******************************************************************
+//  $Id: ossimImageSourceFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimImageSourceFilter.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimProperty.h>
+ 
+static ossimTrace traceDebug("ossimImageSourceFilter:degug");
+
+RTTI_DEF2(ossimImageSourceFilter, "ossimImageSourceFilter", ossimImageSource, ossimConnectableObjectListener)
+
+ossimImageSourceFilter::ossimImageSourceFilter(ossimObject* owner)
+   : ossimImageSource(owner,
+                      1, // number of inputs
+                      0, // number of outputs
+                      true, // input's fixed
+                      false), // outputs ar not fixed
+     theInputConnection(NULL)
+{
+   addListener((ossimConnectableObjectListener*)this);
+}
+
+ossimImageSourceFilter::ossimImageSourceFilter(ossimImageSource* inputSource)
+   : ossimImageSource(NULL,
+                      1,
+                      0,
+                      true,
+                      false),
+     theInputConnection(inputSource)
+{
+   if(inputSource)
+   {
+     connectMyInputTo(0, inputSource);
+   }
+   addListener((ossimConnectableObjectListener*)this);
+}
+
+ossimImageSourceFilter::ossimImageSourceFilter(ossimObject* owner,
+                                               ossimImageSource* inputSource)
+   : ossimImageSource(owner,
+                      1,
+                      0,
+                      true,
+                      false),
+     theInputConnection(inputSource)
+{
+   if(inputSource)
+   {
+      theInputObjectList[0] = inputSource;
+      inputSource->connectMyOutputTo(this, false);
+   }
+   addListener((ossimConnectableObjectListener*)this);
+}
+
+
+ossimImageSourceFilter::~ossimImageSourceFilter()
+{
+   removeListener((ossimConnectableObjectListener*)this);
+   theInputConnection = NULL;
+}
+
+ossim_uint32 ossimImageSourceFilter::getNumberOfInputBands()const
+{
+   if(theInputConnection)
+   {
+      return theInputConnection->getNumberOfOutputBands();
+   }
+
+   return 0;
+}
+
+void ossimImageSourceFilter::initialize()
+{
+   theInputConnection = PTR_CAST(ossimImageSource, getInput(0));
+}
+
+bool ossimImageSourceFilter::loadState(const ossimKeywordlist& kwl,
+                                       const char* prefix)
+{
+   bool result = ossimImageSource::loadState(kwl, prefix);
+
+   // make sure we have 1 input.
+   //setNumberOfInputs(1);
+
+   // we will fix the input
+   //if(!theInputListIsFixedFlag)
+  // {
+  //    theInputListIsFixedFlag = true;
+  // }
+   
+   return result;
+}
+
+bool ossimImageSourceFilter::saveState(ossimKeywordlist& kwl,
+                                       const char* prefix)const
+{
+   return ossimImageSource::saveState(kwl, prefix);
+}
+
+
+bool ossimImageSourceFilter::canConnectMyInputTo(ossim_int32 inputIndex,
+						 const ossimConnectableObject* object)const
+{
+  
+  return ((PTR_CAST(ossimImageSource, object)||!object) && ( inputIndex == 0 ) );
+}
+
+void ossimImageSourceFilter::connectInputEvent(ossimConnectionEvent& /* event */)
+{
+  if(traceDebug())
+    {
+       ossimNotify(ossimNotifyLevel_DEBUG) << "ossimImageSourceFilter::connectInputEvent: ";
+
+       if(getInput())
+       {
+          ossimNotify(ossimNotifyLevel_DEBUG) << "to" <<  getInput()->getClassName() << std::endl;
+       }
+       else
+       {
+          ossimNotify(ossimNotifyLevel_DEBUG) << "to NULL" << std::endl;
+       }
+    }
+  theInputConnection = PTR_CAST(ossimImageSource, getInput(0));
+  initialize();
+  if(traceDebug())
+  {
+     if(theInputConnection)
+     {
+        ossimNotify(ossimNotifyLevel_DEBUG) << "theInputConnection was set to " << getInput()->getClassName() << std::endl;
+     }
+     else
+     {
+        ossimNotify(ossimNotifyLevel_DEBUG) << "theInputConnection was set to NULL" <<  std::endl;
+     }
+     ossimNotify(ossimNotifyLevel_DEBUG) << "Leaving ossimImageSourceFilter::connectInput" << std::endl;
+  }
+}
+void ossimImageSourceFilter::disconnectInputEvent(ossimConnectionEvent& /* event */)
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimImageSourceFilter::disconnectInputEvent" << std::endl;
+   }
+   theInputConnection = PTR_CAST(ossimImageSource, getInput(0));
+   initialize();
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "Leaving ossimImageSourceFilter::disconnectInput" << std::endl;
+   }
+}
+void ossimImageSourceFilter::propertyEvent(ossimPropertyEvent& /* event */)
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimImageSourceFilter::propertyEvent DEBUG: Entering..." << std::endl;
+   }
+   initialize();
+   
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimImageSourceFilter::propertyEvent DEBUG: Leaving..." << std::endl;
+   }
+}
+
+void ossimImageSourceFilter::refreshEvent(ossimRefreshEvent& /* event */)
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimImageSourceFilter::refreshEvent " << std::endl;
+   }
+   initialize();
+   
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimImageSourceFilter::refreshEvent " << std::endl;
+   }
+}
+
+void ossimImageSourceFilter::getOutputBandList(std::vector<ossim_uint32>& bandList) const
+{
+   if(theInputConnection)
+   {
+      return theInputConnection->getOutputBandList(bandList);
+   }
+
+   return ossimImageSource::getOutputBandList(bandList);
+}
+
+void ossimImageSourceFilter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   ossimImageSource::setProperty(property);
+}
+
+ossimRefPtr<ossimProperty> ossimImageSourceFilter::getProperty(const ossimString& name)const
+{
+   return ossimImageSource::getProperty(name);
+   
+}
+
+void ossimImageSourceFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageSource::getPropertyNames(propertyNames);
+}
+
diff --git a/src/ossim/imaging/ossimImageSourceHistogramFilter.cpp b/ossim/src/ossim/imaging/ossimImageSourceHistogramFilter.cpp
similarity index 100%
rename from src/ossim/imaging/ossimImageSourceHistogramFilter.cpp
rename to ossim/src/ossim/imaging/ossimImageSourceHistogramFilter.cpp
diff --git a/ossim/src/ossim/imaging/ossimImageSourceSequencer.cpp b/ossim/src/ossim/imaging/ossimImageSourceSequencer.cpp
new file mode 100644
index 0000000..d9cff23
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageSourceSequencer.cpp
@@ -0,0 +1,449 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+//*******************************************************************
+//  $Id: ossimImageSourceSequencer.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimImageSourceSequencer.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimImageWriter.h>
+
+RTTI_DEF2(ossimImageSourceSequencer, "ossimImageSourceSequencer",
+          ossimImageSource, ossimConnectableObjectListener);
+
+static ossimTrace traceDebug("ossimImageSourceSequencer:debug");
+   
+ossimImageSourceSequencer::ossimImageSourceSequencer(ossimImageSource* inputSource,
+                                                     ossimObject* owner)
+:ossimImageSource(owner,
+                  1,
+                  1,
+                  true,
+                  false),
+    theBlankTile(NULL),
+    theAreaOfInterest(0,0,0,0),
+    theTileSize(OSSIM_DEFAULT_TILE_WIDTH, OSSIM_DEFAULT_TILE_HEIGHT),
+    theNumberOfTilesHorizontal(0),
+    theNumberOfTilesVertical(0),
+    theCurrentTileNumber(0)
+{
+   ossim::defaultTileSize(theTileSize);
+   theAreaOfInterest.makeNan();
+   theInputConnection    = inputSource;
+   if(inputSource)
+   {
+     connectMyInputTo(0, inputSource);
+     initialize(); // Derived class depends on this initialization to happen now. DO NOT MOVE.
+   }
+   addListener( (ossimConnectableObjectListener*)this);
+}
+
+ossimImageSourceSequencer::~ossimImageSourceSequencer()
+{
+   removeListener((ossimConnectableObjectListener*)this);
+}
+
+ossim_int64 ossimImageSourceSequencer::getNumberOfTiles()const
+{
+   return (theNumberOfTilesHorizontal*theNumberOfTilesVertical);
+}
+
+
+ossim_int64 ossimImageSourceSequencer::getNumberOfTilesHorizontal()const
+{
+   return theNumberOfTilesHorizontal;
+}
+
+ossim_int64 ossimImageSourceSequencer::getNumberOfTilesVertical()const
+{
+   return theNumberOfTilesVertical;
+}
+
+ossimScalarType ossimImageSourceSequencer::getOutputScalarType() const
+{
+   if(theInputConnection)
+   {
+      return theInputConnection->getOutputScalarType();
+   }
+   
+   return OSSIM_SCALAR_UNKNOWN;
+}
+
+ossimIpt ossimImageSourceSequencer::getTileSize()const
+{
+   return theTileSize;
+}
+
+void ossimImageSourceSequencer::setTileSize(const ossimIpt& tileSize)
+{
+   theTileSize = tileSize;
+   updateTileDimensions();
+//   initialize();
+}
+
+void ossimImageSourceSequencer::setTileSize(ossim_int32 width, ossim_int32 height)
+{
+   setTileSize(ossimIpt(width, height));
+}
+
+void ossimImageSourceSequencer::updateTileDimensions()
+{
+   bool status = false;
+   if( !theAreaOfInterest.hasNans() && !theTileSize.hasNans() )
+   {
+      ossim_float64 aoiWidth   = theAreaOfInterest.width();
+      ossim_float64 aoiHeight  = theAreaOfInterest.height();
+      ossim_float64 tileWidth  = theTileSize.x;
+      ossim_float64 tileHeight = theTileSize.y;
+      
+      if ( (aoiWidth > 0.0) && (aoiHeight > 0.0) &&
+           (tileWidth > 0.0) && (tileHeight > 0.0) )
+      {
+         theNumberOfTilesHorizontal
+            = static_cast<ossim_int64>(std::ceil(aoiWidth/tileWidth));
+         theNumberOfTilesVertical
+            = static_cast<ossim_int64>(std::ceil(aoiHeight/tileHeight));
+         status = true;
+      }
+   }
+
+   if ( !status )
+   {
+      theNumberOfTilesHorizontal = 0;
+      theNumberOfTilesVertical   = 0;
+   }
+}
+
+void ossimImageSourceSequencer::initialize()
+{
+   theInputConnection = PTR_CAST(ossimImageSource, getInput(0));
+
+   if(theInputConnection)
+   {
+      if(theTileSize.hasNans())
+      {
+         theTileSize.x = theInputConnection->getTileWidth();
+         theTileSize.y = theInputConnection->getTileHeight();
+      }
+
+      ossimDrect rect = theInputConnection->getBoundingRect();
+      if(rect.hasNans())
+      {
+         theAreaOfInterest.makeNan();
+      }
+      else
+      {
+         rect.stretchOut();
+         setAreaOfInterest(rect);
+      }
+      updateTileDimensions();
+      
+      theBlankTile  = ossimImageDataFactory::instance()->create(this,
+                                                                this);
+      if(theBlankTile.valid())
+      {
+         theBlankTile->initialize();
+      }
+   }
+}
+
+bool ossimImageSourceSequencer::canConnectMyInputTo(ossim_int32 /* inputIndex */,
+						    const ossimConnectableObject* object)const
+{      
+   return (object&& PTR_CAST(ossimImageSource, object));
+}
+
+void ossimImageSourceSequencer::connectInputEvent(ossimConnectionEvent& /* event */)
+{
+   initialize();
+}
+
+void ossimImageSourceSequencer::disconnectInputEvent(ossimConnectionEvent& /* event */)
+{
+   theInputConnection = PTR_CAST(ossimImageSource, getInput(0));
+}
+
+ossimIrect ossimImageSourceSequencer::getBoundingRect(ossim_uint32 resLevel)const
+{
+   ossimDrect temp;
+   temp.makeNan();
+   
+   if(!theInputConnection) return temp;
+   
+   if(theAreaOfInterest.hasNans())
+   {
+      return theInputConnection->getBoundingRect(resLevel);
+   }
+   
+   return theAreaOfInterest;
+}
+
+void ossimImageSourceSequencer::getDecimationFactor(ossim_uint32 resLevel,
+                                                    ossimDpt& result) const
+{
+   if(theInputConnection)
+   {
+      theInputConnection->getDecimationFactor(resLevel, result);
+   }
+   result.makeNan();
+}
+
+void ossimImageSourceSequencer::getDecimationFactors(vector<ossimDpt>& decimations) const
+{
+   if(theInputConnection)
+   {
+      theInputConnection->getDecimationFactors(decimations);
+   }   
+}
+
+ossim_uint32 ossimImageSourceSequencer::getNumberOfDecimationLevels()const
+{
+   ossim_uint32 result = 0;
+   if(theInputConnection)
+   {
+      result = theInputConnection->getNumberOfDecimationLevels();
+   }
+   return result;
+}
+
+void ossimImageSourceSequencer::setAreaOfInterest(const ossimIrect& areaOfInterest)
+{
+   if(areaOfInterest.hasNans())
+   {
+      theAreaOfInterest.makeNan();
+      theNumberOfTilesHorizontal = 0;
+      theNumberOfTilesVertical   = 0;
+   }
+
+   // let's round it to the nearest pixel value before setting it.
+   theAreaOfInterest = areaOfInterest;
+   updateTileDimensions();
+}
+
+const ossimIrect& ossimImageSourceSequencer::getAreaOfInterest()const
+{
+   return theAreaOfInterest;
+}
+
+void ossimImageSourceSequencer::setToStartOfSequence()
+{
+   theCurrentTileNumber = 0;
+}
+
+ossimRefPtr<ossimImageData> ossimImageSourceSequencer::getTile(
+   const ossimIrect& rect, ossim_uint32 resLevel)
+{
+   if(theInputConnection)
+   {
+      ossimRefPtr<ossimImageData> tile =
+         theInputConnection->getTile(rect, resLevel);
+      if (tile.valid()&&tile->getBuf())
+      {
+         return tile;
+      }
+      else
+      {
+         // We should return a valid tile for the writers.
+         theBlankTile->setImageRectangle(rect);
+         return theBlankTile;
+      }
+   }
+
+   return 0;
+}
+
+ossimRefPtr<ossimImageData> ossimImageSourceSequencer::getNextTile( ossim_uint32 resLevel )
+{
+   ossimRefPtr<ossimImageData> result = 0;
+   if ( theInputConnection )
+   {
+      ossimIrect tileRect;
+      if ( getTileRect( theCurrentTileNumber, tileRect ) )
+      {
+         ++theCurrentTileNumber;
+         result = theInputConnection->getTile(tileRect, resLevel);
+         if( !result.valid() || !result->getBuf() )
+         {	 
+            theBlankTile->setImageRectangle(tileRect);
+            result = theBlankTile;
+         }
+      }
+   }
+   return result;
+}
+
+ossimRefPtr<ossimImageData> ossimImageSourceSequencer::getTile(
+   ossim_int64 id, ossim_uint32 resLevel)
+{
+   static const char* MODULE= "ossimImageSourceSequencer::getTile(id, resLevel)";
+   if(traceDebug())
+   {
+      CLOG << "entering.."<<endl;
+   }
+
+   ossimRefPtr<ossimImageData> result = 0;
+
+   if(theInputConnection)
+   {
+      // if we have no tiles try to initialize.
+      if(getNumberOfTiles() == 0)
+      {
+         initialize();
+      }
+
+      ossimIrect tileRect;
+      if ( getTileRect( id, tileRect ) )
+      {
+         result = theInputConnection->getTile(tileRect, resLevel);
+         if( !result.valid() || !result->getBuf() )
+         {	 
+            theBlankTile->setImageRectangle(tileRect);
+            result = theBlankTile;
+         }
+      }
+      else // getTileRect failed...
+      {
+         if(traceDebug())
+         {
+            CLOG << "was not able to get an origin for id = " << id << endl;
+         }
+      }
+   }
+   else // no connection...
+   {
+      if(traceDebug())
+      {
+         CLOG << "No input connection so returing NULL" << endl;
+      }
+   }
+   if(traceDebug())
+   {
+      CLOG << "leaving.."<<endl;
+   }
+   
+   return result;
+}
+
+bool ossimImageSourceSequencer::getTileOrigin(ossim_int64 id, ossimIpt& origin) const
+{
+   bool result = false;
+   if( id >= 0 )
+   {
+      if( (theNumberOfTilesHorizontal > 0) && (theCurrentTileNumber < getNumberOfTiles()) )
+      {
+         ossim_int64 y = id / theNumberOfTilesHorizontal;
+         ossim_int64 x = id % theNumberOfTilesHorizontal;
+         if( (x < theNumberOfTilesHorizontal) && (y < theNumberOfTilesVertical) )
+         {
+            ossim_int64 ulx = theAreaOfInterest.ul().x;
+            ossim_int64 uly = theAreaOfInterest.ul().y;
+            ossim_int64 tx  = theTileSize.x;
+            ossim_int64 ty  = theTileSize.y; 
+            x = ulx + x * tx;
+            y = uly + y * ty;
+
+            //---
+            // ossimIpt currently signed 32 bit so make sure we didn't bust the
+            // bounds.
+            //---
+            if ( (x <= OSSIM_DEFAULT_MAX_PIX_SINT32) && ( y <= OSSIM_DEFAULT_MAX_PIX_SINT32) )
+            {
+               origin.x = (ossim_int32)x;
+               origin.y = (ossim_int32)y;
+               result = true;
+            }
+         }
+      }
+   }
+   return result;
+}
+
+bool ossimImageSourceSequencer::getTileRect(ossim_int64 tile_id, ossimIrect& tileRect) const
+{
+   // Fetch tile origin for this tile:
+   ossimIpt origin;
+   bool result = getTileOrigin(tile_id, origin);
+   if ( result )
+   {
+      // Establish the tile rect of interest for this tile:
+      tileRect.set_ul (origin);
+      tileRect.set_lrx(origin.x + theTileSize.x - 1);
+      tileRect.set_lry(origin.y + theTileSize.y - 1);
+   }
+   return result;
+}
+
+double ossimImageSourceSequencer::getNullPixelValue(ossim_uint32 band)const
+{
+   if (theInputConnection)
+   {
+      return theInputConnection->getNullPixelValue(band);
+   }
+
+   return ossimImageSource::getNullPixelValue(band);
+}
+
+double ossimImageSourceSequencer::getMinPixelValue(ossim_uint32 band)const
+{
+   if (theInputConnection)
+   {
+      return theInputConnection->getMinPixelValue(band);
+   }
+   
+   return ossimImageSource::getMinPixelValue(band);  
+}
+
+double ossimImageSourceSequencer::getMaxPixelValue(ossim_uint32 band)const
+{
+   if (theInputConnection)
+   {
+      return theInputConnection->getMaxPixelValue(band);
+   }
+   
+   return ossimImageSource::getMaxPixelValue(band);  
+}
+
+ossim_uint32 ossimImageSourceSequencer::getNumberOfInputBands()const
+{
+   if(theInputConnection)
+   {
+      return theInputConnection->getNumberOfOutputBands();
+   }
+
+   return 0;
+}
+
+ossim_uint32 ossimImageSourceSequencer::getTileWidth() const
+{
+   return theTileSize.x;
+}
+
+ossim_uint32 ossimImageSourceSequencer::getTileHeight()const
+{
+   return theTileSize.y;
+}
+
+void ossimImageSourceSequencer::slaveProcessTiles()
+{
+}
+
+bool ossimImageSourceSequencer::isMaster() const
+{
+   return true;
+}
+
+
+
diff --git a/ossim/src/ossim/imaging/ossimImageStatisticsSource.cpp b/ossim/src/ossim/imaging/ossimImageStatisticsSource.cpp
new file mode 100644
index 0000000..c5da468
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageStatisticsSource.cpp
@@ -0,0 +1,180 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+#include <ossim/imaging/ossimImageStatisticsSource.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/imaging/ossimImageSourceSequencer.h>
+
+ossimImageStatisticsSource::ossimImageStatisticsSource()
+      :ossimSource(0,
+                   1,
+                   0,
+                   true,
+                   false)
+{
+}
+
+ossimImageStatisticsSource::~ossimImageStatisticsSource()
+{
+   
+}
+
+void ossimImageStatisticsSource::computeStatistics()
+{
+   ossimImageSource* anInterface = PTR_CAST(ossimImageSource,
+                                                     getInput());
+
+   if(anInterface&&isSourceEnabled())
+   {
+      clearStatistics();
+      ossimScalarType outputScalarType = anInterface->getOutputScalarType();
+
+      switch(outputScalarType)
+      {
+         case OSSIM_UCHAR:
+         {
+            computeStatisticsTemplate((ossim_uint8)0);
+            break;
+         }
+         case OSSIM_USHORT16:
+         case OSSIM_USHORT11:
+         {
+            computeStatisticsTemplate((ossim_uint16)0);
+            break;
+         }
+         case OSSIM_SSHORT16:
+         {
+            computeStatisticsTemplate((ossim_sint16)0);
+            break;
+         }
+         case OSSIM_DOUBLE:
+         case OSSIM_NORMALIZED_DOUBLE:
+         {
+            computeStatisticsTemplate((ossim_float64)0);
+            break;
+         }
+         case OSSIM_FLOAT:
+         case OSSIM_NORMALIZED_FLOAT:
+         {
+            computeStatisticsTemplate((ossim_float32)0);
+            break;
+         }
+		 default :
+		 {
+			 break;
+		 }
+      }
+   }
+}
+
+bool ossimImageStatisticsSource::canConnectMyInputTo(ossim_int32 inputIndex,
+                                                     const ossimConnectableObject* object)const
+{
+   return (PTR_CAST(ossimImageSource, object)&&(inputIndex < 1));
+}
+
+template <class T>
+void ossimImageStatisticsSource::computeStatisticsTemplate(T /* dummyVariable */)
+{
+   ossimRefPtr<ossimImageSourceSequencer> sequencer = new ossimImageSourceSequencer;
+
+   sequencer->connectMyInputTo(getInput());
+   sequencer->setToStartOfSequence();
+   ossim_uint32 bands = sequencer->getNumberOfOutputBands();
+
+   if(bands)
+   {
+      setStatsSize(bands);
+      ossimRefPtr<ossimImageData> dataObject;
+      
+      while( (dataObject=sequencer->getNextTile()).valid() )
+      {
+         ossim_uint32 bandIdx = 0;
+         bands = dataObject->getNumberOfBands();
+         ossimDataObjectStatus status = dataObject->getDataObjectStatus();
+         if((status != OSSIM_EMPTY)&&
+            (dataObject->getBuf()))
+         {
+            ossim_uint32 offsetMax = dataObject->getWidth()*dataObject->getHeight();
+            for(bandIdx = 0; bandIdx < bands; ++bandIdx)
+            {
+               ossim_float64 pixelCount = 0.0;
+               ossim_uint32 offset = 0;
+               T* dataPtr   = static_cast<T*>(dataObject->getBuf(bandIdx));
+               T nullPixel = static_cast<T>(dataObject->getNullPix(bandIdx)); 
+               for(offset = 0; offset < offsetMax; ++offset)
+               {
+                  if((*dataPtr) != nullPixel)
+                  {
+                     theMean[bandIdx] += *dataPtr;
+                     if((*dataPtr) < theMin[bandIdx])
+                     {
+                        theMin[bandIdx] = (*dataPtr);
+                     }
+                     if((*dataPtr) > theMax[bandIdx])
+                     {
+                        theMax[bandIdx] = (*dataPtr);
+                     }
+                     ++pixelCount;
+                  }
+                  ++dataPtr;
+               }
+               if(pixelCount > 0)
+               {
+                  theMean[bandIdx] /= pixelCount;
+               }
+            }
+         }
+      }
+   }
+   
+   sequencer->disconnect();
+   sequencer = 0;
+}
+
+const std::vector<ossim_float64>& ossimImageStatisticsSource::getMean()const
+{
+   return theMean;
+}
+
+const std::vector<ossim_float64>& ossimImageStatisticsSource::getMin()const
+{
+   return theMin;
+}
+
+const std::vector<ossim_float64>& ossimImageStatisticsSource::getMax()const
+{
+   return theMax;
+}
+
+void ossimImageStatisticsSource::clearStatistics()
+{
+   theMean.clear();
+   theMin.clear();
+   theMax.clear();
+}
+
+void ossimImageStatisticsSource::setStatsSize(ossim_uint32 size)
+{
+   theMean.resize(size);
+   theMin.resize(size);
+   theMax.resize(size);
+
+   std::fill(theMean.begin(),
+             theMean.end(),
+             (ossim_float64)0.0);
+   std::fill(theMin.begin(),
+             theMin.end(),
+             OSSIM_DEFAULT_MAX_PIX_DOUBLE);
+   std::fill(theMax.begin(),
+             theMax.end(),
+             (ossim_float64)OSSIM_DEFAULT_MIN_PIX_DOUBLE);
+}
+
diff --git a/ossim/src/ossim/imaging/ossimImageToPlaneNormalFilter.cpp b/ossim/src/ossim/imaging/ossimImageToPlaneNormalFilter.cpp
new file mode 100644
index 0000000..9be3fc5
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageToPlaneNormalFilter.cpp
@@ -0,0 +1,489 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimImageToPlaneNormalFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimImageToPlaneNormalFilter.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNumericProperty.h>
+#include <ossim/base/ossimBooleanProperty.h>
+
+static const char* SMOOTHNESS_FACTOR_KW="smoothness_factor";
+
+RTTI_DEF1(ossimImageToPlaneNormalFilter, "ossimImageToPlaneNormalFilter", ossimImageSourceFilter);
+
+ossimImageToPlaneNormalFilter::ossimImageToPlaneNormalFilter()
+   :ossimImageSourceFilter(),
+    theTile(NULL),
+    theBlankTile(NULL),
+    theTrackScaleFlag(true),
+    theXScale(1.0),
+    theYScale(1.0),
+    theSmoothnessFactor(1.0)
+{
+}
+
+ossimImageToPlaneNormalFilter::ossimImageToPlaneNormalFilter(ossimImageSource* inputSource)
+   :ossimImageSourceFilter(inputSource),
+    theTile(NULL),
+    theBlankTile(NULL),
+    theTrackScaleFlag(true),
+    theXScale(1.0),
+    theYScale(1.0),
+    theSmoothnessFactor(1.0)
+{
+}
+
+ossimRefPtr<ossimImageData> ossimImageToPlaneNormalFilter::getTile(
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   if(!isSourceEnabled()||!theInputConnection)
+   {
+      return ossimImageSourceFilter::getTile(tileRect, resLevel);
+   }
+
+   if(!theTile.valid())
+   {
+      initialize();
+   }
+
+   if(!theTile.valid())
+   {
+      return ossimImageSourceFilter::getTile(tileRect, resLevel);
+   }
+
+   theTile->setImageRectangle(tileRect);
+
+   ossimIrect requestRect(tileRect.ul().x - 1,
+                          tileRect.ul().y - 1,
+                          tileRect.lr().x + 1,
+                          tileRect.lr().y + 1);
+
+   ossimRefPtr<ossimImageData> input =
+      theInputConnection->getTile(requestRect, resLevel);
+
+   if(!input||(input->getDataObjectStatus()==OSSIM_EMPTY)||!input->getBuf())
+   {
+      if(tileRect.completely_within(theInputBounds))
+      {
+         initializeTile();
+         theTile->validate();
+         return theTile.get();
+      }
+      theBlankTile->setImageRectangle(tileRect);
+      return theBlankTile;
+   }
+
+   double oldScaleX = theXScale;
+   double oldScaleY = theYScale;
+
+   if(resLevel > 0)
+   {
+      ossimDpt scaleFactor;
+      theInputConnection->getDecimationFactor(resLevel, scaleFactor);
+
+      if(!scaleFactor.hasNans())
+      {
+         theXScale *= scaleFactor.x;
+         theYScale *= scaleFactor.y;
+      }
+   }
+
+   computeNormals(input, theTile);
+
+   theXScale = oldScaleX;
+   theYScale = oldScaleY;
+
+   theTile->validate();
+
+   return theTile;
+}
+
+void ossimImageToPlaneNormalFilter::initializeTile()
+{
+   double* x = static_cast<double*>(theTile->getBuf(0));
+   double* y = static_cast<double*>(theTile->getBuf(1));
+   double* z = static_cast<double*>(theTile->getBuf(2));
+   
+   if(x) std::fill(x, x+theTile->getSizePerBand(), 0.0);
+   if(y) std::fill(y, y+theTile->getSizePerBand(), 0.0);
+   if(z) std::fill(z, z+theTile->getSizePerBand(), 1.0);
+}
+
+void ossimImageToPlaneNormalFilter::initialize()
+{
+   if(theInputConnection)
+   {
+      theInputConnection->initialize();
+      
+      theInputBounds = theInputConnection->getBoundingRect();
+      theTile      = ossimImageDataFactory::instance()->create(this, this);
+      theBlankTile = (ossimImageData*)(theTile->dup());
+      theTile->initialize();
+
+      if(theTrackScaleFlag)
+      {
+         ossimRefPtr<ossimImageGeometry> geom = theInputConnection->getImageGeometry();
+         if( geom.valid() )
+         {
+            ossimDpt pt = geom->getMetersPerPixel();
+            if(!pt.hasNans())
+            {
+               theXScale = 1.0/pt.x;
+               theYScale = 1.0/pt.y;
+            }
+         }
+      }
+   }
+}
+
+void ossimImageToPlaneNormalFilter::computeNormals(
+   ossimRefPtr<ossimImageData>& inputTile,
+   ossimRefPtr<ossimImageData>& outputTile)
+{
+   switch(inputTile->getScalarType())
+   {
+      case OSSIM_SSHORT16:
+      {
+         computeNormalsTemplate((ossim_sint16)0,
+                                inputTile,
+                                outputTile);
+         break;
+      }
+      case OSSIM_UCHAR:
+      {
+         computeNormalsTemplate((ossim_uint8)0,
+                                inputTile,
+                                outputTile);
+         break;
+      }
+      case OSSIM_USHORT11:
+      case OSSIM_USHORT16:
+      {
+         computeNormalsTemplate((ossim_uint16)0,
+                                inputTile,
+                                outputTile);
+         break;
+      }
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_DOUBLE:
+      {
+         computeNormalsTemplate((ossim_float64)0,
+                                inputTile,
+                                outputTile);
+         break;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT:
+      {
+         computeNormalsTemplate((ossim_float32)0,
+                                inputTile,
+                                outputTile);
+         break;
+      }
+      default:
+         break;
+   }
+}
+
+template <class T> void ossimImageToPlaneNormalFilter::computeNormalsTemplate(
+   T /* inputScalarTypeDummy */,
+   ossimRefPtr<ossimImageData>& inputTile,
+   ossimRefPtr<ossimImageData>& outputTile)
+{
+   T inputNull = (T) inputTile->getNullPix(0);
+   T* inbuf = (T*) inputTile->getBuf();
+   T outputNull = (T) outputTile->getNullPix(0);
+   double* normX = (double*)outputTile->getBuf(0);
+   double* normY = (double*)outputTile->getBuf(1);
+   double* normZ = (double*)outputTile->getBuf(2);
+   ossim_int32 inbuf_width = inputTile->getWidth();
+   ossim_int32 normbuf_width = outputTile->getWidth();
+   ossim_int32 normbuf_height = outputTile->getHeight();
+   ossimColumnVector3d normal;
+   bool valid_component = true;
+   for (ossim_int32 y=0; y<normbuf_height; y++)
+   {
+      // Establish offsets into the image and output normals buffers given row:
+      ossim_uint32 n = y*normbuf_width;
+      ossim_uint32 i = (y+1)*inbuf_width + 1;
+      
+      // Loop to compute the gradient (normal) vector [dh/dx, dh/dy, 1]:
+      for (ossim_int32 x=0; x<normbuf_width; x++)
+      {
+         // Default in case of null inputs is a flat earth:
+         normal[0] = 0;
+         normal[1] = 0;
+         normal[2] = 1.0;
+
+         // Compute the x-direction differential:
+         if (inbuf[i+1] != inputNull)
+         {
+            if (inbuf[i-1] != inputNull)
+               normal[0] = theXScale*theSmoothnessFactor*(inbuf[i+1] - inbuf[i-1]) / 2.0;
+            else if (inbuf[i] != inputNull)
+               normal[0] = theXScale*theSmoothnessFactor*(inbuf[i+1] - inbuf[i]);
+         }
+         else if ((inbuf[i] != inputNull) && (inbuf[i-1] != inputNull))
+         {
+            normal[0] = theXScale*theSmoothnessFactor*(inbuf[i] - inbuf[i-1]);
+         }
+         else
+         {
+            valid_component = false;
+         }
+
+         // Compute the y-direction differential:
+         if (valid_component)
+         {
+            if (inbuf[i+inbuf_width] != inputNull)
+            {
+               if (inbuf[i-inbuf_width] != inputNull)
+                  normal[1] = theYScale*theSmoothnessFactor*(inbuf[i+inbuf_width] - inbuf[i-inbuf_width]) / 2.0;
+               else if (inbuf[i] != inputNull)
+                  normal[1] = theYScale*theSmoothnessFactor*(inbuf[i+inbuf_width] - inbuf[i]);
+            }
+            else if ((inbuf[i] != inputNull) && (inbuf[i-inbuf_width] != inputNull))
+            {
+               normal[1] = theYScale*theSmoothnessFactor*(inbuf[i] - inbuf[i-inbuf_width]);
+            }
+            else
+            {
+               valid_component = false;
+            }
+         }
+
+         // Stuff the normalized gradient vector into the output buffers:
+         if (valid_component)
+         {
+            normal = normal.unit();
+            normX[n] = normal[0];
+            normY[n] = normal[1];
+            normZ[n] = normal[2];
+         }
+         else
+         {
+            normX[n] = outputNull;
+            normY[n] = outputNull;
+            normZ[n] = outputNull;
+         }
+         
+         ++n;
+         ++i;
+         valid_component = true;
+      }
+   }
+}
+
+bool ossimImageToPlaneNormalFilter::loadState(const ossimKeywordlist& kwl,
+                                              const char* prefix)
+{
+   ossimString scaleX     = kwl.find(prefix, ossimKeywordNames::SCALE_PER_PIXEL_X_KW);
+   ossimString scaleY     = kwl.find(prefix, ossimKeywordNames::SCALE_PER_PIXEL_Y_KW);
+   ossimString trackFlag  = kwl.find(prefix, "track_scale_flag");
+   ossimString smoothness = kwl.find(prefix, SMOOTHNESS_FACTOR_KW);
+
+   if(scaleX != "")
+   {
+      theXScale = scaleX.toDouble();
+   }
+   if(scaleY != "")
+   {
+      theYScale = scaleY.toDouble();
+   }
+   if(trackFlag != "")
+   {
+      theTrackScaleFlag = trackFlag.toBool();
+   }
+   if(smoothness!="")
+   {
+      theSmoothnessFactor = smoothness.toDouble();
+   }
+
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
+bool ossimImageToPlaneNormalFilter::saveState(ossimKeywordlist& kwl,
+                                              const char* prefix)const
+{
+   kwl.add(prefix,
+           ossimKeywordNames::SCALE_PER_PIXEL_X_KW,
+           theXScale,
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::SCALE_PER_PIXEL_Y_KW,
+           theXScale,
+           true);
+
+   kwl.add(prefix,
+           "track_scale_flag",
+           (ossim_uint32)theTrackScaleFlag,
+           true);
+
+   kwl.add(prefix,
+           SMOOTHNESS_FACTOR_KW,
+           theSmoothnessFactor,
+           true);
+
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
+double ossimImageToPlaneNormalFilter::getMinPixelValue(ossim_uint32 band)const
+{
+   if(!isSourceEnabled())
+   {
+      return ossimImageSourceFilter::getMinPixelValue(band);
+   }
+   return -1;
+}
+
+double ossimImageToPlaneNormalFilter::getMaxPixelValue(ossim_uint32 band)const
+{
+   if(!isSourceEnabled())
+   {
+      return ossimImageSourceFilter::getMaxPixelValue(band);
+   }
+   return 1.0;
+}
+
+ossimScalarType ossimImageToPlaneNormalFilter::getOutputScalarType() const
+{
+   if(isSourceEnabled())
+   {
+      return OSSIM_DOUBLE;
+   }
+   
+   return ossimImageSourceFilter::getOutputScalarType();
+}
+
+ossim_uint32 ossimImageToPlaneNormalFilter::getNumberOfOutputBands() const
+{
+   if(isSourceEnabled())
+   {
+      return 3;
+   }
+   return ossimImageSourceFilter::getNumberOfOutputBands();
+}
+
+void ossimImageToPlaneNormalFilter::setXScale(const double& scale)
+{
+   theXScale = scale;
+}
+
+double ossimImageToPlaneNormalFilter::getXScale()const
+{
+   return theXScale;
+}
+
+double ossimImageToPlaneNormalFilter::getYScale()const
+{
+   return theYScale;
+}
+
+void ossimImageToPlaneNormalFilter::setYScale(const double& scale)
+{
+   theYScale = scale;
+}
+
+void ossimImageToPlaneNormalFilter::setTrackScaleFlag(bool flag)
+{
+   theTrackScaleFlag = flag;
+}
+
+bool ossimImageToPlaneNormalFilter::getTrackScaleFlag()const
+{
+   return theTrackScaleFlag;
+}
+
+void ossimImageToPlaneNormalFilter::setSmoothnessFactor(double value)
+{
+   theSmoothnessFactor = value;
+}
+
+double ossimImageToPlaneNormalFilter::getSmoothnessFactor()const
+{
+   return theSmoothnessFactor;
+}
+
+void ossimImageToPlaneNormalFilter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   ossimString name = property->getName();
+   if((name == "smoothnessFactor")||
+      (name == "gain"))
+   {
+      theSmoothnessFactor = property->valueToString().toDouble();
+      initialize();
+   }
+   else if(name == "xscale")
+   {
+      theXScale = property->valueToString().toDouble();
+      initialize();
+   }
+   else if(name == "yscale")
+   {
+      theYScale = property->valueToString().toDouble();
+      initialize();
+   }
+   else if(name == "autoTrackScaleFlag")
+   {
+      theTrackScaleFlag = property->valueToString().toDouble();
+      initialize();
+   }
+   else
+   {
+      ossimImageSourceFilter::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimImageToPlaneNormalFilter::getProperty(const ossimString& name)const
+{
+   if((name == "smoothnessFactor")||
+      (name == "gain"))
+   {
+      ossimNumericProperty* prop = new ossimNumericProperty("gain", ossimString::toString(theSmoothnessFactor), .0001, 40);
+      prop->setCacheRefreshBit();
+      return prop;
+   }
+   else if(name == "xscale")
+   {
+      ossimNumericProperty* prop = new ossimNumericProperty(name, ossimString::toString(theXScale), .0001, 50000);
+      prop->setCacheRefreshBit();
+      return prop;
+   }
+   else if(name == "yscale")
+   {
+      ossimNumericProperty* prop = new ossimNumericProperty(name, ossimString::toString(theYScale), .0001, 50000);
+      prop->setCacheRefreshBit();
+      return prop;
+   }
+   else if(name == "autoTrackScaleFlag")
+   {
+      ossimBooleanProperty* prop = new ossimBooleanProperty(name, theTrackScaleFlag);
+      prop->setCacheRefreshBit();
+      return prop;
+   }
+   
+   return ossimImageSourceFilter::getProperty(name);
+}
+
+void ossimImageToPlaneNormalFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageSourceFilter::getPropertyNames(propertyNames);
+   propertyNames.push_back("gain");
+   propertyNames.push_back("xscale");
+   propertyNames.push_back("yscale");
+   propertyNames.push_back("autoTrackScaleFlag");
+}
+
diff --git a/src/ossim/imaging/ossimImageWriter.cpp b/ossim/src/ossim/imaging/ossimImageWriter.cpp
similarity index 100%
rename from src/ossim/imaging/ossimImageWriter.cpp
rename to ossim/src/ossim/imaging/ossimImageWriter.cpp
diff --git a/ossim/src/ossim/imaging/ossimImageWriterFactory.cpp b/ossim/src/ossim/imaging/ossimImageWriterFactory.cpp
new file mode 100644
index 0000000..715fc88
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageWriterFactory.cpp
@@ -0,0 +1,373 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+// $Id: ossimImageWriterFactory.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimImageWriterFactory.h>
+#include <ossim/base/ossimImageTypeLut.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/imaging/ossimGeneralRasterWriter.h>
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <ossim/imaging/ossimJpegWriter.h>
+#include <ossim/imaging/ossimNitfWriter.h>
+#include <ossim/imaging/ossimNitf20Writer.h>
+#include <ossim/imaging/ossimPdfWriter.h>
+#include <ossim/imaging/ossimTiffWriter.h>
+
+ossimImageWriterFactory* ossimImageWriterFactory::theInstance = (ossimImageWriterFactory*)NULL;
+
+
+ossimImageWriterFactory* ossimImageWriterFactory::instance()
+{
+   if(!theInstance)
+   {
+      theInstance = new ossimImageWriterFactory;
+      ossimImageWriterFactoryRegistry::instance()->registerFactory(theInstance);
+   }
+
+   return theInstance;
+}
+
+ossimImageWriterFactory::~ossimImageWriterFactory()
+{
+   theInstance = (ossimImageWriterFactory*)NULL;
+}
+
+ossimImageFileWriter *ossimImageWriterFactory::createWriterFromExtension(
+   const ossimString& fileExtension)const
+{
+   ossimImageFileWriter* result = 0;
+
+   ossimString ext = fileExtension;
+   ext.downcase();
+   
+   if( (ext == "tif")|| (ext == "tiff") )
+   {
+      result = new ossimTiffWriter;
+   }
+   else if( (ext == "jpg")|| (ext == "jpeg") )
+   {
+      result = new ossimJpegWriter;
+   }
+   else if( (ext == "ras") || (ext == "bsq") )
+   {
+      // Default is OSSIM_GENERAL_RASTER_BSQ
+      result = new ossimGeneralRasterWriter;
+   }
+   else if(ext == "bil")
+   {
+      result = new ossimGeneralRasterWriter;
+      result->setOutputImageType(OSSIM_GENERAL_RASTER_BIL);
+   }
+   else if(ext == "bip")
+   {
+      result = new ossimGeneralRasterWriter;
+      result->setOutputImageType(OSSIM_GENERAL_RASTER_BIP);
+   }
+   else if((ext == "ntf")||
+           (ext == "nitf"))
+   {
+      result = new ossimNitfWriter;
+   }
+   else if( ext == "pdf" )
+   {
+      result = new ossimPdfWriter;
+   }
+   
+   return result;
+}
+
+ossimImageFileWriter*
+ossimImageWriterFactory::createWriter(const ossimKeywordlist& kwl,
+                                      const char *prefix)const
+{
+   ossimString type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
+   ossimImageFileWriter* result = (ossimImageFileWriter*)NULL;
+   
+   if(type != "")
+   {
+      result = createWriter(type);
+      if (result)
+      {
+         if (result->hasImageType(type))
+         {
+            ossimKeywordlist kwl2(kwl);
+            kwl2.add(prefix,
+                     ossimKeywordNames::IMAGE_TYPE_KW,
+                     type,
+                     true);
+         
+            result->loadState(kwl2, prefix);
+         }
+         else
+         {
+            result->loadState(kwl, prefix);
+         }
+      }
+   }
+
+   return result;
+}
+
+ossimImageFileWriter*
+ossimImageWriterFactory::createWriter(const ossimString& typeName)const
+{
+   ossimString mimeType = typeName;
+   mimeType = mimeType.downcase();
+	
+   // Check for tiff writer.
+   ossimRefPtr<ossimImageFileWriter> writer = createFromMimeType(mimeType);
+	
+   if(writer.valid())
+   {
+      return writer.release();
+   }
+ 
+   writer = new ossimTiffWriter;
+   
+   if (STATIC_TYPE_NAME(ossimTiffWriter) == typeName )
+   {
+      return writer.release();
+   }
+   else
+   {
+      // See if the type name is supported by the writer.
+      if ( writer->hasImageType(typeName) )
+      {
+         writer->setOutputImageType(typeName);
+         return writer.release();
+      }
+   }
+
+   // Check for jpeg writer.
+   writer = new ossimJpegWriter;
+   if ( writer->getClassName() == typeName )
+   {
+      return writer.release();
+   }
+   else
+   {
+      // See if the type name is supported by the writer.
+      if ( writer->hasImageType(typeName) )
+      {
+         writer->setOutputImageType(typeName);
+         return writer.release();
+      }
+   }
+	
+   // Check for general raster writer.
+   writer = new ossimGeneralRasterWriter;
+   if ( writer->getClassName() == typeName )
+   {
+      return writer.release();
+   }
+   else
+   {
+      // See if the type name is supported by the writer.
+      if ( writer->hasImageType(typeName) )
+      {
+         writer->setOutputImageType(typeName);
+         return writer.release();
+      }
+   }
+
+   // Check for nitf writer.
+   writer = new ossimNitfWriter;
+   if ( writer->getClassName() == typeName )
+   {
+      return writer.release();
+   }
+   else
+   {
+      // See if the type name is supported by the writer.
+      if ( writer->hasImageType(typeName) )
+      {
+         writer->setOutputImageType(typeName);
+         return writer.release();
+      }
+   }
+
+   // Check for nitf writer.
+   writer = new ossimNitf20Writer;
+   if ( writer->getClassName() == typeName )
+   {
+      return writer.release();
+   }
+   else
+   {
+      // See if the type name is supported by the writer.
+      if ( writer->hasImageType(typeName) )
+      {
+         writer->setOutputImageType(typeName);
+         return writer.release();
+      }
+   }
+
+   // Check for pdf writer.
+   writer = new ossimPdfWriter;
+   if ( writer->getClassName() == typeName )
+   {
+      return writer.release();
+   }
+   else
+   {
+      // See if the type name is supported by the writer.
+      if ( writer->hasImageType(typeName) )
+      {
+         writer->setOutputImageType(typeName);
+         return writer.release();
+      }
+   }
+   
+   writer = 0; // Not a nitf writer.   
+
+   return writer.release(); // Return a null writer.
+}
+
+ossimImageFileWriter* ossimImageWriterFactory::createFromMimeType(
+   const ossimString& mimeType)const
+{
+   if((mimeType == "image/jpeg")||
+      (mimeType == "image/jpg"))
+   {
+      ossimJpegWriter* writer = new ossimJpegWriter;
+      writer->setOutputImageType("jpeg");
+      return writer;
+   }
+   else if((mimeType == "image/tiff")||
+           (mimeType == "image/tif")||
+           (mimeType == "image/gtif")||
+           (mimeType == "image/gtiff"))
+   {
+      ossimTiffWriter* writer = new ossimTiffWriter;
+      writer->setOutputImageType("tiff_tiled_band_separate");
+      return writer;
+   }
+   else if((mimeType == "image/nitf") ||
+           (mimeType == "image/ntf"))
+   {
+      ossimNitfWriter* writer = new ossimNitfWriter;
+      writer->setOutputImageType("nitf_block_band_separate");
+      return writer;
+   }
+   else if((mimeType == "image/ras"))
+   {
+      ossimGeneralRasterWriter* writer = new ossimGeneralRasterWriter;
+      writer->setOutputImageType("general_raster_bsq");
+      return writer;
+   }
+   else if((mimeType == "application/pdf")||
+           (mimeType == "image/pdf"))
+   {
+      ossimPdfWriter* writer = new ossimPdfWriter;
+      writer->setOutputImageType("ossim_pdf");
+      return writer;
+   }
+   return 0;
+}
+
+ossimObject* ossimImageWriterFactory::createObject(const ossimKeywordlist& kwl,
+                                                   const char *prefix)const
+{
+   return createWriter(kwl, prefix);
+}
+
+ossimObject* ossimImageWriterFactory::createObject(const ossimString& typeName)const
+{
+   return createWriter(typeName);
+}
+
+
+void ossimImageWriterFactory::getExtensions(std::vector<ossimString>& result)const
+{
+   result.push_back("ras");
+   result.push_back("bsq");
+   result.push_back("bil");
+   result.push_back("bip");
+   result.push_back("tif");
+   result.push_back("jpg");
+   result.push_back("ntf");
+   result.push_back("pdf");
+}
+
+void ossimImageWriterFactory::getTypeNameList(std::vector<ossimString>& typeList)const
+{
+   typeList.push_back(STATIC_TYPE_NAME(ossimTiffWriter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimJpegWriter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimGeneralRasterWriter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimNitfWriter));
+   typeList.push_back(STATIC_TYPE_NAME(ossimNitf20Writer));
+   typeList.push_back(STATIC_TYPE_NAME(ossimPdfWriter));   
+}
+
+void ossimImageWriterFactory::getImageFileWritersBySuffix(
+   ossimImageWriterFactoryBase::ImageFileWriterList& result, const ossimString& ext)const
+{
+   ossimString testExt = ext.downcase();
+   if(testExt == "tiff" || testExt == "tif")
+   {
+      result.push_back(new ossimTiffWriter);
+   }
+   else if(testExt == "ntf" || testExt == "nitf")
+   {
+      result.push_back(new ossimNitfWriter);
+   }
+   else if(testExt == "jpg" || testExt == "jpeg")
+   {
+      result.push_back(new ossimJpegWriter);
+   }
+   else if(testExt == "ras" || testExt == "bsq" || testExt == "bil" || testExt == "bip")
+   {
+      result.push_back(new ossimGeneralRasterWriter);
+   }
+   else if( testExt == "pdf" )
+   {
+      result.push_back( new ossimPdfWriter );
+   }
+}
+
+void ossimImageWriterFactory::getImageFileWritersByMimeType(
+   ossimImageWriterFactoryBase::ImageFileWriterList& result, const ossimString& mimeType ) const
+{
+   ossimString testExt = mimeType.downcase();
+   testExt = ossimString(testExt.begin()+6, testExt.end());
+   
+   getImageFileWritersBySuffix(result, testExt);
+}
+
+void ossimImageWriterFactory::getImageTypeList( std::vector<ossimString>& imageTypeList ) const
+{
+   // Add the tiff writer types.
+   ossimRefPtr<ossimImageFileWriter> writer = new ossimTiffWriter;
+   writer->getImageTypeList(imageTypeList);
+
+   // Add the jpeg writer types.
+   writer = new ossimJpegWriter;
+   writer->getImageTypeList(imageTypeList);
+
+   // Add the general raster writer types.
+   writer = new ossimGeneralRasterWriter;
+   writer->getImageTypeList(imageTypeList);
+
+   // Add the nitf writer types.
+   writer = new ossimNitfWriter;
+   writer->getImageTypeList(imageTypeList);
+   
+   // Add the nitf writer types.
+   writer = new ossimNitf20Writer;
+   writer->getImageTypeList(imageTypeList);
+   
+   // Add the pdf writer types.
+   writer = new ossimPdfWriter;
+   writer->getImageTypeList(imageTypeList);
+   
+   writer = 0;
+}
+
diff --git a/src/ossim/imaging/ossimImageWriterFactoryBase.cpp b/ossim/src/ossim/imaging/ossimImageWriterFactoryBase.cpp
similarity index 100%
rename from src/ossim/imaging/ossimImageWriterFactoryBase.cpp
rename to ossim/src/ossim/imaging/ossimImageWriterFactoryBase.cpp
diff --git a/ossim/src/ossim/imaging/ossimImageWriterFactoryRegistry.cpp b/ossim/src/ossim/imaging/ossimImageWriterFactoryRegistry.cpp
new file mode 100644
index 0000000..8d2dc42
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimImageWriterFactoryRegistry.cpp
@@ -0,0 +1,293 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Frank Warmerdam (warmerda at home.com)
+//
+//*******************************************************************
+//  $Id: ossimImageWriterFactoryRegistry.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimImageWriterFactory.h>
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <ossim/imaging/ossimImageFileWriter.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimString.h>
+#include <algorithm>
+#include <iterator>
+#include <ostream>
+
+//ossimImageWriterFactoryRegistry* ossimImageWriterFactoryRegistry::theInstance = NULL;
+
+ossimImageWriterFactoryRegistry::ossimImageWriterFactoryRegistry()
+{
+}
+
+ossimImageWriterFactoryRegistry* ossimImageWriterFactoryRegistry::instance()
+{
+   static ossimImageWriterFactoryRegistry inst;
+   static bool initInst = false;
+   if(!initInst)
+   {
+      ossimObjectFactoryRegistry::instance()->registerFactory(&inst);
+      ossimImageWriterFactory::instance();
+      initInst = true;
+   }
+
+   return &inst;
+//   if(!theInstance)
+//   {
+//      theInstance = new ossimImageWriterFactoryRegistry;
+//   }
+
+//   return theInstance;
+}
+
+
+ossimImageFileWriter* ossimImageWriterFactoryRegistry::createWriter(const ossimFilename& filename)const
+{
+   ossimImageFileWriter * writer = createWriterFromExtension(filename.ext().downcase());
+   if(writer)
+   {
+      writer->setFilename(filename);
+   }
+   
+   return writer;
+}
+
+ossimObject* ossimImageWriterFactoryRegistry::createObject(const ossimKeywordlist &kwl,
+                                                           const char *prefix)const
+{
+   return createObjectFromRegistry(kwl, prefix);
+}
+
+ossimObject* ossimImageWriterFactoryRegistry::createObject(const ossimString& typeName)const
+{
+   return createObjectFromRegistry(typeName);
+}
+
+void ossimImageWriterFactoryRegistry::getTypeNameList(std::vector<ossimString>& typeList)const
+{
+   getAllTypeNamesFromRegistry(typeList);
+}
+
+ossimImageFileWriter *ossimImageWriterFactoryRegistry::createWriterFromExtension(const ossimString& fileExtension)const
+{
+   ossimImageFileWriter *writer = NULL;
+   ossimImageWriterFactoryBase::ImageFileWriterList result;
+   getImageFileWritersBySuffix(result, fileExtension);
+   if(!result.empty())
+   {
+      writer = result[0].release();
+      result.clear();
+   }
+   return writer;
+}
+
+ossimImageFileWriter *ossimImageWriterFactoryRegistry::createWriter(const ossimKeywordlist &kwl,
+                                                                const char *prefix)const
+{
+   // let's see if we ned to return an object based on extension.
+   // this is specified by the type to be a generic
+   // ossimImageFileWriter
+   //
+   ossimString type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
+
+   if(type == "ossimImageFileWriter")
+   {
+      ossimFilename filename = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
+
+      if((filename != "")&&
+         (filename.ext() != ""))
+      {
+         ossimImageFileWriter* writer = createWriterFromExtension(filename.ext());
+
+         if(writer)
+         {
+            writer->setFilename(filename);
+         }
+         return writer;
+      }
+   }
+   
+   vector<ossimImageWriterFactoryBase*>::const_iterator factories;
+   ossimImageFileWriter *result = NULL;
+
+   factories = m_factoryList.begin();
+   while(factories != m_factoryList.end())
+   {
+      result = (*factories)->createWriter(kwl, prefix);
+      if(result)
+      {
+         return result;
+      }
+      ++factories;
+   }
+
+   return result;
+}
+
+ossimImageFileWriter *ossimImageWriterFactoryRegistry::createWriter(const ossimString& typeName)const
+{
+   vector<ossimImageWriterFactoryBase*>::const_iterator factories;
+   ossimImageFileWriter *result = NULL;
+
+   factories = m_factoryList.begin();
+   while(factories != m_factoryList.end())
+   {
+      result = (*factories)->createWriter(typeName);
+      if(result)
+      {
+         return result;
+      }
+      ++factories;
+   }
+
+   return result;
+}
+
+
+void ossimImageWriterFactoryRegistry::getImageTypeList(std::vector<ossimString>& typeList)const
+{
+   vector<ossimString> result;
+   vector<ossimImageWriterFactoryBase*>::const_iterator iter = m_factoryList.begin();
+   
+   while(iter != m_factoryList.end())
+   {
+      result.clear();
+      (*iter)->getImageTypeList(result);
+      
+      // now append to the end of the typeList.
+      typeList.insert(typeList.end(),
+                      result.begin(),
+                      result.end());
+      ++iter;
+   }  
+}
+
+void ossimImageWriterFactoryRegistry::getImageFileWritersBySuffix(ossimImageWriterFactoryBase::ImageFileWriterList& result,
+                                                                  const ossimString& ext)const
+{
+   ossimImageWriterFactoryBase::ImageFileWriterList tempResult;
+   vector<ossimImageWriterFactoryBase*>::const_iterator iter = m_factoryList.begin();
+   
+   while(iter != m_factoryList.end())
+   {
+      result.clear();
+      (*iter)->getImageFileWritersBySuffix(tempResult, ext);
+      
+      // now append to the end of the typeList.
+      result.insert(result.end(),
+                      tempResult.begin(),
+                      tempResult.end());
+      ++iter;
+   }  
+   
+}
+
+void ossimImageWriterFactoryRegistry::getImageFileWritersByMimeType(ossimImageWriterFactoryBase::ImageFileWriterList& result,
+                                                                    const ossimString& mimeType)const
+{
+   ossimImageWriterFactoryBase::ImageFileWriterList tempResult;
+   vector<ossimImageWriterFactoryBase*>::const_iterator iter = m_factoryList.begin();
+   
+   while(iter != m_factoryList.end())
+   {
+      result.clear();
+      (*iter)->getImageFileWritersByMimeType(tempResult, mimeType);
+      
+      // now append to the end of the typeList.
+      result.insert(result.end(),
+                    tempResult.begin(),
+                    tempResult.end());
+      ++iter;
+   }  
+}
+
+std::ostream& ossimImageWriterFactoryRegistry::printImageTypeList(
+   std::ostream& out)const
+{
+   std::vector<ossimString> outputType;
+   
+   this->getImageTypeList(outputType);
+   std::copy(outputType.begin(),
+             outputType.end(),
+             std::ostream_iterator<ossimString>(out, "\n"));
+   out << std::endl;
+   return out;
+}
+
+std::ostream& ossimImageWriterFactoryRegistry::printWriterProps(std::ostream& out)const
+{
+   // Loop through factories:
+   vector<ossimImageWriterFactoryBase*>::const_iterator factoryIter = m_factoryList.begin();
+   while( factoryIter != m_factoryList.end() )
+   {
+      out << "factory: " << (*factoryIter)->getClassName() << "\n\n";
+
+      // Loop through writer classes in factory.
+      std::vector<ossimString> typeNames;
+      (*factoryIter)->getTypeNameList(typeNames);
+      std::vector<ossimString>::const_iterator typeNamesIter = typeNames.begin();
+      while (typeNamesIter != typeNames.end())
+      {
+         ossimRefPtr<ossimImageFileWriter> writer = (*factoryIter)->createWriter(*typeNamesIter);
+         if ( writer.valid() )
+         {
+            out << "writer:\n" << writer->getClassName() << "\n";
+
+            // Loop through writer types, e.g. tiff_tiled_band_separate
+            std::vector<ossimString> imageTypeList;
+            writer->getImageTypeList(imageTypeList);
+            std::vector<ossimString>::const_iterator imageTypeListIter = imageTypeList.begin();
+            out << "\ntypes:\n";
+            while ( imageTypeListIter != imageTypeList.end() )
+            {
+               out << (*imageTypeListIter) << "\n";
+               ++imageTypeListIter;
+            }
+
+            // Loop through writer properties, e.g. compression_quality.
+            out << "\nproperties:\n";
+            std::vector<ossimString> propNames;
+            writer->getPropertyNames(propNames);
+            std::vector<ossimString>::const_iterator propNamesIter = propNames.begin();
+            while ( propNamesIter != propNames.end() )
+            {
+               out << (*propNamesIter) << "\n";
+               
+               ++propNamesIter;
+            }
+            out << "\n";
+         }
+
+         ++typeNamesIter;
+      }
+      
+      ++factoryIter;
+   }
+   return out;
+}
+
+extern "C"
+{
+  void* ossimImageWriterFactoryRegistryGetInstance()
+  {
+    return ossimImageWriterFactoryRegistry::instance();
+  }
+}
+
+ossimImageWriterFactoryRegistry::ossimImageWriterFactoryRegistry(const ossimImageWriterFactoryRegistry&)
+   :
+      ossimObjectFactory()
+{
+}
+
+void ossimImageWriterFactoryRegistry::operator=(const ossimImageWriterFactoryRegistry&)
+{
+}
+
diff --git a/ossim/src/ossim/imaging/ossimIndexToRgbLutFilter.cpp b/ossim/src/ossim/imaging/ossimIndexToRgbLutFilter.cpp
new file mode 100644
index 0000000..d81b2a3
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimIndexToRgbLutFilter.cpp
@@ -0,0 +1,514 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Oscar Kramer
+//
+//*************************************************************************
+// $Id: ossimIndexToRgbLutFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimIndexToRgbLutFilter.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimRgbVector.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimFilenameProperty.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimNumericProperty.h>
+
+static const ossimTrace traceDebug("ossimIndexToRgbLutFilter:debug");
+
+RTTI_DEF1(ossimIndexToRgbLutFilter, "ossimIndexToRgbLutFilter", ossimImageSourceFilter);
+
+static const char* MIN_VALUE_KW = "min_value";
+static const char* MAX_VALUE_KW = "max_value";
+static const char* MODE_KW = "mode";
+static const char* LUT_FILE_KW = "lut_file";
+
+ossimIndexToRgbLutFilter::ossimIndexToRgbLutFilter()
+:ossimImageSourceFilter(),
+ theMinValue(ossim::nan()),
+ theMaxValue(ossim::nan()),
+ theMinValueOverride(false),
+ theMaxValueOverride(false),
+ theMode(REGULAR),
+ theTile(0),
+ theLutFile("")
+{
+   setDescription("Look-up-table remapper from single-band index image to 24-bit RGB.");
+}
+
+ossimIndexToRgbLutFilter::~ossimIndexToRgbLutFilter()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimIndexToRgbLutFilter::getTile(const ossimIrect& tileRect,
+                                                              ossim_uint32 resLevel)
+{
+   if(!theInputConnection || (theLut.size() == 0))
+      return 0;
+
+   ossimRefPtr<ossimImageData> tile = theInputConnection->getTile(tileRect, resLevel);
+   if (!tile || !tile->getBuf())
+      return 0;
+   if(!theTile)
+   {
+      allocate();
+      if (!theTile)
+         return 0;
+   }
+
+   theTile->setImageRectangle(tileRect);
+   theTile->makeBlank();
+
+   // Quick handling special case of empty input tile:
+   if (tile->getDataObjectStatus() == OSSIM_EMPTY)
+      return theTile;
+
+   ossim_uint8* outBuf[3];
+   outBuf[0] = (ossim_uint8*)(theTile->getBuf(0));
+   outBuf[1] = (ossim_uint8*)(theTile->getBuf(1));
+   outBuf[2] = (ossim_uint8*)(theTile->getBuf(2));
+
+   ossim_uint32 maxLength = tile->getWidth()*tile->getHeight();
+   ossimRgbVector color;
+   const ossimRgbVector null_color (theTile->getNullPix(0), theTile->getNullPix(1), theTile->getNullPix(2));
+   double index;
+   std::map<double, ossimRgbVector>::const_iterator lut_entry;
+   double null_index = theInputConnection->getNullPixelValue();
+
+   for (ossim_uint32 pixel=0; pixel<maxLength; ++pixel)
+   {
+      // Convert input pixel to a double index value:
+      switch(tile->getScalarType())
+      {
+      case OSSIM_DOUBLE:
+         index = ((double*) tile->getBuf())[pixel];
+         break;
+      case OSSIM_SSHORT16:
+         index = (double)(((ossim_sint16*) tile->getBuf())[pixel]);
+         break;
+      case OSSIM_FLOAT:
+      case OSSIM_NORMALIZED_FLOAT:
+         index = (double)(((float*) tile->getBuf())[pixel]);
+         break;
+      case OSSIM_UCHAR:
+         index = (double)(((ossim_uint8*) tile->getBuf())[pixel]);
+         break;
+      case OSSIM_USHORT16:
+      case OSSIM_USHORT11:
+         index = (double)(((ossim_uint16*) tile->getBuf())[pixel]);
+         break;
+      default:
+         break;
+      }
+
+      // Do not remap null pixels, leave the output pixel "blank" which is null-pixel value:
+      if (index == null_index)
+         continue;
+
+      // REGULAR mode needs to clamp the indices to min max for non-null pixels:
+      if (theMode == REGULAR)
+      {
+         if (index < theMinValue)
+            index = theMinValue;
+         else if (index > theMaxValue)
+            index = theMaxValue;
+      }
+
+      // Now perform look-up depending on mode:
+      if (theMode == LITERAL)
+      {
+         lut_entry = theLut.find(index);
+         if (lut_entry == theLut.end())
+            color = null_color;
+         else
+            color = lut_entry->second;
+      }
+      else
+      {
+         // Vertices and Regular mode perform same interpolation here between the line segments
+         // vertices:
+         lut_entry = theLut.find(index);
+         if (lut_entry != theLut.end())
+         {
+            // Got exact match, no interpolation needed:
+            color = lut_entry->second;
+         }
+         else
+         {
+            lut_entry = theLut.upper_bound(index);
+            if ((lut_entry == theLut.end()) || (lut_entry == theLut.begin()))
+               color = null_color;
+            else
+            {
+               // Need to linearly interpolate:
+               double index_hi = lut_entry->first;
+               ossimRgbVector color_hi (lut_entry->second);
+               --lut_entry;
+               double index_lo = lut_entry->first;
+               ossimRgbVector color_lo (lut_entry->second);
+               double w_lo = (index_hi - index)/(index_hi - index_lo);
+               double w_hi = 1.0 - w_lo;
+               color.setR(ossim::round<ossim_uint8, double>( color_hi.getR()*w_hi + color_lo.getR()*w_lo ));
+               color.setG(ossim::round<ossim_uint8, double>( color_hi.getG()*w_hi + color_lo.getG()*w_lo ));
+               color.setB(ossim::round<ossim_uint8, double>( color_hi.getB()*w_hi + color_lo.getB()*w_lo ));
+            }
+         }
+      }
+
+      // Assign this output pixel:
+      outBuf[0][pixel]  = color.getR();
+      outBuf[1][pixel]  = color.getG();
+      outBuf[2][pixel]  = color.getB();
+
+   } // end loop over tile's pixels
+
+   theTile->validate();
+   return theTile;
+}
+
+void ossimIndexToRgbLutFilter::allocate()
+{
+   if(!theInputConnection) return;
+
+   theTile = ossimImageDataFactory::instance()->create(this, 3, this);
+   if(theTile.valid())
+   {
+      theTile->initialize();
+   }
+}
+
+void ossimIndexToRgbLutFilter::initialize()
+{
+   // This assigns theInputConnection if one is there.
+   ossimImageSourceFilter::initialize();
+
+   // theTile will get allocated on first getTile call.
+   theTile = 0;
+
+   if ( theInputConnection )
+   {
+      // Initialize the chain on the left hand side of us.
+      theInputConnection->initialize();
+      if(!theMinValueOverride)
+         theMinValue = theInputConnection->getMinPixelValue(0);
+      if(!theMaxValueOverride)
+         theMaxValue = theInputConnection->getMaxPixelValue(0);
+      if(theMinValue > theMaxValue)
+         swap(theMinValue, theMaxValue);
+   }
+}
+
+void ossimIndexToRgbLutFilter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(property.valid())
+   {
+      ossimString value = property->valueToString();
+      value = value.trim();
+
+      if(property->getName() == "LUT file")
+      {
+         setLut(ossimFilename(property->valueToString()));
+      }
+      else
+      {
+         ossimImageSourceFilter::setProperty(property);
+      }
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimIndexToRgbLutFilter::getProperty(const ossimString& name)const
+{
+   ossimRefPtr<ossimProperty> property = 0;
+   if(name == "LUT file")
+   {
+      ossimFilenameProperty* filenameProperty = new ossimFilenameProperty(name, theLutFile);
+      filenameProperty->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_INPUT);
+      filenameProperty->clearChangeType();
+      filenameProperty->setCacheRefreshBit();
+      filenameProperty->setReadOnlyFlag(false);
+      property = filenameProperty;
+   }
+   else
+   {
+      property = ossimImageSourceFilter::getProperty(name);
+   }
+   return property;
+}
+
+void ossimIndexToRgbLutFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageSourceFilter::getPropertyNames(propertyNames);
+   propertyNames.push_back("LUT file");
+}
+
+bool ossimIndexToRgbLutFilter::saveState(ossimKeywordlist& kwl, const char* prefix)const
+{
+   if (theMinValueOverride)
+      kwl.add(prefix, MIN_VALUE_KW, theMinValue, true);
+
+   if (theMaxValueOverride)
+      kwl.add(prefix, MAX_VALUE_KW, theMaxValue, true);
+
+   ossimString value;
+   switch (theMode)
+   {
+   case LITERAL:
+      value = "literal";
+      break;
+   case VERTICES:
+      value = "vertices";
+      break;
+   default:
+      value = "regular";
+   }
+   kwl.add(prefix, MODE_KW,  value.c_str(), true);
+
+   bool rtn_stat = true;
+
+   // Save the actual LUT:
+   const ossimString entry_kw ("entry");
+   ossimString color_keyword, base_keyword;
+   ossimRgbVector rgbVector;
+   ossimString blank(" ");
+
+   ossim_uint32 entry = 0;
+   std::map<double, ossimRgbVector>::const_iterator iter =  theLut.begin();
+   while (iter != theLut.end())
+   {
+      base_keyword = entry_kw + ossimString::toString(entry);
+      if ((theMode == LITERAL) || (theMode == VERTICES))
+      {
+         // Index and color are sub-entries for these modes:
+         kwl.add(prefix, (base_keyword+".index").chars(), iter->first);
+         color_keyword = base_keyword + ".color";
+      }
+      else
+      {
+         color_keyword = base_keyword;
+      }
+
+      rgbVector = iter->second;
+      value = ossimString::toString((int)rgbVector.getR()) + blank +
+            ossimString::toString((int)rgbVector.getG()) + blank +
+            ossimString::toString((int)rgbVector.getB());
+      kwl.add(prefix, color_keyword.chars(), value.chars());
+      ++iter;
+      ++entry;
+   }
+
+   rtn_stat &= ossimImageSourceFilter::saveState(kwl, prefix);
+   return rtn_stat;
+}
+
+bool ossimIndexToRgbLutFilter::loadState(const ossimKeywordlist& orig_kwl, const char* prefix)
+{
+   bool return_state = true;
+   ossimKeywordlist* kwl = new ossimKeywordlist(orig_kwl); // need non-const copy
+
+   // First look for a LUT filename, and add its contents to the original KWL:
+   theLutFile = kwl->find(prefix, LUT_FILE_KW);
+   if (!theLutFile.empty())
+   {
+      // Need new (non const) KWL to hold merged contents, maintaining proper prefix if any:
+      ossimKeywordlist lut_kwl;
+      if (lut_kwl.addFile(theLutFile))
+         kwl->add(prefix, lut_kwl, false); // appends all entries of lut_kwl with prefix before adding
+   }
+
+   theMinValueOverride = false;
+   ossimString lookup = kwl->find(prefix, MIN_VALUE_KW);
+   if(!lookup.empty())
+   {
+      theMinValue =lookup.toDouble();
+      theMinValueOverride = true;
+   }
+
+   theMaxValueOverride = false;
+   lookup = kwl->find(prefix, MAX_VALUE_KW);
+   if(!lookup.empty())
+   {
+      theMaxValue = lookup.toDouble();
+      theMaxValueOverride = true;
+   }
+
+   lookup =  kwl->find(prefix, MODE_KW);
+   if (lookup.contains("literal"))
+      theMode = LITERAL;
+   else if (lookup.contains("vertices"))
+      theMode = VERTICES;
+   else
+      theMode = REGULAR;
+
+   return_state &= initializeLut(kwl, prefix);
+   return_state &= ossimImageSourceFilter::loadState(orig_kwl, prefix);
+
+   delete kwl;
+   return return_state;
+}
+
+bool ossimIndexToRgbLutFilter::initializeLut(const ossimKeywordlist* kwl, const char* prefix)
+{
+   theLut.clear();
+
+   const ossimString entry_kw ("entry");
+   ossimString keyword, base_keyword;
+   ossimString indexStr, rgbStr;
+   ossimString blank(" ");
+   std::vector<ossimString> rgbList;
+   double index;
+   ossimRgbVector rgbVector (0,0,0);
+   bool rtn_state = true;
+
+   ossim_uint32 numEntries=0;
+   while (true)
+   {
+      base_keyword = entry_kw + ossimString::toString(numEntries);
+      if ((theMode == LITERAL) || (theMode == VERTICES))
+      {
+         // Index and color are subentries for this mode:
+         keyword = base_keyword + ".index";
+         indexStr = kwl->find(prefix, keyword.chars());
+         if (indexStr.empty())
+            break;
+
+         index = indexStr.toDouble();
+         keyword = base_keyword + ".color";
+         rgbStr = kwl->find(prefix, keyword.chars());
+      }
+      else
+      {
+         // REGULAR mode: index is computed later to arrive at equally-spaced vertices. For now,
+         // just store entry number as index:
+         index = (double) numEntries;
+         keyword = base_keyword;
+         rgbStr = kwl->find(prefix, keyword.chars());
+         if (rgbStr.empty())
+         {
+            // Perhaps old bloated form with separate keywords for R, G, B
+            rgbStr = kwl->find(prefix, (keyword + ".r").chars());
+            rgbStr += " ";
+            rgbStr += kwl->find(prefix, (keyword + ".g").chars());
+            rgbStr += " ";
+            rgbStr += kwl->find(prefix, (keyword + ".b").chars());
+            if (rgbStr.length() < 5)
+               break;
+         }
+      }
+
+      rgbStr.split(rgbList, blank, true);
+      if (rgbList.size() != 3)
+      {
+         ossimNotify(ossimNotifyLevel_WARN)<<"ossimIndexToRgbLutFilter::initializeLut() -- "
+               "Bad color specification in LUT KWL. LUT is not properly initialized."<<endl;
+         return false;
+      }
+
+      rgbVector.setR(rgbList[0].toUInt8());
+      rgbVector.setG(rgbList[1].toUInt8());
+      rgbVector.setB(rgbList[2].toUInt8());
+      theLut.insert(std::pair<double, ossimRgbVector>(index, rgbVector));
+      rgbList.clear();
+      ++numEntries;
+   }
+
+   // For REGULAR mode, need to adjust the indices to reflect a piecewise linear LUT with equally
+   // spaced vertices:
+   if (theMode == REGULAR)
+   {
+      std::map<double, ossimRgbVector> orig_lut = theLut;
+      std::map<double, ossimRgbVector>::iterator iter =  orig_lut.begin();
+      theLut.clear();
+
+      if (numEntries == 1)
+      {
+         // Insert the implied start index at black and endpoint at specified color:
+         theLut.insert(std::pair<double, ossimRgbVector>(theMinValue, ossimRgbVector (1, 1, 1)));
+         theLut.insert(std::pair<double, ossimRgbVector>(theMaxValue, iter->second));
+      }
+      else
+      {
+         // Loop to create equally-spaced vertices between min and max index values:
+         double interval = (theMaxValue - theMinValue) / (numEntries - 1);
+         while (iter != orig_lut.end())
+         {
+            index = theMinValue + iter->first*interval;
+            theLut.insert(std::pair<double, ossimRgbVector>(index, iter->second));
+            ++iter;
+         }
+      }
+   }
+
+   return rtn_state;
+}
+
+ossim_uint32 ossimIndexToRgbLutFilter::getNumberOfOutputBands() const
+{
+   if(isSourceEnabled())
+   {
+      return 3;
+   }
+   return ossimImageSourceFilter::getNumberOfOutputBands();
+}
+
+ossimScalarType ossimIndexToRgbLutFilter::getOutputScalarType() const
+{
+   if(isSourceEnabled())
+   {
+      return OSSIM_UCHAR;
+   }
+
+   return ossimImageSourceFilter::getOutputScalarType();
+}
+
+void ossimIndexToRgbLutFilter::setLut(const ossimFilename& file)
+{
+   theLutFile = file;
+   if(file.exists())
+   {
+      ossimKeywordlist kwl(file.c_str());
+      loadState(kwl);
+   }
+}
+
+double ossimIndexToRgbLutFilter::getMinValue()const
+{
+   return theMinValue;
+}
+
+double ossimIndexToRgbLutFilter::getMaxValue()const
+{
+   return theMaxValue;
+}
+
+void ossimIndexToRgbLutFilter::setMinValue(double value)
+{
+   theMinValue = value;
+}
+
+void ossimIndexToRgbLutFilter::setMaxValue(double value)
+{
+   theMaxValue = value;
+}
+
+double ossimIndexToRgbLutFilter::getNullPixelValue(ossim_uint32 /* band */ )const
+{
+   return 0.0;
+}
+
+double ossimIndexToRgbLutFilter::getMinPixelValue(ossim_uint32 /* band */)const
+{
+   return 1.0;
+}
+
+double ossimIndexToRgbLutFilter::getMaxPixelValue(ossim_uint32 /* band */)const
+{
+   return 255.0;
+}
+
+
+
diff --git a/ossim/src/ossim/imaging/ossimIntensityAdjustmentFilter.cpp b/ossim/src/ossim/imaging/ossimIntensityAdjustmentFilter.cpp
new file mode 100644
index 0000000..aceeabb
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimIntensityAdjustmentFilter.cpp
@@ -0,0 +1,289 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+// $Id: ossimIntensityAdjustmentFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimIntensityAdjustmentFilter.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimHsvVector.h>
+#include <ossim/base/ossimRgbVector.h>
+
+RTTI_DEF1(ossimIntensityAdjustmentFilter, "ossimIntensityAdjustmentFilter", ossimImageSourceFilter);
+
+ossimIntensityAdjustmentFilter::ossimIntensityAdjustmentFilter()
+   :ossimImageSourceFilter(),
+    theMeanIntensityTarget(ossim::nan()),
+    theNormTile(NULL),
+    theTile(NULL),
+    theBlankTile(NULL)
+{
+   theGridBounds.makeNan();
+}
+
+ossimIntensityAdjustmentFilter::~ossimIntensityAdjustmentFilter()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimIntensityAdjustmentFilter::getTile(
+   const ossimIrect& rect,
+   ossim_uint32 resLevel)
+{
+   if (!theTile.valid())
+   {
+      allocate(); // first time through.
+   }
+   
+   if(theBlankTile.valid())
+   {
+      theBlankTile->setImageRectangle(rect);
+   }
+   if(!theInputConnection)
+   {
+      return theBlankTile;
+   }
+   ossimRefPtr<ossimImageData> data =
+      theInputConnection->getTile(rect, resLevel);
+   
+   if(!isSourceEnabled())
+   {
+      return data;
+   }
+   theTile->setImageRectangle(rect);
+   theNormTile->setImageRectangle(rect);
+   loadNormTile(data);
+
+   if(ossim::isnan(theMeanIntensityTarget))
+   {
+      theMeanIntensityTarget = theMeanIntensityGrid.meanValue();
+   }
+
+   loadNormTile(data);
+   
+   if((theNormTile->getDataObjectStatus()!=OSSIM_NULL)&&
+      (theNormTile->getDataObjectStatus()!=OSSIM_EMPTY))
+   {
+      float* buf[3];
+      if(data->getNumberOfBands() == 3)
+      {
+         buf[0] = (float*)theNormTile->getBuf(0);
+         buf[1] = (float*)theNormTile->getBuf(1);
+         buf[2] = (float*)theNormTile->getBuf(2);
+      }
+      else
+      {
+         buf[0] = (float*)theNormTile->getBuf(0);
+         buf[1] = (float*)theNormTile->getBuf(0);
+         buf[2] = (float*)theNormTile->getBuf(0);
+         
+      }
+      ossim_int32 y = 0;
+      ossim_int32 x = 0;
+      ossim_int32 upperY = theNormTile->getHeight();
+      ossim_int32 upperX = theNormTile->getWidth();
+      ossimIpt origin = rect.ul();
+      
+      for(y = 0; y < upperY; ++y)
+      {
+         for(x = 0; x < upperX; ++x)
+         {
+            ossimIpt pt = ossimIpt(origin.x + x,
+                                   origin.y + y) - theGridBounds.ul();
+
+            if((buf[0] != 0) &&
+               (buf[1] != 0) &&
+               (buf[2] != 0))
+            {
+               
+               ossimRgbVector rgb((ossim_uint8)(*(buf[0])*255.0),
+                                  (ossim_uint8)(*(buf[1])*255.0),
+                                  (ossim_uint8)(*(buf[2])*255.0));
+               ossimHsvVector hsv(rgb);
+               
+               hsv.setV(matchTargetMean(hsv.getV(),
+                                        theMeanIntensityGrid(pt.x, pt.y),
+                                        theMeanIntensityTarget,
+                                        theNormTile->getMinPix(0),
+                                        theNormTile->getMaxPix(0)));
+               ossimRgbVector result(hsv);
+               
+               *buf[0] = result.getR()/255.0;
+               *buf[1] = result.getG()/255.0;
+               *buf[2] = result.getB()/255.0;
+            }
+            
+            ++buf[0];
+            ++buf[1];
+            ++buf[2];
+         }
+      }
+   }
+   theTile->copyNormalizedBufferToTile((float*)theNormTile->getBuf());
+   theTile->validate();
+   
+   return theTile;
+}
+
+void ossimIntensityAdjustmentFilter::initialize()
+{
+   ossimImageSourceFilter::initialize();
+
+   theNormTile = NULL;
+   theBlankTile = NULL;
+   
+   if(theInputConnection)
+   {
+      theGridBounds = theInputConnection->getBoundingRect();
+   }
+   else
+   {
+      theGridBounds.makeNan();
+   }
+}
+
+void ossimIntensityAdjustmentFilter::allocate()
+{
+   theBlankTile = ossimImageDataFactory::instance()->create(this, this);
+   theTile = (ossimImageData*)theBlankTile->dup();
+   theTile->initialize();
+}
+
+void ossimIntensityAdjustmentFilter::createAndPopulateGrid(const ossimIpt& spacing,
+                                                           double targetMean)
+{
+   if(theInputConnection)
+   {
+      ossim_uint32 x = 0;
+      ossim_uint32 y = 0;
+
+      theGridBounds        = theInputConnection->getBoundingRect();
+
+      ossimDrect rect(0,
+                      0,
+                      theGridBounds.width()-1,
+                      theGridBounds.height()-1);
+                      
+      theMeanIntensityGrid = ossimDblGrid(rect,
+                                          ossimDpt(spacing),
+                                          0);
+
+      for(y = 0; y <= theGridBounds.height(); y+=spacing.y)
+      {
+         for(x = 0; x <= theGridBounds.width(); x+=spacing.x)
+         {
+            ossimIpt ul(x - 16,
+                        y - 16);
+            
+            ossimIrect sampleRect(ul.x,
+                                  ul.y,
+                                  ul.x + 31,
+                                  ul.y + 31);
+            ossimRefPtr<ossimImageData> data = theInputConnection->getTile(sampleRect);
+            double mean = computeMeanIntensity(data);
+            theMeanIntensityGrid.setNearestNode(ossimDpt(x, y), mean);
+         }
+      }
+//      theMeanIntensityGrid.interpolateNullValuedNodes();
+   }
+   theMeanIntensityTarget = targetMean;
+}
+
+double ossimIntensityAdjustmentFilter::computeMeanIntensity(
+   ossimRefPtr<ossimImageData>& data)
+{
+   double result  = 0;
+   double divisor = 0;
+
+   if(data.valid() &&
+      (data->getDataObjectStatus()!=OSSIM_NULL)&&
+      (data->getDataObjectStatus()!=OSSIM_EMPTY))
+   {
+      loadNormTile(data);
+
+      int i = 0;
+      int upper = data->getWidth()*data->getHeight();
+      float* buf[3];
+      if(data->getNumberOfBands() == 3)
+      {
+         buf[0] = (float*)theNormTile->getBuf(0);
+         buf[1] = (float*)theNormTile->getBuf(1);
+         buf[2] = (float*)theNormTile->getBuf(2);
+      }
+      else
+      {
+         buf[0] = (float*)theNormTile->getBuf();
+         buf[1] = (float*)theNormTile->getBuf();
+         buf[2] = (float*)theNormTile->getBuf();
+      }
+      for(i = 0; i < upper; ++i)
+      {
+         ossimRgbVector rgb((ossim_uint8)(*(buf[0])*255.0),
+                            (ossim_uint8)(*(buf[1])*255.0),
+                            (ossim_uint8)(*(buf[2])*255.0));
+         ossimHsvVector hsv(rgb);
+         if(hsv.getV() > 0.0)
+         {
+            result += hsv.getV();
+            divisor += 1.0;
+         }
+         ++buf[0];
+         ++buf[1];
+         ++buf[2];
+      }
+   }
+
+   if(divisor > 0.0)
+   {
+      result /= divisor;
+   }
+   return result;
+}
+
+void ossimIntensityAdjustmentFilter::loadNormTile(ossimRefPtr<ossimImageData>& data)
+{
+   if(!theNormTile)
+   {
+      theNormTile = ossimImageDataFactory::instance()->create(this,
+                                                              OSSIM_NORMALIZED_FLOAT,
+                                                              data->getNumberOfBands(),
+                                                              data->getWidth(),
+                                                              data->getHeight());
+      theNormTile->initialize();
+   }
+   else
+   {
+      theNormTile->setImageRectangle(data->getImageRectangle());
+   }
+   data->copyTileToNormalizedBuffer((float*)theNormTile->getBuf());
+   theNormTile->validate();
+}
+
+double ossimIntensityAdjustmentFilter::matchTargetMean(double inputValue,
+                                                       double meanValue,
+                                                       double targetMean,
+                                                       double minValue,
+                                                       double maxValue)
+{
+    // max change
+   const double delta = targetMean - meanValue;
+   double weight=0.0;
+   
+   // weight max change dependend on proximity to end points
+   if (inputValue <= meanValue)
+   {
+      weight = fabs((inputValue - minValue) / (meanValue - minValue));
+   }
+   else
+   {
+      weight = fabs((maxValue - inputValue) / (maxValue - meanValue));
+   }
+
+   return  (inputValue + (delta * weight));
+}
+
diff --git a/ossim/src/ossim/imaging/ossimJpegCodec.cpp b/ossim/src/ossim/imaging/ossimJpegCodec.cpp
new file mode 100644
index 0000000..ce06d8e
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimJpegCodec.cpp
@@ -0,0 +1,510 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: class declaration for base codec(encoder/decoder).
+// 
+//----------------------------------------------------------------------------
+// $Id$
+#include <ossim/imaging/ossimJpegCodec.h>
+
+// we need to get rid of the jpedlib include in this header
+#include <ossim/imaging/ossimJpegMemSrc.h>
+// same for here
+#include <ossim/imaging/ossimJpegMemDest.h>
+
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNumericProperty.h>
+
+#include <ossim/imaging/ossimU8ImageData.h>
+#include <jpeglib.h>                   /** for jpeg stuff */
+
+RTTI_DEF1(ossimJpegCodec, "ossimJpegCodec", ossimCodecBase);
+ossimJpegCodec::ossimJpegCodec()
+:m_quality(100)
+{
+}
+
+ossimJpegCodec::~ossimJpegCodec()
+{
+}
+
+ossimString ossimJpegCodec::getCodecType()const
+{
+	return ossimString("jpeg");
+}
+
+bool ossimJpegCodec::encode( const ossimRefPtr<ossimImageData>& in,
+                             std::vector<ossim_uint8>& out )const
+{
+   bool result = false;
+   if ( in.valid() && (in->getDataObjectStatus() != OSSIM_NULL) )
+   {
+      if ( in->getScalarType() == OSSIM_UINT8 )
+      {
+         // Open a memory stream up to put the jpeg image in memory:
+         std::stringstream jpegStreamBuf;
+         
+         //---
+         // Initialize JPEG compression library:
+         // NOTE: JDIMENSION is an "unsigned int"
+         //---
+         struct jpeg_compress_struct cinfo;
+         struct jpeg_error_mgr jerr;
+         cinfo.err = jpeg_std_error( &jerr );
+         jpeg_create_compress(&cinfo);
+      
+         // Define a custom stream destination manager for jpeglib to write compressed block:
+         jpeg_cpp_stream_dest(&cinfo, jpegStreamBuf);
+      
+         /* Setting the parameters of the output file here */
+         cinfo.image_width = in->getWidth();
+         cinfo.image_height = in->getHeight();
+   
+         // Bands must be one or three for this writer.
+         const ossim_uint32 INPUT_BANDS = in->getNumberOfBands();
+         if ( (INPUT_BANDS == 1) || (INPUT_BANDS == 3) )
+         {
+            cinfo.input_components = INPUT_BANDS;
+         }
+         else
+         {
+            if ( INPUT_BANDS < 3 )
+            {
+               cinfo.input_components = 1; // Use first band.
+            }
+            else
+            {
+               cinfo.input_components = 3; // Use the first 3 bands.
+            }
+         }
+      
+         // colorspace of input image 
+         if ( cinfo.input_components == 3)
+         {
+            cinfo.in_color_space = JCS_RGB;
+         }
+         else
+         {
+            cinfo.in_color_space = JCS_GRAYSCALE;
+         }
+      
+         // Default compression parameters, we shouldn't be worried about these.
+         jpeg_set_defaults( &cinfo );
+      
+         jpeg_set_quality(&cinfo, m_quality, TRUE); //limit to baseline-JPEG values
+      
+         // Now do the compression...
+         jpeg_start_compress( &cinfo, TRUE );
+      
+         // Line buffer:
+         ossim_uint32 buf_size = cinfo.input_components*cinfo.image_width;
+         std::vector<ossim_uint8> buf(buf_size);
+      
+         // Compress the tile on line at a time:
+      
+         JSAMPROW row_pointer[1]; // Pointer to a single row.
+         row_pointer[0] = (JSAMPLE*)&buf.front();
+
+         // Get pointers to the input data:
+         std::vector<const ossim_uint8*> inBuf(cinfo.input_components);
+         for ( ossim_int32 band = 0; band < cinfo.input_components; ++band )
+         {
+            inBuf[band] = in->getUcharBuf(band);
+         }
+
+         ossim_uint32 inIdx = 0;
+         for (ossim_uint32 line=0; line< cinfo.image_height; ++line)
+         {
+            // Convert from band sequential to band interleaved by pixel.
+            ossim_uint32 outIdx = 0;
+            for ( ossim_uint32 p = 0; p < cinfo.image_width; ++p )
+            {
+               for ( ossim_int32 band = 0; band < cinfo.input_components; ++band )
+               {
+                  buf[outIdx++] = inBuf[band][inIdx];
+               }
+               ++inIdx;
+            }
+
+            // Write it...
+            jpeg_write_scanlines( &cinfo, row_pointer, 1 );
+         }
+      
+         // Similar to read file, clean up after we're done compressing.
+         jpeg_finish_compress( &cinfo );
+         jpeg_destroy_compress( &cinfo );
+
+         // Copy the memory stream to output vector.
+         out.resize(jpegStreamBuf.str().size());
+         jpegStreamBuf.seekg(0, std::ios_base::beg);
+         jpegStreamBuf.read((char*)&out.front(), jpegStreamBuf.str().size());
+
+         result = true;
+      }
+      else // Scalar type check...
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimCodecFactory::encodeJpeg ERROR:"
+            << "\nPassing non-eight bit data to eight bit encoder!" << std::endl;
+      }
+      
+   } // Matches: if ( in.valid() ... )
+   
+   return result;
+
+}
+
+bool ossimJpegCodec::decode( const std::vector<ossim_uint8>& in,
+                             ossimRefPtr<ossimImageData>& out ) const
+{
+   bool result = false;
+
+   // Check for jpeg signature:
+   if ( in.size() > 3 )
+   {
+      if ( (in[0] == 0xff) &&
+           (in[1] == 0xd8) &&
+           (in[2] == 0xff) )
+      {
+         if (in[3] == 0xe0)
+         {
+            result = decodeJpeg( in, out );
+         }
+         else if (in[3] == 0xdb)
+         {
+            result = decodeJpegToRgb( in, out );
+         }
+      }
+   }
+   
+   return result;	
+}
+
+bool ossimJpegCodec::decodeJpeg( const std::vector<ossim_uint8>& in,
+                                    ossimRefPtr<ossimImageData>& out ) const
+{
+   bool result = false;
+
+   /* This struct contains the JPEG decompression parameters and pointers
+    * to working space (which is allocated as needed by the JPEG library).
+    */
+   jpeg_decompress_struct cinfo;
+   
+   /* We use our private extension JPEG error handler.
+    * Note that this struct must live as long as the main JPEG parameter
+    * struct, to avoid dangling-pointer problems.
+    */
+   ossimJpegErrorMgr jerr;
+   
+   /* Step 1: allocate and initialize JPEG decompression object */
+   
+   /* We set up the normal JPEG error routines, then override error_exit. */
+   cinfo.err = jpeg_std_error(&jerr.pub);
+   
+   jerr.pub.error_exit = ossimJpegErrorExit;
+   
+   /* Establish the setjmp return context for my_error_exit to use. */
+   if (setjmp(jerr.setjmp_buffer) == 0)
+   {
+      result = true;
+      
+      /* Now we can initialize the JPEG decompression object. */
+      jpeg_CreateDecompress(&cinfo, JPEG_LIB_VERSION, sizeof(cinfo));
+      
+      //---
+      // Step 2: specify data source.  In this case we will uncompress from
+      // memory so we will use "ossimJpegMemorySrc" in place of " jpeg_stdio_src".
+      //---
+      ossimJpegMemorySrc ( &cinfo, &(in.front()), (size_t)(in.size()) );
+      
+      /* Step 3: read file parameters with jpeg_read_header() */
+      jpeg_read_header(&cinfo, TRUE);
+      
+      /* Step 4: set parameters for decompression */
+      
+      /* Step 5: Start decompressor */
+      jpeg_start_decompress(&cinfo);
+
+      const ossim_uint32 SAMPLES = cinfo.output_width;
+      const ossim_uint32 LINES   = cinfo.output_height;
+      const ossim_uint32 BANDS   = cinfo.output_components;
+
+#if 0       /* Please leave for debug. (drb) */
+      if ( traceDebug() )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "jpeg cinfo.output_width:  " << cinfo.output_width
+            << "\njpeg cinfo.output_height: " << cinfo.output_height
+            << "\njpeg cinfo.out_color_space: " << cinfo.out_color_space
+            << "\n";
+      }
+#endif
+
+      if ( out.valid() )
+      {
+         // This will resize tile if not correct.
+         out->setImageRectangleAndBands(
+            ossimIrect(0,0,(ossim_int32)SAMPLES-1,(ossim_int32)LINES-1), BANDS );
+      }
+      else
+      {
+         out = new ossimU8ImageData( 0, BANDS, SAMPLES, LINES );
+         out->initialize();
+      }
+      
+      // Get pointers to the cache tile buffers.
+      std::vector<ossim_uint8*> destinationBuffer(BANDS);
+      for (ossim_uint32 band = 0; band < BANDS; ++band)
+      {
+         destinationBuffer[band] = out->getUcharBuf(band);
+      }
+      
+      std::vector<ossim_uint8> lineBuffer(SAMPLES * cinfo.output_components);
+      JSAMPROW jbuf[1];
+      jbuf[0] = (JSAMPROW) &(lineBuffer.front());
+      
+      while (cinfo.output_scanline < LINES)
+      {
+         // Read a line from the jpeg file.
+         jpeg_read_scanlines(&cinfo, jbuf, 1);
+         
+         //---
+         // Copy the line which if band interleaved by pixel the the band
+         // separate buffers.
+         //---
+         ossim_uint32 index = 0;
+         for (ossim_uint32 sample = 0; sample < SAMPLES; ++sample)         
+         {
+            for (ossim_uint32 band = 0; band < BANDS; ++band)
+            {
+               destinationBuffer[band][sample] = lineBuffer[index];
+               ++index;
+            }
+         }
+         
+         for (ossim_uint32 band = 0; band < BANDS; ++band)
+         {
+            destinationBuffer[band] += SAMPLES;
+         }
+      }
+
+      // Set the tile status:
+      out->validate();
+
+      // clean up...
+      
+      jpeg_finish_decompress(&cinfo);
+      
+   } // Matches: if (setjmp(jerr.setjmp_buffer) == 0)
+
+   jpeg_destroy_decompress(&cinfo);
+   
+   return result;
+}
+
+bool ossimJpegCodec::decodeJpegToRgb(const std::vector<ossim_uint8>& in,
+                                     ossimRefPtr<ossimImageData>& out ) const
+   
+{   
+   bool result = false;
+   
+   ossim_int32 jpegColorSpace = getColorSpace( in );
+
+   if ( jpegColorSpace == JCS_CMYK )
+   {
+      ossimRefPtr<ossimImageData> cmykTile = 0;
+
+      result = decodeJpeg( in, cmykTile ); // Decode to CMYK tile.
+      if ( result )
+      {
+         if ( cmykTile.valid() )
+         {
+            const ossim_uint32 INPUT_BANDS = cmykTile->getNumberOfBands();
+            if ( INPUT_BANDS == 4 )
+            {
+               const ossim_uint32 OUTPUT_BANDS = 3;
+               const ossimIrect   RECT         = cmykTile->getImageRectangle();
+               const ossim_uint32 LINES        = RECT.height();
+               const ossim_uint32 SAMPLES      = RECT.width();
+               ossim_uint32 band = 0;
+               
+               // Set or create output tile:
+               if ( out.valid() )
+               {
+                  // This will resize tile if not correct.
+                  out->setImageRectangleAndBands( RECT, OUTPUT_BANDS );
+               }
+               else
+               {
+                  out = new ossimU8ImageData( 0, OUTPUT_BANDS, SAMPLES, LINES );
+                  out->initialize();
+               }
+               
+               // Assign pointers to bands.
+               std::vector<const ossim_uint8*> inBands(INPUT_BANDS);
+               for ( band = 0; band < INPUT_BANDS; ++band )
+               {
+                  inBands[band] = cmykTile->getUcharBuf( band );
+               }
+               std::vector<ossim_uint8*> outBands(INPUT_BANDS);
+               for ( band = 0; band < OUTPUT_BANDS; ++band )
+               {
+                  outBands[band] = out->getUcharBuf( band );
+               }
+               
+               const ossim_uint8 NP   = 0;   // null pixel
+               const ossim_uint8 MAXP = 255; // max pixel
+               
+               std::vector<ossim_float32> cmyk(INPUT_BANDS, 0.0);
+               std::vector<ossim_float32> rgb(OUTPUT_BANDS, 0.0);
+               
+               for ( ossim_uint32 line = 0; line < LINES; ++line )
+               {
+                  for (ossim_uint32 sample = 0; sample < SAMPLES; ++sample)
+                  {
+                     //---
+                     // NOTE:
+                     // This current does NOT work, colors come out wrong, with
+                     // the one dataset that I have:
+                     // "2015_05_05_Whitehorse_3857.gpkg"
+                     // (drb - 03 June 2015)
+                     //---
+                     
+                     cmyk[0] = inBands[0][sample]; // C
+                     cmyk[1] = inBands[1][sample]; // M
+                     cmyk[2] = inBands[2][sample]; // Y
+                     cmyk[3] = inBands[3][sample]; // K
+
+                     //---
+                     // The red (R) color is calculated from the cyan (C) and black (K) colors.
+                     // The green color (G) is calculated from the magenta (M) and black (K) colors.
+                     // The blue color (B) is calculated from the yellow (Y) and black (K) colors.
+                     //---
+                     // rgb[0] = (255.0-cmyk[0]) * 255.0-cmyk[3];
+                     // rgb[1] = (255.0-cmyk[1]) * 255.0-cmyk[3];
+                     // rgb[2] = (255.0-cmyk[2]) * 255.0-cmyk[3];
+                     rgb[0] = (cmyk[0]) * cmyk[3]/255.0;
+                     rgb[1] = (cmyk[1]) * cmyk[3]/255.0;
+                     rgb[2] = (cmyk[2]) * cmyk[3]/255.0;
+                     
+                     outBands[0][sample] =
+                        ( (rgb[0] >= 0.0) ? ( (rgb[0] <= 255.0) ?
+                                              (ossim_uint8)rgb[0] : MAXP ) : NP );
+                     outBands[1][sample] =
+                        ( (rgb[1] >= 0.0) ? ( (rgb[1] <= 255.0) ?
+                                              (ossim_uint8)rgb[1] : MAXP ) : NP );
+                     outBands[2][sample] =
+                        ( (rgb[2] >= 0.0) ? ( (rgb[2] <= 255.0) ?
+                                              (ossim_uint8)rgb[2] : MAXP ) : NP );
+                     
+                  } // End sample loop.
+                  
+                  // Increment pointers.
+                  for (ossim_uint32 band = 0; band < OUTPUT_BANDS; ++band)
+                  {
+                     inBands[band]  += SAMPLES;
+                     outBands[band] += SAMPLES;
+                  }
+                  inBands[3] += SAMPLES; // Last band of input.
+                  
+               } // End of line loop.
+               
+               // Set the tile status:
+               out->validate();
+               
+            } // Matches sanity check: if ( INPUT_BANDS == 4 )
+
+         }  // Matches: if ( cmykTile.valid() )
+         
+      } // Matches: if ( decodeJpeg( in, cmykTile ) )
+      
+   } // Matches: if ( jpegColorSpace == JCS_CMYK )
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimJpegCodec::decodeJpegRgb: WARNING: "
+            << "Unhandled jpeg output color space!" << std::endl;
+   }
+
+   return result;
+   
+} // End: ossimJpegCodec::decodeJpegRgb( ... )
+
+ossim_int32 ossimJpegCodec::getColorSpace( const std::vector<ossim_uint8>& in ) const
+{
+   J_COLOR_SPACE result = JCS_UNKNOWN;
+
+   if ( in.size() )
+   {
+      jpeg_decompress_struct cinfo;
+      ossimJpegErrorMgr jerr;
+      cinfo.err = jpeg_std_error(&jerr.pub);
+      jerr.pub.error_exit = ossimJpegErrorExit;
+      
+      /* Establish the setjmp return context for my_error_exit to use. */
+      if (setjmp(jerr.setjmp_buffer) == 0)
+      {
+         jpeg_CreateDecompress(&cinfo, JPEG_LIB_VERSION, sizeof(cinfo));
+         ossimJpegMemorySrc ( &cinfo, &(in.front()), (size_t)(in.size()) );
+         jpeg_read_header(&cinfo, TRUE);
+         result = cinfo.out_color_space;
+         jpeg_destroy_decompress(&cinfo);
+      }
+   }
+   return result;
+}
+
+void ossimJpegCodec::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(property->getName() == ossimKeywordNames::QUALITY_KW)
+   {
+      m_quality = property->valueToString().toUInt32();
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimJpegCodec::getProperty(const ossimString& name)const
+{
+   ossimRefPtr<ossimProperty> result;
+
+   if(name == ossimKeywordNames::QUALITY_KW)
+   {
+      result = new ossimNumericProperty(ossimKeywordNames::QUALITY_KW,
+                           ossimString::toString(m_quality),
+                           0,
+                           100);
+   }
+   else
+   {
+      result = ossimCodecBase::getProperty(name);
+   }
+   return result;
+}
+void ossimJpegCodec::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimCodecBase::getPropertyNames(propertyNames);
+   propertyNames.push_back(ossimKeywordNames::QUALITY_KW);
+}
+
+bool ossimJpegCodec::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+	const char* quality = kwl.find(prefix, ossimKeywordNames::QUALITY_KW);
+
+	if(quality)
+	{
+		m_quality = ossimString(quality).toUInt32();
+	}
+
+	return ossimCodecBase::loadState(kwl, prefix);
+}
+
+bool ossimJpegCodec::saveState(ossimKeywordlist& kwl, const char* prefix)const
+{
+	kwl.add(prefix, ossimKeywordNames::QUALITY_KW, m_quality);
+
+	return ossimCodecBase::saveState(kwl, prefix);
+}
+
+
diff --git a/src/ossim/imaging/ossimJpegMemDest.cpp b/ossim/src/ossim/imaging/ossimJpegMemDest.cpp
similarity index 100%
rename from src/ossim/imaging/ossimJpegMemDest.cpp
rename to ossim/src/ossim/imaging/ossimJpegMemDest.cpp
diff --git a/src/ossim/imaging/ossimJpegMemSrc.cpp b/ossim/src/ossim/imaging/ossimJpegMemSrc.cpp
similarity index 100%
rename from src/ossim/imaging/ossimJpegMemSrc.cpp
rename to ossim/src/ossim/imaging/ossimJpegMemSrc.cpp
diff --git a/src/ossim/imaging/ossimJpegStdIOSrc.cpp b/ossim/src/ossim/imaging/ossimJpegStdIOSrc.cpp
similarity index 100%
rename from src/ossim/imaging/ossimJpegStdIOSrc.cpp
rename to ossim/src/ossim/imaging/ossimJpegStdIOSrc.cpp
diff --git a/src/ossim/imaging/ossimJpegTileSource.cpp b/ossim/src/ossim/imaging/ossimJpegTileSource.cpp
similarity index 100%
rename from src/ossim/imaging/ossimJpegTileSource.cpp
rename to ossim/src/ossim/imaging/ossimJpegTileSource.cpp
diff --git a/ossim/src/ossim/imaging/ossimJpegWriter.cpp b/ossim/src/ossim/imaging/ossimJpegWriter.cpp
new file mode 100644
index 0000000..e6e3e3e
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimJpegWriter.cpp
@@ -0,0 +1,462 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Burken
+//
+//*******************************************************************
+//  $Id: ossimJpegWriter.cpp 22673 2014-03-13 21:42:34Z dburken $
+
+#include <cstdlib>
+#include <cstdio>
+
+//---
+// Using windows .NET compiler there is a conflict in the libjpeg with INT32
+// in the file jmorecfg.h.  Defining XMD_H fixes this.
+extern "C"
+{
+#if defined(_MSC_VER) || defined(__MINGW32__)
+#  ifndef XMD_H
+#    define XMD_H
+#  endif
+#endif
+#include <jpeglib.h>
+}
+
+#include <ossim/imaging/ossimJpegWriter.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/base/ossimNumericProperty.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/imaging/ossimScalarRemapper.h>
+
+RTTI_DEF1_INST(ossimJpegWriter, "ossimJpegWriter", ossimImageFileWriter)
+
+static const char DEFAULT_FILE_NAME[] = "output.jpg";
+static const ossim_int32 DEFAULT_JPEG_QUALITY = 100;
+static ossimTrace traceDebug("ossimJpegWriter:debug");
+
+ossimJpegWriter::ossimJpegWriter()
+   : ossimImageFileWriter(),
+     theQuality(DEFAULT_JPEG_QUALITY),
+     theOutputFilePtr(NULL)
+{
+   // Since there is no internal geometry set the flag to write out one.
+   setWriteExternalGeometryFlag(true);
+}
+
+ossimJpegWriter::~ossimJpegWriter()
+{
+   close();
+}
+
+bool ossimJpegWriter::writeFile()
+{
+   static const char MODULE[] = "ossimJpegWriter::writeFile";
+   
+   if( !theInputConnection || (getErrorStatus() != ossimErrorCodes::OSSIM_OK))
+   {
+      return false;
+   }
+   
+   bool bandsDontMatch = false;
+   // Get the number of bands.  Must be one or three for this writer.
+   ossim_int32 components   = theInputConnection->getNumberOfOutputBands();
+   ossim_int32 outputComponents = components;
+   if (components != 1 && components != 3)
+   {
+      bandsDontMatch = true;
+      if(components < 3)
+      {
+         outputComponents = 1;
+      }
+      else if(components > 3)
+      {
+         outputComponents = 3;
+      }
+   }
+   
+   if(theInputConnection->isMaster())
+   {
+      if (!isOpen())
+      {
+         open();
+      }
+      
+      if (!theOutputFilePtr)
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << MODULE << " ERROR:"
+            << "\nCannot open:  " << theFilename.c_str()
+            << "\nReturning from method." << endl;
+         
+         return false;
+      }
+   }
+   ossimRefPtr<ossimImageSource> savedInput = 0;
+   
+   if(theInputConnection->getOutputScalarType() != OSSIM_UINT8)
+   {  
+      savedInput = new ossimScalarRemapper();
+
+      // Connect scalar remapper to sequencer input.
+      savedInput->connectMyInputTo(0, theInputConnection->getInput(0));
+
+      // Connect sequencer to the scalar remapper.
+      theInputConnection->connectMyInputTo(0, savedInput.get());
+      theInputConnection->initialize();
+   }
+   
+   if(theInputConnection->isMaster())
+   {
+      if (traceDebug())
+      {
+         CLOG << " DEBUG:"
+              << "\nOutput Rect:  " << theAreaOfInterest << endl;
+      }
+      
+      ossim_int32 image_height
+         = theAreaOfInterest.lr().y - theAreaOfInterest.ul().y + 1;
+      ossim_int32 image_width
+         = theAreaOfInterest.lr().x - theAreaOfInterest.ul().x + 1;
+      ossim_int32 tileWidth    = theInputConnection->getTileWidth();
+      ossim_int32 tileHeight   = theInputConnection->getTileHeight();
+      
+      // Allocate a buffer to hold a row of tiles.
+      ossim_uint32 buf_size   = tileHeight*image_width*outputComponents;
+      if (traceDebug())
+      {
+         CLOG << "DEBUG:"
+              << "\nbuf_size:  " << buf_size
+              << endl;
+      }
+      
+      std::vector<ossim_uint8> buf(buf_size);
+      ossimRefPtr<ossimImageData> blankTile =
+         new ossimImageData(NULL,
+                            OSSIM_UINT8,
+                            outputComponents,
+                            tileWidth,
+                            tileHeight);
+      ossimRefPtr<ossimImageData> tempTile;
+      std::vector<ossim_uint8> tempBuf;
+      if(bandsDontMatch)
+      {
+         tempTile = new ossimImageData(NULL,
+                                       OSSIM_UINT8,
+                                       outputComponents,
+                                       tileWidth,
+                                       tileHeight);
+         tempTile->initialize();
+      }
+      blankTile->initialize();
+      //
+      // Stuff needed for the jpeg library.
+      // Taken from "example.c" file of the "jpeg-6b" package.
+      //
+      struct jpeg_compress_struct cinfo;
+      struct jpeg_error_mgr jerr;
+      JSAMPROW row_pointer[1];  // pointer to JSAMPLE row[s]
+      
+      // physical row width in image buffer
+      int row_stride = image_width * outputComponents;
+      
+      cinfo.err = jpeg_std_error(&jerr);
+      jpeg_create_compress(&cinfo);
+      jpeg_stdio_dest(&cinfo, theOutputFilePtr);
+      cinfo.image_width = image_width;   // image width and height, in pixels
+      cinfo.image_height = image_height;
+      cinfo.input_components = outputComponents; // # of color components per pixel
+      
+      // colorspace of input image 
+      if (outputComponents == 3)
+      {
+         cinfo.in_color_space = JCS_RGB;
+      }
+      else
+      {
+         cinfo.in_color_space = JCS_GRAYSCALE;
+      }
+
+      jpeg_set_defaults(&cinfo);
+      jpeg_set_quality(&cinfo, theQuality, TRUE); //limit to baseline-JPEG values 
+      jpeg_start_compress(&cinfo, TRUE);
+      
+      theInputConnection->setAreaOfInterest(theAreaOfInterest);
+      theInputConnection->setToStartOfSequence();
+      ossim_uint32 maxY = theInputConnection->getNumberOfTilesVertical();
+      ossim_uint32 maxX = theInputConnection->getNumberOfTilesHorizontal();
+      
+      double tileCount = 0.0;
+      double totalTiles = theInputConnection->getNumberOfTiles();
+      //
+      // Ok the jpeg stuff should be set.  Loop through and grab a row of tiles
+      // and copy to the buffer.  Then write the buffer to the jpeg file.
+      // Get the next row... until finished.
+      //
+      for (ossim_uint32 i=0; ((i<maxY) && (!needsAborting())); ++i)
+      {
+         ossimIrect buf_rect = theAreaOfInterest;
+         buf_rect.set_uly(theAreaOfInterest.ul().y+i*tileHeight);
+         buf_rect.set_lry(buf_rect.ul().y + tileHeight - 1);
+         
+         for (ossim_uint32 j=0; ((j<maxX)&& (!needsAborting())); ++j)
+         {
+            // Grab the tile.
+            const ossimRefPtr<ossimImageData> t =
+               theInputConnection->getNextTile();
+            
+            if ( t.valid() )
+            {
+               if (t->getDataObjectStatus() != OSSIM_NULL)
+               {
+                  if(bandsDontMatch)
+                  {
+                     tempTile->setImageRectangle(t->getImageRectangle());
+                     tempTile->setDataObjectStatus(t->getDataObjectStatus());
+                     memcpy(tempTile->getBuf(), 
+                            t->getBuf(),  
+                            t->getSizePerBandInBytes()*outputComponents);
+                     tempTile->unloadTile(&buf.front(), buf_rect, OSSIM_BIP);
+                  }
+                  else
+                  {
+                     // Copy the tile to the buffer.
+                     t->unloadTile(&buf.front(), buf_rect, OSSIM_BIP);
+                  }
+               }
+               else
+               {
+                  blankTile->setOrigin(t->getOrigin());
+                  if(bandsDontMatch)
+                  {
+                     tempTile->setImageRectangle(blankTile->getImageRectangle());
+                     tempTile->setDataObjectStatus(t->getDataObjectStatus());
+                     memcpy(tempTile->getBuf(), t->getBuf(),  t->getSizePerBandInBytes()*outputComponents);
+                     blankTile->unloadTile(&buf.front(), buf_rect, OSSIM_BIP);
+                  }
+                  else
+                  {
+                     // Copy the tile to the buffer.
+                     blankTile->unloadTile(&buf.front(), buf_rect, OSSIM_BIP);
+                  }
+               }
+            }
+            ++tileCount;
+            setPercentComplete((100.0*(tileCount/totalTiles)));
+            
+         }  // End of loop through tiles in the x direction.
+         
+         // Copy the buffer to the jpeg file.
+         ossim_int32 lines_to_copy =
+            min( (buf_rect.lr().y-buf_rect.ul().y+1),
+                 (theAreaOfInterest.lr().y-buf_rect.ul().y+1) );
+         
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << MODULE
+               << "buf_rect:       " << buf_rect
+               << "lines_to_copy:  " << lines_to_copy << endl;
+         }
+         
+         if(!needsAborting())
+         {
+            // Now copy the buffer that should be full to the jpeg file.
+            ossim_int32 buf_offset = 0;
+            for (ossim_int32 line=0; line<lines_to_copy; ++line)
+            {
+               row_pointer[0] = &buf[buf_offset];
+               jpeg_write_scanlines(&cinfo, row_pointer, 1);
+               buf_offset += row_stride;
+            }
+         }
+         
+      } // End of loop through tiles in the y direction.
+      
+      // Free memory.
+      if(!needsAborting())
+      {
+         jpeg_finish_compress(&cinfo);
+      }
+      
+      fclose(theOutputFilePtr);
+      theOutputFilePtr = NULL;
+      
+      jpeg_destroy_compress(&cinfo);
+   }
+   else
+   {
+      theInputConnection->slaveProcessTiles();
+   }
+   
+   // Reset the connection if needed.
+   if(savedInput.valid())
+   {
+      ossimConnectableObject* obj = theInputConnection->getInput(0);
+      if(obj)
+      {
+         theInputConnection->connectMyInputTo(0, obj->getInput(0));
+      }
+      savedInput = 0; 
+   }
+   return true;
+}
+
+bool ossimJpegWriter::saveState(ossimKeywordlist& kwl,
+                                const char* prefix)const
+{
+   kwl.add( prefix,
+            ossimKeywordNames::COMPRESSION_QUALITY_KW,
+            theQuality,
+            true );
+   return ossimImageFileWriter::saveState(kwl, prefix);
+}
+
+bool ossimJpegWriter::loadState(const ossimKeywordlist& kwl,
+                                const char* prefix)
+{
+   const char* value =
+      kwl.find(prefix, ossimKeywordNames::COMPRESSION_QUALITY_KW);
+   if(value)
+   {
+      setQuality(atoi(value));
+   }
+   
+   theOutputImageType = "jpeg";
+   
+   return ossimImageFileWriter::loadState(kwl, prefix);
+}
+
+void ossimJpegWriter::setQuality(ossim_int32 quality)
+{
+   static const char MODULE[] = "ossimJpegWriter::setQuality";
+   
+   // Range 1 to 100 with 100 being best.
+   if (quality > 0 && quality < 101)
+   {
+      theQuality = quality;
+   }
+   else
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << " DEBUG:"
+            << "\nquality out of range:  " << quality
+            << "\nquality has been set to default:  " 
+            << DEFAULT_JPEG_QUALITY
+            << "\nvalid range:  1 to 100 with 100 being best."
+            << endl;
+      }
+      
+      theQuality = DEFAULT_JPEG_QUALITY;
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " DEBUG:"
+         << "\nQuality set to:  "
+         << theQuality << endl;
+   }
+}
+
+bool ossimJpegWriter::isOpen() const
+{
+   return (theOutputFilePtr!=NULL);
+}
+
+bool ossimJpegWriter::open()
+{
+   close();
+
+   // Check for empty filenames.
+   if (theFilename.empty())
+   {
+      return false;
+   }
+   
+   theOutputFilePtr = fopen(theFilename.c_str(), "wb");
+   if(theOutputFilePtr)
+   {
+      return true;
+   }
+   return false;
+}
+
+void ossimJpegWriter::close()
+{
+   if(theOutputFilePtr)
+   {
+      fclose(theOutputFilePtr);
+      theOutputFilePtr = NULL;
+   }
+}
+
+void ossimJpegWriter::getImageTypeList(std::vector<ossimString>& imageTypeList)const
+{
+   imageTypeList.push_back(ossimString("jpeg"));
+}
+
+ossimString ossimJpegWriter::getExtension() const
+{
+   return ossimString("jpg");
+}
+
+bool ossimJpegWriter::hasImageType(const ossimString& imageType) const
+{
+   if((imageType == "image/jpeg")||
+      (imageType == "image/jpg"))
+   {
+      return true;
+   }
+
+   return ossimImageFileWriter::hasImageType(imageType);
+}
+
+void ossimJpegWriter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if ( property.valid() )
+   {
+      if(property->getName() == ossimKeywordNames::COMPRESSION_QUALITY_KW)
+      {
+         ossimString stringValue;
+         property->valueToString(stringValue);
+         setQuality( stringValue.toInt32() );
+      }
+      else
+      {
+         ossimImageFileWriter::setProperty(property);
+      }
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimJpegWriter::getProperty(const ossimString& name)const
+{
+   if (name == ossimKeywordNames::COMPRESSION_QUALITY_KW)
+   {
+      ossimNumericProperty* prop =
+         new ossimNumericProperty(name,
+                                  ossimString::toString(theQuality),
+                                  1.0,
+                                  100.0);
+      prop->setNumericType(ossimNumericProperty::ossimNumericPropertyType_INT);
+      return prop;
+   }
+
+   return ossimImageFileWriter::getProperty(name);
+}
+
+void ossimJpegWriter::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimString name = ossimKeywordNames::COMPRESSION_QUALITY_KW;
+   propertyNames.push_back(name);
+   
+   ossimImageFileWriter::getPropertyNames(propertyNames);
+}
diff --git a/ossim/src/ossim/imaging/ossimJpegYCbCrToRgbSource.cpp b/ossim/src/ossim/imaging/ossimJpegYCbCrToRgbSource.cpp
new file mode 100644
index 0000000..4e3ce37
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimJpegYCbCrToRgbSource.cpp
@@ -0,0 +1,115 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimJpegYCbCrToRgbSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimJpegYCbCrToRgbSource.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimJpegYCbCrVector.h>
+#include <ossim/base/ossimRgbVector.h>
+
+RTTI_DEF1(ossimJpegYCbCrToRgbSource,
+          "ossimJpegYCbCrToRgbSource" ,
+          ossimImageSourceFilter)
+
+ossimJpegYCbCrToRgbSource::ossimJpegYCbCrToRgbSource()
+   :ossimImageSourceFilter(),
+    theBlankTile()
+{
+}
+
+ossimJpegYCbCrToRgbSource::ossimJpegYCbCrToRgbSource(ossimImageSource* inputSource)
+   : ossimImageSourceFilter(inputSource),
+     theBlankTile()
+{
+}
+
+ossimJpegYCbCrToRgbSource::~ossimJpegYCbCrToRgbSource()
+{
+}
+
+void ossimJpegYCbCrToRgbSource::initialize()
+{
+   ossimImageSourceFilter::initialize();
+}
+
+void ossimJpegYCbCrToRgbSource::allocate()
+{
+   theBlankTile = new ossimImageData(this,
+                                     OSSIM_UCHAR,
+                                     3);
+}
+
+ossimRefPtr<ossimImageData> ossimJpegYCbCrToRgbSource::getTile(
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   if (!theBlankTile.valid())
+   {
+      allocate(); // first time through.
+   }
+   
+   if(theBlankTile.valid())
+   {
+      theBlankTile->setOrigin(tileRect.ul());
+      theBlankTile->setWidthHeight(tileRect.width(), tileRect.height());
+   }
+   
+   if(theInputConnection)
+   {
+      ossimRefPtr<ossimImageData> imageData =
+         theInputConnection->getTile(tileRect, resLevel);
+
+      if(!imageData.valid())
+      {
+         return theBlankTile;
+      }
+      if((isSourceEnabled())&&
+         (imageData->getNumberOfBands()==3)&&
+         (imageData->getScalarType()==OSSIM_UCHAR)&&
+         (imageData->getDataObjectStatus()!=OSSIM_NULL)&&
+         (imageData->getDataObjectStatus()!=OSSIM_EMPTY))
+      {
+         ossim_uint8* bands[3];
+         
+         bands[0] = static_cast<ossim_uint8*>(imageData->getBuf(0));
+         bands[1] = static_cast<ossim_uint8*>(imageData->getBuf(1));
+         bands[2] = static_cast<ossim_uint8*>(imageData->getBuf(2));
+         
+         long height = imageData->getHeight();
+         long width  = imageData->getWidth();
+         long offset = 0;
+         for(long row = 0; row < height; ++row)
+         {
+            for(long col = 0; col < width; ++col)
+            {
+               
+               ossimJpegYCbCrVector ycbcr(bands[0][offset],
+                                          bands[1][offset],
+                                          bands[2][offset]);
+               ossimRgbVector rgb(ycbcr);
+               
+               
+               bands[0][offset] = rgb.getR();
+               bands[1][offset] = rgb.getG();
+               bands[2][offset] = rgb.getB();
+               
+               ++offset;
+            }
+         }
+         imageData->validate();
+      }
+      return imageData;
+   }
+   
+   return theBlankTile;
+}  
+
diff --git a/src/ossim/imaging/ossimLandsatTileSource.cpp b/ossim/src/ossim/imaging/ossimLandsatTileSource.cpp
similarity index 100%
rename from src/ossim/imaging/ossimLandsatTileSource.cpp
rename to ossim/src/ossim/imaging/ossimLandsatTileSource.cpp
diff --git a/ossim/src/ossim/imaging/ossimLandsatTopoCorrectionFilter.cpp b/ossim/src/ossim/imaging/ossimLandsatTopoCorrectionFilter.cpp
new file mode 100644
index 0000000..598241f
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimLandsatTopoCorrectionFilter.cpp
@@ -0,0 +1,361 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimLandsatTopoCorrectionFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimLandsatTopoCorrectionFilter.h>
+#include <ossim/imaging/ossimImageToPlaneNormalFilter.h>
+#include <ossim/support_data/ossimFfL7.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/base/ossimDirectory.h>
+#include <ossim/base/ossim2dLinearRegression.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimVisitor.h>
+#include <iostream>
+
+RTTI_DEF1(ossimLandsatTopoCorrectionFilter, "ossimLandsatTopoCorrectionFilter",ossimTopographicCorrectionFilter);
+ossimLandsatTopoCorrectionFilter::ossimLandsatTopoCorrectionFilter()
+   :ossimTopographicCorrectionFilter(),
+    theLandsatHeader("")
+{
+}
+
+ossimLandsatTopoCorrectionFilter::~ossimLandsatTopoCorrectionFilter()
+{
+}
+
+ossimLandsatTopoCorrectionFilter::ossimLandsatTopoCorrectionFilter(ossimImageSource* colorSource,
+                                                                   ossimImageSource* elevSource,
+                                                                   const ossimFilename& landsatFileName)
+   :ossimTopographicCorrectionFilter(colorSource,
+                                     elevSource),
+    theLandsatHeader(landsatFileName)
+{
+}
+
+void ossimLandsatTopoCorrectionFilter::initialize()
+{
+   
+   ossimTopographicCorrectionFilter::initialize();
+   if(theLandsatHeader == "")
+   {
+      setLandsatHeader(findLandsatHeader());
+   }
+   else
+   {
+      setLandsatHeader(theLandsatHeader);
+   }
+}
+
+void ossimLandsatTopoCorrectionFilter::setLandsatHeader(const ossimFilename& header)
+{
+   if(header != "")
+   {
+      theLandsatHeader = header;
+      ossimRefPtr<ossimFfL7> headerL7 = new ossimFfL7(header.c_str());
+      headerL7->getGain(theGain);
+      headerL7->getBias(theBias);
+      headerL7->getSunElevation(theLightSourceElevationAngle);
+      headerL7->getSunAzimuth(theLightSourceAzimuthAngle);
+      computeLightDirection();
+      theJulianDay = headerL7->getJulianDay();
+   }
+}
+
+ossimFilename ossimLandsatTopoCorrectionFilter::findLandsatHeader()
+{
+   ossimFilename result;
+
+   if(!getInput(0))
+   {
+      return result;
+   }
+
+   ossimTypeNameVisitor visitor(ossimString("ossimImageHandler"),
+                                true,
+                                ossimVisitor::VISIT_CHILDREN|ossimVisitor::VISIT_INPUTS);
+   getInput(0)->accept(visitor);
+   
+   // If there are multiple image handlers, e.g. a mosaic do not uses.
+   ossimRefPtr<ossimImageHandler> handler = 0;   
+   if ( visitor.getObjects().size() == 1 )
+   {
+      handler = visitor.getObjectAs<ossimImageHandler>( 0 );
+   }
+
+   if( handler.valid() )
+   {
+      ossimFilename imageFile = handler->getFilename();
+      imageFile.setExtension("fst");
+      if(imageFile.exists())
+      {
+         result = imageFile;
+      }
+      else
+      {
+         imageFile.setExtension("FST");
+         if(imageFile.exists())
+         {
+            result = imageFile;
+         }
+         else
+         {
+            ossimDirectory dir;
+
+            if(dir.open(imageFile.path()))
+            {
+               vector<ossimFilename> fileList;
+
+               dir.findAllFilesThatMatch(fileList,
+                                         ".*.fst");
+               if(fileList.size() <1)
+               {
+                  dir.findAllFilesThatMatch(fileList,
+                                            ".*.FST");
+               }
+               for(int i = 0; i < (int)fileList.size(); ++i)
+               {
+                  if(fileList[i].contains("_hpn")||
+                     fileList[i].contains("_hrf")||
+                     fileList[i].contains("_htm"))
+                  {
+                     result = fileList[i];
+                     break;
+                  }
+               }
+            }
+         }
+      }
+   }
+   return result;
+}
+
+// void ossimLandsatTopoCorrectionFilter::addRegressionPoints(std::vector<ossim2dLinearRegression>& regressionPoints,
+//                                                            ossimImageData* colorData,
+//                                                            ossimImageData* normalData)
+// {
+//    ossim_uint32 b = 0;
+   
+//    for(b = 0; b < colorData->getNumberOfBands(); ++b)
+//    {
+//       ossim_float64* normalBands[3];
+//       normalBands[0] = normalData->getBuf(0);
+//       normalBands[1] = normalData->getBuf(1);
+//       normalBands[2] = normalData->getBuf(2);
+//       ossim_float64* colorData = 
+// }
+
+#if 0
+void ossimLandsatTopoCorrectionFilter::computeC()
+{
+   theCComputedFlag = false;
+   ossim_uint32 totalNumberOfPixelsUsed = 0;
+   if(getInput(0)&&getInput(1))
+   {
+      std::vector<ossim2dLinearRegression> linearRegression(6);
+      
+      ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
+      ossimImageSource* normalSource  = PTR_CAST(ossimImageSource, getInput(1));
+      ossimFfL7 headerL7(theLandsatHeader.c_str());
+
+      if(theLandsatHeader == "")
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "No landsat header found " << std::endl;
+         return;
+      }
+      if(colorSource->getNumberOfOutputBands() < 6)
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "The color source needs all the vir bands from the landsat" << std::endl
+                                            << "Not enough bands to process the request" << std::endl;
+         return;
+      }
+      
+      ossimIrect normalRect = normalSource->getBoundingRect();
+      ossimIrect colorRect  = colorSource->getBoundingRect();
+      ossimIrect clipRect   = normalRect.clipToRect(colorRect);
+      ossimIpt ul = clipRect.ul();
+      ossimIpt lr = clipRect.lr();
+      long julianDay = headerL7.getJulianDay();
+      double d2 =pow( (double)(1 - 0.01674 * ossim::cosd(0.9856*(julianDay-4)) ), 2.0);
+      ossim_uint32 numberOfPixelsUsedForTile = 0;
+      for(int y = ul.y; ((y < lr.y)&&(totalNumberOfPixelsUsed<1000));++y)
+      {
+         for(int x = ul.x; ((x < lr.x)&&(totalNumberOfPixelsUsed<1000)); ++x)
+         {
+            ossimIrect reqRect(x,
+                               y,
+                               x + 127,
+                               y + 127);
+            ossimIrect reqClip = reqRect.clipToRect(clipRect);
+            ossimImageData* colorData  = colorSource->getTile(reqClip, 0);
+            ossimImageData* normalData = normalSource->getTile(reqClip, 0);
+            ossim_uint8* colorBands[6];
+            double* normalBands[3];
+            double normalBandsNp[3];
+            ossim_uint8 colorBandsNp[6];
+            colorBands[0] = (ossim_uint8*)colorData->getBuf(0);
+            colorBands[1] = (ossim_uint8*)colorData->getBuf(1);
+            colorBands[2] = (ossim_uint8*)colorData->getBuf(2);
+            colorBands[3] = (ossim_uint8*)colorData->getBuf(3);
+            colorBands[4] = (ossim_uint8*)colorData->getBuf(4);
+            colorBands[5] = (ossim_uint8*)colorData->getBuf(5);
+            colorBandsNp[0] = (ossim_uint8)colorData->getNullPix(0);
+            colorBandsNp[1] = (ossim_uint8)colorData->getNullPix(1);
+            colorBandsNp[2] = (ossim_uint8)colorData->getNullPix(2);
+            colorBandsNp[3] = (ossim_uint8)colorData->getNullPix(3);
+            colorBandsNp[4] = (ossim_uint8)colorData->getNullPix(4);
+            colorBandsNp[5] = (ossim_uint8)colorData->getNullPix(5);
+            normalBands[0] = (double*)normalData->getBuf(0);
+            normalBands[1] = (double*)normalData->getBuf(1);
+            normalBands[2] = (double*)normalData->getBuf(2);
+            normalBandsNp[0] = normalData->getNullPix(0);
+            normalBandsNp[1] = normalData->getNullPix(1);
+            normalBandsNp[2] = normalData->getNullPix(2);
+            ossim_uint32 offset = 0;
+            ossim_uint32 numberOfPixels = reqClip.width()*reqClip.height();
+            numberOfPixelsUsedForTile = 0;
+            for(offset = 0; ((offset < numberOfPixels)&&(numberOfPixelsUsedForTile < 10)); ++offset)
+            {
+               if((*colorBands[0] != colorBandsNp[0])&&
+                  (*colorBands[1] != colorBandsNp[1])&&
+                  (*colorBands[2] != colorBandsNp[2])&&
+                  (*colorBands[3] != colorBandsNp[3])&&
+                  (*colorBands[4] != colorBandsNp[4])&&
+                  (*colorBands[5] != colorBandsNp[5])&&
+                  (*normalBands[0] != normalBandsNp[0])&&
+                  (*normalBands[1] != normalBandsNp[1])&&
+                  (*normalBands[2] != normalBandsNp[2]))
+               {
+                  double ndviTest = (((double)*colorBands[3] - (double)*colorBands[2])/
+                                     ((double)*colorBands[3] + (double)*colorBands[2]));
+                  if(ndviTest > 0.0)
+                  {
+                     double radiance5 = theBias[5]+(*colorBands[5]*theGain[5]);
+//                     double p = (M_PI*radiance5*d2)/(esun[5]*cosd(90-theLightSourceAzimuthAngle));
+
+//                    if(p < .05)
+                     {
+                        double cosineI = ((*normalBands[0])*theLightDirection[0] +
+                                          (*normalBands[1])*theLightDirection[1] +
+                                          (*normalBands[2])*theLightDirection[2]);
+
+                        double radiance0 = theBias[0]+(*colorBands[0]*theGain[0]);
+                        double radiance1 = theBias[1]+(*colorBands[1]*theGain[1]);
+                        double radiance2 = theBias[2]+(*colorBands[2]*theGain[2]);
+                        double radiance3 = theBias[3]+(*colorBands[3]*theGain[3]);
+                        double radiance4 = theBias[4]+(*colorBands[4]*theGain[4]);
+                        cosineI = fabs(cosineI);
+                        if(cosineI > 1.0) cosineI = 1.0;
+                        if(cosineI < 0.0) cosineI = 0.0;
+                       cosineI = acos(cosineI);
+// //                         linearRegression[0].addPoint(ossimDpt( cosineI,(double)(*colorBands[0])));
+// //                         linearRegression[1].addPoint(ossimDpt( cosineI,(double)(*colorBands[1])));
+// //                         linearRegression[2].addPoint(ossimDpt( cosineI,(double)(*colorBands[2])));
+// //                         linearRegression[3].addPoint(ossimDpt( cosineI,(double)(*colorBands[3])));
+// //                         linearRegression[4].addPoint(ossimDpt( cosineI,(double)(*colorBands[4])));
+// //                         linearRegression[5].addPoint(ossimDpt( cosineI,(double)(*colorBands[5])));
+
+                        linearRegression[0].addPoint(ossimDpt( cosineI,radiance0));
+                        linearRegression[1].addPoint(ossimDpt( cosineI,radiance1));
+                        linearRegression[2].addPoint(ossimDpt( cosineI,radiance2));
+                        linearRegression[3].addPoint(ossimDpt( cosineI,radiance3));
+                        linearRegression[4].addPoint(ossimDpt( cosineI,radiance4));
+                        linearRegression[5].addPoint(ossimDpt( cosineI,radiance5));
+                        
+                        ++numberOfPixelsUsedForTile;
+                        ++totalNumberOfPixelsUsed;
+                     }
+                  }
+               }
+               ++colorBands[0];
+               ++colorBands[1];
+               ++colorBands[2];
+               ++colorBands[3];
+               ++colorBands[4];
+               ++colorBands[5];
+               ++normalBands[0];
+               ++normalBands[1];
+               ++normalBands[2];
+            }
+         }
+      }
+      if(totalNumberOfPixelsUsed > 2)
+      {
+         linearRegression[0].solve();
+         linearRegression[1].solve();
+         linearRegression[2].solve();
+         linearRegression[3].solve();
+         linearRegression[4].solve();
+         linearRegression[5].solve();
+         
+         ossimNotify(ossimNotifyLevel_INFO) << "linear regression results = " << endl
+                                             << linearRegression[0] << endl
+                                             << linearRegression[1] << endl
+                                             << linearRegression[2] << endl
+                                             << linearRegression[3] << endl
+                                             << linearRegression[4] << endl
+                                             << linearRegression[5] << endl;
+         double b,m;
+         linearRegression[0].getEquation(m, b);
+         theC[0] = b/m;
+         linearRegression[1].getEquation(m, b);
+         theC[1] = b/m;
+         linearRegression[2].getEquation(m, b);
+         theC[2] = b/m;
+         linearRegression[3].getEquation(m, b);
+         theC[3] = b/m;
+         linearRegression[4].getEquation(m, b);
+         theC[4] = b/m;
+         linearRegression[5].getEquation(m, b);
+         theC[5] = b/m;
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_INFO) << "No points found in regression test" << endl;
+      }
+               
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "No input connected to the ossimLandsatTopoCorrectionFilter" << std::endl;
+      return;
+   }
+   
+   theCComputedFlag = true;
+}
+#endif
+
+bool ossimLandsatTopoCorrectionFilter::loadState(const ossimKeywordlist& kwl,
+                                                 const char* prefix)
+{
+   ossimTopographicCorrectionFilter::loadState(kwl, prefix);
+   const char* filename = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
+
+   if(filename)
+   {
+      setLandsatHeader(filename);
+   }
+
+   return true;
+}
+
+bool ossimLandsatTopoCorrectionFilter::saveState(ossimKeywordlist& kwl,
+                                                 const char* prefix)const
+{
+   ossimTopographicCorrectionFilter::saveState(kwl, prefix);
+
+   kwl.add(prefix,
+           ossimKeywordNames::FILENAME_KW,
+           theLandsatHeader.c_str(),
+           true);
+   
+   return true;
+}
+
diff --git a/src/ossim/imaging/ossimLocalCorrelationFusion.cpp b/ossim/src/ossim/imaging/ossimLocalCorrelationFusion.cpp
similarity index 100%
rename from src/ossim/imaging/ossimLocalCorrelationFusion.cpp
rename to ossim/src/ossim/imaging/ossimLocalCorrelationFusion.cpp
diff --git a/ossim/src/ossim/imaging/ossimMapCompositionSource.cpp b/ossim/src/ossim/imaging/ossimMapCompositionSource.cpp
new file mode 100644
index 0000000..e7c7fa6
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimMapCompositionSource.cpp
@@ -0,0 +1,3801 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimMapCompositionSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimMapCompositionSource.h>
+#include <ossim/imaging/ossimU8ImageData.h>
+#include <ossim/imaging/ossimImageDataHelper.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/imaging/ossimAnnotationFontObject.h>
+#include <ossim/imaging/ossimAnnotationLineObject.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/font/ossimFontFactoryRegistry.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimDms.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimColorProperty.h>
+#include <ossim/base/ossimContainerProperty.h>
+#include <ossim/base/ossimFontProperty.h>
+#include <ossim/base/ossimBooleanProperty.h>
+#include <ossim/base/ossimTextProperty.h>
+#include <ossim/base/ossimNumericProperty.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <sstream>
+
+using namespace std;
+
+static const char* GRID_TYPE_ENUM_NAMES[]     = {"none", "line", "reseaux"};
+static const char* VIEW_WIDTH_KW              = "view_width";
+static const char* VIEW_HEIGHT_KW             = "view_height";
+static const char* METER_GRID_SPACING_X_KW    = "meter_grid_spacing_x";
+static const char* METER_GRID_SPACING_Y_KW    = "meter_grid_spacing_y";
+static const char* GEO_GRID_SPACING_LON_KW    = "geo_grid_spacing_lon";
+static const char* GEO_GRID_SPACING_LAT_KW    = "geo_grid_spacing_lat";
+static const char* METER_GRID_TYPE_KW         = "meter_grid_type";
+static const char* GEO_GRID_TYPE_KW           = "geo_grid_type";
+static const char* TOP_BORDER_LENGTH_KW       = "top_border_length";
+static const char* BOTTOM_BORDER_LENGTH_KW    = "bottom_border_length";
+static const char* LEFT_BORDER_LENGTH_KW      = "top_border_length";
+static const char* RIGHT_BORDER_LENGTH_KW     = "right_border_length";
+static const char* BORDER_COLOR_KW            = "border_color";
+static const char* GEO_GRID_COLOR_KW          = "geo_grid_color";
+static const char* METER_GRID_COLOR_KW        = "meter_grid_color";
+static const char* TITLE_STRING_KW            = "title_string";
+static const char* TITLE_COLOR_KW             = "title_color";
+
+static const char* TOP_GEO_LABEL_COLOR_KW     = "top_geo_label_color";
+static const char* BOTTOM_GEO_LABEL_COLOR_KW  = "bottom_geo_label_color";
+static const char* LEFT_GEO_LABEL_COLOR_KW    = "left_geo_label_color";
+static const char* RIGHT_GEO_LABEL_COLOR_KW   = "right_geo_label_color";
+
+static const char* TOP_METER_LABEL_COLOR_KW     = "top_meter_label_color";
+static const char* BOTTOM_METER_LABEL_COLOR_KW  = "bottom_meter_label_color";
+static const char* LEFT_METER_LABEL_COLOR_KW    = "left_meter_label_color";
+static const char* RIGHT_METER_LABEL_COLOR_KW   = "right_meter_label_color";
+
+static const char* TOP_GEO_LABEL_FORMAT_KW    = "top_geo_label_format";
+static const char* BOTTOM_GEO_LABEL_FORMAT_KW = "bottom_geo_label_format";
+static const char* LEFT_GEO_LABEL_FORMAT_KW   = "left_geo_label_format";
+static const char* RIGHT_GEO_LABEL_FORMAT_KW  = "right_geo_label_format";
+
+static const char* TOP_GEO_LABEL_FLAG_KW      = "top_geo_label_flag";
+static const char* BOTTOM_GEO_LABEL_FLAG_KW   = "bottom_geo_label_flag";
+static const char* LEFT_GEO_LABEL_FLAG_KW     = "left_geo_label_flag";
+static const char* RIGHT_GEO_LABEL_FLAG_KW    = "right_geo_label_flag";
+
+static const char* TOP_METER_LABEL_FLAG_KW    = "top_meter_label_flag";
+static const char* BOTTOM_METER_LABEL_FLAG_KW = "bottom_meter_label_flag";
+static const char* LEFT_METER_LABEL_FLAG_KW   = "left_meter_label_flag";
+static const char* RIGHT_METER_LABEL_FLAG_KW  = "right_meter_label_flag";
+
+static const char* TOP_GEO_LABEL_FONT_KW      = "top_geo_label_font";
+static const char* BOTTOM_GEO_LABEL_FONT_KW   = "bottom_geo_label_font";
+static const char* LEFT_GEO_LABEL_FONT_KW     = "left_geo_label_font";
+static const char* RIGHT_GEO_LABEL_FONT_KW    = "right_geo_label_font";
+static const char* TOP_METER_LABEL_FONT_KW    = "top_meter_label_font";
+static const char* BOTTOM_METER_LABEL_FONT_KW = "bottom_meter_label_font";
+static const char* LEFT_METER_LABEL_FONT_KW   = "left_meter_label_font";
+static const char* RIGHT_METER_LABEL_FONT_KW  = "right_meter_label_font";
+static const char* TITLE_FONT_KW              = "title_font";
+
+static ossimTrace traceDebug("ossimMapCompositionSource:debug");
+
+RTTI_DEF1(ossimMapCompositionSource, "ossimMapCompositionSource", ossimAnnotationSource);
+ossimMapCompositionSource::ossimMapCompositionSource()
+   :ossimAnnotationSource(),
+    theMeterGridType(OSSIM_GRID_NONE),
+    theGeographicGridType(OSSIM_GRID_LINE),
+    theTopBorderLength(200),
+    theBottomBorderLength(200),
+    theLeftBorderLength(300),
+    theRightBorderLength(300),
+    theBorderColor(255,255,255),
+    theGeographicGridColor(255,255,255),
+    theMeterGridColor(255,255,255),
+    theTitleString(""),
+    theTitleFont(NULL),
+    theTitleColor(1, 1, 1),
+    theTopGeographicLabelColor(1, 1, 1),
+    theBottomGeographicLabelColor(1, 1, 1),
+    theLeftGeographicLabelColor(1, 1, 1),
+    theRightGeographicLabelColor(1, 1, 1),
+    theTopMeterLabelColor(1, 1, 1),
+    theBottomMeterLabelColor(1, 1, 1),
+    theLeftMeterLabelColor(1, 1, 1),
+    theRightMeterLabelColor(1, 1, 1),
+    theGeographicTopLabelFont(NULL),
+    theGeographicBottomLabelFont(NULL),
+    theGeographicLeftLabelFont(NULL),
+    theGeographicRightLabelFont(NULL),
+    theMeterTopLabelFont(NULL),
+    theMeterBottomLabelFont(NULL),
+    theMeterLeftLabelFont(NULL),
+    theMeterRightLabelFont(NULL),
+    theTopGeographicFormat("dd at mm'ss\".ssssC"),
+    theBottomGeographicFormat("dd at mm'ss\".ssssC"),
+    theLeftGeographicFormat("dd at mm'ss\".ssssC"),
+    theRightGeographicFormat("dd at mm'ss\".ssssC"),
+    theTopGeographicLabelFlag(true),
+    theBottomGeographicLabelFlag(true),
+    theLeftGeographicLabelFlag(true),
+    theRightGeographicLabelFlag(true),
+    theTopGeographicTickFlag(true),
+    theBottomGeographicTickFlag(true),
+    theLeftGeographicTickFlag(true),
+    theRightGeographicTickFlag(true),
+    theTopMeterLabelFlag(false),
+    theBottomMeterLabelFlag(false),
+    theLeftMeterLabelFlag(false),
+    theRightMeterLabelFlag(false),
+    theTopMeterTickFlag(false),
+    theBottomMeterTickFlag(false),
+    theLeftMeterTickFlag(false),
+    theRightMeterTickFlag(false),
+    theGeographicSpacing(1.0, 1.0),
+    theMeterSpacing(3600*30, 3600*30)
+{
+   theViewWidthHeight = ossimIpt(-1,-1);
+   vector<ossimFontInformation> info;
+   ossimFontFactoryRegistry::instance()->getFontInformation(info);
+
+   if(info.size())
+   {
+      theGeographicTopLabelFont = ossimFontFactoryRegistry::instance()->createFont(info[0]);
+      theGeographicTopLabelFontInfo = info[0];
+      theGeographicTopLabelFontInfo.thePointSize = ossimIpt(12,12);
+
+      if(theGeographicTopLabelFont.valid())
+      {
+         theGeographicBottomLabelFont     = (ossimFont*)theGeographicTopLabelFont->dup();
+         theGeographicBottomLabelFontInfo = theGeographicTopLabelFontInfo;
+         theGeographicLeftLabelFont       = (ossimFont*)theGeographicTopLabelFont->dup();
+         theGeographicLeftLabelFontInfo   = theGeographicTopLabelFontInfo;
+         theGeographicRightLabelFont      = (ossimFont*)theGeographicTopLabelFont->dup();
+         theGeographicRightLabelFontInfo  = theGeographicTopLabelFontInfo;
+
+         theMeterTopLabelFont             = (ossimFont*)theGeographicTopLabelFont->dup();
+         theMeterTopLabelFontInfo         = theGeographicTopLabelFontInfo;
+         theMeterBottomLabelFont          = (ossimFont*)theGeographicTopLabelFont->dup();
+         theMeterBottomLabelFontInfo      = theGeographicTopLabelFontInfo;
+         theMeterLeftLabelFont            = (ossimFont*)theGeographicTopLabelFont->dup();
+         theMeterLeftLabelFontInfo        = theGeographicTopLabelFontInfo;
+         theMeterRightLabelFont           = (ossimFont*)theGeographicTopLabelFont->dup();
+         theMeterRightLabelFontInfo       = theGeographicTopLabelFontInfo;
+         
+         theTitleFont                     = (ossimFont*)theGeographicTopLabelFont->dup();
+         theTitleFontInfo                 = theGeographicTopLabelFontInfo;
+         theTitleFontInfo.thePointSize    = ossimIpt(48, 48);
+      }
+   }
+}
+
+ossimMapCompositionSource::~ossimMapCompositionSource()
+{
+   theGeographicTopLabelFont = 0;
+   theGeographicBottomLabelFont = 0;
+   theGeographicLeftLabelFont = 0;
+   theGeographicRightLabelFont = 0;
+   theMeterTopLabelFont = 0;
+   theMeterBottomLabelFont = 0;
+   theMeterLeftLabelFont = 0;
+
+   theMeterRightLabelFont = 0;
+   theTitleFont = 0;
+   deleteFixedAnnotations();
+}
+
+ossimRefPtr<ossimImageData> ossimMapCompositionSource::getTile(const ossimIrect& tileRect,
+                                                               ossim_uint32 resLevel)
+{
+   if(!theTile)
+   {
+      allocate(tileRect);
+      if(!theTile)
+      {
+         if(theInputConnection)
+         {
+            return theInputConnection->getTile(tileRect, resLevel);
+         }
+      }
+   }
+   theTile->setImageRectangle(tileRect);
+   theTile->makeBlank();
+   
+   if(theInputConnection)
+   {
+      ossimRefPtr<ossimImageData> tile = theInputConnection->getTile(tileRect,
+                                                                     resLevel);
+
+      if(tile.valid())
+      {
+         if(tile->getScalarType() != OSSIM_UCHAR)
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimMapCompositionSource::getTile\n"
+               << "Error input is not uchar" << endl;
+            return tile;
+         }
+         else
+         {
+            if(tile->getBuf()&&(tile->getDataObjectStatus() != OSSIM_EMPTY))
+            {
+               int band = 0;
+               int outBands = theTile->getNumberOfBands();
+               int minBand = std::min((long)theTile->getNumberOfBands(),
+                                      (long)tile->getNumberOfBands());
+               for(band = 0; band < minBand; ++band)
+               {
+                  theTile->loadBand(tile->getBuf(band),
+                                    tile->getImageRectangle(),
+                                    band);
+               }
+               // copy last band of input tile to all output
+               // bands if the input tile did not have enough bands.
+               //
+               for(;band < outBands;++band)
+               {
+                  theTile->loadBand(tile->getBuf(minBand-1),
+                                    tile->getImageRectangle(),
+                                    band);
+               }
+            }
+	    drawBorders();
+	    drawAnnotations(theTile);
+         }
+      }
+   }
+   theTile->validate();
+   return theTile;
+}
+
+void ossimMapCompositionSource::setGeographicLabelFormat(const ossimString format)
+{
+   if( (format == theTopGeographicFormat)&&
+       (format == theBottomGeographicFormat)&&
+       (format == theLeftGeographicFormat)&&
+       (format == theRightGeographicFormat))
+   {
+      return;
+   }
+   theTopGeographicFormat    = format;
+   theBottomGeographicFormat = format;
+   theLeftGeographicFormat   = format;
+   theRightGeographicFormat  = format;
+}
+
+void ossimMapCompositionSource::setTopGeographicLabelFormat(const ossimString& format)
+{
+   if(format == theTopGeographicFormat)
+   {
+      return;
+   }
+   theTopGeographicFormat = format;
+}
+
+void ossimMapCompositionSource::setBottomGeographicLabelFormat(const ossimString& format)
+{
+   if(format == theBottomGeographicFormat)
+   {
+      return;
+   }
+   theBottomGeographicFormat = format;
+
+   // need to reset the fonts
+//   layoutAnnotations();
+}
+
+void ossimMapCompositionSource::setLeftGeographicLabelFormat(const ossimString& format)
+{
+   if(format == theLeftGeographicFormat)
+   {
+      return;
+   }
+   theLeftGeographicFormat = format;
+
+   // need to reset the fonts
+//   layoutAnnotations();
+}
+
+void ossimMapCompositionSource::setRightGeographicLabelFormat(const ossimString& format)
+{
+   if(format == theRightGeographicFormat)
+   {
+      return;
+   }
+   theRightGeographicFormat = format;
+
+}
+
+void ossimMapCompositionSource::setTitleFont(const ossimFontInformation& fontInfo)
+{
+   if(theTitleFontInfo == fontInfo)
+   {
+      return;
+   }
+   ossimFont* font = ossimFontFactoryRegistry::instance()->createFont(fontInfo);
+   if(font)
+   {
+ 
+      theTitleFont     = font;
+      theTitleFontInfo = fontInfo;      
+   }
+}
+
+void ossimMapCompositionSource::setGeographicTopLabelFont(const ossimFontInformation& fontInfo)
+{
+   const char* MODULE = "ossimMapCompositionSource::setGeographicTopLabelFont";
+   
+   if(traceDebug())
+   {
+      CLOG << "Entering...." <<endl;
+   }
+   if(theGeographicTopLabelFontInfo == fontInfo)
+   {
+      if(traceDebug())
+      {
+         CLOG << "Font info the same exiting...." <<endl
+              << theGeographicTopLabelFontInfo << endl;
+      }
+      
+      return;
+   }
+   ossimFont* font = ossimFontFactoryRegistry::instance()->createFont(fontInfo);
+
+   if(font)
+   {
+      if(traceDebug())
+      {
+         CLOG << "Previous font info " <<endl
+              << theGeographicTopLabelFont.get() << endl;
+      }
+      theGeographicTopLabelFont = font;
+      theGeographicTopLabelFontInfo = fontInfo;
+
+      if(traceDebug())
+      {
+         CLOG << "New font info " <<endl
+              << theGeographicTopLabelFont.get() << endl;
+      }      
+   }
+}
+
+void ossimMapCompositionSource::setGeographicBottomLabelFont(const ossimFontInformation& fontInfo)
+{
+   if(theGeographicBottomLabelFontInfo == fontInfo)
+   {
+      return;
+   }
+   ossimFont* font = ossimFontFactoryRegistry::instance()->createFont(fontInfo);
+
+   if(font)
+   {
+      theGeographicBottomLabelFont     = font;
+      theGeographicBottomLabelFontInfo = fontInfo;
+
+   }
+}
+
+void ossimMapCompositionSource::setGeographicLeftLabelFont(const ossimFontInformation& fontInfo)
+{
+   if(theGeographicRightLabelFontInfo == fontInfo)
+   {
+      return;
+   }
+   ossimFont* font = ossimFontFactoryRegistry::instance()->createFont(fontInfo);
+
+   if(font)
+   {
+      theGeographicLeftLabelFont     = font;
+      theGeographicLeftLabelFontInfo = fontInfo;
+
+   }
+}
+
+void ossimMapCompositionSource::setGeographicRightLabelFont(const ossimFontInformation& fontInfo)
+{
+   if(theGeographicRightLabelFontInfo == fontInfo)
+   {
+      return;
+   }
+   
+   ossimFont* font = ossimFontFactoryRegistry::instance()->createFont(fontInfo);
+
+   if(font)
+   {
+      theGeographicRightLabelFont = font;
+      theGeographicRightLabelFontInfo = fontInfo;
+   }
+}
+
+
+void ossimMapCompositionSource::setMeterTopLabelFont(const ossimFontInformation& fontInfo)
+{
+   if(theMeterTopLabelFontInfo == fontInfo)
+   {
+      return;
+   }
+   ossimFont* font = ossimFontFactoryRegistry::instance()->createFont(fontInfo);
+
+   if(font)
+   {
+      theMeterTopLabelFont     = font;
+      theMeterTopLabelFontInfo = fontInfo;
+   }
+}
+
+void ossimMapCompositionSource::setMeterBottomLabelFont(const ossimFontInformation& fontInfo)
+{
+   if(theMeterBottomLabelFontInfo == fontInfo)
+   {
+      return;
+   }
+   ossimFont* font = ossimFontFactoryRegistry::instance()->createFont(fontInfo);
+
+   if(font)
+   {
+      theMeterBottomLabelFont     = font;
+      theMeterBottomLabelFontInfo = fontInfo;
+   }
+}
+
+void ossimMapCompositionSource::setMeterLeftLabelFont(const ossimFontInformation& fontInfo)
+{
+   if(theMeterLeftLabelFontInfo == fontInfo)
+   {
+      return;
+   }
+   ossimFont* font = ossimFontFactoryRegistry::instance()->createFont(fontInfo);
+
+   if(font)
+   {
+      theMeterLeftLabelFont     = font;
+      theMeterLeftLabelFontInfo = fontInfo;
+   }
+}
+
+void ossimMapCompositionSource::setMeterRightLabelFont(const ossimFontInformation& fontInfo)
+{
+   if(theMeterRightLabelFontInfo == fontInfo)
+   {
+      return;
+   }
+   ossimFont* font = ossimFontFactoryRegistry::instance()->createFont(fontInfo);
+
+   if(font)
+   {
+      theMeterRightLabelFont     = font;
+      theMeterRightLabelFontInfo = fontInfo;
+   }
+}
+
+ossimIrect ossimMapCompositionSource::getBoundingRect(ossim_uint32 resLevel)const
+{
+   ossimIrect result;
+
+   result.makeNan();
+   if(theInputConnection)
+   {
+      ossimIrect inputRect  = getViewingRect();
+
+      if(!inputRect.hasNans())
+      {
+         ossimDpt decimation;
+         getDecimationFactor(resLevel,
+                             decimation);
+         int leftBorderLength   = theLeftBorderLength;
+         int rightBorderLength  = theRightBorderLength;
+         int topBorderLength    = theTopBorderLength;
+         int bottomBorderLength = theBottomBorderLength;
+
+         ossimIpt p1(inputRect.ul().x - leftBorderLength,
+                     inputRect.ul().y - topBorderLength);
+         
+         ossimIpt p2(inputRect.ur().x + rightBorderLength,
+                     inputRect.ur().y - topBorderLength);
+         
+         ossimIpt p3(inputRect.lr().x + rightBorderLength,
+                     inputRect.lr().y + bottomBorderLength);
+         
+         ossimIpt p4(inputRect.ll().x - leftBorderLength,
+                     inputRect.ll().y + bottomBorderLength);
+
+         result = ossimIrect(p1, p2, p3, p4);
+         
+         if(!decimation.hasNans())
+         {
+            result*=decimation;
+         }
+      }
+   }
+   return result;
+}
+
+void ossimMapCompositionSource::layoutAnnotations()
+{
+   deleteFixedAnnotations();
+
+   addTitle();
+   addGridLabels();
+   if(theGeographicGridType == OSSIM_GRID_LINE)
+   {
+      addGeographicGridLines();
+   }
+   else if(theGeographicGridType == OSSIM_GRID_RESEAUX)
+   {
+      addGeographicGridReseaux();
+   }
+   
+   if(theMeterGridType == OSSIM_GRID_LINE)
+   {
+      addMeterGridLines();
+   }
+   else if(theMeterGridType == OSSIM_GRID_RESEAUX)
+   {
+      addMeterGridReseaux();
+   }
+}
+
+
+void ossimMapCompositionSource::initialize()
+{
+   ossimAnnotationSource::initialize();   
+
+   theTile = 0;
+   if(theInputConnection)
+   {
+      computeBorderRects();
+      layoutAnnotations();
+   }
+   else 
+   {
+      deleteFixedAnnotations();
+   }
+}
+
+void ossimMapCompositionSource::computeBorderRects()
+{
+   if(theInputConnection)
+   {
+      ossimIrect inputRect = getViewingRect();;
+      
+      theTopBorder = ossimIrect(inputRect.ul().x - theLeftBorderLength,
+                                inputRect.ul().y - theTopBorderLength,
+                                inputRect.ur().x + theRightBorderLength,
+                                inputRect.ur().y);
+      
+      theBottomBorder = ossimIrect(inputRect.ll().x - theLeftBorderLength,
+                                   inputRect.ll().y,
+                                   inputRect.lr().x + theRightBorderLength,
+                                   inputRect.lr().y + theBottomBorderLength);
+      
+      theLeftBorder   = ossimIrect(theTopBorder.ul().x,
+                                   theTopBorder.ll().y,
+                                   inputRect.ll().x,
+                                   inputRect.ll().y);
+      
+      theRightBorder   = ossimIrect(inputRect.ur().x,
+                                    inputRect.ur().y,
+                                    theBottomBorder.lr().x,
+                                    inputRect.lr().y);
+   }
+   else
+   {
+      theTopBorder.makeNan();
+      theBottomBorder.makeNan();
+      theLeftBorder.makeNan();
+      theRightBorder.makeNan();
+   }
+      
+}
+
+void ossimMapCompositionSource::drawBorders()
+{
+   if(theTile.valid())
+   {
+      ossimIrect top    = theTopBorder;
+      ossimIrect bottom = theBottomBorder;
+      ossimIrect left   = theLeftBorder;
+      ossimIrect right  = theRightBorder;
+
+//       if(resLevel)
+//       {
+//          ossimDpt decimation;
+//          getDecimationFactor(resLevel,
+//                              decimation);
+
+//          if(!decimation.hasNans())
+//          {
+//             top*=decimation;
+//             bottom*=decimation;
+//             left*=decimation;
+//             right*=decimation;            
+//          }
+//       }
+      ossimIrect tileRect = theTile->getImageRectangle();
+      
+      ossimImageDataHelper helper(theTile.get());
+      
+      if(top.intersects(tileRect))
+      {
+         helper.fill(theBorderColor,
+                     top.clipToRect(tileRect),false);
+      }
+      if(bottom.intersects(tileRect))
+      {
+         helper.fill(theBorderColor,
+                     bottom.clipToRect(tileRect),false);
+      }
+      if(left.intersects(tileRect))
+      {
+         helper.fill(theBorderColor,
+                     left.clipToRect(tileRect),false);
+      }
+      if(right.intersects(tileRect))
+      {
+         helper.fill(theBorderColor,
+                     right.clipToRect(tileRect),false);
+      }
+   }
+}
+
+void ossimMapCompositionSource::addGridLabels()
+{
+   addGeographicTopGridLabels();
+   addGeographicBottomGridLabels();
+   addGeographicLeftGridLabels();
+   addGeographicRightGridLabels();
+
+   addMeterGridLabels();
+}
+
+void ossimMapCompositionSource::addGeographicTopGridLabels()
+{
+   const char* MODULE = "ossimMapCompositionSource::addGeographicTopGridLabels";
+   if(traceDebug())
+   {
+      CLOG << "Entering...." << endl;
+   }
+   if((!theTopGeographicLabelFlag)&&(!theTopGeographicTickFlag))
+   {
+      if(traceDebug())
+      {
+         CLOG << "Exiting, flags are false...." << endl;
+      }
+      return;
+   }
+   
+   if(theInputConnection)
+   { 
+      const ossimMapProjection* mapProj = inputMapProjection();
+      ossimGpt gpt[4];
+      ossimDrect rect = getViewingRect();
+
+      if(rect.hasNans()) return;
+      mapProj->lineSampleToWorld(rect.ul(), gpt[0]);
+      mapProj->lineSampleToWorld(rect.ur(), gpt[1]);
+      mapProj->lineSampleToWorld(rect.lr(), gpt[2]);
+      mapProj->lineSampleToWorld(rect.ll(), gpt[3]);
+      
+      ossimDrect grect(gpt[0], gpt[1], gpt[2], gpt[3], OSSIM_RIGHT_HANDED);
+
+      if(grect.hasNans()) return;
+      ossimDpt ulLatLon(((int)((grect.ul().x-theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
+                        ((int)((grect.ul().y+theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
+      
+      ossimDpt lrLatLon(((int)((grect.lr().x+theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
+                        ((int)((grect.lr().y-theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
+
+      while(ulLatLon.lat > 90)
+      {
+         ulLatLon.lat -= theGeographicSpacing.lat;
+      }
+      while(ulLatLon.lon < -180)
+      {
+         ulLatLon.lon += theGeographicSpacing.lon;
+      }
+      while(lrLatLon.lat < -90)
+      {
+         ulLatLon.lat += theGeographicSpacing.lat;
+      }
+      while(lrLatLon.lon > 180)
+      {
+         ulLatLon.lon -= theGeographicSpacing.lon;
+      }
+      
+      ossimDrect latLonSpacing(ulLatLon,
+                               lrLatLon,
+                               OSSIM_RIGHT_HANDED);
+
+      if(traceDebug())
+      {
+         CLOG << "labeling bounding geo rect = " << latLonSpacing << endl;
+      }
+      // do the top side labels.
+      for(double lon = latLonSpacing.ul().x; lon <= latLonSpacing.lr().x; lon+=theGeographicSpacing.x)
+      {
+         ossimDpt tipt; // top
+         ossimDpt bipt; // bottom
+         
+         ossimGpt tgpt(latLonSpacing.ul().y,
+                       lon,
+                       0.0,
+                       gpt[0].datum());
+
+         ossimGpt bgpt(latLonSpacing.lr().y,
+                       lon,
+                       0.0,
+                       gpt[0].datum());
+         
+         mapProj->worldToLineSample(tgpt, tipt);
+         mapProj->worldToLineSample(bgpt, bipt);
+
+         
+         if((!tipt.hasNans()&& !bipt.hasNans()) && rect.clip(tipt, bipt))
+         {
+            ossimIpt rounded(tipt);
+            if( (rounded.x >= rect.ul().x)&&
+                (rounded.x <= rect.lr().x))
+            {
+               if(theTopGeographicLabelFlag)
+               {
+                  ossimDms dms(tgpt.lond(), false);
+               
+                  ossimString dmsString = dms.toString(theTopGeographicFormat.c_str());
+                  ossimAnnotationFontObject* lonLabel = 
+                     new ossimAnnotationFontObject(ossimIpt(0,0), dmsString);
+                  lonLabel->setFont(theGeographicTopLabelFont.get());
+                  lonLabel->setGeometryInformation(theGeographicTopLabelFontInfo);
+                  lonLabel->computeBoundingRect();
+                  ossimDrect boundsD;
+                  lonLabel->getBoundingRect(boundsD);
+                  
+                  ossimIpt center( rounded.x, ossim::round<int>(rect.ul().y-(boundsD.height()/2)));
+               
+                  lonLabel->setColor(theTopGeographicLabelColor.getR(), theTopGeographicLabelColor.getG(), theTopGeographicLabelColor.getB());
+                  lonLabel->setCenterPosition(center);
+                  lonLabel->computeBoundingRect();
+
+                  ossimDrect labelRect;
+                  lonLabel->getBoundingRect(labelRect);
+                  
+                  if(rect.intersects(labelRect))
+                  {
+                     ossimIrect intersection = rect.clipToRect(labelRect);
+                     center.y -= ossim::round<int>(rect.ul().y - intersection.lr().y);
+                  }
+
+                  center.y -= 24; // this will need to be the tick height later;
+                  lonLabel->setCenterPosition(center);
+                  lonLabel->computeBoundingRect();
+                  
+                  addFixedAnnotation(lonLabel);
+               }
+               if(theTopGeographicTickFlag)
+               {
+                  ossimAnnotationLineObject* lineLabel = new ossimAnnotationLineObject
+                     (ossimIpt(rounded.x,ossim::round<int>(rect.ul().y-24)),
+                      ossimIpt(rounded.x, ossim::round<int>(rect.ul().y)));
+                  lineLabel->setColor(theTopGeographicLabelColor.getR(), theTopGeographicLabelColor.getG(), theTopGeographicLabelColor.getB());
+                  addFixedAnnotation(lineLabel);
+               }
+            }
+         }
+      }
+   }
+   if(traceDebug())
+   {
+      CLOG << "Exiting...." << endl;
+   }
+}
+
+void ossimMapCompositionSource::addGeographicBottomGridLabels()
+{
+   if((!theBottomGeographicLabelFlag)&&(!theBottomGeographicTickFlag))
+   {
+      return;
+   }
+
+   const ossimMapProjection* mapProj = inputMapProjection();
+   if(mapProj)
+   { 
+      ossimGpt gpt[4];
+      ossimDrect rect = getViewingRect();
+
+      if(rect.hasNans()) return;
+      mapProj->lineSampleToWorld(rect.ul(), gpt[0]);
+      mapProj->lineSampleToWorld(rect.ur(), gpt[1]);
+      mapProj->lineSampleToWorld(rect.lr(), gpt[2]);
+      mapProj->lineSampleToWorld(rect.ll(), gpt[3]);
+      
+      ossimDrect grect(gpt[0], gpt[1], gpt[2], gpt[3], OSSIM_RIGHT_HANDED);
+
+      if(grect.hasNans()) return;
+      ossimDpt ulLatLon(((int)((grect.ul().x-theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
+                        ((int)((grect.ul().y+theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
+      
+      ossimDpt lrLatLon(((int)((grect.lr().x+theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
+                        ((int)((grect.lr().y-theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
+
+      while(ulLatLon.lat > 90)
+      {
+         ulLatLon.lat -= theGeographicSpacing.lat;
+      }
+      while(ulLatLon.lon < -180)
+      {
+         ulLatLon.lon += theGeographicSpacing.lon;
+      }
+      while(lrLatLon.lat < -90)
+      {
+         ulLatLon.lat += theGeographicSpacing.lat;
+      }
+      while(lrLatLon.lon > 180)
+      {
+         ulLatLon.lon -= theGeographicSpacing.lon;
+      }
+      
+      ossimDrect latLonSpacing(ulLatLon,
+                               lrLatLon,
+                               OSSIM_RIGHT_HANDED);
+
+      // do the top side labels.
+      for(double lon = latLonSpacing.ul().x; lon <= latLonSpacing.lr().x; lon+=theGeographicSpacing.x)
+      {
+         ossimDpt tipt; // top
+         ossimDpt bipt; // bottom
+         
+         ossimGpt tgpt(latLonSpacing.ul().y,
+                       lon,
+                       0.0,
+                       gpt[0].datum());
+
+         ossimGpt bgpt(latLonSpacing.lr().y,
+                       lon,
+                       0.0,
+                       gpt[0].datum());
+         
+         mapProj->worldToLineSample(tgpt, tipt);
+         mapProj->worldToLineSample(bgpt, bipt);
+
+         if(rect.clip(tipt, bipt))
+         {
+            ossimIpt rounded(bipt);
+            if( (rounded.x >= rect.ul().x)&&
+                (rounded.x <= rect.lr().x))
+            {
+               if(theBottomGeographicLabelFlag)
+               {
+                  ossimDms dms(bgpt.lond(), false);
+                  
+                  ossimString dmsString = dms.toString(theBottomGeographicFormat.c_str());
+                  ossimAnnotationFontObject* lonLabel = new ossimAnnotationFontObject(ossimIpt(0,0),
+                                                                                      dmsString);
+                  lonLabel->setGeometryInformation(theGeographicBottomLabelFontInfo);
+                  lonLabel->setFont(theGeographicBottomLabelFont.get());
+//                  lonLabel->setFont(theGeographicBottomLabelFont->dup());
+                  
+                  lonLabel->computeBoundingRect();
+                  ossimDrect boundsD;
+                  lonLabel->getBoundingRect(boundsD);
+                  ossimIrect bounds = boundsD;
+                  
+                  ossimIpt center( rounded.x,
+                                   ossim::round<int>(rect.lr().y+(bounds.height()/2)));
+                  
+                  lonLabel->setColor(theBottomGeographicLabelColor.getR(), theBottomGeographicLabelColor.getG(), theBottomGeographicLabelColor.getB());
+                  lonLabel->setCenterPosition(center);
+                  lonLabel->computeBoundingRect();
+                  lonLabel->getBoundingRect(boundsD);
+                  bounds = boundsD;
+
+                  ossimDrect labelRect;
+                  lonLabel->getBoundingRect(labelRect);
+                  
+                  if(rect.intersects(labelRect))
+                  {
+                     ossimIrect intersection = rect.clipToRect(labelRect);
+                     center.y += ossim::round<int>(rect.lr().y - intersection.ul().y);
+                  }
+
+                  center.y += 24; // this will need to be the tick height later;
+                  lonLabel->setCenterPosition(center);
+                  lonLabel->computeBoundingRect();
+
+
+                  addFixedAnnotation(lonLabel);
+               }
+               if(theBottomGeographicTickFlag)
+               {
+                  ossimAnnotationLineObject* lineLabel = new ossimAnnotationLineObject(ossimIpt(rounded.x,
+                                                                                                ossim::round<int>(rect.lr().y+24)),
+                                                                                       ossimIpt(rounded.x,
+                                                                                                ossim::round<int>(rect.lr().y)));
+                  lineLabel->setColor(theBottomGeographicLabelColor.getR(), theBottomGeographicLabelColor.getG(), theBottomGeographicLabelColor.getB());
+                  addFixedAnnotation(lineLabel);
+               }
+            }         
+         }
+      }
+   }   
+}
+
+void ossimMapCompositionSource::addGeographicLeftGridLabels()
+{
+   if((!theLeftGeographicLabelFlag)&&(!theLeftGeographicTickFlag))
+   {
+      return;
+   }
+   
+   const ossimMapProjection* mapProj = inputMapProjection();
+   if(mapProj)
+   { 
+      ossimGpt gpt[4];
+      ossimDrect rect = getViewingRect();
+
+      if(rect.hasNans()) return;
+      mapProj->lineSampleToWorld(rect.ul(), gpt[0]);
+      mapProj->lineSampleToWorld(rect.ur(), gpt[1]);
+      mapProj->lineSampleToWorld(rect.lr(), gpt[2]);
+      mapProj->lineSampleToWorld(rect.ll(), gpt[3]);
+      
+      ossimDrect grect(gpt[0],
+                       gpt[1],
+                       gpt[2],
+                       gpt[3],
+                       OSSIM_RIGHT_HANDED);
+
+      if(grect.hasNans()) return;
+      ossimDpt ulLatLon(((int)((grect.ul().x-theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
+                        ((int)((grect.ul().y+theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
+      
+      ossimDpt lrLatLon(((int)((grect.lr().x+theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
+                        ((int)((grect.lr().y-theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
+
+      while(ulLatLon.lat > 90)
+      {
+         ulLatLon.lat -= theGeographicSpacing.lat;
+      }
+      while(ulLatLon.lon < -180)
+      {
+         ulLatLon.lon += theGeographicSpacing.lon;
+      }
+      while(lrLatLon.lat < -90)
+      {
+         ulLatLon.lat += theGeographicSpacing.lat;
+      }
+      while(lrLatLon.lon > 180)
+      {
+         ulLatLon.lon -= theGeographicSpacing.lon;
+      }
+      
+      ossimDrect latLonSpacing(ulLatLon,
+                               lrLatLon,
+                               OSSIM_RIGHT_HANDED);
+      // do the left side labels
+      for(double lat = latLonSpacing.ul().y; lat >= latLonSpacing.lr().y; lat-=theGeographicSpacing.y)
+      {
+         ossimDpt lipt;
+         ossimDpt ript;
+         ossimGpt lgpt(lat,
+                       latLonSpacing.ul().x,
+                       0.0,
+                       gpt[0].datum());
+         ossimGpt rgpt(lat,
+                       latLonSpacing.ur().x,
+                       0.0,
+                       gpt[0].datum());
+
+         
+         mapProj->worldToLineSample(lgpt, lipt);
+         mapProj->worldToLineSample(rgpt, ript);
+         if(rect.clip(lipt, ript))
+         {
+            ossimIpt rounded(lipt);
+            if( (rounded.y >= rect.ul().y)&&
+                (rounded.y <= rect.lr().y))
+            {
+               if(theLeftGeographicLabelFlag)
+               {
+                  ossimDms dms(lgpt.latd());
+                  
+                  ossimString dmsString = dms.toString(theLeftGeographicFormat.c_str());
+                  ossimAnnotationFontObject* latLabel = new ossimAnnotationFontObject(ossimIpt(0,0),
+                                                                                      dmsString);
+                  latLabel->setGeometryInformation(theGeographicLeftLabelFontInfo);
+                  latLabel->setFont(theGeographicLeftLabelFont.get());
+//                  latLabel->setFont(theGeographicLeftLabelFont->dup());
+                  
+                  latLabel->computeBoundingRect();
+                  ossimDrect boundsD;
+                  latLabel->getBoundingRect(boundsD);
+                  ossimIrect bounds = boundsD;
+                  
+                  ossimIpt center( ossim::round<int>((rect.ul().x - (bounds.width()/2))),
+                                   rounded.y);
+                  
+                  latLabel->setColor(theLeftGeographicLabelColor.getR(), theLeftGeographicLabelColor.getG(), theLeftGeographicLabelColor.getB());
+                  latLabel->setCenterPosition(center);
+                  latLabel->computeBoundingRect();
+                  latLabel->getBoundingRect(boundsD);
+                  bounds = boundsD;
+
+                  ossimDrect labelRect;
+                  latLabel->getBoundingRect(labelRect);
+                  
+                  if(rect.intersects(labelRect))
+                  {
+                     ossimIrect intersection = rect.clipToRect(labelRect);
+                     center.x -= ossim::round<int>(rect.ul().x - intersection.ur().x);
+                  }
+
+                  center.x -= 24; // this will need to be the tick height later;
+                  latLabel->setCenterPosition(center);
+                  latLabel->computeBoundingRect();
+
+
+                  
+                  addFixedAnnotation(latLabel);
+               }
+               
+               if(theLeftGeographicTickFlag)
+               {
+                  ossimAnnotationLineObject* lineLabel = new ossimAnnotationLineObject(ossimIpt(ossim::round<int>(rect.ul().x),
+                                                                                                rounded.y),
+                                                                                       ossimIpt(ossim::round<int>(rect.ul().x-23),
+                                                                                                rounded.y));
+                  lineLabel->setColor(theLeftGeographicLabelColor.getR(), theLeftGeographicLabelColor.getG(), theLeftGeographicLabelColor.getB());
+                  addFixedAnnotation(lineLabel);
+               }
+            }
+         }
+      }
+   }
+}
+
+void ossimMapCompositionSource::addGeographicRightGridLabels()
+{
+   if((!theRightGeographicLabelFlag)&&(!theRightGeographicTickFlag))
+   {
+      return;
+   }
+
+   const ossimMapProjection* mapProj = inputMapProjection();
+   if(mapProj)
+   { 
+      ossimGpt gpt[4];
+      ossimDrect rect = getViewingRect();
+
+      if(rect.hasNans()) return;
+      mapProj->lineSampleToWorld(rect.ul(), gpt[0]);
+      mapProj->lineSampleToWorld(rect.ur(), gpt[1]);
+      mapProj->lineSampleToWorld(rect.lr(), gpt[2]);
+      mapProj->lineSampleToWorld(rect.ll(), gpt[3]);
+      
+      ossimDrect grect(gpt[0],
+                       gpt[1],
+                       gpt[2],
+                       gpt[3],
+                       OSSIM_RIGHT_HANDED);
+
+      if(grect.hasNans()) return;
+      ossimDpt ulLatLon(((int)((grect.ul().x-theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
+                        ((int)((grect.ul().y+theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
+      
+      ossimDpt lrLatLon(((int)((grect.lr().x+theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
+                        ((int)((grect.lr().y-theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
+
+      while(ulLatLon.lat > 90)
+      {
+         ulLatLon.lat -= theGeographicSpacing.lat;
+      }
+      while(ulLatLon.lon < -180)
+      {
+         ulLatLon.lon += theGeographicSpacing.lon;
+      }
+      while(lrLatLon.lat < -90)
+      {
+         ulLatLon.lat += theGeographicSpacing.lat;
+      }
+      while(lrLatLon.lon > 180)
+      {
+         ulLatLon.lon -= theGeographicSpacing.lon;
+      }
+      
+      ossimDrect latLonSpacing(ulLatLon,
+                               lrLatLon,
+                               OSSIM_RIGHT_HANDED);
+      // do the left side labels
+      for(double lat = latLonSpacing.ul().y; lat >= latLonSpacing.lr().y; lat-=theGeographicSpacing.y)
+      {
+         ossimDpt lipt;
+         ossimDpt ript;
+         ossimGpt lgpt(lat,
+                       latLonSpacing.ul().x,
+                       0.0,
+                       gpt[0].datum());
+         ossimGpt rgpt(lat,
+                       latLonSpacing.ur().x,
+                       0.0,
+                       gpt[0].datum());
+         
+         
+         mapProj->worldToLineSample(lgpt, lipt);
+         mapProj->worldToLineSample(rgpt, ript);
+         
+         if(rect.clip(lipt, ript))
+         {
+            ossimIpt rounded(ript);
+            if( (rounded.y >= rect.ul().y)&&
+                (rounded.y <= rect.lr().y))
+            {
+               if(theRightGeographicLabelFlag)
+               {
+                  ossimDms dms(rgpt.latd());
+                  
+                  ossimString dmsString = dms.toString(theRightGeographicFormat.c_str());
+                  ossimAnnotationFontObject* latLabel = new ossimAnnotationFontObject(ossimIpt(0,0),
+                                                                                      dmsString);
+                  latLabel->setGeometryInformation(theGeographicRightLabelFontInfo);
+                  latLabel->setFont(theGeographicRightLabelFont.get());
+//                  latLabel->setFont(theGeographicRightLabelFont->dup());
+                  latLabel->computeBoundingRect();
+                  ossimDrect boundsD;
+                  latLabel->getBoundingRect(boundsD);
+                  ossimIrect bounds = boundsD;
+                  
+                  ossimIpt center( ossim::round<int>((rect.ur().x + (bounds.width()/2))),
+                                   rounded.y);
+               
+                  latLabel->setColor(theRightGeographicLabelColor.getR(), theRightGeographicLabelColor.getG(), theRightGeographicLabelColor.getB());
+                  latLabel->setCenterPosition(center);
+                  latLabel->computeBoundingRect();
+                  latLabel->getBoundingRect(boundsD);
+                  bounds = boundsD;
+
+                  ossimDrect labelRect;
+                  latLabel->getBoundingRect(labelRect);
+                  
+                  if(rect.intersects(labelRect))
+                  {
+                     ossimIrect intersection = rect.clipToRect(labelRect);
+                     center.x -= ossim::round<int>(rect.ur().x - intersection.ul().x);
+                  }
+
+                  center.x += 24; // this will need to be the tick height later;
+                  latLabel->setCenterPosition(center);
+                  latLabel->computeBoundingRect();
+                  
+
+                  addFixedAnnotation(latLabel);
+               }
+               
+               if(theRightGeographicTickFlag)
+               {
+                  ossimAnnotationLineObject* lineLabel = new ossimAnnotationLineObject(ossimIpt(ossim::round<int>(rect.lr().x),
+                                                                                                rounded.y),
+                                                                                       ossimIpt(ossim::round<int>(rect.lr().x+23),
+                                                                                                rounded.y));
+                  
+                  lineLabel->setColor(theRightGeographicLabelColor.getR(), theRightGeographicLabelColor.getG(), theRightGeographicLabelColor.getB());
+                  addFixedAnnotation(lineLabel);
+               }
+            }
+         }
+      }
+   }
+}
+
+void ossimMapCompositionSource::addGeographicGridLines()
+{
+   const ossimMapProjection* mapProj = inputMapProjection();
+   if(mapProj)
+   { 
+      ossimGpt gpt[4];
+      ossimDrect rect = getViewingRect();
+
+      if(rect.hasNans()) return;
+      mapProj->lineSampleToWorld(rect.ul(), gpt[0]);
+      mapProj->lineSampleToWorld(rect.ur(), gpt[1]);
+      mapProj->lineSampleToWorld(rect.lr(), gpt[2]);
+      mapProj->lineSampleToWorld(rect.ll(), gpt[3]);
+      
+      ossimDrect grect(gpt[0],
+                       gpt[1],
+                       gpt[2],
+                       gpt[3],
+                       OSSIM_RIGHT_HANDED);
+
+      if(grect.hasNans()) return;
+      ossimDpt ulLatLon(((int)((grect.ul().x-theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
+                        ((int)((grect.ul().y+theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
+      
+      ossimDpt lrLatLon(((int)((grect.lr().x+theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
+                        ((int)((grect.lr().y-theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
+
+      while(ulLatLon.lat > 90)
+      {
+         ulLatLon.lat -= theGeographicSpacing.lat;
+      }
+      while(ulLatLon.lon < -180)
+      {
+         ulLatLon.lon += theGeographicSpacing.lon;
+      }
+      while(lrLatLon.lat < -90)
+      {
+         ulLatLon.lat += theGeographicSpacing.lat;
+      }
+      while(lrLatLon.lon > 180)
+      {
+         ulLatLon.lon -= theGeographicSpacing.lon;
+      }
+      
+      ossimDrect latLonSpacing(ulLatLon,
+                               lrLatLon,
+                               OSSIM_RIGHT_HANDED);
+
+
+      for(double lon = latLonSpacing.ul().x; lon <= latLonSpacing.lr().x; lon+=theGeographicSpacing.x)
+      {
+         ossimDpt tipt; // top
+         ossimDpt bipt; // bottom
+         
+         ossimGpt tgpt(latLonSpacing.ul().y,
+                       lon,
+                       0.0,
+                       gpt[0].datum());
+
+         ossimGpt bgpt(latLonSpacing.lr().y,
+                       lon,
+                       0.0,
+                       gpt[0].datum());
+         
+         mapProj->worldToLineSample(tgpt, tipt);
+         mapProj->worldToLineSample(bgpt, bipt);
+
+         if(rect.clip(tipt, bipt))
+         {
+            ossimAnnotationLineObject* line = new ossimAnnotationLineObject(tipt, bipt);
+            line->setColor(theGeographicGridColor.getR(),
+                           theGeographicGridColor.getG(),
+                           theGeographicGridColor.getB());
+            addFixedAnnotation(line);
+         }
+      }
+      // do the left side labels
+      for(double lat = latLonSpacing.ul().y; lat >= latLonSpacing.lr().y; lat-=theGeographicSpacing.y)
+      {
+         ossimDpt lipt;
+         ossimDpt ript;
+         ossimGpt lgpt(lat,
+                       latLonSpacing.ul().x,
+                       0.0,
+                       gpt[0].datum());
+         ossimGpt rgpt(lat,
+                       latLonSpacing.ur().x,
+                       0.0,
+                       gpt[0].datum());
+
+         mapProj->worldToLineSample(lgpt, lipt);
+         mapProj->worldToLineSample(rgpt, ript);
+         
+         if(rect.clip(lipt, ript))
+         {
+            ossimAnnotationLineObject* line = new ossimAnnotationLineObject(lipt,
+                                                                            ript);
+         
+            line->setColor(theGeographicGridColor.getR(),
+                                theGeographicGridColor.getG(),
+                                theGeographicGridColor.getB());
+         
+            addFixedAnnotation(line);
+         }
+      }
+   }   
+}
+
+void ossimMapCompositionSource::addGeographicGridReseaux()
+{
+   const ossimMapProjection* mapProj = inputMapProjection();
+   if(mapProj)
+   { 
+      ossimGpt gptArray[4];
+      ossimDrect rect = getViewingRect();
+      
+      mapProj->lineSampleToWorld(rect.ul(), gptArray[0]);
+      mapProj->lineSampleToWorld(rect.ur(), gptArray[1]);
+      mapProj->lineSampleToWorld(rect.lr(), gptArray[2]);
+      mapProj->lineSampleToWorld(rect.ll(), gptArray[3]);
+      
+      ossimDrect grect(gptArray[0],
+                       gptArray[1],
+                       gptArray[2],
+                       gptArray[3],
+                       OSSIM_RIGHT_HANDED);
+
+      ossimDpt ulLatLon(((int)((grect.ul().x-theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
+                        ((int)((grect.ul().y+theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
+      
+      ossimDpt lrLatLon(((int)((grect.lr().x+theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
+                        ((int)((grect.lr().y-theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
+      
+      ossimDrect latLonSpacing(ulLatLon,
+                               lrLatLon,
+                               OSSIM_RIGHT_HANDED);
+
+      ossimDpt ipt; // top
+      for(double lat = latLonSpacing.ul().y; lat >= latLonSpacing.lr().y; lat-=theGeographicSpacing.y)
+      {
+         for(double lon = latLonSpacing.ul().x; lon <= latLonSpacing.lr().x; lon+=theGeographicSpacing.x)
+         {
+            
+            ossimGpt gpt(lat,
+                         lon,
+                         0.0,
+                         gptArray[0].datum());
+            
+            mapProj->worldToLineSample(gpt, ipt);
+
+            ossimIpt rounded(ipt);
+            if(rect.pointWithin(ossimDpt(rounded)))
+            {
+               ossimIpt horizontalStart(rounded.x-10, rounded.y);
+               ossimIpt horizontalEnd(rounded.x+10, rounded.y);
+
+               ossimIpt verticalStart(rounded.x, rounded.y-10);
+               ossimIpt verticalEnd(rounded.x, rounded.y+10);
+               
+               ossimAnnotationLineObject* line1 = new ossimAnnotationLineObject(horizontalStart, horizontalEnd);
+               ossimAnnotationLineObject* line2 = new ossimAnnotationLineObject(verticalStart,verticalEnd);
+
+               line1->setColor(theGeographicGridColor.getR(),
+                               theGeographicGridColor.getG(),
+                               theGeographicGridColor.getB());
+               line2->setColor(theGeographicGridColor.getR(),
+                               theGeographicGridColor.getG(),
+                               theGeographicGridColor.getB());
+               addFixedAnnotation(line1);
+               addFixedAnnotation(line2);
+            }  
+         }
+      }
+   }   
+}
+
+void ossimMapCompositionSource::addMeterGridLines()
+{
+   const ossimMapProjection* mapProj = inputMapProjection();
+   if(mapProj)
+   { 
+      ossimDpt dptArray[4];
+      ossimDrect rect = getViewingRect();
+      
+      mapProj->lineSampleToEastingNorthing(rect.ul(), dptArray[0]);
+      mapProj->lineSampleToEastingNorthing(rect.ur(), dptArray[1]);
+      mapProj->lineSampleToEastingNorthing(rect.lr(), dptArray[2]);
+      mapProj->lineSampleToEastingNorthing(rect.ll(), dptArray[3]);
+      
+      ossimDrect drect(dptArray[0], dptArray[1], dptArray[2], dptArray[3], OSSIM_RIGHT_HANDED);
+      
+      ossimDpt ulMeter(((int)((drect.ul().x-theMeterSpacing.x)/theMeterSpacing.x))*theMeterSpacing.x,
+                       ((int)((drect.ul().y+theMeterSpacing.y)/theMeterSpacing.y))*theMeterSpacing.y);
+      
+      ossimDpt lrMeter(((int)((drect.lr().x+theMeterSpacing.x)/theMeterSpacing.x))*theMeterSpacing.x,
+                        ((int)((drect.lr().y-theMeterSpacing.y)/theMeterSpacing.y))*theMeterSpacing.y);
+      
+      ossimDrect meterSpacing(ulMeter,
+                              lrMeter,
+                              OSSIM_RIGHT_HANDED);
+
+      for(double horizontal = meterSpacing.ul().x;
+          horizontal <= meterSpacing.lr().x;
+          horizontal+=theMeterSpacing.x)
+      {
+         ossimDpt tipt; // top
+         ossimDpt bipt; // bottom
+
+         ossimDpt tdpt(horizontal, meterSpacing.ul().y);
+
+         ossimDpt bdpt(horizontal, meterSpacing.lr().y);
+         
+         mapProj->eastingNorthingToLineSample(tdpt, tipt);
+         mapProj->eastingNorthingToLineSample(bdpt, bipt);
+         
+         if(rect.clip(tipt, bipt))
+         {
+            ossimAnnotationLineObject* line = new ossimAnnotationLineObject(tipt, bipt);
+            line->setColor(theMeterGridColor.getR(),
+                           theMeterGridColor.getG(),
+                           theMeterGridColor.getB());
+            addFixedAnnotation(line);
+         }
+      }
+      // do the left side labels
+      for(double vertical = meterSpacing.ul().y;
+          vertical >= meterSpacing.lr().y;
+          vertical-=theMeterSpacing.y)
+      {
+         ossimDpt lipt;
+         ossimDpt ript;
+         ossimDpt ldpt(meterSpacing.ul().x, vertical);
+         ossimDpt rdpt(meterSpacing.ur().x, vertical);
+
+         mapProj->eastingNorthingToLineSample(ldpt,  lipt);
+         mapProj->eastingNorthingToLineSample(rdpt,  ript);
+         
+         if(rect.clip(lipt, ript))
+         {
+            ossimAnnotationLineObject* line = new ossimAnnotationLineObject(lipt, ript);
+         
+            line->setColor(theMeterGridColor.getR(),
+                           theMeterGridColor.getG(),
+                           theMeterGridColor.getB());
+            
+            addFixedAnnotation(line);
+         }
+      }
+   }
+}
+
+void ossimMapCompositionSource::addMeterGridLabels()
+{
+   const ossimMapProjection* mapProj = inputMapProjection();
+   if(mapProj)
+   {
+      ossimDpt dptArray[4];
+      ossimDrect rect = getViewingRect();
+      
+      mapProj->lineSampleToEastingNorthing(rect.ul(), dptArray[0]);
+      mapProj->lineSampleToEastingNorthing(rect.ur(), dptArray[1]);
+      mapProj->lineSampleToEastingNorthing(rect.lr(), dptArray[2]);
+      mapProj->lineSampleToEastingNorthing(rect.ll(), dptArray[3]);
+      
+      ossimDrect drect(dptArray[0],
+                       dptArray[1],
+                       dptArray[2],
+                       dptArray[3],
+                       OSSIM_RIGHT_HANDED);
+      
+      ossimDpt ulMeter(((int)((drect.ul().x-theMeterSpacing.x)/theMeterSpacing.x))*theMeterSpacing.x,
+                       ((int)((drect.ul().y+theMeterSpacing.y)/theMeterSpacing.y))*theMeterSpacing.y);
+      
+      ossimDpt lrMeter(((int)((drect.lr().x+theMeterSpacing.x)/theMeterSpacing.x))*theMeterSpacing.x,
+                        ((int)((drect.lr().y-theMeterSpacing.y)/theMeterSpacing.y))*theMeterSpacing.y);
+      
+      ossimDrect meterSpacing(ulMeter,
+                              lrMeter,
+                              OSSIM_RIGHT_HANDED);
+      
+      ossimDrect labelRect;
+
+      // Since we support overlapping grid lables.  We will shift
+      // the meter label if there exists a gegraphic label.  To
+      // do this we need to compute an extra shift length based
+      // on the font type on each of the sides.  We could actually make this
+      // shift adjustable later????
+      //
+      long extraTopDelta     = 0;
+      long extraBottomDelta  = 0;
+      long extraLeftDelta    = 0;
+      long extraRightDelta   = 0;
+         
+      if(theTopGeographicLabelFlag&&theGeographicTopLabelFont.valid())
+      {  
+         ossimDms dms(180, false);
+         ossimString dmsString = dms.toString(theTopGeographicFormat.c_str());
+         
+         theGeographicTopLabelFont->setString(dmsString);
+         ossimIrect box;
+         
+         theGeographicTopLabelFont->getBoundingBox(box);
+         extraTopDelta = box.height();
+      }
+      if(theBottomGeographicLabelFlag&&theGeographicBottomLabelFont.valid())
+      {  
+         ossimDms dms(180, false);
+         ossimString dmsString = dms.toString(theBottomGeographicFormat.c_str());
+         theGeographicBottomLabelFont->setString(dmsString);
+         ossimIrect box;
+         
+         theGeographicBottomLabelFont->getBoundingBox(box);
+         extraBottomDelta = box.height();
+      }
+      if(theLeftGeographicLabelFlag&&theGeographicLeftLabelFont.valid())
+      {  
+         ossimDms dms(90.0, true);
+         ossimString dmsString = dms.toString(theLeftGeographicFormat.c_str());
+         theGeographicLeftLabelFont->setString(dmsString);
+         ossimIrect box;
+         
+         theGeographicLeftLabelFont->getBoundingBox(box);
+         extraLeftDelta = box.width();
+      }
+      if(theRightGeographicLabelFlag&&theGeographicRightLabelFont.valid())
+      {  
+         ossimDms dms(90.0, true);
+         ossimString dmsString = dms.toString(theRightGeographicFormat.c_str());
+         
+         theGeographicRightLabelFont->setString(dmsString);
+         ossimIrect box;
+         
+         theGeographicRightLabelFont->getBoundingBox(box);
+         extraRightDelta = box.width();
+      }
+
+      if(theTopMeterLabelFlag || theBottomMeterLabelFlag)
+      {
+         for(double horizontal = meterSpacing.ul().x;
+             horizontal <= meterSpacing.lr().x;
+             horizontal+=theMeterSpacing.x)
+         {
+            ossimDpt tipt; // top
+            ossimDpt bipt; // bottom
+            
+            ossimDpt tdpt(horizontal,
+                          meterSpacing.ul().y);
+            
+            ossimDpt bdpt(horizontal,
+                          meterSpacing.lr().y);
+            
+            mapProj->eastingNorthingToLineSample(tdpt, tipt);
+            mapProj->eastingNorthingToLineSample(bdpt, bipt);
+            
+            rect.clip(tipt, bipt);
+            
+            tipt = ossimIpt(tipt);
+            bipt = ossimIpt(bipt);
+            
+            if(theTopMeterLabelFlag&&rect.clip(tipt, bipt))
+            {
+               ossimAnnotationFontObject* topLabel = new ossimAnnotationFontObject(ossimIpt(0,0),
+                                                                                   ossimString::toString(horizontal).c_str());
+               
+               
+               topLabel->setFont(theMeterTopLabelFont.get());
+               
+               topLabel->setGeometryInformation(theMeterTopLabelFontInfo);
+               topLabel->computeBoundingRect();
+               ossimDrect boundsTop;
+               topLabel->getBoundingRect(boundsTop);
+               
+               ossimIpt centerTop(ossim::round<int>(tipt.x),
+                                  ossim::round<int>(rect.ul().y-(boundsTop.height()/2)));
+               
+               topLabel->setColor(theTopMeterLabelColor.getR(),
+                                  theTopMeterLabelColor.getG(),
+                                  theTopMeterLabelColor.getB());
+               
+               
+               topLabel->setCenterPosition(centerTop);
+               topLabel->computeBoundingRect();
+               
+               topLabel->getBoundingRect(labelRect);
+               
+               if(rect.intersects(labelRect))
+               {
+                  ossimIrect intersection = rect.clipToRect(labelRect);
+                  centerTop.y -= ossim::round<int>(rect.ul().y - intersection.lr().y);
+               }
+               
+               centerTop.y -= (24+extraTopDelta); // this will need to be the tick height later;
+               topLabel->setCenterPosition(centerTop);
+               topLabel->computeBoundingRect();
+               addFixedAnnotation(topLabel);
+
+               if(theTopMeterTickFlag)
+               {
+                  ossimAnnotationLineObject* lineLabel = new ossimAnnotationLineObject(ossimIpt(ossim::round<int>(tipt.x),
+                                                                                                ossim::round<int>(tipt.y-24)),
+                                                                                       ossimIpt(ossim::round<int>(tipt.x),
+                                                                                                ossim::round<int>(tipt.y)));
+                  
+                  lineLabel->setColor(theTopMeterLabelColor.getR(), theTopMeterLabelColor.getG(), theTopMeterLabelColor.getB());
+                  addFixedAnnotation(lineLabel);
+               }
+            }
+         // ------------------------- BOTTOM ----------------------------
+            
+            if(theBottomMeterLabelFlag&&rect.pointWithin(bipt))
+            {
+               ossimAnnotationFontObject* bottomLabel = new ossimAnnotationFontObject(ossimIpt(0,0),
+                                                                                      ossimString::toString(horizontal).c_str());
+               
+               
+               bottomLabel->setFont(theMeterBottomLabelFont.get());
+               
+               bottomLabel->setGeometryInformation(theMeterBottomLabelFontInfo);
+               bottomLabel->computeBoundingRect();
+               ossimDrect boundsBottom;
+               bottomLabel->getBoundingRect(boundsBottom);
+               
+               ossimIpt centerBottom(ossim::round<int>(bipt.x),
+                                     ossim::round<int>(rect.lr().y+(boundsBottom.height()/2)));
+               
+               bottomLabel->setColor(theBottomMeterLabelColor.getR(),
+                                     theBottomMeterLabelColor.getG(),
+                                     theBottomMeterLabelColor.getB());
+               
+               
+               bottomLabel->setCenterPosition(centerBottom);
+               bottomLabel->computeBoundingRect();
+               
+               bottomLabel->getBoundingRect(labelRect);
+               
+               if(rect.intersects(labelRect))
+               {
+                  ossimIrect intersection = rect.clipToRect(labelRect);
+                  centerBottom.y += ossim::round<int>(rect.lr().y - intersection.ul().y);
+               }
+               
+               centerBottom.y += (24+extraBottomDelta); // this will need to be the tick height later;
+               bottomLabel->setCenterPosition(centerBottom);
+               bottomLabel->computeBoundingRect();
+               addFixedAnnotation(bottomLabel);
+               if(theBottomMeterTickFlag)
+               {
+                  ossimAnnotationLineObject* lineLabel = new ossimAnnotationLineObject(ossimIpt(ossim::round<int>(bipt.x),
+                                                                                                ossim::round<int>(bipt.y+24)),
+                                                                                       ossimIpt(ossim::round<int>(bipt.x),
+                                                                                                ossim::round<int>(bipt.y)));
+                  
+                  lineLabel->setColor(theBottomMeterLabelColor.getR(), theBottomMeterLabelColor.getG(), theBottomMeterLabelColor.getB());
+                  addFixedAnnotation(lineLabel);
+               }
+            }            
+         }
+      }
+      if(theLeftMeterLabelFlag || theRightMeterLabelFlag)
+      {
+         for(double vertical = meterSpacing.ul().y;
+             vertical >= meterSpacing.lr().y;
+             vertical-=theMeterSpacing.y)
+         {
+            ossimDpt lipt;
+            ossimDpt ript;
+            ossimDpt ldpt(meterSpacing.ul().x,
+                          vertical);
+            ossimDpt rdpt(meterSpacing.ur().x,
+                          vertical);
+            
+            mapProj->eastingNorthingToLineSample(ldpt, lipt);
+            mapProj->eastingNorthingToLineSample(rdpt, ript);
+            
+            if(rect.clip(lipt, ript))
+            {
+               //------------------------------------------------ Left label ----------------------------------------------
+               ossimAnnotationFontObject* leftLabel = new ossimAnnotationFontObject(ossimIpt(0,0),
+                                                                                    ossimString::toString(vertical).c_str());
+               
+               
+               leftLabel->setFont(theMeterLeftLabelFont.get());
+               
+               leftLabel->setGeometryInformation(theMeterLeftLabelFontInfo);
+               leftLabel->computeBoundingRect();
+               ossimDrect boundsLeft;
+               leftLabel->getBoundingRect(boundsLeft);
+               
+               ossimIpt centerLeft(ossim::round<int>(rect.ul().x-(boundsLeft.width()/2)),
+                                   ossim::round<int>(lipt.y));
+                                  
+               
+               leftLabel->setColor(theLeftMeterLabelColor.getR(),
+                                   theLeftMeterLabelColor.getG(),
+                                   theLeftMeterLabelColor.getB());
+               
+               
+               leftLabel->setCenterPosition(centerLeft);
+               leftLabel->computeBoundingRect();
+               
+               leftLabel->getBoundingRect(labelRect);
+               
+               if(rect.intersects(labelRect))
+               {
+                  ossimIrect intersection = rect.clipToRect(labelRect);
+                  centerLeft.x -= ossim::round<int>(intersection.lr().x - rect.ul().x);
+               }
+               
+               centerLeft.x -= (24+extraLeftDelta); // this will need to be the tick height later;
+               leftLabel->setCenterPosition(centerLeft);
+               leftLabel->computeBoundingRect();
+               addFixedAnnotation(leftLabel);
+               if(theLeftMeterTickFlag)
+               {
+                  ossimAnnotationLineObject* lineLabel = new ossimAnnotationLineObject(ossimIpt(ossim::round<int>(lipt.x-24),
+                                                                                                ossim::round<int>(lipt.y)),
+                                                                                       ossimIpt(ossim::round<int>(lipt.x),
+                                                                                                ossim::round<int>(lipt.y)));
+                  
+                  lineLabel->setColor(theLeftMeterLabelColor.getR(), theLeftMeterLabelColor.getG(), theLeftMeterLabelColor.getB());
+                  addFixedAnnotation(lineLabel);
+               }
+
+               
+               //--------------------------------RIGHT-----------------------------------------------------------
+               ossimAnnotationFontObject* rightLabel = new ossimAnnotationFontObject(ossimIpt(0,0),
+                                                                                     ossimString::toString(vertical).c_str());
+               
+               
+               rightLabel->setFont(theMeterRightLabelFont.get());
+               
+               rightLabel->setGeometryInformation(theMeterRightLabelFontInfo);
+               rightLabel->computeBoundingRect();
+               ossimDrect boundsRight;
+               rightLabel->getBoundingRect(boundsRight);
+               
+               ossimIpt centerRight(ossim::round<int>(rect.ur().x+(boundsRight.width()/2)),
+                                    ossim::round<int>(ript.y));
+                                  
+               
+               rightLabel->setColor(theRightMeterLabelColor.getR(),
+                                    theRightMeterLabelColor.getG(),
+                                    theRightMeterLabelColor.getB());
+               
+               
+               rightLabel->setCenterPosition(centerRight);
+               rightLabel->computeBoundingRect();
+               
+               rightLabel->getBoundingRect(labelRect);
+               
+               if(rect.intersects(labelRect))
+               {
+                  ossimIrect intersection = rect.clipToRect(labelRect);
+                  centerRight.x += ossim::round<int>(intersection.ul().x - rect.ur().x);
+               }
+               
+               centerRight.x += (24+extraRightDelta); // this will need to be the tick height later;
+               rightLabel->setCenterPosition(centerRight);
+               rightLabel->computeBoundingRect();
+               addFixedAnnotation(rightLabel);
+               if(theRightMeterTickFlag)
+               {
+                  ossimAnnotationLineObject* lineLabel = new ossimAnnotationLineObject(ossimIpt(ossim::round<int>(ript.x+24),
+                                                                                                ossim::round<int>(ript.y)),
+                                                                                       ossimIpt(ossim::round<int>(ript.x),
+                                                                                                ossim::round<int>(ript.y)));
+                  
+                  lineLabel->setColor(theRightMeterLabelColor.getR(), theRightMeterLabelColor.getG(), theRightMeterLabelColor.getB());
+                  addFixedAnnotation(lineLabel);
+               }
+            }
+         }
+      }
+   }
+}
+
+
+void ossimMapCompositionSource::addMeterGridReseaux()
+{
+   const ossimMapProjection* mapProj = inputMapProjection();
+   if(mapProj)
+   { 
+      ossimDpt dpt[4];
+      ossimDrect rect = getViewingRect();
+      
+      mapProj->lineSampleToEastingNorthing(rect.ul(), dpt[0]);
+      mapProj->lineSampleToEastingNorthing(rect.ur(), dpt[1]);
+      mapProj->lineSampleToEastingNorthing(rect.lr(), dpt[2]);
+      mapProj->lineSampleToEastingNorthing(rect.ll(), dpt[3]);
+      
+      ossimDrect drect(dpt[0],
+                       dpt[1],
+                       dpt[2],
+                       dpt[3],
+                       OSSIM_RIGHT_HANDED);
+
+      ossimDpt ulMeter(((int)((drect.ul().x-theMeterSpacing.x)/theMeterSpacing.x))*theMeterSpacing.x,
+                       ((int)((drect.ul().y+theMeterSpacing.y)/theMeterSpacing.y))*theMeterSpacing.y);
+      
+      ossimDpt lrMeter(((int)((drect.lr().x+theMeterSpacing.x)/theMeterSpacing.x))*theMeterSpacing.x,
+                        ((int)((drect.lr().y-theMeterSpacing.y)/theMeterSpacing.y))*theMeterSpacing.y);
+
+      ossimDrect meterSpacing(ulMeter,
+                              lrMeter,
+                              OSSIM_RIGHT_HANDED);
+
+      ossimDpt ipt; // top
+
+      for(double vertical = meterSpacing.ul().y; vertical >= meterSpacing.lr().y; vertical-=theMeterSpacing.y)
+      {
+         for(double horizontal = meterSpacing.ul().x;  horizontal <= meterSpacing.lr().x; horizontal+=theMeterSpacing.x)
+         {            
+            ossimDpt dpt(horizontal,
+                         vertical);
+            
+            mapProj->eastingNorthingToLineSample(dpt, ipt);
+
+            ossimIpt rounded(ipt);
+            if(rect.pointWithin(ossimDpt(rounded)))
+            {
+               ossimIpt horizontalStart(rounded.x-10, rounded.y);
+               ossimIpt horizontalEnd(rounded.x+10, rounded.y);
+
+               ossimIpt verticalStart(rounded.x, rounded.y-10);
+               ossimIpt verticalEnd(rounded.x, rounded.y+10);
+               
+               ossimAnnotationLineObject* line1 = new ossimAnnotationLineObject(horizontalStart, horizontalEnd);
+               ossimAnnotationLineObject* line2 = new ossimAnnotationLineObject(verticalStart,verticalEnd);
+
+               line1->setColor(theMeterGridColor.getR(),
+                               theMeterGridColor.getG(),
+                               theMeterGridColor.getB());
+
+               line2->setColor(theMeterGridColor.getR(),
+                               theMeterGridColor.getG(),
+                               theMeterGridColor.getB());
+               addFixedAnnotation(line1);
+               addFixedAnnotation(line2);
+            }  
+         }
+      }
+   }   
+}
+
+void ossimMapCompositionSource::addTitle()
+{
+   ossimAnnotationFontObject* title = new ossimAnnotationFontObject(ossimIpt(0,0),
+                                                                    theTitleString);
+   title->setGeometryInformation(theTitleFontInfo);
+   title->setFont(theTitleFont.get());
+   title->setColor(theTitleColor.getR(),
+                   theTitleColor.getG(),
+                   theTitleColor.getB());
+   title->setCenterPosition(theTopBorder.midPoint());
+   title->computeBoundingRect();
+
+   addFixedAnnotation(title);
+}
+
+ossimIrect ossimMapCompositionSource::getViewingRect()const
+{
+   ossimIrect result;
+   result.makeNan();
+
+   if(theInputConnection)
+   {
+      result = theInputConnection->getBoundingRect();
+
+      if(!result.hasNans())
+      {
+         ossimIpt mid = result.midPoint();
+         ossim_int32 w = result.width();
+         ossim_int32 h = result.width();
+
+         if(theViewWidthHeight.x >-1)
+         {
+            w = theViewWidthHeight.x;
+         }
+         if(theViewWidthHeight.y >-1)
+         {
+            h = theViewWidthHeight.y;
+         }
+         ossimIpt ul(mid.x - w/2,
+                     mid.y - h/2);
+         
+         result = ossimIrect(ul.x,
+                             ul.y,
+                             ul.x + w-1,
+                             ul.y + h -1);
+      }
+   }
+
+   return result;
+}
+
+void ossimMapCompositionSource::drawAnnotations(
+   ossimRefPtr<ossimImageData> tile)
+{
+   if (!theImage)
+   {
+      return;
+   }
+      
+   theImage->setCurrentImageData(theTile);
+   
+   if(theImage->getImageData().valid())
+   {
+      ossimAnnotationSource::AnnotationObjectListType::iterator object = theFixedAnnotationList.begin();
+      while(object != theFixedAnnotationList.end())
+      {
+         if((*object).valid())
+         {
+            (*object)->draw(*theImage);
+         }
+         ++object;
+      }      
+   }
+   
+   ossimAnnotationSource::drawAnnotations(tile);
+}
+
+void ossimMapCompositionSource::deleteFixedAnnotations()
+{
+   theFixedAnnotationList.clear();
+}
+
+
+void ossimMapCompositionSource::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property.valid()) return;
+   
+   ossimRefPtr<ossimProperty>        tempProp     = 0;
+   ossimFontProperty*    fontProp     = 0;
+   ossimColorProperty*   colorProp    = 0;
+   ossimBooleanProperty* booleanProp  = 0;
+   
+   if(property->getName() == "Geographic label properties")
+   {
+      ossimContainerProperty* containerProp = PTR_CAST(ossimContainerProperty,
+                                                       property.get());
+      if(containerProp)
+      {
+         // first set the font format
+         //
+         tempProp = containerProp->getProperty("Top font");
+         fontProp = PTR_CAST(ossimFontProperty, tempProp.get());
+         if(fontProp)
+         {
+            setGeographicTopLabelFont(fontProp->getFontInformation());
+         }
+         tempProp = containerProp->getProperty("Bottom font");
+         fontProp = PTR_CAST(ossimFontProperty, tempProp.get());
+         if(fontProp)
+         {
+            setGeographicBottomLabelFont(fontProp->getFontInformation());
+         }
+         tempProp = containerProp->getProperty("Left font");
+         fontProp = PTR_CAST(ossimFontProperty, tempProp.get());
+         if(fontProp)
+         {
+            setGeographicLeftLabelFont(fontProp->getFontInformation());
+         }
+         tempProp = containerProp->getProperty("Right font");
+         fontProp = PTR_CAST(ossimFontProperty, tempProp.get());
+         if(fontProp)
+         {
+            setGeographicRightLabelFont(fontProp->getFontInformation());
+         }
+
+         // set color property
+         tempProp = containerProp->getProperty("Top color");
+         colorProp = PTR_CAST(ossimColorProperty, tempProp.get());
+         if(colorProp)
+         {
+            setTopGeographicLabelColor(colorProp->getColor());
+         }
+         tempProp = containerProp->getProperty("Bottom color");
+         colorProp = PTR_CAST(ossimColorProperty, tempProp.get());
+         if(colorProp)
+         {
+            setBottomGeographicLabelColor(colorProp->getColor());
+         }
+         tempProp = containerProp->getProperty("Left color");
+         colorProp = PTR_CAST(ossimColorProperty, tempProp.get());
+         if(colorProp)
+         {
+            setLeftGeographicLabelColor(colorProp->getColor());
+         }
+         tempProp = containerProp->getProperty("Right color");
+         colorProp = PTR_CAST(ossimColorProperty, tempProp.get());
+         if(colorProp)
+         {
+            setRightGeographicLabelColor(colorProp->getColor());
+         }
+
+         // set enable flags
+         tempProp = containerProp->getProperty("Top enabled");
+         booleanProp = PTR_CAST(ossimBooleanProperty,
+                                tempProp.get());
+         if(booleanProp)
+         {
+            setTopGeographicLabelFlag(booleanProp->getBoolean());
+         }
+
+         tempProp = containerProp->getProperty("Bottom enabled");
+         booleanProp = PTR_CAST(ossimBooleanProperty,
+                                tempProp.get());
+         if(booleanProp)
+         {
+            setBottomGeographicLabelFlag(booleanProp->getBoolean());
+         }
+
+         tempProp = containerProp->getProperty("Left enabled");
+         booleanProp = PTR_CAST(ossimBooleanProperty,
+                                tempProp.get());
+         if(booleanProp)
+         {
+            setLeftGeographicLabelFlag(booleanProp->getBoolean());
+         }
+
+         tempProp = containerProp->getProperty("Right enabled");
+         booleanProp = PTR_CAST(ossimBooleanProperty,
+                                tempProp.get());
+         if(booleanProp)
+         {
+            setRightGeographicLabelFlag(booleanProp->getBoolean());
+         }
+         
+         tempProp = containerProp->getProperty("Top tick enabled");
+         booleanProp = PTR_CAST(ossimBooleanProperty,
+                                tempProp.get());
+         if(booleanProp)
+         {
+            setTopGeographicTickMarkFlag(booleanProp->getBoolean());
+         }
+         tempProp = containerProp->getProperty("Bottom tick enabled");
+         booleanProp = PTR_CAST(ossimBooleanProperty,
+                                tempProp.get());
+         if(booleanProp)
+         {
+            setBottomGeographicTickMarkFlag(booleanProp->getBoolean());
+         }
+         tempProp = containerProp->getProperty("Left tick enabled");
+         booleanProp = PTR_CAST(ossimBooleanProperty,
+                                tempProp.get());
+         if(booleanProp)
+         {
+            setLeftGeographicTickMarkFlag(booleanProp->getBoolean());
+         }
+         tempProp = containerProp->getProperty("Right tick enabled");
+         booleanProp = PTR_CAST(ossimBooleanProperty,
+                                tempProp.get());
+         if(booleanProp)
+         {
+            setRightGeographicTickMarkFlag(booleanProp->getBoolean());
+         }
+      }
+   }
+   else if(property->getName() == "Geographic grid properties")
+   {
+      ossimContainerProperty* containerProp = PTR_CAST(ossimContainerProperty,
+                                                       property.get());
+      if(containerProp)
+      {
+         tempProp = containerProp->getProperty("Grid type");
+         if(tempProp.valid())
+         {
+            ossimString value = tempProp->valueToString();
+
+            if(value == "none")
+            {
+               setGeographicGridType(OSSIM_GRID_NONE);
+            }
+            else if(value == "line")
+            {
+               setGeographicGridType(OSSIM_GRID_LINE);
+            }
+            else if(value == "reseaux")
+            {
+               setGeographicGridType(OSSIM_GRID_RESEAUX);
+            }
+         }
+         tempProp = containerProp->getProperty("Horizontal spacing");
+         if(tempProp.valid())
+         {
+            setGeographicSpacingLon(tempProp->valueToString().toDouble());
+         }
+
+         tempProp = containerProp->getProperty("Vertical spacing");
+         if(tempProp.valid())
+         {
+            setGeographicSpacingLat(tempProp->valueToString().toDouble());
+         }
+
+         tempProp = containerProp->getProperty("Color");
+         colorProp = PTR_CAST(ossimColorProperty, tempProp.get());
+         if(tempProp.valid())
+         {
+            setGeographicGridColor(colorProp->getColor());
+         }
+      }
+   }
+   else if(property->getName() == "Meter label properties")
+   {
+      ossimContainerProperty* containerProp = PTR_CAST(ossimContainerProperty,
+                                                       property.get());
+      if(containerProp)
+      {
+         // first set the font format
+         //
+         tempProp = containerProp->getProperty("Top font");
+         fontProp = PTR_CAST(ossimFontProperty, tempProp.get());
+         if(fontProp)
+         {
+            setMeterTopLabelFont(fontProp->getFontInformation());
+         }
+         tempProp = containerProp->getProperty("Bottom font");
+         fontProp = PTR_CAST(ossimFontProperty, tempProp.get());
+         if(fontProp)
+         {
+            setMeterBottomLabelFont(fontProp->getFontInformation());
+         }
+         tempProp = containerProp->getProperty("Left font");
+         fontProp = PTR_CAST(ossimFontProperty, tempProp.get());
+         if(fontProp)
+         {
+            setMeterLeftLabelFont(fontProp->getFontInformation());
+         }
+         tempProp = containerProp->getProperty("Right font");
+         fontProp = PTR_CAST(ossimFontProperty, tempProp.get());
+         if(fontProp)
+         {
+            setMeterRightLabelFont(fontProp->getFontInformation());
+         }
+
+         // set color property
+         tempProp = containerProp->getProperty("Top color");
+         colorProp = PTR_CAST(ossimColorProperty, tempProp.get());
+         if(colorProp)
+         {
+            setTopMeterLabelColor(colorProp->getColor());
+         }
+         tempProp = containerProp->getProperty("Bottom color");
+         colorProp = PTR_CAST(ossimColorProperty, tempProp.get());
+         if(colorProp)
+         {
+            setBottomMeterLabelColor(colorProp->getColor());
+         }
+         tempProp = containerProp->getProperty("Left color");
+         colorProp = PTR_CAST(ossimColorProperty, tempProp.get());
+         if(colorProp)
+         {
+            setLeftMeterLabelColor(colorProp->getColor());
+         }
+         tempProp = containerProp->getProperty("Right color");
+         colorProp = PTR_CAST(ossimColorProperty, tempProp.get());
+         if(colorProp)
+         {
+            setRightMeterLabelColor(colorProp->getColor());
+         }
+
+         // set enable flags
+         tempProp = containerProp->getProperty("Top enabled");
+         booleanProp = PTR_CAST(ossimBooleanProperty,
+                                tempProp.get());
+         if(booleanProp)
+         {
+            setTopMeterLabelFlag(booleanProp->getBoolean());
+         }
+
+         tempProp = containerProp->getProperty("Bottom enabled");
+         booleanProp = PTR_CAST(ossimBooleanProperty,
+                                tempProp.get());
+         if(booleanProp)
+         {
+            setBottomMeterLabelFlag(booleanProp->getBoolean());
+         }
+
+         tempProp = containerProp->getProperty("Left enabled");
+         booleanProp = PTR_CAST(ossimBooleanProperty,
+                                tempProp.get());
+         if(booleanProp)
+         {
+            setLeftMeterLabelFlag(booleanProp->getBoolean());
+         }
+
+         tempProp = containerProp->getProperty("Right enabled");
+         booleanProp = PTR_CAST(ossimBooleanProperty,
+                                tempProp.get());
+         if(booleanProp)
+         {
+            setRightMeterLabelFlag(booleanProp->getBoolean());
+         }
+         
+         tempProp = containerProp->getProperty("Top tick enabled");
+         booleanProp = PTR_CAST(ossimBooleanProperty,
+                                tempProp.get());
+         if(booleanProp)
+         {
+            setTopMeterTickMarkFlag(booleanProp->getBoolean());
+         }
+         tempProp = containerProp->getProperty("Bottom tick enabled");
+         booleanProp = PTR_CAST(ossimBooleanProperty,
+                                tempProp.get());
+         if(booleanProp)
+         {
+            setBottomMeterTickMarkFlag(booleanProp->getBoolean());
+         }
+         tempProp = containerProp->getProperty("Left tick enabled");
+         booleanProp = PTR_CAST(ossimBooleanProperty,
+                                tempProp.get());
+         if(booleanProp)
+         {
+            setLeftMeterTickMarkFlag(booleanProp->getBoolean());
+         }
+         tempProp = containerProp->getProperty("Right tick enabled");
+         booleanProp = PTR_CAST(ossimBooleanProperty,
+                                tempProp.get());
+         if(booleanProp)
+         {
+            setRightMeterTickMarkFlag(booleanProp->getBoolean());
+         }
+      }
+   }
+   else if(property->getName() == "Meter grid properties")
+   {
+      ossimContainerProperty* containerProp = PTR_CAST(ossimContainerProperty,
+                                                       property.get());
+      if(containerProp)
+      {
+         tempProp = containerProp->getProperty("Grid type");
+         if(tempProp.valid())
+         {
+            ossimString value = tempProp->valueToString();
+
+            if(value == "none")
+            {
+               setMeterGridType(OSSIM_GRID_NONE);
+            }
+            else if(value == "line")
+            {
+               setMeterGridType(OSSIM_GRID_LINE);
+            }
+            else if(value == "reseaux")
+            {
+               setMeterGridType(OSSIM_GRID_RESEAUX);
+            }
+         }
+         tempProp = containerProp->getProperty("Horizontal spacing");
+         if(tempProp.valid())
+         {
+            setMeterSpacingX(tempProp->valueToString().toDouble());
+         }
+
+         tempProp = containerProp->getProperty("Vertical spacing");
+         if(tempProp.valid())
+         {
+            setMeterSpacingY(tempProp->valueToString().toDouble());
+         }
+
+         tempProp = containerProp->getProperty("Color");
+         colorProp = PTR_CAST(ossimColorProperty, tempProp.get());
+         if(tempProp.valid())
+         {
+            setMeterGridColor(colorProp->getColor());
+         }
+      }
+   }
+   else if(property->getName() == "Title properties")
+   {
+      ossimContainerProperty* container = PTR_CAST(ossimContainerProperty,
+                                                   property.get());
+      if(container)
+      {
+         ossimProperty* titleProp = container->getProperty("Title").get();
+         if(titleProp)
+         {
+            setTitle(titleProp->valueToString());
+         }
+         ossimFontProperty* fontProp = PTR_CAST(ossimFontProperty,
+                                                container->getProperty("Font").get());
+         ossimColorProperty* colorProp = PTR_CAST(ossimColorProperty,
+                                                  container->getProperty("Color").get());
+
+         if(fontProp)
+         {
+            setTitleFont(fontProp->getFontInformation());
+         }
+         if(colorProp)
+         {
+            setTitleColor(colorProp->getColor());
+         }
+      }
+   }
+   else if(property->getName() == "Viewport properties")
+   {
+      ossimContainerProperty* container = PTR_CAST(ossimContainerProperty,
+                                                   property.get());
+      if(container)
+      {
+         int w = -1;
+         int h = -1;
+         tempProp = container->getProperty("Width");
+         if(tempProp.valid())
+         {
+            w = tempProp->valueToString().toInt32();
+         }
+         tempProp = container->getProperty("Height");
+         if(tempProp.valid())
+         {
+            h = tempProp->valueToString().toInt32();
+         }
+         setViewWidthHeight(ossimIpt(w, h));
+      }
+   }
+   else if(property->getName() == "Border color")
+   {
+      colorProp = PTR_CAST(ossimColorProperty,
+                           property.get());
+      if(colorProp)
+      {
+         setBorderColor(colorProp->getColor());
+      }
+   }
+   else if(property->getName() == "Border size")
+   {
+      ossimContainerProperty* container = PTR_CAST(ossimContainerProperty,
+                                                   property.get());
+      if(container)
+      {
+         tempProp = container->getProperty("Top");
+         if(tempProp.valid())
+         {
+            setTopBorderLength(tempProp->valueToString().toInt32());
+            
+         }
+         tempProp = container->getProperty("Bottom");
+         if(tempProp.valid())
+         {
+            setBottomBorderLength(tempProp->valueToString().toInt32());
+            
+         }
+         tempProp = container->getProperty("Left");
+         if(tempProp.valid())
+         {
+            setLeftBorderLength(tempProp->valueToString().toInt32());
+            
+         }
+         tempProp = container->getProperty("Right");
+         if(tempProp.valid())
+         {
+            setRightBorderLength(tempProp->valueToString().toInt32());
+         }
+      }
+   }
+   else
+   {
+      ossimAnnotationSource::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimMapCompositionSource::getProperty(const ossimString& name)const
+{
+   if(name == "Viewport properties")
+   {
+      ossimContainerProperty* container = new ossimContainerProperty(name);
+
+      container->addChild(new ossimNumericProperty("Width",
+                                                   ossimString::toString(theViewWidthHeight.x),
+                                                   -1,1.0/DBL_EPSILON));
+      container->addChild(new ossimNumericProperty("Height",
+                                                   ossimString::toString(theViewWidthHeight.y),
+                                                   -1,1.0/DBL_EPSILON));
+      container->setCacheRefreshBit();
+      return container;
+   }
+   else if(name == "Geographic label properties")
+   {
+
+      ossimContainerProperty* container = new ossimContainerProperty(name);
+      
+      container->addChild(new ossimFontProperty("Top font",
+                                                theGeographicTopLabelFontInfo));
+      container->addChild(new ossimColorProperty("Top color",
+                                                 theTopGeographicLabelColor));
+      container->addChild(new ossimBooleanProperty("Top enabled",
+                                                   theTopGeographicLabelFlag));
+      container->addChild(new ossimBooleanProperty("Top tick enabled",
+                                                   theTopGeographicTickFlag));
+      
+      container->addChild(new ossimFontProperty("Bottom font",
+                                                theGeographicBottomLabelFontInfo));
+      container->addChild(new ossimColorProperty("Bottom color",
+                                                 theBottomGeographicLabelColor));
+      container->addChild(new ossimBooleanProperty("Bottom enabled",
+                                                   theBottomGeographicLabelFlag));
+      container->addChild(new ossimBooleanProperty("Bottom tick enabled",
+                                                   theBottomGeographicTickFlag));
+      
+      container->addChild(new ossimFontProperty("Left font",
+                                                theGeographicLeftLabelFontInfo));
+      container->addChild(new ossimColorProperty("Left color",
+                                                 theLeftGeographicLabelColor));
+      container->addChild(new ossimBooleanProperty("Left enabled",
+                                                   theLeftGeographicLabelFlag));
+      container->addChild(new ossimBooleanProperty("Left tick enabled",
+                                                   theLeftGeographicTickFlag));
+      
+      container->addChild(new ossimFontProperty("Right font",
+                                                theGeographicRightLabelFontInfo));
+      container->addChild(new ossimColorProperty("Right color",
+                                                 theRightGeographicLabelColor));
+      container->addChild(new ossimBooleanProperty("Right enabled",
+                                                   theRightGeographicLabelFlag));
+      container->addChild(new ossimBooleanProperty("Right tick enabled",
+                                                   theRightGeographicTickFlag));
+      container->setCacheRefreshBit();
+      return container;
+   }
+   else if(name == "Geographic grid properties")
+   {
+      ossimContainerProperty* container = new ossimContainerProperty(name);
+      std::vector<ossimString> gridTypeConstraints;
+      ossimString value = GRID_TYPE_ENUM_NAMES[(int)theGeographicGridType];
+
+      gridTypeConstraints.push_back("none");
+      gridTypeConstraints.push_back("line");
+      gridTypeConstraints.push_back("reseaux");
+      
+      container->addChild(new ossimStringProperty("Grid type",
+                                                  value,
+                                                  false,
+                                                  gridTypeConstraints));
+      container->addChild(new ossimColorProperty("Color",
+                                                 theGeographicGridColor));
+
+      container->addChild(new ossimNumericProperty("Horizontal spacing",
+                                                   ossimString::toString(theGeographicSpacing.x),
+                                                   0.0, 180.0));
+
+      container->addChild(new ossimNumericProperty("Vertical spacing",
+                                                   ossimString::toString(theGeographicSpacing.y),
+                                                   0.0, 180.0));
+                                                   
+      container->setCacheRefreshBit();
+      return container;
+   }
+   else if(name == "Meter label properties")
+   {
+      ossimContainerProperty* container = new ossimContainerProperty(name);
+      
+      container->addChild(new ossimFontProperty("Top font",
+                                                theMeterTopLabelFontInfo));
+      container->addChild(new ossimColorProperty("Top color",
+                                                 theTopMeterLabelColor));
+      container->addChild(new ossimBooleanProperty("Top enabled",
+                                                   theTopMeterLabelFlag));
+      container->addChild(new ossimBooleanProperty("Top tick enabled",
+                                                   theTopMeterTickFlag));
+      
+      container->addChild(new ossimFontProperty("Bottom font",
+                                                theMeterBottomLabelFontInfo));
+      container->addChild(new ossimColorProperty("Bottom color",
+                                                 theBottomMeterLabelColor));
+      container->addChild(new ossimBooleanProperty("Bottom enabled",
+                                                   theBottomMeterLabelFlag));
+      container->addChild(new ossimBooleanProperty("Bottom tick enabled",
+                                                   theBottomMeterTickFlag));
+      
+      container->addChild(new ossimFontProperty("Left font",
+                                                theMeterLeftLabelFontInfo));
+      container->addChild(new ossimColorProperty("Left color",
+                                                 theLeftMeterLabelColor));
+      container->addChild(new ossimBooleanProperty("Left enabled",
+                                                   theLeftMeterLabelFlag));
+      container->addChild(new ossimBooleanProperty("Left tick enabled",
+                                                   theLeftMeterTickFlag));
+      
+      container->addChild(new ossimFontProperty("Right font",
+                                                theMeterRightLabelFontInfo));
+      container->addChild(new ossimColorProperty("Right color",
+                                                 theRightMeterLabelColor));
+      container->addChild(new ossimBooleanProperty("Right enabled",
+                                                   theRightMeterLabelFlag));
+      container->addChild(new ossimBooleanProperty("Right tick enabled",
+                                                   theRightMeterTickFlag));
+      
+      container->setCacheRefreshBit();
+      return container;
+   }
+   else if(name == "Meter grid properties")
+   {
+      ossimContainerProperty* container = new ossimContainerProperty(name);
+      std::vector<ossimString> gridTypeConstraints;
+      ossimString value = GRID_TYPE_ENUM_NAMES[(int)theMeterGridType];
+
+      gridTypeConstraints.push_back("none");
+      gridTypeConstraints.push_back("line");
+      gridTypeConstraints.push_back("reseaux");
+      
+      container->addChild(new ossimStringProperty("Grid type",
+                                                  value,
+                                                  false,
+                                                  gridTypeConstraints));
+      container->addChild(new ossimColorProperty("Color",
+                                                 theMeterGridColor));
+      
+      container->addChild(new ossimNumericProperty("Horizontal spacing",
+                                                   ossimString::toString(theMeterSpacing.x),
+                                                   0.0, 1.0/DBL_EPSILON));
+
+      container->addChild(new ossimNumericProperty("Vertical spacing",
+                                                   ossimString::toString(theMeterSpacing.y),
+                                                   0.0, 1.0/DBL_EPSILON));
+      container->setCacheRefreshBit();
+      return container;
+   }
+   else if(name == "Title properties")
+   {
+      ossimContainerProperty* container = new ossimContainerProperty(name);
+      container->addChild(new ossimTextProperty("Title",
+                                                theTitleString));
+      container->addChild(new ossimFontProperty("Font",
+                                                theTitleFontInfo));
+      container->addChild(new ossimColorProperty("Color",
+                                                 theTitleColor));
+      
+      container->setCacheRefreshBit();
+      return container;
+   }
+   else if(name == "Border size")
+   {
+      ossimContainerProperty* container = new ossimContainerProperty(name);
+      
+      container->addChild(new ossimNumericProperty("Top",
+                                                   ossimString::toString(theTopBorderLength),
+                                                   0,10000));
+      container->addChild(new ossimNumericProperty("Bottom",
+                                                   ossimString::toString(theBottomBorderLength),
+                                                   0,10000));
+      container->addChild(new ossimNumericProperty("Left",
+                                                   ossimString::toString(theLeftBorderLength),
+                                                   0,10000));
+      container->addChild(new ossimNumericProperty("Right",
+                                                   ossimString::toString(theRightBorderLength),
+                                                   0,10000));
+      container->setCacheRefreshBit();
+      return container;
+   }
+   else if(name == "Border color")
+   {
+      ossimColorProperty* colorProp = new ossimColorProperty(name,
+                                                             theBorderColor);
+      colorProp->setCacheRefreshBit();
+      
+      return colorProp;
+   }
+   else if(name == "Viewport properties")
+   {
+      
+   }
+   return ossimAnnotationSource::getProperty(name);
+}
+
+void ossimMapCompositionSource::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimAnnotationSource::getPropertyNames(propertyNames);
+
+   
+   propertyNames.push_back("Title properties");
+   propertyNames.push_back("Border size");
+   propertyNames.push_back("Border color");
+   propertyNames.push_back("Viewport properties");
+   propertyNames.push_back("Geographic label properties");
+   propertyNames.push_back("Geographic grid properties");
+   propertyNames.push_back("Meter label properties");
+   propertyNames.push_back("Meter grid properties");
+}
+
+bool ossimMapCompositionSource::saveState(ossimKeywordlist& kwl,
+                                          const char* prefix)const
+{
+   kwl.add(prefix,
+           VIEW_WIDTH_KW,
+           theViewWidthHeight.x,
+           true);
+   
+   kwl.add(prefix,
+           VIEW_HEIGHT_KW,
+           theViewWidthHeight.x,
+           true);
+   
+   kwl.add(prefix,
+           METER_GRID_SPACING_X_KW,
+           theMeterSpacing.x,
+           true);
+
+   kwl.add(prefix,
+           METER_GRID_SPACING_Y_KW,
+           theMeterSpacing.y,
+           true);
+   
+   kwl.add(prefix,
+           GEO_GRID_SPACING_LON_KW,
+           theGeographicSpacing.lon,
+           true);
+
+   kwl.add(prefix,
+           GEO_GRID_SPACING_LAT_KW,
+           theGeographicSpacing.lat,
+           true);
+
+   ossimString meterGridType = "line";
+   if(theMeterGridType == OSSIM_GRID_NONE)
+   {
+      meterGridType = "none";
+   }
+   else if(theMeterGridType == OSSIM_GRID_RESEAUX)
+   {
+      meterGridType = "reseaux";
+   }
+   
+   kwl.add(prefix,
+           METER_GRID_TYPE_KW,
+           meterGridType.c_str(),
+           true);
+
+   ossimString geoGridType = "line";
+   if(theGeographicGridType == OSSIM_GRID_NONE)
+   {
+      geoGridType = "none";
+   }
+   else if(theGeographicGridType == OSSIM_GRID_RESEAUX)
+   {
+      geoGridType = "reseaux";
+   }
+
+   kwl.add(prefix,
+           GEO_GRID_TYPE_KW,
+           geoGridType.c_str(),
+           true);
+
+   kwl.add(prefix,
+           TOP_BORDER_LENGTH_KW,
+           theTopBorderLength,
+           true);
+   
+   kwl.add(prefix,
+           BOTTOM_BORDER_LENGTH_KW,
+           theBottomBorderLength,
+           true);
+
+   kwl.add(prefix,
+           LEFT_BORDER_LENGTH_KW,
+           theLeftBorderLength,
+           true);
+
+   kwl.add(prefix,
+           RIGHT_BORDER_LENGTH_KW,
+           theRightBorderLength,
+           true);
+
+   kwl.add(prefix,
+           BORDER_COLOR_KW,
+           (ossimString::toString(theBorderColor.getR()) +" "+
+            ossimString::toString(theBorderColor.getG()) +" "+
+            ossimString::toString(theBorderColor.getB())).c_str(),
+           true);
+
+   kwl.add(prefix,
+           GEO_GRID_COLOR_KW,
+           (ossimString::toString(theGeographicGridColor.getR()) +" "+
+            ossimString::toString(theGeographicGridColor.getG()) +" "+
+            ossimString::toString(theGeographicGridColor.getB())).c_str(),
+           true);
+
+   kwl.add(prefix,
+           METER_GRID_COLOR_KW,
+           (ossimString::toString(theMeterGridColor.getR()) +" "+
+            ossimString::toString(theMeterGridColor.getG()) +" "+
+            ossimString::toString(theMeterGridColor.getB())).c_str(),
+           true);
+
+   kwl.add(prefix,
+           TITLE_STRING_KW,
+           theTitleString.c_str(),
+           true);
+   
+   kwl.add(prefix,
+           TITLE_COLOR_KW,
+           (ossimString::toString(theTitleColor.getR()) +" "+
+            ossimString::toString(theTitleColor.getG()) +" "+
+            ossimString::toString(theTitleColor.getB())).c_str(),
+           true);
+
+   kwl.add(prefix,
+           TOP_GEO_LABEL_COLOR_KW,
+           (ossimString::toString(theTopGeographicLabelColor.getR()) +" "+
+            ossimString::toString(theTopGeographicLabelColor.getG()) +" "+
+            ossimString::toString(theTopGeographicLabelColor.getB())).c_str(),
+           true);
+
+   kwl.add(prefix,
+           BOTTOM_GEO_LABEL_COLOR_KW,
+           (ossimString::toString(theBottomGeographicLabelColor.getR()) +" "+
+            ossimString::toString(theBottomGeographicLabelColor.getG()) +" "+
+            ossimString::toString(theBottomGeographicLabelColor.getB())).c_str(),
+           true);
+   kwl.add(prefix,
+           LEFT_GEO_LABEL_COLOR_KW,
+           (ossimString::toString(theLeftGeographicLabelColor.getR()) +" "+
+            ossimString::toString(theLeftGeographicLabelColor.getG()) +" "+
+            ossimString::toString(theLeftGeographicLabelColor.getB())).c_str(),
+           true);
+   kwl.add(prefix,
+           RIGHT_GEO_LABEL_COLOR_KW,
+           (ossimString::toString(theRightGeographicLabelColor.getR()) +" "+
+            ossimString::toString(theRightGeographicLabelColor.getG()) +" "+
+            ossimString::toString(theRightGeographicLabelColor.getB())).c_str(),
+           true);
+
+   kwl.add(prefix,
+           TOP_GEO_LABEL_FORMAT_KW,
+           theTopGeographicFormat,
+           true);
+
+   kwl.add(prefix,
+           BOTTOM_GEO_LABEL_FORMAT_KW,
+           theBottomGeographicFormat,
+           true);
+   kwl.add(prefix,
+           LEFT_GEO_LABEL_FORMAT_KW,
+           theLeftGeographicFormat,
+           true);
+   kwl.add(prefix,
+           RIGHT_GEO_LABEL_FORMAT_KW,
+           theRightGeographicFormat,
+           true);
+
+   kwl.add(prefix,
+           TOP_GEO_LABEL_FLAG_KW,
+           (int)theTopGeographicLabelFlag,
+           true);
+
+   kwl.add(prefix,
+           BOTTOM_GEO_LABEL_FLAG_KW,
+           (int)theBottomGeographicLabelFlag,
+           true);
+
+   kwl.add(prefix,
+           LEFT_GEO_LABEL_FLAG_KW,
+           (int)theLeftGeographicLabelFlag,
+           true);
+
+   kwl.add(prefix,
+           RIGHT_GEO_LABEL_FLAG_KW,
+           (int)theRightGeographicLabelFlag,
+           true);
+
+   kwl.add(prefix,
+           TOP_METER_LABEL_COLOR_KW,
+           (ossimString::toString(theTopMeterLabelColor.getR()) +" "+
+            ossimString::toString(theTopMeterLabelColor.getG()) +" "+
+            ossimString::toString(theTopMeterLabelColor.getB())).c_str(),
+           true);
+
+   kwl.add(prefix,
+           BOTTOM_METER_LABEL_COLOR_KW,
+           (ossimString::toString(theBottomMeterLabelColor.getR()) +" "+
+            ossimString::toString(theBottomMeterLabelColor.getG()) +" "+
+            ossimString::toString(theBottomMeterLabelColor.getB())).c_str(),
+           true);
+   kwl.add(prefix,
+           LEFT_METER_LABEL_COLOR_KW,
+           (ossimString::toString(theLeftMeterLabelColor.getR()) +" "+
+            ossimString::toString(theLeftMeterLabelColor.getG()) +" "+
+            ossimString::toString(theLeftMeterLabelColor.getB())).c_str(),
+           true);
+   kwl.add(prefix,
+           RIGHT_METER_LABEL_COLOR_KW,
+           (ossimString::toString(theRightMeterLabelColor.getR()) +" "+
+            ossimString::toString(theRightMeterLabelColor.getG()) +" "+
+            ossimString::toString(theRightMeterLabelColor.getB())).c_str(),
+           true);
+
+
+   kwl.add(prefix,
+           TOP_METER_LABEL_FLAG_KW,
+           (int)theTopMeterLabelFlag,
+           true);
+
+   kwl.add(prefix,
+           BOTTOM_METER_LABEL_FLAG_KW,
+           (int)theBottomMeterLabelFlag,
+           true);
+
+   kwl.add(prefix,
+           LEFT_METER_LABEL_FLAG_KW,
+           (int)theLeftMeterLabelFlag,
+           true);
+
+   kwl.add(prefix,
+           RIGHT_METER_LABEL_FLAG_KW,
+           (int)theRightMeterLabelFlag,
+           true);
+   
+   theGeographicTopLabelFontInfo.saveState(kwl, (ossimString(prefix) + ossimString(TOP_GEO_LABEL_FONT_KW) + ".").c_str());
+   theGeographicBottomLabelFontInfo.saveState(kwl, (ossimString(prefix) + ossimString(BOTTOM_GEO_LABEL_FONT_KW) + ".").c_str());
+   theGeographicLeftLabelFontInfo.saveState(kwl, (ossimString(prefix) + ossimString(LEFT_GEO_LABEL_FONT_KW) + ".").c_str());
+   theGeographicRightLabelFontInfo.saveState(kwl, (ossimString(prefix) + ossimString(RIGHT_GEO_LABEL_FONT_KW) + ".").c_str());
+
+   theMeterTopLabelFontInfo.saveState(kwl, (ossimString(prefix) + ossimString(TOP_METER_LABEL_FONT_KW) + ".").c_str());
+   theMeterBottomLabelFontInfo.saveState(kwl, (ossimString(prefix) + ossimString(BOTTOM_METER_LABEL_FONT_KW) + ".").c_str());
+   theMeterLeftLabelFontInfo.saveState(kwl, (ossimString(prefix) + ossimString(LEFT_METER_LABEL_FONT_KW) + ".").c_str());
+   theMeterRightLabelFontInfo.saveState(kwl, (ossimString(prefix) + ossimString(RIGHT_METER_LABEL_FONT_KW) + ".").c_str());
+   
+   theTitleFontInfo.saveState(kwl, (ossimString(prefix) + ossimString(TITLE_FONT_KW) + ".").c_str());
+   
+           
+   return ossimImageSource::saveState(kwl, prefix);
+   
+}
+
+bool ossimMapCompositionSource::loadState(const ossimKeywordlist& kwl,
+                                          const char* prefix)
+{
+   const char* viewWidth            = kwl.find(prefix, VIEW_WIDTH_KW);
+   const char* viewHeight           = kwl.find(prefix, VIEW_HEIGHT_KW);
+   const char* meterGridSpacingX    = kwl.find(prefix, METER_GRID_SPACING_X_KW);
+   const char* meterGridSpacingY    = kwl.find(prefix, METER_GRID_SPACING_Y_KW);
+   const char* geoGridSpacingLon    = kwl.find(prefix, GEO_GRID_SPACING_LON_KW);
+   const char* geoGridSpacingLat    = kwl.find(prefix, GEO_GRID_SPACING_LAT_KW);
+   const char* meterGridType        = kwl.find(prefix, METER_GRID_TYPE_KW);
+   const char* geoGridType          = kwl.find(prefix, GEO_GRID_TYPE_KW);
+   const char* topBorderLength      = kwl.find(prefix, TOP_BORDER_LENGTH_KW);
+   const char* bottomBorderLength   = kwl.find(prefix, BOTTOM_BORDER_LENGTH_KW);
+   const char* leftBorderLength     = kwl.find(prefix, LEFT_BORDER_LENGTH_KW);
+   const char* rightBorderLength    = kwl.find(prefix, RIGHT_BORDER_LENGTH_KW);
+   
+   const char* borderColor          = kwl.find(prefix, BORDER_COLOR_KW);
+   const char* geoGridColor         = kwl.find(prefix, GEO_GRID_COLOR_KW);
+   const char* meterGridColor       = kwl.find(prefix, METER_GRID_COLOR_KW);
+   const char* titleString          = kwl.find(prefix, TITLE_STRING_KW);
+   const char* titleColor           = kwl.find(prefix, TITLE_COLOR_KW);
+
+   const char* topGeoLabelColor     = kwl.find(prefix, TOP_GEO_LABEL_COLOR_KW);
+   const char* bottomGeoLabelColor  = kwl.find(prefix, BOTTOM_GEO_LABEL_COLOR_KW);
+   const char* leftGeoLabelColor    = kwl.find(prefix, LEFT_GEO_LABEL_COLOR_KW);
+   const char* rightGeoLabelColor   = kwl.find(prefix, RIGHT_GEO_LABEL_COLOR_KW);
+
+   const char* topMeterLabelColor     = kwl.find(prefix, TOP_METER_LABEL_COLOR_KW);
+   const char* bottomMeterLabelColor  = kwl.find(prefix, BOTTOM_METER_LABEL_COLOR_KW);
+   const char* leftMeterLabelColor    = kwl.find(prefix, LEFT_METER_LABEL_COLOR_KW);
+   const char* rightMeterLabelColor   = kwl.find(prefix, RIGHT_METER_LABEL_COLOR_KW);
+   
+   const char* topGeoLabelFormat    = kwl.find(prefix, TOP_GEO_LABEL_FORMAT_KW);
+   const char* bottomGeoLabelFormat = kwl.find(prefix, BOTTOM_GEO_LABEL_FORMAT_KW);
+   const char* leftGeoLabelFormat   = kwl.find(prefix, LEFT_GEO_LABEL_FORMAT_KW);
+   const char* rightGeoLabelFormat  = kwl.find(prefix, RIGHT_GEO_LABEL_FORMAT_KW);
+
+   const char* topGeoLabelFlag      = kwl.find(prefix, TOP_GEO_LABEL_FLAG_KW);
+   const char* bottomGeoLabelFlag   = kwl.find(prefix, BOTTOM_GEO_LABEL_FLAG_KW);
+   const char* leftGeoLabelFlag     = kwl.find(prefix, LEFT_GEO_LABEL_FLAG_KW);
+   const char* rightGeoLabelFlag    = kwl.find(prefix, RIGHT_GEO_LABEL_FLAG_KW);
+
+   const char* topMeterLabelFlag    = kwl.find(prefix, TOP_METER_LABEL_FLAG_KW);
+   const char* bottomMeterLabelFlag = kwl.find(prefix, BOTTOM_METER_LABEL_FLAG_KW);
+   const char* leftMeterLabelFlag   = kwl.find(prefix, LEFT_METER_LABEL_FLAG_KW);
+   const char* rightMeterLabelFlag  = kwl.find(prefix, RIGHT_METER_LABEL_FLAG_KW);
+
+   deleteFixedAnnotations();
+   theViewWidthHeight.makeNan();
+   
+   if(viewWidth)
+   {
+      theViewWidthHeight.x = ossimString(viewWidth).toLong();
+   }
+   if(viewHeight)
+   {
+      theViewWidthHeight.y = ossimString(viewHeight).toLong();
+   }
+   
+   if(meterGridSpacingX)
+   {
+      theMeterSpacing.x = ossimString(meterGridSpacingX).toDouble();
+   }
+
+   if(meterGridSpacingY)
+   {
+      theMeterSpacing.y = ossimString(meterGridSpacingY).toDouble();
+   }
+   if(geoGridSpacingLon)
+   {
+      theGeographicSpacing.lon = ossimString(geoGridSpacingLon).toDouble();
+   }
+   if(geoGridSpacingLat)
+   {
+      theGeographicSpacing.lat = ossimString(geoGridSpacingLat).toDouble();
+   }
+   if(meterGridType)
+   {
+      ossimString type = ossimString(meterGridType).trim().downcase();
+      if(type == "reseaux")
+      {
+         theMeterGridType = OSSIM_GRID_RESEAUX;
+      }
+      else if(type == "line")
+      {
+         theMeterGridType = OSSIM_GRID_LINE;
+      }
+      else
+      {
+         theMeterGridType = OSSIM_GRID_NONE;
+      }
+   }
+
+   if(geoGridType)
+   {
+      ossimString type = ossimString(geoGridType).trim().downcase();
+      if(type == "reseaux")
+      {
+         theGeographicGridType = OSSIM_GRID_RESEAUX;
+      }
+      else if(type == "line")
+      {
+         theGeographicGridType = OSSIM_GRID_LINE;
+      }
+      else
+      {
+         theGeographicGridType = OSSIM_GRID_NONE;
+      }
+   }
+
+   if(topBorderLength)
+   {
+      theTopBorderLength = ossimString(topBorderLength).toULong();
+   }
+
+   if(bottomBorderLength)
+   {
+      theBottomBorderLength = ossimString(bottomBorderLength).toULong();
+   }
+   if(leftBorderLength)
+   {
+      theLeftBorderLength = ossimString(leftBorderLength).toULong();
+   }
+   if(rightBorderLength)
+   {
+      theRightBorderLength = ossimString(rightBorderLength).toULong();
+   }
+
+   if(borderColor)
+   {
+      istringstream in(borderColor);
+
+      ossimString r;
+      ossimString g;
+      ossimString b;
+      in >> r >> g >> b;
+
+      theBorderColor = ossimRgbVector((ossim_uint8)r.toUInt32(), 
+                                      (ossim_uint8)g.toUInt32(), 
+                                      (ossim_uint8)b.toUInt32());
+   }
+
+   if(geoGridColor)
+   {
+      istringstream in(geoGridColor);
+
+      ossimString r;
+      ossimString g;
+      ossimString b;
+      in >> r >> g >> b;
+      
+      theGeographicGridColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());
+   }
+
+   if(meterGridColor)
+   {
+      istringstream in(meterGridColor);
+
+      ossimString r;
+      ossimString g;
+      ossimString b;
+      in >> r >> g >> b;
+      
+      theMeterGridColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());      
+   }
+
+   if(titleString)
+   {
+      theTitleString = titleString;
+   }
+   
+   if(titleColor)
+   {
+      istringstream in(titleColor);
+
+      ossimString r;
+      ossimString g;
+      ossimString b;
+      in >> r >> g >> b;
+      
+      
+      theTitleColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());
+   }
+
+   if(topGeoLabelColor)
+   {
+      istringstream in(topGeoLabelColor);
+
+      ossimString r;
+      ossimString g;
+      ossimString b;
+      in >> r >> g >> b;
+      
+      theTopGeographicLabelColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());
+   }
+
+   if(bottomGeoLabelColor)
+   {
+      istringstream in(bottomGeoLabelColor);
+
+      ossimString r;
+      ossimString g;
+      ossimString b;
+      in >> r >> g >> b;
+      
+      theBottomGeographicLabelColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());
+   }
+
+   if(leftGeoLabelColor)
+   {
+      istringstream in(leftGeoLabelColor);
+
+      ossimString r;
+      ossimString g;
+      ossimString b;
+      in >> r >> g >> b;
+
+      theLeftGeographicLabelColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());
+   }
+
+   if(rightGeoLabelColor)
+   {
+      istringstream in(rightGeoLabelColor);
+
+      ossimString r;
+      ossimString g;
+      ossimString b;
+      in >> r >> g >> b;
+      
+      theRightGeographicLabelColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());
+   }
+
+
+/////
+   if(topMeterLabelColor)
+   {
+      istringstream in(topMeterLabelColor);
+
+      ossimString r;
+      ossimString g;
+      ossimString b;
+      in >> r >> g >> b;
+      
+      theTopMeterLabelColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());
+   }
+
+   if(bottomMeterLabelColor)
+   {
+      istringstream in(bottomMeterLabelColor);
+
+      ossimString r;
+      ossimString g;
+      ossimString b;
+      in >> r >> g >> b;
+      
+      theBottomMeterLabelColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());
+   }
+
+   if(leftMeterLabelColor)
+   {
+      istringstream in(leftMeterLabelColor);
+
+      ossimString r;
+      ossimString g;
+      ossimString b;
+      in >> r >> g >> b;
+      
+      theLeftMeterLabelColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());
+   }
+
+   if(rightMeterLabelColor)
+   {
+      istringstream in(rightMeterLabelColor);
+
+      ossimString r;
+      ossimString g;
+      ossimString b;
+      in >> r >> g >> b;
+      
+      theRightMeterLabelColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());
+   }
+
+   if(topGeoLabelFormat)
+   {
+      theTopGeographicFormat = topGeoLabelFormat;
+   }
+   
+   if(bottomGeoLabelFormat)
+   {
+      theBottomGeographicFormat = bottomGeoLabelFormat;
+   }
+   
+   if(leftGeoLabelFormat)
+   {
+      theLeftGeographicFormat = leftGeoLabelFormat;
+   }
+   
+   if(rightGeoLabelFormat)
+   {
+      theRightGeographicFormat = rightGeoLabelFormat;
+   }
+
+   if(topGeoLabelFlag)
+   {
+      theTopGeographicLabelFlag = ossimString(topGeoLabelFlag).toBool();
+   }
+   if(bottomGeoLabelFlag)
+   {
+      theBottomGeographicLabelFlag = ossimString(bottomGeoLabelFlag).toBool();
+   }
+   if(leftGeoLabelFlag)
+   {
+      theLeftGeographicLabelFlag = ossimString(leftGeoLabelFlag).toBool();
+   }
+   if(rightGeoLabelFlag)
+   {
+      theRightGeographicLabelFlag = ossimString(rightGeoLabelFlag).toBool();
+   }
+
+   if(topMeterLabelFlag)
+   {
+      theTopMeterLabelFlag = ossimString(topMeterLabelFlag).toBool();
+   }
+   if(bottomMeterLabelFlag)
+   {
+      theBottomMeterLabelFlag = ossimString(bottomMeterLabelFlag).toBool();
+   }
+   if(leftMeterLabelFlag)
+   {
+      theLeftMeterLabelFlag = ossimString(leftMeterLabelFlag).toBool();
+   }
+   if(rightMeterLabelFlag)
+   {
+      theRightMeterLabelFlag = ossimString(rightMeterLabelFlag).toBool();
+   }
+   
+   theGeographicTopLabelFontInfo.loadState(kwl, (ossimString(prefix) + ossimString(TOP_GEO_LABEL_FONT_KW) + ".").c_str());
+   theGeographicBottomLabelFontInfo.loadState(kwl, (ossimString(prefix) + ossimString(BOTTOM_GEO_LABEL_FONT_KW) + ".").c_str());
+   theGeographicLeftLabelFontInfo.loadState(kwl, (ossimString(prefix) + ossimString(LEFT_GEO_LABEL_FONT_KW) + ".").c_str());
+   theGeographicRightLabelFontInfo.loadState(kwl, (ossimString(prefix) + ossimString(RIGHT_GEO_LABEL_FONT_KW) + ".").c_str());
+
+   theMeterTopLabelFontInfo.loadState(kwl, (ossimString(prefix) + ossimString(TOP_METER_LABEL_FONT_KW) + ".").c_str());
+   theMeterBottomLabelFontInfo.loadState(kwl, (ossimString(prefix) + ossimString(BOTTOM_METER_LABEL_FONT_KW) + ".").c_str());
+   theMeterLeftLabelFontInfo.loadState(kwl, (ossimString(prefix) + ossimString(LEFT_METER_LABEL_FONT_KW) + ".").c_str());
+   theMeterRightLabelFontInfo.loadState(kwl, (ossimString(prefix) + ossimString(RIGHT_METER_LABEL_FONT_KW) + ".").c_str());
+   
+   theTitleFontInfo.loadState(kwl, (ossimString(prefix) + ossimString(TITLE_FONT_KW) + ".").c_str());
+   theTitleFont = ossimFontFactoryRegistry::instance()->createFont(theTitleFontInfo);
+   theGeographicTopLabelFont = ossimFontFactoryRegistry::instance()->createFont(theGeographicTopLabelFontInfo);
+   theGeographicBottomLabelFont = ossimFontFactoryRegistry::instance()->createFont(theGeographicBottomLabelFontInfo);
+   theGeographicLeftLabelFont = ossimFontFactoryRegistry::instance()->createFont(theGeographicLeftLabelFontInfo);
+   theGeographicRightLabelFont = ossimFontFactoryRegistry::instance()->createFont(theGeographicRightLabelFontInfo);
+
+   theMeterTopLabelFont = ossimFontFactoryRegistry::instance()->createFont(theMeterTopLabelFontInfo);
+   theMeterBottomLabelFont = ossimFontFactoryRegistry::instance()->createFont(theMeterBottomLabelFontInfo);
+   theMeterLeftLabelFont = ossimFontFactoryRegistry::instance()->createFont(theMeterLeftLabelFontInfo);
+   theMeterRightLabelFont = ossimFontFactoryRegistry::instance()->createFont(theMeterRightLabelFontInfo);
+   
+   vector<ossimFontInformation> info;
+
+   
+   if(!theTitleFont)
+   {
+      theTitleFont = (ossimFont*)ossimFontFactoryRegistry::instance()->getDefaultFont()->dup();
+      theTitleFont->getFontInformation(info);
+      theTitleFontInfo = info[0];
+   }
+   if(!theGeographicTopLabelFont)
+   {
+      info.clear();
+      theGeographicTopLabelFont = (ossimFont*)ossimFontFactoryRegistry::instance()->getDefaultFont()->dup();
+      theGeographicTopLabelFont->getFontInformation(info);
+      theGeographicTopLabelFontInfo = info[0];
+   }
+   if(!theGeographicBottomLabelFont)
+   {
+      info.clear();
+      theGeographicBottomLabelFont = (ossimFont*)ossimFontFactoryRegistry::instance()->getDefaultFont()->dup();
+      theGeographicBottomLabelFont->getFontInformation(info);
+      theGeographicBottomLabelFontInfo = info[0];
+   }
+   if(!theGeographicLeftLabelFont)
+   {
+      info.clear();
+      theGeographicLeftLabelFont = (ossimFont*)ossimFontFactoryRegistry::instance()->getDefaultFont()->dup();
+      theGeographicLeftLabelFont->getFontInformation(info);
+      theGeographicLeftLabelFontInfo = info[0];
+   }
+   if(!theGeographicRightLabelFont)
+   {
+      info.clear();
+      theGeographicRightLabelFont = (ossimFont*)ossimFontFactoryRegistry::instance()->getDefaultFont()->dup();
+      theGeographicRightLabelFont->getFontInformation(info);
+      theGeographicRightLabelFontInfo = info[0];
+   }
+
+   if(!theMeterTopLabelFont)
+   {
+      info.clear();
+      theMeterTopLabelFont = (ossimFont*)ossimFontFactoryRegistry::instance()->getDefaultFont()->dup();
+      theMeterTopLabelFont->getFontInformation(info);
+      theMeterTopLabelFontInfo = info[0];
+   }
+   if(!theMeterBottomLabelFont)
+   {
+      info.clear();
+      theMeterBottomLabelFont = (ossimFont*)ossimFontFactoryRegistry::instance()->getDefaultFont()->dup();
+      theMeterBottomLabelFont->getFontInformation(info);
+      theMeterBottomLabelFontInfo = info[0];
+   }
+   if(!theMeterLeftLabelFont)
+   {
+      info.clear();
+      theMeterLeftLabelFont = (ossimFont*)ossimFontFactoryRegistry::instance()->getDefaultFont()->dup();
+      theMeterLeftLabelFont->getFontInformation(info);
+      theMeterLeftLabelFontInfo = info[0];
+   }
+   if(!theMeterRightLabelFont)
+   {
+      info.clear();
+      theMeterRightLabelFont = (ossimFont*)ossimFontFactoryRegistry::instance()->getDefaultFont()->dup();
+      theMeterRightLabelFont->getFontInformation(info);
+      theMeterRightLabelFontInfo = info[0];
+   }
+
+   bool result =  ossimAnnotationSource::loadState(kwl,
+                                                   prefix);
+   layoutAnnotations();
+
+   return result;
+}
+
+ossimScalarType ossimMapCompositionSource::getOutputScalarType() const
+{
+   return OSSIM_UCHAR;
+}
+
+ossim_uint32 ossimMapCompositionSource::getNumberOfOutputBands() const
+{
+   return 3;
+}
+
+ossimIpt ossimMapCompositionSource::getViewWidthHeight()const
+{
+   return theViewWidthHeight;
+}
+
+void ossimMapCompositionSource::getViewWidthHeight(ossimIpt& widthHeight)const
+{
+   widthHeight = theViewWidthHeight;
+}
+
+void ossimMapCompositionSource::setViewWidthHeight(const ossimIpt& widthHeight)
+{
+   theViewWidthHeight = widthHeight;
+}
+
+ossim_int32 ossimMapCompositionSource::getTopBorderLength()const
+{
+   return theTopBorderLength;
+}
+
+ossim_int32 ossimMapCompositionSource::getBottomBorderLength()const
+{
+   return theBottomBorderLength;
+}
+
+ossim_int32 ossimMapCompositionSource::getLeftBorderLength()const
+{
+   return theLeftBorderLength;
+}
+
+ossim_int32 ossimMapCompositionSource::getRightBorderLength()const
+{
+   return theRightBorderLength;
+}
+
+void ossimMapCompositionSource::setTopBorderLength(ossim_int32 length)
+{
+   theTopBorderLength = length;
+}
+
+void ossimMapCompositionSource::setBottomBorderLength(ossim_int32 length)
+{
+   theBottomBorderLength = length;
+}
+
+void ossimMapCompositionSource::setLeftBorderLength(ossim_int32 length)
+{
+   theLeftBorderLength = length;
+}
+
+void ossimMapCompositionSource::setRightBorderLength(ossim_int32 length)
+{
+   theRightBorderLength = length;
+}
+
+void ossimMapCompositionSource::setGeographicSpacingLat(double value)
+{
+   theGeographicSpacing.lat = value;
+}
+
+void ossimMapCompositionSource::setGeographicSpacingLon(double value)
+{
+   theGeographicSpacing.lon = value;
+}
+
+void ossimMapCompositionSource::setMeterSpacingX(double value)
+{
+   theMeterSpacing.x = value;
+}
+
+void ossimMapCompositionSource::setMeterSpacingY(double value)
+{
+   theMeterSpacing.y = value;
+}
+
+void ossimMapCompositionSource::setMeterSpacing(double x, double y)
+{
+   theMeterSpacing.x = x;
+   theMeterSpacing.y = y;
+}
+
+void ossimMapCompositionSource::setGeographicSpacing(double lat, double lon)
+{
+   theGeographicSpacing.lat = lat;
+   theGeographicSpacing.lon = lon;
+}
+
+ossimDpt ossimMapCompositionSource::getGeographicSpacing()const
+{
+   return theGeographicSpacing;
+}
+
+ossimDpt ossimMapCompositionSource::getMeterSpacing()const
+{
+   return theMeterSpacing;
+}
+
+ossimString ossimMapCompositionSource::getTopGeographicLabelFormat()const
+{
+   return theTopGeographicFormat;
+}
+
+ossimString ossimMapCompositionSource::getBottomGeographicLabelFormat()const
+{
+   return theBottomGeographicFormat;
+}
+
+ossimString ossimMapCompositionSource::getLeftGeographicLabelFormat()const
+{
+   return theLeftGeographicFormat;
+}
+
+ossimString ossimMapCompositionSource::getRightGeographicLabelFormat()const
+{
+   return theRightGeographicFormat;
+}
+
+ossimString ossimMapCompositionSource::getTitle()const
+{
+   return theTitleString;
+}
+
+ossimRgbVector ossimMapCompositionSource::getTitleColor()const
+{
+   return theTitleColor;
+}
+
+void ossimMapCompositionSource::setTitleColor(const ossimRgbVector& color)
+{
+   if(theTitleColor != color)
+   {
+      theTitleColor = color;
+   }
+}
+
+void ossimMapCompositionSource::setTitle(const ossimString& s)
+{
+   if(theTitleString != s)
+   {
+      theTitleString = s;
+   }
+         
+}
+
+ossimFontInformation ossimMapCompositionSource::getTitleFont()const
+{
+   return theTitleFontInfo;
+}
+
+ossimFontInformation ossimMapCompositionSource::getGeographicTopLabelFontInfo()const
+{
+   return theGeographicTopLabelFontInfo;
+}
+
+ossimFontInformation ossimMapCompositionSource::getGeographicBottomLabelFontInfo()const
+{
+   return theGeographicBottomLabelFontInfo;
+}
+
+ossimFontInformation ossimMapCompositionSource::getGeographicLeftLabelFontInfo()const
+{
+   return theGeographicLeftLabelFontInfo;
+}
+
+ossimFontInformation ossimMapCompositionSource::getGeographicRightLabelFontInfo()const
+{
+   return theGeographicRightLabelFontInfo;
+}
+
+ossimFontInformation ossimMapCompositionSource::getMeterTopLabelFontInfo()const
+{
+   return theMeterTopLabelFontInfo;
+}
+
+ossimFontInformation ossimMapCompositionSource::getMeterBottomLabelFontInfo()const
+{
+   return theMeterBottomLabelFontInfo;
+}
+
+ossimFontInformation ossimMapCompositionSource::getMeterLeftLabelFontInfo()const
+{
+   return theMeterLeftLabelFontInfo;
+}
+
+ossimFontInformation ossimMapCompositionSource::getMeterRightLabelFontInfo()const
+{
+   return theMeterRightLabelFontInfo;
+}
+   
+ossimRgbVector ossimMapCompositionSource::getBorderColor()const
+{
+   return theBorderColor;
+}
+
+void ossimMapCompositionSource::setBorderColor(const ossimRgbVector& color)
+{
+   theBorderColor=color;
+}
+
+ossimRgbVector ossimMapCompositionSource::getGeographicGridColor()const
+{
+   return theGeographicGridColor;
+}
+
+ossimRgbVector ossimMapCompositionSource::getMeterGridColor()const
+{
+   return theMeterGridColor;
+}
+
+ossimRgbVector ossimMapCompositionSource::getTopGeographicLabelColor()const
+{
+   return theTopGeographicLabelColor;
+}
+
+ossimRgbVector ossimMapCompositionSource::getBottomGeographicLabelColor()const
+{
+   return theBottomGeographicLabelColor;
+}
+
+ossimRgbVector ossimMapCompositionSource::getLeftGeographicLabelColor()const
+{
+   return theLeftGeographicLabelColor;
+}
+
+ossimRgbVector ossimMapCompositionSource::getRightGeographicLabelColor()const
+{
+   return theRightGeographicLabelColor;
+}
+
+void ossimMapCompositionSource::setGeographicGridColor(const ossimRgbVector& color)
+{
+   theGeographicGridColor = color;
+}
+
+void ossimMapCompositionSource::setTopGeographicLabelColor(const ossimRgbVector& color)
+{
+   theTopGeographicLabelColor = color;
+}
+
+void ossimMapCompositionSource::setBottomGeographicLabelColor(const ossimRgbVector& color)
+{
+   theBottomGeographicLabelColor = color;
+}
+
+void ossimMapCompositionSource::setLeftGeographicLabelColor(const ossimRgbVector& color)
+{
+   theLeftGeographicLabelColor = color;
+}
+
+void ossimMapCompositionSource::setRightGeographicLabelColor(const ossimRgbVector& color)
+{
+   theRightGeographicLabelColor = color;
+}
+
+void ossimMapCompositionSource::setGeographicLabelColor(const ossimRgbVector& color)
+{
+   setTopGeographicLabelColor(color);
+   setBottomGeographicLabelColor(color);
+   setLeftGeographicLabelColor(color);
+   setRightGeographicLabelColor(color);
+}
+
+ossimRgbVector ossimMapCompositionSource::getTopMeterLabelColor()const
+{
+   return theTopMeterLabelColor;
+}
+
+ossimRgbVector ossimMapCompositionSource::getBottomMeterLabelColor()const
+{
+   return theBottomMeterLabelColor;
+}
+
+ossimRgbVector ossimMapCompositionSource::getLeftMeterLabelColor()const
+{
+   return theLeftMeterLabelColor;
+}
+
+ossimRgbVector ossimMapCompositionSource::getRightMeterLabelColor()const
+{
+   return theRightMeterLabelColor;
+}
+   
+void ossimMapCompositionSource::setTopMeterLabelColor(const ossimRgbVector& color)
+{
+   theTopMeterLabelColor = color;
+}
+
+void ossimMapCompositionSource::setBottomMeterLabelColor(const ossimRgbVector& color)
+{
+   theBottomMeterLabelColor = color;
+}
+
+void ossimMapCompositionSource::setLeftMeterLabelColor(const ossimRgbVector& color)
+{
+   theLeftMeterLabelColor = color;
+}
+
+void ossimMapCompositionSource::setRightMeterLabelColor(const ossimRgbVector& color)
+{
+   theRightMeterLabelColor = color;
+}
+
+void ossimMapCompositionSource::setMeterLabelColor(const ossimRgbVector& color)
+{
+   setTopMeterLabelColor(color);
+   setBottomMeterLabelColor(color);
+   setLeftMeterLabelColor(color);
+   setRightMeterLabelColor(color);
+}
+   
+void ossimMapCompositionSource::setMeterGridColor(const ossimRgbVector& color)
+{
+   theMeterGridColor = color;
+}
+
+void ossimMapCompositionSource::setMeterGridType(ossimGridLineType gridType)
+{
+   theMeterGridType = gridType;
+}
+
+void ossimMapCompositionSource::setGeographicGridType(ossimGridLineType gridType)
+{
+   theGeographicGridType = gridType;
+}
+
+void ossimMapCompositionSource::setBorderColor(ossimRgbVector& color)
+{
+   theBorderColor = color;
+}
+
+ossimMapCompositionSource::ossimGridLineType ossimMapCompositionSource::getGeographicGridType()const
+{
+   return theGeographicGridType;
+}
+
+ossimMapCompositionSource::ossimGridLineType ossimMapCompositionSource::getMeterGridType()const
+{
+   return theMeterGridType;
+}
+ 
+void ossimMapCompositionSource::setGeographicTickMarkFlag(bool flag)
+{
+   setTopGeographicTickMarkFlag(flag);
+   setBottomGeographicTickMarkFlag(flag);
+   setLeftGeographicTickMarkFlag(flag);
+   setRightGeographicTickMarkFlag(flag);
+}
+
+void ossimMapCompositionSource::setTopGeographicTickMarkFlag(bool flag)
+{
+   theTopGeographicTickFlag = flag;
+}
+
+void ossimMapCompositionSource::setBottomGeographicTickMarkFlag(bool flag)
+{
+   theBottomGeographicTickFlag = flag;
+}
+
+void ossimMapCompositionSource::setLeftGeographicTickMarkFlag(bool flag)
+{
+   theLeftGeographicTickFlag = flag;
+}
+
+void ossimMapCompositionSource::setRightGeographicTickMarkFlag(bool flag)
+{
+   theRightGeographicTickFlag = flag;
+}
+
+void ossimMapCompositionSource::setTopGeographicLabelFlag(bool flag)
+{
+   theTopGeographicLabelFlag = flag;
+}
+
+void ossimMapCompositionSource::setBottomGeographicLabelFlag(bool flag)
+{
+   theBottomGeographicLabelFlag = flag;
+}
+
+void ossimMapCompositionSource::setLeftGeographicLabelFlag(bool flag)
+{
+   theLeftGeographicLabelFlag = flag;
+}
+
+void ossimMapCompositionSource::setRightGeographicLabelFlag(bool flag)
+{
+   theRightGeographicLabelFlag = flag;
+}
+
+bool ossimMapCompositionSource::getTopGeographicTickMarkFlag()const
+{
+   return theTopGeographicTickFlag;
+}
+
+bool ossimMapCompositionSource::getBottomGeographicTickMarkFlag()const
+{
+   return theBottomGeographicTickFlag;
+}
+
+bool ossimMapCompositionSource::getLeftGeographicTickMarkFlag()const
+{
+   return theLeftGeographicTickFlag;
+}
+
+bool ossimMapCompositionSource::getRightGeographicTickMarkFlag()const
+{
+   return theRightGeographicTickFlag;
+}
+
+bool ossimMapCompositionSource::getTopGeographicLabelFlag()const
+{
+   return theTopGeographicLabelFlag;
+}
+
+bool ossimMapCompositionSource::getBottomGeographicLabelFlag()const
+{
+   return theBottomGeographicLabelFlag;
+}
+
+bool ossimMapCompositionSource::getLeftGeographicLabelFlag()const
+{
+   return theLeftGeographicLabelFlag;
+}
+
+bool ossimMapCompositionSource::getRightGeographicLabelFlag()const
+{
+   return theRightGeographicLabelFlag;
+}
+
+void ossimMapCompositionSource::setMeterTickMarkFlag(bool flag)
+{
+   setTopMeterTickMarkFlag(flag);
+   setBottomMeterTickMarkFlag(flag);
+   setLeftMeterTickMarkFlag(flag);
+   setRightMeterTickMarkFlag(flag);
+}
+
+void ossimMapCompositionSource::setTopMeterTickMarkFlag(bool flag)
+{
+   theTopMeterTickFlag = flag;
+}
+
+void ossimMapCompositionSource::setBottomMeterTickMarkFlag(bool flag)
+{
+   theBottomMeterTickFlag = flag;
+}
+
+void ossimMapCompositionSource::setLeftMeterTickMarkFlag(bool flag)
+{
+   theLeftMeterTickFlag = flag;
+}
+
+void ossimMapCompositionSource::setRightMeterTickMarkFlag(bool flag)
+{
+   theRightMeterTickFlag = flag;
+}
+
+void ossimMapCompositionSource::setTopMeterLabelFlag(bool flag)
+{
+   theTopMeterLabelFlag = flag;
+}
+
+void ossimMapCompositionSource::setBottomMeterLabelFlag(bool flag)
+{
+   theBottomMeterLabelFlag = flag;
+}
+
+void ossimMapCompositionSource::setLeftMeterLabelFlag(bool flag)
+{
+   theLeftMeterLabelFlag = flag;
+}
+
+void ossimMapCompositionSource::setRightMeterLabelFlag(bool flag)
+{
+   theRightMeterLabelFlag = flag;
+}
+   
+bool ossimMapCompositionSource::getTopMeterTickMarkFlag()const
+{
+   return theTopMeterTickFlag;
+}
+
+bool ossimMapCompositionSource::getBottomMeterTickMarkFlag()const
+{
+   return theBottomMeterTickFlag;
+}
+
+bool ossimMapCompositionSource::getLeftMeterTickMarkFlag()const
+{
+   return theLeftMeterTickFlag;
+}
+
+bool ossimMapCompositionSource::getRightMeterTickMarkFlag()const
+{
+   return theRightMeterTickFlag;
+}
+
+bool ossimMapCompositionSource::getTopMeterLabelFlag()const
+{
+   return theTopMeterLabelFlag;
+}
+
+bool ossimMapCompositionSource::getBottomMeterLabelFlag()const
+{
+   return theBottomMeterLabelFlag;
+}
+
+bool ossimMapCompositionSource::getLeftMeterLabelFlag()const
+{
+   return theLeftMeterLabelFlag;
+}
+
+bool ossimMapCompositionSource::getRightMeterLabelFlag()const
+{
+   return theRightMeterLabelFlag;
+}
+
+void ossimMapCompositionSource::addFixedAnnotation(ossimAnnotationObject* obj)
+{
+   if(obj)
+   {
+      theFixedAnnotationList.push_back(obj);
+   }
+}
+
+//**************************************************************************************************
+//! Fetches the input connection's image geometry and verifies that it is a map projection.
+//! Returns NULL if no valid projection found.
+//**************************************************************************************************
+const ossimMapProjection* ossimMapCompositionSource::inputMapProjection() const
+{
+   if (!theInputConnection)
+      return 0;
+
+   ossimRefPtr<ossimImageGeometry> inputGeom = theInputConnection->getImageGeometry();
+   if (!inputGeom)
+      return 0;
+
+   return PTR_CAST(ossimMapProjection, inputGeom->getProjection());
+}
+
+
diff --git a/ossim/src/ossim/imaging/ossimMaskFilter.cpp b/ossim/src/ossim/imaging/ossimMaskFilter.cpp
new file mode 100644
index 0000000..63d0bd5
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimMaskFilter.cpp
@@ -0,0 +1,863 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// Modified by: Elan Sharghi (1/20/2009)
+// Description: Class definition for ossimMaskFilter.
+//
+//*************************************************************************
+// $Id: ossimMaskFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimMaskFilter.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimProperty.h>
+#include <ossim/base/ossimStringProperty.h>
+
+static const char * MASK_FILTER_MASK_TYPE_KW = "mask_type";
+
+RTTI_DEF1(ossimMaskFilter, "ossimMaskFilter", ossimImageSource);
+
+ossimMaskFilter::ossimMaskFilter(ossimObject* owner)
+   :
+   ossimImageSource(owner, 1, 1, true, false),
+   theMaskType(OSSIM_MASK_TYPE_SELECT),
+   theTile(0)
+{
+}
+
+ossimMaskFilter::~ossimMaskFilter()
+{
+}
+
+//*************************************************************************************************
+void ossimMaskFilter::setMaskSource(ossimImageSource* maskSource)
+{
+   theMaskSource = maskSource;
+}
+
+ossimRefPtr<ossimImageData> ossimMaskFilter::getTile(const ossimIrect& rect,
+                                                     ossim_uint32 resLevel)
+{
+   ossimImageSource* imageSource = PTR_CAST(ossimImageSource, getInput(0));
+   if (!imageSource || !theMaskSource.valid())
+   {
+      ossimRefPtr<ossimImageData>();
+      return theTile;
+   }
+
+   ossimRefPtr<ossimImageData> imageSourceData;
+   ossimRefPtr<ossimImageData> maskSourceData;
+   
+   imageSourceData = imageSource->getTile(rect, resLevel);
+   if(!isSourceEnabled())
+      return imageSourceData;
+   
+   if (!theTile.valid())
+      allocate();
+
+   maskSourceData = theMaskSource->getTile(rect, resLevel);
+   if(!imageSourceData.valid() || !theTile.valid())
+   {
+      return ossimRefPtr<ossimImageData>();
+   }
+   
+   theTile->setOrigin(rect.ul());
+   if(theTile->getImageRectangle() != rect)
+   {
+      theTile->setImageRectangle(rect);
+      theTile->initialize();
+   }
+   if(!imageSourceData.valid())
+   {
+      return theTile;
+   }
+   if(!maskSourceData.valid()) 
+   {
+      return imageSourceData;
+   }
+   
+   if(imageSourceData->getDataObjectStatus() != OSSIM_NULL)
+   {
+      return executeMaskFilter(imageSourceData, maskSourceData);  
+   }
+   
+   return theTile;
+}
+
+bool ossimMaskFilter::canConnectMyInputTo(ossim_int32 /* index */,
+                                          const ossimConnectableObject* object)const
+{
+   return (PTR_CAST(ossimImageSource, object)!= 0);
+}
+
+void ossimMaskFilter::initialize()
+{
+   if(getInput(0))
+   {
+      // Force an allocate on the next getTile.
+      theTile = 0;
+   }
+}
+
+void ossimMaskFilter::allocate()
+{
+   if(getInput())
+   {
+      theTile = ossimImageDataFactory::instance()->create(this, this);
+      theTile->initialize();
+   }
+}
+
+ossimRefPtr<ossimImageData> ossimMaskFilter::executeMaskFilter(
+   ossimRefPtr<ossimImageData> imageSourceData,
+   ossimRefPtr<ossimImageData> maskSourceData)
+{
+   if(!theTile)
+   {
+      theTile = (ossimImageData*)imageSourceData->dup();
+      if(!theTile->getBuf())
+      {
+         theTile->initialize();
+      }
+   }
+   else
+   {
+      ossim_uint32 tw = theTile->getWidth();
+      ossim_uint32 th = theTile->getHeight();
+      ossim_uint32 dw = imageSourceData->getWidth();
+      ossim_uint32 dh = imageSourceData->getHeight();
+      
+      theTile->setWidthHeight(imageSourceData->getWidth(),
+			      imageSourceData->getHeight());
+      theTile->setOrigin(imageSourceData->getOrigin());
+      if((tw*th) != (dw*dh))
+      {
+         theTile->initialize();
+      }
+      theTile->setDataObjectStatus(imageSourceData->getDataObjectStatus());
+   }
+   theTile->loadTile(imageSourceData.get());
+   theTile->setDataObjectStatus(imageSourceData->getDataObjectStatus());
+   switch(theMaskType)
+   {
+      case OSSIM_MASK_TYPE_SELECT:
+      case OSSIM_MASK_TYPE_SELECT_CLAMP_MIN:
+      {
+         return executeMaskFilterSelect(theTile, maskSourceData);
+      }
+      case OSSIM_MASK_TYPE_INVERT:
+      {
+         return executeMaskFilterInvertSelect(theTile, maskSourceData);
+      }
+      case OSSIM_MASK_TYPE_WEIGHTED:
+      {
+         return executeMaskFilterWeighted(theTile, maskSourceData);
+      }
+      case OSSIM_MASK_TYPE_BINARY:
+      case OSSIM_MASK_TYPE_BINARY_INVERSE:
+      {
+         return executeMaskFilterBinary(theTile, maskSourceData);
+      }
+   }
+   
+   return imageSourceData;
+}
+
+ossimRefPtr<ossimImageData> ossimMaskFilter::executeMaskFilterSelect(
+   ossimRefPtr<ossimImageData> imageSourceData,
+   ossimRefPtr<ossimImageData> maskSourceData)
+{
+   if(maskSourceData->getScalarType() != OSSIM_UCHAR)
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "ossimMaskFilter::executeMaskFilterSelect WARNING: Only uchar masks are supported" << endl;
+      return imageSourceData;
+   }
+
+   switch(imageSourceData->getScalarType())
+   {
+   case OSSIM_UCHAR:
+   {
+      executeMaskFilterSelection((ossim_uint8)0,
+                                 (ossim_uint8)0,
+                                 imageSourceData,
+                                 maskSourceData);
+      break;
+   }
+   case OSSIM_USHORT11:
+   case OSSIM_USHORT16:
+   {
+      executeMaskFilterSelection((ossim_uint16)0,
+                                 (ossim_uint8)0,
+                                 imageSourceData,
+                                 maskSourceData);
+      break;
+   }
+   case OSSIM_SSHORT16:
+   {
+      executeMaskFilterSelection((ossim_sint16)0,
+                                 (ossim_uint8)0,
+                                 imageSourceData,
+                                 maskSourceData);
+      break;
+   }
+   case OSSIM_FLOAT:
+   case OSSIM_NORMALIZED_FLOAT:
+   {
+      executeMaskFilterSelection((float)0,
+                                 (ossim_uint8)0,
+                                 imageSourceData,
+                                 maskSourceData);
+      break;
+   }
+   case OSSIM_DOUBLE:
+   case OSSIM_NORMALIZED_DOUBLE:
+   {
+      executeMaskFilterSelection((double)0,
+                                 (ossim_uint8)0,
+                                 imageSourceData,
+                                 maskSourceData);
+      break;
+   }
+   default:
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "ossimMaskFilter::executeMaskFilterSelect WARNING: Unknown scalar type" << endl;
+      break;
+   }   
+   }
+
+   return theTile;
+}
+
+ossimRefPtr<ossimImageData> ossimMaskFilter::executeMaskFilterInvertSelect(ossimRefPtr<ossimImageData> imageSourceData,
+                                                                           ossimRefPtr<ossimImageData> maskSourceData)
+{
+   if(maskSourceData->getScalarType() != OSSIM_UCHAR)
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "ossimMaskFilter::executeMaskFilterSelect WARNING: Only uchar masks are supported" << endl;
+      return imageSourceData;
+   }
+
+   switch(imageSourceData->getScalarType())
+   {
+   case OSSIM_UCHAR:
+   {
+      executeMaskFilterInvertSelection((ossim_uint8)0,
+                                       (ossim_uint8)0,
+                                       imageSourceData,
+                                       maskSourceData);
+      break;
+   }
+   case OSSIM_USHORT11:
+   case OSSIM_USHORT16:
+   {
+      executeMaskFilterInvertSelection((ossim_uint16)0,
+                                       (ossim_uint8)0,
+                                       imageSourceData,
+                                       maskSourceData);
+      break;
+   }
+   case OSSIM_SSHORT16:
+   {
+      executeMaskFilterInvertSelection((ossim_sint16)0,
+                                       (ossim_uint8)0,
+                                       imageSourceData,
+                                       maskSourceData);
+      break;
+   }
+   case OSSIM_FLOAT:
+   case OSSIM_NORMALIZED_FLOAT:
+   {
+      executeMaskFilterInvertSelection((float)0,
+                                       (ossim_uint8)0,
+                                       imageSourceData,
+                                       maskSourceData);
+      break;
+   }
+   case OSSIM_DOUBLE:
+   case OSSIM_NORMALIZED_DOUBLE:
+   {
+      executeMaskFilterInvertSelection((double)0,
+                                       (ossim_uint8)0,
+                                       imageSourceData,
+                                       maskSourceData);
+      break;
+   }
+   default:
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "ossimMaskFilter::executeMaskFilterSelect WARNING: Unknown scalar type" << endl;
+      break;
+   }   
+   }
+
+   return theTile;
+}
+
+ossimRefPtr<ossimImageData> ossimMaskFilter::executeMaskFilterWeighted(ossimRefPtr<ossimImageData> imageSourceData,
+                                                                       ossimRefPtr<ossimImageData> maskSourceData)
+{
+   if(maskSourceData->getScalarType() != OSSIM_UCHAR)
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "ossimMaskFilter::executeMaskFilterSelect WARNING: Only uchar masks are supported" << endl;
+      return imageSourceData;
+   }
+
+   switch(imageSourceData->getScalarType())
+   {
+   case OSSIM_UCHAR:
+   {
+      executeMaskFilterWeighted((ossim_uint8)0,
+                                (ossim_uint8)0,
+                                imageSourceData,
+                                maskSourceData);
+      break;
+   }
+   case OSSIM_USHORT11:
+   case OSSIM_USHORT16:
+   {
+      executeMaskFilterWeighted((ossim_uint16)0,
+                                (ossim_uint8)0,
+                                imageSourceData,
+                                maskSourceData);
+      break;
+   }
+   case OSSIM_SSHORT16:
+   {
+      executeMaskFilterWeighted((ossim_sint16)0,
+                                (ossim_uint8)0,
+                                imageSourceData,
+                                maskSourceData);
+      break;
+   }
+   case OSSIM_FLOAT:
+   case OSSIM_NORMALIZED_FLOAT:
+   {
+      executeMaskFilterWeighted((float)0,
+                                (ossim_uint8)0,
+                                imageSourceData,
+                                maskSourceData);
+      break;
+   }
+   case OSSIM_DOUBLE:
+   case OSSIM_NORMALIZED_DOUBLE:
+   {
+      executeMaskFilterWeighted((double)0,
+                                (ossim_uint8)0,
+                                imageSourceData,
+                                maskSourceData);
+      break;
+   }
+   default:
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "ossimMaskFilter::executeMaskFilterSelect WARNING: Unknown scalar type" << endl;
+      break;
+   }   
+   }
+
+   return theTile;
+}
+
+ossimRefPtr<ossimImageData> ossimMaskFilter::executeMaskFilterBinary(
+   ossimRefPtr<ossimImageData> imageSourceData, ossimRefPtr<ossimImageData> maskSourceData)
+{
+   if(maskSourceData->getScalarType() != OSSIM_UCHAR)
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "ossimMaskFilter::executeMaskFilterBinary WARNING: Only uchar masks are supported" << endl;
+      return imageSourceData;
+   }
+   
+   switch(imageSourceData->getScalarType())
+   {
+      case OSSIM_UCHAR:
+      {
+         executeMaskFilterBinarySelection((ossim_uint8)0,
+                                          (ossim_uint8)0,
+                                          imageSourceData,
+                                          maskSourceData);
+         break;
+      }
+      case OSSIM_USHORT11:
+      case OSSIM_USHORT16:
+      {
+         executeMaskFilterBinarySelection((ossim_uint16)0,
+                                          (ossim_uint8)0,
+                                          imageSourceData,
+                                          maskSourceData);
+         break;
+      }
+      case OSSIM_SSHORT16:
+      {
+         executeMaskFilterBinarySelection((ossim_sint16)0,
+                                          (ossim_uint8)0,
+                                          imageSourceData,
+                                          maskSourceData);
+         break;
+      }
+      case OSSIM_FLOAT:
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         executeMaskFilterBinarySelection((float)0,
+                                          (ossim_uint8)0,
+                                          imageSourceData,
+                                          maskSourceData);
+         break;
+      }
+      case OSSIM_DOUBLE:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         executeMaskFilterBinarySelection((double)0,
+                                          (ossim_uint8)0,
+                                          imageSourceData,
+                                          maskSourceData);
+         break;
+      }
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "ossimMaskFilter::executeMaskFilterBinary WARNING: Unknown scalar type" << endl;
+         break;
+      }
+   }
+
+   return theTile;
+}
+
+template <class inputT, class maskT>
+ossimRefPtr<ossimImageData> ossimMaskFilter::executeMaskFilterSelection(
+   inputT /* dummyInput */,
+   maskT  /* dummyMask */,
+   ossimRefPtr<ossimImageData> imageSourceData,
+   ossimRefPtr<ossimImageData> maskSourceData)
+{
+   ossimDataObjectStatus maskDataStatus  = maskSourceData->getDataObjectStatus();
+   ossimDataObjectStatus inputDataStatus = imageSourceData->getDataObjectStatus();
+
+   // First just check if mask is full, which means pass the image source along untouched:
+   if (maskDataStatus == OSSIM_FULL)
+   {
+      theTile = imageSourceData;
+      return theTile;
+   }
+
+   // Then check for a total mask (all mask values are 0) and return empty tile if so:
+   if( (maskDataStatus == OSSIM_NULL) || (maskDataStatus == OSSIM_EMPTY))
+   {
+      theTile->makeBlank();
+      return theTile;
+   }
+
+   // Finally check for blank source tile and return it if so:
+   if( (inputDataStatus == OSSIM_NULL) || (inputDataStatus == OSSIM_EMPTY))
+   {
+      theTile->makeBlank();
+      return theTile;
+   }
+
+   ossim_uint32 maskBands  = maskSourceData->getNumberOfBands();
+   ossim_uint32 inputBands = imageSourceData->getNumberOfBands();
+   if(maskBands&&inputBands)
+   {
+      ossim_uint32 maxOffset = theTile->getWidth()*theTile->getHeight();
+      for(ossim_uint32 band = 0; band < inputBands; ++band)
+      {
+         maskT*  bufMask = static_cast<maskT*> ( maskSourceData->getBuf() );
+         inputT* bufIn   = static_cast<inputT*>( imageSourceData->getBuf(band) );
+         inputT* bufOut  = static_cast<inputT*>( theTile->getBuf(band) );
+         inputT  nullPix = static_cast<inputT> ( theTile->getNullPix(band) );
+         inputT  minPix  = static_cast<inputT> ( theTile->getMinPix(band) );
+         ossim_uint32 offset = 0;
+         for(offset = 0; offset < maxOffset; ++offset)
+         {
+            if(*bufMask)
+            {
+               if ( theMaskType == OSSIM_MASK_TYPE_SELECT )
+               {
+                  *bufOut = *bufIn;
+               }
+               else
+               {
+                  //---
+                  // OSSIM_MASK_TYPE_SELECT_CLAMP_MIN
+                  // Use input pixel clamping any nulls to min.
+                  //---
+                  *bufOut = *bufIn != nullPix ? *bufIn : minPix;
+               }
+            }
+            else
+            {
+               *bufOut = nullPix;
+            }
+            ++bufOut;
+            ++bufIn;
+            ++bufMask;
+         }
+      }
+      theTile->validate();
+   }
+   
+   return theTile;
+}
+
+template <class inputT, class maskT>
+ossimRefPtr<ossimImageData> ossimMaskFilter::executeMaskFilterInvertSelection(
+   inputT /* dummyInput */,
+   maskT  /* dummyMask */,
+   ossimRefPtr<ossimImageData> imageSourceData,
+   ossimRefPtr<ossimImageData> maskSourceData)
+{
+   ossimDataObjectStatus maskDataStatus  = maskSourceData->getDataObjectStatus();
+   ossimDataObjectStatus inputDataStatus = imageSourceData->getDataObjectStatus();
+
+   // First just check if mask is empty, which means pass the image source along untouched:
+   if( (maskDataStatus == OSSIM_NULL) || (maskDataStatus == OSSIM_EMPTY))
+   {
+      theTile = imageSourceData;
+      return theTile;
+   }
+
+   // Then check for a total mask (all mask values are 1) and return empty tile if so:
+   if (maskDataStatus == OSSIM_FULL)
+   {
+      theTile->makeBlank();
+      return theTile;
+   }
+
+   // Finally check for blank source tile and return it if so:
+   if( (inputDataStatus == OSSIM_NULL) || (inputDataStatus == OSSIM_EMPTY))
+   {
+      theTile->makeBlank();
+      return theTile;
+   }
+
+   ossim_uint32 maskBands  = maskSourceData->getNumberOfBands();
+   ossim_uint32 inputBands = imageSourceData->getNumberOfBands();
+   if(maskBands&&inputBands)
+   {
+      ossim_uint32 maxOffset = theTile->getWidth()*theTile->getHeight();
+      for(ossim_uint32 band = 0; band < inputBands; ++band)
+      {
+         maskT*    bufMask = (maskT*)maskSourceData->getBuf();
+         inputT* bufIn     = (inputT*)imageSourceData->getBuf(band);
+         inputT* bufOut    = (inputT*)theTile->getBuf(band);
+         inputT  np        = (inputT)theTile->getNullPix(band);
+         ossim_uint32 offset = 0;
+         for(offset = 0; offset < maxOffset; ++offset)
+         {
+            if(!*bufMask)
+            {
+               *bufOut = *bufIn;
+            }
+            else
+            {
+               *bufOut = np;
+            }
+            ++bufOut;
+            ++bufIn;
+            ++bufMask;
+         }
+      }
+      theTile->validate();
+   }
+   
+   return theTile;
+}
+
+template <class inputT, class maskT>
+ossimRefPtr<ossimImageData> ossimMaskFilter::executeMaskFilterWeighted(
+   inputT /* dummyInput */,
+   maskT  /* dummyMask */,
+   ossimRefPtr<ossimImageData> imageSourceData,
+   ossimRefPtr<ossimImageData> maskSourceData)
+{
+   ossimDataObjectStatus maskDataStatus  = maskSourceData->getDataObjectStatus();
+   ossimDataObjectStatus inputDataStatus = imageSourceData->getDataObjectStatus();
+
+   if( (maskDataStatus == OSSIM_NULL)||
+       (maskDataStatus == OSSIM_EMPTY))
+   {
+      theTile->makeBlank();
+      return theTile;
+   }
+   if( (inputDataStatus == OSSIM_NULL)||
+       (inputDataStatus == OSSIM_EMPTY))
+   {
+      return theTile;
+   }
+   
+   ossim_uint32 maskBands  = maskSourceData->getNumberOfBands();
+   ossim_uint32 inputBands = imageSourceData->getNumberOfBands();
+   if(maskBands&&inputBands)
+   {
+      ossim_uint32 maxOffset = theTile->getWidth()*theTile->getHeight();
+      for(ossim_uint32 band = 0; band < inputBands; ++band)
+      {
+         maskT*    bufMask = (maskT*)maskSourceData->getBuf();
+         inputT* bufIn     = (inputT*)imageSourceData->getBuf(band);
+         inputT* bufOut    = (inputT*)theTile->getBuf(band);
+         inputT  np        = (inputT)theTile->getNullPix(band);
+         inputT  minp      = (inputT)theTile->getMinPix(band);
+         ossim_uint32 offset = 0;
+
+         if(inputDataStatus == OSSIM_PARTIAL)
+         {
+            for(offset = 0; offset < maxOffset; ++offset)
+            {
+               if(*bufIn != np)
+               {
+                  *bufOut = (inputT)((*bufIn)*((double)(*bufMask)/255.0));
+                  if((*bufOut != np)&&
+                     (*bufOut < minp))
+                  {
+                     *bufOut = minp;
+                  }
+               }
+               else
+               {
+                  *bufOut = np;
+               }
+               ++bufOut;
+               ++bufIn;
+               ++bufMask;
+            }
+         }
+         else
+         {
+            for(offset = 0; offset < maxOffset; ++offset)
+            {
+               *bufOut = (inputT)((*bufIn)*((double)(*bufMask)/255.0));
+               if((*bufOut != np)&&
+                  (*bufOut < minp))
+               {
+                  *bufOut = minp;
+               }
+               ++bufOut;
+               ++bufIn;
+               ++bufMask;
+            }
+         }
+      }
+      theTile->validate();
+   }
+   
+   return theTile;
+}
+
+template <class inputT, class maskT>
+ossimRefPtr<ossimImageData> ossimMaskFilter::executeMaskFilterBinarySelection(
+   inputT /* dummyInput */,
+   maskT  /* dummyMask  */ ,
+   ossimRefPtr<ossimImageData> imageSourceData,
+   ossimRefPtr<ossimImageData> maskSourceData)
+{
+   ossim_uint32 maskBands  = maskSourceData->getNumberOfBands();
+   ossim_uint32 inputBands = imageSourceData->getNumberOfBands();
+   if(maskBands&&inputBands)
+   {
+      ossim_uint32 maxOffset = theTile->getWidth()*theTile->getHeight();
+      for(ossim_uint32 band = 0; band < inputBands; ++band)
+      {
+         maskT*  bufMask   = (maskT*)maskSourceData->getBuf();
+         inputT* bufOut    = (inputT*)theTile->getBuf(band);
+         const inputT  NP  = (inputT)theTile->getNullPix(band);
+         const inputT  MP  = (inputT)theTile->getMaxPix(band);
+         ossim_uint32 offset = 0;
+         for(offset = 0; offset < maxOffset; ++offset)
+         {
+            if (theMaskType == OSSIM_MASK_TYPE_BINARY_INVERSE)
+            {
+               if(*bufMask)      // if mask == 1
+                  *bufOut = MP;  // set to max pix
+               else              // if mask == 0
+                  *bufOut = NP;  // set to null pix
+            }
+            else
+            {
+               if(*bufMask)      // if mask == 1
+                  *bufOut = NP;  // set to null pix
+               else              // if mask == 0
+                  *bufOut = MP;  // set to max pix
+            }
+            ++bufOut;
+            ++bufMask;
+         }
+      }
+      theTile->validate();
+   }
+   
+   return theTile;
+}
+
+void ossimMaskFilter::setMaskType(ossimFileSelectionMaskType type)
+{
+   theMaskType = type;
+}
+
+void ossimMaskFilter::setMaskType(const ossimString& type)
+{
+   if(type != "")
+   {
+      ossimString maskType = type;
+      maskType.downcase();
+
+      if(maskType == "select")
+      {
+         theMaskType = OSSIM_MASK_TYPE_SELECT;
+      }
+      else if(maskType == "invert")
+      {
+         theMaskType = OSSIM_MASK_TYPE_INVERT;
+      }
+      else if(maskType == "weighted")
+      {
+         theMaskType = OSSIM_MASK_TYPE_WEIGHTED;
+      }
+      else if(maskType == "binary")
+      {
+         theMaskType = OSSIM_MASK_TYPE_BINARY;
+      }
+      else if(maskType == "binary_inverse")
+      {
+         theMaskType = OSSIM_MASK_TYPE_BINARY_INVERSE;
+      }
+      else if(maskType == "select_clamp_min")
+      {
+         theMaskType = OSSIM_MASK_TYPE_SELECT_CLAMP_MIN;
+      } 
+   }
+}
+
+ossimMaskFilter::ossimFileSelectionMaskType ossimMaskFilter::getMaskType()const
+{
+   return theMaskType;
+}
+
+ossimString ossimMaskFilter::getMaskTypeString() const
+{
+   ossimString maskType;
+   
+   switch(theMaskType)
+   {
+      case OSSIM_MASK_TYPE_SELECT:
+      {
+         maskType = "select";
+         break;
+      }
+      case OSSIM_MASK_TYPE_INVERT:
+      {
+         maskType = "invert";
+         break;
+      }
+      case OSSIM_MASK_TYPE_WEIGHTED:
+      {
+         maskType = "weighted";
+         break;
+      }
+      case OSSIM_MASK_TYPE_BINARY:
+      {
+         maskType = "binary";
+         break;
+      }
+      case OSSIM_MASK_TYPE_BINARY_INVERSE:
+      {
+         maskType = "binary_inverse";
+         break;
+      }
+      case OSSIM_MASK_TYPE_SELECT_CLAMP_MIN:
+      {
+         maskType = "select_clamp_min";
+         break;
+      }
+   }
+
+   return maskType;
+}
+
+bool ossimMaskFilter::loadState(const ossimKeywordlist& kwl,
+                                const char* prefix)
+{
+   bool result = ossimImageSource::loadState(kwl, prefix);
+   
+   theInputListIsFixedFlag  = true;
+   theOutputListIsFixedFlag = false;
+   setNumberOfInputs(2);
+
+   const char* lookup = kwl.find(prefix, MASK_FILTER_MASK_TYPE_KW);
+   if (lookup)
+   {
+      setMaskType(ossimString(lookup));
+   }
+
+   return result;
+}
+
+bool ossimMaskFilter::saveState(ossimKeywordlist& kwl,
+                                const char* prefix)const
+{
+   kwl.add(prefix,
+           MASK_FILTER_MASK_TYPE_KW,
+           getMaskTypeString().c_str(),
+           true);
+   
+   return ossimImageSource::saveState(kwl, prefix);
+}
+
+void ossimMaskFilter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if( property.valid() )
+   {
+      if(property->getName() == MASK_FILTER_MASK_TYPE_KW)
+      {
+         setMaskType(property->valueToString());
+      }
+      else
+      {
+         ossimImageSource::setProperty(property);
+      }
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimMaskFilter::getProperty(
+   const ossimString& name)const
+{
+   ossimRefPtr<ossimProperty> result = 0;
+   
+   if(name == MASK_FILTER_MASK_TYPE_KW)
+   {
+      std::vector<ossimString> constraintList;
+      constraintList.push_back(ossimString("select"));
+      constraintList.push_back(ossimString("invert"));
+      constraintList.push_back(ossimString("weighted"));
+      
+      result = new ossimStringProperty(MASK_FILTER_MASK_TYPE_KW,
+                                       getMaskTypeString(),
+                                       false,
+                                       constraintList);
+   }
+   else
+   {
+      result = ossimImageSource::getProperty(name);
+   }
+   return result;
+}
+
+void ossimMaskFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageSource::getPropertyNames(propertyNames);
+   propertyNames.push_back(MASK_FILTER_MASK_TYPE_KW);
+}
+
+ossim_uint32 ossimMaskFilter::getNumberOfInputBands() const
+{
+   ossimImageSource* img_source = PTR_CAST(ossimImageSource, getInput());
+   if (img_source)
+      return img_source->getNumberOfInputBands();
+   return 0;
+}
+
+
diff --git a/ossim/src/ossim/imaging/ossimMaxMosaic.cpp b/ossim/src/ossim/imaging/ossimMaxMosaic.cpp
new file mode 100644
index 0000000..fd18d14
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimMaxMosaic.cpp
@@ -0,0 +1,556 @@
+//*******************************************************************
+// Copyright (C) 2005 SANZ Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Kenneth Melero (kmelero at sanz.com)
+//
+// Description: This combiner is designed to "float" the maximum pixel value
+//              of all inputs to top of the mosaic output. 
+//
+//*************************************************************************
+// $Id: ossimMaxMosaic.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimMaxMosaic.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimTrace.h>
+
+static const ossimTrace traceDebug("ossimMaxMosaic:debug");
+
+using namespace std;
+
+RTTI_DEF1(ossimMaxMosaic, "ossimMaxMosaic", ossimImageCombiner)
+ossimMaxMosaic::ossimMaxMosaic()
+   :ossimImageCombiner(),
+    theTile(NULL)
+{
+}
+
+ossimMaxMosaic::ossimMaxMosaic(ossimConnectableObject::ConnectableObjectList& inputSources)
+    : ossimImageCombiner(inputSources),
+      theTile(NULL)
+{
+}
+
+
+ossimMaxMosaic::~ossimMaxMosaic()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimMaxMosaic::getTile(
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   long size = getNumberOfInputs();
+   ossim_uint32 layerIdx = 0;
+   // If there is only one in the mosaic then just return it.
+   if(size == 1)
+   {
+      return getNextTile(layerIdx, 0, tileRect, resLevel);
+   }
+   
+   ossimIpt origin = tileRect.ul();
+   ossim_uint32 w = tileRect.width();
+   ossim_uint32 h = tileRect.height();
+   
+   if(!theTile.valid())
+   {
+      // First time through...
+      allocate();
+
+      // If we still don't have a buffer then we will leave.
+      if(!theTile.valid())
+      {
+         return ossimRefPtr<ossimImageData>();
+      }
+   }
+   
+   ossim_uint32 tileW = theTile->getWidth();
+   ossim_uint32 tileH = theTile->getHeight();
+   if((w != tileW)||
+      (h != tileH))
+   {
+      theTile->setWidth(w);
+      theTile->setHeight(h);
+      if((w*h)!=(tileW*tileH))
+      {
+         theTile->initialize();
+      }
+   }
+   theTile->setOrigin(origin);
+
+   //---
+   // General Note:
+   //
+   // Note: I will not check for disabled or enabled since we have
+   // no clear way to handle this within a mosaic. The default will be
+   // to do a simple a A over B type mosaic.  Derived classes should
+   // check for the enabled and disabled and always
+   // use this default implementation if they are disabled.
+   //---
+   theTile->setOrigin(origin);
+   theTile->makeBlank();
+   switch(theTile->getScalarType())
+   {
+      case OSSIM_UCHAR:
+      {
+         if(!hasDifferentInputs())
+         {
+            return combine(static_cast<ossim_uint8>(0),
+                           tileRect,
+                           resLevel);
+         }
+         else
+         {
+            return combineNorm(static_cast<ossim_uint8>(0),
+                               tileRect,
+                               resLevel);
+         }
+      }
+      case OSSIM_SINT8:
+      {
+         if(!hasDifferentInputs())
+         {
+            return combine(static_cast<ossim_sint8>(0),
+                           tileRect,
+                           resLevel);
+         }
+         else
+         {
+            return combineNorm(static_cast<ossim_sint8>(0),
+                               tileRect,
+                               resLevel);
+         }
+      }
+      case OSSIM_FLOAT: 
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         if(!hasDifferentInputs())
+         {
+            return combine(static_cast<float>(0),
+                           tileRect,
+                           resLevel);
+         }
+         else
+         {
+            return combineNorm(static_cast<float>(0),
+                               tileRect,
+                               resLevel);
+         }
+      }
+      case OSSIM_USHORT16:
+      case OSSIM_USHORT11:
+      {
+         if(!hasDifferentInputs())
+         {
+            return combine(static_cast<ossim_uint16>(0),
+                           tileRect,
+                           resLevel);
+         }
+         else
+         {
+            return combineNorm(static_cast<ossim_uint16>(0),
+                               tileRect,
+                               resLevel);
+         }
+      }
+      case OSSIM_SSHORT16:
+      {
+         if(!hasDifferentInputs())
+         {
+            return combine(static_cast<ossim_sint16>(0),
+                           tileRect,
+                           resLevel);
+         }
+         else
+         {
+            return combineNorm(static_cast<ossim_sint16>(0),
+                               tileRect,
+                               resLevel);
+         }
+      }
+      case OSSIM_SINT32:
+      {
+         if(!hasDifferentInputs())
+         {
+            return combine(static_cast<ossim_sint32>(0),
+                           tileRect,
+                           resLevel);
+         }
+         else
+         {
+            return combineNorm(static_cast<ossim_sint32>(0),
+                               tileRect,
+                               resLevel);
+         }
+      }
+      case OSSIM_UINT32:
+      {
+         if(!hasDifferentInputs())
+         {
+            return combine(static_cast<ossim_uint32>(0),
+                           tileRect,
+                           resLevel);
+         }
+         else
+         {
+            return combineNorm(static_cast<ossim_uint32>(0),
+                               tileRect,
+                               resLevel);
+         }
+      }
+      case OSSIM_DOUBLE:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         if(!hasDifferentInputs())
+         {
+            return combine(static_cast<double>(0),
+                           tileRect,
+                           resLevel);
+         }
+         else
+         {
+            return combineNorm(static_cast<double>(0),
+                               tileRect,
+                               resLevel);
+         }
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "Scalar type = " << theTile->getScalarType()
+            << " Not supported by ossimMaxMosaic" << endl;
+      }
+   }
+
+   return ossimRefPtr<ossimImageData>();
+}
+
+void ossimMaxMosaic::initialize()
+{
+  ossimImageCombiner::initialize();
+  theTile = NULL;
+}
+
+void ossimMaxMosaic::allocate()
+{
+   theTile = NULL;
+   
+   if( (getNumberOfInputs() > 0) && getInput(0) )
+   {
+      theTile = ossimImageDataFactory::instance()->create(this, this);
+      theTile->initialize();
+   }
+}
+
+bool ossimMaxMosaic::saveState(ossimKeywordlist& kwl,
+                                 const char* prefix)const
+{
+   return ossimImageCombiner::saveState(kwl, prefix);
+}
+
+bool ossimMaxMosaic::loadState(const ossimKeywordlist& kwl,
+                                 const char* prefix)
+{
+   return ossimImageCombiner::loadState(kwl, prefix);
+}
+
+template <class T> ossimRefPtr<ossimImageData> ossimMaxMosaic::combineNorm(
+   T,// dummy template variable 
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   ossim_uint32 layerIdx = 0;
+   ossimRefPtr<ossimImageData> destination = theTile;
+   
+   ossimRefPtr<ossimImageData> currentImageData =
+      getNextNormTile(layerIdx, 0, tileRect, resLevel);
+      
+   if(!currentImageData)
+   {
+      return currentImageData;
+   }
+   
+   std::vector<float*> srcBands(theLargestNumberOfInputBands); 
+   std::vector<float> srcBandsNullPix(theLargestNumberOfInputBands); 
+   std::vector<T*> destBands(theLargestNumberOfInputBands);
+   std::vector<T> destBandsNullPix(theLargestNumberOfInputBands);
+   std::vector<T> destBandsMinPix(theLargestNumberOfInputBands);
+   std::vector<T> destBandsMaxPix(theLargestNumberOfInputBands);
+   //float** srcBands        = new float*[theLargestNumberOfInputBands];
+   //float* srcBandsNullPix  = new float[theLargestNumberOfInputBands];
+   //T** destBands = new T*[theLargestNumberOfInputBands];
+   //T* destBandsNullPix = new T[theLargestNumberOfInputBands];
+   //T* destBandsMinPix = new T[theLargestNumberOfInputBands];
+   //T* destBandsMaxPix = new T[theLargestNumberOfInputBands];
+      
+   ossim_uint32 band;
+   ossim_uint32 upperBound = destination->getWidth()*destination->getHeight();
+   ossim_uint32 minNumberOfBands = currentImageData->getNumberOfBands();
+   for(band = 0; band < minNumberOfBands; ++band)
+   {
+      srcBands[band]  = static_cast<float*>(currentImageData->getBuf(band));
+      srcBandsNullPix[band]  = static_cast<float>(currentImageData->getNullPix(band));
+      
+      destBands[band] = static_cast<T*>(theTile->getBuf(band));
+      destBandsNullPix[band] = static_cast<T>(theTile->getNullPix(band));
+      destBandsMinPix[band] = static_cast<T>(theTile->getMinPix(band));
+      destBandsMaxPix[band] = static_cast<T>(theTile->getMaxPix(band));
+   }
+   // if the src is smaller than the destination in number
+   // of bands we will just duplicate the last band.
+   for(;band < theLargestNumberOfInputBands; ++band)
+   {
+      srcBands[band]  = static_cast<float*>(srcBands[minNumberOfBands - 1]);
+      srcBandsNullPix[band] = static_cast<float>(currentImageData->getNullPix(minNumberOfBands - 1));
+      
+      destBands[band] = static_cast<T*>(theTile->getBuf(band));
+      destBandsNullPix[band] = static_cast<T>(theTile->getNullPix(band));
+      destBandsMinPix[band] = static_cast<T>(theTile->getMinPix(band));
+      destBandsMaxPix[band] = static_cast<T>(theTile->getMaxPix(band));
+   }
+   // most of the time we will not overlap so let's
+   // copy the first tile into destination and check later.
+   //
+   ossim_uint32 tempBandIdx = 0;
+   for(band = 0; band < theTile->getNumberOfBands();++band)
+   {
+      if(band < currentImageData->getNumberOfBands())
+      {
+         theTile->copyNormalizedBufferToTile(band,
+                                             (float*)currentImageData->getBuf(band));
+         ++tempBandIdx;
+      }
+      else
+      {
+         if(tempBandIdx)
+         {
+            theTile->copyNormalizedBufferToTile(band,
+                                                (float*)currentImageData->getBuf(tempBandIdx-1));
+         }
+      }
+   }
+   destination->validate();
+   
+   currentImageData = getNextNormTile(layerIdx, tileRect, resLevel);
+
+   while(currentImageData.valid())
+   {  
+      ossim_uint32 minNumberOfBands           = currentImageData->getNumberOfBands();
+      ossimDataObjectStatus currentStatus     = currentImageData->getDataObjectStatus();
+      ossimDataObjectStatus destinationStatus = destination->getDataObjectStatus();
+      
+      if(destinationStatus == OSSIM_FULL)
+      {
+         return destination;
+      }
+      for(band = 0; band < minNumberOfBands; ++band)
+      {
+         srcBands[band]        = static_cast<float*>(currentImageData->getBuf(band));
+         srcBandsNullPix[band] = static_cast<float>(currentImageData->getNullPix(band));
+      }
+      // if the src is smaller than the destination in number
+      // of bands we will just duplicate the last band.
+      for(;band < theLargestNumberOfInputBands; ++band)
+      {
+         srcBands[band] = srcBands[minNumberOfBands - 1];
+         srcBandsNullPix[band] = static_cast<T>(currentImageData->getNullPix(minNumberOfBands - 1));
+      }
+
+      if((destinationStatus == OSSIM_EMPTY)&&
+         (currentStatus     != OSSIM_EMPTY)&&
+         (currentStatus     != OSSIM_NULL))
+      {
+         ossim_uint32 upperBound = destination->getWidth()*destination->getHeight();
+         for(band=0; band < theLargestNumberOfInputBands; ++band)
+         {
+            float delta = destBandsMaxPix[band] - destBandsMinPix[band];
+            float minP  = destBandsMinPix[band];
+            for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+            {
+               destBands[band][offset] = (T)( minP + delta*srcBands[band][offset]);
+            }
+         }
+      }
+      else if((destinationStatus == OSSIM_PARTIAL)&&
+              (currentStatus     != OSSIM_EMPTY)&&
+              (currentStatus     != OSSIM_NULL))
+      {
+         for(band = 0; band < theLargestNumberOfInputBands; ++band)
+         {
+            
+            float delta = destBandsMaxPix[band] - destBandsMinPix[band];
+            float minP  = destBandsMinPix[band];
+            for(ossim_uint32 offset = 0;
+                offset < upperBound;
+                ++offset)
+            {
+               
+               if(destBands[band][offset] == destBandsNullPix[band])
+               {
+                  destBands[band][offset] = (T)(minP + delta*srcBands[band][offset]);
+               }
+            }
+         }
+      }
+      destination->validate();
+      
+      currentImageData = getNextNormTile(layerIdx, tileRect, resLevel);
+   }
+   // Cleanup...
+  // delete [] srcBands;
+  // delete [] srcBandsNullPix;
+  // delete [] destBands;
+  // delete [] destBandsNullPix;
+  // delete [] destBandsMinPix;
+  // delete [] destBandsMaxPix;
+
+   return destination;
+}
+
+template <class T> ossimRefPtr<ossimImageData> ossimMaxMosaic::combine(
+   T,// dummy template variable 
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   ossim_uint32 layerIdx = 0;
+   ossimRefPtr<ossimImageData> destination = theTile;
+   
+   ossimRefPtr<ossimImageData> currentImageData = getNextTile(layerIdx, 0, tileRect, resLevel);
+   if(!currentImageData)
+   {   
+      return currentImageData;
+   }  
+
+   T** srcBands         = new T*[theLargestNumberOfInputBands];
+   T*  srcBandsNullPix  = new T[theLargestNumberOfInputBands];
+   T** destBands        = new T*[theLargestNumberOfInputBands];
+   T*  destBandsNullPix = new T[theLargestNumberOfInputBands];
+      
+   ossim_uint32 band;
+   ossim_uint32 upperBound = destination->getWidth()*destination->getHeight();
+   ossim_uint32 bandIndex  = 0;
+
+   ossim_uint32 offset=0;
+   ossim_uint32 minNumberOfBands = currentImageData->getNumberOfBands();
+   for(band = 0; band < minNumberOfBands; ++band)
+   {
+      srcBands[band]  = static_cast<T*>(currentImageData->getBuf(band));
+      destBands[band] = static_cast<T*>(theTile->getBuf(band));
+      srcBandsNullPix[band]  = static_cast<T>(currentImageData->getNullPix(band));
+      destBandsNullPix[band] = static_cast<T>(theTile->getNullPix(band));
+   }
+   // if the src is smaller than the destination in number
+   // of bands we will just duplicate the last band.
+   for(;band < theLargestNumberOfInputBands; ++band)
+   {
+      srcBands[band]  = static_cast<T*>(srcBands[minNumberOfBands - 1]);
+      destBands[band] = static_cast<T*>(theTile->getBuf(band));
+      srcBandsNullPix[band] = static_cast<T>(currentImageData->getNullPix(minNumberOfBands - 1));
+      destBandsNullPix[band] = static_cast<T>(theTile->getNullPix(band));
+   }
+   // most of the time we will not overlap so let's
+   // copy the first tile into destination and check later.
+   //
+   for(band = 0; band < theTile->getNumberOfBands();++band)
+   {
+      T* destBand = destBands[band];
+      T* srcBand  = srcBands[band];
+      if(destBand&&srcBand)
+      {
+         for(offset = 0; offset < upperBound;++offset)
+         {
+            *destBand = *srcBand;
+            ++srcBand; ++destBand;
+         }
+      }
+   }
+   destination->setDataObjectStatus(currentImageData->getDataObjectStatus());
+
+   currentImageData = getNextTile(layerIdx,
+                                  tileRect,
+                                  resLevel);
+
+   while(currentImageData.valid())
+   {  
+      ossim_uint32 minNumberOfBands           = currentImageData->getNumberOfBands();
+      ossimDataObjectStatus currentStatus     = currentImageData->getDataObjectStatus();
+      ossimDataObjectStatus destinationStatus = destination->getDataObjectStatus();
+      
+      for(band = 0; band < minNumberOfBands; ++band)
+      {
+         srcBands[band]        = static_cast<T*>(currentImageData->getBuf(band));
+         srcBandsNullPix[band] = static_cast<T>(currentImageData->getNullPix(band));
+      }
+      // if the src is smaller than the destination in number
+      // of bands we will just duplicate the last band.
+      for(;band < theLargestNumberOfInputBands; ++band)
+      {
+         srcBands[band] = srcBands[minNumberOfBands - 1];
+         srcBandsNullPix[band] = static_cast<T>(currentImageData->getNullPix(minNumberOfBands - 1));
+      }
+
+      if((destinationStatus == OSSIM_PARTIAL)&&
+	 (currentStatus     != OSSIM_EMPTY)&&
+	 (currentStatus     != OSSIM_NULL))
+      {
+         for(bandIndex = 0; bandIndex < theLargestNumberOfInputBands; ++bandIndex)
+         {
+	      
+            for(ossim_uint32 offset = 0;
+                offset < upperBound;
+                ++offset)
+            {
+               if(srcBands[bandIndex][offset] > destBands[bandIndex][offset])
+               {
+                  destBands[bandIndex][offset] = srcBands[bandIndex][offset];
+               }
+            }
+         }
+      }
+      else
+      {
+         ossim_uint32 upperBound = destination->getWidth()*destination->getHeight();
+         for(ossim_uint32 band=0; band < theLargestNumberOfInputBands; ++band)
+         {
+            for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
+            {
+               if(srcBands[band][offset] > destBands[band][offset])
+               {
+                  destBands[band][offset] = srcBands[band][offset];
+               }
+            }
+         }
+      }
+      
+      destination->validate();
+      
+      currentImageData = getNextTile(layerIdx,tileRect, resLevel);
+   }
+   // Cleanup...
+   delete [] srcBands;
+   delete [] srcBandsNullPix;
+   delete [] destBands;
+   delete [] destBandsNullPix;
+   return destination;
+}
+
+ossimString ossimMaxMosaic::getShortName()const
+{
+   return ossimString("ossimMaxMosaic");
+}
+
+ossimString ossimMaxMosaic::getLongName()const
+{
+   return ossimString("Max Mosaic");
+}
+
+ossimString ossimMaxMosaic::getDescription()const
+{
+   return ossimString("Combiner which puts maximum dn value on image.");
+}
+
diff --git a/ossim/src/ossim/imaging/ossimMeanMedianFilter.cpp b/ossim/src/ossim/imaging/ossimMeanMedianFilter.cpp
new file mode 100644
index 0000000..026d7e0
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimMeanMedianFilter.cpp
@@ -0,0 +1,931 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimMeanMedianFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimMeanMedianFilter.h>
+#include <ossim/base/ossimNumericProperty.h>
+#include <ossim/base/ossimBooleanProperty.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <vector>
+#include <algorithm>
+#include <numeric>
+using namespace std;
+
+
+RTTI_DEF1(ossimMeanMedianFilter,
+          "ossimMeanMedianFilter",
+          ossimImageSourceFilter);
+
+// Keywords used throughout.
+static const ossimString WINDOW_SIZE_KW = "window_size";
+static const ossimString FILTER_TYPE_KW = "filter_type";
+static const ossimString AUTO_GROW_KW   = "auto_grow_rectangle_flag";
+
+ossimMeanMedianFilter::ossimMeanMedianFilter(ossimObject* owner)
+   :ossimImageSourceFilter(owner),
+    theTile(0),
+    theFilterType(OSSIM_MEDIAN),
+    theWindowSize(3),
+    theEnableFillNullFlag(false),
+    theAutoGrowRectFlag(false)
+{
+   setDescription(ossimString("Mean Median Filter"));
+}
+
+ossimMeanMedianFilter::~ossimMeanMedianFilter()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimMeanMedianFilter::getTile(
+   const ossimIrect& rect, ossim_uint32 resLevel)
+{
+   if(!isSourceEnabled())
+   {
+      return ossimImageSourceFilter::getTile(rect, resLevel);
+   }
+
+   ossim_uint32 halfSize = getWindowSize()>>1;
+
+   ossimIrect requestRect(rect.ul().x - halfSize,
+                          rect.ul().y - halfSize,
+                          rect.lr().x + halfSize,
+                          rect.lr().y + halfSize);
+
+   ossimRefPtr<ossimImageData> inputData =
+      ossimImageSourceFilter::getTile(requestRect, resLevel);
+   if(!inputData.valid() || !inputData->getBuf())
+   {
+      return inputData;
+   }
+
+   if(!theTile.valid())
+   {
+      theTile = (ossimImageData*)inputData->dup();
+      theTile->setImageRectangle(rect);
+   }
+   else
+   {
+      theTile->setImageRectangleAndBands(rect, inputData->getNumberOfBands());
+   }
+
+   applyFilter(inputData);
+
+   theTile->setDataObjectStatus(inputData->getDataObjectStatus());
+   if(theEnableFillNullFlag)
+   {
+      theTile->validate();
+   }
+
+   return theTile;
+}
+
+void ossimMeanMedianFilter::setWindowSize(ossim_uint32 windowSize)
+{
+   theWindowSize = windowSize;
+}
+
+ossim_uint32 ossimMeanMedianFilter::getWindowSize()const
+{
+   return theWindowSize;
+}
+
+void ossimMeanMedianFilter::initialize()
+{
+   ossimImageSourceFilter::initialize();
+
+   theTile = NULL;
+}
+
+void ossimMeanMedianFilter::applyFilter(ossimRefPtr<ossimImageData>& input)
+{
+   switch(input->getScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         switch (theFilterType)
+         {
+            case OSSIM_MEDIAN:
+            case OSSIM_MEDIAN_FILL_NULLS:
+               applyMedian(ossim_uint8(0), input);
+               break;
+               
+            case OSSIM_MEDIAN_NULL_CENTER_ONLY:
+               applyMedianNullCenterOnly(ossim_uint8(0), input);
+               break;
+               
+            case OSSIM_MEAN:
+            case OSSIM_MEAN_FILL_NULLS:
+               applyMean(ossim_uint8(0), input);
+               break;
+
+            case OSSIM_MEAN_NULL_CENTER_ONLY:
+               applyMeanNullCenterOnly(ossim_uint8(0), input);
+               
+            default:
+               break;
+         }
+         break;
+      }
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+      {
+         switch (theFilterType)
+         {
+            case OSSIM_MEDIAN:
+            case OSSIM_MEDIAN_FILL_NULLS:
+               applyMedian(ossim_uint16(0), input);
+               break;
+               
+            case OSSIM_MEDIAN_NULL_CENTER_ONLY:
+               applyMedianNullCenterOnly(ossim_uint16(0), input);
+               break;
+               
+            case OSSIM_MEAN:
+            case OSSIM_MEAN_FILL_NULLS:
+               applyMean(ossim_uint16(0), input);
+               break;
+
+            case OSSIM_MEAN_NULL_CENTER_ONLY:
+               applyMeanNullCenterOnly(ossim_uint16(0), input);
+               break;
+               
+            default:
+               break;
+         }
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         switch (theFilterType)
+         {
+            case OSSIM_MEDIAN:
+            case OSSIM_MEDIAN_FILL_NULLS:
+               applyMedian(ossim_sint16(0), input);
+               break;
+               
+            case OSSIM_MEDIAN_NULL_CENTER_ONLY:
+               applyMedianNullCenterOnly(ossim_sint16(0), input);
+               break;
+               
+            case OSSIM_MEAN:
+            case OSSIM_MEAN_FILL_NULLS:
+               applyMean(ossim_sint16(0), input);
+               break;
+
+            case OSSIM_MEAN_NULL_CENTER_ONLY:
+               applyMeanNullCenterOnly(ossim_sint16(0), input);
+               break;
+               
+            default:
+               break;
+         }
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         switch (theFilterType)
+         {
+            case OSSIM_MEDIAN:
+            case OSSIM_MEDIAN_FILL_NULLS:
+               applyMedian(ossim_uint32(0), input);
+               break;
+               
+            case OSSIM_MEDIAN_NULL_CENTER_ONLY:
+               applyMedianNullCenterOnly(ossim_uint32(0), input);
+               break;
+               
+            case OSSIM_MEAN:
+            case OSSIM_MEAN_FILL_NULLS:
+               applyMean(ossim_uint32(0), input);
+               break;
+
+            case OSSIM_MEAN_NULL_CENTER_ONLY:
+               applyMeanNullCenterOnly(ossim_uint32(0), input);
+               break;
+               
+            default:
+               break;
+         }
+      }
+      case OSSIM_FLOAT32:
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         switch (theFilterType)
+         {
+            case OSSIM_MEDIAN:
+            case OSSIM_MEDIAN_FILL_NULLS:
+               applyMedian(ossim_float32(0.0), input);
+               break;
+               
+            case OSSIM_MEDIAN_NULL_CENTER_ONLY:
+               applyMedianNullCenterOnly(ossim_float32(0.0), input);
+               break;
+               
+            case OSSIM_MEAN:
+            case OSSIM_MEAN_FILL_NULLS:
+               applyMean(ossim_float32(0.0), input);
+               break;
+
+            case OSSIM_MEAN_NULL_CENTER_ONLY:
+               applyMeanNullCenterOnly(ossim_float32(0.0), input);
+               break;
+               
+            default:
+               break;
+         }
+         break;
+      }
+      case OSSIM_FLOAT64:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         switch (theFilterType)
+         {
+            case OSSIM_MEDIAN:
+            case OSSIM_MEDIAN_FILL_NULLS:
+               applyMedian(ossim_float64(0.0), input);
+               break;
+               
+            case OSSIM_MEDIAN_NULL_CENTER_ONLY:
+               applyMedianNullCenterOnly(ossim_float64(0.0), input);
+               break;
+               
+            case OSSIM_MEAN:
+            case OSSIM_MEAN_FILL_NULLS:
+               applyMean(ossim_float64(0.0), input);
+               break;
+
+            case OSSIM_MEAN_NULL_CENTER_ONLY:
+               applyMeanNullCenterOnly(ossim_float64(0.0), input);
+               break;
+               
+            default:
+               break;
+         }
+         break;
+      }
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimMeanMedianFilter::applyFilter WARNING:\n"
+            << "Unhandled scalar type!" << endl;
+      }
+   }
+}
+
+template <class T>
+void ossimMeanMedianFilter::applyMean(T /* dummyVariable */,
+                                      ossimRefPtr<ossimImageData>& inputData)
+{
+   ossim_uint32 halfWindow = (theWindowSize >> 1);
+   ossim_uint32 bandIdx = 0;
+   ossim_uint32 x = 0;
+   ossim_uint32 y = 0;
+   ossim_uint32 kernelX   = 0;
+   ossim_uint32 kernelY   = 0;
+   ossim_uint32 kernelIdx = 0;
+   ossim_uint32 iw  = inputData->getWidth();
+   ossim_uint32 ow  = theTile->getWidth();
+   ossim_uint32 oh = theTile->getHeight();
+   ossim_uint32 numberOfBands = ossim::min(theTile->getNumberOfBands(),
+                                         inputData->getNumberOfBands());
+   ossimDataObjectStatus status = inputData->getDataObjectStatus();
+   std::vector<double> values(theWindowSize*theWindowSize);
+
+   if(status == OSSIM_FULL)
+   {
+      for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
+      {
+         T* inputBuf     = (T*)inputData->getBuf(bandIdx);
+         T* outputBuf    = (T*)theTile->getBuf(bandIdx);
+
+         if(inputBuf&&outputBuf)
+         {
+            for(y = 0; y < oh; ++y)
+            {
+               for(x = 0; x < ow; ++x)
+               {
+                  kernelIdx = 0;
+                  for(kernelY = 0; kernelY < theWindowSize; ++kernelY)
+                  {
+                     for(kernelX = 0; kernelX < theWindowSize;++kernelX)
+                     {
+                        values[kernelIdx] = *(inputBuf+kernelX + kernelY*iw);
+                        ++kernelIdx;
+                     }
+                  }
+
+
+                  if(values.size() > 0)
+                  {
+                     double sum = std::accumulate(values.begin(),
+                                                  values.end(),
+                                                  0.0);
+                     double average = sum/(double)values.size();
+                     (*outputBuf) = (T)average;
+                  }
+                  ++inputBuf;
+                  ++outputBuf;
+               }
+
+               inputBuf+=(halfWindow<<1);
+            }
+         }
+      }
+   }
+   else
+   {
+      for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
+      {
+         T* inputBuf     = (T*)inputData->getBuf(bandIdx);
+         T* outputBuf    = (T*)theTile->getBuf(bandIdx);
+         T np            = (T)inputData->getNullPix(bandIdx);
+         if(inputBuf&&outputBuf)
+         {
+            for(y = 0; y < oh; ++y)
+            {
+               for(x = 0; x < ow; ++x)
+               {
+                  values.clear();
+                  for(kernelY = 0; kernelY < theWindowSize; ++kernelY)
+                  {
+                     for(kernelX = 0; kernelX < theWindowSize;++kernelX)
+                     {
+                        T tempValue = *(inputBuf+kernelX + kernelY*iw);
+
+                        if(tempValue != np)
+                        {
+                           values.push_back((double)tempValue);
+                        }
+                     }
+                  }
+
+
+                  if(values.size() > 0)
+                  {
+                     double accumulate = std::accumulate(values.begin(),
+                                                         values.end(),
+                                                         0.0);
+                     double average = accumulate/(double)values.size();
+                     if(*(inputBuf+halfWindow + halfWindow*iw) == np)
+                     {
+                        if(theEnableFillNullFlag)
+                        {
+                           (*outputBuf) = (T)average;
+                        }
+                        else
+                        {
+                           (*outputBuf) = np;
+                        }
+                     }
+                     else
+                     {
+                        (*outputBuf) = (T)average;
+                     }
+                  }
+                  else
+                  {
+                     *outputBuf = np;
+                  }
+                  ++inputBuf;
+                  ++outputBuf;
+               }
+
+               inputBuf+=(halfWindow<<1);
+            }
+         }
+      }
+   }
+}
+
+template <class T> void ossimMeanMedianFilter::applyMeanNullCenterOnly(
+   T /* dummyVariable */,
+   ossimRefPtr<ossimImageData>& inputData)
+{
+   ossim_uint32 halfWindow = (theWindowSize >> 1);
+   ossim_uint32 bandIdx = 0;
+   ossim_uint32 x = 0;
+   ossim_uint32 y = 0;
+   ossim_uint32 kernelX   = 0;
+   ossim_uint32 kernelY   = 0;
+   ossim_uint32 iw  = inputData->getWidth();
+   ossim_uint32 ow  = theTile->getWidth();
+   ossim_uint32 oh = theTile->getHeight();
+   ossim_uint32 numberOfBands = ossim::min(theTile->getNumberOfBands(),
+                                         inputData->getNumberOfBands());
+   ossimDataObjectStatus status = inputData->getDataObjectStatus();
+   std::vector<double> values;
+
+   if(status == OSSIM_FULL)
+   {
+      // Nothing to do just copy the tile.
+      theTile->loadTile(inputData.get());
+   }
+   else
+   {
+      // Partial tile with nulls in it.
+      for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
+      {
+         T* inputBuf     = (T*)inputData->getBuf(bandIdx);
+         T* outputBuf    = (T*)theTile->getBuf(bandIdx);
+         if (!inputBuf || !outputBuf)
+         {
+            return; // Shouldn't happen...
+         }
+         
+         const T NP = (T)inputData->getNullPix(bandIdx);
+
+         for(y = 0; y < oh; ++y)
+         {
+            for(x = 0; x < ow; ++x)
+            {
+               // Get the center input pixel.
+               const T CP = *(inputBuf+halfWindow + halfWindow*iw);
+               if (CP == NP)
+               {
+                  values.clear();
+                  for(kernelY = 0; kernelY < theWindowSize; ++kernelY)
+                  {
+                     for(kernelX = 0; kernelX < theWindowSize;++kernelX)
+                     {
+                        T tempValue = *(inputBuf+kernelX + kernelY*iw);
+                        
+                        if(tempValue != NP)
+                        {
+                           values.push_back((double)tempValue);
+                        }
+                     }
+                  }
+                  
+                  if(values.size() > 0)
+                  {
+                     double accumulate = std::accumulate(values.begin(),
+                                                         values.end(),
+                                                         0.0);
+                     double average = accumulate/(double)values.size();
+                     (*outputBuf) = (T)average;
+                  }
+                  else
+                  {
+                     (*outputBuf) = NP;
+                  }
+                  
+               }
+               else // Center pixel (CP) not null.
+               {
+                  (*outputBuf) = CP;
+               }
+               
+               // Move over...
+               ++inputBuf;
+               ++outputBuf;
+               
+            } // End of loop in x direction.
+
+            // Move down...
+            inputBuf+=(halfWindow<<1);
+            
+         }  // End of loop in y direction.
+         
+      }  // End of band loop.
+      
+   }  // End of else "partial tile" block.
+}
+
+template <class T>
+void ossimMeanMedianFilter::applyMedian(T /* dummyVariable */,
+                                        ossimRefPtr<ossimImageData>& inputData)
+{
+   ossim_uint32 halfWindow = (theWindowSize >> 1);
+   ossim_uint32 bandIdx = 0;
+   ossim_uint32 x = 0;
+   ossim_uint32 y = 0;
+   ossim_uint32 kernelX   = 0;
+   ossim_uint32 kernelY   = 0;
+   ossim_uint32 kernelIdx = 0;
+   ossim_uint32 iw  = inputData->getWidth();
+   ossim_uint32 ow  = theTile->getWidth();
+   ossim_uint32 oh = theTile->getHeight();
+   ossim_uint32 numberOfBands = ossim::min(theTile->getNumberOfBands(),
+                                         inputData->getNumberOfBands());
+   ossimDataObjectStatus status = inputData->getDataObjectStatus();
+   std::vector<T> values(theWindowSize*theWindowSize);
+
+   if(status == OSSIM_FULL)
+   {
+      for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
+      {
+         T* inputBuf     = (T*)inputData->getBuf(bandIdx);
+         T* outputBuf    = (T*)theTile->getBuf(bandIdx);
+
+         if(inputBuf&&outputBuf)
+         {
+            for(y = 0; y < oh; ++y)
+            {
+               for(x = 0; x < ow; ++x)
+               {
+                  kernelIdx = 0;
+                  for(kernelY = 0; kernelY < theWindowSize; ++kernelY)
+                  {
+                     for(kernelX = 0; kernelX < theWindowSize;++kernelX)
+                     {
+                        values[kernelIdx] = *(inputBuf+kernelX + kernelY*iw);
+                        ++kernelIdx;
+                     }
+                  }
+
+                  std::sort(values.begin(),
+                            values.end());
+
+                  if(values.size() > 0)
+                  {
+                     (*outputBuf) = values[values.size()>>1];
+                  }
+                  ++inputBuf;
+                  ++outputBuf;
+               }
+
+               inputBuf+=(halfWindow<<1);
+            }
+         }
+      }
+   }
+   else
+   {
+      for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
+      {
+         T* inputBuf     = (T*)inputData->getBuf(bandIdx);
+         T* outputBuf    = (T*)theTile->getBuf(bandIdx);
+         T np            = (T)inputData->getNullPix(bandIdx);
+         if(inputBuf&&outputBuf)
+         {
+            for(y = 0; y < oh; ++y)
+            {
+               for(x = 0; x < ow; ++x)
+               {
+                  values.clear();
+                  for(kernelY = 0; kernelY < theWindowSize; ++kernelY)
+                  {
+                     for(kernelX = 0; kernelX < theWindowSize;++kernelX)
+                     {
+                        T tempValue = *(inputBuf+kernelX + kernelY*iw);
+
+                        if(tempValue != np)
+                        {
+                           values.push_back(tempValue);
+                        }
+                     }
+                  }
+
+                  std::sort(values.begin(),
+                            values.end());
+
+                  if(values.size() > 0)
+                  {
+                     if(*(inputBuf+halfWindow + halfWindow*iw) == np)
+                     {
+                        if(theEnableFillNullFlag)
+                        {
+                           (*outputBuf) = values[values.size()>>1];
+                        }
+                        else
+                        {
+                           (*outputBuf) = np;
+                        }
+                     }
+                     else
+                     {
+                        (*outputBuf) = values[values.size()>>1];
+                     }
+                  }
+                  else
+                  {
+                     *outputBuf = np;
+                  }
+                  ++inputBuf;
+                  ++outputBuf;
+               }
+
+               inputBuf+=(halfWindow<<1);
+            }
+         }
+      }
+   }
+}
+
+template <class T> void ossimMeanMedianFilter::applyMedianNullCenterOnly (
+   T /* dummyVariable */,
+   ossimRefPtr<ossimImageData>& inputData)
+{
+   ossim_uint32 halfWindow = (theWindowSize >> 1);
+   ossim_uint32 bandIdx = 0;
+   ossim_uint32 x = 0;
+   ossim_uint32 y = 0;
+   ossim_uint32 kernelX   = 0;
+   ossim_uint32 kernelY   = 0;
+   ossim_uint32 iw  = inputData->getWidth();
+   ossim_uint32 ow  = theTile->getWidth();
+   ossim_uint32 oh = theTile->getHeight();
+   ossim_uint32 numberOfBands = ossim::min(theTile->getNumberOfBands(),
+                                         inputData->getNumberOfBands());
+   ossimDataObjectStatus status = inputData->getDataObjectStatus();
+   std::vector<T> values;
+
+   if(status == OSSIM_FULL)
+   {
+      // Nothing to do just copy the tile.
+      theTile->loadTile(inputData.get());
+   }
+   else
+   {
+       // Partial tile with nulls in it.
+      for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
+      {
+         T* inputBuf     = (T*)inputData->getBuf(bandIdx);
+         T* outputBuf    = (T*)theTile->getBuf(bandIdx);
+         if (!inputBuf || !outputBuf)
+         {
+            return; // Shouldn't happen...
+         }
+         
+         const T NP = (T)inputData->getNullPix(bandIdx);
+
+         for(y = 0; y < oh; ++y)
+         {
+            for(x = 0; x < ow; ++x)
+            {
+               // Get the center input pixel.
+               const T CP = *(inputBuf+halfWindow + halfWindow*iw);
+               if (CP == NP)
+               {
+                  values.clear();
+                  for(kernelY = 0; kernelY < theWindowSize; ++kernelY)
+                  {
+                     for(kernelX = 0; kernelX < theWindowSize;++kernelX)
+                     {
+                        T tempValue = *(inputBuf+kernelX + kernelY*iw);
+                        
+                        if(tempValue != NP)
+                        {
+                           values.push_back(tempValue);
+                        }
+                     }
+                  }
+
+                  std::sort(values.begin(),
+                            values.end());
+                  
+                  if(values.size() > 0)
+                  {
+                     (*outputBuf) = values[values.size()>>1];
+                  }
+                  else
+                  {
+                     (*outputBuf) = NP;
+                  }
+               }
+               else // Center pixel (CP) not null.
+               {
+                  (*outputBuf) = CP;
+               }
+
+               // Move over...
+               ++inputBuf;
+               ++outputBuf;
+               
+            }  // End of loop in x direction.
+
+            // Move down...
+            inputBuf+=(halfWindow<<1);
+            
+         }  // End of loop in y direction.
+         
+      }  // End of band loop.
+      
+   }  // End of else "partial tile" block.
+}
+
+void ossimMeanMedianFilter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property.valid())
+   {
+      return;
+   }
+
+   ossimString name = property->getName();
+
+   if (name == WINDOW_SIZE_KW)
+   {
+      theWindowSize = property->valueToString().toUInt32();
+   }
+   else if (name == FILTER_TYPE_KW)
+   {
+      ossimString value = property->valueToString();
+      setFilterType(value);
+   }
+   else if (name == AUTO_GROW_KW)
+   {
+      ossimString value;
+      property->valueToString(value);
+      setAutoGrowRectFlag(value.toBool());
+   }
+   else
+   {
+      ossimImageSourceFilter::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimMeanMedianFilter::getProperty(const ossimString& name)const
+{
+   if (name == WINDOW_SIZE_KW)
+   {
+      ossimProperty* prop =
+         new ossimNumericProperty(WINDOW_SIZE_KW,
+                                  ossimString::toString(theWindowSize),
+                                  3,
+                                  25);
+      prop->setCacheRefreshBit();
+
+      return prop;
+   }
+   else if (name == FILTER_TYPE_KW)
+   {
+      std::vector<ossimString> constraintList;
+      getFilterTypeList(constraintList);
+      ossimString value = getFilterTypeString();
+      ossimProperty* prop = new ossimStringProperty(FILTER_TYPE_KW,
+                                                    value,
+                                                    false,
+                                                    constraintList);
+      prop->setCacheRefreshBit();
+      
+      return prop;
+   }
+   else if (name == AUTO_GROW_KW)
+   {
+      ossimRefPtr<ossimProperty> p = new ossimBooleanProperty(
+         AUTO_GROW_KW, getAutoGrowRectFlag());
+      p->setFullRefreshBit();
+      return p;
+   }
+   return ossimImageSourceFilter::getProperty(name);
+}
+
+void ossimMeanMedianFilter::getPropertyNames(
+   std::vector<ossimString>& propertyNames)const
+{
+   propertyNames.push_back(WINDOW_SIZE_KW);
+   propertyNames.push_back(FILTER_TYPE_KW);
+   propertyNames.push_back(AUTO_GROW_KW);
+
+   ossimImageSourceFilter::getPropertyNames(propertyNames);
+}
+
+bool ossimMeanMedianFilter::saveState(ossimKeywordlist& kwl,
+                                      const char* prefix)const
+{
+   kwl.add(prefix,
+           WINDOW_SIZE_KW.c_str(),
+           theWindowSize,
+           true);
+   kwl.add(prefix,
+           FILTER_TYPE_KW.c_str(),
+           getFilterTypeString(),
+           true);
+   kwl.add(prefix,
+           AUTO_GROW_KW.c_str(),
+           (theAutoGrowRectFlag?"true":"false"),
+           true);   
+
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
+bool ossimMeanMedianFilter::loadState(const ossimKeywordlist& kwl,
+                                      const char* prefix)
+{
+   const char* lookup = NULL;
+   
+   lookup = kwl.find(prefix, WINDOW_SIZE_KW.c_str());
+   if(lookup)
+   {
+      theWindowSize = ossimString(lookup).toUInt32();
+   }
+   
+   lookup = kwl.find(prefix, FILTER_TYPE_KW.c_str());
+   if(lookup)
+   {
+      ossimString type = lookup;
+      setFilterType(type);
+   }
+
+   lookup = kwl.find(prefix, AUTO_GROW_KW.c_str());
+   if(lookup)
+   {
+      ossimString flag = lookup;
+      setAutoGrowRectFlag(flag.toBool());
+   }
+
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+void ossimMeanMedianFilter::setFilterType(ossimMeanMedianFilterType type)
+{
+   theFilterType = type;
+}
+
+void ossimMeanMedianFilter::setFilterType(const ossimString& type)
+{
+   ossimString s = type;
+   s.downcase();
+
+   std::vector<ossimString> list;
+   getFilterTypeList(list);
+   
+   for (ossim_uint32 i = 0; i < list.size(); ++i)
+   {
+      if (s == list[i])
+      {
+         theFilterType = static_cast<ossimMeanMedianFilterType>(i);
+      }
+   }
+
+   if ( (theFilterType == OSSIM_MEDIAN_FILL_NULLS) ||
+        (theFilterType == OSSIM_MEAN_FILL_NULLS) )
+   {
+      theEnableFillNullFlag = true;
+   }
+   else
+   {
+      theEnableFillNullFlag = false;
+   }
+}
+
+void ossimMeanMedianFilter::setAutoGrowRectFlag(bool flag)
+{
+   theAutoGrowRectFlag = flag;
+}
+
+bool ossimMeanMedianFilter::getAutoGrowRectFlag() const
+{
+   return theAutoGrowRectFlag;
+}
+
+ossimString ossimMeanMedianFilter::getFilterTypeString() const
+{
+   std::vector<ossimString> list;
+   getFilterTypeList(list);
+   return list[theFilterType];
+}
+
+void ossimMeanMedianFilter::getFilterTypeList(
+   std::vector<ossimString>& list) const
+{
+   list.resize(OSSIM_MEAN_NULL_CENTER_ONLY+1);
+
+   list[0] = ossimString("median");
+   list[1] = ossimString("median_fill_nulls");
+   list[2] = ossimString("median_null_center_only");
+   list[3] = ossimString("mean");
+   list[4] = ossimString("mean_fill_nulls");
+   list[5] = ossimString("mean_null_center_only");
+}
+
+ossimIrect ossimMeanMedianFilter::getBoundingRect(ossim_uint32 resLevel)const
+{
+   // Get the input rectangle.
+   ossimIrect rect = ossimImageSourceFilter::getBoundingRect(resLevel);
+   if (!theAutoGrowRectFlag || rect.hasNans())
+   {
+      return rect; // Not in autogrow mode or no input connection yet...
+   }
+
+   if ( (theFilterType == OSSIM_MEDIAN_FILL_NULLS)       ||
+        (theFilterType == OSSIM_MEDIAN_NULL_CENTER_ONLY) ||
+        (theFilterType == OSSIM_MEAN_FILL_NULLS)         ||
+        (theFilterType == OSSIM_MEAN_NULL_CENTER_ONLY) )
+   {
+      ossimIpt pt = rect.ul();
+      const ossim_int32 HW = (theWindowSize >> 1); // half window size.
+
+      // Adjust the upper left.
+      pt.x = pt.x-HW;
+      pt.y = pt.y-HW;
+      rect.set_ul(pt);
+
+      // Adjust the lower right.
+      pt = rect.lr();
+      pt.x = pt.x+HW;
+      pt.y = pt.y+HW;
+      rect.set_lr(pt);
+   }
+
+   return rect;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimMemoryImageSource.cpp b/ossim/src/ossim/imaging/ossimMemoryImageSource.cpp
new file mode 100644
index 0000000..1ea36cb
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimMemoryImageSource.cpp
@@ -0,0 +1,246 @@
+//*******************************************************************. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+//
+#include <ossim/imaging/ossimMemoryImageSource.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+RTTI_DEF1(ossimMemoryImageSource, "ossimMemoryImageSource", ossimImageSource);
+
+ossimMemoryImageSource::ossimMemoryImageSource()
+   :ossimImageSource(0, 0, 1, true, false)
+{
+   m_boundingRect.makeNan();
+}
+
+void ossimMemoryImageSource::setImage(ossimRefPtr<ossimImageData> image)
+{
+   m_image = image.get();
+	if(m_image.valid())
+	{
+		m_boundingRect = m_image->getImageRectangle();
+	}
+	else
+	{
+		m_boundingRect.makeNan();
+	}
+   m_result = 0;
+}
+
+void ossimMemoryImageSource::setImage(ossimScalarType scalarType,
+                                      ossim_uint32 numberOfBands,
+                                      ossim_uint32 width,
+                                      ossim_uint32 height)
+{
+   m_image = new ossimImageData(0,
+                                 scalarType,
+                                 numberOfBands,
+                                 width,
+                                 height);
+   m_image->initialize();
+   
+   m_boundingRect = m_image->getImageRectangle();
+   m_result = 0;
+}
+
+void ossimMemoryImageSource::setRect(ossim_uint32 ulx,
+                                     ossim_uint32 uly,
+                                     ossim_uint32 width,
+                                     ossim_uint32 height)
+{
+   if(m_image.valid())
+   {
+      m_image->setImageRectangle(ossimIrect(ulx, uly,
+                                             ulx + (width-1),
+                                             uly + (height-1)));
+      m_boundingRect = m_image->getImageRectangle();
+   }
+}
+
+ossim_uint32 ossimMemoryImageSource::getNumberOfInputBands() const
+{
+   if(m_image.valid())
+   {
+      return m_image->getNumberOfBands();
+   }
+   return 0;;
+}
+
+ossim_uint32 ossimMemoryImageSource::getNumberOfOutputBands() const
+{
+   return getNumberOfInputBands();
+}
+
+ossimScalarType ossimMemoryImageSource::getOutputScalarType() const
+{
+   if(m_image.valid())
+   {
+      return m_image->getScalarType();
+   }
+   
+   return ossimImageSource::getOutputScalarType();
+}
+
+double ossimMemoryImageSource::getNullPixelValue(ossim_uint32 band)const
+{
+   if(m_image.valid())
+   {
+      if(band < getNumberOfInputBands())
+      {
+         return m_image->getNullPix(band);
+      }
+   }
+   return ossimImageSource::getNullPixelValue(band);
+}
+
+double ossimMemoryImageSource::getMinPixelValue(ossim_uint32 band)const
+{
+   if(m_image.valid())
+   {
+      if(band < getNumberOfInputBands())
+      {
+         return m_image->getMinPix(band);
+      }
+   }
+   return ossimImageSource::getMinPixelValue(band);
+}
+
+double ossimMemoryImageSource::getMaxPixelValue(ossim_uint32 band)const
+{
+   if(m_image.valid())
+   {
+      if(band < getNumberOfInputBands())
+      {
+         return m_image->getMaxPix(band);
+      }
+   }
+   return ossimImageSource::getMaxPixelValue(band);
+}
+
+ossimIrect ossimMemoryImageSource::getBoundingRect(ossim_uint32 resLevel)const
+{
+   if(resLevel == 0)
+   {
+      if(m_image.valid())
+      {
+         return m_boundingRect;
+      }
+   }
+
+   return ossimImageSource::getBoundingRect(resLevel);
+}
+
+ossimRefPtr<ossimImageData> ossimMemoryImageSource::getTile(const ossimIrect& rect,
+                                                            ossim_uint32 /* resLevel */)
+{
+   if(!isSourceEnabled()||!m_image.valid()||m_boundingRect.hasNans()) return 0;
+   if(!m_result.valid())
+   {
+      m_result = new ossimImageData(0, getOutputScalarType(), getNumberOfOutputBands(), rect.width(), rect.height());
+      m_result->initialize();       
+   }
+
+   m_result->setImageRectangle(rect);
+   m_result->makeBlank();
+   ossimIrect clampRect = m_image->getImageRectangle().clipToRect(rect);
+	
+   m_result->loadTile(m_image->getBuf(),
+	                    m_boundingRect,
+	                    OSSIM_BSQ);
+
+	m_result->validate();
+   return m_result;
+}
+
+
+bool ossimMemoryImageSource::canConnectMyInputTo(ossim_int32 /* myInputIndex */,
+                                                 const ossimConnectableObject* /* object */)const
+{
+   return false;
+}
+   
+void ossimMemoryImageSource::initialize()
+{
+   m_result = 0;
+}
+
+ossim_uint32 ossimMemoryImageSource::getNumberOfDecimationLevels() const
+{
+   return 1;
+}
+
+void ossimMemoryImageSource::getDecimationFactor(ossim_uint32 resLevel,
+                                                 ossimDpt& result) const
+{
+   if (resLevel == 0)
+   {
+      result.x = 1.0;
+      result.y = 1.0;
+   }
+   else
+   {
+      result.x = 1.0 / (1<<resLevel);
+      result.y = result.x;
+   }
+}
+
+void ossimMemoryImageSource::getDecimationFactors(std::vector<ossimDpt>& decimations)const
+{
+   decimations.push_back(ossimDpt(1.0,1.0));
+}
+
+
+bool ossimMemoryImageSource::saveState(ossimKeywordlist& kwl, const char* prefix)const
+{
+   
+   ossimString imagePrefix = ossimString(prefix) + "image.";
+   ossimString geomPrefix = ossimString(prefix) + "geom.";
+   if(m_image.valid())
+   {
+      m_image->saveState(kwl, imagePrefix);
+   }
+   if(m_geometry.valid())
+   {
+      m_geometry->saveState(kwl, geomPrefix);
+   }
+   return ossimImageSource::saveState(kwl, prefix);
+}
+
+bool ossimMemoryImageSource::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   bool returnResult =  ossimImageSource::loadState(kwl, prefix);
+   m_geometry = 0;
+   if(returnResult)
+   {
+      ossimString imagePrefix = ossimString(prefix) + "image.";
+      ossimString geomPrefix = ossimString(prefix) + "geom.";
+      
+      ossimString type = kwl.find(imagePrefix, "type");
+      if(!type.empty())
+      {
+         m_image = new ossimImageData();
+         returnResult = m_image->loadState(kwl, imagePrefix.c_str());
+         m_image->initialize();
+         m_boundingRect = m_image->getImageRectangle();
+      }
+      
+      if(returnResult)
+      {
+         type = kwl.find(geomPrefix, "type");
+         if(!type.empty())
+         {
+            m_geometry = new ossimImageGeometry();
+            returnResult = m_geometry->loadState(kwl, geomPrefix.c_str());
+         }
+      }
+   }
+   m_result = 0;
+   return returnResult;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimMetadataFileWriter.cpp b/ossim/src/ossim/imaging/ossimMetadataFileWriter.cpp
new file mode 100644
index 0000000..faf6467
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimMetadataFileWriter.cpp
@@ -0,0 +1,278 @@
+//*******************************************************************
+// Copyright (C) 2003 Stroage Area Networks, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Kenneth Melero (kmelero at sanz.com)
+//
+//*******************************************************************
+//  $Id: ossimMetadataFileWriter.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimMetadataFileWriter.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimViewController.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimErrorContext.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/base/ossimFilenameProperty.h>
+
+RTTI_DEF3(ossimMetadataFileWriter,
+          "ossimMetadataFileWriter",
+          ossimConnectableObject,
+          ossimProcessInterface,
+          ossimConnectableObjectListener);
+
+static ossimTrace traceDebug("ossimMetadataFileWriter:degug");
+
+ossimMetadataFileWriter::ossimMetadataFileWriter()
+   :ossimConnectableObject(0),
+      ossimProcessInterface(),
+      ossimConnectableObjectListener(),
+      theInputConnection(NULL),
+      theFilename(),
+      thePixelType(OSSIM_PIXEL_IS_POINT),
+      theAreaOfInterest()
+{
+   addListener((ossimConnectableObjectListener*)this);
+   theAreaOfInterest.makeNan();
+}
+
+ossimMetadataFileWriter::~ossimMetadataFileWriter()
+{
+   removeListener((ossimConnectableObjectListener*)this);
+}
+
+void ossimMetadataFileWriter::initialize()
+{
+   theInputConnection = dynamic_cast<ossimImageSource*> (getInput(0));
+}
+
+bool ossimMetadataFileWriter::loadState(const ossimKeywordlist& kwl,
+                                     const char* prefix)
+{
+   bool result = ossimConnectableObject::loadState(kwl, prefix);
+
+   // Get the filename...
+   const char* lookup = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
+   if(lookup)
+   {
+      ossimString filename = lookup;
+
+      setFilename(filename);
+   }
+
+   // Note: Defaulted to point in constructor.
+   lookup = kwl.find(prefix, ossimKeywordNames::PIXEL_TYPE_KW);
+   if (lookup)
+   {
+      ossimString s = lookup;
+      s.downcase();
+      if (s.contains("area"))
+      {
+         thePixelType = OSSIM_PIXEL_IS_AREA;
+      }
+      else if (s.contains("point"))
+      {
+         thePixelType = OSSIM_PIXEL_IS_POINT;
+      }
+   }
+   
+   if(theInputObjectList.size() != 1)
+   {
+      theInputObjectList.resize(1);
+      theInputListIsFixedFlag = true;
+   }
+   
+   theOutputListIsFixedFlag = false;
+      
+   return result;
+}
+
+void ossimMetadataFileWriter::disconnectInputEvent(ossimConnectionEvent& /* event */)
+{
+   initialize();
+}
+
+void ossimMetadataFileWriter::connectInputEvent(ossimConnectionEvent& /* event */)
+{
+   initialize();
+}
+
+void ossimMetadataFileWriter::propertyEvent(ossimPropertyEvent& /* event */)
+{
+   initialize();
+}
+
+void ossimMetadataFileWriter::setPixelType(ossimPixelType pixelType)
+{
+   thePixelType = pixelType;
+}
+
+ossimPixelType ossimMetadataFileWriter::getPixelType()const
+{
+   return thePixelType;
+}
+
+ossimObject* ossimMetadataFileWriter::getObject()
+{
+   return this;
+}
+
+const ossimObject* ossimMetadataFileWriter::getObject() const
+{
+   return this;
+}
+
+bool ossimMetadataFileWriter::execute()
+{
+   bool result = false;
+   if (!theInputConnection)
+   {
+      initialize();
+      if (!theInputConnection)
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "ossimMetadataFileWriter::execute DEBUG:\n"
+               << "theInputConnection is null!"
+               << endl;
+         }
+         return result;
+      }
+   }
+   
+   if(theFilename == ossimFilename::NIL)
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimMetadataFileWriter::execute DEBUG:\n"
+            << "theFilename is not set!"
+            << endl;
+      }
+      return result;
+   }
+   
+   //---
+   // If theAreaOfInterest hasNans then it was probably not set so use
+   // the bounding rectangle of the input source.
+   //---
+   if (theAreaOfInterest.hasNans())
+   {
+      theAreaOfInterest = theInputConnection->getBoundingRect();
+      if (theAreaOfInterest.hasNans())
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "ossimMetadataFileWriter::execute DEBUG:\n"
+               << "theAreaOfInterest is not set!"
+               << endl;
+         }
+         return result;
+      }
+   }
+
+   setProcessStatus(ossimProcessInterface::PROCESS_STATUS_EXECUTING);
+
+   setPercentComplete(0.0);
+
+   result = writeFile();
+
+   setProcessStatus(ossimProcessInterface::PROCESS_STATUS_NOT_EXECUTING);
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimMetadataFileWriter::execute DEBUG:\n"
+         << (result?"successful":"unsuccessful") << " write of file:  "
+         << theFilename
+         << endl;
+   }
+   
+   return result;
+}
+
+void ossimMetadataFileWriter::setPercentComplete(double percentComplete)
+{
+   ossimProcessInterface::setPercentComplete(percentComplete);
+   ossimProcessProgressEvent event(this,
+                                   percentComplete);
+   fireEvent(event);      
+}
+
+void ossimMetadataFileWriter::setFilename(const ossimFilename& file)
+{
+   theFilename = file;
+}
+
+const ossimFilename& ossimMetadataFileWriter::getFilename() const
+{
+   return theFilename;
+}
+
+bool ossimMetadataFileWriter::canConnectMyInputTo(ossim_int32 inputIndex,
+                                                  const ossimConnectableObject* object) const
+{
+   return (object &&
+           ((PTR_CAST(ossimImageSource, object) &&
+             inputIndex == 0)||
+            (PTR_CAST(ossimViewController, object) &&
+             inputIndex == 1)));
+}
+
+void ossimMetadataFileWriter::setAreaOfInterest(
+   const ossimIrect& areaOfInterest)
+{
+   theAreaOfInterest = areaOfInterest;
+}
+
+ossimIrect ossimMetadataFileWriter::getAreaOfInterest() const
+{
+   return theAreaOfInterest;
+}
+
+void ossimMetadataFileWriter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property.valid())return;
+   
+   ossimString name = property->getName();
+
+   if(name == ossimKeywordNames::FILENAME_KW)
+   {
+      setFilename(property->valueToString());
+   }
+   else
+   {
+      ossimConnectableObject::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimMetadataFileWriter::getProperty(const ossimString& name)const
+{
+   if(name == ossimKeywordNames::FILENAME_KW)
+   {
+      ossimFilenameProperty* filenameProp =
+         new ossimFilenameProperty(name, theFilename);
+      
+      filenameProp->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_OUTPUT);
+      
+      return filenameProp;
+      
+   }
+
+   return ossimConnectableObject::getProperty(name);
+}
+
+void ossimMetadataFileWriter::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimConnectableObject::getPropertyNames(propertyNames);
+   propertyNames.push_back(ossimKeywordNames::FILENAME_KW);
+}
+
diff --git a/ossim/src/ossim/imaging/ossimMonoGridRemapEngine.cpp b/ossim/src/ossim/imaging/ossimMonoGridRemapEngine.cpp
new file mode 100644
index 0000000..b10ea02
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimMonoGridRemapEngine.cpp
@@ -0,0 +1,369 @@
+//*****************************************************************************
+// FILE: ossimMonoGridRemapEngine.cc
+//
+// Copyright (C) 2001 ImageLinks, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// See the GPL in the COPYING.GPL file for more details.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Contains implementation of class 
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimMonoGridRemapEngine.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimMonoGridRemapEngine.h>
+
+RTTI_DEF1(ossimMonoGridRemapEngine, "ossimMonoGridRemapEngine",
+          ossimGridRemapEngine);
+
+#include <ossim/imaging/ossimGridRemapSource.h>
+#include <ossim/imaging/ossimAtbPointSource.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimDblGrid.h>
+#include <ossim/imaging/ossimImageData.h>
+
+//***
+// Define Trace flags for use within this file:
+//***
+#include <ossim/base/ossimTrace.h>
+static ossimTrace traceExec  ("ossimMonoGridRemapEngine:exec");
+static ossimTrace traceDebug ("ossimMonoGridRemapEngine:debug");
+static bool TRACE_FLAG = true;
+
+//*****************************************************************************
+//  METHOD: ossimMonoGridRemapEngine::dup
+//  
+//*****************************************************************************
+ossimObject* ossimMonoGridRemapEngine::dup() const
+{
+   return new ossimMonoGridRemapEngine;
+}
+
+//*****************************************************************************
+//  METHOD: ossimMonoGridRemapEngine::remapTile
+//  
+//*****************************************************************************
+void ossimMonoGridRemapEngine::remapTile(const ossimDpt&       origin,
+                                        ossimGridRemapSource* remapper,
+                                        ossimRefPtr<ossimImageData>& tile)
+{
+   static const char MODULE[] = "ossimMonoGridRemapEngine::remapTile";
+   if (traceExec())  CLOG << "entering..." << endl;
+
+   //***
+   // Fetch tile size and NULL pixel value:
+   //***
+   int    width         = tile->getWidth();
+   int    height        = tile->getHeight();
+   int    offset        = 0;
+   double null;
+
+   //***
+   // Determine null pixel values so that we can recognize a null coming in and
+   // not remap it:
+   //***
+   null = tile->getNullPix(0);
+   ossimDblGrid& grid = *(remapper->getGrid(0));
+   
+   //***
+   // Remap according to pixel type:
+   //***
+   switch(tile->getScalarType())
+   {
+   case OSSIM_UCHAR:
+   {
+      ossim_uint8* tile_buf  = (ossim_uint8*)tile->getBuf(0);
+      short  pixel;
+      
+      for (double line=origin.line; line<origin.line+height; line+=1.0)
+      {
+         for (double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
+         {
+            //***
+            // Scan for null pixel before adding remap delta:
+            //***
+            if (tile_buf[offset] != (ossim_uint8) null)
+            {
+               //***
+               // Remap MONO pixel with spatially variant bias value:
+               //***
+               pixel = tile_buf[offset] + (short) grid(samp,line);
+
+               //***
+               // Clamp:
+               //***
+               if      (pixel<0)   tile_buf[offset] = 0;
+               else if (pixel>255) tile_buf[offset] = 255;
+               else                tile_buf[offset] = pixel;
+               
+               //***
+               // Avoid NULLS:
+               //***
+               if (tile_buf[offset] == (ossim_uint8) null) tile_buf[offset]++;
+            }
+            
+            offset++;
+         }
+      }
+      break;
+   }
+   
+   case OSSIM_USHORT11:
+   {
+      ossim_uint16* tile_buf  = (ossim_uint16*)tile->getBuf(0);
+      int  pixel;
+      
+      for (double line=origin.line; line<origin.line+height; line+=1.0)
+      {
+         for (double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
+         {
+            //***
+            // Scan for null pixel before adding remap delta:
+            //***
+            if (tile_buf[offset] != (ossim_uint16) null)
+            {
+               //***
+               // Remap MONO pixel with spatially variant bias value:
+               //***
+               pixel = tile_buf[offset] + (int) grid(samp,line);
+
+               //***
+               // Clamp:
+               //***
+               if      (pixel<0)    tile_buf[offset] = 0;
+               else if (pixel>2047) tile_buf[offset] = 2047;
+               else                 tile_buf[offset] = pixel;
+               
+               //***
+               // Avoid NULLS:
+               //***
+               if (tile_buf[offset] == (ossim_uint16) null) tile_buf[offset]++;
+            }
+            
+            offset++;
+         }
+      }
+      break;
+   }
+   
+   case OSSIM_USHORT16:
+   {
+      ossim_uint16* tile_buf  = (ossim_uint16*)tile->getBuf(0);
+      int  pixel;
+      
+      for (double line=origin.line; line<origin.line+height; line+=1.0)
+      {
+         for (double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
+         {
+            //***
+            // Scan for null pixel before adding remap delta:
+            //***
+            if (tile_buf[offset] != (ossim_uint16) null)
+            {
+               //***
+               // Remap MONO pixel with spatially variant bias value:
+               //***
+               pixel = tile_buf[offset] + (int) grid(samp,line);
+
+               //***
+               // Clamp:
+               //***
+               if      (pixel<0)     tile_buf[offset] = 0;
+               else if (pixel>65535) tile_buf[offset] = 65535;
+               else                  tile_buf[offset] = pixel;
+               
+               //***
+               // Avoid NULLS:
+               //***
+               if (tile_buf[offset] == (ossim_uint16) null) tile_buf[offset]++;
+            }
+            
+            offset++;
+         }
+      }
+      break;
+   }
+   
+   case OSSIM_SSHORT16:
+   {
+      short* tile_buf  = (short*)tile->getBuf(0);
+      int  pixel;
+      
+      for (double line=origin.line; line<origin.line+height; line+=1.0)
+      {
+         for (double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
+         {
+            //***
+            // Scan for null pixel before adding remap delta:
+            //***
+            if (tile_buf[offset] != (short) null)
+            {
+               //***
+               // Remap MONO pixel with spatially variant bias value:
+               //***
+               pixel = tile_buf[offset] + (short) grid(samp,line);
+
+               //***
+               // Clamp:
+               //***
+               if      (pixel<-32766) tile_buf[offset] = -32766;
+               else if (pixel> 32767) tile_buf[offset] = 32767;
+               else                   tile_buf[offset] = pixel;
+               
+               //***
+               // Avoid NULLS:
+               //***
+               if (tile_buf[offset] == (short) null) tile_buf[offset]++;
+            }
+            
+            offset++;
+         }
+      }
+      break;
+   }
+   default:
+   {
+	   ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimMonoGridRemapEngine::remapTile: Scalar type not handled" << std::endl;
+	   break;
+   }
+	   
+   }   // end switch statement
+
+   if (traceExec())  CLOG << "returning..." << endl;
+   return;
+};
+
+//*****************************************************************************
+//  METHOD: ossimMonoGridRemapEngine::assignRemapValues
+//
+//  This engine defines the target value as an MONO vector of doubles, computed
+//  as the mean of all contributor MONO values.
+//  
+//*****************************************************************************
+void ossimMonoGridRemapEngine::assignRemapValues (
+   vector<ossimAtbPointSource*>& sources_list)
+{
+   static const char MODULE[] = "ossimMonoGridRemapEngine::assignRemapValues";
+   if (traceExec())  CLOG << "entering..." << endl;
+
+   int i; // index to individual sources
+
+   //***
+   // Declare a 2D array that will contain all of the contributing sources'
+   // MONO mean values. Also declare the accumulator target vector.
+   //***
+   int num_contributors = (int)sources_list.size();
+   double** contributor_pixel = new double* [num_contributors];
+   for (i=0; i<num_contributors; i++)
+      contributor_pixel[i] = new double[1];
+   double target_pixel = 0.0;
+
+   //***
+   // Now loop over each remaining contributor and sum in its contribution:
+   //***
+   vector<ossimAtbPointSource*>::iterator source;
+   i = 0;
+   for(source=sources_list.begin();
+       source!=sources_list.end();
+       source++)
+   {
+      (*source)->getSourceValue(contributor_pixel[i]);
+      target_pixel += contributor_pixel[i][0]/(double)num_contributors;
+      ++i;
+   }
+
+   //***
+   // The target pixel has been established. Now need to compute the actual
+   // remap quantities that will be written to the appropriate remap grids:
+   //***
+   i = 0;
+   for(source=sources_list.begin();
+       source!=sources_list.end();
+       source++)
+   {
+      computeRemapNode(*source, contributor_pixel[i], &target_pixel);
+      ++i;
+   }
+
+   // ***
+   // Delete locally allocated memory:
+   // ***
+   for (i=0; i<num_contributors; ++i)
+   {
+      delete [] contributor_pixel[i];
+   }
+   delete [] contributor_pixel;
+   
+   if (traceExec())  CLOG << "returning..." << endl;
+   return;
+}
+
+//*****************************************************************************
+//  METHOD: ossimMonoGridRemapEngine::computeSourceValue
+//  
+//*****************************************************************************
+void ossimMonoGridRemapEngine::computeSourceValue(
+   ossimRefPtr<ossimImageData>& source, void* result)
+{
+   static const char MODULE[]="ossimMonoGridRemapEngine::computeSourceValue";
+   if (traceExec())  CLOG << "entering..." << endl;
+
+   //***
+   // This engine defines "value" as the MONO vector corresponding to the mean
+   // MONO pixel value of the source data:
+   //***
+   ((double*)result)[0] = source->computeAverageBandValue(0);
+   
+   if (traceExec())  CLOG << "returning..." << endl;
+   return;
+}
+
+//*****************************************************************************
+//  METHOD: ossimMonoGridRemapEngine::computeRemapNode
+//
+//  This engine defines the remap value as the difference between the target
+//  MONO vector and the individual point source's value vector.
+//
+//*****************************************************************************
+void ossimMonoGridRemapEngine::computeRemapNode(ossimAtbPointSource* ps,
+                                              void* source_value,
+                                              void* target_value)
+{
+   static const char MODULE[] = "ossimMonoGridRemapEngine::computeRemapNode";
+   if (traceExec())  CLOG << "entering..." << endl;
+
+   //***
+   // Compute the remap grid node value specific to this MONO implementation:
+   //***
+   double node;
+   node = ((double*)target_value)[0] - ((double*)source_value)[0];
+
+   //***
+   // Fetch a pointer to the remapper feeding this point source in order to
+   // pass it the node value:
+   //***
+   ossimGridRemapSource* remapper = ps->getRemapSource();
+   remapper->setGridNode(ps->getViewPoint(), &node);
+                         
+   if (traceDebug() || TRACE_FLAG)
+   {
+      CLOG << "DEBUG -- "
+           << "\n\t ps->getViewPoint() = "<<ps->getViewPoint()
+           << "\n\t source_value = "<<((double*)source_value)[0]
+           << "\n\t target_value = "<<((double*)target_value)[0]
+           << "\n\t node = "<<node
+           << "\n\t remapper at "<<remapper<<endl;
+   }
+
+   if (traceExec())  CLOG << "returning..." << endl;
+   return;
+}
+
+
diff --git a/src/ossim/imaging/ossimMultiBandHistogramTileSource.cpp b/ossim/src/ossim/imaging/ossimMultiBandHistogramTileSource.cpp
similarity index 100%
rename from src/ossim/imaging/ossimMultiBandHistogramTileSource.cpp
rename to ossim/src/ossim/imaging/ossimMultiBandHistogramTileSource.cpp
diff --git a/ossim/src/ossim/imaging/ossimNBandToIndexFilter.cpp b/ossim/src/ossim/imaging/ossimNBandToIndexFilter.cpp
new file mode 100644
index 0000000..869f22e
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimNBandToIndexFilter.cpp
@@ -0,0 +1,566 @@
+//*******************************************************************
+// Copyright (C) 2005 Garrett Potts
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimNBandToIndexFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimNBandToIndexFilter.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimFilenameProperty.h>
+#include <ossim/base/ossimBooleanProperty.h>
+#include <ossim/base/ossimNotifyContext.h>
+
+
+static const char* KEEP_QUANTIZED_VALUE_FLAG_KW = "keep_quantized_value_flag";
+
+RTTI_DEF1(ossimNBandToIndexFilter,
+          "ossimNBandToIndexFilter",
+          ossimImageSourceFilter);
+
+ossimNBandToIndexFilter::ossimNBandToIndexFilter()
+   :ossimImageSourceFilter(),
+    theLut(0),
+    theTile(0),
+    theKeepQuantizedValueFlag(false)
+{
+}
+
+ossimNBandToIndexFilter::~ossimNBandToIndexFilter()
+{
+}
+
+void ossimNBandToIndexFilter::initialize()
+{
+   ossimImageSourceFilter::initialize();
+
+   // Force allocate on next getTile.
+   theTile      = 0;
+   if(theLut.valid())
+   {
+      if(theKeepQuantizedValueFlag)
+      {
+         ossimNBandLutDataObject::LUT_ENTRY_TYPE minValue;
+         ossimNBandLutDataObject::LUT_ENTRY_TYPE maxValue;
+         ossim_uint32 bands = theLut->getNumberOfBands();
+         ossim_uint32 idx   = 0;
+         if(theMinValues.size() != bands)
+         {
+            theMinValues.resize(bands);
+            theMaxValues.resize(bands);
+            theNullValues.resize(bands);
+         }
+         std::fill(theNullValues.begin(),
+                   theNullValues.end(), 0);
+         for(idx = 0; idx < bands; ++idx)
+         {
+            theLut->getMinMax(idx, minValue, maxValue);
+            theMinValues[idx] = minValue;
+            theMaxValues[idx] = maxValue;
+            theNullValues[idx] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(ossimImageSourceFilter::getNullPixelValue(idx));
+         }
+      }
+      else
+      {
+         if(theMinValues.size() != 1)
+         {
+            theMinValues.resize(1);
+            theMaxValues.resize(1);
+            theNullValues.resize(1);
+         }
+         theMinValues[0]  = 0;
+         theMaxValues[0]  = theLut->getNumberOfEntries()-1;
+         theNullValues[0] = theLut->getNullPixelIndex();
+      }
+   }
+}
+
+void ossimNBandToIndexFilter::allocate()
+{
+   theTile      = 0;
+   
+   if(isSourceEnabled()&&theInputConnection)
+   {
+      theTile      = ossimImageDataFactory::instance()->create(this, this);
+      if(theTile.valid())
+      {
+         theTile->initialize();
+      }
+   }
+}
+
+void ossimNBandToIndexFilter::disableSource()
+{
+   ossimImageSourceFilter::disableSource();
+   theTile = 0;
+}
+
+ossimRefPtr<ossimImageData> ossimNBandToIndexFilter::getTile(const ossimIrect& origin,
+                                                             ossim_uint32 resLevel)
+{
+   if(!isSourceEnabled())
+   {
+      return ossimImageSourceFilter::getTile(origin, resLevel);
+   }
+   if(!theInputConnection)
+   {
+      return ossimRefPtr<ossimImageData>();
+   }
+
+   if(!theTile.valid())
+   {
+      allocate();
+   }
+   
+   ossimRefPtr<ossimImageData> input = theInputConnection->getTile(origin,
+                                                                   resLevel);
+
+   if(!theTile.valid() || !input.valid())
+   {
+      return input;
+   }
+
+   theTile->setImageRectangle(origin);
+   theTile->setDataObjectStatus(OSSIM_FULL);
+   theTile->makeBlank();
+
+   return convertInputTile(input.get());
+}
+
+ossimRefPtr<ossimImageData> ossimNBandToIndexFilter::convertInputTile(ossimImageData* tile)
+{
+   switch(getOutputScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         return convertOutputTileTemplate((ossim_uint8)0,
+                                          tile);
+         break;
+      }
+      case OSSIM_UINT16:
+      {
+         return convertOutputTileTemplate((ossim_uint16)0,
+                                          tile);
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         return convertOutputTileTemplate((ossim_uint32)0,
+                                         tile);
+         break;
+      }
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "ossimNBandToIndexFilter::convertInputTile: Unsupported scalar type for conversion" << std::endl;
+      }
+   }
+
+   return theTile;
+}
+
+template <class T>
+ossimRefPtr<ossimImageData> ossimNBandToIndexFilter::convertOutputTileTemplate(T outputDummy,
+                                                                               ossimImageData* inputTile)
+{
+   switch(inputTile->getScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         return convertInputTileToOutputTemplate((ossim_uint8)0,
+                                                 outputDummy,
+                                                 inputTile);
+         break;
+      }
+      case OSSIM_SINT8:
+      {
+         return convertInputTileToOutputTemplate((ossim_sint8)0,
+                                                 outputDummy,
+                                                 inputTile);
+      }
+      case OSSIM_UINT16:
+      {
+         return convertInputTileToOutputTemplate((ossim_uint16)0,
+                                                 outputDummy,
+                                                 inputTile);
+      }
+      case OSSIM_SINT32:
+      {
+         return convertInputTileToOutputTemplate((ossim_sint32)0,
+                                                 outputDummy,
+                                                 inputTile);
+      }
+      case OSSIM_UINT32:
+      {
+         return convertInputTileToOutputTemplate((ossim_uint32)0,
+                                                 outputDummy,
+                                                 inputTile);
+      }
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "convertInputTileToOutputTemplate::convertOutputTileTemplate: Unsupported scalar type for conversion." << std::endl;
+      }
+   }
+
+   return theTile;
+}
+
+template <class T1, class T2>
+ossimRefPtr<ossimImageData> ossimNBandToIndexFilter::convertInputTileToOutputTemplate(
+   T1 /* inputDummy */,
+   T2 /* outputDummy */,
+   ossimImageData* inputTile)
+{
+   if (!inputTile)
+   {
+      return theTile;
+   }
+   
+   const ossim_uint32 BANDS = inputTile->getNumberOfBands();
+
+   if (!BANDS)
+   {
+      return theTile;
+   }
+//   T2** outBand = (T2*)theTile->getBuf();
+
+   ossim_uint32 numberOfBands = theLut->getNumberOfBands();
+   
+   std::vector<ossimNBandLutDataObject::LUT_ENTRY_TYPE> bandValuesTemplate(numberOfBands);
+
+   ossimNBandLutDataObject::LUT_ENTRY_TYPE* bandValues = &bandValuesTemplate.front();//new ossimNBandLutDataObject::LUT_ENTRY_TYPE[numberOfBands];
+
+   std::fill(bandValuesTemplate.begin(), bandValuesTemplate.end(), 0);
+   numberOfBands = ossim::min(BANDS,
+                            numberOfBands);
+   if(!numberOfBands) return theTile;
+   std::vector<T1*> band(numberOfBands);
+   std::vector<T2*> outBand(numberOfBands);
+  // T1** band = new T1*[numberOfBands];
+   //T2** outBand = new T2*[numberOfBands];
+   ossim_int32 idx   = 0;
+
+   for(idx = 0; idx < (ossim_int32)numberOfBands; ++idx)
+   {
+      band[idx] = (T1*)inputTile->getBuf(idx);
+      outBand[idx] = (T2*)theTile->getBuf(idx);
+   }
+   if(band[0])
+   {
+      if(inputTile->getDataObjectStatus() == OSSIM_FULL)
+      {
+         ossim_uint32 upper = inputTile->getWidth()*inputTile->getHeight();
+         ossim_uint32 idx2=0;
+         for(ossim_uint32 offset = 0; offset < upper; ++offset)
+         {
+            for(idx2 = 0; idx2 < numberOfBands; ++idx2)
+            {
+               bandValues[idx2] = *band[idx2];
+               ++band[idx2];
+            }
+            //---
+            // Note call the ossimNBandLutDataObject::findIndex that takes a size as the input
+            // data may have dropped the alpha channel.
+            //---
+            idx = theLut->findIndex(bandValues, numberOfBands);
+
+            if(!theKeepQuantizedValueFlag)
+            {
+               *outBand[0] = (T2)idx;
+               ++outBand[0];
+            }
+            else
+            {
+               for(idx2 = 0; idx2 < numberOfBands; ++idx2)
+               {
+                  if(idx >=0)
+                  {
+                     *outBand[idx2] = (T2)(*theLut)[idx][idx2];
+                     ++outBand[idx2];
+                  }
+               }
+            }
+         }
+      }
+      else if(inputTile->getDataObjectStatus() == OSSIM_PARTIAL)
+      {
+         ossim_uint32 upper = inputTile->getWidth()*inputTile->getHeight();
+         ossim_uint32 idx2=0;
+         for(ossim_uint32 offset = 0; offset < upper; ++offset)
+         {
+            for(idx2 = 0; idx2 < numberOfBands; ++idx2)
+            {
+               bandValues[idx2] = *band[idx2];
+               ++band[idx2];
+            }
+            idx = -1;
+            if(!inputTile->isNull(offset))
+            {
+               //---
+               // Note call the ossimNBandLutDataObject::findIndex that takes a size as the input
+               // data may have dropped the alpha channel.
+               //---
+               idx = theLut->findIndex(bandValues, numberOfBands);
+            }
+            if(!theKeepQuantizedValueFlag)
+            {
+               if(idx>=0)
+               {
+                  *outBand[0] = (T2)idx;
+               }
+               ++outBand[0];
+            }
+            else
+            {
+               for(idx2 = 0; idx2 < numberOfBands; ++idx2)
+               {
+                  if(idx >=0)
+                  {
+                     if(idx>=0)
+                     {
+                        *outBand[idx2] = (T2)(*theLut)[idx][idx2];
+                     }
+                  }
+                  ++outBand[idx2];
+               }
+            }
+         }
+      }
+   }
+   if(theKeepQuantizedValueFlag)
+   {
+      theTile->validate();
+   }
+   else
+   {
+      theTile->setDataObjectStatus(OSSIM_FULL);
+   }
+
+  
+   return theTile;
+}
+
+bool ossimNBandToIndexFilter::saveState(ossimKeywordlist& kwl,
+                                        const char* prefix)const
+{
+   ossimString newPrefix = prefix;
+   newPrefix = newPrefix + "lut.";
+
+   if(theLut.valid())
+   {
+      theLut->saveState(kwl, newPrefix.c_str());
+   }
+
+   kwl.add(prefix,
+           KEEP_QUANTIZED_VALUE_FLAG_KW,
+           theKeepQuantizedValueFlag?"true":"false",
+           true);
+           
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
+bool ossimNBandToIndexFilter::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   ossimString newPrefix = prefix;
+   newPrefix = newPrefix + "lut.";
+
+   if(!theLut.valid())
+   {
+      theLut = new ossimNBandLutDataObject;
+   }
+   theLut->loadState(kwl, newPrefix.c_str());
+
+   const char* flag = kwl.find(prefix, KEEP_QUANTIZED_VALUE_FLAG_KW);
+   if(flag)
+   {
+      theKeepQuantizedValueFlag = ossimString(flag).toBool();
+   }
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
+bool ossimNBandToIndexFilter::isSourceEnabled()const
+{
+   bool result = ossimSource::isSourceEnabled()&&theInputConnection;
+
+   // only support 3 band integral values, no floating point for now.
+   //
+   if(result)
+   {
+      
+      ossimScalarType inputScalarType = theInputConnection->getOutputScalarType();
+      if(!theLut.valid() ||
+         (theLut->getNumberOfEntries()<1)||
+         (inputScalarType==OSSIM_FLOAT32)||
+         (inputScalarType==OSSIM_FLOAT64)||
+         (theInputConnection->getNumberOfOutputBands()!=3))
+      {
+         result = false;
+      }
+   }
+   
+   return result;
+}
+
+ossim_uint32 ossimNBandToIndexFilter::getNumberOfOutputBands() const
+{
+   if(isSourceEnabled())
+   {
+      if(theKeepQuantizedValueFlag)
+      {
+         if(theLut.valid())
+         {
+            return theLut->getNumberOfBands();
+         }
+      }
+      else
+      {
+         return 1;
+      }
+   }
+   
+   return ossimImageSourceFilter::getNumberOfOutputBands();
+}
+   
+ossimScalarType ossimNBandToIndexFilter::getOutputScalarType() const
+{
+   if(isSourceEnabled())
+   {
+      
+      ossim_uint32 numberOfEntries = theLut->getNumberOfEntries();
+      
+      if(numberOfEntries < 257)
+      {
+         return OSSIM_UCHAR;
+      }
+      else if(numberOfEntries < 65537)
+      {
+         return OSSIM_UINT16;
+      }
+      else
+      {
+         return OSSIM_UINT32;
+      }
+   }
+   
+   return ossimImageSourceFilter::getOutputScalarType();
+}
+
+void ossimNBandToIndexFilter::setLut(ossimNBandLutDataObject& lut)
+{
+   theLut = new ossimNBandLutDataObject(lut);
+}
+
+double ossimNBandToIndexFilter::getNullPixelValue(ossim_uint32 band)const
+{
+   if(isSourceEnabled())
+   {
+      if(theLut->getNullPixelIndex() >= 0)
+      {
+         return theLut->getNullPixelIndex();
+      }
+   }
+   
+   return ossimImageSourceFilter::getNullPixelValue(band);
+}
+
+double ossimNBandToIndexFilter::getMinPixelValue(ossim_uint32 band)const
+{
+   if(isSourceEnabled())
+   {
+      if(band < theMinValues.size())
+      {
+         return (double)theMinValues[band];
+      }
+   }
+//    if(isSourceEnabled())
+//    {
+//       if(getNullPixelValue() != 0)
+//       {
+//          return 0;
+//       }
+//       else
+//       {
+//          return 1;
+//       }
+//       return 0;
+//    }
+   
+   return ossimImageSourceFilter::getMinPixelValue();
+}
+
+double ossimNBandToIndexFilter::getMaxPixelValue(ossim_uint32 band)const
+{
+   if(isSourceEnabled())
+   {
+      if(band < theMaxValues.size())
+      {
+         return (double)theMaxValues[band];
+      }
+//       if(theLut->getNullPixelIndex() != ((ossim_int32)(theLut->getNumberOfEntries())-1))
+//       {
+//          return theLut->getNumberOfEntries();
+//       }
+//       else
+//       {
+//          return (theLut->getNumberOfEntries()-1);
+//       }
+   }
+   
+   return ossimImageSourceFilter::getMaxPixelValue();
+}
+
+void ossimNBandToIndexFilter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(property->getName() == ossimKeywordNames::FILENAME_KW)
+   {
+      ossimKeywordlist kwl;
+      if(kwl.addFile(ossimFilename(property->valueToString())))
+      {
+         theLut = new ossimNBandLutDataObject;
+         theLut->loadState(kwl);
+      }
+   }
+   else if(property->getName() == KEEP_QUANTIZED_VALUE_FLAG_KW)
+   {
+      theKeepQuantizedValueFlag = property->valueToString().toBool();
+   }
+   else
+   {
+      ossimImageSourceFilter::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimNBandToIndexFilter::getProperty(const ossimString& name)const
+{
+   if(name == ossimKeywordNames::FILENAME_KW)
+   {
+      ossimFilenameProperty* property = new ossimFilenameProperty(name, theLutFilename);
+      property->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_INPUT);
+      property->setCacheRefreshBit();
+      
+      return property;
+   }
+   else if(name == KEEP_QUANTIZED_VALUE_FLAG_KW)
+   {
+      ossimBooleanProperty* property = new ossimBooleanProperty(name, theKeepQuantizedValueFlag);
+      property->setCacheRefreshBit();
+
+      return property;
+   }
+   return ossimImageSourceFilter::getProperty(name);
+}
+
+void ossimNBandToIndexFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageSourceFilter::getPropertyNames(propertyNames);
+
+   propertyNames.push_back(ossimKeywordNames::FILENAME_KW);
+   propertyNames.push_back(KEEP_QUANTIZED_VALUE_FLAG_KW);
+}
+
diff --git a/ossim/src/ossim/imaging/ossimNitf20Writer.cpp b/ossim/src/ossim/imaging/ossimNitf20Writer.cpp
new file mode 100644
index 0000000..21da55f
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimNitf20Writer.cpp
@@ -0,0 +1,833 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimNitf20Writer.cpp 2982 2011-10-10 21:28:55Z david.burken $
+
+
+#include <ossim/imaging/ossimNitf20Writer.h>
+#include <ossim/imaging/ossimNitfTileSource.h>
+#include <ossim/base/ossimDate.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/projection/ossimRpcSolver.h>
+#include <ossim/projection/ossimUtmProjection.h>
+#include <ossim/projection/ossimMapProjectionInfo.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/imaging/ossimRectangleCutFilter.h>
+#include <ossim/base/ossimProperty.h>
+#include <ossim/base/ossimContainerProperty.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimNumericProperty.h>
+#include <ossim/base/ossimBooleanProperty.h>
+#include <ossim/base/ossimVisitor.h>
+#include <ossim/support_data/ossimNitfCommon.h>
+#include <ossim/support_data/ossimNitfGeoPositioningTag.h>
+#include <ossim/support_data/ossimNitfLocalGeographicTag.h>
+#include <ossim/support_data/ossimNitfLocalCartographicTag.h>
+#include <ossim/support_data/ossimNitfProjectionParameterTag.h>
+#include <ossim/support_data/ossimNitfNameConversionTables.h>
+#include <ossim/support_data/ossimNitfBlockaTag.h>
+#include <tiffio.h>
+#include <fstream>
+#include <algorithm>
+#include <sstream>
+#include <iomanip>
+
+RTTI_DEF1(ossimNitf20Writer, "ossimNitf20Writer", ossimNitfWriterBase);
+
+static ossimTrace traceDebug(ossimString("ossimNitfWriter:debug"));
+     
+static ossimString monthConversionTable[] = {"   ", "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"};
+
+ossimNitf20Writer::ossimNitf20Writer(const ossimFilename& filename,
+                                     ossimImageSource* inputSource)
+   : ossimNitfWriterBase(filename, inputSource),
+     theOutputStream(0),
+     theFileHeader(),
+     theImageHeader(),
+     theEnableRpcbTagFlag(false),
+     theEnableBlockaTagFlag(true),
+     theCopyFieldsFlag(false)
+{
+   //---
+   // Since the internal nitf tags are not very accurate, write an external
+   // geometry out as default behavior.  Users can disable this via the
+   // property interface or keyword list.
+   //---
+   setWriteExternalGeometryFlag(true);
+   
+   theFileHeader      = new ossimNitfFileHeaderV2_0;
+   theImageHeader     = new ossimNitfImageHeaderV2_0;
+   theOutputImageType = "nitf20_block_band_separate";
+
+   // These are always set:
+   theFileHeader->setEncryption( ossimString("0") );
+   theImageHeader->setJustification( ossimString("R") );
+   
+   // Set any site defaults.
+   initializeDefaultsFromConfigFile(
+      dynamic_cast<ossimNitfFileHeaderV2_X*>(theFileHeader.get()),
+      dynamic_cast<ossimNitfImageHeaderV2_X*>(theImageHeader.get()) );
+}
+
+ossimNitf20Writer::~ossimNitf20Writer()
+{
+   //---
+   // This looks like a leak but it's not as both of these are ossimRefPtr's.
+   //---
+   theFileHeader=0;
+   theImageHeader=0;
+   
+   close();
+}
+
+bool ossimNitf20Writer::isOpen()const
+{
+   return (theOutputStream != 0);
+}
+
+bool ossimNitf20Writer::open()
+{
+   if(isOpen())
+   {
+      close();
+   }
+   theOutputStream = new std::ofstream;
+   theOutputStream->open(theFilename.c_str(), ios::out|ios::binary);
+   
+   return theOutputStream->good();
+}
+
+void ossimNitf20Writer::close()
+{
+   if(theOutputStream)
+   {
+      theOutputStream->close();
+      delete theOutputStream;
+      theOutputStream = (std::ofstream*)0;
+   }
+}
+
+bool ossimNitf20Writer::writeFile()
+{
+   if(!theInputConnection->isMaster())
+   {
+      theInputConnection->slaveProcessTiles();
+
+      return true;
+   }
+
+   open();
+
+   if (!isOpen())
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitf20Writer::writeFile ERROR:"
+            << " Could not open!  Returning..."
+            << std::endl;
+      }
+
+      return false;
+   }
+
+   // Write out the geometry info.
+   writeGeometry(theImageHeader.get(), theInputConnection.get());
+   
+   addTags();
+   
+   bool result = false;
+   if((theOutputImageType == "nitf20_block_band_separate")||
+      (theOutputImageType == "image/nitf20"))
+   {
+      result =  writeBlockBandSeparate();
+   }
+   else if(theOutputImageType == "nitf20_block_band_sequential")
+   {
+      result =  writeBlockBandSequential();
+   }
+   
+   close();
+   
+   return result;
+}
+
+void ossimNitf20Writer::getImageTypeList(std::vector<ossimString>& imageTypeList)const
+{
+   imageTypeList.push_back(ossimString("nitf20_block_band_separate"));
+   imageTypeList.push_back(ossimString("nitf20_block_band_sequential"));
+}
+
+void ossimNitf20Writer::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property) return;
+   
+   ossimString name = property->getName();
+   
+   if(name == "file_header")
+   {
+      ossimContainerProperty* containerProperty = PTR_CAST(ossimContainerProperty,
+                                                           property.get());
+      if(containerProperty)
+      {
+         std::vector<ossimRefPtr<ossimProperty> > propertyList;
+         containerProperty->getPropertyList(propertyList);
+         theFileHeader->setProperties(propertyList);
+      }
+   }
+   else if(name == "image_header")
+   {
+      ossimContainerProperty* containerProperty = PTR_CAST(ossimContainerProperty,
+                                                           property.get());
+      if(containerProperty)
+      {
+         std::vector<ossimRefPtr<ossimProperty> > propertyList;
+         containerProperty->getPropertyList(propertyList);
+         theImageHeader->setProperties(propertyList);
+      }
+   }
+   else if (name == "enable_rpcb_tag")
+   {
+      theEnableRpcbTagFlag = property->valueToString().toBool();
+   }
+   else if (name == "enable_blocka_tag")
+   {
+      theEnableBlockaTagFlag = property->valueToString().toBool();
+   }
+   else if(name == "copy_fields_flag")
+   {
+      theCopyFieldsFlag = property->valueToString().toBool();
+   }
+   else
+   {
+      // just in case it was an nitf specific tag we can pass it safely like this
+      theFileHeader->setProperty(property);
+      theImageHeader->setProperty(property);
+      ossimImageFileWriter::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimNitf20Writer::getProperty(const ossimString& name)const
+{
+   ossimRefPtr<ossimProperty> result = 0;
+   
+   if(name == "file_header")
+   {
+      ossimContainerProperty* container = new ossimContainerProperty(name);
+      std::vector<ossimRefPtr<ossimProperty> > propertyList;
+      
+      theFileHeader->getPropertyList(propertyList);
+      container->addChildren(propertyList);
+      
+      result = container;
+   }
+   else if(name == "image_header")
+   {
+      ossimContainerProperty* container = new ossimContainerProperty(name);
+      std::vector<ossimRefPtr<ossimProperty> > propertyList;
+      
+      theImageHeader->getPropertyList(propertyList);
+      container->addChildren(propertyList);
+      
+      result = container;
+   }
+   else if(name == "enable_rpcb_tag")
+   {
+      ossimBooleanProperty* boolProperty =
+         new ossimBooleanProperty(name, theEnableRpcbTagFlag);
+
+      result = boolProperty;
+   }   
+   else if(name == "enable_blocka_tag")
+   {
+      ossimBooleanProperty* boolProperty =
+         new ossimBooleanProperty(name, theEnableBlockaTagFlag);
+
+      result = boolProperty;
+   }   
+   else if(name == "copy_fields_flag")
+   {
+      ossimBooleanProperty* boolProperty =
+      new ossimBooleanProperty(name, theCopyFieldsFlag);
+      
+      result = boolProperty;
+   }
+   else
+   {
+      return ossimImageFileWriter::getProperty(name);
+   }
+
+   return result;
+}
+
+void ossimNitf20Writer::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageFileWriter::getPropertyNames(propertyNames);
+
+   propertyNames.push_back("file_header");
+   propertyNames.push_back("image_header");
+   propertyNames.push_back("enable_rpcb_tag");
+   propertyNames.push_back("enable_blocka_tag");
+   propertyNames.push_back("copy_fields_flag");
+}
+
+bool ossimNitf20Writer::writeBlockBandSeparate()
+{
+   ossimScalarType scalarType = theInputConnection->getOutputScalarType();
+   ossim_uint64 byteSize      = ossim::scalarSizeInBytes(scalarType);
+   ossimIrect rect            = theInputConnection->getBoundingRect();
+   ossim_uint64 bands         = theInputConnection->getNumberOfOutputBands();
+   ossim_uint64 idx           = 0;
+   ossim_uint64 headerStart   = (ossim_uint64)theOutputStream->tellp();
+
+   ossimIpt blockSize(64, 64);
+   ossim_uint64 blocksHorizontal = (ossim_uint32)ceil(((double)rect.width()/(double)blockSize.x));
+   ossim_uint64 blocksVertical   = (ossim_uint32)ceil(((double)rect.height()/(double)blockSize.y));
+
+   ossimNitfImageInfoRecordV2_0 imageInfoRecord;
+   //imageInfoRecord.setSubheaderLength(439); // ok if no tags
+   imageInfoRecord.setImageLength(bands*byteSize*blocksVertical*blockSize.y*blocksHorizontal*blockSize.x);
+
+   theFileHeader->addImageInfoRecord(imageInfoRecord);
+
+   //---
+   // This makes space for the file header; it is written again at the end of
+   // this method with updated values
+   // need a better way to get the length.  This should be queried on the
+   // header before writing
+   //---
+   theFileHeader->writeStream(*theOutputStream); 
+   ossim_uint64 headerLength = ((ossim_uint64)theOutputStream->tellp() - headerStart) /* + 1 */;
+   
+   ossimString representation;
+   theImageHeader->setActualBitsPerPixel(
+      ossim::getActualBitsPerPixel(scalarType));
+   theImageHeader->setBitsPerPixel(ossim::getBitsPerPixel(scalarType));
+   theImageHeader->setPixelType(ossimNitfCommon::getNitfPixelType(scalarType));
+   theImageHeader->setNumberOfBands(bands);
+   theImageHeader->setImageMode('B');// blocked
+
+   if((bands == 3)&&
+      (scalarType == OSSIM_UCHAR))
+   {
+      theImageHeader->setRepresentation("RGB");
+      theImageHeader->setCategory("VIS");
+   }
+   else if(bands == 1)
+   {
+      theImageHeader->setRepresentation("MONO");
+      theImageHeader->setCategory("MS");
+   }
+   else
+   {
+      theImageHeader->setRepresentation("MULTI");
+      theImageHeader->setCategory("MS");
+   }
+   
+   theImageHeader->setBlocksPerRow(blocksHorizontal);
+   theImageHeader->setBlocksPerCol(blocksVertical);
+   theImageHeader->setNumberOfPixelsPerBlockRow(blockSize.x);
+   theImageHeader->setNumberOfPixelsPerBlockCol(blockSize.y);
+   theImageHeader->setNumberOfRows(rect.height());
+   theImageHeader->setNumberOfCols(rect.width());
+
+   ossimNitfImageBandV2_0 bandInfo;
+   for(idx = 0; idx < bands; ++idx)
+   {
+      std::ostringstream out;
+      
+      out << std::setfill('0')
+          << std::setw(2)
+          << idx;
+      
+      bandInfo.setBandRepresentation(out.str().c_str());
+      theImageHeader->setBandInfo(idx,
+                              bandInfo);
+   }
+
+   ossim_uint64 imageHeaderStart = theOutputStream->tellp();
+   theImageHeader->writeStream(*theOutputStream);
+   ossim_uint64 imageHeaderEnd = theOutputStream->tellp();
+   ossim_uint64 imageHeaderSize = imageHeaderEnd - imageHeaderStart;
+
+   theInputConnection->setTileSize(blockSize);
+   ossim_uint64 numberOfTiles   = theInputConnection->getNumberOfTiles();
+   theInputConnection->setToStartOfSequence();
+   ossimRefPtr<ossimImageData> data = theInputConnection->getNextTile();
+   ossim_uint64 tileNumber = 1;
+   ossimEndian endian;
+
+   
+   while( data.valid() && !needsAborting())
+   {
+      if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
+      {
+         switch(data->getScalarType())
+         {
+            case OSSIM_USHORT16:
+            case OSSIM_USHORT11:
+            {
+               endian.swap((ossim_uint16*)data->getBuf(),
+                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
+               break;
+            }
+            case OSSIM_SSHORT16:
+            {
+               endian.swap((ossim_sint16*)data->getBuf(),
+                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
+               break;
+            }
+            case OSSIM_FLOAT:
+            case OSSIM_NORMALIZED_FLOAT:
+            {
+               endian.swap((ossim_float32*)data->getBuf(),
+                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
+               break;
+            }
+            case OSSIM_DOUBLE:
+            case OSSIM_NORMALIZED_DOUBLE:
+            {
+               endian.swap((ossim_float64*)data->getBuf(),
+                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
+               break;
+            }
+            default:
+               break;
+         }
+      }
+      
+      theOutputStream->write((char*)(data->getBuf()),
+                             data->getSizeInBytes());
+      
+      setPercentComplete(((double)tileNumber / (double)numberOfTiles) * 100);
+      
+      if(!needsAborting())
+      {
+         data = theInputConnection->getNextTile();
+      }
+      ++tileNumber;
+   }
+
+   std::streamoff pos = theOutputStream->tellp();
+
+   setComplexityLevel(pos, theFileHeader.get());
+
+   /*
+    * Need to change the way I compute file length and header length later
+    * We need to figure out a better way to compute.
+    */
+   theFileHeader->setFileLength(static_cast<ossim_uint64>(pos));
+   theFileHeader->setHeaderLength(headerLength);
+   theOutputStream->seekp(0, ios::beg);
+   imageInfoRecord.setSubheaderLength(imageHeaderSize);
+   theFileHeader->replaceImageInfoRecord(0, imageInfoRecord);
+   theFileHeader->writeStream(*theOutputStream);
+   
+   return true;
+}
+
+bool ossimNitf20Writer::writeBlockBandSequential()
+{
+   ossimScalarType scalarType = theInputConnection->getOutputScalarType();
+   ossim_uint64    byteSize   = ossim::scalarSizeInBytes(scalarType);
+   ossimIrect      rect       = theInputConnection->getBoundingRect();
+   ossim_uint64    bands      = theInputConnection->getNumberOfOutputBands();
+   ossim_uint64    idx        = 0;
+   ossim_uint64    headerStart   = (ossim_uint64)theOutputStream->tellp();
+
+   ossimIpt blockSize(64, 64);
+
+   ossim_uint64 blocksHorizontal = theInputConnection->getNumberOfTilesHorizontal();
+   ossim_uint64 blocksVertical   = theInputConnection->getNumberOfTilesVertical();
+   theInputConnection->setTileSize(blockSize);
+   ossim_uint64 numberOfTiles   = theInputConnection->getNumberOfTiles();
+   theInputConnection->setToStartOfSequence();
+   
+   ossimNitfImageInfoRecordV2_0 imageInfoRecord;
+ //  imageInfoRecord.setSubheaderLength(439);
+   imageInfoRecord.setImageLength(bands*byteSize*blocksHorizontal*blocksVertical*blockSize.x*blockSize.y);
+
+   ossimDate currentDate;
+   
+   theFileHeader->setDate(currentDate);
+   theFileHeader->addImageInfoRecord(imageInfoRecord);
+
+   //---
+   // This makes space for the file header; it is written again at the end of
+   // this method with updated values
+   // need a better way to get the length.  This should be queried on the
+   // header before writing
+   //---  
+   theFileHeader->writeStream(*theOutputStream);
+   ossim_uint64 headerLength = ((ossim_uint64)theOutputStream->tellp() - headerStart) /* + 1 */;
+   
+   ossimString representation;
+   theImageHeader->setActualBitsPerPixel(
+      ossim::getActualBitsPerPixel(scalarType));
+   theImageHeader->setBitsPerPixel(ossim::getBitsPerPixel(scalarType));
+   theImageHeader->setPixelType(ossimNitfCommon::getNitfPixelType(scalarType));
+   theImageHeader->setNumberOfBands(bands);
+   theImageHeader->setImageMode('S');// blocked
+   
+   if((bands == 3)&&
+      (scalarType == OSSIM_UCHAR))
+   {
+      theImageHeader->setRepresentation("RGB");
+      theImageHeader->setCategory("VIS");
+   }
+   else if(bands == 1)
+   {
+      theImageHeader->setRepresentation("MONO");
+      theImageHeader->setCategory("MS");
+   }
+   else
+   {
+      theImageHeader->setRepresentation("MULTI");
+      theImageHeader->setCategory("MS");
+   }
+   theImageHeader->setBlocksPerRow(blocksHorizontal);
+   theImageHeader->setBlocksPerCol(blocksVertical);
+   theImageHeader->setNumberOfPixelsPerBlockRow(blockSize.x);
+   theImageHeader->setNumberOfPixelsPerBlockCol(blockSize.y);
+   theImageHeader->setNumberOfRows(rect.height());
+   theImageHeader->setNumberOfCols(rect.width());
+
+   ossimNitfImageBandV2_0 bandInfo;
+   for(idx = 0; idx < bands; ++idx)
+   {
+      std::ostringstream out;
+      
+      out << std::setfill('0')
+          << std::setw(2)
+          << idx;
+      
+      bandInfo.setBandRepresentation(out.str().c_str());
+      theImageHeader->setBandInfo(idx,
+                              bandInfo);
+   }
+
+   int imageHeaderStart = theOutputStream->tellp();
+   theImageHeader->writeStream(*theOutputStream);
+   int imageHeaderEnd = theOutputStream->tellp();
+   int imageHeaderSize = imageHeaderEnd - imageHeaderStart;
+
+   // ossimIpt ul = rect.ul();
+   ossimRefPtr<ossimImageData> data = theInputConnection->getNextTile();
+   ossim_uint64 tileNumber = 0;
+   ossimEndian endian;
+
+   // get the start to the first band of data block
+   //
+   ossim_uint64 streamOffset = theOutputStream->tellp();
+   
+   // holds the total pixels to the next band
+
+   ossim_uint64 blockSizeInBytes = blockSize.x*blockSize.y*ossim::scalarSizeInBytes(data->getScalarType());
+   ossim_uint64 bandOffsetInBytes = (blockSizeInBytes*blocksHorizontal*blocksVertical);
+
+   bool needSwapping = endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN;
+   while(data.valid() && !needsAborting())
+   {
+      if(needSwapping)
+      {
+         switch(data->getScalarType())
+         {
+            case OSSIM_USHORT16:
+            case OSSIM_USHORT11:
+            {
+               endian.swap((ossim_uint16*)data->getBuf(),
+                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
+               break;
+            }
+            case OSSIM_SSHORT16:
+            {
+               endian.swap((ossim_sint16*)data->getBuf(),
+                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
+               break;
+            }
+            case OSSIM_FLOAT:
+            case OSSIM_NORMALIZED_FLOAT:
+            {
+               endian.swap((ossim_float32*)data->getBuf(),
+                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
+               break;
+            }
+            case OSSIM_DOUBLE:
+            case OSSIM_NORMALIZED_DOUBLE:
+            {
+               endian.swap((ossim_float64*)data->getBuf(),
+                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
+               break;
+            }
+            default:
+               break;
+         }
+      }
+
+      for(idx = 0; idx < bands; ++idx)
+      {
+         theOutputStream->seekp(streamOffset+ // start of image stream
+                                tileNumber*blockSizeInBytes + // start of block for band separate output
+                                bandOffsetInBytes*idx, // which band offset is it
+                                ios::beg); 
+         
+         theOutputStream->write((char*)(data->getBuf(idx)),
+                                blockSizeInBytes);
+      }
+      ++tileNumber;
+      
+      setPercentComplete(((double)tileNumber / (double)numberOfTiles) * 100);
+
+      if(!needsAborting())
+      {
+         data = theInputConnection->getNextTile();
+      }
+   }
+   
+   std::streamoff pos = theOutputStream->tellp();
+
+   setComplexityLevel(pos, theFileHeader.get());
+
+   /*
+    * Need to change the way I compute file length and header length later
+    * We need to figure out a better way to compute.
+    */
+   theFileHeader->setFileLength(static_cast<ossim_uint64>(pos));
+   theFileHeader->setHeaderLength(headerLength);
+   theOutputStream->seekp(0, ios::beg);
+   imageInfoRecord.setSubheaderLength(imageHeaderSize);
+   theFileHeader->replaceImageInfoRecord(0, imageInfoRecord);
+   theFileHeader->writeStream(*theOutputStream);
+   
+   return true;
+}
+
+
+void ossimNitf20Writer::addRegisteredTag(
+   ossimRefPtr<ossimNitfRegisteredTag> registeredTag)
+{
+   ossimNitfTagInformation tagInfo;
+   tagInfo.setTagData(registeredTag.get());
+     theImageHeader->addTag(tagInfo);
+}
+
+void ossimNitf20Writer::addTags()
+{
+   ossimDate currentDate;
+   theFileHeader->setDate(currentDate);
+   
+   if(theCopyFieldsFlag)
+   {
+      ossimTypeNameVisitor visitor(ossimString("ossimNitfTileSource"),
+                                   true,
+                                   (ossimVisitor::VISIT_CHILDREN|ossimVisitor::VISIT_INPUTS));
+      accept(visitor);
+      
+      // If there are multiple image handlers, e.g. a mosaic do not uses.
+      ossimRefPtr<ossimNitfTileSource> nitf = 0;
+      if ( visitor.getObjects().size() == 1 )
+      {
+         nitf = visitor.getObjectAs<ossimNitfTileSource>( 0 );
+      }
+
+      if( nitf.valid() )
+      {
+         ossimString value;
+         ossimPropertyInterface* fileHeaderProperties = dynamic_cast<ossimPropertyInterface*>(theFileHeader.get());
+         ossimPropertyInterface* imageHeaderProperties = dynamic_cast<ossimPropertyInterface*>(theImageHeader.get());
+         bool nitf21Flag = false;
+         const ossimNitfFileHeader*   header      = nitf->getFileHeader();
+         const ossimNitfImageHeader*  imageHeader = nitf->getCurrentImageHeader();
+         if(header)
+         {
+            ossimString version = header->getPropertyValueAsString("fhdr");
+            nitf21Flag = version.contains("2.1");
+            value = header->getPropertyValueAsString("stype");
+            if(value.size())
+            {
+               fileHeaderProperties->setProperty("stype", value);
+            }
+            value = header->getPropertyValueAsString("ostaid");
+            if(value.size())
+            {
+               fileHeaderProperties->setProperty("ostaid", value);
+            }
+            value = header->getPropertyValueAsString("ftitle");
+            if(value.size())
+            {
+               fileHeaderProperties->setProperty("ftitle", value);
+            }
+            value = header->getPropertyValueAsString("fsclas");
+            if(value.size())
+            {
+               fileHeaderProperties->setProperty("fsclas", value);
+            }
+            value = header->getPropertyValueAsString("oname");
+            if(value.size())
+            {
+               fileHeaderProperties->setProperty("oname", value);
+            }
+            value = header->getPropertyValueAsString("ophone");
+            if(value.size())
+            {
+               fileHeaderProperties->setProperty("ophone", value);
+            }
+            int idx = 0;
+            for(idx = 0; idx < header->getNumberOfTags(); ++idx)
+            {
+               ossimNitfTagInformation info;
+               header->getTagInformation(info,
+                                         idx);
+               theFileHeader->addTag(info);
+            }
+            value = header->getPropertyValueAsString("");
+            if(value.size())
+            {
+               fileHeaderProperties->setProperty("", value);
+            }
+            value = header->getPropertyValueAsString("fdt");
+            if(value.size()==14)
+            {
+               if(nitf21Flag)
+               {
+                  ossimString year(value.begin()+2, value.begin()+4);
+                  ossimString mon(value.begin()+4, value.begin()+6);
+                  ossimString day(value.begin()+6, value.begin()+8);
+                  ossimString hour(value.begin()+8, value.begin()+10);
+                  ossimString min(value.begin()+10, value.begin()+12);
+                  ossimString sec(value.begin()+12, value.begin()+14);
+                  if(mon.toUInt32() < 13)
+                  {
+                     mon = monthConversionTable[mon.toUInt32()];
+                  }
+                  fileHeaderProperties->setProperty("fdt", day+hour+min+sec+"Z"+mon+year);
+               }
+               else
+               {
+                  fileHeaderProperties->setProperty("fdt", value);
+               }
+            }
+         }
+         if(imageHeader)
+         {
+            ossim_uint32 idx = 0;
+            for(idx = 0; idx < imageHeader->getNumberOfTags(); ++idx)
+            {
+               ossimNitfTagInformation info;
+               imageHeader->getTagInformation(info,
+                                              idx);
+               theImageHeader->addTag(info);
+            }
+            value = imageHeader->getPropertyValueAsString("tgtid");
+            if(value.size())
+            {
+               imageHeaderProperties->setProperty("tgtid", value);
+            }
+            value = imageHeader->getPropertyValueAsString("isclas");
+            if(value.size())
+            {
+               imageHeaderProperties->setProperty("isclas", value);
+            }
+            value = imageHeader->getPropertyValueAsString("igeolo");
+            if(value.size())
+            {
+               imageHeaderProperties->setProperty("igeolo", value);
+            }
+            value = imageHeader->getPropertyValueAsString("ititle");
+            if(nitf21Flag)
+            {
+               value = imageHeader->getPropertyValueAsString("iid2");
+            }
+            if(value.size())
+            {
+               imageHeaderProperties->setProperty("ititle", value);
+            }
+            if(!nitf21Flag)
+            {
+               value = imageHeader->getPropertyValueAsString("iscaut");
+               if(value.size())
+               {
+                  imageHeaderProperties->setProperty("iscaut", value);
+               }
+               value = imageHeader->getPropertyValueAsString("iscode");
+               if(value.size())
+               {
+                  imageHeaderProperties->setProperty("iscode", value);
+               }
+               value = imageHeader->getPropertyValueAsString("isctlh");
+               if(value.size())
+               {
+                  imageHeaderProperties->setProperty("isctlh", value);
+               }
+               value = imageHeader->getPropertyValueAsString("isrel");
+               if(value.size())
+               {
+                  imageHeaderProperties->setProperty("isrel", value);
+               }
+               value = imageHeader->getPropertyValueAsString("isctln");
+               if(value.size())
+               {
+                  imageHeaderProperties->setProperty("isctln", value);
+               }
+               value = imageHeader->getPropertyValueAsString("isdwng");
+               if(value.size())
+               {
+                  imageHeaderProperties->setProperty("isdevt", value);
+               }
+               value = imageHeader->getPropertyValueAsString("isorce");
+               if(value.size())
+               {
+                  imageHeaderProperties->setProperty("isorce", value);
+               }
+            }
+            value = imageHeader->getPropertyValueAsString("idatim");
+            if(value.size()==14)
+            {
+               if(nitf21Flag)
+               {
+                  ossimString year(value.begin()+2, value.begin()+4);
+                  ossimString mon(value.begin()+4, value.begin()+6);
+                  ossimString day(value.begin()+6, value.begin()+8);
+                  ossimString hour(value.begin()+8, value.begin()+10);
+                  ossimString min(value.begin()+10, value.begin()+12);
+                  ossimString sec(value.begin()+12, value.begin()+14);
+                  if(mon.toUInt32() < 13)
+                  {
+                     mon = monthConversionTable[mon.toUInt32()];
+                  }
+                  imageHeaderProperties->setProperty("idatim", day+hour+min+sec+"Z"+mon+year);
+               }
+               else
+               {
+                  imageHeaderProperties->setProperty("idatim", value);
+               }
+            }
+         }
+         
+         // we will port over only a selected few 
+      }
+   }
+}
+
+bool ossimNitf20Writer::saveState(ossimKeywordlist& kwl,
+                                  const char* prefix) const
+{
+   return ossimNitfWriterBase::saveState(kwl, prefix);
+}
+
+bool ossimNitf20Writer::loadState(const ossimKeywordlist& kwl,
+                                  const char* prefix)
+{
+   return ossimNitfWriterBase::loadState(kwl, prefix);
+}
+
diff --git a/ossim/src/ossim/imaging/ossimNitfTileSource.cpp b/ossim/src/ossim/imaging/ossimNitfTileSource.cpp
new file mode 100644
index 0000000..ea1c3d0
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimNitfTileSource.cpp
@@ -0,0 +1,3419 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:  Contains class definition for ossimNitfTileSource.
+// 
+//*******************************************************************
+//  $Id: ossimNitfTileSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimNitfTileSource.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimInterleaveTypeLut.h>
+#include <ossim/base/ossimPackedBits.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimBooleanProperty.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimJpegMemSrc.h>
+#include <ossim/imaging/ossimTiffTileSource.h>
+#include <ossim/imaging/ossimJpegDefaultTable.h>
+#include <ossim/base/ossim2dTo2dShiftTransform.h>
+#include <ossim/base/ossimContainerProperty.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/support_data/ossimNitfIchipbTag.h>
+#include <ossim/support_data/ossimNitfImageHeaderV2_0.h>
+#include <ossim/support_data/ossimNitfImageHeaderV2_1.h>
+#include <ossim/support_data/ossimNitfStdidcTag.h>
+#include <ossim/support_data/ossimNitfVqCompressionHeader.h>
+
+#if defined(JPEG_DUAL_MODE_8_12)
+#include <ossim/imaging/ossimNitfTileSource_12.h>
+#endif
+
+#include <jerror.h>
+#include <fstream>
+#include <algorithm> /* for std::fill */
+
+RTTI_DEF1_INST(ossimNitfTileSource, "ossimNitfTileSource", ossimImageHandler)
+
+#ifdef OSSIM_ID_ENABLED
+   static const char OSSIM_ID[] = "$Id: ossimNitfTileSource.cpp 23664 2015-12-14 14:17:27Z dburken $";
+#endif
+   
+//---
+// NOTE:  This should match the enumerations for ReadMode.
+//---
+static const char* READ_MODE[] = { "READ_MODE_UNKNOWN",
+                                   "READ_BIB_BLOCK",
+                                   "READ_BIP_BLOCK",
+                                   "READ_BIR_BLOCK",
+                                   "READ_BSQ_BLOCK",
+                                   "READ_BIB",
+                                   "READ_BIP",
+                                   "READ_BIR",
+                                   "READ_JPEG_BLOCK" };
+
+//***
+// Static trace for debugging
+//***
+static ossimTrace traceDebug("ossimNitfTileSource:debug");
+
+// 64x64*12bits
+// divide by 8 bits to get bytes gives you 6144 bytes
+static const ossim_uint32   OSSIM_NITF_VQ_BLOCKSIZE = 6144;
+
+ossimNitfTileSource::ossimNitfTileSource()
+   :
+      ossimImageHandler(),
+      theTile(0),
+      theCacheTile(0),
+      theNitfFile(new ossimNitfFile()),
+      theNitfImageHeader(0),
+      theReadMode(READ_MODE_UNKNOWN),
+      theScalarType(OSSIM_SCALAR_UNKNOWN),
+      theSwapBytesFlag(false),
+      theNumberOfInputBands(0),
+      theNumberOfOutputBands(0),
+      theBlockSizeInBytes(0),
+      theReadBlockSizeInBytes(0),
+      theNumberOfImages(0),
+      theCurrentEntry(0),
+      theImageRect(0,0,0,0),
+      theFileStr(),
+      theOutputBandList(),
+      theCacheSize(0, 0),
+      theCacheTileInterLeaveType(OSSIM_INTERLEAVE_UNKNOWN),
+      theCacheEnabledFlag(false),
+      theCacheId(-1),
+      thePackedBitsFlag(false),
+      theCompressedBuf(0),
+      theNitfBlockOffset(0),
+      theNitfBlockSize(0),
+      m_isJpeg12Bit(false),
+      m_jpegOffsetsDirty(false)
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfTileSource::ossimNitfTileSource entered..." << endl;
+#ifdef OSSIM_ID_ENABLED
+      ossimNotify(ossimNotifyLevel_DEBUG)<< "OSSIM_ID:  " << OSSIM_ID << endl;
+#endif
+   }
+
+}
+
+ossimNitfTileSource::~ossimNitfTileSource()
+{
+   destroy();
+}
+
+void ossimNitfTileSource::destroy()
+{
+   if (theCacheId != -1)
+   {
+      ossimAppFixedTileCache::instance()->deleteCache(theCacheId);
+      theCacheId = -1;
+   }
+
+   // Delete the list of image headers.
+   theNitfImageHeader.clear();
+
+   if(theFileStr.is_open())
+   {
+      theFileStr.close();
+   }
+
+   theCacheTile = 0;
+   theTile      = 0;
+   theOverview  = 0;
+ }
+
+bool ossimNitfTileSource::isOpen()const
+{
+   return (theNitfImageHeader.size() > 0);
+}
+
+bool ossimNitfTileSource::open()
+{
+   bool result = false;
+   
+   if(isOpen())
+   {
+      close();
+   }
+   
+   theErrorStatus = ossimErrorCodes::OSSIM_OK;
+
+   if ( parseFile() )
+   {
+      result = allocate();
+   }
+   if (result)
+   {
+      completeOpen();
+   }
+   
+   return result;
+}
+
+void ossimNitfTileSource::close()
+{
+   destroy();
+}
+
+bool ossimNitfTileSource::parseFile()
+{
+   static const char MODULE[] = "ossimNitfTileSource::parseFile";
+   
+   ossimFilename file = getFilename();
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " DEBUG: Nitf file =  " << file << endl;
+   }
+
+   if (file.empty())
+   {
+      setErrorStatus();
+      return false;
+   }
+
+   if ( !theNitfFile )  // A close deletes "theNitfFile".
+   {
+      theNitfFile = new ossimNitfFile();
+   }
+   
+   if ( !theNitfFile->parseFile(file) )
+   {
+      setErrorStatus();
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << "DEBUG:" << "\nError parsing file!" << endl;
+      }
+
+      return false;
+   }
+
+   // Get the number of images within the file.
+   theNumberOfImages = theNitfFile->getHeader()->getNumberOfImages();
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << "DEBUG:\nNumber of images "
+         <<theNumberOfImages << std::endl; 
+   }
+   
+   if ( theNumberOfImages == 0 )
+   {
+      setErrorStatus();
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << "DEBUG:\nNo images in file!" << endl;
+      }
+      
+      return false;
+   }
+   theEntryList.clear();
+   //---
+   // Get image header pointers.  Note there can be multiple images in one
+   // image file.
+   //---
+   for (ossim_uint32 i = 0; i < theNumberOfImages; ++i)
+   {
+      ossimRefPtr<ossimNitfImageHeader> hdr = theNitfFile->getNewImageHeader(i);
+      if (!hdr)
+      {
+         setErrorStatus();
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << " ERROR:\nNull image header!" << endl;
+         }
+         
+         return false;
+      }
+      if (traceDebug())
+      {
+         if(hdr.valid())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << MODULE << "DEBUG:"
+               << "\nImage header[" << i << "]:\n" << *hdr
+               << endl;
+         }
+      }
+
+      if( !hdr->isCompressed() )
+      {
+         // Skip entries tagged NODISPLAY, e.g. cloud mask entries.
+         if (hdr->getRepresentation() != "NODISPLY")
+         {
+            theEntryList.push_back(i);
+            theNitfImageHeader.push_back(hdr);
+         }
+         else 
+         {
+            ossimString cat = hdr->getCategory().trim().downcase();
+            // this is an NGA Highr Resoluion Digital Terrain Model NITF format
+            if(cat == "dtem")
+            {
+               theEntryList.push_back(i);
+               theNitfImageHeader.push_back(hdr);
+            }
+         }
+
+      }
+      else if ( canUncompress(hdr.get()) )
+      {
+         theEntryList.push_back(i);
+         theCacheEnabledFlag = true;
+         theNitfImageHeader.push_back(hdr);
+
+         if (hdr->getBitsPerPixelPerBand() == 8)
+         {
+            m_isJpeg12Bit = false;
+         }
+         else if (hdr->getBitsPerPixelPerBand() == 12)
+         {
+           m_isJpeg12Bit = true;
+         }
+      }
+      else
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "Entry " << i
+               <<" has an unsupported compression code = "
+               << hdr->getCompressionCode() << std::endl;
+         }
+         return false;
+      }
+   }
+
+   if(theEntryList.size()<1)
+   {
+      return false;
+   }
+   
+   //### WHY IS THIS HERE? THIS CAUSED A BUG BECAUSE theCurrentEntry was previously initialized 
+   //### in loadState() according to a KWL. Any entry index in the KWL was being ignored.
+   //if(theEntryList.size()>0)
+   //{
+   //   theCurrentEntry = theEntryList[0];
+   //}
+
+   theNumberOfImages = (ossim_uint32)theNitfImageHeader.size();
+   
+   if (theNitfImageHeader.size() != theNumberOfImages)
+   {
+      setErrorStatus();
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE
+            << "DEBUG:\nNumber of header not equal number of images!"
+            << endl;
+      }
+      
+      return false;
+   }
+
+   // Check the current entry range.
+   if ( theCurrentEntry >= theNumberOfImages )
+   {
+      if(theEntryList.size())
+      {
+         theCurrentEntry = theEntryList[0];
+      }
+   }
+   
+   // Initialize the lut to the current entry if the current entry has a lut.
+   initializeLut();
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " DEBUG:"
+         << "\nCurrent entry:  " << theCurrentEntry
+         << endl;
+   }
+
+
+   // Open up a stream to the file.
+   theFileStr.open(file.c_str(), ios::in | ios::binary);
+   if (!theFileStr)
+   {
+      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << " ERROR:"
+            << "\nCannot open:  " << file.c_str() << endl;
+      }
+      return false;
+   }
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " leaving with true..." << endl;
+      
+   }
+   
+   return true;
+}
+
+bool ossimNitfTileSource::allocate()
+{
+   // Clear out the cache if there was any.
+   if (theCacheId != -1)
+   {
+      ossimAppFixedTileCache::instance()->deleteCache(theCacheId);
+      theCacheId = -1;
+   }
+
+   // Clear buffers:
+   theTile = 0;
+   theCacheTile = 0;
+   theCompressedBuf.clear();
+
+   // Set the scalar type.
+   initializeScalarType();
+   if (theScalarType == OSSIM_SCALAR_UNKNOWN)
+   {
+      return false;
+   }
+
+   // Set the swap bytes flag.
+   initializeSwapBytesFlag();
+   
+   // Set the read mode.
+   initializeReadMode();
+   if (theReadMode == READ_MODE_UNKNOWN)
+   {
+      return false;
+   }
+   
+   // Set the number of bands.
+   initializeBandCount();
+   if (theNumberOfInputBands == 0)
+   {
+      return false;
+   }
+   
+   // Initialize the image rectangle. before the cache size is done
+   if (initializeImageRect() == false)
+   {
+      return false;
+   }
+   
+   // Initialize the cache size.  Must be done before
+   // setting the blocksize.  Since bit encoded data may very
+   // and we need to know if the nitf file needs to be accessed
+   // like a general raster.
+   //
+   initializeCacheSize();
+   if ( (theCacheSize.x == 0) || (theCacheSize.y == 0) )
+   {
+      return false;
+   }
+   
+   // Initialize the block size.
+   if (initializeBlockSize() == false)
+   {
+      return false;
+   }
+
+   // Initialize the cache tile interleave type.
+   initializeCacheTileInterLeaveType();
+   if (theCacheTileInterLeaveType == OSSIM_INTERLEAVE_UNKNOWN)
+   {
+      return false;
+   }
+
+   return true;
+}
+
+bool ossimNitfTileSource::allocateBuffers()
+{
+   //---
+   // Initialize the cache tile.  This will be used for a block buffer even
+   // if the cache is disabled.
+   //---
+   initializeCacheTile();
+   if (!theCacheTile.valid())
+   {
+      return false;
+   }
+
+   // Initialize the cache if enabled.
+   if (theCacheEnabledFlag)
+   {
+      theCacheId = ossimAppFixedTileCache::instance()->
+         newTileCache(theBlockImageRect, theCacheSize);
+   }
+
+   //---
+   // Initialize the compressed buffer if needed.
+   //---
+   initializeCompressedBuf();
+
+   //---
+   // Make the output tile.
+   //---
+   initializeOutputTile();
+
+   return true;
+}
+
+bool ossimNitfTileSource::canUncompress(const ossimNitfImageHeader* hdr) const
+{
+
+   bool result = false;
+   if (hdr)
+   {
+      ossimString code = hdr->getCompressionCode();
+
+      if (code == "C3") // jpeg
+      {
+         if (hdr->getBitsPerPixelPerBand() == 8)
+         {
+            result = true;
+         }
+         else if (hdr->getBitsPerPixelPerBand() == 12)
+         {
+           result = true;
+         }
+         else
+         {
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << "Entry with jpeg compression (C3) has an unsupported "
+                  << "JPEG data precision: " << hdr->getBitsPerPixelPerBand()
+                  << std::endl;
+            }
+         }
+      }
+      else if(isVqCompressed( code ) &&
+              (hdr->getCompressionHeader().valid()) )
+      {
+         // we will only support single band vq compressed NITFS
+         // basically CIB and CADRG products are single band code words.
+         //
+         if(hdr->getNumberOfBands() == 1)
+         {
+            result = true;
+         }
+      }
+   }
+   return result;
+}
+
+void ossimNitfTileSource::initializeReadMode()
+{
+   // Initialize the read mode.
+   theReadMode = READ_MODE_UNKNOWN;
+   
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if (!hdr)
+   {
+      return;
+   }
+
+   ossim_uint32 numberOfBlocks = getNumberOfBlocks();
+   ossimString imode           = hdr->getIMode();
+   ossimString compressionCode = hdr->getCompressionCode();
+
+   if ( (compressionCode == "C3") && ((imode == "B")||(imode == "P")) )
+   {
+      theReadMode = READ_JPEG_BLOCK; 
+   }
+   else if (numberOfBlocks > 1)
+   {
+      if (imode == "B")
+      {
+         theReadMode = READ_BIB_BLOCK;
+      }
+      else if (imode == "P")
+      {
+         theReadMode = READ_BIP_BLOCK;
+      }
+      else if (imode == "R")
+      {
+         theReadMode = READ_BIR_BLOCK;
+      }
+      else if (imode == "S")
+      {
+         theReadMode = READ_BSQ_BLOCK;
+      }
+   }
+   else // The entire image comprises one block.
+   {
+      if (imode == "B")
+      {
+         theReadMode = READ_BIB;
+      }
+      else if (imode == "P")
+      {
+         theReadMode = READ_BIP;
+      }
+      else if (imode == "R")
+      {
+         theReadMode = READ_BIR;
+      }
+      else if (imode == "S")
+      {
+         theReadMode = READ_BSQ_BLOCK;
+      }
+   }        
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfTileSource::initializeReadMode DEBUG:"
+         << "\nnumberOfBlocks:  " << numberOfBlocks
+         << "\nIMODE:           " << imode
+         << "\nRead Mode:       " << READ_MODE[theReadMode]
+         << endl;
+   }
+}
+
+void ossimNitfTileSource::initializeScalarType()
+{
+   thePackedBitsFlag = false;
+   // Initialize the read mode.
+   theScalarType = OSSIM_SCALAR_UNKNOWN;
+   
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if (!hdr)
+   {
+      return;
+   }
+
+   ossim_int32 bitsPerPixel = hdr->getActualBitsPerPixelPerBand();
+   if (bitsPerPixel < 1)
+   {
+      bitsPerPixel = hdr->getBitsPerPixelPerBand();
+   }
+
+   ossimString pixelValueType = hdr->getPixelValueType().upcase();
+   
+   switch (bitsPerPixel)
+   {
+      case 8:
+      {
+         theScalarType = OSSIM_UINT8;
+         break;
+      }
+      case 11:
+      {
+         if(pixelValueType == "SI")
+         {
+            theScalarType = OSSIM_SINT16;
+         }
+         else
+         {
+            theScalarType = OSSIM_USHORT11;
+         }
+         break;
+      }
+      case  9:
+      case 10:
+      case 12:
+      case 13:
+      case 14:
+      case 15:
+      case 16:         
+      {
+         if(pixelValueType == "SI")
+         {
+            theScalarType = OSSIM_SINT16;
+         }
+         else
+         {
+            theScalarType = OSSIM_UINT16;
+         }
+         break;
+      }
+      case 32:
+      {
+         if(pixelValueType == "SI")
+         {
+            theScalarType = OSSIM_SINT32;
+         }
+         else if(pixelValueType == "R")
+         {
+            theScalarType = OSSIM_FLOAT32;
+         }
+         break;
+      }
+      case 64:
+      {
+         if(pixelValueType == "R")
+         {
+            theScalarType = OSSIM_FLOAT64;
+         }
+         
+         break;
+      }
+      default:
+      {
+         if(hdr->isCompressed())
+         {
+            thePackedBitsFlag = true;
+            if(bitsPerPixel < 8)
+            {
+               theScalarType = OSSIM_UINT8;
+            }
+            else if(bitsPerPixel < 16)
+            {
+               theScalarType = OSSIM_UINT16;
+            }
+            else if(bitsPerPixel < 32)
+            {
+               theScalarType = OSSIM_FLOAT32;
+            }
+         }
+         else
+         {
+            if(bitsPerPixel<8)
+            {
+               theScalarType = OSSIM_UINT8;
+            }
+         }
+         break;
+      }
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfTileSource::initializeScalarType DEBUG:"
+         << "\nScalar type:  "
+         << (ossimScalarTypeLut::instance()->getEntryString(theScalarType))
+         << "\nPacked bits:  " << (thePackedBitsFlag?"true":"false")
+         << endl;
+   }
+}
+
+void ossimNitfTileSource::initializeSwapBytesFlag()
+{
+   if ( (theScalarType != OSSIM_UINT8) &&
+        (ossim::byteOrder() == OSSIM_LITTLE_ENDIAN) )
+   {
+      theSwapBytesFlag = true;
+   }
+   else
+   {
+     theSwapBytesFlag = false;
+   }
+}
+
+void ossimNitfTileSource::initializeBandCount()
+{
+   // Initialize the read mode.
+   theNumberOfInputBands = 0;
+   theNumberOfOutputBands = 0;
+   theOutputBandList.clear();
+   
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if (!hdr)
+   {
+      return;
+   }
+
+   if(!isVqCompressed(hdr->getCompressionCode()))
+   {
+      theNumberOfInputBands = hdr->getNumberOfBands();
+      theNumberOfOutputBands = hdr->getNumberOfBands();
+      if(hdr->getRepresentation().contains("LUT")&&(theNumberOfInputBands == 1))
+      {
+         theNumberOfOutputBands = 3;
+      }
+   }
+   else 
+   {
+      ossimRefPtr<ossimNitfImageBand> bandInfo = hdr->getBandInformation(0);
+      if ( bandInfo.valid() )
+      {
+         theNumberOfInputBands = 1;
+         theNumberOfOutputBands = bandInfo->getNumberOfLuts();
+      }
+   }
+   
+   theOutputBandList.resize(theNumberOfOutputBands);
+   
+   for (ossim_uint32 i=0; i < theNumberOfOutputBands; ++i)
+   {
+      theOutputBandList[i] = i; // One to one for initial setup.
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfTileSource::initializeBandCount DEBUG:"
+         << "\nInput Band count:  " << theNumberOfInputBands
+         << "\nOutput Band count:  " << theNumberOfOutputBands
+         << endl;
+   }
+}
+
+bool ossimNitfTileSource::initializeBlockSize()
+{
+   theBlockSizeInBytes     = 0;
+   theReadBlockSizeInBytes = 0;
+   
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if (!hdr)
+   {
+      return false;
+   }
+
+   ossim_uint32 bytesRowCol = 0;
+   ossim_uint32 bytesRowColCacheTile = 0;
+
+   if(isVqCompressed(hdr->getCompressionCode()))
+   {
+      bytesRowCol = OSSIM_NITF_VQ_BLOCKSIZE;
+   }
+   else
+   {
+      bytesRowCol = (hdr->getNumberOfPixelsPerBlockHoriz()*
+                     hdr->getNumberOfPixelsPerBlockVert()*
+                     hdr->getBitsPerPixelPerBand()) / 8;
+   }
+   
+   bytesRowColCacheTile = (theCacheSize.x*
+                           theCacheSize.y*
+                           hdr->getBitsPerPixelPerBand())/8;
+
+#if 0
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG:"
+         << "\ncompressionHeader:  " << compressionHeader
+         << "\ngetNumberOfPixelsPerBlockHoriz():  "
+         << hdr->getNumberOfPixelsPerBlockHoriz()
+         << "\ngetNumberOfPixelsPerBlockVert():  "
+         << hdr->getNumberOfPixelsPerBlockVert()
+         << "\ngetBitsPerPixelPerBand():  "
+         << hdr->getBitsPerPixelPerBand()
+         << "\nbytesRowCol:  " << bytesRowCol
+         << "\nbytesRowColCacheTile:  " << bytesRowColCacheTile
+         << endl;
+   }
+#endif
+   
+   theBlockSizeInBytes = bytesRowCol;
+   theReadBlockSizeInBytes = theBlockSizeInBytes;
+   switch (theReadMode)
+   {
+      case READ_BSQ_BLOCK:
+      case READ_BIB_BLOCK:
+      {
+         break;
+      }
+      case READ_BIB:
+      {
+         theReadBlockSizeInBytes = bytesRowColCacheTile;
+         break;
+      }
+      
+      case READ_BIP_BLOCK:
+      case READ_BIR_BLOCK:
+      {
+         theBlockSizeInBytes     *= theNumberOfInputBands;
+         theReadBlockSizeInBytes *= theNumberOfInputBands;
+         break;
+      }
+      case READ_BIP:
+      case READ_BIR:   
+      {
+         theBlockSizeInBytes *= theNumberOfInputBands;
+         theReadBlockSizeInBytes = bytesRowColCacheTile*theNumberOfInputBands;
+         break;
+      }
+      case READ_JPEG_BLOCK:
+      {
+         theBlockSizeInBytes *= theNumberOfInputBands;
+         ossimString code = hdr->getCompressionCode();
+         if (code == "C3") // jpeg
+         {
+            m_jpegOffsetsDirty  = true;
+         }
+         break;
+      }
+      default:
+      {
+         return false;
+      }
+   }
+
+//#if 0
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfTileSource::initializeBlockSize DEBUG:"
+         << "\nNumber of input bands:          " << theNumberOfInputBands
+         << "\nNumber of output bands:          " << theNumberOfOutputBands
+         << "\nBlock size in bytes:      " << theBlockSizeInBytes
+         << "\nRead block size in bytes: " << theReadBlockSizeInBytes
+         << endl;
+   }
+//#endif
+
+   return true;
+}
+
+//*************************************************************************************************
+// Virtual method determines the decimation factors at each resolution level. 
+// This implementation derives the R0 decimation from the image metadata if available, then hands
+// off the computation of remaining R-levels to the base class implementation.
+//*************************************************************************************************
+void ossimNitfTileSource::establishDecimationFactors()
+{
+   theDecimationFactors.clear();
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if (hdr)
+   {
+      double decimation;
+      hdr->getDecimationFactor(decimation);
+      if ((decimation != 0.0) && !ossim::isnan(decimation))
+      {
+         //---
+         // Note: Commented out as other code is picking up the resolution and then we're applying
+         // a decimation on top of that. (drb Aug. 2011)
+         // ossimDpt dec_2d (decimation, decimation);
+         //---
+         ossimDpt dec_2d (1.0, 1.0);
+         theDecimationFactors.push_back(dec_2d);
+      }
+   }
+
+   // Just needed to set the first R level here, the base class can do the rest:
+   ossimImageHandler::establishDecimationFactors();
+}
+
+#if 0
+ossimImageGeometry* ossimNitfTileSource::getImageGeometry()
+{
+   //---
+   // Call base class getImageGeometry which will check for external geometry
+   // or an already set geometry.
+   //---
+   ossimImageGeometry* result = ossimImageHandler::getImageGeometry();
+
+   if (result)
+   {
+      if ( !result->getTransform() )
+      {
+         ossimRefPtr<ossim2dTo2dTransform> transform = 0;
+         
+         const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+         if (hdr)
+         {
+            //---
+            // Test for the ichipb tag and set the sub image if needed.
+            // 
+            // NOTE # 1:
+            // 
+            // There are nitf writers that set the ichipb offsets and only have
+            // IGEOLO field present.  For these it has been determined
+            // (but still in question) that we should not apply the sub image
+            // offset.
+            //
+            // See trac # 1578
+            // http://trac.osgeo.org/ossim/ticket/1578
+            //
+            // NOTE # 2:
+            //
+            // Let the ICHIPB have precedence over the STDIDC tag as we could
+            // have a chip of a segment.
+            //---
+            ossimRefPtr<ossimNitfRegisteredTag> tag =
+               hdr->getTagData(ossimString("ICHIPB"));
+            if (tag.valid())
+            {
+               ossimNitfIchipbTag* ichipb =
+                  PTR_CAST(ossimNitfIchipbTag, tag.get());
+               if (ichipb)
+               {
+//                  const ossimRefPtr<ossimNitfRegisteredTag> blocka =
+//                     hdr->getTagData(ossimString("BLOCKA"));
+//                  const ossimRefPtr<ossimNitfRegisteredTag> rpc00a =
+//                     hdr->getTagData(ossimString("RPC00A"));              
+//                  const ossimRefPtr<ossimNitfRegisteredTag> rpc00b =
+//                     hdr->getTagData(ossimString("RPC00B"));
+                  
+                  //---
+                  // If any of these tags are present we will use the sub
+                  // image from the ichipb tag.
+                  //---
+//                  if ( blocka.get() || rpc00a.get() || rpc00b.get() )
+                  // ************************* THERE ARE PROBLEMS NOT SETTING THIS AT SITE.  GO AHEAD AND ALWAYS INIT THE SHIFT
+                  {
+                     transform = ichipb->newTransform();
+                  }
+               }
+            }
+   
+            if ( !transform)
+            {
+               //---
+               // Look for the STDIDC tag for a sub image (segment) offset.
+               //
+               // See: STDI-002 Table 7.3 for documentation.
+               //---
+               tag = hdr->getTagData(ossimString("STDIDC"));
+               if (tag.valid() && (hdr->getIMode() == "B") )
+               {
+                  ossimDpt shift;
+                  ossimNitfStdidcTag* stdidc =
+                     PTR_CAST(ossimNitfStdidcTag, tag.get());
+                  if (stdidc)
+                  {
+                     ossim_int32 startCol = stdidc->getStartColumn().toInt32();
+                     ossim_int32 startRow = stdidc->getStartRow().toInt32();
+                     if ( (startCol > 0) && (startRow > 0) )
+                     {
+                        
+                        // field are one based; hence, the - 1.
+                        shift.x = (startCol-1) *
+                           hdr->getNumberOfPixelsPerBlockHoriz();
+                        shift.y = (startRow-1) *
+                           hdr->getNumberOfPixelsPerBlockVert();
+                     }
+                     if(shift.x > 0 ||
+                        shift.y > 0)
+                     {
+                        transform = new ossim2dTo2dShiftTransform(shift);
+                     }
+                  }
+               }
+            }
+            
+         } // matches: if (hdr)
+
+         if ( transform.valid() )
+         {
+            result->setTransform( transform.get() );
+         }
+         //else
+         //{
+         //   ossimImageGeometryRegistry::instance()->createTransform(this);
+         //}
+         
+         
+      } // matches: if ( !result->getTransform() )
+
+      if ( !result->getProjection() )
+      {
+         ossimRefPtr<ossimProjection> proj =
+            ossimProjectionFactoryRegistry::instance()->
+               createProjection(this);
+         if ( proj.valid() )
+         {
+            result->setProjection( proj.get() );
+         }
+         //else
+         //{
+         //   ossimImageGeometryRegistry::instance()->createProjection(this);
+         //}
+         
+      }
+      
+   } // matches: if (result)
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfTileSource::createImageGeometry DEBUG:\n";
+
+      if (result)
+      {
+         result->print(ossimNotify(ossimNotifyLevel_DEBUG)) << "\n";
+      }
+   }
+
+   return result;
+}
+#endif
+
+bool ossimNitfTileSource::initializeImageRect()
+{
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if (!hdr)
+   {
+      theImageRect.makeNan();
+      return false;
+   }
+   
+   theBlockImageRect = hdr->getBlockImageRect();
+   theImageRect      = hdr->getImageRect();
+
+   if (traceDebug())
+   {
+      ossimIpt iloc;
+      hdr->getImageLocation(iloc); // for temp debug (drb)
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfTileSource::initializeImageRect DEBUG:"
+         << "\noffset from ILOC field:  " << iloc
+         << "\nImage Rect:              " << theImageRect
+         << "\nBlock rect:              " << theBlockImageRect
+         << endl;
+   }
+   return true;
+}
+
+void ossimNitfTileSource::initializeCacheSize()
+{
+   theCacheSize.x = 0;
+   theCacheSize.y = 0;
+   
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if (!hdr)
+   {
+      return;
+   }
+   switch (theReadMode)
+   {
+      case READ_BIB_BLOCK:
+      case READ_BIP_BLOCK:
+      case READ_BIR_BLOCK:
+      case READ_BSQ_BLOCK:
+      case READ_JPEG_BLOCK:
+         theCacheSize.x = hdr->getNumberOfPixelsPerBlockHoriz();
+         theCacheSize.y = hdr->getNumberOfPixelsPerBlockVert();
+         break;
+
+      case READ_BIB:
+      case READ_BIP:
+      case READ_BIR:
+         theCacheSize.x = hdr->getNumberOfPixelsPerBlockHoriz();
+         theCacheSize.y = hdr->getNumberOfPixelsPerBlockVert();
+//          theCacheSize.x = getNumberOfSamples(0);
+//          theCacheSize.y = getTileHeight();
+//          if(theCacheSize.y > hdr->getNumberOfPixelsPerBlockVert())
+//          {
+//             theCacheSize.y = hdr->getNumberOfPixelsPerBlockVert();
+//          }
+         break;
+
+      default:
+         break;
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfTileSource::initializeCacheSize DEBUG:"
+         << "\nCache size:  " << theCacheSize
+         << endl;
+   }
+}
+
+void ossimNitfTileSource::initializeCacheTileInterLeaveType()
+{
+   theCacheTileInterLeaveType = OSSIM_INTERLEAVE_UNKNOWN;
+   
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if (!hdr)
+   {
+      return;
+   }
+
+   switch (theReadMode)
+   {
+      case READ_BIB_BLOCK:
+      case READ_BSQ_BLOCK:
+      case READ_BIB:
+      case READ_JPEG_BLOCK:  
+         theCacheTileInterLeaveType = OSSIM_BSQ;
+         break;
+
+      case READ_BIP_BLOCK:
+      case READ_BIP:
+         theCacheTileInterLeaveType = OSSIM_BIP;
+         break;
+
+      case READ_BIR_BLOCK:
+      case READ_BIR:
+         theCacheTileInterLeaveType = OSSIM_BIL;
+         break;
+
+      default:
+         break;
+   }
+
+   if (traceDebug())
+   {
+      ossimInterleaveTypeLut lut;
+      
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfTileSource::initializeCacheTileInterLeaveType DEBUG:"
+         << "\nCache tile interleave type:  "
+         << lut.getEntryString(theCacheTileInterLeaveType)
+         << endl;
+   }
+}
+
+void ossimNitfTileSource::initializeCacheTile()
+{
+   theCacheTile = ossimImageDataFactory::instance()->create(
+      this,
+      theScalarType,
+      theNumberOfOutputBands,
+      theCacheSize.x,
+      theCacheSize.y);
+
+   theCacheTile->initialize();
+}
+
+void ossimNitfTileSource::initializeCompressedBuf()
+{
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if (!hdr)
+   {
+      return;
+   }
+
+   if( (hdr->getRepresentation().upcase().contains("LUT")) ||
+       ( isVqCompressed(hdr->getCompressionCode()) ) )
+   {
+      theCompressedBuf.resize(theReadBlockSizeInBytes);
+      std::fill(theCompressedBuf.begin(), theCompressedBuf.end(), '\0');
+   }
+}
+
+void ossimNitfTileSource::initializeOutputTile()
+{
+   //---
+   // Make the output tile.  This implementation will use default tile size.
+   ossimImageDataFactory* idf = ossimImageDataFactory::instance();
+   theTile = idf->create(this, this);
+   theTile->initialize();
+}
+
+void ossimNitfTileSource::initializeLut()
+{
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if (hdr)
+   {
+      if ( hdr->hasLut() )
+      {
+         //---
+         // NOTE: Only band 0 ??? (drb)
+         //---
+         theLut = theNitfImageHeader[theCurrentEntry]->createLut(0);
+      }
+   }
+}
+
+ossimRefPtr<ossimImageData> ossimNitfTileSource::getTile(
+   const  ossimIrect& tileRect, ossim_uint32 resLevel)
+{
+   // This tile source bypassed, or invalid res level, return a blank tile.
+   if(!isSourceEnabled() || !isOpen() || !isValidRLevel(resLevel))
+   {
+      return ossimRefPtr<ossimImageData>();
+   }
+
+   if ( !theTile.valid() )
+   {
+      // First call to getTile:
+      allocateBuffers();
+      if ( !theTile.valid() )
+      {
+         return theTile;
+      }
+   }
+
+   // Rectangle must be set prior to getOverviewTile call.
+   theTile->setImageRectangle(tileRect);
+
+   if (resLevel)
+   {
+      if ( getOverviewTile(resLevel, theTile.get() ) )
+      {
+         return theTile;
+      }
+   }
+   
+   ossim_uint32 level = resLevel;
+   if (theStartingResLevel)  // Used as overview.
+   {
+      if (theStartingResLevel <= resLevel)
+      {
+         //---
+         // Adjust the level to be relative to the reader using this as
+         // overview.
+         //---
+         level -= theStartingResLevel; 
+      }
+   }
+
+   //---
+   // See if the whole tile is going to be filled, if not, start out with
+   // a blank tile so data from a previous load gets wiped out.
+   //---
+   if ( !tileRect.completely_within(theImageRect) )
+   {
+      // Start with a blank tile.
+      theTile->makeBlank();
+   }
+
+   //---
+   // See if any point of the requested tile is in the image.
+   //---
+   if ( tileRect.intersects(theBlockImageRect) )
+   {
+      ossimIrect clipRect = tileRect.clipToRect(theImageRect);
+            
+      // See if the requested clip rect is already in the cache tile.
+      if ( (clipRect.completely_within(theCacheTile->getImageRectangle()))&&
+           (theCacheTile->getDataObjectStatus() != OSSIM_EMPTY)&&
+           (theCacheTile->getBuf()))
+      {
+         //---
+         // Note: Clip the cache tile(nitf block) to the image clipRect since
+         // there are nitf blocks that go beyond the image dimensions, i.e.,
+         // edge blocks.
+         //---
+         ossimIrect cr =
+               theCacheTile->getImageRectangle().clipToRect(clipRect);
+         theTile->loadTile(theCacheTile->getBuf(),
+                           theCacheTile->getImageRectangle(),
+                           cr,
+                           theCacheTileInterLeaveType);
+         //---
+         // Validate the tile.  This will set the status to full, partial
+         // or empty.  Must be performed if any type of combining is to be
+         // performed down the chain.
+         //---
+         theTile->validate();
+      }
+      else
+      {
+         if ( loadTile(clipRect) == true )
+         {
+            //---
+            // Validate the tile.  This will set the status to full, partial
+            // or empty.  Must be performed if any type of combining is to be
+            // performed down the chain.
+            //---
+            theTile->validate();
+         }
+         else
+         {
+            //---
+            // Commented setting error status out for jpeg data that had several bad
+            // blocks but the rest of the image was good.  If the error status is
+            // set the overview builder stops! (drb) 10 May 2013
+            // Flag an error for callers:
+            // setErrorStatus();
+            
+            ossimNotify(ossimNotifyLevel_WARN)
+               << __FILE__ << " " << __LINE__
+               << " loadTile failed!"
+               << std::endl;
+
+            theTile->makeBlank(); // loadTile failed...
+         }
+      }
+   } // End of if ( tileRect.intersects(image_rect) )
+
+   return theTile;   
+}
+
+bool ossimNitfTileSource::loadTile(const ossimIrect& clipRect)
+{
+   ossimIrect zbClipRect  = clipRect;
+
+   const ossim_uint32 BLOCK_HEIGHT = theCacheSize.y;
+   const ossim_uint32 BLOCK_WIDTH  = theCacheSize.x;
+
+   zbClipRect.stretchToTileBoundary(ossimIpt(BLOCK_WIDTH, BLOCK_HEIGHT));
+   
+   //---
+   // Shift the upper left corner of the "clip_rect" to the an even nitf
+   // block boundry.  
+   //---
+   ossimIpt nitfBlockOrigin = zbClipRect.ul();
+
+   // Vertical block loop.
+   ossim_int32 y = nitfBlockOrigin.y;
+   while (y < zbClipRect.lr().y)
+   {
+      // Horizontal block loop.
+      ossim_int32 x = nitfBlockOrigin.x;
+      while (x < zbClipRect.lr().x)
+      {
+         if ( loadBlockFromCache(x, y, clipRect) == false )
+         {
+            if ( loadBlock(x, y) )
+            {
+               //---
+               // Note: Clip the cache tile(nitf block) to the image clipRect
+               // since there are nitf blocks that go beyond the image
+               // dimensions, i.e., edge blocks.
+               //---    
+               ossimIrect cr =
+                  theCacheTile->getImageRectangle().clipToRect(clipRect);
+               
+               theTile->loadTile(theCacheTile->getBuf(),
+                                 theCacheTile->getImageRectangle(),
+                                 cr,
+                                 theCacheTileInterLeaveType);
+            }
+            else
+            {
+               // Error loading...
+               return false;
+            }
+         }
+         
+         x += BLOCK_WIDTH; // Go to next block.
+      }
+      
+      y += BLOCK_HEIGHT; // Go to next row of blocks.
+   }
+
+   return true;
+}
+
+bool ossimNitfTileSource::loadBlockFromCache(ossim_uint32 x, ossim_uint32 y,
+                                             const ossimIrect& clipRect)
+{
+   bool result = false;
+   
+   if (theCacheEnabledFlag)
+   {
+      //---
+      // The origin set in the cache tile must have the sub image offset in it
+      // since "theTile" is relative to any sub image offset.  This is so that
+      // "theTile->loadTile(theCacheTile)" will work.
+      //---
+      ossimIpt origin(x, y);
+
+      ossimRefPtr<ossimImageData> tempTile =
+         ossimAppFixedTileCache::instance()->getTile(theCacheId, origin);
+      if (tempTile.valid())
+      {
+         //---
+         // Note: Clip the cache tile(nitf block) to the image clipRect since
+         // there are nitf blocks that go beyond the image dimensions, i.e.,
+         // edge blocks.
+         //---    
+         ossimIrect cr =
+            tempTile->getImageRectangle().clipToRect(clipRect);
+
+         theTile->loadTile(tempTile.get()->getBuf(),
+                           tempTile->getImageRectangle(),
+                           cr,
+                           theCacheTileInterLeaveType);
+         result = true;
+      }
+   }
+   
+   return result;
+}
+
+bool ossimNitfTileSource::loadBlock(ossim_uint32 x, ossim_uint32 y)
+{
+#if 0
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfTileSource::loadBlock DEBUG:"
+         << "  x:  " << x << " y:  " << y << endl;
+   }
+#endif
+   
+   //---
+   // The origin set in the cache tile must have the sub image offset in it
+   // since "theTile" is relative to any sub image offset.  This is so that
+   // "theTile->loadTile(theCacheTile)" will work.
+   //---
+   ossimIpt origin(x, y);
+    
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   theCacheTile->setOrigin(origin);
+   ossim_uint32 readSize = theReadBlockSizeInBytes;
+   if(!theCacheTile->getImageRectangle().completely_within(theBlockImageRect))
+   {
+      readSize = getPartialReadSize(origin);
+   }
+   if((hdr->hasBlockMaskRecords())||
+      (readSize != theReadBlockSizeInBytes))
+   {
+      theCacheTile->makeBlank();
+   }
+
+   switch (theReadMode)
+   {
+      case READ_BIR:  
+      case READ_BIR_BLOCK:
+      case READ_BIP:  
+      case READ_BIP_BLOCK:
+      {
+         std::streamoff p;
+         if(getPosition(p, x, y, 0))
+         {
+            theFileStr.seekg(p, ios::beg);
+            char* buf = (char*)(theCacheTile->getBuf());
+            if (!theFileStr.read(buf, readSize))
+            {
+               theFileStr.clear();
+               ossimNotify(ossimNotifyLevel_FATAL)
+                  << "ossimNitfTileSource::loadBlock BIP Read Error!"
+                  << "\nReturning error..." << endl;
+               theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+               
+               return false;
+            }
+         }
+         break;
+      }
+      case READ_BSQ_BLOCK:
+      case READ_BIB_BLOCK:
+      case READ_BIB:
+      {
+         //---
+         // NOTE:
+         // With some of these types we could do one read and get all bands.
+         // The reads are done per for future enabling on band selection
+         // at the image handler level.
+         //---
+         for (ossim_uint32 band = 0; band < theNumberOfInputBands; ++band)
+         {
+            ossim_uint8* buf =0;
+            if(isVqCompressed(hdr->getCompressionCode())||
+               hdr->getRepresentation().upcase().contains("LUT"))
+            {
+               buf = (ossim_uint8*)&(theCompressedBuf.front());
+            }
+            else
+            {
+               buf = (ossim_uint8*)(theCacheTile->getBuf(band));
+            }
+            std::streamoff p;
+            if(getPosition(p, x, y, band))
+            {
+               theFileStr.seekg(p, ios::beg);
+               if (!theFileStr.read((char*)buf, readSize))
+               {
+                  theFileStr.clear();
+                  ossimNotify(ossimNotifyLevel_FATAL)
+                     << "ossimNitfTileSource::loadBlock Read Error!"
+                     << "\nReturning error..." << endl;
+                  theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+                  return false;
+               }
+               else if(hdr->getCompressionCode() == "C4")
+               {
+                  vqUncompressC4(theCacheTile,
+                                 (ossim_uint8*)&(theCompressedBuf.front()));
+               }
+
+               else if(hdr->getCompressionCode() == "M4")
+               {
+                  vqUncompressM4(theCacheTile,
+                                 (ossim_uint8*)&(theCompressedBuf.front()));
+               }
+               else if(hdr->getRepresentation().upcase().contains("LUT"))
+               {
+                  lutUncompress(theCacheTile,
+                                (ossim_uint8*)&(theCompressedBuf.front()));
+               }
+            }
+         }
+         break;
+      }
+      case READ_JPEG_BLOCK:
+      {
+         if (uncompressJpegBlock(x, y) == false)
+         {
+            theCacheTile->makeBlank();
+            theFileStr.clear();
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << "ossimNitfTileSource::loadBlock Read Error!"
+               << "\nReturning error..." << endl;
+            return false;
+         }
+         break;
+      }
+      default:
+         break;
+   }
+   
+   if(thePackedBitsFlag)
+   {
+      explodePackedBits(theCacheTile);
+   }
+   // Check for swap bytes.
+   if (theSwapBytesFlag)
+   {
+      ossimEndian swapper;
+      swapper.swap(theScalarType,
+                   theCacheTile->getBuf(),
+                   theCacheTile->getSize());
+   }
+
+   if ( !isVqCompressed(hdr->getCompressionCode()) )
+   {
+      convertTransparentToNull(theCacheTile);
+   }
+
+   // Set the origin of the cache tile.
+   theCacheTile->validate();
+   if (theCacheEnabledFlag)
+   {
+      // Add it to the cache for the next time.
+      ossimAppFixedTileCache::instance()->addTile(theCacheId, theCacheTile);
+   }
+   
+   return true;
+}
+
+void ossimNitfTileSource::explodePackedBits(ossimRefPtr<ossimImageData> packedBuffer)const
+{
+   ossim_uint8* tempBuf = new ossim_uint8[packedBuffer->getSizePerBandInBytes()];
+   ossim_uint32 idx      = 0;
+   ossim_uint32 bandIdx  = 0;
+   ossim_uint32 h = packedBuffer->getHeight();
+   ossim_uint32 w = packedBuffer->getWidth();
+   ossim_uint32 maxIdx = w*h;
+   ossim_uint32 bandCount = packedBuffer->getNumberOfBands();
+   switch(packedBuffer->getScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         
+         ossim_uint8* outputBuf = (ossim_uint8*)tempBuf;
+         for(bandIdx = 0; bandIdx < bandCount; ++bandIdx)
+         {
+            ossimPackedBits packedBits((ossim_uint8*)packedBuffer->getBuf(bandIdx),
+                                           getCurrentImageHeader()->getBitsPerPixelPerBand());
+            for(idx = 0; idx < maxIdx; ++idx)
+            {
+               *outputBuf = (ossim_uint8)packedBits.getValueAsUint32(idx);
+               ++outputBuf;
+            }
+            
+            memcpy((char*)packedBuffer->getBuf(bandIdx),
+                   (char*)tempBuf,
+                   theCacheTile->getSizePerBandInBytes()*bandCount);
+         }
+         break;
+      }
+      case OSSIM_UINT16:
+      {
+         
+         ossim_uint16* outputBuf = (ossim_uint16*)tempBuf;
+         for(bandIdx = 0; bandIdx < bandCount; ++bandIdx)
+         {
+            ossimPackedBits packedBits((ossim_uint8*)packedBuffer->getBuf(bandIdx),
+                                           getCurrentImageHeader()->getBitsPerPixelPerBand());
+            for(idx = 0; idx < maxIdx; ++idx)
+            {
+               *outputBuf = (ossim_uint16)packedBits.getValueAsUint32(idx);
+               ++outputBuf;
+            }
+            
+            memcpy((char*)packedBuffer->getBuf(bandIdx),
+                   (char*)tempBuf,
+                   theCacheTile->getSizePerBandInBytes()*bandCount);
+         }
+         break;
+      }
+      case OSSIM_FLOAT:
+      {
+         ossim_float32* outputBuf = (ossim_float32*)tempBuf;
+         for(bandIdx = 0; bandIdx < bandCount; ++bandIdx)
+         {
+            ossimPackedBits packedBits((ossim_uint8*)packedBuffer->getBuf(bandIdx),
+                                           getCurrentImageHeader()->getBitsPerPixelPerBand());
+            for(idx = 0; idx < maxIdx; ++idx)
+            {
+               *outputBuf = (ossim_float32)packedBits.getValueAsUint32(idx);
+               ++outputBuf;
+            }
+            
+            memcpy((char*)packedBuffer->getBuf(bandIdx),
+                   (char*)tempBuf,
+                   theCacheTile->getSizePerBandInBytes()*bandCount);
+         }
+         break;
+      }
+      default:
+      {
+         break;
+      }
+   }
+   delete [] tempBuf;
+}
+
+void ossimNitfTileSource::convertTransparentToNull(ossimRefPtr<ossimImageData> tile)const
+{
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+
+   if(!hdr||!tile) return;
+
+   if(!tile->getBuf()) return;
+   ossimIpt tempOrigin = tile->getOrigin();
+   ossim_uint32 blockNumber = getBlockNumber(tempOrigin);
+   ossim_uint32 numberOfBands = tile->getNumberOfBands();
+   ossim_uint32 band = 0;
+
+   if(hdr->hasPadPixelMaskRecords())
+   {
+      if(hdr->hasTransparentCode())
+      {
+         ossim_uint32 idx = 0;
+         ossim_uint32 maxIdx = tile->getWidth()*tile->getHeight();
+         
+         for (band = 0; band < numberOfBands; ++band)
+         {
+            if(hdr->getPadPixelMaskRecordOffset(blockNumber,
+                                                band)!=0xffffffff)
+            {
+               switch(tile->getScalarType())
+               {
+                  case OSSIM_UINT8:
+                  {
+                     ossim_uint8 transparentValue = hdr->getTransparentCode();
+                     ossim_uint8* buf = (ossim_uint8*)tile->getBuf(band);
+                     ossim_uint8 nullPix = (ossim_uint8)tile->getNullPix(band);
+                     for(idx = 0; idx < maxIdx; ++idx)
+                     {
+                        if(*buf == transparentValue)
+                        {
+                           *buf = nullPix;
+                        }
+                        ++buf;
+                     }
+                     break;
+                  }
+                  case OSSIM_USHORT11:
+                  case OSSIM_UINT16:
+                  {
+                     ossim_uint16 transparentValue = hdr->getTransparentCode();
+                     ossim_uint16* buf = (ossim_uint16*)tile->getBuf(band);
+                     ossim_uint16 nullPix = (ossim_uint16)tile->getNullPix(band);
+                     for(idx = 0; idx < maxIdx; ++idx)
+                     {
+                        if(*buf == transparentValue)
+                        {
+                           *buf = nullPix;
+                        }
+                        ++buf;
+                     }
+                     break;
+                  }
+                  case OSSIM_SINT16:
+                  {
+                     ossim_sint16 transparentValue = hdr->getTransparentCode();
+                     ossim_sint16* buf = (ossim_sint16*)tile->getBuf(band);
+                     ossim_sint16 nullPix = (ossim_sint16)tile->getNullPix(band);
+                     for(idx = 0; idx < maxIdx; ++idx)
+                     {
+                        if(*buf == transparentValue)
+                        {
+                           *buf = nullPix;
+                        }
+                        ++buf;
+                     }
+                     break;
+                  }
+                  default:
+                  {
+                     break;
+                  }
+               }
+            }
+         }
+      }
+   }
+}
+
+
+double ossimNitfTileSource::getMinPixelValue(ossim_uint32 band)const
+{
+   double result = ossimImageHandler::getMinPixelValue(band);
+
+   if(thePackedBitsFlag)
+   {
+      if(result < 1.0) result = 1.0;
+   }
+   
+   return result;
+}
+
+double ossimNitfTileSource::getMaxPixelValue(ossim_uint32 band)const
+{
+   double result = ossimImageHandler::getMaxPixelValue(band);
+
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if(hdr)
+   {
+      if(thePackedBitsFlag)
+      {
+         double test = 1<<(hdr->getBitsPerPixelPerBand());
+         
+         if(result > test) result = test;
+      }
+      else
+      {
+         ossim_int32 bitsPerPixel = hdr->getActualBitsPerPixelPerBand();
+         switch (bitsPerPixel)
+         {
+            case 11:
+            {
+               if (result > 2047.0)
+               {
+                  result = 2047.0;
+               }
+               break;
+            }
+            case 12:
+            {
+               if (result > 4095.0)
+               {
+                  result = 4095.0;
+               }
+               break;
+            }
+            default:
+               break;
+         }
+      }
+   }
+
+   return result;
+}
+
+double ossimNitfTileSource::getNullPixelValue(ossim_uint32 band)const
+{
+   double result = ossimImageHandler::getNullPixelValue(band);
+
+   if(thePackedBitsFlag)
+   {
+      if((result < 0) ||
+         (result > getMaxPixelValue(band)))
+         {
+            result = 0.0;
+         }
+   }
+
+
+   return result;
+}
+
+
+bool ossimNitfTileSource::getPosition(std::streamoff& streamPosition,
+                                      ossim_uint32 x,
+                                      ossim_uint32 y,
+                                      ossim_uint32 band) const
+{
+   //
+   // NOTE:  "theCacheSize is always relative to a block size except in
+   // the case where a block is the entire image.
+   //
+   streamPosition = 0;
+   
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if (!hdr)
+   {
+      return streamPosition;
+   }
+
+   ossim_uint64 blockNumber = getBlockNumber(ossimIpt(x,y));
+   
+#if 0
+   cout << "ossimNitfTileSource::getPosition blockNumber:  "
+        << blockNumber << endl;
+#endif
+   
+   streamPosition = (std::streamoff)hdr->getDataLocation(); // Position to first block.
+   if(hdr->hasBlockMaskRecords())
+   {
+      ossim_uint64 blockOffset = hdr->getBlockMaskRecordOffset(blockNumber,
+                                                               band);
+      if(blockOffset == 0xffffffff)
+      {
+         return false;
+      }
+      streamPosition += blockOffset;
+   }
+   
+   switch (theReadMode)
+   {
+      case READ_BIB_BLOCK:
+      {
+         if(!hdr->hasBlockMaskRecords())
+         {
+            streamPosition +=
+            (std::streamoff)((ossim_uint64)blockNumber * 
+                (ossim_uint64)getBlockOffset()) +
+               ((ossim_uint64)getBandOffset() * band);
+         }
+         else
+         {
+            streamPosition += (std::streamoff)((ossim_uint64)getBandOffset() * (ossim_uint64)band);
+            
+         }
+         break;
+      }
+      
+      case READ_BIB:
+      {
+         streamPosition +=
+         (std::streamoff) ((ossim_uint64)blockNumber * (ossim_uint64)theReadBlockSizeInBytes)+
+            ((ossim_uint64)getBandOffset() * (ossim_uint64)band);
+         break;
+      }
+      
+      case READ_BSQ_BLOCK:
+      {
+         
+         if(!hdr->hasBlockMaskRecords())
+         {
+            streamPosition += (std::streamoff)((ossim_uint64)blockNumber * 
+                                               (ossim_uint64)getBlockOffset()) +
+                                              ((ossim_uint64)getBandOffset() * 
+                                               (ossim_uint64)band);
+         }
+         
+         break;
+      }
+      case READ_JPEG_BLOCK:
+      {
+         streamPosition += (std::streamoff)((ossim_uint64)blockNumber * (ossim_uint64)theReadBlockSizeInBytes);
+         break;
+      }
+      default:
+      {
+         if(!hdr->hasBlockMaskRecords())
+         {
+            streamPosition += (std::streamoff)((ossim_uint64)blockNumber*(ossim_uint64)getBlockOffset());
+         }
+         
+         break;
+      }
+   }
+
+   return true;
+}
+
+std::streampos ossimNitfTileSource::getBandOffset() const
+{
+   std::streampos bandOffset = 0;
+
+   switch (theReadMode)
+   {
+      case READ_BIB_BLOCK:
+      case READ_BIP_BLOCK:
+      case READ_BIR_BLOCK:
+      case READ_BIB:
+      case READ_BIP:
+      case READ_BIR:
+         bandOffset = theBlockSizeInBytes;
+         break;
+         
+      case READ_BSQ_BLOCK:
+         bandOffset = getNumberOfBlocks() * theBlockSizeInBytes;
+         break;
+
+      default:
+         break;
+   }
+
+   return bandOffset;
+}
+
+std::streampos ossimNitfTileSource::getBlockOffset() const
+{
+   std::streampos blockOffset = 0;
+   std::streampos blockSizeInBytes = 0;
+   if (getNumberOfBlocks() == 1)
+   {
+      blockSizeInBytes = theReadBlockSizeInBytes;
+   }
+   else
+   {
+      blockSizeInBytes = theBlockSizeInBytes;
+   }
+   
+   switch (theReadMode)
+   {
+      case READ_BIB_BLOCK:
+      case READ_BIB:
+         // Band interleaved by block.
+         blockOffset = blockSizeInBytes * theNumberOfInputBands;
+         break;
+         
+      case READ_BIR_BLOCK:
+      case READ_BSQ_BLOCK:
+      case READ_BIP_BLOCK:
+      case READ_BIP:
+      case READ_BIR:
+         // Blocks side by side.
+         blockOffset = blockSizeInBytes;
+         break;
+      case READ_JPEG_BLOCK:
+        blockSizeInBytes = theReadBlockSizeInBytes;
+        break;
+   
+      default:
+         break;
+   }
+
+   return blockOffset;
+}
+   
+ossim_uint32 ossimNitfTileSource::getNumberOfBlocks() const
+{
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if (!hdr)
+   {
+      return 0;
+   }
+
+   return static_cast<ossim_uint32>( hdr->getNumberOfBlocksPerRow() *
+                                     hdr->getNumberOfBlocksPerCol() );
+}
+
+bool ossimNitfTileSource::loadState(const ossimKeywordlist& kwl,
+                                    const char* prefix)
+{
+   if ( !ossimImageHandler::loadState(kwl, prefix) )
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfTileSource::loadState(kwl, prefix) DEBUG:"
+            << "\nUnable to load, exiting..." << std::endl;
+      }
+      return false;
+   }
+   
+   const char* lookup = kwl.find(prefix, "entry");
+   if (lookup)
+   {
+      ossimString s(lookup);
+      theCurrentEntry = s.toUInt32();
+   }
+
+   lookup = kwl.find(prefix,ossimKeywordNames::ENABLE_CACHE_KW);
+   if (lookup)
+   {
+      ossimString s(lookup);
+      theCacheEnabledFlag = s.toBool();
+   }
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfTileSource::loadState(kwl, prefix) DEBUG:"
+         << "\nCurrent entry:      " << theCurrentEntry
+         << "\nCache enable flag:  " << theCacheEnabledFlag
+         << std::endl;
+   }
+   
+   return open();
+}
+
+bool ossimNitfTileSource::saveState(ossimKeywordlist& kwl,
+                                    const char* prefix) const
+{
+   // Add the entry number.
+   kwl.add(prefix, "entry", theCurrentEntry, true);
+
+   // Add the cache_enable flag.
+   kwl.add(prefix, ossimKeywordNames::ENABLE_CACHE_KW, theCacheEnabledFlag, true);
+
+   // Call the base class save state.
+   return ossimImageHandler::saveState(kwl, prefix);
+}
+
+ossimScalarType ossimNitfTileSource::getOutputScalarType() const
+{
+   return theScalarType;
+}
+
+ossim_uint32 ossimNitfTileSource::getTileWidth() const
+{
+   ossim_uint32 result = 0;
+   if(!theCacheSize.hasNans()&& theCacheSize.x > 0)
+   {
+      result = theCacheSize.x;
+   }
+   else
+   {
+      ossimIpt tileSize;
+      ossim::defaultTileSize(tileSize);
+      result = static_cast<ossim_uint32>(tileSize.x);
+   }
+   return result;
+}
+
+ossim_uint32 ossimNitfTileSource::getTileHeight() const
+{
+   ossim_uint32 result = 0;
+   if(!theCacheSize.hasNans()&& theCacheSize.y > 0)
+   {
+      result = theCacheSize.y;
+   }
+   else
+   {
+      ossimIpt tileSize;
+      ossim::defaultTileSize(tileSize);
+      result = static_cast<ossim_uint32>(tileSize.y);
+   }
+   return result;
+}
+
+ossim_uint32 ossimNitfTileSource::getNumberOfInputBands() const
+{
+   return theNumberOfInputBands;
+}
+
+ossim_uint32 ossimNitfTileSource::getNumberOfOutputBands() const
+{
+   return theNumberOfOutputBands;
+}
+
+ossim_uint32 ossimNitfTileSource::getNumberOfLines(ossim_uint32 resLevel) const
+{
+   ossim_uint32 result = 0;
+   if (resLevel == 0)
+   {
+      const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+      if (hdr)
+      {
+         result = hdr->getNumberOfRows();
+      }
+   }
+   else if (theOverview.valid())
+   {
+      result = theOverview->getNumberOfLines(resLevel);
+   }
+   return result;
+}
+
+ossim_uint32 ossimNitfTileSource::getNumberOfSamples(ossim_uint32 resLevel) const
+{
+   ossim_uint32 result = 0;
+   if (resLevel == 0)
+   {
+      const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+      if (hdr)
+      {
+         result = hdr->getNumberOfCols();
+      }
+   }
+   else if (theOverview.valid())
+   {
+      result = theOverview->getNumberOfSamples(resLevel);
+   }
+   return result;
+}
+
+ossim_uint32 ossimNitfTileSource::getBlockNumber(const ossimIpt& block_origin) const
+{
+   ossim_uint32 blockNumber = 0;
+   
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if (!hdr)
+   {
+      return blockNumber; 
+   }
+
+   ossim_uint32 blockY;
+   ossim_uint32 blockX;
+   blockX  = (block_origin.x /
+              theCacheSize.x);
+   blockY= (block_origin.y /
+            theCacheSize.y);
+
+   switch (theReadMode)
+   {
+      case READ_BIB_BLOCK:
+      case READ_BIP_BLOCK:
+      case READ_BIR_BLOCK:
+      case READ_BSQ_BLOCK:
+      case READ_JPEG_BLOCK:
+      {
+         blockNumber = ((blockY*hdr->getNumberOfBlocksPerRow()) +
+                        blockX);
+         break;
+      }
+      case READ_BIB:
+      case READ_BIP:
+      case READ_BIR:
+         //---
+         // These read modes are for a single block image.  The cache size will
+         // be set to the width of the image (block) by the height of one tile.
+         //
+         // This is to avoid reading an entire large image with a single block
+         // into memory.
+         //---
+         blockNumber = blockY;
+         break;
+
+      default:
+         break;
+   }
+   return blockNumber;
+}
+
+ossim_uint32 ossimNitfTileSource::getPartialReadSize(const ossimIpt& /* blockOrigin */)const
+{
+   ossim_uint32 result = 0;
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if (!hdr)
+   {
+      return result;
+   }
+   
+   if(theCacheTile->getImageRectangle().completely_within(theBlockImageRect))
+   {
+      return theReadBlockSizeInBytes;
+   }
+   ossimIrect clipRect = theCacheTile->getImageRectangle().clipToRect(theBlockImageRect);
+   
+   result = (theCacheSize.x*
+             clipRect.height()*
+             hdr->getBitsPerPixelPerBand())/8;
+   
+   switch (theReadMode)
+   {
+      case READ_BSQ_BLOCK:
+      case READ_BIB_BLOCK:
+      case READ_BIB:
+      {
+         // purposely left blank.  only hear for clarity.
+         break;
+      }
+
+      case READ_BIP_BLOCK:
+      case READ_BIR_BLOCK:
+      case READ_BIP:
+      case READ_BIR:   
+      {
+         result *= theNumberOfInputBands;
+         break;
+      }
+      default:
+      {
+         break;
+      }
+   }
+   return result;
+}
+
+bool ossimNitfTileSource::isVqCompressed(const ossimString& compressionCode)const
+{
+   return((compressionCode == "C4")||
+          (compressionCode == "M4"));
+}
+
+
+ossim_uint32 ossimNitfTileSource::getImageTileWidth() const
+{
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if (!hdr)
+   {
+      return 0;
+   }
+   return hdr->getNumberOfPixelsPerBlockHoriz();
+}
+
+ossim_uint32 ossimNitfTileSource::getImageTileHeight() const
+{
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if (!hdr)
+   {
+      return 0;
+   }
+   return hdr->getNumberOfPixelsPerBlockVert();
+}
+
+ossimString ossimNitfTileSource::getShortName()const
+{
+   return ossimString("nitf");
+}
+
+ossimString ossimNitfTileSource::getLongName()const
+{
+   return ossimString("nitf reader");
+}
+
+ossim_uint32 ossimNitfTileSource::getCurrentEntry() const
+{
+   return theCurrentEntry;
+}
+
+ossim_uint32 ossimNitfTileSource::getNumberOfEntries() const
+{
+   return (ossim_uint32)theEntryList.size();
+}
+
+void ossimNitfTileSource::getEntryList(std::vector<ossim_uint32>& entryList)const
+{
+   entryList = theEntryList;
+//    entryList.resize(theNumberOfImages);
+//    for (ossim_uint32 i = 0; i < theNumberOfImages; ++i)
+//    {
+//       entryList[i] = i;
+//    }
+}
+
+bool ossimNitfTileSource::setCurrentEntry(ossim_uint32 entryIdx)
+{
+   bool result = true;
+   if (theCurrentEntry != entryIdx)
+   {
+      if ( isOpen() )
+      {
+         if ( entryIdx < theNumberOfImages )
+         {
+            // Clear the geometry.
+            theGeometry = 0;
+            
+            // Must clear or openOverview will use last entries.
+            theOverviewFile.clear();
+            
+            theCurrentEntry = entryIdx;
+            
+            //---
+            // Since we were previously open and the the entry has changed we
+            // need to reinitialize some things.
+            //---
+            result = allocate();
+            if (result)
+            {
+               completeOpen();
+            }
+         }
+         else
+         {
+            result = false; // Entry index out of range.
+         }
+      }
+      else
+      {
+         //---
+         // Not open.
+         // Allow this knowing that the parseFile will check for out of range.
+         //---
+         theCurrentEntry = entryIdx;
+      }
+   }
+   
+   if(result)
+   {
+      if(theNitfImageHeader[theCurrentEntry]->getRepresentation().contains("LUT"))
+      {
+         theLut = theNitfImageHeader[theCurrentEntry]->createLut(0);
+      }
+      
+      
+   }
+   return result;
+}
+
+bool ossimNitfTileSource::getCacheEnabledFlag() const
+{
+   return theCacheEnabledFlag;
+}
+
+void ossimNitfTileSource::setCacheEnabledFlag(bool flag)
+{
+   if (flag != theCacheEnabledFlag)
+   {
+      // State of caching has changed...
+
+      theCacheEnabledFlag = flag;
+
+      if ( theCacheEnabledFlag) // Cache enabled.
+      {
+         theCacheId = ossimAppFixedTileCache::instance()->
+            newTileCache(theBlockImageRect, theCacheSize);
+      }
+      else // Cache disabled...
+      {
+         // Clean out the cache if there was one.
+         if (theCacheId != -1)
+         {
+            ossimAppFixedTileCache::instance()->deleteCache(theCacheId);
+            theCacheId = -1;
+         }
+      }
+   }
+}
+
+const ossimNitfFileHeader* ossimNitfTileSource::getFileHeader()const
+{
+   if(theNitfFile.valid())
+   {
+      return theNitfFile->getHeader();
+   }
+   
+   return 0;
+}
+
+ossimNitfFileHeader* ossimNitfTileSource::getFileHeader()
+{
+   if(theNitfFile.valid())
+   {
+      return theNitfFile->getHeader();
+   }
+   
+   return 0;
+}
+
+const ossimNitfImageHeader* ossimNitfTileSource::getCurrentImageHeader() const
+{
+   if(theNitfImageHeader.size())
+   {
+      return theNitfImageHeader[theCurrentEntry].get();
+   }
+   
+   return 0;
+}
+
+ossimNitfImageHeader* ossimNitfTileSource::getCurrentImageHeader()
+{
+   if(theNitfImageHeader.size())
+   {
+      return theNitfImageHeader[theCurrentEntry].get();
+   }
+   
+   return 0;
+}
+
+bool ossimNitfTileSource::getRgbBandList(std::vector<ossim_uint32>& bandList) const
+{
+   bool result = false;
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   const ossim_uint32 BANDS = getNumberOfOutputBands();
+   const ossim_uint32 BOGUS = 99999;
+   if ( hdr && (BANDS > 2) )
+   {
+      ossim_uint32 r = BOGUS;
+      ossim_uint32 g = BOGUS;
+      ossim_uint32 b = BOGUS;
+
+      for ( ossim_uint32 i = 0; i < BANDS; ++i )
+      {
+         const ossimRefPtr<ossimNitfImageBand> imageBand = hdr->getBandInformation( i );
+         if ( imageBand.valid() )
+         {
+            ossimString os = imageBand->getBandRepresentation();
+            os.trim(); // Remove trailing spaces.
+            os.upcase();
+            if ( os == "R" )
+            {
+               r = i;
+            }
+            else if ( os == "G" )
+            {
+               g = i;
+            }
+            else if ( os == "B" )
+            {
+               b = i;
+            }
+            
+            if ( ( i > 1 ) &&
+                 ( r != BOGUS ) && ( g != BOGUS ) && ( b != BOGUS ) )
+            {
+               result = true;
+               bandList.resize(3);
+               bandList[0] = r;
+               bandList[1] = g;
+               bandList[2] = b;
+               break; // done...
+            }
+         }
+      }
+      // TODO: Derive rgb from ISUBCAT wavelength or other nitf tags.
+   }
+   
+   return result;
+   
+} // End: ossimNitfTileSource::getRgbBandList( ... )
+
+void ossimNitfTileSource::setBoundingRectangle(const ossimIrect& imageRect)
+{
+   theImageRect = imageRect;
+   // now shift the internal block rect as well
+   theBlockImageRect = (theBlockImageRect - theBlockImageRect.ul());
+}
+
+ossimRefPtr<ossimProperty> ossimNitfTileSource::getProperty(const ossimString& name)const
+{
+   if (name == ossimKeywordNames::ENABLE_CACHE_KW)
+   {
+      ossimProperty* p = new ossimBooleanProperty(name, theCacheEnabledFlag);
+      return ossimRefPtr<ossimProperty>(p);
+   }
+   else 
+   {
+      if(theNitfFile.valid())
+      {
+         if(theNitfFile->getHeader())
+         {
+            ossimRefPtr<ossimProperty> p = theNitfFile->getHeader()->getProperty(name);
+            if(p.valid())
+            {
+               p->setReadOnlyFlag(true);
+               return p;
+            }
+         }
+      }
+      const ossimNitfImageHeader* imageHeader = getCurrentImageHeader();
+      if(imageHeader)
+      {
+         ossimRefPtr<ossimProperty> p = imageHeader->getProperty(name);
+         if(p.valid())
+         {
+            p->setReadOnlyFlag(true);
+            return p;
+         }
+      }
+   }
+
+   return ossimImageHandler::getProperty(name);
+}
+
+void ossimNitfTileSource::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if (!property) return;
+   
+   ossimString name = property->getName();
+
+   if (name == ossimKeywordNames::ENABLE_CACHE_KW)
+   {
+      ossimBooleanProperty* obj = PTR_CAST(ossimBooleanProperty,
+                                           property.get());
+      if (obj)
+      {
+         setCacheEnabledFlag(obj->getBoolean());
+      }
+   }
+   else
+   {
+      ossimImageHandler::setProperty(property);
+   }
+}
+
+void ossimNitfTileSource::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageHandler::getPropertyNames(propertyNames);
+   propertyNames.push_back(ossimKeywordNames::ENABLE_CACHE_KW);
+   if(theNitfFile->getHeader())
+   {
+      theNitfFile->getHeader()->getPropertyNames(propertyNames);
+   }
+   const ossimNitfImageHeader* imageHeader = getCurrentImageHeader();
+   if(imageHeader)
+   {
+      imageHeader->getPropertyNames(propertyNames);
+   }
+}
+
+ossimString ossimNitfTileSource::getSecurityClassification() const
+{
+   if(getCurrentImageHeader())
+   {
+      return getCurrentImageHeader()->getSecurityClassification();
+   }
+   
+   return "U";
+}
+
+void ossimNitfTileSource::lutUncompress(ossimRefPtr<ossimImageData> destination, ossim_uint8* source)
+{
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if (!hdr||!destination)
+   {
+      return;
+   }
+   if((destination->getNumberOfBands()<3)||
+      (!destination->getBuf())||
+      (destination->getScalarType()!=OSSIM_UINT8)||
+      (!theLut.valid()))
+   {
+      return;
+   }
+
+   if(destination->getNumberOfBands()!=theLut->getNumberOfBands())
+   {
+      return;
+   }
+   
+   ossim_uint8* tempRows[3];
+   tempRows[0] = (ossim_uint8*)destination->getBuf(0);
+   tempRows[1] = (ossim_uint8*)destination->getBuf(1);
+   tempRows[2] = (ossim_uint8*)destination->getBuf(2);
+   
+   ossim_uint8* srcPtr = source;
+   ossim_uint32 compressionYidx   = 0;
+   ossim_uint32 compressionXidx   = 0;
+   ossim_uint32 uncompressIdx     = 0;
+   ossim_uint32 h = destination->getHeight();
+   ossim_uint32 w = destination->getWidth();
+   
+   for(compressionYidx = 0; compressionYidx < h; ++compressionYidx)
+   {
+      for(compressionXidx = 0; compressionXidx < w; ++compressionXidx)
+      {
+         tempRows[0][uncompressIdx] = (*theLut)[*srcPtr][0];
+         tempRows[1][uncompressIdx] = (*theLut)[*srcPtr][1];
+         tempRows[2][uncompressIdx] = (*theLut)[*srcPtr][2];
+         ++srcPtr;
+         ++uncompressIdx;
+      }
+   }
+}
+
+void ossimNitfTileSource::vqUncompressC4(
+   ossimRefPtr<ossimImageData> destination, ossim_uint8* source)
+{
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if (!hdr||!destination)
+   {
+      return;
+   }
+
+   const ossim_uint32 BANDS = destination->getNumberOfBands();
+
+   if( ( (BANDS != 1) && (BANDS!=3) ) ||
+       (!destination->getBuf()) ||
+       (destination->getScalarType()!=OSSIM_UINT8) ||
+       !theLut.valid() ||
+       (theLut->getNumberOfBands() != BANDS) )
+   {
+      return;
+   }
+   
+   ossimNitfVqCompressionHeader* compressionHeader =
+      PTR_CAST(ossimNitfVqCompressionHeader,
+               hdr->getCompressionHeader().get());
+
+   if(!compressionHeader)
+   {
+      return;
+   }
+   
+   const std::vector<ossimNitfVqCompressionOffsetTableData>& table =
+      compressionHeader->getTable();
+
+   ossimRefPtr<ossimNitfImageBand> bandInfo = hdr->getBandInformation(0);
+   
+   if(!bandInfo.valid()) return;
+   
+   std::vector<ossimRefPtr<ossimNitfImageLut> > luts(BANDS);
+   std::vector<ossim_uint8*> tempRows(BANDS);
+   
+   ossim_uint32 band;
+   for (band =0; band<BANDS; ++band)
+   {
+      luts[band] = bandInfo->getLut(band);
+      if ( luts[band].valid() )
+      {
+         tempRows[band] = (ossim_uint8*)destination->getBuf(band);
+      }
+      else
+      {
+         return;
+      }
+   }
+
+   ossimPackedBits bits(source, compressionHeader->getImageCodeBitLength());
+
+
+   const ossim_uint32 ROWS = static_cast<ossim_uint32>(table.size());
+   const ossim_uint32 COLS =
+      static_cast<ossim_uint32>(table[0].
+                                theNumberOfValuesPerCompressionLookup);
+   const ossim_uint32 COMPRESSION_HEIGHT =
+      compressionHeader->getNumberOfImageRows();
+   const ossim_uint32 COMPRESSION_WIDTH  =
+      compressionHeader->getNumberOfImageCodesPerRow();
+   ossim_uint32 DEST_WIDTH  = destination->getWidth();
+   
+   ossim_uint32 compressionIdx = 0;
+   ossim_uint32 uncompressIdx  = 0;
+   ossim_uint32 uncompressYidx = 0;
+   ossim_uint8  lutValue = 0;
+   ossim_uint8* data     = 0;
+   ossim_uint32 codeWord = 0;
+   
+   for(ossim_uint32 compressionYidx = 0;
+       compressionYidx < COMPRESSION_HEIGHT;
+       ++compressionYidx)
+   {
+      uncompressYidx = compressionYidx * ROWS * DEST_WIDTH;
+      
+      for(ossim_uint32 compressionXidx = 0;
+          compressionXidx < COMPRESSION_WIDTH;
+          ++compressionXidx)
+      {
+         uncompressIdx = uncompressYidx + COLS * compressionXidx;
+
+         codeWord = bits.getValueAsUint32(compressionIdx++);
+         codeWord *= COLS;
+
+         for(ossim_uint32 rowIdx = 0; rowIdx < ROWS; ++rowIdx)
+         {
+            data = &(table[rowIdx].theData[codeWord]);
+            
+            for(ossim_uint32 colIdx = 0; colIdx < COLS; ++colIdx)
+            {
+               lutValue = (*data)&0xff;
+
+               for (band = 0; band < BANDS; ++band)
+               {
+                  ossim_uint8 p = (*theLut.get())[lutValue][band];
+                  tempRows[band][uncompressIdx+colIdx] = p;
+               }
+               ++data;
+               
+            } // column loop
+
+            uncompressIdx += DEST_WIDTH;
+            
+         } // row loop
+
+      } // x compression loop
+      
+   } // y compression loop
+}
+
+void ossimNitfTileSource::vqUncompressM4(
+   ossimRefPtr<ossimImageData> destination, ossim_uint8* source)
+{
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if (!hdr||!destination)
+   {
+      return;
+   }
+
+   const ossim_uint32 BANDS = destination->getNumberOfBands();
+
+   if(( (BANDS != 1)&&(BANDS!=3) ) ||
+      (!destination->getBuf())||
+      (destination->getScalarType()!=OSSIM_UINT8))
+   {
+      return;
+   }
+   
+   ossimNitfVqCompressionHeader* compressionHeader =
+      PTR_CAST(ossimNitfVqCompressionHeader,
+               hdr->getCompressionHeader().get());
+
+   if(!compressionHeader)
+   {
+      return;
+   }
+
+   const std::vector<ossimNitfVqCompressionOffsetTableData>& table =
+      compressionHeader->getTable();
+
+   ossimRefPtr<ossimNitfImageBand> bandInfo = hdr->getBandInformation(0);
+   
+   if(!bandInfo.valid()) return;
+   
+   std::vector<ossimRefPtr<ossimNitfImageLut> > luts(BANDS);
+   std::vector<ossim_uint8*> tempRows(BANDS);
+
+   ossim_uint32 band;
+   for (band =0; band<BANDS; ++band)
+   {
+      luts[band] = bandInfo->getLut(band);
+      if ( luts[band].valid() )
+      {
+         tempRows[band] = (ossim_uint8*)destination->getBuf(band);
+      }
+      else
+      {
+         return;
+      }
+   }
+
+   const ossim_uint8 NI = 216; // null index (transparency index).
+   const ossim_uint8 NP = 0;   // null pixel
+
+   ossim_uint32 destWidth  = destination->getWidth();
+   ossimPackedBits bits(source, compressionHeader->getImageCodeBitLength());
+
+   ossim_uint32 compressionYidx   = 0;
+   ossim_uint32 compressionXidx   = 0;
+   ossim_uint32 compressionIdx    = 0;
+   ossim_uint32 uncompressIdx     = 0;
+   ossim_uint32 uncompressYidx    = 0;
+   ossim_uint32 rows   = (ossim_uint32)table.size();
+   ossim_uint32 cols   = 0;
+   ossim_uint32 rowIdx = 0;
+   ossim_uint32 colIdx = 0;
+   if(rows)
+   {
+      cols = table[0].theNumberOfValuesPerCompressionLookup;
+   }
+   ossim_uint32 compressionHeight = compressionHeader->getNumberOfImageRows();
+   ossim_uint32 compressionWidth  =
+      compressionHeader->getNumberOfImageCodesPerRow();
+   ossim_uint8 lutValue = 0;
+   ossim_uint8* data=0;
+
+   for(compressionYidx = 0;
+       compressionYidx < compressionHeight;
+       ++compressionYidx)
+   {
+      uncompressYidx = compressionYidx*rows*destWidth;
+
+      for(compressionXidx = 0;
+          compressionXidx < compressionWidth;
+          ++compressionXidx)
+      {
+         uncompressIdx = uncompressYidx + cols*compressionXidx;
+         ossim_uint32 codeWord = bits.getValueAsUint32(compressionIdx);
+         
+         bool transparent = false;
+         if (codeWord == 4095)
+         {
+            //---
+            // Check to see if the whole kernel is transparent.  If no, the
+            // null index '216' could be used for valid pixels.
+            //
+            // For more see docs:
+            // MIL-PRF-89041A 3.13.1.2 Transparent pixels
+            // MIL-STD-2411
+            //---
+            codeWord *= cols;
+            transparent = true;
+            for(rowIdx = 0; rowIdx < rows; ++rowIdx)
+            {
+               data = &table[rowIdx].theData[codeWord];
+               
+               for(colIdx = 0; colIdx < cols; ++colIdx)
+               {
+                  lutValue = (*data)&0xff;
+                  if (lutValue != NI)
+                  {
+                     // Not a kernel full of transparent pixels.
+                     transparent = false;
+                     break;
+                  }
+                  ++data;
+               }
+               if (!transparent)
+               {
+                  break;
+               }
+               uncompressIdx += destWidth;
+            }
+         }
+
+         // Reset everyone for loop to copy pixel data from lut.
+         uncompressIdx = uncompressYidx + cols*compressionXidx;
+         codeWord = bits.getValueAsUint32(compressionIdx);
+         codeWord *= cols;
+
+         for(rowIdx = 0; rowIdx < rows; ++rowIdx)
+         {
+            data = &table[rowIdx].theData[codeWord];
+            
+            for(colIdx = 0; colIdx < cols; ++colIdx)
+            {
+               lutValue = (*data)&0xff;
+               
+               for (band = 0; band < BANDS; ++band)
+               {
+                  ossim_uint8 p = luts[band]->getValue(lutValue);
+                  tempRows[band][uncompressIdx+colIdx] = (!transparent?p:NP);
+               }
+               ++data;
+            }
+
+            uncompressIdx += destWidth;
+         }
+         ++compressionIdx;
+         
+      } // x loop
+      
+   } // y loop
+}
+
+bool ossimNitfTileSource::scanForJpegBlockOffsets()
+{
+   // Find, capture all jpeg block offsets and sizes for an entry.
+   
+   bool allBlocksFound = false;
+   
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+
+   if ( !hdr || (theReadMode != READ_JPEG_BLOCK) || !theFileStr )
+   {
+      return allBlocksFound; // Get out...
+   }
+
+   theNitfBlockOffset.clear();
+   theNitfBlockSize.clear();
+
+   //---
+   // Get the totol blocks.
+   // Note:  There can be more than one jpeg image in the nitf.  So after blocks
+   // found equals total_blocks get out.
+   //---
+   ossim_uint32 total_blocks = hdr->getNumberOfBlocksPerRow()*hdr->getNumberOfBlocksPerCol();
+   
+   //---
+   // NOTE:
+   // SOI = 0xffd8 Start of image
+   // EOI = 0xffd9 End of image
+   // DHT = 0xffc4 Define Huffman Table(s)
+   // DQT = 0xffdb Define Quantization Table(s)
+   //---
+
+   // Seek to the first block.
+   theFileStr.seekg(hdr->getDataLocation(), ios::beg);
+
+   if ( theFileStr.good() )
+   {
+      const ossim_uint8 AP6 = 0xe6;
+      const ossim_uint8 AP7 = 0xe7;
+      const ossim_uint8 DHT = 0xc4;
+      const ossim_uint8 DQT = 0xdb;
+      const ossim_uint8 EOI = 0xd9;
+      const ossim_uint8 FF  = 0xff;
+      const ossim_uint8 SOI = 0xd8;
+      const ossim_uint8 SOS = 0xda;
+
+      union
+      {
+         char c;
+         ossim_uint8 uc;
+      } ct;
+
+      std::streamoff soiOffset = 0;
+      std::streamoff eoiOffset = 0;
+      ossim_uint16   length    = 0;
+
+      ossimEndian* swapper = 0;
+      if ( ossim::byteOrder() == OSSIM_LITTLE_ENDIAN )
+      {
+         swapper = new ossimEndian();
+      }
+      
+      // Find all the SOI markers.
+      while ( theFileStr.get( ct.c ) && !allBlocksFound ) 
+      {
+         if ( ct.uc == FF ) // Found FF byte.
+         {
+            // Loop to skip multiple 0xff's in cases like FF FF D8
+            while ( theFileStr.get( ct.c ) )
+            {
+               if ( ct.uc != FF)
+               {
+                  break;
+               }
+            }
+         
+            if ( ct.uc == SOI ) 
+            {
+               // At SOI 0xFFD8 marker... SOI marker offset is two bytes back.
+               soiOffset = ((std::streamoff)theFileStr.tellg()) - 2;
+
+               // Now look for matching EOI.
+               while ( theFileStr.get( ct.c ) )
+               {
+                  if ( ct.uc == FF ) // Found FF byte.
+                  {
+                     // Loop to skip multiple 0xff's in cases like FF FF D8
+                     while ( theFileStr.get( ct.c ) )
+                     {
+                        if ( ct.uc != FF )
+                        {
+                           break;
+                        }
+                     }
+
+                     if ( ct.uc == EOI )
+                     {
+                        // At EOI 0xD9marker...
+                        eoiOffset = theFileStr.tellg();
+
+                        // Capture offset:
+                        theNitfBlockOffset.push_back( soiOffset );
+
+                        // Capture block size:
+                        theNitfBlockSize.push_back( eoiOffset - soiOffset );
+
+                        //---
+                        // Since there can be more than one jpeg entry in a file, breeak out of
+                        // loop when we hit block size.
+                        //---
+                        if ( theNitfBlockOffset.size() == total_blocks )
+                        {
+                           allBlocksFound = true;
+                        }
+
+                        break; // From "find EOI" while loop.
+                     }
+                     //---
+                     // These are things to skip to avoid hitting random sequence of FFD9
+                     // and picking up a false EOI.
+                     // Not a complete set of markers but all test data works.
+                     // drb - 14 May 2013.
+                     //---
+                     else if ( ( ct.uc == AP6 ) || ( ct.uc == AP7 ) || ( ct.uc == DHT ) ||
+                               ( ct.uc == DQT ) || ( ct.uc == SOS ) ||
+                               ( ( ct.uc >= 0xc0 ) && ( ct.uc <= 0xcF ) )
+                               )
+                     {
+                        // Length two byte big endian.
+                        theFileStr.read( (char*)&length, 2 );
+                        if ( swapper )
+                        {
+                           swapper->swap( length );
+                        }
+                        // Length includes two length bytes.
+
+                        // Seek to the end of the record.
+                        theFileStr.seekg( length - 2, std::ios_base::cur );
+                     }
+
+                  } //  Matches: if ( ct.uc == FF )
+                  
+               } // Matches: while ( theFileStr.get( ut.c ) ) "find EOI loop" 
+               
+            } // Matches: if ( ut.uc == SOI ) "SOI marker found"
+
+         } // Matches: if ( ut.uc == FF )
+
+      } // Matches: while ( theFileStr.get( ut.c ) && !allBlocksFound )
+
+      if ( swapper )
+      {
+         delete swapper;
+         swapper = 0;
+      }
+
+   } // Matches: if ( theFileStr.good() )
+
+   theFileStr.seekg(0, ios::beg);
+   theFileStr.clear();
+
+#if 0 /* Please leave for debug. (drb) */
+   std::streamoff startOfData = hdr->getDataLocation();
+   ossimNotify(ossimNotifyLevel_WARN) << "current entry: " << theCurrentEntry << "\n";
+   for (ossim_uint32 i = 0; i < total_blocks; ++i)
+   {
+      cout << "theNitfBlockOffset[" << i << "]: " << theNitfBlockOffset[i]
+           << "\nrealative_offset[" << i << "]:   " << (theNitfBlockOffset[i] - startOfData)
+           << "\ntheNitfBlockSize[" << i << "]:   " << theNitfBlockSize[i]
+           << "\n";
+   }
+#endif
+   
+   if ( !allBlocksFound )
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "DEBUG:"
+            << "\nBlock offset count wrong!"
+            << "\nexpected blocks:        " << total_blocks
+            << "\noffset array count:     " << theNitfBlockOffset.size()
+            << "\nblock size array count: " << theNitfBlockSize.size()
+            << std::endl;
+      }
+      theNitfBlockOffset.clear();
+      theNitfBlockSize.clear();
+   }
+
+   return allBlocksFound;
+}
+
+bool ossimNitfTileSource::uncompressJpegBlock(ossim_uint32 x, ossim_uint32 y)
+{
+   ossim_uint32 blockNumber = getBlockNumber( ossimIpt(x,y) );
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfTileSource::uncompressJpegBlock DEBUG:"
+         << "\nblockNumber:  " << blockNumber
+         << std::endl;
+   }
+
+   //---
+   // Logic to hold off on scanning for offsets until a block is actually needed
+   // to speed up loads for things like ossim-info that don't actually read
+   // pixel data.
+   //---
+   if ( m_jpegOffsetsDirty )
+   {
+      if ( scanForJpegBlockOffsets() )
+      {
+         m_jpegOffsetsDirty = false;
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << "ossimNitfTileSource::uncompressJpegBlock scan for offsets error!"
+            << "\nReturning error..." << endl;
+         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+         return false;
+      }
+   }
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "\noffset to block: " << theNitfBlockOffset[blockNumber]
+         << "\nblock size: " << theNitfBlockSize[blockNumber]
+         << std::endl;
+   }
+   
+   // Seek to the block.
+   theFileStr.seekg(theNitfBlockOffset[blockNumber], ios::beg);
+   
+   // Read the block into memory.
+   std::vector<ossim_uint8> compressedBuf(theNitfBlockSize[blockNumber]);
+   if (!theFileStr.read((char*)&(compressedBuf.front()),
+                        theNitfBlockSize[blockNumber]))
+   {
+      theFileStr.clear();
+      ossimNotify(ossimNotifyLevel_FATAL)
+         << "ossimNitfTileSource::uncompressJpegBlock Read Error!"
+         << "\nReturning error..." << endl;
+      return false;
+   }
+   
+   if (m_isJpeg12Bit)
+   {
+#if defined(JPEG_DUAL_MODE_8_12)
+      return ossimNitfTileSource_12::uncompressJpeg12Block(x,y,theCacheTile, 
+       getCurrentImageHeader(), theCacheSize, compressedBuf, theReadBlockSizeInBytes, 
+       theNumberOfOutputBands);
+#endif  
+   }
+
+   //---
+   // Most of comments below from jpeg-6b "example.c" file.
+   //---
+   
+   /* This struct contains the JPEG decompression parameters and pointers
+    * to working space (which is allocated as needed by the JPEG library).
+    */
+   jpeg_decompress_struct cinfo;
+   
+   /* We use our private extension JPEG error handler.
+    * Note that this struct must live as long as the main JPEG parameter
+    * struct, to avoid dangling-pointer problems.
+    */
+   ossimJpegErrorMgr jerr;
+   
+   /* Step 1: allocate and initialize JPEG decompression object */
+   
+   /* We set up the normal JPEG error routines, then override error_exit. */
+   cinfo.err = jpeg_std_error(&jerr.pub);
+ 
+   jerr.pub.error_exit = ossimJpegErrorExit;
+
+   /* Establish the setjmp return context for my_error_exit to use. */
+   if (setjmp(jerr.setjmp_buffer))
+   {
+      /* If we get here, the JPEG code has signaled an error.
+       * We need to clean up the JPEG object, close the input file, and return.
+       */
+     jpeg_destroy_decompress(&cinfo);
+     return false;
+   }
+
+   /* Now we can initialize the JPEG decompression object. */
+   jpeg_CreateDecompress(&cinfo, JPEG_LIB_VERSION, sizeof(cinfo));
+   
+   //---
+   // Step 2: specify data source.  In this case we will uncompress from
+   // memory so we will use "ossimJpegMemorySrc" in place of " jpeg_stdio_src".
+   //---
+   ossimJpegMemorySrc (&cinfo,
+                       &(compressedBuf.front()),
+                       static_cast<size_t>(theReadBlockSizeInBytes));
+
+   /* Step 3: read file parameters with jpeg_read_header() */
+   jpeg_read_header(&cinfo, TRUE);
+  
+   // Check for Quantization tables.
+   if (cinfo.quant_tbl_ptrs[0] == NULL)
+   {
+      // This will load table specified in COMRAT field.
+      if (loadJpegQuantizationTables(cinfo) == false)
+      {
+        jpeg_destroy_decompress(&cinfo);
+        return false;
+      }
+   }
+
+   // Check for huffman tables.
+   if (cinfo.ac_huff_tbl_ptrs[0] == NULL)
+   {
+      // This will load default huffman tables into .
+      if (loadJpegHuffmanTables(cinfo) == false)
+      {
+        jpeg_destroy_decompress(&cinfo);
+        return false;
+      }
+   }
+
+   /* Step 4: set parameters for decompression */
+   
+   /* In this example, we don't need to change any of the defaults set by
+    * jpeg_read_header(), so we do nothing here.
+    */
+
+   /* Step 5: Start decompressor */
+   jpeg_start_decompress(&cinfo);
+
+#if 0 /* Please leave for debug. (drb) */
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "jpeg cinfo.output_width:  " << cinfo.output_width
+         << "\njpeg cinfo.output_height: " << cinfo.output_height
+         << "\n";
+   }
+#endif
+   
+   const ossim_uint32 SAMPLES = cinfo.output_width;
+
+   //---
+   // Note: Some nitf will be tagged with a given number of lines but the last
+   // jpeg block may go beyond that to a complete block.  So it you clamp to
+   // last line of the nitf you will get a libjpeg error:
+   // 
+   // "Application transferred too few scanlines"
+   //
+   // So here we will always read the full jpeg block even if it is beyond the
+   // last line of the nitf.
+   //---
+   const ossim_uint32 LINES_TO_READ =
+      min(static_cast<ossim_uint32>(theCacheSize.y), cinfo.output_height);
+
+   /* JSAMPLEs per row in output buffer */
+   const ossim_uint32 ROW_STRIDE = SAMPLES * cinfo.output_components;
+
+   if ( (SAMPLES < theCacheTile->getWidth() ) ||
+        (LINES_TO_READ < theCacheTile->getHeight()) )
+   {
+      theCacheTile->makeBlank();
+   }
+
+   if ( (SAMPLES > theCacheTile->getWidth()) ||
+        (LINES_TO_READ > theCacheTile->getHeight()) )
+   {
+     // Error...
+     jpeg_finish_decompress(&cinfo);
+     jpeg_destroy_decompress(&cinfo);
+     return false;
+   }
+
+   // Get pointers to the cache tile buffers.
+   std::vector<ossim_uint8*> destinationBuffer(theNumberOfInputBands);
+   for (ossim_uint32 band = 0; band < theNumberOfInputBands; ++band)
+   {
+     destinationBuffer[band] = theCacheTile->getUcharBuf(band);
+   }
+
+   std::vector<ossim_uint8> lineBuffer(ROW_STRIDE);
+   JSAMPROW jbuf[1];
+   jbuf[0] = (JSAMPROW) &(lineBuffer.front());
+
+   while (cinfo.output_scanline < LINES_TO_READ)
+   {
+     // Read a line from the jpeg file.
+     jpeg_read_scanlines(&cinfo, jbuf, 1);
+
+     //---
+     // Copy the line which if band interleaved by pixel the the band
+     // separate buffers.
+     //
+     // Note:
+     // Not sure if IMODE of 'B' is interleaved the same as image with
+     // IMODE of 'P'.
+     //
+     // This works with all samples with IMODE of B and P but I only have
+     // one band 'B' and three band 'P'.  So if we ever get a three band
+     // 'B' it could be wrong here. (drb - 20090615)
+     //---
+     ossim_uint32 index = 0;
+     for (ossim_uint32 sample = 0; sample < SAMPLES; ++sample)         
+     {
+       for (ossim_uint32 band = 0; band < theNumberOfInputBands; ++band)
+       {
+         destinationBuffer[band][sample] = lineBuffer[index];
+         ++index;
+       }
+     }
+
+     for (ossim_uint32 band = 0; band < theNumberOfInputBands; ++band)
+     {
+       destinationBuffer[band] += theCacheSize.x;         
+     }
+   }
+
+   // clean up...
+
+   jpeg_finish_decompress(&cinfo);
+   jpeg_destroy_decompress(&cinfo);
+
+   return true;
+}
+
+//---
+// Default JPEG quantization tables
+// Values from: MIL-STD-188-198, APPENDIX A
+//---
+bool ossimNitfTileSource::loadJpegQuantizationTables(
+   jpeg_decompress_struct& cinfo) const
+{
+   //---
+   // Check to see if table is present.  We will only look at the first table
+   // in the array of arrays.
+   // 
+   // NOTE:  There are four tables in the array "cinfo.quant_tbl_ptrs".  It
+   // looks like the standard is to use the first table. (not sure though)
+   //---
+   if (cinfo.quant_tbl_ptrs[0] != NULL)
+   {
+      return false;
+   }
+
+   // Get the COMRAT (compression rate code) from the header:
+   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
+   if (!hdr)
+   {
+      return false;
+   }
+   
+   ossimString comrat = hdr->getCompressionRateCode();
+   ossim_uint32 tableIndex = 0;
+   if (comrat.size() >= 4)
+   {
+      // COMRAT string like: "00.2" = use table 2. (between 1 and 5).
+      ossimString s;
+      s.push_back(comrat[static_cast<std::string::size_type>(3)]);
+      ossim_int32 comTbl = s.toInt32();
+      if ( (comTbl > 0) && (comTbl < 6) )
+      {
+         tableIndex = comTbl-1;
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimNitfTileSource::loadJpegQuantizationTables WARNING\n"
+            << "\nNo quantization tables specified!"
+            << endl;
+         return false;  
+      }
+   }
+
+   cinfo.quant_tbl_ptrs[0] = jpeg_alloc_quant_table((j_common_ptr) &cinfo);
+ 
+   JQUANT_TBL* quant_ptr = cinfo.quant_tbl_ptrs[0]; // quant_ptr is JQUANT_TBL*
+
+   for (ossim_int32 i = 0; i < 64; ++i)
+   {
+      /* Qtable[] is desired quantization table, in natural array order */
+      quant_ptr->quantval[i] = QTABLE_ARRAY[tableIndex][i];
+   }
+   return true;
+}
+
+//---
+// Default JPEG Huffman tables
+// Values from: MIL-STD-188-198, APPENDIX B
+//---
+bool ossimNitfTileSource::loadJpegHuffmanTables(
+   jpeg_decompress_struct& cinfo) const
+{
+   if ( (cinfo.ac_huff_tbl_ptrs[0] != NULL) &&
+        (cinfo.dc_huff_tbl_ptrs[0] != NULL) )
+   {
+      return false;
+   }
+
+   cinfo.ac_huff_tbl_ptrs[0] = jpeg_alloc_huff_table((j_common_ptr)&cinfo);
+   cinfo.dc_huff_tbl_ptrs[0] = jpeg_alloc_huff_table((j_common_ptr)&cinfo);
+
+   ossim_int32 i;
+   JHUFF_TBL* huff_ptr;
+   
+   // Copy the ac tables.
+   huff_ptr = cinfo.ac_huff_tbl_ptrs[0]; /* huff_ptr is JHUFF_TBL* */     
+   for (i = 0; i < 16; ++i) 
+   {
+      // huff_ptr->bits is array of 17 bits[0] is unused; hence, the i+1
+      huff_ptr->bits[i+1] = AC_BITS[i]; 
+   }
+   
+   for (i = 0; i < 256; ++i)
+   {
+      huff_ptr->huffval[i] = AC_HUFFVAL[i];
+   }
+   
+   // Copy the dc tables.
+   huff_ptr = cinfo.dc_huff_tbl_ptrs[0]; /* huff_ptr is JHUFF_TBL* */
+   for (i = 0; i < 16; ++i)
+   {
+      // huff_ptr->bits is array of 17 bits[0] is unused; hence, the i+1
+      huff_ptr->bits[i+1] = DC_BITS[i];
+   }
+   
+   for (i = 0; i < 256; i++)
+   {
+      /* symbols[] is the list of Huffman symbols, in code-length order */
+      huff_ptr->huffval[i] = DC_HUFFVAL[i];
+   }
+   return true;
+}
+
+// Protected to disallow use...
+ossimNitfTileSource::ossimNitfTileSource(const ossimNitfTileSource& /* obj */)
+{
+}
+
+// Protected to disallow use...
+ossimNitfTileSource& ossimNitfTileSource::operator=(
+   const ossimNitfTileSource& /* rhs */)
+{
+   return *this;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimNitfTileSource_12.cpp b/ossim/src/ossim/imaging/ossimNitfTileSource_12.cpp
new file mode 100644
index 0000000..73e046f
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimNitfTileSource_12.cpp
@@ -0,0 +1,256 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Mingjie Su
+//
+// Description:
+//
+// Contains class declaration for NitfTileSource_12.
+//
+//*******************************************************************
+//  $Id: ossimNitfTileSource_12.cpp 958 2010-06-03 23:00:32Z ming.su $
+
+//#if defined(JPEG_DUAL_MODE_8_12)
+#include <fstream>
+
+#if defined(JPEG_DUAL_MODE_8_12)
+#include <jpeg12/jpeglib.h>
+
+//ossim includes
+#include <ossim//imaging/ossimJpegMemSrc.h>
+#include <ossim/imaging/ossimNitfTileSource_12.h>
+#include <ossim/imaging/ossimJpegDefaultTable.h>
+
+bool ossimNitfTileSource_12::uncompressJpeg12Block(ossim_uint32 x, ossim_uint32 y,
+                                                   ossimRefPtr<ossimImageData> cacheTile,
+                                                   ossimNitfImageHeader* hdr,
+                                                   ossimIpt cacheSize,
+                                                   std::vector<ossim_uint8> compressedBuf,
+                                                   ossim_uint32 readBlockSizeInBytes,
+                                                   ossim_uint32 bands)
+{
+   jpeg_decompress_struct cinfo;
+
+   ossimJpegErrorMgr jerr;
+
+   cinfo.err = jpeg_std_error(&jerr.pub);
+   
+   jerr.pub.error_exit = ossimJpegErrorExit;
+
+   /* Establish the setjmp return context for my_error_exit to use. */
+   if (setjmp(jerr.setjmp_buffer))
+   {
+     jpeg_destroy_decompress(&cinfo);
+   
+     return false;
+   }
+
+   jpeg_CreateDecompress(&cinfo, JPEG_LIB_VERSION, sizeof(cinfo));
+  
+   //---
+   // Step 2: specify data source.  In this case we will uncompress from
+   // memory so we will use "ossimJpegMemorySrc" in place of " jpeg_stdio_src".
+   //---
+   ossimJpegMemorySrc (&cinfo,
+                       &(compressedBuf.front()),
+                       static_cast<size_t>(readBlockSizeInBytes));
+
+   /* Step 3: read file parameters with jpeg_read_header() */
+  
+   jpeg_read_header(&cinfo, TRUE);
+  
+   
+   // Check for Quantization tables.
+   if (cinfo.quant_tbl_ptrs[0] == NULL)
+   {
+      // This will load table specified in COMRAT field.
+      if (loadJpegQuantizationTables(hdr, cinfo) == false)
+      {
+        jpeg_destroy_decompress(&cinfo);
+        return false;
+      }
+   }
+
+   // Check for huffman tables.
+   if (cinfo.ac_huff_tbl_ptrs[0] == NULL)
+   {
+      // This will load default huffman tables into .
+      if (loadJpegHuffmanTables(cinfo) == false)
+      {
+        jpeg_destroy_decompress(&cinfo);
+        return false;
+      }
+   }
+
+   /* Step 4: set parameters for decompression */
+   
+   /* In this example, we don't need to change any of the defaults set by
+    * jpeg_read_header(), so we do nothing here.
+    */
+
+   /* Step 5: Start decompressor */
+   
+   jpeg_start_decompress(&cinfo);
+  
+   const ossim_uint32 SAMPLES = cinfo.output_width;
+
+   //---
+   // Note: Some nitf will be tagged with a given number of lines but the last
+   // jpeg block may go beyond that to a complete block.  So it you clamp to
+   // last line of the nitf you will get a libjpeg error:
+   // 
+   // "Application transferred too few scanlines"
+   //
+   // So here we will always read the full jpeg block even if it is beyond the
+   // last line of the nitf.
+   //---
+   const ossim_uint32 LINES_TO_READ =
+      min(static_cast<ossim_uint32>(cacheSize.y), cinfo.output_height);
+
+   /* JSAMPLEs per row in output buffer */
+   const ossim_uint32 ROW_STRIDE = SAMPLES * cinfo.output_components;
+
+   if ( (SAMPLES < cacheTile->getWidth() ) ||
+        (LINES_TO_READ < cacheTile->getHeight()) )
+   {
+      cacheTile->makeBlank();
+   }
+
+   if ( (SAMPLES > cacheTile->getWidth()) ||
+        (LINES_TO_READ > cacheTile->getHeight()) )
+   {
+     jpeg_finish_decompress(&cinfo);
+     jpeg_destroy_decompress(&cinfo);
+
+     return false;
+   }
+   
+   // Get pointers to the cache tile buffers.
+   std::vector<ossim_uint16*> destinationBuffer(bands);
+   ossim_uint32 band = 0;
+   for (band = 0; band < bands; ++band)
+   {
+     destinationBuffer[band] = cacheTile->getUshortBuf(band);
+   }
+
+   std::vector<ossim_uint16> lineBuffer(ROW_STRIDE);
+   JSAMPROW jbuf[1];
+   jbuf[0] = (JSAMPROW) &(lineBuffer.front());
+
+   while (cinfo.output_scanline < LINES_TO_READ)
+   {
+     // Read a line from the jpeg file.
+     jpeg_read_scanlines(&cinfo, jbuf, 1);
+
+     ossim_uint32 index = 0;
+     for (ossim_uint32 sample = 0; sample < SAMPLES; ++sample)         
+     {
+       for (band = 0; band < bands; ++band)
+       {
+         destinationBuffer[band][sample] = lineBuffer[index];
+         ++index;
+       }
+     }
+
+     for (band = 0; band < bands; ++band)
+     {
+       destinationBuffer[band] += cacheSize.x;         
+     }
+   }
+
+   jpeg_finish_decompress(&cinfo);
+   jpeg_destroy_decompress(&cinfo);
+ 
+   return true;
+}
+
+bool ossimNitfTileSource_12::loadJpegQuantizationTables(ossimNitfImageHeader* hdr,
+                                jpeg_decompress_struct& cinfo)
+{
+  if (!hdr)
+  {
+    return false;
+  }
+
+  ossimString comrat = hdr->getCompressionRateCode();
+  ossim_uint32 tableIndex = 0;
+  if (comrat.size() >= 4)
+  {
+    // COMRAT string like: "00.2" = use table 2. (between 1 and 5).
+    ossimString s;
+    s.push_back(comrat[static_cast<std::string::size_type>(3)]);
+    ossim_int32 comTbl = s.toInt32();
+    if ( (comTbl > 0) && (comTbl < 6) )
+    {
+      tableIndex = comTbl-1;
+    }
+    else
+    {
+      ossimNotify(ossimNotifyLevel_WARN)
+        << "ossimNitfTileSource_12::loadJpegQuantizationTables WARNING\n"
+        << "\nNo quantization tables specified!"
+        << endl;
+      return false;  
+    }
+  }
+
+  cinfo.quant_tbl_ptrs[0] = jpeg_alloc_quant_table((j_common_ptr) &cinfo);
+
+  JQUANT_TBL* quant_ptr = cinfo.quant_tbl_ptrs[0]; // quant_ptr is JQUANT_TBL*
+
+  for (ossim_int32 i = 0; i < 64; ++i)
+  {
+    /* Qtable[] is desired quantization table, in natural array order */
+    quant_ptr->quantval[i] = QTABLE_ARRAY[tableIndex][i];
+  }
+  return true;
+}
+
+bool ossimNitfTileSource_12::loadJpegHuffmanTables(jpeg_decompress_struct& cinfo)
+{
+  if ( (cinfo.ac_huff_tbl_ptrs[0] != NULL) &&
+    (cinfo.dc_huff_tbl_ptrs[0] != NULL) )
+  {
+    return false;
+  }
+
+  cinfo.ac_huff_tbl_ptrs[0] = jpeg_alloc_huff_table((j_common_ptr)&cinfo);
+  cinfo.dc_huff_tbl_ptrs[0] = jpeg_alloc_huff_table((j_common_ptr)&cinfo);
+
+  ossim_int32 i;
+  JHUFF_TBL* huff_ptr;
+
+  // Copy the ac tables.
+  huff_ptr = cinfo.ac_huff_tbl_ptrs[0]; /* huff_ptr is JHUFF_TBL* */     
+  for (i = 0; i < 16; ++i) 
+  {
+    // huff_ptr->bits is array of 17 bits[0] is unused; hence, the i+1
+    huff_ptr->bits[i+1] = AC_BITS[i]; 
+  }
+
+  for (i = 0; i < 256; ++i)
+  {
+    huff_ptr->huffval[i] = AC_HUFFVAL[i];
+  }
+
+  // Copy the dc tables.
+  huff_ptr = cinfo.dc_huff_tbl_ptrs[0]; /* huff_ptr is JHUFF_TBL* */
+  for (i = 0; i < 16; ++i)
+  {
+    // huff_ptr->bits is array of 17 bits[0] is unused; hence, the i+1
+    huff_ptr->bits[i+1] = DC_BITS[i];
+  }
+
+  for (i = 0; i < 256; i++)
+  {
+    /* symbols[] is the list of Huffman symbols, in code-length order */
+    huff_ptr->huffval[i] = DC_HUFFVAL[i];
+  }
+  return true;
+}
+
+#endif /* defined(JPEG_DUAL_MODE_8_12) */
+
diff --git a/ossim/src/ossim/imaging/ossimNitfWriter.cpp b/ossim/src/ossim/imaging/ossimNitfWriter.cpp
new file mode 100644
index 0000000..48146e7
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimNitfWriter.cpp
@@ -0,0 +1,930 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimNitfWriter.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimNitfWriter.h>
+#include <ossim/base/ossimBooleanProperty.h>
+#include <ossim/base/ossimContainerProperty.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimNumericProperty.h>
+#include <ossim/base/ossimProperty.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/projection/ossimRpcSolver.h>
+#include <ossim/projection/ossimUtmProjection.h>
+#include <ossim/projection/ossimMapProjectionInfo.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimRectangleCutFilter.h>
+#include <ossim/support_data/ossimNitfCommon.h>
+#include <ossim/support_data/ossimNitfGeoPositioningTag.h>
+#include <ossim/support_data/ossimNitfLocalGeographicTag.h>
+#include <ossim/support_data/ossimNitfLocalCartographicTag.h>
+#include <ossim/support_data/ossimNitfProjectionParameterTag.h>
+#include <ossim/support_data/ossimNitfNameConversionTables.h>
+#include <ossim/support_data/ossimNitfBlockaTag.h>
+#include <ossim/support_data/ossimNitfImageDataMaskV2_1.h>
+#include <tiffio.h>
+#include <fstream>
+#include <algorithm>
+#include <sstream>
+#include <iomanip>
+
+RTTI_DEF1(ossimNitfWriter, "ossimNitfWriter", ossimNitfWriterBase);
+
+static ossimTrace traceDebug(ossimString("ossimNitfWriter:debug"));
+
+// Maximum file size
+static const ossim_uint64 KB = 1024;
+static const ossim_uint64 MB = KB * KB;
+static const ossim_uint64 MB50 = 50 * MB;
+static const ossim_uint64 GB = KB * MB;
+static const ossim_uint64 GB2 = 2 * GB;
+static const ossim_uint64 GB10 = 10 * GB;
+                            
+ossimNitfWriter::ossimNitfWriter(const ossimFilename& filename,
+                                 ossimImageSource* inputSource)
+   : ossimNitfWriterBase(filename, inputSource),
+     m_outputStream(0),
+     m_fileHeader(0),
+     m_imageHeader(0),
+     m_textHeader(0),
+     m_textEntry(),
+     m_blockSize(OSSIM_DEFAULT_TILE_WIDTH, OSSIM_DEFAULT_TILE_HEIGHT)
+{
+   //---
+   // Since the internal nitf tags are not very accurate, write an external
+   // geometry out as default behavior.  Users can disable this via the
+   // property interface or keyword list.
+   //---
+   setWriteExternalGeometryFlag(true);
+   
+   m_fileHeader       = new ossimNitfFileHeaderV2_1;
+   m_imageHeader      = new ossimNitfImageHeaderV2_1;
+
+   // m_textHeader is conditional so we will not new here.
+   
+   theOutputImageType = "nitf_block_band_separate";
+
+   //---
+   // The tile size can be set in the preferences via "tile_size" keyword.
+   // This will get it if set; else, set to default.
+   //---
+   ossim::defaultTileSize(m_blockSize);
+
+   // These are always set:
+   m_fileHeader->setEncryption( ossimString("0") );
+   m_imageHeader->setJustification( ossimString("R") );
+
+   // Set any site defaults.
+   initializeDefaultsFromConfigFile(
+      dynamic_cast<ossimNitfFileHeaderV2_X*>(m_fileHeader.get()),
+      dynamic_cast<ossimNitfImageHeaderV2_X*>(m_imageHeader.get()) );
+}
+
+ossimNitfWriter::~ossimNitfWriter()
+{
+   //---
+   // This looks like a leak but it's not as both of these are ossimRefPtr's.
+   //---
+   m_fileHeader=0;
+   m_imageHeader=0;
+   m_textHeader=0;
+
+   close();
+}
+
+bool ossimNitfWriter::isOpen()const
+{
+   return m_outputStream;
+}
+
+bool ossimNitfWriter::open()
+{
+   if(isOpen())
+   {
+      close();
+   }
+   m_outputStream = new ossimOFStream64(theFilename.c_str(), 
+                                            ios::out|ios::binary);
+   //new std::ofstream;
+   //m_outputStream->open(theFilename.c_str(), ios::out|ios::binary);
+   
+   return m_outputStream->good();
+}
+
+void ossimNitfWriter::close()
+{
+   if(m_outputStream)
+   {
+      m_outputStream->close();
+      delete m_outputStream;
+      m_outputStream = 0;
+   }
+}
+
+bool ossimNitfWriter::writeFile()
+{
+   if(!theInputConnection->isMaster())
+   {
+      theInputConnection->slaveProcessTiles();
+
+      return true;
+   }
+
+   open();
+
+   if (!isOpen())
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfWriter::writeFile ERROR:"
+            << " Could not open!  Returning..."
+            << std::endl;
+      }
+
+      return false;
+   }
+   
+   // Write out the geometry info.
+   writeGeometry(m_imageHeader.get(), theInputConnection.get());
+
+   // addStandardTags();
+   
+   bool result = false;
+   if((theOutputImageType == "nitf_block_band_separate")||
+      (theOutputImageType == "image/nitf"))
+   {
+      result =  writeBlockBandSeparate();
+   }
+   else if(theOutputImageType == "nitf_block_band_sequential")
+   {
+      result =  writeBlockBandSequential();
+   }
+   
+   close();
+   
+   return result;
+}
+
+void ossimNitfWriter::getImageTypeList(std::vector<ossimString>& imageTypeList)const
+{
+   imageTypeList.push_back(ossimString("nitf_block_band_separate"));
+   imageTypeList.push_back(ossimString("nitf_block_band_sequential"));
+}
+
+void ossimNitfWriter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property) return;
+   
+   ossimString name = property->getName();
+   
+   if(name == "file_header")
+   {
+      ossimContainerProperty* containerProperty = PTR_CAST(ossimContainerProperty,
+                                                           property.get());
+      if(containerProperty)
+      {
+         std::vector<ossimRefPtr<ossimProperty> > propertyList;
+         containerProperty->getPropertyList(propertyList);
+         m_fileHeader->setProperties(propertyList);
+      }
+   }
+   else if(name == "image_header")
+   {
+      ossimContainerProperty* containerProperty = PTR_CAST(ossimContainerProperty,
+                                                           property.get());
+      if(containerProperty)
+      {
+         std::vector<ossimRefPtr<ossimProperty> > propertyList;
+         containerProperty->getPropertyList(propertyList);
+         m_imageHeader->setProperties(propertyList);
+      }
+   }
+   else if(name == "block_size")
+   {
+      ossimIpt blockSize;
+      blockSize.x = property->valueToString().toInt32();
+      blockSize.y = blockSize.x;
+      setTileSize(blockSize);
+   }
+   else
+   {
+      ossimNitfWriterBase::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimNitfWriter::getProperty(const ossimString& name)const
+{
+   ossimRefPtr<ossimProperty> result = 0;
+   
+   if(name == "file_header")
+   {
+      ossimContainerProperty* container = new ossimContainerProperty(name);
+      std::vector<ossimRefPtr<ossimProperty> > propertyList;
+      
+      m_fileHeader->getPropertyList(propertyList);
+      container->addChildren(propertyList);
+      
+      result = container;
+   }
+   else if(name == "image_header")
+   {
+      ossimContainerProperty* container = new ossimContainerProperty(name);
+      std::vector<ossimRefPtr<ossimProperty> > propertyList;
+      
+      m_imageHeader->getPropertyList(propertyList);
+      container->addChildren(propertyList);
+      
+      result = container;
+   }
+   else if(name == "des_header")
+   {
+      ossimContainerProperty* container = new ossimContainerProperty(name);
+      std::vector<ossimRefPtr<ossimProperty> > propertyList;
+
+      // Create a temporary DES in order to populate propertyList.
+      ossimNitfDataExtensionSegmentV2_1 des;
+      des.getPropertyList(propertyList);
+      container->addChildren(propertyList);
+
+      result = container;
+   }
+   else if(name == "block_size")
+   {
+      ossimStringProperty* stringProp =
+         new ossimStringProperty(name,
+                                 ossimString::toString(m_blockSize.x),
+                                 false); // editable flag
+      stringProp->addConstraint(ossimString("64"));
+      stringProp->addConstraint(ossimString("128"));
+      stringProp->addConstraint(ossimString("256"));      
+      stringProp->addConstraint(ossimString("512"));      
+      stringProp->addConstraint(ossimString("1024"));      
+      stringProp->addConstraint(ossimString("2048"));      
+      return stringProp;
+   }
+   else
+   {
+      return ossimNitfWriterBase::getProperty(name);
+   }
+
+   return result;
+}
+
+void ossimNitfWriter::getPropertyNames(
+   std::vector<ossimString>& propertyNames)const
+{
+   ossimNitfWriterBase::getPropertyNames(propertyNames);
+
+   propertyNames.push_back("file_header");
+   propertyNames.push_back("image_header");
+   propertyNames.push_back("des_header");
+   propertyNames.push_back("block_size");
+}
+
+bool ossimNitfWriter::writeBlockBandSeparate()
+{
+   ossimScalarType scalarType  = theInputConnection->getOutputScalarType();
+   ossim_uint64    byteSize    = ossim::scalarSizeInBytes(scalarType);
+   ossimIrect      rect        = theInputConnection->getBoundingRect();
+   ossim_uint64    bands       = theInputConnection->getNumberOfOutputBands();
+   ossim_uint64    idx         = 0;
+   ossim_uint64    headerStart = (ossim_uint64)m_outputStream->tellp64();
+
+   // Set the sequencer block size to be the same as output.
+   theInputConnection->setTileSize(m_blockSize);
+   
+   ossim_uint64 blocksHorizontal = theInputConnection->getNumberOfTilesHorizontal();
+   ossim_uint64 blocksVertical   = theInputConnection->getNumberOfTilesVertical();
+   ossim_uint64 numberOfTiles    = theInputConnection->getNumberOfTiles();
+
+   ossimNitfImageInfoRecordV2_1 imageInfoRecord;
+   imageInfoRecord.setSubheaderLength(439); // ok if no tags
+   imageInfoRecord.setImageLength(bands*byteSize*blocksVertical*m_blockSize.y*blocksHorizontal*m_blockSize.x);
+
+   m_fileHeader->setDate();
+   m_fileHeader->addImageInfoRecord(imageInfoRecord);
+
+   if ( m_textHeader.valid() )
+   {
+      // Add any text headers
+      ossimNitfTextFileInfoRecordV2_1 textInfoRecord;
+      textInfoRecord.setSubheaderLength(285); //default
+      // Set length of text to be that of input text
+      textInfoRecord.setTextLength(m_textEntry.length()); 
+      m_fileHeader->addTextInfoRecord(textInfoRecord);
+   }  
+
+   // Get the overflow tags from the file header and the image subheader
+   takeOverflowTags(true, true);
+   takeOverflowTags(true, false);
+   takeOverflowTags(false, true);
+   takeOverflowTags(false, false);
+
+   for (vector<ossimNitfDataExtensionSegmentV2_1>::iterator iter = m_dataExtensionSegments.begin();
+      iter != m_dataExtensionSegments.end(); iter++)
+   {
+      ossimNitfDataExtSegInfoRecordV2_1 desInfoRecord;
+      iter->setSecurityMarkings(*m_fileHeader);
+      std::ostringstream headerOut;
+      headerOut << std::setw(4)
+                << std::setfill('0')
+                << std::setiosflags(ios::right)
+                << iter->getHeaderLength();
+      strcpy(desInfoRecord.theDataExtSegSubheaderLength, headerOut.str().c_str());
+
+      std::ostringstream dataOut;
+      dataOut << std::setw(9)
+                << std::setfill('0')
+                << std::setiosflags(ios::right)
+                << iter->getDataLength();
+      strcpy(desInfoRecord.theDataExtSegLength, dataOut.str().c_str());
+
+      m_fileHeader->addDataExtSegInfoRecord(desInfoRecord);
+   }
+
+   //---
+   // This makes space for the file header; it is written again at the end of
+   // this method with updated values
+   // need a better way to get the length.  This should be queried on the
+   // header before writing
+   //---
+   m_fileHeader->writeStream(*m_outputStream); 
+   ossim_uint64 headerLength = ((ossim_uint64)m_outputStream->tellp64() - headerStart) /* + 1 */;
+   
+   ossimString representation;
+   m_imageHeader->setActualBitsPerPixel(ossim::getActualBitsPerPixel(scalarType));
+   m_imageHeader->setBitsPerPixel(ossim::getBitsPerPixel(scalarType));
+   m_imageHeader->setPixelType(ossimNitfCommon::getNitfPixelType(scalarType));
+   m_imageHeader->setNumberOfBands(bands);
+   m_imageHeader->setImageMode('B');// blocked
+
+   bool masked = (m_imageHeader->getCompressionCode() == "NM");
+   ossimNitfImageDataMaskV2_1 datamask;
+   datamask.setBlockCount(blocksVertical * blocksHorizontal);
+   ossim_uint64 blockLength = bands * byteSize * m_blockSize.x * m_blockSize.y;
+   datamask.setBlockLengthInBytes(blockLength);
+   std::vector<char> blockZeros;
+
+
+   if((bands == 3)&&
+      (scalarType == OSSIM_UCHAR))
+   {
+      m_imageHeader->setRepresentation("RGB");
+      m_imageHeader->setCategory("VIS");
+   }
+   else if(bands == 1)
+   {
+      m_imageHeader->setRepresentation("MONO");
+      m_imageHeader->setCategory("MS");
+   }
+   else
+   {
+      m_imageHeader->setRepresentation("MULTI");
+      m_imageHeader->setCategory("MS");
+   }
+   
+   m_imageHeader->setBlocksPerRow(blocksHorizontal);
+   m_imageHeader->setBlocksPerCol(blocksVertical);
+   m_imageHeader->setNumberOfPixelsPerBlockRow(m_blockSize.x);
+   m_imageHeader->setNumberOfPixelsPerBlockCol(m_blockSize.y);
+   m_imageHeader->setNumberOfRows(rect.height());
+   m_imageHeader->setNumberOfCols(rect.width());
+
+   ossimNitfImageBandV2_1 bandInfo;
+   for(idx = 0; idx < bands; ++idx)
+   {
+      std::ostringstream out;
+      
+      out << std::setfill('0')
+          << std::setw(2)
+          << idx;
+      
+      bandInfo.setBandRepresentation(out.str().c_str());
+      m_imageHeader->setBandInfo(idx, bandInfo);
+   }
+
+   ossim_uint64 imageHeaderStart = m_outputStream->tellp64();
+   m_imageHeader->writeStream(*m_outputStream);
+   ossim_uint64 imageHeaderEnd = m_outputStream->tellp64();
+   ossim_uint64 imageHeaderSize = imageHeaderEnd - imageHeaderStart;
+
+   // Start the sequence through tiles:
+   theInputConnection->setToStartOfSequence();
+   
+   ossimRefPtr<ossimImageData> data = theInputConnection->getNextTile();
+   ossim_uint64 tileNumber = 1;
+   ossimEndian endian;
+   
+   // write out mask if needed
+   if(masked)
+   {
+      blockZeros.resize(blockLength);
+      memset(&blockZeros.front(), '\0', blockLength);
+      datamask.writeStream(*m_outputStream);
+   }
+   while( data.valid() && !needsAborting())
+   {
+      bool write = true;
+      if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
+      {
+         switch(data->getScalarType())
+         {
+            case OSSIM_USHORT16:
+            case OSSIM_USHORT11:
+            {
+               endian.swap((ossim_uint16*)data->getBuf(),
+                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
+               break;
+            }
+            case OSSIM_SSHORT16:
+            {
+               endian.swap((ossim_sint16*)data->getBuf(),
+                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
+               break;
+            }
+            case OSSIM_FLOAT:
+            case OSSIM_NORMALIZED_FLOAT:
+            {
+               endian.swap((ossim_float32*)data->getBuf(),
+                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
+               break;
+            }
+            case OSSIM_DOUBLE:
+            case OSSIM_NORMALIZED_DOUBLE:
+            {
+               endian.swap((ossim_float64*)data->getBuf(),
+                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
+               break;
+            }
+            default:
+               break;
+         }
+      }
+      
+      if (masked)
+      {
+         if (memcmp(data->getBuf(), &blockZeros.front(), blockLength) == 0)
+         {
+            write = false;
+            datamask.setIncludeBlock(tileNumber-1, false);
+         }
+      }
+      if(write)
+      {
+         m_outputStream->write((char*)(data->getBuf()), data->getSizeInBytes());         
+      }
+      
+      setPercentComplete(((double)tileNumber / (double)numberOfTiles) * 100);
+      
+      if(!needsAborting())
+      {
+         data = theInputConnection->getNextTile();
+      }
+      ++tileNumber;
+   }
+
+   // ossim_uint64 imageSegmentEnd = m_outputStream->tellp64();
+
+   // Let's write our text header
+   if ( m_textHeader.valid() )
+   {
+      m_textHeader->writeStream(*m_outputStream); 
+      //Now write the text
+      m_outputStream->write((char*)(m_textEntry.c_str()), m_textEntry.length());
+   }   
+
+
+   for (vector<ossimNitfDataExtensionSegmentV2_1>::iterator iter = m_dataExtensionSegments.begin();
+      iter != m_dataExtensionSegments.end(); iter++)
+   {
+      iter->writeStream(*m_outputStream);
+   }
+
+   if (masked)
+   {
+      m_outputStream->seekp(imageHeaderEnd);
+      datamask.writeStream(*m_outputStream);
+      //delete [] blockZeros;
+   }
+
+   std::streamoff pos = m_outputStream->tellp64();
+
+   setComplexityLevel(pos, m_fileHeader.get());
+
+   /*
+    * Need to change the way I compute file length and header length later
+    * We need to figure out a better way to compute.
+    */
+   m_fileHeader->setFileLength(static_cast<ossim_uint64>(pos));
+   m_fileHeader->setHeaderLength(headerLength);
+   m_outputStream->seekp(0, ios::beg);
+   imageInfoRecord.setSubheaderLength(imageHeaderSize);
+   m_fileHeader->replaceImageInfoRecord(0, imageInfoRecord);
+   m_fileHeader->writeStream(*m_outputStream);
+   
+   return true;
+}
+
+bool ossimNitfWriter::writeBlockBandSequential()
+{
+   ossimScalarType scalarType = theInputConnection->getOutputScalarType();
+   ossim_uint64    byteSize   = ossim::scalarSizeInBytes(scalarType);
+   ossimIrect      rect       = theInputConnection->getBoundingRect();
+   ossim_uint64    bands      = theInputConnection->getNumberOfOutputBands();
+   ossim_uint64    idx        = 0;
+   ossim_uint64    headerStart   = (ossim_uint64)m_outputStream->tellp64();
+
+   // Set the sequencer block size to be the same as output.
+   theInputConnection->setTileSize(m_blockSize);
+   
+   ossim_uint64 blocksHorizontal = theInputConnection->getNumberOfTilesHorizontal();
+   ossim_uint64 blocksVertical   = theInputConnection->getNumberOfTilesVertical();
+   ossim_uint64 numberOfTiles    = theInputConnection->getNumberOfTiles();
+
+   ossimNitfImageInfoRecordV2_1 imageInfoRecord;
+   imageInfoRecord.setSubheaderLength(439);
+   imageInfoRecord.setImageLength(bands*byteSize*blocksHorizontal*blocksVertical*m_blockSize.x*m_blockSize.y);
+
+   m_fileHeader->setDate();
+   m_fileHeader->addImageInfoRecord(imageInfoRecord);
+
+   if ( m_textHeader.valid() )
+   {
+      // Add any text headers
+      ossimNitfTextFileInfoRecordV2_1 textInfoRecord;
+      textInfoRecord.setSubheaderLength(285); //default
+      // Set length of text to be that of input text
+      textInfoRecord.setTextLength(m_textEntry.length()); 
+      m_fileHeader->addTextInfoRecord(textInfoRecord);
+   }
+
+   //---
+   // This makes space for the file header; it is written again at the end of
+   // this method with updated values
+   // need a better way to get the length.  This should be queried on the
+   // header before writing
+   //---  
+   m_fileHeader->writeStream(*m_outputStream);
+   ossim_uint64 headerLength = ((ossim_uint64)m_outputStream->tellp64() - headerStart) /* + 1 */;
+   
+   ossimString representation;
+   m_imageHeader->setActualBitsPerPixel(ossim::getActualBitsPerPixel(scalarType));
+   m_imageHeader->setBitsPerPixel(ossim::getBitsPerPixel(scalarType));
+   m_imageHeader->setPixelType(ossimNitfCommon::getNitfPixelType(scalarType));
+   m_imageHeader->setNumberOfBands(bands);
+   m_imageHeader->setImageMode('S');// blocked
+   
+   if((bands == 3)&&
+      (scalarType == OSSIM_UCHAR))
+   {
+      m_imageHeader->setRepresentation("RGB");
+      m_imageHeader->setCategory("VIS");
+   }
+   else if(bands == 1)
+   {
+      m_imageHeader->setRepresentation("MONO");
+      m_imageHeader->setCategory("MS");
+   }
+   else
+   {
+      m_imageHeader->setRepresentation("MULTI");
+      m_imageHeader->setCategory("MS");
+   }
+   m_imageHeader->setBlocksPerRow(blocksHorizontal);
+   m_imageHeader->setBlocksPerCol(blocksVertical);
+   m_imageHeader->setNumberOfPixelsPerBlockRow(m_blockSize.x);
+   m_imageHeader->setNumberOfPixelsPerBlockCol(m_blockSize.y);
+   m_imageHeader->setNumberOfRows(rect.height());
+   m_imageHeader->setNumberOfCols(rect.width());
+
+   ossimNitfImageBandV2_1 bandInfo;
+   for(idx = 0; idx < bands; ++idx)
+   {
+      std::ostringstream out;
+      
+      out << std::setfill('0')
+          << std::setw(2)
+          << idx;
+      
+      bandInfo.setBandRepresentation(out.str().c_str());
+      m_imageHeader->setBandInfo(idx, bandInfo);
+   }
+
+   ossim_uint64 imageHeaderStart = m_outputStream->tellp64();
+   m_imageHeader->writeStream(*m_outputStream);
+   ossim_uint64 imageHeaderEnd = m_outputStream->tellp64();
+   ossim_uint64 imageHeaderSize = imageHeaderEnd - imageHeaderStart;
+
+   // ossimIpt ul = rect.ul();
+
+   // Start the sequence through tiles:
+   theInputConnection->setToStartOfSequence();
+
+   ossimRefPtr<ossimImageData> data = theInputConnection->getNextTile();
+   ossim_uint64 tileNumber = 0;
+   ossimEndian endian;
+
+   // get the start to the first band of data block
+   //
+   ossim_uint64 streamOffset = m_outputStream->tellp64();
+   
+   // holds the total pixels to the next band
+
+   ossim_uint64 blockSizeInBytes = m_blockSize.x*m_blockSize.y*ossim::scalarSizeInBytes(data->getScalarType());
+   ossim_uint64 bandOffsetInBytes = (blockSizeInBytes*blocksHorizontal*blocksVertical);
+
+   bool needSwapping = endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN;
+   while(data.valid() && !needsAborting())
+   {
+      if(needSwapping)
+      {
+         switch(data->getScalarType())
+         {
+            case OSSIM_USHORT16:
+            case OSSIM_USHORT11:
+            {
+               endian.swap((ossim_uint16*)data->getBuf(),
+                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
+               break;
+            }
+            case OSSIM_SSHORT16:
+            {
+               endian.swap((ossim_sint16*)data->getBuf(),
+                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
+               break;
+            }
+            case OSSIM_FLOAT:
+            case OSSIM_NORMALIZED_FLOAT:
+            {
+               endian.swap((ossim_float32*)data->getBuf(),
+                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
+               break;
+            }
+            case OSSIM_DOUBLE:
+            case OSSIM_NORMALIZED_DOUBLE:
+            {
+               endian.swap((ossim_float64*)data->getBuf(),
+                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
+               break;
+            }
+            default:
+               break;
+         }
+      }
+
+      for(idx = 0; idx < bands; ++idx)
+      {
+         m_outputStream->seekp(streamOffset+ // start of image stream
+                               tileNumber*blockSizeInBytes + // start of block for band separate output
+                               bandOffsetInBytes*idx, // which band offset is it
+                               ios::beg); 
+         
+         m_outputStream->write((char*)(data->getBuf(idx)),
+                               blockSizeInBytes);
+      }
+      ++tileNumber;
+      
+      setPercentComplete(((double)tileNumber / (double)numberOfTiles) * 100);
+      
+      if(!needsAborting())
+      {
+         data = theInputConnection->getNextTile();
+      }
+   }
+
+   // Let's write our text header
+   if ( m_textHeader.valid() )
+   {
+      m_textHeader->writeStream(*m_outputStream); 
+      //Now write the text
+      m_outputStream->write((char*)(m_textEntry.c_str()), m_textEntry.length());
+   }   
+
+   ossim_uint64 pos = m_outputStream->tellp64();
+
+   setComplexityLevel(pos, m_fileHeader.get());
+
+   /*
+    * Need to change the way I compute file length and header length later
+    * We need to figure out a better way to compute.
+    */
+   m_fileHeader->setFileLength(static_cast<ossim_uint64>(pos));
+   m_fileHeader->setHeaderLength(headerLength);
+   m_outputStream->seekp(0, ios::beg);
+   imageInfoRecord.setSubheaderLength(imageHeaderSize);
+   m_fileHeader->replaceImageInfoRecord(0, imageInfoRecord);
+   m_fileHeader->writeStream(*m_outputStream);
+   
+   return true;
+}
+
+void ossimNitfWriter::addRegisteredTag(ossimRefPtr<ossimNitfRegisteredTag> registeredTag,
+   bool unique)
+{
+   addRegisteredTag(registeredTag, unique, 1, ossimString("IXSHD"));
+}
+
+void ossimNitfWriter::addRegisteredTag(ossimRefPtr<ossimNitfRegisteredTag> registeredTag,
+   bool unique, const ossim_uint32& ownerIndex, const ossimString& tagType)
+{
+   ossimNitfTagInformation tagInfo;
+   tagInfo.setTagData(registeredTag.get());
+   tagInfo.setTagType(tagType);
+
+   switch (ownerIndex)
+   {
+      case 0:
+      {
+         m_fileHeader->addTag(tagInfo, unique);
+         break;
+      }
+
+      case 1:
+      {
+         m_imageHeader->addTag(tagInfo, unique);
+         break;
+      }
+
+      default:
+      {
+         // Do nothing
+      }
+   }
+}
+
+bool ossimNitfWriter::addTextToNitf(std::string &inputText)
+{
+   // Initialize the m_textHeader
+   m_textEntry = inputText;
+   if ( m_textHeader.valid() == false )
+   {
+      // Only created if we need it.
+      m_textHeader = new ossimNitfTextHeaderV2_1;
+   }
+   return true;
+}
+void ossimNitfWriter::getTileSize(ossimIpt& size) const
+{
+   size = m_blockSize;
+}
+
+void ossimNitfWriter::setTileSize(const ossimIpt& tileSize)
+{
+   const ossim_int32 MIN_BLOCK_SIZE = 64;
+   if ( (tileSize.x % MIN_BLOCK_SIZE) || (tileSize.y % MIN_BLOCK_SIZE) )
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfWriter::setTileSize ERROR:"
+            << "\nBlock size must be a multiple of " << MIN_BLOCK_SIZE
+            << "\nSize remains:  " << m_blockSize
+            << std::endl;
+      }
+   }
+   else
+   {
+      m_blockSize = tileSize;
+   }
+}
+
+#if 0
+void ossimNitfWriter::addStandardTags()
+{
+
+   if(!theInputConnection)
+   {
+      return;
+   }
+   
+   // commenting this out for now.  For some reason the pixels
+   // are off when I add this tag.  I checked the parsing and it
+   // appears to be the correct length???  So, I am not sure
+   // why we are off when reading the output back in.
+   //
+   // first lets do the projection tag.  I REALLY need to add
+   // parameter support soon or this tag is useless.
+   //
+   ossimKeywordlist kwl;
+   theInputConnection->getImageGeometry(kwl);
+   ossimRefPtr<ossimProjection> proj = ossimProjectionFactoryRegistry::instance()->createProjection(kwl);
+   ossimNitfNameConversionTables table;
+   ossimMapProjection* mapProj = PTR_CAST(ossimMapProjection, proj.get());
+   ossimNitfTagInformation tagInfo;
+   
+   if(mapProj)
+   {
+
+      if(!PTR_CAST(ossimUtmProjection, mapProj))
+      {
+         ossimRefPtr<ossimNitfProjectionParameterTag> parameterTag = new ossimNitfProjectionParameterTag;
+         
+         ossimString nitfCode = table.convertMapProjectionNameToNitfCode(proj->getClassName());
+         ossimString nitfName = table.convertNitfCodeToNitfProjectionName(nitfCode);
+         
+         parameterTag->setName(nitfName);
+         parameterTag->setCode(nitfCode);
+         parameterTag->setFalseX(mapProj->getFalseEasting());
+         parameterTag->setFalseY(mapProj->getFalseNorthing());
+         
+         tagInfo.setTagData(parameterTag.get());
+         m_imageHeader->addTag(tagInfo);
+      }
+   }
+}
+#endif
+
+bool ossimNitfWriter::saveState(ossimKeywordlist& kwl,
+                                const char* prefix) const
+{
+   return ossimNitfWriterBase::saveState(kwl, prefix);
+}
+
+bool ossimNitfWriter::loadState(const ossimKeywordlist& kwl,
+                                const char* prefix)
+{
+   return ossimNitfWriterBase::loadState(kwl, prefix);
+}
+
+ossimNitfImageHeaderV2_1 *ossimNitfWriter::getImageHeader()
+{
+   return m_imageHeader.get();
+}
+
+ossimNitfFileHeaderV2_1 *ossimNitfWriter::getFileHeader()
+{
+   return m_fileHeader.get();
+}
+
+void ossimNitfWriter::addDataExtensionSegment(const ossimNitfDataExtensionSegmentV2_1& des, bool allowTreOverflow)
+{
+   if (allowTreOverflow == false)
+   {
+      ossimRefPtr<ossimProperty> pId = des.getProperty(ossimNitfDataExtensionSegmentV2_1::DESID_KW);
+      if (pId == NULL || pId->valueToString() == "TRE_OVERFLOW" ||
+         pId->valueToString() == "REGISTERED EXTENSIONS" || pId->valueToString() == "CONTROLLED EXTENSIONS")
+      {
+         return;
+      }
+   }
+
+   m_dataExtensionSegments.push_back(des);
+}
+void ossimNitfWriter::takeOverflowTags(bool useFileHeader, bool userDefinedTags)
+{
+   ossimString itemIndex;
+   std::vector<ossimNitfTagInformation> overflowTags;
+   const ossim_uint32 potentialDesIndex = m_dataExtensionSegments.size() + 1;
+
+   if (useFileHeader)
+   {
+      m_fileHeader->takeOverflowTags(overflowTags, potentialDesIndex, userDefinedTags);
+      itemIndex = "0";
+   }
+   else
+   {
+      m_imageHeader->takeOverflowTags(overflowTags, potentialDesIndex, userDefinedTags);
+      itemIndex = "1";
+   }
+
+   if (overflowTags.empty() == false)
+   {
+      ossimNitfDataExtensionSegmentV2_1 des;
+      ossimRefPtr<ossimProperty> pDe =
+         new ossimStringProperty(ossimNitfDataExtensionSegmentV2_1::DE_KW, "DE");
+      des.setProperty(pDe);
+
+      ossimRefPtr<ossimProperty> pId =
+         new ossimStringProperty(ossimNitfDataExtensionSegmentV2_1::DESID_KW, "TRE_OVERFLOW");
+      des.setProperty(pId);
+
+      ossimRefPtr<ossimProperty> pVersion =
+         new ossimStringProperty(ossimNitfDataExtensionSegmentV2_1::DESVER_KW, "1");
+      des.setProperty(pVersion);
+
+      ossimRefPtr<ossimProperty> pOverflow =
+         new ossimStringProperty(ossimNitfDataExtensionSegmentV2_1::DESOFLW_KW, overflowTags[0].getTagType());
+      des.setProperty(pOverflow);
+
+      ossimRefPtr<ossimProperty> pItem =
+         new ossimStringProperty(ossimNitfDataExtensionSegmentV2_1::DESITEM_KW, itemIndex);
+      des.setProperty(pItem);
+
+      des.setTagList(overflowTags);
+      addDataExtensionSegment(des, true);
+   }
+}
+
+
diff --git a/ossim/src/ossim/imaging/ossimNitfWriterBase.cpp b/ossim/src/ossim/imaging/ossimNitfWriterBase.cpp
new file mode 100644
index 0000000..ac0c6dd
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimNitfWriterBase.cpp
@@ -0,0 +1,361 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: OSSIM Kakadu based nitf writer.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimNitfWriterBase.cpp 2981 2011-10-10 21:14:02Z david.burken $
+
+#include <ossim/imaging/ossimNitfWriterBase.h>
+#include <ossim/base/ossimBooleanProperty.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageSourceSequencer.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimMapProjectionInfo.h>
+#include <ossim/projection/ossimUtmProjection.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/projection/ossimRpcSolver.h>
+#include <ossim/support_data/ossimNitfBlockaTag.h>
+#include <ossim/support_data/ossimNitfFileHeader.h>
+#include <ossim/support_data/ossimNitfFileHeaderV2_X.h>
+#include <ossim/support_data/ossimNitfImageHeader.h>
+#include <ossim/support_data/ossimNitfImageHeaderV2_X.h>
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+#include <ossim/support_data/ossimNitfTagInformation.h>
+
+static const char ENABLE_BLOCKA_KW[] = "enable_blocka_tag";
+static const char ENABLE_RPCB_KW[]   = "enable_rpcb_tag";
+
+RTTI_DEF1(ossimNitfWriterBase, "ossimNitfWriterBase", ossimImageFileWriter)
+   
+static ossimTrace traceDebug(ossimString("ossimNitfWriterBase:debug"));
+
+ossimNitfWriterBase::ossimNitfWriterBase()
+   : ossimImageFileWriter(),
+     theEnableRpcbTagFlag(false),
+     theEnableBlockaTagFlag(true)
+{
+}
+
+ossimNitfWriterBase::ossimNitfWriterBase(const ossimFilename& filename,
+                                         ossimImageSource* inputSource)
+   : ossimImageFileWriter(filename, inputSource, 0),
+     theEnableRpcbTagFlag(false),
+     theEnableBlockaTagFlag(true)
+{
+}
+
+ossimNitfWriterBase::~ossimNitfWriterBase()
+{
+}
+
+void ossimNitfWriterBase::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(property.valid())
+   {
+      ossimString name = property->getName();
+
+      if (name == ENABLE_RPCB_KW)
+      {
+         theEnableRpcbTagFlag = property->valueToString().toBool();
+      }
+      else if (name == ENABLE_BLOCKA_KW)
+      {
+         theEnableBlockaTagFlag = property->valueToString().toBool();
+      }
+      else
+      {
+         ossimImageFileWriter::setProperty(property);
+      }
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimNitfWriterBase::getProperty(
+   const ossimString& name)const
+{
+   ossimRefPtr<ossimProperty> result = 0;
+   
+   if(name == ENABLE_RPCB_KW)
+   {
+      result = new ossimBooleanProperty(name, theEnableRpcbTagFlag);
+   }   
+   else if(name == ENABLE_BLOCKA_KW)
+   {
+      result = new ossimBooleanProperty(name, theEnableBlockaTagFlag);
+   }   
+   else
+   {
+      result = ossimImageFileWriter::getProperty(name);
+   }
+
+   return result;
+}
+
+void ossimNitfWriterBase::getPropertyNames(
+   std::vector<ossimString>& propertyNames)const
+{
+   ossimImageFileWriter::getPropertyNames(propertyNames);
+
+   propertyNames.push_back(ENABLE_BLOCKA_KW);
+   propertyNames.push_back(ENABLE_RPCB_KW);
+}
+
+
+bool ossimNitfWriterBase::saveState(ossimKeywordlist& kwl,
+                                    const char* prefix) const
+{
+   kwl.add(prefix, ENABLE_RPCB_KW, theEnableRpcbTagFlag, true);
+   kwl.add(prefix, ENABLE_BLOCKA_KW, theEnableBlockaTagFlag, true);
+
+   return ossimImageFileWriter::saveState(kwl, prefix);
+}
+
+bool ossimNitfWriterBase::loadState(const ossimKeywordlist& kwl,
+                                    const char* prefix)
+{
+   // Look for the rpcb enable flag keyword.
+   const char* lookup = kwl.find(prefix, ENABLE_RPCB_KW);
+   if(lookup)
+   {
+      ossimString os = lookup;
+      theEnableRpcbTagFlag = os.toBool();
+   }
+
+   // Look for the blocka enable flag keyword.
+   lookup = kwl.find(prefix, ENABLE_BLOCKA_KW);
+   if(lookup)
+   {
+      ossimString os = lookup;
+      theEnableBlockaTagFlag = os.toBool();
+   }
+
+   return ossimImageFileWriter::loadState(kwl, prefix);
+}
+
+void ossimNitfWriterBase::writeGeometry(ossimNitfImageHeaderV2_X* hdr,
+                                        ossimImageSourceSequencer* seq)
+{
+   if (hdr && seq)
+   {
+      ossimRefPtr<ossimImageGeometry> geom = theInputConnection->getImageGeometry();
+      ossimKeywordlist kwl;
+
+      if (geom.valid()&&geom->hasProjection())
+      {
+         // Get the requested bounding rectangles.
+         ossimIrect rect = seq->getBoundingRect();
+         
+         // See if it's a map projection; else, a sensor model.
+         ossimMapProjection* mapProj =
+            PTR_CAST(ossimMapProjection, geom->getProjection());
+         if (mapProj)
+         {
+            // Use map info to get the corners.
+            ossimMapProjectionInfo mapInfo(mapProj, rect);
+            mapInfo.setPixelType(OSSIM_PIXEL_IS_AREA);
+            
+            // See if it's utm.
+            ossimUtmProjection* utmProj = PTR_CAST(ossimUtmProjection,
+                                                   mapProj);
+            if(utmProj)
+            {
+               ossimDpt ul = mapInfo.ulEastingNorthingPt();
+               ossimDpt ur = mapInfo.urEastingNorthingPt();
+               ossimDpt lr = mapInfo.lrEastingNorthingPt();
+               ossimDpt ll = mapInfo.llEastingNorthingPt();
+               
+               if(utmProj->getHemisphere() == 'N')
+               {
+                  hdr->setUtmNorth(utmProj->getZone(), ul, ur, lr, ll);
+               }
+               else
+               {
+                  hdr->setUtmSouth(utmProj->getZone(), ul, ur, lr, ll);
+               }
+            }
+            else
+            {
+               ossimGpt ul = mapInfo.ulGroundPt();
+               ossimGpt ur = mapInfo.urGroundPt();
+               ossimGpt lr = mapInfo.lrGroundPt();
+               ossimGpt ll = mapInfo.llGroundPt();
+               hdr->setGeographicLocationDms(ul, ur, lr, ll);
+            }
+
+            if (theEnableBlockaTagFlag)
+            {
+               addBlockaTag(mapInfo, hdr);
+            }
+         }
+         
+         if (theEnableRpcbTagFlag)
+         {
+            addRpcbTag(rect, geom->getProjection(), hdr);
+         }
+         
+      } // matches:  if (proj.valid())
+      
+   } // matches: if (hdr && seq)
+}
+
+void ossimNitfWriterBase::addBlockaTag(ossimMapProjectionInfo& mapInfo,
+                                       ossimNitfImageHeaderV2_X* hdr)
+{
+   if (hdr)
+   {
+      // Capture the current pixel type.
+      ossimPixelType originalPixelType = mapInfo.getPixelType();
+      
+      // This tag wants corners as area:
+      mapInfo.setPixelType(OSSIM_PIXEL_IS_AREA);
+      
+      // Stuff the blocka tag which has six digit precision.
+      ossimNitfBlockaTag* blockaTag = new ossimNitfBlockaTag();
+      
+      // Set the block number.
+      blockaTag->setBlockInstance(1);
+      
+      // Set the number of lines.
+      blockaTag->setLLines(mapInfo.linesPerImage());
+      
+      // Set first row, first column.
+      blockaTag->setFrfcLoc(ossimDpt(mapInfo.ulGroundPt()));
+      
+      // Set first row, last column.
+      blockaTag->setFrlcLoc(ossimDpt(mapInfo.urGroundPt()));
+      
+      // Set last row, last column.
+      blockaTag->setLrlcLoc(ossimDpt(mapInfo.lrGroundPt()));
+      
+      // Set last row, first column.
+      blockaTag->setLrfcLoc(ossimDpt(mapInfo.llGroundPt()));
+      
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfWriterBase::addBlockaTag DEBUG:"
+            << "\nBLOCKA Tag:" << *((ossimObject*)(blockaTag))
+            << std::endl;
+      }
+      
+      // Add the tag to the header.
+      ossimRefPtr<ossimNitfRegisteredTag> blockaTagRp = blockaTag;
+      ossimNitfTagInformation blockaTagInfo(blockaTagRp);
+      hdr->addTag(blockaTagInfo);
+      
+      // Reset the pixel type to original value
+      mapInfo.setPixelType(originalPixelType);
+      
+   } // matches: if (hdr)
+}
+
+void ossimNitfWriterBase::addRpcbTag(const ossimIrect& rect,
+                                     ossimProjection* proj,
+                                     ossimNitfImageHeaderV2_X* hdr)
+{
+   if (proj && hdr)
+   {
+      bool useElevation = false;
+      
+      if (PTR_CAST(ossimMapProjection, proj))
+      {
+         // If we're already map projected turn the elevation off.
+         useElevation = false;
+      }
+      
+      // Make an rpc solver.
+      ossimRefPtr<ossimRpcSolver> rs = new ossimRpcSolver(useElevation);
+      
+      // Compute the coefficients.
+      rs->solveCoefficients(ossimDrect(rect), proj, 64, 64);
+      
+      // Add the tag.
+      ossimRefPtr<ossimNitfRegisteredTag> tag = rs->getNitfRpcBTag();
+      ossimNitfTagInformation tagInfo(tag);
+      hdr->addTag(tagInfo);
+      
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfWriterBase::addRpcbTag DEBUG:"
+            << "\nRPCB Tag:" << *((ossimObject*)(tag.get()))
+            << "\nProjection:\n";
+         
+         proj->print(ossimNotify(ossimNotifyLevel_DEBUG));
+         
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "\nRect: " << rect << std::endl;
+      }
+      
+   } // matches: if (proj && hdr)
+}
+
+void ossimNitfWriterBase::setComplexityLevel(std::streamoff endPosition,
+                                             ossimNitfFileHeaderV2_X* hdr)
+{
+   if (hdr)
+   {
+      //---
+      // See MIL-STD-2500C, Table A-10:
+      //
+      // Lots of rules here, but for now we will key off of file size.
+      //---
+      const std::streamoff MB   = 1024 * 1024;
+      const std::streamoff MB50 = 50   * MB;
+      const std::streamoff GIG  = 1000 * MB;
+      const std::streamoff GIG2 = 2    * GIG;
+      
+      ossimString complexity = "03"; // Less than 50 mb.
+      
+      if ( (endPosition >= MB50) && (endPosition < GIG) )
+      {
+         complexity = "05";
+      }
+      else if ( (endPosition >= GIG) && (endPosition < GIG2) )
+      {
+         complexity = "06";
+      }
+      else if (endPosition >= GIG2)
+      {
+         complexity = "07";
+      }
+      
+      hdr->setComplexityLevel(complexity);
+   }
+}
+
+ossimString ossimNitfWriterBase::getExtension() const
+{
+   return ossimString("ntf");
+}
+
+void ossimNitfWriterBase::initializeDefaultsFromConfigFile( ossimNitfFileHeaderV2_X* fileHdr,
+                                                            ossimNitfImageHeaderV2_X* imgHdr )
+{
+   // Look in prefs for site configuration file:
+   const char* lookup = ossimPreferences::instance()->
+      findPreference("nitf_writer.site_configuration_file");
+   if ( lookup && fileHdr && imgHdr )
+   {
+      ossimKeywordlist kwl;
+      if ( kwl.addFile( lookup ) )
+      {
+         fileHdr->loadState( kwl, "nitf.file." );
+         imgHdr->loadState( kwl, "nitf.image." );
+      }
+   }
+}
+
+
diff --git a/ossim/src/ossim/imaging/ossimNormalizedRemapTable.cpp b/ossim/src/ossim/imaging/ossimNormalizedRemapTable.cpp
new file mode 100644
index 0000000..9855e7b
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimNormalizedRemapTable.cpp
@@ -0,0 +1,37 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author:  David Burken
+//
+// Description:
+//
+// Contains class definition for NormalizedRemapTable.
+// 
+//*******************************************************************
+//  $Id: ossimNormalizedRemapTable.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimNormalizedRemapTable.h>
+
+ossimNormalizedRemapTable::ossimNormalizedRemapTable()
+{
+}
+
+ossimNormalizedRemapTable::~ossimNormalizedRemapTable()
+{
+}
+
+// Private copy constructor.
+ossimNormalizedRemapTable::ossimNormalizedRemapTable(
+   const ossimNormalizedRemapTable&)
+{}
+
+// Private assignment operator.
+ossimNormalizedRemapTable& ossimNormalizedRemapTable::operator=(
+   const ossimNormalizedRemapTable&)
+{
+   return *this;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimNormalizedS16RemapTable.cpp b/ossim/src/ossim/imaging/ossimNormalizedS16RemapTable.cpp
new file mode 100644
index 0000000..7989fc9
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimNormalizedS16RemapTable.cpp
@@ -0,0 +1,50 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Description:
+//
+// Contains class definition for ossimNormalizedS16RemapTable.
+// 
+//*******************************************************************
+//  $Id: ossimNormalizedS16RemapTable.cpp 9963 2006-11-28 21:11:01Z gpotts $
+
+#include <ossim/imaging/ossimNormalizedS16RemapTable.h>
+
+ossim_float64 ossimNormalizedS16RemapTable::theTable[TABLE_ENTRIES];
+bool          ossimNormalizedS16RemapTable::theTableIsInitialized = false;
+
+ossimNormalizedS16RemapTable::ossimNormalizedS16RemapTable()
+   : ossimNormalizedRemapTable()
+{
+   if (!theTableIsInitialized)
+   {
+      const ossim_int32   ENTRIES     = getEntries();
+      const ossim_float64 DENOMINATOR = getNormalizer();
+      
+      //---
+      // Initialize the remap table.
+      //
+      // Specialized for elevation, make -32768 and -32767 map to 0 since
+      // DTED NULL is -32767.
+      //
+      // NOTE: Zero will always remap back to -32768 with this hack.  This
+      // could cause issues on writers that use pixFromNorm(). (drb)
+      //---
+      theTable[0] = 0.0; // Index zero always for null.
+      theTable[1] = 0.0; // Specialized for DTED.
+
+      for (ossim_int32 i = 2; i < ENTRIES; ++i)
+      {
+         theTable[i] = static_cast<ossim_float64>(i)/DENOMINATOR;
+      }
+
+      theTableIsInitialized = true;
+   }
+}
+
+ossimNormalizedS16RemapTable::~ossimNormalizedS16RemapTable()
+{}
+
diff --git a/ossim/src/ossim/imaging/ossimNormalizedU11RemapTable.cpp b/ossim/src/ossim/imaging/ossimNormalizedU11RemapTable.cpp
new file mode 100644
index 0000000..5e126ae
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimNormalizedU11RemapTable.cpp
@@ -0,0 +1,42 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Description:
+//
+// Contains class definition for ossimNormalizedU11RemapTable.
+// 
+//*******************************************************************
+//  $Id: ossimNormalizedU11RemapTable.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimNormalizedU11RemapTable.h>
+
+ossim_float64 ossimNormalizedU11RemapTable::theTable[TABLE_ENTRIES];
+bool          ossimNormalizedU11RemapTable::theTableIsInitialized = false;
+
+ossimNormalizedU11RemapTable::ossimNormalizedU11RemapTable()
+   : ossimNormalizedRemapTable()
+{
+   if (!theTableIsInitialized)
+   {
+      const ossim_int32   ENTRIES     = getEntries();
+      const ossim_float64 DENOMINATOR = getNormalizer();
+      
+      //---
+      // Initialize the remap table.
+      //---
+      theTable[0] = 0.0; // Index zero always for null.
+      for (ossim_int32 i = 1; i < ENTRIES; ++i)
+      {
+         theTable[i] = static_cast<ossim_float64>(i)/DENOMINATOR;
+      }
+
+      theTableIsInitialized = true;
+   }
+}
+
+ossimNormalizedU11RemapTable::~ossimNormalizedU11RemapTable()
+{}
+
diff --git a/ossim/src/ossim/imaging/ossimNormalizedU16RemapTable.cpp b/ossim/src/ossim/imaging/ossimNormalizedU16RemapTable.cpp
new file mode 100644
index 0000000..2c2f7a6
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimNormalizedU16RemapTable.cpp
@@ -0,0 +1,45 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Description:
+//
+// Contains class definition for ossimNormalizedU16RemapTable.
+// 
+//*******************************************************************
+//  $Id: ossimNormalizedU16RemapTable.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimNormalizedU16RemapTable.h>
+
+ossim_float64 ossimNormalizedU16RemapTable::theTable[TABLE_ENTRIES];
+bool          ossimNormalizedU16RemapTable::theTableIsInitialized = false;
+
+
+ossimNormalizedU16RemapTable::ossimNormalizedU16RemapTable()
+   : ossimNormalizedRemapTable()
+{
+   if (!theTableIsInitialized)
+   {
+      const ossim_int32   ENTRIES     = getEntries();
+      const ossim_float64 DENOMINATOR = getNormalizer();
+      
+      //---
+      // Initialize the remap table.
+      //---
+      theTable[0] = 0.0; // Index zero always for null.
+      for (ossim_int32 i = 1; i < ENTRIES; ++i)
+      {
+         theTable[i] = static_cast<ossim_float64>(i)/DENOMINATOR;
+      }
+
+      theTableIsInitialized = true;
+   }
+}
+
+ossimNormalizedU16RemapTable::~ossimNormalizedU16RemapTable()
+{}
+
+
+
diff --git a/ossim/src/ossim/imaging/ossimNormalizedU8RemapTable.cpp b/ossim/src/ossim/imaging/ossimNormalizedU8RemapTable.cpp
new file mode 100644
index 0000000..d956394
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimNormalizedU8RemapTable.cpp
@@ -0,0 +1,43 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Description:
+//
+// Contains class definition for ossimNormalizedU8RemapTable.
+// 
+//*******************************************************************
+//  $Id: ossimNormalizedU8RemapTable.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimNormalizedU8RemapTable.h>
+
+ossim_float64 ossimNormalizedU8RemapTable::theTable[TABLE_ENTRIES];
+bool          ossimNormalizedU8RemapTable::theTableIsInitialized = false;
+
+ossimNormalizedU8RemapTable::ossimNormalizedU8RemapTable()
+   : ossimNormalizedRemapTable()
+{
+   if (!theTableIsInitialized)
+   {
+      const ossim_int32   ENTRIES     = getEntries();
+      const ossim_float64 DENOMINATOR = getNormalizer();
+      
+      //---
+      // Initialize the remap table.
+      //---
+      theTable[0] = 0.0; // Index zero always for null.
+      for (ossim_int32 i = 1; i < ENTRIES; ++i)
+      {
+         theTable[i] = static_cast<ossim_float64>(i)/DENOMINATOR;
+      }
+
+      theTableIsInitialized = true;
+   }
+}
+
+ossimNormalizedU8RemapTable::~ossimNormalizedU8RemapTable()
+{}
+
+
diff --git a/src/ossim/imaging/ossimNullPixelFlip.cpp b/ossim/src/ossim/imaging/ossimNullPixelFlip.cpp
similarity index 100%
rename from src/ossim/imaging/ossimNullPixelFlip.cpp
rename to ossim/src/ossim/imaging/ossimNullPixelFlip.cpp
diff --git a/src/ossim/imaging/ossimOrthoImageMosaic.cpp b/ossim/src/ossim/imaging/ossimOrthoImageMosaic.cpp
similarity index 100%
rename from src/ossim/imaging/ossimOrthoImageMosaic.cpp
rename to ossim/src/ossim/imaging/ossimOrthoImageMosaic.cpp
diff --git a/src/ossim/imaging/ossimOverviewBuilderBase.cpp b/ossim/src/ossim/imaging/ossimOverviewBuilderBase.cpp
similarity index 100%
rename from src/ossim/imaging/ossimOverviewBuilderBase.cpp
rename to ossim/src/ossim/imaging/ossimOverviewBuilderBase.cpp
diff --git a/src/ossim/imaging/ossimOverviewBuilderFactory.cpp b/ossim/src/ossim/imaging/ossimOverviewBuilderFactory.cpp
similarity index 100%
rename from src/ossim/imaging/ossimOverviewBuilderFactory.cpp
rename to ossim/src/ossim/imaging/ossimOverviewBuilderFactory.cpp
diff --git a/src/ossim/imaging/ossimOverviewBuilderFactoryBase.cpp b/ossim/src/ossim/imaging/ossimOverviewBuilderFactoryBase.cpp
similarity index 100%
rename from src/ossim/imaging/ossimOverviewBuilderFactoryBase.cpp
rename to ossim/src/ossim/imaging/ossimOverviewBuilderFactoryBase.cpp
diff --git a/src/ossim/imaging/ossimOverviewBuilderFactoryRegistry.cpp b/ossim/src/ossim/imaging/ossimOverviewBuilderFactoryRegistry.cpp
similarity index 100%
rename from src/ossim/imaging/ossimOverviewBuilderFactoryRegistry.cpp
rename to ossim/src/ossim/imaging/ossimOverviewBuilderFactoryRegistry.cpp
diff --git a/ossim/src/ossim/imaging/ossimOverviewSequencer.cpp b/ossim/src/ossim/imaging/ossimOverviewSequencer.cpp
new file mode 100644
index 0000000..33a4999
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimOverviewSequencer.cpp
@@ -0,0 +1,1049 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: Sequencer for building overview files.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimOverviewSequencer.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimOverviewSequencer.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimMultiResLevelHistogram.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageMetaData.h>
+#include <ossim/parallel/ossimMpi.h>
+
+
+#ifdef OSSIM_ID_ENABLED
+static const char OSSIM_ID[] = "$Id: ossimOverviewSequencer.cpp 23664 2015-12-14 14:17:27Z dburken $";
+#endif
+
+static ossimTrace traceDebug("ossimOverviewSequencer:debug");
+
+ossimOverviewSequencer::ossimOverviewSequencer()
+   :
+   ossimReferenced(),
+   ossimErrorStatusInterface(),
+   m_imageHandler(0),
+   m_maskWriter(0),
+   m_maskFilter(0),
+   m_tile(0),
+   m_areaOfInterest(),
+   m_tileSize(OSSIM_DEFAULT_TILE_WIDTH, OSSIM_DEFAULT_TILE_HEIGHT),
+   m_numberOfTilesHorizontal(0),
+   m_numberOfTilesVertical(0),
+   m_currentTileNumber(0),
+   m_sourceResLevel(0),
+   m_dirtyFlag(true),
+   m_decimationFactor(2),
+   m_resampleType(ossimFilterResampler::ossimFilterResampler_BOX),
+   m_histogram(0),
+   m_histoMode(OSSIM_HISTO_MODE_UNKNOWN),
+   m_histoTileIndex(1),
+   m_scanForMinMax(false),
+   m_scanForMinMaxNull(false),
+   m_minValues(0),
+   m_maxValues(0),
+   m_nulValues(0)
+{
+   m_areaOfInterest.makeNan();
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimOverviewSequencer::ossimOverviewSequencer entered..."
+         << "\nmpi rank:  "<< ossimMpi::instance()->getRank()
+         << std::endl;
+#ifdef OSSIM_ID_ENABLED
+      ossimNotify(ossimNotifyLevel_DEBUG)<< "OSSIM_ID:  " << OSSIM_ID
+                                         << std::endl;
+#endif
+   }
+}
+
+ossimOverviewSequencer::~ossimOverviewSequencer()
+{
+   m_imageHandler = 0;
+   m_maskFilter   = 0;
+   m_maskWriter   = 0;
+   m_tile         = 0;
+   m_histogram    = 0;
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimOverviewSequencer::~ossimOverviewSequencer entered..."
+         << "\nmpi rank:  " << ossimMpi::instance()->getRank()
+         << std::endl;
+   }
+}
+
+ossim_uint32 ossimOverviewSequencer::getNumberOfTiles() const
+{
+   return (m_numberOfTilesHorizontal*m_numberOfTilesVertical);
+}
+
+ossim_uint32 ossimOverviewSequencer::getNumberOfTilesHorizontal()const
+{
+   return m_numberOfTilesHorizontal;
+}
+
+ossim_uint32 ossimOverviewSequencer::getNumberOfTilesVertical()const
+{
+   return m_numberOfTilesVertical;
+}
+
+void ossimOverviewSequencer::getOutputImageRectangle(ossimIrect& rect) const
+{
+   if (m_areaOfInterest.hasNans())
+   {
+      rect.makeNan(); // not initialized...
+   }
+   else
+   {
+      ossim_int32 width  = m_areaOfInterest.width()  / m_decimationFactor;
+      ossim_int32 height = m_areaOfInterest.height() / m_decimationFactor;
+
+      //---
+      // NOTE:
+      // This will add a sample or line if there is a remainder like:
+      // 1025 / 2 = 512 will then become 513.  It will be up to the resample
+      // tile method to fill the extra sample correctly.
+      //---
+      if (m_areaOfInterest.width() % m_decimationFactor)
+      {
+         ++width;
+      }
+      if (m_areaOfInterest.height() % m_decimationFactor)
+      {
+         ++height;
+      }
+      
+      rect = ossimIrect(0, 0, width-1, height-1);
+   }
+}
+
+void ossimOverviewSequencer::setImageHandler(ossimImageHandler* input)
+{
+   m_imageHandler = input;
+   m_areaOfInterest.makeNan();
+   m_dirtyFlag = true;
+
+   if (m_maskWriter.valid())
+      m_maskWriter->connectMyInputTo(m_imageHandler.get());
+}
+
+void ossimOverviewSequencer::setSourceLevel(ossim_uint32 level)
+{
+   m_sourceResLevel = level;
+   m_areaOfInterest.makeNan();
+   m_dirtyFlag = true;
+}
+
+ossimHistogramMode ossimOverviewSequencer::getHistogramMode() const
+{
+   return m_histoMode;
+}
+
+void ossimOverviewSequencer::setHistogramMode(ossimHistogramMode mode)
+{
+   m_histoMode = mode;
+   m_dirtyFlag = true;
+}
+
+void ossimOverviewSequencer::writeHistogram()
+{
+   if ( m_histogram.valid() && m_imageHandler.valid() )
+   {
+      writeHistogram( m_imageHandler->getFilenameWithThisExtension("his") );
+   }
+}
+
+void ossimOverviewSequencer::writeHistogram(const ossimFilename& file)
+{
+   if ( m_histogram.valid() )
+   {
+      ossimRefPtr<ossimMultiResLevelHistogram> histo = new ossimMultiResLevelHistogram;
+      histo->addHistogram( m_histogram.get() );
+      ossimKeywordlist kwl;
+      histo->saveState(kwl);
+      kwl.write(file.c_str());
+   }
+}
+
+void ossimOverviewSequencer::initialize()
+{
+   if ( m_dirtyFlag == false )
+   {
+      return; // Already initialized.
+   }
+   
+   if ( !m_imageHandler )
+   {
+      return;
+   }
+
+   ossimImageSource* imageSource = m_imageHandler.get();
+   if (m_maskFilter.valid())
+      imageSource = m_maskFilter.get();
+
+   // Check the area of interest and set from image if needed.
+   if ( m_areaOfInterest.hasNans() )
+   {
+      m_areaOfInterest = m_imageHandler->getImageRectangle(m_sourceResLevel);
+   }
+
+   // Check the tile size and set from image if needed.
+   if ( m_tileSize.hasNans() )
+   {
+      m_tileSize.x = imageSource->getTileWidth();
+      m_tileSize.y = imageSource->getTileHeight();
+   }
+
+   // Update m_numberOfTilesHorizontal and m_numberOfTilesVertical.
+   updateTileDimensions();
+
+   // Start on first tile.
+   m_currentTileNumber = 0;
+
+   // Use this factory constructor as it copies the min/max/nulls from the image handler.
+   m_tile = ossimImageDataFactory::instance()->
+      create( 0, imageSource->getNumberOfOutputBands(), imageSource);
+   
+   if(m_tile.valid())
+   {
+      // Set the width and height.
+      m_tile->setWidthHeight(static_cast<ossim_uint32>(m_tileSize.x),
+                             static_cast<ossim_uint32>(m_tileSize.y) );
+      // Initialize tile buffer.
+      m_tile->initialize();
+   }
+
+   if (m_histoMode != OSSIM_HISTO_MODE_UNKNOWN)
+   {
+      m_histogram = new ossimMultiBandHistogram;
+      
+      m_histogram->create(imageSource);
+
+      if (m_histoMode == OSSIM_HISTO_MODE_NORMAL)
+      {
+         m_histoTileIndex = 1; // Sample every tile.
+      }
+      else
+      {
+         const ossim_float64 PIXEL_TO_SAMPLE = 100.0 * 256.0 * 256.0; // 100 256x256 tiles.
+         ossim_float64 pixels = m_tileSize.x * m_tileSize.y * getNumberOfTiles();
+
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "pixels: " << pixels << "\n"
+               << "PIXEL_TO_SAMPLE: " << PIXEL_TO_SAMPLE << "\n";
+         }
+         
+         if (pixels > PIXEL_TO_SAMPLE)
+         {
+            m_histoTileIndex = ossim::round<ossim_uint32>(pixels/PIXEL_TO_SAMPLE);
+         }
+         else
+         {
+            m_histoTileIndex = 1; // Sample every tile.
+         }
+      }
+   }
+   else
+   {
+      m_histogram = 0;
+   }
+
+
+   if ( m_scanForMinMax || m_scanForMinMaxNull )
+   {
+      //---
+      // The methods ossimImageData::computeMinMaxNullPix and computeMinMaxPix
+      // will resize and set min to max, max to min and null to max if the arrays passed in
+      // are empty.
+      //---
+      clearMinMaxNullArrays();
+   }
+   
+   m_dirtyFlag = false;
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "aoi:                      " << m_areaOfInterest
+         << "\ntile size:              " << m_tileSize
+         << "\ntiles wide:             " << m_numberOfTilesHorizontal
+         << "\ntiles high:             " << m_numberOfTilesVertical
+         << "\nsource rlevel:          " << m_sourceResLevel
+         << "\ndecimation factor:      " << m_decimationFactor
+         << "\nresamp type:            " << m_resampleType
+         << "\nscan for min max:       " << (m_scanForMinMax?"true\n":"false\n")
+         << "\nscan for min, max null: " << (m_scanForMinMaxNull?"true\n":"false\n")
+         << "\nhisto mode:             " << m_histoMode << "\n";
+      if (m_histoMode != OSSIM_HISTO_MODE_UNKNOWN)
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "Sampling every " << m_histoTileIndex << " tile(s) for histogram.\n";
+      }
+   }
+}
+
+void ossimOverviewSequencer::setToStartOfSequence()
+{
+   m_currentTileNumber = 0;
+}
+
+ossimRefPtr<ossimImageData> ossimOverviewSequencer::getNextTile()
+{
+   if ( m_dirtyFlag )
+   {
+      return ossimRefPtr<ossimImageData>();
+   }
+
+   // Get the rectangle to grab from the image.
+   ossimIrect inputRect;
+   getInputTileRectangle(inputRect);
+
+   // Get the output rectangle.
+   ossimIrect outputRect;
+   getOutputTileRectangle(outputRect);
+
+   // Capture the output rectangle.
+   m_tile->setImageRectangle(outputRect);
+
+   // Start with a blank tile.
+   m_tile->makeBlank();
+
+   // Grab the input tile.
+   ossimRefPtr<ossimImageData> inputTile;
+   if (m_maskFilter.valid())
+   {
+      inputTile = m_maskFilter->getTile(inputRect, m_sourceResLevel);
+
+      // Check for errors reading tile and set our error status for callers.
+      if ( m_maskFilter->hasError() )
+      {
+         setErrorStatus();
+      }
+   }
+   else
+   {
+      inputTile = m_imageHandler->getTile(inputRect, m_sourceResLevel);
+
+      // Check for errors reading tile and set our error status for callers.
+      if ( m_imageHandler->hasError() )
+      {
+         setErrorStatus();
+      }
+   }
+
+   if ( hasError() )
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimOverviewSequencer::getNextTile  ERROR:"
+         << "\nError set reading tile:  " << m_currentTileNumber << std::endl;
+      if ( inputTile.valid() )
+      {
+         inputTile->makeBlank();
+      }
+   }
+   else if ( inputTile.valid() )
+   {
+      if ( m_scanForMinMaxNull )
+      {
+         inputTile->computeMinMaxNulPix(m_minValues, m_maxValues, m_nulValues);
+      }
+      else if ( m_scanForMinMax )
+      {
+         inputTile->computeMinMaxPix(m_minValues, m_maxValues);
+      }
+      
+      if ( ( m_histoMode != OSSIM_HISTO_MODE_UNKNOWN ) &&
+           ( (m_currentTileNumber % m_histoTileIndex) == 0 ) )
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "ossimOverviewSequencer::getNextTile DEBUG:"
+               << "\npopulating histogram for tile: " << m_currentTileNumber
+               << "\n";
+         }
+         inputTile->populateHistogram(m_histogram);
+      }
+      
+      if ( (inputTile->getDataObjectStatus() == OSSIM_PARTIAL) ||
+           (inputTile->getDataObjectStatus() == OSSIM_FULL ) )
+      {
+         // Resample the tile.
+         resampleTile(inputTile.get());
+         m_tile->validate();
+         
+         // Scan the resampled pixels for bogus values to be masked out (if masking enabled)
+         if (m_maskWriter.valid())
+            m_maskWriter->generateMask(m_tile, m_sourceResLevel+1);
+      }
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimOverviewSequencer::getNextTile DEBUG:"
+         << "\nRequest failed for input rect: " << inputRect
+         << "\nRes level:  " << m_sourceResLevel << std::endl;
+   }
+
+   // Increment the tile index.
+   ++m_currentTileNumber;
+
+   return m_tile;
+}
+
+void ossimOverviewSequencer::slaveProcessTiles()
+{
+}
+
+bool ossimOverviewSequencer::isMaster() const
+{
+   return true;
+}
+
+ossimIpt ossimOverviewSequencer::getTileSize() const
+{
+   return m_tileSize;
+}
+
+void ossimOverviewSequencer::setTileSize(const ossimIpt& tileSize)
+{
+   m_tileSize = tileSize;
+   updateTileDimensions();
+   m_dirtyFlag = true;
+}
+
+void ossimOverviewSequencer::setResampleType(
+   ossimFilterResampler::ossimFilterResamplerType resampleType)
+{
+   m_resampleType = resampleType;
+}
+
+void ossimOverviewSequencer::setScanForMinMax(bool flag)
+{
+   m_scanForMinMax  = flag;
+}
+
+bool ossimOverviewSequencer::getScanForMinMax() const
+{
+   return m_scanForMinMax;
+}
+
+void ossimOverviewSequencer::setScanForMinMaxNull(bool flag)
+{
+   m_scanForMinMaxNull = flag;
+}
+
+bool ossimOverviewSequencer::getScanForMinMaxNull() const
+{
+   return m_scanForMinMaxNull;
+}
+
+void ossimOverviewSequencer::clearMinMaxNullArrays()
+{
+   m_minValues.clear();
+   m_maxValues.clear();
+   m_nulValues.clear();
+}
+
+bool ossimOverviewSequencer::writeOmdFile(const std::string& file)
+{
+   static const char M[] = "ossimOverviewSequencer::writeOmdFile";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\nfile: " << file << endl;
+   }
+
+   //---
+   // This method writes an omd file to disk.  Typically called after sequencing trough tile that
+   // were scanned for min, max, and potentially null values.
+   // Since this can be called without a scan there is extra logic in here to initialize values
+   // if so.  Also there are sanity checks for cases where there is no null value, i.e. a
+   // full tile, in which case assumptions have to be made...
+   //---
+   
+   bool result = false;
+   if ( file.size() && m_imageHandler.valid() )
+   {
+      const ossim_uint32 BANDS = m_imageHandler->getNumberOfInputBands();
+      const ossimScalarType SCALAR = m_imageHandler->getOutputScalarType();
+      const ossim_float64 DEFAULT_NULL = ossim::defaultNull(SCALAR);
+
+      if ( traceDebug() )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "Original array values:\n";
+         std::vector<ossim_float64>::const_iterator i = m_minValues.begin();
+         ossim_int32 band = 0;
+         while ( i < m_minValues.end() )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "min[" << band++ << "]: " << *i << "\n";
+            ++i;
+         }
+         i = m_maxValues.begin();
+         band = 0;
+         while ( i < m_maxValues.end() )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "max[" << band++ << "]: " << *i << "\n";
+            ++i;
+         }
+         i = m_nulValues.begin();
+         band = 0;
+         while ( i < m_nulValues.end() )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "nul[" << band++ << "]: " << *i << "\n";
+            ++i;
+         }
+      }
+      
+      if ( (m_scanForMinMax == true) || (m_nulValues.size() !=  BANDS) )
+      {
+         // Only scanned for min and max so set the null.
+         if (m_nulValues.size() !=  BANDS)
+         {
+            m_nulValues.resize(BANDS);
+         }
+         for (ossim_uint32 band = 0; band < BANDS; ++band)
+         {
+            m_nulValues[band] = m_imageHandler->getNullPixelValue(band);
+         }
+      }
+      else if ( m_scanForMinMaxNull == true )
+      {
+         //---
+         // The arrays (sizes) should be set if we did the scan.
+         // Note that scanning for null only works if there IS a null in the image; hence, the
+         // extra sanity checks as if there are no null then the null gets set to the real min.
+         //
+         // This is very dangerous code as it makes assumptions (drb)...
+         //---
+         if ( (m_minValues.size() ==  BANDS) &&
+              (m_maxValues.size() ==  BANDS) &&
+              (m_nulValues.size() ==  BANDS) )
+         {
+            switch(SCALAR)
+            {
+               case OSSIM_UINT8:
+               case OSSIM_SINT8:                  
+               case OSSIM_UINT16:
+               case OSSIM_USHORT11:
+               case OSSIM_UINT32:
+               {
+                  // All of these should have a null of 0.
+                  for (ossim_uint32 band = 0; band < BANDS; ++band)
+                  {
+                     if ( m_nulValues[band] > DEFAULT_NULL )
+                     {
+                        if ( m_nulValues[band] < m_minValues[band] )
+                        {
+                           m_minValues[band] = m_nulValues[band];
+                        }
+                        m_nulValues[band] = DEFAULT_NULL;
+                     }
+                  }
+                  break;
+               }
+               case OSSIM_SINT16:
+               {
+                  for (ossim_uint32 band = 0; band < BANDS; ++band)
+                  {
+                     if ( ( m_nulValues[band] != DEFAULT_NULL ) && // -32768
+                          ( m_nulValues[band] != -32767.0 )    &&
+                          ( m_nulValues[band] != -32766.0 )    &&
+                          ( m_nulValues[band] != -9999.0 ) )
+                     {
+                        if ( ( m_nulValues[band] > -9999.0 ) &&
+                             ( m_nulValues[band] < m_minValues[band] ) )
+                        {
+                           m_minValues[band] = m_nulValues[band];
+                        }
+                        m_nulValues[band] = DEFAULT_NULL;
+                     }
+                  }
+                  break;
+               }
+               case OSSIM_SINT32:
+               {
+                  for (ossim_uint32 band = 0; band < BANDS; ++band)
+                  {
+                     if ( ( m_nulValues[band] != DEFAULT_NULL ) &&
+                          ( m_nulValues[band] != -32768.0 ) &&        // Common null
+                          ( m_nulValues[band] != -32767.0 ) &&       // The other common null.
+                          ( m_nulValues[band] != -32766.0 ) &&
+                          ( m_nulValues[band] != -9999.0  ) &&
+                          ( m_nulValues[band] != -99999.0 ) )
+                     {
+                        if ( ( m_nulValues[band] > -9999.0 ) &&
+                             ( m_nulValues[band] < m_minValues[band] ) )
+                        {
+                           m_minValues[band] = m_nulValues[band];
+                        }
+                        m_nulValues[band] = DEFAULT_NULL;
+                     } 
+                  }
+                  break;
+               }
+               case OSSIM_FLOAT32:
+               case OSSIM_FLOAT64: 
+               {
+                  for (ossim_uint32 band = 0; band < BANDS; ++band)
+                  {
+                     if ( ( m_nulValues[band] != DEFAULT_NULL ) &&
+                          ( m_nulValues[band] != -32768.0 ) &&  
+                          ( m_nulValues[band] != -32767.0 ) && 
+                          ( m_nulValues[band] != -32766.0 ) &&
+                          ( m_nulValues[band] != -9999.0  ) &&
+                          ( m_nulValues[band] != -99999.0 ) )
+                     {
+                        if ( ( m_nulValues[band] > -9999 ) &&
+                             ( m_nulValues[band] < m_minValues[band] ) )
+                        {
+                           m_minValues[band] = m_nulValues[band];
+                        }
+                        m_nulValues[band] = DEFAULT_NULL;
+                     } 
+                  }
+                  break;
+               }
+               case OSSIM_NORMALIZED_FLOAT:
+               case OSSIM_NORMALIZED_DOUBLE:
+               {
+                  for (ossim_uint32 band = 0; band < BANDS; ++band)
+                  {
+                     if ( ( m_nulValues[band] != DEFAULT_NULL ) &&
+                          ( m_nulValues[band] > 0.0) )
+                     {
+                        if ( m_nulValues[band] < m_minValues[band] )
+                        {
+                           m_minValues[band] = m_nulValues[band];
+                        }
+                        m_nulValues[band] = 0.0;
+                     }
+                  }
+                  break;
+               }
+               case OSSIM_SCALAR_UNKNOWN:
+               default:
+               {
+                  if(traceDebug())
+                  {
+                     ossimNotify(ossimNotifyLevel_DEBUG)
+                        << __FILE__ << ":" << __LINE__
+                        << " " << M << "\nUnhandled scalar type:  " << SCALAR << std::endl;
+                  }
+                  break;
+               }
+
+            } // End: switch(SCALAR)
+            
+         } // Matches: if ( (m_minValues.size() ==  BANDS) &&...
+         else
+         {
+            // ERROR!
+            ossimNotify(ossimNotifyLevel_WARN)
+               << M << "ERROR:\nMin, max and null array sizes bad! No omd file will be written."
+               << std::endl;
+         }
+         
+      } // Matches: else if ( m_scanForMinMaxNull == true )
+      else
+      {
+         // Get the values from the image handler.
+         if (m_minValues.size() !=  BANDS)
+         {
+            m_minValues.resize(BANDS);
+            for (ossim_uint32 band = 0; band < BANDS; ++band)
+            {
+               m_minValues[band] = m_imageHandler->getMinPixelValue(band);
+            }
+         }
+         if (m_maxValues.size() !=  BANDS)
+         {
+            m_maxValues.resize(BANDS);
+            for (ossim_uint32 band = 0; band < BANDS; ++band)
+            {
+               m_maxValues[band] = m_imageHandler->getMaxPixelValue(band);
+            }
+         }
+         if (m_nulValues.size() !=  BANDS)
+         {
+            m_nulValues.resize(BANDS);
+            for (ossim_uint32 band = 0; band < BANDS; ++band)
+            {
+               m_nulValues[band] = m_imageHandler->getNullPixelValue(band);
+            }
+         }
+      }
+
+      // Last size check as the m_scanForMinMaxNull block could have failed.
+      if ( ( m_minValues.size() ==  BANDS ) &&
+           ( m_maxValues.size() ==  BANDS ) &&
+           ( m_nulValues.size() ==  BANDS ) )
+      {
+         // Write the omd file:
+         ossimKeywordlist kwl;
+         if( ossimFilename(file).exists())
+         {
+            // Pick up existing omd file.
+            kwl.addFile(file.c_str());
+         }
+         ossimImageMetaData metaData(SCALAR, BANDS);
+         for(ossim_uint32 band = 0; band < BANDS; ++band)
+         {
+            metaData.setMinPix(band,  m_minValues[band]);
+            metaData.setMaxPix(band,  m_maxValues[band]);
+            metaData.setNullPix(band, m_nulValues[band]);
+         }
+         // Save to keyword list.
+         metaData.saveState(kwl);
+         
+         // Write to disk.
+         result = kwl.write(file.c_str());
+         if ( result )
+         {
+            ossimNotify(ossimNotifyLevel_NOTICE) << "Wrote file: " << file << "\n";
+         }
+         else
+         {
+            ossimNotify(ossimNotifyLevel_WARN) << "ERROR writing file: " << file << "\n";
+         }
+      }
+
+      if ( traceDebug() )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "Final array values:\n";
+         std::vector<ossim_float64>::const_iterator i = m_minValues.begin();
+         ossim_int32 band = 0;
+         while ( i < m_minValues.end() )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "min[" << band++ << "]: " << *i << "\n";
+            ++i;
+         }
+         i = m_maxValues.begin();
+         band = 0;
+         while ( i < m_maxValues.end() )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "max[" << band++ << "]: " << *i << "\n";
+            ++i;
+         }
+         i = m_nulValues.begin();
+         band = 0;
+         while ( i < m_nulValues.end() )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "nul[" << band++ << "]: " << *i << "\n";
+            ++i;
+         }
+      }
+
+   } // Matches: if ( file && m_imageHandler.valid() )
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exit status" << (result?"true\n":"false\n");
+   }
+   
+   return result;
+}
+
+void ossimOverviewSequencer::getInputTileRectangle(ossimIrect& inputRect) const
+{
+   if (!m_imageHandler) return;
+   
+   getOutputTileRectangle(inputRect);
+   inputRect = inputRect * m_decimationFactor;
+
+#if 0
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimOverviewSequencer::getInputTileRectangle DEBUG:"
+         << "input rect: " << inputRect << std::endl;
+   }
+#endif
+}
+
+void ossimOverviewSequencer::getOutputTileRectangle(
+   ossimIrect& outputRect) const
+{
+   // Get the row and column.
+   ossim_int32 row = m_currentTileNumber / m_numberOfTilesHorizontal;
+   ossim_int32 col = m_currentTileNumber % m_numberOfTilesHorizontal;
+
+   ossimIpt pt;
+
+   // Set the upper left.
+   pt.y = row * m_tileSize.y;
+   pt.x = col * m_tileSize.x;
+   outputRect.set_ul(pt);
+
+   // Set the lower right.
+   pt.y = pt.y + m_tileSize.y - 1;
+   pt.x = pt.x + m_tileSize.x - 1;   
+   outputRect.set_lr(pt);
+
+#if 0
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimOverviewSequencer::getOutputTileRectangle DEBUG:"
+         << "output rect: " << outputRect << std::endl;
+   }
+#endif
+}
+
+void ossimOverviewSequencer::updateTileDimensions()
+{
+   if( m_areaOfInterest.hasNans() || m_tileSize.hasNans() )
+   {
+      m_numberOfTilesHorizontal = 0;
+      m_numberOfTilesVertical   = 0;
+      m_dirtyFlag = true;
+   }
+   else
+   {
+      // Get the output rectangle.
+      ossimIrect rect;
+      getOutputImageRectangle(rect);
+      
+      m_numberOfTilesHorizontal =
+         static_cast<ossim_uint32>( rect.width()  / m_tileSize.x );
+      m_numberOfTilesVertical =
+         static_cast<ossim_uint32>( rect.height() / m_tileSize.y );
+
+      if (rect.width()  % m_tileSize.x)
+      {
+         ++m_numberOfTilesHorizontal;
+      }
+      if (rect.height() % m_tileSize.y)
+      {
+         ++m_numberOfTilesVertical;
+      }
+   }
+}
+
+void ossimOverviewSequencer::resampleTile(const ossimImageData* inputTile)
+{
+   switch(m_imageHandler->getOutputScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         resampleTile(inputTile, ossim_uint8(0));
+         break;
+      }
+
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+      {
+         resampleTile(inputTile, ossim_uint16(0));
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         resampleTile(inputTile, ossim_sint16(0));
+         break;
+      }
+
+      case OSSIM_UINT32:
+      {
+         resampleTile(inputTile, ossim_uint32(0));
+         break;
+      }
+         
+      case OSSIM_SINT32:
+      {
+         resampleTile(inputTile, ossim_sint32(0));
+         break;
+      }
+         
+      case OSSIM_FLOAT32:
+      {
+         resampleTile(inputTile, ossim_float32(0.0));
+         break;
+      }
+         
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_FLOAT64:
+      {
+         resampleTile(inputTile, ossim_float64(0.0));
+         break;
+      }
+      default:
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimOverviewSequencer::resampleTile Unkown pixel type!"
+            << std::endl;
+         return;
+         
+   } // End of "switch(m_imageHandler->getOutputScalarType())"
+}
+
+template <class T>
+void  ossimOverviewSequencer::resampleTile(const ossimImageData* inputTile, T  /* dummy */ )
+{
+#if 0
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimOverviewSequencer::resampleTile DEBUG: "
+         << "\ncurrent tile: " << m_currentTileNumber
+         << "\ninput tile:\n" << *inputTile
+         << "output tile:\n" << *(m_tile.get())
+         << endl;
+   }
+#endif
+   
+   const ossim_uint32 BANDS = m_tile->getNumberOfBands();
+   const ossim_uint32 LINES = m_tile->getHeight();
+   const ossim_uint32 SAMPS = m_tile->getWidth();
+   const ossim_uint32 INPUT_WIDTH = m_decimationFactor*m_tileSize.x;
+   
+   T nullPixel              = 0;
+   ossim_float64 weight     = 0.0;
+   ossim_float64 value      = 0.0;
+   ossim_uint32 sampOffset  = 0;
+   
+   if (m_resampleType == ossimFilterResampler::ossimFilterResampler_NEAREST_NEIGHBOR)
+   {
+      for (ossim_uint32 band=0; band<BANDS; ++band)
+      {
+         const T* s = static_cast<const T*>(inputTile->getBuf(band)); // source
+         T*       d = static_cast<T*>(m_tile->getBuf(band)); // destination
+         
+         nullPixel = static_cast<T>(inputTile->getNullPix(band));
+         weight = 0.0;
+         value  = 0.0;
+         
+         for (ossim_uint32 i=0; i<LINES; ++i)
+         {
+            for (ossim_uint32 j=0; j<SAMPS; ++j)
+            {
+               sampOffset = j*m_decimationFactor;
+               
+               weight = 1.0;
+               value  = *(s + i*m_decimationFactor*INPUT_WIDTH + sampOffset);
+               
+               if(weight)
+               {
+                  d[j] = static_cast<T>( value/weight );
+               }
+               else
+               {
+                  d[j] = nullPixel;
+               }
+               
+            } // End of sample loop.
+            
+            d += m_tileSize.x;
+            
+         } // End of line loop.
+         
+      } // End of band loop.
+      
+   }
+   else // ossimFilterResampler::ossimFilterResampler_BOX
+   {
+      ossim_uint32 lineOffset1 = 0;
+      ossim_uint32 lineOffset2 = 0;
+      ossim_float64 ul = 0.0;
+      ossim_float64 ur = 0.0;
+      ossim_float64 ll = 0.0;
+      ossim_float64 lr = 0.0;
+
+      for (ossim_uint32 band=0; band<BANDS; ++band)
+      {
+         const T* s = static_cast<const T*>(inputTile->getBuf(band)); // source
+         T*       d = static_cast<T*>(m_tile->getBuf(band)); // destination
+
+         nullPixel = static_cast<T>(inputTile->getNullPix(band));
+         weight = 0.0;
+         value  = 0.0;
+         
+         for (ossim_uint32 i=0; i<LINES; ++i)
+         {
+            lineOffset1 = i*m_decimationFactor*INPUT_WIDTH;
+            lineOffset2 = (i*m_decimationFactor+1)*INPUT_WIDTH;
+            
+            for (ossim_uint32 j=0; j<SAMPS; ++j)
+            {
+               sampOffset = j*m_decimationFactor;
+               
+               weight = 0.0;
+               value  = 0.0;
+               
+               //---
+               // Grab four pixels from the source, average, and assign
+               // to output.
+               //---
+               ul = *(s + lineOffset1 + sampOffset);
+               ur = *(s + lineOffset1 + sampOffset + 1);
+               ll = *(s + lineOffset2 + sampOffset);
+               lr = *(s + lineOffset2 + sampOffset + 1);
+               
+               if(ul != nullPixel)
+               {
+                  ++weight;
+                  value += ul;
+               }
+               if(ur != nullPixel)
+               {
+                  ++weight;
+                  value += ur;
+               }
+               if(ll != nullPixel)
+               {
+                  ++weight;
+                  value += ll;
+               }
+               if(lr != nullPixel)
+               {
+                  ++weight;
+                  value += lr;
+               }
+
+               if(weight)
+               {
+                  d[j] = static_cast<T>( value/weight );
+               }
+               else
+               {
+                  d[j] = nullPixel;
+               }
+            
+            } // End of sample loop.
+            
+            d += m_tileSize.x;
+            
+         } // End of line loop.
+         
+      } // End of band loop.
+   }
+}
+
+void ossimOverviewSequencer::setBitMaskObjects(ossimBitMaskWriter* mask_writer,
+                                               ossimMaskFilter* mask_filter)
+{
+   m_maskWriter = mask_writer;
+   m_maskFilter = mask_filter;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimPdfWriter.cpp b/ossim/src/ossim/imaging/ossimPdfWriter.cpp
new file mode 100644
index 0000000..fbc891e
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimPdfWriter.cpp
@@ -0,0 +1,1888 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file
+//
+// Author:  David Burken
+//
+// Description: OSSIM Portable Document Format (PDF) writer.
+//
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/imaging/ossimPdfWriter.h>
+#include <ossim/base/ossimBooleanProperty.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimNumericProperty.h>
+#include <ossim/imaging/ossimBandSelector.h>
+#include <ossim/imaging/ossimGeneralRasterWriter.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <ossim/imaging/ossimJpegMemDest.h>
+#include <ossim/imaging/ossimScalarRemapper.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimUtmProjection.h>
+#include <ctime>
+#include <fstream>
+#include <iomanip>
+#include <ostream>
+#include <sstream>
+#include <string>
+#include <vector>
+
+RTTI_DEF1(ossimPdfWriter,
+	  "ossimPdfWriter",
+	  ossimImageFileWriter)
+
+//---
+// For trace debugging (to enable at runtime do:
+// your_app -T "ossimPdfWriter:debug" your_app_args
+//---
+static ossimTrace traceDebug("ossimPdfWriter:debug");
+static ossimTrace traceLog("ossimPdfWriter:log");
+
+// Property keywords:
+static const std::string AUTHOR_KW        = "Author";
+static const std::string CREATOR_KW       = "Creator";
+static const std::string CREATION_DATE_KW = "CreationDate";
+static const std::string KEYWORDS_KW      = "Keywords";
+static const std::string MOD_DATE_KW      = "ModDate";
+static const std::string PRODUCER_KW      = "Producer";
+static const std::string SUBJECT_KW       = "Subject";
+static const std::string TITLE_KW         = "Title";
+
+//---
+// For the "ident" program which will find all exanded $Id$ macros and print them.
+//---
+#if OSSIM_ID_ENABLED
+static const char OSSIM_ID[] = "$Id$";
+#endif
+
+ossimPdfWriter::ossimPdfWriter()
+   : ossimImageFileWriter(),
+     m_str(0),
+     m_ownsStream(false),
+     m_savedInput(0),
+     m_kwl( new ossimKeywordlist() ),
+     m_mutex()
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimPdfWriter::ossimPdfWriter entered" << std::endl;
+#if OSSIM_ID_ENABLED
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "OSSIM_ID:  "
+         << OSSIM_ID
+         << std::endl;
+#endif
+   }
+   
+   // Since there is no internal geometry set the flag to write out one.
+   setWriteExternalGeometryFlag(true);
+   
+   theOutputImageType = "ossim_pdf";
+}
+
+ossimPdfWriter::~ossimPdfWriter()
+{
+   // This will flush stream and delete it if we own it.
+   close();
+
+   m_kwl = 0; // Not a leak, ossimRefPtr
+}
+
+ossimString ossimPdfWriter::getShortName() const
+{
+   return ossimString("ossim_pdf_writer");
+}
+
+ossimString ossimPdfWriter::getLongName() const
+{
+   return ossimString("ossim pdf writer");
+}
+
+ossimString ossimPdfWriter::getClassName() const
+{
+   return ossimString("ossimPdfWriter");
+}
+
+bool ossimPdfWriter::writeFile()
+{
+   bool result = false;
+   
+   if( theInputConnection.valid() && ( getErrorStatus() == ossimErrorCodes::OSSIM_OK ) )
+   {
+      //---
+      // Make sure we can open the file.  Note only the master process is used for
+      // writing...
+      //---
+      if(theInputConnection->isMaster())
+      {
+         if (!isOpen())
+         {
+            open();
+         }
+      }
+      
+      result = writeStream();
+   }
+
+   return result;
+}
+
+bool ossimPdfWriter::writeStream()
+{
+   static const char MODULE[] = "ossimPdfWriter::writeStream";
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " entered..."
+         << "\nCurrent options:\n"
+         << *(m_kwl.get()) <<  std::endl;
+   }
+   
+   bool result = false;
+
+   if ( isOpen() )
+   {
+      // Make sure we have a region of interest.
+      if( theAreaOfInterest.hasNans() )
+      {
+         theInputConnection->initialize();
+         theAreaOfInterest = theInputConnection->getAreaOfInterest();
+      }
+      else
+      {
+         theInputConnection->setAreaOfInterest( theAreaOfInterest );
+      }
+
+      ossim_uint32 bands = theInputConnection->getNumberOfOutputBands();
+      ossimScalarType scalarType = theInputConnection->getOutputScalarType();
+
+     // std::cout <<"BANDS ======== " << bands << "   scalarType = " << scalarType << std::endl;
+      if(((bands == 3) || (bands == 1))&&(scalarType == OSSIM_UINT8))
+      {
+         // Write the image:
+         result = writeImage( m_str );
+      }
+      else
+      {
+	ossimNotify(ossimNotifyLevel_INFO) << MODULE << " result = false" << std::endl;
+	// need some kind of error
+	result = false;
+      }
+
+      close();
+
+
+      // Reset the input to the image source sequence if it was modified.      
+      if ( m_savedInput.get() != theInputConnection->getInput( 0 ) )
+      {
+         theInputConnection->connectMyInputTo( 0, m_savedInput.get() );  
+      }
+   }
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " exit status = " << (result?"true":"false") << std::endl;
+   }
+
+   return result;
+   
+} // bool ossimPdfWriter::writeStream()
+
+void ossimPdfWriter::writeHeader( std::ostream* str )
+{
+   // Header:
+   if ( str )
+   {
+      // Open in binary mode:
+      std::ostringstream os( std::ios_base::out|std::ios_base::binary );
+      
+      os << "%PDF-1.7\n";
+
+      //---
+      // Add comment with four characters greater than 127 to flag "binary pdf".
+      // Standard/norm from spec is "0xE2E3CFD3":
+      //---
+      std::vector<ossim_uint8> binData(4);
+      binData[0] = 0xE2;
+      binData[1] = 0xE3;
+      binData[2] = 0xCF;
+      binData[3] = 0xD3;
+
+      os << "%";
+      os.write( (char*)&binData.front(), binData.size() );
+      os << "\n";
+
+      // Write it:
+      str->write( os.str().data(), os.str().size() );
+
+      if ( traceLog() )
+      {
+         // Has binary data in it???
+         ossimNotify(ossimNotifyLevel_DEBUG) << os.str() << "\n";
+      }
+   }
+}
+
+void ossimPdfWriter::writeCatalog( std::ostream* str,
+                                   std::vector<std::streamoff>& xref )
+{
+   // Write the Catalog object.  This assumes an order of:
+   if ( str )
+   {
+      // Capture position:
+      xref.push_back( (std::streamoff)m_str->tellp() );
+
+      std::ostringstream os; // tmp stream...
+      os << xref.size() << " 0 obj\n"
+         << "  << /Type /Catalog\n"
+         << "     /Pages "    << xref.size()+1 << " 0 R\n" // Reference to Pages.
+         << "  >>\n"
+         << "endobj\n";
+
+      // Write it:
+      str->write( os.str().data(), os.str().size() );
+
+      if ( traceLog() )
+      {
+         // Has binary data in it???
+         ossimNotify(ossimNotifyLevel_DEBUG) << os.str() << "\n";
+      }
+   }
+}
+
+#if 0
+void ossimPdfWriter::writeOutlines( std::ostream* str,
+                                    std::vector<std::streamoff>& xref )
+{
+   // Write the Outlines object:
+   if ( str )
+   {
+      // Capture position:
+      xref.push_back( (std::streamoff)m_str->tellp() );
+
+      std::ostringstream os; // tmp stream...
+      os << xref.size() << " 0 obj\n"
+         << "  << /Type /Outlines\n"
+         << "     /Count 0\n"
+         << "  >>\n"
+         << "endobj\n";
+
+      str->write( os.str().data(), os.str().size() );
+
+      if ( traceLog() )
+      {
+         // Has binary data in it???
+         ossimNotify(ossimNotifyLevel_DEBUG) << os.str() << "\n";
+      }
+   }
+}
+#endif
+
+void ossimPdfWriter::writePages( std::ostream* str,
+                                 std::vector<std::streamoff>& xref )
+{
+   // Write Pages object.
+   if ( str )
+   {
+      // Capture position:
+      xref.push_back( (std::streamoff)str->tellp() );
+
+      std::ostringstream os;
+      os << xref.size() << " 0 obj\n"
+         << "  << /Type /Pages\n"
+         << "     /Kids [ " << xref.size()+1 << " 0 R ]\n" // Reference to Page.
+         << "     /Count 1\n"
+         << "  >>\n"
+         << "endobj\n";
+
+      str->write( os.str().data(), os.str().size() );
+      
+      if ( traceLog() )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << os.str() << "\n";
+      }
+   }
+}
+
+void ossimPdfWriter::writeInfo( std::ostream* str,
+                                std::vector<std::streamoff>& xref )
+{
+   // Write Pages object.
+   if ( str )
+   {
+      // Capture position:
+      xref.push_back( (std::streamoff)str->tellp() );
+
+      std::ostringstream os;
+      os << xref.size() << " 0 obj % Document Information Dictionary\n";
+
+      // Tile:
+      std::string s;
+      getTitle( s );
+      if ( s.size() )
+      {
+         os << "   << /Title (" << s << ")\n";
+      }
+      
+      // Author:
+      getAuthor( s );
+      if ( s.size() )
+      {
+         os << "      /Author (" << s << ")\n";
+      }
+
+      // Creator:
+      getCreator( s );
+      if ( s.size() )
+      {
+         os << "      /Creator (" << s << ")\n";
+      }
+
+      // Producer:
+      getProducer( s );
+      if ( s.size() )
+      {
+         os << "      /Producer (" << s << ")\n";
+      }
+
+      // Creation date ( D : YYYYMMDDHHmmSSOHH ' mm ' ):
+      getCreationDate( s );
+      if ( s.size() )
+      {
+         os << "      /CreationDate " << s << "\n";
+      }
+
+      // Modification date ( D : YYYYMMDDHHmmSSOHH ' mm ' ):
+      getModDate( s );
+      if ( s.size() )
+      {
+         os << "      /ModDate " << s << "\n";
+      }
+
+      os << "   >>\n"
+            << "endobj\n";
+
+      str->write( os.str().data(), os.str().size() );
+      
+      if ( traceLog() )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << os.str() << "\n";
+      }
+   }
+   
+} // End: ossimPdfWriter::writeInfo
+
+bool ossimPdfWriter::writeImage( std::ostream* str )
+{
+   bool status = false;
+   
+   if ( str )
+   {
+
+      //---
+      // This will remap input to eight bit if not already and make input one or
+      // three band depending on number of bands.
+      //---
+      setupInputChain();
+         
+      // Set the sequence tile size:
+      ossimIpt tileSize;
+      getTileSize( tileSize );
+      theInputConnection->setTileSize( tileSize );
+      
+      // Start the sequence at the first tile.
+      theInputConnection->setToStartOfSequence();
+      
+      const ossim_uint32 WIDTH  = theAreaOfInterest.width();
+      const ossim_uint32 HEIGHT = theAreaOfInterest.height();
+      const ossim_uint32 TW     = theInputConnection->getNumberOfTilesHorizontal();    
+      const ossim_uint32 TH     = theInputConnection->getNumberOfTilesVertical();
+      const ossim_uint32 TILES  = theInputConnection->getNumberOfTiles();
+
+#if 0 /* Please save for debug. (drb) */
+      ossimIrect   boundingRect  = theInputConnection->getBoundingRect();
+      ossimNotify(ossimNotifyLevel_NOTICE)
+         << "\nBounding rect: " << theInputConnection->getBoundingRect()
+         << "\nAOI:           " << theAreaOfInterest  
+         << "\nBands:         " << theInputConnection->getNumberOfOutputBands()
+         << "\ntilesWide:     " << TW
+         << "\ntilesHigh:     " << TH
+         << "\ntileWidth:     " << tileWidth
+         << "\ntileHeight     " << tileHeight << std::endl;
+#endif
+
+      if ( traceLog() )
+      {
+         ossimKeywordlist logKwl;
+         theInputConnection->saveStateOfAllInputs(logKwl);      
+         ossimFilename logFile = getFilename();
+         logFile.setExtension("log");
+         ossimKeywordlist kwl;
+         theInputConnection->saveStateOfAllInputs(kwl);
+         kwl.write(logFile.c_str() );
+      }
+      
+      // Cross reference(xref) table.  Holds the offset of each object.  Written at the end.
+      std::vector<std::streamoff> xref;
+         
+      //---
+      // Header:
+      //---
+      writeHeader( str );
+         
+      //---
+      // Catalog object:
+      //---
+      writeCatalog( str, xref );
+         
+      //---
+      // Outlines object:
+      //---
+      // writeOutlines( m_str, xref );
+         
+      //---
+      // Pages object:
+      //---
+      writePages( str, xref );
+      
+      //---
+      // Page object:
+      //---
+      
+      // Capture position:
+      xref.push_back( (std::streamoff)str->tellp() );
+      
+      std::ostringstream os1;
+      os1 << xref.size() << " 0 obj\n"
+          << "  << /Type /Page\n"
+          << "     /Parent "    << xref.size()-1 << " 0 R\n" // Parent always one back.
+          << "     /Resources " << xref.size()+1 << " 0 R\n" // Next object.
+          << "     /MediaBox[0.0 0.0 " << WIDTH << " " << HEIGHT << "]\n"
+          // Contents = Resources_dictionary + tiles + base_form + 1):
+          << "     /Contents["  << (xref.size()+TILES+3) << " 0 R]\n";
+      
+      ossimRefPtr<ossimImageGeometry> geom = theInputConnection->getImageGeometry();      
+      if ( geom.valid() )
+      {
+         // Coordinate Transformation Matrix (CTM)
+         std::string lgiDictString;
+         getLgiDict( geom.get(), theAreaOfInterest, lgiDictString );
+         
+         if ( lgiDictString.size() )
+         {
+            os1 << lgiDictString;
+         }
+      }
+      
+      os1 << "  >>\n"
+         << "endobj\n"; // Matches: <</Type /Page"
+      
+      str->write( os1.str().data(), os1.str().size() );
+      if ( traceLog() )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << os1.str() << "\n";
+      }
+      
+      // End /Page object
+      
+      //---
+      // Resource dictionary for page:
+      //---
+      
+      // Capture position:
+      xref.push_back( (std::streamoff)str->tellp() );
+
+      std::ostringstream os2;
+      os2 << xref.size() << " 0 obj % Resource dictionary for page.\n"
+          << "  << /ProcSet[/PDF/ImageB/ImageC]\n"
+          << "     /XObject << /Basemap_Form " << (xref.size()+TILES+1) << " 0 R ";
+
+      // Write in the tiles:
+      ossim_uint32 objIndex = static_cast<ossim_uint32>(xref.size()+1);
+      ossim_uint32 x;
+      ossim_uint32 y;
+      for ( x = 0; x < TW; ++x )
+      {
+         for ( y = 0; y < TH; ++y )
+         {
+            os2 << getTileString( x, y ) << " " << objIndex << " 0 R ";
+
+            ++objIndex;
+         }
+ 
+      }
+      os2 << ">>\n" // Matches: /XObject<<
+          << "  >>\nendobj\n"; // Matches: % Resources...";
+
+      str->write( os2.str().data(), os2.str().size() );
+      if ( traceLog() )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << os2.str() << "\n";
+      }
+      
+      // End Resources dictionary.
+
+      //---
+      // Now write the XObjects jpeg tiles:
+      //---
+      ossim_uint32 tileNumber = 0;
+      std::vector<ossimIrect> outputTileRects;
+      while ( tileNumber < TILES )
+      {
+         ossimRefPtr<ossimImageData> id = theInputConnection->getNextTile();
+         if( id.valid() )
+         {
+            // To hold output tile rect clamped to AOI.
+            ossimIrect outputTileRect;
+
+            switch ( getImageType() )
+            {
+               case ossimPdfWriter::RAW:
+               {
+                  writeRawTile( str, xref, id.get(), theAreaOfInterest, outputTileRect );
+                  break;
+               }
+               case ossimPdfWriter::JPEG:
+               default:
+               {
+                  writeJpegTile( str, xref, id.get(), theAreaOfInterest, outputTileRect );
+                  break;
+               }
+            }
+
+            // Capture tile rect:
+            outputTileRects.push_back( outputTileRect );
+         }
+         else
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimPdfWriter::writeImage ERROR:"
+               << "\nNULL Tile encountered, tile number=" << tileNumber
+               << std::endl;
+            status = false;
+            break;
+         }
+
+         ++tileNumber;
+
+         setPercentComplete( tileNumber / TILES * 100.0 );
+      }
+
+      if ( tileNumber == TILES )
+      {
+         status = true;
+      }
+
+      if ( status )
+      {
+         //---
+         // XObect Form for image tiles:
+         //---
+         
+         // Capture position:
+         xref.push_back( (std::streamoff)str->tellp() );
+
+         ossimIpt llPageOffset;
+         getLowerLeftPageOffset( theAreaOfInterest, llPageOffset );
+
+         std::ostringstream os3;
+         
+         // Tile loop - ontents for each ile:
+         tileNumber = 0;
+         ossim_uint32 x;
+         ossim_uint32 y;
+         for ( x = 0; x < TW; ++x )
+         {
+            for ( y = 0; y < TH; ++y )
+            {
+               //---
+               // PDF space is positive y = up, positive x = right.
+               // ossim image space is positive y down.
+               // 0, 0 is lower left corner in pdf space so "y of 0" in pdf space is
+               // theAreaOfInterest.ll().y in image space.
+               //---
+               ossim_int32 width = outputTileRects[tileNumber].width();
+
+               ossim_int32 height = outputTileRects[tileNumber].height();
+               
+               ossim_int32 llOffsetX =
+                  llPageOffset.x + outputTileRects[tileNumber].ll().x - theAreaOfInterest.ll().x;
+
+               ossim_int32 llOffsetY = llPageOffset.y + theAreaOfInterest.lr().y -
+                  outputTileRects[tileNumber].ll().y;
+               
+               os3 << "   q\n"                      // Save graphics state
+                   << "      " << width << " 0 0 " << height << " "
+                   << llOffsetX << " " << llOffsetY << " cm\n"
+                   << "      " << getTileString( x, y ) << " Do\n"
+                   << "   Q\n"; // Restore graphics state.
+               ++tileNumber;
+            }
+         }
+
+         std::ostringstream os4;
+         os4 << xref.size() << " 0 obj % /XObject/Form dictionary for image tiles.\n"
+             << "   << /Type /XObject\n"
+             << "      /Subtype /Form\n"
+             << "      /Length " << os3.str().size() << "\n"
+             << "      /BBox["
+             << llPageOffset.x << " " << llPageOffset.y << " "
+             << WIDTH << " " << HEIGHT << "]\n"
+             << "   >>\n"
+             << "stream\n";
+
+         // Write the content stream to tmp stream.
+         os4.write( os3.str().data(), os3.str().size() );
+         
+         os4 << "\n"
+             << "endstream\n"
+             << "endobj\n";
+
+         // Write the tmp stream to output stream.
+         str->write( os4.str().data(), os4.str().size() );
+         
+         if ( traceLog() )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << os4.str() << "\n";
+         }
+         
+         //---
+         // Contents of page:
+         //---
+         
+         // Capture position:
+         xref.push_back( (std::streamoff)str->tellp() );
+
+         std::ostringstream os5;
+         os5 << "/Basemap_Form Do";
+         
+         std::ostringstream os6;
+         os6 << xref.size() << " 0 obj % Contents of page.\n"
+             << "   << /Length " << os5.str().size() << " >>\n"
+             << "stream\n";
+
+         os6.write( os5.str().data(), os5.str().size() );
+         os6 << "\n"
+             << "endstream\n"
+             << "endobj\n";
+         
+         str->write( os6.str().data(), os6.str().size() );
+         if ( traceLog() )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << os6.str() << "\n";
+         }
+         
+         m_mutex.lock(); // Code not thread safe.
+         
+         // Document Information dictionary:
+         writeInfo( str, xref );
+         
+         m_mutex.unlock();
+         
+         //---
+         // Cross reference tables:
+         //---
+         
+         // Capture start of xref for the second to last line:
+         std::streamoff xrefOffset = (std::streamoff)m_str->tellp();
+         
+         writeXref( m_str, xref );
+         
+         //---
+         // Trailer:
+         //---
+         writeTrailer( m_str, static_cast<ossim_uint32>(xref.size()+1), xrefOffset );
+      }
+      
+   } // Matches: if ( str ...
+   
+   return status;
+
+} // End: ossimPdfWriter::writeImage
+
+void ossimPdfWriter::writeJpegTile( std::ostream* str,
+                                    std::vector<std::streamoff>& xref,
+                                    ossimImageData* id,
+                                    const ossimIrect& aoi,
+                                    ossimIrect& outputTileRect )
+{
+   //---
+   // Most of code and comments below are from jpeg-6b "example.c" file. See 
+   // http://www4.cs.fau.de/Services/Doc/graphics/doc/jpeg/libjpeg.html
+   //---
+
+   //---
+   // Initialize JPEG compression library:
+   // Note: JDIMENSION is typedefed to an unsigned int.
+   //---
+   struct jpeg_compress_struct cinfo;
+   struct jpeg_error_mgr jerr;
+   cinfo.err = jpeg_std_error( &jerr );
+   jpeg_create_compress(&cinfo);
+
+   //---
+   // Need to define a custom ostream destination manager for jpeglib to write compressed block:
+   // Note: Write the tile to a temp memory stream to get the size up front.
+   //---
+   std::ostringstream tileStream;
+   jpeg_cpp_stream_dest(&cinfo, tileStream);
+   
+   
+   // Setting the parameters of the output file here.
+   const ossim_uint32 BANDS = id->getNumberOfBands();
+   const ossim_uint32 TW    = id->getWidth();
+   const ossim_uint32 TH    = id->getHeight();
+   
+
+   // Assign width, height clamping to the aoi.      
+   cinfo.image_width = ossim::min<ossim_uint32>(
+      TW, aoi.lr().x - id->getOrigin().x + 1 );
+   cinfo.image_height = ossim::min<ossim_uint32>(
+      TH, aoi.lr().y - id->getOrigin().y + 1 );
+   cinfo.input_components = BANDS;
+
+   // Capture the output tile rect:
+   outputTileRect = ossimIrect( id->getOrigin(),
+                                ossimIpt( id->getOrigin().x + cinfo.image_width - 1,
+                                          id->getOrigin().y + cinfo.image_height - 1 ) );
+   
+   // colorspace of input image 
+   if ( BANDS == 3 )
+   {
+      cinfo.in_color_space = JCS_RGB;
+   }
+   else
+   {
+      cinfo.in_color_space = JCS_GRAYSCALE;
+   }
+   
+   // Default compression parameters...
+   jpeg_set_defaults( &cinfo );
+   
+   /* Now do the compression .. */
+   jpeg_start_compress( &cinfo, TRUE );
+   
+   // Compress the tile on line at a time:
+   JSAMPLE** samp_array = new JSAMPLE* [cinfo.image_height];
+   
+   //---
+   // Get a pointer to the source data.
+   // Needs to be band interleaved by pixel(BIP), so convert if needed.
+   //---
+   ossimRefPtr<ossimImageData> tempTile = 0;
+   ossim_uint8* tile = 0;
+   if ( ( BANDS == 1 ) &&
+        ( cinfo.image_width == id->getWidth() ) &&
+        ( cinfo.image_height == id->getHeight() ) )
+   {
+      tile = id->getUcharBuf();
+   }
+   else
+   {
+      // Convert from OSSIM's native BSQ interleave to BIP.
+      tempTile = new ossimImageData(
+         0, OSSIM_UINT8, BANDS, cinfo.image_width, cinfo.image_height );
+      tempTile->setOrigin( id->getOrigin() );
+      tempTile->initialize();
+      tile = tempTile->getUcharBuf();
+      id->unloadTile( tile, tempTile->getImageRectangle(), OSSIM_BIP );
+   }
+      
+   for ( ossim_uint32 row=0; row<cinfo.image_height; ++row )
+   {
+      samp_array[row] = (JSAMPLE*) tile + row*cinfo.input_components*cinfo.image_width;
+   }
+   
+   jpeg_write_scanlines( &cinfo, samp_array, cinfo.image_height );
+
+   //---
+   // Clean up after done compressing:
+   // Note: MUST do before writing to output stream below.
+   //---
+   jpeg_finish_compress( &cinfo );
+   jpeg_destroy_compress( &cinfo );
+   delete [] samp_array;
+   samp_array = 0;
+
+   // Capture position:
+   xref.push_back( (std::streamoff)str->tellp() );
+   
+   std::ostringstream os1;
+   os1 << xref.size() << " 0 obj\n"
+       << "   << /Type /XObject\n"
+       << "      /Subtype /Image\n"
+       << "      /Length " << tileStream.str().size() << "\n"
+       << "      /Filter[/DCTDecode]\n"
+       << "      /BitsPerComponent 8"
+       << "      /ColorSpace " << (BANDS==1?"/DeviceGray\n":"/DeviceRGB\n")
+       << "      /Width " << cinfo.image_width
+       << "      /Height " << cinfo.image_height
+       << "   >>\n"
+       << "stream\n";
+   
+   str->write( os1.str().data(), os1.str().size() );
+   
+   if ( traceLog() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << os1.str()
+         << "*** image stream not displayed ***\n"
+         << "endstream\n"
+         << "endobj\n\n";
+   }
+
+   // Write the image tile from memory to output stream.
+   str->write( tileStream.str().data(), tileStream.str().size() );
+
+   // Close out stream object.
+   *str << "\n"
+        << "endstream\n"
+        << "endobj\n";
+   
+} // End: ossimPdfWriter::writeJpegTile( ... )
+
+void ossimPdfWriter::writeRawTile( std::ostream* str,
+                                   std::vector<std::streamoff>& xref,
+                                   ossimImageData* id,
+                                   const ossimIrect& aoi,
+                                   ossimIrect& outputTileRect )
+{
+   const ossim_uint32 BANDS = id->getNumberOfBands();
+   const ossim_uint32 TW    = id->getWidth();
+   const ossim_uint32 TH    = id->getHeight();
+
+   // Assign width, height clamping to the aoi.      
+   ossim_uint32 width = ossim::min<ossim_uint32>(
+      TW, aoi.lr().x - id->getOrigin().x + 1  );
+   ossim_uint32 height = ossim::min<ossim_uint32>(
+      TH, aoi.lr().y - id->getOrigin().y + 1 );
+
+   // Capture the output tile rect:
+   outputTileRect = ossimIrect( id->getOrigin(),
+                                ossimIpt( id->getOrigin().x + width - 1,
+                                          id->getOrigin().y + height - 1 ) );
+
+   //---
+   // Get a pointer to the source data.
+   // Needs to be band interleaved by pixel(BIP), so convert if needed.
+   //---
+   ossimRefPtr<ossimImageData> tempTile = 0;
+   ossim_uint8* tile = 0;
+   ossim_uint32 length = 0;
+   if ( ( BANDS == 1 ) && ( width == id->getWidth() ) && ( height == id->getHeight() ) )
+   {
+      tile   = id->getUcharBuf();
+      length = id->getSizeInBytes();
+   }
+   else
+   {
+      // Convert from OSSIM's native BSQ interleave to BIP.
+      tempTile = new ossimImageData( 0, OSSIM_UINT8, BANDS, width, height );
+      tempTile->setOrigin( id->getOrigin() );
+      tempTile->initialize();
+      tile = tempTile->getUcharBuf();
+      id->unloadTile( tile, tempTile->getImageRectangle(), OSSIM_BIP );
+      length = tempTile->getSizeInBytes();
+   }
+
+   // Capture position:
+   xref.push_back( (std::streamoff)str->tellp() );
+   
+   std::ostringstream os1;
+   os1 << xref.size() << " 0 obj\n"
+       << "   << /Type /XObject\n"
+       << "      /Subtype /Image\n"
+       << "      /Length " << length << "\n"
+       << "      /BitsPerComponent 8"
+       << "      /ColorSpace " << (BANDS==1?"/DeviceGray\n":"/DeviceRGB\n")
+       << "      /Width " << width
+       << "      /Height " << height
+       << "   >>\n"
+       << "stream\n";
+
+   str->write( os1.str().data(), os1.str().size() );
+   
+   if ( traceLog() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << os1.str()
+         << "*** image stream not displayed ***\n"
+         << "endstream\n"
+         << "endobj\n\n";
+   }
+
+   // Write the image tile from memory to output stream.
+   str->write( (char*)tile, length );
+   
+   // Close out stream object.
+   *str << "\n"
+        << "endstream\n"
+        << "endobj\n";
+   
+} // End ossimPdfWriter::writeRawTile( ... )
+
+void ossimPdfWriter::writeXref( std::ostream* str,
+                                const std::vector<std::streamoff>& xref )
+{
+   if ( str )
+   {
+      std::ostringstream os;
+      os << "xref\n"
+         << "0 " << (xref.size()+1) << "\n"
+         << "0000000000 65535 f \n";
+            
+      std::vector<std::streamoff>::const_iterator i = xref.begin();
+      while ( i != xref.end() )
+      {
+         os << std::setiosflags(std::ios_base::fixed|std::ios_base::right)
+            << std::setfill('0')
+            << std::setw(10)
+            << (*i)
+            << " 00000 n \n";
+         ++i;
+      }
+      
+      // os << "\n";
+      
+      str->write( os.str().data(), os.str().size() );
+      
+      if ( traceLog() )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << os.str() << "\n";
+      }
+   }
+}
+
+void ossimPdfWriter::writeTrailer( std::ostream* str,
+                                   ossim_uint32 entrySize,
+                                   std::streamoff xrefOffset )
+{
+   if ( str )
+   {
+      std::ostringstream os;
+      os << "trailer\n"
+         << "   << /Size " << entrySize << "\n"
+         << "      /Root 1 0 R\n"
+         << "      /Info " << entrySize-1 << " 0 R\n"
+         << "   >>\n"
+         << "startxref\n"
+         << xrefOffset << "\n"
+         << "%%EOF\n";
+      // << "%%EOF";
+
+      str->write( os.str().data(), os.str().size() );
+
+      if ( traceLog() )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << os.str() << "\n";
+      }
+   }
+}
+
+#if 0
+void ossimPdfWriter::writeDummy( std::ostream* str,
+                                 std::vector<std::streamoff>& xref  )
+{
+   // Write a blank object.
+   if ( str )
+   {
+      // Capture position:
+      xref.push_back( (std::streamoff)str->tellp() );
+      
+      std::ostringstream os;
+      os << xref.size() << " 0 obj % dummy\n"
+         << "endobj\n";
+      
+      str->write( os.str().data(), os.str().size() );
+      
+      if ( traceLog() )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << os.str() << "\n";
+      }
+   }
+}
+#endif
+
+bool ossimPdfWriter::saveState(ossimKeywordlist& kwl,
+                               const char* prefix)const
+{
+   return ossimImageFileWriter::saveState(kwl, prefix);
+}
+
+bool ossimPdfWriter::loadState(const ossimKeywordlist& kwl,
+                               const char* prefix)
+{
+   return ossimImageFileWriter::loadState(kwl, prefix);
+}
+
+bool ossimPdfWriter::isOpen() const
+{
+   bool result = false;
+   if (m_str)
+   {
+      const std::ofstream* fs = dynamic_cast<const std::ofstream*>(m_str);
+      if ( fs )
+      {
+         result = fs->is_open();
+      }
+      else
+      {
+         // Pointer good enough...
+         result = true;
+      }
+   }
+   return result;
+}
+
+
+bool ossimPdfWriter::open()
+{
+   bool result = false;
+   
+   close();
+
+   // Check for empty filenames.
+   if (theFilename.size())
+   {
+      std::ofstream* os = new std::ofstream();
+      os->open(theFilename.c_str(), ios::out | ios::binary);
+      if(os->is_open())
+      {
+         m_str = os;
+         m_ownsStream = true;
+         result = true;
+      }
+      else
+      {
+         delete os;
+         os = 0;
+      }
+   }
+   return result;
+}
+
+void ossimPdfWriter::close()
+{
+   if (m_str)      
+   {
+      m_str->flush();
+
+      if (m_ownsStream)
+      {
+         delete m_str;
+         m_str = 0;
+         m_ownsStream = false;
+      }
+   }
+}
+
+void ossimPdfWriter::getImageTypeList(std::vector<ossimString>& imageTypeList)const
+{
+   imageTypeList.push_back(ossimString("ossim_pdf"));
+}
+
+ossimString ossimPdfWriter::getExtension() const
+{
+   return ossimString("pdf");
+}
+
+bool ossimPdfWriter::hasImageType(const ossimString& imageType) const
+{
+   bool result = false;
+   if ( (imageType == "ossim_pdf") || (imageType == "image/pdf")||(imageType == "application/pdf") )
+   {
+      result = true;
+   }
+   return result;
+}
+
+void ossimPdfWriter::setProperty( ossimRefPtr<ossimProperty> property )
+{
+   if ( property.valid() )
+   {
+      std::string name = property->getName().string();
+      if ( name.size() )
+      {
+         if ( ( name == ossimKeywordNames::IMAGE_TYPE_KW ) ||
+              ( name == AUTHOR_KW ) ||
+              ( name == CREATOR_KW ) ||
+              ( name == CREATION_DATE_KW ) ||
+              ( name == KEYWORDS_KW ) ||
+              ( name == MOD_DATE_KW ) ||
+              ( name == ossimKeywordNames::OUTPUT_TILE_SIZE_KW ) ||
+              ( name == PRODUCER_KW ) ||
+              ( name == SUBJECT_KW ) ||
+              ( name == TITLE_KW ) )
+         {
+            addOption( name, property->valueToString().string() );
+         }
+         else
+         {
+            ossimImageFileWriter::setProperty(property);
+         }
+      }
+   }
+   
+} // ossimPdfWriter::setProperty
+
+ossimRefPtr<ossimProperty> ossimPdfWriter::getProperty(const ossimString& name)const
+{
+   ossimRefPtr<ossimProperty> prop = 0;
+
+   if ( name.size() )
+   {
+      if ( name == AUTHOR_KW )
+      {
+         ossimString value;
+         getAuthor( value.string() );
+         ossimRefPtr<ossimStringProperty> stringProp =
+            new ossimStringProperty( name, value, true);
+         prop = stringProp.get();
+      }
+      else if ( name == CREATOR_KW )
+      {
+         ossimString value;
+         getCreator( value.string() );
+         ossimRefPtr<ossimStringProperty> stringProp =
+            new ossimStringProperty( name, value, true);
+         prop = stringProp.get();
+      }
+      else if ( name == CREATION_DATE_KW )
+      {
+         ossimString value;
+         getCreationDate( value.string() );
+         ossimRefPtr<ossimStringProperty> stringProp =
+            new ossimStringProperty( name, value, true);
+         prop = stringProp.get();
+      }
+      else if ( name == ossimKeywordNames::IMAGE_TYPE_KW )
+      {
+         ossimString value;
+         getImageType( value.string() );
+         ossimRefPtr<ossimStringProperty> stringProp =
+            new ossimStringProperty( name, value, false); //  editable flag = false
+         
+         // Alway support jpeg.
+         stringProp->addConstraint( ossimString("jpeg") );
+         
+         // Alway support raw (general raster).
+         stringProp->addConstraint( ossimString("raw") );
+
+         prop = stringProp.get();
+      }
+      else if ( name == KEYWORDS_KW )
+      {
+         ossimString value;
+         getKeywords( value.string() );
+         ossimRefPtr<ossimStringProperty> stringProp =
+            new ossimStringProperty( name, value, true);
+         prop = stringProp.get();
+      }
+      else if ( name == MOD_DATE_KW )
+      {
+         ossimString value;
+         getModDate( value.string() );
+         ossimRefPtr<ossimStringProperty> stringProp =
+            new ossimStringProperty( name, value, true);
+         prop = stringProp.get();
+      }
+      else if( name == ossimKeywordNames::OUTPUT_TILE_SIZE_KW )
+      {
+         ossimString value;
+         getTileSize( value.string() );
+         ossimRefPtr<ossimStringProperty> stringProp =
+            new ossimStringProperty( name, value, false);
+         stringProp->addConstraint(ossimString("16"));
+         stringProp->addConstraint(ossimString("32"));
+         stringProp->addConstraint(ossimString("64"));
+         stringProp->addConstraint(ossimString("128"));
+         stringProp->addConstraint(ossimString("256"));      
+         stringProp->addConstraint(ossimString("512"));      
+         stringProp->addConstraint(ossimString("1024"));      
+         stringProp->addConstraint(ossimString("2048"));      
+         prop = stringProp.get();
+      }
+      else if ( name == SUBJECT_KW )
+      {
+         ossimString value;
+         getSubject( value.string() );
+         ossimRefPtr<ossimStringProperty> stringProp =
+            new ossimStringProperty( name, value, true);
+         prop = stringProp.get();
+      }
+      else if ( name == TITLE_KW )
+      {
+         ossimString value;
+         getSubject( value.string() );
+         ossimRefPtr<ossimStringProperty> stringProp =
+            new ossimStringProperty( name, value, true);
+         prop = stringProp.get();
+      }
+      else
+      {
+         prop = ossimImageFileWriter::getProperty(name);
+      }
+   }
+   
+   return prop;
+   
+} // End: ossimPdfWriter::getProperty
+
+void ossimPdfWriter::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   propertyNames.push_back( ossimString( AUTHOR_KW ) );
+   propertyNames.push_back( ossimString( CREATOR_KW ) );
+   propertyNames.push_back( ossimString( CREATION_DATE_KW ) );
+   propertyNames.push_back( ossimString( ossimKeywordNames::IMAGE_TYPE_KW ) );
+   propertyNames.push_back( ossimString( KEYWORDS_KW ) );
+   propertyNames.push_back( ossimString( MOD_DATE_KW ) );
+   propertyNames.push_back( ossimString( ossimKeywordNames::OUTPUT_TILE_SIZE_KW ) );
+   propertyNames.push_back( ossimString( PRODUCER_KW ) );
+   propertyNames.push_back( ossimString( SUBJECT_KW ) );
+   propertyNames.push_back( ossimString( TITLE_KW ) );
+
+   ossimImageFileWriter::getPropertyNames(propertyNames);
+}
+
+bool ossimPdfWriter::setOutputStream(std::ostream& stream)
+{
+   if (m_ownsStream && m_str)
+   {
+      delete m_str;
+   }
+   m_str = &stream;
+   m_ownsStream = false;
+   return true;
+}
+
+void ossimPdfWriter::setupInputChain()
+{
+   if ( theInputConnection.get() )
+   {
+      // Capture the input to the image source sequencer(theInputConnection).
+      m_savedInput = theInputConnection->getInput( 0 );
+      
+      ossimScalarType inputScalar = theInputConnection->getOutputScalarType();
+      ossim_uint32 bands          = theInputConnection->getNumberOfOutputBands();
+
+      if( inputScalar != OSSIM_UINT8 )
+      {
+         // Make eight bit.
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimPdfWriter::setupInputChain WARNING:"
+               << "\nData is being scaled to 8 bit!"
+               << "\nOriginal scalar type:  "
+               << ossimScalarTypeLut::instance()->
+               getEntryString(inputScalar).c_str()
+               << std::endl;
+         }
+         
+         //---
+         // Attach a scalar remapper to the end of the input chain.  This will
+         // need to be unattached and deleted at the end of this.
+         //---
+         ossimRefPtr<ossimScalarRemapper> sr = new ossimScalarRemapper;
+
+         // Connect remapper's input to sequencer input.
+         sr->connectMyInputTo( 0, theInputConnection->getInput(0) );
+
+         // Connet sequencer to remapper.
+         theInputConnection->connectMyInputTo(0, sr.get() );
+
+         // Initialize connections.
+         theInputConnection->initialize();
+      }
+
+      // Must be one or three band. Note bands are zero based...      
+      if ( ( bands != 1 ) && ( bands != 3 ) )
+      {
+         std::vector<ossim_uint32> bandList;
+         
+         // Always have one band.
+         bandList.push_back( 0 );
+
+         if ( bands > 3 )
+         {
+            // Use the first three bands.
+            bandList.push_back( 1 );
+            bandList.push_back( 2 );
+         }
+
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimPdfWriter::setupInputChain WARNING:"
+               << "\nOutput bands must be 1 or 3 and are being filterd!"
+               << "\nOriginal band count: " << bands
+               << "\nNew band count: " << bandList.size()
+               << std::endl;
+         }
+         
+         ossimRefPtr<ossimBandSelector> bs = new ossimBandSelector();
+
+         // Set the the band selector list.
+         bs->setOutputBandList( bandList );
+         
+         // Connect band selector's input to sequencer input.
+         bs->connectMyInputTo( 0, theInputConnection->getInput(0) );
+
+         // Connet sequencer to band selector.
+         theInputConnection->connectMyInputTo(0, bs.get() );
+
+         // Initialize connections.
+         theInputConnection->initialize();
+      }
+
+      if (  m_savedInput != theInputConnection->getInput( 0 ) )
+      {
+         //---
+         // If the input to the image source sequencer change the AOI
+         // MUST be reset as it gets wiped.
+         //---
+         theInputConnection->setAreaOfInterest( theAreaOfInterest );
+      }
+      
+   } // Matches: if ( theInputConnection )
+
+} // End: void ossimPdfWriter::setupInputChain()
+
+ossimPdfWriter::ossimPdfImageType ossimPdfWriter::getImageType() const
+{
+   ossimPdfWriter::ossimPdfImageType result = ossimPdfWriter::UNKNOWN;
+
+   // Get the type and downcase.
+   ossimString os;
+   getImageType( os.string() );
+   os.downcase();
+
+   if ( os == "jpeg" )
+   {
+      result = ossimPdfWriter::JPEG;
+   }
+   else if ( os == "raw" )
+   {
+      result = ossimPdfWriter::RAW;
+   }
+   else
+   {
+      // Unknown value:
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimPdfWriter::getImageCompression WARN\n"
+         << "Unhandled image compression type: " << os << std::endl;
+   }
+   return result;
+}
+
+void ossimPdfWriter::getImageType( std::string& type ) const
+{
+   type = m_kwl->findKey( std::string(ossimKeywordNames::IMAGE_TYPE_KW) );
+   if ( type.empty() )
+   {
+      type = "jpeg"; // default
+   }
+}
+
+void ossimPdfWriter::addOption(  const std::string& key, const std::string& value )
+{
+   m_mutex.lock();
+   if ( m_kwl.valid() )
+   {
+      if ( key.size() && value.size() )
+      {
+         m_kwl->addPair( key, value );
+      }
+   }
+   m_mutex.unlock();
+}
+
+#if 0
+void ossimPdfWriter::getMediaBoxSize(  ossim_uint32 imageWidth,
+                                       ossim_uint32 imageHeight,
+                                       ossimIpt& size ) const
+{
+   //---
+   // This could be an option / property.
+   // 612 x 792 = 8.5 x 11 inches at 72 dots per inch (612/72 x 792/72)
+   //---
+   size.x = static_cast<ossim_uint32>(imageWidth);
+   size.y = static_cast<ossim_uint32>(imageHeight);
+}
+#endif
+
+void ossimPdfWriter::getLowerLeftPageOffset( const ossimIrect& aoi, ossimIpt& offset ) const
+{
+   if ( aoi.hasNans() == false )
+   {
+      // Get the page size.
+      // ossimIpt mediaBoxSize;
+      // getMediaBoxSize( mediaBoxSize );
+
+      // Temp hard coded. (drb)
+      offset.x = 0;
+      offset.y = 0;
+   }
+   else
+   {
+      offset.x = 0;
+      offset.y = 0;
+   }
+}
+
+void ossimPdfWriter::getLgiDict( ossimImageGeometry* geom,
+                                 const ossimIrect& aoi,
+                                 std::string& s ) const
+{
+   s.clear(); // Empty string indicates error.
+
+   if ( geom && !aoi.hasNans() )
+   {
+      // Coordinate Transformation Matrix (CTM)
+      std::string ctmString;
+      getLgiDictCtm( geom, aoi, ctmString );
+
+      if ( ctmString.size() )
+      {
+         // ProjectionType
+         std::string projectionString;
+         getLgiDictProjection( geom, projectionString );
+         
+         if ( projectionString.size() )
+         {
+            //---
+            // Neatline: Not required for single frame.
+            // std::string neatLineString;
+            // getLgiDictNeatline( geom, neatLineString );
+            //---
+            
+            // if ( neatLineString.size() )
+            // {
+            // cout << "d..." << endl;
+               
+            // Description
+            std::string descriptionString;
+            getLgiDictDescription( geom, descriptionString );
+            
+            if ( descriptionString.size() )
+            {
+               std::ostringstream os;
+               os << "/LGIDict"
+                  << "[<<"
+                  << ctmString
+                  << "/Version(2.1)"
+                  << projectionString
+                  // << neatLineString
+                  << descriptionString
+                  << "/Type/LGIDict>>]";
+               
+               s = os.str();
+               // }
+            }
+         }
+      }
+   }
+   
+} // End: ossimPdfWriter::getLgiDictString
+
+void ossimPdfWriter::getLgiDictDatum( ossimImageGeometry* geom,
+                                      std::string& s ) const
+{
+   s.clear();
+   if ( geom )
+   {
+      ossimRefPtr<const ossimMapProjection> mapProj = geom->getAsMapProjection();
+      if ( mapProj.valid() )
+      {
+         const ossimDatum* datum = mapProj->getDatum();
+         if ( datum )
+         {
+            s = "/Datum(";
+            s += datum->code().string();
+            s += ")";
+         }
+      }
+   }
+   
+} // End: ossimPdfWriter::getLgiDictDatum
+
+void ossimPdfWriter::getLgiDictDescription( ossimImageGeometry* geom,
+                                            std::string& s ) const
+{
+   s.clear();
+   if ( geom )
+   {
+      ossimRefPtr<const ossimMapProjection> mapProj = geom->getAsMapProjection();
+      if ( mapProj.valid() )
+      {
+         const ossimDatum* datum = mapProj->getDatum();
+         if ( datum )
+         {
+            std::string code = datum->code().string();
+
+            if ( code == "WGE" )
+            {
+               s = "/Description(WGS 84)";
+            }
+         }
+      }
+   }
+   
+} // End: ossimPdfWriter::getLgiDictDescription
+
+#if 0
+void ossimPdfWriter::getLgiDictNeatline( ossimImageGeometry* geom,
+                                         std::string& s ) const
+{
+   s.clear();
+   if ( geom )
+   {
+      std::ostringstream os;
+
+      // Tmp drb...
+      os << "/Neatline[(0.0000000000)(0.0000000000)(0.0000000000)(718.0800000000)(609.8400000000)(718.0800000000)(609.8400000000)(0.0000000000)]";
+
+      s = os.str();
+   }
+   
+} // End: ossimPdfWriter::getLgiDictNeatline
+#endif
+
+void ossimPdfWriter::getLgiDictProjection( ossimImageGeometry* geom,
+                                           std::string& s ) const
+{
+   s.clear(); // Empty string indicates error.
+   
+   // Projection:
+   std::string projType;
+   getLgiDictProjectionType( geom, projType );
+   
+   // Datum:
+   std::string datumString;
+   getLgiDictDatum( geom, datumString );
+   
+   // Description
+   std::string descriptionString;
+   getLgiDictDescription( geom, descriptionString );
+
+   if ( projType.size() && datumString.size() )
+   {
+      std::ostringstream os;
+      os << "/Projection<<"
+         << projType
+         << descriptionString
+         << datumString
+         << "/Type/Projection>>"
+         << "/Display<<"
+         << projType
+         << descriptionString
+         << datumString
+         << "/Type/Projection>>";
+
+      s = os.str();
+   }
+   
+} // End: ossimPdfWriter::getLgiDictProjection
+
+void ossimPdfWriter::getLgiDictCtm( ossimImageGeometry* geom,
+                                    const ossimIrect& aoi,
+                                    std::string& s ) const
+{
+   s.clear(); // Empty string indicates error.
+
+   ossimDpt scale;
+   scale.makeNan();
+   ossimDpt dTie;
+   dTie.makeNan();
+   
+   ossimRefPtr<ossimProjection> proj = geom->getProjection();
+   if ( proj.valid() )
+   {
+      ossimRefPtr<ossimMapProjection> mapProj = dynamic_cast<ossimMapProjection*>( proj.get() );
+      if ( mapProj.valid() )
+      {
+         if ( mapProj->isGeographic() )
+         {
+            // Degrees per pixel.
+            geom->getDegreesPerPixel( scale );
+
+            if ( !scale.hasNans() )
+            {
+               // Tie point: Lat, lon of lower left corner. 
+               ossimGpt gTie;
+               geom->localToWorld( ossimDpt( aoi.ll() ), gTie );
+
+               // Check just lat and lon disregard height.
+               if ( !ossim::isnan(gTie.lon) && !ossim::isnan(gTie.lon) )
+               {
+                  dTie.x = gTie.lon;
+                  dTie.y = gTie.lat;
+               }
+            }
+         }
+      }
+   }
+
+   if ( !scale.hasNans() && !dTie.hasNans() )
+   {
+      //---
+      // Example string:
+      // (0.0000381944)(0.0000000000)(0.0000000000)(0.0000381944)(-77.0558525000)(38.8388091667)
+      // NOTE: (0,0) is lower left corner in pdf space.
+      ossim_float64 d = 0.0;
+      std::ostringstream os;
+      os << setprecision(15) // Not sure if this should be 10??? (drb)
+         << std::setiosflags(std::ios_base::fixed|std::ios_base::right)
+         << std::setfill('0')
+         << "/CTM[(" << scale.x << ")(" << d << ")(" << d << ")("
+         << scale.y << ")(" << dTie.x << ")(" << dTie.y << ")]";
+      
+      s = os.str();
+   }
+   
+} // End: ossimPdfWriter::getCtmString
+
+void ossimPdfWriter::getLgiDictProjectionType( ossimImageGeometry* geom, std::string& s ) const
+{
+   //---
+   // Initialize the projection string from geometry:
+   // Currently only coded for geographic and UTM projection.
+   //---
+   
+   s.clear(); // Empty string indicates error.
+
+   if ( geom )
+   {
+      ossimRefPtr<const ossimMapProjection> mapProj = geom->getAsMapProjection();
+      if ( mapProj.valid() )
+      {
+         if ( mapProj->isGeographic() )
+         {
+            s = "/ProjectionType(GEOGRAPHIC)";
+         }
+         else
+         {
+            // Check for UTM:
+            ossimRefPtr<const ossimUtmProjection> utmProj =
+               dynamic_cast<const ossimUtmProjection*>( mapProj.get() );
+            if ( utmProj.valid() )
+            {
+               ossim_int32 zone = utmProj->getZone();
+               char hemisphere = utmProj->getHemisphere();
+               std::ostringstream os;
+               os << "/ProjectionType(UT)"
+                  << "/Zone(" << zone << ")"
+                  << "/Hemisphere(" << hemisphere << ")";
+               s = os.str();
+            }
+         }
+      }
+      
+   } // Matches if ( geom )
+   
+} // End: ossimPdfWriter::getProjectionType
+
+ossim_uint32 ossimPdfWriter::getEpsgCode( const ossimImageGeometry* geom ) const
+{
+   ossim_uint32 code = 32767;
+   if ( geom )
+   {
+      ossimRefPtr<const ossimProjection> proj = geom->getProjection();
+      if ( proj.valid() )
+      {
+         // Map projection:
+         ossimRefPtr<const ossimMapProjection> mapProj =
+            dynamic_cast<const ossimMapProjection*>( proj.get() );
+            
+         if ( mapProj.valid() )
+         {
+            code = mapProj->getPcsCode();
+         }
+      }
+   }
+   return code;
+}
+
+#if 0
+void ossimPdfWriter::getNumberOfTiles( ossim_uint32 imageWidth,
+                                       ossim_uint32 imageHeight,
+                                       ossimIpt size ) const
+{
+   const ossim_int32 DEFAULT_TILE_DIMENSION = 1024;
+
+   size.x = imageWidth / DEFAULT_TILE_DIMENSION;
+   size.y = imageHeight / DEFAULT_TILE_DIMENSION;   
+
+   if ( imageWidth % DEFAULT_TILE_DIMENSION )
+   {
+      ++size.x;
+   }
+   if ( imageHeight % DEFAULT_TILE_DIMENSION )
+   {
+      ++size.y;
+   }
+   
+} // End: getNumberOfTiles( ... )
+#endif
+
+void ossimPdfWriter::getTitle( std::string& s ) const
+{
+   // Check if in keyword list.
+   s = m_kwl->findKey( TITLE_KW );
+   
+   if ( s.empty() )
+   {
+      if ( theFilename.size() )
+      {
+         // Set to basename of file.
+         s = theFilename.file().string();
+      }
+   }
+}
+
+void ossimPdfWriter::getAuthor( std::string& s ) const
+{
+   // Check if in keyword list.
+   s = m_kwl->findKey( AUTHOR_KW );
+   
+   if ( s.empty() )
+   {
+      s = "ossim"; // Default: ???
+   }
+}
+
+void ossimPdfWriter::getSubject( std::string& s ) const
+{
+   // Check if in keyword list.
+   s = m_kwl->findKey( SUBJECT_KW );
+}
+
+void ossimPdfWriter::getKeywords( std::string& s ) const
+{
+   // Check if in keyword list.
+   s = m_kwl->findKey( KEYWORDS_KW ); 
+}
+
+void ossimPdfWriter::getCreator( std::string& s ) const
+{
+   // Check if in keyword list.
+   s = m_kwl->findKey( CREATOR_KW );
+   
+   if ( s.empty() )
+   {
+      s = "ossim"; // Default: ???
+   }
+}
+
+void ossimPdfWriter::getProducer( std::string& s ) const
+{
+   // Check if in keyword list.
+   s = m_kwl->findKey( PRODUCER_KW );
+   
+   if ( s.empty() )
+   {
+      s = "ossim"; // Default: ???
+   }
+}
+
+void ossimPdfWriter::getCreationDate( std::string& s ) const
+{
+   // Check if in keyword list.
+   s = m_kwl->findKey( CREATION_DATE_KW );
+   
+   if ( s.empty() )
+   {
+      getGmtDate( s ); 
+   }
+}
+
+void ossimPdfWriter::getModDate( std::string& s ) const
+{
+   // Check if in keyword list.
+   s = m_kwl->findKey( MOD_DATE_KW );
+   
+   if ( s.empty() )
+   {
+      getGmtDate( s );
+   }
+}
+
+void ossimPdfWriter::getGmtDate( std::string& s ) const
+{
+   // Get the time:
+   time_t now;
+   time(&now);
+   
+   // Convert to UTC:
+   tm* gt = gmtime(&now);
+
+   if ( gt )
+   {
+      //---
+      // Format(26 charactors including trailing null):
+      // (D:YYYYMMDDHHmmSSZ00'00')
+      char dateChars[26];
+      dateChars[25] = '\0';
+      strftime(dateChars, 26, "(D:%Y%m%d%H%M%SZ00'00')", gt);
+      s = dateChars;
+   }
+   
+} // End: ossimPdfWriter::getGmtDate
+
+void ossimPdfWriter::getTileSize( std::string& s ) const
+{
+   // Check if in keyword list.
+   s = m_kwl->findKey( std::string( ossimKeywordNames::OUTPUT_TILE_SIZE_KW ) );
+   if ( s.empty() )
+   {
+      ossimIpt tileSize;
+      ossim::defaultTileSize( tileSize );
+      s = ossimString::toString( tileSize.x ).string(); 
+   }
+}
+
+void ossimPdfWriter::getTileSize( ossimIpt& tileSize ) const
+{
+   std::string s;
+   getTileSize( s );
+   if ( s.size() )
+   {
+      tileSize.x = ossimString(s).toInt32();
+   }
+   else
+   {
+      tileSize.x = 1024; // default
+   }
+   tileSize.y = tileSize.x;
+}
+
+std::string ossimPdfWriter::getTileString( ossim_uint32 x, ossim_uint32 y ) const
+{
+   // Format like:  /Tile_0001_0002
+   std::ostringstream os;
+   os << std::setiosflags(std::ios_base::fixed|std::ios_base::right)
+      << std::setfill('0')
+      << "/Tile_"
+      << std::setw(4) << x
+      << "_"
+      << std::setw(4) << y;
+   
+   return os.str();
+}
diff --git a/ossim/src/ossim/imaging/ossimPiecewiseRemapper.cpp b/ossim/src/ossim/imaging/ossimPiecewiseRemapper.cpp
new file mode 100644
index 0000000..b7ed009
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimPiecewiseRemapper.cpp
@@ -0,0 +1,926 @@
+//----------------------------------------------------------------------------
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Piecewise remapper class definition. Derived from ossimTableRemapper.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/imaging/ossimPiecewiseRemapper.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <iomanip>
+#include <iostream>
+#include <limits>
+#include <sstream>
+
+RTTI_DEF1(ossimPiecewiseRemapper, "ossimPiecewiseRemapper", ossimTableRemapper)
+
+
+static const std::string REMAP_KW      = "remap";
+static const std::string REMAP_TYPE_KW = "remap_type";
+
+static ossimTrace traceDebug("ossimPiecewiseRemapper:debug");
+
+#ifdef OSSIM_ID_ENABLED
+static const char OSSIM_ID[] = "$Id$";
+#endif
+
+// Private container class for points.
+ossimPiecewiseRemapper::ossimRemapSet::ossimRemapSet()
+   :
+   m_set(0)
+{
+}
+
+ossimPiecewiseRemapper::ossimRemapSet::ossimRemapSet(const ossimRemapSet& obj)
+   :
+   m_set(obj.m_set)
+{
+}
+
+const ossimPiecewiseRemapper::ossimRemapSet&
+ossimPiecewiseRemapper::ossimRemapSet::operator=( const ossimRemapSet& rhs )
+{
+   if ( this != &rhs )
+   {
+      m_set = rhs.m_set;
+   }
+   return *this;
+}
+
+// Private container class for points.
+ossimPiecewiseRemapper::ossimBandRemap::ossimBandRemap()
+   :
+   m_remap(0)
+{
+}
+
+ossimPiecewiseRemapper::ossimBandRemap::ossimBandRemap(const ossimBandRemap& obj)
+   :
+   m_remap(obj.m_remap)
+{
+}
+
+const ossimPiecewiseRemapper::ossimBandRemap&
+ossimPiecewiseRemapper::ossimBandRemap::operator=( const ossimBandRemap& rhs )
+{
+   if ( this != &rhs )
+   {
+      m_remap = rhs.m_remap;
+   }
+   return *this;
+}
+
+void ossimPiecewiseRemapper::ossimBandRemap::loadState( const ossimKeywordlist& kwl,
+                                                        const std::string& prefix,
+                                                        ossim_uint32 band )
+{
+   //---
+   // Band Remap set example:
+   // band0.remap0:((0, 127, 0, 127), (128, 255, 128, 382))
+   // band0.remap1:((0, 382, 0, 255))
+   //---
+
+   // Clear the sets:
+   m_remap.clear();
+   
+   // Get the number of remaps for this band.
+   std::string keyBase = "band";
+   keyBase += ossimString::toString(band).string();
+   keyBase += ".";
+   keyBase += REMAP_KW;
+   
+   ossim_uint32 NUMBER_REMAPS = kwl.numberOf(prefix.c_str(), keyBase.c_str());
+   ossim_uint32 found = 0;
+   ossim_uint32 index = 0;
+   
+   // Loop to find band remaps.  This allows for skipping indexes. 
+   while ( found < NUMBER_REMAPS )
+   {
+      std::string key = keyBase + ossimString::toString(index).string();
+      std::string value = kwl.findKey( prefix, key );
+      if ( value.size() )
+      {
+         ossimPiecewiseRemapper::ossimRemapSet set;
+         if ( initRemapSetFromString( value, set ) )
+         {
+            m_remap.push_back( set );
+         }
+         ++found;
+      }
+      
+      ++index;
+      if ( index > (NUMBER_REMAPS+100) )
+      {
+         break;
+      }
+   }
+   
+} // End: ossimPiecewiseRemapper::ossimBandRemap::loadState
+      
+void ossimPiecewiseRemapper::ossimBandRemap::saveState(
+   ossimKeywordlist& kwl,
+   const std::string& prefix,
+   ossimPiecewiseRemapper::PiecewiseRemapType remapType,
+   ossim_uint32 band ) const
+{
+   //---
+   // Remap set:
+   // Remap set: "band0.remap0":
+   // band0.remap0:((0, 127, 0, 127), (128, 255, 128, 382))
+   // band0.remap1:((0, 382, 0, 255))
+   //---
+   ossim_uint32 remapIndex = 0;
+   std::vector<ossimRemapSet>::const_iterator i = m_remap.begin();
+   while ( i != m_remap.end() )
+   {
+      std::string key = "band";
+      key += ossimString::toString(band).string();
+      key += ".";
+      key += REMAP_KW;
+      key += ossimString::toString(remapIndex).string();
+      std::string value;
+      getRemapSetString( remapType, (*i), value );
+      kwl.addPair( prefix, key, value );
+      ++i;
+      ++remapIndex;
+   }
+   
+} // End: ossimPiecewiseRemapper::ossimBandRemap::saveState
+
+bool ossimPiecewiseRemapper::ossimBandRemap::initRemapSetFromString(
+   const std::string& s, ossimPiecewiseRemapper::ossimRemapSet& set ) const
+{
+   //---
+   // Example:
+   // ((0, 127, 0, 127), (128, 255, 128, 382))
+   //---
+
+   bool result = false;
+
+   if ( s.size() )
+   {
+      std::istringstream in( s );
+      char c;
+      ossim_float64 d;
+      
+      // Gobble the open '('
+      while ( !in.bad() && !in.eof() )
+      {
+         c = in.get();
+         if ( c == '(' ) break;
+      }
+      
+      // Main loop:
+      while( !in.bad() && !in.eof() )
+      {
+         c = in.get();
+         
+         if ( c == ')' ) // Possible end of quadruple...
+         {
+            // Gobble next comma:
+            while( !in.bad() && !in.eof() )
+            {
+               c = in.get();
+               if ( c == ',' )
+               {
+                  break;
+               }
+            }
+            c = in.get();
+         }
+         
+         if ( (c == '(') || (c == ',') )
+         {
+            // Next string should be a number:
+            in >> d;
+            if ( in.good() )
+            {
+               set.m_set.push_back(d);
+            }
+            else
+            {
+               break;
+            }
+         }
+      }
+
+      if ( set.m_set.size() )
+      {
+         result = true;
+      }
+   }
+
+   if ( !result )
+   {
+      set.m_set.clear();
+   }
+
+   return result;
+   
+} // End: ossimPiecewiseRemapper::ossimBandRemap::initRemapSetFromString( ... )
+
+void ossimPiecewiseRemapper::ossimBandRemap::getRemapSetString(
+   ossimPiecewiseRemapper::PiecewiseRemapType remapType,
+   const ossimPiecewiseRemapper::ossimRemapSet& set, 
+   std::string& s ) const
+{
+   if ( remapType == ossimPiecewiseRemapper::LINEAR_NATIVE )
+   {
+      getLinearRemapSetString( set, s );
+   }
+}
+
+void ossimPiecewiseRemapper::ossimBandRemap::getLinearRemapSetString(
+   const ossimPiecewiseRemapper::ossimRemapSet& set, 
+   std::string& s ) const
+{
+   //---
+   // Save in the form of:
+   // ((0, 127, 0, 127), (128, 255, 128, 382))
+   //---
+   s.clear();
+   if ( set.m_set.size() )
+   {
+      const ossim_uint32 TUPLES = set.m_set.size() / 4;
+      if ( TUPLES )
+      {  
+         std::ostringstream os;
+         os << std::setprecision(15)
+            << "(";
+         for ( ossim_uint32 i = 0; i < TUPLES; ++i )
+         {
+            ossim_uint32 setIdx = i*4;
+            os << "("
+               << set.m_set[ setIdx ]
+               << ","
+               << set.m_set[ setIdx + 1 ]
+               << ","
+               << set.m_set[ setIdx + 2 ]
+               << ","
+               << set.m_set[ setIdx + 3 ]
+               << ")";
+            if ( i < (TUPLES-1) )
+            {
+               os << ","; // Comma between quadruples.
+            }
+         }
+         os << ")";
+         s = os.str();
+      }
+   }
+   
+} // End: ossimPiecewiseRemapper::ossimBandRemap::getLinearRemapSetString( ... )
+
+ossimPiecewiseRemapper::ossimPiecewiseRemapper()
+   :
+   ossimTableRemapper(),  // base class
+   m_dirty(false),
+   m_remapType(ossimPiecewiseRemapper::UNKNOWN),
+   m_bandRemap(0),
+   m_min(0),
+   m_max(0)
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimPiecewiseRemapper::ossimPiecewiseRemapper entered...\n";
+#ifdef OSSIM_ID_ENABLED
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "OSSIM_ID:  " << OSSIM_ID << "\n";
+#endif      
+   }
+}
+
+ossimPiecewiseRemapper::~ossimPiecewiseRemapper()
+{
+}
+
+void ossimPiecewiseRemapper::initialize()
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimPiecewiseRemapper::initialize entered..." << endl;
+   }
+
+   //---
+   // Call the base class initialize.
+   // Note:  This will reset "theInputConnection" if it changed...
+   //---
+   ossimTableRemapper::initialize();
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimPiecewiseRemapper::initialize exited..." << endl;
+   }
+}
+
+void ossimPiecewiseRemapper::setRemapType( const std::string& type )
+{
+   if ( (type == "linear_native") ||
+        (ossimString(type).downcase() == "linear_native") )
+   {
+      m_remapType = ossimPiecewiseRemapper::LINEAR_NATIVE;
+   }
+   else
+   {
+      m_remapType = ossimPiecewiseRemapper::UNKNOWN;
+   }
+}
+
+ossimRefPtr<ossimImageData> ossimPiecewiseRemapper::getTile(
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   ossimRefPtr<ossimImageData> result = 0;
+   
+   if ( theInputConnection )
+   {
+      if ( m_dirty )
+      {
+         // Rebuild the table if dirty flag set:
+         buildTable();
+      }
+
+      if ( theEnableFlag && theTable.size() ) 
+      {
+         //---
+         // Not bypassed and has a table...
+         // Base handles the rest...
+         //---
+         result = ossimTableRemapper::getTile(tileRect, resLevel);
+      }
+      else
+      {
+         // Fetch tile from pointer from the input source.
+         result = theInputConnection->getTile(tileRect, resLevel);
+      }
+   }
+
+   return result;
+}
+
+void ossimPiecewiseRemapper::getRemapTypeString(
+   ossimPiecewiseRemapper::PiecewiseRemapType remapType, std::string& s ) const
+{
+   if ( remapType == ossimPiecewiseRemapper::LINEAR_NATIVE )
+   {
+      s = "linear_native";
+   }
+   else
+   {
+      s = "unknown";
+   }
+}
+
+bool ossimPiecewiseRemapper::loadState(const ossimKeywordlist& kwl,
+                                       const char* prefix)
+{
+   static const char MODULE[] = "ossimPiecewiseRemapper::loadState";
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " Entered..." << "\nprefix:  " << (prefix?prefix:"null") << endl;
+   }
+
+   bool status = false;
+   std::string p = ( prefix ? prefix : "" );
+
+   // Check type first before going on:
+   std::string key = ossimKeywordNames::TYPE_KW;
+   std::string value;
+   value = kwl.findKey( p, key );
+
+   if ( value == "ossimPiecewiseRemapper" )
+   {
+      // Load the base class states...
+      status = ossimTableRemapper::loadState(kwl, prefix);
+      
+      if (status)
+      {
+         // Look for scalar type keyword.
+         // ossim_int32 st = ossimScalarTypeLut::instance()->getEntryNumber(kwl, p.c_str(), true);
+
+         // Lookup table returns -1 if not found so check return...
+         // if ( (st != -1) && (st != OSSIM_SCALAR_UNKNOWN) )
+         // {
+         // m_outputScalarType = static_cast<ossimScalarType>(st);
+         //}
+         
+         // Remap type "remap_type":
+         value = kwl.findKey( p, REMAP_TYPE_KW );
+         if ( value.size() )
+         {
+            setRemapType( value );
+            
+            if ( m_remapType != ossimPiecewiseRemapper::UNKNOWN )
+            {
+               // Get the number of bands "number_bands":
+               ossim_uint32 bands = 0;
+               key = ossimKeywordNames::NUMBER_BANDS_KW;
+               value = kwl.findKey( p, key );
+               if ( value.size() )
+               {
+                  bands = ossimString(value).toUInt32();
+               }
+               
+               if ( bands )
+               {
+                  // Start with clean remap set:
+                  m_bandRemap.clear();
+                  m_bandRemap.resize( bands );
+                  
+                  m_min.clear();
+                  m_max.clear();
+
+                  // Loop through bands:
+                  for ( ossim_uint32 band = 0; band < bands; ++band )
+                  {
+                     // Band remap:
+                     m_bandRemap[band].loadState( kwl, p, band );
+                     
+                     // Min:
+                     std::string keyBase = ossimKeywordNames::MIN_VALUE_KW;
+                     keyBase += ".band";
+                     key = keyBase + ossimString::toString(band).string();
+                     value =  kwl.findKey( p, key );
+                     if ( value.size() )
+                     {
+                        m_min.push_back( ossimString(value).toFloat64() );
+                     }
+                     
+                     // Max:
+                     keyBase = ossimKeywordNames::MAX_VALUE_KW;
+                     keyBase += ".band";
+                     key = keyBase + ossimString::toString(band).string();
+                     value =  kwl.findKey( p, key );
+                     if ( value.size() )
+                     {
+                        m_max.push_back( ossimString(value).toFloat64() );
+                     }
+                     
+                  } // End: Band loop
+                  
+                  if ( m_bandRemap.size() && ( !m_min.size() || !m_max.size() ) )
+                  {
+                     initMinMax(); // Initialize from the m_reampSet tuples.
+                  }
+               }
+            }
+         }
+
+         if ( m_bandRemap.size() )
+         {
+            m_dirty = true;
+         }
+         
+      } // Matches: status = ossimTableRemapper::loadState(kwl, prefix); if (status){...
+      else
+      {
+         // Sets base: ossimSource::theEnableFlag
+         setEnableFlag(false);
+      }
+
+
+      // Tmp drb:
+      // initMinMax();
+      
+   } // Matches: if ( value == "ossimPiecewiseRemapper" )
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:\n";
+      this->print( ossimNotify(ossimNotifyLevel_DEBUG) );
+      ossimNotify(ossimNotifyLevel_DEBUG) << "\nExited..." << endl;
+   }
+   return status;
+   
+} // End: ossimPiecewiseRemapper::loadState
+
+bool ossimPiecewiseRemapper::saveState( ossimKeywordlist& kwl,
+                                        const char* prefix) const
+{
+   bool result = false;
+   
+   const ossim_uint32 BANDS = getNumberOfOutputBands();
+   
+   if ( ( m_remapType != ossimPiecewiseRemapper::UNKNOWN ) &&
+        ( m_bandRemap.size() == BANDS ) )
+   {
+      std::string p = ( prefix ? prefix : "" );
+
+      // Bands:
+      std::string value = ossimString::toString(BANDS).string();
+      kwl.addPair( p, std::string(ossimKeywordNames::NUMBER_BANDS_KW), value );
+      
+      // Remap type:
+      getRemapTypeString( m_remapType, value );
+      kwl.addPair( p, REMAP_TYPE_KW, value );
+
+      // Save the band remaps.
+      if ( m_bandRemap.size() == BANDS )
+      {
+         for ( ossim_uint32 band = 0; band < BANDS; ++band )
+         {
+            m_bandRemap[band].saveState( kwl, p, m_remapType, band );
+         }
+      }
+      
+      // Min/max values:
+      if ( ( m_min.size() == BANDS ) && ( m_max.size() == BANDS ) )
+      {
+         std::string minBase = ossimKeywordNames::MIN_VALUE_KW;
+         minBase += ".band";
+         std::string maxBase = ossimKeywordNames::MAX_VALUE_KW;
+         maxBase += ".band";
+         
+         for ( ossim_uint32 band = 0; band < BANDS; ++band )
+         {
+            // Min:
+            std::string key = minBase + ossimString::toString(band).string();
+            kwl.add( p.c_str(), key.c_str(), m_min[band] );
+
+            // Max:
+            key = maxBase + ossimString::toString(band).string();
+            kwl.add( p.c_str(), key.c_str(), m_max[band] );
+         }
+      }
+
+      // Base class:
+      result = ossimTableRemapper::saveState(kwl, prefix);
+   }
+   
+   return result;
+}
+
+ostream& ossimPiecewiseRemapper::print(ostream& os) const
+{
+   ossimKeywordlist kwl;
+   saveState( kwl, 0 );
+   
+   os << setiosflags(ios::fixed) << setprecision(15)
+      << "\nossimPiecewiseRemapper::print:\n"
+      << kwl
+      << "\n";
+   
+   return os;
+}
+
+ossimString ossimPiecewiseRemapper::getClassName() const
+{
+   return ossimString("ossimPiecewiseRemapper");
+}
+
+ossimString ossimPiecewiseRemapper::getLongName()const
+{
+   return ossimString("OSSIM Piecewise Remapper");
+}
+
+ossimString ossimPiecewiseRemapper::getShortName()const
+{
+   return ossimString("Piecewise Remapper");
+}
+
+double ossimPiecewiseRemapper::getMinPixelValue(ossim_uint32 band)const
+{
+   ossim_float64 result = ossimTableRemapper::getMinPixelValue(band);
+   if ( theEnableFlag && (band < m_min.size()) )
+   {
+      result = m_min[band];
+   }
+   return result;
+}
+
+ossim_float64 ossimPiecewiseRemapper::getMaxPixelValue(ossim_uint32 band) const
+{
+   ossim_float64 result = ossimTableRemapper::getMaxPixelValue(band);
+   if ( theEnableFlag && (band < m_max.size()) )
+   {
+      result = m_max[band];
+   }
+   return result;
+}
+
+void ossimPiecewiseRemapper::initMinMax()
+{
+#if 0
+   if ( m_remapType == ossimPiecewiseRemapper::LINEAR_NATIVE )
+   {
+      //---
+      // Each remap set holds a group of tuples for the band.
+      // Tuple format example: <min_in> <max_in> <min_out> <max_out>
+      //---
+      const ossim_uint32 BANDS = getNumberOfOutputBands();
+
+      if ( m_bandRemap.size() == BANDS )
+      {
+         m_min.resize( BANDS );
+         m_max.resize( BANDS );
+         
+         // First time through:
+         for( ossim_uint32 band = 0; band < BANDS; ++band )
+         {
+            const ossim_uint32 TUPLES = m_bandRemap[band].m_set.size() / 4;
+            for ( ossim_uint32 tuple = 0; tuple < TUPLES; ++tuple )
+            {
+               //---
+               // Min: get min of "min_out" from sets.
+               // Max: get max of "max_out" from sets.
+               //---
+               if ( tuple == 0 )
+               {
+                  m_min[band] = m_bandRemap[band].m_set[tuple*4+2];
+                  m_max[band] = m_bandRemap[band].m_set[tuple*4+3];
+               }
+               else
+               {
+                  if ( m_bandRemap[band].m_set[tuple*4+2] < m_min[band] )
+                  {
+                     m_min[band] = m_bandRemap[band].m_set[tuple*4+2];
+                  }
+                  if ( m_bandRemap[band].m_set[tuple*4+3] > m_max[band] )
+                  {
+                     m_max[band] = m_bandRemap[band].m_set[tuple*4+3];
+                  }
+               }  
+            }
+
+            //---
+            // Clamp min to scalar min as this is used for getMinPixelValue.
+            // This will keep a remap of:
+            // ((0, 127, 0, 127), (128, 255, 128, 382))
+            // From having a min and null of 0...
+            //---
+            if ( m_outputScalarType != OSSIM_SCALAR_UNKNOWN )
+            {
+               if ( m_min[band] < ossim::defaultMin( m_outputScalarType ) )
+               {
+                  m_min[band] = ossim::defaultMin( m_outputScalarType );
+               }
+            }
+            
+         } // End: band loop...
+      }
+   }
+   else
+   {
+      m_min.clear();
+      m_max.clear();
+   }
+#endif
+
+   // Disabled for now (drb)
+   m_min.clear();
+   m_max.clear();
+   
+   
+} // End: ossimPiecewiseRemapper::initMinMax()
+
+void ossimPiecewiseRemapper::buildTable()
+{
+   const ossim_uint32 BANDS = getNumberOfOutputBands();
+   if ( BANDS && (m_bandRemap.size() == BANDS) &&
+        ( m_remapType == ossimPiecewiseRemapper::LINEAR_NATIVE ) )
+   {
+      setupTable();
+
+      if ( theTable.size() )
+      {
+         if ( m_remapType == ossimPiecewiseRemapper::LINEAR_NATIVE )
+         {
+            buildLinearNativeTable();
+         }
+      }
+   }
+   else
+   {
+      // No remaps:
+      theTable.clear();
+   }
+
+   // Clear the dirty flag.
+   m_dirty = false;
+   
+} // End: ossimPiecewiseRemapper::buildTable()
+
+void ossimPiecewiseRemapper::buildLinearNativeTable()
+{
+   switch ( getOutputScalarType() )
+   {
+      case OSSIM_UINT8:
+      {
+         buildLinearNativeTable(ossim_uint8(0));
+         break;
+      }
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+      {
+         buildLinearNativeTable(ossim_uint16(0));
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         buildLinearNativeTable(ossim_sint16(0));
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         buildLinearNativeTable(ossim_uint32(0));
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         buildLinearNativeTable(ossim_sint32(0));
+         break;
+      }
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         if(traceDebug())
+         {
+            // Shouldn't hit this.
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimHistogramRemapper::buildLinearNativeTable OSSIM_SCALAR_UNKNOWN!" << endl;
+         }
+         break;
+      }
+			
+   } // End of "switch (theTableType)"
+      
+} // End: void ossimPiecewiseRemapper::buildLinearNativeTable()
+
+template <class T> void ossimPiecewiseRemapper::buildLinearNativeTable(T /* dummy */)
+{
+   const ossim_uint32 BANDS = getNumberOfOutputBands();
+   
+   if ( BANDS && (m_bandRemap.size() == BANDS) && theTable.size() )
+   {
+      T* table = reinterpret_cast<T*>(&theTable.front());
+
+      ossim_uint32 index = 0;
+      
+      bool isInteger = std::numeric_limits<T>::is_integer; // Flag to round or not.
+      
+      // Band loop:
+      for(ossim_uint32 band = 0; band < BANDS; ++band)
+      {
+         // First bin is always for null.
+         table[index++] = (T)getNullPixelValue(band);
+         
+         const ossim_float64 MIN_PIX = getMinPixelValue(band);
+         const ossim_float64 MAX_PIX = getMaxPixelValue(band);
+
+         for( ossim_uint32 bin = 1; bin < theTableBinCount; ++bin )
+         {
+            ossim_float64 p = MIN_PIX + bin - 1;
+
+#if 0 /* Please keep for debug. (drb) */
+            cout << "\ninput pix[" << bin << "]: " << p << endl;
+#endif
+            
+            // Loop through remaps:
+            std::vector<ossimRemapSet>::const_iterator i = m_bandRemap[band].m_remap.begin();
+            while ( i != m_bandRemap[band].m_remap.end() )
+            {
+               //---
+               // Each remap set holds a group of tuples for the band.
+               // Tuple format example: <min_in> <max_in> <min_out> <max_out>
+               //---
+               const ossim_uint32 TUPLES = (*i).m_set.size() / 4;
+               for ( ossim_uint32 set = 0; set < TUPLES; ++set )
+               {
+                  // Range check it:
+                  if ( ( p >= (*i).m_set[set*4] ) &&  // input min
+                       ( p <= (*i).m_set[set*4+1] ) ) // input max
+                  {
+                     //---
+                     // p = (p - output_min) * (output_max-output_min)/(input_max-input_min)
+                     // + output_min;
+                     //---
+                     p = (p - (*i).m_set[set*4]) *
+                        ((*i).m_set[set*4+3]-(*i).m_set[set*4+2]) /
+                        ((*i).m_set[set*4+1]-(*i).m_set[set*4]) +
+                        (*i).m_set[set*4];
+
+#if 0 /* Please keep for debug. (drb) */
+                     cout << "remapp_pix[" << bin << "][" << set << "]: " << p << endl;
+#endif
+                  }
+                  
+               } // End: TUPLE loop
+
+               ++i; // Next remap.
+
+            } // End: remap loop:
+
+            if ( isInteger )
+            {
+               p = ossim::round<ossim_float64>(p); // Round to integer correctly.
+            }
+            
+#if 0 /* Please keep for debug. (drb) */
+            cout << "output_pix[" << bin << "]: " << p << endl;
+#endif
+            
+            // Assign to table with min/max clip:
+            table[bin] = (T)( ( p >= MIN_PIX ) ? ( ( p <= MAX_PIX ) ? p : MAX_PIX ) : MIN_PIX);
+            
+         } // End: bin loop
+         
+      } // End: band loop
+      
+   } // Matches: if ( theTable.size() )
+
+#if 0 /* Please leave for debug. (drb) */
+   ossimTableRemapper::print( cout );
+#endif
+   
+} // End: template <class T> void ossimPiecewiseRemapper::buildLinearNativeTable(T dummy)
+
+void ossimPiecewiseRemapper::setupTable()
+{
+   const ossim_uint32 BANDS = getNumberOfOutputBands();
+   if ( BANDS )
+   {
+      ossim_uint32 values_per_band = 0;
+      ossim_uint32 bytes_per_pixel = 0;
+      
+      switch (theOutputScalarType)
+      {
+         case OSSIM_UINT8:
+            values_per_band = 256;  // 2 ^ 8
+            bytes_per_pixel = 1;
+            theTableType = ossimTableRemapper::NATIVE;
+            break;
+            
+         case OSSIM_USHORT11:
+            values_per_band = 2048; // 2 ^ 11
+            bytes_per_pixel = 2;
+            theTableType = ossimTableRemapper::NATIVE;
+            break;
+            
+         case OSSIM_UINT16:
+         case OSSIM_SINT16:
+            values_per_band = 65536; // 2 ^ 16
+            bytes_per_pixel = 2;
+            theTableType = ossimTableRemapper::NATIVE;
+            break;
+            
+         case OSSIM_UINT32:
+         case OSSIM_SINT32:
+            values_per_band = 65536; // 2 ^ 16
+            bytes_per_pixel = 4;
+            theTableType = ossimTableRemapper::NATIVE;
+            break;
+            
+         case OSSIM_NORMALIZED_FLOAT:
+         case OSSIM_FLOAT:
+            bytes_per_pixel = 4;
+            break;
+            
+         case OSSIM_NORMALIZED_DOUBLE:         
+         case OSSIM_DOUBLE:
+            bytes_per_pixel = 8;
+            theTableType = ossimTableRemapper::NORMALIZED;
+            break;
+            
+         default:
+            break;
+      }
+   
+      theTableBinCount  = values_per_band;
+      theTableBandCount = BANDS;
+
+      ossim_uint32 size_in_bytes = values_per_band * BANDS * bytes_per_pixel;
+      theTable.resize(size_in_bytes);
+   }
+   
+} // End: ossimPiecwiseRemapper::getTableSize()
+
+// Private to disallow use...
+ossimPiecewiseRemapper::ossimPiecewiseRemapper(const ossimPiecewiseRemapper&)
+{
+}
+
+// Private to disallow use...
+ossimPiecewiseRemapper& ossimPiecewiseRemapper::operator=(const ossimPiecewiseRemapper&)
+{
+   return *this;
+}
+
+
+
diff --git a/src/ossim/imaging/ossimPixelFlipper.cpp b/ossim/src/ossim/imaging/ossimPixelFlipper.cpp
similarity index 100%
rename from src/ossim/imaging/ossimPixelFlipper.cpp
rename to ossim/src/ossim/imaging/ossimPixelFlipper.cpp
diff --git a/ossim/src/ossim/imaging/ossimPolyCutter.cpp b/ossim/src/ossim/imaging/ossimPolyCutter.cpp
new file mode 100644
index 0000000..33a5231
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimPolyCutter.cpp
@@ -0,0 +1,412 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimPolyCutter.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimPolyCutter.h>
+#include <ossim/base/ossimPolyArea2d.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimRgbImage.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimActiveEdgeTable.h>
+static const char* NUMBER_POLYGONS_KW = "number_polygons";
+
+RTTI_DEF1(ossimPolyCutter, "ossimPolyCutter", ossimImageSourceFilter)
+
+ossimPolyCutter::ossimPolyCutter()
+   : ossimImageSourceFilter(),
+     theTile(NULL),
+     theCutType(OSSIM_POLY_NULL_OUTSIDE),
+     m_boundingOverwrite(false)
+{
+   thePolygonList.push_back(ossimPolygon());
+   theBoundingRect.makeNan();
+}
+
+// ossimPolyCutter::ossimPolyCutter(ossimImageSource* inputSource,
+//                                  ossimPolyArea2d* polygon)
+ossimPolyCutter::ossimPolyCutter(ossimImageSource* inputSource,
+                                 const ossimPolygon& polygon)
+   : ossimImageSourceFilter(inputSource),
+     theTile(NULL),
+     theCutType(OSSIM_POLY_NULL_INSIDE),
+     m_boundingOverwrite(false)
+{
+   thePolygonList.push_back(polygon);
+   computeBoundingRect();
+   initialize();
+}
+
+ossimPolyCutter::~ossimPolyCutter()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimPolyCutter::getTile(const ossimIrect& tileRect,
+                                                     ossim_uint32 resLevel)
+{
+   if(!theInputConnection)
+   {
+      return theTile;
+   }
+   ossimRefPtr<ossimImageData> input = theInputConnection->getTile(tileRect,
+                                                                   resLevel);
+   
+   if(!isSourceEnabled() || theBoundingRect.hasNans() || !input.valid())
+   {
+      return input;
+   }
+   
+   if((input->getDataObjectStatus() == OSSIM_EMPTY) ||
+      (input->getDataObjectStatus() == OSSIM_NULL))
+   {
+      return input;
+   }
+
+   if(!theTile.valid())
+   {
+      allocate(); // First time through...
+   }
+
+   if(!theTile.valid())
+   {
+      return input;
+   }
+   
+   theTile->setImageRectangle(tileRect);
+   
+   theTile->loadTile(input.get());
+   theTile->setDataObjectStatus(input->getDataObjectStatus());
+   vector<ossimPolygon>* polyList = &thePolygonList;
+   vector<ossimPolygon>  scaledPoly;
+   
+   ossimIrect boundingRect = getBoundingRect(resLevel);
+   if(resLevel)
+   {
+      ossimDpt decimation;
+      getDecimationFactor(resLevel, decimation);
+
+      if(!decimation.hasNans())
+      {
+         for(int polyIndex = 0;
+             polyIndex < (int)thePolygonList.size();
+             ++polyIndex)
+         {
+            scaledPoly.push_back(thePolygonList[polyIndex]*decimation);
+         }
+         polyList = &scaledPoly;
+      }
+   }
+   
+   if(polyList->size()&&
+      theTile->getDataObjectStatus()!=OSSIM_NULL)
+   {
+//       ossimActiveEdgeTable aet;
+      
+      
+      if(theCutType == OSSIM_POLY_NULL_OUTSIDE)
+      {
+         if(boundingRect.intersects(tileRect))
+         {
+            theTile->makeBlank();
+            theHelper.setImageData(theTile.get());
+            for(int polyIndex = 0; polyIndex < (int)polyList->size(); ++polyIndex)
+            {
+               theHelper.copyInputToThis(input->getBuf(),
+                                      (*polyList)[polyIndex]);
+            }
+            theTile->validate();
+         }
+         else
+         {
+            theTile->makeBlank();
+         }
+      }
+      else if(theCutType == OSSIM_POLY_NULL_INSIDE)
+      {
+         if(boundingRect.intersects(tileRect))
+         {
+            theHelper.setImageData(theTile.get());
+            for(int polyIndex = 0;
+                polyIndex < (int)polyList->size();
+                ++polyIndex)
+            {
+               theHelper.fill(theTile->getNullPix(),
+                           (*polyList)[polyIndex]);
+            }
+         }
+         theTile->validate();
+      }
+      
+   }
+   return theTile;
+}
+
+ossimIrect ossimPolyCutter::getBoundingRect(ossim_uint32 resLevel)const
+{
+   ossimIrect result;
+
+   result.makeNan();
+   if(!theInputConnection)
+   {
+      return result;
+   }
+   if(!isSourceEnabled())
+   {
+      return ossimImageSourceFilter::getBoundingRect(resLevel);
+   }
+   
+   result = theInputConnection->getBoundingRect(resLevel);
+
+   if(isSourceEnabled()&&(!theBoundingRect.hasNans()))
+   {
+      if(theCutType == OSSIM_POLY_NULL_OUTSIDE)
+      {
+         ossimDpt decimation;
+         getDecimationFactor(resLevel, decimation);
+         if(decimation.hasNans())
+         {
+            result =  theBoundingRect;
+         }
+         else
+         {
+            result = theBoundingRect*decimation;
+         }
+      }
+   }
+   else if(isSourceEnabled())
+   {
+      return theBoundingRect;
+   }
+   
+   return result;
+}
+
+void ossimPolyCutter::initialize()
+{
+   // Capture the input connection.
+   ossimImageSourceFilter::initialize();
+
+   // Force an allocate on next getTile.
+   theTile = NULL;
+}
+
+void ossimPolyCutter::allocate()
+{
+   theTile=NULL;
+   if(theInputConnection)
+   {
+      theTile = ossimImageDataFactory::instance()->create(this,
+                                                          theInputConnection);
+      theTile->initialize();
+
+   }
+}
+
+bool ossimPolyCutter::saveState(ossimKeywordlist& kwl,
+                                const char* prefix)const
+{
+   ossimString newPrefix = prefix;
+
+   for(int i = 0; i < (int)thePolygonList.size();++i)
+   {
+      newPrefix = ossimString(prefix) + "polygon" + ossimString::toString(i)+".";
+
+      thePolygonList[i].saveState(kwl, newPrefix.c_str());
+   }
+   kwl.add(prefix,
+           NUMBER_POLYGONS_KW,
+           (int)thePolygonList.size(),
+           true);
+   
+   ossimString fillType = "null_inside";
+   if(theCutType == OSSIM_POLY_NULL_OUTSIDE)
+   {
+      fillType = "null_outside";
+   }
+   kwl.add(prefix,
+           "cut_type",
+           fillType.c_str(),
+           true);   
+  
+   return ossimImageSourceFilter::saveState(kwl, prefix);;
+}
+
+bool ossimPolyCutter::loadState(const ossimKeywordlist& kwl,
+                                const char* prefix)
+{
+   const char* numberPolygons = kwl.find(prefix, NUMBER_POLYGONS_KW);
+
+   ossimString newPrefix;
+   if(numberPolygons)
+   {
+      thePolygonList.clear();
+      int npolys = ossimString(numberPolygons).toLong();
+      for(int i = 0; i < npolys;++i)
+      {
+         thePolygonList.push_back(ossimPolygon());
+         
+         newPrefix = ossimString(prefix) + "polygon" + ossimString::toString(i)+".";
+         
+         thePolygonList[i].loadState(kwl, newPrefix.c_str());
+      }
+   }
+
+   const char* lookup = kwl.find(prefix,
+                                 "cut_type");
+   if(lookup)
+   {
+      theCutType = OSSIM_POLY_NULL_INSIDE;
+      ossimString test = lookup;
+      if(test == "null_outside")
+      {
+         theCutType = OSSIM_POLY_NULL_OUTSIDE;
+      }
+   }
+   else
+   {
+      theCutType = OSSIM_POLY_NULL_OUTSIDE;
+   }
+
+   computeBoundingRect();
+
+   
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
+void ossimPolyCutter::setPolygon(const vector<ossimDpt>& polygon,
+                                 ossim_uint32 index)
+{
+   if(index < polygon.size())
+   {
+      thePolygonList[index] = polygon;
+
+      computeBoundingRect();
+   }
+
+}
+
+void ossimPolyCutter::setPolygon(const vector<ossimIpt>& polygon,
+                                 ossim_uint32 index)
+{
+   if(polygon.size())
+   {
+      thePolygonList[index] = polygon;
+      computeBoundingRect();
+   }
+}
+
+void ossimPolyCutter::addPolygon(const vector<ossimIpt>& polygon)
+{
+   thePolygonList.push_back(ossimPolygon(polygon));
+   computeBoundingRect();
+}
+
+void ossimPolyCutter::addPolygon(const vector<ossimDpt>& polygon)
+{
+   thePolygonList.push_back(ossimPolygon(polygon));
+   computeBoundingRect();
+}
+
+void ossimPolyCutter::addPolygon(const ossimPolygon& polygon)
+{
+   thePolygonList.push_back(ossimPolygon(polygon));
+   computeBoundingRect();
+}
+
+
+void ossimPolyCutter::setCutType(ossimPolyCutterCutType cutType)
+{
+   theCutType = cutType;
+}
+
+ossimPolyCutter::ossimPolyCutterCutType ossimPolyCutter::getCutType()const
+{
+   return theCutType;
+}
+
+void ossimPolyCutter::clear()
+{
+   setNumberOfPolygons(0);
+}
+
+void ossimPolyCutter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   ossimImageSourceFilter::setProperty(property);
+}
+
+ossimRefPtr<ossimProperty> ossimPolyCutter::getProperty(const ossimString& name)const
+{
+
+   return ossimImageSourceFilter::getProperty(name);
+}
+
+void ossimPolyCutter::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageSourceFilter::getPropertyNames(propertyNames);
+} 
+
+void ossimPolyCutter::computeBoundingRect()
+{
+   ossimIrect bounds;
+   theBoundingRect.makeNan();
+
+   for(int i = 0; i < (int)thePolygonList.size(); ++i)
+   {
+      thePolygonList[i].getBoundingRect(bounds);
+
+      if(!bounds.hasNans())
+      {
+         if(theBoundingRect.hasNans())
+         {
+            theBoundingRect = bounds;
+         }
+         else
+         {
+            theBoundingRect = theBoundingRect.combine(bounds);
+         }
+      }
+   }
+}
+
+const ossimIrect& ossimPolyCutter::getRectangle() const
+{
+   return theBoundingRect;
+}
+
+void ossimPolyCutter::setRectangle(const ossimIrect& rect)
+{
+   theBoundingRect = rect;
+   m_boundingOverwrite = true;
+}
+
+void ossimPolyCutter::setNumberOfPolygons(ossim_uint32 count)
+{
+   if(!count)
+   {
+      thePolygonList.clear();
+      thePolygonList.clear();
+   }
+   else
+   {
+      thePolygonList.resize(count);
+   }
+}
+
+std::vector<ossimPolygon>& ossimPolyCutter::getPolygonList()
+{
+   return thePolygonList;
+}
+
+const std::vector<ossimPolygon>& ossimPolyCutter::getPolygonList()const
+{
+   return thePolygonList;
+}
+
+
diff --git a/ossim/src/ossim/imaging/ossimQbTileFilesHandler.cpp b/ossim/src/ossim/imaging/ossimQbTileFilesHandler.cpp
new file mode 100644
index 0000000..5c37e1b
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimQbTileFilesHandler.cpp
@@ -0,0 +1,291 @@
+//*************************************************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Oscar Kramer
+//
+// Description: Image handler used for tiled Quickbird imagery. 
+//
+//*************************************************************************************************
+//  $Id: ossimQbTileFilesHandler.cpp 2814 2011-07-05 13:40:16Z oscar.kramer $
+
+#include <ossim/imaging/ossimQbTileFilesHandler.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimRegExp.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimPolygon.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimTiffOverviewBuilder.h>
+#include <ossim/imaging/ossimTiffTileSource.h>
+#include <ossim/support_data/ossimQuickbirdTile.h>
+#include <ossim/projection/ossimQuickbirdRpcModel.h>
+#include <algorithm>
+
+RTTI_DEF1(ossimQbTileFilesHandler, "ossimQbTileFilesHandler", ossimTiledImageHandler)
+
+// Static trace for debugging
+static ossimTrace traceDebug("ossimQbTileFilesHandler:debug");
+
+//*************************************************************************************************
+//!  Constructor (default):
+//*************************************************************************************************
+ossimQbTileFilesHandler::ossimQbTileFilesHandler()
+{
+}
+
+//*************************************************************************************************
+//! Destructor:
+//*************************************************************************************************
+ossimQbTileFilesHandler::~ossimQbTileFilesHandler()
+{
+}
+
+//*************************************************************************************************
+//! Opens the image file given entry index. This class does not support multiple entries.
+//! @param imageFile File to open.
+//! @param entryIndex
+//! @return false if entry index other than 0 specified.
+//*************************************************************************************************
+bool ossimQbTileFilesHandler::open()
+{
+   static const char* MODULE = "ossimQbTileFilesHandler::open() -- ";
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_INFO)
+         <<MODULE << "Entering...\nimage: " << theImageFile << "\n";
+   }
+   
+   // Test for extension: image.til
+   ossimString ext = theImageFile.ext().downcase();
+   if ( ext == "ovr" )
+   {
+      return false; // Don't try to open overviews.
+   }
+   
+   ossimRegExp regExp("^[t|T][i|I][l|L]");
+   if ( regExp.find( ext.c_str() ) )
+   {
+      if (!theImageFile.exists())
+      {
+         return false;
+      }
+   }
+      
+   // Use ossimQuickbirdTile object for parsing the TIL file and fetching the data structure 
+   // containing tile-file info:
+   if (traceDebug())
+      ossimNotify(ossimNotifyLevel_INFO)<<MODULE<<"OPENING ossimQuickbirdTile..."<<std::endl;
+   
+   ossimQuickbirdTile qbt;
+   bool success = qbt.open(theImageFile);
+   if (!success)
+      return false;
+   
+   // Populate our own data structure given the QBT map:
+   ossimFilename image_dir (theImageFile.path());
+   const ossimQuickbirdTile::TileMap& qbtTileMap = qbt.getMap();
+
+   m_fullImgRect.makeNan();
+   ossimIrect subImageRect;
+   ossimQuickbirdTile::TileMap::const_iterator qbt_iter = qbtTileMap.begin();
+   ossimImageHandlerRegistry* factory = ossimImageHandlerRegistry::instance();
+   while (qbt_iter != qbtTileMap.end())
+   {
+      ossimQuickbirdTileInfo info ((*qbt_iter).second);
+      ossimTileFile tilefile;
+      tilefile.tileFilename = (*qbt_iter).second.theFilename;
+      tilefile.tileFilename.setPath(image_dir);
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_INFO)<<MODULE<<"Using factory to open <"
+            <<tilefile.tileFilename<<">"<<std::endl;
+      }
+
+      // Now open up the handlers for this tile-file:
+      tilefile.imageHandler = factory->open(tilefile.tileFilename);
+      if (tilefile.imageHandler.valid())
+      {
+         // Valid handler, populate remaining items of interest and push it on our list...
+         // Fetch image coordinates in full-view:
+         subImageRect.set_ulx((*qbt_iter).second.theUlXOffset);
+         subImageRect.set_uly((*qbt_iter).second.theUlYOffset);
+         subImageRect.set_lrx((*qbt_iter).second.theLrXOffset);
+         subImageRect.set_lry((*qbt_iter).second.theLrYOffset);
+         tilefile.subImageRects.push_back(subImageRect);
+
+         // Update bounding image rectangle:
+         m_fullImgRect = m_fullImgRect.combine(subImageRect);
+         m_tileFiles.push_back(tilefile);
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_INFO)<<MODULE<<"Pushed <"<<tilefile.tileFilename<<"> on"
+               "to tile-files list."<<std::endl;
+         }
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)<<MODULE<<"TIL file listed <"
+            <<tilefile.tileFilename<<"> as one of the tiles, but the file could not be opened. "
+            <<"This is being ignored but may cause a problem downstream."<<std::endl;
+      }
+   
+      ++qbt_iter;   
+   }
+
+   // Need to check the full-image rect for validity. May need to explore the .IMD file if this 
+   // was not properly initialized:
+   if (m_fullImgRect.hasNans())
+   {
+      if (!computeImageRects())
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_INFO)<<MODULE<<"Could not establish image rectangles."
+               <<std::endl;
+         }
+         return false;
+      }
+   }
+
+   if (traceDebug())
+      ossimNotify(ossimNotifyLevel_INFO)<<MODULE<<"Finished loading tiles."<<std::endl;
+
+   bool open_good = false;
+   if ((m_tileFiles.size() != 0) && m_tileFiles[0].imageHandler.valid())
+   {
+      completeOpen();
+      open_good = true;
+      
+      if (traceDebug())
+         ossimNotify(ossimNotifyLevel_INFO)<<MODULE<<"Open successful."<<std::endl;
+   }
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_INFO)<<MODULE<<"Returning with <"
+         <<ossimString::toString(open_good)<<">"<<std::endl;
+   }
+   return open_good;
+}
+
+//*************************************************************************************************
+//! Fetch the tile-files common RPC data file and create the projection for this image
+//*************************************************************************************************
+ossimRefPtr<ossimImageGeometry> ossimQbTileFilesHandler::getImageGeometry()
+{
+   // Try external geom first:
+   theGeometry = getExternalImageGeometry();
+   if (theGeometry.valid())
+      return theGeometry;  // We should return here.
+   
+   // The dataset is expected to have an RPC model associated with it:
+   ossimRefPtr<ossimQuickbirdRpcModel> model = new ossimQuickbirdRpcModel(this);
+   if (!model->getErrorStatus())
+   {
+      theGeometry = new ossimImageGeometry;
+      theGeometry->setProjection(model.get());
+      
+      // Set image things the geometry object should know about.
+      initImageParameters( theGeometry.get() );
+
+      return theGeometry;
+   }
+   return ossimRefPtr<ossimImageGeometry>();
+}
+
+//*************************************************************************************************
+//! Initializes tile image rects by considering adjacent row/col offsets. Called when TIL
+//! doesn't contain the info. Returns true if successful.
+//*************************************************************************************************
+bool ossimQbTileFilesHandler::computeImageRects()
+{
+   try
+   {
+      ossimQuickbirdMetaData oqmd;
+      if (!oqmd.open(theImageFile))
+         throw 1;
+
+      ossimIpt image_size (oqmd.getImageSize());
+      if (image_size.hasNans())
+         throw 2;
+
+      ossimIpt full_image_lr (image_size.x-1, image_size.y-1);
+      m_fullImgRect.set_ulx(0);
+      m_fullImgRect.set_uly(0);
+      m_fullImgRect.set_lr(full_image_lr);
+
+      // Now consider the subrects for each tile. It is assumed that all tiles (except right
+      // and bottom) will be of uniform size. The TIL file should have at least provided the row
+      // and column offsets for each tile into the full image. This is equivalent to the UL corner.
+      // It is presumed that the TIL failed to provide the LR corner since this method was called.
+      int dx=0, dy=0, i=0;
+      int num_tiles = (int) m_tileFiles.size();
+      while (((dx == 0) || (dy == 0)) && (i < num_tiles-1))
+      {
+         if (dx == 0)
+            dx = m_tileFiles[i+1].subImageRects[0].ul().x - m_tileFiles[i].subImageRects[0].ul().x;
+         if (dy == 0)
+            dy = m_tileFiles[i+1].subImageRects[0].ul().y - m_tileFiles[i].subImageRects[0].ul().y;
+         ++i;
+      }
+
+      // We should have the nominal tile size now. Check this is so:
+      if ((dx == 0) || (dy == 0))
+      {
+         // Prior scheme failed for establishing the tile dimensions. Final resort is to open the first
+         // available tile file and query its dimensions:
+         if (num_tiles == 0)
+            throw 3;
+         if (m_tileFiles[0].imageHandler.valid())
+         {
+            // we have an open handler, so just query it:
+            dy = m_tileFiles[0].imageHandler->getNumberOfLines();
+            dx = m_tileFiles[0].imageHandler->getNumberOfSamples();
+         }
+         else
+         {
+            // Struck out, just assume the tile is square:
+            if ((dx == 0) && (dy == 0))
+               throw 4;
+            if (dy == 0)
+               dy = dx;
+            else
+               dx = dy;
+         }
+      }
+
+      // Loop over all tiles to properly assign their image rectangles:
+      for (i=0; i<num_tiles; i++)
+      {
+         ossimIpt ul (m_tileFiles[i].subImageRects[0].ul());
+         ossimIpt lr (ul.x + dx - 1, ul.y + dy - 1);
+
+         // Check to make sure we don't exceed extents of full image:
+         if (lr.x > full_image_lr.x)
+            lr.x = full_image_lr.x;
+         if (lr.y > full_image_lr.y)
+            lr.y = full_image_lr.y;
+
+         m_tileFiles[i].subImageRects[0].set_lr(lr);
+      }
+   }
+   
+   catch (...)
+   {
+      // Could not establish the rectangles:
+      return false;
+   }
+
+   return true;
+}
+
+
diff --git a/ossim/src/ossim/imaging/ossimQuickbirdNitfTileSource.cpp b/ossim/src/ossim/imaging/ossimQuickbirdNitfTileSource.cpp
new file mode 100644
index 0000000..f6a25b6
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimQuickbirdNitfTileSource.cpp
@@ -0,0 +1,168 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+//*******************************************************************
+//  $Id: ossimQuickbirdNitfTileSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimQuickbirdNitfTileSource.h>
+#include <ossim/support_data/ossimQuickbirdTile.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossim2dTo2dShiftTransform.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/support_data/ossimNitfImageHeader.h>
+
+RTTI_DEF1(ossimQuickbirdNitfTileSource, "ossimQuickbirdNitfTileSource", ossimNitfTileSource);
+
+static const ossimTrace traceDebug("ossimQuickbirdNitfTileSource:debug");
+
+bool ossimQuickbirdNitfTileSource::open()
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimQuickbirdNitfTileSource::open(file) DEBUG: entered ..."
+         << std::endl;
+   }
+   
+   ossimFilename file = theImageFile;
+   file = file.replaceAllThatMatch("_R[0-9]+C[0-9]+");
+   ossimQuickbirdTile tileFile;
+   bool openedTileFile = false;
+   file.setExtension("TIL");
+   
+   if(!tileFile.open(file))
+   {
+      file.setExtension("TIL");
+      if(tileFile.open(file))
+      {
+         openedTileFile = true;
+      }
+      else
+      {
+         file.setExtension("til");
+         if(tileFile.open(file))
+         {
+            openedTileFile = true;
+         }
+      }
+   }
+   else
+   {
+      openedTileFile = true;
+   }
+   
+   if(openedTileFile)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimQuickbirdNitfTileSource::open(file) DEBUG:"
+            << "\nOpened tile file" << std::endl;
+      }
+
+      // Call the base class open...
+      if(!ossimNitfTileSource::open())
+      {
+         return false;
+      }
+      
+      ossimQuickbirdTileInfo info;
+      ossimIrect tempBounds = getCurrentImageHeader()->getImageRect();
+      
+      
+      tempBounds = ossimIrect(0,
+                              0,
+                              tempBounds.width() - 1,
+                              tempBounds.height() - 1);
+      
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimQuickbirdNitfTileSource::open(file) DEBUG:"
+            << "\nheader rectangle = " << tempBounds << std::endl;
+      }
+      
+      ossimIpt ulPt;
+      ossimIpt urPt;
+      ossimIpt lrPt;
+      ossimIpt llPt;
+      ossimDpt shift;
+      if(tileFile.getInfo(info, theImageFile.file().upcase()))
+      {
+         ulPt.makeNan();
+         urPt.makeNan();
+         lrPt.makeNan();
+         llPt.makeNan();
+         
+         if((info.theUlXOffset != OSSIM_INT_NAN) &&
+            (info.theUlYOffset != OSSIM_INT_NAN))
+         {
+            shift = ossimIpt(info.theUlXOffset, info.theUlYOffset);
+         }
+         else
+         {
+            shift = ossimIpt(0,0);
+         }
+         m_transform = new ossim2dTo2dShiftTransform(shift);
+      }
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimQuickbirdNitfTileSource::open(file) DEBUG:"
+            << "\nUl = " << ulPt
+            << "\nUr = " << urPt
+            << "\nLr = " << lrPt
+            << "\nLl = " << llPt
+            << "\ntheImageRect:  " << getImageRectangle(0)
+            << "\nExiting..." 
+            << std::endl;
+      }
+   }
+   else
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimQuickbirdNitfTileSource::open(file) DEBUG"
+            << "Not opened..."
+            << std::endl;
+      }
+   }
+   
+   return openedTileFile;
+}
+
+ossimRefPtr<ossimImageGeometry> ossimQuickbirdNitfTileSource::getImageGeometry()
+{
+   ossimRefPtr<ossimImageGeometry> result = ossimImageHandler::getImageGeometry();
+   if( result.valid() )
+   {
+      if(!result->getTransform())
+      {
+         result->setTransform(m_transform.get());
+      }
+   }
+   return result;
+}
+
+bool ossimQuickbirdNitfTileSource::saveState(ossimKeywordlist& kwl,
+                                             const char* prefix)const
+{
+   return ossimNitfTileSource::saveState( kwl, prefix );
+}
+
+bool ossimQuickbirdNitfTileSource::loadState(const ossimKeywordlist& kwl,
+                                            const char* prefix)
+   
+{
+   return ossimNitfTileSource::loadState( kwl, prefix );
+}
+
diff --git a/src/ossim/imaging/ossimQuickbirdTiffTileSource.cpp b/ossim/src/ossim/imaging/ossimQuickbirdTiffTileSource.cpp
similarity index 100%
rename from src/ossim/imaging/ossimQuickbirdTiffTileSource.cpp
rename to ossim/src/ossim/imaging/ossimQuickbirdTiffTileSource.cpp
diff --git a/ossim/src/ossim/imaging/ossimRLevelFilter.cpp b/ossim/src/ossim/imaging/ossimRLevelFilter.cpp
new file mode 100644
index 0000000..7056895
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimRLevelFilter.cpp
@@ -0,0 +1,235 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimRLevelFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimRLevelFilter.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/base/ossimTrace.h>
+
+static const char* CURRENT_RLEVEL_KW    = "current_rlevel";
+static const char* OVERRIDE_GEOMETRY_KW = "override_geometry";
+
+static ossimTrace traceDebug("ossimRLevelFilter:debug");
+
+RTTI_DEF1(ossimRLevelFilter, "ossimRLevelFilter", ossimImageSourceFilter);
+
+//**************************************************************************************************
+ossimRLevelFilter::ossimRLevelFilter()
+   : ossimImageSourceFilter(),
+     theCurrentRLevel(0),
+     theOverrideGeometryFlag(false)
+{
+}
+
+//**************************************************************************************************
+ossimRLevelFilter::~ossimRLevelFilter()
+{
+}
+
+//**************************************************************************************************
+void ossimRLevelFilter::getDecimationFactor(ossim_uint32 resLevel,
+                                            ossimDpt& result) const
+{
+   if(!theInputConnection)
+   {
+      result.makeNan();
+   }
+
+   theInputConnection->getDecimationFactor(resLevel,
+                                           result);
+}
+
+//**************************************************************************************************
+bool ossimRLevelFilter::getOverrideGeometryFlag() const
+{
+   return theOverrideGeometryFlag;
+}
+
+//**************************************************************************************************
+void ossimRLevelFilter::setOverrideGeometryFlag(bool override)
+{
+   theOverrideGeometryFlag = override;
+}
+
+//**************************************************************************************************
+void ossimRLevelFilter::setCurrentRLevel(ossim_uint32 rlevel)
+{
+   theCurrentRLevel = rlevel;
+   updateGeometry();
+}
+
+//**************************************************************************************************
+ossim_uint32 ossimRLevelFilter::getCurrentRLevel()const
+{
+   return theCurrentRLevel;
+}
+
+//**************************************************************************************************
+// Returns a pointer reference to the active image geometry at this filter. The input source
+// geometry is modified, so we need to maintain our own geometry object as a data member.
+//**************************************************************************************************
+ossimRefPtr<ossimImageGeometry> ossimRLevelFilter::getImageGeometry()
+{
+   // Have we already defined our own geometry? Return it if so:
+   if (m_ScaledGeometry.valid()) return m_ScaledGeometry;
+
+   if (!theInputConnection) return ossimRefPtr<ossimImageGeometry>();
+
+   ossim_uint32 rlevel = getCurrentRLevel();
+   ossimRefPtr<ossimImageGeometry> inputGeom = theInputConnection->getImageGeometry();
+
+   // If no scaling is happening, just return the input image geometry:
+   if ((!inputGeom) || (rlevel == 0) || (getEnableFlag() == false))
+      return inputGeom;
+
+   // Need to create a copy of the input geom and modify it as our own, then pass that:
+   m_ScaledGeometry = new ossimImageGeometry(*inputGeom);
+   updateGeometry();
+
+   // Return our version of the image geometry:
+   return m_ScaledGeometry;
+}
+
+//**************************************************************************************************
+//! If this object is maintaining an ossimImageGeometry, this method needs to be called after 
+//! a scale change so that the geometry's projection is modified accordingly.
+//**************************************************************************************************
+void ossimRLevelFilter::updateGeometry()
+{
+   if (m_ScaledGeometry.valid())
+   {
+      // Modify the image geometry's projection with the scale factor before returning geom:
+      ossimProjection* proj = m_ScaledGeometry->getProjection();
+      ossimMapProjection* mapProj = PTR_CAST(ossimMapProjection, proj);;
+      if(mapProj)
+      {
+         ossimDpt decimation;
+         getDecimationFactor(theCurrentRLevel, decimation);
+         decimation.x = 1.0/decimation.x;
+         decimation.y = 1.0/decimation.y;
+
+         // This will adjust both the scale and the tie point to account for decimation.
+         mapProj->applyScale(decimation, true);  // recenter tie point flag
+      }
+   }
+}
+
+//**************************************************************************************************
+void ossimRLevelFilter::getSummedDecimation(ossimDpt& result) const
+{
+   // Start with fresh values.
+   result.x = 0.0;
+   result.y = 0.0;
+
+   ossim_uint32 rlevel = getCurrentRLevel();
+
+   if (rlevel == 0)
+   {
+      return; // no decimation.
+   }
+
+   // Sum the decimations from rlevel one to the current rlevel.
+   for (ossim_uint32 i = 1; i <= rlevel; ++i)
+   {
+      ossimDpt dpt;
+      getDecimationFactor(i, dpt);
+      if (dpt.hasNans())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimRLevelFilter::getSummedDecimation WARNING:"
+            << "\nNans returned from getDecimationFactor!"
+            << std::endl;
+         result.makeNan();
+         return;
+      }
+      result.x += dpt.x;
+      result.y += dpt.y;
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimRLevelFilter::getSummedDecimation result: " << result
+         << std::endl;
+   }
+}
+
+//**************************************************************************************************
+ossimIrect ossimRLevelFilter::getBoundingRect(ossim_uint32 resLevel)const
+{
+   ossimIrect rect;
+   rect.makeNan();
+   if(!theInputConnection) return rect;
+
+   if (isSourceEnabled())
+   {
+      return theInputConnection->getBoundingRect(theCurrentRLevel);
+   }
+   return theInputConnection->getBoundingRect(resLevel);
+}
+
+//**************************************************************************************************
+ossimRefPtr<ossimImageData> ossimRLevelFilter::getTile(
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   if(!theInputConnection)
+   {
+      return 0;
+   }
+
+   if(!isSourceEnabled())
+   {
+      return theInputConnection->getTile(tileRect, resLevel);
+   }
+
+   // Ignoring resLevel as we're in charge of it here!
+   return theInputConnection->getTile(tileRect, theCurrentRLevel);
+}
+
+//**************************************************************************************************
+bool ossimRLevelFilter::loadState(const ossimKeywordlist& kwl,
+                                  const char* prefix)
+{
+   const char* current  = kwl.find(prefix, CURRENT_RLEVEL_KW);
+   const char* override = kwl.find(prefix, OVERRIDE_GEOMETRY_KW);
+
+   if(current)
+      theCurrentRLevel = ossimString(current).toULong();
+
+   if(override)
+      theOverrideGeometryFlag = ossimString(override).toBool();
+
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+
+   // An existing image geometry object here will need to be updated:
+   updateGeometry();
+}
+
+//**************************************************************************************************
+bool ossimRLevelFilter::saveState(ossimKeywordlist& kwl,
+                                  const char* prefix)const
+{
+   kwl.add(prefix,
+           CURRENT_RLEVEL_KW,
+           theCurrentRLevel,
+           true);
+
+   kwl.add(prefix,
+           OVERRIDE_GEOMETRY_KW,
+           (ossim_uint32)theOverrideGeometryFlag,
+           true);
+
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
diff --git a/ossim/src/ossim/imaging/ossimRangeDomeTileSource.cpp b/ossim/src/ossim/imaging/ossimRangeDomeTileSource.cpp
new file mode 100644
index 0000000..ef48671
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimRangeDomeTileSource.cpp
@@ -0,0 +1,392 @@
+/*
+ * ossimRangeDomeTileSource.cpp
+ *
+ *  Created on: Aug 3, 2015
+ *      Author: okramer
+ */
+
+#include <ossim/imaging/ossimRangeDomeTileSource.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <iostream>
+
+using namespace std;
+
+RTTI_DEF1(ossimRangeDomeTileSource, "ossimRangeDomeTileSource", ossimImageHandler);
+
+const char* OSSIM_RANGE_DOME_SPEC_MAGIC_NUMBER = "OSSIM_RANGE_DOMES";
+
+ossimRangeDome::ossimRangeDome(vector<ossimString>& tokens)
+: valid (false),
+  id (0),
+  radiusMeters (0),
+  radiusPixelsSq (0),
+  classification (UNASSIGNED),
+  startAz (0),
+  endAz (0)
+{
+   if ((tokens.size() < 6) || (tokens[0].size() && (tokens[0].chars()[0] == '#')))
+      return;
+
+   ossim_uint32 i = 0;
+   id             = tokens[i++].toUInt32();
+   centerGpt.lat  = tokens[i++].toDouble();
+   centerGpt.lon  = tokens[i++].toDouble();
+   centerGpt.hgt  = tokens[i++].toDouble();
+   radiusMeters   = tokens[i++].toDouble();
+   classification = (Classification) tokens[i++].toInt32();
+   valid = true;
+
+   if (tokens.size() >= 8)
+   {
+      startAz = tokens[i++].toDouble();
+      endAz = tokens[i++].toDouble();
+      if (endAz == 360.0)
+         endAz = 0.0;
+   }
+
+   if ( tokens.size()-i )
+   {
+      description = tokens[i];
+      description.trim();
+   }
+}
+
+ossimGrect ossimRangeDome::boundingRect() const
+{
+   ossimDpt scale = centerGpt.metersPerDegree();
+   double dlat = radiusMeters/scale.y;
+   double dlon = radiusMeters/scale.x;
+   return ossimGrect(centerGpt.lat+dlat, centerGpt.lon-dlon,
+                     centerGpt.lat-dlat, centerGpt.lon+dlon);
+}
+
+ossimRangeDomeTileSource::ossimRangeDomeTileSource()
+:  m_gsd(1.0, 1.0) // default GSD
+{
+}
+
+
+ossimRangeDomeTileSource::~ossimRangeDomeTileSource()
+{
+   close();
+}
+
+
+bool ossimRangeDomeTileSource::open()
+{
+   if (!theImageFile.isReadable())
+   {
+      ossimNotify(ossimNotifyLevel_WARN)<<"ossimRangeDomeTileSource::open() -- Error. Coould not"
+            " open CSV file at <"<<theImageFile<<">" << endl;
+      return false;
+   }
+
+   ossimString dome_spec;
+   vector<ossimString> tokens;
+
+   // Open the CSV and check proper file type:
+   ifstream indata (theImageFile.chars());
+   getline(indata, dome_spec);
+   dome_spec.split(tokens, " ", false);
+   if ((tokens.size() < 2) || !tokens[0].contains(OSSIM_RANGE_DOME_SPEC_MAGIC_NUMBER))
+      return false;
+
+   // loop over each record/dome spec:
+   while (indata.good())
+   {
+      tokens.clear();
+      getline(indata, dome_spec);
+      dome_spec.split(tokens, ",", true);
+      ossimRangeDome dome (tokens);
+      if (dome.valid)
+         m_rangeDomes.push_back(dome);
+   }
+
+   // The GSD may be incorrect, but init anyway then redo whe GSD is set:
+   initialize();
+
+   return isOpen();
+}
+
+void ossimRangeDomeTileSource::initialize()
+{
+   if (!isOpen())
+      return;
+
+   // Establish bounding rect:
+   ossimGrect boundingRect;
+   boundingRect.makeNan();
+   vector<ossimRangeDome>::iterator dome = m_rangeDomes.begin();
+   while (dome != m_rangeDomes.end())
+   {
+      boundingRect.expandToInclude(dome->boundingRect());
+      ++dome;
+   }
+
+   // Set up the geometry:
+   ossimRefPtr<ossimMapProjection> mapProj = new ossimEquDistCylProjection();
+   mapProj->setOrigin(boundingRect.midPoint());
+   mapProj->setMetersPerPixel(m_gsd);
+   ossimDpt degPerPixel (mapProj->getDecimalDegreesPerPixel());
+   mapProj->setElevationLookupFlag(false);
+   mapProj->setUlTiePoints(boundingRect.ul());
+   ossimIpt image_size(boundingRect.width()/degPerPixel.x, boundingRect.height()/degPerPixel.y);
+   theGeometry = new ossimImageGeometry(0, mapProj.get());
+   theGeometry->setImageSize(image_size);
+
+   // Transform the domes to image space coordinates:
+   dome = m_rangeDomes.begin();
+   double r;
+   while (dome != m_rangeDomes.end())
+   {
+      theGeometry->worldToLocal(dome->centerGpt, dome->centerIpt);
+      r = dome->radiusMeters/m_gsd.x;
+      dome->radiusPixelsSq = r*r;
+      ++dome;
+   }
+}
+
+
+bool ossimRangeDomeTileSource::isOpen() const
+{
+   return (!m_rangeDomes.empty());
+}
+
+
+void ossimRangeDomeTileSource::close()
+{
+   m_rangeDomes.clear();
+   theGeometry = 0;
+}
+
+
+ossimRefPtr<ossimImageData> ossimRangeDomeTileSource::getTile(const ossimIrect& rect,
+                                                              ossim_uint32 resLevel)
+{
+   ossimRefPtr<ossimImageData> tile = ossimImageDataFactory::instance()->create(this, this);
+
+   tile->setImageRectangle(rect);
+   tile->initialize();
+
+   getTile(tile.get(), resLevel);
+
+   return tile;
+}
+
+
+bool ossimRangeDomeTileSource::getTile(ossimImageData* result, ossim_uint32 resLevel)
+{
+   if (!result || !theGeometry.valid())
+      return false;
+
+   // Start with null fill:
+   result->fill(getNullPixelValue());
+
+   // Verify intersection with dataset. Everything done in R0 space:
+   ossimIrect tile_rect (result->getImageRectangle());
+   ossim_uint32 coord_scale = resLevel + 1;
+   ossimIrect tile_rect_r0 (coord_scale*tile_rect);
+   ossimIrect boundingImgRect;
+   theGeometry->getBoundingRect(boundingImgRect);
+
+   if (!tile_rect_r0.intersects(boundingImgRect))
+   {
+      result->setDataObjectStatus(OSSIM_EMPTY);
+      return true;
+   }
+
+   vector<ossimRangeDome>::iterator dome;
+   double d2, x0, y0, dx, dy, az;
+
+   // Nested loop over all pixels in tile:
+   for (ossim_int32 yn=tile_rect.ul().y; yn<=tile_rect.lr().y; ++yn)
+   {
+      y0 = yn * coord_scale;
+
+      for (ossim_int32 xn=tile_rect.ul().x; xn<=tile_rect.lr().x; ++xn)
+      {
+         x0 = xn * coord_scale;
+
+         // Loop over each dome in the list to see if this pixel is affected:
+         dome = m_rangeDomes.begin();
+         while (dome != m_rangeDomes.end())
+         {
+            // Check distance to center:
+            dx = x0 - dome->centerIpt.x;
+            dy = y0 - dome->centerIpt.y;
+            d2 = dx*dx + dy*dy;
+
+            if (d2 > dome->radiusPixelsSq)
+            {
+               ++dome;
+               continue;
+            }
+
+            // Passed range test, do azimuth test. First check for simple 360 dome:
+            if (dome->startAz == dome->endAz)
+            {
+               result->setValue(xn, yn, (ossim_uint8) dome->classification);
+               ++dome;
+               continue;
+            }
+
+            // Need full azimuth test:
+            az = ossim::atan2d(dx, -dy);
+            if (az < 0)
+               az += 360;
+            if (((dome->startAz < dome->endAz) && (az >= dome->startAz) && (az <= dome->endAz)) ||
+                ((dome->startAz > dome->endAz) && (
+                     ((az >= dome->startAz) && (az > dome->endAz)) ||
+                     ((az < dome->startAz) && (az <= dome->endAz)))))
+            {
+               result->setValue(xn, yn, (ossim_uint8) dome->classification);
+            }
+            ++dome;
+         }
+      }
+   }
+
+   result->validate();
+   return true;
+}
+
+
+ossim_uint32 ossimRangeDomeTileSource::getNumberOfInputBands() const
+{
+   return 1;
+}
+
+
+ossim_uint32 ossimRangeDomeTileSource::getNumberOfLines(ossim_uint32 resLevel) const
+{
+   if (theGeometry.valid())
+      return ( theGeometry->getImageSize().y / (resLevel+1) );
+   return 0;
+}
+
+
+ossim_uint32 ossimRangeDomeTileSource::getNumberOfSamples(ossim_uint32 resLevel) const
+{
+   if (theGeometry.valid())
+      return ( theGeometry->getImageSize().x / (resLevel+1) );
+   return 0;
+}
+
+
+bool ossimRangeDomeTileSource::saveState(ossimKeywordlist& kwl, const char* prefix) const
+{
+   static const char MODULE[] = "ossimRangeDomeTileSource::saveState()";
+
+   ossimImageHandler::saveState(kwl, prefix);
+   if (kwl.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << MODULE
+            << " ERROR detected in keyword list!  State not saved." << std::endl;
+      return false;
+   }
+
+   kwl.add(prefix, ossimKeywordNames::METERS_PER_PIXEL_KW, m_gsd.x, true);
+
+   return true;
+}
+
+
+bool ossimRangeDomeTileSource::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   static const char MODULE[] = "ossimRangeDomeTileSource::loadState()";
+   theDecimationFactors.clear();
+
+   ossimImageHandler::loadState(kwl, prefix);
+   if (kwl.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)<< MODULE
+            << "WARNING: error detected in keyword list!  State not load." << std::endl;
+      return false;
+   }
+
+   ossimDpt gsd;
+   ossimString value = kwl.find(prefix, ossimKeywordNames::METERS_PER_PIXEL_KW);
+   if (!value.empty())
+      gsd.x = value.toDouble();
+
+   value = kwl.find(prefix, ossimKeywordNames::METERS_PER_PIXEL_Y_KW);
+   if (!value.empty())
+      setGSD(value.toDouble());
+
+   // The rest of the state is established by opening the file:
+   bool good_open = open();
+   return good_open;
+}
+
+
+void ossimRangeDomeTileSource::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if (!property.valid())
+      return;
+
+   ossimString s;
+   property->valueToString(s);
+   if (s.empty())
+      return;
+
+   // The user should select either explicit GSD or relative GSD factor, never both:
+   if ( property->getName() == ossimKeywordNames::METERS_PER_PIXEL_KW )
+   {
+      ossim_float64 gsd = s.toFloat64();
+      if (!ossim::isnan(gsd))
+         setGSD(gsd);
+   }
+   else
+   {
+      ossimImageHandler::setProperty(property);
+   }
+}
+
+
+ossimRefPtr<ossimProperty> ossimRangeDomeTileSource::getProperty(const ossimString& name) const
+{
+   ossimRefPtr<ossimProperty> prop = 0;
+   if ( name == ossimKeywordNames::METERS_PER_PIXEL_KW )
+   {
+      ossimString value = ossimString::toString(m_gsd.x);
+      prop = new ossimStringProperty(name, value);
+   }
+   else
+   {
+      prop = ossimImageHandler::getProperty(name);
+   }
+   return prop;
+}
+
+
+
+void ossimRangeDomeTileSource::getGSD(ossimDpt& gsd, ossim_uint32 resLevel) const
+{
+   gsd.x =(1.0/(resLevel+1)) * m_gsd.x;
+   gsd.y =(1.0/(resLevel+1)) * m_gsd.y;
+}
+
+
+void ossimRangeDomeTileSource::setGSD( const ossim_float64& gsd )
+{
+   if (gsd == m_gsd.x)
+      return;
+
+   m_gsd.x = gsd;
+   m_gsd.y = gsd;
+
+   initialize();
+}
+
+
+
diff --git a/ossim/src/ossim/imaging/ossimReadmeFileWriter.cpp b/ossim/src/ossim/imaging/ossimReadmeFileWriter.cpp
new file mode 100644
index 0000000..4172cef
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimReadmeFileWriter.cpp
@@ -0,0 +1,455 @@
+//*******************************************************************
+// Copyright (C) 2003 Storage Area Networks, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Kenneth Melero (kmelero at sanz.com)
+//
+//*******************************************************************
+//  $Id: ossimReadmeFileWriter.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimReadmeFileWriter.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimUtmProjection.h>
+#include <ossim/projection/ossimMapProjectionInfo.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <iostream>
+using namespace std;
+
+RTTI_DEF1(ossimReadmeFileWriter,
+          "ossimReadmeFileWriter",
+          ossimMetadataFileWriter)
+
+static const char DEFAULT_FILE_NAME[] = "output_readme.txt";
+static ossimTrace traceDebug("ossimReadmeFileWriter:debug");
+
+//**************************************************************************************************
+// 
+//**************************************************************************************************
+ossimReadmeFileWriter::ossimReadmeFileWriter()
+:
+ossimMetadataFileWriter()
+{
+}
+
+//**************************************************************************************************
+// 
+//**************************************************************************************************
+ossimReadmeFileWriter::~ossimReadmeFileWriter()
+{
+}
+
+//**************************************************************************************************
+// 
+//**************************************************************************************************
+bool ossimReadmeFileWriter::writeFile()
+{
+   static const char MODULE[] = "ossimReadmeFileWriter::writeFile";
+
+   if(!theInputConnection)
+   {
+      if (traceDebug())
+      {
+         CLOG << "DEBUG:"
+              << "\nNo input connection!  Returning..."
+              << endl;
+      }
+
+      return false;
+   }
+
+   std::ofstream out(theFilename.c_str(), ios_base::out);
+   if (!out)
+      return false;
+
+   // Fetch the map projection of the input image if it exists:
+   const ossimMapProjection* mapProj = 0;
+   ossimRefPtr<ossimImageGeometry> imgGeom = theInputConnection->getImageGeometry();
+   if ( imgGeom.valid() )
+   {
+      const ossimProjection* proj = imgGeom->getProjection();
+      mapProj = PTR_CAST(ossimMapProjection, proj);
+   }
+   if (!mapProj)
+   {
+      out.close();
+      return false;
+   }
+
+   ossimMapProjectionInfo* projectionInfo = new ossimMapProjectionInfo(mapProj, theAreaOfInterest);
+   if(projectionInfo)
+   {
+      out << setiosflags(ios::fixed)
+          << setiosflags(ios::left)
+          << setw(16) << "Image: "
+          << projectionInfo->getImageInfoString();
+      
+      out << setw(17) << "\nLines:"
+          << projectionInfo->linesPerImage()
+          << setw(17) << "\nSamples:"
+          << projectionInfo->pixelsPerLine()
+          << setw(17) << "\nPixel Size x:"
+          << setprecision(8) 
+          << projectionInfo->getMetersPerPixel().x 
+          << " meters";
+      
+      out << ", " 
+          << setprecision(8) 
+          << projectionInfo->getUsSurveyFeetPerPixel().x
+          << " U.S. feet";
+      
+      out << setw(17) << "\nPixel Size y:"
+          << setprecision(8) 
+          << projectionInfo->getMetersPerPixel().y 
+          << " meters";
+      
+      out << ", " 
+          << setprecision(8) 
+          << projectionInfo->getUsSurveyFeetPerPixel().y
+          << " U.S. feet";
+      
+      const ossimString type  = TYPE_NAME(mapProj);
+      const ossimString datum = mapProj->getDatum()->code();
+      const ossimString ellipsoid = mapProj->getEllipsoid().code();
+
+      if(type)
+         out << setw(17) << "\nProjection:" << type;
+
+      const ossimUtmProjection* utmProj = PTR_CAST(ossimUtmProjection, mapProj);
+      if (utmProj)
+         out << setw(17) << "\nUTM map zone:" << utmProj->getZone();
+      
+      if(datum && ellipsoid)
+         out << setw(17) << "\nDatum:"      << datum
+             << setw(17) << "\nEllipsoid:"
+             << ellipsoid;
+      
+      out << resetiosflags(ios::left) << endl;
+      
+      const ossimString NORTH = "N";
+      const ossimString SOUTH = "S";
+      const ossimString EAST  = "E";
+      const ossimString WEST  = "W";
+      
+      ossimString tmpString;
+      double tmpDouble;
+      
+      // HACK: Easiest way to get projection info for optional params is via the old keywordlist:
+      ossimKeywordlist kwl;
+      mapProj->saveState(kwl);
+      const char* parallel1   = kwl.find(ossimKeywordNames::STD_PARALLEL_1_KW);
+      const char* parallel2   = kwl.find(ossimKeywordNames::STD_PARALLEL_2_KW);
+      const char* scaleFactor = kwl.find(ossimKeywordNames::SCALE_FACTOR_KW);
+      
+      
+      ossimString proj_name = mapProj->getClassName();
+      if ( ( proj_name.contains("Lambert")           ) ||
+           ( proj_name.contains("Albers")            ) ||
+           ( proj_name.contains("TransverseMercator" ) ) )
+      {
+         double falseEasting  =  mapProj->getFalseEasting();
+         double falseNorthing =  mapProj->getFalseNorthing();
+ 
+         double origin_lat = mapProj->origin().latd();
+         tmpDouble = fabs(origin_lat);
+         tmpString = (origin_lat < 0.0) ? SOUTH : NORTH;
+         out << setiosflags(ios::left)
+             << "\n"
+             << setw(18) << "Origin Latitude:"
+             << resetiosflags(ios::left)
+             << setw(21) << setprecision(12) << tmpDouble 
+             << tmpString << endl;
+         
+         double origin_lon = mapProj->origin().lond();
+         tmpDouble = fabs(origin_lon);
+         tmpString = (origin_lon < 0.0) ? WEST : EAST;
+         out << setiosflags(ios::left)
+             << setw(18) << "Origin Longitude:"
+             << resetiosflags(ios::left)
+             << setw(21) << tmpDouble << tmpString
+             << setiosflags(ios::left)
+             << "\n"
+             << setw(23) << "False Easting:"
+             << resetiosflags(ios::left)
+             << setw(17) << setprecision(4) 
+             << falseEasting;
+         
+         out << " meters, " << setprecision(4)
+             << ossim::mtrs2usft(falseEasting) 
+             << " U.S. feet";
+         
+         out << endl;
+	 
+         out << setiosflags(ios::left)
+             << setw(23) << "False Northing:"
+             << resetiosflags(ios::left)
+             << setw(17) << setprecision(4) 
+             << falseNorthing;
+         
+         out << " meters, " << setprecision(4)
+             << ossim::mtrs2usft(falseNorthing) 
+             << " U.S. feet";
+         
+         out << endl;
+	 
+      } // End of if "Alber Lambert or TM.
+      
+      if (proj_name.contains("TransverseMercator"))
+      {
+
+         out << setiosflags(ios::left)
+             << "\n"
+             << setw(18) << "Scale Factor:"
+             << resetiosflags(ios::left)
+             << setw(21) << setprecision(10) 
+             << ossimString(scaleFactor).toDouble()
+             << "\n" << endl;
+      }
+      
+      if ( (proj_name.contains("Lambert") ) ||
+           (proj_name.contains("Albers")  ) )
+      {
+         double stdpar1 = ossimString(parallel1).toDouble();
+         tmpDouble = fabs(stdpar1);
+         tmpString = (stdpar1 < 0.0) ? SOUTH : NORTH;
+         out << setiosflags(ios::left) 
+             << setw(23) << "Standard Parallel #1:"
+             << resetiosflags(ios::left)
+             << setw(16) << setprecision(12) << tmpDouble
+             << tmpString << endl;
+         
+         double stdpar2 = ossimString(parallel2).toDouble();
+         tmpDouble = fabs(stdpar2);
+         tmpString = (stdpar2 < 0.0) ? SOUTH : NORTH;
+         out << setiosflags(ios::left)
+             << setw(23) << "Standard Parallel #2:"
+             << resetiosflags(ios::left)
+             << setw(16) << setprecision(12) 
+             << tmpDouble << tmpString
+             << "\n" << endl;
+      }
+      
+      ossimString cornerString[4] = { "Upper Left",
+                                      "Upper Right",
+                                      "Lower Right",
+                                      "Lower Left" };
+	
+      //---
+      // Add a note to the readme file stating what the corner coordinates
+      // are relative to.
+      //---
+      if (projectionInfo->getPixelType() == OSSIM_PIXEL_IS_AREA)
+      {
+         out 
+            << "\nCorner coordinates relative to outer edge of pixel.\n\n";
+      }
+      else
+      {
+         out
+            << "\nCorner coordinates relative to center of pixel.\n\n";
+      }
+      
+      out << "Corner Coordinates:\n\n";
+      
+      //---
+      // Upper Left Corner Points
+      //---
+      tmpDouble = fabs(projectionInfo->ulGroundPt().latd());
+      tmpString = (projectionInfo->ulGroundPt().latd() < 0.0) ? SOUTH : NORTH; 
+      out << cornerString[0]  << endl;
+      out << setw(14) << "Latitude:  "
+          << setw(16) << setprecision(12) << tmpDouble 
+          << tmpString << endl;
+      tmpDouble = fabs(projectionInfo->ulGroundPt().lond());
+      tmpString = (projectionInfo->ulGroundPt().lond() < 0.0) ? WEST : EAST;
+      out << setw(14) << "Longitude:  "
+          << setw(16) << tmpDouble << tmpString << endl;
+      
+      out << setw(14) << "Easting:  "
+          << setw(17) << setprecision(4) 
+          << projectionInfo->ulEastingNorthingPt().x;
+      
+      out << " meters, " << setprecision(4)
+          << ossim::mtrs2usft(projectionInfo->ulEastingNorthingPt().x)
+          << " U.S. feet";
+      
+      out << endl
+          << setw(14) << "Northing:  "
+          << setw(17) << projectionInfo->ulEastingNorthingPt().y;
+      
+      out << " meters, " << setprecision(4)
+          << ossim::mtrs2usft(projectionInfo->ulEastingNorthingPt().y)
+          << " U.S. feet";
+      
+      out << endl << endl;
+      
+      //---
+      // Upper Right Corner Points
+      //---
+      tmpDouble = fabs(projectionInfo->urGroundPt().latd());
+      tmpString = (projectionInfo->urGroundPt().latd() < 0.0) ? SOUTH : NORTH; 
+      out << cornerString[1]  << endl;
+      out << setw(14) << "Latitude:  "
+          << setw(16) << setprecision(12) << tmpDouble
+          << tmpString << endl;
+      tmpDouble = fabs(projectionInfo->urGroundPt().lond());
+      tmpString = (projectionInfo->urGroundPt().lond() < 0.0) ? WEST : EAST;
+      out << setw(14) << "Longitude:  "
+          << setw(16) << tmpDouble << tmpString << endl;
+      
+      out << setw(14) << "Easting:  "
+          << setw(17) << setprecision(4)
+          << projectionInfo->urEastingNorthingPt().x;
+      
+      out << " meters, " << setprecision(4)
+          << ossim::mtrs2usft(projectionInfo->urEastingNorthingPt().x)
+          << " U.S. feet";
+      
+      out << endl
+          << setw(14) << "Northing:  "
+          << setw(17) << projectionInfo->urEastingNorthingPt().y;
+      
+      out << " meters, " << setprecision(4)
+          << ossim::mtrs2usft(projectionInfo->urEastingNorthingPt().y)
+          << " U.S. feet";
+      
+      out << endl << endl;
+      
+      //---
+      // Lower Right Corner Points
+      //---
+      tmpDouble = fabs(projectionInfo->lrGroundPt().latd());
+      tmpString = (projectionInfo->lrGroundPt().latd() < 0.0) ? SOUTH : NORTH; 
+      out << cornerString[2]  << endl;
+      out << setw(14) << "Latitude:  "
+          << setw(16) << setprecision(12) << tmpDouble 
+          << tmpString << endl;
+      tmpDouble = fabs(projectionInfo->lrGroundPt().lond());
+      tmpString = (projectionInfo->lrGroundPt().lond() < 0.0) ? WEST : EAST;
+      out << setw(14) << "Longitude:  "
+          << setw(16) << tmpDouble << tmpString << endl;
+      
+      out << setw(14) << "Easting:  "
+          << setw(17) << setprecision(4) 
+          << projectionInfo->lrEastingNorthingPt().x;
+      
+      out << " meters, " << setprecision(4)
+          << ossim::mtrs2usft(projectionInfo->lrEastingNorthingPt().x)
+          << " U.S. feet";
+      
+      out << endl
+          << setw(14) << "Northing:  "
+          << setw(17) << projectionInfo->lrEastingNorthingPt().y;
+      
+      out << " meters, " << setprecision(4)
+          << ossim::mtrs2usft(projectionInfo->lrEastingNorthingPt().y)
+          << " U.S. feet";
+      
+      out << endl << endl;
+      
+      //---
+      // Lower Left Corner Points
+      //---
+      tmpDouble = fabs(projectionInfo->llGroundPt().latd());
+      tmpString = (projectionInfo->llGroundPt().latd() < 0.0) ? SOUTH : NORTH; 
+      out << cornerString[3]  << endl;
+      out << setw(14) << "Latitude:  "
+          << setw(16) << setprecision(12) << tmpDouble
+          << tmpString << endl;
+      tmpDouble = fabs(projectionInfo->llGroundPt().lond());
+      tmpString = (projectionInfo->llGroundPt().lond() < 0.0) ? WEST : EAST;
+      out << setw(14) << "Longitude:  "
+          << setw(16) << tmpDouble << tmpString << endl;
+      
+      out << setw(14) << "Easting:  "
+          << setw(17) << setprecision(4)
+          <<  projectionInfo->llEastingNorthingPt().x;
+      
+      out << " meters, " << setprecision(4)
+          << ossim::mtrs2usft(projectionInfo->llEastingNorthingPt().x)
+          << " U.S. feet";
+      
+      out << endl
+          << setw(14) << "Northing:  "
+          << setw(17) << projectionInfo->llEastingNorthingPt().y;
+      
+      out << " meters, " << setprecision(4)
+          << ossim::mtrs2usft(projectionInfo->llEastingNorthingPt().y)
+          << " U.S. feet";
+      
+      out << endl << endl;
+      
+      out << "Center Coordinates:\n\n";
+      
+      tmpDouble = fabs(projectionInfo->centerGroundPt().latd());
+      
+      tmpString = (projectionInfo->centerGroundPt().latd() < 0.0) ? SOUTH : NORTH;
+      
+      out << setw(14) << "Latitude:  "
+          << setw(16) << setprecision(12) << tmpDouble
+          << tmpString << endl;
+      
+      tmpDouble = fabs(projectionInfo->centerGroundPt().lond());
+      
+      tmpString = (projectionInfo->centerGroundPt().lond() < 0.0) ? WEST : EAST;
+      
+      out << setw(14) << "Longitude:  "
+          << setw(16) << tmpDouble << tmpString << endl;
+      
+      out << setw(14) << "Easting:  "
+          << setw(17) << setprecision(4)
+          << projectionInfo->centerEastingNorthingPt().x;
+      
+      out << " meters, " << setprecision(4)
+          << ossim::mtrs2usft(projectionInfo->centerEastingNorthingPt().x)
+          << " U.S. feet";
+      
+      out << endl
+          << setw(14) << "Northing:  "
+          << setw(17) << projectionInfo->centerEastingNorthingPt().y;
+      
+      out << " meters, " << setprecision(4)
+          << ossim::mtrs2usft(projectionInfo->centerEastingNorthingPt().y)
+          << " U.S. feet";
+      
+      out << endl << endl;
+      
+      out 
+         << "\nNOTE:  Lat/Lon values are in decimal degrees.";
+      
+      out 
+         << "\n       Eastings/Northings are in meters.";
+      
+      out << endl;
+      
+      delete projectionInfo;
+   }
+   
+   out.close();
+   return true;
+}
+
+//**************************************************************************************************
+// 
+//**************************************************************************************************
+void ossimReadmeFileWriter::getMetadatatypeList(std::vector<ossimString>& metadatatypeList) const
+{
+   metadatatypeList.push_back(ossimString("ossim_readme")); 
+}
+
+//**************************************************************************************************
+// 
+//**************************************************************************************************
+bool ossimReadmeFileWriter::hasMetadataType(const ossimString& metadataType) const
+{
+   return (metadataType == "ossim_readme");
+}
+
diff --git a/ossim/src/ossim/imaging/ossimRectangleCutFilter.cpp b/ossim/src/ossim/imaging/ossimRectangleCutFilter.cpp
new file mode 100644
index 0000000..64bb82a
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimRectangleCutFilter.cpp
@@ -0,0 +1,307 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimRectangleCutFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimRectangleCutFilter.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+
+static ossimTrace traceDebug("ossimRectangleCutFilter:debug");
+
+RTTI_DEF1(ossimRectangleCutFilter,
+          "ossimRectangleCutFilter",
+          ossimImageSourceFilter);
+
+ossimRectangleCutFilter::ossimRectangleCutFilter(ossimObject* owner,
+                                     ossimImageSource* inputSource)
+   :ossimImageSourceFilter(owner, inputSource),
+    theCutType(OSSIM_RECTANGLE_NULL_OUTSIDE)
+{
+   theRectangle.makeNan();
+}
+
+ossimRectangleCutFilter::ossimRectangleCutFilter(ossimImageSource* inputSource)
+   :ossimImageSourceFilter(NULL, inputSource),
+    theCutType(OSSIM_RECTANGLE_NULL_OUTSIDE)
+{
+   theRectangle.makeNan();
+}
+
+
+ossimRefPtr<ossimImageData> ossimRectangleCutFilter::getTile(
+   const ossimIrect& rect,
+   ossim_uint32 resLevel)
+{
+   ossimRefPtr<ossimImageData> tile = 0;
+
+   if ( theInputConnection && isSourceEnabled() && ( theRectangle.hasNans() == false ) )
+   {
+      ossim_int32 decimationIndex = min((ossim_int32)resLevel,
+                                        (ossim_int32)theDecimationList.size()-1);
+
+      // Compute cut rect for resLevel:
+      ossimIrect cutRect = theRectangle*theDecimationList[decimationIndex];
+
+      // Check intersection of our cut rect:
+      bool requestIntersects = rect.intersects( cutRect );
+      bool requestCompletelyWithin = rect.completely_within(cutRect);
+      
+      if ( ( ( theCutType == OSSIM_RECTANGLE_NULL_OUTSIDE ) && requestIntersects ) ||
+           ( ( theCutType == OSSIM_RECTANGLE_NULL_INSIDE ) && !requestCompletelyWithin ) )
+      {
+         // Grab tile from the input.
+         tile = theInputConnection->getTile(rect, resLevel);
+
+         if ( tile.valid() )
+         {
+            if ( tile->getDataObjectStatus() != OSSIM_NULL &&
+                 tile->getDataObjectStatus() != OSSIM_EMPTY )
+            {
+               ossimIrect inputRectangle = tile->getImageRectangle();
+               
+               if( theCutType == OSSIM_RECTANGLE_NULL_OUTSIDE ) // Typical case...
+               {
+                  if ( !requestCompletelyWithin )
+                  {
+                     // Clip the tile:
+                     ossim_int32 ulx = inputRectangle.ul().x;
+                     ossim_int32 uly = inputRectangle.ul().y;
+                     ossim_int32 w   = tile->getWidth();
+                     ossim_int32 h   = tile->getHeight();
+                     ossim_int32 offset = 0;
+                     ossimIpt tempPoint(ulx, uly);
+                     
+                     for(ossim_int32 y = 0;  y < h; ++tempPoint.y,++y)
+                     {
+                        tempPoint.x = ulx;
+                        for(ossim_int32 x = 0; x < w; ++tempPoint.x,++x)
+                        {
+                           if(!cutRect.pointWithin(tempPoint))
+                           {
+                              tile->setNull(offset);
+                           }
+                           ++offset;
+                        }
+                     }
+                     tile->validate();
+                  }
+               }
+               else // Null inside...
+               {
+                  // Note if complete within requested rect this block was bypassed entirely.
+                  ossim_int32 ulx = inputRectangle.ul().x;
+                  ossim_int32 uly = inputRectangle.ul().y;
+                  ossim_int32 w   = tile->getWidth();
+                  ossim_int32 h   = tile->getHeight();
+                  ossim_int32 offset = 0;
+                  ossimIpt tempPoint(ulx, uly);
+                  
+                  for(ossim_int32 y = 0;  y < h; ++tempPoint.y,++y)
+                  {
+                     tempPoint.x = ulx;
+                     for(ossim_int32 x = 0; x < w; ++tempPoint.x,++x)
+                     {
+                        if(cutRect.pointWithin(tempPoint))
+                        {
+                           tile->setNull(offset);
+                        }
+                        ++offset;
+                     }
+                  }
+                  tile->validate();
+               }
+               
+            } // Matches: if ( tile->getDataObjectStatus() ... 
+            
+         } // Matches: if ( tile.valid() )
+         
+      } // Matches: if ( ( ( theCutType == OSSI ...
+      
+   } // Matches: if ( theInputConnection && enabled && ... 
+
+   return tile;
+} // End: ossimRectangleCutFilter::getTile( ... )
+
+void ossimRectangleCutFilter::setRectangle(const ossimIrect& rect)
+{
+   theRectangle = rect;
+
+   if(theRectangle.hasNans())
+   {
+      if(theInputConnection)
+      {
+         theRectangle = theInputConnection->getBoundingRect();
+      }
+   }
+}
+
+void ossimRectangleCutFilter::getValidImageVertices(
+   vector<ossimIpt>& validVertices,
+   ossimVertexOrdering ordering,
+   ossim_uint32 /* resLevel */)const
+{
+   ossimIrect rect = getBoundingRect();
+
+   if(ordering == OSSIM_CLOCKWISE_ORDER)
+   {
+      validVertices.push_back(rect.ul());
+      validVertices.push_back(rect.ur());
+      validVertices.push_back(rect.lr());
+      validVertices.push_back(rect.ll());
+   }
+   else
+   {
+      validVertices.push_back(rect.ul());
+      validVertices.push_back(rect.ll());
+      validVertices.push_back(rect.lr());
+      validVertices.push_back(rect.ur());
+   }
+}
+
+ossimIrect ossimRectangleCutFilter::getBoundingRect(ossim_uint32 resLevel)const
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimRectangleCutFilter::getBoundingRect DEBUG: entered..." << std::endl;
+   }
+   ossimIrect result;
+
+   result.makeNan();
+   if(!theInputConnection)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << "ossimRectangleCutFilter::getBoundingRect DEBUG: Input connection was not valid so leaving" << std::endl;
+      }
+      return result;
+   }
+
+   result = theInputConnection->getBoundingRect(resLevel);
+   if(isSourceEnabled())
+   {
+      if(theCutType == OSSIM_RECTANGLE_NULL_OUTSIDE)
+      {
+         ossimDpt decimation;
+         getDecimationFactor(resLevel, decimation);
+         ossimIrect cutRect = theRectangle;
+         if(!decimation.hasNans())
+         {
+            cutRect = theRectangle*decimation;
+         }
+         result = cutRect;
+      }
+   }
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimRectangleCutFilter::getBoundingRect DEBUG: cut rect = " << result  << std::endl;
+   }
+   return result;
+}
+
+void ossimRectangleCutFilter::initialize()
+{
+   theDecimationList.clear();
+   if(theInputConnection)
+   {
+      getDecimationFactors(theDecimationList);
+   }
+   if(theDecimationList.empty())
+   {
+      theDecimationList.push_back(ossimDpt(1,1));
+   }
+   if(theRectangle.hasNans())
+   {
+      setRectangle(theRectangle);
+   }
+}
+
+bool ossimRectangleCutFilter::saveState(ossimKeywordlist& kwl,
+                                        const char* prefix)const
+{
+   ossimString newPrefix = prefix;
+   newPrefix+="clip_rect.";
+   
+   theRectangle.saveState(kwl, newPrefix);
+
+   if(theCutType == OSSIM_RECTANGLE_NULL_INSIDE)
+   {
+      kwl.add(prefix,
+              "cut_type",
+              "null_inside",
+              true);
+   }
+   else if(theCutType == OSSIM_RECTANGLE_NULL_OUTSIDE)
+   {
+      kwl.add(prefix,
+              "cut_type",
+              "null_outside",
+              true);      
+   }
+   
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
+bool ossimRectangleCutFilter::loadState(const ossimKeywordlist& kwl,
+                                        const char* prefix)
+{
+   ossimString newPrefix = prefix;
+   
+   ossimString rect = kwl.find(prefix, "rect");
+   if(!rect.empty())
+   {
+      theRectangle.toRect(rect);
+   }
+   else 
+   {
+      newPrefix+="clip_rect.";
+      
+      theRectangle.loadState(kwl, newPrefix.c_str());
+   }
+
+   const char* cutType = kwl.find(prefix, "cut_type");
+   if(cutType)
+   {
+      ossimString c = cutType;
+      if(c == "null_inside")
+      {
+         theCutType = OSSIM_RECTANGLE_NULL_INSIDE;
+      }
+      else if(c == "null_outside")
+      {
+         theCutType = OSSIM_RECTANGLE_NULL_OUTSIDE;         
+      }
+      else
+      {
+         theCutType = static_cast<ossimRectangleCutType>(ossimString(cutType).toLong());
+      }
+   }
+
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
+const ossimIrect& ossimRectangleCutFilter::getRectangle()const
+{
+   return theRectangle;
+}
+
+ossimRectangleCutFilter::ossimRectangleCutType ossimRectangleCutFilter::getCutType()const
+{
+   return theCutType;
+}
+
+void ossimRectangleCutFilter::setCutType(ossimRectangleCutType cutType)
+{
+   theCutType = cutType;
+}
+
diff --git a/src/ossim/imaging/ossimResampler.cpp b/ossim/src/ossim/imaging/ossimResampler.cpp
similarity index 100%
rename from src/ossim/imaging/ossimResampler.cpp
rename to ossim/src/ossim/imaging/ossimResampler.cpp
diff --git a/ossim/src/ossim/imaging/ossimRgbGridRemapEngine.cpp b/ossim/src/ossim/imaging/ossimRgbGridRemapEngine.cpp
new file mode 100644
index 0000000..53086fb
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimRgbGridRemapEngine.cpp
@@ -0,0 +1,272 @@
+//*****************************************************************************
+// FILE: ossimRgbGridRemapEngine.cc
+//
+// Copyright (C) 2001 ImageLinks, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Contains implementation of class 
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimRgbGridRemapEngine.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimRgbGridRemapEngine.h>
+
+RTTI_DEF1(ossimRgbGridRemapEngine, "ossimRgbGridRemapEngine",
+          ossimGridRemapEngine);
+
+#include <ossim/imaging/ossimGridRemapSource.h>
+#include <ossim/imaging/ossimAtbPointSource.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimDblGrid.h>
+#include <ossim/imaging/ossimImageData.h>
+
+//***
+// Define Trace flags for use within this file:
+//***
+#include <ossim/base/ossimTrace.h>
+static ossimTrace traceExec  ("ossimRgbGridRemapEngine:exec");
+static ossimTrace traceDebug ("ossimRgbGridRemapEngine:debug");
+
+//*****************************************************************************
+//  METHOD: ossimRgbGridRemapEngine::dup
+//  
+//*****************************************************************************
+ossimObject* ossimRgbGridRemapEngine::dup() const
+{
+   return new ossimRgbGridRemapEngine;
+}
+
+//*****************************************************************************
+//  METHOD: ossimRgbGridRemapEngine::remapTile
+//  
+//*****************************************************************************
+void ossimRgbGridRemapEngine::remapTile(const ossimDpt&       origin,
+                                        ossimGridRemapSource* remapper,
+                                        ossimRefPtr<ossimImageData>& tile)
+{
+   static const char MODULE[] = "ossimRgbGridRemapEngine::remapTile";
+   if (traceExec())  CLOG << "entering..." << endl;
+
+   //***
+   // Fetch tile size and NULL pixel value:
+   //***
+   int    width         = tile->getWidth();
+   int    height        = tile->getHeight();
+   int    offset        = 0;
+   double null[3];
+
+   //***
+   // Determine null pixel values so that we can recognize a null coming in and
+   // not remap it:
+   //***
+   null[0] = tile->getNullPix(0);
+   null[1] = tile->getNullPix(1);
+   null[2] = tile->getNullPix(2);
+   
+   ossimDblGrid& gridR = *(remapper->getGrid(0));
+   ossimDblGrid& gridG = *(remapper->getGrid(1));
+   ossimDblGrid& gridB = *(remapper->getGrid(2));
+      
+   //***
+   // Remap according to pixel type:
+   //***
+   switch(tile->getScalarType())
+   {
+   case OSSIM_UCHAR:
+   {
+      ossim_uint8* red_buf  = (ossim_uint8*)tile->getBuf(0);
+      ossim_uint8* grn_buf  = (ossim_uint8*)tile->getBuf(1);
+      ossim_uint8* blu_buf  = (ossim_uint8*)tile->getBuf(2);
+      short  pixel_buffer[3];
+      
+      for (double line=origin.line; line<origin.line+height; line+=1.0)
+      {
+         for (double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
+         {
+            //***
+            // Scan for null pixel before adding remap delta:
+            //***
+            if ((red_buf[offset] != (ossim_uint8) null[0]) &&
+                (grn_buf[offset] != (ossim_uint8) null[1]) &&
+                (blu_buf[offset] != (ossim_uint8) null[2]))
+            {
+               //***
+               // Remap RGB pixel with spatially variant bias value:
+               //***
+               pixel_buffer[0] = red_buf[offset] + (short) gridR(samp,line);
+               pixel_buffer[1] = grn_buf[offset] + (short) gridG(samp,line);
+               pixel_buffer[2] = blu_buf[offset] + (short) gridB(samp,line);
+
+               //***
+               // Clamp:
+               //***
+               if      (pixel_buffer[0]<0)   red_buf[offset] = 0;
+               else if (pixel_buffer[0]>255) red_buf[offset] = 255;
+               else                          red_buf[offset] = pixel_buffer[0];
+               
+
+               if      (pixel_buffer[1]<0)   grn_buf[offset] = 0;
+               else if (pixel_buffer[1]>255) grn_buf[offset] = 255;
+               else                          grn_buf[offset] = pixel_buffer[1];
+               
+
+               if      (pixel_buffer[2]<0)   blu_buf[offset] = 0;
+               else if (pixel_buffer[2]>255) blu_buf[offset] = 255;
+               else                          blu_buf[offset] = pixel_buffer[2];
+               
+               //***
+               // Avoid NULLS:
+               //***
+               if (red_buf[offset] == (ossim_uint8) null[0]) red_buf[offset]++;
+               if (grn_buf[offset] == (ossim_uint8) null[1]) grn_buf[offset]++;
+               if (blu_buf[offset] == (ossim_uint8) null[2]) blu_buf[offset]++;
+            }
+            
+            offset++;
+         }
+      }
+      break;
+   }
+   
+   default:
+   {
+	   ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimRgbGridRemapEngine::remapTile: Scalar type not handled" << std::endl;
+	   break;
+   }
+
+   }   // end switch statement
+
+   if (traceExec())  CLOG << "returning..." << endl;
+   return;
+};
+
+//*****************************************************************************
+//  METHOD: ossimRgbGridRemapEngine::assignRemapValues
+//
+//  This engine defines the target value as an RGB vector of doubles, computed
+//  as the mean of all contributor RGB values.
+//  
+//*****************************************************************************
+void ossimRgbGridRemapEngine::assignRemapValues (
+   vector<ossimAtbPointSource*>& sources_list)
+{
+   static const char MODULE[] = "ossimRgbGridRemapEngine::assignRemapValues";
+   if (traceExec())  CLOG << "entering..." << endl;
+
+   int i; // index to individual sources
+
+   //***
+   // Declare a 2D array that will contain all of the contributing sources'
+   // RGB mean values. Also declare the accumulator target vector.
+   //***
+   int num_contributors =  (int)sources_list.size();
+   double** contributor_pixel = new double* [num_contributors];
+   for (i=0; i<num_contributors; i++)
+      contributor_pixel[i] = new double[3];
+   double target_pixel[3] = {0.0, 0.0, 0.0};
+
+   //***
+   // Now loop over each remaining contributor and sum in its contribution:
+   //***
+   vector<ossimAtbPointSource*>::iterator source;
+   i = 0;
+   for(source=sources_list.begin();
+       source!=sources_list.end();
+       source++)
+   {
+      (*source)->getSourceValue(contributor_pixel[i]);
+
+      target_pixel[0] += contributor_pixel[i][0]/(double)num_contributors;
+      target_pixel[1] += contributor_pixel[i][1]/(double)num_contributors;
+      target_pixel[2] += contributor_pixel[i][2]/(double)num_contributors;
+
+      i++;
+   }
+
+   //***
+   // The target pixel has been established. Now need to compute the actual
+   // remap quantities that will be written to the appropriate remap grids:
+   //***
+   i = 0;
+   for(source=sources_list.begin();
+       source!=sources_list.end();
+       source++)
+   {
+      computeRemapNode(*source, contributor_pixel[i], target_pixel);
+      i++;
+   }
+
+   //***
+   // Delete locally allocated memory:
+   //***
+   for (i=0; i<num_contributors; i++)
+      delete [] contributor_pixel[i];
+   delete [] contributor_pixel;
+   
+   if (traceExec())  CLOG << "returning..." << endl;
+   return;
+}
+
+//*****************************************************************************
+//  METHOD: ossimRgbGridRemapEngine::computeSourceValue
+//  
+//*****************************************************************************
+void ossimRgbGridRemapEngine::computeSourceValue(
+   ossimRefPtr<ossimImageData>& source, void* result)
+{
+   static const char MODULE[]="ossimRgbGridRemapEngine::computeSourceValue";
+   if (traceExec())  CLOG << "entering..." << endl;
+
+   //***
+   // This engine defines "value" as the RGB vector corresponding to the mean
+   // RGB pixel value of the source data:
+   //***
+   ((double*)result)[0] = source->computeAverageBandValue(0);
+   ((double*)result)[1] = source->computeAverageBandValue(1);
+   ((double*)result)[2] = source->computeAverageBandValue(2);
+   
+   if (traceExec())  CLOG << "returning..." << endl;
+   return;
+}
+
+//*****************************************************************************
+//  METHOD: ossimRgbGridRemapEngine::computeRemapNode
+//
+//  This engine defines the remap value as the difference between the target
+//  RGB vector and the individual point source's value vector.
+//
+//*****************************************************************************
+void ossimRgbGridRemapEngine::computeRemapNode(ossimAtbPointSource* ps,
+                                              void* source_value,
+                                              void* target_value)
+{
+   static const char MODULE[] = "ossimRgbGridRemapEngine::computeRemapNode";
+   if (traceExec())  CLOG << "entering..." << endl;
+
+   //***
+   // Compute the remap grid node value specific to this RGB implementation:
+   //***
+   double node[3];
+   node[0] = ((double*)target_value)[0] - ((double*)source_value)[0];
+   node[1] = ((double*)target_value)[1] - ((double*)source_value)[1];
+   node[2] = ((double*)target_value)[2] - ((double*)source_value)[2];
+
+   //***
+   // Fetch a pointer to the remapper feeding this point source in order to
+   // pass it the node value:
+   //***
+   ossimGridRemapSource* remapper = ps->getRemapSource();
+   remapper->setGridNode(ps->getViewPoint(), node);
+
+   if (traceExec())  CLOG << "returning..." << endl;
+   return;
+}
+
+
diff --git a/src/ossim/imaging/ossimRgbImage.cpp b/ossim/src/ossim/imaging/ossimRgbImage.cpp
similarity index 100%
rename from src/ossim/imaging/ossimRgbImage.cpp
rename to ossim/src/ossim/imaging/ossimRgbImage.cpp
diff --git a/ossim/src/ossim/imaging/ossimRgbToGreyFilter.cpp b/ossim/src/ossim/imaging/ossimRgbToGreyFilter.cpp
new file mode 100644
index 0000000..bfb105c
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimRgbToGreyFilter.cpp
@@ -0,0 +1,248 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimRgbToGreyFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimRgbToGreyFilter.h>
+#include <ossim/imaging/ossimU8ImageData.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimKeywordlist.h>
+
+RTTI_DEF1(ossimRgbToGreyFilter, "ossimRgbToGreyFilter", ossimImageSourceFilter)
+
+ossimRgbToGreyFilter::ossimRgbToGreyFilter(ossimObject* owner)
+   :ossimImageSourceFilter(owner),
+    theBlankTile(NULL),
+    theTile(NULL),
+    theC1(1.0/3.0),
+    theC2(1.0/3.0),
+    theC3(1.0/3.0)
+{
+}
+
+ossimRgbToGreyFilter::ossimRgbToGreyFilter(ossimImageSource* inputSource,
+                                           double c1,
+                                           double c2,
+                                           double c3)
+   : ossimImageSourceFilter(NULL, inputSource),
+     theBlankTile(NULL),
+     theTile(NULL),
+     theC1(c1),
+     theC2(c2),
+     theC3(c3)
+{
+}
+
+ossimRgbToGreyFilter::ossimRgbToGreyFilter(ossimObject* owner,
+                                           ossimImageSource* inputSource,
+                                           double c1,
+                                           double c2,
+                                           double c3)
+   : ossimImageSourceFilter(owner, inputSource),
+     theBlankTile(NULL),
+     theTile(NULL),
+     theC1(c1),
+     theC2(c2),
+     theC3(c3)
+{
+}
+ossimRgbToGreyFilter::~ossimRgbToGreyFilter()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimRgbToGreyFilter::getTile(const ossimIrect& tileRect,
+                                              ossim_uint32 resLevel)
+{
+   if(!theInputConnection)
+   {
+      return NULL;  // This filter requires an input.
+   }
+
+   ossimRefPtr<ossimImageData> inputTile = theInputConnection->getTile(tileRect,
+                                                           resLevel);   
+   if(!isSourceEnabled() || !inputTile.valid())
+   {
+      return inputTile;
+   }
+
+   if(!theTile)
+   {
+      allocate(); // First time through...
+   }
+
+   // if (!theTile) // throw exeption...
+
+   if( inputTile->getDataObjectStatus() == OSSIM_NULL ||
+       inputTile->getDataObjectStatus() == OSSIM_EMPTY )
+   {
+      theBlankTile->setImageRectangle(tileRect);
+      return theBlankTile;
+   }
+
+   // Set the origin, resize if needed of the output tile.
+   theTile->setImageRectangle(tileRect);
+
+   // Filter the tile.
+   runUcharTransformation(inputTile);
+
+   // Always validate to set the status.
+   theTile->validate();
+   
+   return theTile;
+}
+
+
+void ossimRgbToGreyFilter::initialize()
+{
+   // Base class will recapture "theInputConnection".
+   ossimImageSourceFilter::initialize();
+}
+
+void ossimRgbToGreyFilter::allocate()
+{
+   if(theInputConnection)
+   {
+      theTile      = NULL;
+      theBlankTile = NULL;
+
+      if(isSourceEnabled())
+      {
+         theBlankTile = new ossimU8ImageData(this,
+                                             1,
+                                             theInputConnection->getTileWidth(),
+                                             theInputConnection->getTileHeight());  
+         
+         
+         theTile = (ossimImageData*)theBlankTile->dup();
+         theTile->initialize();
+      }
+   }
+}
+
+ossim_uint32 ossimRgbToGreyFilter::getNumberOfOutputBands() const
+{
+   if(isSourceEnabled())
+   {
+      return 1;
+   }
+
+   return ossimImageSourceFilter::getNumberOfOutputBands();
+}
+
+bool ossimRgbToGreyFilter::saveState(ossimKeywordlist& kwl,
+                                     const char* prefix)const
+{
+   ossimImageSourceFilter::saveState(kwl, prefix);
+
+   kwl.add(prefix,
+           "c1",
+           theC1,
+           true);
+   kwl.add(prefix,
+           "c2",
+           theC2,
+           true);
+   kwl.add(prefix,
+           "c3",
+           theC2,
+           true);
+   
+   return true;
+}
+
+bool ossimRgbToGreyFilter::loadState(const ossimKeywordlist& kwl,
+                                     const char* prefix)
+{
+   ossimImageSourceFilter::loadState(kwl, prefix);
+
+   const char* lookup = kwl.find(prefix, "c1");
+   if(lookup)
+   {
+      theC1 = ossimString(lookup).toDouble();
+   }
+   lookup = kwl.find(prefix, "c2");
+   if(lookup)
+   {
+      theC2 = ossimString(lookup).toDouble();
+   }
+   lookup = kwl.find(prefix, "c3");
+   if(lookup)
+   {
+      theC3 = ossimString(lookup).toDouble();
+   }
+   return true;
+}
+
+void ossimRgbToGreyFilter::runUcharTransformation(ossimRefPtr<ossimImageData>& tile)
+{   
+   unsigned char** bandSrc = new unsigned char*[tile->getNumberOfBands()];
+   unsigned char* bandDest;
+   
+   if(tile->getNumberOfBands() == 1)
+   {
+      bandSrc[0]  = static_cast<unsigned char*>(tile->getBuf(0));
+      bandSrc[1]  = static_cast<unsigned char*>(tile->getBuf(0));
+      bandSrc[2]  = static_cast<unsigned char*>(tile->getBuf(0));
+   }
+   else if(tile->getNumberOfBands() == 2)
+   {
+      bandSrc[0]  = static_cast<unsigned char*>(tile->getBuf(0));
+      bandSrc[1]  = static_cast<unsigned char*>(tile->getBuf(1));
+      bandSrc[2]  = static_cast<unsigned char*>(tile->getBuf(1));      
+   }
+   else if(tile->getNumberOfBands() >= 3)
+   {
+      bandSrc[0]  = static_cast<unsigned char*>(tile->getBuf(0));
+      bandSrc[1]  = static_cast<unsigned char*>(tile->getBuf(1));
+      bandSrc[2]  = static_cast<unsigned char*>(tile->getBuf(2));      
+   }
+   bandDest = static_cast<unsigned char*>(theTile->getBuf());
+   
+   ossim_int32 offset;
+
+   ossim_int32 upperBound = tile->getWidth()*tile->getHeight();
+   for(offset = 0; offset < upperBound; ++offset)
+   {
+      ossim_int32 value;
+      
+      value = ossim::round<int>(theC1*(bandSrc[0][offset]) +
+                    theC2*(bandSrc[1][offset]) +
+                    theC3*(bandSrc[2][offset]));
+      
+      value = value<255?value:255;
+      value = value>0?value:0;
+
+      bandDest[offset] = value;
+   }
+
+   delete [] bandSrc;
+}
+
+ossimString ossimRgbToGreyFilter::getShortName()const
+{
+   return ossimString("grey");
+}
+
+ossimString ossimRgbToGreyFilter::getLongName()const
+{
+   return ossimString("rgb to grey scale filter");
+}
+
+ossimScalarType ossimRgbToGreyFilter::getOutputScalarType() const
+{
+   if(isSourceEnabled())
+   {
+      return OSSIM_UCHAR;
+   }
+   
+   return ossimImageSourceFilter::getOutputScalarType();
+}
+
diff --git a/ossim/src/ossim/imaging/ossimRgbToHsiSource.cpp b/ossim/src/ossim/imaging/ossimRgbToHsiSource.cpp
new file mode 100644
index 0000000..dd223f1
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimRgbToHsiSource.cpp
@@ -0,0 +1,163 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimRgbToHsiSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimRgbToHsiSource.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimHsiVector.h>
+#include <ossim/base/ossimRgbVector.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+
+RTTI_DEF1(ossimRgbToHsiSource, "ossimRgbToHsiSource", ossimImageSourceFilter)
+
+ossimRgbToHsiSource::ossimRgbToHsiSource()
+   :ossimImageSourceFilter(),
+    theBlankTile(NULL),
+    theTile(NULL)
+{
+}
+
+ossimRgbToHsiSource::ossimRgbToHsiSource(ossimImageSource* inputSource)
+   : ossimImageSourceFilter(inputSource),
+     theBlankTile(NULL),
+     theTile(NULL)
+{
+}
+
+ossimRgbToHsiSource::~ossimRgbToHsiSource()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimRgbToHsiSource::getTile(
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   if(!theInputConnection)
+   {
+      return ossimRefPtr<ossimImageData>();  // This filter requires an input.
+   }
+   
+   ossimRefPtr<ossimImageData> inputTile = theInputConnection->getTile(tileRect,
+                                                                       resLevel);   
+   if(!isSourceEnabled() || !inputTile.valid())
+   {
+      return inputTile;
+   }
+
+   if(!theTile)
+   {
+      allocate(); // First time through...
+   }
+
+   if (!theTile.valid())
+   {
+      return inputTile;
+   }
+   
+   if( inputTile->getDataObjectStatus() == OSSIM_NULL ||
+       inputTile->getDataObjectStatus() == OSSIM_EMPTY )
+   {
+      theBlankTile->setImageRectangle(tileRect);
+      return theBlankTile;
+   }
+   
+   if((inputTile->getNumberOfBands()==3)&&
+      (inputTile->getScalarType()==OSSIM_UCHAR)&&
+      (inputTile->getDataObjectStatus()!=OSSIM_NULL))
+   {
+      // Set the origin, resize if needed of the output tile.
+      theTile->setImageRectangle(tileRect);
+
+      float* outputBands[3];
+      ossim_uint8* inputBands[3];
+      outputBands[0] = static_cast<float*>(theTile->getBuf(0));
+      outputBands[1] = static_cast<float*>(theTile->getBuf(1));
+      outputBands[2] = static_cast<float*>(theTile->getBuf(2));
+      inputBands[0]  = static_cast<ossim_uint8*>(inputTile->getBuf(0));
+      inputBands[1]  = static_cast<ossim_uint8*>(inputTile->getBuf(1));
+      inputBands[2]  = static_cast<ossim_uint8*>(inputTile->getBuf(2));
+      
+      long height = inputTile->getHeight();
+      long width  = inputTile->getWidth();
+      long offset = 0;
+      for(long row = 0; row < height; ++row)
+      {
+         for(long col = 0; col < width; ++col)
+         {
+            ossimRgbVector rgb(inputBands[0][offset],
+                               inputBands[1][offset],
+                               inputBands[2][offset]);
+            
+            ossimHsiVector hsi(rgb);
+            
+            
+            outputBands[0][offset] = hsi.getH();
+            outputBands[1][offset] = hsi.getS();
+            outputBands[2][offset] = hsi.getI();
+            
+            ++offset;
+         }
+      }
+   }
+   else // Input tile not of correct type to process...
+   {
+      return inputTile;
+   }
+
+   theTile->validate();
+   return theTile;
+}
+
+ossimScalarType ossimRgbToHsiSource::getOutputScalarType() const
+{
+   return OSSIM_NORMALIZED_FLOAT;
+}
+
+void ossimRgbToHsiSource::initialize()
+{
+   // Base class will recapture "theInputConnection".
+   ossimImageSourceFilter::initialize();   
+}
+
+void ossimRgbToHsiSource::allocate()
+{
+   theBlankTile = NULL;
+   theTile = NULL;
+
+   if(!theInputConnection) return;
+   
+   theBlankTile = ossimImageDataFactory::instance()->create(this, this);
+   theTile      = (ossimImageData*)theBlankTile->dup();
+   theTile->initialize();
+}
+
+ossim_uint32 ossimRgbToHsiSource::getNumberOfOutputBands()const
+{
+   return 3;
+}
+
+double ossimRgbToHsiSource::getNullPixelValue()const
+{
+   return ossim::nan();
+}
+
+double ossimRgbToHsiSource::getMinPixelValue(ossim_uint32 /* band */)const
+{
+   return 0.0;
+}
+
+double ossimRgbToHsiSource::getMaxPixelValue(ossim_uint32 /* band */)const
+{
+   return 1.0;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimRgbToHsvSource.cpp b/ossim/src/ossim/imaging/ossimRgbToHsvSource.cpp
new file mode 100644
index 0000000..f97c196
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimRgbToHsvSource.cpp
@@ -0,0 +1,156 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimRgbToHsvSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimRgbToHsvSource.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimHsvVector.h>
+#include <ossim/base/ossimRgbVector.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+
+RTTI_DEF1(ossimRgbToHsvSource, "ossimRgbToHsvSource", ossimImageSourceFilter)
+
+ossimRgbToHsvSource::ossimRgbToHsvSource()
+   :ossimImageSourceFilter(),
+    theBlankTile(NULL),
+    theTile(NULL)
+{
+}
+
+
+ossimRgbToHsvSource::ossimRgbToHsvSource(ossimImageSource* inputSource)
+   : ossimImageSourceFilter(inputSource),
+    theBlankTile(NULL),
+    theTile(NULL)
+{
+}
+
+ossimRgbToHsvSource::~ossimRgbToHsvSource()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimRgbToHsvSource::getTile(
+   const  ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   if(!theInputConnection)
+   {
+      return ossimRefPtr<ossimImageData>();  // This filter requires an input.
+   }
+
+   ossimRefPtr<ossimImageData> inputTile =
+      theInputConnection->getTile(tileRect, resLevel);   
+   if(!isSourceEnabled() || !inputTile.valid())
+   {
+      return inputTile;
+   }
+
+   if(!theTile.valid())
+   {
+      allocate(); // First time through...
+   }
+   
+   if (!theTile.valid()) // throw exeption...
+   {
+      return inputTile;
+   }
+   
+   if( inputTile->getDataObjectStatus() == OSSIM_NULL ||
+       inputTile->getDataObjectStatus() == OSSIM_EMPTY )
+   {
+      theBlankTile->setImageRectangle(tileRect);
+      return theBlankTile;
+   }
+
+   if((inputTile->getNumberOfBands()==3)&&
+      (inputTile->getScalarType()==OSSIM_UCHAR)&&
+      (inputTile->getDataObjectStatus()!=OSSIM_NULL))
+   {
+      // Set the origin, resize if needed of the output tile.
+      theTile->setImageRectangle(tileRect);
+
+      float* outputBands[3];
+      ossim_uint8* inputBands[3];
+      outputBands[0] = static_cast<float*>(theTile->getBuf(0));
+      outputBands[1] = static_cast<float*>(theTile->getBuf(1));
+      outputBands[2] = static_cast<float*>(theTile->getBuf(2));
+      inputBands[0] = static_cast<ossim_uint8*>(inputTile->getBuf(0));
+      inputBands[1] = static_cast<ossim_uint8*>(inputTile->getBuf(1));
+      inputBands[2] = static_cast<ossim_uint8*>(inputTile->getBuf(2));
+      
+      long height = inputTile->getHeight();
+      long width  = inputTile->getWidth();
+      long offset = 0;
+      for(long row = 0; row < height; ++row)
+      {
+         for(long col = 0; col < width; ++col)
+         {
+            ossimRgbVector rgb(inputBands[0][offset],
+                               inputBands[1][offset],
+                               inputBands[2][offset]);
+            
+            ossimHsvVector hsv(rgb);
+            
+            outputBands[0][offset] = hsv.getH();
+            outputBands[1][offset] = hsv.getS();
+            outputBands[2][offset] = hsv.getV();
+            
+            ++offset;
+         }
+      }
+   }
+   else // Input tile not of correct type to process...
+   {
+      return inputTile;
+   }
+   theTile->validate();
+   return theTile;
+}
+
+void ossimRgbToHsvSource::initialize()
+{
+   // Base class will recapture "theInputConnection".
+   ossimImageSourceFilter::initialize();
+}
+
+void ossimRgbToHsvSource::allocate()
+{
+   theBlankTile = ossimImageDataFactory::instance()->create(this, this);
+   theTile      = (ossimImageData*)theBlankTile->dup();
+   theTile->initialize();
+}
+
+ossimScalarType ossimRgbToHsvSource::getOutputScalarType() const
+{
+   return OSSIM_NORMALIZED_FLOAT;
+}
+
+ossim_uint32 ossimRgbToHsvSource::getNumberOfOutputBands()const
+{
+   return 3;
+}
+
+double ossimRgbToHsvSource::getNullPixelValue()const
+{
+   return ossim::nan();
+}
+
+double ossimRgbToHsvSource::getMinPixelValue(ossim_uint32 /* band */)const
+{
+   return 0.0;
+}
+
+double ossimRgbToHsvSource::getMaxPixelValue(ossim_uint32 /* band */)const
+{
+   return 1.0;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimRgbToIndexFilter.cpp b/ossim/src/ossim/imaging/ossimRgbToIndexFilter.cpp
new file mode 100644
index 0000000..cc53621
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimRgbToIndexFilter.cpp
@@ -0,0 +1,229 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimRgbToIndexFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimRgbToIndexFilter.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+
+
+RTTI_DEF1(ossimRgbToIndexFilter,
+          "ossimRgbToIndexFilter",
+          ossimImageSourceFilter);
+
+ossimRgbToIndexFilter::ossimRgbToIndexFilter()
+   :ossimImageSourceFilter(),
+    theLut(new ossimRgbLutDataObject()),
+    theTile(NULL)
+{
+}
+
+ossimRgbToIndexFilter::ossimRgbToIndexFilter(ossimImageSource* inputSource,
+                                             const ossimRgbLutDataObject& rgbLut)
+   :ossimImageSourceFilter(inputSource),
+    theLut((ossimRgbLutDataObject*)rgbLut.dup()),
+    theTile(NULL)
+{
+}
+
+ossimRgbToIndexFilter::~ossimRgbToIndexFilter()
+{
+   theLut = 0;
+}
+
+void ossimRgbToIndexFilter::initialize()
+{
+   ossimImageSourceFilter::initialize();
+
+   // Force allocate on next getTile.
+   theTile      = NULL;
+}
+
+void ossimRgbToIndexFilter::allocate()
+{
+   theTile      = NULL;
+   
+   if(isSourceEnabled())
+   {
+      theTile      = ossimImageDataFactory::instance()->create(this, this);
+      theTile->initialize();
+   }
+}
+
+void ossimRgbToIndexFilter::disableSource()
+{
+   ossimImageSourceFilter::disableSource();
+   theTile = NULL;
+}
+
+ossimRefPtr<ossimImageData> ossimRgbToIndexFilter::getTile(
+   const ossimIrect& origin,
+   ossim_uint32 resLevel)
+{
+   if(!theInputConnection)
+   {
+      return ossimRefPtr<ossimImageData>();
+   }
+
+   if(!theTile.valid())
+   {
+      allocate();
+   }
+   
+   ossimRefPtr<ossimImageData> input = theInputConnection->getTile(origin,
+                                                                   resLevel);
+
+   if(!theTile.valid() || !input.valid())
+   {
+      return input;
+   }
+
+   theTile->setImageRectangle(origin);
+
+   if(input->getScalarType() == OSSIM_UCHAR)
+   {
+      theTile->setDataObjectStatus(OSSIM_FULL);
+      return convertInputTile(input);
+   }
+   else
+   {
+      theTile->makeBlank();
+   }
+
+   theTile->setDataObjectStatus(OSSIM_FULL);
+   
+   return theTile;
+}
+
+ossimRefPtr<ossimImageData> ossimRgbToIndexFilter::convertInputTile(ossimRefPtr<ossimImageData>& tile)
+{
+   if (!tile)
+   {
+      return theTile;
+   }
+   
+   const ossim_uint32 BANDS = tile->getNumberOfBands();
+
+   if (!BANDS)
+   {
+      return theTile;
+   }
+   
+   ossim_uint8* band[3];
+   ossim_uint8* outBand = (ossim_uint8*)theTile->getBuf();
+
+   if(BANDS >= 3)
+   {
+      band[0] = (ossim_uint8*)(tile->getBuf(0));
+      band[1] = (ossim_uint8*)(tile->getBuf(1));
+      band[2] = (ossim_uint8*)(tile->getBuf(2));
+   }
+   else
+   {
+      band[0] = (ossim_uint8*)(tile->getBuf(0));
+      band[1] = (ossim_uint8*)(tile->getBuf(0));
+      band[2] = (ossim_uint8*)(tile->getBuf(0));
+   }
+
+   if(band[0])
+   {
+      ossim_uint32 upper = tile->getWidth()*tile->getHeight();
+
+      for(ossim_uint32 offset = 0; offset < upper; ++offset)
+      {
+         *outBand = theLut->findIndex(*band[0], *band[1], *band[2]);
+         
+         ++outBand;
+         ++band[0];
+         ++band[1];
+         ++band[2];
+      }
+   }
+   
+   return theTile;
+}
+
+bool ossimRgbToIndexFilter::saveState(ossimKeywordlist& kwl,
+                                      const char* prefix)const
+{
+   ossimString newPrefix = prefix;
+   newPrefix = newPrefix + "lut.";
+
+   theLut->saveState(kwl, newPrefix.c_str());
+
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
+bool ossimRgbToIndexFilter::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   ossimString newPrefix = prefix;
+   newPrefix = newPrefix + "lut.";
+
+   theLut->loadState(kwl, newPrefix.c_str());
+   
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
+ossim_uint32 ossimRgbToIndexFilter::getNumberOfOutputBands() const
+{
+   if(isSourceEnabled())
+   {
+      return 1;
+   }
+   
+   return ossimImageSourceFilter::getNumberOfOutputBands();
+}
+   
+ossimScalarType ossimRgbToIndexFilter::getOutputScalarType() const
+{
+   if(isSourceEnabled())
+   {
+      return OSSIM_UCHAR;
+   }
+   
+   return ossimImageSourceFilter::getOutputScalarType();
+}
+
+void ossimRgbToIndexFilter::setLut(ossimRgbLutDataObject& lut)
+{
+   theLut = (ossimRgbLutDataObject*) lut.dup();
+}
+
+double ossimRgbToIndexFilter::getNullPixelValue(ossim_uint32 band)const
+{
+   if(isSourceEnabled())
+   {
+      return 0.0;
+   }
+   
+   return ossimImageSourceFilter::getNullPixelValue(band);
+}
+
+double ossimRgbToIndexFilter::getMinPixelValue(ossim_uint32 /* band */)const
+{
+   if(isSourceEnabled())
+   {
+      return 1.0;
+   }
+   
+   return ossimImageSourceFilter::getMinPixelValue();
+}
+
+double ossimRgbToIndexFilter::getMaxPixelValue(ossim_uint32 /* band */)const
+{
+   if(isSourceEnabled())
+   {
+      return 255.0;
+   }
+   
+   return ossimImageSourceFilter::getMaxPixelValue();
+}
+
diff --git a/ossim/src/ossim/imaging/ossimRgbToJpegYCbCrSource.cpp b/ossim/src/ossim/imaging/ossimRgbToJpegYCbCrSource.cpp
new file mode 100644
index 0000000..6a61e09
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimRgbToJpegYCbCrSource.cpp
@@ -0,0 +1,94 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimRgbToJpegYCbCrSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimRgbToJpegYCbCrSource.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimJpegYCbCrVector.h>
+#include <ossim/base/ossimRgbVector.h>
+
+RTTI_DEF1(ossimRgbToJpegYCbCrSource,
+          "ossimRgbToJpegYCbCrSource",
+          ossimImageSourceFilter)
+
+ossimRgbToJpegYCbCrSource::ossimRgbToJpegYCbCrSource()
+   :ossimImageSourceFilter()
+{
+   theBlankTile = new ossimImageData(this,
+                                     OSSIM_UCHAR,
+                                     3);
+}
+
+ossimRgbToJpegYCbCrSource::ossimRgbToJpegYCbCrSource(ossimImageSource* inputSource)
+   : ossimImageSourceFilter(inputSource)
+{
+}
+
+ossimRgbToJpegYCbCrSource::~ossimRgbToJpegYCbCrSource()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimRgbToJpegYCbCrSource::getTile(const  ossimIrect& tileRect,
+                                                   ossim_uint32 resLevel)
+{
+   theBlankTile->setOrigin(tileRect.ul());
+   theBlankTile->setWidthHeight(tileRect.width(), tileRect.height());
+   
+   if(theInputConnection)
+   {
+      ossimRefPtr<ossimImageData> imageData = theInputConnection->getTile(tileRect,
+                                                              resLevel);
+      if(!imageData.valid())
+      {
+         return theBlankTile;
+      }
+      if((isSourceEnabled())&&
+         (imageData->getNumberOfBands()==3)&&
+         (imageData->getScalarType()==OSSIM_UCHAR)&&
+         (imageData->getDataObjectStatus()!=OSSIM_NULL)&&
+         (imageData->getDataObjectStatus()!=OSSIM_EMPTY))
+      {
+         ossim_uint8* bands[3];
+         
+         bands[0] = static_cast<ossim_uint8*>(imageData->getBuf(0));
+         bands[1] = static_cast<ossim_uint8*>(imageData->getBuf(1));
+         bands[2] = static_cast<ossim_uint8*>(imageData->getBuf(2));
+         
+         long height = imageData->getHeight();
+         long width  = imageData->getWidth();
+         long offset = 0;
+         
+         for(long row = 0; row < height; ++row)
+         {
+            for(long col = 0; col < width; ++col)
+            {
+               ossimRgbVector rgb(bands[0][offset],
+                                  bands[1][offset],
+                                  bands[2][offset]);
+               
+               ossimJpegYCbCrVector ycbcr(rgb);
+               
+               
+               bands[0][offset] = ycbcr.getY();
+               bands[1][offset] = ycbcr.getCb();
+               bands[2][offset] = ycbcr.getCr();
+               ++offset;
+            }
+         }
+         imageData->validate();
+      }
+      return imageData;
+   }
+   
+   return theBlankTile;
+}  
+
diff --git a/ossim/src/ossim/imaging/ossimRpfCacheTileSource.cpp b/ossim/src/ossim/imaging/ossimRpfCacheTileSource.cpp
new file mode 100644
index 0000000..1a8247b
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimRpfCacheTileSource.cpp
@@ -0,0 +1,1315 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//********************************************************************
+// $Id: ossimRpfCacheTileSource.cpp 1361 2010-08-26 00:24:22Z david.burken $
+#include <algorithm>
+using namespace std;
+
+#include <ossim/imaging/ossimRpfCacheTileSource.h>
+
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimNBandLutDataObject.h>
+#include <ossim/imaging/ossimHistogramWriter.h>
+#include <ossim/imaging/ossimImageHistogramSource.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimContainerProperty.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimEllipsoid.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/support_data/ossimRpfFrame.h>
+#include <ossim/support_data/ossimRpfToc.h>
+#include <ossim/support_data/ossimRpfTocEntry.h>
+#include <ossim/support_data/ossimRpfCompressionSection.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/projection/ossimCylEquAreaProjection.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimPolygon.h>
+
+static ossimTrace traceDebug = ossimTrace("ossimRpfCacheTileSource:debug");
+
+#ifdef OSSIM_ID_ENABLED
+static const char OSSIM_ID[] = "$Id: ossimRpfCacheTileSource.cpp 1361 2010-08-26 00:24:22Z david.burken $";
+#endif
+
+RTTI_DEF1(ossimRpfCacheTileSource, "ossimRpfCacheTileSource", ossimImageHandler)
+
+const ossim_uint32 ossimRpfCacheTileSource::CIBCADRG_FRAME_WIDTH  = 1536;
+const ossim_uint32 ossimRpfCacheTileSource::CIBCADRG_FRAME_HEIGHT = 1536;
+
+ossimRpfCacheTileSource::ossimRpfCacheTileSource()
+   :
+   ossimImageHandler(),
+
+   // a CADRG and CIBis a 64*64*12 bit buffer and must divide by 8 to
+   // convert to bytes   
+   m_compressedBuffer(new ossim_uint8[(64*64*12)/8]),
+
+   // whether CIB or CADRG we will alocate the buffer
+   // to the larger of the 2 (CADRG is 3 bands) 
+   m_uncompressedBuffer(new ossim_uint8[256*256*3]),
+   
+   m_numberOfLines(0),
+   m_numberOfSamples(0),
+   m_tile(0),
+   m_fileNames(),
+   m_tileSize(128, 128),
+   m_productType(OSSIM_PRODUCT_TYPE_UNKNOWN),
+   m_workFrame(new ossimRpfFrame),
+   m_bBox_LL_Lon(0.0),
+   m_bBox_LL_Lat(0.0),
+   m_bBox_UR_Lon(0.0),
+   m_bBox_UR_Lat(0.0),
+   m_numOfFramesVertical(0),
+   m_numOfFramesHorizontal(0),
+   m_frameEntryArray()
+{
+  if (traceDebug())
+  {
+    ossimNotify(ossimNotifyLevel_DEBUG)
+      << "ossimRpfCacheTileSource::ossimRpfCacheTileSource entered...\n";
+#ifdef OSSIM_ID_ENABLED
+    ossimNotify(ossimNotifyLevel_DEBUG)
+      << "OSSIM_ID:  " << OSSIM_ID << "\n";
+#endif      
+  }
+
+  m_actualImageRect.makeNan();
+
+}
+
+ossimRpfCacheTileSource::~ossimRpfCacheTileSource()
+{
+  if(m_compressedBuffer)
+  {
+    delete [] m_compressedBuffer;
+    m_compressedBuffer = 0;
+  }
+  if(m_uncompressedBuffer)
+  {
+    delete [] m_uncompressedBuffer;
+    m_uncompressedBuffer = 0;
+  }
+  if(m_workFrame)
+  {
+    delete m_workFrame;
+    m_workFrame = 0;
+  }
+  close();
+}
+
+ossimString ossimRpfCacheTileSource::getShortName()const
+{
+  return ossimString("RpfCache");
+}
+
+ossimString ossimRpfCacheTileSource::getLongName()const
+{
+  return ossimString("RpfCache reader");
+}
+
+
+void ossimRpfCacheTileSource::close()
+{
+  deleteAll();
+}
+
+bool ossimRpfCacheTileSource::isOpen()const
+{
+  //return (theTableOfContents!=0);
+  ossimString ext = theImageFile.ext().downcase();
+
+  if(ext == "rpf")
+  {
+    return true;
+  }
+  else
+  {
+    return false;
+  }
+}
+
+bool ossimRpfCacheTileSource::open()
+{
+  if(traceDebug())
+  {
+    ossimNotify(ossimNotifyLevel_DEBUG) << "ossimRpfCacheTileSource::open(): Entered....." << std::endl;
+  }
+
+  ossimFilename imageFile = theImageFile;
+  bool result = true;
+
+  if(isOpen() == false)
+  {
+    close();
+    result = false;
+  }
+
+  if(result)
+  {
+    if (m_fileNames.size() == 0 && m_frameEntryArray.size() == 0)
+    {
+      if (buildFrameEntryArray(imageFile) == false)
+      {
+        return false;
+      }
+    }
+    
+    setCurrentEntry(0);
+    //---
+    // Adjust image rect so not to go over the -180 to 180 and -90 to 90
+    // bounds.
+    //---
+    setActualImageRect();
+
+    // Set the base class image file name.
+    theImageFile = imageFile;
+    m_tile = ossimImageDataFactory::instance()->create(this, this);
+    m_tile->initialize();
+  }
+
+  if(traceDebug())
+  {
+    ossimNotify(ossimNotifyLevel_DEBUG) << "ossimRpfCacheTileSource::open(): Leaving at line" << __LINE__ << std::endl;
+  }
+
+  return result;
+}
+
+bool ossimRpfCacheTileSource::buildFrameEntryArray(ossimFilename imageFile)
+{
+   static const char MODULE[] = "ossimRpfCacheTileSource::buildFrameEntryArray";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered..." << endl;
+   }
+
+   std::ifstream in((imageFile).c_str() );
+   
+   std::string line;
+   ossim_uint32 index = 0; // used throughout
+   while( in.good() )
+   {
+      // Read in a line.
+      std::getline(in, line);
+
+      ossimString tmpStr = ossimString(line);
+      if (!tmpStr.empty())
+      {
+         if (index == 0)
+         {
+            std::vector<ossimString> box_lat_lon;
+            tmpStr.split(box_lat_lon, "|");
+            
+            if (box_lat_lon.size() > 2)
+            {
+               std::vector<ossimString> ll;
+               std::vector<ossimString> ur;
+               
+               box_lat_lon[0].split(ll, ",");
+               box_lat_lon[1].split(ur, ",");
+               ossimString bandStr = box_lat_lon[2];
+               
+               m_bBox_LL_Lon = ll[0].toFloat64();
+               m_bBox_LL_Lat = ll[1].toFloat64();
+               m_bBox_UR_Lon = ur[0].toFloat64();
+               m_bBox_UR_Lat = ur[1].toFloat64();
+               
+               checkLongitude(m_bBox_LL_Lon, m_bBox_UR_Lon);
+               
+               ossim_int32 bands = ossimString(bandStr).toInt32();
+               if (bands == 1)
+               {
+                  m_productType = OSSIM_PRODUCT_TYPE_CIB;
+               }
+               else if (bands == 3)
+               {
+                  m_productType = OSSIM_PRODUCT_TYPE_CADRG;
+               }
+            }
+            else
+            {
+               return false;
+            }
+         }
+         else if (index == 1)
+         {
+            m_fileNames.push_back(tmpStr);
+            std::vector<ossimString> frame_lat_lon = tmpStr.split("|");
+            if (frame_lat_lon.size() > 2)
+            {
+               ossimString ll_lon_lat = frame_lat_lon[1];
+               ossimString ur_lon_lat = frame_lat_lon[2];
+               ossim_float64 ll_lon = ossimString(ll_lon_lat.split(",")[0]).toDouble();
+               ossim_float64 ll_lat = ossimString(ll_lon_lat.split(",")[1]).toDouble();
+               ossim_float64 ur_lon = ossimString(ur_lon_lat.split(",")[0]).toDouble();
+               ossim_float64 ur_lat = ossimString(ur_lon_lat.split(",")[1]).toDouble();
+
+               checkLongitude(ll_lon, ur_lon);
+               
+               ossim_float64 bBox_lat_diff = std::fabs(m_bBox_UR_Lat - m_bBox_LL_Lat);
+               ossim_float64 bBox_lon_diff = std::fabs(m_bBox_UR_Lon - m_bBox_LL_Lon);
+               
+               ossim_float64 lat_diff = std::fabs(ur_lat - ll_lat);
+               ossim_float64 lon_diff = std::fabs(ur_lon - ll_lon);
+               
+               m_numOfFramesVertical   = static_cast<ossim_uint32>(bBox_lat_diff/lat_diff + 0.5);
+               m_numOfFramesHorizontal = static_cast<ossim_uint32>(bBox_lon_diff/lon_diff + 0.5);
+               
+               m_numberOfLines   = m_numOfFramesVertical*CIBCADRG_FRAME_HEIGHT;
+               m_numberOfSamples = m_numOfFramesHorizontal*CIBCADRG_FRAME_WIDTH;
+
+               if ( traceDebug() )
+               {
+                  ossimNotify(ossimNotifyLevel_DEBUG)
+                     << "\nscene height in degrees: " << bBox_lat_diff
+                     << "\nscene width in degrees:  " << bBox_lon_diff
+                     << "\nframe height in degrees: " << lat_diff
+                     << "\nframe width in degrees:  " << lon_diff
+                     << "\nframes vertical:         " << m_numOfFramesVertical
+                     << "\nframes horizontal:       " << m_numOfFramesHorizontal
+                     << "\nlines:                   " << m_numberOfLines
+                     << "\nsamples:                 " << m_numberOfSamples << "\n";
+               }
+            }
+            else
+            {
+               return false;
+            }
+         }
+         else
+         {
+            m_fileNames.push_back(tmpStr);
+         }
+         
+      } // matches: if (!tmpStr.empty())
+      
+      ++index;
+      
+   } // matches: while( in.good() )
+   in.close();
+
+   m_frameEntryArray.resize(m_numOfFramesVertical);
+   for(index = 0; index < m_frameEntryArray.size(); ++index)
+   {
+      m_frameEntryArray[index].resize(m_numOfFramesHorizontal);
+   }
+
+   for(index = 0; index < m_fileNames.size(); ++index)
+   {
+      ossimString tmpStr = m_fileNames[index];
+      std::vector<ossimString> frameInfos = tmpStr.split("|");
+      if (frameInfos.size() > 1)
+      {
+         ossimString fileName = frameInfos[0];
+         ossimString ll_lon_lat = frameInfos[1];
+         ossimString ur_lon_lat = frameInfos[2];
+         double ll_lon = ossimString(ll_lon_lat.split(",")[0]).toDouble();
+         double ll_lat = ossimString(ll_lon_lat.split(",")[1]).toDouble();
+         double ur_lon = ossimString(ur_lon_lat.split(",")[0]).toDouble();
+         double ur_lat = ossimString(ur_lon_lat.split(",")[1]).toDouble();
+         
+         checkLongitude(ll_lon, ur_lon);
+         
+         ossim_float64 tmpColPostion = std::fabs(ll_lon - m_bBox_LL_Lon);
+         ossim_float64 tmpFrameLon = std::fabs(ur_lon - ll_lon);
+         
+         ossim_float64 tmpRowPostion = std::fabs(m_bBox_UR_Lat - ur_lat);
+         ossim_float64 tmpFrameLat = std::fabs(ur_lat - ll_lat);
+         
+         ossim_uint32 colNum = static_cast<ossim_uint32>(tmpColPostion/tmpFrameLon + 0.5);
+         ossim_uint32 rowNum = static_cast<ossim_uint32>(tmpRowPostion/tmpFrameLat + 0.5);
+         
+         if (colNum >= m_numOfFramesHorizontal)
+         {
+            colNum = m_numOfFramesHorizontal-1; // Clamp to last column.
+         }
+         
+         if (rowNum >= m_numOfFramesVertical)
+         {
+            rowNum = m_numOfFramesVertical-1; // Clamp to last row.
+         }
+         
+         ossimRpfFrameEntry tempEntry;
+         tempEntry.setEntry(ossimFilename(""), fileName);
+         m_frameEntryArray[rowNum][colNum] = tempEntry;
+      }
+      else
+      {
+         return false;
+      }
+   }
+
+   return true;
+}
+
+void ossimRpfCacheTileSource::checkLongitude(ossim_float64& leftLon,
+                                             const ossim_float64& rightLon) const
+{
+   //---
+   // Test for scene coordinates being 180 to 180 and adjust leftLon to -180
+   // if so.
+   //
+   // NOTE:
+   // Setting tolerance to 1/7200 about 15 meters.
+   // Not sure if this is too loose or not. (drb)
+   //---
+   const ossim_float64 TOLERANCE = 0.000138889; // 1/7200 about 15 meters.
+
+   if ( ossim::almostEqual(leftLon, 180.0, TOLERANCE) )
+   {
+      if ( ossim::almostEqual(rightLon, 180.0, TOLERANCE) )
+      {
+         leftLon = -180.0;
+      }
+   }
+}
+
+ossimRefPtr<ossimImageData> ossimRpfCacheTileSource::getTile(
+  const  ossimIrect& rect, ossim_uint32 resLevel)
+{
+  if (m_tile.valid())
+  {
+    // Image rectangle must be set prior to calling getTile.
+    m_tile->setImageRectangle(rect);
+
+    if ( getTile( m_tile.get(), resLevel ) == false )
+    {
+      if (m_tile->getDataObjectStatus() != OSSIM_NULL)
+      {
+        m_tile->makeBlank();
+      }
+    }
+  }
+
+  return m_tile;
+}
+
+bool ossimRpfCacheTileSource::getTile(ossimImageData* result,
+                                      ossim_uint32 resLevel)
+{
+   bool status = false;
+   
+   //---
+   // Not open, this tile source bypassed, or invalid res level,
+   // return a blank tile.
+   //---
+   if( isOpen() && isSourceEnabled() && isValidRLevel(resLevel) &&
+       result && (result->getNumberOfBands() == getNumberOfOutputBands()) &&
+       (m_productType != OSSIM_PRODUCT_TYPE_UNKNOWN) )
+   {
+      if ( resLevel > 0 )
+      {
+         //---
+         // Check for overview tile.  Some overviews can contain r0 so always
+         // call even if resLevel is 0 (if overview is not virtual).  Method 
+         // returns true on success, false on error.
+         //---
+         status = getOverviewTile(resLevel, result);
+      }
+      
+      if (!status) // Did not get an overview tile.
+      {
+         status = true;
+         
+         ossimIrect rect = result->getImageRectangle();
+         
+         ossimIrect imageRect = getImageRectangle();
+         
+         if ( rect.intersects(imageRect) )
+         {
+            //---
+            // Start with a blank tile in case there is not total coverage
+            // for rect.
+            //---
+            result->makeBlank();
+            
+            vector<ossimFrameEntryData> frames = getIntersectingEntries(rect);
+            if(frames.size() > 0)
+            {
+               //---
+               // Now lets render each frame.  Note we will have to find
+               // subframes
+               // that intersect the rectangle of interest for each frame.
+               //---
+               fillTile(rect, frames, result);
+               
+               // Revalidate tile status.
+               result->validate();
+            }
+         }
+         else
+         {
+            result->makeBlank();
+         }
+      }
+   }
+   
+   return status;
+}
+
+ossim_uint32 ossimRpfCacheTileSource::getNumberOfInputBands()const
+{
+  switch(m_productType)
+  {
+  case  OSSIM_PRODUCT_TYPE_UNKNOWN:
+    {
+      return 0;
+    }
+  case OSSIM_PRODUCT_TYPE_CIB:
+    {
+      return 1;
+    }
+  case OSSIM_PRODUCT_TYPE_CADRG:
+    {
+      return 3;
+    }
+  }
+
+  return 0;
+}
+
+ossim_uint32 ossimRpfCacheTileSource::getNumberOfOutputBands()const
+{
+  switch(m_productType)
+  {
+  case  OSSIM_PRODUCT_TYPE_UNKNOWN:
+    {
+      return 0;
+    }
+  case OSSIM_PRODUCT_TYPE_CIB:
+    {
+      return 1;
+    }
+  case OSSIM_PRODUCT_TYPE_CADRG:
+    {
+      return 3;
+    }
+  }
+
+  return 0;
+}
+
+ossim_uint32 ossimRpfCacheTileSource::getNumberOfLines(ossim_uint32 reduced_res_level) const
+{
+   if (reduced_res_level == 0)
+   {
+      return m_numberOfLines;
+   }
+   else if (theOverview.valid())
+   {
+      return theOverview->getNumberOfLines(reduced_res_level);
+   }
+   
+   return 0;
+}
+
+ossim_uint32 ossimRpfCacheTileSource::getNumberOfSamples(ossim_uint32 reduced_res_level) const
+{
+   if (reduced_res_level == 0)
+   {
+      return m_numberOfSamples;
+   }
+   else if (theOverview.valid())
+   {
+      return theOverview->getNumberOfSamples(reduced_res_level);
+   }
+   
+   return 0;
+}
+
+void ossimRpfCacheTileSource::setActualImageRect()
+{
+   m_actualImageRect = ossimIrect(0,0,m_numberOfLines, m_numberOfSamples);
+}
+
+ossimIrect ossimRpfCacheTileSource::getImageRectangle(ossim_uint32 reduced_res_level) const
+{
+   return ossimIrect(0,                         // upper left x
+                     0,                         // upper left y
+                     getNumberOfSamples(reduced_res_level) - 1,  // lower right x
+                     getNumberOfLines(reduced_res_level)   - 1); // lower right y                     
+}
+
+ossimRefPtr<ossimImageGeometry> ossimRpfCacheTileSource::getImageGeometry()
+{
+   if (theGeometry.valid()) return theGeometry;
+   
+   // datum
+   // WGS 84
+   ossimKeywordlist kwl;
+   const char* prefix = 0; // legacy
+   kwl.add(prefix,
+           ossimKeywordNames::DATUM_KW,
+           "WGE",
+           true);   
+   
+   ossimGpt ul(m_bBox_UR_Lat,m_bBox_LL_Lon);
+   ossimGpt ll(m_bBox_LL_Lat,m_bBox_LL_Lon);
+   ossimGpt ur(m_bBox_UR_Lat,m_bBox_UR_Lon);
+   ossimGpt lr(m_bBox_LL_Lat,m_bBox_UR_Lon);
+
+   double latInterval = fabs(ul.latd() - lr.latd())/ getNumberOfLines();
+   double lonInterval = fabs(ul.lond() - ur.lond())/ getNumberOfSamples();
+
+   kwl.add(prefix,
+           ossimKeywordNames::UL_LAT_KW,
+           ul.latd(),//-(latInterval/2.0),
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::UL_LON_KW,
+           ul.lond(),//+(lonInterval/2.0),
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::LL_LAT_KW,
+           ll.latd(),//+(latInterval/2.0),
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::LL_LON_KW,
+           ll.lond(),//+(lonInterval/2.0),
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::LR_LAT_KW,
+           lr.latd(),//+(latInterval/2.0),
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::LR_LON_KW,
+           lr.lond(),//-(lonInterval/2.0),
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::UR_LAT_KW,
+           ur.latd(),//-(latInterval/2.0),
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::UR_LON_KW,
+           ur.lond(),//-(latInterval/2.0),
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::NUMBER_INPUT_BANDS_KW,
+           getNumberOfInputBands(),
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::NUMBER_OUTPUT_BANDS_KW,
+           getNumberOfOutputBands(),
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::NUMBER_LINES_KW,
+           getNumberOfLines(),
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::NUMBER_SAMPLES_KW,
+           getNumberOfSamples(),
+           true);
+
+
+   //---
+   // Make a projection to get the easting / northing of the tie point and
+   // the scale in meters.  This will only be used by the CIB.
+   //---
+   kwl.add(prefix,
+           ossimKeywordNames::DATUM_KW,
+           "WGE",
+           true);
+
+   ossimGpt origin((ul.latd()+lr.latd())*.5,
+                   (ul.lond()+lr.lond())*.5,
+                   0.0);
+
+   double deltaLatPerPixel = latInterval;
+   double deltaLonPerPixel = lonInterval;
+
+   ossimDpt tie;
+
+   tie.lat = ul.latd() - deltaLatPerPixel/2.0;
+   tie.lon = ul.lond() + deltaLonPerPixel/2.0;
+
+   kwl.add(prefix, 
+           ossimKeywordNames::TIE_POINT_XY_KW,
+           tie.toString(),
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT,
+           deltaLatPerPixel,
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON,
+           deltaLonPerPixel,
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::ORIGIN_LATITUDE_KW,
+           origin.latd(),
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::CENTRAL_MERIDIAN_KW,
+           origin.lond(),
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::TIE_POINT_LAT_KW,
+           ul.latd()-(deltaLatPerPixel/2.0),
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::TIE_POINT_LON_KW,
+           ul.lond()+(deltaLonPerPixel/2.0),
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::TYPE_KW,
+           "ossimEquDistCylProjection",
+           true);
+  
+   // Capture this for next time.
+   theGeometry = new ossimImageGeometry;
+   theGeometry->loadState(kwl, prefix);
+
+   // Set image things the geometry object should know about.
+   initImageParameters( theGeometry.get() ); 
+
+   return theGeometry;
+}
+
+ossimScalarType ossimRpfCacheTileSource::getOutputScalarType() const
+{
+   return OSSIM_UCHAR;
+}
+
+ossim_uint32 ossimRpfCacheTileSource::getTileWidth() const
+{
+   return m_tileSize.x;
+}
+
+ossim_uint32 ossimRpfCacheTileSource::getTileHeight() const
+{
+   return m_tileSize.y;
+}
+
+bool ossimRpfCacheTileSource::setCurrentEntry(ossim_uint32 entryIdx)
+{
+   // Clear the geometry.
+   theGeometry = 0;
+
+   // Must clear or openOverview will use last entries.
+   theOverviewFile.clear();
+
+   if(!setEntryToRender(entryIdx))
+   {
+      return false;
+   }
+   completeOpen();
+
+   return true;
+}
+
+void ossimRpfCacheTileSource::getEntryList(std::vector<ossim_uint32>& entryList)const
+{
+   entryList.push_back(0);
+}
+
+bool ossimRpfCacheTileSource::setEntryToRender(ossim_uint32 /* index */)
+{
+   if(isOpen())
+   { 
+      populateLut();
+      return true;
+   }
+
+   return false;
+}
+
+bool ossimRpfCacheTileSource::isValidRLevel(ossim_uint32 reduced_res_level) const
+{
+   if (reduced_res_level == 0)
+   {
+      return true;
+   }
+   else if (theOverview.valid())
+   {
+      return theOverview->isValidRLevel(reduced_res_level);
+   }
+   else
+   {
+      return false;
+   }
+}
+
+vector<ossimRpfCacheTileSource::ossimFrameEntryData> ossimRpfCacheTileSource::getIntersectingEntries(const ossimIrect& rect)
+{
+   vector<ossimFrameEntryData> result;
+
+   // make sure we have the Toc entry to render
+   if(!isOpen()) return result;
+
+   ossimIrect imageRect = getImageRectangle();
+   if(rect.intersects(imageRect))
+   {
+      ossimIrect clipRect  = rect.clipToRect(imageRect);
+      ossimIrect frameRect(clipRect.ul().x/CIBCADRG_FRAME_WIDTH,
+                           clipRect.ul().y/CIBCADRG_FRAME_HEIGHT,
+                           clipRect.lr().x/CIBCADRG_FRAME_WIDTH,
+                           clipRect.lr().y/CIBCADRG_FRAME_HEIGHT);
+
+      for(ossim_int32 row = frameRect.ul().y; row <= frameRect.lr().y; ++row)
+      {
+         for(ossim_int32 col = frameRect.ul().x; col <= frameRect.lr().x; ++col)
+         {
+            ossimRpfFrameEntry tempEntry = m_frameEntryArray[row][col];
+            if(tempEntry.exists())
+            {
+               result.push_back(ossimFrameEntryData(row,
+                                                    col,
+                                                    row*CIBCADRG_FRAME_HEIGHT,
+                                                    col*CIBCADRG_FRAME_WIDTH,
+                                                    tempEntry));
+            }
+         }
+      }
+   }
+
+   return result;
+}
+
+void ossimRpfCacheTileSource::fillTile(
+   const ossimIrect& tileRect,
+   const vector<ossimFrameEntryData>& framesInvolved,
+   ossimImageData* tile)
+{
+   ossim_uint32 idx = 0;
+   for(idx = 0;
+       idx < framesInvolved.size();
+       ++idx)
+   {
+
+      if(m_workFrame->parseFile(framesInvolved[idx].theFrameEntry.getFullPath())
+         == ossimErrorCodes::OSSIM_OK)
+      {
+         // we will fill a subtile.  We pass in which frame it is and the position of the frame.
+         // the actual pixel will be 1536*row and 1536 *col.
+         if(m_productType == OSSIM_PRODUCT_TYPE_CIB)
+         {
+            fillSubTileCib(*m_workFrame,
+                           tileRect,
+                           framesInvolved[idx],
+                           tile);
+         }
+         else
+         {
+            fillSubTileCadrg(*m_workFrame,
+                             tileRect,
+                             framesInvolved[idx],
+                             tile);
+         }
+      }
+   }
+}
+
+void ossimRpfCacheTileSource::fillSubTileCadrg(
+   const ossimRpfFrame&  aFrame,
+   const ossimIrect& tileRect,
+   const ossimFrameEntryData& frameEntryData,
+   ossimImageData* tile)
+{;
+// first let's grab the absolute position of the frame rectangle in pixel space
+   ossimIrect frameRect(frameEntryData.thePixelCol,
+                        frameEntryData.thePixelRow,
+                        frameEntryData.thePixelCol + CIBCADRG_FRAME_WIDTH  - 1,
+                        frameEntryData.thePixelRow + CIBCADRG_FRAME_HEIGHT - 1);
+
+
+// now clip it to the tile
+   ossimIrect clipRect = tileRect.clipToRect(frameRect);
+
+   const ossimRpfCompressionSection* compressionSection = aFrame.getCompressionSection();
+
+   if(!compressionSection)
+   {
+      return;
+   }
+
+   const vector<ossimRpfColorGrayscaleTable>& colorTable =
+      aFrame.getColorGrayscaleTable();
+
+// ESH 03/2009 -- Partial fix for ticket #646.
+// Crash fix on reading RPFs: Make sure the colorTable vector 
+// has entries before trying to make use of them. 
+   int numTables = (int)colorTable.size();
+   if ( numTables <= 0 )
+   {
+      return;
+   }
+
+   ossim_uint8 *tempRows[3];
+
+   tempRows[0] = m_uncompressedBuffer;
+   tempRows[1] = (m_uncompressedBuffer + 256*256);
+   tempRows[2] = (tempRows[1] + 256*256);
+
+// find the shift to 0,0
+   ossimIpt tempDelta(clipRect.ul().x - frameEntryData.thePixelCol,
+                      clipRect.ul().y - frameEntryData.thePixelRow);
+
+
+// In order to compute the subframe we will need the corner offsets of
+// the upper left of the frame and the upper left of the clip rect.  The
+// clip rect should be completely within the frame.  This just translates the value
+// to make the upper left of the frame be 0,0.
+//
+   ossimIrect offsetRect(tempDelta.x,
+                         tempDelta.y,
+                         tempDelta.x + clipRect.width()-1,
+                         tempDelta.y + clipRect.height()-1);
+
+// each subframe is 64x64.  We will actually use 256x256 since
+// we will be uncompressing them.  Note CADRG is a 256x256 tile
+// compressed to 64x64x12 bit data
+//
+   ossimIrect subFrameRect(offsetRect.ul().x/256,
+                           offsetRect.ul().y/256,
+                           (offsetRect.lr().x)/256,
+                           (offsetRect.lr().y)/256);
+
+   ossim_uint32 readPtr  = 0;
+
+   ossim_int32 row = 0;
+   ossim_int32 col = 0;
+   ossim_uint32 i = 0;
+   ossim_uint32 j = 0;
+   ossim_int32 upperY = subFrameRect.lr().y;
+   ossim_int32 upperX = subFrameRect.lr().x;
+   ossim_int32 lowerY = subFrameRect.ul().y;
+   ossim_int32 lowerX = subFrameRect.ul().x; 
+   for(row = lowerY; row <= upperY; ++row)
+   {
+      for(col = lowerX; col <= upperX; ++col)
+      {
+         readPtr = 0;
+         if(aFrame.fillSubFrameBuffer(m_compressedBuffer, 0, row, col))
+         {
+            for (i = 0; i < 256; i += 4)
+            {
+               for (j = 0; j < 256; j += 8)
+               {
+                  ossim_uint16 firstByte  = m_compressedBuffer[readPtr++] & 0xff;
+                  ossim_uint16 secondByte = m_compressedBuffer[readPtr++] & 0xff;
+                  ossim_uint16 thirdByte  = m_compressedBuffer[readPtr++] & 0xff;
+
+                  //because dealing with half-bytes is hard, we
+                  //uncompress two 4x4 tiles at the same time. (a
+                  //4x4 tile compressed is 12 bits )
+                  // this little code was grabbed from openmap software.
+
+                  /* Get first 12-bit value as index into VQ table */
+                  // I think we need to swap
+                  ossim_uint16 val1 = (firstByte << 4) | (secondByte >> 4);
+
+                  /* Get second 12-bit value as index into VQ table*/
+                  ossim_uint16 val2 = ((secondByte & 0x000F) << 8) | thirdByte;
+
+                  for (ossim_uint32 t = 0; t < 4; ++t)
+                  {
+                     for (ossim_uint32 e = 0; e < 4; ++e)
+                     {
+                        ossim_uint16 tableVal1 = compressionSection->getTable()[t].theData[val1*4 + e] & 0xff;
+                        ossim_uint16 tableVal2 = compressionSection->getTable()[t].theData[val2*4 + e] & 0xff;
+
+                        ossim_uint32 pixindex = ((i+t)*256) +
+                           (j + e);
+                        const ossim_uint8* color1 = colorTable[0].getStartOfData(tableVal1);
+                        const ossim_uint8* color2 = colorTable[0].getStartOfData(tableVal2);
+
+
+                        tempRows[0][pixindex] = color1[0];
+                        tempRows[1][pixindex] = color1[1];
+                        tempRows[2][pixindex] = color1[2];
+
+                        tempRows[0][pixindex+4] = color2[0];
+                        tempRows[1][pixindex+4] = color2[1];
+                        tempRows[2][pixindex+4] = color2[2];
+                     } //for e
+                  } //for t
+               }  /* for j */
+            } //for i
+         }
+         else
+         {
+            memset(m_uncompressedBuffer, 0, 256*256*3);
+         }
+         ossim_int32 tempCol = col*256;
+         ossim_int32 tempRow = row*256;
+         ossimIrect subRectToFill(frameRect.ul().x + tempCol,
+                                  frameRect.ul().y + tempRow,
+                                  frameRect.ul().x + tempCol + 255,
+                                  frameRect.ul().y + tempRow + 255);
+         tile->loadTile(m_uncompressedBuffer,
+                        subRectToFill,
+                        OSSIM_BSQ);
+      }
+   }
+}
+
+void ossimRpfCacheTileSource::fillSubTileCib(
+   const ossimRpfFrame&  aFrame,
+   const ossimIrect& tileRect,
+   const ossimFrameEntryData& frameEntryData,
+   ossimImageData* tile)
+{
+   // first let's grab the absolute position of the frame rectangle in pixel
+   // space
+   ossimIrect frameRect(frameEntryData.thePixelCol,
+                        frameEntryData.thePixelRow,
+                        frameEntryData.thePixelCol + CIBCADRG_FRAME_WIDTH  - 1,
+                        frameEntryData.thePixelRow + CIBCADRG_FRAME_HEIGHT - 1);
+
+
+   // now clip it to the tile
+   ossimIrect clipRect = tileRect.clipToRect(frameRect);
+
+   const ossimRpfCompressionSection* compressionSection = aFrame.getCompressionSection();
+
+   if(!compressionSection)
+   {
+      return;
+   }
+
+   const vector<ossimRpfColorGrayscaleTable>& colorTable =
+      aFrame.getColorGrayscaleTable();
+
+   // ESH 03/2009 -- Partial fix for ticket #646.
+   // Crash fix on reading RPFs: Make sure the colorTable vector 
+   // has entries before trying to make use of them. 
+   int numTables = (int)colorTable.size();
+   if ( numTables <= 0 )
+   {
+      return;
+   }
+
+   // check to see if it does overlap.  If it doesn't then the width and height
+   // will be a single point
+   {
+      ossim_uint8 *tempRow;
+
+      tempRow = m_uncompressedBuffer;
+
+      // find the shift to 0,0
+      ossimIpt tempDelta(clipRect.ul().x - frameEntryData.thePixelCol,
+                         clipRect.ul().y - frameEntryData.thePixelRow);
+
+      // In order to compute the subframe we will need the corner offsets of
+      // the upper left of the frame and the upper left of the clip rect.  The
+      // clip rect should be completely within the frame.  This just translates the value
+      // to make the upper left of the frame be 0,0.
+      //
+      ossimIrect offsetRect(tempDelta.x,
+                            tempDelta.y,
+                            tempDelta.x + clipRect.width()-1,
+                            tempDelta.y + clipRect.height()-1);
+
+      // each subframe is 64x64.  We will actually use 256x256 since
+      // we will be uncompressing them.  Note CADRG is a 256x256 tile
+      // compressed to 64x64x12 bit data
+      //
+      ossimIrect subFrameRect(offsetRect.ul().x/256,
+                              offsetRect.ul().y/256,
+                              (offsetRect.lr().x)/256,
+                              (offsetRect.lr().y)/256);
+
+      ossim_int32 row = 0;
+      ossim_int32 col = 0;
+      ossim_uint32 i = 0;
+      ossim_uint32 j = 0;
+      ossim_uint32 readPtr = 0;
+      for(row = subFrameRect.ul().y; row <= subFrameRect.lr().y; ++row)
+      {
+         for(col = subFrameRect.ul().x; col <= subFrameRect.lr().x; ++col)
+         {
+            readPtr = 0;
+            if(aFrame.fillSubFrameBuffer(m_compressedBuffer, 0, row, col))
+            {
+               for (i = 0; i < 256; i += 4)
+               {
+                  for (j = 0; j < 256; j += 8)
+                  {
+                     ossim_uint16 firstByte  = m_compressedBuffer[readPtr++] & 0xff;
+                     ossim_uint16 secondByte = m_compressedBuffer[readPtr++] & 0xff;
+                     ossim_uint16 thirdByte  = m_compressedBuffer[readPtr++] & 0xff;
+
+                     //because dealing with half-bytes is hard, we
+                     //uncompress two 4x4 tiles at the same time. (a
+                     //4x4 tile compressed is 12 bits )
+                     // this little code was grabbed from openmap software.
+
+                     /* Get first 12-bit value as index into VQ table */
+                     // I think we need to swap
+                     ossim_uint16 val1 = (firstByte << 4) | (secondByte >> 4);
+
+                     /* Get second 12-bit value as index into VQ table*/
+                     ossim_uint16 val2 = ((secondByte & 0x000F) << 8) | thirdByte;
+
+                     for (ossim_uint32 t = 0; t < 4; ++t)
+                     {
+                        for (ossim_uint32 e = 0; e < 4; ++e)
+                        {
+                           ossim_uint16 tableVal1 = compressionSection->getTable()[t].theData[val1*4 + e] & 0xff;
+                           ossim_uint16 tableVal2 = compressionSection->getTable()[t].theData[val2*4 + e] & 0xff;
+
+                           ossim_uint32 pixindex = ((i+t)*256) + (j + e);
+                           const ossim_uint8* color1 = colorTable[0].getStartOfData(tableVal1);
+                           const ossim_uint8* color2 = colorTable[0].getStartOfData(tableVal2);
+
+
+                           tempRow[pixindex]      = color1[0];
+                           tempRow[pixindex + 4]  = color2[0];
+                        } //for e
+                     } //for t
+                  }  /* for j */
+               } //for i
+            }
+            else
+            {
+               memset(m_uncompressedBuffer, 0, 256*256);
+            }
+            ossim_int32 tCol = col*256;
+            ossim_int32 tRow = row*256;
+            ossimIrect subRectToFill(frameRect.ul().x + tCol,
+                                     frameRect.ul().y + tRow,
+                                     frameRect.ul().x + tCol + 255,
+                                     frameRect.ul().y + tRow + 255);
+            tile->loadTile(m_uncompressedBuffer,
+                           subRectToFill,
+                           OSSIM_BSQ);
+         }
+      }
+   }  
+}
+
+void ossimRpfCacheTileSource::allocateForProduct()
+{
+   if(m_productType ==  OSSIM_PRODUCT_TYPE_UNKNOWN)
+   {
+      return;
+   }
+   if(m_uncompressedBuffer)
+   {
+      delete [] m_uncompressedBuffer;
+      m_uncompressedBuffer = 0;
+   }
+   if(m_compressedBuffer)
+   {
+      delete [] m_compressedBuffer;
+      m_compressedBuffer = 0;
+   }
+
+   // a CADRG and CIBis a 64*64*12 bit buffer and must divide by 8 to
+   // convert to bytes
+   m_compressedBuffer   = new ossim_uint8[(64*64*12)/8];
+   if(m_productType == OSSIM_PRODUCT_TYPE_CIB)
+   {
+      m_uncompressedBuffer = new ossim_uint8[256*256];
+   }
+   else
+   {
+      m_uncompressedBuffer = new ossim_uint8[256*256*3];
+   }
+
+   m_tile = ossimImageDataFactory::instance()->create(this, this);
+   m_tile->initialize();
+}
+
+void ossimRpfCacheTileSource::deleteAll()
+{
+   theOverview = 0;
+}
+
+bool ossimRpfCacheTileSource::saveState(ossimKeywordlist& kwl,
+                                        const char* prefix)const
+{
+   bool result = ossimImageHandler::saveState(kwl, prefix);
+
+   return result;
+}
+
+bool ossimRpfCacheTileSource::loadState(const ossimKeywordlist& kwl,
+                                        const char* prefix)
+{
+   const char* MODULE = "ossimRpfCacheTileSource::loadState";
+
+   if(traceDebug())
+   {
+      CLOG << "Entering..." << endl;
+   }
+   bool result = ossimImageHandler::loadState(kwl, prefix);
+
+   if(!result)
+   {
+      if(traceDebug())
+      {
+         CLOG << "Leaving..." << endl;
+      }
+      return false;
+   }
+   const char* lookup = 0;
+   lookup = kwl.find(ossimString(prefix), "entry");
+   ossim_int32 entry = ossimString(lookup).toInt32();
+
+   // if an entry is specified then
+   // call the open with an entry number
+   if(lookup)
+   {
+      if(traceDebug())
+      {
+         CLOG << "Leaving..." << endl;
+      }
+      result = ossimImageHandler::open(theImageFile);
+      setCurrentEntry(entry);
+      return result;
+   }
+
+   result = ossimImageHandler::open(theImageFile);
+
+   return result;
+}
+
+ossim_uint32 ossimRpfCacheTileSource::getImageTileWidth() const
+{
+   return 256;
+}
+
+ossim_uint32 ossimRpfCacheTileSource::getImageTileHeight() const
+{
+   return 256;
+}
+
+bool ossimRpfCacheTileSource::isCib() const
+{
+   return (m_productType==OSSIM_PRODUCT_TYPE_CIB);
+}
+
+bool ossimRpfCacheTileSource::isCadrg() const
+{
+   return (m_productType==OSSIM_PRODUCT_TYPE_CADRG);
+}
+
+ossimRefPtr<ossimProperty> ossimRpfCacheTileSource::getProperty(const ossimString& name)const
+{
+   if(name == "file_type")
+   {
+      if(m_productType == OSSIM_PRODUCT_TYPE_CIB)
+      {
+         return new ossimStringProperty("file_type", "CIB");
+      }
+      else if(m_productType == OSSIM_PRODUCT_TYPE_CADRG)
+      {
+         return new ossimStringProperty("file_type", "CADRG");
+      }
+      return 0;
+   }
+   return ossimImageHandler::getProperty(name);
+}
+
+void ossimRpfCacheTileSource::populateLut()
+{
+   theLut = 0;
+   if(m_fileNames.size() > 0)
+   {
+      // bool found = false;
+      ossimRpfFrameEntry tempEntry;
+      ossimRpfFrame aFrame;
+      ossimFilename fileName = m_fileNames[0].split("|")[0];
+      // if (fileName.exists())
+      // {
+      //    found = true;
+      // }
+
+      if(aFrame.parseFile(fileName)
+         == ossimErrorCodes::OSSIM_OK)
+      {
+         const vector<ossimRpfColorGrayscaleTable>& colorTable =
+            aFrame.getColorGrayscaleTable();
+
+         // ESH 03/2009 -- Partial fix for ticket #646.
+         // Crash fix on reading RPFs: Make sure the colorTable vector 
+         // has entries before trying to make use of them. 
+         int numTables = (int)colorTable.size();
+
+         ossim_uint32 numElements = (numTables > 0) ? colorTable[0].getNumberOfElements() : 0;
+         if(numElements > 0)
+         {
+            if((m_productType == OSSIM_PRODUCT_TYPE_CIB)||
+               (m_productType == OSSIM_PRODUCT_TYPE_CADRG))
+            {
+               theLut = new ossimNBandLutDataObject(numElements,
+                                                    3,
+                                                    OSSIM_UINT8);
+            }
+            else
+            {
+               theLut = 0;
+               return;
+            }
+            ossim_uint32 idx = 0;
+
+            for(idx = 0; idx < numElements;++idx)
+            {
+               const ossim_uint8* startOfData = colorTable[0].getStartOfData(idx);
+               switch(m_productType)
+               {
+                  case OSSIM_PRODUCT_TYPE_CIB:
+                  {
+                     (*theLut)[idx][0] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[0]);
+                     (*theLut)[idx][1] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[0]);
+                     (*theLut)[idx][2] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[0]);
+                     break;
+                  }
+                  case OSSIM_PRODUCT_TYPE_CADRG:
+                  {
+                     (*theLut)[idx][0] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[0]);
+                     (*theLut)[idx][1] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[1]);
+                     (*theLut)[idx][2] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[2]);
+                     break;
+                  }
+                  default:
+                  {
+                     break;
+                  }
+               }
+            }
+         }
+      }
+   }
+}
+
+void ossimRpfCacheTileSource::establishDecimationFactors()
+{
+   theDecimationFactors.clear();
+   
+   // Just needed to set the first R level here, the base class can do the rest:
+   ossimImageHandler::establishDecimationFactors();
+}
+
+
diff --git a/src/ossim/imaging/ossimS16ImageData.cpp b/ossim/src/ossim/imaging/ossimS16ImageData.cpp
similarity index 100%
rename from src/ossim/imaging/ossimS16ImageData.cpp
rename to ossim/src/ossim/imaging/ossimS16ImageData.cpp
diff --git a/ossim/src/ossim/imaging/ossimSFIMFusion.cpp b/ossim/src/ossim/imaging/ossimSFIMFusion.cpp
new file mode 100644
index 0000000..7e57daa
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimSFIMFusion.cpp
@@ -0,0 +1,409 @@
+//*******************************************************************
+// Copyright (C) 2005 Garrett Potts
+//
+// LICENSE:  See top level LICENSE.txt
+// 
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimSFIMFusion.cpp 22755 2014-04-30 19:50:30Z dburken $
+#include <ossim/imaging/ossimSFIMFusion.h>
+#include <ossim/matrix/newmat.h>
+#include <ossim/matrix/newmatio.h>
+#include <ossim/base/ossimNumericProperty.h>
+#include <ossim/base/ossim2dLinearRegression.h>
+#include <ossim/base/ossimNormRgbVector.h>
+#include <ossim/base/ossimHsiVector.h>
+#include <ossim/base/ossimVisitor.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimBooleanProperty.h>
+
+RTTI_DEF2(ossimSFIMFusion, "ossimSFIMFusion", ossimFusionCombiner, ossimAdjustableParameterInterface);
+
+
+static const ossim_uint32 HIGH_PASS_GAIN_OFFSET = 0;
+static const ossim_uint32 LOW_PASS_WIDTH_OFFSET = 1;
+static const ossim_uint32  NUMBER_OF_ADJUSTABLE_PARAMETERS = 2;
+
+ossimSFIMFusion::ossimSFIMFusion()
+   :theLowPassKernelWidth(1.5),
+    theHighPassKernelWidth(3)
+{
+   theAutoAdjustScales = true;
+   theLowPassFilter  = new ossimImageGaussianFilter;
+   theHighPassFilter = new ossimConvolutionSource;
+
+   setFilters();
+
+   initAdjustableParameters();
+}
+
+ossimSFIMFusion::~ossimSFIMFusion()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimSFIMFusion::getTile(const ossimIrect& rect,
+                                                     ossim_uint32 resLevel)
+{
+   if(!theInputConnection)
+   {
+      return ossimRefPtr<ossimImageData>();
+   }
+
+   if (!theIntensityConnection)
+   {
+      return theInputConnection->getTile(rect, resLevel);
+   }
+   
+   if(!theNormLowPassTile.valid())
+   {
+      theNormLowPassTile = new ossimImageData(this,
+                                              OSSIM_NORMALIZED_FLOAT,
+                                              1,
+                                              rect.width(),
+                                              rect.height());
+      theNormHighPassTile = new ossimImageData(this,
+                                              OSSIM_NORMALIZED_FLOAT,
+                                               1,
+                                               rect.width(),
+                                               rect.height());
+      theNormLowPassTile->initialize();
+      theNormHighPassTile->initialize();
+   }
+
+   theNormLowPassTile->setImageRectangle(rect);
+   theNormHighPassTile->setImageRectangle(rect);
+   theNormLowPassTile->makeBlank();
+   theNormHighPassTile->makeBlank();
+
+   if(!theLowPassFilter->getInput() && getInput())
+   {
+      initialize();
+   }
+
+   ossimRefPtr<ossimImageData> lowTile  = theLowPassFilter->getTile(rect, resLevel);
+   ossimRefPtr<ossimImageData> highTile = theHighPassFilter->getTile(rect, resLevel);
+//   ossimRefPtr<ossimImageData> highTile = getNormIntensity(rect, resLevel);
+
+   // if we don't have valid low and high pass then return the input color tile
+   // in its original format
+   //
+   if(!lowTile.valid()||!highTile.valid())
+   {
+//       return theInputConnection->getTile(rect, resLevel);
+      return 0;
+   }
+
+   if((lowTile->getDataObjectStatus() == OSSIM_EMPTY)||
+      (!lowTile->getBuf()) ||
+      (highTile->getDataObjectStatus() == OSSIM_EMPTY)||
+      (!highTile->getBuf()))
+   {
+//      return theInputConnection->getTile(rect, resLevel);
+      return 0;
+   }
+
+   ossimRefPtr<ossimImageData> normColorData = getNormTile(rect, resLevel);
+   
+   if(!normColorData.valid())
+   {
+     return 0;
+//      return theTile;
+   }
+
+   // Must set the rectangle before querrying height and width.
+   theTile->setImageRectangle(rect);
+
+   // Do a make blank in case the whole tile is not stuffed.
+   theTile->makeBlank();
+
+   if((normColorData->getDataObjectStatus() == OSSIM_EMPTY)||
+      !normColorData->getBuf())
+   {
+      return theTile;
+   }
+   
+   ossim_uint32 y = 0;
+   ossim_uint32 x = 0;
+   ossim_uint32 w = theTile->getWidth();
+   ossim_uint32 h = theTile->getHeight();
+
+   ossimRefPtr<ossimImageData> normColorOutputData = (ossimImageData*)normColorData->dup();
+   normColorOutputData->setImageRectangle(rect);
+   normColorOutputData->loadTile(normColorData.get());
+   
+   // ossim_float64 slopeResult = 0.0;
+   ossim_uint32 idx = 0;
+   std::vector<ossim_float32*> bands(normColorData->getNumberOfBands());
+
+   // Use copyTileBand... in case n-band data passed in for pan input.
+   lowTile->copyTileBandToNormalizedBuffer(0, (ossim_float32*)theNormLowPassTile->getBuf());
+   highTile->copyTileBandToNormalizedBuffer(0, (ossim_float32*)theNormHighPassTile->getBuf());
+
+   theNormLowPassTile->validate();
+   theNormHighPassTile->validate();
+   ossimRefPtr<ossimImageData> lowPan = (ossimImageData*)theNormLowPassTile->dup();
+   lowPan->setImageRectangle(rect);
+   lowPan->loadTile(theNormLowPassTile.get());
+   ossimRefPtr<ossimImageData> highPan = (ossimImageData*)theNormHighPassTile->dup();
+   highPan->setImageRectangle(rect);
+   highPan->loadTile(theNormHighPassTile.get());
+   
+   ossim_float32* panHigh = (ossim_float32*)highPan->getBuf();
+   ossim_float32* panLow  = (ossim_float32*)lowPan->getBuf();
+   for(idx = 0; idx < bands.size(); ++idx)
+   {
+      bands[idx] = (ossim_float32*)normColorOutputData->getBuf(idx);
+   }
+   // double delta = 0.0;
+   ossim_uint32 bandsSize = (ossim_uint32)bands.size();
+   double normMinPix = 0.0;
+   for(y = 0; y < h; ++y)
+   {
+      for(x = 0; x < w; ++x)
+      {
+         for(idx = 0; idx < bandsSize; ++idx)
+         {
+            if((*bands[idx] != 0.0)&&
+               (*panLow > FLT_EPSILON) ) // if band is not null and not divide by 0
+            {
+               normMinPix = (ossim_float32)normColorOutputData->getMinPix(idx);
+               *bands[idx] = ((*bands[idx])*(*panHigh))/
+                  (*panLow);
+               if(*bands[idx] > 1.0) *bands[idx] = 1.0;
+               if(*bands[idx] < normMinPix) *bands[idx] = normMinPix;
+            }
+            // let's comment out the nulling and we will instead just pass the color on
+            //
+//            else
+//            {
+//               *bands[idx] = 0.0;
+//            }
+            ++bands[idx];
+         }
+         ++panHigh;
+         ++panLow;
+      }
+   }
+   
+   theTile->copyNormalizedBufferToTile((ossim_float32*)normColorOutputData->getBuf());
+   theTile->validate();
+   
+   return theTile;
+}
+
+void ossimSFIMFusion::initialize()
+{
+   ossimFusionCombiner::initialize();
+   if(!theIntensityConnection)
+   {
+      theLowPassFilter->disconnectAllInputs();
+      theHighPassFilter->disconnectAllInputs();
+   }
+   else
+   {
+      theLowPassFilter->connectMyInputTo(0, PTR_CAST(ossimConnectableObject,
+                                                     theIntensityConnection->getObject()));
+      theHighPassFilter->connectMyInputTo(0, PTR_CAST(ossimConnectableObject,
+                                                      theIntensityConnection->getObject()));
+      adjustableParametersChanged();
+      setFilters();
+      theLowPassFilter->initialize();
+      theHighPassFilter->initialize();
+      if(theAutoAdjustScales)
+      {
+         if(theInputConnection && theIntensityConnection)
+         {
+            ossimTypeNameVisitor visitor("ossimImageRenderer", true);
+            
+            theInputConnection->accept(visitor);
+            ossimRefPtr<ossimConnectableObject> inputColor = visitor.getObjectAs<ossimConnectableObject>();
+            visitor.reset();
+            theIntensityConnection->accept(visitor);
+            ossimRefPtr<ossimConnectableObject> inputPan = visitor.getObjectAs<ossimConnectableObject>();
+            
+            
+            if(inputColor.valid()&&inputPan.valid())
+            {
+               ossimImageSource* inputColorSource = dynamic_cast<ossimImageSource*> (inputColor->getInput());
+               ossimImageSource* inputPanSource = dynamic_cast<ossimImageSource*> (inputPan->getInput());
+               
+               if(inputColorSource&&inputPanSource)
+               {
+                  ossimRefPtr<ossimImageGeometry> colorGeom     = inputColorSource->getImageGeometry();
+                  ossimRefPtr<ossimImageGeometry> intensityGeom = inputPanSource->getImageGeometry();
+                  if(colorGeom.valid()&&intensityGeom.valid())
+                  {
+                     ossimDpt gsdIntensity = intensityGeom->getMetersPerPixel();
+                     ossimDpt gsdColor     = colorGeom->getMetersPerPixel();
+                     if(!gsdColor.hasNans()&&!gsdIntensity.hasNans())
+                     {
+                        double scaleChange = gsdColor.length()/gsdIntensity.length();
+                        if(scaleChange < 1.0) scaleChange = 1.0;
+                        setParameterOffset(LOW_PASS_WIDTH_OFFSET,
+                                           scaleChange);
+                     }
+                  }
+               }
+            }
+         }
+      }
+   }
+}
+
+void ossimSFIMFusion::setFilters()
+{
+   theLowPassFilter->setGaussStd(theLowPassKernelWidth);
+   
+   theHighPassMatrix = NEWMAT::Matrix(theHighPassKernelWidth, theHighPassKernelWidth);
+   theHighPassMatrix = 0;
+   theHighPassMatrix[theHighPassKernelWidth>>1][theHighPassKernelWidth>>1] = 1;
+   
+   // adjust the gain for the high pass filter
+   //
+   NEWMAT::Matrix high =  theHighPassMatrix;
+
+   ossim_float64 kernelW2 = theHighPassKernelWidth*theHighPassKernelWidth;
+   double gain = computeParameterOffset(HIGH_PASS_GAIN_OFFSET)*(kernelW2);
+   double multiplier = gain/(kernelW2);
+   high = -multiplier;
+   ossim_int32 cx = theHighPassKernelWidth>>1;
+   ossim_int32 cy = theHighPassKernelWidth>>1;
+
+   if(gain > FLT_EPSILON)
+   {
+      high[cy][cx] = multiplier* ( (kernelW2-1)+kernelW2/gain);
+   }
+   else
+   {
+      high = 0.0;
+      high[cy][cx] = 1.0;
+   }
+
+   theHighPassFilter->setConvolution(high);
+}
+
+void ossimSFIMFusion::initAdjustableParameters()
+{
+   resizeAdjustableParameterArray(NUMBER_OF_ADJUSTABLE_PARAMETERS);
+
+   setAdjustableParameter(HIGH_PASS_GAIN_OFFSET,
+                          -1.0);
+   setParameterDescription(HIGH_PASS_GAIN_OFFSET,
+                           "High pass gain");
+   setParameterSigma(HIGH_PASS_GAIN_OFFSET,
+                     1);
+   setParameterCenter(HIGH_PASS_GAIN_OFFSET,
+                      1.0);
+
+   setAdjustableParameter(LOW_PASS_WIDTH_OFFSET,
+                          -1);
+   setParameterDescription(LOW_PASS_WIDTH_OFFSET,
+                           "Low pass kernel width");
+   setParameterSigma(LOW_PASS_WIDTH_OFFSET,
+                     40);
+   setParameterCenter(LOW_PASS_WIDTH_OFFSET,
+                      40.5);
+   
+
+   setParameterOffset(LOW_PASS_WIDTH_OFFSET,
+                      1.5);
+}
+
+void ossimSFIMFusion::adjustableParametersChanged()
+{
+//   std::cout << "Parameter offset = " << computeParameterOffset(2) << std::endl;
+   theLowPassKernelWidth = (ossim_uint32)(ossim::round<int>(computeParameterOffset(LOW_PASS_WIDTH_OFFSET)));
+}
+
+void ossimSFIMFusion::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   ossimString name = property->getName();
+   if(name=="low_pass_kernel_width")
+   {
+      setParameterOffset(LOW_PASS_WIDTH_OFFSET,
+                         property->valueToString().toDouble(),
+                         true);
+   }
+   else if(name=="high_pass_gain")
+   {
+      setParameterOffset(HIGH_PASS_GAIN_OFFSET,
+                         property->valueToString().toDouble(),
+                         true);
+   }
+   else if(name=="auto_adjust_scales")
+   {
+      theAutoAdjustScales =  property->valueToString().toBool();
+   }
+   else
+   {
+      ossimFusionCombiner::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimSFIMFusion::getProperty(const ossimString& name)const
+{
+   if(name == "low_pass_kernel_width")
+   {
+      ossimNumericProperty* prop =  new ossimNumericProperty(name, 
+                                      ossimString::toString(computeParameterOffset(LOW_PASS_WIDTH_OFFSET)),
+                                      getParameterCenter(LOW_PASS_WIDTH_OFFSET)-getParameterSigma(LOW_PASS_WIDTH_OFFSET),
+                                      getParameterCenter(LOW_PASS_WIDTH_OFFSET)+getParameterSigma(LOW_PASS_WIDTH_OFFSET));
+      prop->setCacheRefreshBit();
+      return prop;
+   }
+   else if(name == "high_pass_gain")
+   {
+      ossimNumericProperty* prop =  new ossimNumericProperty(name, 
+                                      ossimString::toString(computeParameterOffset(HIGH_PASS_GAIN_OFFSET)),
+                                      getParameterCenter(HIGH_PASS_GAIN_OFFSET)-getParameterSigma(HIGH_PASS_GAIN_OFFSET),
+                                      getParameterCenter(HIGH_PASS_GAIN_OFFSET)+getParameterSigma(HIGH_PASS_GAIN_OFFSET));
+      prop->setCacheRefreshBit();
+      return prop;
+   }
+   else if(name=="auto_adjust_scales")
+   {
+      ossimBooleanProperty* prop = new ossimBooleanProperty(name,theAutoAdjustScales);
+      prop->setCacheRefreshBit();
+      return prop;
+   }
+   
+   return ossimFusionCombiner::getProperty(name);
+}
+
+void ossimSFIMFusion::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimFusionCombiner::getPropertyNames(propertyNames);
+   propertyNames.push_back("low_pass_kernel_width");
+   propertyNames.push_back("high_pass_gain");
+   propertyNames.push_back("auto_adjust_scales");
+}
+
+bool ossimSFIMFusion::saveState(ossimKeywordlist& kwl,
+                                            const char* prefix) const
+{
+   ossimFusionCombiner::saveState(kwl, prefix);
+   saveAdjustments(kwl, prefix);
+   kwl.add(prefix,
+           "auto_adjust_scales",
+           theAutoAdjustScales,
+           true);
+   
+   return true;
+}
+
+bool ossimSFIMFusion::loadState(const ossimKeywordlist& kwl,
+                                            const char* prefix)
+{
+   ossimFusionCombiner::loadState(kwl, prefix);
+   loadAdjustments(kwl, prefix);
+   adjustableParametersChanged();
+   ossimString autoAdjustScales = kwl.find(prefix, "auto_adjust_scales");
+                                    
+   if(!autoAdjustScales.empty())
+   {
+      theAutoAdjustScales = autoAdjustScales.toBool();
+   }
+   return true;
+}
diff --git a/src/ossim/imaging/ossimSICDToDetectedImage.cpp b/ossim/src/ossim/imaging/ossimSICDToDetectedImage.cpp
similarity index 100%
rename from src/ossim/imaging/ossimSICDToDetectedImage.cpp
rename to ossim/src/ossim/imaging/ossimSICDToDetectedImage.cpp
diff --git a/src/ossim/imaging/ossimScalarRemapper.cpp b/ossim/src/ossim/imaging/ossimScalarRemapper.cpp
similarity index 100%
rename from src/ossim/imaging/ossimScalarRemapper.cpp
rename to ossim/src/ossim/imaging/ossimScalarRemapper.cpp
diff --git a/ossim/src/ossim/imaging/ossimScaleFilter.cpp b/ossim/src/ossim/imaging/ossimScaleFilter.cpp
new file mode 100644
index 0000000..672243f
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimScaleFilter.cpp
@@ -0,0 +1,960 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimScaleFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimScaleFilter.h>
+#include <ossim/imaging/ossimFilter.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimDiscreteConvolutionKernel.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/base/ossimKeywordNames.h>
+
+RTTI_DEF1(ossimScaleFilter, "ossimScaleFilter", ossimImageSourceFilter);
+
+//**************************************************************************************************
+ossimScaleFilter::ossimScaleFilter()
+   :ossimImageSourceFilter(),
+    m_BlankTile(NULL),
+    m_Tile(NULL),
+    m_MinifyFilter(NULL),
+    m_MagnifyFilter(NULL),
+    m_MinifyFilterType(ossimScaleFilter_NEAREST_NEIGHBOR),
+    m_MagnifyFilterType(ossimScaleFilter_NEAREST_NEIGHBOR),
+    m_ScaleFactor(1.0, 1.0),
+    m_InverseScaleFactor(1.0, 1.0),
+    m_TileSize(64, 64),
+    m_BlurFactor(1.0)
+{
+   m_InputRect.makeNan();
+   m_MinifyFilter  = new ossimNearestNeighborFilter();
+   m_MagnifyFilter = new ossimNearestNeighborFilter();
+}
+
+//**************************************************************************************************
+ossimScaleFilter::ossimScaleFilter(ossimImageSource* inputSource,
+                                   const ossimDpt& scaleFactor)
+   :ossimImageSourceFilter(inputSource),
+    m_BlankTile(NULL),
+    m_Tile(NULL),
+    m_MinifyFilter(NULL),
+    m_MagnifyFilter(NULL),
+    m_MinifyFilterType(ossimScaleFilter_NEAREST_NEIGHBOR),
+    m_MagnifyFilterType(ossimScaleFilter_NEAREST_NEIGHBOR),
+    m_ScaleFactor(scaleFactor),
+    m_TileSize(64, 64),
+    m_BlurFactor(1.0)
+{
+   m_InputRect.makeNan();
+   m_MinifyFilter  = new ossimNearestNeighborFilter();
+   m_MagnifyFilter = new ossimNearestNeighborFilter();
+}
+
+//**************************************************************************************************
+ossimScaleFilter::~ossimScaleFilter()
+{
+   if(m_MinifyFilter)
+   {
+      delete m_MinifyFilter;
+      m_MinifyFilter = NULL;
+   }
+   
+   if(m_MagnifyFilter)
+   {
+      delete m_MagnifyFilter;
+      m_MagnifyFilter = NULL;
+   }
+}
+
+//**************************************************************************************************
+ossimRefPtr<ossimImageData> ossimScaleFilter::getTile(
+   const ossimIrect& tileRect, ossim_uint32 resLevel)
+{
+   
+   if((!isSourceEnabled())||
+      (!theInputConnection)||
+      ((m_ScaleFactor.x == 1.0)&&
+       (m_ScaleFactor.y == 1.0)&&
+       (m_BlurFactor == 1.0)))
+   {
+      return ossimImageSourceFilter::getTile(tileRect, resLevel);
+   }
+   if(!m_Tile.valid())
+   {
+      allocate();
+   }
+
+   if(!m_Tile)
+   {
+      return ossimImageSourceFilter::getTile(tileRect, resLevel);
+   }
+
+   m_Tile->makeBlank();
+
+                       
+   ossimIrect imageRect = tileRect*m_InverseScaleFactor;
+
+   m_Tile->setImageRectangle(tileRect);
+   m_BlankTile->setImageRectangle(tileRect);
+
+
+   double xSupport;
+   double ySupport;
+
+   getSupport(xSupport, ySupport);
+   
+   ossimIpt deltaPt;
+   deltaPt.x = (ossim_int32)ceil(xSupport);
+   deltaPt.y = (ossim_int32)ceil(ySupport);
+
+   imageRect = ossimIrect(imageRect.ul().x - (deltaPt.x),
+                          imageRect.ul().y - (deltaPt.y),
+                          imageRect.lr().x + (deltaPt.x),
+                          imageRect.lr().y + (deltaPt.y));
+
+   
+   runFilter(imageRect, tileRect);
+   
+   m_Tile->validate();
+   
+   return m_Tile;
+}
+
+//**************************************************************************************************
+void ossimScaleFilter::runFilter(const ossimIrect& imageRect,
+                                 const ossimIrect& viewRect)
+{
+   switch(m_Tile->getScalarType())
+   {
+      case OSSIM_UINT8:
+      {
+         runFilterTemplate((ossim_uint8)0,
+                           imageRect,
+                           viewRect);
+         break;
+      }
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+      {
+         runFilterTemplate((ossim_uint16)0,
+                           imageRect,
+                           viewRect);
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         runFilterTemplate((ossim_sint16)0,
+                           imageRect,
+                           viewRect);
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         runFilterTemplate((ossim_uint32)0,
+                           imageRect,
+                           viewRect);
+         break;
+      }
+      case OSSIM_DOUBLE:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         runFilterTemplate((ossim_float64)0,
+                           imageRect,
+                           viewRect);
+         break;
+      }
+      case OSSIM_FLOAT:
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         runFilterTemplate((ossim_float32)0,
+                           imageRect,
+                           viewRect);
+         break;
+      }
+      default:
+         break;
+   }
+}
+
+//**************************************************************************************************
+template <class T>
+void ossimScaleFilter::runFilterTemplate(T dummy,
+                                         const ossimIrect& imageRect,
+                                         const ossimIrect& viewRect)
+{
+   ossimRefPtr<ossimImageData> inputData =
+      theInputConnection->getTile(imageRect);
+
+   if(!inputData.valid()   ||
+      !inputData->getBuf() ||
+      (inputData->getDataObjectStatus() == OSSIM_EMPTY))
+   {
+      return;
+   }
+
+   ossim_int32 h = imageRect.height();
+   ossimRefPtr<ossimImageData> tempData =
+      ossimImageDataFactory::instance()->create(NULL,
+                                                inputData->getScalarType(),
+                                                inputData->getNumberOfBands(),
+                                                viewRect.width(),
+                                                h);
+   tempData->setOrigin(ossimIpt(viewRect.ul().x,
+                                imageRect.ul().y));
+   
+   tempData->initialize();
+   
+   if((m_ScaleFactor.x != 1.0)||
+      (m_BlurFactor != 1.0))
+   {
+      runHorizontalFilterTemplate(dummy,
+                                  inputData,
+                                  tempData);
+      tempData->validate();
+   }
+   else
+   {
+      tempData->loadTile(inputData.get());
+   }
+   
+   if((m_ScaleFactor.y != 1.0)||
+      (m_BlurFactor != 1.0))
+   {
+      runVerticalFilterTemplate(dummy,
+                                tempData,
+                                m_Tile);
+   }
+   else
+   {
+      m_Tile->loadTile(tempData.get());
+   }
+   
+   m_Tile->validate();
+}
+
+//**************************************************************************************************
+ossimIrect ossimScaleFilter::getBoundingRect(ossim_uint32 resLevel)const
+{
+   ossimIrect result = ossimImageSourceFilter::getBoundingRect(resLevel);
+
+   if(!result.hasNans())
+   {
+      result = ossimIrect(result.ul().x,
+                          result.ul().y,
+                          result.lr().x+1,
+                          result.lr().y+1);
+      result *= m_ScaleFactor;
+   }
+   
+   return result;
+}
+
+//**************************************************************************************************
+void ossimScaleFilter::setFilterType(ossimScaleFilterType filterType)
+{
+   setFilterType(filterType, filterType);
+}
+
+
+//**************************************************************************************************
+void ossimScaleFilter::setFilterType(ossimScaleFilterType minifyFilterType,
+                                     ossimScaleFilterType magnifyFilterType)
+{
+   if(m_MinifyFilter)
+   {
+      delete m_MinifyFilter;
+      m_MinifyFilter = NULL;
+   }
+   if(m_MagnifyFilter)
+   {
+      delete m_MagnifyFilter;
+      m_MagnifyFilter = NULL;
+   }
+   
+   m_MinifyFilterType  = minifyFilterType;
+   m_MagnifyFilterType = magnifyFilterType;
+   
+   m_MinifyFilter  = createNewFilter(minifyFilterType, m_MinifyFilterType);
+   m_MagnifyFilter = createNewFilter(magnifyFilterType, m_MagnifyFilterType);
+}
+
+//**************************************************************************************************
+ossimFilter* ossimScaleFilter::createNewFilter(ossimScaleFilterType filterType,
+                                               ossimScaleFilterType& result)
+{
+   switch(filterType)
+   {
+   case ossimScaleFilter_NEAREST_NEIGHBOR:
+   {
+      return new ossimNearestNeighborFilter();
+   }
+   case ossimScaleFilter_BOX:
+   {
+      return new ossimBoxFilter();
+   }
+   case ossimScaleFilter_GAUSSIAN:
+   {
+      return new ossimGaussianFilter();
+   }
+   case ossimScaleFilter_CUBIC:
+   {
+      return new ossimCubicFilter();
+   }
+   case ossimScaleFilter_HANNING:
+   {
+      return new ossimHanningFilter();
+   }
+   case ossimScaleFilter_HAMMING:
+   {
+      return new ossimHammingFilter();
+   }
+   case ossimScaleFilter_LANCZOS:
+   {
+      return new ossimLanczosFilter();
+   }
+   case ossimScaleFilter_CATROM:
+   {
+      return new ossimCatromFilter();
+   }
+   case ossimScaleFilter_MITCHELL:
+   {
+      return new ossimMitchellFilter();
+   }
+   case ossimScaleFilter_BLACKMAN:
+   {
+      return new ossimBlackmanFilter();
+   }
+   case ossimScaleFilter_BLACKMAN_SINC:
+   {
+      return new ossimBlackmanSincFilter();
+   }
+   case ossimScaleFilter_BLACKMAN_BESSEL:
+   {
+      return new ossimBlackmanBesselFilter();
+   }
+   case ossimScaleFilter_QUADRATIC:
+   {
+      return new ossimQuadraticFilter();
+   }
+   case ossimScaleFilter_TRIANGLE:
+   {
+      return new ossimTriangleFilter();
+   }
+   case ossimScaleFilter_HERMITE:
+   {
+      return new ossimHermiteFilter();
+   }
+   
+   }
+
+   result = ossimScaleFilter_NEAREST_NEIGHBOR;
+   return new ossimNearestNeighborFilter();
+}
+
+//**************************************************************************************************
+void ossimScaleFilter::setScaleFactor(const ossimDpt& scale)
+{
+   m_ScaleFactor = scale;
+   if(fabs(m_ScaleFactor.x) <= FLT_EPSILON)
+   {
+      m_ScaleFactor.x = 1.0;
+   }
+   if(fabs(m_ScaleFactor.y) <= FLT_EPSILON)
+   {
+      m_ScaleFactor.y = 1.0;
+   }
+
+   m_InverseScaleFactor.x = 1.0/m_ScaleFactor.x;
+   m_InverseScaleFactor.y = 1.0/m_ScaleFactor.y;
+
+   // A change in the scale factor implies a change to the image geometry. If one has been created
+   // it needs to be modified:
+   updateGeometry();
+}
+
+
+//**************************************************************************************************
+template <class T> void ossimScaleFilter::runHorizontalFilterTemplate(
+   T /* dummy */,
+   const ossimRefPtr<ossimImageData>& input,
+   ossimRefPtr<ossimImageData>& output)
+{
+   ossimIrect viewRect  = output->getImageRectangle();
+   ossimIrect imageRect = input->getImageRectangle();
+   ossim_int32 vw = viewRect.width();
+   ossim_int32 vh = viewRect.height();
+   ossim_int32 iw = imageRect.width();
+   ossimIpt origin(viewRect.ul());
+   ossimIpt imageOrigin(imageRect.ul());
+   ossimIpt inputUl = m_InputRect.ul();
+   ossimIpt inputLr = m_InputRect.lr();
+   
+   double scale = 0.0;
+   double support = 0.0;
+   ossim_int32 x = 0;
+   ossim_int32 y = 0;
+   ossim_int32 start = 0;
+   ossim_int32 stop  = 0;
+   ossim_int32 kernelIdx = 0;
+   const ossimFilter* filter = getHorizontalFilter();
+   ossim_float64 center = 0.0;
+   ossim_int32 bandIdx = 0;
+   ossim_int32 numberOfBands = m_Tile->getNumberOfBands();
+   
+   scale = m_BlurFactor*ossim::max(1.0/m_ScaleFactor.x, 1.0);
+   
+   support=scale*filter->getSupport();
+   if (support <= 0.5)
+   {
+      support = 0.5 + FLT_EPSILON;
+      scale = 1.0;
+   }
+   scale=1.0/scale;
+   for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
+   {
+      T* imageBuf = (T*)input->getBuf(bandIdx);
+      T* viewBuf  = (T*)output->getBuf(bandIdx);
+      T np        = (T)input->getNullPix(bandIdx);
+      T outNp     = (T)output->getNullPix(bandIdx);
+      T outMinPix = (T)output->getMinPix(bandIdx);
+      T outMaxPix = (T)output->getMaxPix(bandIdx);
+      
+      for(x = 0; x < vw; ++x)
+      {
+         center=(origin.x + x+ .5)/m_ScaleFactor.x;
+         start=ossim::max((ossim_int32)ossim::round<int>(center-support), (ossim_int32)inputUl.x);
+         stop=ossim::min((ossim_int32)ossim::round<int>(center+support), (ossim_int32)inputLr.x);
+         ossim_int32 delta = stop-start;
+         if (delta <= 0)
+         {
+            break;
+         }
+         vector<double> kernel(delta);
+         double density=0.0;
+         
+         for(kernelIdx = 0; kernelIdx < delta; ++kernelIdx)
+         {
+            double t = scale*(start + kernelIdx -
+                              center + .5);
+            kernel[kernelIdx] = filter->filter(t,
+                                               filter->getSupport());
+            density += kernel[kernelIdx];
+         }
+         if ((density != 0.0) && (density != 1.0))
+         {
+            /*
+              Normalize.
+            */
+            density=1.0/density;
+            for (kernelIdx=0; kernelIdx < delta; kernelIdx++)
+               kernel[kernelIdx]*=density;
+         }
+         ossim_int32 offset       = start  - imageOrigin.x;
+         
+         T* xptr         = imageBuf + offset;
+         T* xCenterptr   = imageBuf + offset;
+         T* outptr       = viewBuf  + x;
+         
+         for(y = 0; y < vh; ++y)
+         {
+            double result = 0.0;
+            density = 0.0;
+            if((*xCenterptr) == np)
+            {
+               *outptr = outNp;
+            }
+            else
+            {
+               for(kernelIdx = 0; kernelIdx < (int)kernel.size(); ++kernelIdx)
+               {
+                  if((*xptr != np)&&
+                     (kernel[kernelIdx] != 0.0))
+                  {
+                     result  += ((double)(*(xptr+kernelIdx))*kernel[kernelIdx]);
+                     density += kernel[kernelIdx];
+                  }
+               }
+               if(density != 0.0)
+               {
+                  result /= density;
+                  
+                  if(result < outMinPix) result = outMinPix;
+                  if(result > outMaxPix) result = outMaxPix;
+                  
+                  *outptr = (T)result;
+               }
+               else
+               {
+                  *outptr = outNp;
+               }
+            }
+            xCenterptr += iw;
+            xptr   += iw;
+            outptr += vw;
+         }
+      }
+   }
+}
+
+//**************************************************************************************************
+template <class T> void ossimScaleFilter::runVerticalFilterTemplate(
+   T /* dummy */,
+   const ossimRefPtr<ossimImageData>& input,
+   ossimRefPtr<ossimImageData>& output)
+{
+   ossimIrect viewRect  = output->getImageRectangle();
+   ossimIrect imageRect = input->getImageRectangle();
+   ossim_int32 vw = viewRect.width();
+   ossim_int32 vh = viewRect.height();
+   ossim_int32 iw = imageRect.width();
+   ossimIpt origin(viewRect.ul());
+   ossimIpt imageOrigin(imageRect.ul());
+   ossimIpt inputUl = m_InputRect.ul();
+   ossimIpt inputLr = m_InputRect.lr();
+   double scale = 0.0;
+   double support = 0.0;
+   ossim_int32 x = 0;
+   ossim_int32 y = 0;
+   ossim_int32 start = 0;
+   ossim_int32 stop  = 0;
+   ossim_int32 kernelIdx = 0;
+   const ossimFilter* filter = getVerticalFilter();
+   ossim_float64 center = 0.0;
+   ossim_int32 bandIdx = 0;
+   ossim_int32 numberOfBands = m_Tile->getNumberOfBands();
+   
+   scale = m_BlurFactor*ossim::max(1.0/m_ScaleFactor.y, 1.0);
+   
+   support=scale*filter->getSupport();
+   if (support <= 0.5)
+   {
+      support = .5 + FLT_EPSILON;
+      scale = 1.0;
+   }
+   scale=1.0/scale;
+
+   for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
+   {
+      T* imageBuf = (T*)input->getBuf(bandIdx);
+      T* viewBuf  = (T*)output->getBuf(bandIdx);
+      T np        = (T)input->getNullPix(bandIdx);
+      T outNp     = (T)output->getNullPix(bandIdx);
+      T outMinPix = (T)output->getMinPix(bandIdx);
+      T outMaxPix = (T)output->getMaxPix(bandIdx);
+     
+      for(y = 0; y < vh; ++y)
+      {
+         center=(double) ((y + origin.y+0.5)/m_ScaleFactor.y);
+         start=ossim::max((ossim_int32)ossim::round<int>(center-support), (ossim_int32)inputUl.y);
+         stop=ossim::min((ossim_int32)ossim::round<int>(center+support), (ossim_int32)inputLr.y);
+         ossim_int32 delta = stop-start;
+         if (delta <= 0)
+         {
+            break;
+         }
+         vector<double> kernel(delta);
+         double density = 0.0;
+         for(kernelIdx = 0; kernelIdx < delta; ++kernelIdx)
+         {
+            kernel[kernelIdx] = filter->filter(scale*(start + kernelIdx - center + .5),
+                                               filter->getSupport());
+            density += kernel[kernelIdx];
+         }
+         if ((density != 0.0) && (density != 1.0))
+         {
+            /*
+              Normalize.
+            */
+            density=1.0/density;
+            for (kernelIdx=0; kernelIdx < delta; kernelIdx++)
+               kernel[kernelIdx]*=density;
+         }
+
+         ossim_int32 offset       = ((start  - imageOrigin.y)*iw);
+         ossim_int32 offsetCenter = ((((ossim_int32)center) - imageOrigin.y)*iw);
+        
+         for(x = 0; x < vw; ++x)
+         {
+            T* yptr         = imageBuf + offset       + x;
+            T* yCenterptr   = imageBuf + offsetCenter + x;
+            double result = 0.0;
+            density = 0.0;
+
+            if((*yCenterptr) == np)
+            {
+               *viewBuf = outNp;
+            }
+            else
+            {
+               for(kernelIdx = 0; kernelIdx < delta; ++kernelIdx)
+               {
+                  if((*yptr != np)&&
+                     (kernel[kernelIdx] != 0.0))
+                  {
+                     result  += ((*yptr)*kernel[kernelIdx]);
+                     density += kernel[kernelIdx];
+                  }
+                  yptr += iw;
+               }
+               if(density != 0.0)
+               {
+                  result /= density;
+                 
+                  if(result < outMinPix) result = outMinPix;
+                  if(result > outMaxPix) result = outMaxPix;
+                 
+                  *viewBuf = (T)result;
+               }
+               else
+               {
+                  *viewBuf = outNp;
+               }
+            }
+            ++viewBuf;
+         }
+      }
+   }
+}
+
+//**************************************************************************************************
+void ossimScaleFilter::initialize()
+{
+   ossimImageSourceFilter::initialize();
+
+   // Force an allocate next getTile.
+   m_Tile = NULL;
+   m_BlankTile = NULL;
+   m_InputRect.makeNan();
+}
+
+//**************************************************************************************************
+void ossimScaleFilter::allocate()
+{
+   m_Tile      = NULL;
+   m_BlankTile = NULL;
+   m_InputRect.makeNan();
+
+   if(theInputConnection&&isSourceEnabled())
+   {
+      m_Tile      = ossimImageDataFactory::instance()->create(this, this);
+      m_BlankTile = ossimImageDataFactory::instance()->create(this, this);
+      
+      m_Tile->initialize();
+
+      m_InputRect = theInputConnection->getBoundingRect();
+   }
+}
+
+//**************************************************************************************************
+// Returns a pointer reference to the active image geometry at this filter. The input source
+// geometry is modified, so we need to maintain our own geometry object as a data member.
+//**************************************************************************************************
+ossimRefPtr<ossimImageGeometry> ossimScaleFilter::getImageGeometry()
+{
+   // Have we already defined our own geometry? Return it if so:
+   if (m_ScaledGeometry.valid()) return m_ScaledGeometry;
+
+   // Otherwise we'll need to establish a geometry based on the input connection:
+   if(theInputConnection)
+   {
+      // Fetch the map projection of the input image if it exists:
+      ossimRefPtr<ossimImageGeometry> inputGeom = theInputConnection->getImageGeometry();
+
+      // If trivial case of identity scale, just pass along the input connection's geometry:
+      if ((m_ScaleFactor.x == 1.0) && (m_ScaleFactor.y == 1.0))
+         return inputGeom;
+
+      // Need to create a copy of the input geom and modify it as our own, then pass that:
+      if ( inputGeom.valid() )
+      {
+         m_ScaledGeometry = new ossimImageGeometry(*inputGeom);
+         updateGeometry();
+
+         // Return the modified geometry:
+         return m_ScaledGeometry;
+      }
+   }
+
+   // No geometry defined, return NULL pointer:
+   return ossimRefPtr<ossimImageGeometry>();
+}
+
+//**************************************************************************************************
+ossimIrect ossimScaleFilter::scaleRect(const ossimIrect input,
+                                       const ossimDpt& scaleFactor)const
+{
+   ossimIpt origin(ossim::round<int>(input.ul().x*scaleFactor.x),
+                   ossim::round<int>(input.ul().y*scaleFactor.y));
+   ossim_int32 w = ossim::round<int>(input.width()*scaleFactor.x);
+   ossim_int32 h = ossim::round<int>(input.height()*scaleFactor.y);
+
+   if(w < 1) w = 1;
+   if(h < 1) h = 1;
+   
+   return ossimIrect(origin.x,
+                     origin.y,
+                     origin.x + (w-1),
+                     origin.y + (h-1));
+}
+
+//**************************************************************************************************
+ossimString ossimScaleFilter::getFilterTypeAsString(ossimScaleFilterType type)const
+{
+   switch(type)
+   {
+   case ossimScaleFilter_NEAREST_NEIGHBOR:
+   {
+      return "nearest_neighbor";
+   }
+   case ossimScaleFilter_BOX:
+   {
+      return "box";
+   }
+   case ossimScaleFilter_GAUSSIAN:
+   {
+      return "gaussian";
+   }
+   case ossimScaleFilter_CUBIC:
+   {
+      return "cubic";
+   }
+   case ossimScaleFilter_HANNING:
+   {
+      return "hanning";
+   }
+   case ossimScaleFilter_HAMMING:
+   {
+      return "hamming";
+   }
+   case ossimScaleFilter_LANCZOS:
+   {
+      return "lanczos";
+   }
+   case ossimScaleFilter_MITCHELL:
+   {
+      return "mitchell";
+   }
+   case ossimScaleFilter_CATROM:
+   {
+      return "catrom";
+   }
+   case ossimScaleFilter_BLACKMAN:
+   {
+      return "blackman";
+   }
+   case ossimScaleFilter_BLACKMAN_SINC:
+   {
+      return "blackman_sinc";
+   }
+   case ossimScaleFilter_BLACKMAN_BESSEL:
+   {
+      return "blackman_bessel";
+   }
+   case ossimScaleFilter_QUADRATIC:
+   {
+      return "quadratic";
+   }
+   case ossimScaleFilter_TRIANGLE:
+   {
+      return "triangle";
+   }
+   case ossimScaleFilter_HERMITE:
+   {
+      return "hermite";
+   }
+   }
+
+   return "nearest_neighbor";
+}
+
+//**************************************************************************************************
+ossimScaleFilter::ossimScaleFilterType ossimScaleFilter::getFilterType(const ossimString& type)const
+{
+   ossimString typeUpper = type;
+   typeUpper = typeUpper.upcase();
+
+   if(typeUpper.contains("BOX"))
+   {
+      return ossimScaleFilter_BOX;
+   }
+   else if(typeUpper.contains("NEAREST_NEIGHBOR"))
+   {
+      return ossimScaleFilter_NEAREST_NEIGHBOR;
+   }
+   else if(typeUpper.contains("GAUSSIAN"))
+   {
+      return ossimScaleFilter_GAUSSIAN;
+   }
+   else if(typeUpper.contains("HANNING"))
+   {
+      return ossimScaleFilter_HANNING;
+   }
+   else if(typeUpper.contains("HAMMING"))
+   {
+      return ossimScaleFilter_HAMMING;
+   }
+   else if(typeUpper.contains("LANCZOS"))
+   {
+      return ossimScaleFilter_LANCZOS;
+   }
+   else if(typeUpper.contains("MITCHELL"))
+   {
+      return ossimScaleFilter_MITCHELL;
+   }
+   else if(typeUpper.contains("CATROM"))
+   {
+      return ossimScaleFilter_CATROM;
+   }
+   else if(typeUpper.contains("CUBIC"))
+   {
+      return ossimScaleFilter_CUBIC;
+   }
+   else if(typeUpper.contains("BLACKMAN_BESSEL"))
+   {
+      return ossimScaleFilter_BLACKMAN_BESSEL;
+   }
+   else if(typeUpper.contains("BLACKMAN_SINC"))
+   {
+      return ossimScaleFilter_BLACKMAN_SINC;
+   }
+   else if(typeUpper.contains("BLACKMAN"))
+   {
+      return ossimScaleFilter_BLACKMAN;
+   }
+   else if(typeUpper.contains("QUADRATIC"))
+   {
+      return ossimScaleFilter_QUADRATIC;
+   }
+   else if(typeUpper.contains("TRIANGLE"))
+   {
+      return ossimScaleFilter_TRIANGLE;
+   }
+   else if(typeUpper.contains("HERMITE"))
+   {
+      return ossimScaleFilter_HERMITE;
+   }
+   
+   return ossimScaleFilter_NEAREST_NEIGHBOR;
+}
+
+//**************************************************************************************************
+void ossimScaleFilter::getSupport(double& x, double& y)
+{
+   const ossimFilter* horizontalFilter = getHorizontalFilter();
+   const ossimFilter* verticalFilter   = getVerticalFilter();
+   
+   x = m_BlurFactor*ossim::max(1.0/m_ScaleFactor.x, 1.0)*
+       horizontalFilter->getSupport();
+   y = m_BlurFactor*ossim::max(1.0/m_ScaleFactor.y, 1.0)*
+       verticalFilter->getSupport();
+}
+
+//**************************************************************************************************
+const ossimFilter* ossimScaleFilter::getHorizontalFilter()const
+{
+   if(m_ScaleFactor.x < 1)
+   {
+      return m_MinifyFilter;
+   }
+
+   return m_MagnifyFilter;
+}
+
+//**************************************************************************************************
+const ossimFilter* ossimScaleFilter::getVerticalFilter()const
+{
+   if(m_ScaleFactor.y < 1)
+   {
+      return m_MinifyFilter;
+   }
+
+   return m_MagnifyFilter;
+}
+
+
+
+//**************************************************************************************************
+bool ossimScaleFilter::saveState(ossimKeywordlist& kwl, const char* prefix)const
+{
+   kwl.add(prefix,
+           ossimKeywordNames::SCALE_X_KW,
+           m_ScaleFactor.x,
+           true);
+   kwl.add(prefix,
+           ossimKeywordNames::SCALE_Y_KW,
+           m_ScaleFactor.y,
+           true);
+   kwl.add(prefix,
+           "minify_type",
+           getFilterTypeAsString(m_MinifyFilterType),
+           true);
+   kwl.add(prefix,
+           "magnify_type",
+           getFilterTypeAsString(m_MagnifyFilterType),
+           true);
+   
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
+//**************************************************************************************************
+bool ossimScaleFilter::loadState(const ossimKeywordlist& kwl,
+                                 const char* prefix)
+{
+   ossimString scalex  = kwl.find(prefix,
+                                 ossimKeywordNames::SCALE_X_KW);
+   ossimString scaley  = kwl.find(prefix,
+                                  ossimKeywordNames::SCALE_Y_KW);
+   ossimString minify  = kwl.find(prefix,
+                                  "minify_type");
+   ossimString magnify = kwl.find(prefix,
+                                  "magnify_type");
+   
+   m_ScaleFactor.x = scalex.toDouble();
+   m_ScaleFactor.y = scaley.toDouble();
+
+   if(fabs(m_ScaleFactor.x) <= FLT_EPSILON)
+   {
+      m_ScaleFactor.x = 1.0;
+   }
+   if(fabs(m_ScaleFactor.y) <= FLT_EPSILON)
+   {
+      m_ScaleFactor.y = 1.0;
+   }
+
+   m_InverseScaleFactor.x = 1.0/m_ScaleFactor.x;
+   m_InverseScaleFactor.y = 1.0/m_ScaleFactor.y;
+   
+   setFilterType(getFilterType(minify),
+                 getFilterType(magnify));
+   
+   // A change in the scale factor implies a change to the image geometry. If one has been created
+   // it needs to be modified:
+   updateGeometry();
+
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
+//**************************************************************************************************
+//! If this object is maintaining an ossimImageGeometry, this method needs to be called after 
+//! a scale change so that the geometry's projection is modified accordingly.
+//**************************************************************************************************
+void ossimScaleFilter::updateGeometry()
+{
+   if (m_ScaledGeometry.valid())
+   {
+      // Modify the image geometry's projection with the scale factor before returning geom:
+      ossimProjection* proj = m_ScaledGeometry->getProjection();
+      ossimMapProjection* mapProj = PTR_CAST(ossimMapProjection, proj);
+      if(mapProj)
+         mapProj->applyScale(m_InverseScaleFactor, true);
+   }
+}
+
diff --git a/ossim/src/ossim/imaging/ossimShiftFilter.cpp b/ossim/src/ossim/imaging/ossimShiftFilter.cpp
new file mode 100644
index 0000000..dbd4736
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimShiftFilter.cpp
@@ -0,0 +1,311 @@
+//----------------------------------------------------------------------------
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Filter for shifting input to an output range.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/imaging/ossimShiftFilter.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimTrace.h>
+
+RTTI_DEF1(ossimShiftFilter, "ossimShiftFilter", ossimImageSourceFilter)
+
+static ossimTrace traceDebug("ossimShiftFilter:debug");
+
+ossimShiftFilter::ossimShiftFilter()
+   :
+   ossimImageSourceFilter(),  // base class
+   m_tile(0),
+   m_min(ossim::nan()),
+   m_max(ossim::nan()),
+   m_null(ossim::nan())
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimShiftFilter::ossimShiftFilter entered...\n";
+   }
+}
+
+ossimShiftFilter::~ossimShiftFilter()
+{
+}
+
+void ossimShiftFilter::initialize()
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimShiftFilter::initialize entered..." << endl;
+   }
+
+   //---
+   // Call the base class initialize.
+   // Note:  This will reset "theInputConnection" if it changed...
+   //---
+   ossimImageSourceFilter::initialize();
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimShiftFilter::initialize exited..." << endl;
+   }
+}
+
+ossimRefPtr<ossimImageData> ossimShiftFilter::getTile(
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   ossimRefPtr<ossimImageData> result = 0;
+   
+   if ( theInputConnection )
+   {
+      ossimRefPtr<ossimImageData> inputTile = theInputConnection->getTile( tileRect, resLevel );
+      
+      if ( inputTile.get() && isSourceEnabled() &&
+           !ossim::isnan(m_null) && !ossim::isnan(m_min) && !ossim::isnan(m_max) )
+      {
+         // Get its status of the input tile.
+         ossimDataObjectStatus tile_status = inputTile->getDataObjectStatus();
+         
+         if ( tile_status != OSSIM_NULL )
+         {
+            if ( !m_tile )
+            {
+               allocate(); // First time through.
+            }
+            
+            if ( tile_status != OSSIM_EMPTY )
+            {
+               // Set the origin,bands of the output tile.
+               m_tile->setImageRectangle(tileRect);
+
+               switch(inputTile->getScalarType())
+               {
+                  case OSSIM_UINT8:
+                  {
+                     fillTile( ossim_uint8(0), inputTile.get(), m_tile.get() );
+                     break;
+                  }
+                  case OSSIM_SINT8:
+                  {
+                     fillTile( ossim_sint8(0), inputTile.get(), m_tile.get() );
+                     break;
+                  }
+                  case OSSIM_UINT16:
+                  case OSSIM_USHORT11:
+                  {
+                     fillTile( ossim_uint16(0), inputTile.get(), m_tile.get() );
+                     break;
+                  }
+                  case OSSIM_SINT16:
+                  {
+                     fillTile( ossim_sint16(0), inputTile.get(), m_tile.get() ); 
+                     break;
+                  }
+                  case OSSIM_SINT32:
+                  {
+                     fillTile( ossim_sint32(0), inputTile.get(), m_tile.get() );
+                     break;
+                  }
+                  case OSSIM_UINT32:
+                  {
+                     fillTile( ossim_uint32(0), inputTile.get(), m_tile.get() );
+                     break;
+                  }
+                  case OSSIM_FLOAT32: 
+                  case OSSIM_NORMALIZED_FLOAT:
+                  {
+                     fillTile( ossim_float32(0), inputTile.get(), m_tile.get() );
+                     break;
+                  }
+                  case OSSIM_FLOAT64:
+                  case OSSIM_NORMALIZED_DOUBLE:
+                  {
+                     fillTile( ossim_float64(0), inputTile.get(), m_tile.get() );
+                     break;
+                  }
+                  case OSSIM_SCALAR_UNKNOWN:
+                  default:
+                  {
+                     ossimNotify(ossimNotifyLevel_WARN)
+                        << "ossimShiftFilter::getTile ERROR Unhandled scalar!" << endl;
+                        break;
+                  }
+            
+               } // Matches: switch(inputTile->getScalarType())
+
+               m_tile->validate();
+            }
+            else
+            {
+               m_tile->makeBlank();
+            }
+
+            result = m_tile;
+            
+         } // Matches: if ( tile_status != OSSIM_NULL )
+            
+      } // Matches: if ( inputTile.get() ... )
+
+      if ( !result && inputTile.get() )
+      {
+         result = inputTile;
+      }
+           
+   } // Matches: if ( theInputConnection ) 
+   
+   return result;
+}
+
+template <class T> void ossimShiftFilter::fillTile(T /* dummy */,
+                                                   const ossimImageData* inputTile,
+                                                   ossimImageData* outputTile) const
+{
+   const double BANDS = inputTile->getNumberOfBands();
+   const ossim_uint32 SPB = inputTile->getSizePerBand();
+   std::vector<double> inNull(BANDS);
+   std::vector<double> inMin(BANDS);
+   std::vector<double> inMax(BANDS);
+   std::vector<double> coef(BANDS);
+   ossim_uint32 band = 0;
+
+   for( ; band < BANDS; ++band )
+   {
+      inNull[band] = inputTile->getNullPix(band);
+      inMin[band]  = inputTile->getMinPix(band);
+      inMax[band]  = inputTile->getMaxPix(band);
+      coef[band]   = (m_max-m_min)/(inMax[band]-inMin[band]);
+   }
+   
+   double pix = 0;
+   for( band = 0; band < BANDS; ++band )
+   {
+      const T* inBuf = static_cast<const T*>(inputTile->getBuf(band));
+      T* outBuf = static_cast<T*>(outputTile->getBuf(band));
+      
+      for ( ossim_uint32 i = 0; i < SPB; ++i )
+      {
+         pix = inBuf[i];
+         if (  pix == inNull[band] )
+         {
+            pix = m_null;
+         }
+         else
+         {
+            // Shift and multiply:
+            pix = m_min + (pix - inMin[band]) * coef[band];
+            
+            // Range check:
+            pix = pix <= m_max ? (pix >= m_min ? pix : m_min) : m_max;
+         }
+         
+         outBuf[i] = static_cast<T>(pix);
+      }
+   }
+
+   outputTile->validate();
+}
+
+ossimString ossimShiftFilter::getClassName() const
+{
+   return ossimString("ossimShiftFilter");
+}
+
+ossimString ossimShiftFilter::getLongName()const
+{
+   return ossimString("OSSIM shift filter");
+}
+
+ossimString ossimShiftFilter::getShortName()const
+{
+   return ossimString("shift filter");
+}
+
+double ossimShiftFilter::getNullPixelValue(ossim_uint32 band )const
+{
+   double result = 0;;
+   if ( theEnableFlag && !ossim::isnan(m_null) )
+   {
+      result = m_null;
+   }
+   else
+   {
+      result = ossimImageSourceFilter::getNullPixelValue( band );
+   }
+   return result;
+}
+
+double ossimShiftFilter::getMinPixelValue(ossim_uint32 band )const
+{
+   double result = 0;;
+   if ( theEnableFlag && !ossim::isnan(m_min) )
+   {
+      result = m_min;
+   }
+   else
+   {
+      result = ossimImageSourceFilter::getMinPixelValue( band );
+   }
+   return result;
+}
+
+double ossimShiftFilter::getMaxPixelValue(ossim_uint32 band )const
+{
+   double result = 0;;
+   if ( theEnableFlag && !ossim::isnan(m_max) )
+   {
+      result = m_max;
+   }
+   else
+   {
+      result = ossimImageSourceFilter::getMaxPixelValue( band );
+   }
+   return result;
+}
+
+void ossimShiftFilter::setNullPixelValue(double null)
+{
+   m_null = null;
+}
+
+void ossimShiftFilter::setMinPixelValue(double min)
+{
+   m_min = min;
+}
+
+void ossimShiftFilter::setMaxPixelValue(double max)
+{
+   m_max = max;
+}
+
+void ossimShiftFilter::allocate()
+{
+   m_tile = ossimImageDataFactory::instance()->create(this,this);
+   m_tile->initialize();
+}
+
+// Private to disallow use...
+ossimShiftFilter::ossimShiftFilter(const ossimShiftFilter&)
+{
+}
+
+// Private to disallow use...
+ossimShiftFilter& ossimShiftFilter::operator=(const ossimShiftFilter&)
+{
+   return *this;
+}
+
+
+
diff --git a/ossim/src/ossim/imaging/ossimSingleImageChain.cpp b/ossim/src/ossim/imaging/ossimSingleImageChain.cpp
new file mode 100644
index 0000000..6c58695
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimSingleImageChain.cpp
@@ -0,0 +1,953 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Utility class definition for a single image chain.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/imaging/ossimSingleImageChain.h>
+
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimGeoPolygon.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/support_data/ossimSrcRecord.h>
+
+ossimSingleImageChain::ossimSingleImageChain()
+   :
+   ossimImageChain(),
+   m_handler(0),
+   m_bandSelector(0),
+   m_histogramRemapper(0),
+   m_brightnessContrast(0),
+   m_sharpen(0),
+   m_scalarRemapper(0),
+   m_resamplerCache(0),
+   m_resampler(0),
+   m_chainCache(0),
+   m_addHistogramFlag(false),
+   m_addResamplerCacheFlag(false),
+   m_addChainCacheFlag(false),
+   m_remapToEightBitFlag(false),
+   m_threeBandFlag(false),
+   m_threeBandReverseFlag(false),
+   m_brightnessContrastFlag(false),
+   m_sharpenFlag(false),
+   m_geoPolyCutterFlag(false)
+{
+}
+
+ossimSingleImageChain::ossimSingleImageChain(bool addHistogramFlag,
+                                             bool addResamplerCacheFlag,
+                                             bool addChainCacheFlag,
+                                             bool remapToEightBitFlag,
+                                             bool threeBandFlag,
+                                             bool threeBandReverseFlag,
+                                             bool brightnessContrastFlag,
+                                             bool sharpenFlag,
+                                             bool geoPolyCutterFlag)
+   :
+   ossimImageChain(),
+   m_handler(0),
+   m_bandSelector(0),
+   m_histogramRemapper(0),
+   m_brightnessContrast(0),
+   m_sharpen(0),
+   m_scalarRemapper(0),
+   m_resamplerCache(0),
+   m_resampler(0),
+   m_chainCache(0),
+   m_addHistogramFlag(addHistogramFlag),
+   m_addResamplerCacheFlag(addResamplerCacheFlag),
+   m_addChainCacheFlag(addChainCacheFlag),
+   m_remapToEightBitFlag(remapToEightBitFlag),
+   m_threeBandFlag(threeBandFlag),
+   m_threeBandReverseFlag(threeBandReverseFlag),
+   m_brightnessContrastFlag(brightnessContrastFlag),
+   m_sharpenFlag(sharpenFlag),
+   m_geoPolyCutterFlag(geoPolyCutterFlag)
+{
+}
+
+ossimSingleImageChain::~ossimSingleImageChain()
+{
+   m_handler            = 0;
+   m_bandSelector       = 0;
+   m_histogramRemapper  = 0;
+   m_brightnessContrast = 0;
+   m_sharpen            = 0;
+   m_scalarRemapper     = 0;
+   m_resamplerCache     = 0;
+   m_resampler          = 0;
+   m_chainCache         = 0;
+   m_geoPolyCutter      = 0;
+
+}
+
+void ossimSingleImageChain::reset()
+{
+   bool result = true;
+   do
+   {
+      result = deleteLast();
+   } while (result);
+
+   m_handler                = 0;
+   m_bandSelector           = 0;
+   m_histogramRemapper      = 0;
+   m_brightnessContrast     = 0;
+   m_sharpen                = 0;
+   m_scalarRemapper         = 0;
+   m_resamplerCache         = 0;
+   m_resampler              = 0;
+   m_geoPolyCutter          = 0;
+   m_chainCache             = 0;
+
+   m_addHistogramFlag       = false;
+   m_addResamplerCacheFlag  = false;
+   m_addChainCacheFlag      = false;
+   m_remapToEightBitFlag    = false;
+   m_threeBandFlag          = false;
+   m_threeBandReverseFlag   = false;
+   m_brightnessContrastFlag = false;
+   m_sharpenFlag            = false;
+   m_geoPolyCutterFlag      = false;
+}
+
+void ossimSingleImageChain::close()
+{
+   if ( m_handler.valid() )
+   {
+      if ( removeChild(m_handler.get()) )
+      {
+         m_handler = 0;
+      }
+   }
+}
+
+ossimFilename ossimSingleImageChain::getFilename() const
+{
+   ossimFilename result;
+   if ( m_handler.valid() )
+   {
+      result = m_handler->getFilename();
+   }
+   return result;
+}
+
+bool ossimSingleImageChain::open(const ossimFilename& file, bool openOverview)
+{
+   return addImageHandler(file, openOverview);
+}
+
+bool ossimSingleImageChain::isOpen() const
+{
+   return m_handler.valid();
+}
+
+bool ossimSingleImageChain::open(const ossimSrcRecord& src)
+{
+   return addImageHandler(src);
+}
+
+void ossimSingleImageChain::createRenderedChain()
+{
+   // Band selector after image handler only if needed.
+   if ( m_handler.valid() )
+   {
+      // Only add if multiple bands.
+      if ( m_handler->getNumberOfOutputBands() != 1 )
+      {
+         addBandSelector();
+         if ( m_threeBandReverseFlag )
+         {
+            setToThreeBandsReverse();
+         }
+      }
+   }
+   else // No image handler so just add it.
+   {
+      addBandSelector();
+   }
+   
+   // histogram:
+   if ( m_addHistogramFlag )
+   {
+      addHistogramRemapper();
+   }
+
+   // brightness contrast:
+   if ( m_brightnessContrastFlag )
+   {
+      addBrightnessContrast();
+   }
+
+   // sharpen filter:
+   if ( m_sharpenFlag )
+   {
+      addSharpen();
+   }
+
+   // scalar remapper
+   if ( m_remapToEightBitFlag )
+   {
+      if ( m_handler.valid() )
+      {
+         // See if it's eight bit.
+         if (m_handler->getOutputScalarType() != OSSIM_UINT8)
+         {
+            addScalarRemapper();
+         }
+      }
+      else
+      {
+         // Just add...
+         addScalarRemapper(); 
+      }
+   }
+
+   // resampler cache
+   if ( m_addResamplerCacheFlag )
+   {
+      m_resamplerCache = addCache();
+   }
+   
+   // resampler
+   addResampler();
+
+   //---
+   // Do this here so that if a band selector is added to the end of the
+   // chain it will go in before the end of chain cache.
+   //---
+   if (m_threeBandFlag)
+   {
+      if (!m_bandSelector)
+      {
+         addBandSelector();
+      }
+      setToThreeBands();
+   }
+
+   //---
+   // Ditto...
+   //---
+   if ( m_threeBandReverseFlag && !m_bandSelector )
+   {
+      addBandSelector();
+      setToThreeBandsReverse();
+   }
+
+   // Put the geo cutter just before the cache.
+   if(m_geoPolyCutterFlag)
+   {
+      addGeoPolyCutter();
+   }
+
+   // End of chain cache.
+   if ( m_addChainCacheFlag )
+   {
+      m_chainCache = addCache();
+   }
+
+   initialize();
+
+}
+
+void ossimSingleImageChain::createRenderedChain(const ossimSrcRecord& src)
+{
+   // Band selector after image handler only if needed.
+   if ( m_handler.valid() )
+   {
+      // Only add if needed.
+      if ( ( m_handler->getNumberOfOutputBands() != 1 ) || src.getBands().size() )
+      {
+         addBandSelector(src);
+         if ( m_threeBandReverseFlag )
+         {
+            setToThreeBandsReverse();
+         }
+      }
+   }
+   else // No image handler so just add it.
+   {
+      addBandSelector(src);
+   }
+   
+   // histogram
+   if ( m_addHistogramFlag || src.getHistogramOp().size() )
+   {
+      addHistogramRemapper(src);
+   }
+
+   // brightness contrast:
+   if ( m_brightnessContrastFlag )
+   {
+      addBrightnessContrast();
+   }
+
+   // sharpen filter:
+   if ( m_sharpenFlag )
+   {
+      addSharpen();
+   }
+
+   // scalar remapper
+   if ( m_remapToEightBitFlag )
+   {
+      if ( m_handler.valid() )
+      {
+         // See if it's eight bit.
+         if (m_handler->getOutputScalarType() != OSSIM_UINT8)
+         {
+            addScalarRemapper();
+         }
+      }
+      else
+      {
+         // Just add...
+         addScalarRemapper(); 
+      }
+   }
+
+   // resampler cache
+   if ( m_addResamplerCacheFlag )
+   {
+      m_resamplerCache = addCache();
+   }
+   
+   // resampler
+   addResampler();
+
+   //---
+   // Do this here so that if a band selector is added to the end of the
+   // chain it will go in before the end of chain cache.
+   //---
+   if (m_threeBandFlag)
+   {
+      if (!m_bandSelector) // Input must be one band.
+      {
+         addBandSelector(src);
+      }
+      setToThreeBands();
+   }
+
+   //---
+   // Ditto...
+   //---
+   if ( m_threeBandReverseFlag && !m_bandSelector )
+   {
+      addBandSelector();
+      setToThreeBandsReverse();
+   }
+
+   // End of chain cache.
+   if ( m_addChainCacheFlag )
+   {
+      m_chainCache = addCache();
+   }
+
+   initialize();
+
+}
+
+bool ossimSingleImageChain::addImageHandler(const ossimFilename& file, bool openOverview)
+{
+   bool result = false;
+
+   close();
+   
+   m_handler = ossimImageHandlerRegistry::instance()->open(file, true, openOverview);
+   
+   if ( m_handler.valid() )
+   {
+      // Add to the chain.  Note: last is really first.
+      addLast( m_handler.get() );
+      
+      result = true;
+   }
+
+   return result;
+}
+
+bool ossimSingleImageChain::addImageHandler(const ossimSrcRecord& src)
+{
+   bool result = addImageHandler( src.getFilename() );
+   if (result)
+   {
+      //---
+      // When loading from ossimSrcRecord typically the overview/histograms are
+      // not in the same directory and the "support" keyword is not set.  For
+      // the ossimImageHandler::getFilenameWithThisExtension to work correctly
+      // the ossimImageHandler::theSupplementaryDirectory must be set.
+      // So if the ossimSrcRecord::getSupportDir() is empty and the overview
+      // or histogram is not co-located with the image we will set it here.
+      //---
+      ossimFilename supportDir = src.getSupportDir();
+      if ( supportDir.empty() )
+      {
+         if ( src.getOverviewPath().size() )
+         {
+            if ( src.getOverviewPath().isDir() )
+            {
+               supportDir = src.getOverviewPath();
+            }
+            else
+            {
+               supportDir = src.getOverviewPath().path();
+            }
+         }
+         else if ( src.getHistogramPath().size() )
+         {
+            if ( src.getHistogramPath().isDir() )
+            {
+               supportDir = src.getHistogramPath();
+            }
+            else
+            {
+               supportDir = src.getHistogramPath().path();
+            }
+         }
+         else if ( src.getMaskPath().size() )
+         {
+            if ( src.getMaskPath().isDir() )
+            {
+               supportDir = src.getMaskPath();
+            }
+            else
+            {
+               supportDir = src.getMaskPath().path();
+            }
+         }
+      }
+      if ( supportDir.size() && (src.getFilename().path() != supportDir) )
+      {
+         m_handler->setSupplementaryDirectory( supportDir );
+      }
+      if ( src.getEntryIndex() > 0 ) // defaulted to -1.
+      {
+         m_handler->setCurrentEntry( static_cast<ossim_uint32>( src.getEntryIndex() ) );
+      }
+      if ( m_handler->getOverview() == 0 )
+      {
+         if ( src.getOverviewPath().size() )
+         {
+            m_handler->openOverview( src.getOverviewPath() );
+         }
+         else
+         {
+            ossimFilename ovrFile = m_handler->getFilenameWithThisExtension(ossimString(".ovr"));
+            m_handler->openOverview( ovrFile ); 
+         }
+      }
+   }
+   return result;
+}
+
+void ossimSingleImageChain::addBandSelector()
+{
+   if (!m_bandSelector)
+   {
+      m_bandSelector = new ossimBandSelector();
+
+      // Add to the end of the chain.
+      addFirst(m_bandSelector.get());
+   }
+}
+
+void ossimSingleImageChain::addBandSelector(const ossimSrcRecord& src)
+{
+   if (!m_bandSelector)
+   {
+      m_bandSelector = new ossimBandSelector();
+      
+      // Add to the end of the chain.
+      addFirst(m_bandSelector.get());
+   }
+   if ( src.getBands().size() )
+   {
+      m_bandSelector->setOutputBandList( src.getBands() );
+   }
+}
+
+void ossimSingleImageChain::addHistogramRemapper()
+{
+   if (!m_histogramRemapper)
+   {
+      m_histogramRemapper = new ossimHistogramRemapper();
+      
+      m_histogramRemapper->setEnableFlag(false);
+
+      // Add to the end of the chain.
+      addFirst(m_histogramRemapper.get());
+   } 
+}
+
+void ossimSingleImageChain::addHistogramRemapper(const ossimSrcRecord& src)
+{
+   static const char MODULE[] =
+      "ossimSingleImageChain::addHistogramRemapper(const ossimSrcRecord&)";
+   
+   if (!m_histogramRemapper)
+   {
+      m_histogramRemapper = new ossimHistogramRemapper();
+      
+      m_histogramRemapper->setEnableFlag(false);
+
+      // Add to the end of the chain.
+      addFirst(m_histogramRemapper.get());
+   }
+
+   if ( src.getHistogramOp().size() && m_handler.valid() )
+   {
+      // Create histogram code here???
+      
+      // Open the histogram if needed.
+      if ( m_histogramRemapper->getHistogramFile() == ossimFilename::NIL )
+      {
+         ossimFilename f;
+         if ( src.getSupportDir().size() )
+         {
+            f = src.getSupportDir();
+            f.dirCat( m_handler->getFilename().fileNoExtension() );
+            f.setExtension(".his");
+         }
+         else
+         {
+            f = m_handler->getFilenameWithThisExtension( ossimString("his") );
+         }
+         if ( m_histogramRemapper->openHistogram( f ) == false )
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << "\nCould not open:  " << f << "\n";
+         }
+      }
+
+      // Set the histogram strech mode.
+      if ( src.getHistogramOp().size() )
+      {
+         // Enable.
+         m_histogramRemapper->setEnableFlag(true);
+         
+         // Set the histo mode:
+         ossimString op = src.getHistogramOp();
+         op.downcase();
+         if ( op == "auto-minmax" )
+         {
+            m_histogramRemapper->setStretchMode( ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX );
+         }
+         else if ( (op == "std-stretch-1") || (op == "std-stretch 1") )
+         {
+            m_histogramRemapper->setStretchMode( ossimHistogramRemapper::LINEAR_1STD_FROM_MEAN );
+         } 
+         else if ( (op == "std-stretch-2") || (op == "std-stretch 2") )
+         {
+            m_histogramRemapper->setStretchMode( ossimHistogramRemapper::LINEAR_2STD_FROM_MEAN );
+         } 
+         else if ( (op == "std-stretch-3") || (op == "std-stretch 3") )
+         {
+            m_histogramRemapper->setStretchMode( ossimHistogramRemapper::LINEAR_3STD_FROM_MEAN );
+         }
+         else
+         {
+            m_histogramRemapper->setEnableFlag(false);
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << "\nUnhandled operation: " << op << "\n";
+         }
+      }
+      
+   } // End: if ( src.setHistogramOp().size() && m_handler.valid() )
+}
+
+ossimRefPtr<ossimCacheTileSource> ossimSingleImageChain::addCache()
+{
+   ossimRefPtr<ossimCacheTileSource> cache = new ossimCacheTileSource();
+
+   // Add to the end of the chain.
+   addFirst(cache.get());
+
+   return cache;
+}
+
+void ossimSingleImageChain::addResampler()
+{
+   if ( !m_resampler )
+   {
+      m_resampler = new ossimImageRenderer();
+
+      // Add to the end of the chain.
+      addFirst(m_resampler.get());
+   }
+}
+
+void ossimSingleImageChain::addScalarRemapper()
+{
+   if ( !m_scalarRemapper )
+   {
+      m_scalarRemapper = new ossimScalarRemapper();
+
+      if ( m_resamplerCache.valid() )
+      {
+         // Add to the left of the resampler cache.
+         insertLeft(m_scalarRemapper.get(), m_resamplerCache.get());
+      }
+      else
+      {
+         // Add to the end of the chain.
+         addFirst(m_scalarRemapper.get());
+      }
+   }
+}
+
+void ossimSingleImageChain::addBrightnessContrast()
+{
+   if ( !m_brightnessContrast )
+   {
+      m_brightnessContrast = new ossimBrightnessContrastSource();
+
+      // Add to the end of the chain.
+      addFirst( m_brightnessContrast.get() );
+   }
+}
+
+void ossimSingleImageChain::addSharpen()
+{
+   if ( !m_sharpen )
+   {
+      m_sharpen = new ossimImageSharpenFilter();
+
+      // Add to the end of the chain.
+      addFirst( m_sharpen.get() );
+   }
+}
+
+void ossimSingleImageChain::addGeoPolyCutter()
+{
+   if(!m_geoPolyCutter.valid())
+   {
+      m_geoPolyCutter = new ossimGeoPolyCutter();
+
+      //---
+      // ossimGeoPolyCutter requires a view geometry to transform the points.
+      // So set prior to adding to end of chain if valid.  If not, user is
+      // responsible for setting.
+      //---
+      ossimRefPtr<ossimImageGeometry> geom = getImageGeometry();
+      if ( geom.valid() )
+      {
+         m_geoPolyCutter->setView( geom.get() );
+      }
+      
+      addFirst( m_geoPolyCutter.get() );
+   }
+}
+
+void ossimSingleImageChain::addGeoPolyCutterPolygon(const vector<ossimGpt>& polygon)
+{
+   if(!m_geoPolyCutter.valid())
+   {
+      addGeoPolyCutter();
+   }
+   
+   // sanity check to verify that the add did not fail
+   if(m_geoPolyCutter.valid())
+   {
+      m_geoPolyCutter->addPolygon(polygon);   
+   }
+}
+
+void ossimSingleImageChain::addGeoPolyCutterPolygon(const ossimGeoPolygon& polygon)
+{
+   if(!m_geoPolyCutter.valid())
+   {
+      addGeoPolyCutter();
+   }
+   
+   // sanity check to verify that the add did not fail
+   if(m_geoPolyCutter.valid())
+   {
+      m_geoPolyCutter->addPolygon(polygon);
+   }
+}
+
+ossimRefPtr<const ossimImageHandler> ossimSingleImageChain::getImageHandler() const
+{
+   return ossimRefPtr<const ossimImageHandler>( m_handler.get() );
+}
+
+ossimRefPtr<ossimImageHandler> ossimSingleImageChain::getImageHandler()
+{
+   return m_handler;
+}
+
+ossimRefPtr<const ossimBandSelector> ossimSingleImageChain::getBandSelector() const
+{
+   return ossimRefPtr<const ossimBandSelector>( m_bandSelector.get() );
+}
+
+ossimRefPtr<ossimBandSelector> ossimSingleImageChain::getBandSelector()
+{
+   return m_bandSelector;
+}
+
+ossimRefPtr<const ossimHistogramRemapper> ossimSingleImageChain::getHistogramRemapper() const
+{
+   return ossimRefPtr<const ossimHistogramRemapper>( m_histogramRemapper.get() );
+}
+
+ossimRefPtr<ossimHistogramRemapper> ossimSingleImageChain::getHistogramRemapper()
+{
+   return m_histogramRemapper;
+}
+
+ossimRefPtr<const ossimCacheTileSource> ossimSingleImageChain::getResamplerCache() const
+{
+   return ossimRefPtr<const ossimCacheTileSource>( m_resamplerCache.get() );
+}
+
+ossimRefPtr<ossimCacheTileSource> ossimSingleImageChain::getResamplerCache()
+{
+   return m_resamplerCache;
+}
+
+ossimRefPtr<const ossimImageRenderer> ossimSingleImageChain::getImageRenderer() const
+{
+   return ossimRefPtr<const ossimImageRenderer>( m_resampler.get() );
+}
+
+ossimRefPtr<ossimImageRenderer> ossimSingleImageChain::getImageRenderer()
+{
+   return m_resampler;
+}
+
+ossimRefPtr<const ossimScalarRemapper> ossimSingleImageChain::getScalarRemapper() const
+{
+   return ossimRefPtr<const ossimScalarRemapper>( m_scalarRemapper.get() );
+}
+
+ossimRefPtr<ossimScalarRemapper> ossimSingleImageChain::getScalarRemapper()
+{
+   return m_scalarRemapper;
+}
+
+ossimRefPtr<const ossimBrightnessContrastSource>
+ossimSingleImageChain::getBrightnessContrast() const
+{
+   return ossimRefPtr<const ossimBrightnessContrastSource>( m_brightnessContrast.get() );
+}
+
+ossimRefPtr<ossimBrightnessContrastSource> ossimSingleImageChain::getBrightnessContrast()
+{
+   return m_brightnessContrast;
+}
+
+ossimRefPtr<const ossimImageSharpenFilter>
+ossimSingleImageChain::getSharpenFilter() const
+{
+   return ossimRefPtr<const ossimImageSharpenFilter>( m_sharpen.get() );
+}
+
+ossimRefPtr<ossimImageSharpenFilter> ossimSingleImageChain::getSharpenFilter()
+{
+   return m_sharpen;
+}
+
+ossimRefPtr<const ossimCacheTileSource> ossimSingleImageChain::getChainCache() const
+{
+   return ossimRefPtr<const ossimCacheTileSource>( m_chainCache.get() );
+}
+
+ossimRefPtr<ossimCacheTileSource> ossimSingleImageChain::getChainCache()
+{
+   return m_chainCache;
+}
+
+void ossimSingleImageChain::setAddHistogramFlag(bool flag)
+{
+   m_addHistogramFlag = flag;
+}
+
+bool ossimSingleImageChain::getAddHistogramFlag() const
+{
+   return m_addHistogramFlag;
+}
+
+void ossimSingleImageChain::setAddResamplerCacheFlag(bool flag)
+{
+   m_addResamplerCacheFlag = flag;
+}
+
+bool ossimSingleImageChain::getAddResamplerCacheFlag() const
+{
+   return m_addResamplerCacheFlag;
+}
+
+void ossimSingleImageChain::setAddChainCacheFlag(bool flag)
+{
+   m_addChainCacheFlag = flag;
+}
+
+bool ossimSingleImageChain::getAddChainCacheFlag() const
+{
+   return m_addChainCacheFlag;
+}
+
+void ossimSingleImageChain::setRemapToEightBitFlag(bool flag)
+{
+   m_remapToEightBitFlag = flag;
+}
+
+bool ossimSingleImageChain::getRemapToEightBitFlag() const
+{
+   return m_remapToEightBitFlag;
+}
+
+void ossimSingleImageChain::setThreeBandFlag(bool flag)
+{
+   m_threeBandFlag = flag;
+}
+
+bool ossimSingleImageChain::getThreeBandFlag() const
+{
+   return m_threeBandFlag;
+}
+   
+void ossimSingleImageChain::setThreeBandReverseFlag(bool flag)
+{
+   m_threeBandReverseFlag = flag;
+}
+
+bool ossimSingleImageChain::getThreeBandReverseFlag() const
+{
+   return m_threeBandReverseFlag;
+}
+
+void ossimSingleImageChain::setBrightnessContrastFlag(bool flag)
+{
+   m_brightnessContrastFlag = flag;
+}
+
+bool ossimSingleImageChain::getBrightnessContrastFlag() const
+{
+   return m_brightnessContrastFlag;
+}
+
+void ossimSingleImageChain::setSharpenFlag(bool flag)
+{
+   m_sharpenFlag = flag;
+}
+
+bool ossimSingleImageChain::getSharpenFlag() const
+{
+   return m_sharpenFlag;
+}
+
+void ossimSingleImageChain::setToThreeBands()
+{
+   if ( m_handler.valid() )
+   {
+      // Only do if not three bands already so the band list order is not wiped out.
+      if ( !m_bandSelector.valid() ||
+           ( m_bandSelector.valid() &&
+             ( m_bandSelector->getNumberOfOutputBands() != 3 ) ) )
+      {
+         std::vector<ossim_uint32> bandList(3);
+
+         if ( m_handler->getRgbBandList( bandList ) == false )
+         {
+            const ossim_uint32 BANDS = m_handler->getNumberOfInputBands();
+            if(BANDS >= 3)
+            {
+               bandList[0] = 0;
+               bandList[1] = 1;
+               bandList[2] = 2;
+            }
+            else
+            {
+               bandList[0] = 0;
+               bandList[1] = 0;
+               bandList[2] = 0;
+            }
+         }
+         setBandSelection(bandList);
+      }
+   }
+}
+
+void ossimSingleImageChain::setToThreeBandsReverse()
+{
+   if ( m_handler.valid() )
+   {
+      std::vector<ossim_uint32> bandList(3);
+      const ossim_uint32 BANDS = m_handler->getNumberOfInputBands();
+      if(BANDS >= 3)
+      {
+         bandList[0] = 2;
+         bandList[1] = 1;
+         bandList[2] = 0;
+      }
+      else
+      {
+         bandList[0] = 0;
+         bandList[1] = 0;
+         bandList[2] = 0;
+      }
+      setBandSelection(bandList);
+   }
+}
+
+void ossimSingleImageChain::setBandSelection(
+   const std::vector<ossim_uint32>& bandList)
+{
+   if (!m_bandSelector)
+   {
+      addBandSelector();
+   }
+   m_bandSelector->setEnableFlag(true);
+   m_bandSelector->setOutputBandList(bandList);
+   if ( m_histogramRemapper.valid() )
+   {
+      m_histogramRemapper->initialize();
+   }
+}
+ossimScalarType ossimSingleImageChain::getImageHandlerScalarType() const
+{
+   ossimScalarType result = OSSIM_SCALAR_UNKNOWN;
+   if ( m_handler.valid() )
+   {
+      result = m_handler->getOutputScalarType();
+   }
+   return result;
+}
+
+bool ossimSingleImageChain::openHistogram( ossimHistogramRemapper::StretchMode mode )
+{
+   bool result = false;
+   ossimRefPtr<ossimImageHandler> ih = getImageHandler();
+   if ( ih.valid() )
+   {
+      ossimRefPtr<ossimHistogramRemapper> hr = getHistogramRemapper();
+      if ( hr.valid() )
+      {
+         ossimFilename f = ih->getFilenameWithThisExtension( ossimString("his") );
+         if ( hr->openHistogram( f ) == true )
+         {
+            // Enable:
+            hr->setEnableFlag(true);
+
+            // Set the mode:
+            hr->setStretchMode( mode );
+
+            result = true;
+         }
+      }
+   }
+   return result;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimSlopeFilter.cpp b/ossim/src/ossim/imaging/ossimSlopeFilter.cpp
new file mode 100644
index 0000000..8865946
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimSlopeFilter.cpp
@@ -0,0 +1,209 @@
+//*******************************************************************
+// OSSIM
+//
+// License:  See top level LICENSE.txt file.
+// 
+//*******************************************************************
+//  $Id: ossimSlopeFilter.cpp 23451 2015-07-27 15:42:17Z okramer $
+
+#include <iostream>
+
+#include <ossim/imaging/ossimSlopeFilter.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimStringProperty.h>
+
+RTTI_DEF1(ossimSlopeFilter, "ossimSlopeFilter", ossimImageSourceFilter)
+
+const char* SLOPE_TYPE_KW = "slope_type";
+   
+ossimSlopeFilter::ossimSlopeFilter()
+   :  ossimImageSourceFilter(),
+      m_slopeType (DEGREES)
+{
+}
+
+ossimSlopeFilter::ossimSlopeFilter(ossimImageSource* inputSource)
+   :
+   ossimImageSourceFilter(inputSource),
+   m_slopeType (DEGREES)
+{
+}
+
+ossimSlopeFilter::~ossimSlopeFilter()
+{
+   m_normals = 0;
+}
+
+ossimRefPtr<ossimImageData> ossimSlopeFilter::getTile(const ossimIrect& rect, ossim_uint32 rLevel)
+{
+   if(!theInputConnection)
+      return ossimRefPtr<ossimImageData>();
+
+   if ( !isSourceEnabled() )
+      return theInputConnection->getTile(rect, rLevel);
+
+   if (!m_normals.valid())
+      initialize();
+
+   ossimRefPtr<ossimImageData> normals = m_normals->getTile(rect, rLevel);
+   if (!normals.valid())
+      return ossimRefPtr<ossimImageData>();
+
+   ossimRefPtr<ossimImageData> outputTile = new ossimImageData(this, OSSIM_FLOAT32, 1);
+   outputTile->setImageRectangle(rect);
+   outputTile->initialize();
+   ossim_float32* output_buf = outputTile->getFloatBuf();
+   ossim_float32 null_output = (ossim_float32) outputTile->getNullPix(0);
+
+   double z, theta;
+   double null_input = normals->getNullPix(2);
+   ossim_uint32 num_pix = normals->getSizePerBand();
+   for (ossim_uint32 i=0; i<num_pix; ++i)
+   {
+      z = normals->getPix(i, 2);
+      if (z == null_input)
+      {
+         theta = null_output;
+      }
+      else
+      {
+         switch (m_slopeType)
+         {
+         case RADIANS:
+            theta = acos(z);
+            break;
+         case RATIO:
+            theta = z;
+            break;
+         case NORMALIZED:
+            theta = fabs(acos(z)/M_PI);
+            break;
+         default: // Degrees
+            theta = ossim::acosd(z);
+         };
+      }
+      output_buf[i] = theta;
+   }
+
+   outputTile->validate();
+   return outputTile;
+}
+
+void ossimSlopeFilter::initialize()
+{
+   if (!m_normals.valid())
+      m_normals = new ossimImageToPlaneNormalFilter(theInputConnection);
+   m_normals->initialize();
+}
+
+void ossimSlopeFilter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property) return;
+
+   if(property->getName() == SLOPE_TYPE_KW)
+   {
+      ossimString pts (property->valueToString());
+      pts.upcase();
+      if (pts.contains("RADIANS"))
+         m_slopeType = RADIANS;
+      else if (pts.contains("DEGREES"))
+         m_slopeType = DEGREES;
+      else if (pts.contains("RATIO"))
+         m_slopeType = RATIO;
+      else if (pts.contains("NORMALIZED"))
+         m_slopeType = NORMALIZED;
+      else
+         return;
+
+      initialize();
+   }
+   else
+   {
+      ossimImageSourceFilter::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimSlopeFilter::getProperty(const ossimString& name)const
+{
+   if(name == SLOPE_TYPE_KW)
+   {
+      ossimString propValue;
+      switch (m_slopeType)
+      {
+      case RADIANS:
+         propValue = getSlopeTypeString(RADIANS);
+         break;
+      case RATIO:
+         propValue = getSlopeTypeString(RATIO);
+         break;
+      case NORMALIZED:
+         propValue = getSlopeTypeString(NORMALIZED);
+      default:
+         propValue = getSlopeTypeString(DEGREES);
+      }
+
+      vector<ossimString> list;
+      list.push_back(getSlopeTypeString(RADIANS));
+      list.push_back(getSlopeTypeString(DEGREES));
+      list.push_back(getSlopeTypeString(RATIO));
+      list.push_back(getSlopeTypeString(NORMALIZED));
+      
+      return new ossimStringProperty(SLOPE_TYPE_KW, propValue, false, list);
+   }
+
+   return ossimImageSourceFilter::getProperty(name);
+}
+
+void ossimSlopeFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageSourceFilter::getPropertyNames(propertyNames);
+   propertyNames.push_back(SLOPE_TYPE_KW);
+}
+
+bool ossimSlopeFilter::saveState(ossimKeywordlist& kwl, const char* prefix) const
+{
+   ossimImageSourceFilter::saveState(kwl, prefix);
+
+   kwl.add(prefix, SLOPE_TYPE_KW, getSlopeTypeString(m_slopeType).c_str(), true);
+
+   return true;
+}
+
+bool ossimSlopeFilter::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   ossimImageSourceFilter::loadState(kwl, prefix);
+
+   ossimString lookup = kwl.find(prefix, SLOPE_TYPE_KW);
+   if (!lookup.empty())
+   {
+      ossimRefPtr<ossimProperty> prop =  new ossimStringProperty(SLOPE_TYPE_KW, lookup, false);
+      setProperty(prop);
+   }
+
+   return true;
+}
+
+ossimString ossimSlopeFilter::getSlopeTypeString(SlopeType t)
+{
+   if (t == RADIANS)
+      return "RADIANS";
+   if (t == DEGREES)
+      return "DEGREES";
+   if (t == RATIO)
+      return "RATIO";
+   if (t == NORMALIZED)
+      return "NORMALIZED";
+   return "";
+}
+
+ossimString ossimSlopeFilter::getLongName()const
+{
+   return ossimString("Slope Filter, Computes the change in pixel value in x, Y direction as a "
+         "slope quantity. Assumes that the input source represents elevation in meters.");
+}
+
+ossimString ossimSlopeFilter::getShortName()const
+{
+   return ossimString("Slope Filter");
+}
+
diff --git a/ossim/src/ossim/imaging/ossimSrtmTileSource.cpp b/ossim/src/ossim/imaging/ossimSrtmTileSource.cpp
new file mode 100644
index 0000000..20d46d6
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimSrtmTileSource.cpp
@@ -0,0 +1,179 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Burken
+//
+// Description:
+// 
+// Image handler class for a Shuttle Radar Topography Mission (SRTM) file.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimSrtmTileSource.cpp 22769 2014-05-08 19:35:04Z dburken $
+
+#include <ossim/imaging/ossimSrtmTileSource.h>
+#include <ossim/base/ossimDirectory.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/support_data/ossimSrtmSupportData.h>
+
+RTTI_DEF1(ossimSrtmTileSource,
+          "ossimSrtmTileSource",
+          ossimGeneralRasterTileSource)
+
+static ossimTrace traceDebug("ossimSrtmTileSource:debug");
+
+ossimSrtmTileSource::ossimSrtmTileSource()
+   :
+   ossimGeneralRasterTileSource(),
+   m_SrtmSupportData()
+{
+}
+
+ossimSrtmTileSource::~ossimSrtmTileSource()
+{
+}
+
+bool ossimSrtmTileSource::open()
+{
+   static const char MODULE[] = "ossimSrtmTileSource::open";
+   if (traceDebug())
+   {
+      CLOG << " Entered..." << std::endl
+           << "srtm " << theImageFile << std::endl;
+   }
+   
+   if(isOpen())
+   {
+      close();
+   }
+
+   bool result = false;
+   
+   //---
+   // Set the scan for min max flag to true.  This will only scan if not found
+   // in a omd file so this is a one time hit typically taken when building
+   // reduced res sets.
+   //---
+   if ( m_SrtmSupportData.setFilename(theImageFile, true) )
+   {
+      ossimKeywordlist kwl;
+      m_SrtmSupportData.saveState(kwl);
+
+      ossimGeneralRasterInfo generalRasterInfo;
+      if ( generalRasterInfo.loadState(kwl) )
+      {
+         theMetaData = generalRasterInfo.getImageMetaData();
+
+         result =  ossimGeneralRasterTileSource::open(generalRasterInfo);
+      }
+   }
+   else
+   {
+      if (traceDebug()) CLOG << " Unable to set filename"<< std::endl;
+      
+      return false;
+   }
+
+   if (traceDebug())
+   {
+      CLOG << " Exited with " << (result?"true":"false") << " ..."
+           << std::endl;
+   }
+   
+   return result;
+}
+   
+//************************************************************************************************
+//! Returns the image geometry object associated with this tile source or NULL if non defined.
+//! The geometry contains full-to-local image transform as well as projection (image-to-world)
+//************************************************************************************************
+ossimRefPtr<ossimImageGeometry> ossimSrtmTileSource::getImageGeometry()
+{
+   if(!theGeometry.valid())
+   {
+      // First time through set the projection.
+      theGeometry = new ossimImageGeometry();
+
+      theGeometry->setProjection( m_SrtmSupportData.getProjection().get() );
+
+      // Set image things the geometry object should know about.
+      initImageParameters( theGeometry.get() );
+   }
+   return theGeometry;
+}
+
+bool ossimSrtmTileSource::saveState(ossimKeywordlist& kwl,
+                                    const char* prefix)const
+{
+   if (m_SrtmSupportData.saveState(kwl, prefix))
+   {
+      return ossimImageHandler::saveState(kwl,prefix);
+   }
+   return false;
+}
+
+bool ossimSrtmTileSource::loadState(const ossimKeywordlist& kwl,
+                                    const char* prefix)
+{
+   bool result = false;
+   
+   std::string pfx = "";
+   if (prefix) // Cannot give null to std::string.
+   {
+      pfx = prefix;
+   }
+
+   std::string key   = ossimKeywordNames::TYPE_KW;
+   std::string value = kwl.findKey( pfx, key );
+   if ( value == "ossimSrtmTileSource" )
+   {
+      key = ossimKeywordNames::FILENAME_KW;
+      value = kwl.findKey( pfx, key );
+      if ( value.size() )
+      {
+         // Set the file name:
+         theImageFile = value;
+
+         // Call ossimSrtmTileSource::open which will do the rest of the work.
+         if ( open() )
+         {
+            // Must call to pick up id for connections.
+            result = ossimImageSource::loadState(kwl, prefix);
+         }
+      }
+   }
+
+   return result;
+}
+
+ossimRefPtr<ossimProperty> ossimSrtmTileSource::getProperty(
+   const ossimString& name)const
+{
+   if(name == "file_type")
+   {
+      return new ossimStringProperty(name, getShortName());
+   }
+   
+   return ossimImageHandler::getProperty(name);
+}
+
+void ossimSrtmTileSource::getPropertyNames(
+   std::vector<ossimString>& propertyNames)const
+{
+   ossimImageHandler::getPropertyNames(propertyNames);
+   propertyNames.push_back("file_type");
+}
+
+ossimString ossimSrtmTileSource::getShortName() const
+{
+   return ossimString("SRTM");
+}
+   
+ossimString ossimSrtmTileSource::getLongName() const
+{
+   return ossimString("SRTM reader");
+}
+ 
diff --git a/ossim/src/ossim/imaging/ossimSubImageTileSource.cpp b/ossim/src/ossim/imaging/ossimSubImageTileSource.cpp
new file mode 100644
index 0000000..811e109
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimSubImageTileSource.cpp
@@ -0,0 +1,226 @@
+//*****************************************************************************
+// FILE: ossimSubImageTileSource.cc
+//
+// Copyright (C) 2001 ImageLinks, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Contains implementation of class ossimSubImageTileSource.
+//   This tile source permits specifying an offset that is to be applied to the
+//   tile origin for all getTile() requests. It is intended for converting
+//   a full-image space coordinate to a sub-image coordinate.
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimSubImageTileSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimSubImageTileSource.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/imaging/ossimImageData.h>
+
+RTTI_DEF1(ossimSubImageTileSource,
+          "ossimSubImageTileSource",
+          ossimImageSourceFilter);
+
+static const char* SUBIMAGE_OFFSET_X = "offset_x";
+static const char* SUBIMAGE_OFFSET_Y = "offset_y";
+
+ossimSubImageTileSource::ossimSubImageTileSource()
+   : ossimImageSourceFilter(),
+     theSubImageOffset(0, 0),
+     theTile(0)
+{
+}
+
+ossimSubImageTileSource::ossimSubImageTileSource(ossimImageSource* inputSource)
+   : ossimImageSourceFilter(inputSource), theSubImageOffset(0, 0),
+     theTile(0)
+{
+}
+
+ossimSubImageTileSource::ossimSubImageTileSource(ossimImageSource* inputSource,
+                                                 const ossimIpt&   offset)
+   : ossimImageSourceFilter(inputSource), theSubImageOffset(offset),
+     theTile(0)
+{
+}
+
+ossimSubImageTileSource::~ossimSubImageTileSource()
+{
+}
+
+//*****************************************************************************
+//  METHOD: ossimSubImageTileSource::getTile()
+//  
+//*****************************************************************************
+ossimRefPtr<ossimImageData> ossimSubImageTileSource::getTile(
+   const ossimIrect& rect,
+   ossim_uint32  res_level)
+{
+   ossimIpt offset = theSubImageOffset;
+
+   if(res_level)
+   {
+      //***
+      // Determine the offset for the particular rr level requested:
+      //***
+      ossimDpt decimation_factor;
+      theInputConnection->getDecimationFactor(res_level, decimation_factor);
+      
+      if(!decimation_factor.hasNans())
+      {
+         offset = ossimIpt((int)(theSubImageOffset.x*decimation_factor.x + 0.5),
+                           (int)(theSubImageOffset.y*decimation_factor.y + 0.5));
+      }
+      else
+      {
+         offset = theSubImageOffset;
+      }
+   }
+   //
+   // Apply the offset to the requested rect and fetch tile. The tile's origin
+   // needs to be adjusted to reflect the requested origin:
+   //
+   ossimIrect rect_prime (rect - offset);
+
+   ossimRefPtr<ossimImageData> tile =
+      ossimImageSourceFilter::getTile(rect_prime, res_level);
+   
+   if(theTile.valid())
+   {
+      theTile->setImageRectangle(rect_prime);
+
+      if(tile.valid())
+      {
+         theTile->loadTile(tile.get());
+      }
+      else
+      {
+         theTile->makeBlank();
+      }
+   }
+   else
+   {
+      if(tile.valid())
+      {
+         theTile = (ossimImageData*)tile->dup();
+      }
+   }
+   if(theTile.valid())
+   {
+      theTile->setOrigin(rect.ul());
+      theTile->validate();
+   }
+   
+   return theTile;
+}
+
+//*****************************************************************************
+//  METHOD: ossimSubImageTileSource::getBoundingRect()
+//  
+//*****************************************************************************
+ossimIrect ossimSubImageTileSource::getBoundingRect(ossim_uint32 resLevel) const
+{
+   ossimDrect result;
+
+   result.makeNan();
+   if(!theInputConnection)
+      return result;
+   ossimDpt offset = theSubImageOffset;
+   
+   ossimDrect rect (theInputConnection->getBoundingRect(resLevel));
+   if(resLevel)
+   {
+      ossimDpt decimation_factor;
+      theInputConnection->getDecimationFactor(resLevel, decimation_factor);
+
+      if(!decimation_factor.hasNans())
+      {
+         rect*=decimation_factor;
+         offset= ossimDpt(theSubImageOffset.x*decimation_factor.x,
+                          theSubImageOffset.y*decimation_factor.y);
+      }
+   }
+   ossimDrect rect_prime (rect + offset);
+   
+   return rect_prime;
+}
+
+//*****************************************************************************
+//  METHOD: ossimSubImageTileSource::getValidImageVertices()
+//  
+//*****************************************************************************
+void ossimSubImageTileSource::getValidImageVertices(vector<ossimIpt>& vertices,
+                                                    ossimVertexOrdering ordering,
+                                                    ossim_uint32 /* resLevel */) const
+{
+   if(!theInputConnection)
+   {
+      vertices.clear();
+      return;
+   }
+
+   ossimDpt offset (theSubImageOffset);
+
+   theInputConnection->getValidImageVertices(vertices, ordering);
+   vector<ossimIpt>::iterator vertex = vertices.begin();
+
+   while (vertex != vertices.end())
+   {
+      (*vertex) += offset;
+      vertex++;
+   }
+   
+   return;
+}
+
+void ossimSubImageTileSource::initialize()
+{
+   ossimImageSourceFilter::initialize();
+
+   theTile = NULL;
+}
+
+bool ossimSubImageTileSource::loadState(const ossimKeywordlist& kwl,
+                                        const char* prefix)
+{
+   const char* offset_x = kwl.find(prefix, SUBIMAGE_OFFSET_X);
+   const char* offset_y = kwl.find(prefix, SUBIMAGE_OFFSET_Y);
+
+   if(offset_x)
+   {
+      theSubImageOffset.x = ossimString(offset_x).toLong();
+      
+   }
+   if(offset_y)
+   {
+      theSubImageOffset.y = ossimString(offset_y).toLong();      
+   }
+   
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
+bool ossimSubImageTileSource::saveState(ossimKeywordlist& kwl,
+                                        const char* prefix)const
+{
+   bool result = ossimImageSourceFilter::saveState(kwl, prefix);
+   
+   kwl.add(prefix,
+           SUBIMAGE_OFFSET_X,
+           theSubImageOffset.x,
+           true);
+
+   kwl.add(prefix,
+           SUBIMAGE_OFFSET_Y,
+           theSubImageOffset.y,
+           true);
+   
+   return result;        
+}
+
diff --git a/ossim/src/ossim/imaging/ossimTableRemapper.cpp b/ossim/src/ossim/imaging/ossimTableRemapper.cpp
new file mode 100644
index 0000000..f1fd409
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimTableRemapper.cpp
@@ -0,0 +1,577 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Table remapper class definition.
+//
+// Takes input tile, remaps it through a table, then output tile in the desired
+// scalar type.
+//
+// Two modes one that works on native remap tables, that being of the same
+// scalar type (like ossim_uint8) of the input connection, and another that
+// uses a normalized remap table (more scalar independent).
+//
+//*************************************************************************
+// $Id: ossimTableRemapper.cpp 22745 2014-04-22 16:57:22Z dburken $
+
+#include <ossim/imaging/ossimTableRemapper.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+
+RTTI_DEF1(ossimTableRemapper, "ossimTableRemapper", ossimImageSourceFilter)
+
+static ossimTrace traceDebug("ossimTableRemapper:debug");
+
+static const char* TABLE_TYPE[] = { "UNKNOWN", "NATIVE", "NORMALIZED" };
+
+ossimTableRemapper::ossimTableRemapper()
+   :
+      ossimImageSourceFilter(),  // base class
+      theTile(0),
+      theTmpTile(0),
+      theNormBuf(0),
+      theTableBinCount(0),
+      theTableBandCount(0),
+      theTableType(ossimTableRemapper::UKNOWN),
+      theInputScalarType(OSSIM_SCALAR_UNKNOWN),
+      theOutputScalarType(OSSIM_SCALAR_UNKNOWN)
+{
+   //***
+   // Set the base class "theEnableFlag" to off since no adjustments have been
+   // made yet.
+   //***
+   //disableSource();
+}
+
+ossimTableRemapper::~ossimTableRemapper()
+{
+   destroy();
+}
+
+void ossimTableRemapper::destroy()
+{
+   if (theNormBuf)
+   {
+      delete [] theNormBuf;
+      theNormBuf = 0;
+   }
+   theTmpTile = 0;
+   theTile    = 0;
+}
+
+void ossimTableRemapper::initialize()
+{
+   //---
+   // Call the base class initialize.
+   // Note:  This will reset "theInputConnection" if it changed...
+   //---
+   ossimImageSourceFilter::initialize();
+   destroy();
+   if (theInputConnection)
+   {
+      theInputScalarType = theInputConnection->getOutputScalarType();
+      
+      // Since we override "getOutputScalarType" make sure something's set.
+      if (theOutputScalarType == OSSIM_SCALAR_UNKNOWN)
+      {
+         theOutputScalarType = theInputConnection->getOutputScalarType();
+      }
+
+      if (theTile.valid())
+      {
+         //if ( theTile->getNumberOfBands() !=
+         //     theInputConnection->getNumberOfOutputBands() )
+        // {
+            // Wipe everything slick. The next getTile will call allocate.
+        //    destroy();
+        // }
+      }
+   }
+
+   // Nothing else to do for this...
+}
+
+void ossimTableRemapper::allocate(const ossimIrect& rect)
+{
+   //---
+   // It's either first getTile or we've had either a resize, so allocate
+   // needed stuff...
+   //---
+   destroy();
+
+   if (theInputConnection)
+   {
+      ossim_uint32 width  = rect.width();
+      ossim_uint32 height = rect.height();
+    
+      theTile =  ossimImageDataFactory::instance()->create(this,this);
+      theTile->setImageRectangle(rect); 
+     // theTile =
+     //    ossimImageDataFactory::instance()->create(this,
+     //                                              getOutputScalarType(),
+     //                                              getNumberOfOutputBands(),
+     //                                              width,x
+     //                                              height);
+      theTile->initialize();
+
+
+      if (theInputScalarType !=  getOutputScalarType() &&
+          theTableType == ossimTableRemapper::NATIVE)
+      {
+         //---
+         // We need a temp tile so we can do two remaps
+         // inputTile->remapTable->tmpTile then
+         // tmpTile->normalize->theTile(unnormalize to new scalar)...
+         //---
+         theTmpTile 
+         = ossimImageDataFactory::instance()->create(this,
+                                                     theInputScalarType,
+                                                     getNumberOfOutputBands(),
+                                                     width,
+                                                     height);
+         theTmpTile->setMinPix(theTile->getMinPix(), theTile->getNumberOfBands());
+         theTmpTile->initialize();
+
+      }
+
+      if (theTableType == ossimTableRemapper::NORMALIZED ||
+          theInputScalarType != theOutputScalarType)
+      {
+         theNormBuf = new ossim_float64[theTile->getSize()];
+      }
+   }
+}
+
+ossimRefPtr<ossimImageData> ossimTableRemapper::getTile(
+   const ossimIrect& tile_rect, ossim_uint32 resLevel)
+{
+   ossimRefPtr<ossimImageData> result = 0;
+   
+   if(theInputConnection)
+   {
+      // Fetch tile from pointer from the input source.
+      result = theInputConnection->getTile(tile_rect, resLevel);
+      if (theEnableFlag&&result.valid())
+      {  
+         // Get its status of the input tile.
+         ossimDataObjectStatus tile_status = result->getDataObjectStatus();
+         
+         // Check for remap bypass:
+         if ( (tile_status != OSSIM_NULL) &&
+              (tile_status != OSSIM_EMPTY) && theTable.size() )
+         {
+
+            // OK we have an input tile... and it's not null or empty.
+            if(!theTile)
+            {
+               allocate(tile_rect);
+            }
+            if (theTile.valid())
+            {
+               theTile->setImageRectangle(tile_rect);
+               if(theTmpTile.valid()) // not mandatory for all modes.
+               {
+                  theTmpTile->setImageRectangle(tile_rect);
+               }   
+               // Think things are good.  Do the real work...
+               if (theTableType == ossimTableRemapper::NATIVE)
+               {
+                  // Most efficient case...
+                  remapFromNativeTable(result);
+               }
+               else
+               {
+                  remapFromNormalizedTable(result);
+               }
+              
+               theTile->validate();
+               result = theTile;
+            }
+         }
+      }
+   }
+   return result;
+}
+
+void ossimTableRemapper::remapFromNativeTable(
+   ossimRefPtr<ossimImageData>& inputTile)
+{
+   switch (theOutputScalarType)
+   {
+      case OSSIM_UINT8:
+      {
+         remapFromNativeTable(ossim_uint8(0), inputTile);
+         break;
+      }
+      
+      case OSSIM_USHORT11:
+      case OSSIM_USHORT16:
+      {
+         remapFromNativeTable(ossim_uint16(0), inputTile);
+         break;
+      }
+      
+      case OSSIM_SSHORT16:
+      {
+         remapFromNativeTable(ossim_sint16(0), inputTile);
+         break;
+      }
+      
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT:
+      {
+         remapFromNativeTable(ossim_float32(0), inputTile);
+         break;
+      }
+      
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_DOUBLE:
+      {
+         remapFromNativeTable(ossim_float64(0), inputTile);
+         break;
+      }
+      
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         if(traceDebug())
+         {
+         // Shouldn't hit this.
+            ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimTableRemapper::remapFromNativeTable"
+            << "\nOutput scalar type is OSSIM_SCALAR_UNKNOWN!\n";
+         }
+         break;
+      }
+
+   } // End of "switch (theTableType)"
+}
+
+template <class T> void ossimTableRemapper::remapFromNativeTable(
+   T /* dummy */,
+   ossimRefPtr<ossimImageData>& inputTile)
+{
+   
+   const ossim_uint32 BANDS = theTile->getNumberOfBands();
+   const ossim_uint32 PPB   = theTile->getSizePerBand(); // pixels per band
+   //---
+   // NOTE:
+   // If (theTableBandCount == one) that means we only have one band; or,
+   // the user wanted to remap all bands using the same table...
+   //---
+   const ossim_uint32 BAND_OFFSET =
+      (theTableBandCount != 1) ? theTableBinCount: 0;
+
+
+
+   const T* rt = reinterpret_cast<T*>(&theTable.front()); // remap table (rt)
+   ossimRefPtr<ossimImageData> id;
+   if (theInputScalarType == theOutputScalarType)
+   {
+      id = theTile;
+   }
+   else
+   {
+      id = theTmpTile;
+   }
+   if(theTable.size() >= (BANDS*BAND_OFFSET))
+   {
+      for (ossim_uint32 band = 0; band < BANDS; ++band)
+      {
+         const T NULL_PIX = static_cast<T>(id->getNullPix(band));
+         //const T MIN_PIX  = static_cast<T>(id->getMinPix(band));
+
+         const T* s = static_cast<T*>(inputTile->getBuf(band)); // source (s)
+         T*       d = static_cast<T*>(id->getBuf(band));   // destination (d)
+
+         if(s&&d)
+         {
+            for (ossim_uint32 pixel = 0; pixel < PPB; ++pixel)
+            {
+               //---
+               // Get the source pixel and use it as an index to the table.
+               // Note Null is always the "0" index, min always the "1".
+               //---
+               T p = s[pixel];
+               if (p == NULL_PIX)  // Null is not always zero (dted).
+               {
+                  d[pixel] = NULL_PIX;
+                 // p = 0;
+               }
+               else
+               {
+      //         else
+      //         {
+      //            p = (p+1-MIN_PIX);  // If min == 1 we want that to map to index 1.
+      //         }
+
+                  ossim_uint32 table_index = static_cast<ossim_uint32>(p);
+                  
+                  //---
+                  // If within range use to index the remap table; else, null.
+                  // Note:
+                  // There is no min, max range checking on value retrieved from table.
+                  // Range checking should be performed when the table is built.
+                  //---
+                  if(table_index < theTableBinCount)
+                  {
+                     d[pixel] = rt[table_index];
+                  }
+      //            else if(table_index < 0)
+      //            {
+      //               if(theTableBinCount > 1)
+      //               {
+      //                  d[pixel] = rt[1];
+      //               }
+      //               else
+      //               {
+      //                  d[pixel] = table_index;
+       //              }
+       //           }
+                  else
+                  {
+                     if(theTableBinCount>0)
+                     {
+                        d[pixel] = rt[theTableBinCount-1];
+                     }
+                     else
+                     {
+                        d[pixel] = p;
+                    }
+                  }
+               }
+            }
+
+         }
+
+         rt += BAND_OFFSET; // Go to next band in the table.
+      }
+
+   }
+
+   if (theInputScalarType != theOutputScalarType)
+   {
+      // Normalize and copy the temp tile to a buffer.
+      id->copyTileToNormalizedBuffer(theNormBuf);
+
+      // Un-normalize and copy the buffer to the destination tile.
+      theTile->copyNormalizedBufferToTile(theNormBuf);
+   }
+}
+
+void ossimTableRemapper::remapFromNormalizedTable(
+   ossimRefPtr<ossimImageData>& inputTile)
+{
+   if (!theNormBuf) // First time...
+   {
+      theNormBuf = new ossim_float64[theTile->getSize()];
+   }
+   
+   // Normalize and copy the source tile to a buffer.
+   inputTile->copyTileToNormalizedBuffer(theNormBuf);
+
+   const ossim_uint32 BANDS = theTile->getNumberOfBands();
+   const ossim_uint32 PPB   = theTile->getSizePerBand(); // pixels per band
+
+   //---
+   // NOTE:
+   // If (theTableBandCount == one) that means we only have one band; or,
+   // the user wanted to remap all bands using the same table...
+   //---
+   const ossim_uint32 BAND_OFFSET = (theTableBandCount == 1) ? 0 : PPB;
+
+   // remap table (rt)
+   ossim_float64* rt = reinterpret_cast<ossim_float64*>(&theTable.front()); 
+
+   ossim_float64* buf = theNormBuf;
+   ossim_float64 p = 0.0;
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      for (ossim_uint32 pixel = 0; pixel < PPB; ++pixel)
+      {
+         // Get the source pixel...
+         ossim_uint32 idx
+            = static_cast<ossim_uint32>(buf[pixel]*theTableBinCount+0.5);
+
+         if((idx < theTableBinCount))
+         {
+            // If within range use to index the remap table; else, null.
+            p = (idx < theTableBinCount) ? rt[idx] : 0.0;
+         }
+//         else if(idx < 0)
+//         {
+//            p = 0.0;
+//         }
+         else 
+         {
+            p = 1.0;
+         }
+         // Range check (in case table bad) and assign to destination pixel.
+         buf[pixel] = (p >= 0.0) ? ( (p <=1.0) ? p : 1) : 0.0;
+      }
+
+      // Go to next band.
+      rt += BAND_OFFSET;
+      buf += PPB;
+   }
+   
+   // Un-normalize and copy the buffer to the destination tile.
+   theTile->copyNormalizedBufferToTile(theNormBuf);
+}
+
+ossimScalarType ossimTableRemapper::getOutputScalarType() const
+{
+   if (theOutputScalarType != OSSIM_SCALAR_UNKNOWN)
+   {
+      return theOutputScalarType;
+   }
+
+   return ossimImageSourceFilter::getOutputScalarType();
+}
+
+bool ossimTableRemapper::loadState(const ossimKeywordlist& kwl,
+                                   const char* prefix)
+{
+   // Look for scalar type keyword.
+   ossim_int32 st = ossimScalarTypeLut::instance()->
+      getEntryNumber(kwl, prefix, true);
+
+   // Lookup table returns -1 if not found so check return...
+   if ( (st != -1) && (st != OSSIM_SCALAR_UNKNOWN) )
+   {
+      theOutputScalarType = static_cast<ossimScalarType>(st);
+   }
+
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
+bool ossimTableRemapper::saveState(ossimKeywordlist& kwl,
+                                   const char* prefix) const
+{
+   // Save the output scalar type.
+   kwl.add(prefix,
+           ossimKeywordNames::SCALAR_TYPE_KW,
+           ossimScalarTypeLut::instance()->
+           getEntryString(theOutputScalarType).c_str(),
+           true);
+   
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
+ostream& ossimTableRemapper::print(ostream& os) const
+{
+   ossimScalarTypeLut* sl = ossimScalarTypeLut::instance();
+
+   os << "\nossimTableRemapper::print:"
+      << "\ntheTableBinCount:    " << theTableBinCount
+      << "\ntheTableBandCount:   " << theTableBandCount
+      << "\ntheTableType:        " << TABLE_TYPE[theTableType]
+      << "\ntheInputScalarType:  " << (*sl)[theInputScalarType]
+      << "\ntheOutputScalarType: " << (*sl)[theOutputScalarType]
+      << endl;
+   
+   if (theTile.valid())
+   {
+      os << "theTile:\n" << *theTile << endl;
+   }
+   if (theTmpTile.valid())
+   {
+      os << "theTmpTile:\n" << *theTmpTile << endl;
+   }
+
+   switch (theOutputScalarType)
+   {
+      case OSSIM_UCHAR:
+      {
+         dumpTable(ossim_uint8(0), os);
+         break;
+      }
+      
+      case OSSIM_USHORT11:
+      case OSSIM_USHORT16:
+      {
+         dumpTable(ossim_uint16(0), os);
+         break;
+      }
+      
+      case OSSIM_SSHORT16:
+      {
+         dumpTable(ossim_sint16(0), os);
+         break;
+      }
+      
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_FLOAT:
+      {
+         dumpTable(ossim_float32(0), os);
+         break;
+      }
+      
+      case OSSIM_NORMALIZED_DOUBLE:
+      case OSSIM_DOUBLE:
+      {
+         dumpTable(ossim_float64(0), os);
+         break;
+      }
+      
+      case OSSIM_SCALAR_UNKNOWN:
+      default:
+      {
+         if(traceDebug())
+         {
+         // Shouldn't hit this.
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimTableRemapper::print OSSIM_SCALAR_UNKNOWN!\n";
+         }
+         break;
+      }
+
+   } // End of "switch (theTableType)"
+
+   return os;
+}
+
+template <class T> void ossimTableRemapper::dumpTable(T /*dummy*/,
+                                                      ostream& os) const
+{
+   if (theTable.empty() || !theTableBinCount || !theTableBandCount)
+   {
+      return;
+   }
+
+   const T* table = reinterpret_cast<const T*>(&theTable.front());
+
+   ossim_uint32 table_index = 0;
+   for (ossim_uint32 band = 0; band < theTableBandCount; ++band)
+   {
+      for (ossim_uint32 index = 0; index < theTableBinCount; ++index)
+      {
+         os << "tabel[" << band << "][" << index << "]:  "
+            << static_cast<int>(table[table_index]) << endl;
+         ++table_index;
+      }
+   }
+}
+
+
+ostream& operator<<(ostream& os, const ossimTableRemapper& tr)
+{
+   return tr.print(os);
+}
+
+// Private to disallow use...
+ossimTableRemapper::ossimTableRemapper(const ossimTableRemapper&)
+{
+}
+
+// Private to disallow use...
+ossimTableRemapper& ossimTableRemapper::operator=(const ossimTableRemapper&)
+{
+   return *this;
+}
diff --git a/ossim/src/ossim/imaging/ossimTiffOverviewBuilder.cpp b/ossim/src/ossim/imaging/ossimTiffOverviewBuilder.cpp
new file mode 100644
index 0000000..31ec7b7
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimTiffOverviewBuilder.cpp
@@ -0,0 +1,1439 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Contains class definition for TiffOverviewBuilder
+// 
+//*******************************************************************
+//  $Id: ossimTiffOverviewBuilder.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimTiffOverviewBuilder.h>
+#include <ossim/parallel/ossimMpi.h>
+#include <ossim/parallel/ossimMpiMasterOverviewSequencer.h>
+#include <ossim/parallel/ossimMpiSlaveOverviewSequencer.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimErrorCodes.h>
+#include <ossim/base/ossimErrorContext.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimBitMaskTileSource.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimTiffTileSource.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimMapProjectionInfo.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/support_data/ossimGeoTiff.h>
+
+#include <xtiffio.h>
+#include <algorithm> /* for std::fill */
+#include <sstream>
+using namespace std;
+
+RTTI_DEF1(ossimTiffOverviewBuilder,
+          "ossimTiffOverviewBuilder",
+          ossimOverviewBuilderBase)
+
+static ossimTrace traceDebug("ossimTiffOverviewBuilder:degug");
+
+// Property keywords.
+static const char COPY_ALL_KW[]           = "copy_all_flag";
+static const char INTERNAL_OVERVIEWS_KW[] = "internal_overviews_flag";
+
+#ifdef OSSIM_ID_ENABLED
+static const char OSSIM_ID[] = "$Id: ossimTiffOverviewBuilder.cpp 23664 2015-12-14 14:17:27Z dburken $";
+#endif
+
+
+//*******************************************************************
+// Public Constructor:
+//*******************************************************************
+ossimTiffOverviewBuilder::ossimTiffOverviewBuilder()
+   :
+      ossimOverviewBuilderBase(),
+      m_nullDataBuffer(0),
+      m_bytesPerPixel(1),
+      m_bitsPerSample(8),
+      m_tileWidth(0),
+      m_tileHeight(0),
+      m_tileSizeInBytes(0),
+      m_sampleFormat(0),
+      m_currentTiffDir(0),
+      m_tiffCompressType(COMPRESSION_NONE),
+      m_jpegCompressQuality(DEFAULT_COMPRESS_QUALITY),
+      m_resampleType(ossimFilterResampler::ossimFilterResampler_BOX),
+      m_nullPixelValues(),
+      m_copyAllFlag(false),
+      m_outputTileSizeSetFlag(false),
+      m_internalOverviewsFlag(false)
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimTiffOverviewBuilder::ossimTiffOverviewBuilder DEBUG:\n";
+#ifdef OSSIM_ID_ENABLED
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "OSSIM_ID:  "
+         << OSSIM_ID
+         << "\n";
+#endif
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "overview stop dimension: " << m_overviewStopDimension
+         << std::endl;
+   }
+}
+
+ossimTiffOverviewBuilder::~ossimTiffOverviewBuilder()
+{
+}
+
+void ossimTiffOverviewBuilder::setResampleType(
+   ossimFilterResampler::ossimFilterResamplerType resampleType)
+{
+   m_resampleType = resampleType;
+}
+
+bool ossimTiffOverviewBuilder::buildOverview(const ossimFilename& overview_file, bool copy_all)
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimTiffOverviewBuilder::buildOverview DEBUG:"
+         << "\noverview file: " << overview_file.c_str()
+         << "\ncopy_all flag: " << (copy_all?"true":"false")
+         << std::endl;
+   }
+
+
+   m_outputFile  = overview_file;
+   m_copyAllFlag = copy_all;
+
+   return execute();
+}
+
+
+bool ossimTiffOverviewBuilder::execute()
+{
+   static const char MODULE[] = "ossimTiffOverviewBuilder::execute";
+   
+   if (theErrorStatus == ossimErrorCodes::OSSIM_ERROR)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE << " ERROR:"
+         << "\nError status has been previously set!  Returning..."
+         << std::endl;
+      return false;
+   }
+
+   if ( !m_imageHandler || m_imageHandler->hasError() )
+   {
+      setErrorStatus();
+      return false;
+   }
+
+   m_outputFile = getOutputFile();
+   if (m_outputFile == ossimFilename::NIL)
+   {
+      return false;
+   }
+
+   // Check the file.  Disallow same file overview building.
+   if ( !buildInternalOverviews() && (m_imageHandler->getFilename() == m_outputFile) )
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "Source image file and overview file cannot be the same!"
+         << std::endl;
+      return false;
+   }
+
+   ossimFilename outputFileTemp = m_outputFile;
+   
+   if ( !buildInternalOverviews() )
+   {
+      // Add .tmp in case process gets aborted to avoid leaving bad .ovr file.
+      outputFileTemp += ".tmp";
+   }
+
+   // Required number of levels needed including r0.
+   ossim_uint32 requiedResLevels = getRequiredResLevels(m_imageHandler.get());
+
+   // Zero based starting resLevel.
+   ossim_uint32 startingResLevel  = 0;
+   if ( !copyR0() )
+   {
+      startingResLevel = m_imageHandler->getNumberOfDecimationLevels();
+   }
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE
+         << "\nCurrent number of reduced res sets: "
+         << m_imageHandler->getNumberOfDecimationLevels()
+         << "\nNumber of required reduced res sets:  " << requiedResLevels
+         << "\nStarting reduced res set:    " << startingResLevel
+         << "\nResampling type:  " << getOverviewType().c_str()
+         << std::endl;
+   }
+
+   if ( startingResLevel >= requiedResLevels )
+   {
+      ossimNotify(ossimNotifyLevel_INFO)
+         << MODULE << " NOTICE:"
+         << "\nImage has required reduced resolution data sets.\nReturning..."
+         << std::endl;
+      return true;
+   }
+
+   //---
+   // If image handler is band selector, start with all bands.
+   // Some sources, e.g. ossimEnviTileSource can pick up default
+   // bands and filter out all other bands.
+   //---
+   m_imageHandler->setOutputToInputBandList();  
+   
+   //---
+   // If alpha bit mask generation was requested, then need to instantiate the mask writer object.
+   // This is simply a "transparent" tile source placed after to the right of the image handler
+   // that scans the pixels being pulled and accumulates alpha bit mask for writing at the end.
+   //---
+   if (m_bitMaskSpec.getSize() > 0)
+   {
+      m_maskWriter = new ossimBitMaskWriter();
+      m_maskWriter->loadState(m_bitMaskSpec);
+      m_maskWriter->setStartingResLevel(1);
+      ossimRefPtr<ossimBitMaskTileSource> bmts = new ossimBitMaskTileSource;
+      bmts->setAssociatedMaskWriter(m_maskWriter.get());
+      m_maskFilter = new ossimMaskFilter();
+      m_maskFilter->connectMyInputTo(m_imageHandler.get());
+      m_maskFilter->setMaskSource((ossimImageSource*)bmts.get());
+   }
+
+   ossimStdOutProgress* progressListener = 0; // Only used on master.
+   TIFF* tif = 0;                             // Only used on master.
+
+   setProcessStatus(ossimProcessInterface::PROCESS_STATUS_EXECUTING);
+   setPercentComplete(0.0);
+
+   if (ossimMpi::instance()->getRank() == 0 )
+   {
+      //---
+      // See if the file can be opened for writing.
+      // Note:  If this file existed previously it will be overwritten.
+      //---
+      tif = openTiff(outputFileTemp);
+      if (!tif)
+      {
+         // Set the error...
+         setErrorStatus();
+         ossimNotify(ossimNotifyLevel_WARN)
+            << __FILE__ << " " << __LINE__ << " " << MODULE
+            << "\nCannot open file: " << outputFileTemp << std::endl;
+         return false;
+      } 
+
+      //---
+      // Check for a listeners.  If the list is empty, add a standard out
+      // listener so that command line apps like img2rr will get some progress.
+      //---
+      ossimStdOutProgress* progressListener = 0;
+      if (theListenerList.empty())
+      {
+         progressListener = new ossimStdOutProgress(0, true);
+         addListener(progressListener);
+      }
+
+      if (startingResLevel == 0)
+      {       
+         if (!writeR0(tif))
+         {
+            // Set the error...
+            setErrorStatus();
+            ossimNotify(ossimNotifyLevel_WARN)
+               << __FILE__ << " " << __LINE__
+               << "\nError copying image!" << std::endl;
+
+            closeTiff(tif);
+            if (progressListener)
+            {
+               removeListener(progressListener);
+               delete progressListener;
+               progressListener = 0;
+            }
+            
+            if ( outputFileTemp.exists() && !buildInternalOverviews() )
+            {
+               ossimFilename::remove( outputFileTemp );
+            }
+            return false;
+         }
+
+         ++startingResLevel; // Go to r1.
+      }
+
+      if (needsAborting())
+      {
+         closeTiff(tif);
+         if (progressListener)
+         {
+            removeListener(progressListener);
+            delete progressListener;
+            progressListener = 0;
+         }
+         return false;
+      }
+      
+      TIFFFlush(tif);
+      
+   } // End of master only write of r0.
+        
+   for (ossim_uint32 i = startingResLevel; i < requiedResLevels; ++i)
+   {
+      if (ossimMpi::instance()->getRank() == 0 )
+      {
+         TIFFFlush(tif);
+      }
+
+      // Sync all processes...
+      ossimMpi::instance()->barrier();
+      
+      ossimRefPtr<ossimImageHandler> ih = 0;
+
+      //---
+      // If we copied r0 to the overview file use it instead of the
+      // original image handler as it is probably faster.
+      //---
+      if ( !copyR0() && (i <= m_imageHandler->getNumberOfDecimationLevels()) ) 
+      {
+         ih = m_imageHandler;
+      }
+      else
+      {
+         // We know we're a tiff so don't use the factory.
+         ih = new ossimTiffTileSource;
+         if ( ih->open(outputFileTemp) == false )
+         {
+            ih = 0;
+            
+            // Set the error...
+            setErrorStatus();
+            ossimNotify(ossimNotifyLevel_WARN)
+               << __FILE__ << " " << __LINE__ << " " << MODULE
+               << "\nCannot open file: " << outputFileTemp << std::endl;
+            
+            return false;
+         }
+
+         //---
+         // Since the overview file is being opened here, need to set its handler's starting res
+         // level where the original image file left off. This is usually R1 since the original
+         // file only has R0, but the original file may have more than R0:
+         //---
+         if ( !copyR0() &&  !buildInternalOverviews() )
+         {
+            ih->setStartingResLevel( m_imageHandler->getNumberOfDecimationLevels());
+         }
+      }
+      
+      // If mask is to be generated, need to notify both the writer and the reader of new 
+      // input source:
+      if (m_bitMaskSpec.getSize() > 0)
+      {
+         m_maskFilter->connectMyInputTo(0, ih.get());
+         m_maskWriter->connectMyInputTo(ih.get());
+      }
+
+      if ( !writeRn( ih.get(), tif, i, (i==startingResLevel) && !copyR0() ) )
+      {
+         // Set the error...
+         setErrorStatus();
+         ossimNotify(ossimNotifyLevel_WARN)
+            << __FILE__ << " " << __LINE__ << " " << MODULE
+            << "\nError creating reduced res set: " << i << std::endl;
+
+         ih->disconnect();
+         ih = 0;
+         if (tif)
+         {
+            closeTiff(tif);
+            tif = 0;
+         }
+
+         if (progressListener)
+         {
+            removeListener(progressListener);
+            delete progressListener;
+            progressListener = 0;
+         }
+
+         if ( outputFileTemp.exists() && !buildInternalOverviews() )
+         {
+            ossimFilename::remove( outputFileTemp );
+         }
+
+         return false;
+      }
+      
+      if (needsAborting())
+      {
+         ih->disconnect();
+         ih = 0;
+         if (tif)
+         {
+            closeTiff(tif);
+            tif = 0;
+         }
+         if (progressListener)
+         {
+            removeListener(progressListener);
+            delete progressListener;
+            progressListener = 0;
+         }
+         return false;
+      }
+      
+      if (m_bitMaskSpec.getSize() > 0)
+      {
+         m_maskFilter->disconnectMyInput(0);
+         m_maskWriter->disconnectAllInputs();
+      }
+      ih = 0;
+   }
+
+   if (ossimMpi::instance()->getRank() == 0 )
+   {
+      if (tif)
+      {
+         closeTiff(tif);
+         tif = 0;
+      }
+
+      // Write out the alpha bit mask if one was enabled:
+      if (m_maskWriter.valid())
+      {
+         ossimNotify(ossimNotifyLevel_INFO) << "Writing alpha bit mask file..." << std::endl;
+         m_maskWriter->close();
+      }
+
+      // Remove the listener if we had one.
+      if (progressListener)
+      {
+         removeListener(progressListener);
+         delete progressListener;
+         progressListener = 0;
+      }
+
+      if ( !buildInternalOverviews() )
+      {
+         outputFileTemp.rename(m_outputFile);
+      }
+      
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_INFO)
+            << "Wrote file:  " << m_outputFile.c_str() << std::endl;
+      }
+     
+      setCurrentMessage(ossimString("Finished..."));
+   }
+   
+   finalize();  // Reset band list if a band selector.
+
+   return true;
+}
+
+bool ossimTiffOverviewBuilder::writeR0(TIFF* tif)
+{
+   static const char MODULE[] = "ossimTiffOverviewBuilder::writeR0";
+
+   ossimIrect rect = m_imageHandler->getImageRectangle();
+
+   if (!setTags(tif, rect, 0))
+   {
+      closeTiff(tif);
+      ossimNotify(ossimNotifyLevel_WARN) << MODULE << " Error writing tags!" << std::endl;
+      return false;
+   }
+   
+   // Set the geotiff tags.
+   if ( setGeotiffTags(m_imageHandler->getImageGeometry().get(),
+                       m_imageHandler->getBoundingRect(),
+                       0,
+                       tif) == false )
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << MODULE << " NOTICE: geotiff tags not set." << std::endl;
+      } 
+   }
+   
+   ossim_int32 samples         = m_imageHandler->getNumberOfSamples();
+   ossim_int32 lines           = m_imageHandler->getNumberOfLines();
+   ossim_int32 tilesWide       = samples % m_tileWidth ?
+                           samples / m_tileWidth + 1 : samples / m_tileWidth;
+   ossim_int32 tilesHigh       = lines % m_tileHeight ?
+                           lines / m_tileHeight + 1 : lines / m_tileHeight;
+   ossim_int32 numberOfTiles   = tilesWide * tilesHigh;
+
+   int tileNumber = 0;
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimTiffOverviewBuilder::writeR0 DEBUG:"
+         << "\nsamples:        " << samples
+         << "\nlines:          " << lines
+         << "\ntilesWide:      " << tilesWide
+         << "\ntilesHigh:      " << tilesHigh
+         << "\nnumberOfTiles:  " << numberOfTiles
+         << std::endl;
+   }
+
+   setCurrentMessage(ossimString("Copying r0..."));
+   
+   //***
+   // Tile loop in the line direction.
+   //***
+   for(int i = 0; i < tilesHigh; ++i)
+   {
+      ossimIpt origin(0, 0);
+      origin.y = i * m_tileHeight;
+      
+      //***
+      // Tile loop in the sample (width) direction.
+      //***
+      for(int j = 0; j < tilesWide; ++j)
+      {
+         origin.x = j * m_tileWidth;
+
+         ossimRefPtr<ossimImageData> t =
+            m_imageHandler->getTile(ossimIrect(origin.x,
+                                                origin.y,
+                                                origin.x +(m_tileWidth-1),
+                                                origin.y +(m_tileHeight-1)));
+
+         // Check for errors reading tile:
+         if ( m_imageHandler->hasError() )
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << " ERROR: reading tile:  " << i << std::endl;
+            return false;
+         }
+
+         // If masking was enabled, pass the tile onto that object for processing:
+         if (m_maskWriter.valid())
+            m_maskWriter->generateMask(t, 0);
+
+         //***
+         // Band loop.
+         //***
+         for (uint32 band=0;
+              band < m_imageHandler->getNumberOfOutputBands();
+              ++band)
+         {
+            tdata_t data;
+            
+            if ( t.valid() && (t->getDataObjectStatus() != OSSIM_NULL) )
+            {
+               // Grab a pointer to the tile for the band.
+               data = static_cast<tdata_t>(t->getBuf(band));
+            }
+            else
+            {
+               data = static_cast<tdata_t>(&(m_nullDataBuffer.front()));
+            }
+
+            // Write the tile.
+            int bytesWritten = 0;
+            bytesWritten = TIFFWriteTile(tif,
+                                         data,
+                                         origin.x,
+                                         origin.y,
+                                         0,        // z
+                                         band);    // sample
+
+            if (bytesWritten != m_tileSizeInBytes)
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << MODULE << " ERROR:"
+                  << "Error returned writing tiff tile:  " << i
+                  << "\nExpected bytes written:  " << m_tileSizeInBytes
+                  << "\nBytes written:  " << bytesWritten
+                  << std::endl;
+               theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+               return false;
+            }
+
+         } // End of band loop.  
+        
+         ++tileNumber;
+
+      } // End of tile loop in the sample (width) direction.
+
+      if (needsAborting())
+      {
+         setPercentComplete(100.0);
+         break;
+      }
+      else
+      {
+         double tile = tileNumber;
+         double numTiles = numberOfTiles;
+         setPercentComplete(tile / numTiles * 100.0);
+      }
+
+   } // End of tile loop in the line (height) direction.
+
+   //***
+   // Write the current dirctory.
+   //***
+   if (!TIFFWriteDirectory(tif))
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE << " Error writing directory!" << std::endl;
+      return false;
+   }
+
+   ++m_currentTiffDir;
+
+   return true;
+}
+
+bool ossimTiffOverviewBuilder::writeRn( ossimImageHandler* imageHandler,
+                                        TIFF* tif,
+                                        ossim_uint32 resLevel,
+                                        bool firstResLevel )
+{
+   if ( tif ) //  && buildInternalOverviews() )
+   {
+      // Create an empty directory to start with.
+      TIFFCreateDirectory( tif );
+   }
+   else
+   {
+      return false;
+   }
+   
+   //---
+   // Set up the sequencer.  This will be one of three depending on if we're
+   // running mpi and if we are a master process or a slave process.
+   //---
+   ossimRefPtr<ossimOverviewSequencer> sequencer;
+   
+   if(ossimMpi::instance()->getNumberOfProcessors() > 1)
+   {
+      if ( ossimMpi::instance()->getRank() == 0 )
+      {
+         sequencer = new ossimMpiMasterOverviewSequencer();
+      }
+      else
+      {
+         sequencer = new ossimMpiSlaveOverviewSequencer();
+      }
+   }
+   else
+   {
+      sequencer = new ossimOverviewSequencer();
+   }
+   
+   sequencer->setImageHandler(imageHandler);
+
+   if (m_maskWriter.valid() && m_maskFilter.valid())
+   {
+      sequencer->setBitMaskObjects(m_maskWriter.get(), m_maskFilter.get());
+   }
+
+   // sourceResLevel: This is the res level to pull data from:
+   ossim_uint32 sourceResLevel = imageHandler->getNumberOfDecimationLevels() +
+      imageHandler->getStartingResLevel() - 1;
+
+   sequencer->setSourceLevel(sourceResLevel);
+   sequencer->setResampleType(m_resampleType);
+   sequencer->setTileSize( ossimIpt(m_tileWidth, m_tileHeight) );
+   
+   if ( firstResLevel )
+   {
+      // Set up things that are only performed on first scan through tiles.
+      
+      if ( getHistogramMode() != OSSIM_HISTO_MODE_UNKNOWN )
+      {
+         // Accumulate a histogram.  Can't do with mpi/multi-process.
+         if(ossimMpi::instance()->getNumberOfProcessors() == 1)
+         {
+            sequencer->setHistogramMode(getHistogramMode());
+         }
+         //---
+         // else{} Not sure if we want an error thrown here.  For now will handle at the
+         // application level.
+         //---
+      }
+      if ( getScanForMinMaxNull() == true )
+      {
+         sequencer->setScanForMinMaxNull(true);
+      }
+      else if ( getScanForMinMax() == true )
+      {
+         sequencer->setScanForMinMax(true);
+      }
+   }
+
+   // Note sequence setup must be performed before intialize. 
+   sequencer->initialize();
+
+   // If we are a slave process start the resampling of tiles.
+   if (ossimMpi::instance()->getRank() != 0 )
+   {
+      sequencer->slaveProcessTiles();
+      return true;
+   }
+
+   //---
+   // The rest of the method on master node only.
+   //---
+   static const char MODULE[] = "ossimTiffOverviewBuilder::writeRn";
+
+   ostringstream os;
+   os << "creating r" << resLevel << "...";
+   setCurrentMessage(os.str());
+
+   if (resLevel == 0)
+   {
+      return false;
+   }
+
+   ossimIrect rect;
+   sequencer->getOutputImageRectangle(rect);
+
+   if (!setTags(tif, rect, resLevel))
+   {
+      setErrorStatus();
+      closeTiff(tif);
+      tif = 0;
+      ossimNotify(ossimNotifyLevel_WARN) << MODULE << " Error writing tags!" << std::endl;
+      return false;
+   }
+
+   if ( !buildInternalOverviews() && !copyR0() && (resLevel == 1) )
+   {
+      //---
+      // Set the geotif tags for the first layer.
+      // Note this is done in writeR0 method if m_copyAllFlag is set.
+      //---
+      if ( setGeotiffTags(m_imageHandler->getImageGeometry().get(),
+                          ossimDrect(rect),
+                          resLevel,
+                          tif) == false )
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_NOTICE)
+               << MODULE << " NOTICE: geotiff tags not set." << std::endl;
+         } 
+      }
+   }
+
+   ossim_uint32 outputTilesWide = sequencer->getNumberOfTilesHorizontal();
+   ossim_uint32 outputTilesHigh = sequencer->getNumberOfTilesVertical();
+   ossim_uint32 numberOfTiles   = sequencer->getNumberOfTiles();
+   ossim_uint32 tileNumber      = 0;
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimTiffOverviewBuilder::writeRn DEBUG:"
+         << "\noutputTilesWide:  " << outputTilesWide
+         << "\noutputTilesHigh:  " << outputTilesHigh
+         << "\nnumberOfTiles:    " << numberOfTiles
+         << std::endl;
+   }
+ 
+   // Tile loop in the line direction.
+   ossim_uint32 y = 0;
+
+   for(ossim_uint32 i = 0; i < outputTilesHigh; ++i)
+   {
+      // Tile loop in the sample (width) direction.
+      ossim_uint32 x = 0;
+      for(ossim_uint32 j = 0; j < outputTilesWide; ++j)
+      {
+         // Grab the resampled tile.
+         ossimRefPtr<ossimImageData> t = sequencer->getNextTile();
+
+         // Check for errors reading tile:
+         if ( sequencer->hasError() )
+         {
+            setErrorStatus();
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << " ERROR: reading tile:  " << i << std::endl;
+            return false;
+         }
+         
+         if ( t.valid() && ( t->getDataObjectStatus() != OSSIM_NULL ) )
+         {
+            // Write it to the tiff.
+            for (ossim_uint32 band = 0; band < t->getNumberOfBands(); ++band)
+            {
+               // Write the tile.
+               int bytesWritten = 0;
+               bytesWritten = TIFFWriteTile(tif,
+                                            t->getBuf(band),
+                                            x,
+                                            y,
+                                            0,        // z
+                                            band);    // sample
+               
+               if (bytesWritten != m_tileSizeInBytes)
+               {
+                  ossimNotify(ossimNotifyLevel_WARN)
+                     << MODULE << " ERROR:"
+                     << "Error returned writing tiff tile:  " << i
+                     << "\nExpected bytes written:  " << m_tileSizeInBytes
+                     << "\nBytes written:  " << bytesWritten
+                     << std::endl;
+                  theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+                  
+                  return false;
+               }
+            }
+         }
+         x += m_tileWidth; // Increment x for next TIFFWriteTile.
+         ++tileNumber;      // Increment tile number for percent complete.
+
+      } // End of tile loop in the sample (width) direction.
+
+      if (needsAborting())
+      {
+         setPercentComplete(100.0);
+         break;
+      }
+      else
+      {
+         double tile = tileNumber;
+         double numTiles = numberOfTiles;
+         setPercentComplete(tile / numTiles * 100.0);
+      }
+
+      y += m_tileHeight; // Increment y for next TIFFWriteTile.
+
+   } // End of tile loop in the line (height) direction.
+
+   //---
+   // Write the current dirctory.
+   //---
+   if (!TIFFFlush(tif))
+   {
+      setErrorStatus();
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE << " Error writing to TIF file!" << std::endl;
+      return false;
+   }
+
+   if ( firstResLevel )
+   {
+      if ( ossimMpi::instance()->getNumberOfProcessors() == 1 )
+      {
+         if ( getHistogramMode() != OSSIM_HISTO_MODE_UNKNOWN )
+         {
+            // Write the histogram.
+            ossimFilename histoFilename = getOutputFile();
+            histoFilename.setExtension("his");
+            sequencer->writeHistogram(histoFilename);
+         }
+
+         if ( ( getScanForMinMaxNull() == true ) || ( getScanForMinMax() == true ) )
+         {
+            // Write the omd file:
+            ossimFilename file = getOutputFile();
+            file = file.setExtension("omd");
+            sequencer->writeOmdFile(file);
+         }
+      }
+   }
+
+   ++m_currentTiffDir;
+
+   return true;
+}
+
+//*******************************************************************
+// Private Method:
+//*******************************************************************
+bool ossimTiffOverviewBuilder::setTags(TIFF* tif,
+                                       const ossimIrect& outputRect,
+                                       ossim_int32 resLevel) const
+{
+   if (outputRect.hasNans())
+   {
+      return false;
+   }
+   
+   ossim_int32   imageWidth      = outputRect.width();
+   ossim_int32   imageHeight     = outputRect.height();
+   int16         samplesPerPixel = m_imageHandler->getNumberOfOutputBands();
+   ossim_float64 minSampleValue  = m_imageHandler->getMinPixelValue();
+   ossim_float64 maxSampleValue  = m_imageHandler->getMaxPixelValue();
+
+   if (resLevel)
+   {
+      TIFFSetField( tif, TIFFTAG_SUBFILETYPE, FILETYPE_REDUCEDIMAGE );
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimTiffOverviewBuilder::setTags DEBUG:"
+         << "\nrrds_level:      " << resLevel
+         << "\nimageWidth:      " << imageWidth
+         << "\nimageHeight:     " << imageHeight
+         << "\nminSampleValue:  " << minSampleValue
+         << "\nmaxSampleValue:  " << maxSampleValue
+         << std::endl;
+   }
+   TIFFSetField( tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_SEPARATE );
+   TIFFSetField( tif, TIFFTAG_IMAGEWIDTH, imageWidth);
+   TIFFSetField( tif, TIFFTAG_IMAGELENGTH, imageHeight);
+   TIFFSetField( tif, TIFFTAG_BITSPERSAMPLE, m_bitsPerSample );
+   TIFFSetField( tif, TIFFTAG_SAMPLEFORMAT, m_sampleFormat );
+   TIFFSetField( tif, TIFFTAG_SAMPLESPERPIXEL, samplesPerPixel );
+
+   if( m_imageHandler->getNumberOfInputBands() == 3 )
+      TIFFSetField( tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB );
+   else
+      TIFFSetField( tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK );
+   
+   TIFFSetField( tif, TIFFTAG_TILEWIDTH,  m_tileWidth  );
+   TIFFSetField( tif, TIFFTAG_TILELENGTH, m_tileHeight );
+
+   //---
+   // Only turn on compression for 8 bit, one or three band data.  Not sure what compression
+   // types can handle what but this was crashing ossim-prepoc on a directory walk with jpeg
+   // compression.
+   //---
+   if ( ( m_imageHandler->getOutputScalarType() == OSSIM_UINT8 ) &&
+        ( ( m_imageHandler->getNumberOfInputBands() == 3 ) ||
+          ( m_imageHandler->getNumberOfInputBands() == 1 ) ) )
+   {
+      // Set the compression related tags...
+      TIFFSetField( tif, TIFFTAG_COMPRESSION, m_tiffCompressType );
+      if (m_tiffCompressType == COMPRESSION_JPEG)
+      {
+         TIFFSetField( tif, TIFFTAG_JPEGQUALITY,  m_jpegCompressQuality);
+      }
+   }
+   else
+   {
+      if ( traceDebug() && (m_tiffCompressType != COMPRESSION_NONE ) )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimTiffOverviewBuilder::setTags WARNING:\n"
+            << "Compression not set for this data type:\n"
+            << "scalar type: "
+            << ossimScalarTypeLut::instance()->getEntryString(
+               m_imageHandler->getOutputScalarType())
+            << "\nband count: " << m_imageHandler->getNumberOfInputBands()
+            << std::endl;
+      }
+      TIFFSetField( tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE );
+   }
+   
+   // Set the min/max values.
+   switch( m_imageHandler->getOutputScalarType() )
+   {
+      case OSSIM_SINT16:
+      case OSSIM_FLOAT32:
+      case OSSIM_FLOAT64:
+      case OSSIM_NORMALIZED_DOUBLE:
+         TIFFSetField( tif, TIFFTAG_SMINSAMPLEVALUE, minSampleValue );
+         TIFFSetField( tif, TIFFTAG_SMAXSAMPLEVALUE, maxSampleValue );
+         break;
+
+      case OSSIM_UINT8:
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+      case OSSIM_UINT32:
+      default:
+         TIFFSetField( tif, TIFFTAG_MINSAMPLEVALUE,
+                       static_cast<int>(minSampleValue) );
+         TIFFSetField( tif, TIFFTAG_MAXSAMPLEVALUE,
+                       static_cast<int>(maxSampleValue) );
+         break;
+   }
+   
+    return true;
+}
+
+bool ossimTiffOverviewBuilder::setGeotiffTags(const ossimImageGeometry* geom,
+                                              const ossimDrect& boundingRect,
+                                              ossim_uint32 resLevel,
+                                              TIFF* tif)
+{
+   bool result = false;
+
+   if ( geom && tif )
+   {
+      const ossimProjection* proj = geom->getProjection();
+      if (proj)
+      {
+         // Must duplicate if changing scale.
+         ossimObject* obj = proj->dup();
+         ossimMapProjection* mapProj = PTR_CAST(ossimMapProjection, obj);
+         if ( mapProj )
+         {
+            if ( mapProj->hasModelTransform() == false )
+            {
+               if (resLevel)
+               {
+                  ossim_float64 factor = (ossim_float64)(1 << resLevel);
+                  mapProj->applyScale(ossimDpt(factor, factor), true);
+               }
+               ossimRefPtr<ossimMapProjectionInfo> projInfo =
+                  new ossimMapProjectionInfo(mapProj, boundingRect);
+               result = ossimGeoTiff::writeTags(tif, projInfo);
+            }
+         }
+         delete obj; // Cleanup from dup.
+         obj = 0;
+      }
+   }
+   
+   return result;
+}
+
+TIFF* ossimTiffOverviewBuilder::openTiff(const ossimString& filename) const
+{
+   ossimString openMode;
+   if ( !buildInternalOverviews() )
+   {
+      openMode = "w";
+
+      ossim_uint64 fourGigs = (static_cast<ossim_uint64>(1024)*
+                               static_cast<ossim_uint64>(1024)*
+                               static_cast<ossim_uint64>(1024)*
+                               static_cast<ossim_uint64>(4));
+      ossimIrect bounds = m_imageHandler->getBoundingRect();
+      ossim_uint64 byteCheck =
+         (static_cast<ossim_uint64>(bounds.width())*
+          static_cast<ossim_uint64>(bounds.height())*
+          static_cast<ossim_uint64>(m_imageHandler->getNumberOfOutputBands())*
+          static_cast<ossim_uint64>(ossim::scalarSizeInBytes(m_imageHandler->
+                                                             getOutputScalarType())));
+         
+      if((byteCheck*static_cast<ossim_uint64>(2))>fourGigs)
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << " Big tiff activated\n";
+         }
+         openMode += "8";
+      }
+      else
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << " No big tiff activated\n";
+         }
+      }
+   }
+   else
+   {
+      openMode = "r+"; // Append to existing file...
+   }
+
+   // Open:
+   return XTIFFOpen( filename.c_str(), openMode.c_str() );
+}
+
+void ossimTiffOverviewBuilder::closeTiff(TIFF* tif)
+{
+   XTIFFClose( tif );
+}
+
+void ossimTiffOverviewBuilder::setCompressionType(ossim_uint16 compression_type)
+{
+   switch (compression_type)
+   {
+   case COMPRESSION_JPEG:
+   case COMPRESSION_LZW:
+   case COMPRESSION_DEFLATE:
+   case COMPRESSION_PACKBITS:
+      m_tiffCompressType = compression_type;
+      break;
+   default:
+      m_tiffCompressType = COMPRESSION_NONE;
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << __FILE__ << " " << __LINE__
+            << "\nossimTiffOverviewBuilder::setCompressionType Unsupported compression type: "
+            << compression_type << "\nDefaulting to none."
+            << std::endl;
+      }
+      break;
+   }
+}
+
+void ossimTiffOverviewBuilder::setJpegCompressionQuality(ossim_int32 quality)
+{
+   if (quality > 1 && quality < 101)
+   {
+      m_jpegCompressQuality = quality;
+   }
+   else
+   {
+      m_jpegCompressQuality = DEFAULT_COMPRESS_QUALITY;
+
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimTiffOverviewBuilder::setJpegCompressionQuality\n"
+         << "\nCompression quality of " << quality << " is out of range!"
+         << "\nRange is 100 to 1.  Current quality set to default of 75."
+         << std::endl;
+   }
+}
+
+bool ossimTiffOverviewBuilder::getCopyAllFlag() const
+{
+   return m_copyAllFlag;
+}
+
+void ossimTiffOverviewBuilder::setCopyAllFlag(bool flag)
+{
+   m_copyAllFlag = flag;
+}
+
+void ossimTiffOverviewBuilder::setInternalOverviewsFlag( bool flag )
+{
+   m_internalOverviewsFlag = flag;
+}
+
+bool ossimTiffOverviewBuilder::getInternalOverviewsFlag() const
+{
+   return m_internalOverviewsFlag;
+}
+
+ossimObject* ossimTiffOverviewBuilder::getObject()
+{
+   return this;
+}
+
+const ossimObject* ossimTiffOverviewBuilder::getObject() const
+{
+   return this;
+}
+
+void ossimTiffOverviewBuilder::setOutputFile(const ossimFilename& file)
+{
+   m_outputFile = file;
+}
+
+ossimFilename ossimTiffOverviewBuilder::getOutputFile() const
+{
+   ossimFilename result;
+
+   if ( buildInternalOverviews() )
+   {
+      // m_imageHandler pointer good if buildInternalOverviews() returns true.
+      result = m_imageHandler->getFilename();
+   }
+   else
+   {
+      result = m_outputFile;
+   }
+
+   if (m_outputFile == ossimFilename::NIL)
+   {
+      if ( m_imageHandler.valid() )
+      {
+         bool usePrefix = (m_imageHandler->getNumberOfEntries()>1?true:false);
+         result = m_imageHandler->
+            getFilenameWithThisExtension(ossimString("ovr"), usePrefix);
+      }
+   }
+   
+   return result;
+}
+
+void ossimTiffOverviewBuilder::setOutputTileSize(const ossimIpt& tileSize)
+{
+   m_tileWidth  = tileSize.x;
+   m_tileHeight = tileSize.y;
+   m_outputTileSizeSetFlag = true;
+}
+
+bool ossimTiffOverviewBuilder::setInputSource(ossimImageHandler* imageSource)
+{
+   static const char MODULE[] = "ossimTiffOverviewBuilder::initializeFromHandler";
+
+   bool result = ossimOverviewBuilderBase::setInputSource( imageSource );
+   
+   if ( result )
+   {
+      if(!m_outputTileSizeSetFlag)
+      {
+         ossimIpt tileSize;
+         ossim::defaultTileSize(tileSize);
+         m_tileWidth  = tileSize.x;
+         m_tileHeight = tileSize.y;
+      }
+      
+      if (traceDebug())
+      {
+         CLOG << "DEBUG:"
+              << "\nm_tileWidth:   " << m_tileWidth
+              << "\nm_tileHeight:  " << m_tileHeight
+              << "\nSource image is tiled:  "
+              << (m_imageHandler->isImageTiled()?"true":"false")
+              << "\nm_imageHandler->getTileWidth():  "
+              << m_imageHandler->getTileWidth()
+              << "\nm_imageHandler->getTileHeight():  "
+              << m_imageHandler->getTileHeight()
+              << "\nm_imageHandler->getImageTileWidth():  "
+              << m_imageHandler->getImageTileWidth()
+              << "\nm_imageHandler->getImageTileHeight():  "
+              << m_imageHandler->getImageTileHeight()
+              << std::endl;
+      }
+
+      switch(m_imageHandler->getOutputScalarType())
+      {
+         case OSSIM_UINT8:
+            m_bitsPerSample = 8;
+            m_bytesPerPixel = 1;
+            m_sampleFormat  = SAMPLEFORMAT_UINT;
+            break;
+            
+         case OSSIM_USHORT11:
+         case OSSIM_UINT16:
+            m_bitsPerSample = 16;
+            m_bytesPerPixel = 2;
+            m_sampleFormat  = SAMPLEFORMAT_UINT;
+            break;
+            
+         case OSSIM_SINT16:
+            m_bitsPerSample = 16;
+            m_bytesPerPixel = 2;
+            m_sampleFormat  = SAMPLEFORMAT_INT;
+            break;
+            
+         case OSSIM_SINT32:
+            m_bitsPerSample = 32;
+            m_bytesPerPixel = 4;
+            m_sampleFormat  = SAMPLEFORMAT_INT;
+            break;
+            
+         case OSSIM_UINT32:
+            m_bitsPerSample = 32;
+            m_bytesPerPixel = 4;
+            m_sampleFormat  = SAMPLEFORMAT_UINT;
+            break;
+            
+         case OSSIM_FLOAT32:
+            m_bitsPerSample = 32;
+            m_bytesPerPixel = 4;
+            m_sampleFormat  = SAMPLEFORMAT_IEEEFP;
+            break;
+            
+         case OSSIM_NORMALIZED_DOUBLE:
+         case OSSIM_FLOAT64:
+            m_bitsPerSample = 64;
+            m_bytesPerPixel = 8;
+            m_sampleFormat  = SAMPLEFORMAT_IEEEFP;
+            break;
+            
+         default:
+            // Set the error...
+            setErrorStatus();
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << " ERROR:"
+               << "\nUnknow pixel type:  "
+               << (ossimScalarTypeLut::instance()->
+                   getEntryString(m_imageHandler->getOutputScalarType()))
+               << std::endl;
+            result = false;
+      }
+
+      if ( result )
+      {
+         m_tileSizeInBytes = m_tileWidth * m_tileHeight * m_bytesPerPixel;
+         
+         //---
+         // Make a buffer to pass to pass to the write tile methods when an image
+         // handler returns a null tile.
+         //---
+         m_nullDataBuffer.resize(m_tileSizeInBytes);
+      
+         // Fill it with zeroes.
+         std::fill(m_nullDataBuffer.begin(), m_nullDataBuffer.end(), 0);
+      }
+   }
+   else
+   {
+      // Set the error...
+      setErrorStatus();
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE << " ERROR:"
+         << "\nSetting image handler as input failed!"
+         << std::endl;
+   }
+
+   return result;
+
+} // End: ossimTiffOverviewBuilder::setInputSource(ossimImageHandler* imageSource)
+
+bool ossimTiffOverviewBuilder::setOverviewType(const ossimString& type)
+{
+   bool result = true;
+   if (type == "ossim_tiff_nearest")
+   {
+      m_resampleType =
+         ossimFilterResampler::ossimFilterResampler_NEAREST_NEIGHBOR;
+   }
+   else if (type == "ossim_tiff_box")
+   {
+      m_resampleType = ossimFilterResampler::ossimFilterResampler_BOX;
+   }
+   else
+   {
+      result = false;
+   }
+   return result;
+}
+
+ossimString ossimTiffOverviewBuilder::getOverviewType() const
+{
+   ossimString type;
+   if (m_resampleType == ossimFilterResampler::ossimFilterResampler_NEAREST_NEIGHBOR)
+   {
+      type = "ossim_tiff_nearest";
+   }
+   else
+   {
+      type = "ossim_tiff_box"; // This is default...
+   }
+   return type;
+}
+
+void ossimTiffOverviewBuilder::getTypeNameList(
+   std::vector<ossimString>& typeList)const
+{
+   typeList.push_back(ossimString("ossim_tiff_box"));
+   typeList.push_back(ossimString("ossim_tiff_nearest"));
+}
+
+void ossimTiffOverviewBuilder::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if ( property.valid() )
+   {
+      if(property->getName() == ossimKeywordNames::COMPRESSION_QUALITY_KW)
+      {
+         m_jpegCompressQuality = property->valueToString().toInt32();
+      }
+      else if(property->getName() == ossimKeywordNames::COMPRESSION_TYPE_KW)
+      {
+         ossimString value = property->valueToString();
+         value = value.downcase();
+         if(value == "jpeg")
+         {
+            m_tiffCompressType =  COMPRESSION_JPEG;
+         }
+         else if(value == "lzw")
+         {
+            m_tiffCompressType =  COMPRESSION_LZW;
+            
+         }
+         else if(value == "deflate")
+         {
+            m_tiffCompressType =  COMPRESSION_DEFLATE;
+         }
+         else if(value == "packbits")
+         {
+            m_tiffCompressType =  COMPRESSION_PACKBITS;
+         }
+         else
+         {
+            m_tiffCompressType = COMPRESSION_NONE;
+         }
+      }
+      else if(property->getName() == COPY_ALL_KW)
+      {
+         m_copyAllFlag = property->valueToString().toBool();
+      }
+      else if( property->getName() == INTERNAL_OVERVIEWS_KW )
+      {
+         m_internalOverviewsFlag = property->valueToString().toBool();
+      }
+      else if(property->getName() == ossimKeywordNames::OVERVIEW_STOP_DIMENSION_KW)
+      {
+         m_overviewStopDimension = property->valueToString().toUInt32();
+      }
+      else if(property->getName() == ossimKeywordNames::OUTPUT_TILE_SIZE_KW)
+      {
+         ossimIpt ipt;
+         
+         ipt.toPoint(property->valueToString());
+         
+         setOutputTileSize(ipt);
+      }
+   }
+}
+
+void ossimTiffOverviewBuilder::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   propertyNames.push_back(ossimKeywordNames::COMPRESSION_QUALITY_KW);
+   propertyNames.push_back(ossimKeywordNames::COMPRESSION_TYPE_KW);
+   propertyNames.push_back(COPY_ALL_KW);
+   propertyNames.push_back(INTERNAL_OVERVIEWS_KW);
+   propertyNames.push_back(ossimKeywordNames::OVERVIEW_STOP_DIMENSION_KW);
+}
+
+bool ossimTiffOverviewBuilder::canConnectMyInputTo(
+   ossim_int32 index,
+   const ossimConnectableObject* obj) const
+{
+   if ( (index == 0) &&
+        PTR_CAST(ossimImageHandler, obj) )
+   {
+      return true;
+   }
+
+   return false;
+}
+
+bool ossimTiffOverviewBuilder::buildInternalOverviews() const
+{
+   bool result = false;
+   if ( m_internalOverviewsFlag &&  m_imageHandler.valid() )
+   {
+      if ( m_imageHandler->getClassName() == "ossimTiffTileSource" )
+      {
+         result = true;
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << "Internal overviews opton not supported for class: "
+            << m_imageHandler->getClassName()
+            << std::endl;
+      }
+   }
+   return result;
+}
+
+bool ossimTiffOverviewBuilder::copyR0() const
+{
+   return ( m_copyAllFlag && !buildInternalOverviews());
+}
+
diff --git a/ossim/src/ossim/imaging/ossimTiffTileSource.cpp b/ossim/src/ossim/imaging/ossimTiffTileSource.cpp
new file mode 100644
index 0000000..8293a5c
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimTiffTileSource.cpp
@@ -0,0 +1,2721 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//          Frank Warmerdam (warmerdam at pobox.com)
+//
+// Description:
+//
+// Contains class definition for TiffTileSource.
+//
+//*******************************************************************
+//  $Id: ossimTiffTileSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/imaging/ossimTiffTileSource.h>
+#include <ossim/support_data/ossimGeoTiff.h>
+#include <ossim/support_data/ossimTiffInfo.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimIoStream.h> /* for ossimIOMemoryStream */
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimEllipsoid.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimBooleanProperty.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <xtiffio.h>
+#include <geo_normalize.h>
+#include <cstdlib> /* for abs(int) */
+
+RTTI_DEF1(ossimTiffTileSource, "ossimTiffTileSource", ossimImageHandler)
+
+static ossimTrace traceDebug("ossimTiffTileSource:debug");
+
+#define OSSIM_TIFF_UNPACK_R4(value) ( (value)&0x000000FF)
+#define OSSIM_TIFF_UNPACK_G4(value) ( ((value)>>8)&0x000000FF)
+#define OSSIM_TIFF_UNPACK_B4(value) ( ((value)>>16)&0x000000FF)
+#define OSSIM_TIFF_UNPACK_A4(value) ( ((value)>>24)&0x000000FF)
+
+//---
+// OSSIM_BUFFER_SCAN_LINE_READS:
+// If set to 1 ossimTiffTileSource::loadFromScanLine method will buffer image
+// width by tile height.  If set to 0 one line will be read at a time which
+// conserves memory on wide images or tall tiles.
+//
+// Buffered read is faster but uses more memory. Non-buffered slower less
+// memory.
+//
+// Only affects reading strip tiffs.
+//---
+#define OSSIM_BUFFER_SCAN_LINE_READS 1
+
+//*******************************************************************
+// Public Constructor:
+//*******************************************************************
+ossimTiffTileSource::ossimTiffTileSource()
+   :
+      ossimImageHandler(),
+      theTiffPtr(0),
+      theTile(0),
+      theBuffer(0),
+      theBufferSize(0),
+      theBufferRect(0, 0, 0, 0),
+      theBufferRLevel(0),
+      theCurrentTileWidth(0),
+      theCurrentTileHeight(0),
+      theSamplesPerPixel(0),
+      theBitsPerSample(0),
+      theSampleFormatUnit(0),
+      theMaxSampleValue(ossim::nan()),
+      theMinSampleValue(ossim::nan()),
+      theNullSampleValue(ossim::nan()),
+      theNumberOfDirectories(0),
+      theCurrentDirectory(0),
+      theR0isFullRes(false),
+      theBytesPerPixel(0),
+      theScalarType(OSSIM_SCALAR_UNKNOWN),
+      theApplyColorPaletteFlag(true),
+      theImageWidth(0),
+      theImageLength(0),
+      theReadMethod(0),
+      thePlanarConfig(0),
+      thePhotometric(0),
+      theRowsPerStrip(0),
+      theImageTileWidth(0),
+      theImageTileLength(0),
+      theImageDirectoryList(0),
+      theCurrentTiffRlevel(0),
+      theCompressionType(0),
+      theOutputBandList(0)
+{}
+
+ossimTiffTileSource::~ossimTiffTileSource()
+{
+   close();
+}
+
+ossimRefPtr<ossimImageData> ossimTiffTileSource::getTile(
+   const ossimIrect& tile_rect, ossim_uint32 resLevel )
+{
+   if ( theTile.valid() == false )
+   {
+      allocateTile(); // First time through...
+   }
+   
+   if ( theTile.valid() )
+   {
+      // Image rectangle must be set prior to calling getTile.
+      theTile->setImageRectangle(tile_rect);
+
+      if ( getTile( theTile.get(), resLevel ) == false )
+      {
+         if (theTile->getDataObjectStatus() != OSSIM_NULL)
+         {
+            theTile->makeBlank();
+         }
+      }
+   }
+
+   return theTile;
+}
+
+bool ossimTiffTileSource::getTile(ossimImageData* result,
+                                  ossim_uint32 resLevel)
+{
+   static const char MODULE[] = "ossimTiffTileSource::getTile(ossimImageData*, resLevel)";
+
+   bool status = false;
+   
+   //---
+   // Not open, this tile source bypassed, or invalid res level,
+   // return a blank tile.
+   //---
+   if( isOpen() && isSourceEnabled() && isValidRLevel(resLevel) &&
+       result && (result->getNumberOfBands() == getNumberOfOutputBands()) )
+   {
+      result->ref(); // Increment ref count.
+      
+      //---
+      // Check for overview tile.  Some overviews can contain r0 so always
+      // call even if resLevel is 0.  Method returns true on success, false
+      // on error.
+      //---
+      status = getOverviewTile(resLevel, result);
+
+      if (!status) // Did not get an overview tile.
+      {
+         status = true;
+         
+         ossim_uint32 level = resLevel;
+
+         //---
+         // If we have r0 our reslevels are the same as the callers so
+         // no adjustment necessary.
+         //---
+         if (theStartingResLevel && !theR0isFullRes) // Used as overview.
+         {
+            //---
+            // If we have r0 our reslevels are the same as the callers so
+            // no adjustment necessary.
+            //---
+            if (level >= theStartingResLevel)
+            {
+               //---
+               // Adjust the level to be relative to the reader using this
+               // as overview.
+               //---
+               level -= theStartingResLevel; 
+            }
+         }
+
+         ossimIrect tile_rect = result->getImageRectangle();
+
+         //---
+         // This should be the zero base image rectangle for this res level.
+         // Note passed the non adjusted resLevel by design.
+         //---
+         ossimIrect image_rect = getImageRectangle(resLevel);
+
+         // See if any point of the requested tile is in the image.
+         if ( tile_rect.intersects(image_rect) )
+         {
+            // Initialize the tile if needed as we're going to stuff it.
+            if (result->getDataObjectStatus() == OSSIM_NULL)
+            {
+               result->initialize();
+            }
+
+            bool reallocateBuffer = false;   
+            if ( (tile_rect.width()  != theCurrentTileWidth) ||
+                 (tile_rect.height() != theCurrentTileHeight) )
+            {
+               // Current tile size must be set prior to allocatBuffer call.
+               theCurrentTileWidth = tile_rect.width();
+               theCurrentTileHeight = tile_rect.height();
+               
+               reallocateBuffer = true;
+            }
+            
+            if (getCurrentTiffRLevel() != theImageDirectoryList[level])
+            {
+               status = setTiffDirectory(theImageDirectoryList[level]);
+               if (status)
+               {
+                  reallocateBuffer = true;
+               }
+            }
+
+            if (status)
+            {
+               if (reallocateBuffer)
+               {
+                  // NOTE: Using this buffer will be a thread issue. (drb) 
+                  status = allocateBuffer();
+               }
+            }
+
+            if ( status )
+            {  
+               ossimIrect clip_rect = tile_rect.clipToRect( image_rect );
+               
+               if ( !tile_rect.completely_within( clip_rect ) )
+               {
+                  //---
+                  // We're not going to fill the whole tile so start with a
+                  // blank tile.
+                  //---
+                  result->makeBlank();
+               }
+               
+               // Load the tile buffer with data from the tif.
+               if ( loadTile( tile_rect, clip_rect, result ) )
+               {
+                  result->validate();
+                  status = true;
+               }
+               else
+               {
+                  // Would like to change this to throw ossimException.(drb)
+                  status = false;
+                  if(traceDebug())
+                  {
+                     // Error in filling buffer.
+                     ossimNotify(ossimNotifyLevel_WARN)
+                        << MODULE
+                        << " Error filling buffer. Return status = false..."
+                        << std::endl;
+                  }
+               }
+
+            } // matches: if (status)
+               
+         } // matches:  if ( zeroBasedTileRect.intersects(image_rect) )
+         else 
+         {
+            // No part of requested tile within the image rectangle.
+            status = true; // Not an error.
+            result->makeBlank();
+         }
+         
+      } // matches: if (!status)
+      
+      result->unref(); // Decrement ref count.
+      
+   } // matches: if( isOpen() && isSourceEnabled() && isValidRLevel(level) )
+
+   return status;
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+bool ossimTiffTileSource::saveState(ossimKeywordlist& kwl,
+                                    const char* prefix) const
+{
+   bool result = ossimImageHandler::saveState(kwl, prefix);
+   
+   if ( result )
+   {
+      if ( isBandSelector() && theOutputBandList.size() )
+      {
+         if ( isIdentityBandList( theOutputBandList ) == false )
+         {
+            // If we're not identity output the bands.
+            ossimString bandsString;
+            ossim::toSimpleStringList(bandsString, theOutputBandList);
+            kwl.add(prefix,
+                    ossimKeywordNames::BANDS_KW,
+                    bandsString,
+                    true);
+         }
+      }
+      
+      kwl.add(prefix,
+              "apply_color_palette_flag",
+              theApplyColorPaletteFlag,
+              true);
+   }
+   
+   return result;
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+bool ossimTiffTileSource::loadState(const ossimKeywordlist& kwl,
+                                    const char* prefix)
+{
+   bool result = false;
+   theOutputBandList.clear();
+
+   if (ossimImageHandler::loadState(kwl, prefix))
+   {
+      std::string pfx = ( prefix ? prefix : "" );
+      std::string key = "apply_color_palette_flag";
+      ossimString value;
+      
+      value.string() = kwl.findKey( pfx, key );
+      if ( value.size() )
+      {
+         theApplyColorPaletteFlag = value.toBool();
+      }
+      else
+      {
+         theApplyColorPaletteFlag = true;
+      }
+
+      key = ossimKeywordNames::BANDS_KW;
+      value.string() = kwl.findKey( pfx, key );
+      if ( value.size() )
+      {
+         ossim::toSimpleVector( theOutputBandList, value );
+      }
+      
+      if ( open() ) 
+      {
+         // Set the band list after open so that the overview also gets set.
+         result = true;
+      }
+   }
+   return result;
+}
+
+bool ossimTiffTileSource::open(const ossimFilename& image_file)
+{
+   if (theTiffPtr)
+   {
+     close();
+   }
+   theImageFile = image_file;
+   return open();
+}
+
+void ossimTiffTileSource::close()
+{
+   if(theTiffPtr)
+   {
+      XTIFFClose(theTiffPtr);
+      theTiffPtr = 0;
+   }
+   theImageWidth.clear();
+   theImageLength.clear();
+   theReadMethod.clear();
+   thePlanarConfig.clear();
+   thePhotometric.clear();
+   theRowsPerStrip.clear();
+   theImageTileWidth.clear();
+   theImageTileLength.clear();
+   if (theBuffer)
+   {
+      delete [] theBuffer;
+      theBuffer = 0;
+      theBufferSize = 0;
+   }
+   ossimImageHandler::close();
+}
+
+bool ossimTiffTileSource::open()
+{
+   static const char MODULE[] = "ossimTiffTileSource::open";
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " Entered..."
+         << "\nFile:  " << theImageFile.c_str() << std::endl;
+   }
+
+   if(isOpen())
+   {
+     close();
+   }
+
+   // Check for empty file name.
+   if (theImageFile.empty())
+   {
+      return false;
+   }
+#if 0  
+   // First we do a quick test to see if the file looks like a tiff file.
+   FILE		*fp;
+   unsigned char header[2];
+
+   fp = fopen( theImageFile.c_str(), "rb" );
+   if( fp == NULL )
+       return false;
+
+   fread( header, 2, 1, fp );
+   fclose( fp );
+
+   if( (header[0] != 'M' || header[1] != 'M')
+       && (header[0] != 'I' || header[1] != 'I') )
+       return false;
+#endif
+   
+   theImageDirectoryList.clear();
+
+   //---
+   // Note:  The 'm' in "rm" is to tell TIFFOpen to not memory map the file.
+   //---
+   theTiffPtr = XTIFFOpen(theImageFile.c_str(), "rm");
+   if (!theTiffPtr)
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << MODULE << " ERROR:\n"
+            << "libtiff could not open..." << std::endl;
+      }
+      return false;
+   }
+
+   theCompressionType = COMPRESSION_NONE;
+   //***
+   // Get the general tiff info.
+   //***
+   if(!TIFFGetField(theTiffPtr, TIFFTAG_COMPRESSION, &theCompressionType))
+   {
+      theCompressionType = COMPRESSION_NONE;
+   }
+
+   //***
+   // See if the first directory is of FILETYPE_REDUCEDIMAGE; if not,
+   // the first level is considered to be full resolution data.
+   // Note:  If the tag is not present, consider the first level full
+   // resolution.
+   //***
+   theImageDirectoryList.push_back(0);
+   ossim_uint32 sub_file_type;
+   if ( !TIFFGetField( theTiffPtr,
+                       TIFFTAG_SUBFILETYPE ,
+                       &sub_file_type ) )
+   {
+      sub_file_type = 0;
+   }
+
+   if (sub_file_type == FILETYPE_REDUCEDIMAGE)
+   {
+      theR0isFullRes = false;
+   }
+   else
+   {
+      theR0isFullRes = true;
+   }
+   
+   if( !TIFFGetField(theTiffPtr, TIFFTAG_BITSPERSAMPLE, &(theBitsPerSample)) )
+   {
+      theBitsPerSample = 8;
+   }
+
+   if( !TIFFGetField(theTiffPtr,
+                     TIFFTAG_SAMPLESPERPIXEL,
+                     &theSamplesPerPixel ) )
+   {
+      theSamplesPerPixel = 1;
+   }
+   
+   if ( !TIFFGetField( theTiffPtr,
+                       TIFFTAG_SAMPLEFORMAT,
+                       &theSampleFormatUnit ) )
+   {
+      theSampleFormatUnit = 0;
+   }
+
+   if ( theSampleFormatUnit == SAMPLEFORMAT_COMPLEXINT )
+   {
+      //---
+      // Override the samples per pixel set above as sample data has set to
+      // one.
+      //---
+      theSamplesPerPixel = 2;
+   }
+
+   if ( !TIFFGetField( theTiffPtr,
+                       TIFFTAG_SMAXSAMPLEVALUE,
+                       &theMaxSampleValue ) )
+   {
+      uint16 maxValue = 0;
+      if(!TIFFGetField( theTiffPtr,
+                        TIFFTAG_MAXSAMPLEVALUE,
+                        &maxValue))
+      {
+         //---
+         // This will be reset in validateMinMax method.  Can't set right now because we
+         // don't know the scalar type yet.
+         //---
+         theMaxSampleValue = ossim::nan();
+      }
+      else
+      {
+         theMaxSampleValue = maxValue;
+      }
+   }
+
+   if ( !TIFFGetField( theTiffPtr,
+                       TIFFTAG_SMINSAMPLEVALUE,
+                       &theMinSampleValue ) )
+   {
+      uint16 minValue = 0;
+      if(!TIFFGetField( theTiffPtr,
+                        TIFFTAG_MINSAMPLEVALUE,
+                        &minValue))
+      {
+         //---
+         // This will be reset in validateMinMax method.  Can't set right now because we
+         // don't know the scalar type yet.
+         //--- 
+         theMinSampleValue = ossim::nan();
+      }
+      else
+      {
+         theMinSampleValue = minValue;
+      }
+   }
+
+   if (traceDebug())
+   {
+      CLOG << "DEBUG:"
+           << "\ntheMinSampleValue:  " << theMinSampleValue
+           << "\ntheMaxSampleValue:  " << theMaxSampleValue
+           << endl;
+   }
+
+   // Get the number of directories.
+   theNumberOfDirectories = TIFFNumberOfDirectories(theTiffPtr);
+
+   // Current dir.
+   theCurrentDirectory = TIFFCurrentDirectory(theTiffPtr);
+
+   theImageWidth.resize(theNumberOfDirectories);
+   theImageLength.resize(theNumberOfDirectories);
+   theReadMethod.resize(theNumberOfDirectories);
+   thePlanarConfig.resize(theNumberOfDirectories);
+   thePhotometric.resize(theNumberOfDirectories);
+   theRowsPerStrip.resize(theNumberOfDirectories);
+   theImageTileWidth.resize(theNumberOfDirectories);
+   theImageTileLength.resize(theNumberOfDirectories);
+
+   for (ossim_uint32 dir=0; dir<theNumberOfDirectories; ++dir)
+   {
+      if (setTiffDirectory(dir) == false)
+      {
+         return false;
+      }
+
+      // Note: Need lines, samples before acceptAsRrdsLayer check.
+      
+      // lines:
+      if ( !TIFFGetField( theTiffPtr,
+                          TIFFTAG_IMAGELENGTH,
+                          &theImageLength[dir] ) )
+      {
+         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+         ossimNotify(ossimNotifyLevel_WARN)
+            << MODULE << " Cannot determine image length."
+            << endl;
+      }
+
+      // samples:
+      if ( !TIFFGetField( theTiffPtr,
+                          TIFFTAG_IMAGEWIDTH,
+                          &theImageWidth[dir] ) )
+      {
+         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+         ossimNotify(ossimNotifyLevel_WARN)
+            << MODULE << " Cannot determine image width."
+            << endl;
+      }
+      
+      if ( !TIFFGetField( theTiffPtr,
+                         TIFFTAG_SUBFILETYPE ,
+                         &sub_file_type ) )
+      {
+         sub_file_type = 0;
+      }
+
+      if (sub_file_type == FILETYPE_REDUCEDIMAGE)
+      {
+         //---
+         // Check for a thumbnail image.  If present don't use as it will mess with
+         // overviews.  Currently only checking if it's a two directory image, i.e. a full
+         // res and a thumbnail.
+         // 
+         // Note this shuts off the thumbnail which someone may want to see.  We could make
+         // this a reader prop if it becomes an issue. drb - 09 Jan. 2012.
+         //---
+         if ( dir!=0 )
+         {
+            bool acceptAsRrdsLayer = true;
+            if ( ( theNumberOfDirectories == 2 ) && ( dir == 1 ) )
+            {
+               acceptAsRrdsLayer = isPowerOfTwoDecimation(dir);
+            }
+
+            if ( acceptAsRrdsLayer )
+            {
+               theImageDirectoryList.push_back(dir);
+            }
+         }
+      }
+      
+      if( !TIFFGetField( theTiffPtr, TIFFTAG_PLANARCONFIG,
+                         &(thePlanarConfig[dir]) ) )
+      {
+         thePlanarConfig[dir] = PLANARCONFIG_CONTIG;
+      }
+      
+      if( !TIFFGetField( theTiffPtr, TIFFTAG_PHOTOMETRIC,
+                         &(thePhotometric[dir]) ) )
+      {
+         thePhotometric[dir] = PHOTOMETRIC_MINISBLACK;
+      }
+      theLut = 0;
+      // Check for palette.
+      uint16* red;
+      uint16* green;
+      uint16* blue;
+      if(TIFFGetField(theTiffPtr, TIFFTAG_COLORMAP, &red, &green, &blue))
+      {
+         if(theApplyColorPaletteFlag)
+         {
+            thePhotometric[dir] = PHOTOMETRIC_PALETTE;
+            theSamplesPerPixel = 3;
+         }
+         populateLut();
+      }
+
+      if( TIFFIsTiled(theTiffPtr))
+      {
+         theRowsPerStrip[dir] = 0;
+         if ( !TIFFGetField( theTiffPtr,
+                             TIFFTAG_TILEWIDTH,
+                             &theImageTileWidth[dir] ) )
+         {
+            theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimTiffTileSource::getTiffTileWidth ERROR:"
+               << "\nCannot determine tile width." << endl;
+            theImageTileWidth[dir] = 0;
+         }
+         if ( !TIFFGetField( theTiffPtr,
+                             TIFFTAG_TILELENGTH,
+                             &theImageTileLength[dir] ) )
+         {
+            theErrorStatus = ossimErrorCodes::OSSIM_ERROR;   
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimTiffTileSource::getTiffTileLength ERROR:"
+               << "\nCannot determine tile length." << endl;
+             theImageTileLength[dir] = 0;
+         }
+      }
+      else
+      {
+         // Strip tiff:
+         theImageTileWidth[dir]  = 0;
+         theImageTileLength[dir] = 0;
+         if( !TIFFGetField( theTiffPtr, TIFFTAG_ROWSPERSTRIP,
+                            &(theRowsPerStrip[dir]) ) )
+         {
+            theRowsPerStrip[dir] = 1;
+         }
+         
+         theImageTileWidth[dir]  = theImageWidth[dir];
+         theImageTileLength[dir] = theRowsPerStrip[dir];
+
+         //---
+         // Let's default the tile size to something efficient.
+         //
+         // NOTE:
+         //
+         // This is not used by the strip reader method.  Only by the getImageTileHeight
+         // and getImageTileHeight methods.
+         //---
+         if ( theImageTileWidth[dir] > 256 )
+         {
+            theImageTileWidth[dir] = 256;
+         }
+         else if( theImageTileWidth[dir] < 64 )
+         {
+            theImageTileWidth[dir]  = 64;
+         }
+         if( theImageTileLength[dir] > 256 )
+         {
+            theImageTileLength[dir] = 256;
+         }
+         else if(theImageTileLength[dir] < 64)
+         {
+            theImageTileLength[dir] = 64;
+         }
+      }
+      
+   } // End of "for (ossim_uint32 dir=0; dir<theNumberOfDirectories; dir++)"
+   
+   // Reset the directory back to "0".
+   if (setTiffDirectory(0) == false)
+   {
+      return false;
+   }
+
+   //---
+   // Get the scalar type.
+   //---
+   theScalarType = OSSIM_SCALAR_UNKNOWN;
+   if (theBitsPerSample == 16)
+   {
+      theBytesPerPixel = 2;
+
+      if (theSampleFormatUnit == SAMPLEFORMAT_INT)
+      {
+         // this is currently causing pixel problems.  I am going to comment this out until we figure out a better solution
+         //
+#if 0         
+         if (theMinSampleValue == 0) //  && (theMaxSampleValue > 36535) )
+         {
+            //---
+            // This is a hack for RadarSat data which is has tag 339 set to
+            // signed sixteen bit data with a min sample value of 0 and
+            // sometimes a max sample value greater than 36535.
+            //---
+            theScalarType = OSSIM_UINT16;
+         }
+         else
+         {
+            theScalarType = OSSIM_SINT16;
+         }
+#else
+         theScalarType = OSSIM_SINT16;
+#endif
+
+      }
+      else if (theSampleFormatUnit == SAMPLEFORMAT_UINT)
+      {
+         // ESH 03/2009 -- Changed "== 2047" to "<= 2047"
+         if (theMaxSampleValue <= 2047) // 2^11-1
+         {
+            // 11 bit EO, i.e. Ikonos, QuickBird, WorldView, GeoEye.
+            theScalarType = OSSIM_USHORT11; // IKONOS probably...
+         }
+         else
+         {
+            theScalarType = OSSIM_UINT16; 
+         }
+      }
+      else
+      {
+         if (theMaxSampleValue <= 2047) // 2^11-1
+         {
+            // 11 bit EO, i.e. Ikonos, QuickBird, WorldView, GeoEye.
+            theScalarType = OSSIM_USHORT11; // IKONOS probably...
+         }
+         else
+            theScalarType = OSSIM_UINT16; // Default to unsigned...
+      }
+   }
+   else if ( (theBitsPerSample == 32) &&
+             (theSampleFormatUnit == SAMPLEFORMAT_UINT) )
+   {
+      theBytesPerPixel = 4;
+      theScalarType = OSSIM_UINT32;
+   }
+   else if ( (theBitsPerSample == 32) &&
+             (theSampleFormatUnit == SAMPLEFORMAT_INT) )
+   {
+      theBytesPerPixel = 4;
+      theScalarType = OSSIM_SINT32;
+   }
+   else if ( (theBitsPerSample == 32) &&
+             (theSampleFormatUnit == SAMPLEFORMAT_IEEEFP) )
+   {
+      theBytesPerPixel = 4;
+      theScalarType = OSSIM_FLOAT32;
+   }
+   else if ( (theBitsPerSample == 32) &&
+             (theSampleFormatUnit == SAMPLEFORMAT_COMPLEXINT) )
+   {
+      theBytesPerPixel = 2;
+      theScalarType = OSSIM_SINT16;
+   }
+   else if(theBitsPerSample == 64 &&
+	   theSampleFormatUnit == SAMPLEFORMAT_IEEEFP)
+   {
+      theBytesPerPixel = 8;
+      theScalarType = OSSIM_FLOAT64;
+   }
+   else if (theBitsPerSample <= 8)
+   {
+      theBytesPerPixel = 1;
+      theScalarType = OSSIM_UINT8;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE << " Error:\nCannot determine scalar type.\n"
+         << "Trace dump follows:\n";
+      print(ossimNotify(ossimNotifyLevel_WARN));
+      
+      return false;
+   }
+   
+   // Sanity check for min, max and null values.
+   validateMinMaxNull();
+   
+   setReadMethod();
+   
+   // Establish raster pixel alignment type:
+   GTIF* gtif = GTIFNew(theTiffPtr);
+   ossim_uint16 raster_type;
+   if (GTIFKeyGet(gtif, GTRasterTypeGeoKey, &raster_type, 0, 1) && (raster_type == 1))
+   {
+      thePixelType = OSSIM_PIXEL_IS_AREA;
+   }
+   else
+   {
+      thePixelType = OSSIM_PIXEL_IS_POINT;
+   }
+   GTIFFree(gtif);
+
+   // Let base-class finish the rest:
+   completeOpen();
+
+   if ( isBandSelector() && theOutputBandList.size() && ( isIdentityBandList( theOutputBandList ) == false ) )
+   {
+      // This does range checking and will pass to overview if open.
+      setOutputBandList( theOutputBandList );
+   }
+   
+   //---
+   // Note: Logic changed to leave theTile and theBuffer uninitialized until first getTile(...)
+   // request. (drb)
+   //---
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " Debug:";
+      print(ossimNotify(ossimNotifyLevel_DEBUG));
+   }
+   
+   // Finished...
+   return true;
+}
+   
+ossim_uint32 ossimTiffTileSource::getNumberOfLines( ossim_uint32 resLevel ) const
+{
+   ossim_uint32 result = 0;
+   if ( theImageDirectoryList.size() && theTiffPtr && isValidRLevel(resLevel) )
+   {
+      //---
+      // If we have r0 our reslevels are the same as the callers so
+      // no adjustment necessary.
+      //---
+      if (!theStartingResLevel || theR0isFullRes) // not an overview or has r0.
+      {
+         //---
+         // If we have r0 our reslevels are the same as the callers so
+         // no adjustment necessary.
+         //---
+         if (resLevel < theImageDirectoryList.size())
+         {
+            result = theImageLength[theImageDirectoryList[resLevel]];
+         }
+         else if (theOverview.valid())
+         {
+            result = theOverview->getNumberOfLines(resLevel);
+         }
+      }
+      else // this is an overview without r0
+      {
+         if (resLevel >= theStartingResLevel)
+         {
+            //---
+            // Adjust the level to be relative to the reader using this as
+            // overview.
+            //---
+            ossim_uint32 level = resLevel - theStartingResLevel;
+            if (level < theImageDirectoryList.size())
+            {
+               result = theImageLength[theImageDirectoryList[level]];
+            }
+         }
+      }
+   }
+   return result;
+}
+
+ossim_uint32 ossimTiffTileSource::getNumberOfSamples( ossim_uint32 resLevel ) const
+{
+   ossim_uint32 result = 0;
+   if ( theImageDirectoryList.size() && theTiffPtr && isValidRLevel(resLevel) )
+   {
+      //---
+      // If we have r0 our reslevels are the same as the callers so
+      // no adjustment necessary.
+      //---
+      if (!theStartingResLevel||theR0isFullRes) // not an overview or has r0.
+      {
+         if (resLevel < theImageDirectoryList.size())
+         {
+            result = theImageWidth[theImageDirectoryList[resLevel]];
+         }
+         else if (theOverview.valid())
+         {
+            result = theOverview->getNumberOfSamples(resLevel);
+         }
+      }
+      else // this is an overview.
+      {
+         if (resLevel >= theStartingResLevel)
+         {
+            //---
+            // Adjust the level to be relative to the reader using this as
+            // overview.
+            //---
+            ossim_uint32 level = resLevel - theStartingResLevel;
+            if (level < theImageDirectoryList.size())
+            {
+               result = theImageWidth[theImageDirectoryList[level]];
+            }
+         }
+      }
+   }
+   return result;
+}
+
+ossim_uint32 ossimTiffTileSource::getNumberOfDecimationLevels() const
+{
+   ossim_uint32 result = theImageDirectoryList.size();
+   
+   // If starting res level is not 0 then this is an overview.
+   if (theStartingResLevel&&theR0isFullRes)
+   {
+      // Don't count r0.
+      --result;
+   }
+   else if (theOverview.valid())
+   {
+      result += theOverview->getNumberOfDecimationLevels();
+   }
+
+   return result;
+}
+
+//*******************************************************************
+// Public method:
+//*******************************************************************
+ossimScalarType ossimTiffTileSource::getOutputScalarType() const
+{
+   return theScalarType;
+}
+
+bool ossimTiffTileSource::loadTile(const ossimIrect& tile_rect,
+                                   const ossimIrect& clip_rect,
+                                   ossimImageData* result)
+{
+   static const char MODULE[] = "ossimTiffTileSource::loadTile";
+
+   bool status = true;
+
+   if ( !theBuffer )
+   {
+      status = allocateBuffer();
+   }
+
+   if ( status )
+   {
+      switch(theReadMethod[theCurrentDirectory])
+      {
+         case READ_TILE:
+            status = loadFromTile(clip_rect, result);
+            break;
+            
+         case READ_SCAN_LINE:
+            status = loadFromScanLine(clip_rect, result);
+            break;
+            
+         case READ_RGBA_U8_TILE:
+            status = loadFromRgbaU8Tile(tile_rect, clip_rect, result);
+            break;
+            
+         case READ_RGBA_U8_STRIP:
+            status = loadFromRgbaU8Strip(tile_rect, clip_rect, result);
+            break;
+            
+         case READ_RGBA_U8A_STRIP:
+            status = loadFromRgbaU8aStrip(tile_rect, clip_rect, result);
+            break;
+
+         case READ_U16_STRIP:
+            status = loadFromU16Strip(clip_rect, result);
+            break;
+            
+         default:
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << " Unsupported tiff type!" << endl;
+            status = false;
+            break;
+      }
+   }
+   
+   return status;
+}
+
+bool ossimTiffTileSource::loadFromScanLine(const ossimIrect& clip_rect,
+                                           ossimImageData* result)
+{
+#if OSSIM_BUFFER_SCAN_LINE_READS
+   ossimInterleaveType type =
+      (thePlanarConfig[theCurrentDirectory] == PLANARCONFIG_CONTIG) ?
+       OSSIM_BIP : OSSIM_BIL;
+
+   if ( theBufferRLevel != getCurrentTiffRLevel() ||
+        !clip_rect.completely_within(theBufferRect) )
+   {
+      //***
+      // Must reload the buffer.  Grab enough lines to fill the depth of the
+      // clip rectangle.
+      //***
+      theBufferRLevel = getCurrentTiffRLevel();
+      theBufferRect   = getImageRectangle(theBufferRLevel);
+      theBufferRect.set_uly(clip_rect.ul().y);
+      theBufferRect.set_lry(clip_rect.lr().y);
+      ossim_uint32 startLine = clip_rect.ul().y;
+      ossim_uint32 stopLine  = clip_rect.lr().y;
+      ossim_uint8* buf = theBuffer;
+
+      if (thePlanarConfig[theCurrentDirectory] == PLANARCONFIG_CONTIG)
+      {
+         ossim_uint32 lineSizeInBytes = getNumberOfSamples(theBufferRLevel) *
+                                  theBytesPerPixel * theSamplesPerPixel;
+
+         for (ossim_uint32 line = startLine; line <= stopLine; ++line)
+         {
+            TIFFReadScanline(theTiffPtr, (void*)buf, line, 0);
+            buf += lineSizeInBytes;
+         }
+      }
+      else
+      {
+         ossim_uint32 lineSizeInBytes = getNumberOfSamples(theBufferRLevel) *
+                                  theBytesPerPixel;
+
+         for (ossim_uint32 line = startLine; line <= stopLine; ++line)
+         {
+            for (ossim_uint32 band = 0; band < theSamplesPerPixel; ++band)
+            {
+               TIFFReadScanline(theTiffPtr, (void*)buf, line, band);
+               buf += lineSizeInBytes;
+            }
+         }
+      }
+   }
+
+   //---
+   // Since theTile's internal rectangle is relative to any sub image offset
+   // we must adjust both the zero based "theBufferRect" and the zero base
+   // "clip_rect" before passing to
+   // theTile->loadTile method.
+   //---
+   result->loadTile(theBuffer, theBufferRect, clip_rect, type);
+   return true;
+
+#else
+   ossimInterleaveType type =
+      (thePlanarConfig[theCurrentDirectory] == PLANARCONFIG_CONTIG) ? OSSIM_BIP : OSSIM_BIL;
+
+   ossim_int32 startLine = clip_rect.ul().y;
+   ossim_int32 stopLine  = clip_rect.lr().y;
+   ossim_int32 stopSamp  = static_cast<ossim_int32>(getNumberOfSamples(theBufferRLevel)-1);
+   
+   if (thePlanarConfig[theCurrentDirectory] == PLANARCONFIG_CONTIG)
+   {
+      for (ossim_int32 line = startLine; line <= stopLine; ++line)
+      {
+         TIFFReadScanline(theTiffPtr, (void*)theBuffer, line, 0);
+         result->copyLine((void*)theBuffer, line, 0, stopSamp, type);
+      }
+   }
+   else
+   {
+      ossim_uint32 lineSizeInBytes = getNumberOfSamples(theBufferRLevel) * theBytesPerPixel;
+      for (ossim_int32 line = startLine; line <= stopLine; ++line)
+      {
+         ossim_uint8* buf = theBuffer;
+         for (ossim_uint32 band = 0; band < theSamplesPerPixel; ++band)
+         {
+            TIFFReadScanline(theTiffPtr, (void*)buf, line, band);
+            buf += lineSizeInBytes;
+         }
+         result->copyLine((void*)theBuffer, line, 0, stopSamp, type);
+      }
+   }
+   return true;
+#endif /* #if OSSIM_BUFFER_SCAN_LINE_READS #else - Non buffered scan line reads. */
+}
+
+bool ossimTiffTileSource::loadFromTile(const ossimIrect& clip_rect,
+                                       ossimImageData* result)
+{
+   static const char MODULE[] = "ossimTiffTileSource::loadFromTile";
+   
+   ossim_int32 tileSizeRead = 0;
+   
+   //---
+   // Shift the upper left corner of the "clip_rect" to the an even tile
+   // boundary.  Note this will shift in the upper left direction.
+   //---
+   ossimIpt tileOrigin = clip_rect.ul();
+   adjustToStartOfTile(tileOrigin);
+   ossimIpt ulTilePt       = tileOrigin;
+//   ossimIpt subImageOffset = getSubImageOffset(getCurrentTiffRLevel()+theStartingResLevel);
+
+   //---
+   // Calculate the number of tiles needed in the line/sample directions.
+   //---
+   ossim_uint32 tiles_in_v_dir = (clip_rect.lr().x-tileOrigin.x+1) /
+      theImageTileWidth[theCurrentDirectory];
+   ossim_uint32 tiles_in_u_dir = (clip_rect.lr().y-tileOrigin.y+1) /
+      theImageTileLength[theCurrentDirectory];
+
+   if ( (clip_rect.lr().x-tileOrigin.x+1) %
+        theImageTileWidth[theCurrentDirectory]  ) ++tiles_in_v_dir;
+   if ( (clip_rect.lr().y-tileOrigin.y+1) %
+        theImageTileLength[theCurrentDirectory] ) ++tiles_in_u_dir;
+
+
+   // Tile loop in line direction.
+   for (ossim_uint32 u=0; u<tiles_in_u_dir; ++u)
+   {
+      ulTilePt.x = tileOrigin.x;
+
+      // Tile loop in sample direction.
+      for (ossim_uint32 v=0; v<tiles_in_v_dir; ++v)
+      {
+         ossimIrect tiff_tile_rect(ulTilePt.x,
+                                   ulTilePt.y,
+                                   ulTilePt.x +
+                                   theImageTileWidth[theCurrentDirectory]  - 1,
+                                   ulTilePt.y +
+                                   theImageTileLength[theCurrentDirectory] - 1);
+         
+         if (tiff_tile_rect.intersects(clip_rect))
+         {
+            ossimIrect tiff_tile_clip_rect
+               = tiff_tile_rect.clipToRect(clip_rect);
+
+            //---
+            // Since theTile's internal rectangle is relative to any sub
+            // image offset we must adjust both the zero based
+            // "theBufferRect" and the zero based "clip_rect" before
+            // passing to theTile->loadTile method.
+            //---
+            ossimIrect bufRectWithOffset = tiff_tile_rect;// + subImageOffset;
+            ossimIrect clipRectWithOffset = tiff_tile_clip_rect;// + subImageOffset;
+            
+            if  (thePlanarConfig[theCurrentDirectory] == PLANARCONFIG_CONTIG)
+            {
+               tileSizeRead = TIFFReadTile(theTiffPtr,
+                                           theBuffer,
+                                           ulTilePt.x,
+                                           ulTilePt.y,
+                                           0,
+                                           0);
+               if (tileSizeRead > 0)
+               {
+                  result->loadTile(theBuffer,
+                                  bufRectWithOffset,
+                                  clipRectWithOffset,
+                                  OSSIM_BIP);
+               }
+               else if(tileSizeRead < 0)
+               {
+                  if(traceDebug())
+                  {
+                     ossimNotify(ossimNotifyLevel_WARN)
+                        << MODULE << " Read Error!"
+                        << "\nReturning error...  " << endl;
+                  }
+                  theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+                  return false;
+               }
+            }
+            else
+            {
+               if ( theOutputBandList.empty() )
+               {
+                  // This will set to identity.
+                  ossimImageSource::getOutputBandList( theOutputBandList );
+               }
+               
+               // band separate tiles...
+               std::vector<ossim_uint32>::const_iterator bandIter = theOutputBandList.begin();
+               ossim_uint32 destinationBand = 0;
+               while ( bandIter != theOutputBandList.end() )
+               {
+                  tileSizeRead = TIFFReadTile( theTiffPtr,
+                                               theBuffer,
+                                               ulTilePt.x,
+                                               ulTilePt.y,
+                                               0,
+                                               (*bandIter) );
+                  if(tileSizeRead > 0)
+                  {
+                     result->loadBand( theBuffer,
+                                       bufRectWithOffset,
+                                       clipRectWithOffset,
+                                       destinationBand );
+                  }
+                  else if (tileSizeRead < 0)
+                  {
+                     if(traceDebug())
+                     {
+                        ossimNotify(ossimNotifyLevel_WARN)
+                           << MODULE << " Read Error!"
+                           << "\nReturning error...  " << endl;
+                     }
+                     theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+                     return false;
+                  }
+                  ++bandIter; // Next band...
+                  ++destinationBand;
+               }
+            }
+
+         } // End of if (tiff_tile_rect.intersects(clip_rect))
+         
+         ulTilePt.x += theImageTileWidth[theCurrentDirectory];
+         
+      }  // End of tile loop in the sample direction.
+
+      ulTilePt.y += theImageTileLength[theCurrentDirectory];
+      
+   }  // End of tile loop in the line direction.
+
+   return true;
+}
+
+bool ossimTiffTileSource::loadFromRgbaU8Tile(const ossimIrect& tile_rect,
+                                             const ossimIrect& clip_rect,
+                                             ossimImageData* result)
+{
+   static const char MODULE[] = "ossimTiffTileSource::loadFromRgbaTile";
+
+   if (theSamplesPerPixel != 3 || theBytesPerPixel!=1)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE << " Error:"
+         << "\nInvalid number of bands or bytes per pixel!" << endl;
+   }
+   
+   //***
+   // Shift the upper left corner of the "clip_rect" to the an even tile
+   // boundary.  Note this will shift in the upper left direction.
+   //***
+   ossimIpt tileOrigin = clip_rect.ul();
+   adjustToStartOfTile(tileOrigin);
+
+   //---
+   // Calculate the number of tiles needed in the line/sample directions
+   // to fill the tile.
+   //---
+   ossim_uint32 tiles_in_v_dir = (clip_rect.lr().x-tileOrigin.x+1) /
+      theImageTileWidth[theCurrentDirectory];
+   ossim_uint32 tiles_in_u_dir = (clip_rect.lr().y-tileOrigin.y+1) /
+      theImageTileLength[theCurrentDirectory];
+
+   if ( (clip_rect.lr().x-tileOrigin.x+1) %
+        theImageTileWidth[theCurrentDirectory]  ) ++tiles_in_v_dir;
+   if ( (clip_rect.lr().y-tileOrigin.y+1) %
+        theImageTileLength[theCurrentDirectory] ) ++tiles_in_u_dir;
+   
+   ossimIpt ulTilePt = tileOrigin;
+
+#if 0
+   if (traceDebug())
+   {
+      CLOG << "DEBUG:"
+           << "\ntile_rect:  " << tile_rect
+           << "\nclip_rect:  " << clip_rect
+           << "\ntiles_in_v_dir:  " << tiles_in_v_dir
+           << "\ntiles_in_u_dir:  " << tiles_in_u_dir
+           << endl;
+   }
+#endif
+   
+   
+   // Tile loop in line direction.
+   for (ossim_uint32 u=0; u<tiles_in_u_dir; u++)
+   {
+      ulTilePt.x = tileOrigin.x;
+
+      // Tile loop in sample direction.
+      for (ossim_uint32 v=0; v<tiles_in_v_dir; v++)
+      {
+         ossimIrect tiff_tile_rect
+            = ossimIrect(ulTilePt.x,
+                         ulTilePt.y,
+                         ulTilePt.x +
+                         theImageTileWidth[theCurrentDirectory]  - 1,
+                         ulTilePt.y +
+                         theImageTileLength[theCurrentDirectory] - 1);
+
+         if ( getCurrentTiffRLevel() != theBufferRLevel ||
+              tiff_tile_rect != theBufferRect)
+         {
+            // Need to grab a new tile.
+            // Read a tile into the buffer.
+            if ( !TIFFReadRGBATile(theTiffPtr,
+                                   ulTilePt.x,
+                                   ulTilePt.y,
+                                   (uint32*)theBuffer) ) // use tiff typedef
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << MODULE << " Read Error!"
+                  << "\nReturning error..." << endl;
+               theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+               return false;
+            }
+
+            // Capture the rectangle.
+            theBufferRect   = tiff_tile_rect;
+            theBufferRLevel = getCurrentTiffRLevel();
+         }
+
+         ossimIrect tile_clip_rect = clip_rect.clipToRect(theBufferRect);
+         
+         //***
+         // Get the offset to the first valid pixel.
+         // 
+         // Note: The data in the tile buffer is organized bottom up.  So the
+         //       coordinate must be negated in the line direction since
+         //       the met assumes an origin of upper left.
+         //***
+         ossim_uint32 in_buf_offset =
+              (tiff_tile_rect.lr().y-tile_clip_rect.ul().y)*
+              theImageTileWidth[theCurrentDirectory]*4 +
+              ((tile_clip_rect.ul().x - ulTilePt.x)*4);
+         
+         ossim_uint32 out_buf_offset =
+            (tile_clip_rect.ul().y - tile_rect.ul().y) *
+            ((ossim_int32)result->getWidth()) +
+            tile_clip_rect.ul().x - tile_rect.ul().x;
+         
+         //
+         // Get a pointer positioned at the first valid pixel in buffers.
+         //
+         ossim_uint32* s = (ossim_uint32*)(theBuffer + in_buf_offset);  // s for source...
+//         ossim_uint8* s = theBuffer + in_buf_offset;  // s for source...
+         ossim_uint8* r = static_cast<ossim_uint8*>(result->getBuf(0))+
+            out_buf_offset;
+         ossim_uint8* g = static_cast<ossim_uint8*>(result->getBuf(1))+
+            out_buf_offset;
+         ossim_uint8* b = static_cast<ossim_uint8*>(result->getBuf(2))+
+            out_buf_offset;
+         
+         ossim_uint32 lines2copy = tile_clip_rect.lr().y-tile_clip_rect.ul().y+1;
+         ossim_uint32 samps2copy = tile_clip_rect.lr().x-tile_clip_rect.ul().x+1;
+         
+         // Line loop through valid portion of the tiff tile.         
+         for (ossim_uint32 line = 0; line < lines2copy; line++)
+         {
+            // Sample loop through the tiff tile.
+            ossim_uint32 i=0;
+            ossim_uint32 j=0;
+            
+            // note the bands from the TIFF READ are stored in a, b, g, r ordering.
+            // we must reverse the bands and skip the first byte.
+            for (ossim_uint32 sample = 0; sample < samps2copy; sample++)
+            {
+               r[i] = (ossim_uint8)OSSIM_TIFF_UNPACK_R4(s[j]);
+               g[i] = (ossim_uint8)OSSIM_TIFF_UNPACK_G4(s[j]);
+               b[i] = (ossim_uint8)OSSIM_TIFF_UNPACK_B4(s[j]);
+               i++;
+               ++j;
+            }
+            
+            // Increment the pointers by one line.
+            const ossim_uint32 OUTPUT_TILE_WIDTH = result->getWidth();
+            r += OUTPUT_TILE_WIDTH;
+            g += OUTPUT_TILE_WIDTH;
+            b += OUTPUT_TILE_WIDTH;
+            s -= theImageTileWidth[theCurrentDirectory];
+         }
+      
+         ulTilePt.x += theImageTileWidth[theCurrentDirectory];
+      
+      }  // End of tile loop in the sample direction.
+      
+      ulTilePt.y += theImageTileLength[theCurrentDirectory];
+      
+   }  // End of tile loop in the line direction.
+   
+   return true;
+}
+
+bool ossimTiffTileSource::loadFromRgbaU8Strip(const ossimIrect& tile_rect,
+                                              const ossimIrect& clip_rect,
+                                              ossimImageData* result)
+{
+   static const char MODULE[] = "ossimTiffTileSource::loadFromRgbaU8Strip";
+
+   if (theSamplesPerPixel > 4 || theBytesPerPixel != 1)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE << " Error:"
+         << "\nInvalid number of bands or bytes per pixel!" << endl;
+   }
+   
+   //***
+   // Calculate the number of strips to read.
+   //***
+   const ossim_uint32 OUTPUT_TILE_WIDTH = result->getWidth();
+
+   ossim_uint32 starting_strip = clip_rect.ul().y /
+      theRowsPerStrip[theCurrentDirectory];
+   ossim_uint32 ending_strip   = clip_rect.lr().y /
+      theRowsPerStrip[theCurrentDirectory];
+   ossim_uint32 strip_width    = theImageWidth[theCurrentDirectory]*4;   
+   ossim_uint32 output_tile_offset = (clip_rect.ul().y - tile_rect.ul().y) *
+                                OUTPUT_TILE_WIDTH + clip_rect.ul().x -
+                                tile_rect.ul().x;
+
+#if 0 /* Please keep for debug: */
+   CLOG << "DEBUG:"
+        << "\nsamples:         " << theSamplesPerPixel
+        << "\ntile_rect:       " << tile_rect
+        << "\nclip_rect:       " << clip_rect
+        << "\nstarting_strip:  " << starting_strip
+        << "\nending_strip:    " << ending_strip
+        << "\nstrip_width:     " << strip_width
+        << "\noutput_tile_offset:  " << output_tile_offset
+        << endl;
+#endif
+   
+   //***
+   // Get the pointers positioned at the first valid pixel in the buffers.
+   // s = source
+   // d = destination
+   //***
+   ossim_uint32 band;
+
+   ossim_uint8** d = new ossim_uint8*[theSamplesPerPixel];
+   for (band = 0; band < theSamplesPerPixel; band++)
+   {
+      d[band] = static_cast<ossim_uint8*>(result->getBuf(band))+output_tile_offset;
+   }
+
+   // Loop through strips...
+   for (ossim_uint32 strip=starting_strip; strip<=ending_strip; strip++)
+   {
+      if ( (theBufferRLevel != theCurrentDirectory) ||
+           ( clip_rect.completely_within( theBufferRect ) == false ) )
+      {
+         if (TIFFReadRGBAStrip(theTiffPtr,
+                               (strip*theRowsPerStrip[theCurrentDirectory]),
+                               (uint32*)theBuffer) == 0) // use tiff typedef
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << " Error reading strip!" <<endl;
+            delete [] d;
+            return false;
+         }
+
+         // Capture rect and rlevel of buffer:
+         theBufferRLevel = theCurrentDirectory;
+         theBufferRect = ossimIrect(
+            0,
+            starting_strip,
+            theImageWidth[theCurrentDirectory]-1,
+            (ending_strip-starting_strip) ? (ending_strip-starting_strip) *
+            theRowsPerStrip[theCurrentDirectory] - 1 :
+            theRowsPerStrip[theCurrentDirectory] - 1 );
+      }
+      
+      //***
+      // If the last strip is a partial strip then the first line of the
+      // strip will be the last line of the image.
+      //***
+      ossim_uint32 last_line = theImageLength[theCurrentDirectory] - 1;
+
+      ossim_uint32 strip_offset
+         = ((strip * theRowsPerStrip[theCurrentDirectory]) +
+            theRowsPerStrip[theCurrentDirectory] - 1) <
+         last_line ?  0 :
+         ((strip * theRowsPerStrip[theCurrentDirectory]) +
+          theRowsPerStrip[theCurrentDirectory] - 1) - last_line;
+
+      ossim_uint32 total_rows = theRowsPerStrip[theCurrentDirectory] -
+         strip_offset;
+      
+      for (ossim_uint32 row=0; row<total_rows; row++)
+      {
+         // Write the line if it's in the clip rectangle.
+         ossim_int32 current_line = strip * theRowsPerStrip[theCurrentDirectory]
+            + row;
+         if  (current_line >= clip_rect.ul().y &&
+              current_line <= clip_rect.lr().y)
+         {
+            //
+            // Position the stip pointer to the correct spot.
+            // 
+            // Note:
+            // A strip is organized from bottom to top and the raster buffer is
+            // orgainized from top to bottom so the lineBuf must be offset
+            // accordingly.
+            //
+            ossim_uint32* s = (ossim_uint32*)(theBuffer+ ((theRowsPerStrip[theCurrentDirectory] - row -
+                                                           strip_offset - 1) * strip_width + clip_rect.ul().x * 4));
+            
+            // Copy the data to the output buffer.
+            ossim_uint32 i=0;
+                                                 
+            for (int32 sample=clip_rect.ul().x;
+                 sample<=clip_rect.lr().x;
+                 sample++)
+            {
+               d[0][i] = OSSIM_TIFF_UNPACK_R4(*s);
+               d[1][i] = OSSIM_TIFF_UNPACK_G4(*s);
+               d[2][i] = OSSIM_TIFF_UNPACK_B4(*s);
+               ++i;
+               ++s;
+            }
+
+            for (band = 0; band < theSamplesPerPixel; band++)
+            {
+               d[band] += OUTPUT_TILE_WIDTH;
+            }
+         }
+      }  // End of loop through rows in a strip.
+
+   }  // End of loop through strips.
+
+   delete [] d;
+               
+   return true;
+}
+
+//*******************************************************************
+// Private Method:
+//*******************************************************************
+bool ossimTiffTileSource::loadFromRgbaU8aStrip(const ossimIrect& tile_rect,
+                                               const ossimIrect& clip_rect,
+                                               ossimImageData* result)
+{
+   static const char MODULE[] = "ossimTiffTileSource::loadFromRgbaU8aStrip";
+
+   //***
+   // Specialized for one bit data to handle null values.
+   //***
+   const ossim_uint32 OUTPUT_TILE_WIDTH = result->getWidth();
+   const ossim_uint8 NULL_PIX = static_cast<ossim_uint8>(result->getNullPix(0));
+   const ossim_uint8 MIN_PIX  = static_cast<ossim_uint8>(result->getMinPix(0));
+
+   if (theSamplesPerPixel > 4 || theBytesPerPixel!= 1)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE << " Error:"
+         << "\nInvalid number of bands or bytes per pixel!" << endl;
+   }
+   
+   //***
+   // Calculate the number of strips to read.
+   //***
+   ossim_uint32 starting_strip = clip_rect.ul().y /
+        theRowsPerStrip[theCurrentDirectory];
+   ossim_uint32 ending_strip   = clip_rect.lr().y /
+      theRowsPerStrip[theCurrentDirectory];
+   ossim_uint32 output_tile_offset = (clip_rect.ul().y - tile_rect.ul().y) *
+                                OUTPUT_TILE_WIDTH + clip_rect.ul().x -
+                                tile_rect.ul().x;
+
+#if 0
+   if (traceDebug())
+   {
+      CLOG << "DEBUG:"
+           << "\ntile_rect:       " << tile_rect
+           << "\nclip_rect:       " << clip_rect
+           << "\nstarting_strip:  " << starting_strip
+           << "\nending_strip:    " << ending_strip
+           << "\nstrip_width:     " << strip_width
+           << "\noutput_tile_offset:     " << output_tile_offset
+           << "\nsamples:         " << theSamplesPerPixel
+           << endl;
+   }
+#endif
+   
+   //***
+   // Get the pointers positioned at the first valid pixel in the buffers.
+   // s = source
+   // d = destination
+   //***
+   ossim_uint32 band;
+
+   ossim_uint8** d = new ossim_uint8*[theSamplesPerPixel];
+   for (band = 0; band < theSamplesPerPixel; band++)
+   {
+      d[band] = static_cast<ossim_uint8*>(result->getBuf(band))+output_tile_offset;
+   }
+
+   // Loop through strips...
+   for (ossim_uint32 strip=starting_strip; strip<=ending_strip; strip++)
+   {
+      if (TIFFReadRGBAStrip(theTiffPtr,
+                            (strip*theRowsPerStrip[theCurrentDirectory]),
+                            (uint32*)theBuffer) == 0) // use tiff typedef
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << MODULE << " Error reading strip!" <<endl;
+         delete [] d;
+         return false;
+      }
+
+      //***
+      // If the last strip is a partial strip then the first line of the
+      // strip will be the last line of the image.
+      //***
+      ossim_uint32 last_line = theImageLength[theCurrentDirectory] - 1;
+
+      ossim_uint32 strip_offset
+         = ((strip * theRowsPerStrip[theCurrentDirectory]) +
+            theRowsPerStrip[theCurrentDirectory] - 1) < last_line ?  0 :
+         ((strip * theRowsPerStrip[theCurrentDirectory]) +
+          theRowsPerStrip[theCurrentDirectory] - 1) - last_line;
+
+      ossim_uint32 total_rows = theRowsPerStrip[theCurrentDirectory] -
+         strip_offset;
+      
+      for (ossim_uint32 row=0; row<total_rows; row++)
+      {
+         // Write the line if it's in the clip rectangle.
+         ossim_int32 current_line = strip * theRowsPerStrip[theCurrentDirectory]
+            + row;
+         if  (current_line >= clip_rect.ul().y &&
+              current_line <= clip_rect.lr().y)
+         {
+            //***
+            // Position the stip pointer to the correct spot.
+            // 
+            // Note:
+            // A strip is organized from bottom to top and the raster buffer is
+            // orgainized from top to bottom so the lineBuf must be offset
+            // accordingly.
+            //***
+            ossim_uint8* s = theBuffer;
+            s += (theRowsPerStrip[theCurrentDirectory] - row -
+                  strip_offset - 1) *
+                 theImageWidth[theCurrentDirectory] * 4 +
+                 clip_rect.ul().x * 4;
+            
+            // Copy the data to the output buffer.
+            ossim_uint32 i=0;
+            ossim_uint32 j=0;
+            for (int32 sample=clip_rect.ul().x;
+                 sample<=clip_rect.lr().x;
+                 sample++)
+            {
+               for (band = 0; band < theSamplesPerPixel; band++)
+               {
+                  ossim_uint8 pix = s[j + band];
+                  d[band][i] = pix != NULL_PIX ? pix : MIN_PIX;
+               }
+               ++i;
+               j += 4;
+            }
+
+            for (band = 0; band < theSamplesPerPixel; band++)
+            {
+               d[band] += OUTPUT_TILE_WIDTH;
+            }
+         }
+      }  // End of loop through rows in a strip.
+
+   }  // End of loop through strips.
+
+   delete [] d;
+               
+   return true;
+   
+} // End: ossimTiffTileSource::loadFromRgbaU8aStrip( ... )
+
+bool ossimTiffTileSource::loadFromU16Strip( const ossimIrect& clip_rect, ossimImageData* result )
+{
+   bool status = true;
+   
+   // Calculate the strips to read.
+   ossim_uint32 starting_strip = clip_rect.ul().y / theRowsPerStrip[theCurrentDirectory];
+   ossim_uint32 ending_strip   = clip_rect.lr().y / theRowsPerStrip[theCurrentDirectory];
+
+   ossim_uint32 stripsPerBand = theImageLength[theCurrentDirectory] /
+      theRowsPerStrip[theCurrentDirectory];
+   if ( theImageLength[theCurrentDirectory] % theRowsPerStrip[theCurrentDirectory] )
+   {
+      ++stripsPerBand;
+   }
+   
+   // Loop through strips....
+   for ( ossim_uint32 strip = starting_strip; strip <= ending_strip; ++strip )
+   {
+      if ( (theBufferRLevel != theCurrentDirectory) ||
+           !clip_rect.completely_within(theBufferRect) )
+      {
+         // Fill buffer block:
+         
+         ossim_uint32 linesInStrip = theRowsPerStrip[theCurrentDirectory];
+         
+         // If last strip and not filling entirely memset it.
+         if ( strip == ( stripsPerBand - 1 ) )
+         {
+            // Last strip of image. Strip may be clipped to end of image.
+            linesInStrip = theImageLength[theCurrentDirectory] %
+               theRowsPerStrip[theCurrentDirectory];
+         }
+
+         ossim_uint32 bytesPerStrip = linesInStrip * theImageWidth[theCurrentDirectory] * 2;
+                  
+         // TIFFReadEncodedStrip takes signed int32 arg.
+         ossim_int32 bytesToRead = (ossim_int32)bytesPerStrip;
+         
+         ossim_uint32 startY = strip * theRowsPerStrip[theCurrentDirectory];
+         
+         // Need to read in the strip data:
+         ossim_uint32 bufferOffsetInBytes = 0;
+         
+         for (ossim_uint32 band = 0; band < theSamplesPerPixel; ++band)
+         {
+            ossim_uint32 bandStrip = strip + band * stripsPerBand;
+            
+            //---
+            // TIFFReadEncodedStrip does byte swapping for us.
+            // -1 says to read entire strip.
+            // Return of -1 is error.
+            //---
+            ossim_int32 bytesRead = TIFFReadEncodedStrip( theTiffPtr,
+                                                          bandStrip,
+                                                          theBuffer+bufferOffsetInBytes,
+                                                          bytesToRead );
+           if ( bytesRead != bytesToRead )
+            {
+               if(traceDebug())
+               {
+                  ossimNotify(ossimNotifyLevel_WARN)
+                     << "ossimTiffTileSource::loadFromU16Strip Read Error!"
+                     << "\nReturning error...  " << endl;
+               }
+               theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+               status = false;
+               result->makeBlank();
+               break;
+            }
+            bufferOffsetInBytes += bytesPerStrip;
+         }
+         
+         if ( status )
+         {
+            // Capture rect and rlevel of buffer:
+            theBufferRLevel = theCurrentDirectory;
+            theBufferRect = ossimIrect( 0,
+                                        startY,
+                                        theImageWidth[theCurrentDirectory] - 1,
+                                        startY + linesInStrip - 1);
+         }
+         
+      } // End: Fill buffer block.
+      
+      if ( status )
+      {
+         result->loadTile(theBuffer, theBufferRect, OSSIM_BSQ);
+      }
+      
+   } // End of strip loop.
+   
+   return status;
+   
+} // End: ossimTiffTileSource::loadFromU16Strip( ... )
+
+void ossimTiffTileSource::adjustToStartOfTile(ossimIpt& pt) const
+{
+   //***
+   // Notes:
+   // - Assumes an origin of (0,0)
+   // - Shifts in to the upper left direction.
+   //***
+   ossim_int32 tw =
+      static_cast<ossim_int32>(theImageTileWidth[theCurrentDirectory]);
+   ossim_int32 th =
+      static_cast<ossim_int32>(theImageTileLength[theCurrentDirectory]);
+   
+   if (pt.x > 0)
+   {
+      pt.x = (pt.x/tw) * tw;
+   }
+   else if (pt.x < 0)
+   {
+      pt.x = std::abs(pt.x) < tw ? -tw : (pt.x/tw)*tw;
+   }
+
+   if (pt.y > 0)
+   {
+      pt.y = (pt.y/th) * th;
+   }
+   else if (pt.y < 0)
+   {
+      pt.y = std::abs(pt.y) < th ? -th : (pt.y/th)*th;
+   }
+}
+
+bool ossimTiffTileSource::isValidRLevel(ossim_uint32 resLevel) const
+{
+   bool result = false;
+   
+   const ossim_uint32 LEVELS = getNumberOfDecimationLevels();
+
+   //---
+   // If we have r0 our reslevels are the same as the callers so
+   // no adjustment necessary.
+   //---
+   if ( !theStartingResLevel || theR0isFullRes) // Not an overview or has r0.
+   {
+      result = (resLevel < LEVELS);
+   }
+   else if (resLevel >= theStartingResLevel) // Used as overview.
+   {
+      result = ( (resLevel - theStartingResLevel) < LEVELS);
+   }
+   
+   return result;
+}
+
+ossim_uint32 ossimTiffTileSource::getCurrentTiffRLevel() const
+{
+   return theCurrentTiffRlevel;
+//   return theCurrentDirectory;
+}
+
+ossimString ossimTiffTileSource::getReadMethod(ossim_uint32 directory) const
+{
+   ossimString result = "UNKNOWN";
+   if ( directory < theReadMethod.size() )
+   {
+      switch (theReadMethod[directory])
+      {
+         case READ_RGBA_U8_TILE:
+            result = "READ_RGBA_U8_TILE";
+            break;
+         case READ_RGBA_U8_STRIP:
+            result = "READ_RGBA_U8_STRIP";
+            break;
+         case READ_RGBA_U8A_STRIP:
+            result = "READ_RGBA_U8A_STRIP";
+            break;
+         case READ_SCAN_LINE:
+            result = "READ_SCAN_LINE";
+            break;
+         case READ_TILE:
+            result = "READ_TILE";
+            break;
+         case UNKNOWN:
+         default:
+            break;
+      }
+   }
+   return result;
+}      
+
+ossim_uint32 ossimTiffTileSource::getNumberOfDirectories() const
+{
+   return theNumberOfDirectories;
+}
+
+ossim_uint32 ossimTiffTileSource::getImageTileWidth() const
+{
+   ossim_uint32 result = 0;
+   if(isOpen())
+   {
+      if(theCurrentDirectory < theImageTileWidth.size())
+      {
+         result = theImageTileWidth[theCurrentDirectory];
+      }
+   }   
+   return result;
+}
+
+ossim_uint32 ossimTiffTileSource::getImageTileHeight() const
+{
+   ossim_uint32 result = 0;
+   if(isOpen())
+   {
+      if(theCurrentDirectory < theImageTileLength.size())
+      {
+         result = theImageTileLength[theCurrentDirectory];
+      }
+   }
+   return result;
+}
+
+ossim_uint32 ossimTiffTileSource::getTileWidth() const
+{
+   ossim_uint32 result = getImageTileWidth();
+   if (!result)
+   {
+      ossimIpt tileSize;
+      ossim::defaultTileSize(tileSize);
+      result = tileSize.x;
+   }
+   return result;
+}
+
+ossim_uint32 ossimTiffTileSource::getTileHeight() const
+{
+   ossim_uint32 result = getImageTileHeight();
+   if (!result)
+   {
+      ossimIpt tileSize;
+      ossim::defaultTileSize(tileSize);
+      result = tileSize.y;
+   }
+   return result;
+}
+
+void ossimTiffTileSource::setApplyColorPaletteFlag(bool flag)
+{
+   theApplyColorPaletteFlag = flag;
+   
+   if(isColorMapped())
+   {
+      if(theApplyColorPaletteFlag)
+      {
+         thePhotometric[0] = PHOTOMETRIC_PALETTE;
+         theSamplesPerPixel = 3;
+      }
+      else
+      {
+         thePhotometric[0] = PHOTOMETRIC_MINISBLACK;
+         theSamplesPerPixel = 1; 
+      }
+      
+      setReadMethod();
+
+      theTile = 0;
+      if (theBuffer)
+      {
+         delete [] theBuffer;
+         theBuffer = 0;
+      }
+   }
+}
+
+bool ossimTiffTileSource::getApplyColorPaletteFlag()const
+{
+   return theApplyColorPaletteFlag;
+}
+
+ossimString ossimTiffTileSource::getLongName()const
+{
+   return ossimString("TIFF Image Handler");
+}
+
+ossimString ossimTiffTileSource::getShortName()const
+{
+   return ossimString("ossim_tiff");
+}
+
+std::ostream& ossimTiffTileSource::print(std::ostream& os) const
+{
+   //***
+   // Use a keyword format.
+   //***
+   os << "image_file:                    " << theImageFile
+      << "\nsamples_per_pixel:           " << theSamplesPerPixel
+      << "\nbits_per_sample:             " << theBitsPerSample
+      << "\nsample_format_unit:          " << theSampleFormatUnit
+      << "\nmin_sample_value:            " << theMinSampleValue
+      << "\nmax_sample_value:            " << theMaxSampleValue
+      << "\nnull_sample_value:           " << theNullSampleValue
+      << "\ntheNumberOfDirectories:      " << theNumberOfDirectories
+      << "\nr0_is_full_res:              " << theR0isFullRes;
+
+   
+   for (ossim_uint32 i=0; i<theNumberOfDirectories; ++i)
+   {
+      os << "\ndirectory[" << i << "]"
+         << "\nimage width:     " << theImageWidth[i]
+         << "\nimage_length:    " << theImageLength[i]
+         << "\nread method:     " << getReadMethod(i).c_str()
+         << "\nplanar:          " << thePlanarConfig[i]
+         << "\nphotometric:     " << thePhotometric[i];
+      if (theRowsPerStrip[i])
+      {
+         os << "\nrows per strip:  " << theRowsPerStrip[i];
+      }
+      if (theImageTileWidth[i])
+      {
+         os << "\ntile_width:      " << theImageTileWidth[i];
+      }
+      if (theImageTileLength[i])
+      {
+         os << "\ntile_length:     " << theImageTileLength[i];
+      }
+      os << endl;
+   }
+
+   if (theTile.valid())
+   {
+      os << "\nOutput tile dump:\n" << *theTile << endl;
+   }
+
+   if (theOverview.valid())
+   {
+      os << "\nOverview file:\n";
+      theOverview->print(os);
+   }
+
+   os << endl;
+   
+   return ossimSource::print(os);
+}
+
+ossim_uint32 ossimTiffTileSource::getNumberOfInputBands() const
+{
+   return theSamplesPerPixel;
+}
+
+ossim_uint32 ossimTiffTileSource::getNumberOfOutputBands () const
+{
+   ossim_uint32 bands = theOutputBandList.size();
+   if ( !bands )
+   {
+      bands = getNumberOfInputBands();
+   }
+   return bands;
+}
+
+bool ossimTiffTileSource::isBandSelector() const
+{
+   bool result = false;
+   if ( isOpen() && theReadMethod.size() && ( theReadMethod.size() == thePlanarConfig.size() ) )
+   {
+      // Tiled band separate currently is only coded to be band selector.
+      result = true;
+      for ( ossim_uint32 i = 0; i < theReadMethod.size(); ++i )
+      {
+         if ( ( theReadMethod[i] != READ_TILE ) ||
+              ( thePlanarConfig[i] == PLANARCONFIG_CONTIG ) )
+         {
+            result = false;
+            break;
+         }
+      }
+      if ( result && theOverview.valid() )
+      {
+         result = theOverview->isBandSelector();
+      }
+   }
+   return result;
+}
+
+bool ossimTiffTileSource::setOutputBandList(const std::vector<ossim_uint32>& band_list)
+{
+   bool result = false;
+   if ( isBandSelector() )
+   {
+      // Making a copy as passed in list could be our m_outputBandList.
+      std::vector<ossim_uint32> inputList = band_list;
+      result = ossimImageHandler::setOutputBandList( inputList, theOutputBandList );
+      if ( result && theTile.valid() )
+      {
+         if ( theTile->getNumberOfBands() != theOutputBandList.size() )
+         {
+            theTile = 0; // Force a reinitialize on next getTile.
+         }
+      }
+   }
+   return result;
+}
+
+void ossimTiffTileSource::getOutputBandList(std::vector<ossim_uint32>& bandList) const
+{
+   if ( theOutputBandList.size() )
+   {
+      bandList = theOutputBandList;
+   }
+   else
+   {
+      ossimImageSource::getOutputBandList( bandList );
+   }
+}
+
+bool ossimTiffTileSource::isOpen()const
+{
+   return (theTiffPtr!=NULL);
+}
+
+bool ossimTiffTileSource::hasR0() const
+{
+   return theR0isFullRes;
+}
+
+ossim_float64 ossimTiffTileSource::getMinPixelValue(ossim_uint32 band)const
+{
+   if(theMetaData.getNumberOfBands())
+   {
+      return ossimImageHandler::getMinPixelValue(band);
+   }
+   return theMinSampleValue;
+}
+
+ossim_float64 ossimTiffTileSource::getMaxPixelValue(ossim_uint32 band)const
+{
+   if(theMetaData.getNumberOfBands())
+   {
+      return ossimImageHandler::getMaxPixelValue(band);
+   }
+   return theMaxSampleValue;
+}
+
+ossim_float64 ossimTiffTileSource::getNullPixelValue(ossim_uint32 band)const
+{
+   if(theMetaData.getNumberOfBands())
+   {
+      return ossimImageHandler::getNullPixelValue(band);
+   }
+   return theNullSampleValue;
+}
+
+bool ossimTiffTileSource::isColorMapped() const
+{
+   bool result = false;
+   if ( isOpen() )
+   {
+      uint16* red;
+      uint16* green;
+      uint16* blue;
+      
+      result = static_cast<bool>(TIFFGetField(theTiffPtr,
+                                              TIFFTAG_COLORMAP,
+                                              &red, &green, &blue));
+   }
+   return result;
+}
+
+void ossimTiffTileSource::setReadMethod()
+{
+   for (ossim_uint32 dir=0; dir<theNumberOfDirectories; ++dir)
+   {
+      if (setTiffDirectory(dir) == false)
+      {
+         return;
+      }
+      
+      //---
+      // Establish how this tiff directory will be read.
+      //---
+      if (TIFFIsTiled(theTiffPtr)) 
+      {
+         if ( ( thePhotometric[dir] == PHOTOMETRIC_YCBCR ||
+                thePhotometric[dir] == PHOTOMETRIC_PALETTE ) &&
+              (theSamplesPerPixel <= 3) &&
+              (theBitsPerSample   <= 8 ))
+         {
+            theReadMethod[dir] = READ_RGBA_U8_TILE;
+         }
+         else
+         {
+            theReadMethod[dir] = READ_TILE;
+         }
+      }
+      else // Not tiled...
+      {
+         if ( (thePhotometric[dir] == PHOTOMETRIC_PALETTE ||
+               thePhotometric[dir] == PHOTOMETRIC_YCBCR ) &&
+              theSamplesPerPixel <= 3 &&
+              theBitsPerSample   <= 8 )
+         {
+            theReadMethod[dir] = READ_RGBA_U8_STRIP;
+         }
+         else if (( theBitsPerSample == 16 ) &&
+                  ( theRowsPerStrip[dir] > 1 ) &&
+                  (( thePlanarConfig[dir] == PLANARCONFIG_SEPARATE ) ||
+                    ((thePlanarConfig[dir] == PLANARCONFIG_CONTIG) && (theSamplesPerPixel==1))))
+         {
+            // Buffer a strip of bands.
+            theReadMethod[dir] = READ_U16_STRIP;
+         }
+         else if (theSamplesPerPixel <= 3 && theBitsPerSample == 1)
+         {
+            //---
+            // Note:  One bit data expands to zeroes and 255's so run it through
+            //        a specialized method to flip zeroes to one's since zeroes
+            //        are usually reserved for null value.
+            //---
+            theReadMethod[dir] = READ_RGBA_U8A_STRIP;
+         }
+         else if((theCompressionType == COMPRESSION_NONE)||
+                 (theRowsPerStrip[dir]==1))
+         {
+            theReadMethod[dir] = READ_SCAN_LINE;
+         }
+         else if((theCompressionType!=COMPRESSION_NONE)&&
+                 (theSamplesPerPixel <= 4) &&
+                 (theBitsPerSample   <= 8) )
+         {
+            theReadMethod[dir] = READ_RGBA_U8_STRIP;
+         }
+         else
+         {
+            theReadMethod[dir] = UNKNOWN;
+         }
+      }
+      
+   } // End of loop through directories.
+
+   // Reset the directory back to "0".
+   setTiffDirectory(0);
+}
+
+void ossimTiffTileSource::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property.valid())
+   {
+      return;
+   }
+   if(property->getName() == "apply_color_palette_flag")
+   {
+      // Assuming first directory...
+      setApplyColorPaletteFlag(property->valueToString().toBool());
+   }
+   else
+   {
+      ossimImageHandler::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimTiffTileSource::getProperty(const ossimString& name)const
+{
+   if(name == "apply_color_palette_flag")
+   {
+      ossimBooleanProperty* property = new ossimBooleanProperty("apply_color_palette_flag",
+                                                                theApplyColorPaletteFlag);
+      property->clearChangeType();
+      property->setFullRefreshBit();
+      return property;
+   }
+   else if(name == "file_type")
+	{
+		return new ossimStringProperty(name, "TIFF");
+	}
+	
+   return ossimImageHandler::getProperty(name);
+}
+
+void ossimTiffTileSource::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimImageHandler::getPropertyNames(propertyNames);
+   propertyNames.push_back("file_type");
+   propertyNames.push_back("apply_color_palette_flag");
+}
+
+bool ossimTiffTileSource::setTiffDirectory(ossim_uint16 directory)
+{
+   bool status = true;
+   theCurrentTiffRlevel = 0;
+   if (theCurrentDirectory != directory)
+   {
+      status = TIFFSetDirectory(theTiffPtr, directory);
+      if (status == true)
+      {
+         theCurrentDirectory = directory;
+      }
+      else
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimTiffTileSource::setTiffDirectory ERROR setting directory "
+               << directory << "!" << endl;
+         }
+      }
+   }
+   
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx<theImageDirectoryList.size();++idx)
+   {
+      if(theImageDirectoryList[idx] == directory)
+      {
+         theCurrentTiffRlevel = idx;
+         break;
+      }
+   }
+   return status;
+}
+
+void ossimTiffTileSource::populateLut()
+{
+   ossim_uint16* r;
+   ossim_uint16* g;
+   ossim_uint16* b;
+   if(TIFFGetField(theTiffPtr, TIFFTAG_COLORMAP, &r, &g, &b))
+   {
+      ossim_uint32 numEntries = 256;
+      ossimScalarType scalarType = OSSIM_UINT8;
+      if(theBitsPerSample == 16)
+      {
+         numEntries = 65536;
+         scalarType = OSSIM_UINT16;
+      }
+      theLut = new ossimNBandLutDataObject(numEntries,
+                                           3,
+                                           scalarType,
+                                           0);
+      ossim_uint32 entryIdx = 0;
+      for(entryIdx = 0; entryIdx < numEntries; ++entryIdx)
+      {
+         if(scalarType == OSSIM_UINT8)
+         {
+            (*theLut)[entryIdx][0] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(((*r)/65535.0)*255.0);
+            (*theLut)[entryIdx][1] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(((*g)/65535.0)*255.0);
+            (*theLut)[entryIdx][2] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(((*b)/65535.0)*255.0);
+         }
+         else
+         {
+            (*theLut)[entryIdx][0] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(*r);
+            (*theLut)[entryIdx][1] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(*g);
+            (*theLut)[entryIdx][2] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(*b);
+         }
+         ++r;++g;++b;
+      }
+   }
+}
+
+void ossimTiffTileSource::validateMinMaxNull()
+{
+   ossim_float64 tempNull = ossim::defaultNull(theScalarType);
+   ossim_float64 tempMax  = ossim::defaultMax(theScalarType);
+   ossim_float64 tempMin  = ossim::defaultMin(theScalarType);
+   
+   if( (theMinSampleValue == tempNull) || ossim::isnan(theMinSampleValue) ) 
+   {
+      theMinSampleValue = tempMin;
+   }
+   if( (theMaxSampleValue == tempNull) || ossim::isnan(theMaxSampleValue) )
+   {
+      theMaxSampleValue = tempMax;
+   }
+   if ( ossim::isnan(theNullSampleValue) )
+   {
+      theNullSampleValue = tempNull;
+   }
+
+   if (theScalarType == OSSIM_FLOAT32)
+   {
+      std::ifstream inStr(theImageFile.c_str(), std::ios::in|std::ios::binary);
+      if ( inStr.good() )
+      {   
+         // Do a print to a memory stream in key:value format.
+         ossimTiffInfo ti;
+         ossimIOMemoryStream memStr;
+         ti.print(inStr, memStr);
+
+         // Make keywordlist with all the tags.
+         ossimKeywordlist gtiffKwl;
+         if ( gtiffKwl.parseStream(memStr) )
+         {
+#if 0 /* Please keep for debug. (drb) */
+            if ( traceDebug() )
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << "ossimTiffTileSource::validateMinMaxNull kwl:\n" << gtiffKwl
+                  << endl;
+            }
+#endif
+            const char* lookup;
+
+            lookup = gtiffKwl.find("tiff.image0.gdal_nodata");
+            bool nullFound = false;
+            if ( lookup )
+            {
+               ossimString os = lookup;
+               theNullSampleValue = os.toFloat32();
+               nullFound = true;
+            }
+            lookup = gtiffKwl.find("tiff.image0.vertical_citation");
+            if ( lookup )
+            {     
+               //---
+               // Format of string this handles:
+               // "Null: -9999.000000, Non-Null Min: 12.428605, 
+               // Non-Null Avg: 88.944082, Non-Null Max: 165.459558|"
+               ossimString citation = lookup;
+               std::vector<ossimString> array;
+               citation.split( array, ossimString(",") );
+               if ( array.size() == 4 )
+               {
+                  std::vector<ossimString> array2;
+
+                  if ( !nullFound )
+                  {
+                     // null
+                     array[0].split( array2, ossimString(":") );
+                     if ( array2.size() == 2 )
+                     {
+                        ossimString os = array2[0].downcase();
+                        if ( os.contains( ossimString("null") ) )
+                        {
+                           if ( array2[1].size() )
+                           {
+                              theNullSampleValue = array2[1].toFloat64(); 
+                              nullFound = true;
+                           }
+                        }
+                     }
+                  }
+
+                  // min
+                  array2.clear();
+                  array[1].split( array2, ossimString(":") );
+                  if ( array2.size() == 2 )
+                  {  
+                     ossimString os = array2[0].downcase();
+                     if ( os.contains( ossimString("min") ) )
+                     {
+                        if ( array2[1].size() )
+                        {
+                           theMinSampleValue = array2[1].toFloat64();
+                        }
+                     }
+                  }
+
+                  // Skipping average.
+
+                  // max
+                  array2.clear();
+                  array[3].split( array2, ossimString(":") );
+                  if ( array2.size() == 2 )
+                  {
+                     ossimString os = array2[0].downcase();
+                     if ( os.contains( ossimString("max") ) )
+                     {
+                        if ( array2[1].size() )
+                        {
+                           array2[1].trim( ossimString("|") );
+                           theMaxSampleValue = array2[1].toFloat64();   
+                        }
+                     }
+                  }
+               }
+            }
+         }
+      }
+   }
+}
+
+#if 0
+ossimImageGeometry* ossimTiffTileSource::getImageGeometry()
+{
+   //---
+   // Call base class getImageGeometry which will check for external geometry
+   // or an already set geometry.
+   //---
+   ossimImageGeometry* result = ossimImageHandler::getImageGeometry();
+
+   if (result)
+   {
+      //---
+      // TODO: Add transform from tags.
+      //---
+
+      
+      // if ( !result->getTransform() )
+      // {
+      //    if ( transform.valid() )
+      //    {
+      //       result->setTransform( transform.get() );
+      //    }
+      // }
+      //else
+      //{
+      //   ossimImageGeometryRegistry::instance()->createTransform(this);
+      //}
+      
+      if ( !result->getProjection() )
+      {
+         // Get the projection from the tags.
+         
+         ossimRefPtr<ossimProjection> proj = 0;
+
+         if (theTiffPtr)
+         {
+            ossimGeoTiff geotiff;
+
+            //---
+            // Note: must pass false to readTags so it doesn't close our
+            // tiff pointer.
+            //---
+            geotiff.readTags(theTiffPtr, getCurrentEntry(), false);
+            ossimKeywordlist kwl;
+            if(geotiff.addImageGeometry(kwl))
+            {
+               proj = ossimProjectionFactoryRegistry::instance()->
+                  createProjection(kwl);
+            }
+            
+            if ( proj.valid() )
+            {
+               result->setProjection( proj.get() );
+            }
+            //else
+            //{
+            // ossimImageGeometryRegistry::instance()->createProjection(this);
+            //}
+         }
+      }
+      
+   } // matches: if (result)
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimTiffTileSource::createImageGeometry DEBUG:\n";
+
+      if (result)
+      {
+         result->print(ossimNotify(ossimNotifyLevel_DEBUG)) << "\n";
+      }
+   }
+
+   return result;
+}
+#endif
+
+bool ossimTiffTileSource::isPowerOfTwoDecimation(ossim_uint32 level) const
+{
+   // Check size of this level against last level to see if it's half the previous.
+   bool result = false;
+   if ( (level > 0) && ( theImageWidth.size() > level ) && ( theImageLength.size() > level ) )
+   {
+      ossim_uint32 i = level-1; // previous level
+      
+      if ( ( ( theImageWidth[i]/2 == theImageWidth[level] ) ||
+             ( (theImageWidth[i]+1)/2 == theImageWidth[level] ) ) &&
+           ( ( theImageLength[i]/2 == theImageLength[level] ) ||
+             ( (theImageLength[i]+1)/2 == theImageLength[level] ) ) )
+      {
+         result = true;
+      }
+   }
+   return result;
+}
+
+void ossimTiffTileSource::allocateTile()
+{
+   theTile = 0;
+   ossim_uint32 bands = 0;
+   if ( theOutputBandList.empty() )
+   {
+      bands = getNumberOfOutputBands();
+   }
+   else
+   {
+      bands = theOutputBandList.size();
+   }
+
+   if ( bands )
+   {
+      theTile = ossimImageDataFactory::instance()->create( this, getOutputScalarType(), bands );
+      if ( theTile.valid() )
+      {
+         theTile->initialize();
+         
+         // The width and height mus be set prior to call to allocateBuffer.
+         theCurrentTileWidth  = theTile->getWidth();
+         theCurrentTileHeight = theTile->getHeight();
+      }
+   }
+}
+
+bool ossimTiffTileSource::allocateBuffer()
+{
+   bool bSuccess = true;
+   // Allocate memory for a buffer to hold data grabbed from the tiff file.
+   ossim_uint32 buffer_size=0;
+   switch (theReadMethod[theCurrentDirectory])
+   {
+      case READ_RGBA_U8_TILE:
+      {
+         buffer_size = theImageTileWidth[theCurrentDirectory]*
+            theImageTileWidth[theCurrentDirectory]*theBytesPerPixel*4;
+         break;
+      }  
+      case READ_TILE:
+      {
+         if (thePlanarConfig[theCurrentDirectory] == PLANARCONFIG_CONTIG)
+         {
+            buffer_size = theImageTileWidth[theCurrentDirectory] *
+               theImageTileLength[theCurrentDirectory] *
+               theBytesPerPixel * theSamplesPerPixel;
+         }
+         else
+         {
+            buffer_size = theImageTileWidth[theCurrentDirectory] *
+               theImageTileLength[theCurrentDirectory] *
+               theBytesPerPixel;
+         }
+         break;
+      }  
+      case READ_RGBA_U8_STRIP:
+      case READ_RGBA_U8A_STRIP:
+      {
+         buffer_size = theImageWidth[0]*theRowsPerStrip[theCurrentDirectory]*
+            theBytesPerPixel*4;
+         break;
+      } 
+      case READ_U16_STRIP:
+      {
+//         std::cout << "DOING READ_U16_STRIP\n";
+         // Encountered case where it was multiple rows per strip, yet PLANARCONFIG_CONTIG. The
+         // case was in fact single band so planar config is irrelevant. (OLK July 2015)
+         
+         // I put the multiplication back in for the theSamplesPerPixel.  In the read method that is used for this
+         // it populates this buffer with all bands and then uses the load method on the image data object.
+         // so all bands has to be populated for the buffer. (GCP Sept 2015)
+         buffer_size = theImageWidth[0]*theRowsPerStrip[theCurrentDirectory]*theBytesPerPixel*
+                       theSamplesPerPixel;
+//         std::cout << "ROWS PER STRIP: " << theRowsPerStrip[theCurrentDirectory] << "\n"
+//                   << "ImageWidth:     " << theImageWidth[0] << "\n"
+//                   << "BytesPerPixel:  " << theBytesPerPixel << "\n";
+//         std::cout << thePlanarConfig[theCurrentDirectory] << " ==== " << PLANARCONFIG_CONTIG << "\n";
+
+         // I commented this out for this is core dumping for one of the tiff images. (GCP Sept 2015)
+        // if (thePlanarConfig[theCurrentDirectory] == PLANARCONFIG_CONTIG)
+          //  buffer_size *= theSamplesPerPixel;
+         break;
+      }
+      case READ_SCAN_LINE:
+      {
+#if OSSIM_BUFFER_SCAN_LINE_READS
+         // Buffer a image width by tile height.
+         buffer_size = theImageWidth[0] * theBytesPerPixel *
+            theSamplesPerPixel * theCurrentTileHeight;
+#else
+         buffer_size = theImageWidth[0] * theBytesPerPixel * theSamplesPerPixel;
+#endif
+         break;
+      }
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "Unknown read method!" << endl;
+         print(ossimNotify(ossimNotifyLevel_WARN));
+         bSuccess = false;
+      }
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimTiffTileSource::allocateBuffer DEBUG:"
+         << "\nbuffer_size:  " << buffer_size
+         << endl;
+   }
+
+   theBufferRect.makeNan();
+   theBufferRLevel = theCurrentDirectory;
+
+   if ( bSuccess && ( buffer_size != theBufferSize ) )
+   {
+      theBufferSize = buffer_size;
+      if (theBuffer)
+      {
+         delete [] theBuffer;
+      }
+
+      // ESH 05/2009 -- Fix for ticket #738:  
+      // image_info crashing on aerial_ortho image during ingest
+      try
+      {
+         theBuffer = new ossim_uint8[buffer_size];
+      }
+      catch(...)
+      {
+         theBuffer = 0;
+         bSuccess = false;
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimTiffTileSource::allocateBuffer WARN:"
+               << "\nNot enough memory: buffer_size:  " << buffer_size
+               << endl;
+         }
+      }
+   }
+
+   return bSuccess;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimTiffWriter.cpp b/ossim/src/ossim/imaging/ossimTiffWriter.cpp
new file mode 100644
index 0000000..da321c0
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimTiffWriter.cpp
@@ -0,0 +1,1741 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Frank Warmerdam (warmerda at home.com)
+//
+//*******************************************************************
+//  $Id: ossimTiffWriter.cpp 22942 2014-11-02 20:39:27Z gpotts $
+
+#include <ossim/ossimConfig.h>
+#include <ossim/imaging/ossimTiffWriter.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimNumericProperty.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimBooleanProperty.h>
+#include <ossim/base/ossimFilenameProperty.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimMapProjectionInfo.h>
+#include <ossim/imaging/ossimImageChain.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/projection/ossimUtmProjection.h>
+#include <ossim/projection/ossimEpsgProjectionDatabase.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/projection/ossimStatePlaneProjectionInfo.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimFilenameProperty.h>
+#include <ossim/support_data/ossimGeoTiff.h>
+#include <ossim/imaging/ossimMemoryImageSource.h>
+#include <ossim/imaging/ossimScalarRemapper.h>
+
+#include <tiffio.h>
+#ifdef OSSIM_HAS_GEOTIFF
+#  if OSSIM_HAS_GEOTIFF
+#    include <xtiffio.h>
+#    include <geotiff.h>
+#    include <geo_normalize.h>
+#    include <geovalues.h>
+#  endif
+#endif
+
+#include <algorithm>
+#include <sstream>
+
+static ossimTrace traceDebug("ossimTiffWriter:debug");
+static const char* TIFF_WRITER_OUTPUT_TILE_SIZE_X_KW = "output_tile_size_x";
+static const char* TIFF_WRITER_OUTPUT_TILE_SIZE_Y_KW = "output_tile_size_y";
+static const int   PCS_BRITISH_NATIONAL_GRID = 27700;
+static const long  DEFAULT_JPEG_QUALITY = 75;
+
+RTTI_DEF1(ossimTiffWriter, "ossimTiffWriter", ossimImageFileWriter);
+
+#ifdef OSSIM_ID_ENABLED
+static const char OSSIM_ID[] = "$Id: ossimTiffWriter.cpp 22942 2014-11-02 20:39:27Z gpotts $";
+#endif
+
+ossimTiffWriter::ossimTiffWriter()
+   :
+      ossimImageFileWriter(),
+      theTif(NULL),
+      theCompressionType("none"),
+      theJpegQuality(DEFAULT_JPEG_QUALITY),
+      theOutputGeotiffTagsFlag(true),
+      theColorLutFlag(false),
+      theProjectionInfo(NULL),
+      theOutputTileSize(OSSIM_DEFAULT_TILE_WIDTH, OSSIM_DEFAULT_TILE_HEIGHT),
+      theForceBigTiffFlag(false),
+      theBigTiffFlag(false)
+{
+   theColorLut = new ossimNBandLutDataObject();
+   ossim::defaultTileSize(theOutputTileSize);
+   theOutputImageType = "tiff_tiled_band_separate";
+
+   
+#ifdef OSSIM_ID_ENABLED /* to quell unused variable warning. */
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)<< "OSSIM_ID:  " << OSSIM_ID << endl;
+   }
+#endif
+}
+
+ossimTiffWriter::~ossimTiffWriter()
+{
+   if(isOpen())
+   {
+      closeTiff();
+   }
+}
+
+bool ossimTiffWriter::openTiff()
+{
+   static const char* MODULE = "ossimTiffWriter::openTiff()";
+
+   bool status = false;
+   
+   // Close the existing file pointer.
+   closeTiff();
+
+   // Check for empty file name.
+   if ( theFilename.size() )
+   {
+      //---
+      // On windows libtiff can treat class tiff offsets as signed(2GB limit) or
+      // unsigned(4GB) so if even close to 2GB (2.1.47 GB) limit make a big tiff.
+      //---
+      const ossim_uint64 BIGTIFF_THRESHOLD = 2000000000;
+      ossimIrect bounds = theInputConnection->getBoundingRect();
+      ossim_uint64 byteCheck =
+         (static_cast<ossim_uint64>(bounds.width())*
+          static_cast<ossim_uint64>(bounds.height())*
+          static_cast<ossim_uint64>(theInputConnection->getNumberOfOutputBands())*
+          static_cast<ossim_uint64>(ossim::scalarSizeInBytes(theInputConnection->getOutputScalarType())));
+      
+      if( byteCheck > BIGTIFF_THRESHOLD )
+      {
+         theBigTiffFlag = true;
+      }
+      
+      ossimString openMode = "w";
+      if(theBigTiffFlag||theForceBigTiffFlag)
+      {
+         openMode += "8";
+      }
+      
+      // Open the new file.
+      theTif = XTIFFOpen( theFilename.c_str(), openMode.c_str() );
+      if ( theTif )
+      {
+         status = true;
+      }
+      else
+      {
+         setErrorStatus(); // base class
+         ossimSetError(getClassName().c_str(),
+                       ossimErrorCodes::OSSIM_ERROR,
+                       "File %s line %d Module %s Error:\n\
+Error opening file:  %s\n",
+                       __FILE__,
+                       __LINE__,
+                       MODULE,
+                       theFilename.c_str());
+      }
+   }
+   return status;
+}
+
+bool ossimTiffWriter::closeTiff()
+{
+   if (theTif)
+   {
+      XTIFFClose( (TIFF*)theTif );
+      theTif = NULL;
+   }
+   return true;
+}
+
+bool ossimTiffWriter::writeTiffTags()
+{
+   static const char MODULE[] = "ossimTiffWriter::writeTiffTags";
+   TIFF* tiffPtr = (TIFF*)theTif;
+   if (!tiffPtr)
+   {
+      setErrorStatus(); // base class
+      ossimSetError(getClassName().c_str(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "File %s line %d %s\nError:  Tiff pointer is null!\n\
+Call setFilename method.\n",
+                    __FILE__,
+                    __LINE__,
+                    MODULE);
+      return false;
+   }
+
+   //---
+   // NOTE:
+   // Since the tiff library uses the variable argument list function "va_arg"
+   // it is important to use the correct data type.  If in doubt see the
+   // code for libtiff's _TIFFVSetField in "tif_dir.c" in the libtiff package.
+   //---
+
+   int bitsPerSample  = 0;
+   int sampleFormat   = 0;
+   switch( theInputConnection->getOutputScalarType() )
+   {
+   case OSSIM_UINT8:
+      bitsPerSample = 8;
+      sampleFormat = SAMPLEFORMAT_UINT;
+      break;
+
+   case OSSIM_UINT16:
+   case OSSIM_USHORT11:
+      bitsPerSample = 16;
+      sampleFormat = SAMPLEFORMAT_UINT;
+      break;
+
+   case OSSIM_SINT16:
+      bitsPerSample = 16;
+      sampleFormat = SAMPLEFORMAT_INT;
+      break;
+
+   case OSSIM_FLOAT32:
+   case OSSIM_NORMALIZED_FLOAT:
+      bitsPerSample = 32;
+      sampleFormat = SAMPLEFORMAT_IEEEFP;
+      break;
+
+   case OSSIM_NORMALIZED_DOUBLE:
+   case OSSIM_FLOAT64:
+      bitsPerSample = 64;
+      sampleFormat = SAMPLEFORMAT_IEEEFP;
+      break;
+
+   default:
+      return false;
+   }
+
+   // Set the pixel type.
+   TIFFSetField( (TIFF*)tiffPtr, TIFFTAG_BITSPERSAMPLE, bitsPerSample );
+   TIFFSetField( (TIFF*)tiffPtr, TIFFTAG_SAMPLEFORMAT, sampleFormat );
+
+   // Set the image dimensions.
+   ossim_uint32  width  = theAreaOfInterest.width();
+   ossim_uint32  height = theAreaOfInterest.height();
+   TIFFSetField( tiffPtr, TIFFTAG_IMAGEWIDTH, width);
+   TIFFSetField( tiffPtr, TIFFTAG_IMAGELENGTH, height);
+   if (isTiled())
+   {
+      ossim_uint32 tileXSize = theOutputTileSize.x;
+      ossim_uint32 tileYSize = theOutputTileSize.y;
+      TIFFSetField(tiffPtr, TIFFTAG_TILEWIDTH,  tileXSize);
+      TIFFSetField(tiffPtr, TIFFTAG_TILELENGTH, tileYSize);
+   }
+   else
+   {
+      TIFFSetField(tiffPtr, TIFFTAG_ROWSPERSTRIP, ossim_uint32(1));
+   }
+
+   ossim_uint32 numberOfBands = theInputConnection->getNumberOfOutputBands();
+
+   // Set the min/max values.
+   std::vector<ossim_float64> minBand(numberOfBands);
+   std::vector<ossim_float64> maxBand(numberOfBands);
+   for(ossim_uint32 idx = 0; idx < numberOfBands; ++idx)
+   {
+      maxBand[idx] = theInputConnection->getMaxPixelValue(idx);
+      minBand[idx] = theInputConnection->getMinPixelValue(idx);
+   }
+   
+   writeMinMaxTags(minBand, maxBand);
+   
+   // Set the planar configuration.
+   if ( (theOutputImageType == "tiff_strip") ||
+        (theOutputImageType == "tiff_tiled") ||
+        (theOutputImageType == "image/tiff") ||
+        (theOutputImageType == "image/tif") ||
+        (theOutputImageType == "image/gtif") ||
+        (theOutputImageType == "image/gtiff") )
+   {
+      TIFFSetField( tiffPtr, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
+   }
+   else
+   {
+      TIFFSetField( tiffPtr, TIFFTAG_PLANARCONFIG, PLANARCONFIG_SEPARATE);
+   }
+
+   // Set the compression type:
+   uint16 tiffCompressType = COMPRESSION_NONE;
+   theCompressionType.downcase();
+   if( theCompressionType == "jpeg")
+   {
+      tiffCompressType  = COMPRESSION_JPEG;
+      // Set the jpeg quality.
+      // note the compression type must be set before the quality or you will get an error
+    TIFFSetField( tiffPtr, TIFFTAG_COMPRESSION, tiffCompressType);
+    TIFFSetField( tiffPtr, TIFFTAG_JPEGQUALITY,  theJpegQuality);
+   }
+   else if(theCompressionType == "packbits")
+   {
+      tiffCompressType = COMPRESSION_PACKBITS;
+      TIFFSetField( tiffPtr, TIFFTAG_COMPRESSION, tiffCompressType);
+   }
+   else if((theCompressionType == "deflate") ||
+           (theCompressionType == "zip"))
+   {
+      tiffCompressType  = COMPRESSION_DEFLATE;
+      TIFFSetField( tiffPtr, TIFFTAG_COMPRESSION, tiffCompressType);
+   }
+   TIFFSetField(tiffPtr, TIFFTAG_SAMPLESPERPIXEL, (int)theInputConnection->getNumberOfOutputBands());
+
+   ossimScalarType scalarType = theInputConnection->getOutputScalarType();
+   bool lutEnabled = (theColorLutFlag&&
+                      ((scalarType == OSSIM_UINT8)||
+                       (scalarType == OSSIM_UINT16)||
+                       (scalarType == OSSIM_USHORT11))&&
+                      (theColorLut->getNumberOfEntries() > 0)&&
+                      (theInputConnection->getNumberOfOutputBands() == 1));
+   if(lutEnabled)
+   {
+      TIFFSetField( tiffPtr, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE );
+      TIFFSetField( tiffPtr, TIFFTAG_INDEXED, (ossim_uint16)1);
+
+      if(scalarType == OSSIM_UINT8)
+      {
+         ossim_uint16 r[256], g[256], b[256];
+         
+         memset(r, '\0', sizeof(ossim_uint16)*256);
+         memset(g, '\0', sizeof(ossim_uint16)*256);
+         memset(b, '\0', sizeof(ossim_uint16)*256);
+         
+         for(ossim_uint32 i = 0; i < theColorLut->getNumberOfEntries(); i++)
+         {
+            r[i] = (ossim_uint16) (((*theColorLut)[i][0]/255.0)*65535);
+            g[i] = (ossim_uint16) (((*theColorLut)[i][1]/255.0)*65535);
+            b[i] = (ossim_uint16) (((*theColorLut)[i][2]/255.0)*65535);
+         }
+         TIFFSetField(tiffPtr, TIFFTAG_COLORMAP, r, g ,b);
+      }
+      else
+      {
+         ossim_uint16 r[65536], g[65536], b[65536];
+         memset(r, '\0', sizeof(ossim_uint16)*65536);
+         memset(g, '\0', sizeof(ossim_uint16)*65536);
+         memset(b, '\0', sizeof(ossim_uint16)*65536);
+         
+         for(ossim_uint32 i = 0; i < theColorLut->getNumberOfEntries(); i++)
+         {
+            r[i] = (ossim_uint16) ((*theColorLut)[i][0]);
+            g[i] = (ossim_uint16) ((*theColorLut)[i][1]);
+            b[i] = (ossim_uint16) ((*theColorLut)[i][2]);
+         }
+         TIFFSetField(tiffPtr, TIFFTAG_COLORMAP, r, g ,b);
+      }
+   }
+   else if( (theInputConnection->getNumberOfOutputBands() == 3 ||
+             theInputConnection->getNumberOfOutputBands() == 4 ||
+             (thePhotoMetric == "rgb"))&&
+            (scalarType == OSSIM_UCHAR))
+   {
+      TIFFSetField( tiffPtr, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB );
+   }
+   else
+   {
+      TIFFSetField( tiffPtr, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK );
+   }
+
+   return true;
+}
+
+bool ossimTiffWriter::writeGeotiffTags(ossimRefPtr<ossimMapProjectionInfo> projectionInfo)
+{
+   TIFF* tiffPtr = (TIFF*)theTif;
+   bool result = false;
+   if ( tiffPtr )
+   {
+      if ( projectionInfo.valid() )
+      {
+         result = ossimGeoTiff::writeTags(tiffPtr, projectionInfo);
+      }
+   }
+   return result;
+}
+
+void ossimTiffWriter::checkColorLut()
+{
+   
+   // this code appears to be wrong.  We can only do an outo lut if the immediate input to the sequencer is 
+   // a handler with a lut or some kind of lut source.
+   // 
+   // I think that we should add a flag to enable auto setting of the lut instead of just doing it. This code causes core
+   // dumps if one is to replicate bands with a band selector where a lut is a single band output like a CIB
+   //
+   // I currenlty have to disable
+   //
+   
+   
+#if 0
+   bool needColorLut = false;
+   bool needLoop = true;
+   ossimRefPtr<ossimNBandLutDataObject> colorLut = 0;
+   ossimConnectableObject::ConnectableObjectList imageInputs = theInputConnection->getInputList();
+   if (imageInputs.size() > 0)
+   {
+      for (ossim_uint32 i = 0; i < imageInputs.size(); i++)
+      {
+         if (needLoop == false)
+         {
+            break;
+         }
+         ossimImageChain* source = PTR_CAST(ossimImageChain, imageInputs[i].get());
+         if (source)
+         {
+            ossimConnectableObject::ConnectableObjectList imageChains = source->getInputList();
+            for (ossim_uint32 j = 0; j < imageChains.size(); j++)
+            {
+               if (needLoop == false)
+               {
+                  break;
+               }
+               ossimImageChain* imageChain = PTR_CAST(ossimImageChain, imageChains[j].get());
+               if (imageChain)
+               {
+                  ossimConnectableObject::ConnectableObjectList imageHandlers =
+                     imageChain->findAllObjectsOfType(STATIC_TYPE_INFO(ossimImageHandler), false);
+                  
+                  for (ossim_uint32 h= 0; h < imageHandlers.size(); h++)
+                  {
+                     ossimImageHandler* handler =
+                        PTR_CAST(ossimImageHandler, imageHandlers[h].get());
+                     if (handler)
+                     {
+                        if (handler->getLut() != 0) //
+                        {
+                           colorLut = handler->getLut();
+                           needColorLut = true;
+                        }
+                        else //if not all handlers have color luts, ignore the color lut.
+                        {
+                           needColorLut = false;
+                           needLoop = false;
+                           break;
+                        }
+                     }
+                  }
+               }
+            }
+         }
+      }
+   }
+   
+   if (needColorLut && colorLut != 0)
+   {
+      setLut(*colorLut.get());
+   }
+#endif
+}
+
+bool ossimTiffWriter::writeFile()
+
+{
+   static const char MODULE[] = "ossimTiffWriter::writeFile";
+
+   if (traceDebug()) CLOG << "Entered..." << std::endl;
+
+   //checkColorLut();
+
+   if(isLutEnabled())
+   {
+      theNBandToIndexFilter = new ossimNBandToIndexFilter;
+      theNBandToIndexFilter->connectMyInputTo(0, theInputConnection->getInput());
+      theNBandToIndexFilter->setLut(*theColorLut.get());
+      theNBandToIndexFilter->initialize();
+      theInputConnection->disconnect();
+      theInputConnection->connectMyInputTo(0, theNBandToIndexFilter.get());
+      theInputConnection->initialize();
+   }
+   else
+   {
+      theNBandToIndexFilter = 0;
+   }
+   
+   if (traceDebug() && theInputConnection.get())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << "DEBUG:"
+         << "\nnull:  " << theInputConnection->getNullPixelValue()
+         << "\nmin:   " << theInputConnection->getMinPixelValue()
+         << "\nmax:   " << theInputConnection->getMaxPixelValue()
+         << std::endl;
+   }
+   
+   if (isTiled())
+   {
+      if ( (theInputConnection->getTileWidth()  !=
+            static_cast<ossim_uint32>(theOutputTileSize.x)) ||
+           (theInputConnection->getTileHeight() !=
+            static_cast<ossim_uint32>(theOutputTileSize.y)) )
+      {
+         theInputConnection->setTileSize(theOutputTileSize);
+      }
+   }
+   
+   if(!theInputConnection->isMaster())
+   {
+      theInputConnection->slaveProcessTiles();
+
+      if(theNBandToIndexFilter.valid())
+      {
+         theInputConnection->connectMyInputTo(0, theNBandToIndexFilter->getInput());
+         theNBandToIndexFilter = 0;
+      }
+      
+      return true;
+   }
+
+   open();
+
+   if (!isOpen())
+   {
+      if (traceDebug())
+      {
+         CLOG << " ERROR:  Could not open!  Returning..." << std::endl;
+      }
+
+      return false;
+   }
+
+   if(!theInputConnection)
+   {
+      if (traceDebug())
+      {
+         CLOG << " ERROR:  No input connection!  Returning..." << std::endl;
+      }
+
+      return false;
+   }
+
+   // First write the tiff tags.
+   if (writeTiffTags() == false)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << " ERROR:"
+            << "\nError detected writing tiff tags.  Returning..." << std::endl;
+         return false;
+      }
+   }
+
+   // Write the geotiff tags.
+   if (theOutputGeotiffTagsFlag)
+   {
+      if(theViewController.get()) // let this override
+      {                     // found in ossimImageWriter base
+         ossimMapProjection* proj = PTR_CAST(ossimMapProjection,
+                                             theViewController->getView());
+         if(proj)
+         {
+            ossimRefPtr<ossimMapProjectionInfo> projectionInfo
+               = new ossimMapProjectionInfo(proj, theAreaOfInterest);
+            projectionInfo->setPixelType(thePixelType);
+
+            if (writeGeotiffTags(projectionInfo) == false)
+            {
+               if(traceDebug())
+               {
+                  ossimNotify(ossimNotifyLevel_DEBUG)
+                     << MODULE << " ERROR:"
+                     << "\nError detected writing geotiff tags.  Returning..."
+                     << std::endl;
+               }
+               return false;
+            }
+         }
+      }
+      else if(theProjectionInfo.valid())
+      {
+         theProjectionInfo->setPixelType(thePixelType);
+         if (writeGeotiffTags(theProjectionInfo) == false)
+         {
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << MODULE << " ERROR:"
+                  << "\nError detected writing geotiff tags.  Returning..."
+                  << std::endl;
+            }
+            return false;
+         }
+      }
+      else
+      {
+         // Fetch the map projection of the input image if it exists:
+         ossimMapProjection* mapProj = 0;
+         ossimRefPtr<ossimImageGeometry> imgGeom = theInputConnection->getImageGeometry();
+         if ( imgGeom.valid() )
+         {
+            const ossimProjection* proj = imgGeom->getProjection();
+            mapProj = PTR_CAST(ossimMapProjection, proj);
+         }
+         if(mapProj)
+         {
+            ossimRefPtr<ossimMapProjectionInfo> projectionInfo
+               = new ossimMapProjectionInfo(mapProj, theAreaOfInterest);
+
+            projectionInfo->setPixelType(thePixelType);
+            if (writeGeotiffTags(projectionInfo) == false)
+            {
+               if(traceDebug())
+               {
+                  ossimNotify(ossimNotifyLevel_DEBUG)
+                     << MODULE << " ERROR:"
+                     << "\nError detected writing geotiff tags.  Returning..."
+                     << std::endl;
+               }
+               return false;
+            }
+         }
+      }
+
+   } // End of "if (theOutputGeotiffTagsFlag)"
+
+   // Write the file with the image data.
+   bool status = false;
+   if(theOutputImageType == "tiff_strip")
+   {
+      status = writeToStrips();
+   }
+   else if(theOutputImageType == "tiff_strip_band_separate")
+   {
+      status = writeToStripsBandSep();
+   }
+   else if((theOutputImageType == "tiff_tiled")||
+           (ossimString::downcase(theOutputImageType) == "image/tiff")||
+           (ossimString::downcase(theOutputImageType) == "image/tif")||
+           (ossimString::downcase(theOutputImageType) == "image/gtif")||
+           (ossimString::downcase(theOutputImageType) == "image/gtiff"))
+   {
+      status = writeToTiles();
+   }
+   else if(theOutputImageType == "tiff_tiled_band_separate")
+   {
+      status = writeToTilesBandSep();
+   }
+   else
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << " ERROR:"
+            << "\nUnsupported output type:  " << theOutputImageType
+            << std::endl;
+      }
+   }
+
+   close();
+
+   if (traceDebug()) CLOG << " Exited..." << std::endl;
+
+   if(theNBandToIndexFilter.valid())
+   {
+      theInputConnection->connectMyInputTo(0, theNBandToIndexFilter->getInput());
+      theNBandToIndexFilter = 0;
+   }
+   
+   return status;
+}
+
+void ossimTiffWriter::setLut(const ossimNBandLutDataObject& lut)
+{
+   theColorLutFlag = true;
+   theColorLut = (ossimNBandLutDataObject*)lut.dup();
+}
+
+bool ossimTiffWriter::saveState(ossimKeywordlist& kwl,
+                                const char* prefix)const
+{
+   kwl.add(prefix,
+           "output_geotiff_flag",
+           (int)theOutputGeotiffTagsFlag,
+           true);
+
+   kwl.add(prefix,
+           TIFF_WRITER_OUTPUT_TILE_SIZE_X_KW,
+           theOutputTileSize.x,
+           true);
+
+   kwl.add(prefix,
+           TIFF_WRITER_OUTPUT_TILE_SIZE_Y_KW,
+           theOutputTileSize.y,
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::COMPRESSION_QUALITY_KW,
+           theJpegQuality,
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::COMPRESSION_TYPE_KW,
+           theCompressionType,
+           true);
+
+   kwl.add(prefix,
+           "color_lut_flag",
+           (ossim_uint32)theColorLutFlag,
+           true);
+
+   if(theColorLutFlag)
+   {
+      if(theLutFilename != "")
+      {
+         kwl.add(prefix,
+                 "lut_filename",
+                 theLutFilename.c_str(),
+                 true);
+      }
+      else
+      {
+         ossimString newPrefix = ossimString(prefix) + "lut.";
+         theColorLut->saveState(kwl, newPrefix.c_str());
+      }
+   }
+
+
+   return ossimImageFileWriter::saveState(kwl,
+                                          prefix);
+}
+
+bool ossimTiffWriter::loadState(const ossimKeywordlist& kwl,
+                                const char* prefix)
+{
+   const char *value;
+
+   ossimIpt defaultTileSize;
+   ossim::defaultTileSize(defaultTileSize);
+
+   value = kwl.find(prefix,
+                    TIFF_WRITER_OUTPUT_TILE_SIZE_X_KW);
+   if(value)
+   {
+      theOutputTileSize.x = ossimString(value).toLong();
+      if(theOutputTileSize.x<1)
+      {
+         theOutputTileSize.x = defaultTileSize.x;
+      }
+   }
+
+   value = kwl.find(prefix,
+                    TIFF_WRITER_OUTPUT_TILE_SIZE_Y_KW);
+   if(value)
+   {
+      theOutputTileSize.y = ossimString(value).toLong();
+      if(theOutputTileSize.y<1)
+      {
+         theOutputTileSize.y = defaultTileSize.y;
+      }
+   }
+
+
+   value = kwl.find(prefix, ossimKeywordNames::COMPRESSION_TYPE_KW);
+   if(value)
+   {
+      theCompressionType = ossimString(value).downcase();
+   }
+   else
+   {
+      theCompressionType = "none";
+   }
+
+   value = kwl.find(prefix, ossimKeywordNames::COMPRESSION_QUALITY_KW);
+   if(value)
+   {
+      setJpegQuality(ossimString(value).toLong());
+   }
+
+   value = kwl.find(prefix, ossimKeywordNames::PHOTOMETRIC_KW);
+   if(value)
+   {
+      thePhotoMetric = ossimString(value).downcase();
+   }
+
+   value = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
+   if(value)
+   {
+      setFilename(ossimFilename(value));
+   }
+
+   const char* flag = kwl.find(prefix, "output_geotiff_flag");
+   if(flag)
+   {
+      theOutputGeotiffTagsFlag = ossimString(flag).toBool();
+   }
+
+   ossimString newPrefix = ossimString(prefix) + "lut.";
+
+   const char* colorLutFlag = kwl.find(prefix, "color_lut_flag");
+   if(colorLutFlag)
+   {
+      theColorLutFlag = ossimString(colorLutFlag).toBool();
+   }
+   else
+   {
+      theColorLutFlag = false;
+   }
+   theLutFilename = ossimFilename(kwl.find(prefix, "lut_filename"));
+
+   theLutFilename = ossimFilename(theLutFilename.trim());
+   if(theLutFilename != "")
+   {
+      theColorLut->open(theLutFilename);
+   }
+   else
+   {
+      theColorLut->loadState(kwl, newPrefix.c_str());
+   }
+
+   if(ossimImageFileWriter::loadState(kwl,
+                                      prefix))
+   {
+      if((theOutputImageType!="tiff_tiled") &&
+         (theOutputImageType!="tiff_tiled_band_separate") &&
+         (theOutputImageType!="tiff_strip") &&
+         (theOutputImageType!="tiff_strip_band_separate")&&
+         (theOutputImageType!="image/tiff")&&
+         (theOutputImageType!="image/tif")&&
+         (theOutputImageType!="image/gtif")&&
+         (theOutputImageType!="image/gtiff"))
+      {
+
+         theOutputImageType = "tiff_tiled_band_separate";;
+      }
+   }
+   else
+   {
+      return false;
+   }
+
+   return true;
+}
+
+bool ossimTiffWriter::isTiled() const
+{
+   return ( theOutputImageType == "tiff_tiled" ||
+            theOutputImageType == "image/tiff" ||
+            theOutputImageType == "image/tif" ||
+            theOutputImageType == "image/gtif" ||
+            theOutputImageType == "image/gtiff" ||
+            theOutputImageType == "tiff_tiled_band_separate" );
+}
+
+bool ossimTiffWriter::writeToTiles()
+{
+   static const char* const MODULE = "ossimTiffWriter::writeToTiles";
+   TIFF* tiffPtr = (TIFF*)theTif;
+
+   if (traceDebug()) CLOG << " Entered." << std::endl;
+
+   // Start the sequence at the first tile.
+   theInputConnection->setToStartOfSequence();
+
+   ossimRefPtr<ossimImageData> tempTile = 0;
+
+   if(theColorLutFlag)
+   {
+      tempTile = ossimImageDataFactory::instance()->create(this, 1, theInputConnection.get());
+   }
+   else
+   {
+      tempTile = ossimImageDataFactory::instance()->create(this, theInputConnection.get());
+   }
+   if(tempTile.valid())
+   {
+      tempTile->initialize();
+   }
+   ossim_uint32 tilesWide       = theInputConnection->getNumberOfTilesHorizontal();
+   ossim_uint32 tilesHigh       = theInputConnection->getNumberOfTilesVertical();
+   ossim_uint32 tileWidth       = theInputConnection->getTileWidth();
+   ossim_uint32 tileHeight      = theInputConnection->getTileHeight();
+   ossim_uint32 numberOfTiles   = theInputConnection->getNumberOfTiles();
+
+   // Tile loop in the height direction.
+   ossim_uint32 tileNumber = 0;
+   vector<ossim_float64> minBands;
+   vector<ossim_float64> maxBands;
+   for(ossim_uint32 i = 0; ((i < tilesHigh)&&!needsAborting()); i++)
+   {
+      ossimIpt origin(0,0);
+      origin.y = i * tileHeight;
+
+      // Tile loop in the sample (width) direction.
+      for(ossim_uint32 j = 0; ((j < tilesWide)&&!needsAborting()); j++)
+      {
+         origin.x = j * tileWidth;
+
+         // Grab the tile.
+         ossimRefPtr<ossimImageData> id = theInputConnection->getNextTile();
+         if (!id)
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << " ERROR:"
+               << "Error returned writing tiff tile:  " << tileNumber
+               << "\nNULL Tile encountered"
+               << std::endl;
+            return false;
+         }
+
+         ossimDataObjectStatus  tileStatus      = id->getDataObjectStatus();
+         ossim_uint32           tileSizeInBytes = id->getSizeInBytes();
+         if (tileStatus != OSSIM_FULL)
+         {
+            // Clear out the buffer since it won't be filled all the way.
+            tempTile->setImageRectangle(id->getImageRectangle());
+            tempTile->makeBlank();
+         }
+
+         if ((tileStatus == OSSIM_PARTIAL || tileStatus == OSSIM_FULL))
+         {
+            // Stuff the tile into the tileBuffer.
+            id->unloadTile(tempTile->getBuf(),
+                           id->getImageRectangle(),
+                           OSSIM_BIP);
+            tempTile->setDataObjectStatus(id->getDataObjectStatus());
+            if(!theColorLutFlag&&!needsAborting())
+            {
+               id->computeMinMaxPix(minBands, maxBands);
+            }
+         }
+
+         //---
+         // Write the tile to disk.
+         //---
+         ossim_uint32 bytesWritten = 0;
+         bytesWritten = TIFFWriteTile(tiffPtr,
+                                      tempTile->getBuf(),
+                                      origin.x,
+                                      origin.y,
+                                      0,            // z
+                                      0);           // s
+
+         if (bytesWritten != tileSizeInBytes)
+         {
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << MODULE << " ERROR:"
+                  << "Error returned writing tiff tile:  " << i
+                  << "\nExpected bytes written:  " << tileSizeInBytes
+                  << "\nBytes written:  " << bytesWritten
+                  << std::endl;
+            }
+            setErrorStatus();
+            return false;
+         }
+
+         ++tileNumber;
+
+      } // End of tile loop in the sample (width) direction.
+
+      double tile = tileNumber;
+      double numTiles = numberOfTiles;
+      setPercentComplete(tile / numTiles * 100);
+
+   } // End of tile loop in the line (height) direction.
+
+   if(!theColorLutFlag&&!needsAborting())
+   {
+      writeMinMaxTags(minBands, maxBands);
+   }
+
+   if (traceDebug()) CLOG << " Exited." << std::endl;
+
+   return true;
+}
+
+bool ossimTiffWriter::writeToTilesBandSep()
+{
+   static const char* const MODULE = "ossimTiffWriter::writeToTilesBandSep";
+   TIFF* tiffPtr = (TIFF*)theTif;
+   if (traceDebug()) CLOG << " Entered." << std::endl;
+
+   // Start the sequence at the first tile.
+   theInputConnection->setToStartOfSequence();
+
+   ossim_uint32 bands     = theInputConnection->getNumberOfOutputBands();
+   ossim_uint32 tilesWide = theInputConnection->getNumberOfTilesHorizontal();
+   ossim_uint32 tilesHigh = theInputConnection->getNumberOfTilesVertical();
+   ossim_uint32 tileWidth     = theInputConnection->getTileWidth();
+   ossim_uint32 tileHeight    = theInputConnection->getTileHeight();
+   ossim_uint32 numberOfTiles = theInputConnection->getNumberOfTiles();
+
+#if 0
+   if(traceDebug())
+   {
+      ossimIrect   boundingRect  = theInputConnection->getBoundingRect();
+      ossimNotify(ossimNotifyLevel_NOTICE)
+         << "Bounding rect = " << boundingRect
+         << "\nBands         = " << bands
+         << "\ntilesWide     = " << tilesWide
+         << "\ntilesHigh     = " << tilesHigh
+         << "\ntileWidth     = " << tileWidth
+         << "\ntileHeight    = " << tileHeight << std::endl;
+   }
+#endif
+
+   ossim_uint32 tileNumber = 0;
+   vector<ossim_float64> minBands;
+   vector<ossim_float64> maxBands;
+   for(ossim_uint32 i = 0; ((i < tilesHigh)&&!needsAborting()); ++i)
+   {
+      ossimIpt origin;
+      origin.y = i * tileHeight;
+
+      //---
+      // Tile loop in the sample (width) direction.
+      //---
+      for(ossim_uint32 j = 0; ((j < tilesWide)&&!needsAborting()); ++j)
+      {
+         origin.x = j * tileWidth;
+
+         ossimRefPtr<ossimImageData> id = theInputConnection->getNextTile();
+	 if(!id)
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << " ERROR:"
+               << "Error returned writing tiff tile:  " << i
+               << "\nNULL Tile encountered"
+               << std::endl;
+            return false;
+         }
+	 ossim_int32 tileSizeInBytes = id->getSizePerBandInBytes();
+
+         if(!theColorLutFlag)
+         {
+            id->computeMinMaxPix(minBands, maxBands);
+         }
+
+         //---
+         // Band loop.
+         //---
+         for (ossim_uint32 band=0; ((band<bands)&&(!needsAborting())); ++band)
+         {
+            // Grab a pointer to the tile for the band.
+            tdata_t* data = (tdata_t*)id->getBuf(band);
+            // Write the tile.
+            tsize_t bytesWritten = 0;
+            if(data)
+            {
+               bytesWritten = TIFFWriteTile(tiffPtr,
+                                            data,
+                                            (ossim_uint32)origin.x,
+                                            (ossim_uint32)origin.y,
+                                            (ossim_uint32)0,        // z
+                                            (tsample_t)band);    // sample
+            }
+            if ( ( bytesWritten != tileSizeInBytes ) && !needsAborting() )
+            {
+               if(traceDebug())
+               {
+                  ossimNotify(ossimNotifyLevel_DEBUG)
+                     << MODULE << " ERROR:"
+                     << "Error returned writing tiff tile:  " << i
+                     << "\nExpected bytes written:  " << tileSizeInBytes
+                     << "\nBytes written:  " << bytesWritten
+                     << std::endl;
+               }
+               setErrorStatus();
+               return false;
+            }
+            
+         } // End of band loop.
+
+         ++tileNumber;
+
+      } // End of tile loop in the sample (width) direction.
+
+      double tile = tileNumber;
+      double numTiles = numberOfTiles;
+      setPercentComplete(tile / numTiles * 100);
+      if(needsAborting())
+      {
+         setPercentComplete(100);
+      }
+
+   } // End of tile loop in the line (height) direction.
+
+   if(!theColorLutFlag&&!needsAborting())
+   {
+      writeMinMaxTags(minBands, maxBands);
+   }
+    
+   if (traceDebug()) CLOG << " Exited." << std::endl;
+
+   return true;
+}
+
+bool ossimTiffWriter::writeToStrips()
+{
+   static const char* const MODULE = "ossimTiffWriter::writeToStrips";
+   TIFF* tiffPtr = (TIFF*)theTif;
+
+   if (traceDebug()) CLOG << " Entered." << std::endl;
+
+   // Start the sequence at the first tile.
+   theInputConnection->setToStartOfSequence();
+
+   ossim_uint32 bands = theInputConnection->getNumberOfOutputBands();
+   ossim_uint32 tilesWide = theInputConnection->getNumberOfTilesHorizontal();
+   ossim_uint32 tilesHigh = theInputConnection->getNumberOfTilesVertical();
+   ossim_uint32 tileHeight = theInputConnection->getTileHeight();
+   ossim_uint32 numberOfTiles = theInputConnection->getNumberOfTiles();
+   ossim_uint32 width = theAreaOfInterest.width();
+   ossim_uint32 bytesInLine =
+      ossim::scalarSizeInBytes(theInputConnection->getOutputScalarType()) *
+      width * bands;
+
+   //---
+   // Buffer to hold one line x tileHeight
+   //---
+   ossim_uint32 bufferSizeInBytes = bytesInLine * tileHeight;
+   unsigned char* buffer = new unsigned char[bufferSizeInBytes];
+
+   int tileNumber = 0;
+   vector<ossim_float64> minBands;
+   vector<ossim_float64> maxBands;
+   for(ossim_uint32 i = 0; ((i < tilesHigh)&&(!needsAborting())); ++i)
+   {
+      // Clear the buffer.
+      memset(buffer, 0, bufferSizeInBytes);
+
+      // Set the buffer rectangle.
+      ossimIrect bufferRect(theAreaOfInterest.ul().x,
+                            theAreaOfInterest.ul().y + i * tileHeight,
+                            theAreaOfInterest.ul().x + width - 1,
+                            theAreaOfInterest.ul().y + i * tileHeight +
+                            tileHeight - 1);
+
+      // Tile loop in the sample (width) direction.
+      for(ossim_uint32 j = 0; ((j < tilesWide)&&(!needsAborting())); ++j)
+      {
+         // Get the tile and copy it to the buffer.
+         ossimRefPtr<ossimImageData> id = theInputConnection->getNextTile();
+         if (!id)
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << " ERROR:"
+               << "Error returned writing tiff tile:  " << tileNumber
+               << "\nNULL Tile encountered"
+               << std::endl;
+            delete [] buffer;
+            return false;
+         }
+         id->unloadTile(buffer, bufferRect, OSSIM_BIP);
+         if(!theColorLutFlag&&!needsAborting())
+         {
+            id->computeMinMaxPix(minBands, maxBands);
+         }
+         ++tileNumber;
+      }
+
+      // Get the number of lines to write from the buffer.
+      ossim_uint32 linesToWrite = min(tileHeight, static_cast<ossim_uint32>(theAreaOfInterest.lr().y - bufferRect.ul().y + 1));
+
+      // Write the buffer out to disk.
+      ossim_uint32 row = static_cast<ossim_uint32>(bufferRect.ul().y -
+                                                   theAreaOfInterest.ul().y);
+      ossim_uint8* buf = buffer;
+      for (ossim_uint32 ii=0; ((ii<linesToWrite)&&(!needsAborting())); ++ii)
+      {
+         ossim_int32 status = TIFFWriteScanline(tiffPtr,
+                                                buf,
+                                                row,
+                                                0);
+         if (status == -1)
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << " ERROR:"
+               << "Error returned writing tiff scanline:  " << row
+               << std::endl;
+            setErrorStatus();
+            delete [] buffer;
+            return false;
+         }
+
+         ++row;  // Increment the line number.
+         buf += bytesInLine;
+
+      } // End of loop to write lines from buffer to tiff file.
+
+      double tile = tileNumber;
+      double numTiles = numberOfTiles;
+      setPercentComplete(tile / numTiles * 100);
+      if(needsAborting())
+      {
+         setPercentComplete(100);
+      }
+
+   } // End of loop in the line (height) direction.
+
+   if(!theColorLutFlag)
+   {
+      writeMinMaxTags(minBands, maxBands);
+   }
+   
+   // Free the memory.
+   delete [] buffer;
+
+   if (traceDebug()) CLOG << " Exited." << std::endl;
+
+   return true;
+}
+
+bool ossimTiffWriter::writeToStripsBandSep()
+{
+   static const char* const MODULE = "ossimTiffWriter::writeToStripsBandSep";
+   TIFF* tiffPtr = (TIFF*)theTif;
+
+   if (traceDebug()) CLOG << " Entered." << std::endl;
+
+   // Start the sequence at the first tile.
+   theInputConnection->setToStartOfSequence();
+
+   ossim_uint32 bands = theInputConnection->getNumberOfOutputBands();
+   ossim_uint32 tilesWide = theInputConnection->getNumberOfTilesHorizontal();
+   ossim_uint32 tilesHigh = theInputConnection->getNumberOfTilesVertical();
+   ossim_uint32 tileHeight      = theInputConnection->getTileHeight();
+   ossim_uint32 numberOfTiles   = theInputConnection->getNumberOfTiles();
+   ossim_uint32 width           = theAreaOfInterest.width();
+   ossim_uint32 bytesInLine     =
+      ossim::scalarSizeInBytes(theInputConnection->getOutputScalarType()) *
+      width;
+
+   //---
+   // Buffer to hold one line x tileHeight
+   //---
+   ossim_uint32 bufferSizeInBytes = bytesInLine * tileHeight * bands;
+
+   unsigned char* buffer = new unsigned char[bufferSizeInBytes];
+
+   // Tile loop in height direction.
+   ossim_uint32 tileNumber = 0;
+   vector<ossim_float64> minBands;
+   vector<ossim_float64> maxBands;
+   for(ossim_uint32 i = 0; ((i < tilesHigh)&&(!needsAborting())); ++i)
+   {
+      // Clear the buffer.
+      memset(buffer, 0, bufferSizeInBytes);
+
+      // Set the buffer rectangle.
+      ossimIrect bufferRect(theAreaOfInterest.ul().x,
+                            theAreaOfInterest.ul().y + i * tileHeight,
+                            theAreaOfInterest.ul().x + width - 1,
+                            theAreaOfInterest.ul().y + i * tileHeight +
+                            tileHeight - 1);
+
+      // Tile loop in the sample (width) direction.
+      for(ossim_uint32 j = 0; ((j < tilesWide)&&(!needsAborting())); ++j)
+      {
+         // Get the tile and copy it to the buffer.
+         ossimRefPtr<ossimImageData> id = theInputConnection->getNextTile();
+         if (!id)
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << " ERROR:"
+               << "Error returned writing tiff tile:  " << tileNumber
+               << "\nNULL Tile encountered"
+               << std::endl;
+            delete [] buffer;
+            return false;
+         }
+         id->unloadTile(buffer, bufferRect, OSSIM_BIL);
+         if(!theColorLutFlag)
+         {
+            id->computeMinMaxPix(minBands, maxBands);
+         }
+         ++tileNumber;
+      }
+
+      // Get the number of lines to write from the buffer.
+      ossim_uint32 linesToWrite = min(tileHeight, static_cast<ossim_uint32>(theAreaOfInterest.lr().y - bufferRect.ul().y + 1));
+
+      // Write the buffer out to disk.
+      ossim_uint32 row = static_cast<ossim_uint32>(bufferRect.ul().y -
+                                       theAreaOfInterest.ul().y);
+      ossim_uint8* buf = buffer;
+      for (ossim_uint32 ii=0; ((ii<linesToWrite)&&(!needsAborting())); ++ii)
+      {
+         for (ossim_uint32 band =0; ((band<bands)&&(!needsAborting())); ++band)
+         {
+            ossim_int32 status = TIFFWriteScanline(tiffPtr,
+                                                   buf,
+                                                   row,
+                                                   band);
+            if (status == -1)
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << MODULE << " ERROR:"
+                  << "Error returned writing tiff scanline:  " << row
+                  << std::endl;
+               delete [] buffer;
+               return false;
+            }
+            buf += bytesInLine;
+         }
+
+         ++row;  // Increment the line number.
+
+      } // End of loop to write lines from buffer to tiff file.
+
+      double tile = tileNumber;
+      double numTiles = numberOfTiles;
+      setPercentComplete(tile / numTiles * 100);
+      if(needsAborting())
+      {
+         setPercentComplete(100);
+      }
+   } // End of loop in the line (height) direction.
+
+   if(!theColorLutFlag)
+   {
+      writeMinMaxTags(minBands, maxBands);
+   }
+
+   // Free the memory.
+   delete [] buffer;
+
+   if (traceDebug()) CLOG << " Exited." << std::endl;
+
+   return true;
+}
+
+void ossimTiffWriter::setTileSize(const ossimIpt& tileSize)
+{
+   if ( (tileSize.x % 16) || (tileSize.y % 16) )
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimTiffWriter::changeTileSize ERROR:"
+            << "\nTile size must be a multiple of 32!"
+            << "\nSize remains:  " << theOutputTileSize
+            << std::endl;
+      }
+      return;
+   }
+
+   theOutputTileSize = tileSize;
+}
+
+void ossimTiffWriter::writeMinMaxTags(const vector<ossim_float64>& minBand,
+                                      const vector<ossim_float64>& maxBand)
+{
+   TIFF* tiffPtr = (TIFF*)theTif;
+   if(minBand.size() && maxBand.size())
+   {
+      ossim_float64 minValue =
+         *std::min_element(minBand.begin(), minBand.end());
+      ossim_float64 maxValue =
+         *std::max_element(maxBand.begin(), maxBand.end());
+
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimTiffWriter::writeMinMaxTags DEBUG:"
+            << "\nminValue:  " << minValue
+            << "\nmaxValue:  " << maxValue
+            << std::endl;
+      }
+
+      switch( theInputConnection->getOutputScalarType() )
+      {
+         case OSSIM_USHORT11:
+         {
+            TIFFSetField( tiffPtr, TIFFTAG_MINSAMPLEVALUE,
+                          static_cast<ossim_sint16>(0) );
+            TIFFSetField( tiffPtr, TIFFTAG_MAXSAMPLEVALUE,
+                          static_cast<ossim_sint16>(2047) );
+            break;
+         }
+         case OSSIM_UINT8:
+         case OSSIM_UINT16:
+         {
+            TIFFSetField( tiffPtr, TIFFTAG_MINSAMPLEVALUE,
+                          static_cast<ossim_sint16>(minValue) );
+            TIFFSetField( tiffPtr, TIFFTAG_MAXSAMPLEVALUE,
+                          static_cast<ossim_sint16>(maxValue) );
+            break;
+         }
+         
+         case OSSIM_SINT16: 
+         case OSSIM_UINT32:
+         case OSSIM_FLOAT32:
+         case OSSIM_FLOAT64:
+         case OSSIM_NORMALIZED_FLOAT:
+         case OSSIM_NORMALIZED_DOUBLE:
+         {
+            TIFFSetField( tiffPtr, TIFFTAG_SMINSAMPLEVALUE,
+                          static_cast<ossim_float32>(minValue) );
+            TIFFSetField( tiffPtr, TIFFTAG_SMAXSAMPLEVALUE,
+                          static_cast<ossim_float32>(maxValue) );
+            break;
+         }
+         default:
+         {
+            break;
+         }
+      }
+   }
+}
+
+void ossimTiffWriter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property)
+   {
+      return;
+   }
+
+   if(property->getName() == ossimKeywordNames::COMPRESSION_QUALITY_KW)
+   {
+//       ossimNumericProperty* numericProperty = PTR_CAST(ossimNumericProperty,
+//                                                        property.get());
+//       if (numericProperty)
+//       {
+      setJpegQuality( property->valueToString().toInt32() );
+//       }
+   }
+   else if (property->getName() == ossimKeywordNames::COMPRESSION_TYPE_KW)
+   {
+      ossimStringProperty* stringProperty = PTR_CAST(ossimStringProperty,
+                                                     property.get());
+      if (stringProperty)
+      {
+         ossimString s;
+         stringProperty->valueToString(s);
+         setCompressionType(s);
+      } 
+   }
+   else if(property->getName() == "lut_file")
+   {
+      theLutFilename = ossimFilename(property->valueToString());
+      theColorLut->open(theLutFilename);
+   }
+   else if(property->getName() == "color_lut_flag")
+   {
+      theColorLutFlag = property->valueToString().toBool();
+   }
+   else if(property->getName() == "big_tiff_flag")
+   {
+      theForceBigTiffFlag = property->valueToString().toBool();
+   }
+   else if(property->getName() == ossimKeywordNames::OUTPUT_TILE_SIZE_KW)
+   {
+      theOutputTileSize.x = property->valueToString().toInt32();
+      theOutputTileSize.y =  theOutputTileSize.x;
+   }
+   else
+   {
+      ossimImageFileWriter::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimTiffWriter::getProperty(const ossimString& name)const
+{
+   ossimRefPtr<ossimProperty> prop = 0;
+   
+   if (name == "Filename")
+   {
+      prop = ossimImageFileWriter::getProperty(name);
+      if ( prop.valid() )
+      {
+         ossimRefPtr<ossimFilenameProperty> filenameProp = PTR_CAST(ossimFilenameProperty,
+                                                                    prop.get());
+         if ( filenameProp.valid() )
+         {
+            filenameProp->addFilter("*.tif");
+         }
+         prop = filenameProp.get();
+      }
+   }
+   else if (name == ossimKeywordNames::COMPRESSION_QUALITY_KW)
+   {
+      ossimRefPtr<ossimNumericProperty> numericProp =
+         new ossimNumericProperty(name,
+                                  ossimString::toString(theJpegQuality),
+                                  1.0,
+                                  100.0);
+      numericProp->setNumericType(ossimNumericProperty::ossimNumericPropertyType_INT);
+      prop = numericProp.get();
+   }
+   else if (name == ossimKeywordNames::COMPRESSION_TYPE_KW)
+   {
+      ossimRefPtr<ossimStringProperty> stringProp =
+         new ossimStringProperty(name,
+                                 getCompressionType(),
+                                 false); // editable flag
+      stringProp->addConstraint(ossimString("none"));
+      stringProp->addConstraint(ossimString("jpeg"));
+      stringProp->addConstraint(ossimString("packbits"));
+      stringProp->addConstraint(ossimString("deflate"));
+      stringProp->addConstraint(ossimString("zip"));      
+      prop = stringProp.get();
+   }
+   else if (name == "lut_file")
+   {
+      ossimRefPtr<ossimFilenameProperty> property =
+         new ossimFilenameProperty(name, theLutFilename);
+      property->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_INPUT);
+      
+      prop = property.get();
+   }
+   else if (name == "color_lut_flag")
+   {
+      prop = new ossimBooleanProperty(name, theColorLutFlag);
+   }
+   else if(name == "big_tiff_flag")
+   {
+       prop = new ossimBooleanProperty(name, theForceBigTiffFlag);
+   }
+   else if( name == ossimKeywordNames::OUTPUT_TILE_SIZE_KW )
+   {
+      ossimRefPtr<ossimStringProperty> stringProp =
+         new ossimStringProperty(name,
+                                 ossimString::toString(theOutputTileSize.x),
+                                 false); // editable flag
+      stringProp->addConstraint(ossimString("16"));
+      stringProp->addConstraint(ossimString("32"));
+      stringProp->addConstraint(ossimString("64"));
+      stringProp->addConstraint(ossimString("128"));
+      stringProp->addConstraint(ossimString("256"));      
+      stringProp->addConstraint(ossimString("512"));      
+      stringProp->addConstraint(ossimString("1024"));      
+      stringProp->addConstraint(ossimString("2048"));
+      prop = stringProp.get();
+   }
+   else
+   {
+      prop = ossimImageFileWriter::getProperty(name);
+   }
+   return prop;
+}
+
+void ossimTiffWriter::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   propertyNames.push_back(ossimString(
+                              ossimKeywordNames::COMPRESSION_QUALITY_KW));
+   propertyNames.push_back(ossimString(
+                              ossimKeywordNames::COMPRESSION_TYPE_KW));
+   propertyNames.push_back(ossimString("lut_file"));
+   propertyNames.push_back(ossimString("color_lut_flag"));
+   propertyNames.push_back(ossimString("big_tiff_flag"));
+   propertyNames.push_back(ossimString(ossimKeywordNames::OUTPUT_TILE_SIZE_KW));
+  
+   ossimImageFileWriter::getPropertyNames(propertyNames);
+}
+
+bool ossimTiffWriter::isOpen()const
+{
+   return (theTif!=NULL);
+}
+
+bool ossimTiffWriter::open()
+{
+   if(theTif)
+   {
+      closeTiff();
+   }
+   return openTiff();
+}
+
+void ossimTiffWriter::close()
+{
+   closeTiff();
+}
+
+void ossimTiffWriter::setJpegQuality(ossim_int32 quality)
+{
+   // Range 1 to 100 with 100 being best.
+   if (quality > 0 && quality < 101)
+   {
+      theJpegQuality = quality;
+   }
+   else
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimTiffWriter::setJpegQuality DEBUG:"
+            << "\nquality out of range:  " << quality
+            << "\nquality has been set to default:  " 
+            << DEFAULT_JPEG_QUALITY
+            << "\nvalid range:  1 to 100 with 100 being best."
+            << std::endl;
+      }
+      
+      theJpegQuality = DEFAULT_JPEG_QUALITY;
+   }
+}
+
+ossim_int32 ossimTiffWriter::getJpegQuality()const
+{
+   
+   return theJpegQuality;
+}
+
+void ossimTiffWriter::setCompressionType(const ossimString& type)
+{
+   theCompressionType = type;
+}
+
+ossimString ossimTiffWriter::getCompressionType()const
+{
+   return theCompressionType;
+}
+
+bool ossimTiffWriter::getGeotiffFlag()const
+{
+   return theOutputGeotiffTagsFlag;
+}
+
+void ossimTiffWriter::setGeotiffFlag(bool flag)
+{
+   theOutputGeotiffTagsFlag = flag;
+}
+
+ossimIpt ossimTiffWriter::getOutputTileSize()const
+{
+   return theOutputTileSize;
+}
+
+ossim_int32 ossimTiffWriter::setProjectionInfo(const ossimMapProjectionInfo& proj)
+{
+   theProjectionInfo = new ossimMapProjectionInfo(proj);
+
+   return ossimErrorCodes::OSSIM_OK;
+}
+
+
+void ossimTiffWriter::getImageTypeList(std::vector<ossimString>& imageTypeList)const
+{
+   imageTypeList.push_back(ossimString("tiff_strip"));
+   imageTypeList.push_back(ossimString("tiff_strip_band_separate"));
+   imageTypeList.push_back(ossimString("tiff_tiled"));
+   imageTypeList.push_back(ossimString("tiff_tiled_band_separate"));
+}
+
+ossimString ossimTiffWriter::getExtension() const
+{
+   return ossimString("tif");
+}
+
+bool ossimTiffWriter::hasImageType(const ossimString& imageType) const
+{
+   // check for non image type list types
+   // We will support mime type
+   //
+   if((imageType == "image/tiff")||
+      (imageType == "image/gtiff")||
+      (imageType == "image/tif")||
+      (imageType == "image/gtif"))
+   {
+      return true;
+   }
+
+   return ossimImageFileWriter::hasImageType(imageType);
+}
+
+bool ossimTiffWriter::isLutEnabled()const
+{
+   return (theColorLutFlag);
+}
+
+ossimTiffWriter::UnitType ossimTiffWriter::getUnitType(
+   ossim_int32 pcsCode,
+   const ossimString& projName) const
+{
+
+
+   if ( ( projName == "ossimCylEquAreaProjection" ) ||
+        ( projName == "ossimEquDistCylProjection" ) ||
+        ( projName == "ossimLlxyProjection" ) )
+   {
+      return ANGULAR_DEGREES;
+   } 
+
+   UnitType pcsUnits = getPcsUnitType(pcsCode);
+
+   UnitType type = UNDEFINED;
+   
+   switch (theLinearUnits)
+   {
+      case OSSIM_METERS:
+      {
+         type = LINEAR_METER;
+         break;
+      }
+      
+      case OSSIM_FEET:
+      {
+         type = LINEAR_FOOT;
+         break;
+      }
+      
+      case OSSIM_US_SURVEY_FEET:
+      {
+         type = LINEAR_FOOT_US_SURVEY;
+         break;
+      }
+      default:
+      {
+         break;
+      }
+   }
+   if (type == UNDEFINED)
+   {
+      return pcsUnits;
+   }
+   return type;
+}
+
+ossimTiffWriter::UnitType ossimTiffWriter::getPcsUnitType(ossim_int32 pcsCode) const
+{
+   UnitType pcsUnits = UNDEFINED;
+   
+   ossimRefPtr<ossimMapProjection> proj = PTR_CAST(ossimMapProjection, 
+      ossimEpsgProjectionDatabase::instance()->findProjection((ossim_uint32) pcsCode));
+   
+   if (proj.valid())
+   {
+      ossimUnitType type = proj->getProjectionUnits();
+      if (type == OSSIM_METERS)
+      {
+         pcsUnits = LINEAR_METER;
+      }
+      else
+      {
+         pcsUnits = LINEAR_FOOT_US_SURVEY;
+      }
+   }
+   return pcsUnits;
+}
+
+//*************************************************************************************************
+// Will take an ossimIMageData tile and write it to disk as a general raster file.
+//*************************************************************************************************
+void ossimTiffWriter::dumpTileToFile(ossimRefPtr<ossimImageData> t,  const ossimFilename& f)
+{
+   ossimRefPtr<ossimMemoryImageSource> tile = new ossimMemoryImageSource;
+   tile->setImage(t);
+   ossimRefPtr<ossimScalarRemapper> remapper = new ossimScalarRemapper(tile.get(), OSSIM_UINT8);
+   ossimRefPtr<ossimTiffWriter> writer = new ossimTiffWriter();
+   writer->connectMyInputTo(0, remapper.get());
+   writer->setFilename(f);
+   writer->setGeotiffFlag(false);
+   writer->execute();
+   writer=0;
+   tile=0;
+}
diff --git a/src/ossim/imaging/ossimTileCache.cpp b/ossim/src/ossim/imaging/ossimTileCache.cpp
similarity index 100%
rename from src/ossim/imaging/ossimTileCache.cpp
rename to ossim/src/ossim/imaging/ossimTileCache.cpp
diff --git a/ossim/src/ossim/imaging/ossimTilePatch.cpp b/ossim/src/ossim/imaging/ossimTilePatch.cpp
new file mode 100644
index 0000000..b1f2db9
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimTilePatch.cpp
@@ -0,0 +1,519 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimTilePatch.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <vector>
+using namespace std;
+
+#include <ossim/imaging/ossimTilePatch.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/base/ossimErrorCodes.h>
+ossimDiscreteNearestNeighbor ossimTilePatch::nearestNeighborKernel;
+
+ossimTilePatch::ossimTilePatch(ossimImageSource* input)
+{
+   thePatchData = ossimImageDataFactory::instance()->create(NULL, input);
+   thePatchData->initialize();
+}
+
+ossimTilePatch::ossimTilePatch(ossimScalarType scalarType,
+                               long numberOfComponents,
+                               long width,
+                               long height)
+   :thePatchData(NULL)
+{
+   thePatchData = ossimImageDataFactory::instance()->create(NULL,
+                                                            scalarType,
+                                                            numberOfComponents,
+                                                            width,
+                                                            height);
+
+   thePatchData->initialize();
+}
+
+ossimTilePatch::~ossimTilePatch()
+{
+}
+
+ossimIrect ossimTilePatch::getRect()const
+{
+   return thePatchData->getImageRectangle();
+}
+
+ossimDrect ossimTilePatch::findBoundingRect(const ossimDpt &p1,
+                                            const ossimDpt &p2,
+                                            const ossimDpt &p3,
+                                            const ossimDpt &p4)
+{
+   vector<ossimDpt> points(4);
+   
+   points[0] = p1;
+   points[1] = p2;
+   points[2] = p3;
+   points[3] = p4;
+
+   return ossimDrect(points);
+}
+
+void ossimTilePatch::fillPatch(ossimImageSource* tileSource,
+                               long resLevel)
+{
+   // long w = tileSource->getTileWidth();
+   // long h = tileSource->getTileHeight();
+   
+   if(thePatchData.valid())
+   {
+      ossimIrect rect   = thePatchData->getImageRectangle();
+      thePatchData->makeBlank();
+      // ossimIpt origin(rect.ul());
+      ossimRefPtr<ossimImageData> aTile = tileSource->getTile(rect, resLevel);
+      thePatchData->loadTile(aTile.get());
+   }
+}
+
+void ossimTilePatch::setData(ossimRefPtr<ossimImageData>& patchData)
+{
+   thePatchData = patchData;
+}
+
+void ossimTilePatch::convolve(ossimDiscreteConvolutionKernel* kernel)
+{
+   if(!kernel) return;
+
+   long w = thePatchData->getWidth();
+   long h = thePatchData->getHeight();
+
+   long kW = kernel->getWidth();
+   long kH = kernel->getHeight();
+   ossimIpt origin = thePatchData->getOrigin();
+   
+   if( (w < kW) || (h < kH))
+   {
+      cerr << " Error ossimTilePatch::convolve(kernel): patch is smaller than kernel size" << endl;
+      return;
+   }
+   ossimRefPtr<ossimImageData> kernelBuffer =(ossimImageData*) thePatchData->dup();
+
+   // now let's make the buffer just fit the convolution filter
+   //
+   kernelBuffer->setWidth(w - kW);
+   kernelBuffer->setHeight(h - kH);
+   kernelBuffer->setOrigin(ossimDpt(origin.x + kW/2.0,
+                                    origin.y + kH/2.0));
+   kernelBuffer->initialize();
+
+   fillTile(kernelBuffer, kernel);
+
+   kernelBuffer->validate();
+   // now copy the data back to the buffer
+   //
+   thePatchData->loadTile(kernelBuffer.get());
+
+   // now make sure we validate the buffer.
+   thePatchData->validate();
+}
+
+void ossimTilePatch::fillTile(ossimRefPtr<ossimImageData>& aTile)const
+{
+   if(aTile.valid() &&
+      (aTile->getNumberOfBands()==thePatchData->getNumberOfBands())&&
+      (aTile->getBuf())&&
+      (thePatchData->getBuf())&&
+      (thePatchData->getScalarType()==aTile->getScalarType()))
+   {
+      aTile->loadTile(thePatchData.get());
+   }
+}
+
+void ossimTilePatch::fillTile(ossimRefPtr<ossimImageData>& result,
+                              ossimDiscreteConvolutionKernel* kernel)const
+{
+   if(!kernel)
+   {
+      cerr << "Error: Kernel is NULL in  ossimTilePatch::fillTile(tile, kernel)!!" << endl;
+   }
+   if(thePatchData->getScalarType() != result->getScalarType())
+   {
+      //ERROR
+      return;
+   }
+   else
+   {
+      switch(thePatchData->getScalarType())
+      {
+      case OSSIM_UCHAR:
+      {
+         fillTileTemplate(static_cast<ossim_uint8>(0),
+                          result,
+                          kernel);
+         break;
+      }
+      case OSSIM_USHORT16:
+      case OSSIM_USHORT11:
+      {
+         fillTileTemplate(static_cast<ossim_uint16>(0),
+                          result,
+                          kernel);
+         break;
+      }
+      case OSSIM_SSHORT16:
+      {
+         fillTileTemplate(static_cast<ossim_sint16>(0),
+                          result,
+                          kernel);
+         break;
+      }
+      case OSSIM_FLOAT:
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         fillTileTemplate(static_cast<float>(0),
+                          result,
+                          kernel);
+         break;
+      }
+      case OSSIM_DOUBLE:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         fillTileTemplate(static_cast<double>(0),
+                          result,
+                          kernel);
+         break;
+      }
+      default:
+	{
+	  ossimSetError("ossimTilePatch",
+			ossimErrorCodes::OSSIM_ERROR,
+			"unhandled scalar type %d",
+			(int)thePatchData->getScalarType());
+	  break;
+	}
+      }
+   }
+}
+
+
+
+void ossimTilePatch::fillTile(ossimRefPtr<ossimImageData>& result,
+                              const ossimDpt   &ul,
+                              const ossimDpt   &ur,
+                              const ossimDpt   &deltaUl,
+                              const ossimDpt   &deltaUr,
+                              const ossimDpt   &length)const
+{   
+   result->setNullPix(thePatchData->getNullPix(), thePatchData->getNumberOfBands());
+   result->setMinPix(thePatchData->getMinPix(), thePatchData->getNumberOfBands());
+   result->setMaxPix(thePatchData->getMaxPix(), thePatchData->getNumberOfBands());
+   result->makeBlank();
+   if(thePatchData->getScalarType() != result->getScalarType())
+   {
+      //ERROR
+      return;
+   }
+   else
+   {
+      switch(thePatchData->getScalarType())
+      {
+      case OSSIM_UCHAR:
+      {
+         fillTileTemplate(static_cast<ossim_uint8>(0),
+                          result,
+                          ul,
+                          ur,
+                          deltaUl,
+                          deltaUr,
+                          length);
+         break;
+      }
+      case OSSIM_USHORT16:
+      case OSSIM_USHORT11:
+      {
+         fillTileTemplate(static_cast<ossim_uint16>(0),
+                          result,
+                          ul,
+                          ur,
+                          deltaUl,
+                          deltaUr,
+                          length);
+         break;
+      }
+      case OSSIM_SSHORT16:
+      {
+         fillTileTemplate(static_cast<ossim_sint16>(0),
+                          result,
+                          ul,
+                          ur,
+                          deltaUl,
+                          deltaUr,
+                          length);
+         break;
+      }
+      case OSSIM_FLOAT:
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         fillTileTemplate(static_cast<float>(0),
+                          result,
+                          ul,
+                          ur,
+                          deltaUl,
+                          deltaUr,
+                          length);
+         break;
+      }
+      case OSSIM_DOUBLE:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         fillTileTemplate(static_cast<double>(0),
+                          result,
+                          ul,
+                          ur,
+                          deltaUl,
+                          deltaUr,
+                          length);
+         break;
+      }
+      default:
+	{
+	  ossimSetError("ossimTilePatch",
+			ossimErrorCodes::OSSIM_ERROR,
+			"unhandled scalar type %d",
+			(int)thePatchData->getScalarType());
+	  break;
+	}
+      }
+   }
+
+}
+
+
+template<class T>
+void ossimTilePatch::fillTileTemplate(T /* dummyVariable */,
+                                      ossimRefPtr<ossimImageData>& result,
+                                      ossimDiscreteConvolutionKernel* kernel)const
+{
+   // get the origin.  The convolution could be
+   // an offset into the patch.
+   //
+   ossimIpt startOrigin   = result->getOrigin();
+
+   // Make sure that the patch is not empty or NULL
+   //
+   ossimDataObjectStatus status = thePatchData->getDataObjectStatus();
+   if((status==OSSIM_EMPTY)||
+      (status == OSSIM_NULL))
+   {
+      return;
+   }
+   ossimDpt startDelta(fabs((double)startOrigin.x - thePatchData->getOrigin().x),
+                       fabs((double)startOrigin.y - thePatchData->getOrigin().y));
+   
+   // let's setup some variables that we will need to do the
+   // convolution algorithm.
+   //
+   ossimIrect patchRect   = thePatchData->getImageRectangle();
+   long tileHeight        = result->getHeight();
+   long tileWidth         = result->getWidth();
+   long outputBands       = result->getNumberOfBands();
+   long convolutionWidth  = kernel->getWidth();
+   long convolutionHeight = kernel->getHeight();
+   long convolutionOffsetX= convolutionWidth/2;
+   long convolutionOffsetY= convolutionHeight/2;
+   long patchWidth        = patchRect.width();
+   long patchCenterOffset = (long)(patchWidth*startDelta.y + startDelta.x);
+   long patchConvolutionOffsetDelta = patchWidth*convolutionOffsetY + convolutionOffsetX;
+   long patchLineStartOffset        = patchCenterOffset  - patchConvolutionOffsetDelta;
+   long outputOffset                = 0;
+   double min = 1.0;
+   double max = 255.0;
+   if(status == OSSIM_PARTIAL) // must check for NULLS
+   {
+      for(long y = 0; y <tileHeight; y++)
+      {
+         patchCenterOffset = patchLineStartOffset;
+         
+         for(long x =0; x < tileWidth; x++)
+         {  
+            if(!thePatchData->isNull(patchCenterOffset))
+            {
+               double convolveResult = 0;
+               for(long b = 0; b < outputBands; ++b)
+               {                  
+                  min=result->getMinPix(b);
+                  max=result->getMaxPix(b);
+                  T* buf    = (T*)(thePatchData->getBuf(b)) + patchCenterOffset;
+                  T* outBuf = (T*)(result->getBuf(b));
+
+                  kernel->convolveSubImage(buf,
+                                           patchWidth,
+                                           convolveResult);
+                  convolveResult = convolveResult < min?min:convolveResult;
+                  convolveResult = convolveResult > max?max:convolveResult;
+                  outBuf[outputOffset] = (ossim_uint8)convolveResult;
+               }
+            }
+            else
+            {
+               result->setNull(outputOffset);
+            }
+            ++outputOffset;
+            ++patchCenterOffset;
+         }
+         patchLineStartOffset += patchWidth;
+      }
+    }
+    else
+    {
+       for(long b = 0; b < outputBands; ++b)
+       {                  
+          double convolveResult = 0;
+          const T* buf    = (const T*)thePatchData->getBuf(b);
+          T* outBuf = (T*)(result->getBuf(b));
+          outputOffset = 0;
+          patchCenterOffset = (long)(patchWidth*startDelta.y + startDelta.x);
+          patchLineStartOffset  = patchCenterOffset - patchConvolutionOffsetDelta;
+          min=result->getMinPix(b);
+          max=result->getMaxPix(b);
+          
+          for(long y = 0; y <tileHeight; y++)
+          {
+             patchCenterOffset = patchLineStartOffset;
+             
+             for(long x =0; x < tileWidth; x++)
+             {
+                kernel->convolveSubImage(&buf[patchCenterOffset],
+                                         patchWidth,
+                                         convolveResult);
+                convolveResult = convolveResult < min? min:convolveResult;
+                convolveResult = convolveResult > max?max:convolveResult;
+                outBuf[outputOffset] = (T)convolveResult;
+                ++outputOffset;
+                ++patchCenterOffset;
+             }
+             patchLineStartOffset += patchWidth;
+          }
+       }
+    }
+}
+
+
+template <class T>
+void ossimTilePatch::fillTileTemplate(T /* dummyVariable */,
+                              ossimRefPtr<ossimImageData>& result,
+                              const ossimDpt   &ul,
+                              const ossimDpt   &ur,
+                              const ossimDpt   &deltaUl,
+                              const ossimDpt   &deltaUr,
+                              const ossimDpt   &length)const
+{
+   double stepSizeWidth  = 1.0/length.x;
+   double stepSizeHeight = 1.0/length.y;
+   long patchWidth = thePatchData->getWidth();
+   long patchHeight = thePatchData->getHeight();
+
+   
+   ossimIrect rect = thePatchData->getImageRectangle();
+   
+   ossimDpt startSave(ul.x - rect.ul().x,
+                      ul.y - rect.ul().y );
+   ossimDpt endSave(ur.x - rect.ul().x,
+                    ur.y - rect.ul().y);
+   for(ossim_uint32 band = 0; band < thePatchData->getNumberOfBands(); ++band)
+   {
+      T *resultBuf = (T*)result->getBuf(band);
+      const T *sourceBuf = (T*)thePatchData->getBuf(band);
+      ossimDpt start = startSave;
+      ossimDpt end   = endSave;
+      T nullPix = static_cast<T>(result->getNullPix(band));
+      for(long y = 0; y < length.y; y++)
+      {
+         double deltaX = (end.x - start.x)*stepSizeWidth;
+         double deltaY = (end.y - start.y)*stepSizeHeight;
+         ossimDpt pointXY = start;
+         for(long x = 0; x < length.x; x++)
+         {
+            int xPixel = pointXY.x<0?(int)floor(pointXY.x):(int)pointXY.x;
+            int yPixel = pointXY.y<0?(int)floor(pointXY.y):(int)pointXY.y;
+            if( (xPixel >=0) && (xPixel < patchWidth) &&
+                (yPixel >=0) && (yPixel < patchHeight))
+            {              
+               *resultBuf = sourceBuf[yPixel*patchWidth + xPixel];
+            }
+            else
+            {
+               *resultBuf = nullPix;
+            }
+            
+            resultBuf++;
+            pointXY.y += deltaY;
+            pointXY.x += deltaX;
+         }
+         
+         start.x += deltaUl.x;
+         start.y += deltaUl.y;
+         end.x   += deltaUr.x;
+         end.y   += deltaUr.y;
+      }
+   }
+}
+
+
+void ossimTilePatch::setRect(const ossimDpt &p1,
+                             const ossimDpt &p2,
+                             const ossimDpt &p3,
+                             const ossimDpt &p4,
+                             const ossimDpt &tile_size,
+                             const ossimDpt &padding)
+{
+   setRect(findBoundingRect(p1, p2, p3, p4),
+           tile_size,
+           padding);
+}
+
+void ossimTilePatch::setRect(const ossimDpt &center,
+                             const ossimDpt &rect_size,
+                             const ossimDpt &tile_size,
+                             const ossimDpt &padding)
+{
+   ossimDpt ul (center - rect_size/2.0);
+   ossimDpt lr (center + rect_size/2.0);
+   ossimDrect rect (ul, lr);
+   setRect(rect, tile_size, padding);
+}
+
+void ossimTilePatch::setRect(const ossimDrect& aRect,
+                             const ossimDpt& /* tile_size*/,
+                             const ossimDpt& padding)
+{
+   ossimDpt   ul(aRect.ul().x - padding.x,
+                 aRect.ul().y - padding.y);
+   ossimDpt   lr(aRect.lr().x + padding.x,
+                 aRect.lr().y + padding.y);
+
+   ossimDrect rect(ul, lr);
+   rect.stretchOut();
+   
+//   rect   = alignRectToBoundary(rect, tile_size);
+
+   if(thePatchData.valid())
+   {
+      if(  ((long)thePatchData->getWidth()  != (long)rect.width()) ||
+           ((long)thePatchData->getHeight() != (long)rect.height()))
+      {
+         thePatchData->setWidth((long)rect.width());
+         thePatchData->setHeight((long)rect.height());
+      }
+      thePatchData->setOrigin(rect.ul());
+      thePatchData->initialize();
+   }
+}
+
+
diff --git a/ossim/src/ossim/imaging/ossimTiledImageHandler.cpp b/ossim/src/ossim/imaging/ossimTiledImageHandler.cpp
new file mode 100644
index 0000000..6743fbf
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimTiledImageHandler.cpp
@@ -0,0 +1,565 @@
+//*************************************************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Oscar Kramer
+//
+// Description:
+// 
+// Image handler used for tile-files when the full image is distributed across multiple files,
+// as is the case for tiled Quickbird imagery. This is not for use with band-separate formats,
+// but only "spatially-separate" schemes.
+//
+//*************************************************************************************************
+//  $Id: ossimTiledImageHandler.cpp 2644 2011-05-26 15:20:11Z oscar.kramer $
+
+#include <algorithm>
+
+#include <ossim/imaging/ossimTiledImageHandler.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimRegExp.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimPolygon.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimTiffOverviewBuilder.h>
+#include <ossim/imaging/ossimTiffTileSource.h>
+
+RTTI_DEF1(ossimTiledImageHandler, "ossimTiledImageHandler", ossimImageHandler)
+
+// Static trace for debugging
+static ossimTrace traceDebug("ossimTiledImageHandler:debug");
+
+//*************************************************************************************************
+//!  Constructor (default):
+//*************************************************************************************************
+ossimTiledImageHandler::ossimTiledImageHandler()
+   : m_tileFiles(0),
+     m_tile(0),
+     m_fullImgRect(),
+#if USING_SUB_OVRS
+     m_startOvrResLevel(-1),
+     m_lockSubOvrs(false)
+#else
+     m_startOvrResLevel(1)
+#endif
+{
+}
+
+//*************************************************************************************************
+//! Destructor:
+//*************************************************************************************************
+ossimTiledImageHandler::~ossimTiledImageHandler()
+{
+   close();
+}
+
+//*************************************************************************************************
+//! Deletes the overview and clears the valid image vertices.  Derived
+//! classes should implement.
+//*************************************************************************************************
+void ossimTiledImageHandler::close()
+{
+   vector<ossimTileFile>::iterator iter = m_tileFiles.begin();
+   while (iter != m_tileFiles.end())
+   {
+      (*iter).imageHandler->close();
+      ++iter;
+   }
+   m_tileFiles.clear();
+}
+
+//*************************************************************************************************
+//! Derived classes must implement this method to be concrete.
+//! @return true if open, false if not.
+//*************************************************************************************************
+bool ossimTiledImageHandler::isOpen()const
+{
+   if (m_tileFiles.size() > 0)
+      return true;
+
+   return false;
+}
+
+//*************************************************************************************************
+//! Initialize tile buffer to natch image datatype
+//*************************************************************************************************
+void ossimTiledImageHandler::allocate()
+{
+   m_tile = 0;
+   if ((m_tileFiles.size() == 0))
+      return;
+
+   // Just copy the image data tile of the first tile-file:
+   ossimRefPtr<ossimImageHandler> h0 = m_tileFiles[0].imageHandler;
+   ossimIrect rect (h0->getBoundingRect());
+   rect.set_lr(rect.ul() + ossimIpt(h0->getTileWidth()-1, h0->getTileHeight()-1));
+   ossimRefPtr<ossimImageData> source_tile = m_tileFiles[0].imageHandler->getTile(rect);
+   if (!source_tile.valid())
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "ossimTiledImageHandler::allocate() -- Could not"
+         "determine file-tile image data for allocating image tile. Aborting."<<endl;
+      return;
+   }
+
+   m_tile = (ossimImageData*) source_tile->dup();
+}
+
+//*************************************************************************************************
+//! Fills the requested tile by pulling pixels from multiple file tiles as needed.
+//*************************************************************************************************
+ossimRefPtr<ossimImageData> ossimTiledImageHandler::getTile(const ossimIrect& tile_rect, 
+                                                             ossim_uint32 resLevel)
+{
+   // First verify that there are file-tiles available:
+   if (m_tileFiles.size() == 0)
+      return ossimRefPtr<ossimImageData>();
+
+   // Allocate data tile if needed:
+   if(!m_tile.valid())
+   {
+      allocate();
+      if(!m_tile.valid())
+         return ossimRefPtr<ossimImageData>();
+   }
+
+   // Check if res level represents data inside the overall scene overview:
+   if (theOverview.valid() && (resLevel >= m_startOvrResLevel))
+      return theOverview->getTile(tile_rect, resLevel);
+
+   // Loop over all tile-files to find which intersect the requested image rect. This necessarily
+   // needs to be done at full res coordinates, so need to adjust by res level requested:
+   ossimDpt decimation_factor;
+   const ossim_uint32 BANDS = m_tile->getNumberOfBands();
+   // const ossim_uint32 PPB   = m_tile->getSizePerBand(); // pixels per band
+   // bool none_found = true;
+
+   m_tile->setImageRectangle(tile_rect);
+   ossim_uint32 wd, hd, ws, hs;
+   m_tile->getWidthHeight(wd, hd);
+
+   // Always start with blank tile.
+   m_tile->makeBlank();
+   
+   // See if any point of the requested tile is in the image.
+   if ( tile_rect.intersects( m_fullImgRect ) )
+   {
+      vector<ossimTileFile>::iterator tf_iter = m_tileFiles.begin();
+      ossimRefPtr<ossimImageData> source_tile = 0;
+      while (tf_iter != m_tileFiles.end())
+      {
+         if (( (*tf_iter).subImageRects.size() > resLevel) &&
+             tile_rect.intersects((*tf_iter).subImageRects[resLevel]))
+         {
+            // Current image handler lies within requested rect, need to adjust this rect to be 
+            // relative to this subimage offset before fetching the tile:
+            ossimIrect relative_rect (tile_rect - (*tf_iter).subImageRects[resLevel].ul());
+            source_tile = (*tf_iter).imageHandler->getTile(relative_rect, resLevel);
+            
+            // Quick check to see if a full tile was returned, in which case we can just return that
+            // tile instead of looping below:
+            //if (source_tile->getDataObjectStatus() == OSSIM_FULL)
+            //{
+            //   source_tile->setImageRectangle(tile_rect);
+            //   return source_tile;
+            //}
+
+            // Set the tile's rect back to full image space before saving to the list:
+            source_tile->getWidthHeight(ws, hs);
+            for (ossim_uint32 band = 0; band < BANDS; ++band)
+            {
+               const ossim_uint16 null_pixel = (ossim_uint16) m_tile->getNullPix(band);
+               const ossim_uint16* s = (const ossim_uint16*) source_tile->getBuf(band);
+               ossim_uint16* d = (ossim_uint16*) m_tile->getBuf(band);
+               ossim_uint32 is = 0; 
+               ossim_uint32 id = 0; 
+               for (ossim_uint32 y=0; (y<hd)&&(y<hs); y++)
+               {
+                  for (ossim_uint32 x=0; x<wd; x++)
+                  {
+                     if (x < ws)
+                     {
+                        if (s[is] != null_pixel)
+                           d[id] = s[is];
+                        ++is;
+                     }
+                     ++id;
+                  }
+               }
+            }
+         }
+         ++tf_iter;
+      }
+      
+      m_tile->validate();
+      
+   } // Matches: if ( tile_rect.intersects( m_fullImgRect ) )
+
+   return m_tile;
+}
+
+//*************************************************************************************************
+//! @param resLevel Reduced resolution level to return lines of.
+//! Default = 0
+//! @return The number of lines for specified reduced resolution level.
+//*************************************************************************************************
+ossim_uint32 ossimTiledImageHandler::getNumberOfLines(ossim_uint32 resLevel) const
+{
+   if (m_fullImgRect.hasNans())
+      return 0;
+
+   // Using simple decimation by powers of 2:
+   ossim_uint32 numlines = m_fullImgRect.height() >> resLevel;
+   return numlines;
+}
+
+//*************************************************************************************************
+//! @param resLevel Reduced resolution level to return samples of.
+//! Default = 0
+//! @return The number of samples for specified reduced resolution level.
+//*************************************************************************************************
+ossim_uint32 ossimTiledImageHandler::getNumberOfSamples(ossim_uint32 resLevel) const
+{
+   if (m_fullImgRect.hasNans())
+      return 0;
+
+   // Using simple decimation by powers of 2:
+   ossim_uint32 numsamps = m_fullImgRect.width() >> resLevel;
+   return numsamps;
+}
+
+//*************************************************************************************************
+//! Method to save the state of an object to a keyword list.
+//! Return true if ok or false on error.
+//*************************************************************************************************
+bool ossimTiledImageHandler::saveState(ossimKeywordlist& kwl, const char* prefix) const
+{
+  return ossimImageHandler::saveState(kwl, prefix);
+}
+
+//*************************************************************************************************
+//! Method to the load (recreate) the state of an object from a keyword
+//! list.  Return true if ok or false on error.
+//*************************************************************************************************
+bool ossimTiledImageHandler::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   if (!ossimImageHandler::loadState(kwl, prefix))
+      return false;
+
+   return open();
+}
+
+//*************************************************************************************************
+//! Indicates whether or not the image is tiled internally.
+//! This implementation returns true if (getImageTileWidth() &&
+//! getImageTileHeight()) are both non zero.
+//! Override in the image handler if something else is desired.
+//! Returns true if tiled, false if not.
+//*************************************************************************************************
+bool ossimTiledImageHandler::isImageTiled() const
+{
+   return true;
+}
+
+//*************************************************************************************************
+// Returns the number of bands of the first tile since all tiles need to have the same pixel type.
+//*************************************************************************************************
+ossim_uint32 ossimTiledImageHandler::getNumberOfInputBands() const
+{
+   if ((m_tileFiles.size() == 0) || (!m_tileFiles[0].imageHandler.valid()))
+      return 0;
+
+   return m_tileFiles[0].imageHandler->getNumberOfInputBands();
+}
+
+//*************************************************************************************************
+//! Returns the tile width of the image or 0 if the image is not tiled.
+//! Note: this is not the same as the ossimImageSource::getTileWidth which
+//! returns the output tile width which can be different than the internal
+//! image tile width on disk.
+//*************************************************************************************************
+ossim_uint32 ossimTiledImageHandler::getImageTileWidth() const
+{
+   if ((m_tileFiles.size() == 0) || (!m_tileFiles[0].imageHandler.valid()))
+      return 0;
+
+  if (m_tileFiles[0].imageHandler->isImageTiled())
+     return m_tileFiles[0].imageHandler->getImageTileWidth();
+
+  return m_tileFiles[0].imageHandler->getNumberOfSamples();
+}
+
+//*************************************************************************************************
+//! Returns the tile height of the image or 0 if the image is not tiled.
+//! Note: this is not the same as the ossimImageSource::getTileHeight which
+//! returns the output tile height which can be different than the internal
+//! image tile height on disk.
+//*************************************************************************************************
+ossim_uint32 ossimTiledImageHandler::getImageTileHeight() const
+{
+   if ((m_tileFiles.size() == 0) || (!m_tileFiles[0].imageHandler.valid()))
+      return 0;
+
+   if (m_tileFiles[0].imageHandler->isImageTiled())
+      return m_tileFiles[0].imageHandler->getImageTileHeight();
+
+   return m_tileFiles[0].imageHandler->getNumberOfLines();
+}
+
+//*************************************************************************************************
+//! Returns scalar type of first tile (should be the same for all tiles)
+//*************************************************************************************************
+ossimScalarType ossimTiledImageHandler::getOutputScalarType() const
+{
+   if ((m_tileFiles.size() == 0) || (!m_tileFiles[0].imageHandler.valid()))
+      return OSSIM_SCALAR_UNKNOWN;
+
+   return m_tileFiles[0].imageHandler->getOutputScalarType();
+}
+
+//*************************************************************************************************
+//! Returns overall bounding rect in image space.
+//*************************************************************************************************
+ossimIrect ossimTiledImageHandler::getImageRectangle(ossim_uint32 resLevel) const
+{
+   if (resLevel == 0)
+      return m_fullImgRect;
+
+   ossimDpt decimation;
+   getDecimationFactor(resLevel, decimation);
+
+   return m_fullImgRect*decimation;
+}
+
+
+#if USING_SUB_OVRS
+//*************************************************************************************************
+// Overrides base class
+//*************************************************************************************************
+void ossimTiledImageHandler::completeOpen()
+{
+   openOverview();
+   openValidVertices();
+}
+
+//*************************************************************************************************
+//! Will build over files, one for each tile file.
+//! @param includeFullResFlag if true the full resolution layer will also
+//! be put in the overview format.  This is handy for inefficient formats.
+//*************************************************************************************************
+bool ossimTiledImageHandler::buildOverview(ossimImageHandlerOverviewCompressionType ctype, 
+                                            ossim_uint32 qual,
+                                            ossimFilterResampler::ossimFilterResamplerType rtype,
+                                            bool ifr_flag)
+{
+   if (m_tileFiles.size() == 0)
+      return false;
+
+   bool all_ok = true;
+   vector<ossimTileFile>::iterator iter = m_tileFiles.begin();
+   while ((iter != m_tileFiles.end()) && all_ok)
+   {
+      if (!(*iter).imageHandler->hasOverviews())
+      {
+         ossimNotify(ossimNotifyLevel_INFO)<<"\nBuilding overview for <"
+            <<(*iter).imageHandler->getFilename()<<">"<<std::endl;
+
+         all_ok = (*iter).imageHandler->buildOverview(ctype, qual, rtype, ifr_flag);
+      }
+      ++iter;
+   }
+
+   // Overviews for subimage tile-files have been processed. However, we need to check the
+   // preferences for the overview stop dimension to see if we need additional decimation of the
+   // overall scene to achieve the final desired dimension.
+   ossimString stop_dim_str = 
+      ossimPreferences::instance()->findPreference(ossimKeywordNames::OVERVIEW_STOP_DIMENSION_KW);
+   if (!stop_dim_str.empty())
+   {
+      ossim_uint32 stop_dim = stop_dim_str.toUInt32();
+      ossimDpt decimation = theDecimationFactors.back();
+      ossim_uint32 nlines = decimation.y * m_fullImgRect.height();
+      ossim_uint32 nsamps = decimation.x * m_fullImgRect.width();
+      if ((nlines > stop_dim) || (nsamps > stop_dim))
+      {
+         // Need to continue decimating. These decimations are stored in an overall scene file.
+         // Need subimage OVRs open for this next operation:
+         openOverview();
+
+         ossimTiffOverviewBuilder tob;
+         tob.setInputSource(this);
+         theOverviewFile = getFilenameWithThisExtension("ovr");
+
+         // This magically takes over where we left off in decimating:
+         if (tob.buildOverview(theOverviewFile))
+         {
+            // Overview was successfully written, now open it:
+            theOverview = new ossimTiffTileSource;
+            all_ok = openOverview();
+         }
+      }
+   }
+
+   return all_ok;
+}
+
+//*************************************************************************************************
+// Will open overview files for all tile files. Actually, the tile-files will already have opened
+// their individual overviews, so this method only verifies the fact and initializes the 
+// associated subimage rects at all decimation levels.
+//*************************************************************************************************
+bool ossimTiledImageHandler::openOverview()
+{
+   if (m_tileFiles.size() == 0)
+      return false;
+
+   theDecimationFactors.clear();
+   bool all_ok = true;
+   ossimRefPtr<ossimImageHandler> handler = 0;
+   vector<ossimDpt> factors;
+   ossim_uint32 min_num_rlevels = 999;
+
+   // Loop over all tile-files to verify their OVR was opened and to calculate the associated 
+   // subimage rects at each res level:
+   vector<ossimTileFile>::iterator iter = m_tileFiles.begin();
+   while ((iter != m_tileFiles.end()) && all_ok)
+   {
+      handler = (*iter).imageHandler;
+      if (!handler.valid())
+      {
+         ++iter;
+         continue;
+      }
+
+      if ((*iter).subImageRects.size() == 0)
+      {
+         ossimNotify(ossimNotifyLevel_INFO)<<"\nBounding image rectangle not defined for <"
+            <<(*iter).imageHandler->getFilename()<<">! Cannot proceed with overviews."<<std::endl;
+         all_ok = false;
+      }
+
+      else if (handler->getOverview())
+      {
+         // Only verified that overview for tile-file was opened. Check number of decimation levels
+         // to latch minimum:
+         (*iter).overviewIsOpen = true;
+         handler->getDecimationFactors(factors);
+
+         if (factors.size() < min_num_rlevels)
+            min_num_rlevels = (ossim_uint32) factors.size();
+
+         // Need to determine the sub image rects at each decimation level:
+         ossimIrect subRectR0 ((*iter).subImageRects[0]);
+         for (ossim_uint32 i=1; i<(ossim_uint32)factors.size(); i++)
+         {
+            ossimIrect r (factors[i].x * subRectR0.ul().x, factors[i].y * subRectR0.ul().y,
+               factors[i].x * subRectR0.lr().x, factors[i].y * subRectR0.lr().y);
+            (*iter).subImageRects.push_back(r);
+         }
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_INFO)<<"\nNo overview available for <"
+            <<(*iter).imageHandler->getFilename()<<">"<<std::endl;
+         all_ok = false;
+      }
+      ++iter;
+   }
+
+   // Assuming here that the first tile will always provide a good representation of the decimations
+   // for all res levels in all tile-files. This may not be true.
+   if (m_tileFiles.size() && m_tileFiles[0].imageHandler.valid())
+   {
+      m_tileFiles[0].imageHandler->getDecimationFactors(theDecimationFactors);
+      theDecimationFactors.resize(min_num_rlevels);
+   }
+
+   // Check for overall scene overview file, that takes over where the individual tile-file
+   // overviews leave off:
+   theOverviewFile = getFilenameWithThisExtension("ovr");
+   if (!theOverviewFile.exists())
+      theOverviewFile.setExtension("OVR");
+   if (theOverviewFile.exists())
+   {
+      m_lockSubOvrs = true; // prevent closing and reopening of subimage ovrs
+      ossimImageHandler::openOverview(theOverviewFile);
+      m_lockSubOvrs = false; // reset
+      if (theOverview.valid())
+      {
+         vector<ossimDpt> extra_decimations;
+         theOverview->getDecimationFactors(extra_decimations);
+         if (extra_decimations.size())
+         {
+            // Obtain the decimations and add it to our decimation list:
+            m_startOvrResLevel = (ossim_uint32) theDecimationFactors.size();
+            ossimDpt start_decimation (theDecimationFactors.back() * 0.5);
+            ossimDpt decimation;
+            for (ossim_uint32 i=0; i<extra_decimations.size(); i++)
+            {
+               decimation.x = start_decimation.x*extra_decimations[i].x;
+               decimation.y = start_decimation.y*extra_decimations[i].y;
+               theDecimationFactors.push_back(decimation);
+            }
+         }
+      }
+   }
+
+   return all_ok;
+}
+
+//*************************************************************************************************
+//! Will close all tile files' overviews.
+//*************************************************************************************************
+void ossimTiledImageHandler::closeOverview()
+{
+   if (theOverview.valid())
+      theOverview = 0;
+
+   if (m_lockSubOvrs == false)
+   {
+      vector<ossimTileFile>::iterator iter = m_tileFiles.begin();
+      while ((iter != m_tileFiles.end()))
+      {
+         if ((*iter).imageHandler.valid())
+            (*iter).imageHandler->closeOverview();
+
+         ++iter;
+      }
+   }
+}
+
+//*************************************************************************************************
+//! Will return TRUE if all tile files have overviews.
+//*************************************************************************************************
+bool ossimTiledImageHandler::hasOverviews() const
+{
+   bool all_have_ovrs = true;
+   vector<ossimTileFile>::const_iterator iter = m_tileFiles.begin();
+   while ((iter != m_tileFiles.end()) && all_have_ovrs)
+   {
+      if (((*iter).imageHandler.valid()) && !((*iter).imageHandler->hasOverviews()))
+         all_have_ovrs = false;
+      ++iter;
+   }
+   return all_have_ovrs;
+}
+
+//*************************************************************************************************
+//! Returns the number of decimation (resolution) levels. This is the minimum number
+//! among all sub-image tile-files.
+//*************************************************************************************************
+ossim_uint32 ossimTiledImageHandler::getNumberOfDecimationLevels() const
+{
+   return (ossim_uint32) theDecimationFactors.size();
+}
+
+#endif /* #if USING_SUB_OVRS */
+
+
diff --git a/ossim/src/ossim/imaging/ossimTiling.cpp b/ossim/src/ossim/imaging/ossimTiling.cpp
new file mode 100644
index 0000000..db2ef27
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimTiling.cpp
@@ -0,0 +1,988 @@
+//*******************************************************************
+// Copyright (C) 2004 Garrett Potts
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: implementation for image generator
+//
+//*************************************************************************
+// $Id: ossimTiling.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <sstream>
+#include <iomanip>
+#include <ossim/imaging/ossimTiling.h>
+#include <ossim/base/ossimUnitTypeLut.h>
+#include <ossim/base/ossimUnitConversionTool.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimTrace.h>
+
+static ossimTrace traceDebug("ossimTiling:debug");
+
+RTTI_DEF1(ossimTiling, "ossimTiling", ossimObject);
+
+ossimTiling::ossimTiling()
+      :theTilingDistance(0,0),
+       theTilingDistanceUnitType(OSSIM_UNIT_UNKNOWN),
+       theDelta(0,0),
+       theDeltaType(ossimTilingDeltaType_TOTAL_PIXELS),
+       theOutputSizeInBytes(0),
+       theNumberOfBands(1),
+       theNumberOfBytesPerPixelPerBand(1),
+       thePaddingSizeInPixels(0.0, 0.0),
+       theMapProjection(),
+       theImageRect(),
+       theTilingRect(),
+       theTileId(-1),
+       theTotalHorizontalTiles(0),
+       theTotalVerticalTiles(0),
+       theTotalTiles(0),
+       theTileNameMask(),
+       theEdgeToEdgeFlag(false)
+{
+}
+
+bool ossimTiling::initialize(const ossimMapProjection& proj,
+                             const ossimIrect& boundingRect)
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimTiling::initialize DEBUG: Entered..."
+         << "\nBounding rect === " << boundingRect
+         << std::endl;
+   }
+   
+   bool result = true;
+   theMapProjection = (ossimMapProjection*)proj.dup();
+   theImageRect     = boundingRect;
+
+   result = validate();
+
+   ossimDpt convertedTilingDistance = theTilingDistance;
+
+   if(result)
+   {
+      // Let's setup the bounding tile rect.
+      if(theTilingDistanceUnitType != OSSIM_PIXEL)
+      {
+         getConvertedTilingDistance(convertedTilingDistance);
+         
+         if(theMapProjection->isGeographic())
+         {
+            ossimGpt ul;
+            ossimGpt ur;
+            ossimGpt lr;
+            ossimGpt ll;
+
+            theMapProjection->lineSampleToWorld(theImageRect.ul(),
+                                                ul);
+            theMapProjection->lineSampleToWorld(theImageRect.ur(),
+                                                ur);
+            theMapProjection->lineSampleToWorld(theImageRect.lr(),
+                                                lr);
+            theMapProjection->lineSampleToWorld(theImageRect.ll(),
+                                                ll);
+
+            theTilingRect = ossimDrect(ossimDpt(ul),
+                                       ossimDpt(ur),
+                                       ossimDpt(lr),
+                                       ossimDpt(ll),
+                                       OSSIM_RIGHT_HANDED);
+
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << "DEBUG: Geographic input bounds =  "
+                  << theTilingRect
+                  << std::endl;
+            }
+            
+            theTilingRect.stretchToTileBoundary(convertedTilingDistance);
+            
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << "DEBUG: Geographic input bounds stretched =  "
+                  << theTilingRect << std::endl;
+            }
+            
+            clampGeographic(theTilingRect);
+
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << "DEBUG: Geographic input bounds clamped =  "
+                  << theTilingRect << std::endl;
+            }
+
+         }  // End "if(theMapProjection->isGeographic())"
+         
+         else // meters
+         {
+            ossimDpt ul;
+            ossimDpt ur;
+            ossimDpt lr;
+            ossimDpt ll;
+            
+            theMapProjection->lineSampleToEastingNorthing(theImageRect.ul(),
+                                                          ul);
+            theMapProjection->lineSampleToEastingNorthing(theImageRect.ur(),
+                                                          ur);
+            theMapProjection->lineSampleToEastingNorthing(theImageRect.lr(),
+                                                          lr);
+            theMapProjection->lineSampleToEastingNorthing(theImageRect.ll(),
+                                                          ll);
+            theTilingRect = ossimDrect(ul,
+                                       ur,
+                                       lr,
+                                       ll,
+                                       OSSIM_RIGHT_HANDED);
+            
+            theTilingRect.stretchToTileBoundary(convertedTilingDistance);
+         }
+      }
+      else
+      {
+         ossim_int32 remainderX = (ossim_int32)((theImageRect.width()%((ossim_int32)theDelta.x)) != 0);
+         ossim_int32 remainderY = (ossim_int32)((theImageRect.height()%((ossim_int32)theDelta.y)) != 0);
+         
+         ossim_int32 w = (ossim_int32)((theImageRect.width()/(ossim_int32)theDelta.x)*theDelta.x +
+                                       (remainderX*theDelta.x));
+         ossim_int32 h = (ossim_int32)((theImageRect.height()/(ossim_int32)theDelta.y)*theDelta.y +
+                                       (remainderY*theDelta.y));
+         theTilingRect = ossimDrect(theImageRect.ul().x,
+                                    theImageRect.ul().y,
+                                    theImageRect.ul().x + (w-1),
+                                    theImageRect.ul().y + (h-1));
+
+         // since we are pixel space we force delta to be 1 pixel unit
+         //
+         theDelta.x   = 1.0;
+         theDelta.y   = 1.0;
+         theDeltaType = ossimTilingDeltaType_PER_PIXEL;
+      }
+   }
+   
+   theTotalHorizontalTiles = ossim::round<int>(fabs(theTilingRect.ur().x - theTilingRect.ul().x)/convertedTilingDistance.x);
+   theTotalVerticalTiles   = ossim::round<int>(fabs(theTilingRect.ur().y - theTilingRect.lr().y)/convertedTilingDistance.y);
+   theTotalTiles           = theTotalHorizontalTiles*theTotalVerticalTiles;
+
+   // reset the tile id to the beginning
+   //
+   reset();
+   
+   if(traceDebug())
+   {
+      print(ossimNotify(ossimNotifyLevel_DEBUG));
+      
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "\nossimTiling::initialize DEBUG: Leaving..." << std::endl;
+   }
+   return result;
+}
+
+bool ossimTiling::next(ossimRefPtr<ossimMapProjection>& resultProjection,
+                       ossimIrect& resultingBounds,
+                       ossimString& resultingName)const
+{
+   bool result = true;
+   
+   if(theTileId < theTotalTiles)
+   {
+      ossimDpt origin;
+      ossim_int64 row=0;
+      ossim_int64 col=0;
+
+      getRowCol(row, col, theTileId);
+
+      getTileName(resultingName,
+                  row, col, theTileId);
+      
+      getOrigin(origin, row, col);
+
+      if(theTilingDistanceUnitType == OSSIM_PIXEL)
+      {
+         ossimIpt ul = origin;
+
+         resultingBounds =
+            ossimIrect(ul.x - (ossim_int32)thePaddingSizeInPixels.x,
+                       ul.y - (ossim_int32)thePaddingSizeInPixels.y,
+                       ul.x + ((ossim_int32)theTilingDistance.x-1) +
+                       (ossim_int32)thePaddingSizeInPixels.x,
+                       ul.y + ((ossim_int32)theTilingDistance.y-1) +
+                       (ossim_int32)thePaddingSizeInPixels.y);
+      }
+      else
+      {
+         
+         ossimDpt deltaPerPixel = getDeltaPerPixel();
+         ossimIpt pixels;
+
+         if(theDeltaType == ossimTilingDeltaType_TOTAL_PIXELS)
+         {
+            pixels =   theDelta;
+         }
+         else
+         {
+            pixels =   ossimDpt(theTilingDistance.x/theDelta.x,
+                                theTilingDistance.y/theDelta.y);
+         }
+
+         if(theMapProjection->isGeographic())
+         {
+            if ( theEdgeToEdgeFlag )
+            {
+               theMapProjection->setUlTiePoints(
+                  ossimGpt( origin.lat - (deltaPerPixel.y/2.0),
+                            origin.lon + (deltaPerPixel.x/2.0),
+                            0.0,
+                            theMapProjection->origin().datum()) );
+            }
+            else
+            {
+               theMapProjection->setUlTiePoints(
+                  ossimGpt(origin.lat,
+                           origin.lon,
+                           0.0,
+                           theMapProjection->origin().datum()));
+               
+            }
+            theMapProjection->setDecimalDegreesPerPixel(deltaPerPixel);
+         }
+         else
+         {
+            if ( theEdgeToEdgeFlag )
+            {
+               theMapProjection->setUlTiePoints(
+                  ossimDpt( origin.x + (deltaPerPixel.x/2.0),
+                            origin.y - (deltaPerPixel.y/2.0) ) );
+            }
+            else
+            {
+               theMapProjection->setUlTiePoints(ossimDpt(origin.x, origin.y));
+            }
+            theMapProjection->setMetersPerPixel(deltaPerPixel);
+         }
+         resultingBounds = ossimIrect(-(ossim_int32)thePaddingSizeInPixels.x,
+                                      -(ossim_int32)thePaddingSizeInPixels.y,
+                                      (pixels.x-1) + (ossim_int32)thePaddingSizeInPixels.x,
+                                      (pixels.y-1) + (ossim_int32)thePaddingSizeInPixels.y);
+      }
+      resultProjection = theMapProjection;
+
+      ++theTileId;
+      if(traceDebug()&&resultProjection.valid())
+      {
+         ossimKeywordlist projKwl;
+         
+         resultProjection->saveState(projKwl);
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimTiling::next DEBUG: rect = " << resultingBounds
+            << "\nproj                          = " << projKwl
+            << "\ntileName                      = " << resultingName
+            << "\norigin                        = " << origin << std::endl;
+      }
+   }
+   else
+   {
+      result = false;
+   }
+
+   
+   return result;
+}
+
+
+void ossimTiling::reset()
+{
+   theTileId = 0;
+}
+
+void ossimTiling::setTilingDistance(const ossimDpt& tilingDistance,
+                                    ossimUnitType unitType)
+{
+   theTilingDistance         = tilingDistance;
+   theTilingDistanceUnitType = unitType;
+}
+
+void ossimTiling::setDelta(const ossimDpt& delta,
+                           ossimTilingDeltaType deltaType)
+{
+   theDelta     = delta;
+   theDeltaType = deltaType;
+}
+
+bool ossimTiling::validate()const
+{
+   bool result = true;
+
+   if(theMapProjection.valid())
+   {
+      if(theMapProjection->isGeographic())
+      {
+         switch(theTilingDistanceUnitType)
+         {
+            case OSSIM_DEGREES:
+            case OSSIM_RADIANS:
+            case OSSIM_SECONDS:
+            case OSSIM_MINUTES:
+            case OSSIM_PIXEL:
+            {
+               break;
+            }
+            default:
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << "ossimTiling::validate()\n"
+                  << "Map projeciton requires tiling in angular units but the"
+                  << "\nspacing is in non angular" << std::endl;
+               result = false;
+            }
+         }
+      }
+      else
+      {
+         switch(theTilingDistanceUnitType)
+         {
+            case OSSIM_METERS:
+            case OSSIM_FEET:
+            case OSSIM_US_SURVEY_FEET:
+            case OSSIM_NAUTICAL_MILES:
+            case OSSIM_PIXEL:
+            case OSSIM_MILES:
+            case OSSIM_MILLIMETERS:
+            {
+               break;
+            }
+            default:
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << "ossimTiling::validate()"
+                  << "\nMap projeciton requires tiling using linear spacing"
+                  << " but the spacing is in non linear" << std::endl;
+               result = false;
+            }
+         }
+      }
+   }
+   else
+   {
+      result = false;
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimTiling::validate()"
+         << "\nthe image projection is null and so not valid"
+         << std::endl;
+   }
+   if((theDelta.x <= FLT_EPSILON) ||
+      (theDelta.y <= FLT_EPSILON))
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimTiling::validate() the delta is too small or is negative"
+         << "value = " << theDelta << std::endl;
+      result = false;
+   }
+   if((theTilingDistance.x <= FLT_EPSILON)||
+      (theTilingDistance.y <= FLT_EPSILON))
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimTiling::validate()"
+         << "\nthe tiling distance is too small or is negative"
+         << "Value = " << theTilingDistance << std::endl;
+   }
+   
+   if(theImageRect.hasNans())
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimTiling::validate() the image rect has nans"
+         << std::endl;
+      result = false;
+   }
+   
+   return result;
+}
+
+bool ossimTiling::isAngularUnit(ossimUnitType unitType)const
+{
+   bool result = false;
+   
+   switch(unitType)
+   {
+      case OSSIM_DEGREES:
+      case OSSIM_RADIANS:
+      case OSSIM_SECONDS:
+      case OSSIM_MINUTES:
+      {
+         result = true;
+         break;
+      }
+      default:
+      {
+         break;
+      }
+   }
+   return result;
+}
+
+bool ossimTiling::isLinearUnit(ossimUnitType unitType)const
+{
+   bool result = false;
+   
+   switch(unitType)
+   {
+      case OSSIM_METERS:
+      case OSSIM_FEET:
+      case OSSIM_US_SURVEY_FEET:
+      case OSSIM_NAUTICAL_MILES:
+      case OSSIM_MILES:
+      case OSSIM_MILLIMETERS:
+      {
+         result = true;
+         break;
+      }
+      default:
+      {
+         break;
+      }
+   }
+   return result;
+   
+}
+
+void ossimTiling::setTileNameMask(const ossimString& mask)
+{
+   if(theTileNameMask == "")
+   {
+      theTileNameMask = "tile%i%";
+   }
+   if(mask.contains("%i%")||
+      mask.contains("%oc%")||
+      mask.contains("%or%")||
+      mask.contains("%r%")||
+      mask.contains("%c%")||
+      mask.contains("%SRTM%"))
+   {
+      theTileNameMask = mask;
+   }
+   else
+   {
+      theTileNameMask += "%i%";
+   }
+}
+
+ossimString ossimTiling::getTileNameMask()const
+{
+   return theTileNameMask;
+}
+
+bool ossimTiling::getRowCol(ossim_int64& row,
+                            ossim_int64& col,
+                            ossim_int64 tileId)const
+{
+   bool result = true;
+   
+   if((theTotalHorizontalTiles > 0)&&
+      (tileId < theTotalTiles))
+   {
+      row = tileId/static_cast<ossim_int64>(theTotalHorizontalTiles);
+      col = tileId%static_cast<ossim_int64>(theTotalHorizontalTiles);
+      if((col >= static_cast<ossim_int32>(theTotalHorizontalTiles)) &&
+         (row >= static_cast<ossim_int32>(theTotalVerticalTiles)))
+      {           
+         result = false;
+      }
+   }
+   return result;
+}
+
+bool ossimTiling::getOrigin(ossimDpt& origin,
+                            ossim_int64 tileId)const
+{
+   ossim_int64 row=0;
+   ossim_int64 col=0;
+   
+   bool result = getRowCol(row, col, tileId);
+   if(result)
+   {
+      result = getOrigin(origin, row, col);
+   }
+
+   return result;
+}
+
+bool ossimTiling::getOrigin(ossimDpt& origin,
+                            ossim_int64 row,
+                            ossim_int64 col)const
+{
+   bool result = false;
+
+   if((col < static_cast<ossim_int64>(theTotalHorizontalTiles)) &&
+      (row < static_cast<ossim_int64>(theTotalVerticalTiles)))
+   {
+      ossimDpt convertedTilingDistance;
+      getConvertedTilingDistance(convertedTilingDistance);
+
+      result = true;
+      if(theTilingRect.orientMode() == OSSIM_RIGHT_HANDED)
+      {
+         origin.x = theTilingRect.ul().x + col*convertedTilingDistance.x;
+         origin.y = theTilingRect.ul().y - row*convertedTilingDistance.y;
+      }
+      else
+      {
+         origin.x = theTilingRect.ul().x + col*convertedTilingDistance.x;
+         origin.y = theTilingRect.ul().y + row*convertedTilingDistance.y;
+      }
+   }
+
+   return result;
+}
+
+ossimDpt ossimTiling::getDeltaPerPixel()const
+{
+   
+   ossimDpt result = theDelta;
+
+   if (!theMapProjection)
+   {
+      return result;
+   }
+
+   if(theDeltaType == ossimTilingDeltaType_TOTAL_PIXELS)
+   {
+      result = ossimDpt(theTilingDistance.x/theDelta.x,
+                        theTilingDistance.y/theDelta.y);
+   }
+
+   ossimUnitConversionTool unitConverter(theMapProjection->origin(),
+                                         1.0,
+                                         theTilingDistanceUnitType);
+   if(theMapProjection->isGeographic())
+   {
+      unitConverter.setValue(result.x, theTilingDistanceUnitType);
+      result.x = unitConverter.getValue(OSSIM_DEGREES);
+      
+      unitConverter.setValue(result.y,
+                             theTilingDistanceUnitType);
+      result.y = unitConverter.getValue(OSSIM_DEGREES);
+   }
+   else
+   {
+      unitConverter.setValue(result.x,
+                             theTilingDistanceUnitType);
+      result.x = unitConverter.getValue(OSSIM_METERS);
+      
+      unitConverter.setValue(result.y,
+                             theTilingDistanceUnitType);
+      result.y = unitConverter.getValue(OSSIM_METERS);
+   }
+
+   return result;
+}
+
+void ossimTiling::getTileName(ossimString& resultingName,
+                              ossim_int64 row,
+                              ossim_int64 col,
+                              ossim_int64 id)const
+{
+   if(theTileNameMask == "")
+   {
+      ostringstream idString;
+      idString << id;
+      resultingName = ossimString("tile") + idString.str().c_str();
+   }
+   else if(theTileNameMask.contains("%SRTM%"))
+   {
+      // must be a 1x1 degree tiling distance
+      //
+      if((theTilingDistanceUnitType == OSSIM_DEGREES)&&
+         (theTilingDistance.x == 1.0)&&
+         (theTilingDistance.x == 1.0))
+      {
+         ostringstream latString;
+         ostringstream lonString;
+         
+         resultingName = "";
+         ossimDpt origin;
+         getOrigin(origin, row, col);
+         // the name is lower left and not upper left 
+         // subtract one degree
+         //
+         origin.lat -=1;
+         latString << setfill('0') << setw(2) << fabs(origin.lat);
+         lonString << setfill('0') << setw(3) << fabs(origin.lon);
+         
+         if(origin.lat < 0.0)
+         {
+            resultingName += "S";
+         }
+         else 
+         {
+            resultingName += "N";
+         }
+         resultingName += latString.str().c_str();
+         if(origin.lon < 0.0)
+         {
+            resultingName += "W";
+         }
+         else
+         {
+            resultingName += "E";
+         }
+         resultingName += lonString.str().c_str();
+         resultingName += ".hgt";
+      }
+   }
+   else
+   {
+      ostringstream rowString;
+      ostringstream colString;
+      ostringstream idString;
+      ostringstream oRowString;
+      ostringstream oColString;
+      ossimDpt      origin;
+      getOrigin(origin, row, col);
+      
+      rowString << row;
+      colString << col;
+      idString  << id;
+      oRowString << row;
+      oColString << col;
+      
+      resultingName = theTileNameMask;
+      resultingName = resultingName.substitute("%r%",
+                                               rowString.str().c_str());
+      resultingName = resultingName.substitute("%c%",
+                                               colString.str().c_str());
+      resultingName = resultingName.substitute("%i%",
+                                               idString.str().c_str());
+      resultingName = resultingName.substitute("%oc",
+                                               oColString.str().c_str());
+      resultingName = resultingName.substitute("%or",
+                                               oRowString.str().c_str());
+   }
+}
+
+void ossimTiling::clampGeographic(ossimDrect& rect)const
+{
+   ossimDpt ul = rect.ul();
+   ossimDpt lr = rect.lr();
+
+   if(ul.lat > 90) ul.lat = 90.0;
+   if(lr.lat < -90.0) lr.lat = -90.0;
+
+   if(ul.lon < -180) ul.lon = -180;
+   if(lr.lon > 180)  lr.lon = 180;
+
+   rect = ossimDrect(ul, lr, rect.orientMode());
+}
+
+bool ossimTiling::saveState(ossimKeywordlist& kwl,
+                            const char* prefix)const
+{
+   std::stringstream tilingDistance;
+
+   tilingDistance << theTilingDistance.x << " " << theTilingDistance.y << std::endl;
+   
+   kwl.add(prefix,
+           "tiling_distance",
+           tilingDistance.str().c_str(),
+           true);
+
+   
+   kwl.add(prefix,
+           "tiling_distance_type",
+           ossimUnitTypeLut::instance()->
+           getTableIndexString(theTilingDistanceUnitType),
+           true);
+   std::ostringstream delta;
+   delta << theDelta.x << " " << theDelta.y;
+   kwl.add(prefix,
+           "delta",
+           delta.str().c_str(),
+           true);
+   
+   if(theDeltaType == ossimTilingDeltaType_TOTAL_PIXELS)
+   {
+      kwl.add(prefix,
+              "delta_type",
+              "total_pixels",
+              true);
+   }
+   else
+   {
+      kwl.add(prefix,
+              "delta_type",
+              "delta_per_pixels",
+              true);
+   }
+   std::ostringstream padding;
+
+   padding << thePaddingSizeInPixels.x << " " << thePaddingSizeInPixels.y;
+   kwl.add(prefix,
+           "padding_size_in_pixels",
+           padding.str().c_str(),
+           true);
+
+   kwl.add(prefix,
+           "tile_name_mask",
+           theTileNameMask.c_str(),
+           true);
+
+   if (theOutputSizeInBytes)
+   {
+      kwl.add(prefix,
+              "output_size_in_bytes",
+              ossimString::toString(theOutputSizeInBytes).c_str(),
+              true);
+      kwl.add(prefix,
+              "output_bands",
+              theNumberOfBands,
+              true);
+      kwl.add(prefix,
+              "output_bytes_per_pixel_per_band",
+              theNumberOfBytesPerPixelPerBand,
+              true);
+   }
+
+   kwl.add(prefix,
+           "edge_to_edge",
+           ossimString::toString(theEdgeToEdgeFlag),
+           true);
+   
+   
+   return true;
+}
+
+bool ossimTiling::loadState(const ossimKeywordlist& kwl,
+                            const char* prefix)
+{
+   bool result = false;
+   
+   // Get the mask if any.
+   theTileNameMask = kwl.find(prefix, "tile_name_mask");
+   setTileNameMask(theTileNameMask);
+
+   const char* paddingSizeInPixels = kwl.find(prefix,
+                                              "padding_size_in_pixels");
+   if (paddingSizeInPixels)
+   {
+      ossimString x,y;
+      std::istringstream padding(ossimString(paddingSizeInPixels).c_str());
+      padding >> x >> y;
+      thePaddingSizeInPixels.x = x.toFloat64();
+      thePaddingSizeInPixels.y = y.toFloat64();
+   }
+   
+   // Check to tile by size in bytes.
+   const char* lookup;
+   if (kwl.numberOf(prefix, "output_size_in_"))
+   {
+      lookup = kwl.find(prefix, "output_size_in_bytes");
+      if (lookup)
+      {
+         theOutputSizeInBytes = ossimString(lookup).toInt64();
+      }
+      lookup = kwl.find(prefix, "output_size_in_kilo_bytes");
+      if (lookup)
+      {
+         theOutputSizeInBytes = ossimString(lookup).toInt64() * 1024;
+      }
+      lookup = kwl.find(prefix, "output_size_in_mega_bytes");
+      if (lookup)
+      {
+         theOutputSizeInBytes = ossimString(lookup).toInt64() * 1024 * 1024;
+      }
+   }
+
+   if (theOutputSizeInBytes)
+   {
+      
+      lookup = kwl.find(prefix, "output_bands");
+      if (lookup)
+      {
+         theNumberOfBands = ossimString(lookup).toInt32();
+      }
+      lookup = kwl.find(prefix, "output_bytes_per_pixel_per_band");
+      if (lookup)
+      {
+         theNumberOfBytesPerPixelPerBand = ossimString(lookup).toInt32();
+      }
+      
+      ossim_int64 pixelsPerBand = theOutputSizeInBytes /
+         (theNumberOfBands * theNumberOfBytesPerPixelPerBand);
+      
+      ossim_int32 oneDimension =
+         static_cast<ossim_int32>(floor(sqrt((double)pixelsPerBand)));
+
+      //---
+      // TODO: Clamp to power of two option. (drb)
+      //---
+      // theDelta.x = oneDimension;
+      // theDelta.y = oneDimension;
+      // theTilingDistance.x = 1;
+      // theTilingDistance.y = 1;
+      
+      theDelta.x = 1;
+      theDelta.y = 1;
+      theTilingDistance.x = oneDimension;
+      theTilingDistance.y = oneDimension;
+      theDeltaType = ossimTilingDeltaType_TOTAL_PIXELS;
+      theTilingDistanceUnitType = OSSIM_PIXEL;
+      result = true;
+   }
+   else
+   {
+      const char* tilingDistance = kwl.find(prefix,
+                                            "tiling_distance");
+      const char* tilingDistanceType = kwl.find(prefix,
+                                                "tiling_distance_type");
+      const char* delta = kwl.find(prefix,
+                                   "delta");
+      
+      const char* deltaType = kwl.find(prefix,
+                                       "delta_type");
+      
+      result = tilingDistance&&tilingDistanceType&&delta&&deltaType&&paddingSizeInPixels;
+      ossimString x,y;
+      std::istringstream distance(ossimString(tilingDistance).c_str());
+      distance >> x >> y;
+      theTilingDistance.x = x.toFloat64();
+      theTilingDistance.y = y.toFloat64();
+      if(theTilingDistance.x <= 0.0)
+      {
+         theTilingDistance.x = 1.0;
+      }
+      if(theTilingDistance.y<=0.0)
+      {
+         theTilingDistance.y = theTilingDistance.x;
+      }
+      
+      // unitLut.getTableIndexString(theTilingDistanceUnitType), ?????
+      
+      theTilingDistanceUnitType = (ossimUnitType)
+         ossimUnitTypeLut::instance()->getEntryNumber(
+            ossimString(tilingDistanceType).c_str());
+      
+      theDelta = ossimDpt(0,0);
+      x="";
+      y="";
+      std::istringstream deltaValues(ossimString(delta).c_str());
+      deltaValues >> x >> y;
+      theDelta.x = x.toFloat64();
+      theDelta.y = y.toFloat64();
+      
+      if(theDelta.x <= 0.0)
+      {
+         theDelta.x = 1.0;
+      }
+      
+      if(theDelta.y <= 0.0)
+      {
+         theDelta.y = theDelta.x;
+      }
+      
+      if(ossimString(deltaType).downcase().contains("total"))
+      {
+         theDeltaType = ossimTilingDeltaType_TOTAL_PIXELS;
+      }
+      else
+      {
+         theDeltaType = ossimTilingDeltaType_PER_PIXEL;
+      }
+   }
+   
+   lookup = kwl.find(prefix, "edge_to_edge");
+   if ( lookup )
+   {
+      theEdgeToEdgeFlag = ossimString::toBool(lookup);
+   }
+      
+   if (traceDebug())
+   {
+      print(ossimNotify(ossimNotifyLevel_DEBUG));
+   }
+
+   return result;
+}
+
+std::ostream& ossimTiling::print(std::ostream& out) const
+{
+   out << "theTilingDistance:                 " << theTilingDistance
+       << "\ntheTilingDistanceUnitType:       " << theTilingDistanceUnitType
+       << "\ntheDelta:                        " << theDelta
+       << "\ntheDeltaType:                    " << theDeltaType
+       << "\nthePaddingSizeInPixels:          " << thePaddingSizeInPixels
+       << "\ntheImageRect:                    " << theImageRect
+       << "\ntheTilingRect:                   " << theTilingRect
+       << "\ntheTileId:                       " << theTileId
+       << "\ntheTotalHorizontalTiles:         " << theTotalHorizontalTiles
+       << "\ntheTotalVerticalTiles:           " << theTotalVerticalTiles
+       << "\ntheTotalTiles:                   " << theTotalTiles
+       << "\ntheTileNameMask:                 " << theTileNameMask
+       << "\ntheOutputSizeInBytes:            " << theOutputSizeInBytes
+       << "\ntheNumberOfBands:                " << theNumberOfBands
+       << "\ntheNumberOfBytesPerPixelPerBand: " <<
+      theNumberOfBytesPerPixelPerBand
+       << "\ntheEdgeToEdgeFlag:               " << theEdgeToEdgeFlag
+       << "\n";
+
+   if (theMapProjection.valid())
+   {
+      out << "\ntheMapProjection:\n";
+      theMapProjection->print(out);
+   }
+   else
+   {
+      out << "theMapProjection is not set.";
+   }
+   out << endl;
+
+   return out;
+}
+
+void ossimTiling::getConvertedTilingDistance(ossimDpt& pt) const
+{
+   if(theTilingDistanceUnitType == OSSIM_PIXEL)
+   {
+      pt = theTilingDistance;
+      return;
+   }
+   if (!theMapProjection)
+   {
+      // This should not happen...
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimTiling::getConvertedTilingDistance WARNING"
+         << " projection not set!" << endl;
+      pt = theTilingDistance;
+      return;
+   }
+   ossimUnitConversionTool unitConverter(theMapProjection->origin(),
+                                         1.0,
+                                         theTilingDistanceUnitType);
+
+   if(theMapProjection->isGeographic())
+   {
+      unitConverter.setValue(theTilingDistance.x,
+                             theTilingDistanceUnitType);
+      pt.x = unitConverter.getValue(OSSIM_DEGREES);
+      
+      unitConverter.setValue(theTilingDistance.y,
+                             theTilingDistanceUnitType);
+      pt.y = unitConverter.getValue(OSSIM_DEGREES);
+   }
+   else
+   {
+      unitConverter.setValue(theTilingDistance.x,
+                             theTilingDistanceUnitType);
+      pt.x = unitConverter.getValue(OSSIM_METERS);
+      
+      unitConverter.setValue(theTilingDistance.y,
+                             theTilingDistanceUnitType);
+      pt.y = unitConverter.getValue(OSSIM_METERS);
+   }
+}
+
diff --git a/ossim/src/ossim/imaging/ossimTilingPoly.cpp b/ossim/src/ossim/imaging/ossimTilingPoly.cpp
new file mode 100644
index 0000000..52a0ce8
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimTilingPoly.cpp
@@ -0,0 +1,370 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Mingjie Su
+// 
+// Description: implementation for image generator
+//
+//*************************************************************************
+// $Id: ossimTilingPoly.cpp 2725 2011-06-15 18:13:07Z david.burken $
+
+#include <sstream>
+#include <iomanip>
+#include <ossim/imaging/ossimTilingPoly.h>
+#include <ossim/base/ossimUnitTypeLut.h>
+#include <ossim/base/ossimUnitConversionTool.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimEsriShapeFileInterface.h>
+
+static ossimTrace traceDebug("ossimTilingPoly:debug");
+
+RTTI_DEF1(ossimTilingPoly, "ossimTilingPoly", ossimTilingRect);
+
+ossimTilingPoly::ossimTilingPoly()
+      : ossimTilingRect(),
+      m_shpFilename(""),
+      m_useMbr(true),
+      m_bufferDistance(0.0),
+      m_exteriorCut(0),
+      m_interiorCut(0),
+      m_featureBoundingIntersect(true)
+{
+}
+
+ossimTilingPoly::~ossimTilingPoly()
+{
+   m_exteriorCut = 0; // Ref ptr, not a leak.
+   m_interiorCut = 0; // ditto...
+   m_features.clear();
+}
+
+bool ossimTilingPoly::initialize(const ossimMapProjection& proj,
+                             const ossimIrect& boundingRect)
+{
+   bool result = false;
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimTilingPoly::initialize DEBUG: Entered..."
+         << "\nBounding rect === " << boundingRect
+         << std::endl;
+   }
+
+   ossimDpt convertedTilingDistance = theTilingDistance;
+   result = initializeBase(proj, boundingRect, convertedTilingDistance);
+   if (result)
+   {
+      return parseShpFile();
+   }
+   return result;
+}
+
+bool ossimTilingPoly::next(ossimRefPtr<ossimMapProjection>& resultProjection,
+                           ossimIrect& resultingBounds,
+                           ossimString& resultingName)
+{
+   bool result = true;
+   
+   if(theTileId < theTotalTiles)
+   {
+      ostringstream idString;
+      ossim_int64 tileId = theTileId + 1;
+      if (tileId < static_cast<ossim_int64>(m_features.size()))
+      {
+         idString  << m_features[tileId].m_fid;
+         resultingName = theTileNameMask;
+         resultingName = resultingName.substitute("%f%", idString.str().c_str());
+      }
+      result = nextFeature();
+      resultingBounds = m_exteriorCut->getRectangle();
+
+      resultProjection = theMapProjection;
+
+      ++theTileId; 
+   }
+   else
+   {
+      result = false;
+   }
+
+   return result;
+}
+
+bool ossimTilingPoly::saveState(ossimKeywordlist& kwl,
+                                const char* prefix)const
+{
+   kwl.add(prefix,
+           "tile_source",
+           m_shpFilename.c_str(),
+           true);
+
+   kwl.add(prefix,
+      "paddding_use_mbr",
+      m_useMbr,
+      true);
+
+   return  ossimTilingRect::saveState(kwl, prefix);;
+}
+
+bool ossimTilingPoly::loadState(const ossimKeywordlist& kwl,
+                            const char* prefix)
+{
+   bool result = ossimTilingRect::loadState(kwl, prefix);
+   
+   //Get the shp file if any
+   m_shpFilename = kwl.find(prefix, "tile_source");
+
+   // Get the mask if any.
+   if (!m_shpFilename.empty())
+   {
+      if (theTileNameMask.contains("%r%_%c%"))
+      {
+         theTileNameMask = theTileNameMask.substitute("%r%_%c%", "%f%", true);
+      }
+      result = true;
+   }
+ 
+   const char* useMbr = kwl.find(prefix, "padding_use_mbr");
+   if (useMbr)
+   {
+      if (!ossimString(useMbr).toBool())
+      {
+         m_useMbr = false;
+         m_bufferDistance = thePaddingSizeInPixels.x;
+      }
+   }
+
+   return result;
+}
+
+bool ossimTilingPoly::nextFeature()
+{
+   if (m_exteriorCut == 0)
+   {
+      m_exteriorCut = new ossimGeoPolyCutter;
+      m_exteriorCut->setView(theMapProjection.get());
+   }
+   
+   bool result = false;
+   ossim_int64 tileId = theTileId + 1;//use (theTileId+1) because theTileId is intialized as -1
+   if (tileId < static_cast<ossim_int64>(m_features.size())) 
+   {
+      if (m_features[tileId].m_polygon.size() > 0)
+      {
+         if (m_features[tileId].m_polyType == ossimGeoAnnotationPolyObject::OSSIM_POLY_INTERIOR_RING)
+         {
+            if (m_interiorCut == 0)
+            {
+               m_interiorCut = new ossimGeoPolyCutter;
+               m_interiorCut->setView(theMapProjection.get());
+               m_interiorCut->setCutType(ossimPolyCutter::OSSIM_POLY_NULL_INSIDE);
+            }
+            m_interiorCut->setPolygon(m_features[tileId].m_polygon);
+         }
+         else
+         {
+            // std::vector<ossimGpt> points = m_features[tileId].m_polygon;
+            // for (ossim_uint32 i = 0; i < points.size(); i++)
+            // {
+            //    ossimGpt point = points[i];
+            // }
+            m_exteriorCut->setPolygon(m_features[tileId].m_polygon);
+            setRect();
+         }
+         result = true;
+      }
+      else if (m_features[tileId].m_multiPolys.size() > 0)
+      {
+         for (ossim_uint32 i = 0; i < m_features[tileId].m_multiPolys.size(); i++)
+         {
+            ossimGeoPolygon geoPoly = m_features[tileId].m_multiPolys[i];
+            std::vector<ossimGeoPolygon> holePolys = geoPoly.getHoleList();
+            if (holePolys.size() > 0)
+            {
+               if (m_interiorCut == 0)
+               {
+                  m_interiorCut = new ossimGeoPolyCutter;
+                  m_interiorCut->setView(theMapProjection.get());
+                  m_interiorCut->setCutType(ossimPolyCutter::OSSIM_POLY_NULL_INSIDE);
+               }
+               m_interiorCut->clear();
+               for (ossim_uint32 j = 0; j < holePolys.size(); j++)
+               {
+                  m_interiorCut->addPolygon(holePolys[j]);
+               }
+            }
+            m_exteriorCut->setPolygon(m_features[tileId].m_multiPolys[i]);
+            setRect();
+         }
+         result = true;
+      }
+   }
+   else
+   {
+      result = false;
+   }
+   return result;
+}
+
+ void ossimTilingPoly::setRect()
+ {
+    ossimIrect rect = m_exteriorCut->getRectangle();
+    if (rect.intersects(theImageRect))
+    {
+       m_featureBoundingIntersect = true;
+       if (!rect.completely_within(theImageRect))
+       {
+          ossimIrect clipRect = rect.clipToRect(theImageRect);
+          m_exteriorCut->setRectangle(clipRect);
+          rect = clipRect;
+       }
+    }
+    else
+    {
+       m_featureBoundingIntersect = false;
+    }
+    if (m_useMbr)
+    {
+       if (thePaddingSizeInPixels.x > 0 && thePaddingSizeInPixels.y > 0)
+       {
+          ossimIrect newRect = ossimIrect(rect.ul().x-(ossim_int32)thePaddingSizeInPixels.x,
+             rect.ul().y-(ossim_int32)thePaddingSizeInPixels.y,
+             rect.lr().x + (ossim_int32)thePaddingSizeInPixels.x,
+             rect.lr().y + (ossim_int32)thePaddingSizeInPixels.y);
+          ossimIrect clipRect = newRect.clipToRect(theImageRect);//in case the bounding is larger than input image after adding buffer
+          m_exteriorCut->setRectangle(clipRect);
+       }
+    }
+ }
+
+bool ossimTilingPoly::parseShpFile()
+{
+   m_features.clear();
+
+   ossimString query = "";
+   bool result = false;
+   if (m_shpFilename.contains("|"))
+   {
+      ossimString fileName = m_shpFilename;
+      std::vector<ossimString> fileList = fileName.split("|");
+      if (fileList.size() > 1)
+      {
+         m_shpFilename = fileList[0];
+         query = fileList[1];
+      }
+   }
+
+   ossimRefPtr<ossimImageHandler> shpHandler = ossimImageHandlerRegistry::instance()->open(m_shpFilename);
+   ossimEsriShapeFileInterface* shpInterface = PTR_CAST(ossimEsriShapeFileInterface, shpHandler.get());
+   if (shpInterface != 0)
+   {
+      if (!query.empty())
+      {
+         shpInterface->setQuery(query);
+      }
+      if (m_useMbr == false)
+      {
+         ossimProjection* proj = shpHandler->getImageGeometry()->getProjection();
+         ossimMapProjection* mapProj = PTR_CAST(ossimMapProjection, proj);
+         if (mapProj)
+         {
+            if (mapProj->isGeographic())
+            {
+               m_bufferDistance = thePaddingSizeInPixels.x * theMapProjection->getDecimalDegreesPerPixel().x;
+               shpInterface->setGeometryBuffer(m_bufferDistance, OSSIM_DEGREES);
+            }
+            else
+            {
+               m_bufferDistance = thePaddingSizeInPixels.x * theMapProjection->getMetersPerPixel().x;
+               shpInterface->setGeometryBuffer(m_bufferDistance, OSSIM_METERS);
+            }
+         }
+      }
+      std::multimap<long, ossimAnnotationObject*> features = shpInterface->getFeatureTable();
+      if (features.size() > 0)
+      {
+         std::multimap<long, ossimAnnotationObject*>::iterator it = features.begin();
+         while (it != features.end())
+         {
+            ossimAnnotationObject* anno = it->second;
+            if (anno != 0)
+            {
+               ossimGeoAnnotationPolyObject* annoPoly = PTR_CAST(ossimGeoAnnotationPolyObject, anno);
+               ossimGeoAnnotationMultiPolyObject* annoMultiPoly = 0;
+               if (annoPoly == 0)
+               {
+                  annoMultiPoly = PTR_CAST(ossimGeoAnnotationMultiPolyObject, anno);
+               }
+               if (annoPoly != 0)
+               {
+                  result = true;
+                  std::vector<ossimGpt> polygon;
+
+                  //get the points of a polygon
+                  std::vector<ossimGpt> points = annoPoly->getPoints();
+                  for (ossim_uint32 i = 0; i < points.size(); i++)
+                  {
+                     polygon.push_back(points[i]);
+                  }
+
+                  //get polygon type, if it is an internal polygon, initialize the internal cutter
+                  ossimGeoAnnotationPolyObject::ossimPolyType polyType = annoPoly->getPolyType();
+                  ossimShpFeature feature(it->first, polyType, polygon, std::vector<ossimGeoPolygon>()); 
+                  m_features.push_back(feature);
+               }
+               else if (annoMultiPoly != 0)
+               {
+                  std::vector<ossimGeoPolygon> multiPolys = annoMultiPoly->getMultiPolygon();
+                  ossimShpFeature feature(it->first, 0, std::vector<ossimGpt>(), multiPolys); 
+               }
+            }
+            it++;
+         }
+      }
+   }
+   if (m_features.size() > 0)
+   {
+      theTotalTiles = m_features.size();
+      result = true;
+   }
+   return result;
+}
+
+bool ossimTilingPoly::useMbr() const
+{
+   //if the use_mbr is set to true, no matter if the padding is set to 0 or greater than 0,
+   //always clip the MBR of each feature
+   return m_useMbr;
+}
+
+bool ossimTilingPoly::hasExteriorCut() const
+{
+   return m_exteriorCut.valid();
+}
+
+bool ossimTilingPoly::hasInteriorCut() const
+{
+   return m_interiorCut.valid();
+}
+
+ossimRefPtr<ossimGeoPolyCutter>& ossimTilingPoly::getExteriorCut()
+{
+   return m_exteriorCut;
+}
+
+ossimRefPtr<ossimGeoPolyCutter>& ossimTilingPoly::getInteriorCut()
+{
+   return m_interiorCut;
+}
+
+bool ossimTilingPoly::isFeatureBoundingIntersect() const
+{
+   return m_featureBoundingIntersect;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimTilingRect.cpp b/ossim/src/ossim/imaging/ossimTilingRect.cpp
new file mode 100644
index 0000000..e53e301
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimTilingRect.cpp
@@ -0,0 +1,887 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Mingjie Su
+// 
+// Description: implementation for image generator
+//
+//*************************************************************************
+// $Id: ossimTilingRect.cpp 2725 2011-06-15 18:13:07Z david.burken $
+
+#include <sstream>
+#include <iomanip>
+#include <ossim/imaging/ossimTilingRect.h>
+#include <ossim/base/ossimUnitTypeLut.h>
+#include <ossim/base/ossimUnitConversionTool.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimEsriShapeFileInterface.h>
+
+static ossimTrace traceDebug("ossimTilingRect:debug");
+
+RTTI_DEF1(ossimTilingRect, "ossimTilingRect", ossimTiling);
+
+ossimTilingRect::ossimTilingRect()
+      : ossimTiling(),
+      m_clipToAoi(true),
+      m_lastWidth(0),
+      m_lastHeight(0),
+      m_useOffset(false),
+      m_offsetInPixels(0,0),
+      m_tilingDistanceInPixels(0,0),
+      m_tilinResolutionDistance(ossim::nan(),ossim::nan()),
+      m_tilingResolutionUnitType(OSSIM_UNIT_UNKNOWN),
+      m_fractionalPixelMisalignment(ossim::nan(),ossim::nan())
+{
+}
+
+ossimTilingRect::~ossimTilingRect()
+{
+}
+
+bool ossimTilingRect::initializeBase(const ossimMapProjection& proj,
+   const ossimIrect& boundingRect,
+   ossimDpt& convertedTilingDistance)
+{
+   theMapProjection = (ossimMapProjection*)proj.dup();
+   theImageRect     = boundingRect;
+
+   ossimDpt gsd = theMapProjection->getMetersPerPixel();
+   // Find image center and GSD at that point:
+   if (theMapProjection->isGeographic() && theTilingDistanceUnitType != OSSIM_DEGREES)
+   {
+      ossimRefPtr<ossimImageGeometry> geom = new ossimImageGeometry (0, theMapProjection.get());
+      geom->setImageSize(ossimIpt(theImageRect.width(), theImageRect.height()));
+      gsd = geom->getMetersPerPixel();
+   }
+
+   m_tilingDistanceInPixels = theTilingDistance;
+
+   //if resolution and resolution type are defined, need to reset degree/meter per pixel and the image rect. do calculation below
+   ossim_float64 latDiff = 0.0;
+   ossim_float64 lonDiff = 0.0;
+   ossim_uint32 imageWidth = 0;
+   ossim_uint32 imageHeight = 0;
+   if (!m_tilinResolutionDistance.hasNans())
+   {
+      ossimDpt result(0,0);
+      if (m_tilingResolutionUnitType == OSSIM_DEGREES)
+      {
+         ossimGpt ulg;
+         ossimGpt llg;
+         ossimGpt lrg;
+         ossimGpt urg;
+
+         theMapProjection->lineSampleToWorld(theImageRect.ul(), ulg);
+         theMapProjection->lineSampleToWorld(theImageRect.ll(), llg);
+         theMapProjection->lineSampleToWorld(theImageRect.lr(), lrg);
+         theMapProjection->lineSampleToWorld(theImageRect.ur(), urg);
+
+         latDiff = fabs(ulg.lat - llg.lat);
+         lonDiff = fabs(urg.lon - llg.lon);
+
+         if (!theMapProjection->isGeographic())
+         {
+            ossim_float64 tileHorizatalNum = lonDiff/m_tilinResolutionDistance.x;
+            ossim_float64 tileVerticalNum = latDiff/m_tilinResolutionDistance.y;
+
+            if (theTilingDistanceUnitType != OSSIM_PIXEL) //convert tiling distance to pixel if unit type is not pixel
+            {
+               ossimDpt convertedDis = m_tilingDistanceInPixels;
+               getConvertedDistance(convertedDis, m_tilingDistanceInPixels);
+               imageWidth = (ossim_uint32)convertedDis.x/gsd.x*tileHorizatalNum;
+               imageHeight = (ossim_uint32)convertedDis.y/gsd.y*tileVerticalNum;
+            }
+            else
+            {
+               imageWidth = (ossim_uint32)m_tilingDistanceInPixels.x*tileHorizatalNum;
+               imageHeight = (ossim_uint32)m_tilingDistanceInPixels.y*tileVerticalNum;
+            }
+            result = ossimDpt(theImageRect.width()*gsd.x/imageWidth, theImageRect.height()*gsd.y/imageHeight);
+            gsd = result;
+
+            theMapProjection->setMetersPerPixel(result);
+         }
+         else
+         {
+            result = ossimDpt(m_tilinResolutionDistance.x/m_tilingDistanceInPixels.x,
+               m_tilinResolutionDistance.y/m_tilingDistanceInPixels.y);
+
+            theMapProjection->setDecimalDegreesPerPixel(result);
+         }
+      }
+      else //only handle degree type for resolution
+      {
+         return false;
+      }
+   }
+
+   if (theTilingDistanceUnitType != OSSIM_PIXEL)
+   {
+      ossimDpt paddingSize = getPaddingSize();//convert padding size to meters or degree
+      getConvertedDistance(convertedTilingDistance, theTilingDistance);
+
+      ossimDpt convertedOffset = m_offsetInPixels;
+      if (m_useOffset)
+      {
+         getConvertedDistance(convertedOffset, m_offsetInPixels);
+      }
+
+      if (theMapProjection->isGeographic() && theTilingDistanceUnitType == OSSIM_DEGREES)
+      {
+         thePaddingSizeInPixels.x = ossim::round<int>(paddingSize.x / theMapProjection->getDecimalDegreesPerPixel().x);
+         thePaddingSizeInPixels.y = ossim::round<int>(paddingSize.y / theMapProjection->getDecimalDegreesPerPixel().y);
+
+         double intpart;
+         m_fractionalPixelMisalignment.x = modf(convertedTilingDistance.x / theMapProjection->getDecimalDegreesPerPixel().x, &intpart);
+         m_fractionalPixelMisalignment.y = modf(convertedTilingDistance.y / theMapProjection->getDecimalDegreesPerPixel().y, &intpart);
+
+         m_tilingDistanceInPixels.x = ossim::round<int>(convertedTilingDistance.x / theMapProjection->getDecimalDegreesPerPixel().x);
+         m_tilingDistanceInPixels.y = ossim::round<int>(convertedTilingDistance.y / theMapProjection->getDecimalDegreesPerPixel().y);
+
+         if (m_useOffset)
+         {
+            m_offsetInPixels.x = ossim::round<int>(convertedOffset.x / theMapProjection->getDecimalDegreesPerPixel().x);
+            m_offsetInPixels.y = ossim::round<int>(convertedOffset.y / theMapProjection->getDecimalDegreesPerPixel().y);
+         }
+      }
+      else
+      {
+         thePaddingSizeInPixels.x = ossim::round<int>(paddingSize.x / gsd.x);
+         thePaddingSizeInPixels.y = ossim::round<int>(paddingSize.y / gsd.y);
+
+         double intpart;
+         m_fractionalPixelMisalignment.x = modf(convertedTilingDistance.x / gsd.x, &intpart);
+         m_fractionalPixelMisalignment.y = modf(convertedTilingDistance.y / gsd.y, &intpart);
+
+         m_tilingDistanceInPixels.x = ossim::round<int>(convertedTilingDistance.x / gsd.x);
+         m_tilingDistanceInPixels.y = ossim::round<int>(convertedTilingDistance.y / gsd.y);
+
+         if (m_useOffset)
+         {
+            m_offsetInPixels.x = ossim::round<int>(convertedOffset.x / gsd.x);
+            m_offsetInPixels.y = ossim::round<int>(convertedOffset.y / gsd.y);
+         }
+      }
+   }
+   else
+   {
+      if (theMapProjection->isGeographic())
+      {
+         theTilingDistance.x = theTilingDistance.x * theMapProjection->getDecimalDegreesPerPixel().x;
+         theTilingDistance.y = theTilingDistance.y * theMapProjection->getDecimalDegreesPerPixel().y;
+      }
+      else
+      {
+         theTilingDistance.x = theTilingDistance.x * gsd.x;
+         theTilingDistance.y = theTilingDistance.y * gsd.y;
+      }
+   }
+
+   //re-calculation the image rect if resolution and resolution type defined
+   if (!m_tilinResolutionDistance.hasNans())
+   {
+      if (theMapProjection->isGeographic())
+      {
+         imageWidth = (ossim_uint32)m_tilingDistanceInPixels.x * lonDiff;
+         imageHeight = (ossim_uint32)m_tilingDistanceInPixels.y * latDiff;
+      }
+
+      //avoid very small pixel offset by calculation if tiling distance unit type is pixel
+      if (theTilingDistanceUnitType == OSSIM_PIXEL)
+      {
+         if (imageWidth % (ossim_int32)m_tilingDistanceInPixels.x != 0)
+         {
+            ossim_int32 numX =  ossim::round<int>((double)imageWidth/m_tilingDistanceInPixels.x);
+            imageWidth = m_tilingDistanceInPixels.x * numX;
+         }
+         if (imageHeight % (ossim_int32)m_tilingDistanceInPixels.y != 0)
+         {
+            ossim_int32 numY =  ossim::round<int>((double)imageHeight/m_tilingDistanceInPixels.y);
+            imageHeight = m_tilingDistanceInPixels.y * numY;
+         }
+      }
+    
+      theImageRect = ossimIrect(boundingRect.ul(),
+         ossimIpt((boundingRect.ul().x + imageWidth), boundingRect.ul().y),
+         ossimIpt((boundingRect.ul().x + imageWidth), (imageHeight - boundingRect.ul().y)),
+         ossimIpt(boundingRect.ul().x , (imageHeight - boundingRect.ul().y)));
+   }
+   return true;
+}
+
+bool ossimTilingRect::initialize(const ossimMapProjection& proj,
+   const ossimIrect& boundingRect)
+{
+   bool result = false;
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimTilingRect::initialize DEBUG: Entered..."
+         << "\nBounding rect === " << boundingRect
+         << std::endl;
+   }
+
+   ossimDpt convertedTilingDistance = theTilingDistance;
+   result = initializeBase(proj, boundingRect, convertedTilingDistance);
+   ossimDrect tilingRectInPixels = theImageRect;
+
+   // Let's setup the bounding tile rect.
+   if(theMapProjection->isGeographic())
+   {
+      ossimGpt ul;
+      ossimGpt ur;
+      ossimGpt lr;
+      ossimGpt ll;
+
+      theMapProjection->lineSampleToWorld(theImageRect.ul(), ul);
+      theMapProjection->lineSampleToWorld(theImageRect.ur(), ur);
+      theMapProjection->lineSampleToWorld(theImageRect.lr(), lr);
+      theMapProjection->lineSampleToWorld(theImageRect.ll(), ll);
+
+      theTilingRect = ossimDrect(ossimDpt(ul), ossimDpt(ur), ossimDpt(lr), ossimDpt(ll),
+         OSSIM_RIGHT_HANDED);
+
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG: Geographic input bounds =  "
+            << theTilingRect
+            << std::endl;
+      }
+
+      if (!m_clipToAoi)
+      {
+         theTilingRect.stretchToTileBoundary(convertedTilingDistance);
+      }
+
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG: Geographic input bounds stretched =  "
+            << theTilingRect << std::endl;
+      }
+
+      clampGeographic(theTilingRect);
+
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG: Geographic input bounds clamped =  "
+            << theTilingRect << std::endl;
+      }
+
+   }  // End "if(theMapProjection->isGeographic())"
+   else // meters
+   {
+      ossimDpt ul;
+      ossimDpt ur;
+      ossimDpt lr;
+      ossimDpt ll;
+
+      theMapProjection->lineSampleToEastingNorthing(theImageRect.ul(), ul);
+      theMapProjection->lineSampleToEastingNorthing(theImageRect.ur(), ur);
+      theMapProjection->lineSampleToEastingNorthing(theImageRect.lr(), lr);
+      theMapProjection->lineSampleToEastingNorthing(theImageRect.ll(), ll);
+      theTilingRect = ossimDrect(ul, ur, lr, ll, OSSIM_RIGHT_HANDED);
+
+      if (!m_clipToAoi)
+      {
+         theTilingRect.stretchToTileBoundary(convertedTilingDistance);
+      }
+   }
+
+   theTotalHorizontalTiles = ossim::round<int>(fabs(tilingRectInPixels.ur().x - tilingRectInPixels.ul().x)/m_tilingDistanceInPixels.x);
+   theTotalVerticalTiles   = ossim::round<int>(fabs(tilingRectInPixels.ur().y - tilingRectInPixels.lr().y)/m_tilingDistanceInPixels.y);
+
+   if (m_clipToAoi)
+   {
+      if (m_useOffset)
+      {
+         ossim_float32 totalHorizontalTilesAfterOffset = 
+            ((fabs(tilingRectInPixels.ur().x - tilingRectInPixels.ul().x))-m_tilingDistanceInPixels.x)/(m_tilingDistanceInPixels.x - m_offsetInPixels.x) + 1;
+         ossim_float32 totalVerticalTilesAfterOffset = 
+            ((fabs(tilingRectInPixels.ur().y - tilingRectInPixels.lr().y))-m_tilingDistanceInPixels.y)/(m_tilingDistanceInPixels.y - m_offsetInPixels.y) + 1;
+
+         ossim_float32 lastHorizontal = totalHorizontalTilesAfterOffset - (ossim_int32)totalHorizontalTilesAfterOffset;
+         ossim_float32 lastVertical = totalVerticalTilesAfterOffset - (ossim_int32)totalVerticalTilesAfterOffset;
+
+         m_lastWidth = ossim::round<int>(fabs(lastHorizontal* (m_tilingDistanceInPixels.x - m_offsetInPixels.x) + m_offsetInPixels.x));
+         m_lastHeight = ossim::round<int>(fabs(lastVertical* (m_tilingDistanceInPixels.y - m_offsetInPixels.y) + m_offsetInPixels.y));
+
+         theTotalHorizontalTiles = ossim::round<int>(totalHorizontalTilesAfterOffset);
+         theTotalVerticalTiles = ossim::round<int>(totalVerticalTilesAfterOffset);
+
+         if (m_lastWidth > 0 && (lastHorizontal < 0.5))//if lastHorizontal is less than 0.5, the last tile will not add to total tiles after rounding, do here
+         {
+            theTotalHorizontalTiles = theTotalHorizontalTiles + 1;
+         }
+         if (m_lastHeight > 0 && (lastVertical < 0.5))
+         {
+            theTotalVerticalTiles = theTotalVerticalTiles + 1;
+         }
+      }
+      else
+      {
+         ossim_int32 tmpX = (ossim_int32)(fabs(tilingRectInPixels.ur().x - tilingRectInPixels.ul().x)) + 1;
+         ossim_int32 tmpY = (ossim_int32)(fabs(tilingRectInPixels.ur().y - tilingRectInPixels.lr().y)) + 1;
+
+         ossim_int32 modValueX = tmpX % (ossim_int32)m_tilingDistanceInPixels.x;
+         ossim_int32 modValueY = tmpY % (ossim_int32)m_tilingDistanceInPixels.y;
+         if (modValueX >= 1)
+         {
+            m_lastWidth = modValueX;
+         }
+         else
+         {
+            m_lastWidth = m_tilingDistanceInPixels.x;
+         }
+         if (modValueY >= 1)
+         {
+            m_lastHeight = modValueY;
+         }
+         else
+         {
+            m_lastHeight = m_tilingDistanceInPixels.y;
+         }
+
+         if (m_lastWidth > 0)
+         {  
+            if (m_lastWidth < m_tilingDistanceInPixels.x/2)
+            {
+               theTotalHorizontalTiles = theTotalHorizontalTiles + 1;
+            }
+         }
+         if (m_lastHeight > 0)
+         {
+            if (m_lastHeight < m_tilingDistanceInPixels.y/2)
+            {
+               theTotalVerticalTiles = theTotalVerticalTiles + 1;
+            }
+         }
+      }
+   }
+
+   theTotalTiles = theTotalHorizontalTiles*theTotalVerticalTiles;
+
+   // reset the tile id to the beginning
+   reset();
+
+   if(traceDebug())
+   {
+      print(ossimNotify(ossimNotifyLevel_DEBUG));
+
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "\nossimTiling::initialize DEBUG: Leaving..." << std::endl;
+   }
+
+   return result;
+}
+
+bool ossimTilingRect::next(ossimRefPtr<ossimMapProjection>& resultProjection,
+   ossimIrect& resultingBounds,
+   ossimString& resultingName)
+{
+   bool result = true;
+
+   if(theTileId < theTotalTiles)
+   {
+      ossimDpt origin;
+      ossim_int64 row=0;
+      ossim_int64 col=0;
+
+      getRowCol(row, col, theTileId);
+
+      getTileName(resultingName,
+         (row+1), (col+1), theTileId);
+
+      getOrigin(origin, row, col);
+
+      if (!m_fractionalPixelMisalignment.isNan())
+      {
+         if (row == 0 && col != 0)
+         {
+            if (m_fractionalPixelMisalignment.x >= 0.5)
+            {
+               if (theMapProjection->isGeographic())
+               {
+                  origin.x = origin.x + (1 - m_fractionalPixelMisalignment.x) * theMapProjection->getDecimalDegreesPerPixel().x * col;
+               }
+               else
+               {
+                  origin.x = origin.x + (1 - m_fractionalPixelMisalignment.x) * theMapProjection->getMetersPerPixel().x * col;
+               }
+            }  
+            else
+            {
+               if (theMapProjection->isGeographic())
+               {
+                  origin.x = origin.x - m_fractionalPixelMisalignment.x * theMapProjection->getDecimalDegreesPerPixel().x * col;
+               }
+               else
+               {
+                  origin.x = origin.x - m_fractionalPixelMisalignment.x * theMapProjection->getMetersPerPixel().x * col;
+               }
+            }
+         }
+         else if (col == 0 && row != 0)
+         {
+            if (m_fractionalPixelMisalignment.y >= 0.5)
+            {
+               if (theMapProjection->isGeographic())
+               {
+                  origin.y = origin.y - (1 - m_fractionalPixelMisalignment.y) * theMapProjection->getDecimalDegreesPerPixel().y * row;
+               }
+               else
+               {
+                  origin.y = origin.y - (1 - m_fractionalPixelMisalignment.y) * theMapProjection->getMetersPerPixel().y * row;
+               }
+            }
+            else
+            {
+               if (theMapProjection->isGeographic())
+               {
+                  origin.y = origin.y + m_fractionalPixelMisalignment.y * theMapProjection->getDecimalDegreesPerPixel().y * row;
+               }
+               else
+               {
+                  origin.y = origin.y + m_fractionalPixelMisalignment.y * theMapProjection->getMetersPerPixel().y * row;
+               }  
+            }
+         }
+         else if (col != 0 && row != 0)
+         {
+            if (m_fractionalPixelMisalignment.x >= 0.5)
+            {
+               if (theMapProjection->isGeographic())
+               {
+                  origin.x = origin.x + (1 - m_fractionalPixelMisalignment.x) * theMapProjection->getDecimalDegreesPerPixel().x * col;
+               }
+               else
+               {
+                  origin.x = origin.x + (1 - m_fractionalPixelMisalignment.x) * theMapProjection->getMetersPerPixel().x * col;
+               }
+            }  
+            else
+            {
+               if (theMapProjection->isGeographic())
+               {
+                  origin.x = origin.x - m_fractionalPixelMisalignment.x * theMapProjection->getDecimalDegreesPerPixel().x * col;
+               }
+               else
+               {
+                  origin.x = origin.x - m_fractionalPixelMisalignment.x * theMapProjection->getMetersPerPixel().x * col;
+               }
+            }
+
+            if (m_fractionalPixelMisalignment.y >= 0.5)
+            {
+               if (theMapProjection->isGeographic())
+               {
+                  origin.y = origin.y - (1 - m_fractionalPixelMisalignment.y) * theMapProjection->getDecimalDegreesPerPixel().y * row;
+               }
+               else
+               {
+                  origin.y = origin.y - (1 - m_fractionalPixelMisalignment.y) * theMapProjection->getMetersPerPixel().y * row;
+               }
+            }
+            else
+            {
+               if (theMapProjection->isGeographic())
+               {
+                  origin.y = origin.y + m_fractionalPixelMisalignment.y * theMapProjection->getDecimalDegreesPerPixel().y * row;
+               }
+               else
+               {
+                  origin.y = origin.y + m_fractionalPixelMisalignment.y * theMapProjection->getMetersPerPixel().y * row;
+               }  
+            }
+         }
+      }
+
+      ossimIpt pixels = ossimDpt(m_tilingDistanceInPixels.x, m_tilingDistanceInPixels.y);
+
+      if(theMapProjection->isGeographic())
+      {
+         theMapProjection->setUlTiePoints(
+            ossimGpt(origin.lat,
+            origin.lon,
+            0.0,
+            theMapProjection->origin().datum()));
+      }
+      else
+      {
+         theMapProjection->setUlTiePoints(ossimDpt(origin.x, origin.y));
+      }
+
+      if (m_clipToAoi || m_useOffset)
+      {
+         if (row == 0 && col == 0)
+         {
+            resultingBounds = ossimIrect(0, 0,
+               (pixels.x-1) + (ossim_int32)thePaddingSizeInPixels.x,
+               (pixels.y-1) + (ossim_int32)thePaddingSizeInPixels.y);
+         }
+         else if (row == 0 && col != 0)
+         {
+            if (col == (theTotalHorizontalTiles-1))
+            {
+               resultingBounds = ossimIrect(-(ossim_int32)thePaddingSizeInPixels.x, 0,
+                  (m_lastWidth-1),
+                  (pixels.y-1) + (ossim_int32)thePaddingSizeInPixels.y);
+
+               if (m_useOffset)
+               {
+                  ossim_int32 lr_x = -((ossim_int32)m_offsetInPixels.x*col)- resultingBounds.width();
+                  resultingBounds = ossimIrect(-((ossim_int32)m_offsetInPixels.x*col), 0,
+                     lr_x, (resultingBounds.height()-1));
+               }
+            }
+            else
+            {
+               resultingBounds = ossimIrect(-(ossim_int32)thePaddingSizeInPixels.x, 0,
+                  (pixels.x-1) + (ossim_int32)thePaddingSizeInPixels.x,
+                  (pixels.y-1) + (ossim_int32)thePaddingSizeInPixels.y);
+
+               if (m_useOffset)
+               {
+                  resultingBounds = ossimIrect(-((ossim_int32)m_offsetInPixels.x*col), 0,
+                     (resultingBounds.width()-1)-((ossim_int32)m_offsetInPixels.x*col), 
+                     (resultingBounds.height()-1));
+               }
+            }
+         }
+         else if (row != 0 && col == 0)
+         {
+            if (row == (theTotalVerticalTiles-1))
+            {
+               resultingBounds = ossimIrect(0, -(ossim_int32)thePaddingSizeInPixels.y,
+                  (pixels.x-1) + (ossim_int32)thePaddingSizeInPixels.x,
+                  (m_lastHeight-1));
+
+               if (m_useOffset)
+               {
+                  ossim_int32 lr_y = -((ossim_int32)m_offsetInPixels.y*row)-resultingBounds.height();
+                  resultingBounds = ossimIrect(0, -((ossim_int32)m_offsetInPixels.y*row),
+                     (resultingBounds.width()-1), lr_y);
+               }
+            }
+            else
+            {
+               resultingBounds = ossimIrect(0,
+                  -(ossim_int32)thePaddingSizeInPixels.y,
+                  (pixels.x-1) + (ossim_int32)thePaddingSizeInPixels.x,
+                  (pixels.y-1) + (ossim_int32)thePaddingSizeInPixels.y);
+
+               if (m_useOffset)
+               {
+                  resultingBounds = ossimIrect(0, -((ossim_int32)m_offsetInPixels.y*row),
+                     (resultingBounds.width()-1), 
+                     (resultingBounds.height()-1)-((ossim_int32)m_offsetInPixels.y*row));
+               }
+            }
+         }
+         else if (row != 0 && col != 0)
+         {
+            if (row == (theTotalVerticalTiles-1) && col == (theTotalHorizontalTiles-1))
+            {
+               resultingBounds = ossimIrect(-(ossim_int32)thePaddingSizeInPixels.x,
+                  -(ossim_int32)thePaddingSizeInPixels.y,
+                  (m_lastWidth-1),
+                  (m_lastHeight-1));
+
+               if (m_useOffset)
+               {
+                  ossim_int32 lr_x = -((ossim_int32)m_offsetInPixels.x*col)-resultingBounds.width();
+                  ossim_int32 lr_y = -((ossim_int32)m_offsetInPixels.y*row)-resultingBounds.height();
+                  resultingBounds = ossimIrect(-((ossim_int32)m_offsetInPixels.x*col), 
+                     -((ossim_int32)m_offsetInPixels.y*row),
+                     lr_x, lr_y);
+               }
+            }
+            else if (row != (theTotalVerticalTiles-1) && col == (theTotalHorizontalTiles-1))
+            {
+               resultingBounds = ossimIrect(-(ossim_int32)thePaddingSizeInPixels.x,
+                  -(ossim_int32)thePaddingSizeInPixels.y,
+                  (m_lastWidth-1),
+                  (pixels.y-1) + (ossim_int32)thePaddingSizeInPixels.y);
+
+               if (m_useOffset)
+               {
+                  ossim_int32 lr_x = -((ossim_int32)m_offsetInPixels.x*col)-resultingBounds.width();
+                  resultingBounds = ossimIrect(-((ossim_int32)m_offsetInPixels.x*col), 
+                     -((ossim_int32)m_offsetInPixels.y*row),
+                     lr_x, (resultingBounds.height()-1)-((ossim_int32)m_offsetInPixels.y*row));
+               }
+            }
+            else if (row == (theTotalVerticalTiles-1) && col != (theTotalHorizontalTiles-1))
+            {
+               resultingBounds = ossimIrect(-(ossim_int32)thePaddingSizeInPixels.x,
+                  -(ossim_int32)thePaddingSizeInPixels.y,
+                  (pixels.x-1) + (ossim_int32)thePaddingSizeInPixels.x,
+                  (m_lastHeight-1));
+
+               if (m_useOffset)
+               {
+                  ossim_int32 lr_y = -((ossim_int32)m_offsetInPixels.y*row)-resultingBounds.height();
+                  resultingBounds = ossimIrect(-((ossim_int32)m_offsetInPixels.x*col), 
+                     -((ossim_int32)m_offsetInPixels.y*row),
+                     (resultingBounds.width()-1)-((ossim_int32)m_offsetInPixels.x*col), 
+                     lr_y);
+               }
+            }
+            else
+            {
+               resultingBounds = ossimIrect(-(ossim_int32)thePaddingSizeInPixels.x,
+                  -(ossim_int32)thePaddingSizeInPixels.y,
+                  (pixels.x-1) + (ossim_int32)thePaddingSizeInPixels.x,
+                  (pixels.y-1) + (ossim_int32)thePaddingSizeInPixels.y);
+
+               if (m_useOffset)
+               {
+                  resultingBounds = ossimIrect(-((ossim_int32)m_offsetInPixels.x*col), 
+                     -((ossim_int32)m_offsetInPixels.y*row),
+                     (resultingBounds.width()-1)-((ossim_int32)m_offsetInPixels.x*col), 
+                     (resultingBounds.height()-1)-((ossim_int32)m_offsetInPixels.y*row));
+               }
+            }
+         }
+      }
+      else
+      {
+         resultingBounds = ossimIrect(-(ossim_int32)thePaddingSizeInPixels.x,
+            -(ossim_int32)thePaddingSizeInPixels.y,
+            (pixels.x-1) + (ossim_int32)thePaddingSizeInPixels.x,
+            (pixels.y-1) + (ossim_int32)thePaddingSizeInPixels.y);
+
+         if (m_useOffset)
+         {
+            resultingBounds = ossimIrect(-(ossim_int32)m_offsetInPixels.x, 
+               -(ossim_int32)m_offsetInPixels.y,
+               (resultingBounds.width()-1), (resultingBounds.height()-1));
+         }
+      }
+
+      if(traceDebug()&&resultProjection.valid())
+      {
+         ossimKeywordlist projKwl;
+
+         resultProjection->saveState(projKwl);
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimTilingRect::next DEBUG: rect = " << resultingBounds
+            << "\nproj                          = " << projKwl
+            << "\ntileName                      = " << resultingName
+            << "\norigin                        = " << origin << std::endl;
+      }
+
+      resultProjection = theMapProjection;
+
+      ++theTileId; 
+   }
+   else
+   {
+      result = false;
+   }
+
+   return result;
+}
+
+bool ossimTilingRect::saveState(ossimKeywordlist& kwl,
+                            const char* prefix)const
+{
+   std::stringstream tilingDistance;
+
+   tilingDistance << theTilingDistance.x << " " << theTilingDistance.y << std::endl;
+   
+   kwl.add(prefix,
+           "tile_size",
+           tilingDistance.str().c_str(),
+           true);
+
+   kwl.add(prefix,
+           "units",
+           ossimUnitTypeLut::instance()->
+           getTableIndexString(theTilingDistanceUnitType),
+           true);
+   
+   std::ostringstream padding;
+
+   padding << thePaddingSizeInPixels.x << " " << thePaddingSizeInPixels.y;
+   kwl.add(prefix,
+           "padding",
+           padding.str().c_str(),
+           true);
+
+   kwl.add(prefix,
+      "output_file_name",
+      theTileNameMask.c_str(),
+      true);
+
+   kwl.add(prefix,
+      "clip_to_aoi",
+      m_clipToAoi,
+      true);
+
+   return true;
+}
+
+bool ossimTilingRect::loadState(const ossimKeywordlist& kwl,
+                            const char* prefix)
+{
+   bool result = false;
+   
+   // Get the mask if any.
+   theTileNameMask = kwl.find(prefix, "output_file_name");
+   if (!theTileNameMask.contains("%f%")) //%f% format is used for feature id in a shape file
+   {
+      setTileNameMask(theTileNameMask);
+   }
+  
+   const char* paddingSizeInPixels = kwl.find(prefix, "padding");
+
+   if (paddingSizeInPixels)
+   {
+      ossimString x,y;
+      std::istringstream padding(ossimString(paddingSizeInPixels).c_str());
+      padding >> x >> y;
+      thePaddingSizeInPixels.x = x.toFloat64();
+      thePaddingSizeInPixels.y = y.toFloat64();
+   }
+  
+   const char* tilingDistance = kwl.find(prefix, "tile_size");
+
+   const char* tilingDistanceType = kwl.find(prefix, "units");
+   
+   result = tilingDistance&&tilingDistanceType&&paddingSizeInPixels;
+   
+   ossimString x,y;
+   std::istringstream distance(ossimString(tilingDistance).c_str());
+   distance >> x >> y;
+   theTilingDistance.x = x.toFloat64();
+   theTilingDistance.y = y.toFloat64();
+   if(theTilingDistance.x <= 0.0)
+   {
+      theTilingDistance.x = 1.0;
+   }
+   if(theTilingDistance.y<=0.0)
+   {
+      theTilingDistance.y = theTilingDistance.x;
+   }
+
+   theTilingDistanceUnitType = (ossimUnitType)
+      ossimUnitTypeLut::instance()->getEntryNumber(
+      ossimString(tilingDistanceType).c_str());
+
+   const char* clipToAoi = kwl.find(prefix, "clip_to_aoi");
+   if (clipToAoi)
+   {
+      if (!ossimString(clipToAoi).toBool())
+      {
+         m_clipToAoi = false;
+      }
+   }
+
+   const char* offset = kwl.find(prefix, "use_offset");
+   if (offset)
+   {
+      ossimString width, height;
+      std::istringstream distanceOffset(ossimString(offset).c_str());
+      distanceOffset >> width >> height;
+      m_offsetInPixels.x = width.toFloat64();
+      m_offsetInPixels.y = height.toFloat64();
+      if (m_offsetInPixels.x > 0 || m_offsetInPixels.y > 0.0)
+      {
+         m_useOffset = true;
+         result = true;
+      }
+   }
+
+   const char* tileRes = kwl.find(prefix, "resolution");
+   if (tileRes)
+   {
+      theDelta = ossimDpt(0,0);
+      x="";
+      y="";
+      std::istringstream tileResValues(ossimString(tileRes).c_str());
+      tileResValues >> x >> y;
+
+      m_tilinResolutionDistance.x = x.toFloat64();
+      m_tilinResolutionDistance.y = y.toFloat64();
+   }
+ 
+   const char* tilingResType = kwl.find(prefix, "resolution_units");
+   if (tilingResType)
+   {
+      m_tilingResolutionUnitType = (ossimUnitType)
+         ossimUnitTypeLut::instance()->getEntryNumber(
+         ossimString(tilingResType).c_str());
+   }
+
+   if (traceDebug())
+   {
+      print(ossimNotify(ossimNotifyLevel_DEBUG));
+   }
+   return result;
+}
+
+ossimDpt ossimTilingRect::getPaddingSize()const
+{
+   ossimDpt result = thePaddingSizeInPixels;
+
+   if (!theMapProjection.valid())
+      return result;
+
+   if(theMapProjection->isGeographic() && theTilingDistanceUnitType == OSSIM_DEGREES)
+   {
+      return result;
+   }
+   else
+   {
+      ossimUnitConversionTool unitConverter(1.0, theTilingDistanceUnitType);
+      unitConverter.setValue(result.x, theTilingDistanceUnitType);
+      result.x = unitConverter.getValue(OSSIM_METERS);
+
+      unitConverter.setValue(result.y, theTilingDistanceUnitType);
+      result.y = unitConverter.getValue(OSSIM_METERS);
+   }
+
+   return result;
+}
+
+void ossimTilingRect::getConvertedDistance(ossimDpt& pt, ossimDpt inputDistance) const
+{
+   if (!theMapProjection)
+   {
+      // This should not happen...
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimTiling::getConvertedDistance WARNING"
+         << " projection not set!" << endl;
+      pt = inputDistance;
+      return;
+   }
+
+   if(theMapProjection->isGeographic() && theTilingDistanceUnitType == OSSIM_DEGREES)
+   {
+      pt = inputDistance;
+   }
+   else
+   {
+      ossimUnitConversionTool unitConverter(theMapProjection->origin(),
+         1.0,
+         theTilingDistanceUnitType);
+
+      unitConverter.setValue(inputDistance.x,
+         theTilingDistanceUnitType);
+      pt.x = unitConverter.getValue(OSSIM_METERS);
+
+      unitConverter.setValue(inputDistance.y,
+         theTilingDistanceUnitType);
+      pt.y = unitConverter.getValue(OSSIM_METERS);
+   }
+}
+
diff --git a/ossim/src/ossim/imaging/ossimTopographicCorrectionFilter.cpp b/ossim/src/ossim/imaging/ossimTopographicCorrectionFilter.cpp
new file mode 100644
index 0000000..c598c82
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimTopographicCorrectionFilter.cpp
@@ -0,0 +1,1298 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimTopographicCorrectionFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <algorithm>
+#include <sstream>
+#include <ossim/imaging/ossimTopographicCorrectionFilter.h>
+#include <ossim/imaging/ossimImageToPlaneNormalFilter.h>
+#include <ossim/imaging/ossimScalarRemapper.h>
+#include <ossim/imaging/ossimScalarRemapper.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/matrix/newmat.h>
+#include <ossim/base/ossimMatrix3x3.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimKeywordNames.h>
+
+static const char* CORRECTION_TYPE_KW        = "correction_type";
+static const char* C_COMPUTED_FLAG_KW        = "c_computed_flag";
+static const char* NDVI_RANGE_KW             = "ndvi_range";
+
+RTTI_DEF1(ossimTopographicCorrectionFilter, "ossimTopographicCorrectionFilter", ossimImageCombiner);
+ossimTopographicCorrectionFilter::ossimTopographicCorrectionFilter()
+   :ossimImageCombiner(NULL, 2, 0, true, false),
+    theTile(NULL),
+//    theScalarRemapper(NULL),
+    theLightSourceElevationAngle(45.0),
+    theLightSourceAzimuthAngle(45.0),
+    theJulianDay(0),
+    theCComputedFlag(false),
+    theTopoCorrectionType(TOPO_CORRECTION_COSINE),
+//    theTopoCorrectionType(TOPO_CORRECTION_MINNAERT),
+    theNdviLowTest(-0.1),
+    theNdviHighTest(0.1)
+{
+//    theScalarRemapper = new ossimScalarRemapper();
+//    theScalarRemapper->setOutputScalarType(OSSIM_NORMALIZED_DOUBLE);
+//    theScalarRemapper->initialize();
+}
+
+ossimTopographicCorrectionFilter::ossimTopographicCorrectionFilter(ossimImageSource* colorSource,
+                                                                   ossimImageSource* elevSource)
+   :ossimImageCombiner(NULL, 2, 0, true, false),
+    theTile(NULL),
+    theLightSourceElevationAngle(45.0),
+    theLightSourceAzimuthAngle(45.0),
+    theJulianDay(0),
+    theCComputedFlag(false),
+    theTopoCorrectionType(TOPO_CORRECTION_COSINE),
+    theNdviLowTest(-0.1),
+    theNdviHighTest(0.1)
+{
+   connectMyInputTo(colorSource);
+   connectMyInputTo(elevSource);
+}
+
+ossimTopographicCorrectionFilter::~ossimTopographicCorrectionFilter()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimTopographicCorrectionFilter::getTile(
+   const  ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   ossimImageSource* colorSource = PTR_CAST(ossimImageSource,
+                                                     getInput(0));
+   ossimImageSource* normalSource  = PTR_CAST(ossimImageSource,
+                                                       getInput(1));
+
+   if(!isSourceEnabled()||!normalSource||!colorSource)
+   {
+      if(colorSource)
+      {
+         return colorSource->getTile(tileRect, resLevel);
+      }
+   }
+
+   if(!theTile.valid())
+   {
+      allocate();
+   }
+
+   if(!theTile)
+   {
+      return ossimRefPtr<ossimImageData>();
+   }
+
+   long w = tileRect.width();
+   long h = tileRect.height();
+   ossimIpt origin = tileRect.ul();
+
+   theTile->setOrigin(origin);
+   long tileW = theTile->getWidth();
+   long tileH = theTile->getHeight();
+   if((w != tileW)||
+      (h != tileH))
+   {
+      theTile->setWidth(w);
+      theTile->setHeight(h);
+      if((w*h)!=(tileW*tileH))
+      {
+         theTile->initialize();
+      }
+      else
+      {
+         theTile->makeBlank();
+      }
+   }
+   else
+   {
+      theTile->makeBlank();
+   }
+
+   // ossimImageData* inputTile = NULL;
+
+   ossimRefPtr<ossimImageData> normalData = normalSource->getTile(tileRect,
+                                                                  resLevel);
+
+   ossimRefPtr<ossimImageData> colorData  = colorSource->getTile(tileRect,
+                                                                 resLevel);
+
+   if(!colorData.valid() || !normalData.valid())
+   {
+      return theTile;
+   }
+
+   if((normalData->getNumberOfBands() != 3)||
+      (normalData->getScalarType() != OSSIM_DOUBLE)||
+      !normalData->getBuf()||
+      !colorData->getBuf()||
+      (colorData->getDataObjectStatus() == OSSIM_EMPTY)||
+      (normalData->getDataObjectStatus()==OSSIM_EMPTY))
+   {
+      return colorData;
+   }
+
+   executeTopographicCorrection(theTile,
+                                colorData,
+                                normalData);
+   theTile->validate();
+   return theTile;
+}
+
+void ossimTopographicCorrectionFilter::initialize()
+{
+   ossimImageCombiner::initialize();
+
+   // Force an "allocate()" on the first getTile.
+   theTile      = NULL;
+}
+
+void ossimTopographicCorrectionFilter::allocate()
+{
+   if(!getInput(0) || !getInput(1)) return;
+   theBandMapping.clear();
+   if(isSourceEnabled())
+   {
+      // ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
+
+      theTile = ossimImageDataFactory::instance()->create(this, this);
+      theTile->initialize();
+
+      int arraySize = theTile->getNumberOfBands();
+      if(theGain.size() > 0)
+      {
+         arraySize = (int)theGain.size();
+      }
+      // we will do a non destructive resize onf the arrays
+      //
+      resizeArrays(arraySize);
+
+      ossimImageSource* input1 = PTR_CAST(ossimImageSource,
+                                                   getInput(0));
+      if(input1)
+      {
+         input1->getOutputBandList(theBandMapping);
+         for(ossim_uint32 idx = 0; idx < theBandMapping.size(); ++idx)
+         {
+            if(theBias.size())
+            {
+               if(theBandMapping[idx] >= theBias.size())
+               {
+                  theBandMapping[idx] = (unsigned int)theBias.size()-1;
+               }
+            }
+            else
+            {
+               theBandMapping[idx] = 0;
+            }
+         }
+      }
+   }
+
+   computeLightDirection();
+}
+
+void ossimTopographicCorrectionFilter::computeLightDirection()
+{
+   NEWMAT::Matrix m = ossimMatrix3x3::createRotationMatrix(theLightSourceElevationAngle,
+                                                           0.0,
+                                                           theLightSourceAzimuthAngle);
+   NEWMAT::ColumnVector v(3);
+   v[0] = 0;
+   v[1] = 1;
+   v[2] = 0;
+   v = m*v;
+   // reflect Z.  We need the Z pointing up from the surface and not into it.
+   //
+   ossimColumnVector3d d(v[0], v[1], -v[2]);
+   d = d.unit();
+   theLightDirection[0] = d[0];
+   theLightDirection[1] = d[1];
+   theLightDirection[2] = d[2];
+}
+
+void ossimTopographicCorrectionFilter::executeTopographicCorrection(
+   ossimRefPtr<ossimImageData>& outputData,
+   ossimRefPtr<ossimImageData>& colorData,
+   ossimRefPtr<ossimImageData>& normalData)
+{
+   switch(colorData->getScalarType())
+   {
+   case OSSIM_UCHAR:
+   {
+      if(theTopoCorrectionType!=TOPO_CORRECTION_MINNAERT)
+      {
+         executeTopographicCorrectionTemplate((ossim_uint8)0,
+                                              outputData,
+                                              colorData,
+                                              normalData);
+      }
+      else
+      {
+         executeTopographicCorrectionMinnaertTemplate((ossim_uint8)0,
+                                                      outputData,
+                                                      colorData,
+                                                      normalData);
+      }
+      break;
+   }
+   case OSSIM_USHORT11:
+   case OSSIM_USHORT16:
+   {
+      if(theTopoCorrectionType!=TOPO_CORRECTION_MINNAERT)
+      {
+         executeTopographicCorrectionTemplate((ossim_uint16)0,
+                                              outputData,
+                                              colorData,
+                                              normalData);
+      }
+      else
+      {
+         executeTopographicCorrectionMinnaertTemplate((ossim_uint16)0,
+                                                      outputData,
+                                                      colorData,
+                                                      normalData);
+      }
+      break;
+   }
+   case OSSIM_SSHORT16:
+   {
+      if(theTopoCorrectionType!=TOPO_CORRECTION_MINNAERT)
+      {
+         executeTopographicCorrectionTemplate((ossim_sint16)0,
+                                              outputData,
+                                              colorData,
+                                              normalData);
+      }
+      else
+      {
+         executeTopographicCorrectionMinnaertTemplate((ossim_sint16)0,
+                                                      outputData,
+                                                      colorData,
+                                                      normalData);
+      }
+      break;
+   }
+   case OSSIM_DOUBLE:
+   case OSSIM_NORMALIZED_DOUBLE:
+   {
+      if(theTopoCorrectionType!=TOPO_CORRECTION_MINNAERT)
+      {
+         executeTopographicCorrectionTemplate((ossim_float64)0,
+                                              outputData,
+                                              colorData,
+                                              normalData);
+      }
+      else
+      {
+         executeTopographicCorrectionMinnaertTemplate((ossim_float64)0,
+                                                      outputData,
+                                                      colorData,
+                                                      normalData);
+      }
+      break;
+   }
+   case OSSIM_FLOAT:
+   case OSSIM_NORMALIZED_FLOAT:
+   {
+      if(theTopoCorrectionType!=TOPO_CORRECTION_MINNAERT)
+      {
+         executeTopographicCorrectionTemplate((ossim_float32)0,
+                                              outputData,
+                                              colorData,
+                                              normalData);
+      }
+      else
+      {
+         executeTopographicCorrectionMinnaertTemplate((ossim_float32)0,
+                                                      outputData,
+                                                      colorData,
+                                                      normalData);
+      }
+      break;
+   }
+   default:
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimTopographicCorrectionFilter::executeTopographicCorrection WARN: Not handling scalar type"
+         << endl;
+   }
+   }
+}
+
+template <class T>
+void ossimTopographicCorrectionFilter::executeTopographicCorrectionTemplate(
+   T /* dummy */,
+   ossimRefPtr<ossimImageData>& outputData,
+   ossimRefPtr<ossimImageData>& colorData,
+   ossimRefPtr<ossimImageData>& normalData)
+{
+   ossim_int32 y = 0;
+   ossim_int32 x = 0;
+   ossim_int32 colorW = colorData->getWidth();
+   ossim_int32 colorH = colorData->getHeight();
+
+   T* colorDataBand = 0;
+   T* outputDataBand = 0;
+   ossim_float64 colorNp = 0;
+   ossim_float64 colorMin = 0;
+   ossim_float64 colorMax = 0;
+   // ossim_float64 outputDelta = 0;;
+   // ossim_float64 outputMin = 0;
+   // ossim_float64 outputMax = 0;
+   ossim_float64 outputNp;
+   double  normalNp = normalData->getNullPix(0);
+   double  LPrime = 0.0;
+   double  LNew   = 0.0;
+   double  dn     = 0.0;
+   double cosineZenith = ossim::cosd(90 - theLightSourceElevationAngle);
+
+   if(!colorData->getBuf()||
+      !normalData->getBuf()||
+      (colorData->getDataObjectStatus() == OSSIM_EMPTY))
+   {
+      return;
+   }
+   for(ossim_uint32 b = 0; b < outputData->getNumberOfBands();++b)
+   {
+      int mappedBand = theBandMapping[b];
+      double* normalX  = (double*)normalData->getBuf(0);
+      double* normalY  = (double*)normalData->getBuf(1);
+      double* normalZ  = (double*)normalData->getBuf(2);
+      double numerator = cosineZenith + theC[mappedBand];
+      outputNp  = (ossim_float64)outputData->getNullPix(b);
+      // outputMin = (ossim_float64)outputData->getMinPix(b);
+      // outputMax = (ossim_float64)outputData->getMaxPix(b);
+      // outputDelta = outputMax - outputMin;
+      colorDataBand    = (T*)(colorData->getBuf(b));
+      colorNp          = (ossim_float64)(colorData->getNullPix(b));
+      colorMin         = (ossim_float64)(colorData->getMinPix(b));
+      colorMax         = (ossim_float64)(colorData->getMaxPix(b));
+      outputDataBand   = (T*)(outputData->getBuf(b));
+      bool theValuesAreGood = b < theC.size();
+      double c = theC[mappedBand];
+      if(theTopoCorrectionType != TOPO_CORRECTION_COSINE_C)
+      {
+         c = 0;
+      }
+      for(y = 0; y < colorH; ++y)
+      {
+         for(x = 0; x < colorW; ++x)
+         {
+            if((*colorDataBand) != colorNp)
+            {
+               if((*normalX != normalNp)&&
+                  (*normalY != normalNp)&&
+                  (*normalZ != normalNp)&&
+                  theValuesAreGood)
+               {
+
+                  double cosineNewI = ((*normalX)*theLightDirection[0] +
+                                       (*normalY)*theLightDirection[1] +
+                                       (*normalZ)*theLightDirection[2]);
+                  double cosineRatioDenom = (cosineNewI + c);
+                  if((fabs(cosineRatioDenom) > FLT_EPSILON)&&(cosineNewI >= 0.0))
+                  {
+                     double cosineRatio = numerator/cosineRatioDenom;
+
+                     LPrime = theGain[mappedBand]*((ossim_float64)(*colorDataBand)) + theBias[mappedBand];
+
+                     LNew = LPrime*cosineRatio;
+
+                     dn = ((LNew-theBias[mappedBand])/theGain[mappedBand]);
+
+                     if(dn < colorMin) dn = colorMin;
+                     if(dn > colorMax) dn = colorMax;
+
+                     *outputDataBand = (T)(dn);
+                  }
+                  else
+                  {
+                     *outputDataBand = (T)(*colorDataBand);
+                  }
+               }
+               else
+               {
+                  *outputDataBand = (T)(*colorDataBand);
+               }
+            }
+            else
+            {
+               *outputDataBand = (T)outputNp;
+            }
+
+            ++outputDataBand;
+            ++colorDataBand;
+            ++normalX;
+            ++normalY;
+            ++normalZ;
+         }
+      }
+   }
+}
+
+template <class T>
+void ossimTopographicCorrectionFilter::executeTopographicCorrectionMinnaertTemplate(
+   T /* dummy */,
+   ossimRefPtr<ossimImageData>& outputData,
+   ossimRefPtr<ossimImageData>& colorData,
+   ossimRefPtr<ossimImageData>& normalData)
+{
+
+   ossim_int32 y = 0;
+   ossim_int32 x = 0;
+   ossim_int32 colorW = colorData->getWidth();
+   ossim_int32 colorH = colorData->getHeight();
+
+   T* colorDataBand = 0;
+   T* outputDataBand = 0;
+   ossim_float64 colorNp = 0;
+   ossim_float64 colorMin = 0;
+   ossim_float64 colorMax = 0;
+   // ossim_float64 outputDelta = 0;;
+   // ossim_float64 outputMin = 0;
+   // ossim_float64 outputMax = 0;
+   ossim_float64 outputNp;
+   double  normalNp = normalData->getNullPix(0);
+   double  LPrime = 0.0;
+   double  LNew   = 0.0;
+   double  dn     = 0.0;
+
+   if(!colorData->getBuf()||
+      !normalData->getBuf()||
+      (colorData->getDataObjectStatus() == OSSIM_EMPTY))
+   {
+      return;
+   }
+   int maxBands = ossim::min((int)theK.size(), (int)outputData->getNumberOfBands());
+   for(int b = 0; b < maxBands;++b)
+   {
+      int mappedBand = theBandMapping[b];
+      double* normalX  = (double*)normalData->getBuf(0);
+      double* normalY  = (double*)normalData->getBuf(1);
+      double* normalZ  = (double*)normalData->getBuf(2);
+      outputNp  = (ossim_float64)outputData->getNullPix(b);
+      // outputMin = (ossim_float64)outputData->getMinPix(b);
+      // outputMax = (ossim_float64)outputData->getMaxPix(b);
+      // outputDelta = outputMax - outputMin;
+      colorDataBand    = (T*)(colorData->getBuf(b));
+      colorNp          = (ossim_float64)(colorData->getNullPix(b));
+      colorMin         = (ossim_float64)(colorData->getMinPix(b));
+      colorMax         = (ossim_float64)(colorData->getMaxPix(b));
+      outputDataBand   = (T*)(outputData->getBuf(b));
+      for(y = 0; y < colorH; ++y)
+      {
+         for(x = 0; x < colorW; ++x)
+         {
+            if((*colorDataBand) != colorNp)
+            {
+               if((*normalX != normalNp)&&
+                  (*normalY != normalNp)&&
+                  (*normalZ != normalNp))
+               {
+
+//                   if(fabs(*normalZ) < FLT_EPSILON)
+//                   {
+//                      *normalZ = 0.0;
+//                   }
+                  double cosineNewI = (((*normalX)*theLightDirection[0] +
+                                        (*normalY)*theLightDirection[1] +
+                                        (*normalZ)*theLightDirection[2]));
+                  double slopeAngle = acos(*normalZ);
+                  double cosineSlope = cos(slopeAngle);
+                  double k  = theK[mappedBand];
+                  double cosineSlopeKPower = pow(cosineSlope, k);
+                  double denom = pow((double)cosineNewI, k)*cosineSlopeKPower;
+                  double numerator = cosineSlope;
+
+//                  double slopeAngle = asin(*normalZ);
+//                  double tempK = theK[mappedBand]*cosineNewI;
+//                double denom = pow((double)cosineNewI*cosineSlope, theK[mappedBand]);
+//                  double numerator = pow((double)cosineSlope, 1-tempK);
+//                  if((fabs(denom) > .0001)&&(cosineNewI >= 0.0))
+//                  if((cosineNewI >= 0.0) &&fabs(denom) > .000001)
+                  if(fabs(denom) > .00000001)
+                  {
+//                     double cosineRatio = cosineSlope/denom;
+                     double cosineRatio = numerator/denom;
+
+                     LPrime = theGain[mappedBand]*((ossim_float64)(*colorDataBand)) + theBias[mappedBand];
+
+                     LNew = LPrime*cosineRatio;
+
+                     dn = ((LNew-theBias[mappedBand])/theGain[mappedBand]);
+
+                     if(dn < colorMin) dn = colorMin;
+                     if(dn > colorMax) dn = colorMax;
+
+                     *outputDataBand = (T)(dn);
+                  }
+                  else
+                  {
+                     *outputDataBand = (T)(*colorDataBand);
+                  }
+               }
+               else
+               {
+                  *outputDataBand = (T)(*colorDataBand);
+               }
+            }
+            else
+            {
+               *outputDataBand = (T)outputNp;
+            }
+
+            ++outputDataBand;
+            ++colorDataBand;
+            ++normalX;
+            ++normalY;
+            ++normalZ;
+         }
+      }
+   }
+}
+
+
+#if 0
+void ossimTopographicCorrectionFilter::computeC()
+{
+   theCComputedFlag = false;
+   int b = 0;
+   int tileCount = 0;
+   bool done = false;
+   if(theC.size()<1) return;
+
+   for(b = 0; b < (int) theC.size(); ++b)
+   {
+      theC[b] = 0.0;
+   }
+
+
+   theNdviLowTest  = 0.1;
+   theNdviHighTest = 1;
+
+   ossimImageSource* colorSource  = PTR_CAST(ossimImageSource, getInput(0));
+   ossimImageSource* normalSource = PTR_CAST(ossimImageSource, getInput(1));
+
+   if(!colorSource || !normalSource)
+   {
+      return;
+   }
+   std::vector<ossim2dLinearRegression> linearRegression(theC.size());
+   ossimIrect normalRect = normalSource->getBoundingRect();
+   ossimIrect colorRect  = colorSource->getBoundingRect();
+   ossimIrect clipRect   = normalRect.clipToRect(colorRect);
+   ossimIpt ul = clipRect.ul();
+   ossimIpt lr = clipRect.lr();
+   ossimIpt tileSize(128,128);
+   ossim_int32 tilesHoriz = clipRect.width()/tileSize.x;
+   ossim_int32 tilesVert  = clipRect.height()/tileSize.y;
+
+
+   if(!normalRect.intersects(colorRect))
+   {
+      return;
+   }
+   ossim_int32 maxSize = tilesHoriz*tilesVert;//ossim::min(200, );
+
+   int idx = 0;
+
+   idx = 0;
+   std::vector<int> cosineIBucketCount(10);
+   std::fill(cosineIBucketCount.begin(), cosineIBucketCount.end(), 0);
+   const int maxBucketCount = 1000;
+   bool goodCoefficients = false;
+   long numberOfRuns = 0;
+   while((!goodCoefficients)&&(numberOfRuns < 2))
+   {
+      while((idx < maxSize)&&
+            (!done))
+      {
+         ossim_int32 ty = idx/tilesHoriz;
+         ossim_int32 tx = idx%tilesHoriz;
+
+
+         ossim_int32 x = (ul.x + tx*tileSize.x);
+         ossim_int32 y = (ul.y + ty*tileSize.y);
+
+         ossimIrect requestRect(x,
+                                y,
+                                x+tileSize.x-1,
+                                y+tileSize.y-1);
+
+         ossimRefPtr<ossimImageData> colorData  = colorSource->getTile(requestRect);
+         ossimRefPtr<ossimImageData> normalData = normalSource->getTile(requestRect);
+
+         switch(colorData->getScalarType())
+         {
+         case OSSIM_UCHAR:
+         {
+            addRegressionPointsTemplate((ossim_uint8)0,
+                                        linearRegression, cosineIBucketCount, maxBucketCount, colorData, normalData);
+            break;
+         }
+         case OSSIM_USHORT11:
+         case OSSIM_USHORT16:
+         {
+            addRegressionPointsTemplate((ossim_uint16)0,
+                                        linearRegression, cosineIBucketCount, maxBucketCount, colorData, normalData);
+            break;
+         }
+         case OSSIM_SSHORT16:
+         {
+            addRegressionPointsTemplate((ossim_sint16)0,
+                                        linearRegression, cosineIBucketCount, maxBucketCount, colorData, normalData);
+            break;
+         }
+         case OSSIM_FLOAT:
+         case OSSIM_NORMALIZED_FLOAT:
+         {
+            addRegressionPointsTemplate((ossim_float32)0,
+                                        linearRegression, cosineIBucketCount, maxBucketCount, colorData, normalData);
+            break;
+         }
+         case OSSIM_DOUBLE:
+         case OSSIM_NORMALIZED_DOUBLE:
+         {
+            addRegressionPointsTemplate((ossim_float64)0,
+                                        linearRegression, cosineIBucketCount, maxBucketCount, colorData, normalData);
+            break;
+         }
+         }
+         if(((double)linearRegression[0].getNumberOfPoints()/(double)(maxBucketCount*10.0))>=.7)
+         {
+            done = true;
+         }
+         ++idx;
+      }
+
+      double intercept, m;
+      long numberOfPositiveSlopes=0;
+      for(b=0;b<theC.size();++b)
+      {
+         if(linearRegression[b].getNumberOfPoints()>2)
+         {
+            linearRegression[b].solve();
+            linearRegression[b].getEquation(m, intercept);
+            theC[b] = intercept/m;
+
+            ossimNotify(ossimNotifyLevel_INFO) << "equation for b = " << b <<" is y = " << m << "*x + " << intercept << endl
+                                               << "with c =         " << theC[b] << endl;
+            if(m >=0.0)
+            {
+               numberOfPositiveSlopes++;
+            }
+         }
+      }
+      for(idx = 0; idx < cosineIBucketCount.size(); ++idx)
+      {
+         ossimNotify(ossimNotifyLevel_INFO) << "bucket " << idx << " = " << cosineIBucketCount[idx] << endl;
+      }
+      if(numberOfPositiveSlopes > .5*theC.size())
+      {
+         goodCoefficients = true;
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "ossimTopographicCorrectionFilter::computeC() WARN: not enough positive slopes" << endl
+                                             << "changing test to look for dirt areas" << endl;
+         theNdviLowTest = -1.0;
+         theNdviHighTest = .1;
+         for(b=0;b<theC.size();++b)
+         {
+            linearRegression[b].clear();
+         }
+      }
+      ++numberOfRuns;
+   }
+   theCComputedFlag = true;
+}
+
+template<class T>
+void ossimTopographicCorrectionFilter::addRegressionPointsTemplate(
+   T, //dummy
+   std::vector<ossim2dLinearRegression>& regressionPoints,
+   std::vector<int>& cosineIBucketCount,
+   ossim_int32 maxCountPerBucket,
+   ossimRefPtr<ossimImageData>& colorData,
+   ossimRefPtr<ossimImageData>& normalData)
+{
+   if(!colorData||!normalData)
+   {
+      return;
+   }
+   if((colorData->getDataObjectStatus() == OSSIM_EMPTY)||
+      (!colorData->getBuf())||
+      (!normalData->getBuf())||
+      (normalData->getDataObjectStatus()==OSSIM_EMPTY))
+   {
+      return;
+   }
+
+   ossim_float64* normalBands[3];
+   ossim_float64 normalBandsNp[3];
+   ossim_uint32 count=0;
+   ossim_uint32 b = 0;
+   std::vector<T*> colorBands(colorData->getNumberOfBands());
+   std::vector<T> colorBandsNp(colorData->getNumberOfBands());
+
+   normalBands[0]   = (ossim_float64*)normalData->getBuf(0);
+   normalBands[1]   = (ossim_float64*)normalData->getBuf(1);
+   normalBands[2]   = (ossim_float64*)normalData->getBuf(2);
+   normalBandsNp[0] = normalData->getNullPix(0);
+   normalBandsNp[1] = normalData->getNullPix(1);
+   normalBandsNp[2] = normalData->getNullPix(2);
+
+   for(b=0;b<colorData->getNumberOfBands();++b)
+   {
+      colorBands[b]   = (T*)colorData->getBuf(b);
+      colorBandsNp[b] = (T)colorData->getNullPix(b);
+   }
+
+   ossim_uint32 maxOffset = colorData->getWidth()*colorData->getHeight();
+   ossim_uint32 offset=0;
+   ossim_float64 ndviTest=0.0;
+   ossim_uint32 numberOfTests = 0;
+   if(maxOffset)
+   {
+      maxOffset-=1;
+   }
+
+   ossim_int32 percent = (ossim_int32)(colorData->getWidth()*colorData->getHeight()*.2);
+   offset = 0;
+   ossim_uint32 countPixels = 0;
+   while(offset < maxOffset)
+   {
+      bool nullBandsExist = false;
+      for(b = 0; ((b < colorData->getNumberOfBands())&&(!nullBandsExist));++b)
+      {
+         if(*colorBands[b] == colorBandsNp[b])
+         {
+            nullBandsExist = true;
+         }
+      }
+
+      if((!nullBandsExist)&&
+         (*normalBands[0] != normalBandsNp[0])&&
+         (*normalBands[1] != normalBandsNp[1])&&
+         (*normalBands[2] != normalBandsNp[2]))
+      {
+         if(computeNdvi((T)0,
+                        ndviTest,
+                        offset,
+                        colorBands))
+         {
+            if((ndviTest >= theNdviLowTest) && (ndviTest <= theNdviHighTest))
+            {
+               double cosineI = ((*(normalBands[0]+offset))*theLightDirection[0] +
+                                 (*(normalBands[1]+offset))*theLightDirection[1] +
+                                 (*(normalBands[2]+offset))*theLightDirection[2]);
+               if(cosineI >= 0.0)
+               {
+                  long bucketIdx = (long)(cosineI*cosineIBucketCount.size());
+
+                  // we will try to disperse the normals out and so we don't clump everything
+                  // in one place
+                  //
+                  if(cosineIBucketCount[bucketIdx] < maxCountPerBucket)
+                  {
+                     for(b = 0; b < colorData->getNumberOfBands();++b)
+                     {
+                        regressionPoints[b].addPoint(ossimDpt(cosineI, *(colorBands[b]+offset)));
+                     }
+                     ++cosineIBucketCount[bucketIdx];
+                     ++count;
+                  }
+               }
+            }
+         }
+      }
+      ++offset;
+   }
+}
+#endif
+
+template <class T> bool ossimTopographicCorrectionFilter::computeNdvi(
+   T,
+   ossim_float64& result,
+   ossim_uint32 offset,
+   const std::vector<T*>& bands)const
+{
+   if(bands.size() > 3)
+   {
+      result = (((double)*(bands[3]+offset) - (double)*(bands[2]+offset))/
+                ((double)*(bands[3]+offset) + (double)*(bands[2]+offset)));
+      return true;
+   }
+
+   return false;
+}
+
+void ossimTopographicCorrectionFilter::resizeArrays(ossim_uint32 newSize)
+{
+  if(!getInput(0) || !getInput(1)) return;
+
+
+   vector<double> tempC    = theC;
+   vector<double> tempK    = theK;
+   vector<double> tempBias = theBias;
+   vector<double> tempGain = theGain;
+
+   theC.resize(newSize);
+   theK.resize(newSize);
+   theBias.resize(newSize);
+   theGain.resize(newSize);
+   ossim_uint32 tempIdx = 0;
+   if(tempC.size() > 0 && (theC.size() > 0))
+   {
+      int numberOfElements = ossim::min((int)tempC.size(),(int)theC.size());
+
+      std::copy(tempC.begin(), tempC.begin()+numberOfElements,
+                theC.begin());
+      std::copy(tempK.begin(), tempK.begin()+numberOfElements,
+                theK.begin());
+      std::copy(tempBias.begin(), tempBias.begin()+numberOfElements,
+                theBias.begin());
+      std::copy(tempGain.begin(), tempGain.begin()+numberOfElements,
+                theGain.begin());
+
+      if(theC.size() > tempC.size())
+      {
+         std::fill(theC.begin()+numberOfElements, theC.end(), (double)0.0);
+         std::fill(theBias.begin()+numberOfElements, theBias.end(), (double)0.0);
+         std::fill(theGain.begin()+numberOfElements, theGain.end(), (double)1.0);
+         for(tempIdx = numberOfElements; tempIdx < theK.size(); ++tempIdx)
+         {
+            theK[tempIdx] = 0.3 + .4*(tempIdx/(double)(theK.size()));
+         }
+      }
+   }
+   else
+   {
+      std::fill(theC.begin(), theC.end(), (double)0.0);
+      std::fill(theBias.begin(), theBias.end(), (double)0.0);
+      std::fill(theGain.begin(), theGain.end(), (double)1.0);
+      for(tempIdx = 0; tempIdx < theK.size(); ++tempIdx)
+      {
+         theK[tempIdx] = 0.3 + .4*(tempIdx/(double)(theK.size()));
+      }
+   }
+}
+
+bool ossimTopographicCorrectionFilter::loadState(const ossimKeywordlist& kwl,
+                                                 const char* prefix)
+{
+
+   ossimString elevAngle      = kwl.find(prefix, ossimKeywordNames::ELEVATION_ANGLE_KW);
+   ossimString azimuthAngle   = kwl.find(prefix, ossimKeywordNames::AZIMUTH_ANGLE_KW);
+   ossimString bands          = kwl.find(prefix, ossimKeywordNames::NUMBER_BANDS_KW);
+   ossimString correctionType = kwl.find(prefix, CORRECTION_TYPE_KW);
+   ossimString julianDay      = kwl.find(prefix, ossimKeywordNames::JULIAN_DAY_KW);
+   ossimString cComputedFlag  = kwl.find(prefix, C_COMPUTED_FLAG_KW);
+   ossimString ndviRange      = kwl.find(prefix, NDVI_RANGE_KW);
+
+   theCComputedFlag = cComputedFlag.toBool();
+   correctionType = correctionType.downcase();
+   int numberOfBands = bands.toInt();
+   theLightSourceElevationAngle = elevAngle.toDouble();
+   theLightSourceAzimuthAngle   = azimuthAngle.toDouble();
+   theJulianDay = julianDay.toDouble();
+
+   if(ndviRange != "")
+   {
+      std::istringstream input(ndviRange.c_str());
+
+      input >> theNdviLowTest >> theNdviHighTest;
+   }
+   if(numberOfBands>0)
+   {
+     theGain.resize(numberOfBands);
+     theBias.resize(numberOfBands);
+     theC.resize(numberOfBands);
+     theK.resize(numberOfBands);
+      for(int b = 0; b < numberOfBands; ++b)
+      {
+         ossimString k    = "k"+ossimString::toString(b);
+         ossimString c    = "c"+ossimString::toString(b);
+         ossimString bias = "bias"+ossimString::toString(b);
+         ossimString gain = "gain"+ossimString::toString(b);
+
+         const char* kValue    = kwl.find(prefix, k);
+         const char* cValue    = kwl.find(prefix, c);
+         const char* biasValue = kwl.find(prefix, bias);
+         const char* gainValue = kwl.find(prefix, gain);
+	 if(kValue)
+	   {
+	     theK[b] = ossimString(kValue).toDouble();
+	   }
+	 else
+	   {
+	     theK[b] = 1.0;
+	   }
+         if(cValue)
+         {
+            theC[b] = ossimString(cValue).toDouble();
+         }
+         else
+         {
+            theC[b] = 0.0;;
+         }
+         if(biasValue)
+         {
+            theBias[b] = ossimString(biasValue).toDouble();
+         }
+         else
+         {
+            theBias[b] = 0.0;
+         }
+         if(gainValue)
+         {
+            theGain[b] = ossimString(gainValue).toDouble();
+         }
+         else
+         {
+            theGain[b] = 1.0;
+         }
+      }
+   }
+
+   if(correctionType.contains("cosine_c"))
+   {
+      theTopoCorrectionType = TOPO_CORRECTION_COSINE_C;
+   }
+   else if(correctionType.contains("minnaert"))
+   {
+      theTopoCorrectionType = TOPO_CORRECTION_MINNAERT;
+   }
+   else
+   {
+      theTopoCorrectionType = TOPO_CORRECTION_COSINE;
+   }
+
+
+   bool result =  ossimImageCombiner::loadState(kwl, prefix);
+
+   computeLightDirection();
+
+   return result;
+}
+
+bool ossimTopographicCorrectionFilter::saveState(ossimKeywordlist& kwl,
+                                                 const char* prefix)const
+{
+   // we can use any of the arrays theC, theBias, or theGain since
+   // they mirror the number of input bands
+   //
+   int numberOfBands = (int)theC.size();
+
+   kwl.add(prefix,
+           ossimKeywordNames::NUMBER_BANDS_KW,
+           numberOfBands,
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::ELEVATION_ANGLE_KW,
+           theLightSourceElevationAngle,
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::AZIMUTH_ANGLE_KW,
+           theLightSourceAzimuthAngle,
+           true);
+
+   kwl.add(prefix,
+           C_COMPUTED_FLAG_KW,
+           (ossim_uint32)theCComputedFlag,
+           true);
+   kwl.add(prefix,
+           NDVI_RANGE_KW,
+           ossimString::toString(theNdviLowTest) +
+           " " + ossimString::toString(theNdviHighTest),
+           true);
+
+   if(theTopoCorrectionType == TOPO_CORRECTION_COSINE_C)
+   {
+      kwl.add(prefix,
+              CORRECTION_TYPE_KW,
+              "cosine_c",
+              true);
+   }
+   else if(theTopoCorrectionType == TOPO_CORRECTION_MINNAERT)
+   {
+      kwl.add(prefix,
+              CORRECTION_TYPE_KW,
+              "minnaert",
+              true);
+   }
+   else
+   {
+      kwl.add(prefix,
+              CORRECTION_TYPE_KW,
+              "cosine",
+              true);
+   }
+
+   for(int b = 0; b < numberOfBands; ++b)
+   {
+      ossimString k    = "k"+ossimString::toString(b);
+      ossimString c    = "c"+ossimString::toString(b);
+      ossimString bias = "bias"+ossimString::toString(b);
+      ossimString gain = "gain"+ossimString::toString(b);
+      kwl.add(prefix,
+              k,
+              theK[b],
+              true);
+      kwl.add(prefix,
+              c,
+              theC[b],
+              true);
+      kwl.add(prefix,
+              bias,
+              theBias[b],
+              true);
+      kwl.add(prefix,
+              gain,
+              theGain[b],
+              true);
+   }
+
+   return ossimImageCombiner::saveState(kwl, prefix);
+}
+
+ossim_uint32 ossimTopographicCorrectionFilter::getNumberOfOutputBands() const
+{
+   ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
+   if(colorSource)
+   {
+      return colorSource->getNumberOfOutputBands();
+   }
+   return ossimImageCombiner::getNumberOfOutputBands();
+}
+
+ossimScalarType ossimTopographicCorrectionFilter::getOutputScalarType() const
+{
+   ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
+   if(colorSource)
+   {
+      return colorSource->getOutputScalarType();
+   }
+   return ossimImageCombiner::getOutputScalarType();
+}
+
+double ossimTopographicCorrectionFilter::getNullPixelValue(ossim_uint32 band)const
+{
+   ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
+   if(colorSource)
+   {
+      return colorSource->getNullPixelValue(band);
+   }
+   return ossimImageCombiner::getNullPixelValue(band);
+}
+
+double ossimTopographicCorrectionFilter::getMinPixelValue(ossim_uint32 band)const
+{
+   ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
+   if(colorSource)
+   {
+      return colorSource->getMinPixelValue(band);
+   }
+   return ossimImageCombiner::getMinPixelValue(band);
+}
+
+double ossimTopographicCorrectionFilter::getMaxPixelValue(ossim_uint32 band)const
+{
+   ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
+   if(colorSource)
+   {
+      return colorSource->getMaxPixelValue(band);
+   }
+   return ossimImageCombiner::getMaxPixelValue(band);
+}
+
+ossimIrect ossimTopographicCorrectionFilter::getBoundingRect(ossim_uint32 resLevel)const
+{
+   ossimIrect result;
+   result.makeNan();
+   ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
+
+   if(colorSource)
+   {
+      result = colorSource->getBoundingRect(resLevel);
+   }
+
+   return result;
+}
+
+void ossimTopographicCorrectionFilter::getDecimationFactor(ossim_uint32 resLevel,
+                                                           ossimDpt& result) const
+{
+   result.makeNan();
+   ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
+
+   if(colorSource)
+   {
+      colorSource->getDecimationFactor(resLevel,
+                                       result);
+   }
+}
+
+void ossimTopographicCorrectionFilter::getDecimationFactors(vector<ossimDpt>& decimations) const
+{
+   ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
+   if(colorSource)
+   {
+      colorSource->getDecimationFactors(decimations);
+   }
+}
+
+ossim_uint32 ossimTopographicCorrectionFilter::getNumberOfDecimationLevels()const
+{
+   ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
+   if(colorSource)
+   {
+      return colorSource->getNumberOfDecimationLevels();
+   }
+   return 0;
+}
+
+double ossimTopographicCorrectionFilter::getAzimuthAngle()const
+{
+   return theLightSourceAzimuthAngle;
+}
+
+double ossimTopographicCorrectionFilter::getElevationAngle()const
+{
+   return theLightSourceElevationAngle;
+}
+
+void ossimTopographicCorrectionFilter::setAzimuthAngle(double angle)
+{
+   theLightSourceAzimuthAngle = angle;
+}
+
+void ossimTopographicCorrectionFilter::setElevationAngle(double angle)
+{
+   theLightSourceElevationAngle = angle;
+}
+bool ossimTopographicCorrectionFilter::canConnectMyInputTo(ossim_int32 inputIndex,
+                                                           const ossimConnectableObject* object)const
+{
+   return (object&&
+           ( (inputIndex>=0) && inputIndex < 2)&&
+           PTR_CAST(ossimImageSource, object));
+
+}
+
+void ossimTopographicCorrectionFilter::connectInputEvent(ossimConnectionEvent& /* event */)
+{
+   initialize();
+}
+
+void ossimTopographicCorrectionFilter::disconnectInputEvent(ossimConnectionEvent& /* event */)
+{
+   initialize();
+}
+
+void ossimTopographicCorrectionFilter::propertyEvent(ossimPropertyEvent& /* event */)
+{
+   initialize();
+}
+
+void ossimTopographicCorrectionFilter::refreshEvent(ossimRefreshEvent& /* event */)
+{
+   initialize();
+}
+
+ossimTopographicCorrectionFilter::ossimTopoCorrectionType ossimTopographicCorrectionFilter::getTopoCorrectionType()const
+{
+   return theTopoCorrectionType;
+}
+
+void ossimTopographicCorrectionFilter::setTopoCorrectionType(ossimTopoCorrectionType topoType)
+{
+   theTopoCorrectionType = topoType;
+}
+
+const std::vector<double>& ossimTopographicCorrectionFilter::getGainValues()const
+{
+   return theGain;
+}
+
+void ossimTopographicCorrectionFilter::setGainValues(const std::vector<double>& gainValues)
+{
+   theGain = gainValues;
+}
+
+const vector<double>& ossimTopographicCorrectionFilter::getBiasValues()const
+{
+   return theBias;
+}
+
+void ossimTopographicCorrectionFilter::setBiasValues(const std::vector<double>& biasValues)
+{
+   theBias = biasValues;
+}
+
+const vector<double>& ossimTopographicCorrectionFilter::getKValues()const
+{
+   return theK;
+}
+
+double ossimTopographicCorrectionFilter::getK(int idx)const
+{
+   if(idx < (int)theK.size())
+   {
+      return theK[idx];
+   }
+   else
+   {
+      return 1.0;
+   }
+}
+
+void ossimTopographicCorrectionFilter::setK(int idx, double value)
+{
+   if(idx < (int)theK.size())
+   {
+      theK[idx] = value;
+   }
+}
+
+void ossimTopographicCorrectionFilter::setKValues(const vector<double>& kValues)
+{
+   theK = kValues;
+}
+
+double ossimTopographicCorrectionFilter::getC(int idx)const
+{
+   if(idx < (int)theC.size())
+   {
+      return theC[idx];
+   }
+   else
+   {
+      return 0.0;
+   }
+}
+
+void ossimTopographicCorrectionFilter::setC(int idx, double value)
+{
+   if(idx < (int)theC.size())
+   {
+      theC[idx] = value;
+   }
+}
+
+void ossimTopographicCorrectionFilter::setCValues(const vector<double>& cValues)
+{
+   theC = cValues;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimTrimFilter.cpp b/ossim/src/ossim/imaging/ossimTrimFilter.cpp
new file mode 100644
index 0000000..3aa35b1
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimTrimFilter.cpp
@@ -0,0 +1,358 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimTrimFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimTrimFilter.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimNumericProperty.h>
+#include <ossim/base/ossimDpt.h>
+
+static ossimTrace traceDebug("ossimTrimFilter:debug");
+
+RTTI_DEF1(ossimTrimFilter,
+          "ossimTrimFilter",
+          ossimImageSourceFilter);
+
+ossimTrimFilter::ossimTrimFilter()
+   :ossimImageSourceFilter(),
+    theLeftPercent(0.0),
+    theRightPercent(0.0),
+    theTopPercent(0.0),
+    theBottomPercent(0.0)
+{
+   theCutter = new ossimPolyCutter;
+}
+
+ossimTrimFilter::~ossimTrimFilter()
+{
+   theCutter = 0;
+}
+
+ossimRefPtr<ossimImageData> ossimTrimFilter::getTile(
+   const ossimIrect& rect,
+   ossim_uint32 resLevel)
+{
+   if(!theInputConnection)
+   {
+      return NULL;
+   }
+
+   if(!theValidVertices.size())
+   {
+      return ossimImageSourceFilter::getTile(rect, resLevel);
+   }
+   
+   ossimRefPtr<ossimImageData> tile =
+      theCutter->getTile(rect, resLevel);
+
+   if(!isSourceEnabled()||!tile.valid())
+   {
+      return tile;
+   }
+   if(tile->getDataObjectStatus() == OSSIM_NULL ||
+      tile->getDataObjectStatus() == OSSIM_EMPTY)
+   {
+      return tile;
+   }
+
+   return theCutter->getTile(rect, resLevel);
+//    theTile->setImageRectangle(rect);
+//    theTile->setDataObjectStatus(OSSIM_FULL);
+
+//    theTile->makeBlank();
+//    ossimIrect boundingRect = getBoundingRect(resLevel);
+//    ossimIrect tileRect     = tile->getImageRectangle();
+//    ossimIrect clipRect     = boundingRect.clipToRect(tileRect);
+
+//    theTile->loadTile(tile->getBuf(),
+//                      tile->getImageRectangle(),
+//                      clipRect,
+//                      OSSIM_BSQ);
+   
+//    theTile->validate();
+   
+}
+
+void ossimTrimFilter::getValidImageVertices(
+   vector<ossimIpt>& validVertices,
+   ossimVertexOrdering ordering,
+   ossim_uint32 resLevel)const
+{
+   ossimImageSource::getValidImageVertices(validVertices,
+                                           ordering,
+                                           resLevel);
+   if(validVertices.size()==4)
+   {
+      ossimDpt averagePt((ossimDpt(validVertices[0])+
+                          ossimDpt(validVertices[1])+
+                          ossimDpt(validVertices[2])+
+                          ossimDpt(validVertices[3]))*.25);
+      ossimDpt averageTop( ( ossimDpt(validVertices[0]+
+                                      validVertices[1])*.5) );
+      ossimDpt averageBottom( ( ossimDpt(validVertices[2]+
+                                         validVertices[3])*.5 ) );
+      ossimDpt averageLeft( (ossimDpt(validVertices[0]+
+                                      validVertices[3])*.5) );
+      ossimDpt averageRight( (ossimDpt(validVertices[1]+
+                                       validVertices[2])*.5) );
+
+      ossimDpt topAxis    = (averageTop-averagePt);
+      ossimDpt rightAxis = (averageRight-averagePt);
+      ossimDpt leftAxis  = (averageLeft-averagePt);
+      ossimDpt bottomAxis = (averageBottom-averagePt);
+
+      double topLen    = topAxis.length();
+      double bottomLen = bottomAxis.length();
+      double rightLen  = rightAxis.length();
+      double leftLen   = leftAxis.length();
+
+      if((topLen > FLT_EPSILON)&&
+         (bottomLen > FLT_EPSILON)&&
+         (leftLen > FLT_EPSILON)&&
+         (rightLen > FLT_EPSILON))
+      {
+         topAxis    = topAxis*(1.0/topLen);
+         bottomAxis = bottomAxis*(1.0/bottomLen);
+         leftAxis   = leftAxis*(1.0/leftLen);
+         rightAxis  = rightAxis*(1.0/rightLen);
+
+         ossim_uint32 idx = 0;
+         ossim_uint32 count = 0;
+         for(idx = 0; idx < validVertices.size(); ++idx)
+         {
+            ossimDpt axis[2];
+            double   axisLen[2];
+            ossimDpt diff  = validVertices[idx]-averagePt;
+            double testLen = (topAxis.x*diff.x+
+                              topAxis.y*diff.y);
+            count = 0;
+            if(testLen >= -FLT_EPSILON)
+            {
+               axis[count]    = topAxis;
+               axisLen[count] = testLen*(1.0-theTopPercent);
+               ++count;
+            }
+
+            if(count < 2)
+            {
+               testLen = (bottomAxis.x*diff.x+
+                          bottomAxis.y*diff.y);
+               if(testLen >= -FLT_EPSILON)
+               {
+                  axis[count]    = bottomAxis;
+                  axisLen[count] = testLen*(1.0-theBottomPercent);
+                  ++count;
+               }
+            }
+            if(count < 2)
+            {
+               testLen = (leftAxis.x*diff.x+
+                          leftAxis.y*diff.y);
+               if(testLen >= -FLT_EPSILON)
+               {
+                  axis[count]    = leftAxis;
+                  axisLen[count] = testLen*(1.0-theLeftPercent);
+                  ++count;
+               }
+            }
+            if(count < 2)
+            {
+               testLen = (rightAxis.x*diff.x+
+                          rightAxis.y*diff.y);
+               if(testLen >= -FLT_EPSILON)
+               {
+                  axis[count]    = rightAxis;
+                  axisLen[count] = testLen*(1.0-theRightPercent);
+                  ++count;
+               }
+            }
+            if(count == 2)
+            {
+               validVertices[idx] = (averagePt + (axis[0]*axisLen[0] +
+                                                  axis[1]*axisLen[1]));
+            }
+         }
+      }
+   }
+//    ossimIrect rect = getBoundingRect();
+
+//    if(ordering == OSSIM_CLOCKWISE_ORDER)
+//    {
+//       validVertices.push_back(rect.ul());
+//       validVertices.push_back(rect.ur());
+//       validVertices.push_back(rect.lr());
+//       validVertices.push_back(rect.ll());
+//    }
+//    else
+//    {
+//       validVertices.push_back(rect.ul());
+//       validVertices.push_back(rect.ll());
+//       validVertices.push_back(rect.lr());
+//       validVertices.push_back(rect.ur());
+//    }
+}
+
+ossimIrect ossimTrimFilter::getBoundingRect(ossim_uint32 resLevel)const
+{
+
+   vector<ossimIpt> validVertices;
+   ossimIrect result;
+   result.makeNan();
+   getValidImageVertices(validVertices, OSSIM_CLOCKWISE_ORDER, resLevel);
+   
+   if(validVertices.size())
+   {
+      result = ossimIrect(validVertices);
+   }
+
+   return result;
+}
+
+void ossimTrimFilter::initialize()
+{
+   if(theInputConnection)
+   {
+      theCutter->disconnectMyInput(0, false, false);
+      if(getInput())
+      {
+         theCutter->connectMyInputTo(0, getInput());
+      }
+      theCutter->initialize();
+      getValidImageVertices(theValidVertices);
+      theCutter->setNumberOfPolygons(1);
+      theCutter->setPolygon(theValidVertices);
+   }
+}
+
+bool ossimTrimFilter::saveState(ossimKeywordlist& kwl,
+                                const char* prefix)const
+{
+   kwl.add(prefix,
+           "left_percent",
+           theLeftPercent,
+           true);
+   kwl.add(prefix,
+           "right_percent",
+           theRightPercent,
+           true);
+   kwl.add(prefix,
+           "top_percent",
+           theTopPercent,
+           true);
+   kwl.add(prefix,
+           "bottom_percent",
+           theBottomPercent,
+           true);
+
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
+bool ossimTrimFilter::loadState(const ossimKeywordlist& kwl,
+                                const char* prefix)
+{
+   const char* leftPerc   = kwl.find(prefix, "left_percent");
+   const char* rightPerc  = kwl.find(prefix, "right_percent");
+   const char* topPerc    = kwl.find(prefix, "top_percent");
+   const char* bottomPerc = kwl.find(prefix, "bottom_percent");
+
+   if(leftPerc)
+   {
+      theLeftPercent = ossimString(leftPerc).toDouble();
+   }
+   if(rightPerc)
+   {
+      theRightPercent = ossimString(rightPerc).toDouble();
+   }
+   if(topPerc)
+   {
+      theTopPercent = ossimString(topPerc).toDouble();
+   }
+   if(bottomPerc)
+   {
+      theBottomPercent = ossimString(bottomPerc).toDouble();
+   }
+   
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
+ossimRefPtr<ossimProperty> ossimTrimFilter::getProperty(const ossimString& name)const
+{
+   ossimProperty* prop = 0;
+   if(name == "left_percent")
+   {
+      prop = new ossimNumericProperty(name,
+                                      ossimString::toString(theLeftPercent),
+                                      0.0, 1.0);
+      prop->setFullRefreshBit();
+   }
+   else if(name == "right_percent")
+   {
+      prop = new ossimNumericProperty(name,
+                                      ossimString::toString(theRightPercent),
+                                      0.0, 1.0);
+      prop->setFullRefreshBit();
+   }
+   else if(name == "top_percent")
+   {
+      prop = new ossimNumericProperty(name,
+                                      ossimString::toString(theTopPercent),
+                                      0.0, 1.0);
+      prop->setFullRefreshBit();
+   }
+   else if(name == "bottom_percent")
+   {
+      prop = new ossimNumericProperty(name,
+                                      ossimString::toString(theBottomPercent),
+                                      0.0, 1.0);
+      prop->setFullRefreshBit();
+   }
+
+   if(prop) return prop;
+   
+   return ossimImageSourceFilter::getProperty(name);
+}
+
+void ossimTrimFilter::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property.valid())return;
+   ossimString name = property->getName();
+   
+   if(name == "left_percent")
+   {
+      theLeftPercent = property->valueToString().toDouble();
+   }
+   else if(name == "right_percent")
+   {
+      theRightPercent = property->valueToString().toDouble();
+   }
+   else if(name == "top_percent")
+   {
+      theTopPercent = property->valueToString().toDouble();
+   }
+   else if(name == "bottom_percent")
+   {
+      theBottomPercent = property->valueToString().toDouble();
+   }
+   else
+   {
+      return ossimImageSourceFilter::setProperty(property);
+   }
+}
+
+void ossimTrimFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   propertyNames.push_back("left_percent");
+   propertyNames.push_back("right_percent");
+   propertyNames.push_back("top_percent");
+   propertyNames.push_back("bottom_percent");
+}
+
diff --git a/ossim/src/ossim/imaging/ossimTwoColorView.cpp b/ossim/src/ossim/imaging/ossimTwoColorView.cpp
new file mode 100644
index 0000000..5b1b7db
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimTwoColorView.cpp
@@ -0,0 +1,421 @@
+//-------------------------------------------------------------------
+// License: MIT
+//
+// Author:  Garrett Potts
+//
+//-------------------------------------------------------------------
+//  $Id$
+
+#include <ossim/imaging/ossimTwoColorView.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+
+RTTI_DEF1(ossimTwoColorView,
+          "ossimTwoColorView" ,
+          ossimImageCombiner);
+
+ossimTwoColorView::ossimTwoColorView()
+   :
+   ossimImageCombiner(0, 2, 0, true, false) ,
+   m_byPassFlag(true),
+   m_nativeFlag(false),
+   m_newInput(0),
+   m_oldInput(0),
+   m_newInputBandIndex(0),
+   m_oldInputBandIndex(0),
+   m_redSource(ossimTwoColorView::OLD),
+   m_grnSource(ossimTwoColorView::NEW),
+   m_bluSource(ossimTwoColorView::NEW)
+{
+}
+
+ossim_uint32 ossimTwoColorView::getNumberOfOutputBands() const
+{
+   if(m_byPassFlag||!isSourceEnabled())
+   {
+      return ossimImageCombiner::getNumberOfOutputBands();
+   }
+   return 3;
+}
+
+ossimScalarType ossimTwoColorView::getOutputScalarType() const
+{
+   if(m_byPassFlag||!isSourceEnabled())
+   {
+      return ossimImageCombiner::getOutputScalarType();
+   }
+   return OSSIM_UINT8;
+}
+
+void ossimTwoColorView::setBandIndexMapping(
+   ossim_uint32 oldInputBandIndex,
+   ossim_uint32 newInputBandIndex,
+   ossimTwoColorMultiViewOutputSource redOutputSource,
+   ossimTwoColorMultiViewOutputSource grnOutputSource,
+   ossimTwoColorMultiViewOutputSource bluOutputSource)
+{
+   m_oldInputBandIndex = oldInputBandIndex;
+   m_newInputBandIndex = newInputBandIndex;
+   m_redSource = redOutputSource;
+   m_grnSource = grnOutputSource;
+   m_bluSource = bluOutputSource;
+}
+
+double ossimTwoColorView::getNullPixelValue(ossim_uint32 band)const
+{
+   if(m_byPassFlag||!isSourceEnabled())
+   {
+      return ossimImageCombiner::getNullPixelValue(band);
+   }
+   return 0;
+}
+
+double ossimTwoColorView::getMinPixelValue(ossim_uint32 band)const
+{
+   if(m_byPassFlag||!isSourceEnabled())
+   {
+      return ossimImageCombiner::getMinPixelValue(band);
+   }
+   return 1;
+}
+
+double ossimTwoColorView::getMaxPixelValue(ossim_uint32 band)const
+{
+   if(m_byPassFlag||!isSourceEnabled())
+   {
+      return ossimImageCombiner::getMaxPixelValue(band);
+   }
+   return 256;
+}
+
+ossimRefPtr<ossimImageData> ossimTwoColorView::getTile(const ossimIrect& rect,
+                                                       ossim_uint32 resLevel)
+{
+   ossim_uint32 tileIdx = 0;
+   if(m_byPassFlag||!isSourceEnabled())
+   {
+      return getNextTile(tileIdx, 0, rect, resLevel);
+   }
+   if(!m_twoColorTile.valid())
+   {
+      allocate();
+   }
+   if(!m_twoColorTile.valid())
+   {
+      return m_twoColorTile;
+   }
+   m_twoColorTile->setImageRectangle(rect);
+   m_twoColorTile->makeBlank();
+   
+   ossimRefPtr<ossimImageData> newData = m_newInput->getTile(rect, resLevel);
+   ossimRefPtr<ossimImageData> oldData = m_oldInput->getTile(rect, resLevel);
+
+   runAlgorithm(newData.get(), oldData.get());
+
+   m_twoColorTile->validate();
+
+   return m_twoColorTile;
+}
+void ossimTwoColorView::runAlgorithm(ossimImageData* newData, ossimImageData* oldData)
+{
+   if(m_nativeFlag)
+   {
+      runNative8(newData, oldData);
+   }
+   else 
+   {
+      runNorm(newData, oldData);
+   }
+}
+
+void ossimTwoColorView::runNative8(ossimImageData* newData, ossimImageData* oldData)
+{
+   if ( newData && oldData && m_twoColorTile.valid() &&
+        ( m_twoColorTile->getNumberOfBands() == 3 ) )
+   {
+      // old, new, red, green, blue buffers...
+      ossim_uint8* o = static_cast<ossim_uint8*>( oldData->getBuf(m_oldInputBandIndex) );
+      ossim_uint8* n = static_cast<ossim_uint8*>( newData->getBuf(m_newInputBandIndex) );
+      ossim_uint8* r = static_cast<ossim_uint8*>( m_twoColorTile->getBuf(0) );
+      ossim_uint8* g = static_cast<ossim_uint8*>( m_twoColorTile->getBuf(1) );
+      ossim_uint8* b = static_cast<ossim_uint8*>( m_twoColorTile->getBuf(2) );
+
+      if ( o && n && r && g && b )
+      {
+         // Assuming null pix of 0 for 8 bit.
+         const ossim_uint8 MP = 1;
+         const ossim_uint8 NP = 0;
+
+         ossim_uint8 newPix = 0;
+         ossim_uint8 oldPix = 0;
+         
+         const ossim_uint32 MAX_IDX = m_twoColorTile->getSizePerBand();
+         
+         for(ossim_uint32 idx = 0; idx < MAX_IDX; ++idx)
+         {
+            if( ( *n == NP ) && ( *o == NP ) )
+            {
+               // Both inputs null, set all outputs null.
+               *r = NP;
+               *b = NP;
+               *g = NP;
+            }
+            else 
+            {
+               // At least one input is not null.
+               newPix = (*n != NP) ? *n : MP;
+               oldPix = (*o != NP) ? *o : MP;
+
+               // Set red, OLD is default so check first:
+               if ( m_redSource == ossimTwoColorView::OLD )
+               {
+                  *r = oldPix;
+               }
+               else if ( m_redSource == ossimTwoColorView::NEW )
+               {
+                  *r = newPix;
+               }
+               else
+               {
+                  *r = MP;
+               }
+
+               // Set green, NEW is default so check first:
+               if ( m_grnSource == ossimTwoColorView::NEW )
+               {
+                  *g = newPix;
+               }
+               else if ( m_grnSource == ossimTwoColorView::OLD )
+               {
+                  *g = oldPix;
+               }
+               else
+               {
+                  *g = MP;
+               }
+
+               // Set blue, NEW is default so check first:
+               if ( m_grnSource == ossimTwoColorView::NEW )
+               {
+                  *b = newPix;
+               }
+               else if ( m_grnSource == ossimTwoColorView::OLD )
+               {
+                  *b = oldPix;
+               }
+               else
+               {
+                  *b = MP;
+               }
+            }
+
+            // Next pixel:
+            ++n;
+            ++o;
+            ++r;
+            ++g;
+            ++b;
+         }
+      }
+   }
+}
+
+void ossimTwoColorView::runNorm(ossimImageData* newData, ossimImageData* oldData)
+{
+   if ( newData && oldData && m_twoColorTile.valid() &&
+        ( m_twoColorTile->getNumberOfBands() == 3 ) )
+   {
+      const ossim_uint32 MAX_IDX = m_twoColorTile->getSizePerBand();
+      
+      // Buffers for normalized oldData and newData tiles.
+      std::vector<ossim_float32> oldDataBuffer(MAX_IDX);
+      std::vector<ossim_float32> newDataBuffer(MAX_IDX);
+
+      // old and new input buffers.
+      ossim_float32* o = &oldDataBuffer.front();      
+      ossim_float32* n = &newDataBuffer.front();
+
+      // Normalize/copy to buffers.
+      newData->copyTileBandToNormalizedBuffer(m_newInputBandIndex, n);
+      oldData->copyTileBandToNormalizedBuffer(m_oldInputBandIndex, o);
+      
+      // Get the output buffers.
+      ossim_uint8* r = static_cast<ossim_uint8*>( m_twoColorTile->getBuf(0) );
+      ossim_uint8* g = static_cast<ossim_uint8*>( m_twoColorTile->getBuf(1) );
+      ossim_uint8* b = static_cast<ossim_uint8*>( m_twoColorTile->getBuf(2) );
+
+      if ( o && n && r && g && b )
+      {
+         // Assuming null pix of 0 for 8 bit.
+         const ossim_uint8 MP = 1;
+         const ossim_uint8 NP = 0;
+
+         ossim_uint8   newPix = 0;
+         ossim_uint8   oldPix = 0;
+         ossim_float32 tmpPix = 0.0;
+         
+         const ossim_uint32 MAX_IDX = m_twoColorTile->getSizePerBand();
+         
+         for(ossim_uint32 idx = 0; idx < MAX_IDX; ++idx)
+         {
+            if( ( *n == NP ) && ( *o == NP ) )
+            {
+               // Both inputs null, set all outputs null.
+               *r = NP;
+               *b = NP;
+               *g = NP;
+            }
+            else 
+            {
+               // At least one input is not null.
+               
+               // Set the newPix:
+               if ( *n != NP )
+               {
+                  // Un-normalize:
+                  tmpPix = (*n) * 255.0;
+
+                  // Clamp to min/max.
+                  tmpPix = (tmpPix <= 255.0) ? ( (tmpPix >= 1.0) ? tmpPix : 1.0) : 255.0;
+
+                  // Copy
+                  newPix = static_cast<ossim_uint8>( tmpPix );
+               }
+               else
+               {
+                  newPix = MP;
+               }
+
+               // Set the oldPix:
+               if ( *o != NP )
+               {
+                  // Un-normalize:
+                  tmpPix = (*o) * 255.0;
+
+                  // Clamp to min/max.
+                  tmpPix = (tmpPix <= 255.0) ? ( (tmpPix >= 1.0) ? tmpPix : 1.0) : 255.0;
+
+                  // Copy
+                  oldPix = static_cast<ossim_uint8>( tmpPix );
+               }
+               else
+               {
+                  oldPix = MP;
+               }
+
+               // Set red, OLD is default so check first:
+               if ( m_redSource == ossimTwoColorView::OLD )
+               {
+                  *r = oldPix;
+               }
+               else if ( m_redSource == ossimTwoColorView::NEW )
+               {
+                  *r = newPix;
+               }
+               else
+               {
+                  *r = MP;
+               }
+
+               // Set green, NEW is default so check first:
+               if ( m_grnSource == ossimTwoColorView::NEW )
+               {
+                  *g = newPix;
+               }
+               else if ( m_grnSource == ossimTwoColorView::OLD )
+               {
+                  *g = oldPix;
+               }
+               else
+               {
+                  *g = MP;
+               }
+
+               // Set blue, NEW is default so check first:
+               if ( m_grnSource == ossimTwoColorView::NEW )
+               {
+                  *b = newPix;
+               }
+               else if ( m_grnSource == ossimTwoColorView::OLD )
+               {
+                  *b = oldPix;
+               }
+               else
+               {
+                  *b = MP;
+               }
+            }
+
+            // Next pixel:
+            ++n;
+            ++o;
+            ++r;
+            ++g;
+            ++b;
+         }
+      }
+   }
+}
+
+void ossimTwoColorView::allocate()
+{
+   m_twoColorTile = ossimImageDataFactory::instance()->create(this, this);
+   if(m_twoColorTile.valid())
+   {
+      m_twoColorTile->initialize();
+   }
+}
+
+
+void ossimTwoColorView::initialize()
+{
+   ossimImageCombiner::initialize();
+   m_newInput = 0;
+   m_oldInput = 0;
+   m_twoColorTile = 0;
+   m_nativeFlag = false;
+   m_byPassFlag = false;
+
+   if(getNumberOfInputs() < 2)
+   {
+      m_byPassFlag = true;
+   }
+   else 
+   {
+      m_oldInput = dynamic_cast<ossimImageSource*>( getInput(0) );
+      m_newInput = dynamic_cast<ossimImageSource*>( getInput(1) );
+
+      //---
+      // Range check band selection. This can be set from setBandIndexMapping method which
+      // does no error checking because inputs may not be set.
+      //----
+      if ( m_oldInput.valid() )
+      {
+         if ( m_oldInputBandIndex >= m_oldInput->getNumberOfOutputBands() )
+         {
+            m_oldInputBandIndex = 0;
+         }
+      }
+      
+      if ( m_newInput.valid() )
+      {
+         if ( m_newInputBandIndex >= m_newInput->getNumberOfOutputBands() )
+         {
+            m_newInputBandIndex = 0;
+         }
+      }
+         
+      if(!m_newInput||!m_oldInput)
+      {
+         m_byPassFlag = true;
+      }
+      else
+      {
+         if((m_newInput->getOutputScalarType() == OSSIM_UINT8)&&
+            (m_oldInput->getOutputScalarType() == OSSIM_UINT8))
+         {
+            m_nativeFlag = true;
+         }
+      }
+   }
+}
+
diff --git a/src/ossim/imaging/ossimU11ImageData.cpp b/ossim/src/ossim/imaging/ossimU11ImageData.cpp
similarity index 100%
rename from src/ossim/imaging/ossimU11ImageData.cpp
rename to ossim/src/ossim/imaging/ossimU11ImageData.cpp
diff --git a/src/ossim/imaging/ossimU16ImageData.cpp b/ossim/src/ossim/imaging/ossimU16ImageData.cpp
similarity index 100%
rename from src/ossim/imaging/ossimU16ImageData.cpp
rename to ossim/src/ossim/imaging/ossimU16ImageData.cpp
diff --git a/src/ossim/imaging/ossimU8ImageData.cpp b/ossim/src/ossim/imaging/ossimU8ImageData.cpp
similarity index 100%
rename from src/ossim/imaging/ossimU8ImageData.cpp
rename to ossim/src/ossim/imaging/ossimU8ImageData.cpp
diff --git a/ossim/src/ossim/imaging/ossimUsgsDemTileSource.cpp b/ossim/src/ossim/imaging/ossimUsgsDemTileSource.cpp
new file mode 100644
index 0000000..b7b6235
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimUsgsDemTileSource.cpp
@@ -0,0 +1,575 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description:
+//
+// Contains class declaration for ossimUsgsDemTileSource.
+//
+//********************************************************************
+// $Id: ossimUsgsDemTileSource.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <iostream>
+#include <fstream>
+#include <ossim/imaging/ossimUsgsDemTileSource.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/imaging/ossimTiffTileSource.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/support_data/ossimDemHeader.h>
+#include <ossim/support_data/ossimDemProfile.h>
+#include <ossim/support_data/ossimDemGrid.h>
+#include <ossim/support_data/ossimDemUtil.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/imaging/ossimImageGeometryRegistry.h>
+
+RTTI_DEF1(ossimUsgsDemTileSource, "ossimUsgsDemTileSource", ossimImageHandler)
+
+// Static trace for debugging
+static ossimTrace traceDebug("ossimUsgsDemTileSource:debug");
+
+static const char DEM_TYPE_KW[] = "dem_type";
+static const char USGS_DEM_KW[] = "usgs_dem";
+
+
+ossimUsgsDemTileSource::ossimUsgsDemTileSource()
+   :
+      ossimImageHandler(),
+      theDem(0),
+      theTile(0),
+      theNullValue(0.0),
+      theMinHeight(0.0),
+      theMaxHeight(0.0),
+      theFeetFlag(false),
+      theIsDemFlag(false),
+      theScalarType(OSSIM_SINT16)
+{
+   // Construction not complete.  Users should call "open" method.
+}
+
+ossimUsgsDemTileSource::~ossimUsgsDemTileSource()
+{
+   if (theDem)
+   {
+      delete theDem;
+      theDem = 0;
+   }
+   theTile = 0;
+}
+
+ossimRefPtr<ossimImageData> ossimUsgsDemTileSource::getTile(
+   const  ossimIrect& tile_rect, ossim_uint32 resLevel)
+{
+   if (theTile.valid())
+   {
+      // Image rectangle must be set prior to calling getTile.
+      theTile->setImageRectangle(tile_rect);
+      
+      if ( getTile( theTile.get(), resLevel ) == false )
+      {
+         if (theTile->getDataObjectStatus() != OSSIM_NULL)
+         {
+            theTile->makeBlank();
+         }
+      }
+   }
+   
+   return theTile;
+}
+
+bool ossimUsgsDemTileSource::getTile(ossimImageData* result,
+                                     ossim_uint32 resLevel)
+{
+   bool status = false;
+
+   //---
+   // Not open, this tile source bypassed, or invalid res level,
+   // return a blank tile.
+   //---
+   if( isOpen() && isSourceEnabled() && isValidRLevel(resLevel) &&
+       result && (result->getNumberOfBands() == getNumberOfOutputBands()) )
+   {
+      result->ref(); // Increment ref count.
+
+      //---
+      // Check for overview tile.  Some overviews can contain r0 so always
+      // call even if resLevel is 0.  Method returns true on success, false
+      // on error.
+      //---
+      status = getOverviewTile(resLevel, result);
+      
+      if (status) // From old code.  Not sure if still needed.
+      {
+         result->setMinPix(theTile->getMinPix(), theTile->getNumberOfBands());
+         result->setMaxPix(theTile->getMaxPix(), theTile->getNumberOfBands());
+         result->setNullPix(theTile->getNullPix(), theTile->getNumberOfBands());
+      }
+      
+      if (!status) // Did not get an overview tile.
+      {
+         status = true;
+         
+         ossimIrect tile_rect = result->getImageRectangle();
+         
+         ossimIrect image_rect = getImageRectangle(resLevel);
+         
+         //---
+         // See if any point of the requested tile is in the image.
+         //---
+         if ( tile_rect.intersects(image_rect) )
+         {
+            ossimIrect clip_rect = tile_rect.clipToRect(image_rect);
+            
+            if ( !tile_rect.completely_within(clip_rect) )
+            {
+               // Start with a blank tile.
+               result->makeBlank();
+            }
+            
+            // Load the tile buffer with data from the dem cell.
+            if (theScalarType == OSSIM_FLOAT32)
+            {
+               status = fillBuffer(ossim_float32(0.0),
+                                   tile_rect,
+                                   clip_rect,
+                                   result);
+            }
+            else
+            {
+               status = fillBuffer(ossim_sint16(0),
+                                   tile_rect,
+                                   clip_rect,
+                                   result);
+            }
+            if (status == true)
+            {
+               result->validate();
+            }
+         }    
+         else // No intersection:  if ( tile_rect.intersects(image_rect) )
+         {
+            result->makeBlank();
+         }
+      }
+
+      result->unref(); // Decrement ref count.
+   }
+
+   return status;
+}
+
+//*******************************************************************
+// Private Method:
+//*******************************************************************
+template <class T>
+bool ossimUsgsDemTileSource::fillBuffer(T,
+                                        const ossimIrect& tile_rect,
+                                        const ossimIrect& clip_rect,
+                                        ossimImageData* tile)
+{
+   const uint32 TILE_WIDTH = tile->getWidth();
+
+   T* d = static_cast<T*>(tile->getBuf());
+   
+   ossim_float32 spatialResZ = theDem->getHeader().getSpatialResZ();
+   if (spatialResZ == 0.0) spatialResZ = 1.0;
+
+   // Compute the starting offset.
+   uint32 offset = (clip_rect.ul().y - tile_rect.ul().y) * TILE_WIDTH +
+                   clip_rect.ul().x - tile_rect.ul().x;
+
+   for (int32 line = clip_rect.ul().y; line <= clip_rect.lr().y; ++line)
+   {
+      // Loop in the longitude or sample direction.
+      int samp_offset = 0;
+      for (int32 samp = clip_rect.ul().x; samp <= clip_rect.lr().x; ++samp)
+      {
+         ossim_float32 p = theDem->getElevation(samp, line);
+         if (p != theNullValue)
+         {
+            p *= spatialResZ;
+            if (theFeetFlag) p = p * MTRS_PER_FT;
+         }
+         d[offset + samp_offset] = static_cast<T>(p);
+         ++samp_offset;
+      }
+      offset += TILE_WIDTH;
+   }
+
+   return true;
+}
+
+ossimIrect
+ossimUsgsDemTileSource::getImageRectangle(ossim_uint32 reduced_res_level) const
+{
+   return ossimIrect(0,
+                     0,
+                     getNumberOfSamples(reduced_res_level) - 1,
+                     getNumberOfLines(reduced_res_level)   - 1);
+}
+
+bool ossimUsgsDemTileSource::open()
+{
+   static const char MODULE[] = "ossimUsgsDemTileSource::open";
+
+   if (traceDebug())
+   {
+      CLOG << "DEBUG:"
+           << "\nAttempting to parse file:  " << theImageFile.c_str()
+           << std::endl;
+   }
+
+   theIsDemFlag = ossimDemUtil::isUsgsDem(theImageFile);
+
+   if (theIsDemFlag)
+   {
+      // Open up the file for reading.
+      std::ifstream is(theImageFile.c_str(),
+                       std::ios_base::in | std::ios_base::binary);
+      if (is.good())
+      {
+         // Start out with a fresh dem.
+         if (theDem) delete theDem;
+         
+         //---
+         // Set the null to -32768.  This will also be the missing data values.
+         //---
+         theNullValue = OSSIM_DEFAULT_NULL_PIX_SINT16;
+         
+         //---
+         // Read the dem.
+         // 
+         // NOTE:  This defines the missing data value.  It should be the
+         // same as null for mosaicing and min/max calculations.
+         //---
+         theDem = new ossimDemGrid(theNullValue);
+         theDem->read(is);
+         
+         is.close();
+      }
+      else
+      {
+         theIsDemFlag = false;
+      }
+   }
+   
+   if (theIsDemFlag)
+   {
+      theFeetFlag  = (theDem->getHeader().getElevationUnits() == 1) ?
+         true : false;
+      
+      theMinHeight = theFeetFlag ? theDem->getHeader().getMinimumElev() *
+         MTRS_PER_FT : theDem->getHeader().getMinimumElev();
+      theMaxHeight = theFeetFlag ? theDem->getHeader().getMaximumElev() *
+         MTRS_PER_FT : theDem->getHeader().getMaximumElev();
+      
+      completeOpen();
+      
+      //---
+      // Set up the tiles.  Note the blank tile will not get initialized to
+      // save memory.  This includes setting the min and max pixel value
+      // gathered from the statistics.
+      //---
+      theTile = ossimImageDataFactory::instance()->create(this, this);
+      theTile->initialize();
+      
+      if (traceDebug())
+      {
+         CLOG << setiosflags(ios::fixed) << setprecision(5) << "DEBUG:"
+              << "\nNull pix:  " << (theTile->getNullPix(0))
+              << "\nMin  pix:  " << (theTile->getMinPix(0))
+              << "\nMax  pix:  " << (theTile->getMaxPix(0))
+              << "\nlines:     " << theDem->getHeight()
+              << "\nsamples:   " << theDem->getWidth()
+              << std::endl;
+      }
+   }
+
+   return theIsDemFlag;
+}
+
+bool ossimUsgsDemTileSource::saveState(ossimKeywordlist& kwl,
+                                       const char* prefix) const
+{
+   // Save of the dem type keyword.
+   kwl.add(prefix, DEM_TYPE_KW, USGS_DEM_KW, true);
+
+   // Save the scalar type.
+   kwl.add(prefix,
+           ossimKeywordNames::SCALAR_TYPE_KW,
+           ossimScalarTypeLut::instance()->getEntryString(theScalarType));
+   
+   return ossimImageHandler::saveState(kwl, prefix);
+}
+
+bool ossimUsgsDemTileSource::loadState(const ossimKeywordlist& kwl,
+                                       const char* prefix)
+{
+   if (ossimImageHandler::loadState(kwl, prefix))
+   {
+      //***
+      // Look for "dem_type: usgs_dem" key value pair.
+      // Note:  If not in the keyword list the "open" will look for it on
+      //        disk.
+      //***
+      const char* lookup = kwl.find(prefix, DEM_TYPE_KW);
+      if (lookup)
+      {
+         ossimString s = lookup;
+         s.downcase();
+         if (s == USGS_DEM_KW) theIsDemFlag = true;
+      }
+
+      //---
+      // Look for scalar type override.
+      //
+      // Note: We only allow float or signed 16 bit.
+      //---
+      lookup = kwl.find(prefix, ossimKeywordNames::SCALAR_TYPE_KW);
+      if (lookup)
+      {
+         ossimScalarType st =
+            static_cast<ossimScalarType>(ossimScalarTypeLut::instance()->
+                                         getEntryNumber(lookup));
+         if ( (st == OSSIM_FLOAT32) || (st == OSSIM_SINT16))
+         {
+            theScalarType = st;
+         }
+         else
+         {
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << "ossimUsgsDemTileSource::loadState WARNING:"
+                  << "\nInvalid scalar type: "
+                  << ossimScalarTypeLut::instance()->
+                  getEntryString(st)
+                  << std::endl;
+            }
+         }
+      }
+
+      if (open())
+      {
+         return true;
+      }
+   }
+
+   return false;
+}
+
+ossimRefPtr<ossimImageGeometry> ossimUsgsDemTileSource::getImageGeometry()
+{
+   if ( !theGeometry )
+   {
+      // Check for external geom:
+      theGeometry = getExternalImageGeometry();
+
+      if ( !theGeometry )
+      {
+         // Check the internal geometry first to avoid a factory call.
+         theGeometry = getInternalImageGeometry();
+
+         // At this point it is assured theGeometry is set.
+
+         //---
+         // WARNING:
+         // Must create/set theGeometry at this point or the next call to
+         // ossimImageGeometryRegistry::extendGeometry will put us in an infinite loop
+         // as it does a recursive call back to ossimImageHandler::getImageGeometry().
+         //---         
+
+         // Check for set projection.
+         if ( !theGeometry->getProjection() )
+         {
+            // Try factories for projection.
+            ossimImageGeometryRegistry::instance()->extendGeometry(this);
+         }
+      }
+
+      // Set image things the geometry object should know about.
+      initImageParameters( theGeometry.get() );
+   }
+
+   return theGeometry;
+}
+
+
+ossimRefPtr<ossimImageGeometry> ossimUsgsDemTileSource::getInternalImageGeometry() const
+{
+   ossimRefPtr<ossimImageGeometry> geom = new ossimImageGeometry();
+   
+   if (theDem)
+   {
+      const ossimDemHeader HDR = theDem->getHeader();
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimUsgsDemTileSource::getInternalImageGeometry DEBUG:"
+            << "\nDEM Header:"
+            << std::endl;
+         HDR.print(ossimNotify(ossimNotifyLevel_DEBUG));
+      }
+      
+      // The DEM's image geometry is a map projection, obtained here via KWL:
+      ossimKeywordlist proj_kwl;
+      if ( HDR.getImageGeometry(proj_kwl) ) 
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "ossimUsgsDemTileSource::getInternalImageGeometry DEBUG:"
+               << "keyword list:\n" << proj_kwl
+               << std::endl;
+         }
+         
+         // Capture for next time.
+         ossimRefPtr<ossimProjection> proj =
+            ossimProjectionFactoryRegistry::instance()->
+            createProjection(proj_kwl);
+         if ( proj.valid() )
+         {
+            geom->setProjection(proj.get());
+         }
+      }
+   }
+   
+   return geom;
+}
+
+ossimScalarType ossimUsgsDemTileSource::getOutputScalarType() const
+{
+   return theScalarType;
+}
+
+ossim_uint32 ossimUsgsDemTileSource::getTileWidth() const
+{
+   return ( theTile.valid() ? theTile->getWidth() : 0 );
+}
+
+ossim_uint32 ossimUsgsDemTileSource::getTileHeight() const
+{
+   return ( theTile.valid() ? theTile->getHeight() : 0 );
+}
+
+ossim_uint32 ossimUsgsDemTileSource::getNumberOfLines(ossim_uint32 reduced_res_level) const
+{
+   if (reduced_res_level == 0)
+   {
+      if (theDem)
+      {
+         return theDem->getHeight();
+      }
+      else
+      {
+         cerr << "ossimUsgsDemTileSource::getNumberOfLines ERROR:"
+              << "\nNot initialized!" << std::endl;
+         return 0;
+      }
+   }
+   else if (theOverview.valid())
+   {
+      return theOverview->getNumberOfLines(reduced_res_level);
+   }
+
+   return 0;
+}
+
+ossim_uint32 ossimUsgsDemTileSource::getNumberOfSamples(ossim_uint32 reduced_res_level) const
+{
+   if (reduced_res_level == 0)
+   {
+      if (theDem)
+      {
+         return theDem->getWidth();
+      }
+      else
+      {
+         cerr << "ossimUsgsDemTileSource::getNumberOfSamples ERROR:"
+              << "\nNot initialized!" << std::endl;
+         return 0;
+      }
+   }
+   else if (theOverview.valid())
+   {
+      return theOverview->getNumberOfSamples(reduced_res_level);
+   }
+
+   return 0;
+}
+
+ossim_uint32 ossimUsgsDemTileSource::getImageTileWidth() const
+{
+   return 0;
+}
+
+ossim_uint32 ossimUsgsDemTileSource::getImageTileHeight() const
+{
+   return 0;
+}
+
+ossimString ossimUsgsDemTileSource::getShortName() const
+{
+   return ossimString("usgs dem");
+}
+
+ossimString ossimUsgsDemTileSource::getLongName() const
+{
+   return ossimString("usgs dem reader");
+}
+
+ossim_uint32 ossimUsgsDemTileSource::getNumberOfInputBands() const
+{
+   return 1;
+}
+
+ossim_uint32 ossimUsgsDemTileSource::getNumberOfOutputBands()const
+{
+   return 1;
+}
+
+double ossimUsgsDemTileSource::getNullPixelValue(ossim_uint32 /* band */)const 
+{
+   return theNullValue;
+}
+
+double ossimUsgsDemTileSource::getMinPixelValue(ossim_uint32 band)const 
+{
+   if(band < theMetaData.getNumberOfBands())
+   {
+      return theMetaData.getMinPix(band);
+   }
+   return theMinHeight; 
+}
+
+double ossimUsgsDemTileSource::getMaxPixelValue(ossim_uint32 band)const 
+{
+   if(theMetaData.getNumberOfBands())
+   {
+      return theMetaData.getMaxPix(band);
+   }
+   return theMaxHeight; 
+}
+
+bool ossimUsgsDemTileSource::isOpen()const
+{
+   return (theDem ? true : false );
+}
+
+const ossimUsgsDemTileSource& ossimUsgsDemTileSource::operator=(const  ossimUsgsDemTileSource& rhs)
+{
+   return rhs;
+} 
+
+ossimUsgsDemTileSource::ossimUsgsDemTileSource(const ossimUsgsDemTileSource&)
+{
+}
+
diff --git a/ossim/src/ossim/imaging/ossimValueAssignImageSourceFilter.cpp b/ossim/src/ossim/imaging/ossimValueAssignImageSourceFilter.cpp
new file mode 100644
index 0000000..7f0c6e8
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimValueAssignImageSourceFilter.cpp
@@ -0,0 +1,378 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimValueAssignImageSourceFilter.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/imaging/ossimValueAssignImageSourceFilter.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+
+RTTI_DEF1(ossimValueAssignImageSourceFilter,
+          "ossimValueAssignImageSourceFilter",
+          ossimImageSourceFilter);
+
+ossimValueAssignImageSourceFilter::ossimValueAssignImageSourceFilter(ossimObject* owner)
+   :ossimImageSourceFilter(owner),
+    theAssignType(ossimValueAssignType_GROUP),
+    theTile(NULL)
+{
+}
+
+ossimValueAssignImageSourceFilter::~ossimValueAssignImageSourceFilter()
+{
+}
+
+ossimRefPtr<ossimImageData> ossimValueAssignImageSourceFilter::getTile(
+   const ossimIrect& tileRect,
+   ossim_uint32 resLevel)
+{
+   if(!theInputConnection)
+   {
+      return NULL;  // This filter requires an input.
+   }
+   
+   ossimRefPtr<ossimImageData> inputTile =
+      theInputConnection->getTile(tileRect, resLevel);
+   
+   if(!isSourceEnabled() || !inputTile.valid())
+   {
+      return inputTile;
+   }
+
+   if(!theTile.valid())
+   {
+      allocate(); // First time through...
+   }
+   
+   if (!theTile.valid()) // throw exeption...
+   {
+      return inputTile;
+   }
+
+   // Set the origin, resize if needed of the output tile.
+   theTile->setImageRectangle(tileRect);
+
+   if( inputTile->getDataObjectStatus() == OSSIM_NULL ||
+       inputTile->getDataObjectStatus() == OSSIM_EMPTY )
+   {
+      theTile->makeBlank();
+      return theTile;
+   }
+
+   if(!inputTile->getBuf())
+   {
+      theTile->makeBlank();
+   }
+   else
+   {
+      theTile->loadTile(inputTile.get());
+   }
+
+   switch(inputTile->getScalarType())
+   {
+      case OSSIM_UCHAR:
+      {
+         executeAssign(static_cast<ossim_uint8>(0),
+                       theTile);
+         break;
+      }
+      case OSSIM_FLOAT: 
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         executeAssign(static_cast<float>(0),
+                       theTile);
+         break;
+      }
+      case OSSIM_USHORT16:
+      case OSSIM_USHORT11:
+      {
+         executeAssign(static_cast<ossim_uint16>(0),
+                       theTile);
+         break;
+      }
+      case OSSIM_SSHORT16:
+      {
+         executeAssign(static_cast<ossim_sint16>(0),
+                       theTile);
+         break;
+      }
+      case OSSIM_DOUBLE:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         executeAssign(static_cast<double>(0),
+                       theTile);
+         break;
+      }
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "ossimValueAssignImageSourceFilter::getTile WARN: Scalar type = " << theTile->getScalarType()
+                                            << " Not supported!" << std::endl;
+         break;
+      }
+   }
+
+   theTile->validate();
+   
+   return theTile;
+}
+
+void ossimValueAssignImageSourceFilter::setInputOutputValues(const vector<double>& inputValues,
+                                                             const vector<double>& outputValues)
+{
+   theInputValueArray  = inputValues;
+   theOutputValueArray = outputValues;
+
+   validateArrays();
+}
+
+void ossimValueAssignImageSourceFilter::validateArrays()
+{
+   if(theOutputValueArray.size() != theInputValueArray.size())
+   {
+      ossim_uint32 index = std::min((ossim_uint32)theOutputValueArray.size(),
+                                    (ossim_uint32)theInputValueArray.size());
+      
+      vector<double> copyVector(theOutputValueArray.begin(),
+                                theOutputValueArray.begin() + index);
+
+      theOutputValueArray = copyVector;
+
+      for(ossim_uint32 index2 = index; index < theInputValueArray.size(); ++index)
+      {
+         theOutputValueArray.push_back(theInputValueArray[index2]);
+      }
+   }
+}
+
+template <class T> void ossimValueAssignImageSourceFilter::executeAssign(
+   T,
+   ossimRefPtr<ossimImageData>& data)
+{
+   if(!theInputValueArray.size()) return;
+   
+   if(theAssignType == ossimValueAssignType_SEPARATE)
+   {
+      executeAssignSeparate(static_cast<T>(0), data);
+   }
+   else
+   {
+      executeAssignGroup(static_cast<T>(0), data);      
+   }
+}
+
+template <class T> void ossimValueAssignImageSourceFilter::executeAssignSeparate(
+   T,
+   ossimRefPtr<ossimImageData>& data)
+{
+   ossim_uint32 numberOfBands = std::min((ossim_uint32)data->getNumberOfBands(),
+                                         (ossim_uint32)theInputValueArray.size());
+   ossim_uint32 maxOffset     = data->getWidth()*data->getHeight();
+   
+   for(ossim_uint32 band = 0; band<numberOfBands; ++band)
+   {
+      T* buf      = static_cast<T*>(data->getBuf(band));
+      T  inValue  = static_cast<T>(theInputValueArray[band]);
+      T  outValue = static_cast<T>(theOutputValueArray[band]);
+      for(ossim_uint32 count = 0; count < maxOffset; ++count)
+      {
+         if(*buf == inValue)
+         {
+            *buf = outValue;
+         }
+         ++buf;
+      }
+   }
+}
+
+template <class T> void ossimValueAssignImageSourceFilter::executeAssignGroup(
+   T,
+   ossimRefPtr<ossimImageData>& data)
+{
+   ossim_uint32 numberOfBands = std::min((ossim_uint32)data->getNumberOfBands(),
+                                         (ossim_uint32)theInputValueArray.size());
+   ossim_uint32 maxOffset     = data->getWidth()*data->getHeight();
+   ossim_uint32 band = 0;
+   bool equalFlag = false;
+
+   T** bufArray = new T*[data->getNumberOfBands()];
+   for(band = 0; band < data->getNumberOfBands(); ++band)
+   {
+      bufArray[band] = static_cast<T*>(data->getBuf(band));
+   }
+   
+   for(ossim_uint32 offset = 0; offset < maxOffset; ++offset)
+   {
+      equalFlag = true;
+      
+      for(band = 0; band<numberOfBands; ++band)
+      {
+         if(bufArray[band][offset] != theInputValueArray[band])
+         {
+            equalFlag = false;
+         }
+      }
+      if(equalFlag)
+      {
+         for(band = 0; band<numberOfBands; ++band)
+         {
+            bufArray[band][offset] = static_cast<T>(theOutputValueArray[band]);
+         }
+      }
+   }
+
+   delete [] bufArray;
+}
+
+void ossimValueAssignImageSourceFilter::initialize()
+{
+   // Base class will recapture "theInputConnection".
+   ossimImageSourceFilter::initialize();
+}
+
+void ossimValueAssignImageSourceFilter::allocate()
+{   
+   theTile = NULL;
+
+   if(theInputConnection)
+   {
+      ossimImageDataFactory* idf = ossimImageDataFactory::instance();
+      
+      theTile = idf->create(this,
+                            this);
+      
+      theTile->initialize();
+   }
+}
+
+bool ossimValueAssignImageSourceFilter::saveState(ossimKeywordlist& kwl,
+                                                  const char* prefix)const
+{
+   ossim_uint32 index = 0;
+   for(index =0; index < theInputValueArray.size(); ++index)
+   {
+      ossimString in  = ("input_band" + ossimString::toString(index));
+      ossimString out = ("output_band" + ossimString::toString(index));
+
+      kwl.add(prefix,
+              in.c_str(),
+              theInputValueArray[index],
+              true);
+      kwl.add(prefix,
+              out.c_str(),
+              theOutputValueArray[index],
+              true);
+   }
+   if(theAssignType ==  ossimValueAssignType_SEPARATE)
+   {
+      kwl.add(prefix,
+              "assign_type",
+              "separate",
+              true);
+   }
+   else
+   {
+      kwl.add(prefix,
+              "assign_type",
+              "group",
+              true);
+   }
+           
+   return ossimImageSourceFilter::saveState(kwl, prefix);
+}
+
+/*!
+ * Method to the load (recreate) the state of an object from a keyword
+ * list.  Return true if ok or false on error.
+ */
+bool ossimValueAssignImageSourceFilter::loadState(const ossimKeywordlist& kwl,
+                                                  const char* prefix)
+{
+   
+   ossimString inRegExpression =  ossimString("^(") +
+                                  ossimString(prefix) +
+                                  "input_band[0-9]+)";
+   ossimString outRegExpression =  ossimString("^(") +
+                                   ossimString(prefix) +
+                                   "output_band[0-9]+)";
+   ossim_uint32 numberOfInputs  = kwl.getNumberOfSubstringKeys(inRegExpression);
+   ossim_uint32 numberOfOutputs = kwl.getNumberOfSubstringKeys(outRegExpression);
+   ossim_uint32 index = 0;
+   ossim_uint32 currentIndex = 0;
+   
+   theInputValueArray.clear();
+   theOutputValueArray.clear();
+
+   while(index < numberOfInputs)
+   {
+      const char* value = kwl.find(prefix,
+                                   (ossimString("input_band") +
+                                    ossimString::toString(currentIndex)).c_str()
+                                   );
+      if(value)
+      {
+         theInputValueArray.push_back(ossimString(value).toDouble());
+         ++index;
+      }
+      ++currentIndex;
+   }
+   index = 0;
+   currentIndex = 0;
+   while(index < numberOfOutputs)
+   {
+      const char* value = kwl.find(prefix,
+                                   (ossimString("output_band") +
+                                    ossimString::toString(currentIndex)).c_str()
+                                   );
+      if(value)
+      {
+         theOutputValueArray.push_back(ossimString(value).toDouble());
+         ++index;
+      }
+      ++currentIndex;
+   }
+   validateArrays();
+   
+   const char* assignType = kwl.find(prefix, "assign_type");
+   if(assignType)
+   {
+      if(ossimString(assignType).trim().downcase() == "separate")
+      {
+         theAssignType = ossimValueAssignType_SEPARATE;
+      }
+      else
+      {
+         theAssignType = ossimValueAssignType_GROUP;
+      }
+   }
+   else
+   {
+      theAssignType = ossimValueAssignType_GROUP;
+   }
+   
+   return ossimImageSourceFilter::loadState(kwl, prefix);
+}
+
+const vector<double>& ossimValueAssignImageSourceFilter::getInputValues()const
+{
+   return theInputValueArray;
+}
+const vector<double>& ossimValueAssignImageSourceFilter::getOutputValues()const
+{
+   return theOutputValueArray;
+}
+
+ossimValueAssignImageSourceFilter::ossimValueAssignType ossimValueAssignImageSourceFilter::getValueAssignType()const
+{
+   return theAssignType;
+}
+void ossimValueAssignImageSourceFilter::setValueAssignType(ossimValueAssignType type)
+{
+   theAssignType = type;
+}
+
diff --git a/src/ossim/imaging/ossimVectorRenderer.cpp b/ossim/src/ossim/imaging/ossimVectorRenderer.cpp
similarity index 100%
rename from src/ossim/imaging/ossimVectorRenderer.cpp
rename to ossim/src/ossim/imaging/ossimVectorRenderer.cpp
diff --git a/src/ossim/imaging/ossimVertexExtractor.cpp b/ossim/src/ossim/imaging/ossimVertexExtractor.cpp
similarity index 100%
rename from src/ossim/imaging/ossimVertexExtractor.cpp
rename to ossim/src/ossim/imaging/ossimVertexExtractor.cpp
diff --git a/ossim/src/ossim/imaging/ossimVpfAnnotationCoverageInfo.cpp b/ossim/src/ossim/imaging/ossimVpfAnnotationCoverageInfo.cpp
new file mode 100644
index 0000000..7036ea8
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimVpfAnnotationCoverageInfo.cpp
@@ -0,0 +1,218 @@
+//*************************************************************************
+// Copyright (C) 2004 Intelligence Data Systems, Inc.  All rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+//**************************************************************************
+// $Id: ossimVpfAnnotationCoverageInfo.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <vector>
+#include <algorithm>
+#include <ossim/imaging/ossimVpfAnnotationCoverageInfo.h>
+#include <ossim/vec/ossimVpfLibrary.h>
+#include <ossim/vec/ossimVpfFeatureClassSchema.h>
+
+bool ossimVpfAnnotationCoverageInfo::hasRenderableFeature()const
+{
+  for(ossim_uint32 idx = 0; idx < theFeatureInfoArray.size();++idx)
+  {
+     if(theFeatureInfoArray[idx]->getEnabledFlag())
+     {
+        return true;
+     }
+  }
+
+  return false;
+}
+
+void ossimVpfAnnotationCoverageInfo::getEnabledFeatures(std::vector<ossimVpfAnnotationFeatureInfo*>& result)
+{
+  for(ossim_uint32 idx = 0; idx < theFeatureInfoArray.size();++idx)
+    {
+      if(theFeatureInfoArray[idx]->getEnabledFlag())
+	{
+	  result.push_back(theFeatureInfoArray[idx]);
+	}
+    }
+}
+
+void ossimVpfAnnotationCoverageInfo::getAllFeatures(std::vector<ossimVpfAnnotationFeatureInfo*>& result)
+{
+  for(ossim_uint32 idx = 0; idx < theFeatureInfoArray.size();++idx)
+  {
+     result.push_back(theFeatureInfoArray[idx]);
+  }
+}
+
+ossimIrect ossimVpfAnnotationCoverageInfo::getBoundingProjectedRect()const
+{
+  ossimIrect result;
+  result.makeNan();
+
+  for(ossim_uint32 idx = 0; idx < theFeatureInfoArray.size();++idx)
+    {
+      ossimIrect tempRect = theFeatureInfoArray[idx]->getBoundingProjectedRect();
+      if(!tempRect.hasNans())
+	{
+	  if(result.hasNans())
+	    {
+	      result = tempRect;
+	    }
+	  else
+	    {
+	      result = result.combine(tempRect);
+	    }
+	}
+    }
+
+  return result;
+}
+
+
+void ossimVpfAnnotationCoverageInfo::transform(ossimImageGeometry* geom)
+{
+  for(ossim_uint32 idx = 0; idx < theFeatureInfoArray.size();++idx)
+  {
+     theFeatureInfoArray[idx]->transform(geom);
+  }
+}
+
+void ossimVpfAnnotationCoverageInfo::buildCoverage()
+{
+   buildCoverage( "" );
+}
+
+void ossimVpfAnnotationCoverageInfo::buildCoverage(const ossimString& feature)
+{
+   deleteAllFeatures();
+   if(theLibrary)
+   {
+      ossimVpfCoverage coverage;
+      
+      if(theLibrary->getCoverage(theName, coverage))
+      {
+         ossimVpfFeatureClassSchema schema;
+         if(coverage.openFeatureClassSchema(schema))
+         {
+            std::vector<ossimString> featureClassArray;
+            schema.getFeatureClasses(featureClassArray);
+            schema.closeTable();
+            for(ossim_uint32  idx = 0; idx < featureClassArray.size(); ++idx)
+            {
+               ossimString s1 = feature;
+               ossimString s2 = featureClassArray[idx];
+               s1.downcase();
+               s2.downcase();
+               if (! feature.length() || (s1 == s2) )
+               {
+                  ossimVpfAnnotationFeatureInfo* featureInfo =
+                     new ossimVpfAnnotationFeatureInfo;
+                  featureInfo->setName(featureClassArray[idx]);
+                  featureInfo->setCoverage(coverage);
+                  theFeatureInfoArray.push_back(featureInfo);
+                  featureInfo->buildFeature();
+               }
+            }
+         }
+      }
+   }
+}
+
+void ossimVpfAnnotationCoverageInfo::drawAnnotations(ossimRgbImage* tile)
+{
+   for(ossim_uint32 idx = 0; idx < theFeatureInfoArray.size();++idx)
+   {
+      if(theFeatureInfoArray[idx]->getEnabledFlag())
+      {
+         theFeatureInfoArray[idx]->drawAnnotations(tile);
+      }
+   }
+}
+
+void ossimVpfAnnotationCoverageInfo::deleteAllFeatures()
+{
+   for(ossim_uint32 idx = 0; idx < theFeatureInfoArray.size();++idx)
+   {
+      theFeatureInfoArray[idx];
+   }
+   
+   theFeatureInfoArray.clear();
+}
+
+
+
+bool ossimVpfAnnotationCoverageInfo::saveState(ossimKeywordlist& kwl,
+					       const char* prefix)const
+{
+   kwl.add(prefix,
+           "name",
+           theName,
+           true);
+   
+   for(ossim_uint32 idx = 0; idx < theFeatureInfoArray.size(); ++idx)
+   {
+      theFeatureInfoArray[idx]->saveState(kwl,
+					  (ossimString(prefix) + "feature" +
+					   ossimString::toString(idx) + ".").c_str());
+   }
+   
+   return true;
+}
+
+bool ossimVpfAnnotationCoverageInfo::loadState(const ossimKeywordlist& kwl,
+					       const char* prefix)
+{
+  deleteAllFeatures();
+
+  if(!theLibrary)
+    {
+      return false;
+    }
+
+  theName = kwl.find(prefix, "name");
+  ossimVpfCoverage coverage;
+
+  if(theLibrary->getCoverage(theName, coverage))
+    {
+      ossimString regExpression =  ossimString("^(") + ossimString(prefix) + "feature[0-9]+.)";
+      vector<ossimString> keys =
+	kwl.getSubstringKeyList( regExpression );
+      std::vector<int> theNumberList(keys.size());
+      int offset = (int)(ossimString(prefix)+"feature").size();
+      int idx = 0;
+      for(idx = 0; idx < (int)theNumberList.size();++idx)
+	{
+	  ossimString numberStr(keys[idx].begin() + offset,
+				keys[idx].end());
+	  theNumberList[idx] = numberStr.toInt();
+	}
+      std::sort(theNumberList.begin(), theNumberList.end());
+      
+      for(idx=0;idx < (int)keys.size();++idx)
+	{
+	  ossimString newPrefix = ossimString(prefix);
+	  newPrefix += ossimString("feature");
+	  newPrefix += ossimString::toString(theNumberList[idx]);
+	  newPrefix += ossimString(".");
+	  ossimVpfAnnotationFeatureInfo* featureInfo = new ossimVpfAnnotationFeatureInfo;
+	  featureInfo->setCoverage(coverage);
+	  theFeatureInfoArray.push_back(featureInfo);
+	  if(!featureInfo->loadState(kwl,
+				     newPrefix))
+	    {
+	      return false;
+	    }
+	}
+    }
+  else
+    {
+      return false;
+    }
+
+  return true;
+}
+
diff --git a/ossim/src/ossim/imaging/ossimVpfAnnotationFeatureInfo.cpp b/ossim/src/ossim/imaging/ossimVpfAnnotationFeatureInfo.cpp
new file mode 100644
index 0000000..04165d3
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimVpfAnnotationFeatureInfo.cpp
@@ -0,0 +1,1446 @@
+#include <sstream>
+
+#include <ossim/imaging/ossimVpfAnnotationFeatureInfo.h>
+#include <ossim/vec/ossimVpfCoverage.h>
+#include <ossim/vec/ossimVpfLibrary.h>
+#include <ossim/vec/ossimVpfFeatureClassSchema.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/base/ossimPolyLine.h>
+#include <ossim/base/ossimGeoPolygon.h>
+#include <ossim/imaging/ossimGeoAnnotationSource.h>
+#include <ossim/imaging/ossimAnnotationObject.h>
+#include <ossim/imaging/ossimGeoAnnotationMultiPolyLineObject.h>
+#include <ossim/imaging/ossimGeoAnnotationMultiEllipseObject.h>
+#include <ossim/imaging/ossimGeoAnnotationFontObject.h>
+#include <ossim/imaging/ossimGeoAnnotationMultiPolyObject.h>
+#include <ossim/imaging/ossimRgbImage.h>
+#include <ossim/font/ossimFont.h>
+#include <ossim/font/ossimFontFactoryRegistry.h>
+#include <ossim/base/ossimTrace.h>
+
+static ossimTrace traceDebug("ossimVpfAnnotationFeatureInfo:debug");
+
+RTTI_DEF1(ossimVpfAnnotationFeatureInfo, "ossimVpfAnnotationFeatureInfo", ossimObject);
+
+ossimVpfAnnotationFeatureInfo::ossimVpfAnnotationFeatureInfo(const ossimString& featureName,
+                                                             const ossimRgbVector& penColor,
+                                                             const ossimRgbVector& brushColor,
+                                                             const ossimDpt& pointRadius,
+                                                             int   thickness,
+                                                             bool enabledFlag)
+   :theName(featureName),
+    thePenColor(penColor),
+    theBrushColor(brushColor),
+    thePointRadius(pointRadius),
+    theThickness(thickness),
+    theFillEnabledFlag(false),
+    theEnabledFlag(enabledFlag),
+    theFeatureType(ossimVpfAnnotationFeatureType_UNKNOWN),
+    theFontInformation(),
+    theAnnotationArray(0)
+{
+   ossimFont* font = ossimFontFactoryRegistry::instance()->getDefaultFont();
+
+   if(font)
+   {
+      std::vector<ossimFontInformation> fontInfoArray;
+
+      font->getFontInformation(fontInfoArray);
+
+      if(fontInfoArray.size())
+      {
+         theFontInformation = fontInfoArray[0];
+      }
+   }
+}
+
+
+ossimVpfAnnotationFeatureInfo::~ossimVpfAnnotationFeatureInfo()
+{
+   deleteAllObjects();
+}
+
+void ossimVpfAnnotationFeatureInfo::transform(ossimImageGeometry* proj)
+{
+   if(theEnabledFlag)
+   {
+      for(int idx = 0; idx < (int)theAnnotationArray.size();++idx)
+      {
+         if(theAnnotationArray[idx].valid())
+         {
+            theAnnotationArray[idx]->transform(proj);
+            theAnnotationArray[idx]->computeBoundingRect();
+         }
+      }
+   }
+}
+ossimIrect ossimVpfAnnotationFeatureInfo::getBoundingProjectedRect()const
+{
+  ossimIrect result;
+  result.makeNan();
+
+  if(theEnabledFlag)
+  {
+     for(int idx = 0; idx < (int)theAnnotationArray.size();++idx)
+     {
+        if(theAnnotationArray[idx].valid())
+	{
+           ossimIrect tempRect = theAnnotationArray[idx]->getBoundingRect();
+           if(!tempRect.hasNans())
+           {
+	      if(result.hasNans())
+              {
+                 result = tempRect;
+              }
+	      else
+              {
+                 result = result.combine(tempRect);
+              }
+           }
+	}
+     }
+  }
+  
+  return result;
+}
+
+void ossimVpfAnnotationFeatureInfo::setEnabledFlag(bool flag)
+{
+   if(!flag && theEnabledFlag)
+   {
+      deleteAllObjects();
+   }
+   else if(flag&&(!theEnabledFlag))
+   {
+      theEnabledFlag = flag;
+      buildFeature();
+   }
+   theEnabledFlag = flag;
+}
+
+void ossimVpfAnnotationFeatureInfo::buildFeature()
+{
+  deleteAllObjects();
+  
+  ossimVpfFeatureClassSchemaNode node;
+
+  ossimVpfFeatureClassSchema schema;
+  theCoverage.openFeatureClassSchema(schema);
+  if(schema.getFeatureClassNode(theName,
+				node))
+    {
+      if(node.thePrimitiveTable.contains("edg"))
+      {
+         theFeatureType = ossimVpfAnnotationFeatureType_LINE;
+	 if(theEnabledFlag)
+	   {
+	     buildEdgFeature(node.theTable.trim(),
+			     node.theTableKey.trim(),
+			     node.thePrimitiveTable.trim(),
+			     node.thePrimitiveTableKey.trim());
+	   }
+	}
+      else if(node.thePrimitiveTable.contains("txt"))
+	{
+            theFeatureType = ossimVpfAnnotationFeatureType_TEXT;
+	    if(theEnabledFlag)
+	      {
+		buildTxtFeature(node.theTable.trim(),
+				node.theTableKey.trim(),
+				node.thePrimitiveTable.trim(),
+				node.thePrimitiveTableKey.trim());
+	      }
+	}
+      else if(node.thePrimitiveTable.contains("fac"))
+	{
+            theFeatureType = ossimVpfAnnotationFeatureType_POLYGON;
+	    if(theEnabledFlag)
+	      {
+		buildFaceFeature(node.theTable.trim(),
+				 node.theTableKey.trim(),
+				 node.thePrimitiveTable.trim(),
+				 node.thePrimitiveTableKey.trim());
+	      }
+	}
+      else if(node.thePrimitiveTable.contains("cnd"))
+	{
+            theFeatureType = ossimVpfAnnotationFeatureType_POINT;
+	    if(theEnabledFlag)
+	      {
+		buildPointFeature("cnd",
+				  node.theTable.trim(),
+				  node.theTableKey.trim(),
+				  node.thePrimitiveTable.trim(),
+				  node.thePrimitiveTableKey.trim());
+	      }
+	}
+      else if(node.thePrimitiveTable.contains("end"))
+	{
+            theFeatureType = ossimVpfAnnotationFeatureType_POINT;
+	    if(theEnabledFlag)
+	      {
+		buildPointFeature("end",
+				  node.theTable.trim(),
+				  node.theTableKey.trim(),
+				  node.thePrimitiveTable.trim(),
+				  node.thePrimitiveTableKey.trim());
+	      }
+	}
+      else
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << "Primitive \""<<node.thePrimitiveTable<<"\" not handled yet" << endl;
+         }
+      }
+    }
+}
+
+void ossimVpfAnnotationFeatureInfo::drawAnnotations(ossimRgbImage* tile)
+{
+   if(theEnabledFlag)
+   {
+      int idx = 0;
+      for(idx = 0; idx < (int)theAnnotationArray.size(); ++idx)
+      {
+         theAnnotationArray[idx]->draw(*tile);
+      }
+   }
+}
+
+bool ossimVpfAnnotationFeatureInfo::saveState(ossimKeywordlist& kwl,
+					      const char* prefix)const
+{
+  kwl.add(prefix,
+	  "name",
+	  theName.c_str(),
+	  true);
+  kwl.add(prefix,
+	  "description",
+	  theDescription.c_str(),
+	  true);
+  ossimString penColor = (ossimString::toString((int)thePenColor.getR())+ " " +
+			  ossimString::toString((int)thePenColor.getG())+ " " +
+			  ossimString::toString((int)thePenColor.getB()));
+  ossimString brushColor = (ossimString::toString((int)theBrushColor.getR())+ " " +
+			    ossimString::toString((int)theBrushColor.getG())+ " " +
+			    ossimString::toString((int)theBrushColor.getB()));
+  kwl.add(prefix,
+	  "pen_color",
+	  penColor,
+	  true);
+  kwl.add(prefix,
+	  "brush_color",
+	  brushColor,
+	  true);
+
+  if(theFeatureType == ossimVpfAnnotationFeatureType_POINT)
+    {
+      kwl.add(prefix,
+	      "point_radius",
+	      ossimString::toString(thePointRadius.x) + " " +
+	      ossimString::toString(thePointRadius.y),
+	      true);
+      kwl.add(prefix,
+	      "fill_enabled",
+	      theFillEnabledFlag,
+	      true);
+    }
+  else if(theFeatureType == ossimVpfAnnotationFeatureType_LINE)
+    {
+      kwl.add(prefix,
+	      "thickness",
+	      theThickness,
+	      true);
+    }
+  else if(theFeatureType == ossimVpfAnnotationFeatureType_POLYGON)
+    {
+      kwl.add(prefix,
+	      "fill_enabled",
+	      theFillEnabledFlag,
+	      true);
+      kwl.add(prefix,
+	      "thickness",
+	      theThickness,
+	      true);
+    }
+  else if(theFeatureType == ossimVpfAnnotationFeatureType_TEXT)
+    {
+      theFontInformation.saveState(kwl,
+				   (ossimString(prefix)+"font.").c_str());
+    }
+  kwl.add(prefix,
+	  "enabled",
+	  theEnabledFlag,
+	  true);
+  kwl.add(prefix,
+	  "feature_type",
+	  getFeatureTypeAsString(),
+	  true);
+
+  return true;
+}
+
+bool ossimVpfAnnotationFeatureInfo::loadState(const ossimKeywordlist& kwl,
+					      const char* prefix)
+{
+  const char* name        = kwl.find(prefix, "name");
+  const char* description = kwl.find(prefix, "description");
+  const char* enabled     = kwl.find(prefix, "enabled");
+  const char* fillEnabled = kwl.find(prefix, "fill_enabled");
+  const char* thickness   = kwl.find(prefix, "thickness");
+  const char* pointRadius = kwl.find(prefix, "point_radius");
+  const char* brushColor  = kwl.find(prefix, "brush_color");
+  const char* penColor    = kwl.find(prefix, "pen_color");
+  
+  theFontInformation.loadState(kwl,
+			       (ossimString(prefix)+"font.").c_str());
+
+  if(name)
+    {
+      if(theName != name)
+	{
+	  deleteAllObjects();
+	}
+      theName = name;
+    }
+  if(description)
+    {
+      theDescription = description;
+    }
+  if(enabled)
+    {
+      theEnabledFlag = ossimString(enabled).toBool();
+
+      if(!theEnabledFlag)
+	{
+	  deleteAllObjects();
+	}
+    }
+  
+  if(fillEnabled)
+    {
+      theFillEnabledFlag = ossimString(fillEnabled).toBool();
+    }
+  if(thickness)
+    {
+      theThickness = ossimString(thickness).toInt();
+    }
+  if(pointRadius)
+    {
+      stringstream ptRadiusStream(pointRadius);
+      ptRadiusStream >> thePointRadius.x >> thePointRadius.y;
+    }
+  if(brushColor)
+    {
+      int r, g, b;
+      stringstream colorStream(brushColor);
+      colorStream >> r >> g >> b;
+
+      theBrushColor.setR((ossim_uint8)r);
+      theBrushColor.setG((ossim_uint8)g);
+      theBrushColor.setB((ossim_uint8)b);
+    }
+  if(penColor)
+    {
+      int r, g, b;
+      stringstream colorStream(penColor);
+      colorStream >> r >> g >> b;
+
+      thePenColor.setR((ossim_uint8)r);
+      thePenColor.setG((ossim_uint8)g);
+      thePenColor.setB((ossim_uint8)b);
+    }
+  
+  if(theEnabledFlag&&(theAnnotationArray.size() < 1))
+    {
+      buildFeature();
+    }
+  else
+    {
+      setDrawingFeaturesToAnnotation();
+    }
+
+  return true;
+}
+
+ossimString ossimVpfAnnotationFeatureInfo::getFeatureTypeAsString()const
+{
+   switch(theFeatureType)
+   {
+      case ossimVpfAnnotationFeatureType_POINT:
+      {
+         return "point";
+      }
+      case ossimVpfAnnotationFeatureType_LINE:
+      {
+         return "line";
+      }
+      case ossimVpfAnnotationFeatureType_POLYGON:
+      {
+         return "polygon";
+      }
+      case ossimVpfAnnotationFeatureType_TEXT:
+      {
+         return "text";
+      }
+      default:
+         break;
+   }
+   
+  return "unknown";
+}
+
+ossimVpfAnnotationFeatureInfo::ossimVpfAnnotationFeatureType ossimVpfAnnotationFeatureInfo::getFeatureTypeFromString(const ossimString& featureType)const
+{
+  ossimString downCased = featureType;
+  downCased = downCased.downcase();
+
+  if(downCased.contains("point"))
+    {
+      return ossimVpfAnnotationFeatureType_POINT;
+    }
+  else if(downCased.contains("line"))
+    {
+      return ossimVpfAnnotationFeatureType_LINE;
+    }
+  else if(downCased.contains("polygon"))
+    {
+      return ossimVpfAnnotationFeatureType_POLYGON;
+    }
+  else if(downCased.contains("text"))
+    {
+      return ossimVpfAnnotationFeatureType_TEXT;
+    }
+
+  return ossimVpfAnnotationFeatureType_UNKNOWN;
+
+}
+
+void ossimVpfAnnotationFeatureInfo::deleteAllObjects()
+{
+   theAnnotationArray.clear();
+}
+
+void ossimVpfAnnotationFeatureInfo::setDrawingFeaturesToAnnotation()
+{
+   switch(theFeatureType)
+   {
+   case ossimVpfAnnotationFeatureType_POINT:
+   {
+      ossimGeoAnnotationMultiEllipseObject* annotation = 0;
+      for(int idx = 0; idx < (int)theAnnotationArray.size();++idx)
+      {
+         annotation = (ossimGeoAnnotationMultiEllipseObject*)theAnnotationArray[idx].get();
+
+         annotation->setColor(thePenColor.getR(),
+                              thePenColor.getG(),
+                              thePenColor.getB());
+         annotation->setThickness(theThickness);
+         annotation->setFillFlag(theFillEnabledFlag);
+         annotation->setWidthHeight(thePointRadius);
+      }
+      
+      break;
+   }
+   case ossimVpfAnnotationFeatureType_TEXT:
+   {
+      ossimGeoAnnotationFontObject* annotation = 0;
+      ossimRefPtr<ossimFont> font = ossimFontFactoryRegistry::instance()->createFont(theFontInformation);
+
+      for(int idx = 0; idx < (int)theAnnotationArray.size();++idx)
+      {
+         annotation = (ossimGeoAnnotationFontObject*)theAnnotationArray[idx].get();
+         annotation->setColor(thePenColor.getR(),
+                              thePenColor.getG(),
+                              thePenColor.getB());
+         annotation->setThickness(theThickness);
+         
+         if(font.valid())
+         {
+            annotation->setFont((ossimFont*)font->dup());
+         }
+         annotation->setPointSize(theFontInformation.thePointSize);
+         annotation->setScale(theFontInformation.theScale);
+         annotation->setShear(theFontInformation.theShear);
+         annotation->setRotation(theFontInformation.theRotation);
+      }
+      break;
+   }
+   case ossimVpfAnnotationFeatureType_LINE:
+   {
+      ossimGeoAnnotationMultiPolyLineObject* annotation = 0;
+      for(int idx = 0; idx < (int)theAnnotationArray.size();++idx)
+      {
+         annotation = (ossimGeoAnnotationMultiPolyLineObject*)theAnnotationArray[idx].get();
+         annotation->setColor(thePenColor.getR(),
+                              thePenColor.getG(),
+                              thePenColor.getB());
+         annotation->setThickness(theThickness);
+      }
+      
+      break;
+   }
+   case ossimVpfAnnotationFeatureType_POLYGON:
+   {
+      ossimGeoAnnotationMultiPolyObject* annotation = 0;
+      for(int idx = 0; idx < (int)theAnnotationArray.size();++idx)
+      {
+         annotation = (ossimGeoAnnotationMultiPolyObject*)theAnnotationArray[idx].get();
+         annotation->setColor(thePenColor.getR(),
+                              thePenColor.getG(),
+                              thePenColor.getB());
+         annotation->setThickness(theThickness);
+         annotation->setFillFlag(theFillEnabledFlag);
+      }
+      break;
+   }
+   default:
+   {
+      break;
+   }
+   }
+}
+
+
+void ossimVpfAnnotationFeatureInfo::buildTxtFeature(const ossimFilename& tableName,
+						    const ossimString&   tableKey,
+						    const ossimFilename& /* primitiveName */,
+						    const ossimString&   /* primitiveKey */)
+{
+  ossimFilename tableFileName      = theCoverage.getPath().dirCat(tableName);
+  ossimFilename primitiveTableName;
+  ossimVpfTable table;
+  ossimVpfTable primitiveTable;
+
+  if(table.openTable(tableFileName))
+    {
+      table.reset();
+      vector<ossimString> columnValues = table.getColumnValues(tableKey.trim());
+      
+      primitiveTableName = theCoverage.getPath().dirCat("txt");
+      
+      vector<ossimString> tileIds;
+      ossim_int32 stringValuePosition = 0;
+      ossim_int32 shapeLinePosition = 0;
+      bool isTiled = false;
+      if(table.getColumnPosition("tile_id") >= 0)
+	{
+	  tileIds = table.getColumnValues("tile_id");
+	  isTiled = true;
+	}
+      if(!isTiled)
+	{
+	  primitiveTableName = theCoverage.getPath().dirCat("txt");
+	  if(!primitiveTable.openTable(primitiveTableName))
+	    {
+	      return;
+	    }
+	  stringValuePosition = primitiveTable.getColumnPosition("string");
+	  shapeLinePosition   = primitiveTable.getColumnPosition("shape_line");
+	}
+      ossim_int32 tileId = -1;
+      for(ossim_uint32 idx = 0; idx < columnValues.size();++idx)
+	{
+	  if(isTiled)
+	    {
+	      if(tileId != tileIds[idx].toInt())
+		{
+		  tileId = tileIds[idx].toInt();
+		  ossimFilename filename = theCoverage.getLibrary()->getTileName(tileIds[idx].toInt());
+		  if(theCoverage.getPath().dirCat(filename).dirCat("txt").exists())
+		    {
+		      primitiveTableName = theCoverage.getPath().dirCat(filename).dirCat("txt");
+		    }
+		  else if(theCoverage.getPath().dirCat(filename.downcase()).dirCat("txt").exists())
+		    {
+		      primitiveTableName = theCoverage.getPath().dirCat(filename.downcase()).dirCat("txt");
+		    }
+		  if(!primitiveTable.openTable(primitiveTableName))
+		    {
+		      return;
+		    }
+		  stringValuePosition = primitiveTable.getColumnPosition("string");
+		  shapeLinePosition   = primitiveTable.getColumnPosition("shape_line");
+		}
+	    }
+	  row_type row = read_row( columnValues[idx].toInt(), 
+				   *primitiveTable.getVpfTableData());
+	  ossim_int32 count = 0;
+	  ossimDpt* ptArray = getXy(*primitiveTable.getVpfTableData(),
+				    row,
+				    shapeLinePosition,
+				    &count);
+	  ossimDpt midPoint;
+	  if(ptArray)
+	    {
+	      midPoint = *ptArray;
+	      
+	      delete [] ptArray;
+	    }
+	  ossimString stringValue = primitiveTable.getColumnValueAsString(row,
+									  stringValuePosition);
+	  free_row(row,  *primitiveTable.getVpfTableData());
+	  
+	  if(!midPoint.hasNans())
+	    {
+	      ossimGpt centerPoint(midPoint.lat,
+				   midPoint.lon,
+				   ossim::nan());
+              ossimFont* font = ossimFontFactoryRegistry::instance()->createFont(theFontInformation);
+	      ossimGeoAnnotationFontObject* annotation = new ossimGeoAnnotationFontObject(centerPoint,
+											  stringValue);
+              annotation->setColor(thePenColor.getR(),
+                                   thePenColor.getG(),
+                                   thePenColor.getB());
+              annotation->setThickness(theThickness);
+                 
+              annotation->setFont(font);
+	      annotation->setPointSize(theFontInformation.thePointSize);
+	      annotation->setScale(theFontInformation.theScale);
+	      annotation->setShear(theFontInformation.theShear);
+	      annotation->setRotation(theFontInformation.theRotation);
+	      theAnnotationArray.push_back(annotation);
+	    }
+	}  
+    }
+}
+
+void ossimVpfAnnotationFeatureInfo::buildEdgFeature(const ossimFilename& tableName,
+						    const ossimString&   tableKey,
+						    const ossimFilename& /* primitiveName */,
+						    const ossimString&   /* primitiveKey */)
+{
+   ossimFilename tableFileName      = theCoverage.getPath().dirCat(tableName);
+   ossimFilename primitiveTableName;
+   ossimVpfTable table;
+   ossimVpfTable primitiveTable;
+  
+   std::vector<ossimPolyLine> polyLineArray;
+
+   if(table.openTable(tableFileName))
+   {
+      
+      vector<ossimString> columnValues = table.getColumnValues(tableKey.trim());
+      vector<ossimString> tileIds;
+      bool isTiled = false;
+      if(table.getColumnPosition("tile_id") >= 0)
+      {
+         tileIds = table.getColumnValues("tile_id");
+         isTiled = true;
+      }
+      ossim_int32 coordinateValuePosition = 0;
+      if(!isTiled)
+      {
+         primitiveTableName = theCoverage.getPath().dirCat("edg");
+         if(!primitiveTable.openTable(primitiveTableName))
+         {
+            return;
+         }
+         coordinateValuePosition = primitiveTable.getColumnPosition("coordinates");
+      }
+      ossim_int32 tileId = -1;
+      for(ossim_uint32 idx = 0; idx < columnValues.size();++idx)
+      {
+         if(isTiled)
+         {
+            if(tileId != tileIds[idx].toInt())
+            {
+               tileId = tileIds[idx].toInt();
+               ossimFilename filename = theCoverage.getLibrary()->getTileName(tileIds[idx].toInt());
+               if(theCoverage.getPath().dirCat(filename).dirCat("edg").exists())
+               {
+                  primitiveTableName = theCoverage.getPath().dirCat(filename).dirCat("edg");
+               }
+               else if(theCoverage.getPath().dirCat(filename.downcase()).dirCat("edg").exists())
+               {
+                  primitiveTableName = theCoverage.getPath().dirCat(filename.downcase()).dirCat("edg");
+               }
+               if(!primitiveTable.openTable(primitiveTableName))
+               {
+                  return;
+               }
+               coordinateValuePosition = primitiveTable.getColumnPosition("coordinates");
+            }
+         }
+         ossimPolyLine polyLine;
+	  
+         readEdge(polyLine,
+                  columnValues[idx].toInt(),
+                  coordinateValuePosition,
+                  primitiveTable);
+
+	 readAttributes(polyLine, table, idx + 1); // third parm is one-based row
+	  
+         polyLineArray.push_back(polyLine);
+      }
+   }
+   ossimGeoAnnotationMultiPolyLineObject* annotation = new ossimGeoAnnotationMultiPolyLineObject(polyLineArray);
+   annotation->setColor(thePenColor.getR(),
+                        thePenColor.getG(),
+                        thePenColor.getB());
+   annotation->setThickness(theThickness);
+   theAnnotationArray.push_back(annotation);
+}
+
+void ossimVpfAnnotationFeatureInfo::readAttributes(ossimPolyLine& polyLine, ossimVpfTable& table, int row) {
+  int numCols = table.getNumberOfColumns();
+
+  for (int col = 0; col < numCols; col ++) {
+    polyLine.addAttribute( table.getColumnValueAsString( row, col ));
+  }
+}
+
+void ossimVpfAnnotationFeatureInfo::buildPointFeature(const ossimString& primitiveName,
+						      const ossimFilename& tableName,
+						      const ossimString&   tableKey,
+						      const ossimFilename& /* primitive */,
+						      const ossimString&   /* primitiveKey */)
+{
+  ossimFilename tableFileName      = theCoverage.getPath().dirCat(tableName);
+  ossimFilename primitiveTableName;
+  ossimVpfTable table;
+  ossimVpfTable primitiveTable;
+  
+  std::vector<ossimGpt> centerPointArray;
+
+  if(table.openTable(tableFileName))
+    {
+      
+      vector<ossimString> columnValues = table.getColumnValues(tableKey.trim());
+      vector<ossimString> tileIds;
+      bool isTiled = false;
+      if(table.getColumnPosition("tile_id") >= 0)
+	{
+	  tileIds = table.getColumnValues("tile_id");
+	  isTiled = true;
+	}
+      ossim_int32 coordinateValuePosition = 0;
+      if(!isTiled)
+	{
+	  primitiveTableName = theCoverage.getPath().dirCat(primitiveName);
+	  if(!primitiveTable.openTable(primitiveTableName))
+	    {
+	      return;
+	    }
+	  coordinateValuePosition = primitiveTable.getColumnPosition("coordinate");
+	}
+      ossim_int32 tileId = -1;
+      for(ossim_uint32 idx = 0; idx < columnValues.size();++idx)
+	{
+	  if(isTiled)
+	    {
+	      if(tileId != tileIds[idx].toInt())
+		{
+		  tileId = tileIds[idx].toInt();
+		  ossimFilename filename = theCoverage.getLibrary()->getTileName(tileIds[idx].toInt());
+		  if(theCoverage.getPath().dirCat(filename).dirCat(primitiveName).exists())
+		    {
+		      primitiveTableName = theCoverage.getPath().dirCat(filename).dirCat(primitiveName);
+		    }
+		  else if(theCoverage.getPath().dirCat(filename.downcase()).dirCat(primitiveName).exists())
+		    {
+		      primitiveTableName = theCoverage.getPath().dirCat(filename.downcase()).dirCat(primitiveName);
+		    }
+		  if(!primitiveTable.openTable(primitiveTableName))
+		    {
+		      return;
+		    }
+		  coordinateValuePosition = primitiveTable.getColumnPosition("coordinate");
+		}
+	    }
+	  row_type row = read_row( columnValues[idx].toInt(), 
+				   *primitiveTable.getVpfTableData());
+
+	  ossim_int32 count = 0;
+	  ossimDpt* ptArray = getXy(*primitiveTable.getVpfTableData(),
+				    row,
+				    coordinateValuePosition,
+				    &count);
+	  
+	  if(ptArray)
+	    {
+	      for(int i = 0; i < count; ++i)
+		{
+		  if((fabs(ptArray[i].x) <= 180.0)&&
+		     (fabs(ptArray[i].y) <= 90.0))
+		    {
+		      centerPointArray.push_back(ossimGpt(ptArray[i].lat,
+							  ptArray[i].lon,
+							  ossim::nan()));
+		    }
+		}
+	      delete [] ptArray;
+	    }
+	  free_row(row,  *primitiveTable.getVpfTableData());
+	}
+    }
+  ossimGeoAnnotationMultiEllipseObject* annotation = new ossimGeoAnnotationMultiEllipseObject(centerPointArray,
+											      ossimDpt(2,2));
+  annotation->setColor(thePenColor.getR(),
+                       thePenColor.getG(),
+                       thePenColor.getB());
+  annotation->setThickness(theThickness);
+  annotation->setFillFlag(theFillEnabledFlag);
+  annotation->setWidthHeight(thePointRadius);
+  theAnnotationArray.push_back(annotation);
+}
+
+int myFaceCount = 0;
+
+void ossimVpfAnnotationFeatureInfo::buildFaceFeature(const ossimFilename& tableName,
+						     const ossimString&   tableKey, // face_id
+						     const ossimFilename& /* primitive */, //face
+						     const ossimString&   /* primitiveKey */) // id
+{
+   ossimFilename tableFileName      = theCoverage.getPath().dirCat(tableName);
+   ossimFilename primitiveTableName;
+   ossimFilename rngTableName;
+   ossimFilename edgTableName;
+   ossimVpfTable table;
+   ossimVpfTable primitiveTable;
+   ossimVpfTable rngTable;
+   ossimVpfTable edgTable;
+   vector<ossimGeoPolygon> thePolyList;
+  
+   if(table.openTable(tableFileName))
+   {
+      vector<ossimString> columnValues = table.getColumnValues(tableKey.trim()); // fac_id
+      vector<ossimString> tileIds;
+      bool isTiled = false;
+      if(table.getColumnPosition("tile_id") >= 0)
+      {
+         tileIds = table.getColumnValues("tile_id");
+         isTiled = true;
+      }
+      // ossim_int32 coordinateValuePosition = 0;
+      ossim_int32 startEdgePosition = 0;
+      ossim_int32 rngPtrPosition = 0;
+      if(!isTiled)
+      {
+         primitiveTableName = theCoverage.getPath().dirCat("fac");
+         rngTableName = theCoverage.getPath().dirCat("rng");
+         edgTableName = theCoverage.getPath().dirCat("edg");
+         if(!primitiveTable.openTable(primitiveTableName)||
+            !rngTable.openTable(rngTableName)||
+            !edgTable.openTable(edgTableName))
+         {
+            return;
+         }
+         // coordinateValuePosition = edgTable.getColumnPosition("coordinates");
+         startEdgePosition = rngTable.getColumnPosition("start_edge");
+         rngPtrPosition = primitiveTable.getColumnPosition("ring_ptr");
+      } // else will get for each face in loop below
+
+      ossim_int32 tileId = -1;
+
+      for(ossim_uint32 idx = 0; idx < columnValues.size();++idx) // for each face feature
+      {
+         if(isTiled)		// then get table names because we didn't get them above
+         {
+            if((tileId != tileIds[idx].toInt())||
+               (tileId < 0))
+            {
+               tileId = tileIds[idx].toInt();
+               ossimFilename filename = theCoverage.getLibrary()->getTileName(tileIds[idx].toInt());
+               if(theCoverage.getPath().dirCat(filename).dirCat("fac").exists())
+               {
+                  primitiveTableName = theCoverage.getPath().dirCat(filename).dirCat("fac");
+                  rngTableName = theCoverage.getPath().dirCat(filename).dirCat("rng");
+                  edgTableName = theCoverage.getPath().dirCat(filename).dirCat("edg");
+               }
+               else if(theCoverage.getPath().dirCat(filename.downcase()).dirCat("fac").exists())
+               {
+                  primitiveTableName = theCoverage.getPath().dirCat(filename.downcase()).dirCat("fac");
+                  rngTableName = theCoverage.getPath().dirCat(filename.downcase()).dirCat("rng");
+                  edgTableName = theCoverage.getPath().dirCat(filename.downcase()).dirCat("edg");
+               }
+               if(!primitiveTable.openTable(primitiveTableName)||
+                  !rngTable.openTable(rngTableName)||
+                  !edgTable.openTable(edgTableName))
+               {
+                  return;
+               }
+               // coordinateValuePosition = edgTable.getColumnPosition("coordinates");
+               startEdgePosition = rngTable.getColumnPosition("start_edge");
+               rngPtrPosition = primitiveTable.getColumnPosition("ring_ptr");
+            }
+         } // if(isTiled)
+
+         // get the outer ring id for this face
+         int thisFaceId = columnValues[idx].toInt();
+         int rngId = -1;
+
+         if (thisFaceId <= primitiveTable.getNumberOfRows())
+	    rngId = readRngId(thisFaceId,
+			      rngPtrPosition,
+			      primitiveTable);           // face table
+         else
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << "not getting face " << thisFaceId << " from tile " << tileId << " " << primitiveTableName <<
+                  " bacause it has only " << primitiveTable.getNumberOfRows() << " rows" << endl;
+            }
+
+         if(rngId > 0)
+         {
+            int startEdge = readStartEdgeId(rngId,
+                                            startEdgePosition,
+                                            rngTable);
+            int outerStartEdge = startEdge;
+            if(startEdge > 0 )
+            {
+               ossimGeoPolygon polygon;
+                 
+               myFaceCount ++;
+                 
+               int ringTableFaceIdColumn = rngTable.getColumnPosition("face_id");
+               int ringFaceId = readTableCellAsInt(rngId, ringTableFaceIdColumn, rngTable);
+                 
+               if (thisFaceId != ringFaceId) {
+                  // as of Mon Dec 20 2004, this has not been observed in vmap0 or vmap1
+                  if(traceDebug())
+                  {
+                     ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting face " << thisFaceId << " from " << tableFileName <<
+                        " because it's ring (" << rngId << ") has face " << ringFaceId << " and startEdgeId " << startEdge << endl;
+                  }
+               } else {
+                  readGeoPolygon( polygon,
+                                  thisFaceId,
+                                  startEdge,
+                                  edgTable );
+                    
+                  // get the inner rings (holes)
+                  int faceIdPosition = rngTable.getColumnPosition("face_id");
+                  int innerRingOffset = 1;
+                  int rowFaceId = -1;
+                  if (rngId + innerRingOffset <= rngTable.getNumberOfRows())
+                     rowFaceId = rngTable.getColumnValueAsString( rngId + innerRingOffset, faceIdPosition ).toInt();
+                  while (rowFaceId == thisFaceId && rngId + innerRingOffset <= rngTable.getNumberOfRows()) {	// while there are more inner rings
+                     startEdge = readStartEdgeId(rngId + innerRingOffset, startEdgePosition, rngTable);
+
+                     if (startEdge == outerStartEdge) {
+			// as of Mon Dec 20 2004, this has not been observed in vmap0 or vmap1
+                        if(traceDebug())
+                        {
+                           ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting hole in face "
+                                                               << thisFaceId << " because inner ring "
+                                                               << rngId + innerRingOffset
+                                                               << " touches outer ring " << rngId << endl;
+                        }
+
+			innerRingOffset ++;
+			rowFaceId = rngTable.getColumnValueAsString( rngId + innerRingOffset, faceIdPosition ).toInt();
+			continue;
+                     }
+
+                     if(startEdge > 0 )
+                     {
+                        ossimGeoPolygon holePolygon;
+		  
+                        readGeoPolygon( holePolygon,
+                                        thisFaceId,
+                                        startEdge,
+                                        edgTable );
+                        if(holePolygon.size())
+                           polygon.addHole( holePolygon );
+                     }
+
+                     innerRingOffset ++;
+                     if (rngId + innerRingOffset <= rngTable.getNumberOfRows())
+                        rowFaceId = rngTable.getColumnValueAsString( rngId + innerRingOffset, faceIdPosition ).toInt();
+                  }
+
+                  readAttributes(polygon, table, idx + 1); // third parm is one-based row
+
+                  thePolyList.push_back(polygon);
+               }
+            }
+         }
+      } // each fac_id
+   }
+   ossimGeoAnnotationMultiPolyObject* annotation = new ossimGeoAnnotationMultiPolyObject(thePolyList);
+   annotation->setColor(thePenColor.getR(),
+                        thePenColor.getG(),
+                        thePenColor.getB());
+   annotation->setThickness(theThickness);
+   annotation->setFillFlag(theFillEnabledFlag);
+  
+   theAnnotationArray.push_back(annotation);
+}
+
+void ossimVpfAnnotationFeatureInfo::readAttributes(ossimGeoPolygon& polygon, ossimVpfTable& table, int row) {
+  int numCols = table.getNumberOfColumns();
+
+  for (int col = 0; col < numCols; col ++) {
+    ossimString s = table.getColumnValueAsString( row, col );
+    polygon.addAttribute( s );
+  }
+}
+
+/* GET_XY                                                                    */
+/*****************************************************************************/
+ossimDpt *ossimVpfAnnotationFeatureInfo::getXy(vpf_table_type table, 
+					       row_type row, 
+					       ossim_int32 pos, 
+					       ossim_int32 *count)
+{
+   ossim_int32 i;
+   ossimDpt *coord = 0;
+  
+   switch (table.header[pos].type)
+   {
+      case 'C':
+      {
+         coordinate_type temp, *ptr;
+         ptr = (coordinate_type*)get_table_element(pos, row, table, &temp, count);
+         coord = new ossimDpt[*count];
+         if ((*count == 1) && (ptr == (coordinate_type*)0))
+         {
+            coord->x = (double)temp.x;
+            coord->y = (double)temp.y;
+         }
+         else 
+         {
+	    for (i=0; i<*count; i++)
+            {
+               coord[i].x = (double)ptr[i].x;
+               coord[i].y = (double)ptr[i].y;
+            }
+         }
+         if (ptr)
+         {
+            free((char *)ptr);
+         }
+         break;
+      }
+      case 'Z':
+      {
+         tri_coordinate_type temp, *ptr;
+         ptr = (tri_coordinate_type*)get_table_element (pos, row, table, &temp, count);
+	 coord = new ossimDpt[*count];
+         if ((*count == 1) && (ptr == (tri_coordinate_type*)0))
+         {
+            coord->x = (double)temp.x;
+            coord->y = (double)temp.y;
+         }
+         else
+         {
+            for (i=0; i<*count; i++)
+            {
+               coord[i].x = (double)ptr[i].x;
+               coord[i].y = (double)ptr[i].y;
+            }
+         }
+         if (ptr)
+         {
+            free ((char*)ptr);
+         }
+         break;
+      }
+      case 'B':
+      {
+         double_coordinate_type temp, *ptr;
+         ptr = (double_coordinate_type*)get_table_element (pos, row, table, &temp, count);
+         coord = new ossimDpt[*count];
+         if ((*count == 1) && (ptr == (double_coordinate_type*)0))
+         {
+            coord->x = temp.x;
+            coord->y = temp.y;
+         }
+         else
+         {
+	    for (i=0; i<*count; i++)
+            {
+               coord[i].x = ptr[i].x;
+               coord[i].y = ptr[i].y;
+            }
+         }
+         if (ptr)
+         {
+	    free ((char*)ptr);
+         }
+         break;
+      }
+      case 'Y':
+      {
+         double_tri_coordinate_type temp, *ptr;
+         ptr = (double_tri_coordinate_type*)get_table_element (pos, row, table, &temp, count);
+         coord = new ossimDpt[*count];
+         if ((*count == 1) && (ptr == (double_tri_coordinate_type*)0))
+         {
+            coord->x = temp.x;
+            coord->y = temp.y;
+         }
+         else
+         {
+            for (i=0; i<*count; i++)
+            {
+               coord[i].x = ptr[i].x;
+               coord[i].y = ptr[i].y;
+            }
+         }
+         if (ptr)
+         {
+	    free((char*)ptr);
+         }
+         break;
+      }
+      
+      default:
+         break;
+   } /* switch type */
+   return (coord);
+}
+
+int ossimVpfAnnotationFeatureInfo::readTableCellAsInt (int rowNumber,
+						       int colNumber,
+						       ossimVpfTable& table)
+{
+  int result = -1;
+  row_type row = read_row( rowNumber, *table.getVpfTableData());
+  
+  result = table.getColumnValueAsString(row, colNumber).toInt();
+  
+  free_row(row, *table.getVpfTableData());
+  
+  return result;
+}
+
+int ossimVpfAnnotationFeatureInfo::readRngId(int rowNumber,
+					     int colNumber,
+					     ossimVpfTable& faceTable)
+{
+  int idResult = -1;
+  row_type row = read_row( rowNumber, 
+			   *faceTable.getVpfTableData());
+  
+  idResult = faceTable.getColumnValueAsString(row,
+					      colNumber).toInt();
+  
+  free_row(row, *faceTable.getVpfTableData());
+  
+  return idResult;
+}
+
+int ossimVpfAnnotationFeatureInfo::readStartEdgeId(int rowNumber,
+						   int colNumber,
+						   ossimVpfTable& rngTable)
+{
+  int idResult = -1;
+
+  row_type row = read_row( rowNumber, 
+			   *rngTable.getVpfTableData());
+  
+  idResult = rngTable.getColumnValueAsString(row,
+					     colNumber).toInt();
+  
+  free_row(row, *rngTable.getVpfTableData());
+  
+  return idResult;
+  
+}
+
+int ossimVpfAnnotationFeatureInfo::getEdgeKeyId (vpf_table_type& table, row_type& row, int col) {
+    id_triplet_type key;
+    ossim_int32 keyCount;
+    get_table_element( col,
+		       row,
+		       table,
+		       & key,
+		       & keyCount );
+    return key.id;
+}
+
+void ossimVpfAnnotationFeatureInfo::readGeoPolygon(ossimGeoPolygon& polygon,
+						   int faceId,
+						   int startEdgeId,
+						   ossimVpfTable& edgTable) {
+
+  ossim_int32 coordinatesCol = edgTable.getColumnPosition( "coordinates" );
+  ossim_int32 startNodeCol = edgTable.getColumnPosition( "start_node" );
+  ossim_int32 endNodeCol = edgTable.getColumnPosition( "end_node" );
+  ossim_int32 rightEdgeCol = edgTable.getColumnPosition( "right_edge" );
+  ossim_int32 leftEdgeCol = edgTable.getColumnPosition( "left_edge" );
+  ossim_int32 rightFaceCol = edgTable.getColumnPosition( "right_face" );
+  ossim_int32 leftFaceCol = edgTable.getColumnPosition( "left_face" );
+
+  // collect edges
+  vector < int > edges;
+  int lastEdge = startEdgeId;
+  edges.push_back( lastEdge );
+
+  row_type row = read_row( startEdgeId, *edgTable.getVpfTableData() );
+  int startNode = edgTable.getColumnValueAsString( row, startNodeCol ).toInt();
+  int endNode = edgTable.getColumnValueAsString( row, endNodeCol ).toInt();
+
+  if (startNode != endNode) { // there's more than one edge to this ring
+    int rightFace = getEdgeKeyId( *edgTable.getVpfTableData(), row, rightFaceCol );
+    int leftFace = getEdgeKeyId( *edgTable.getVpfTableData(), row, leftFaceCol );
+    int rightEdge = getEdgeKeyId( *edgTable.getVpfTableData(), row, rightEdgeCol );
+    int leftEdge = getEdgeKeyId( *edgTable.getVpfTableData(), row, leftEdgeCol );
+    int nextEdge;
+    int firstNode, lastNode;
+
+    if (rightFace == leftFace) {
+      if (rightEdge == leftEdge) {
+	free_row(row,  *edgTable.getVpfTableData());
+	// as of Mon Dec 20 2004, this has not been observed in vmap0 or vmap1
+	// cout << "rejecting floating line face " << faceId << " line " << __LINE__ << endl;
+	return;
+      }
+
+      // this is a dangling start edge; find a non dangling edge to use as the start edge
+      int dirRight = 1;
+      int nextEdge = startEdgeId;
+      int nextLeftFace = leftFace;
+      int nextRightFace = rightFace;
+      int mobiusLimit = 1000;
+
+      while (nextLeftFace == nextRightFace) {
+	if (-- mobiusLimit < 0) {
+	    free_row(row,  *edgTable.getVpfTableData());
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting mobius face " << faceId << " line " << __LINE__ << endl;
+            }
+	    return;
+	}
+
+	int thisEdge = nextEdge;
+	if (dirRight) {
+	  nextEdge = getEdgeKeyId( *edgTable.getVpfTableData(), row, rightEdgeCol );
+	  if (nextEdge == thisEdge)
+	    dirRight = 0;
+	  else if (nextEdge == startEdgeId) {
+	    free_row(row,  *edgTable.getVpfTableData());
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting mobius face " << faceId << " line " << __LINE__ << endl;
+            }
+	    return;
+	  }
+	} else {
+	  nextEdge = getEdgeKeyId( *edgTable.getVpfTableData(), row, leftEdgeCol );
+	  if (nextEdge == thisEdge) {
+	    free_row(row,  *edgTable.getVpfTableData());
+	    // as of Mon Dec 20 2004, this has not been observed in vmap0 or vmap1
+	    // cout << "rejecting multi floating line face " << faceId << " line " << __LINE__ << endl;
+	    return;
+	  } else if (nextEdge == startEdgeId) {
+	    free_row(row,  *edgTable.getVpfTableData());
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting mobius face " << faceId << " line " << __LINE__ << endl;
+            }
+	    return;
+	  }
+	}
+	free_row(row,  *edgTable.getVpfTableData());
+	row = read_row( nextEdge, *edgTable.getVpfTableData() );
+	nextRightFace = getEdgeKeyId( *edgTable.getVpfTableData(), row, rightFaceCol );
+	nextLeftFace = getEdgeKeyId( *edgTable.getVpfTableData(), row, leftFaceCol );
+      }
+
+      startEdgeId = nextEdge;
+      rightFace = nextRightFace;
+      leftFace = nextLeftFace;
+      free_row(row,  *edgTable.getVpfTableData());
+      row = read_row( startEdgeId, *edgTable.getVpfTableData() );
+      startNode = edgTable.getColumnValueAsString( row, startNodeCol ).toInt();
+      endNode = edgTable.getColumnValueAsString( row, endNodeCol ).toInt();
+    }
+
+    if (rightFace == faceId) {
+      nextEdge = getEdgeKeyId( *edgTable.getVpfTableData(), row, rightEdgeCol );
+      firstNode = startNode;
+      lastNode = endNode;
+    } else if (leftFace == faceId) {
+      nextEdge = getEdgeKeyId( *edgTable.getVpfTableData(), row, leftEdgeCol );
+      firstNode = endNode;
+      lastNode = startNode;
+    }
+    else
+    {
+       if(traceDebug())
+       {
+          ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting face " << faceId << " line " << __LINE__ << endl;
+       }
+       return;
+    }
+
+    row_type nextRow;
+    while (true) {
+      nextRow = read_row( nextEdge, *edgTable.getVpfTableData() );
+      int nextLeftEdge = getEdgeKeyId( *edgTable.getVpfTableData(), nextRow, leftEdgeCol );
+      int nextRightEdge = getEdgeKeyId( *edgTable.getVpfTableData(), nextRow, rightEdgeCol );
+      int nextLeftFace = getEdgeKeyId( *edgTable.getVpfTableData(), nextRow, leftFaceCol );
+      int nextRightFace = getEdgeKeyId( *edgTable.getVpfTableData(), nextRow, rightFaceCol );
+      int nextStartNode = edgTable.getColumnValueAsString( nextRow, startNodeCol ).toInt();
+      int nextEndNode = edgTable.getColumnValueAsString( nextRow, endNodeCol ).toInt();
+
+      while (nextLeftFace == nextRightFace) {
+	int lastEnd;
+	if (rightFace == faceId)
+	  lastEnd = edgTable.getColumnValueAsString( row, endNodeCol ).toInt();
+	else
+	  lastEnd = edgTable.getColumnValueAsString( row, startNodeCol ).toInt();
+
+	if (lastEnd == nextStartNode)
+	  nextEdge = nextLeftEdge;
+	else if (lastEnd == nextEndNode)
+	  nextEdge = nextRightEdge;
+	else {			// bad face
+           if(traceDebug())
+           {
+              ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting face " << faceId << " line " << __LINE__ << endl;
+           }
+	  return;
+	}
+	if (lastEdge == nextEdge)
+        { // bad face
+           if(traceDebug())
+           {
+              ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting face " << faceId << " line " << __LINE__ << endl;
+           }
+           return;
+	}
+
+	free_row(nextRow,  *edgTable.getVpfTableData());
+	nextRow = read_row( nextEdge, *edgTable.getVpfTableData() );
+	nextLeftEdge = getEdgeKeyId( *edgTable.getVpfTableData(), nextRow, leftEdgeCol );
+	nextRightEdge = getEdgeKeyId( *edgTable.getVpfTableData(), nextRow, rightEdgeCol );
+	nextLeftFace = getEdgeKeyId( *edgTable.getVpfTableData(), nextRow, leftFaceCol );
+	nextRightFace = getEdgeKeyId( *edgTable.getVpfTableData(), nextRow, rightFaceCol );
+	nextStartNode = edgTable.getColumnValueAsString( nextRow, startNodeCol ).toInt();
+	nextEndNode = edgTable.getColumnValueAsString( nextRow, endNodeCol ).toInt();
+      }
+	
+      lastEdge = nextEdge;
+      edges.push_back( lastEdge );
+
+      {
+	int lastEnd;
+	if (nextRightFace == faceId) {
+	  if (lastNode != nextStartNode) {
+             if(traceDebug())
+             {
+                ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting face " << faceId << " line " << __LINE__ << endl;
+             }
+	    return;
+	  }
+	  lastEnd = nextEndNode;
+	} else if (nextLeftFace == faceId) {
+	  if (lastNode != nextEndNode) {
+             if(traceDebug())
+             {
+                ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting face " << faceId << " line " << __LINE__ << endl;
+             }
+	    return;
+	  }
+	  lastEnd = nextStartNode;
+	} else {
+           if(traceDebug())
+           {
+              ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting face " << faceId << " line " << __LINE__ << endl;
+           }
+	  return;
+	}
+
+	if (lastEnd == firstNode)
+	  break;
+      }
+
+      free_row(row,  *edgTable.getVpfTableData());
+      row = nextRow;
+      startNode = nextStartNode;
+      endNode = nextEndNode;
+      rightFace = nextRightFace;
+      leftFace = nextLeftFace;
+
+      if (rightFace == faceId) {
+	nextEdge = nextRightEdge;
+	lastNode = endNode;
+      } else {
+	nextEdge = nextLeftEdge;
+	lastNode = startNode;
+      }
+    }
+
+    free_row(nextRow,  *edgTable.getVpfTableData());
+    nextRow = 0;
+  }
+
+  for (vector< int >::iterator i = edges.begin(); i != edges.end(); i++) {
+    ossim_int32 count = 0;
+    free_row(row,  *edgTable.getVpfTableData());
+    row = read_row( *i, *edgTable.getVpfTableData() );
+    ossimDpt* ptArray = getXy(*edgTable.getVpfTableData(),
+			      row,
+			      coordinatesCol,
+			      &count);
+  
+    if(ptArray)
+    {
+       int rightFace = getEdgeKeyId( *edgTable.getVpfTableData(), row, rightFaceCol );
+       
+       if (rightFace == faceId)
+       {
+	  for(int p = 0; p < count; ++p)
+          {
+             if((fabs(ptArray[p].x) <= 180.0)&&
+                (fabs(ptArray[p].y) <= 90.0))
+             {
+                polygon.addPoint(ptArray[p].y, ptArray[p].x);
+             }
+          }
+       }
+       else
+       {
+	  for(int p = count - 1; p >= 0; --p)
+          {
+             if((fabs(ptArray[p].x) <= 180.0)&&
+                (fabs(ptArray[p].y) <= 90.0))
+             {
+                polygon.addPoint(ptArray[p].y, ptArray[p].x);
+             }
+          }
+       }
+       delete [] ptArray;
+    }
+  }
+  free_row(row,  *edgTable.getVpfTableData());
+}
+
+void ossimVpfAnnotationFeatureInfo::readEdge(ossimPolyLine& polyLine,
+					     int rowNumber,
+					     int colPosition,
+					     ossimVpfTable& edgeTable)
+{
+  polyLine.clear();
+  row_type row = read_row( rowNumber, 
+			   *edgeTable.getVpfTableData());
+
+  ossim_int32 count = 0;
+  ossimDpt* ptArray = getXy(*edgeTable.getVpfTableData(),
+			    row,
+			    colPosition,
+			    &count);
+  
+  if(ptArray)
+    {
+      for(int i = 0; i < count; ++i)
+	{
+	  if((fabs(ptArray[i].x) <= 180.0)&&
+	     (fabs(ptArray[i].y) <= 90.0))
+	    {
+	      polyLine.addPoint(ossimDpt(ptArray[i].x,
+					 ptArray[i].y));
+	    }
+	}
+      delete [] ptArray;
+    }
+  free_row(row,  *edgeTable.getVpfTableData());
+}
+
+
diff --git a/ossim/src/ossim/imaging/ossimVpfAnnotationLibraryInfo.cpp b/ossim/src/ossim/imaging/ossimVpfAnnotationLibraryInfo.cpp
new file mode 100644
index 0000000..930fff5
--- /dev/null
+++ b/ossim/src/ossim/imaging/ossimVpfAnnotationLibraryInfo.cpp
@@ -0,0 +1,260 @@
+//*************************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+//**************************************************************************
+// $Id: ossimVpfAnnotationLibraryInfo.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <algorithm>
+
+#include <ossim/imaging/ossimVpfAnnotationLibraryInfo.h>
+#include <ossim/imaging/ossimVpfAnnotationFeatureInfo.h>
+#include <ossim/vec/ossimVpfLibrary.h>
+#include <ossim/vec/ossimVpfDatabase.h>
+#include <ossim/base/ossimTrace.h>
+
+static ossimTrace traceDebug("ossimVpfAnnotationLibraryInfo:debug");
+
+
+ossimVpfAnnotationLibraryInfo::ossimVpfAnnotationLibraryInfo(const ossimString& libraryName, bool enabledFlag)
+   :
+      theName(libraryName),
+      theEnabledFlag(enabledFlag),
+      theDatabase(NULL)
+{
+}
+
+ossimVpfAnnotationLibraryInfo::~ossimVpfAnnotationLibraryInfo()
+{
+   deleteAllCoverage();
+}
+
+bool ossimVpfAnnotationLibraryInfo::getEnabledFlag()const
+{
+   return theEnabledFlag;
+}
+
+void ossimVpfAnnotationLibraryInfo::setEnabledFlag(bool flag)
+{
+   theEnabledFlag = flag;
+}
+
+const ossimString& ossimVpfAnnotationLibraryInfo::getName()const
+{
+   return theName;
+}
+
+void ossimVpfAnnotationLibraryInfo::setName(const ossimString& libraryName)
+{
+   theName = libraryName;
+}
+
+void ossimVpfAnnotationLibraryInfo::setDatabase(ossimVpfDatabase* database)
+{
+   theDatabase = database;
+}
+
+ossimVpfDatabase* ossimVpfAnnotationLibraryInfo::getDatabase()
+{
+   return theDatabase;
+}
+
+ossimIrect ossimVpfAnnotationLibraryInfo::getBoundingProjectedRect()const
+{
+   ossimIrect result;
+   result.makeNan();
+   
+   for(ossim_uint32 idx = 0; idx < theCoverageLayerList.size(); ++idx)
+   {
+      ossimIrect tempRect = theCoverageLayerList[idx]->getBoundingProjectedRect();
+      if(!tempRect.hasNans())
+      {
+         if(result.hasNans())
+         {
+            result = tempRect;
+         }
+         else
+         {
+            result = result.combine(tempRect);
+         }
+      }
+   }
+   
+   return result;
+}
+
+void ossimVpfAnnotationLibraryInfo::getAllFeatures(std::vector<ossimVpfAnnotationFeatureInfo*>& features)
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimVpfAnnotationLibraryInfo::getAllFeatures DEBUG: entered..." << std::endl;
+   }
+   
+   for(ossim_uint32 idx = 0; idx < theCoverageLayerList.size(); ++idx)
+   {
+      theCoverageLayerList[idx]->getAllFeatures(features);
+   }
+   
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimVpfAnnotationLibraryInfo::getAllFeatures DEBUG: leaving..." << std::endl;
+   }
+}
+
+void ossimVpfAnnotationLibraryInfo::transform(ossimImageGeometry* geom)
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimVpfAnnotationLibraryInfo::transform DEBUG: entered..." << std::endl;
+   }
+   
+   
+   for(ossim_uint32 idx = 0; idx < theCoverageLayerList.size(); ++idx)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << "transforming coverage = " << theCoverageLayerList[idx]->getName() << std::endl;
+      }
+      
+      theCoverageLayerList[idx]->transform(geom);
+   }
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimVpfAnnotationLibraryInfo::transform DEBUG: leaving..." << std::endl;
+   }
+}
+
+void ossimVpfAnnotationLibraryInfo::buildLibrary()
+{
+   buildLibrary( "", "");
+}
+
+void ossimVpfAnnotationLibraryInfo::buildLibrary(const ossimString& coverageName, const ossimString& feature)
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimVpfAnnotationLibraryInfo::buildLibrary DEBUG: entered..." << std::endl;
+   }
+   deleteAllCoverage();
+   if(!theDatabase)
+   {
+      return;
+   }
+   
+   ossimVpfLibrary* library = theDatabase->getLibrary(theName);
+   if(library)
+   {
+      std::vector<ossimString> coverageNames;
+      library->getCoverageNames(coverageNames);
+      for(ossim_uint32 idx = 0; idx < coverageNames.size(); ++idx)
+      {
+         ossimString s1 = coverageName;
+         ossimString s2 = coverageNames[idx];
+         s1.downcase();
+         s2.downcase();
+         if ( ! coverageName.length() || (s1 == s2) )
+         {
+            ossimVpfAnnotationCoverageInfo* coverageInfo =
+               new ossimVpfAnnotationCoverageInfo;
+            coverageInfo->setName(coverageNames[idx]);
+            coverageInfo->setLibrary(library);
+            theCoverageLayerList.push_back(coverageInfo);
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << "coverage name = " << coverageNames[idx] << std::endl;
+            }
+            coverageInfo->buildCoverage(feature);
+         }
+      }
+   }
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimVpfAnnotationLibraryInfo::buildLibrary DEBUG: leaving..." << std::endl;
+   }
+}
+
+
+void ossimVpfAnnotationLibraryInfo::drawAnnotations(ossimRgbImage* tile)
+{
+  for(ossim_uint32 idx = 0; idx < theCoverageLayerList.size(); ++idx)
+    {
+      theCoverageLayerList[idx]->drawAnnotations(tile);
+    }
+}
+
+void ossimVpfAnnotationLibraryInfo::deleteAllCoverage()
+{
+  for(ossim_uint32 idx = 0; idx < theCoverageLayerList.size(); ++idx)
+    {
+      delete theCoverageLayerList[idx];
+    }
+
+  theCoverageLayerList.clear();
+}
+
+bool ossimVpfAnnotationLibraryInfo::saveState(ossimKeywordlist& kwl,
+					      const char* prefix)const
+{
+   ossim_uint32 idx;
+   
+   kwl.add(prefix,
+           "name",
+           theName,
+           true);
+   
+   for(idx = 0; idx < theCoverageLayerList.size(); ++idx)
+   {
+      theCoverageLayerList[idx]->saveState(kwl,
+					   (ossimString(prefix) + "coverage" + ossimString::toString(idx) + ".").c_str());
+   }
+   
+   return true;
+}
+
+bool ossimVpfAnnotationLibraryInfo::loadState(const ossimKeywordlist& kwl,
+					      const char* prefix)
+{
+  deleteAllCoverage();
+  theName = kwl.find(prefix, "name");
+  
+  ossimVpfLibrary* library = theDatabase->getLibrary(theName);
+
+  if(!library)
+    {
+      return false;
+    }
+  ossimString regExpression =  ossimString("^(") + ossimString(prefix) + "coverage[0-9]+.)";
+  vector<ossimString> keys =
+    kwl.getSubstringKeyList( regExpression );
+  std::vector<int> theNumberList(keys.size());
+  int offset = (int)(ossimString(prefix)+"coverage").size();
+  int idx = 0;
+  for(idx = 0; idx < (int)theNumberList.size();++idx)
+    {
+      ossimString numberStr(keys[idx].begin() + offset,
+			    keys[idx].end());
+      theNumberList[idx] = numberStr.toInt();
+    }
+  std::sort(theNumberList.begin(), theNumberList.end());
+  
+  for(idx = 0; idx < (int)keys.size(); ++idx)
+    {
+      ossimString newPrefix = ossimString(prefix);
+      newPrefix += ossimString("coverage");
+      newPrefix += ossimString::toString(theNumberList[idx]);
+      newPrefix += ossimString(".");
+      ossimVpfAnnotationCoverageInfo* coverageInfo = new ossimVpfAnnotationCoverageInfo;
+      coverageInfo->setLibrary(library);
+      theCoverageLayerList.push_back(coverageInfo);
+      coverageInfo->loadState(kwl,
+			      newPrefix);
+    }
+  
+  return true;
+}
+
diff --git a/src/ossim/imaging/ossimVpfAnnotationSource.cpp b/ossim/src/ossim/imaging/ossimVpfAnnotationSource.cpp
similarity index 100%
rename from src/ossim/imaging/ossimVpfAnnotationSource.cpp
rename to ossim/src/ossim/imaging/ossimVpfAnnotationSource.cpp
diff --git a/src/ossim/imaging/ossimVpfTileSource.cpp b/ossim/src/ossim/imaging/ossimVpfTileSource.cpp
similarity index 100%
rename from src/ossim/imaging/ossimVpfTileSource.cpp
rename to ossim/src/ossim/imaging/ossimVpfTileSource.cpp
diff --git a/src/ossim/imaging/ossimWatermarkFilter.cpp b/ossim/src/ossim/imaging/ossimWatermarkFilter.cpp
similarity index 100%
rename from src/ossim/imaging/ossimWatermarkFilter.cpp
rename to ossim/src/ossim/imaging/ossimWatermarkFilter.cpp
diff --git a/src/ossim/imaging/ossimWorldFileWriter.cpp b/ossim/src/ossim/imaging/ossimWorldFileWriter.cpp
similarity index 100%
rename from src/ossim/imaging/ossimWorldFileWriter.cpp
rename to ossim/src/ossim/imaging/ossimWorldFileWriter.cpp
diff --git a/src/ossim/init/makefile.vc b/ossim/src/ossim/init/makefile.vc
similarity index 100%
rename from src/ossim/init/makefile.vc
rename to ossim/src/ossim/init/makefile.vc
diff --git a/ossim/src/ossim/init/ossimInit.cpp b/ossim/src/ossim/init/ossimInit.cpp
new file mode 100644
index 0000000..70bb194
--- /dev/null
+++ b/ossim/src/ossim/init/ossimInit.cpp
@@ -0,0 +1,713 @@
+//*****************************************************************************
+// FILE: ossimInit.cpp
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// DESCRIPTION:
+//   Contains implementation of class ossimInit. This object handles all
+//   aspects of initialization for OSSIM applications. These tasks include:
+//
+//      1. Parsing the command line.
+//      2. Instantiating all class factories.
+//      3. Initializing the "trace" code execution tracing functionality.
+//      4. Scanning the preferences file for relevant values.
+//
+// SOFTWARE HISTORY:
+//   24Apr2001  Oscar Kramer
+//              Initial coding.
+//*****************************************************************************
+// $Id: ossimInit.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/ossimVersion.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimTraceManager.h>
+#include <algorithm>
+#include <ossim/base/ossimEnvironmentUtility.h>
+#include <ossim/base/ossimGeoidEgm96.h>
+#include <ossim/imaging/ossimCodecFactoryRegistry.h>
+
+//***
+// Define Trace flags for use within this file:
+//***
+#include <ossim/base/ossimTrace.h>
+
+// include the image file formats
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+#include <ossim/imaging/ossimImageSourceFactoryRegistry.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/base/ossim2dTo2dTransformRegistry.h>
+#include <ossim/imaging/ossimImageGeometryRegistry.h>
+#include <ossim/elevation/ossimElevManager.h>
+#include <ossim/base/ossimGeoidManager.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimOverviewBuilderFactoryRegistry.h>
+#include <ossim/imaging/ossimOverviewBuilderFactory.h>
+
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <ossim/imaging/ossimImageMetaDataWriterRegistry.h>
+#include <ossim/projection/ossimProjectionViewControllerFactory.h>
+#include <ossim/base/ossimDatumFactoryRegistry.h>
+#include <ossim/base/ossimBaseObjectFactory.h>
+#include <ossim/base/ossimCustomEditorWindowRegistry.h>
+#include <ossim/base/ossimDirectory.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/plugin/ossimSharedPluginRegistry.h>
+#include <ossim/plugin/ossimDynamicLibrary.h>
+#include <ossim/font/ossimFontFactoryRegistry.h>
+#include <ossim/base/ossimNotifyContext.h>
+
+
+static ossimTrace traceExec = ossimTrace("ossimInit:exec");
+static ossimTrace traceDebug = ossimTrace("ossimInit:debug");
+
+ossimInit* ossimInit::theInstance = 0;
+
+ossimInit::~ossimInit()
+{
+   theInstance = 0;
+}
+
+ossimInit::ossimInit()
+    :
+       theInitializedFlag(false),
+       theAppName(),
+       thePreferences(ossimPreferences::instance()),
+       theElevEnabledFlag(true),
+       thePluginLoaderEnabledFlag(true)
+{
+}
+
+ossimInit* ossimInit::instance()
+{
+   static OpenThreads::Mutex m;
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m);
+   if (!theInstance)
+   {
+      theInstance = new ossimInit();
+   }
+   return theInstance;
+}
+
+void ossimInit::addOptions(ossimArgumentParser& parser)
+{
+   parser.getApplicationUsage()->addCommandLineOption("-P", "specify a preference file to load");
+   parser.getApplicationUsage()->addCommandLineOption("-K", "specify individual keywords to add to the preferences keyword list: name=value");
+   parser.getApplicationUsage()->addCommandLineOption("-T", "specify the classes to trace, ex: ossimInit|ossimImage.* \nwill trace ossimInit and all ossimImage classes");
+   parser.getApplicationUsage()->addCommandLineOption("--disable-elev", "Will disable the elevation");
+   parser.getApplicationUsage()->addCommandLineOption("--disable-plugin", "Will disable the plugin loader");
+   
+   parser.getApplicationUsage()->addCommandLineOption("--ossim-logfile", "takes a logfile as an argument.  All output messages are redirected to the specified log file.  By default there is no log file and all messages are enabled.");
+   parser.getApplicationUsage()->addCommandLineOption("--disable-notify", "Takes an argument. Arguments are ALL, WARN, NOTICE, INFO, FATAL, DEBUG.  If you want multiple disables then just do multiple --disable-notify on the command line.  All argument are case insensitive.  Default is all are enabled.");
+}
+
+/*!****************************************************************************
+ * METHOD: ossimInit::initialize()
+ *  
+ *  Method called from the OSSIM application main.
+ *  
+ *****************************************************************************/
+void ossimInit::initialize(int& argc, char** argv)
+{
+    static OpenThreads::Mutex m;
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m);
+  if( !theInitializedFlag )
+   {
+      ossimArgumentParser argumentParser(&argc, argv);
+      theInstance->initialize(argumentParser);
+   }
+}
+
+void ossimInit::initialize(ossimArgumentParser& parser)
+{
+   static OpenThreads::Mutex m;
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m);
+   if(theInitializedFlag)
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG ossimInit::initialize(parser):"
+            << " Already initialized, returning......"
+            << std::endl;
+      }
+      return;
+   }
+
+   theInstance->theAppName  = parser.getApplicationUsage()->getApplicationName();
+   theInstance->parseNotifyOption(parser);
+   theInstance->thePreferences = ossimPreferences::instance();
+      
+   //Parse the command line:
+   theInstance->parseOptions(parser);
+
+   theInstance->initializeDefaultFactories();
+   
+   if ( theElevEnabledFlag )
+   {
+      theInstance->initializeElevation();
+   }
+
+   theInstance->initializeLogFile();
+   
+   if(thePluginLoaderEnabledFlag)
+   {
+      theInstance->initializePlugins();
+   }
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossim preferences file: "
+         << theInstance->thePreferences->getPreferencesFilename()
+         << "\nVersion: " << version()
+         << "\nossimInit::initialize(parser): leaving..." << std::endl;
+   }
+   
+   theInitializedFlag = true;
+}
+
+void ossimInit::initialize()
+{
+    static OpenThreads::Mutex m;
+   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m);
+   if(theInitializedFlag)
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG ossimInit::initialize(): Already initialized, returning......" << std::endl;
+      }
+      return;
+   }
+
+   theInstance->theAppName  = "";
+   theInstance->thePreferences = ossimPreferences::instance();
+   theInstance->initializeDefaultFactories();
+   
+   if ( theElevEnabledFlag )
+   {
+      theInstance->initializeElevation();
+   }
+
+   theInstance->initializeLogFile();
+
+   //---
+   // To do:
+   // We need a mechanism to register factories to the "front" or the
+   // "back" of factory list so that plugins can override things.  For
+   // now we will initialize the plugins last...
+   //---
+   if(thePluginLoaderEnabledFlag)
+   {
+      theInstance->initializePlugins();
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossim preferences file: "
+         << theInstance->thePreferences->getPreferencesFilename()
+         << "\nVersion: " << version()
+         << "\nossimInit::initialize() leaving..."
+         << std::endl;
+   } 
+   
+   theInitializedFlag = true;
+}
+
+void ossimInit::finalize()
+{
+   
+}
+/*!****************************************************************************
+ *  Prints to stdout the list of command line options that this object parses.
+ *****************************************************************************/
+void ossimInit::usage()
+{
+   ossimNotify(ossimNotifyLevel_INFO)
+      << "INFORMATION ossimInit::usage():\n"
+      << "Additional command-line options available are as follows: "
+      << "\n"
+      << "\n  -P<pref_filename> -- Allows the user to override the loading "
+      << "\n    of the default preferences with their own pref file."
+      << "\n"
+      << "\n  -K<keyword>[=<value>] -- Allows the user to specify additional"
+      << "\n    keyword/value pairs that are added onto the preferences "
+      << "\n    previously loaded. Keywords specified here override those in"
+      << "\n    the preferences file."
+      << "\n"
+      << "\n  -T<trace_tag> -- Lets user turn on specific trace flags."
+      << "\n"
+      << "\n  -S<session_filename> -- Allows user to specify a session file"
+      << "\n    to load."
+      << std::endl;
+   return;
+}
+
+bool ossimInit::getElevEnabledFlag() const
+{
+   return theElevEnabledFlag;
+}
+
+void ossimInit::setElevEnabledFlag(bool flag)
+{
+   theElevEnabledFlag = flag; 
+}
+
+void ossimInit::setPluginLoaderEnabledFlag(bool flag)
+{
+   thePluginLoaderEnabledFlag = flag;  
+}
+
+void ossimInit::loadPlugins(const ossimFilename& plugin, const char* options)
+{
+   if(!thePluginLoaderEnabledFlag) return;
+
+   if(plugin.exists())
+   {
+      if(plugin.isDir())
+      {
+         ossimDirectory dir;
+         if(dir.open(plugin))
+         {
+            ossimFilename file;
+            
+            if(dir.getFirst(file,
+                            ossimDirectory::OSSIM_DIR_FILES))
+            {
+               do
+               { 
+                  ossimSharedPluginRegistry::instance()->registerPlugin(file, options);
+               }
+               while(dir.getNext(file));
+            }
+         }
+      }
+      else
+      {
+         ossimSharedPluginRegistry::instance()->registerPlugin(plugin, options);
+      }
+   }
+}
+
+void ossimInit::parseOptions(ossimArgumentParser& parser)
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
+      << "DEBUG ossimInit::parseOptions: entering..." << std::endl;
+   
+   std::string tempString;
+   ossimArgumentParser::ossimParameter stringParameter(tempString);
+   while(parser.read("-P", stringParameter));
+
+   if(tempString != "")
+   {
+      thePreferences->loadPreferences(ossimFilename(tempString));
+   }
+   while(parser.read("-K", stringParameter))
+   {
+      ossimString option = tempString;
+      if (option.contains("=") )
+      {
+         ossimString delimiter = "=";
+         ossimString key (option.before(delimiter));
+         ossimString value = option.after(delimiter);
+         thePreferences->addPreference(key.c_str(), value.c_str());
+      }
+      else
+      {
+         ossimString key (option);
+         thePreferences->addPreference(key, "");
+      }
+   }
+
+   while(parser.read("-T", stringParameter))
+   {
+      ossimTraceManager::instance()->setTracePattern(ossimString(tempString));
+   }
+
+   while(parser.read("--ossim-logfile", stringParameter))
+   {
+      ossimSetLogFilename(ossimFilename(tempString));
+   }
+   while(parser.read("--disable-notify", stringParameter))
+   {
+      ossimString tempDownCase = tempString;
+      tempDownCase = tempDownCase.downcase();
+
+      if(tempDownCase == "warn")
+      {
+         ossimDisableNotify(ossimNotifyFlags_WARN);
+      }
+      else if(tempDownCase == "fatal")
+      {
+         ossimDisableNotify(ossimNotifyFlags_FATAL);
+      }
+      else if(tempDownCase == "debug")
+      {
+         ossimDisableNotify(ossimNotifyFlags_DEBUG);
+      }
+      else if(tempDownCase == "info")
+      {
+         ossimDisableNotify(ossimNotifyFlags_INFO);
+      }
+      else if(tempDownCase == "notice")
+      {
+         ossimDisableNotify(ossimNotifyFlags_NOTICE);
+      }
+      else if(tempDownCase == "all")
+      {
+         ossimDisableNotify(ossimNotifyFlags_ALL);
+      }
+   }
+   if(parser.read("--disable-elev"))
+   {
+      theElevEnabledFlag = false;
+   }
+   if(parser.read("--disable-plugin"))
+   {
+      thePluginLoaderEnabledFlag = false;
+   }
+}
+
+void ossimInit::parseNotifyOption(ossimArgumentParser& parser)
+{
+   std::string tempString;
+   ossimArgumentParser::ossimParameter stringParameter(tempString);
+   while(parser.read("--disable-notify", stringParameter))
+   {
+      ossimString tempDownCase = tempString;
+      tempDownCase = tempDownCase.downcase();
+
+      if(tempDownCase == "warn")
+      {
+         ossimDisableNotify(ossimNotifyFlags_WARN);
+      }
+      else if(tempDownCase == "fatal")
+      {
+         ossimDisableNotify(ossimNotifyFlags_FATAL);
+      }
+      else if(tempDownCase == "debug")
+      {
+         ossimDisableNotify(ossimNotifyFlags_DEBUG);
+      }
+      else if(tempDownCase == "info")
+      {
+         ossimDisableNotify(ossimNotifyFlags_INFO);
+      }
+      else if(tempDownCase == "notice")
+      {
+         ossimDisableNotify(ossimNotifyFlags_NOTICE);
+      }
+      else if(tempDownCase == "all")
+      {
+         ossimDisableNotify(ossimNotifyFlags_ALL);
+      }
+   }
+}
+
+/*!****************************************************************************
+ * METHOD: ossimInit::removeOption()
+ *  
+ * Removes all characters associated with the indicated option from the
+ * command line string.
+ *  
+ *****************************************************************************/
+void ossimInit::removeOption(int& argc,
+                             char** argv,
+                             int argToRemove)
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
+      << "DEBUG ossimInit::removeOption(argc, argv, argToRemove): entering..."
+      << std::endl;
+   
+   // Shift the args up by one position, overwriting the arg being removed:
+   for (int i=argToRemove+1; i<argc;  i++)
+   {
+      argv[i - 1] = argv[i];
+   }
+   
+   argc--;
+   argv[argc] = 0;
+   
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
+      << "DEBUG ossimInit::removeOption(argc, argv, argToRemove): leaving..."
+      << std::endl;
+   return;
+}
+
+void ossimInit::initializeDefaultFactories()
+{
+   ossimObjectFactoryRegistry::instance()->registerFactory(ossimImageSourceFactoryRegistry::instance());
+
+   //---
+   // Because of how the imagehandlers work off a magic number make sure
+   // we place the writer first if we don't then the imagehandler will
+   // be false and will then try to open the filename and go through a
+   // magic number and if the file already
+   // existed it will open and create a handler instead of a writer.
+   //---
+   ossimCodecFactoryRegistry::instance();
+   ossimImageWriterFactoryRegistry::instance();
+   ossimDatumFactoryRegistry::instance();
+   ossimImageMetaDataWriterRegistry::instance();
+   ossimImageHandlerRegistry::instance();
+   ossim2dTo2dTransformRegistry::instance();
+   ossimImageGeometryRegistry::instance();
+   // Initialize the overview factories.
+   ossimOverviewBuilderFactoryRegistry::instance()->
+      registerFactory(ossimOverviewBuilderFactory::instance(), true);
+   
+   ossimObjectFactoryRegistry::instance()->addFactory(ossimBaseObjectFactory::instance());
+   
+   // initialize. projection factory.
+   ossimProjectionFactoryRegistry::instance();
+
+   // add the view controllers
+   ossimObjectFactoryRegistry::instance()->registerFactory(ossimProjectionViewControllerFactory::instance());
+
+   ossimFontFactoryRegistry::instance();
+}
+
+void ossimInit::initializePlugins()
+{      
+   ossimString regExpressionDir =  ossimString("^(") + "plugin.dir[0-9]+)";
+   ossimString regExpressionFile =  ossimString("^(") + "plugin.file[0-9]+)";
+
+   const ossimKeywordlist& kwl = thePreferences->preferencesKWL();
+
+   vector<ossimString> keys = kwl.getSubstringKeyList( regExpressionDir );
+
+   ossim_uint32 numberOfDirs = (ossim_uint32)keys.size();
+   ossim_uint32 offset = (ossim_uint32)ossimString("plugin.dir").size();
+   int idx = 0;
+   
+   std::vector<int> numberList(numberOfDirs);
+   
+   // register user plugins first
+   ossimFilename userPluginDir = ossimEnvironmentUtility::instance()->getUserOssimPluginDir();
+   loadPlugins(userPluginDir);
+
+   if(numberList.size()>0)
+   {
+      for(idx = 0; idx < (int)numberList.size();++idx)
+      {
+         ossimString numberStr(keys[idx].begin() + offset,
+                               keys[idx].end());
+         numberList[idx] = numberStr.toInt();
+      }
+      
+      std::sort(numberList.begin(), numberList.end());
+      for(idx=0;idx < (int)numberList.size();++idx)
+      {
+         ossimString newPrefix = "plugin.dir";
+         newPrefix += ossimString::toString(numberList[idx]);
+         const char* directory = kwl.find(newPrefix.c_str());
+         
+         if(directory)
+         {
+            loadPlugins(ossimFilename(directory));
+         }
+      }
+   }
+   keys = kwl.getSubstringKeyList( regExpressionFile );
+   
+   ossim_uint32 numberOfFiles = (ossim_uint32)keys.size();
+   offset = (ossim_uint32)ossimString("plugin.file").size();
+   numberList.resize(numberOfFiles);
+   if(numberList.size()>0)
+   {
+      for(idx = 0; idx < (int)numberList.size();++idx)
+      {
+         ossimString numberStr(keys[idx].begin() + offset,
+                               keys[idx].end());
+         numberList[idx] = numberStr.toInt();
+      }
+      
+      std::sort(numberList.begin(), numberList.end());   
+      for(idx=0;idx < (int)numberList.size();++idx)
+      {
+         ossimString newPrefix="plugin.file";
+         newPrefix += ossimString::toString(numberList[idx]);
+         const char* file = kwl.find(newPrefix.c_str());
+         
+         if(file&&ossimFilename(file).exists())
+         {
+            loadPlugins(file);
+//             ossimSharedPluginRegistry::instance()->registerPlugin(file);
+         }
+      }
+   }
+   
+   // now check new plugin loading that supports passing options to the plugins
+   // 
+   regExpressionFile =  ossimString("^(") + "plugin[0-9]+\\.file)";
+   keys = kwl.getSubstringKeyList( regExpressionFile );
+   
+   numberOfFiles = (ossim_uint32)keys.size();
+   offset = (ossim_uint32)ossimString("plugin").size();
+   numberList.resize(numberOfFiles);
+   
+   if(numberList.size()>0)
+   {
+      for(idx = 0; idx < (int)numberList.size();++idx)
+      {
+         std::vector<ossimString> splitArray;
+         keys[idx].split(splitArray, ".");
+         if(splitArray.size())
+         {
+            keys[idx] = ossimString(splitArray[0].begin(), splitArray[0].begin()+offset);
+         }
+         ossimString numberStr(splitArray[0].begin() + offset,
+                               splitArray[0].end());
+         numberList[idx] = numberStr.toInt();
+      }
+      
+      std::sort(numberList.begin(), numberList.end());   
+      for(idx=0;idx < (int)numberList.size();++idx)
+      {
+         ossimString newPrefix = ossimString("plugin")+ossimString::toString(numberList[idx]) + ".";
+         const char* file    = kwl.find((newPrefix+"file").c_str());
+         const char* options = kwl.find((newPrefix+"options").c_str());
+         if(file&&ossimFilename(file).exists())
+         {
+            loadPlugins(file, options);
+         }
+      }
+   }
+
+   ossimString auto_load_plugins(ossimPreferences::instance()->findPreference("ossim_init.auto_load_plugins"));
+   
+   if(auto_load_plugins.empty()) auto_load_plugins = "true";
+   // now load any plugins not found in the keywordlist
+   //
+   // check for plugins in the current directory
+   // and load them
+   if(auto_load_plugins.toBool())
+   {
+      ossimFilename ossimpluginsDir = ossimFilename(theAppName).dirCat("ossimplugins");
+      ossimDirectory currentDir(theAppName.path());
+
+      if(ossimpluginsDir.exists())
+      {
+         currentDir = ossimpluginsDir;
+      }
+      std::vector<ossimFilename> result;
+      currentDir.findAllFilesThatMatch(result, "ossim.*plugin.*", ossimDirectory::OSSIM_DIR_FILES);
+      
+      if(result.size())
+      {
+         ossim_uint32 idx = 0;
+         for(idx = 0; idx < result.size(); ++idx)
+         {
+            ossimSharedPluginRegistry::instance()->registerPlugin(result[idx]);
+         }
+      }
+   }
+}
+
+void ossimInit::initializeElevation()
+{
+   if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)
+      << "DEBUG ossimInit::initializeElevation(): Entered..." << std::endl;
+   
+   const ossimKeywordlist& KWL = thePreferences->preferencesKWL();
+
+   ossimFilename appPath = theAppName.path();
+   // look for bundled elevation and geoids
+   {
+	   ossimFilename geoid = appPath.dirCat("geoids");
+	   geoid = geoid.dirCat("geoid1996");
+	   geoid = geoid.dirCat("egm96.grd");
+	   if(geoid.exists())
+	   {
+         ossimGeoid* geoidPtr = new ossimGeoidEgm96(geoid);
+
+         if (geoidPtr->getErrorStatus() == ossimErrorCodes::OSSIM_OK)
+         {
+		    ossimGeoidManager::instance()->addGeoid(geoidPtr);
+		 }
+	   }
+   }
+   ossimGeoidManager::instance()->loadState(KWL);
+   
+   ossimFilename elevation = appPath.dirCat("elevation");
+   if(elevation.exists())
+   {
+      ossimElevManager::instance()->loadElevationPath(elevation);
+   }
+   // lets do backward compatability here
+   //
+   ossimString regExpression =  ossimString("^(") + "elevation_source[0-9]+.)";
+   vector<ossimString> keys =
+   KWL.getSubstringKeyList( regExpression );
+   if(!keys.empty())
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "Please specify elevation_source keywords with the new prefix\n"
+                                         << "of elevation_manager.elevation_source....\n";
+      thePreferences->preferencesKWL().addPrefixToKeysThatMatch("elevation_manager.", regExpression);
+   }
+   ossimElevManager::instance()->loadState(KWL, "elevation_manager.");
+   
+   if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)
+      << "DEBUG ossimInit::initializeElevation(): leaving..." << std::endl;
+}
+
+void ossimInit::initializeLogFile()
+{
+   //---
+   // Do not set if already as --ossim-logfile take precidence over preferences
+   // file.
+   //---
+   ossimFilename logFile;
+   ossimGetLogFilename(logFile);
+
+   if ( (logFile.size() == 0) && thePreferences )
+   {
+      const char* lookup =
+         thePreferences->preferencesKWL().find("ossim.log.file");
+      if (lookup)
+      {
+         logFile = lookup;
+         ossimSetLogFilename(logFile);
+      }
+   }
+}
+
+ossimString ossimInit::version() const
+{
+   ossimString versionString;
+#ifdef OSSIM_VERSION
+   versionString += OSSIM_VERSION;
+#else
+   versionString += "Version ?.?.?";
+#endif
+   
+   versionString += " ";
+
+#ifdef OSSIM_BUILD_DATE
+   versionString += OSSIM_BUILD_DATE;
+#else
+   versionString += "(yyyymmdd)";
+#endif
+
+   return versionString;
+}
+
+ossimFilename ossimInit::appName()const
+{
+   return theAppName;
+}
+
+ossimInit::ossimInit(const ossimInit& /* obj */ )
+{}       
+
+void ossimInit::operator=(const ossimInit& /* rhs */) const
+{}
+
diff --git a/src/ossim/makefile.vc b/ossim/src/ossim/makefile.vc
similarity index 100%
rename from src/ossim/makefile.vc
rename to ossim/src/ossim/makefile.vc
diff --git a/src/ossim/matrix/bandmat.cpp b/ossim/src/ossim/matrix/bandmat.cpp
similarity index 100%
rename from src/ossim/matrix/bandmat.cpp
rename to ossim/src/ossim/matrix/bandmat.cpp
diff --git a/src/ossim/matrix/bc.mak b/ossim/src/ossim/matrix/bc.mak
similarity index 100%
rename from src/ossim/matrix/bc.mak
rename to ossim/src/ossim/matrix/bc.mak
diff --git a/src/ossim/matrix/bc32.mak b/ossim/src/ossim/matrix/bc32.mak
similarity index 100%
rename from src/ossim/matrix/bc32.mak
rename to ossim/src/ossim/matrix/bc32.mak
diff --git a/src/ossim/matrix/cc.mak b/ossim/src/ossim/matrix/cc.mak
similarity index 100%
rename from src/ossim/matrix/cc.mak
rename to ossim/src/ossim/matrix/cc.mak
diff --git a/src/ossim/matrix/cholesky.cpp b/ossim/src/ossim/matrix/cholesky.cpp
similarity index 100%
rename from src/ossim/matrix/cholesky.cpp
rename to ossim/src/ossim/matrix/cholesky.cpp
diff --git a/src/ossim/matrix/evalue.cpp b/ossim/src/ossim/matrix/evalue.cpp
similarity index 100%
rename from src/ossim/matrix/evalue.cpp
rename to ossim/src/ossim/matrix/evalue.cpp
diff --git a/src/ossim/matrix/example.txt b/ossim/src/ossim/matrix/example.txt
similarity index 100%
rename from src/ossim/matrix/example.txt
rename to ossim/src/ossim/matrix/example.txt
diff --git a/src/ossim/matrix/fft.cpp b/ossim/src/ossim/matrix/fft.cpp
similarity index 100%
rename from src/ossim/matrix/fft.cpp
rename to ossim/src/ossim/matrix/fft.cpp
diff --git a/src/ossim/matrix/gnu.mak b/ossim/src/ossim/matrix/gnu.mak
similarity index 100%
rename from src/ossim/matrix/gnu.mak
rename to ossim/src/ossim/matrix/gnu.mak
diff --git a/src/ossim/matrix/hholder.cpp b/ossim/src/ossim/matrix/hholder.cpp
similarity index 100%
rename from src/ossim/matrix/hholder.cpp
rename to ossim/src/ossim/matrix/hholder.cpp
diff --git a/src/ossim/matrix/jacobi.cpp b/ossim/src/ossim/matrix/jacobi.cpp
similarity index 100%
rename from src/ossim/matrix/jacobi.cpp
rename to ossim/src/ossim/matrix/jacobi.cpp
diff --git a/src/ossim/matrix/makefile.vc b/ossim/src/ossim/matrix/makefile.vc
similarity index 100%
rename from src/ossim/matrix/makefile.vc
rename to ossim/src/ossim/matrix/makefile.vc
diff --git a/src/ossim/matrix/ms.mak b/ossim/src/ossim/matrix/ms.mak
similarity index 100%
rename from src/ossim/matrix/ms.mak
rename to ossim/src/ossim/matrix/ms.mak
diff --git a/src/ossim/matrix/ms_nt.mak b/ossim/src/ossim/matrix/ms_nt.mak
similarity index 100%
rename from src/ossim/matrix/ms_nt.mak
rename to ossim/src/ossim/matrix/ms_nt.mak
diff --git a/src/ossim/matrix/myexcept.cpp b/ossim/src/ossim/matrix/myexcept.cpp
similarity index 100%
rename from src/ossim/matrix/myexcept.cpp
rename to ossim/src/ossim/matrix/myexcept.cpp
diff --git a/src/ossim/matrix/newfft.cpp b/ossim/src/ossim/matrix/newfft.cpp
similarity index 100%
rename from src/ossim/matrix/newfft.cpp
rename to ossim/src/ossim/matrix/newfft.cpp
diff --git a/src/ossim/matrix/newmat.txt b/ossim/src/ossim/matrix/newmat.txt
similarity index 100%
rename from src/ossim/matrix/newmat.txt
rename to ossim/src/ossim/matrix/newmat.txt
diff --git a/src/ossim/matrix/newmat1.cpp b/ossim/src/ossim/matrix/newmat1.cpp
similarity index 100%
rename from src/ossim/matrix/newmat1.cpp
rename to ossim/src/ossim/matrix/newmat1.cpp
diff --git a/src/ossim/matrix/newmat2.cpp b/ossim/src/ossim/matrix/newmat2.cpp
similarity index 100%
rename from src/ossim/matrix/newmat2.cpp
rename to ossim/src/ossim/matrix/newmat2.cpp
diff --git a/src/ossim/matrix/newmat3.cpp b/ossim/src/ossim/matrix/newmat3.cpp
similarity index 100%
rename from src/ossim/matrix/newmat3.cpp
rename to ossim/src/ossim/matrix/newmat3.cpp
diff --git a/ossim/src/ossim/matrix/newmat4.cpp b/ossim/src/ossim/matrix/newmat4.cpp
new file mode 100644
index 0000000..e9fc1ee
--- /dev/null
+++ b/ossim/src/ossim/matrix/newmat4.cpp
@@ -0,0 +1,1027 @@
+//$$ newmat4.cpp       Constructors, ReSize, basic utilities
+
+// Copyright (C) 1991,2,3,4,8,9: R B Davies
+
+#include <ossim/matrix/include.h>
+
+#include <ossim/matrix/newmat.h>
+#include <ossim/matrix/newmatrc.h>
+
+#ifdef use_namespace
+namespace NEWMAT {
+#endif
+
+
+
+#ifdef DO_REPORT
+#define REPORT { static ExeCounter ExeCount(__LINE__,4); ++ExeCount; }
+#else
+#define REPORT {}
+#endif
+
+
+#define DO_SEARCH                   // search for LHS of = in RHS
+
+// ************************* general utilities *************************/
+
+static int tristore(int n)                    // elements in triangular matrix
+{ return (n*(n+1))/2; }
+
+
+// **************************** constructors ***************************/
+
+GeneralMatrix::GeneralMatrix()
+{ store=0; storage=0; nrows=0; ncols=0; tag=-1; }
+
+GeneralMatrix::GeneralMatrix(ArrayLengthSpecifier s)
+{
+   REPORT
+   storage=s.Value(); tag=-1;
+   if (storage)
+   {
+      store = new Real [storage]; MatrixErrorNoSpace(store);
+      MONITOR_REAL_NEW("Make (GenMatrix)",storage,store)
+   }
+   else store = 0;
+}
+
+Matrix::Matrix(int m, int n) : GeneralMatrix(m*n)
+{ REPORT nrows=m; ncols=n; }
+
+SquareMatrix::SquareMatrix(ArrayLengthSpecifier n)
+   : Matrix(n.Value(),n.Value())
+{ REPORT }
+
+SymmetricMatrix::SymmetricMatrix(ArrayLengthSpecifier n)
+   : GeneralMatrix(tristore(n.Value()))
+{ REPORT nrows=n.Value(); ncols=n.Value(); }
+
+UpperTriangularMatrix::UpperTriangularMatrix(ArrayLengthSpecifier n)
+   : GeneralMatrix(tristore(n.Value()))
+{ REPORT nrows=n.Value(); ncols=n.Value(); }
+
+LowerTriangularMatrix::LowerTriangularMatrix(ArrayLengthSpecifier n)
+   : GeneralMatrix(tristore(n.Value()))
+{ REPORT nrows=n.Value(); ncols=n.Value(); }
+
+DiagonalMatrix::DiagonalMatrix(ArrayLengthSpecifier m) : GeneralMatrix(m)
+{ REPORT nrows=m.Value(); ncols=m.Value(); }
+
+Matrix::Matrix(const BaseMatrix& M)
+{
+   REPORT // CheckConversion(M);
+   // MatrixConversionCheck mcc;
+   GeneralMatrix* gmx=((BaseMatrix&)M).Evaluate(MatrixType::Rt);
+   GetMatrix(gmx);
+}
+
+SquareMatrix::SquareMatrix(const BaseMatrix& M) : Matrix(M)
+{
+   REPORT
+   if (ncols != nrows)
+   {
+      Tracer tr("SquareMatrix");
+      Throw(NotSquareException(*this));
+   }
+}
+
+
+SquareMatrix::SquareMatrix(const Matrix& gm)
+{
+   REPORT
+   if (gm.ncols != gm.nrows)
+   {
+      Tracer tr("SquareMatrix(Matrix)");
+      Throw(NotSquareException(gm));
+   }
+   GetMatrix(&gm);
+}
+
+
+RowVector::RowVector(const BaseMatrix& M) : Matrix(M)
+{
+   REPORT
+   if (nrows!=1)
+   {
+      Tracer tr("RowVector");
+      Throw(VectorException(*this));
+   }
+}
+
+ColumnVector::ColumnVector(const BaseMatrix& M) : Matrix(M)
+{
+   REPORT
+   if (ncols!=1)
+   {
+      Tracer tr("ColumnVector");
+      Throw(VectorException(*this));
+   }
+}
+
+SymmetricMatrix::SymmetricMatrix(const BaseMatrix& M)
+{
+   REPORT  // CheckConversion(M);
+   // MatrixConversionCheck mcc;
+   GeneralMatrix* gmx=((BaseMatrix&)M).Evaluate(MatrixType::Sm);
+   GetMatrix(gmx);
+}
+
+UpperTriangularMatrix::UpperTriangularMatrix(const BaseMatrix& M)
+{
+   REPORT // CheckConversion(M);
+   // MatrixConversionCheck mcc;
+   GeneralMatrix* gmx=((BaseMatrix&)M).Evaluate(MatrixType::UT);
+   GetMatrix(gmx);
+}
+
+LowerTriangularMatrix::LowerTriangularMatrix(const BaseMatrix& M)
+{
+   REPORT // CheckConversion(M);
+   // MatrixConversionCheck mcc;
+   GeneralMatrix* gmx=((BaseMatrix&)M).Evaluate(MatrixType::LT);
+   GetMatrix(gmx);
+}
+
+DiagonalMatrix::DiagonalMatrix(const BaseMatrix& M)
+{
+   REPORT //CheckConversion(M);
+   // MatrixConversionCheck mcc;
+   GeneralMatrix* gmx=((BaseMatrix&)M).Evaluate(MatrixType::Dg);
+   GetMatrix(gmx);
+}
+
+IdentityMatrix::IdentityMatrix(const BaseMatrix& M)
+{
+   REPORT //CheckConversion(M);
+   // MatrixConversionCheck mcc;
+   GeneralMatrix* gmx=((BaseMatrix&)M).Evaluate(MatrixType::Id);
+   GetMatrix(gmx);
+}
+
+GeneralMatrix::~GeneralMatrix()
+{
+   if (store)
+   {
+      MONITOR_REAL_DELETE("Free (GenMatrix)",storage,store)
+      delete [] store;
+   }
+}
+
+CroutMatrix::CroutMatrix(const BaseMatrix& m)
+{
+   REPORT
+   Tracer tr("CroutMatrix");
+   indx = 0;                     // in case of exception at next line
+   GeneralMatrix* gm = ((BaseMatrix&)m).Evaluate(MatrixType::Rt);
+   GetMatrix(gm);
+   if (nrows!=ncols) { CleanUp(); Throw(NotSquareException(*gm)); }
+   d=true; sing=false;
+   indx=new int [nrows]; MatrixErrorNoSpace(indx);
+   MONITOR_INT_NEW("Index (CroutMat)",nrows,indx)
+   ludcmp();
+}
+
+CroutMatrix::~CroutMatrix()
+{
+   MONITOR_INT_DELETE("Index (CroutMat)",nrows,indx)
+   delete [] indx;
+}
+
+//ReturnMatrix::ReturnMatrix(GeneralMatrix& gmx)
+//{
+//   REPORT
+//   gm = gmx.Image(); gm->ReleaseAndDelete();
+//}
+
+
+GeneralMatrix::operator ReturnMatrix() const
+{
+   REPORT
+   GeneralMatrix* gm = Image(); gm->ReleaseAndDelete();
+   return ReturnMatrix(gm);
+}
+
+
+
+ReturnMatrix GeneralMatrix::ForReturn() const
+{
+   REPORT
+   GeneralMatrix* gm = Image(); gm->ReleaseAndDelete();
+   return ReturnMatrix(gm);
+}
+
+
+// ************************** ReSize matrices ***************************/
+
+void GeneralMatrix::ReSize(int nr, int nc, int s)
+{
+   REPORT
+   if (store)
+   {
+      MONITOR_REAL_DELETE("Free (ReDimensi)",storage,store)
+      delete [] store;
+   }
+   storage=s; nrows=nr; ncols=nc; tag=-1;
+   if (s)
+   {
+      store = new Real [storage]; MatrixErrorNoSpace(store);
+      MONITOR_REAL_NEW("Make (ReDimensi)",storage,store)
+   }
+   else store = 0;
+}
+
+void Matrix::ReSize(int nr, int nc)
+{ REPORT GeneralMatrix::ReSize(nr,nc,nr*nc); }
+
+void SquareMatrix::ReSize(int n)
+{ REPORT GeneralMatrix::ReSize(n,n,n*n); }
+
+void SquareMatrix::ReSize(int nr, int nc)
+{
+   REPORT
+   Tracer tr("SquareMatrix::ReSize");
+   if (nc != nr) Throw(NotSquareException(*this));
+   GeneralMatrix::ReSize(nr,nc,nr*nc);
+}
+
+void SymmetricMatrix::ReSize(int nr)
+{ REPORT GeneralMatrix::ReSize(nr,nr,tristore(nr)); }
+
+void UpperTriangularMatrix::ReSize(int nr)
+{ REPORT GeneralMatrix::ReSize(nr,nr,tristore(nr)); }
+
+void LowerTriangularMatrix::ReSize(int nr)
+{ REPORT GeneralMatrix::ReSize(nr,nr,tristore(nr)); }
+
+void DiagonalMatrix::ReSize(int nr)
+{ REPORT GeneralMatrix::ReSize(nr,nr,nr); }
+
+void RowVector::ReSize(int nc)
+{ REPORT GeneralMatrix::ReSize(1,nc,nc); }
+
+void ColumnVector::ReSize(int nr)
+{ REPORT GeneralMatrix::ReSize(nr,1,nr); }
+
+void RowVector::ReSize(int nr, int nc)
+{
+   Tracer tr("RowVector::ReSize");
+   if (nr != 1) Throw(VectorException(*this));
+   REPORT GeneralMatrix::ReSize(1,nc,nc);
+}
+
+void ColumnVector::ReSize(int nr, int nc)
+{
+   Tracer tr("ColumnVector::ReSize");
+   if (nc != 1) Throw(VectorException(*this));
+   REPORT GeneralMatrix::ReSize(nr,1,nr);
+}
+
+void IdentityMatrix::ReSize(int nr)
+{ REPORT GeneralMatrix::ReSize(nr,nr,1); *store = 1; }
+
+
+void Matrix::ReSize(const GeneralMatrix& A)
+{ REPORT  ReSize(A.Nrows(), A.Ncols()); }
+
+void SquareMatrix::ReSize(const GeneralMatrix& A)
+{
+   REPORT
+   int n = A.Nrows();
+   if (n != A.Ncols())
+   {
+      Tracer tr("SquareMatrix::ReSize(GM)");
+      Throw(NotSquareException(*this));
+   }
+   ReSize(n);
+}
+
+void nricMatrix::ReSize(const GeneralMatrix& A)
+{ REPORT  ReSize(A.Nrows(), A.Ncols()); }
+
+void ColumnVector::ReSize(const GeneralMatrix& A)
+{ REPORT  ReSize(A.Nrows(), A.Ncols()); }
+
+void RowVector::ReSize(const GeneralMatrix& A)
+{ REPORT  ReSize(A.Nrows(), A.Ncols()); }
+
+void SymmetricMatrix::ReSize(const GeneralMatrix& A)
+{
+   REPORT
+   int n = A.Nrows();
+   if (n != A.Ncols())
+   {
+      Tracer tr("SymmetricMatrix::ReSize(GM)");
+      Throw(NotSquareException(*this));
+   }
+   ReSize(n);
+}
+
+void DiagonalMatrix::ReSize(const GeneralMatrix& A)
+{
+   REPORT
+   int n = A.Nrows();
+   if (n != A.Ncols())
+   {
+      Tracer tr("DiagonalMatrix::ReSize(GM)");
+      Throw(NotSquareException(*this));
+   }
+   ReSize(n);
+}
+
+void UpperTriangularMatrix::ReSize(const GeneralMatrix& A)
+{
+   REPORT
+   int n = A.Nrows();
+   if (n != A.Ncols())
+   {
+      Tracer tr("UpperTriangularMatrix::ReSize(GM)");
+      Throw(NotSquareException(*this));
+   }
+   ReSize(n);
+}
+
+void LowerTriangularMatrix::ReSize(const GeneralMatrix& A)
+{
+   REPORT
+   int n = A.Nrows();
+   if (n != A.Ncols())
+   {
+      Tracer tr("LowerTriangularMatrix::ReSize(GM)");
+      Throw(NotSquareException(*this));
+   }
+   ReSize(n);
+}
+
+void IdentityMatrix::ReSize(const GeneralMatrix& A)
+{
+   REPORT
+   int n = A.Nrows();
+   if (n != A.Ncols())
+   {
+      Tracer tr("IdentityMatrix::ReSize(GM)");
+      Throw(NotSquareException(*this));
+   }
+   ReSize(n);
+}
+
+void GeneralMatrix::ReSize(const GeneralMatrix&)
+{
+   REPORT
+   Tracer tr("GeneralMatrix::ReSize(GM)");
+   Throw(NotDefinedException("ReSize", "this type of matrix"));
+}
+
+void GeneralMatrix::ReSizeForAdd(const GeneralMatrix& A, const GeneralMatrix&)
+{ REPORT ReSize(A); }
+
+void GeneralMatrix::ReSizeForSP(const GeneralMatrix& A, const GeneralMatrix&)
+{ REPORT ReSize(A); }
+
+
+// ************************* SameStorageType ******************************/
+
+// SameStorageType checks A and B have same storage type including bandwidth
+// It does not check same dimensions since we assume this is already done
+
+bool GeneralMatrix::SameStorageType(const GeneralMatrix& A) const
+{
+   REPORT
+   return Type() == A.Type();
+}
+
+
+// ******************* manipulate types, storage **************************/
+
+int GeneralMatrix::search(const BaseMatrix* s) const
+{ REPORT return (s==this) ? 1 : 0; }
+
+int GenericMatrix::search(const BaseMatrix* s) const
+{ REPORT return gm->search(s); }
+
+int MultipliedMatrix::search(const BaseMatrix* s) const
+{ REPORT return bm1->search(s) + bm2->search(s); }
+
+int ShiftedMatrix::search(const BaseMatrix* s) const
+{ REPORT return bm->search(s); }
+
+int NegatedMatrix::search(const BaseMatrix* s) const
+{ REPORT return bm->search(s); }
+
+int ReturnMatrix::search(const BaseMatrix* s) const
+{ REPORT return (s==gm) ? 1 : 0; }
+
+MatrixType Matrix::Type() const { return MatrixType::Rt; }
+MatrixType SquareMatrix::Type() const { return MatrixType::Sq; }
+MatrixType SymmetricMatrix::Type() const { return MatrixType::Sm; }
+MatrixType UpperTriangularMatrix::Type() const { return MatrixType::UT; }
+MatrixType LowerTriangularMatrix::Type() const { return MatrixType::LT; }
+MatrixType DiagonalMatrix::Type() const { return MatrixType::Dg; }
+MatrixType RowVector::Type() const { return MatrixType::RV; }
+MatrixType ColumnVector::Type() const { return MatrixType::CV; }
+MatrixType CroutMatrix::Type() const { return MatrixType::Ct; }
+MatrixType BandMatrix::Type() const { return MatrixType::BM; }
+MatrixType UpperBandMatrix::Type() const { return MatrixType::UB; }
+MatrixType LowerBandMatrix::Type() const { return MatrixType::LB; }
+MatrixType SymmetricBandMatrix::Type() const { return MatrixType::SB; }
+
+MatrixType IdentityMatrix::Type() const { return MatrixType::Id; }
+
+
+
+MatrixBandWidth BaseMatrix::BandWidth() const { REPORT return -1; }
+MatrixBandWidth DiagonalMatrix::BandWidth() const { REPORT return 0; }
+MatrixBandWidth IdentityMatrix::BandWidth() const { REPORT return 0; }
+
+MatrixBandWidth UpperTriangularMatrix::BandWidth() const
+   { REPORT return MatrixBandWidth(0,-1); }
+
+MatrixBandWidth LowerTriangularMatrix::BandWidth() const
+   { REPORT return MatrixBandWidth(-1,0); }
+
+MatrixBandWidth BandMatrix::BandWidth() const
+   { REPORT return MatrixBandWidth(lower,upper); }
+
+MatrixBandWidth GenericMatrix::BandWidth()const
+   { REPORT return gm->BandWidth(); }
+
+MatrixBandWidth AddedMatrix::BandWidth() const
+   { REPORT return gm1->BandWidth() + gm2->BandWidth(); }
+
+MatrixBandWidth SPMatrix::BandWidth() const
+   { REPORT return gm1->BandWidth().minimum(gm2->BandWidth()); }
+
+MatrixBandWidth KPMatrix::BandWidth() const
+{
+   int lower, upper;
+   MatrixBandWidth bw1 = gm1->BandWidth(), bw2 = gm2->BandWidth();
+   if (bw1.Lower() < 0)
+   {
+      if (bw2.Lower() < 0) { REPORT lower = -1; }
+      else { REPORT lower = bw2.Lower() + (gm1->Nrows() - 1) * gm2->Nrows(); }
+   }
+   else
+   {
+      if (bw2.Lower() < 0)
+         { REPORT lower = (1 + bw1.Lower()) * gm2->Nrows() - 1; }
+      else { REPORT lower = bw2.Lower() + bw1.Lower() * gm2->Nrows(); }
+   }
+   if (bw1.Upper() < 0)
+   {
+      if (bw2.Upper() < 0) { REPORT upper = -1; }
+      else { REPORT upper = bw2.Upper() + (gm1->Nrows() - 1) * gm2->Nrows(); }
+   }
+   else
+   {
+      if (bw2.Upper() < 0)
+         { REPORT upper = (1 + bw1.Upper()) * gm2->Nrows() - 1; }
+      else { REPORT upper = bw2.Upper() + bw1.Upper() * gm2->Nrows(); }
+   }
+   return MatrixBandWidth(lower, upper);
+}
+
+MatrixBandWidth MultipliedMatrix::BandWidth() const
+{ REPORT return gm1->BandWidth() * gm2->BandWidth(); }
+
+MatrixBandWidth ConcatenatedMatrix::BandWidth() const { REPORT return -1; }
+
+MatrixBandWidth SolvedMatrix::BandWidth() const
+{
+   if (+gm1->Type() & MatrixType::Diagonal)
+      { REPORT return gm2->BandWidth(); }
+   else { REPORT return -1; }
+}
+
+MatrixBandWidth ScaledMatrix::BandWidth() const
+   { REPORT return gm->BandWidth(); }
+
+MatrixBandWidth NegatedMatrix::BandWidth() const
+   { REPORT return gm->BandWidth(); }
+
+MatrixBandWidth TransposedMatrix::BandWidth() const
+   { REPORT return gm->BandWidth().t(); }
+
+MatrixBandWidth InvertedMatrix::BandWidth() const
+{
+   if (+gm->Type() & MatrixType::Diagonal)
+      { REPORT return MatrixBandWidth(0,0); }
+   else { REPORT return -1; }
+}
+
+MatrixBandWidth RowedMatrix::BandWidth() const { REPORT return -1; }
+MatrixBandWidth ColedMatrix::BandWidth() const { REPORT return -1; }
+MatrixBandWidth DiagedMatrix::BandWidth() const { REPORT return 0; }
+MatrixBandWidth MatedMatrix::BandWidth() const { REPORT return -1; }
+MatrixBandWidth ReturnMatrix::BandWidth() const
+   { REPORT return gm->BandWidth(); }
+
+MatrixBandWidth GetSubMatrix::BandWidth() const
+{
+
+   if (row_skip==col_skip && row_number==col_number)
+      { REPORT return gm->BandWidth(); }
+   else { REPORT return MatrixBandWidth(-1); }
+}
+
+// ********************** the memory managment tools **********************/
+
+//  Rules regarding tDelete, reuse, GetStore, BorrowStore
+//    All matrices processed during expression evaluation must be subject
+//    to exactly one of reuse(), tDelete(), GetStore() or BorrowStore().
+//    If reuse returns true the matrix must be reused.
+//    GetMatrix(gm) always calls gm->GetStore()
+//    gm->Evaluate obeys rules
+//    bm->Evaluate obeys rules for matrices in bm structure
+
+void GeneralMatrix::tDelete()
+{
+   if (tag<0)
+   {
+      if (tag<-1) { REPORT store = 0; delete this; return; }  // borrowed
+      else { REPORT return; }   // not a temporary matrix - leave alone
+   }
+   if (tag==1)
+   {
+      if (store)
+      {
+         REPORT  MONITOR_REAL_DELETE("Free   (tDelete)",storage,store)
+         delete [] store;
+      }
+      MiniCleanUp(); return;                           // CleanUp
+   }
+   if (tag==0) { REPORT delete this; return; }
+
+   REPORT tag--; return;
+}
+
+static void BlockCopy(int n, Real* from, Real* to)
+{
+   REPORT
+   int i = (n >> 3);
+   while (i--)
+   {
+      *to++ = *from++; *to++ = *from++; *to++ = *from++; *to++ = *from++;
+      *to++ = *from++; *to++ = *from++; *to++ = *from++; *to++ = *from++;
+   }
+   i = n & 7; while (i--) *to++ = *from++;
+}
+
+bool GeneralMatrix::reuse()
+{
+   if (tag < -1)                 // borrowed storage
+   {
+      if (storage)
+      {
+         REPORT
+         Real* s = new Real [storage]; MatrixErrorNoSpace(s);
+         MONITOR_REAL_NEW("Make     (reuse)",storage,s)
+         BlockCopy(storage, store, s); store = s;
+      }
+      else { REPORT MiniCleanUp(); }                // CleanUp
+      tag = 0; return true;
+   }
+   if (tag < 0 ) { REPORT return false; }
+   if (tag <= 1 )  { REPORT return true; }
+   REPORT tag--; return false;
+}
+
+Real* GeneralMatrix::GetStore()
+{
+   if (tag<0 || tag>1)
+   {
+      Real* s;
+      if (storage)
+      {
+         s = new Real [storage]; MatrixErrorNoSpace(s);
+         MONITOR_REAL_NEW("Make  (GetStore)",storage,s)
+         BlockCopy(storage, store, s);
+      }
+      else s = 0;
+      if (tag > 1) { REPORT tag--; }
+      else if (tag < -1) { REPORT store = 0; delete this; } // borrowed store
+      else { REPORT }
+      return s;
+   }
+   Real* s = store;                             // CleanUp - done later
+   if (tag==0) { REPORT store = 0; delete this; }
+   else { REPORT  MiniCleanUp(); }
+   return s;
+}
+
+void GeneralMatrix::GetMatrix(const GeneralMatrix* gmx)
+{
+   REPORT  tag=-1; nrows=gmx->Nrows(); ncols=gmx->Ncols();
+   storage=gmx->storage; SetParameters(gmx);
+   store=((GeneralMatrix*)gmx)->GetStore();
+}
+
+GeneralMatrix* GeneralMatrix::BorrowStore(GeneralMatrix* gmx, MatrixType mt)
+// Copy storage of *this to storage of *gmx. Then convert to type mt.
+// If mt == 0 just let *gmx point to storage of *this if tag==-1.
+{
+   if (!mt)
+   {
+      if (tag == -1) { REPORT gmx->tag = -2; gmx->store = store; }
+      else { REPORT gmx->tag = 0; gmx->store = GetStore(); }
+   }
+   else if (Compare(gmx->Type(),mt))
+   { REPORT  gmx->tag = 0; gmx->store = GetStore(); }
+   else
+   {
+      REPORT gmx->tag = -2; gmx->store = store;
+      gmx = gmx->Evaluate(mt); gmx->tag = 0; tDelete();
+   }
+
+   return gmx;
+}
+
+void GeneralMatrix::Eq(const BaseMatrix& X, MatrixType mt)
+// Count number of references to this in X.
+// If zero delete storage in this;
+// otherwise tag this to show when storage can be deleted
+// evaluate X and copy to this
+{
+#ifdef DO_SEARCH
+   int counter=X.search(this);
+   if (counter==0)
+   {
+      REPORT
+      if (store)
+      {
+         MONITOR_REAL_DELETE("Free (operator=)",storage,store)
+         REPORT delete [] store; storage = 0; store = 0;
+      }
+   }
+   else { REPORT Release(counter); }
+   GeneralMatrix* gmx = ((BaseMatrix&)X).Evaluate(mt);
+   if (gmx!=this) { REPORT GetMatrix(gmx); }
+   else { REPORT }
+   Protect();
+#else
+   GeneralMatrix* gmx = ((BaseMatrix&)X).Evaluate(mt);
+   if (gmx!=this)
+   {
+      REPORT
+      if (store)
+      {
+         MONITOR_REAL_DELETE("Free (operator=)",storage,store)
+         REPORT delete [] store; storage = 0; store = 0;
+      }
+      GetMatrix(gmx);
+   }
+   else { REPORT }
+   Protect();
+#endif
+}
+
+// version with no conversion
+void GeneralMatrix::Eq(const GeneralMatrix& X)
+{
+   GeneralMatrix* gmx = (GeneralMatrix*)&X;
+   if (gmx!=this)
+   {
+      REPORT
+      if (store)
+      {
+         MONITOR_REAL_DELETE("Free (operator=)",storage,store)
+         REPORT delete [] store; storage = 0; store = 0;
+      }
+      GetMatrix(gmx);
+   }
+   else { REPORT }
+   Protect();
+}
+
+// version to work with operator<<
+void GeneralMatrix::Eq(const BaseMatrix& X, MatrixType mt, bool ldok)
+{
+   REPORT
+   if (ldok) mt.SetDataLossOK();
+   Eq(X, mt);
+}
+
+void GeneralMatrix::Eq2(const BaseMatrix& X, MatrixType mt)
+// a cut down version of Eq for use with += etc.
+// we know BaseMatrix points to two GeneralMatrix objects,
+// the first being this (may be the same).
+// we know tag has been set correctly in each.
+{
+   GeneralMatrix* gmx = ((BaseMatrix&)X).Evaluate(mt);
+   if (gmx!=this) { REPORT GetMatrix(gmx); }  // simplify GetMatrix ?
+   else { REPORT }
+   Protect();
+}
+
+void GeneralMatrix::Inject(const GeneralMatrix& X)
+// copy stored values of X; otherwise leave els of *this unchanged
+{
+   REPORT
+   Tracer tr("Inject");
+   if (nrows != X.nrows || ncols != X.ncols)
+      Throw(IncompatibleDimensionsException());
+   MatrixRow mr((GeneralMatrix*)&X, LoadOnEntry);
+   MatrixRow mrx(this, LoadOnEntry+StoreOnExit+DirectPart);
+   int i=nrows;
+   while (i--) { mrx.Inject(mr); mrx.Next(); mr.Next(); }
+}
+
+// ************* checking for data loss during conversion *******************/
+
+bool Compare(const MatrixType& source, MatrixType& destination)
+{
+   if (!destination) { destination=source; return true; }
+   if (destination==source) return true;
+   if (!destination.DataLossOK && !(destination>=source))
+      Throw(ProgramException("Illegal Conversion", source, destination));
+   return false;
+}
+
+// ************* Make a copy of a matrix on the heap *********************/
+
+GeneralMatrix* Matrix::Image() const
+{
+   REPORT
+   GeneralMatrix* gm = new Matrix(*this); MatrixErrorNoSpace(gm);
+   return gm;
+}
+
+GeneralMatrix* SquareMatrix::Image() const
+{
+   REPORT
+   GeneralMatrix* gm = new SquareMatrix(*this); MatrixErrorNoSpace(gm);
+   return gm;
+}
+
+GeneralMatrix* SymmetricMatrix::Image() const
+{
+   REPORT
+   GeneralMatrix* gm = new SymmetricMatrix(*this); MatrixErrorNoSpace(gm);
+   return gm;
+}
+
+GeneralMatrix* UpperTriangularMatrix::Image() const
+{
+   REPORT
+   GeneralMatrix* gm = new UpperTriangularMatrix(*this);
+   MatrixErrorNoSpace(gm); return gm;
+}
+
+GeneralMatrix* LowerTriangularMatrix::Image() const
+{
+   REPORT
+   GeneralMatrix* gm = new LowerTriangularMatrix(*this);
+   MatrixErrorNoSpace(gm); return gm;
+}
+
+GeneralMatrix* DiagonalMatrix::Image() const
+{
+   REPORT
+   GeneralMatrix* gm = new DiagonalMatrix(*this); MatrixErrorNoSpace(gm);
+   return gm;
+}
+
+GeneralMatrix* RowVector::Image() const
+{
+   REPORT
+   GeneralMatrix* gm = new RowVector(*this); MatrixErrorNoSpace(gm);
+   return gm;
+}
+
+GeneralMatrix* ColumnVector::Image() const
+{
+   REPORT
+   GeneralMatrix* gm = new ColumnVector(*this); MatrixErrorNoSpace(gm);
+   return gm;
+}
+
+GeneralMatrix* BandMatrix::Image() const
+{
+   REPORT
+   GeneralMatrix* gm = new BandMatrix(*this); MatrixErrorNoSpace(gm);
+   return gm;
+}
+
+GeneralMatrix* UpperBandMatrix::Image() const
+{
+   REPORT
+   GeneralMatrix* gm = new UpperBandMatrix(*this); MatrixErrorNoSpace(gm);
+   return gm;
+}
+
+GeneralMatrix* LowerBandMatrix::Image() const
+{
+   REPORT
+   GeneralMatrix* gm = new LowerBandMatrix(*this); MatrixErrorNoSpace(gm);
+   return gm;
+}
+
+GeneralMatrix* SymmetricBandMatrix::Image() const
+{
+   REPORT
+   GeneralMatrix* gm = new SymmetricBandMatrix(*this); MatrixErrorNoSpace(gm);
+   return gm;
+}
+
+GeneralMatrix* nricMatrix::Image() const
+{
+   REPORT
+   GeneralMatrix* gm = new nricMatrix(*this); MatrixErrorNoSpace(gm);
+   return gm;
+}
+
+GeneralMatrix* IdentityMatrix::Image() const
+{
+   REPORT
+   GeneralMatrix* gm = new IdentityMatrix(*this); MatrixErrorNoSpace(gm);
+   return gm;
+}
+
+GeneralMatrix* GeneralMatrix::Image() const
+{
+  //   bool dummy = true;
+  //   if (dummy)                                   // get rid of warning message
+  Throw(InternalException("Cannot apply Image to this matrix type"));
+  return 0;
+}
+
+
+// *********************** nricMatrix routines *****************************/
+
+void nricMatrix::MakeRowPointer()
+{
+   REPORT
+   if (nrows > 0)
+   {
+      row_pointer = new Real* [nrows]; MatrixErrorNoSpace(row_pointer);
+      Real* s = Store() - 1; int i = nrows; Real** rp = row_pointer;
+      if (i) for (;;) { *rp++ = s; if (!(--i)) break; s+=ncols; }
+   }
+   else row_pointer = 0;
+}
+
+void nricMatrix::DeleteRowPointer()
+   { REPORT if (nrows) delete [] row_pointer; }
+
+void GeneralMatrix::CheckStore() const
+{
+   REPORT
+   if (!store)
+      Throw(ProgramException("NRIC accessing matrix with unset dimensions"));
+}
+
+
+// *************************** CleanUp routines *****************************/
+
+void GeneralMatrix::CleanUp()
+{
+   // set matrix dimensions to zero, delete storage
+   REPORT
+   if (store && storage)
+   {
+      MONITOR_REAL_DELETE("Free (CleanUp)    ",storage,store)
+      REPORT delete [] store;
+   }
+   store=0; storage=0; nrows=0; ncols=0; tag = -1;
+}
+
+void nricMatrix::CleanUp()
+   { REPORT DeleteRowPointer(); GeneralMatrix::CleanUp(); }
+
+void nricMatrix::MiniCleanUp()
+   { REPORT DeleteRowPointer(); GeneralMatrix::MiniCleanUp(); }
+
+void RowVector::CleanUp()
+   { REPORT GeneralMatrix::CleanUp(); nrows=1; }
+
+void ColumnVector::CleanUp()
+   { REPORT GeneralMatrix::CleanUp(); ncols=1; }
+
+void CroutMatrix::CleanUp()
+{
+   REPORT
+   if (nrows) delete [] indx;
+   GeneralMatrix::CleanUp();
+}
+
+void CroutMatrix::MiniCleanUp()
+{
+   REPORT
+   if (nrows) delete [] indx;
+   GeneralMatrix::MiniCleanUp();
+}
+
+void BandLUMatrix::CleanUp()
+{
+   REPORT
+   if (nrows) delete [] indx;
+   if (storage2) delete [] store2;
+   GeneralMatrix::CleanUp();
+}
+
+void BandLUMatrix::MiniCleanUp()
+{
+   REPORT
+   if (nrows) delete [] indx;
+   if (storage2) delete [] store2;
+   GeneralMatrix::MiniCleanUp();
+}
+
+// ************************ simple integer array class ***********************
+
+// construct a new array of length xn. Check that xn is non-negative and
+// that space is available
+
+SimpleIntArray::SimpleIntArray(int xn) : n(xn)
+{
+   if (n < 0) Throw(Logic_error("invalid array length"));
+   else if (n == 0) { REPORT  a = 0; }
+   else { REPORT  a = new int [n]; if (!a) Throw(Bad_alloc()); }
+}
+
+// destroy an array - return its space to memory
+
+SimpleIntArray::~SimpleIntArray() { REPORT  if (a) delete [] a; }
+
+// access an element of an array; return a "reference" so elements
+// can be modified.
+// check index is within range
+// in this array class the index runs from 0 to n-1
+
+int& SimpleIntArray::operator[](int i)
+{
+   REPORT
+   if (i < 0 || i >= n) Throw(Logic_error("array index out of range"));
+   return a[i];
+}
+
+// same thing again but for arrays declared constant so we can't
+// modify its elements
+
+int SimpleIntArray::operator[](int i) const
+{
+   REPORT
+   if (i < 0 || i >= n) Throw(Logic_error("array index out of range"));
+   return a[i];
+}
+
+// set all the elements equal to a given value
+
+void SimpleIntArray::operator=(int ai)
+   { REPORT  for (int i = 0; i < n; i++) a[i] = ai; }
+
+// set the elements equal to those of another array.
+// check the arrays are of the same length
+
+void SimpleIntArray::operator=(const SimpleIntArray& b)
+{
+   REPORT
+   if (b.n != n) Throw(Logic_error("array lengths differ in copy"));
+   for (int i = 0; i < n; i++) a[i] = b.a[i];
+}
+
+// construct a new array equal to an existing array
+// check that space is available
+
+SimpleIntArray::SimpleIntArray(const SimpleIntArray& b) : n(b.n)
+{
+   if (n == 0) { REPORT  a = 0; }
+   else
+   {
+      REPORT
+      a = new int [n]; if (!a) Throw(Bad_alloc());
+      for (int i = 0; i < n; i++) a[i] = b.a[i];
+   }
+}
+
+// change the size of an array; optionally copy data from old array to
+// new array
+
+void SimpleIntArray::ReSize(int n1, bool keep)
+{
+   if (n1 == n) { REPORT  return; }
+   else if (n1 == 0) { REPORT  n = 0; delete [] a; a = 0; }
+   else if (n == 0)
+      { REPORT  a = new int [n1]; if (!a) Throw(Bad_alloc()); n = n1; }
+   else
+   {
+      int* a1 = a;
+      if (keep)
+      {
+         REPORT
+         a = new int [n1]; if (!a) Throw(Bad_alloc());
+         if (n > n1) n = n1;
+         for (int i = 0; i < n; i++) a[i] = a1[i];
+         n = n1; delete [] a1;
+      }
+      else
+      {
+         REPORT  n = n1; delete [] a1;
+         a = new int [n]; if (!a) Throw(Bad_alloc());
+      }
+   }
+}
+
+
+#ifdef use_namespace
+}
+#endif
+
diff --git a/ossim/src/ossim/matrix/newmat5.cpp b/ossim/src/ossim/matrix/newmat5.cpp
new file mode 100644
index 0000000..347e4c4
--- /dev/null
+++ b/ossim/src/ossim/matrix/newmat5.cpp
@@ -0,0 +1,485 @@
+//$$ newmat5.cpp         Transpose, evaluate etc
+
+// Copyright (C) 1991,2,3,4: R B Davies
+
+//#define WANT_STREAM
+
+#include <ossim/matrix/include.h>
+
+#include <ossim/matrix/newmat.h>
+#include <ossim/matrix/newmatrc.h>
+
+#ifdef use_namespace
+namespace NEWMAT {
+#endif
+
+
+#ifdef DO_REPORT
+#define REPORT { static ExeCounter ExeCount(__LINE__,5); ++ExeCount; }
+#else
+#define REPORT {}
+#endif
+
+
+/************************ carry out operations ******************************/
+
+
+GeneralMatrix* GeneralMatrix::Transpose(TransposedMatrix* tm, MatrixType mt)
+{
+   GeneralMatrix* gm1;
+
+   if (Compare(Type().t(),mt))
+   {
+      REPORT
+      gm1 = mt.New(ncols,nrows,tm);
+      for (int i=0; i<ncols; i++)
+      {
+         MatrixRow mr(gm1, StoreOnExit+DirectPart, i);
+         MatrixCol mc(this, mr.Data(), LoadOnEntry, i);
+      }
+   }
+   else
+   {
+      REPORT
+      gm1 = mt.New(ncols,nrows,tm);
+      MatrixRow mr(this, LoadOnEntry);
+      MatrixCol mc(gm1, StoreOnExit+DirectPart);
+      int i = nrows;
+      while (i--) { mc.Copy(mr); mr.Next(); mc.Next(); }
+   }
+   tDelete(); gm1->ReleaseAndDelete(); return gm1;
+}
+
+GeneralMatrix* SymmetricMatrix::Transpose(TransposedMatrix*, MatrixType mt)
+{ REPORT  return Evaluate(mt); }
+
+
+GeneralMatrix* DiagonalMatrix::Transpose(TransposedMatrix*, MatrixType mt)
+{ REPORT return Evaluate(mt); }
+
+GeneralMatrix* ColumnVector::Transpose(TransposedMatrix*, MatrixType mt)
+{
+   REPORT
+   GeneralMatrix* gmx = new RowVector; MatrixErrorNoSpace(gmx);
+   gmx->nrows = 1; gmx->ncols = gmx->storage = storage;
+   return BorrowStore(gmx,mt);
+}
+
+GeneralMatrix* RowVector::Transpose(TransposedMatrix*, MatrixType mt)
+{
+   REPORT
+   GeneralMatrix* gmx = new ColumnVector; MatrixErrorNoSpace(gmx);
+   gmx->ncols = 1; gmx->nrows = gmx->storage = storage;
+   return BorrowStore(gmx,mt);
+}
+
+GeneralMatrix* IdentityMatrix::Transpose(TransposedMatrix*, MatrixType mt)
+{ REPORT return Evaluate(mt); }
+
+GeneralMatrix* GeneralMatrix::Evaluate(MatrixType mt)
+{
+   if (Compare(this->Type(),mt)) { REPORT return this; }
+   REPORT
+   GeneralMatrix* gmx = mt.New(nrows,ncols,this);
+   MatrixRow mr(this, LoadOnEntry);
+   MatrixRow mrx(gmx, StoreOnExit+DirectPart);
+   int i=nrows;
+   while (i--) { mrx.Copy(mr); mrx.Next(); mr.Next(); }
+   tDelete(); gmx->ReleaseAndDelete(); return gmx;
+}
+
+GeneralMatrix* GenericMatrix::Evaluate(MatrixType mt)
+   { REPORT  return gm->Evaluate(mt); }
+
+GeneralMatrix* ShiftedMatrix::Evaluate(MatrixType mt)
+{
+   gm=((BaseMatrix*&)bm)->Evaluate();
+   int nr=gm->Nrows(); int nc=gm->Ncols();
+   Compare(gm->Type().AddEqualEl(),mt);
+   if (!(mt==gm->Type()))
+   {
+      REPORT
+      GeneralMatrix* gmx = mt.New(nr,nc,this);
+      MatrixRow mr(gm, LoadOnEntry);
+      MatrixRow mrx(gmx, StoreOnExit+DirectPart);
+      while (nr--) { mrx.Add(mr,f); mrx.Next(); mr.Next(); }
+      gmx->ReleaseAndDelete(); gm->tDelete();
+      return gmx;
+   }
+   else if (gm->reuse())
+   {
+      REPORT gm->Add(f);
+      return gm;
+   }
+   else
+   {
+      REPORT GeneralMatrix* gmy = gm->Type().New(nr,nc,this);
+      gmy->ReleaseAndDelete(); gmy->Add(gm,f);
+      return gmy;
+   }
+}
+
+GeneralMatrix* NegShiftedMatrix::Evaluate(MatrixType mt)
+{
+   gm=((BaseMatrix*&)bm)->Evaluate();
+   int nr=gm->Nrows(); int nc=gm->Ncols();
+   Compare(gm->Type().AddEqualEl(),mt);
+   if (!(mt==gm->Type()))
+   {
+      REPORT
+      GeneralMatrix* gmx = mt.New(nr,nc,this);
+      MatrixRow mr(gm, LoadOnEntry);
+      MatrixRow mrx(gmx, StoreOnExit+DirectPart);
+      while (nr--) { mrx.NegAdd(mr,f); mrx.Next(); mr.Next(); }
+      gmx->ReleaseAndDelete(); gm->tDelete();
+      return gmx;
+   }
+   else if (gm->reuse())
+   {
+      REPORT gm->NegAdd(f);
+      return gm;
+   }
+   else
+   {
+      REPORT GeneralMatrix* gmy = gm->Type().New(nr,nc,this);
+      gmy->ReleaseAndDelete(); gmy->NegAdd(gm,f);
+      return gmy;
+   }
+}
+
+GeneralMatrix* ScaledMatrix::Evaluate(MatrixType mt)
+{
+   gm=((BaseMatrix*&)bm)->Evaluate();
+   int nr=gm->Nrows(); int nc=gm->Ncols();
+   if (Compare(gm->Type(),mt))
+   {
+      if (gm->reuse())
+      {
+         REPORT gm->Multiply(f);
+         return gm;
+      }
+      else
+      {
+         REPORT GeneralMatrix* gmx = gm->Type().New(nr,nc,this);
+         gmx->ReleaseAndDelete(); gmx->Multiply(gm,f);
+         return gmx;
+      }
+   }
+   else
+   {
+      REPORT
+      GeneralMatrix* gmx = mt.New(nr,nc,this);
+      MatrixRow mr(gm, LoadOnEntry);
+      MatrixRow mrx(gmx, StoreOnExit+DirectPart);
+      while (nr--) { mrx.Multiply(mr,f); mrx.Next(); mr.Next(); }
+      gmx->ReleaseAndDelete(); gm->tDelete();
+      return gmx;
+   }
+}
+
+GeneralMatrix* NegatedMatrix::Evaluate(MatrixType mt)
+{
+   gm=((BaseMatrix*&)bm)->Evaluate();
+   int nr=gm->Nrows(); int nc=gm->Ncols();
+   if (Compare(gm->Type(),mt))
+   {
+      if (gm->reuse())
+      {
+         REPORT gm->Negate();
+         return gm;
+      }
+      else
+      {
+         REPORT
+         GeneralMatrix* gmx = gm->Type().New(nr,nc,this);
+         gmx->ReleaseAndDelete(); gmx->Negate(gm);
+         return gmx;
+      }
+   }
+   else
+   {
+      REPORT
+      GeneralMatrix* gmx = mt.New(nr,nc,this);
+      MatrixRow mr(gm, LoadOnEntry);
+      MatrixRow mrx(gmx, StoreOnExit+DirectPart);
+      while (nr--) { mrx.Negate(mr); mrx.Next(); mr.Next(); }
+      gmx->ReleaseAndDelete(); gm->tDelete();
+      return gmx;
+   }
+}
+
+GeneralMatrix* ReversedMatrix::Evaluate(MatrixType mt)
+{
+   gm=((BaseMatrix*&)bm)->Evaluate(); GeneralMatrix* gmx;
+
+   if ((gm->Type()).IsBand() && ! (gm->Type()).IsDiagonal())
+   {
+      gm->tDelete();
+      Throw(NotDefinedException("Reverse", "band matrices"));
+   }
+
+   if (gm->reuse()) { REPORT gm->ReverseElements(); gmx = gm; }
+   else
+   {
+      REPORT
+      gmx = gm->Type().New(gm->Nrows(), gm->Ncols(), this);
+      gmx->ReverseElements(gm); gmx->ReleaseAndDelete();
+   }
+   return gmx->Evaluate(mt); // target matrix is different type?
+
+}
+
+GeneralMatrix* TransposedMatrix::Evaluate(MatrixType mt)
+{
+   REPORT
+   gm=((BaseMatrix*&)bm)->Evaluate();
+   Compare(gm->Type().t(),mt);
+   GeneralMatrix* gmx=gm->Transpose(this, mt);
+   return gmx;
+}
+
+GeneralMatrix* RowedMatrix::Evaluate(MatrixType mt)
+{
+   gm = ((BaseMatrix*&)bm)->Evaluate();
+   GeneralMatrix* gmx = new RowVector; MatrixErrorNoSpace(gmx);
+   gmx->nrows = 1; gmx->ncols = gmx->storage = gm->storage;
+   return gm->BorrowStore(gmx,mt);
+}
+
+GeneralMatrix* ColedMatrix::Evaluate(MatrixType mt)
+{
+   gm = ((BaseMatrix*&)bm)->Evaluate();
+   GeneralMatrix* gmx = new ColumnVector; MatrixErrorNoSpace(gmx);
+   gmx->ncols = 1; gmx->nrows = gmx->storage = gm->storage;
+   return gm->BorrowStore(gmx,mt);
+}
+
+GeneralMatrix* DiagedMatrix::Evaluate(MatrixType mt)
+{
+   gm = ((BaseMatrix*&)bm)->Evaluate();
+   GeneralMatrix* gmx = new DiagonalMatrix; MatrixErrorNoSpace(gmx);
+   gmx->nrows = gmx->ncols = gmx->storage = gm->storage;
+   return gm->BorrowStore(gmx,mt);
+}
+
+GeneralMatrix* MatedMatrix::Evaluate(MatrixType mt)
+{
+   Tracer tr("MatedMatrix::Evaluate");
+   gm = ((BaseMatrix*&)bm)->Evaluate();
+   GeneralMatrix* gmx = new Matrix; MatrixErrorNoSpace(gmx);
+   gmx->nrows = nr; gmx->ncols = nc; gmx->storage = gm->storage;
+   if (nr*nc != gmx->storage)
+      Throw(IncompatibleDimensionsException());
+   return gm->BorrowStore(gmx,mt);
+}
+
+GeneralMatrix* GetSubMatrix::Evaluate(MatrixType mt)
+{
+   REPORT
+   Tracer tr("SubMatrix(evaluate)");
+   gm = ((BaseMatrix*&)bm)->Evaluate();
+   if (row_number < 0) row_number = gm->Nrows();
+   if (col_number < 0) col_number = gm->Ncols();
+   if (row_skip+row_number > gm->Nrows() || col_skip+col_number > gm->Ncols())
+   {
+      gm->tDelete();
+      Throw(SubMatrixDimensionException());
+   }
+   if (IsSym) Compare(gm->Type().ssub(), mt);
+   else Compare(gm->Type().sub(), mt);
+   GeneralMatrix* gmx = mt.New(row_number, col_number, this);
+   int i = row_number;
+   MatrixRow mr(gm, LoadOnEntry, row_skip); 
+   MatrixRow mrx(gmx, StoreOnExit+DirectPart);
+   MatrixRowCol sub;
+   while (i--)
+   {
+      mr.SubRowCol(sub, col_skip, col_number);   // put values in sub
+      mrx.Copy(sub); mrx.Next(); mr.Next();
+   }
+   gmx->ReleaseAndDelete(); gm->tDelete();
+   return gmx;
+}
+
+
+GeneralMatrix* ReturnMatrix::Evaluate(MatrixType mt)
+{
+   return gm->Evaluate(mt);
+}
+
+
+void GeneralMatrix::Add(GeneralMatrix* gm1, Real f)
+{
+   REPORT
+   Real* s1=gm1->store; Real* s=store; int i=(storage >> 2);
+   while (i--)
+   { *s++ = *s1++ + f; *s++ = *s1++ + f; *s++ = *s1++ + f; *s++ = *s1++ + f; }
+   i = storage & 3; while (i--) *s++ = *s1++ + f;
+}
+   
+void GeneralMatrix::Add(Real f)
+{
+   REPORT
+   Real* s=store; int i=(storage >> 2);
+   while (i--) { *s++ += f; *s++ += f; *s++ += f; *s++ += f; }
+   i = storage & 3; while (i--) *s++ += f;
+}
+   
+void GeneralMatrix::NegAdd(GeneralMatrix* gm1, Real f)
+{
+   REPORT
+   Real* s1=gm1->store; Real* s=store; int i=(storage >> 2);
+   while (i--)
+   { *s++ = f - *s1++; *s++ = f - *s1++; *s++ = f - *s1++; *s++ = f - *s1++; }
+   i = storage & 3; while (i--) *s++ = f - *s1++;
+}
+   
+void GeneralMatrix::NegAdd(Real f)
+{
+   REPORT
+   Real* s=store; int i=(storage >> 2);
+   while (i--)
+   {
+      *s = f - *s; s++; *s = f - *s; s++;
+      *s = f - *s; s++; *s = f - *s; s++;
+   }
+   i = storage & 3; while (i--)  { *s = f - *s; s++; }
+}
+   
+void GeneralMatrix::Negate(GeneralMatrix* gm1)
+{
+   // change sign of elements
+   REPORT
+   Real* s1=gm1->store; Real* s=store; int i=(storage >> 2);
+   while (i--)
+   { *s++ = -(*s1++); *s++ = -(*s1++); *s++ = -(*s1++); *s++ = -(*s1++); }
+   i = storage & 3; while(i--) *s++ = -(*s1++);
+}
+   
+void GeneralMatrix::Negate()
+{
+   REPORT
+   Real* s=store; int i=(storage >> 2);
+   while (i--)
+   { *s = -(*s); s++; *s = -(*s); s++; *s = -(*s); s++; *s = -(*s); s++; }
+   i = storage & 3; while(i--) { *s = -(*s); s++; }
+}
+   
+void GeneralMatrix::Multiply(GeneralMatrix* gm1, Real f)
+{
+   REPORT
+   Real* s1=gm1->store; Real* s=store;  int i=(storage >> 2);
+   while (i--)
+   { *s++ = *s1++ * f; *s++ = *s1++ * f; *s++ = *s1++ * f; *s++ = *s1++ * f; }
+   i = storage & 3; while (i--) *s++ = *s1++ * f;
+}
+   
+void GeneralMatrix::Multiply(Real f)
+{
+   REPORT
+   Real* s=store; int i=(storage >> 2);
+   while (i--) { *s++ *= f; *s++ *= f; *s++ *= f; *s++ *= f; }
+   i = storage & 3; while (i--) *s++ *= f;
+}
+   
+
+/************************ MatrixInput routines ****************************/
+
+// int MatrixInput::n;          // number values still to be read
+// Real* MatrixInput::r;        // pointer to next location to be read to
+
+MatrixInput MatrixInput::operator<<(Real f)
+{
+   REPORT
+   Tracer et("MatrixInput");
+   if (n<=0) Throw(ProgramException("List of values too long"));
+   *r = f; int n1 = n-1; n=0;   // n=0 so we won't trigger exception
+   return MatrixInput(n1, r+1);
+}
+
+
+MatrixInput GeneralMatrix::operator<<(Real f)
+{
+   REPORT
+   Tracer et("MatrixInput");
+   int n = Storage();
+   if (n<=0) Throw(ProgramException("Loading data to zero length matrix"));
+   Real* r; r = Store(); *r = f; n--;
+   return MatrixInput(n, r+1);
+}
+
+MatrixInput GetSubMatrix::operator<<(Real f)
+{
+   REPORT
+   Tracer et("MatrixInput (GetSubMatrix)");
+   SetUpLHS();
+   if (row_number != 1 || col_skip != 0 || col_number != gm->Ncols())
+   {
+      Throw(ProgramException("MatrixInput requires complete rows"));
+   }
+   MatrixRow mr(gm, DirectPart, row_skip);  // to pick up location and length
+   int n = mr.Storage();
+   if (n<=0)
+   {
+      Throw(ProgramException("Loading data to zero length row"));
+   }
+   Real* r; r = mr.Data(); *r = f; n--;
+   if (+(mr.cw*HaveStore))
+   {
+      Throw(ProgramException("Fails with this matrix type"));
+   }
+   return MatrixInput(n, r+1);
+}
+
+MatrixInput::~MatrixInput()
+{
+   REPORT
+   Tracer et("MatrixInput");
+   if (n!=0) Throw(ProgramException("A list of values was too short"));
+}
+
+MatrixInput BandMatrix::operator<<(Real)
+{
+   Tracer et("MatrixInput");
+   //   bool dummy = true;
+   //   if (dummy)                                   // get rid of warning message
+   Throw(ProgramException("Cannot use list read with a BandMatrix"));
+   return MatrixInput(0, 0);
+}
+
+void BandMatrix::operator<<(const Real*)
+{ Throw(ProgramException("Cannot use array read with a BandMatrix")); }
+
+void BandMatrix::operator<<(const int*)
+{ Throw(ProgramException("Cannot use array read with a BandMatrix")); }
+
+void SymmetricBandMatrix::operator<<(const Real*)
+{ Throw(ProgramException("Cannot use array read with a BandMatrix")); }
+
+void SymmetricBandMatrix::operator<<(const int*)
+{ Throw(ProgramException("Cannot use array read with a BandMatrix")); }
+
+// ************************* Reverse order of elements ***********************
+
+void GeneralMatrix::ReverseElements(GeneralMatrix* gm)
+{
+   // reversing into a new matrix
+   REPORT
+   int n = Storage(); Real* rx = Store() + n; Real* x = gm->Store();
+   while (n--) *(--rx) = *(x++);
+}
+
+void GeneralMatrix::ReverseElements()
+{
+   // reversing in place
+   REPORT
+   int n = Storage(); Real* x = Store(); Real* rx = x + n;
+   n /= 2;
+   while (n--) { Real t = *(--rx); *rx = *x; *(x++) = t; }
+}
+
+
+#ifdef use_namespace
+}
+#endif
+
diff --git a/src/ossim/matrix/newmat6.cpp b/ossim/src/ossim/matrix/newmat6.cpp
similarity index 100%
rename from src/ossim/matrix/newmat6.cpp
rename to ossim/src/ossim/matrix/newmat6.cpp
diff --git a/src/ossim/matrix/newmat7.cpp b/ossim/src/ossim/matrix/newmat7.cpp
similarity index 100%
rename from src/ossim/matrix/newmat7.cpp
rename to ossim/src/ossim/matrix/newmat7.cpp
diff --git a/src/ossim/matrix/newmat8.cpp b/ossim/src/ossim/matrix/newmat8.cpp
similarity index 100%
rename from src/ossim/matrix/newmat8.cpp
rename to ossim/src/ossim/matrix/newmat8.cpp
diff --git a/src/ossim/matrix/newmat9.cpp b/ossim/src/ossim/matrix/newmat9.cpp
similarity index 100%
rename from src/ossim/matrix/newmat9.cpp
rename to ossim/src/ossim/matrix/newmat9.cpp
diff --git a/src/ossim/matrix/newmatex.cpp b/ossim/src/ossim/matrix/newmatex.cpp
similarity index 100%
rename from src/ossim/matrix/newmatex.cpp
rename to ossim/src/ossim/matrix/newmatex.cpp
diff --git a/src/ossim/matrix/newmatnl.cpp b/ossim/src/ossim/matrix/newmatnl.cpp
similarity index 100%
rename from src/ossim/matrix/newmatnl.cpp
rename to ossim/src/ossim/matrix/newmatnl.cpp
diff --git a/src/ossim/matrix/newmatrm.cpp b/ossim/src/ossim/matrix/newmatrm.cpp
similarity index 100%
rename from src/ossim/matrix/newmatrm.cpp
rename to ossim/src/ossim/matrix/newmatrm.cpp
diff --git a/src/ossim/matrix/nl_ex.txt b/ossim/src/ossim/matrix/nl_ex.txt
similarity index 100%
rename from src/ossim/matrix/nl_ex.txt
rename to ossim/src/ossim/matrix/nl_ex.txt
diff --git a/src/ossim/matrix/sl_ex.txt b/ossim/src/ossim/matrix/sl_ex.txt
similarity index 100%
rename from src/ossim/matrix/sl_ex.txt
rename to ossim/src/ossim/matrix/sl_ex.txt
diff --git a/src/ossim/matrix/solution.cpp b/ossim/src/ossim/matrix/solution.cpp
similarity index 100%
rename from src/ossim/matrix/solution.cpp
rename to ossim/src/ossim/matrix/solution.cpp
diff --git a/src/ossim/matrix/sort.cpp b/ossim/src/ossim/matrix/sort.cpp
similarity index 100%
rename from src/ossim/matrix/sort.cpp
rename to ossim/src/ossim/matrix/sort.cpp
diff --git a/src/ossim/matrix/submat.cpp b/ossim/src/ossim/matrix/submat.cpp
similarity index 100%
rename from src/ossim/matrix/submat.cpp
rename to ossim/src/ossim/matrix/submat.cpp
diff --git a/src/ossim/matrix/svd.cpp b/ossim/src/ossim/matrix/svd.cpp
similarity index 100%
rename from src/ossim/matrix/svd.cpp
rename to ossim/src/ossim/matrix/svd.cpp
diff --git a/src/ossim/matrix/test_exc.txt b/ossim/src/ossim/matrix/test_exc.txt
similarity index 100%
rename from src/ossim/matrix/test_exc.txt
rename to ossim/src/ossim/matrix/test_exc.txt
diff --git a/src/ossim/matrix/watco_nt.mak b/ossim/src/ossim/matrix/watco_nt.mak
similarity index 100%
rename from src/ossim/matrix/watco_nt.mak
rename to ossim/src/ossim/matrix/watco_nt.mak
diff --git a/src/ossim/matrix/watcom.mak b/ossim/src/ossim/matrix/watcom.mak
similarity index 100%
rename from src/ossim/matrix/watcom.mak
rename to ossim/src/ossim/matrix/watcom.mak
diff --git a/src/ossim/ossimConfig.h.in b/ossim/src/ossim/ossimConfig.h.in
similarity index 100%
rename from src/ossim/ossimConfig.h.in
rename to ossim/src/ossim/ossimConfig.h.in
diff --git a/ossim/src/ossim/ossimVersion.h.in b/ossim/src/ossim/ossimVersion.h.in
new file mode 100644
index 0000000..48eef8c
--- /dev/null
+++ b/ossim/src/ossim/ossimVersion.h.in
@@ -0,0 +1,14 @@
+#ifndef ossimVersion_HEADER
+#define ossimVersion_HEADER 1
+
+#define OSSIM_VERSION @OSSIM_VERSION_NUMBER@
+#define OSSIM_MAJOR_VERSION_NUMBER @OSSIM_MAJOR_VERSION_NUMBER@
+#define OSSIM_MINOR_VERSION_NUMBER @OSSIM_MINOR_VERSION_NUMBER@
+#define OSSIM_PATCH_VERSION_NUMBER @OSSIM_PATCH_VERSION_NUMBER@  
+#define OSSIM_RELEASE_NUMBER @OSSIM_RELEASE_NUMBER@  
+#define OSSIM_REVISION_NUMBER @OSSIM_REVISION_NUMBER@  
+
+// date format = (yyyymmdd)
+#define OSSIM_BUILD_DATE @OSSIM_BUILD_DATE@
+
+#endif /* End of #ifndef ossimVersion_HEADER */
diff --git a/src/ossim/parallel/makefile.vc b/ossim/src/ossim/parallel/makefile.vc
similarity index 100%
rename from src/ossim/parallel/makefile.vc
rename to ossim/src/ossim/parallel/makefile.vc
diff --git a/ossim/src/ossim/parallel/ossimIgen.cpp b/ossim/src/ossim/parallel/ossimIgen.cpp
new file mode 100644
index 0000000..b516372
--- /dev/null
+++ b/ossim/src/ossim/parallel/ossimIgen.cpp
@@ -0,0 +1,743 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+// 
+// Description: implementation for image generator
+//
+//*************************************************************************
+// $Id: ossimIgen.cpp 22299 2013-07-02 19:28:28Z dburken $
+
+#include <ossim/ossimConfig.h> /* To pick up define OSSIM_HAS_MPI. */
+
+#if OSSIM_HAS_MPI
+#  include <mpi.h>
+#  include <ossim/parallel/ossimImageMpiMWriterSequenceConnection.h>
+#  include <ossim/parallel/ossimImageMpiSWriterSequenceConnection.h>
+#endif
+
+#include <ossim/parallel/ossimIgen.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimVisitor.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/imaging/ossimImageChain.h>
+#include <ossim/imaging/ossimRectangleCutFilter.h>
+#include <ossim/imaging/ossimGeoPolyCutter.h>
+#include <ossim/imaging/ossimTiffWriter.h>
+#include <ossim/imaging/ossimTilingRect.h>
+#include <ossim/imaging/ossimTilingPoly.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/parallel/ossimMpi.h>
+#include <ossim/parallel/ossimMultiThreadSequencer.h>
+#include <ossim/parallel/ossimMtDebug.h> //### For debug/performance eval
+#include <iterator>
+#include <sstream>
+
+static ossimTrace traceDebug(ossimString("ossimIgen:debug"));
+static ossimTrace traceLog(ossimString("ossimIgen:log"));
+
+ossimIgen::ossimIgen()
+:
+theContainer(new ossimConnectableContainer()),
+theProductProjection(0),
+theProductChain(0),
+theTiling(new ossimTiling),
+theOutputRect(),
+theBuildThumbnailFlag(false),
+theThumbnailSize(0, 0),
+theNumberOfTilesToBuffer(2),
+theKwl(),
+theTilingEnabled(false),
+theProgressFlag(true),
+theStdoutFlag(false),
+theThreadCount(9999) // Default no threading
+{
+   theOutputRect.makeNan();
+}
+
+ossimIgen::~ossimIgen()
+{
+   theProductProjection = 0;
+   theTiling = 0;
+   theContainer->disconnect();
+   theContainer->deleteAllChildren();
+   theContainer = 0;
+}
+
+void ossimIgen::initializeAttributes()
+{
+   theBuildThumbnailFlag  = false;
+   theThumbnailSize = ossimIpt(0,0);
+   theTilingEnabled = false;
+
+   if(ossimMpi::instance()->getRank() != 0)
+   {
+      ossimPreferences::instance()->addPreferences(theKwl,
+         "preferences.",
+         true);
+   }
+
+   const char* lookup = theKwl.find("igen.output_progress");
+   if (lookup)
+   {
+      ossimString os = lookup;
+      theProgressFlag = os.toBool();
+   }
+
+   const char* thumbnailStr = theKwl.find("igen.thumbnail");
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "Thumbnail string = " << ossimString(thumbnailStr) << std::endl;
+   }
+   if(thumbnailStr)
+   {
+      theBuildThumbnailFlag= ossimString(thumbnailStr).toBool();
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "Generate thumbnail attribute is set to "
+            << theBuildThumbnailFlag << std::endl;
+      }
+      if(theBuildThumbnailFlag)
+      {
+         const char* resStr = theKwl.find("igen.thumbnail_res");
+         if(resStr)
+         {
+            theThumbnailSize = ossimIpt(0,0);
+            std::istringstream in(resStr);
+            ossimString x,y;
+
+            in >> x >> y;
+
+            ossim_int32 ix = x.toInt32();
+            ossim_int32 iy = y.toInt32();
+
+            if (ix > 0)
+            {
+               theThumbnailSize.x = ix;
+            }
+            else
+            {
+               theThumbnailSize.x = 128;
+            }
+
+            if (iy > 0)
+            {
+               theThumbnailSize.y = iy;
+            }
+            else
+            {
+               theThumbnailSize.y = theThumbnailSize.x;
+            }
+         }
+         else
+         {
+            theThumbnailSize = ossimIpt(128, 128);
+         }
+      }
+   }
+   const char* numberOfSlaveTileBuffersStr = theKwl.find("igen.slave_tile_buffers");
+   if(numberOfSlaveTileBuffersStr)
+   {
+      theNumberOfTilesToBuffer = ossimString(numberOfSlaveTileBuffersStr).toLong();
+   }
+
+   const char* tilingKw = theKwl.find("igen.tiling.type");
+   if(tilingKw)
+   {
+      theTilingEnabled = true;
+      if(!theTiling->loadState(theKwl, "igen.tiling."))
+      {
+         theTilingEnabled = false;
+      }
+   }
+}
+
+void ossimIgen::slaveSetup()
+{
+#if OSSIM_HAS_MPI
+   int stringSize;
+   MPI_Status status;
+   int numberOfTimes = 0;
+
+   memset((void *)&status, 0, sizeof(MPI_Status));
+
+
+   // we first need to receive the size of the keyword list to load
+   MPI_Recv(&stringSize,
+      1,
+      MPI_INT,
+      0,    // source
+      0,    // tag
+      MPI_COMM_WORLD,
+      &status);
+
+   if(status.MPI_ERROR != MPI_SUCCESS)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "SLAVE = "
+         << ossimMpi::instance()->getRank()
+         << "Had errors receiving!!!!" << std::endl;
+      return;
+   }
+
+   char* buf = new char[stringSize+1];
+
+   numberOfTimes = 0;
+
+   memset((void *)&status, 0, sizeof(MPI_Status));
+
+   // now lets get the keywordlist as a string so we can load it up
+   MPI_Recv(buf,
+      stringSize,
+      MPI_CHAR,
+      0, // source
+      0, // tag
+      MPI_COMM_WORLD,
+      &status);
+
+   if(status.MPI_ERROR != MPI_SUCCESS)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "SLAVE = " << ossimMpi::instance()->getRank()
+         << "Had errors receiving in ossimIgen::slaveCreate(!!!!"
+         << std::endl;
+      return;
+   }
+   buf[stringSize] = '\0';
+
+   if(status.MPI_ERROR != MPI_SUCCESS)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "SLAVE = " << ossimMpi::instance()->getRank()
+         << "Had errors receiving!!!!" << std::endl;
+      return;
+   }
+
+   // now lets convert the received keywordlist into an actual
+   // ossimKeywordlist by using the parsStream method.
+   std::ostringstream kwlStream;
+
+   kwlStream << buf << ends;
+
+   istringstream kwlInStream(kwlStream.str());
+   theKwl.clear();
+   theKwl.parseStream(kwlInStream);
+   initializeAttributes();
+   delete [] buf;
+   buf = 0;
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "****************** KWL ************************" << std::endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << theKwl << std::endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "**************** END KWL ************************" << std::endl;
+
+   }
+   loadProductSpec();
+#endif
+}
+
+void ossimIgen::initialize(const ossimKeywordlist& kwl)
+{
+#if OSSIM_HAS_MPI
+   if(ossimMpi::instance()->getNumberOfProcessors() > 0)
+   {
+      if(ossimMpi::instance()->getRank() != 0)
+      {
+         slaveSetup();
+         return;
+      }
+   }
+#endif
+   theKwl = kwl;
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "The igen kewyord list  ==== \n" << theKwl << std::endl;
+   }
+   ossimKeywordlist kwlPrefs = ossimPreferences::instance()->preferencesKWL();
+
+   kwlPrefs.addPrefixToAll("preferences.");
+   theKwl.add(kwlPrefs);
+
+   initializeAttributes();
+
+   // now stream it to all slave processors
+   //
+#if OSSIM_HAS_MPI
+   if(ossimMpi::instance()->getNumberOfProcessors() > 0)
+   {
+      std::ostringstream outputKeywordlist;
+
+      theKwl.writeToStream(outputKeywordlist);
+      ossimString kwlString = outputKeywordlist.str();
+      ossim_uint32 size = kwlString.size();
+
+      for(long processor = 1;
+         processor < ossimMpi::instance()->getNumberOfProcessors();
+         ++processor)
+      {
+         // let's send the keywordlist argument.
+         // This is two steps.  We send a message to
+         // indicate the size and then we send the
+         // string.
+         //
+         MPI_Send(&size,
+            1,
+            MPI_INT,
+            processor,
+            0,
+            MPI_COMM_WORLD);
+
+         MPI_Send((void*)kwlString.c_str(),
+            size,
+            MPI_CHAR,
+            processor,
+            0,
+            MPI_COMM_WORLD);
+      }
+   }
+#endif
+   loadProductSpec();
+
+}
+
+bool ossimIgen::loadProductSpec()
+{
+   const char* MODULE = "ossimIgen::loadProductSpec";
+   if(traceDebug())  CLOG << "entered..." << std::endl;
+
+   // Clear out the overall container and initialize it with spec in KWL:
+   theContainer->deleteAllChildren();
+   theContainer->loadState(theKwl);
+
+   // There should be a product chain defined in the container:
+   // ossimConnectableObject* obj = 
+   //   theContainer->findFirstObjectOfType(STATIC_TYPE_NAME(ossimImageChain), false);
+   // theProductChain = PTR_CAST(ossimImageChain, obj);
+
+   ossimTypeNameVisitor visitor( ossimString("ossimImageChain"),
+                                 true, // firstofTypeFlag
+                                 (ossimVisitor::VISIT_INPUTS |
+                                  ossimVisitor::VISIT_CHILDREN) );
+   theContainer->accept( visitor );
+   theProductChain = visitor.getObjectAs<ossimImageChain>(0);
+   
+   if (!theProductChain.valid())
+   {
+      // Search for a connectable container specified that contains the entire product chain:
+      // ossimConnectableObject* obj2 = 
+      //    theContainer->findFirstObjectOfType(STATIC_TYPE_NAME(ossimImageFileWriter), true);
+      // ossimImageFileWriter* writer = PTR_CAST(ossimImageFileWriter, obj2);
+      visitor.reset();
+      visitor.setTypeName( ossimString( "ossimImageFileWriter" ) );
+      theContainer->accept( visitor );
+      ossimRefPtr<ossimImageFileWriter> writer = visitor.getObjectAs<ossimImageFileWriter>(0);
+      if ( writer.valid() )
+      {
+         theProductChain = dynamic_cast<ossimImageChain*>( writer->getInput() );
+      }
+
+      if (!theProductChain.valid())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL) << MODULE 
+            << " -- No processing chain defined for generating product." << std::endl;
+         return false; 
+      }
+   }
+
+   // The output projection is specified separately in the KWL:
+   ossimString prefix = "product.projection.";
+   theProductProjection = dynamic_cast<ossimMapProjection*>( 
+      ossimProjectionFactoryRegistry::instance()->createProjection(theKwl, prefix) );
+
+   const char* lookup = theKwl.find("igen.write_to_stdout");
+   if (lookup && ossimString(lookup).toBool())
+   {
+      theStdoutFlag = true;
+   }
+
+   return true;
+}
+
+//*************************************************************************************************
+//! Writes the output product image. Throws an ossimException if error encountered.
+//*************************************************************************************************
+void ossimIgen::outputProduct()
+{
+   // Verify that all vitals have been initialized:
+   if (!theProductChain.valid())
+   {
+      std::string err = "ossimIgen::outputProduct() ERROR:  No product processing chain has yet"
+         " been established. Nothing to output!";
+      throw(ossimException(err));
+   }
+   if (!theProductProjection.valid())
+   {
+      std::string err = "ossimIgen::outputProduct() ERROR:  No product projection has yet"
+         " been established. Nothing to output!";
+      throw(ossimException(err));
+   }
+
+   // Update the chain with the product view specified:
+   setView();
+   initializeChain();
+
+   // if it's a thumbnail then adjust the GSD and reset the view proj to the chain.
+   if(theBuildThumbnailFlag)
+      initThumbnailProjection();
+
+   ossimRefPtr<ossimImageSourceSequencer> sequencer = 0;
+
+#if OSSIM_HAS_MPI
+   // only allocate the slave connection if the number of processors is larger than 1
+   if(ossimMpi::instance()->getNumberOfProcessors() > 1)
+   {
+      if(ossimMpi::instance()->getRank()!=0)
+         sequencer = new ossimImageMpiSWriterSequenceConnection(0, theNumberOfTilesToBuffer);
+      else
+         sequencer = new ossimImageMpiMWriterSequenceConnection();
+   }
+#endif
+
+   // we will just load a serial connection if MPI is not supported.
+   // Threading?
+   if (!sequencer.valid() && (theThreadCount != 9999))
+      sequencer = new ossimMultiThreadSequencer(0, theThreadCount);
+
+   if (!sequencer.valid())
+      sequencer = new ossimImageSourceSequencer(0);
+
+
+   // Look for the first writer (should be the only writer) in our list of objects:
+
+   // ossimRefPtr<ossimImageFileWriter> writer  = 0;
+   // ossimConnectableObject::ConnectableObjectList imageWriters =
+   //    theContainer->findAllObjectsOfType(STATIC_TYPE_INFO(ossimImageFileWriter), false);
+
+   ossimTypeNameVisitor visitor( ossimString("ossimImageFileWriter"),
+                                 true, // firstofTypeFlag
+                                 (ossimVisitor::VISIT_INPUTS |
+                                  ossimVisitor::VISIT_CHILDREN) );
+   theContainer->accept( visitor );
+   ossimRefPtr<ossimImageFileWriter> writer = visitor.getObjectAs<ossimImageFileWriter>(0);
+   
+   if ( !writer.valid() )
+   {
+      sequencer = 0;
+      std::string err = "ossimIgen::outputProduct() ERROR:  No image writer object was found in "
+         " processing chain.";
+      throw(ossimException(err));
+   }
+
+   // writer = PTR_CAST(ossimImageFileWriter, imageWriters[0].get());
+   writer->changeSequencer(sequencer.get());
+   writer->connectMyInputTo(theProductChain.get());
+   
+   // Check for writing to standard output flag. Not all writers support this so check and 
+   // throw an error if not supported.
+   if (theStdoutFlag)
+   {
+      if ( writer->setOutputStream(std::cout) == false )
+      {
+         std::string err = "ERROR:  The write to standard out flag is set; however, writer does "
+            "not support going to standard out. Bummer...";
+         throw(ossimException(err));
+      }
+   }
+   
+   writer->initialize();
+
+   if ( theBuildThumbnailFlag )
+   {
+      //---
+      // Use theOutputRect as it has been clamped to be within the requested thumbnail size.
+      // 
+      // Relying of the bounding rectangle of the scaled product chain has given us off by
+      // one rectangles, i.e., a width of 513 instead of 512.
+      // 
+      // NOTE: This must be called after the writer->initialize() as
+      // ossimImageFileWriter::initialize incorrectly resets theAreaOfInterest
+      // back to the bounding rect.
+      //---
+      writer->setAreaOfInterest( ossimIrect(theOutputRect) );
+   }
+
+   // If multi-file tiled output is not desired perform simple output, handle special:
+   if(theTilingEnabled && theProductProjection.valid())
+   {
+      theTiling->initialize(*(theProductProjection.get()), theOutputRect);
+
+      ossimRectangleCutFilter* cut = 0;
+      ossimTilingPoly* tilingPoly = dynamic_cast<ossimTilingPoly*>( theTiling.get() );
+      
+      ossimFilename tempFile = writer->getFilename();
+      if(!tempFile.isDir())
+      {
+         tempFile = tempFile.path();
+      }
+
+      ossimString tileName;
+      ossimIrect clipRect;
+
+      // 'next' method modifies the mapProj which is the same instance as theProductProjection,
+      // so this data member is modified here, then later accessed by setView:
+      while(theTiling->next(theProductProjection, clipRect, tileName))
+      {
+         if ( !tilingPoly )//use ossimTiling or ossimTilingRect
+         {
+            // Disconnect prior to setting up chain.
+            writer->disconnect();
+
+            // This will progate the updated projection from theTiling->next call.
+            setView();
+
+            // Recompute the bounding rect:
+            initializeChain();
+
+            // Hook writer up:
+            writer->connectMyInputTo(theProductChain.get());
+            writer->setFilename(tempFile.dirCat(tileName));
+            writer->initialize();
+
+            // Set the clip rect for tile:
+            writer->setAreaOfInterest( clipRect );
+         }
+         else //otherwise use ossimTilingPoly
+         {
+            if (tilingPoly != NULL)
+            {
+               if (!tilingPoly->isFeatureBoundingIntersect())//if clip rect does not intersect with output rect, do nothing
+               {
+                  continue;
+               }
+               if (tilingPoly->useMbr())//if use_mbr flag is set to true, all pixels within the MBR will be preserved
+               {
+                  if (cut == NULL)
+                  {
+                      cut = new ossimRectangleCutFilter;
+                      theProductChain->addFirst(cut);
+                  }
+                  setView();
+                  cut->setRectangle(clipRect);
+               }
+               else
+               {
+                  if ( tilingPoly->hasExteriorCut() )
+                  {
+                     theProductChain->addFirst( tilingPoly->getExteriorCut().get() );
+                  }
+                  if ( tilingPoly->hasInteriorCut() )
+                  {
+                     theProductChain->addFirst( tilingPoly->getInteriorCut().get() );
+                  }
+               }
+            }
+
+            initializeChain();
+            writer->disconnect();
+            writer->connectMyInputTo(theProductChain.get());
+            writer->setFilename(tempFile.dirCat(tileName));
+            writer->initialize();
+            
+         } // if ( !tilingPoly ){} else{
+         
+
+         // Write the file:
+         if ( !writeToFile( writer.get() ))
+         {
+            break;
+         }
+      }
+   }
+   else
+   {
+      // No multi-file tiling, just conventional write to single file:
+      writeToFile(writer.get());
+   }
+
+   //########## DEBUG CODE FOR TIMING MULTI THREAD LOCKS ##############
+   if (sequencer.valid() && (theThreadCount != 9999))
+   {
+      ossimMultiThreadSequencer* mts = dynamic_cast<ossimMultiThreadSequencer*>(sequencer.get());
+      if (mts != NULL)
+      {
+
+         double jgtt = mts->d_jobGetTileT;
+         ossim_uint32 num_threads = mts->getNumberOfThreads();
+         double jgttpj = jgtt/num_threads;
+         cout<<setprecision(3)<<endl;
+         cout << "Multi-threading metrics ---"<<endl;
+         cout << "   Number of threads:      " << num_threads<< endl;
+         cout << "   Max cache used:         "<< mts->d_maxCacheUsed << endl;
+         cout << "   Cache emptied count:    "<< ossimString::toString(mts->d_cacheEmptyCount) << endl;
+         cout << "   Time waiting on jobs:   "<<mts->d_idleTime2<<" s"<<endl;
+         cout << "   Time waiting on cache:  "<<mts->d_idleTime5<<" s"<<endl;
+         cout << "   Handler getTile T:      "<<mts->handlerGetTileT()<<" s"<<endl;
+         cout << "   Job getTile T:          "<<jgtt<<" s"<<endl;
+         cout << "   Average getTile T/job:  "<<jgttpj<<" s\n"<<endl;
+      }
+   }
+   //##################################################################
+}
+
+//*************************************************************************************************
+//! Consolidates job of actually writing to the output file.
+//*************************************************************************************************
+bool ossimIgen::writeToFile(ossimImageFileWriter* writer)
+{
+   ossimStdOutProgress* prog = 0;
+   if ( (ossimMpi::instance()->getRank() == 0) && theProgressFlag)
+   {
+      // Add a listener to master.
+      prog = new ossimStdOutProgress(0, true);
+      writer->addListener(prog);
+   }
+
+   if (traceLog() && (ossimMpi::instance()->getRank() == 0))
+   {
+      ossimFilename logFile = writer->getFilename();
+      logFile.setExtension(ossimString("log"));
+
+      ossimRefPtr<ossimConnectableContainer> container = new ossimConnectableContainer;
+      writer->fillContainer(*container.get());
+      ossimKeywordlist logKwl;
+      container->saveState(logKwl);
+      logKwl.write(logFile.c_str());
+   }
+
+   try
+   {
+      writer->execute();
+   }
+
+   // Catch internal exceptions:
+   catch(const ossimException& e)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL)
+         << "ossimIgen::outputProduct ERROR:\n"
+         << "Caught exception!\n"
+         << e.what()
+         << std::endl;
+      return false;
+   }
+   catch(...)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL)
+         << "ossimIgen::outputProduct ERROR:\n"
+         << "Unknown exception caught!\n"
+         << std::endl;
+      return false;
+   }
+
+   if (prog)
+   {
+      writer->removeListener(prog);
+      delete prog;
+      prog = 0;
+   }
+
+   return true;
+}
+
+//*************************************************************************************************
+//! Initializes all clients of the view projection to the current product projection.
+//*************************************************************************************************
+void ossimIgen::setView()
+{
+   if( theProductChain.valid() && theProductProjection.valid() )
+   {
+      // Find all view clients in the chain, and notify them of the new view:
+#if 0
+      ossimConnectableObject::ConnectableObjectList clientList;
+      theProductChain->findAllInputsOfType(clientList, STATIC_TYPE_INFO(ossimViewInterface), true, true);
+      for(ossim_uint32 i = 0; i < clientList.size();++i)
+      {
+         ossimViewInterface* viewClient = dynamic_cast<ossimViewInterface*>( clientList[i].get() );
+         if (viewClient)
+            viewClient->setView(theProductProjection->dup());
+      }
+#endif
+      
+      ossimTypeNameVisitor visitor( ossimString("ossimViewInterface"),
+                                    false, // firstofTypeFlag
+                                    (ossimVisitor::VISIT_INPUTS|
+                                     ossimVisitor::VISIT_CHILDREN) );
+      theProductChain->accept( visitor );
+      for( ossim_uint32 i = 0; i < visitor.getObjects().size(); ++i )
+      {
+         ossimViewInterface* viewClient = visitor.getObjectAs<ossimViewInterface>( i );
+         if (viewClient)
+         {
+            viewClient->setView( theProductProjection->dup() );
+         }
+      }
+
+      // Force recompute of bounding rect:
+      initializeChain();
+   }
+}
+
+//*************************************************************************************************
+//! Modifies the production chain to output redused-resolution thumbnail image.
+//*************************************************************************************************
+void ossimIgen::initThumbnailProjection()
+{
+   double thumb_size = ossim::max(theThumbnailSize.x, theThumbnailSize.y);
+   ossimMapProjection* mapProj = dynamic_cast<ossimMapProjection*>(theProductProjection.get());
+
+   if(mapProj && !theOutputRect.hasNans())
+   {
+      double xScale = theOutputRect.width()  / thumb_size;
+      double yScale = theOutputRect.height() / thumb_size;
+      double scale = ossim::max(xScale, yScale);
+      mapProj->applyScale(ossimDpt(scale, scale), true);
+   }
+
+   // Need to change the view in the product chain:
+   setView();
+
+   // Clamp output rectangle to thumbnail bounds.
+   ossimDpt ul = theOutputRect.ul();
+   ossimDpt lr = theOutputRect.lr();
+   if ( (lr.x - ul.x + 1) > thumb_size)
+   {
+      lr.x = ul.x + thumb_size - 1;
+   }
+   if ( (lr.y - ul.y + 1) > thumb_size )
+   {
+      lr.y = ul.y + thumb_size - 1;
+   }
+   theOutputRect = ossimDrect(ul, lr);
+}
+
+//*************************************************************************************************
+// This method is called after a change is made to the product chain. It recomputes the bounding
+// rectangle.
+//*************************************************************************************************
+void ossimIgen::initializeChain()
+{
+   // Force initialization of the chain to recompute parameters:
+   theProductChain->initialize();
+   theOutputRect = theProductChain->getBoundingRect();
+   
+   if(!theOutputRect.hasNans())
+   {
+      // Stretch the rectangle out to integer boundaries.
+      theOutputRect.stretchOut();
+
+      // Communicate the new product size to the view's geometry object. This is a total HACK that 
+      // external code needs to worry about setting this. Something is wrong with this picture 
+      // (OLK 02/11)
+      ossimImageGeometry* geom = theProductChain->getImageGeometry().get();
+      if (geom)
+         geom->setImageSize(ossimIpt(theOutputRect.size()));
+   }
+}
diff --git a/ossim/src/ossim/parallel/ossimImageChainMtAdaptor.cpp b/ossim/src/ossim/parallel/ossimImageChainMtAdaptor.cpp
new file mode 100644
index 0000000..e1e3139
--- /dev/null
+++ b/ossim/src/ossim/parallel/ossimImageChainMtAdaptor.cpp
@@ -0,0 +1,459 @@
+//*************************************************************************************************
+//                                            OSSIM
+//
+// License: MIT
+//
+// Author: Oscar Kramer
+//
+// This class supports multi-threading of image chain getTile() requests and associated chain
+// updating. It accepts an original ossimImageChain object which is then cloned (replicated). 
+// One replicant per thread is created (counting the original as replicant[0]), with all replicants
+// sharing a common input handler (if directed) so that disk access is serialized and thread-safe.
+//
+//*************************************************************************************************
+// $Id$
+
+#include <ossim/parallel/ossimImageChainMtAdaptor.h>
+#include <ossim/parallel/ossimMtDebug.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/parallel/ossimImageHandlerMtAdaptor.h>
+#include <ossim/base/ossimVisitor.h>
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+#include <iterator>
+
+static const char* NUM_THREADS_KW         = "ossimImageChainMtAdaptor.num_threads";
+static const char* ORIGINAL_SOURCE_ID_KW  = "ossimImageChainMtAdaptor.original_source_id";
+
+//*************************************************************************************************
+// Constructor.
+//*************************************************************************************************
+ossimImageChainMtAdaptor::ossimImageChainMtAdaptor()
+:  m_numThreads (0),
+   d_useSharedHandlers(false),
+   d_debugEnabled(false)
+{
+   //###### DEBUG ############
+   ossimMtDebug* mt_debug = ossimMtDebug::instance();
+   d_useSharedHandlers = mt_debug->chainSharedHandlers;
+   d_debugEnabled = mt_debug->chainDebugEnabled;
+   //###### END DEBUG ############
+}
+
+//*************************************************************************************************
+// Constructor with original image chain provided. This source becomes the first clone in the list.
+//*************************************************************************************************
+ossimImageChainMtAdaptor::ossimImageChainMtAdaptor(ossimImageChain* original,
+                                                   ossim_uint32 num_threads_req)
+:  m_numThreads (0),
+   d_useSharedHandlers(true),
+   d_debugEnabled(false)
+{
+   //###### DEBUG ############
+   ossimMtDebug* mt_debug = ossimMtDebug::instance();
+   d_useSharedHandlers = mt_debug->chainSharedHandlers;
+   d_debugEnabled = mt_debug->chainDebugEnabled;
+   //###### END DEBUG ############
+
+   setNumberOfThreads(num_threads_req); 
+   setOriginalChain(original); 
+}
+
+//*************************************************************************************************
+// Destructor.
+//*************************************************************************************************
+ossimImageChainMtAdaptor::~ossimImageChainMtAdaptor()
+{
+   removeListener((ossimConnectableObjectListener*)this);
+   m_clones.clear();
+   m_chainContainers.clear();
+}
+
+//*************************************************************************************************
+//! Alternate way of specifying number of threads to support. This is the same as the number of 
+//! clones that will be available after replicating the original chain.
+//*************************************************************************************************
+void ossimImageChainMtAdaptor::setNumberOfThreads(ossim_uint32 num_threads)
+{
+   if (m_numThreads == num_threads)
+      return;
+
+   // Determine number of cores/threads to set up:
+   if (num_threads > 0)
+   {
+      m_numThreads = num_threads;
+   }
+   else
+   {
+      // Look in ossim preferences if arg is provided above.
+      ossimString value = ossimPreferences::instance()->findPreference("ossim_threads");
+      if ( !value.empty() )
+         m_numThreads = value.toUInt32();
+   }
+
+   // If there is a valid original chain, we can perform the replication:
+   if (!m_chainContainers.empty())
+      replicate();
+}
+
+//*************************************************************************************************
+//! Alternate way of specifying the original chain being adapted for multi-threading.
+//*************************************************************************************************
+void ossimImageChainMtAdaptor::setOriginalChain(ossimImageChain* original)
+{
+   if (original == NULL)
+      return;
+
+   ossimImageSource* first_source = original->getFirstSource();
+   if (first_source == NULL)
+      return;
+
+   // Assign the adaptee and put it in the first position of the clones list:
+   m_adaptedChain = original;
+   m_clones.clear();
+   m_clones.push_back(first_source);
+
+   m_chainContainers.clear();
+   m_chainContainers.push_back(new ossimConnectableContainer);
+   m_adaptedChain->fillContainer(*m_chainContainers[0].get());
+
+   // If we know the number of threads, we can begin replicating:
+   if (m_numThreads > 1)
+      replicate();
+}
+
+//*************************************************************************************************
+// Creates clones of the original and pushes them onto the clone list.
+//
+// Need to consider the possibility that the original chain is a combiner with multiple image 
+// handler inputs, and also the possibility that one handler is wired to multiple input chains
+// before the combiner. In order to handle this, we will save the connection information for each 
+// input handler encountered so that we can later reproduce it using a shared handler (if requested)
+//*************************************************************************************************
+bool ossimImageChainMtAdaptor::replicate()
+{
+   if ((m_clones.empty()) || (m_numThreads == 0))
+      return false;
+
+   // Don't need to replicate if only one thread is being requested. This is not an error though:
+   if (m_numThreads == 1)
+      return true;
+
+   // If the handlers are to be shared, need to isolate them from the original chain and replace
+   // them with a "hollow adaptor" (i.e., a handler adaptor without the adaptee set yet:
+   m_sharedHandlers.clear();
+   if (d_useSharedHandlers)
+   {
+      if (m_chainContainers.empty())
+         return false;
+
+      // Collect all image handlers in original chain for possible sharing with all clones:
+      ossimTypeNameVisitor visitor (ossimString("ossimImageHandler"));
+      m_chainContainers[0]->accept(visitor);
+      ossimRefPtr<ossimImageHandler> handler = 0;
+      ossimRefPtr<ossimImageHandlerMtAdaptor> handler_adaptor = 0;
+      ossimRefPtr<ossimConnectableObject> output_connection = 0;
+      ossim_uint32 handler_idx = 0;
+
+      // Loop over all image handlers found in the original chain. Each handler's connection info
+      // is stored and the handler is removed temporarily from the original chain.
+      while (1) 
+      {
+         // Fetch a handler from the chain and wrap it with a handler adaptor:
+         handler = visitor.getObjectAs<ossimImageHandler>(handler_idx++);
+         if (handler == NULL)
+            break; // Only exit point of while loop
+         
+         handler_adaptor = new ossimImageHandlerMtAdaptor(handler.get());
+         m_sharedHandlers.push_back(handler_adaptor);
+
+         // Change ownership:
+         m_chainContainers[0]->removeChild(handler.get());
+         handler->changeOwner(this);
+      } 
+
+      // If no handler was found, we can't continue.
+      if (m_sharedHandlers.empty())
+         return false;
+   }
+
+   // Fetch the state of this and the original chain. This KWL will be used for creating replicas
+   // via the loadState. The saveState essentially bootstraps the replication task:
+   ossimKeywordlist kwl;
+   bool succeeded = saveState(kwl);
+
+   // The original chain may have had the handlers temporarily removed for the saveState in support
+   // of shared handlers. If so, need to restore them now:
+   if (d_useSharedHandlers)
+      succeeded = connectSharedHandlers(0);
+
+   // Finally, initialize THIS chain with the original chain's state. This call will also create
+   // the clones:
+   if (succeeded)
+      succeeded = loadState(kwl);
+
+   return succeeded;
+}
+
+//*************************************************************************************************
+// Deletes instances of all replicas from the clone list and leaves only the original.
+//*************************************************************************************************
+void ossimImageChainMtAdaptor::deleteReplicas()
+{
+   if (m_clones.size() > 1)
+   {
+      std::vector< ossimRefPtr<ossimImageSource> >::iterator first_copy = m_clones.begin();
+      first_copy++;
+      m_clones.erase(first_copy, m_clones.end());
+   }
+   m_numThreads = 1;
+}
+
+//*************************************************************************************************
+// Saves the state of the original chain along with number of clones present.
+//*************************************************************************************************
+bool ossimImageChainMtAdaptor::saveState(ossimKeywordlist& kwl, const char* prefix) const
+{
+   if (m_chainContainers.empty())
+      return false;
+
+   kwl.add(prefix, NUM_THREADS_KW, m_numThreads);
+   kwl.add(prefix, ORIGINAL_SOURCE_ID_KW, m_clones[0]->getId().getId());
+   
+   bool rtn_state = m_chainContainers[0]->saveState(kwl, prefix);
+
+   if (d_debugEnabled)
+      kwl.write("ossimImageChainMtAdaptor.kwl");
+
+   return rtn_state;
+}
+
+//*************************************************************************************************
+// Fetches the state of the original chain and regenerates the clones. Special handling is required
+// when the image handlers are to be shared among all clones.
+//*************************************************************************************************
+bool ossimImageChainMtAdaptor::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   bool succeeded;
+
+   // Reset this object:
+   deleteReplicas();
+
+   // Fetch this object's data members before moving onto original chain:
+   ossimString value = kwl.find(prefix, NUM_THREADS_KW);
+   if (value.empty())
+      return false;
+   m_numThreads = value.toUInt32();
+   if (m_numThreads == 0)
+      return false;
+
+   // The chain ID needs to be read from KWL:
+   ossimId orig_source_id (ossimId::INVALID_ID);
+   value = kwl.find(prefix, ORIGINAL_SOURCE_ID_KW);
+   if (value.empty())
+      return false;
+   orig_source_id.setId(value.toInt64());
+
+   // This loadState may be called for the purpose of replicating the existing original, or it can
+   // be intended as an adapter to a yet-to-be-instantiated original chain. Check if we already
+   // have a valid original chain:
+   ossimConnectableObject* candidate = 0;
+   ossimImageSource* original_source = 0;
+   if (!m_adaptedChain.valid() || m_chainContainers.empty())
+   {
+      m_chainContainers.clear();
+      m_chainContainers.push_back(new ossimConnectableContainer);
+      m_chainContainers[0]->loadState(kwl, prefix);
+
+      // Need to instantiate a new original. This is a bootstrap for a full initialization of this
+      // object. We'll need to replicate the clones afterwards:
+      ossimIdVisitor visitor (orig_source_id);
+      m_chainContainers[0]->accept(visitor);
+      candidate = visitor.getObject();
+      original_source = dynamic_cast<ossimImageSource*>(candidate);
+      if (original_source == NULL)
+         return false;
+      m_clones.push_back(original_source); // original is always in first position of clones list
+
+      // The original "chain" is morphed into a chain with a single child (original first source).
+      // This source is the one maintaining the connection to the rest of the sources in the real
+      // processing chain:
+      m_adaptedChain = new ossimImageChain;
+      m_adaptedChain->add(original_source);
+
+      // Now that we have an original chain, Recursive code to replicate clones:
+      succeeded = replicate();
+      if (!succeeded)
+         return false;
+   }
+
+   // We may be done:
+   if (m_numThreads == 1)
+      return true;
+
+   // In preparation for multi-threading jobs, loop to instantiate all clone chains. The container
+   // class is used to perform a deep copy of the original chain with all connections established.
+   // It would have been cleaner to just use the ossimImageChain::dup() but that method was not
+   // traversing the full chain, resulting in missing input sources:
+   succeeded = true;
+   for (ossim_uint32 i=1; (i<m_numThreads) && succeeded; ++i)
+   {
+      // Use original container's kwl to dup clone container, and pull out our chain of interest:
+      m_chainContainers.push_back(new ossimConnectableContainer);
+      m_chainContainers[i]->loadState(kwl, prefix);
+      
+      // Special handling required if the handlers are being shared. In this case, the handler had
+      // been removed from the original chain, so connections need to be identified and made:
+      if (d_useSharedHandlers)
+      {
+         succeeded = connectSharedHandlers(i);
+         if (!succeeded)
+            return false;
+      }
+
+      // Find the first (right-most) source in the chain and store it in the clone list. Need to
+      // Modify all IDs
+      ossimIdVisitor visitor (orig_source_id);
+      m_chainContainers[i]->accept(visitor);
+      candidate = visitor.getObject();
+      m_chainContainers[i]->makeUniqueIds();
+      ossimRefPtr<ossimImageSource> clone_source = dynamic_cast<ossimImageSource*>(candidate);
+      if (clone_source == NULL)
+         return false;
+      m_clones.push_back(clone_source);
+   }
+
+   return succeeded;
+}
+
+//*************************************************************************************************
+//! Adapts call to original chain so that all clones are initialized.
+//*************************************************************************************************
+void ossimImageChainMtAdaptor::initialize()
+{
+   for (size_t i=0; i<m_clones.size(); ++i)
+      m_clones[i]->initialize();
+}
+
+//*************************************************************************************************
+// Intercept this getTile because it should never be called directly. The tile request must go
+// to the specific chain clone.
+//*************************************************************************************************
+ossimRefPtr<ossimImageData> ossimImageChainMtAdaptor::getTile(const ossimIrect& tileRect,
+                                                                       ossim_uint32 resLevel)
+{
+   ossimNotify(ossimNotifyLevel_WARN)<<"ossimImageChainMtAdaptor::getTile() -- This method "
+      "Should never be called directly. The tile request must go to the specific chain clone. "
+      "Returning a tile using the original chain's getTile (not threaded)..."<<endl;
+   
+   if (!m_adaptedChain.valid())
+      return ossimRefPtr<ossimImageData>(0);
+      
+   return m_adaptedChain->getTile(tileRect, resLevel);
+}
+
+//*************************************************************************************************
+// Manages reconnecting shared image handlers to an image chain after its creation.
+// This is in support of shared image handlers. Returns TRUE if successful.
+//*************************************************************************************************
+bool ossimImageChainMtAdaptor::connectSharedHandlers(ossim_uint32 chain_index)
+{
+   if ((size_t)chain_index >= m_chainContainers.size())
+      return false;
+
+   // Loop over each adapted handler in our shared handler list:
+   SharedHandlerList::iterator handler = m_sharedHandlers.begin();
+   while (handler != m_sharedHandlers.end())
+   {
+      // Fetch all objects connected to this adapted handler. The list will point to objects in
+      // m_chainContainers[0], the original chain. The new chain's objects share the same ID's as
+      // the original chain for the moment. So we can search for the output connection 
+      // in the new chain using the ID of the corresponding object in the original chain:
+      ConnectableObjectList handler_connections = (*handler)->getOutputList();
+      ConnectableObjectList::iterator output_connection = handler_connections.begin();
+      while (output_connection != handler_connections.end())
+      {
+         ossimId obj_id = (*output_connection)->getId();
+         ossimIdVisitor visitor (obj_id);
+         m_chainContainers[chain_index]->accept(visitor);
+
+         // Get the pointer to the actual output object that needs to be connected to the shared
+         // handler:
+         ossimConnectableObject* output_obj = visitor.getObject();
+         if (output_obj == NULL)
+            return false; // Should never happen
+         output_obj->connectMyInputTo((*handler).get(), true, true);
+
+         output_connection++;
+      }
+      handler++;
+   }
+   return true;
+}
+
+
+//*************************************************************************************************
+// Adapts base class method for accessing connectables in the original chain.
+//*************************************************************************************************
+ossimConnectableObject::ConnectableObjectList& ossimImageChainMtAdaptor::imageChainList()
+{
+   // If there is no original chain defined, then just return our own blank list:
+   if (!m_adaptedChain.valid())
+      return theImageChainList;
+
+   return m_adaptedChain->imageChainList();
+}
+
+//*************************************************************************************************
+// Adapts base class method for accessing connectables in the original chain.
+//*************************************************************************************************
+const ossimConnectableObject::ConnectableObjectList& 
+   ossimImageChainMtAdaptor::imageChainList()const
+{
+   // If there is no original chain defined, then just return our own blank list:
+   if (!m_adaptedChain.valid())
+      return theImageChainList;
+
+   return m_adaptedChain->imageChainList();
+}
+
+//*************************************************************************************************
+//! Adapts the image chain event handler. If the event involves a change to the original image 
+//! chain, then the clones will need to be regenerated here.
+//*************************************************************************************************
+void ossimImageChainMtAdaptor::processEvent(ossimEvent& /* event */)
+{
+   ossimNotify(ossimNotifyLevel_WARN)<<"ossimImageChainMtAdaptor::processEvent() -- "
+      "NOT YET IMPLEMENTED"<<endl;
+}
+
+//*************************************************************************************************
+ossimImageSource* ossimImageChainMtAdaptor::getClone(ossim_uint32 index)
+{
+   if (index < (ossim_uint32) m_clones.size())
+      return m_clones[index].get();
+   
+   return 0;
+}
+
+//*************************************************************************************************
+//! Overrides base class implementation in order to make the connection to each clone. This 
+//! connection is typically to the multi-thread sequencer object.
+//*************************************************************************************************
+ossim_int32 ossimImageChainMtAdaptor::connectMyOutputTo(ossimConnectableObject* outputObject,
+                                                        bool makeInputConnection,
+                                                        bool createEventFlag)
+{
+   // Make output connection for each clone source:
+   std::vector< ossimRefPtr<ossimImageSource> >::iterator clone_source = m_clones.begin();
+   while (clone_source != m_clones.end())
+   {
+      (*clone_source)->connectMyOutputTo(outputObject, false, false);
+      clone_source++;
+   }
+
+   // Now make master connection including making input connection on outputObject and firing event:
+   return ossimConnectableObject::connectMyOutputTo(outputObject, 
+                                                    makeInputConnection, 
+                                                    createEventFlag);
+}
+
diff --git a/src/ossim/parallel/ossimImageHandlerMtAdaptor.cpp b/ossim/src/ossim/parallel/ossimImageHandlerMtAdaptor.cpp
similarity index 100%
rename from src/ossim/parallel/ossimImageHandlerMtAdaptor.cpp
rename to ossim/src/ossim/parallel/ossimImageHandlerMtAdaptor.cpp
diff --git a/src/ossim/parallel/ossimImageMpiMWriterSequenceConnection.cpp b/ossim/src/ossim/parallel/ossimImageMpiMWriterSequenceConnection.cpp
similarity index 100%
rename from src/ossim/parallel/ossimImageMpiMWriterSequenceConnection.cpp
rename to ossim/src/ossim/parallel/ossimImageMpiMWriterSequenceConnection.cpp
diff --git a/src/ossim/parallel/ossimImageMpiSWriterSequenceConnection.cpp b/ossim/src/ossim/parallel/ossimImageMpiSWriterSequenceConnection.cpp
similarity index 100%
rename from src/ossim/parallel/ossimImageMpiSWriterSequenceConnection.cpp
rename to ossim/src/ossim/parallel/ossimImageMpiSWriterSequenceConnection.cpp
diff --git a/src/ossim/parallel/ossimJob.cpp b/ossim/src/ossim/parallel/ossimJob.cpp
similarity index 100%
rename from src/ossim/parallel/ossimJob.cpp
rename to ossim/src/ossim/parallel/ossimJob.cpp
diff --git a/src/ossim/parallel/ossimJobMultiThreadQueue.cpp b/ossim/src/ossim/parallel/ossimJobMultiThreadQueue.cpp
similarity index 100%
rename from src/ossim/parallel/ossimJobMultiThreadQueue.cpp
rename to ossim/src/ossim/parallel/ossimJobMultiThreadQueue.cpp
diff --git a/src/ossim/parallel/ossimJobQueue.cpp b/ossim/src/ossim/parallel/ossimJobQueue.cpp
similarity index 100%
rename from src/ossim/parallel/ossimJobQueue.cpp
rename to ossim/src/ossim/parallel/ossimJobQueue.cpp
diff --git a/src/ossim/parallel/ossimJobThreadQueue.cpp b/ossim/src/ossim/parallel/ossimJobThreadQueue.cpp
similarity index 100%
rename from src/ossim/parallel/ossimJobThreadQueue.cpp
rename to ossim/src/ossim/parallel/ossimJobThreadQueue.cpp
diff --git a/ossim/src/ossim/parallel/ossimMpi.cpp b/ossim/src/ossim/parallel/ossimMpi.cpp
new file mode 100644
index 0000000..2271485
--- /dev/null
+++ b/ossim/src/ossim/parallel/ossimMpi.cpp
@@ -0,0 +1,190 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimMpi.cpp 23002 2014-11-24 17:11:17Z dburken $
+
+#include <ossim/parallel/ossimMpi.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <time.h>
+#if OSSIM_HAS_MPI
+#  include <mpi.h>
+#endif
+
+#if OSSIM_ID_ENABLED
+static const char OSSIM_ID[] = "$Id: ossimMpi.cpp 23002 2014-11-24 17:11:17Z dburken $";
+#endif
+
+static ossimTrace traceDebug = ossimTrace("ossimMpi:debug");
+
+ossimMpi* ossimMpi::theInstance=0;
+
+ossimMpi* ossimMpi::instance()
+{
+   if(!theInstance)
+   {
+      theInstance = new ossimMpi;
+   }
+   
+   return theInstance;
+}
+
+bool ossimMpi::isEnabled()const
+{
+   return theEnabledFlag;
+}
+
+void ossimMpi::barrier()
+{
+#if OSSIM_HAS_MPI
+   if(theEnabledFlag)
+   {
+      // Blocks until all processes have reached this routine.
+      MPI_Barrier( MPI_COMM_WORLD );
+   }
+#endif
+}
+
+ossim_float64 ossimMpi::getTime()const
+{
+#if OSSIM_HAS_MPI
+   if(theEnabledFlag)
+   {
+      return MPI_Wtime();
+   }
+   else
+   {
+      return time(0);
+   }
+#else
+   return time(0);
+#endif
+}
+
+#if OSSIM_HAS_MPI
+void ossimMpi::initialize(int* argc, char*** argv)
+{
+   int success=0;
+   success = MPI_Init(argc, argv);
+   if(success == MPI_SUCCESS)
+   {
+      theEnabledFlag = true;
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG ossimMpi::initialize\n"
+            << "MPI is initialized and running with "
+            << getNumberOfProcessors()
+            << " processors..."
+            << std::endl;
+      }
+   }
+   else
+   {
+      theEnabledFlag = false;
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG ossimMpi::initialize:  MPI is not initialized."
+            << std::endl;
+      }
+   }
+}
+#else
+void ossimMpi::initialize(int* argc, char*** /* argv */)
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimMpi::initialize: Not compiled with mpi!"
+         << std::endl;
+   }
+}
+#endif
+
+void ossimMpi::setEnabledFlag(bool flag)
+{
+   theEnabledFlag = flag;
+}
+
+void ossimMpi::finalize()
+{
+#if OSSIM_HAS_MPI
+   if(theEnabledFlag)
+   {
+      int success;
+      success = MPI_Finalize();
+      if(traceDebug())
+      {
+         if(success == MPI_SUCCESS)
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "DEBUG ossimMpi::finalize(): mpi is finalized" << std::endl;
+         }
+         else
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "DEBUG ossimMpi::finalize(): "
+               << "mpi is not finalized successfully" << std::endl;
+         }
+      }
+   }
+#endif
+}
+
+int ossimMpi::getRank()const
+{
+   int result = 0;
+
+#if OSSIM_HAS_MPI
+   if(theEnabledFlag)
+   {
+      MPI_Comm_rank(MPI_COMM_WORLD, &result);
+   }
+#endif
+   
+   return result;
+}
+
+int ossimMpi::getNumberOfProcessors()const
+{
+   int result = 1;
+
+#if OSSIM_HAS_MPI
+   if(theEnabledFlag)
+   {
+      MPI_Comm_size(MPI_COMM_WORLD, &result);
+   }
+#endif
+
+   return result;
+}
+
+ossimMpi::ossimMpi()
+   : theEnabledFlag(false)
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimMpi::ossimMpi entered..."
+         << std::endl;
+#ifdef OSSIM_ID_ENABLED
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "OSSIM_ID = " << OSSIM_ID << std::endl;
+#endif
+   }
+}
+
+ossimMpi::ossimMpi(const ossimMpi& obj)
+   : theEnabledFlag(obj.theEnabledFlag)
+{}
+
+void ossimMpi::operator=(const ossimMpi& rhs)
+{
+   theEnabledFlag = rhs.theEnabledFlag; 
+}
diff --git a/src/ossim/parallel/ossimMpiMasterOverviewSequencer.cpp b/ossim/src/ossim/parallel/ossimMpiMasterOverviewSequencer.cpp
similarity index 100%
rename from src/ossim/parallel/ossimMpiMasterOverviewSequencer.cpp
rename to ossim/src/ossim/parallel/ossimMpiMasterOverviewSequencer.cpp
diff --git a/src/ossim/parallel/ossimMpiSlaveOverviewSequencer.cpp b/ossim/src/ossim/parallel/ossimMpiSlaveOverviewSequencer.cpp
similarity index 100%
rename from src/ossim/parallel/ossimMpiSlaveOverviewSequencer.cpp
rename to ossim/src/ossim/parallel/ossimMpiSlaveOverviewSequencer.cpp
diff --git a/src/ossim/parallel/ossimMultiThreadSequencer.cpp b/ossim/src/ossim/parallel/ossimMultiThreadSequencer.cpp
similarity index 100%
rename from src/ossim/parallel/ossimMultiThreadSequencer.cpp
rename to ossim/src/ossim/parallel/ossimMultiThreadSequencer.cpp
diff --git a/ossim/src/ossim/parallel/ossimOrthoIgen.cpp b/ossim/src/ossim/parallel/ossimOrthoIgen.cpp
new file mode 100644
index 0000000..c3223be
--- /dev/null
+++ b/ossim/src/ossim/parallel/ossimOrthoIgen.cpp
@@ -0,0 +1,3043 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimOrthoIgen.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+
+#include <ossim/parallel/ossimOrthoIgen.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimGrect.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimVisitor.h>
+#include <ossim/imaging/ossimBandSelector.h>
+#include <ossim/imaging/ossimCacheTileSource.h>
+#include <ossim/imaging/ossimGeoAnnotationSource.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageRenderer.h>
+#include <ossim/imaging/ossimHistogramRemapper.h>
+#include <ossim/imaging/ossimImageMosaic.h>
+#include <ossim/imaging/ossimBlendMosaic.h>
+#include <ossim/imaging/ossimBandMergeSource.h>
+#include <ossim/imaging/ossimFilterResampler.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimOrthoImageMosaic.h>
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <ossim/imaging/ossimMaskFilter.h>
+#include <ossim/imaging/ossimTiffWriter.h>
+#include <ossim/imaging/ossimEsriShapeFileInterface.h>
+#include <ossim/imaging/ossimTilingRect.h>
+#include <ossim/imaging/ossimTilingPoly.h>
+#include <ossim/imaging/ossimGeoPolyCutter.h>
+#include <ossim/imaging/ossimEastingNorthingCutter.h>
+#include <ossim/imaging/ossimHistogramEqualization.h>
+#include <ossim/imaging/ossimImageHistogramSource.h>
+#include <ossim/imaging/ossimHistogramWriter.h>
+#include <ossim/imaging/ossimGeoAnnotationPolyObject.h>
+#include <ossim/imaging/ossimGeoAnnotationMultiPolyObject.h>
+#include <ossim/imaging/ossimPixelFlipper.h>
+#include <ossim/imaging/ossimScalarRemapper.h>
+#include <ossim/parallel/ossimIgen.h>
+#include <ossim/parallel/ossimMpi.h>
+#include <ossim/projection/ossimUtmProjection.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/projection/ossimEpsgProjectionFactory.h>
+
+#include <sstream>
+
+// In Windows, standard output is ASCII by default. 
+// Let's include the following in case we have
+// to change it over to binary mode.
+#if defined(_WIN32)
+#  include <io.h>
+#  include <fcntl.h>
+#endif
+
+
+static ossimTrace traceDebug("ossimOrthoIgen:debug");
+static ossimTrace traceLog("ossimOrthoIgen:log");
+
+static const char* AUTOGENERATE_HISTOGRAM_KW = "autogenerate_histogram";
+
+using namespace ossim;
+
+//*************************************************************************************************
+// Parses the file info as specified in the command line or src file. The file info is a '|'-
+// delimited string with filename and additional attributes such as entry and band numbers.
+//*************************************************************************************************
+bool ossimOrthoIgen::parseFilename(const ossimString& file_spec, bool decodeEntry)
+{
+   ossimSrcRecord src_record;
+
+   std::vector<ossimString> fileInfos = file_spec.split("|");
+   unsigned int num_fields = (unsigned int) fileInfos.size();
+   unsigned int field_idx = 0;
+
+   if (num_fields == 0)
+      return false;
+
+   // First field is the actual filename:
+   src_record.setFilename(fileInfos[field_idx]);
+   ++field_idx;
+
+   // Next field depends on whether an entry is being decoded:
+   if ((field_idx < num_fields) && decodeEntry)
+   {
+      src_record.setEntryIndex(fileInfos[field_idx].trim().toInt32());
+      ++field_idx;
+   }
+
+   // The rest of the fields can appear in any order:
+   while (field_idx < num_fields)
+   {
+      ossimString active_field (fileInfos[field_idx].trim());
+      ossimString downcased_field (active_field);
+      downcased_field.downcase();
+      ++field_idx;
+
+      // Check for overview file spec:
+      ossimFilename filename (active_field);
+      if (filename.contains(".ovr") || filename.isDir())
+      {
+         src_record.setSupportDir(filename.path());
+      }
+      else if (filename.contains(".mask") || filename.isDir())
+      {
+         src_record.setSupportDir(filename.path());
+      }
+
+      // else check for auto-minmax histogram stretch:
+      else if ((downcased_field == "auto-minmax") || downcased_field.contains("std-stretch"))
+      {
+         src_record.setHistogramOp(downcased_field);
+      }
+
+      // Otherwise, this must be a band specification. Band numbers begin with 1:
+      else
+      {
+         // multiple bands delimited by comma:
+         std::vector<ossimString> bandsStr = active_field.split(",");
+         std::vector<ossim_uint32> bands;
+         for (unsigned int i = 0; i < bandsStr.size(); i++)
+         {
+            int band = bandsStr[i].toInt32() - 1;
+            if (band >= 0)
+               bands.push_back((ossim_uint32)band);
+         }
+         src_record.setBands(bands);
+      }
+
+   } // end of while loop parsing fileInfos spec
+
+   theSrcRecords.push_back(src_record);
+   return true;
+}
+
+//*************************************************************************************************
+// Constructor
+//*************************************************************************************************
+ossimOrthoIgen::ossimOrthoIgen()
+   :
+   ossimIgen(),
+   theDeltaPerPixelUnit(OSSIM_UNIT_UNKNOWN),
+   theDeltaPerPixelOverride(ossim::nan(), ossim::nan()),
+   theProjectionType(OSSIM_UNKNOWN_PROJECTION),
+   theProjectionName(""),
+   theGeoScalingLatitude(ossim::nan()),
+   theCombinerType("ossimImageMosaic"),
+   theResamplerType("nearest neighbor"),
+   theWriterType(""),
+   theTemplateView(""),
+   theTilingTemplate(""),
+   theTilingFilename(""),
+   theChainTemplate(""),
+   theCombinerTemplate(""),
+   theAnnotationTemplate(""),
+   theWriterTemplate(""),
+   theSupplementaryDirectory(""),
+   theSlaveBuffers("2"),
+   theCutOriginType(ossimOrthoIgen::OSSIM_CENTER_ORIGIN),
+   theCutOrigin(ossim::nan(), ossim::nan()),
+   theCutDxDy(ossim::nan(), ossim::nan()),
+   theCutOriginUnit(OSSIM_UNIT_UNKNOWN),
+   theCutDxDyUnit(OSSIM_UNIT_UNKNOWN),
+   theLowPercentClip(ossim::nan()),
+   theHighPercentClip(ossim::nan()),
+   theStdDevClip(-1),
+   theUseAutoMinMaxFlag(false),
+   theClipToValidRectFlag(false),   
+   theReaderProperties(),
+   theWriterProperties(),   
+   theTargetHistoFileName(),
+   theProductFilename(),
+   theReferenceProj(0),
+   theMaskShpFile(""),
+   theCacheExcludedFlag(false),
+   theOutputRadiometry(""),
+   thePixelAlignment(OSSIM_PIXEL_IS_AREA) // will revert to "point" upon first occurrence in source list
+{
+   // Determine default behavior of clip from preferences:
+   ossimString flag = ossimPreferences::instance()->findPreference("orthoigen.clip_to_valid_rect");
+   if (!flag.empty())
+      theClipToValidRectFlag = flag.toBool();
+
+   thePixelReplacementMode = ossimPreferences::instance()->findPreference("orthoigen.flip_null_pixels"); 
+   return;
+}
+
+//*************************************************************************************************
+// Initializes the argument parser
+//*************************************************************************************************
+void ossimOrthoIgen::addArguments(ossimArgumentParser& argumentParser)
+{
+   // These are in ALPHABETIC ORDER. Please keep it that way.
+
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--annotate", "annotation keyword list");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--chain-template","Specify an external file that contains chain information");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--clamp-pixels <min> <max>","Specify the min and max allowed pixel values. All values "
+      "outside of this get mapped to their corresponding clamp value.");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--clip-pixels <min> <max>","Causes all pixel values between min and max (inclusive)"
+      " to be mapped to the null pixel value. Min and max can be equal for mapping a single value."
+      " See also related option \"--replacement-mode\" for additional explanation.");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--clip-to-valid-rect <true|false>","When true, any requested cut rect is clipped by the "
+      "valid image bounding rect to minimize null border pixels. If false, the output will "
+      "correspond to the cut rect as close as possible given the product projection. This option "
+      "overrides the ossim_preferences setting. If no cut options are supplied, this option is "
+      "ignored.");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--combiner-template","Specify an external file that contains combiner information");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--combiner-type","Specify what mosaic to use, ossimImageMosiac or ossimFeatherMosaic or "
+      "osimBlendMosaic ... etc");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--cut-bbox-en","Specify the min easting, min northing, max easting, max northing");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--cut-bbox-ll","Specify the min lat and min lon and max lat and maxlon <minLat> <minLon> "
+      "<maxLat> <maxLon>");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--cut-center-ll","Specify the center cut in lat lon space.  Takes two argument <lat> <lon>");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--cut-pixel-width-height","Specify cut box's width and height in pixels");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--cut-radius-meters","Specify the cut distance in meters.  A bounding box for the cut will "
+      "be produced");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--degrees","Specifies an override for degrees per pixel. Takes either a single value "
+      "applied equally to x and y directions, or two values applied correspondingly to x then y.");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--geo","Defaults to a geographic image chain with GSD = to the input.  Origin of latitude is"
+      "on the equator.");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--geo-auto-scaled","Computes the mosaic center latitude  for purpose of scaling in the "
+      "longitude direction so that the pixels will appear nearly square in ground space at "
+      "specified latitude. Implies a geographic projection.");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--geo-scaled","Takes latitude as an argument for purpose of scaling in the "
+      "longitude direction so that the pixels will appear nearly square in ground space at "
+      "specified latitude. Implies a geographic projection.");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--hist-auto-minmax","uses the automatic search for the best min and max clip values."
+      " Incompatible with other histogram options.");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--hist-match","Takes one image filename argument for target histogram to match."
+      " Incompatible with other histogram options.");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--hist-std-stretch","Specify histogram stretch as a standard deviation from the mean as"
+      " <int>, where <int> is 1, 2, or 3."
+      " Incompatible with other histogram options.");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--hist-stretch","Specify in normalized percent the low clip and then the high clip value"
+      " as <low.dd> <hi.dd>."
+      " Incompatible with other histogram options.");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--input-proj","Makes the view equal to the input.  If more than one file then the first is "
+      "taken");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--mask","Specify the ESRI shape file with polygons to clip the image");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--meters","Specifies an override for the meters per pixel. Takes either a single value "
+      "applied equally to x and y directions, or two values applied correspondingly to x then y.");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--no-cache","Excludes the cache from the input image chain(s). Necessary as a workaround "
+      " for inconsistent cache behavior for certain image types.");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--output-radiometry","Specifies the desired product's pixel radiometry type. Possible "
+      "values are: U8, U11, U16, S16, F32. Note this overrides the deprecated option \"scale-to"
+      "-8-bit\".");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--reader-prop","Passes a name=value pair to the reader(s) for setting it's property.  Any "
+      "number of these can appear on the line.");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--replacement-mode <mode>","Specify how to treat multi-band imagery when providing "
+      "clip-pixels and/or clamp-pixels settings. Possible values are: REPLACE_BAND_IF_TARGET | "
+      "REPLACE_BAND_IF_PARTIAL_TARGET | REPLACE_ALL_BANDS_IF_ANY_TARGET | "
+      "REPLACE_ONLY_FULL_TARGETS.");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--resample-type","Specify what resampler to use, nearest neighbor, bilinear, cubic");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--scale-to-8-bit","Scales the output to unsigned eight bits per band. This option has been"
+      " deprecated by the newer \"--output-radiometry\" option.");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--slave-buffers","number of slave tile buffers for mpi processing (default = 2)");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--srs","specify an output reference frame/projection. Example: --srs EPSG:4326");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--stdout","Output the image to standard out.  This will return an error if writer does not "
+      "support writing to standard out.  Callers should combine this with the --ossim-logfile "
+      "option to ensure output image stream does not get corrupted.  You must still pass an output "
+      "file so the writer type can be determined like \"dummy.png\".");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--supplementary-directory or --support","Specify the supplementary directory path where "
+      "overviews, histograms and external geometries are located");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "-t or --thumbnail", "thumbnail size");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--tiling-template","Specify an external file that contains tiling information");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--threads [n]","Indicates multi-threaded process using optionally-specified number of threads");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--utm","Defaults to a utm image chain with GSD = to the input");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--view-template","Specify an external file that contains view information");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "-w or --writer","Specifies the output writer.  Default uses output file extension to "
+      "determine writer.");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--wkt","specify an output reference frame/projection that is in a wkt format.  Must have the"
+      " ossimgdal_plugin compiled");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--writer-prop","Passes a name=value pair to the writer for setting it's property.  Any "
+      "number of these can appear on the line.");
+   argumentParser.getApplicationUsage()->addCommandLineOption(
+      "--writer-template","Specify an external file that contains tiling information"); 
+}
+
+//*************************************************************************************************
+// Initializes this objects data members given the command line args
+//*************************************************************************************************
+void ossimOrthoIgen::initialize(ossimArgumentParser& argumentParser)
+{
+   if(traceDebug())
+   {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimOrthoIgen::initialize DEBUG:"
+            << "Entered..... " 
+            << std::endl;
+   }
+   double tempDouble;
+   double tempDouble2;
+   double tempDouble3;
+   double tempDouble4;
+   ossimString tempString;
+   unsigned int tempUint;
+   ossimArgumentParser::ossimParameter stringParam(tempString);
+   ossimArgumentParser::ossimParameter doubleParam(tempDouble);
+   ossimArgumentParser::ossimParameter doubleParam2(tempDouble2);
+   ossimArgumentParser::ossimParameter doubleParam3(tempDouble3);
+   ossimArgumentParser::ossimParameter doubleParam4(tempDouble4);
+   ossimArgumentParser::ossimParameter uintParam(tempUint);
+   theCutOriginType = ossimOrthoIgen::OSSIM_CENTER_ORIGIN;
+   theCutOrigin.makeNan();
+   theCutDxDy.makeNan();
+   theCutOriginUnit   = OSSIM_UNIT_UNKNOWN;
+   theCutDxDyUnit     = OSSIM_UNIT_UNKNOWN;
+   theLowPercentClip  = ossim::nan();
+   theHighPercentClip = ossim::nan();
+   double minX=ossim::nan(), minY=ossim::nan(), maxX=ossim::nan(), maxY=ossim::nan();
+   theUseAutoMinMaxFlag = false;
+   theDeltaPerPixelOverride.makeNan();
+   theDeltaPerPixelUnit = OSSIM_UNIT_UNKNOWN;
+   theCacheExcludedFlag = false;
+   theClampPixelMin = ossim::nan();
+   theClampPixelMax = ossim::nan();
+   theClipPixelMin = ossim::nan();
+   theClipPixelMax = ossim::nan();
+   
+   if(argumentParser.read("--annotate", stringParam))
+   {
+      theAnnotationTemplate = ossimFilename(tempString);
+   }
+   if(argumentParser.read("-t", stringParam)   ||
+      argumentParser.read("--thumbnail", stringParam))
+   {
+      ossimString comma (",");
+      if (tempString.contains(comma))
+      {
+         theThumbnailSize.x = tempString.before(comma).toInt();
+         theThumbnailSize.y = tempString.after(comma).toInt();
+      }
+      else
+      {
+         theThumbnailSize.x = tempString.toInt();
+         theThumbnailSize.y = 0;
+      }
+      theBuildThumbnailFlag = true;
+   }
+
+   theReaderProperties.clear();
+   while(argumentParser.read("--reader-prop", stringParam))
+   {
+      std::vector<ossimString> splitArray;
+      tempString.split(splitArray, "=");
+      if(splitArray.size() == 2)
+      {
+         theReaderProperties.insert(std::make_pair(splitArray[0], splitArray[1]));
+      }
+   }
+
+   if(argumentParser.read("-w", stringParam)   ||
+      argumentParser.read("--writer", stringParam))
+   {
+      theWriterType = tempString;
+   }
+
+   theWriterProperties.clear();
+   
+   while(argumentParser.read("--writer-prop", stringParam))
+   {
+      std::vector<ossimString> splitArray;
+      tempString.split(splitArray, "=");
+      if(splitArray.size() == 2)
+      {
+         theWriterProperties.insert(std::make_pair(splitArray[0], splitArray[1]));
+      }
+   }
+         
+   if(argumentParser.read("--slave-buffers", stringParam))
+   {
+      theSlaveBuffers = tempString;
+   }
+   if(argumentParser.read("--cut-center-ll", doubleParam, doubleParam2))
+   {
+      theCutOrigin.lat = tempDouble;
+      theCutOrigin.lon = tempDouble2;
+      theCutOriginUnit = OSSIM_DEGREES;
+      theCutOriginType = ossimOrthoIgen::OSSIM_CENTER_ORIGIN;
+   }
+   if(argumentParser.read("--cut-radius-meters", doubleParam))
+   {
+      theCutDxDy.x = tempDouble;
+      theCutDxDy.y = tempDouble;
+      theCutDxDyUnit = OSSIM_METERS;
+   }
+   if(argumentParser.read("--cut-bbox-ll", doubleParam, doubleParam2, doubleParam3, doubleParam4))
+   {
+      minY = tempDouble;
+      minX = tempDouble2;
+      maxY = tempDouble3;
+      maxX = tempDouble4;
+      theCutOriginUnit = OSSIM_DEGREES;
+      theCutOriginType = ossimOrthoIgen::OSSIM_UPPER_LEFT_ORIGIN;
+      theCutOrigin.lat = maxY;
+      theCutOrigin.lon = minX;
+      theCutDxDy.lat   = (maxY-minY);
+      if ( (maxX < 0.0) && (minX >= 0.0) )
+      {
+         //---
+         // Min is eastern hemisphere, max is western. Crossed the international date line.
+         // Add 360 to make it positive.
+         //
+         // Note no check for just max < min here???  Perhaps throw exception.(drb)
+         //---
+         maxX += 360.0;
+      }      
+      theCutDxDy.lon   = (maxX-minX);
+      theCutDxDyUnit   = OSSIM_DEGREES;
+   }
+   if(argumentParser.read("--cut-bbox-en", doubleParam, doubleParam2, doubleParam3, doubleParam4))
+   {
+      minX = tempDouble;
+      minY = tempDouble2;
+      maxX = tempDouble3;
+      maxY = tempDouble4;
+      theCutOriginUnit = OSSIM_METERS;
+      theCutOriginType = ossimOrthoIgen::OSSIM_UPPER_LEFT_ORIGIN;
+      theCutOrigin.x = minX;
+      theCutOrigin.y = maxY;
+      theCutDxDy.x   = (maxX-minX);
+      theCutDxDy.y   = (maxY-minY);
+      theCutDxDyUnit   = OSSIM_METERS;
+   }
+   if(argumentParser.read("--cut-pixel-width-height", doubleParam, doubleParam2))
+   {
+      if((ossim::isnan(minX) == false)&&
+         (ossim::isnan(minY) == false)&&
+         (ossim::isnan(maxX) == false)&&
+         (ossim::isnan(maxY) == false))
+      {
+         theDeltaPerPixelOverride = ossimDpt(theCutDxDy.x/(tempDouble-1),
+                                             theCutDxDy.y/(tempDouble2-1));
+         theDeltaPerPixelUnit     = theCutDxDyUnit;
+      }
+      else
+      {
+         theCutOrigin.makeNan();
+         ossimNotify(ossimNotifyLevel_WARN) << "Can't have option --cut-pixel-width-height without --cut-bbox-ll" << std::endl;
+      }
+   }
+   
+   int num_params = argumentParser.numberOfParams("--degrees", doubleParam);
+   if (num_params == 1)
+   {
+      argumentParser.read("--degrees", doubleParam);
+      theDeltaPerPixelUnit = OSSIM_DEGREES;
+      theDeltaPerPixelOverride.x = tempDouble;
+      theDeltaPerPixelOverride.y = tempDouble;
+   }
+   else if (num_params == 2)
+   {
+      argumentParser.read("--degrees", doubleParam, doubleParam2);
+      theDeltaPerPixelUnit = OSSIM_DEGREES;
+      theDeltaPerPixelOverride.x = tempDouble;
+      theDeltaPerPixelOverride.y = tempDouble2;
+   }
+
+   // The three histogram options are mutually exclusive:
+   bool histo_op_selected = false;
+   if(argumentParser.read("--hist-match", stringParam))
+   {
+      ossimFilename target_image (tempString);
+      histo_op_selected = true;
+      
+      // Check for histogram matching request and initialize for that:
+      if (target_image.isReadable())
+      {
+         // Establish target histogram file:
+         theTargetHistoFileName = target_image;
+         theTargetHistoFileName.setExtension("his");
+         if (!theTargetHistoFileName.isReadable())
+         {
+            ossimNotify(ossimNotifyLevel_NOTICE)<<"Target histogram file <" << theTargetHistoFileName 
+               << "> not found. Cannot perform histogram matching." << std::endl;
+            theTargetHistoFileName.clear();
+         }
+      }
+   }
+   if(argumentParser.read("--hist-stretch", doubleParam, doubleParam2))
+   {
+      if (histo_op_selected)
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "Cannot specify nore than one histogram operation. "
+            " Ignoring --hist-stretch option." << std::endl;
+      }
+      else
+      {
+         theLowPercentClip = tempDouble;
+         theHighPercentClip = tempDouble2;
+         histo_op_selected = true;
+      }
+   }
+   if(argumentParser.read("--hist-std-stretch", stringParam))
+   {
+      if (histo_op_selected)
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "Cannot specify nore than one histogram operation. "
+            " Ignoring --hist-stretch option." << std::endl;
+      }
+      else
+      {
+         theStdDevClip = tempString.toInt32();
+         histo_op_selected = true;
+         if ((theStdDevClip < 1) || (theStdDevClip > 3))
+         {
+            ossimNotify(ossimNotifyLevel_WARN) << "Invalid standard deviation value provided with"
+               " --hist-std-stretch option. Only 1,2, or 3 allowed. Ignoring option."<< std::endl;
+         }
+      }
+   }
+   if(argumentParser.read("--hist-auto-minmax"))
+   {
+      if (histo_op_selected)
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "Cannot specify nore than one histogram operation. "
+            " Ignoring --hist-auto-minmax option." << std::endl;
+      }
+      else
+         theUseAutoMinMaxFlag = true;
+   }
+
+   num_params = argumentParser.numberOfParams("--meters", doubleParam);
+   if (num_params == 1)
+   {
+      argumentParser.read("--meters", doubleParam);
+      theDeltaPerPixelUnit = OSSIM_METERS;
+      theDeltaPerPixelOverride.x = tempDouble;
+      theDeltaPerPixelOverride.y = tempDouble;
+   }
+   else if (num_params == 2)
+   {
+      argumentParser.read("--meters", doubleParam, doubleParam2);
+      theDeltaPerPixelUnit = OSSIM_METERS;
+      theDeltaPerPixelOverride.x = tempDouble;
+      theDeltaPerPixelOverride.y = tempDouble2;
+   }
+
+   if(argumentParser.read("--no-cache"))
+   {
+      theCacheExcludedFlag = true;
+   }
+
+   if(argumentParser.read("--output-radiometry", stringParam))
+   {
+      theOutputRadiometry = tempString;
+   }
+
+   if(argumentParser.read("--scale-to-8-bit"))
+   {
+      if (theOutputRadiometry.empty())
+         theOutputRadiometry = "U8";
+   }
+
+   if (argumentParser.read("--stdout"))
+   {
+#if defined(_WIN32)
+      // In Windows, cout is ASCII by default. 
+      // Let's change it over to binary mode.
+      int result = _setmode( _fileno(stdout), _O_BINARY );
+      if( result == -1 )
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimOrthoIgen::initialize WARNING:"
+            << "\nCannot set standard output mode to binary."
+            << std::endl;
+         return;
+      }
+#endif
+
+      theStdoutFlag = true;
+   }
+   
+   if(argumentParser.read("--writer-template", stringParam))
+   {
+      theWriterTemplate = tempString;
+   }
+   if(argumentParser.read("--tiling-template", stringParam))
+   {
+      theTilingTemplate = ossimFilename(tempString);
+   }
+   if(argumentParser.read("--chain-template", stringParam))
+   {
+      theChainTemplate = ossimFilename(tempString);
+   }
+   if(argumentParser.read("--combiner-template", stringParam))
+   {
+      theCombinerTemplate = ossimFilename(tempString);
+   }
+   
+   theGeoScalingLatitude = ossim::nan();
+
+   if (argumentParser.read("--utm"))
+   {
+      theProjectionType = OSSIM_UTM_PROJECTION;
+      theProjectionName = "ossimUtmProjection";
+   }
+   else if(argumentParser.read("--geo"))
+   {
+      theProjectionType = OSSIM_GEO_PROJECTION;
+      theProjectionName = "ossimEquDistCylProjection";
+      theGeoScalingLatitude = 0.0;
+   }
+   else if(argumentParser.read("--input-proj"))
+   {
+      theProjectionType = OSSIM_INPUT_PROJECTION;
+   }
+   else if (argumentParser.read("--srs", stringParam))
+   {
+      theCrsString=tempString;
+      theProjectionType = OSSIM_SRS_PROJECTION;
+   }
+
+   if(argumentParser.read("--view-template", stringParam))
+   {
+      theTemplateView = ossimFilename(tempString);
+      theProjectionType = OSSIM_EXTERNAL_PROJECTION;
+   }
+
+   if(argumentParser.read("--geo-scaled", doubleParam))
+   {
+      theProjectionType = OSSIM_GEO_PROJECTION;
+      theProjectionName = "ossimEquDistCylProjection";
+      if ( (tempDouble < 90.0) && (tempDouble > -90.0) )
+      {
+         theGeoScalingLatitude = tempDouble;
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimOrthoIgen::initialize WARNING:"
+            << "\nLatitude out  of range!  Must be between -90 and 90."
+            << std::endl;
+      }
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimOrthoIgen::initialize DEBUG:"
+            << "\ngeographicOriginOfLatitude:  " << theGeoScalingLatitude
+            << std::endl;
+      }
+   }
+
+   if(argumentParser.read("--geo-auto-scaled"))
+   {
+      theProjectionType = OSSIM_GEO_PROJECTION;
+      theProjectionName = "ossimEquDistCylProjection";
+      theGeoScalingLatitude = 999.0; // Flags computation of center lat for scaling
+   }
+
+   if(argumentParser.read("--combiner-type", stringParam))
+      theCombinerType = tempString;
+
+   if(argumentParser.read("--resample-type", stringParam))
+   {
+      theResamplerType = tempString;
+   }
+   if(argumentParser.read("--supplementary-directory", stringParam) ||
+      argumentParser.read("--support", stringParam))
+   {
+      theSupplementaryDirectory = ossimFilename(tempString);
+   }
+
+   if (argumentParser.read("--clip-to-valid-rect", stringParam))
+   {
+      theClipToValidRectFlag = tempString.toBool();
+   }
+
+   if(argumentParser.read("--mask", stringParam))
+   {
+     theMaskShpFile = tempString;
+   }
+
+   // Pixel flipper control options:
+   if (argumentParser.read("--clip-pixels", doubleParam, doubleParam2))
+   {
+      theClipPixelMin = tempDouble;
+      theClipPixelMax = tempDouble2;
+   }
+   if (argumentParser.read("--clamp-pixels", doubleParam, doubleParam2))
+   { 
+      theClampPixelMin = tempDouble;
+      theClampPixelMax = tempDouble2;
+   }
+   if (argumentParser.read("--replacement-mode", stringParam))
+   { 
+      thePixelReplacementMode = tempString;
+   }
+
+   // Threading:
+   num_params = argumentParser.numberOfParams("--threads", uintParam);
+   if (num_params == 0)   // No param means system decides optimal thread count
+   {
+      argumentParser.read("--threads");
+      theThreadCount = 0; // Flags system-resolved
+   }
+   else if (num_params == 1)
+   {
+      argumentParser.read("--threads", uintParam);
+      theThreadCount = (ossim_uint32) tempUint; 
+   }
+
+   if(traceDebug())
+   {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimOrthoIgen::initialize DEBUG:"
+            << "Leaving..... " 
+            << std::endl;
+   }
+}
+
+//*************************************************************************************************
+// Adds any file specifications to the files list
+//*************************************************************************************************
+void ossimOrthoIgen::addFiles(ossimArgumentParser& argumentParser,
+                              bool withDecoding,
+                              ossim_uint32 startIdx)
+{
+   ossim_uint32 idx = startIdx;
+   ossim_uint32 last_idx = argumentParser.argc()-1;
+   while(argumentParser.argv()[idx] && (idx < last_idx))
+   {
+     ossimString file_spec = argumentParser.argv()[idx];
+     if (file_spec.contains(".src"))
+     {
+        // input file spec provided via src file. Need to parse it:
+        addSrcFile(ossimFilename(file_spec));
+     }
+     else
+     {
+        // Filename with optional switches explicitly provided on command line:
+        parseFilename(file_spec, withDecoding);
+     }
+     ++idx;
+   }
+
+   // The last filename left on the command line should be the product filename:
+   theProductFilename = argumentParser.argv()[last_idx];
+}
+
+//*************************************************************************************************
+// Performs the top-level management of image generation
+//*************************************************************************************************
+bool ossimOrthoIgen::execute()
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimOrthoIgen::execute DEBUG: Entered ..."
+         << std::endl;
+   }
+//   double start=0, stop=0;
+
+   if(theSrcRecords.size() < 1)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimOrthoIgen::execute WARNING: No filenames to process"
+         << std::endl;
+      return false;
+   }
+
+   if (!theCrsString.empty() && !theProductFilename.empty())
+   {
+     if ((theProductFilename.ext().upcase() == "KMZ" || theProductFilename.ext().upcase() == "KML") 
+       && theCrsString.upcase() != "EPSG:4326")
+     {
+       ossimNotify(ossimNotifyLevel_FATAL)
+         << "ossimOrthoIgen::execute ERROR: Unsupported projection for kmz or kml"
+         << std::endl;
+       return false;
+     }
+   }
+
+   if(ossimMpi::instance()->getRank() == 0)
+   {
+      try
+      {
+         setupIgenChain();
+      }
+      catch (const ossimException& e)
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << e.what() << std::endl;
+         }
+         throw; // re-throw exception
+      }
+
+      if (traceLog())
+      {
+         generateLog();
+      }
+   }
+
+   try
+   {
+      // theProductProjection->print(cout) << endl;
+      outputProduct();
+   }
+   catch(const ossimException& e)
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << e.what() << std::endl;
+      }
+      throw; // re-throw
+   }
+   
+   return true;
+}
+
+//*************************************************************************************************
+// METHOD
+//*************************************************************************************************
+void ossimOrthoIgen::clearFilenameList()
+{
+   theSrcRecords.clear();
+}
+
+//*************************************************************************************************
+// Parses the .src file specified in the command line. These contain an alternate specification
+// of input file and associated attributes as a KWL.
+//*************************************************************************************************
+void ossimOrthoIgen::addSrcFile(const ossimFilename& src_file)
+{
+   if (!src_file.isReadable())
+      return;
+
+   ossimKeywordlist src_kwl;
+   src_kwl.setExpandEnvVarsFlag(true);
+   if ( src_kwl.addFile(src_file) == false ) return;
+
+   unsigned int image_idx = 0;
+   // int entry = -1;
+
+   // Loop to read all image file entries:
+   double sum_weights = 0;
+   while (true)
+   {
+      ossimSrcRecord src_record(src_kwl, image_idx++);
+      if (!src_record.valid()) 
+         break;
+
+      // Check for the presence of separate RGB file specs in this SRC record. This indicates 
+      // special processing. (comment added OLK 01/11)
+      if (src_record.isRgbData())
+      {
+         for (ossim_uint32 rgb_index = 0; rgb_index < 3; rgb_index++)
+         {
+            // This call creates another band-specific ossimSrcRecord that is pushed onto 
+            // theSrcRecords vector data member. (comment added OLK 01/11)
+            if (parseFilename(src_record.getRgbFilename(rgb_index), true))
+            {
+               // The parseFilename call pushes the R, G, or B band onto the back of theSrcRecords 
+               // vector. Set some additional attributes on this last entry. (OLK 01/11)
+               theSrcRecords.back().setRgbDataBool(true);
+               theSrcRecords.back().setHistogramOp(src_record.getRgbHistogramOp(rgb_index));
+               theSrcRecords.back().setHistogram(src_record.getRgbHistogramPath(rgb_index));
+               theSrcRecords.back().setOverview(src_record.getRgbOverviewPath(rgb_index));
+            }
+         }
+      }
+      else
+      {
+         // Not RGB data, so treat as conventional image: (comment added OLK 01/11)
+         theSrcRecords.push_back(src_record);
+         sum_weights += src_record.getWeight();
+
+         //if the vector file exists, set the mosaic combiner type to ossimBlendMosaic
+         if (src_record.isVectorData())
+            theCombinerType = "ossimBlendMosaic";
+      }
+   }
+
+   double max_weight = (sum_weights > 100.0 ? sum_weights : 100.0);
+   double num_entries = (double)theSrcRecords.size();
+   double weight; 
+   vector<ossimSrcRecord>::iterator iter = theSrcRecords.begin();
+   while (iter != theSrcRecords.end())
+   {
+      if (sum_weights > 0.0)
+      {
+         // Somebody declared opacity, so need to share the remaining contributions among
+         // other images:
+         theCombinerType = "ossimBlendMosaic";
+         if (iter->getWeight() == 0.0)
+         {
+            // No weight has been assigned for this image, so use default remaining partial
+            if (num_entries == 1.0)
+               weight = 1.0; // This is the only image, so full weight
+            else
+            {
+               // share remaining contributions:
+               weight = (1.0 - sum_weights/max_weight)/(num_entries - 1); 
+               if (weight < 0.01)
+                  weight = 0.01;
+            }
+         }
+         else
+         {
+            // An opacity value was specified for this
+            weight = iter->getWeight()/max_weight;
+         }
+      }
+      else
+      {
+         // No opacity values were specified, so simply use the default equal share. Note that the
+         // mosaic may not even be of type ossimBlendMosaic:
+         weight = 100.0/num_entries; // default if no opacity specified
+      }
+
+      iter->setWeight(weight);
+      iter++;
+   }
+}
+
+//*************************************************************************************************
+// METHOD
+//*************************************************************************************************
+void ossimOrthoIgen::setDefaultValues()
+{
+   theBuildThumbnailFlag = false;
+   theDeltaPerPixelUnit = OSSIM_UNIT_UNKNOWN;
+   theDeltaPerPixelOverride.makeNan();
+   theTemplateView = "";
+   theProjectionType = OSSIM_UNKNOWN_PROJECTION;
+   theGeoScalingLatitude = ossim::nan();
+   theCombinerType = "ossimImageMosaic";
+   theResamplerType = "nearest neighbor";
+   theTilingTemplate = "";
+   theTilingFilename = "";
+   theSupplementaryDirectory = "";
+   theSlaveBuffers = "2";
+   clearFilenameList();
+   theLowPercentClip = ossim::nan();
+   theHighPercentClip = ossim::nan();
+   theCutOrigin.makeNan();
+   theCutDxDy.makeNan();
+   theCutOriginUnit   = OSSIM_UNIT_UNKNOWN;
+   theCutDxDyUnit     = OSSIM_UNIT_UNKNOWN;
+
+   // PIXEL_IS_AREA HACK -- Set the assumed pixel alignment type to "area". Upon the first occurrence
+   // of a pixel-is-point entry, this property will revert to point. THIS NEEDS TO BE
+   // REMOVED WHEN THE EW GUI PROVIDES FOR THE USER TO SET THIS PROPERTY (OLK 09/11):
+   thePixelAlignment = OSSIM_PIXEL_IS_AREA; // not a default, but necessary for later logic
+}
+
+//*************************************************************************************************
+// Initializes the processing chain from the information on the command line
+//*************************************************************************************************
+void ossimOrthoIgen::setupIgenChain()
+{
+   if (traceDebug())
+      ossimNotify(ossimNotifyLevel_DEBUG)<< "ossimOrthoIgen::setupIgenChain DEBUG: Entered ..."<< std::endl;
+
+   setupTiling();
+
+   if (theSlaveBuffers == "")
+      theNumberOfTilesToBuffer = 2;
+   else
+      theNumberOfTilesToBuffer = theSlaveBuffers.toLong();
+
+   if(theProductFilename.empty())
+      throw(ossimException(std::string("Must supply an output file.")));
+
+   // Create the output mosaic object, to be connected to its inputs later:
+   ossimKeywordlist templateKwl;
+   templateKwl.clear();
+   ossimRefPtr<ossimImageCombiner> mosaicObject = 0;
+   ossimRefPtr<ossimImageCombiner> bandMergeObject = 0;
+   if(theCombinerTemplate.exists())
+   {
+      templateKwl.addFile(theCombinerTemplate);
+      mosaicObject = PTR_CAST(ossimImageCombiner, 
+                              ossimObjectFactoryRegistry::instance()->createObject(templateKwl));
+   }
+   if (!mosaicObject.valid())
+   {
+      mosaicObject = PTR_CAST(ossimImageCombiner, 
+         ossimObjectFactoryRegistry::instance()->createObject(theCombinerType));
+      if(!mosaicObject.valid())
+      {
+         mosaicObject = PTR_CAST(ossimImageMosaic, ossimObjectFactoryRegistry::instance()->
+            createObject(ossimString("ossimImageMosaic")));
+      }
+   }
+   
+   // Keep this pointer around for special processing if blend mosaic:
+   ossimBlendMosaic* obm = PTR_CAST(ossimBlendMosaic, mosaicObject.get());
+
+   // An orthomosaic implies that all input images are already orthorectified to a common projection
+   // so the input chains do not require a renderer:
+   bool orthoMosaic = (PTR_CAST(ossimOrthoImageMosaic, mosaicObject.get()) != 0);
+
+   // Establish default individual input chain from template, if any:
+   templateKwl.clear();
+   ossimRefPtr<ossimImageChain> default_single_image_chain = 0;
+   if(theChainTemplate.exists())
+   {
+      templateKwl.addFile(theChainTemplate);
+      ossimObject* obj = 0;
+      if(templateKwl.find("type"))
+         obj = ossimObjectFactoryRegistry::instance()->createObject(templateKwl);
+      else if(templateKwl.find("object1.type"))
+         obj = ossimObjectFactoryRegistry::instance()->createObject(templateKwl, "object1.");  
+      default_single_image_chain = PTR_CAST(ossimImageChain, obj);
+   }
+   if(!default_single_image_chain.valid())  // then create a default rendering chain
+   {
+      default_single_image_chain = new ossimImageChain;
+      {
+         // Only need a renderer if an output projection or an explicit GSD was specified.
+         if(!orthoMosaic)
+         {
+            ossimImageRenderer* renderer   = new ossimImageRenderer;
+            if (renderer->getResampler())
+               renderer->getResampler()->setFilterType(theResamplerType);
+            default_single_image_chain->addChild(renderer);
+         }
+      }
+   }
+
+   ossim_uint32 num_inputs = (ossim_uint32)theSrcRecords.size();
+   ossim_uint32 idx;
+   ossimString prefix ("object1.object");
+   theReferenceProj = 0;
+
+   // Loop over each input image file to establish a single image chain that will be added to the
+   // output mosaic:
+   ossimImageSource* current_source = 0;
+   for(idx = 0; idx < num_inputs; ++idx)
+   {
+      // first lets add an input handler to the chain:
+      ossimFilename input  = theSrcRecords[idx].getFilename();
+      ossimRefPtr<ossimImageHandler> handler = ossimImageHandlerRegistry::instance()->open(input);
+      if(!handler.valid())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "Could not open input file <" << input << ">. "
+            << "Skipping this entry." << std::endl;
+         continue;
+      }
+
+      // Pass on any reader properties if there are any.
+      ossimPropertyInterface* propInterface = (ossimPropertyInterface*)handler.get();
+      PropertyMap::iterator iter = theReaderProperties.begin();
+      while(iter != theReaderProperties.end())
+      {
+         propInterface->setProperty(iter->first, iter->second);
+         ++iter;
+      }
+
+      // Presently, handler->loadState() is called only on vector data, though in the future we
+      // should stuff many of the members in ossimSrcRecord in a KWL (similar to what is currently
+      // done with vector properties) so that the handler is initialized via loadState() instead of 
+      // individual calls to set methods.  OLK 10/10
+      if (theSrcRecords[idx].isVectorData())
+         handler->loadState(theSrcRecords[idx].getAttributesKwl());
+
+      std::vector<ossim_uint32> entryList;
+      if(theSrcRecords[idx].getEntryIndex() > -1 )
+         entryList.push_back(theSrcRecords[idx].getEntryIndex());
+      else
+         handler->getEntryList(entryList);
+
+      // Input image file may have multiple entries. Loop over each and establish single image
+      // chains for each:
+      ossim_uint32 entryIdx = 0;
+      for(entryIdx = 0; entryIdx < entryList.size(); ++entryIdx)
+      {
+         // Instantiate the chain for one input image source. Copy existing default chain
+         // which may already possess a renderer (so don't do any addFirst()!):
+         ossimImageChain* singleImageChain = (ossimImageChain*) default_single_image_chain->dup();
+
+         // Establish the image handler for this particular frame. This may be just
+         // the handler already opened in the case of single image per file:
+          ossimImageHandler* img_handler = 0;
+         if (entryList.size() == 1)
+            img_handler = handler.get();
+         else
+            img_handler = (ossimImageHandler*)handler->dup();
+
+         // The user can specify an external "support" (a.k.a. supplementary directory) several ways
+         if ( theSupplementaryDirectory.empty() == false )
+         {
+            img_handler->setSupplementaryDirectory( theSupplementaryDirectory );
+         }
+         else if (theSrcRecords[idx].getSupportDir().empty() == false)
+         {
+            img_handler->setSupplementaryDirectory(theSrcRecords[idx].getSupportDir());
+         }
+         else if (theSrcRecords[idx].getOverviewPath().empty() == false)
+         {
+            if (theSrcRecords[idx].getOverviewPath().isDir())
+               img_handler->setSupplementaryDirectory(theSrcRecords[idx].getOverviewPath());
+            else
+               img_handler->setSupplementaryDirectory(theSrcRecords[idx].getOverviewPath().path());
+         }
+         img_handler->setCurrentEntry(entryList[entryIdx]);
+         if ( img_handler->hasOverviews() )
+         {
+            img_handler->openOverview();
+         }
+         if (theSrcRecords[idx].isRgbData() && theSrcRecords[idx].getBands().size() > 0 && 
+            theSrcRecords[idx].getOverviewPath().empty())
+         {
+            img_handler->setOutputBandList(theSrcRecords[idx].getBands());
+         }
+
+         // Image handler is ready to insert on the input side of the chain:
+         singleImageChain->addLast(img_handler);
+         current_source = img_handler;
+
+         // PIXEL_IS_AREA HACK -- Scan the pixel alignment to see if all inputs are "area",
+         // in which case we override the command-line writer property setting. THIS NEEDS TO BE
+         // REMOVED WHEN THE EW GUI PROVIDES FOR THE USER TO SET THIS PROPERTY (OLK 09/11):
+         if (img_handler->getPixelType() == OSSIM_PIXEL_IS_POINT)
+            thePixelAlignment = OSSIM_PIXEL_IS_POINT;
+
+         // This call will check for the presence of a raster mask file alongside the image,
+         // and insert the mask filter in the chain if present:
+         current_source = setupRasterMask(singleImageChain, theSrcRecords[idx]);
+
+         // If this is the first input chain, use it as the reference projection to help with
+         // the instantiation of the product projection (the view):
+         if (!theReferenceProj.valid())
+         {
+            ossimRefPtr<ossimImageGeometry> geom = img_handler->getImageGeometry();
+            if ( geom.valid() ) 
+               theReferenceProj = geom->getProjection();
+         }
+
+         // Insert a partial-pixel flipper to remap null-valued pixels to min.  
+         // This is set via preference keyword "orthoigen.flip_null_pixels"  
+         current_source = setupPixelFlipper(singleImageChain, theSrcRecords[idx]);
+
+         // Install a band selector if needed:
+         if (theSrcRecords[idx].getBands().size() && (img_handler->getNumberOfOutputBands() > 1))
+         {
+            ossim_uint32 bands = img_handler->getNumberOfOutputBands();
+            bool validBand = true;
+            for (ossim_uint32 i = 0; i < theSrcRecords[idx].getBands().size(); ++i)
+            {
+               if (theSrcRecords[idx].getBands()[i] >= bands)
+               {
+                  validBand = false;
+                  ossimNotify(ossimNotifyLevel_FATAL) << " ERROR:" << "\nBand list range error!"
+                     << "\nHighest available band:  " << bands << std::endl;
+               }
+            }
+            if (validBand)
+            {
+               ossimRefPtr<ossimBandSelector> bs = new ossimBandSelector();
+               singleImageChain->insertRight(bs.get(), current_source);
+               bs->setOutputBandList(theSrcRecords[idx].getBands());
+               current_source = bs.get();
+            }
+         }
+
+         // Install a histogram object if needed. This inserts just to the left of the resampler.
+         setupHistogram(singleImageChain, theSrcRecords[idx]);
+
+         // Add a cache just to the left of the resampler.
+         if (!theCacheExcludedFlag)
+            addChainCache(singleImageChain);
+
+         // Add the single image chain to the mosaic and save it to the product spec file:
+         singleImageChain->makeUniqueIds();
+
+         if (theSrcRecords[idx].isRgbData())
+         {
+            if (bandMergeObject == 0)
+            {
+               bandMergeObject = new ossimBandMergeSource();
+            }
+            bandMergeObject->connectMyInputTo(singleImageChain);
+            singleImageChain->changeOwner(bandMergeObject.get());
+         }
+         else
+         {
+            mosaicObject->connectMyInputTo(singleImageChain);
+            singleImageChain->changeOwner(mosaicObject.get());
+         }
+         //theContainer->addChild(singleImageChain);
+
+         // Set the weight for this image when doing a blend mosaic:
+         if (obm)
+            obm->setWeight(idx, theSrcRecords[idx].getWeight());
+      }
+   }
+
+   // Finished initializing the inputs to the mosaic. Add the mosaic to the product chain.
+   theProductChain = new ossimImageChain;
+   if (bandMergeObject != 0)
+   {
+      theProductChain->addFirst(bandMergeObject.get());
+   }
+   theProductChain->addFirst(mosaicObject.get());
+   
+   // Now need to pass the product chain through the histogram setup for possible remapper given 
+   // target histogram (used when histo-matching selected):
+   setupHistogram();
+
+   // When mosaicking common input projections without rendering each, need to add a renderer to the
+   // mosaic for reprojecting to output projection:
+   if(orthoMosaic)
+   {
+      ossimImageRenderer* renderer   = new ossimImageRenderer;
+      renderer->getResampler()->setFilterType(theResamplerType);
+      theProductChain->addFirst(current_source);
+   }
+
+   //---
+   // Now that "theProductChain" is initialized we must initialize elevation if needed as it can
+   // affect the tie point of the output projection.
+   //---
+   if ( isAffectedByElevation() )
+   {
+      ossimInit::instance()->initializeElevation();
+
+      // Chain gsd's affected by elevation so recompute.
+      reComputeChainGsds();
+   }
+
+   // Set up the output product's projection:
+   setupProjection();
+
+   // Annotation setup...
+   setupAnnotation();
+
+   // Output rect cutter:
+   setupCutter();
+
+   // Output radiometry filter:
+   setupOutputRadiometry();
+
+   // After all the connections have been established, add the product chain to the overall 
+   // product container. This container will also hold the writer object.
+   theContainer->addChild(theProductChain.get());
+
+   // Lastly, set up the write object (object2):
+   setupWriter();
+
+}
+
+//*************************************************************************************************
+// Initializes the Cut Rect filter to crop the mosaic to specified rectangle.
+// This method assumes that the view (theProductProjection) has already been propagated to all 
+// the renderers (via call to setView()). This was done by prior call to setupProjection().
+//*************************************************************************************************
+void ossimOrthoIgen::setupCutter()
+{
+   // The command line accepts cut rect specification in several formats. Consolidate them to
+   // a common form (UL tiepoint <theCutOrigin> and distance to LR pixel center <theCutDxDy>. This
+   // method also updates the product projection with new bounds:
+   consolidateCutRectSpec();
+
+   ossimImageSource* input_source = theProductChain->getFirstSource();
+   if((theCutDxDy.hasNans()&&theMaskShpFile.empty())||!theProductProjection.valid()||!input_source)
+      return;
+
+   //user may pass the shape filename with an query (e.g C:/myshp.shp|select * from myshp),
+   //parse the name of mask shape file here
+   ossimString query = "";
+   if (!theMaskShpFile.empty())
+   {
+     if (theMaskShpFile.contains("|"))
+     {
+       ossimString fileName = theMaskShpFile;
+       std::vector<ossimString> fileList = fileName.split("|");
+       if (fileList.size() > 1)
+       {
+         theMaskShpFile = fileList[0];
+         query = fileList[1];
+       }
+     }
+   }
+
+   if (!theMaskShpFile.exists())
+   {
+     if (theCutOriginUnit == OSSIM_METERS)  // projection in meters...
+     {
+       ossimEastingNorthingCutter* cutter = new ossimEastingNorthingCutter;
+       ossimDpt mpp (theProductProjection->getMetersPerPixel());
+       ossimDpt lr (theCutOrigin.x + theCutDxDy.x - mpp.x, theCutOrigin.y - theCutDxDy.y + mpp.y);
+       cutter->setView(theProductProjection.get());
+       cutter->setEastingNorthingRectangle(theCutOrigin, lr);
+       theProductChain->addFirst(cutter);
+     }
+     else // geographic projection, units = decimal degrees.
+     {
+       ossimGeoPolyCutter* cutter = new ossimGeoPolyCutter;
+       std::vector<ossimGpt> polygon;
+
+       ossimDpt dpp (theProductProjection->getDecimalDegreesPerPixel());
+       ossimGpt ul(theCutOrigin.lat,                        theCutOrigin.lon               );
+       ossimGpt ur(theCutOrigin.lat,                        theCutOrigin.lon + theCutDxDy.x - dpp.x);
+       ossimGpt lr(theCutOrigin.lat - theCutDxDy.y + dpp.y, theCutOrigin.lon + theCutDxDy.x - dpp.x);
+       ossimGpt ll(theCutOrigin.lat - theCutDxDy.y + dpp.y, theCutOrigin.lon               );
+
+       polygon.push_back(ul);
+       polygon.push_back(ur);
+       polygon.push_back(lr);
+       polygon.push_back(ll);
+
+       cutter->setView(theProductProjection.get());
+       cutter->setNumberOfPolygons(1);
+       cutter->setPolygon(polygon);
+       theProductChain->addFirst(cutter);
+     }
+   }
+   else
+   {
+     ossimIrect inputRect = input_source->getBoundingRect();
+
+     ossimGeoPolyCutter* exteriorCutter = new ossimGeoPolyCutter;
+     exteriorCutter->setView(theProductProjection.get());
+
+     ossimGeoPolyCutter* interiorCutter = NULL;
+
+     ossimRefPtr<ossimImageHandler> shpHandler = ossimImageHandlerRegistry::instance()->open(theMaskShpFile);
+     ossimEsriShapeFileInterface* shpInterface = PTR_CAST(ossimEsriShapeFileInterface, shpHandler.get());
+     if (shpInterface != NULL)
+     {
+       if (!query.empty())
+       {
+         shpInterface->setQuery(query);
+       }
+       std::multimap<long, ossimAnnotationObject*> features = shpInterface->getFeatureTable();
+       if (features.size() > 0)
+       {
+         std::multimap<long, ossimAnnotationObject*>::iterator it = features.begin();
+         while (it != features.end())
+         {
+           ossimAnnotationObject* anno = it->second;
+           if (anno != NULL)
+           {
+             ossimGeoAnnotationPolyObject* annoPoly = PTR_CAST(ossimGeoAnnotationPolyObject, anno);
+             ossimGeoAnnotationMultiPolyObject* annoMultiPoly = NULL;
+             if (annoPoly == NULL)
+             {
+                annoMultiPoly = PTR_CAST(ossimGeoAnnotationMultiPolyObject, anno);
+             }
+             if (annoPoly != NULL)
+             {
+               std::vector<ossimGpt> polygon;
+
+               //get the points of a polygon
+               std::vector<ossimGpt> points = annoPoly->getPoints();
+               for (ossim_uint32 i = 0; i < points.size(); i++)
+               {
+                 polygon.push_back(points[i]);
+               }
+
+               //get polygon type, if it is an internal polygon, initialize the internal cutter
+               ossimGeoAnnotationPolyObject::ossimPolyType polyType = annoPoly->getPolyType();
+               if (polyType == ossimGeoAnnotationPolyObject::OSSIM_POLY_INTERIOR_RING)
+               {
+                 if (interiorCutter == NULL)
+                 {
+                   interiorCutter = new ossimGeoPolyCutter;
+                   interiorCutter->setView(theProductProjection.get());
+                   interiorCutter->setCutType(ossimPolyCutter::OSSIM_POLY_NULL_INSIDE);
+                 }
+                 interiorCutter->addPolygon(polygon);
+               }
+               else
+               {
+                 exteriorCutter->addPolygon(polygon);
+               }
+             }
+             else if (annoMultiPoly != NULL)
+             {
+               std::vector<ossimGeoPolygon> multiPolys = annoMultiPoly->getMultiPolygon();
+               for (ossim_uint32 i = 0; i < multiPolys.size(); i++)
+               {
+                 ossimGeoPolygon geoPoly = multiPolys[i];
+                 std::vector<ossimGeoPolygon> holePolys = geoPoly.getHoleList();
+                 if (holePolys.size() > 0)
+                 {
+                   if (interiorCutter == NULL)
+                   {
+                     interiorCutter = new ossimGeoPolyCutter;
+                     interiorCutter->setView(theProductProjection.get());
+                     interiorCutter->setCutType(ossimPolyCutter::OSSIM_POLY_NULL_INSIDE);
+                   }
+                   for (ossim_uint32 j = 0; j < holePolys.size(); j++)
+                   {
+                      interiorCutter->addPolygon(holePolys[j]);
+                   }
+                 }
+                 exteriorCutter->addPolygon(multiPolys[i]);
+               }
+             }
+             else
+             {
+                throw(ossimException(std::string("The geometry type of the mask shape file is not polygon.")));
+             }
+           }
+           it++;
+         }
+       }
+     }
+
+     //if user define the cut box, add it to the image chain
+     ossimGeoPolyCutter* boundCutter = NULL;
+     if (!theCutDxDy.hasNans() && !theCutOrigin.hasNans())
+     {
+       std::vector<ossimGpt> bound;
+       if (theCutOriginUnit == OSSIM_METERS)
+       {
+          ossimDpt mpp (theProductProjection->getMetersPerPixel());
+         ossimGpt ul = theProductProjection->inverse(ossimDpt(theCutOrigin.x, theCutOrigin.y));
+         ossimGpt ur = theProductProjection->inverse(ossimDpt(theCutOrigin.x + theCutDxDy.x - mpp.x, theCutOrigin.y));
+         ossimGpt lr = theProductProjection->inverse(ossimDpt(theCutOrigin.x + theCutDxDy.x - mpp.x, theCutOrigin.y - theCutDxDy.y + mpp.y));
+         ossimGpt ll = theProductProjection->inverse(ossimDpt(theCutOrigin.x, theCutOrigin.y - theCutDxDy.y + mpp.y));
+
+         bound.push_back(ul);
+         bound.push_back(ur);
+         bound.push_back(lr);
+         bound.push_back(ll);
+       }
+       else
+       {
+          ossimDpt dpp (theProductProjection->getDecimalDegreesPerPixel());
+          ossimGpt ul(theCutOrigin.lat,                        theCutOrigin.lon               );
+          ossimGpt ur(theCutOrigin.lat,                        theCutOrigin.lon + theCutDxDy.x - dpp.x);
+          ossimGpt lr(theCutOrigin.lat - theCutDxDy.y + dpp.y, theCutOrigin.lon + theCutDxDy.x - dpp.x);
+          ossimGpt ll(theCutOrigin.lat - theCutDxDy.y + dpp.y, theCutOrigin.lon               );
+
+         bound.push_back(ul);
+         bound.push_back(ur);
+         bound.push_back(lr);
+         bound.push_back(ll);
+       }
+       boundCutter = new ossimGeoPolyCutter;
+
+       boundCutter->setView(theProductProjection.get());
+       boundCutter->setNumberOfPolygons(1);
+       boundCutter->setPolygon(bound);
+     }
+
+     if (boundCutter == NULL)
+     {
+        ossimIrect shpRect = shpHandler->getBoundingRect();
+        if (shpRect.width() > inputRect.width() && shpRect.height() > inputRect.height())
+        {
+           exteriorCutter->setRectangle(inputRect);
+        }
+     }
+     
+     theProductChain->addFirst(exteriorCutter);
+
+     if (interiorCutter != NULL)
+     {
+       theProductChain->addFirst(interiorCutter);
+     }
+
+     if (boundCutter != NULL)
+     {
+        theProductChain->addFirst(boundCutter);
+     }
+   }
+}
+
+//*************************************************************************************************
+// METHOD 
+//*************************************************************************************************
+void ossimOrthoIgen::setupWriter()
+{
+   if (!theProductChain.valid())
+      return;
+
+   ossimRefPtr<ossimImageFileWriter> writer = 0;
+   
+   if (theWriterType.size())
+   {
+       // User selected writer with -w or --writer option.
+      writer = ossimImageWriterFactoryRegistry::instance()->createWriter(theWriterType);
+   }
+   else if ( theWriterTemplate.size() && theWriterTemplate.exists() )
+   {
+      // User sent us a writer template.
+      ossimKeywordlist kwlTemplate;
+      kwlTemplate.addFile(theWriterTemplate);
+
+      // Try first with no prefix.
+      writer = ossimImageWriterFactoryRegistry::instance()->createWriter(kwlTemplate);
+      if ( !writer.valid() )
+         writer = ossimImageWriterFactoryRegistry::instance()->createWriter(kwlTemplate, "object2.");
+   }
+   else if ( theTilingFilename == "%SRTM%")
+   {
+      ossimKeywordlist kwlWriter;
+      kwlWriter.add("type", "ossimGeneralRasterWriter", true);
+      kwlWriter.add("byte_order", "big_endian");
+      writer = ossimImageWriterFactoryRegistry::instance()->createWriter(kwlWriter);
+      theProductFilename = theProductFilename.path();
+   }
+   else if (!theTilingFilename.empty())
+   {
+      if (theProductFilename.isDir())
+      {
+         theProductFilename = theProductFilename + "/" + theTilingFilename;
+      }
+   }
+
+   try
+   {
+      //---
+      // Set the output file name if not already set.
+      // NOTE: Could be outputing to stdout in which case outputFilename does not
+      // make sense.  Leaving here though to not break code downstream. (drb)
+      //---
+      if ( theProductFilename == ossimFilename::NIL )
+      {
+         throw(ossimException(std::string("Writer output filename not set.")));
+      }
+
+      //---
+      // Final check for writer.
+      //---
+      if ( !writer.valid() )
+      {
+         // Derive writer from the extension.
+         ossimFilename ext = theProductFilename.ext();
+         if ( ext.size() )
+            writer = ossimImageWriterFactoryRegistry::instance()->createWriterFromExtension(ext);
+
+         //---
+         // Lastly default to tiff.  Perhaps throw exception here instead. (drb)
+         //---
+         if( !writer.valid() )
+         {
+            writer = new ossimTiffWriter;
+            theProductFilename.setExtension("tif");
+         }
+      }
+
+      // PIXEL_IS_AREA HACK: Temporary patch to override command line alignment type with source
+      // image's alignment type. TO BE REMOVED ONCE EW GUI PROVIDES FOR USER-SETTING OF THIS 
+      // PROPERTY (OLK 09/11):
+      if (thePixelAlignment == OSSIM_PIXEL_IS_AREA)
+      {
+          ossimString pixelType ("pixel_type");
+          theWriterProperties.erase(pixelType);
+          theWriterProperties.insert(std::make_pair(pixelType, ossimString("area")));
+      }
+
+      //---
+      // Set writer filename, connect and add to writer to keyword list.
+      //---
+      if ( writer.valid() )
+      {
+         writer->setFilename(theProductFilename);
+         writer->connectMyInputTo(0, theProductChain.get());
+
+         ossimPropertyInterface* propInterface = (ossimPropertyInterface*)writer.get();
+         PropertyMap::iterator iter = theWriterProperties.begin();
+         while(iter != theWriterProperties.end())
+         {
+            propInterface->setProperty(iter->first, iter->second);
+            ++iter;
+         }
+         theContainer->addChild(writer.get());
+      }
+      else
+      {
+         throw(ossimException(std::string("Unable to create writer.")));
+      }
+   }
+   catch (const ossimException& e)
+   {
+      if (traceDebug())
+         ossimNotify(ossimNotifyLevel_DEBUG) << e.what() << std::endl;
+      throw; // re-throw exception
+   }
+}
+
+
+//*************************************************************************************************
+// This method establishes the output (view) projection of the product.
+// NOTE: Completely rewritten to simplify and reduce redundancy. OLK 3/10
+//*************************************************************************************************
+void ossimOrthoIgen::setupProjection()
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)<<"Entering ossimOrthoIgen::setupProjection():"<<std::endl;
+   }
+
+   theProductProjection = 0;
+
+   // Throw exception if no valid input image projection was established:
+   if(!theReferenceProj.valid())
+   {
+      std::string errMsg = "ossimOrthoIgen::setupProjection() -- Could not establish input image's "
+         "projection. Cannot setup output view.";
+      throw(ossimException(errMsg));
+   }
+
+   // Fetch the reference input projection first. Settings may be copied to the product projection:
+   ossimMapProjection* ref_map = PTR_CAST(ossimMapProjection, theReferenceProj.get());
+
+   // Now focus on establishing the output product projection.
+   // Consider externally specified geometry first:
+   if (theProjectionType == OSSIM_EXTERNAL_PROJECTION)
+   {
+      if (!theTemplateView.isReadable())
+      {
+         ossimString errMsg = "ossimOrthoIgen::setupProjection() -- Could not read the product "
+            "projection template file at <";
+         errMsg += theTemplateView;
+         errMsg += ">. Cannot establish output projection.";
+         throw(ossimException(errMsg));
+      }
+
+      // Default template format is no prefix, but consider alternate with prefix if first attempt 
+      // fails:
+      ossimKeywordlist templateKwl (theTemplateView);
+      ossimObjectFactoryRegistry* ofr = ossimObjectFactoryRegistry::instance();
+      ossimRefPtr<ossimObject> productObj = ofr->createObject(templateKwl, "product.projection.");
+      if(!productObj.valid())
+         productObj = ofr->createObject(templateKwl);
+      theProductProjection = PTR_CAST(ossimMapProjection, productObj.get());
+   }
+
+   // Geographic? (Assuming WGS 84 for now.)
+   else if (theProjectionType == OSSIM_GEO_PROJECTION)
+   {
+      theProductProjection = new ossimEquDistCylProjection();
+      ossimGpt gpt(0.0, 0.0);
+      if (theGeoScalingLatitude == 999.0) // flags that lat is to be computed
+      {
+        computeGeoScalingLatitude();
+        gpt = ossimGpt(theGeoScalingLatitude, 0.0);
+      }
+      else if (!ossim::isnan(theGeoScalingLatitude))
+        gpt = ossimGpt(theGeoScalingLatitude, 0.0);
+      theProductProjection->setOrigin(gpt);
+   }
+
+   // CRS code specified on the command line
+   else if (theProjectionType == OSSIM_SRS_PROJECTION)
+   {
+      ossimProjection* base_proj = 
+        ossimEpsgProjectionFactory::instance()->createProjection(theCrsString);
+
+      theProductProjection = PTR_CAST(ossimMapProjection, base_proj);
+      if(theProductProjection.valid())
+      {
+         // Reassign the type for geographic. Now we know
+         if (theProductProjection->isGeographic())
+         {
+            theProjectionType = OSSIM_GEO_PROJECTION;
+            ossimGpt gpt(0.0, 0.0);
+            if (!ossim::isnan(theGeoScalingLatitude))
+              gpt = ossimGpt(theGeoScalingLatitude, 0.0);
+            theProductProjection->setOrigin(gpt);
+         }
+      }
+      else
+      {
+         theProjectionType = OSSIM_UNKNOWN_PROJECTION;
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimOrthoIgen::setupProjection() WARNING:" << " Unsupported spatial reference system."
+            << " Will default to the projection from the input image."
+            << std::endl;
+      }
+   }
+
+   // UTM?
+   else if (theProjectionType == OSSIM_UTM_PROJECTION)
+   {
+      ossimUtmProjection* utm = new ossimUtmProjection;
+      ossimGpt refGpt;
+      theReferenceProj->lineSampleToWorld(ossimDpt(0,0), refGpt);
+
+      utm->setZone(refGpt);
+      utm->setHemisphere(refGpt);
+      theProductProjection = utm;
+   }
+
+   // None of the above?
+   else
+   {
+      // Either OSSIM_INPUT_PROJECTION or OSSIM_UNKNOWN_PROJECTION. In both cases
+      // just use the first image's input projection for the output. Need to make 
+      // sure the input_proj is a map projection though:
+      if (ref_map)
+      {
+         theProductProjection = PTR_CAST(ossimMapProjection, ref_map->dup());
+         theProjectionType = OSSIM_INPUT_PROJECTION; // just in case it was unknown before
+      }
+      else
+      {  
+         theProjectionType = OSSIM_GEO_PROJECTION;
+         theProductProjection = new ossimEquDistCylProjection();
+
+         ossimGpt gpt(0.0, 0.0);
+         if (!ossim::isnan(theGeoScalingLatitude))
+            gpt = ossimGpt(theGeoScalingLatitude, 0.0);
+         theProductProjection->setOrigin(gpt);
+      }  
+   }
+
+   // At this point there should be a valid output projection defined:
+   if (!theProductProjection.valid())
+   {
+      std::string errMsg = "ossimOrthoIgen::setupProjection() -- Could not establish valid output "
+         "projection";
+      throw(ossimException(errMsg));
+   }
+
+   // HACK (OLK 06/10): The projection may not have had the PCS code initialized even though it
+   // is an EPSG projection, so take this opportunity to identify a PCS for output:
+   ossim_uint32 pcs_code = theProductProjection->getPcsCode();
+   if (pcs_code == 0)
+   {
+      pcs_code = ossimEpsgProjectionDatabase::instance()->
+         findProjectionCode(*(theProductProjection.get()));
+      theProductProjection->setPcsCode(pcs_code);
+   }
+
+   // Bootstrap the process of establishing the mosaic tiepoint by setting it to the reference proj.
+   if (ref_map)
+      theProductProjection->setUlGpt(ref_map->getUlGpt());
+
+   // cout << "ref_map->getUlGpt(): " << ref_map->getUlGpt() << endl;
+
+   // Base class makes sure the product view projection is properly wired into the chain. 
+   setView();
+
+   // Set the desired image GSD. This is nontrivial due to the many ways GSD can be implied and/or
+   // explicitly provided. This method also does a setView before returning:
+   setProductGsd();
+
+   theProjectionName = theProductProjection->getProjectionName();
+
+   // At this point, the product projection will not have a tiepoint (UL corner coordinates)
+   // defined unless it is the same projection as the input reference. Need to set it now. Note that
+   // if a cut-rect is specified, the tie-point will be modified later in setupCutter()
+   establishMosaicTiePoint();
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimOrthoIgen::setupProjection DEBUG:"
+         << "Leaving...." << __LINE__
+         << std::endl;
+   }
+}
+
+//*************************************************************************************************
+// METHOD
+//*************************************************************************************************
+void ossimOrthoIgen::setupAnnotation()
+{
+   ossimImageSource* input_source = theProductChain->getFirstSource();
+   if (!input_source)
+      return;
+
+   if(theAnnotationTemplate.exists() == false)
+      return;
+   
+   ossimKeywordlist templateKwl;
+   if (templateKwl.addFile(theAnnotationTemplate) == false)
+      return;
+   
+   ossimRefPtr<ossimObject> obj = ossimObjectFactoryRegistry::instance()->
+      createObject(templateKwl, "object1.");
+   if (obj.valid())
+   {
+      ossimGeoAnnotationSource* oga = PTR_CAST(ossimGeoAnnotationSource, obj.get());
+      if (oga)
+      {
+         if (theProductProjection.valid())
+            oga->setGeometry(new ossimImageGeometry(0, theProductProjection.get())); 
+         theProductChain->addFirst(oga);
+      }
+   }
+   return;
+}
+
+//*************************************************************************************************
+// Set up multi-file tiling if indicated on the command line.
+//*************************************************************************************************
+bool ossimOrthoIgen::setupTiling()
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimOrthoIgen::setupTiling: Entered......" << std::endl;
+   }
+   ossimKeywordlist templateKwl;
+   ossimFilename outputFilename = theProductFilename;
+   theTilingEnabled = false;
+
+   if ((theTilingTemplate == "")||(!templateKwl.addFile(theTilingTemplate)))
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimOrthoIgen::setupTiling: Leaving......" << __LINE__ << std::endl;
+      }
+      return false;
+   }
+
+   ossimString prefix ("igen.tiling.");
+   while (1)
+   {
+      if(outputFilename.isDir())
+      {
+         if(templateKwl.find(prefix.chars(), "type"))
+         {
+            theTilingFilename = templateKwl.find(prefix.chars(),"tile_name_mask");
+            theTilingEnabled = true;
+            break;
+         }
+         else if (templateKwl.find(prefix.chars(), "tile_size") || templateKwl.find(prefix.chars(), "tile_source"))
+         {
+            theTilingFilename = templateKwl.find(prefix.chars(),"output_file_name");
+            theTilingEnabled = true;
+            break;
+         }
+      }
+      else
+      {
+         theTilingFilename = outputFilename.file();
+         if (!theTilingFilename.contains("%"))
+         {
+            ossimString fileNoExt = theTilingFilename.fileNoExtension();
+            ossimString ext = theTilingFilename.ext();
+            theTilingFilename = fileNoExt + "_%r%_%c%." + ext;
+         }
+         if(templateKwl.find(prefix.chars(), "type"))
+         {
+            templateKwl.add(prefix.chars(), "tile_name_mask", theTilingFilename.c_str(), true);
+            ossimFilename path (outputFilename.path());
+            theProductFilename = path;
+            theTilingEnabled = true;
+            break;
+         }
+         else if (templateKwl.find(prefix.chars(), "tile_size") || templateKwl.find(prefix.chars(), "tile_source"))
+         {
+            templateKwl.add(prefix.chars(), "output_file_name", theTilingFilename.c_str(), true);
+            ossimFilename path (outputFilename.path());
+            theProductFilename = path;
+            theTilingEnabled = true;
+            break;
+         }
+      }
+
+      // If we got here, then no matches were found in the template. Try again but without a prefix:
+      if (prefix.empty())
+         break;
+      prefix.clear();
+   }
+
+   // Initialize the tiling object if enabled:
+   if (templateKwl.find(prefix.chars(), "tile_size"))
+   {
+      theTiling = 0;
+      theTiling = new ossimTilingRect;
+   }
+
+   if (templateKwl.find(prefix.chars(), "tile_source"))
+   {
+      theTiling = 0;
+      theTiling = new ossimTilingPoly;
+   }
+
+   if (theTilingEnabled && !theTiling->loadState(templateKwl, prefix))
+      theTilingEnabled = false;
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimOrthoIgen::setupTiling: templateKwl = \n" << templateKwl << std::endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimOrthoIgen::setupTiling: Leaving......" << __LINE__ << std::endl;
+   }
+   
+   return true;
+}
+
+//*************************************************************************************************
+// Consolidates specification of bounding rect given various ways of specifying on the command
+// line. This avoids multiple, redundant checks scattered throughout the code. On exit:
+// 
+//   1. theCutOriginType is converted to OSSIM_UPPER_LEFT_ORIGIN
+//   2. theCutOrigin is converted to the proper coordinates (lat/lon or easting/northing) and
+//      associated theCutOriginUnits is assigned accordingly.
+//   3. theCutDxDy reflects the full size of the rect, in the units corresponding to the projection
+//      and associated theCutDxDyUnit is set to METERS for UTM, DEGREES for geographic
+//   4. The product projection's origin (image center) and tie point are updated to reflect the
+//      output rectangle.
+//
+//*************************************************************************************************
+void ossimOrthoIgen::consolidateCutRectSpec()
+{
+   if (!theProductProjection.valid() || theCutDxDy.hasNans() || theCutOrigin.hasNans())
+      return; 
+
+   if ((theCutDxDyUnit != OSSIM_METERS) && 
+       (theCutDxDyUnit != OSSIM_DEGREES) &&
+       (theCutDxDyUnit != OSSIM_UNIT_UNKNOWN))
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "ossimOrthoIgen::consolidateCutRectSpec: An unhandled"
+         " type of units was encountered. The cut rect needs to be specified in either meters or"
+         " degrees. The resulting cut rect and origin may be incorrect." << std::endl;
+      return;
+   }
+
+   ossimGpt originPLH;
+   ossimDpt resolution;
+
+   // Geographic Projection (lat/lon cut rect) requested?
+   if(theProductProjection->isGeographic()) 
+   {
+      // geographic projection; units need to be decimal degrees. First check for consistent origin:
+      if (theCutOriginUnit == OSSIM_METERS)
+      {
+         originPLH = theProductProjection->inverse(theCutOrigin);
+         theCutOrigin.x = originPLH.lon;
+         theCutOrigin.y = originPLH.lat;
+      }
+      else
+      {
+         originPLH.lat = theCutOrigin.y;
+         originPLH.lon = theCutOrigin.x;
+      }
+
+      // Check for consistent rect size:
+      if (theCutDxDyUnit == OSSIM_METERS)
+      {
+         ossimDpt mtrs_per_deg (originPLH.metersPerDegree());
+         theCutDxDy.x = theCutDxDy.x/mtrs_per_deg.x;
+         theCutDxDy.y = theCutDxDy.y/mtrs_per_deg.y;
+      }
+
+      // Set these to the correct units. May already be correct, but just in case...
+      theCutOriginUnit = OSSIM_DEGREES; 
+      theCutDxDyUnit = OSSIM_DEGREES; 
+
+      if (theClipToValidRectFlag)
+      {
+         // Now we need to clip the cut rect by the valid image footprint for the entire mosaic:
+         ossimDrect boundingRect = theProductChain->getBoundingRect(); // in view coordinates
+
+         // The bounding rect is in image space. Since pixel-is-point, the actual valid area on the
+         // ground will extend 1/2 pixel beyond the centers, so grow the bounding rect by 1/2 p:
+         boundingRect.expand(ossimDpt(0.5, 0.5));
+         ossimGpt mosaic_ul, mosaic_lr;
+         theProductProjection->lineSampleHeightToWorld(boundingRect.ul(), 0, mosaic_ul);
+         theProductProjection->lineSampleHeightToWorld(boundingRect.lr(), 0, mosaic_lr);
+
+         // Establish the LR bound defined by the cut-rect and clip the cut-rect if necessary:
+         ossimGpt cutrect_lr (theCutOrigin.lat - theCutDxDy.lat, theCutOrigin.lon + theCutDxDy.lon);
+         if (mosaic_ul.lat < theCutOrigin.lat)
+            theCutOrigin.lat = mosaic_ul.lat;
+         if (mosaic_lr.lat > cutrect_lr.lat)
+            theCutDxDy.lat = theCutOrigin.lat - mosaic_lr.lat;
+         if (mosaic_ul.lon > theCutOrigin.lon)
+            theCutOrigin.lon = mosaic_ul.lon;
+         if (mosaic_lr.lon < cutrect_lr.lon)
+            theCutDxDy.lon = mosaic_lr.lon - theCutOrigin.lon;
+      }
+
+      resolution = theProductProjection->getDecimalDegreesPerPixel();
+   }
+
+   // Map Projection (easting, northing cut rect) requested?
+   else 
+   {
+      // Special case code to account for origin and delta being specified in geographic, leading to
+      // offset error due to northing difference between UL and UR corners at constant lat:
+      if ((theCutOriginType == OSSIM_UPPER_LEFT_ORIGIN) &&
+          (theCutOriginUnit == OSSIM_DEGREES) && (theCutDxDyUnit == OSSIM_DEGREES))
+      {
+         ossimGpt ulgp (theCutOrigin.lat                 , theCutOrigin.lon                 , 0);
+         ossimGpt urgp (theCutOrigin.lat                 , theCutOrigin.lon + theCutDxDy.lon, 0);
+         ossimGpt llgp (theCutOrigin.lat - theCutDxDy.lat, theCutOrigin.lon                 , 0);
+         ossimGpt lrgp (theCutOrigin.lat - theCutDxDy.lat, theCutOrigin.lon + theCutDxDy.lon, 0);
+
+         ossimDpt ulen (theProductProjection->forward(ulgp));
+         ossimDpt uren (theProductProjection->forward(urgp));
+         ossimDpt llen (theProductProjection->forward(llgp));
+         ossimDpt lren (theProductProjection->forward(lrgp));
+         
+         double n_top    = (ulen.y > uren.y ? ulen.y : uren.y);
+         double n_bottom = (llen.y < lren.y ? llen.y : lren.y);
+         double e_left   = (ulen.x < llen.x ? ulen.x : llen.x);
+         double e_right  = (uren.x > lren.x ? uren.x : lren.x);
+
+         theCutOrigin.x = e_left;
+         theCutOrigin.y = n_top;
+
+         theCutDxDy.x = e_right - e_left;
+         theCutDxDy.y = n_top - n_bottom;
+
+         if (theClipToValidRectFlag)
+         {
+            // Now we need to clip the cut rect by the valid image footprint for the entire mosaic:
+            ossimDrect boundingRect = theProductChain->getBoundingRect(); // in view coordinates
+            boundingRect.expand(ossimDpt(0.5, 0.5));
+            ossimDpt mosaic_ul, mosaic_lr;
+            theProductProjection->lineSampleToEastingNorthing(boundingRect.ul(), mosaic_ul);
+            theProductProjection->lineSampleToEastingNorthing(boundingRect.lr(), mosaic_lr);
+
+            // Establish the LR bound defined by the cut-rect and clip the cut-rect if necessary:
+            ossimDpt cutrect_lr (theCutOrigin.x + theCutDxDy.x, theCutOrigin.y - theCutDxDy.y);
+            if (mosaic_ul.y < theCutOrigin.y)
+               theCutOrigin.y = mosaic_ul.y;
+            if (mosaic_lr.y > cutrect_lr.y)
+               theCutDxDy.y = theCutOrigin.y - mosaic_lr.y;
+            if (mosaic_ul.x > theCutOrigin.x)
+               theCutOrigin.x = mosaic_ul.x;
+            if (mosaic_lr.x < cutrect_lr.x)
+               theCutDxDy.x = mosaic_lr.x - theCutOrigin.x;
+         }
+      }
+      else
+      {
+         // Just map the geographic coordinates to easting/northing, without regard to corner
+         // mismatch:
+         if (theCutOriginUnit == OSSIM_DEGREES)
+         {
+            originPLH.lat = theCutOrigin.y;
+            originPLH.lon = theCutOrigin.x;
+            theCutOrigin = theProductProjection->forward(originPLH);
+         }
+         else
+         {
+            // Determine the geographic position that might be needed for scaling below:
+            originPLH = theProductProjection->inverse(theCutOrigin);
+         }
+
+         // Check for consistent rect size:
+         if (theCutDxDyUnit == OSSIM_DEGREES)
+         {
+            // POTENTIAL BUG: conversion from degrees longitude to meters should be a function 
+            //                of latitude here. Implemented here but needs testing:
+            ossimDpt mtrs_per_deg (originPLH.metersPerDegree());
+            theCutDxDy.x = theCutDxDy.x * mtrs_per_deg.x;
+            theCutDxDy.y = theCutDxDy.y * mtrs_per_deg.y;
+         }
+      }
+
+      // Set these to the correct units. May already be correct, but just in case...
+      theCutOriginUnit = OSSIM_METERS; 
+      theCutDxDyUnit = OSSIM_METERS; 
+
+      resolution = theProductProjection->getMetersPerPixel();
+   }
+
+   // The cut rect corresponds to the edges of the pixel ("edge-to-edge"), while OSSIM considers
+   // coordinates to correspond to the pixel centers. Need to shift the origin to the SE by 1/2p:
+   ossimDpt half_pixel = resolution * 0.5;
+   theCutOrigin.y -= half_pixel.y;
+   theCutOrigin.x += half_pixel.x;
+
+   // The size of the cutrect needs to be an integral number of pixels in output space:
+   theCutDxDy.x = (floor(theCutDxDy.x/resolution.x + 0.5))* resolution.x;
+   theCutDxDy.y = (floor(theCutDxDy.y/resolution.y + 0.5))* resolution.y;
+
+   // Adjust a center origin specification to be Upper Left corner:
+   if (theCutOriginType == OSSIM_CENTER_ORIGIN)
+   {
+      theCutOrigin.y += theCutDxDy.y;
+      theCutOrigin.x -= theCutDxDy.x;
+
+      // theCutDxDy in this case represented a radius. This needs to be converted to 
+      // OSSIM_UPPER_LEFT_ORIGIN form:
+      theCutDxDy.x *= 2.0;
+      theCutDxDy.y *= 2.0;
+      theCutOriginType = OSSIM_UPPER_LEFT_ORIGIN;
+   }
+
+   // Finally, update the product projection with new rectangle:
+   ossimDpt cutCenter (theCutOrigin.x + theCutDxDy.x/2.0, theCutOrigin.y - theCutDxDy.y/2.0);
+   ossimGpt gpt;
+   if (theCutDxDyUnit == OSSIM_METERS)
+   {
+      // Set the E/N values for the cut origin as the tie point:
+      theProductProjection->setUlTiePoints(theCutOrigin);
+   }
+   else
+   {
+      // Set the projection center (origin) latitude at the center of the cut rect:
+      gpt.lat = cutCenter.y;
+      gpt.lon = 0.0;
+      theProductProjection->setOrigin(gpt);
+
+      // Set the lat/lon values for the cut origin as the tie point:
+      gpt.lat = theCutOrigin.y;
+      gpt.lon = theCutOrigin.x;
+      theProductProjection->setUlTiePoints(gpt);
+   }
+
+   // cout << "\n**************** proj 2:\n";
+   // theProductProjection->print(cout);
+
+   // Propagates changes to the projection to the processing chain:
+   setView();
+}
+
+//*************************************************************************************************
+//! Sets up the histogram operation requested for the image chain passed in.
+//*************************************************************************************************
+void ossimOrthoIgen::setupHistogram(ossimImageChain* input_chain, const ossimSrcRecord& src_record)
+{
+   // Check if the source passed in is the output mosaic object, because the target
+   // histogram remapper needs to be connected to it (only valid when histo matching is requested):
+   if (input_chain == NULL)
+   {
+      if (!theTargetHistoFileName.isReadable())
+         return;
+
+      ossimHistogramRemapper* remapper = new ossimHistogramRemapper;
+      remapper->openHistogram(theTargetHistoFileName);
+      theProductChain->addFirst(remapper);
+      return;
+   }
+
+   // Check if any histo operation was requested on individual image:
+   if ((ossim::isnan(theHighPercentClip) || ossim::isnan(theLowPercentClip)) &&
+      !theUseAutoMinMaxFlag && (theStdDevClip < 0) && src_record.getHistogramOp().empty() &&
+      theTargetHistoFileName.empty())
+   {
+      return; // no histo op requested
+   }
+
+   // Remaining operations require a histogram on the input image source:
+   ossimImageHandler* handler = PTR_CAST(ossimImageHandler, input_chain->getLastSource());
+   if (handler == NULL)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL)<<"Could not locate an image handler object in the image"
+         << "chain provided. This should not happen. Ignoring histogram request." << std::endl;
+      return;
+   }
+
+   // Establish the ideal filename for this histogram. The following do-block is all for testing
+   // different histogram file naming schemes since alternate directory and entry-indexing might be
+   // used:
+   ossimFilename histoFilename (src_record.getHistogramPath());
+   ossimFilename candidateHistoFilename;
+   ossimFilename defaultHistoFilename (handler->createDefaultHistogramFilename());
+   ossimFilename entryName (handler->getFilenameWithThisExtension(ossimString(".his"), true));
+
+   do
+   {
+      if (!histoFilename.empty())
+      {
+         // Try histogram filename based on specified name in the .src file:
+         if (histoFilename.isDir())
+            histoFilename = histoFilename.dirCat(defaultHistoFilename.file());
+         if (histoFilename.exists()) break;
+
+         // Try specified name with entry index:
+         if (src_record.getEntryIndex() >= 0)
+         {
+            histoFilename = histoFilename.path().dirCat(entryName.file());
+            if (histoFilename.exists()) break;
+         }
+
+         // Not found so set the candidate filename in case we need to generate it:
+         candidateHistoFilename = histoFilename;
+      }
+
+      // Next try looking for a histogram based on the default name:
+      histoFilename = defaultHistoFilename;
+      if (histoFilename.exists())  break;
+
+      //---
+      // Last possibility is the default name with entry index.  We will test
+      // even if there is only one entry, like "file_e0.his".
+      //---
+      histoFilename = entryName;
+      if (histoFilename.exists())  break;
+
+      // If not already set, set the candidate filename in case we need to generate it:
+      if (candidateHistoFilename.empty())
+         candidateHistoFilename = histoFilename;
+   }
+   while (false); // only pass through once
+
+
+   // If the histogram was still not located, look into creating one:
+   if (!histoFilename.exists())
+   {
+      // Check the preferences for histogram autogeneration:
+      ossimString lookup = ossimPreferences::instance()->findPreference(AUTOGENERATE_HISTOGRAM_KW);
+      if (lookup.toBool())
+      {
+         // No histogram available for this image, need to create one:
+         histoFilename = candidateHistoFilename;
+         ossimNotify(ossimNotifyLevel_WARN) <<"Histogram file <" <<  histoFilename
+            << "> not found. Creating one now..."  << std::endl;
+         bool success = createHistogram(input_chain, histoFilename);
+         if (!success)
+         {
+            ossimNotify(ossimNotifyLevel_WARN) <<"Error encountered creating histogram file <" 
+               << histoFilename << ">. Ignoring histogram request."  << std::endl;
+            return;
+         }
+      }
+   }
+
+   // Need to insert any histogram object to the left of the renderer in the chain. Search for a 
+   // renderer and save for later:
+   // ossimConnectableObject* renderer = PTR_CAST(ossimConnectableObject,
+   //    input_chain->findFirstObjectOfType(ossimString("ossimImageRenderer")));
+
+   ossimTypeNameVisitor visitor( ossimString("ossimImageRenderer"),
+                                 true, // firstofTypeFlag
+                                 (ossimVisitor::VISIT_INPUTS|
+                                  ossimVisitor::VISIT_CHILDREN) );
+   input_chain->accept( visitor );
+   ossimRefPtr<ossimImageRenderer> renderer = visitor.getObjectAs<ossimImageRenderer>(0);
+
+   // Histo Match?
+   if (theTargetHistoFileName.isReadable())
+   {
+      // A histogram match was requested. This involves applying a histo equalization to the input
+      // chain and then applying an inverted equalization using the target histogram:
+      ossimRefPtr<ossimHistogramEqualization> forwardEq = new ossimHistogramEqualization;
+      ossimRefPtr<ossimHistogramEqualization> inverseEq = new ossimHistogramEqualization;
+      
+      // Init equalizers with the source and target histogram files:
+      forwardEq->setInverseFlag(false);
+      forwardEq->setHistogram(histoFilename);
+      inverseEq->setInverseFlag(true);
+      inverseEq->setHistogram(theTargetHistoFileName);
+
+      // Need check that source and target histograms are compatible:
+      ossimRefPtr<ossimMultiResLevelHistogram> sourceHisto = forwardEq->getHistogram();
+      ossimRefPtr<ossimMultiResLevelHistogram> targetHisto = inverseEq->getHistogram();
+      bool are_incompatible = false;
+      if (!sourceHisto.valid() || !targetHisto.valid())
+      {
+         are_incompatible = true;
+      }
+      else
+      {
+         ossim_uint32 num_source_bands = sourceHisto->getNumberOfBands();
+         if (num_source_bands != targetHisto->getNumberOfBands())
+         {
+            are_incompatible = true;
+         }
+         else
+         {
+            for (ossim_uint32 band=0; band<num_source_bands; band++)
+            {
+               ossimRefPtr<ossimHistogram> sourceBandHisto = sourceHisto->getHistogram(band);
+               ossimRefPtr<ossimHistogram> targetBandHisto = targetHisto->getHistogram(band);
+               if (!sourceBandHisto.valid() || !targetBandHisto.valid() ||
+                   (sourceBandHisto->GetRes() != targetBandHisto->GetRes()))
+               {
+                  are_incompatible = true;
+                  break;
+               }
+            }
+         }
+      }
+      if (are_incompatible)
+      {
+         // Error was encountered establishing histograms for match operation:
+         ossimNotify(ossimNotifyLevel_WARN)<<"Error encountered setting up histogram match "
+            "operation. Check that source and target histograms are compatible. No histogram "
+            "operations will be performed on this image." << std::endl;
+         return;
+      }
+
+      // The source and target histos are compatible, insert to the left of renderer if one exists:
+      if ( renderer.valid() )
+         input_chain->insertLeft( forwardEq.get(), renderer.get() );
+      else
+         input_chain->addFirst(forwardEq.get());
+      input_chain->insertRight(inverseEq.get(), forwardEq.get());
+      
+      return;
+   }
+
+   // Remaining possibilities (clip or stretch) require a remapper.
+   // Insert to the left of renderer if one exists:
+   ossimRefPtr<ossimHistogramRemapper> remapper = new ossimHistogramRemapper;
+   if ( renderer.valid() )
+      input_chain->insertLeft( remapper.get(), renderer.get() );
+   else
+      input_chain->addFirst(remapper.get());
+
+   // Fetch the input histogram:
+   bool histo_read_ok = remapper->openHistogram(histoFilename);
+   if (!histo_read_ok)
+   {
+      // No histogram available for this image, need to create one (TODO):
+      ossimNotify(ossimNotifyLevel_WARN)<<"Error encountered loading histogram file <" 
+         << histoFilename << ">. No histogram operations will be performed on this image." 
+         << std::endl;
+      return;
+   }
+
+   // Set values to construct remap table:
+   if (!ossim::isnan(theHighPercentClip) && !ossim::isnan(theLowPercentClip))
+   {
+      // Hi/Lo clip requested
+      remapper->setHighNormalizedClipPoint(1.0-theHighPercentClip);
+      remapper->setLowNormalizedClipPoint(theLowPercentClip);
+   }
+
+   else
+   {
+      // Consider histogram stretch operations. These can be on a per-image basis or global for all
+      // input images. Give priority to the img_histo_op (per-image spec) over general flags below:
+      ossimHistogramRemapper::StretchMode mode = ossimHistogramRemapper::STRETCH_UNKNOWN;
+      ossimString img_histo_op (src_record.getHistogramOp());
+      if (img_histo_op=="auto-minmax")
+         mode = ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX;
+      else if (img_histo_op.contains("std-stretch"))
+      {
+         if (img_histo_op.contains("1"))
+            mode = ossimHistogramRemapper::LINEAR_1STD_FROM_MEAN;
+         else if (img_histo_op.contains("2"))
+            mode = ossimHistogramRemapper::LINEAR_2STD_FROM_MEAN;
+         else if (img_histo_op.contains("3"))
+            mode = ossimHistogramRemapper::LINEAR_3STD_FROM_MEAN;
+      }
+      else if (theUseAutoMinMaxFlag)
+         mode = ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX;
+      else if (theStdDevClip > 0)
+         mode = (ossimHistogramRemapper::StretchMode) theStdDevClip;
+
+      // Finally init the remapper with proper stretch mode:
+      if (mode != ossimHistogramRemapper::STRETCH_UNKNOWN)
+         remapper->setStretchMode(mode, true);
+   }
+   
+   return;
+}
+
+
+//*************************************************************************************************
+//! Utility method for creating a histogram for an input image. Returns TRUE if successful.
+//*************************************************************************************************
+bool ossimOrthoIgen::createHistogram(ossimImageChain* chain, const ossimFilename& histo_filename)
+{
+   ossimRefPtr<ossimImageHistogramSource> histoSource = new ossimImageHistogramSource;
+   ossimRefPtr<ossimHistogramWriter> writer = new ossimHistogramWriter;
+
+   histoSource->connectMyInputTo(chain);
+   histoSource->enableSource();
+   histoSource->setComputationMode(OSSIM_HISTO_MODE_FAST);
+
+   writer->connectMyInputTo(histoSource.get());
+   writer->setFilename(histo_filename);
+   writer->addListener(&theStdOutProgress);
+   bool success = writer->execute();
+
+   writer=0;
+   histoSource=0;
+
+   if (success)
+   {
+      ossimNotify(ossimNotifyLevel_NOTICE)<<std::endl;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)<<"Error encountered creating Histogram file <" 
+         << histo_filename << ">. No histogram operations will be performed on this image." 
+         << std::endl;
+   }
+
+   return success;
+}
+
+//*************************************************************************************************
+// METHOD
+//*************************************************************************************************
+void ossimOrthoIgen::addChainCache(ossimImageChain* chain) const
+{
+   if (chain)
+   {
+      //ossimConnectableObject* renderer =
+      //   PTR_CAST(ossimConnectableObject,
+      //             chain->findFirstObjectOfType(ossimString("ossimImageRenderer")));
+
+      ossimTypeNameVisitor visitor( ossimString("ossimImageRenderer"),
+                                    true, // firstofTypeFlag
+                                    (ossimVisitor::VISIT_INPUTS|
+                                     ossimVisitor::VISIT_CHILDREN) );
+      chain->accept( visitor );
+      ossimRefPtr<ossimImageRenderer> renderer = visitor.getObjectAs<ossimImageRenderer>(0);
+      if ( renderer.valid() )
+      {
+         ossimCacheTileSource* cache = new ossimCacheTileSource();
+         chain->insertLeft( cache, renderer.get() );
+      }
+   }
+}
+
+//*************************************************************************************************
+// Generates a log KWL file that could be fed directly to Igen. Used for verifying chain.
+//*************************************************************************************************
+void ossimOrthoIgen::generateLog()
+{
+   if (!theSrcRecords.size() || !theProductChain.valid() || theProductFilename.empty())
+      return;
+
+   // Establish output filename:
+   ossimFilename logFile = theProductFilename;
+   logFile.setExtension("log");
+
+   // Fill a KWL with all info:
+   ossimKeywordlist kwl; 
+   theContainer->saveState(kwl);
+
+   if (theProductProjection.valid())
+      theProductProjection->saveState(kwl, "product.projection.");
+
+   kwl.write(logFile.chars());
+}
+
+//*************************************************************************************************
+//! Determines the UL corner tiepoint of the product projection as the overall UL corner of the
+//! mosaic. This may not be the final tiepoint, since a cut origin may have been specified, and the
+//*************************************************************************************************
+void ossimOrthoIgen::establishMosaicTiePoint()
+{
+   if (!theProductChain.valid())
+      return;
+
+   // Need to find all image handlers to query for their UL ground point:
+#if 0
+   ossimConnectableObject::ConnectableObjectList clientList;
+   theProductChain->findAllInputsOfType(clientList, STATIC_TYPE_INFO(ossimImageHandler), true, true);
+
+   if (clientList.size() == 0)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)<<"ossimOrthoIgen::establishMosaicTiePoint() WARNING -- "
+         "Expected to find image handler in the chain but none was identified."<<std::endl;
+      return;
+   }
+#endif
+
+   ossimTypeNameVisitor visitor( ossimString("ossimImageHandler"),
+                                 false, // firstofTypeFlag
+                                 (ossimVisitor::VISIT_INPUTS|
+                                  ossimVisitor::VISIT_CHILDREN) );
+   theProductChain->accept( visitor );
+
+   if ( visitor.getObjects().empty() )
+   {
+      ossimNotify(ossimNotifyLevel_WARN)<<"ossimOrthoIgen::establishMosaicTiePoint() WARNING -- "
+         "Expected to find image handler in the chain but none was identified."<<std::endl;
+      return;
+   }
+
+   ossimGpt tie_gpt_i, tie_gpt;
+   ossimDpt tie_dpt_i, tie_dpt;
+   tie_gpt.makeNan();
+   tie_gpt.height(0.0);
+   tie_dpt.makeNan();
+
+   // Loop over all input handlers and latch the most NW tiepoint as the mosaic TP:
+   //   ossimConnectableObject::ConnectableObjectList::iterator iter = clientList.begin();
+   // while (iter != clientList.end())
+   for( ossim_uint32 i = 0; i < visitor.getObjects().size(); ++i )
+   {
+      // ossimImageHandler* handler = PTR_CAST(ossimImageHandler, (*iter).get());
+      // iter++;
+
+      ossimImageHandler* handler = visitor.getObjectAs<ossimImageHandler>( i );
+      if (!handler) break;
+
+      ossimRefPtr<ossimImageGeometry> geom = handler->getImageGeometry();
+      if (!geom.valid()) 
+         continue; // Skip over any non geometry inputs (e.g., masks)
+
+      if ( theProductProjection->isGeographic() )
+      {
+         geom->getTiePoint( tie_gpt_i, true ); // True to get edge of tie.
+         if ( tie_gpt_i.hasNans() == false )
+         {
+            if (tie_gpt.hasNans())
+               tie_gpt = tie_gpt_i;
+            else
+            {
+               if (tie_gpt_i.lat > tie_gpt.lat) 
+                  tie_gpt.lat = tie_gpt_i.lat;
+               if (tie_gpt_i.lon < tie_gpt.lon) 
+                  tie_gpt.lon = tie_gpt_i.lon;
+            }
+         }
+      }
+      else
+      {
+         geom->getTiePoint( tie_dpt_i, true ); // True to get edge of tie.
+         if ( tie_dpt_i.hasNans() == false )
+         {
+            if (tie_dpt.hasNans())
+               tie_dpt = tie_dpt_i;
+            else
+            {
+               if (tie_dpt_i.y > tie_dpt.y) 
+                  tie_dpt.y = tie_dpt_i.y;
+               if (tie_dpt_i.x < tie_dpt.x) 
+                  tie_dpt.x = tie_dpt_i.x;
+            }
+         }
+      }
+   }
+   
+#if 0
+      // Establish input image bounding rect, making sure to expand to include the FULL pixel since
+      // pixel is point -- i.e. the pixel coordinate corresponds to the center of the pixel area, 
+      // not the edge. Therefore shift the image point by 1/2 pixel to correspond to edges:
+      // (OLK 09/11)
+      ossimDrect boundingRect (handler->getBoundingRect());
+      vector<ossimDpt> img_vertices;
+      img_vertices.push_back(boundingRect.ul() + ossimDpt(-0.5, -0.5));
+      img_vertices.push_back(boundingRect.ur() + ossimDpt( 0.5, -0.5));
+      img_vertices.push_back(boundingRect.lr() + ossimDpt( 0.5,  0.5));
+      img_vertices.push_back(boundingRect.ll() + ossimDpt(-0.5,  0.5));
+      
+
+      // The tie point will be in easting/northing or lat/lon depending on the type of projection 
+      // used for the product. Need to consider all image corners since the orientation of the image
+      // is not known:
+      for (int j=0; j<4; j++)
+      {
+         geom->localToWorld(img_vertices[j], tie_gpt_i);
+         if (theProductProjection->isGeographic())
+         {
+            tie_gpt.height(0.0);
+            if (tie_gpt.hasNans())
+               tie_gpt = tie_gpt_i;
+            else
+            {
+               if (tie_gpt_i.lat > tie_gpt.lat) 
+                  tie_gpt.lat = tie_gpt_i.lat;
+               if (tie_gpt_i.lon < tie_gpt.lon) 
+                  tie_gpt.lon = tie_gpt_i.lon;
+            }
+         }
+         else
+         {
+            tie_dpt_i = theProductProjection->forward(tie_gpt_i);
+            if (tie_dpt.hasNans())
+               tie_dpt = tie_dpt_i;
+            else
+            {
+               if (tie_dpt_i.y > tie_dpt.y) 
+                  tie_dpt.y = tie_dpt_i.y;
+               if (tie_dpt_i.x < tie_dpt.x) 
+                  tie_dpt.x = tie_dpt_i.x;
+            }
+         }
+      }
+   }
+
+#endif
+
+   // The tie point coordinates currently reflect the UL edge of the UL pixel. We'll need to shift
+   // the tie point from the edge to the center. (OLK 09/11)
+   ossimDpt half_pixel_shift(0,0);
+   if (theProductProjection->isGeographic())
+   {
+      half_pixel_shift = theProductProjection->getDecimalDegreesPerPixel() * 0.5;
+      if (!tie_gpt.hasNans())
+      {
+         tie_gpt.lat -= half_pixel_shift.lat;
+         tie_gpt.lon += half_pixel_shift.lon;
+         theProductProjection->setUlTiePoints(tie_gpt);
+      }
+   }
+   else
+   {
+      half_pixel_shift = theProductProjection->getMetersPerPixel() * 0.5;
+      tie_dpt.y -= half_pixel_shift.y;
+      tie_dpt.x += half_pixel_shift.x;
+      theProductProjection->setUlTiePoints(tie_dpt);
+   }
+
+   // Propagates changes to the projection to the processing chain:
+   setView();
+}
+
+//*************************************************************************************************
+//! Computes the center latitude of the mosaic for use as the geographic scaling latitude
+//*************************************************************************************************
+void ossimOrthoIgen::computeGeoScalingLatitude()
+{
+   if (!theProductChain.valid())
+      return;
+
+   // Need to find all image handlers to query for their UL ground point:
+   ossimTypeNameVisitor visitor( ossimString("ossimImageHandler"),
+                                 false, // firstofTypeFlag
+                                 (ossimVisitor::VISIT_INPUTS|
+                                  ossimVisitor::VISIT_CHILDREN) );
+   theProductChain->accept( visitor );
+   if ( visitor.getObjects().empty() )
+   {
+      ossimNotify(ossimNotifyLevel_WARN)<<"ossimOrthoIgen::establishMosaicTiePoint() WARNING -- "
+         "Expected to find image handler in the chain but none was identified."<<std::endl;
+      return;
+   }
+
+   ossimGpt ul_i, ur_i, lr_i, ll_i;
+   ossimGrect bbox;
+   bbox.makeNan();
+
+   // Loop over all input handlers and latch the extremes of the corner points:
+   for (ossim_uint32 i = 0; i < visitor.getObjects().size(); ++i)
+   {
+      ossimImageHandler* handler = visitor.getObjectAs<ossimImageHandler>(i);
+      if (!handler)
+         break;
+
+      ossimRefPtr<ossimImageGeometry> geom = handler->getImageGeometry();
+      if (!geom.valid())
+         continue; // Skip over any non geometry inputs (e.g., masks)
+
+      geom->getCornerGpts(ul_i, ur_i, lr_i, ll_i);
+      ossimGrect bbox_i(ul_i, ur_i, lr_i, ll_i);
+      bbox = bbox.combine(bbox_i);
+   }
+
+   // Fetch midpoint and assign scaling latitude:
+   ossimGpt midPoint (bbox.midPoint());
+   if (!midPoint.isLatNan())
+      theGeoScalingLatitude = midPoint.lat;
+   else
+      theGeoScalingLatitude = 0.0;
+}
+
+//*************************************************************************************************
+// Initialize the pixel flipper in the source chain if one is called for
+//*************************************************************************************************
+ossimImageSource* ossimOrthoIgen::setupPixelFlipper(ossimImageChain* singleImageChain,
+                                                    const ossimSrcRecord& src_record)
+{
+   if (singleImageChain == NULL)
+      return NULL;
+
+   // Fetch the image handler that should be the last (left-most) source in the chain:
+   ossimImageSource* current_source = singleImageChain->getLastSource();
+   if (current_source == NULL)
+      return NULL;
+
+   // There are two possibilities for specifying pixel flipping -- either as a command line option
+   // that applies to all input imagery, or specified for a particular input via the .src file.
+   // The .src file takes precedence:
+   const ossimSrcRecord::PixelFlipParams& flipParams = src_record.getPixelFlipParams();
+
+   // The replacement can be specified globally in the preferences if none found in the src record:  
+   ossimString replaceModeStr = flipParams.replacementMode;
+   if (replaceModeStr.empty())
+      replaceModeStr = thePixelReplacementMode; 
+   
+   // First consider if a range of clipped pixels was specified:
+   ossim_float64 clip_min = flipParams.clipMin;
+   if (ossim::isnan(clip_min)) 
+      clip_min = theClipPixelMin;
+   ossim_float64 clip_max = flipParams.clipMax;
+   if (ossim::isnan(clip_max))
+      clip_max = theClipPixelMax;
+
+   ossimPixelFlipper* flipper = 0;
+   if (!ossim::isnan(clip_min) && !ossim::isnan(clip_max))
+   {
+      // A clip within a range of pixel values was requested. All pixels within the specified range
+      // are mapped to NULL. Create the remapper and insert it into the chain just after the handler
+      flipper = new ossimPixelFlipper();  
+      flipper->setTargetRange(clip_min, clip_max);  
+      flipper->setReplacementValue(current_source->getNullPixelValue());
+      flipper->setReplacementMode(replaceModeStr);
+      singleImageChain->insertRight(flipper, current_source);  
+      current_source = flipper;
+   }
+
+   // The user can also specify a clamping similar to the pixel clipping above. This would be a
+   // second flipper object in the chain:
+   ossim_float64 clamp_min = flipParams.clampMin;
+   if (ossim::isnan(clamp_min))
+      clamp_min = theClampPixelMin;
+   ossim_float64 clamp_max = flipParams.clampMax;
+   if (ossim::isnan(clamp_max))
+      clamp_max = theClampPixelMax;
+
+   flipper = 0; // no leak since chain assumes ownership of prior instance.
+   if (!ossim::isnan(clamp_min))
+   {
+      // A bottom clamping was requested. All pixels below this value are set to this value:
+      flipper = new ossimPixelFlipper();  
+      flipper->setClampValue(clamp_min, false); // false = clamp bottom
+   }
+   if (!ossim::isnan(clamp_max))
+   {
+      // A top clamping was requested. All pixels above this value are set to this value.
+      // The same flipper object can be used as the bottom clamp (if created):
+      if (!flipper)
+         flipper = new ossimPixelFlipper();  
+      flipper->setClampValue(clamp_max, true); // true = clamp top
+   }
+   if (flipper)
+   {
+      // Common code for top and bottom clamping:
+      flipper->setReplacementMode(replaceModeStr);
+      singleImageChain->insertRight(flipper, current_source);  
+      current_source = flipper;
+   }
+
+   return current_source;
+}
+
+//*************************************************************************************************
+// Checks for the presence of a raster mask file alongside the image, and inserts the mask 
+// filter in the chain if mask file exists. Returns pointer to the "current (last added) source 
+// in the single image chain. 
+//*************************************************************************************************
+ossimImageSource* ossimOrthoIgen::setupRasterMask(ossimImageChain* singleImageChain,
+                                                  const ossimSrcRecord& src_record)
+{
+   if (singleImageChain == NULL)
+      return NULL;
+
+   // Search for the image handler in the chain:
+   ossimImageHandler* img_handler = 
+      dynamic_cast<ossimImageHandler*>(singleImageChain->getLastSource());
+   if (img_handler == NULL) 
+      return NULL;
+
+   // See if a raster mask was specified in the SRC record:
+   ossimFilename mask_file = src_record.getMaskPath();
+   if (!mask_file.exists())
+      return img_handler;
+
+   // Open up the mask file and verify it is good:
+   ossimImageHandler* mask_handler =  ossimImageHandlerRegistry::instance()->open(mask_file);
+   if (mask_handler == NULL)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)<<"ossimOrthoIgen::setupRasterMask() -- Could not open "
+         "raster mask file <"<<mask_file<<">. Maske request will be ignored."<<endl;
+      return img_handler;
+   }
+
+   // Create the mask filter and give it the image and mask tile sources. Add it to the chain.
+   // IMPORTANT NOTE: the mask filter is an image combiner. It is being inserted into a single 
+   // image chain. Since it owns its two inputs (the image handler and the mask), it must
+   // replace the handler in the chain. Also, see note in ossimMaskFilter::setInputSources().
+   //singleImageChain->deleteLast(); // Remove the handler
+   // ossimImageSource* nextInChain = singleImageChain->getLastSource();
+   ossimRefPtr<ossimMaskFilter> mask_filter = new ossimMaskFilter;
+   singleImageChain->insertRight(mask_filter.get(), img_handler); 
+   mask_filter->setMaskSource(mask_handler);  // assumes ownership of object
+
+   //---
+   // Set the mode to SELECT_CLAMP_MIN.  This clamps data to min pixel value in the valid image
+   // area if the input pixel is null(essentially a pixel flip).
+   //---
+   mask_filter->setMaskType(ossimMaskFilter::OSSIM_MASK_TYPE_SELECT_CLAMP_MIN);
+   
+   return mask_filter.get();
+}
+
+//*************************************************************************************************
+// Adds a scalar remapper to the extreme right of the chain is specified by the 
+// --output-radiometry option.
+//*************************************************************************************************
+void ossimOrthoIgen::setupOutputRadiometry()
+{
+   if (theOutputRadiometry.empty())
+      return;
+
+   // Map the specified radiometry to a valid type:
+   ossimScalarType scalar_type = 
+      ossimScalarTypeLut::instance()->getScalarTypeFromString(theOutputRadiometry);
+   if (scalar_type == OSSIM_SCALAR_UNKNOWN)
+      return;
+
+   // Add a scalar remapper to the product chain:
+   if(theProductChain->getOutputScalarType() != scalar_type)
+   {
+      ossimScalarRemapper* remapper = new ossimScalarRemapper;
+      remapper->setOutputScalarType(scalar_type);
+      theProductChain->addFirst(remapper);
+   }
+}
+
+//*************************************************************************************************
+// Private method to see if any image chain input projections are affected by elevation.
+//*************************************************************************************************
+bool ossimOrthoIgen::isAffectedByElevation()
+{
+   bool result = false;
+   
+   // Get a list of all the image handlers.
+   // ossimConnectableObject::ConnectableObjectList clientList;
+   // theProductChain->findAllInputsOfType(clientList, STATIC_TYPE_INFO(ossimImageHandler),
+   //                                      true, true);
+
+   ossimTypeNameVisitor visitor( ossimString("ossimImageHandler"),
+                                 false, // firstofTypeFlag
+                                 (ossimVisitor::VISIT_INPUTS|
+                                  ossimVisitor::VISIT_CHILDREN) );
+   theProductChain->accept( visitor );
+   
+   // Loop over all input handlers and see if affected by elevation.
+   // ossimConnectableObject::ConnectableObjectList::iterator iter = clientList.begin();
+   // while (iter != clientList.end())
+   for( ossim_uint32 i = 0; i < visitor.getObjects().size(); ++i )
+   {
+      // ossimRefPtr<ossimImageHandler> handler = PTR_CAST(ossimImageHandler, (*iter).get());
+      ossimRefPtr<ossimImageHandler> handler =  visitor.getObjectAs<ossimImageHandler>( i );
+      if ( handler.valid() )
+      {
+         ossimRefPtr<ossimImageGeometry> geom = handler->getImageGeometry();
+         if (geom.valid())
+         {
+            ossimRefPtr<const ossimProjection> proj = geom->getProjection();
+            if ( proj.valid() )
+            {
+               if ( proj->isAffectedByElevation() )
+               {
+                  result = true;
+                  break;
+               }
+            }
+         }
+      }
+      // ++iter;
+   }
+   return result;
+}
+
+//*************************************************************************************************
+// Private method to recompute the gsd on all image handlers that have projections affected by
+// elevation.
+//*************************************************************************************************
+void ossimOrthoIgen::reComputeChainGsds()
+{
+   // Get a list of all the image handlers.
+   // ossimConnectableObject::ConnectableObjectList clientList;
+   // theProductChain->findAllInputsOfType(clientList, STATIC_TYPE_INFO(ossimImageHandler),
+   //                                      true, true);
+   
+   // Loop over all input handlers and see if affected by elevation.
+   // ossimConnectableObject::ConnectableObjectList::iterator iter = clientList.begin();
+   // while (iter != clientList.end())
+
+   ossimTypeNameVisitor visitor( ossimString("ossimImageHandler"),
+                                 false, // firstofTypeFlag
+                                 (ossimVisitor::VISIT_INPUTS|
+                                  ossimVisitor::VISIT_CHILDREN) );
+   theProductChain->accept( visitor );
+
+   for( ossim_uint32 i = 0; i < visitor.getObjects().size(); ++i )
+   {
+      // ossimRefPtr<ossimImageHandler> handler = PTR_CAST(ossimImageHandler, (*iter).get());
+
+      ossimRefPtr<ossimImageHandler> handler =  visitor.getObjectAs<ossimImageHandler>( i );
+      if ( handler.valid() )
+      {
+         ossimRefPtr<ossimImageGeometry> geom = handler->getImageGeometry();
+         if (geom.valid())
+         {
+            ossimRefPtr<ossimProjection> proj = geom->getProjection();
+            if ( proj.valid() )
+            {
+               if ( proj->isAffectedByElevation() )
+                  proj->getMetersPerPixel();
+            }
+         }
+      }
+      // ++iter;
+   }
+}
+
+//*************************************************************************************************
+// GSD Determination is nontrivial since there are various command-line options that control
+// this quantity. This method considers all information before setting the product's GSD.
+//*************************************************************************************************
+void ossimOrthoIgen::setProductGsd()
+{
+   if (!theProductChain.valid())
+      return;
+
+   // Fetch the reference input projection first. Settings may be copied to the product projection:
+   ossimMapProjection* ref_map = PTR_CAST(ossimMapProjection, theReferenceProj.get());
+   ossimGpt origin;
+
+   // The geo-scaling latitude effectively specifies the map projection's origin latitude, which
+   // may affect the scaling of GSD in x-direction. This is only relevant for geographic projections
+   if (theProductProjection->isGeographic())
+   {
+      ossimGpt origin (0.0, theProductProjection->getOrigin().lon, 0.0);
+      if (ossim::isnan(theGeoScalingLatitude))
+      {
+         // Loop over all input handlers and accumulate the geographic centers. This will allow 
+         // computing mosaic center point (approximate) for purposes of establishing reference 
+         // latitude for scale:
+         origin.lat = 0.0;
+         origin.lon = theProductProjection->getOrigin().lon;
+
+         // ossimConnectableObject::ConnectableObjectList clientList;
+         // theProductChain->findAllInputsOfType(clientList, STATIC_TYPE_INFO(ossimImageHandler), 1, 1);
+         // ossimConnectableObject::ConnectableObjectList::iterator iter = clientList.begin();
+
+         ossimTypeNameVisitor visitor( ossimString("ossimImageHandler"),
+                                       false, // firstofTypeFlag
+                                       (ossimVisitor::VISIT_INPUTS|
+                                        ossimVisitor::VISIT_CHILDREN) );
+         theProductChain->accept( visitor );
+         
+         ossimDpt center_pt;
+         ossimGpt geocenter;
+         int num_contributors = 0;
+         // while (iter != clientList.end())
+
+         for( ossim_uint32 i = 0; i < visitor.getObjects().size(); ++i )
+         {
+            // ossimImageHandler* handler = PTR_CAST(ossimImageHandler, (*iter).get());
+            ossimRefPtr<ossimImageHandler> handler =  visitor.getObjectAs<ossimImageHandler>( i );
+            if ( handler.valid() )
+            {
+               // iter++;
+               ossimRefPtr<ossimImageGeometry> geom = handler->getImageGeometry();
+               if (!geom.valid()) 
+                  continue; // Skip over any non geometry inputs (e.g., masks)
+               
+               handler->getBoundingRect().getCenter(center_pt);
+               if (!geom->localToWorld(center_pt, geocenter))  
+                  continue;
+               if (num_contributors == 0)
+                  origin.lat = geocenter.lat;
+               else
+                  origin.lat += geocenter.lat;
+               ++num_contributors;
+            }
+            else
+            {
+               break;
+            }
+         }
+
+         // Compute average latitude among all contributors:
+         if (num_contributors)
+            origin.lat /= (double)num_contributors;
+      }
+      else
+      {
+         // A geo-scaling reference latitude was provided on the command line:
+         origin.lat = theGeoScalingLatitude;
+      }
+
+      // Set the latitude of origin to the reference latitude (either specified on command line or
+      // computed as scene center):
+      theProductProjection->setOrigin(origin); // proj now can handle meters and degrees correctly
+   }
+
+   // Establish the resolution based on either command line option or reference proj if no values
+   // provided on command line (--degrees or --meters):
+   ossimDpt resolution (theDeltaPerPixelOverride);
+   ossimUnitType resUnits = theDeltaPerPixelUnit;
+   if (resolution.hasNans())
+   {
+      //  No GSD specified, so copy it from the input projection:
+      if (ref_map && ref_map->isGeographic())
+      {
+         resolution = ref_map->getDecimalDegreesPerPixel();
+         resUnits = OSSIM_DEGREES;
+      }
+      else
+      {
+         resolution = theReferenceProj->getMetersPerPixel();
+         resUnits = OSSIM_METERS;
+      }
+   }
+
+   // Set the desired image GSD, accounting for possible mixing of units:
+   if (resUnits == OSSIM_DEGREES)
+   {
+      // Need to adjust the resolution in the longitude direction if the user requested geo-scaling:
+      if (!ossim::isnan(theGeoScalingLatitude))
+         resolution.lon = resolution.lat/ossim::cosd(theGeoScalingLatitude);
+      theProductProjection->setDecimalDegreesPerPixel(resolution);
+   }
+   else 
+      theProductProjection->setMetersPerPixel(resolution);
+
+   // Propagates changes to the projection to the processing chain:
+   setView();
+}
+
diff --git a/src/ossim/plugin/makefile.vc b/ossim/src/ossim/plugin/makefile.vc
similarity index 100%
rename from src/ossim/plugin/makefile.vc
rename to ossim/src/ossim/plugin/makefile.vc
diff --git a/ossim/src/ossim/plugin/ossimDynamicLibrary.cpp b/ossim/src/ossim/plugin/ossimDynamicLibrary.cpp
new file mode 100644
index 0000000..b0d132d
--- /dev/null
+++ b/ossim/src/ossim/plugin/ossimDynamicLibrary.cpp
@@ -0,0 +1,107 @@
+//*******************************************************************
+//
+// LICENSE: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//*********************************************************************
+// $Id: ossimDynamicLibrary.cpp 23666 2015-12-14 20:01:22Z rashadkm $
+#include <ossim/plugin/ossimDynamicLibrary.h>
+#include <ossim/plugin/ossimSharedObjectBridge.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimNotifyContext.h>
+
+// Static trace for debugging.
+static ossimTrace traceDebug(ossimString("ossimDynamicLibrary:debug"));
+
+ossimDynamicLibrary::ossimDynamicLibrary()
+   :theLibrary(0)
+{
+}
+
+ossimDynamicLibrary::ossimDynamicLibrary(const ossimString& name)
+{
+   load(name);
+}
+
+ossimDynamicLibrary::~ossimDynamicLibrary()
+{
+   unload();
+}
+
+bool ossimDynamicLibrary::load()
+{
+   return load(theLibraryName);
+}
+
+bool ossimDynamicLibrary::load(const ossimString& name)
+{
+   ossimFilename libraryName = name.trim();
+   if(libraryName.empty()||!libraryName.isFile()) return false;
+   
+#  if defined(__WIN32__) || defined(_WIN32)
+   theLibrary = LoadLibrary(libraryName.c_str());
+#  else 
+   theLibrary = dlopen(libraryName.c_str(), RTLD_LAZY);
+#endif
+
+   if (isLoaded())
+   {
+      theLibraryName = libraryName;
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimDynamicLibrary::load DEBUG:" << std::endl;
+      
+      if (isLoaded())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "Loaded library:  " << name << std::endl;
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimDynamicLibrary::load DEBUG:"
+            << "\nFailed to load library:  " << name
+            << std::endl;
+#  if !defined(__WIN32__) && !defined(_WIN32)
+         ossimNotify(ossimNotifyLevel_DEBUG) << dlerror() << std::endl;
+#endif
+      }
+      
+   }
+   
+   return isLoaded();
+}
+
+void ossimDynamicLibrary::unload()
+{
+   if(isLoaded())
+   {
+#if defined(__WIN32__) || defined(_WIN32)
+      FreeLibrary(theLibrary);
+// #else HAVE_DLFCN_H
+#else
+      dlclose(theLibrary);
+#endif
+      theLibrary = 0;
+   }
+}
+
+void *ossimDynamicLibrary::getSymbol(const ossimString& name) const
+{
+   if(isLoaded())
+   {
+#if defined(__WIN32__) || defined(_WIN32)
+      return (void*)GetProcAddress( (HINSTANCE)theLibrary, name.c_str());
+#else
+      return dlsym(theLibrary, name.c_str());
+#endif
+   }
+
+   return (void*)0;
+}
diff --git a/ossim/src/ossim/plugin/ossimPluginLibrary.cpp b/ossim/src/ossim/plugin/ossimPluginLibrary.cpp
new file mode 100644
index 0000000..a19f49d
--- /dev/null
+++ b/ossim/src/ossim/plugin/ossimPluginLibrary.cpp
@@ -0,0 +1,90 @@
+//*******************************************************************
+///
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimPluginLibrary.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/plugin/ossimPluginLibrary.h>
+#include <iostream>
+
+ossimPluginLibrary::ossimPluginLibrary()
+   :ossimDynamicLibrary(),
+    m_info(0)
+{
+}
+
+ossimPluginLibrary::ossimPluginLibrary(const ossimString& name, const ossimString& options)
+   :ossimDynamicLibrary(name),
+    m_options(options),
+    m_info(0)
+{
+   initialize();
+}
+
+ossimPluginLibrary::~ossimPluginLibrary()
+{
+   finalize();
+}
+
+void ossimPluginLibrary::initialize()
+{
+   if(!isLoaded())
+   {
+      load();
+   }
+   
+   ossimSharedLibraryInitializePtr init = (ossimSharedLibraryInitializePtr)getSymbol("ossimSharedLibraryInitialize");
+   if(init)
+   {
+      init(&m_info, m_options.c_str());
+   }
+}
+
+void ossimPluginLibrary::finalize()
+{
+   ossimSharedLibraryFinalizePtr finalizeLib = (ossimSharedLibraryFinalizePtr)getSymbol("ossimSharedLibraryFinalize");
+   if(finalizeLib)
+   {         
+      finalizeLib();
+   }
+   
+   unload();
+}
+
+ossimString ossimPluginLibrary::getDescription()const
+{
+   ossimString result;
+
+   if(m_info&&isLoaded()&&m_info->getDescription)
+   {
+      result = m_info->getDescription();
+   }
+
+   return result;
+}
+
+void ossimPluginLibrary::getClassNames(std::vector<ossimString>& classNames)const
+{
+   if(m_info&&m_info->getNumberOfClassNames&&m_info->getClassName)
+   {
+      ossim_int32 idx        = 0;
+      ossim_int32 numObjects = 0;
+
+      numObjects = m_info->getNumberOfClassNames();
+      for(idx = 0; idx < numObjects; ++idx)
+      {
+         classNames.push_back(m_info->getClassName(idx));
+      }
+   }
+}
+
+void ossimPluginLibrary::setOptions(const ossimString& options)
+{
+   m_options = options;
+   
+}
+
diff --git a/src/ossim/plugin/ossimSharedObjectBridge.cpp b/ossim/src/ossim/plugin/ossimSharedObjectBridge.cpp
similarity index 100%
rename from src/ossim/plugin/ossimSharedObjectBridge.cpp
rename to ossim/src/ossim/plugin/ossimSharedObjectBridge.cpp
diff --git a/ossim/src/ossim/plugin/ossimSharedPluginRegistry.cpp b/ossim/src/ossim/plugin/ossimSharedPluginRegistry.cpp
new file mode 100644
index 0000000..9b6fc82
--- /dev/null
+++ b/ossim/src/ossim/plugin/ossimSharedPluginRegistry.cpp
@@ -0,0 +1,229 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimSharedPluginRegistry.cpp 23326 2015-05-27 13:07:51Z dburken $
+#include <algorithm>
+#include <iterator>
+#include <ossim/plugin/ossimSharedPluginRegistry.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/plugin/ossimSharedObjectBridge.h>
+
+//ossimSharedPluginRegistry* ossimSharedPluginRegistry::theInstance = NULL;
+//ossimPluginBridgeStructure ossimSharedPluginRegistry::thePluginBridgeFactoryPointers;
+
+static ossimTrace traceDebug("ossimSharedPluginRegistry:debug");
+
+ossimSharedPluginRegistry::ossimSharedPluginRegistry()
+{
+}
+
+ossimSharedPluginRegistry::~ossimSharedPluginRegistry()
+{
+   theLibraryList.clear();
+}
+
+ossimSharedPluginRegistry* ossimSharedPluginRegistry::instance()
+{
+   static ossimSharedPluginRegistry sharedInstance;
+
+   return &sharedInstance;//theInstance;
+}
+
+bool ossimSharedPluginRegistry::registerPlugin(const ossimFilename& filename, const ossimString& options)//, bool insertFrontFlag)
+{
+   bool result = false;
+   if(!getPlugin(filename))
+   {
+      ossimPluginLibrary *lib =new ossimPluginLibrary;
+      if(lib->load(filename))
+      {
+         lib->setOptions(options);
+         if(lib->getSymbol("ossimSharedLibraryInitialize"))
+         {
+            lib->initialize();
+//            if(!insertFrontFlag)
+//            {
+            theLibraryList.push_back(lib);
+//            }
+//            else
+//            {
+//               theLibraryList.insert(theLibraryList.begin(), lib);
+            //           }
+            result = true;
+         }
+         else if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "ossimSharedPluginRegistry DEBUG:"
+               << "ossimSharedLibraryInitialize symbol not found\n"
+               << std::endl;
+         }
+      }
+      
+      if ( !result )
+      {
+         delete lib;
+         lib = 0;
+      }
+      
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "WARNING: Plugin with the name " << filename << std::endl
+         << "Already registered with OSSIM" << std::endl;
+   }
+   
+   return result;
+}
+
+bool ossimSharedPluginRegistry::unregisterPlugin(int idx)
+{
+   ossimPluginLibrary* lib = getPlugin(idx);
+   
+   return unregisterPlugin(lib);
+}
+
+bool ossimSharedPluginRegistry::unregisterPlugin(ossimPluginLibrary* library)
+{
+   std::vector<ossimRefPtr<ossimPluginLibrary> >::iterator iter = theLibraryList.begin();
+   while(iter!=theLibraryList.end())
+   {
+      if((*iter).get() == library)
+      {
+         theLibraryList.erase(iter);
+         return true;
+      }
+      ++iter;
+   }
+   return false;
+}
+
+const ossimPluginLibrary* ossimSharedPluginRegistry::getPlugin(const ossimFilename& filename)const
+{
+   ossim_uint32 idx = 0;
+   ossimFilename fileOnly = filename.file();
+   for(idx = 0; idx < theLibraryList.size();++idx)
+   {
+      if(fileOnly == ossimFilename(theLibraryList[idx]->getName()).file())
+      {
+         return theLibraryList[idx].get();
+      }
+   }
+   
+   return 0;
+}
+
+ossimPluginLibrary* ossimSharedPluginRegistry::getPlugin(const ossimFilename& filename)
+{
+   ossim_uint32 idx = 0;
+   ossimFilename fileOnly = filename.file();
+
+   for(idx = 0; idx < theLibraryList.size();++idx)
+   {
+      if(fileOnly == ossimFilename(theLibraryList[idx]->getName()).file())
+      {
+         return theLibraryList[idx].get();
+      }
+   }
+   
+   return 0;
+}
+
+ossim_uint32 ossimSharedPluginRegistry::getIndex(const ossimPluginLibrary* lib)const
+{
+   ossim_uint32 idx = 0;
+
+   for(idx = 0; idx < theLibraryList.size(); ++idx)
+   {
+      if(theLibraryList[idx] == lib)
+      {
+         return idx;
+      }
+   }
+
+   return idx;
+}
+
+ossimPluginLibrary* ossimSharedPluginRegistry::getPlugin(ossim_uint32 idx)
+{
+   ossimPluginLibrary* result = 0;
+   
+   if(idx < theLibraryList.size())
+   {
+      result = theLibraryList[idx].get();
+   }
+
+   return result;
+}
+
+const ossimPluginLibrary* ossimSharedPluginRegistry::getPlugin(ossim_uint32 idx)const
+{
+   const ossimPluginLibrary* result = 0;
+   
+   if(idx < theLibraryList.size())
+   {
+      result = theLibraryList[idx].get();
+   }
+
+   return result;
+}
+
+ossim_uint32 ossimSharedPluginRegistry::getNumberOfPlugins()const
+{
+   return (ossim_uint32)theLibraryList.size();
+}
+
+
+bool ossimSharedPluginRegistry::isLoaded(const ossimFilename& filename) const
+   
+{
+   ossimFilename fileOnly = filename.file();
+   bool result = false;
+   ossim_uint32 count = getNumberOfPlugins();
+   for (ossim_uint32 i = 0; i < count; ++i)
+   {
+      const ossimPluginLibrary* pi = getPlugin(i);
+      if (pi)
+      {
+         if (fileOnly == ossimFilename(pi->getName()).file())
+         {
+            result = true;
+            break;
+         }
+      }
+   }
+   return result;
+}
+
+void ossimSharedPluginRegistry::printAllPluginInformation(std::ostream& out)
+{
+   ossim_uint32 count = getNumberOfPlugins();
+   ossim_uint32 idx = 0;
+   
+   for(idx = 0; idx < count; ++idx)
+   {
+      std::vector<ossimString> classNames;
+      const ossimPluginLibrary* pi = getPlugin(idx);
+      if(pi)
+      {
+         pi->getClassNames(classNames);
+         out << "Plugin: " << pi->getName() << std::endl;
+         out << "DESCRIPTION: \n";
+         out << pi->getDescription() << "\n";
+         out << "CLASSES SUPPORTED\n     ";
+         std::copy(classNames.begin(),
+                   classNames.end(),
+                   std::ostream_iterator<ossimString>(out, "\n     "));
+         out << "\n";
+      }
+   }
+}
diff --git a/ossim/src/ossim/point_cloud/ossimGenericPointCloudHandler.cpp b/ossim/src/ossim/point_cloud/ossimGenericPointCloudHandler.cpp
new file mode 100644
index 0000000..49b09cf
--- /dev/null
+++ b/ossim/src/ossim/point_cloud/ossimGenericPointCloudHandler.cpp
@@ -0,0 +1,69 @@
+#include <ossim/point_cloud/ossimGenericPointCloudHandler.h>
+
+ossimGenericPointCloudHandler::ossimGenericPointCloudHandler(vector<ossimEcefPoint>& ecef_points)
+{
+   // Fill the point storage in any order.
+   // Loop to add your points (assume your points are passed in a vector ecef_points[])
+   for (ossim_uint32 i=0; i<ecef_points.size(); ++i)
+   {
+      ossimPointRecord* point = new ossimPointRecord(ossimGpt(ecef_points[i]));
+      m_pointBlock.addPoint(point);
+   }
+   ossimGrect bounds;
+   m_pointBlock.getBounds(bounds);
+   m_minRecord = new ossimPointRecord(bounds.ll());
+   m_maxRecord = new ossimPointRecord(bounds.ur());
+}
+
+ossimGenericPointCloudHandler::ossimGenericPointCloudHandler(vector<ossimGpt>& ground_points)
+{
+   // Fill the point storage in any order.
+   // Loop to add your points (assume your points are passed in a vector ecef_points[])
+   for (ossim_uint32 i=0; i<ground_points.size(); ++i)
+   {
+      ossimPointRecord* point = new ossimPointRecord(ground_points[i]);
+      m_pointBlock.addPoint(point);
+   }
+   ossimGrect bounds;
+   m_pointBlock.getBounds(bounds);
+   m_minRecord = new ossimPointRecord(bounds.ll());
+   m_maxRecord = new ossimPointRecord(bounds.ur());
+}
+
+ossimGenericPointCloudHandler::~ossimGenericPointCloudHandler() 
+{ 
+   m_pointBlock.clear(); 
+}
+
+ossim_uint32 ossimGenericPointCloudHandler::getNumPoints() const 
+{ 
+   return m_pointBlock.size(); 
+}
+
+void ossimGenericPointCloudHandler::getFileBlock(ossim_uint32 offset,
+                          ossimPointBlock& block,
+                          ossim_uint32 maxNumPoints) const
+{
+   block.clear();
+   if (offset >= m_pointBlock.size())
+      return;
+
+   for (ossim_uint32 i=offset; i<m_pointBlock.size(); ++i)
+      block.addPoint(new ossimPointRecord(*(m_pointBlock[i])));
+
+   m_currentPID = block.size();
+}
+
+ossim_uint32 ossimGenericPointCloudHandler::getFieldCode() const 
+{ 
+  return 0; 
+}
+
+bool ossimGenericPointCloudHandler::open(const ossimFilename& pointsFile)
+{ 
+   return false; 
+}
+ 
+void ossimGenericPointCloudHandler::close() 
+{  
+}
diff --git a/ossim/src/ossim/point_cloud/ossimPointBlock.cpp b/ossim/src/ossim/point_cloud/ossimPointBlock.cpp
new file mode 100644
index 0000000..dfd2285
--- /dev/null
+++ b/ossim/src/ossim/point_cloud/ossimPointBlock.cpp
@@ -0,0 +1,239 @@
+//**************************************************************************************************
+//
+// OSSIM (http://trac.osgeo.org/ossim/)
+//
+// License: MIT
+//
+//**************************************************************************************************
+#include <ossim/point_cloud/ossimPointBlock.h>
+
+RTTI_DEF1(ossimPointBlock, "ossimPointBlock", ossimDataObject)
+
+ossimPointBlock::ossimPointBlock(ossimSource* owner, ossim_uint32 fields)
+:  ossimDataObject(owner),
+   m_nullPCR(fields),
+   m_fieldCode(0),
+   m_minMaxValid(false),
+   m_isNormalized(false)
+{
+}
+
+ossimPointBlock::~ossimPointBlock()
+{
+
+}
+
+void ossimPointBlock::getFieldMin(ossimPointRecord::FIELD_CODES field, ossim_float32& value) const
+{
+   if (empty())
+      value = ossim::nan();
+   else if (!m_minMaxValid)
+      scanForMinMax();
+
+   value = m_minRecord.getField(field);
+}
+
+void ossimPointBlock::getFieldMax(ossimPointRecord::FIELD_CODES field, ossim_float32& value) const
+{
+   if (empty())
+      value = ossim::nan();
+   else if (!m_minMaxValid)
+      scanForMinMax();
+
+   value = m_maxRecord.getField(field);
+}
+
+
+void ossimPointBlock::getBounds(ossimGrect& block_bounds) const
+{
+   if (!m_minMaxValid)
+      scanForMinMax();
+
+   block_bounds = ossimGrect(m_minRecord.getPosition(), m_maxRecord.getPosition());
+}
+
+const ossimPointRecord* ossimPointBlock::getPoint(ossim_uint32 point_offset) const
+{
+   if (point_offset < m_pointList.size())
+      return m_pointList[point_offset].get();
+   return 0;
+}
+
+ossimPointRecord* ossimPointBlock::getPoint(ossim_uint32 point_offset)
+{
+   if (point_offset < m_pointList.size())
+      return m_pointList[point_offset].get();
+   return 0;
+}
+
+const ossimPointBlock& ossimPointBlock::operator=(const ossimPointBlock& block )
+{
+   ossim_uint32 numPoints = block.size();
+   if (numPoints == 0)
+      return *this;
+
+   for (ossim_uint32 i=0; i<numPoints; ++i)
+      m_pointList.push_back(new ossimPointRecord(*(block[i])));
+
+   m_nullPCR = block.m_nullPCR;
+   m_minRecord = block.m_minRecord;
+   m_maxRecord = block.m_maxRecord;
+   m_minMaxValid = block.m_minMaxValid;
+   m_fieldCode = block.m_fieldCode;
+   m_isNormalized = block.m_isNormalized;
+
+   return *this;
+}
+
+ossimObject* ossimPointBlock::dup() const
+{
+   ossimPointBlock* copy = new ossimPointBlock(0, m_fieldCode);
+   *copy = *this;
+   return copy;
+}
+
+ossim_uint32 ossimPointBlock::getFieldCode() const
+{
+   if (!m_pointList.empty())
+      m_fieldCode = m_pointList[0]->getFieldCode();
+
+   return m_fieldCode;
+}
+
+vector<ossimPointRecord::FIELD_CODES> ossimPointBlock::getFieldCodesAsList() const
+{
+   vector<ossimPointRecord::FIELD_CODES> code_list;
+   if (m_fieldCode & ossimPointRecord::Intensity)
+      code_list.push_back(ossimPointRecord::Intensity);
+   if (m_fieldCode & ossimPointRecord::ReturnNumber)
+      code_list.push_back(ossimPointRecord::ReturnNumber);
+   if (m_fieldCode & ossimPointRecord::NumberOfReturns)
+      code_list.push_back(ossimPointRecord::NumberOfReturns);
+   if (m_fieldCode & ossimPointRecord::Red)
+      code_list.push_back(ossimPointRecord::Red);
+   if (m_fieldCode & ossimPointRecord::Green)
+      code_list.push_back(ossimPointRecord::Green);
+   if (m_fieldCode & ossimPointRecord::Blue)
+      code_list.push_back(ossimPointRecord::Blue);
+   if (m_fieldCode & ossimPointRecord::GpsTime)
+      code_list.push_back(ossimPointRecord::GpsTime);
+   if (m_fieldCode & ossimPointRecord::Infrared)
+      code_list.push_back(ossimPointRecord::Infrared);
+  return code_list;
+}
+
+void ossimPointBlock::setFieldCode(ossim_uint32 code)
+{
+   if (getFieldCode() != code)
+      clear();
+
+   m_fieldCode = code;
+}
+
+void ossimPointBlock::addPoint(ossimPointRecord* opr)
+{
+   // First check that the fields match the expected. If not, sync up to this point:
+   if ((opr->getFieldCode() & m_fieldCode) != m_fieldCode)
+      m_fieldCode = opr->getFieldCode();
+
+   m_pointList.push_back(ossimRefPtr<ossimPointRecord>(opr));
+   m_minMaxValid = false;
+}
+
+void ossimPointBlock::scanForMinMax() const
+{
+   ossim_uint32 numPoints = size();
+   if (numPoints == 0)
+      return;
+
+   // Latch first point:
+   m_minRecord = *(m_pointList[0].get());
+   m_maxRecord = m_minRecord;
+   ossimGpt minPos (m_minRecord.getPosition());
+   ossimGpt maxPos (minPos);
+
+   // For shorthand later:
+   const ossimPointRecord::FIELD_CODES I = ossimPointRecord::Intensity;
+   const ossimPointRecord::FIELD_CODES R = ossimPointRecord::Red;
+   const ossimPointRecord::FIELD_CODES G = ossimPointRecord::Green;
+   const ossimPointRecord::FIELD_CODES B = ossimPointRecord::Blue;
+   const ossimPointRecord::FIELD_CODES S = ossimPointRecord::ReturnNumber;
+   const ossimPointRecord::FIELD_CODES N = ossimPointRecord::NumberOfReturns;
+
+   // If color available, latch the min for all bands as one to minimize color distortion:
+   bool hasRGB = false;
+   if (m_minRecord.hasFields(R|G|B))
+   {
+      hasRGB = true;
+      ossim_float32 r = m_pointList[0]->getField(R);
+      ossim_float32 g = m_pointList[0]->getField(G);
+      ossim_float32 b = m_pointList[0]->getField(B);
+      float minC = std::min(r, std::min(g, b));
+      float maxC = std::max(r, std::max(g, b));
+      m_minRecord.setField(R,   minC);
+      m_minRecord.setField(G, minC);
+      m_minRecord.setField(B,  minC);
+      m_maxRecord.setField(R,   maxC);
+      m_maxRecord.setField(G, maxC);
+      m_maxRecord.setField(B,  maxC);
+   }
+
+   // Now loop over all points in file to latch min/max:
+   for (ossim_uint32 i=0; i<numPoints; ++i)
+   {
+      if (m_pointList[i]->getPosition().lat < minPos.lat)
+         minPos.lat = m_pointList[i]->getPosition().lat;
+      if (m_pointList[i]->getPosition().lon < minPos.lon)
+         minPos.lon = m_pointList[i]->getPosition().lon;
+      if (m_pointList[i]->getPosition().hgt < minPos.hgt)
+         minPos.hgt = m_pointList[i]->getPosition().hgt;
+
+      if (m_pointList[i]->getPosition().lat > maxPos.lat)
+         maxPos.lat = m_pointList[i]->getPosition().lat;
+      if (m_pointList[i]->getPosition().lon > maxPos.lon)
+         maxPos.lon = m_pointList[i]->getPosition().lon;
+      if (m_pointList[i]->getPosition().hgt > maxPos.hgt)
+         maxPos.hgt = m_pointList[i]->getPosition().hgt;
+
+      if (m_minRecord.hasFields(I) &&  (m_minRecord.getField(I) > m_pointList[i]->getField(I)))
+         m_minRecord.setField(I, m_pointList[i]->getField(I));
+
+      if (m_minRecord.hasFields(S) &&  (m_minRecord.getField(S) > m_pointList[i]->getField(S)))
+         m_minRecord.setField(S, m_pointList[i]->getField(S));
+
+      if (m_minRecord.hasFields(N) &&  (m_minRecord.getField(N) > m_pointList[i]->getField(N)))
+         m_minRecord.setField(N, m_pointList[i]->getField(N));
+
+      if (hasRGB)
+      {
+         ossim_float32 r = m_pointList[i]->getField(R);
+         ossim_float32 g = m_pointList[i]->getField(G);
+         ossim_float32 b = m_pointList[i]->getField(B);
+
+         float minC = std::min(r, std::min(g, b));
+         if (m_minRecord.getField(R) > minC)
+         {
+            m_minRecord.setField(R, minC);
+            m_minRecord.setField(G, minC);
+            m_minRecord.setField(B, minC);
+         }
+
+         float maxC = std::max(r, std::max(g, b));
+         if (m_maxRecord.getField(R) < maxC)
+         {
+            m_maxRecord.setField(R, maxC);
+            m_maxRecord.setField(G, maxC);
+            m_maxRecord.setField(B, maxC);
+         }
+      }
+   } // end loop over all points
+
+   m_minRecord.setPosition(minPos);
+   m_maxRecord.setPosition(maxPos);
+   m_minMaxValid = true;
+}
+
+
+
+
+
diff --git a/ossim/src/ossim/point_cloud/ossimPointCloudGeometry.cpp b/ossim/src/ossim/point_cloud/ossimPointCloudGeometry.cpp
new file mode 100644
index 0000000..c402863
--- /dev/null
+++ b/ossim/src/ossim/point_cloud/ossimPointCloudGeometry.cpp
@@ -0,0 +1,79 @@
+//**************************************************************************************************
+//
+// OSSIM (http://trac.osgeo.org/ossim/)
+//
+// License: MIT
+//
+//**************************************************************************************************
+// $Id$
+
+#include <ossim/point_cloud/ossimPointCloudGeometry.h>
+#include <ossim/base/ossimEcefPoint.h>
+#include <ossim/base/ossimUnitConversionTool.h>
+#include <ossim/projection/ossimWktProjectionFactory.h>
+#include <ossim/projection/ossimMapProjection.h>
+
+RTTI_DEF1(ossimPointCloudGeometry, "ossimPointCloudGeometry" , ossimObject);
+
+ossimPointCloudGeometry::ossimPointCloudGeometry(const ossimString& wkt)
+      : m_format(GEOGRAPHIC),
+        m_projection(0),
+        m_datum(ossimDatumFactory::instance()->wgs84())
+{
+   // Establish projection from WKT:
+   m_projection = dynamic_cast<ossimMapProjection*>(
+         ossimWktProjectionFactory::instance()->createProjection(wkt));
+
+   if (m_projection.valid())
+   {
+      m_datum = m_projection->getDatum();
+      if (!m_projection->isGeographic())
+         m_format = MAP_PROJECTED;
+   }
+}
+
+bool ossimPointCloudGeometry::operator==(const ossimPointCloudGeometry& other) const
+{
+   if (m_format != other.m_format)
+      return false;
+
+   if (m_projection.valid() && other.m_projection.valid() && (*m_projection == *(other.m_projection)))
+      return true;
+
+   return false;
+}
+
+void ossimPointCloudGeometry::convertPos(const ossimDpt3d& oldPt, ossimGpt& converted_gpos) const
+{
+   converted_gpos.makeNan();
+
+   // If the data buffer has existing points, transform them into the new projection and datum:
+   if (m_format == GEOGRAPHIC)
+   {
+      ossimGpt gpt (oldPt.y, oldPt.x, oldPt.z, m_datum);
+      gpt.changeDatum(converted_gpos.datum());
+      converted_gpos = gpt;
+   }
+   else if ((m_format == MAP_PROJECTED) && m_projection.valid())
+   {
+      ossimUnitConversionTool uct (1.0, m_projection->getProjectionUnits());
+      double coord_scale = uct.getMeters();
+
+      //Need to convert map E, N to lat, lon
+      ossimDpt oldMapPt(oldPt.x*coord_scale, oldPt.y*coord_scale);
+      ossimGpt gpt(getProjection()->inverse(oldMapPt));
+      gpt.changeDatum(m_datum);
+      gpt.hgt = oldPt.z*coord_scale;
+      gpt.changeDatum(converted_gpos.datum());
+      converted_gpos = gpt;
+   }
+   else if (m_format == ECF_METERS)
+   {
+      ossimEcefPoint oldEcfPt(oldPt);
+      converted_gpos = ossimGpt (oldEcfPt, converted_gpos.datum());
+   }
+
+   return;
+}
+
+
diff --git a/ossim/src/ossim/point_cloud/ossimPointCloudHandler.cpp b/ossim/src/ossim/point_cloud/ossimPointCloudHandler.cpp
new file mode 100644
index 0000000..d13eef7
--- /dev/null
+++ b/ossim/src/ossim/point_cloud/ossimPointCloudHandler.cpp
@@ -0,0 +1,100 @@
+//**************************************************************************************************
+//
+// OSSIM (http://trac.osgeo.org/ossim/)
+//
+// License: MIT
+//
+//**************************************************************************************************
+// $Id$
+
+#include <ossim/point_cloud/ossimPointCloudHandler.h>
+
+RTTI_DEF1(ossimPointCloudHandler, "ossimPointCloudHandler" , ossimPointCloudSource);
+
+ossim_uint32 ossimPointCloudHandler::DEFAULT_BLOCK_SIZE = 0x400000;
+
+ossimPointCloudHandler::ossimPointCloudHandler()
+:  m_currentPID(0)
+{
+}
+
+ossimPointCloudHandler::ossimPointCloudHandler(ossimObject* owner)
+:  ossimPointCloudSource(owner),
+   m_currentPID(0)
+{
+
+}
+
+ossimPointCloudHandler::~ossimPointCloudHandler()
+{
+}
+
+void ossimPointCloudHandler::getNextFileBlock(ossimPointBlock& block, ossim_uint32 maxPts) const
+{
+   getFileBlock(m_currentPID, block, maxPts);
+   return;
+}
+
+void ossimPointCloudHandler::getBlock(const ossimGrect& bounds, ossimPointBlock& block) const
+{
+   block.clear();
+
+   // This default implementation simply reads the whole datafile in file-blocks, retaining
+   // only those points inside the bounds:
+   ossimPointBlock file_block;
+   rewind();
+   ossimGpt gpt;
+
+   do
+   {
+      file_block.clear();
+      getNextFileBlock(file_block, DEFAULT_BLOCK_SIZE);
+      ossimPointBlock::PointList& pointList = file_block.getPoints();
+      ossimPointBlock::PointList::iterator iter = pointList.begin();
+      while (iter != pointList.end())
+      {
+         gpt = (*iter)->getPosition();
+         if (bounds.pointWithin(gpt))
+         {
+            block.addPoint(iter->get());
+         }
+         ++iter;
+      }
+   } while (file_block.size() == DEFAULT_BLOCK_SIZE);
+}
+
+void ossimPointCloudHandler::getBounds(ossimGrect& bounds) const
+{
+   if (m_minRecord.valid() && m_maxRecord.valid())
+      bounds = ossimGrect(m_minRecord->getPosition(), m_maxRecord->getPosition());
+   else
+      bounds.makeNan();
+}
+
+void ossimPointCloudHandler::normalizeBlock(ossimPointBlock& block)
+{
+   if (!m_minRecord.valid() || !m_maxRecord.valid())
+      return;
+
+   ossim_uint32 numPoints = block.size();
+   float val, norm, min, max;
+   vector<ossimPointRecord::FIELD_CODES> field_codes = block.getFieldCodesAsList();
+   vector<ossimPointRecord::FIELD_CODES>::const_iterator iter;
+   ossimPointRecord::FIELD_CODES field_code;
+   for (ossim_uint32 i=0; i<numPoints; ++i)
+   {
+      ossimPointRecord* opr = block[i];
+      iter = field_codes.begin();
+      while (iter != field_codes.end())
+      {
+         field_code = *iter;
+         min = m_minRecord->getField(field_code);
+         max = m_maxRecord->getField(field_code);
+         val = opr->getField(field_code);
+         norm = (val - min) / (max - min);
+         opr->setField(field_code, norm);
+         ++iter;
+      }
+   }
+}
+
diff --git a/ossim/src/ossim/point_cloud/ossimPointCloudHandlerRegistry.cpp b/ossim/src/ossim/point_cloud/ossimPointCloudHandlerRegistry.cpp
new file mode 100644
index 0000000..fcf39c6
--- /dev/null
+++ b/ossim/src/ossim/point_cloud/ossimPointCloudHandlerRegistry.cpp
@@ -0,0 +1,98 @@
+//**************************************************************************************************
+//
+// OSSIM (http://trac.osgeo.org/ossim/)
+//
+// License: MIT
+//
+//**************************************************************************************************
+// $Id$
+
+#include <ossim/point_cloud/ossimPointCloudHandlerRegistry.h>
+#include <ossim/point_cloud/ossimPointCloudHandler.h>
+#include <ossim/point_cloud/ossimPointCloudHandlerFactory.h>
+
+ossimPointCloudHandlerRegistry* ossimPointCloudHandlerRegistry::m_instance = 0;
+
+RTTI_DEF1(ossimPointCloudHandlerRegistry, "ossimPointCloudHandlerRegistry" , ossimObjectFactory);
+
+ossimPointCloudHandlerRegistry::ossimPointCloudHandlerRegistry()
+{
+   // TODO Auto-generated constructor stub
+}
+
+ossimPointCloudHandlerRegistry::~ossimPointCloudHandlerRegistry()
+{
+   // TODO Auto-generated destructor stub
+}
+
+ossimPointCloudHandlerRegistry* ossimPointCloudHandlerRegistry::instance()
+{
+   if (m_instance)
+      return m_instance;
+   m_instance = new ossimPointCloudHandlerRegistry;
+   return m_instance;
+}
+
+ossimPointCloudHandler* ossimPointCloudHandlerRegistry::open(const ossimFilename& fileName) const
+{
+   ossimPointCloudHandler*  result = NULL;
+   std::vector<ossimPointCloudHandlerFactory*>::const_iterator factory;
+
+   factory = m_factoryList.begin();
+   while((factory != m_factoryList.end()) && !result)
+   {
+      result = (*factory)->open(fileName);
+      ++factory;
+   }
+
+   return result;
+}
+
+ossimPointCloudHandler* ossimPointCloudHandlerRegistry::open(const ossimKeywordlist& kwl,
+                                                             const char* prefix) const
+{
+   ossimPointCloudHandler* result = NULL;
+   std::vector<ossimPointCloudHandlerFactory*>::const_iterator factory;
+
+   factory = m_factoryList.begin();
+   while((factory != m_factoryList.end()) && !result)
+   {
+      result = (*factory)->open(kwl, prefix);
+      ++factory;
+   }
+
+   return result;
+}
+
+ossimRefPtr<ossimPointCloudHandler> ossimPointCloudHandlerRegistry::open(std::istream* /*str*/,
+                                                 std::streamoff /*restartPosition*/,
+                                                 bool /*youOwnIt*/) const
+{
+   // TODO Auto-generated constructor stub
+   return 0;
+}
+
+ossimObject* ossimPointCloudHandlerRegistry::createObject(const ossimString& typeName) const
+{
+   return createObjectFromRegistry(typeName);
+}
+
+ossimObject* ossimPointCloudHandlerRegistry::createObject(const ossimKeywordlist& kwl,
+                                                          const char* prefix) const
+{
+   return createObjectFromRegistry(kwl, prefix);
+}
+
+const ossimPointCloudHandlerRegistry& ossimPointCloudHandlerRegistry::operator=(
+      const ossimPointCloudHandlerRegistry& /*rhs*/)
+{
+   return *this;
+}
+
+void ossimPointCloudHandlerRegistry::getTypeNameList(std::vector<ossimString>& typeList) const
+{
+   getAllTypeNamesFromRegistry(typeList);
+}
+
+
+
diff --git a/ossim/src/ossim/point_cloud/ossimPointCloudImageHandler.cpp b/ossim/src/ossim/point_cloud/ossimPointCloudImageHandler.cpp
new file mode 100644
index 0000000..b6298ae
--- /dev/null
+++ b/ossim/src/ossim/point_cloud/ossimPointCloudImageHandler.cpp
@@ -0,0 +1,832 @@
+//**************************************************************************************************
+//
+// OSSIM (http://trac.osgeo.org/ossim/)
+//
+// License: MIT
+//
+//**************************************************************************************************
+// $Id$
+
+#include <ossim/point_cloud/ossimPointCloudImageHandler.h>
+#include <ossim/point_cloud/ossimPointCloudSource.h>
+#include <ossim/point_cloud/ossimPointCloudHandlerRegistry.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimEllipsoid.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimNumericProperty.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/projection/ossimEpsgProjectionFactory.h>
+
+RTTI_DEF1(ossimPointCloudImageHandler, "ossimPointCloudImageHandler", ossimImageHandler);
+
+static ossimTrace traceDebug("ossimPointCloudImageHandler:debug");
+static const char* GSD_FACTOR_KW = "gsd_factor";
+static const char* COMPONENT_KW = "component";
+
+// The member m_activeComponent should be one of the following strings. This is set either in a
+// state KWL or by a call to setProperty(<"active_component", <string> >)
+static const char* INTENSITY_KW = "INTENSITY";
+static const char* HIGHEST_KW = "HIGHEST";
+static const char* LOWEST_KW = "LOWEST";
+static const char* RETURNS_KW = "RETURNS";
+static const char* RGB_KW = "RGB";
+
+ossimPointCloudImageHandler::PcrBucket::PcrBucket(const ossim_float32* init_value,
+                                                  ossim_uint32 numBands)
+:  m_numSamples (1)
+{
+   m_bucket = new ossim_float32[numBands];
+   for (ossim_uint32 i=0; i<numBands; i++)
+      m_bucket[i] = init_value[i];
+}
+
+
+ossimPointCloudImageHandler::PcrBucket::PcrBucket(const ossim_float32& R,
+      const ossim_float32& G,
+      const ossim_float32& B)
+:  m_numSamples (1)
+{
+   m_bucket = new ossim_float32[3];
+   m_bucket[0] = R;
+   m_bucket[1] = G;
+   m_bucket[2] = B;
+
+}
+
+
+ossimPointCloudImageHandler::PcrBucket::PcrBucket(const ossim_float32& init_value)
+:  m_numSamples (1)
+{
+   m_bucket = new ossim_float32[1];
+   m_bucket[0] = init_value;
+}
+
+
+ossimPointCloudImageHandler::PcrBucket::~PcrBucket()
+{
+   delete [] m_bucket;
+}
+
+
+ossimPointCloudImageHandler::ossimPointCloudImageHandler()
+      : ossimImageHandler(),
+        m_maxPixel(1.0),
+        m_minPixel(0.0),
+        m_gsd(),
+        m_gsdFactor (1.0),
+        m_tile(0),
+        m_mutex(),
+        m_activeComponent(INTENSITY)
+{
+   //---
+   // Nan out as can be set in several places, i.e. setProperty,
+   // loadState and initProjection.
+   //---
+   m_gsd.makeNan();
+
+   m_componentNames.push_back(INTENSITY_KW);
+   m_componentNames.push_back(HIGHEST_KW);
+   m_componentNames.push_back(LOWEST_KW);
+   m_componentNames.push_back(RETURNS_KW);
+   m_componentNames.push_back(RGB_KW);
+}
+
+ossimPointCloudImageHandler::~ossimPointCloudImageHandler()
+{
+   close();
+}
+
+bool ossimPointCloudImageHandler::open()
+{
+   close();
+
+   // Need to utilize the Point Cloud handler registry to open the PC file:
+   m_pch = ossimPointCloudHandlerRegistry::instance()->open(theImageFile);
+   if (!m_pch.valid())
+      return false;
+
+   getImageGeometry();
+   ossimImageHandler::completeOpen();
+
+   // Needed here after open to make sure that min/max pixels are set for active component/entry
+   setCurrentEntry((ossim_uint32)m_activeComponent);
+
+   return true;
+}
+
+bool ossimPointCloudImageHandler::setPointCloudHandler(ossimPointCloudHandler* pch)
+{
+   close();
+
+   // Need to utilize the Point Cloud handler registry to open the PC file:
+   m_pch = pch;
+   if (!m_pch.valid())
+      return false;
+
+   getImageGeometry();
+   ossimImageHandler::completeOpen();
+
+   // Needed here after open to make sure that min/max pixels are set for active component/entry
+   setCurrentEntry((ossim_uint32)m_activeComponent);
+
+   return true;
+}
+
+void ossimPointCloudImageHandler::close()
+{
+   if (isOpen())
+   {
+      m_pch->close();
+      m_tile = 0;
+      ossimImageHandler::close();
+   }
+}
+
+ossimRefPtr<ossimImageGeometry> ossimPointCloudImageHandler::getImageGeometry()
+{
+   if (!isOpen())
+      return 0;
+
+   if (theGeometry.valid())
+      return theGeometry;
+
+   // Check for external geom (i.e., a *.geom file)
+   theGeometry = getExternalImageGeometry();
+   if (theGeometry.valid())
+      return theGeometry;
+
+   theGeometry = new ossimImageGeometry();
+   ossimString epsgCode ("EPSG:4326");
+   ossimMapProjection* proj = dynamic_cast<ossimMapProjection*>(
+         ossimEpsgProjectionFactory::instance()->createProjection(epsgCode));
+   if (!proj)
+      return 0;
+   theGeometry->setProjection(proj);
+
+   // Need to establish image bounds and optimal GSD given ground rect. Use this switch to also
+   // initialize the UL tiepoint of image projection:
+   ossimGrect bounds;
+   m_pch->getBounds(bounds);
+   proj->setOrigin(bounds.ul());
+   proj->setUlTiePoints(bounds.ul());
+
+   // The GSD depends on the point density on the ground. count all final returns and
+   // assume they are evenly distributed over the bounding ground rect. Note that this can have
+   // up to a sqrt(2)X error if the collection was taken in a cardinal-diagonal direction.
+   // Also use this point loop to latch the ground quad vertices vertices.
+   ossim_uint32 numPulses = m_pch->getNumPoints(); // count of final returns
+   if (numPulses == 0)
+   {
+      // Not yet determined. Set GSD to NAN and expect it will be set later:
+      m_gsd.makeNan();
+   }
+   else if (m_gsd.hasNans())
+   {
+      ossimDpt delta (bounds.widthMeters(), bounds.heightMeters());
+      ossim_float64 gsd = sqrt(delta.x * delta.y / numPulses) * m_gsdFactor;
+      setGSD(gsd); // also recomputes the image size
+   }
+
+   return theGeometry;
+}
+
+ossimRefPtr<ossimImageData> ossimPointCloudImageHandler::getTile(const ossimIrect& tile_rect,
+                                                                 ossim_uint32 resLevel)
+{
+   if (!m_tile.valid())
+      initTile();
+
+   // Image rectangle must be set prior to calling getTile.
+   m_tile->setImageRectangle(tile_rect);
+   if (getTile(m_tile.get(), resLevel) == false)
+   {
+      if (m_tile->getDataObjectStatus() != OSSIM_NULL)
+         m_tile->makeBlank();
+   }
+
+   return m_tile;
+}
+
+bool ossimPointCloudImageHandler::getTile(ossimImageData* result, ossim_uint32 resLevel)
+{
+   // check for all systems go and valid args:
+   if (!m_pch.valid() || !result || (result->getScalarType() != OSSIM_FLOAT32)
+       || (result->getDataObjectStatus() == OSSIM_NULL) || m_gsd.hasNans())
+   {
+      return false;
+   }
+
+   // Overviews achieved with GSD setting. This may be too slow.
+   ossimDpt gsd (m_gsd);
+   if (resLevel > 0)
+      getGSD(gsd, resLevel);
+
+   // Establish the ground and image rects for this tile:
+   const ossimIrect img_tile_rect = result->getImageRectangle();
+   const ossimIpt tile_offset (img_tile_rect.ul());
+   const ossim_uint32 tile_width = img_tile_rect.width();
+   const ossim_uint32 tile_height = img_tile_rect.height();
+   const ossim_uint32 tile_size = img_tile_rect.area();
+
+   ossimGpt gnd_ul, gnd_lr;
+   ossimDpt dpt_ul (img_tile_rect.ul().x - 0.5, img_tile_rect.ul().y - 0.5);
+   ossimDpt dpt_lr (img_tile_rect.lr().x + 0.5, img_tile_rect.lr().y + 0.5);
+   theGeometry->rnToWorld(dpt_ul, resLevel, gnd_ul);
+   theGeometry->rnToWorld(dpt_lr, resLevel, gnd_lr);
+   const ossimGrect gnd_rect (gnd_ul, gnd_lr);
+
+   // Create array of buckets to store accumulated point data.
+   ossim_uint32 numBands = result->getNumberOfBands();
+   if (numBands > getNumberOfInputBands())
+   {
+      // This should never happen;
+      ossimNotify(ossimNotifyLevel_FATAL)
+            << "ossimPointCloudImageHandler::getTile() ERROR: \n"
+            << "More bands were requsted than was available from the point cloud source. Returning "
+            << "blank tile." << endl;
+      result->makeBlank();
+      return false;
+   }
+   std::map<ossim_int32, PcrBucket*> accumulator;
+
+   // initialize a point block with desired fields as requested in the reader properties
+   ossimPointBlock pointBlock (this);
+   pointBlock.setFieldCode(componentToFieldCode());
+   m_pch->rewind();
+
+   ossimDpt ipt;
+   ossimGpt pos;
+
+#define USE_GETBLOCK
+#ifdef USE_GETBLOCK
+   m_pch->getBlock(gnd_rect, pointBlock);
+   for (ossim_uint32 id=0; id<pointBlock.size(); ++id)
+   {
+      pos = pointBlock[id]->getPosition();
+      theGeometry->worldToRn(pos, resLevel, ipt);
+      ipt.x = ossim::round<double,double>(ipt.x) - tile_offset.x;
+      ipt.y = ossim::round<double,double>(ipt.y) - tile_offset.y;
+
+      ossim_int32 bucketIndex = ipt.y*tile_width + ipt.x;
+      if ((bucketIndex >= 0) && (bucketIndex < (ossim_int32)tile_size))
+         addSample(accumulator, bucketIndex, pointBlock[id]);
+   }
+
+#else // using getFileBlock
+   ossim_uint32 numPoints = m_pch->getNumPoints();
+   if (numPoints > ossimPointCloudHandler::DEFAULT_BLOCK_SIZE)
+      numPoints = ossimPointCloudHandler::DEFAULT_BLOCK_SIZE;
+
+   // Loop to read all point blocks:
+   do
+   {
+      pointBlock.clear();
+      m_pch->getNextFileBlock(pointBlock, numPoints);
+      //m_pch->normalizeBlock(pointBlock);
+
+      for (ossim_uint32 id=0; id<pointBlock.size(); ++id)
+      {
+         // Check that each point in read block is inside the ROI before accumulating it:
+         pos = pointBlock[id]->getPosition();
+         if (gnd_rect.pointWithin(pos))
+         {
+            theGeometry->worldToRn(pos, resLevel, ipt);
+            ipt.x = ossim::round<double,double>(ipt.x) - tile_offset.x;
+            ipt.y = ossim::round<double,double>(ipt.y) - tile_offset.y;
+
+            ossim_int32 bucketIndex = ipt.y*tile_width + ipt.x;
+            if ((bucketIndex >= 0) && (bucketIndex < (ossim_int32)tile_size))
+               addSample(accumulator, bucketIndex, pointBlock[id]);
+         }
+      }
+   } while (pointBlock.size() == numPoints);
+#endif
+
+   // Finished accumulating, need to normalize and fill the tile.
+   // We must always blank out the tile as we may not have a point for every pixel.
+   normalize(accumulator);
+   ossim_float32** buf = new ossim_float32*[numBands];
+   std::map<ossim_int32, PcrBucket*>::iterator accum_iter;
+   ossim_float32 null_pixel = OSSIM_DEFAULT_NULL_PIX_FLOAT;
+   result->setNullPix(null_pixel);
+   for (ossim_uint32 band = 0; band < numBands; band++)
+   {
+      ossim_uint32 index = 0;
+      buf[band] = result->getFloatBuf(band);
+      for (ossim_uint32 y = 0; y < tile_height; y++)
+      {
+         for (ossim_uint32 x = 0; x < tile_width; x++)
+         {
+            accum_iter = accumulator.find(index);
+            if (accum_iter != accumulator.end())
+               buf[band][index] = accum_iter->second->m_bucket[band];
+            else
+               buf[band][index] = null_pixel;
+            ++index;
+         }
+      }
+   }
+
+   delete [] buf;
+   buf = 0;
+
+   std::map<ossim_int32, PcrBucket*>::iterator pcr_iter = accumulator.begin();
+   while (pcr_iter != accumulator.end())
+   {
+      delete pcr_iter->second;
+      pcr_iter++;
+   }
+
+   result->validate();
+   return true;
+}
+
+void ossimPointCloudImageHandler::addSample(std::map<ossim_int32, PcrBucket*>& accumulator,
+                                            ossim_int32 index,
+                                            const ossimPointRecord* sample)
+{
+   if (sample == 0)
+      return;
+
+   //cout << "sample: "<<*sample<<endl;//TODO: REMOVE DEBUG
+
+   // Search map for exisiting point in that location:
+   std::map<ossim_int32, PcrBucket*>::iterator iter = accumulator.find(index);
+   if (iter == accumulator.end())
+   {
+      // First hit. Initialize location with current sample:
+      if (m_activeComponent == INTENSITY)
+      {
+         accumulator[index] = new PcrBucket(sample->getField(ossimPointRecord::Intensity));
+      }
+      else if (m_activeComponent == RGB)
+      {
+         ossim_float32 color[3];
+         color[0] = sample->getField(ossimPointRecord::Red);
+         color[1] = sample->getField(ossimPointRecord::Green);
+         color[2] = sample->getField(ossimPointRecord::Blue);
+         accumulator[index] = new PcrBucket(color, 3);
+      }
+      else if ((m_activeComponent == LOWEST) || (m_activeComponent == HIGHEST))
+         accumulator[index] = new PcrBucket(sample->getPosition().hgt);
+      else if (m_activeComponent == RETURNS)
+         accumulator[index] = new PcrBucket(sample->getField(ossimPointRecord::NumberOfReturns));
+   }
+   else
+   {
+      // Not the first hit at this location, accumulate:
+      // First hit. Initialize location with current sample:
+      if (m_activeComponent == INTENSITY)
+      {
+         iter->second->m_bucket[0] += sample->getField(ossimPointRecord::Intensity);
+      }
+      else if (m_activeComponent == RGB)
+      {
+         iter->second->m_bucket[0] += sample->getField(ossimPointRecord::Red);
+         iter->second->m_bucket[1] += sample->getField(ossimPointRecord::Green);
+         iter->second->m_bucket[2] += sample->getField(ossimPointRecord::Blue);
+      }
+      else if ((m_activeComponent == HIGHEST) &&
+            (sample->getPosition().hgt > iter->second->m_bucket[0]))
+         iter->second->m_bucket[0] = sample->getPosition().hgt;
+      else if ((m_activeComponent == LOWEST) &&
+            (sample->getPosition().hgt < iter->second->m_bucket[0]))
+         iter->second->m_bucket[0] = sample->getPosition().hgt;
+      else if (m_activeComponent == RETURNS)
+         iter->second->m_bucket[0] += sample->getField(ossimPointRecord::NumberOfReturns);
+
+      iter->second->m_numSamples++;
+   }
+}
+
+void ossimPointCloudImageHandler::normalize(std::map<ossim_int32, PcrBucket*>& accumulator)
+{
+   // highest and lowest elevations latch extremes, no mean is computed but needs to be normalized
+   if ((m_activeComponent == LOWEST) || (m_activeComponent == HIGHEST) ||
+         (m_activeComponent == RETURNS))
+      return;
+
+   int numBands = 1;
+   if (m_activeComponent == RGB)
+      numBands = 3;
+
+   std::map<ossim_int32, PcrBucket*>::iterator iter = accumulator.begin();
+   ossim_float32 avg;
+   while (iter != accumulator.end())
+   {
+      for (int i=0; i<numBands; i++)
+      {
+         avg = iter->second->m_bucket[i] / iter->second->m_numSamples;
+         iter->second->m_bucket[i] = avg;
+      }
+      iter++;
+   }
+}
+
+ossim_uint32 ossimPointCloudImageHandler::getNumberOfInputBands() const
+{
+   ossim_uint32 numBands = 0;
+   if (m_pch.valid())
+   {
+      if (m_activeComponent == INTENSITY)
+         numBands = 1;
+      else if (m_activeComponent == RGB)
+         numBands = 3;
+      else if ((m_activeComponent == LOWEST) || (m_activeComponent == HIGHEST))
+         numBands = 1;
+      else if (m_activeComponent == RETURNS)
+         numBands = 1;
+   }
+   return numBands;
+}
+
+ossim_uint32 ossimPointCloudImageHandler::getNumberOfLines(ossim_uint32 resLevel) const
+{
+   ossim_uint32 result = 0;
+   if (isOpen() && theGeometry.valid())
+   {
+      ossimIpt image_size(theGeometry->getImageSize());
+      result = image_size.line;
+      if (resLevel)
+         result = (result >> resLevel);
+   }
+   return result;
+}
+
+ossim_uint32 ossimPointCloudImageHandler::getNumberOfSamples(ossim_uint32 resLevel) const
+{
+   ossim_uint32 result = 0;
+   if (isOpen() && theGeometry.valid())
+   {
+      ossimIpt image_size(theGeometry->getImageSize());
+      result = image_size.samp;
+      if (resLevel)
+         result = (result >> resLevel);
+   }
+   return result;
+}
+
+ossim_uint32 ossimPointCloudImageHandler::getImageTileWidth() const
+{
+   return getTileWidth();
+}
+
+ossim_uint32 ossimPointCloudImageHandler::getImageTileHeight() const
+{
+   return getTileHeight();
+}
+
+ossim_uint32 ossimPointCloudImageHandler::getTileWidth() const
+{
+   ossimIpt ipt;
+   ossim::defaultTileSize(ipt);
+   return ipt.x;
+}
+
+ossim_uint32 ossimPointCloudImageHandler::getTileHeight() const
+{
+   ossimIpt ipt;
+   ossim::defaultTileSize(ipt);
+   return ipt.y;
+}
+
+ossimScalarType ossimPointCloudImageHandler::getOutputScalarType() const
+{
+   return OSSIM_FLOAT32;
+}
+
+void ossimPointCloudImageHandler::getEntryList(std::vector<ossim_uint32>& entryList) const
+{
+   entryList.clear();
+   for (ossim_uint32 i = 0; i < m_componentNames.size(); i++)
+   {
+      entryList.push_back(i);
+   }
+}
+
+void ossimPointCloudImageHandler::getEntryNames(std::vector<ossimString>& entryNames) const
+{
+   entryNames = m_componentNames;
+}
+
+ossim_uint32 ossimPointCloudImageHandler::getCurrentEntry() const
+{
+   return (ossim_uint32) m_activeComponent;
+}
+
+bool ossimPointCloudImageHandler::setCurrentEntry(ossim_uint32 entryIdx)
+{
+   if (entryIdx >= NUM_COMPONENTS)
+      return false;
+
+   m_activeComponent = (Components) entryIdx;
+   if (m_pch.valid() && m_pch->getMinPoint() && m_pch->getMaxPoint())
+   {
+      if (m_activeComponent == INTENSITY)
+      {
+         m_minPixel = m_pch->getMinPoint()->getField(ossimPointRecord::Intensity);
+         m_maxPixel = m_pch->getMaxPoint()->getField(ossimPointRecord::Intensity);
+      }
+      else if (m_activeComponent == RGB)
+      {
+         m_minPixel = m_pch->getMinPoint()->getField(ossimPointRecord::Red);
+         m_maxPixel = m_pch->getMaxPoint()->getField(ossimPointRecord::Red);
+      }
+      else if ((m_activeComponent == LOWEST) || (m_activeComponent == HIGHEST))
+      {
+         m_minPixel = m_pch->getMinPoint()->getPosition().hgt;
+         m_maxPixel = m_pch->getMaxPoint()->getPosition().hgt;
+      }
+      else if (m_activeComponent == RETURNS)
+      {
+         m_minPixel = 0;
+         m_maxPixel = m_pch->getMaxPoint()->getField(ossimPointRecord::NumberOfReturns);
+      }
+   }
+
+   return true;
+}
+
+ossimString ossimPointCloudImageHandler::getShortName() const
+{
+   return ossimString("Point Cloud Image Handler");
+}
+
+ossimString ossimPointCloudImageHandler::getLongName() const
+{
+   return ossimString("ossim point cloud to image renderer");
+}
+
+double ossimPointCloudImageHandler::getMinPixelValue(ossim_uint32 /* band */) const
+{
+   return m_minPixel;
+}
+
+double ossimPointCloudImageHandler::getMaxPixelValue(ossim_uint32 /* band */) const
+{
+   return m_maxPixel;
+}
+
+double ossimPointCloudImageHandler::getNullPixelValue(ossim_uint32 /* band */) const
+{
+   return OSSIM_DEFAULT_NULL_PIX_FLOAT;
+}
+
+ossim_uint32 ossimPointCloudImageHandler::getNumberOfDecimationLevels() const
+{
+   // Can support any number of rlevels.
+   ossim_uint32 result = 1;
+   const ossim_uint32 STOP_DIMENSION = 16;
+   ossim_uint32 largestImageDimension =
+         getNumberOfSamples(0) > getNumberOfLines(0) ? getNumberOfSamples(0) : getNumberOfLines(0);
+   while (largestImageDimension > STOP_DIMENSION)
+   {
+      largestImageDimension /= 2;
+      ++result;
+   }
+   return result;
+}
+
+void ossimPointCloudImageHandler::initTile()
+{
+   const ossim_uint32 BANDS = getNumberOfOutputBands();
+
+   m_tile = new ossimImageData(this, getOutputScalarType(), BANDS, getTileWidth(), getTileHeight());
+
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      m_tile->setMinPix(getMinPixelValue(band), band);
+      m_tile->setMaxPix(getMaxPixelValue(band), band);
+      m_tile->setNullPix(getNullPixelValue(band), band);
+   }
+
+   m_tile->initialize();
+}
+
+void ossimPointCloudImageHandler::getGSD(ossimDpt& gsd, ossim_uint32 resLevel) const
+{
+   // std::pow(2.0, 0) returns 1.
+   ossim_float64 d = std::pow(2.0, static_cast<double>(resLevel));
+   gsd.x = m_gsd.x * d;
+   gsd.y = m_gsd.y * d;
+}
+
+void ossimPointCloudImageHandler::setGSD(const ossim_float64& gsd)
+{
+   if (ossim::isnan(gsd) || (gsd<=0.0) || !theGeometry.valid())
+         return;
+
+   m_gsd = ossimDpt(gsd, gsd);
+   m_gsdFactor = 1.0; // resets after GSD adjusted
+
+   ossimMapProjection* proj = dynamic_cast<ossimMapProjection*>(theGeometry->getProjection());
+   if (!proj)
+      return;
+
+   proj->setMetersPerPixel(m_gsd);
+
+   ossimGrect bounds;
+   m_pch->getBounds(bounds);
+
+   ossimDpt ipt_ul, ipt_lr;
+   theGeometry->worldToLocal(bounds.ul(), ipt_ul);
+   theGeometry->worldToLocal(bounds.lr(), ipt_lr);
+   ossimIpt image_size;
+   image_size.x = ossim::round<ossim_int32,double>(ipt_lr.x - ipt_ul.x) + 1;
+   image_size.y = ossim::round<ossim_int32,double>(ipt_lr.y - ipt_ul.y) + 1;
+
+   theGeometry->setImageSize(image_size);
+}
+
+bool ossimPointCloudImageHandler::saveState(ossimKeywordlist& kwl, const char* prefix) const
+{
+   static const char MODULE[] = "ossimPointCloudImageHandler::saveState()";
+
+   ossimImageHandler::saveState(kwl, prefix);
+   if (kwl.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << MODULE
+            << " ERROR detected in keyword list!  State not saved." << std::endl;
+      return false;
+   }
+
+   kwl.add(prefix, ossimKeywordNames::ENTRY_KW, (int) m_activeComponent, true);
+   kwl.add(prefix, ossimKeywordNames::METERS_PER_PIXEL_KW, m_gsd.x, true);
+
+   return true;
+}
+
+bool ossimPointCloudImageHandler::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   static const char MODULE[] = "ossimPointCloudImageHandler::loadState()";
+   theDecimationFactors.clear();
+   if(traceDebug())
+      ossimNotify(ossimNotifyLevel_DEBUG)<< MODULE << " DEBUG: entered ..."<< std::endl;
+
+   ossimImageHandler::loadState(kwl, prefix);
+   if (kwl.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)<< MODULE
+            << "WARNING: error detected in keyword list!  State not load." << std::endl;
+      return false;
+   }
+
+   m_activeComponent = INTENSITY;
+   ossimString value = kwl.find(prefix, ossimKeywordNames::ENTRY_KW);
+   if (!value.empty())
+   {
+      ossim_uint32 i = value.toUInt32();
+      if (i < NUM_COMPONENTS)
+         m_activeComponent = (Components) i;
+   }
+
+   value = kwl.find(prefix, ossimKeywordNames::METERS_PER_PIXEL_KW);
+   if (!value.empty())
+      setGSD(value.toDouble());
+
+   // The rest of the state is established by opening the file:
+   bool good_open = open();
+
+   return good_open;
+}
+
+void ossimPointCloudImageHandler::getValidImageVertices(std::vector<ossimIpt>& validVertices,
+                                   ossimVertexOrdering ordering,
+                                   ossim_uint32 resLevel) const
+{
+   validVertices.clear();
+   if (!m_pch.valid())
+      return;
+   int divisor = 1;
+   if (resLevel)
+      divisor = resLevel<<1;
+
+   // Transform the world coords for the four vertices into image vertices:
+   ossimDpt r0Pt;
+   ossimGrect bounds;
+   m_pch->getBounds(bounds);
+   theGeometry->worldToLocal(bounds.ul(), r0Pt);
+   validVertices.push_back(r0Pt);
+   theGeometry->worldToLocal(bounds.ur(), r0Pt);
+   validVertices.push_back(r0Pt);
+   theGeometry->worldToLocal(bounds.lr(), r0Pt);
+   validVertices.push_back(r0Pt);
+   theGeometry->worldToLocal(bounds.ll(), r0Pt);
+   validVertices.push_back(r0Pt);
+
+   if (ordering == OSSIM_COUNTERCLOCKWISE_ORDER)
+   {
+      for (int i=3; i>=0; i--)
+         validVertices.push_back(validVertices[i]/divisor);
+      validVertices.erase(validVertices.begin(), validVertices.begin()+4);
+   }
+}
+
+void ossimPointCloudImageHandler::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if (!property.valid())
+      return;
+
+   ossimString s;
+   property->valueToString(s);
+   if (s.empty())
+      return;
+
+   // The user should select either explicit GSD or relative GSD factor, never both:
+   if ( property->getName() == ossimKeywordNames::METERS_PER_PIXEL_KW )
+   {
+      ossim_float64 gsd = s.toFloat64();
+      if (!ossim::isnan(gsd))
+         setGSD(gsd);
+   }
+   else if ( property->getName() == GSD_FACTOR_KW )
+   {
+      m_gsdFactor = s.toDouble();
+      if (!ossim::isnan(m_gsdFactor))
+      {
+         if (!m_gsd.hasNans())
+            setGSD(m_gsd.x * m_gsdFactor);
+      }
+      else
+         m_gsdFactor = 1.0;
+   }
+   else if ( property->getName() == ossimKeywordNames::ENTRY_KW )
+   {
+      m_activeComponent = (Components) s.toUInt32();
+   }
+   else if ( property->getName() == COMPONENT_KW )
+   {
+      for (int i=0; i<NUM_COMPONENTS; i++)
+      {
+         if (s.upcase() == m_componentNames[i])
+         {
+            m_activeComponent = (Components) i;
+            break;
+         }
+      }
+   }
+   else
+   {
+      ossimImageHandler::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimPointCloudImageHandler::getProperty(const ossimString& name)const
+{
+   ossimRefPtr<ossimProperty> prop = 0;
+   if ( name == ossimKeywordNames::METERS_PER_PIXEL_KW )
+   {
+      ossimString value = ossimString::toString(m_gsd.x);
+      prop = new ossimStringProperty(name, value);
+   }
+   else if ( name == GSD_FACTOR_KW )
+   {
+      prop = new ossimNumericProperty(name, ossimString::toString(m_gsdFactor));
+   }
+   else if ( name == ossimKeywordNames::ENTRY_KW )
+   {
+      prop = new ossimNumericProperty(name, ossimString::toString((ossim_uint32) m_activeComponent));
+   }
+   else if ( name == COMPONENT_KW )
+   {
+      prop = new ossimStringProperty(name, m_componentNames[m_activeComponent]);
+   }
+   else
+   {
+      prop = ossimImageHandler::getProperty(name);
+   }
+   return prop;
+}
+
+ossim_uint32 ossimPointCloudImageHandler::componentToFieldCode() const
+{
+   ossim_uint32 field_code = 0;
+   switch (m_activeComponent)
+   {
+   case INTENSITY:
+      field_code = ossimPointRecord::Intensity;
+      break;
+   case RETURNS:
+      field_code = ossimPointRecord::NumberOfReturns;
+      break;
+   case RGB:
+      field_code = ossimPointRecord::Red | ossimPointRecord::Green | ossimPointRecord::Blue;
+      break;
+   default:
+      break;
+   }
+   return field_code;
+}
+
+
+
diff --git a/ossim/src/ossim/point_cloud/ossimPointCloudImageHandlerFactory.cpp b/ossim/src/ossim/point_cloud/ossimPointCloudImageHandlerFactory.cpp
new file mode 100644
index 0000000..4b608f8
--- /dev/null
+++ b/ossim/src/ossim/point_cloud/ossimPointCloudImageHandlerFactory.cpp
@@ -0,0 +1,160 @@
+/*
+ * ossimPointCloudImageHandlerFactory.cpp
+ *
+ *  Created on: Dec 8, 2014
+ *      Author: okramer
+ */
+
+#include <ossim/point_cloud/ossimPointCloudImageHandlerFactory.h>
+#include <ossim/point_cloud/ossimPointCloudImageHandler.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimKeywordNames.h>
+
+static const ossimTrace traceDebug("ossimPointCloudImageHandlerFactory:debug");
+
+RTTI_DEF1(ossimPointCloudImageHandlerFactory, "ossimPointCloudImageHandlerFactory", ossimImageHandlerFactoryBase);
+
+ossimPointCloudImageHandlerFactory* ossimPointCloudImageHandlerFactory::m_instance = 0;
+ossimPointCloudImageHandlerFactory::~ossimPointCloudImageHandlerFactory()
+{
+   m_instance = (ossimPointCloudImageHandlerFactory*)0;
+}
+
+ossimPointCloudImageHandlerFactory* ossimPointCloudImageHandlerFactory::instance()
+{
+   if(!m_instance)
+   {
+      m_instance = new ossimPointCloudImageHandlerFactory;
+   }
+
+   return m_instance;
+}
+
+ossimImageHandler* ossimPointCloudImageHandlerFactory::open(const ossimFilename& fileName,
+                                                  bool openOverview) const
+{
+   static const char* M = "ossimPointCloudImageHandlerFactory::open(filename) -- ";
+
+   ossimFilename copyFilename = fileName;
+   ossimRefPtr<ossimImageHandler> result = 0;
+
+   // Check for empty file.
+   copyFilename.trim();
+   if (copyFilename.empty() || !copyFilename.exists())
+      return 0;
+
+   ossimString ext = copyFilename.ext().downcase();
+   if(ext == "gz")
+      copyFilename = copyFilename.setExtension("");
+
+   if (traceDebug())
+      ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying Point Cloud...\n";
+
+   result = new ossimPointCloudImageHandler();
+   result->setFilename(copyFilename);
+   if (!result->open())
+      result = 0;
+   result->setOpenOverviewFlag(openOverview);
+
+   return result.release();
+}
+
+ossimImageHandler* ossimPointCloudImageHandlerFactory::open(const ossimKeywordlist& kwl,
+                                                  const char* prefix)const
+{
+   static const char* M = "ossimPointCloudImageHandlerFactory::open(kwl,prefix) -- ";
+   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG) << M <<" entered..." << std::endl;
+
+   ossimRefPtr<ossimImageHandler> result = 0;
+   if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying ossimPointCloudImageHandler...\n";
+   result = new ossimPointCloudImageHandler();
+   if (!result->loadState(kwl, prefix))
+      result = 0;
+
+   return result.get();
+}
+
+ossimRefPtr<ossimImageHandler> ossimPointCloudImageHandlerFactory::openOverview(
+   const ossimFilename& /* file */ ) const
+{
+   ossimRefPtr<ossimImageHandler> result = 0;
+   return result;
+}
+
+ossimObject* ossimPointCloudImageHandlerFactory::createObject(const ossimString& typeName)const
+{
+   if(STATIC_TYPE_NAME(ossimPointCloudImageHandler) == typeName)
+   {
+      return new ossimPointCloudImageHandler();
+   }
+
+   return (ossimObject*)0;
+}
+
+void ossimPointCloudImageHandlerFactory::getSupportedExtensions(ossimImageHandlerFactoryBase::UniqueStringList& extensionList)const
+{
+   extensionList.push_back("las");
+   extensionList.push_back("gpkg");
+}
+
+void ossimPointCloudImageHandlerFactory::getImageHandlersBySuffix(ossimImageHandlerFactoryBase::ImageHandlerList& result, const ossimString& ext)const
+{
+   if ((ext == "las") || (ext == "gpkg"))
+   {
+      result.push_back(new ossimPointCloudImageHandler);
+      return;
+   }
+}
+
+void ossimPointCloudImageHandlerFactory::getImageHandlersByMimeType(ossimImageHandlerFactoryBase::ImageHandlerList& result, const ossimString& mimeType)const
+{
+   ossimString test(mimeType.begin(), mimeType.begin()+6);
+   if(test == "image/")
+   {
+      ossimString mimeTypeTest(mimeType.begin() + 6, mimeType.end());
+      getImageHandlersBySuffix(result, mimeTypeTest);
+      if(mimeTypeTest == "las")
+      {
+         result.push_back(new ossimPointCloudImageHandler);
+      }
+   }
+}
+
+ossimObject* ossimPointCloudImageHandlerFactory::createObject(const ossimKeywordlist& kwl,
+                                                    const char* prefix)const
+{
+   ossimObject* result = (ossimObject*)0;
+   const char* type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
+
+   if(type)
+   {
+      if (ossimString(type).trim() == STATIC_TYPE_NAME(ossimImageHandler))
+      {
+         const char* lookup = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
+
+         if (lookup)
+         {
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << "BEBUG: filename " << lookup << std::endl;
+            }
+            // Call the open that takes a filename...
+            result = this->open(kwl, prefix);//ossimFilename(lookup));
+         }
+      }
+      else
+      {
+         result = createObject(ossimString(type));
+         if(result)
+         {
+            result->loadState(kwl, prefix);
+         }
+      }
+   }
+   return result;
+}
+
+void ossimPointCloudImageHandlerFactory::getTypeNameList(std::vector<ossimString>& typeList)const
+{
+   typeList.push_back(STATIC_TYPE_NAME(ossimPointCloudImageHandler));
+}
diff --git a/ossim/src/ossim/point_cloud/ossimPointCloudSource.cpp b/ossim/src/ossim/point_cloud/ossimPointCloudSource.cpp
new file mode 100644
index 0000000..5b52013
--- /dev/null
+++ b/ossim/src/ossim/point_cloud/ossimPointCloudSource.cpp
@@ -0,0 +1,67 @@
+//**************************************************************************************************
+//
+// OSSIM (http://trac.osgeo.org/ossim/)
+//
+// License: MIT
+//
+//**************************************************************************************************
+
+#include <ossim/point_cloud/ossimPointCloudSource.h>
+#include <ossim/point_cloud/ossimPointCloudGeometry.h>
+#include <ossim/point_cloud/ossimPointRecord.h>
+
+RTTI_DEF1(ossimPointCloudSource, "ossimPointCloudSource" , ossimSource);
+
+
+ossimPointCloudSource::ossimPointCloudSource(ossimObject* owner)
+      : ossimSource(owner)
+{
+}
+
+ossimPointCloudSource::ossimPointCloudSource(const ossimPointCloudSource& rhs)
+      : ossimSource(rhs)
+{
+}
+
+ossimPointCloudSource::~ossimPointCloudSource()
+{
+}
+
+const ossimPointRecord*  ossimPointCloudSource::getMinPoint() const
+{
+   if (getInput(0) == 0)
+      return &m_nullPCR;
+
+   return ((ossimPointCloudSource*)getInput(0))->getMinPoint();
+}
+
+const ossimPointRecord*  ossimPointCloudSource::getMaxPoint() const
+{
+   if (getInput(0) == 0)
+      return &m_nullPCR;
+
+   return ((ossimPointCloudSource*)getInput(0))->getMaxPoint();
+}
+
+ossim_uint32  ossimPointCloudSource::getFieldCode() const
+{
+   if (getInput(0) == 0)
+      return 0;
+
+   return ((ossimPointCloudSource*)getInput(0))->getFieldCode();
+}
+
+void ossimPointCloudSource::setFieldCode(ossim_uint32 fc)
+{
+   if (getInput(0) != 0)
+      ((ossimPointCloudSource*) getInput(0))->setFieldCode(fc);
+}
+
+bool ossimPointCloudSource::canConnectMyInputTo(ossim_int32 i,const ossimConnectableObject* p) const
+{
+   if ( (i>0) || (p==0) )
+      return false;
+
+   return (p->canCastTo("ossimPointCloudSource"));
+}
+
diff --git a/ossim/src/ossim/point_cloud/ossimPointRecord.cpp b/ossim/src/ossim/point_cloud/ossimPointRecord.cpp
new file mode 100644
index 0000000..db24b21
--- /dev/null
+++ b/ossim/src/ossim/point_cloud/ossimPointRecord.cpp
@@ -0,0 +1,180 @@
+//**************************************************************************************************
+//
+// OSSIM (http://trac.osgeo.org/ossim/)
+//
+// License: MIT
+//
+//**************************************************************************************************
+// $Id: ossimPointRecord.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/point_cloud/ossimPointRecord.h>
+
+ossimPointRecord::ossimPointRecord(ossim_uint32 field_code)
+      : m_pointId(0)
+{
+   if (field_code & Intensity)
+      m_fieldMap[Intensity] = ossim::nan();
+   if (field_code & ReturnNumber)
+      m_fieldMap[ReturnNumber] = ossim::nan();
+   if (field_code & NumberOfReturns)
+      m_fieldMap[NumberOfReturns] = ossim::nan();
+   if (field_code & Red)
+      m_fieldMap[Red] = ossim::nan();
+   if (field_code & Green)
+      m_fieldMap[Green] = ossim::nan();
+   if (field_code & Blue)
+      m_fieldMap[Blue] = ossim::nan();
+   if (field_code & GpsTime)
+      m_fieldMap[GpsTime] = ossim::nan();
+   if (field_code & Infrared)
+      m_fieldMap[Infrared] = ossim::nan();
+}
+
+ossimPointRecord::ossimPointRecord(const ossimPointRecord& pcr)
+      : m_pointId(pcr.m_pointId),
+        m_position(pcr.m_position),
+        m_fieldMap (pcr.m_fieldMap)
+{
+}
+
+ossimPointRecord::ossimPointRecord(const ossimGpt& pos)
+      : m_pointId(0),
+        m_position(pos)
+{
+}
+
+ossimPointRecord::~ossimPointRecord()
+{
+}
+
+inline bool ossimPointRecord::hasFields(ossim_uint32 field_code) const
+{
+   bool found = true;
+
+   if (field_code & Intensity)
+      found &= m_fieldMap.find(Intensity) != m_fieldMap.end();
+   if (found && (field_code & ReturnNumber))
+         found = m_fieldMap.find(ReturnNumber) != m_fieldMap.end();
+   if (found && (field_code & NumberOfReturns))
+         found = m_fieldMap.find(NumberOfReturns) != m_fieldMap.end();
+   if (found && (field_code & Red))
+         found = m_fieldMap.find(Red) != m_fieldMap.end();
+   if (found && (field_code & Green))
+         found = m_fieldMap.find(Green) != m_fieldMap.end();
+   if (found && (field_code & Blue))
+         found = m_fieldMap.find(Blue) != m_fieldMap.end();
+   if (found && (field_code & GpsTime))
+         found = m_fieldMap.find(GpsTime) != m_fieldMap.end();
+   if (found && (field_code & Infrared))
+         found = m_fieldMap.find(Infrared) != m_fieldMap.end();
+
+   return found;
+}
+
+inline ossim_uint32 ossimPointRecord::getFieldCode() const
+{
+   ossim_uint32 field_code = 0;
+
+   if (m_fieldMap.find(Intensity) != m_fieldMap.end())
+      field_code |= Intensity;
+   if (m_fieldMap.find(ReturnNumber) != m_fieldMap.end())
+      field_code |= ReturnNumber;
+   if (m_fieldMap.find(NumberOfReturns) != m_fieldMap.end())
+      field_code |= NumberOfReturns;
+   if (m_fieldMap.find(Red) != m_fieldMap.end())
+      field_code |= Red;
+   if (m_fieldMap.find(Green) != m_fieldMap.end())
+      field_code |= Green;
+   if (m_fieldMap.find(Blue) != m_fieldMap.end())
+      field_code |= Blue;
+   if (m_fieldMap.find(GpsTime) != m_fieldMap.end())
+      field_code |= GpsTime;
+   if (m_fieldMap.find(Infrared) != m_fieldMap.end())
+      field_code |= Infrared;
+
+   return field_code;
+}
+
+ossim_float32 ossimPointRecord::getField(FIELD_CODES fc) const
+{
+   std::map<FIELD_CODES, ossim_float32>::const_iterator v = m_fieldMap.find(fc);
+   if (v == m_fieldMap.end())
+      return ossim::nan();
+   return v->second;
+}
+
+void  ossimPointRecord::setField(FIELD_CODES fc, ossim_float32 value)
+{
+   m_fieldMap[fc] = value;
+}
+
+
+ossimPointRecord& ossimPointRecord::operator=(const ossimPointRecord& pcr)
+{
+   if (this == &pcr)
+      return *this;
+
+   m_pointId = pcr.m_pointId;
+   m_position = pcr.m_position;
+   m_fieldMap = pcr.m_fieldMap;
+
+   return *this;
+}
+
+std::ostream& operator << (std::ostream& out, const ossimPointRecord& p)
+{
+   out   << "ossimPointCloudRecord for pointId: " << p.m_pointId
+         << "\n   Position: " << p.m_position << ends;
+
+   std::map<ossimPointRecord::FIELD_CODES, ossim_float32>::const_iterator iter = p.m_fieldMap.begin();
+   while (iter != p.m_fieldMap.end())
+   {
+      switch (iter->first)
+      {
+      case ossimPointRecord::Intensity:
+         out << "\n   Intensity: ";
+         break;
+      case ossimPointRecord::ReturnNumber:
+         out << "\n   ReturnNumber: ";
+         break;
+      case ossimPointRecord::NumberOfReturns:
+         out << "\n   NumberOfReturns: ";
+         break;
+      case ossimPointRecord::Red:
+         out << "\n   Red: ";
+         break;
+      case ossimPointRecord::Green:
+         out << "\n   Green: ";
+         break;
+      case ossimPointRecord::Blue:
+         out << "\n   Blue: ";
+         break;
+      case ossimPointRecord::GpsTime:
+         out << "\n   GpsTime: ";
+         break;
+      case ossimPointRecord::Infrared:
+         out << "\n   Infrared: ";
+         break;
+      default:
+         out << "\n   Unidentified: ";
+      }
+      out << iter->second;
+      ++iter;
+   }
+   return out;
+}
+
+void ossimPointRecord::clear()
+{
+   m_pointId = 0;
+}
+
+bool ossimPointRecord::isValid() const
+{
+   if ((m_pointId == 0) || m_fieldMap.empty() || m_position.hasNans())
+      return false;
+   return true;
+}
+
+
+
diff --git a/src/ossim/projection/makefile.vc b/ossim/src/ossim/projection/makefile.vc
similarity index 100%
rename from src/ossim/projection/makefile.vc
rename to ossim/src/ossim/projection/makefile.vc
diff --git a/ossim/src/ossim/projection/ossimAdjMapModel.cpp b/ossim/src/ossim/projection/ossimAdjMapModel.cpp
new file mode 100644
index 0000000..4576963
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimAdjMapModel.cpp
@@ -0,0 +1,418 @@
+//----------------------------------------------------------------------------
+// Copyright (c) 2005, Oscar Kramer, all rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Oscar Kramer
+//
+// Description:
+// 
+// Special "sensor model" that provides a conventional map projection but
+// with additional capability for adjusting the map x,y coordinates with
+// offset, scale, and rotation transform.  Funtions to control notifications,
+// information and error output.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimAdjMapModel.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstdlib> /* for atof */
+#include <ossim/projection/ossimAdjMapModel.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/projection/ossimMapProjectionFactory.h>
+#include <ossim/elevation/ossimElevManager.h>
+
+// Geometry File Keywords:
+static const char* PARAMETER_KEYWORDS[] = {"map_offset_x",
+                                           "map_offset_y",
+                                           "map_rotation",
+                                           "map_scale_x",
+                                           "map_scale_y"};
+static const char* MAP_PROJ_FILE_KW    = "map_proj_filename";
+
+RTTI_DEF1(ossimAdjMapModel, "ossimAdjMapModel", ossimSensorModel);
+
+//----------------------------------------------------------------------------
+//! Constructs to uninitialized state (needed by factory).
+//----------------------------------------------------------------------------
+
+ossimAdjMapModel::ossimAdjMapModel()
+   :
+   ossimSensorModel(),
+   theAdjParams(NUM_ADJ_PARAMS),
+   theMapProjection(),
+   theCosTheta(0.0),
+   theSinTheta(0.0)
+{
+   theImageSize = ossimIpt(0,0);
+   initAdjustableParameters();
+   theErrorStatus++;
+}
+
+//----------------------------------------------------------------------------
+//! Constructs with map projection and image rectangle size.
+//----------------------------------------------------------------------------
+
+ossimAdjMapModel::ossimAdjMapModel(ossimMapProjection* map_proj,
+                                   const ossimIpt& image_size)
+   :
+   ossimSensorModel(),
+   theAdjParams(NUM_ADJ_PARAMS),
+   theMapProjection(map_proj),
+   theCosTheta(0.0),
+   theSinTheta(0.0)
+{
+   initializeFromMap();
+   theImageSize = image_size;
+   initAdjustableParameters();
+}
+
+//----------------------------------------------------------------------------
+//! Copy constructor
+//----------------------------------------------------------------------------
+
+ossimAdjMapModel::ossimAdjMapModel(const ossimAdjMapModel& copy_this)
+   :
+   ossimSensorModel(copy_this),
+   theAdjParams(NUM_ADJ_PARAMS),
+   theMapProjection(copy_this.theMapProjection),
+   theCosTheta(0.0),
+   theSinTheta(0.0)
+{
+   theAdjParams = copy_this.theAdjParams;
+}
+
+//----------------------------------------------------------------------------
+//! Constructs from Geom KWL
+//----------------------------------------------------------------------------
+ossimAdjMapModel::ossimAdjMapModel(const ossimKeywordlist& kwl,
+                                   const char* prefix)
+   :
+   ossimSensorModel(kwl),
+   theAdjParams(NUM_ADJ_PARAMS),
+   theMapProjection(),
+   theCosTheta(0.0),
+   theSinTheta(0.0)      
+                
+{
+   initAdjustableParameters();
+   loadState(kwl, prefix);
+}
+
+//----------------------------------------------------------------------------
+//! Constructs from Geom KWL
+//----------------------------------------------------------------------------
+
+ossimAdjMapModel::ossimAdjMapModel(const ossimFilename& kwl_filename)
+   :
+   ossimSensorModel(),
+   theAdjParams(NUM_ADJ_PARAMS),
+   theMapProjection(),
+   theCosTheta(0.0),
+   theSinTheta(0.0)      
+{
+   initAdjustableParameters();
+   ossimKeywordlist kwl (kwl_filename);
+   loadState(kwl);
+}
+
+//----------------------------------------------------------------------------
+//! Initializes base class data members after map model established. Returns TRUE if all's well.
+//----------------------------------------------------------------------------
+bool ossimAdjMapModel::initializeFromMap()
+{
+   if (!theMapProjection)
+   {
+      theErrorStatus++;
+      return false;
+   }
+   theSensorID = "AdjMapModel";
+   theGSD = theMapProjection->getMetersPerPixel();
+   theMeanGSD = 0.5*(theGSD.x + theGSD.y);
+   theRefGndPt = theMapProjection->origin();
+
+   return true;
+}
+
+//----------------------------------------------------------------------------
+//! Destructor
+//----------------------------------------------------------------------------
+ossimAdjMapModel::~ossimAdjMapModel()
+{
+   theAdjParams.CleanUp();
+}
+
+//----------------------------------------------------------------------------
+//! Initializes adjustable parameters to their default values.
+//! Overrides ossimAdjustableParameterInterface virtual method.
+//----------------------------------------------------------------------------
+void ossimAdjMapModel::initAdjustableParameters()
+{
+   // Initialize this adjustment as the initial geometry "adjustment":
+   removeAllAdjustments();
+   newAdjustment(NUM_ADJ_PARAMS);
+   setAdjustmentDescription("Initial Geometry");
+
+   // Initialize each adjustable parameter for this initial:
+   setAdjustableParameter (OFFSET_X, 0.0, 1.0);
+   setParameterDescription(OFFSET_X, "map_offset_x");
+   setParameterCenter     (OFFSET_X, 0.0);
+
+   setAdjustableParameter (OFFSET_Y, 0.0, 1.0);
+   setParameterDescription(OFFSET_Y, "map_offset_y");
+   setParameterCenter     (OFFSET_Y, 0.0);
+
+   setAdjustableParameter (ROTATION, 0.0, 1.0);
+   setParameterDescription(ROTATION, "map_rotation");
+   setParameterCenter     (ROTATION, 0.0);
+
+   setAdjustableParameter (SCALE_X, 0.0, 1.0);
+   setParameterDescription(SCALE_X, "map_scale_x");
+   setParameterCenter     (SCALE_X, 1.0);
+
+   setAdjustableParameter (SCALE_Y, 0.0, 1.0);
+   setParameterDescription(SCALE_Y, "map_scale_y");
+   setParameterCenter     (SCALE_Y, 1.0);
+
+   updateModel();
+}
+
+//----------------------------------------------------------------------------
+//! Following a change to the adjustable parameter set, this virtual is called
+//! to permit instances to compute derived quantities after parameter change.
+//----------------------------------------------------------------------------
+void ossimAdjMapModel::updateModel()
+{
+   for (int i=0; i<NUM_ADJ_PARAMS; i++)
+      theAdjParams[i] = computeParameterOffset(i);
+
+   theCosTheta = ossim::cosd(theAdjParams[ROTATION]);
+   theSinTheta = ossim::sind(theAdjParams[ROTATION]);
+}
+
+//----------------------------------------------------------------------------
+//! Overrides base class pure virtual.
+//----------------------------------------------------------------------------
+void ossimAdjMapModel::lineSampleHeightToWorld(const ossimDpt& image_point,
+                                     const double&   heightEllipsoid,
+                                     ossimGpt&       worldPoint) const
+{
+   // Just call other transform method 
+   // Check for bad map projection pointer:
+   if (!theMapProjection)
+   {
+      worldPoint = ossimGpt(ossim::nan(), ossim::nan(), ossim::nan());
+      return;
+   }
+
+   // Adjust image point by transform:
+   double x = theAdjParams[SCALE_X]*(image_point.x - theAdjParams[OFFSET_X]);
+   double y = theAdjParams[SCALE_Y]*(image_point.y - theAdjParams[OFFSET_Y]);
+   ossimDpt adjusted_point(x*theCosTheta + y*theSinTheta, 
+                           y*theCosTheta - x*theSinTheta);
+
+   // Obtain ground point given adjusted image point:
+   theMapProjection->lineSampleHeightToWorld(adjusted_point,
+                                             heightEllipsoid,
+                                             worldPoint);
+   worldPoint.height(heightEllipsoid);
+}
+
+//----------------------------------------------------------------------------
+//! Overrides base class virtual.
+//----------------------------------------------------------------------------
+void ossimAdjMapModel::lineSampleToWorld(const ossimDpt& image_point,
+                                         ossimGpt&       worldPoint) const
+{
+   lineSampleHeightToWorld(image_point, 0.0, worldPoint);
+   if (!worldPoint.hasNans())
+   {
+//      worldPoint.height(theElevation->getHeightAboveEllipsoid(worldPoint));
+   }
+}
+
+//----------------------------------------------------------------------------
+//! Rigorous inverse transform implented, overrides base-class' iterative
+//! solution.
+//----------------------------------------------------------------------------
+void ossimAdjMapModel::worldToLineSample(const ossimGpt& world_point,
+                                         ossimDpt&       image_point) const
+{
+   // Check for bad map projection pointer:
+   if (!theMapProjection)
+   {
+      image_point = ossimDpt(ossim::nan(), ossim::nan());
+      return;
+   }
+
+   // Obtain non-adjusted image point given ground point:
+   ossimDpt p1;
+   theMapProjection->worldToLineSample(world_point, p1);
+
+   // Adjust image point by transform:
+   ossimDpt p2 (p1.x*theCosTheta - p1.y*theSinTheta, 
+                p1.y*theCosTheta + p1.x*theSinTheta);
+   image_point.x = p2.x/theAdjParams[SCALE_X] + theAdjParams[OFFSET_X];
+   image_point.y = p2.y/theAdjParams[SCALE_Y] + theAdjParams[OFFSET_Y];
+}
+
+//----------------------------------------------------------------------------
+//! Fulfills ossimObject base-class pure virtuals. Saves geometry
+//! KWL files. Returns true if successful.
+//----------------------------------------------------------------------------
+bool ossimAdjMapModel::saveState(ossimKeywordlist& kwl, const char* prefix) const
+{
+   kwl.add(prefix, ossimKeywordNames::TYPE_KW, "ossimAdjMapModel");
+
+   // Hand off to base class for common stuff:
+   ossimSensorModel::saveState(kwl, prefix);
+
+   // Save off data members:
+   for (int i=0; i<NUM_ADJ_PARAMS; i++)
+      kwl.add(prefix, PARAMETER_KEYWORDS[i], theAdjParams[i]);
+
+   // Save off map projection info:
+   if (theMapProjection.valid())
+   {
+      theMapProjection->saveState(kwl, prefix);
+   }
+
+   return true;
+}
+
+//----------------------------------------------------------------------------
+//! Fulfills ossimObject base-class pure virtuals. Loads geometry
+//! KWL files. Returns true if successful.
+//----------------------------------------------------------------------------
+bool ossimAdjMapModel::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   static const ossimString MODULE ("ossimAdjMapModel::loadState() -- ");
+   bool success = true;
+   const char* value_str;
+   double value;
+   ossimString error_msg (MODULE+"Error encountered reading keyword: ");
+
+   try
+   {
+      // Verify correct model type:
+      value_str = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
+      if ((!value_str) || (strcmp(value_str, TYPE_NAME(this))))
+      {
+         throw (error_msg + ossimKeywordNames::TYPE_KW);
+      }
+
+      //---
+      // Instantiate the map projection via the factory if one has not been
+      // initialized yet:
+      //---
+      if (!theMapProjection)
+      {
+         // should find the map projection filename in the KWL:
+         value_str = kwl.find(prefix, MAP_PROJ_FILE_KW);
+         if (!value_str)
+         {
+            throw (error_msg + MAP_PROJ_FILE_KW);
+         }
+         theMapProjection = PTR_CAST(ossimMapProjection,
+            ossimMapProjectionFactory::instance()->createProjection(ossimKeywordlist(value_str)));
+         if (!theMapProjection)
+         {
+            throw "Error encountered instantiating map ";
+         }
+      }
+
+      // Everything OK so far, just load in the adjustable parameters. This involves modifying the
+      // center value of the bsae class adjustable parameter:
+      for (int i=0; i<NUM_ADJ_PARAMS; i++)
+      {
+         value_str = kwl.find(prefix, PARAMETER_KEYWORDS[i]);
+         if (!value_str)
+         {
+            throw (error_msg + PARAMETER_KEYWORDS[i]).chars();
+         }
+         value = atof(value_str);
+         setParameterCenter(i, value);
+      }
+   }
+   catch (const char* /*message*/)
+   {
+      theErrorStatus++;
+      success = false;
+   }
+
+   //---
+   // updateModel() reads the base class adjustable parameters and initializes
+   // theAdjParams
+   // with the unnormalized, biased (to the "center" set above) quantities
+   // used in the projection:
+   //---
+   if (success)
+   {
+      initializeFromMap();
+      updateModel();
+   }
+
+   return success;
+}  
+
+//----------------------------------------------------------------------------
+//! Writes a template of geom keywords processed by loadState and saveState to
+//! output stream.
+//----------------------------------------------------------------------------
+void ossimAdjMapModel::writeGeomTemplate(ostream& os)
+{
+   os <<
+      "//*****************************************************************\n"
+      "// Template for Adjustable Map Model keywordlist\n"
+      "//*****************************************************************\n"
+      << ossimKeywordNames::TYPE_KW << ": " << "ossimFcsiModel" << endl;
+
+   ossimSensorModel::writeGeomTemplate(os);
+
+   os << "//***\n"
+      << "// Derived-class AdjMapModel Keywords:\n"
+      << "//***\n"
+      << PARAMETER_KEYWORDS[OFFSET_X] << ": <east offset meters>\n"
+      << PARAMETER_KEYWORDS[OFFSET_Y] << ": <north offset meters>\n"
+      << PARAMETER_KEYWORDS[ROTATION] << ": <degrees CW>\n"
+      << PARAMETER_KEYWORDS[SCALE_X]  << ": <ratio>\n"
+      << PARAMETER_KEYWORDS[SCALE_Y]  << ": <ratio>\n"
+      << endl;
+
+   return;
+}
+
+//----------------------------------------------------------------------------
+//! Extends base-class implementation. Dumps contents of object to ostream.
+//----------------------------------------------------------------------------
+std::ostream& ossimAdjMapModel::print(std::ostream& out) const
+{      
+   ossimSensorModel::print(out);
+   for (int i=0; i<NUM_ADJ_PARAMS; i++)
+      out << PARAMETER_KEYWORDS[i]  << ": " << theAdjParams[i] << endl;
+   out << endl;
+
+   return out;
+}
+
+//----------------------------------------------------------------------------
+//! Fetches the GSD from the internal map projection.
+//----------------------------------------------------------------------------
+ossimDpt ossimAdjMapModel::getMetersPerPixel () const
+{
+   if (theMapProjection.valid())
+   {
+      return theMapProjection->getMetersPerPixel();
+   }
+   
+   return ossimDpt(0,0);
+}
+
+ossimObject* ossimAdjMapModel::dup() const
+{
+   return new ossimAdjMapModel(*this);
+}
+
+
diff --git a/src/ossim/projection/ossimAffineProjection.cpp b/ossim/src/ossim/projection/ossimAffineProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimAffineProjection.cpp
rename to ossim/src/ossim/projection/ossimAffineProjection.cpp
diff --git a/ossim/src/ossim/projection/ossimAlbersProjection.cpp b/ossim/src/ossim/projection/ossimAlbersProjection.cpp
new file mode 100644
index 0000000..e7d9f02
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimAlbersProjection.cpp
@@ -0,0 +1,642 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License:  See top LICENSE.txt file.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+// Calls Geotrans Albers projection code.  
+//*******************************************************************
+//  $Id: ossimAlbersProjection.cpp 23002 2014-11-24 17:11:17Z dburken $
+
+#include <ossim/projection/ossimAlbersProjection.h>
+
+#include <ossim/base/ossimKeywordNames.h>
+
+RTTI_DEF1(ossimAlbersProjection, "ossimAlbersProjection", ossimMapProjection)
+
+#ifdef PI_OVER_2
+#  undef PI_OVER_2
+#endif   
+
+#define ALBERS_NO_ERROR           0x0000
+#define ALBERS_LAT_ERROR          0x0001
+#define ALBERS_LON_ERROR          0x0002
+#define ALBERS_EASTING_ERROR      0x0004
+#define ALBERS_NORTHING_ERROR     0x0008
+#define ALBERS_ORIGIN_LAT_ERROR   0x0010
+#define ALBERS_CENT_MER_ERROR     0x0020
+#define ALBERS_A_ERROR            0x0040
+#define ALBERS_INV_F_ERROR        0x0080
+#define ALBERS_FIRST_STDP_ERROR   0x0100
+#define ALBERS_SECOND_STDP_ERROR  0x0200
+#define ALBERS_FIRST_SECOND_ERROR 0x0400
+#define ALBERS_HEMISPHERE_ERROR   0x0800
+
+#define PI_OVER_2  ( M_PI / 2.0)                 
+#define ES_SIN(sinlat)          (es * sinlat)
+#define ONE_MINUS_SQR(x)        (1.0 - x * x)
+#define ALBERS_M(clat,oneminussqressin)   (clat / sqrt(oneminussqressin))
+#define ALBERS_Q(slat,oneminussqressin,essin) (one_MINUS_es2)*(slat / (oneminussqressin)-    \
+											  (1 / (two_es)) *log((1 - essin) / (1 + essin)))
+
+
+ossimAlbersProjection::ossimAlbersProjection(const ossimEllipsoid& ellipsoid,
+                                             const ossimGpt& origin)
+   :ossimMapProjection(ellipsoid, origin)
+{
+   Albers_Delta_Northing = 40000000.0;
+   Albers_Delta_Easting  = 40000000.0;
+   setDefaults();
+   update();
+}
+    
+ossimAlbersProjection::ossimAlbersProjection(const ossimEllipsoid& ellipsoid,
+                                             const ossimGpt& origin,
+                                             double stdParallel1,
+                                             double stdParallel2,
+                                             double falseEasting,
+                                             double falseNorthing)
+  :ossimMapProjection(ellipsoid, origin)
+{
+   Albers_Std_Parallel_1 = stdParallel1*RAD_PER_DEG;
+   Albers_Std_Parallel_2 = stdParallel2*RAD_PER_DEG;
+   Albers_Delta_Northing = 40000000.0;
+   Albers_Delta_Easting  = 40000000.0;
+   Albers_False_Easting  = falseEasting;
+   Albers_False_Northing = falseNorthing;
+   
+   update();
+   
+}
+
+ossimObject* ossimAlbersProjection::dup() const
+{
+   return new ossimAlbersProjection(*this);
+}
+
+ossimAlbersProjection::~ossimAlbersProjection()
+{
+}
+
+void ossimAlbersProjection::update()
+{
+   Set_Albers_Parameters(theEllipsoid.getA(),
+                         theEllipsoid.getFlattening(),
+                         theOrigin.latr(),
+                         theOrigin.lonr(),
+                         Albers_Std_Parallel_1,
+                         Albers_Std_Parallel_2,
+                         Albers_False_Easting,
+                         Albers_False_Northing);
+   
+   theFalseEastingNorthing.x = Albers_False_Easting;
+   theFalseEastingNorthing.y = Albers_False_Northing;
+
+   ossimMapProjection::update();
+}
+
+
+ossimGpt ossimAlbersProjection::inverse(const ossimDpt &eastingNorthing)const
+{
+   double lat, lon;
+   
+   
+   Convert_Albers_To_Geodetic(eastingNorthing.x,
+                              eastingNorthing.y,
+                              &lat,
+                              &lon);
+   
+   return ossimGpt(lat*DEG_PER_RAD, lon*DEG_PER_RAD, 0, theDatum);
+}
+
+ossimDpt ossimAlbersProjection::forward(const ossimGpt &latLon)const
+{
+   double easting  = 0.0;
+   double northing = 0.0;
+   ossimGpt gpt = latLon;
+   
+   if (theDatum)
+   {
+      if (theDatum->code() != latLon.datum()->code())
+      {
+         gpt.changeDatum(theDatum); // Shift to our datum.
+      }
+   }
+
+
+   Convert_Geodetic_To_Albers(gpt.latr(),
+                              gpt.lonr(),
+                              &easting,
+                              &northing);
+   
+   return ossimDpt(easting, northing);
+}
+
+void ossimAlbersProjection::setStandardParallel1(double degree)
+{
+   Albers_Std_Parallel_1 = degree*RAD_PER_DEG;
+   update();
+}
+
+void ossimAlbersProjection::setStandardParallel2(double degree)
+{
+   Albers_Std_Parallel_2 = degree*RAD_PER_DEG;
+   update();
+}
+
+void ossimAlbersProjection::setStandardParallels(double parallel1Degree,
+                                                 double parallel2Degree)
+{
+   Albers_Std_Parallel_1 = parallel1Degree*RAD_PER_DEG;
+   Albers_Std_Parallel_2 = parallel2Degree*RAD_PER_DEG;
+   update();
+   
+}
+
+void ossimAlbersProjection::setFalseEasting(double falseEasting)
+{
+   Albers_False_Easting = falseEasting;
+   update();
+}
+
+void ossimAlbersProjection::setFalseNorthing(double falseNorthing)
+{
+   Albers_False_Northing = falseNorthing;
+   update();
+}
+
+void ossimAlbersProjection::setFalseEastingNorthing(double falseEasting,
+                                                    double falseNorthing)
+{
+   Albers_False_Easting = falseEasting;
+   Albers_False_Northing = falseNorthing;  
+   update();
+}
+
+void ossimAlbersProjection::setParameters(double parallel1,
+                                          double parallel2,
+                                          double falseEasting,
+                                          double falseNorthing)
+{
+   Albers_False_Easting = falseEasting;
+   Albers_False_Northing = falseNorthing;  
+   Albers_Std_Parallel_1 = parallel1*RAD_PER_DEG;
+   Albers_Std_Parallel_2 = parallel2*RAD_PER_DEG;
+   update(); 
+}
+
+double ossimAlbersProjection::getStandardParallel1()const
+{
+   return  Albers_Std_Parallel_1/RAD_PER_DEG;
+}
+
+double ossimAlbersProjection::getStandardParallel2()const
+{
+   return  Albers_Std_Parallel_2/RAD_PER_DEG;
+}
+
+void ossimAlbersProjection::setDefaults()
+{
+   // initialize to some default
+   Albers_Std_Parallel_1 = 29.5*RAD_PER_DEG;
+   Albers_Std_Parallel_2 = 45.5*RAD_PER_DEG;
+   Albers_False_Easting  = 0.0;
+   Albers_False_Northing = 0.0;  
+}
+
+bool ossimAlbersProjection::saveState(ossimKeywordlist& kwl, const char* prefix) const
+{
+   kwl.add(prefix,
+           ossimKeywordNames::STD_PARALLEL_1_KW,
+           Albers_Std_Parallel_1*DEG_PER_RAD,
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::STD_PARALLEL_2_KW,
+           Albers_Std_Parallel_2*DEG_PER_RAD,
+           true);
+   
+   return ossimMapProjection::saveState(kwl, prefix);
+}
+
+bool ossimAlbersProjection::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   // Must do this first...
+   bool flag = ossimMapProjection::loadState(kwl, prefix);
+
+   const char* type          = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
+
+   const char* stdParallel1  = kwl.find(prefix, ossimKeywordNames::STD_PARALLEL_1_KW);
+   const char* stdParallel2  = kwl.find(prefix, ossimKeywordNames::STD_PARALLEL_2_KW);
+
+   
+   if(ossimString(type) == STATIC_TYPE_NAME(ossimAlbersProjection))
+   {
+      Albers_False_Easting  = theFalseEastingNorthing.x;
+      Albers_False_Northing = theFalseEastingNorthing.y;
+
+      if(stdParallel1)
+      {
+         Albers_Std_Parallel_1 = ossimString(stdParallel1).toDouble()*RAD_PER_DEG;
+      }
+      else
+      {
+         Albers_Std_Parallel_1 = 29.5*RAD_PER_DEG;         
+      }
+      if(stdParallel2)
+      {
+         Albers_Std_Parallel_2 = ossimString(stdParallel2).toDouble()*RAD_PER_DEG;
+      }
+      else
+      {
+         Albers_Std_Parallel_2 = 45.5*RAD_PER_DEG;
+      }
+   }
+
+   update();
+   
+   return flag;
+}
+
+
+/***************************************************************************/
+/*
+ *                              FUNCTIONS
+ */
+long ossimAlbersProjection::Set_Albers_Parameters(double a,
+                                                  double f,
+                                                  double Origin_Latitude,
+                                                  double Central_Meridian,
+                                                  double Std_Parallel_1,
+                                                  double Std_Parallel_2,
+                                                  double False_Easting,
+                                                  double False_Northing)
+
+{
+/*
+ * The function Set_Albers_Parameters receives the ellipsoid parameters and
+ * projection parameters as inputs, and sets the corresponding state
+ * variables.  If any errors occur, the error code(s) are returned by the function, 
+ * otherwise ALBERS_NO_ERROR is returned.
+ *
+ *    a                 : Semi-major axis of ellipsoid, in meters   (input)
+ *    f                 : Flattening of ellipsoid                   (input)
+ *    Origin_Latitude   : Latitude in radians at which the          (input)
+ *                          point scale factor is 1.0
+ *    Central_Meridian  : Longitude in radians at the center of     (input)
+ *                          the projection
+ *    Std_Parallel_1    : First standard parallel                   (input)
+ *    Std_Parallel_2    : Second standard parallel                  (input)
+ *    False_Easting     : A coordinate value in meters assigned to the
+ *                          central meridian of the projection.     (input)
+ *    False_Northing    : A coordinate value in meters assigned to the
+ *                          origin latitude of the projection       (input)
+ */
+
+  double sin_lat, sin_lat_1, cos_lat;
+  double m1, m2, SQRm1;
+  double q0, q1, q2;
+  double es_sin, one_MINUS_SQRes_sin;
+  double nq0;
+  double inv_f = 1 / f;
+  long Error_Code = ALBERS_NO_ERROR;
+
+  if (a <= 0.0)
+  { /* Semi-major axis must be greater than zero */
+    Error_Code |= ALBERS_A_ERROR;
+  }
+  if ((inv_f < 250) || (inv_f > 350))
+  { /* Inverse flattening must be between 250 and 350 */
+    Error_Code |= ALBERS_INV_F_ERROR;
+  }
+  if ((Origin_Latitude < -PI_OVER_2) || (Origin_Latitude > PI_OVER_2))
+  { /* origin latitude out of range */
+    Error_Code |= ALBERS_ORIGIN_LAT_ERROR;
+  }
+  if ((Central_Meridian < -M_PI) || (Central_Meridian > TWO_PI))
+  { /* origin longitude out of range */
+    Error_Code |= ALBERS_CENT_MER_ERROR;
+  }
+  if ((Std_Parallel_1 < -PI_OVER_2) || (Std_Parallel_1 > PI_OVER_2))
+  { /* First Standard Parallel out of range */
+    Error_Code |= ALBERS_FIRST_STDP_ERROR;
+  }
+  if ((Std_Parallel_2 < -PI_OVER_2) || (Std_Parallel_2 > PI_OVER_2))
+  { /* Second Standard Parallel out of range */
+    Error_Code |= ALBERS_SECOND_STDP_ERROR;
+  }
+  if ((Std_Parallel_1 == 0.0) && (Std_Parallel_2 == 0.0))
+  { /* First & Second Standard Parallels equal 0 */
+    Error_Code |= ALBERS_FIRST_SECOND_ERROR;
+  }
+  if (Std_Parallel_1 == -Std_Parallel_2)
+  { /* Parallels are opposite latitudes */
+    Error_Code |= ALBERS_HEMISPHERE_ERROR;
+  }
+
+  if (!Error_Code)
+  { /* no errors */
+    Albers_a = a;
+    Albers_f = f;
+    Albers_Origin_Lat = Origin_Latitude;
+    Albers_Std_Parallel_1 = Std_Parallel_1;
+    Albers_Std_Parallel_2 = Std_Parallel_2;
+    if (Central_Meridian > M_PI)
+      Central_Meridian -= TWO_PI;
+    Albers_Origin_Long = Central_Meridian;
+    Albers_False_Easting = False_Easting;
+    Albers_False_Northing = False_Northing;
+
+    es2 = 2 * Albers_f - Albers_f * Albers_f;
+    es = sqrt(es2);
+    one_MINUS_es2 = 1 - es2;
+    two_es = 2 * es;
+
+    sin_lat = sin(Albers_Origin_Lat);
+    es_sin = ES_SIN(sin_lat);
+    one_MINUS_SQRes_sin = ONE_MINUS_SQR(es_sin);
+    q0 = ALBERS_Q(sin_lat, one_MINUS_SQRes_sin, es_sin);
+
+    sin_lat_1 = sin(Albers_Std_Parallel_1);
+    cos_lat = cos(Albers_Std_Parallel_1);
+    es_sin = ES_SIN(sin_lat_1);
+    one_MINUS_SQRes_sin = ONE_MINUS_SQR(es_sin);
+    m1 = ALBERS_M(cos_lat, one_MINUS_SQRes_sin);
+    q1 = ALBERS_Q(sin_lat_1, one_MINUS_SQRes_sin, es_sin);
+
+    SQRm1 = m1 * m1;
+    if (fabs(Albers_Std_Parallel_1 - Albers_Std_Parallel_2) > 1.0e-10)
+    {
+      sin_lat = sin(Albers_Std_Parallel_2);
+      cos_lat = cos(Albers_Std_Parallel_2);
+      es_sin = ES_SIN(sin_lat);
+      one_MINUS_SQRes_sin = ONE_MINUS_SQR(es_sin);
+      m2 = ALBERS_M(cos_lat, one_MINUS_SQRes_sin);
+      q2 = ALBERS_Q(sin_lat, one_MINUS_SQRes_sin, es_sin);
+      n = (SQRm1 - m2 * m2) / (q2 - q1);
+    }
+    else
+      n = sin_lat_1;
+
+    C = SQRm1 + n * q1;
+    Albers_a_OVER_n = Albers_a / n;
+    nq0 = n * q0;
+    if (C < nq0)
+      rho0 = 0;
+    else
+      rho0 = Albers_a_OVER_n * sqrt(C - nq0);
+
+
+  } /* END OF if(!Error_Code) */
+  return (Error_Code);
+} /* END OF Set_Albers_Parameters */
+
+
+void ossimAlbersProjection::Get_Albers_Parameters(double *a,
+                                                  double *f,
+                                                  double *Origin_Latitude,
+                                                  double *Central_Meridian,
+                                                  double *Std_Parallel_1,
+                                                  double *Std_Parallel_2,
+                                                  double *False_Easting,
+                                                  double *False_Northing)const
+
+{ /* BEGIN Get_Albers_Parameters */
+/*
+ * The function Get_Albers_Parameters returns the current ellipsoid
+ * parameters, and Albers projection parameters.
+ *
+ *    a                 : Semi-major axis of ellipsoid, in meters   (output)
+ *    f                 : Flattening of ellipsoid										(output)
+ *    Origin_Latitude   : Latitude in radians at which the          (output)
+ *                          point scale factor is 1.0
+ *    Origin_Longitude  : Longitude in radians at the center of     (output)
+ *                          the projection
+ *    Std_Parallel_1    : First standard parallel                   (output)
+ *    Std_Parallel_2    : Second standard parallel                  (output)
+ *    False_Easting     : A coordinate value in meters assigned to the
+ *                          central meridian of the projection.     (output)
+ *    False_Northing    : A coordinate value in meters assigned to the
+ *                          origin latitude of the projection       (output)
+ */
+
+  *a = Albers_a;
+  *f = Albers_f;
+  *Origin_Latitude = Albers_Origin_Lat;
+  *Std_Parallel_1 = Albers_Std_Parallel_1;
+  *Std_Parallel_2 = Albers_Std_Parallel_2;
+  *Central_Meridian = Albers_Origin_Long;
+  *False_Easting = Albers_False_Easting;
+  *False_Northing = Albers_False_Northing;
+  return;
+} /* END OF Get_Albers_Parameters */
+
+
+long ossimAlbersProjection::Convert_Geodetic_To_Albers (double Latitude,
+                                                        double Longitude,
+                                                        double *Easting,
+                                                        double *Northing)const
+
+{ /* BEGIN Convert_Geodetic_To_Albers */
+/*
+ * The function Convert_Geodetic_To_Albers converts geodetic (latitude and
+ * longitude) coordinates to Albers projection (easting and northing)
+ * coordinates, according to the current ellipsoid and Albers projection
+ * parameters.  If any errors occur, the error code(s) are returned by the
+ * function, otherwise ALBERS_NO_ERROR is returned.
+ *
+ *    Latitude          : Latitude (phi) in radians           (input)
+ *    Longitude         : Longitude (lambda) in radians       (input)
+ *    Easting           : Easting (X) in meters               (output)
+ *    Northing          : Northing (Y) in meters              (output)
+ */
+
+  double dlam;                      /* Longitude - Central Meridan */
+  double sin_lat;
+  // double cos_lat;
+  double es_sin, one_MINUS_SQRes_sin;
+  double q;
+  double rho;
+  double theta;
+  double nq;
+  long Error_Code = ALBERS_NO_ERROR;
+
+  if ((Latitude < -PI_OVER_2) || (Latitude > PI_OVER_2))
+  {  /* Latitude out of range */
+    Error_Code |= ALBERS_LAT_ERROR;
+  }
+  if ((Longitude < -M_PI) || (Longitude > TWO_PI))
+  {  /* Longitude out of range */
+    Error_Code|= ALBERS_LON_ERROR;
+  }
+
+  if (!Error_Code)
+  { /* no errors */
+
+    dlam = Longitude - Albers_Origin_Long;
+    if (dlam > M_PI)
+    {
+      dlam -= TWO_PI;
+    }
+    if (dlam < -M_PI)
+    {
+      dlam += TWO_PI;
+    }
+    sin_lat = sin(Latitude);
+    // cos_lat = cos(Latitude);
+    es_sin = ES_SIN(sin_lat);
+    one_MINUS_SQRes_sin = ONE_MINUS_SQR(es_sin);
+    q = ALBERS_Q(sin_lat, one_MINUS_SQRes_sin, es_sin);
+    nq = n * q;
+    if (C < nq)
+      rho = 0;
+    else
+      rho = Albers_a_OVER_n * sqrt(C - nq);
+
+
+    theta = n * dlam;
+    *Easting = rho * sin(theta) + Albers_False_Easting;
+    *Northing = rho0 - rho * cos(theta) + Albers_False_Northing;
+  }
+  return (Error_Code);
+} /* END OF Convert_Geodetic_To_Albers */
+
+
+long ossimAlbersProjection::Convert_Albers_To_Geodetic(double Easting,
+                                                       double Northing,
+                                                       double *Latitude,
+                                                       double *Longitude)const
+{ /* BEGIN Convert_Albers_To_Geodetic */
+/*
+ * The function Convert_Albers_To_Geodetic converts Albers projection
+ * (easting and northing) coordinates to geodetic (latitude and longitude)
+ * coordinates, according to the current ellipsoid and Albers projection
+ * coordinates.  If any errors occur, the error code(s) are returned by the
+ * function, otherwise ALBERS_NO_ERROR is returned.
+ *
+ *    Easting           : Easting (X) in meters                  (input)
+ *    Northing          : Northing (Y) in meters                 (input)
+ *    Latitude          : Latitude (phi) in radians              (output)
+ *    Longitude         : Longitude (lambda) in radians          (output)
+ */
+
+  double dy, dx;
+  double rho0_MINUS_dy;
+  double q, qconst, q_OVER_2;
+  double rho, rho_n;
+  double PHI, Delta_PHI = 1.0;
+  double sin_phi;
+  double es_sin, one_MINUS_SQRes_sin;
+  double theta = 0.0;
+  double tolerance = 4.85e-10;        /* approximately 1/1000th of
+                              an arc second or 1/10th meter */
+  long Error_Code = ALBERS_NO_ERROR; 
+
+  if ((Easting < (Albers_False_Easting - Albers_Delta_Easting)) 
+      || (Easting > Albers_False_Easting + Albers_Delta_Easting))
+  { /* Easting out of range  */
+    Error_Code |= ALBERS_EASTING_ERROR;
+  }
+  if ((Northing < (Albers_False_Northing - Albers_Delta_Northing)) 
+      || (Northing > Albers_False_Northing + Albers_Delta_Northing))
+  { /* Northing out of range */
+    Error_Code |= ALBERS_NORTHING_ERROR;
+  }
+
+  if (!Error_Code)
+  {
+    dy = Northing - Albers_False_Northing;
+    dx = Easting - Albers_False_Easting;
+    rho0_MINUS_dy = rho0 - dy;
+    rho = sqrt(dx * dx + rho0_MINUS_dy * rho0_MINUS_dy);
+
+    if (n < 0)
+    {
+      rho *= -1.0;
+      dy *= -1.0;
+      dx *= -1.0;
+      rho0_MINUS_dy *= -1.0;
+    }
+
+    if (rho != 0.0)
+      theta = atan2(dx, rho0_MINUS_dy);
+    rho_n = rho * n;
+    q = (C - (rho_n * rho_n) / (Albers_a * Albers_a)) / n;
+    qconst = 1 - ((one_MINUS_es2) / (two_es)) * log((1.0 - es) / (1.0 + es));
+    if (fabs(fabs(qconst) - fabs(q)) > 1.0e-6)
+    {
+      q_OVER_2 = q / 2.0;
+      if (q_OVER_2 > 1.0)
+        *Latitude = PI_OVER_2;
+      else if (q_OVER_2 < -1.0)
+        *Latitude = -PI_OVER_2;
+      else
+      {
+        PHI = asin(q_OVER_2);
+        if (es < 1.0e-10)
+          *Latitude = PHI;
+        else
+        {
+          while (fabs(Delta_PHI) > tolerance)
+          {
+            sin_phi = sin(PHI);
+            es_sin = ES_SIN(sin_phi);
+            one_MINUS_SQRes_sin = ONE_MINUS_SQR(es_sin);
+            Delta_PHI = (one_MINUS_SQRes_sin * one_MINUS_SQRes_sin) / (2.0 * cos(PHI)) *
+                        (q / (one_MINUS_es2) - sin_phi / one_MINUS_SQRes_sin +
+                         (log((1.0 - es_sin) / (1.0 + es_sin)) / (two_es)));
+            PHI += Delta_PHI;
+          }
+          *Latitude = PHI;
+        }
+
+        if (*Latitude > PI_OVER_2)  /* force distorted values to 90, -90 degrees */
+          *Latitude = PI_OVER_2;
+        else if (*Latitude < -PI_OVER_2)
+          *Latitude = -PI_OVER_2;
+
+      }
+    }
+    else
+    {
+      if (q >= 0.0)
+        *Latitude = PI_OVER_2;
+      else
+        *Latitude = -PI_OVER_2;
+    }
+    *Longitude = Albers_Origin_Long + theta / n;
+
+    if (*Longitude > M_PI)
+      *Longitude -= TWO_PI;
+    if (*Longitude < -M_PI)
+      *Longitude += TWO_PI;
+
+    if (*Longitude > M_PI) /* force distorted values to 180, -180 degrees */
+      *Longitude = M_PI;
+    else if (*Longitude < -M_PI)
+      *Longitude = -M_PI;
+
+  }
+  return (Error_Code);
+} /* END OF Convert_Albers_To_Geodetic */
+
+//*************************************************************************************************
+//! Returns TRUE if principal parameters are within epsilon tolerance.
+//*************************************************************************************************
+bool ossimAlbersProjection::operator==(const ossimProjection& proj) const
+{
+   if (!ossimMapProjection::operator==(proj)) return false;
+
+   ossimAlbersProjection* p = PTR_CAST(ossimAlbersProjection, &proj);
+   if (!p) return false;
+
+   if (!ossim::almostEqual(Albers_Std_Parallel_1,p->Albers_Std_Parallel_1)) return false;
+   if (!ossim::almostEqual(Albers_Std_Parallel_2,p->Albers_Std_Parallel_2)) return false;
+   if (!ossim::almostEqual(Albers_Delta_Northing,p->Albers_Delta_Northing)) return false;
+   if (!ossim::almostEqual(Albers_Delta_Easting, p->Albers_Delta_Easting) ) return false;
+
+   return true;
+}
diff --git a/src/ossim/projection/ossimAlphaSensor.cpp b/ossim/src/ossim/projection/ossimAlphaSensor.cpp
similarity index 100%
rename from src/ossim/projection/ossimAlphaSensor.cpp
rename to ossim/src/ossim/projection/ossimAlphaSensor.cpp
diff --git a/src/ossim/projection/ossimAlphaSensorHRI.cpp b/ossim/src/ossim/projection/ossimAlphaSensorHRI.cpp
similarity index 100%
rename from src/ossim/projection/ossimAlphaSensorHRI.cpp
rename to ossim/src/ossim/projection/ossimAlphaSensorHRI.cpp
diff --git a/src/ossim/projection/ossimAlphaSensorHSI.cpp b/ossim/src/ossim/projection/ossimAlphaSensorHSI.cpp
similarity index 100%
rename from src/ossim/projection/ossimAlphaSensorHSI.cpp
rename to ossim/src/ossim/projection/ossimAlphaSensorHSI.cpp
diff --git a/ossim/src/ossim/projection/ossimApplanixEcefModel.cpp b/ossim/src/ossim/projection/ossimApplanixEcefModel.cpp
new file mode 100644
index 0000000..794cca2
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimApplanixEcefModel.cpp
@@ -0,0 +1,806 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimApplanixEcefModel.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <sstream>
+#include <ossim/projection/ossimApplanixEcefModel.h>
+#include <ossim/base/ossimEllipsoid.h>
+#include <ossim/base/ossimUnitConversionTool.h>
+#include <ossim/base/ossimUnitTypeLut.h>
+#include <ossim/base/ossimDatumFactory.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimLsrSpace.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimGeoidManager.h>
+#include <ossim/projection/ossimUtmProjection.h>
+#include <ossim/support_data/ossimApplanixEOFile.h>
+#include <ossim/base/ossimMatrix4x4.h>
+#include <ossim/elevation/ossimElevManager.h>
+static ossimTrace traceDebug("ossimApplanixEcefModel:debug");
+
+RTTI_DEF1(ossimApplanixEcefModel, "ossimApplanixEcefModel", ossimSensorModel);
+
+#ifdef OSSIM_ID_ENABLED
+static const char OSSIM_ID[] = "$Id: ossimApplanixEcefModel.cpp 23664 2015-12-14 14:17:27Z dburken $";
+#endif
+
+ossimApplanixEcefModel::ossimApplanixEcefModel()
+{
+   theCompositeMatrix          = ossimMatrix4x4::createIdentity();
+   theCompositeMatrixInverse   = ossimMatrix4x4::createIdentity();
+   theRoll                     = 0.0;
+   thePitch                    = 0.0;
+   theHeading                  = 0.0;
+   theFocalLength              = 55.0;
+   thePixelSize = ossimDpt(.009, .009);
+   theEcefPlatformPosition = ossimGpt(0.0,0.0, 1000.0);
+   theAdjEcefPlatformPosition = ossimGpt(0.0,0.0, 1000.0);
+   theGSD.x = 0.1524;
+   theGSD.y = 0.1524;
+   theMeanGSD = 0.1524;
+   theLensDistortion = new ossimMeanRadialLensDistortion;
+   initAdjustableParameters();
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimApplanixEcefModel::ossimApplanixEcefModel DEBUG:" << endl;
+#ifdef OSSIM_ID_ENABLED
+      ossimNotify(ossimNotifyLevel_DEBUG)<< "OSSIM_ID:  " << OSSIM_ID << endl;
+#endif
+   }
+}
+ossimApplanixEcefModel::ossimApplanixEcefModel(const ossimDrect& imageRect,
+                                               const ossimGpt& platformPosition,
+                                               double roll,
+                                               double pitch,
+                                               double heading,
+                                               const ossimDpt& /* principalPoint */, // in millimeters
+                                               double focalLength, // in millimeters
+                                               const ossimDpt& pixelSize) // in millimeters
+{
+   theImageClipRect = imageRect;
+   theRefImgPt      = theImageClipRect.midPoint();
+   theCompositeMatrix          = ossimMatrix4x4::createIdentity();
+   theCompositeMatrixInverse   = ossimMatrix4x4::createIdentity();
+   theRoll                     = roll;
+   thePitch                    = pitch;
+   theHeading                  = heading;
+   theFocalLength              = focalLength;
+   thePixelSize                = pixelSize;
+   theEcefPlatformPosition     = platformPosition;
+   theAdjEcefPlatformPosition  = platformPosition;
+   theLensDistortion           = new ossimMeanRadialLensDistortion;
+   initAdjustableParameters();
+   updateModel();
+
+   try
+   {
+      // Method throws ossimException.
+      computeGsd();
+   }
+   catch (const ossimException& e)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimApplanixEcefModel Constructor caught Exception:\n"
+         << e.what() << std::endl;
+   }
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+      << "ossimApplanixEcefModel::ossimApplanixEcefModel DEBUG:" << endl;
+#ifdef OSSIM_ID_ENABLED
+      ossimNotify(ossimNotifyLevel_DEBUG)<< "OSSIM_ID:  " << OSSIM_ID << endl;
+#endif
+   }
+}
+
+ossimApplanixEcefModel::ossimApplanixEcefModel(const ossimApplanixEcefModel& src)
+   :ossimSensorModel(src)
+{
+   initAdjustableParameters();
+   
+   if(src.theLensDistortion.valid())
+   {
+      theLensDistortion = new ossimMeanRadialLensDistortion(*(src.theLensDistortion.get()));
+   }
+   else
+   {
+      theLensDistortion = new ossimMeanRadialLensDistortion();
+   }
+}
+
+ossimObject* ossimApplanixEcefModel::dup()const
+{
+   return new ossimApplanixEcefModel(*this);
+}
+
+void ossimApplanixEcefModel::imagingRay(const ossimDpt& image_point,
+                                    ossimEcefRay&   image_ray) const
+{
+//    if(traceDebug())
+//    {
+//       ossimNotify(ossimNotifyLevel_DEBUG) << "ossimApplanixEcefModel::imagingRay: ..... entered" << std::endl;
+//    }
+    ossimDpt f1 ((image_point) - theRefImgPt);
+   f1.x *= thePixelSize.x;
+   f1.y *= -thePixelSize.y;
+   ossimDpt film (f1 - thePrincipalPoint);
+//    if(traceDebug())
+//    {
+//       ossimNotify(ossimNotifyLevel_DEBUG) << "pixel size   = " << thePixelSize << std::endl;
+//       ossimNotify(ossimNotifyLevel_DEBUG) << "principal pt = " << thePrincipalPoint << std::endl;
+//       ossimNotify(ossimNotifyLevel_DEBUG) << "film pt      = " << film << std::endl;
+//    }
+   if (theLensDistortion.valid())
+   {
+      ossimDpt filmOut;
+      theLensDistortion->undistort(film, filmOut);
+      film = filmOut;
+   }
+   
+   ossimColumnVector3d cam_ray_dir (film.x,
+                                    film.y,
+                                    -theFocalLength);
+   ossimEcefVector     ecf_ray_dir (theCompositeMatrix*cam_ray_dir);
+   ecf_ray_dir = ecf_ray_dir*(1.0/ecf_ray_dir.magnitude());
+  
+   image_ray.setOrigin(theAdjEcefPlatformPosition);
+   image_ray.setDirection(ecf_ray_dir);
+
+//    if(traceDebug())
+//    {
+//       ossimNotify(ossimNotifyLevel_DEBUG) << "ossimApplanixEcefModel::imagingRay: ..... leaving" << std::endl;
+//    }
+}
+
+void ossimApplanixEcefModel::lineSampleToWorld(const ossimDpt& image_point,
+                                               ossimGpt&       gpt) const
+{
+   if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimApplanixEcefModel::lineSampleToWorld:entering..." << std::endl;
+   
+   if(image_point.hasNans())
+   {
+      gpt.makeNan();
+      return;
+   }
+   //***
+   // Extrapolate if image point is outside image:
+   //***
+//   if (!insideImage(image_point))
+//   {
+//      gpt.makeNan();
+//       gpt = extrapolate(image_point);
+//      return;
+//   }
+
+   //***
+   // Determine imaging ray and invoke elevation source object's services to
+   // intersect ray with terrain model:
+   //***
+   ossimEcefRay ray;
+   imagingRay(image_point, ray);
+   ossimElevManager::instance()->intersectRay(ray, gpt);
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "image_point = " << image_point << std::endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ray = " << ray << std::endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "gpt = " << gpt << std::endl;
+   }
+
+   if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::lineSampleToWorld: returning..." << std::endl;
+   return;
+}
+
+void ossimApplanixEcefModel::lineSampleHeightToWorld(const ossimDpt& image_point,
+                                                 const double&   heightEllipsoid,
+                                                 ossimGpt&       worldPoint) const
+{
+//  if (!insideImage(image_point))
+//   {
+//      worldPoint.makeNan();
+//       worldPoint = extrapolate(image_point, heightEllipsoid);
+//   }
+//   else
+   {
+      //***
+      // First establish imaging ray from image point:
+      //***
+      ossimEcefRay ray;
+      imagingRay(image_point, ray);
+      ossimEcefPoint Pecf (ray.intersectAboveEarthEllipsoid(heightEllipsoid));
+      worldPoint = ossimGpt(Pecf);
+   }
+}
+
+void ossimApplanixEcefModel::worldToLineSample(const ossimGpt& world_point,
+                                           ossimDpt&       image_point) const
+{
+   #if 0
+   if((theBoundGndPolygon.getNumberOfVertices() > 0)&&
+      (!theBoundGndPolygon.hasNans()))
+   {
+      if (!(theBoundGndPolygon.pointWithin(world_point)))
+      {
+//         image_point.makeNan();
+//          image_point = extrapolate(world_point);
+//         return;
+      }         
+   }
+   #endif
+   ossimEcefPoint g_ecf(world_point);
+   ossimEcefVector ecfRayDir(g_ecf - theAdjEcefPlatformPosition);
+   ossimColumnVector3d camRayDir (theCompositeMatrixInverse*ecfRayDir.data());
+   
+      
+   double scale = -theFocalLength/camRayDir[2];
+   ossimDpt film (scale*camRayDir[0], scale*camRayDir[1]);
+      
+   if (theLensDistortion.valid())
+   {
+      ossimDpt filmOut;
+      theLensDistortion->distort(film, filmOut);
+      film = filmOut;
+    }
+   
+     ossimDpt f1(film + thePrincipalPoint);
+    ossimDpt p1(f1.x/thePixelSize.x,
+                -f1.y/thePixelSize.y);
+
+    ossimDpt p0 (p1.x + theRefImgPt.x,
+                 p1.y + theRefImgPt.y);
+    
+    image_point = p0;
+}
+
+void ossimApplanixEcefModel::updateModel()
+{
+   ossimGpt gpt;
+   ossimGpt wgs84Pt;
+   double metersPerDegree = wgs84Pt.metersPerDegree().x;
+   double degreePerMeter = 1.0/metersPerDegree;
+   double latShift = -computeParameterOffset(1)*theMeanGSD*degreePerMeter;
+   double lonShift = computeParameterOffset(0)*theMeanGSD*degreePerMeter;
+
+   gpt = theEcefPlatformPosition;
+   double height = gpt.height();
+   gpt.height(height + computeParameterOffset(5));
+   gpt.latd(gpt.latd() + latShift);
+   gpt.lond(gpt.lond() + lonShift);
+   theAdjEcefPlatformPosition = gpt;
+   ossimLsrSpace lsrSpace(theAdjEcefPlatformPosition, theHeading+computeParameterOffset(4));
+
+   // make a left handed roational matrix;
+   ossimMatrix4x4 lsrMatrix(lsrSpace.lsrToEcefRotMatrix());
+   NEWMAT::Matrix orientation = (ossimMatrix4x4::createRotationXMatrix(thePitch+computeParameterOffset(3), OSSIM_LEFT_HANDED)*
+                                 ossimMatrix4x4::createRotationYMatrix(theRoll+computeParameterOffset(2), OSSIM_LEFT_HANDED));
+   theCompositeMatrix        = (lsrMatrix.getData()*orientation);
+   theCompositeMatrixInverse = theCompositeMatrix.i();
+
+   theBoundGndPolygon.resize(4);
+   // ossim_float64 w = theImageClipRect.width()*2.0;
+   // ossim_float64 h = theImageClipRect.height()*2.0;
+   theExtrapolateImageFlag = false;
+   theExtrapolateGroundFlag = false;
+
+   lineSampleToWorld(theImageClipRect.ul(),gpt);//+ossimDpt(-w, -h), gpt);
+   theBoundGndPolygon[0] = gpt;
+   lineSampleToWorld(theImageClipRect.ur(),gpt);//+ossimDpt(w, -h), gpt);
+   theBoundGndPolygon[1] = gpt;
+   lineSampleToWorld(theImageClipRect.lr(),gpt);//+ossimDpt(w, h), gpt);
+   theBoundGndPolygon[2] = gpt;
+   lineSampleToWorld(theImageClipRect.ll(),gpt);//+ossimDpt(-w, h), gpt);
+   theBoundGndPolygon[3] = gpt;
+}
+
+void ossimApplanixEcefModel::initAdjustableParameters()
+{
+   
+   resizeAdjustableParameterArray(6);
+   
+   setAdjustableParameter(0, 0.0);
+   setParameterDescription(0, "x_offset");
+   setParameterUnit(0, "pixels");
+
+   setAdjustableParameter(1, 0.0);
+   setParameterDescription(1, "y_offset");
+   setParameterUnit(1, "pixels");
+
+   setAdjustableParameter(2, 0.0);
+   setParameterDescription(2, "roll");
+   setParameterUnit(2, "degrees");
+
+   setAdjustableParameter(3, 0.0);
+   setParameterDescription(3, "pitch");
+   setParameterUnit(3, "degrees");
+
+   setAdjustableParameter(4, 0.0);
+   setParameterDescription(4, "heading");
+   setParameterUnit(4, "degrees");
+
+   setAdjustableParameter(5, 0.0);
+   setParameterDescription(5, "altitude");
+   setParameterUnit(5, "meters");
+   
+   
+   setParameterSigma(0, 20.0);
+   setParameterSigma(1, 20.0);
+   setParameterSigma(2, .1);
+   setParameterSigma(3, .1);
+   setParameterSigma(4, .1);
+   setParameterSigma(5, 50);
+}
+
+void ossimApplanixEcefModel::setPrincipalPoint(ossimDpt principalPoint)
+{
+   thePrincipalPoint = principalPoint;
+}
+
+void ossimApplanixEcefModel::setRollPitchHeading(double roll,
+                                                 double pitch,
+                                                 double heading)
+{
+   theRoll    = roll;
+   thePitch   = pitch;
+   theHeading = heading;
+   
+   updateModel();
+}
+
+void ossimApplanixEcefModel::setPixelSize(const ossimDpt& pixelSize)
+{
+   thePixelSize = pixelSize;
+}
+
+void ossimApplanixEcefModel::setImageRect(const ossimDrect& rect)
+{
+   theImageClipRect = rect;
+   theRefImgPt = rect.midPoint();
+}
+
+void ossimApplanixEcefModel::setFocalLength(double focalLength)
+{
+   theFocalLength = focalLength;
+}
+
+void ossimApplanixEcefModel::setPlatformPosition(const ossimGpt& gpt)
+{
+   theRefGndPt            = gpt;
+   theEcefPlatformPosition = gpt;
+   updateModel();
+   
+}
+
+bool ossimApplanixEcefModel::saveState(ossimKeywordlist& kwl,
+                                   const char* prefix) const
+{
+   ossimSensorModel::saveState(kwl, prefix);
+   
+   kwl.add(prefix, "type", "ossimApplanixEcefModel", true);
+
+   kwl.add(prefix, "roll", theRoll, true);
+   kwl.add(prefix, "pitch", thePitch, true);
+   kwl.add(prefix, "heading", theHeading, true);
+   kwl.add(prefix, "principal_point", ossimString::toString(thePrincipalPoint.x) + " " + ossimString::toString(thePrincipalPoint.y));
+   kwl.add(prefix, "pixel_size",      ossimString::toString(thePixelSize.x) + " " + ossimString::toString(thePixelSize.y));
+   kwl.add(prefix, "focal_length", theFocalLength);
+   kwl.add(prefix, "ecef_platform_position",
+           ossimString::toString(theEcefPlatformPosition.x()) + " " +
+           ossimString::toString(theEcefPlatformPosition.y()) + " " +
+           ossimString::toString(theEcefPlatformPosition.z()));
+
+   if(theLensDistortion.valid())
+   {
+      ossimString lensPrefix = ossimString(prefix)+"distortion.";
+      theLensDistortion->saveState(kwl,
+                                   lensPrefix.c_str());
+   }
+   
+   return true;
+}
+
+bool ossimApplanixEcefModel::loadState(const ossimKeywordlist& kwl,
+                                       const char* prefix)
+{
+   if(traceDebug())
+   {
+      std::cout << "ossimApplanixEcefModel::loadState: ......... entered" << std::endl;
+   }
+
+   theImageClipRect = ossimDrect(0,0,4076,4091);
+   theRefImgPt      = ossimDpt(2046.0, 2038.5);
+
+   ossimSensorModel::loadState(kwl, prefix);
+   if(getNumberOfAdjustableParameters() < 1)
+   {
+      initAdjustableParameters();
+   }
+   theEcefPlatformPosition    = ossimGpt(0.0,0.0,1000.0);
+   theAdjEcefPlatformPosition = ossimGpt(0.0,0.0,1000.0);
+   theRoll    = 0.0;
+   thePitch   = 0.0;
+   theHeading = 0.0;
+   // bool computeGsdFlag = false;
+   const char* roll              = kwl.find(prefix, "roll");
+   const char* pitch             = kwl.find(prefix, "pitch");
+   const char* heading           = kwl.find(prefix, "heading");
+   const char* principal_point   = kwl.find(prefix, "principal_point");
+   const char* pixel_size        = kwl.find(prefix, "pixel_size");
+   const char* focal_length      = kwl.find(prefix, "focal_length");
+   const char* ecef_platform_position = kwl.find(prefix, "ecef_platform_position");
+   const char* latlonh_platform_position = kwl.find(prefix, "latlonh_platform_position");
+   const char* compute_gsd_flag  = kwl.find(prefix, "compute_gsd_flag");
+   const char* eo_file           = kwl.find(prefix, "eo_file");
+   const char* camera_file       = kwl.find(prefix, "camera_file");
+   const char* eo_id             = kwl.find(prefix, "eo_id");
+   bool result = true;
+   if(eo_id)
+   {
+      theImageID = eo_id;
+   }
+   if(eo_file)
+   {
+      ossimApplanixEOFile eoFile;
+      if(eoFile.parseFile(ossimFilename(eo_file)))
+      {
+         ossimRefPtr<ossimApplanixEORecord> record = eoFile.getRecordGivenId(theImageID);
+         if(record.valid())
+         {
+            ossim_int32 rollIdx    = eoFile.getFieldIdx("ROLL");
+            ossim_int32 pitchIdx   = eoFile.getFieldIdx("PITCH");
+            ossim_int32 headingIdx = eoFile.getFieldIdx("HEADING");
+            ossim_int32 xIdx       = eoFile.getFieldIdx("X");
+            ossim_int32 yIdx       = eoFile.getFieldIdx("Y");
+            ossim_int32 zIdx       = eoFile.getFieldIdx("Z");
+
+            if((rollIdx >= 0)&&
+               (pitchIdx >= 0)&&
+               (headingIdx >= 0)&&
+               (xIdx >= 0)&&
+               (yIdx >= 0)&&
+               (zIdx >= 0))
+            {
+               theRoll    = (*record)[rollIdx].toDouble();
+               thePitch   = (*record)[pitchIdx].toDouble();
+               theHeading = (*record)[headingIdx].toDouble();
+               theEcefPlatformPosition = ossimEcefPoint((*record)[xIdx].toDouble(),
+                                                        (*record)[yIdx].toDouble(),
+                                                        (*record)[zIdx].toDouble());
+               theAdjEcefPlatformPosition = theEcefPlatformPosition;
+            }
+            else
+            {
+               return false;
+            }
+         }
+         else
+         {
+            ossimNotify(ossimNotifyLevel_WARN) << "ossimApplanixEcefModel::loadState()  Image id " << theImageID << " not found in eo file " << eo_file << std::endl;
+            
+            return false;
+         }
+      }
+      else
+      {
+         return false;
+      }
+      // computeGsdFlag = true;
+   }
+   else
+   {
+      if(roll)
+      {
+         theRoll = ossimString(roll).toDouble();
+      }
+      if(pitch)
+      {
+         thePitch = ossimString(pitch).toDouble();
+      }
+      if(heading)
+      {
+         theHeading = ossimString(heading).toDouble();
+      }
+      if(ecef_platform_position)
+      {
+         std::vector<ossimString> splitString;
+         ossimString tempString(ecef_platform_position);
+         tempString.split(splitString, ossimString(" "));
+         if(splitString.size() > 2)
+         {
+            theEcefPlatformPosition  = ossimEcefPoint(splitString[0].toDouble(),
+                                                      splitString[1].toDouble(),
+                                                      splitString[2].toDouble());
+         }
+      }
+      else if(latlonh_platform_position)
+      {
+         std::vector<ossimString> splitString;
+         ossimString tempString(latlonh_platform_position);
+         tempString.split(splitString, ossimString(" "));
+         std::string datumString;
+         double lat=0.0, lon=0.0, h=0.0;
+         if(splitString.size() > 2)
+         {
+            lat = splitString[0].toDouble();
+            lon = splitString[1].toDouble();
+            h = splitString[2].toDouble();
+         }
+         
+         theEcefPlatformPosition = ossimGpt(lat,lon,h);
+      }
+   }
+
+   if(camera_file)
+   {
+      ossimKeywordlist cameraKwl;
+      ossimKeywordlist lensKwl;
+      cameraKwl.add(camera_file);
+      const char* sensor = cameraKwl.find("sensor");
+      const char* image_size      = cameraKwl.find(prefix, "image_size");
+      principal_point = cameraKwl.find("principal_point");
+      focal_length    = cameraKwl.find("focal_length");
+      pixel_size      = cameraKwl.find(prefix, "pixel_size");
+      focal_length    = cameraKwl.find(prefix, "focal_length");
+      const char* distortion_units = cameraKwl.find(prefix, "distortion_units");
+      ossimUnitConversionTool tool;
+      ossimUnitType unitType = OSSIM_MILLIMETERS;
+
+      if(distortion_units)
+      {
+         unitType = (ossimUnitType)ossimUnitTypeLut::instance()->getEntryNumber(distortion_units);
+
+         if(unitType == OSSIM_UNIT_UNKNOWN)
+         {
+            unitType = OSSIM_MILLIMETERS;
+         }
+      }
+      if(image_size)
+      {
+         std::vector<ossimString> splitString;
+         ossimString tempString(image_size);
+         tempString.split(splitString, ossimString(" "));
+         double w=1, h=1;
+         if(splitString.size() == 2)
+         {
+            w = splitString[0].toDouble();
+            h = splitString[1].toDouble();
+         }
+         theImageClipRect = ossimDrect(0,0,w-1,h-1);
+         theRefImgPt      = ossimDpt(w/2.0, h/2.0);
+         theImageSize     = ossimDpt(w,h);
+      }
+      if(sensor)
+      {
+         theSensorID = sensor;
+      }
+      if(principal_point)
+      {
+         std::vector<ossimString> splitString;
+         ossimString tempString(principal_point);
+         tempString.split(splitString, ossimString(" "));
+         if(splitString.size() == 2)
+         {
+            thePrincipalPoint.x = splitString[0].toDouble();
+            thePrincipalPoint.y = splitString[1].toDouble();
+         }
+      }
+      if(pixel_size)
+      {
+         std::vector<ossimString> splitString;
+         ossimString tempString(pixel_size);
+         tempString.split(splitString, ossimString(" "));
+         if(splitString.size() == 1)
+         {
+            thePixelSize.x = splitString[0].toDouble();
+            thePixelSize.y = thePixelSize.x;
+         }
+         else if(splitString.size() == 2)
+         {
+            thePixelSize.x = splitString[0].toDouble();
+            thePixelSize.y = splitString[1].toDouble();
+         }
+      }
+      if(focal_length)
+      {
+         theFocalLength = ossimString(focal_length).toDouble();
+      }
+
+      cameraKwl.trimAllValues();
+      
+      
+      ossimString regExpression =  ossimString("^(") + "d[0-9]+)";
+      vector<ossimString> keys;
+      cameraKwl.getSubstringKeyList( keys, regExpression );
+      long numberOfDistortions = (long)keys.size();
+      int offset = (int)ossimString("d").size();
+      ossim_uint32 idx = 0;
+      std::vector<int> numberList(numberOfDistortions);
+      for(idx = 0; idx < numberList.size();++idx)
+      {
+         ossimString numberStr(keys[idx].begin() + offset,
+                               keys[idx].end());
+         numberList[idx] = numberStr.toInt();
+      }
+      std::sort(numberList.begin(), numberList.end());
+      double distance=0.0, distortion=0.0;
+
+      for(idx = 0; idx < numberList.size(); ++idx)
+      {
+         ossimString value = cameraKwl.find(ossimString("d")+ossimString::toString(numberList[idx]));
+
+         if(!value.empty())
+         {
+            std::istringstream inStr(value.c_str());
+            inStr >> distance;
+            ossim::skipws(inStr);
+            inStr >> distortion;
+#if 0
+            std::vector<ossimString> splitString;
+            ossimString tempString(value);
+            tempString = tempString.trim();
+            tempString.split(splitString, " ");
+            std::cout << splitString.size() << std::endl;
+            if(splitString.size() >= 2)
+            {
+               distance = splitString[0].toDouble();
+               distortion = splitString[1].toDouble();
+            }
+#endif
+            
+            tool.setValue(distortion, unitType);
+            lensKwl.add(ossimString("distance") + ossimString::toString(idx),
+                        distance,
+                        true);
+            lensKwl.add(ossimString("distortion") + ossimString::toString(idx),
+                        tool.getMillimeters(),
+                        true);
+         }
+         lensKwl.add("convergence_threshold",
+                     .00001,
+                     true);
+         if(pixel_size)
+         {
+            lensKwl.add("dxdy",
+                        ossimString(pixel_size) + " " + ossimString(pixel_size),
+                        true);
+         }
+         else
+         {
+            lensKwl.add("dxdy",
+                        ".009 .009",
+                        true);
+         }
+      }
+      if(theLensDistortion.valid())
+      {
+         theLensDistortion->loadState(lensKwl,"");
+      }
+   }
+   else
+   {
+      
+      if(principal_point)
+      {
+         std::vector<ossimString> splitString;
+         ossimString tempString(principal_point);
+         tempString.split(splitString, ossimString(" "));
+         if(splitString.size() == 2)
+         {
+            thePrincipalPoint.x = splitString[0].toDouble();
+            thePrincipalPoint.y = splitString[1].toDouble();
+         }
+      }
+      else
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << "No principal_point found" << std::endl;
+            result = false;
+         }
+      }
+      if(pixel_size)
+      {
+         std::vector<ossimString> splitString;
+         ossimString tempString(pixel_size);
+         tempString.split(splitString, ossimString(" "));
+         if(splitString.size() == 1)
+         {
+            thePixelSize.x = splitString[0].toDouble();
+            thePixelSize.y = thePixelSize.x;
+         }
+         else if(splitString.size() == 2)
+         {
+            thePixelSize.x = splitString[0].toDouble();
+            thePixelSize.y = splitString[1].toDouble();
+         }
+      }
+      else
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << "No pixel size found" << std::endl;
+            result = false;
+         }
+      }
+      if(focal_length)
+      {
+         theFocalLength = ossimString(focal_length).toDouble();
+      }
+      else
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << "No focal length found" << std::endl;
+            result = false;
+         }
+      }
+      
+      if(theLensDistortion.valid())
+      {
+         ossimString lensPrefix = ossimString(prefix)+"distortion.";
+         if(!theLensDistortion->loadState(kwl,
+                                          lensPrefix.c_str()))
+         {
+            result = false;
+         }
+      }
+   }
+   theRefGndPt = theEcefPlatformPosition;
+   theRefGndPt.height(0.0);
+
+   updateModel();
+
+   if(compute_gsd_flag)
+   {
+      if(ossimString(compute_gsd_flag).toBool())
+      {
+         try
+         {
+            //---
+            // This will set theGSD and theMeanGSD. Method throws
+            // ossimException.
+            //---
+            computeGsd();
+         }
+         catch (const ossimException& e)
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimApplanixEcefModel::loadState Caught Exception:\n"
+               << e.what() << std::endl;
+         }
+      }
+   }
+   
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << std::setprecision(15) << std::endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "roll:     " << theRoll << std::endl
+                                          << "pitch:    " << thePitch << std::endl
+                                          << "heading:  " << theHeading << std::endl
+                                          << "platform: " << theEcefPlatformPosition << std::endl
+                                          << "latlon Platform: " << ossimGpt(theEcefPlatformPosition) << std::endl
+                                          << "focal len: " << theFocalLength << std::endl
+                                          << "principal: " << thePrincipalPoint << std::endl
+                                          << "Ground:    " << ossimGpt(theEcefPlatformPosition) << std::endl;
+   }
+
+   return result;
+}
+
+bool ossimApplanixEcefModel::setupOptimizer(const ossimString& init_file)
+{
+   ossimKeywordlist kwl;
+   kwl.addFile(init_file.c_str());
+
+   return loadState(kwl);
+}
+
diff --git a/ossim/src/ossim/projection/ossimApplanixUtmModel.cpp b/ossim/src/ossim/projection/ossimApplanixUtmModel.cpp
new file mode 100644
index 0000000..e5116c2
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimApplanixUtmModel.cpp
@@ -0,0 +1,979 @@
+//*******************************************************************
+// Copyright (C) 2005 Garrett Potts
+//
+// MIT
+// 
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimApplanixUtmModel.cpp 23666 2015-12-14 20:01:22Z rashadkm $
+#include <sstream>
+#include <ossim/projection/ossimApplanixUtmModel.h>
+#include <ossim/base/ossimEllipsoid.h>
+#include <ossim/base/ossimUnitConversionTool.h>
+#include <ossim/base/ossimUnitTypeLut.h>
+#include <ossim/base/ossimDatumFactory.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimLsrSpace.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimGeoidManager.h>
+#include <ossim/projection/ossimUtmProjection.h>
+#include <ossim/support_data/ossimApplanixEOFile.h>
+#include <ossim/base/ossimMatrix4x4.h>
+#include <ossim/elevation/ossimElevManager.h>
+static ossimTrace traceDebug("ossimApplanixUtmModel:debug");
+
+RTTI_DEF1(ossimApplanixUtmModel, "ossimApplanixUtmModel", ossimSensorModel);
+
+#ifdef OSSIM_ID_ENABLED
+static const char OSSIM_ID[] = "$Id: ossimApplanixUtmModel.cpp 23666 2015-12-14 20:01:22Z rashadkm $";
+#endif
+
+ossimApplanixUtmModel::ossimApplanixUtmModel()
+   :theOmega(0.0),
+    thePhi(0.0),
+    theKappa(0.0),
+    theBoreSightTx(0.0),
+    theBoreSightTy(0.0),
+    theBoreSightTz(0.0)
+{
+   theCompositeMatrix          = ossimMatrix4x4::createIdentity();
+   theCompositeMatrixInverse   = ossimMatrix4x4::createIdentity();
+   theFocalLength              = 55.0;
+   thePixelSize = ossimDpt(.009, .009);
+   theEcefPlatformPosition = ossimGpt(0.0,0.0, 1000.0);
+   theGSD.x = 0.1524;
+   theGSD.y = 0.1524;
+   theMeanGSD = 0.1524;
+   theLensDistortion = new ossimMeanRadialLensDistortion;
+   initAdjustableParameters();
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimApplanixUtmModel::ossimApplanixUtmModel DEBUG:" << endl;
+#ifdef OSSIM_ID_ENABLED
+      ossimNotify(ossimNotifyLevel_DEBUG)<< "OSSIM_ID:  " << OSSIM_ID << endl;
+#endif
+   }
+}
+
+ossimApplanixUtmModel::ossimApplanixUtmModel(const ossimApplanixUtmModel& src)
+   :ossimSensorModel(src),
+    theCompositeMatrix(src.theCompositeMatrix),
+    theCompositeMatrixInverse(src.theCompositeMatrixInverse),
+    theOmega(src.theOmega),
+    thePhi(src.thePhi),
+    theKappa(src.theKappa),
+    theBoreSightTx(src.theBoreSightTx),
+    theBoreSightTy(src.theBoreSightTy),
+    theBoreSightTz(src.theBoreSightTz),
+    thePrincipalPoint(src.thePrincipalPoint),
+    thePixelSize(src.thePixelSize),
+    theFocalLength(src.theFocalLength),
+    theEcefPlatformPosition(src.theEcefPlatformPosition),
+    thePlatformPosition(src.thePlatformPosition),
+    theUtmZone(src.theUtmZone),
+    theUtmHemisphere(src.theUtmHemisphere),
+    theUtmPlatformPosition(src.theUtmPlatformPosition)
+{
+   if(src.theLensDistortion.valid())
+   {
+      theLensDistortion = new ossimMeanRadialLensDistortion(*(src.theLensDistortion.get()));
+   }
+   else
+   {
+      theLensDistortion = new ossimMeanRadialLensDistortion();
+   }
+}
+
+ossimObject* ossimApplanixUtmModel::dup()const
+{
+   return new ossimApplanixUtmModel(*this);
+}
+
+void ossimApplanixUtmModel::imagingRay(const ossimDpt& image_point,
+                                    ossimEcefRay&   image_ray) const
+{
+//    if(traceDebug())
+//    {
+//       ossimNotify(ossimNotifyLevel_DEBUG) << "ossimApplanixUtmModel::imagingRay: ..... entered" << std::endl;
+//    }
+    ossimDpt f1 ((image_point) - theRefImgPt);
+   f1.x *= thePixelSize.x;
+   f1.y *= -thePixelSize.y;
+   ossimDpt film (f1 - thePrincipalPoint);
+//    if(traceDebug())
+//    {
+//       ossimNotify(ossimNotifyLevel_DEBUG) << "pixel size   = " << thePixelSize << std::endl;
+//       ossimNotify(ossimNotifyLevel_DEBUG) << "principal pt = " << thePrincipalPoint << std::endl;
+//       ossimNotify(ossimNotifyLevel_DEBUG) << "film pt      = " << film << std::endl;
+//    }
+   if (theLensDistortion.valid())
+   {
+      ossimDpt filmOut;
+      theLensDistortion->undistort(film, filmOut);
+      film = filmOut;
+   }
+   
+   ossimColumnVector3d cam_ray_dir (film.x,
+                                    film.y,
+                                    -theFocalLength);
+   ossimEcefVector     ecf_ray_dir (theCompositeMatrix*cam_ray_dir);
+   ecf_ray_dir = ecf_ray_dir*(1.0/ecf_ray_dir.magnitude());
+   
+   image_ray.setOrigin(theAdjEcefPlatformPosition);
+   image_ray.setDirection(ecf_ray_dir);
+   
+//    if(traceDebug())
+//    {
+//       ossimNotify(ossimNotifyLevel_DEBUG) << "ossimApplanixUtmModel::imagingRay: ..... leaving" << std::endl;
+//    }
+}
+
+void ossimApplanixUtmModel::lineSampleToWorld(const ossimDpt& image_point,
+                                               ossimGpt&       gpt) const
+{
+   if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimApplanixEcefModel::lineSampleToWorld:entering..." << std::endl;
+   
+   if(image_point.hasNans())
+   {
+      gpt.makeNan();
+      return;
+   }
+   //***
+   // Extrapolate if image point is outside image:
+   //***
+  // if (!insideImage(image_point))
+  // {
+   //   gpt.makeNan();
+//       gpt = extrapolate(image_point);
+   //   return;
+   //}
+
+   //***
+   // Determine imaging ray and invoke elevation source object's services to
+   // intersect ray with terrain model:
+   //***
+   ossimEcefRay ray;
+   imagingRay(image_point, ray);
+   ossimElevManager::instance()->intersectRay(ray, gpt);
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "image_point = " << image_point << std::endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ray = " << ray << std::endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "gpt = " << gpt << std::endl;
+   }
+
+   if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::lineSampleToWorld: returning..." << std::endl;
+   return;
+}
+
+void ossimApplanixUtmModel::lineSampleHeightToWorld(const ossimDpt& image_point,
+                                                 const double&   heightEllipsoid,
+                                                 ossimGpt&       worldPoint) const
+{
+//   if (!insideImage(image_point))
+//   {
+      //worldPoint.makeNan();
+//       worldPoint = extrapolate(image_point, heightEllipsoid);
+//   }
+//   else
+   {
+      //***
+      // First establish imaging ray from image point:
+      //***
+      ossimEcefRay ray;
+      imagingRay(image_point, ray);
+      ossimEcefPoint Pecf (ray.intersectAboveEarthEllipsoid(heightEllipsoid));
+      worldPoint = ossimGpt(Pecf);
+   }
+}
+
+void ossimApplanixUtmModel::worldToLineSample(const ossimGpt& world_point,
+                                           ossimDpt&       image_point) const
+{
+#if 0
+   if((theBoundGndPolygon.getNumberOfVertices() > 0)&&
+      (!theBoundGndPolygon.hasNans()))
+   {
+      if (!(theBoundGndPolygon.pointWithin(world_point)))
+      {
+         image_point.makeNan();
+//          image_point = extrapolate(world_point);
+         return;
+      }         
+   }
+#endif
+   ossimEcefPoint g_ecf(world_point);
+   ossimEcefVector ecfRayDir(g_ecf - theAdjEcefPlatformPosition);
+   ossimColumnVector3d camRayDir (theCompositeMatrixInverse*ecfRayDir.data());
+   
+      
+   double scale = -theFocalLength/camRayDir[2];
+   ossimDpt film (scale*camRayDir[0], scale*camRayDir[1]);
+      
+   if (theLensDistortion.valid())
+   {
+      ossimDpt filmOut;
+      theLensDistortion->distort(film, filmOut);
+      film = filmOut;
+    }
+   
+     ossimDpt f1(film + thePrincipalPoint);
+    ossimDpt p1(f1.x/thePixelSize.x,
+                -f1.y/thePixelSize.y);
+
+    ossimDpt p0 (p1.x + theRefImgPt.x,
+                 p1.y + theRefImgPt.y);
+    
+    image_point = p0;
+}
+
+void ossimApplanixUtmModel::updateModel()
+{
+
+   ossimGpt wgs84Pt;
+   double metersPerDegree = wgs84Pt.metersPerDegree().x;
+   double degreePerMeter = 1.0/metersPerDegree;
+   double latShift = -computeParameterOffset(1)*theMeanGSD*degreePerMeter;
+   double lonShift = computeParameterOffset(0)*theMeanGSD*degreePerMeter;
+
+   ossimGpt gpt = thePlatformPosition;
+//   gpt.height(0.0);
+   double height = gpt.height();
+   gpt.height(height + computeParameterOffset(5));
+   gpt.latd(gpt.latd() + latShift);
+   gpt.lond(gpt.lond() + lonShift);
+   
+   theAdjEcefPlatformPosition = gpt;
+   ossimLsrSpace lsrSpace(theAdjEcefPlatformPosition);
+   // ORIENT TO A UTM AXIS
+   //
+    NEWMAT::ColumnVector v(3);
+   
+    v[0] = 0.0;
+    v[1] = 0.0;
+    v[2] = 1.0;
+    NEWMAT::ColumnVector v2 = lsrSpace.lsrToEcefRotMatrix()*v;
+    ossimEcefVector zVector(v2[0], v2[1], v2[2]);
+    zVector.normalize();
+   
+   // now lets create a UTM axis by creating a derivative at the center
+   // by shift over a few pixels and subtracting
+   //
+   ossimUtmProjection utmProj;
+   
+   utmProj.setZone(theUtmZone);
+   utmProj.setZone(theUtmHemisphere);
+   utmProj.setMetersPerPixel(ossimDpt(1.0,1.0));
+   ossimDpt midPt  = utmProj.forward(theAdjEcefPlatformPosition);
+   ossimDpt rPt    = midPt + ossimDpt(10, 0.0);
+   ossimDpt uPt    = midPt + ossimDpt(0.0, 10.0);
+   ossimGpt wMidPt = utmProj.inverse(midPt);
+   ossimGpt wRPt   = utmProj.inverse(rPt);
+   ossimGpt wUPt   = utmProj.inverse(uPt);
+   
+   ossimEcefPoint ecefMidPt = wMidPt;
+   ossimEcefPoint ecefRPt   = wRPt;
+   ossimEcefPoint ecefUPt   = wUPt;
+   
+   ossimEcefVector east  = ecefRPt-ecefMidPt;
+   ossimEcefVector north = ecefUPt-ecefMidPt;
+   east.normalize();
+   north.normalize();
+   
+   // now use the lsr space constructors to construct an orthogonal set of axes
+   //
+   lsrSpace = ossimLsrSpace(thePlatformPosition,
+                            0,
+                            north,
+                            east.cross(north));
+//   lsrSpace = ossimLsrSpace(thePlatformPosition);
+   // DONE ORIENT TO UTM AXIS
+   
+   NEWMAT::Matrix platformLsrMatrix = lsrSpace.lsrToEcefRotMatrix();
+   NEWMAT::Matrix orientationMatrix = (ossimMatrix3x3::createRotationXMatrix(theOmega+computeParameterOffset(2), OSSIM_LEFT_HANDED)*
+                                       ossimMatrix3x3::createRotationYMatrix(thePhi+computeParameterOffset(3), OSSIM_LEFT_HANDED)*
+                                       ossimMatrix3x3::createRotationZMatrix(theKappa+computeParameterOffset(4), OSSIM_LEFT_HANDED));
+   
+   theCompositeMatrix         = platformLsrMatrix*orientationMatrix;
+   theCompositeMatrixInverse  = theCompositeMatrix.i();
+
+//   theAdjEcefPlatformPosition = theEcefPlatformPosition; 
+
+   theBoundGndPolygon.resize(4);
+   // ossim_float64 w = theImageClipRect.width();//*2.0;
+   // ossim_float64 h = theImageClipRect.height();//*2.0;
+   
+   lineSampleToWorld(theImageClipRect.ul(),gpt);//+ossimDpt(-w, -h), gpt);
+   theBoundGndPolygon[0] = gpt;
+   lineSampleToWorld(theImageClipRect.ur(),gpt);//+ossimDpt(w, -h), gpt);
+   theBoundGndPolygon[1] = gpt;
+   lineSampleToWorld(theImageClipRect.lr(),gpt);//+ossimDpt(w, h), gpt);
+   theBoundGndPolygon[2] = gpt;
+   lineSampleToWorld(theImageClipRect.ll(),gpt);//+ossimDpt(-w, h), gpt);
+   theBoundGndPolygon[3] = gpt;
+}
+
+void ossimApplanixUtmModel::initAdjustableParameters()
+{
+   resizeAdjustableParameterArray(6);
+   
+   setAdjustableParameter(0, 0.0);
+   setParameterDescription(0, "x_offset");
+   setParameterUnit(0, "pixels");
+
+   setAdjustableParameter(1, 0.0);
+   setParameterDescription(1, "y_offset");
+   setParameterUnit(1, "pixels");
+
+   setAdjustableParameter(2, 0.0);
+   setParameterDescription(2, "orientation x");
+   setParameterUnit(2, "degrees");
+
+   setAdjustableParameter(3, 0.0);
+   setParameterDescription(3, "orientation y");
+   setParameterUnit(3, "degrees");
+
+   setAdjustableParameter(4, 0.0);
+   setParameterDescription(4, "orientation z");
+   setParameterUnit(4, "degrees");
+
+   setAdjustableParameter(5, 0.0);
+   setParameterDescription(5, "Altitude delta");
+   setParameterUnit(5, "meters");
+
+   
+   
+   setParameterSigma(0, 20.0);
+   setParameterSigma(1, 20.0);
+   setParameterSigma(2, .1);
+   setParameterSigma(3, .1);
+   setParameterSigma(4, .1);
+   setParameterSigma(5, 50);
+}
+
+void ossimApplanixUtmModel::setPrincipalPoint(ossimDpt principalPoint)
+{
+   thePrincipalPoint = principalPoint;
+}
+
+void ossimApplanixUtmModel::setPixelSize(const ossimDpt& pixelSize)
+{
+   thePixelSize = pixelSize;
+}
+
+void ossimApplanixUtmModel::setImageRect(const ossimDrect& rect)
+{
+   theImageClipRect = rect;
+   theRefImgPt = rect.midPoint();
+}
+
+void ossimApplanixUtmModel::setFocalLength(double focalLength)
+{
+   theFocalLength = focalLength;
+}
+
+void ossimApplanixUtmModel::setPlatformPosition(const ossimGpt& gpt)
+{
+   theRefGndPt             = gpt;
+   theEcefPlatformPosition = gpt;
+   updateModel();
+   
+}
+
+bool ossimApplanixUtmModel::saveState(ossimKeywordlist& kwl,
+                                   const char* prefix) const
+{
+   ossimSensorModel::saveState(kwl, prefix);
+   
+   kwl.add(prefix, "type", "ossimApplanixUtmModel", true);
+
+   kwl.add(prefix, "omega", theOmega, true);
+   kwl.add(prefix, "phi", thePhi, true);
+   kwl.add(prefix, "kappa", theKappa, true);
+   kwl.add(prefix, "bore_sight_tx", theBoreSightTx*60, true);
+   kwl.add(prefix, "bore_sight_ty", theBoreSightTy*60, true);
+   kwl.add(prefix, "bore_sight_tz", theBoreSightTz*60, true);
+   kwl.add(prefix, "principal_point", ossimString::toString(thePrincipalPoint.x) + " " + ossimString::toString(thePrincipalPoint.y));
+   kwl.add(prefix, "pixel_size",      ossimString::toString(thePixelSize.x) + " " + ossimString::toString(thePixelSize.y));
+   kwl.add(prefix, "focal_length", theFocalLength);
+   kwl.add(prefix, "ecef_platform_position",
+           ossimString::toString(theEcefPlatformPosition.x()) + " " +
+           ossimString::toString(theEcefPlatformPosition.y()) + " " +
+           ossimString::toString(theEcefPlatformPosition.z()));
+   kwl.add(prefix, "latlonh_platform_position",
+           ossimString::toString(thePlatformPosition.latd()) + " " +
+           ossimString::toString(thePlatformPosition.lond()) + " " +
+           ossimString::toString(thePlatformPosition.height()) + " " +
+           thePlatformPosition.datum()->code());
+   kwl.add(prefix,
+           "utm_platform_position",
+           ossimString::toString(theUtmPlatformPosition.x) + " " +
+           ossimString::toString(theUtmPlatformPosition.y) + " " +
+           ossimString::toString(theUtmPlatformPosition.z) + " " +
+           thePlatformPosition.datum()->code(),
+           true);
+   kwl.add(prefix,
+           "utm_zone",
+           theUtmZone,
+           true);
+   kwl.add(prefix,
+           "utm_hemisphere",
+           theUtmHemisphere,
+           true);
+   kwl.add(prefix,
+           "shift_values",
+           ossimString::toString(theShiftValues.x()) + " " + 
+           ossimString::toString(theShiftValues.y()) + " " +
+           ossimString::toString(theShiftValues.z()),
+           true);
+   if(theLensDistortion.valid())
+   {
+      ossimString lensPrefix = ossimString(prefix)+"distortion.";
+      theLensDistortion->saveState(kwl,
+                                   lensPrefix.c_str());
+   }
+   
+   return true;
+}
+
+bool ossimApplanixUtmModel::loadState(const ossimKeywordlist& kwl,
+                                   const char* prefix)
+{
+   if(traceDebug())
+   {
+      std::cout << "ossimApplanixUtmModel::loadState: ......... entered" << std::endl;
+   }
+   theImageClipRect = ossimDrect(0,0,4076,4091);
+   theRefImgPt      = ossimDpt(2046.0, 2038.5);
+   
+   ossimSensorModel::loadState(kwl, prefix);
+
+   if(getNumberOfAdjustableParameters() < 1)
+   {
+      initAdjustableParameters();
+   }
+
+   const char* eo_file           = kwl.find(prefix, "eo_file");
+   const char* eo_id             = kwl.find(prefix, "eo_id");
+   const char* omega             = kwl.find(prefix, "omega");
+   const char* phi               = kwl.find(prefix, "phi");
+   const char* kappa             = kwl.find(prefix, "kappa");
+   const char* bore_sight_tx     = kwl.find(prefix, "bore_sight_tx");
+   const char* bore_sight_ty     = kwl.find(prefix, "bore_sight_ty");
+   const char* bore_sight_tz     = kwl.find(prefix, "bore_sight_tz");
+   
+   const char* principal_point   = kwl.find(prefix, "principal_point");
+   const char* pixel_size        = kwl.find(prefix, "pixel_size");
+   const char* focal_length      = kwl.find(prefix, "focal_length");
+   const char* latlonh_platform_position = kwl.find(prefix, "latlonh_platform_position");
+   const char* utm_platform_position = kwl.find(prefix, "utm_platform_position");
+   const char* compute_gsd_flag  = kwl.find(prefix, "compute_gsd_flag");
+   const char* utm_zone          = kwl.find(prefix, "utm_zone");
+   const char* utm_hemisphere    = kwl.find(prefix, "utm_hemisphere");
+   const char* camera_file       = kwl.find(prefix, "camera_file");
+   const char* shift_values      = kwl.find(prefix, "shift_values");
+   
+   theCompositeMatrix          = ossimMatrix3x3::createIdentity();
+   theCompositeMatrixInverse   = ossimMatrix3x3::createIdentity();
+   theOmega                    = 0.0;
+   thePhi                      = 0.0;
+   theKappa                    = 0.0;
+   theBoreSightTx              = 0.0;
+   theBoreSightTy              = 0.0;
+   theBoreSightTz              = 0.0;
+   theFocalLength              = 55.0;
+   thePixelSize = ossimDpt(.009, .009);
+   theEcefPlatformPosition = ossimGpt(0.0,0.0, 1000.0);
+
+   bool loadedFromEoFile = false;
+
+   if(eo_id)
+   {
+      theImageID = eo_id;
+   }
+   // loading from standard eo file with given record id
+   //
+   if(eo_file)
+   {
+      ossimApplanixEOFile eoFile;
+      
+      if(eoFile.parseFile(ossimFilename(eo_file)))
+      {
+         ossimRefPtr<ossimApplanixEORecord> record = eoFile.getRecordGivenId(theImageID);
+
+         if(record.valid())
+         {
+            loadedFromEoFile = true;
+            theBoreSightTx = eoFile.getBoreSightTx()/60.0;
+            theBoreSightTy = eoFile.getBoreSightTy()/60.0;
+            theBoreSightTz = eoFile.getBoreSightTz()/60.0;
+            theShiftValues = ossimEcefVector(eoFile.getShiftValuesX(),
+                                             eoFile.getShiftValuesY(),
+                                             eoFile.getShiftValuesZ());
+            ossim_int32 easting  = eoFile.getFieldIdxLike("EASTING");
+            ossim_int32 northing = eoFile.getFieldIdxLike("NORTHING");
+            ossim_int32 height   = eoFile.getFieldIdxLike("HEIGHT");
+            ossim_int32 omega    = eoFile.getFieldIdxLike("OMEGA");
+            ossim_int32 phi      = eoFile.getFieldIdxLike("PHI");
+            ossim_int32 kappa    = eoFile.getFieldIdxLike("KAPPA");
+
+            if((omega>=0)&&
+               (phi>=0)&&
+               (kappa>=0)&&
+               (height>=0)&&
+               (easting>=0)&&
+               (northing>=0))
+            {
+               theOmega = (*record)[omega].toDouble();
+               thePhi   = (*record)[phi].toDouble();
+               theKappa = (*record)[kappa].toDouble();
+               double h = (*record)[height].toDouble();
+               ossimString heightType = kwl.find(prefix, "height_type");
+               if(eoFile.isUtmFrame())
+               {
+                  theUtmZone = eoFile.getUtmZone();
+                  theUtmHemisphere = eoFile.getUtmHemisphere()=="North"?'N':'S';
+                  ossimUtmProjection utmProj;
+                  utmProj.setZone(theUtmZone);
+                  utmProj.setHemisphere((char)theUtmHemisphere);
+                  theUtmPlatformPosition.x = (*record)[easting].toDouble();
+                  theUtmPlatformPosition.y = (*record)[northing].toDouble();
+                  theUtmPlatformPosition.z = h;
+                  thePlatformPosition = utmProj.inverse(ossimDpt(theUtmPlatformPosition.x,
+                                                                 theUtmPlatformPosition.y));
+                  thePlatformPosition.height(h);
+
+                  if(eoFile.isHeightAboveMSL())
+                  {
+                     double offset = ossimGeoidManager::instance()->offsetFromEllipsoid(thePlatformPosition);
+                     if(!ossim::isnan(offset))
+                     {
+                        thePlatformPosition.height(h + offset);
+                        theUtmPlatformPosition.z = h + offset;
+                     }
+                  }
+               }
+               else
+               {
+                  return false;
+               }
+            }
+            theEcefPlatformPosition = thePlatformPosition;
+         }
+         else
+         {
+            return false;
+         }
+      }
+   }
+   if(!loadedFromEoFile)
+   {
+      if(shift_values)
+      {
+         std::vector<ossimString> splitString;
+         ossimString tempString(shift_values);
+         tempString = tempString.trim();
+         tempString.split(splitString, " " );
+         if(splitString.size() == 3)
+         {
+            theShiftValues = ossimEcefVector(splitString[0].toDouble(),
+                                             splitString[1].toDouble(),
+                                             splitString[2].toDouble());
+         }
+      }
+      if(omega&&phi&&kappa)
+      {
+         theOmega = ossimString(omega).toDouble();
+         thePhi   = ossimString(phi).toDouble();
+         theKappa = ossimString(kappa).toDouble();
+      }
+      if(bore_sight_tx&&bore_sight_ty&&bore_sight_tz)
+      {
+         theBoreSightTx = ossimString(bore_sight_tx).toDouble()/60.0;
+         theBoreSightTy = ossimString(bore_sight_ty).toDouble()/60.0;
+         theBoreSightTz = ossimString(bore_sight_tz).toDouble()/60.0;
+      }
+      double lat=0.0, lon=0.0, h=0.0;
+      if(utm_zone)
+      {
+         theUtmZone = ossimString(utm_zone).toInt32();
+      }
+      if(utm_hemisphere)
+      {
+         ossimString hem = utm_hemisphere;
+         hem = hem.trim();
+         hem = hem.upcase();
+         theUtmHemisphere = *(hem.begin());
+      }
+      if(utm_platform_position)
+      {
+         ossimUtmProjection utmProj;
+         std::vector<ossimString> splitString;
+         ossimString tempString(utm_platform_position);
+         tempString = tempString.trim();
+         ossimString datumString;
+         utmProj.setZone(theUtmZone);
+         utmProj.setHemisphere((char)theUtmHemisphere);
+         tempString.split(splitString, " ");
+         if(splitString.size() > 2)
+         {
+            theUtmPlatformPosition.x = splitString[0].toDouble();
+            theUtmPlatformPosition.y = splitString[1].toDouble();
+            theUtmPlatformPosition.z = splitString[2].toDouble();
+         }
+         if(splitString.size() > 3)
+         {
+            datumString = splitString[3];
+         }
+         const ossimDatum* datum = ossimDatumFactory::instance()->create(datumString);
+         if(datum)
+         {
+            utmProj.setDatum(datum);
+         }
+         
+         thePlatformPosition = utmProj.inverse(ossimDpt(theUtmPlatformPosition.x,
+                                                        theUtmPlatformPosition.y));
+         thePlatformPosition.height(theUtmPlatformPosition.z);
+         
+         ossimString heightType = kwl.find(prefix, "height_type");
+         if(heightType == "msl")
+         {
+            double offset = ossimGeoidManager::instance()->offsetFromEllipsoid(thePlatformPosition);
+            if(ossim::isnan(offset) == false)
+            {
+               thePlatformPosition.height(thePlatformPosition.height() + offset);
+               theUtmPlatformPosition.z = thePlatformPosition.height();
+            }
+         }
+         theEcefPlatformPosition = thePlatformPosition;
+      }
+      else if(latlonh_platform_position)
+      {
+         std::vector<ossimString> splitString;
+         ossimString tempString(latlonh_platform_position);
+         std::string datumString;
+         tempString = tempString.trim();
+         tempString.split(splitString, " ");
+         if(splitString.size() > 2)
+         {
+            lat = splitString[0].toDouble();
+            lon = splitString[1].toDouble();
+            h = splitString[2].toDouble();
+         }
+         if(splitString.size() > 3)
+         {
+            datumString = splitString[3].string();
+         }
+         thePlatformPosition.latd(lat);
+         thePlatformPosition.lond(lon);
+         thePlatformPosition.height(h);
+         const ossimDatum* datum = ossimDatumFactory::instance()->create(datumString);
+         if(datum)
+         {
+            thePlatformPosition.datum(datum);
+         }
+         ossimString heightType = kwl.find(prefix, "height_type");
+         if(heightType == "msl")
+         {
+            double offset = ossimGeoidManager::instance()->offsetFromEllipsoid(thePlatformPosition);
+            if(ossim::isnan(offset) == false)
+            {
+               thePlatformPosition.height(thePlatformPosition.height() + offset);
+            }
+         }
+         theEcefPlatformPosition = thePlatformPosition;
+      }
+   }
+   if(principal_point)
+   {
+      std::vector<ossimString> splitString;
+      ossimString tempString(principal_point);
+      tempString = tempString.trim();
+      tempString.split(splitString, " ");
+      if(splitString.size() == 2)
+      {
+         thePrincipalPoint.x = splitString[0].toDouble();
+         thePrincipalPoint.y = splitString[1].toDouble();
+      }
+   }
+   if(pixel_size)
+   {
+      std::vector<ossimString> splitString;
+      ossimString tempString(principal_point);
+      tempString = tempString.trim();
+      tempString.split(splitString, " ");
+      if(splitString.size() == 2)
+      {
+         thePixelSize.x = splitString[0].toDouble();
+         thePixelSize.y = splitString[1].toDouble();
+      }
+   }
+   if(focal_length)
+   {
+      theFocalLength = ossimString(focal_length).toDouble();
+   }
+
+   if(camera_file)
+   {
+      ossimKeywordlist cameraKwl;
+      ossimKeywordlist lensKwl;
+      cameraKwl.add(camera_file);
+      const char* sensor = cameraKwl.find("sensor");
+      const char* image_size      = cameraKwl.find(prefix, "image_size");
+      principal_point = cameraKwl.find("principal_point");
+      focal_length    = cameraKwl.find("focal_length");
+      pixel_size      = cameraKwl.find(prefix, "pixel_size");
+      focal_length    = cameraKwl.find(prefix, "focal_length");
+      const char* distortion_units = cameraKwl.find(prefix, "distortion_units");
+      ossimUnitConversionTool tool;
+      ossimUnitType unitType = OSSIM_MILLIMETERS;
+
+      if(distortion_units)
+      {
+         unitType = (ossimUnitType)ossimUnitTypeLut::instance()->getEntryNumber(distortion_units);
+
+         if(unitType == OSSIM_UNIT_UNKNOWN)
+         {
+            unitType = OSSIM_MILLIMETERS;
+         }
+      }
+      if(image_size)
+      {
+         std::vector<ossimString> splitString;
+         ossimString tempString(image_size);
+         tempString = tempString.trim();
+         tempString.split(splitString, " ");
+         double w=1, h=1;
+         if(splitString.size() == 2)
+         {
+            w = splitString[0].toDouble();
+            h = splitString[1].toDouble();
+         }
+         theImageClipRect = ossimDrect(0,0,w-1,h-1);
+         theRefImgPt      = ossimDpt(w/2.0, h/2.0);
+         theImageSize     = ossimDpt(w, h);
+      }
+      if(sensor)
+      {
+         theSensorID = sensor;
+      }
+      if(principal_point)
+      {
+         std::vector<ossimString> splitString;
+         ossimString tempString(principal_point);
+         tempString = tempString.trim();
+         tempString.split(splitString, " ");
+         if(splitString.size() == 2)
+         {
+            thePrincipalPoint.x = splitString[0].toDouble();
+            thePrincipalPoint.y = splitString[1].toDouble();
+         }
+      }
+      if(pixel_size)
+      {
+         std::vector<ossimString> splitString;
+         ossimString tempString(pixel_size);
+         tempString = tempString.trim();
+         tempString.split(splitString, " ");
+         if(splitString.size() == 1)
+         {
+            thePixelSize.x = splitString[0].toDouble();
+            thePixelSize.y = thePixelSize.x;
+         }
+         else if(splitString.size() == 2)
+         {
+            thePixelSize.x = splitString[0].toDouble();
+            thePixelSize.y = splitString[1].toDouble();
+         }
+      }
+      if(focal_length)
+      {
+         theFocalLength = ossimString(focal_length).toDouble();
+      }
+
+      cameraKwl.trimAllValues();
+      
+      
+      ossimString regExpression =  ossimString("^(") + "d[0-9]+)";
+      vector<ossimString> keys;
+      cameraKwl.getSubstringKeyList( keys, regExpression );
+      long numberOfDistortions = (long)keys.size();
+      int offset = (int)ossimString("d").size();
+      ossim_uint32 idx = 0;
+      std::vector<int> numberList(numberOfDistortions);
+      for(idx = 0; idx < numberList.size();++idx)
+      {
+         ossimString numberStr(keys[idx].begin() + offset,
+                               keys[idx].end());
+         numberList[idx] = numberStr.toInt();
+      }
+      std::sort(numberList.begin(), numberList.end());
+      double distance=0.0, distortion=0.0;
+     
+      for(idx = 0; idx < numberList.size(); ++idx)
+      {
+         ossimString value = cameraKwl.find(ossimString("d")+ossimString::toString(numberList[idx]));
+         if(!value.empty())
+         {
+            std::istringstream inStr(value.c_str());
+            inStr >> distance;
+            ossim::skipws(inStr);
+            inStr >> distortion;
+#if 0
+            std::vector<ossimString> splitString;
+            ossimString tempString(value);
+            tempString = tempString.trim();
+            tempString.split(splitString, " ");
+            std::cout << splitString.size() << std::endl;
+            if(splitString.size() >= 2)
+            {
+               distance = splitString[0].toDouble();
+               distortion = splitString[1].toDouble();
+            }
+#endif
+            
+            tool.setValue(distortion, unitType);
+            lensKwl.add(ossimString("distance") + ossimString::toString(idx),
+                        distance,
+                        true);
+            lensKwl.add(ossimString("distortion") + ossimString::toString(idx),
+                        tool.getMillimeters(),
+                        true);
+         }
+         lensKwl.add("convergence_threshold",
+                     .00001,
+                     true);
+         if(pixel_size)
+         {
+            lensKwl.add("dxdy",
+                        ossimString::toString(thePixelSize.x) + " " +ossimString::toString(thePixelSize.y),
+                        true);
+         }
+         else
+         {
+            lensKwl.add("dxdy",
+                        ".009 .009",
+                        true);
+         }
+      }
+      if(theLensDistortion.valid())
+      {
+         theLensDistortion->loadState(lensKwl,"");
+      }
+   }
+   else
+   {
+      
+      if(principal_point)
+      {
+         std::vector<ossimString> splitString;
+         ossimString tempString(principal_point);
+         tempString = tempString.trim();
+         tempString.split(splitString, " ");
+         if(splitString.size() >= 2)
+         {
+            thePrincipalPoint.x = splitString[0].toDouble();
+            thePrincipalPoint.y = splitString[1].toDouble();
+         }
+      }
+      else
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << "No principal_point found" << std::endl;
+            return false;
+         }
+      }
+      if(pixel_size)
+      {
+         std::vector<ossimString> splitString;
+         ossimString tempString(pixel_size);
+         tempString = tempString.trim();
+         tempString.split(splitString, " ");
+         if(splitString.size() == 1)
+         {
+            thePixelSize.x = splitString[0].toDouble();
+            thePixelSize.y = thePixelSize.x;
+         }
+         else if(splitString.size() == 2)
+         {
+            thePixelSize.x = splitString[0].toDouble();
+            thePixelSize.y = splitString[1].toDouble();
+         }
+      }
+      else
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << "No pixel size found" << std::endl;
+            return false;
+         }
+      }
+      if(focal_length)
+      {
+         theFocalLength = ossimString(focal_length).toDouble();
+      }
+      else
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << "No focal length found" << std::endl;
+            return false;
+         }
+      }
+      
+      if(theLensDistortion.valid())
+      {
+         ossimString lensPrefix = ossimString(prefix)+"distortion.";
+         theLensDistortion->loadState(kwl,
+                                      lensPrefix.c_str());
+      }
+   }
+   theRefGndPt = thePlatformPosition;
+   
+   updateModel();
+
+   lineSampleToWorld(theRefImgPt, theRefGndPt);
+   if(compute_gsd_flag)
+   {
+      if(ossimString(compute_gsd_flag).toBool())
+      {
+         ossimGpt right;
+         ossimGpt top;
+         lineSampleToWorld(theRefImgPt + ossimDpt(1.0, 0.0),
+                           right);
+         lineSampleToWorld(theRefImgPt + ossimDpt(1.0, 0.0),
+                           top);
+
+         ossimEcefVector horizontal = ossimEcefPoint(theRefGndPt)-ossimEcefPoint(right);
+         ossimEcefVector vertical   = ossimEcefPoint(theRefGndPt)-ossimEcefPoint(top);
+
+         theGSD.x = horizontal.length();
+         theGSD.y = vertical.length();
+         theMeanGSD = (theGSD.x+theGSD.y)*.5;
+      }
+   }
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "theOmega:              " << theOmega << std::endl
+                                          << "thePhi:                " << thePhi   << std::endl
+                                          << "theKappa:              " << theKappa << std::endl;
+      std::cout << "platform position:     " << thePlatformPosition << std::endl;
+      std::cout << "platform position ECF: " << theEcefPlatformPosition << std::endl;
+      std::cout << "ossimApplanixModel::loadState: ......... leaving" << std::endl;
+   }
+
+   return true;
+}
+
+bool ossimApplanixUtmModel::setupOptimizer(const ossimString& init_file)
+{
+   ossimKeywordlist kwl;
+   kwl.addFile(init_file.c_str());
+
+   return loadState(kwl);
+}
diff --git a/src/ossim/projection/ossimAzimEquDistProjection.cpp b/ossim/src/ossim/projection/ossimAzimEquDistProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimAzimEquDistProjection.cpp
rename to ossim/src/ossim/projection/ossimAzimEquDistProjection.cpp
diff --git a/src/ossim/projection/ossimBilinearProjection.cpp b/ossim/src/ossim/projection/ossimBilinearProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimBilinearProjection.cpp
rename to ossim/src/ossim/projection/ossimBilinearProjection.cpp
diff --git a/src/ossim/projection/ossimBngProjection.cpp b/ossim/src/ossim/projection/ossimBngProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimBngProjection.cpp
rename to ossim/src/ossim/projection/ossimBngProjection.cpp
diff --git a/src/ossim/projection/ossimBonneProjection.cpp b/ossim/src/ossim/projection/ossimBonneProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimBonneProjection.cpp
rename to ossim/src/ossim/projection/ossimBonneProjection.cpp
diff --git a/ossim/src/ossim/projection/ossimBuckeyeSensor.cpp b/ossim/src/ossim/projection/ossimBuckeyeSensor.cpp
new file mode 100644
index 0000000..32ca867
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimBuckeyeSensor.cpp
@@ -0,0 +1,721 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+//
+//*******************************************************************
+//  $Id: ossimBuckeyeSensor.cpp  $
+
+#include <ossim/projection/ossimBuckeyeSensor.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimLsrSpace.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimMatrix4x4.h>
+#include <ossim/elevation/ossimElevManager.h>
+#include <ossim/base/ossimCsvFile.h>
+static ossimTrace traceDebug("ossimBuckeyeSensor:debug");
+
+RTTI_DEF1(ossimBuckeyeSensor, "ossimBuckeyeSensor", ossimSensorModel);
+
+ossimBuckeyeSensor::ossimBuckeyeSensor()
+{
+	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::ossimBuckeyeSensor(): entering..." << std::endl;
+
+	theCompositeMatrix			= ossimMatrix4x4::createIdentity();
+	theCompositeMatrixInverse	= ossimMatrix4x4::createIdentity();
+	theRoll						   = 0.0;
+	thePitch					      = 0.0;
+	theHeading					   = 0.0;
+	theFocalLength				   = 0.0;
+	thePixelSize				   = ossimDpt(0.0, 0.0);
+	thePrincipalPoint			   = ossimDpt(0.0, 0.0);
+	theEcefPlatformPosition		= ossimGpt(0.0, 0.0, 0.0);
+	theAdjEcefPlatformPosition	= ossimGpt(0.0, 0.0, 0.0);
+	theLensDistortion			   = new ossimSmacCallibrationSystem();
+
+	theGSD.makeNan();
+	initAdjustableParameters();
+
+	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::ossimBuckeyeSensor(): returning..." << std::endl;
+}
+ossimBuckeyeSensor::ossimBuckeyeSensor(const ossimDrect& imageRect,
+	const ossimGpt& platformPosition,
+	double roll,
+	double pitch,
+	double heading,
+	const ossimDpt& /* principalPoint */, // in millimeters
+	double focalLength, // in millimeters
+	const ossimDpt& pixelSize) // in millimeters
+{
+	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::ossimBuckeyeSensor(imageRect,platformPosition,roll,pitch,heading,ossimDpt,focalLength,pixelSize): entering..." << std::endl;
+
+	theImageClipRect			    = imageRect;
+	theRefImgPt					    = theImageClipRect.midPoint();
+	theCompositeMatrix          = ossimMatrix4x4::createIdentity();
+	theCompositeMatrixInverse   = ossimMatrix4x4::createIdentity();
+	theRoll                     = roll;
+	thePitch                    = pitch;
+	theHeading                  = heading;
+	theFocalLength              = focalLength;
+	thePixelSize                = pixelSize;
+	theEcefPlatformPosition     = platformPosition;
+	theAdjEcefPlatformPosition  = platformPosition;
+	theLensDistortion           = new ossimSmacCallibrationSystem();
+	theGSD.makeNan();
+
+	initAdjustableParameters();
+	updateModel();
+
+	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::ossimBuckeyeSensor(imageRect,platformPosition,roll,pitch,heading,ossimDpt,focalLength,pixelSize): returning..." << std::endl;
+}
+
+ossimBuckeyeSensor::ossimBuckeyeSensor(const ossimBuckeyeSensor& src)
+	:ossimSensorModel(src)
+{
+	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::ossimBuckeyeSensor(src): entering..." << std::endl;
+
+	initAdjustableParameters();
+
+	if(src.theLensDistortion.valid())
+	{
+		theLensDistortion = new ossimSmacCallibrationSystem(*(src.theLensDistortion.get()));
+	}
+	else
+	{
+		theLensDistortion = new ossimSmacCallibrationSystem();
+	}
+	theGSD.makeNan();
+
+	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::ossimBuckeyeSensor(src): returning..." << std::endl;
+}
+
+ossimObject* ossimBuckeyeSensor::dup()const
+{
+	return new ossimBuckeyeSensor(*this);
+}
+
+void ossimBuckeyeSensor::imagingRay(const ossimDpt& image_point,
+	ossimEcefRay&   image_ray) const
+{
+	if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG) << "ossimBuckeyeSensor::imagingRay: ..... entered" << std::endl;
+
+	ossimDpt f1 ((image_point) - theRefImgPt);
+	f1.x *= thePixelSize.x;
+	f1.y *= -thePixelSize.y;
+	ossimDpt film (f1 - thePrincipalPoint);
+
+	if(traceDebug())
+	{
+		ossimNotify(ossimNotifyLevel_DEBUG) << "pixel size   = " << thePixelSize << std::endl;
+		ossimNotify(ossimNotifyLevel_DEBUG) << "principal pt = " << thePrincipalPoint << std::endl;
+		ossimNotify(ossimNotifyLevel_DEBUG) << "film pt      = " << film << std::endl;
+	}
+
+	if (theLensDistortion.valid())
+	{
+		ossimDpt filmOut;
+		theLensDistortion->undistort(film, filmOut);
+		film = filmOut;
+	}
+
+	ossimColumnVector3d cam_ray_dir (film.x,
+		film.y,
+		-theFocalLength);
+	ossimEcefVector     ecf_ray_dir (theCompositeMatrix*cam_ray_dir);
+	ecf_ray_dir = ecf_ray_dir*(1.0/ecf_ray_dir.magnitude());
+
+	image_ray.setOrigin(theAdjEcefPlatformPosition);
+	image_ray.setDirection(ecf_ray_dir);
+
+	if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG) << "ossimBuckeyeSensor::imagingRay: ..... leaving" << std::endl;
+}
+
+void ossimBuckeyeSensor::lineSampleToWorld(const ossimDpt& image_point,
+	ossimGpt&       gpt) const
+{
+	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::lineSampleToWorld:entering..." << std::endl;
+
+	if(image_point.hasNans())
+	{
+		gpt.makeNan();
+		return;
+	}
+
+	//***
+	// Determine imaging ray and invoke elevation source object's services to
+	// intersect ray with terrain model:
+	//***
+
+	ossimEcefRay ray;
+	imagingRay(image_point, ray);
+	ossimElevManager::instance()->intersectRay(ray, gpt);
+
+	if (traceDebug())
+	{
+		ossimNotify(ossimNotifyLevel_DEBUG) << "image_point = " << image_point << std::endl;
+		ossimNotify(ossimNotifyLevel_DEBUG) << "ray = " << ray << std::endl;
+		ossimNotify(ossimNotifyLevel_DEBUG) << "gpt = " << gpt << std::endl;
+	}
+
+	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::lineSampleToWorld: returning..." << std::endl;
+	return;
+}
+
+void ossimBuckeyeSensor::lineSampleHeightToWorld(const ossimDpt& image_point,
+	const double&   heightEllipsoid,
+	ossimGpt&       worldPoint) const
+{
+	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::lineSampleHeightToWorld: entering..." << std::endl;
+	if (!insideImage(image_point))
+	{
+		worldPoint.makeNan();
+	}
+	else
+	{
+		//***
+		// First establish imaging ray from image point:
+		//***
+		ossimEcefRay ray;
+		imagingRay(image_point, ray);
+		ossimEcefPoint Pecf (ray.intersectAboveEarthEllipsoid(heightEllipsoid));
+		worldPoint = ossimGpt(Pecf);
+	}
+	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::lineSampleHeightToWorld: returning..." << std::endl;
+}
+
+void ossimBuckeyeSensor::worldToLineSample(const ossimGpt& world_point,
+	ossimDpt&       image_point) const
+{
+	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::worldToLineSample: entering..." << std::endl;
+	if((theBoundGndPolygon.getNumberOfVertices() > 0)&&
+		(!theBoundGndPolygon.hasNans()))
+	{
+		if (!(theBoundGndPolygon.pointWithin(world_point)))
+		{
+			image_point.makeNan();
+			return;
+		}         
+	}
+	ossimEcefPoint g_ecf(world_point);
+	ossimEcefVector ecfRayDir(g_ecf - theAdjEcefPlatformPosition);
+	ossimColumnVector3d camRayDir (theCompositeMatrixInverse*ecfRayDir.data());
+
+
+	double scale = -theFocalLength/camRayDir[2];
+	ossimDpt film (scale*camRayDir[0], scale*camRayDir[1]);
+
+	if (theLensDistortion.valid())
+	{
+		ossimDpt filmOut;
+		theLensDistortion->distort(film, filmOut);
+		film = filmOut;
+	}
+
+	ossimDpt f1(film + thePrincipalPoint);
+	ossimDpt p1(f1.x/thePixelSize.x,
+		-f1.y/thePixelSize.y);
+
+	ossimDpt p0 (p1.x + theRefImgPt.x,
+		p1.y + theRefImgPt.y);
+
+	image_point = p0;
+	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::worldToLineSample: returning..." << std::endl;
+}
+
+void ossimBuckeyeSensor::updateModel()
+{
+	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::updateModel: entering..." << std::endl;
+	ossimGpt gpt;
+	ossimGpt wgs84Pt;
+	double metersPerDegree = wgs84Pt.metersPerDegree().x;
+	double degreePerMeter = 1.0/metersPerDegree;
+	double latShift = -computeParameterOffset(1)*degreePerMeter;
+	double lonShift = computeParameterOffset(0)*degreePerMeter;
+
+	gpt = theEcefPlatformPosition;
+	double height = gpt.height();
+	gpt.height(height + computeParameterOffset(5));
+	gpt.latd(gpt.latd() + latShift);
+	gpt.lond(gpt.lond() + lonShift);
+	theAdjEcefPlatformPosition = gpt;
+	ossimLsrSpace lsrSpace(theAdjEcefPlatformPosition, theHeading+computeParameterOffset(4));
+
+	// make a left handed rotational matrix;
+	ossimMatrix4x4 lsrMatrix(lsrSpace.lsrToEcefRotMatrix());
+	NEWMAT::Matrix orientation = (ossimMatrix4x4::createRotationXMatrix(thePitch+computeParameterOffset(3), OSSIM_LEFT_HANDED)*
+		ossimMatrix4x4::createRotationYMatrix(theRoll+computeParameterOffset(2), OSSIM_LEFT_HANDED));
+	theCompositeMatrix        = (lsrMatrix.getData()*orientation);
+	theCompositeMatrixInverse = theCompositeMatrix.i();
+
+	theBoundGndPolygon.resize(4);
+
+	theExtrapolateImageFlag = false;
+	theExtrapolateGroundFlag = false;
+
+   try
+   {
+      // Method throws ossimException.
+      computeGsd();
+   }
+   catch (const ossimException& e)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimBuckeyeSensor Constructor caught Exception:\n"
+         << e.what() << std::endl;
+   }
+
+	lineSampleToWorld(theImageClipRect.ul(),gpt);
+	theBoundGndPolygon[0] = gpt;
+	lineSampleToWorld(theImageClipRect.ur(),gpt);
+	theBoundGndPolygon[1] = gpt;
+	lineSampleToWorld(theImageClipRect.lr(),gpt);
+	theBoundGndPolygon[2] = gpt;
+	lineSampleToWorld(theImageClipRect.ll(),gpt);
+	theBoundGndPolygon[3] = gpt;
+	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::updateModel: returning..." << std::endl;
+}
+
+void ossimBuckeyeSensor::initAdjustableParameters()
+{
+	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::initAdjustableParameters: entering..." << std::endl;
+	resizeAdjustableParameterArray(6);
+
+	setAdjustableParameter(0, 0.0);
+	setParameterDescription(0, "x_offset");
+	setParameterUnit(0, "pixels");
+
+	setAdjustableParameter(1, 0.0);
+	setParameterDescription(1, "y_offset");
+	setParameterUnit(1, "pixels");
+
+	setAdjustableParameter(2, 0.0);
+	setParameterDescription(2, "roll");
+	setParameterUnit(2, "degrees");
+
+	setAdjustableParameter(3, 0.0);
+	setParameterDescription(3, "pitch");
+	setParameterUnit(3, "degrees");
+
+	setAdjustableParameter(4, 0.0);
+	setParameterDescription(4, "heading");
+	setParameterUnit(4, "degrees");
+
+	setAdjustableParameter(5, 0.0);
+	setParameterDescription(5, "altitude");
+	setParameterUnit(5, "meters");
+
+	// TODO: default to correct default values, or just leave it up to the input file, since we have different offsets for the B100, 182, and Metroliner, also need a z offset
+	setParameterSigma(0, 1.0);
+	setParameterSigma(1, 1.0);
+	setParameterSigma(2, 0);
+	setParameterSigma(3, 0);
+	setParameterSigma(4, 0);
+	setParameterSigma(5, 1000);
+	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::initAdjustableParameters: returning..." << std::endl;
+}
+
+void ossimBuckeyeSensor::setLensDistortion(ossimSmacCallibrationSystem* lensDistortion)
+{
+	theLensDistortion = lensDistortion;
+	updateModel();
+}
+
+bool ossimBuckeyeSensor::saveState(ossimKeywordlist& kwl,
+	const char* prefix) const
+{
+	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::saveState: entering..." << std::endl;
+	ossimSensorModel::saveState(kwl, prefix);
+
+	kwl.add(prefix, "type", "ossimBuckeyeSensor", true);
+
+	kwl.add(prefix, "roll", theRoll, true);
+	kwl.add(prefix, "pitch", thePitch, true);
+	kwl.add(prefix, "heading", theHeading, true);
+	kwl.add(prefix, "principal_point", "("+ossimString::toString(thePrincipalPoint.x) + "," + ossimString::toString(thePrincipalPoint.y)+")");
+	kwl.add(prefix, "pixel_size", "("+ossimString::toString(thePixelSize.x) + "," + ossimString::toString(thePixelSize.y)+")");
+	kwl.add(prefix, "focal_length", theFocalLength);
+	kwl.add(prefix, "ecef_platform_position",
+		ossimString::toString(theEcefPlatformPosition.x()) + " " +
+		ossimString::toString(theEcefPlatformPosition.y()) + " " +
+		ossimString::toString(theEcefPlatformPosition.z()));
+
+	if(theLensDistortion.valid())
+	{
+		ossimString lensPrefix = ossimString(prefix)+"distortion.";
+		theLensDistortion->saveState(kwl,
+			lensPrefix.c_str());
+	}
+	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::saveState: returning..." << std::endl;
+	return true;
+}
+
+bool ossimBuckeyeSensor::loadState(const ossimKeywordlist& kwl,
+	const char* prefix)
+{
+	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::loadState: entering..." << std::endl;
+
+	ossimSensorModel::loadState(kwl, prefix);
+
+   // If theRefImgPt remains unset by ossimSensorModel::loadState(), 
+   // set it to the image center.
+   if ( theRefImgPt == ossimDpt(0, 0) )
+   {
+      theRefImgPt = theImageClipRect.midPoint();
+   }
+
+	if(getNumberOfAdjustableParameters() < 1)
+	{
+		initAdjustableParameters();
+	}
+
+	ossimString framemeta_gsti = kwl.find(prefix, "framemeta_gsti");
+	ossimString framemeta = kwl.find(prefix,"framemeta");
+	ossimString frame_number = kwl.find(prefix, "frame_number");
+	ossimString pixel_size = kwl.find(prefix, "pixel_size");
+	ossimString principal_point = kwl.find(prefix, "principal_point");
+	ossimString focal_length = kwl.find(prefix, "focal_length");
+	ossimString smac_radial = kwl.find(prefix, "smac_radial");
+	ossimString smac_decent = kwl.find(prefix, "smac_decent");
+	ossimString roll;
+	ossimString pitch;
+	ossimString yaw;
+	ossimString platform_position;
+	ossimFilename file_to_load;
+
+	ossimString FRAME_STRING	= "Frame#";
+	ossimString ROLL_STRING		= "Roll(deg)";
+	ossimString PITCH_STRING	= "Pitch(deg)";
+	ossimString YAW_STRING		= "Yaw(deg)";
+	ossimString LAT_STRING		= "Lat(deg)";
+	ossimString LON_STRING		= "Lon(deg)";
+	ossimString HAE_STRING		= "HAE(m)";
+
+	// Deal with the fact that there are 3 different types of 'FrameMeta' file
+	if (framemeta_gsti.empty() && !framemeta.empty() && !frame_number.empty())
+	{
+		file_to_load.setFile(framemeta);
+		YAW_STRING	= "Azimuth(deg)";
+	}
+	else if (!framemeta_gsti.empty() && framemeta.empty() && !frame_number.empty())
+	{
+		file_to_load.setFile(framemeta_gsti);
+	}
+
+	if (file_to_load.exists() && !frame_number.empty())
+	{
+		ossimCsvFile csv(" \t"); // we will use tab or spaces as separator
+		if(csv.open(file_to_load))
+		{
+			if(csv.readHeader())
+			{
+				ossimCsvFile::StringListType heads = csv.fieldHeaderList();
+				// Try to see if you can find the first header item, if not, then you either have a file that doesn't work in this case, or it's uppercase
+				if (std::find(heads.begin(), heads.end(), FRAME_STRING) == heads.end())
+				{
+					FRAME_STRING	= FRAME_STRING.upcase();
+					ROLL_STRING		= ROLL_STRING.upcase();
+					PITCH_STRING	= PITCH_STRING.upcase();
+					YAW_STRING		= YAW_STRING.upcase();
+					LAT_STRING		= LAT_STRING.upcase();
+					LON_STRING		= LON_STRING.upcase();
+					HAE_STRING		= HAE_STRING.upcase();
+				}
+
+				ossimRefPtr<ossimCsvFile::Record> record;
+				bool foundFrameNumber = false;
+				while( ((record = csv.nextRecord()).valid()) && !foundFrameNumber)
+				{
+					if( (*record)[FRAME_STRING] == frame_number)
+					{
+						foundFrameNumber = true;
+						roll = (*record)[ROLL_STRING];
+						pitch = (*record)[PITCH_STRING];
+						yaw = (*record)[YAW_STRING];
+						platform_position = (*record)[LAT_STRING] + " " 
+							+ (*record)[LON_STRING]+ " "
+							+ (*record)[HAE_STRING] + " WGE";
+					}
+				}
+			}
+		}
+		csv.close();
+	}
+	else
+	{
+		roll = kwl.find(prefix, "roll"); 
+		pitch = kwl.find(prefix, "pitch"); 
+		yaw = kwl.find(prefix, "heading"); 
+		platform_position = kwl.find(prefix, "ecef_platform_position");
+	}
+
+	bool result = (!pixel_size.empty()&&
+		!principal_point.empty()&&
+		!focal_length.empty()&&
+		!platform_position.empty());
+
+	if(!focal_length.empty())
+	{
+		theFocalLength = focal_length.toDouble();
+	}
+	if(!pixel_size.empty())
+	{
+		thePixelSize.toPoint(pixel_size);
+	}
+	if(!roll.empty())
+	{
+		theRoll = roll.toDouble();
+	}
+	if(!pitch.empty())
+	{
+		thePitch = pitch.toDouble();
+	}
+	if(!yaw.empty())
+	{
+		theHeading   = yaw.toDouble();
+	}
+	if(!principal_point.empty())
+	{
+		thePrincipalPoint.toPoint(principal_point);
+	}
+	if(platform_position.contains("WGE"))
+	{
+		std::vector<ossimString> splitString;
+		ossimString tempString(platform_position);
+		tempString.split(splitString, ossimString(" "));
+		std::string datumString;
+		double lat=0.0, lon=0.0, h=0.0;
+		if(splitString.size() > 2)
+		{
+			lat = splitString[0].toDouble();
+			lon = splitString[1].toDouble();
+			h = splitString[2].toDouble();
+		}
+
+		theEcefPlatformPosition = ossimGpt(lat,lon,h);
+	} else {
+		std::vector<ossimString> splitString;
+		ossimString tempString(platform_position);
+		tempString.split(splitString, ossimString(" "));
+		std::string datumString;
+		double x=0.0, y=0.0, z=0.0;
+		if(splitString.size() > 2)
+		{
+			x = splitString[0].toDouble();
+			y = splitString[1].toDouble();
+			z = splitString[2].toDouble();
+		}
+		theEcefPlatformPosition = ossimEcefPoint(x, y, z);
+	}
+	theLensDistortion = 0;
+	if(!smac_radial.empty()&&
+		!smac_decent.empty())
+	{
+		std::vector<ossimString> radial;
+		std::vector<ossimString> decent;
+		smac_radial.split(radial, " ");
+		smac_decent.split(decent, " ");
+		if((radial.size() == 5)&&
+			(decent.size() == 4))
+		{
+			// Just for debugging really.. optimization will make this sleeker
+			double k0 = radial[0].toDouble();
+			double k1 = radial[1].toDouble();
+			double k2 = radial[2].toDouble();
+			double k3 = radial[3].toDouble();
+			double k4 = radial[4].toDouble();
+
+			double p0 = decent[0].toDouble();
+			double p1 = decent[1].toDouble();
+			double p2 = decent[2].toDouble();
+			double p3 = decent[3].toDouble();
+
+			theLensDistortion = new ossimSmacCallibrationSystem(k0,k1,k2,k3,k4,p0,p1,p2,p3);
+		}
+	}
+	theImageSize = ossimDpt(theImageClipRect.width(),
+		theImageClipRect.height());
+
+	updateModel();
+
+	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::loadState: returning..." << std::endl;
+	return result;
+}
+
+bool ossimBuckeyeSensor::setupOptimizer(const ossimString& init_file)
+{
+	ossimKeywordlist kwl;
+	kwl.addFile(init_file.c_str());
+
+	return loadState(kwl);
+}
+
+void ossimBuckeyeSensor::setPrincipalPoint(ossimDpt principalPoint)
+{
+	thePrincipalPoint = principalPoint;
+}
+
+void ossimBuckeyeSensor::setRollPitchHeading(double roll,
+	double pitch,
+	double heading)
+{
+	theRoll    = roll;
+	thePitch   = pitch;
+	theHeading = heading;
+
+	updateModel();
+}
+
+void ossimBuckeyeSensor::setPixelSize(const ossimDpt& pixelSize)
+{
+	thePixelSize = pixelSize;
+}
+
+void ossimBuckeyeSensor::setImageRect(const ossimDrect& rect)
+{
+	theImageClipRect = rect;
+	theRefImgPt = rect.midPoint();
+}
+
+void ossimBuckeyeSensor::setFocalLength(double focalLength)
+{
+	theFocalLength = focalLength;
+}
+
+void ossimBuckeyeSensor::setPlatformPosition(const ossimGpt& gpt)
+{
+	theRefGndPt             = gpt;
+	theEcefPlatformPosition = gpt;
+	updateModel();
+
+}
+
+bool ossimBuckeyeSensor::getImageGeometry( 
+    const ossimString& ref, const ossimString& value, 
+    ossimKeywordlist& geomKwl ) const
+{
+   if ( ref == ossimString( "parameters/fsmmgSensorImage/collectionTime" ) )
+   {
+      /* not currently used */
+   }
+   else
+   if ( ref == ossimString( "parameters/fsmmgSensorSession/sensorType" ) )
+   {
+      /* not currently used */
+   }
+   else
+   if ( ref == ossimString( "parameters/fsmmgSensorSession/focus/focalLength" ) )
+   {
+      geomKwl.add( "focal_length", value.toDouble() );
+   }
+   else
+   if ( ref == ossimString( "parameters/fsmmgSensorSession/pixelGridCharacteristics/numberOfRowsInImage" ) )
+   {
+      /* Add check to value already set from limits/GridEnvelope/low,high: should be equal */
+   }
+   else
+   if ( ref == ossimString( "parameters/fsmmgSensorSession/pixelGridCharacteristics/numberOfColumnsInImage" ) )
+   {
+      /* Add check to value already set from limits/GridEnvelope/low,high: should be equal */
+   }
+   else
+   if ( ref == ossimString( "parameters/fsmmgSensorSession/pixelGridCharacteristics/rowSpacing" ) )
+   {
+      ossimDpt point = ossimDpt();
+      ossimString pixel_size = geomKwl.find( "pixel_size" );
+      if ( !pixel_size.empty() )
+      {
+         point.toPoint( pixel_size );
+      }
+      point.y = value.toDouble();
+      geomKwl.add( "pixel_size", point.toString().c_str() );
+   }
+   else
+   if ( ref == ossimString( "parameters/fsmmgSensorSession/pixelGridCharacteristics/columnSpacing" ) )
+   {
+      ossimDpt point = ossimDpt();
+      ossimString pixel_size = geomKwl.find( "pixel_size" );
+      if ( !pixel_size.empty() )
+      {
+         point.toPoint( pixel_size );
+      }
+      point.x = value.toDouble();
+      geomKwl.add( "pixel_size", point.toString().c_str() );
+   }
+   else
+   if ( ref == ossimString( "parameters/fsmmgSensorImage/positionOrientationState/perspectiveCenter/geocentric-x-y-z" ) )
+   {
+      // first remove trailing spaces
+      size_t first_space = value.find_first_of( ' ', 0 );
+      ossimString truncatedValue = value.beforePos( first_space );
+      // change commas into spaces
+      ossimString platformPositionStr = truncatedValue.substitute( ossimString( "," ), ossimString( " " ), true );
+      // add to keywordlist
+      geomKwl.add( "ecef_platform_position", platformPositionStr );
+   }
+   else
+   if ( ref == ossimString( "parameters/fsmmgSensorImage/velocity/components/geocentric-x-y-z" ) )
+   {
+      /* not currently used */
+   }
+   else
+   if ( ref == ossimString( "parameters/fsmmgSensorSession/principalPointOffset/components/imagePlaneCRS-x0-y0" ) )
+   {
+      ossimDpt principal_point_offset;
+      size_t first_comma = value.find_first_of( ',', 0 );
+      ossimString offsetxStr = value.beforePos( first_comma );
+      ossimString offsetyStr = value.afterPos( first_comma );
+      principal_point_offset.x = offsetxStr.toDouble();
+      principal_point_offset.y = offsetyStr.toDouble();
+      geomKwl.add( "principal_point", principal_point_offset.toString().c_str() );
+   }
+   else
+   if ( ref == ossimString( "parameters/fsmmgSensorSession/radialDistortion/coefficients/k0-k1-k2-k3-k4" ) )
+   {
+      // first remove trailing spaces
+      size_t first_space = value.find_first_of( ' ', 0 );
+      ossimString truncatedValue = value.beforePos( first_space );
+      // change commas into spaces
+      ossimString radialDistortionStr = truncatedValue.substitute( ossimString( "," ), ossimString( " " ), true );
+      // add to keywordlist
+      geomKwl.add( "smac_radial", radialDistortionStr );
+   }
+   else
+   if ( ref == ossimString( "parameters/fsmmgSensorSession/decenteringDistortion/coefficients/p0-p1-p2-p3" ) )
+   {
+      // first remove trailing spaces
+      size_t first_space = value.find_first_of( ' ', 0 );
+      ossimString truncatedValue = value.beforePos( first_space );
+      // change commas into spaces
+      ossimString decenteringDistortionStr = truncatedValue.substitute( ossimString( "," ), ossimString( " " ), true );
+      // add to keywordlist
+      geomKwl.add( "smac_decent", decenteringDistortionStr );
+   }
+   else
+   if ( ref == ossimString( "parameters/fsmmgPlatformImage/positionOrientationState/externalOrientation/platformCS-roll-pitch-yaw" ) )
+   {
+      size_t pos_comma = value.find_first_of( ',', 0 );
+      ossimString rollStr = value.beforePos( pos_comma );
+      ossimString remainderStr0 = value.afterPos( pos_comma );
+
+      pos_comma = remainderStr0.find_first_of( ',', 0 );
+      ossimString pitchStr = remainderStr0.beforePos( pos_comma );
+      ossimString remainderStr1 = remainderStr0.afterPos( pos_comma );
+
+      pos_comma = remainderStr1.find_first_of( ',', 0 );
+      ossimString yawStr = remainderStr1.beforePos( pos_comma );
+
+      geomKwl.add( "roll",    rollStr.toDouble() );
+      geomKwl.add( "pitch",   pitchStr.toDouble() );
+      geomKwl.add( "heading", yawStr.toDouble() );
+   }
+   else // need to add in all supported parameters from the primary SensorML document
+   {
+      /* Add debug message */
+      return false;
+   }
+
+   return true;
+}
+
diff --git a/src/ossim/projection/ossimCadrgProjection.cpp b/ossim/src/ossim/projection/ossimCadrgProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimCadrgProjection.cpp
rename to ossim/src/ossim/projection/ossimCadrgProjection.cpp
diff --git a/src/ossim/projection/ossimCassiniProjection.cpp b/ossim/src/ossim/projection/ossimCassiniProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimCassiniProjection.cpp
rename to ossim/src/ossim/projection/ossimCassiniProjection.cpp
diff --git a/ossim/src/ossim/projection/ossimCoarseGridModel.cpp b/ossim/src/ossim/projection/ossimCoarseGridModel.cpp
new file mode 100644
index 0000000..1f37625
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimCoarseGridModel.cpp
@@ -0,0 +1,1049 @@
+//*****************************************************************************
+// FILE: ossimCoarseGridModel.cc
+//
+// License:  See LICENSE.txt file in the top level directory.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION:
+//   Contains implementation of class ossimCoarseGridModel. This is an
+//   implementation of an interpolation sensor model. 
+//
+//   IMPORTANT: The lat/lon grid is for ground points on the ellipsoid.
+//   The dLat/dHgt and dLon/dHgt partials therefore are used against
+//   elevations relative to the ellipsoid.
+//
+//*****************************************************************************
+//  $Id: ossimCoarseGridModel.cpp 22825 2014-07-07 23:14:52Z dburken $
+
+#include <ossim/projection/ossimCoarseGridModel.h>
+
+RTTI_DEF1(ossimCoarseGridModel, "ossimCoarseGridModel", ossimSensorModel);
+
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimDatumFactory.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/elevation/ossimElevManager.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/support_data/ossimSupportFilesList.h>
+#include <cstdio>
+#include <fstream>
+
+//***
+// Define Trace flags for use within this file:
+//***
+#include <ossim/base/ossimTrace.h>
+
+static ossimTrace traceExec  ("ossimCoarseGridModel:exec");
+static ossimTrace traceDebug ("ossimCoarseGridModel:debug");
+
+static const char* MODEL_TYPE = "ossimCoarseGridModel";
+static const char* GRID_FILE_NAME_KW = "grid_file_name";
+const ossimFilename DEFAULT_GEOM_FILE_EXT ("geom");
+const ossimFilename DEFAULT_GRID_FILE_EXT ("ocg");
+double ossimCoarseGridModel::theInterpolationError = .1;
+ossim_int32 ossimCoarseGridModel::theMinGridSpacing     = 100;
+
+//*****************************************************************************
+//  DEFAULT CONSTRUCTOR: ossimCoarseGridModel()
+//  
+//*****************************************************************************
+ossimCoarseGridModel::ossimCoarseGridModel()
+   :
+      ossimSensorModel(),
+      theDlatDparamGrid (0),
+      theDlonDparamGrid (0),
+      theHeightEnabledFlag(true)
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
+      << "DEBUG ossimCoarseGridModel::ossimCoarseGridModel: entering..."
+      << std::endl;
+
+   theLatGrid.setDomainType(ossimDblGrid::SAWTOOTH_90);
+   theLonGrid.setDomainType(ossimDblGrid::WRAP_180);
+   theLatGrid.enableExtrapolation();
+   theLonGrid.enableExtrapolation();
+
+   setErrorStatus();
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
+      << "DEBUG ossimCoarseGridModel::ossimCoarseGridModel: returning..."
+      << std::endl;
+}
+
+//*****************************************************************************
+//  COPY CONSTRUCTOR: ossimCoarseGridModel(ossimCoarseGridModel)
+//  
+//*****************************************************************************
+ossimCoarseGridModel::ossimCoarseGridModel(const ossimCoarseGridModel& model)
+   :
+      ossimSensorModel  (model),
+      theGridFilename   (model.theGridFilename),
+      theLatGrid        (model.theLatGrid),
+      theLonGrid        (model.theLonGrid),
+      theDlatDhGrid     (model.theDlatDhGrid),
+      theDlonDhGrid     (model.theDlonDhGrid),
+      theDlatDparamGrid (0),
+      theDlonDparamGrid (0),
+      theHeightEnabledFlag(true)
+{
+   if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG)
+      << "DEBUG ossimCoarseGridModel::ossimCoarseGridModel(model): entering..."
+      << std::endl;
+
+   int numberOfParams = getNumberOfAdjustableParameters();
+   if(numberOfParams)
+   {
+      //***
+      // Allocate adjustable parameter partials grids then assign:
+      //***
+      theDlatDparamGrid = new ossimDblGrid [numberOfParams];
+      theDlonDparamGrid = new ossimDblGrid [numberOfParams];
+      
+      for (int i=0; i<numberOfParams; i++)
+      {
+         theDlatDparamGrid[i] = model.theDlatDparamGrid[i];
+         theDlonDparamGrid[i] = model.theDlonDparamGrid[i];
+      }
+   }
+   
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
+      << "DEBUG ossimCoarseGridModel::ossimCoarseGridModel: returning..."
+      << std::endl;
+}
+
+//*****************************************************************************
+//  CONSTRUCTOR: ossimCoarseGridModel(filename)
+//  
+//  Constructs model from geometry file
+//  
+//*****************************************************************************
+ossimCoarseGridModel::ossimCoarseGridModel(const ossimFilename& geom_file)
+   :
+      ossimSensorModel(),
+      theDlatDparamGrid (0),
+      theDlonDparamGrid (0),
+      theHeightEnabledFlag(true)
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::ossimCoarseGridModel(geom_file): entering..." << std::endl;
+   
+   theLatGrid.setDomainType(ossimDblGrid::SAWTOOTH_90);
+   theLonGrid.setDomainType(ossimDblGrid::WRAP_180);
+   theLatGrid.enableExtrapolation();
+   theLonGrid.enableExtrapolation();
+
+   ossimKeywordlist kwl;
+   if(geom_file.exists()&&kwl.addFile(geom_file))
+   {
+      loadState(kwl);
+   }
+   else
+   {
+      ++theErrorStatus;
+   }
+
+   if (traceExec())   ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::ossimCoarseGridModel(geom_file): returning..." << std::endl;
+   return;
+}
+
+//*****************************************************************************
+//  CONSTRUCTOR: ossimCoarseGridModel(kwl)
+//  
+//  Constructs model from keywordlist geometry file
+//  
+//*****************************************************************************
+ossimCoarseGridModel::ossimCoarseGridModel(const ossimKeywordlist& geom_kwl)
+   :
+      ossimSensorModel(),
+      theDlatDparamGrid (0),
+      theDlonDparamGrid (0),
+      theHeightEnabledFlag(true)
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::ossimCoarseGridModel(geom_kwl): entering..." << std::endl;
+
+   theLatGrid.setDomainType(ossimDblGrid::SAWTOOTH_90);
+   theLonGrid.setDomainType(ossimDblGrid::WRAP_180);
+   theLatGrid.enableExtrapolation();
+   theLonGrid.enableExtrapolation();
+
+  // Parse keywordlist for geometry:
+   loadState(geom_kwl);
+}
+
+//*************************************************************************************************
+//! Assigns the grid data given a projection (typically a rigorous sensor model)
+//*************************************************************************************************
+void ossimCoarseGridModel::buildGrid(const ossimDrect& imageBounds,
+                                     ossimProjection* proj,
+                                     double heightDelta,
+                                     bool enableHeightFlag,
+                                     bool makeAdjustableFlag)
+{
+   ossimRefPtr<ossimImageGeometry> geom = new ossimImageGeometry();
+   geom->setProjection(proj);
+   buildGrid(imageBounds, geom.get(), heightDelta, enableHeightFlag, makeAdjustableFlag);
+}  
+
+
+//*************************************************************************************************
+//! Assigns the grid data given a geometry
+//*************************************************************************************************
+void ossimCoarseGridModel::buildGrid(const ossimDrect& imageBounds,
+                                     ossimImageGeometry* geom,
+                                     double heightDelta,
+                                     bool enableHeightFlag,
+                                     bool makeAdjustableFlag)
+{
+   theHeightEnabledFlag =  enableHeightFlag;
+   
+   if (!geom->getProjection() || imageBounds.hasNans())
+      return;
+
+   // don't let it get any smaller than 100, 100 pixels
+   // on the input projector
+   //
+   // may want this to be adjusted by outside
+   //
+   const ossimDatum* targetDatum = ossimDatumFactory::instance()->wgs84();
+   ossimIpt gridSize(2,2);
+   ossimDpt gridOrigin(0,0);
+   ossimGpt gpt;
+   ossimGpt gpt2;
+   ossimGpt bilinearGpt;
+   resizeAdjustableParameterArray(0);
+   double normSplit = 1.0;
+   ossimIpt imageSize = ossimIpt(imageBounds.width(), imageBounds.height());
+   double error = 0.0;
+
+   ossimIpt imageOrigin = imageBounds.ul();
+   ossimDpt spacing ((double)(imageBounds.width()-1)/(gridSize.x-1),
+      (double)(imageBounds.height()-1)/(gridSize.y-1));
+
+   if(theDlatDparamGrid)
+   {
+      delete [] theDlatDparamGrid;
+      theDlatDparamGrid = NULL;
+   }
+   if(theDlonDparamGrid)
+   {
+      delete [] theDlonDparamGrid;
+      theDlonDparamGrid = NULL;
+   }
+
+   geom->localToWorld(imageBounds.midPoint(), gpt);
+
+   do
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << "Checking grid size " << gridSize << std::endl;
+      }
+
+      spacing = ossimDpt((double)(imageBounds.width()-1)/(gridSize.x-1),
+         (double)(imageBounds.height()-1)/(gridSize.y-1));
+
+      theLatGrid.setNullValue(ossim::nan());
+      theLonGrid.setNullValue(ossim::nan());
+      theDlatDhGrid.setNullValue(0.0);
+      theDlonDhGrid.setNullValue(0.0);
+      theLatGrid.setDomainType(ossimDblGrid::SAWTOOTH_90);
+      theLonGrid.setDomainType(ossimDblGrid::WRAP_180);
+      theLatGrid.initialize(gridSize, gridOrigin, spacing);
+      theLonGrid.initialize(gridSize, gridOrigin, spacing);
+      theDlatDhGrid.initialize(gridSize, gridOrigin, spacing);
+      theDlonDhGrid.initialize(gridSize, gridOrigin, spacing);
+      ossim_int32 x, y;
+
+      for(y = 0; y < gridSize.y; ++y)
+      {
+         for(x = 0; x < gridSize.x; ++x)
+         {
+            ossimDpt norm((double)x/(double)(gridSize.x-1),
+               (double)y/(double)(gridSize.y-1));
+
+            ossimDpt pt(imageOrigin.x + norm.x*(imageSize.x-1),
+               imageOrigin.y + norm.y*(imageSize.y-1));
+
+            geom->localToWorld(pt, gpt);
+            double h = gpt.height();
+            if(ossim::isnan(h))
+            {
+               h += heightDelta;
+            }
+            ossimDpt fullPt;
+            geom->rnToFull(pt, 0, fullPt);
+            geom->getProjection()->lineSampleHeightToWorld(fullPt, h, gpt2);
+            gpt.changeDatum(targetDatum);
+            gpt2.changeDatum(targetDatum);
+
+            theLatGrid.setNode(x, y, gpt.latd());
+            theLonGrid.setNode(x, y, gpt.lond());
+
+            theDlatDhGrid.setNode(x, y, (gpt2.latd() - gpt.latd())/heightDelta);
+            theDlonDhGrid.setNode(x, y, (gpt2.lond() - gpt.lond())/heightDelta);
+         }
+      }
+      ossim_int32 upperY = 2*gridSize.y;
+      ossim_int32 upperX = 2*gridSize.x;
+      error = 0.0;
+
+      // Set all base-class data members needed for subsequent calls to projection code:
+      initializeModelParams(imageBounds);
+
+      for(y = 0; ((y < upperY)&&(error < theInterpolationError)); ++y)
+      {
+         for(x = 0; ((x < upperX)&&(error<theInterpolationError)); ++x)
+         {
+            ossimDpt norm((double)x/(double)(upperX-1),
+               (double)y/(double)(upperY-1));
+
+            ossimDpt imagePoint(imageOrigin.x + norm.x*(imageSize.x-1),
+               imageOrigin.y + norm.y*(imageSize.y-1));
+            ossimDpt testIpt;
+
+            geom->localToWorld(imagePoint, gpt);
+            worldToLineSample(gpt, testIpt);
+            error = (testIpt-imagePoint).length();
+         }
+      }
+
+      gridSize.x *= 2;
+      gridSize.y *= 2;
+      normSplit *= .5;
+   } while((error > theInterpolationError) &&
+           ((imageSize.x*normSplit) > theMinGridSpacing) &&
+           ((imageSize.y*normSplit) > theMinGridSpacing));
+
+   gridSize = theLatGrid.size();
+
+   ossimAdjustableParameterInterface* adjustableParameters = 
+      PTR_CAST(ossimAdjustableParameterInterface, geom->getProjection());
+   removeAllAdjustments();
+   if(adjustableParameters&&makeAdjustableFlag)
+   {
+      if(adjustableParameters->getNumberOfAdjustableParameters() > 0)
+      {
+         newAdjustment(adjustableParameters->getNumberOfAdjustableParameters());
+
+         int numberOfParams = getNumberOfAdjustableParameters();
+         if(numberOfParams)
+         {
+            //***
+            // Allocate adjustable parameter partials grids then assign:
+            //***
+            theDlatDparamGrid = new ossimDblGrid [numberOfParams];
+            theDlonDparamGrid = new ossimDblGrid [numberOfParams];
+            for(int paramIdx = 0; paramIdx < numberOfParams; ++ paramIdx)
+            {
+               theDlonDparamGrid[paramIdx].setNullValue(0.0);
+               theDlatDparamGrid[paramIdx].setNullValue(0.0);
+               theDlatDparamGrid[paramIdx].initialize(gridSize, gridOrigin, spacing);
+               theDlonDparamGrid[paramIdx].initialize(gridSize, gridOrigin, spacing);
+               setAdjustableParameter(paramIdx, 0.0);
+               setParameterSigma(paramIdx, adjustableParameters->getParameterSigma(paramIdx));
+               setParameterUnit(paramIdx, adjustableParameters->getParameterUnit(paramIdx));
+               setParameterCenter(paramIdx, 0.0);
+               setParameterDescription(paramIdx,
+                  adjustableParameters->getParameterDescription(paramIdx));
+
+               double oldParameter = adjustableParameters->getAdjustableParameter(paramIdx);
+               adjustableParameters->setAdjustableParameter(paramIdx, 1.0, true);
+               double adjust = adjustableParameters->computeParameterOffset(paramIdx);
+               double deltaLat = 0;
+               double deltaLon = 0;
+               if(adjust != 0.0)
+               {
+                  for(int y = 0; y < gridSize.y; ++y)
+                  {
+                     for(int x = 0; x < gridSize.x; ++x)
+                     {
+                        ossimDpt norm((double)x/(double)(gridSize.x-1),
+                           (double)y/(double)(gridSize.y-1));
+
+                        ossimDpt pt(imageOrigin.x + norm.x*(imageSize.x-1),
+                           imageOrigin.y + norm.y*(imageSize.y-1));
+                        geom->localToWorld(pt, gpt);
+
+                        gpt.changeDatum(targetDatum);
+                        gpt2.latd(theLatGrid(pt));
+                        gpt2.lond(theLonGrid(pt));
+                        deltaLat = gpt.latd()-gpt2.latd();
+                        deltaLon = gpt.lond()-gpt2.lond();
+
+                        theDlatDparamGrid[paramIdx].setNode(x, y, deltaLat/adjust);
+                        theDlonDparamGrid[paramIdx].setNode(x, y, deltaLon/adjust);
+                     }
+                  }
+
+                  // The partials grids for this parameter are initialized, now initialize the
+                  // grid's extrapolator:
+                  theDlatDparamGrid[paramIdx].enableExtrapolation();
+                  theDlonDparamGrid[paramIdx].enableExtrapolation();
+               }
+               adjustableParameters->setAdjustableParameter(paramIdx, oldParameter, true);
+            }
+         }
+      }
+   }
+   getAdjustment(theInitialAdjustment);
+
+
+}
+
+void ossimCoarseGridModel::setInterpolationError(double error)
+{
+   theInterpolationError = error;
+}
+
+void ossimCoarseGridModel::setMinGridSpacing(ossim_int32 minSpacing)
+{
+   theMinGridSpacing = minSpacing;
+}
+
+//*************************************************************************************************
+//! Initializes base class data members after grids have been assigned.
+//! It is assumed that theImageSize and the origin image point were already set.
+//*************************************************************************************************
+void ossimCoarseGridModel::initializeModelParams(ossimIrect imageBounds)
+{
+   // NOTE: it is assumed that the grid size and spacing is the same for ALL grids:
+   ossimIpt gridSize (theLatGrid.size());
+   ossimDpt spacing  (theLatGrid.spacing());
+   ossimDpt v[4];
+   v[0].lat = theLatGrid.getNode(0,0);
+   v[0].lon = theLonGrid.getNode(0,0);
+   v[1].lat = theLatGrid.getNode(gridSize.x-1, 0);
+   v[1].lon = theLonGrid.getNode(gridSize.x-1, 0);
+   v[2].lat = theLatGrid.getNode(gridSize.x-1, gridSize.y-1);
+   v[2].lon = theLonGrid.getNode(gridSize.x-1, gridSize.y-1);
+   v[3].lat = theLatGrid.getNode(0, gridSize.y-1);
+   v[3].lon = theLonGrid.getNode(0, gridSize.y-1);
+
+   // Guaranty longitude values are -180 to 180
+   for (int i=0; i<4; i++)
+   {
+      if (v[i].lon > 180.0)
+         v[i].lon -= 360.0;
+   }
+
+   theBoundGndPolygon = ossimPolygon(4, v);
+   
+   theImageSize  = ossimDpt(imageBounds.width(), imageBounds.height());
+   theRefImgPt   = imageBounds.midPoint();
+   theRefGndPt.lat = theLatGrid(theRefImgPt);
+   theRefGndPt.lon = theLonGrid(theRefImgPt);
+   
+   ossimDpt ref_ip_dx (theRefImgPt.x+1.0, theRefImgPt.y    );
+   ossimDpt ref_ip_dy (theRefImgPt.x    , theRefImgPt.y+1.0);
+   ossimGpt ref_gp_dx (theLatGrid(ref_ip_dx), theLonGrid(ref_ip_dx));
+   ossimGpt ref_gp_dy (theLatGrid(ref_ip_dy), theLonGrid(ref_ip_dy));
+
+   theGSD.x   = theRefGndPt.distanceTo(ref_gp_dx);
+   theGSD.y   = theRefGndPt.distanceTo(ref_gp_dy);
+
+   theMeanGSD = (theGSD.line + theGSD.samp)/2.0;
+   theImageClipRect  = imageBounds;
+   theSubImageOffset = imageBounds.ul();
+}
+
+//*****************************************************************************
+//  DESTRUCTOR: ~ossimCoarseGridModel()
+//  
+//*****************************************************************************
+ossimCoarseGridModel::~ossimCoarseGridModel()
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
+      << "DEBUG ossimCoarseGridModel::~ossimCoarseGridModel: entering..."
+      << std::endl;
+
+   if(theDlatDparamGrid&&theDlonDparamGrid)
+   {
+      //***
+      // Deallocate memory:
+      //***
+      delete [] theDlatDparamGrid;
+      delete [] theDlonDparamGrid;
+      theDlatDparamGrid = NULL;
+      theDlonDparamGrid = NULL;
+   }
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
+      << "DEBUG ossimCoarseGridModel::~ossimCoarseGridModel: returning..."
+      << std::endl;
+}
+
+//*************************************************************************************************
+// METHOD
+//*************************************************************************************************
+void ossimCoarseGridModel::lineSampleToWorld(const ossimDpt& image_point,
+                                             ossimGpt&       gpt) const
+{
+   if(!theHeightEnabledFlag)
+   {
+      //
+      // Extrapolate if image point is outside image:
+      //
+      if (!insideImage(image_point))
+      {
+         gpt = extrapolate(image_point);
+         return;
+      }
+      
+      lineSampleHeightToWorld(image_point, 0.0, gpt);
+   }
+   else
+   {
+      ossimSensorModel::lineSampleToWorld(image_point, gpt);
+   }
+}
+
+//*****************************************************************************
+//  METHOD: ossimCoarseGridModel::lineSampleHeightToWorld()
+//  
+//  Establishes the ground point corresponding to the input image_point and
+//  specified elevation above MSL
+//
+//*****************************************************************************
+void
+ossimCoarseGridModel::lineSampleHeightToWorld(const ossimDpt& lineSampPt,
+                                              const double&   arg_hgt_above_ellipsoid,
+                                              ossimGpt&       worldPt) const
+{
+   if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::lineSampleHeightToWorld: entering..." << std::endl;
+   
+   if(theLatGrid.size().x < 1 ||
+      theLatGrid.size().y < 1)
+   {
+      worldPt.makeNan();
+      return;
+   }
+
+   double height = (ossim::isnan(arg_hgt_above_ellipsoid)) ? 0.0 : arg_hgt_above_ellipsoid;
+
+   // Note that there is no check for image point outside of valid image rect because this model
+   // uses the extrapolation inherent to the ossimDblGrid.
+
+   // The image point may correspond to an offset sub-image. Need to convert
+   // to full image space before anything:
+   ossimDpt ip = lineSampPt + theSubImageOffset;
+   
+   // Establish the interpolated values from the grids:
+   worldPt.lat = theLatGrid(ip);
+   worldPt.lon = theLonGrid(ip);
+   worldPt.hgt = height;
+
+   if(theHeightEnabledFlag)
+   {
+      // Adjust horizontally due to elevation:
+      worldPt.lat += theDlatDhGrid(ip)*height;
+      worldPt.lon += theDlonDhGrid(ip)*height;
+   }
+   int numberOfParams = getNumberOfAdjustableParameters();
+ 
+   // Now add increments due to adjustable parameter deltas:
+   for (int p=0; p<numberOfParams; p++)
+   {
+       worldPt.lat += (theDlatDparamGrid[p](ip) * computeParameterOffset(p));
+       worldPt.lon += (theDlonDparamGrid[p](ip) * computeParameterOffset(p));
+   }
+
+   worldPt.limitLonTo180();
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::lineSampleHeightToWorld: returning..." << std::endl;
+}
+
+//*************************************************************************************************
+// METHOD
+//*************************************************************************************************
+void ossimCoarseGridModel::initAdjustableParameters()
+{
+   if(getNumberOfAdjustableParameters() < 1)
+   {
+      addAdjustment(theInitialAdjustment, true);
+   }
+   else
+   {
+      setAdjustment(theInitialAdjustment, true);
+   }
+}
+
+//*************************************************************************************************
+// METHOD
+//*************************************************************************************************
+void ossimCoarseGridModel::imagingRay(const ossimDpt& image_point,
+                                      ossimEcefRay&   image_ray) const
+{
+   ossimSensorModel::imagingRay(image_point, image_ray);
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimCoarseGridModel::print()
+//  
+//  Formatted dump of data members.
+//  
+//*****************************************************************************
+std::ostream& ossimCoarseGridModel::print(std::ostream& out) const 
+{
+   out << "\nDump of ossimCoarseGridModel object at: " << this << "\n"
+       << "\n           Grid File Name: " << theGridFilename 
+       << "\n                 Image ID: " << theImageID 
+       << "\n                   Sensor: " << theSensorID
+       << "\n  Image Size (rows, cols): " << theImageSize
+       << "\n      Ref Pt (samp, line): " << theRefImgPt 
+       << "\n   Ref Pt (lat, lon, hgt): " << theRefGndPt 
+       << "\n           GSD (row, col): " << theGSD 
+       << "\n  Bounding Ground Polygon: " << theBoundGndPolygon << endl;
+//      << "\n         Number of Params: " << theNumParams << "\n"<<endl;
+   
+   char buf[256];
+   ossimIpt size (theLatGrid.size());
+   ossimDpt spacing (theLatGrid.spacing());
+   int line, samp;
+   ossimIpt node;
+   
+   out << "[ line,  samp]        lat        lon         dLat/dH      dLon/dH\n"
+       << "-------------------------------------------------------------------"
+       <<endl;
+
+   for (node.y=0; node.y<size.y; node.y++)
+   {
+      line = (int) (node.y*spacing.y);
+      
+      for (node.x=0; node.x<size.x; node.x++)
+      {
+         samp = (int) (node.x*spacing.x);
+         
+         sprintf(buf, "[%5d, %5d]    %+9.5f  %+10.5f    %+11.4e  %+11.4e",
+                  line, samp,
+                  theLatGrid.getNode(node),
+                  theLonGrid.getNode(node),
+                  theDlatDhGrid.getNode(node),
+                  theDlonDhGrid.getNode(node));
+         out << buf << endl;
+      }
+      out <<"-----------------------------------------------------------------"
+          <<endl;
+   }
+
+   out << "\n\nDump of lat/lon Partials w.r.t. Adjustable Parameters:"<<endl;
+   out << "\nEnd Dump of ossimCoarseGridModel.\n" <<  endl;
+   return out;
+}
+
+//*****************************************************************************
+//  METHOD: ossimCoarseGridModel::saveState()
+//  
+//  Saves the model state to the KWL. This KWL also serves as a geometry file.
+//
+//  Returns true if successful.
+//  
+//*****************************************************************************
+bool ossimCoarseGridModel::saveState(ossimKeywordlist& kwl,
+                                     const char* prefix) const
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::saveState: entering..." << std::endl;
+
+   kwl.add(prefix, ossimKeywordNames::TYPE_KW, "ossimCoarseGridModel");
+
+   //---
+   // Save just the file part so that the geometry stuff is relocatable.
+   // Code was added to ossimProjectionFactoryBase::createProjectionFromGeometryFile
+   // to handle this.
+   //---
+   kwl.add( prefix, GRID_FILE_NAME_KW, theGridFilename.file() );
+   
+   kwl.add(prefix, "height_enabled_flag", theHeightEnabledFlag, true);
+   ossimSensorModel::saveState(kwl, prefix);
+   ossimString initAdjPrefix = ossimString(prefix) + "init_adjustment.";
+   theInitialAdjustment.saveState(kwl, initAdjPrefix);
+   
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::saveState: returning..." << std::endl;
+
+   return true;
+}
+
+//*****************************************************************************
+//  METHOD: ossimCoarseGridModel::loadState()
+//  
+//  Restores the model's state from the KWL. This KWL also serves as a
+//  geometry file.
+//
+//  Returns true if successful.
+//  
+//*****************************************************************************
+bool ossimCoarseGridModel::loadState(const ossimKeywordlist& kwl,
+                                     const char* prefix) 
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::loadState: entering..." << std::endl;
+
+   clearErrorStatus();
+   const char* value;
+   bool success;
+   
+   //***
+   // Assure this keywordlist contains correct type info:
+   //***
+   value = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
+   if (!value || (strcmp(value, "ossimCoarseGridModel")))
+   {
+      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::loadState:  returning..." << std::endl;
+      theErrorStatus++;
+      return false;
+   }
+   value = kwl.find(prefix, "height_enabled_flag");
+   if(value)
+   {
+      theHeightEnabledFlag = ossimString(value).toBool();
+   }
+
+   //***
+   // Pass on to the base-class for parsing first:
+   //***
+   success = ossimSensorModel::loadState(kwl, prefix);
+   if (!success)
+   {
+      theErrorStatus++;
+      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::loadState: returning with error..." << std::endl;
+      return false;
+   }
+
+   //***
+   // Look for geom filename or explicit grid filename to establish path to grid:
+   //***
+   theGridFilename = kwl.find(prefix, GRID_FILE_NAME_KW);
+
+   if (!theGridFilename.isReadable())
+   {
+      //---
+      // This is set in ossimProjectionFactoryBase::createProjectionFromGeometryFile
+      // so we can derive the dot.ocg from it.
+      //---
+      ossimFilename alt_path_to_grid = kwl.find("kwl_source");
+      theGridFilename = alt_path_to_grid.setExtension(DEFAULT_GRID_FILE_EXT);
+      
+      if (!theGridFilename.isReadable())
+      {
+         ossimFilename alt_path_to_grid = kwl.find(prefix, ossimKeywordNames::GEOM_FILE_KW);
+         theGridFilename = alt_path_to_grid.setExtension(DEFAULT_GRID_FILE_EXT);
+      }
+   }
+   
+   if (!theGridFilename.isReadable())
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "ossimCoarseGridModel::loadState() -- Error "
+         "encountered opening coarse grid file at "<< "<" <<theGridFilename << ">." << std::endl;
+      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::loadState: returning with error..." << std::endl;
+      theErrorStatus++;
+      return false;
+   }
+
+   // Load the coarse grid file specified in KWL. This method resets the
+   // theErrorStatus to OSSIM_OK if successful:
+   if (!loadCoarseGrid(theGridFilename))
+   {
+      theErrorStatus++;
+      return false;
+   }
+
+   // Add the coarse grid filename to list of support files being referenced for logging purposes:
+   ossimSupportFilesList::instance()->add(theGridFilename.expand());
+
+   ossimString initAdjPrefix = ossimString(prefix) + "init_adjustment.";
+   theInitialAdjustment.loadState(kwl, initAdjPrefix.c_str());
+
+   if((ossim::isnan(theRefGndPt.hgt)) ||
+      (theRefGndPt.hgt == 0))
+   {
+      theRefGndPt.hgt = ossimElevManager::instance()->getHeightAboveEllipsoid(theRefGndPt);
+      if(theRefGndPt.hgt < 0)
+      {
+         theRefGndPt.hgt = fabs(theRefGndPt.hgt);
+      }
+   }
+      
+   if(theInitialAdjustment.getNumberOfAdjustableParameters() < 1)
+   {
+      getAdjustment(theInitialAdjustment);
+   }
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::loadState: returning..." << std::endl;
+   if (theErrorStatus)
+      return false;
+   
+   return true;
+}
+
+//*****************************************************************************
+//  METHOD: ossimCoarseGridModel::saveCoarseGrid(cgFileName)
+//  
+//  Saves the coarse grid to disk file.
+//
+//  Returns true if successful.
+//  
+//*****************************************************************************
+bool ossimCoarseGridModel::saveCoarseGrid(const ossimFilename& fileName)const
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::saveCoarseGrid: entering..." << std::endl;
+
+   // Create and open grid file as stream:
+   theGridFilename = fileName.expand();
+   theGridFilename.setExtension(DEFAULT_GRID_FILE_EXT);
+   ofstream outstream (theGridFilename.chars());
+   if (!outstream.is_open())
+   {
+      theErrorStatus++;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::saveCoarseGrid: Error "
+         "encountered creating coarse grid file <" << theGridFilename<< ">. Check that directory "
+         "exists and is writable." << std::endl;
+      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::saveCoarseGrid: returning with error..." << std::endl;
+      return false;
+   }
+
+   // Let each grid object write itself to the output file:
+   theLatGrid.save(outstream, "Latitude Grid");
+   theLonGrid.save(outstream, "Longitude Grid");
+   theDlatDhGrid.save(outstream, "dLat/dH Grid");
+   theDlonDhGrid.save(outstream, "dLon_dH Grid");
+
+   ossimString descr;
+   int numberOfParams = getNumberOfAdjustableParameters();
+   for (int p=0; p<numberOfParams; p++)
+   {
+      descr = getParameterDescription(p) + " dLat_dParam Grid";
+      theDlatDparamGrid[p].save(outstream, descr.chars());
+      descr = getParameterDescription(p) + " dLon_dParam Grid";
+      theDlonDparamGrid[p].save(outstream, descr.chars());
+   }
+   
+   // Since the geom file is needed in the same path as the grid file, take this opportunity to 
+   // write the geom file out as well:
+   ossimFilename geom_file (theGridFilename);
+   geom_file.setExtension(DEFAULT_GEOM_FILE_EXT);
+   ossimKeywordlist kwl;
+   saveState(kwl);
+   kwl.write(geom_file);
+
+   // Add to the list of support files referenced (though technically it has not yet been 
+   // referenced, but will be next time this image is opened):
+   ossimSupportFilesList::instance()->add(geom_file);
+   ossimSupportFilesList::instance()->add(theGridFilename);
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::saveCoarseGrid: returning..." << std::endl;
+   return true;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimCoarseGridModel::loadCoarseGrid(cgFileName)
+//  
+//  Loads the coarse grid from disk file.
+//
+//  Returns true if successful.
+//  
+//*****************************************************************************
+bool ossimCoarseGridModel::loadCoarseGrid(const ossimFilename& cgFileName)
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::loadCoarseGrid: entering..." << std::endl;
+
+   ossimDpt v[4];
+   ossimIpt grid_size;
+
+   //***
+   // Open existing grid file:
+   //***
+   ifstream instream (cgFileName.chars());
+   if (!instream.is_open())
+   {
+      theErrorStatus++;
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimCoarseGridModel::loadCoarseGrid: Error encountered opening coarse grid file <" << cgFileName
+         << ">. Check that the file exists and is readable." << std::endl;
+      }
+      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "CEBUG ossimCoarseGridModel::loadCoarseGrid: returning with error..." << std::endl;
+      return false;
+   }
+   theGridFilename = cgFileName;
+   if(theDlatDparamGrid)
+     {
+       delete [] theDlatDparamGrid;
+       theDlatDparamGrid = NULL;
+     }
+   if(theDlonDparamGrid)
+     {
+       delete [] theDlonDparamGrid;
+       theDlonDparamGrid = NULL;
+     }
+   //
+   // Reallocate memory:
+   //
+   int numberOfParams = getNumberOfAdjustableParameters();
+   if(numberOfParams)
+   {
+      theDlatDparamGrid = new ossimDblGrid [numberOfParams];
+      theDlonDparamGrid = new ossimDblGrid [numberOfParams];
+   }
+   //***
+   // Let each grid object read itself from the input file:
+   //***
+   if (!theLatGrid.load(instream))
+   {
+      ++theErrorStatus;
+      return false;
+   }
+   if (!theLonGrid.load(instream))
+   {
+      ++theErrorStatus;
+      return false;
+   }
+   if (!theDlatDhGrid.load(instream))
+   {
+      ++theErrorStatus;
+      return false;
+   }
+   if (!theDlonDhGrid.load(instream))
+   {
+      ++theErrorStatus;
+      return false;
+   }
+
+   for (int p=0; p<numberOfParams; p++)
+   {
+      if (!theDlatDparamGrid[p].load(instream))
+      {
+         ++theErrorStatus;
+         return false;
+      }
+      if (!theDlonDparamGrid[p].load(instream))
+      {
+         ++theErrorStatus;
+         return false;
+      }
+   }
+
+   //***
+   // Initialize the bounding ground rectangle:
+   //***
+   grid_size = theLatGrid.size();
+
+   v[0].lat = theLatGrid(0,0);
+   v[0].lon = theLonGrid(0,0);
+   v[1].lat = theLatGrid(theImageSize.x-1, 0);
+   v[1].lon = theLonGrid(theImageSize.x-1, 0);
+   v[2].lat = theLatGrid(theImageSize.x-1, theImageSize.y-1);
+   v[2].lon = theLonGrid(theImageSize.x-1, theImageSize.y-1);
+   v[3].lat = theLatGrid(0, theImageSize.y-1);
+   v[3].lon = theLonGrid(0, theImageSize.y-1);
+
+   theBoundGndPolygon = ossimPolygon(4, v);
+   
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::loadCoarseGrid: returning..." << std::endl;
+   return true;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimCoarseGridModel::reallocateGrid()
+//  
+//  Deletes existing grid arrays and allocates new ones.
+//  
+//*****************************************************************************
+void ossimCoarseGridModel::reallocateGrid(const ossimIpt& grid_size)
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::reallocateGrid:entering..." << endl;
+
+
+   //***
+   // Deallocate memory:
+   //***
+   if(theDlatDparamGrid)
+     {
+       delete [] theDlatDparamGrid;
+       theDlatDparamGrid = NULL;
+     }
+   if(theDlonDparamGrid)
+     {
+       delete [] theDlonDparamGrid;
+       theDlonDparamGrid = NULL;
+     }
+   //***
+   // determine grid spacing given new info:
+   //***
+   ossimDpt spacing ((double)(theImageSize.x-1)/(double)(grid_size.x-1),
+                     (double)(theImageSize.y-1)/(double)(grid_size.y-1));
+
+   //***
+   // Allocate all:
+   //***
+   ossimDpt grid_origin(0.0, 0.0);
+   theLatGrid.setNullValue(ossim::nan());
+   theLonGrid.setNullValue(ossim::nan());
+   theDlatDhGrid.setNullValue(0.0);
+   theDlonDhGrid.setNullValue(0.0);
+   theLatGrid.initialize(grid_size, grid_origin, spacing);
+   theLonGrid.initialize(grid_size, grid_origin, spacing);
+   theDlatDhGrid.initialize(grid_size, grid_origin, spacing);
+   theDlonDhGrid.initialize(grid_size, grid_origin, spacing);
+   
+   int numberOfParams = getNumberOfAdjustableParameters();
+   if(numberOfParams)
+   {
+      
+      theDlatDparamGrid = new ossimDblGrid [numberOfParams];
+      theDlonDparamGrid = new ossimDblGrid [numberOfParams];
+   }
+   for (int p=0; p<numberOfParams; p++)
+   {
+      theDlonDparamGrid[p].setNullValue(0.0);
+      theDlatDparamGrid[p].setNullValue(0.0);
+      theDlatDparamGrid[p].initialize(grid_size, grid_origin, spacing);
+      theDlonDparamGrid[p].initialize(grid_size, grid_origin, spacing);
+   }
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::reallocateGrid: returning..." << std::endl;
+   return;
+}
+
+//*****************************************************************************
+// STATIC METHOD: ossimCoarseGridModel::writeGeomTemplate
+//  
+//  Writes a sample geometry KWL to the output stream.
+//  
+//*****************************************************************************
+void ossimCoarseGridModel::writeGeomTemplate(ostream& os)
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::writeGeomTemplate: entering..." << std::endl;
+
+   os <<
+      "//**************************************************************\n"
+      "// Template for OCG model kewordlist\n"
+      "//**************************************************************\n"
+      << ossimKeywordNames::TYPE_KW << ": " << MODEL_TYPE << endl;
+
+   ossimSensorModel::writeGeomTemplate(os);
+   
+   os << "//\n"
+      << "// Derived-class ossimCoarseGridModel Keywords:\n"
+      << "//\n"
+      << GRID_FILE_NAME_KW << ": <string>\n" << endl;
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::writeGeomTemplate: returning..." << std::endl;
+   return;
+}
+   
+//*************************************************************************************************
+// Overrides base-class extrapolation code. Uses extrapolation inherent to ossimDbleGrid
+//*************************************************************************************************
+ossimGpt ossimCoarseGridModel::extrapolate(const ossimDpt& local_ip, const double& height) const
+{
+   ossimGpt gpt;
+   lineSampleHeightToWorld(local_ip, height, gpt);
+   return gpt;
+}
+
+bool ossimCoarseGridModel::isAffectedByElevation() const
+{
+   return theHeightEnabledFlag;
+}
diff --git a/src/ossim/projection/ossimCylEquAreaProjection.cpp b/ossim/src/ossim/projection/ossimCylEquAreaProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimCylEquAreaProjection.cpp
rename to ossim/src/ossim/projection/ossimCylEquAreaProjection.cpp
diff --git a/src/ossim/projection/ossimEckert4Projection.cpp b/ossim/src/ossim/projection/ossimEckert4Projection.cpp
similarity index 100%
rename from src/ossim/projection/ossimEckert4Projection.cpp
rename to ossim/src/ossim/projection/ossimEckert4Projection.cpp
diff --git a/src/ossim/projection/ossimEckert6Projection.cpp b/ossim/src/ossim/projection/ossimEckert6Projection.cpp
similarity index 100%
rename from src/ossim/projection/ossimEckert6Projection.cpp
rename to ossim/src/ossim/projection/ossimEckert6Projection.cpp
diff --git a/ossim/src/ossim/projection/ossimEpsgProjectionDatabase.cpp b/ossim/src/ossim/projection/ossimEpsgProjectionDatabase.cpp
new file mode 100644
index 0000000..68bd0a6
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimEpsgProjectionDatabase.cpp
@@ -0,0 +1,913 @@
+//*************************************************************************************************
+//                          OSSIM -- Open Source Software Image Map
+//
+// LICENSE:  See top level LICENSE.txt file.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Projection database for EPSG coded projections provided in database files
+//
+//*************************************************************************************************
+//  $Id: ossimEpsgProjectionDatabase.cpp 23177 2015-03-04 15:05:25Z gpotts $
+#include <ossim/projection/ossimEpsgProjectionDatabase.h>
+#include <ossim/projection/ossimStatePlaneProjectionInfo.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/projection/ossimUtmProjection.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/projection/ossimTransMercatorProjection.h>
+#include <ossim/projection/ossimMercatorProjection.h>
+#include <ossim/projection/ossimOrthoGraphicProjection.h>
+#include <ossim/projection/ossimNewZealandMapGridProjection.h>
+#include <ossim/projection/ossimGoogleProjection.h>
+#include <ossim/projection/ossimLambertConformalConicProjection.h>
+#include <ossim/projection/ossimCassiniProjection.h>
+#include <ossim/projection/ossimAlbersProjection.h>
+#include <ossim/base/ossimEpsgDatumFactory.h>
+#include <ossim/base/ossimDatumFactory.h>
+#include <ossim/base/ossimDatumFactoryRegistry.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/projection/ossimMapProjectionFactory.h>
+#include <ossim/base/ossimException.h>
+#include <cmath>
+
+//ossimEpsgProjectionDatabase* ossimEpsgProjectionDatabase::m_instance = 0;
+
+// Indexes into the DB file fields using "SPADAC EPSG" format (format "A"). 
+// IF THE LINE FIELDS CHANGE ORDER, THIS LIST WILL NEED TO BE CHANGED TO REFLECT THE NEW ORDER!
+enum
+{
+   A_CODE = 0,  // This is the EPSG code
+   A_NAME,
+   A_PROJ_TYPE,
+   A_UNITS,
+   A_DATUM_CODE,
+   A_DATUM_NAME,
+   A_ELLIPSOID_NAME,
+   A_FALSE_EASTING,
+   A_NAT_ORG_LAT,
+   A_FALSE_NORTHING,
+   A_NAT_ORG_LON,
+   A_NAT_ORG_SCALE,
+   A_INIT_LINE_AZ,
+   A_PROJ_CTR_LAT,
+   A_PROJ_CTR_NORTHING,
+   A_RECT_TO_SKEW_ANGLE,
+   A_INIT_LINE_SCALE,
+   A_PROJ_CTR_EASTING,
+   A_PROJ_CTR_LON,
+   A_PSEUDO_STD_PARL_1,
+   A_PSEUDO_STD_PARL_1_SCALE,
+   A_ORG_LON,
+   A_STD_PARL_2_LAT,
+   A_FALSE_ORG_LAT,
+   A_FALSE_ORG_LON,
+   A_STD_PARL_1_LAT,
+   A_FALSE_ORG_NORTHING,
+   A_FALSE_ORG_EASTING,
+   A_STD_PARL_LAT,
+   A_TOPOCTR_HGT,
+   A_TOPOCTR_LAT,
+   A_TOPOCTR_Z,
+   A_TOPOCTR_Y,
+   A_TOPOCTR_X,
+   A_VIEWPOINT_H,
+   A_INIT_LON,
+   A_ZONE_WIDTH,
+   A_NUM_FIELDS   // Not an index, but a count
+};
+static const ossimString EPSG_DB_FORMAT_A ("EPSG_DB_FORMAT_A");
+
+// State Plane database CSV file field format (format "B")
+// NOTE: Eventually, all EPSG-coded projections, including State Plane/HARN should be specified
+// in the EPSG database format. Presently there is a disconnect between Geotrans params and EPSG-Db
+// params, particularly regarding datums, that makes a purely EPSG-Db solution too awkward to
+// implement, so provision is made here to continue reading the state plane CSV files.
+enum 
+{
+   B_NAME = 0,
+   B_CODE,   // This is the EPSG code
+   B_PROJ_TYPE,
+   B_PARAM1,
+   B_PARAM2,
+   B_PARAM3,
+   B_PARAM4,
+   B_FALSE_EASTING,
+   B_FALSE_NORTHING,
+   B_UNITS,
+   B_DATUM_CODE,
+   B_NUM_FIELDS   // Not an index, but a count
+};
+static const ossimString STATE_PLANE_FORMAT_B ("STATE_PLANE");
+
+// "Ming Special" database CSV file format (format "C")
+// State Plane Coordinate System (SPCS) coding is an alternate coding scheme that maps to EPSG.
+// http://www.pcigeomatics.com/cgi-bin/pcihlp/PROJ%7CSPCS+ZONES
+enum 
+{
+   C_NAME = 0,
+   C_CODE,
+   C_NUM_FIELDS   // Not an index, but a count
+};
+static const ossimString SPCS_EPSG_MAP_FORMAT_C ("SPCS_EPSG_MAP");
+
+//*************************************************************************************************
+//! Converts sexagesimal DMS to decimal degrees
+//*************************************************************************************************
+double decodeSexagesimalDms(const ossimString& sex_str)
+{
+   if (!sex_str.contains("."))
+      return sex_str.toDouble();
+
+   double sign = 1.0;
+   if (sex_str.chars()[0] == '-')
+      sign = -1.0;
+
+   double dsex, msex, ssex;
+   std::vector<ossimString> splitstr = sex_str.split(".");
+   dsex = splitstr[0].toDouble();
+   
+   if (splitstr.size() < 2)
+      return dsex;
+
+   const char* MMSSssstr = splitstr[1].chars();
+   unsigned int str_size = (unsigned int) splitstr[1].size();
+   char minstr[] = "00";
+   ossimString secstr ("00.");
+   minstr[0] = MMSSssstr[0];
+   if (str_size > 1)
+   {
+      minstr[1] = MMSSssstr[1];
+      if (str_size > 2)
+      {
+         secstr = &(MMSSssstr[2]);
+         if (str_size == 3)
+            secstr += ossimString("0.");
+         else if (str_size > 4)
+            secstr.insert(2, ".");
+      }
+   }
+   msex = ossimString(minstr).toDouble();
+   ssex = secstr.toDouble();
+   dsex += sign*(msex + ssex/60.0)/60.0;
+   return dsex;
+}
+
+//*************************************************************************************************
+//! Implements singleton pattern
+//*************************************************************************************************
+ossimEpsgProjectionDatabase* ossimEpsgProjectionDatabase::instance()
+{
+   static ossimEpsgProjectionDatabase inst;
+
+   return &inst;
+   //if(!m_instance)
+   //   m_instance = new ossimEpsgProjectionDatabase;
+   //return m_instance;
+}
+
+//*************************************************************************************************
+//! Destructor
+//*************************************************************************************************
+ossimEpsgProjectionDatabase::~ossimEpsgProjectionDatabase()
+{
+}
+
+//*************************************************************************************************
+//! Constructor loads all DB CSV files specified in the ossim prefs
+//*************************************************************************************************
+ossimEpsgProjectionDatabase::ossimEpsgProjectionDatabase()
+   :
+   m_projDatabase(),
+   m_mutex()
+{
+}
+
+//*************************************************************************************************
+//! Populates the database with contents of DB files as specified in ossim_preferences.
+//*************************************************************************************************
+void ossimEpsgProjectionDatabase::initialize() const
+{
+   // Fetch filenames of all projection DB files specified in ossim_preferences:
+   ossimString regEx =  ossimString("^epsg_database_file[0-9]+");
+   vector<ossimString> keys = 
+      ossimPreferences::instance()->preferencesKWL().getSubstringKeyList(regEx);
+   vector<ossimString>::const_iterator i = keys.begin();
+
+   // Create only once outside the loop:
+   ossimFilename db_name;
+   ossimString group_id;
+   ossimString format_id;
+   ossimString line;
+
+   // Loop over each file and read contents into memory:
+   while ( i != keys.end() )
+   {
+      db_name = ossimPreferences::instance()->preferencesKWL().find( (*i).c_str() );
+      ++i;
+      if (!db_name.isReadable())
+         continue;
+
+      // Open the DB file:
+      std::ifstream db_stream (db_name.chars());
+      bool good_file = false;
+      if (db_stream.good())
+      {
+         // Format specification implied in file's magic number:
+         std::getline(db_stream, format_id.string());
+         format_id.trim();
+         if ((format_id == EPSG_DB_FORMAT_A) || 
+             (format_id == STATE_PLANE_FORMAT_B) ||
+             (format_id == SPCS_EPSG_MAP_FORMAT_C))
+            good_file = true;
+      }
+      if (!good_file)
+      {
+         ossimNotify(ossimNotifyLevel_WARN)<<"ossimEpsgProjectionDatabase::initialize() -- "
+            "Encountered bad database file <"<<db_name<<">. Skipping this file."<<endl;
+         db_stream.close();
+         continue;
+      }
+
+      // The file is good. Skip over the column descriptor line:
+      std::getline(db_stream, line.string());
+
+      // Loop to read all data records:
+      while (!db_stream.eof())
+      {
+         ossimRefPtr<ProjDbRecord> db_record = new ProjDbRecord;
+         std::getline(db_stream, line.string());
+         db_record->csvRecord = line.explode(","); // ONLY CSV FILES CONSIDERED HERE
+         if (db_record->csvRecord.size())
+         {
+            // Check if primary EPSG database format A:
+            if (format_id == EPSG_DB_FORMAT_A)
+            {
+               db_record->code = db_record->csvRecord[A_CODE].toUInt32();
+               db_record->name = db_record->csvRecord[A_NAME];
+               db_record->csvFormat = FORMAT_A;
+            }
+
+            // Check if State Plane (subset of EPSG but handled differently until projection 
+            // geotrans-EPSG disconnect is resolved. 
+            else if (format_id == STATE_PLANE_FORMAT_B)
+            {
+               db_record->code = db_record->csvRecord[B_CODE].toUInt32();
+               db_record->name = db_record->csvRecord[B_NAME];
+               db_record->csvFormat = FORMAT_B;
+            }
+
+            // This format is for Ming-special State Plane Coordinate System coded format.
+            // This format is simply a mapping from SPCS spec name (OSSIM-specific) to EPSG code.
+            // Note that no proj is instantiated and no KWL is populated. Only name and EPSG mapped
+            // code is saved.
+            else if (format_id == SPCS_EPSG_MAP_FORMAT_C)
+            {
+               db_record->code = db_record->csvRecord[C_CODE].toUInt32();
+               db_record->name = db_record->csvRecord[C_NAME];
+               db_record->csvFormat = FORMAT_C;
+            }
+
+            m_projDatabase.insert(make_pair(db_record->code, db_record));
+         }
+      }
+
+      db_stream.close();
+   } // end of while loop over all DB files
+}
+
+//*************************************************************************************************
+//! Returns a projection corresponding to the group (e.g., "EPSG") and PCS code provided, 
+//! or NULL if no entry found.
+//*************************************************************************************************
+ossimProjection* ossimEpsgProjectionDatabase::findProjection(ossim_uint32 epsg_code) const
+{
+   ossimMapProjection* proj = 0;
+
+   // Quick check for bogus EPSG:
+   if ((epsg_code == 0) || (epsg_code == 32767))
+      return 0;
+
+   // Check for Google projection:
+   else if ((epsg_code==3857)||(epsg_code == 900913))
+   {
+      proj = new ossimGoogleProjection();
+
+      // Set this for saveState:
+      proj->setPcsCode( 3857 );
+      /*
+      const ossimDatum* datum = ossimDatumFactory::instance()->create(ossimString("6055"));
+      ossimMercatorProjection* merc_proj = new ossimMercatorProjection();
+      ossimGpt origin(0.0,0.0,0.0, datum);
+      merc_proj->setFalseEasting(0.0);
+      merc_proj->setFalseNorthing(0.0);
+      merc_proj->setOrigin(origin); // Also sets the projections datum to the origin's datum
+      merc_proj->update();
+      merc_proj->setPcsCode(900913);
+      proj = merc_proj;
+      */
+   }
+
+   else
+   {
+      // Search database for entry:
+      m_mutex.lock();
+      if (m_projDatabase.empty())
+      {
+         initialize();
+      }
+      m_mutex.unlock();
+
+      std::multimap<ossim_uint32, ossimRefPtr<ProjDbRecord> >::iterator db_iter = 
+         m_projDatabase.find(epsg_code);
+      if (db_iter != m_projDatabase.end())
+      {
+         // See if a projection has already been created for this entry:
+         m_mutex.lock();
+         ossimRefPtr<ProjDbRecord> db_record = db_iter->second;
+         if ( db_record.valid() )
+         {
+            if (db_record->proj.valid())
+               proj = (ossimMapProjection*) db_record->proj->dup();
+            else
+            {
+               // Try decoding the EPSG code before accessing DB:
+               proj = createProjFromUtmCode(epsg_code);
+               if (proj)
+               {
+                  db_record->proj = proj;
+                  db_record->datumValid = true;
+               }
+               else if (db_iter->second->csvFormat == FORMAT_A)
+               {
+                  proj = createProjFromFormatARecord( db_record.get() );
+               }
+               else if (db_iter->second->csvFormat == FORMAT_B)
+               {
+                  proj = createProjFromFormatBRecord( db_record.get() );
+               }
+               
+               if (proj)
+               {
+                  // To save allocated memory, get rid of the original CSV entry since a real 
+                  // projection is now represented in the database:
+                  db_record->csvRecord.clear();
+                  db_record->csvFormat = NOT_ASSIGNED;
+               }
+            }
+
+         } // Matches: if  ( db_record.valid() )
+         m_mutex.unlock();
+      }
+   }
+
+   return proj;
+}
+
+//*************************************************************************************************
+//! Returns a projection corresponding to the group (e.g., "EPSG") and PCS code provided, 
+//! or NULL if no entry found.
+//*************************************************************************************************
+ossimProjection* ossimEpsgProjectionDatabase::findProjection(const ossimString& spec) const
+{
+   //std::cout << "ossimEpsgProjectionDatabase::findProjection: entered with spec " << spec << "\n";
+   ossimProjection* proj = 0;
+
+   // Use the CRS code to access the database. The spec should be <group>:<code> where <group> is 
+   // "EPSG" (the only group handled here):
+   ossim_uint32 spec_code;
+   ossimString spec_group ("epsg"); // default if only integer code provided
+   if (spec.contains(":"))
+   {
+      spec_group = spec.before(":");
+      spec_code = spec.after(":").toUInt32();
+      spec_group = spec_group.downcase();
+   }
+   else
+   {
+      spec_code = spec.toUInt32();
+   }
+
+   // Presently only EPSG database is handled:
+   if ((spec_code != 0) && (spec_group == "epsg"))
+      return findProjection(spec_code);
+
+   // The spec is probably a projection name. Need to search Db by the projection name. 
+   // Search database for entry. The spec may use different delimiters than
+   // the DB so need to split the strings and compare the words:
+   ossimString separators ("_ /()");
+   vector<ossimString> split_spec = spec.split(separators, true);
+   vector<ossimString> split_db_name;
+   ossimRefPtr<ossimMapProjection> map_proj = 0;
+   if (m_projDatabase.empty())
+      initialize();
+   std::multimap<ossim_uint32, ossimRefPtr<ProjDbRecord> >::iterator db_iter = m_projDatabase.begin();
+   while ((db_iter != m_projDatabase.end()) && !proj)
+   {
+      ossimRefPtr<ProjDbRecord> db_record = db_iter->second;
+      if ( db_record.valid() )
+      {
+         split_db_name.clear();
+         db_record->name.split(split_db_name, separators, true);
+         if (split_spec == split_db_name)
+         {
+            // We may already have instantiated this projection, in which case just return its copy.
+            // Otherwise, create the projection from the EPSG code that corresponds to the name:
+            if (db_record->proj.valid())
+               proj = (ossimMapProjection*) db_record->proj->dup();
+            else
+               proj = findProjection(db_record->code);
+            return proj;
+         }
+      }
+      ++db_iter;
+   }
+    
+   // No hit? Could be that just a datum was identified, in which case we need a simple 
+   // Platte Carree:
+   const ossimDatum* datum = ossimDatumFactoryRegistry::instance()->create(spec);
+   if (datum)
+   {
+      ossimEquDistCylProjection* proj = new ossimEquDistCylProjection(*(datum->ellipsoid()));
+      proj->setDatum(datum);
+      proj->setPcsCode(spec_code);
+      return proj;
+   }
+
+   return 0;
+}
+
+
+//*************************************************************************************************
+//! Given a projection name, assigns the group (e.g., "EPSG") and code of the projection. 
+//! Returns "<group>:<code>" if match was found or empty string if not found.
+//*************************************************************************************************
+ossim_uint32 ossimEpsgProjectionDatabase::findProjectionCode(const ossimString& proj_name) const
+{
+   if (m_projDatabase.empty())
+      initialize();
+   std::multimap<ossim_uint32, ossimRefPtr<ProjDbRecord> >::iterator db_iter = m_projDatabase.begin();
+   while (db_iter != m_projDatabase.end())
+   {
+      ossimRefPtr<ProjDbRecord> db_record = db_iter->second.get();
+      if ( db_record.valid() )
+      {
+         if (db_record->name == proj_name)
+            return (db_record->code);
+      }
+      ++db_iter;
+   }
+      
+   return 0;
+}
+
+//*************************************************************************************************
+//! Given a projection instance, this method determines the corresponding EPSG code. Obviously
+//! this is only needed if the projection does not have its PCS code assigned (it is NULL). This
+//! happens when the projection was constructed with full parameters instead of the EPSG code.
+//! Returns integer EPSG code if match was found or 0 if not found.
+//*************************************************************************************************
+ossim_uint32 
+ossimEpsgProjectionDatabase::findProjectionCode(const ossimMapProjection& lost_proj) const
+{
+   ossimString lost_type (lost_proj.getClassName());
+
+   // Shortcut for EPSG:4326 (WGS-85 geographic rectangular -- very common):
+   if ((lost_type == "ossimEquDistCylProjection") && (lost_proj.getDatum()->epsgCode() == 6326))
+      return 4326;
+
+   ossim_uint32 found_code = 0;
+   if (lost_type == "ossimUtmProjection")
+   {
+      found_code = getCodeFromUtmProj(dynamic_cast<const ossimUtmProjection*>(&lost_proj));
+      if (found_code)
+         return found_code;
+   }
+
+   if (m_projDatabase.empty())
+      initialize();
+   ossimString lookup;
+   std::multimap<ossim_uint32, ossimRefPtr<ProjDbRecord> >::iterator db_iter =
+      m_projDatabase.begin();
+   while ((db_iter != m_projDatabase.end()) && (found_code == 0))
+   {
+      ossimRefPtr<ProjDbRecord> db_record = db_iter->second;
+      if ( db_record.valid() )
+      {
+         // Has a projection already been created for this db iter?
+         if (!db_record->proj.valid())
+         {
+            // No projection has been created yet for this DB entry. 
+            // NOTE: THIS IS VERY SLOW BECAUSE WE ARE INSTANTIATING EVERY PROJECTION IN THE DB!!!
+            db_record->proj = dynamic_cast<ossimMapProjection*>(findProjection(db_record->code));
+         }
+         if (db_record->proj.valid() && (*(db_record->proj.get()) == lost_proj))
+         {
+            found_code = db_record->code;
+            
+            // Hack to remap projection code 4087 to 4326 (which is not really a projection 
+            // code but other packages like to see 4326 for geographic projections.
+            // Hacked under protest (OLK, 08/2010)
+            if (found_code == 4087)
+               found_code = 4326;
+         }
+      }
+      ++db_iter;
+   }
+   return found_code;
+}
+
+//*************************************************************************************************
+//! This method provides acess to the projection name given the EPSG code. The name provides 
+//! enough info for recognizing a non-meters HARN-based projection. 
+//*************************************************************************************************
+ossimString ossimEpsgProjectionDatabase::findProjectionName(ossim_uint32 epsg_code) const
+{
+   if (m_projDatabase.empty())
+      initialize();
+
+   ossimString name ("");
+   std::multimap<ossim_uint32, ossimRefPtr<ProjDbRecord> >::iterator db_iter = 
+       m_projDatabase.find(epsg_code);
+   
+   if (db_iter != m_projDatabase.end())
+      name = db_iter->second->name;
+   
+   return name;
+}
+
+//*************************************************************************************************
+//! Populates caller's list with all projections currently represented in the database.
+//! The format is: 
+//!    EPSG:<code>  "<Name as appears in Db>"
+//! There may be duplicate entries if the projection is duplicated in the various Db files.
+//*************************************************************************************************
+void ossimEpsgProjectionDatabase::getProjectionsList(std::vector<ossimString>& list) const
+{
+   if (m_projDatabase.empty())
+      initialize();
+
+   std::multimap<ossim_uint32, ossimRefPtr<ProjDbRecord> >::iterator db_iter = m_projDatabase.begin();
+   while (db_iter != m_projDatabase.end())
+   {
+      ossimRefPtr<ProjDbRecord> db_record = db_iter->second;
+      if ( db_record.valid() )
+      {
+         ossimString record ("EPSG:");
+         record += ossimString::toString(db_record->code);
+         record += "  \"";
+         record += db_record->name;
+         record += "\"";
+         list.push_back(record);
+      }
+      ++db_iter;
+   }
+   return;
+}
+
+//*************************************************************************************************
+//! This method is invoked to parse the Db record and produce a projection (or NULL if spec invalid)
+//
+// LIMITATION: Currently not parsing the datum info from the EPSG database file due to disconnect
+// with current ossimDatumFactory. Setting to default WGS84 with warning message.
+//*************************************************************************************************
+ossimMapProjection* 
+ossimEpsgProjectionDatabase::createProjFromFormatARecord(ProjDbRecord* record) const
+{
+   // Establish EPSG code and test for UTM (full projection is implied in the code itself -- no 
+   // accessing the database). Until the database is solidified, it is probably better to do 
+   // it this way:
+   record->datumValid = true;
+   record->proj = 0;
+
+   // Establish the units in which the easting/northing is provided:
+   ossimUnitType mapProjUnits = OSSIM_METERS;
+   double mtrs_per_unit = 1.0;
+   if (record->csvRecord[A_UNITS] == "US survey foot")
+   {
+      mapProjUnits = OSSIM_US_SURVEY_FEET;
+      mtrs_per_unit = US_METERS_PER_FT;
+   }
+   else if (record->csvRecord[A_UNITS].contains("foot")) // THIS IS INTERNATIONAL FOOT, NOT EXACT FOR MANY INTERNATIONAL VARIETIES
+   {
+      mapProjUnits = OSSIM_FEET;
+      mtrs_per_unit = MTRS_PER_FT;
+   }
+   else if (record->csvRecord[A_UNITS].contains("kilometre"))
+   {
+      mapProjUnits = OSSIM_KILOMETERS;
+      mtrs_per_unit = 1000.0;
+   }
+   else if (!record->csvRecord[A_UNITS].contains("metre"))
+   {
+      // ### SKIP THIS MESSAGE BUT BE AWARE THAT THIS PROJECTION WON'T BE REPRESENTED IN DB ###
+      //ossimNotify(ossimNotifyLevel_WARN)<<MODULE<<"EPSG:"<<pcs_code<<" units of <"
+      //   <<record->csvRecord[A_UNITS]<<"> not presently supported."<<endl;
+      return 0;
+   }
+
+   // First create a datum given the datum code in the record:
+   ossim_uint32 gcs_code = record->csvRecord[A_DATUM_CODE].toUInt32();
+   const ossimDatum* datum = ossimEpsgDatumFactory::instance()->create(gcs_code);
+   if (!datum)
+   {
+      // Default to WGS 84 -- this may throw an exception:
+      datum = ossimDatumFactory::instance()->create(ossimString("WGE"));
+      record->datumValid = false;
+   }
+   const ossimEllipsoid* ellipsoid = datum->ellipsoid();
+
+   ossimGpt origin(0,0,0,datum);
+   ossimString proj_type = record->csvRecord[A_PROJ_TYPE];
+   if (proj_type.contains("Transverse Mercator"))
+   {
+      origin.lat = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LAT]);
+      origin.lon = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LON]);
+      double fe = mtrs_per_unit*record->csvRecord[A_FALSE_EASTING].toDouble();
+      double fn = mtrs_per_unit*record->csvRecord[A_FALSE_NORTHING].toDouble();
+      double sf = record->csvRecord[A_NAT_ORG_SCALE].toDouble();
+      record->proj = new ossimTransMercatorProjection(*ellipsoid, origin, fe, fn, sf);
+   }
+   else if (proj_type.contains("Lambert Conic Conformal (1SP)"))
+   {
+      origin.lat = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LAT]);
+      origin.lon = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LON]);
+      double fe = mtrs_per_unit*record->csvRecord[A_FALSE_EASTING].toDouble();
+      double fn = mtrs_per_unit*record->csvRecord[A_FALSE_NORTHING].toDouble();
+      record->proj = new ossimLambertConformalConicProjection(*ellipsoid, origin, origin.lat, 
+         origin.lat, fe, fn);
+   }
+   else if (proj_type.contains("Lambert Conic Conformal (2SP)"))
+   {
+      origin.lat = decodeSexagesimalDms(record->csvRecord[A_FALSE_ORG_LAT]);
+      origin.lon = decodeSexagesimalDms(record->csvRecord[A_FALSE_ORG_LON]);
+      double p1 = decodeSexagesimalDms(record->csvRecord[A_STD_PARL_1_LAT]);
+      double p2 = decodeSexagesimalDms(record->csvRecord[A_STD_PARL_2_LAT]);
+      double fe = mtrs_per_unit*record->csvRecord[A_FALSE_ORG_EASTING].toDouble();
+      double fn = mtrs_per_unit*record->csvRecord[A_FALSE_ORG_NORTHING].toDouble();
+      record->proj = new ossimLambertConformalConicProjection(*ellipsoid, origin, p1, p2, fe, fn);
+   }
+   else if (proj_type.contains("Cassini"))
+   {
+      origin.lat = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LAT]);
+      origin.lon = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LON]);
+      double fe = mtrs_per_unit*record->csvRecord[A_FALSE_EASTING].toDouble();
+      double fn = mtrs_per_unit*record->csvRecord[A_FALSE_NORTHING].toDouble();
+      record->proj =  new ossimCassiniProjection(*ellipsoid, origin, fe, fn);
+   }
+   else if (proj_type.contains("Mercator (1SP)") || proj_type.contains("Pseudo-Mercator"))
+   {
+      origin.lat = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LAT]);
+      origin.lon = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LON]);
+      double fe = mtrs_per_unit*record->csvRecord[A_FALSE_EASTING].toDouble();
+      double fn = mtrs_per_unit*record->csvRecord[A_FALSE_NORTHING].toDouble();
+      double sf = record->csvRecord[A_NAT_ORG_SCALE].toDouble();
+      record->proj = new ossimMercatorProjection(*ellipsoid, origin, fe, fn, sf);
+   }
+   else if (proj_type.contains("Albers"))
+   {
+      origin.lat = decodeSexagesimalDms(record->csvRecord[A_FALSE_ORG_LAT]);
+      origin.lon = decodeSexagesimalDms(record->csvRecord[A_FALSE_ORG_LON]);
+      double p1 = decodeSexagesimalDms(record->csvRecord[A_STD_PARL_1_LAT]);
+      double p2 = decodeSexagesimalDms(record->csvRecord[A_STD_PARL_2_LAT]);
+      double fe = mtrs_per_unit*record->csvRecord[A_FALSE_ORG_EASTING].toDouble();
+      double fn = mtrs_per_unit*record->csvRecord[A_FALSE_ORG_NORTHING].toDouble();
+      record->proj = new ossimAlbersProjection(*ellipsoid, origin, p1, p2, fe, fn);
+   }
+   else if (proj_type.contains("Equidistant Cylindrical"))
+   {
+      origin.lat = decodeSexagesimalDms(record->csvRecord[A_STD_PARL_1_LAT]);
+      origin.lon = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LON]);
+      double fe = mtrs_per_unit*record->csvRecord[A_FALSE_EASTING].toDouble();
+      double fn = mtrs_per_unit*record->csvRecord[A_FALSE_NORTHING].toDouble();
+      record->proj = new ossimEquDistCylProjection(*ellipsoid, origin, fe, fn);
+   }
+   else if (proj_type.contains("New Zealand Map Grid"))
+   {
+      origin.lat = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LAT]);
+      origin.lon = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LON]);
+      double fe = mtrs_per_unit*record->csvRecord[A_FALSE_EASTING].toDouble();
+      double fn = mtrs_per_unit*record->csvRecord[A_FALSE_NORTHING].toDouble();
+      ossimNewZealandMapGridProjection* nz_proj = new ossimNewZealandMapGridProjection;
+      nz_proj->setOrigin(origin);
+      nz_proj->setFalseEastingNorthing(fe, fn);
+      record->proj = nz_proj;
+   }
+   else 
+   {
+      // Can't handle it now. 
+      //ossimNotify(ossimNotifyLevel_FATAL)<<MODULE<<"EPSG:"<<record->csvRecord[A_CODE]<<" \""<<proj_type<<"\" "
+      //   "not presently supported. Returning NULL projection..."<<endl;
+      return 0;
+   }
+  
+   record->proj->setDatum(datum);
+   record->proj->setPcsCode(record->code);
+   record->proj->setProjectionUnits(mapProjUnits);
+
+   return record->proj.get();
+}
+
+//*************************************************************************************************
+// ### HACK ###
+//! State Plane projections as specified in the EPSG are indistinguishable from regular TM. 
+//! Unfortunately OSSIM does make a distinction. For the time being, parse the code and 
+//! programmatically arrive at the UTM projection.
+//*************************************************************************************************
+ossimMapProjection* 
+ossimEpsgProjectionDatabase::createProjFromFormatBRecord(ProjDbRecord* db_record) const
+{
+   // Unfortunately, as of this writing, there is a disconnect between the Geotrans projection
+   // parameters and those provided by EPSG database. In the meantime, to maintain functionality,
+   // we intercept the EPSG code and programmatically arrive at the projection versus pulling
+   // all the parameters out of the Db record->
+   ossimStatePlaneProjectionInfo  info(db_record->name,
+                                       db_record->code,
+                                       db_record->csvRecord[B_PROJ_TYPE],
+                                       db_record->csvRecord[B_PARAM1],
+                                       db_record->csvRecord[B_PARAM2],
+                                       db_record->csvRecord[B_PARAM3],
+                                       db_record->csvRecord[B_PARAM4],
+                                       db_record->csvRecord[B_FALSE_EASTING].toDouble(),
+                                       db_record->csvRecord[B_FALSE_NORTHING].toDouble(),
+                                       db_record->csvRecord[B_UNITS],
+                                       db_record->csvRecord[B_DATUM_CODE]);
+   
+   // NOTE: In order to avoid infinite recursion with this object, we initialized the PCS code in 
+   // info to NULL to insure that the projection is instantiated directly (not via this class):
+   ossimKeywordlist kwl;
+   info.populateProjectionKeywords(kwl);
+   kwl.remove(ossimKeywordNames::PCS_CODE_KW);
+   db_record->proj = 
+      PTR_CAST(ossimMapProjection, ossimMapProjectionFactory::instance()->createProjection(kwl));
+   if (db_record->proj.valid())
+   {
+      db_record->proj->setPcsCode(db_record->csvRecord[B_CODE].toUInt32());
+      db_record->datumValid = true;
+   }
+
+   return db_record->proj.get();
+}
+
+//*************************************************************************************************
+// ### HACK ###
+//! UTM projections as specified in the EPSG are indistinguishable from regular TM. Unfortunately
+//! OSSIM does make a distinction. For the time being, parse the code and programmatically arrive 
+//! at the UTM projection.
+//*************************************************************************************************
+ossimMapProjection* ossimEpsgProjectionDatabase::createProjFromUtmCode(ossim_uint32 code) const
+{
+   // This code originally found in deprecated ossimPcsCodeProjectionFactory authored by
+   // David Burken.
+   int type = code/100;
+   int zone = code%100;
+   ossimUtmProjection* proj = NULL;
+   switch (type)
+   {
+   case 322:
+      // utm, WGS72 (WGD), northern hemisphere
+      if ( (zone > 0 ) && (zone < 61) )
+      {
+         proj = new ossimUtmProjection(*(ossimDatumFactory::instance()->wgs72()->ellipsoid()));
+         proj->setDatum(ossimDatumFactory::instance()->wgs72());
+         proj->setZone(zone);
+         proj->setHemisphere('N');
+      }
+      break;
+
+   case 323:
+      // utm, WGS72 (WGD), southern hemisphere
+      if ( (zone > 0) && (zone < 61) )
+      {
+         proj = new ossimUtmProjection(*(ossimDatumFactory::instance()->wgs72()->ellipsoid()));
+         proj->setDatum(ossimDatumFactory::instance()->wgs72());
+         proj->setZone(zone);
+         proj->setHemisphere('S');
+      }
+      break;
+
+   case 326:
+      // utm, WGS84 (WGE), northern hemisphere
+      if ( (zone > 0) && (zone < 61) )
+      {
+         proj = new ossimUtmProjection(*(ossimDatumFactory::instance()->wgs84()->ellipsoid()));
+         proj->setDatum(ossimDatumFactory::instance()->wgs84());
+         proj->setZone(zone);
+         proj->setHemisphere('N');
+      }
+      break;
+
+   case 327:
+      // utm, WGS84 (WGE), southern hemisphere
+      if ( (zone > 0) && (zone < 61) )
+      {
+         proj = new ossimUtmProjection(*(ossimDatumFactory::instance()->wgs84()->ellipsoid()));
+         proj->setDatum(ossimDatumFactory::instance()->wgs84());
+         proj->setZone(zone);
+         proj->setHemisphere('S');
+      }
+      break;
+
+   case 267:
+      // utm, "NAS-C", northern hemisphere
+      // Only UTM NAD27 North zones 3 to 22 are in the 267xx range...
+      // 26729 through 26803 handled by state plane factory.
+      //---
+      if ( (code > 26702) && (code < 26723) )
+      {
+         proj = new ossimUtmProjection(*(ossimDatumFactory::instance()->
+            create(ossimString("NAS-C"))->ellipsoid()));
+         proj->setDatum(ossimDatumFactory::instance()->create(ossimString("NAS-C")));
+         proj->setZone(zone);
+         proj->setHemisphere('N');
+      }
+      break;
+
+   case 269:
+      // utm, "NAR-C", northern hemisphere
+      // Only UTM NAD83 North zones 3 to 23 are in the 269xx range...
+      // 26929 through 26998 handled by state plane factory.
+      if ( (code > 26902) && (code < 26924) )
+      {
+         proj = new ossimUtmProjection(*(ossimDatumFactory::instance()->
+            create(ossimString("NAR-C"))->ellipsoid()));
+         proj->setDatum(ossimDatumFactory::instance()->create(ossimString("NAR-C")));
+         proj->setZone(zone);
+         proj->setHemisphere('N');
+      }
+      break;
+
+   case 248:
+      // Provisional S. American 1956, 24818 through 24880
+      if ( (code > 24817) && (code < 24881) )
+      {
+         proj = new ossimUtmProjection(*(ossimDatumFactory::instance()->
+            create(ossimString("PRP-M"))->ellipsoid()));
+         proj->setDatum(ossimDatumFactory::instance()->create(ossimString("PRP-M")));
+         if (zone > 60)
+         {
+            proj->setZone(zone - 60);
+            proj->setHemisphere('S');
+         }
+         else
+         {
+            proj->setZone(zone);
+            proj->setHemisphere('N');
+         }
+      }
+      break;
+
+   } // End of switch on code.
+
+   if (proj)
+      proj->setPcsCode(code);
+
+   return proj;
+}
+
+//*************************************************************************************************
+//! Given UTM projection, derives the associated EPSG code. This is faster than a Db lookup.
+//*************************************************************************************************
+ossim_uint32 ossimEpsgProjectionDatabase::getCodeFromUtmProj(const ossimUtmProjection* proj) const
+{
+   if (proj == NULL)
+      return 0;
+
+   char hemisphere = proj->getHemisphere();
+   ossim_uint32 zone = proj->getZone();
+   ossimString datum_code = proj->getDatum()->code();
+   
+   if ((zone < 1 ) || (zone > 60))
+      return 0;
+
+   ossim_uint32 epsg_code = zone;
+   if ((hemisphere == 'N') && (datum_code == "WGD"))
+      epsg_code += 32200;
+   
+   else if ((hemisphere == 'S') && (datum_code == "WGD"))
+      epsg_code += 32300;
+
+   else if ((hemisphere == 'N') && (datum_code == "WGE"))
+      epsg_code += 32600;
+
+   else if ((hemisphere == 'S') && (datum_code == "WGE"))
+      epsg_code += 32700;
+
+   else if ((hemisphere == 'N') && (datum_code == "NAS-C") && (zone > 2) && (zone < 23))
+      epsg_code += 26700;
+
+   else if ((hemisphere == 'N') && (datum_code == "NAR-C") && (zone > 2) && (zone < 24))
+      epsg_code += 26900;
+
+   else if ((hemisphere == 'N') && (datum_code == "PRP-M"))
+      epsg_code += 24800;
+
+   else if ((hemisphere == 'S') && (datum_code == "PRP-M"))
+      epsg_code += 24800 + 60;
+   
+   else
+      epsg_code = 0;
+
+   return epsg_code;
+}
+
diff --git a/ossim/src/ossim/projection/ossimEpsgProjectionFactory.cpp b/ossim/src/ossim/projection/ossimEpsgProjectionFactory.cpp
new file mode 100644
index 0000000..6c2e9e3
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimEpsgProjectionFactory.cpp
@@ -0,0 +1,206 @@
+//*************************************************************************************************
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Oscar Kramer
+//
+// DESCRIPTION:
+// Projection Factory for EPSG coded projections. These are projections
+// that are fully defined in database files and specified via a projection coordinate system (PCS)
+// code.
+//
+//*************************************************************************************************
+//  $Id: ossimEpsgProjectionFactory.cpp 22929 2014-10-29 18:11:04Z gpotts $
+
+#include <ossim/projection/ossimEpsgProjectionFactory.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/projection/ossimOrthoGraphicProjection.h>
+#include <ossim/projection/ossimTransMercatorProjection.h>
+#include <ossim/projection/ossimUtmProjection.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <sstream>
+
+//ossimEpsgProjectionFactory* ossimEpsgProjectionFactory::m_instance = 0;
+
+//*************************************************************************************************
+//! Implements singleton pattern
+//*************************************************************************************************
+ossimEpsgProjectionFactory* ossimEpsgProjectionFactory::instance()
+{
+   static ossimEpsgProjectionFactory inst;
+   
+   return &inst;
+
+   //if(!m_instance)
+   //   m_instance = new ossimEpsgProjectionFactory;
+   //return m_instance;
+}
+
+//*************************************************************************************************
+//! Constructor loads all SRS CSV files specified in the ossim prefs
+//*************************************************************************************************
+ossimEpsgProjectionFactory::ossimEpsgProjectionFactory()
+{
+}
+
+//*************************************************************************************************
+//! From keywordlist
+//*************************************************************************************************
+ossimProjection* ossimEpsgProjectionFactory::createProjection(const ossimKeywordlist &keywordList,
+                                                             const char *prefix) const
+{
+    ossimProjection* proj = 0;
+
+   // Look for a PCS (Projected Coordinate System) code entry and construct the basic projection.
+   // This is the bootstrap for creating the fully-initialized proj:
+   ossimString proj_spec = keywordList.find(prefix, ossimKeywordNames::PCS_CODE_KW);
+   if(!proj_spec.empty())
+      proj = createProjection(proj_spec);
+  
+   if (!proj)
+   {
+      // An alternate way of specifying an EPSG projection is by its database name:
+      proj_spec = keywordList.find(prefix, ossimKeywordNames::PROJECTION_KW);
+      proj = createProjection(proj_spec);
+   }
+
+   if (!proj)
+      return NULL;
+
+   // The tie points and perhaps other params might still be in the KWL, so pass the KWL on to the
+   // new projection after it has been amended with the default proj info extracted from the 
+   // EPSG code (i.e., sans tiepoints and gsd):
+   ossimKeywordlist proj_kwl;
+   proj->saveState(proj_kwl, prefix);
+   proj_kwl.remove(prefix, ossimKeywordNames::PIXEL_SCALE_XY_KW);
+   proj_kwl.remove(prefix, ossimKeywordNames::PIXEL_SCALE_UNITS_KW);
+   proj_kwl.remove(prefix, ossimKeywordNames::TIE_POINT_XY_KW);
+   proj_kwl.remove(prefix, ossimKeywordNames::TIE_POINT_UNITS_KW);
+   proj_kwl.addList(keywordList, false); // false: do not override existing items
+   proj->loadState(proj_kwl, prefix);
+   
+   return proj;
+}
+
+//*************************************************************************************************
+// This is the principal factory method. It accepts a string in one of three formats:
+//
+//   1. <group>:<code>, for example "EPSG:32615"
+//   2. <code>, for example "32615", this is the CRS code ID for the projerection.
+//   3. AUTO:<comma-separated spec>, for specifying custom user-defined codes.
+//
+// Both projected and geographic (Platte Carre) codes are handled.
+//
+// IMPORTANT NOTE: Image tie-points cannot be conveyed by an EPSG projection code. The projection
+// created here will not be fully initialized for use in rendering imagery.
+//*************************************************************************************************
+ossimProjection* ossimEpsgProjectionFactory::createProjection(const ossimString &spec) const
+{
+   std::vector<ossimString> split_line;
+   
+   // Intercept custom codes here before resorting to the database. This really shouldn't be in this
+   // class but nobody else is parsing for it, so leave it here for now.
+   if (ossimString(spec).downcase().contains("auto"))
+   {
+      split_line = spec.after(":").explode(",");
+      return createProjFromAutoCode(split_line);
+   }
+
+   // Strip commonly found or bar '|' from end if present.
+   ossimString s = spec;
+   s.trim(ossimString("|"));
+
+   // Otherwise, pass along the request to the database object for record search:
+   return ossimEpsgProjectionDatabase::instance()->findProjection(s);
+}
+
+//*************************************************************************************************
+//! When the CRS is specified with the "AUTO:<spec>" code format, this method is invoked to
+//! parse the <spec> and produce a projection (or NULL if spec invalid):
+//*************************************************************************************************
+ossimMapProjection* 
+ossimEpsgProjectionFactory::createProjFromAutoCode(const std::vector<ossimString>& spec) const
+{
+   if (spec.size() < 3)
+      return 0;
+
+   ossim_uint32 code = spec[0].toUInt32();
+   ossimGpt origin (spec[2].toDouble(), spec[1].toDouble()) ;
+
+   // Only a few AUTO codes are considered:
+   switch(code)
+   {
+      case 42001:
+      {
+         ossimUtmProjection* utm = new ossimUtmProjection;
+         utm->setZone(origin);
+         utm->setHemisphere(origin);
+         utm->setOrigin(origin);
+         utm->update();
+         //utm->setPcsCode(42001);
+         return utm;
+      }
+      
+      case 42002:
+      {
+         ossimTransMercatorProjection* transMerc = new ossimTransMercatorProjection;
+         transMerc->setFalseNorthing(origin.latd()>=0.0?0.0:10000000.0);
+         transMerc->setOrigin(ossimGpt(0.0, origin.lond()));
+         transMerc->setScaleFactor(.9996);
+         transMerc->update();
+        // transMerc->setPcsCode(42002);
+         return transMerc;
+      }
+      
+      case 42003:
+      {
+         ossimOrthoGraphicProjection* ortho = new ossimOrthoGraphicProjection;
+         ortho->setOrigin(origin);
+         ortho->update();
+         //ortho->setPcsCode(42003);
+         return ortho;
+      }
+      
+      case 42004:
+      {
+         ossimEquDistCylProjection* geographic = new ossimEquDistCylProjection;
+         geographic->setOrigin(origin);
+         geographic->update();
+         //geographic->setPcsCode(42004);
+         return geographic;
+      }
+   }
+   return 0;
+}
+
+//*************************************************************************************************
+ossimObject* ossimEpsgProjectionFactory::createObject(const ossimString& typeName)const
+{
+   return createProjection(typeName);
+}
+
+//*************************************************************************************************
+ossimObject* ossimEpsgProjectionFactory::createObject(const ossimKeywordlist& kwl,
+                                                     const char* prefix)const
+{
+   return createProjection(kwl, prefix);
+}
+
+//*************************************************************************************************
+//! STUB. Not implemented
+//*************************************************************************************************
+ossimProjection* ossimEpsgProjectionFactory::createProjection(const ossimFilename& /* filename */,
+                                                              ossim_uint32 /* entryIdx */)const
+{
+   return 0;
+}
+
+//*************************************************************************************************
+//! This returns the type name of all objects in all factories. This is the name used to 
+//! construct the objects dynamically and this name must be unique.
+//*************************************************************************************************
+void ossimEpsgProjectionFactory::getTypeNameList(std::vector<ossimString>& typeList) const
+{
+   ossimEpsgProjectionDatabase::instance()->getProjectionsList(typeList);
+   return;
+}
+
diff --git a/ossim/src/ossim/projection/ossimEquDistCylProjection.cpp b/ossim/src/ossim/projection/ossimEquDistCylProjection.cpp
new file mode 100644
index 0000000..a8363b3
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimEquDistCylProjection.cpp
@@ -0,0 +1,680 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License:  See top LICENSE.txt file.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+// Calls Geotrans Equidistant Cylinder projection code.  
+//*******************************************************************
+//  $Id: ossimEquDistCylProjection.cpp 23373 2015-06-13 17:16:38Z okramer $
+
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/elevation/ossimElevManager.h>
+
+static ossimTrace traceDebug("ossimEquDistCylProjection:debug");
+
+RTTI_DEF1(ossimEquDistCylProjection,
+          "ossimEquDistCylProjection",
+	  ossimMapProjection);
+	  //          ossimLlxyProjection)
+   
+/***************************************************************************/
+/*
+ *                               DEFINES
+ */
+
+#ifndef PI_OVER_2
+#  define PI_OVER_2  ( M_PI / 2.0)
+#endif
+#ifndef TWO_PI
+#  define TWO_PI     (2.0 * M_PI)
+#endif
+#define ONE	   (1.0 * M_PI / 180.0)       /* 1 degree in radians*/
+
+#define EQCY_NO_ERROR           0x0000
+#define EQCY_LAT_ERROR          0x0001
+#define EQCY_LON_ERROR          0x0002
+#define EQCY_EASTING_ERROR      0x0004
+#define EQCY_NORTHING_ERROR     0x0008
+#define EQCY_ORIGIN_LAT_ERROR   0x0010
+#define EQCY_CENT_MER_ERROR     0x0020
+#define EQCY_A_ERROR            0x0040
+#define EQCY_B_ERROR            0x0080
+#define EQCY_A_LESS_B_ERROR     0x0100
+
+
+ossimEquDistCylProjection::ossimEquDistCylProjection(const ossimEllipsoid& ellipsoid,
+                                                     const ossimGpt& origin)
+//  :ossimLlxyProjection(ellipsoid, origin)
+  :ossimMapProjection(ellipsoid, origin)
+{
+   setDefaults();
+   update();
+}
+
+ossimEquDistCylProjection::ossimEquDistCylProjection(const ossimEllipsoid& ellipsoid,
+                                                     const ossimGpt& origin,
+                                                     double falseEasting,
+                                                     double falseNorthing)
+//  :ossimLlxyProjection(ellipsoid, origin)
+  :ossimMapProjection(ellipsoid, origin)
+{
+   Eqcy_False_Easting  = falseEasting;
+   Eqcy_False_Northing = falseNorthing;
+
+   Eqcy_Delta_Northing = 10007555.0;
+   Eqcy_Max_Easting    = 20015110.0;
+   Eqcy_Min_Easting    = -20015110.0;
+   
+   update();
+}
+
+void ossimEquDistCylProjection::update()
+{
+   Set_Equidistant_Cyl_Parameters(theEllipsoid.getA(),
+                                  theEllipsoid.getFlattening(),
+                                  theOrigin.latr(),
+                                  theOrigin.lonr(),
+                                  Eqcy_False_Easting,
+                                  Eqcy_False_Northing);
+
+   theFalseEastingNorthing.x = Eqcy_False_Easting;
+   theFalseEastingNorthing.y = Eqcy_False_Northing;
+
+   theMetersPerPixel.makeNan(); // force recompute by base class
+
+   ossimMapProjection::update();
+
+   // For geographic projection, the PCS EPSG code can be derived from the datum in most cases:
+   if ((thePcsCode == 0) && (theDatum != NULL))
+   {
+      ossim_uint32 datum_code = theDatum->epsgCode();
+      if ((datum_code >= 6000) && (datum_code < 7000))
+         thePcsCode = datum_code - 2000;
+   }
+
+   // Workaround for bug
+}
+
+void ossimEquDistCylProjection::setOrigin(const ossimGpt& origin)
+{
+   ossimMapProjection::setOrigin(origin); // breaks the projection
+   setUlTiePoints(theUlGpt); // needed to reset easting northing
+}
+
+void ossimEquDistCylProjection::setFalseEasting(double falseEasting)
+{
+   Eqcy_False_Easting = falseEasting;
+   update();
+}
+
+void ossimEquDistCylProjection::setFalseNorthing(double falseNorthing)
+{
+   Eqcy_False_Northing = falseNorthing;
+   update();
+}
+
+void ossimEquDistCylProjection::setFalseEastingNorthing(double falseEasting,
+                                                        double falseNorthing)
+{
+   Eqcy_False_Easting  = falseEasting;
+   Eqcy_False_Northing = falseNorthing;
+   
+   update();
+}
+
+void ossimEquDistCylProjection::setDefaults()
+{
+   theProjectionUnits = OSSIM_DEGREES;
+   Eqcy_False_Easting  = 0.0;
+   Eqcy_False_Northing = 0.0;
+   Eqcy_Delta_Northing = 10007555.0;
+   Eqcy_Max_Easting    = 20015110.0;
+   Eqcy_Min_Easting    = -20015110.0;
+}
+
+void ossimEquDistCylProjection::lineSampleHeightToWorld(const ossimDpt &lineSample,
+                                                        const double&  hgtEllipsoid,
+                                                        ossimGpt&      gpt)const
+{
+   //
+   // make sure that the passed in lineSample is good and
+   // check to make sure our easting northing is good so
+   // we can compute the line sample.
+   //
+   //
+   if(lineSample.hasNans())
+   {
+      gpt.makeNan();
+      return;
+   }
+   if(theModelTransformUnitType != OSSIM_UNIT_UNKNOWN)
+   {
+      ossimMapProjection::lineSampleHeightToWorld(lineSample, hgtEllipsoid, gpt);
+      return;
+   }
+   else
+   {
+      if(theUlEastingNorthing.hasNans())
+      {
+         gpt.makeNan();
+         return;
+      }
+      ossimDpt eastingNorthing;
+      
+      eastingNorthing = (theUlEastingNorthing);
+      
+      eastingNorthing.x += (lineSample.x*theMetersPerPixel.x);
+      
+      //
+      // Note:  the Northing is positive up.  In image space
+      // the positive axis is down so we must multiply by
+      // -1
+      //
+      eastingNorthing.y += (-lineSample.y*theMetersPerPixel.y);
+      
+      //
+      // now invert the meters into a ground point.
+      //
+      gpt = inverse(eastingNorthing);
+      gpt.datum(theDatum);
+      
+      if(gpt.isLatNan() && gpt.isLonNan())
+      {
+         gpt.makeNan();
+      }
+      else
+      {
+         // Finally assign the specified height:
+         gpt.hgt = hgtEllipsoid;
+      }
+   }
+   if(theElevationLookupFlag)
+   {
+      gpt.hgt = ossimElevManager::instance()->getHeightAboveEllipsoid(gpt);
+   }
+}
+
+void ossimEquDistCylProjection::worldToLineSample(const ossimGpt &worldPoint,
+                                                  ossimDpt&       lineSample)const
+{
+   if(theModelTransformUnitType != OSSIM_UNIT_UNKNOWN)
+   {
+      ossimMapProjection::worldToLineSample(worldPoint, lineSample);
+      return;
+   }
+   
+   // make sure our tie point is good and world point is good.
+   if(theUlEastingNorthing.isNan() || worldPoint.isLatNan() || worldPoint.isLonNan())
+   {
+      lineSample.makeNan();
+      return;
+   }
+
+   // see if we have a datum set and if so shift the world to our datum.  If not then
+   // find the easting northing value for the world point.
+   ossimDpt gptEastingNorthing;
+   if(theDatum)
+   {
+      ossimGpt gpt = worldPoint;
+      gpt.changeDatum(theDatum);
+      gptEastingNorthing = forward(gpt);
+   }
+   else
+   {
+      gptEastingNorthing = forward(worldPoint);
+   }
+
+   // check the final result to make sure there were no problems.
+   if(!gptEastingNorthing.isNan())
+   {
+      lineSample.x = ((gptEastingNorthing.x  - theUlEastingNorthing.x)/theMetersPerPixel.x);
+
+      // We must remember that the Northing is negative since the positive
+      // axis for an image is assumed to go down since it's image space.
+      lineSample.y = (-(gptEastingNorthing.y - theUlEastingNorthing.y)/theMetersPerPixel.y);
+   }
+}
+
+void ossimEquDistCylProjection::worldToLineSample( const ossimGpt& worldPoint,
+                                                   const ossimIpt& imageSize,
+                                                   ossimDpt&       lineSample ) const
+{
+   if( theModelTransformUnitType == OSSIM_UNIT_UNKNOWN )
+   {
+      // Make sure our points are good.
+      if( !theUlEastingNorthing.isNan() && !worldPoint.isLatNan() && !worldPoint.isLonNan() &&
+          !imageSize.isNan() )
+      {
+         ossimGpt gpt = worldPoint;
+
+         //---
+         // See if we have a datum set and if so shift the world to our datum.  If not then
+         // find the easting northing value for the world point.
+         if(theDatum)
+         {
+            gpt.changeDatum(theDatum);
+         }
+
+         // Convert to easting northing.
+         ossimDpt gptEastingNorthing = forward(gpt);
+
+         if( !gptEastingNorthing.isNan() )
+         {
+            if ( imageSize.x > 0.0 )
+            {
+               ossimGpt edge(gpt.lat, -180.0, 0.0);
+               ossimDpt leftProjectionEdge = forward(edge);
+               
+               edge.lon = 180;
+               ossimDpt rightProjectionEdge = forward(edge);
+
+               // Right edge Easting of image from tie.
+               ossim_float64 leftImageX = theUlEastingNorthing.x  - (0.5*theMetersPerPixel.x);
+               ossim_float64 rightImageX = leftImageX + (imageSize.x * theMetersPerPixel.x);
+
+               if ( rightImageX < rightProjectionEdge.x ) // Image edge left of date line.
+               {
+                  // Image does not cross the date line.
+                  lineSample.x =
+                     (gptEastingNorthing.x - theUlEastingNorthing.x) / theMetersPerPixel.x;
+               }
+               else // Crossed date line:
+               {
+                  // Normalize the right image point to account for wrap:
+                  ossim_float64 normRightX =
+                     rightImageX - rightProjectionEdge.x + leftProjectionEdge.x;
+
+                  if ( ( gptEastingNorthing.x >= leftImageX ) &&
+                       ( gptEastingNorthing.x <= rightProjectionEdge.x ) )
+                  {
+                     // Between tie and date line.
+                     lineSample.x =
+                        (gptEastingNorthing.x - theUlEastingNorthing.x)/theMetersPerPixel.x;
+                  }
+                  else if ( ( gptEastingNorthing.x >= leftProjectionEdge.x ) &&
+                            ( gptEastingNorthing.x <=  normRightX ) )
+                  {
+                     // Between date line and right image point.
+                     lineSample.x = ( rightProjectionEdge.x - theUlEastingNorthing.x +
+                                     gptEastingNorthing.x - leftProjectionEdge.x )/theMetersPerPixel.x;
+                  }
+                  else
+                  {
+                     // Point in between normalized right x and tie:
+                     ossim_float64 deltaToLeft  = theUlEastingNorthing.x - gptEastingNorthing.x;
+                     ossim_float64 deltaToRight = gptEastingNorthing.x - normRightX;
+                     
+                     // Make relative to the closest edge.
+                     if ( deltaToRight < deltaToLeft )
+                     {
+                        lineSample.x = (imageSize.x - 1) + deltaToRight/theMetersPerPixel.x;
+                     }
+                     else
+                     {
+                        lineSample.x = -(deltaToLeft/theMetersPerPixel.x );
+                     }
+                  }  
+               }
+              
+            } // Matches: if ( ( imageSize.x > 0.0 ) && ( imageSize.y > 0.0 ) )
+            else
+            {
+               lineSample.x = (gptEastingNorthing.x - theUlEastingNorthing.x)/theMetersPerPixel.x;
+            }
+            
+            // We must remember that the Northing is negative since the positive
+            // axis for an image is assumed to go down since it's image space.
+            lineSample.y = (theUlEastingNorthing.y - gptEastingNorthing.y) / theMetersPerPixel.y;
+            
+         } // Matches: if( !lineSample.isNan() )
+         
+      }
+      else // Some point we need has nans...
+      {
+         lineSample.makeNan();
+      }
+      
+   } // Matches: if( theModelTransformUnitType == OSSIM_UNIT_UNKNOWN )
+   else 
+   {
+      // Has transform:
+      ossimMapProjection::worldToLineSample(worldPoint, lineSample);
+   }
+
+} // End: ossimEquDistCylProjection::worldToLineSample(worldPoint, lineSample, imageSize)
+
+ossimGpt ossimEquDistCylProjection::inverse(const ossimDpt &eastingNorthing)const
+{
+   double lat = 0.0;
+   double lon = 0.0;
+
+   Convert_Equidistant_Cyl_To_Geodetic(eastingNorthing.x,
+                                       eastingNorthing.y,
+                                       &lat,
+                                       &lon);
+
+   return ossimGpt(lat*DEG_PER_RAD, lon*DEG_PER_RAD, 0.0, theDatum);
+}
+
+ossimDpt ossimEquDistCylProjection::forward(const ossimGpt &latLon)const
+{
+   double easting  = 0.0;
+   double northing = 0.0;
+   ossimGpt gpt = latLon;
+   
+   if (theDatum)
+   {
+      if (theDatum->code() != latLon.datum()->code())
+      {
+         gpt.changeDatum(theDatum); // Shift to our datum.
+      }
+   }
+
+   Convert_Geodetic_To_Equidistant_Cyl(gpt.latr(),
+                                       gpt.lonr(),
+                                       &easting,
+                                       &northing);
+   
+   return ossimDpt(easting, northing);
+}
+
+
+
+bool ossimEquDistCylProjection::saveState(ossimKeywordlist& kwl, const char* prefix) const
+{
+   return ossimMapProjection::saveState(kwl, prefix);
+}
+
+bool ossimEquDistCylProjection::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimEquDistCylProjection::loadState: Input keyword list is \n" << kwl << endl;
+   }
+
+   //   ossimLlxyProjection::loadState(kwl, prefix);
+   ossimMapProjection::loadState(kwl, prefix);
+   theProjectionUnits = OSSIM_DEGREES;
+
+   // Make sure the origin.lat is defined since it is needed to relate degrees/meter:
+   if (ossim::isnan(theOrigin.lat))
+   {
+      theOrigin.lat = theUlGpt.lat;
+      if (ossim::isnan(theOrigin.lat))
+         theOrigin.lat = 0.0;
+   }
+
+   // Make sure degrees per pixel is defined:
+   if (theDegreesPerPixel.hasNans() && !theMetersPerPixel.hasNans())
+      computeDegreesPerPixel();
+
+   const char* type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
+
+   setDefaults();
+   // make sure we are of the same type.  If we are then the easting
+   // northing values will make since
+   //
+   if(ossimString(type) == STATIC_TYPE_NAME(ossimEquDistCylProjection))
+   {
+      Eqcy_False_Easting  = theFalseEastingNorthing.x;
+      Eqcy_False_Northing = theFalseEastingNorthing.y;
+   }
+   else
+   {
+      theUlEastingNorthing.makeNan();
+   }
+   // finalize the initialization.
+   update();
+            
+   return true;
+}
+
+/***************************************************************************/
+/*
+ *                              FUNCTIONS
+ */
+
+
+long ossimEquDistCylProjection::Set_Equidistant_Cyl_Parameters(double a,
+                                                               double f,
+                                                               double Std_Parallel,
+                                                               double Central_Meridian,
+                                                               double False_Easting,
+                                                               double False_Northing)
+{ /* Begin Set_Equidistant_Cyl_Parameters */
+/*
+ * The function Set_Equidistant_Cyl_Parameters receives the ellipsoid parameters and
+ * projection parameters as inputs, and sets the corresponding state
+ * variables.  It also calculates the spherical radius of the sphere having 
+ * the same area as the ellipsoid.  If any errors occur, the error code(s) 
+ * are returned by the function, otherwise EQCY_NO_ERROR is returned.
+ *
+ *    a                 : Semi-major axis of ellipsoid, in meters   (input)
+ *    f                 : Flattening of ellipsoid						        (input)
+ *    Std_Parallel      : Latitude in radians at which the          (input)
+ *                          point scale factor is 1.0
+ *    Central_Meridian  : Longitude in radians at the center of     (input)
+ *                          the projection
+ *    False_Easting     : A coordinate value in meters assigned to the
+ *                          central meridian of the projection.     (input)
+ *    False_Northing    : A coordinate value in meters assigned to the
+ *                          standard parallel of the projection     (input)
+ */
+
+  double temp;
+//  double inv_f = 1 / f;
+  long Error_Code = EQCY_NO_ERROR;
+
+//   if (a <= 0.0)
+//   { /* Semi-major axis must be greater than zero */
+//     Error_Code |= EQCY_A_ERROR;
+//   }
+//   if ((inv_f < 250) || (inv_f > 350))
+//   { /* Inverse flattening must be between 250 and 350 */
+//     Error_Code |= EQCY_INV_F_ERROR;
+//   }
+//   if ((Std_Parallel < -PI_OVER_2) || (Std_Parallel > PI_OVER_2))
+//   { /* standard parallel out of range */
+//     Error_Code |= EQCY_STDP_ERROR;
+//   }
+//   if ((Central_Meridian < -PI) || (Central_Meridian > TWO_PI))
+//   { /* origin longitude out of range */
+//     Error_Code |= EQCY_CENT_MER_ERROR;
+//   }
+  if (!Error_Code)
+  { /* no errors */
+    Eqcy_a = a;
+    Eqcy_f = f;
+    es2 = 2 * Eqcy_f - Eqcy_f * Eqcy_f;
+    es4 = es2 * es2;
+    es6 = es4 * es2;
+    /* spherical radius */
+    Ra = Eqcy_a * (1.0 - es2 / 6.0 - 17.0 * es4 / 360.0 - 67.0 * es6 /3024.0);
+    Eqcy_Std_Parallel = Std_Parallel;
+    Cos_Eqcy_Std_Parallel = cos(Eqcy_Std_Parallel);
+    Ra_Cos_Eqcy_Std_Parallel = Ra * Cos_Eqcy_Std_Parallel;
+//    if (Central_Meridian > M_PI)
+//      Central_Meridian -= TWO_PI;
+    Eqcy_Origin_Long = Central_Meridian;
+    Eqcy_False_Easting = False_Easting;
+    Eqcy_False_Northing = False_Northing;
+    if (Eqcy_Origin_Long > 0)
+    {
+      Convert_Geodetic_To_Equidistant_Cyl(PI_OVER_2, Eqcy_Origin_Long - M_PI - ONE, &Eqcy_Max_Easting, &temp);
+      Convert_Geodetic_To_Equidistant_Cyl(PI_OVER_2, Eqcy_Origin_Long - M_PI, &Eqcy_Min_Easting, &temp);
+    }
+    else if (Eqcy_Origin_Long < 0)
+    {
+      Convert_Geodetic_To_Equidistant_Cyl(PI_OVER_2, Eqcy_Origin_Long + M_PI, &Eqcy_Max_Easting, &temp);
+      Convert_Geodetic_To_Equidistant_Cyl(PI_OVER_2, Eqcy_Origin_Long + M_PI + ONE, &Eqcy_Min_Easting, &temp);
+    }
+    else
+    {
+      Convert_Geodetic_To_Equidistant_Cyl(PI_OVER_2, M_PI, &Eqcy_Max_Easting, &temp);
+      Eqcy_Min_Easting = -Eqcy_Max_Easting;
+    }
+  } /* End if(!Error_Code) */
+  return (Error_Code);
+} /* End Set_Equidistant_Cyl_Parameters */
+
+
+void ossimEquDistCylProjection::Get_Equidistant_Cyl_Parameters(double *a,
+                                                               double *f,
+                                                               double *Std_Parallel,
+                                                               double *Central_Meridian,
+                                                               double *False_Easting,
+                                                               double *False_Northing)const
+{ /* Begin Get_Equidistant_Cyl_Parameters */
+/*
+ * The function Get_Equidistant_Cyl_Parameters returns the current ellipsoid
+ * parameters and Equidistant Cylindrical projection parameters.
+ *
+ *    a                 : Semi-major axis of ellipsoid, in meters   (output)
+ *    f                 : Flattening of ellipsoid						        (output)
+ *    Std_Parallel      : Latitude in radians at which the          (output)
+ *                          point scale factor is 1.0
+ *    Central_Meridian  : Longitude in radians at the center of     (output)
+ *                          the projection
+ *    False_Easting     : A coordinate value in meters assigned to the
+ *                          central meridian of the projection.     (output)
+ *    False_Northing    : A coordinate value in meters assigned to the
+ *                          standard parallel of the projection     (output)
+ */
+
+  *a = Eqcy_a;
+  *f = Eqcy_f;
+  *Std_Parallel = Eqcy_Std_Parallel;
+  *Central_Meridian = Eqcy_Origin_Long;
+  *False_Easting = Eqcy_False_Easting;
+  *False_Northing = Eqcy_False_Northing;
+  return;
+} /* End Get_Equidistant_Cyl_Parameters */
+
+
+long ossimEquDistCylProjection::Convert_Geodetic_To_Equidistant_Cyl (double Latitude,
+                                                                     double Longitude,
+                                                                     double *Easting,
+                                                                     double *Northing)const
+   
+{ /* Begin Convert_Geodetic_To_Equidistant_Cyl */
+/*
+ * The function Convert_Geodetic_To_Equidistant_Cyl converts geodetic (latitude and
+ * longitude) coordinates to Equidistant Cylindrical projection (easting and northing)
+ * coordinates, according to the current ellipsoid, spherical radiius
+ * and Equidistant Cylindrical projection parameters.
+ * If any errors occur, the error code(s) are returned by the
+ * function, otherwise EQCY_NO_ERROR is returned.
+ *
+ *    Latitude          : Latitude (phi) in radians           (input)
+ *    Longitude         : Longitude (lambda) in radians       (input)
+ *    Easting           : Easting (X) in meters               (output)
+ *    Northing          : Northing (Y) in meters              (output)
+ */
+
+  double dlam;     /* Longitude - Central Meridan */
+  long Error_Code = EQCY_NO_ERROR;
+
+//   if ((Latitude < -PI_OVER_2) || (Latitude > PI_OVER_2))
+//   {  /* Latitude out of range */
+//     Error_Code |= EQCY_LAT_ERROR;
+//   }
+//   if ((Longitude < -M_PI) || (Longitude > TWO_PI))
+//   {  /* Longitude out of range */
+//     Error_Code|= EQCY_LON_ERROR;
+//   }
+
+  if (!Error_Code)
+  { /* no errors */
+    dlam = Longitude - Eqcy_Origin_Long;
+    if (dlam >= TWO_PI)
+    {
+      dlam -= TWO_PI;
+    }
+    if (dlam <= -TWO_PI)
+    {
+      dlam += TWO_PI;
+    }
+
+    *Easting = Ra_Cos_Eqcy_Std_Parallel * dlam + Eqcy_False_Easting;
+    *Northing = Ra * Latitude + Eqcy_False_Northing;
+
+  }
+  return (Error_Code);
+
+} /* End Convert_Geodetic_To_Equidistant_Cyl */
+
+
+long ossimEquDistCylProjection::Convert_Equidistant_Cyl_To_Geodetic(double Easting,
+                                                                    double Northing,
+                                                                    double *Latitude,
+                                                                    double *Longitude)const
+{ /* Begin Convert_Equidistant_Cyl_To_Geodetic */
+/*
+ * The function Convert_Equidistant_Cyl_To_Geodetic converts Equidistant Cylindrical projection
+ * (easting and northing) coordinates to geodetic (latitude and longitude)
+ * coordinates, according to the current ellipsoid, spherical radius
+ * and Equidistant Cylindrical projection coordinates.
+ * If any errors occur, the error code(s) are returned by the
+ * function, otherwise EQCY_NO_ERROR is returned.
+ *
+ *    Easting           : Easting (X) in meters                  (input)
+ *    Northing          : Northing (Y) in meters                 (input)
+ *    Latitude          : Latitude (phi) in radians              (output)
+ *    Longitude         : Longitude (lambda) in radians          (output)
+ */
+
+  double dx, dy;
+  long Error_Code = EQCY_NO_ERROR;
+
+//   if ((Easting < (Eqcy_False_Easting + Eqcy_Min_Easting))
+//       || (Easting > (Eqcy_False_Easting + Eqcy_Max_Easting)))
+//   { /* Easting out of range */
+//     Error_Code |= EQCY_EASTING_ERROR;
+//   }
+//   if ((Northing < (Eqcy_False_Northing - Eqcy_Delta_Northing))
+//       || (Northing > (Eqcy_False_Northing + Eqcy_Delta_Northing)))
+//   { /* Northing out of range */
+//     Error_Code |= EQCY_NORTHING_ERROR;
+//   }
+
+  if (!Error_Code)
+  {
+    dy = Northing - Eqcy_False_Northing;
+    dx = Easting - Eqcy_False_Easting;
+    *Latitude = dy / Ra;
+
+    if (Ra_Cos_Eqcy_Std_Parallel == 0)
+      *Longitude = 0;
+    else
+      *Longitude = Eqcy_Origin_Long + dx / Ra_Cos_Eqcy_Std_Parallel;
+
+//     if (*Latitude > PI_OVER_2)  /* force distorted values to 90, -90 degrees */
+//       *Latitude = PI_OVER_2;
+//     else if (*Latitude < -PI_OVER_2)
+//       *Latitude = -PI_OVER_2;
+
+//    if (*Longitude > PI)
+//      *Longitude -= TWO_PI;
+//    if (*Longitude < -PI)
+//      *Longitude += TWO_PI;
+
+//    if (*Longitude > PI)  /* force distorted values to 180, -180 degrees */
+//      *Longitude = PI;
+//    else if (*Longitude < -PI)
+//      *Longitude = -PI;
+
+  }
+  return (Error_Code);
+
+} /* End Convert_Equidistant_Cyl_To_Geodetic */
diff --git a/ossim/src/ossim/projection/ossimFcsiModel.cpp b/ossim/src/ossim/projection/ossimFcsiModel.cpp
new file mode 100644
index 0000000..6f6a96f
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimFcsiModel.cpp
@@ -0,0 +1,1064 @@
+//*****************************************************************************
+// FILE: ossimFcsiModel.cc
+//
+// Copyright (C) 2001 ImageLinks, Inc.
+//
+// MIT
+//
+// AUTHOR: Oscar Kramer (okramer at imagelinks.com)
+//
+// DESCRIPTION: Contains sensor model implementation for "Frame Camera Scanned
+//   Image" (FCSI, pronounced "foxy"). 
+//   
+//   This model represents image data that was scanned from film exposed by a
+//   conventional aerial frame camera. The data members defined in this class
+//   represent the fundamental quantities needed for the transformation.
+//   Typically, a different set of parameters will be provided in the metadata.
+//   An interface (support data) class will need to be implemented to convert
+//   a particular system's format to the quantities needed by this model.
+// 
+//   Coordinate systems in use are described here:
+//
+//   Pixel    -- line/sample in the digital image. The origin of this system is
+//               the upper left corner of the image, and represents a LEFT-
+//               HANDED coordinate system with Y (line) positive down and X
+//               (sample) positive to the right.
+//
+//   Film     -- x, y related to pixel space by affine transform (which includes
+//               mirror reflection due to left-handed system above) represented
+//               by thePrincipalPoint and the theScanXformMatrix. The latter
+//               contains scale, skew, and rotation/reflection. The film
+//               coordinates are adjusted for radial and decentering distortion.
+//
+//   Camera/  -- 3D system containing film plane and optical (Z) axis. Given the
+//   Platform    focal length (Z) and the film point (X,Y), a 3D ray direction
+//               is established in this space. This space is also termed "LSR"
+//               in the code. If there is a rotation between the film/optical
+//               axes and the platform (interior orientation), then that
+//               transformation must be included as part of the LSR-to-ECF
+//               rotation by the metadata reader object.
+//
+//   ECF      -- Universal earth frame of reference. The imaging ray direction
+//               is transformed from Camera space to ECF by theAdjLsrToEcfRot.
+//
+//   There are two rotations to go from Camera to ECF. First is the initial
+//   camera orientation as derived from the metadata, combining the interior
+//   orientation (relation between camera and platform) and the exterior
+//   orientation dependent on the platform attitude w.r.t. the ECF system.
+//   The second rotation is a differential rotation due to the attitude
+//   adjustable params. These are arbitrarily taken as rotations about the ECF
+//   XYZ axes, not the platform attitude axes of roll/pitch/yaw. The
+//   combined rotation is stored in theAdjLsrToEcfRot, which is precomputed
+//   in updateModel() once with each adjustment.
+//
+//   When the time comes to incorporate least-squares parameter adjustment, care
+//   must be taken to propagate the a priori sigmas for position and attitude
+//   (including both internal and external orientation angles) into the ECF
+//   coordinates. This also applies to the affine transform parameters used in
+//   transforming pixels to film coordinates. The propagated uncertainties can
+//   then be used to assign the adjustable parameter sigmas array (and
+//   covariance when we get to that...)
+//
+// SOFTWARE HISTORY:
+//   16JAN2003  Oscar Kramer, ImageLinks
+//              Initial coding
+//
+//*****************************************************************************
+// $Id: ossimFcsiModel.cpp 23666 2015-12-14 20:01:22Z rashadkm $
+
+#include <cstdlib>
+#include <fstream>
+#include <sstream>
+
+#include <ossim/projection/ossimFcsiModel.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimEcefRay.h>
+
+RTTI_DEF1(ossimFcsiModel, "ossimFcsiModel", ossimSensorModel);
+
+//***
+// Define Trace flags for use within this file:
+//***
+#include <ossim/base/ossimTrace.h>
+static ossimTrace traceExec  ("ossimFcsiModel:exec");
+static ossimTrace traceDebug ("ossimFcsiModel:debug");
+
+//***
+// File-scope constants:
+//***
+static const int MODEL_VERSION_NUMBER  = 1;
+static const ossimString PARAM_NAMES[] ={"x_pos_offset",
+                                         "y_pos_offset",
+                                         "z_pos_offset",
+                                         "x_rot_corr",
+                                         "y_rot_corr",
+                                         "z_rot_corr",
+                                         "foc_len_offset",
+                                         "scan_skew_corr"};
+static const ossimString PARAM_UNITS[] ={"meters",
+                                         "meters",
+                                         "meters",
+                                         "degrees",
+                                         "degress",
+                                         "degress",
+                                         "millimeters",
+                                         "degrees"};
+
+//***
+// Public FCSI Keywords:
+//***
+const char* ossimFcsiModel::PRINCIPAL_POINT_X_KW   = "principal_point_x";
+const char* ossimFcsiModel::PRINCIPAL_POINT_Y_KW   = "principal_point_y";
+const char* ossimFcsiModel::SCAN_SCALE_MATRIX_00_KW = "scan_scale_matrix_00";
+const char* ossimFcsiModel::SCAN_SCALE_MATRIX_01_KW = "scan_scale_matrix_01";
+const char* ossimFcsiModel::SCAN_SCALE_MATRIX_10_KW = "scan_scale_matrix_10";
+const char* ossimFcsiModel::SCAN_SCALE_MATRIX_11_KW = "scan_scale_matrix_11";
+const char* ossimFcsiModel::SCAN_ROTATION_ANGLE_KW = "scan_rotation_angle";
+const char* ossimFcsiModel::SCAN_SKEW_ANGLE_KW     = "scan_skew_angle";
+const char* ossimFcsiModel::FOCAL_LENGTH_KW        = "focal_length";
+const char* ossimFcsiModel::PLATFORM_POSITION_X_KW = "platform_position_x";
+const char* ossimFcsiModel::PLATFORM_POSITION_Y_KW = "platform_position_y";
+const char* ossimFcsiModel::PLATFORM_POSITION_Z_KW = "platform_position_z";
+const char* ossimFcsiModel::CAMERA_ORIENTATION_MATRIX_ELEM_KW
+                               = "camera_orientation_matrix_elem_";
+
+//*****************************************************************************
+//  DEFAULT CONSTRUCTOR: ossimFcsiModel()
+//
+//  Note: Using this constructor results in an uninitialized model. It is
+//  expected that either a loadState with valid keywordlist is called, or that
+//  the individual set-methods (including the base-class' set methods are
+//  called. When set-methods are used, a final call to completeInitialization()
+//  (declared in ossimSensorModel) is required to give the model a chance to
+//  "digest" the values previously set.
+//  
+//*****************************************************************************
+ossimFcsiModel::ossimFcsiModel()
+   :
+   ossimSensorModel       (),
+   thePrincipalPoint      (0, 0),
+   theScanSkew            (0.0),  
+   theScanRotation        (0.0),
+   theOpticalDistortion   (0),
+   theLsrToEcfRot         (3, 3),
+   theEcfOffset           (0, 0, 0),
+   theXrotCorr            (0.0),
+   theYrotCorr            (0.0),
+   theZrotCorr            (0.0),
+   theFocalOffset         (0.0),
+   theScanSkewCorr        (0.0),
+   theAdjLsrToEcfRot      (3, 3),
+   theAdjEcfToLsrRot      (3, 3)
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::ossimFcsiModel: entering..." << std::endl;
+   theScanScaleMatrix[0] = 1.0;
+   theScanScaleMatrix[1] = 0.0;
+   theScanScaleMatrix[2] = 0.0;
+   theScanScaleMatrix[3] = 1.0;
+   theScanXformMatrix[0] = 1.0;
+   theScanXformMatrix[1] = 0.0;
+   theScanXformMatrix[2] = 0.0;
+   theScanXformMatrix[3] = 1.0;
+   initAdjustableParameters();
+   setErrorStatus(); // indicate uninitialized
+   
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::ossimFcsiModel: returning..." << std::endl;
+}
+
+//*****************************************************************************
+//  CONSTRUCTOR: ossimFcsiModel(filename)
+//  
+//  Constructs model from a keywordlist filename
+//  
+//*****************************************************************************
+ossimFcsiModel::ossimFcsiModel(const ossimFilename& init_file)
+   :
+   ossimSensorModel       (),
+   thePrincipalPoint      (0, 0),
+   theScanSkew            (0.0),  
+   theScanRotation        (0.0),
+   theOpticalDistortion   (0),
+   theLsrToEcfRot         (3, 3),
+   theEcfOffset           (0, 0, 0),
+   theXrotCorr            (0.0),
+   theYrotCorr            (0.0),
+   theZrotCorr            (0.0),
+   theFocalOffset         (0.0),
+   theScanSkewCorr        (0.0),
+   theAdjLsrToEcfRot      (3, 3),
+   theAdjEcfToLsrRot      (3, 3)
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::ossimFcsiModel: entering..." << std::endl;
+
+   initAdjustableParameters();
+   ossimKeywordlist kwl (init_file);
+   loadState(kwl);
+
+   if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::ossimFcsiModel: Exited..." << std::endl;
+}
+
+//*****************************************************************************
+//  CONSTRUCTOR: ossimFcsiModel(kwl)
+//  
+//  Constructs model from keywordlist geometry file
+//  
+//*****************************************************************************
+ossimFcsiModel::ossimFcsiModel(const ossimKeywordlist& geom_kwl)
+   :
+   ossimSensorModel       (),
+   thePrincipalPoint      (0, 0),
+   theScanSkew            (0.0),  
+   theScanRotation        (0.0),
+   theOpticalDistortion   (0),
+   theLsrToEcfRot         (3, 3),
+   theEcfOffset           (0, 0, 0),
+   theXrotCorr            (0.0),
+   theYrotCorr            (0.0),
+   theZrotCorr            (0.0),
+   theFocalOffset         (0.0),
+   theScanSkewCorr        (0.0),
+   theAdjLsrToEcfRot      (3, 3),
+   theAdjEcfToLsrRot      (3, 3)
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::ossimFcsiModel: entering..." << std::endl;
+
+   initAdjustableParameters();
+   loadState(geom_kwl);
+
+   if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::ossimFcsiModel: Exited..." << std::endl;
+}
+
+//*****************************************************************************
+//  COPY CONSTRUCTOR: 
+//*****************************************************************************
+ossimFcsiModel::ossimFcsiModel(const ossimFcsiModel& foxy)
+   :
+   ossimSensorModel     (foxy),
+   thePrincipalPoint    (foxy.thePrincipalPoint),
+   theScanSkew          (foxy.theScanSkew),  
+   theScanRotation      (foxy.theScanRotation),
+   theFocalLen          (foxy.theFocalLen),
+   thePlatformPos       (foxy.thePlatformPos),
+   theLsrToEcfRot       (foxy.theLsrToEcfRot),
+   theEcfOffset         (foxy.theEcfOffset),
+   theXrotCorr          (foxy.theXrotCorr),
+   theYrotCorr          (foxy.theYrotCorr),
+   theZrotCorr          (foxy.theZrotCorr),
+   theFocalOffset       (foxy.theFocalOffset),
+   theScanSkewCorr      (foxy.theScanSkewCorr)
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::ossimFcsiModel: entering..." << std::endl;
+
+   if(foxy.theOpticalDistortion)
+   {
+      //
+      // Finish the copy:
+      //
+      theOpticalDistortion =
+         new ossimRadialDecentLensDistortion (*(foxy.theOpticalDistortion));
+   }
+
+   for (int i=0; i<4; i++)
+      theScanScaleMatrix[i] = foxy.theScanScaleMatrix[i];
+
+   //***
+   // Compute quantities derived from adjustables:
+   //***
+   updateModel();
+   
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::ossimFcsiModel: returning..." << std::endl;
+}
+
+//*****************************************************************************
+//  METHOD: ossimFcsiModel::lineSampleHeightToWorld()
+//  
+//  Performs the line/sample to groundpoint projection given an elevation.
+//
+//  1. Compute ECF Imaging ray (see imagingRay() method below)
+//  5. Intersect imaging ray with elevation surface.
+//
+//*****************************************************************************
+void ossimFcsiModel::lineSampleHeightToWorld(const ossimDpt& image_point,
+                                             const double&   height,
+                                             ossimGpt&       gpt) const
+{
+   bool debug = false;  // setable via interactive debugger
+   if (traceExec() || debug)  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::ossimFcsiModel: entering..." << std::endl;
+   
+   //***
+   // Extrapolate if point is outside image:
+   //***
+   if (!insideImage(image_point))
+   {
+      gpt = extrapolate(image_point, height);
+   }
+
+   else
+   {
+      //***
+      // First establish imaging ray from image point:
+      //***
+      ossimEcefRay imaging_ray;
+      imagingRay(image_point, imaging_ray);
+      ossimEcefPoint Pecf (imaging_ray.intersectAboveEarthEllipsoid(height));
+      gpt = ossimGpt(Pecf);
+
+      if (traceDebug() || debug)
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << "Pecf = " << Pecf << std::endl;
+         ossimNotify(ossimNotifyLevel_DEBUG) << "gpt = " << gpt << std::endl;
+      }
+   }
+
+   if (traceExec() || debug)  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::ossimFcsiModel: returning..." << std::endl;
+}
+   
+   
+//*****************************************************************************
+//  METHOD: ossimFcsiModel::imagingRay()
+//
+//  Establishes an origin (at the platform position) and direction of the
+//  imaging ray as follows:
+//
+//  1. Remove any pixel offset into the image (in the case where the digital
+//     image is a sub-image of a larger scan).
+//  2. Transform pixel coordinates to film point (with inherent lens distortion)
+//  3. Remove radial and decentering lens distortion to arrive at ideal film
+//     coordinates.
+//  4. Establish an internal imaging ray direction vector given the focal length
+//  5. Transform ray direction vector to ECF coordinates and assign origin.
+//
+//*****************************************************************************
+void ossimFcsiModel::imagingRay(const ossimDpt& image_point,
+                                ossimEcefRay&   image_ray) const
+{
+   bool debug = false;  // setable via interactive debugger: "set debug = true"
+   if (traceExec() || debug)  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::imagingRay: entering..." << std::endl;
+   
+   //***
+   // In case this is a sub-image of a full image scan, need to add the
+   // sub-image offset maintained in the base-class:
+   //***
+   ossimDpt p0 (image_point + theSubImageOffset);
+
+   if (traceDebug() || debug)
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "image_point = " << image_point << std::endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "theSubImageOffset = " << theSubImageOffset << std::endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "p0 = " << p0 << std::endl;
+   }
+   
+   //***
+   // Apply pixel to film coordinates affine transform:
+   //***
+   ossimDpt p1 (p0 - theRefImgPt);
+   ossimDpt f1 (theScanXformMatrix[0]*p1.x + theScanXformMatrix[1]*p1.y,
+                theScanXformMatrix[2]*p1.x + theScanXformMatrix[3]*p1.y);
+   ossimDpt film (f1 - thePrincipalPoint);
+   if (traceDebug() || debug)
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "theRefImgPt = " << theRefImgPt << std::endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "p1 = " << p1 << std::endl;
+      for (int i=0; i<4; i++)
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << "theScanXformMatrix["<<i<<"] = "<<theScanXformMatrix[i] << std::endl;
+      }
+      ossimNotify(ossimNotifyLevel_DEBUG) << "f1 = " << f1 << std::endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "thePrincipalPoint = " << thePrincipalPoint << std::endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "film (distorted) = " << film << std::endl;
+   }
+
+   //***
+   // Correct film point for optical (radial, decentering) distortion:
+   //***
+   if (theOpticalDistortion)
+      theOpticalDistortion->inverse(film);
+   if (traceDebug() || debug)
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "film (undistorted) = " << film << std::endl;
+      if(theOpticalDistortion)
+      {
+         theOpticalDistortion->print(ossimNotify(ossimNotifyLevel_DEBUG));
+      }
+   }
+   
+   //***
+   // Establish image ray in  camera-space (LSR) coordinates, then rotate to the
+   // ECF. This rotation contains interior orientation, exterior orientation,
+   // and attitude correction:
+   //***
+   ossimColumnVector3d cam_ray_dir (film.x, film.y, -theAdjFocalLen);
+   ossimEcefVector ecf_ray_dir (theAdjLsrToEcfRot*cam_ray_dir);
+   ecf_ray_dir = ecf_ray_dir*(1.0/ecf_ray_dir.magnitude());
+   if (traceDebug() || debug)
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "theAdjFocalLen = " << theAdjFocalLen << std::endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "cam_ray_dir = " << cam_ray_dir << std::endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "theAdjLsrToEcfRot = \n" << theAdjLsrToEcfRot << std::endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ecf_ray_dir = " << ecf_ray_dir << std::endl;
+   }
+   
+   //***
+   // Establish ECF Ray object to represent imaging ray:
+   //***
+   image_ray.setOrigin(theAdjPlatformPos);
+   image_ray.setDirection(ecf_ray_dir);
+   if (traceDebug() || debug)
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "theAdjPlatformPos = " << theAdjPlatformPos << std::endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "theAdjPlatformPos (ossimGpt): " << ossimGpt(theAdjPlatformPos)
+                                          << std::endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "image_ray = " << image_ray << std::endl;
+   }
+
+   if (traceExec() || debug)  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::imagingRay: returning..." << std::endl;
+}
+
+//*****************************************************************************
+//  METHOD ossimFcsiModel::worldToLineSample()
+//
+//  Rigorous inverse transform overrides base-class iterative solution. It
+//  implements the exact reverse transform as imagingRay() above.
+//  
+//*****************************************************************************
+void ossimFcsiModel::worldToLineSample(const ossimGpt& world_point,
+                                       ossimDpt&       image_point) const
+{
+   bool debug = false;  // setable via interactive debugger: "set debug = true"
+   if (traceExec() || debug)  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::imagingRay: entering..." << std::endl;
+
+   //***
+   // Establish ECF ray from platform to ground point and rotate to platform LSR
+   //***
+   ossimEcefPoint g_ecf (world_point);
+   ossimEcefVector ecf_ray_dir (g_ecf - theAdjPlatformPos);
+   ossimColumnVector3d cam_ray_dir (theAdjEcfToLsrRot*ecf_ray_dir.data());
+
+   if (traceDebug() || debug)
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)<<"world_point = " << world_point << endl;
+      ossimNotify(ossimNotifyLevel_DEBUG)<<"g_ecf = " << g_ecf << endl;
+      ossimNotify(ossimNotifyLevel_DEBUG)<<"theAdjPlatformPos = " << theAdjPlatformPos << endl;
+      ossimNotify(ossimNotifyLevel_DEBUG)<<"theAdjPlatformPos (ossimGpt): "<<ossimGpt(theAdjPlatformPos)<<endl;
+      ossimNotify(ossimNotifyLevel_DEBUG)<<"ecf_ray_dir = " << ecf_ray_dir.unitVector() << endl;
+      ossimNotify(ossimNotifyLevel_DEBUG)<<"theAdjEcfToLsrRot = \n" << theAdjEcfToLsrRot << endl;
+      ossimNotify(ossimNotifyLevel_DEBUG)<<"cam_ray_dir = " << cam_ray_dir << endl;
+   }
+      
+   //***
+   // Scale the direction vector by the focal length to arrive at  film
+   // coordinates:
+   //***
+   double scale = -theAdjFocalLen/cam_ray_dir[2];
+   ossimDpt film (scale*cam_ray_dir[0], scale*cam_ray_dir[1]);
+
+   if (traceDebug() || debug)
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "theAdjFocalLen = " << theAdjFocalLen << endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "scale = " << scale << endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "film (undistorted) = " << film << endl;
+   }
+      
+   //***
+   // Add distortion:
+   //***
+   if (theOpticalDistortion)
+      theOpticalDistortion->forward(film);
+   
+   if (traceDebug() || debug)
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "film (distorted) = " << film << endl;
+   }
+      
+   //***
+   // Apply film to pixel coordinates affine transform:
+   //***
+   ossimDpt f1(film + thePrincipalPoint);
+   ossimDpt p1(theInvScanXformMatrix[0]*f1.x+theInvScanXformMatrix[1]*f1.y,
+               theInvScanXformMatrix[2]*f1.x+theInvScanXformMatrix[3]*f1.y);
+   ossimDpt p0 (p1 + theRefImgPt);
+
+   if (traceDebug() || debug)
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "thePrincipalPoint = " << thePrincipalPoint << endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "f1 = " << f1 << endl;
+      for (int i=0; i<4; i++)
+         ossimNotify(ossimNotifyLevel_DEBUG)<<"theInvScanXformMatrix["<<i<<"] = "<<theInvScanXformMatrix[i]
+             <<endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "p1 = " << p1 << endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "theRefImgPt = " << theRefImgPt << endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "p0 = " << p0 << endl;
+   }
+      
+   //***
+   // Finally, apply the sub-image offset to get to digital image coordinates:
+   //***
+   image_point = p0 - theSubImageOffset;
+   
+   if (traceDebug() || debug)
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "theImageOffset = " << theSubImageOffset << endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "image_point = " << image_point << endl;
+   }
+   
+   if (traceExec() || debug)  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::imagingRay: returning..." << std::endl;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimFcsiModel::print()
+//  
+//  Formatted dump of data members.
+//  
+//*****************************************************************************
+std::ostream& ossimFcsiModel::print(std::ostream& out) const
+{
+   out << "\nDump of ossimFcsiModel object at " << hex << this << ":\n"
+       << "\nossimFcsiModel data members: "
+       << "\n        thePrincipalPoint: " << thePrincipalPoint
+       << "\n        theScanScaleMatrix: " << theScanScaleMatrix[0] << "  "
+       << theScanScaleMatrix[1]
+       << "\n                            " << theScanScaleMatrix[2] << "  "
+       << theScanScaleMatrix[3]
+       << "\n          theScanSkew: " << theScanSkew
+       << "\n      theScanRotation: " << theScanRotation;
+
+   for (int i=0; i<4; ++i)
+   {
+      out << "\ntheScanXformMatrix["<<i<<"]: " << theScanXformMatrix[i];
+   }
+
+   out << "\n          theFocalLen: " << theFocalLen
+       << "\n       thePlatformPos: " << thePlatformPos
+       << "\n       theLsrToEcfRot: \n"  << theLsrToEcfRot
+       << "\n    theAdjLsrToEcfRot: \n" << theAdjLsrToEcfRot
+       << "\n         theEcfOffset: " << theEcfOffset
+       << "\n          theXrotCorr: " << theXrotCorr
+       << "\n          theYrotCorr: " << theYrotCorr
+       << "\n          theZrotCorr: " << theZrotCorr
+       << "\n       theFocalOffset: " << theFocalOffset
+       << "\n      theScanSkewCorr: " << theScanSkewCorr
+       << endl;
+   
+   if (theOpticalDistortion)
+   {
+      out << *theOpticalDistortion << endl;
+   }
+
+   return ossimSensorModel::print(out);
+}
+
+//*****************************************************************************
+//  METHOD: ossimFcsiModel::saveState()
+//  
+//  Saves the model state to the KWL. This KWL also serves as a geometry file.
+//  
+//*****************************************************************************
+bool ossimFcsiModel::saveState(ossimKeywordlist& kwl,
+                              const char* prefix) const
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::saveState: entering..." << std::endl;
+
+   kwl.add(prefix, ossimKeywordNames::TYPE_KW, "ossimFcsiModel");
+
+   //***
+   // Hand off to base class for common stuff:
+   //***
+   ossimSensorModel::saveState(kwl, prefix);
+
+   //***
+   // Save off data members:
+   //***
+   kwl.add(prefix, PRINCIPAL_POINT_X_KW,    thePrincipalPoint.x);
+   kwl.add(prefix, PRINCIPAL_POINT_Y_KW,    thePrincipalPoint.y);
+   kwl.add(prefix, SCAN_SCALE_MATRIX_00_KW, theScanScaleMatrix[0]);
+   kwl.add(prefix, SCAN_SCALE_MATRIX_01_KW, theScanScaleMatrix[1]);
+   kwl.add(prefix, SCAN_SCALE_MATRIX_10_KW, theScanScaleMatrix[2]);
+   kwl.add(prefix, SCAN_SCALE_MATRIX_11_KW, theScanScaleMatrix[3]);
+   kwl.add(prefix, SCAN_SKEW_ANGLE_KW,      theScanSkew);
+   kwl.add(prefix, SCAN_ROTATION_ANGLE_KW,  theScanRotation);
+   kwl.add(prefix, FOCAL_LENGTH_KW,         theFocalLen);
+   kwl.add(prefix, PLATFORM_POSITION_X_KW,
+           thePlatformPos.x());
+   kwl.add(prefix, PLATFORM_POSITION_Y_KW,
+           thePlatformPos.y());
+   kwl.add(prefix, PLATFORM_POSITION_Z_KW,
+           thePlatformPos.z());
+
+   //***
+   // Camera orientation matrix:
+   // i is row and j is column
+   //***
+   for (int i=0; i<3; i++)
+   {
+      for (int j=0; j<3; j++)
+      {
+         ostringstream ostr;
+         ostr << CAMERA_ORIENTATION_MATRIX_ELEM_KW
+              << i << "_" << j << ends;
+         kwl.add(prefix, ostr.str().c_str(), theLsrToEcfRot[i][j]);
+      }
+   }
+   
+   //***
+   // Optical distortion coefficients:
+   //***
+   if (theOpticalDistortion)
+   {
+      ostringstream ostr;
+      ostr << prefix << "distortion." << ends;
+      theOpticalDistortion->saveState(kwl, ostr.str().c_str());
+   }
+   
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::saveState: returning..." << std::endl;
+   return true;
+}
+
+//*****************************************************************************
+//  METHOD: ossimFcsiModel::loadState()
+//  
+//  Restores the model's state from the KWL. This KWL also serves as a
+//  geometry file.
+//  
+//*****************************************************************************
+bool ossimFcsiModel::loadState(const ossimKeywordlist& kwl,
+                               const char* prefix) 
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::loadState: entering..." << std::endl;
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:"
+                                          << "\nInput kwl:  " << kwl
+                                          << std::endl;
+   }
+
+   const char* value;
+   const char* keyword;
+   bool success;
+
+   //***
+   // Assure this keywordlist contains correct type info:
+   //***
+   keyword = ossimKeywordNames::TYPE_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "Type name not found");
+      return false;
+      
+   }
+   if (strcmp(value, TYPE_NAME(this)))
+   {
+      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::saveState: returning..." << std::endl;
+      return false;
+   }
+      
+   //***
+   // Clear out any existing adjustable params:
+   //***
+   
+   //***
+   // Pass on to the base-class for parsing first:
+   //***
+   success = ossimSensorModel::loadState(kwl, prefix);
+   if (!success)
+   {
+      return false;
+   }
+   if(!getNumberOfAdjustableParameters())
+   {
+      initAdjustableParameters();
+   }
+
+   //***
+   // Now begin loading data members:
+   //***
+   keyword = PRINCIPAL_POINT_X_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "principle point x not given");
+      return false;
+   }
+   thePrincipalPoint.x = atof(value);
+ 
+   keyword = PRINCIPAL_POINT_Y_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "principle point y not given");
+      return false;
+   }
+      
+   thePrincipalPoint.y = atof(value);
+ 
+   keyword = SCAN_SCALE_MATRIX_00_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "scale matrix 0,0 not given");
+      return false;
+   }
+   theScanScaleMatrix[0] = atof(value);
+ 
+   keyword = SCAN_SCALE_MATRIX_01_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "scale matrix 0,1 not given");
+      return false;
+   }
+   theScanScaleMatrix[1] = atof(value);
+ 
+   keyword = SCAN_SCALE_MATRIX_10_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "scale matrix 1,0 not given");
+      return false;
+   }
+   theScanScaleMatrix[2] = atof(value);
+ 
+   keyword = SCAN_SCALE_MATRIX_11_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "scale matrix 1,1 not given");
+      return false;
+   }
+   theScanScaleMatrix[3] = atof(value);
+ 
+   keyword = SCAN_SKEW_ANGLE_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+      theScanSkew = 0.0;
+   else
+      theScanSkew = atof(value);
+
+   keyword = SCAN_ROTATION_ANGLE_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+      theScanRotation = 0.0;
+   else
+      theScanRotation = atof(value);
+ 
+   keyword = FOCAL_LENGTH_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "Focal length not given");
+      return false;
+   }
+   theFocalLen = atof(value);
+ 
+   keyword = PLATFORM_POSITION_X_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "Platform position X not given");
+      return false;
+   }
+   thePlatformPos.x() = atof(value);
+ 
+   keyword = PLATFORM_POSITION_Y_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "Platform position Y not given");
+   }
+   thePlatformPos.y() = atof(value);
+ 
+   keyword = PLATFORM_POSITION_Z_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimSetError(getClassName(),
+                    ossimErrorCodes::OSSIM_ERROR,
+                    "Platform position Z not given");
+   }
+   thePlatformPos.z() = atof(value);
+   
+   //***
+   // Platform orientation matrix:
+   //***
+   for (int i=0; i<3; i++)
+   {
+      for (int j=0; j<3; j++)
+      {
+         ostringstream ostr;
+         ostr << CAMERA_ORIENTATION_MATRIX_ELEM_KW
+              << i << "_" << j << ends;
+         ossimString s = ostr.str();
+         keyword = s.c_str();
+         value = kwl.find(prefix, keyword);
+         if (!value)
+         {
+            ossimSetError(getClassName(),
+                          ossimErrorCodes::OSSIM_ERROR,
+                          "Camera orientation matrix not given");
+         }
+         theLsrToEcfRot[i][j] = ossimString(value).toDouble();
+      }
+   }
+   
+   //***
+   // Reading of optical distortion coefficients is left to the service object:
+   //***
+   if (theOpticalDistortion)
+      delete theOpticalDistortion;
+   theOpticalDistortion = new ossimRadialDecentLensDistortion(kwl, prefix);
+
+   //***
+   // Initialize given parameters read:
+   //***
+   clearErrorStatus();
+   updateModel();
+   
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::loadState: returning..." << std::endl;
+   return true;
+}
+
+//*****************************************************************************
+// PROTECTED METHOD: ossimFcsiModel::updateModel()
+//
+// Following a parameter adjustment, this method is called to recompute all
+// dependent quantities that are used by the projection methods.
+// 
+//*****************************************************************************
+void  ossimFcsiModel::updateModel()
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::updateModel: entering..." << std::endl;
+   
+   //***
+   // Update the geometry...
+   // Adjusted = Initial + adj_parm[i]*adj_sigma[i]
+   // Some parameters have a zero initial value and that term is not included.
+   //***
+   theEcfOffset.x() = getAdjustableParameter(X_POS) *
+                      getParameterSigma(X_POS);
+   theEcfOffset.y() = getAdjustableParameter(Y_POS) *
+                      getParameterSigma(Y_POS);
+   theEcfOffset.z() = getAdjustableParameter(Z_POS) *
+                      getParameterSigma(Z_POS);
+   theXrotCorr      = getAdjustableParameter(X_ROT) *
+                      getParameterSigma(X_ROT);
+   theYrotCorr      = getAdjustableParameter(Y_ROT) *
+                      getParameterSigma(Y_ROT);
+   theZrotCorr      = getAdjustableParameter(Z_ROT) *
+                      getParameterSigma(Z_ROT);
+   theFocalOffset   = getAdjustableParameter(FOCAL_LEN) *
+                      getParameterSigma(FOCAL_LEN);
+   theScanSkewCorr  = getAdjustableParameter(SCAN_SKEW) *
+                      getParameterSigma(SCAN_SKEW);
+
+   //***
+   // Compute adjusted quatities used in projection code:
+   //***
+   theAdjFocalLen    = theFocalLen    + theFocalOffset;
+   theAdjPlatformPos = thePlatformPos + theEcfOffset;
+   
+   //***
+   // Establish the Scanner to film transform matrix.
+   //
+   // NOTE FOR IMPLEMENTING PARAMETER ADJUSTMENT: while the scan skew
+   // angle is an adjustable parameter, the pixel scaling is not since this
+   // error can be absorbed by the focal length adjustment, though the sigma
+   // for the focal length must be inflated to account for the additional error
+   // source. A similar situation occurrs with the scan rotation which manifests
+   // as an attitude adjustment.
+   //***
+   double cos_rot  = ossim::cosd(theScanRotation);
+   double sin_rot  = ossim::sind(theScanRotation);
+   double tan_skew = ossim::tand(theScanSkew + theScanSkewCorr);
+
+   double a =  theScanScaleMatrix[0]*(sin_rot*tan_skew + cos_rot) +
+               theScanScaleMatrix[1]*(cos_rot*tan_skew - sin_rot);
+   double b =  theScanScaleMatrix[0]*sin_rot + theScanScaleMatrix[1]*cos_rot;
+   double c =  theScanScaleMatrix[2]*(sin_rot*tan_skew + cos_rot) +
+               theScanScaleMatrix[3]*(cos_rot*tan_skew - sin_rot);
+   double d =  theScanScaleMatrix[2]*sin_rot + theScanScaleMatrix[3]*cos_rot;
+
+   theScanXformMatrix[0] = a;
+   theScanXformMatrix[1] = b;
+   theScanXformMatrix[2] = c;
+   theScanXformMatrix[3] = d;
+
+   //***
+   // The inverse of the scanner-to-film transform must be computed since it is
+   // not an orthogonal matrix (inverse != transpose):
+   //***
+   theInvScanXformMatrix[0] =  d/(d*a - b*c);
+   theInvScanXformMatrix[1] = -b/(d*a - b*c);
+   theInvScanXformMatrix[2] =  c/(b*c - a*d);
+   theInvScanXformMatrix[3] = -a/(b*c - a*d);
+
+   //***
+   // Establish the differential rotation matrix due to attitude correction:
+   //***
+   double cw = ossim::cosd(theXrotCorr);
+   double sw = ossim::sind(theXrotCorr);
+   double cp = ossim::cosd(theYrotCorr);
+   double sp = ossim::sind(theYrotCorr);
+   double ck = ossim::cosd(theZrotCorr);
+   double sk = ossim::sind(theZrotCorr);
+
+   NEWMAT::Matrix attitudeCorrection(3, 3);
+   attitudeCorrection(1,1) =  ck*cw - sk*sp*sw;
+   attitudeCorrection(1,2) =  sk*cp;
+   attitudeCorrection(1,3) =  ck*sw + sk*sp*cw;
+   attitudeCorrection(2,1) = -sk*cw - ck*sp*sw;
+   attitudeCorrection(2,2) =  cp*ck;
+   attitudeCorrection(2,3) = -sk*sw + ck*sp*cw;
+   attitudeCorrection(3,1) = -cp*sw;
+   attitudeCorrection(3,2) = -sp;
+   attitudeCorrection(3,3) =  cp*cw;
+
+   //***
+   // Now compute the final LSR to ECF rotation:
+   //***
+   theAdjLsrToEcfRot = attitudeCorrection * theLsrToEcfRot;
+   theAdjEcfToLsrRot = theAdjLsrToEcfRot.t();
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::updateModel: returning..." << std::endl;
+}
+
+
+//*****************************************************************************
+// PRIVATE METHOD: ossimFcsiModel::initAdjustableParameters()
+//  
+//  This method initializes the base class adjustable parameter and associated
+//  sigmas arrays with quantities specific to this model. These are default
+//  values only. A functional implementation would assign the sigmas via a
+//  keywordlist or camera specific derived class.
+//  
+//*****************************************************************************
+void ossimFcsiModel::initAdjustableParameters()
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::initAdjustableParameters: entering..." << std::endl;
+
+   int numParams = NUM_ADJUSTABLE_PARAMS;
+   resizeAdjustableParameterArray(NUM_ADJUSTABLE_PARAMS);
+   
+//   if(!getNumberOfAdjustableParameters())
+///   {
+   //***
+   // Allocate storage for adjustables and assign their names and units strings
+   //***
+//      newAdjustment(NUM_ADJUSTABLE_PARAMS);
+//   }
+   //***
+   // Initialize base-class adjustable parameter array:
+   //***
+   for (int i=0; i<numParams; i++)
+   {
+      setAdjustableParameter(i, 0.0);
+      setParameterDescription(i, PARAM_NAMES[i]);
+      setParameterUnit(i, PARAM_UNITS[i]);
+   }
+   
+   //***
+   // Initialize base-class parameter sigma array:
+   //***
+   setParameterSigma(X_POS, 50.0);
+   setParameterSigma(Y_POS, 50.0);
+   setParameterSigma(Z_POS, 50.0);  
+   setParameterSigma(X_ROT, 0.01);
+   setParameterSigma(Y_ROT, 0.01);
+   setParameterSigma(Z_ROT, 0.01);
+   setParameterSigma(FOCAL_LEN,0.005);  
+   setParameterSigma(SCAN_SKEW, 0.001);
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::initAdjustableParameters: returning..." << std::endl;
+}
+
+//*****************************************************************************
+// STATIC METHOD: ossimFcsiModel::writeGeomTemplate
+//  
+//  Writes a sample kwl to output stream. Please update this method with any
+//  format and/or keyword changes. It will make life a lot easier for everyone.
+//  
+//*****************************************************************************
+void ossimFcsiModel::writeGeomTemplate(ostream& os)
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::writeGeomTemplate: entering..." << std::endl;
+
+   os <<
+      "//*****************************************************************\n"
+      "// Template for Frame Camera Scanned Image (FCSI) model keywordlist\n"
+      "//*****************************************************************\n"
+      << ossimKeywordNames::TYPE_KW << ": " << "ossimFcsiModel" << endl;
+
+   ossimSensorModel::writeGeomTemplate(os);
+   
+   os << "//***\n"
+      << "// Derived-class FCSI Keywords:\n"
+      << "//***\n"
+      << PRINCIPAL_POINT_X_KW << ": <pixels>\n"
+      << PRINCIPAL_POINT_Y_KW << ": <pixels>\n"
+      << SCAN_SCALE_MATRIX_00_KW << ": <mm/pixel>\n"
+      << SCAN_SCALE_MATRIX_01_KW << ": <mm/pixel>\n"
+      << SCAN_SCALE_MATRIX_10_KW << ": <mm/pixel>\n"
+      << SCAN_SCALE_MATRIX_11_KW << ": <mm/pixel>\n"
+      << SCAN_SKEW_ANGLE_KW << ": <degrees> [OPTIONAL]\n"
+      << SCAN_ROTATION_ANGLE_KW << ": <degrees> [OPTIONAL]\n"
+      << FOCAL_LENGTH_KW << ": <millimeters>\n"
+      << PLATFORM_POSITION_X_KW << ": <meters (ECF)>\n"
+      << PLATFORM_POSITION_Y_KW << ": <meters (ECF)>\n"
+      << PLATFORM_POSITION_Z_KW << ": <meters (ECF)>\n"
+      << "\n"
+      << "//***\n"
+      << "// Camera (LSR) to ECF orientation matrix:\n"
+      << "//***\n";
+   
+   for (int i=0; i<3; i++)
+   {
+      for (int j=0; j<3; j++)
+      {
+         ostringstream ostr;
+         ostr << CAMERA_ORIENTATION_MATRIX_ELEM_KW
+              << i << "_" << j << ends;
+         os << ostr.str() << ": <Euler rot matrix element>\n";
+      }
+   }
+
+   os << "\n"
+      << "//***\n"
+      << "// Optical distortion coefficients [OPTIONAL]:\n"
+      << "//***\n"
+      << "distortion."
+      << ossimRadialDecentLensDistortion::RADIAL_DISTORTION_COEFF_KW
+      << "N: <coeff N> (for N <= 5)\n"
+      << "distortion."
+      << ossimRadialDecentLensDistortion::DECENT_DISTORTION_COEFF_KW
+      << "N: <coeff N> (for N <= 4)\n"
+      << endl;
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::writeGeomTemplate: returning..." << std::endl;
+   
+   return;
+}
+
+
diff --git a/src/ossim/projection/ossimGnomonicProjection.cpp b/ossim/src/ossim/projection/ossimGnomonicProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimGnomonicProjection.cpp
rename to ossim/src/ossim/projection/ossimGnomonicProjection.cpp
diff --git a/ossim/src/ossim/projection/ossimGoogleProjection.cpp b/ossim/src/ossim/projection/ossimGoogleProjection.cpp
new file mode 100644
index 0000000..f4ac61e
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimGoogleProjection.cpp
@@ -0,0 +1,125 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+//
+//*******************************************************************
+#include <ossim/projection/ossimGoogleProjection.h>
+
+RTTI_DEF1(ossimGoogleProjection, "ossimGoogleProjection", ossimMapProjection)
+
+
+//***************** THIS CODE WAS PULLED FROM THE INTERNET FOR GLOBAL MERCATOR ******
+// I will leave as is without modifications
+//
+#define deg2rad(d) (((d)*M_PI)/180)
+#define rad2deg(d) (((d)*180)/M_PI)
+#define earth_radius 6378137
+ 
+/* The following functions take or return there results in degrees */
+ 
+double y2lat_d(double y) { return rad2deg(2 * atan(exp(  deg2rad(y) ) ) - M_PI/2); }
+double x2lon_d(double x) { return x; }
+double lat2y_d(double lat) { return rad2deg(log(tan(M_PI/4+ deg2rad(lat)/2))); }
+double lon2x_d(double lon) { return lon; }
+ 
+/* The following functions take or return there results in something close to meters, along the equator */
+ 
+double y2lat_m(double y) { return rad2deg(2 * atan(exp( (y / earth_radius ) )) - M_PI/2); }
+double x2lon_m(double x) { return rad2deg(x / earth_radius); }
+double lat2y_m(double lat) { return earth_radius * log(tan(M_PI/4+ deg2rad(lat)/2)); }
+double lon2x_m(double lon) { return deg2rad(lon) * earth_radius; }
+
+//******************** END GLOBAL MERCATOR CODE ***********************
+
+ossimGoogleProjection::ossimGoogleProjection(const ossimEllipsoid& ellipsoid,
+                                           const ossimGpt& origin)
+   :ossimMapProjection(ellipsoid, origin)
+{
+   thePcsCode = 3857;
+   update();
+}
+ossimGoogleProjection::ossimGoogleProjection(const ossimGoogleProjection& src)
+   :ossimMapProjection(src)
+{
+   thePcsCode = 3857;
+   update();
+}
+   
+ossimGoogleProjection::~ossimGoogleProjection()
+{
+
+}
+
+void ossimGoogleProjection::update()
+{
+   ossimMapProjection::update();
+}
+
+ossimGpt ossimGoogleProjection::inverse(const ossimDpt &eastingNorthing)const
+{
+   /*
+	double lon = (eastingNorthing.x / 20037508.34) * 180.0;
+	double lat = (eastingNorthing.y / 20037508.34) * 180.0;
+
+  	lat = 180.0/M_PI * (2.0 * atan(exp(lat * M_PI / 180)) - M_PI / 2.0);
+
+   return ossimGpt(lat, lon, 0, theDatum);  
+   */
+   //return ossimGpt(merc_lat(eastingNorthing.y), merc_lon(eastingNorthing.x), 0, theDatum);
+   return ossimGpt(y2lat_m(eastingNorthing.y), x2lon_m(eastingNorthing.x), 0, theDatum);
+}
+
+ossimDpt ossimGoogleProjection::forward(const ossimGpt &latLon)const
+{
+   /*
+   double easting  = 0.0;
+   double northing = 0.0;
+   ossimGpt gpt = latLon;
+   
+   if (theDatum)
+   {
+      if (theDatum->code() != latLon.datum()->code())
+      {
+         gpt.changeDatum(theDatum); // Shift to our datum.
+      }
+   }
+   //double y = Math.Log(Math.Tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180);
+   easting = gpt.lond()*20037508.34/180.0;
+   northing = log(tan((90.0 + gpt.latd())*M_PI/360.0))/(M_PI/180.0);
+   northing *=20037508.34/180.0;
+
+   return ossimDpt(easting, northing);
+   */
+
+   return ossimDpt(lon2x_m(latLon.lond()), lat2y_m(latLon.latd()));
+}
+
+bool ossimGoogleProjection::saveState(ossimKeywordlist& kwl, const char* prefix) const
+{
+   return ossimMapProjection::saveState(kwl, prefix);
+}
+
+bool ossimGoogleProjection::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   thePcsCode = 3857;
+   // Must do this first.
+   bool flag = ossimMapProjection::loadState(kwl, prefix);
+   
+   update();
+   return flag;
+}
+
+bool ossimGoogleProjection::operator==(const ossimProjection& projection) const
+{
+   if (!ossimMapProjection::operator==(projection))
+      return false;
+
+   const ossimGoogleProjection* p = dynamic_cast<const ossimGoogleProjection*>(&projection);
+
+   return (p != 0);
+}
+
+
diff --git a/ossim/src/ossim/projection/ossimIkonosRpcModel.cpp b/ossim/src/ossim/projection/ossimIkonosRpcModel.cpp
new file mode 100644
index 0000000..52d04b5
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimIkonosRpcModel.cpp
@@ -0,0 +1,985 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Contains implementation of class ossimIkonosRpcModel. This 
+//    derived class implements the capability of reading Ikonos RPC support
+//    data.
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimIkonosRpcModel.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstdlib>
+#include <ossim/projection/ossimIkonosRpcModel.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/imaging/ossimTiffTileSource.h>
+#include <ossim/base/ossimTrace.h>
+
+
+RTTI_DEF1(ossimIkonosRpcModel, "ossimIkonosRpcModel", ossimRpcModel);
+
+//***
+// Define Trace flags for use within this file:
+//***
+static ossimTrace traceExec  ("ossimIkonosRpcModel:exec");
+static ossimTrace traceDebug ("ossimIkonosRpcModel:debug");
+
+const ossimFilename INIT_RPC_GEOM_FILENAME ("rpc_init.geom");
+
+static const char* MODEL_TYPE        = "ossimIkonosRpcModel";
+static const char* META_DATA_FILE    = "meta_data_file";
+static const char* RPC_DATA_FILE     = "rpc_data_file";
+static const char* LINE_OFF_KW       = "LINE_OFF";
+static const char* SAMP_OFF_KW       = "SAMP_OFF";
+static const char* LAT_OFF_KW        = "LAT_OFF";
+static const char* LONG_OFF_KW       = "LONG_OFF";
+static const char* HEIGHT_OFF_KW     = "HEIGHT_OFF";
+static const char* LINE_SCALE_KW     = "LINE_SCALE";
+static const char* SAMP_SCALE_KW     = "SAMP_SCALE";
+static const char* LAT_SCALE_KW      = "LAT_SCALE";
+static const char* LONG_SCALE_KW     = "LONG_SCALE";
+static const char* HEIGHT_SCALE_KW   = "HEIGHT_SCALE";
+static const char* LINE_NUM_COEFF_KW = "LINE_NUM_COEFF_";
+static const char* LINE_DEN_COEFF_KW = "LINE_DEN_COEFF_";
+static const char* SAMP_NUM_COEFF_KW = "SAMP_NUM_COEFF_";
+static const char* SAMP_DEN_COEFF_KW = "SAMP_DEN_COEFF_";
+
+
+ossimIkonosRpcModel::ossimIkonosRpcModel()
+   :ossimRpcModel(),
+    theSupportData(new ossimIkonosMetaData())
+{
+}
+
+//*****************************************************************************
+//  CONSTRUCTOR: ossimIkonosRpcModel
+//  
+//  Constructs given a geometry file that specifies the filenames for the
+//  metadata and RPC data files.
+//  
+//*****************************************************************************
+ossimIkonosRpcModel::ossimIkonosRpcModel(const ossimFilename& geom_file)
+   :  ossimRpcModel(),
+      theSupportData(new ossimIkonosMetaData())
+{
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimIkonosRpcModel Constructor #1: entering..."
+         << std::endl;
+   }
+
+   ossimKeywordlist kwl(geom_file);
+   const char* value;
+   
+   //***
+   // Assure this keywordlist contains correct type info:
+   //***
+   value = kwl.find(ossimKeywordNames::TYPE_KW);
+   if (!value || (strcmp(value, "ossimIkonosRpcModel")))
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG  ossimIkonosRpcModel Constructor #1:"
+            << "\nFailed attempt to construct. sensor type \""<<value
+            << "\" does not match \"ossimIkonosRpcModel\"." << std::endl;
+      }
+
+      theErrorStatus++;
+      if (traceExec())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG  ossimIkonosRpcModel Constructor #1: returning..."
+            << std::endl;
+      }
+      return;
+   }
+
+   //***
+   // Read meta data filename from geom file:
+   //***
+   value = kwl.find(META_DATA_FILE);
+   if (!value)
+   {
+      theErrorStatus++;
+      if (traceExec())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG ossimIkonosRpcModel Constructor #1: returning..."
+            << std::endl;
+      }
+      return;
+   }
+
+   ossimFilename metadata (value);
+
+   //***
+   // Read RPC data filename from geom file:
+   //***
+   value = kwl.find(RPC_DATA_FILE);
+   if (!value)
+   {
+      theErrorStatus++;
+      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG  ossimIkonosRpcModel Constructor #1: returning..." << std::endl;
+      return;
+   }
+   ossimFilename rpcdata (value);
+
+   parseMetaData(metadata);
+   parseRpcData (rpcdata);
+   finishConstruction();
+
+   ossimString drivePart;
+   ossimString pathPart;
+   ossimString filePart;
+   ossimString extPart;
+   geom_file.split(drivePart,
+                   pathPart,
+                   filePart,
+                   extPart);
+
+   
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG returning..." << std::endl;
+   
+   return;
+}
+
+//*****************************************************************************
+//  CONSTRUCTOR: ossimIkonosRpcModel
+//  
+//  Constructs given filenames for metadata and RPC data.
+//  
+//*****************************************************************************
+ossimIkonosRpcModel::ossimIkonosRpcModel(const ossimFilename& metadata,
+                                         const ossimFilename& rpcdata)
+   :
+   ossimRpcModel(),
+   theSupportData(new ossimIkonosMetaData())
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimIkonosRpcModel Constructor #2: entering..." << std::endl;
+
+   parseMetaData(metadata);
+   parseRpcData (rpcdata);
+   finishConstruction();
+
+   //***
+   // Save current state in RPC model format:
+   //***
+   ossimString drivePart;
+   ossimString pathPart;
+   ossimString filePart;
+   ossimString extPart;
+   metadata.split(drivePart,
+                  pathPart,
+                  filePart,
+                  extPart);
+   
+   ossimFilename init_rpc_geom;
+   init_rpc_geom.merge(drivePart,
+                       pathPart,
+                       INIT_RPC_GEOM_FILENAME,
+                       "");
+//      (metadata.path().dirCat(ossimRpcModel::INIT_RPC_GEOM_FILENAME));
+   ossimKeywordlist kwl (init_rpc_geom);
+   saveState(kwl);
+   
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimIkonosRpcModel Constructor #2: returning..." << std::endl;
+}
+
+ossimIkonosRpcModel::~ossimIkonosRpcModel()
+{
+   theSupportData = 0;
+}
+
+//*****************************************************************************
+//  METHOD: ossimIkonosRpcModel::finishConstruction()
+//  
+//*****************************************************************************
+void ossimIkonosRpcModel::finishConstruction()
+{
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimIkonosRpcModel finishConstruction(): entering..."
+         << std::endl;
+   }
+
+   //***
+   // Assign other data members:
+   //***
+   thePolyType      = B; // This may not be true for early RPC imagery
+   theRefImgPt.line = theLineOffset;
+   theRefImgPt.samp = theSampOffset;
+   theRefGndPt.lat  = theLatOffset;
+   theRefGndPt.lon  = theLonOffset;
+   theRefGndPt.hgt  = theHgtOffset;
+
+   //***
+   // Assign the bounding image space rectangle:
+   //***
+   theImageClipRect = ossimDrect(0.0, 0.0,
+                                 theImageSize.samp-1, theImageSize.line-1);
+
+   //---
+   // NOTE:  We must call "updateModel()" to set parameter used by base
+   // ossimRpcModel prior to calling lineSampleHeightToWorld or all
+   // the world points will be same.
+   //---
+   updateModel();   
+
+   //***
+   // Assign the bounding ground polygon:
+   //***
+   ossimGpt v0, v1, v2, v3;
+   ossimDpt ip0 (0.0, 0.0);
+   lineSampleHeightToWorld(ip0, 0.0, v0);
+   ossimDpt ip1 (theImageSize.samp-1.0, 0.0);
+   lineSampleHeightToWorld(ip1, 0.0, v1);
+   ossimDpt ip2 (theImageSize.samp-1.0, theImageSize.line-1.0);
+   lineSampleHeightToWorld(ip2, 0.0, v2);
+   ossimDpt ip3 (0.0, theImageSize.line-1.0);
+   lineSampleHeightToWorld(ip3, 0.0, v3);
+   theBoundGndPolygon
+      = ossimPolygon (ossimDpt(v0), ossimDpt(v1), ossimDpt(v2), ossimDpt(v3));
+
+   //---
+   // Call compute gsd:
+   // 
+   // This will set theGSD and theMeanGSD using lineSampleHeightToWorld on
+   // three image points.  Previously this was pulled from metadata.  Some of
+   // which was in US Survey feet and not converted to meters.  This method
+   // is more accurate as it uses the sensor model to compute.
+   //---
+   try
+   {
+      // Method throws ossimException.
+      computeGsd();
+   }
+   catch (const ossimException& e)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimIkonosRpcModel finishConstruction Caught Exception:\n"
+         << e.what() << std::endl;
+   }
+   
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimIkonosRpcModel finishConstruction(): returning..."
+         << std::endl;
+   }
+}
+
+//*****************************************************************************
+// PROTECTED METHOD: ossimIkonosRpcModel::parseMetaData()
+//  
+//  Parses the Ikonos metadata file.
+//  
+//*****************************************************************************
+void ossimIkonosRpcModel::parseMetaData(const ossimFilename& data_file)
+{
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimIkonosRpcModel::parseMetaData(data_file): entering..."
+         << std::endl;
+   }
+
+   FILE* fptr = fopen (data_file, "r");
+   if (!fptr)
+   {
+      ++theErrorStatus;
+      if (traceExec())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimIkonosRpcModel::parseMetaData(data_file) DEBUG:"
+            << "\nCould not open Meta data file:  " << data_file
+            << "\nreturning with error..." << std::endl;
+      }
+      return;
+   }
+
+   char* strptr;
+   // char linebuf[80];
+   char dummy[80], name[80];
+
+   //***
+   // Read the file into a buffer:
+   //***
+   char filebuf[5000];
+   fread(filebuf, 1, 5000, fptr);
+   
+   //***
+   // Image ID:
+   //***
+   strptr = strstr(filebuf, "\nSource Image ID:");
+   if (!strptr)
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
+            << "\n\tAborting construction. Error encountered parsing "
+            << "presumed meta-data file." << endl;
+      }
+
+      fclose( fptr );
+      fptr = 0;
+      return;
+   }
+      
+   sscanf(strptr, "%17c %s", dummy, name);
+   theImageID = name;
+
+   //***
+   // Sensor Type:
+   //***
+   strptr = strstr(strptr, "\nSensor:");
+   if (!strptr)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
+            << "\n\tAborting construction. Error encountered parsing "
+            << "presumed meta-data file." << endl;
+      }
+      fclose(fptr);
+      fptr = 0;
+      return;
+   }
+   sscanf(strptr, "%8c %s", dummy, name);
+   theSensorID = name;
+
+   //***
+   // GSD:  NOTE - this will be recomputed by computeGsd method later.
+   //***
+   strptr = strstr(strptr, "\nPixel Size X:");
+   if (!strptr)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
+            << "\n\tAborting construction. Error encountered parsing "
+            << "presumed meta-data file." << endl;
+         
+      }
+      fclose(fptr);
+      fptr = 0;
+      return;
+   }
+   
+   sscanf(strptr, "%14c %lf", dummy, &theGSD.samp);
+   strptr = strstr(strptr, "\nPixel Size Y:");
+   if (!strptr)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
+            << "\n\tAborting construction. Error encountered parsing "
+            << "presumed meta-data file." << endl;
+         
+      }
+      fclose(fptr);
+      fptr = 0;
+      return;
+   }
+   sscanf(strptr, "%14c %lf", dummy, &theGSD.line);
+
+   //***
+   // Image size:
+   //***
+   strptr = strstr(strptr, "\nColumns:");
+   if (!strptr)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
+            << "\n\tAborting construction. Error encountered parsing "
+            << "presumed meta-data file." << endl;
+      }
+         
+      fclose(fptr);
+      fptr = 0;
+      return;
+   }
+   sscanf(strptr, "%s %d", dummy, &theImageSize.samp);
+   strptr = strstr(strptr, "\nRows:");
+   if (!strptr)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
+            << "\n\tAborting construction. Error encountered parsing "
+            << "presumed meta-data file." << endl;
+      }
+
+      fclose(fptr);
+      fptr = 0;
+      return;
+  }
+   sscanf(strptr, "%s %d", dummy, &theImageSize.line);
+           
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimIkonosRpcModel::parseMetaData(data_file): returning..."
+         << std::endl;
+   }
+   fclose(fptr);
+   fptr = 0;
+}
+
+//*****************************************************************************
+// PROTECTED METHOD: ossimIkonosRpcModel::parseHdrData()
+//  
+//  Parses the Ikonos hdr file.
+//  
+//*****************************************************************************
+bool ossimIkonosRpcModel::parseHdrData(const ossimFilename& data_file)
+{
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimIkonosRpcModel::parseHdrData(data_file): entering..."
+         << std::endl;
+   }
+   
+   if( !data_file.exists() )
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimIkonosRpcModel::parseHdrData(data_file) WARN:"
+            << "\nrpc data file <" << data_file << ">. "<< "doesn't exist..."
+            << std::endl;
+      }
+      return false;
+   }
+
+   FILE* fptr = fopen (data_file, "r");
+   if (!fptr)
+   {
+      ++theErrorStatus;
+      
+      if (traceDebug())
+      { 
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimIkonosRpcModel::parseHdrData(data_file) WARN:"
+            << "\nCould not open hdr data file <" << data_file << ">. "
+            << "returning with error..." << std::endl;
+      }
+      return false;
+   }
+
+   char* strptr = 0;
+   // char linebuf[80];
+   char dummy[80];
+   // , name[80];
+
+   //***
+   // Read the file into a buffer:
+   //***
+   char filebuf[5000];
+   fread(filebuf, 1, 5000, fptr);
+
+   //***
+   // GSD:  NOTE - this will be recomputed by computeGsd method later.
+   //***
+   strptr = strstr(filebuf, "\nPixel Size X:");
+   if (!strptr)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimIkonosRpcModel::parseHdrData(data_file):"
+            << "\n\tAborting construction. Error encountered parsing "
+            << "presumed hdr file." << endl;
+      }
+      
+      fclose( fptr ); // cleanup
+      fptr = 0;
+      return false;
+   }
+      
+   sscanf(strptr, "%14c %lf", dummy, &theGSD.samp);
+   strptr = strstr(strptr, "\nPixel Size Y:");
+   if (!strptr)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimIkonosRpcModel::parseHdrData(data_file): "
+            << "\n\tAborting construction. Error encountered parsing "
+            << "presumed hdr file." << endl;
+      }
+         
+      fclose( fptr ); // cleanup
+      fptr = 0;
+      return false;
+   }
+
+   sscanf(strptr, "%14c %lf", dummy, &theGSD.line);
+
+   //***
+   // Image size:
+   //***
+   strptr = strstr(strptr, "\nColumns:");
+   if (!strptr)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimIkonosRpcModel::parseHdrData(data_file): "
+            << "\n\tAborting construction. Error encountered parsing "
+            << "presumed hdr file." << endl;
+      }
+         
+      fclose( fptr ); // cleanup
+      fptr = 0;
+      return false;
+   }
+   sscanf(strptr, "%s %d", dummy, &theImageSize.samp);
+   strptr = strstr(strptr, "\nRows:");
+   if (!strptr)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimIkonosRpcModel::parseHdrData(data_file): "
+            << "\n\tAborting construction. Error encountered parsing "
+            << "presumed hdr file." << endl;
+      }
+      fclose( fptr ); // cleanup
+      fptr = 0;
+      
+      return false;
+   }
+   sscanf(strptr, "%s %d", dummy, &theImageSize.line);
+   
+   fclose( fptr ); // cleanup
+   fptr = 0;
+           
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimIkonosRpcModel::parseHdrData(data_file): returning..."
+         << std::endl;
+   }
+   return true;
+}
+
+//*****************************************************************************
+// PROTECTED METHOD: ossimIkonosRpcModel::parseRpcData()
+//  
+//  Parses the Ikonos RPC data file.
+//  
+//*****************************************************************************
+void ossimIkonosRpcModel::parseRpcData(const ossimFilename& data_file)
+{
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimIkonosRpcModel::parseRpcData(data_file): entering..."
+         << std::endl;
+   }
+      
+   if( !data_file.exists() )
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimIkonosRpcModel::parseRpcData(data_file) WARN:"
+            << "\nrpc data file <" << data_file << ">. "<< "doesn't exist..."
+            << std::endl;
+      }
+      ++theErrorStatus;
+      return;
+   }
+   
+   //***
+   // The Ikonos RPC data file is conveniently formatted as KWL file:
+   //***
+   ossimKeywordlist kwl (data_file);
+   if (kwl.getErrorStatus())
+   {
+      ossimNotify(ossimNotifyLevel_FATAL)
+         << "ERROR ossimIkonosRpcModel::parseRpcData(data_file): Could not open RPC data file <" << data_file << ">. " << "Aborting..." << std::endl;
+      ++theErrorStatus;
+      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
+         << "returning with error..." << std::endl;
+      return;
+   }
+
+   const char* buf;
+   const char* keyword;
+   
+   //***
+   // Parse data from KWL:
+   //***
+   keyword = LINE_OFF_KW;
+   buf = kwl.find(keyword);
+   if (!buf)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
+                                          << "\nAborting construction. Error looking up keyword: "
+                                          << keyword << std::endl;
+      return;
+   }
+   theLineOffset = atof(buf);
+      
+   keyword = SAMP_OFF_KW;
+   buf = kwl.find(keyword);
+   if (!buf)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
+                                          << "\nAborting construction. Error looking up keyword: "
+                                          << keyword << std::endl;
+      return;
+   }
+   theSampOffset = atof(buf);
+
+   keyword = LAT_OFF_KW;
+   buf = kwl.find(keyword);
+   if (!buf)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
+                                          << "\nAborting construction. Error looking up keyword: "
+                                          << keyword << std::endl;
+      return;
+   }
+      
+   theLatOffset = atof(buf);
+   
+   keyword = LONG_OFF_KW;
+   buf = kwl.find(keyword);
+   if (!buf)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
+                                          << "\nAborting construction. Error looking up keyword: "
+                                          << keyword << std::endl;
+      return;
+   }
+   theLonOffset = atof(buf);
+
+   keyword = HEIGHT_OFF_KW;
+   buf = kwl.find(keyword);
+   if (!buf)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
+                                          << "\nAborting construction. Error looking up keyword: "
+                                          << keyword << std::endl;
+      return;
+   }
+      
+   theHgtOffset = atof(buf);
+
+   keyword = LINE_SCALE_KW;
+   buf = kwl.find(keyword);
+   if (!buf)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
+                                          << "\nAborting construction. Error looking up keyword: "
+                                          << keyword << std::endl;
+      return;
+   }
+   theLineScale = atof(buf);
+   
+   keyword = SAMP_SCALE_KW;
+   buf = kwl.find(keyword);
+   if (!buf)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
+                                          << "\nAborting construction. Error looking up keyword: "
+                                          << keyword << std::endl;
+      return;
+   }
+   theSampScale = atof(buf);
+   
+   keyword = LAT_SCALE_KW;
+   buf = kwl.find(keyword);
+   if (!buf)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
+                                          << "\nAborting construction. Error looking up keyword: "
+                                          << keyword << std::endl;
+      return;
+   }
+   else
+     {
+       // copy ossimIkonosMetada-sensor into ossimIkonosRpcModel-sensorId
+       theSensorID = theSupportData->getSensorID();
+     }
+   
+
+   theLatScale = atof(buf);
+   
+   keyword = LONG_SCALE_KW;
+   buf = kwl.find(keyword);
+   if (!buf)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
+                                          << "\nAborting construction. Error looking up keyword: "
+                                          << keyword << std::endl;
+      return;
+   }
+   theLonScale = atof(buf);
+   
+   keyword = HEIGHT_SCALE_KW;
+   buf = kwl.find(keyword);
+   if (!buf)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
+                                          << "\nAborting construction. Error looking up keyword: "
+                                          << keyword << std::endl;
+      return;
+   }
+      
+   theHgtScale = atof(buf);
+   
+   char kwbuf[32];
+   keyword = kwbuf;
+   for(int i=1; i<=20; i++)
+   {
+      sprintf(kwbuf, "%s%d", LINE_NUM_COEFF_KW, i);
+      buf = kwl.find(keyword);
+      if (!buf)
+      {
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
+                                             << "\nAborting construction. Error looking up keyword: "
+                                             << keyword << std::endl;
+         return;
+      }
+      
+      theLineNumCoef[i-1] = atof(buf);
+      
+      sprintf(kwbuf, "%s%d", LINE_DEN_COEFF_KW, i);
+      buf = kwl.find(keyword);
+      if (!buf)
+      {
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
+                                             << "\nAborting construction. Error looking up keyword: "
+                                             << keyword << std::endl;
+         return;
+      }
+      theLineDenCoef[i-1] = atof(buf);
+      
+      sprintf(kwbuf, "%s%d", SAMP_NUM_COEFF_KW, i);
+      buf = kwl.find(keyword);
+      if (!buf)
+      {
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
+                                             << "\nAborting construction. Error looking up keyword: "
+                                             << keyword << std::endl;
+         return;
+      }
+      theSampNumCoef[i-1] = atof(buf);
+      
+      sprintf(kwbuf, "%s%d", SAMP_DEN_COEFF_KW, i);
+      buf = kwl.find(keyword);
+      if (!buf)
+      {
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
+                                             << "\nAborting construction. Error looking up keyword: "
+                                             << keyword << std::endl;
+         return;
+      }
+      theSampDenCoef[i-1] = atof(buf);
+   }
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimIkonosRpcModel::parseRpcData(data_file): returning..." << std::endl;
+   return;
+
+   theErrorStatus++;
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimIkonosRpcModel::parseRpcData(data_file): returning with error..." << std::endl;
+   
+   return;
+}
+
+//*****************************************************************************
+//  METHOD: ossimIkonosRpcModel::writeGeomTemplate()
+//  
+//   Writes a template of an ossimIkonosRpcModel geometry file.
+//  
+//*****************************************************************************
+void ossimIkonosRpcModel::writeGeomTemplate(ostream& os)
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::writeGeomTemplate(os): entering..." << std::endl;
+
+   os <<
+      "//**************************************************************\n"
+      "// Template for Ikonos RPC geometry keywordlist\n"
+      "//\n"
+      "// NOTE: It is preferable to select the full RPC geometry KWL \n"
+      "//       that should have been created with the first use of the\n"
+      "//       derived model type ossimIkonosRpcModel. Using this KWL \n"
+      "//       implies that an initial geometry is being constructed \n"
+      "//       with all adjustable parameters initialized to 0. \n"
+      "//**************************************************************\n"
+      << ossimKeywordNames::TYPE_KW << ": " << MODEL_TYPE << endl;
+   os << META_DATA_FILE << ": <string>\n"
+      << RPC_DATA_FILE  << ": <string>\n" << endl;
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::writeGeomTemplate(os): returning..." << std::endl;
+   return;
+}
+
+bool ossimIkonosRpcModel::saveState(ossimKeywordlist& kwl,
+				    const char* prefix)const
+{
+   if(theSupportData.valid())
+   {
+      ossimString supportPrefix = ossimString(prefix) + "support_data.";
+      // copy ossimIkonosMetada-sensor into ossimIkonosRpcModel-sensorId
+      theSupportData->saveState(kwl, supportPrefix);
+   }
+
+   ossimRpcModel::saveState(kwl, prefix);
+
+  // this model just sets the base class values so
+  // we do not need to re-construct this model so 
+  // specify the type as the base class type
+  //
+//   kwl.add(prefix,
+// 	  ossimKeywordNames::TYPE_KW,
+// 	  STATIC_TYPE_NAME(ossimRpcModel),
+// 	  true);
+
+  // cout << "kwl:\n" << kwl << std::endl;
+
+  return true;
+}
+
+bool ossimIkonosRpcModel::loadState(const ossimKeywordlist& kwl,
+                                    const char* prefix)
+{
+   if(theSupportData.valid())
+   {
+      ossimString supportPrefix = ossimString(prefix) + "support_data.";
+      theSupportData->loadState(kwl, supportPrefix);
+   }
+
+   return ossimRpcModel::loadState(kwl, prefix);
+}
+
+bool ossimIkonosRpcModel::parseFile(const ossimFilename& file)
+{
+      return parseTiffFile(file);
+}
+
+bool ossimIkonosRpcModel::parseTiffFile(const ossimFilename& filename)
+{
+   bool result = false;
+   
+   ossimRefPtr<ossimTiffTileSource> tiff = new ossimTiffTileSource();
+
+   if ( tiff->open(filename) )
+   {
+      if ( !theSupportData )
+      {
+         theSupportData = new ossimIkonosMetaData();
+      }
+
+      if ( theSupportData->open(filename) == false )
+      {
+         if(traceDebug())
+         {
+            // Currently not required by model so we will not error out here.
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "WARNING: ossimIkonosMetaData::open returned false.\n"
+               << std::endl;
+         }
+      }
+      else
+      {
+         // copy ossimIkonosMetada-sensor into ossimIkonosRpcModel-sensorId
+         theSensorID = theSupportData->getSensorID();
+      }
+
+      //convert file to rpc filename and hdr filename so we can get some info
+      ossimFilename rpcfile = filename.noExtension();
+      rpcfile += "_rpc.txt";
+      
+      ossimFilename hdrfile = filename;
+      hdrfile.setExtension(ossimString("hdr"));
+      
+      if( parseHdrData(hdrfile) )
+      {
+         // parseRpcData sets the error status on error.
+         parseRpcData (rpcfile);
+         if ( !getErrorStatus() ) //check for errors in parsing rpc data
+         {
+            finishConstruction();
+            
+            //---
+            // Save current state in RPC model format:
+            //---
+            ossimString drivePart;
+            ossimString pathPart;
+            ossimString filePart;
+            ossimString extPart;
+            filename.split(drivePart,
+                           pathPart,
+                           filePart,
+                           extPart);
+            
+            ossimFilename init_rpc_geom;
+            init_rpc_geom.merge(drivePart,
+                                pathPart,
+                                INIT_RPC_GEOM_FILENAME,
+                                "");
+
+            ossimKeywordlist kwl (init_rpc_geom);
+            saveState(kwl);
+
+            // If we get here set the return status to true.
+            result = true;
+
+         } // matches: if ( !getErrorStatus() )
+   
+      } // matches: if( parseHdrData(hdrfile) )
+
+   } // matches:  if ( tiff->open(filename) )
+   
+   if ( traceExec() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "return status: " << (result?"true\n":"false\n")
+         << "DEBUG ossimIkonosRpcModel parseTiffFile: returning..."
+         << std::endl;
+   }
+
+   return result;
+}
+
+bool ossimIkonosRpcModel::isNitf(const ossimFilename& filename)
+{
+   std::ifstream in(filename.c_str(), ios::in|ios::binary);
+   
+   if(in)
+   {
+      char nitfFile[4];
+      in.read((char*)nitfFile, 4);
+
+      return (ossimString(nitfFile,
+                          nitfFile+4) == "NITF");
+   }
+
+   return false;
+}
+
diff --git a/ossim/src/ossim/projection/ossimImageProjectionModel.cpp b/ossim/src/ossim/projection/ossimImageProjectionModel.cpp
new file mode 100644
index 0000000..b09769d
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimImageProjectionModel.cpp
@@ -0,0 +1,55 @@
+//-----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Class definition of ossimImageProjectionModel.
+//
+//-----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/projection/ossimImageProjectionModel.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/projection/ossimProjection.h>
+#include <string>
+
+RTTI_DEF1(ossimImageProjectionModel,
+          "ossimImageProjectionModel",
+          ossimImageModel)
+
+ossimImageProjectionModel::ossimImageProjectionModel()
+   : ossimImageModel(),
+     theProjection(0)
+{
+}
+
+ossimImageProjectionModel::~ossimImageProjectionModel()
+{
+   theProjection = 0;
+}
+
+void ossimImageProjectionModel::initialize(const ossimImageHandler& ih)
+{
+   // Initialize base.
+   ossimImageModel::initialize(ih);
+   
+   theProjection = 0;
+
+   // Fetch the handler's image geometry and see if it has a projection:
+   ossimImageHandler* iih = const_cast<ossimImageHandler*>(&ih); // cast away constness
+   ossimRefPtr<ossimImageGeometry> image_geom = iih->getImageGeometry();
+   if ( image_geom.valid() )
+   {
+      theProjection = image_geom->getProjection();
+   }
+}
+
+const ossimProjection* ossimImageProjectionModel::getProjection() const
+{
+   return theProjection;
+}
+
diff --git a/ossim/src/ossim/projection/ossimImageViewAffineTransform.cpp b/ossim/src/ossim/projection/ossimImageViewAffineTransform.cpp
new file mode 100644
index 0000000..18af2e2
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimImageViewAffineTransform.cpp
@@ -0,0 +1,339 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimImageViewAffineTransform.cpp 23423 2015-07-13 19:07:38Z dburken $
+
+#include <ossim/projection/ossimImageViewAffineTransform.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimMatrix3x3.h>
+#include <ossim/base/ossimString.h>
+
+RTTI_DEF1(ossimImageViewAffineTransform, "ossimImageViewAffineTransform", ossimImageViewTransform)
+
+ossimImageViewAffineTransform::ossimImageViewAffineTransform(double rotateDegrees,
+                                                             double imageScaleX,
+                                                             double imageScaleY,
+                                                             double scaleXValue,
+                                                             double scaleYValue,
+                                                             double translateXValue,
+                                                             double translateYValue,
+                                                             double pivotXValue,
+                                                             double pivotYValue)
+   :m_transform(3,3),
+    m_inverseTransform(3,3),
+    m_rotation(rotateDegrees),
+    m_imageSpaceScale(imageScaleX,imageScaleY),
+    m_scale(scaleXValue, scaleYValue),
+    m_translate(translateXValue, translateYValue),
+    m_pivot(pivotXValue, pivotYValue)
+{
+   m_transform << 1 << 0 << 0
+                << 0 << 1 << 0
+                << 0 << 0 << 1;
+   
+   m_inverseTransform << 1 << 0 << 0
+                       << 0 << 1 << 0
+                       << 0 << 0 << 1;
+
+   
+   rotate(rotateDegrees);
+   scale(scaleXValue, scaleYValue);
+   translate(translateXValue, translateYValue);
+   pivot(m_pivot.x, m_pivot.y);
+}
+
+ossimImageViewAffineTransform::~ossimImageViewAffineTransform()
+{
+}
+
+void ossimImageViewAffineTransform::imageToView(const ossimDpt& imagePoint,
+                                                ossimDpt&       viewPoint)const
+{
+   
+    viewPoint.x = m_transform[0][0]*imagePoint.x + m_transform[0][1]*imagePoint.y + m_transform[0][2];
+    viewPoint.y = m_transform[1][0]*imagePoint.x + m_transform[1][1]*imagePoint.y + m_transform[1][2];
+}
+
+void ossimImageViewAffineTransform::viewToImage(const ossimDpt& viewPoint,
+                                                ossimDpt&       imagePoint)const
+{
+   imagePoint.x = m_inverseTransform[0][0]*viewPoint.x + m_inverseTransform[0][1]*viewPoint.y + m_inverseTransform[0][2];
+   imagePoint.y = m_inverseTransform[1][0]*viewPoint.x + m_inverseTransform[1][1]*viewPoint.y + m_inverseTransform[1][2];
+}
+
+void ossimImageViewAffineTransform::setMatrix(NEWMAT::Matrix& matrix)
+{
+   m_transform        = matrix;
+   m_inverseTransform = m_transform.i();
+}
+
+const NEWMAT::Matrix& ossimImageViewAffineTransform::getMatrix()const
+{
+   return m_transform;
+}
+
+void ossimImageViewAffineTransform::translate(double deltaX,
+                                              double deltaY)
+{
+   m_translate = ossimDpt(deltaX, deltaY);
+   buildCompositeTransform();
+//    NEWMAT::Matrix m(3,3);
+
+//    m << 1 << 0 << deltaX
+//      << 0 << 1 << deltaY
+//      << 0 << 0 << 1;
+   
+   
+//    m_transform = m*m_transform;
+//    m_inverseTransform = m_transform.i();
+}
+
+void ossimImageViewAffineTransform::translateX(double deltaX)
+{
+   translate(deltaX, m_translate.y);
+}
+
+void ossimImageViewAffineTransform::translateY(double deltaY)
+{
+   translate(m_translate.x, deltaY);
+}
+
+void ossimImageViewAffineTransform::imageSpaceScale(double x, double y)
+{
+   m_imageSpaceScale = ossimDpt(x,y);
+   buildCompositeTransform();
+}
+
+void ossimImageViewAffineTransform::imageSpaceScaleX(double x)
+{
+   imageSpaceScale(x, m_imageSpaceScale.y);
+}
+
+void ossimImageViewAffineTransform::imageSpaceScaleY(double y)
+{
+   imageSpaceScale(m_imageSpaceScale.x, y);
+}
+
+void ossimImageViewAffineTransform::scale(double x, double y)
+{
+//    NEWMAT::Matrix m(3, 3);
+
+//    m << x << 0 << 0
+//      << 0 << y << 0
+//      << 0 << 0 << 1;
+
+   
+//   m_transform = (m*m_transform);
+
+//   m_inverseTransform = m_transform.i();
+
+   m_scale = ossimDpt(x,y);
+   buildCompositeTransform();
+}
+
+void ossimImageViewAffineTransform::scaleX(double x)
+{
+   scale(x, m_scale.y);
+}
+
+void ossimImageViewAffineTransform::scaleY(double y)
+{
+   scale(m_scale.x, y);
+}
+
+void ossimImageViewAffineTransform::pivot(double originX, double originY)
+{
+   m_pivot.x = originX;
+   m_pivot.y = originY;
+   buildCompositeTransform();
+}
+
+void ossimImageViewAffineTransform::pivotX(double originX)
+{
+   pivot(originX,m_pivot.y);
+}
+
+void ossimImageViewAffineTransform::pivotY(double originY)
+{
+   pivot(m_pivot.x, originY);
+}
+
+void ossimImageViewAffineTransform::rotate(double degrees)
+{
+   m_rotation = degrees;
+   buildCompositeTransform();
+//   m_transform = (m_transform * ossimMatrix3x3::createRotationZMatrix(degrees));
+//    m_transform = ossimMatrix3x3::createRotationZMatrix(degrees) * m_transform;
+
+//    m_inverseTransform = m_transform.i();
+}
+
+void ossimImageViewAffineTransform::buildCompositeTransform()
+{
+   NEWMAT::Matrix imageSpaceScaleM(3,3);
+   NEWMAT::Matrix scaleM(3, 3);
+   NEWMAT::Matrix rotzM = ossimMatrix3x3::createRotationZMatrix(m_rotation);
+   NEWMAT::Matrix transM(3,3);
+   NEWMAT::Matrix transOriginM(3,3);
+   NEWMAT::Matrix transOriginNegatedM(3,3);
+
+   transM << 1 << 0 << m_translate.x
+          << 0 << 1 << m_translate.y
+          << 0 << 0 << 1;
+   
+   transOriginM << 1 << 0 << m_pivot.x
+                << 0 << 1 << m_pivot.y
+                << 0 << 0 << 1;
+   
+   transOriginNegatedM << 1 << 0 << -m_pivot.x
+                       << 0 << 1 << -m_pivot.y
+                       << 0 << 0 << 1;
+   
+   scaleM << m_scale.x << 0 << 0
+          << 0 << m_scale.y << 0
+          << 0 << 0 << 1;
+   
+   imageSpaceScaleM << m_imageSpaceScale.x << 0 << 0
+          << 0 << m_imageSpaceScale.y << 0
+          << 0 << 0 << 1;
+
+//   m_transform        = transOriginM*transM*scaleM*rotzM*transOriginNegatedM;
+   // pivot should just be around the rotation
+   m_transform        = transM*scaleM*transOriginM*rotzM*imageSpaceScaleM*transOriginNegatedM;
+   m_inverseTransform = m_transform.i();
+   
+}
+
+
+bool ossimImageViewAffineTransform::loadState(const ossimKeywordlist& kwl,
+                                              const char* prefix)
+{
+   ossimString imageScaleString(kwl.find(prefix,"image_scale"));
+   ossimString scaleString(kwl.find(prefix,"scale"));
+   ossimString pivotString(kwl.find(prefix,"pivot"));
+   ossimString translateString(kwl.find(prefix,"translate"));
+   ossimString rotateString(kwl.find(prefix,"rotate"));
+   
+   if(!imageScaleString.empty())
+   {
+      m_imageSpaceScale.toPoint(imageScaleString);
+   }
+   if(!scaleString.empty())
+   {
+      m_scale.toPoint(scaleString);
+   }
+   if(!pivotString.empty())
+   {
+      m_pivot.toPoint(pivotString);
+   }
+   if(!translateString.empty())
+   {
+      m_translate.toPoint(translateString);
+   }
+   if(!rotateString.empty())
+   {
+      m_rotation = rotateString.toDouble();
+   }
+   buildCompositeTransform();
+   ossimImageViewTransform::loadState(kwl, prefix);
+   return true;
+}
+
+bool ossimImageViewAffineTransform::saveState(ossimKeywordlist& kwl,
+                                              const char* prefix)const
+{
+   kwl.add(prefix,
+           "image_scale",
+           m_imageSpaceScale.toString(),
+           true);
+   kwl.add(prefix,
+           "rotation",
+           m_rotation,
+           true);
+   kwl.add(prefix,
+           "pivot",
+           m_pivot.toString(),
+           true);
+   kwl.add(prefix,
+           "scale",
+           m_scale.toString(),
+           true);
+   kwl.add(prefix,
+           "translate",
+           m_translate.toString(),
+           true);
+           
+   return ossimImageViewTransform::saveState(kwl,prefix);
+}
+
+bool ossimImageViewAffineTransform::isValid()const
+{
+   return true;
+}
+
+bool ossimImageViewAffineTransform::setView(ossimObject* obj)
+{
+   ossimImageViewAffineTransform* view = dynamic_cast<ossimImageViewAffineTransform*> (obj);
+   if(view)
+   {  
+      m_transform = view->m_transform;
+      m_inverseTransform = view->m_inverseTransform;
+      m_rotation = view->m_rotation;
+      m_imageSpaceScale = view->m_imageSpaceScale;
+      m_scale = view->m_scale;
+      m_translate = view->m_translate;
+      m_pivot = view->m_pivot;
+   }
+   return (view!=0);
+}
+
+ossimObject* ossimImageViewAffineTransform::getView()
+{
+   return this;
+}
+
+const ossimObject* ossimImageViewAffineTransform::getView()const
+{
+   return this;
+}
+
+ossimDpt ossimImageViewAffineTransform::getInputMetersPerPixel()const
+{
+   return ossimDpt(1,1);
+}
+
+ossimDpt ossimImageViewAffineTransform::getOutputMetersPerPixel()const
+{
+   ossimDpt result;
+   
+   result.makeNan();
+   
+   return result;
+}
+
+bool ossimImageViewAffineTransform::isEqualTo(const ossimObject& obj, ossimCompareType compareType)const
+{
+   bool result = ossimImageViewTransform::isEqualTo(obj,compareType);
+   
+   if(result)
+   {
+      result = false;
+      const ossimImageViewAffineTransform* rhs = dynamic_cast<const ossimImageViewAffineTransform*> (&obj);
+      if(rhs)
+      {
+         result = (ossim::almostEqual(m_rotation, rhs->m_rotation)&&
+                   (m_imageSpaceScale.isEqualTo(rhs->m_imageSpaceScale))&&
+                   (m_scale.isEqualTo(rhs->m_scale))&&                   
+                   (m_translate.isEqualTo(rhs->m_translate))&&
+                   (m_pivot.isEqualTo(rhs->m_pivot))
+                   );  
+      }
+   }
+   
+   return result;
+}
diff --git a/ossim/src/ossim/projection/ossimImageViewProjectionTransform.cpp b/ossim/src/ossim/projection/ossimImageViewProjectionTransform.cpp
new file mode 100644
index 0000000..8747e33
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimImageViewProjectionTransform.cpp
@@ -0,0 +1,508 @@
+//*****************************************************************************
+// FILE: ossimImageViewProjectionTransform.cc
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// AUTHOR: Garrett Potts
+//         Oscar Kramer (oscar at krameranalytic.com)
+//
+// DESCRIPTION: Contains declaration of ossimImageViewProjectionTransform.
+//    This class provides an image to view transform that utilizes two
+//    independent 2D-to-3D projections. Intended for transforming view to
+//    geographic "world" space to input image space.
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimImageViewProjectionTransform.cpp 23664 2015-12-14 14:17:27Z dburken $
+//
+#include <ossim/projection/ossimImageViewProjectionTransform.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimGeoPolygon.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimPolyArea2d.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <cmath>
+
+RTTI_DEF1(ossimImageViewProjectionTransform,
+          "ossimImageViewProjectionTransform",
+          ossimImageViewTransform);
+
+//*****************************************************************************
+//  CONSTRUCTOR: ossimImageViewProjectionTransform
+//*****************************************************************************
+ossimImageViewProjectionTransform::ossimImageViewProjectionTransform
+(  ossimImageGeometry* imageGeometry, ossimImageGeometry* viewGeometry)
+:  m_imageGeometry(imageGeometry),
+   m_viewGeometry(viewGeometry)
+{
+}
+
+//*****************************************************************************
+//  CONSTRUCTOR: ossimImageViewProjectionTransform
+//*****************************************************************************
+ossimImageViewProjectionTransform::
+ossimImageViewProjectionTransform(const ossimImageViewProjectionTransform& src)
+: ossimImageViewTransform(src),
+  m_imageGeometry(src.m_imageGeometry),
+  m_viewGeometry(src.m_viewGeometry)
+{
+}
+
+//*****************************************************************************
+//  DESTRUCTOR: ~ossimImageViewProjectionTransform
+//*****************************************************************************
+ossimImageViewProjectionTransform::~ossimImageViewProjectionTransform()
+{
+}
+
+//*****************************************************************************
+//  Workhorse of the object. Converts image-space to view-space.
+//*****************************************************************************
+void ossimImageViewProjectionTransform::imageToView(const ossimDpt& ip, ossimDpt& vp) const
+{
+   // Check for same geometries on input and output (this includes NULL geoms):
+   if (m_imageGeometry == m_viewGeometry)
+   {
+      vp = ip;
+      return;
+   }
+   
+   // Otherwise we need access to good geoms. Check for a bad geometry object:
+   if (!m_imageGeometry || !m_viewGeometry)
+   {
+      vp.makeNan();
+      return;
+   }
+   
+   // Check for same projection on input and output sides to save projection to ground:
+   if (m_imageGeometry->getProjection() == m_viewGeometry->getProjection())
+   {
+      // Check for possible same 2D transforms as well:
+      if ( (m_imageGeometry->getTransform() == m_viewGeometry->getTransform()) &&
+           (m_imageGeometry->decimationFactor(0) == m_viewGeometry->decimationFactor(0)) )
+      {
+         vp = ip;
+         return;
+      }
+      
+      // Not the same 2D transform, so just perform local-image -> full-image -> local-view:
+      ossimDpt fp;
+      m_imageGeometry->rnToFull(ip, 0, fp);
+      m_viewGeometry->fullToRn(fp, 0, vp);
+      return;
+   }
+   
+   //---
+   // Completely different left and right side geoms (typical situation).
+   // Need to project to ground.
+   //---
+   ossimGpt gp;
+   m_imageGeometry->localToWorld(ip, gp);
+   m_viewGeometry->worldToLocal(gp, vp);
+
+#if 0 /* Please leave for debug. */
+   cout <<"DEBUG ossimImageViewProjectionTransform::imageToView:"
+        <<"\n    ip: "<<ip
+        <<"\n    gp: "<<gp
+        <<"\n    vp: "<<vp<<std::endl;
+#endif
+}
+
+//*****************************************************************************
+//  Other workhorse of the object. Converts view-space to image-space.
+//*****************************************************************************
+void ossimImageViewProjectionTransform::viewToImage(const ossimDpt& vp, ossimDpt& ip) const
+{
+   // Check for same geometries on input and output (this includes NULL geoms):
+   if (m_imageGeometry == m_viewGeometry)
+   {
+      ip = vp;
+      return;
+   }
+   
+   // Otherwise we need access to good geoms. Check for a bad geometry object:
+   if (!m_imageGeometry || !m_viewGeometry)
+   {
+      ip.makeNan();
+      return;
+   }
+   
+   // Check for same projection on input and output sides to save projection to ground:
+   const ossimProjection* iproj = m_imageGeometry->getProjection();
+   const ossimProjection* vproj = m_viewGeometry->getProjection();
+   if ((iproj && vproj && iproj->isEqualTo(*vproj)) || (iproj == vproj))
+   {
+      // Check for possible same 2D transforms as well:
+      const ossim2dTo2dTransform* ixform = m_imageGeometry->getTransform();
+      const ossim2dTo2dTransform* vxform = m_viewGeometry->getTransform();
+      if (((ixform && vxform && ixform->isEqualTo(*vxform)) || (ixform == vxform)) &&
+          (m_imageGeometry->decimationFactor(0) == m_viewGeometry->decimationFactor(0)))
+      {
+         ip = vp;
+         return;
+      }
+      
+      // Not the same 2D transform, so just perform local-image -> full-image -> local-view:
+      ossimDpt fp;
+      m_viewGeometry->rnToFull(vp, 0, fp);
+      m_imageGeometry->fullToRn(fp, 0, ip);
+      return;
+   }
+   
+   //---
+   // Completely different left and right side geoms (typical situation).
+   // Need to project to ground.
+   //---
+   ossimGpt gp;
+   m_viewGeometry->localToWorld(vp, gp);
+   m_imageGeometry->worldToLocal(gp, ip);
+
+#if 0 /* Please leave for debug. */
+   cout <<"DEBUG ossimImageViewProjectionTransform::viewToImage:"
+        <<"\n    vp: "<<vp
+        <<"\n    gp: "<<gp
+        <<"\n    ip: "<<ip
+        <<std::endl;
+#endif
+}
+
+//*****************************************************************************
+//! OLK: Not sure where this is used, but needed to satisfy ossimViewInterface base class.
+//*****************************************************************************
+bool ossimImageViewProjectionTransform::setView(ossimObject* baseObject)
+{
+   ossimImageGeometry* g = dynamic_cast<ossimImageGeometry*>(baseObject);
+   bool new_view_set = false;
+   if (g)
+   {
+      m_viewGeometry = g;
+      new_view_set = true;
+   }
+   else
+   {
+      ossimProjection* proj = dynamic_cast<ossimProjection*>(baseObject);
+      if(proj)
+      {
+         if(m_viewGeometry.valid())
+         {
+            m_viewGeometry->setProjection(proj);
+         }
+         else
+         {
+            m_viewGeometry = new ossimImageGeometry(0, proj);
+         }
+
+         new_view_set = true;
+      }
+   }
+
+   if ( m_viewGeometry.valid() && m_viewGeometry->getImageSize().hasNans() )
+   {
+      // Sets the view image size from the image geometry if present.
+      initializeViewSize();
+   } 
+
+   return new_view_set;
+}
+
+//*****************************************************************************
+//  Dumps contents to stream
+//*****************************************************************************
+std::ostream& ossimImageViewProjectionTransform::print(std::ostream& out)const
+{
+    out << "ossimImageViewProjectionTransform::print: ..... entered " <<endl;
+
+    if(m_imageGeometry.valid())
+    {
+        out << "  Input Image (LEFT) Geometry: " << endl;
+        m_imageGeometry->print(out);
+    }
+    else
+    {
+        out << "  None defined." << endl;
+    }
+    if(m_viewGeometry.valid())
+    {
+        out << "Output View (RIGHT) Geometry: " << endl;
+        m_viewGeometry->print(out);
+    }
+    else
+    {
+        out << "  None defined." << endl;
+    }
+    return out;
+}
+
+//**************************************************************************************************
+// Converts the local image space rect into bounding view-space rect
+//**************************************************************************************************
+ossimDrect ossimImageViewProjectionTransform::getImageToViewBounds(const ossimDrect& imageRect)const
+{
+    // Let base class try:
+   ossimDrect result = ossimImageViewTransform::getImageToViewBounds(imageRect);
+
+   // If not successful, compute using input and output geometries:
+   if (result.hasNans() && m_imageGeometry.valid() && m_viewGeometry.valid() &&
+       m_imageGeometry->hasProjection() && m_viewGeometry->hasProjection())
+   {
+      ossimGeoPolygon viewClip;
+      m_viewGeometry->getProjection()->getGroundClipPoints(viewClip);
+      if(viewClip.size())
+      {
+         std::vector<ossimGpt> imageGpts(4);
+         m_imageGeometry->localToWorld(imageRect.ul(), imageGpts[0]);
+         m_imageGeometry->localToWorld(imageRect.ur(), imageGpts[1]);
+         m_imageGeometry->localToWorld(imageRect.lr(), imageGpts[2]);
+         m_imageGeometry->localToWorld(imageRect.ll(), imageGpts[3]);
+
+         const ossimDatum* viewDatum = m_viewGeometry->getProjection()->origin().datum();
+         imageGpts[0].changeDatum(viewDatum);
+         imageGpts[1].changeDatum(viewDatum);
+         imageGpts[2].changeDatum(viewDatum);
+         imageGpts[3].changeDatum(viewDatum);
+         
+         ossimPolyArea2d viewPolyArea(viewClip.getVertexList());
+         ossimPolyArea2d imagePolyArea(imageGpts);
+         viewPolyArea &= imagePolyArea;
+         std::vector<ossimPolygon> visiblePolygons;
+         viewPolyArea.getVisiblePolygons(visiblePolygons);
+         if(visiblePolygons.size())
+         {
+            std::vector<ossimDpt> vpts;
+            ossim_uint32 idx = 0;
+            for(idx=0; idx<visiblePolygons[0].getNumberOfVertices();++idx)
+            {
+               ossimDpt tempPt;
+               ossimGpt gpt(visiblePolygons[0][idx].lat, visiblePolygons[0][idx].lon, 0.0,  viewDatum);
+               m_viewGeometry->worldToLocal(gpt, tempPt);
+               vpts.push_back(tempPt);
+            }
+            result = ossimDrect(vpts);
+         }
+      }
+   }
+   return result;
+}
+
+//*****************************************************************************
+//  METHOD: ossimImageViewProjectionTransform::loadState
+//*****************************************************************************
+bool ossimImageViewProjectionTransform::loadState(const ossimKeywordlist& kwl,
+                                                  const char* prefix)
+{
+   bool result = ossimImageViewTransform::loadState(kwl, prefix);
+   if(result)
+   {
+      ossimString imagePrefix = ossimString(prefix)+"image_geometry.";
+      ossimString viewPrefix  = ossimString(prefix)+"view_geometry.";
+      if(kwl.numberOf(imagePrefix.c_str())>0)
+      {
+         m_imageGeometry = new ossimImageGeometry();
+         m_imageGeometry->loadState(kwl, imagePrefix.c_str());
+      }
+      if(kwl.numberOf(viewPrefix.c_str())>0)
+      {
+         m_viewGeometry = new ossimImageGeometry();
+         m_viewGeometry->loadState(kwl, viewPrefix.c_str());
+      }
+      
+   }
+   
+   return result;
+}
+
+//**************************************************************************************************
+// 
+//**************************************************************************************************
+bool ossimImageViewProjectionTransform::saveState(ossimKeywordlist& kwl,
+                                                  const char* prefix)const
+{
+   ossimString imagePrefix = ossimString(prefix)+"image_geometry.";
+   ossimString viewPrefix  = ossimString(prefix)+"view_geometry.";
+   
+   if(m_imageGeometry.valid())
+   {
+      m_imageGeometry->saveState(kwl, imagePrefix.c_str());
+   }
+   if(m_viewGeometry.valid())
+   {
+      m_viewGeometry->saveState(kwl, viewPrefix.c_str());
+   }
+   return ossimImageViewTransform::saveState(kwl, prefix);
+}
+
+//**************************************************************************************************
+// Returns the GSD of input image.
+//**************************************************************************************************
+ossimDpt ossimImageViewProjectionTransform::getInputMetersPerPixel() const
+{
+    ossimDpt result;
+
+    if (m_imageGeometry.valid() && m_imageGeometry->hasProjection())
+        result = m_imageGeometry->getProjection()->getMetersPerPixel();
+    else
+        result.makeNan();
+
+    return result;
+}
+
+//**************************************************************************************************
+// Returns the GSD of the output view.
+//**************************************************************************************************
+ossimDpt ossimImageViewProjectionTransform::getOutputMetersPerPixel() const
+{
+    ossimDpt result;
+
+    if(m_viewGeometry.valid() && m_viewGeometry->hasProjection())
+        result = m_viewGeometry->getProjection()->getMetersPerPixel();
+    else
+        result.makeNan();
+
+    return result;
+}
+
+// Initialize view geometry image size from image geometry.
+bool ossimImageViewProjectionTransform::initializeViewSize()
+{
+   bool result = false;
+
+   if ( m_imageGeometry.valid() )
+   {
+      ossimIrect imageRect( 0, 0,
+                            m_imageGeometry->getImageSize().x - 1,
+                            m_imageGeometry->getImageSize().y - 1);
+      
+      if ( (imageRect.hasNans() == false) && m_viewGeometry.valid() )
+      {
+         ossimRefPtr<ossimProjection> viewProj = m_viewGeometry->getProjection();
+         if ( viewProj.valid() )
+         {
+            ossimIpt size;
+            size.makeNan();
+            
+            const ossimEquDistCylProjection* eqProj =
+               dynamic_cast<const ossimEquDistCylProjection*>( viewProj.get() );
+            if ( eqProj )
+            {
+               // Specialized to take into consideration a date line crossing.
+               
+               // Get the ground points we need:
+               ossimDpt iRight(imageRect.ul().x+1, imageRect.ul().y);
+               ossimDpt iDown(imageRect.ul().x, imageRect.ul().y+1);
+               ossimGpt gul;
+               ossimGpt gur; 
+               ossimGpt glr;
+               ossimGpt gll;
+               ossimGpt gRight;
+               ossimGpt gDown;
+               ossim_float64 hdd; // height decimal degrees
+               ossim_float64 wdd; // width decimal degrees
+               ossim_float64 leftLon;
+               ossim_float64 rightLon;
+               
+               m_imageGeometry->localToWorld( imageRect.ul(), gul );
+               m_imageGeometry->localToWorld( imageRect.ur(), gur );
+               m_imageGeometry->localToWorld( imageRect.lr(), glr );
+               m_imageGeometry->localToWorld( imageRect.ll(), gll );
+               m_imageGeometry->localToWorld( iRight, gRight );
+               m_imageGeometry->localToWorld( iDown, gDown );
+               
+               //---
+               // Determine the direction of the image and get the geographic bounding box.
+               // For the longitude consider a date line crossing.
+               //---
+               if ( gul.lat > gDown.lat ) // oriented north up
+               {
+                  if ( gul.lat >= gRight.lat ) // straight up or leaning right
+                  {
+                     hdd      = gul.lat - glr.lat;
+                     leftLon  = gll.lon;
+                     rightLon = gur.lon;
+                  }
+                  else // leaning left
+                  {
+                     hdd      = gur.lat - gll.lat;
+                     leftLon  = gul.lon;
+                     rightLon = glr.lon;
+                  }
+               }
+               else // south or on side
+               {
+                  if ( gRight.lat >= gul.lat ) // straight down or leaning right
+                  {
+                     hdd      = glr.lat - gul.lat;
+                     leftLon  = gur.lon;
+                     rightLon = gll.lon;
+                  }
+                  else // leaning left
+                  {
+                     hdd      = gll.lat - gur.lat;
+                     leftLon  = glr.lon;
+                     rightLon = gul.lon;
+                  }
+               }
+               
+               if ( rightLon > leftLon )
+               {
+                  wdd = rightLon - leftLon;
+               }
+               else // Date line cross:
+               {
+                  wdd = rightLon + 360.0 - leftLon;
+               }
+
+               //---
+               // Add one pixel width/height to the point to point size to make it edge to edge
+               // before dividing by gsd to get the size.  The view projection gsd is used here
+               // since the view could be a different resolution than the input projection.
+               //---
+               size.x = ossim::round<ossim_int32>(
+                  ( wdd + eqProj->getDecimalDegreesPerPixel().x ) /
+                  eqProj->getDecimalDegreesPerPixel().x );
+               size.y = ossim::round<ossim_int32>(
+                  ( hdd + eqProj->getDecimalDegreesPerPixel().y ) /
+                  eqProj->getDecimalDegreesPerPixel().y );
+               
+#if 0 /* Please leave for debug: */
+               cout << "\nwdd: " << wdd
+                    << "\nhdd: " << hdd
+                    << "\ngul: " << gul
+                    << "\ngur: " << gur
+                    << "\nglr: " << glr
+                    << "\ngll: " << gll
+                    << endl;
+#endif
+            }
+            else // Not an ossimEquDistCylProjection:
+            {
+               ossimDrect rect = getImageToViewBounds( imageRect );
+               size.x = ossim::round<ossim_int32>( rect.width()  );
+               size.y = ossim::round<ossim_int32>( rect.height() );
+            }
+
+#if 0 /* Please leave for debug: */
+            cout << "m_imageGeometry:\n" << *(m_imageGeometry.get())
+                 << "\n\nm_viewGeometry:\n" << *(m_imageGeometry.get())
+                 << "\n\ncomputed view size: " << size << endl;
+#endif
+            
+            if ( size.hasNans() == false )
+            {
+               m_viewGeometry->setImageSize( size );
+               result = true;
+            }
+            
+         } // Matches: if ( viewProj.valid() )
+
+      } // Matches: if ( (imageRect.hasNans() == false) ... 
+      
+   } // Matches: if ( m_imageGeometry.valid() && ...
+
+   return result;
+   
+} // End:  bool ossimImageViewProjectionTransform::initializeViewSize()
+
diff --git a/ossim/src/ossim/projection/ossimImageViewTransform.cpp b/ossim/src/ossim/projection/ossimImageViewTransform.cpp
new file mode 100644
index 0000000..b8ea0f7
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimImageViewTransform.cpp
@@ -0,0 +1,319 @@
+#include <math.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/projection/ossimImageViewTransform.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimIrect.h>
+
+RTTI_DEF2(ossimImageViewTransform, "ossimImageViewTransform", ossim2dTo2dTransform, ossimViewInterface)
+
+ossimImageViewTransform::ossimImageViewTransform()
+    :
+       ossim2dTo2dTransform(),
+       ossimViewInterface(NULL)
+{
+   ossimViewInterface::theObject = this;
+}
+
+void ossimImageViewTransform::forward(const ossimDpt& input,
+                                      ossimDpt& output) const
+{
+   imageToView(input, output);
+}
+
+void ossimImageViewTransform::inverse(const ossimDpt& input,
+                                      ossimDpt& output) const
+{
+   viewToImage(input, output);
+}
+
+void ossimImageViewTransform::imageToView(const ossimDpt& imagePoint,
+                                          ossimDpt&       viewPoint)const
+{
+   viewPoint = imagePoint;
+}
+
+void ossimImageViewTransform::viewToImage(const ossimDpt& viewPoint,
+                                          ossimDpt&       imagePoint)const
+{
+   ossim2dTo2dTransform::inverse(viewPoint, imagePoint);
+}
+
+ossimDpt ossimImageViewTransform::imageToView(const ossimDpt& imagePoint)const
+{
+   ossimDpt tempPt;
+   
+   imageToView(imagePoint, tempPt);
+   
+   return tempPt;
+}
+
+ossimDpt ossimImageViewTransform::viewToImage(const ossimDpt& viewPoint)const
+{
+   ossimDpt tempPt;
+   
+   viewToImage(viewPoint, tempPt);
+   
+   return tempPt;
+}
+
+void ossimImageViewTransform::getRoundTripErrorView(ossimDpt& result,
+                                                    const ossimDpt&  viewPt )const
+{
+  ossimDpt ipt;
+  ossimDpt vpt;
+  viewToImage(viewPt, ipt);
+  if(ipt.hasNans())
+  {
+    vpt.makeNan();
+  }
+  else
+  {
+    imageToView(ipt, vpt);
+  }
+
+  if(vpt.hasNans())
+  {
+    result.makeNan();
+  }
+  else
+  {
+    result = viewPt-vpt;
+  }
+ //  result = ossimDpt(0,0);
+}
+
+ossimDpt ossimImageViewTransform::getRoundTripErrorView(const ossimDpt& viewPt)const
+{
+   ossimDpt result;
+   getRoundTripErrorView(result, viewPt);
+   return result;
+}
+
+void ossimImageViewTransform::getRoundTripErrorImage(ossimDpt& result,
+                                                     const ossimDpt& imagePt )const
+{
+  ossimDpt ipt;
+  ossimDpt vpt;
+  imageToView(imagePt, vpt);
+  if(vpt.hasNans())
+  {
+    ipt.makeNan();
+  }
+  else
+  {
+    viewToImage(vpt, ipt);
+  }
+
+  if(ipt.hasNans())
+  {
+    result.makeNan();
+  }
+  else
+  {
+    result = imagePt-ipt;
+  }
+
+//   result = ossimDpt(0,0);
+}
+
+ossimDpt ossimImageViewTransform::getRoundTripErrorImage(const ossimDpt& imagePt)const
+{
+   ossimDpt result;
+   getRoundTripErrorView(result, imagePt);
+   return result;
+}
+  
+bool ossimImageViewTransform::loadState(const ossimKeywordlist& kwl,
+                                        const char* prefix)
+{
+   return ossim2dTo2dTransform::loadState(kwl, prefix);
+}
+
+bool ossimImageViewTransform::saveState(ossimKeywordlist& kwl,
+                                        const char* prefix)const
+{
+   return ossim2dTo2dTransform::saveState(kwl, prefix);
+}
+
+void ossimImageViewTransform::getScaleChangeImageToView(ossimDpt& result,
+                                                        const ossimDrect& imageRect)
+{
+   result.makeNan();
+   if(!imageRect.hasNans())
+   {
+      ossimDpt vul;
+      ossimDpt vur;
+      ossimDpt vlr;
+      ossimDpt vll;
+
+      imageToView(imageRect.ul(),
+                  vul);
+      imageToView(imageRect.ur(),
+                  vur);
+      imageToView(imageRect.lr(),
+                  vlr);
+      imageToView(imageRect.ll(),
+                  vll);
+
+      if(!vul.hasNans()&&
+         !vur.hasNans()&&
+         !vlr.hasNans()&&
+         !vll.hasNans())
+      {
+         
+         double deltaTop    = (vul - vur).length();
+         double deltaBottom = (vll - vlr).length();
+         double deltaRight  = (vur - vlr).length();
+         
+         double w = imageRect.width();
+         double h = imageRect.height();
+         result.x = (deltaTop/w + deltaBottom/w)*.5;
+         result.y = (deltaRight/h + deltaRight/h)*.5;
+      }
+   }
+}
+
+void ossimImageViewTransform::getScaleChangeViewToImage(ossimDpt& result,
+                                                        const ossimDrect& viewRect)
+{
+   result.makeNan();
+   if(!viewRect.hasNans())
+   {
+      ossimDpt iul;
+      ossimDpt iur;
+      ossimDpt ilr;
+      ossimDpt ill;
+
+      imageToView(viewRect.ul(),
+                  iul);
+      imageToView(viewRect.ur(),
+                  iur);
+      imageToView(viewRect.lr(),
+                  ilr);
+      imageToView(viewRect.ll(),
+                  ill);
+
+      if(!iul.hasNans()&&
+         !iur.hasNans()&&
+         !ilr.hasNans()&&
+         !ill.hasNans())
+      {
+         
+         double deltaTop    = (iul - iur).length();
+         double deltaBottom = (ill - ilr).length();
+         double deltaRight  = (iur - ilr).length();
+         
+         double w = viewRect.width();
+         double h = viewRect.height();
+         result.x = (deltaTop/w + deltaBottom/w)*.5;
+         result.y = (deltaRight/h + deltaRight/h)*.5;
+      }
+   }
+}
+
+void ossimImageViewTransform::getImageToViewScale(ossimDpt& resultScale,
+						  const ossimDpt& imagePoint,
+						  const ossimDpt& deltaImagePointXY)const
+{
+  ossimDpt p1 = imagePoint;
+  ossimDpt p2(imagePoint.x + deltaImagePointXY.x,
+	      imagePoint.y);
+  ossimDpt p3(imagePoint.x,
+	      imagePoint.y + deltaImagePointXY.y);
+  
+  ossimDpt transformedP1;
+  ossimDpt transformedP2;
+  ossimDpt transformedP3;
+
+  imageToView(p1, transformedP1);
+  imageToView(p2, transformedP2);
+  imageToView(p3, transformedP3);
+
+  ossimDpt deltaP1P2 = transformedP1 - transformedP2;
+  ossimDpt deltaP1P3 = transformedP1 - transformedP3;
+ 
+  // now compute the distances.
+  double sumSquaredSqrtP1P2 = sqrt((deltaP1P2.x*deltaP1P2.x) +
+			       (deltaP1P2.y*deltaP1P2.y));
+  double sumSquaredSqrtP1P3 = sqrt((deltaP1P3.x*deltaP1P3.x) +
+			       (deltaP1P3.y*deltaP1P3.y));
+
+  resultScale.x = 0;
+  resultScale.y = 0;
+
+  if(sumSquaredSqrtP1P2 > FLT_EPSILON)
+    {
+      resultScale.x = sumSquaredSqrtP1P2/deltaImagePointXY.x;
+    }
+  if(sumSquaredSqrtP1P3 > FLT_EPSILON)
+    {
+      resultScale.y = sumSquaredSqrtP1P3/deltaImagePointXY.y;
+    }
+}
+
+void ossimImageViewTransform::getViewToImageScale(ossimDpt& resultScale,
+						  const ossimDpt& viewPoint,
+						  const ossimDpt& deltaViewPointXY)const
+{
+  ossimDpt p1 = viewPoint;
+  ossimDpt p2(viewPoint.x + deltaViewPointXY.x,
+	      viewPoint.y);
+  ossimDpt p3(viewPoint.x,
+	      viewPoint.y + deltaViewPointXY.y);
+
+  ossimDpt transformedP1;
+  ossimDpt transformedP2;
+  ossimDpt transformedP3;
+
+  viewToImage(p1, transformedP1);
+  viewToImage(p2, transformedP2);
+  viewToImage(p3, transformedP3);
+
+  ossimDpt deltaP1P2 = transformedP1 - transformedP2;
+  ossimDpt deltaP1P3 = transformedP1 - transformedP3;
+
+  // now compute the distances.
+  double sumSquaredSqrtP1P2 = sqrt((deltaP1P2.x*deltaP1P2.x) +
+                                   (deltaP1P2.y*deltaP1P2.y));
+  double sumSquaredSqrtP1P3 = sqrt((deltaP1P3.x*deltaP1P3.x) +
+                                   (deltaP1P3.y*deltaP1P3.y));
+
+  resultScale.x = 0;
+  resultScale.y = 0;
+
+  if(sumSquaredSqrtP1P2 > FLT_EPSILON)
+    {
+      resultScale.x = sumSquaredSqrtP1P2/deltaViewPointXY.x;
+    }
+  if(sumSquaredSqrtP1P3 > FLT_EPSILON)
+    {
+      resultScale.y = sumSquaredSqrtP1P3/deltaViewPointXY.y;
+    }
+}
+
+ossimDrect ossimImageViewTransform::getImageToViewBounds(const ossimDrect& imageRect)const
+{
+   ossimDpt p1;
+   ossimDpt p2;
+   ossimDpt p3;
+   ossimDpt p4;
+
+   imageToView(imageRect.ul(), p1);
+   imageToView(imageRect.ur(), p2);
+   imageToView(imageRect.lr(), p3);
+   imageToView(imageRect.ll(), p4);
+
+   return ossimDrect(p1, p2, p3, p4);
+}
+
+std::ostream& ossimImageViewTransform::print(std::ostream& out) const
+{
+   return out;
+}
+
+std::ostream& operator<<(std::ostream& out,
+                         const ossimImageViewTransform& data)
+{
+   return data.print(out);
+}
+
diff --git a/src/ossim/projection/ossimImageViewTransformFactory.cpp b/ossim/src/ossim/projection/ossimImageViewTransformFactory.cpp
similarity index 100%
rename from src/ossim/projection/ossimImageViewTransformFactory.cpp
rename to ossim/src/ossim/projection/ossimImageViewTransformFactory.cpp
diff --git a/src/ossim/projection/ossimIpodSensor.cpp b/ossim/src/ossim/projection/ossimIpodSensor.cpp
similarity index 100%
rename from src/ossim/projection/ossimIpodSensor.cpp
rename to ossim/src/ossim/projection/ossimIpodSensor.cpp
diff --git a/src/ossim/projection/ossimLambertConformalConicProjection.cpp b/ossim/src/ossim/projection/ossimLambertConformalConicProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimLambertConformalConicProjection.cpp
rename to ossim/src/ossim/projection/ossimLambertConformalConicProjection.cpp
diff --git a/src/ossim/projection/ossimLandSatModel.cpp b/ossim/src/ossim/projection/ossimLandSatModel.cpp
similarity index 100%
rename from src/ossim/projection/ossimLandSatModel.cpp
rename to ossim/src/ossim/projection/ossimLandSatModel.cpp
diff --git a/ossim/src/ossim/projection/ossimLensDistortion.cpp b/ossim/src/ossim/projection/ossimLensDistortion.cpp
new file mode 100644
index 0000000..e1cfd21
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimLensDistortion.cpp
@@ -0,0 +1,132 @@
+//*******************************************************************
+// Copyright (C) 2005 Garrett Potts
+//
+// MIT
+// 
+// Author:  Garrett Potts
+//
+// Description:
+//
+// ossimLensDistortion
+//*******************************************************************
+//  $Id: ossimLensDistortion.cpp 23666 2015-12-14 20:01:22Z rashadkm $
+#include <sstream>
+#include <ossim/projection/ossimLensDistortion.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimString.h>
+
+RTTI_DEF1(ossimLensDistortion, "ossimLensDistortion", ossim2dTo2dTransform);
+
+bool ossimLensDistortion::saveState(ossimKeywordlist& kwl,
+                                    const char* prefix)const
+{
+   ossim2dTo2dTransform::saveState(kwl, prefix);
+   
+   kwl.add(prefix,
+           "center",
+           ossimString::toString(theCenter.x) + " " + ossimString::toString(theCenter.y),
+           true);
+
+   return true;
+}
+
+bool ossimLensDistortion::loadState(const ossimKeywordlist& kwl,
+                                    const char* prefix)
+{
+   const char* center = kwl.find(prefix, "center");
+   theCenter.x = 0.0;
+   theCenter.y = 0.0;
+   
+   if(center)
+   {
+      std::vector<ossimString> splitString;
+      ossimString tempString(center);
+      tempString = tempString.trim();
+      tempString.split(splitString, " ");
+      if(splitString.size() == 2)
+      {
+         theCenter.x = splitString[0].toDouble();
+         theCenter.y = splitString[1].toDouble();
+      }
+   }
+
+   return ossim2dTo2dTransform::loadState(kwl, prefix);
+
+}
+
+void ossimLensDistortion::distort(const ossimDpt& input, ossimDpt& output)const
+{
+   int iters = 0;
+   
+   //***
+   // Begin with guess. Forward transform is defined as trasforming left to
+   // right. We are therefore solving for left:
+   //***
+   ossimDpt left (input);
+   ossimDpt left_dx;
+   ossimDpt left_dy;
+   ossimDpt right;
+   ossimDpt right_dx;
+   ossimDpt right_dy;
+   ossimDpt dr_dx;
+   ossimDpt dr_dy;
+   ossimDpt r_diff;
+   ossimDpt l_diff;
+   double inverse_norm;
+   
+   //***
+   // Begin iterations:
+   //***
+   do
+   {
+      //***
+      // establish perturbed image points about the guessed point:
+      //***
+      left_dx.x = left.x + 1.0;
+      left_dx.y = left.y;
+      left_dy.x = left.x;
+      left_dy.y = left.y + 1.0;
+      
+      //***
+      // Compute numerical partials at current guessed point:
+      //***
+      undistort(left,    right);
+      undistort(left_dx, right_dx);
+      undistort(left_dy, right_dy);
+      
+      dr_dx.x = (right_dx.x - right.x); //e
+      dr_dx.y = (right_dx.y - right.y); //g
+      dr_dy.x = (right_dy.x - right.x); //f
+      dr_dy.y = (right_dy.y - right.y); //h
+      
+      //***
+      // Test for convergence:
+      //***
+      r_diff = input - right;
+      
+      //***
+      // Compute linearized estimate of image point given gp delta:
+      //***
+      inverse_norm = dr_dy.u*dr_dx.v - dr_dx.u*dr_dy.v; // fg-eh
+      if (inverse_norm != 0)
+      {
+         l_diff.u = (-dr_dy.v*r_diff.u + dr_dy.u*r_diff.v)/inverse_norm;
+         l_diff.v = ( dr_dx.v*r_diff.u - dr_dx.u*r_diff.v)/inverse_norm;
+         left += l_diff;
+      }
+      else
+      {
+         l_diff.u = 0;
+         l_diff.v = 0;
+      }
+      
+      iters++;
+      
+   } while (((fabs(l_diff.u) > theConvergenceThreshold) ||
+             (fabs(l_diff.v) > theConvergenceThreshold)) &&
+            (iters < theMaxIterations));
+   
+   
+   output = left;
+}
+
diff --git a/src/ossim/projection/ossimLlxyProjection.cpp b/ossim/src/ossim/projection/ossimLlxyProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimLlxyProjection.cpp
rename to ossim/src/ossim/projection/ossimLlxyProjection.cpp
diff --git a/ossim/src/ossim/projection/ossimMapProjection.cpp b/ossim/src/ossim/projection/ossimMapProjection.cpp
new file mode 100644
index 0000000..69ad40e
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimMapProjection.cpp
@@ -0,0 +1,1699 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+// Base class for all map projections.
+// 
+//*******************************************************************
+//  $Id: ossimMapProjection.cpp 23418 2015-07-09 18:46:41Z gpotts $
+
+#include <iostream>
+#include <cstdlib>
+#include <iomanip>
+#include <sstream>
+
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimEpsgProjectionFactory.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimDatumFactoryRegistry.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimEllipsoid.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/elevation/ossimElevManager.h>
+#include <ossim/base/ossimMatrix3x3.h>
+#include <ossim/base/ossimUnitConversionTool.h>
+#include <ossim/base/ossimUnitTypeLut.h>
+#include <ossim/base/ossimTrace.h>
+
+static ossimTrace traceDebug("ossimMapProjection:debug");
+
+// RTTI information for the ossimMapProjection
+RTTI_DEF1(ossimMapProjection, "ossimMapProjection" , ossimProjection);
+
+ossimMapProjection::ossimMapProjection(const ossimEllipsoid& ellipsoid,
+                                       const ossimGpt& origin)
+   :theEllipsoid(ellipsoid),
+    theOrigin(origin),
+    theDatum(origin.datum()), // force no shifting
+    theUlGpt(0, 0),
+    theUlEastingNorthing(0, 0),
+    theFalseEastingNorthing(0, 0),
+    thePcsCode(0),
+    theElevationLookupFlag(false),
+    theModelTransform(),
+    theInverseModelTransform(),
+    theModelTransformUnitType(OSSIM_UNIT_UNKNOWN),
+    theProjectionUnits(OSSIM_METERS) 
+{
+   theUlGpt = theOrigin;
+   theUlEastingNorthing.makeNan();
+   theMetersPerPixel.makeNan();
+   theDegreesPerPixel.makeNan();
+}
+
+ossimMapProjection::ossimMapProjection(const ossimMapProjection& src)
+      : ossimProjection(src),
+        theEllipsoid(src.theEllipsoid),
+        theOrigin(src.theOrigin),
+        theDatum(src.theDatum),
+        theMetersPerPixel(src.theMetersPerPixel),
+        theDegreesPerPixel(src.theDegreesPerPixel),
+        theUlGpt(src.theUlGpt),
+        theUlEastingNorthing(src.theUlEastingNorthing),
+        theFalseEastingNorthing(src.theFalseEastingNorthing),
+        thePcsCode(src.thePcsCode),
+        theElevationLookupFlag(false),
+        theModelTransform(src.theModelTransform),
+        theInverseModelTransform(src.theInverseModelTransform),
+        theModelTransformUnitType(src.theModelTransformUnitType),
+        theProjectionUnits(src.theProjectionUnits)
+{
+}
+
+ossimMapProjection::~ossimMapProjection()
+{
+}
+
+ossimGpt ossimMapProjection::origin()const
+{
+   return theOrigin;
+}
+
+void ossimMapProjection::setPcsCode(ossim_uint32 pcsCode)
+{
+   thePcsCode = pcsCode;
+}
+
+ossim_uint32 ossimMapProjection::getPcsCode() const
+{
+   // The PCS code is not always set when the projection is instantiated with explicit parameters,
+   // since the code is only necessary when looking up those parameters in a database. However, it
+   // is still necessary to recognize when an explicit projection coincides with an EPSG-specified
+   // projection, and assign our PCS code to match it. So let's take this opportunity now to make 
+   // sure the PCS code is properly initialized.
+   if (thePcsCode == 0)
+   {
+      thePcsCode = ossimEpsgProjectionDatabase::instance()->findProjectionCode(*this);
+      if (thePcsCode == 0)
+         thePcsCode = 32767; // user-defined (non-EPSG) projection
+   }
+  
+   if (thePcsCode == 32767)
+      return 0; // 32767 only used internally. To the rest of OSSIM, the PCS=0 is undefined
+   
+   return thePcsCode;
+}
+
+ossimString ossimMapProjection::getProjectionName() const
+{
+   return getClassName();
+}
+
+double ossimMapProjection::getA() const
+{
+   return theEllipsoid.getA();
+}
+
+double ossimMapProjection::getB() const
+{
+   return theEllipsoid.getB();
+}
+
+double ossimMapProjection::getF() const
+{
+   return theEllipsoid.getFlattening();
+}
+
+ossimDpt ossimMapProjection::getMetersPerPixel() const
+{
+   return theMetersPerPixel;
+}
+
+const ossimDpt& ossimMapProjection::getDecimalDegreesPerPixel() const
+{
+   return theDegreesPerPixel;
+}
+
+const ossimDpt& ossimMapProjection::getUlEastingNorthing() const
+{
+   return theUlEastingNorthing;
+}
+
+const ossimGpt&   ossimMapProjection::getUlGpt() const
+{
+   return theUlGpt;
+}
+
+const ossimGpt& ossimMapProjection::getOrigin() const
+{
+  return theOrigin;
+}
+
+const ossimDatum* ossimMapProjection::getDatum() const
+{
+   return theDatum;
+}
+
+bool ossimMapProjection::isGeographic()const
+{
+   return false;
+}
+
+void ossimMapProjection::setEllipsoid(const ossimEllipsoid& ellipsoid)
+{
+   theEllipsoid = ellipsoid; update();
+}
+
+void ossimMapProjection::setAB(double a, double b)
+{
+   theEllipsoid.setA(a); theEllipsoid.setB(b); update();
+}
+
+void ossimMapProjection::setDatum(const ossimDatum* datum)
+{
+
+   if (!datum || (*theDatum == *datum))
+      return;
+
+   theDatum = datum; 
+   theEllipsoid = *(theDatum->ellipsoid());
+
+   // Change the datum of the ossimGpt data members:
+   theOrigin.changeDatum(theDatum);
+   theUlGpt.changeDatum(theDatum);
+
+   update();
+
+   // A change of datum usually implies a change of EPSG codes. Reset the PCS code. It will be
+   // reestablished as needed in the getPcsCode() method:
+   thePcsCode = 0;
+}
+
+void ossimMapProjection::setOrigin(const ossimGpt& origin)
+{
+   // Set the origin and since the origin has a datum which in turn has
+   // an ellipsoid, sync them up.
+   // NOTE: Or perhaps we need to change the datum of the input origin to that of theDatum? (OLK 05/11)
+   theOrigin    = origin;
+   theOrigin.changeDatum(theDatum);
+      
+   update();
+}
+
+//*****************************************************************************
+//  METHOD: ossimMapProjection::assign
+//
+//*****************************************************************************
+void ossimMapProjection::assign(const ossimProjection &aProjection)
+{
+   if(&aProjection!=this)
+   {
+      ossimKeywordlist kwl;
+
+      aProjection.saveState(kwl);
+      loadState(kwl);
+   }
+}
+
+//*****************************************************************************
+//  METHOD: ossimMapProjection::update
+//
+//*****************************************************************************
+void ossimMapProjection::update()
+{
+   // if the delta lat and lon per pixel is set then
+   // check to see if the meters were set.
+   //
+   if( hasModelTransform() )
+   {
+      updateFromTransform();
+   }
+   else if( theDegreesPerPixel.hasNans() == false )
+   {
+      if(theMetersPerPixel.hasNans())
+      {
+         computeMetersPerPixel();
+      }
+   }
+   else if(!theMetersPerPixel.hasNans())
+   {
+      computeDegreesPerPixel();
+   }
+   // compute the tie points if not already computed
+   //
+   // The tiepoint was specified either as easting/northing or lat/lon. Need to initialize the one
+   // that has not been assigned yet:
+   if (theUlEastingNorthing.hasNans() && !theUlGpt.hasNans())
+      theUlEastingNorthing = forward(theUlGpt);
+   else if (theUlGpt.hasNans() && !theUlEastingNorthing.hasNans())
+      theUlGpt = inverse(theUlEastingNorthing);
+   else if (theUlGpt.hasNans() && theUlEastingNorthing.hasNans())
+   {
+      theUlGpt = theOrigin;
+      theUlEastingNorthing = forward(theUlGpt);
+   }
+   if(theMetersPerPixel.hasNans() &&
+      theDegreesPerPixel.hasNans())
+   {
+      ossimDpt mpd = ossimGpt().metersPerDegree();
+      if(isGeographic())
+      {
+         theDegreesPerPixel.lat = 1.0/mpd.y;
+         theDegreesPerPixel.lon = 1.0/mpd.x;
+         computeMetersPerPixel();
+      }
+      else
+      {
+         theMetersPerPixel.x = 1.0;
+         theMetersPerPixel.y = 1.0;
+         computeDegreesPerPixel();
+     }
+   }
+}
+
+void ossimMapProjection::updateFromTransform()
+{
+   if ( hasModelTransform() )
+   {
+      const NEWMAT::Matrix& m = theModelTransform.getData();
+      ossimDpt ls1(0, 0);
+      ossimDpt ls2(1, 0);
+      ossimDpt ls3(0, 1);
+      ossimGpt wpt1;
+      ossimGpt wpt2;
+      lineSampleToWorld(ls1, wpt1);
+      ossimDpt mpt1(m[0][0]*ls1.x + m[0][1]*ls1.y + m[0][3],
+                    m[1][0]*ls1.x + m[1][1]*ls1.y + m[1][3]);
+      ossimDpt mpt2(m[0][0]*ls2.x + m[0][1]*ls2.y + m[0][3],
+                    m[1][0]*ls2.x + m[1][1]*ls2.y + m[1][3]);
+      ossimDpt mpt3(m[0][0]*ls3.x + m[0][1]*ls3.y + m[0][3],
+                    m[1][0]*ls3.x + m[1][1]*ls3.y + m[1][3]);
+      
+      double len = 1.0;
+      double len2 = 1.0;
+      switch(theModelTransformUnitType)
+      {
+         case OSSIM_DEGREES:
+         case OSSIM_MINUTES:
+         case OSSIM_SECONDS:
+         case OSSIM_RADIANS:
+         {
+            ossimUnitConversionTool ut;
+            len  = (mpt1-mpt2).length();
+            len2  = (mpt1-mpt3).length();
+            ut.setValue((len+len2)*.5, theModelTransformUnitType);
+            len = ut.getValue(OSSIM_DEGREES);
+            theDegreesPerPixel = ossimDpt(len, len);
+            theUlGpt = wpt1;
+            computeMetersPerPixel();
+            break;
+         }
+         default:
+         {
+            ossimUnitConversionTool ut;
+            len  = (mpt1-mpt2).length();
+            len2  = (mpt1-mpt3).length();
+            ut.setValue(mpt1.x, theModelTransformUnitType);
+            mpt1.x = ut.getValue(OSSIM_METERS);
+            ut.setValue(mpt1.y, theModelTransformUnitType);
+            mpt1.y = ut.getValue(OSSIM_METERS);
+            ut.setValue((len+len2)*.5, theModelTransformUnitType);
+            len = ut.getValue(OSSIM_METERS);
+            theMetersPerPixel = ossimDpt(len, len);
+            theUlEastingNorthing = mpt1;
+            computeDegreesPerPixel();
+            break;
+         }
+      }
+      theUlGpt = wpt1;
+   }
+
+}
+
+void ossimMapProjection::applyScale(const ossimDpt& scale,
+                                    bool recenterTiePoint)
+{
+   ossimDpt mapTieDpt;
+   ossimGpt mapTieGpt;
+   if (recenterTiePoint)
+   {
+      if (isGeographic())
+      {
+         mapTieGpt = getUlGpt();
+         mapTieGpt.lat += theDegreesPerPixel.lat/2.0;
+         mapTieGpt.lon -= theDegreesPerPixel.lon/2.0;
+      }
+      else
+      {
+         mapTieDpt = getUlEastingNorthing();
+         mapTieDpt.x -= theMetersPerPixel.x/2.0;
+         mapTieDpt.y += theMetersPerPixel.y/2.0;
+      }
+   }
+
+   theDegreesPerPixel.x *= scale.x;
+   theDegreesPerPixel.y *= scale.y;
+   theMetersPerPixel.x  *= scale.x;
+   theMetersPerPixel.y  *= scale.y;
+
+   if ( recenterTiePoint )
+   {
+      if (isGeographic())
+      {
+         mapTieGpt.lat -= theDegreesPerPixel.lat/2.0;
+         mapTieGpt.lon += theDegreesPerPixel.lon/2.0;
+         setUlTiePoints(mapTieGpt);
+      }
+      else
+      {
+         mapTieDpt.x += theMetersPerPixel.x/2.0;
+         mapTieDpt.y -= theMetersPerPixel.y/2.0;
+         setUlTiePoints(mapTieDpt);
+      }
+   }
+
+   if (theModelTransformUnitType != OSSIM_UNIT_UNKNOWN)
+   {
+      theModelTransform.getData()[0][0] = theModelTransform.getData()[0][0]*scale.x;
+      theModelTransform.getData()[1][1] = theModelTransform.getData()[1][1]*scale.y;
+
+      theInverseModelTransform = theModelTransform;
+      theInverseModelTransform.i();
+
+      updateFromTransform();
+   }
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimMapProjection::worldToLineSample
+//
+//*****************************************************************************
+ossimDpt ossimMapProjection::worldToLineSample(const ossimGpt &worldPoint)const
+{
+   ossimDpt result;
+
+   worldToLineSample(worldPoint, result);
+
+   return result;
+}
+
+//*****************************************************************************
+//  METHOD: ossimMapProjection::lineSampleToWorld
+//
+//*****************************************************************************
+ossimGpt ossimMapProjection::lineSampleToWorld(const ossimDpt &lineSample)const
+{
+   ossimGpt result;
+
+   lineSampleToWorld(lineSample, result);
+
+   return result;
+}
+
+//*****************************************************************************
+//  METHOD: ossimMapProjection::worldToLineSample
+//
+//*****************************************************************************
+void ossimMapProjection::worldToLineSample(const ossimGpt &worldPoint,
+                                           ossimDpt&       lineSample)const
+{
+
+   if(theModelTransformUnitType != OSSIM_UNIT_UNKNOWN)
+   {
+      ossimGpt gpt = worldPoint;
+      if(theDatum)
+      {
+         gpt.changeDatum(theDatum);
+      }
+      switch(theModelTransformUnitType)
+      {
+         case OSSIM_METERS:
+         case OSSIM_FEET:
+         case OSSIM_US_SURVEY_FEET:
+         {
+            ossimDpt modelPoint = forward(gpt);
+            ossimUnitConversionTool ut;
+            ut.setValue(modelPoint.x, OSSIM_METERS);
+            modelPoint.x = ut.getValue(theModelTransformUnitType);
+            ut.setValue(modelPoint.y, OSSIM_METERS);
+            modelPoint.y = ut.getValue(theModelTransformUnitType);
+            const NEWMAT::Matrix& m = theInverseModelTransform.getData();
+            
+            lineSample.x = m[0][0]*modelPoint.x + m[0][1]*modelPoint.y + m[0][3];
+            lineSample.y = m[1][0]*modelPoint.x + m[1][1]*modelPoint.y + m[1][3];
+            
+            return;
+         }
+         case OSSIM_DEGREES:
+         case OSSIM_RADIANS:
+         case OSSIM_MINUTES:
+         case OSSIM_SECONDS:
+         {
+            ossimUnitConversionTool ut;
+            ossimDpt modelPoint;
+            modelPoint.lat = gpt.latd();
+            modelPoint.lon = gpt.lond();
+            ut.setValue(modelPoint.lat, OSSIM_DEGREES);
+            modelPoint.lat = ut.getValue(theModelTransformUnitType);
+            ut.setValue(modelPoint.lon, OSSIM_DEGREES);
+            modelPoint.lon = ut.getValue(theModelTransformUnitType);
+            const NEWMAT::Matrix& m = theInverseModelTransform.getData();
+            
+            lineSample.x = m[0][0]*modelPoint.x + m[0][1]*modelPoint.y + m[0][3];
+            lineSample.y = m[1][0]*modelPoint.x + m[1][1]*modelPoint.y + m[1][3];
+            return;
+         }
+         default:
+         {
+            lineSample.makeNan();
+            return;
+         }
+      }
+   }
+   else if(isGeographic())
+   {
+      ossimGpt gpt = worldPoint;
+      
+      if (theOrigin.datum() != gpt.datum())
+      {
+         // Apply datum shift if it's not the same.
+         gpt.changeDatum(theOrigin.datum());
+      }
+      
+      lineSample.line = (theUlGpt.latd() - gpt.latd()) / theDegreesPerPixel.y;
+      lineSample.samp = (gpt.lond() - theUlGpt.lond()) / theDegreesPerPixel.x;
+   }
+   else
+   {
+      // make sure our tie point is good and world point
+      // is good.
+      //
+      if(theUlEastingNorthing.isNan()||
+         worldPoint.isLatNan() || worldPoint.isLonNan())
+      {
+         lineSample.makeNan();
+         return;
+      }
+      // initialize line sample
+      //   lineSample = ossimDpt(0,0);
+      
+      // I am commenting this code out because I am going to
+      // move it to the ossimImageViewProjectionTransform.
+      //
+      // see if we have a datum set and if so
+      // shift the world to our datum.  If not then
+      // find the easting northing value for the world
+      // point.
+      if(theDatum)
+      {
+         ossimGpt gpt = worldPoint;
+         
+         gpt.changeDatum(theDatum);
+         
+         // lineSample is currently in easting northing
+         // and will need to be converted to line sample.
+         lineSample = forward(gpt);
+      }
+      else
+      {
+         // lineSample is currently in easting northing
+         // and will need to be converted to line sample.
+         lineSample = forward(worldPoint);
+      }
+      
+      // check the final result to make sure there were no
+      // problems.
+      //
+      if(!lineSample.isNan())
+      {
+//       if(!isIdentityMatrix())
+//       {
+//          ossimDpt temp = lineSample;
+         
+//          lineSample.x = theInverseTrans[0][0]*temp.x+
+//                         theInverseTrans[0][1]*temp.y+
+//                         theInverseTrans[0][2];
+         
+//          lineSample.y = theInverseTrans[1][0]*temp.x+
+//                         theInverseTrans[1][1]*temp.y+
+//                         theInverseTrans[1][2];
+//       }
+//       else
+         {
+            lineSample.x = ((lineSample.x  - theUlEastingNorthing.x)/theMetersPerPixel.x);
+            
+            // We must remember that the Northing is negative since the positive
+            // axis for an image is assumed to go down since it's image space.
+            lineSample.y = (-(lineSample.y - theUlEastingNorthing.y)/theMetersPerPixel.y);
+         }
+      }
+   }
+}
+
+//*****************************************************************************
+//  METHOD: ossimMapProjection::lineSampleHeightToWorld
+//
+//*****************************************************************************
+void ossimMapProjection::lineSampleHeightToWorld(const ossimDpt &lineSample,
+                                                 const double&  hgtEllipsoid,
+                                                 ossimGpt&      gpt)const
+{
+   // make sure that the passed in lineSample is good and
+   // check to make sure our easting northing is good so
+   // we can compute the line sample.
+   if(lineSample.hasNans())
+   {
+      gpt.makeNan();
+      return;
+   }
+   if(theModelTransformUnitType != OSSIM_UNIT_UNKNOWN)
+   {
+      const NEWMAT::Matrix& m = theModelTransform.getData();
+      // map transforms can only be 2-D for now so we will look at
+      // the first 2 rows only
+      ossimDpt modelPoint(m[0][0]*lineSample.x + m[0][1]*lineSample.y + m[0][3],
+                          m[1][0]*lineSample.x + m[1][1]*lineSample.y + m[1][3]);
+      switch(theModelTransformUnitType)
+      {
+         case OSSIM_DEGREES:
+         {
+            gpt.latd(modelPoint.lat);
+            gpt.lond(modelPoint.lon);
+            gpt.datum(theDatum);
+            return;
+         }
+         case OSSIM_MINUTES:
+         case OSSIM_SECONDS:
+         case OSSIM_RADIANS:
+         {
+            ossimUnitConversionTool ut;
+            ut.setValue(modelPoint.x, theModelTransformUnitType);
+            modelPoint.x = ut.getValue(OSSIM_DEGREES);
+            ut.setValue(modelPoint.y, theModelTransformUnitType);
+            modelPoint.y = ut.getValue(OSSIM_DEGREES);
+            gpt.latd(modelPoint.lat);
+            gpt.lond(modelPoint.lon);
+            gpt.datum(theDatum);
+            return;
+         }
+         default:
+         {
+            ossimUnitConversionTool ut;
+            ut.setValue(modelPoint.x, theModelTransformUnitType);
+            modelPoint.x = ut.getValue(OSSIM_METERS);
+            ut.setValue(modelPoint.y, theModelTransformUnitType);
+            modelPoint.y = ut.getValue(OSSIM_METERS);
+            gpt = inverse(modelPoint);
+            break;
+         }
+      }
+      gpt.datum(theDatum);
+   }
+   else if(isGeographic())
+   {
+      double lat = theUlGpt.latd() - (lineSample.line * theDegreesPerPixel.y);
+      double lon = theUlGpt.lond() + (lineSample.samp * theDegreesPerPixel.x);
+      
+      gpt.latd(lat);
+      gpt.lond(lon);
+      gpt.hgt = hgtEllipsoid;
+   }
+   else
+   {
+      if(theUlEastingNorthing.hasNans())
+      {
+         gpt.makeNan();
+         return;
+      }
+      ossimDpt eastingNorthing;
+      
+      eastingNorthing = (theUlEastingNorthing);
+      
+      eastingNorthing.x += (lineSample.x*theMetersPerPixel.x);
+      
+      //
+      // Note:  the Northing is positive up.  In image space
+      // the positive axis is down so we must multiply by
+      // -1
+      //
+      eastingNorthing.y += (-lineSample.y*theMetersPerPixel.y);
+      
+      
+      //
+      // now invert the meters into a ground point.
+      //
+      gpt = inverse(eastingNorthing);
+      gpt.datum(theDatum);
+      
+      if(gpt.isLatNan() && gpt.isLonNan())
+      {
+         gpt.makeNan();
+      }
+      else
+      {
+         gpt.clampLat(-90, 90);
+         gpt.clampLon(-180, 180);
+         
+         // Finally assign the specified height:
+         gpt.hgt = hgtEllipsoid;
+      }
+   }
+   if(theElevationLookupFlag)
+   {
+      gpt.hgt = ossimElevManager::instance()->getHeightAboveEllipsoid(gpt);
+   }
+}
+
+//*****************************************************************************
+//  METHOD: ossimMapProjection::lineSampleToWorld
+//
+//  Implements the base class pure virtual. Simply calls lineSampleToWorld()
+//  and assigns argument height to the resultant groundpoint.
+//
+//*****************************************************************************
+void ossimMapProjection::lineSampleToWorld (const ossimDpt& lineSampPt,
+                                            ossimGpt&       worldPt) const
+{
+   double elev = ossim::nan();
+
+//    if(theElevationLookupFlag)
+//    {
+//       elev =  ossimElevManager::instance()->getHeightAboveEllipsoid(worldPt);
+//    }
+
+   lineSampleHeightToWorld(lineSampPt, elev, worldPt);
+
+}
+
+//*****************************************************************************
+//  METHOD: ossimMapProjection::lineSampleToEastingNorthing
+//
+//*****************************************************************************
+void ossimMapProjection::lineSampleToEastingNorthing(const ossimDpt& lineSample,
+                                                     ossimDpt&       eastingNorthing)const
+{
+   // make sure that the passed in lineSample is good and
+   // check to make sure our easting northing is good so
+   // we can compute the line sample.
+   //
+   if(lineSample.hasNans()||theUlEastingNorthing.hasNans())
+   {
+      eastingNorthing.makeNan();
+      return;
+   }
+   ossimDpt deltaPoint = lineSample;
+
+   eastingNorthing.x = theUlEastingNorthing.x + deltaPoint.x*theMetersPerPixel.x;
+   eastingNorthing.y = theUlEastingNorthing.y + (-deltaPoint.y)*theMetersPerPixel.y ;
+
+   //   eastingNorthing.x += (lineSample.x*theMetersPerPixel.x);
+
+   // Note:  the Northing is positive up.  In image space
+   // the positive axis is down so we must multiply by
+   // -1
+   //   eastingNorthing.y += (-lineSample.y*theMetersPerPixel.y);
+}
+
+
+void ossimMapProjection::setMetersPerPixel(const ossimDpt& resolution)
+{
+   theMetersPerPixel = resolution;
+   computeDegreesPerPixel();
+}
+
+void ossimMapProjection::setDecimalDegreesPerPixel(const ossimDpt& resolution)
+{
+   theDegreesPerPixel = resolution;
+   computeMetersPerPixel();
+}
+
+void ossimMapProjection::eastingNorthingToWorld(const ossimDpt& eastingNorthing,
+                                                ossimGpt&       worldPt)const
+{
+   ossimDpt lineSample;
+   eastingNorthingToLineSample(eastingNorthing, lineSample);
+   lineSampleToWorld(lineSample, worldPt);
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimMapProjection::eastingNorthingToLineSample
+//
+//*****************************************************************************
+void ossimMapProjection::eastingNorthingToLineSample(const ossimDpt& eastingNorthing,
+                                                     ossimDpt&       lineSample)const
+{
+   if(eastingNorthing.hasNans())
+   {
+      lineSample.makeNan();
+      return;
+   }
+   // check the final result to make sure there were no
+   // problems.
+   //
+   if(!eastingNorthing.isNan())
+   {
+     lineSample.x = (eastingNorthing.x - theUlEastingNorthing.x)/theMetersPerPixel.x;
+
+     // We must remember that the Northing is negative since the positive
+     // axis for an image is assumed to go down since it's image space.
+     lineSample.y = (-(eastingNorthing.y-theUlEastingNorthing.y))/theMetersPerPixel.y;
+   }
+}
+
+void ossimMapProjection::setUlTiePoints(const ossimGpt& gpt)
+{
+   setUlGpt(gpt);
+   setUlEastingNorthing(forward(gpt));
+}
+
+void ossimMapProjection::setUlTiePoints(const ossimDpt& eastingNorthing)
+{
+   setUlEastingNorthing(eastingNorthing);
+   setUlGpt(inverse(eastingNorthing));
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimMapProjection::setUlEastingNorthing
+//
+//*****************************************************************************
+void ossimMapProjection::setUlEastingNorthing(const ossimDpt& ulEastingNorthing)
+{
+   theUlEastingNorthing = ulEastingNorthing;
+}
+
+//*****************************************************************************
+//  METHOD: ossimMapProjection::setUlGpt
+//
+//*****************************************************************************
+void ossimMapProjection::setUlGpt(const ossimGpt& ulGpt)
+{
+   theUlGpt = ulGpt;
+
+   // The ossimGpt data members need to use the same datum as this projection:
+   if (*theDatum != *(ulGpt.datum()))
+      theUlGpt.changeDatum(theDatum);
+}
+
+//*****************************************************************************
+//  METHOD: ossimMapProjection::saveState
+//
+//*****************************************************************************
+bool ossimMapProjection::saveState(ossimKeywordlist& kwl, const char* prefix) const
+{
+   ossimProjection::saveState(kwl, prefix);
+
+   kwl.add(prefix,
+           ossimKeywordNames::ORIGIN_LATITUDE_KW,
+           theOrigin.latd(),
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::CENTRAL_MERIDIAN_KW,
+           theOrigin.lond(),
+           true);
+
+   theEllipsoid.saveState(kwl, prefix);
+
+   if(theDatum)
+   {
+      kwl.add(prefix,
+              ossimKeywordNames::DATUM_KW,
+              theDatum->code(),
+              true);
+   }
+
+   // Calling access method to give it an opportunity to update the code in case of param change:
+   ossim_uint32 code = getPcsCode();
+   if (code)
+   {
+      ossimString epsg_spec = ossimString("EPSG:") + ossimString::toString(code);
+      kwl.add(prefix, ossimKeywordNames::SRS_NAME_KW, epsg_spec, true);
+   }
+   
+   if(isGeographic())
+   {
+      kwl.add(prefix,
+              ossimKeywordNames::TIE_POINT_XY_KW,
+              ossimDpt(theUlGpt).toString().c_str(),
+              true);
+      kwl.add(prefix,
+              ossimKeywordNames::TIE_POINT_UNITS_KW,
+              ossimUnitTypeLut::instance()->getEntryString(OSSIM_DEGREES),
+              true);
+      kwl.add(prefix,
+              ossimKeywordNames::PIXEL_SCALE_XY_KW,
+              theDegreesPerPixel.toString().c_str(),
+              true);
+      kwl.add(prefix,
+              ossimKeywordNames::PIXEL_SCALE_UNITS_KW,
+              ossimUnitTypeLut::instance()->getEntryString(OSSIM_DEGREES),
+              true);
+   }
+   else
+   {
+      kwl.add(prefix,
+              ossimKeywordNames::TIE_POINT_XY_KW,
+              theUlEastingNorthing.toString().c_str(),
+              true);
+      kwl.add(prefix,
+              ossimKeywordNames::TIE_POINT_UNITS_KW,
+              ossimUnitTypeLut::instance()->getEntryString(OSSIM_METERS),
+              true);
+      kwl.add(prefix,
+              ossimKeywordNames::PIXEL_SCALE_XY_KW,
+              theMetersPerPixel.toString().c_str(),
+              true);
+      kwl.add(prefix,
+              ossimKeywordNames::PIXEL_SCALE_UNITS_KW,
+              ossimUnitTypeLut::instance()->getEntryString(OSSIM_METERS),
+              true);  
+      kwl.add(prefix,
+              ossimKeywordNames::ORIGINAL_MAP_UNITS_KW,
+              ossimUnitTypeLut::instance()->getEntryString(theProjectionUnits),
+              true);
+   }
+
+   kwl.add(prefix, ossimKeywordNames::PCS_CODE_KW, code, true);
+   kwl.add(prefix, ossimKeywordNames::FALSE_EASTING_NORTHING_KW,
+           theFalseEastingNorthing.toString().c_str(), true);
+   kwl.add(prefix, ossimKeywordNames::FALSE_EASTING_NORTHING_UNITS_KW,
+           ossimUnitTypeLut::instance()->getEntryString(OSSIM_METERS), true);
+   kwl.add(prefix, ossimKeywordNames::ELEVATION_LOOKUP_FLAG_KW,
+           ossimString::toString(theElevationLookupFlag), true);
+
+   if(theModelTransformUnitType != OSSIM_UNIT_UNKNOWN)
+   {
+      const NEWMAT::Matrix& m = theModelTransform.getData();
+      ostringstream out;
+      ossim_uint32 row, col;
+      for(row = 0; row < 4; ++row)
+      {
+         for(col = 0; col < 4; ++col)
+         {
+            out << std::setprecision(20) << m[row][col] << " ";
+         }
+      }
+      kwl.add(prefix,
+              ossimKeywordNames::IMAGE_MODEL_TRANSFORM_MATRIX_KW,
+              out.str().c_str(),
+              true);
+      kwl.add(prefix,
+              ossimKeywordNames::IMAGE_MODEL_TRANSFORM_UNIT_KW,
+              ossimUnitTypeLut::instance()->getEntryString(theModelTransformUnitType),
+              true);
+   }
+
+   return true;
+}
+
+//*****************************************************************************
+//  METHOD: ossimMapProjection::loadState
+//
+//*****************************************************************************
+bool ossimMapProjection::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   ossimProjection::loadState(kwl, prefix);
+
+   const char* elevLookupFlag = kwl.find(prefix, ossimKeywordNames::ELEVATION_LOOKUP_FLAG_KW);
+   if(elevLookupFlag)
+   {
+      theElevationLookupFlag = ossimString(elevLookupFlag).toBool();
+   }
+   // Get the ellipsoid.
+   theEllipsoid.loadState(kwl, prefix);
+
+   const char *lookup;
+
+   // Get the Projection Coordinate System (assumed from EPSG database). 
+   // NOTE: the code is read here for saving in this object only. 
+   // The code is not verified until a call to getPcs() is called. If ONLY this code
+   // had been provided, then the EPSG projection factory would populate a new instance of the 
+   // corresponding map projection and have it saveState for constructing again later in the 
+   // conventional fashion here
+   thePcsCode = 0; 
+   lookup = kwl.find(prefix, ossimKeywordNames::PCS_CODE_KW);
+   if(lookup)
+      thePcsCode = ossimString(lookup).toUInt32(); // EPSG PROJECTION CODE
+
+   // The datum can be specified in 2 ways: either via OSSIM/geotrans alpha-codes or EPSG code.
+   // Last resort use WGS 84 (consider throwing an exception to catch any bad datums): 
+   theDatum = ossimDatumFactoryRegistry::instance()->create(kwl, prefix);
+   if (theDatum == NULL)
+   {
+      theDatum = ossimDatumFactory::instance()->wgs84();
+   }
+
+   // Set all ossimGpt-type members to use this datum:
+   theOrigin.datum(theDatum);
+   theUlGpt.datum(theDatum);
+
+   // Fetch the ellipsoid from the datum:
+   const ossimEllipsoid* ellipse = theDatum->ellipsoid();
+   if(ellipse)
+      theEllipsoid = *ellipse;
+   
+   // Get the latitude of the origin.
+   lookup = kwl.find(prefix, ossimKeywordNames::ORIGIN_LATITUDE_KW);
+   if (lookup)
+   {
+      theOrigin.latd(ossimString(lookup).toFloat64());
+   }
+   // else ???
+
+   // Get the central meridian.
+   lookup = kwl.find(prefix, ossimKeywordNames::CENTRAL_MERIDIAN_KW);
+   if (lookup)
+   {
+      theOrigin.lond(ossimString(lookup).toFloat64());
+   }
+   // else ???
+
+
+   // Get the pixel scale.
+   theMetersPerPixel.makeNan();
+   theDegreesPerPixel.makeNan();
+   lookup = kwl.find(prefix, ossimKeywordNames::PIXEL_SCALE_UNITS_KW);
+   if (lookup)
+   {
+      ossimUnitType units =
+         static_cast<ossimUnitType>(ossimUnitTypeLut::instance()->
+                                    getEntryNumber(lookup));
+      
+      lookup = kwl.find(prefix, ossimKeywordNames::PIXEL_SCALE_XY_KW);
+      if (lookup)
+      {
+         ossimDpt scale;
+         scale.toPoint(std::string(lookup));
+
+         switch (units)
+         {
+            case OSSIM_METERS:
+            {
+               theMetersPerPixel = scale;
+               break;
+            }
+            case OSSIM_DEGREES:
+            {
+               theDegreesPerPixel.x = scale.x;
+               theDegreesPerPixel.y = scale.y;
+               break;
+            }
+            case OSSIM_FEET:
+            case OSSIM_US_SURVEY_FEET:
+            {
+               ossimUnitConversionTool ut;
+               ut.setValue(scale.x, units);
+               theMetersPerPixel.x = ut.getValue(OSSIM_METERS);
+               ut.setValue(scale.y, units);
+               theMetersPerPixel.y = ut.getValue(OSSIM_METERS);
+               break;
+            }
+            default:
+            {
+               if(traceDebug())
+               {
+                  // Unhandled unit type!
+                  ossimNotify(ossimNotifyLevel_WARN)
+                  << "ossimMapProjection::loadState WARNING!"
+                  << "Unhandled unit type for "
+                  << ossimKeywordNames::PIXEL_SCALE_UNITS_KW << ":  "
+                  << ( ossimUnitTypeLut::instance()->
+                      getEntryString(units).c_str() )
+                  << endl;
+               }
+               break;
+            }
+         } // End of switch (units)
+         
+      }  // End of if (PIXEL_SCALE_XY)
+
+   } // End of if (PIXEL_SCALE_UNITS)
+   else
+   {
+      // BACKWARDS COMPATIBILITY LOOKUPS...
+      lookup =  kwl.find(prefix, ossimKeywordNames::METERS_PER_PIXEL_X_KW);
+      if(lookup)
+      {
+         theMetersPerPixel.x = fabs(ossimString(lookup).toFloat64());
+      }
+      
+      lookup =  kwl.find(prefix, ossimKeywordNames::METERS_PER_PIXEL_Y_KW);
+      if(lookup)
+      {
+         theMetersPerPixel.y = fabs(ossimString(lookup).toFloat64());
+      }
+      
+      lookup = kwl.find(prefix,
+                        ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT);
+      if(lookup)
+      {
+         theDegreesPerPixel.y = fabs(ossimString(lookup).toFloat64());
+      }
+      
+      lookup = kwl.find(prefix,
+                        ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON);
+      if(lookup)
+      {
+         theDegreesPerPixel.x = fabs(ossimString(lookup).toFloat64());
+      }
+   }            
+
+   // Get the tie point.
+   theUlGpt.makeNan();
+
+    // Since this won't be picked up from keywords set to 0 to keep nan out.
+   theUlGpt.hgt = 0.0;
+   
+   theUlEastingNorthing.makeNan();
+   lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_UNITS_KW);
+   if (lookup)
+   {
+      ossimUnitType units = static_cast<ossimUnitType>(ossimUnitTypeLut::instance()->
+                                                       getEntryNumber(lookup));
+      
+      lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_XY_KW);
+      if (lookup)
+      {
+         ossimDpt tie;
+         tie.toPoint(std::string(lookup));
+
+         switch (units)
+         {
+            case OSSIM_METERS:
+            {
+               theUlEastingNorthing = tie;
+               break;
+            }
+            case OSSIM_DEGREES:
+            {
+               theUlGpt.lond(tie.x);
+               theUlGpt.latd(tie.y);
+               break;
+            }
+            case OSSIM_FEET:
+            case OSSIM_US_SURVEY_FEET:
+            {
+               ossimUnitConversionTool ut;
+               ut.setValue(tie.x, units);
+               theUlEastingNorthing.x = ut.getValue(OSSIM_METERS);
+               ut.setValue(tie.y, units);
+               theUlEastingNorthing.y = ut.getValue(OSSIM_METERS);
+               break;
+            }
+            default:
+            {
+               if(traceDebug())
+               {
+                  // Unhandled unit type!
+                  ossimNotify(ossimNotifyLevel_WARN)
+                  << "ossimMapProjection::loadState WARNING!"
+                  << "Unhandled unit type for "
+                  << ossimKeywordNames::TIE_POINT_UNITS_KW << ": " 
+                  << ( ossimUnitTypeLut::instance()->
+                      getEntryString(units).c_str() )
+                  << endl;
+               }
+               break;
+            }
+         } // End of switch (units)
+         
+      }  // End of if (TIE_POINT_XY)
+
+   } // End of if (TIE_POINT_UNITS)
+   else
+   {
+      // BACKWARDS COMPATIBILITY LOOKUPS...
+      lookup =  kwl.find(prefix, ossimKeywordNames::TIE_POINT_EASTING_KW);
+      if(lookup)
+      {
+         theUlEastingNorthing.x = (ossimString(lookup).toFloat64());
+      }
+
+      lookup =  kwl.find(prefix, ossimKeywordNames::TIE_POINT_NORTHING_KW);
+      if(lookup)
+      {
+         theUlEastingNorthing.y = (ossimString(lookup).toFloat64());
+      }
+
+      lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_LAT_KW);
+      if (lookup)
+      {
+         theUlGpt.latd(ossimString(lookup).toFloat64());
+      }
+
+      lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_LON_KW);
+      if (lookup)
+      {
+         theUlGpt.lond(ossimString(lookup).toFloat64());
+      }
+   }
+   
+   // Get the false easting northing.
+   theFalseEastingNorthing.x = 0.0;
+   theFalseEastingNorthing.y = 0.0;
+   ossimUnitType en_units = OSSIM_METERS;
+   lookup = kwl.find(prefix, ossimKeywordNames::FALSE_EASTING_NORTHING_UNITS_KW);
+   if (lookup)
+   {
+      en_units = static_cast<ossimUnitType>(ossimUnitTypeLut::instance()->getEntryNumber(lookup));
+   }
+
+   lookup = kwl.find(prefix, ossimKeywordNames::FALSE_EASTING_NORTHING_KW);
+   if (lookup)
+   {
+      ossimDpt eastingNorthing;
+      eastingNorthing.toPoint(std::string(lookup));
+
+      switch (en_units)
+      {
+         case OSSIM_METERS:
+         {
+            theFalseEastingNorthing = eastingNorthing;
+            break;
+         }
+         case OSSIM_FEET:
+         case OSSIM_US_SURVEY_FEET:
+         {
+            ossimUnitConversionTool ut;
+            ut.setValue(eastingNorthing.x, en_units);
+            theFalseEastingNorthing.x = ut.getValue(OSSIM_METERS);
+            ut.setValue(eastingNorthing.y, en_units);
+            theFalseEastingNorthing.y = ut.getValue(OSSIM_METERS);
+            break;
+         }
+         default:
+         {
+            if(traceDebug())
+            {
+               // Unhandled unit type!
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << "ossimMapProjection::loadState WARNING! Unhandled unit type for "
+                  << ossimKeywordNames::FALSE_EASTING_NORTHING_UNITS_KW << ":  " 
+                  << (ossimUnitTypeLut::instance()->getEntryString(en_units).c_str())
+                  << endl;
+            }
+            break;
+         }
+      } // End of switch (units)
+   }  // End of if (FALSE_EASTING_NORTHING_KW)
+   else
+   {
+      // BACKWARDS COMPATIBILITY LOOKUPS...
+      lookup =  kwl.find(prefix, ossimKeywordNames::FALSE_EASTING_KW);
+      if(lookup)
+      {
+         theFalseEastingNorthing.x = (ossimString(lookup).toFloat64());
+      }
+      
+      lookup =  kwl.find(prefix, ossimKeywordNames::FALSE_NORTHING_KW);
+      if(lookup)
+      {
+         theFalseEastingNorthing.y = (ossimString(lookup).toFloat64());
+      }
+   }            
+
+//    if((theDegreesPerPixel.x!=OSSIM_DBL_NAN)&&
+//       (theDegreesPerPixel.y!=OSSIM_DBL_NAN)&&
+//       theMetersPerPixel.hasNans())
+//    {
+//       theMetersPerPixel    = theOrigin.metersPerDegree();
+//       theMetersPerPixel.x *= theDegreesPerPixel.x;
+//       theMetersPerPixel.y *= theDegreesPerPixel.y;
+//    }
+
+   lookup = kwl.find(prefix, ossimKeywordNames::PIXEL_TYPE_KW);
+   if (lookup)
+   {
+      ossimString pixelType = lookup;
+      pixelType=pixelType.trim();
+      if(pixelType!="")
+      {
+         pixelType.downcase();
+         if(pixelType.contains("area"))
+         {
+            if( theMetersPerPixel.hasNans() == false)
+            {
+               if(!theUlEastingNorthing.hasNans())
+               {
+                  theUlEastingNorthing.x += (theMetersPerPixel.x*0.5);
+                  theUlEastingNorthing.y -= (theMetersPerPixel.y*0.5);
+               }
+            }
+            if(theDegreesPerPixel.hasNans() == false)
+            {
+               theUlGpt.latd( theUlGpt.latd() - (theDegreesPerPixel.y*0.5) );
+               theUlGpt.lond( theUlGpt.lond() + (theDegreesPerPixel.x*0.5) );
+            }
+         }
+      }
+   }
+   
+   // We preserve the units of the originally created projection (typically from EPSG proj factory)
+   // in case user needs map coordinates in those units (versus default meters)
+   lookup = kwl.find(prefix, ossimKeywordNames::ORIGINAL_MAP_UNITS_KW);
+   if (lookup)
+   {
+      theProjectionUnits = static_cast<ossimUnitType>(ossimUnitTypeLut::instance()->
+                                                      getEntryNumber(lookup));
+   }
+
+   theModelTransformUnitType = OSSIM_UNIT_UNKNOWN;
+   const char* modelTransform = kwl.find(prefix, ossimKeywordNames::IMAGE_MODEL_TRANSFORM_MATRIX_KW);
+   const char* modelTransformUnit = kwl.find(prefix, ossimKeywordNames::IMAGE_MODEL_TRANSFORM_UNIT_KW);
+   if(modelTransform&&modelTransformUnit) // row ordered 4x4 matrix.  Should be 16 values
+   {
+      
+      NEWMAT::Matrix& m = theModelTransform.getData();
+      istringstream in(modelTransform);
+      ossim_uint32 row, col;
+      ossimString value;
+      for(row = 0; row < 4; ++row)
+      {
+         for(col = 0; col < 4; ++col)
+         {
+            in >> value;
+            m[row][col] = value.toDouble();
+         }
+      }
+      // make sure these have the identity and all unused are 0.0
+      m[2][2] = 1.0;
+      m[2][0] = 0.0;
+      m[2][1] = 0.0;
+      m[2][3] = 0.0;
+      m[3][3] = 1.0;
+      m[3][2] = 0.0;
+      m[3][1] = 0.0;
+      m[3][0] = 0.0;
+      
+      if(!in.fail())
+      {
+         try
+         {
+            theInverseModelTransform = theModelTransform;
+            theInverseModelTransform.i();
+            theModelTransformUnitType = static_cast<ossimUnitType>(ossimUnitTypeLut::instance()->
+                                                                   getEntryNumber(modelTransformUnit));
+         }
+         catch(...)
+         {
+            theModelTransformUnitType = OSSIM_UNIT_UNKNOWN;   
+         }
+      }
+   }
+
+   //---
+   // Set the datum of the origin and tie point.
+   // Use method that does NOT perform a shift.
+   //---
+   if(theDatum)
+   {
+      theOrigin.datum(theDatum);
+      theUlGpt.datum(theDatum);
+   }
+
+   if(theMetersPerPixel.hasNans() &&
+      theDegreesPerPixel.hasNans())
+   {
+      ossimDpt mpd = ossimGpt().metersPerDegree();
+      if(isGeographic())
+      {
+         theDegreesPerPixel.lat = 1.0/mpd.y;
+         theDegreesPerPixel.lon = 1.0/mpd.y;
+      }
+      else
+      {
+         theMetersPerPixel.x = 1.0;
+         theMetersPerPixel.y = 1.0;
+      }
+   }
+
+   //---
+   // Final sanity check:
+   //---
+   if ( theOrigin.hasNans() )
+   {
+      if ( theModelTransformUnitType == OSSIM_DEGREES )
+      {
+         const NEWMAT::Matrix& m = theModelTransform.getData();
+         theOrigin.lon = m[0][3];
+         theOrigin.lat = m[1][3];
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << __FILE__ << ": " << __LINE__
+            << "\nossimMapProjection::loadState ERROR: Origin is not set!"
+            << std::endl;
+      }
+   }
+
+   return true;
+}
+
+//*****************************************************************************
+//  METHOD: ossimMapProjection::print
+//*****************************************************************************
+std::ostream& ossimMapProjection::print(std::ostream& out) const
+{
+   const char MODULE[] = "ossimMapProjection::print";
+
+   out << setiosflags(ios::fixed) << setprecision(15)
+       << "\n// " << MODULE
+       << "\n" << ossimKeywordNames::TYPE_KW               << ":  "
+       << getClassName()
+       << "\n" << ossimKeywordNames::MAJOR_AXIS_KW         << ":  "
+       << theEllipsoid.getA()
+       << "\n" << ossimKeywordNames::MINOR_AXIS_KW         << ":  "
+       << theEllipsoid.getB()
+       << "\n" << ossimKeywordNames::ORIGIN_LATITUDE_KW    << ":  "
+       << theOrigin.latd()
+       << "\n" << ossimKeywordNames::CENTRAL_MERIDIAN_KW   << ":  "
+       << theOrigin.lond()
+       << "\norigin: " << theOrigin
+       << "\n" << ossimKeywordNames::DATUM_KW              << ":  "
+       << (theDatum?theDatum->code().c_str():"unknown")
+       << "\n" << ossimKeywordNames::METERS_PER_PIXEL_X_KW << ":  "
+       << ((ossim::isnan(theMetersPerPixel.x))?ossimString("nan"):ossimString::toString(theMetersPerPixel.x, 15))
+       << "\n" << ossimKeywordNames::METERS_PER_PIXEL_Y_KW << ":  "
+       << ((ossim::isnan(theMetersPerPixel.y))?ossimString("nan"):ossimString::toString(theMetersPerPixel.y, 15))
+       << "\n" << ossimKeywordNames::FALSE_EASTING_NORTHING_KW << ": "
+       << theFalseEastingNorthing.toString().c_str()
+       << "\n" << ossimKeywordNames::FALSE_EASTING_NORTHING_UNITS_KW << ": "
+       << ossimUnitTypeLut::instance()->getEntryString(OSSIM_METERS)
+       << "\n" << ossimKeywordNames::PCS_CODE_KW << ": " << thePcsCode;
+
+   if(isGeographic())
+   {
+      out << "\n" << ossimKeywordNames::TIE_POINT_XY_KW << ": " 
+          << ossimDpt(theUlGpt).toString().c_str()
+          << "\n" << ossimKeywordNames::TIE_POINT_UNITS_KW << ": " 
+          << ossimUnitTypeLut::instance()->getEntryString(OSSIM_DEGREES)
+          << "\n" << ossimKeywordNames::PIXEL_SCALE_XY_KW << ": "
+          << theDegreesPerPixel.toString().c_str()
+          << "\n" << ossimKeywordNames::PIXEL_SCALE_UNITS_KW << ": "
+          << ossimUnitTypeLut::instance()->getEntryString(OSSIM_DEGREES)
+          << std::endl;
+   }
+   else
+   {
+      out << "\n" << ossimKeywordNames::TIE_POINT_XY_KW << ": " 
+          << theUlEastingNorthing.toString().c_str()
+          << "\n" << ossimKeywordNames::TIE_POINT_UNITS_KW << ": " 
+          << ossimUnitTypeLut::instance()->getEntryString(OSSIM_METERS)
+          << "\n" << ossimKeywordNames::PIXEL_SCALE_XY_KW << ": "
+          << theMetersPerPixel.toString().c_str()
+          << "\n" << ossimKeywordNames::PIXEL_SCALE_UNITS_KW << ": "
+          << ossimUnitTypeLut::instance()->getEntryString(OSSIM_METERS)
+          << std::endl;
+   }
+   
+   return ossimProjection::print(out);
+}
+
+//*****************************************************************************
+//  METHOD: ossimMapProjection::computeDegreesPerPixel
+//
+//*****************************************************************************
+void ossimMapProjection::computeDegreesPerPixel()
+{
+   ossimDpt eastNorthGround = forward(theOrigin);
+   ossimDpt rightEastNorth  =  eastNorthGround;
+   ossimDpt downEastNorth   =  eastNorthGround;
+   rightEastNorth.x += theMetersPerPixel.x;
+   downEastNorth.y  -= theMetersPerPixel.y;
+
+   ossimGpt rightGpt = inverse(rightEastNorth);
+   ossimGpt downGpt  = inverse(downEastNorth);
+
+   // use euclidean distance to get length along the horizontal (lon)
+   // and vertical (lat) directions
+   //
+   double tempDeltaLat = rightGpt.latd() - theOrigin.latd();
+   double tempDeltaLon = rightGpt.lond() - theOrigin.lond();
+   theDegreesPerPixel.lon = sqrt(tempDeltaLat*tempDeltaLat + tempDeltaLon*tempDeltaLon);
+
+   tempDeltaLat = downGpt.latd() - theOrigin.latd();
+   tempDeltaLon = downGpt.lond() - theOrigin.lond();
+   theDegreesPerPixel.lat = sqrt(tempDeltaLat*tempDeltaLat + tempDeltaLon*tempDeltaLon);
+}
+
+//*****************************************************************************
+//  METHOD: ossimMapProjection::computeMetersPerPixel
+//
+//*****************************************************************************
+void ossimMapProjection::computeMetersPerPixel()
+{
+//#define USE_OSSIMGPT_METERS_PER_DEGREE
+#ifdef USE_OSSIMGPT_METERS_PER_DEGREE
+   ossimDpt metersPerDegree (theOrigin.metersPerDegree());
+   theMetersPerPixel.x = metersPerDegree.x * theDegreesPerPixel.lon;
+   theMetersPerPixel.y = metersPerDegree.y * theDegreesPerPixel.lat;
+#else
+   ossimGpt right=theOrigin;
+   ossimGpt down=theOrigin;
+
+   down.latd(theOrigin.latd()  + theDegreesPerPixel.lat);
+   right.lond(theOrigin.lond() + theDegreesPerPixel.lon);
+
+   ossimDpt centerMeters = forward(theOrigin);
+   ossimDpt rightMeters = forward(right);
+   ossimDpt downMeters  = forward(down);
+
+   theMetersPerPixel.x = (rightMeters - centerMeters).length();
+   theMetersPerPixel.y = (downMeters  - centerMeters).length();
+#endif
+}
+
+//**************************************************************************************************
+//  METHOD: ossimMapProjection::operator==
+//! Compares this to arg projection and returns TRUE if the same. 
+//! NOTE: As currently implemented in OSSIM, map projections also contain image geometry 
+//! information like tiepoint and scale. This operator is only concerned with the map 
+//! specification and ignores image geometry differences.
+//**************************************************************************************************
+bool ossimMapProjection::operator==(const ossimProjection& projection) const
+{
+   // Verify that derived types match:
+   if (getClassName() != projection.getClassName())
+      return false;
+
+   // If both PCS codes are non-zero, that's all we need to check:
+   const ossimMapProjection* mapProj = PTR_CAST(ossimMapProjection, &projection);
+   if (thePcsCode && mapProj->thePcsCode && (thePcsCode != 32767) && 
+       (thePcsCode == mapProj->thePcsCode) )
+   {
+      return true;
+   }
+
+   if ( *theDatum != *(mapProj->theDatum) )
+      return false;
+   
+   if (theOrigin != mapProj->theOrigin)
+      return false;
+
+   if (theFalseEastingNorthing != mapProj->theFalseEastingNorthing)
+      return false;
+
+#if 0
+   THIS SECTION IGNORED SINCE IT DEALS WITH IMAGE GEOMETRY, NOT MAP PROJECTION
+   if (isGeographic())
+   {
+      if ((theDegreesPerPixel != mapProj->theDegreesPerPixel) ||
+          (theUlGpt != mapProj->theUlGpt))
+         return false;
+   }
+   else
+   {
+      if ((theMetersPerPixel != mapProj->theMetersPerPixel) ||
+         (theUlEastingNorthing != mapProj->theUlEastingNorthing))
+         return false;
+   }
+#endif
+
+   // Units must match:
+   if ((theProjectionUnits != OSSIM_UNIT_UNKNOWN) && 
+       (mapProj->theProjectionUnits != OSSIM_UNIT_UNKNOWN) &&
+       (theProjectionUnits != mapProj->theProjectionUnits))
+       return false;
+
+   // Check transform if present and compare it also:
+   if (hasModelTransform() && mapProj->hasModelTransform() &&
+      (theModelTransform.getData() != mapProj->theModelTransform.getData()))
+      return false;
+
+   return true;
+}
+
+bool ossimMapProjection::isEqualTo(const ossimObject& obj, ossimCompareType compareType)const
+{
+   const ossimMapProjection* mapProj = dynamic_cast<const ossimMapProjection*>(&obj);
+   bool result = mapProj&&ossimProjection::isEqualTo(obj, compareType);
+   
+   if(result)
+   {
+      result = (theEllipsoid.isEqualTo(mapProj->theEllipsoid, compareType)&&
+                theOrigin.isEqualTo(mapProj->theOrigin, compareType)&&
+                theMetersPerPixel.isEqualTo(mapProj->theMetersPerPixel, compareType)&&             
+                theDegreesPerPixel.isEqualTo(mapProj->theDegreesPerPixel, compareType)&&             
+                theUlGpt.isEqualTo(mapProj->theUlGpt, compareType)&&             
+                theUlEastingNorthing.isEqualTo(mapProj->theUlEastingNorthing, compareType)&&             
+                theFalseEastingNorthing.isEqualTo(mapProj->theFalseEastingNorthing, compareType)&&             
+                (thePcsCode == mapProj->thePcsCode)&&
+                (theElevationLookupFlag == mapProj->theElevationLookupFlag)&&
+                (theElevationLookupFlag == mapProj->theElevationLookupFlag)&&
+                (theModelTransform.isEqualTo(mapProj->theModelTransform))&&
+                (theInverseModelTransform.isEqualTo(mapProj->theInverseModelTransform))&&
+                (theModelTransformUnitType == mapProj->theModelTransformUnitType)&&
+                (theProjectionUnits == mapProj->theProjectionUnits));
+      
+      if(result)
+      {
+         if(compareType == OSSIM_COMPARE_FULL)
+         {
+            if(theDatum&&mapProj->theDatum)
+            {
+               result = theDatum->isEqualTo(*mapProj->theDatum, compareType);
+            }
+         }
+         else 
+         {
+            result = (theDatum==mapProj->theDatum);
+         }
+      }
+   }
+   return result;
+}
+
+double ossimMapProjection::getFalseEasting() const
+{
+   return theFalseEastingNorthing.x;
+}
+
+double ossimMapProjection::getFalseNorthing() const
+{
+   return theFalseEastingNorthing.y;
+}
+
+double ossimMapProjection::getStandardParallel1() const
+{
+   return 0.0;
+}
+
+double ossimMapProjection::getStandardParallel2() const
+{
+   return 0.0;
+}
+
+void ossimMapProjection::snapTiePointTo(ossim_float64 multiple,
+                                        ossimUnitType unitType)
+{
+   ossim_float64 convertedMultiple = multiple;
+   
+   if (isGeographic() && (unitType != OSSIM_DEGREES) )
+   {
+      // Convert to degrees.
+      ossimUnitConversionTool convertor;
+      convertor.setOrigin(theOrigin);
+      convertor.setValue(multiple, unitType);
+      convertedMultiple = convertor.getDegrees();
+   }
+   else if ( !isGeographic() && (unitType != OSSIM_METERS) )
+   {
+      // Convert to meters.
+      ossimUnitConversionTool convertor;
+      convertor.setOrigin(theOrigin);
+      convertor.setValue(multiple, unitType);
+      convertedMultiple = convertor.getMeters();
+   }
+
+   // Convert the tie point.
+   if (isGeographic())
+   {
+      // Snap the latitude.
+      ossim_float64 d = theUlGpt.latd();
+      d = ossim::round<int>(d / convertedMultiple) * convertedMultiple;
+      theUlGpt.latd(d);
+
+      // Snap the longitude.
+      d = theUlGpt.lond();
+      d = ossim::round<int>(d / convertedMultiple) * convertedMultiple;
+      theUlGpt.lond(d);
+
+      // Adjust the stored easting / northing.
+      theUlEastingNorthing = forward(theUlGpt);
+   }
+   else
+   {
+      // Snap the easting.
+      ossim_float64 d = theUlEastingNorthing.x - getFalseEasting();
+      d = ossim::round<int>(d / convertedMultiple) * convertedMultiple;
+      theUlEastingNorthing.x = d + getFalseEasting();
+
+      // Snap the northing.
+      d = theUlEastingNorthing.y - getFalseNorthing();
+      d = ossim::round<int>(d / convertedMultiple) * convertedMultiple;
+      theUlEastingNorthing.y = d + getFalseNorthing();
+
+      // Adjust the stored upper left ground point.
+      theUlGpt = inverse(theUlEastingNorthing);
+   }
+}
+
+void ossimMapProjection::snapTiePointToOrigin()
+{
+   // Convert the tie point.
+   if (isGeographic())
+   {
+      // Note the origin may not be 0.0, 0.0:
+      
+      // Snap the latitude.
+      ossim_float64 d = theUlGpt.latd() - origin().latd();
+      d = ossim::round<int>(d / theDegreesPerPixel.y) * theDegreesPerPixel.y;
+      theUlGpt.latd(d + origin().latd());
+
+      // Snap the longitude.
+      d = theUlGpt.lond() - origin().lond();
+      d = ossim::round<int>(d / theDegreesPerPixel.x) * theDegreesPerPixel.x;
+      theUlGpt.lond(d + origin().lond());
+
+      // Adjust the stored easting / northing.
+      theUlEastingNorthing = forward(theUlGpt);
+   }
+   else
+   {
+      // Snap the easting.
+      ossim_float64 d = theUlEastingNorthing.x - getFalseEasting();
+      d = ossim::round<int>(d / theMetersPerPixel.x) * theMetersPerPixel.x;
+      theUlEastingNorthing.x = d + getFalseEasting();
+
+      // Snap the northing.
+      d = theUlEastingNorthing.y - getFalseNorthing();
+      d = ossim::round<int>(d / theMetersPerPixel.y) * theMetersPerPixel.y;
+      theUlEastingNorthing.y = d + getFalseNorthing();
+
+      // Adjust the stored upper left ground point.
+      theUlGpt = inverse(theUlEastingNorthing);
+   }
+}
+
+void ossimMapProjection::setElevationLookupFlag(bool flag)
+{
+   theElevationLookupFlag = flag;
+}
+
+bool ossimMapProjection::getElevationLookupFlag()const
+{
+   return theElevationLookupFlag;
+}
+   
+
diff --git a/ossim/src/ossim/projection/ossimMapProjectionFactory.cpp b/ossim/src/ossim/projection/ossimMapProjectionFactory.cpp
new file mode 100644
index 0000000..4ec9692
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimMapProjectionFactory.cpp
@@ -0,0 +1,290 @@
+//*****************************************************************************
+// FILE: ossimMapProjectionFactory.cc
+//
+// License:  See top level LICENSE.txt file.
+//
+// DESCRIPTION:
+//   Contains implementation of class ossimMapProjectionFactory
+//
+// SOFTWARE HISTORY:
+//>
+//   15Jun2001  Garrett Potts
+//              Initial coding.
+//<
+//*****************************************************************************
+//  $Id: ossimMapProjectionFactory.cpp 22602 2014-01-31 18:39:11Z gpotts $
+
+#include <ossim/projection/ossimMapProjectionFactory.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimFilename.h>
+
+//***
+// Note to programmer: To add a new projection, search this file for
+// "ADD_PROJECTION" to locate places requiring editing. Functional example
+// below...
+//
+// ADD_PROJECTION: Include all map projection headers here:
+//***
+
+#include <ossim/projection/ossimAlbersProjection.h>
+#include <ossim/projection/ossimAzimEquDistProjection.h>
+#include <ossim/projection/ossimBonneProjection.h>
+#include <ossim/projection/ossimBngProjection.h>
+#include <ossim/projection/ossimCassiniProjection.h>
+#include <ossim/projection/ossimCylEquAreaProjection.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/projection/ossimEckert4Projection.h>
+#include <ossim/projection/ossimEckert6Projection.h>
+#include <ossim/projection/ossimGnomonicProjection.h>
+#include <ossim/projection/ossimLambertConformalConicProjection.h>
+#include <ossim/projection/ossimLlxyProjection.h>
+#include <ossim/projection/ossimMercatorProjection.h>
+#include <ossim/projection/ossimMillerProjection.h>
+#include <ossim/projection/ossimMollweidProjection.h>
+#include <ossim/projection/ossimNewZealandMapGridProjection.h>
+#include <ossim/projection/ossimObliqueMercatorProjection.h>
+#include <ossim/projection/ossimOrthoGraphicProjection.h>
+#include <ossim/projection/ossimPolarStereoProjection.h>
+#include <ossim/projection/ossimPolyconicProjection.h>
+#include <ossim/projection/ossimSinusoidalProjection.h>
+#include <ossim/projection/ossimStereographicProjection.h>
+#include <ossim/projection/ossimTransCylEquAreaProjection.h>
+#include <ossim/projection/ossimTransMercatorProjection.h>
+#include <ossim/projection/ossimUpsProjection.h>
+#include <ossim/projection/ossimUtmProjection.h>
+#include <ossim/projection/ossimVanDerGrintenProjection.h>
+#include <ossim/projection/ossimSpaceObliqueMercatorProjection.h>
+#include <ossim/projection/ossimGoogleProjection.h>
+#include <ossim/support_data/ossimSpaceImagingGeom.h>
+//***
+// ADD_PROJECTION: List names of all map projections produced by this factory:
+//***
+
+ossimMapProjectionFactory* ossimMapProjectionFactory::theInstance = 0;
+
+//*****************************************************************************
+//  STATIC METHOD: ossimMapProjectionFactory::instance()
+//  
+//*****************************************************************************
+ossimMapProjectionFactory* ossimMapProjectionFactory::instance()
+{
+   if(!theInstance)
+   {
+      theInstance = new ossimMapProjectionFactory;
+   }
+
+   return (ossimMapProjectionFactory*) theInstance;
+}
+
+ossimProjection*
+ossimMapProjectionFactory::createProjection(const ossimFilename& filename,
+                                            ossim_uint32 entryIdx)const
+{
+   if(!filename.exists())
+   {
+      return NULL;
+   }
+
+   // Check for external geometry file.
+   ossimProjection* proj = createProjectionFromGeometryFile(filename,
+                                                            entryIdx);
+   if (proj)
+   {
+      return proj;
+   }
+
+   ossimFilename geomFile = filename;
+   geomFile = geomFile.setExtension("geom");
+   if(!geomFile.exists())
+   {
+      return NULL;
+   }
+   ossimKeywordlist kwl;
+   if(kwl.addFile(geomFile))
+   {
+      return createProjection(kwl);
+   }
+
+   return NULL;
+}
+
+//*****************************************************************************
+//  METHOD: ossimMapProjectionFactory::create(kwl, prefix)
+//  
+//*****************************************************************************
+ossimProjection* ossimMapProjectionFactory::createProjection(const ossimKeywordlist &keywordList,
+															 const char *prefix) const
+{
+   ossimProjection *result=NULL;
+	
+   const char *lookup = keywordList.find(prefix, ossimKeywordNames::TYPE_KW);
+   const char *lookupSpaceImaging = keywordList.find(prefix, ossimSpaceImagingGeom::SIG_PRODUCER_KW);
+   if(lookup)
+   {
+      result = createProjection(ossimString(lookup).trim());
+      if(result)
+      {
+         result->loadState(keywordList, prefix);
+      }
+   }
+   else
+   {
+      if(lookupSpaceImaging)
+      {
+		  ossimKeywordlist kwl;
+		  ossimKeywordlist kwl2;
+		  kwl.add(keywordList,
+				  prefix,
+				  true);
+         
+         ossimSpaceImagingGeom spaceImaging;
+         
+         spaceImaging.setGeometry(kwl);
+
+         spaceImaging.exportToOssim(kwl2);
+
+         result = ossimProjectionFactoryRegistry::instance()->createProjection(kwl2);
+         if(result)
+         {
+            return result;
+         }
+      }
+      // look for the geom_file keyword.
+      //
+      lookup = keywordList.find(prefix, ossimKeywordNames::GEOM_FILE_KW);
+      if(lookup)
+      {
+         ossimKeywordlist kwl;
+
+         kwl.addFile(lookup);
+
+         result = createProjection(kwl);
+         
+         if(!result)
+         {
+         // maybe they prepend projection. in the geom
+         // file.
+            result = createProjection(kwl, "projection.");
+         }
+
+      }      
+   }
+   return result;
+}
+
+//*****************************************************************************
+//  METHOD: ossimMapProjectionFactory::create(projection_name)
+//*****************************************************************************
+ossimProjection* ossimMapProjectionFactory::createProjection(const ossimString &name) const
+{
+   //***
+   // ADD_PROJECTION: Test for each map projection here:
+   //***
+   if(name ==  STATIC_TYPE_NAME(ossimAlbersProjection))
+      return new ossimAlbersProjection;
+   if(name ==  STATIC_TYPE_NAME(ossimAzimEquDistProjection))
+      return new ossimAzimEquDistProjection;
+   if( name == STATIC_TYPE_NAME(ossimBonneProjection))
+      return new ossimBonneProjection;
+   if( name == STATIC_TYPE_NAME(ossimBngProjection))
+      return new ossimBngProjection;
+   if(name ==  STATIC_TYPE_NAME(ossimCassiniProjection))
+      return new ossimCassiniProjection;
+   if(name ==  STATIC_TYPE_NAME(ossimCylEquAreaProjection))
+      return new ossimCylEquAreaProjection;
+   if(name ==  STATIC_TYPE_NAME(ossimEquDistCylProjection))
+      return new ossimEquDistCylProjection;
+   if(name ==  STATIC_TYPE_NAME(ossimEckert4Projection))
+      return new ossimEckert4Projection;
+   if(name ==  STATIC_TYPE_NAME(ossimEckert6Projection))
+      return new ossimEckert6Projection;
+   if(name == STATIC_TYPE_NAME(ossimGnomonicProjection))
+      return new ossimGnomonicProjection;
+   if(name ==  STATIC_TYPE_NAME(ossimLambertConformalConicProjection))
+      return new ossimLambertConformalConicProjection;
+   if(name ==  STATIC_TYPE_NAME(ossimLlxyProjection))
+      return new ossimLlxyProjection;
+   if(name == STATIC_TYPE_NAME(ossimMercatorProjection))
+      return new ossimMercatorProjection;
+   if(name == STATIC_TYPE_NAME(ossimMillerProjection))
+      return new ossimMillerProjection;
+   if(name == STATIC_TYPE_NAME(ossimMollweidProjection))
+      return new ossimMollweidProjection;
+   if(name == STATIC_TYPE_NAME(ossimNewZealandMapGridProjection))
+      return new ossimNewZealandMapGridProjection;
+   if(name == STATIC_TYPE_NAME(ossimObliqueMercatorProjection))
+      return new ossimObliqueMercatorProjection;
+   if(name == STATIC_TYPE_NAME(ossimOrthoGraphicProjection))
+      return new ossimOrthoGraphicProjection;
+   if(name == STATIC_TYPE_NAME(ossimPolarStereoProjection))
+      return new ossimPolarStereoProjection;
+   if(name == STATIC_TYPE_NAME(ossimPolyconicProjection))
+      return new ossimPolyconicProjection;
+   if(name == STATIC_TYPE_NAME(ossimSinusoidalProjection))
+      return new ossimSinusoidalProjection;
+   if(name == STATIC_TYPE_NAME(ossimStereographicProjection))
+      return new ossimStereographicProjection;
+   if(name == STATIC_TYPE_NAME(ossimTransCylEquAreaProjection))
+      return new ossimTransCylEquAreaProjection;
+   if(name == STATIC_TYPE_NAME(ossimTransMercatorProjection))
+      return new ossimTransMercatorProjection;
+   if(name == STATIC_TYPE_NAME(ossimUpsProjection))
+      return new ossimUpsProjection;
+   if(name == STATIC_TYPE_NAME(ossimUtmProjection))
+      return new ossimUtmProjection;
+   if(name == STATIC_TYPE_NAME(ossimVanDerGrintenProjection))
+      return new ossimVanDerGrintenProjection;
+   if(name == STATIC_TYPE_NAME(ossimSpaceObliqueMercatorProjection))
+      return new ossimSpaceObliqueMercatorProjection;
+    if(name == STATIC_TYPE_NAME(ossimGoogleProjection))
+      return new ossimGoogleProjection;
+  return NULL;
+}
+
+ossimObject* ossimMapProjectionFactory::createObject(const ossimString& typeName)const
+{
+   return createProjection(typeName);
+}
+
+ossimObject* ossimMapProjectionFactory::createObject(const ossimKeywordlist& kwl,
+                                                     const char* prefix)const
+{
+   return createProjection(kwl, prefix);
+}
+
+void ossimMapProjectionFactory::getTypeNameList(std::vector<ossimString>& typeList)const
+{
+   
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimAlbersProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimAzimEquDistProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimBonneProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimBngProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimCassiniProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimCylEquAreaProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimEquDistCylProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimEckert4Projection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimEckert6Projection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimGnomonicProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimLambertConformalConicProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimLlxyProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimMercatorProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimMillerProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimMollweidProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimNewZealandMapGridProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimObliqueMercatorProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimOrthoGraphicProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimPolarStereoProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimPolyconicProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimSinusoidalProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimStereographicProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimTransCylEquAreaProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimTransMercatorProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimUpsProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimUtmProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimVanDerGrintenProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimSpaceObliqueMercatorProjection)));
+   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimGoogleProjection)));
+
+}
diff --git a/src/ossim/projection/ossimMapProjectionInfo.cpp b/ossim/src/ossim/projection/ossimMapProjectionInfo.cpp
similarity index 100%
rename from src/ossim/projection/ossimMapProjectionInfo.cpp
rename to ossim/src/ossim/projection/ossimMapProjectionInfo.cpp
diff --git a/src/ossim/projection/ossimMapViewController.cpp b/ossim/src/ossim/projection/ossimMapViewController.cpp
similarity index 100%
rename from src/ossim/projection/ossimMapViewController.cpp
rename to ossim/src/ossim/projection/ossimMapViewController.cpp
diff --git a/src/ossim/projection/ossimMeanRadialLensDistortion.cpp b/ossim/src/ossim/projection/ossimMeanRadialLensDistortion.cpp
similarity index 100%
rename from src/ossim/projection/ossimMeanRadialLensDistortion.cpp
rename to ossim/src/ossim/projection/ossimMeanRadialLensDistortion.cpp
diff --git a/src/ossim/projection/ossimMercatorProjection.cpp b/ossim/src/ossim/projection/ossimMercatorProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimMercatorProjection.cpp
rename to ossim/src/ossim/projection/ossimMercatorProjection.cpp
diff --git a/ossim/src/ossim/projection/ossimMgrs.c b/ossim/src/ossim/projection/ossimMgrs.c
new file mode 100644
index 0000000..739cd3e
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimMgrs.c
@@ -0,0 +1,1325 @@
+/***************************************************************************/
+/* RSC IDENTIFIER:  MGRS
+ *
+ * ABSTRACT
+ *
+ *    This component converts between geodetic coordinates (latitude and 
+ *    longitude) and Military Grid Reference System (MGRS) coordinates. 
+ *
+ * ERROR HANDLING
+ *
+ *    This component checks parameters for valid values.  If an invalid value
+ *    is found, the error code is combined with the current error code using 
+ *    the bitwise or.  This combining allows multiple error codes to be
+ *    returned. The possible error codes are:
+ *
+ *          MGRS_NO_ERROR          : No errors occurred in function
+ *          MGRS_LAT_ERROR         : Latitude outside of valid range 
+ *                                    (-90 to 90 degrees)
+ *          MGRS_LON_ERROR         : Longitude outside of valid range
+ *                                    (-180 to 360 degrees)
+ *          MGRS_STR_ERROR         : An MGRS string error: string too long,
+ *                                    too short, or badly formed
+ *          MGRS_PRECISION_ERROR   : The precision must be between 0 and 5 
+ *                                    inclusive.
+ *          MGRS_A_ERROR           : Semi-major axis less than or equal to zero
+ *          MGRS_INV_F_ERROR       : Inverse flattening outside of valid range
+ *									                  (250 to 350)
+ *          MGRS_EASTING_ERROR     : Easting outside of valid range
+ *                                    (100,000 to 900,000 meters for UTM)
+ *                                    (0 to 4,000,000 meters for UPS)
+ *          MGRS_NORTHING_ERROR    : Northing outside of valid range
+ *                                    (0 to 10,000,000 meters for UTM)
+ *                                    (0 to 4,000,000 meters for UPS)
+ *          MGRS_ZONE_ERROR        : Zone outside of valid range (1 to 60)
+ *          MGRS_HEMISPHERE_ERROR  : Invalid hemisphere ('N' or 'S')
+ *
+ * REUSE NOTES
+ *
+ *    MGRS is intended for reuse by any application that does conversions
+ *    between geodetic coordinates and MGRS coordinates.
+ *
+ * REFERENCES
+ *
+ *    Further information on MGRS can be found in the Reuse Manual.
+ *
+ *    MGRS originated from : U.S. Army Topographic Engineering Center
+ *                           Geospatial Information Division
+ *                           7701 Telegraph Road
+ *                           Alexandria, VA  22310-3864
+ *
+ * LICENSES
+ *
+ *    None apply to this component.
+ *
+ * RESTRICTIONS
+ *
+ *
+ * ENVIRONMENT
+ *
+ *    MGRS was tested and certified in the following environments:
+ *
+ *    1. Solaris 2.5 with GCC version 2.8.1
+ *    2. Windows 95 with MS Visual C++ version 6
+ *
+ * MODIFICATIONS
+ *
+ *    Date              Description
+ *    ----              -----------
+ *    16-11-94          Original Code
+ *    15-09-99          Reengineered upper layers
+ *
+ */
+
+
+/***************************************************************************/
+/*
+ *                               INCLUDES
+ */
+#include <ctype.h>
+#include <math.h>
+#include <stdio.h>
+#include <string.h>
+#include <ossim/projection/ossimUps.h>
+#include <ossim/projection/ossimUtm.h>
+#include <ossim/projection/ossimMgrs.h>
+
+/*
+ *      ctype.h     - Standard C character handling library
+ *      math.h      - Standard C math library
+ *      stdio.h     - Standard C input/output library
+ *      string.h    - Standard C string handling library
+ *      ups.h       - Universal Polar Stereographic (UPS) projection
+ *      utm.h       - Universal Transverse Mercator (UTM) projection
+ *      mgrs.h      - function prototype error checking
+ */
+
+
+/***************************************************************************/
+/*
+ *                              GLOBAL DECLARATIONS
+ */
+#define DEGRAD       0.017453292519943295 /* PI/180                          */
+#define R3           0.052359877559829890 /* RADIANS FOR  3 DEGREES          */ 
+#define R8           0.139626340159546400 /* RADIANS FOR  8 DEGREES          */
+#define R9           0.157079632679489700 /* RADIANS FOR  9 DEGREES          */
+#define R21          0.366519142918809200 /* RADIANS FOR  21 DEGREES         */
+#define R33          0.575958653158128800 /* RADIANS FOR  33 DEGREES         */
+#define R56          0.977384381116824600 /* RADIANS FOR  56 DEGREES         */
+#define R64          1.117010721276371000 /* RADIANS FOR  64 DEGREES         */
+#define R72          1.256637061435917000 /* RADIANS FOR  72 DEGREES         */
+#define R80          1.396263401595464000 /* RADIANS FOR  80 DEGREES         */
+#define UPS_SOUTH              3    /* UPS COORDINATE IN SOUTHERN HEMISPHERE */
+#define UPS_NORTH              2    /* UPS COORDINATE IN NORTHERN HEMISPHERE */ 
+#define UTM                    1    /* UTM COORDINATE                        */ 
+#define ALBET                 "ABCDEFGHIJKLMNOPQRSTUVWXYZ" /* ALPHABET       */
+#define LETTER_A               0   /* ARRAY INDEX FOR LETTER A               */
+#define LETTER_B               1   /* ARRAY INDEX FOR LETTER B               */
+#define LETTER_C               2   /* ARRAY INDEX FOR LETTER C               */
+#define LETTER_D               3   /* ARRAY INDEX FOR LETTER D               */
+#define LETTER_E               4   /* ARRAY INDEX FOR LETTER E               */
+#define LETTER_H               7   /* ARRAY INDEX FOR LETTER H               */
+#define LETTER_I               8   /* ARRAY INDEX FOR LETTER I               */
+#define LETTER_J               9   /* ARRAY INDEX FOR LETTER J               */
+#define LETTER_L              11   /* ARRAY INDEX FOR LETTER L               */
+#define LETTER_M              12   /* ARRAY INDEX FOR LETTER M               */
+#define LETTER_N              13   /* ARRAY INDEX FOR LETTER N               */
+#define LETTER_O              14   /* ARRAY INDEX FOR LETTER O               */
+#define LETTER_P              15   /* ARRAY INDEX FOR LETTER P               */
+#define LETTER_Q              16   /* ARRAY INDEX FOR LETTER Q               */
+#define LETTER_R              17   /* ARRAY INDEX FOR LETTER R               */
+#define LETTER_S              18   /* ARRAY INDEX FOR LETTER S               */
+#define LETTER_U              20   /* ARRAY INDEX FOR LETTER U               */
+#define LETTER_V              21   /* ARRAY INDEX FOR LETTER V               */
+#define LETTER_W              22   /* ARRAY INDEX FOR LETTER W               */
+#define LETTER_X              23   /* ARRAY INDEX FOR LETTER X               */
+#define LETTER_Y              24   /* ARRAY INDEX FOR LETTER Y               */
+#define LETTER_Z              25   /* ARRAY INDEX FOR LETTER Z               */
+#define RND1                  0.1e0  /* ROUND TO NEAREST .1            */
+#define RND5                  0.5e0  /* ROUND TO NEAREST .5            */
+#define EOLN                   '\0'  /* END OF STRING CHARACTER        */
+#define BLANK                   ' '  /* BLANK CHARACTER                */
+#define OSSIM_MGRS_LETTERS            3  /* NUMBER OF LETTERS IN MGRS              */
+#define NUM_OFFSET             48  /* USED TO CONVERT NUMBERS TO LETTERS     */
+#define ONEHT          100000.e0    /* ONE HUNDRED THOUSAND                  */
+#define TWOMIL        2000000.e0    /* TWO MILLION                           */
+#define EIGHT          800000.e0    /* EIGHT HUNDRED THOUSAND                */
+#define ONE3HT        1300000.e0    /* ONE MILLION THREE HUNDRED THOUSAND    */
+#define ZERO                   0.e0  /* ZERO                           */
+#define TEN                10.e0    /* TEN                                   */
+#define TRUE                      1  /* CONSTANT VALUE FOR TRUE VALUE  */
+#define FALSE                     0  /* CONSTANT VALUE FOR FALSE VALUE */
+#define PI    3.14159265358979323e0  /* PI                             */
+#define PI_OVER_2  (PI / 2.0e0)
+#define NUM                   "01234567890"                /* NUMBERS        */
+#define MAXALBET              25   /* LAST INDEX IN ALPHABET ARRAY(0-25)     */
+#define MAXNUMBER             10   /* LAST INDEX IN NUMBER ARRAY(0-9)        */
+#define OSSIM_MGRS_ZONE_AND_LETTERS   5  /* NUM. OF CHARS. IN ZONE AND LETTERS     */
+#define OSSIM_MGRS_MINIMUM            9  /* MINIMUM NUMBER OF CHARS FOR MGRS       */
+#define OSSIM_MGRS_MAXIMUM           15  /* MAXIMUM NUMBER OF CHARS FOR MGRS       */
+
+#define MIN_EASTING  100000
+#define MAX_EASTING  900000
+#define MIN_NORTHING 0
+#define MAX_NORTHING 10000000
+#define MAX_PRECISION           5   /* Maximum precision of easting & northing */
+#define MIN_UTM_LAT      ( (-80 * PI) / 180.0 ) /* -80 degrees in radians    */
+#define MAX_UTM_LAT      ( (84 * PI) / 180.0 )  /* 84 degrees in radians     */
+
+#define MIN_EAST_NORTH 0
+#define MAX_EAST_NORTH 4000000
+
+/* Ellipsoid parameters, default to WGS 84 */
+double OSSIM_MGRS_a = 6378137.0;    /* Semi-major axis of ellipsoid in meters */
+double OSSIM_MGRS_f = 1 / 298.257223563; /* Flattening of ellipsoid           */
+double OSSIM_MGRS_recpf = 298.257223563;
+char   OSSIM_MGRS_Ellipsoid_Code[3] = {'W','E',0};
+
+const char* OSSIM_CLARKE_1866 = "CC";
+const char* OSSIM_CLARKE_1880 = "CD";
+const char* OSSIM_BESSEL_1841 = "BR";
+/* 
+ *    OSSIM_CLARKE_1866 : Ellipsoid code for OSSIM_CLARKE_1866
+ *    OSSIM_CLARKE_1880 : Ellipsoid code for OSSIM_CLARKE_1880
+ *    OSSIM_BESSEL_1841 : Ellipsoid code for OSSIM_BESSEL_1841
+ */
+
+
+/***************************************************************************/
+/*
+ *                              FUNCTIONS     
+ */
+
+
+void UTMSET (long izone, 
+             long* ltrlow, 
+             long* ltrhi, 
+             double *fnltr)
+{ /* BEGIN UTMSET */
+  /*
+   *    izone  : Zone number
+   *    ltrlow : 2nd letter low number
+   *    ltrhi  : 2nd letter high number
+   *    fnltr  : False northing
+   */
+  long iset;      /* Set number (1-6) based on UTM zone number           */
+  long igroup;    /* Group number (1-2) based on ellipsoid code and zone */
+  iset = 1;
+  while (((izone-iset) / 6) * 6 + iset != izone)
+  {
+    iset = iset +1;
+    if (iset > 6)
+    {
+      return;
+    }
+  } 
+  igroup = 1;
+  if (!strcmp(OSSIM_MGRS_Ellipsoid_Code,OSSIM_CLARKE_1866) || !strcmp(OSSIM_MGRS_Ellipsoid_Code, OSSIM_CLARKE_1880) || !strcmp(OSSIM_MGRS_Ellipsoid_Code,OSSIM_BESSEL_1841))
+  {
+    igroup = 2;
+  }
+  else if (!strcmp(OSSIM_MGRS_Ellipsoid_Code, OSSIM_CLARKE_1866) && (izone >= 47) && (izone <= 55 ))
+  {
+    igroup = 1;
+  }
+  if ((iset == 1) || (iset == 4))
+  {
+    *ltrlow = LETTER_A;
+    *ltrhi = LETTER_H;
+  }
+  else if ((iset == 2) || (iset == 5))
+  {
+    *ltrlow = LETTER_J;
+    *ltrhi = LETTER_R;
+  }
+  else if ((iset == 3) || (iset == 6))
+  {
+    *ltrlow = LETTER_S;
+    *ltrhi = LETTER_Z;
+  }
+  if (igroup == 1)
+  {
+    *fnltr = ZERO;
+    if ((iset % 2) ==  0)
+    {
+      *fnltr = 1500000.e0;
+    }
+  }
+  else if (igroup == 2)
+  {
+    *fnltr = 1000000.0e0;
+    if ((iset % 2) == 0)
+    {
+      *fnltr =  500000.e0;
+    }
+  }
+  return;
+} /* END OF UTMSET */
+
+
+void UTMLIM (long* n, 
+             double sphi, 
+             long izone, 
+             double *spsou, 
+             double *spnor,
+             double *sleast, 
+             double *slwest)
+{                          /* BEGIN UTMLIM */
+  /*
+   *    n      : 1st letter number for MGRS
+   *    sphi   : Latitude in radians
+   *    izone  : Zone number 
+   *    spsou  : South latitude limit
+   *    spnor  : North latitude limit
+   *    sleast : East longitude limit 
+   *    slwest : West longitude limit 
+   */
+  double slcm;     /* Central meridian - Longitude of origin              */
+  double temp;     /* Temporary variable                                  */
+  long icm;        /* Central meridian                                    */
+  long isphi;      /* South latitude limit                                */
+  if (*n <= LETTER_A)
+  {
+    temp = ((sphi + R80) / (R8)) + 2;
+    temp = temp + .00000001;
+    *n = (long)temp;
+    if (*n > LETTER_H)
+    {
+      *n = *n + 1;
+    }
+    if (*n > LETTER_N)
+    {
+      *n = *n + 1;
+    }
+    if (*n >= LETTER_Y)
+    {
+      *n = LETTER_X;
+    }
+    if ((*n  ==  LETTER_M) && (sphi  ==  ZERO ))
+    {
+      *n = LETTER_N;
+    }
+    isphi = (*n - 3) * 8 - 80;
+  }
+  else
+  {
+    isphi = (*n - 3) * 8 - 80;
+    *n = *n - 1;    
+  }
+  if (*n > LETTER_H)
+  {
+    isphi = isphi - 8;
+  }
+  if (*n > LETTER_N)
+  {
+    isphi = isphi - 8;
+  }
+  *spsou = (double)(isphi) * DEGRAD;
+  *spnor = *spsou + R8;
+  if (*n == LETTER_X)
+  {
+    *spnor = *spsou + 12.e0 * DEGRAD;
+  }
+  icm = izone * 6 - 183;
+  slcm = (double) icm * DEGRAD;
+  *sleast = slcm + R3;
+  *slwest = slcm - R3;
+  if ((izone < 31) || (izone > 37))
+  {
+    return;
+  }
+  if (*n < LETTER_V)
+  {
+    return;
+  }
+  if ((*n == LETTER_V) && (izone == 31))
+  {
+    *sleast = R3;
+  }
+  if ((*n == LETTER_V) && (izone == 32))
+  {
+    *slwest = R3;
+  }
+  if (*n < LETTER_X)
+  {
+    return;
+  }
+  if (izone == 31)
+  {
+    *sleast = R9;
+  }
+  if (izone == 33)
+  {
+    *slwest = R9;
+    *sleast = R21;
+  }
+  if (izone == 35)
+  {
+    *slwest = R21;
+    *sleast = R33;
+  }
+  if (izone == 37)
+  {
+    *slwest = R33;
+  }
+  return;
+} /* END OF UTMLIM */
+
+
+void UTMOSSIM_MGRS (long izone,
+              long* ltrnum,
+              double sphi,
+              double x,
+              double y)
+{ /* BEGIN UTMMGRS */
+  /*
+   *    izone      : Zone number.
+   *    ltrnum     : Values of letters in the MGRS coordinate.
+   *    sphi       : Latitude in radians.
+   *    x          : Easting.
+   *    y          : Northing.
+   *
+   *    UTMMGRS CALLS THE FOLLOWING ROUTINES:
+   *
+   *    GPTUTM
+   *    UTMLIM
+   *    UTMSET
+   */
+  double fnltr;       /* False northing for 3rd letter                     */
+  double slcm;        /* Central meridian - longitude of origin            */
+  double sleast;      /* Longitude east limit - UTM                        */
+  double slwest;      /* Longitude west limit -UTM                         */
+  double spnor;       /* MGRS north latitude limits based on 1st letter    */
+  double spsou;       /* MGRS south latitude limits based on 1st letter    */
+  double xltr;        /* Easting used to derive 2nd letter of MGRS         */
+  double yltr;        /* Northing used to derive 3rd letter of MGRS        */
+  long ltrlow;        /* 2nd letter range - low number                     */
+  long ltrhi;         /* 2nd letter range - high number                    */
+  char hemisphere;
+
+  UTMSET(izone, &ltrlow, &ltrhi, &fnltr);
+  ltrnum[0] = LETTER_A;
+  UTMLIM(&ltrnum[0], sphi, izone, &spsou, &spnor, &sleast, &slwest);
+  slcm = (double)(izone * 6 - 183) * DEGRAD;
+  /*
+    GPTUTM(a, recf, spsou, slcm, &izone, &yltr, &xltr, (long)1);
+  */
+  Set_UTM_Parameters(OSSIM_MGRS_a,OSSIM_MGRS_f,izone);
+  Convert_Geodetic_To_UTM(spsou,slcm,&izone,&hemisphere,&xltr,&yltr);
+
+  yltr = (double)((long)(y + RND5));
+  if (((double)((long)(yltr + RND5))) == ((double)((long)(1.e7 + RND5))))
+  {
+    yltr = (double)((long)(yltr - 1.e0 + RND5)); 
+  }
+  while (yltr >= TWOMIL)
+  {
+    yltr = yltr - TWOMIL; 
+  }
+  yltr = yltr - fnltr;
+  if (yltr < ZERO)
+  {
+    yltr = yltr + TWOMIL;
+  }
+  ltrnum[2] = (long)((yltr + RND1) / ONEHT); 
+  if (ltrnum[2] > LETTER_H)
+  {
+    ltrnum[2] = ltrnum[2] + 1;
+  }
+  if (ltrnum[2] > LETTER_N)
+  {
+    ltrnum[2] = ltrnum[2] + 1;
+  }
+  xltr = (double)((long)(x));
+  if (((ltrnum[0] == LETTER_V) && (izone == 31)) && 
+      (((double)((long)(xltr + RND5))) == ((double)((long)(5.e5 + RND5)))))
+  {
+    xltr = (double)((long)(xltr - 1.e0 + RND5)); /* SUBTRACT 1 METER */
+  }
+  ltrnum[1] = ltrlow + ((long)((xltr + RND1) / ONEHT) -1); 
+  if ((ltrlow == LETTER_J) && (ltrnum[1] > LETTER_N))
+  {
+    ltrnum[1] = ltrnum[1] + 1;
+  }
+  return;
+} /* END UTMMGRS */
+
+
+void UPSSET (long n, 
+             long* ltrlow, 
+             long* ltrhi, 
+             double *feltr,
+             double *fnltr, 
+             long* ltrhy)
+{ /* BEGIN UPSSET */
+  /*
+   *   n      : Value of 1st letter in MGRS coordinate.
+   *   ltrlow : Low number for 2nd letter.
+   *   ltrhi  : High number for 2nd letter.
+   *   feltr  : False easting.
+   *   fnltr  : False northing.
+   *   ltrhy  : High number for 3rd letter.
+   */
+  if (n == LETTER_Z) /* EASTERN HEMISPHERE-NORTH ZONE */
+  {
+    *ltrlow = LETTER_A;
+    *ltrhi  = LETTER_J;
+    *feltr = TWOMIL;
+    *fnltr = ONE3HT;
+    *ltrhy = LETTER_P;
+  }
+  else if (n == LETTER_Y) /* WESTERN HEMISPHERE-NORTH ZONE */
+  {
+    *ltrlow = LETTER_J;
+    *ltrhi  = LETTER_Z;
+    *feltr = EIGHT;
+    *fnltr = ONE3HT;
+    *ltrhy = LETTER_P;
+  }
+  else if (n == LETTER_B) /* ** EASTERN HEMISPHERE - SOUTH ZONE */
+  {
+    *ltrlow = LETTER_A;
+    *ltrhi  = LETTER_R;
+    *feltr = TWOMIL;
+    *fnltr = EIGHT;
+    *ltrhy = LETTER_Z;
+  }
+  else if (n == LETTER_A) /* ** WESTERN HEMISPHERE - SOUTH ZONE */
+  {
+    *ltrlow = LETTER_J;
+    *ltrhi  = LETTER_Z;
+    *feltr = EIGHT;
+    *fnltr = EIGHT;
+    *ltrhy = LETTER_Z;
+  }
+  return;
+} /* END OF UPSSET */
+
+
+void UPS (char* mgrs,
+          long* ltrnum,
+          double x,
+          double y,
+          long iarea)
+{ /* BEGIN UPS */
+  /*
+   *    mgrs   : MGRS coordinate.
+   *    ltrnum : Values of the letters in the MGRS coordinate.
+   *    x      : Easting.
+   *    y      : Northing.
+   *    iarea  : Set to UPS_NORTH or UPS_SOUTH.
+   *
+   *    UPS CALLS THE FOLLOWING ROUTINES:
+   *
+   *    UPSSET
+   */
+  double feltr=0.0;       /* False easting for 2nd letter                      */
+  double fnltr=0.0;       /* False northing for 3rd letter                     */
+  double xltr=0.0;        /* Easting used to derive 2nd letter of MGRS         */
+  double yltr=0.0;        /* Northing used to derive 3rd letter of MGRS        */
+  long ltrlow=0;        /* 2nd letter range - low number                     */
+  long ltrhi=0;         /* 2nd letter range - high number                    */
+  long ltrhy=0;         /* 3rd letter range - high number (UPS)              */
+  if (iarea == UPS_NORTH)
+  {
+    ltrnum[0] = LETTER_Y;
+    if (((double)((long)(x + RND5))) >= TWOMIL)
+    {
+      ltrnum[0] = LETTER_Z; 
+    }
+  }
+  else if (iarea == UPS_SOUTH)
+  {
+    ltrnum[0] = LETTER_A;
+    if (((double)((long)(x + RND5))) >= TWOMIL)
+    {
+      ltrnum[0] = LETTER_B;
+    }
+  }
+  UPSSET(ltrnum[0], &ltrlow, &ltrhi, &feltr, &fnltr, &ltrhy);
+  mgrs[0] = BLANK;
+  mgrs[1] = BLANK;
+  yltr = (double)((long)(y + RND5));
+  yltr = yltr - fnltr;
+  ltrnum[2] = (long)((yltr + RND1) / ONEHT);
+  if (ltrnum[2] > LETTER_H)
+  {
+    ltrnum[2] = ltrnum[2] + 1;
+  }
+  if (ltrnum[2] > LETTER_N)
+  {
+    ltrnum[2] = ltrnum[2] + 1;
+  }
+  xltr = (double)((long)(x + RND5));
+  xltr = xltr - feltr;
+  ltrnum[1] = ltrlow + ((long)((xltr + RND1) / ONEHT)); 
+  if (x < TWOMIL)
+  {
+    if (ltrnum[1] > LETTER_L)
+    {
+      ltrnum[1] = ltrnum[1] + 3; 
+    }
+    if (ltrnum[1] > LETTER_U)
+    {
+      ltrnum[1] = ltrnum[1] + 2; 
+    }
+  }
+  if (x >= TWOMIL)
+  {
+    if (ltrnum[1] > LETTER_C)
+    {
+      ltrnum[1] = ltrnum[1] + 2; 
+    }
+    if (ltrnum[1] > LETTER_H)
+    {
+      ltrnum[1] = ltrnum[1] + 1; 
+    }
+    if (ltrnum[1] > LETTER_L)
+    {
+      ltrnum[1] = ltrnum[1] + 3; 
+    }
+  }
+  return;
+} /* END OF UPS */
+
+
+void LTR2UPS (long* ltrnum, 
+              long ltrlow, 
+              long ltrhi, 
+              long ltrhy, 
+              long* ierr, 
+              double *xltr, 
+              double *yltr, 
+              double fnltr, 
+              double feltr, 
+              double *x, 
+              double *y, 
+              double sign)
+{ /* BEGIN LTR2UPS */
+  /*    
+   *    ltrnum : Values of the letters in the MGRS coordinate
+   *    ltrlow : Low number
+   *    ltrhi  : High number-2nd letter
+   *    ltrhy  : High number-3rd letter
+   *    ierr   : Error code
+   *    xltr   : Easting for 100,000 meter grid square
+   *    yltr   : Northing for 100,000 meter grid square
+   *    fnltr  : False northing for 3rd letter
+   *    feltr  : False easting for 2nd letter
+   *    x      : Easting
+   *    y      : Northing
+   *    sign   : Set to either positive or negative
+   */
+  if (ltrnum[1] < ltrlow)
+  {
+    *ierr = TRUE;
+    return;
+  }
+  if (ltrnum[1] > ltrhi)
+  {
+    *ierr = TRUE;
+    return;
+  }
+  if (ltrnum[2] > ltrhy)
+  {
+    *ierr = TRUE;
+    return;
+  }
+  if ((ltrnum[1] == LETTER_D) || (ltrnum[1] == LETTER_E) ||
+      (ltrnum[1] == LETTER_M) || (ltrnum[1] == LETTER_N) ||
+      (ltrnum[1] == LETTER_V) || (ltrnum[1] == LETTER_W))
+  {
+    *ierr = TRUE;
+    return;
+  }
+  *yltr = (double)ltrnum[2] * ONEHT + fnltr; 
+  if (ltrnum[2] > LETTER_I)
+  {
+    *yltr = *yltr - ONEHT;
+  }
+  if (ltrnum[2] > LETTER_O)
+  {
+    *yltr = *yltr - ONEHT;
+  }
+  *xltr = (double)((ltrnum[1]) - ltrlow) * ONEHT + feltr; 
+  if (ltrlow != LETTER_A)
+  {
+    if (ltrnum[1] > LETTER_L)
+    {
+      *xltr = *xltr - 3.e0 * ONEHT;
+    }
+    if (ltrnum[1] > LETTER_U)
+    {
+      *xltr = *xltr - 2.e0 * ONEHT;
+    }
+  }
+  else if (ltrlow == LETTER_A)
+  {
+    if (ltrnum[1] > LETTER_C)
+    {
+      *xltr = *xltr - 2.e0 * ONEHT;
+    }
+    if (ltrnum[1] > LETTER_I)
+    {
+      *xltr = *xltr - ONEHT;
+    }
+    if (ltrnum[1] > LETTER_L)
+    {
+      *xltr = *xltr - 3.e0 * ONEHT ;
+    }
+  }
+  *x = *xltr;
+  *y = *yltr * sign;
+  return;
+} /* END OF LTR2UPS */
+
+
+void GRID_UPS (long   *Letters,
+               char   *Hemisphere,
+               double *Easting,
+               double *Northing,
+               long   *Error)
+{ /* BEGIN GRID_UPS */
+  double feltr=0.0;               /* False easting for 2nd letter               */
+  double fnltr=0.0;               /* False northing for 3rd letter              */
+  // double sleast=0.0;              /* Longitude east limit - UTM                 */
+  // double slwest=0.0;              /* Longitude west limit -UTM                  */
+  // double spnor=0.0;               /* North latitude limits based on 1st letter  */
+  double spsou=0.0;               /* South latitude limits based on 1st letter  */
+  double x=0.0;                   /* easting                                    */
+  double xltr=0.0;                /* easting for 100,000 meter grid square      */
+  double xnum=0.0;                /* easting part of MGRS                       */
+  double y=0.0;                   /* northing                                   */
+  double yltr=0.0;                /* northing for 100,000 meter grid square     */
+  double ynum=0.0;                /* northing part of MGRS                      */
+  // long izone=0;                 /* Zone number                                */
+  long ltrhi=0;                 /* 2nd letter range - high number             */
+  long ltrhy=0;                 /* 3rd letter range - high number (UPS)       */
+  long ltrlow=0;                /* 2nd letter range - low number              */
+  long sign=0;
+  double sphi=0.0;
+  double slam=0.0;
+  if ((Letters[0] == LETTER_Y) || (Letters[0] == LETTER_Z))
+  {
+    spsou = MAX_UTM_LAT;
+    sign = 1;
+  }
+  else
+  {
+    spsou = MIN_UTM_LAT;
+    sign = -1;
+  }
+  slam = PI / 2.e0;
+  if ((Letters[0] == LETTER_Y) || (Letters[0] == LETTER_A))
+  {
+    slam = -slam;
+  }
+  // izone = 0;
+  sphi = spsou;
+  Set_UPS_Parameters(OSSIM_MGRS_a,OSSIM_MGRS_f);
+  Convert_Geodetic_To_UPS(sphi,slam,Hemisphere,&x,&y);
+  // spnor = sphi;
+  // sleast = slam;
+  // slwest = slam;
+  UPSSET(Letters[0], &ltrlow, &ltrhi, &feltr, &fnltr, &ltrhy);
+  LTR2UPS(Letters, ltrlow, ltrhi, ltrhy, Error, &xltr, &yltr, fnltr, feltr, 
+          &x, &y, sign);
+  xnum = *Easting;
+  ynum = *Northing;
+  y = (yltr + ynum);
+  x = xltr + xnum;
+  *Easting = x;
+  *Northing = y;
+  return;
+} /* END OF GRID_UPS */
+
+
+void LTR2UTM (long* ltrnum, 
+              long ltrlow, 
+              long ltrhi, 
+              long* ierr, 
+              double *xltr, 
+              double *yltr, 
+              double fnltr, 
+              double yslow, 
+              double ylow) 
+{ /* BEGIN LTR2UTM */
+  /*    
+   *    xltr   : Easting for 100,000 meter grid square.
+   *    yltr   : Northing for 100,000 meter grid square.
+   *    ierr   : Error code.
+   *    ltrnum : Values of the letters in the OSSIM_MGRS coordinate.
+   *    ltrlow : Low number.
+   *    ltrhi  : High number.
+   *    fnltr  : False northing for 3rd letter.
+   *    yslow  : Northing scaled down to less than 2 million.
+   *    ylow   : Lowest northing of area to nearest 100,000.
+   */
+  if (ltrnum[1] < ltrlow)
+  {
+    *ierr = TRUE;
+    return;
+  }
+  if (ltrnum[1] > ltrhi)
+  {
+    *ierr = TRUE;
+    return;
+  }
+  if (ltrnum[2] > LETTER_V)
+  {
+    *ierr = TRUE;
+    return;
+  }
+  *yltr = (double)(ltrnum[2]) * ONEHT + fnltr;
+  *xltr = (double)((ltrnum[1]) - ltrlow + 1) * ONEHT;
+  if ((ltrlow == LETTER_J) && (ltrnum[1] > LETTER_O))
+  {
+    *xltr = *xltr - ONEHT;
+  }
+  if (ltrnum[2] > LETTER_O)
+  {
+    *yltr = *yltr - ONEHT;
+  }
+  if (ltrnum[2] > LETTER_I)
+  {
+    *yltr = *yltr - ONEHT; 
+  }
+  if (((double)((long)(*yltr + RND5))) >= ((double)((long)(TWOMIL + RND5))))
+  {
+    *yltr = *yltr - TWOMIL;
+  }
+  *yltr = ((double)((long)(*yltr + RND5)));
+  *yltr = *yltr - yslow;
+  if (*yltr < ZERO)
+  {
+    *yltr = *yltr + TWOMIL;
+  }
+  *yltr = ((double)((long)(ylow + *yltr + RND5)));
+  return;
+} /* END OF LTR2UTM */
+
+
+void GRID_UTM (long   *Zone,
+               long   *Letters,
+               char   *Hemisphere,
+               double *Easting,
+               double *Northing,
+               long   In_Precision,
+               long   *Error)
+{ /* BEGIN GRID_UTM */
+  double fnltr;               /* False northing for 3rd letter              */
+  long ltrhi;                 /* 2nd letter range - High number             */
+  long ltrlow;                /* 2nd letter range - Low number              */
+  long number;                /* Value of ltrnum[0] + 1                     */
+/*  double slam;*/
+  double slcm;                /* Central meridian                           */
+  double sleast;              /* Longitude east limit - UTM                 */
+  double slwest;              /* Longitude west limit -UTM                  */
+  double sphi;                /* Latitude (needed by UTMLIM)                */
+  double spnor;               /* North latitude limits based on 1st letter  */
+  double spsou;               /* South latitude limits based on 1st letter  */
+  double xltr;                /* Easting for 100,000 meter grid square      */
+  double ylow;                /* Lowest northing of area to nearest 100,000 */
+  double yltr;                /* Northing for 100,000 meter grid square     */
+  double yslow;               /* Northing scaled down to less than 2 million*/
+  double Latitude = 0.0;
+  double Longitude = 0.0;
+  double divisor = 1.0;
+  if ((*Zone == 32) && (Letters[0] == LETTER_X))
+  {
+    *Error = TRUE;
+    return;
+  }
+  if ((*Zone == 34) && (Letters[0] == LETTER_X))
+  {
+    *Error = TRUE;
+    return;
+  }
+  if ((*Zone == 36) && (Letters[0] == LETTER_X))
+  {
+    *Error = TRUE;
+    return;
+  }
+  number = Letters[0] + 1;
+  sphi = 0.0;
+  UTMLIM(&number,sphi,*Zone,&spsou,&spnor,&sleast,&slwest);
+  Set_UTM_Parameters(OSSIM_MGRS_a,OSSIM_MGRS_f,*Zone);
+  slcm = (double)(*Zone * 6 - 183) * DEGRAD; 
+  Convert_Geodetic_To_UTM(spsou,slcm,Zone,Hemisphere,&xltr,&yltr);
+  ylow = ((double)((long)((double)((long)(yltr / ONEHT)) * ONEHT)));
+  yslow = ylow;
+  while (yslow >= TWOMIL)
+  {
+    yslow = yslow - TWOMIL;
+  }
+  yslow = ((double)((long)(yslow)));
+  UTMSET(*Zone, &ltrlow, &ltrhi, &fnltr);
+  LTR2UTM(Letters, ltrlow, ltrhi, Error, &xltr, &yltr, fnltr, yslow, ylow);
+  *Easting = xltr + *Easting;
+  *Northing = yltr + *Northing;
+  /* check that point is within Zone Letter bounds */
+  Convert_UTM_To_Geodetic(*Zone,*Hemisphere,*Easting,*Northing,&Latitude,&Longitude);
+  divisor = pow (10.0, In_Precision);
+  if (((spsou - DEGRAD/divisor) <= Latitude) && (Latitude <= (spnor + DEGRAD/divisor)))
+    return;
+  else
+    *Error = TRUE;
+  return;
+}/* END OF GRID_UTM */
+
+
+long Round_OSSIM_MGRS (double value)
+/* Round value to nearest integer, using standard engineering rule */
+{ /* Round_OSSIM_MGRS */
+  double ivalue;
+  long ival;
+  double fraction = modf (value, &ivalue);
+  ival = (long)(ivalue);
+  if ((fraction > 0.5) || ((fraction == 0.5) && (ival%2 == 1)))
+    ival++;
+  return (ival);
+} /* Round_OSSIM_MGRS */
+
+
+long Make_OSSIM_MGRS_String (char* OSSIM_MGRS, 
+                       long Zone, 
+                       long ltrnum[OSSIM_MGRS_LETTERS], 
+                       double Easting, 
+                       double Northing,
+                       long Precision)
+/* Construct an OSSIM_MGRS string from its component parts */
+{ /* Make_OSSIM_MGRS_String */
+  int i;
+  int j;
+  int error_code = OSSIM_MGRS_NO_ERROR;
+  double divisor;
+  long int east;  /* double data type? (drb) */
+  long int north; /* double data type? (drb) */
+  i = 0;
+  if (Zone)
+    i = sprintf (OSSIM_MGRS+i,"%2.2ld",Zone);
+  for (j=0;j<3;j++)
+    OSSIM_MGRS[i++] = ALBET[ltrnum[j]];
+  divisor = pow (10.0, (5 - Precision));
+  Easting = fmod (Easting, 100000.0);
+  if (Easting >= 99999.5)
+    Easting = 99999.0;
+  east = (long int)(Easting/divisor);
+  i += sprintf (OSSIM_MGRS+i, "%*.*ld", (int)Precision, (int)Precision, east);
+  Northing = fmod (Northing, 100000.0);
+  if (Northing >= 99999.5)
+    Northing = 99999.0;
+  north = (long int)(Northing/divisor);
+  i += sprintf (OSSIM_MGRS+i, "%*.*ld", (int)Precision, (int)Precision, north);
+  return (error_code);
+} /* Make_OSSIM_MGRS_String */
+
+
+long Break_OSSIM_MGRS_String (const char* OSSIM_MGRS,
+                        long* Zone,
+                        long Letters[OSSIM_MGRS_LETTERS],
+                        double* Easting,
+                        double* Northing,
+                        long* Precision)
+/* Break down an OSSIM_MGRS string into its component parts */
+{ /* Break_OSSIM_MGRS_String */
+  long error_code = OSSIM_MGRS_NO_ERROR;
+  long i = 0;
+  long j;
+  long num_digits;
+  long num_letters;
+  while (OSSIM_MGRS[i] == ' ')
+    i++;  /* skip any leading blanks */
+  j = i;
+  while (isdigit(OSSIM_MGRS[i]))
+    i++;
+  num_digits = i - j;
+  if (num_digits <= 2)
+    if (num_digits > 0)
+    {
+      char zone_string[3];
+      /* get zone */
+      strncpy (zone_string, OSSIM_MGRS+j, 2);
+      zone_string[2] = 0;
+      sscanf (zone_string, "%ld", Zone);  
+      if ((*Zone < 1) || (*Zone > 60))
+        error_code |= OSSIM_MGRS_STRING_ERROR;
+    }
+    else
+      *Zone = 0;
+  else
+    error_code |= OSSIM_MGRS_STRING_ERROR;
+  j = i;
+  while (isalpha(OSSIM_MGRS[i]))
+    i++;
+  num_letters = i - j;
+  if (num_letters == 3)
+  {
+    /* get letters */
+    Letters[0] = (toupper(OSSIM_MGRS[j]) - (long)'A');
+    if ((Letters[0] == LETTER_I) || (Letters[0] == LETTER_O))
+      error_code |= OSSIM_MGRS_STRING_ERROR;
+    Letters[1] = (toupper(OSSIM_MGRS[j+1]) - (long)'A');
+    if ((Letters[1] == LETTER_I) || (Letters[1] == LETTER_O))
+      error_code |= OSSIM_MGRS_STRING_ERROR;
+    Letters[2] = (toupper(OSSIM_MGRS[j+2]) - (long)'A');
+    if ((Letters[2] == LETTER_I) || (Letters[2] == LETTER_O))
+      error_code |= OSSIM_MGRS_STRING_ERROR;
+  }
+  else
+    error_code |= OSSIM_MGRS_STRING_ERROR;
+  j = i;
+  while (isdigit(OSSIM_MGRS[i]))
+    i++;
+  num_digits = i - j;
+  if ((num_digits <= 10) && (num_digits%2 == 0))
+  {
+    long n;
+    char east_string[6];
+    char north_string[6];
+    long east;
+    long north;
+    double multiplier;
+    /* get easting & northing */
+    n = num_digits/2;
+    *Precision = n;
+    if (n > 0)
+    {
+      strncpy (east_string, OSSIM_MGRS+j, n);
+      east_string[n] = 0;
+      sscanf (east_string, "%ld", &east);
+      strncpy (north_string, OSSIM_MGRS+j+n, n);
+      north_string[n] = 0;
+      sscanf (north_string, "%ld", &north);
+      multiplier = pow (10.0, 5 - n);
+      *Easting = east * multiplier;
+      *Northing = north * multiplier;
+    }
+    else
+    {
+      *Easting = 0.0;
+      *Northing = 0.0;
+    }
+  }
+  else
+    error_code |= OSSIM_MGRS_STRING_ERROR;
+  return (error_code);
+} /* Break_OSSIM_MGRS_String */
+
+
+long Set_OSSIM_MGRS_Parameters (double a,
+                          double f,
+                          const char* Ellipsoid_Code)
+/*
+ * The function SET_OSSIM_MGRS_PARAMETERS receives the ellipsoid parameters and sets
+ * the corresponding state variables. If any errors occur, the error code(s)
+ * are returned by the function, otherwise OSSIM_MGRS_NO_ERROR is returned.
+ *
+ *   a                : Semi-major axis of ellipsoid in meters  (input)
+ *   f                : Flattening of ellipsoid                 (input)
+ *   Ellipsoid_Code   : 2-letter code for ellipsoid             (input)
+ */
+{ /* Set_OSSIM_MGRS_Parameters  */
+
+  double inv_f = 1 / f;
+  long Error_Code = OSSIM_MGRS_NO_ERROR;
+
+  if (a <= 0.0)
+  { /* Semi-major axis must be greater than zero */
+    Error_Code |= OSSIM_MGRS_A_ERROR;
+  }
+  if ((inv_f < 250) || (inv_f > 350))
+  { /* Inverse flattening must be between 250 and 350 */
+    Error_Code |= OSSIM_MGRS_INV_F_ERROR;
+  }
+  if (!Error_Code)
+  { /* no errors */
+    OSSIM_MGRS_a = a;
+    OSSIM_MGRS_f = f;
+    OSSIM_MGRS_recpf = inv_f;
+    strcpy (OSSIM_MGRS_Ellipsoid_Code, Ellipsoid_Code);
+  }
+  return (Error_Code);
+}  /* Set_OSSIM_MGRS_Parameters  */
+
+
+
+void Get_OSSIM_MGRS_Parameters (double *a,
+                          double *f,
+                          char* Ellipsoid_Code)
+/*
+ * The function Get_OSSIM_MGRS_Parameters returns the current ellipsoid
+ * parameters.
+ *
+ *  a                : Semi-major axis of ellipsoid, in meters (output)
+ *  f                : Flattening of ellipsoid					       (output)
+ *  Ellipsoid_Code   : 2-letter code for ellipsoid             (output)
+ */
+{ /* Get_OSSIM_MGRS_Parameters */
+  *a = OSSIM_MGRS_a;
+  *f = OSSIM_MGRS_f;
+  strcpy (Ellipsoid_Code, OSSIM_MGRS_Ellipsoid_Code);
+  return;
+} /* Get_OSSIM_MGRS_Parameters */
+
+
+long Convert_Geodetic_To_OSSIM_MGRS (double Latitude,
+                               double Longitude,
+                               long Precision,
+                               char* OSSIM_MGRS)
+/*
+ *    Latitude   : Latitude in radians              (input)
+ *    Longitude  : Longitude in radians             (input)
+ *    OSSIM_MGRS       : OSSIM_MGRS coordinate string           (output)
+ *  
+ */
+{ /* Convert_Geodetic_To_OSSIM_MGRS */
+  long error_code = OSSIM_MGRS_NO_ERROR;
+  long zone;
+  char hemisphere;
+  double easting;
+  double northing;
+  if ((Latitude < -PI_OVER_2) || (Latitude > PI_OVER_2))
+  { /* Latitude out of range */
+    error_code |= OSSIM_MGRS_LAT_ERROR;
+  }
+  if ((Longitude < -PI) || (Longitude > (2*PI)))
+  { /* Longitude out of range */
+    error_code |= OSSIM_MGRS_LON_ERROR;
+  }
+  if ((Precision < 0) || (Precision > MAX_PRECISION))
+    error_code |= OSSIM_MGRS_PRECISION_ERROR;
+  if (!error_code)
+  {
+    if ((Latitude < MIN_UTM_LAT) || (Latitude > MAX_UTM_LAT))
+    {
+      Set_UPS_Parameters (OSSIM_MGRS_a, OSSIM_MGRS_f);
+      error_code |= Convert_Geodetic_To_UPS (Latitude, Longitude, &hemisphere, &easting, &northing);
+      error_code |= Convert_UPS_To_OSSIM_MGRS (hemisphere, easting, northing, Precision, OSSIM_MGRS);
+    }
+    else
+    {
+      Set_UTM_Parameters (OSSIM_MGRS_a, OSSIM_MGRS_f, 0);
+      error_code |= Convert_Geodetic_To_UTM (Latitude, Longitude, &zone, &hemisphere, &easting, &northing);
+      error_code |= Convert_UTM_To_OSSIM_MGRS (zone, hemisphere, easting, northing, Precision, OSSIM_MGRS);
+    }
+  }
+  return (error_code);
+} /* Convert_Geodetic_To_OSSIM_MGRS */
+
+
+long Convert_OSSIM_MGRS_To_Geodetic (const char* OSSIM_MGRS, 
+                               double *Latitude, 
+                               double *Longitude)
+/*
+ *    OSSIM_MGRS       : OSSIM_MGRS coordinate string           (output)
+ *    Latitude   : Latitude in radians              (input)
+ *    Longitude  : Longitude in radians             (input)
+ *  
+ */
+{ /* Convert_OSSIM_MGRS_To_Geodetic */
+  long error_code = OSSIM_MGRS_NO_ERROR;
+  long Zone;
+  long Letters[OSSIM_MGRS_LETTERS];
+  char Hemisphere;
+  double Easting;
+  double Northing;
+  long In_Precision;
+  error_code = Break_OSSIM_MGRS_String (OSSIM_MGRS, &Zone, Letters, &Easting, &Northing, &In_Precision);
+  if (!error_code)
+  {
+     if (Zone)
+     {
+        error_code |= Convert_OSSIM_MGRS_To_UTM (OSSIM_MGRS, &Zone, &Hemisphere, &Easting, &Northing);
+        Set_UTM_Parameters (OSSIM_MGRS_a, OSSIM_MGRS_f, 0);
+        error_code |= Convert_UTM_To_Geodetic (Zone, Hemisphere, Easting, Northing, Latitude, Longitude);
+     }
+     else
+     {
+        error_code |= Convert_OSSIM_MGRS_To_UPS (OSSIM_MGRS, &Hemisphere, &Easting, &Northing);
+        Set_UPS_Parameters (OSSIM_MGRS_a, OSSIM_MGRS_f);
+        error_code |= Convert_UPS_To_Geodetic (Hemisphere, Easting, Northing, Latitude, Longitude);
+     }
+  }
+  return (error_code);
+} /* END OF Convert_OSSIM_MGRS_To_Geodetic */
+
+
+
+long Convert_UTM_To_OSSIM_MGRS (long Zone,
+                          char Hemisphere,
+                          double Easting,
+                          double Northing,
+                          long Precision,
+                          char* OSSIM_MGRS)
+/*
+ * The function Convert_UTM_To_OSSIM_MGRS converts UTM (zone, easting, and
+ * northing) coordinates to an OSSIM_MGRS coordinate string, according to the 
+ * current ellipsoid parameters.  If any errors occur, the error code(s) 
+ * are returned by the  function, otherwise OSSIM_MGRS_NO_ERROR is returned.
+ *
+ *    Zone       : UTM zone                         (input)
+ *    Hemisphere : North or South hemisphere        (input)
+ *    Easting    : Easting (X) in meters            (input)
+ *    Northing   : Northing (Y) in meters           (input)
+ *    Precision  : Precision level of OSSIM_MGRS string   (input)
+ *    OSSIM_MGRS       : OSSIM_MGRS coordinate string           (output)
+ */
+{ /* Convert_UTM_To_OSSIM_MGRS */
+  long error_code = OSSIM_MGRS_NO_ERROR;
+  long temp_error = OSSIM_MGRS_NO_ERROR;
+  long Letters[OSSIM_MGRS_LETTERS]; /* Number location of 3 letters in alphabet   */
+  double Latitude;           /* Latitude of UTM point */
+  double Longitude;          /* Longitude of UTM point */
+  double divisor;
+  if ((Zone < 1) || (Zone > 60))
+    error_code |= OSSIM_MGRS_ZONE_ERROR;
+  if ((Hemisphere != 'S') && (Hemisphere != 'N'))
+    error_code |= OSSIM_MGRS_HEMISPHERE_ERROR;
+  if ((Easting < MIN_EASTING) || (Easting > MAX_EASTING))
+    error_code |= OSSIM_MGRS_EASTING_ERROR;
+  if ((Northing < MIN_NORTHING) || (Northing > MAX_NORTHING))
+    error_code |= OSSIM_MGRS_NORTHING_ERROR;
+  if ((Precision < 0) || (Precision > MAX_PRECISION))
+    error_code |= OSSIM_MGRS_PRECISION_ERROR;
+  if (!error_code)
+  {
+    Set_UTM_Parameters (OSSIM_MGRS_a, OSSIM_MGRS_f,0);
+    temp_error = Convert_UTM_To_Geodetic (Zone, Hemisphere, Easting, Northing, &Latitude, &Longitude);
+	if (temp_error & UTM_NORTHING_ERROR)
+		error_code |= OSSIM_MGRS_NORTHING_ERROR;
+	else
+	{
+	  /* Round easting and northing values */
+	  divisor = pow (10.0, (5 - Precision));
+	  Easting = Round_OSSIM_MGRS (Easting/divisor) * divisor;
+	  Northing = Round_OSSIM_MGRS (Northing/divisor) * divisor;
+	  UTMOSSIM_MGRS (Zone, Letters, Latitude, Easting, Northing);
+	  /* UTM checks - these should be done in UTMOSSIM_MGRS */
+	  if ((Zone == 31) && (Letters[0] == LETTER_V))
+	    if (Easting > 500000)
+		  Easting = 500000;
+	  if (Northing > 10000000)
+	    Northing = 10000000;
+	  Make_OSSIM_MGRS_String (OSSIM_MGRS, Zone, Letters, Easting, Northing, Precision);
+	}
+  }
+  return (error_code);
+} /* Convert_UTM_To_OSSIM_MGRS */
+
+
+long Convert_OSSIM_MGRS_To_UTM (const char   *OSSIM_MGRS,
+                          long   *Zone,
+                          char   *Hemisphere,
+                          double *Easting,
+                          double *Northing)
+/*
+ * The function Convert_OSSIM_MGRS_To_UTM converts an OSSIM_MGRS coordinate string
+ * to UTM projection (zone, hemisphere, easting and northing) coordinates 
+ * according to the current ellipsoid parameters.  If any errors occur, 
+ * the error code(s) are returned by the function, otherwise UTM_NO_ERROR 
+ * is returned.
+ *
+ *    OSSIM_MGRS       : OSSIM_MGRS coordinate string           (input)
+ *    Zone       : UTM zone                         (output)
+ *    Hemisphere : North or South hemisphere        (output)
+ *    Easting    : Easting (X) in meters            (output)
+ *    Northing   : Northing (Y) in meters           (output)
+ */
+{ /* Convert_OSSIM_MGRS_To_UTM */
+  long error_code = OSSIM_MGRS_NO_ERROR;
+  long Letters[OSSIM_MGRS_LETTERS];
+  long In_Precision;
+  long Error = 0;
+  error_code = Break_OSSIM_MGRS_String (OSSIM_MGRS, Zone, Letters, Easting, Northing, &In_Precision);
+  if (!*Zone)
+    error_code |= OSSIM_MGRS_STRING_ERROR;
+  if (!error_code)
+  {
+    GRID_UTM (Zone, Letters, Hemisphere, Easting, Northing, In_Precision, &Error);
+    if (Error)
+      error_code = OSSIM_MGRS_STRING_ERROR;
+  }
+  return (error_code);
+} /* Convert_OSSIM_MGRS_To_UTM */
+
+
+long Convert_UPS_To_OSSIM_MGRS (char   Hemisphere,
+                          double Easting,
+                          double Northing,
+                          long   Precision,
+                          char*  OSSIM_MGRS)
+/*
+ *  The function Convert_UPS_To_OSSIM_MGRS converts UPS (hemisphere, easting, 
+ *  and northing) coordinates to an OSSIM_MGRS coordinate string according to 
+ *  the current ellipsoid parameters.  If any errors occur, the error
+ *  code(s) are returned by the function, otherwise UPS_NO_ERROR is 
+ *  returned.
+ *
+ *    Hemisphere    : Hemisphere either 'N' or 'S'     (input)
+ *    Easting       : Easting/X in meters              (input)
+ *    Northing      : Northing/Y in meters             (input)
+ *    Precision     : Precision level of OSSIM_MGRS string   (input)
+ *    OSSIM_MGRS          : OSSIM_MGRS coordinate string           (output)
+ */
+{ /* Convert_UPS_To_OSSIM_MGRS */
+  double divisor;
+  long error_code = OSSIM_MGRS_NO_ERROR;
+  long ltrnum[OSSIM_MGRS_LETTERS]; /* Number location of 3 letters in alphabet   */
+  if ((Hemisphere != 'N') && (Hemisphere != 'S'))
+    error_code |= OSSIM_MGRS_HEMISPHERE_ERROR;
+  if ((Easting < MIN_EAST_NORTH) || (Easting > MAX_EAST_NORTH))
+    error_code |= OSSIM_MGRS_EASTING_ERROR;
+  if ((Northing < MIN_EAST_NORTH) || (Northing > MAX_EAST_NORTH))
+    error_code |= OSSIM_MGRS_NORTHING_ERROR;
+  if ((Precision < 0) || (Precision > MAX_PRECISION))
+    error_code |= OSSIM_MGRS_PRECISION_ERROR;
+  if (!error_code)
+  {
+    divisor = pow (10.0, (5 - Precision));
+    Easting = Round_OSSIM_MGRS (Easting/divisor) * divisor;
+    Northing = Round_OSSIM_MGRS (Northing/divisor) * divisor;
+    if (Hemisphere == 'S')
+      UPS (OSSIM_MGRS, ltrnum, Easting, Northing, UPS_SOUTH);
+    else
+      UPS (OSSIM_MGRS, ltrnum, Easting, Northing, UPS_NORTH);
+    Make_OSSIM_MGRS_String (OSSIM_MGRS, 0, ltrnum, Easting, Northing, Precision);
+  }
+  return (error_code);
+} /* Convert_UPS_To_OSSIM_MGRS */
+
+
+long Convert_OSSIM_MGRS_To_UPS ( const char   *OSSIM_MGRS,
+                           char   *Hemisphere,
+                           double *Easting,
+                           double *Northing)
+/*
+ *  The function Convert_OSSIM_MGRS_To_UPS converts an OSSIM_MGRS coordinate string
+ *  to UPS (hemisphere, easting, and northing) coordinates, according 
+ *  to the current ellipsoid parameters. If any errors occur, the error 
+ *  code(s) are returned by the function, otherwide UPS_NO_ERROR is returned.
+ *
+ *    OSSIM_MGRS          : OSSIM_MGRS coordinate string           (input)
+ *    Hemisphere    : Hemisphere either 'N' or 'S'     (output)
+ *    Easting       : Easting/X in meters              (output)
+ *    Northing      : Northing/Y in meters             (output)
+ */
+{ /* Convert_OSSIM_MGRS_To_UPS */
+  long error_code = OSSIM_MGRS_NO_ERROR;
+  long Error = 0;
+  long Zone;
+  long Letters[OSSIM_MGRS_LETTERS];
+  long In_Precision;
+  error_code = Break_OSSIM_MGRS_String (OSSIM_MGRS, &Zone, Letters, Easting, Northing, &In_Precision);
+  if (Zone)
+    error_code |= OSSIM_MGRS_STRING_ERROR;
+  if (!error_code)
+  {
+    GRID_UPS (Letters, Hemisphere, Easting, Northing, &Error);
+    if (Error)
+      error_code = OSSIM_MGRS_STRING_ERROR;
+  }
+  return (error_code);
+} /* Convert_OSSIM_MGRS_To_UPS */
+
+
diff --git a/src/ossim/projection/ossimMillerProjection.cpp b/ossim/src/ossim/projection/ossimMillerProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimMillerProjection.cpp
rename to ossim/src/ossim/projection/ossimMillerProjection.cpp
diff --git a/src/ossim/projection/ossimMiscProjectionFactory.cpp b/ossim/src/ossim/projection/ossimMiscProjectionFactory.cpp
similarity index 100%
rename from src/ossim/projection/ossimMiscProjectionFactory.cpp
rename to ossim/src/ossim/projection/ossimMiscProjectionFactory.cpp
diff --git a/src/ossim/projection/ossimMollweidProjection.cpp b/ossim/src/ossim/projection/ossimMollweidProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimMollweidProjection.cpp
rename to ossim/src/ossim/projection/ossimMollweidProjection.cpp
diff --git a/src/ossim/projection/ossimNewZealandMapGridProjection.cpp b/ossim/src/ossim/projection/ossimNewZealandMapGridProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimNewZealandMapGridProjection.cpp
rename to ossim/src/ossim/projection/ossimNewZealandMapGridProjection.cpp
diff --git a/ossim/src/ossim/projection/ossimNgaProjectionFactory.cpp b/ossim/src/ossim/projection/ossimNgaProjectionFactory.cpp
new file mode 100644
index 0000000..a582993
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimNgaProjectionFactory.cpp
@@ -0,0 +1,87 @@
+//*******************************************************************
+// Copyright (C) 2014 RadiantBlue, Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+//*******************************************************************
+//  $Id$
+
+#include <ossim/projection/ossimNgaProjectionFactory.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/projection/ossimMercatorProjection.h>
+
+// Define Trace flags for use within this file:
+#include <ossim/base/ossimTrace.h>
+static ossimTrace traceDebug = ossimTrace("ossimNgaProjectionFactory:debug");
+
+RTTI_DEF1(ossimNgaProjectionFactory, "ossimNgaProjectionFactory",
+      ossimProjectionFactoryBase);
+
+//*************************************************************************************************
+//! Implements singleton pattern
+//*************************************************************************************************
+ossimNgaProjectionFactory* ossimNgaProjectionFactory::instance()
+{
+   static ossimNgaProjectionFactory inst;
+
+   return &inst;
+}
+
+ossimProjection* ossimNgaProjectionFactory::createProjection(const ossimFilename& filename,
+      ossim_uint32 entryIdx) const
+      {
+   // Check for external geometry file.
+   return createProjectionFromGeometryFile(filename, entryIdx);
+}
+
+//**************************************************************************************************
+// This is the principal factory method. It accepts a string in format:
+//
+//   <group>:<code>, for example "NGA:235" (Currently only code supported, used in GeoPackage)
+//
+// IMPORTANT NOTE: Image tie-points cannot be conveyed by a projection code. The projection
+// created here will not be fully initialized for use in rendering imagery.
+//**************************************************************************************************
+ossimProjection* ossimNgaProjectionFactory::createProjection(const ossimString& spec) const
+
+{
+   ossimProjection* proj = 0;
+   if ((!ossimString(spec).downcase().contains("nga")) && (spec.after(":").toInt() == 235))
+   {
+      const ossimEllipsoid* e = ossimEllipsoidFactory::instance()->create("WE");
+      proj = new ossimMercatorProjection(*e, ossimGpt(0,0), 0, 0, 0.857385503731176);
+   }
+
+   return proj;
+}
+
+/**
+ * Take a keywordlist.
+ */
+ossimProjection* ossimNgaProjectionFactory::createProjection(
+   const ossimKeywordlist& /* kwl */, const char* /* prefix */) const
+{
+   return 0;
+}
+
+ossimObject* ossimNgaProjectionFactory::createObject(
+      const ossimString& typeName) const
+{
+   return createProjection(typeName);
+}
+
+ossimObject* ossimNgaProjectionFactory::createObject(const ossimKeywordlist& kwl,
+      const char* prefix) const
+{
+   return createProjection(kwl, prefix);
+}
+
+void ossimNgaProjectionFactory::getTypeNameList(std::vector<ossimString>& typeList) const
+{
+    typeList.push_back(ossimString("NGA:235 \"Scaled World Mercator\""));
+}
+
diff --git a/src/ossim/projection/ossimNitfMapModel.cpp b/ossim/src/ossim/projection/ossimNitfMapModel.cpp
similarity index 100%
rename from src/ossim/projection/ossimNitfMapModel.cpp
rename to ossim/src/ossim/projection/ossimNitfMapModel.cpp
diff --git a/ossim/src/ossim/projection/ossimNitfProjectionFactory.cpp b/ossim/src/ossim/projection/ossimNitfProjectionFactory.cpp
new file mode 100644
index 0000000..70aea03
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimNitfProjectionFactory.cpp
@@ -0,0 +1,987 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Matt Revelle
+//          David Burken
+//
+// Description:
+//
+// Contains class definition for ossimNitfProjectionFactory.
+//
+// $Id: ossimNitfProjectionFactory.cpp 22848 2014-07-31 18:29:02Z dburken $
+//----------------------------------------------------------------------------
+
+#include <ossim/projection/ossimNitfProjectionFactory.h>
+#include <ossim/base/ossimDms.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/imaging/ossimNitfTileSource.h>
+#include <ossim/projection/ossimBilinearProjection.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/projection/ossimMgrs.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/projection/ossimUtmProjection.h>
+#include <ossim/support_data/ossimNitfBlockaTag.h>
+#include <ossim/support_data/ossimNitfFile.h>
+#include <ossim/support_data/ossimNitfFileHeader.h>
+#include <ossim/support_data/ossimNitfImageHeader.h>
+#include <fstream>
+#include <cmath>
+
+// Define Trace flags for use within this file:
+static ossimTrace traceDebug(ossimString("ossimNitfProjectionFactory:debug"));
+
+ossimNitfProjectionFactory* ossimNitfProjectionFactory::theInstance = 0;
+
+ossimNitfProjectionFactory::ossimNitfProjectionFactory()
+{
+}
+
+ossimNitfProjectionFactory::~ossimNitfProjectionFactory()
+{
+}
+
+ossimNitfProjectionFactory* ossimNitfProjectionFactory::instance()
+{
+   if(!theInstance)
+   {
+      theInstance = new ossimNitfProjectionFactory();
+   }
+
+   return theInstance;
+}
+
+ossimProjection*
+ossimNitfProjectionFactory::createProjection(const ossimFilename& filename,
+                                             ossim_uint32 entryIdx)const
+{
+   static const char MODULE[]="ossimNitfProjectionFactory::createProjection";
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " DEBUG:"
+         << "\nfilename:  " << filename
+         << "\nentryIdx:  " << entryIdx
+         << std::endl;
+   }
+
+   // See if there is an external geomtry.
+   ossimProjection* result = createProjectionFromGeometryFile(filename, entryIdx);
+   if (result)
+   {
+      return result;
+   }
+
+   if(!isNitf(filename))
+   {
+      return result; // result is NULL
+   }
+
+   ossimRefPtr<ossimNitfFile> nitf = new ossimNitfFile();
+   if (!nitf->parseFile(filename))
+   {
+      return result; // result is NULL
+   }
+
+   long imageIndex = static_cast<long>(entryIdx);
+   if ( imageIndex > (nitf->getHeader()->getNumberOfImages()-1) )
+   {
+      return result;
+   }
+
+   ossimRefPtr<ossimNitfImageHeader> imageHeader = nitf->getNewImageHeader(imageIndex);
+   {
+      if (!imageHeader)
+      {
+         return result;
+      }
+   }
+
+   result = createProjectionFromHeaders(nitf->getHeader(),
+                                        imageHeader.get());
+   if (traceDebug())
+   {
+      ossimString coordinateSystem   = imageHeader->getCoordinateSystem();
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " DEBUG:"
+         << "\ncoordinateSysetm:       " << coordinateSystem
+         << std::endl;
+   }
+
+   return result;
+}
+
+
+ossimProjection*
+ossimNitfProjectionFactory::createProjection(const ossimKeywordlist& /* kwl */,
+                                             const char* /* prefix */) const
+{
+   return 0;
+}
+
+ossimProjection*
+ossimNitfProjectionFactory::createProjection(const ossimString& /* name */) const
+{
+   return 0;
+}
+
+ossimObject*
+ossimNitfProjectionFactory::createObject(const ossimString& typeName)const
+{
+   return (ossimObject*)createProjection(typeName);
+}
+
+ossimObject*
+ossimNitfProjectionFactory::createObject(const ossimKeywordlist& kwl,
+                                         const char* prefix)const
+{
+   return createProjection(kwl, prefix);
+}
+
+void ossimNitfProjectionFactory::getTypeNameList(std::vector<ossimString>& /* typeList */)const
+{
+   
+}
+
+ossimProjection* ossimNitfProjectionFactory::createProjection(ossimImageHandler* handler)const
+{
+   ossimNitfTileSource* nitfTileSource = dynamic_cast<ossimNitfTileSource*> (handler);
+   ossimProjection* result = 0;
+   if(nitfTileSource)
+   {
+      if(!result)
+      {
+         ossimNitfImageHeader* imageHeader = nitfTileSource->getCurrentImageHeader();
+         if(imageHeader)
+         {
+            result = createProjectionFromHeaders(nitfTileSource->getFileHeader(),imageHeader);
+         }
+      }
+   }
+   else if(isNitf(handler->getFilename()))
+   {
+      result =  createProjection(handler->getFilename(), handler->getCurrentEntry());
+   }
+   return result;
+}
+
+bool ossimNitfProjectionFactory::isNitf(const ossimFilename& filename)const
+{
+   std::ifstream in(filename.c_str(), ios::in|ios::binary);
+   
+   if(in)
+   {
+      char nitfFile[4];
+      in.read((char*)nitfFile, 4);
+      ossimString s(nitfFile, nitfFile+4);
+      if ( (s == "NITF") || (s == "NSIF") )
+      {
+         return true;
+      }
+   }
+
+   return false;
+}
+
+ossimProjection* ossimNitfProjectionFactory::createProjectionFromHeaders(
+   ossimNitfFileHeader* fileHeader, ossimNitfImageHeader* imageHeader)const
+{
+   ossimProjection* result = 0;
+   ossimString version = fileHeader->getVersion();
+   ossimString coordinateSystem = imageHeader->getCoordinateSystem();
+
+   // Note in version 2.0 ICORDS with 'N' == NONE.  In 2.1 it is UTM North:
+   if (coordinateSystem == "G" || coordinateSystem == "D")
+   {
+      result = makeGeographic(imageHeader, coordinateSystem);
+   }
+   else if( (coordinateSystem == "S") || (coordinateSystem == "U") || 
+            ( version != "02.00" && (coordinateSystem == "N") ) )
+   {
+      result = makeUtm(imageHeader, coordinateSystem);
+   }
+   return result;
+}
+
+ossimProjection* ossimNitfProjectionFactory::makeGeographic(
+   const ossimNitfImageHeader* hdr,
+   const ossimString& coordinateSysetm) const
+{
+   ossimProjection* proj = 0;
+
+   if (hdr)
+   {
+      // To hold corner points.
+      std::vector<ossimGpt> gpts;
+      
+      //---
+      // Get the corner points.
+      // 
+      // Look for points from the BLOCKA tag.  This may or may not be present.
+      // If present since it has six digit precision use it for the points.
+      //---
+      if ( getBlockaPoints(hdr, gpts) == false )
+      {
+         ossimString geographicLocation = hdr->getGeographicLocation();
+
+         if ( geographicLocation.size() )
+         {
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << "ossimNitfProjectionFactory::makeGeographic DEBUG:"
+                  << "\ngeographicLocation: " << geographicLocation
+                  << std::endl;
+            }
+            
+            if (coordinateSysetm == "G")
+            {
+               //---
+               // If coord system is G then format is:
+               // Lat = ddmmssX
+               //       where d is degrees and m is minutes
+               //       and s is seconds and X is either N (North) or S (South).
+               // Lon = dddmmssX
+               //       where d is degrees and m is minutes
+               //       and s is seconds and X is either N (North) or S (South).
+               //---
+               parseGeographicString(geographicLocation, gpts);
+            }
+            else if (coordinateSysetm == "D")
+            {
+               //---
+               // If coor system is D then format is:
+               // +-dd.ddd +-dd.ddd four times where + is northern hemispher and
+               // - is souther hemisphere for lat and longitude
+               // + is easting and - is westing.
+               //---
+               parseDecimalDegreesString(geographicLocation, gpts);
+            }
+            
+         } // matches: if ( geographicLocation.size() )
+         
+      } // matches: if ( getBlockaPoints(hdr, gpts) == false )
+         
+      if (gpts.size() == 4)
+      {   
+         ossimDpt scaleTest;
+         computeScaleInDecimalDegrees(hdr, gpts, scaleTest);
+
+         if (!isSkewed(gpts)&&(ossim::abs(scaleTest.y/scaleTest.x) <= 1.0))
+         {
+            proj = makeEuiDistant(hdr, gpts);
+         }
+         else
+         {
+            // Image is rotated.  Make a Bilinear.
+            proj = makeBilinear(hdr, gpts);
+         }
+      }
+
+      if (traceDebug() && proj)
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfProjectionFactory::makeGeographic DEBUG:"
+            << "\nUpper left corner:   " << gpts[0]
+            << "\nUpper right corner:  " << gpts[1]
+            << "\nLower right corner:  " << gpts[2]
+            << "\nLower left corner:   " << gpts[3] << "\n";
+         proj->print( ossimNotify(ossimNotifyLevel_DEBUG));
+      }
+      
+   } // matches: if (hdr)
+
+   return proj;
+}
+
+ossimProjection* ossimNitfProjectionFactory::makeUtm(
+   const ossimNitfImageHeader* hdr,
+   const ossimString& coordinateSystem) const
+{
+   ossimProjection* proj = 0;
+   if (hdr)
+   {
+      ossimString geographicLocation = hdr->getGeographicLocation();
+
+      if ( geographicLocation.size() )
+      {
+         std::vector<ossimDpt> utmPoints;
+         ossim_uint32 zone;
+         ossimDpt scale;
+         char hemisphere = 'N';
+         
+         bool status = true;
+         if ( coordinateSystem == "U")
+         {
+            // Sets zone, hemisphere and utmPoints. Returns true on success.
+            status = parseMgrsString(geographicLocation, zone, hemisphere, utmPoints);
+         }
+         else
+         {
+            // Sets zone and utmPoints.  Void return...
+            parseUtmString(geographicLocation, zone, utmPoints);
+            if(coordinateSystem == "S")
+            {
+               hemisphere = 'S';
+            }
+         }
+         
+         if ( status )
+         {
+            if ( traceDebug() )
+            {
+               std::string s;
+               s.push_back(hemisphere);
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << "ossimNitfProjectionFactory::makeUtm DEBUG"
+                  << "\ngeo string: " << geographicLocation
+                  << "\nutm zone:   " << zone
+                  << "\nhemisphere: " << hemisphere
+                  << std::endl;
+               for (ossim_uint32 i=0; i<utmPoints.size(); ++i)
+               {
+                  ossimNotify(ossimNotifyLevel_DEBUG)
+                     << "utmPoints[" << utmPoints[i] << std::endl;
+               }
+            }
+            
+            ossimRefPtr<ossimUtmProjection> uproj = new ossimUtmProjection;
+            uproj->setHemisphere(hemisphere);
+            uproj->setZone(zone);
+            
+            if(isSkewed(utmPoints))
+            {
+               std::vector<ossimGpt> gpts;
+               
+               // Try blocka points first as they are more accurate.
+               if ( getBlockaPoints(hdr, gpts) == false )
+               {
+                  ossimGpt ul = uproj->inverse(utmPoints[0]);
+                  ossimGpt ur = uproj->inverse(utmPoints[1]);
+                  ossimGpt lr = uproj->inverse(utmPoints[2]);
+                  ossimGpt ll = uproj->inverse(utmPoints[3]);
+                  gpts.push_back(ul);
+                  gpts.push_back(ur);
+                  gpts.push_back(lr);
+                  gpts.push_back(ll);
+               }
+
+               //---
+               // Make a bilinear either from our skewed utm points or the points from the blocka
+               // tag.
+               //---
+               proj = makeBilinear(hdr, gpts);
+               
+               uproj = 0; // Done with utm projeciton
+               
+            }
+            else
+            {
+               computeScaleInMeters(hdr, utmPoints, scale);
+               
+               //---
+               // Assign our projection to the return "proj".
+               // Use ossimRefPtr::release the so we don't delete proj when uproj
+               // goes out of scope.
+               //---
+               proj = uproj.release(); 
+            }
+            
+            if( scale.hasNans() == false )
+            {
+               //---
+               // Get the tie point.
+               // 
+               // Look for the the BLOCKA tag which may or may not be present.
+               // This has six digit precision in decimal degrees which equates to
+               // about 0.11 meters (at equator) as compared to 1.0 accuaracy of the
+               // IGEOLO field.
+               //---
+               ossimDpt tie;
+               std::vector<ossimGpt> gpts;
+               if ( getBlockaPoints(hdr, gpts) )
+               {
+                  if (traceDebug())
+                  {
+                     ossimNotify(ossimNotifyLevel_DEBUG)
+                        << "ossimNitfProjectionFactory::makeUtm DEBUG:"
+                        << "\nTie point from blocka: " << gpts[0]
+                        << endl;
+                  }
+                  
+                  tie = proj->forward(gpts[0]);
+                  tie.x += scale.x/2.0;
+                  tie.y -= scale.y/2.0;
+               }
+               else
+               {
+                  tie.x = utmPoints[0].x + scale.x/2.0;
+                  tie.y = utmPoints[0].y - scale.y/2.0;
+               }
+               
+               if (traceDebug())
+               {
+                  ossimNotify(ossimNotifyLevel_DEBUG)
+                     << "ossimNitfProjectionFactory::makeUtm DEBUG:"
+                     << "\nTie point: " << tie
+                     << "\nScale:     " << scale
+                     << endl;
+               }
+               
+               // Set the tie and scale.
+               ossimMapProjection* mproj = dynamic_cast<ossimMapProjection*>(proj);
+               if ( mproj )
+               {
+                  mproj->setUlEastingNorthing(tie);
+                  mproj->setMetersPerPixel(scale);
+               }
+               else // cannot cast
+               {
+                  if ( proj )
+                  {
+                     delete proj;
+                     proj = 0;
+                  }
+               }
+            }
+            else // Scale has nans
+            {
+               if ( proj )
+               {
+                  delete proj;
+                  proj = 0;
+               }
+            }
+            
+         } // matches: if (status)
+
+      } // matches:  if ( geographicLocation.size() )
+         
+   } // matches: if (hdr)
+   
+   return proj;
+}
+
+bool ossimNitfProjectionFactory::parseMgrsString(const ossimString& mgrsLocationString,
+                                                 ossim_uint32& zone,
+                                                 char& hemisphere,
+                                                 std::vector<ossimDpt>& utmPoints)const
+{
+   bool result = false; // Start false.
+   
+   //---
+   // From spec:
+   // UTM expressed in MGRS use the format zzBJKeeeeennnnn (15 characters).
+   // Assumption Zone and hemisphere same for all corners.
+   //---
+   if ( mgrsLocationString.size() >= 60 )
+   {
+      // Split the location string into four separate ones.
+      std::vector<std::string> mgrsStr(4); // Corner strings.
+      mgrsStr[0] = mgrsLocationString.substr(0, 15);
+      mgrsStr[1] = mgrsLocationString.substr(15, 15);
+      mgrsStr[2] = mgrsLocationString.substr(30, 15);
+      mgrsStr[3] = mgrsLocationString.substr(45, 15);
+      
+      utmPoints.resize(4);
+      long z = 0;
+      ossim_float64 e=0.0;
+      ossim_float64 n=0.0;
+      
+      result = true; // Set to true.
+
+      //---
+      // Convert each string to Easting Northing.  This also sets zone hemisphere.
+      // Method takes long for zone.
+      //---
+      for (ossim_uint32 i = 0; i < 4; ++i)
+      {
+         if ( Convert_OSSIM_MGRS_To_UTM(mgrsStr[i].c_str(), &z, &hemisphere, &e, &n) == 0 )
+         {
+            utmPoints[i].x = e;
+            utmPoints[i].y = n;
+         }
+         else
+         {
+            result = false; // Geotrans code errored on string.
+            break;
+         }
+      }
+      if (result) zone = static_cast<ossim_uint32>(z); // Set the zone.
+   }
+   return result;
+}
+
+ossimProjection* ossimNitfProjectionFactory::makeEuiDistant(
+   const ossimNitfImageHeader* hdr,
+   const std::vector<ossimGpt>& gpts) const
+{
+   ossimEquDistCylProjection* proj = 0;
+
+   // Get the scale.
+   ossimDpt scale;
+   computeScaleInDecimalDegrees(hdr, gpts, scale);
+
+   if (scale.hasNans())
+   {
+      return proj;
+   }
+   // Make the projection.
+   proj = new ossimEquDistCylProjection();
+
+   if ( scale.x )
+   {
+      ossimGpt origin = proj->getOrigin();
+
+      //---
+      // ossimEquDistCylProjection uses the origin_latitude for meters per pixel (gsd)
+      // computation.  So is not set in tiff tags, compute to achieve the proper
+      // horizontal scaling.
+      //---
+      origin.lat = ossim::acosd(scale.y/scale.x);
+
+      proj->setOrigin(origin);
+   }
+
+   // Shift the tie to the center of the pixel.
+   ossimGpt tiePoint;
+   tiePoint.latd(gpts[0].latd() - (scale.y/2.0));
+   tiePoint.lond(gpts[0].lond() + (scale.x/2.0));
+
+   // Set the tie points.
+   proj->setUlTiePoints(tiePoint);
+
+   // Set the scale.
+   proj->setDecimalDegreesPerPixel(scale);
+
+   return proj;
+}
+
+ossimProjection* ossimNitfProjectionFactory::makeBilinear(
+   const ossimNitfImageHeader* hdr,
+   const std::vector<ossimGpt>& gpts) const
+{
+   double rows = hdr->getNumberOfRows();
+   double cols = hdr->getNumberOfCols();
+   
+   ossimDpt ul(0.0, 0.0);
+   ossimDpt ur(cols-1.0, 0.0);   
+   ossimDpt lr(cols-1.0, rows-1.0);
+   ossimDpt ll(0.0, rows-1.0);
+
+   ossimRefPtr<ossimBilinearProjection> proj;
+   try
+   {
+     proj = new ossimBilinearProjection(ul,
+                                      ur,
+                                      lr,
+                                      ll,
+                                      gpts[0],
+                                      gpts[1],
+                                      gpts[2],
+                                      gpts[3]);
+   }
+   catch(...)
+   {
+      proj = 0;
+   }
+   
+   return proj.release();
+}
+
+bool ossimNitfProjectionFactory::isSkewed(
+   const std::vector<ossimGpt>& gpts) const
+{
+
+   return !( (gpts[0].latd() == gpts[1].latd()) &&
+             (gpts[2].latd() == gpts[3].latd()) &&
+             (gpts[0].lond() == gpts[3].lond()) &&
+             (gpts[1].lond() == gpts[2].lond()) );
+   
+}
+
+bool ossimNitfProjectionFactory::isSkewed(
+   const std::vector<ossimDpt>& dpts) const
+{
+   return !( (dpts[0].y == dpts[1].y) &&
+             (dpts[2].y == dpts[3].y) &&
+             (dpts[0].x == dpts[3].x) &&
+             (dpts[1].x == dpts[2].x) );
+   
+}
+
+bool ossimNitfProjectionFactory::getBlockaPoints(
+   const ossimNitfImageHeader* hdr,
+   std::vector<ossimGpt>& gpts) const
+{
+   if (!hdr)
+   {
+      return false;
+   }
+
+   ossimRefPtr<ossimNitfRegisteredTag> tag =
+      hdr->getTagData(ossimString("BLOCKA"));
+
+   if (!tag)
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfProjectionFactory::getBlockaPoints DEBUG:"
+            << "\nBLOCKA tag not found."
+            << std::endl;
+      }
+      return false;
+   }
+
+   if (gpts.size())
+   {
+      gpts.clear();
+   }
+
+   ossimNitfBlockaTag* blockaTag = PTR_CAST(ossimNitfBlockaTag, tag.get());
+   if (!blockaTag)
+   {
+      return false;
+   }
+
+   ossimDpt dpt;
+   ossimGpt gpt;
+
+   // Get the upper left or first row first column.
+   blockaTag->getFrfcLoc(dpt);
+   gpt.latd(dpt.y);
+   gpt.lond(dpt.x);
+   gpts.push_back(gpt);
+
+   // Get the upper right or first row last column.
+   blockaTag->getFrlcLoc(dpt);
+   gpt.latd(dpt.y);
+   gpt.lond(dpt.x);
+   gpts.push_back(gpt);
+
+   // Get the lower right or last row last column.
+   blockaTag->getLrlcLoc(dpt);
+   gpt.latd(dpt.y);
+   gpt.lond(dpt.x);
+   gpts.push_back(gpt);
+
+   // Get the lower left or last row first column.
+   blockaTag->getLrfcLoc(dpt);
+   gpt.latd(dpt.y);
+   gpt.lond(dpt.x);
+   gpts.push_back(gpt);
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfProjectionFactory::getBlockaPoints DEBUG:"
+         << std::endl;
+      for (int i=0; i<4; ++i)
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "gpt[" << i << "] " << gpts[i] << std::endl;
+      }
+   }
+   
+   return true;
+}
+
+void ossimNitfProjectionFactory::computeScaleInDecimalDegrees(
+   const ossimNitfImageHeader* hdr,
+   const std::vector<ossimGpt>& gpts,
+   ossimDpt& scale) const
+{
+   if ( !hdr || isSkewed(gpts))
+   {
+      scale.makeNan();
+      return;
+   }
+   ossimIrect imageRect = hdr->getImageRect();
+
+   //---
+   // Calculate the scale.  This assumes that the corner points are for the
+   // edge of the corner pixels, not the center of the corner pixels.
+   //---
+   double longitudeSize  = 0.0;
+   double latitudeSize = 0.0;
+   if ( (gpts[1].lond() < 0.0) && (gpts[0].lond() >= 0) )
+   {
+      //---
+      // Upper right negative(Western), upper left positive (Eastern).
+      // Crossing date line maybe???
+      //---
+      longitudeSize = (gpts[1].lond() + 360.0) - gpts[0].lond();
+   }
+   else
+   {
+      longitudeSize = gpts[1].lond() - gpts[0].lond();
+   }
+
+   latitudeSize = gpts[0].latd() - gpts[2].latd();
+
+   double rows = imageRect.height();
+   double cols = imageRect.width();
+//   double rows = hdr->getNumberOfRows();
+//   double cols = hdr->getNumberOfCols();
+       
+   if (!rows || !cols)
+   {
+      scale.makeNan();
+      return;
+   }
+   scale.y = latitudeSize  / rows;
+   scale.x = longitudeSize / cols;
+}
+
+void ossimNitfProjectionFactory::computeScaleInMeters(
+   const ossimNitfImageHeader* hdr,
+   const std::vector<ossimDpt>& dpts,
+   ossimDpt& scale) const
+{
+   if ( !hdr || isSkewed(dpts))
+   {
+      scale.makeNan();
+      return;
+   }
+   ossimIrect imageRect = hdr->getImageRect();
+
+   //---
+   // Calculate the scale.  This assumes that the corner points are for the
+   // edge of the corner pixels, not the center of the corner pixels.
+   //---
+   double eastingSize  = 0.0;
+   double northingSize = 0.0;
+   
+   eastingSize  = fabs(dpts[1].x - dpts[0].x);
+   northingSize = fabs(dpts[0].y - dpts[3].y);
+
+   double rows = imageRect.height();//hdr->getNumberOfRows();
+   double cols = imageRect.width();//hdr->getNumberOfCols();
+
+   if (!rows || !cols)
+   {
+      scale.makeNan();
+      return;
+   }
+   scale.y = northingSize / rows;
+   scale.x = eastingSize  / cols;
+}
+
+void ossimNitfProjectionFactory::parseUtmString(const ossimString& utmLocation,
+                                                ossim_uint32& zone,
+                                                std::vector<ossimDpt>& utmPoints)const
+{
+   ossim_uint32 idx = 0;
+   ossimString z;
+   ossimString east;
+   ossimString north;
+
+   
+   z    = ossimString(utmLocation.begin() + idx,
+                   utmLocation.begin() + idx + 2);
+   idx += 2;
+   east = ossimString(utmLocation.begin() + idx,
+                      utmLocation.begin() + idx + 6);
+   idx += 6;
+   north = ossimString(utmLocation.begin() + idx,
+                       utmLocation.begin() + idx + 7);
+   idx += 7;
+
+   utmPoints.push_back(ossimDpt(east.toDouble(),
+                                north.toDouble()));
+   
+   z    = ossimString(utmLocation.begin() + idx,
+                   utmLocation.begin() + idx + 2);
+   idx += 2;
+   east = ossimString(utmLocation.begin() + idx,
+                      utmLocation.begin() + idx + 6);
+   idx += 6;
+   north = ossimString(utmLocation.begin() + idx,
+                       utmLocation.begin() + idx + 7);
+   idx += 7;
+   utmPoints.push_back(ossimDpt(east.toDouble(),
+                                north.toDouble()));
+
+   z    = ossimString(utmLocation.begin() + idx,
+                   utmLocation.begin() + idx + 2);
+   idx += 2;
+   east = ossimString(utmLocation.begin() + idx,
+                      utmLocation.begin() + idx + 6);
+   idx += 6;
+   north = ossimString(utmLocation.begin() + idx,
+                       utmLocation.begin() + idx + 7);
+   idx += 7;
+   utmPoints.push_back(ossimDpt(east.toDouble(),
+                                north.toDouble()));
+
+   z    = ossimString(utmLocation.begin() + idx,
+                   utmLocation.begin() + idx + 2);
+   idx += 2;
+   east = ossimString(utmLocation.begin() + idx,
+                      utmLocation.begin() + idx + 6);
+   idx += 6;
+   north = ossimString(utmLocation.begin() + idx,
+                       utmLocation.begin() + idx + 7);
+   idx += 7;
+   utmPoints.push_back(ossimDpt(east.toDouble(),
+                                north.toDouble()));
+
+   zone = z.toUInt32();
+}
+
+
+void ossimNitfProjectionFactory::parseGeographicString(
+   const ossimString& geographicLocation, std::vector<ossimGpt>& gpts) const
+{
+   gpts.clear();
+   
+   if (geographicLocation.size() != 60)
+   {
+      return;
+   }
+
+   std::string::size_type geo_index = 0;
+   for (int i=0; i<4; ++i)
+   {
+      //---
+      // We have to split up the geographicLocation string for the dms class.
+      // 
+      // geographicLocation = ddmmssXdddmmssX (four times).
+      // "dd mm ss X" has a string length of 10
+      // "ddd mm ss X" has a string length of 11
+      //---
+      std::string::size_type lat_index = 0;
+      std::string::size_type lon_index = 0;
+      const char SPACE = ' ';
+      ossimString latString(10, SPACE);
+      ossimString lonString(11, SPACE);
+
+      // degrees latitude
+      latString[lat_index++] = geographicLocation[geo_index++];
+      latString[lat_index++] = geographicLocation[geo_index++];
+      ++lat_index;
+
+      // minutes latitude
+      latString[lat_index++] = geographicLocation[geo_index++];
+      latString[lat_index++] = geographicLocation[geo_index++];
+      ++lat_index;
+      
+      // seconds latitude
+      latString[lat_index++] = geographicLocation[geo_index++];
+      latString[lat_index++] = geographicLocation[geo_index++];
+      ++lat_index;
+
+      // hemisphere
+      latString[lat_index++] = geographicLocation[geo_index++];
+ 
+      // degrees longitude
+      lonString[lon_index++] = geographicLocation[geo_index++];
+      lonString[lon_index++] = geographicLocation[geo_index++];
+      lonString[lon_index++] = geographicLocation[geo_index++];
+      ++lon_index;
+
+      // minutes longitude
+      lonString[lon_index++] = geographicLocation[geo_index++];
+      lonString[lon_index++] = geographicLocation[geo_index++];
+      ++lon_index;
+
+      // seconds longitude
+      lonString[lon_index++] = geographicLocation[geo_index++];
+      lonString[lon_index++] = geographicLocation[geo_index++];
+      ++lon_index;
+
+      // hemisphere
+      lonString[lon_index++] = geographicLocation[geo_index++];
+
+      // Convert to decimal degrees using the dms class.
+      ossimGpt gpt;
+      ossimDms dms(0.0);
+      dms.setLatFlag(true);
+      if ( ! dms.setDegrees(latString.c_str()) )
+      {
+         gpts.clear();
+         return;
+      }
+      gpt.latd(dms.getDegrees());
+
+      dms.setLatFlag(false);
+      if ( ! dms.setDegrees(lonString.c_str()) )
+      {
+         gpts.clear();
+         return;
+      }
+      gpt.lond(dms.getDegrees());
+
+      gpts.push_back(gpt);
+
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfProjectionFactory::parseGeographicString DEBUG:"
+            << "\nground point[" << i << "]:  " << gpt
+            << std::endl;
+      }
+   }
+}
+
+void ossimNitfProjectionFactory::parseDecimalDegreesString(const ossimString& geographicLocation,
+                                                           std::vector<ossimGpt>& gpts) const
+{
+   const char* bufPtr = geographicLocation.c_str();
+
+   
+   ossimString ulLat(bufPtr,
+                     bufPtr + 7);
+   bufPtr+=7;
+   ossimString ulLon(bufPtr,
+                     bufPtr+8);
+   bufPtr+=8;
+   ossimString urLat(bufPtr,
+                     bufPtr + 7);
+   bufPtr+=7;
+   ossimString urLon(bufPtr,
+                     bufPtr+8);
+   bufPtr+=8;
+   ossimString lrLat(bufPtr,
+                     bufPtr + 7);
+   bufPtr+=7;
+   ossimString lrLon(bufPtr,
+                     bufPtr+8);
+   bufPtr+=8;
+   ossimString llLat(bufPtr,
+                     bufPtr + 7);
+   bufPtr+=7;
+   ossimString llLon(bufPtr,
+                     bufPtr+8);
+
+   gpts.push_back(ossimGpt(ulLat.toDouble(), ulLon.toDouble()));
+   gpts.push_back(ossimGpt(urLat.toDouble(), urLon.toDouble()));
+   gpts.push_back(ossimGpt(lrLat.toDouble(), lrLon.toDouble()));
+   gpts.push_back(ossimGpt(llLat.toDouble(), llLon.toDouble()));
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfProjectionFactory::parseDecimalDegreesString DEBUG:"
+         << "\nground point[" << 0 << "]:  " << gpts[0]
+         << "\nground point[" << 1 << "]:  " << gpts[1]
+         << "\nground point[" << 2 << "]:  " << gpts[2]
+         << "\nground point[" << 3 << "]:  " << gpts[3]
+         << std::endl;
+   }
+}
+
+ossimNitfProjectionFactory::ossimNitfProjectionFactory(const ossimNitfProjectionFactory&)
+{
+}
+
+ossimNitfProjectionFactory& ossimNitfProjectionFactory::operator=(const ossimNitfProjectionFactory&)
+{
+   return *this;
+}
diff --git a/ossim/src/ossim/projection/ossimNitfRpcModel.cpp b/ossim/src/ossim/projection/ossimNitfRpcModel.cpp
new file mode 100644
index 0000000..24e79d7
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimNitfRpcModel.cpp
@@ -0,0 +1,475 @@
+//*****************************************************************************
+// FILE: ossimNitfRpcModel.cc
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Contains implementation of class ossimNitfRpcModel. This 
+//    derived class implements the capability of reading Nitf RPC support
+//    data.
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimNitfRpcModel.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/projection/ossimNitfRpcModel.h>
+
+RTTI_DEF1(ossimNitfRpcModel, "ossimNitfRpcModel", ossimRpcModel);
+
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/support_data/ossimNitfFile.h>
+#include <ossim/support_data/ossimNitfFileHeader.h>
+#include <ossim/support_data/ossimNitfImageHeader.h>
+#include <ossim/support_data/ossimNitfUse00aTag.h>
+#include <ossim/support_data/ossimNitfPiaimcTag.h>
+#include <ossim/support_data/ossimNitfStdidcTag.h>
+#include <ossim/support_data/ossimNitfRpcBase.h>
+
+//***
+// Define Trace flags for use within this file:
+//***
+#include <ossim/base/ossimTrace.h>
+static ossimTrace traceExec  ("ossimNitfRpcModel:exec");
+static ossimTrace traceDebug ("ossimNitfRpcModel:debug");
+
+static const char* RPC00A_TAG = "RPC00A";
+static const char* RPC00B_TAG = "RPC00B";
+static const char* PIAIMC_TAG = "PIAIMC";
+static const char* STDIDC_TAG = "STDIDC";
+static const char* USE00A_TAG = "USE00A";
+
+ossimNitfRpcModel::ossimNitfRpcModel()
+   :
+   ossimRpcModel(),
+   theDecimation(1.0)
+{
+}
+
+ossimNitfRpcModel::ossimNitfRpcModel(const ossimNitfRpcModel& rhs)
+  :
+   ossimRpcModel(rhs),
+   theDecimation(1.0)
+{
+}
+
+//*****************************************************************************
+//  CONSTRUCTOR: ossimNitfRpcModel
+//  
+//  Constructs given filename for NITF file
+//  
+//*****************************************************************************
+ossimNitfRpcModel::ossimNitfRpcModel(const ossimFilename& nitfFile)
+   :
+   ossimRpcModel(),
+   theDecimation(1.0)
+{
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimNitfRpcModel::ossimNitfRpcModel(nitfFile): entering..."
+         << std::endl;
+   }
+   if(!parseFile(nitfFile))
+   {
+      if (traceExec())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG ossimNitfRpcModel::ossimNitfRpcModel(nitfFile): Unable to parse file " << nitfFile
+            << std::endl;
+      }
+      ++theErrorStatus;
+   }
+
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimNitfRpcModel::ossimNitfRpcModel(nitfFile): returning..."
+         << std::endl;
+   }
+}
+
+ossimObject* ossimNitfRpcModel::dup() const
+{
+   return new ossimNitfRpcModel(*this);
+}
+
+bool ossimNitfRpcModel::parseFile(const ossimFilename& nitfFile,
+                                  ossim_uint32 entryIndex)
+{
+   ossimRefPtr<ossimNitfFile> file = new ossimNitfFile;
+
+   if(!file->parseFile(nitfFile))
+   {
+      setErrorStatus();
+      return false;
+   }
+   
+   ossimRefPtr<ossimNitfImageHeader> ih = file->getNewImageHeader(entryIndex);
+   if(!ih)
+   {
+      setErrorStatus();
+      return false;
+   }
+
+   return parseImageHeader(ih.get());
+   
+}
+
+bool ossimNitfRpcModel::parseImageHeader(const ossimNitfImageHeader* ih)
+{
+   // Do this first so we don't waste time if not rpc image.
+   if (getRpcData(ih) == false)
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfRpcModel::parseFile DEBUG:"
+         << "\nError parsing rpc tags.  Aborting with error."
+         << std::endl;
+      }
+      setErrorStatus();
+      return false;
+   }
+   
+   
+   //---
+   // Get the decimation if any from the header "IMAG" field.
+   // 
+   // Look for string like:
+   // "/2" = 1/2
+   // "/4  = 1/4
+   // ...
+   // "/16 = 1/16
+   // If it is full resolution it should be "1.0"
+   //---
+   ossimString os = ih->getImageMagnification();
+   if ( os.contains("/") )
+   {
+      os = os.after("/");
+      ossim_float64 d = os.toFloat64();
+      if (d)
+      {
+         theDecimation = 1.0 / d;
+      }
+   }
+   
+   //***
+   // Fetch Image ID:
+   //***
+   theImageID = ih->getImageId();
+   
+   ossimIrect imageRect = ih->getImageRect();
+   
+   //---
+   // Fetch Image Size:
+   //---
+   theImageSize.line =
+   static_cast<ossim_int32>(imageRect.height() / theDecimation);
+   theImageSize.samp =
+   static_cast<ossim_int32>(imageRect.width() / theDecimation);
+   
+   // Search for the STDID Tag to fetch mission (satellite) name:
+   getSensorID(ih);
+   
+   //***
+   // Assign other data members:
+   //***
+   theRefImgPt.line = theImageSize.line/2.0;
+   theRefImgPt.samp = theImageSize.samp/2.0;
+   theRefGndPt.lat  = theLatOffset;
+   theRefGndPt.lon  = theLonOffset;
+   theRefGndPt.hgt  = theHgtOffset;
+   
+   //***
+   // Assign the bounding image space rectangle:
+   //***
+   theImageClipRect = ossimDrect(0.0, 0.0,
+                                 theImageSize.samp-1, theImageSize.line-1);
+   
+   //---
+   // Assign the bounding ground polygon:
+   //
+   // NOTE:  We will use the base ossimRpcModel for transformation since all
+   // of our calls are in full image space (not decimated).
+   //---
+   ossimGpt v0, v1, v2, v3;
+   ossimDpt ip0 (0.0, 0.0);
+   ossimRpcModel::lineSampleHeightToWorld(ip0, theHgtOffset, v0);
+   ossimDpt ip1 (theImageSize.samp-1.0, 0.0);
+   ossimRpcModel::lineSampleHeightToWorld(ip1, theHgtOffset, v1);
+   ossimDpt ip2 (theImageSize.samp-1.0, theImageSize.line-1.0);
+   ossimRpcModel::lineSampleHeightToWorld(ip2, theHgtOffset, v2);
+   ossimDpt ip3 (0.0, theImageSize.line-1.0);
+   ossimRpcModel::lineSampleHeightToWorld(ip3, theHgtOffset, v3);
+   
+   theBoundGndPolygon
+   = ossimPolygon (ossimDpt(v0), ossimDpt(v1), ossimDpt(v2), ossimDpt(v3));
+   
+   updateModel();
+   
+   // Set the ground reference point.
+   ossimRpcModel::lineSampleHeightToWorld(theRefImgPt,
+                                          theHgtOffset,
+                                          theRefGndPt);
+   if ( theRefGndPt.isLatNan() || theRefGndPt.isLonNan() )
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfRpcModel::ossimNitfRpcModel DEBUG:"
+         << "\nGround Reference Point not valid." 
+         << " Aborting with error..."
+         << std::endl;
+      }
+      setErrorStatus();
+      return false;
+   }
+   
+   //---
+   // This will set theGSD and theMeanGSD.  This model doesn't need these but
+   // others do.
+   //---
+   try
+   {
+      computeGsd();
+   }
+   catch (const ossimException& e)
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfRpcModel::ossimNitfRpcModel DEBUG:\n"
+         << e.what() << std::endl;
+      }
+   }
+   
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+      << "DEBUG ossimNitfRpcModel::parseFile: returning..."
+      << std::endl;
+   }
+   
+   return true;
+}
+
+void ossimNitfRpcModel::worldToLineSample(const ossimGpt& world_point,
+                                          ossimDpt&       image_point) const
+{
+   // Get the full res (not decimated) point.
+   ossimRpcModel::worldToLineSample(world_point, image_point);
+
+   // Apply decimation.
+   image_point.x = image_point.x * theDecimation;
+   image_point.y = image_point.y * theDecimation;
+}
+
+void ossimNitfRpcModel::lineSampleHeightToWorld(
+   const ossimDpt& image_point,
+   const double&   heightEllipsoid,
+   ossimGpt&       worldPoint) const
+{
+   // Convert image point to full res (not decimated) point.
+   ossimDpt pt;
+   pt.x = image_point.x / theDecimation;
+   pt.y = image_point.y / theDecimation;
+
+   // Call base...
+   ossimRpcModel::lineSampleHeightToWorld(pt, heightEllipsoid, worldPoint);
+}
+
+bool ossimNitfRpcModel::saveState(ossimKeywordlist& kwl,
+                                  const char* prefix) const
+{
+   // Save the decimation.
+   kwl.add(prefix, "decimation", theDecimation);
+
+   // Call base.
+   return ossimRpcModel::saveState(kwl, prefix);
+}
+
+bool ossimNitfRpcModel::loadState(const ossimKeywordlist& kwl,
+                                  const char* prefix)
+{
+   // Lookup decimation.
+   const char* value = kwl.find(prefix, "decimation");
+   if (value)
+   {
+      theDecimation = ossimString(value).toFloat64();
+      if (theDecimation <= 0.0)
+      {
+         // Do not allow negative or "0.0"(divide by zero).
+         theDecimation = 1.0;
+      }
+   }
+
+   // Call base.
+   return ossimRpcModel::loadState(kwl, prefix);
+}
+
+void ossimNitfRpcModel::getGsd(const ossimNitfImageHeader* ih)
+{
+   theGSD.line = ossim::nan();
+   theGSD.samp = ossim::nan();
+
+   if (!ih)
+   {
+      return;
+   }
+   
+   ossimRefPtr<ossimNitfRegisteredTag> tag;
+   tag = ih->getTagData(PIAIMC_TAG);
+   if (tag.valid())
+   {
+      ossimNitfPiaimcTag* p = PTR_CAST(ossimNitfPiaimcTag, tag.get());
+      if (p)
+      {
+         theGSD.line = p->getMeanGsdInMeters();
+         theGSD.samp = theGSD.line;
+         return;
+      }
+   }
+
+   tag = ih->getTagData(USE00A_TAG);
+   if (tag.valid())
+   {
+      ossimNitfUse00aTag* p = PTR_CAST(ossimNitfUse00aTag, tag.get());
+      if (p)
+      {
+         theGSD.line = p->getMeanGsdInMeters();
+         theGSD.samp = theGSD.line;
+      }
+   }
+}
+
+void ossimNitfRpcModel::getSensorID(const ossimNitfImageHeader* ih)
+{
+   theSensorID = "UNKNOWN";
+
+   if (!ih)
+   {
+      return;
+   }
+   
+   ossimRefPtr<ossimNitfRegisteredTag> tag;
+   tag = ih->getTagData(STDIDC_TAG);
+   if (tag.valid())
+   {
+      ossimNitfStdidcTag* p = PTR_CAST(ossimNitfStdidcTag, tag.get());
+      if (p)
+      {
+         theSensorID = p->getMission();
+         return;
+      }
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfRpcModel::getSensorID DEBUG:"
+            << "\ntheSensorID set to: " << theSensorID << endl;
+   }
+}
+
+bool ossimNitfRpcModel::getRpcData(const ossimNitfImageHeader* ih)
+{
+   if (!ih)
+   {
+      return false;
+   }
+
+   // Get the the RPC tag:
+   ossimNitfRpcBase* rpcTag = 0;
+
+   // Look for the RPC00B tag first.
+   ossimRefPtr<ossimNitfRegisteredTag> tag = ih->getTagData(RPC00B_TAG);
+   if (tag.valid())
+   {
+      rpcTag = PTR_CAST(ossimNitfRpcBase, tag.get());
+   }
+
+   if (!rpcTag)
+   {
+      // Look for RPC00A tag.
+      tag = ih->getTagData(RPC00A_TAG);
+      if (tag.valid())
+      {
+         rpcTag = PTR_CAST(ossimNitfRpcBase, tag.get());
+      }
+   }
+
+   if (!rpcTag)
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfRpcModel::getRpcData DEBUG:"
+            << "\nCould not find neither RPC tags <" << RPC00A_TAG
+            << "> nor <" << RPC00B_TAG
+            << "\nAborting with error..."
+            << std::endl;
+      }
+      return false;
+   }
+
+   if ( rpcTag->getSuccess() == false )
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfRpcModel::getRpcData DEBUG:"
+            << "\nSuccess flag set to false."
+            << "\nAborting with error..."
+            << std::endl;
+      }
+      return false;
+   }
+
+   // Set the polynomial type.
+   if (rpcTag->getRegisterTagName() == "RPC00B")
+   {
+      thePolyType = B;
+   }
+   else
+   {
+      thePolyType = A;
+   }
+   
+   // Now parse the tag block for pertinent data:
+   theBiasError  = rpcTag->getErrorBias().toFloat64();
+   theRandError  = rpcTag->getErrorRand().toFloat64();
+   theLineOffset = rpcTag->getLineOffset().toFloat64();
+   theSampOffset = rpcTag->getSampleOffset().toFloat64();
+   theLatOffset  = rpcTag->getGeodeticLatOffset().toFloat64();
+   theLonOffset  = rpcTag->getGeodeticLonOffset().toFloat64();
+   theHgtOffset  = rpcTag->getGeodeticHeightOffset().toFloat64();
+   theLineScale  = rpcTag->getLineScale().toFloat64();
+   theSampScale  = rpcTag->getSampleScale().toFloat64();
+   theLatScale   = rpcTag->getGeodeticLatScale().toFloat64();
+   theLonScale   = rpcTag->getGeodeticLonScale().toFloat64();
+   theHgtScale   = rpcTag->getGeodeticHeightScale().toFloat64();
+
+   // Parse coefficients:
+   ossim_uint32 i;
+   
+   for (i=0; i<20; ++i)
+   {
+      theLineNumCoef[i] = rpcTag->getLineNumeratorCoeff(i).toFloat64();
+      theLineDenCoef[i] = rpcTag->getLineDenominatorCoeff(i).toFloat64();
+      theSampNumCoef[i] = rpcTag->getSampleNumeratorCoeff(i).toFloat64();
+      theSampDenCoef[i] = rpcTag->getSampleDenominatorCoeff(i).toFloat64();
+   }
+   
+   // Assign other data members to default values:
+   theNominalPosError = sqrt(theBiasError*theBiasError +
+                             theRandError*theRandError); // meters
+
+   return true;
+}
+
diff --git a/ossim/src/ossim/projection/ossimNitfRsmModel.cpp b/ossim/src/ossim/projection/ossimNitfRsmModel.cpp
new file mode 100644
index 0000000..9d70287
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimNitfRsmModel.cpp
@@ -0,0 +1,491 @@
+ //---
+// File: ossimNitfRsmModel.cpp
+//
+//  RP 
+//  LIMITATIONS - This is supporting only the RSM features that have been
+//  observed in current data samples and does not attempt to support the entire
+//  RSM specification.
+//  Examples of currently unsupported items include ->
+//  1.  multiple RSMPC tags for different polynomials for separate image sections 
+//  2.  Error Covariance (this may gain priority as we have access to RSMECA data)
+//  3.  Illumination model
+//  4.  Rectangular coodinate system conversion (RSDIDA GRNDD = "R")
+//---
+
+#include <ossim/projection/ossimNitfRsmModel.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/support_data/ossimNitfFile.h>
+#include <ossim/support_data/ossimNitfImageHeader.h>
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+#include <ossim/support_data/ossimNitfRsmecaTag.h>
+#include <ossim/support_data/ossimNitfRsmidaTag.h>
+#include <ossim/support_data/ossimNitfRsmpcaTag.h>
+#include <ossim/support_data/ossimNitfRsmpiaTag.h>
+
+
+RTTI_DEF1(ossimNitfRsmModel, "ossimNitfRsmModel", ossimRsmModel);
+
+//---
+// Define Trace flags for use within this file:
+//---
+
+static ossimTrace traceExec  ("ossimNitfRsmModel:exec");
+static ossimTrace traceDebug ("ossimNitfRsmModel:debug");
+
+
+
+ossimNitfRsmModel::ossimNitfRsmModel()
+   :  ossimRsmModel()
+{
+}
+
+ossimNitfRsmModel::ossimNitfRsmModel( const ossimNitfRsmModel& obj )
+   : ossimRsmModel(obj)
+{
+}
+
+const ossimNitfRsmModel& ossimNitfRsmModel::operator=( const ossimNitfRsmModel& rhs )
+{
+   if (this != &rhs)
+   {
+      ossimRsmModel::operator=(rhs);
+   }
+   return *this;
+}
+
+ossimNitfRsmModel::~ossimNitfRsmModel()
+{
+}
+
+bool ossimNitfRsmModel::parseFile( const ossimFilename& nitfFile,
+                                   ossim_uint32 entryIndex )
+{
+   ossimRefPtr<ossimNitfFile> file = new ossimNitfFile;
+   
+   if(!file->parseFile(nitfFile))
+   {
+      setErrorStatus();
+      return false;
+   }
+   
+   ossimRefPtr<ossimNitfImageHeader> ih = file->getNewImageHeader(entryIndex);
+   if(!ih)
+   {
+      setErrorStatus();
+      return false;
+   }
+   
+   return parseImageHeader(ih.get());
+
+}
+
+bool ossimNitfRsmModel::parseImageHeader(const ossimNitfImageHeader* ih)
+{
+   static const char MODULE[] = "ossimNitfRsmModel::getRsmData";
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering..." << std::endl;
+   }
+
+   bool status = false;
+
+   if ( getRsmData(ih) )
+   {
+      theImageID = m_iid.trim();
+      
+      ossimIrect imageRect = ih->getImageRect();
+      
+      // Fetch Image Size:
+      theImageSize.line = static_cast<ossim_int32>(imageRect.height());
+      theImageSize.samp = static_cast<ossim_int32>(imageRect.width());
+      
+      // Assign other data members:
+      theRefImgPt.line = theImageSize.line/2.0;
+      theRefImgPt.samp = theImageSize.samp/2.0;
+      
+      // Assign the bounding image space rectangle:
+      theImageClipRect = ossimDrect(0.0, 0.0, theImageSize.samp-1, theImageSize.line-1);
+      
+      ossimGpt v0, v1, v2, v3;
+      ossimDpt ip0 (0.0, 0.0);
+      lineSampleHeightToWorld(ip0, m_znrmo, v0);
+      ossimDpt ip1 (theImageSize.samp-1.0, 0.0);
+      lineSampleHeightToWorld(ip1, m_znrmo, v1);
+      ossimDpt ip2 (theImageSize.samp-1.0, theImageSize.line-1.0);
+      lineSampleHeightToWorld(ip2, m_znrmo, v2);
+      ossimDpt ip3 (0.0, theImageSize.line-1.0);
+      lineSampleHeightToWorld(ip3, m_znrmo, v3);
+      
+      theBoundGndPolygon = ossimPolygon (ossimDpt(v0), ossimDpt(v1), ossimDpt(v2), ossimDpt(v3));
+      
+      updateModel();
+      
+      // Set the ground reference point.
+      lineSampleHeightToWorld(theRefImgPt, m_znrmo, theRefGndPt);
+
+      // Height could have nan if elevation is not set so check lat, lon individually.
+      if ( ( theRefGndPt.isLatNan() == false ) && ( theRefGndPt.isLonNan() == false ) )
+      {
+         //---
+         // This will set theGSD and theMeanGSD.  This model doesn't need these but
+         // others do.
+         //---
+         try
+         {
+            computeGsd();
+
+            // Set return status.
+            status = true;
+         }
+         catch (const ossimException& e)
+         {
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << "ossimNitfRpcModel::ossimNitfRpcModel DEBUG:\n"
+                  << e.what() << std::endl;
+            }
+            setErrorStatus();
+         }
+      }
+      else
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "ossimNitfRpcModel::ossimNitfRpcModel DEBUG:"
+               << "\nGround Reference Point not valid(has nans)."
+               << " Aborting with error..."
+               << std::endl;
+         }
+         setErrorStatus();
+      }
+   }
+   else
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfRpcModel::parseFile DEBUG:"
+            << "\nError parsing rsm tags.  Aborting with error."
+            << std::endl;
+      }
+      setErrorStatus();
+   }
+
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " exit status: " << ( status ? "true" : "false" ) << "\n";
+   }
+
+   return status;
+   
+} // End: ossimNitfRsmModel::parseImageHeader(const ossimNitfImageHeader* ih)
+
+bool ossimNitfRsmModel::getRsmData(const ossimNitfImageHeader* ih)
+{
+   static const char MODULE[] = "ossimNitfRsmModel::getRsmData";
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering..." << std::endl;
+   }
+   
+   bool status = false;
+   
+   if ( ih )
+   {
+      ossimRefPtr<ossimNitfRegisteredTag> tag = 0;
+
+      // RSMECA:
+      const ossimString RSMECA_TAG = "RSMECA";
+      tag = ih->getTagData(RSMECA_TAG);
+      if (tag.valid())
+      {
+         ossimRefPtr<ossimNitfRsmecaTag> rsmecaTag =
+            dynamic_cast<ossimNitfRsmecaTag*>(tag.get());
+         if ( rsmecaTag.valid() )
+         {
+            if ( initializeModel( rsmecaTag.get() ) )
+            {
+               // RSMIDA:
+               ossimString RSMIDA_TAG = "RSMIDA";
+               tag = ih->getTagData(RSMIDA_TAG);
+               if (tag.valid())
+               {
+                  ossimRefPtr<ossimNitfRsmidaTag> rsmidaTag =
+                     dynamic_cast<ossimNitfRsmidaTag*>( tag.get() );
+                  if ( rsmidaTag.valid() )
+                  {
+                     if ( initializeModel( rsmidaTag.get() ) )
+                     {
+                        // RSMPCA:
+                        const ossimString RSMPCA_TAG = "RSMPCA";                        
+                        tag = ih->getTagData(RSMPCA_TAG);
+                        if (tag.valid())
+                        {
+                           ossimRefPtr<ossimNitfRsmpcaTag> rsmpcaTag =
+                              dynamic_cast<ossimNitfRsmpcaTag*>( tag.get() );
+                           if ( rsmpcaTag.valid() )
+                           {
+                              if ( initializeModel( rsmpcaTag.get() ) )
+                              {
+                                 // RSMPIA:
+                                 const ossimString RSMPIA_TAG = "RSMPIA";
+                                 tag = ih->getTagData(RSMPIA_TAG);
+                                 if (tag.valid())
+                                 {
+                                    ossimRefPtr<ossimNitfRsmpiaTag> rsmpiaTag =
+                                       dynamic_cast<ossimNitfRsmpiaTag*>( tag.get() );
+                                    if ( rsmpiaTag.valid() )
+                                    {
+                                       // Last tag, assign status.
+                                       status = initializeModel( rsmpiaTag.get() );
+                                    }
+                                 }
+                                 else if (traceDebug())
+                                 {
+                                    ossimNotify(ossimNotifyLevel_WARN)
+                                       << "ossimNitfRsmModel::getRsmData WARNING!"
+                                       << "\nCould not find RSM tag: " << RSMPIA_TAG
+                                       << "\nAborting with error..."
+                                       << std::endl;
+                                 }
+                              }
+                           }
+                        }
+                        else if (traceDebug())
+                        {
+                           ossimNotify(ossimNotifyLevel_WARN)
+                              << "ossimNitfRsmModel::getRsmData WARNING!"
+                              << "\nCould not find RSM tag: " << RSMPCA_TAG
+                              << "\nAborting with error..."
+                              << std::endl;
+                        }
+                     }
+                  }
+               }
+               else if (traceDebug())
+               {
+                  ossimNotify(ossimNotifyLevel_WARN)
+                     << "ossimNitfRsmModel::getRsmData WARNING!"
+                     << "\nCould not find RSM tag: " << RSMIDA_TAG
+                     << "\nAborting with error..." << std::endl;
+               }
+            }
+         }
+      }
+      else if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimNitfRsmModel::getRsmData WARNING!"
+            << "\nCould not find RSM tag: " << RSMECA_TAG
+            << "\nAborting with error..." << std::endl;
+      }
+   }
+
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " exit status: " << ( status ? "true" : "false" ) << "\n";
+   }
+
+   return status;
+   
+} // End: ossimNitfRsmModel::getRsmData(const ossimNitfImageHeader* ih)
+
+
+bool ossimNitfRsmModel::initializeModel( const ossimNitfRsmecaTag* rsmecaTag )
+{
+   bool status = false;
+
+   if ( rsmecaTag )
+   {
+      // TODO:
+      status = true;
+   }
+
+   return status;
+   
+} // End: ossimNitfRsmModel::initializeModel( rsmecaTag )
+
+bool ossimNitfRsmModel::initializeModel( const ossimNitfRsmidaTag* rsmidaTag )
+{
+   bool status = false;
+
+   if ( rsmidaTag )
+   {
+      // TODO:
+      status = true;
+   }
+
+   return status;
+   
+} // End: ossimNitfRsmModel::initializeModel( rsmidaTag )
+
+bool ossimNitfRsmModel::initializeModel( const ossimNitfRsmpcaTag* rsmpcaTag )
+{
+   bool status = false;
+
+   if ( rsmpcaTag )
+   {
+      m_iid = rsmpcaTag->getIid();
+      m_edition = rsmpcaTag->getEdition();
+      m_rsn = rsmpcaTag->getRsn().toUInt32();
+      m_csn = rsmpcaTag->getCsn().toUInt32();
+      
+      // Supporting only the single polynomial set case right now, so fail otherwise
+      if (m_rsn == 1 && m_csn == 1)
+      {
+         m_rfep = rsmpcaTag->getRfep().toFloat64();
+         m_cfep = rsmpcaTag->getCfep().toFloat64();
+         m_rnrmo = rsmpcaTag->getRnrmo().toFloat64();
+         m_cnrmo = rsmpcaTag->getCnrmo().toFloat64();
+         m_xnrmo = rsmpcaTag->getXnrmo().toFloat64();
+         m_ynrmo = rsmpcaTag->getYnrmo().toFloat64();
+         m_znrmo = rsmpcaTag->getZnrmo().toFloat64();
+         m_rnrmsf = rsmpcaTag->getRnrmsf().toFloat64();
+         m_cnrmsf = rsmpcaTag->getCnrmsf().toFloat64();
+         m_xnrmsf = rsmpcaTag->getXnrmsf().toFloat64();
+         m_ynrmsf = rsmpcaTag->getYnrmsf().toFloat64();
+         m_znrmsf = rsmpcaTag->getZnrmsf().toFloat64();
+         
+         m_rnpwrx = rsmpcaTag->getRnpwrx().toUInt32();
+         m_rnpwry = rsmpcaTag->getRnpwry().toUInt32();
+         m_rnpwrz = rsmpcaTag->getRnpwrz().toUInt32();
+         m_rntrms = rsmpcaTag->getRntrms().toUInt32();
+         m_rnpcf.resize(m_rntrms);
+         for (ossim_uint32 i = 0; i < m_rntrms; ++i)
+         {
+            m_rnpcf[i] = rsmpcaTag->getRnpcf(i).toFloat64();
+         }
+         
+         m_rdpwrx = rsmpcaTag->getRdpwrx().toUInt32();
+         m_rdpwry = rsmpcaTag->getRdpwry().toUInt32();
+         m_rdpwrz = rsmpcaTag->getRdpwrz().toUInt32();
+         m_rdtrms = rsmpcaTag->getRdtrms().toUInt32();
+         m_rdpcf.resize(m_rdtrms);
+         for (ossim_uint32 i = 0; i < m_rdtrms; ++i)
+         {
+            m_rdpcf[i] = rsmpcaTag->getRdpcf(i).toFloat64();
+         }
+         
+         m_cnpwrx = rsmpcaTag->getCnpwrx().toUInt32();
+         m_cnpwry = rsmpcaTag->getCnpwry().toUInt32();
+         m_cnpwrz = rsmpcaTag->getCnpwrz().toUInt32();
+         m_cntrms = rsmpcaTag->getCntrms().toUInt32();
+         m_cnpcf.resize(m_cntrms);
+         for (ossim_uint32 i = 0; i < m_cntrms; ++i)
+         {
+            m_cnpcf[i] = rsmpcaTag->getCnpcf(i).toFloat64();
+         }
+         
+         m_cdpwrx = rsmpcaTag->getCdpwrx().toUInt32();
+         m_cdpwry = rsmpcaTag->getCdpwry().toUInt32();
+         m_cdpwrz = rsmpcaTag->getCdpwrz().toUInt32();
+         m_cdtrms = rsmpcaTag->getCdtrms().toUInt32();
+         m_cdpcf.resize(m_cdtrms);
+         for (ossim_uint32 i = 0; i < m_cdtrms; ++i)
+         {
+            m_cdpcf[i] = rsmpcaTag->getCdpcf(i).toFloat64();
+         }
+         
+         status = true;
+      }
+      else if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfRsmModel::getRsmData DEBUG:"
+            << "\nRow or Column Section Number not equal to 1: CSN is "
+            << ossimString::toString(m_csn) << ", RSN is " << ossimString::toString(m_rsn)
+            << "\nAborting with error..."
+            << std::endl;
+      }
+   }
+   
+   return status;
+   
+} // End: ossimNitfRsmModel::initializeModel( rsmpcaTag )
+
+bool ossimNitfRsmModel::initializeModel( const ossimNitfRsmpiaTag* rsmpiaTag )
+{
+   bool status = false;
+
+   if ( rsmpiaTag )
+   {
+      // TODO:
+      status = true;
+   }
+
+   return status;
+   
+} // End: ossimNitfRsmModel::initializeModel( rsmpiaTag )
+
+ossimObject* ossimNitfRsmModel::dup() const
+{
+   return new ossimNitfRsmModel(*this);
+}
+
+//---**************************************************************************
+//  METHOD: ossimNitfRsmModel::saveState()
+//  
+//  Saves the model state to the KWL. This KWL also serves as a geometry file.
+//  
+//---**************************************************************************
+bool ossimNitfRsmModel::saveState(ossimKeywordlist& kwl,
+                                  const char* prefix) const
+{
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimNitfRsmModel::saveState(): entering..." << std::endl;
+   }
+
+   //---
+   // Hand off to base class for common stuff:
+   //
+   // Note: Class type "ossimKeywordNames::TYPE_KW" is saved in
+   // ossimOject::saveState.
+   //---
+   bool status = ossimRsmModel::saveState(kwl, prefix);
+
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimNitfRsmModel::saveState(): returning..." << std::endl;
+   }
+
+   return status;
+}
+
+bool ossimNitfRsmModel::loadState( const ossimKeywordlist& kwl,
+                                   const char* prefix ) 
+{
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimNitfRsmModel::loadState(): entering..." << std::endl;
+   }
+
+   bool status = false;
+
+   // Check for type match before preceeding:
+   std::string myPrefix = ( prefix ? prefix : "" );
+   std::string type = kwl.findKey( myPrefix, std::string(ossimKeywordNames::TYPE_KW) );
+
+   if ( type == "ossimNitfRsmModel" )
+   {
+      // Pass on to the base-class for parsing first:
+      status = ossimRsmModel::loadState(kwl, prefix);
+   }
+   
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimNitfRsmModel::loadState(): exit status: "
+         << ( status ? "true" : "false" ) << std::endl;
+   }
+   
+   return status;
+}
diff --git a/src/ossim/projection/ossimObliqueMercatorProjection.cpp b/ossim/src/ossim/projection/ossimObliqueMercatorProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimObliqueMercatorProjection.cpp
rename to ossim/src/ossim/projection/ossimObliqueMercatorProjection.cpp
diff --git a/src/ossim/projection/ossimOptimizableProjection.cpp b/ossim/src/ossim/projection/ossimOptimizableProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimOptimizableProjection.cpp
rename to ossim/src/ossim/projection/ossimOptimizableProjection.cpp
diff --git a/src/ossim/projection/ossimOrthoGraphicProjection.cpp b/ossim/src/ossim/projection/ossimOrthoGraphicProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimOrthoGraphicProjection.cpp
rename to ossim/src/ossim/projection/ossimOrthoGraphicProjection.cpp
diff --git a/src/ossim/projection/ossimPolarStereoProjection.cpp b/ossim/src/ossim/projection/ossimPolarStereoProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimPolarStereoProjection.cpp
rename to ossim/src/ossim/projection/ossimPolarStereoProjection.cpp
diff --git a/src/ossim/projection/ossimPolarst.c b/ossim/src/ossim/projection/ossimPolarst.c
similarity index 100%
rename from src/ossim/projection/ossimPolarst.c
rename to ossim/src/ossim/projection/ossimPolarst.c
diff --git a/src/ossim/projection/ossimPolyconicProjection.cpp b/ossim/src/ossim/projection/ossimPolyconicProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimPolyconicProjection.cpp
rename to ossim/src/ossim/projection/ossimPolyconicProjection.cpp
diff --git a/src/ossim/projection/ossimPolynomProjection.cpp b/ossim/src/ossim/projection/ossimPolynomProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimPolynomProjection.cpp
rename to ossim/src/ossim/projection/ossimPolynomProjection.cpp
diff --git a/src/ossim/projection/ossimPositionQualityEvaluator.cpp b/ossim/src/ossim/projection/ossimPositionQualityEvaluator.cpp
similarity index 100%
rename from src/ossim/projection/ossimPositionQualityEvaluator.cpp
rename to ossim/src/ossim/projection/ossimPositionQualityEvaluator.cpp
diff --git a/src/ossim/projection/ossimPpjFrameSensor.cpp b/ossim/src/ossim/projection/ossimPpjFrameSensor.cpp
similarity index 100%
rename from src/ossim/projection/ossimPpjFrameSensor.cpp
rename to ossim/src/ossim/projection/ossimPpjFrameSensor.cpp
diff --git a/src/ossim/projection/ossimProjection.cpp b/ossim/src/ossim/projection/ossimProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimProjection.cpp
rename to ossim/src/ossim/projection/ossimProjection.cpp
diff --git a/ossim/src/ossim/projection/ossimProjectionFactoryBase.cpp b/ossim/src/ossim/projection/ossimProjectionFactoryBase.cpp
new file mode 100644
index 0000000..9fa7a39
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimProjectionFactoryBase.cpp
@@ -0,0 +1,111 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//*******************************************************************
+//  $Id: ossimProjectionFactoryBase.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/projection/ossimProjectionFactoryBase.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/imaging/ossimImageHandler.h>
+//---
+// Define Trace flags for use within this file:
+//---
+#include <ossim/base/ossimTrace.h>
+static ossimTrace traceDebug = ossimTrace("ossimProjectionFactoryBase:debug");
+
+RTTI_DEF1(ossimProjectionFactoryBase, "ossimProjectionFactoryBase", ossimObjectFactory);
+
+ossimProjection* ossimProjectionFactoryBase::createProjectionFromGeometryFile(const ossimFilename& imageFile, ossim_uint32 entryIdx)const
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimProjectionFactoryBase::createProjectionFromGeometryFile "
+         << "DEBUG:"
+         << "\nimageFile:  " << imageFile
+         << "\nentryIdx:   " << entryIdx
+         << std::endl;
+   }
+
+   // Try to find a geometry file for imageFile.
+   
+   ossimFilename geomFile = imageFile;
+   if (entryIdx == 0)
+   {
+      geomFile.setExtension("geom");
+      if(geomFile.exists())
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "Found geometry file:  " << geomFile
+               << std::endl;
+         }
+
+         ossimKeywordlist kwl;
+         if(kwl.addFile(geomFile))
+         {
+            //---
+            // Add the geometry file to the keyword list.
+            // This was added for ossimCoarseGridModel so it can pick up the
+            // file.ocg with a relative path.
+            //
+            // NOTE: The can't be called "geometry_file" as it causes an infinite loop in the factory
+            // code. (drb - 20140211)
+            //---
+            kwl.addPair( std::string("kwl_source"),
+                         geomFile.expand().string(),
+                         false); // Don't overwrite if in there already.
+            
+            return ossimProjectionFactoryRegistry::instance()->
+               createProjection(kwl);
+         }
+      }
+   }
+
+   // Look for an indexed geometry file.
+   geomFile = imageFile.fileNoExtension();
+   geomFile += "_e";
+   geomFile += ossimString::toString(entryIdx);
+   geomFile.setExtension("geom");
+   if(geomFile.exists())
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "Found geometry file:  " << geomFile
+            << std::endl;
+      }
+      
+      ossimKeywordlist kwl;
+      if(kwl.addFile(geomFile))
+      {
+         return ossimProjectionFactoryRegistry::instance()->
+            createProjection(kwl);
+      }
+   }   
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG:  No geometry file found.  Returning NULL..."
+         << std::endl;
+   }
+
+   return NULL;
+}
+
+ossimProjection* ossimProjectionFactoryBase::createProjection(ossimImageHandler* handler)const
+{
+   if(!handler) return 0;
+   return createProjection(handler->getFilename(), handler->getCurrentEntry());
+}
+
+
diff --git a/ossim/src/ossim/projection/ossimProjectionFactoryRegistry.cpp b/ossim/src/ossim/projection/ossimProjectionFactoryRegistry.cpp
new file mode 100644
index 0000000..526cab9
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimProjectionFactoryRegistry.cpp
@@ -0,0 +1,173 @@
+//*******************************************************************
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimProjectionFactoryRegistry.cpp 22898 2014-09-29 15:22:32Z okramer $
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/projection/ossimProjectionFactoryBase.h>
+#include <ossim/projection/ossimEpsgProjectionFactory.h>
+#include <ossim/projection/ossimNgaProjectionFactory.h>
+#include <ossim/projection/ossimWktProjectionFactory.h>
+#include <ossim/projection/ossimMapProjectionFactory.h>
+#include <ossim/projection/ossimTiffProjectionFactory.h>
+#include <ossim/projection/ossimNitfProjectionFactory.h>
+#include <ossim/projection/ossimSensorModelFactory.h>
+#include <ossim/projection/ossimMiscProjectionFactory.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+#include <algorithm>
+#include <vector>
+
+//ossimProjectionFactoryRegistry* ossimProjectionFactoryRegistry::m_instance = 0;
+
+
+ossimProjectionFactoryRegistry::ossimProjectionFactoryRegistry()
+{
+   initializeDefaults();
+   ossimObjectFactoryRegistry::instance()->registerFactory(this);
+}
+
+ossimProjectionFactoryRegistry::ossimProjectionFactoryRegistry(const ossimProjectionFactoryRegistry& rhs)
+:
+ossimObjectFactory(rhs)
+{}
+
+void ossimProjectionFactoryRegistry::operator=(const ossimProjectionFactoryRegistry&)
+{}
+
+ossimProjectionFactoryRegistry::~ossimProjectionFactoryRegistry()
+{
+}
+
+ossimProjectionFactoryRegistry* ossimProjectionFactoryRegistry::instance()
+{
+   static ossimProjectionFactoryRegistry inst;
+
+   return &inst;
+   //   if(!m_instance)
+//   {
+//      m_instance = new ossimProjectionFactoryRegistry();
+//   }
+   
+//   return m_instance;
+}
+
+ossimProjection*
+ossimProjectionFactoryRegistry::createProjection(const ossimFilename& name,
+                                                 ossim_uint32 entryIdx)const
+{
+   ossimProjection* result = 0;
+   ossim_uint32 idx = 0;
+   for(idx = 0; ((idx < m_factoryList.size())&&(!result)); ++idx)
+   {
+      result = m_factoryList[idx]->createProjection(name, entryIdx);
+   }
+   
+   return result;
+}
+
+ossimProjection* ossimProjectionFactoryRegistry::createProjection(ossimImageHandler* handler)const
+{
+   ossimProjection* result = 0;
+   ossim_uint32 idx = 0;
+   for(idx = 0; ((idx < m_factoryList.size())&&(!result)); ++idx)
+   {
+      result = m_factoryList[idx]->createProjection(handler);
+   }
+   
+   return result;
+}
+
+ossimProjection* ossimProjectionFactoryRegistry::createProjection(
+   const ossimKeywordlist& kwl, const char* prefix)const
+{
+   ossimProjection* result = 0;//createNativeObjectFromRegistry(kwl, prefix); 
+   ossim_uint32 idx = 0; 
+   for(idx = 0; ((idx < m_factoryList.size())&&!result);++idx) 
+   { 
+      result = m_factoryList[idx]->createProjection(kwl, prefix); 
+   } 
+   
+   if ( (result == 0) && (prefix == 0) )
+   {
+      //---
+      // Check for an embedded prefix like "image0."
+      //
+      // This is a workaround for people who use the "image_info" application
+      // to create a geometry file.
+      //
+      // If the image has an external geometry file and it has a prefix like
+      // "image0." and someone does:
+      //
+      // theInputConnection->getImageGeometry(kwl);
+      // ossimRefPtr<ossimProjection> proj =
+      // ossimProjectionFactoryRegistry::instance()->createProjection(kwl);
+      //
+      // It will fail because the factory doesn't know it has a prefix.
+      //
+      // ESH 01/2009: I've changed the following so that not just the first
+      // line is checked for "image" and ".".  If the image_info .geom file
+      // was created with the -m (metadata) option, the first lines of the
+      // file will not have the expected structure.
+      //---
+      bool bFoundImageLine = false;
+      ossimKeywordlist::KeywordMap::const_iterator i = kwl.getMap().begin();
+      while ( (i != kwl.getMap().end()) && (bFoundImageLine == false) )
+      {
+         ossimString s1 = (*i).first;
+         if ( s1.size() )
+         {
+            std::vector<ossimString> v;
+            s1.split(v, ossimString("."));
+            if ( v.size() )
+            {
+               if ( v[0].contains("image") )
+               {
+                  bFoundImageLine = true;
+                  ossimString s2 = v[0];
+                  s2 += ".";
+                  idx = 0;
+                  for(;((idx < m_factoryList.size())&&!result); ++idx)
+                  {
+                     result =  m_factoryList[idx]->createProjection(kwl, s2.c_str());
+                  }
+               }
+            }
+         }
+
+         // Go to the next line of the .geom file
+         ++i;
+      }
+   }
+
+   return result;
+}
+
+void ossimProjectionFactoryRegistry::initializeDefaults()
+{
+   registerFactory(ossimSensorModelFactory::instance());
+   registerFactory(ossimNitfProjectionFactory::instance());
+   registerFactory(ossimTiffProjectionFactory::instance());
+   registerFactory(ossimWktProjectionFactory::instance());
+   registerFactory(ossimMapProjectionFactory::instance());
+   registerFactory(ossimMiscProjectionFactory::instance());
+   registerFactory(ossimNgaProjectionFactory::instance());
+
+   // KEEP THIS LAST PLEASE!
+   // This factory constructs map projections from EPSG codes. An infinite loop will occur if this
+   // is placed before the explicit (non-coded) factories, since this factory will invoke the above
+   // factories via this registry after populating a KWL which includes a PCS code. If this factory
+   // sees that request before the others, it will be caught in a loop.
+   registerFactory(ossimEpsgProjectionFactory::instance()); 
+}
+
+extern "C"
+{
+  void* ossimProjectionFactoryRegistryGetInstance()
+  {
+    return ossimProjectionFactoryRegistry::instance();
+  }
+
+}
diff --git a/src/ossim/projection/ossimProjectionViewControllerFactory.cpp b/ossim/src/ossim/projection/ossimProjectionViewControllerFactory.cpp
similarity index 100%
rename from src/ossim/projection/ossimProjectionViewControllerFactory.cpp
rename to ossim/src/ossim/projection/ossimProjectionViewControllerFactory.cpp
diff --git a/src/ossim/projection/ossimQuadProjection.cpp b/ossim/src/ossim/projection/ossimQuadProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimQuadProjection.cpp
rename to ossim/src/ossim/projection/ossimQuadProjection.cpp
diff --git a/ossim/src/ossim/projection/ossimQuickbirdRpcModel.cpp b/ossim/src/ossim/projection/ossimQuickbirdRpcModel.cpp
new file mode 100644
index 0000000..a4ffda4
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimQuickbirdRpcModel.cpp
@@ -0,0 +1,497 @@
+//*****************************************************************************
+// FILE: ossimQuickbirdRpcModel.cpp
+//
+// License:  See top level LICENSE.txt file.
+//
+// DESCRIPTION: Contains declaration of class ossimQuickbirdRpcModel. This 
+//    derived class implements the capability of reading Quickbird RPC support
+//    data.
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimQuickbirdRpcModel.cpp 23564 2015-10-02 14:12:25Z dburken $
+
+#include <ossim/projection/ossimQuickbirdRpcModel.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/support_data/ossimQuickbirdRpcHeader.h>
+#include <ossim/support_data/ossimQuickbirdTile.h>
+#include <ossim/support_data/ossimNitfFile.h>
+#include <ossim/support_data/ossimNitfFileHeader.h>
+#include <ossim/support_data/ossimNitfImageHeader.h>
+#include <ossim/support_data/ossimNitfRpcBase.h>
+#include <ossim/support_data/ossimNitfUse00aTag.h>
+#include <ossim/support_data/ossimNitfPiaimcTag.h>
+#include <ossim/imaging/ossimTiffTileSource.h>
+#include <ossim/imaging/ossimQbTileFilesHandler.h>
+
+static const char* RPC00A_TAG = "RPC00A";
+static const char* RPC00B_TAG = "RPC00B";
+static const char* PIAIMC_TAG = "PIAIMC";
+static const char* USE00A_TAG = "USE00A";
+
+RTTI_DEF1(ossimQuickbirdRpcModel, "ossimQuickbirdRpcModel", ossimRpcModel);
+
+
+//*************************************************************************************************
+// Constructor
+//*************************************************************************************************
+ossimQuickbirdRpcModel::ossimQuickbirdRpcModel()
+   :ossimRpcModel(),
+    theSupportData(new ossimQuickbirdMetaData())
+{
+}
+
+//*************************************************************************************************
+// Constructor
+//*************************************************************************************************
+ossimQuickbirdRpcModel::ossimQuickbirdRpcModel(const ossimQuickbirdRpcModel& rhs)
+   : ossimRpcModel(rhs),
+     theSupportData(new ossimQuickbirdMetaData())
+{
+}
+
+//*************************************************************************************************
+//! Constructor for multiple tile-files sharing common RPC model initializes given pointer
+//! to multi-tile-files handler.
+//*************************************************************************************************
+ossimQuickbirdRpcModel::ossimQuickbirdRpcModel(const ossimQbTileFilesHandler* handler)
+:  ossimRpcModel(),
+   theSupportData(new ossimQuickbirdMetaData())
+{
+   setErrorStatus();
+   if (!handler)
+      return;
+
+   // Make the gsd nan so it gets computed.
+   theGSD.makeNan();
+
+   theImageClipRect = handler->getImageRectangle();
+
+   ossimFilename imageFile = handler->getFilename();
+   if (!parseRpcData(imageFile))
+      return;
+
+   finishConstruction();
+   clearErrorStatus();
+   return;
+}
+
+//*************************************************************************************************
+// Destructor
+//*************************************************************************************************
+ossimQuickbirdRpcModel::~ossimQuickbirdRpcModel()
+{
+   theSupportData = 0;
+}
+
+//*************************************************************************************************
+// Infamous DUP 
+//*************************************************************************************************
+ossimObject* ossimQuickbirdRpcModel::dup() const
+{
+   return new ossimQuickbirdRpcModel(*this);
+}
+
+//*************************************************************************************************
+//! Public method for parsing generic image file.
+//*************************************************************************************************
+bool ossimQuickbirdRpcModel::parseFile(const ossimFilename& file)
+{
+   if (!parseNitfFile(file))
+   {
+      return parseTiffFile(file);
+   }
+   return true;
+}
+
+//*************************************************************************************************
+//! Parses a NITF image file for RPC info. Returns TRUE if successful.
+//*************************************************************************************************
+bool ossimQuickbirdRpcModel::parseNitfFile(const ossimFilename& file)
+{
+   setErrorStatus();
+   ossimFilename nitfFile = file;
+   
+   ossimRefPtr<ossimNitfFile> nitfFilePtr = new ossimNitfFile;
+   
+   if(!nitfFilePtr->parseFile(nitfFile))
+   {
+      nitfFile = nitfFile.setExtension("NTF");
+      if(!nitfFilePtr->parseFile(nitfFile))
+      {
+         nitfFile = nitfFile.setExtension("ntf");
+         if(!nitfFilePtr->parseFile(nitfFile))
+            return false;
+      }
+   }
+   
+   ossimRefPtr<ossimNitfImageHeader> ih = nitfFilePtr->getNewImageHeader(0);
+   if (!ih)
+      return false;
+
+   theImageClipRect = ih->getImageRect();
+ 
+   // Give preference to external RPC data file:
+   bool useInternalRpcTags = false;
+   if(!parseRpcData(file))
+      useInternalRpcTags = true;
+   if (!parseTileData(file))
+      return false;
+ 
+   // Check for IMD (metadata) file:
+   parseMetaData(file);
+
+   // Get the gsd.
+   theGSD.line = ossim::nan();
+   theGSD.samp = ossim::nan();
+   
+   ossimRefPtr<ossimNitfRegisteredTag> tag;
+   tag = ih->getTagData(PIAIMC_TAG);
+   if (tag.valid())
+   {
+      ossimNitfPiaimcTag* p = PTR_CAST(ossimNitfPiaimcTag, tag.get());
+      if (p)
+      {
+         theGSD.line = p->getMeanGsdInMeters();
+         theGSD.samp = theGSD.line;
+      }
+   }
+   if (ossim::isnan(theGSD.line))
+   {
+      tag = ih->getTagData(USE00A_TAG);
+      if (tag.valid())
+      {
+         ossimNitfUse00aTag* p = PTR_CAST(ossimNitfUse00aTag, tag.get());
+         if (p)
+         {
+            theGSD.line = p->getMeanGsdInMeters();
+            theGSD.samp = theGSD.line;
+         }
+      }
+   }
+
+   // If external RPC data file was correctly parsed, then we can bypass this code block. Otherwise
+   // need to parse internal NITF tags for RPC data:
+   if (useInternalRpcTags)
+   {
+      // Get the the RPC tag:
+      ossimNitfRpcBase* rpcTag = NULL;
+      
+      // Look for the RPC00B tag first.
+      tag = ih->getTagData(RPC00B_TAG);
+      if (tag.valid())
+         rpcTag = PTR_CAST(ossimNitfRpcBase, tag.get());
+      
+      if (!tag.valid())
+      {
+         // Look for RPC00A tag.
+         tag = ih->getTagData(RPC00A_TAG);
+         if (tag.valid())
+            rpcTag = PTR_CAST(ossimNitfRpcBase, tag.get());
+      }
+      
+      if (!rpcTag)
+         return false;
+      
+      // Set the polynomial type.
+      if (rpcTag->getRegisterTagName() == "RPC00B")
+         thePolyType = B;
+      else
+         thePolyType = A;
+
+      // Parse coefficients:
+      for (ossim_uint32 i=0; i<20; ++i)
+      {
+         theLineNumCoef[i] = rpcTag->getLineNumeratorCoeff(i).toFloat64();
+         theLineDenCoef[i] = rpcTag->getLineDenominatorCoeff(i).toFloat64();
+         theSampNumCoef[i] = rpcTag->getSampleNumeratorCoeff(i).toFloat64();
+         theSampDenCoef[i] = rpcTag->getSampleDenominatorCoeff(i).toFloat64();
+      }
+
+      // Initialize other items in tags:
+      theLineScale  = rpcTag->getLineScale().toFloat64();
+      theSampScale  = rpcTag->getSampleScale().toFloat64();
+      theLatScale   = rpcTag->getGeodeticLatScale().toFloat64();
+      theLonScale   = rpcTag->getGeodeticLonScale().toFloat64();
+      theHgtScale   = rpcTag->getGeodeticHeightScale().toFloat64();
+      theLineOffset = rpcTag->getLineOffset().toFloat64();
+      theSampOffset = rpcTag->getSampleOffset().toFloat64();
+      theLatOffset  = rpcTag->getGeodeticLatOffset().toFloat64();
+      theLonOffset  = rpcTag->getGeodeticLonOffset().toFloat64();
+      theHgtOffset  = rpcTag->getGeodeticHeightOffset().toFloat64();
+      theImageID    = ih->getImageId();
+   }
+
+   finishConstruction();
+   clearErrorStatus();
+   return true;
+}
+
+//*************************************************************************************************
+//! Parses a tagged TIFF image file for RPC info. Returns TRUE if successful.
+//*************************************************************************************************
+bool ossimQuickbirdRpcModel::parseTiffFile(const ossimFilename& file)
+{
+   setErrorStatus();
+
+   // Make the gsd nan so it gets computed.
+   theGSD.makeNan();
+
+   ossimFilename tiffFile = file;
+   ossimRefPtr<ossimTiffTileSource> tiff = new ossimTiffTileSource();
+   if (!tiff->open(file))
+   {
+      return false;
+   }
+
+   theImageClipRect = tiff->getImageRectangle();
+
+   parseMetaData(file);
+
+   if (!parseRpcData(file))
+      return false;
+
+   if (!parseTileData(file))
+      return false;
+
+   finishConstruction();
+   clearErrorStatus();
+   return true;
+}
+
+//*************************************************************************************************
+//! Given some base name for the image data, parses the associated RPC data file. Returns TRUE
+//! if successful
+//*************************************************************************************************
+bool ossimQuickbirdRpcModel::parseRpcData(const ossimFilename& base_name)
+{
+   ossimFilename rpcFile (base_name);
+
+   // There are two possibilities for RPC data files: either each image file has its own RPC data
+   // file, or a single RPC file is provided for a multi-tile scene.
+   rpcFile.setExtension("RPB");
+   if (!findSupportFile(rpcFile))
+   {
+      rpcFile.setExtension("RPA");
+      if (!findSupportFile(rpcFile))
+         return false;
+   }
+
+   // An RPC file was located, open it:
+   ossimQuickbirdRpcHeader hdr;
+   if(!hdr.open(rpcFile))
+      return false;
+
+   if(hdr.isAPolynomial())
+      thePolyType = A;
+   else
+      thePolyType = B;
+
+   std::copy(hdr.theLineNumCoeff.begin(), hdr.theLineNumCoeff.end(), theLineNumCoef);
+   std::copy(hdr.theLineDenCoeff.begin(), hdr.theLineDenCoeff.end(), theLineDenCoef);
+   std::copy(hdr.theSampNumCoeff.begin(), hdr.theSampNumCoeff.end(), theSampNumCoef);
+   std::copy(hdr.theSampDenCoeff.begin(), hdr.theSampDenCoeff.end(), theSampDenCoef);
+
+   theLineScale  = hdr.theLineScale;
+   theSampScale  = hdr.theSampScale;
+   theLatScale   = hdr.theLatScale;
+   theLonScale   = hdr.theLonScale;
+   theHgtScale   = hdr.theHeightScale;
+   theLineOffset = hdr.theLineOffset;
+   theSampOffset = hdr.theSampOffset;
+   theLatOffset  = hdr.theLatOffset;
+   theLonOffset  = hdr.theLonOffset;
+   theHgtOffset  = hdr.theHeightOffset;
+   theImageID    = rpcFile.fileNoExtension();
+
+   return true;
+}
+
+
+//*************************************************************************************************
+//! Initializes the support data member with metadata file info. Returns TRUE if successful
+//*************************************************************************************************
+bool ossimQuickbirdRpcModel::parseMetaData(const ossimFilename& base_name)
+{
+
+   ossimFilename metadataFile (base_name);
+   metadataFile.setExtension("IMD");
+   if (!findSupportFile(metadataFile))
+      return false;
+
+   if ( !theSupportData.valid() )
+      theSupportData = new ossimQuickbirdMetaData();
+
+   if(!theSupportData->open(metadataFile))
+   {
+      theSupportData = 0; // ossimRefPtr
+      ossimNotify(ossimNotifyLevel_WARN) << "ossimQuickbirdRpcModel::parseNitfFile WARNING:"
+         << "\nCould not open IMD file.  Sensor ID unknown." << std::endl;
+      return false;
+   }
+
+   theSensorID = theSupportData->getSatID();
+   return true;
+}
+
+//*************************************************************************************************
+//! Reads the TIL file for pertinent info. Returns TRUE if successful
+//*************************************************************************************************
+bool ossimQuickbirdRpcModel::parseTileData(const ossimFilename& image_file)
+{
+   ossimFilename tileFile (image_file);
+   tileFile.setExtension("TIL");
+  if (!findSupportFile(tileFile))
+      return false;
+   ossimQuickbirdTile tileHdr;
+   if(!tileHdr.open(tileFile))
+      return false;
+
+   ossimQuickbirdTileInfo info;
+   if(!tileHdr.getInfo(info, image_file.file()))
+      return false;
+   if((info.theUlXOffset != OSSIM_INT_NAN) && (info.theUlYOffset != OSSIM_INT_NAN) &&
+      (info.theLrXOffset != OSSIM_INT_NAN) && (info.theLrYOffset != OSSIM_INT_NAN) &&
+      (info.theLlXOffset != OSSIM_INT_NAN) && (info.theLlYOffset != OSSIM_INT_NAN) &&
+      (info.theUrXOffset != OSSIM_INT_NAN) && (info.theUrYOffset != OSSIM_INT_NAN))
+   {
+      theImageClipRect = ossimIrect(ossimIpt(info.theUlXOffset, info.theUlYOffset),
+                                    ossimIpt(info.theUrXOffset, info.theUrYOffset),
+                                    ossimIpt(info.theLrXOffset, info.theLrYOffset),
+                                    ossimIpt(info.theLlXOffset, info.theLlYOffset));
+   }
+   else if ((info.theUlXOffset != OSSIM_INT_NAN) && (info.theUlYOffset != OSSIM_INT_NAN) &&
+      (theImageClipRect.width() != OSSIM_INT_NAN) && (theImageClipRect.height() != OSSIM_INT_NAN))
+   {
+      theImageClipRect = ossimIrect(info.theUlXOffset, info.theUlYOffset,
+                                    info.theUlXOffset+theImageClipRect.width()-1, 
+                                    info.theUlYOffset+theImageClipRect.height()-1);
+   }
+
+   return true;
+}
+
+//*************************************************************************************************
+//! Collects common code among all parsers
+//*************************************************************************************************
+void ossimQuickbirdRpcModel::finishConstruction()
+{
+   theImageSize.line = theImageClipRect.height();
+   theImageSize.samp = theImageClipRect.width();
+   theRefImgPt.line = theImageClipRect.midPoint().y;
+   theRefImgPt.samp = theImageClipRect.midPoint().x;
+   theRefGndPt.lat = theLatOffset;
+   theRefGndPt.lon = theLonOffset;
+   theRefGndPt.hgt = theHgtOffset;
+
+   //---
+   // NOTE:  We must call "updateModel()" to set parameter used by base
+   // ossimRpcModel prior to calling lineSampleHeightToWorld or all
+   // the world points will be same.
+   //---
+   updateModel();
+
+   ossimGpt v0, v1, v2, v3;
+   lineSampleHeightToWorld(theImageClipRect.ul(), theHgtOffset, v0);
+   lineSampleHeightToWorld(theImageClipRect.ur(), theHgtOffset, v1);
+   lineSampleHeightToWorld(theImageClipRect.lr(), theHgtOffset, v2);
+   lineSampleHeightToWorld(theImageClipRect.ll(), theHgtOffset, v3);
+
+   theBoundGndPolygon = ossimPolygon (ossimDpt(v0), ossimDpt(v1), ossimDpt(v2), ossimDpt(v3));
+
+   // Set the ground reference point using the model.
+   lineSampleHeightToWorld(theRefImgPt, theHgtOffset, theRefGndPt);
+
+   if( theGSD.hasNans() )
+   {
+      try
+      {
+         // This will set theGSD and theMeanGSD. Method throws ossimException.
+         computeGsd();
+      }
+      catch (const ossimException& e)
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimQuickbirdRpcModel::finishConstruction -- caught exception:\n"
+            << e.what() << std::endl;
+      }
+   }
+}
+
+bool ossimQuickbirdRpcModel::saveState(ossimKeywordlist& kwl,
+                                       const char* prefix) const
+{
+   // sanity check only.  This shoulc always be true
+   if(theSupportData.valid())
+   {
+      ossimString supportPrefix = ossimString(prefix) + "support_data.";
+      theSupportData->saveState(kwl, supportPrefix);
+   }
+
+   return ossimRpcModel::saveState(kwl, prefix);
+}
+
+bool ossimQuickbirdRpcModel::loadState(const ossimKeywordlist& kwl,
+                                       const char* prefix)
+{
+   // sanity check only.  This shoulc always be true
+   if(theSupportData.valid())
+   {
+      ossimString supportPrefix = ossimString(prefix) + "support_data.";
+      theSupportData->loadState(kwl, supportPrefix);
+   }
+   return ossimRpcModel::loadState(kwl, prefix);
+}
+
+//*************************************************************************************************
+// Given an initial filename with case-agnostic extension, this method searches first for an
+// image-specific instance of that file (i.e., with R*C* in the filename) before considering
+// the mosaic-global support file (R*C* removed). If a file is found, the argument is modified to
+// match the actual filename and TRUE is returned. Otherwise, argument filename is left unchanged
+// and FALSE is returned.
+//*************************************************************************************************
+bool ossimQuickbirdRpcModel::findSupportFile(ossimFilename& filename) const
+{
+   ossimFilename f (filename);
+   ossimString extension = f.ext();
+   if(f.exists())
+   {
+      filename = f;
+      return true;
+   }
+   // Search for support file with same basename as image:
+   extension.upcase();
+   f.setExtension(extension);
+   if(f.exists())
+   {
+      filename = f;
+      return true;
+   }
+   extension.downcase();
+   if(f.exists())
+   {
+      filename = f;
+      return true;
+   }
+
+   // None found so far, search for mosaic-global support file:
+   f = f.replaceAllThatMatch("_R[0-9]+C[0-9]+");
+   if(f.exists())
+   {
+      filename = f;
+      return true;
+   }
+  extension.upcase();
+   f.setExtension(extension);
+   if(f.exists())
+   {
+      filename = f;
+      return true;
+   }
+
+
+   // Modify argument to match good filename:
+   return false;
+}
diff --git a/ossim/src/ossim/projection/ossimRS1SarModel.cpp b/ossim/src/ossim/projection/ossimRS1SarModel.cpp
new file mode 100644
index 0000000..e462168
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimRS1SarModel.cpp
@@ -0,0 +1,1087 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Oscar Kramer
+//
+// Description:
+//
+// Sensor Model for Radarsat1 SAR sensor.
+// 
+//*******************************************************************
+//  $Id:$
+
+#include <ossim/projection/ossimRS1SarModel.h>
+#include <cstdio>
+#include <fstream>
+#include <iomanip>
+#include <iostream>
+#include <sstream>
+#include <string>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/matrix/newmat.h>
+#include <ossim/base/ossimLsrPoint.h>
+#include <ossim/elevation/ossimElevManager.h>
+
+
+using namespace std;
+using namespace ossim;
+
+static ossimTrace traceDebug("ossimRS1SarModel:debug");
+
+static const double SEC_PER_DAY              = 86400.0;
+static const double NOMINAL_ORBIT_ELEVATION  = 798000.0; // m
+static const double DEG_PER_SEC              = 0.004178074;
+static const double INTRACK_OFFSET_SIGMA     = 1000.0;  // meters
+static const double CRTRACK_OFFSET_SIGMA     = 300.0;
+static const double RADIAL_OFFSET_SIGMA      = 300.0;
+static const double LINE_SCALE_SIGMA         = 0.01;
+static const double SKEW_SIGMA               = 0.1;  // deg
+static const double ORIENTATION_SIGMA        = 0.2;  // deg
+static const double EARTH_ANGULAR_VELOCITY   = 7.2921151467e-05;  // radians/sec
+static const char*  IMAGING_MODE_ID[] = 
+{"UNKNOWN", "SCN", "SCW", "SGC", "SGF", "SGX", "SLC", "SPG", "SSG","RAW","ERS"};
+
+//******************************************************************************
+// Default.
+//******************************************************************************
+ossimRS1SarModel::ossimRS1SarModel()
+:  theCeosData        (0),
+   theImagingMode     (UNKNOWN_MODE)
+{
+   setErrorStatus();
+}
+
+//******************************************************************************
+// Takes a ossimFilename& directory containing support data, initializes the model,
+// and writes out the initial geometry file.
+//******************************************************************************
+ossimRS1SarModel::ossimRS1SarModel(const ossimFilename& imageFile)
+   :
+      theCeosData        (0),
+      theImagingMode     (UNKNOWN_MODE)
+{
+   static const char MODULE[] = "Constructor ossimRS1SarModel(ossimFilename)";
+   if (traceDebug())  CLOG << "entering..." << endl;
+
+   clearErrorStatus();
+
+   // Parse the CEOS data files:
+   ossimFilename dataDirName (imageFile.path());
+   initFromCeos(dataDirName);
+   if(getErrorStatus() != ossimErrorCodes::OSSIM_OK)
+   {
+      return;
+   }
+   if (theImagingMode == UNKNOWN_MODE) 
+      return;
+
+   // Parse the image data file for the local ORPs interpolator:
+   if ((theImagingMode == SCN) || (theImagingMode == SCW))
+      establishOrpGrid();
+   else
+      establishOrpInterp();
+
+   // Establish the ephemeris interpolator:
+   establishEphemeris();
+
+   initAdjParms();
+   establishVehicleSpace();
+
+   if (traceDebug())  CLOG << "returning..." << endl;
+   return;
+}
+
+
+//******************************************************************************
+//  DESTRUCTOR: ~ossimRS1SarModel
+//******************************************************************************
+ossimRS1SarModel::~ossimRS1SarModel()
+{
+   deallocateMemory();
+}
+
+//******************************************************************************
+//  loadSate()
+//******************************************************************************
+bool ossimRS1SarModel::loadState(const ossimKeywordlist& /* kwl */, const char* /* prefix */)
+{
+   // NOT YET IMPLEMENTED
+   setErrorStatus();
+   return false;
+}
+
+//******************************************************************************
+//  saveState()
+//******************************************************************************
+bool ossimRS1SarModel::saveState(ossimKeywordlist& /* kwl */, const char* /* prefix */) const
+{
+   // NOT YET IMPLEMENTED
+   setErrorStatus();
+   return false;
+}
+
+//*************************************************************************************************
+//! Given an image point, returns a ray originating at some arbitrarily high
+//! point (in this model at the sensor position) and pointing towards the target.
+//*************************************************************************************************
+void ossimRS1SarModel::imagingRay(const ossimDpt& image_point, ossimEcefRay& /* image_ray */) const
+{
+   const char* MODULE = "ossimRS1SarModel::imagingRay()";
+
+   // Apply offset, scale, skew, and rotation to image point:
+   ossimDpt offset (theImageSize.line/2.0, theImageSize.samp/2.0);
+   ossimDpt ip1 = image_point - offset;
+   ossimDpt ip2;
+   ip2.line = ip1.line*theCosOrientation*theLineScale +
+      ip1.samp*(theCosOrientation*theSinSkew+theSinOrientation);
+   ip2.samp = -ip1.line*theSinOrientation*theLineScale -
+      ip1.samp*(theSinOrientation*theSinSkew-theCosOrientation);
+
+   // Offset point back to origin of image:
+   ip1 = ip2 + offset;
+
+   // Given new line number, obtain the interpolated ORP:
+   ossimEcefPoint localORP;
+   if ((theImagingMode == SCN) || (theImagingMode == SCW))
+   {
+      ossimGpt gpt (theLatGrid(ip1.x, ip1.y), theLonGrid(ip1.x, ip1.y), theRefHeight);
+      localORP = ossimEcefPoint(gpt);
+   }
+   else
+   {
+      NEWMAT::ColumnVector orpPos(3);
+      theLocalOrpInterp->interpolate(ip1.line, orpPos);
+      localORP = ossimEcefPoint(orpPos[0], orpPos[1], orpPos[2]);
+   }
+   
+   // Establish imaging line time (zero-Doppler time):
+   double arpTime = theFirstLineTime + ip1.line*theTimePerLine;
+
+   NEWMAT::ColumnVector arpEph(3);
+   theArpPosInterp->interpolate(arpTime, arpEph);
+   ossimEcefPoint ecfArpPos (arpEph[0], arpEph[1], arpEph[2]);
+
+   theArpVelInterp->interpolate(arpTime, arpEph);
+   ossimEcefVector ecfArpVel (arpEph[0], arpEph[1], arpEph[2]);
+
+   // Need to correct the velocity vector by the earth rotational velocity:
+   ossimEcefVector earthVel 
+      (-ecfArpPos.y()*EARTH_ANGULAR_VELOCITY, ecfArpPos.x()*EARTH_ANGULAR_VELOCITY, 0.0);
+   ecfArpVel = ecfArpVel - earthVel;
+
+   // Compute a vehicle space with Z near intrack, X normal to Z and range
+   // vector to ORP (slant range normal), and Y in range direction.
+   // Note the application of the position adjustable parameter to the space's
+   // origin (after the range vector was established):
+   ossimEcefVector rangeVector     = localORP - ecfArpPos;
+   ossimEcefVector rangeNormal     = rangeVector.cross(ecfArpVel);
+   // ossimEcefVector zDirection      = rangeNormal.cross(rangeVector);
+   ossimLsrSpace localVehicleSpace (ossimEcefPoint(ecfArpPos + thePosCorrection), // origin
+                                    rangeNormal,  // X-direction
+                                    rangeVector, 0);   // Y-direction (Z not specified
+   double local_orp_range = rangeVector.length();
+
+   // Compute slant range distance to pixel in question:
+   double slant_range = local_orp_range;
+   switch (theImagingMode)
+   {
+   case SLC:
+      if (theDirectionFlag == ASCENDING)
+         slant_range += thePixelSpacing.samp*ip1.samp;
+      else
+         slant_range += (theImageSize.samp-1.0-ip1.samp) * thePixelSpacing.samp;
+      break;
+
+   case SGC:
+   case SGF:
+   case SGX:
+   case ERS:
+      {
+         // Compute the slant range as a polynomial expansion given ground range
+         double ground_range;
+         if (theDirectionFlag == ASCENDING)
+            ground_range = ip1.samp * thePixelSpacing.samp;
+         else
+            ground_range = (theImageSize.samp - 1.0 - ip1.samp) *
+            thePixelSpacing.samp;
+         //         double delta_g_i = 1.0;
+         //         for (int 0=1; i<6; i++)
+         double delta_g_i = ground_range;
+         for (int i=1; i<6; i++)  // NOTE: not using offset (i=0) term
+         {
+            slant_range += theSrGrCoeff[i] * delta_g_i;
+            delta_g_i *= ground_range;
+         }
+      }
+      break;
+
+   case SCN:
+   case SCW:
+      slant_range = local_orp_range;
+      break;
+
+   default:
+      CLOG << "ERROR: Invalid imaging mode encountered." << endl;
+      setErrorStatus();
+   }
+}
+
+//*************************************************************************************************
+// PUBLIC METHOD: ossimRS1SarModel::lineSampleHeightToWorld(image_point, height, is_inside_image)
+//
+//  Performs image to ground projection. 
+//*************************************************************************************************
+void ossimRS1SarModel::lineSampleHeightToWorld(const ossimDpt& image_point,
+                                               const double&   height_ellip,
+                                               ossimGpt&       worldPt) const
+{
+   static const char MODULE[] = "ossimRS1SarModel::lineSampleHeightToWorld()";
+   if (traceDebug())  CLOG << "entering..." << endl;
+
+   // static const int    MAX_NUM_ITERS = 50;
+   // static const double MAX_ELEV_DIFF = 0.001;
+
+   ossimEcefRay imaging_ray;
+   imagingRay(image_point, imaging_ray);
+   worldPt = imaging_ray.intersectAboveEarthEllipsoid(height_ellip);
+         
+   if (traceDebug())  CLOG << "returning..." << endl;
+}
+
+//******************************************************************************
+//  This method sets theImagingMode data member given a character string
+//  abbreviation of the mode.
+//******************************************************************************
+void ossimRS1SarModel::setImagingMode(char* modeStr)
+{
+   static const char MODULE[] = "ossimRS1SarModel::setImagingMode(modeStr)";
+   if (traceDebug())  CLOG << "entering..." << endl;
+
+   bool illegal_mode = false;
+   
+   if (strcmp(modeStr, "SCN") == 0)
+   {
+      theImagingMode = SCN;
+   }
+   else if (strcmp(modeStr, "SCW") == 0)
+   {
+      theImagingMode = SCW;
+   }
+   else if (strcmp(modeStr, "SGC") == 0)
+   {
+      theImagingMode = SGC;
+   }
+   else if (strcmp(modeStr, "SGF") == 0)
+   {
+      theImagingMode = SGF;
+   }
+   else if (strcmp(modeStr, "SGX") == 0)
+   {
+      theImagingMode = SGX;
+   }
+   else if (strcmp(modeStr, "SLC") == 0)
+   {
+      theImagingMode = SLC;
+   }
+   else if (strcmp(modeStr, "SPG") == 0)
+   {
+      theImagingMode = SPG;
+      illegal_mode = true;
+   }
+   else if (strcmp(modeStr, "SSG") == 0)
+   {
+      theImagingMode = SSG;
+      illegal_mode = true;
+   }
+   else if (strcmp(modeStr, "RAW") == 0)
+   {
+      theImagingMode = RAW;
+      illegal_mode = true;
+   }
+   else if (strcmp(modeStr, "ERS") == 0)
+   {
+      theImagingMode = ERS;
+   }
+   else 
+   {
+      theImagingMode = UNKNOWN_MODE;
+      illegal_mode = true;
+   }
+
+   // Test for ERS product:
+   if ((theImagingMode == UNKNOWN_MODE) && theCeosData.valid())
+   {
+      char buf[] = "xxx";
+      strncpy(buf, &(theCeosData->textRec()->product_type[8]), 3);
+      if (strcmp(buf, "ERS") == 0)
+      {
+         theImagingMode = ERS;
+         illegal_mode = false;
+      }
+   }
+      
+   // Filter the imaging modes that are not handled:
+   if (illegal_mode)
+   {
+      CLOG << "\n\t ERROR: The imaging mode <"
+           << IMAGING_MODE_ID[(int) theImagingMode]
+           << "> is currently not supported. \n" << endl;
+      theImagingMode = UNKNOWN_MODE;
+   }
+   
+   if (traceDebug())  CLOG << "returning..." << endl;
+}
+
+
+//******************************************************************************
+//  Initialize various data members from the CEOS records.
+//******************************************************************************
+void ossimRS1SarModel::initFromCeos(const ossimFilename& fname)
+{
+   static const char MODULE[] = "ossimRS1SarModel::initFromCeos()";
+   if (traceDebug())  CLOG << "entering..." << endl;
+
+   // Instantiate a CeosData object:
+   theCeosData = new ossimCeosData(fname);
+   
+   if(theCeosData->errorStatus() != ossimErrorCodes::OSSIM_OK) return;
+   const dataset_sum_rec* dsr = theCeosData->dataSetSumRec();
+   const proc_parm_rec*   ppr = theCeosData->procParmRec();
+   char buf[1024];
+   
+   // Set imaging mode:
+   strncpy(buf, &(theCeosData->volDescRec()->logvol_id[11]), 3);
+   buf[3] = '\0';
+   setImagingMode(buf);
+   
+   // Determine whether ascending or descending path acquisition. This flag
+   // dictates whether the first or last pixel of a line is of shorter range:
+   if (theImagingMode == ERS)
+   {
+      theDirectionFlag = DESCENDING;
+   }
+   else
+   {
+      if (dsr->asc_des[0] == 'A')
+         theDirectionFlag = ASCENDING;
+      else if (dsr->asc_des[0] == 'D')
+         theDirectionFlag = DESCENDING;
+      else
+      {
+         CLOG << "ERROR: Direction Flag: " << dsr->asc_des << " not supported"
+              << endl;
+         theDirectionFlag = UNKNOWN_DIRECTION;
+         setErrorStatus();
+         if (traceDebug())  CLOG << "returning with error..." << endl;
+         return;
+      }
+   }
+
+   // Image (Product) ID:
+   buf[8] = '\0';
+   strncpy(buf, theCeosData->volDescRec()->product_id, 8);
+   theImageID = buf;
+   
+   // pixel spacing in range:
+   buf[16] = '\0';
+   strncpy(buf, dsr->pix_spacing, 16);
+   thePixelSpacing.samp = atof(buf);
+   
+   // pixel spacing in azimuth:
+   strncpy(buf, dsr->line_spacing, 16);
+   buf[16] = '\0';
+   thePixelSpacing.line = atof(buf);
+
+   // The ground reference point (ORP) latitude:
+   ossimGpt grp;
+   strncpy(buf, dsr->pro_lat, 16);
+   buf[16] = '\0';
+   grp.lat = atof(buf);
+      
+   // The ground reference point (ORP) longitude:
+   strncpy(buf, dsr->pro_long, 16);
+   buf[16] = '\0';
+   grp.lon = atof(buf);
+      
+   // The ground reference point (ORP) elevation:
+   strncpy(buf, dsr->terrain_h, 16);
+   buf[16] = '\0';
+   grp.hgt = atof(buf);
+   theORP = ossimEcefPoint(grp);
+   theRefHeight = grp.hgt;
+   
+   // Illumination elevation:
+   strncpy(buf, dsr->incident_ang, 8);
+   buf[8] = '\0';
+   double incidence = atof(buf);
+   theIllumElevation = 90.0 - incidence;
+
+   // Illumination azimuth -- need to determine whether sensor is in normal
+   // right-looking mode or "antarctic" (left-looking) mode:
+   strncpy(buf, dsr->plat_head, 8);
+   theIllumAzimuth = atof(buf);
+   char sensor_orientation[] = "123456789";
+   strncpy(sensor_orientation, ppr->sens_orient, 9);
+   if (strcmp(sensor_orientation, "ANTARCTIC") == 0)
+   {
+      theIllumAzimuth -= 90.0;
+      if (theIllumAzimuth < 0.0) theIllumAzimuth += 360.0;
+   }
+   else
+   {
+      theIllumAzimuth += 90.0;
+      if (theIllumAzimuth >= 360.0) theIllumAzimuth -= 360.0;
+   }
+
+   // Determine the number of lines per image and pixels per line. NOTE: if
+   // image is scan mode, the number of lines must be computed indirectly. 
+   if ((theImagingMode == SCN) || (theImagingMode == SCW))
+   {
+      FILE* fptr = fopen(theCeosData->imageFile().chars(), "r");
+      if (!fptr)
+      {
+         CLOG << " ERROR:\n\tCannot open CEOS image file: "
+              << theCeosData->imageFile() << endl;
+         setErrorStatus();
+         return;
+      }
+      fseek(fptr, 0, SEEK_END);
+      long byte_count = ftell(fptr);
+      buf[6] = '\0';
+      strncpy(buf, theCeosData->imopDescRec()->l_dataset, 6);
+      int lengthOfRec = atoi(buf);
+      theImageSize.line = (byte_count - sizeof(*theCeosData->imopDescRec()))
+                           /lengthOfRec;
+      fclose(fptr);
+   }
+   else
+   {
+      strncpy(buf, theCeosData->imopDescRec()->n_dataset, 6);
+      buf[6] = '\0';
+      theImageSize.line = atoi(buf);
+   }
+   strncpy(buf, theCeosData->imopDescRec()->nleft, 4);
+   buf[4] = '\0';
+   int left_pixels = atoi(buf);
+   strncpy(buf, theCeosData->imopDescRec()->ngrp, 8);
+   buf[8] = '\0';
+   int data_pixels = atoi(buf);
+   strncpy(buf, theCeosData->imopDescRec()->nright, 4);
+   buf[4] = '\0';
+   int right_pixels  = atoi(buf);
+   theImageSize.samp = left_pixels + data_pixels + right_pixels;
+
+   // If ground range product, need to read the ground-to-slant range
+   // conversion coefficients from the proc_parm_rec. NOTE: only single-look
+   // products handled properly. ScanSAR requires reading multiple coefficient
+   // sets. See MDA Detailed Processing Parameter Record Description sec.3.84.
+   if ((theImagingMode==SGC) ||
+       (theImagingMode==SGF) ||
+       (theImagingMode==SGX) ||
+       (theImagingMode==ERS))
+   {
+      buf[16] = '\0';
+      for (int i=0; i<6; i++)
+      {
+         strncpy(buf, ppr->srgr_coefset[0].srgr_coef[i], 16);
+         theSrGrCoeff[i] = atof(buf);
+      }
+   }
+   else
+   {
+      theSrGrCoeff[0] = 0.0;
+      theSrGrCoeff[1] = 1.0;  // note 1.0 here (should never be accessed)
+      theSrGrCoeff[2] = 0.0;
+      theSrGrCoeff[3] = 0.0;
+      theSrGrCoeff[4] = 0.0;
+      theSrGrCoeff[5] = 0.0;
+   }
+   
+   if (traceDebug())
+   {
+      CLOG << "DEBUG -- "
+           << "\n\t theDirectionFlag = " << theDirectionFlag
+           << "\n\t thePixelSpacing = " << thePixelSpacing
+           << "\n\t theORP = " << theORP
+           << "\n\t theRefHeight = " << theRefHeight
+           << "\n\t theImageSize = " << theImageSize
+           << "\n\t sensor_orientation = " << sensor_orientation
+           << "\n\t theIllumElevation = " << theIllumElevation
+           << "\n\t theIllumAzimuth = " << theIllumAzimuth
+           << endl;
+   }
+
+   if (traceDebug())  CLOG << "returning..." << endl;
+}
+
+
+//******************************************************************************
+//  This method sets the rigorous model adjustable parameters to
+//  their initial values.
+//******************************************************************************
+void ossimRS1SarModel::initAdjParms()
+{
+   // Adjustable model not yet implemented
+#if 0
+
+   static const char* MODULE = "ossimRS1SarModel::initAdjParms()";
+   if (traceDebug())  CLOG << "entering..." << endl;
+
+   theInTrackOffset = (init_adj_parm[INTRACK_OFFSET]+adj_parm[INTRACK_OFFSET])
+                      * adj_sigma[INTRACK_OFFSET];
+   
+   theCrTrackOffset = (init_adj_parm[CRTRACK_OFFSET]+adj_parm[CRTRACK_OFFSET])
+                      * adj_sigma[CRTRACK_OFFSET];
+   
+   theRadialOffset = (init_adj_parm[RADIAL_OFFSET]+adj_parm[RADIAL_OFFSET])
+                     * adj_sigma[RADIAL_OFFSET];
+   
+   theLineScale   = (init_adj_parm[LINE_SCALE]+adj_parm[LINE_SCALE])
+                    * adj_sigma[LINE_SCALE];
+   
+   theSkew        = (init_adj_parm[SKEW]+adj_parm[SKEW])
+                    * adj_sigma[SKEW];
+   
+   theOrientation = (init_adj_parm[ORIENTATION]+adj_parm[ORIENTATION]);
+
+   // Initialize base-class initial adjustable parameter array:
+   init_adj_parm[INTRACK_OFFSET]  = theInTrackOffset/adj_sigma[INTRACK_OFFSET];
+   init_adj_parm[CRTRACK_OFFSET]  = theCrTrackOffset/adj_sigma[CRTRACK_OFFSET];
+   init_adj_parm[RADIAL_OFFSET]   = theRadialOffset/adj_sigma[RADIAL_OFFSET];  
+   init_adj_parm[LINE_SCALE]      = theLineScale/adj_sigma[LINE_SCALE];  
+   init_adj_parm[SKEW]            = theSkew/adj_sigma[SKEW];  
+   init_adj_parm[ORIENTATION]     = theOrientation/adj_sigma[ORIENTATION];  
+   
+   //  Initialize sensor adjustable parameter description strings:
+   strncpy (adj_desc[INTRACK_OFFSET], "intrack_offset", MAX_DESC_CHARS);
+   strncpy (adj_desc[CRTRACK_OFFSET], "crtrack_offset", MAX_DESC_CHARS);
+   strncpy (adj_desc[RADIAL_OFFSET],  "radial_offset",  MAX_DESC_CHARS);
+//   strncpy (adj_desc[SAMP_SCALE],  "samp_scale",      MAX_DESC_CHARS);
+   strncpy (adj_desc[LINE_SCALE],   "line_scale",       MAX_DESC_CHARS);
+   strncpy (adj_desc[SKEW],         "image_skew",       MAX_DESC_CHARS);
+   strncpy (adj_desc[ORIENTATION],  "image_orientation",MAX_DESC_CHARS);
+
+   // Initialize the adj_parms (parameter corrections) to 0:
+   for (int i=0; i<num_adj_parm; i++)
+      adj_parm[i] = 0.0;
+   
+   if (traceDebug())  CLOG << "returning..." << endl;
+#endif
+}
+
+
+//******************************************************************************
+//  This method parses the SAR header information associated with the
+//  ephemeris state vectors, and instantiates a Lagrange interpolator object
+//  for interpolating intermediate ehemeris states.
+//******************************************************************************
+void ossimRS1SarModel::establishEphemeris()
+{
+   static const char MODULE[] = "ossimRS1SarModel::establishEphemeris()";
+   if (traceDebug())  CLOG << "entering..." << endl;
+
+   char buf[23];
+   
+   // Establish pointer to platform position data record:
+   const pos_data_rec* pdr = theCeosData->posDataRec();
+   
+   // Establish the Greenwich mean hour angle at time of first sample:
+   char gha_str [23];
+   strncpy(gha_str, pdr->hr_angle, 22);
+   gha_str[22] = '\0';
+   theGHA = atof(gha_str);
+
+   // Fetch number of points in record and allocate memory:
+   strncpy(buf, pdr->ndata, 4);
+   buf[4] = '\0';
+   int numPoints = atoi(buf);
+
+   // Fetch sampling period:
+   strncpy(buf, pdr->data_int, 22);
+   buf[22] = '\0';
+   double sampling_period = atof(buf);
+
+   // Establish the first sample time's day:
+   strncpy(buf, pdr->gmt_day, 4);
+   buf[4] = '\0';
+   int first_day =  atoi(buf);
+   double time_offset = (double) (first_day - theFirstLineDay)*SEC_PER_DAY;
+
+   // Establish the first sample time in seconds from beginning of day:
+   strncpy(buf, pdr->gmt_sec, 22);
+   buf[22] = '\0';
+   theEphFirstSampTime =  atof(buf) + time_offset;
+
+   int i, j;
+   double sample_time = theEphFirstSampTime;
+   buf[22] = '\0';
+   NEWMAT::ColumnVector eciArpPos(3);
+   NEWMAT::ColumnVector eciArpVel(3);
+   NEWMAT::ColumnVector ecfArpPos(3);
+   NEWMAT::ColumnVector ecfArpVel(3);
+   NEWMAT::ColumnVector earthVel(3);
+   NEWMAT::Matrix xform;
+   theArpPosInterp = new ossimLagrangeInterpolator;
+   theArpVelInterp = new ossimLagrangeInterpolator;
+
+   // Loop over each point, converting them to vectors:
+   for (i=0; i<numPoints; i++)
+   {
+      for (j=0; j<3; j++)
+      {
+         strncpy(buf, pdr->pos_vect[i].pos[j], 22);
+         eciArpPos[j] = atof(buf);
+         strncpy(buf, pdr->pos_vect[i].vel[j], 22);
+         eciArpVel[j] = atof(buf)/1000.0;
+      }
+
+      // Convert pos and vel vectors from ECI to ECF:
+      eciToEcfXform(sample_time, xform);
+      ecfArpPos = xform*eciArpPos;
+      ecfArpVel = xform*eciArpVel;
+      theArpPosInterp->addData(sample_time, ecfArpPos);
+
+      // Correct velocity for earth rotation:
+      earthVel[0] = -ecfArpPos[1]*EARTH_ANGULAR_VELOCITY;
+      earthVel[1] =  ecfArpPos[0]*EARTH_ANGULAR_VELOCITY;
+      earthVel[2] =  0.0;
+      ecfArpVel = ecfArpVel - earthVel;
+      theArpVelInterp->addData(sample_time, ecfArpVel);
+
+      sample_time += sampling_period;
+   }
+
+   if (traceDebug())
+   {
+      CLOG << "DEBUG -- "
+           << "\n\t theGHA:              " << theGHA 
+           << "\n\t numPoints:           " << numPoints 
+           << "\n\t sampling_period:     " << sampling_period 
+           << "\n\t theEphFirstSampTime: " << theEphFirstSampTime << endl;
+   }
+
+   if (traceDebug())  CLOG << "returning..." << endl;
+}
+
+
+//******************************************************************************
+//  Returns 3x3 transform to rotate ECI into ECF. The argument is
+// in seconds of the day.
+//******************************************************************************
+void ossimRS1SarModel::eciToEcfXform(const double& acq_time, NEWMAT::Matrix& xform) const
+{
+   static const char MODULE[] = "ossimRS1SarModel::eciToEcfXform(acq_time)";
+   if (traceDebug())  CLOG << "entering..." << endl;
+
+   // Determine time elapsed since ephemeris first sample time:
+   double delta_t = acq_time - theEphFirstSampTime;
+
+   // Compute GHA at time of this image line (in degrees):
+   double gha = theGHA + delta_t*DEG_PER_SEC;
+   if (gha >= 360.0)
+      gha -=360.0;
+   else if (gha < 0.0)
+      gha += 360.0;
+   
+   // Establish rotation:
+   double cos_gha = ossim::cosd(gha);
+   double sin_gha = ossim::sind(gha);
+
+   // Establish rotation matrix:
+   xform = ossimMatrix3x3::create(cos_gha,  sin_gha,  0.0,
+                                 -sin_gha,  cos_gha,  0.0,
+                                      0.0,      0.0,  1.0);
+   if (traceDebug())
+   {
+      CLOG << "DEBUG -- "
+           << "\n\t acq_time = " << acq_time
+           << "\n\t delta_t  = " << delta_t
+           << "\n\t gha      = " << gha << endl;
+   }
+
+   if (traceDebug())  CLOG << "returning..." << endl;
+}
+   
+
+//******************************************************************************
+// PRIVATE METHOD: ossimRS1SarModel::establishOrpInterp()
+//  
+//  This method reads the image data file for obtaining the local ORPs (taken
+//  to be the lat-lon of the nearest pixel for each line), and the zero-doppler
+//  time for each line. These ORPs are used for computing SPNs.
+//
+//  The processed data records correspond to lines of imagery. Accompanying
+//  each data line is the lat-lon (at the ellipsoid) of the first, middle, and
+//  last sample of the line, the time of zero-doppler (broadside) imaging for
+//  the line.
+//
+//  A Lagrange interpolator is established with N data points representing the
+//  local ORPs and their corresponding image line numbers
+//  uniformly distributed over the image.
+//
+//  If the image is a ground range product, need to also read the ground-to-
+//  slant range conversion coefficients.
+//  
+//******************************************************************************
+void ossimRS1SarModel::establishOrpInterp()
+{
+   static const char MODULE[] = "ossimRS1SarModel::establishOrpInterp()";
+   if (traceDebug())  CLOG << "entering..." << endl;
+   
+   if (traceDebug())
+      CLOG << "DEBUG -- " << endl;
+
+   static const int      NUM_DATA_POINTS  = 11;
+
+   desc_rec        descRec;
+   pdr_prefix_rec  prefix;
+   int             sizeOfDescRec = sizeof(descRec);
+   int             sizeOfPrefRec = sizeof(prefix);
+   int             headerSize    = sizeOfDescRec + sizeOfPrefRec;
+   char            buf[] = "123456";
+   ossimGpt localOrp (0.0, 0.0, theRefHeight);
+   std::vector<double> line_numbers_list;
+   std::vector<NEWMAT::ColumnVector> orpVectorList; // X, Y, Z
+
+   if (traceDebug())
+   {
+      CLOG << "DEBUG:"
+           << "\nsizeOfDescRec:  " << sizeOfDescRec
+           << "\nsizeOfPrefRec:  " << sizeOfPrefRec << endl;
+   }
+   
+   // Open the image data file given the image directory name and seek to first
+   // SAR data record:
+   FILE* fptr = fopen(theCeosData->imageFile().chars(), "r");
+   if (!fptr)
+   {
+      CLOG << "ERROR: Could not open data file <" << theCeosData->imageFile()
+           << ">" << endl;
+      setErrorStatus();
+      return;
+   }
+   fseek(fptr, theCeosData->imopDescRec()->desc.length, SEEK_SET);
+
+   // Declare some constants and variables used in loop:
+   int last_line    = (int) theImageSize.line - 1;
+   int delta_line   = (int)ceil(last_line/((double)NUM_DATA_POINTS-1.0));
+   int line_number  = 0;
+
+   // Compute the number of SAR data bytes to skip to reach prefix of next
+   // record of interest:
+   strncpy(buf, theCeosData->imopDescRec()->l_dataset, 6);
+   int record_size = atoi(buf);
+   
+   // Loop over each imaging line:
+   int index;
+   theLocalOrpInterp = new ossimLagrangeInterpolator;
+   for (index=0; index<NUM_DATA_POINTS; index++)
+   {
+      if (traceDebug())
+         clog << "\t Processing ORP for line number " << line_number << endl;
+
+      // Read the image line prefix info:
+      fread(&descRec, sizeOfDescRec, 1, fptr);
+      fread(&prefix,  sizeOfPrefRec,  1, fptr);
+
+      // Verify correct line number being read:
+      if ((prefix.line_num-1) != line_number)
+      {
+         CLOG << "\n\tERROR: Synchronization error reading image file. "
+              << "Expected line number " << line_number+1
+              << " but read line number " << prefix.line_num << "." << endl;
+         setErrorStatus();
+	 fclose(fptr); 
+	 fptr = 0; 
+         return;
+      }
+      
+      // Latch the imaging time for the first line collected:
+      if (index == 0)
+      {
+         theFirstLineDay  = prefix.acq_date.acq_day;
+         theFirstLineTime = (double) prefix.acq_date.acq_msec/1000.0;
+      }
+      
+      // Read the local ORP for this line and convert to ECF:
+      if (theDirectionFlag == ASCENDING)
+      {
+         localOrp.lat    = (double) prefix.lat_first  / 1.0e6;
+         localOrp.lon = (double) prefix.long_first / 1.0e6;
+      }
+      else
+      {
+         localOrp.lat    = (double) prefix.lat_last  / 1.0e6;
+         localOrp.lon = (double) prefix.long_last / 1.0e6;
+      }
+
+      theLocalOrpInterp->addData(line_number, ossimEcefPoint(localOrp).toVector());
+      
+      // Update the line number for next record, insuring we don't go passed
+      // the last line:
+      line_number += delta_line;
+      if (line_number > last_line)
+      {
+         delta_line -= line_number - last_line;  // adjust for fseek below
+         line_number = last_line;
+      }
+
+      // Advance to read the next prefix record of interest:
+      fseek(fptr, (delta_line)*record_size-headerSize, SEEK_CUR);
+   }
+
+   // Compute time interval between each line, handle possible day rollover:
+   double lastLineTime = (double) prefix.acq_date.acq_msec/1000.0;
+   if ((lastLineTime-theFirstLineTime) > (SEC_PER_DAY/2.0))
+      lastLineTime -= SEC_PER_DAY;
+   else if ((theFirstLineTime-lastLineTime) > (SEC_PER_DAY/2.0))
+      lastLineTime += SEC_PER_DAY;
+   theTimePerLine = (lastLineTime - theFirstLineTime)/line_number;
+
+   if (traceDebug())
+   {
+      clog << "\n\t line_number (last)   = " << line_number
+           << "\n\t last_line (in image) = " << last_line
+           << "\n\t theFirstLineTime     = " << theFirstLineTime
+           << "\n\t lastLineTime         = " << lastLineTime
+           << "\n\t theTimePerLine       = " << theTimePerLine
+           << endl;
+   }
+   
+   if (traceDebug())  CLOG << "returning..." << endl;
+}
+
+//******************************************************************************
+//  This method establishes a common mean intrack-crosstrack-radial LSR
+//  space at the ARP.
+//******************************************************************************
+void ossimRS1SarModel::establishVehicleSpace()
+{
+   static const char MODULE[] = "ossimRS1SarModel::establishVehicleSpace()";
+   if (traceDebug())  CLOG << "entering..." << endl;
+
+   // Obtain the imaging time when the vehicle is at the ARP:
+   double line = theImageSize.line/2.0;
+   double arpTime = theFirstLineTime + line*theTimePerLine;
+
+   // Obtain the ephemeris at this time:
+   NEWMAT::ColumnVector arpPos(3);
+   theArpPosInterp->interpolate(arpTime, arpPos);
+   NEWMAT::ColumnVector arpVel(3);
+   theArpVelInterp->interpolate(arpTime, arpVel);
+
+   // Convert ephemeris to ECF:
+   NEWMAT::Matrix xform;
+   eciToEcfXform(arpTime, xform);
+   ossimEcefPoint ecfArpPos  (xform * arpPos);
+   ossimEcefVector ecfArpVel (xform * arpVel);
+
+   // Need to correct the velocity vector by the earth rotational velocity:
+   ossimEcefVector earthVel(-ecfArpPos.y()*EARTH_ANGULAR_VELOCITY,
+                             ecfArpPos.x()*EARTH_ANGULAR_VELOCITY,
+                             0.0);
+   ecfArpVel = ecfArpVel - earthVel;
+
+   // Establish LSR space for intrack-crosstrack-radial at vehicle:
+   ossimEcefVector intrackDir (ecfArpVel);
+   ossimEcefVector crtrackDir (ecfArpPos.data().cross(intrackDir.data())); 
+   theVehicleSpace = ossimLsrSpace (ecfArpPos, intrackDir, crtrackDir, 0);
+
+   if (traceDebug())
+   {
+      CLOG << "DEBUG -- "
+           << "\n\t theVehicleSpace: " << theVehicleSpace << endl;
+   }
+
+   if (traceDebug())  CLOG << "returning..." << endl;
+}
+   
+
+//******************************************************************************
+//  For scan-mode imagery, this method interpolates the lat/lon given the image pixel.
+//******************************************************************************
+void ossimRS1SarModel::interpolatedScanORP(const ossimDpt& orp, ossimEcefPoint& orp_ecf) const
+{
+   static const char MODULE[] = "ossimRS1SarModel::interpolatedScanORP(gDblPoint)";
+   if (traceDebug())  CLOG << "entering..." << endl;
+
+   ossimGpt gpt;
+   gpt.lat = theLatGrid(orp);
+   gpt.lon = theLonGrid(orp);
+
+   // Convert to ECF:
+   orp_ecf = ossimEcefPoint(gpt);
+   
+   if (traceDebug())  CLOG << "returning..." << endl;
+}
+
+
+//******************************************************************************
+// PRIVATE METHOD: ossimRS1SarModel::establishOrpGrid()
+//
+//  This method establishes a grid of lat-lon across the image for interpolating
+//  the geographic point on the ellipsoid given a pixel value. This is used for
+//  scan-mode imagery for obtaining a local ORP.
+//
+//******************************************************************************
+void ossimRS1SarModel::establishOrpGrid()
+{
+   static const char MODULE[] = "ossimRS1SarModel::establishOrpGrid()";
+   if (traceDebug())  CLOG << "entering..." << endl;
+   
+   if (traceDebug())
+   {
+      CLOG << "DEBUG -- " << endl;
+   }
+
+   static const int      NUM_GRID_POINTS_U  = 11;
+
+   desc_rec        descRec;
+   pdr_prefix_rec  prefix;
+   int             sizeOfDescRec = sizeof(descRec);
+   int             sizeOfPrefRec = sizeof(prefix);
+   int             headerSize    = sizeOfDescRec + sizeOfPrefRec;
+   char            buf[] = "123456";
+   ossimDpt gridSize ((double) NUM_GRID_POINTS_U, 3.0);
+   ossimDpt cellSize (theImageSize.line/gridSize.u, theImageSize.samp/gridSize.v);
+
+   // Because we are doing integer arithmetic, it will be necessary to
+   // consider the last grid cells as being of a slightly different size:
+   //theLastGridCellSize.line = theImageSize.line - 1.0 -
+   //                           (theGridSize.u-2.0)*theGridCellSize.u;
+   //theLastGridCellSize.samp = theImageSize.samp - 1.0 -
+   //                           (theGridSize.v-2.0)*theGridCellSize.v;
+   
+   // Open the image data file given the image directory name and seek to first
+   // SAR data record:
+   FILE* fptr = fopen(theCeosData->imageFile().chars(), "r");
+   if (!fptr)
+   {
+      CLOG << "ERROR: Could not open data file <" << theCeosData->imageFile()
+           << ">" << endl;
+      setErrorStatus();
+      return;
+   }
+   fseek(fptr, theCeosData->imopDescRec()->desc.length, SEEK_SET);
+
+   // Declare some constants and variables used in loop:
+   int last_line    = (int) theImageSize.line - 1;
+   int delta_line   = (int) cellSize.u;
+   int line_number  = 0;
+
+   // Allocate memory for coarse grid:
+   theLatGrid.initialize(gridSize, ossimDpt(0,0), ossimDpt(1,1));
+   theLonGrid.initialize(gridSize, ossimDpt(0,0), ossimDpt(1,1));
+
+   // Compute the number of SAR data bytes to skip to reach prefix of next
+   // record of interest:
+   strncpy(buf, theCeosData->imopDescRec()->l_dataset, 6);
+   int record_size = atoi(buf);
+   int test_line = (int) gridSize.u - 2;
+   
+   // Loop over each imaging line:
+   for (int u=0; u<(int)gridSize.u; u++)
+   {
+      if (traceDebug())
+      {
+         clog << "\t Processing grid line number " << u << endl;
+      }
+
+      // Read the image line prefix info:
+      fread(&descRec, sizeOfDescRec, 1, fptr);
+      fread(&prefix,  sizeOfPrefRec,  1, fptr);
+
+      // Verify correct line number being read:
+      if ((prefix.line_num-1) != line_number)
+      {
+         CLOG << "\n\tERROR: Synchronization error reading image file. "
+              << "Expected line number " << line_number+1
+              << " but read line number " << prefix.line_num << "." << endl;
+         setErrorStatus();
+	 fclose(fptr); 
+	 fptr = 0; 	 
+         return;
+      }
+      
+      // Latch the imaging time for the first line collected:
+      if (u == 0)
+      {
+         theFirstLineDay  = prefix.acq_date.acq_day;
+         theFirstLineTime = (double) prefix.acq_date.acq_msec/1000.0;
+      }
+      
+      // Read the ground points for this line:
+      theLatGrid.setNode(u, 0, (double) prefix.lat_first /1.0e6);
+      theLatGrid.setNode(u, 1, (double) prefix.lat_mid   /1.0e6);
+      theLatGrid.setNode(u, 2, (double) prefix.lat_last  /1.0e6);
+      theLonGrid.setNode(u, 0, (double) prefix.long_first/1.0e6);
+      theLonGrid.setNode(u, 1, (double) prefix.long_mid  /1.0e6);
+      theLonGrid.setNode(u, 2, (double) prefix.long_last /1.0e6);
+      
+      // Update the line number for next record, insuring we don't go passed
+      // the last line:
+      if (u == test_line)
+      {
+         delta_line  = last_line - line_number;
+         line_number = last_line;
+      }
+      else
+      {
+         line_number += delta_line;
+      }
+
+      //***
+      // Advance to read the next prefix record of interest:
+      //***
+      fseek(fptr, (delta_line)*record_size-headerSize, SEEK_CUR);
+   }
+
+   // Compute time interval between each line, handle possible day rollover:
+   double lastLineTime = (double) prefix.acq_date.acq_msec/1000.0;
+   if ((lastLineTime-theFirstLineTime) > (SEC_PER_DAY/2.0))
+   {
+      lastLineTime -= SEC_PER_DAY;
+   }
+   else if ((theFirstLineTime-lastLineTime) > (SEC_PER_DAY/2.0))
+   {
+      lastLineTime += SEC_PER_DAY;
+   }
+   theTimePerLine = (lastLineTime - theFirstLineTime)/line_number;
+
+   if (traceDebug())
+   {
+      clog << "\n\t line_number (last)   = " << line_number
+           << "\n\t last_line (in image) = " << last_line
+           << "\n\t theFirstLineTime     = " << theFirstLineTime
+           << "\n\t lastLineTime         = " << lastLineTime
+           << "\n\t theTimePerLine       = " << theTimePerLine
+           << endl;
+   }
+   
+   if (traceDebug())  CLOG << "returning..." << endl;
+}
+
+//******************************************************************************
+// PRIVATE METHOD: deallocateMemory()
+//  
+//  This method permits the partial destruction of the object so that it may
+//  be reconstructed without invoking the destructor.
+//  
+//******************************************************************************
+void ossimRS1SarModel::deallocateMemory()
+{
+   static const char MODULE[] = "ossimRS1SarModel::deallocateMemory()";
+   if (traceDebug())  CLOG << "entering..." << endl;
+
+   theArpPosInterp = 0;
+   theArpVelInterp = 0;
+   theLocalOrpInterp = 0;
+   theCeosData        = 0;
+   theLatGrid.clear();
+   theLonGrid.clear();
+      
+   if (traceDebug())  CLOG << "returning..." << endl;
+}
+
+
diff --git a/src/ossim/projection/ossimRadialDecentLensDistortion.cpp b/ossim/src/ossim/projection/ossimRadialDecentLensDistortion.cpp
similarity index 100%
rename from src/ossim/projection/ossimRadialDecentLensDistortion.cpp
rename to ossim/src/ossim/projection/ossimRadialDecentLensDistortion.cpp
diff --git a/ossim/src/ossim/projection/ossimRpcModel.cpp b/ossim/src/ossim/projection/ossimRpcModel.cpp
new file mode 100644
index 0000000..6b831f7
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimRpcModel.cpp
@@ -0,0 +1,1393 @@
+//*****************************************************************************
+// FILE: ossimRpcModel.cpp
+//
+// License:  See top level LICENSE.txt file.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION: Contains implementation of class ossimRpcModel.
+//   This is a replacement model utilizing the Rational Polynomial Coefficients
+//   (RPC), a.k.a. Rapid Positioning Capability, and Universal Sensor Model
+//   (USM).
+//
+// LIMITATIONS: Does not support parameter adjustment (YET)
+//
+//*****************************************************************************
+//  $Id: ossimRpcModel.cpp 23548 2015-09-28 21:01:36Z dburken $
+
+#include <ossim/projection/ossimRpcModel.h>
+#include <ossim/elevation/ossimElevManager.h>
+
+RTTI_DEF1(ossimRpcModel, "ossimRpcModel", ossimSensorModel);
+
+#include <ossim/elevation/ossimHgtRef.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimEllipsoid.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotify.h>
+#include <iostream>
+#include <algorithm>
+#include <iomanip>
+#include <sstream>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+
+//***
+// Define Trace flags for use within this file:
+//***
+#include <ossim/base/ossimTrace.h>
+static ossimTrace traceExec  ("ossimRpcModel:exec");
+static ossimTrace traceDebug ("ossimRpcModel:debug");
+
+static const int    MODEL_VERSION_NUMBER  = 1;
+static const int    NUM_COEFFS        = 20;
+static const char*  MODEL_TYPE        = "ossimRpcModel";
+static const char*  POLY_TYPE_KW      = "polynomial_format";
+static const char*  LINE_SCALE_KW     = "line_scale";
+static const char*  SAMP_SCALE_KW     = "samp_scale";
+static const char*  LAT_SCALE_KW      = "lat_scale";
+static const char*  LON_SCALE_KW      = "long_scale";
+static const char*  HGT_SCALE_KW      = "height_scale";
+static const char*  LINE_OFFSET_KW    = "line_off";
+static const char*  SAMP_OFFSET_KW    = "samp_off";
+static const char*  LAT_OFFSET_KW     = "lat_off";
+static const char*  LON_OFFSET_KW     = "long_off";
+static const char*  HGT_OFFSET_KW     = "height_off";
+
+static const char*  BIAS_ERROR_KW     = "bias_error";
+static const char*  RAND_ERROR_KW     = "rand_error";
+
+static const char*  LINE_NUM_COEF_KW  = "line_num_coeff_";
+static const char*  LINE_DEN_COEF_KW  = "line_den_coeff_";
+static const char*  SAMP_NUM_COEF_KW  = "samp_num_coeff_";
+static const char*  SAMP_DEN_COEF_KW  = "samp_den_coeff_";
+
+static const ossimString PARAM_NAMES[] ={"intrack_offset",
+                                        "crtrack_offset",
+                                        "intrack_scale",
+                                        "crtrack_scale",
+                                        "map_rotation",
+                                        "yaw_offset"};
+static const ossimString PARAM_UNITS[] ={"pixel",
+                                        "pixel",
+                                        "scale",
+                                        "scale",
+                                        "degrees",
+                                        "degrees"};
+      
+//*****************************************************************************
+//  DEFAULT CONSTRUCTOR: ossimRpcModel()
+//  
+//*****************************************************************************
+ossimRpcModel::ossimRpcModel()
+   :  ossimSensorModel(),
+      thePolyType     (A),
+      theLineScale    (0.0),
+      theSampScale    (0.0),
+      theLatScale     (0.0),
+      theLonScale     (0.0),
+      theHgtScale     (0.0),
+      theLineOffset   (0.0),
+      theSampOffset   (0.0),
+      theLatOffset    (0.0),
+      theLonOffset    (0.0),
+      theHgtOffset    (0.0),
+      theIntrackOffset(0.0),
+      theCrtrackOffset(0.0),
+      theIntrackScale (0.0),
+      theCrtrackScale (0.0),
+      theCosMapRot    (0.0),
+      theSinMapRot    (0.0),
+      theBiasError    (0.0),
+      theRandError    (0.0)
+
+{
+   initAdjustableParameters();
+}
+
+//*****************************************************************************
+//  COPY CONSTRUCTOR: ossimRpcModel(ossimRpcModel)
+//  
+//*****************************************************************************
+ossimRpcModel::ossimRpcModel(const ossimRpcModel& model)
+   :
+      ossimSensorModel(model),
+      thePolyType     (model.thePolyType),
+      theLineScale    (model.theLineScale),
+      theSampScale    (model.theSampScale),
+      theLatScale     (model.theLatScale),
+      theLonScale     (model.theLonScale),
+      theHgtScale     (model.theHgtScale),
+      theLineOffset   (model.theLineOffset),
+      theSampOffset   (model.theSampOffset),
+      theLatOffset    (model.theLatOffset),
+      theLonOffset    (model.theLonOffset),
+      theHgtOffset    (model.theHgtOffset),
+      theIntrackOffset(model.theIntrackOffset),
+      theCrtrackOffset(model.theCrtrackOffset),
+      theIntrackScale(model.theIntrackScale),
+      theCrtrackScale(model.theCrtrackScale),
+      theCosMapRot    (model.theCosMapRot),
+      theSinMapRot    (model.theSinMapRot),
+      theBiasError    (model.theBiasError),
+      theRandError    (model.theRandError)
+{
+   for (int i=0; i<20; ++i  )
+   {
+      theLineNumCoef[i] = model.theLineNumCoef[i];
+      theLineDenCoef[i] = model.theLineDenCoef[i];
+      theSampNumCoef[i] = model.theSampNumCoef[i];
+      theSampDenCoef[i] = model.theSampDenCoef[i];
+   }
+}
+
+//*****************************************************************************
+//  DESTRUCTOR: ~ossimRpcModel()
+//  
+//*****************************************************************************
+ossimRpcModel::~ossimRpcModel()
+{
+}
+
+void ossimRpcModel::setAttributes(ossim_float64 sampleOffset,
+                                  ossim_float64 lineOffset,
+                                  ossim_float64 sampleScale,
+                                  ossim_float64 lineScale,
+                                  ossim_float64 latOffset,
+                                  ossim_float64 lonOffset,
+                                  ossim_float64 heightOffset,
+                                  ossim_float64 latScale,
+                                  ossim_float64 lonScale,
+                                  ossim_float64 heightScale,
+                                  const std::vector<double>& xNumeratorCoeffs,
+                                  const std::vector<double>& xDenominatorCoeffs,
+                                  const std::vector<double>& yNumeratorCoeffs,
+                                  const std::vector<double>& yDenominatorCoeffs,
+                                  PolynomialType polyType,
+                                  bool computeGsdFlag)
+{
+   thePolyType = polyType;
+   
+   theLineScale  = lineScale;
+   theSampScale  = sampleScale;
+   theLatScale   = latScale;
+   theLonScale   = lonScale;
+   theHgtScale   = heightScale;
+   theLineOffset = lineOffset;
+   theSampOffset = sampleOffset;
+   theLatOffset  = latOffset;
+   theLonOffset  = lonOffset;
+   theHgtOffset  = heightOffset;
+
+   if(xNumeratorCoeffs.size() == 20)
+   {
+      std::copy(xNumeratorCoeffs.begin(),
+                xNumeratorCoeffs.end(),
+                theSampNumCoef);
+   }
+   if(xDenominatorCoeffs.size() == 20)
+   {
+      std::copy(xDenominatorCoeffs.begin(),
+                xDenominatorCoeffs.end(),
+                theSampDenCoef);
+   }
+   if(yNumeratorCoeffs.size() == 20)
+   {
+      std::copy(yNumeratorCoeffs.begin(),
+                yNumeratorCoeffs.end(),
+                theLineNumCoef);
+   }
+   if(yDenominatorCoeffs.size() == 20)
+   {
+      std::copy(yDenominatorCoeffs.begin(),
+                yDenominatorCoeffs.end(),
+                theLineDenCoef);
+   }
+
+   if(computeGsdFlag)
+   {
+      try
+      {
+         // This will set theGSD and theMeanGSD. Method throws ossimException.
+         computeGsd();
+      }
+      catch (const ossimException& e)
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "ossimRpcModel::setAttributes Caught Exception:\n"
+               << e.what() << std::endl;
+         }
+      }
+   }
+}
+
+void ossimRpcModel::setMetersPerPixel(const ossimDpt& metersPerPixel)
+{
+   theGSD = metersPerPixel;
+   theMeanGSD = (theGSD.x+theGSD.y)*.5;
+}
+
+void ossimRpcModel::setPositionError(const ossim_float64& biasError,
+                                     const ossim_float64& randomError,
+                                     bool initNominalPostionErrorFlag)
+{
+   theBiasError = biasError;
+   theRandError = randomError;
+   if (initNominalPostionErrorFlag)
+   {
+      theNominalPosError = sqrt(theBiasError*theBiasError +
+                                theRandError*theRandError); // meters
+   }
+}
+
+//*****************************************************************************
+//  METHOD: ossimRpcModel::worldToLineSample()
+//  
+//  Overrides base class implementation. Directly computes line-sample from
+//  the polynomials.
+//*****************************************************************************
+void ossimRpcModel::worldToLineSample(const ossimGpt& ground_point,
+                                      ossimDpt&       img_pt) const
+{
+   // if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::worldToLineSample(): entering..." << std::endl;
+
+   if(ground_point.isLatNan() || ground_point.isLonNan() )
+   {
+      img_pt.makeNan();
+      return;
+   }
+
+   //***
+   // First check if the world point is inside bounding rectangle:
+   //***
+   //ossimDpt wdp (ground_point);
+    //if (!(theBoundGndPolygon.pointWithin(ground_point)))
+   // {
+      //img_pt = extrapolate(ground_point);
+       //if (traceExec())  CLOG << "returning..." << endl;
+   //   img_pt.makeNan();
+   //    return;
+   // }
+         
+   //***
+   // Normalize the lat, lon, hgt:
+   //***
+   double nlat = (ground_point.lat - theLatOffset) / theLatScale;
+   double nlon = (ground_point.lon - theLonOffset) / theLonScale;
+   double nhgt;
+
+   if( ground_point.isHgtNan() )
+   {
+      // nhgt = (theHgtScale - theHgtOffset) / theHgtScale;
+      nhgt = ( - theHgtOffset) / theHgtScale;
+   }
+   else
+   {
+      nhgt = (ground_point.hgt - theHgtOffset) / theHgtScale;
+   }
+
+   //***
+   // Compute the adjusted, normalized line (U) and sample (V):
+   //***
+   double Pu = polynomial(nlat, nlon, nhgt, theLineNumCoef);
+   double Qu = polynomial(nlat, nlon, nhgt, theLineDenCoef);
+   double Pv = polynomial(nlat, nlon, nhgt, theSampNumCoef);
+   double Qv = polynomial(nlat, nlon, nhgt, theSampDenCoef);
+   double U_rot  = Pu / Qu;
+   double V_rot  = Pv / Qv;
+
+   //***
+   // U, V are normalized quantities. Need now to establish the image file
+   // line and sample. First, back out the adjustable parameter effects
+   // starting with rotation:
+   //***
+   double U = U_rot*theCosMapRot + V_rot*theSinMapRot;
+   double V = V_rot*theCosMapRot - U_rot*theSinMapRot;
+
+   //***
+   // Now back out skew, scale, and offset adjustments:
+   //***
+   img_pt.line = U*(theLineScale+theIntrackScale) + theLineOffset + theIntrackOffset;
+   
+   img_pt.samp = V*(theSampScale+theCrtrackScale) + theSampOffset + theCrtrackOffset;
+
+   // if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::worldToLineSample(): returning..." << std::endl;
+   return;
+}
+
+//*****************************************************************************
+//  METHOD: ossimRpcModel::lineSampleToWorld()
+//  
+//  Overrides base class implementation. Performs DEM intersection.
+//*****************************************************************************
+void  ossimRpcModel::lineSampleToWorld(const ossimDpt& imagePoint,
+                                       ossimGpt&       worldPoint) const
+{
+
+//---
+// Under debate... (drb 20130610)
+// this seems to be more accurate for the round trip
+//---   
+#if 0
+   if(!imagePoint.hasNans())
+   {
+      
+      lineSampleHeightToWorld(imagePoint,
+                              worldPoint.height(),
+                              worldPoint);
+   }
+   else
+   {
+      worldPoint.makeNan();
+   }
+#else
+   if(!imagePoint.hasNans())
+   {
+      ossimEcefRay ray;
+      imagingRay(imagePoint, ray);
+      ossimElevManager::instance()->intersectRay(ray, worldPoint);
+   }
+   else
+   {
+      worldPoint.makeNan();
+   }
+#endif
+}
+
+//*****************************************************************************
+//  METHOD: ossimRpcModel::imagingRay()
+//  
+//  Constructs an RPC ray by intersecting 2 ellipsoid heights above and
+//  below the RPC height offset, and then forming a vector between the two.
+//
+//*****************************************************************************
+void ossimRpcModel::imagingRay(const ossimDpt& imagePoint,
+                               ossimEcefRay&   imageRay) const
+{
+   //---
+   // For "from point", "to point" we want the image ray to be from above the
+   // ellipsoid down to Earth.
+   // 
+   // It appears the ray "from point" must be above the ellipsiod for the
+   // ossimElevSource::intersectRay method; ultimately, the
+   // ossimEllipsoid::nearestIntersection method, else it goes off in the
+   // weeds...
+   //---
+
+// this one is messed up so keep as #if 0 untill tested more
+  #if 0 
+
+  ossimGpt gpt;
+
+ lineSampleHeightToWorld(imagePoint, theHgtOffset, gpt);
+
+ //lineSampleHeightToWorld(imagePoint, ossim::nan(), gpt);
+
+  ossimEcefVector v;
+  if(gpt.datum())
+  {
+    if(gpt.datum()->ellipsoid())
+    {
+      gpt.datum()->ellipsoid()->gradient(ossimEcefPoint(gpt), v);
+
+      v = v.unitVector();
+
+      ossimEcefPoint intECFto(gpt);
+      ossimEcefPoint intECFfrom = (intECFto + v*100000);
+
+      ossimEcefRay ray(intECFfrom, intECFto);
+
+      imageRay = ray;
+    }
+  }
+#else
+   double vectorLength = theHgtScale ? (theHgtScale * 2.0) : 1000.0;
+
+   ossimGpt gpt;
+   
+   // "from" point
+   double intHgt = theHgtOffset + vectorLength;
+   lineSampleHeightToWorld(imagePoint, intHgt, gpt);
+   ossimEcefPoint intECFfrom(gpt);
+   
+   // "to" point
+   lineSampleHeightToWorld(imagePoint, theHgtOffset, gpt);
+   ossimEcefPoint intECFto(gpt);
+   
+   // Construct ray
+   ossimEcefRay ray(intECFfrom, intECFto);
+   
+   imageRay = ray;
+
+   #endif
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimRpcModel::lineSampleHeightToWorld()
+//  
+//  Performs reverse projection of image line/sample to ground point.
+//  The imaging ray is intersected with a level plane at height = elev.
+//
+//  NOTE: U = line, V = sample -- this differs from the convention.
+//
+//*****************************************************************************
+void ossimRpcModel::lineSampleHeightToWorld(const ossimDpt& image_point,
+                                            const double&   ellHeight,
+                                            ossimGpt&       gpt) const
+{
+   // if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::lineSampleHeightToWorld: entering..." << std::endl;
+
+   //***
+   // Extrapolate if point is outside image:
+   //***
+    if (!insideImage(image_point))
+    {
+//       gpt = extrapolate(image_point, ellHeight);
+//       if (traceExec())  CLOG << "returning..." << endl;
+       gpt.makeNan();
+       return;
+    }
+
+   //***
+   // Constants for convergence tests:
+   //***
+   static const int    MAX_NUM_ITERATIONS  = 10;
+   static const double CONVERGENCE_EPSILON = 0.1;  // pixels
+   
+   //***
+   // The image point must be adjusted by the adjustable parameters as well
+   // as the scale and offsets given as part of the RPC param normalization.
+   //
+   //      NOTE: U = line, V = sample
+   //***
+   double U    = (image_point.y-theLineOffset - theIntrackOffset) / (theLineScale+theIntrackScale);
+   double V    = (image_point.x-theSampOffset - theCrtrackOffset) / (theSampScale+theCrtrackScale);
+
+   //***
+   // Rotate the normalized U, V by the map rotation error (adjustable param):
+   //***
+   double U_rot = theCosMapRot*U - theSinMapRot*V;
+   double V_rot = theSinMapRot*U + theCosMapRot*V;
+   U = U_rot; V = V_rot;
+
+
+   // now apply adjust intrack and cross track
+   //***
+   // Initialize quantities to be used in the iteration for ground point:
+   //***
+   double nlat      = 0.0;  // normalized latitude
+   double nlon      = 0.0;  // normalized longitude
+   
+   double nhgt;
+
+   if(ossim::isnan(ellHeight))
+   {
+     nhgt = (theHgtScale - theHgtOffset) / theHgtScale;  // norm height
+   }
+   else
+   {
+      nhgt = (ellHeight - theHgtOffset) / theHgtScale;  // norm height
+   }
+   
+   double epsilonU = CONVERGENCE_EPSILON/(theLineScale+theIntrackScale);
+   double epsilonV = CONVERGENCE_EPSILON/(theSampScale+theCrtrackScale);
+   int    iteration = 0;
+
+   //***
+   // Declare variables only once outside the loop. These include:
+   // * polynomials (numerators Pu, Pv, and denominators Qu, Qv),
+   // * partial derivatives of polynomials wrt X, Y,
+   // * computed normalized image point: Uc, Vc,
+   // * residuals of normalized image point: deltaU, deltaV,
+   // * partial derivatives of Uc and Vc wrt X, Y,
+   // * corrections to normalized lat, lon: deltaLat, deltaLon.
+   //***
+   double Pu, Qu, Pv, Qv;
+   double dPu_dLat, dQu_dLat, dPv_dLat, dQv_dLat;
+   double dPu_dLon, dQu_dLon, dPv_dLon, dQv_dLon;
+   double Uc, Vc;
+   double deltaU, deltaV;
+   double dU_dLat, dU_dLon, dV_dLat, dV_dLon, W;
+   double deltaLat, deltaLon;
+   
+   //***
+   // Now iterate until the computed Uc, Vc is within epsilon of the desired
+   // image point U, V:
+   //***
+   do
+   {
+      //***
+      // Calculate the normalized line and sample Uc, Vc as ratio of
+      // polynomials Pu, Qu and Pv, Qv:
+      //***
+      Pu = polynomial(nlat, nlon, nhgt, theLineNumCoef);
+      Qu = polynomial(nlat, nlon, nhgt, theLineDenCoef);
+      Pv = polynomial(nlat, nlon, nhgt, theSampNumCoef);
+      Qv = polynomial(nlat, nlon, nhgt, theSampDenCoef);
+      Uc = Pu/Qu;
+      Vc = Pv/Qv;
+      
+      //***
+      // Compute residuals between desired and computed line, sample:
+      //***
+      deltaU = U - Uc;
+      deltaV = V - Vc;
+      
+      //***
+      // Check for convergence and skip re-linearization if converged:
+      //***
+      if ((fabs(deltaU) > epsilonU) || (fabs(deltaV) > epsilonV))
+      {
+         //***
+         // Analytically compute the partials of each polynomial wrt lat, lon:
+         //***
+         dPu_dLat = dPoly_dLat(nlat, nlon, nhgt, theLineNumCoef);
+         dQu_dLat = dPoly_dLat(nlat, nlon, nhgt, theLineDenCoef);
+         dPv_dLat = dPoly_dLat(nlat, nlon, nhgt, theSampNumCoef);
+         dQv_dLat = dPoly_dLat(nlat, nlon, nhgt, theSampDenCoef);
+         dPu_dLon = dPoly_dLon(nlat, nlon, nhgt, theLineNumCoef);
+         dQu_dLon = dPoly_dLon(nlat, nlon, nhgt, theLineDenCoef);
+         dPv_dLon = dPoly_dLon(nlat, nlon, nhgt, theSampNumCoef);
+         dQv_dLon = dPoly_dLon(nlat, nlon, nhgt, theSampDenCoef);
+         
+         //***
+         // Analytically compute partials of quotients U and V wrt lat, lon: 
+         //***
+         dU_dLat = (Qu*dPu_dLat - Pu*dQu_dLat)/(Qu*Qu);
+         dU_dLon = (Qu*dPu_dLon - Pu*dQu_dLon)/(Qu*Qu);
+         dV_dLat = (Qv*dPv_dLat - Pv*dQv_dLat)/(Qv*Qv);
+         dV_dLon = (Qv*dPv_dLon - Pv*dQv_dLon)/(Qv*Qv);
+         
+         W = dU_dLon*dV_dLat - dU_dLat*dV_dLon;
+         
+         //***
+         // Now compute the corrections to normalized lat, lon:
+         //***
+         deltaLat = (dU_dLon*deltaV - dV_dLon*deltaU) / W;
+         deltaLon = (dV_dLat*deltaU - dU_dLat*deltaV) / W;
+         nlat += deltaLat;
+         nlon += deltaLon;
+      }
+      
+      //double h = ossimElevManager::instance()->getHeightAboveEllipsoid(ossimGpt(nlat, nlon));
+     // if(!ossim::isnan(h))
+     // {
+     //   nhgt = h;
+     // }
+
+      iteration++;
+      
+   } while (((fabs(deltaU)>epsilonU) || (fabs(deltaV)>epsilonV))
+            && (iteration < MAX_NUM_ITERATIONS));
+      
+   //***
+   // Test for exceeding allowed number of iterations. Flag error if so:
+   //***
+   if (iteration == MAX_NUM_ITERATIONS)
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimRpcModel::lineSampleHeightToWorld: \nMax number of iterations reached in ground point "
+                                         << "solution. Results are inaccurate." << endl;
+   }
+
+   //***
+   // Now un-normalize the ground point lat, lon and establish return quantity:
+   //***
+   gpt.lat = nlat*theLatScale + theLatOffset;
+   gpt.lon = nlon*theLonScale + theLonOffset;
+   gpt.hgt = ellHeight;
+   
+}
+
+//*****************************************************************************
+// PRIVATE METHOD: ossimRpcModel::polynomial
+//  
+//  Computes polynomial.
+//  
+//*****************************************************************************
+double ossimRpcModel::polynomial(const double& P, const double& L,
+                                 const double& H, const double* c) const
+{
+   double r;
+
+   if (thePolyType == A)
+   {
+      r = c[ 0]       + c[ 1]*L     + c[ 2]*P     + c[ 3]*H     +
+          c[ 4]*L*P   + c[ 5]*L*H   + c[ 6]*P*H   + c[ 7]*L*P*H +
+          c[ 8]*L*L   + c[ 9]*P*P   + c[10]*H*H   + c[11]*L*L*L +
+          c[12]*L*L*P + c[13]*L*L*H + c[14]*L*P*P + c[15]*P*P*P +
+          c[16]*P*P*H + c[17]*L*H*H + c[18]*P*H*H + c[19]*H*H*H;
+   }
+   else
+   {
+      r = c[ 0]       + c[ 1]*L     + c[ 2]*P     + c[ 3]*H     +
+          c[ 4]*L*P   + c[ 5]*L*H   + c[ 6]*P*H   + c[ 7]*L*L   +
+          c[ 8]*P*P   + c[ 9]*H*H   + c[10]*L*P*H + c[11]*L*L*L +
+          c[12]*L*P*P + c[13]*L*H*H + c[14]*L*L*P + c[15]*P*P*P +
+          c[16]*P*H*H + c[17]*L*L*H + c[18]*P*P*H + c[19]*H*H*H;
+   }
+   
+   return r;
+}
+
+//*****************************************************************************
+// PRIVATE METHOD: ossimRpcModel::dPoly_dLat
+//  
+//  Computes derivative of polynomial wrt normalized Latitude P.
+//  
+//*****************************************************************************
+double ossimRpcModel::dPoly_dLat(const double& P, const double& L,
+                                 const double& H, const double* c) const
+{
+   double dr;
+
+   if (thePolyType == A)
+   {
+      dr = c[2] + c[4]*L + c[6]*H + c[7]*L*H + 2*c[9]*P + c[12]*L*L +
+           2*c[14]*L*P + 3*c[15]*P*P +2*c[16]*P*H + c[18]*H*H;
+   }
+   else
+   {
+      dr = c[2] + c[4]*L + c[6]*H + 2*c[8]*P + c[10]*L*H + 2*c[12]*L*P +
+           c[14]*L*L + 3*c[15]*P*P + c[16]*H*H + 2*c[18]*P*H;
+   }
+   
+   return dr;
+}
+
+//*****************************************************************************
+// PRIVATE METHOD: ossimRpcModel::dPoly_dLon
+//  
+//  Computes derivative of polynomial wrt normalized Longitude L.
+//  
+//*****************************************************************************
+double ossimRpcModel::dPoly_dLon(const double& P, const double& L,
+                                 const double& H, const double* c) const
+{
+   double dr;
+
+   if (thePolyType == A)
+   {
+      dr = c[1] + c[4]*P + c[5]*H + c[7]*P*H + 2*c[8]*L + 3*c[11]*L*L +
+           2*c[12]*L*P + 2*c[13]*L*H + c[14]*P*P + c[17]*H*H;
+   }
+   else
+   {
+      dr = c[1] + c[4]*P + c[5]*H + 2*c[7]*L + c[10]*P*H + 3*c[11]*L*L +
+           c[12]*P*P + c[13]*H*H + 2*c[14]*P*L + 2*c[17]*L*H;
+   }
+   return dr;
+}
+
+//*****************************************************************************
+// PRIVATE METHOD: ossimRpcModel::dPoly_dHgt
+//  
+//  Computes derivative of polynomial wrt normalized Height H.
+//  
+//*****************************************************************************
+double ossimRpcModel::dPoly_dHgt(const double& P, const double& L,
+                                 const double& H, const double* c) const
+{
+   double dr;
+
+   if (thePolyType == A)
+   {
+      dr = c[3] + c[5]*L + c[6]*P + c[7]*L*P + 2*c[10]*H + c[13]*L*L +
+           c[16]*P*P + 2*c[17]*L*H + 2*c[18]*P*H + 3*c[19]*H*H;
+   }
+   else
+   {
+      dr = c[3] + c[5]*L + c[6]*P + 2*c[9]*H + c[10]*L*P + 2*c[13]*L*H +
+           2*c[16]*P*H + c[17]*L*L + c[18]*P*P + 3*c[19]*H*H;
+   }
+   return dr;
+}
+
+void ossimRpcModel::updateModel()
+{
+   theIntrackOffset    = computeParameterOffset(INTRACK_OFFSET);
+   theCrtrackOffset    = computeParameterOffset(CRTRACK_OFFSET);
+   theIntrackScale     = computeParameterOffset(INTRACK_SCALE);
+   theCrtrackScale     = computeParameterOffset(CRTRACK_SCALE);
+   double mapRotation  = computeParameterOffset(MAP_ROTATION);
+   theCosMapRot        = ossim::cosd(mapRotation);
+   theSinMapRot        = ossim::sind(mapRotation);
+}
+
+void ossimRpcModel::initAdjustableParameters()
+{
+   resizeAdjustableParameterArray(NUM_ADJUSTABLE_PARAMS);
+   int numParams = getNumberOfAdjustableParameters();
+   for (int i=0; i<numParams; i++)
+   {
+      setAdjustableParameter(i, 0.0);
+      setParameterDescription(i, PARAM_NAMES[i]);
+      setParameterUnit(i,PARAM_UNITS[i]);
+   }
+   setParameterSigma(INTRACK_OFFSET, 50.0);
+   setParameterSigma(CRTRACK_OFFSET, 50.0);
+   setParameterSigma(INTRACK_SCALE, 50.0);  
+   setParameterSigma(CRTRACK_SCALE, 50.0);  
+   setParameterSigma(MAP_ROTATION, 0.1);
+//   setParameterSigma(YAW_OFFSET, 0.001);
+}
+
+ossimObject* ossimRpcModel::dup() const
+{
+   return new ossimRpcModel(*this);
+}
+
+//*****************************************************************************
+//  METHOD: ossimRpcModel::print()
+//  
+//  Formatted dump of data members.
+//  
+//*****************************************************************************
+std::ostream& ossimRpcModel::print(std::ostream& out) const
+{
+   out << "\nDump of ossimRpcModel object at " << std::hex << this << std::dec << ":\n"
+       << POLY_TYPE_KW   << ": " << thePolyType   << "\n"
+       << LINE_SCALE_KW  << ": " << theLineScale  << "\n"
+       << SAMP_SCALE_KW  << ": " << theSampScale  << "\n"
+       << LAT_SCALE_KW   << ": " << theLatScale   << "\n"
+       << LON_SCALE_KW   << ": " << theLonScale   << "\n"
+       << HGT_SCALE_KW   << ": " << theHgtScale   << "\n"
+       << LINE_OFFSET_KW << ": " << theLineOffset << "\n"
+       << SAMP_OFFSET_KW << ": " << theSampOffset << "\n"
+       << LAT_OFFSET_KW  << ": " << theLatOffset  << "\n"
+       << LON_OFFSET_KW  << ": " << theLonOffset  << "\n"
+       << HGT_OFFSET_KW  << ": " << theHgtOffset  << "\n"
+       << BIAS_ERROR_KW  << ": " << theBiasError  << "\n"
+       << RAND_ERROR_KW  << ": " << theRandError  << "\n"
+       << std::endl;
+
+   for (int i=0; i<NUM_COEFFS; i++)
+      out<<"  "<<LINE_NUM_COEF_KW<<"["<<i<<"]: "<<theLineNumCoef[i]<<std::endl;
+
+   out << std::endl;
+   for (int i=0; i<NUM_COEFFS; i++)
+      out<<"  "<<LINE_DEN_COEF_KW<<"["<<i<<"]: "<<theLineDenCoef[i]<<std::endl;
+
+   out << std::endl;
+   for (int i=0; i<NUM_COEFFS; i++)
+      out<<"  "<<SAMP_NUM_COEF_KW<<"["<<i<<"]: "<<theSampNumCoef[i]<<std::endl;
+
+   out << std::endl;
+   for (int i=0; i<NUM_COEFFS; i++)
+      out<<"  "<<SAMP_DEN_COEF_KW<<"["<<i<<"]: "<<theSampDenCoef[i]<<std::endl;
+      
+   out << std::endl;
+
+   return ossimSensorModel::print(out);
+}
+
+//*****************************************************************************
+//  METHOD: ossimRpcModel::saveState()
+//  
+//  Saves the model state to the KWL. This KWL also serves as a geometry file.
+//  
+//*****************************************************************************
+bool ossimRpcModel::saveState(ossimKeywordlist& kwl,
+                              const char* prefix) const
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::saveState(): entering..." << std::endl;
+
+   kwl.add(prefix, ossimKeywordNames::TYPE_KW, MODEL_TYPE);
+
+   //***
+   // Hand off to base class for common stuff:
+   //***
+   ossimSensorModel::saveState(kwl, prefix);
+
+   //---
+   // Save off offsets and scales:
+   //---
+   kwl.add(prefix, POLY_TYPE_KW,   ((char)thePolyType));
+   kwl.add(prefix, LINE_SCALE_KW,  theLineScale);
+   kwl.add(prefix, SAMP_SCALE_KW,  theSampScale);
+   kwl.add(prefix, LAT_SCALE_KW,   theLatScale);
+   kwl.add(prefix, LON_SCALE_KW,   theLonScale);
+   kwl.add(prefix, HGT_SCALE_KW,   theHgtScale);
+   kwl.add(prefix, LINE_OFFSET_KW, theLineOffset);
+   kwl.add(prefix, SAMP_OFFSET_KW, theSampOffset);
+   kwl.add(prefix, LAT_OFFSET_KW,  theLatOffset);
+   kwl.add(prefix, LON_OFFSET_KW,  theLonOffset);
+   kwl.add(prefix, HGT_OFFSET_KW,  theHgtOffset);
+   kwl.add(prefix, BIAS_ERROR_KW,  theBiasError);
+   kwl.add(prefix, RAND_ERROR_KW,  theRandError);
+
+   for (int i=0; i<NUM_COEFFS; i++)
+   {
+      ossimString key;
+      std::ostringstream os;
+      os << setw(2) << setfill('0') << right << i;
+      
+      key = LINE_NUM_COEF_KW;
+      key += os.str();
+      kwl.add(prefix, key.c_str(), theLineNumCoef[i],
+              true, 15);
+      
+      key = LINE_DEN_COEF_KW;
+      key += os.str();
+      kwl.add(prefix, key.c_str(), theLineDenCoef[i],
+              true, 15);
+
+      key = SAMP_NUM_COEF_KW;
+      key += os.str();
+      kwl.add(prefix, key.c_str(), theSampNumCoef[i],
+              true, 15);
+
+      key = SAMP_DEN_COEF_KW;
+      key += os.str();
+      kwl.add(prefix, key.c_str(), theSampDenCoef[i],
+              true, 15);
+   }
+      
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::saveState(): returning..." << std::endl;
+   return true;
+}
+
+//*****************************************************************************
+//  METHOD: ossimRpcModel::loadState()
+//  
+//  Restores the model's state from the KWL. This KWL also serves as a
+//  geometry file.
+//  
+//*****************************************************************************
+bool ossimRpcModel::loadState(const ossimKeywordlist& kwl,
+                              const char* prefix) 
+{
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimRpcModel::loadState(): entering..." << std::endl;
+   }
+
+   const char* value;
+   const char* keyword;
+
+   //***
+   // Pass on to the base-class for parsing first:
+   //***
+   bool success = ossimSensorModel::loadState(kwl, prefix);
+   if (!success)
+   {
+      theErrorStatus++;
+
+      if (traceExec())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG ossimRpcModel::loadState(): returning with error..."
+            << std::endl;
+      }
+      return false;
+   }
+      
+   //---
+   // Continue parsing for local members:
+   //---
+   value = kwl.find(prefix, BIAS_ERROR_KW);
+   if (value)
+   {
+      theBiasError = ossimString(value).toDouble();
+   }
+
+   value = kwl.find(prefix, RAND_ERROR_KW);
+   if (value)
+   {
+      theRandError = ossimString(value).toDouble();
+   }
+        
+   keyword = POLY_TYPE_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   thePolyType = (PolynomialType) value[0];
+      
+   keyword = LINE_SCALE_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   theLineScale = atof(value);
+   
+   keyword = SAMP_SCALE_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   theSampScale = atof(value);
+   
+   keyword = LAT_SCALE_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   theLatScale = atof(value);
+   
+   keyword = LON_SCALE_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   theLonScale = atof(value);
+   
+   keyword = HGT_SCALE_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   theHgtScale = atof(value);
+   
+   keyword = LINE_OFFSET_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   theLineOffset = atof(value);
+   
+   keyword = SAMP_OFFSET_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   theSampOffset = atof(value);
+   
+   keyword = LAT_OFFSET_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   theLatOffset = atof(value);
+   
+   keyword = LON_OFFSET_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   theLonOffset = atof(value);
+   
+   keyword = HGT_OFFSET_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   theHgtOffset = atof(value);
+
+   for (int i=0; i<NUM_COEFFS; i++)
+   {
+      ossimString keyword;
+      ostringstream os;
+      os << setw(2) << setfill('0') << right << i;
+
+      keyword = LINE_NUM_COEF_KW;
+      keyword += os.str();
+      value = kwl.find(prefix, keyword.c_str());
+      if (!value)
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
+            << "<" << keyword << ">. Check the keywordlist for proper syntax."
+            << std::endl;
+         return false;
+      }
+      theLineNumCoef[i] = atof(value);
+
+      keyword = LINE_DEN_COEF_KW;
+      keyword += os.str();
+      value = kwl.find(prefix, keyword.c_str());
+      if (!value)
+      {
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
+                                             << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                             << std::endl;
+         return false;
+      }
+      theLineDenCoef[i] = atof(value);
+   
+      keyword = SAMP_NUM_COEF_KW;
+      keyword += os.str();
+      value = kwl.find(prefix, keyword.c_str());
+      if (!value)
+      {
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
+                                             << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                             << std::endl;
+         return false;
+      }
+      theSampNumCoef[i] = atof(value);
+
+      keyword = SAMP_DEN_COEF_KW;
+      keyword += os.str();
+      value = kwl.find(prefix, keyword.c_str());
+      if (!value)
+      {
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
+                                             << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                             << std::endl;
+         return false;
+      }
+      theSampDenCoef[i] = atof(value);
+   }
+      
+   //***
+   // Initialize other data members given quantities read in KWL:
+   //***
+   theCosMapRot = 1.0;
+   theSinMapRot = 0.0;
+
+   updateModel();
+   
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::loadState(): returning..." << std::endl;
+   return true;
+}
+
+//*****************************************************************************
+// STATIC METHOD: ossimRpcModel::writeGeomTemplate
+//  
+//  Writes a sample kwl to output stream.
+//  
+//*****************************************************************************
+void ossimRpcModel::writeGeomTemplate(ostream& os)
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::writeGeomTemplate(): entering..." << std::endl;
+
+   os <<
+      "//**************************************************************\n"
+      "// Template for RPC model keywordlist\n"
+      "//**************************************************************\n"
+      << ossimKeywordNames::TYPE_KW << ": " << MODEL_TYPE << endl;
+
+   ossimSensorModel::writeGeomTemplate(os);
+   
+   os << "//\n"
+      << "// Derived-class ossimRpcModel Keywords:\n"
+      << "//\n"
+      << POLY_TYPE_KW << ": A|B\n"
+      << "\n"
+      << "// RPC data consists of coefficients and normalization \n"
+      << "// parameters. The RPC keywords used here are compatible with \n"
+      << "// keywords found in Ikonos \"rpc.txt\" files.\n"
+      << "// First are the normalization parameters:\n"
+      << LINE_OFFSET_KW << ": <float>\n"
+      << SAMP_OFFSET_KW << ": <float>\n"
+      << LAT_OFFSET_KW << ": <float>\n"
+      << LON_OFFSET_KW << ": <float>\n"
+      << HGT_OFFSET_KW << ": <float>\n"
+      << LINE_SCALE_KW << ": <float>\n"
+      << SAMP_SCALE_KW << ": <float>\n"
+      << LAT_SCALE_KW << ": <float>\n"
+      << LON_SCALE_KW << ": <float>\n"
+      << HGT_SCALE_KW << ": <float>\n"
+      << BIAS_ERROR_KW << ": <float>\n"
+      << RAND_ERROR_KW << ": <float>\n"
+      << "\n"
+      << "// RPC Coefficients are specified with indexes. Coefficients \n "
+      << "// are specified for the four polynomials: line numerator, line \n"
+      << "// denominator, sample numerator, and sample denominator:" << endl;
+
+   for (int i=1; i<=20; i++)
+      os << LINE_NUM_COEF_KW << setw(2) << setfill('0') << right
+         << i << ": <float>" << endl; 
+   os << endl;
+   for (int i=1; i<=20; i++)
+      os << LINE_DEN_COEF_KW << setw(2) << setfill('0') << right
+         << i << ": <float>" << endl; 
+   os << endl;
+   for (int i=1; i<=20; i++)
+      os << SAMP_NUM_COEF_KW << setw(2) << setfill('0') << right
+         << i << ": <float>" << endl; 
+   os << endl;
+   for (int i=1; i<=20; i++)
+      os << SAMP_DEN_COEF_KW << setw(2) << setfill('0') << right
+         << i << ": <float>" << endl; 
+   os << "\n" <<endl;
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::writeGeomTemplate(): returning..." << std::endl;
+   return;
+}
+
+bool ossimRpcModel::setupOptimizer(const ossimString& init_file)
+{
+   ossimKeywordlist kwl;
+
+   if(kwl.addFile(ossimFilename(init_file)))
+   {
+      return loadState(kwl);
+   }
+   else
+   {
+      ossimRefPtr<ossimProjection> proj = ossimProjectionFactoryRegistry::instance()->createProjection(init_file);
+      if(proj.valid())
+      {
+         kwl.clear();
+         proj->saveState(kwl);
+         
+         return loadState(kwl);
+      }
+   }
+   
+   return false;
+}
+
+//*****************************************************************************
+//  METHOD: ossimSarModel::getForwardDeriv()
+//  
+//  Compute partials of samp/line WRT to ground.
+//  
+//*****************************************************************************
+ossimDpt ossimRpcModel::getForwardDeriv(int derivMode,
+                                        const ossimGpt& pos,
+                                        double h)
+{
+   // If derivMode (parmIdx) >= 0 call base class version
+   // for "adjustable parameters"
+   if (derivMode >= 0)
+   {
+      return ossimSensorModel::getForwardDeriv(derivMode, pos, h);
+   }
+   
+   // Use alternative derivMode definitions
+   else
+   {
+      ossimDpt returnData;
+
+      //******************************************
+      // OBS_INIT mode
+      //    [1] 
+      //    [2] 
+      //  Note: In this mode, pos is used to pass
+      //  in the (s,l) observations.
+      //******************************************
+      if (derivMode==OBS_INIT)
+      {
+         // Image coordinates
+         ossimDpt obs;
+         obs.samp = pos.latd();
+         obs.line = pos.lond();
+         theObs = obs;
+      }
+
+      //******************************************
+      // EVALUATE mode
+      //   [1] evaluate & save partials, residuals
+      //   [2] return residuals
+      //******************************************
+      else if (derivMode==EVALUATE)
+      {
+         //***
+         // Normalize the lat, lon, hgt:
+         //***
+         double nlat = (pos.lat - theLatOffset) / theLatScale;
+         double nlon = (pos.lon - theLonOffset) / theLonScale;
+         double nhgt;
+
+         if( ossim::isnan(pos.hgt) )
+         {
+            nhgt = (theHgtScale - theHgtOffset) / theHgtScale;
+         }
+         else
+         {
+            nhgt = (pos.hgt - theHgtOffset) / theHgtScale;
+         }
+         
+         //***
+         // Compute the normalized line (Un) and sample (Vn):
+         //***
+         double Pu = polynomial(nlat, nlon, nhgt, theLineNumCoef);
+         double Qu = polynomial(nlat, nlon, nhgt, theLineDenCoef);
+         double Pv = polynomial(nlat, nlon, nhgt, theSampNumCoef);
+         double Qv = polynomial(nlat, nlon, nhgt, theSampDenCoef);
+         double Un  = Pu / Qu;
+         double Vn  = Pv / Qv;
+         
+         //***
+         // Compute the actual line (U) and sample (V):
+         //***
+         double U  = Un*theLineScale + theLineOffset;
+         double V  = Vn*theSampScale + theSampOffset;
+
+         //***
+         // Compute the partials of each polynomial wrt lat, lon, hgt
+         //***
+         double dPu_dLat, dQu_dLat, dPv_dLat, dQv_dLat;
+         double dPu_dLon, dQu_dLon, dPv_dLon, dQv_dLon;
+         double dPu_dHgt, dQu_dHgt, dPv_dHgt, dQv_dHgt;
+         dPu_dLat = dPoly_dLat(nlat, nlon, nhgt, theLineNumCoef);
+         dQu_dLat = dPoly_dLat(nlat, nlon, nhgt, theLineDenCoef);
+         dPv_dLat = dPoly_dLat(nlat, nlon, nhgt, theSampNumCoef);
+         dQv_dLat = dPoly_dLat(nlat, nlon, nhgt, theSampDenCoef);
+         dPu_dLon = dPoly_dLon(nlat, nlon, nhgt, theLineNumCoef);
+         dQu_dLon = dPoly_dLon(nlat, nlon, nhgt, theLineDenCoef);
+         dPv_dLon = dPoly_dLon(nlat, nlon, nhgt, theSampNumCoef);
+         dQv_dLon = dPoly_dLon(nlat, nlon, nhgt, theSampDenCoef);
+         dPu_dHgt = dPoly_dHgt(nlat, nlon, nhgt, theLineNumCoef);
+         dQu_dHgt = dPoly_dHgt(nlat, nlon, nhgt, theLineDenCoef);
+         dPv_dHgt = dPoly_dHgt(nlat, nlon, nhgt, theSampNumCoef);
+         dQv_dHgt = dPoly_dHgt(nlat, nlon, nhgt, theSampDenCoef);
+         
+         //***
+         // Compute partials of quotients U and V wrt lat, lon, hgt 
+         //***
+         double dU_dLat, dU_dLon, dU_dHgt, dV_dLat, dV_dLon, dV_dHgt;
+         dU_dLat = (Qu*dPu_dLat - Pu*dQu_dLat)/(Qu*Qu);
+         dU_dLon = (Qu*dPu_dLon - Pu*dQu_dLon)/(Qu*Qu);
+         dU_dHgt = (Qu*dPu_dHgt - Pu*dQu_dHgt)/(Qu*Qu);
+         dV_dLat = (Qv*dPv_dLat - Pv*dQv_dLat)/(Qv*Qv);
+         dV_dLon = (Qv*dPv_dLon - Pv*dQv_dLon)/(Qv*Qv);
+         dV_dHgt = (Qv*dPv_dHgt - Pv*dQv_dHgt)/(Qv*Qv);
+         
+         //***
+         // Apply necessary scale factors 
+         //***
+        dU_dLat *= theLineScale/theLatScale;
+        dU_dLon *= theLineScale/theLonScale;
+        dU_dHgt *= theLineScale/theHgtScale;
+        dV_dLat *= theSampScale/theLatScale;
+        dV_dLon *= theSampScale/theLonScale;
+        dV_dHgt *= theSampScale/theHgtScale;
+
+        dU_dLat *= DEG_PER_RAD;
+        dU_dLon *= DEG_PER_RAD;
+        dV_dLat *= DEG_PER_RAD;
+        dV_dLon *= DEG_PER_RAD;
+
+         // Save the partials referenced to ECF
+         ossimEcefPoint location(pos);
+         NEWMAT::Matrix jMat(3,3);
+         pos.datum()->ellipsoid()->jacobianWrtEcef(location, jMat);
+         //  Line
+         theParWRTx.u = dU_dLat*jMat(1,1)+dU_dLon*jMat(2,1)+dU_dHgt*jMat(3,1);
+         theParWRTy.u = dU_dLat*jMat(1,2)+dU_dLon*jMat(2,2)+dU_dHgt*jMat(3,2);
+         theParWRTz.u = dU_dLat*jMat(1,3)+dU_dLon*jMat(2,3)+dU_dHgt*jMat(3,3);
+         //  Samp
+         theParWRTx.v = dV_dLat*jMat(1,1)+dV_dLon*jMat(2,1)+dV_dHgt*jMat(3,1);
+         theParWRTy.v = dV_dLat*jMat(1,2)+dV_dLon*jMat(2,2)+dV_dHgt*jMat(3,2);
+         theParWRTz.v = dV_dLat*jMat(1,3)+dV_dLon*jMat(2,3)+dV_dHgt*jMat(3,3);
+
+         // Residuals
+         ossimDpt resid(theObs.samp-V, theObs.line-U);
+         returnData = resid;
+      }
+
+      //******************************************
+      // P_WRT_X, P_WRT_Y, P_WRT_Z modes
+      //   [1] 3 separate calls required
+      //   [2] return 3 sets of partials
+      //******************************************
+      else if (derivMode==P_WRT_X)
+      {
+         returnData = theParWRTx;
+      }
+
+      else if (derivMode==P_WRT_Y)
+      {
+         returnData = theParWRTy;
+      }
+
+      else
+      {
+         returnData = theParWRTz;
+      }
+
+      return returnData;
+   }
+}
+
+double ossimRpcModel::getBiasError() const
+{
+   return theBiasError;
+}
+
+double ossimRpcModel::getRandError() const
+{
+   return theRandError;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimSarModel::getRpcParameters)
+//  
+//  Accessor for RPC parameter set.
+//  
+//*****************************************************************************
+void ossimRpcModel::getRpcParameters(ossimRpcModel::rpcModelStruct& model) const
+{
+   model.lineScale  = theLineScale;
+   model.sampScale  = theSampScale;
+   model.latScale   = theLatScale;
+   model.lonScale   = theLonScale;
+   model.hgtScale   = theHgtScale;
+   model.lineOffset = theLineOffset;
+   model.sampOffset = theSampOffset;
+   model.latOffset  = theLatOffset;
+   model.lonOffset  = theLonOffset;
+   model.hgtOffset  = theHgtOffset;
+   
+   for (int i=0; i<20; ++i)
+   {
+      model.lineNumCoef[i] = theLineNumCoef[i];
+      model.lineDenCoef[i] = theLineDenCoef[i];
+      model.sampNumCoef[i] = theSampNumCoef[i];
+      model.sampDenCoef[i] = theSampDenCoef[i];
+   }
+   
+   if (thePolyType == A)
+   {
+      model.type= 'A';
+   }
+   else
+   {
+      model.type= 'B';
+   }
+}
diff --git a/ossim/src/ossim/projection/ossimRpcProjection.cpp b/ossim/src/ossim/projection/ossimRpcProjection.cpp
new file mode 100644
index 0000000..eb58cf5
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimRpcProjection.cpp
@@ -0,0 +1,1393 @@
+//*****************************************************************************
+// FILE: ossimRpcModel.cc
+//
+// Copyright (C) 2004 Intelligence Data Systems.
+//
+// MIT
+// 
+// AUTHOR: Garrett Potts
+//
+//*****************************************************************************
+//$Id: ossimRpcProjection.cpp 23666 2015-12-14 20:01:22Z rashadkm $
+
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/projection/ossimRpcProjection.h>
+#include <ossim/projection/ossimRpcSolver.h>
+#include <ossim/base/ossimEcefPoint.h>
+#include <ossim/base/ossimEcefVector.h>
+#include <ossim/base/ossimTieGptSet.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+
+RTTI_DEF3(ossimRpcProjection, "ossimRpcProjection", ossimProjection, ossimOptimizableProjection,
+          ossimAdjustableParameterInterface);
+
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <cstdio>
+#include <fstream>
+#include <iostream>
+#include <algorithm>
+#include <ossim/matrix/newmatrc.h>
+
+//***
+// Define Trace flags for use within this file:
+//***
+#include <ossim/base/ossimTrace.h>
+static ossimTrace traceExec  ("ossimRpcProjection:exec");
+static ossimTrace traceDebug ("ossimRpcProjection:debug");
+
+static const int    MODEL_VERSION_NUMBER  = 1;
+static const int    NUM_COEFFS        = 20;
+static const char*  MODEL_TYPE        = "ossimRpcModel";
+static const char*  POLY_TYPE_KW      = "polynomial_format";
+static const char*  LINE_SCALE_KW     = "line_scale";
+static const char*  SAMP_SCALE_KW     = "samp_scale";
+static const char*  LAT_SCALE_KW      = "lat_scale";
+static const char*  LON_SCALE_KW      = "long_scale";
+static const char*  HGT_SCALE_KW      = "height_scale";
+static const char*  LINE_OFFSET_KW    = "line_off";
+static const char*  SAMP_OFFSET_KW    = "samp_off";
+static const char*  LAT_OFFSET_KW     = "lat_off";
+static const char*  LON_OFFSET_KW     = "long_off";
+static const char*  HGT_OFFSET_KW     = "height_off";
+static const char*  LINE_NUM_COEF_KW  = "line_num_coeff_";
+static const char*  LINE_DEN_COEF_KW  = "line_den_coeff_";
+static const char*  SAMP_NUM_COEF_KW  = "samp_num_coeff_";
+static const char*  SAMP_DEN_COEF_KW  = "samp_den_coeff_";
+
+static const ossim_int32 INTRACK_OFFSET = 0;
+static const ossim_int32 CRTRACK_OFFSET = 1;
+static const ossim_int32 INTRACK_SCALE  = 2;
+static const ossim_int32 CRTRACK_SCALE  = 3;
+static const ossim_int32 MAP_ROTATION   = 4;
+//static const ossim_int32 YAW_OFFSET;
+static const ossim_int32 NUM_ADJUSTABLE_PARAMS = 5;
+
+static const ossimString PARAM_NAMES[] ={"intrack_offset",
+                                        "crtrack_offset",
+                                        "intrack_scale",
+                                        "crtrack_scale",
+                                        "map_rotation",
+                                        "yaw_offset"};
+
+static const ossimString PARAM_UNITS[] ={"pixel",
+                                        "pixel",
+                                        "scale",
+                                        "scale",
+                                        "degrees",
+                                        "degrees"};
+
+//*****************************************************************************
+//  DEFAULT CONSTRUCTOR: ossimRpcModel()
+//  
+//*****************************************************************************
+ossimRpcProjection::ossimRpcProjection()
+   : ossimOptimizableProjection(),
+     theIntrackOffset(0),
+     theCrtrackOffset(0),
+     theIntrackScale(0.0),
+     theCrtrackScale(0.0),
+     theYawSkew   (0.0),
+     theCosMapRot (1.0),
+     theSinMapRot (0.0)
+
+ {
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection Default Constructor: entering..." << std::endl;
+
+   initAdjustableParameters();
+   
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection Default Constructor: returning..." << std::endl;
+}
+
+//*****************************************************************************
+//  COPY CONSTRUCTOR: ossimRpcProjection(ossimRpcProjection)
+//  
+//*****************************************************************************
+ossimRpcProjection::ossimRpcProjection(const ossimRpcProjection& model)
+   :
+      ossimOptimizableProjection(model),
+      ossimAdjustableParameterInterface(model),
+      thePolyType     (model.thePolyType),
+      theLineScale    (model.theLineScale),
+      theSampScale    (model.theSampScale),
+      theLatScale     (model.theLatScale),
+      theLonScale     (model.theLonScale),
+      theHgtScale     (model.theHgtScale),
+      theLineOffset   (model.theLineOffset),
+      theSampOffset   (model.theSampOffset),
+      theLatOffset    (model.theLatOffset),
+      theLonOffset    (model.theLonOffset),
+      theHgtOffset    (model.theHgtOffset),
+      theIntrackOffset(model.theIntrackOffset),
+      theCrtrackOffset(model.theCrtrackOffset),
+      theIntrackScale(model.theIntrackScale),
+      theCrtrackScale(model.theCrtrackScale),
+      theYawSkew      (model.theYawSkew),
+      theCosMapRot    (model.theCosMapRot),
+      theSinMapRot    (model.theSinMapRot)
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection Copy Constructor: entering..." << std::endl;
+
+   for (int i=0; i<20; i++)
+   {
+      theLineNumCoef[i] = model.theLineNumCoef[i];
+      theLineDenCoef[i] = model.theLineDenCoef[i];
+      theSampNumCoef[i] = model.theSampNumCoef[i];
+      theSampDenCoef[i] = model.theSampDenCoef[i];
+   }
+   
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection Copy Constructor: returning..." << std::endl;
+}
+
+//*****************************************************************************
+//  DESTRUCTOR: ~ossimRpcProjection()
+//  
+//*****************************************************************************
+ossimRpcProjection::~ossimRpcProjection()
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ~ossimRpcProjection() Destructor: entering..." << std::endl;
+   
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimNotify(ossimNotifyLevel_DEBUG): returning..." << std::endl;
+}
+
+ossimObject* ossimRpcProjection::getBaseObject()
+{
+   return this;
+}
+
+const ossimObject* ossimRpcProjection::getBaseObject()const
+{
+   return this;
+}
+
+ossimRpcProjection& 
+ossimRpcProjection::operator=(const ossimRpcProjection& source)
+{
+   if (this != &source)
+   {
+      ossimOptimizableProjection::operator=(source);
+
+      thePolyType    = source.thePolyType;
+      theLineScale   = source.theLineScale;
+      theSampScale   = source.theSampScale;
+      theLatScale    = source.theLatScale;
+      theLonScale    = source.theLonScale;
+      theHgtScale    = source.theHgtScale;
+      theLineOffset  = source.theLineOffset;
+      theSampOffset  = source.theSampOffset;
+      theLatOffset   = source.theLatOffset;
+      theLonOffset   = source.theLonOffset;
+      theHgtOffset   = source.theHgtOffset;
+      for (int i=0; i<20; i++)
+      {
+         theLineNumCoef[i] = source.theLineNumCoef[i];
+         theLineDenCoef[i] = source.theLineDenCoef[i];
+         theSampNumCoef[i] = source.theSampNumCoef[i];
+         theSampDenCoef[i] = source.theSampDenCoef[i];
+      }
+   }
+   return *this;
+}
+
+void ossimRpcProjection::setAttributes(ossim_float64 sampleOffset,
+                                       ossim_float64 lineOffset,
+                                       ossim_float64 sampleScale,
+                                       ossim_float64 lineScale,
+                                       ossim_float64 latOffset,
+                                       ossim_float64 lonOffset,
+                                       ossim_float64 heightOffset,
+                                       ossim_float64 latScale,
+                                       ossim_float64 lonScale,
+                                       ossim_float64 heightScale,
+                                       const std::vector<double>& xNumeratorCoeffs,
+                                       const std::vector<double>& xDenominatorCoeffs,
+                                       const std::vector<double>& yNumeratorCoeffs,
+                                       const std::vector<double>& yDenominatorCoeffs,
+                                       PolynomialType polyType)
+{
+   thePolyType = polyType;
+   
+   theLineScale  = lineScale;
+   theSampScale  = sampleScale;
+   theLatScale   = latScale;
+   theLonScale   = lonScale;
+   theHgtScale   = heightScale;
+   theLineOffset = lineOffset;
+   theSampOffset = sampleOffset;
+   theLatOffset  = latOffset;
+   theLonOffset  = lonOffset;
+   theHgtOffset  = heightOffset;
+
+   if(xNumeratorCoeffs.size() == 20)
+   {
+      std::copy(xNumeratorCoeffs.begin(),
+                xNumeratorCoeffs.end(),
+                theSampNumCoef);
+   }
+   if(xDenominatorCoeffs.size() == 20)
+   {
+      std::copy(xDenominatorCoeffs.begin(),
+                xDenominatorCoeffs.end(),
+                theSampDenCoef);
+   }
+   if(yNumeratorCoeffs.size() == 20)
+   {
+      std::copy(yNumeratorCoeffs.begin(),
+                yNumeratorCoeffs.end(),
+                theLineNumCoef);
+   }
+   if(yDenominatorCoeffs.size() == 20)
+   {
+      std::copy(yDenominatorCoeffs.begin(),
+                yDenominatorCoeffs.end(),
+                theLineDenCoef);
+   }
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimRpcProjection::worldToLineSample()
+//  
+//  Overrides base class implementation. Directly computes line-sample from
+//  the polynomials.
+//*****************************************************************************
+void ossimRpcProjection::worldToLineSample(const ossimGpt& ground_point,
+                                      ossimDpt&       imgPt) const
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection::worldToLineSample(): entering..." << std::endl;
+
+   if(ground_point.isLatNan() ||
+      ground_point.isLonNan() )
+     {
+       imgPt.makeNan();
+       return;
+     }
+         
+   //*
+   // Normalize the lat, lon, hgt:
+   //*
+   double nlat = (ground_point.lat - theLatOffset) / theLatScale;
+   double nlon = (ground_point.lon - theLonOffset) / theLonScale;
+   double nhgt;
+
+   if(ossim::isnan(ground_point.hgt))
+   {
+      nhgt = (theHgtScale - theHgtOffset) / theHgtScale;
+   }
+   else
+   {
+      nhgt = (ground_point.hgt - theHgtOffset) / theHgtScale;
+   }
+
+   
+   //***
+   // Compute the adjusted, normalized line (U) and sample (V):
+   //***
+   double Pu = polynomial(nlat, nlon, nhgt, theLineNumCoef);
+   double Qu = polynomial(nlat, nlon, nhgt, theLineDenCoef);
+   double Pv = polynomial(nlat, nlon, nhgt, theSampNumCoef);
+   double Qv = polynomial(nlat, nlon, nhgt, theSampDenCoef);
+   double U_rot  = Pu / Qu;
+   double V_rot  = Pv / Qv;
+
+   //***
+   // U, V are normalized quantities. Need now to establish the image file
+   // line and sample. First, back out the adjustable parameter effects
+   // starting with rotation:
+   //***
+   double U = U_rot*theCosMapRot + V_rot*theSinMapRot;
+   double V = V_rot*theCosMapRot - U_rot*theSinMapRot;
+
+   //***
+   // Now back out skew, scale, and offset adjustments:
+   //***
+   imgPt.line = U*(theLineScale+theIntrackScale) + theLineOffset + theIntrackOffset;
+   imgPt.samp = V*(theSampScale+theCrtrackScale) + theSampOffset + theCrtrackOffset;
+
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection::worldToLineSample(): returning..." << std::endl;
+
+   return;
+}
+
+void  ossimRpcProjection::lineSampleToWorld(const ossimDpt& imagePoint,
+                                            ossimGpt&       worldPoint) const
+{
+   if(!imagePoint.hasNans())
+   {
+      
+      lineSampleHeightToWorld(imagePoint,
+                              worldPoint.height(),
+                              worldPoint);
+   }
+   else
+   {
+      worldPoint.makeNan();
+   }
+}
+
+//*****************************************************************************
+//  METHOD: ossimRpcProjection::lineSampleHeightToWorld()
+//  
+//  Performs reverse projection of image line/sample to ground point.
+//  The imaging ray is intersected with a level plane at height = elev.
+//
+//  NOTE: U = line, V = sample -- this differs from the convention.
+//
+//*****************************************************************************
+void ossimRpcProjection::lineSampleHeightToWorld(const ossimDpt& image_point,
+                                            const double&   ellHeight,
+                                            ossimGpt&       gpt) const
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection::lineSampleHeightToWorld: entering..." << std::endl;
+
+   //***
+   // Constants for convergence tests:
+   //***
+   static const int    MAX_NUM_ITERATIONS  = 10;
+   static const double CONVERGENCE_EPSILON = 0.1;  // pixels
+   
+   //***
+   // The image point must be adjusted by the adjustable parameters as well
+   // as the scale and offsets given as part of the RPC param normalization.
+   //
+   //      NOTE: U = line, V = sample
+   //***
+   double skew = (image_point.x-theSampOffset - theCrtrackOffset)*theYawSkew;
+   double U    = (image_point.y-theLineOffset - theIntrackOffset+skew) / (theLineScale+theIntrackScale);
+   double V    = (image_point.x-theSampOffset - theCrtrackOffset) / (theSampScale+theCrtrackScale);
+
+   //***
+   // Rotate the normalized U, V by the map rotation error (adjustable param):
+   //***
+   double U_rot = theCosMapRot*U - theSinMapRot*V;
+   double V_rot = theSinMapRot*U + theCosMapRot*V;
+   U = U_rot; V = V_rot;
+
+
+   // now apply adjust intrack and cross track
+   //***
+   // Initialize quantities to be used in the iteration for ground point:
+   //***
+   double nlat      = 0.0;  // normalized latitude
+   double nlon      = 0.0;  // normalized longitude
+   
+   double nhgt;
+
+   if(ossim::isnan(ellHeight))
+   {
+     nhgt = (theHgtScale - theHgtOffset) / theHgtScale;  // norm height
+   }
+   else
+   {
+      nhgt = (ellHeight - theHgtOffset) / theHgtScale;  // norm height
+   }
+   
+   double epsilonU = CONVERGENCE_EPSILON/(theLineScale+theIntrackScale);
+   double epsilonV = CONVERGENCE_EPSILON/(theSampScale+theCrtrackScale);
+   int    iteration = 0;
+
+   //***
+   // Declare variables only once outside the loop. These include:
+   // * polynomials (numerators Pu, Pv, and denominators Qu, Qv),
+   // * partial derivatives of polynomials wrt X, Y,
+   // * computed normalized image point: Uc, Vc,
+   // * residuals of normalized image point: deltaU, deltaV,
+   // * partial derivatives of Uc and Vc wrt X, Y,
+   // * corrections to normalized lat, lon: deltaLat, deltaLon.
+   //***
+   double Pu, Qu, Pv, Qv;
+   double dPu_dLat, dQu_dLat, dPv_dLat, dQv_dLat;
+   double dPu_dLon, dQu_dLon, dPv_dLon, dQv_dLon;
+   double Uc, Vc;
+   double deltaU, deltaV;
+   double dU_dLat, dU_dLon, dV_dLat, dV_dLon, W;
+   double deltaLat, deltaLon;
+   
+   //***
+   // Now iterate until the computed Uc, Vc is within epsilon of the desired
+   // image point U, V:
+   //***
+   do
+   {
+      //***
+      // Calculate the normalized line and sample Uc, Vc as ratio of
+      // polynomials Pu, Qu and Pv, Qv:
+      //***
+      Pu = polynomial(nlat, nlon, nhgt, theLineNumCoef);
+      Qu = polynomial(nlat, nlon, nhgt, theLineDenCoef);
+      Pv = polynomial(nlat, nlon, nhgt, theSampNumCoef);
+      Qv = polynomial(nlat, nlon, nhgt, theSampDenCoef);
+      Uc = Pu/Qu;
+      Vc = Pv/Qv;
+      
+      //***
+      // Compute residuals between desired and computed line, sample:
+      //***
+      deltaU = U - Uc;
+      deltaV = V - Vc;
+      
+      //***
+      // Check for convergence and skip re-linearization if converged:
+      //***
+      if ((fabs(deltaU) > epsilonU) || (fabs(deltaV) > epsilonV))
+      {
+         //***
+         // Analytically compute the partials of each polynomial wrt lat, lon:
+         //***
+         dPu_dLat = dPoly_dLat(nlat, nlon, nhgt, theLineNumCoef);
+         dQu_dLat = dPoly_dLat(nlat, nlon, nhgt, theLineDenCoef);
+         dPv_dLat = dPoly_dLat(nlat, nlon, nhgt, theSampNumCoef);
+         dQv_dLat = dPoly_dLat(nlat, nlon, nhgt, theSampDenCoef);
+         dPu_dLon = dPoly_dLon(nlat, nlon, nhgt, theLineNumCoef);
+         dQu_dLon = dPoly_dLon(nlat, nlon, nhgt, theLineDenCoef);
+         dPv_dLon = dPoly_dLon(nlat, nlon, nhgt, theSampNumCoef);
+         dQv_dLon = dPoly_dLon(nlat, nlon, nhgt, theSampDenCoef);
+         
+         //***
+         // Analytically compute partials of quotients U and V wrt lat, lon: 
+         //***
+         dU_dLat = (Qu*dPu_dLat - Pu*dQu_dLat)/(Qu*Qu);
+         dU_dLon = (Qu*dPu_dLon - Pu*dQu_dLon)/(Qu*Qu);
+         dV_dLat = (Qv*dPv_dLat - Pv*dQv_dLat)/(Qv*Qv);
+         dV_dLon = (Qv*dPv_dLon - Pv*dQv_dLon)/(Qv*Qv);
+         
+         W = dU_dLon*dV_dLat - dU_dLat*dV_dLon;
+         
+         //***
+         // Now compute the corrections to normalized lat, lon:
+         //***
+         deltaLat = (dU_dLon*deltaV - dV_dLon*deltaU) / W;
+         deltaLon = (dV_dLat*deltaU - dU_dLat*deltaV) / W;
+         nlat += deltaLat;
+         nlon += deltaLon;
+      }
+      
+      iteration++;
+      
+   } while (((fabs(deltaU)>epsilonU) || (fabs(deltaV)>epsilonV))
+            && (iteration < MAX_NUM_ITERATIONS));
+      
+   //***
+   // Test for exceeding allowed number of iterations. Flag error if so:
+   //***
+   if (iteration == MAX_NUM_ITERATIONS)
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimRpcProjection::lineSampleHeightToWorld: \nMax number of iterations reached in ground point "
+                                         << "solution. Results are inaccurate." << endl;
+   }
+
+   //***
+   // Now un-normalize the ground point lat, lon and establish return quantity:
+   //***
+   gpt.lat = nlat*theLatScale + theLatOffset;
+   gpt.lon = nlon*theLonScale + theLonOffset;
+   gpt.hgt = ellHeight;
+   
+}
+
+ossimGpt ossimRpcProjection::origin()const
+{
+   return ossimGpt(theLatOffset,
+                   theLonOffset,
+                   theHgtOffset);
+}
+
+
+ossimDpt ossimRpcProjection::getMetersPerPixel() const
+{
+   ossimDpt result;
+   
+//    ossimDpt left  = ossimDpt(theSampOffset-1,
+//                              theLineOffset);
+//    ossimDpt right = ossimDpt(theSampOffset+1,
+//                              theLineOffset);
+   ossimDpt top  = ossimDpt(theSampOffset,
+                            theLineOffset-1);
+   ossimDpt bottom = ossimDpt(theSampOffset,
+                              theLineOffset+1);
+//    ossimGpt leftG;
+//    ossimGpt rightG;
+   ossimGpt topG;
+   ossimGpt bottomG;
+   
+//    lineSampleToWorld(left, leftG);
+//    lineSampleToWorld(right, rightG);
+   lineSampleToWorld(top, topG);
+   lineSampleToWorld(bottom, bottomG);
+   
+//    result.x = (ossimEcefPoint(leftG) - ossimEcefPoint(rightG)).magnitude()/2.0;
+   result.y = (ossimEcefPoint(topG) - ossimEcefPoint(bottomG)).magnitude()/2.0;
+   result.x = result.y;
+
+   return result;
+}
+
+bool ossimRpcProjection::operator==(const ossimProjection& projection) const
+{
+   if(&projection == this) return true;
+
+   // not implemented yet
+   //
+   return false;
+}
+
+//*****************************************************************************
+// PRIVATE METHOD: ossimRpcProjection::polynomial
+//  
+//  Computes polynomial.
+//  
+//*****************************************************************************
+double ossimRpcProjection::polynomial(const double& P, const double& L,
+                                      const double& H, const double* c) const
+{
+   double r;
+
+   if (thePolyType == A)
+   {
+      r = c[ 0]       + c[ 1]*L     + c[ 2]*P     + c[ 3]*H     +
+          c[ 4]*L*P   + c[ 5]*L*H   + c[ 6]*P*H   + c[ 7]*L*P*H +
+          c[ 8]*L*L   + c[ 9]*P*P   + c[10]*H*H   + c[11]*L*L*L +
+          c[12]*L*L*P + c[13]*L*L*H + c[14]*L*P*P + c[15]*P*P*P +
+          c[16]*P*P*H + c[17]*L*H*H + c[18]*P*H*H + c[19]*H*H*H;
+   }
+   else
+   {
+      r = c[ 0]       + c[ 1]*L     + c[ 2]*P     + c[ 3]*H     +
+          c[ 4]*L*P   + c[ 5]*L*H   + c[ 6]*P*H   + c[ 7]*L*L   +
+          c[ 8]*P*P   + c[ 9]*H*H   + c[10]*L*P*H + c[11]*L*L*L +
+          c[12]*L*P*P + c[13]*L*H*H + c[14]*L*L*P + c[15]*P*P*P +
+          c[16]*P*H*H + c[17]*L*L*H + c[18]*P*P*H + c[19]*H*H*H;
+   }
+   
+   return r;
+}
+
+//*****************************************************************************
+// PRIVATE METHOD: ossimRpcProjection::dPoly_dLat
+//  
+//  Computes derivative of polynomial wrt normalized Latitude P.
+//  
+//*****************************************************************************
+double ossimRpcProjection::dPoly_dLat(const double& P, const double& L,
+                                 const double& H, const double* c) const
+{
+   double dr;
+
+   if (thePolyType == A)
+   {
+      dr = c[2] + c[4]*L + c[6]*H + c[7]*L*H + 2*c[9]*P + c[12]*L*L +
+           2*c[14]*L*P + 3*c[15]*P*P +2*c[16]*P*H + c[18]*H*H;
+   }
+   else
+   {
+      dr = c[2] + c[4]*L + c[6]*H + 2*c[8]*P + c[10]*L*H + 2*c[12]*L*P +
+           c[14]*L*L + 3*c[15]*P*P + c[16]*H*H + 2*c[18]*P*H;
+   }
+   
+   return dr;
+}
+
+//*****************************************************************************
+// PRIVATE METHOD: ossimRpcProjection::dPoly_dLon
+//  
+//  Computes derivative of polynomial wrt normalized Longitude L.
+//  
+//*****************************************************************************
+double ossimRpcProjection::dPoly_dLon(const double& P, const double& L,
+                                 const double& H, const double* c) const
+{
+   double dr;
+
+   if (thePolyType == A)
+   {
+      dr = c[1] + c[4]*P + c[5]*H + c[7]*P*H + 2*c[8]*L + 3*c[11]*L*L +
+           2*c[12]*L*P + 2*c[13]*L*H + c[14]*P*P + c[17]*H*H;
+   }
+   else
+   {
+      dr = c[1] + c[4]*P + c[5]*H + 2*c[7]*L + c[10]*P*H + 3*c[11]*L*L +
+           c[12]*P*P + c[13]*H*H + 2*c[14]*P*L + 2*c[17]*L*H;
+   }
+   return dr;
+}
+
+//*****************************************************************************
+//  METHOD: ossimRpcProjection::print()
+//  
+//  Formatted dump of data members.
+//  
+//*****************************************************************************
+std::ostream& ossimRpcProjection::print(std::ostream& out) const
+{
+   out << "\nDump of ossimRpcProjection object at " << hex << this << ":\n"
+       << POLY_TYPE_KW   << ": " << thePolyType   << "\n"
+       << LINE_SCALE_KW  << ": " << theLineScale  << "\n"
+       << SAMP_SCALE_KW  << ": " << theSampScale  << "\n"
+       << LAT_SCALE_KW   << ": " << theLatScale   << "\n"
+       << LON_SCALE_KW   << ": " << theLonScale   << "\n"
+       << HGT_SCALE_KW   << ": " << theHgtScale   << "\n"
+       << LINE_OFFSET_KW << ": " << theLineOffset << "\n"
+       << SAMP_OFFSET_KW << ": " << theSampOffset << "\n"
+       << LAT_OFFSET_KW  << ": " << theLatOffset  << "\n"
+       << LON_OFFSET_KW  << ": " << theLonOffset  << "\n"
+       << HGT_OFFSET_KW  << ": " << theHgtOffset  << endl;
+
+   for (int i=0; i<NUM_COEFFS; i++)
+      out<<"  "<<LINE_NUM_COEF_KW<<"["<<i<<"]: "<<theLineNumCoef[i]<<endl;
+
+   out << endl;
+   for (int i=0; i<NUM_COEFFS; i++)
+      out<<"  "<<LINE_DEN_COEF_KW<<"["<<i<<"]: "<<theLineDenCoef[i]<<endl;
+
+   out << endl;
+   for (int i=0; i<NUM_COEFFS; i++)
+      out<<"  "<<SAMP_NUM_COEF_KW<<"["<<i<<"]: "<<theSampNumCoef[i]<<endl;
+
+   out << endl;
+   for (int i=0; i<NUM_COEFFS; i++)
+      out<<"  "<<SAMP_DEN_COEF_KW<<"["<<i<<"]: "<<theSampDenCoef[i]<<endl;
+      
+   out << endl;
+
+   return ossimProjection::print(out);
+}
+
+//*****************************************************************************
+//  METHOD: ossimRpcProjection::saveState()
+//  
+//  Saves the model state to the KWL. This KWL also serves as a geometry file.
+//  
+//*****************************************************************************
+bool ossimRpcProjection::saveState(ossimKeywordlist& kwl,
+                              const char* prefix) const
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection::saveState(): entering..." << std::endl;
+
+   kwl.add(prefix, ossimKeywordNames::TYPE_KW, MODEL_TYPE);
+
+   //***
+   // Hand off to base class for common stuff:
+   //***
+   ossimProjection::saveState(kwl, prefix);
+
+   kwl.add(prefix,
+           POLY_TYPE_KW,
+           (char)thePolyType,
+           true);
+   
+   kwl.add(prefix, LINE_SCALE_KW, theLineScale);
+   kwl.add(prefix, SAMP_SCALE_KW, theSampScale);
+   kwl.add(prefix, LAT_SCALE_KW, theLatScale);
+   kwl.add(prefix, LON_SCALE_KW, theLonScale);
+   kwl.add(prefix, HGT_SCALE_KW, theHgtScale);
+   kwl.add(prefix, LINE_OFFSET_KW, theLineOffset);
+   kwl.add(prefix, SAMP_OFFSET_KW, theSampOffset);
+   kwl.add(prefix, LAT_OFFSET_KW, theLatOffset);
+   kwl.add(prefix, LON_OFFSET_KW, theLonOffset);
+   
+   kwl.add(prefix, HGT_OFFSET_KW, theHgtOffset);
+
+   for (int i=0; i<NUM_COEFFS; i++)
+   {
+      kwl.add(prefix, (LINE_NUM_COEF_KW + ossimString::toString(i)).c_str(), theLineNumCoef[i]);
+      kwl.add(prefix, (LINE_DEN_COEF_KW + ossimString::toString(i)).c_str(), theLineDenCoef[i]);
+      kwl.add(prefix, (SAMP_NUM_COEF_KW + ossimString::toString(i)).c_str(), theSampNumCoef[i]);
+      kwl.add(prefix, (SAMP_DEN_COEF_KW + ossimString::toString(i)).c_str(), theSampDenCoef[i]);
+   }
+      
+   saveAdjustments(kwl, prefix);
+   
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection::saveState(): returning..." << std::endl;
+   return true;
+}
+
+//*****************************************************************************
+//  METHOD: ossimRpcProjection::loadState()
+//  
+//  Restores the model's state from the KWL. This KWL also serves as a
+//  geometry file.
+//  
+//*****************************************************************************
+bool ossimRpcProjection::loadState(const ossimKeywordlist& kwl,
+                              const char* prefix) 
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection::loadState(): entering..." << std::endl;
+
+   const char* value;
+   const char* keyword;
+
+   //***
+   // Pass on to the base-class for parsing first:
+   //***
+   bool success = ossimProjection::loadState(kwl, prefix);
+   if (!success)
+   {
+      theErrorStatus++;
+      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection::loadState(): returning with error..." << std::endl;
+      return false;
+   }
+      
+   //***
+   // Continue parsing for local members:
+   //***
+   keyword = POLY_TYPE_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   thePolyType = (PolynomialType) value[0];
+      
+   keyword = LINE_SCALE_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   theLineScale = ossimString(value).toDouble();
+   
+   keyword = SAMP_SCALE_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   theSampScale = ossimString(value).toDouble();
+   
+   keyword = LAT_SCALE_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   theLatScale = ossimString(value).toDouble();
+   
+   keyword = LON_SCALE_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   theLonScale = ossimString(value).toDouble();
+   
+   keyword = HGT_SCALE_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   theHgtScale = ossimString(value).toDouble();
+   
+   keyword = LINE_OFFSET_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   theLineOffset = ossimString(value).toDouble();
+   
+   keyword = SAMP_OFFSET_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   theSampOffset = ossimString(value).toDouble();
+   
+   keyword = LAT_OFFSET_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   theLatOffset = ossimString(value).toDouble();
+   
+   keyword = LON_OFFSET_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   theLonOffset = ossimString(value).toDouble();
+   
+   keyword = HGT_OFFSET_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
+                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                          << std::endl;
+      return false;
+   }
+   theHgtOffset = ossimString(value).toDouble();
+
+   for (int i=0; i<NUM_COEFFS; i++)
+   {
+      value = kwl.find(prefix, (LINE_NUM_COEF_KW+ossimString::toString(i)).c_str());
+      if (!value)
+      {
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
+                                             << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                             << std::endl;
+         return false;
+      }
+      theLineNumCoef[i] = ossimString(value).toDouble();
+   
+      value = kwl.find(prefix, (LINE_DEN_COEF_KW+ossimString::toString(i)).c_str());
+      if (!value)
+      {
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
+                                             << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                             << std::endl;
+         return false;
+      }
+      theLineDenCoef[i] = ossimString(value).toDouble();
+   
+      value = kwl.find(prefix, (SAMP_NUM_COEF_KW+ossimString::toString(i)).c_str());
+      if (!value)
+      {
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
+                                             << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                             << std::endl;
+         return false;
+      }
+      theSampNumCoef[i] = ossimString(value).toDouble();
+      
+      value = kwl.find(prefix, (SAMP_DEN_COEF_KW+ossimString::toString(i)).c_str());
+      if (!value)
+      {
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
+                                             << "<" << keyword << ">. Check the keywordlist for proper syntax."
+                                             << std::endl;
+         return false;
+      }
+      theSampDenCoef[i] = ossimString(value).toDouble();
+   }
+
+   loadAdjustments(kwl, prefix);
+
+   if(getNumberOfAdjustableParameters() < 1)
+   {
+      initAdjustableParameters();
+   }
+      
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection::loadState(): returning..." << std::endl;
+
+   return true;
+}
+
+void ossimRpcProjection::initAdjustableParameters()
+{
+   resizeAdjustableParameterArray(NUM_ADJUSTABLE_PARAMS);
+   int numParams = getNumberOfAdjustableParameters();
+   for (int i=0; i<numParams; i++)
+   {
+      setAdjustableParameter(i, 0.0);
+      setParameterDescription(i, PARAM_NAMES[i]);
+      setParameterUnit(i,PARAM_UNITS[i]);
+   }
+   setParameterSigma(INTRACK_OFFSET, 50.0);
+   setParameterSigma(CRTRACK_OFFSET, 50.0);
+   setParameterSigma(INTRACK_SCALE, 50.0);  
+   setParameterSigma(CRTRACK_SCALE, 50.0);  
+   setParameterSigma(MAP_ROTATION, 0.1);
+//   setParameterSigma(YAW_OFFSET, 0.001);
+}
+
+void ossimRpcProjection::adjustableParametersChanged()
+{
+   theIntrackOffset    = computeParameterOffset(INTRACK_OFFSET);
+   theCrtrackOffset    = computeParameterOffset(CRTRACK_OFFSET);
+   theIntrackScale     = computeParameterOffset(INTRACK_SCALE);
+   theCrtrackScale     = computeParameterOffset(CRTRACK_SCALE);
+   double mapRotation  = computeParameterOffset(MAP_ROTATION);
+   theCosMapRot        = ossim::cosd(mapRotation);
+   theSinMapRot        = ossim::sind(mapRotation);
+}
+
+bool
+ossimRpcProjection::setupOptimizer(const ossimString& setup)
+{
+   ossimKeywordlist kwl;
+
+   if(kwl.addFile(ossimFilename(setup)))
+   {
+      return loadState(kwl);
+   }
+   else
+   {
+      ossimRefPtr<ossimProjection> proj = ossimProjectionFactoryRegistry::instance()->createProjection(setup);
+      if(proj.valid())
+      {
+         kwl.clear();
+         proj->saveState(kwl);
+         
+         return loadState(kwl);
+      }
+   }
+   
+   return false;
+}
+
+ossim_uint32
+ossimRpcProjection::degreesOfFreedom()const
+{
+   ossim_uint32 dof = 0;
+   ossim_uint32 idx = 0;
+   ossim_uint32 numAdj = getNumberOfAdjustableParameters();
+   for(idx = 0; idx < numAdj; ++idx)
+   {
+      if(!isParameterLocked(idx))
+      {
+         ++dof;
+      }
+   }
+   
+   return dof;
+}
+//give inverse() partial derivative regarding parameter parmIdx (>=0)
+ossimGpt
+ossimRpcProjection::getInverseDeriv(int parmIdx, const ossimDpt& ipos, double hdelta)
+{   
+   double den = 0.5/hdelta;
+   ossimGpt res,gd;
+
+   double middle = getAdjustableParameter(parmIdx);
+   //set parm to high value
+   setAdjustableParameter(parmIdx, middle + hdelta, true);
+   res = inverse(ipos);
+   //set parm to low value and gte difference
+   setAdjustableParameter(parmIdx, middle - hdelta, true);
+   gd = inverse(ipos);
+
+   //reset parm
+   setAdjustableParameter(parmIdx, middle, true);
+
+   res.lon = den*(res.lon - gd.lon) * 100000.0; //TBC : approx meters
+   res.lat = den*(res.lat - gd.lat) * 100000.0 * cos(gd.lat / 180.0 * M_PI);
+   res.hgt = den*(res.hgt - gd.hgt);
+
+   return res;
+}
+
+//give forward() partial derivative regarding parameter parmIdx (>=0)
+ossimDpt
+ossimRpcProjection::getForwardDeriv(int parmIdx, const ossimGpt& gpos, double hdelta)
+{   
+   static double den = 0.5/hdelta;
+   ossimDpt res;
+
+   double middle = getAdjustableParameter(parmIdx);
+   //set parm to high value
+   setAdjustableParameter(parmIdx, middle + hdelta, true);
+   res = inverse(gpos);
+   //set parm to low value and gte difference
+   setAdjustableParameter(parmIdx, middle - hdelta, true);
+   res -= inverse(gpos);
+   //get partial derivative
+   res = res*den;
+
+   //reset parm
+   setAdjustableParameter(parmIdx, middle, true);
+
+   return res;
+}
+
+double
+ossimRpcProjection::optimizeFit(const ossimTieGptSet& tieSet, double* /* targetVariance */)
+{
+#if 1
+   //NOTE : ignore targetVariance
+   ossimRefPtr<ossimRpcSolver> solver = new ossimRpcSolver(false, false); //TBD : choices should be part of setupFromString
+
+   std::vector<ossimDpt> imagePoints;
+   std::vector<ossimGpt> groundPoints;
+   tieSet.getSlaveMasterPoints(imagePoints, groundPoints);
+   solver->solveCoefficients(imagePoints, groundPoints);
+
+   ossimRefPtr< ossimImageGeometry > optProj = solver->createRpcProjection();
+   if (!optProj)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::optimizeFit(): error when optimizing the RPC with given tie points"
+                                             << std::endl;
+      return -1.0;
+   }
+
+   if(optProj->hasProjection())
+   {
+      ossimKeywordlist kwl;
+      optProj->getProjection()->saveState(kwl);
+      this->loadState(kwl);
+   }
+
+   return std::pow(solver->getRmsError(), 2); //variance in pixel^2
+#else
+   // COPIED from ossimRpcProjection
+   //
+   //
+   //use a simple Levenberg-Marquardt non-linear optimization
+   //note : please limit the number of tie points
+   //
+   //INPUTS: requires Jacobian matrix (partial derivatives with regards to parameters)
+   //OUPUTS: will also compute parameter covariance matrix
+   //
+   //TBD: use targetVariance!
+ 
+   int np = getNumberOfAdjustableParameters();
+   int nobs = tieSet.size();
+
+   //setup initail values
+   int iter=0;
+   int iter_max = 200;
+   double minResidue = 1e-10; //TBC
+   double minDelta = 1e-10; //TBC
+
+   //build Least Squares initial normal equation
+   // don't waste memory, add samples one at a time
+   NEWMAT::SymmetricMatrix A;
+   NEWMAT::ColumnVector residue;
+   NEWMAT::ColumnVector projResidue;
+   double deltap_scale = 1e-4; //step_Scale is 1.0 because we expect parameters to be between -1 and 1
+   buildNormalEquation(tieSet, A, residue, projResidue, deltap_scale);
+   double ki2=residue.SumSquare();
+
+   //get current adjustment (between -1 and 1 normally) and convert to ColumnVector
+   ossimAdjustmentInfo cadj;
+   getAdjustment(cadj);
+   std::vector< ossimAdjustableParameterInfo >& parmlist = cadj.getParameterList();
+   NEWMAT::ColumnVector cparm(np), nparm(np);
+   for(int n=0;n<np;++n)
+   {
+      cparm(n+1) = parmlist[n].getParameter();
+   }
+
+   double damping_speed = 2.0;
+   //find max diag element for A
+   double maxdiag=0.0;
+   for(int d=1;d<=np;++d) {
+      if (maxdiag < A(d,d)) maxdiag=A(d,d);
+   }
+   double damping = 1e-3 * maxdiag;
+   double olddamping = 0.0;
+   bool found = false;
+
+//DEBUG TBR
+cout<<"rms="<<sqrt(ki2/nobs)<<" ";
+cout.flush();
+
+   while ( (!found) && (iter < iter_max) ) //non linear optimization loop
+   {
+      bool decrease = false;
+
+      do
+      {
+         //add damping update to normal matrix
+         for(int d=1;d<=np;++d) A(d,d) += damping - olddamping;
+         olddamping = damping;
+
+         NEWMAT::ColumnVector deltap = solveLeastSquares(A, projResidue);
+
+         if (deltap.NormFrobenius() <= minDelta) 
+         {
+            found = true;
+         } else {
+            //update adjustment
+            nparm = cparm + deltap;
+            for(int n=0;n<np;++n)
+            {
+               setAdjustableParameter(n, nparm(n+1), false); //do not update now, wait
+            }
+            adjustableParametersChanged();
+
+            //check residue is reduced
+            NEWMAT::ColumnVector newresidue = getResidue(tieSet);
+            double newki2=newresidue.SumSquare();
+            double res_reduction = (ki2 - newki2) / (deltap.t()*(deltap*damping + projResidue)).AsScalar();
+ //DEBUG TBR
+       cout<<sqrt(newki2/nobs)<<" ";
+       cout.flush();
+
+            if (res_reduction > 0)
+            {
+               //accept new parms
+               cparm = nparm;
+               ki2=newki2;
+
+               deltap_scale = max(1e-15, deltap.NormInfinity()*1e-4);
+
+               buildNormalEquation(tieSet, A, residue, projResidue, deltap_scale);
+               olddamping = 0.0;
+
+               found = ( projResidue.NormInfinity() <= minResidue );
+               //update damping factor
+               damping *= std::max( 1.0/3.0, 1.0-std::pow((2.0*res_reduction-1.0),3));
+               damping_speed = 2.0;
+               decrease = true;
+            } else {
+               //cancel parameter update
+               for(int n=0;n<np;++n)
+               {
+                  setAdjustableParameter(n, nparm(n+1), false); //do not update right now
+               }
+               adjustableParametersChanged();
+
+               damping *= damping_speed;
+               damping_speed *= 2.0;
+            }
+         }
+      } while (!decrease && !found);
+      ++iter;
+   }
+
+//DEBUG TBR
+cout<<endl;
+
+   //compute parameter correlation
+   // use normal matrix inverse
+   //TBD
+
+   return ki2/nobs;
+#endif
+}
+
+void
+ossimRpcProjection::buildNormalEquation(const ossimTieGptSet& tieSet,
+                                      NEWMAT::SymmetricMatrix& A,
+                                      NEWMAT::ColumnVector& residue,
+                                      NEWMAT::ColumnVector& projResidue,
+                                      double pstep_scale)
+{
+   //goal:       build Least Squares system
+   //constraint: never store full Jacobian matrix in memory (can be huge)
+   //            so we build the matrices incrementally
+   // the system can be built using forward() or inverse() depending on the projection capabilities : useForward()
+   //
+   //TBD : add covariance matrix for each tie point
+
+   //init
+   int np = getNumberOfAdjustableParameters();
+   int dimObs;
+   bool useImageObs = useForward(); //caching
+   if (useImageObs)
+   {
+      dimObs = 2; //image observation
+   } else {
+      dimObs = 3; //ground observations
+   }
+   int no = dimObs * tieSet.size(); //number of observations
+
+   A.ReSize(np);
+   residue.ReSize(no);
+   projResidue.ReSize(np);
+   //Zeroify matrices that will be accumulated
+   A           = 0.0;
+   projResidue = 0.0;
+
+   const vector<ossimRefPtr<ossimTieGpt> >& theTPV = tieSet.getTiePoints();
+   vector<ossimRefPtr<ossimTieGpt> >::const_iterator tit;
+   unsigned long c=1;
+
+   if (useImageObs)
+   { 
+     //image observations 
+     ossimDpt* imDerp = new ossimDpt[np];
+     ossimDpt resIm;
+     // loop on tie points
+      for (tit = theTPV.begin() ; tit != theTPV.end() ; ++tit)
+      {
+         //compute residue
+         resIm = (*tit)->tie - forward(*(*tit));
+         residue(c++) = resIm.x;
+         residue(c++) = resIm.y;
+
+         //compute all image derivatives regarding parametres for the tie point position
+         for(int p=0;p<np;++p)
+         {
+            imDerp[p] = getForwardDeriv( p , *(*tit) , pstep_scale);
+         }
+
+         //compute influence of tie point on all sytem elements
+         for(int p1=0;p1<np;++p1)
+         {        
+            //proj residue: J * residue
+            projResidue.element(p1) += imDerp[p1].x * resIm.x + imDerp[p1].y * resIm.y;
+
+            //normal matrix A = transpose(J)*J
+            for(int p2=p1;p2<np;++p2)
+            {
+               A.element(p1,p2) += imDerp[p1].x * imDerp[p2].x + imDerp[p1].y * imDerp[p2].y;
+            }
+         }
+      }
+      delete []imDerp;
+   }
+   else
+   {
+      // ground observations
+      std::vector<ossimGpt> gdDerp(np);
+      ossimGpt gd, resGd;
+      // loop on tie points
+      for (tit = theTPV.begin() ; tit != theTPV.end() ; ++tit)
+      {
+         //compute residue
+         gd = inverse((*tit)->tie);
+         residue(c++) = resGd.lon = ((*tit)->lon - gd.lon) * 100000.0;
+         residue(c++) = resGd.lat = ((*tit)->lat - gd.lat) * 100000.0 * cos(gd.lat / 180.0 * M_PI);
+         residue(c++) = resGd.hgt = (*tit)->hgt - gd.hgt; //TBD : normalize to meters?
+
+         //compute all image derivatives regarding parametres for the tie point position
+         for(int p=0;p<np;++p)
+         {
+            gdDerp[p] = getInverseDeriv( p , (*tit)->tie, pstep_scale);
+         }
+
+         //compute influence of tie point on all sytem elements
+         for(int p1=0;p1<np;++p1)
+         {        
+            //proj residue: J * residue
+            projResidue.element(p1) += gdDerp[p1].lon * resGd.lon + gdDerp[p1].lat * resGd.lat + gdDerp[p1].hgt * resGd.hgt; //TBC
+
+            //normal matrix A = transpose(J)*J
+            for(int p2=p1;p2<np;++p2)
+            {
+               A.element(p1,p2) += gdDerp[p1].lon * gdDerp[p2].lon + gdDerp[p1].lat * gdDerp[p2].lat + gdDerp[p1].hgt * gdDerp[p2].hgt;
+            }
+         }
+      }
+   } //end of if (useImageObs)
+}
+
+NEWMAT::ColumnVector
+ossimRpcProjection::getResidue(const ossimTieGptSet& tieSet)
+{
+   //init
+   NEWMAT::ColumnVector residue;
+   int dimObs;
+
+   bool useImageObs = useForward(); //caching
+   if (useImageObs)
+   {
+      dimObs = 2; //image observation
+   } else {
+      dimObs = 3; //ground observations
+   }
+   int no = dimObs * tieSet.size(); //number of observations
+
+   residue.ReSize(no);
+
+   const vector<ossimRefPtr<ossimTieGpt> >& theTPV = tieSet.getTiePoints();
+   vector<ossimRefPtr<ossimTieGpt> >::const_iterator tit;
+   unsigned long c=1;
+
+   if (useImageObs)
+   { 
+     //image observations 
+     ossimDpt resIm;
+     // loop on tie points
+      for (tit = theTPV.begin() ; tit != theTPV.end() ; ++tit)
+      {
+         //compute residue
+         resIm = (*tit)->tie - forward(**tit);
+         residue(c++) = resIm.x;
+         residue(c++) = resIm.y;
+      }
+   } else {
+      // ground observations
+      ossimGpt gd;
+      // loop on tie points
+      for (tit = theTPV.begin() ; tit != theTPV.end() ; ++tit)
+      {
+         //compute residue
+         gd = inverse((*tit)->tie);
+         residue(c++) = ((*tit)->lon - gd.lon) * 100000.0; //approx meters //TBC TBD
+         residue(c++) = ((*tit)->lat - gd.lat) * 100000.0 * cos(gd.lat / 180.0 * M_PI);
+         residue(c++) = (*tit)->hgt - gd.hgt; //meters
+      }
+   } //end of if (useImageObs)
+
+   return residue;
+}
+
+/*!
+ * solves Ax = r , with A symmetric positive definite
+ * A can be rank deficient
+ * size of A is typically between 10 and 100 rows
+ */
+NEWMAT::ColumnVector 
+ossimRpcProjection::solveLeastSquares(NEWMAT::SymmetricMatrix& A,  NEWMAT::ColumnVector& r)const
+{
+   NEWMAT::ColumnVector x = invert(A)*r;
+   return x;
+}
+
+/** 
+ * stable invert stolen from ossimRpcSolver
+ */
+NEWMAT::Matrix 
+ossimRpcProjection::invert(const NEWMAT::Matrix& m)const
+{
+   ossim_uint32 idx = 0;
+   NEWMAT::DiagonalMatrix d;
+   NEWMAT::Matrix u;
+   NEWMAT::Matrix v;
+
+   // decompose m.t*m which is stored in Temp into the singular values and vectors.
+   //
+   NEWMAT::SVD(m, d, u, v, true, true);
+   
+   // invert the diagonal
+   // this is just doing the reciprical fo all diagonal components and store back int
+   // d.  ths compute d inverse.
+   //
+   for(idx=0; idx < (ossim_uint32)d.Ncols(); ++idx)
+   {
+      if(d[idx] > 1e-14) //TBC : use DBL_EPSILON ?
+      {
+         d[idx] = 1.0/d[idx];
+      }
+      else
+      {
+         d[idx] = 0.0;
+
+//DEBUG TBR
+cout<<"warning: singular matrix in SVD"<<endl;
+
+      }
+   }
+
+   //compute inverse of decomposed m;
+   return v*d*u.t();
+}
diff --git a/ossim/src/ossim/projection/ossimRpcSolver.cpp b/ossim/src/ossim/projection/ossimRpcSolver.cpp
new file mode 100644
index 0000000..19f7296
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimRpcSolver.cpp
@@ -0,0 +1,828 @@
+//*****************************************************************************
+// FILE: ossimRpcModel.h
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// AUTHOR: Garrett Potts
+//
+//*****************************************************************************
+//  $Id: ossimRpcSolver.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstdlib>
+#include <ctime>
+#include <iomanip>
+#include <iostream>
+#include <iterator>
+
+#include <ossim/projection/ossimRpcSolver.h>
+#include <ossim/projection/ossimRpcModel.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/matrix/newmatap.h>
+#include <ossim/matrix/newmatio.h>
+#include <ossim/matrix/newmatnl.h>
+#include <ossim/matrix/newmatio.h>
+#include <ossim/elevation/ossimElevManager.h>
+#include <ossim/support_data/ossimNitfRpcBTag.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/base/ossim2dTo2dIdentityTransform.h>
+ossimRpcSolver::ossimRpcSolver(bool useElevation,
+                               bool useHeightAboveMSLFlag)
+{
+   theUseElevationFlag   = useElevation;
+   theHeightAboveMSLFlag = useHeightAboveMSLFlag;
+   theXNumCoeffs.resize(20);
+   theXDenCoeffs.resize(20);
+   theYNumCoeffs.resize(20);
+   theYDenCoeffs.resize(20);
+
+   std::fill(theXNumCoeffs.begin(),
+             theXNumCoeffs.end(), 0.0);
+   std::fill(theXDenCoeffs.begin(),
+             theXDenCoeffs.end(), 0.0);
+   std::fill(theYNumCoeffs.begin(),
+             theYNumCoeffs.end(), 0.0);
+   std::fill(theYDenCoeffs.begin(),
+             theYDenCoeffs.end(), 0.0);
+   theXNumCoeffs[0] = 1.0;
+   theXDenCoeffs[0] = 1.0;
+   theYNumCoeffs[0] = 1.0;
+   theYDenCoeffs[0] = 1.0;
+}
+
+void ossimRpcSolver::solveCoefficients(const ossimDrect& imageBounds,
+                                       ossimProjection* proj,
+                                       ossim_uint32 xSamples,
+                                       ossim_uint32 ySamples,
+                                       bool shiftTo0Flag)
+{
+   ossimRefPtr<ossimImageGeometry> geom = new ossimImageGeometry();
+   geom->setProjection(proj);
+   solveCoefficients(imageBounds, geom.get(), xSamples, ySamples, shiftTo0Flag);
+}
+
+void ossimRpcSolver::solveCoefficients(const ossimDrect& imageBounds,
+                                       ossimImageGeometry* geom,
+                                       ossim_uint32 xSamples,
+                                       ossim_uint32 ySamples,
+                                       bool shiftTo0Flag)
+{
+   std::vector<ossimGpt> theGroundPoints;
+   std::vector<ossimDpt> theImagePoints;
+   ossim_uint32 x,y;
+   ossim_float64 w = imageBounds.width();
+   ossim_float64 h = imageBounds.height();
+   ossimGpt gpt;
+   ossimGpt defaultGround;
+   if(ySamples < 1) ySamples = 12;
+   if(xSamples < 1) xSamples = 12;
+   srand(time(0));
+   double xnorm;
+   double ynorm;
+   ossimDpt ul = imageBounds.ul();
+   ossimDpt shiftTo0(-ul.x,
+                     -ul.y);
+   for(y = 0; y < ySamples; ++y)
+   {
+      for(x = 0; x < xSamples; ++x)
+      {
+         if(ySamples > 1)
+         {
+//            ynorm = (double)y/(double)(ySamples-1.0);
+            ynorm = (double)y/(double)(ySamples);
+         }
+         else
+         {
+            ynorm = 0.0;
+         }
+         if(xSamples > 1)
+         {
+//            xnorm = (double)x/(double)(xSamples-1.0);
+            xnorm = (double)x/(double)(xSamples);
+         }
+         else
+         {
+            xnorm = 0.0;
+         }
+         
+//          ossimDpt dpt((.25 + .5*xnorm)*w + ul.x,
+//                       (.25 + .5*ynorm)*h + ul.y);
+         ossimDpt dpt(w*xnorm + ul.x,
+                      h*ynorm + ul.y);
+         
+         geom->localToWorld(dpt, gpt);
+         gpt.changeDatum(defaultGround.datum());
+
+         if(shiftTo0Flag)
+         {
+            theImagePoints.push_back(dpt+shiftTo0);
+         }
+         else
+         {
+            theImagePoints.push_back(dpt);
+         }
+         if(theHeightAboveMSLFlag)
+         {
+            double h = ossimElevManager::instance()->getHeightAboveMSL(gpt);
+            if(ossim::isnan(h) == false)
+            {
+               gpt.height(h);
+            }
+         }
+         if(gpt.isHgtNan())
+         {
+            gpt.height(0.0);
+         }
+         theGroundPoints.push_back(gpt);
+      }
+   }
+   solveCoefficients(theImagePoints,
+                     theGroundPoints);
+}
+
+void ossimRpcSolver::solveCoefficients(const std::vector<ossimDpt>& imagePoints,
+                                       const std::vector<ossimGpt>& groundControlPoints,
+                                       const ossimDpt& /* imageShift */)
+{
+   if((imagePoints.size() != groundControlPoints.size()))
+   {
+      return;
+   }
+
+   // we will first create f which holds the result of f(x,y,z).
+   // This basically holds the cooresponding image point for each
+   // ground control point.  One for x and a second array for y
+   //
+   std::vector<double> f[2];
+
+   //  Holds the x, y, z vectors
+   //
+   std::vector<double> x;
+   std::vector<double> y;
+   std::vector<double> z;
+   ossim_uint32 c = 0;
+   f[0].resize(imagePoints.size());
+   f[1].resize(imagePoints.size());
+   x.resize(imagePoints.size());
+   y.resize(imagePoints.size());
+   z.resize(imagePoints.size());
+
+   // compute the image bounds for the given image points
+   //
+   ossimDrect rect(imagePoints);
+
+   // get the widtha dn height that will be used
+   // in data normalization
+   //
+   ossim_float64 w = rect.width();
+   ossim_float64 h = rect.height();
+
+   // setup scales for normalization
+//   ossim_float64 xScale = w/2.0;
+//   ossim_float64 yScale = h/2.0;
+
+   // get the shift for the cneter of the data
+   ossimDpt centerImagePoint  = rect.midPoint();
+   
+   double latSum=0.0;
+   double lonSum=0.0;
+   double heightSum=0.0;
+
+   // find the center ground  Use elevation only if its enabled
+   //
+   for(c = 0; c < groundControlPoints.size();++c)
+   {
+      if(ossim::isnan(groundControlPoints[c].latd()) == false)
+      {
+         latSum += groundControlPoints[c].latd();
+      }
+      if(ossim::isnan(groundControlPoints[c].lond()) == false)
+      {
+         lonSum += groundControlPoints[c].lond();
+      }
+      if(!groundControlPoints[c].isHgtNan())
+      {
+         if(theUseElevationFlag)
+         {
+            heightSum += groundControlPoints[c].height();
+         }
+      }
+   }
+
+   // set the center ground for the offset
+   //
+   ossimGpt centerGround(latSum/groundControlPoints.size(),
+                         lonSum/groundControlPoints.size(),
+                         heightSum/groundControlPoints.size());
+
+   // set up ground scales and deltas for normalization
+   //
+//   ossim_float64 latScale       = 0.0;
+//   ossim_float64 lonScale       = 0.0;
+//   ossim_float64 heightScale    = 0.0;
+   ossim_float64 deltaLat       = 0.0;
+   ossim_float64 deltaLon       = 0.0;
+   ossim_float64 deltaHeight    = 0.0;
+   ossim_float64 maxDeltaLat    = 0.0;
+   ossim_float64 maxDeltaLon    = 0.0;
+   ossim_float64 maxDeltaHeight = 0.0;
+   ossim_float64 heightTest       = 0.0;
+   for(c = 0; c < groundControlPoints.size(); ++c)
+   {
+      deltaLat = (groundControlPoints[c].latd()-centerGround.latd());
+      deltaLon = (groundControlPoints[c].lond()-centerGround.lond());
+      if(!groundControlPoints[c].isHgtNan())
+      {
+         if(theUseElevationFlag)
+         {
+            deltaHeight = groundControlPoints[c].height() - centerGround.height();
+            heightTest  = groundControlPoints[c].height();
+         }
+         else
+         {
+            deltaHeight = 0.0;
+            heightTest  = 0.0;
+         }
+      }
+      else
+      {
+         deltaHeight = 0.0;
+      }
+      f[0][c] = (imagePoints[c].x - centerImagePoint.x)/(w/2.0);
+      f[1][c] = (imagePoints[c].y - centerImagePoint.y)/(h/2.0);
+      
+      x[c] = deltaLon;
+      y[c] = deltaLat;
+      z[c] = deltaHeight;
+
+      if(fabs(deltaLat) > maxDeltaLat) maxDeltaLat          = fabs(deltaLat);
+      if(fabs(deltaLon) > maxDeltaLon) maxDeltaLon          = fabs(deltaLon);
+      if(fabs(heightTest) > maxDeltaHeight) maxDeltaHeight  = fabs(heightTest);
+   }
+   bool elevationEnabled = theUseElevationFlag;
+   // always normalize, except if too small
+   //
+   // if max delta is less than a degree set it to 1 degree.
+   //
+   if(maxDeltaLat < 1.0)    maxDeltaLat = 1.0;
+   // if max delta is less than 1 degree then set it to 1.0 degree
+   if(maxDeltaLon < 1.0)    maxDeltaLon = 1.0;
+
+   if(fabs(maxDeltaHeight) < FLT_EPSILON) elevationEnabled = false;
+   // if max delta is less than a meter then set it to a meter.
+   if(maxDeltaHeight < 1.0) maxDeltaHeight = 1.0;
+
+   // set the height scale to something pretty large
+   if(!elevationEnabled)
+   {
+      maxDeltaHeight = 1.0/DBL_EPSILON;
+      centerGround.height(0.0);
+   }
+   // normalize the ground points
+   for(c = 0; c < groundControlPoints.size(); ++c)
+   {
+      x[c] /= maxDeltaLon;
+      y[c] /= maxDeltaLat;
+      z[c] /= maxDeltaHeight;
+   }
+
+   theLatScale    = maxDeltaLat;
+   theLonScale    = maxDeltaLon;
+   theHeightScale = maxDeltaHeight;
+
+   theImageOffset = centerImagePoint;
+   theImageScale  = ossimDpt(w/2.0,
+                             h/2.0);
+   theGroundOffset = centerGround;
+
+   if(ossim::isnan(theGroundOffset.height()))
+   {
+      theGroundOffset.height(0.0);
+   }
+
+   // now lets solve the coefficients
+   //
+   std::vector<double> coeffx;
+   std::vector<double> coeffy;
+
+   NEWMAT::ColumnVector coeffxVec;
+   NEWMAT::ColumnVector coeffyVec;
+   // perform a least squares fit for sample values found in f
+   // given the world values with variables x, y, z
+   //
+   solveCoefficients(coeffxVec,
+                     f[0],
+                     x,
+                     y,
+                     z);
+
+   
+   // perform a least squares fit for line values found in f
+   // given the world values with variables x, y, z
+   //
+   solveCoefficients(coeffyVec,
+                     f[1],
+                     x,
+                     y,
+                     z);
+
+   coeffx.resize(coeffxVec.Nrows());
+   coeffy.resize(coeffyVec.Nrows());
+   
+   for(c = 0; c < coeffx.size();++c)
+   {
+      coeffx[c] = coeffxVec[c];
+      coeffy[c] = coeffyVec[c];
+   }
+   // there are 20 numerator coefficients
+   // and 19 denominator coefficients
+   // I believe that the very first one for the
+   // denominator coefficients is fixed at 1.0
+   //
+   std::copy(coeffx.begin(),
+             coeffx.begin()+20,
+             theXNumCoeffs.begin());
+   std::copy(coeffx.begin()+20,
+             coeffx.begin()+39,
+             theXDenCoeffs.begin()+1);
+   std::copy(coeffy.begin(),
+             coeffy.begin()+20,
+             theYNumCoeffs.begin());
+   std::copy(coeffy.begin()+20,
+             coeffy.begin()+39,
+             theYDenCoeffs.begin()+1);
+   theXDenCoeffs[0] = 1.0;
+   theYDenCoeffs[0] = 1.0;
+
+
+   // now lets compute the RMSE for the given control points by feeding it
+   // back through the modeled RPC
+   //
+   ossim_float64  sumSquareError = 0.0;
+   ossim_uint32 idx = 0;
+
+//    std::cout << "ground offset height = " << theGroundOffset.height()
+//              << "Height scale         = " << theHeightScale << std::endl;
+   for (idx = 0; idx<imagePoints.size(); idx++)
+   {
+      ossim_float64 x = (groundControlPoints[idx].lond() - theGroundOffset.lond())/theLonScale;
+      ossim_float64 y = (groundControlPoints[idx].latd() - theGroundOffset.latd())/theLatScale;
+      ossim_float64 z = (groundControlPoints[idx].height() - theGroundOffset.height())/theHeightScale;
+      
+      if(ossim::isnan(z))
+      {
+         z = 0.0;
+      }
+      else
+      {
+         z = (z - theGroundOffset.height()/theHeightScale);
+      }
+       ossim_float64 imageX = ((eval(theXNumCoeffs, x, y, z)/
+                                eval(theXDenCoeffs, x, y, z))*theImageScale.x) + theImageOffset.x;
+      
+       ossim_float64 imageY = ((eval(theYNumCoeffs, x, y, z)/
+                                eval(theYDenCoeffs, x, y, z))*theImageScale.y) + theImageOffset.y;
+      
+      ossimDpt evalPt(imageX, imageY);
+      ossim_float64 len = (evalPt - imagePoints[idx]).length();
+      
+      sumSquareError += (len*len);
+   }
+
+   // set the error
+   //
+   theError = sqrt(sumSquareError/imagePoints.size());
+}
+
+ossimImageGeometry* ossimRpcSolver::createRpcModel()const
+{
+   ossimRpcModel* model = new ossimRpcModel;
+   
+   model->setAttributes(theImageOffset.x,
+                        theImageOffset.y,
+                        theImageScale.x,
+                        theImageScale.y,
+                        theGroundOffset.latd(),
+                        theGroundOffset.lond(),
+                        theGroundOffset.height(),
+                        theLatScale,
+                        theLonScale,
+                        theHeightScale,
+                        theXNumCoeffs,
+                        theXDenCoeffs,
+                        theYNumCoeffs,
+                        theYDenCoeffs);
+   return new ossimImageGeometry(new ossim2dTo2dIdentityTransform, model);
+}
+
+ossimImageGeometry* ossimRpcSolver::createRpcProjection()const
+{
+   ossimRpcProjection* proj = new ossimRpcProjection;
+   
+   proj->setAttributes(theImageOffset.x,
+                       theImageOffset.y,
+                       theImageScale.x,
+                       theImageScale.y,
+                       theGroundOffset.latd(),
+                       theGroundOffset.lond(),
+                       theGroundOffset.height(),
+                       theLatScale,
+                       theLonScale,
+                       theHeightScale,
+                       theXNumCoeffs,
+                       theXDenCoeffs,
+                       theYNumCoeffs,
+                       theYDenCoeffs);
+   return new ossimImageGeometry(new ossim2dTo2dIdentityTransform, proj);
+}
+
+const std::vector<double>& ossimRpcSolver::getImageXNumCoefficients()const
+{
+   return theXNumCoeffs;
+}
+
+const std::vector<double>& ossimRpcSolver::getImageXDenCoefficients()const
+{
+   return theXDenCoeffs;
+}
+
+const std::vector<double>& ossimRpcSolver::getImageYNumCoefficients()const
+{
+   return theYNumCoeffs;
+}
+
+const std::vector<double>& ossimRpcSolver::getImageYDenCoefficients()const
+{
+   return theYDenCoeffs;
+}
+
+double ossimRpcSolver::getImageXOffset()const
+{
+   return theImageOffset.x;
+}
+
+double ossimRpcSolver::getImageYOffset()const
+{
+   return theImageOffset.y;
+}
+
+double ossimRpcSolver::getLatOffset()const
+{
+   return theGroundOffset.latd();
+}
+
+double ossimRpcSolver::getLonOffset()const
+{
+   return theGroundOffset.lond();
+}
+
+double ossimRpcSolver::getHeightOffset()const
+{
+   return theGroundOffset.height();
+}
+
+double ossimRpcSolver::getImageXScale()const
+{
+   return theImageScale.x;
+}
+
+double ossimRpcSolver::getImageYScale()const
+{
+   return theImageScale.y;
+}
+
+double ossimRpcSolver::getLatScale()const
+{
+   return theLatScale;
+}
+
+double ossimRpcSolver::getLonScale()const
+{
+   return theLonScale;
+}
+
+double ossimRpcSolver::getHeightScale()const
+{
+   return theHeightScale;
+}
+
+double ossimRpcSolver::getRmsError()const
+{
+   return theError;
+}
+
+void ossimRpcSolver::solveInitialCoefficients(NEWMAT::ColumnVector& coeff,
+                                              const std::vector<double>& f,
+                                              const std::vector<double>& x,
+                                              const std::vector<double>& y,
+                                              const std::vector<double>& z)const
+{
+   ossim_uint32 idx = 0;
+   NEWMAT::Matrix m;
+   NEWMAT::ColumnVector r((int)f.size());
+   for(idx = 0; idx < f.size(); ++idx)
+   {
+      r[idx] = f[idx];
+   }
+   setupSystemOfEquations(m,
+                          r,
+                          x,
+                          y,
+                          z);
+   
+   coeff = invert(m.t()*m)*m.t()*r;
+}
+
+void ossimRpcSolver::solveCoefficients(NEWMAT::ColumnVector& coeff,
+                                       const std::vector<double>& f,
+                                       const std::vector<double>& x,
+                                       const std::vector<double>& y,
+                                       const std::vector<double>& z)const
+{
+   // this is an iterative  linear least square fit.  We really pobably need
+   // a nonlinear fit instead
+   //
+   ossim_uint32 idx = 0;
+   NEWMAT::Matrix m;
+
+   NEWMAT::ColumnVector r((int)f.size());
+
+   for(idx = 0; idx < f.size(); ++idx)
+   {
+      r[idx] = f[idx];
+   }
+
+   NEWMAT::ColumnVector tempCoeff;
+   NEWMAT::DiagonalMatrix weights((int)f.size());
+   NEWMAT::ColumnVector denominator(20);
+
+   // initialize the weight matrix to the identity
+   //
+   for(idx = 0; idx < f.size(); ++idx)
+   {
+      weights[idx] = 1.0;
+   }
+
+   double residualValue = 1.0/FLT_EPSILON;
+   ossim_uint32 iterations = 0;
+   NEWMAT::Matrix w2;
+   do
+   {
+      w2 = weights*weights;
+
+      // sets up the matrix to hold the system of
+      // equations
+      setupSystemOfEquations(m,
+                             r,
+                             x,
+                             y,
+                             z);
+
+      // solve the least squares solution.  Note: the invert is used
+      // to do a Singular Value Decomposition for the inverse since the
+      // matrix is more than likely singular.  Slower but more robust
+      //
+      tempCoeff = invert(m.t()*w2*m)*m.t()*w2*r;
+
+      // set up the weight matrix by using the denominator
+      //
+      for(idx = 0; idx < 19; ++idx)
+      {
+         denominator[idx+1] = tempCoeff[20+idx];
+      }
+      denominator[0] = 1.0;
+      
+      setupWeightMatrix(weights,
+                        denominator,
+                        r,
+                        x,
+                        y,
+                        z);
+
+      // compute the residual
+      //
+      NEWMAT::ColumnVector residual = m.t()*w2*(m*tempCoeff-r);
+
+      // now get the innerproduct
+      //
+      NEWMAT::Matrix tempRes = (residual.t()*residual);
+      residualValue = tempRes[0][0];
+
+      ++iterations;
+      
+   }while((residualValue >FLT_EPSILON)&&
+          (iterations < 10));
+   coeff = tempCoeff;
+
+}
+
+NEWMAT::Matrix ossimRpcSolver::invert(const NEWMAT::Matrix& m)const
+{
+   ossim_uint32 idx = 0;
+   NEWMAT::DiagonalMatrix d;
+   NEWMAT::Matrix u;
+   NEWMAT::Matrix v;
+
+   // decompose m.t*m which is stored in Temp into the singular values and vectors.
+   //
+   NEWMAT::SVD(m, d, u, v, true, true);
+   
+   // invert the diagonal
+   // this is just doing the reciprical fo all diagonal components and store back int
+   // d.  ths compute d inverse.
+   //
+   for(idx=0; idx < (ossim_uint32)d.Ncols(); ++idx)
+   {
+      if(d[idx] > FLT_EPSILON)
+      {
+         d[idx] = 1.0/d[idx];
+      }
+      else
+      {
+         d[idx] = 0.0;
+      }
+   }
+
+   //compute inverse of decomposed m;
+   return v*d*u.t();
+}
+
+
+void ossimRpcSolver::setupSystemOfEquations(NEWMAT::Matrix& equations,
+                                            const NEWMAT::ColumnVector& f,
+                                            const std::vector<double>& x,
+                                            const std::vector<double>& y,
+                                            const std::vector<double>& z)const
+{
+   ossim_uint32 idx;
+   equations.ReSize(f.Nrows(),
+                    39);
+   
+   for(idx = 0; idx < (ossim_uint32)f.Nrows();++idx)
+   {
+      equations[idx][0]  = 1;
+      equations[idx][1]  = x[idx];
+      equations[idx][2]  = y[idx];
+      equations[idx][3]  = z[idx];
+      equations[idx][4]  = x[idx]*y[idx];
+      equations[idx][5]  = x[idx]*z[idx];
+      equations[idx][6]  = y[idx]*z[idx];
+      equations[idx][7]  = x[idx]*x[idx];
+      equations[idx][8]  = y[idx]*y[idx];
+      equations[idx][9]  = z[idx]*z[idx];
+      equations[idx][10] = x[idx]*y[idx]*z[idx];
+      equations[idx][11] = x[idx]*x[idx]*x[idx];
+      equations[idx][12] = x[idx]*y[idx]*y[idx];
+      equations[idx][13] = x[idx]*z[idx]*z[idx];
+      equations[idx][14] = x[idx]*x[idx]*y[idx];
+      equations[idx][15] = y[idx]*y[idx]*y[idx];
+      equations[idx][16] = y[idx]*z[idx]*z[idx];
+      equations[idx][17] = x[idx]*x[idx]*z[idx];
+      equations[idx][18] = y[idx]*y[idx]*z[idx];
+      equations[idx][19] = z[idx]*z[idx]*z[idx];
+      equations[idx][20] = -f[idx]*x[idx];
+      equations[idx][21] = -f[idx]*y[idx];
+      equations[idx][22] = -f[idx]*z[idx];
+      equations[idx][23] = -f[idx]*x[idx]*y[idx];
+      equations[idx][24] = -f[idx]*x[idx]*z[idx];
+      equations[idx][25] = -f[idx]*y[idx]*z[idx];
+      equations[idx][26] = -f[idx]*x[idx]*x[idx];
+      equations[idx][27] = -f[idx]*y[idx]*y[idx];
+      equations[idx][28] = -f[idx]*z[idx]*z[idx];
+      equations[idx][29] = -f[idx]*x[idx]*y[idx]*z[idx];
+      equations[idx][30] = -f[idx]*x[idx]*x[idx]*x[idx];
+      equations[idx][31] = -f[idx]*x[idx]*y[idx]*y[idx];
+      equations[idx][32] = -f[idx]*x[idx]*z[idx]*z[idx];
+      equations[idx][33] = -f[idx]*x[idx]*x[idx]*y[idx];
+      equations[idx][34] = -f[idx]*y[idx]*y[idx]*y[idx];
+      equations[idx][35] = -f[idx]*y[idx]*z[idx]*z[idx];
+      equations[idx][36] = -f[idx]*x[idx]*x[idx]*z[idx];
+      equations[idx][37] = -f[idx]*y[idx]*y[idx]*z[idx];
+      equations[idx][38] = -f[idx]*z[idx]*z[idx]*z[idx];
+   }
+}
+
+void ossimRpcSolver::setupWeightMatrix(NEWMAT::DiagonalMatrix& result, // holds the resulting weights
+                                       const NEWMAT::ColumnVector& coefficients,
+                                       const NEWMAT::ColumnVector& f,
+                                       const std::vector<double>& x,
+                                       const std::vector<double>& y,
+                                       const std::vector<double>& z)const
+{
+   result.ReSize(f.Nrows());
+   ossim_uint32 idx = 0;
+   ossim_uint32 idx2 = 0;
+   NEWMAT::RowVector row(coefficients.Nrows());
+   
+    for(idx = 0; idx < (ossim_uint32)f.Nrows(); ++idx)
+    {
+       row[0]  = 1;
+       row[1]  = x[idx];
+       row[2]  = y[idx];
+       row[3]  = z[idx];
+       row[4]  = x[idx]*y[idx];
+       row[5]  = x[idx]*z[idx];
+       row[6]  = y[idx]*z[idx];
+       row[7]  = x[idx]*x[idx];
+       row[8]  = y[idx]*y[idx];
+       row[9]  = z[idx]*z[idx];
+       row[10] = x[idx]*y[idx]*z[idx];
+       row[11] = x[idx]*x[idx]*x[idx];
+       row[12] = x[idx]*y[idx]*y[idx];
+       row[13] = x[idx]*z[idx]*z[idx];
+       row[14] = x[idx]*x[idx]*y[idx];
+       row[15] = y[idx]*y[idx]*y[idx];
+       row[16] = y[idx]*z[idx]*z[idx];
+       row[17] = x[idx]*x[idx]*z[idx];
+       row[18] = y[idx]*y[idx]*z[idx];
+       row[19] = z[idx]*z[idx]*z[idx];
+
+      result[idx] = 0.0;
+      for(idx2 = 0; idx2 < (ossim_uint32)row.Ncols(); ++idx2)
+      {
+         result[idx] += row[idx2]*coefficients[idx2];
+      }
+
+      if(result[idx] > FLT_EPSILON)
+      {
+         result[idx] = 1.0/result[idx];
+      }
+    }
+}
+
+double ossimRpcSolver::eval(const std::vector<double>& coeff,
+                            double x,
+                            double y,
+                            double z)const
+{
+   return coeff[ 0]       + coeff[ 1]*x     + coeff[ 2]*y     + coeff[ 3]*z     +
+          coeff[ 4]*x*y   + coeff[ 5]*x*z   + coeff[ 6]*y*z   + coeff[ 7]*x*x   +
+          coeff[ 8]*y*y   + coeff[ 9]*z*z   + coeff[10]*x*y*z + coeff[11]*x*x*x +
+          coeff[12]*x*y*y + coeff[13]*x*z*z + coeff[14]*x*x*y + coeff[15]*y*y*y +
+          coeff[16]*y*z*z + coeff[17]*x*x*z + coeff[18]*y*y*z + coeff[19]*z*z*z;
+}
+
+
+ossimRefPtr<ossimNitfRegisteredTag> ossimRpcSolver::getNitfRpcBTag() const
+{
+   ossimNitfRpcBTag* rpcbTag = new ossimNitfRpcBTag();
+
+   // success always true
+   rpcbTag->setSuccess(true);
+
+   // temp "0"...
+   rpcbTag->setErrorBias(0.0);
+
+   // temp "0"...
+   rpcbTag->setErrorRand(0.0);
+
+   // line offset
+   rpcbTag->setLineOffset(static_cast<ossim_uint32>(getImageYOffset()));
+
+   // sample offset
+   rpcbTag->setSampleOffset(static_cast<ossim_uint32>(getImageXOffset()));
+
+   // latitude offset
+   rpcbTag->setGeodeticLatOffset(getLatOffset());
+
+   // longitude offset
+   rpcbTag->setGeodeticLonOffset(getLonOffset());
+
+   // height offset
+   rpcbTag->setGeodeticHeightOffset(
+      static_cast<ossim_int32>(getHeightOffset()));
+
+   // line scale
+   rpcbTag->setLineScale(static_cast<ossim_uint32>(getImageYScale()));
+
+   // sample scale
+   rpcbTag->setSampleScale(static_cast<ossim_uint32>(getImageXScale()));
+
+   // latitude scale
+   rpcbTag->setGeodeticLatScale(getLatScale());
+
+   // longitude scale
+   rpcbTag->setGeodeticLonScale(getLonScale());
+
+   // height scale
+   rpcbTag->setGeodeticHeightScale(static_cast<ossim_int32>(getHeightScale()));
+
+   // line numerator coefficients
+   rpcbTag->setLineNumeratorCoeff(getImageYNumCoefficients());
+   
+   // line denominator coefficients
+   rpcbTag->setLineDenominatorCoeff(getImageYDenCoefficients());
+
+   // sample numerator coefficients
+   rpcbTag->setSampleNumeratorCoeff(getImageXNumCoefficients());
+
+   // sample denominator coefficients
+   rpcbTag->setSampleDenominatorCoeff(getImageXDenCoefficients());
+
+   // Return it as an ossimRefPtr<ossimNitfRegisteredTag>...
+   ossimRefPtr<ossimNitfRegisteredTag> tag = rpcbTag;
+   
+   return tag;
+}
+
diff --git a/ossim/src/ossim/projection/ossimRsmModel.cpp b/ossim/src/ossim/projection/ossimRsmModel.cpp
new file mode 100644
index 0000000..ff419fa
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimRsmModel.cpp
@@ -0,0 +1,997 @@
+//---
+// File: ossimRsmModel.cpp
+//
+//  RP 
+//  LIMITATIONS - This is supporting only the RSM features that have been
+//  observed in current data samples and does not attempt to support the entire
+//  RSM specification.
+//  Examples of currently unsupported items include ->
+//  1.  multiple RSMPC tags for different polynomials for separate image sections 
+//  2.  Error Covariance (this may gain priority as we have access to RSMECA data)
+//  3.  Illumination model
+//  4.  Rectangular coodinate system conversion (RSDIDA GRNDD = "R")
+// 
+//---
+
+#include <ossim/projection/ossimRsmModel.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimEllipsoid.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/elevation/ossimElevManager.h>
+#include <ossim/elevation/ossimHgtRef.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+
+#include <algorithm>
+#include <iomanip>
+#include <iostream>
+#include <sstream>
+
+// Define Trace flags for use within this file:
+static ossimTrace traceExec  ("ossimRsmModel:exec");
+static ossimTrace traceDebug ("ossimRsmModel:debug");
+
+RTTI_DEF1(ossimRsmModel, "ossimRsmModel", ossimSensorModel);
+
+static const char* MODEL_TYPE = "ossimRsmModel";
+static const char* RNRMO_KW   = "rnrmo";
+static const char* CNRMO_KW   = "cnrmo";
+static const char* XNRMO_KW   = "xnrmo";
+static const char* YNRMO_KW   = "ynrmo";
+static const char* ZNRMO_KW   = "znrmo";
+static const char* RNRMSF_KW  = "rnrmsf";
+static const char* CNRMSF_KW  = "cnrmsf";
+static const char* XNRMSF_KW  = "xnrmsf";
+static const char* YNRMSF_KW  = "ynrmsf";
+static const char* ZNRMSF_KW  = "znrmsf";
+static const char* RNPWRX_KW  = "rnpwrx";
+static const char* RNPWRY_KW  = "rnpwry";
+static const char* RNPWRZ_KW  = "rnpwrz";
+static const char* RNTRMS_KW  = "rntrms";
+static const char* RNPCF_KW   = "rnpcf";
+static const char* RDPWRX_KW  = "rdpwrx";
+static const char* RDPWRY_KW  = "rdpwry";
+static const char* RDPWRZ_KW  = "rdpwrz";
+static const char* RDTRMS_KW  = "rdtrms";
+static const char* RDPCF_KW   = "rdpcf";
+static const char* CNPWRX_KW  = "cnpwrx";
+static const char* CNPWRY_KW  = "cnpwry";
+static const char* CNPWRZ_KW  = "cnpwrz";
+static const char* CNTRMS_KW  = "cntrms";
+static const char* CNPCF_KW   = "cnpcf";
+static const char* CDPWRX_KW  = "cdpwrx";
+static const char* CDPWRY_KW  = "cdpwry";
+static const char* CDPWRZ_KW  = "cdpwrz";
+static const char* CDTRMS_KW  = "cdtrms";
+static const char* CDPCF_KW   = "cdpcf";
+      
+ossimRsmModel::ossimRsmModel()
+   :
+   ossimSensorModel(),
+
+   m_iid(),
+   m_edition(),
+
+   m_rsn(0),
+   m_csn(0),
+
+   m_rfep(0.0),
+   m_cfep(0.0),
+   m_rnrmo(0.0),
+   m_cnrmo(0.0),
+   m_xnrmo(0.0),
+   m_ynrmo(0.0),
+   m_znrmo(0.0),
+   m_rnrmsf(0.0),
+   m_cnrmsf(0.0),
+   m_xnrmsf(0.0),
+   m_ynrmsf(0.0),
+   m_znrmsf(0.0),
+   
+   m_rnpwrx(0),
+   m_rnpwry(0),
+   m_rnpwrz(0),
+   m_rntrms(0),
+
+   m_rnpcf(),
+   
+   m_rdpwrx(0),
+   m_rdpwry(0),
+   m_rdpwrz(0),
+   m_rdtrms(0),
+
+   m_rdpcf(),
+   
+   m_cnpwrx(0),
+   m_cnpwry(0),
+   m_cnpwrz(0),
+   m_cntrms(0),
+
+   m_cnpcf(),
+   
+   m_cdpwrx(0),
+   m_cdpwry(0),
+   m_cdpwrz(0),
+   m_cdtrms(0),
+
+   m_cdpcf()
+{
+   initAdjustableParameters();
+   
+} // End: ossimRsmModel::ossimRsmModel()
+
+ossimRsmModel::ossimRsmModel( const ossimRsmModel& obj )
+   :
+   ossimSensorModel( obj ),
+
+   m_iid( obj.m_iid ),
+   m_edition( obj.m_edition ),
+
+   m_rsn( obj.m_rsn ),
+   m_csn( obj.m_csn ),
+
+   m_rfep( obj.m_rfep ),
+   m_cfep( obj.m_cfep ),
+   m_rnrmo( obj.m_rnrmo ),
+   m_cnrmo( obj.m_cnrmo ),
+   m_xnrmo( obj.m_xnrmo ),
+   m_ynrmo( obj.m_ynrmo ),
+   m_znrmo( obj.m_znrmo ),
+   m_rnrmsf( obj.m_rnrmsf ),
+   m_cnrmsf( obj.m_cnrmsf ),
+   m_xnrmsf( obj.m_xnrmsf ),
+   m_ynrmsf( obj.m_ynrmsf ),
+   m_znrmsf( obj.m_znrmsf ),
+   
+   m_rnpwrx( obj.m_rnpwrx ),
+   m_rnpwry( obj.m_rnpwry ),
+   m_rnpwrz( obj.m_rnpwrz ),
+   m_rntrms( obj.m_rntrms ),
+
+   m_rnpcf( obj.m_rnpcf ),
+   
+   m_rdpwrx( obj.m_rdpwrx ),
+   m_rdpwry( obj.m_rdpwry ),
+   m_rdpwrz( obj.m_rdpwrz ),
+   m_rdtrms( obj.m_rdtrms ),
+
+   m_rdpcf( obj.m_rdpcf ),
+   
+   m_cnpwrx( obj.m_cnpwrx ),
+   m_cnpwry( obj.m_cnpwry ),
+   m_cnpwrz( obj.m_cnpwrz ),
+   m_cntrms( obj.m_cntrms ),
+
+   m_cnpcf( obj.m_cnpcf ),
+   
+   m_cdpwrx( obj.m_cdpwrx ),
+   m_cdpwry( obj.m_cdpwry ),
+   m_cdpwrz( obj.m_cdpwrz ),
+   m_cdtrms( obj.m_cdtrms ),
+
+   m_cdpcf( obj.m_cdpcf )
+{
+   
+} // End: ossimRsmModel::ossimRsmModel( const ossimRsmModel& obj )
+
+const ossimRsmModel& ossimRsmModel::operator=( const ossimRsmModel& rhs )
+{
+   if (this != &rhs)
+   {
+      ossimSensorModel::operator=(rhs);
+
+      m_iid = rhs.m_iid;
+      m_edition = rhs.m_edition;
+      
+      m_rsn = rhs.m_rsn;
+      m_csn = rhs.m_csn;
+      
+      m_rfep = rhs.m_rfep;
+      m_cfep = rhs.m_cfep;
+      m_rnrmo = rhs.m_rnrmo;
+      m_cnrmo = rhs.m_cnrmo;
+      m_xnrmo = rhs.m_xnrmo;
+      m_ynrmo = rhs.m_ynrmo;
+      m_znrmo = rhs.m_znrmo;
+      m_rnrmsf = rhs.m_rnrmsf;
+      m_cnrmsf = rhs.m_cnrmsf;
+      m_xnrmsf = rhs.m_xnrmsf;
+      m_ynrmsf = rhs.m_ynrmsf;
+      m_znrmsf = rhs.m_znrmsf;
+      
+      m_rnpwrx = rhs.m_rnpwrx;
+      m_rnpwry = rhs.m_rnpwry;
+      m_rnpwrz = rhs.m_rnpwrz;
+      m_rntrms = rhs.m_rntrms;
+      
+      m_rnpcf = rhs.m_rnpcf;
+      
+      m_rdpwrx = rhs.m_rdpwrx;
+      m_rdpwry = rhs.m_rdpwry;
+      m_rdpwrz = rhs.m_rdpwrz;
+      m_rdtrms = rhs.m_rdtrms;
+      
+      m_rdpcf = rhs.m_rdpcf;
+      
+      m_cnpwrx = rhs.m_cnpwrx;
+      m_cnpwry = rhs.m_cnpwry;
+      m_cnpwrz = rhs.m_cnpwrz;
+      m_cntrms = rhs.m_cntrms;
+      
+      m_cnpcf = rhs.m_cnpcf;
+      
+      m_cdpwrx = rhs.m_cdpwrx;
+      m_cdpwry = rhs.m_cdpwry;
+      m_cdpwrz = rhs.m_cdpwrz;
+      m_cdtrms = rhs.m_cdtrms;
+      
+      m_cdpcf = rhs.m_cdpcf;
+   }
+   
+   return *this;
+   
+} // End: ossimRsmModel::operator=( const ossimRsmModel& rhs )
+
+ossimRsmModel::~ossimRsmModel()
+{
+}
+
+//---
+//  METHOD: ossimRsmModel::worldToLineSample()
+//  
+//  Overrides base class implementation. Directly computes line-sample from
+//  the polynomials.
+//---
+void ossimRsmModel::worldToLineSample(const ossimGpt& ground_point,
+                                      ossimDpt&       img_pt) const
+{
+   if(ground_point.isLatNan() || ground_point.isLonNan() )
+   {
+      img_pt.makeNan();
+      return;
+   }
+
+   //---
+   // Normalize the lat, lon, hgt:
+   // a_norm = (a-offset)/scalefactor
+   //
+   // Note:
+   //
+   // Was getting bogus line sample values in Western hemisphere; hence, the
+   // test on longitude. (drb - 22 May 2015)
+   //---
+   double lon = (ground_point.lon >= 0.0) ? ground_point.lon : ground_point.lon + 360.0;
+   double y = (ossim::degreesToRadians(ground_point.lat) - m_ynrmo) / m_ynrmsf;
+   // double x = (ossim::degreesToRadians(ground_point.lon) - m_xnrmo) / m_xnrmsf;
+   double x = ( ossim::degreesToRadians(lon) - m_xnrmo) / m_xnrmsf;   
+   double z;
+
+   if( ground_point.isHgtNan() )
+   {
+     z = ( - m_znrmo) / m_znrmsf;
+   }
+   else
+   {
+     z = (ground_point.hgt - m_znrmo) / m_znrmsf;
+   }
+
+   double rnNrm =  polynomial(x, y, z, m_rnpwrx, m_rnpwry, m_rnpwrz, m_rnpcf); 
+   double rdNrm =  polynomial(x, y, z, m_rdpwrx, m_rdpwry, m_rdpwrz, m_rdpcf);
+   double cnNrm =  polynomial(x, y, z, m_cnpwrx, m_cnpwry, m_cnpwrz, m_cnpcf);
+   double cdNrm =  polynomial(x, y, z, m_cdpwrx, m_cdpwry, m_cdpwrz, m_cdpcf);
+   
+   double rNrm  = rnNrm / rdNrm;
+   double cNrm  = cnNrm / cdNrm;
+
+   //---
+   //  Unnormalize the computed value
+   //  a = (a_norm * scalefactor) + offset
+   //
+   //  Note:
+   //
+   //  RSM (0,0) is upper left corner of pixel(0,0). OSSIM (0,0) is
+   //  center of the pixel; hence, the - 0.5. (drb 22 May 2015)
+   //---
+   
+   // img_pt.line = (rNrm * m_rnrmsf) + m_rnrmo; 
+   // img_pt.samp = (cNrm * m_cnrmsf) + m_cnrmo; 
+   img_pt.line = (rNrm * m_rnrmsf) + m_rnrmo - 0.5; 
+   img_pt.samp = (cNrm * m_cnrmsf) + m_cnrmo - 0.5; 
+
+} // End: ossimRsmModel::worldToLineSample( ... )
+
+//---
+//  METHOD: ossimRsmModel::lineSampleToWorld()
+//  
+//  Overrides base class implementation. Performs DEM intersection.
+//---
+void  ossimRsmModel::lineSampleToWorld(const ossimDpt& imagePoint,
+                                       ossimGpt&       worldPoint) const
+{
+   if(!imagePoint.hasNans())
+   {
+      ossimEcefRay ray;
+      
+      //---
+      // Note:
+      // RSM (0,0) is upper left corner of pixel(0,0). OSSIM (0,0) is
+      //  center of the pixel; hence, the + 0.5. (drb 22 May 2015)
+      //---
+      // imagingRay(imagePoint, ray);
+      imagingRay(ossimDpt(imagePoint.x+0.5, imagePoint.y+0.5), ray);
+      ossimElevManager::instance()->intersectRay(ray, worldPoint);
+   }
+   else
+   {
+      worldPoint.makeNan();
+   }
+}
+
+//---
+//  METHOD: ossimRsmModel::lineSampleHeightToWorld()
+//  
+//  Performs reverse projection of image line/sample to ground point.
+//  The imaging ray is intersected with a level plane at height = elev.
+//
+//  NOTE: U = line, V = sample -- this differs from the convention.
+//
+//---
+void ossimRsmModel::lineSampleHeightToWorld(const ossimDpt& image_point,
+                                            const double&   ellHeight,
+                                            ossimGpt&       gpt) const
+{
+   // Borrowed from ossimRpcModel algorithm to converge on polynomial roots
+
+   //---
+   // Constants for convergence tests:
+   //---
+   // SPEC says 1/20 of a pixel for polynomial fit, so converge to at least that point
+   static const int    MAX_NUM_ITERATIONS  = 100;
+   static const double CONVERGENCE_EPSILON = 0.05;  // pixels
+
+   // double U    = (image_point.y-m_rnrmo) / (m_rnrmsf);
+   // double V    = (image_point.x-m_cnrmo) / (m_cnrmsf);
+
+
+   double U = (image_point.y+0.5-m_rnrmo) / (m_rnrmsf);
+   double V = (image_point.x+0.5-m_cnrmo) / (m_cnrmsf);
+
+   //---
+   // Initialize quantities to be used in the iteration for ground point:
+   //---
+   double nlat = 0.0;  // normalized latitude
+   double nlon = 0.0;  // normalized longitude
+   double nhgt;
+
+   if(ossim::isnan(ellHeight))
+   {
+     nhgt = (- m_znrmo) / m_znrmsf;  // norm height
+   }
+   else
+   {
+      nhgt = (ellHeight - m_znrmo) / m_znrmsf;  // norm height
+   }
+
+   double epsilonU = CONVERGENCE_EPSILON/m_rnrmsf;
+   double epsilonV = CONVERGENCE_EPSILON/m_cnrmsf;
+   int    iteration = 0;
+   //---
+   // Declare variables only once outside the loop. These include:
+   // * polynomials (numerators Pu, Pv, and denominators Qu, Qv),
+   // * partial derivatives of polynomials wrt X, Y,
+   // * computed normalized image point: Uc, Vc,
+   // * residuals of normalized image point: deltaU, deltaV,
+   // * partial derivatives of Uc and Vc wrt X, Y,
+   // * corrections to normalized lat, lon: deltaLat, deltaLon.
+   //---
+   double Pu, Qu, Pv, Qv;
+   double dPu_dLat, dQu_dLat, dPv_dLat, dQv_dLat;
+   double dPu_dLon, dQu_dLon, dPv_dLon, dQv_dLon;
+   double Uc, Vc;
+   double deltaU, deltaV;
+   double dU_dLat, dU_dLon, dV_dLat, dV_dLon, W;
+   double deltaLat, deltaLon;
+
+   //---
+   // Now iterate until the computed Uc, Vc is within epsilon of the desired
+   // image point U, V:
+   //---
+   do
+   {
+      //---
+      // Calculate the normalized line and sample Uc, Vc as ratio of
+      // polynomials Pu, Qu and Pv, Qv:
+      //---
+      Pu = polynomial(nlon, nlat, nhgt, m_rnpwrx, m_rnpwry, m_rnpwrz, m_rnpcf);
+      Qu = polynomial(nlon, nlat, nhgt, m_rdpwrx, m_rdpwry, m_rdpwrz, m_rdpcf);
+      Pv = polynomial(nlon, nlat, nhgt, m_cnpwrx, m_cnpwry, m_cnpwrz, m_cnpcf);
+      Qv = polynomial(nlon, nlat, nhgt, m_cdpwrx, m_cdpwry, m_cdpwrz, m_cdpcf);
+      Uc = Pu/Qu;
+      Vc = Pv/Qv;
+
+      //---
+      // Compute residuals between desired and computed line, sample:
+      //---
+      deltaU = U - Uc;
+      deltaV = V - Vc;
+
+      //---
+      // Check for convergence and skip re-linearization if converged:
+      //---
+      if ((fabs(deltaU) > epsilonU) || (fabs(deltaV) > epsilonV))
+      {
+         //---
+         // Analytically compute the partials of each polynomial wrt lat, lon:
+         //---
+         dPu_dLat = dPoly_dLat(nlon, nlat, nhgt, m_rnpwrx, m_rnpwry, m_rnpwrz, m_rnpcf);
+         dQu_dLat = dPoly_dLat(nlon, nlat, nhgt, m_rdpwrx, m_rdpwry, m_rdpwrz, m_rdpcf);
+         dPv_dLat = dPoly_dLat(nlon, nlat, nhgt, m_cnpwrx, m_cnpwry, m_cnpwrz, m_cnpcf);
+         dQv_dLat = dPoly_dLat(nlon, nlat, nhgt, m_cdpwrx, m_cdpwry, m_cdpwrz, m_cdpcf);
+         dPu_dLon = dPoly_dLon(nlon, nlat, nhgt, m_rnpwrx, m_rnpwry, m_rnpwrz, m_rnpcf);
+         dQu_dLon = dPoly_dLon(nlon, nlat, nhgt, m_rdpwrx, m_rdpwry, m_rdpwrz, m_rdpcf);
+         dPv_dLon = dPoly_dLon(nlon, nlat, nhgt, m_cnpwrx, m_cnpwry, m_cnpwrz, m_cnpcf);
+         dQv_dLon = dPoly_dLon(nlon, nlat, nhgt, m_cdpwrx, m_cdpwry, m_cdpwrz, m_cdpcf);
+
+         //---
+         // Analytically compute partials of quotients U and V wrt lat, lon:
+         //---
+         dU_dLat = (Qu*dPu_dLat - Pu*dQu_dLat)/(Qu*Qu);
+         dU_dLon = (Qu*dPu_dLon - Pu*dQu_dLon)/(Qu*Qu);
+         dV_dLat = (Qv*dPv_dLat - Pv*dQv_dLat)/(Qv*Qv);
+         dV_dLon = (Qv*dPv_dLon - Pv*dQv_dLon)/(Qv*Qv);
+
+         W = dU_dLon*dV_dLat - dU_dLat*dV_dLon;
+
+         //---
+         // Now compute the corrections to normalized lat, lon:
+         //---
+         deltaLat = (dU_dLon*deltaV - dV_dLon*deltaU) / W;
+         deltaLon = (dV_dLat*deltaU - dU_dLat*deltaV) / W;
+         nlat += deltaLat;
+         nlon += deltaLon;
+      }
+
+      ++iteration;
+
+   } while (((fabs(deltaU)>epsilonU) || (fabs(deltaV)>epsilonV))
+            && (iteration < MAX_NUM_ITERATIONS));
+   //---
+   // Test for exceeding allowed number of iterations. Flag error if so:
+   //---
+   if (iteration == MAX_NUM_ITERATIONS)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "WARNING ossimRsmModel::lineSampleHeightToWorld:\n"
+         << "Max number of iterations reached in ground point "
+         << "solution. Results are inaccurate." << endl;
+   }
+
+   //---
+   // Now un-normalize the ground point lat, lon and establish return quantity:
+   //
+   // lon will 0 to 2PI when image is near PI radians as specified in RSMIDA
+   // GRNDD field when value is "H" versus "G".   OSSIMGPT wrap handles this
+   // automatically, so no need to worry about it.
+   //---
+   gpt.lat = ossim::radiansToDegrees(nlat*m_ynrmsf + m_ynrmo);
+   gpt.lon = ossim::radiansToDegrees(nlon*m_xnrmsf + m_xnrmo);
+   gpt.hgt = (nhgt * m_znrmsf) + m_znrmo; //ellHeight;
+
+   //---
+   // Note: See above note. Added in wrap call. Longitude was coming out 242
+   // when should have been -118. (drb - 22 May 2015)
+   //---
+   gpt.wrap();
+   
+} // End: ossimRsmModel::lineSampleHeightToWorld( ... )
+
+//---
+//  METHOD: ossimRsmModel::imagingRay()
+//  
+//  Constructs a ray by intersecting 2 ellipsoid heights above and
+//  below the RPC height offset, and then forming a vector between the two.
+//
+//---
+void ossimRsmModel::imagingRay(const ossimDpt& imagePoint,
+                               ossimEcefRay&   imageRay) const
+{
+   //---
+   // For "from point", "to point" we want the image ray to be from above the
+   // ellipsoid down to Earth.
+   // 
+   // It appears the ray "from point" must be above the ellipsiod for the
+   // ossimElevSource::intersectRay method; ultimately, the
+   // ossimEllipsoid::nearestIntersection method, else it goes off in the
+   // weeds...
+   //---
+   double vectorLength = m_znrmsf * 2.0;
+
+   ossimGpt gpt;
+
+   // "from" point
+   double intHgt = m_znrmo + vectorLength;
+   lineSampleHeightToWorld(imagePoint, intHgt, gpt);
+   ossimEcefPoint intECFfrom(gpt);
+
+   // "to" point
+   lineSampleHeightToWorld(imagePoint, m_znrmo, gpt);
+   ossimEcefPoint intECFto(gpt);
+
+   // Construct ray
+   ossimEcefRay ray(intECFfrom, intECFto);
+
+   imageRay = ray;
+}
+
+void ossimRsmModel::updateModel()
+{
+}
+
+void ossimRsmModel::initAdjustableParameters()
+{
+}
+
+ossimObject* ossimRsmModel::dup() const
+{
+   return new ossimRsmModel(*this);
+}
+
+//---
+//  METHOD: ossimRsmModel::print()
+//  
+//  Formatted dump of data members.
+//---
+std::ostream& ossimRsmModel::print(std::ostream& out) const
+{
+   std::string prefix = "";
+   ossimKeywordlist kwl;
+   saveState( kwl, prefix.c_str() );
+   out << kwl;
+   return out;
+}
+
+//---
+//  METHOD: ossimRsmModel::saveState()
+//  
+//  Saves the model state to the KWL. This KWL also serves as a geometry file.
+//  
+//---
+bool ossimRsmModel::saveState(ossimKeywordlist& kwl,
+                              const char* prefix) const
+{
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimRsmModel::saveState(): entering..." << std::endl;
+   }
+
+   kwl.add(prefix, ossimKeywordNames::TYPE_KW, MODEL_TYPE);
+
+   //---
+   // Hand off to base class for common stuff:
+   //---
+   ossimSensorModel::saveState(kwl, prefix);
+
+   //---
+   // Save off offsets and scales:
+   //---
+   kwl.add(prefix, RNRMO_KW, m_rnrmo);
+   kwl.add(prefix, CNRMO_KW, m_cnrmo);
+   kwl.add(prefix, XNRMO_KW, m_xnrmo);
+   kwl.add(prefix, YNRMO_KW, m_ynrmo);
+   kwl.add(prefix, ZNRMO_KW, m_znrmo);
+   kwl.add(prefix, RNRMSF_KW, m_rnrmsf);
+   kwl.add(prefix, CNRMSF_KW, m_cnrmsf);
+   kwl.add(prefix, XNRMSF_KW, m_xnrmsf);
+   kwl.add(prefix, YNRMSF_KW, m_ynrmsf);
+   kwl.add(prefix, ZNRMSF_KW, m_znrmsf);
+
+   kwl.add(prefix, RNPWRX_KW, m_rnpwrx);
+   kwl.add(prefix, RNPWRY_KW, m_rnpwry);
+   kwl.add(prefix, RNPWRZ_KW, m_rnpwrz);
+   kwl.add(prefix, RNTRMS_KW, m_rntrms);
+   for (ossim_uint32 i=0; i<m_rntrms; ++i)
+   {
+      ossimString key;
+      key = RNPCF_KW;
+      key += ossimString::toString(i);
+      kwl.add(prefix, key.c_str(), m_rnpcf[i]);
+   }
+
+   kwl.add(prefix, RDPWRX_KW, m_rdpwrx);
+   kwl.add(prefix, RDPWRY_KW, m_rdpwry);
+   kwl.add(prefix, RDPWRZ_KW, m_rdpwrz);
+   kwl.add(prefix, RDTRMS_KW, m_rdtrms);
+   for (ossim_uint32 i=0; i<m_rdtrms; ++i)
+   {
+	
+      ossimString key;
+      key = RDPCF_KW;
+      key += ossimString::toString(i);
+      kwl.add(prefix, key.c_str(), m_rdpcf[i]);
+   }
+
+   kwl.add(prefix, CNPWRX_KW, m_cnpwrx);
+   kwl.add(prefix, CNPWRY_KW, m_cnpwry);
+   kwl.add(prefix, CNPWRZ_KW, m_cnpwrz);
+   kwl.add(prefix, CNTRMS_KW, m_cntrms);
+   for (ossim_uint32 i=0; i<m_cntrms; ++i)
+   {
+      ossimString key;
+      key = CNPCF_KW;
+      key += ossimString::toString(i);
+      kwl.add(prefix, key.c_str(), m_cnpcf[i]);
+   }
+
+   kwl.add(prefix, CDPWRX_KW, m_cdpwrx);
+   kwl.add(prefix, CDPWRY_KW, m_cdpwry);
+   kwl.add(prefix, CDPWRZ_KW, m_cdpwrz);
+   kwl.add(prefix, CDTRMS_KW, m_cdtrms);
+   for (ossim_uint32 i=0; i<m_cdtrms; ++i)
+   {
+      ossimString key;
+      key = CDPCF_KW;
+      key += ossimString::toString(i);
+      kwl.add(prefix, key.c_str(), m_cdpcf[i]);
+   }
+
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimRsmModel::saveState(): returning..." << std::endl;
+   }
+
+   return true;
+}
+
+//---
+//  METHOD: ossimRsmModel::loadState()
+//  
+//  Restores the model's state from the KWL. This KWL also serves as a
+//  geometry file.
+//  
+//---
+bool ossimRsmModel::loadState(const ossimKeywordlist& kwl,
+                                  const char* prefix) 
+{
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimRsmModel::loadState(): entering..." << std::endl;
+   }
+   
+   const char* value;
+   
+   //---
+   // Pass on to the base-class for parsing first:
+   //---
+   bool success = ossimSensorModel::loadState(kwl, prefix);
+   if (!success)
+   {
+      if (traceExec())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG ossimRsmModel::loadState(): returning with error..."
+            << std::endl;
+      }
+      return false;
+   }
+   
+   //---
+   // Continue parsing for local members:
+   //---
+   value = kwl.find(prefix, RNRMO_KW);
+   if (value)
+   {
+      m_rnrmo = ossimString(value).toFloat64();
+   }
+   value = kwl.find(prefix, CNRMO_KW);
+   if (value)
+   {
+      m_cnrmo = ossimString(value).toFloat64();
+   }
+   value = kwl.find(prefix, XNRMO_KW);
+   if (value)
+   {
+      m_xnrmo = ossimString(value).toFloat64();
+   }
+   value = kwl.find(prefix, YNRMO_KW);
+   if (value)
+   {
+      m_ynrmo = ossimString(value).toFloat64();
+   }
+   value = kwl.find(prefix, ZNRMO_KW);
+   if (value)
+   {
+      m_znrmo = ossimString(value).toFloat64();
+   }
+   value = kwl.find(prefix, RNRMSF_KW);
+   if (value)
+   {
+      m_rnrmsf = ossimString(value).toFloat64();
+   }
+   value = kwl.find(prefix, CNRMSF_KW);
+   if (value)
+   {
+      m_cnrmsf = ossimString(value).toFloat64();
+   }
+   value = kwl.find(prefix, XNRMSF_KW);
+   if (value)
+   {
+      m_xnrmsf = ossimString(value).toFloat64();
+   }
+   value = kwl.find(prefix, YNRMSF_KW);
+   if (value)
+   {
+      m_ynrmsf = ossimString(value).toFloat64();
+   }
+   value = kwl.find(prefix, ZNRMSF_KW);
+   if (value)
+   {
+      m_znrmsf = ossimString(value).toFloat64();
+   }
+
+   value = kwl.find(prefix, RNPWRX_KW);
+   if (value)
+   {
+      m_rnpwrx = ossimString(value).toUInt32();
+   }
+   value = kwl.find(prefix, RNPWRY_KW);
+   if (value)
+   {
+      m_rnpwry = ossimString(value).toUInt32();
+   }
+   value = kwl.find(prefix, RNPWRZ_KW);
+   if (value)
+   {
+      m_rnpwrz = ossimString(value).toUInt32();
+   }
+   
+   value = kwl.find(prefix, RNTRMS_KW);
+   if (value)
+   {
+      m_rntrms = ossimString(value).toUInt32();
+      m_rnpcf.resize(m_rntrms);      
+      for (ossim_uint32 i=0; i<m_rntrms; ++i)
+      {
+         ossimString keyword;
+         keyword = RNPCF_KW;
+         keyword += ossimString::toString(i); 
+         value = kwl.find(prefix, keyword.c_str());
+         if (!value)
+         {
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << "FATAL ossimRsmModel::loadState(): Error "
+               << "encountered parsing the following required keyword: "
+               << "<" << keyword << ">. Check the keywordlist for proper syntax."
+               << std::endl;
+            return false;
+         }
+         m_rnpcf[i] = ossimString(value).toFloat64();
+      }
+   }
+
+   value = kwl.find(prefix, RDPWRX_KW);
+   if (value)
+   {
+      m_rdpwrx = ossimString(value).toUInt32();
+   }
+   value = kwl.find(prefix, RDPWRY_KW);
+   if (value)
+   {
+      m_rdpwry = ossimString(value).toUInt32();
+   }
+   value = kwl.find(prefix, RDPWRZ_KW);
+   if (value)
+   {
+      m_rdpwrz = ossimString(value).toUInt32();
+   }
+
+   value = kwl.find(prefix, RDTRMS_KW);
+   if (value)
+   {
+      m_rdtrms = ossimString(value).toUInt32();
+      m_rdpcf.resize(m_rdtrms);
+      for (ossim_uint32 i=0; i<m_rdtrms; ++i)
+      {
+         ossimString keyword;
+         keyword = RDPCF_KW;
+         keyword += ossimString::toString(i);
+         value = kwl.find(prefix, keyword.c_str());
+         if (!value)
+         {
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << "FATAL ossimRsmModel::loadState(): Error "
+               << "encountered parsing the following required keyword: "
+               << "<" << keyword << ">. Check the keywordlist for proper syntax."
+               << std::endl;
+            return false;
+         }
+         m_rdpcf[i] = ossimString(value).toFloat64();
+      } 
+   }
+
+   value = kwl.find(prefix, CNPWRX_KW);
+   if (value)
+   {
+      m_cnpwrx = ossimString(value).toUInt32();
+   }
+   value = kwl.find(prefix, CNPWRY_KW);
+   if (value)
+   {
+      m_cnpwry = ossimString(value).toUInt32();
+   }
+   value = kwl.find(prefix, CNPWRZ_KW);
+   if (value)
+   {
+      m_cnpwrz = ossimString(value).toUInt32();
+   }
+
+   value = kwl.find(prefix, CNTRMS_KW);
+   if (value)
+   {
+      m_cntrms = ossimString(value).toUInt32();
+      m_cnpcf.resize(m_cntrms);
+      for (ossim_uint32 i=0; i<m_cntrms; ++i)
+      {
+         ossimString keyword;
+         keyword = CNPCF_KW;
+         keyword += ossimString::toString(i);
+         value = kwl.find(prefix, keyword.c_str());
+         if (!value)
+         {
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << "FATAL ossimRsmModel::loadState(): Error "
+               << "encountered parsing the following required keyword: "
+               << "<" << keyword << ">. Check the keywordlist for proper syntax."
+               << std::endl;
+            return false;
+         }
+         m_cnpcf[i] = ossimString(value).toFloat64();
+      } 
+   }
+
+   value = kwl.find(prefix, CDPWRX_KW);
+   if (value)
+   {
+      m_cdpwrx = ossimString(value).toUInt32();
+   }
+   value = kwl.find(prefix, CDPWRY_KW);
+   if (value)
+   {
+      m_cdpwry = ossimString(value).toUInt32();
+   }
+   value = kwl.find(prefix, CDPWRZ_KW);
+   if (value)
+   {
+      m_cdpwrz = ossimString(value).toUInt32();
+   }
+
+   value = kwl.find(prefix, CDTRMS_KW);
+   if (value)
+   {
+      m_cdtrms = ossimString(value).toUInt32();
+      m_cdpcf.resize(m_cdtrms);
+      for (ossim_uint32 i=0; i<m_cdtrms; ++i)
+      {
+         ossimString keyword;
+         keyword = CDPCF_KW;
+         keyword += ossimString::toString(i);
+         value = kwl.find(prefix, keyword.c_str());
+         if (!value)
+         {
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << "FATAL ossimRsmModel::loadState(): Error "
+               << "encountered parsing the following required keyword: "
+               << "<" << keyword << ">. Check the keywordlist for proper syntax."
+               << std::endl;
+            return false;
+         }
+         m_cdpcf[i] = ossimString(value).toFloat64();
+      }
+   }
+
+   updateModel();
+   
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimRsmModel::loadState(): returning..." << std::endl;
+   }
+   return true;
+}
+
+double ossimRsmModel::polynomial(
+   const double& x, const double& y, const double& z, const ossim_uint32& maxx,
+   const ossim_uint32& maxy, const ossim_uint32& maxz, std::vector<ossim_float64> pcf) const
+{
+   double r = 0.0;
+   ossim_uint32 index = 0;
+   for (ossim_uint32 k = 0; k <= maxz; ++k)
+   {
+      for (ossim_uint32 j = 0; j <= maxy; ++j)
+      {
+         for (ossim_uint32 i = 0; i <= maxx; ++i)
+         {
+            r+=pcf[index]*std::pow(x,(double)i)*std::pow(y,(double)j)*std::pow(z,(double)k);
+            ++index;
+         }
+      }
+   }
+   return r;
+}
+
+double ossimRsmModel::dPoly_dLat(
+   const double& x, const double& y, const double& z, const ossim_uint32& maxx,
+   const ossim_uint32& maxy, const ossim_uint32& maxz, std::vector<ossim_float64> pcf) const
+                                 
+{
+   double dr = 0.0;
+   ossim_uint32 index = 0;
+   for (ossim_uint32 k = 0; k <= maxz; ++k)
+   {
+      for (ossim_uint32 j = 0; j <= maxy; ++j)
+      {
+         for (ossim_uint32 i = 0; i <= maxx; ++i)
+         {
+            if (j>0)
+            {
+               dr+=j*pcf[index]*std::pow(x,(double)i)*std::pow(y,(double)(j-1))*std::pow(z,(double)k);
+            }
+            ++index;
+         }
+      }
+   }
+   return dr;
+}
+
+double ossimRsmModel::dPoly_dLon(
+   const double& x, const double& y, const double& z, const ossim_uint32& maxx,
+   const ossim_uint32& maxy, const ossim_uint32& maxz, std::vector<ossim_float64> pcf) const
+{
+   double dr = 0.0;
+   ossim_uint32 index = 0;
+   for (ossim_uint32 k = 0; k <= maxz; ++k)
+   {
+      for (ossim_uint32 j = 0; j <= maxy; ++j)
+      {
+         for (ossim_uint32 i = 0; i <= maxx; ++i)
+         {
+            if (i>0)
+            {
+               dr += i*pcf[index]*std::pow(x,(double)(i-1)) *
+                  std::pow(y,(double)j)*std::pow(z,(double)k);
+            }
+            ++index;
+         } 
+      }     
+   }
+   return dr;
+}
+
+double ossimRsmModel::dPoly_dHgt(
+   const double& x, const double& y, const double& z, const ossim_uint32& maxx,
+   const ossim_uint32& maxy, const ossim_uint32& maxz, std::vector<ossim_float64> pcf) const
+{
+   double dr = 0.0;
+   ossim_uint32 index = 0;
+   for (ossim_uint32 k = 0; k <= maxz; ++k)
+   {
+      for (ossim_uint32 j = 0; j <= maxy; ++j)
+      {
+         for (ossim_uint32 i = 0; i <= maxx; ++i)
+         {
+            if (k>0)
+            {
+               dr += k*pcf[index]*std::pow(x,(double)i) *
+                  std::pow(y,(double)j)*std::pow(z,(double)(k-1));
+            }
+            ++index;
+         } 
+      }     
+   }
+   return dr;
+}
diff --git a/src/ossim/projection/ossimSarModel.cpp b/ossim/src/ossim/projection/ossimSarModel.cpp
similarity index 100%
rename from src/ossim/projection/ossimSarModel.cpp
rename to ossim/src/ossim/projection/ossimSarModel.cpp
diff --git a/ossim/src/ossim/projection/ossimSensorModel.cpp b/ossim/src/ossim/projection/ossimSensorModel.cpp
new file mode 100644
index 0000000..33dd80c
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimSensorModel.cpp
@@ -0,0 +1,1783 @@
+//*****************************************************************************
+// FILE: ossimSensorModel.cc
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// AUTHOR: Oscar Kramer
+//
+// DESCRIPTION:
+//   Contains implementation of class ossimSensorModel. This is the base
+//   class to all sensor model-related projections including replacement
+//   models such as coarse grids and polynomial models. This base class
+//   supports adjustable parameters for registration adjustment.
+//
+//   Important note to sensor model implementors: In order to avoid a separate
+//   set of "initial adjustable parameters," this design assumes ALL initial
+//   values are 0. When designing the derived-class model, insure that the
+//   adjustable parameters are 0-based. This applies to the adjustable param
+//   array declared in this base class only. The derived classes can declare
+//   their own adjstable params that are more descriptive and that can be
+//   assigned an initial value thet is non-zero, but that are linearly related
+//   to the adjustable params of this class. In that case, the updateModel()
+//   method will compute the derived-class's parameters based on
+//   theAdjustableParams array, after an adjustment is made.
+//
+// LIMITATIONS: None.
+//
+//*****************************************************************************
+//  $Id: ossimSensorModel.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <iostream>
+#include <sstream>
+using namespace std;
+
+// #include <stdio.h>
+
+#include <ossim/projection/ossimSensorModel.h>
+
+RTTI_DEF3(ossimSensorModel, "ossimSensorModel", ossimProjection, ossimOptimizableProjection, ossimAdjustableParameterInterface);
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimDatumFactory.h>
+
+#include <ossim/elevation/ossimElevManager.h>
+#include <ossim/base/ossimTieGptSet.h>
+
+#include <ossim/matrix/newmatrc.h>
+
+//***
+// Define Trace flags for use within this file:
+//***
+#include <ossim/base/ossimTrace.h>
+static ossimTrace traceExec  ("ossimSensorModel:exec");
+static ossimTrace traceDebug ("ossimSensorModel:debug");
+
+static const char*       REF_GPT_LAT_KW      = "ref_point_lat";
+static const char*       REF_GPT_LON_KW      = "ref_point_lon";
+static const char*       REF_GPT_HGT_KW      = "ref_point_hgt";
+static const char*       REF_IPT_LINE_KW     = "ref_point_line";
+static const char*       REF_IPT_SAMP_KW     = "ref_point_samp";
+static const char*       IMAGE_ID_KW         = "image_id";
+static const char*       SENSOR_ID_KW        = "sensor";
+static const ossimString NULL_STRING         = "NULL";
+static const double      RAY_ORIGIN_HEIGHT   = 10000.0; //meters
+
+
+//DEBUG TBR : output ops
+std::ostream& operator<<(std::ostream& os, NEWMAT::GeneralMatrix& mat)
+{
+   int nr=mat.Nrows();
+   int nc=mat.Ncols();
+
+   NEWMAT::MatrixRow crow(&mat,NEWMAT::LoadOnEntry);
+//   NEWMAT::MatrixRowCol crow;
+   mat.RestoreRow(crow);  
+   for (int r=0;r<nr;++r)
+   {
+      for (int c=0;c<nc;++c)
+      {
+         os<<*(crow.Data()+c)<<" ";
+      }
+      os<<std::endl;
+      mat.NextRow(crow);
+   }
+   return os;
+}
+
+//*****************************************************************************
+//  DEFAULT CONSTRUCTOR: ossimSensorModel()
+//*****************************************************************************
+ossimSensorModel::ossimSensorModel()
+   :
+   ossimOptimizableProjection       (),
+   ossimAdjustableParameterInterface(),
+   theImageSize        (0, 0),
+   theSubImageOffset   (0.0, 0.0),
+   theImageID          (),
+   theSensorID         (),
+   theGSD              (0.0, 0.0),
+   theMeanGSD          (0.0),
+   theRefGndPt         (0.0, 0.0, 0.0),
+   theRefImgPt         (0.0, 0.0),
+   theBoundGndPolygon  (),
+   theImageClipRect    (),
+   theRelPosError      (0.0),
+   theNominalPosError  (0.0),
+   theParWRTx          (0.0, 0.0),
+   theParWRTy          (0.0, 0.0),
+   theParWRTz          (0.0, 0.0),
+   theObs              (0.0, 0.0),
+   theResid            (0.0, 0.0),
+   theExtrapolateImageFlag(false),
+   theExtrapolateGroundFlag(false)
+{
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimSensorModel::ossimSensorModel(geom_kwl): entering...\n"
+         << "DEBUG ossimSensorModel::ossimSensorModel(geom_kwl): returning..."
+         << std::endl;
+   }
+}
+
+//*****************************************************************************
+//  COPY CONSTRUCTOR: ossimSensorModel(ossimSensorModel)
+//*****************************************************************************
+ossimSensorModel::ossimSensorModel(const ossimSensorModel& model)
+   :
+   ossimOptimizableProjection(model),
+   ossimAdjustableParameterInterface(model),
+   theImageSize       (model.theImageSize),
+   theSubImageOffset  (model.theSubImageOffset),
+   theImageID         (model.theImageID),
+   theSensorID        (model.theSensorID),
+   theGSD             (model.theGSD),
+   theMeanGSD         (model.theMeanGSD),
+   theRefGndPt        (model.theRefGndPt),
+   theRefImgPt        (model.theRefImgPt),
+   theBoundGndPolygon (model.theBoundGndPolygon),
+   theImageClipRect   (model.theImageClipRect),
+   theRelPosError     (model.theRelPosError),
+   theNominalPosError (model.theNominalPosError),
+   theParWRTx         (model.theParWRTx),
+   theParWRTy         (model.theParWRTy),
+   theParWRTz         (model.theParWRTz),
+   theObs             (model.theObs),
+   theResid           (model.theResid),
+   theExtrapolateImageFlag(false),
+   theExtrapolateGroundFlag(false)
+{
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimSensorModel::ossimSensorModel(model): entering..." << std::endl;
+   }
+
+   theErrorStatus = model.theErrorStatus;
+   
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimSensorModel::ossimSensorModel(model): returning..." << std::endl;
+   }
+   
+   return;
+}
+
+//*****************************************************************************
+//  CONSTRUCTOR: ossimSensorModel(geom_kwl)
+//  
+//  Constructs from a geometry keywordlist.
+//  
+//*****************************************************************************
+ossimSensorModel::ossimSensorModel(const ossimKeywordlist& geom_kwl)
+   :
+   ossimOptimizableProjection     (),
+   ossimAdjustableParameterInterface(),
+   theImageSize        (0, 0),
+   theSubImageOffset   (0.0, 0.0),
+   theImageID          (),
+   theSensorID         (),
+   theGSD              (0.0, 0.0),
+   theMeanGSD          (0.0),
+   theRefGndPt         (0.0, 0.0, 0.0),
+   theRefImgPt         (0.0, 0.0),
+   theBoundGndPolygon  (),
+   theImageClipRect    (),
+   theRelPosError      (0.0),
+   theNominalPosError  (0.0),
+   theParWRTx          (0.0, 0.0),
+   theParWRTy          (0.0, 0.0),
+   theParWRTz          (0.0, 0.0),
+   theObs              (0.0, 0.0),
+   theResid            (0.0, 0.0),
+   theExtrapolateImageFlag(false),
+   theExtrapolateGroundFlag(false)
+{
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimSensorModel::ossimSensorModel(geom_kwl): entering..." << std::endl;
+   }
+   
+//   ossimElevManager::instance()->loadState(geom_kwl);
+   loadState(geom_kwl);
+
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimSensorModel::ossimSensorModel(geom_kwl): returning..." << std::endl;
+   }
+}
+
+
+const ossimSensorModel& ossimSensorModel::operator=( const ossimSensorModel& rhs )
+{
+   if (this != &rhs)
+   {
+      // ossimProjection base has no data members.
+      ossimOptimizableProjection::operator=(rhs);
+      ossimAdjustableParameterInterface::operator=(rhs);
+      theImageSize             = rhs.theImageSize;
+      theSubImageOffset        = rhs.theSubImageOffset;
+      theImageID               = rhs.theImageID;
+      theSensorID              = rhs.theSensorID;
+      theGSD                   = rhs.theGSD;
+      theMeanGSD               = rhs.theMeanGSD;
+      theRefGndPt              = rhs.theRefGndPt;
+      theRefImgPt              = rhs.theRefImgPt;
+      theBoundGndPolygon       = rhs.theBoundGndPolygon;
+      theImageClipRect         = rhs.theImageClipRect;
+      theRelPosError           = rhs.theRelPosError;
+      theNominalPosError       = rhs.theNominalPosError;
+      theParWRTx               = rhs.theParWRTx;
+      theParWRTy               = rhs.theParWRTy;
+      theParWRTz               = rhs.theParWRTz;
+      theObs                   = rhs.theObs;
+      theResid                 = rhs.theResid;
+      theExtrapolateImageFlag  = rhs.theExtrapolateImageFlag;
+      theExtrapolateGroundFlag = rhs.theExtrapolateGroundFlag;
+   }
+   return *this;
+}
+
+//*****************************************************************************
+//  DESTRUCTOR: ~ossimSensorModel
+//  
+//*****************************************************************************
+ossimSensorModel::~ossimSensorModel()
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::~ossimSensorModel: entering..." << std::endl;
+   
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::~ossimSensorModel: returning..." << std::endl;
+}
+
+ossimObject* ossimSensorModel::getBaseObject()
+{
+   return this;
+}
+
+const ossimObject* ossimSensorModel::getBaseObject()const
+{
+   return this;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimSensorModel::lineSampleToWorld(image_pt, &gpt)
+//  
+//  Intersects the ray associated with image_pt with the available elevation
+//  model. Returns ground point
+//  
+//*****************************************************************************
+void ossimSensorModel::lineSampleToWorld(const ossimDpt& image_point,
+                                         ossimGpt&       gpt) const
+{
+   bool debug = false;  // setable via interactive debugger
+   if (traceExec() || debug)  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::lineSampleToWorld:entering..." << std::endl;
+   
+   if(image_point.hasNans())
+   {
+      gpt.makeNan();
+      return;
+   }
+   //***
+   // Extrapolate if image point is outside image:
+   //***
+   if (!insideImage(image_point)&&(!theExtrapolateImageFlag))
+   {
+      gpt = extrapolate(image_point);
+      return;
+   }
+
+   //***
+   // Determine imaging ray and invoke elevation source object's services to
+   // intersect ray with terrain model:
+   //***
+   ossimEcefRay ray;
+   imagingRay(image_point, ray);
+   ossimElevManager::instance()->intersectRay(ray, gpt);
+
+   if (traceDebug() || debug)
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "image_point = " << image_point << std::endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ray = " << ray << std::endl;
+      ossimNotify(ossimNotifyLevel_DEBUG) << "gpt = " << gpt << std::endl;
+   }
+
+   if (traceExec() || debug)  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::lineSampleToWorld: returning..." << std::endl;
+   return;
+}
+
+//*****************************************************************************
+//  METHOD: ossimSensorModel::worldToLineSample()
+//  
+//  Performs forward projection of ground point to image space.
+//  
+//*****************************************************************************
+void ossimSensorModel::worldToLineSample(const ossimGpt& worldPoint,
+                                         ossimDpt&       ip) const
+{
+   //   static bool recursionFlag = false;
+
+   static const double PIXEL_THRESHOLD    = .1; // acceptable pixel error
+   static const int    MAX_NUM_ITERATIONS = 20;
+
+
+   if(worldPoint.isLatNan() || worldPoint.isLonNan())
+   {
+      ip.makeNan();
+      return;
+   }
+      
+   //***
+   // First check if the world point is inside bounding rectangle:
+   //***
+   int iters = 0;
+   ossimDpt wdp (worldPoint);
+   //   if ((!recursionFlag)&&!(theBoundGndPolygon.pointWithin(wdp)))
+
+   if((theBoundGndPolygon.getNumberOfVertices() > 0)&&
+      (!theBoundGndPolygon.hasNans()))
+   {
+      if (!(theBoundGndPolygon.pointWithin(wdp)))
+      {
+         if(theSeedFunction.valid())
+         {
+            theSeedFunction->worldToLineSample(worldPoint, ip);
+         }
+         else if(!theExtrapolateGroundFlag) // if I am not already in the extrapolation routine
+
+         {
+         //      recursionFlag = true;
+            ip = extrapolate(worldPoint);
+         //      recursionFlag = false;
+         }
+         return;
+      }         
+   }
+
+   //***
+   // Substitute zero for null elevation if present:
+   //***
+   double height = worldPoint.hgt;
+   if ( ossim::isnan(height) )
+   {
+      height = 0.0;
+   }
+
+   //
+   // Utilize iterative scheme for arriving at image point. Begin with guess
+   // at image center:
+   //
+   if(theSeedFunction.valid())
+   {
+      theSeedFunction->worldToLineSample(worldPoint, ip);
+   }
+   else
+   {
+      ip.u = theRefImgPt.u;
+      ip.v = theRefImgPt.v;
+   }
+   
+   ossimDpt ip_du;
+   ossimDpt ip_dv;
+
+   ossimGpt gp, gp_du, gp_dv;
+   double dlat_du, dlat_dv, dlon_du, dlon_dv;
+   double delta_lat, delta_lon, delta_u, delta_v;
+   double inverse_norm;
+   bool done = false;
+   //***
+   // Begin iterations:
+   //***
+   do
+   {
+      //***
+      // establish perturbed image points about the guessed point:
+      //***
+      ip_du.u = ip.u + 1.0;
+      ip_du.v = ip.v;
+      ip_dv.u = ip.u;
+      ip_dv.v = ip.v + 1.0;
+      
+      //***
+      // Compute numerical partials at current guessed point:
+      //***
+      lineSampleHeightToWorld(ip,    height, gp);
+      lineSampleHeightToWorld(ip_du, height, gp_du);
+      lineSampleHeightToWorld(ip_dv, height, gp_dv);
+
+      if(gp.isLatNan() || gp.isLonNan())
+      {
+         gp = extrapolate(ip);
+      }
+      if(gp_du.isLatNan() || gp_du.isLonNan())
+      {
+         gp_du = extrapolate(ip_du);
+      }
+      if(gp_dv.isLatNan() | gp_dv.isLonNan())
+      {
+         gp_dv = extrapolate(ip_dv);
+         
+      }
+      dlat_du = gp_du.lat - gp.lat; //e
+      dlon_du = gp_du.lon - gp.lon; //g
+      dlat_dv = gp_dv.lat - gp.lat; //f
+      dlon_dv = gp_dv.lon - gp.lon; //h
+      
+      //
+      // Test for convergence:
+      //
+      delta_lat = worldPoint.lat - gp.lat;
+      delta_lon = worldPoint.lon - gp.lon;
+
+
+      //
+      // Compute linearized estimate of image point given gp delta:
+      //
+      inverse_norm = dlat_dv*dlon_du - dlat_du*dlon_dv; // fg-eh
+      
+      if (!ossim::almostEqual(inverse_norm, 0.0, DBL_EPSILON))
+      {
+         delta_u = (-dlon_dv*delta_lat + dlat_dv*delta_lon)/inverse_norm;
+         delta_v = ( dlon_du*delta_lat - dlat_du*delta_lon)/inverse_norm;
+         ip.u += delta_u;
+         ip.v += delta_v;
+      }
+      else
+      {
+         delta_u = 0;
+         delta_v = 0;
+      }
+      done = ((fabs(delta_u) < PIXEL_THRESHOLD)&&
+              (fabs(delta_v) < PIXEL_THRESHOLD));
+      iters++;
+   } while ((!done) && (iters < MAX_NUM_ITERATIONS));
+   
+//    } while (((fabs(delta_u) > PIXEL_THRESHOLD) ||
+//              (fabs(delta_v) > PIXEL_THRESHOLD)) &&
+//             (iters < MAX_NUM_ITERATIONS));
+
+#if 0 /* Please leave for debug. */
+   //---
+   // Note that this error mesage appears only if max count was reached while
+   // iterating. A linear (no iteration) solution would finish with iters =
+   // MAX_NUM_ITERATIONS + 1:
+   //---
+   if (iters >= MAX_NUM_ITERATIONS)
+   {
+      std::cout << "MAX ITERATION!!!" << std::endl;
+      std::cout << "delta_u = "   << delta_u
+                << "\ndelta_v = " << delta_v << "\n";
+   }
+   else
+   {
+      std::cout << "ITERS === " << iters << std::endl;
+   }
+   std::cout << "iters = " << iters << "\n";
+#endif
+
+   //***
+   // The image point computed this way corresponds to full image space.
+   // Apply image offset in the case this is a sub-image rectangle:
+   //***
+   ip -= theSubImageOffset;
+}
+
+//*****************************************************************************
+//  METHOD: ossimSensorModel::print(ostream)
+//  
+//  Dumps contents of object to ostream.
+//  
+//*****************************************************************************
+std::ostream& ossimSensorModel::print(std::ostream& out) const
+{
+   out << setprecision(15) << setiosflags(ios::fixed)
+       << "\n ossimSensorModel base-class data members:\n"
+       << "\n         theImageID: " << theImageID
+       << "\n        theSensorID: " << theSensorID
+       << "\n       theImageSize: " << theImageSize
+       << "\n  theSubImageOffset: " << theSubImageOffset
+       << "\n             theGSD: " << theGSD
+       << "\n         theMeanGSD: " << theMeanGSD
+       << "\n        theRefGndPt: " << theRefGndPt
+       << "\n        theRefImgPt: " << theRefImgPt
+       << "\n theBoundGndPolygon: \n" << theBoundGndPolygon
+       << "\n   theImageClipRect: " << theImageClipRect
+       << "\n theNominalPosError: " << theNominalPosError
+       << "\n     theNominalPosError: " << theNominalPosError
+       << "\n     theRelPosError: " << theRelPosError
+       << endl;
+
+   //---
+   // Note:
+   // need ossimAdjustableParameterInterface::print(os);
+   //---
+   return ossimProjection::print(out);
+}
+
+void ossimSensorModel::setRefImgPt(const ossimDpt& pt)
+{
+   theRefImgPt = pt;
+}
+
+void ossimSensorModel::setRefGndPt(const ossimGpt& pt)
+{
+   theRefGndPt = pt;
+}
+
+void ossimSensorModel::setImageRect(const ossimDrect& imageRect)
+{
+   theImageClipRect = imageRect;
+   theRefImgPt = imageRect.midPoint();
+}
+void ossimSensorModel::setGroundRect(const ossimGpt& ul,
+                                     const ossimGpt& ur,
+                                     const ossimGpt& lr,
+                                     const ossimGpt& ll)
+{
+   theBoundGndPolygon.clear();
+   theBoundGndPolygon.addPoint(ul);
+   theBoundGndPolygon.addPoint(ur);
+   theBoundGndPolygon.addPoint(lr);
+   theBoundGndPolygon.addPoint(ll);
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimSensorModel::saveState()
+//  
+//  Saves the state of this object to KWL.
+//  
+//*****************************************************************************
+bool ossimSensorModel::saveState(ossimKeywordlist& kwl,
+                                 const char*       prefix) const 
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::saveState: entering..." << std::endl;
+
+   kwl.add(prefix, IMAGE_ID_KW, theImageID.chars());
+   kwl.add(prefix, SENSOR_ID_KW, theSensorID.chars());
+   
+   kwl.add(prefix,
+           ossimKeywordNames::NUMBER_LINES_KW,
+           theImageSize.line,
+           true);
+   kwl.add(prefix,
+           ossimKeywordNames::NUMBER_SAMPLES_KW,
+           theImageSize.samp,
+           true);
+   
+   kwl.add(prefix,
+           REF_GPT_LAT_KW,
+           theRefGndPt.lat,
+           true);
+   
+   kwl.add(prefix,
+           REF_GPT_LON_KW,
+           theRefGndPt.lon,
+           true);
+   
+   kwl.add(prefix,
+           REF_GPT_HGT_KW,
+           theRefGndPt.hgt,
+           true);
+   
+   kwl.add(prefix,
+           REF_IPT_LINE_KW,
+           theRefImgPt.line,
+           true);
+      
+   kwl.add(prefix,
+           REF_IPT_SAMP_KW,
+           theRefImgPt.samp,
+           true);
+   
+   kwl.add(prefix,
+           ossimKeywordNames::METERS_PER_PIXEL_Y_KW,
+           theGSD.line,
+           true);
+   
+   kwl.add(prefix,
+           ossimKeywordNames::METERS_PER_PIXEL_X_KW,
+           theGSD.samp,
+           true);
+   
+   ossimDpt corner;
+   if(!theBoundGndPolygon.vertex(0, corner))
+   {
+      corner = ossimDpt(0,0);
+   }
+   
+   kwl.add(prefix,
+           ossimKeywordNames::UL_LAT_KW,
+           corner.lat,
+           true);
+   
+   kwl.add(prefix,
+           ossimKeywordNames::UL_LON_KW,
+           corner.lon,
+           true);
+   
+   if(!theBoundGndPolygon.nextVertex(corner))
+   {
+      corner = ossimDpt(0,0);
+   }
+   kwl.add(prefix,
+           ossimKeywordNames::UR_LAT_KW,
+           corner.lat,
+           true);
+   
+   kwl.add(prefix,
+           ossimKeywordNames::UR_LON_KW,
+           corner.lon,
+           true);
+   
+   if(!theBoundGndPolygon.nextVertex(corner))
+   {
+      corner = ossimDpt(0,0);
+   }
+   kwl.add(prefix,
+           ossimKeywordNames::LR_LAT_KW,
+           corner.lat,
+           true);
+   kwl.add(prefix,
+           ossimKeywordNames::LR_LON_KW,
+           corner.lon,
+           true);
+   
+   
+   if(!theBoundGndPolygon.nextVertex(corner))
+   {
+      corner = ossimDpt(0,0);
+   }
+   kwl.add(prefix,
+           ossimKeywordNames::LL_LAT_KW,
+           corner.lat,
+           true);
+   kwl.add(prefix,
+           ossimKeywordNames::LL_LON_KW,
+           corner.lon,
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::CE90_ABSOLUTE_KW,
+           theNominalPosError,
+           true, 20);
+
+   kwl.add(prefix,
+           ossimKeywordNames::CE90_RELATIVE_KW,
+           theRelPosError,
+           true, 20);
+
+   kwl.add(prefix,
+           "rect",
+           ossimString::toString(theImageClipRect.ul().x)
+           + " " + ossimString::toString(theImageClipRect.ul().y) + " " +
+           ossimString::toString(theImageClipRect.lr().x) + " " +
+           ossimString::toString(theImageClipRect.lr().y),
+           true);
+
+   // Avoid passing null char* to method that takes an ossimString.
+   ossimString tmpStr;
+   if (prefix)
+   {
+      tmpStr = prefix;
+   }
+   saveAdjustments(kwl, tmpStr);
+      
+   //
+   // Also save the state of the elevation object:
+   //
+//   ossimElevManager::instance()->saveState(kwl, prefix);
+   
+   
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::saveState:returning..." << std::endl;
+   return ossimProjection::saveState(kwl, prefix);;
+}
+
+//*****************************************************************************
+//  METHOD: ossimSensorModel::loadState()
+//  
+//  Loads the state of this object from KWL.
+//  
+//*****************************************************************************
+bool ossimSensorModel::loadState(const ossimKeywordlist& kwl,
+                                 const char*       prefix)
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::loadState: entering..." << std::endl;
+
+   const char* keyword;
+   const char* value;
+//   int nconv;
+   ossimDpt v[4]; // temporarily holds vertices for ground polygon
+
+   //***
+   // Read each keyword, breaking out if error occurs:
+   //***
+   keyword = IMAGE_ID_KW;
+   value = kwl.find(prefix, keyword);
+   if (value)
+      theImageID = value;
+   else
+      theImageID = NULL_STRING;
+   
+   keyword = SENSOR_ID_KW;
+   value = kwl.find(prefix, keyword);
+   if (value)
+      theSensorID = value;
+   else
+      theSensorID = NULL_STRING;
+      
+   keyword = ossimKeywordNames::NUMBER_LINES_KW;//IMAGE_SIZE_LINES_KW;
+   value = kwl.find(prefix, keyword);
+   if (value)
+   {
+      theImageSize.line = ossimString(value).toLong();
+   }
+
+   keyword = ossimKeywordNames::NUMBER_SAMPLES_KW;// IMAGE_SIZE_SAMPS_KW;
+   value = kwl.find(prefix, keyword);
+   if (value)
+   {
+      theImageSize.samp = ossimString(value).toLong();
+   }
+
+   keyword = REF_IPT_LINE_KW;
+   value = kwl.find(prefix, keyword);
+   if (value)
+   {
+      theRefImgPt.line = ossimString(value).toDouble();
+   }
+
+   keyword = REF_IPT_SAMP_KW;
+   value = kwl.find(prefix, keyword);
+   if (value)
+   {
+      theRefImgPt.samp = ossimString(value).toDouble();
+   }
+
+   keyword = REF_GPT_LAT_KW;
+   value = kwl.find(prefix, keyword);
+   if(value)
+   {
+      theRefGndPt.latd(ossimString(value).toDouble());
+   }
+   
+
+   keyword = REF_GPT_LON_KW;
+   value = kwl.find(prefix, keyword);
+   if(value)
+   {
+      theRefGndPt.lond(ossimString(value).toDouble());
+   }
+   
+
+   keyword = REF_GPT_HGT_KW;
+   value = kwl.find(prefix, keyword);
+   if(value)
+   {
+      theRefGndPt.hgt = ossimString(value).toDouble();
+   }
+   
+
+   keyword = ossimKeywordNames::METERS_PER_PIXEL_Y_KW;// GSD_LINE_DIR_KW;
+   value = kwl.find(prefix, keyword);
+   if (value)
+   {
+      theGSD.line = ossimString(value).toDouble();
+   }
+
+   keyword = ossimKeywordNames::METERS_PER_PIXEL_X_KW;//GSD_SAMP_DIR_KW;
+   value = kwl.find(prefix, keyword);
+   if (value)
+   {
+      theGSD.samp = ossimString(value).toDouble();
+   }
+
+   theMeanGSD = (fabs(theGSD.line) + fabs(theGSD.samp))/2.0;
+
+   keyword = ossimKeywordNames::UL_LAT_KW;
+   value = kwl.find(prefix, keyword);
+   if (value)
+   {
+      v[0].lat = ossimString(value).toDouble();
+   }
+
+   keyword = ossimKeywordNames::UL_LON_KW;
+   value = kwl.find(prefix, keyword);
+   if (value)
+   {
+      v[0].lon = ossimString(value).toDouble();
+   }
+
+   keyword = ossimKeywordNames::UR_LAT_KW;
+   value = kwl.find(prefix, keyword);
+   if (value)
+   {
+      v[1].lat = ossimString(value).toDouble();
+   }
+
+   keyword = ossimKeywordNames::UR_LON_KW;
+   value = kwl.find(prefix, keyword);
+   if (value)
+   {
+      v[1].lon = ossimString(value).toDouble();
+   }
+
+   keyword = ossimKeywordNames::LR_LAT_KW;
+   value = kwl.find(prefix, keyword);
+   if (value)
+   {
+      v[2].lat = ossimString(value).toDouble();
+   }
+
+   keyword = ossimKeywordNames::LR_LON_KW;
+   value = kwl.find(prefix, keyword);
+   if (value)
+   {
+      v[2].lon = ossimString(value).toDouble();
+   }
+
+   keyword = ossimKeywordNames::LL_LAT_KW;
+   value = kwl.find(prefix, keyword);
+   if (value)
+   {
+      v[3].lat = ossimString(value).toDouble();
+   }
+
+   keyword = ossimKeywordNames::LL_LON_KW;
+   value = kwl.find(prefix, keyword);
+   if (value)
+   {
+      v[3].lon = ossimString(value).toDouble();
+   }
+
+   keyword = ossimKeywordNames::CE90_ABSOLUTE_KW;
+   value = kwl.find(prefix, keyword);
+   if (!value)
+   {
+      // Try old keyword for legacy purposes:
+      keyword = ossimKeywordNames::IMAGE_CE90_KW;
+      value = kwl.find(prefix, keyword);
+   }
+   if (value)
+      theNominalPosError = atof(value);
+   else
+      theNominalPosError = 0.0;
+
+   keyword = ossimKeywordNames::CE90_RELATIVE_KW;
+   value = kwl.find(prefix, keyword);
+   if (value)
+      theRelPosError = atof(value);
+   else
+      theRelPosError = theNominalPosError;
+
+   //***
+   // Initialize other data members given quantities read in KWL:
+   //***
+   theBoundGndPolygon = ossimPolygon(4, v);
+
+   const char* rect = kwl.find(prefix, "rect");
+   if(rect)
+   {
+      std::vector<ossimString> splitArray;
+      ossimString rectString(rect);
+      rectString = rectString.trim();
+      rectString.split(splitArray, " ");
+      if(splitArray.size() == 4)
+      {
+         theImageClipRect = ossimDrect(splitArray[0].toDouble(),
+                                       splitArray[1].toDouble(),
+                                       splitArray[2].toDouble(),
+                                       splitArray[3].toDouble());
+      }
+      else
+      {
+         theImageClipRect = ossimDrect(0.0, 0.0,
+                                       theImageSize.samp-1, theImageSize.line-1);
+      }
+   }
+   else
+   {
+      theImageClipRect = ossimDrect(0.0, 0.0,
+                                    theImageSize.samp-1, theImageSize.line-1);
+   }
+   
+   // Avoid passing null char* to method that takes an ossimString.
+   ossimString tmpStr;
+   if (prefix)
+   {
+      tmpStr = prefix;
+   }
+   loadAdjustments(kwl, tmpStr);
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::loadState: returning..." << std::endl;
+   return ossimProjection::loadState(kwl, prefix);;
+}
+
+//*****************************************************************************
+// PROTECTED METHOD: Model_type::extrapolate(image_point)
+//
+//  This method computes extrapolated values of latitude and longitude for
+//  points which are outside the actual image boundaries.
+//*****************************************************************************
+ossimGpt ossimSensorModel::extrapolate (const ossimDpt& imagePoint,
+                                        const double&   height) const
+{
+   theExtrapolateImageFlag = true;
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) <<  "DEBUG ossimSensorModel::extrapolate: entering... " << std::endl;
+
+   //---
+   // If image point supplied has NaN components, return now with a NaN point.
+   // This prevents an infinite recursion between model worldToLineSample
+   // and this method:
+   //---
+   if (imagePoint.hasNans())
+   {
+      theExtrapolateImageFlag = false;
+      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::extrapolate: returning..." << std::endl;
+      return ossimGpt(ossim::nan(), ossim::nan(), ossim::nan());
+   }
+
+   if(theSeedFunction.valid())
+   {
+      ossimGpt wpt;
+
+      theSeedFunction->lineSampleToWorld(imagePoint, wpt);
+      theExtrapolateImageFlag = false;
+      return wpt;
+   }
+   //***
+   // Determine which edge is intersected by the radial, and establish
+   // intersection:
+   //***
+   ossimGpt gpt;
+   ossimDpt edgePt (imagePoint);
+   ossimDpt image_center (theRefImgPt);
+   theImageClipRect.clip(image_center, edgePt);
+
+   //***
+   // Need edgePt relative to image center. Compute an epsilon perturbation in
+   // the direction of edgePt for later computing directional derivative,
+   // and back out the offset to origin:
+   //***
+   ossimDpt deltaPt (edgePt - image_center);
+   ossimDpt epsilon (deltaPt/deltaPt.length());
+   edgePt -= epsilon;  // insure that we are inside the image
+   ossimDpt edgePt_prime (edgePt - epsilon); // epsilon=1pixel
+       
+   //***
+   // Establish ground point corresponding to edge point and edgePt+epsilon:
+   //***
+   ossimGpt edgeGP;
+   ossimGpt edgeGP_prime;
+
+   if (ossim::isnan(height))
+   {
+      lineSampleToWorld(edgePt, edgeGP);
+      lineSampleToWorld(edgePt_prime, edgeGP_prime);
+   }
+   else
+   {
+      lineSampleHeightToWorld(edgePt, height, edgeGP);
+      lineSampleHeightToWorld(edgePt_prime, height, edgeGP_prime);
+   }
+   
+   //***
+   // Compute approximate directional derivatives of lat and lon along radial
+   // at the edge:
+   //***
+   double dpixel    = (edgePt-edgePt_prime).length();
+   double dlat_drad = (edgeGP.lat - edgeGP_prime.lat)/dpixel;
+   double dlon_drad = (edgeGP.lon - edgeGP_prime.lon)/dpixel;
+
+   //***
+   // Now extrapolate to image point of interest:
+   //***
+   double delta_pixel = (imagePoint - edgePt).length();
+
+   gpt.lat = edgeGP.lat + dlat_drad*delta_pixel;
+   gpt.lon = edgeGP.lon + dlon_drad*delta_pixel;
+   if ( ossim::isnan(height) )
+   {
+      gpt.hgt = ossimElevManager::instance()->getHeightAboveEllipsoid(gpt);
+   }
+   else
+   {
+      gpt.hgt = height;
+   }
+   theExtrapolateImageFlag = false;
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::extrapolate: returning..." << std::endl;
+   return gpt;
+}
+
+
+//*****************************************************************************
+// PROTECTED METHOD: Model_type::extrapolate(ground_point)
+//
+//  This method computes extrapolated values of line and sample for
+//  points which are outside the actual image boundaries.
+//*****************************************************************************
+ossimDpt ossimSensorModel::extrapolate (const ossimGpt& gpt) const
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) <<  "DEBUG ossimSensorModel::extrapolate: entering... " << std::endl;
+   theExtrapolateGroundFlag = true;
+   double height = 0.0;
+   //---
+   // If ground point supplied has NaN components, return now with a NaN point.
+   //---
+   if ( (ossim::isnan(gpt.lat)) || (ossim::isnan(gpt.lon)) )
+//       (gpt.hgt==OSSIM_DBL_NAN))
+   {
+      theExtrapolateGroundFlag = false;
+      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::extrapolate: returning..." << std::endl;
+      return ossimDpt(ossim::nan(), ossim::nan());
+   }
+   if(ossim::isnan(gpt.hgt) == false)
+   {
+      height = gpt.hgt;
+   }
+   
+   if(theSeedFunction.valid())
+   {
+      ossimDpt ipt;
+
+      theSeedFunction->worldToLineSample(gpt, ipt);
+
+      theExtrapolateGroundFlag = false;
+     return ipt;
+   }
+   //***
+   // Determine which edge is intersected by the radial, and establish
+   // intersection:
+   //***
+   ossimDpt edgePt (gpt);
+   ossimDpt image_center (theRefGndPt);
+   theBoundGndPolygon.clipLineSegment(image_center, edgePt);
+
+   //---
+   // Compute an epsilon perturbation in the direction away from edgePt for
+   // later computing directional derivative:
+   //---
+   const double  DEG_PER_MTR =  8.983152841e-06; // Equator WGS-84...
+   double epsilon = theMeanGSD*DEG_PER_MTR; //degrees (latitude) per pixel
+   ossimDpt deltaPt (edgePt-image_center);
+   ossimDpt epsilonPt (deltaPt*epsilon/deltaPt.length());
+   edgePt -= epsilonPt;
+   ossimDpt edgePt_prime (edgePt - epsilonPt);
+       
+   //***
+   // Establish image point corresponding to edge point and edgePt+epsilon:
+   //***
+      ossimGpt edgeGP       (edgePt.lat,       edgePt.lon,       height);//gpt.hgt);
+      ossimGpt edgeGP_prime (edgePt_prime.lat, edgePt_prime.lon, height);//gpt.hgt);
+
+   worldToLineSample(edgeGP, edgePt);
+   worldToLineSample(edgeGP_prime, edgePt_prime);
+
+   //***
+   // Compute approximate directional derivatives of line and sample along
+   // radial at the edge:
+   //***
+   double dsamp_drad = (edgePt.samp - edgePt_prime.samp)/epsilon;
+   double dline_drad = (edgePt.line - edgePt_prime.line)/epsilon;
+
+   //***
+   // Now extrapolate to point of interest:
+   //***
+   double delta = (ossimDpt(gpt) - ossimDpt(edgeGP)).length();
+
+   
+   ossimDpt extrapolated_ip (edgePt.samp + delta*dsamp_drad,
+                             edgePt.line + delta*dline_drad);
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::extrapolate: returning..." << std::endl;
+
+   theExtrapolateGroundFlag = false;
+   return extrapolated_ip;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimSensorModel::imagingRay()
+//  
+//  Default implementation for computing imaging ray from image point.
+//  
+//*****************************************************************************
+void ossimSensorModel::imagingRay(const ossimDpt& image_point,
+                                  ossimEcefRay&   image_ray) const
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::imagingRay: entering..." << std::endl;
+
+   ossimGpt start;
+   ossimGpt end;
+
+   lineSampleHeightToWorld(image_point, RAY_ORIGIN_HEIGHT, start);
+   lineSampleHeightToWorld(image_point, 0.0, end);
+
+   image_ray = ossimEcefRay(start, end);
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::imagingRay: returning..." << std::endl;
+   return;
+}
+
+//*****************************************************************************
+//  METHOD: ossimSensorModel::getObsCovMat()
+//  
+//  Default implementation for forming observation covariance matrix.
+//
+//    Note: At this base class level, the only error source currently
+//          considered is mensuration error.  This is obviously optimistic,
+//          but is included as a placeholder/example, and is presently
+//          the trivial case.
+//  
+//*****************************************************************************
+ossimSensorModel::CovMatStatus ossimSensorModel::getObsCovMat(
+   const ossimDpt& /* ipos */ , NEWMAT::SymmetricMatrix& Cov, const ossim_float64 defPointingSigma)
+{
+   // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   // Mensuration error contribution
+   // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   //  Sensitivity matrix
+   NEWMAT::SymmetricMatrix B(2);
+   B = 0.0;
+   B(1,1) = 1.0;
+   B(2,2) = B(1,1);
+
+   //  Pointing covariance matrix
+   NEWMAT::SymmetricMatrix P(2);
+   P = 0.0;
+   P(1,1) = defPointingSigma*defPointingSigma;
+   P(2,2) = P(1,1);
+
+   //  Propagate
+   NEWMAT::SymmetricMatrix Cm;
+   Cm << B * P * B.t();
+
+   // ~~~~~~~~~~~~~~~~~~~~
+   // Sum total covariance
+   // ~~~~~~~~~~~~~~~~~~~~
+   NEWMAT::SymmetricMatrix Ctot = Cm; //+ other contributors as identified
+
+   // ~~~~~~~~~~~~~~~~~~
+   // Propagate to image
+   // ~~~~~~~~~~~~~~~~~~
+   NEWMAT::SymmetricMatrix Bi(2);
+   Bi = 0.0;
+   Bi(1,1) = 1.0;
+   Bi(2,2) = Bi(1,1);
+
+   Cov << Bi * Ctot * Bi.t();
+
+   return ossimSensorModel::COV_PARTIAL;
+}
+
+void ossimSensorModel::computeGsd()
+{
+   static const char MODULE[] = "ossimSensorModel::computeGsd";
+
+   if (theImageSize.hasNans())
+   {
+      std::string e = MODULE;
+      e += "Error image size has nans!";
+      throw ossimException(e);
+   }
+
+   //---
+   // Compute gsd in the x direction from left to right points across the middle of image.
+   // Compute gsd in the y direction from top to bottom points across the middle of image.
+   //---
+
+   // ossim_float64 midLine = 0.0;
+   // ossim_float64 midSamp = 0.0;
+   // ossim_float64 endLine = 1.0;
+   // ossim_float64 endSamp = 1.0;
+   // if (theImageSize.x > 2)
+   // {
+   //    midSamp = (theImageSize.x-1)/2.0;
+   //    endSamp = theImageSize.x-1;
+         
+   // }
+   // if (theImageSize.y > 2)
+   // {
+   //    midLine = (theImageSize.y-1)/2.0;
+   //    endLine = theImageSize.y-1;
+   // }
+
+   ossimDpt centerImagePoint = theRefImgPt;
+   ossimDpt quarterSize;
+   if(!theImageSize.hasNans())
+   {
+      quarterSize = ossimDpt(theImageSize.x/4.0, theImageSize.y/4.0);
+   }
+   else if(!theImageClipRect.hasNans())
+   {
+      ossim_float32 w = theImageClipRect.width();
+      ossim_float32 h = theImageClipRect.height();
+
+      quarterSize = ossimDpt(w/4.0, h/4.0);
+   }
+   else
+   {
+      quarterSize = ossimDpt(1.0,1.0);      
+   }
+   if(centerImagePoint.hasNans()&&(!theImageSize.hasNans()))
+   {
+      centerImagePoint.x = (theImageSize.x)/2.0;
+      centerImagePoint.y = (theImageSize.y-1.0)/2.0;
+   }
+   else if(centerImagePoint.hasNans()&&!theImageClipRect.hasNans())
+   {
+      centerImagePoint = theImageClipRect.midPoint();
+   }
+   
+   if(!centerImagePoint.hasNans())
+   {
+      ossimDpt leftDpt(centerImagePoint.x-quarterSize.x, centerImagePoint.y);//  (0.0,     midLine);
+      ossimDpt rightDpt(centerImagePoint.x+quarterSize.y, centerImagePoint.y);// (endSamp, midLine);
+      ossimDpt topDpt(centerImagePoint.x, centerImagePoint.y-quarterSize.y);//   (midSamp, 0.0);
+      ossimDpt bottomDpt(centerImagePoint.x, centerImagePoint.y+quarterSize.y);//(midSamp, endLine);
+
+      ossimGpt leftGpt;
+      ossimGpt rightGpt;
+      ossimGpt topGpt;
+      ossimGpt bottomGpt;
+
+      //---
+      // Left point.
+      // For the first point use lineSampleToWorld to get the height.
+      //---
+      lineSampleToWorld(leftDpt, leftGpt);
+      if (leftGpt.hasNans())
+      {
+         std::string e = MODULE;
+         e += "Error leftGpt has nans!";
+         throw ossimException(e);
+      }
+
+      //---
+      // Right point:
+      // Use lineSampleHeightToWorld using the left height since we want the horizontal distance.
+      //---
+      lineSampleHeightToWorld(rightDpt, leftGpt.hgt, rightGpt);
+      if (rightGpt.hasNans())
+      {
+         std::string e = MODULE;
+         e += "Error rightGpt has nans!";
+         throw ossimException(e);
+      }
+
+      //---
+      // Top point:
+      // Use lineSampleHeightToWorld using the left height since we want the horizontal distance.
+      //---
+      lineSampleHeightToWorld(topDpt, leftGpt.hgt, topGpt);
+      if (topGpt.hasNans())
+      {
+         std::string e = MODULE;
+         e += "Error topGpt has nans!";
+         throw ossimException(e);
+      }
+      
+      //---
+      // Bottom point:
+      // Use lineSampleHeightToWorld using the left height since we want the horizontal distance.
+      //---
+      lineSampleHeightToWorld(bottomDpt, leftGpt.hgt, bottomGpt);
+      if (bottomGpt.hasNans())
+      {
+         std::string e = MODULE;
+         e += "Error bottomGpt has nans!";
+         throw ossimException(e);
+      }
+
+#if 0 /* Please leave for debug. (drb) */
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "image size:    " << theImageSize
+         << "\nleftDpt:   " << leftDpt
+         << "\nrightDpt:  " << rightDpt
+         << "\ntopDpt:    " << topDpt
+         << "\nbottomDpt: " << bottomDpt      
+         << "\nleftGpt:   " << leftGpt
+         << "\nrightGpt:  " << rightGpt
+         << "\ntopGpt:    " << topGpt
+         << "\nbottomGpt: " << bottomGpt      
+         << "\n";
+#endif
+         
+      theGSD.x   = leftGpt.distanceTo(rightGpt)/(rightDpt.x-leftDpt.x);
+      theGSD.y   = topGpt.distanceTo(bottomGpt)/(bottomDpt.y-topDpt.y);
+      theMeanGSD = (theGSD.x + theGSD.y)/2.0;
+
+   }
+   else
+   {
+         std::string e = MODULE;
+         e += "Error center has nans!";
+         throw ossimException(e);
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimSensorModel::computGsd DEBUG:"
+         << "\ntheGSD:     " << theGSD
+         << "\ntheMeanGSD: " << theMeanGSD << std::endl;
+   }
+}
+
+//*****************************************************************************
+//  STATIC METHOD: ossimSensorModel::writeGeomTemplate
+//  
+//  Outputs a sample geometry KWL to stream provided.
+//  
+//*****************************************************************************
+void ossimSensorModel::writeGeomTemplate(ostream& os)
+{
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::writeGeomTemplate:entering..." << std::endl;
+   
+   os << "//***\n"
+      << "// Base-class ossimSensorModel Keywords:\n"
+      << "//***\n"
+      << ossimKeywordNames::ID_KW << ":  <string>\n"
+      << SENSOR_ID_KW << ": <string>\n"
+      << ossimKeywordNames::NUMBER_LINES_KW << ": <int>\n"
+      << ossimKeywordNames::NUMBER_SAMPLES_KW << ": <int>\n"
+      << REF_GPT_LAT_KW << ": <decimal degrees>\n"
+      << REF_GPT_LON_KW << ": <decimal degrees>\n"
+      << REF_GPT_HGT_KW << ": <float meters>\n"
+      << REF_IPT_LINE_KW << ": <float>\n"
+      << REF_IPT_SAMP_KW << ": <float>\n"
+      << ossimKeywordNames::METERS_PER_PIXEL_Y_KW << ": <float meters>\n"
+      << ossimKeywordNames::METERS_PER_PIXEL_X_KW << ": <float meters>\n"
+      << ossimKeywordNames::UL_LAT_KW << ": <decimal degrees>\n"
+      << ossimKeywordNames::UL_LON_KW << ": <decimal degrees>\n"
+      << ossimKeywordNames::UR_LAT_KW << ": <decimal degrees>\n"
+      << ossimKeywordNames::UR_LON_KW << ": <decimal degrees>\n"
+      << ossimKeywordNames::LR_LAT_KW << ": <decimal degrees>\n"
+      << ossimKeywordNames::LR_LON_KW << ": <decimal degrees>\n"
+      << ossimKeywordNames::LL_LAT_KW << ": <decimal degrees>\n"
+      << ossimKeywordNames::LL_LON_KW << ": <decimal degrees>\n"
+      << "\n"
+      << "//***\n"
+      << "// Repeat following four entries for each adjustable parameter:\n"
+      << "//***\n"
+//       << PARAM_PREFIX << "N." << PARAM_NAME_KW << ": <string>\n" 
+//       << PARAM_PREFIX << "N." << PARAM_UNITS_KW << ": <string>\n" 
+//       << PARAM_PREFIX << "N." << PARAM_VALUE_KW << ": <float>\n" 
+//       << PARAM_PREFIX << "N." << PARAM_SIGMA_KW << ": <float>\n"
+      << std::endl;
+
+   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::writeGeomTemplate: returning..." << std::endl;
+   return;
+}
+
+ossim_uint32 
+ossimSensorModel::degreesOfFreedom()const
+{
+   ossim_uint32 dof = 0;
+   ossim_uint32 idx = 0;
+   ossim_uint32 numAdj = getNumberOfAdjustableParameters();
+   for(idx = 0; idx < numAdj; ++idx)
+   {
+      if(!isParameterLocked(idx))
+      {
+         ++dof;
+      }
+   }
+   
+   return dof;
+}
+
+double
+ossimSensorModel::optimizeFit(const ossimTieGptSet& tieSet, double* /* targetVariance */)
+{
+   //use a simple Levenberg-Marquardt non-linear optimization
+   //note : please limit the number of tie points
+   //
+   //INPUTS: requires Jacobian matrix (partial derivatives with regards to parameters)
+   //OUPUTS: will also compute parameter covariance matrix
+   //
+   //TBD: use targetVariance!
+ 
+   int np = getNumberOfAdjustableParameters();
+   int nobs = tieSet.size();
+
+   //setup initail values
+   int iter=0;
+   int iter_max = 200;
+   double minResidue = 1e-10; //TBC
+   double minDelta = 1e-10; //TBC
+
+   //build Least Squares initial normal equation
+   // don't waste memory, add samples one at a time
+   NEWMAT::SymmetricMatrix A;
+   NEWMAT::ColumnVector residue;
+   NEWMAT::ColumnVector projResidue;
+   double deltap_scale = 1e-4; //step_Scale is 1.0 because we expect parameters to be between -1 and 1
+   buildNormalEquation(tieSet, A, residue, projResidue, deltap_scale);
+   double ki2=residue.SumSquare();
+
+   //get current adjustment (between -1 and 1 normally) and convert to ColumnVector
+   ossimAdjustmentInfo cadj;
+   getAdjustment(cadj);
+   std::vector< ossimAdjustableParameterInfo >& parmlist = cadj.getParameterList();
+   NEWMAT::ColumnVector cparm(np), nparm(np);
+   for(int n=0;n<np;++n)
+   {
+      cparm(n+1) = parmlist[n].getParameter();
+   }
+
+   double damping_speed = 2.0;
+   //find max diag element for A
+   double maxdiag=0.0;
+   for(int d=1;d<=np;++d) {
+      if (maxdiag < A(d,d)) maxdiag=A(d,d);
+   }
+   double damping = 1e-3 * maxdiag;
+   double olddamping = 0.0;
+   bool found = false;
+
+   //DEBUG TBR
+   // cout<<"rms="<<sqrt(ki2/nobs)<<" ";
+   // cout.flush();
+
+   while ( (!found) && (iter < iter_max) ) //non linear optimization loop
+   {
+      bool decrease = false;
+
+      do
+      {
+         //add damping update to normal matrix
+         for(int d=1;d<=np;++d) A(d,d) += damping - olddamping;
+         olddamping = damping;
+
+         NEWMAT::ColumnVector deltap = solveLeastSquares(A, projResidue);
+
+         if (deltap.NormFrobenius() <= minDelta) 
+         {
+            found = true;
+         } else {
+            //update adjustment
+            nparm = cparm + deltap;
+            for(int n=0;n<np;++n)
+            {
+               setAdjustableParameter(n, nparm(n+1), false); //do not update now, wait
+            }
+            updateModel();
+
+            //check residue is reduced
+            NEWMAT::ColumnVector newresidue = getResidue(tieSet);
+            double newki2=newresidue.SumSquare();
+            double res_reduction = (ki2 - newki2) / (deltap.t()*(deltap*damping + projResidue)).AsScalar();
+ //DEBUG TBR
+       cout<<sqrt(newki2/nobs)<<" ";
+       cout.flush();
+
+            if (res_reduction > 0)
+            {
+               //accept new parms
+               cparm = nparm;
+               ki2=newki2;
+
+               deltap_scale = max(1e-15, deltap.NormInfinity()*1e-4);
+
+               buildNormalEquation(tieSet, A, residue, projResidue, deltap_scale);
+               olddamping = 0.0;
+
+               found = ( projResidue.NormInfinity() <= minResidue );
+               //update damping factor
+               damping *= std::max( 1.0/3.0, 1.0-std::pow((2.0*res_reduction-1.0),3));
+               damping_speed = 2.0;
+               decrease = true;
+            } else {
+               //cancel parameter update
+               for(int n=0;n<np;++n)
+               {
+                  setAdjustableParameter(n, nparm(n+1), false); //do not update right now
+               }
+               updateModel();
+
+               damping *= damping_speed;
+               damping_speed *= 2.0;
+            }
+         }
+      } while (!decrease && !found);
+      ++iter;
+   }
+
+//DEBUG TBR
+cout<<endl;
+
+   //compute parameter correlation
+   // use normal matrix inverse
+   //TBD
+
+   return ki2/nobs;
+}
+
+void
+ossimSensorModel::buildNormalEquation(const ossimTieGptSet& tieSet,
+                                      NEWMAT::SymmetricMatrix& A,
+                                      NEWMAT::ColumnVector& residue,
+                                      NEWMAT::ColumnVector& projResidue,
+                                      double pstep_scale)
+{
+   //goal:       build Least Squares system
+   //constraint: never store full Jacobian matrix in memory (can be huge)
+   //            so we build the matrices incrementally
+   // the system can be built using forward() or inverse() depending on the projection capabilities : useForward()
+   //
+   //TBD : add covariance matrix for each tie point
+
+   //init
+   int np = getNumberOfAdjustableParameters();
+   int dimObs;
+   bool useImageObs = useForward(); //caching
+   if (useImageObs)
+   {
+      dimObs = 2; //image observation
+   } else {
+      dimObs = 3; //ground observations
+   }
+   int no = dimObs * tieSet.size(); //number of observations
+
+   A.ReSize(np);
+   residue.ReSize(no);
+   projResidue.ReSize(np);
+   //Zeroify matrices that will be accumulated
+   A           = 0.0;
+   projResidue = 0.0;
+
+   const vector<ossimRefPtr<ossimTieGpt> >& theTPV = tieSet.getTiePoints();
+   vector<ossimRefPtr<ossimTieGpt> >::const_iterator tit;
+   unsigned long c=1;
+
+   if (useImageObs)
+   { 
+     //image observations 
+      std::vector<ossimDpt> imDerp(np);
+     ossimDpt resIm;
+     // loop on tie points
+      for (tit = theTPV.begin() ; tit != theTPV.end() ; ++tit)
+      {
+         //compute residue
+         resIm = (*tit)->tie - forward(*(*tit));
+         residue(c++) = resIm.x;
+         residue(c++) = resIm.y;
+
+         //compute all image derivatives regarding parametres for the tie point position
+         for(int p=0;p<np;++p)
+         {
+            imDerp[p] = getForwardDeriv( p , *(*tit) , pstep_scale);
+         }
+
+         //compute influence of tie point on all sytem elements
+         for(int p1=0;p1<np;++p1)
+         {        
+            //proj residue: J * residue
+            projResidue.element(p1) += imDerp[p1].x * resIm.x + imDerp[p1].y * resIm.y;
+
+            //normal matrix A = transpose(J)*J
+            for(int p2=p1;p2<np;++p2)
+            {
+               A.element(p1,p2) += imDerp[p1].x * imDerp[p2].x + imDerp[p1].y * imDerp[p2].y;
+            }
+         }
+      }
+   }
+   else
+   {
+      // ground observations
+      std::vector<ossimGpt>  gdDerp(np);
+      ossimGpt gd, resGd;
+      // loop on tie points
+      for (tit = theTPV.begin() ; tit != theTPV.end() ; ++tit)
+      {
+         //compute residue
+         gd = inverse((*tit)->tie);
+         residue(c++) = resGd.lon = ((*tit)->lon - gd.lon) * 100000.0;
+         residue(c++) = resGd.lat = ((*tit)->lat - gd.lat) * 100000.0 * cos(gd.lat / 180.0 * M_PI);
+         residue(c++) = resGd.hgt = (*tit)->hgt - gd.hgt; //TBD : normalize to meters?
+
+         //compute all image derivatives regarding parametres for the tie point position
+         for(int p=0;p<np;++p)
+         {
+            gdDerp[p] = getInverseDeriv( p , (*tit)->tie, pstep_scale);
+         }
+
+         //compute influence of tie point on all sytem elements
+         for(int p1=0;p1<np;++p1)
+         {        
+            //proj residue: J * residue
+            projResidue.element(p1) += gdDerp[p1].lon * resGd.lon + gdDerp[p1].lat * resGd.lat + gdDerp[p1].hgt * resGd.hgt; //TBC
+
+            //normal matrix A = transpose(J)*J
+            for(int p2=p1;p2<np;++p2)
+            {
+               A.element(p1,p2) += gdDerp[p1].lon * gdDerp[p2].lon + gdDerp[p1].lat * gdDerp[p2].lat + gdDerp[p1].hgt * gdDerp[p2].hgt;
+            }
+         }
+      }
+
+   } //end of if (useImageObs)
+}
+
+//give inverse() partial derivative regarding parameter parmIdx (>=0)
+ossimGpt
+ossimSensorModel::getInverseDeriv(int parmIdx, const ossimDpt& ipos, double hdelta)
+{   
+   double den = 0.5/hdelta;
+   ossimGpt res,gd;
+
+   double middle = getAdjustableParameter(parmIdx);
+   //set parm to high value
+   setAdjustableParameter(parmIdx, middle + hdelta, true);
+   res = inverse(ipos);
+   //set parm to low value and gte difference
+   setAdjustableParameter(parmIdx, middle - hdelta, true);
+   gd = inverse(ipos);
+
+   //reset parm
+   setAdjustableParameter(parmIdx, middle, true);
+
+   res.lon = den*(res.lon - gd.lon) * 100000.0; //TBC : approx meters
+   res.lat = den*(res.lat - gd.lat) * 100000.0 * cos(gd.lat / 180.0 * M_PI);
+   res.hgt = den*(res.hgt - gd.hgt);
+
+   return res;
+}
+
+//give forward() partial derivative regarding parameter parmIdx (>=0)
+ossimDpt
+ossimSensorModel::getForwardDeriv(int parmIdx, const ossimGpt& gpos, double hdelta)
+{   
+   static double den = 0.5/hdelta;
+   ossimDpt res;
+
+   double middle = getAdjustableParameter(parmIdx);
+   //set parm to high value
+   setAdjustableParameter(parmIdx, middle + hdelta, true);
+   res = inverse(gpos);
+   //set parm to low value and gte difference
+   setAdjustableParameter(parmIdx, middle - hdelta, true);
+   res -= inverse(gpos);
+   //get partial derivative
+   res = res*den;
+
+   //reset parm
+   setAdjustableParameter(parmIdx, middle, true);
+
+   return res;
+}
+
+NEWMAT::ColumnVector
+ossimSensorModel::getResidue(const ossimTieGptSet& tieSet)
+{
+   //init
+   NEWMAT::ColumnVector residue;
+   int dimObs;
+
+   bool useImageObs = useForward(); //caching
+   if (useImageObs)
+   {
+      dimObs = 2; //image observation
+   } else {
+      dimObs = 3; //ground observations
+   }
+   int no = dimObs * tieSet.size(); //number of observations
+
+   residue.ReSize(no);
+
+   const vector<ossimRefPtr<ossimTieGpt> >& theTPV = tieSet.getTiePoints();
+   vector<ossimRefPtr<ossimTieGpt> >::const_iterator tit;
+   unsigned long c=1;
+
+   if (useImageObs)
+   { 
+     //image observations 
+     ossimDpt resIm;
+     // loop on tie points
+      for (tit = theTPV.begin() ; tit != theTPV.end() ; ++tit)
+      {
+         //compute residue
+         resIm = (*tit)->tie - forward(**tit);
+         residue(c++) = resIm.x;
+         residue(c++) = resIm.y;
+      }
+   } else {
+      // ground observations
+      ossimGpt gd;
+      // loop on tie points
+      for (tit = theTPV.begin() ; tit != theTPV.end() ; ++tit)
+      {
+         //compute residue
+         gd = inverse((*tit)->tie);
+         residue(c++) = ((*tit)->lon - gd.lon) * 100000.0; //approx meters //TBC TBD
+         residue(c++) = ((*tit)->lat - gd.lat) * 100000.0 * cos(gd.lat / 180.0 * M_PI);
+         residue(c++) = (*tit)->hgt - gd.hgt; //meters
+      }
+   } //end of if (useImageObs)
+
+   return residue;
+}
+
+/*!
+ * solves Ax = r , with A symmetric positive definite
+ * A can be rank deficient
+ * size of A is typically between 10 and 100 rows
+ */
+NEWMAT::ColumnVector 
+ossimSensorModel::solveLeastSquares(NEWMAT::SymmetricMatrix& A,  NEWMAT::ColumnVector& r)const
+{
+   NEWMAT::ColumnVector x = invert(A)*r;
+   return x;
+}
+
+/** 
+ * stable invert stolen from ossimRpcSolver
+ */
+NEWMAT::Matrix 
+ossimSensorModel::invert(const NEWMAT::Matrix& m)const
+{
+   ossim_uint32 idx = 0;
+   NEWMAT::DiagonalMatrix d;
+   NEWMAT::Matrix u;
+   NEWMAT::Matrix v;
+
+   // decompose m.t*m which is stored in Temp into the singular values and vectors.
+   //
+   NEWMAT::SVD(m, d, u, v, true, true);
+   
+   // invert the diagonal
+   // this is just doing the reciprical fo all diagonal components and store back int
+   // d.  ths compute d inverse.
+   //
+   for(idx=0; idx < (ossim_uint32)d.Ncols(); ++idx)
+   {
+      if(d[idx] > 1e-14) //TBC : use DBL_EPSILON ?
+      {
+         d[idx] = 1.0/d[idx];
+      }
+      else
+      {
+         d[idx] = 0.0;
+
+//DEBUG TBR
+cout<<"warning: singular matrix in SVD"<<endl;
+
+      }
+   }
+
+   //compute inverse of decomposed m;
+   return v*d*u.t();
+}
+
diff --git a/ossim/src/ossim/projection/ossimSensorModelFactory.cpp b/ossim/src/ossim/projection/ossimSensorModelFactory.cpp
new file mode 100644
index 0000000..eab4d58
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimSensorModelFactory.cpp
@@ -0,0 +1,705 @@
+//*****************************************************************************
+// FILE: ossimSensorModelFactory.cc
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// AUTHOR:  Oscar Kramer
+//
+// DESCRIPTION:
+//   Contains implementation of class ossimSensorModelFactory
+//
+//*****************************************************************************
+//  $Id: ossimSensorModelFactory.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <fstream>
+#include <algorithm>
+#include <ossim/projection/ossimSensorModelFactory.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimDirectory.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotifyContext.h>
+
+//***
+// Define Trace flags for use within this file:
+//***
+#include <ossim/base/ossimTrace.h>
+static ossimTrace traceExec  = ossimTrace("ossimSensorModelFactory:exec");
+static ossimTrace traceDebug = ossimTrace("ossimSensorModelFactory:debug");
+
+//***
+// Note to programmer: To add a new model, search this file for "ADD_MODEL"
+// to locate places requiring editing. Functional example below...
+//
+// ADD_MODEL: Include all sensor model headers here:
+//***
+#include <ossim/projection/ossimCoarseGridModel.h>
+#include <ossim/projection/ossimRpcModel.h>
+#include <ossim/projection/ossimRpcProjection.h>
+#include <ossim/projection/ossimIkonosRpcModel.h>
+#include <ossim/projection/ossimNitfRpcModel.h>
+#include <ossim/projection/ossimQuickbirdRpcModel.h>
+#include <ossim/projection/ossimLandSatModel.h>
+#include <ossim/projection/ossimSpot5Model.h>
+#include <ossim/projection/ossimBuckeyeSensor.h>
+#include <ossim/projection/ossimSarModel.h>
+#include <ossim/projection/ossimRS1SarModel.h>
+#include <ossim/support_data/ossimSpotDimapSupportData.h>
+#include <ossim/projection/ossimNitfMapModel.h>
+#include <ossim/projection/ossimFcsiModel.h>
+#include <ossim/projection/ossimApplanixUtmModel.h>
+#include <ossim/projection/ossimApplanixEcefModel.h>
+#include <ossim/projection/ossimSkyBoxLearSensor.h>
+#include <ossim/projection/ossimIpodSensor.h>
+#include <ossim/projection/ossimPpjFrameSensor.h>
+#include <ossim/projection/ossimAlphaSensorHRI.h>
+#include <ossim/projection/ossimAlphaSensorHSI.h>
+#include <ossim/projection/ossimNitfRsmModel.h>
+#include <ossim/support_data/ossimFfL7.h>
+#include <ossim/support_data/ossimFfL5.h>
+#include <ossim/support_data/ossimPpjFrameSensorFile.h>
+#include <ossim/support_data/ossimAlphaSensorSupportData.h>
+
+//***
+// ADD_MODEL: List names of all sensor models produced by this factory:
+//***
+//const char* MY_NEW_MODEL = "myNewModel";
+// const char* OCG_MODEL        = "ossimCoarseGridModel";
+// const char* RPC_MODEL        = "ossimRpcModel";
+// const char* IKONOS_RPC_MODEL = "ossimIkonosRpcModel";
+// const char* NITF_RPC_MODEL   = "ossimNitfRpcModel";
+// const char* LANDSAT_MODEL    = "ossimLandSatModel";
+// const char* NITF_MAP_MODEL   = "ossimNitfMapModel";
+// const char* FCSI_MODEL       = "ossimFcsiModel";
+// const char* EMERGE_FCSI_MODEL= "ossimEmergeFcsiModel";
+
+//*****************************************************************************
+//  STATIC METHOD: ossimSensorModelFactory::instance()
+//*****************************************************************************
+ossimSensorModelFactory*  ossimSensorModelFactory::instance()
+{
+   static ossimSensorModelFactory inst;
+   return &inst;
+}
+
+//*****************************************************************************
+//  METHOD: ossimSensorModelFactory::create(kwl, prefix)
+//*****************************************************************************
+ossimProjection* ossimSensorModelFactory::createProjection(const ossimKeywordlist &keywordList,
+                                                           const char *prefix) const
+{
+   ossimRefPtr<ossimProjection> result;
+
+   //
+   // Permit specification of geometry file name in lieu of type:
+   //
+   const char*  value = keywordList.find(prefix, ossimKeywordNames::GEOM_FILE_KW);
+   if (value)
+   {
+      result = createProjection(ossimFilename(value), 0);
+   }
+   //
+   // Search for occurence of "type" keyword:
+   //
+   else
+   {
+      value = keywordList.find(prefix, ossimKeywordNames::TYPE_KW);
+      if(value)
+      {
+         result = createProjection(ossimString(value));
+         if(result.valid())
+         {
+            if(!result->loadState(keywordList, prefix))
+            {
+               result = 0;
+            }
+        }
+      }
+   }
+   
+   return result.release();
+}
+
+//*****************************************************************************
+//  METHOD: 
+//  
+//*****************************************************************************
+ossimProjection*
+ossimSensorModelFactory::createProjection(const ossimString &name) const
+{
+   //***
+   // Name should represent the model type:
+   //***
+   if(name == STATIC_TYPE_NAME(ossimSkyBoxLearSensor))
+   {
+      return new ossimSkyBoxLearSensor;
+   }
+   if(name == STATIC_TYPE_NAME(ossimIpodSensor))
+   {
+      return new ossimIpodSensor;
+   }
+   if(name == STATIC_TYPE_NAME(ossimCoarseGridModel))
+   {
+      return new ossimCoarseGridModel;
+   }
+   if(name == STATIC_TYPE_NAME(ossimBuckeyeSensor))
+   {
+      return new ossimBuckeyeSensor;
+   }
+   
+   if (name ==  STATIC_TYPE_NAME(ossimRpcModel))
+   {
+      return new ossimRpcModel;
+   }
+
+   if(name == STATIC_TYPE_NAME(ossimLandSatModel))
+   {
+      return new ossimLandSatModel;
+   }
+
+   if(name == STATIC_TYPE_NAME(ossimNitfMapModel))
+   {
+      return new ossimNitfMapModel;
+   }
+
+   if(name == STATIC_TYPE_NAME(ossimQuickbirdRpcModel))
+   {
+      return new ossimQuickbirdRpcModel;
+   }
+   
+   if(name == STATIC_TYPE_NAME(ossimIkonosRpcModel))
+   {
+     return new ossimIkonosRpcModel;
+   }
+
+   if(name == STATIC_TYPE_NAME(ossimNitfRpcModel))
+   {
+      return new ossimNitfRpcModel;
+   }
+   if(name == STATIC_TYPE_NAME(ossimRpcProjection))
+   {
+      return new ossimRpcProjection;
+   }
+   if(name == STATIC_TYPE_NAME(ossimFcsiModel))
+   {
+      return new ossimFcsiModel;
+   }
+   if(name == STATIC_TYPE_NAME(ossimApplanixUtmModel))
+   {
+      return new ossimApplanixUtmModel;
+   }
+   if(name == STATIC_TYPE_NAME(ossimApplanixEcefModel))
+   {
+      return new ossimApplanixEcefModel;
+   }
+   if(name == STATIC_TYPE_NAME(ossimSpot5Model))
+   {
+      return new ossimSpot5Model;
+   }
+   if(name == STATIC_TYPE_NAME(ossimSarModel))
+   {
+      return new ossimSarModel;
+   }
+   if(name == STATIC_TYPE_NAME(ossimRS1SarModel))
+   {
+      return new ossimRS1SarModel;
+   }
+   if(name == STATIC_TYPE_NAME(ossimPpjFrameSensor))
+   {
+      return new ossimPpjFrameSensor;
+   }
+   if(name == STATIC_TYPE_NAME(ossimAlphaSensorHRI))
+   {
+      return new ossimAlphaSensorHRI;
+   }
+   if(name == STATIC_TYPE_NAME(ossimAlphaSensorHSI))
+   {
+      return new ossimAlphaSensorHSI;
+   }
+   if(name == STATIC_TYPE_NAME(ossimNitfRsmModel))
+   {
+      return new ossimNitfRsmModel();
+   }
+
+   //***
+   // ADD_MODEL: (Please leave this comment for the next programmer)
+   //***
+//   if(name == MY_NEW_MODEL)
+//      return new myNewModel;
+
+   return NULL;
+}
+
+//*****************************************************************************
+//  METHOD
+//*****************************************************************************
+ossimObject*
+ossimSensorModelFactory::createObject(const ossimString& typeName)const
+{
+   return createProjection(typeName);
+}
+
+//*****************************************************************************
+//  METHOD
+//*****************************************************************************
+ossimObject*
+ossimSensorModelFactory::createObject(const ossimKeywordlist& kwl,
+                                      const char* prefix)const
+{
+   return createProjection(kwl, prefix);
+}
+   
+//*****************************************************************************
+//  METHOD
+//*****************************************************************************
+void
+ossimSensorModelFactory::getTypeNameList(std::vector<ossimString>& typeList)
+   const
+{
+   typeList.push_back(STATIC_TYPE_NAME(ossimApplanixEcefModel));
+   typeList.push_back(STATIC_TYPE_NAME(ossimApplanixUtmModel));
+   typeList.push_back(STATIC_TYPE_NAME(ossimCoarseGridModel));
+   typeList.push_back(STATIC_TYPE_NAME(ossimRpcModel));
+   typeList.push_back(STATIC_TYPE_NAME(ossimIkonosRpcModel));
+   typeList.push_back(STATIC_TYPE_NAME(ossimQuickbirdRpcModel));
+   typeList.push_back(STATIC_TYPE_NAME(ossimNitfRpcModel));
+   typeList.push_back(STATIC_TYPE_NAME(ossimLandSatModel));
+   typeList.push_back(STATIC_TYPE_NAME(ossimNitfMapModel));
+   typeList.push_back(STATIC_TYPE_NAME(ossimFcsiModel));
+   typeList.push_back(STATIC_TYPE_NAME(ossimSpot5Model));
+   typeList.push_back(STATIC_TYPE_NAME(ossimSarModel));
+   typeList.push_back(STATIC_TYPE_NAME(ossimRS1SarModel));
+   typeList.push_back(STATIC_TYPE_NAME(ossimBuckeyeSensor));
+   typeList.push_back(STATIC_TYPE_NAME(ossimSkyBoxLearSensor));
+   typeList.push_back(STATIC_TYPE_NAME(ossimIpodSensor));
+   typeList.push_back(STATIC_TYPE_NAME(ossimPpjFrameSensor));
+   typeList.push_back(STATIC_TYPE_NAME(ossimAlphaSensorHRI));
+   typeList.push_back(STATIC_TYPE_NAME(ossimAlphaSensorHSI));
+   typeList.push_back(STATIC_TYPE_NAME(ossimNitfRsmModel));
+   //***
+   // ADD_MODEL: Please leave this comment for the next programmer. Add above.
+   //***
+   //typeList.push_back(ossimString(MY_NEW_MODEL));
+   
+}
+
+ossimProjection* ossimSensorModelFactory::createProjection(
+   const ossimFilename& filename, ossim_uint32  entryIdx) const
+{
+   if(!filename.exists()) return 0;
+   static const char MODULE[] = "ossimSensorModelFactory::createProjection";
+   
+   ossimKeywordlist kwl;
+   ossimRefPtr<ossimProjection> model = 0;
+
+   ossimFilename geomFile = filename;
+   geomFile = geomFile.setExtension("geom");
+   
+   if(geomFile.exists()&&
+      kwl.addFile(filename.c_str()))
+   {
+      ossimFilename coarseGrid;
+      
+      const char* type = kwl.find(ossimKeywordNames::TYPE_KW);
+      if(type)
+      {
+         if(ossimString(type) ==
+            ossimString(STATIC_TYPE_NAME(ossimCoarseGridModel)))
+         {
+            findCoarseGrid(coarseGrid, filename);
+            
+            if(coarseGrid.exists() &&(coarseGrid != ""))
+            {
+               kwl.add("grid_file_name",
+                       coarseGrid.c_str(),
+                       true);
+               model = new ossimCoarseGridModel(kwl);
+               if(!model->getErrorStatus())
+               {
+                  return model.release();
+               }
+               model = 0;
+            }
+         }
+      }
+      kwl.clear();
+   }
+
+   // See if there is an external geomtry.
+   ossimRefPtr<ossimProjection> proj =
+      createProjectionFromGeometryFile(filename, entryIdx);
+   if (proj.valid())
+   {
+      return proj.release();
+   }
+
+   if(model.valid())
+   {
+      model = 0;
+   }
+   
+   // first check for override
+   //
+   if(geomFile.exists()&&kwl.addFile(geomFile.c_str()))
+   {
+      model =  createProjection(kwl);
+      if(model.valid())
+      {
+         return model.release();
+      }
+      model = 0;
+   }
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " DEBUG: Testing ossimCoarsGridModel" << std::endl;
+   }
+   
+   ifstream input(geomFile.c_str());
+   char ecgTest[4];
+   input.read((char*)ecgTest, 3);
+   ecgTest[3] = '\0';
+   input.close();
+   if(ossimString(ecgTest) == "eCG")
+   {
+      ossimKeywordlist kwlTemp;
+      kwlTemp.add("type",
+                  "ossimCoarseGridModel",
+                  true);
+      kwlTemp.add("geom_file",
+                  geomFile.c_str(),
+                  true);
+      return createProjection(kwlTemp);
+   }
+   
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " DEBUG: testing ossimRpcModel" << std::endl;
+   }
+
+   //---
+   // Test for quick bird rpc.  Could be either a tiff or nitf so not wrapped
+   // around "isNitf()" anymore.
+   //---
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " DEBUG: testing ossimQuickbirdRpcModel"
+         << std::endl;
+   }
+   
+   ossimRefPtr<ossimQuickbirdRpcModel> qbModel = new ossimQuickbirdRpcModel;
+   if(qbModel->parseFile(filename))
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << " DEBUG: returning ossimQuickbirdRpcModel"
+            << std::endl;
+      }
+      model = qbModel.get();
+      qbModel = 0;
+      return model.release();
+   }
+   else
+   {
+      qbModel = 0;
+   }
+   
+   //---
+   // Test for ikonos rpc.  Could be tiff or nitf which is handled in
+   // parseFile method.
+   //---
+   ossimRefPtr<ossimIkonosRpcModel> ikModel = new ossimIkonosRpcModel;
+   if(ikModel->parseFile(filename))
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << " DEBUG returning ossimQuickbirdRpcModel"
+            << std::endl;
+      }
+      model = ikModel.get();
+      ikModel = 0;
+      return model.release();
+   }
+   else
+   {
+      ikModel = 0;
+   }
+   if(isNitf(filename))
+   {
+     if(traceDebug())
+     {
+        ossimNotify(ossimNotifyLevel_DEBUG)
+           << MODULE << " DEBUG: testing ossimNitfRsmModel" << std::endl;
+     }
+     ossimRefPtr<ossimNitfRsmModel> rsmModel = new ossimNitfRsmModel();
+
+     if(rsmModel->parseFile(filename, entryIdx))
+     {
+         model = rsmModel.get();
+         rsmModel = 0;
+         return model.release();
+     }
+     else
+     {
+         rsmModel = 0;
+     }
+     if(traceDebug())
+     {
+        ossimNotify(ossimNotifyLevel_DEBUG)
+           << MODULE << " DEBUG: testing ossimNitfRsmModel" << std::endl;
+     }
+     ossimRefPtr<ossimNitfRpcModel> rpcModel = new ossimNitfRpcModel();
+     if ( rpcModel->parseFile(filename, entryIdx) ) // filename = NITF_file
+     {
+        model = rpcModel.get();
+        rpcModel = 0;
+        return model.release();
+     }
+     else
+     {
+        rpcModel = 0;
+     }
+     
+     if(traceDebug())
+     {
+        ossimNotify(ossimNotifyLevel_DEBUG)
+           << MODULE << " DEBUG: testing ossimIkinosRpcModel" << std::endl;
+     }
+     
+     model = new ossimNitfMapModel(filename); // filename = NITF_file
+     if(!model->getErrorStatus())
+     {
+        return model.release();
+     }
+     model = 0;
+   }
+   else if(isLandsat(filename))
+   {
+      model = new ossimLandSatModel(filename);
+      if(!model->getErrorStatus())
+      {
+         return model.release();
+      }
+      model = 0;
+   }
+   
+   model = new ossimRS1SarModel(filename);
+   if(model->getErrorStatus()!= ossimErrorCodes::OSSIM_OK)
+   {
+      return model.release();
+   }
+   model = 0;
+
+   // SPOT:
+   ossimFilename spot5Test = geomFile;
+   if(!spot5Test.exists())
+   {
+      spot5Test = geomFile.path();
+      spot5Test = spot5Test.dirCat(ossimFilename("METADATA.DIM"));
+      if (spot5Test.exists() == false)
+      {
+         spot5Test = geomFile.path();
+         spot5Test = spot5Test.dirCat(ossimFilename("metadata.dim"));
+      }
+   }
+   if(spot5Test.exists())
+   {
+      //---
+      // Check the basename of the input file. So we don't create a projection
+      // for ancillary files, icon.jpg amd preview.jpg.
+      //---
+      ossimFilename baseName = filename.file();
+      baseName.downcase();
+
+      if ( (baseName != "icon.jpg" ) && ( baseName != "preview.jpg" ) )
+      {
+         ossimRefPtr<ossimSpotDimapSupportData> meta =
+            new ossimSpotDimapSupportData;
+         if(meta->loadXmlFile(spot5Test))
+         {
+            model = new ossimSpot5Model(meta.get());
+            if(!model->getErrorStatus())
+            {
+               return model.release();
+            }
+         }
+      }
+   }
+   model = 0;
+            
+   ossimFilename ppjFilename = filename;
+   ppjFilename = ppjFilename.setExtension("ppj");
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " DEBUG: testing ossimPpjFrameSensor" << std::endl;
+   }
+   if(ppjFilename.exists())
+   {
+      ossimRefPtr<ossimPpjFrameSensorFile> ppjFile = new ossimPpjFrameSensorFile();
+
+      if(ppjFile->readFile(ppjFilename))
+      {
+         ossimRefPtr<ossimPpjFrameSensor> sensor = new ossimPpjFrameSensor();
+         ossimDpt imageSize = ppjFile->getImageSize();
+         sensor->setFocalLength(ppjFile->getIntrinsic()[0][0], ppjFile->getIntrinsic()[1][1]);
+         sensor->setPrincipalPoint(ppjFile->getPrincipalPoint());
+         sensor->setecef2CamMatrix(ppjFile->getExtrinsic().SymSubMatrix(1,3));
+         sensor->setCameraPosition(ppjFile->getPlatformPosition());
+         sensor->setImageSize(imageSize);
+         sensor->setImageRect(ossimDrect(0,0,imageSize.x-1, imageSize.y-1));
+         sensor->setRefImgPt(ossimDpt(imageSize.x*.5, imageSize.y*.5));
+         sensor->setAveragePrjectedHeight(ppjFile->getAverageProjectedHeight());
+         sensor->updateModel();
+         return sensor.release();         
+      }
+      ppjFile = 0;
+   }
+   
+   ossimFilename hdrFilename = filename;
+   hdrFilename = hdrFilename.setExtension("hdr"); // image.hdr
+   if ( !hdrFilename.exists() )   
+   {     
+      hdrFilename = filename;
+      hdrFilename.string() += ".hdr"; // image.ras.hdr
+   }
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " DEBUG: testing ossimAlphaSensor\nheader file: " << hdrFilename << std::endl;
+   }
+   if(hdrFilename.exists())
+   {
+      ossimRefPtr<ossimAlphaSensorSupportData> supData = new ossimAlphaSensorSupportData();
+      if(supData->readSupportFiles(hdrFilename))
+      {
+         if (supData->isHSI())
+         {
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << MODULE << " DEBUG: loading ossimAlphaSensorHSI" << std::endl;
+            }
+            ossimRefPtr<ossimAlphaSensorHSI> sensor = new ossimAlphaSensorHSI();
+            if ( sensor->initialize( *(supData.get()) ) )
+            {
+               return (ossimProjection*)sensor.release();
+            }
+         }
+         else
+         {
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << MODULE << " DEBUG: loading ossimAlphaSensorHRI" << std::endl;
+            }
+            ossimRefPtr<ossimAlphaSensorHRI> sensor = new ossimAlphaSensorHRI();
+            if ( sensor->initialize( *(supData.get()) ) )
+            {
+               return (ossimProjection*)sensor.release();
+            }
+         }
+      }
+      supData = 0;
+   }
+
+   model = new ossimCoarseGridModel(geomFile);
+   if(model.valid())
+   {
+      if(!model->getErrorStatus())
+      {
+         return model.release();
+      }
+      model = 0;
+   }
+
+   return model.release();
+}
+   
+bool ossimSensorModelFactory::isNitf(const ossimFilename& filename)const
+{
+   std::ifstream in(filename.c_str(), ios::in|ios::binary);
+   
+   if(in)
+   {
+      char nitfFile[4];
+      in.read((char*)nitfFile, 4);
+
+      return (ossimString(nitfFile,
+                          nitfFile+4) == "NITF");
+   }
+
+   return false;
+}
+
+bool ossimSensorModelFactory::isLandsat(const ossimFilename& filename)const
+{
+   ossimFilename temp(filename);
+   temp.downcase();
+   ossimRefPtr<ossimFfL7> ff_headerp;
+   if (temp.contains("header.dat"))
+   {
+       ff_headerp = new ossimFfL5(filename);
+   } 
+   else 
+   {
+       ff_headerp = new ossimFfL7(filename);
+   }
+   bool r = !(ff_headerp->getErrorStatus());
+   ff_headerp = 0;
+   return r;
+}
+
+void ossimSensorModelFactory::findCoarseGrid(ossimFilename& result,
+                                             const ossimFilename& geomFile)const
+{
+   result = geomFile;
+   result.setFile(result.fileNoExtension()+"_ocg");
+   result.setExtension("dat");
+   
+   if(!result.exists())
+   {
+      result = geomFile;
+      result.setExtension("dat");
+   }
+   
+   // let's find a .dat file in the current directory
+   //
+   if(!result.exists())
+   {
+      result = "";
+      ossimDirectory directoryList(geomFile.path());
+      ossimFilename file;
+      if(directoryList.getFirst(file,
+                                ossimDirectory::OSSIM_DIR_FILES))
+      {
+         ossimString testString = "OSSIM_DBL_GRID";
+         char tempBuf[14];
+         do
+         {
+            if(file.ext().downcase() == "dat")
+            {
+               std::ifstream in(file.c_str());
+               if(in)
+               {
+                  in.read((char*)tempBuf, 14);
+                  in.close();
+                  if(ossimString(tempBuf, tempBuf+14) == testString)
+                  {
+                     result = file;
+                  }
+               }
+               
+            }
+         }while((directoryList.getNext(file))&&(result == ""));
+      }
+      // try to find it
+   }
+}
+
+
diff --git a/src/ossim/projection/ossimSensorModelTuple.cpp b/ossim/src/ossim/projection/ossimSensorModelTuple.cpp
similarity index 100%
rename from src/ossim/projection/ossimSensorModelTuple.cpp
rename to ossim/src/ossim/projection/ossimSensorModelTuple.cpp
diff --git a/src/ossim/projection/ossimSinusoid.c b/ossim/src/ossim/projection/ossimSinusoid.c
similarity index 100%
rename from src/ossim/projection/ossimSinusoid.c
rename to ossim/src/ossim/projection/ossimSinusoid.c
diff --git a/src/ossim/projection/ossimSinusoidalProjection.cpp b/ossim/src/ossim/projection/ossimSinusoidalProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimSinusoidalProjection.cpp
rename to ossim/src/ossim/projection/ossimSinusoidalProjection.cpp
diff --git a/src/ossim/projection/ossimSkyBoxLearSensor.cpp b/ossim/src/ossim/projection/ossimSkyBoxLearSensor.cpp
similarity index 100%
rename from src/ossim/projection/ossimSkyBoxLearSensor.cpp
rename to ossim/src/ossim/projection/ossimSkyBoxLearSensor.cpp
diff --git a/src/ossim/projection/ossimSmacCallibrationSystem.cpp b/ossim/src/ossim/projection/ossimSmacCallibrationSystem.cpp
similarity index 100%
rename from src/ossim/projection/ossimSmacCallibrationSystem.cpp
rename to ossim/src/ossim/projection/ossimSmacCallibrationSystem.cpp
diff --git a/src/ossim/projection/ossimSonomaSensor.cpp b/ossim/src/ossim/projection/ossimSonomaSensor.cpp
similarity index 100%
rename from src/ossim/projection/ossimSonomaSensor.cpp
rename to ossim/src/ossim/projection/ossimSonomaSensor.cpp
diff --git a/src/ossim/projection/ossimSpaceObliqueMercatorProjection.cpp b/ossim/src/ossim/projection/ossimSpaceObliqueMercatorProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimSpaceObliqueMercatorProjection.cpp
rename to ossim/src/ossim/projection/ossimSpaceObliqueMercatorProjection.cpp
diff --git a/src/ossim/projection/ossimSpot5Model.cpp b/ossim/src/ossim/projection/ossimSpot5Model.cpp
similarity index 100%
rename from src/ossim/projection/ossimSpot5Model.cpp
rename to ossim/src/ossim/projection/ossimSpot5Model.cpp
diff --git a/src/ossim/projection/ossimStatePlaneProjectionInfo.cpp b/ossim/src/ossim/projection/ossimStatePlaneProjectionInfo.cpp
similarity index 100%
rename from src/ossim/projection/ossimStatePlaneProjectionInfo.cpp
rename to ossim/src/ossim/projection/ossimStatePlaneProjectionInfo.cpp
diff --git a/src/ossim/projection/ossimStereographicProjection.cpp b/ossim/src/ossim/projection/ossimStereographicProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimStereographicProjection.cpp
rename to ossim/src/ossim/projection/ossimStereographicProjection.cpp
diff --git a/src/ossim/projection/ossimTiffProjectionFactory.cpp b/ossim/src/ossim/projection/ossimTiffProjectionFactory.cpp
similarity index 100%
rename from src/ossim/projection/ossimTiffProjectionFactory.cpp
rename to ossim/src/ossim/projection/ossimTiffProjectionFactory.cpp
diff --git a/ossim/src/ossim/projection/ossimTranmerc.c b/ossim/src/ossim/projection/ossimTranmerc.c
new file mode 100644
index 0000000..d6d18bd
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimTranmerc.c
@@ -0,0 +1,625 @@
+/***************************************************************************/
+/* RSC IDENTIFIER: TRANSVERSE MERCATOR
+ *
+ * ABSTRACT
+ *
+ *    This component provides conversions between Geodetic coordinates 
+ *    (latitude and longitude) and Transverse Mercator projection coordinates
+ *    (easting and northing).
+ *
+ * ERROR HANDLING
+ *
+ *    This component checks parameters for valid values.  If an invalid value
+ *    is found the error code is combined with the current error code using 
+ *    the bitwise or.  This combining allows multiple error codes to be
+ *    returned. The possible error codes are:
+ *
+ *       TRANMERC_NO_ERROR           : No errors occurred in function
+ *       TRANMERC_LAT_ERROR          : Latitude outside of valid range
+ *                                      (-90 to 90 degrees)
+ *       TRANMERC_LON_ERROR          : Longitude outside of valid range
+ *                                      (-180 to 360 degrees, and within
+ *                                        +/-90 of Central Meridian)
+ *       TRANMERC_EASTING_ERROR      : Easting outside of valid range
+ *                                      (depending on ellipsoid and
+ *                                       projection parameters)
+ *       TRANMERC_NORTHING_ERROR     : Northing outside of valid range
+ *                                      (depending on ellipsoid and
+ *                                       projection parameters)
+ *       TRANMERC_ORIGIN_LAT_ERROR   : Origin latitude outside of valid range
+ *                                      (-90 to 90 degrees)
+ *       TRANMERC_CENT_MER_ERROR     : Central meridian outside of valid range
+ *                                      (-180 to 360 degrees)
+ *       TRANMERC_A_ERROR            : Semi-major axis less than or equal to zero
+ *       TRANMERC_INV_F_ERROR        : Inverse flattening outside of valid range
+ *								  	                  (250 to 350)
+ *       TRANMERC_SCALE_FACTOR_ERROR : Scale factor outside of valid
+ *                                     range (0.3 to 3.0)
+ *		 TM_LON_WARNING              : Distortion will result if longitude is more
+ *                                       than 9 degrees from the Central Meridian
+ *
+ * REUSE NOTES
+ *
+ *    TRANSVERSE MERCATOR is intended for reuse by any application that 
+ *    performs a Transverse Mercator projection or its inverse.
+ *    
+ * REFERENCES
+ *
+ *    Further information on TRANSVERSE MERCATOR can be found in the 
+ *    Reuse Manual.
+ *
+ *    TRANSVERSE MERCATOR originated from :  
+ *                      U.S. Army Topographic Engineering Center
+ *                      Geospatial Information Division
+ *                      7701 Telegraph Road
+ *                      Alexandria, VA  22310-3864
+ *
+ * LICENSES
+ *
+ *    None apply to this component.
+ *
+ * RESTRICTIONS
+ *
+ *    TRANSVERSE MERCATOR has no restrictions.
+ *
+ * ENVIRONMENT
+ *
+ *    TRANSVERSE MERCATOR was tested and certified in the following 
+ *    environments:
+ *
+ *    1. Solaris 2.5 with GCC, version 2.8.1
+ *    2. Windows 95 with MS Visual C++, version 6
+ *
+ * MODIFICATIONS
+ *
+ *    Date              Description
+ *    ----              -----------
+ *    10-02-97          Original Code
+ *    03-02-97          Re-engineered Code
+ *
+ */
+
+
+/***************************************************************************/
+/*
+ *                               INCLUDES
+ */
+
+#include <stdio.h>
+#include <math.h>
+#include <ossim/projection/ossimTranmerc.h>
+#include <ossim/base/ossimConstants.h>
+
+/*
+ *    math.h      - Standard C math library
+ *    tranmerc.h  - Is for prototype error checking
+ */
+
+
+/****************************** DEFINES ************************************/
+
+#define MAX_LAT         ((M_PI * 90.0)/180.0)    /* 90 degrees in radians */
+#define MAX_DELTA_LONG  ((M_PI * 90.0)/180.0)    /* 90 degrees in radians */
+#define MIN_SCALE_FACTOR  0.3
+#define MAX_SCALE_FACTOR  3.0
+
+#define SPHTMD(Latitude) ((double) (TranMerc_ap * Latitude \
+      - TranMerc_bp * sin(2.e0 * Latitude) + TranMerc_cp * sin(4.e0 * Latitude) \
+      - TranMerc_dp * sin(6.e0 * Latitude) + TranMerc_ep * sin(8.e0 * Latitude) ) )
+
+#define SPHSN(Latitude) ((double) (TranMerc_a / sqrt( 1.e0 - TranMerc_es * \
+      pow(sin(Latitude), 2))))
+
+#define SPHSR(Latitude) ((double) (TranMerc_a * (1.e0 - TranMerc_es) / \
+    pow(DENOM(Latitude), 3)))
+
+#define DENOM(Latitude) ((double) (sqrt(1.e0 - TranMerc_es * pow(sin(Latitude),2))))
+
+
+/**************************************************************************/
+/*                               GLOBAL DECLARATIONS
+ *
+ */
+
+/* Ellipsoid Parameters, default to WGS 84  */
+static double TranMerc_a = 6378137.0;              /* Semi-major axis of ellipsoid i meters */
+static double TranMerc_f = 1 / 298.257223563;      /* Flattening of ellipsoid  */
+static double TranMerc_es = 0.0066943799901413800; /* Eccentricity (0.08181919084262188000) squared */
+static double TranMerc_ebs = 0.0067394967565869;   /* Second Eccentricity squared */
+
+/* Transverse_Mercator projection Parameters */
+static double TranMerc_Origin_Lat = 0.0;           /* Latitude of origin in radians */
+static double TranMerc_Origin_Long = 0.0;          /* Longitude of origin in radians */
+static double TranMerc_False_Northing = 0.0;       /* False northing in meters */
+static double TranMerc_False_Easting = 0.0;        /* False easting in meters */
+static double TranMerc_Scale_Factor = 1.0;         /* Scale factor  */
+
+/* Isometeric to geodetic latitude parameters, default to WGS 84 */
+static double TranMerc_ap = 6367449.1458008;
+static double TranMerc_bp = 16038.508696861;
+static double TranMerc_cp = 16.832613334334;
+static double TranMerc_dp = 0.021984404273757;
+static double TranMerc_ep = 3.1148371319283e-005;
+
+/* Maximum variance for easting and northing values for WGS 84. */
+static double TranMerc_Delta_Easting = 40000000.0;
+static double TranMerc_Delta_Northing = 40000000.0;
+
+/* These state variables are for optimization purposes. The only function
+ * that should modify them is Set_Tranverse_Mercator_Parameters.         */
+
+
+/************************************************************************/
+/*                              FUNCTIONS     
+ *
+ */
+
+
+long Set_Transverse_Mercator_Parameters(double a,
+                                        double f,
+                                        double Origin_Latitude,
+                                        double Central_Meridian,
+                                        double False_Easting,
+                                        double False_Northing,
+                                        double Scale_Factor)
+
+{ /* BEGIN Set_Tranverse_Mercator_Parameters */
+  /*
+   * The function Set_Tranverse_Mercator_Parameters receives the ellipsoid
+   * parameters and Tranverse Mercator projection parameters as inputs, and
+   * sets the corresponding state variables. If any errors occur, the error
+   * code(s) are returned by the function, otherwise TRANMERC_NO_ERROR is
+   * returned.
+   *
+   *    a                 : Semi-major axis of ellipsoid, in meters    (input)
+   *    f                 : Flattening of ellipsoid						         (input)
+   *    Origin_Latitude   : Latitude in radians at the origin of the   (input)
+   *                         projection
+   *    Central_Meridian  : Longitude in radians at the center of the  (input)
+   *                         projection
+   *    False_Easting     : Easting/X at the center of the projection  (input)
+   *    False_Northing    : Northing/Y at the center of the projection (input)
+   *    Scale_Factor      : Projection scale factor                    (input) 
+   */
+
+  double tn;        /* True Meridianal distance constant  */
+  double tn2;
+  double tn3;
+  double tn4;
+  double tn5;
+  double dummy_northing;
+  double TranMerc_b; /* Semi-minor axis of ellipsoid, in meters */
+/*  double inv_f = 1 / f; */
+  long Error_Code = TRANMERC_NO_ERROR;
+
+#if 0
+  if (a <= 0.0)
+  { /* Semi-major axis must be greater than zero */
+    Error_Code |= TRANMERC_A_ERROR;
+  }
+  if ((inv_f < 250) || (inv_f > 350))
+  { /* Inverse flattening must be between 250 and 350 */
+    Error_Code |= TRANMERC_INV_F_ERROR;
+  }
+  if ((Origin_Latitude < -MAX_LAT) || (Origin_Latitude > MAX_LAT))
+  { /* origin latitude out of range */
+    Error_Code |= TRANMERC_ORIGIN_LAT_ERROR;
+  }
+  if ((Central_Meridian < -M_PI) || (Central_Meridian > (TWO_PI)))
+  { /* origin longitude out of range */
+    Error_Code |= TRANMERC_CENT_MER_ERROR;
+  }
+  if ((Scale_Factor < MIN_SCALE_FACTOR) || (Scale_Factor > MAX_SCALE_FACTOR))
+  {
+    Error_Code |= TRANMERC_SCALE_FACTOR_ERROR;
+  }
+#endif
+  if (!Error_Code)
+  { /* no errors */
+    TranMerc_a = a;
+    TranMerc_f = f;
+    TranMerc_Origin_Lat = 0;
+    TranMerc_Origin_Long = 0;
+    TranMerc_False_Northing = 0;
+    TranMerc_False_Easting = 0; 
+    TranMerc_Scale_Factor = 1;
+
+    /* Eccentricity Squared */
+    TranMerc_es = 2 * TranMerc_f - TranMerc_f * TranMerc_f;
+    /* Second Eccentricity Squared */
+    TranMerc_ebs = (1 / (1 - TranMerc_es)) - 1;
+
+    TranMerc_b = TranMerc_a * (1 - TranMerc_f);    
+    /*True meridianal constants  */
+    tn = (TranMerc_a - TranMerc_b) / (TranMerc_a + TranMerc_b);
+    tn2 = tn * tn;
+    tn3 = tn2 * tn;
+    tn4 = tn3 * tn;
+    tn5 = tn4 * tn;
+
+    TranMerc_ap = TranMerc_a * (1.e0 - tn + 5.e0 * (tn2 - tn3)/4.e0
+                                + 81.e0 * (tn4 - tn5)/64.e0 );
+    TranMerc_bp = 3.e0 * TranMerc_a * (tn - tn2 + 7.e0 * (tn3 - tn4)
+                                       /8.e0 + 55.e0 * tn5/64.e0 )/2.e0;
+    TranMerc_cp = 15.e0 * TranMerc_a * (tn2 - tn3 + 3.e0 * (tn4 - tn5 )/4.e0) /16.0;
+    TranMerc_dp = 35.e0 * TranMerc_a * (tn3 - tn4 + 11.e0 * tn5 / 16.e0) / 48.e0;
+    TranMerc_ep = 315.e0 * TranMerc_a * (tn4 - tn5) / 512.e0;
+    Convert_Geodetic_To_Transverse_Mercator(MAX_LAT,
+                                            MAX_DELTA_LONG,
+                                            &TranMerc_Delta_Easting,
+                                            &TranMerc_Delta_Northing);
+    Convert_Geodetic_To_Transverse_Mercator(0,
+                                            MAX_DELTA_LONG,
+                                            &TranMerc_Delta_Easting,
+                                            &dummy_northing);
+    TranMerc_Origin_Lat = Origin_Latitude;
+    if (Central_Meridian > M_PI)
+      Central_Meridian -= (TWO_PI);
+    TranMerc_Origin_Long = Central_Meridian;
+    TranMerc_False_Northing = False_Northing;
+    TranMerc_False_Easting = False_Easting; 
+    TranMerc_Scale_Factor = Scale_Factor;
+  } /* END OF if(!Error_Code) */
+  
+  return (Error_Code);
+}  /* END of Set_Transverse_Mercator_Parameters  */
+
+
+void Get_Transverse_Mercator_Parameters(double *a,
+                                        double *f,
+                                        double *Origin_Latitude,
+                                        double *Central_Meridian,
+                                        double *False_Easting,
+                                        double *False_Northing,
+                                        double *Scale_Factor)
+
+{ /* BEGIN Get_Tranverse_Mercator_Parameters  */
+  /*
+   * The function Get_Transverse_Mercator_Parameters returns the current
+   * ellipsoid and Transverse Mercator projection parameters.
+   *
+   *    a                 : Semi-major axis of ellipsoid, in meters    (output)
+   *    f                 : Flattening of ellipsoid						         (output)
+   *    Origin_Latitude   : Latitude in radians at the origin of the   (output)
+   *                         projection
+   *    Central_Meridian  : Longitude in radians at the center of the  (output)
+   *                         projection
+   *    False_Easting     : Easting/X at the center of the projection  (output)
+   *    False_Northing    : Northing/Y at the center of the projection (output)
+   *    Scale_Factor      : Projection scale factor                    (output) 
+   */
+
+  *a = TranMerc_a;
+  *f = TranMerc_f;
+  *Origin_Latitude = TranMerc_Origin_Lat;
+  *Central_Meridian = TranMerc_Origin_Long;
+  *False_Easting = TranMerc_False_Easting;
+  *False_Northing = TranMerc_False_Northing;
+  *Scale_Factor = TranMerc_Scale_Factor;
+  return;
+} /* END OF Get_Tranverse_Mercator_Parameters */
+
+
+
+long Convert_Geodetic_To_Transverse_Mercator (double Latitude,
+                                              double Longitude,
+                                              double *Easting,
+                                              double *Northing)
+
+{      /* BEGIN Convert_Geodetic_To_Transverse_Mercator */
+
+  /*
+   * The function Convert_Geodetic_To_Transverse_Mercator converts geodetic
+   * (latitude and longitude) coordinates to Transverse Mercator projection
+   * (easting and northing) coordinates, according to the current ellipsoid
+   * and Transverse Mercator projection coordinates.  If any errors occur, the
+   * error code(s) are returned by the function, otherwise TRANMERC_NO_ERROR is
+   * returned.
+   *
+   *    Latitude      : Latitude in radians                         (input)
+   *    Longitude     : Longitude in radians                        (input)
+   *    Easting       : Easting/X in meters                         (output)
+   *    Northing      : Northing/Y in meters                        (output)
+   */
+
+  double c;       /* Cosine of latitude                          */
+  double c2;
+  double c3;
+  double c5;
+  double c7;
+  double dlam;    /* Delta longitude - Difference in Longitude       */
+  double eta;     /* constant - TranMerc_ebs *c *c                   */
+  double eta2;
+  double eta3;
+  double eta4;
+  double s;       /* Sine of latitude                        */
+  double sn;      /* Radius of curvature in the prime vertical       */
+  double t;       /* Tangent of latitude                             */
+  double tan2;
+  double tan3;
+  double tan4;
+  double tan5;
+  double tan6;
+  double t1;      /* Term in coordinate conversion formula - GP to Y */
+  double t2;      /* Term in coordinate conversion formula - GP to Y */
+  double t3;      /* Term in coordinate conversion formula - GP to Y */
+  double t4;      /* Term in coordinate conversion formula - GP to Y */
+  double t5;      /* Term in coordinate conversion formula - GP to Y */
+  double t6;      /* Term in coordinate conversion formula - GP to Y */
+  double t7;      /* Term in coordinate conversion formula - GP to Y */
+  double t8;      /* Term in coordinate conversion formula - GP to Y */
+  double t9;      /* Term in coordinate conversion formula - GP to Y */
+  double tmd;     /* True Meridional distance                        */
+  double tmdo;    /* True Meridional distance for latitude of origin */
+  long    Error_Code = TRANMERC_NO_ERROR;
+/*  double temp_Origin; */
+/*  double temp_Long; */
+#if 0
+  if ((Latitude < -MAX_LAT) || (Latitude > MAX_LAT))
+  {  /* Latitude out of range */
+    Error_Code|= TRANMERC_LAT_ERROR;
+  }
+  if (Longitude > M_PI)
+    Longitude -= (TWO_PI);
+  if ((Longitude < (TranMerc_Origin_Long - MAX_DELTA_LONG))
+      || (Longitude > (TranMerc_Origin_Long + MAX_DELTA_LONG)))
+  {
+    if (Longitude < 0)
+      temp_Long = Longitude + TWO_PI;
+    else
+      temp_Long = Longitude;
+    if (TranMerc_Origin_Long < 0)
+      temp_Origin = TranMerc_Origin_Long + TWO_PI;
+    else
+      temp_Origin = TranMerc_Origin_Long;
+    if ((temp_Long < (temp_Origin - MAX_DELTA_LONG))
+        || (temp_Long > (temp_Origin + MAX_DELTA_LONG)))
+      Error_Code|= TRANMERC_LON_ERROR;
+  }
+#endif
+
+  if (!Error_Code)
+  { /* no errors */
+
+    /* 
+     *  Delta Longitude
+     */
+    dlam = Longitude - TranMerc_Origin_Long;
+
+    if (fabs(dlam) > (9.0 * RAD_PER_DEG))
+    { /* Distortion will result if Longitude is more than 9 degrees from the Central Meridian */
+      Error_Code |= TRANMERC_LON_WARNING;
+    }
+
+    if (dlam > M_PI)
+      dlam -= (TWO_PI);
+    if (dlam < -M_PI)
+      dlam += (TWO_PI);
+    if (fabs(dlam) < 2.e-10)
+      dlam = 0.0;
+
+    s = sin(Latitude);
+    c = cos(Latitude);
+    c2 = c * c;
+    c3 = c2 * c;
+    c5 = c3 * c2;
+    c7 = c5 * c2;
+    t = tan (Latitude);
+    tan2 = t * t;
+    tan3 = tan2 * t;
+    tan4 = tan3 * t;
+    tan5 = tan4 * t;
+    tan6 = tan5 * t;
+    eta = TranMerc_ebs * c2;
+    eta2 = eta * eta;
+    eta3 = eta2 * eta;
+    eta4 = eta3 * eta;
+
+    /* radius of curvature in prime vertical */
+    sn = SPHSN(Latitude);
+
+    /* True Meridianal Distances */
+    tmd = SPHTMD(Latitude);
+
+    /*  Origin  */
+    tmdo = SPHTMD (TranMerc_Origin_Lat);
+
+    /* northing */
+    t1 = (tmd - tmdo) * TranMerc_Scale_Factor;
+    t2 = sn * s * c * TranMerc_Scale_Factor/ 2.e0;
+    t3 = sn * s * c3 * TranMerc_Scale_Factor * (5.e0 - tan2 + 9.e0 * eta 
+                                                + 4.e0 * eta2) /24.e0; 
+
+    t4 = sn * s * c5 * TranMerc_Scale_Factor * (61.e0 - 58.e0 * tan2
+                                                + tan4 + 270.e0 * eta - 330.e0 * tan2 * eta + 445.e0 * eta2
+                                                + 324.e0 * eta3 -680.e0 * tan2 * eta2 + 88.e0 * eta4 
+                                                -600.e0 * tan2 * eta3 - 192.e0 * tan2 * eta4) / 720.e0;
+
+    t5 = sn * s * c7 * TranMerc_Scale_Factor * (1385.e0 - 3111.e0 * 
+                                                tan2 + 543.e0 * tan4 - tan6) / 40320.e0;
+
+    *Northing = TranMerc_False_Northing + t1 + pow(dlam,2.e0) * t2
+                + pow(dlam,4.e0) * t3 + pow(dlam,6.e0) * t4
+                + pow(dlam,8.e0) * t5; 
+
+    /* Easting */
+    t6 = sn * c * TranMerc_Scale_Factor;
+    t7 = sn * c3 * TranMerc_Scale_Factor * (1.e0 - tan2 + eta ) /6.e0;
+    t8 = sn * c5 * TranMerc_Scale_Factor * (5.e0 - 18.e0 * tan2 + tan4
+                                            + 14.e0 * eta - 58.e0 * tan2 * eta + 13.e0 * eta2 + 4.e0 * eta3 
+                                            - 64.e0 * tan2 * eta2 - 24.e0 * tan2 * eta3 )/ 120.e0;
+    t9 = sn * c7 * TranMerc_Scale_Factor * ( 61.e0 - 479.e0 * tan2
+                                             + 179.e0 * tan4 - tan6 ) /5040.e0;
+
+    *Easting = TranMerc_False_Easting + dlam * t6 + pow(dlam,3.e0) * t7 
+               + pow(dlam,5.e0) * t8 + pow(dlam,7.e0) * t9;
+  }
+  return (Error_Code);
+} /* END OF Convert_Geodetic_To_Transverse_Mercator */
+
+
+long Convert_Transverse_Mercator_To_Geodetic (
+                                             double Easting,
+                                             double Northing,
+                                             double *Latitude,
+                                             double *Longitude)
+{      /* BEGIN Convert_Transverse_Mercator_To_Geodetic */
+
+  /*
+   * The function Convert_Transverse_Mercator_To_Geodetic converts Transverse
+   * Mercator projection (easting and northing) coordinates to geodetic
+   * (latitude and longitude) coordinates, according to the current ellipsoid
+   * and Transverse Mercator projection parameters.  If any errors occur, the
+   * error code(s) are returned by the function, otherwise TRANMERC_NO_ERROR is
+   * returned.
+   *
+   *    Easting       : Easting/X in meters                         (input)
+   *    Northing      : Northing/Y in meters                        (input)
+   *    Latitude      : Latitude in radians                         (output)
+   *    Longitude     : Longitude in radians                        (output)
+   */
+
+  double c;       /* Cosine of latitude                          */
+  double de;      /* Delta easting - Difference in Easting (Easting-Fe)    */
+  double dlam;    /* Delta longitude - Difference in Longitude       */
+  double eta;     /* constant - TranMerc_ebs *c *c                   */
+  double eta2;
+  double eta3;
+  double eta4;
+  double ftphi;   /* Footpoint latitude                              */
+  int    i;       /* Loop iterator                   */
+  // double s;       /* Sine of latitude                        */
+  double sn;      /* Radius of curvature in the prime vertical       */
+  double sr;      /* Radius of curvature in the meridian             */
+  double t;       /* Tangent of latitude                             */
+  double tan2;
+  double tan4;
+  double t10;     /* Term in coordinate conversion formula - GP to Y */
+  double t11;     /* Term in coordinate conversion formula - GP to Y */
+  double t12;     /* Term in coordinate conversion formula - GP to Y */
+  double t13;     /* Term in coordinate conversion formula - GP to Y */
+  double t14;     /* Term in coordinate conversion formula - GP to Y */
+  double t15;     /* Term in coordinate conversion formula - GP to Y */
+  double t16;     /* Term in coordinate conversion formula - GP to Y */
+  double t17;     /* Term in coordinate conversion formula - GP to Y */
+  double tmd;     /* True Meridional distance                        */
+  double tmdo;    /* True Meridional distance for latitude of origin */
+  long Error_Code = TRANMERC_NO_ERROR;
+
+#if 0
+  if ((Easting < (TranMerc_False_Easting - TranMerc_Delta_Easting))
+      ||(Easting > (TranMerc_False_Easting + TranMerc_Delta_Easting)))
+  { /* Easting out of range  */
+    Error_Code |= TRANMERC_EASTING_ERROR;
+  }
+  if ((Northing < (TranMerc_False_Northing - TranMerc_Delta_Northing))
+      || (Northing > (TranMerc_False_Northing + TranMerc_Delta_Northing)))
+  { /* Northing out of range */
+    Error_Code |= TRANMERC_NORTHING_ERROR;
+  }
+#endif
+
+  if (!Error_Code)
+  {
+    /* True Meridional Distances for latitude of origin */
+    tmdo = SPHTMD(TranMerc_Origin_Lat);
+
+    /*  Origin  */
+    tmd = tmdo +  (Northing - TranMerc_False_Northing) / TranMerc_Scale_Factor; 
+
+    /* First Estimate */
+    sr = SPHSR(0.e0);
+    ftphi = tmd/sr;
+
+    for (i = 0; i < 5 ; i++)
+    {
+      t10 = SPHTMD (ftphi);
+      sr = SPHSR(ftphi);
+      ftphi = ftphi + (tmd - t10) / sr;
+    }
+
+    /* Radius of Curvature in the meridian */
+    sr = SPHSR(ftphi);
+
+    /* Radius of Curvature in the meridian */
+    sn = SPHSN(ftphi);
+
+    /* Sine Cosine terms */
+    // s = sin(ftphi);
+    c = cos(ftphi);
+
+    /* Tangent Value  */
+    t = tan(ftphi);
+    tan2 = t * t;
+    tan4 = tan2 * tan2;
+    eta = TranMerc_ebs * pow(c,2);
+    eta2 = eta * eta;
+    eta3 = eta2 * eta;
+    eta4 = eta3 * eta;
+    de = Easting - TranMerc_False_Easting;
+    if (fabs(de) < 0.0001)
+      de = 0.0;
+
+    /* Latitude */
+    t10 = t / (2.e0 * sr * sn * pow(TranMerc_Scale_Factor, 2));
+    t11 = t * (5.e0  + 3.e0 * tan2 + eta - 4.e0 * pow(eta,2)
+               - 9.e0 * tan2 * eta) / (24.e0 * sr * pow(sn,3) 
+                                       * pow(TranMerc_Scale_Factor,4));
+    t12 = t * (61.e0 + 90.e0 * tan2 + 46.e0 * eta + 45.E0 * tan4
+               - 252.e0 * tan2 * eta  - 3.e0 * eta2 + 100.e0 
+               * eta3 - 66.e0 * tan2 * eta2 - 90.e0 * tan4
+               * eta + 88.e0 * eta4 + 225.e0 * tan4 * eta2
+               + 84.e0 * tan2* eta3 - 192.e0 * tan2 * eta4)
+          / ( 720.e0 * sr * pow(sn,5) * pow(TranMerc_Scale_Factor, 6) );
+    t13 = t * ( 1385.e0 + 3633.e0 * tan2 + 4095.e0 * tan4 + 1575.e0 
+                * pow(t,6))/ (40320.e0 * sr * pow(sn,7) * pow(TranMerc_Scale_Factor,8));
+    *Latitude = ftphi - pow(de,2) * t10 + pow(de,4) * t11 - pow(de,6) * t12 
+                + pow(de,8) * t13;
+
+    t14 = 1.e0 / (sn * c * TranMerc_Scale_Factor);
+
+    t15 = (1.e0 + 2.e0 * tan2 + eta) / (6.e0 * pow(sn,3) * c * 
+                                        pow(TranMerc_Scale_Factor,3));
+
+    t16 = (5.e0 + 6.e0 * eta + 28.e0 * tan2 - 3.e0 * eta2
+           + 8.e0 * tan2 * eta + 24.e0 * tan4 - 4.e0 
+           * eta3 + 4.e0 * tan2 * eta2 + 24.e0 
+           * tan2 * eta3) / (120.e0 * pow(sn,5) * c  
+                             * pow(TranMerc_Scale_Factor,5));
+
+    t17 = (61.e0 +  662.e0 * tan2 + 1320.e0 * tan4 + 720.e0 
+           * pow(t,6)) / (5040.e0 * pow(sn,7) * c 
+                          * pow(TranMerc_Scale_Factor,7));
+
+    /* Difference in Longitude */
+    dlam = de * t14 - pow(de,3) * t15 + pow(de,5) * t16 - pow(de,7) * t17;
+
+    /* Longitude */
+    (*Longitude) = TranMerc_Origin_Long + dlam;
+    while (*Latitude > (90.0 * RAD_PER_DEG))
+    {
+      *Latitude = M_PI - *Latitude;
+      *Longitude += M_PI;
+      if (*Longitude > M_PI)
+        *Longitude -= (TWO_PI);
+    }
+
+    while (*Latitude < (-90.0 * RAD_PER_DEG))
+    {
+      *Latitude = - (*Latitude + M_PI);
+      *Longitude += M_PI;
+      if (*Longitude > M_PI)
+        *Longitude -= (TWO_PI);
+    }
+    if (*Longitude > (TWO_PI))
+      *Longitude -= (TWO_PI);
+    if (*Longitude < -M_PI)
+      *Longitude += (TWO_PI);
+
+    if (fabs(dlam) > (9.0 * RAD_PER_DEG))
+    { /* Distortion will result if Longitude is more than 9 degrees from the Central Meridian */
+      Error_Code |= TRANMERC_LON_WARNING;
+    }
+  }
+  return (Error_Code);
+} /* END OF Convert_Transverse_Mercator_To_Geodetic */
diff --git a/src/ossim/projection/ossimTransCylEquAreaProjection.cpp b/ossim/src/ossim/projection/ossimTransCylEquAreaProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimTransCylEquAreaProjection.cpp
rename to ossim/src/ossim/projection/ossimTransCylEquAreaProjection.cpp
diff --git a/ossim/src/ossim/projection/ossimTransMercatorProjection.cpp b/ossim/src/ossim/projection/ossimTransMercatorProjection.cpp
new file mode 100644
index 0000000..ada1493
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimTransMercatorProjection.cpp
@@ -0,0 +1,733 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License:  See top LICENSE.txt file.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+// Calls Geotrans Transverse Mercator  projection code.  
+//*******************************************************************
+//  $Id: ossimTransMercatorProjection.cpp 23002 2014-11-24 17:11:17Z dburken $
+#include <cmath>
+using namespace std;
+
+#include <ossim/projection/ossimTransMercatorProjection.h>
+#include <ossim/base/ossimKeywordNames.h>
+
+RTTI_DEF1(ossimTransMercatorProjection, "ossimTransMercatorProjection", ossimMapProjection)
+
+/******************************* DEFINES *********************************/
+
+#define TRANMERC_NO_ERROR           0x0000
+#define TRANMERC_LAT_ERROR          0x0001
+#define TRANMERC_LON_ERROR          0x0002
+#define TRANMERC_EASTING_ERROR      0x0004
+#define TRANMERC_NORTHING_ERROR     0x0008
+#define TRANMERC_ORIGIN_LAT_ERROR   0x0010
+#define TRANMERC_CENT_MER_ERROR     0x0020
+#define TRANMERC_A_ERROR            0x0040
+#define TRANMERC_B_ERROR            0x0080
+#define TRANMERC_A_LESS_B_ERROR     0x0100
+#define TRANMERC_SCALE_FACTOR_ERROR 0x0200
+#define TRANMERC_LON_WARNING        0x0400
+
+#define MAX_LAT         ((M_PI * 90.0)/180.0)    /* 90 degrees in radians */
+#define MAX_DELTA_LONG  ((M_PI * 90.0)/180.0)    /* 90 degrees in radians */
+#define MIN_SCALE_FACTOR  0.3
+#define MAX_SCALE_FACTOR  3.0
+
+#define SPHTMD(Latitude) ((double) (TranMerc_ap * Latitude \
+      - TranMerc_bp * sin(2.e0 * Latitude) + TranMerc_cp * sin(4.e0 * Latitude) \
+      - TranMerc_dp * sin(6.e0 * Latitude) + TranMerc_ep * sin(8.e0 * Latitude) ) )
+
+#define SPHSN(Latitude) ((double) (getA() / sqrt( 1.e0 - TranMerc_es * \
+      pow(sin(Latitude), 2))))
+
+#define SPHSR(Latitude) ((double) (getA() * (1.e0 - TranMerc_es) / \
+    pow(DENOM(Latitude), 3)))
+
+#define DENOM(Latitude) ((double) (sqrt(1.e0 - TranMerc_es * pow(sin(Latitude),2))))
+
+ossimTransMercatorProjection::ossimTransMercatorProjection(const ossimEllipsoid& ellipsoid,
+                                                           const ossimGpt& origin)
+   :
+      ossimMapProjection(ellipsoid, origin),
+      TranMerc_a(6378137.0),
+      TranMerc_f(1.0/298.257223563),
+      TranMerc_es(0.0066943799901413800),
+      TranMerc_ebs(0.0067394967565869),
+      TranMerc_Origin_Lat(origin.latr()),
+      TranMerc_Origin_Long(origin.lonr()),
+      TranMerc_False_Northing(0.0),
+      TranMerc_False_Easting(0.0),
+      TranMerc_Scale_Factor(1.0),
+      TranMerc_ap(6367449.1458008),
+      TranMerc_bp(16038.508696861),
+      TranMerc_cp(16.832613334334),
+      TranMerc_dp(0.021984404273757),
+      TranMerc_Delta_Easting(40000000.0),
+      TranMerc_Delta_Northing(40000000.0)
+{
+   update();
+}
+
+ossimTransMercatorProjection::ossimTransMercatorProjection(const ossimEllipsoid& ellipsoid,
+                                                           const ossimGpt& origin,
+                                                           double falseEasting,
+                                                           double falseNorthing,
+                                                           double scaleFactor)
+   :
+      ossimMapProjection(ellipsoid, origin),
+      TranMerc_a(6378137.0),
+      TranMerc_f(1.0/298.257223563),
+      TranMerc_es(0.0066943799901413800),
+      TranMerc_ebs(0.0067394967565869),
+      TranMerc_Origin_Lat(origin.latr()),
+      TranMerc_Origin_Long(origin.lonr()),
+      TranMerc_False_Northing(falseNorthing),
+      TranMerc_False_Easting(falseEasting),
+      TranMerc_Scale_Factor(scaleFactor),
+      TranMerc_ap(6367449.1458008),
+      TranMerc_bp(16038.508696861),
+      TranMerc_cp(16.832613334334),
+      TranMerc_dp(0.021984404273757),
+      TranMerc_Delta_Easting(40000000.0),
+      TranMerc_Delta_Northing(40000000.0)
+{
+   update();
+}
+
+void ossimTransMercatorProjection::update()
+{
+   Set_Transverse_Mercator_Parameters(theEllipsoid.getA(),
+                                      theEllipsoid.getFlattening(),
+                                      theOrigin.latr(),
+                                      theOrigin.lonr(),
+                                      TranMerc_False_Easting,
+                                      TranMerc_False_Northing,
+                                      TranMerc_Scale_Factor);
+
+   theFalseEastingNorthing.x = TranMerc_False_Easting;
+   theFalseEastingNorthing.y = TranMerc_False_Northing;
+
+   ossimMapProjection::update();
+}
+
+void ossimTransMercatorProjection::setFalseEasting(double falseEasting)
+{
+   TranMerc_False_Easting  = falseEasting;
+   
+   update();
+}
+
+
+void ossimTransMercatorProjection::setFalseNorthing(double falseNorthing)
+{
+   TranMerc_False_Northing = falseNorthing;
+   
+   update();
+}
+
+void ossimTransMercatorProjection::setFalseEastingNorthing(double falseEasting,
+                                                      double falseNorthing)
+{
+   TranMerc_False_Easting  = falseEasting;
+   TranMerc_False_Northing = falseNorthing;
+   
+   update();
+}
+
+void ossimTransMercatorProjection::setScaleFactor(double scaleFactor)
+{
+   TranMerc_Scale_Factor = scaleFactor;
+   
+   update();
+}
+
+void ossimTransMercatorProjection::setParameters(double falseEasting,
+                                                   double falseNorthing,
+                                                   double scaleFactor)
+{
+   TranMerc_False_Easting  = falseEasting;
+   TranMerc_False_Northing = falseNorthing;
+   TranMerc_Scale_Factor   = scaleFactor;
+   
+   update();
+}
+
+void ossimTransMercatorProjection::setDefaults()
+{
+   TranMerc_False_Easting  = 0.0;
+   TranMerc_False_Northing = 0.0;
+   TranMerc_Scale_Factor   = 1.0;
+   TranMerc_Delta_Easting  = 40000000.0;
+   TranMerc_Delta_Northing = 40000000.0;
+}
+
+ossimGpt ossimTransMercatorProjection::inverse(const ossimDpt &eastingNorthing)const
+{
+   double lat = 0.0;
+   double lon = 0.0;
+   
+   Convert_Transverse_Mercator_To_Geodetic(eastingNorthing.x,
+                                           eastingNorthing.y,
+                                           &lat,
+                                           &lon);
+   
+   return ossimGpt(lat*DEG_PER_RAD, lon*DEG_PER_RAD, 0.0, theDatum);
+}
+
+ossimDpt ossimTransMercatorProjection::forward(const ossimGpt &latLon)const
+{
+   double easting  = 0.0;
+   double northing = 0.0;
+   ossimGpt gpt = latLon;
+   
+   if (theDatum)
+   {
+      if (theDatum->code() != latLon.datum()->code())
+      {
+         gpt.changeDatum(theDatum); // Shift to our datum.
+      }
+   }
+
+   Convert_Geodetic_To_Transverse_Mercator(gpt.latr(),
+                                           gpt.lonr(),
+                                           &easting,
+                                           &northing);
+   
+   return ossimDpt(easting, northing);
+}
+
+bool ossimTransMercatorProjection::saveState(ossimKeywordlist& kwl, const char* prefix) const
+{
+   kwl.add(prefix,
+           ossimKeywordNames::SCALE_FACTOR_KW,
+           TranMerc_Scale_Factor,
+           true);
+   
+   return ossimMapProjection::saveState(kwl, prefix);
+}
+
+bool ossimTransMercatorProjection::loadState(const ossimKeywordlist& kwl,
+                                             const char* prefix)
+{
+   bool flag = ossimMapProjection::loadState(kwl, prefix);
+   const char* type          = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
+   const char* scaleFactor   = kwl.find(prefix, ossimKeywordNames::SCALE_FACTOR_KW);
+   
+   setDefaults();
+   if(ossimString(type) == STATIC_TYPE_NAME(ossimTransMercatorProjection))
+   {
+      TranMerc_False_Easting  = theFalseEastingNorthing.x;
+      TranMerc_False_Northing = theFalseEastingNorthing.y;
+
+      if(scaleFactor)
+      {
+         double d = ossimString(scaleFactor).toDouble();
+         if (d > 0.0) // Check to avoid divide by zero.
+         {
+            TranMerc_Scale_Factor = d;
+         }
+      }
+   }
+
+   update();
+
+   return flag;
+}
+
+/************************************************************************/
+/*                              FUNCTIONS     
+ *
+ */
+
+
+long ossimTransMercatorProjection::Set_Transverse_Mercator_Parameters(double a,
+                                                                      double f,
+                                                                      double Origin_Latitude,
+                                                                      double Central_Meridian,
+                                                                      double False_Easting,
+                                                                      double False_Northing,
+                                                                      double Scale_Factor)
+
+{ /* BEGIN Set_Tranverse_Mercator_Parameters */
+  /*
+   * The function Set_Tranverse_Mercator_Parameters receives the ellipsoid
+   * parameters and Tranverse Mercator projection parameters as inputs, and
+   * sets the corresponding state variables. If any errors occur, the error
+   * code(s) are returned by the function, otherwise TRANMERC_NO_ERROR is
+   * returned.
+   *
+   *    a                 : Semi-major axis of ellipsoid, in meters    (input)
+   *    f                 : Flattening of ellipsoid						         (input)
+   *    Origin_Latitude   : Latitude in radians at the origin of the   (input)
+   *                         projection
+   *    Central_Meridian  : Longitude in radians at the center of the  (input)
+   *                         projection
+   *    False_Easting     : Easting/X at the center of the projection  (input)
+   *    False_Northing    : Northing/Y at the center of the projection (input)
+   *    Scale_Factor      : Projection scale factor                    (input) 
+   */
+
+  double tn;        /* True Meridianal distance constant  */
+  double tn2;
+  double tn3;
+  double tn4;
+  double tn5;
+  double dummy_northing;
+  double TranMerc_b; /* Semi-minor axis of ellipsoid, in meters */
+//  double inv_f = 1 / f;
+  long Error_Code = TRANMERC_NO_ERROR;
+
+//   if (a <= 0.0)
+//   { /* Semi-major axis must be greater than zero */
+//     Error_Code |= TRANMERC_A_ERROR;
+//   }
+//   if ((inv_f < 250) || (inv_f > 350))
+//   { /* Inverse flattening must be between 250 and 350 */
+//     Error_Code |= TRANMERC_INV_F_ERROR;
+//   }
+//   if ((Origin_Latitude < -MAX_LAT) || (Origin_Latitude > MAX_LAT))
+//   { /* origin latitude out of range */
+//     Error_Code |= TRANMERC_ORIGIN_LAT_ERROR;
+//   }
+//   if ((Central_Meridian < -M_PI) || (Central_Meridian > TWO_PI))
+//   { /* origin longitude out of range */
+//     Error_Code |= TRANMERC_CENT_MER_ERROR;
+//   }
+//   if ((Scale_Factor < MIN_SCALE_FACTOR) || (Scale_Factor > MAX_SCALE_FACTOR))
+//   {
+//     Error_Code |= TRANMERC_SCALE_FACTOR_ERROR;
+//   }
+  if (!Error_Code)
+  { /* no errors */
+    TranMerc_a = a;
+    TranMerc_f = f;
+    TranMerc_Origin_Lat = 0;
+    TranMerc_Origin_Long = 0;
+    TranMerc_False_Northing = 0;
+    TranMerc_False_Easting = 0; 
+    TranMerc_Scale_Factor = 1;
+
+    /* Eccentricity Squared */
+    TranMerc_es = 2 * TranMerc_f - TranMerc_f * TranMerc_f;
+    /* Second Eccentricity Squared */
+    TranMerc_ebs = (1 / (1 - TranMerc_es)) - 1;
+
+    TranMerc_b = TranMerc_a * (1 - TranMerc_f);    
+    /*True meridianal constants  */
+    tn = (TranMerc_a - TranMerc_b) / (TranMerc_a + TranMerc_b);
+    tn2 = tn * tn;
+    tn3 = tn2 * tn;
+    tn4 = tn3 * tn;
+    tn5 = tn4 * tn;
+
+    TranMerc_ap = TranMerc_a * (1.e0 - tn + 5.e0 * (tn2 - tn3)/4.e0
+                                + 81.e0 * (tn4 - tn5)/64.e0 );
+    TranMerc_bp = 3.e0 * TranMerc_a * (tn - tn2 + 7.e0 * (tn3 - tn4)
+                                       /8.e0 + 55.e0 * tn5/64.e0 )/2.e0;
+    TranMerc_cp = 15.e0 * TranMerc_a * (tn2 - tn3 + 3.e0 * (tn4 - tn5 )/4.e0) /16.0;
+    TranMerc_dp = 35.e0 * TranMerc_a * (tn3 - tn4 + 11.e0 * tn5 / 16.e0) / 48.e0;
+    TranMerc_ep = 315.e0 * TranMerc_a * (tn4 - tn5) / 512.e0;
+    Convert_Geodetic_To_Transverse_Mercator(MAX_LAT,
+                                            MAX_DELTA_LONG,
+                                            &TranMerc_Delta_Easting,
+                                            &TranMerc_Delta_Northing);
+    Convert_Geodetic_To_Transverse_Mercator(0,
+                                            MAX_DELTA_LONG,
+                                            &TranMerc_Delta_Easting,
+                                            &dummy_northing);
+    TranMerc_Origin_Lat = Origin_Latitude;
+    if (Central_Meridian > M_PI)
+      Central_Meridian -= TWO_PI;
+    TranMerc_Origin_Long = Central_Meridian;
+    TranMerc_False_Northing = False_Northing;
+    TranMerc_False_Easting = False_Easting; 
+    TranMerc_Scale_Factor = Scale_Factor;
+  } /* END OF if(!Error_Code) */
+  return (Error_Code);
+}  /* END of Set_Transverse_Mercator_Parameters  */
+
+
+void ossimTransMercatorProjection::Get_Transverse_Mercator_Parameters(double *a,
+                                                                      double *f,
+                                                                      double *Origin_Latitude,
+                                                                      double *Central_Meridian,
+                                                                      double *False_Easting,
+                                                                      double *False_Northing,
+                                                                      double *Scale_Factor)const
+
+{ /* BEGIN Get_Tranverse_Mercator_Parameters  */
+  /*
+   * The function Get_Transverse_Mercator_Parameters returns the current
+   * ellipsoid and Transverse Mercator projection parameters.
+   *
+   *    a                 : Semi-major axis of ellipsoid, in meters    (output)
+   *    f                 : Flattening of ellipsoid						         (output)
+   *    Origin_Latitude   : Latitude in radians at the origin of the   (output)
+   *                         projection
+   *    Central_Meridian  : Longitude in radians at the center of the  (output)
+   *                         projection
+   *    False_Easting     : Easting/X at the center of the projection  (output)
+   *    False_Northing    : Northing/Y at the center of the projection (output)
+   *    Scale_Factor      : Projection scale factor                    (output) 
+   */
+
+  *a = TranMerc_a;
+  *f = TranMerc_f;
+  *Origin_Latitude = TranMerc_Origin_Lat;
+  *Central_Meridian = TranMerc_Origin_Long;
+  *False_Easting = TranMerc_False_Easting;
+  *False_Northing = TranMerc_False_Northing;
+  *Scale_Factor = TranMerc_Scale_Factor;
+  
+  return;
+} /* END OF Get_Tranverse_Mercator_Parameters */
+
+
+
+long ossimTransMercatorProjection::Convert_Geodetic_To_Transverse_Mercator (double Latitude,
+                                                                            double Longitude,
+                                                                            double *Easting,
+                                                                            double *Northing)const
+   
+{      /* BEGIN Convert_Geodetic_To_Transverse_Mercator */
+
+  /*
+   * The function Convert_Geodetic_To_Transverse_Mercator converts geodetic
+   * (latitude and longitude) coordinates to Transverse Mercator projection
+   * (easting and northing) coordinates, according to the current ellipsoid
+   * and Transverse Mercator projection coordinates.  If any errors occur, the
+   * error code(s) are returned by the function, otherwise TRANMERC_NO_ERROR is
+   * returned.
+   *
+   *    Latitude      : Latitude in radians                         (input)
+   *    Longitude     : Longitude in radians                        (input)
+   *    Easting       : Easting/X in meters                         (output)
+   *    Northing      : Northing/Y in meters                        (output)
+   */
+
+  double c;       /* Cosine of latitude                          */
+  double c2;
+  double c3;
+  double c5;
+  double c7;
+  double dlam;    /* Delta longitude - Difference in Longitude       */
+  double eta;     /* constant - TranMerc_ebs *c *c                   */
+  double eta2;
+  double eta3;
+  double eta4;
+  double s;       /* Sine of latitude                        */
+  double sn;      /* Radius of curvature in the prime vertical       */
+  double t;       /* Tangent of latitude                             */
+  double tan2;
+  double tan3;
+  double tan4;
+  double tan5;
+  double tan6;
+  double t1;      /* Term in coordinate conversion formula - GP to Y */
+  double t2;      /* Term in coordinate conversion formula - GP to Y */
+  double t3;      /* Term in coordinate conversion formula - GP to Y */
+  double t4;      /* Term in coordinate conversion formula - GP to Y */
+  double t5;      /* Term in coordinate conversion formula - GP to Y */
+  double t6;      /* Term in coordinate conversion formula - GP to Y */
+  double t7;      /* Term in coordinate conversion formula - GP to Y */
+  double t8;      /* Term in coordinate conversion formula - GP to Y */
+  double t9;      /* Term in coordinate conversion formula - GP to Y */
+  double tmd;     /* True Meridional distance                        */
+  double tmdo;    /* True Meridional distance for latitude of origin */
+  long    Error_Code = TRANMERC_NO_ERROR;
+//  double temp_Origin;
+//  double temp_Long;
+
+//   if ((Latitude < -MAX_LAT) || (Latitude > MAX_LAT))
+//   {  /* Latitude out of range */
+//     Error_Code|= TRANMERC_LAT_ERROR;
+//   }
+   if (Longitude > M_PI)
+     Longitude -= TWO_PI;
+//   if ((Longitude < (TranMerc_Origin_Long - MAX_DELTA_LONG))
+//       || (Longitude > (TranMerc_Origin_Long + MAX_DELTA_LONG)))
+//   {
+//     if (Longitude < 0)
+//       temp_Long = Longitude + TWO_PI;
+//     else
+//       temp_Long = Longitude;
+//     if (TranMerc_Origin_Long < 0)
+//       temp_Origin = TranMerc_Origin_Long + TWO_PI;
+//     else
+//       temp_Origin = TranMerc_Origin_Long;
+//     if ((temp_Long < (temp_Origin - MAX_DELTA_LONG))
+//         || (temp_Long > (temp_Origin + MAX_DELTA_LONG)))
+//       Error_Code|= TRANMERC_LON_ERROR;
+//   }
+  if (!Error_Code)
+  { /* no errors */
+
+    /* 
+     *  Delta Longitude
+     */
+    dlam = Longitude - TranMerc_Origin_Long;
+
+//     if (fabs(dlam) > (9.0 * M_PI / 180))
+//     { /* Distortion will result if Longitude is more than 9 degrees from the Central Meridian */
+//       Error_Code |= TRANMERC_LON_WARNING;
+//     }
+
+     if (dlam > M_PI)
+       dlam -= TWO_PI;
+     if (dlam < -M_PI)
+       dlam += TWO_PI;
+     if (fabs(dlam) < 2.e-10)
+       dlam = 0.0;
+
+    s = sin(Latitude);
+    c = cos(Latitude);
+    c2 = c * c;
+    c3 = c2 * c;
+    c5 = c3 * c2;
+    c7 = c5 * c2;
+    t = tan (Latitude);
+    tan2 = t * t;
+    tan3 = tan2 * t;
+    tan4 = tan3 * t;
+    tan5 = tan4 * t;
+    tan6 = tan5 * t;
+    eta = TranMerc_ebs * c2;
+    eta2 = eta * eta;
+    eta3 = eta2 * eta;
+    eta4 = eta3 * eta;
+
+    /* radius of curvature in prime vertical */
+    sn = SPHSN(Latitude);
+
+    /* True Meridianal Distances */
+    tmd = SPHTMD(Latitude);
+
+    /*  Origin  */
+    tmdo = SPHTMD (TranMerc_Origin_Lat);
+
+    /* northing */
+    t1 = (tmd - tmdo) * TranMerc_Scale_Factor;
+    t2 = sn * s * c * TranMerc_Scale_Factor/ 2.e0;
+    t3 = sn * s * c3 * TranMerc_Scale_Factor * (5.e0 - tan2 + 9.e0 * eta 
+                                                + 4.e0 * eta2) /24.e0; 
+
+    t4 = sn * s * c5 * TranMerc_Scale_Factor * (61.e0 - 58.e0 * tan2
+                                                + tan4 + 270.e0 * eta - 330.e0 * tan2 * eta + 445.e0 * eta2
+                                                + 324.e0 * eta3 -680.e0 * tan2 * eta2 + 88.e0 * eta4 
+                                                -600.e0 * tan2 * eta3 - 192.e0 * tan2 * eta4) / 720.e0;
+
+    t5 = sn * s * c7 * TranMerc_Scale_Factor * (1385.e0 - 3111.e0 * 
+                                                tan2 + 543.e0 * tan4 - tan6) / 40320.e0;
+
+    *Northing = TranMerc_False_Northing + t1 + pow(dlam,2.e0) * t2
+                + pow(dlam,4.e0) * t3 + pow(dlam,6.e0) * t4
+                + pow(dlam,8.e0) * t5; 
+
+    /* Easting */
+    t6 = sn * c * TranMerc_Scale_Factor;
+    t7 = sn * c3 * TranMerc_Scale_Factor * (1.e0 - tan2 + eta ) /6.e0;
+    t8 = sn * c5 * TranMerc_Scale_Factor * (5.e0 - 18.e0 * tan2 + tan4
+                                            + 14.e0 * eta - 58.e0 * tan2 * eta + 13.e0 * eta2 + 4.e0 * eta3 
+                                            - 64.e0 * tan2 * eta2 - 24.e0 * tan2 * eta3 )/ 120.e0;
+    t9 = sn * c7 * TranMerc_Scale_Factor * ( 61.e0 - 479.e0 * tan2
+                                             + 179.e0 * tan4 - tan6 ) /5040.e0;
+
+    *Easting = TranMerc_False_Easting + dlam * t6 + pow(dlam,3.e0) * t7 
+               + pow(dlam,5.e0) * t8 + pow(dlam,7.e0) * t9;
+  }
+  return (Error_Code);
+} /* END OF Convert_Geodetic_To_Transverse_Mercator */
+
+
+long ossimTransMercatorProjection::Convert_Transverse_Mercator_To_Geodetic (double Easting,
+                                                                            double Northing,
+                                                                            double *Latitude,
+                                                                            double *Longitude)const
+{      /* BEGIN Convert_Transverse_Mercator_To_Geodetic */
+
+  /*
+   * The function Convert_Transverse_Mercator_To_Geodetic converts Transverse
+   * Mercator projection (easting and northing) coordinates to geodetic
+   * (latitude and longitude) coordinates, according to the current ellipsoid
+   * and Transverse Mercator projection parameters.  If any errors occur, the
+   * error code(s) are returned by the function, otherwise TRANMERC_NO_ERROR is
+   * returned.
+   *
+   *    Easting       : Easting/X in meters                         (input)
+   *    Northing      : Northing/Y in meters                        (input)
+   *    Latitude      : Latitude in radians                         (output)
+   *    Longitude     : Longitude in radians                        (output)
+   */
+
+  double c;       /* Cosine of latitude                          */
+  double de;      /* Delta easting - Difference in Easting (Easting-Fe)    */
+  double dlam;    /* Delta longitude - Difference in Longitude       */
+  double eta;     /* constant - TranMerc_ebs *c *c                   */
+  double eta2;
+  double eta3;
+  double eta4;
+  double ftphi;   /* Footpoint latitude                              */
+  int    i;       /* Loop iterator                   */
+  // double s;       /* Sine of latitude                        */
+  double sn;      /* Radius of curvature in the prime vertical       */
+  double sr;      /* Radius of curvature in the meridian             */
+  double t;       /* Tangent of latitude                             */
+  double tan2;
+  double tan4;
+  double t10;     /* Term in coordinate conversion formula - GP to Y */
+  double t11;     /* Term in coordinate conversion formula - GP to Y */
+  double t12;     /* Term in coordinate conversion formula - GP to Y */
+  double t13;     /* Term in coordinate conversion formula - GP to Y */
+  double t14;     /* Term in coordinate conversion formula - GP to Y */
+  double t15;     /* Term in coordinate conversion formula - GP to Y */
+  double t16;     /* Term in coordinate conversion formula - GP to Y */
+  double t17;     /* Term in coordinate conversion formula - GP to Y */
+  double tmd;     /* True Meridional distance                        */
+  double tmdo;    /* True Meridional distance for latitude of origin */
+  long Error_Code = TRANMERC_NO_ERROR;
+
+//   if ((Easting < (TranMerc_False_Easting - TranMerc_Delta_Easting))
+//       ||(Easting > (TranMerc_False_Easting + TranMerc_Delta_Easting)))
+//   { /* Easting out of range  */
+//     Error_Code |= TRANMERC_EASTING_ERROR;
+//   }
+//   if ((Northing < (TranMerc_False_Northing - TranMerc_Delta_Northing))
+//       || (Northing > (TranMerc_False_Northing + TranMerc_Delta_Northing)))
+//   { /* Northing out of range */
+//     Error_Code |= TRANMERC_NORTHING_ERROR;
+//   }
+
+  if (!Error_Code)
+  {
+    /* True Meridional Distances for latitude of origin */
+    tmdo = SPHTMD(TranMerc_Origin_Lat);
+
+    /*  Origin  */
+    tmd = tmdo +  (Northing - TranMerc_False_Northing) / TranMerc_Scale_Factor; 
+
+    /* First Estimate */
+    sr = SPHSR(0.e0);
+    ftphi = tmd/sr;
+
+    for (i = 0; i < 5 ; i++)
+    {
+      t10 = SPHTMD (ftphi);
+      sr = SPHSR(ftphi);
+      ftphi = ftphi + (tmd - t10) / sr;
+    }
+
+    /* Radius of Curvature in the meridian */
+    sr = SPHSR(ftphi);
+
+    /* Radius of Curvature in the meridian */
+    sn = SPHSN(ftphi);
+
+    /* Sine Cosine terms */
+    // s = sin(ftphi);
+    c = cos(ftphi);
+
+    /* Tangent Value  */
+    t = tan(ftphi);
+    tan2 = t * t;
+    tan4 = tan2 * tan2;
+    eta = TranMerc_ebs * pow(c,2);
+    eta2 = eta * eta;
+    eta3 = eta2 * eta;
+    eta4 = eta3 * eta;
+    de = Easting - TranMerc_False_Easting;
+    if (fabs(de) < 0.0001)
+      de = 0.0;
+
+    /* Latitude */
+    t10 = t / (2.e0 * sr * sn * pow(TranMerc_Scale_Factor, 2));
+    t11 = t * (5.e0  + 3.e0 * tan2 + eta - 4.e0 * pow(eta,2)
+               - 9.e0 * tan2 * eta) / (24.e0 * sr * pow(sn,3) 
+                                       * pow(TranMerc_Scale_Factor,4));
+    t12 = t * (61.e0 + 90.e0 * tan2 + 46.e0 * eta + 45.E0 * tan4
+               - 252.e0 * tan2 * eta  - 3.e0 * eta2 + 100.e0 
+               * eta3 - 66.e0 * tan2 * eta2 - 90.e0 * tan4
+               * eta + 88.e0 * eta4 + 225.e0 * tan4 * eta2
+               + 84.e0 * tan2* eta3 - 192.e0 * tan2 * eta4)
+          / ( 720.e0 * sr * pow(sn,5) * pow(TranMerc_Scale_Factor, 6) );
+    t13 = t * ( 1385.e0 + 3633.e0 * tan2 + 4095.e0 * tan4 + 1575.e0 
+                * pow(t,6))/ (40320.e0 * sr * pow(sn,7) * pow(TranMerc_Scale_Factor,8));
+    *Latitude = ftphi - pow(de,2) * t10 + pow(de,4) * t11 - pow(de,6) * t12 
+                + pow(de,8) * t13;
+
+    t14 = 1.e0 / (sn * c * TranMerc_Scale_Factor);
+
+    t15 = (1.e0 + 2.e0 * tan2 + eta) / (6.e0 * pow(sn,3) * c * 
+                                        pow(TranMerc_Scale_Factor,3));
+
+    t16 = (5.e0 + 6.e0 * eta + 28.e0 * tan2 - 3.e0 * eta2
+           + 8.e0 * tan2 * eta + 24.e0 * tan4 - 4.e0 
+           * eta3 + 4.e0 * tan2 * eta2 + 24.e0 
+           * tan2 * eta3) / (120.e0 * pow(sn,5) * c  
+                             * pow(TranMerc_Scale_Factor,5));
+
+    t17 = (61.e0 +  662.e0 * tan2 + 1320.e0 * tan4 + 720.e0 
+           * pow(t,6)) / (5040.e0 * pow(sn,7) * c 
+                          * pow(TranMerc_Scale_Factor,7));
+
+    /* Difference in Longitude */
+    dlam = de * t14 - pow(de,3) * t15 + pow(de,5) * t16 - pow(de,7) * t17;
+
+    /* Longitude */
+    (*Longitude) = TranMerc_Origin_Long + dlam;
+    while (*Latitude > (90.0 * RAD_PER_DEG))
+    {
+      *Latitude = M_PI - *Latitude;
+      *Longitude += M_PI;
+      if (*Longitude > M_PI)
+        *Longitude -= TWO_PI;
+    }
+
+     while (*Latitude < (-90.0 * RAD_PER_DEG))
+     {
+       *Latitude = - (*Latitude + M_PI);
+       *Longitude += M_PI;
+       if (*Longitude > M_PI)
+         *Longitude -= TWO_PI;
+     }
+     if (*Longitude > TWO_PI)
+       *Longitude -= TWO_PI;
+     if (*Longitude < -M_PI)
+       *Longitude += TWO_PI;
+
+//     if (fabs(dlam) > (9.0 * M_PI / 180))
+//     { /* Distortion will result if Longitude is more than 9 degrees from the Central Meridian */
+//       Error_Code |= TRANMERC_LON_WARNING;
+//     }
+  }
+  return (Error_Code);
+} /* END OF Convert_Transverse_Mercator_To_Geodetic */
+
+std::ostream& ossimTransMercatorProjection::print(std::ostream& out) const
+{
+   out << setiosflags(ios::fixed) << setprecision(15)
+       << "// ossimTransMercatorProjection::print\n"
+       << ossimKeywordNames::SCALE_FACTOR_KW << ":  " << TranMerc_Scale_Factor
+       << endl;
+   return ossimMapProjection::print(out);
+}
+
+//*************************************************************************************************
+//! Returns TRUE if principal parameters are within epsilon tolerance.
+//*************************************************************************************************
+bool ossimTransMercatorProjection::operator==(const ossimProjection& proj) const
+{
+   if (!ossimMapProjection::operator==(proj))
+      return false;
+
+   ossimTransMercatorProjection* p = PTR_CAST(ossimTransMercatorProjection, &proj);
+   if (!p) return false;
+
+   if (!ossim::almostEqual(TranMerc_Scale_Factor,p->TranMerc_Scale_Factor)) return false;
+
+   return true;
+}
diff --git a/src/ossim/projection/ossimUps.c b/ossim/src/ossim/projection/ossimUps.c
similarity index 100%
rename from src/ossim/projection/ossimUps.c
rename to ossim/src/ossim/projection/ossimUps.c
diff --git a/src/ossim/projection/ossimUpsProjection.cpp b/ossim/src/ossim/projection/ossimUpsProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimUpsProjection.cpp
rename to ossim/src/ossim/projection/ossimUpsProjection.cpp
diff --git a/src/ossim/projection/ossimUpspt.cpp b/ossim/src/ossim/projection/ossimUpspt.cpp
similarity index 100%
rename from src/ossim/projection/ossimUpspt.cpp
rename to ossim/src/ossim/projection/ossimUpspt.cpp
diff --git a/src/ossim/projection/ossimUtm.c b/ossim/src/ossim/projection/ossimUtm.c
similarity index 100%
rename from src/ossim/projection/ossimUtm.c
rename to ossim/src/ossim/projection/ossimUtm.c
diff --git a/src/ossim/projection/ossimUtmProjection.cpp b/ossim/src/ossim/projection/ossimUtmProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimUtmProjection.cpp
rename to ossim/src/ossim/projection/ossimUtmProjection.cpp
diff --git a/ossim/src/ossim/projection/ossimUtmpt.cpp b/ossim/src/ossim/projection/ossimUtmpt.cpp
new file mode 100644
index 0000000..ab5060d
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimUtmpt.cpp
@@ -0,0 +1,89 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+// Description:
+//
+// This is the Universal Transverse Mercator (UTM) point.  Allows
+// easy onversion between different coordinates.
+//*******************************************************************
+//  $Id: ossimUtmpt.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/projection/ossimUtmpt.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimEcefPoint.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimEllipsoid.h>
+#include <ossim/projection/ossimUtm.h>
+
+ossimUtmpt::ossimUtmpt(const ossimGpt &aPt)
+{
+   convertFromGround(aPt);
+}
+
+ossimUtmpt::ossimUtmpt(const ossimEcefPoint &aPt)
+{
+   convertFromGround(ossimGpt(aPt));
+}
+
+ossimUtmpt::ossimUtmpt(long         zone,
+                       char         hemisphere,  // N or S
+                       double       easting,
+                       double       northing,
+                       const ossimDatum* datum)
+   :
+      theZone       (zone),
+      theHemisphere (hemisphere),
+      theEasting    (easting),
+      theNorthing   (northing),
+      theDatum      (datum)
+{}
+
+void ossimUtmpt::convertFromGround(const ossimGpt &aPt)
+{
+   const ossimDatum *aDatum = aPt.datum();
+
+   if(aDatum)
+   {
+      //call Geotrans init code
+      Set_UTM_Parameters(aDatum->ellipsoid()->a(), aDatum->ellipsoid()->flattening(), 0);
+      Convert_Geodetic_To_UTM(aPt.latr(),
+                              aPt.lonr(),
+                              &theZone,
+                              &theHemisphere,
+                              &theEasting,
+                              &theNorthing);
+      theDatum = aDatum;
+   }
+   else
+   {
+      //ERROR: Should never happen
+   }
+}
+
+void ossimUtmpt::convertToGround(ossimGpt &aPt)
+{
+   Set_UTM_Parameters( theDatum->ellipsoid()->a(),
+                       theDatum->ellipsoid()->flattening(),
+                       0 );
+   
+   double latitude  = 0.0;
+   double longitude = 0.0;
+
+   Convert_UTM_To_Geodetic( zone(),
+                            hemisphere(),
+                            easting(),
+                            northing(),
+                            &latitude,
+                            &longitude );
+
+   aPt.latr(latitude);
+   aPt.lonr(longitude);
+   aPt.datum(theDatum);
+}
+
diff --git a/src/ossim/projection/ossimVanDerGrintenProjection.cpp b/ossim/src/ossim/projection/ossimVanDerGrintenProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimVanDerGrintenProjection.cpp
rename to ossim/src/ossim/projection/ossimVanDerGrintenProjection.cpp
diff --git a/src/ossim/projection/ossimWarpProjection.cpp b/ossim/src/ossim/projection/ossimWarpProjection.cpp
similarity index 100%
rename from src/ossim/projection/ossimWarpProjection.cpp
rename to ossim/src/ossim/projection/ossimWarpProjection.cpp
diff --git a/ossim/src/ossim/projection/ossimWktProjectionFactory.cpp b/ossim/src/ossim/projection/ossimWktProjectionFactory.cpp
new file mode 100644
index 0000000..985b9e4
--- /dev/null
+++ b/ossim/src/ossim/projection/ossimWktProjectionFactory.cpp
@@ -0,0 +1,426 @@
+//*************************************************************************************************
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Oscar Kramer
+//
+// DESCRIPTION:
+// Projection Factory for EPSG coded projections. These are projections
+// that are fully defined in database files and specified via a projection coordinate system (PCS)
+// code.
+//
+//*************************************************************************************************
+//  $Id: ossimWktProjectionFactory.cpp 23379 2015-06-17 19:17:24Z okramer $
+
+#include <ossim/projection/ossimWktProjectionFactory.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/projection/ossimCylEquAreaProjection.h>
+#include <ossim/projection/ossimTransMercatorProjection.h>
+#include <ossim/projection/ossimMercatorProjection.h>
+#include <ossim/projection/ossimLambertConformalConicProjection.h>
+#include <ossim/projection/ossimUtmProjection.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/projection/ossimEpsgProjectionDatabase.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/base/ossimEpsgDatumFactory.h>
+#include <ossim/support_data/ossimWkt.h>
+#include <sstream>
+
+ossimWktProjectionFactory* ossimWktProjectionFactory::m_instance = 0;
+
+static const ossimString WKT_MAGIC("WKT_PCS");
+
+/*************************************************************************************************
+ * Sample WKT string (for reference, line feeds and spaces added for human readability)
+ *
+ * PROJCS["NAD_1983_HARN_Lambert_Conformal_Conic",
+ *        GEOGCS["GCS_North_American_1983_HARN",
+ *               DATUM["NAD83_High_Accuracy_Regional_Network",
+ *                     SPHEROID["GRS_1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]],
+ *                     AUTHORITY["EPSG","6152"]],
+ *               PRIMEM["Greenwich",0],
+ *               UNIT["degree",0.0174532925199433]],
+ *        PROJECTION["Lambert_Conformal_Conic_2SP"],
+ *        PARAMETER["standard_parallel_1",43],
+ *        PARAMETER["standard_parallel_2",45.5],
+ *        PARAMETER["latitude_of_origin",41.75],
+ *        PARAMETER["central_meridian",-120.5],
+ *        PARAMETER["false_easting",1312335.958005249],
+ *        PARAMETER["false_northing",0],
+ *        UNIT["foot",0.3048, AUTHORITY["EPSG","9002"]]]
+ *
+ * Another sample (with EPSG at the top for easy instantiation of full projection):
+ *
+ * PROJCS["WGS 84 / UTM zone 41N",
+ *        AUTHORITY["EPSG","32641"],
+ *        GEOGCS["WGS 84",
+ *               DATUM["WGS_1984",
+ *                     SPHEROID["WGS 84",6378137,298.2572235630016, AUTHORITY["EPSG","7030"]],
+ *                     AUTHORITY["EPSG","6326"]],
+ *               PRIMEM["Greenwich",0],
+ *               UNIT["degree",0.0174532925199433]],
+ *        PROJECTION["Transverse_Mercator"],
+ *        PARAMETER["latitude_of_origin",0],
+ *        PARAMETER["central_meridian",63],
+ *        PARAMETER["scale_factor",0.9996],
+ *        PARAMETER["false_easting",500000],
+ *        PARAMETER["false_northing",0],
+ *        UNIT["metre",1, AUTHORITY["EPSG","9001"]]]
+ *
+ **************************************************************************************************/
+
+//*************************************************************************************************
+//! Implements singleton pattern
+//*************************************************************************************************
+ossimWktProjectionFactory* ossimWktProjectionFactory::instance()
+{
+   if (!m_instance)
+      m_instance = new ossimWktProjectionFactory;
+   return m_instance;
+}
+
+//*************************************************************************************************
+//! Loads all SRS CSV files specified in the ossim prefs
+//*************************************************************************************************
+void ossimWktProjectionFactory::loadRecords() const
+{
+   // Fetch filename of WKT projection DB file specified in ossim_preferences:
+   ossimFilename db_name = ossimPreferences::instance()->preferencesKWL().find("wkt_database_file");
+   if (!db_name.isReadable())
+      return;
+
+   // Create only once outside the loop:
+   ossimString format_id;
+   ossimString line;
+
+   // Open the DB file:
+   std::ifstream db_stream(db_name.chars());
+   bool good_file = false;
+   if (db_stream.good())
+   {
+      // Format specification implied in file's magic number:
+      std::getline(db_stream, format_id.string());
+      format_id.trim();
+      if (format_id == WKT_MAGIC)
+         good_file = true;
+   }
+   if (!good_file)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimWktProjectionDatabase::loadRecords() -- Encountered bad WKT database file <"
+            << db_name << ">. Skipping this file." << endl;
+      db_stream.close();
+      return;
+   }
+
+   // The file is good. Skip over the column descriptor line:
+   std::getline(db_stream, line.string());
+
+   // Loop to read all data records:
+   while (!db_stream.eof())
+   {
+      std::getline(db_stream, line.string());
+      std::vector<ossimString> csvRecord = line.explode(","); // ONLY CSV FILES CONSIDERED HERE
+      if (csvRecord.size())
+      {
+         std::pair<std::string, ossim_uint32> projRecord;
+         projRecord.first = csvRecord[1].string();
+         projRecord.second = csvRecord[0].toUInt32();
+         m_wktProjRecords.insert(projRecord);
+      }
+   }
+
+//   for ( std::map<ossimString, ossim_uint32>::const_iterator it = m_wktProjRecords.begin();
+//         it != m_wktProjRecords.end(); it++)
+//     cout << "[" << it->first << ", " << it->second << "]"<<endl;
+
+   db_stream.close();
+}
+
+//*************************************************************************************************
+//! From keywordlist (as generated typically by ossimWkt class)
+//*************************************************************************************************
+ossimProjection* ossimWktProjectionFactory::createProjection(const ossimKeywordlist &keywordList,
+                                                             const char *prefix) const
+{
+   // The WKT for the horizontal projection may be part of a compound coordinate system, as
+   // indicated by the "COMPD_CS" prefix. Need to remove that prefix first.
+   ossimString compd_cs ("COMPD_CS.");
+   ossimKeywordlist temp_kwl (keywordList);
+   temp_kwl.stripPrefixFromAll(compd_cs);
+
+   ossimProjection* proj = 0;
+   ossimString pcs_name = temp_kwl.find(prefix, "PROJCS.name");
+   if (pcs_name.empty())
+      return 0;
+
+   if (m_wktProjRecords.empty())
+      loadRecords();
+
+   // Search the WKT DB for a mapping of projection name to EPSG code. This should take care of
+   // majority of cases, like UTM:
+   ossimString epsg_code;
+   std::map<std::string, ossim_uint32>::const_iterator it = m_wktProjRecords.find(pcs_name.string());
+   if (it != m_wktProjRecords.end())
+   {
+      // Found an entry by this name, fetch the EPSG code:
+      epsg_code = ossimString::toString(it->second);
+   }
+   else
+   {
+      // The name specified in the WKT could not be found in our WKT->EPSG map.
+      // Check for EPSG code in WKT itself:
+      ossimString auth_name = temp_kwl.find(prefix, "PROJCS.AUTHORITY.name");
+      if (auth_name == "EPSG")
+         epsg_code = temp_kwl.find(prefix, "PROJCS.AUTHORITY.param0");
+   }
+
+   // Use EPSG if determined:
+   if (!epsg_code.empty())
+   {
+      proj = ossimEpsgProjectionDatabase::instance()->findProjection(epsg_code.toUInt32());
+      if (proj)
+         return proj;
+   }
+
+   // Not EPSG, so check conventional proj spec in WKT:
+   ossimString proj_name = temp_kwl.find(prefix, "PROJCS.PROJECTION.name");
+   if (proj_name.empty())
+      return 0;
+   proj_name.downcase();
+   proj_name.gsub(" ", "_", true);
+
+   // Note that prefix is ignored. This KWL is assumed to come from ossimWkt that doesn't prefix:
+   if (proj_name.contains("transverse_mercator"))
+      proj = doTransverseMercator(temp_kwl);
+   else if (proj_name.contains("mercator"))
+      proj = doMercator(temp_kwl);
+   else if (proj_name.contains("lambert"))
+      proj = doLambertConformalConic(temp_kwl);
+   else if (proj_name.contains("equirectangular"))
+      proj = doEquiDistCylindrical(temp_kwl);
+   else if (proj_name.contains("cylindrical_equal_area"))
+      proj = doEquiAreaCylindrical(temp_kwl);
+
+   return proj;
+}
+
+//*************************************************************************************************
+// This is the principal factory method. It accepts a WKT string, e.g.
+//
+//    "Anguilla_1957_British_West_Indies_Grid",
+//
+//  or complete WKT, e.g.
+//
+//    PROJCS["Anguilla_1957_British_West_Indies_Grid", GEOGCS[...
+//
+// IMPORTANT NOTE: Image tie-points cannot be conveyed by a WKT projection string. The projection
+// created here will not be fully initialized for use in rendering imagery.
+//*************************************************************************************************
+ossimProjection* ossimWktProjectionFactory::createProjection(const ossimString &spec) const
+{
+   ossimProjection* proj = 0;
+   ossimWkt wkt;
+   if (wkt.parse(spec))
+   {
+      proj = createProjection(wkt.getKwl());
+   }
+   return proj;
+}
+
+//*************************************************************************************************
+ossimObject* ossimWktProjectionFactory::createObject(const ossimString& typeName) const
+{
+   return createProjection(typeName);
+}
+
+//*************************************************************************************************
+ossimObject* ossimWktProjectionFactory::createObject(const ossimKeywordlist& kwl,
+                                                     const char* prefix) const
+{
+   return createProjection(kwl, prefix);
+}
+
+//*************************************************************************************************
+//! STUB. Not implemented
+//*************************************************************************************************
+ossimProjection* ossimWktProjectionFactory::createProjection(const ossimFilename& /* filename */,
+                                                             ossim_uint32 /* entryIdx */) const
+{
+   return 0;
+}
+
+//*************************************************************************************************
+//! This returns the type name of all objects in all factories. This is the name used to 
+//! construct the objects dynamically and this name must be unique.
+//*************************************************************************************************
+void ossimWktProjectionFactory::getTypeNameList(std::vector<ossimString>& typeList) const
+{
+   if (m_wktProjRecords.empty())
+      loadRecords();
+
+   std::map<std::string, ossim_uint32>::iterator db_iter = m_wktProjRecords.begin();
+   while (db_iter != m_wktProjRecords.end())
+   {
+      typeList.push_back(ossimString(db_iter->first));
+      db_iter++;
+   }
+   return;
+}
+
+ossimProjection* ossimWktProjectionFactory::doTransverseMercator(const ossimKeywordlist& kwl) const
+{
+   ossimTransMercatorProjection* proj = new ossimTransMercatorProjection();
+   doMapCommon<ossimTransMercatorProjection*>(kwl, proj);
+
+   // Determine first the units:
+   ossimString name_read;
+   ossimString val_read;
+
+   // Read projection parameters from WKT KWL:
+   int param_idx = 0;
+   do
+   {
+      ossimString param("PROJCS.PARAMETER");
+      param += ossimString::toString(param_idx++);
+      name_read = kwl.find(param + ".name");
+      val_read = kwl.find(param + ".param0");
+
+      if (name_read.contains("scale_factor"))
+      {
+         proj->setScaleFactor(val_read.toDouble());
+         break;
+      }
+
+   } while (!name_read.empty());
+
+   return proj;
+}
+
+ossimProjection* ossimWktProjectionFactory::doMercator(const ossimKeywordlist& kwl) const
+{
+   ossimMercatorProjection* proj = new ossimMercatorProjection();
+   doMapCommon<ossimMercatorProjection*>(kwl, proj);
+
+   // Determine first the units:
+   ossimString name_read;
+   ossimString val_read;
+
+   // Read projection parameters from WKT KWL:
+   int param_idx = 0;
+   do
+   {
+      ossimString param("PROJCS.PARAMETER");
+      param += ossimString::toString(param_idx++);
+      name_read = kwl.find(param + ".name");
+      val_read = kwl.find(param + ".param0");
+
+      if (name_read.contains("scale_factor"))
+      {
+         proj->setScaleFactor(val_read.toDouble());
+         break;
+      }
+
+   } while (!name_read.empty());
+
+   return proj;
+}
+
+ossimProjection* ossimWktProjectionFactory::doLambertConformalConic(const ossimKeywordlist& kwl) const
+{
+   ossimLambertConformalConicProjection* proj = new ossimLambertConformalConicProjection();
+   doMapCommon<ossimLambertConformalConicProjection*>(kwl, proj);
+
+   // Determine first the units:
+   ossimString name_read;
+   ossimString val_read;
+
+   // Read projection parameters from WKT KWL:
+   int param_idx = 0;
+   do
+   {
+      ossimString param("PROJCS.PARAMETER");
+      param += ossimString::toString(param_idx++);
+      name_read = kwl.find(param + ".name");
+      val_read = kwl.find(param + ".param0");
+
+      if (name_read.contains("standard_parallel_1"))
+         proj->setStandardParallel1(val_read.toDouble());
+
+      else if (name_read.contains("standard_parallel_2"))
+         proj->setStandardParallel2(val_read.toDouble());
+
+   } while (!name_read.empty());
+
+   return proj;
+}
+
+ossimProjection* ossimWktProjectionFactory::doEquiDistCylindrical(const ossimKeywordlist& kwl) const
+{
+   ossimEquDistCylProjection* proj = new ossimEquDistCylProjection();
+   doMapCommon<ossimEquDistCylProjection*>(kwl, proj);
+
+   return proj;
+}
+
+ossimProjection* ossimWktProjectionFactory::doEquiAreaCylindrical(const ossimKeywordlist& kwl) const
+{
+   ossimCylEquAreaProjection* proj = new ossimCylEquAreaProjection();
+   doMapCommon<ossimCylEquAreaProjection*>(kwl, proj);
+
+   return proj;
+}
+
+template<class T>
+void ossimWktProjectionFactory::doMapCommon(const ossimKeywordlist& kwl, T proj) const
+{
+   ossimString name_read;
+   ossimString val_read;
+
+   const ossimDatum* datum = 0;
+   name_read = kwl.find("PROJCS.GEOGCS.AUTHORITY.name");
+   val_read = kwl.find("PROJCS.GEOGCS.AUTHORITY.param0");
+   if ((name_read == "EPSG") && (!val_read.empty()))
+   {
+      datum = ossimEpsgDatumFactory::instance()->create(val_read.toUInt32());
+      if (datum)
+         proj->setDatum(datum);
+      // TODO: HARN Datum not being handled
+   }
+
+   // Determine first the units:
+   name_read = kwl.find("PROJCS.UNIT.name");
+   double conv_factor = 1.0;
+   if (name_read.contains("f")) // feet|foot
+   {
+      conv_factor = MTRS_PER_FT;
+      proj->setProjectionUnits(OSSIM_FEET);
+   }
+
+   // Read projection parameters from WKT KWL:
+   int param_idx = 0;
+   ossimGpt origin(0, 0, 0, datum);
+   do
+   {
+      ossimString param("PROJCS.PARAMETER");
+      param += ossimString::toString(param_idx++);
+      name_read = kwl.find(param + ".name");
+      val_read = kwl.find(param + ".param0");
+
+      if (name_read.contains("central_meridian"))
+         origin.lon = val_read.toDouble();
+
+      else if (name_read.contains("latitude_of_origin"))
+         origin.lat = val_read.toDouble();
+
+      else if (name_read.contains("false_easting"))
+         proj->setFalseEasting(val_read.toDouble() * conv_factor);
+
+      else if (name_read.contains("false_northing"))
+         proj->setFalseNorthing(val_read.toDouble() * conv_factor);
+
+   } while (!name_read.empty());
+
+   proj->setOrigin(origin);
+}
+
diff --git a/src/ossim/support_data/makefile.vc b/ossim/src/ossim/support_data/makefile.vc
similarity index 100%
rename from src/ossim/support_data/makefile.vc
rename to ossim/src/ossim/support_data/makefile.vc
diff --git a/src/ossim/support_data/ossimAigBounds.cpp b/ossim/src/ossim/support_data/ossimAigBounds.cpp
similarity index 100%
rename from src/ossim/support_data/ossimAigBounds.cpp
rename to ossim/src/ossim/support_data/ossimAigBounds.cpp
diff --git a/src/ossim/support_data/ossimAigDataFileHeader.cpp b/ossim/src/ossim/support_data/ossimAigDataFileHeader.cpp
similarity index 100%
rename from src/ossim/support_data/ossimAigDataFileHeader.cpp
rename to ossim/src/ossim/support_data/ossimAigDataFileHeader.cpp
diff --git a/src/ossim/support_data/ossimAigHeader.cpp b/ossim/src/ossim/support_data/ossimAigHeader.cpp
similarity index 100%
rename from src/ossim/support_data/ossimAigHeader.cpp
rename to ossim/src/ossim/support_data/ossimAigHeader.cpp
diff --git a/src/ossim/support_data/ossimAigIndexFileHeader.cpp b/ossim/src/ossim/support_data/ossimAigIndexFileHeader.cpp
similarity index 100%
rename from src/ossim/support_data/ossimAigIndexFileHeader.cpp
rename to ossim/src/ossim/support_data/ossimAigIndexFileHeader.cpp
diff --git a/src/ossim/support_data/ossimAigStatistics.cpp b/ossim/src/ossim/support_data/ossimAigStatistics.cpp
similarity index 100%
rename from src/ossim/support_data/ossimAigStatistics.cpp
rename to ossim/src/ossim/support_data/ossimAigStatistics.cpp
diff --git a/ossim/src/ossim/support_data/ossimAlphaSensorSupportData.cpp b/ossim/src/ossim/support_data/ossimAlphaSensorSupportData.cpp
new file mode 100644
index 0000000..4f8980e
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimAlphaSensorSupportData.cpp
@@ -0,0 +1,699 @@
+#include <ossim/support_data/ossimAlphaSensorSupportData.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimEcefPoint.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/support_data/ossimEnviHeader.h>
+#include <fstream>
+#include <sstream>
+
+static ossimTrace traceDebug("ossimAlphaSensorSupportData:debug");
+
+
+ossimAlphaSensorSupportData::ossimAlphaSensorSupportData()
+   : m_isHSI(false),
+     m_sensorType(),
+     m_imageSize(),
+     m_rollBias(ossim::nan()),
+     m_pitchBias(ossim::nan()),
+     m_headingBias(ossim::nan()),
+     m_fov(ossim::nan()),
+     m_slitRot(ossim::nan()),
+     m_imgLine(),
+     m_roll(),
+     m_pitch(),
+     m_heading(),
+     m_lon(),
+     m_lat(),
+     m_alt(),
+     m_scanAng(),
+     m_rollPolyCoef(),
+     m_pitchPolyCoef(),
+     m_headingPolyCoef(),
+     m_lonPolyCoef(),
+     m_altPolyCoef(),
+     m_scanAngPolyCoef()
+{
+   reset();
+}
+
+void ossimAlphaSensorSupportData::reset()
+{
+   m_imageSize.makeNan();
+}
+
+
+bool ossimAlphaSensorSupportData::readSupportFiles(const ossimFilename& hdrFile)
+{
+   bool readOK = false;
+
+   // Read ENVI hdr file
+   ossimEnviHeader hdr;
+   if ( hdr.open(hdrFile) )
+   {
+      readOK= readSupportFiles( hdr );
+   }
+   return readOK;
+}
+
+bool ossimAlphaSensorSupportData::readSupportFiles(const ossimEnviHeader& hdr)
+{
+   bool readOK = readHdrFile(hdr);
+
+   ossimFilename txtFile = hdr.getFile();
+   
+   if ( readOK )
+   {
+      // Derive associated insgps.txt file name
+      if (m_isHSI)
+      {
+         // HSI:
+         //  Associated file is located in /NavData, sub-directory of current container
+         //   example:
+         //   .hdr = "/data/AH/2012-06-15_20-00-29/HSI/Scan_00002/2012-06-15_20-00-29.HSI.Scan_00002.scene.corrected.hsi.hdr"
+         //   .txt = "/data/AH/2012-06-15_20-00-29/HSI/Scan_00002/NavData/2012-06-15_20-00-29.HSI.Scan_00002.scene.insgps.txt"
+         // txtFile.insert(hdr.getFile().find_last_of('/'), "/NavData");
+         // txtFile.gsub("corrected.hsi.hdr", "insgps.txt");
+
+         ossimFilename navDir = hdr.getFile().path();
+         navDir = navDir.dirCat("NavData");
+         if ( navDir.exists() )
+         {
+            txtFile = navDir.dirCat( hdr.getFile().file() );
+            txtFile.gsub("corrected.hsi.hdr", "insgps.txt");
+         }
+         else
+         {
+            //-- 
+            // Example header and inertial nav support(INS) data file paths:
+            // 
+            // Header: /data/20131113/hsi/cal/001_001_hsi_cal_001.hsi.hdr
+            // INS:    /data/20131113/hsi/nav/001_001_hsi_cal_001.txt
+            //---
+            
+            // Expand header file out to absolute path:
+            txtFile = hdr.getFile().expand();
+            
+            // Substitute the "cal" directory with "nav".
+            txtFile.gsub("cal/", "nav/");
+
+            // Substitute the "hsi.hdr" directory with "txt".
+            txtFile.gsub("hsi.hdr", "txt");
+         }
+      }
+      else
+      {
+         // HRI:
+         //  Associated file is located in ../NavData, parallel to current container
+         //  There is one insgps.txt file common to multiple hdr files
+         //   example:
+         //   .hdr = "/data/AH/2012-06-15_20-00-29/HRI/HRI_2/2012-06-15_20-00-29.HRI_2.Strip_00004.corrected.hri.hdr"
+         //   .txt = "/data/AH/2012-06-15_20-00-29/HRI/NavData/2012-06-15_20-00-29.HRI.Strip_00004.insgps.txt"
+
+         // Replaced: 29 July 2013 (drb)
+         // txtFile = hdr.getFile().path();
+         // if ( txtFile.empty() )
+         // {
+         //    txtFile = txtFile.dirCat("../NavData");
+         // }
+         // else
+         // {
+         //    txtFile.replace(txtFile.find("HRI_"), 5, "NavData");
+         // }  
+         // txtFile = txtFile.dirCat( hdr.getFile().file() );
+         // txtFile.replace(txtFile.find("HRI_"), 5, "HRI");
+         // txtFile.gsub("corrected.hri.hdr", "insgps.txt");
+         // 
+         // with:
+
+         ossimFilename navDir = hdr.getFile().path();
+         if ( navDir.empty() )
+         {
+            navDir = navDir.dirCat("../NavData");
+         }
+         else
+         {
+            std::string::size_type pos = navDir.find("HRI_");
+            if(pos!=std::string::npos)
+            {
+               navDir = navDir.replace(pos, 5, "NavData");
+            }
+         }
+         if ( navDir.exists() )
+         {
+            txtFile = navDir.dirCat( hdr.getFile().file() );
+            std::string::size_type pos = txtFile.find("HRI_");
+            if(pos!=std::string::npos)
+            {
+               txtFile.replace(pos, 5, "HRI");
+            }
+            txtFile.gsub("corrected.hri.hdr", "insgps.txt");
+         }
+         else
+         {
+            navDir = "../nav";
+            txtFile = navDir.dirCat( hdr.getFile().file() );
+            txtFile.gsub("hri.hdr", "txt");
+         }
+      }            
+
+      // Read .txt file
+      readOK = readInsGpsFile(txtFile);
+   }    
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimAlphaSensorSupportData::readSupportFiles DEBUG:"
+         << "\n hdrFile = " << hdr.getFile()
+         << "\n txtFile = " << txtFile
+         << std::endl;
+   }
+
+   return readOK;
+}
+
+bool ossimAlphaSensorSupportData::readHdrFile(const ossimFilename& hdrFile)
+{
+   bool result = false;
+   ossimEnviHeader hdr;
+   if ( hdr.open(hdrFile) )
+   {
+      result = readHdrFile( hdr );
+   }
+   return result;
+}
+
+bool ossimAlphaSensorSupportData::readHdrFile(const ossimEnviHeader& hdr)
+{
+   bool result = false;
+
+   while( 1 )
+   {
+      // Required stuff will break from loop if not found/valid.
+
+      m_sensorType = hdr.getSensorType();
+      if ( m_sensorType.empty() ) break;
+      
+      if ( m_sensorType == "Unknown" )
+      {
+         // Make an assumption from file name...
+         if ( hdr.getFile().file().contains( ossimString("HSI") ) )
+         {
+            m_sensorType = "ACES_YOGI-HSI";
+         }
+         else if (  hdr.getFile().file().contains( ossimString("HRI") ) )
+         {
+            m_sensorType = "ACES_YOGI-HRI2";
+         }
+      }
+
+      if ( m_sensorType == "Unknown" )
+      {
+         break; // Get out...
+      }
+
+      // Set the hsi flag:
+      if ( m_sensorType.contains("HSI") || (hdr.getBands() > 63 ) ) // arbitrary...
+      {
+         m_isHSI = true;
+      }
+      else
+      {
+         m_isHSI = false;
+      }
+
+      m_imageSize.x = hdr.getSamples();
+      m_imageSize.y = hdr.getLines();
+      if ( !m_imageSize.x || !m_imageSize.y ) break;
+      
+      ossimString value;
+ 
+      hdr.getValue("roll bias", value);
+      if ( value.size() )
+      {
+         m_rollBias = ossimString::toDouble(value);
+      }
+      else
+      {
+         break;
+      }
+
+      hdr.getValue("pitch bias", value);
+      if ( value.size() )
+      {
+         m_pitchBias = ossimString::toDouble(value);
+      }
+      else
+      {
+         break;
+      }
+
+      hdr.getValue("heading bias", value);
+      if ( value.size() )
+      {
+         m_headingBias = ossimString::toDouble(value);
+      }
+      else
+      {
+         break;
+      }
+
+      hdr.getValue("fpa fov deg", value);
+      if ( value.size() )
+      {
+         m_fov = ossimString::toDouble(value);
+      }
+      else
+      {
+         break;
+      }
+
+      hdr.getValue("slit rotation deg", value);
+      if ( value.size() )
+      {
+         m_slitRot = ossimString::toDouble(value);
+      }
+      else
+      {
+         // Removed requirement. Missing in some support data and always 0 when present.
+         if ( traceDebug() )
+         {
+            ossimNotify(ossimNotifyLevel_NOTICE)
+               << "Missing: \"slit rotation deg\"\n";
+         }
+      }
+
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimAlphaSensorSupportData::readHdrFile DEBUG:"
+            << "\n getSensorType = " << m_sensorType
+            << "\n getSamples = " << m_imageSize.x
+            << "\n getLines = " << m_imageSize.y
+            << "\n roll bias = " << m_rollBias
+            << "\n pitch bias = " << m_pitchBias
+            << "\n heading bias = " << m_headingBias
+            << "\n fpa fov deg = " << m_fov
+            << "\n slit rotation deg = " << m_slitRot
+            << "\n";
+      }
+
+      // Last two lines of while forever.  If we get here, set status true and break out.
+      result = true;
+      break;
+   }
+
+   return result;
+
+} // End: bool ossimAlphaSensorSupportData::readHdrFile(const ossimEnviHeader& )
+
+bool ossimAlphaSensorSupportData::readInsGpsFile(const ossimFilename& file)
+{
+   bool result = true;
+
+   static const char M[] = "ossimAlphaSensorSupportData::readInsGpsFile";
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << M << " entered:\n" << "file: " << file << "\n";
+   }
+   
+   std::ifstream in(file.c_str(), std::ios::in);
+   if ( in.good() )
+   {
+      ossim_float64 inum;
+      ossim_float64 roll;
+      ossim_float64 pitch;
+      ossim_float64 heading;
+      ossim_float64 lon;
+      ossim_float64 lat;
+      ossim_float64 alt;
+      ossim_float64 scanAng;
+      int res;
+      int frm;
+      const ossim_float64 BOGUS = -99999.0; // To detect read error/missing value.
+      ossim_float64 timeCode = BOGUS;
+
+      std::vector< ossim_uint32 > lines;
+
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimAlphaSensorSupportData::readInsGpsFile DEBUG:" << std::endl;
+         ossimNotify(ossimNotifyLevel_DEBUG)<<std::setprecision(8);
+         ossimNotify(ossimNotifyLevel_DEBUG)<<std::setiosflags(std::ios_base::scientific);
+
+      }
+
+      // Format: line,roll,pitch,heading,lon,lat,alt,scanAngle,reserved,frame,time
+
+      // Check the first line.  Some data has a phantom line, some starts with good data.
+      std::string line1;
+      std::getline( in, line1 );
+      ossim_uint32 fields = 0;
+      if ( line1.size() )
+      {
+         std::string s;
+         std::istringstream tmpStr( line1 );
+         while ( !tmpStr.eof() )
+         {
+            tmpStr >> s;
+            if ( s.size() )
+            {
+               ++fields;
+               s.clear();
+            }
+         }
+         if ( fields == 11 )
+         {
+            // First line is valid.
+            in.seekg( 0, std::ios_base::beg );
+         }
+      }
+
+      while( !in.eof() )
+      {
+         // To detect read error/missing value. Check eof was missing last line.
+         timeCode = BOGUS; 
+         
+         in >> inum >> roll >> pitch >> heading >> lon >> lat
+            >> alt >> scanAng >> res >> frm >> timeCode;
+
+         // if(!in.eof())
+         if ( timeCode != BOGUS )
+         {
+            lines.push_back(inum);
+            m_roll.push_back(roll);
+            m_pitch.push_back(pitch);
+            m_heading.push_back(heading);
+            m_lon.push_back(lon);
+            m_lat.push_back(lat);
+            m_alt.push_back(alt);
+            m_scanAng.push_back(scanAng);
+          }
+      }
+      
+      // Make sure we have a value per line
+      if( (lines.size() < m_imageSize.y) || (lines.size() < 10) )
+      {
+         return false;
+      }
+
+      // Load independent variable (line number, referenced to first line)
+      vector< ossimPolynom< ossim_float64 , 1 >::VAR_TUPLE >::iterator pit;
+      m_imgLine.resize(lines.size());
+      int j;
+      for (pit=m_imgLine.begin(), j=0; pit!=m_imgLine.end(); ++pit,++j)
+      {
+         pit->push_back(lines[j]-lines[0]);
+      }
+
+      // Dependent variable solutions follow...
+      double rms=0.0;
+
+      // Exponent sets
+      std::vector< ossimPolynom<ossim_float64,1>::EXPT_SET > expSet;
+      expSet.resize(MAX_TERMS);
+      ossimPolynom<ossim_float64,1>::EXP_TUPLE et(1);
+      for (int numExp=1; numExp<=MAX_TERMS; ++numExp)
+      {
+         for(int o=0; o<numExp ; ++o)
+         {
+            et[0]=o;
+            expSet[numExp-1].insert(et);
+         }
+      }
+
+      // Polynomial classes
+      //  scanAngle
+      ossimPolynom<ossim_float64,1> saPoly;
+      //  orientation angles (roll, pitch, heading)
+      ossimPolynom<ossim_float64,1> rPoly;
+      ossimPolynom<ossim_float64,1> pPoly;
+      ossimPolynom<ossim_float64,1> hPoly;
+      //  position (longitude, latitude, altitude)
+      ossimPolynom<ossim_float64,1> lonPoly;
+      ossimPolynom<ossim_float64,1> latPoly;
+      ossimPolynom<ossim_float64,1> altPoly;
+
+      // Solve for polynomial coefficients
+      if (m_isHSI)
+      {
+         result = saPoly.SLSfit(expSet[SCAN_ANGLE_DEG], m_imgLine, m_scanAng, &rms);
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "\n SA  poly deg, rms error = "
+               << SCAN_ANGLE_DEG << ", " << ossim::radiansToDegrees(rms) << " deg";
+         }
+      }
+      if (result)
+      {
+         result = rPoly.SLSfit(expSet[ROLL_DEG], m_imgLine, m_roll, &rms);
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "\n R   poly deg, rms error = "
+               << ROLL_DEG << ", " << ossim::radiansToDegrees(rms) << " deg";
+         }
+
+         if (result)
+         {
+            result = pPoly.SLSfit(expSet[PITCH_DEG], m_imgLine, m_pitch, &rms);
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << "\n P   poly deg, rms error = "
+                  << PITCH_DEG << ", " << ossim::radiansToDegrees(rms) << " deg";
+            }
+
+            if (result)
+            {
+               result = hPoly.SLSfit(expSet[HEADING_DEG], m_imgLine, m_heading, &rms);
+               if (traceDebug())
+               {
+                  ossimNotify(ossimNotifyLevel_DEBUG)
+                     << "\n H   poly deg, rms error = "
+                     << HEADING_DEG << ", " << ossim::radiansToDegrees(rms) << " deg";
+               }
+
+               if (result)
+               {
+                  result = lonPoly.SLSfit(expSet[LON_DEG], m_imgLine, m_lon, &rms);
+                  if (traceDebug())
+                  {
+                     ossimNotify(ossimNotifyLevel_DEBUG)
+                        << "\n Lon poly deg, rms error = "
+                        << LON_DEG << ", " << ossim::radiansToDegrees(rms) << " deg";
+                  }
+
+                  if (result)
+                  {
+                     result = latPoly.SLSfit(expSet[LAT_DEG], m_imgLine, m_lat, &rms);
+                     if (traceDebug())
+                     {
+                        ossimNotify(ossimNotifyLevel_DEBUG)
+                           << "\n Lat poly deg, rms error = "
+                           << LAT_DEG << ", " << ossim::radiansToDegrees(rms) << " deg";
+                     }
+
+                     if (result)
+                     {
+                        result = altPoly.SLSfit(expSet[ALT_DEG], m_imgLine, m_alt, &rms);
+                        if (traceDebug())
+                        {
+                           ossimNotify(ossimNotifyLevel_DEBUG)
+                              << "\n Alt poly deg, rms error = "
+                              << ALT_DEG << ", " << rms << " mtr";
+                        }
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+      if (result)
+      {
+         // Save coefficients
+         ossimPolynom<ossim_float64,1>::MONOM_MAP::const_iterator it;
+         for (it = rPoly.getMonoms().begin(); it != rPoly.getMonoms().end() ; ++it )
+         {
+            m_rollPolyCoef.push_back(it->second);
+         }
+         for (it = pPoly.getMonoms().begin(); it != pPoly.getMonoms().end() ; ++it )
+         {
+            m_pitchPolyCoef.push_back(it->second);
+         }
+         for (it = hPoly.getMonoms().begin(); it != hPoly.getMonoms().end() ; ++it )
+         {
+            m_headingPolyCoef.push_back(it->second);
+         }
+         for (it = lonPoly.getMonoms().begin(); it != lonPoly.getMonoms().end() ; ++it )
+         {
+            m_lonPolyCoef.push_back(it->second);
+         }
+         for (it = latPoly.getMonoms().begin(); it != latPoly.getMonoms().end() ; ++it )
+         {
+            m_latPolyCoef.push_back(it->second);
+         }
+         for (it = altPoly.getMonoms().begin(); it != altPoly.getMonoms().end() ; ++it )
+         {
+            m_altPolyCoef.push_back(it->second);
+         }
+         if (m_isHSI)
+         {
+            for (it = saPoly.getMonoms().begin(); it != saPoly.getMonoms().end() ; ++it )
+            {
+               m_scanAngPolyCoef.push_back(it->second);
+            }
+         }
+         else
+         {
+            m_scanAngPolyCoef.push_back(0.0);
+         }
+      }
+
+
+      if (traceDebug())
+      {
+         if (result)
+         {
+            vector<ossim_float64> inp(1);
+            inp[0] = 510.0;
+            ossimNotify(ossimNotifyLevel_DEBUG) << "\n Test eval line number = " << inp[0] << endl;
+            if (m_isHSI)
+            {
+               saPoly.print(ossimNotify(ossimNotifyLevel_DEBUG));
+               ossim_float64 sa = saPoly.eval(inp);
+               ossimNotify(ossimNotifyLevel_DEBUG)<<"\n sa="<<sa<<endl;
+            }
+            rPoly.print(ossimNotify(ossimNotifyLevel_DEBUG));
+            ossim_float64 rr = rPoly.eval(inp);
+            ossimNotify(ossimNotifyLevel_DEBUG)<<"\n r="<<rr<<endl;
+
+            pPoly.print(ossimNotify(ossimNotifyLevel_DEBUG));
+            ossim_float64 pp = pPoly.eval(inp);
+            ossimNotify(ossimNotifyLevel_DEBUG)<<"\n p="<<pp<<endl;
+
+            hPoly.print(ossimNotify(ossimNotifyLevel_DEBUG));
+            ossim_float64 hh = hPoly.eval(inp);
+            ossimNotify(ossimNotifyLevel_DEBUG)<<"\n h="<<hh<<endl;
+
+            lonPoly.print(ossimNotify(ossimNotifyLevel_DEBUG));
+            ossim_float64 lon = lonPoly.eval(inp);
+            ossimNotify(ossimNotifyLevel_DEBUG)<<"\n lon="<<lon<<endl;
+
+            latPoly.print(ossimNotify(ossimNotifyLevel_DEBUG));
+            ossim_float64 lat = latPoly.eval(inp);
+            ossimNotify(ossimNotifyLevel_DEBUG)<<"\n lat="<<lat<<endl;
+
+            altPoly.print(ossimNotify(ossimNotifyLevel_DEBUG));
+            ossim_float64 alt = altPoly.eval(inp);
+            ossimNotify(ossimNotifyLevel_DEBUG)<<"\n alt="<<alt<<endl;
+         }
+         else
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "  ...polynomial solution error for file: " << file << std::endl;
+         }
+      }
+   }
+   else
+   {
+      result = false;
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "Could not open: " << file << "\n";
+      }
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << M << " exit status = " << ( result ? "true" : "false" ) << "\n";
+   }
+   
+   return result;
+}
+
+const ossimDpt& ossimAlphaSensorSupportData::getImageSize()const
+{
+   return m_imageSize;
+}
+
+const ossim_float64& ossimAlphaSensorSupportData::getRollBias()const
+{
+   return m_rollBias;
+}
+
+const ossim_float64& ossimAlphaSensorSupportData::getPitchBias()const
+{
+   return m_pitchBias;
+}
+
+const ossim_float64& ossimAlphaSensorSupportData::getHeadingBias()const
+{
+   return m_headingBias;
+}
+
+const ossim_float64& ossimAlphaSensorSupportData::getFov()const
+{
+   return m_fov;
+}
+
+const ossim_float64& ossimAlphaSensorSupportData::getSlitRot()const
+{
+   return m_slitRot;
+}
+
+const std::vector< ossim_float64 >& ossimAlphaSensorSupportData::getRollPoly()const
+{
+   return m_rollPolyCoef;
+}
+
+const std::vector< ossim_float64 >& ossimAlphaSensorSupportData::getPitchPoly()const
+{
+   return m_pitchPolyCoef;
+}
+
+const std::vector< ossim_float64 >& ossimAlphaSensorSupportData::getHeadingPoly()const
+{
+   return m_headingPolyCoef;
+}
+
+const std::vector< ossim_float64 >& ossimAlphaSensorSupportData::getLonPoly()const
+{
+   return m_lonPolyCoef;
+}
+
+const std::vector< ossim_float64 >& ossimAlphaSensorSupportData::getLatPoly()const
+{
+   return m_latPolyCoef;
+}
+
+const std::vector< ossim_float64 >& ossimAlphaSensorSupportData::getAltPoly()const
+{
+   return m_altPolyCoef;
+}
+
+const std::vector< ossim_float64 >& ossimAlphaSensorSupportData::getScanPoly()const
+{
+   return m_scanAngPolyCoef;
+}
+
+
+// Hidden from use...
+ossimAlphaSensorSupportData::ossimAlphaSensorSupportData(const ossimAlphaSensorSupportData& /* src */)
+{
+}
+
+ossimAlphaSensorSupportData& ossimAlphaSensorSupportData::operator=(
+   const ossimAlphaSensorSupportData& /* src */)
+{
+   return *this;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimApplanixEOFile.cpp b/ossim/src/ossim/support_data/ossimApplanixEOFile.cpp
new file mode 100644
index 0000000..30897c1
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimApplanixEOFile.cpp
@@ -0,0 +1,691 @@
+//*******************************************************************
+//
+// MIT
+// 
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimApplanixEOFile.cpp 23666 2015-12-14 20:01:22Z rashadkm $
+
+#include <ossim/support_data/ossimApplanixEOFile.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimRegExp.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimCommon.h>
+#include <iterator>
+#include <fstream>
+#include <sstream>
+#include <iostream>
+#include <iomanip>
+
+static ossimTrace traceDebug("ossimApplanixEOFile:debug");
+
+static std::istream& applanix_skipws(std::istream& in)
+{
+   int c = in.peek();
+   while(((c == ' ') ||
+          (c == '\r') ||
+          (c == '\t') ||
+          (c == '\n'))&&
+         (in.good()))
+   {
+      in.ignore(1);
+      c = in.peek();
+   }
+   
+   return in;
+}
+
+std::ostream& operator <<(std::ostream& out, const ossimApplanixEORecord& src)
+{
+   if(src.theField.size())
+   {
+      std::copy(src.theField.begin(),
+                src.theField.end(),
+                std::ostream_iterator<ossimString>(out, " "));
+   }
+
+   return out;
+}
+
+std::ostream& operator <<(std::ostream& out, const ossimApplanixEOFile& src)
+{
+   ossim_uint32 idx = 0;
+   out << src.theHeader << std::endl << std::endl;
+
+   if(src.theRecordFormat.size())
+   {
+      std::copy(src.theRecordFormat.begin(),
+                src.theRecordFormat.end()-1,
+                std::ostream_iterator<ossimString>(out, ", "));
+      out << *(src.theRecordFormat.end()-1);
+      out << std::endl;
+   }
+
+   out << "Kappa Cardinal Rotation = " << src.theKappaCardinal << std::endl;
+   out << "Bore Sight tx = " << src.theBoreSightTx << std::endl
+       << "Bore Sight ty = " << src.theBoreSightTy << std::endl
+       << "Bore Sight tz = " << src.theBoreSightTz << std::endl;
+   
+   out << "Lever arm lx = " << src.theLeverArmLx << std::endl
+       << "Lever arm ly = " << src.theLeverArmLy << std::endl
+       << "Lever arm lz = " << src.theLeverArmLz << std::endl;
+   
+   out << "Shift Value X = " << src.theShiftValuesX << std::endl
+       << "Shift Value Y = " << src.theShiftValuesY << std::endl
+       << "Shift Value Z = " << src.theShiftValuesZ << std::endl;
+   
+   out << "Mapping Frame Datum      = " << src.theMappingFrameDatum      << std::endl
+       << "Mapping Frame Projection = " << src.theMappingFrameProjection << std::endl
+       << "Central Meridian         = " << src.theCentralMeridian << std::endl
+       << "Origin of Latitude       = " << src.theOriginLatitude  << std::endl
+       << "Grid Scale Factor        = " << src.theGridScaleFactor << std::endl
+       << "False easting            = " << src.theFalseEasting    << std::endl
+       << "False northing           = " << src.theFalseNorthing   << std::endl;
+
+   out << "theUtmZone               = " << src.theUtmZone << std::endl;
+   out << "theUtmHemisphere         = " << src.theUtmHemisphere << std::endl;
+   
+   if(src.theApplanixRecordList.size())
+   {
+      out << std::endl;
+      for(idx = 0; idx < src.theApplanixRecordList.size()-1; ++idx)
+      {
+         out << *(src.theApplanixRecordList[idx]) << std::endl;
+      }
+      out << *(src.theApplanixRecordList[idx]);
+      
+   }
+
+   return out;
+}
+
+ossimApplanixEOFile::ossimApplanixEOFile()
+{
+   theMinLat = ossim::nan();
+   theMinLon = ossim::nan();
+   theMaxLat = ossim::nan();
+   theMaxLon = ossim::nan();
+}
+
+bool ossimApplanixEOFile::parseFile(const ossimFilename& file)
+{
+   std::ifstream in(file.c_str());
+
+   return parseStream(in);
+}
+
+bool ossimApplanixEOFile::isEOFile(const ossimFilename& file)const
+{
+   std::ifstream in(file.c_str());
+
+   return isEOFile(in);
+}
+
+bool ossimApplanixEOFile::isEOFile(std::istream& in)const
+{
+   ossimString header;
+
+   return parseHeader(in, header);
+}
+
+bool ossimApplanixEOFile::parseStream(std::istream& in)
+{
+   theRecordIdMap.clear();
+   ossimString line;
+   int c = '\0';
+   if(!parseHeader(in, theHeader))
+   {
+      return false;
+   }
+
+   // now parse parameters
+   in>>applanix_skipws;
+   line = "";
+   while(in.good()&&
+         !line.contains("RECORD FORMAT"))
+   {
+      std::getline(in, line.string());
+      line = line.upcase();
+      line = line.substitute("\r","\n", true);
+      if(line.contains("KAPPA CARDINAL"))
+      {
+         theKappaCardinal = line;
+         theKappaCardinal = theKappaCardinal.substitute("KAPPA CARDINAL ROTATION","");
+         theKappaCardinal = theKappaCardinal.substitute(":","");
+         theKappaCardinal = theKappaCardinal.substitute("\n","");
+      }
+      else if(line.contains("LEVER ARM"))
+      {
+         ossimKeywordlist kwl('=');
+         line = line.substitute("LEVER ARM VALUES:",
+                                "");
+         line = line.substitute(",",
+                                "\n",
+                                true);
+         std::istringstream in(line);
+
+         kwl.parseStream(in);
+
+         theLeverArmLx = kwl.find("LX");
+         theLeverArmLy = kwl.find("LY");
+         theLeverArmLz = kwl.find("LZ");
+      }
+      else if(line.contains("BORESIGHT VALUES"))
+      {
+         ossimKeywordlist kwl('=');
+         line = line.substitute("BORESIGHT VALUES:",
+                                "");
+         line = line.substitute(",",
+                                "\n",
+                                true);
+
+         std::istringstream in(line);
+
+         kwl.parseStream(in);
+
+         
+         theBoreSightTx = kwl.find("TX");
+         theBoreSightTy = kwl.find("TY");
+         theBoreSightTz = kwl.find("TZ");
+      }
+      else if(line.contains("SHIFT VALUES:"))
+      {
+         ossimKeywordlist kwl('=');
+         line = line.substitute("SHIFT VALUES:","");
+         line = line.substitute(",",
+                                "\n",
+                                true);
+
+         std::istringstream in(line);
+         kwl.parseStream(in);
+
+         
+         theShiftValuesX = kwl.find("X");
+         theShiftValuesY = kwl.find("Y");
+         theShiftValuesZ = kwl.find("Z");
+         
+      }
+      else if(line.contains("GRID:"))
+      { 
+         ossimKeywordlist kwl(':');
+         line = line.substitute(";",
+                                "\n",
+                                true);
+         std::istringstream in(line);
+         kwl.parseStream(in);
+         theUtmZone = kwl.find("ZONE");
+
+         if(theUtmZone.contains("NORTH"))
+         {
+            theUtmHemisphere = "North";
+         }
+         else
+         {
+            theUtmHemisphere = "South";
+         }
+          theUtmZone = theUtmZone.replaceAllThatMatch("UTM|\\(.*\\)|NORTH|SOUTH","");
+          theUtmZone = theUtmZone.trim();
+      }
+      else if(line.contains("FRAME DATUM"))
+      {
+         ossimKeywordlist kwl(':');
+         line = line.substitute(";",
+                                "\n",
+                                true);
+         std::istringstream in(line);
+         kwl.parseStream(in);
+
+         theMappingFrameDatum = kwl.find("MAPPING FRAME DATUM");
+         theMappingFrameProjection = kwl.find("MAPPING FRAME PROJECTION");
+         theMappingFrameDatum = theMappingFrameDatum.trim();
+         theMappingFrameProjection = theMappingFrameProjection.trim();
+      }
+      else if(line.contains("POSPROC SBET"))
+      {
+         theSbetField = line.after(":");
+         theSbetField = theSbetField.trim();
+      }
+      else if(line.contains("CENTRAL MERIDIAN"))
+      {
+         theCentralMeridian = line;
+         theCentralMeridian = theCentralMeridian.substitute("CENTRAL MERIDIAN","");
+         theCentralMeridian = theCentralMeridian.substitute("=","");
+         theCentralMeridian = theCentralMeridian.substitute("DEG","");
+         theCentralMeridian = theCentralMeridian.substitute(";","");
+      }
+      else if(line.contains("LATITUDE OF THE GRID ORIGIN"))
+      {
+         ossimKeywordlist kwl('=');
+         line = line.substitute(";",
+                                "\n",
+                                true);
+         std::istringstream in(line);
+         kwl.parseStream(in);
+
+         theOriginLatitude  = kwl.find("LATITUDE OF THE GRID ORIGIN");
+         theGridScaleFactor = kwl.find("GRID SCALE FACTOR");
+      }
+      else if(line.contains("FALSE EASTING"))
+      {
+         ossimKeywordlist kwl('=');
+         line = line.substitute(";",
+                                "\n",
+                                true);
+         std::istringstream in(line);
+         kwl.parseStream(in);
+
+         theFalseEasting  = kwl.find("FALSE EASTING");
+         theFalseNorthing = kwl.find("FALSE NORTHING");
+      }
+   }
+
+   in>>applanix_skipws;
+
+   c = in.get();
+
+   std::vector<ossimString> fieldArray;
+   ossimString field;
+
+   while(in.good()&&
+         (c!='\n')&&
+         (c!='\r'))
+   {
+      field = "";
+      while((c != ',')&&
+            (c != '\n')&&
+            (c != '\r'))
+      {
+         field += (char)c;
+         c = in.get();
+      }
+      if((c!='\n')&&
+         (c!='\r'))
+      {
+         c = in.get();
+      }
+      field = field.trim();
+      if(field != "")
+      {
+         theRecordFormat.push_back(field);
+      }
+   }
+   in>>applanix_skipws;
+
+   if(in.peek() == '(')
+   {
+      std::getline(in, line.string());
+   }
+   in>>applanix_skipws;
+   ossimRefPtr<ossimApplanixEORecord> record = new ossimApplanixEORecord((ossim_uint32)theRecordFormat.size());
+   ossim_int32 latIdx = getFieldIdx("LAT");
+   ossim_int32 lonIdx = getFieldIdx("LONG");;
+   bool hasLatLon = (latIdx >=0)&&(lonIdx >= 0);
+
+   
+   if(hasLatLon)
+   {
+      theMinLat = 90.0;
+      theMaxLat = -90.0;
+      theMinLon = 180.0;
+      theMaxLon = -180.0;
+   }
+   else
+   {
+      theMinLat = ossim::nan();
+      theMaxLat = ossim::nan();
+      theMinLon = ossim::nan();
+      theMaxLon = ossim::nan();
+   }
+   
+   while(in.good()&&theRecordFormat.size())
+   {
+      std::getline(in, line.string());
+      line = line.trim();
+      if(line != "")
+      {
+         std::istringstream inStr(line);
+         ossim_uint32 idx;
+         ossimString value;
+
+         for(idx = 0; idx < theRecordFormat.size(); ++idx)
+         {
+            inStr >> (*record)[idx];
+         }
+         if(hasLatLon)
+         {
+            double lat = (*record)[latIdx].toDouble();
+            double lon = (*record)[lonIdx].toDouble();
+
+            if(lat<theMinLat) theMinLat = lat;
+            if(lat>theMaxLat) theMaxLat = lat;
+            if(lon<theMinLon) theMinLon = lon;
+            if(lon>theMaxLon) theMaxLon = lon;
+            
+         }
+         theApplanixRecordList.push_back(new ossimApplanixEORecord(*record));
+      }
+   }
+   indexRecordIds();
+
+   if(traceDebug())
+   {
+      if(hasLatLon)
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << "min lat: " << theMinLat << std::endl
+                                             << "min lon: " << theMinLon << std::endl
+                                             << "max lat: " << theMaxLat << std::endl
+                                             << "max lon: " << theMaxLon << std::endl;
+      }
+   }
+   return true;
+}
+
+bool ossimApplanixEOFile::parseHeader(const ossimFilename& file,
+                                      ossimString& header)const
+{
+   std::ifstream in(file.c_str());
+
+   return parseHeader(in, header);
+}
+
+bool ossimApplanixEOFile::parseHeader(std::istream& in,
+                                      ossimString& header)const
+{
+   header = "";
+   in >> applanix_skipws;
+
+   int c = in.peek();
+   
+   if((c!='*')||
+      (!in.good()))
+   {
+      return false;
+   }
+   ossimString line;
+
+   std::getline(in, line.string());
+   line = line .substitute("\r",
+                           "\n");
+   if(!line.contains("************"))
+   {
+      return false;
+   }
+
+   header = line;
+   header += "\n";
+
+   in>>applanix_skipws;
+   std::getline(in, line.string());
+   line = line .substitute("\r",
+                           "\n");
+   
+   while((in.good())&&
+         (!line.contains("***********")))
+   {
+      header += line;
+      header += "\n";
+      std::getline(in, line.string());
+      line = line .substitute("\r",
+                              "\n");
+   }
+   header += line;
+   header += "\n";
+
+   if(!header.contains("Applanix"))
+   {
+      return false;
+   }
+   
+   return true;
+}
+
+void ossimApplanixEOFile::indexRecordIds()
+{
+   ossimString id;
+   ossim_uint32 idx;
+   ossim_int32 idIdx = getFieldIdxLike("ID");
+   ossim_uint32 size = (ossim_uint32)theApplanixRecordList.size();
+   theRecordIdMap.clear();
+
+   if(idIdx < 0) return;
+
+   for(idx = 0; idx < size; ++idx)
+   {
+      id = (*theApplanixRecordList[idx])[idIdx];
+      theRecordIdMap.insert(std::make_pair(id, theApplanixRecordList[idx]));
+   }
+}
+
+ossim_int32 ossimApplanixEOFile::getFieldIdxLike(const ossimString& searchKey)const
+{
+   ossimString key = searchKey;
+   ossim_uint32 idx = 0;
+   key = key.upcase();
+
+   for(idx = 0; idx < theRecordFormat.size(); ++idx)
+   {
+      if(ossimString::upcase(theRecordFormat[idx]).contains(key))
+      {
+         return (int)idx;
+      }
+   }
+
+   return -1;
+}
+
+ossim_int32 ossimApplanixEOFile::getFieldIdx(const ossimString& searchKey)const
+{
+   ossimString key = searchKey;
+   ossim_uint32 idx = 0;
+   
+   key = key.upcase();
+
+   for(idx = 0; idx < theRecordFormat.size(); ++idx)
+   {
+      if(ossimString::upcase(theRecordFormat[idx]) == key)
+      {
+         return (int)idx;
+      }
+   }
+   
+   return -1;
+}
+
+
+const ossimRefPtr<ossimApplanixEORecord> ossimApplanixEOFile::getRecordGivenId(const ossimString& id)const
+{
+
+   if(theRecordIdMap.size())
+   {
+      std::map<ossimString, ossimRefPtr<ossimApplanixEORecord>,
+         ossimStringLtstr >::const_iterator iter = theRecordIdMap.find(id);
+      
+      if(iter!=theRecordIdMap.end())
+      {
+         return iter->second;
+      }
+   }
+   else
+   {
+      ossim_uint32 idx;
+      ossim_int32 idxId = getFieldIdx("ID");
+      
+      if(idxId >= 0)
+      {
+         for(idx = 0; idx < theApplanixRecordList.size(); ++idx)
+         {
+            if((*theApplanixRecordList[idx])[idxId] == id)
+            {
+               return theApplanixRecordList[idx];
+            }
+         }
+      }
+   }
+   
+   return 0;
+}
+
+ossim_uint32 ossimApplanixEOFile::getNumberOfRecords()const
+{
+   return (ossim_uint32)theApplanixRecordList.size();
+}
+
+const ossimRefPtr<ossimApplanixEORecord> ossimApplanixEOFile::getRecord(ossim_uint32 idx)const
+{
+   if(idx < theApplanixRecordList.size())
+   {
+      return theApplanixRecordList[idx];
+   }
+   
+   return 0;
+}
+
+bool ossimApplanixEOFile::isHeightAboveMSL()const
+{
+   return (getFieldIdx("ORTHOMETRIC HEIGHT") >= 0);
+}
+
+bool ossimApplanixEOFile::isEcefModel()const
+{
+   ossim_int32 xIdx = getFieldIdx("X");
+   ossim_int32 yIdx = getFieldIdx("Y");
+   ossim_int32 zIdx = getFieldIdx("Z");
+   ossim_int32 rollIdx = getFieldIdx("ROLL");
+   ossim_int32 pitchIdx = getFieldIdx("PITCH");
+   ossim_int32 headingIdx = getFieldIdx("HEADING");
+
+   return ((xIdx >=0)&&
+           (yIdx >=0)&&
+           (zIdx >=0)&&
+           (rollIdx>=0)&&
+           (pitchIdx>=0)&&
+           (headingIdx>=0));
+}
+
+
+bool ossimApplanixEOFile::isUtmFrame()const
+{
+   return ((getFieldIdxLike("EASTING")>=0)&&
+            (getFieldIdxLike("NORTHING") >=0)&&
+            (getFieldIdxLike("HEIGHT") >= 0)&&
+            (getFieldIdxLike("OMEGA") >=0)&&
+            (getFieldIdxLike("PHI") >=0)&&
+            (getFieldIdxLike("KAPPA") >=0));
+            
+   return (getUtmZone() >= 0.0);
+}
+
+ossim_int32 ossimApplanixEOFile::getUtmZone()const
+{
+   return theUtmZone.toInt32();
+}
+
+ossimString ossimApplanixEOFile::getUtmHemisphere()const
+{
+   return theUtmHemisphere;
+}
+
+ossimString ossimApplanixEOFile::getSbetField()const
+{
+   return theSbetField;
+}
+
+double ossimApplanixEOFile::getBoreSightTx()const
+{
+   return theBoreSightTx.toDouble();
+}
+
+double ossimApplanixEOFile::getBoreSightTy()const
+{
+   return theBoreSightTy.toDouble();
+}
+
+double ossimApplanixEOFile::getBoreSightTz()const
+{
+   return theBoreSightTz.toDouble();
+}
+
+double ossimApplanixEOFile::getLeverArmLx()const
+{
+   return theLeverArmLx.toDouble();
+}
+
+double ossimApplanixEOFile::getLeverArmLy()const
+{
+   return theLeverArmLy.toDouble();
+}
+
+double ossimApplanixEOFile::getLeverArmLz()const
+{
+   return theLeverArmLz.toDouble();
+}
+
+double ossimApplanixEOFile::getKardinalKappa()const
+{
+   return theKappaCardinal.toDouble();
+}
+
+double ossimApplanixEOFile::getShiftValuesX()const
+{
+   return theShiftValuesX.toDouble();
+}
+
+double ossimApplanixEOFile::getShiftValuesY()const
+{
+   return theShiftValuesY.toDouble();
+}
+
+double ossimApplanixEOFile::getShiftValuesZ()const
+{
+   return theShiftValuesZ.toDouble();
+}
+
+ossimString ossimApplanixEOFile::getMappingFrameDatum()const
+{
+   return theMappingFrameDatum;
+}
+
+ossimString ossimApplanixEOFile::getMappingFrameProjection()const
+{
+   return theMappingFrameProjection;
+}
+
+double ossimApplanixEOFile::getMappingFrameCentralMeridian()const
+{
+   return theCentralMeridian.toDouble();
+}
+
+double ossimApplanixEOFile::getMappingFrameOriginLatitude()const
+{
+   return theOriginLatitude.toDouble();
+}
+
+double ossimApplanixEOFile::getMappingFrameGridScaleFactor()const
+{
+   return theGridScaleFactor.toDouble();
+}
+
+double ossimApplanixEOFile::getMappingFrameFalseEasting()const
+{
+   return theFalseEasting.toDouble();
+}
+
+double ossimApplanixEOFile::getMappingFrameFalseNorthing()const
+{
+   return theFalseNorthing.toDouble();
+}
+
+ossimString ossimApplanixEOFile::convertToOssimDatumCode(const ossimString& datum)const
+{
+   ossimString result = "WGE";
+   ossimString temp = datum;
+   temp = temp.upcase();
+
+   if(temp == "NAD83")
+   {
+      result = "NAR-C";
+   }
+
+   return result;
+}
diff --git a/ossim/src/ossim/support_data/ossimAuxFileHandler.cpp b/ossim/src/ossim/support_data/ossimAuxFileHandler.cpp
new file mode 100644
index 0000000..1e8f635
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimAuxFileHandler.cpp
@@ -0,0 +1,1139 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: SPADAC Inc
+//         Adaptd from the GDAL package hfadataset.cpp
+// Description: This class provides some simple utilities for aux file.
+//
+//********************************************************************
+// $Id: ossimAuxFileHandler.cpp 2644 2011-05-26 15:20:11Z oscar.kramer $
+
+#include <cstdio>
+#include <cstdlib>
+#include <iostream>
+
+#include <ossim/support_data/ossimAuxFileHandler.h>
+
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+using namespace std;
+
+void ossimAuxStandardFile( int nBytes, void * pData )
+
+{
+  int		i;
+  char	*entryData = (char *) pData;
+
+  for( i = nBytes/2-1; i >= 0; i-- )
+  {
+    ossim_uint8	byTemp;
+
+    byTemp = entryData[i];
+    entryData[i] = entryData[nBytes-i-1];
+    entryData[nBytes-i-1] = byTemp;
+  }
+}
+
+int ossimAuxGetDataTypeBits( int nDataType )
+
+{
+  switch( nDataType )
+  {
+  case EPT_u1:
+    return 1;
+
+  case EPT_u2:
+    return 2;
+
+  case EPT_u4:
+    return 4;
+
+  case EPT_u8:
+  case EPT_s8:
+    return 8;
+
+  case EPT_u16:
+  case EPT_s16:
+    return 16;
+
+  case EPT_u32:
+  case EPT_s32:
+  case EPT_f32:
+    return 32;
+
+  case EPT_f64:
+  case EPT_c64:
+    return 64;
+
+  case EPT_c128:
+    return 128;
+  }
+
+  return 0;
+}
+
+static char * ossimAuxGetDictionary(ossimAuxInfo* hHFA)
+
+{
+  int		nDictMax = 100;
+  char	*pszDictionary = (char *)malloc(nDictMax);
+  int		nDictSize = 0;
+
+  fseek(hHFA->fp, hHFA->nDictionaryPos, SEEK_SET );
+
+  while( true )
+  {
+    if( nDictSize >= nDictMax-1 )
+    {
+      nDictMax = nDictSize * 2 + 100;
+      pszDictionary = (char *) realloc(pszDictionary, nDictMax );
+    }
+
+    if( fread( pszDictionary + nDictSize, 1, 1, hHFA->fp ) < 1
+      || pszDictionary[nDictSize] == '\0'
+      || (nDictSize > 2 && pszDictionary[nDictSize-2] == ','
+      && pszDictionary[nDictSize-1] == '.') )
+      break;
+
+    nDictSize++;
+  }
+
+  pszDictionary[nDictSize] = '\0';
+
+  return( pszDictionary );
+}
+
+ossimAuxFileHandler::ossimAuxFileHandler()
+{
+  m_auxInfo = NULL;
+}
+
+ossimAuxFileHandler::~ossimAuxFileHandler()
+{
+  if (m_auxInfo != NULL)
+  {
+    delete m_auxInfo;
+    m_auxInfo = 0;
+  }
+}
+
+bool ossimAuxFileHandler::isAuxFile(const ossimFilename& file)
+{
+  bool result = false;
+
+  if ( file.exists() )
+  { 
+    ossimString ext = file.ext();
+    ext.downcase();
+    if (ext == "aux")
+    {
+      result = true;
+    }
+    else
+    {
+      result = false;
+    } 
+  } 
+
+  return result;
+}
+
+bool ossimAuxFileHandler::open(const ossimFilename& file)
+{
+   FILE	*fp = fopen(file.c_str(), "r");
+   char	header[16];
+   ossim_uint32	nHeaderPos;
+
+   if( fp == NULL )
+   {
+      return false;
+   }
+
+   fread( header, 16, 1, fp);
+  
+   char* tmpHeader = const_cast<char*>(header);
+   if(strcmp(tmpHeader,"EHFA_HEADER_TAG") != 0)
+   {
+      fclose( fp );
+      return false;
+   }
+
+   //Create the ossimAuxInfo                                          
+   m_auxInfo = new ossimAuxInfo();
+   m_auxInfo->fp = fp;
+ 
+   //Where is the header?						
+   fread( &nHeaderPos, sizeof(ossim_int32), 1, fp );
+
+   fseek( fp, nHeaderPos, SEEK_SET );
+
+   fread( &(m_auxInfo->nVersion), sizeof(ossim_int32), 1, fp );
+ 
+   fread( header, 4, 1, fp ); /* skip freeList */
+
+   fread( &(m_auxInfo->nRootPos), sizeof(ossim_int32), 1, fp );
+ 
+   fread( &(m_auxInfo->nEntryHeaderLength), sizeof(ossim_int16), 1, fp );
+   fread( &(m_auxInfo->nDictionaryPos), sizeof(ossim_int32), 1, fp );
+  
+   fseek( fp, 0, SEEK_END );
+   m_auxInfo->nEndOfFile = (ossim_int32) ftell(fp);
+
+   m_auxInfo->m_Root = new ossimAuxEntry( m_auxInfo, m_auxInfo->nRootPos, NULL, NULL );
+
+   m_auxInfo->dictionaryData = ossimAuxGetDictionary(m_auxInfo);
+   m_auxInfo->m_Dictionary = new ossimAuxDictionary( m_auxInfo->dictionaryData );
+
+   ossimAuxEntry	*node = m_auxInfo->m_Root->getChild();
+   while( node != NULL )
+   {
+      std::string typeStr = node->getType();
+      size_t typeLen = typeStr.length();
+      std::string str = "Eimg_Layer";
+      size_t strLen = str.length();
+      if( typeLen == strLen)
+      {
+         ossimAuxEntry* projEntry = node->getNamedChild("Map_Info");
+         if( projEntry == NULL )
+         {
+            ossimAuxEntry* childEntry;
+            for( childEntry = node->getChild(); childEntry != NULL && projEntry == NULL; childEntry = childEntry->getNext() )
+            {
+               if (ossimString(childEntry->getType()) == "Eprj_MapInfo")
+                  projEntry = childEntry;
+            }
+         }
+
+         const char* proj = NULL;
+         const char* units = NULL;
+         if (projEntry)
+         {
+            proj = projEntry->getStringField("proName");
+            units = projEntry->getStringField("units");
+         }
+      
+         if (proj != NULL)
+         {
+            m_projName = ossimString(proj);
+         }
+         if (units != NULL)
+         {
+            m_unitsType = ossimString(proj);
+         }
+
+         ossimAuxEntry* datumEntry = node->getNamedChild( "Projection.Datum" );
+         const char* datumStr = NULL;
+         if (datumEntry)
+         {
+            datumStr = datumEntry->getStringField("datumname");
+         }
+         if (datumStr != NULL)
+         {
+            m_datumName = ossimString(datumStr);;
+         }
+         break;
+      }
+      node = node->getNext();
+   }
+
+   fclose(fp);
+   return true;
+}
+
+/************************************************************************/
+/*                              ossimAuxInfo()                              */
+/************************************************************************/
+ossimAuxInfo::ossimAuxInfo()
+{
+   fp = NULL;
+   m_Root = NULL;
+   m_Dictionary = NULL;
+   dictionaryData = NULL;
+}
+
+ossimAuxInfo::~ossimAuxInfo()
+{
+   if (m_Root != NULL)
+   {
+      delete m_Root;
+      m_Root = 0;
+   }
+   
+   if (m_Dictionary != NULL)
+   {
+      delete m_Dictionary;
+      m_Dictionary = 0;
+   }
+   
+   if (dictionaryData != NULL)
+   {
+      delete[] dictionaryData;
+      dictionaryData = 0;
+   }
+}
+
+/************************************************************************/
+/*                              ossimAuxEntry()                              */
+/************************************************************************/
+
+ossimAuxEntry::ossimAuxEntry(ossimAuxInfo * auxInfoIn, ossim_uint32 nPos,
+                             ossimAuxEntry * parentIn, ossimAuxEntry * prevIn)
+
+{
+   m_auxInfo = auxInfoIn;
+
+   nFilePos = nPos;
+  
+   m_Parent = parentIn;
+   m_Prev = prevIn;
+
+   m_Next = NULL;
+   m_Child = NULL;
+   entryData = NULL;
+
+   nDataPos = nDataSize = 0;
+   nNextPos = nChildPos = 0;
+
+   entryNodeName[0] = entryType[0] = '\0';
+
+   ossim_int32	anEntryNums[6];
+ 
+   if( fseek( m_auxInfo->fp, nFilePos, SEEK_SET ) == -1
+       || fread( anEntryNums, sizeof(ossim_uint32), 6, m_auxInfo->fp ) < 1 )
+   {
+      return;
+   }
+
+   nNextPos = anEntryNums[0];
+   nChildPos = anEntryNums[3];
+   nDataPos = anEntryNums[4];
+   nDataSize = anEntryNums[5];
+
+   if( fread( entryNodeName, 1, 64, m_auxInfo->fp ) < 1
+       || fread( entryType, 1, 32, m_auxInfo->fp ) < 1 )
+   {
+      return;
+   }
+}
+ossimAuxEntry::~ossimAuxEntry()
+{
+   if( entryData != NULL )
+   {
+      delete entryData;
+      entryData = 0;
+   }
+
+   if( m_Next != NULL )
+   {
+      delete m_Next;
+      m_Next = 0;
+   }
+
+   if( m_Child != NULL )
+   {
+      delete m_Child;
+      m_Child = 0;
+   }
+}
+
+void ossimAuxEntry::setName( const char *nodeName )
+{
+   memset( entryNodeName, '\0', 64 );
+   strncpy( entryNodeName, nodeName, 64 );
+}
+
+ossimAuxEntry *ossimAuxEntry::getChild()
+{
+   if( m_Child == NULL && nChildPos != 0 )
+   {
+      m_Child = new ossimAuxEntry( m_auxInfo, nChildPos, this, NULL );
+   }
+
+   return( m_Child );
+}
+
+ossimAuxEntry* ossimAuxEntry::getNext()
+{
+   if( m_Next == NULL && nNextPos != 0 )
+   {
+      // Check if we have a loop on the next node in this sibling chain.
+      ossimAuxEntry *past;
+
+      for( past = this; 
+           past != NULL && past->nFilePos != nNextPos; 
+           past = past->m_Prev ) {}
+
+      if( past != NULL )
+      {
+         nNextPos = 0;
+         return NULL;
+      }
+
+      m_Next = new ossimAuxEntry(m_auxInfo, nNextPos, m_Parent, this );
+   }
+
+   return( m_Next );
+}
+
+void ossimAuxEntry::loadData()
+{
+   if( entryData != NULL || nDataSize == 0 )
+   {
+      return;
+   }
+
+   entryData = (char*) malloc(nDataSize);
+   if (entryData == NULL)
+   {
+      return;
+   }
+
+   if(fseek(m_auxInfo->fp, nDataPos, SEEK_SET ) < 0 )
+   {
+      return;
+   }
+
+   if( fread( entryData, 1, nDataSize, m_auxInfo->fp ) < 1 )
+   {
+      return;
+   }
+
+   m_Type = m_auxInfo->m_Dictionary->findType( entryType );
+   if(m_Type == NULL)
+   {
+      return;
+   }
+}
+
+ossimAuxEntry* ossimAuxEntry::getNamedChild( const char* name )
+{
+   int		nNameLen;
+   ossimAuxEntry	*entry;
+
+   for( nNameLen = 0;
+        name[nNameLen] != '.'
+           && name[nNameLen] != '\0'
+           && name[nNameLen] != ':';
+        nNameLen++ ) {}
+
+  
+   for( entry = getChild(); entry != NULL; entry = entry->getNext() )
+   {
+      std::string tmpEntryName = const_cast<char*>(entry->getName());
+      tmpEntryName = tmpEntryName.substr(0, nNameLen);
+      std::string tmpName = const_cast<char*>(name);
+      tmpName = tmpName.substr(0, nNameLen);
+      if( strcmp(tmpEntryName.c_str(),tmpName.c_str()) == 0
+          && (int) strlen(entry->getName()) == nNameLen )
+      {
+         if( name[nNameLen] == '.' )
+         {
+            ossimAuxEntry *result;
+
+            result = entry->getNamedChild( name+nNameLen+1 );
+            if( result != NULL )
+               return result;
+         }
+         else
+            return entry;
+      }
+   }
+
+   return NULL;
+}
+
+int ossimAuxEntry::getFieldValue( const char * auxFieldPath,
+                                  char chReqType, void *reqReturn )
+{
+   ossimAuxEntry	*entry = this;
+
+   if( strchr(auxFieldPath,':') != NULL )
+   {
+      entry = getNamedChild( auxFieldPath );
+      if( entry == NULL )
+         return false;
+
+      auxFieldPath = strchr(auxFieldPath,':') + 1;
+   }
+
+   loadData();
+
+   if( entryData == NULL )
+   {
+      return false;
+   }
+
+   if( m_Type == NULL )
+   {
+      return false;
+   }
+
+   return (m_Type->extractInstValue( auxFieldPath,
+                                     entryData, nDataPos, nDataSize,
+                                     chReqType, reqReturn ));
+}
+
+ossim_int16 ossimAuxEntry::getIntField(const char* auxFieldPath)
+{
+   ossim_int16	nIntValue;
+
+   if( !getFieldValue( auxFieldPath, 'i', &nIntValue ) )
+   {
+      return 0;
+   }
+   else
+   {
+      return nIntValue;
+   }
+}
+
+const char* ossimAuxEntry::getStringField( const char* auxFieldPath)
+{
+   char *result = NULL;
+
+   if( !getFieldValue( auxFieldPath, 's', &result ) )
+   {
+      return NULL;
+   }
+   else
+   {
+      return result;
+   }
+}
+
+/************************************************************************/
+/*                              ossimAuxField()                              */
+/************************************************************************/
+
+ossimAuxField::ossimAuxField()
+{
+   nBytes = 0;
+
+   nItemCount = 0;
+   chPointer = '\0';
+   chItemType = '\0';
+
+   itemObjectType = NULL;
+   m_auxItemObjectType = NULL;
+
+   enumNames = NULL;
+   fieldName = NULL;
+}
+
+ossimAuxField::~ossimAuxField()
+{
+   if (itemObjectType != NULL)
+   {
+      delete[] itemObjectType;
+      itemObjectType = 0;
+   }
+
+   if (enumNames != NULL)
+   {
+      delete[] enumNames;
+      enumNames = 0;
+   }
+
+   if (fieldName != NULL)
+   {
+      delete[] fieldName;
+      fieldName = 0;
+   }
+}
+
+int ossimAuxField::extractInstValue( const char* /* auxField */, int nIndexValue,
+                                     char* entryData, ossim_uint32 nDataOffset, int nDataSize,
+                                     char chReqType, void *reqReturn )
+
+{
+   int			nInstItemCount = getInstCount( entryData, nDataSize );
+  
+   if( nIndexValue < 0 || nIndexValue >= nInstItemCount )
+   {
+      if( chItemType == 'b' && nIndexValue >= -3 && nIndexValue < 0 )
+         /* ok - special index values */;
+      else
+         return false;
+   }
+
+   if( chPointer != '\0' )
+   {
+      ossim_uint32	nOffset;
+
+      memcpy( &nOffset, entryData+4, 4 );
+  
+      entryData += 8;
+
+      nDataOffset += 8;
+      nDataSize -= 8;
+   }
+
+   if( (chItemType == 'c' || chItemType == 'C') && chReqType == 's' )
+   {
+      *((char **)reqReturn) = entryData;
+      return( entryData != NULL );
+   }
+
+   return false;
+}
+
+int ossimAuxField::getInstCount( char * entryData, int nDataSize )
+{
+   if( chPointer == '\0' )
+      return nItemCount;
+   else if( chItemType == 'b' )
+   {
+      ossim_int32 nRows, nColumns;
+
+      if( nDataSize < 20 )
+         return 0;
+
+      memcpy( &nRows, entryData+8, 4 );
+      ossimAuxStandardFile( 4, &nRows );
+      memcpy( &nColumns, entryData+12, 4 );
+      ossimAuxStandardFile( 4, &nColumns );
+
+      return nRows * nColumns;
+   }
+   else
+   {
+      ossim_int32 nCount;
+
+      if( nDataSize < 4 )
+         return 0;
+
+      memcpy( &nCount, entryData, 4 );
+      ossimAuxStandardFile( 4, &nCount );
+      return nCount;
+   }
+}
+
+void ossimAuxField::completeDefn( ossimAuxDictionary * auxDict )
+
+{
+   if( itemObjectType != NULL )
+   {
+      m_auxItemObjectType = auxDict->findType( itemObjectType );
+   }
+
+   if( chPointer == 'p' )
+   {
+      nBytes = -1; /* we can't know the instance size */
+   }
+   else if( m_auxItemObjectType != NULL )
+   {
+      m_auxItemObjectType->completeDefn( auxDict );
+      if( m_auxItemObjectType->nBytes == -1 )
+      {
+         nBytes = -1;
+      }
+      else
+      {
+         nBytes = m_auxItemObjectType->nBytes * nItemCount;
+      }
+
+      if( chPointer == '*' && nBytes != -1 )
+      {
+         nBytes += 8; /* count, and offset */
+      }
+   }
+   else
+   {
+      nBytes = auxDict->getItemSize( chItemType ) * nItemCount;
+   }
+}
+
+const char *ossimAuxField::initialize( const char * fieldInput )
+{
+   int		i;
+   nItemCount = atoi(fieldInput);
+
+   while( *fieldInput != '\0' && *fieldInput != ':' )
+   {
+      fieldInput++;
+   }
+
+   if( *fieldInput == '\0' )
+   {
+      return NULL;
+   }
+
+   fieldInput++;
+
+   if( *fieldInput == 'p' || *fieldInput == '*' )
+      chPointer = *(fieldInput++);
+
+   if( *fieldInput == '\0' )
+      return NULL;
+
+   chItemType = *(fieldInput++);
+
+   if( chItemType == 'o' )
+   {
+      for( i = 0; fieldInput[i] != '\0' && fieldInput[i] != ','; i++ ) {}
+
+      itemObjectType = (char *) malloc(i+1);
+      strncpy( itemObjectType, fieldInput, i );
+      itemObjectType[i] = '\0';
+
+      fieldInput += i+1;
+   }
+
+   if( chItemType == 'x' && *fieldInput == '{' )
+   {
+      int nBraceDepth = 1;
+      fieldInput++;
+
+      // Skip past the definition.
+      while( nBraceDepth > 0 && *fieldInput != '\0' )
+      {
+         if( *fieldInput == '{' )
+            nBraceDepth++;
+         else if( *fieldInput == '}' )
+            nBraceDepth--;
+
+         fieldInput++;
+      }
+
+      chItemType = 'o';
+
+      // find the comma terminating the type name.
+      for( i = 0; fieldInput[i] != '\0' && fieldInput[i] != ','; i++ ) {}
+
+      itemObjectType = (char *) malloc(i+1);
+      strncpy( itemObjectType, fieldInput, i );
+      itemObjectType[i] = '\0';
+
+      fieldInput += i+1;
+   }
+
+   if( chItemType == 'e' )
+   {
+      int	nEnumCount = atoi(fieldInput);
+      int	iEnum;
+
+      fieldInput = strchr(fieldInput,':');
+      if( fieldInput == NULL )
+         return NULL;
+
+      fieldInput++;
+
+      enumNames = (char **) calloc(sizeof(char *), nEnumCount+1);
+
+      for( iEnum = 0; iEnum < nEnumCount; iEnum++ )
+      {
+         char	*pszToken;
+
+         for( i = 0; fieldInput[i] != '\0' && fieldInput[i] != ','; i++ ) {}
+
+         if( fieldInput[i] != ',' )
+            return NULL;
+
+         pszToken = (char *) malloc(i+1);
+         strncpy( pszToken, fieldInput, i );
+         pszToken[i] = '\0';
+
+         enumNames[iEnum] = pszToken;
+
+         fieldInput += i+1;
+      }
+   }
+
+   for( i = 0; fieldInput[i] != '\0' && fieldInput[i] != ','; i++ ) {}
+
+   fieldName = (char *) malloc(i+1);
+   strncpy( fieldName, fieldInput, i );
+   fieldName[i] = '\0';
+
+   fieldInput += i+1;
+
+   return( fieldInput );
+}
+
+int ossimAuxField::getInstBytes( char *entryData, int nDataSize )
+
+{
+   int		nCount;
+   int		nInstBytes = 0;
+
+   if( nBytes > -1 )
+      return nBytes;
+
+   if( chPointer != '\0' )
+   {
+      memcpy( &nCount, entryData, 4 );
+      ossimAuxStandardFile( 4, &nCount );
+
+      entryData += 8;
+      nInstBytes += 8;
+   }
+   else
+      nCount = 1;
+
+   if( chItemType == 'b' && nCount != 0 ) // BASEDATA
+   {
+      ossim_int32 nRows, nColumns;
+      ossim_int16 nBaseItemType;
+
+      memcpy( &nRows, entryData, 4 );
+      ossimAuxStandardFile( 4, &nRows );
+      memcpy( &nColumns, entryData+4, 4 );
+      ossimAuxStandardFile( 4, &nColumns );
+      memcpy( &nBaseItemType, entryData+8, 2 );
+      ossimAuxStandardFile( 2, &nBaseItemType );
+
+      nInstBytes += 12;
+
+      nInstBytes += 
+         ((ossimAuxGetDataTypeBits(nBaseItemType) + 7) / 8) * nRows * nColumns;
+   }
+   else if( m_auxItemObjectType == NULL )
+   {
+      nInstBytes += nCount * ossimAuxDictionary::getItemSize(chItemType);
+   }
+   else
+   {
+      int		i;
+
+      for( i = 0; i < nCount; i++ )
+      {
+         int	nThisBytes;
+
+         nThisBytes =
+            m_auxItemObjectType->getInstBytes( entryData,
+                                               nDataSize - nInstBytes );
+         nInstBytes += nThisBytes;
+         entryData += nThisBytes;
+      }
+   }
+
+   return( nInstBytes );
+}
+
+/************************************************************************/
+/*                              ossimAuxType()                              */
+/************************************************************************/
+ossimAuxType::ossimAuxType()
+{
+   nBytes = 0;
+   nFields = 0;
+   m_auxFields = NULL;
+   auxTypeName = NULL;
+}
+
+ossimAuxType::~ossimAuxType()
+{
+   for(int i = 0; i < nFields; i++ )
+   {
+      delete m_auxFields[i];
+      m_auxFields[i] = 0;
+   }
+
+   if (auxTypeName != NULL)
+   {
+      delete[] auxTypeName;
+      auxTypeName = 0;
+   }
+}
+
+const char* ossimAuxType::initialize( const char * typeInput )
+{
+   int		i;
+   if( *typeInput != '{' )
+   {
+      while( *typeInput != '{' && *typeInput != '\0' )
+         typeInput++;
+
+      if( *typeInput == '\0' )
+         return NULL;
+   }
+
+   typeInput++;
+
+   while( typeInput != NULL && *typeInput != '}' )
+   {
+      ossimAuxField	*newField = new ossimAuxField();
+
+      typeInput = newField->initialize( typeInput );
+      if( typeInput != NULL )
+      {
+         m_auxFields = (ossimAuxField **)realloc(m_auxFields, sizeof(void*) * (nFields+1) );
+         m_auxFields[nFields++] = newField;
+      }
+      else
+      {
+         delete newField;
+      }
+   }
+
+   if( typeInput == NULL )
+   {
+      return NULL;
+   }
+
+   typeInput++; /* skip `}' */
+
+   for( i = 0; typeInput[i] != '\0' && typeInput[i] != ','; i++ ) {}
+
+   auxTypeName = (char *) malloc(i+1);
+   strncpy( auxTypeName, typeInput, i );
+   auxTypeName[i] = '\0';
+
+   typeInput += i+1;
+
+   return( typeInput );
+}
+
+void ossimAuxType::completeDefn( ossimAuxDictionary* auxDict )
+{
+   int		i;
+
+   if( nBytes != 0 )
+      return;
+
+   for( i = 0; i < nFields; i++ )
+   {
+      m_auxFields[i]->completeDefn( auxDict );
+      if( m_auxFields[i]->nBytes < 0 || nBytes == -1 )
+      {
+         nBytes = -1;
+      }
+      else
+      {
+         nBytes += m_auxFields[i]->nBytes;
+      }
+   }
+}
+
+int ossimAuxType::extractInstValue( const char * auxFieldPath,
+                                    char *entryData, ossim_uint32 nDataOffset, int nDataSize,
+                                    char chReqType, void *reqReturn )
+
+{
+   int		nArrayIndex = 0, nNameLen, iField, nByteOffset;
+   const char	*remainder;
+
+   const char *firstArray = strchr(auxFieldPath,'[');
+   const char *firstDot = strchr(auxFieldPath,'.');
+
+   if( firstArray != NULL
+       && (firstDot == NULL
+           || firstDot > firstArray) )
+   {
+      const char	*theEnd = firstArray;
+
+      nArrayIndex = atoi(theEnd+1);
+      nNameLen = theEnd - auxFieldPath;
+
+      remainder = strchr(auxFieldPath,'.');
+      if( remainder != NULL )
+      {
+         remainder++;
+      }
+   }
+   else if( firstDot != NULL )
+   {
+      const char	*theEnd = firstDot;
+
+      nNameLen = theEnd - auxFieldPath;
+
+      remainder = theEnd + 1;
+   }
+   else
+   {
+      nNameLen = (int)strlen(auxFieldPath);
+      remainder = NULL;
+   }
+
+   //Find this field within this type, if possible.                 
+   nByteOffset = 0;
+   for( iField = 0; iField < nFields && nByteOffset < nDataSize; iField++ )
+   {
+      std::string tmpFieldPath = const_cast<char*>(auxFieldPath);
+      tmpFieldPath = tmpFieldPath.substr(0, nNameLen);
+      std::string tmpFieldName = const_cast<char*>(m_auxFields[iField]->fieldName);
+      tmpFieldName = tmpFieldName.substr(0, nNameLen);
+      if( strcmp(tmpFieldPath.c_str(),tmpFieldName.c_str()) == 0
+          && m_auxFields[iField]->fieldName[nNameLen] == '\0' )
+      {
+         break;
+      }
+
+      nByteOffset +=
+         m_auxFields[iField]->getInstBytes( entryData + nByteOffset,
+                                            nDataSize - nByteOffset );
+   }
+
+   if( iField == nFields || nByteOffset >= nDataSize )
+   {
+      return false;
+   }
+
+   //Extract this field value, and return.                          
+   return( m_auxFields[iField]->
+           extractInstValue( remainder, nArrayIndex,
+                             entryData + nByteOffset,
+                             nDataOffset + nByteOffset,
+                             nDataSize - nByteOffset,
+                             chReqType, reqReturn ) );
+}
+
+int ossimAuxType::getInstBytes( char* entryData, int nDataSize )
+{
+   if( nBytes >= 0 )
+   {
+      return( nBytes );
+   }
+   else
+   {
+      int	nTotal = 0;
+      int	iField;
+
+      for( iField = 0; iField < nFields && nTotal < nDataSize; iField++ )
+      {
+         ossimAuxField	*poField = m_auxFields[iField];
+
+         int nInstBytes = poField->getInstBytes( entryData,
+                                                 nDataSize - nTotal );
+
+         entryData += nInstBytes;
+         nTotal += nInstBytes;
+      }
+
+      return( nTotal );
+   }
+}
+
+/************************************************************************/
+/*                              ossimAuxDictionary()                              */
+/************************************************************************/
+static const char *defDefn[] = {
+   "Eprj_MapInfo", 
+   "{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo",
+   NULL,
+   NULL };
+
+ossimAuxDictionary::ossimAuxDictionary( const char* auxDictStr )
+{
+   int		i;
+   nTypes = 0;
+   nTypesMax = 0;
+   m_auxTypes = NULL;
+
+   //Read all the types.            
+   while( auxDictStr != NULL && *auxDictStr != '.' )
+   {
+      ossimAuxType* newType = new ossimAuxType();
+      auxDictStr = newType->initialize( auxDictStr );
+
+      if( auxDictStr != NULL )
+      {
+         addType( newType );
+      }
+      else
+      {
+         delete newType;
+      }
+   }
+
+   for( i = 0; defDefn[i] != NULL; i += 2 )
+   {
+      if( findType( defDefn[i] ) == NULL )
+      {
+         ossimAuxType *newType = new ossimAuxType();
+
+         newType->initialize( defDefn[i+1] );
+         addType( newType );
+      }
+   }
+
+   //Complete the definitions.    
+   for( i = 0; i < nTypes; i++ )
+   {
+      m_auxTypes[i]->completeDefn( this );
+   }
+}
+
+ossimAuxDictionary::~ossimAuxDictionary()
+{
+   for(int i = 0; i < nTypes; i++ )
+   {
+      delete m_auxTypes[i];
+      m_auxTypes[i] = 0;
+   }
+}
+
+void ossimAuxDictionary::addType( ossimAuxType *type )
+
+{
+   if( nTypes == nTypesMax )
+   {
+      nTypesMax = nTypes * 2 + 10;
+      m_auxTypes = (ossimAuxType **) realloc( m_auxTypes,
+                                              sizeof(void*) * nTypesMax );
+   }
+
+   m_auxTypes[nTypes++] = type;
+}
+
+ossimAuxType* ossimAuxDictionary::findType( const char * name )
+
+{
+   int		i;
+
+   for( i = 0; i < nTypes; i++ )
+   {
+      if( strcmp(name, m_auxTypes[i]->auxTypeName) == 0 )
+      {
+         return( m_auxTypes[i] );
+      }
+   }
+
+   return NULL;
+}
+
+int ossimAuxDictionary::getItemSize( char chType )
+
+{
+   switch( chType )
+   {
+      case '1':
+      case '2':
+      case '4':
+      case 'c':
+      case 'C':
+         return 1;
+
+      case 'e':
+      case 's':
+      case 'S':
+         return 2;
+
+      case 't':
+      case 'l':
+      case 'L':
+      case 'f':
+         return 4;
+
+      case 'd':
+      case 'm':
+         return 8;
+
+      case 'M':
+         return 16;
+
+      case 'b':
+         return -1;
+
+      case 'o':
+      case 'x':
+         return 0;
+   }
+
+   return 0;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimAuxXmlSupportData.cpp b/ossim/src/ossim/support_data/ossimAuxXmlSupportData.cpp
new file mode 100644
index 0000000..aee64dc
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimAuxXmlSupportData.cpp
@@ -0,0 +1,352 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Utility/support data class to extract the projection from a dot aux dot xml
+// file commonly found with mrsid data.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/support_data/ossimAuxXmlSupportData.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimXmlAttribute.h>
+#include <ossim/base/ossimXmlDocument.h>
+#include <ossim/base/ossimXmlNode.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/projection/ossimProjection.h>
+#include <fstream>
+#include <ostream>
+
+// Static trace for debugging.
+static const ossimTrace traceDebug( ossimString("ossimAuxXmlSupportData:debug") );
+
+ossimAuxXmlSupportData::ossimAuxXmlSupportData()
+{
+}
+
+ossimAuxXmlSupportData::~ossimAuxXmlSupportData()
+{
+}
+
+ossimRefPtr<ossimProjection> ossimAuxXmlSupportData::getProjection(const ossimFilename& file) const
+{
+   ossimRefPtr<ossimProjection> result = 0;
+
+   std::ifstream is(file.c_str(), std::ios_base::binary|std::ios_base::in);
+
+   if ( is.good() )
+   {
+      // Read the xml document:
+      ossimXmlDocument xdoc;
+      if ( xdoc.read( is ) )
+      {
+         // Get the WKT string
+         ossimString wkt;
+         ossimString path = "/PAMDataset/Metadata/GeodataXform/SpatialReference/WKT";
+         if ( getPath( path, xdoc, wkt ) )
+         {
+            if ( wkt.size() )
+            {
+               // Substitute """:
+               ossimString tmpWkt = wkt.substitute( ossimString("""), ossimString(""), true );
+               
+               ossimString name;
+               if ( getProjcsName( tmpWkt.string(), name.string() ) )
+               {
+                  result = ossimProjectionFactoryRegistry::instance()->createProjection( name );
+                  if ( result.valid() == false )
+                  {
+                     // Hack...
+                     if ( name.contains("_NAD83_") )
+                     {
+                        cout << "name1: " << name << endl;
+                        name.gsub( ossimString("Georef_NAD83_m"), ossimString("GeoRef_M"), false );
+                        name.string() = std::string("NAD_1983_") + name.string();
+                        cout << "name2: " << name << endl;
+                        result = ossimProjectionFactoryRegistry::instance()->
+                           createProjection( name );
+                     }
+                  }
+                  
+                  if ( result.valid() )
+                  {
+                     if ( initializeProjection( xdoc, tmpWkt.string(), result.get() ) == false )
+                     {
+                        // Zero out the result if tie or scale not set.
+                        result = 0;
+                     }
+                  }
+               }
+            }
+         }
+      }  
+   }
+   
+   return result;
+   
+} // End: ossimAuxXmlSupportData::getProjection
+
+bool ossimAuxXmlSupportData::initializeProjection( const ossimXmlDocument xdoc,
+                                                   const std::string& wkt, 
+                                                   ossimProjection* proj ) const
+{
+   bool result = false;
+
+   ossimRefPtr<ossimMapProjection> mapProj = dynamic_cast<ossimMapProjection*>( proj );
+   if ( mapProj.valid() )
+   {
+      // Find the tie and scale.
+      ossimString path = "/PAMDataset/Metadata/MDI";
+      std::vector<ossimRefPtr<ossimXmlNode> > xnodes;
+      xdoc.findNodes(path, xnodes);
+      if ( xnodes.size() )
+      {
+         ossimDpt tie;
+         ossimDpt scale;
+         tie.makeNan();
+         scale.makeNan();
+         
+         for ( ossim_uint32 i = 0; i < xnodes.size(); ++i )
+         {
+            if ( xnodes[i].valid() )
+            {
+               ossimString value;
+               ossimString attrName = "key";
+               
+               ossimRefPtr<ossimXmlAttribute> attr = xnodes[i]->findAttribute( attrName );
+               if ( attr.valid() )
+               {
+                  if (attr->getValue() == "IMAGE__XY_ORIGIN" )
+                  {
+                     value = xnodes[i]->getText();
+                     if ( value.size() )
+                     {
+                        // Split it:
+                        std::vector<ossimString> list;
+                        value.split( list, ossimString(","), true );
+                        if ( list.size() == 2 )
+                        {
+                           if ( list[0].size() )
+                           {
+                              tie.x = list[0].toFloat64();
+                           }
+                           if ( list[1].size() )
+                           {
+                              tie.y = list[1].toFloat64();
+                           }
+                        }
+                     }
+                  }
+                  else if (attr->getValue() == "IMAGE__X_RESOLUTION" )
+                  {
+                     value = xnodes[i]->getText();
+                     if ( value.size() )
+                     {
+                        scale.x = value.toFloat64();
+                     }
+                  }
+                  else if (attr->getValue() == "IMAGE__Y_RESOLUTION" )
+                  {
+                     value = xnodes[i]->getText();
+                     if ( value.size() )
+                     {
+                        scale.y = value.toFloat64();
+                     }
+                  }
+               }
+               
+            } // Matches: if ( xnodes[i].valid() )
+            
+         } // Matches: for ( ossim_uint32 i = 0; i < xnodes.size(); ++i )
+
+         if ( !tie.hasNans() && !scale.hasNans() )
+         {
+            if ( mapProj->isGeographic() )
+            {
+               // Assuming tie and scale in decimal degrees:
+               mapProj->setDecimalDegreesPerPixel( scale );
+               ossimGpt gpt(tie.y, tie.x, 0.0);
+               mapProj->setUlTiePoints( ossimGpt( gpt ) );
+               result = true;
+            }
+            else
+            {
+               // Get the units:
+               ossimUnitType units = getUnits( wkt );
+
+               // Convert to meters:
+               result = true;
+               if ( units != OSSIM_METERS )
+               {
+                  if ( units == OSSIM_FEET )
+                  {
+                     tie.x = tie.x * MTRS_PER_FT;
+                     tie.y = tie.y * MTRS_PER_FT;
+                     scale.x = scale.x * MTRS_PER_FT;
+                     scale.y = scale.y * MTRS_PER_FT;                     
+                  }
+                  else if ( units == OSSIM_US_SURVEY_FEET)
+                  {
+                     tie.x = tie.x * US_METERS_PER_FT;
+                     tie.y = tie.y * US_METERS_PER_FT;
+                     scale.x = scale.x * OSSIM_US_SURVEY_FEET;
+                     scale.y = scale.y * OSSIM_US_SURVEY_FEET;
+                  }
+                  else
+                  {
+                     ossimNotify(ossimNotifyLevel_WARN)
+                        << "ossimAuxXmlSupportData::initializeProjection WARNING: "
+                        << "Unhandled unit type: " << units << std::endl;
+                     result = false;
+                  }
+               }
+
+               if ( result )
+               {
+                  mapProj->setMetersPerPixel( scale );
+                  mapProj->setUlTiePoints( tie );
+               }
+            }
+         }
+         
+      } // Matches: if ( xnodes.size() ) 
+   }
+
+   return result;
+   
+} // ossimAuxXmlSupportData::initializeProjection
+
+bool ossimAuxXmlSupportData::getPath(
+   const ossimString& path, const ossimXmlDocument& xdoc, ossimString& s) const
+{
+   bool result = false;
+
+   std::vector<ossimRefPtr<ossimXmlNode> > xnodes;
+   xdoc.findNodes(path, xnodes);
+   if ( xnodes.size() == 1 ) // Error if more than one.
+   {
+      if ( xnodes[0].valid() )
+      {
+         s = xnodes[0]->getText();
+         result = true;
+      }
+      else if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimAuxXmlSupportData::getPath ERROR:\n"
+            << "Node not found: " << path
+            << std::endl;
+      }
+   }
+   else if ( xnodes.size() == 0 )
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimAuxXmlSupportData::getPath ERROR:\n"
+            << "Node not found: " << path
+            << std::endl;
+      }
+   }
+   else
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimAuxXmlSupportData::getPath ERROR:\n"
+            << "Multiple nodes found: " << path
+            << std::endl;
+      }
+   }
+
+   if (!result)
+   {
+      s.clear();
+   }
+   return result;
+   
+} // bool ossimAuxXmlSupportData::getPath
+
+
+
+bool ossimAuxXmlSupportData::getProjcsName( const std::string& wkt,
+                                            std::string& name ) const
+{
+   bool result = false;
+   
+   if ( wkt.size() )
+   {
+      // Find "PROJCS":
+      std::string::size_type startPos = wkt.find( std::string("PROJCS[") );
+      if ( startPos != std::string::npos )
+      {
+         startPos += 7; // Move to end of projcs[ string.
+         
+         // Find first comma ',':
+         std::string::size_type endPos = wkt.find( ',', startPos+1 );
+         if ( endPos != std::string::npos )
+         {
+            if ( startPos < endPos )
+            {
+               name = wkt.substr( startPos, endPos-startPos );
+               if ( name.size() )
+               {
+                  result = true;
+               }
+            }
+         }
+      }
+   }
+   
+   return result;
+                  
+} // End: ossimAuxXmlSupportData::getProgcsName
+
+ossimUnitType ossimAuxXmlSupportData::getUnits( const std::string& wkt ) const
+{
+   ossimUnitType units = OSSIM_UNIT_UNKNOWN;
+   if ( wkt.size() )
+   {
+      // Note this is order dependent, i.e. you have to look for "Foot_US" before "Foot".
+      ossimString os = wkt;
+      os.downcase();
+      if ( os.contains("feet_intl") )
+      {
+         units = OSSIM_FEET;
+      }
+      else if ( os.contains("foot_us") )
+      {
+         units = OSSIM_US_SURVEY_FEET;
+      }
+      else if ( os.contains("feet") || os.contains("foot") )
+      {
+         units = OSSIM_FEET;
+      }
+      //---
+      // There can be two "unit" blocks.  One for PROJCS and one for GEOGCS.
+      // Do this last as the GEOGCS block will have Degree in it. May need to split
+      // the two blocks and then search if this doesn't work.
+      //---
+      else if ( os.contains("degree") )
+      {
+         units = OSSIM_DEGREES;
+      }
+   }
+
+   return units;
+   
+} // End: ossimAuxXmlSupportData::getUnits
+
diff --git a/ossim/src/ossim/support_data/ossimCcfInfo.cpp b/ossim/src/ossim/support_data/ossimCcfInfo.cpp
new file mode 100644
index 0000000..1ade24c
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimCcfInfo.cpp
@@ -0,0 +1,59 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: CCF Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <iostream>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/support_data/ossimCcfInfo.h>
+#include <ossim/imaging/ossimCcfHead.h>
+
+ossimCcfInfo::ossimCcfInfo()
+   : theFile()
+{
+}
+
+ossimCcfInfo::~ossimCcfInfo()
+{
+}
+
+bool ossimCcfInfo::open(const ossimFilename& file)
+{
+   bool result = false;
+
+   ossimString extension = file.ext();
+
+   extension.downcase();
+
+   if (extension == "ccf")
+   {
+      theFile = file;
+      result = true;
+   }
+   else
+   {
+      theFile.clear();
+   }
+
+   return result;
+}
+
+std::ostream& ossimCcfInfo::print(std::ostream& out) const
+{
+   
+   if ( theFile.size() )
+   {
+      ossimCcfHead ccf(theFile);
+      out << "File:  " << theFile << "\n" << ccf;
+   }
+   return out;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimCeosData.cpp b/ossim/src/ossim/support_data/ossimCeosData.cpp
new file mode 100644
index 0000000..33636b5
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimCeosData.cpp
@@ -0,0 +1,1379 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Oscar Kramer
+//
+// Description:
+//
+// Class for reading CEOS-formatted metadata.
+// 
+//*******************************************************************
+//  $Id:$
+
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+using namespace std;
+
+#include <ossim/support_data/ossimCeosData.h>
+#include "ossim/base/ossimCommon.h"
+#include <ossim/base/ossimTrace.h>
+
+// Define Trace flags for use within this file:
+static ossimTrace traceExec  ("ossimCeosData:exec");
+static ossimTrace traceDebug ("ossimCeosData:debug");
+
+static const ossimFilename   CEOS_VOL_DIR_FILENAME  = "vdf_dat.001";
+static const ossimFilename   CEOS_LEADER_FILENAME   = "lea_01.001";
+static const ossimFilename   CEOS_IMAGE_FILENAME    = "dat_01.001";
+static const ossimFilename   CEOS_TRAILER_FILENAME  = "tra_01.001";
+
+
+//******************************************************************************
+//  CONSTRUCTOR: 
+//******************************************************************************
+ossimCeosData::ossimCeosData(const ossimFilename& volDirFile,
+                   const ossimFilename& leaderFile,
+                   const ossimFilename& imageFile,
+                   const ossimFilename& trailerFile)
+   :
+      theVolDirFileName  (volDirFile),
+      theLeaderFileName  (leaderFile),
+      theImageFileName   (imageFile),
+      theTrailerFileName (trailerFile),
+      theErrorStatus     (OK),
+      theVolDescRec      (0),
+      theTextRec         (0),
+      theDataSetSumRec   (0),
+      theQualSumRec      (0),
+      theSdrHistRec      (0),
+      thePdr16HistRec    (0),
+      thePdr8HistRec     (0),
+      theProcParmRec     (0),
+      theMapProjRec      (0),
+      thePosDataRec      (0),
+      theAttDataRec      (0),
+      theRadiDataRec     (0),
+      theRadiCompRec     (0)
+{
+   static const char MODULE[] = "ossimCeosData Constructor #1";
+   if (traceExec())  CLOG << "entering..." << endl;
+
+   loadCeosRecords();
+   
+   if (traceExec())  CLOG << "returning..." << endl;
+}
+
+
+//******************************************************************************
+//  CONSTRUCTOR: ossimCeosData(ossimFilename)
+//  
+//  Initializes given the image directory (assumes default filenames).
+//  
+//******************************************************************************
+ossimCeosData::ossimCeosData(const ossimFilename& imageDir)
+   :
+      theErrorStatus   (OK),
+      theVolDescRec    (0),
+      theTextRec       (0),
+      theDataSetSumRec (0),
+      theQualSumRec    (0),
+      theSdrHistRec    (0),
+      thePdr16HistRec  (0),
+      thePdr8HistRec   (0),
+      theProcParmRec   (0),
+      theMapProjRec    (0),
+      thePosDataRec    (0),
+      theAttDataRec    (0),
+      theRadiDataRec   (0),
+      theRadiCompRec   (0)
+{
+   static const char MODULE[] = "ossimCeosData Constructor #1";
+   if (traceExec())  CLOG << "entering..." << endl;
+
+   //***
+   // Assign values to ossimFilename data members:
+   //***
+   theVolDirFileName  = imageDir.dirCat(CEOS_VOL_DIR_FILENAME);
+   theLeaderFileName  = imageDir.dirCat(CEOS_LEADER_FILENAME);
+   theImageFileName   = imageDir.dirCat(CEOS_IMAGE_FILENAME);
+   theTrailerFileName = imageDir.dirCat(CEOS_TRAILER_FILENAME);
+
+   loadCeosRecords();
+   
+   if (traceExec())  CLOG << "returning..." << endl;
+}
+
+
+//******************************************************************************
+// PUBLIC METHOD: ossimCeosData::dump(ostream&)
+//  
+//******************************************************************************
+void ossimCeosData::dump(ostream& stream) const 
+{
+   static const char MODULE[] = "ossimCeosData::dump(ostream& stream)";
+   if (traceExec())  CLOG << "entering..." << endl;
+
+   stream << "\nDump of ossimCeosData Object -----------------------------" << endl;
+
+   if (theVolDescRec)
+      dumpVolDescRec(stream);
+   else
+      stream << "\n\n\tvol_desc_rec not present." << endl;
+
+   if (theTextRec)
+      dumpTextRec(stream);
+   else
+      stream << "\n\n\ttext_rec not present." << endl;
+
+   if (imopDescRec())
+      dumpImopDescRec(stream);
+   else
+      stream << "\n\n\timop_desc_rec not present." << endl;
+
+   if (theDataSetSumRec)
+      dumpDataSetSumRec(stream);
+   else
+      stream << "\n\n\tdataset_sum_rec not present." << endl;
+
+   if (theQualSumRec)
+      dumpQualSumRec(stream);
+   else
+      stream << "\n\n\tqual_sum_rec not present." << endl;
+
+   if (theSdrHistRec)
+      dumpSdrHistRec(stream);
+   else
+      stream << "\n\n\tsdr_hist_rec not present." << endl;
+
+   if (thePdr16HistRec)
+      dumpPdr16HistRec(stream);
+   else
+      stream << "\n\n\tpdr16_hist_rec not present." << endl;
+
+   if (thePdr8HistRec)
+      dumpPdr8HistRec(stream);
+   else
+      stream << "\n\n\tpdr8_hist_rec not present." << endl;
+
+   if (theProcParmRec)
+      dumpProcParmRec(stream);
+   else
+      stream << "\n\n\tproc_parm_rec not present." << endl;
+
+   if (theMapProjRec)
+      dumpMapProjRec(stream);
+   else
+      stream << "\n\n\tmap_proj_rec not present." << endl;
+
+   if (thePosDataRec)
+      dumpPosDataRec(stream);
+   else
+      stream << "\n\n\tpos_data_rec not present." << endl;
+
+   if (theAttDataRec)
+      dumpAttDataRec(stream);
+   else
+      stream << "\n\n\tatt_data_rec not present." << endl;
+
+   if (theRadiDataRec)
+      dumpRadiDataRec(stream);
+   else
+      stream << "\n\n\tradi_data_rec not present." << endl;
+
+   if (theRadiCompRec)
+      dumpRadiCompRec(stream);
+   else
+      stream << "\n\n\tradi_comp_rec not present." << endl;
+
+   stream << "\nEnd of ossimCeosData Object Dump -------------------------" << endl;
+
+   if (traceExec())  CLOG << "returning..." << endl;
+   return;
+}
+
+//******************************************************************************
+// PRIVATE METHOD: ossimCeosData::dumpVolDescRec()
+//  
+//******************************************************************************
+void ossimCeosData::dumpVolDescRec(ostream& stream) const
+{
+   const vol_desc_rec* p = theVolDescRec;
+
+   stream << "\n\n\tContents of vol_desc_rec:\n";
+   stream << "\n\t  ascii_flag         \""; stream.write(p->ascii_flag, 2);
+   stream << "\"\n\t  format_doc         \""; stream.write(p->format_doc, 12);
+   stream << "\"\n\t  format_ver         \""; stream.write(p->format_ver, 2);
+   stream << "\"\n\t  format_rev         \""; stream.write(p->format_rev, 2);
+   stream << "\"\n\t  software_id        \""; stream.write(p->software_id, 12);
+   stream << "\"\n\t  phyvol_id          \""; stream.write(p->phyvol_id, 16);
+   stream << "\"\n\t  logvol_id          \""; stream.write(p->logvol_id, 16);
+   stream << "\"\n\t  volset_id          \""; stream.write(p->volset_id, 16);
+   stream << "\"\n\t  phyvol_cnt         \""; stream.write(p->phyvol_cnt, 2);
+   stream << "\"\n\t  first_phyvol       \""; stream.write(p->first_phyvol, 2);
+   stream << "\"\n\t  last_phyvol        \""; stream.write(p->last_phyvol, 2);
+   stream << "\"\n\t  curr_phyvol        \""; stream.write(p->curr_phyvol, 2);
+   stream << "\"\n\t  first_file         \""; stream.write(p->first_file, 4);
+   stream << "\"\n\t  volset_log         \""; stream.write(p->volset_log, 4);
+   stream << "\"\n\t  phyvol_log         \""; stream.write(p->phyvol_log, 4);
+   stream << "\"\n\t  logvol_date        \""; stream.write(p->logvol_date, 8);
+   stream << "\"\n\t  logvol_time        \""; stream.write(p->logvol_time, 8);
+   stream << "\"\n\t  logvol_country     \"";
+   stream.write(p->logvol_country, 12);
+   stream << "\"\n\t  logvol_agency      \""; stream.write(p->logvol_agency, 8);
+   stream << "\"\n\t  logvol_facility    \"";
+   stream.write(p->logvol_facility,12);
+   stream << "\"\n\t  n_filepoint        \""; stream.write(p->n_filepoint, 4);
+   stream << "\"\n\t  n_voldir           \""; stream.write(p->n_voldir, 4);
+   stream << "\"\n\t  product_id         \""; stream.write(p->product_id, 8);
+
+   stream << "\"" << endl;
+}
+
+//******************************************************************************
+// PRIVATE METHOD: ossimCeosData::dumpTextRec()
+//  
+//******************************************************************************
+void ossimCeosData::dumpTextRec(ostream& stream) const
+{
+   const text_rec* p = theTextRec;
+   
+   stream << "\n\n\tContents of text_rec:\n\t";
+   stream << "\n\t  ascii_flag         \""; stream.write(p->ascii_flag, 2);
+   stream << "\"\n\t  cont_flag          \""; stream.write(p->cont_flag, 2);
+   stream << "\"\n\t  product_type       \""; stream.write(p->product_type, 40);
+   stream << "\"\n\t  product_create     \"";
+   stream.write(p->product_create, 60);
+   stream << "\"\n\t  phyvol_id          \""; stream.write(p->phyvol_id, 40);
+   stream << "\"\n\t  scene_id           \""; stream.write(p->scene_id, 40);
+   stream << "\"\n\t  scene_loc          \""; stream.write(p->scene_loc, 40);
+   stream << "\"" << endl;
+}
+
+//******************************************************************************
+// PRIVATE METHOD: ossimCeosData::dumpImopDescRec()
+//  
+//******************************************************************************
+void ossimCeosData::dumpImopDescRec(ostream& stream) const
+{
+   const imop_desc_rec* p = &theImopDescRec;
+   
+   stream << "\n\n\tContents of imop_desc_rec:\n\t";
+   stream << "\n\t  ascii_flag         \""; stream.write(p->ascii_flag, 2);
+   stream << "\"\n\t  spare1             \""; stream.write(p->spare1, 2);
+   stream << "\"\n\t  format_doc         \""; stream.write(p->format_doc, 12);
+   stream << "\"\n\t  format_rev         \""; stream.write(p->format_rev, 2);
+   stream << "\"\n\t  design_rev         \""; stream.write(p->design_rev, 2);
+   stream << "\"\n\t  software_id        \""; stream.write(p->software_id, 12);
+   stream << "\"\n\t  file_num           \""; stream.write(p->file_num, 4);
+   stream << "\"\n\t  file_name          \""; stream.write(p->file_name, 16);
+   stream << "\"\n\t  rec_seq            \""; stream.write(p->rec_seq, 4);
+   stream << "\"\n\t  seq_loc            \""; stream.write(p->seq_loc, 8);
+   stream << "\"\n\t  seq_len            \""; stream.write(p->seq_len, 4);
+   stream << "\"\n\t  rec_code           \""; stream.write(p->rec_code, 4);
+   stream << "\"\n\t  code_loc           \""; stream.write(p->code_loc, 8);
+   stream << "\"\n\t  code_len           \""; stream.write(p->code_len, 4);
+   stream << "\"\n\t  rec_len            \""; stream.write(p->rec_len, 4);
+   stream << "\"\n\t  rlen_loc           \""; stream.write(p->rlen_loc, 8);
+   stream << "\"\n\t  rlen_len           \""; stream.write(p->rlen_len, 4);
+   stream << "\"\n\t  spare2             \""; stream.write(p->spare2, 4);
+   stream << "\"\n\t  spare3             \""; stream.write(p->spare3, 64);
+   stream << "\"\n\t  n_dataset          \""; stream.write(p->n_dataset, 6);
+   stream << "\"\n\t  l_dataset          \""; stream.write(p->l_dataset, 6);
+   stream << "\"\n\t  spare4             \""; stream.write(p->spare4, 24);
+   stream << "\"\n\t  nbit               \""; stream.write(p->nbit, 4);
+   stream << "\"\n\t  nsamp              \""; stream.write(p->nsamp, 4);
+   stream << "\"\n\t  nbyte              \""; stream.write(p->nbyte, 4);
+   stream << "\"\n\t  justify            \""; stream.write(p->justify, 4);
+   stream << "\"\n\t  nchn               \""; stream.write(p->nchn, 4);
+   stream << "\"\n\t  nlin               \""; stream.write(p->nlin, 8);
+   stream << "\"\n\t  nleft              \""; stream.write(p->nleft, 4);
+   stream << "\"\n\t  ngrp               \""; stream.write(p->ngrp, 8);
+   stream << "\"\n\t  nright             \""; stream.write(p->nright, 4);
+   stream << "\"\n\t  ntop               \""; stream.write(p->ntop, 4);
+   stream << "\"\n\t  nbott              \""; stream.write(p->nbott, 4);
+   stream << "\"\n\t  intleav            \""; stream.write(p->intleav, 4);
+   stream << "\"\n\t  nrec_lin           \""; stream.write(p->nrec_lin, 2);
+   stream << "\"\n\t  nrec_chn           \""; stream.write(p->nrec_chn, 2);
+   stream << "\"\n\t  n_prefix           \""; stream.write(p->n_prefix, 4);
+   stream << "\"\n\t  n_sar              \""; stream.write(p->n_sar, 8);
+   stream << "\"\n\t  n_suffix           \""; stream.write(p->n_suffix, 4);
+   stream << "\"\n\t  spare5             \""; stream.write(p->spare5, 4);
+   stream << "\"\n\t  lin_loc            \""; stream.write(p->lin_loc, 8);
+   stream << "\"\n\t  chn_loc            \""; stream.write(p->chn_loc, 8);
+   stream << "\"\n\t  tim_loc            \""; stream.write(p->tim_loc, 8);
+   stream << "\"\n\t  left_loc           \""; stream.write(p->left_loc, 8);
+   stream << "\"\n\t  right_loc          \""; stream.write(p->right_loc, 8);
+   stream << "\"\n\t  pad_ind            \""; stream.write(p->pad_ind, 4);
+   stream << "\"\n\t  spare6             \""; stream.write(p->spare6, 28);
+   stream << "\"\n\t  qual_loc           \""; stream.write(p->qual_loc, 8);
+   stream << "\"\n\t  cali_loc           \""; stream.write(p->cali_loc, 8);
+   stream << "\"\n\t  gain_loc           \""; stream.write(p->gain_loc, 8);
+   stream << "\"\n\t  bias_loc           \""; stream.write(p->bias_loc, 8);
+   stream << "\"\n\t  type_id            \""; stream.write(p->type_id, 28);
+   stream << "\"\n\t  type_code          \""; stream.write(p->type_code, 4);
+   stream << "\"\n\t  left_fill          \""; stream.write(p->left_fill, 4);
+   stream << "\"\n\t  right_fill         \""; stream.write(p->right_fill, 4);
+   stream << "\"\n\t  pix_rng            \""; stream.write(p->pix_rng, 8);
+   stream << "\"" << endl;
+}
+
+//******************************************************************************
+// PRIVATE METHOD: ossimCeosData::dumpDataSetSumRec()
+//  
+//******************************************************************************
+void ossimCeosData::dumpDataSetSumRec(ostream& stream) const
+{
+   const dataset_sum_rec* p = theDataSetSumRec;
+   
+   stream << "\n\n\tContents of dataset_sum_rec:\n\t      \"";
+   stream << "\n\t  seq_num            \""; stream.write(p->seq_num, 4);
+   stream << "\"\n\t  sar_chn            \""; stream.write(p->sar_chn, 4);
+   stream << "\"\n\t  scene_id           \""; stream.write(p->scene_id, 16);
+   stream << "\"\n\t  scene_des          \""; stream.write(p->scene_des, 32);
+   stream << "\"\n\t  inp_sctim          \""; stream.write(p->inp_sctim, 32);
+   stream << "\"\n\t  asc_des            \""; stream.write(p->asc_des, 16);
+   stream << "\"\n\t  pro_lat            \""; stream.write(p->pro_lat, 16);
+   stream << "\"\n\t  pro_long           \""; stream.write(p->pro_long, 16);
+   stream << "\"\n\t  pro_head           \""; stream.write(p->pro_head, 16);
+   stream << "\"\n\t  ellip_des          \""; stream.write(p->ellip_des, 16);
+   stream << "\"\n\t  ellip_maj          \""; stream.write(p->ellip_maj, 16);
+   stream << "\"\n\t  ellip_min          \""; stream.write(p->ellip_min, 16);
+   stream << "\"\n\t  earth_mass         \""; stream.write(p->earth_mass, 16);
+   stream << "\"\n\t  grav_const         \""; stream.write(p->grav_const, 16);
+   stream << "\"\n\t  ellip_j[0]         \""; stream.write(p->ellip_j[0], 16);
+   stream << "\"\n\t  ellip_j[1]         \""; stream.write(p->ellip_j[1], 16);
+   stream << "\"\n\t  ellip_j[2]         \""; stream.write(p->ellip_j[2], 16);
+   stream << "\"\n\t  spare1             \""; stream.write(p->spare1, 16);
+   stream << "\"\n\t  terrain_h          \""; stream.write(p->terrain_h, 16);
+   stream << "\"\n\t  sc_lin             \""; stream.write(p->sc_lin, 8);
+   stream << "\"\n\t  sc_pix             \""; stream.write(p->sc_pix, 8);
+   stream << "\"\n\t  scene_len          \""; stream.write(p->scene_len, 16);
+   stream << "\"\n\t  scene_wid          \""; stream.write(p->scene_wid, 16);
+   stream << "\"\n\t  spare2             \""; stream.write(p->spare2, 16);
+   stream << "\"\n\t  nchn               \""; stream.write(p->nchn, 4);
+   stream << "\"\n\t  spare3             \""; stream.write(p->spare3, 4);
+   stream << "\"\n\t  mission_id         \""; stream.write(p->mission_id, 16);
+   stream << "\"\n\t  sensor_id          \""; stream.write(p->sensor_id, 32);
+   stream << "\"\n\t  orbit_num          \""; stream.write(p->orbit_num, 8);
+   stream << "\"\n\t  plat_lat           \""; stream.write(p->plat_lat, 8);
+   stream << "\"\n\t  plat_long          \""; stream.write(p->plat_long, 8);
+   stream << "\"\n\t  plat_head          \""; stream.write(p->plat_head, 8);
+   stream << "\"\n\t  clock_ang          \""; stream.write(p->clock_ang, 8);
+   stream << "\"\n\t  incident_ang       \""; stream.write(p->incident_ang, 8);
+   stream << "\"\n\t  spare4             \""; stream.write(p->spare4, 8);
+   stream << "\"\n\t  wave_length        \""; stream.write(p->wave_length, 16);
+   stream << "\"\n\t  motion_comp        \""; stream.write(p->motion_comp, 2);
+   stream << "\"\n\t  pulse_code         \""; stream.write(p->pulse_code, 16);
+   stream << "\"\n\t  ampl_coef[0]       \""; stream.write(p->ampl_coef[0], 16);
+   stream << "\"\n\t  ampl_coef[1]       \""; stream.write(p->ampl_coef[1], 16);
+   stream << "\"\n\t  ampl_coef[2]       \""; stream.write(p->ampl_coef[2], 16);
+   stream << "\"\n\t  ampl_coef[3]       \""; stream.write(p->ampl_coef[3], 16);
+   stream << "\"\n\t  ampl_coef[4]       \""; stream.write(p->ampl_coef[4], 16);
+   stream << "\"\n\t  phas_coef[0]       \""; stream.write(p->phas_coef[0], 16);
+   stream << "\"\n\t  phas_coef[1]       \""; stream.write(p->phas_coef[1], 16);
+   stream << "\"\n\t  phas_coef[2]       \""; stream.write(p->phas_coef[2], 16);
+   stream << "\"\n\t  phas_coef[3]       \""; stream.write(p->phas_coef[3], 16);
+   stream << "\"\n\t  phas_coef[4]       \""; stream.write(p->phas_coef[4], 16);
+   stream << "\"\n\t  chirp_ext_ind      \""; stream.write(p->chirp_ext_ind, 8);
+   stream << "\"\n\t  spare5             \""; stream.write(p->spare5, 8);
+   stream << "\"\n\t  fr                 \""; stream.write(p->fr, 16);
+   stream << "\"\n\t  rng_gate           \""; stream.write(p->rng_gate, 16);
+   stream << "\"\n\t  rng_length         \""; stream.write(p->rng_length, 16);
+   stream << "\"\n\t  baseband_f         \""; stream.write(p->baseband_f, 4);
+   stream << "\"\n\t  rngcmp_f           \""; stream.write(p->rngcmp_f, 4);
+   stream << "\"\n\t  gn_polar           \""; stream.write(p->gn_polar, 16);
+   stream << "\"\n\t  gn_cross           \""; stream.write(p->gn_cross, 16);
+   stream << "\"\n\t  chn_bits           \""; stream.write(p->chn_bits, 8);
+   stream << "\"\n\t  quant_desc         \""; stream.write(p->quant_desc, 12);
+   stream << "\"\n\t  i_bias             \""; stream.write(p->i_bias, 16);
+   stream << "\"\n\t  q_bias             \""; stream.write(p->q_bias, 16);
+   stream << "\"\n\t  iq_ratio           \""; stream.write(p->iq_ratio, 16);
+   stream << "\"\n\t  spare6             \""; stream.write(p->spare6, 16);
+   stream << "\"\n\t  spare7             \""; stream.write(p->spare7, 16);
+   stream << "\"\n\t  ele_sight          \""; stream.write(p->ele_sight, 16);
+   stream << "\"\n\t  mech_sight         \""; stream.write(p->mech_sight, 16);
+   stream << "\"\n\t  echo_track         \""; stream.write(p->echo_track, 4);
+   stream << "\"\n\t  fa                 \""; stream.write(p->fa, 16);
+   stream << "\"\n\t  elev_beam          \""; stream.write(p->elev_beam, 16);
+   stream << "\"\n\t  azim_beam          \""; stream.write(p->azim_beam, 16);
+   stream << "\"\n\t  sat_bintim         \""; stream.write(p->sat_bintim, 16);
+   stream << "\"\n\t  sat_clktim         \""; stream.write(p->sat_clktim, 32);
+   stream << "\"\n\t  sat_clkinc         \""; stream.write(p->sat_clkinc, 8);
+   stream << "\"\n\t  spare8             \""; stream.write(p->spare8, 8);
+   stream << "\"\n\t  fac_id             \""; stream.write(p->fac_id, 16);
+   stream << "\"\n\t  sys_id             \""; stream.write(p->sys_id, 8);
+   stream << "\"\n\t  ver_id             \""; stream.write(p->ver_id, 8);
+   stream << "\"\n\t  fac_code           \""; stream.write(p->fac_code, 16);
+   stream << "\"\n\t  lev_code           \""; stream.write(p->lev_code, 16);
+   stream << "\"\n\t  prod_type          \""; stream.write(p->prod_type, 32);
+   stream << "\"\n\t  algor_id           \""; stream.write(p->algor_id, 32);
+   stream << "\"\n\t  n_azilok           \""; stream.write(p->n_azilok, 16);
+   stream << "\"\n\t  n_rnglok           \""; stream.write(p->n_rnglok, 16);
+   stream << "\"\n\t  bnd_azilok         \""; stream.write(p->bnd_azilok, 16);
+   stream << "\"\n\t  bnd_rnglok         \""; stream.write(p->bnd_rnglok, 16);
+   stream << "\"\n\t  bnd_azi            \""; stream.write(p->bnd_azi, 16);
+   stream << "\"\n\t  bnd_rng            \""; stream.write(p->bnd_rng, 16);
+   stream << "\"\n\t  azi_weight         \""; stream.write(p->azi_weight, 32);
+   stream << "\"\n\t  rng_weight         \""; stream.write(p->rng_weight, 32);
+   stream << "\"\n\t  data_inpsrc        \""; stream.write(p->data_inpsrc, 16);
+   stream << "\"\n\t  rng_res            \""; stream.write(p->rng_res, 16);
+   stream << "\"\n\t  azi_res            \""; stream.write(p->azi_res, 16);
+   stream << "\"\n\t  radi_stretch[0]    \"";
+   stream.write(p->radi_stretch[0],16);
+   stream << "\"\n\t  radi_stretch[1]    \"";
+   stream.write(p->radi_stretch[1],16);
+   stream << "\"\n\t  alt_dopcen[0]      \""; stream.write(p->alt_dopcen[0],16);
+   stream << "\"\n\t  alt_dopcen[1]      \""; stream.write(p->alt_dopcen[1],16);
+   stream << "\"\n\t  alt_dopcen[2]      \""; stream.write(p->alt_dopcen[2],16);
+   stream << "\"\n\t  spare9             \""; stream.write(p->spare9, 16);
+   stream << "\"\n\t  crt_dopcen[0]      \""; stream.write(p->crt_dopcen[0],16);
+   stream << "\"\n\t  crt_dopcen[1]      \""; stream.write(p->crt_dopcen[1],16);
+   stream << "\"\n\t  crt_dopcen[2]      \""; stream.write(p->crt_dopcen[2],16);
+   stream << "\"\n\t  time_dir_pix       \""; stream.write(p->time_dir_pix, 8);
+   stream << "\"\n\t  time_dir_lin       \""; stream.write(p->time_dir_lin, 8);
+   stream << "\"\n\t  alt_rate[0]        \""; stream.write(p->alt_rate[0], 16);
+   stream << "\"\n\t  alt_rate[1]        \""; stream.write(p->alt_rate[1], 16);
+   stream << "\"\n\t  alt_rate[2]        \""; stream.write(p->alt_rate[2], 16);
+   stream << "\"\n\t  spare10            \""; stream.write(p->spare10, 16);
+   stream << "\"\n\t  crt_rate[0]        \""; stream.write(p->crt_rate[0], 16);
+   stream << "\"\n\t  crt_rate[1]        \""; stream.write(p->crt_rate[1], 16);
+   stream << "\"\n\t  crt_rate[2]        \""; stream.write(p->crt_rate[2], 16);
+   stream << "\"\n\t  spare11            \""; stream.write(p->spare11, 16);
+   stream << "\"\n\t  line_cont          \""; stream.write(p->line_cont, 8);
+   stream << "\"\n\t  clutter_lock       \""; stream.write(p->clutter_lock, 4);
+   stream << "\"\n\t  auto_focus         \""; stream.write(p->auto_focus, 4);
+   stream << "\"\n\t  line_spacing       \""; stream.write(p->line_spacing, 16);
+   stream << "\"\n\t  pix_spacing        \""; stream.write(p->pix_spacing, 16);
+   stream << "\"\n\t  rngcmp_desg        \""; stream.write(p->rngcmp_desg, 16);
+   stream << "\"" << endl;
+}
+
+//******************************************************************************
+// PRIVATE METHOD: ossimCeosData::dumpQualSumRec()
+//  
+//******************************************************************************
+void ossimCeosData::dumpQualSumRec(ostream& stream) const
+{
+   const qual_sum_rec* p = theQualSumRec;
+   
+   stream << "\n\n\tContents of qual_sum_rec:\n\t";
+   stream << "\n\t  rec_seq            \""; stream.write(p->rec_seq, 4);
+   stream << "\"\n\t  sar_chn            \""; stream.write(p->sar_chn, 4);
+   stream << "\"\n\t  cali_date          \""; stream.write(p->cali_date, 6);
+   stream << "\"\n\t  nchn               \""; stream.write(p->nchn, 4);
+   stream << "\"\n\t  islr               \""; stream.write(p->islr, 16);
+   stream << "\"\n\t  pslr               \""; stream.write(p->pslr, 16);
+   stream << "\"\n\t  azi_ambig          \""; stream.write(p->azi_ambig, 16);
+   stream << "\"\n\t  rng_ambig          \""; stream.write(p->rng_ambig, 16);
+   stream << "\"\n\t  snr                \""; stream.write(p->snr, 16);
+   stream << "\"\n\t  ber                \""; stream.write(p->ber, 16);
+   stream << "\"\n\t  rng_res            \""; stream.write(p->rng_res, 16);
+   stream << "\"\n\t  azi_res            \""; stream.write(p->azi_res, 16);
+   stream << "\"\n\t  rad_res            \""; stream.write(p->rad_res, 16);
+   stream << "\"\n\t  dyn_rng            \""; stream.write(p->dyn_rng, 16);
+   stream << "\"\n\t  rad_unc_db         \""; stream.write(p->rad_unc_db, 16);
+   stream << "\"\n\t  rad_unc_deg        \""; stream.write(p->rad_unc_deg, 16);
+   int i;
+   for (i=0; i<16; i++)
+   {
+      stream << "\"\n\t  rad_unc[" << i << "]:";
+      stream << "\n\t    db               \"";
+      stream.write(p->rad_unc[i].db, 16);
+      stream << "\"\n\t    deg              \"";
+      stream.write(p->rad_unc[i].deg, 16);
+   }
+   stream << "\"\n\t  alt_locerr         \""; stream.write(p->alt_locerr, 16);
+   stream << "\"\n\t  crt_locerr         \""; stream.write(p->crt_locerr, 16);
+   stream << "\"\n\t  alt_scale          \""; stream.write(p->alt_scale, 16);
+   stream << "\"\n\t  crt_scale          \""; stream.write(p->crt_scale, 16);
+   stream << "\"\n\t  dis_skew           \""; stream.write(p->dis_skew, 16);
+   stream << "\"\n\t  ori_err            \""; stream.write(p->ori_err, 16);
+   for (i=0; i<16; i++)
+   {
+      stream << "\"\n\t  misreg[" << i << "]:";
+      stream << "\n\t    alt_m            \"";
+      stream.write(p->misreg[i].alt_m, 16);
+      stream << "\"\n\t    crt_m            \"";
+      stream.write(p->misreg[i].crt_m, 16);
+   }
+   stream << "\"\n\t  nesz               \""; stream.write(p->nesz, 16);
+   stream << "\"\n\t  enl                \""; stream.write(p->enl, 16);
+   stream << "\"\n\t  tb_update          \""; stream.write(p->tb_update, 8);
+   stream << "\"" << endl;
+}
+
+//******************************************************************************
+// PRIVATE METHOD: ossimCeosData::dumpSdrHistRec()
+//  
+//******************************************************************************
+void ossimCeosData::dumpSdrHistRec(ostream& stream) const
+{
+   const sdr_hist_rec* p = theSdrHistRec;
+   
+   stream << "\n\n\tContents of sdr_hist_rec:\n\t";
+   stream << "\n\t  rec_seq            \""; stream.write(p->rec_seq, 4);
+   stream << "\"\n\t  sar_chn            \""; stream.write(p->sar_chn, 4);
+   stream << "\"\n\t  ntab               \""; stream.write(p->ntab, 8);
+   stream << "\"\n\t  ltab               \""; stream.write(p->ltab, 8);
+   stream << "\"\n\t  htab[0] (only one sdr_htab_rec declared in data struct):";
+   stream << "\n\t    hist_desc        \"";
+   stream.write(p->htab.hist_desc, 32);
+   stream << "\"\n\t    nrec             \""; stream.write(p->htab.nrec, 4);
+   stream << "\"\n\t    tab_seq          \""; stream.write(p->htab.tab_seq, 4);
+   stream << "\"\n\t    nbin             \""; stream.write(p->htab.nbin, 8);
+   stream << "\"\n\t    ns_lin           \""; stream.write(p->htab.ns_lin, 8);
+   stream << "\"\n\t    ns_pix           \""; stream.write(p->htab.ns_pix, 8);
+   stream << "\"\n\t    ngrp_lin         \""; stream.write(p->htab.ngrp_lin, 8);
+   stream << "\"\n\t    ngrp_pix         \""; stream.write(p->htab.ngrp_pix, 8);
+   stream << "\"\n\t    nsamp_lin        \""; stream.write(p->htab.nsamp_lin,8);
+   stream << "\"\n\t    nsamp_pix        \""; stream.write(p->htab.nsamp_pix,8);
+   stream << "\"\n\t    min_smp          \""; stream.write(p->htab.min_smp, 16);
+   stream << "\"\n\t    max_smp          \""; stream.write(p->htab.max_smp, 16);
+   stream << "\"\n\t    mean_smp         \""; stream.write(p->htab.mean_smp,16);
+   stream << "\"\n\t    std_smp          \""; stream.write(p->htab.std_smp, 16);
+   stream << "\"\n\t    smp_inc          \""; stream.write(p->htab.smp_inc, 16);
+   stream << "\"\n\t    min_hist         \""; stream.write(p->htab.min_hist,16);
+   stream << "\"\n\t    max_hist         \""; stream.write(p->htab.max_hist,16);
+   stream << "\"\n\t    mean_hist        \"";
+   stream.write(p->htab.mean_hist, 16);
+   stream << "\"\n\t    std_hist         \""; stream.write(p->htab.std_hist,16);
+   stream << "\"\n\t    nhist            \""; stream.write(p->htab.nhist, 8);
+   stream << "\"\n\t    [Use debugger to view histogram]";
+   stream << endl;
+}
+
+//******************************************************************************
+// PRIVATE METHOD: ossimCeosData::dumpPdr16HistRec()
+//  
+//******************************************************************************
+void ossimCeosData::dumpPdr16HistRec(ostream& stream) const
+{
+   const  pdr16_hist_rec* p = thePdr16HistRec;
+   
+   stream << "\n\n\tContents of pdr16_hist_rec:\n\t";
+   stream << "\n\t  rec_seq            \""; stream.write(p->rec_seq, 4);
+   stream << "\"\n\t  sar_chn            \""; stream.write(p->sar_chn, 4);
+   stream << "\"\n\t  ntab               \""; stream.write(p->ntab, 8);
+   stream << "\"\n\t  ltab               \""; stream.write(p->ltab, 8);
+
+   char buf[] = "12345678";
+   strncpy(buf, p->ntab, 8);
+   int n = atoi(buf);
+   for (int i=0; i<n; i++)
+   {
+      stream << "\"\n\t  htab[" << i << "]:";
+      stream << "\n\t    hist_desc        \"";
+      stream.write(p->htab[i].hist_desc, 32);
+      stream << "\"\n\t    nrec             \"";
+      stream.write(p->htab[i].nrec, 4);
+      stream << "\"\n\t    tab_seq          \"";
+      stream.write(p->htab[i].tab_seq, 4);
+      stream << "\"\n\t    nbin             \"";
+      stream.write(p->htab[i].nbin, 8);
+      stream << "\"\n\t    ns_lin           \"";
+      stream.write(p->htab[i].ns_lin, 8);
+      stream << "\"\n\t    ns_pix           \"";
+      stream.write(p->htab[i].ns_pix, 8);
+      stream << "\"\n\t    ngrp_lin         \"";
+      stream.write(p->htab[i].ngrp_lin, 8);
+      stream << "\"\n\t    ngrp_pix         \"";
+      stream.write(p->htab[i].ngrp_pix, 8);
+      stream << "\"\n\t    nsamp_lin        \"";
+      stream.write(p->htab[i].nsamp_lin, 8);
+      stream << "\"\n\t    nsamp_pix        \"";
+      stream.write(p->htab[i].nsamp_pix, 8);
+      stream << "\"\n\t    min_smp          \"";
+      stream.write(p->htab[i].min_smp, 16);
+      stream << "\"\n\t    max_smp          \"";
+      stream.write(p->htab[i].max_smp, 16);
+      stream << "\"\n\t    mean_smp         \"";
+      stream.write(p->htab[i].mean_smp, 16);
+      stream << "\"\n\t    std_smp          \"";
+      stream.write(p->htab[i].std_smp, 16);
+      stream << "\"\n\t    smp_inc          \"";
+      stream.write(p->htab[i].smp_inc, 16);
+      stream << "\"\n\t    min_hist         \"";
+      stream.write(p->htab[i].min_hist, 16);
+      stream << "\"\n\t    max_hist         \"";
+      stream.write(p->htab[i].max_hist, 16);
+      stream << "\"\n\t    mean_hist        \"";
+      stream.write(p->htab[i].mean_hist, 16);
+      stream << "\"\n\t    std_hist         \"";
+      stream.write(p->htab[i].std_hist, 16);
+      stream << "\"\n\t    nhist            \"";
+      stream.write(p->htab[i].nhist, 8);
+      stream << "\n\t    [Use debugger to view histogram]";
+   }
+   stream << "\"" << endl;
+}
+
+//******************************************************************************
+// PRIVATE METHOD: ossimCeosData::dumpPdr8HistRec()
+//  
+//******************************************************************************
+void ossimCeosData::dumpPdr8HistRec(ostream& stream) const
+{
+   const pdr8_hist_rec* p = thePdr8HistRec;
+   
+   stream << "\n\n\tContents of pdr18hist_rec:\n\t";
+   stream << "\n\t  rec_seq            \""; stream.write(p->rec_seq, 4);
+   stream << "\"\n\t  sar_chn            \""; stream.write(p->sar_chn, 4);
+   stream << "\"\n\t  ntab               \""; stream.write(p->ntab, 8);
+   stream << "\"\n\t  ltab               \""; stream.write(p->ltab, 8);
+   stream << "\"\n\t  htab[0] (only one sdr_htab_rec declared in data struct):";
+   stream << "\n\t    hist_desc        \"";
+   stream.write(p->htab.hist_desc, 32);
+   stream << "\"\n\t    nrec             \""; stream.write(p->htab.nrec, 4);
+   stream << "\"\n\t    tab_seq          \""; stream.write(p->htab.tab_seq, 4);
+   stream << "\"\n\t    nbin             \""; stream.write(p->htab.nbin, 8);
+   stream << "\"\n\t    ns_lin           \""; stream.write(p->htab.ns_lin, 8);
+   stream << "\"\n\t    ns_pix           \""; stream.write(p->htab.ns_pix, 8);
+   stream << "\"\n\t    ngrp_lin         \""; stream.write(p->htab.ngrp_lin, 8);
+   stream << "\"\n\t    ngrp_pix         \""; stream.write(p->htab.ngrp_pix, 8);
+   stream << "\"\n\t    nsamp_lin        \""; stream.write(p->htab.nsamp_lin,8);
+   stream << "\"\n\t    nsamp_pix        \""; stream.write(p->htab.nsamp_pix,8);
+   stream << "\"\n\t    min_smp          \""; stream.write(p->htab.min_smp, 16);
+   stream << "\"\n\t    max_smp          \""; stream.write(p->htab.max_smp, 16);
+   stream << "\"\n\t    mean_smp         \""; stream.write(p->htab.mean_smp,16);
+   stream << "\"\n\t    std_smp          \""; stream.write(p->htab.std_smp, 16);
+   stream << "\"\n\t    smp_inc          \""; stream.write(p->htab.smp_inc, 16);
+   stream << "\"\n\t    min_hist         \""; stream.write(p->htab.min_hist,16);
+   stream << "\"\n\t    max_hist         \""; stream.write(p->htab.max_hist,16);
+   stream << "\"\n\t    mean_hist        \"";
+   stream.write(p->htab.mean_hist, 16);
+   stream << "\"\n\t    std_hist         \""; stream.write(p->htab.std_hist,16);
+   stream << "\"\n\t    nhist            \""; stream.write(p->htab.nhist, 16);
+   stream << "\"\n\t    [Use debugger to view histogram]";
+   stream << endl;
+}
+
+//******************************************************************************
+// PRIVATE METHOD: ossimCeosData::dumpProcParmRec()
+//  
+//******************************************************************************
+void ossimCeosData::dumpProcParmRec(ostream& stream) const
+{
+   const proc_parm_rec* p = theProcParmRec;
+
+   stream << "\n\n\tContents of proc_parm_rec:\n\t";
+   stream << "\n\t  slow_time_coef[1]  \"";
+   stream.write(p->slow_time_coef[1], 22);
+   stream << "\"\n\t  rec_seq            \""; stream.write(p->rec_seq, 4);
+   stream << "\"\n\t  spare1             \""; stream.write(p->spare1, 4);
+   stream << "\"\n\t  inp_media          \""; stream.write(p->inp_media, 3);
+   stream << "\"\n\t  n_tape_id          \""; stream.write(p->n_tape_id, 4);
+   stream << "\"\n\t  tape_id[0]         \""; stream.write(p->tape_id[0], 8);
+   stream << "\"\n\t  exp_ing_start      \""; stream.write(p->exp_ing_start,21);
+   stream << "\"\n\t  exp_ing_stop       \""; stream.write(p->exp_ing_stop, 21);
+   stream << "\"\n\t  act_ing_start      \""; stream.write(p->act_ing_start,21);
+   stream << "\"\n\t  act_ing_stop       \""; stream.write(p->act_ing_stop, 21);
+   stream << "\"\n\t  proc_start         \""; stream.write(p->proc_start, 21);
+   stream << "\"\n\t  proc_stop          \""; stream.write(p->proc_stop, 21);
+   stream << "\"\n\t  mn_sig_lev[0]      \""; stream.write(p->mn_sig_lev[0],16);
+   stream << "\"\n\t  mn_sig_lev[1]      \""; stream.write(p->mn_sig_lev[1],16);
+   stream << "\"\n\t  mn_sig_lev[2]      \""; stream.write(p->mn_sig_lev[2],16);
+   stream << "\"\n\t  mn_sig_lev[3]      \""; stream.write(p->mn_sig_lev[3],16);
+   stream << "\"\n\t  mn_sig_lev[4]      \""; stream.write(p->mn_sig_lev[4],16);
+   stream << "\"\n\t  mn_sig_lev[5]      \""; stream.write(p->mn_sig_lev[5],16);
+   stream << "\"\n\t  mn_sig_lev[6]      \""; stream.write(p->mn_sig_lev[6],16);
+   stream << "\"\n\t  mn_sig_lev[7]      \""; stream.write(p->mn_sig_lev[7],16);
+   stream << "\"\n\t  mn_sig_lev[8]      \""; stream.write(p->mn_sig_lev[8],16);
+   stream << "\"\n\t  mn_sig_lev[9]      \""; stream.write(p->mn_sig_lev[9],16);
+   stream << "\"\n\t  scr_data_ind       \""; stream.write(p->scr_data_ind, 4);
+   stream << "\"\n\t  miss_ln            \""; stream.write(p->miss_ln, 8);
+   stream << "\"\n\t  rej_ln             \""; stream.write(p->rej_ln, 8);
+   stream << "\"\n\t  large_gap          \""; stream.write(p->large_gap, 8);
+   stream << "\"\n\t  bit_err_rate       \""; stream.write(p->bit_err_rate, 16);
+   stream << "\"\n\t  fm_crc_err         \""; stream.write(p->fm_crc_err, 16);
+   stream << "\"\n\t  date_incons        \""; stream.write(p->date_incons, 8);
+   stream << "\"\n\t  prf_changes        \""; stream.write(p->prf_changes, 8);
+   stream << "\"\n\t  delay_changes      \""; stream.write(p->delay_changes, 8);
+   stream << "\"\n\t  skipd_frams        \""; stream.write(p->skipd_frams, 8);
+   stream << "\"\n\t  rej_bf_start       \""; stream.write(p->rej_bf_start, 8);
+   stream << "\"\n\t  rej_few_fram       \""; stream.write(p->rej_few_fram, 8);
+   stream << "\"\n\t  rej_many_fram      \""; stream.write(p->rej_many_fram, 8);
+   stream << "\"\n\t  rej_mchn_err       \""; stream.write(p->rej_mchn_err, 8);
+   stream << "\"\n\t  rej_vchn_err       \""; stream.write(p->rej_vchn_err, 8);
+   stream << "\"\n\t  rej_rec_type       \""; stream.write(p->rej_rec_type, 8);
+   stream << "\"\n\t  sens_config        \""; stream.write(p->sens_config, 10);
+   stream << "\"\n\t  sens_orient        \""; stream.write(p->sens_orient, 9);
+   stream << "\"\n\t  sych_marker        \""; stream.write(p->sych_marker, 8);
+   stream << "\"\n\t  rng_ref_src        \""; stream.write(p->rng_ref_src, 12);
+   stream << "\"\n\t  rng_amp_coef[0]    \"";
+   stream.write(p->rng_amp_coef[0],16);
+   stream << "\"\n\t  rng_amp_coef[1]    \"";
+   stream.write(p->rng_amp_coef[1],16);
+   stream << "\"\n\t  rng_amp_coef[2]    \"";
+   stream.write(p->rng_amp_coef[2],16);
+   stream << "\"\n\t  rng_amp_coef[3]    \"";
+   stream.write(p->rng_amp_coef[3],16);
+   stream << "\"\n\t  rng_phas_coef[0]   \"";
+   stream.write(p->rng_phas_coef[0], 16);
+   stream << "\"\n\t  rng_phas_coef[1]   \"";
+   stream.write(p->rng_phas_coef[1], 16);
+   stream << "\"\n\t  rng_phas_coef[2]   \"";
+   stream.write(p->rng_phas_coef[2], 16);
+   stream << "\"\n\t  rng_phas_coef[3]   \"";
+   stream.write(p->rng_phas_coef[3], 16);
+   stream << "\"\n\t  err_amp_coef[0]    \"";
+   stream.write(p->err_amp_coef[0],16);
+   stream << "\"\n\t  err_amp_coef[1]    \"";
+   stream.write(p->err_amp_coef[1],16);
+   stream << "\"\n\t  err_amp_coef[2]    \"";
+   stream.write(p->err_amp_coef[2],16);
+   stream << "\"\n\t  err_amp_coef[3]    \"";
+   stream.write(p->err_amp_coef[3],16);
+   stream << "\"\n\t  err_phas_coef[0]   \"";
+   stream.write(p->err_phas_coef[0], 16);
+   stream << "\"\n\t  err_phas_coef[1]   \"";
+   stream.write(p->err_phas_coef[1], 16);
+   stream << "\"\n\t  err_phas_coef[2]   \"";
+   stream.write(p->err_phas_coef[2], 16);
+   stream << "\"\n\t  err_phas_coef[3]   \"";
+   stream.write(p->err_phas_coef[3], 16);
+   stream << "\"\n\t  pulse_bandw        \""; stream.write(p->pulse_bandw, 4);
+   stream << "\"\n\t  adc_samp_rate      \""; stream.write(p->adc_samp_rate, 5);
+   stream << "\"\n\t  rep_agc_attn       \""; stream.write(p->rep_agc_attn, 16);
+   stream << "\"\n\t  gn_corctn_fctr     \"";
+   stream.write(p->gn_corctn_fctr, 16);
+   stream << "\"\n\t  rep_energy_gn      \""; stream.write(p->rep_energy_gn,16);
+   stream << "\"\n\t  orb_data_src       \""; stream.write(p->orb_data_src, 11);
+   stream << "\"\n\t  pulse_cnt_1        \""; stream.write(p->pulse_cnt_1, 4);
+   stream << "\"\n\t  pulse_cnt_2        \""; stream.write(p->pulse_cnt_2, 4);
+   stream << "\"\n\t  beam_edge_rqd      \""; stream.write(p->beam_edge_rqd, 3);
+   stream << "\"\n\t  beam_edge_conf     \"";
+   stream.write(p->beam_edge_conf, 16);
+   stream << "\"\n\t  pix_overlap        \""; stream.write(p->pix_overlap, 4);
+   stream << "\"\n\t  n_beams            \""; stream.write(p->n_beams, 4);
+   stream << "\"\n\t  [Use debugger to view contents of beam_info record] ";
+   stream << "\n\t  n_pix_updates      \""; stream.write(p->n_pix_updates, 4);
+   stream << "\"\n\t  [Use debugger to view contents of pix_count record] ";
+   stream << "\n\t  pwin_start         \""; stream.write(p->pwin_start, 16);
+   stream << "\"\n\t  pwin_end           \""; stream.write(p->pwin_end, 16);
+   stream << "\"\n\t  recd_type          \""; stream.write(p->recd_type, 9);
+   stream << "\"\n\t  temp_set_inc       \""; stream.write(p->temp_set_inc, 16);
+   stream << "\"\n\t  n_temp_set         \""; stream.write(p->n_temp_set, 4);
+   stream << "\"\n\t  [Use debugger to view contents of temp record] ";
+   stream << "\n\t  n_image_pix        \""; stream.write(p->n_image_pix, 8);
+   stream << "\"\n\t  prc_zero_pix       \""; stream.write(p->prc_zero_pix, 16);
+   stream << "\"\n\t  prc_satur_pix      \""; stream.write(p->prc_satur_pix,16);
+   stream << "\"\n\t  img_hist_mean      \""; stream.write(p->img_hist_mean,16);
+   stream << "\"\n\t  img_cumu_dist[0]   \"";
+   stream.write(p->img_cumu_dist[0], 16);
+   stream << "\"\n\t  img_cumu_dist[1]   \"";
+   stream.write(p->img_cumu_dist[1], 16);
+   stream << "\"\n\t  img_cumu_dist[2]   \"";
+   stream.write(p->img_cumu_dist[2], 16);
+   stream << "\"\n\t  pre_img_gn         \""; stream.write(p->pre_img_gn, 16);
+   stream << "\"\n\t  post_img_gn        \""; stream.write(p->post_img_gn, 16);
+   stream << "\"\n\t  dopcen_inc         \""; stream.write(p->dopcen_inc, 16);
+   stream << "\"\n\t  n_dopcen           \""; stream.write(p->n_dopcen, 4);
+   stream << "\"\n\t  [Use debugger to view contents of dopcen_est record] ";
+   stream << "\n\t  dop_amb_err        \""; stream.write(p->dop_amb_err, 4);
+   stream << "\"\n\t  dopamb_conf        \""; stream.write(p->dopamb_conf, 16);
+   stream << "\"\n\t  eph_orb_data[0]    \"";
+   stream.write(p->eph_orb_data[0],16);
+   stream << "\"\n\t  eph_orb_data[1]    \"";
+   stream.write(p->eph_orb_data[1],16);
+   stream << "\"\n\t  eph_orb_data[2]    \"";
+   stream.write(p->eph_orb_data[2],16);
+   stream << "\"\n\t  eph_orb_data[3]    \"";
+   stream.write(p->eph_orb_data[3],16);
+   stream << "\"\n\t  eph_orb_data[4]    \"";
+   stream.write(p->eph_orb_data[4],16);
+   stream << "\"\n\t  eph_orb_data[5]    \"";
+   stream.write(p->eph_orb_data[5],16);
+   stream << "\"\n\t  eph_orb_data[6]    \"";
+   stream.write(p->eph_orb_data[6],16);
+   stream << "\"\n\t  appl_type          \""; stream.write(p->appl_type, 12);
+   stream << "\"\n\t  slow_time_coef[1]  \"";
+   stream.write(p->slow_time_coef[1], 22);
+   stream << "\"\n\t  slow_time_coef[2]  \"";
+   stream.write(p->slow_time_coef[2], 22);
+   stream << "\"\n\t  slow_time_coef[3]  \"";
+   stream.write(p->slow_time_coef[3], 22);
+   stream << "\"\n\t  slow_time_coef[4]  \"";
+   stream.write(p->slow_time_coef[4], 22);
+   stream << "\"\n\t  n_srgr             \""; stream.write(p->n_srgr, 4);
+   stream << "\"\n\t  [Use debugger to view contents of srgr_coefset record]";
+   stream << "\n\t  pixel_spacing      \""; stream.write(p->pixel_spacing,16);
+   stream << "\"\n\t  gics_reqd          \""; stream.write(p->gics_reqd, 3);
+   stream << "\"\n\t  wo_number          \""; stream.write(p->wo_number, 8);
+   stream << "\"\n\t  wo_date            \""; stream.write(p->wo_date, 20);
+   stream << "\"\n\t  satellite_id       \""; stream.write(p->satellite_id, 10);
+   stream << "\"\n\t  user_id            \""; stream.write(p->user_id, 20);
+   stream << "\"\n\t  complete_msg       \""; stream.write(p->complete_msg, 3);
+   stream << "\"\n\t  scene_id           \""; stream.write(p->scene_id, 5);
+   stream << "\"\n\t  density_in         \""; stream.write(p->density_in, 4);
+   stream << "\"\n\t  media_id           \""; stream.write(p->media_id, 8);
+   stream << "\"\n\t  angle_first        \""; stream.write(p->angle_first, 16);
+   stream << "\"\n\t  angle_last         \""; stream.write(p->angle_last, 16);
+   stream << "\"\n\t  prod_type          \""; stream.write(p->prod_type, 3);
+   stream << "\"\n\t  map_system         \""; stream.write(p->map_system, 16);
+   stream << "\"\n\t  centre_lat         \""; stream.write(p->centre_lat, 22);
+   stream << "\"\n\t  centre_long        \""; stream.write(p->centre_long, 22);
+   stream << "\"\n\t  span_x             \""; stream.write(p->span_x, 22);
+   stream << "\"\n\t  span_y             \""; stream.write(p->span_y, 22);
+   stream << "\"\n\t  apply_dtm          \""; stream.write(p->apply_dtm, 3);
+   stream << "\"\n\t  density_out        \""; stream.write(p->density_out, 4);
+   stream << "\"\n\t  state_time         \""; stream.write(p->state_time, 21);
+   stream << "\"\n\t  num_state_vectors  \"";
+   stream.write(p->num_state_vectors, 4);
+   stream << "\"\n\t  state_time_inc     \"";
+   stream.write(p->state_time_inc, 16);
+   stream << "\"" << endl;
+}
+
+//******************************************************************************
+// PRIVATE METHOD: ossimCeosData::dumpMapProjRec()
+//  
+//******************************************************************************
+void ossimCeosData::dumpMapProjRec(ostream& stream) const
+{
+   const map_proj_rec* p = theMapProjRec;
+
+   stream << "\n\n\tContents of map_proj_rec:\n\t";
+   stream << "\n\t  spare1             \""; stream.write(p->spare1, 16);
+   stream << "\"\n\t  map_desc           \""; stream.write(p->map_desc, 32);
+   stream << "\"\n\t  n_pixel            \""; stream.write(p->n_pixel, 16);
+   stream << "\"\n\t  n_line             \""; stream.write(p->n_line, 16);
+   stream << "\"\n\t  pixel_spacing      \""; stream.write(p->pixel_spacing,16);
+   stream << "\"\n\t  line_spacing       \""; stream.write(p->line_spacing, 16);
+   stream << "\"\n\t  osc_orient         \""; stream.write(p->osc_orient, 16);
+   stream << "\"\n\t  orb_incl           \""; stream.write(p->orb_incl, 16);
+   stream << "\"\n\t  asc_node           \""; stream.write(p->asc_node, 16);
+   stream << "\"\n\t  isc_dist           \""; stream.write(p->isc_dist, 16);
+   stream << "\"\n\t  geo_alt            \""; stream.write(p->geo_alt, 16);
+   stream << "\"\n\t  isc_vel            \""; stream.write(p->isc_vel, 16);
+   stream << "\"\n\t  plat_head          \""; stream.write(p->plat_head, 16);
+   stream << "\"\n\t  ref_ellip          \""; stream.write(p->ref_ellip, 32);
+   stream << "\"\n\t  semi_major         \""; stream.write(p->semi_major, 16);
+   stream << "\"\n\t  semi_minor         \""; stream.write(p->semi_minor, 16);
+   stream << "\"\n\t  datum_shift[0]     \"";
+   stream.write(p->datum_shift[0], 16);
+   stream << "\"\n\t  datum_shift[1]     \"";
+   stream.write(p->datum_shift[1], 16);
+   stream << "\"\n\t  datum_shift[2]     \"";
+   stream.write(p->datum_shift[2], 16);
+   stream << "\"\n\t  aux_datum_shift[0] \"";
+   stream.write(p->aux_datum_shift[0], 16);
+   stream << "\"\n\t  aux_datum_shift[1] \"";
+   stream.write(p->aux_datum_shift[1], 16);
+   stream << "\"\n\t  aux_datum_shift[2] \"";
+   stream.write(p->aux_datum_shift[2], 16);
+   stream << "\"\n\t  scal_ellip         \""; stream.write(p->scal_ellip, 16);
+   stream << "\"\n\t  proj_desc          \""; stream.write(p->proj_desc, 32);
+   stream << "\"\n\t  utm_desc           \""; stream.write(p->utm_desc, 32);
+   stream << "\"\n\t  utm_zone_sig       \""; stream.write(p->utm_zone_sig, 4);
+   stream << "\"\n\t  utm_east_orig      \""; stream.write(p->utm_east_orig,16);
+   stream << "\"\n\t  utm_north_orig     \"";
+   stream.write(p->utm_north_orig, 16);
+   stream << "\"\n\t  utm_cent_long      \""; stream.write(p->utm_cent_long,16);
+   stream << "\"\n\t  utm_cent_lat       \""; stream.write(p->utm_cent_lat, 16);
+   stream << "\"\n\t  utm_stand_par[0]   \"";
+   stream.write(p->utm_stand_par[0], 16);
+   stream << "\"\n\t  utm_stand_par[1]   \"";
+   stream.write(p->utm_stand_par[1], 16);
+   stream << "\"\n\t  utm_scale          \""; stream.write(p->utm_scale, 16);
+   stream << "\"\n\t  ups_desc           \""; stream.write(p->ups_desc, 32);
+   stream << "\"\n\t  ups_cent_long      \""; stream.write(p->ups_cent_long,16);
+   stream << "\"\n\t  ups_cent_lat       \""; stream.write(p->ups_cent_lat, 16);
+   stream << "\"\n\t  ups_scale          \""; stream.write(p->ups_scale, 16);
+   stream << "\"\n\t  nsp_desc           \""; stream.write(p->nsp_desc, 32);
+   stream << "\"\n\t  nsp_east_orig      \""; stream.write(p->nsp_east_orig,16);
+   stream << "\"\n\t  nsp_north_orig     \"";
+   stream.write(p->nsp_north_orig,16);
+   stream << "\"\n\t  nsp_cent_long      \""; stream.write(p->nsp_cent_long,16);
+   stream << "\"\n\t  nsp_cent_lat       \""; stream.write(p->nsp_cent_lat, 16);
+   stream << "\"\n\t  nsp_stand_par[0]   \"";
+   stream.write(p->nsp_stand_par[0], 16);
+   stream << "\"\n\t  nsp_stand_par[1]   \"";
+   stream.write(p->nsp_stand_par[1], 16);
+   stream << "\"\n\t  nsp_stand_par[2]   \"";
+   stream.write(p->nsp_stand_par[2], 16);
+   stream << "\"\n\t  nsp_stand_par[3]   \"";
+   stream.write(p->nsp_stand_par[3], 16);
+   stream << "\"\n\t  nsp_stand_mer[0]   \"";
+   stream.write(p->nsp_stand_mer[0], 16);
+   stream << "\"\n\t  nsp_stand_mer[1]   \"";
+   stream.write(p->nsp_stand_mer[1], 16);
+   stream << "\"\n\t  nsp_stand_mer[2]   \"";
+   stream.write(p->nsp_stand_mer[2], 16);
+   stream << "\"\n\t  nsp_spare[0]       \""; stream.write(p->nsp_spare[0], 16);
+   stream << "\"\n\t  nsp_spare[1]       \""; stream.write(p->nsp_spare[1], 16);
+   stream << "\"\n\t  nsp_spare[2]       \""; stream.write(p->nsp_spare[2], 16);
+   stream << "\"\n\t  nsp_spare[3]       \""; stream.write(p->nsp_spare[3], 16);
+   stream << "\"\n\t  corner_ne[0]       \""; stream.write(p->corner_ne[0], 16);
+   stream << "\"\n\t  corner_ne[1]       \""; stream.write(p->corner_ne[1], 16);
+   stream << "\"\n\t  corner_ne[2]       \""; stream.write(p->corner_ne[2], 16);
+   stream << "\"\n\t  corner_ne[3]       \""; stream.write(p->corner_ne[3], 16);
+   stream << "\"\n\t  corner_ne[4]       \""; stream.write(p->corner_ne[4], 16);
+   stream << "\"\n\t  corner_ne[5]       \""; stream.write(p->corner_ne[5], 16);
+   stream << "\"\n\t  corner_ne[6]       \""; stream.write(p->corner_ne[6], 16);
+   stream << "\"\n\t  corner_ne[7]       \""; stream.write(p->corner_ne[7], 16);
+   stream << "\"\n\t  corner_ll[0]       \""; stream.write(p->corner_ll[0], 16);
+   stream << "\"\n\t  corner_ll[1]       \""; stream.write(p->corner_ll[1], 16);
+   stream << "\"\n\t  corner_ll[2]       \""; stream.write(p->corner_ll[2], 16);
+   stream << "\"\n\t  corner_ll[3]       \""; stream.write(p->corner_ll[3], 16);
+   stream << "\"\n\t  corner_ll[4]       \""; stream.write(p->corner_ll[4], 16);
+   stream << "\"\n\t  corner_ll[5]       \""; stream.write(p->corner_ll[5], 16);
+   stream << "\"\n\t  corner_ll[6]       \""; stream.write(p->corner_ll[6], 16);
+   stream << "\"\n\t  corner_ll[7]       \""; stream.write(p->corner_ll[7], 16);
+   stream << "\"\n\t  terr_height[0]     \"";
+   stream.write(p->terr_height[0], 16);
+   stream << "\"\n\t  terr_height[1]     \"";
+   stream.write(p->terr_height[1], 16);
+   stream << "\"\n\t  terr_height[2]     \"";
+   stream.write(p->terr_height[2], 16);
+   stream << "\"\n\t  terr_height[3]     \"";
+   stream.write(p->terr_height[3], 16);
+   stream << "\"\n\t  lp_conv_coef[0]    \"";
+   stream.write(p->lp_conv_coef[0],20);
+   stream << "\"\n\t  lp_conv_coef[1]    \"";
+   stream.write(p->lp_conv_coef[1],20);
+   stream << "\"\n\t  lp_conv_coef[2]    \"";
+   stream.write(p->lp_conv_coef[2],20);
+   stream << "\"\n\t  lp_conv_coef[3]    \"";
+   stream.write(p->lp_conv_coef[3],20);
+   stream << "\"\n\t  lp_conv_coef[4]    \"";
+   stream.write(p->lp_conv_coef[4],20);
+   stream << "\"\n\t  lp_conv_coef[5]    \"";
+   stream.write(p->lp_conv_coef[5],20);
+   stream << "\"\n\t  lp_conv_coef[6]    \"";
+   stream.write(p->lp_conv_coef[6],20);
+   stream << "\"\n\t  lp_conv_coef[7]    \"";
+   stream.write(p->lp_conv_coef[7],20);
+   stream << "\"\n\t  mp_conv_coef[0]    \"";
+   stream.write(p->mp_conv_coef[0],20);
+   stream << "\"\n\t  mp_conv_coef[1]    \"";
+   stream.write(p->mp_conv_coef[1],20);
+   stream << "\"\n\t  mp_conv_coef[2]    \"";
+   stream.write(p->mp_conv_coef[2],20);
+   stream << "\"\n\t  mp_conv_coef[3]    \"";
+   stream.write(p->mp_conv_coef[3],20);
+   stream << "\"\n\t  mp_conv_coef[4]    \"";
+   stream.write(p->mp_conv_coef[4],20);
+   stream << "\"\n\t  mp_conv_coef[5]    \"";
+   stream.write(p->mp_conv_coef[5],20);
+   stream << "\"\n\t  mp_conv_coef[6]    \"";
+   stream.write(p->mp_conv_coef[6],20);
+   stream << "\"\n\t  mp_conv_coef[7]    \"";
+   stream.write(p->mp_conv_coef[7],20);
+   stream << "\"\n\t  dem_type           \""; stream.write(p->dem_type, 4);
+   stream << "\"\n\t  spare3             \""; stream.write(p->spare3, 32);
+   stream << "\"" << endl;
+}
+
+//******************************************************************************
+// PRIVATE METHOD: ossimCeosData::dumpPosDataRec()
+//  
+//******************************************************************************
+void ossimCeosData::dumpPosDataRec(ostream& stream) const
+{
+   const pos_data_rec* p = thePosDataRec;
+   
+   stream << "\n\n\tContents of pos_data_rec:\n\t";
+   stream << "\n\t  orbit_ele_desg     \""; stream.write(p->orbit_ele_desg, 32);
+   stream << "\"\n\t  orbit_ele[0]       \""; stream.write(p->orbit_ele[0], 16);
+   stream << "\"\n\t  orbit_ele[1]       \""; stream.write(p->orbit_ele[1], 16);
+   stream << "\"\n\t  orbit_ele[2]       \""; stream.write(p->orbit_ele[2], 16);
+   stream << "\"\n\t  orbit_ele[3]       \""; stream.write(p->orbit_ele[3], 16);
+   stream << "\"\n\t  orbit_ele[4]       \""; stream.write(p->orbit_ele[4], 16);
+   stream << "\"\n\t  orbit_ele[5]       \""; stream.write(p->orbit_ele[5], 16);
+   stream << "\"\n\t  ndata              \""; stream.write(p->ndata, 4);
+   stream << "\"\n\t  year               \""; stream.write(p->year, 4);
+   stream << "\"\n\t  month              \""; stream.write(p->month, 4);
+   stream << "\"\n\t  day                \""; stream.write(p->day, 4);
+   stream << "\"\n\t  gmt_day            \""; stream.write(p->gmt_day, 4);
+   stream << "\"\n\t  gmt_sec            \""; stream.write(p->gmt_sec, 22);
+   stream << "\"\n\t  data_int           \""; stream.write(p->data_int, 22);
+   stream << "\"\n\t  ref_coord          \""; stream.write(p->ref_coord, 64);
+   stream << "\"\n\t  hr_angle           \""; stream.write(p->hr_angle, 22);
+   stream << "\"\n\t  alt_poserr         \""; stream.write(p->alt_poserr, 16);
+   stream << "\"\n\t  crt_poserr         \""; stream.write(p->crt_poserr, 16);
+   stream << "\"\n\t  rad_poserr         \""; stream.write(p->rad_poserr, 16);
+   stream << "\"\n\t  alt_velerr         \""; stream.write(p->alt_velerr, 16);
+   stream << "\"\n\t  crt_velerr         \""; stream.write(p->crt_velerr, 16);
+   stream << "\"\n\t  rad_velerr         \""; stream.write(p->rad_velerr, 16);
+   stream << "\"\n\t  [Use debugger to view contents of pos_vect record]";
+   stream << endl;
+}
+
+//******************************************************************************
+// PRIVATE METHOD: ossimCeosData::dumpAttDataRec()
+//  
+//******************************************************************************
+void ossimCeosData::dumpAttDataRec(ostream& stream) const
+{
+   const att_data_rec* p = theAttDataRec;
+   
+   stream << "\n\n\tContents of att_data_rec:\n\t";
+   stream << "\n\t  npoint             \""; stream.write(p->npoint, 4);
+   stream << "\"\n\t  [Use debugger to view contents of att_vect record]";
+   stream << "\n\t  pitch_bias         \""; stream.write(p->pitch_bias, 14);
+   stream << "\"\n\t  roll_bias          \""; stream.write(p->roll_bias, 14);
+   stream << "\"\n\t  yaw_bias           \""; stream.write(p->yaw_bias, 14);
+   stream << "\"" << endl;
+}
+
+//******************************************************************************
+// PRIVATE METHOD: ossimCeosData::dumpRadiDataRec()
+//  
+//******************************************************************************
+void ossimCeosData::dumpRadiDataRec(ostream& stream) const
+{
+   const radi_data_rec* p = theRadiDataRec;
+   
+   stream << "\n\n\tContents of radi_data_rec:\n\t";
+   stream << "\n\t  seq_num            \""; stream.write(p->seq_num, 4);
+   stream << "\"\n\t  n_data             \""; stream.write(p->n_data, 4);
+   stream << "\"\n\t  field_size         \""; stream.write(p->field_size, 8);
+   stream << "\"\n\t  [Use debugger to view contents of dset record]";
+   stream << endl;
+}
+
+//******************************************************************************
+// PRIVATE METHOD: ossimCeosData::dumpRadiCompRec()
+//  
+//******************************************************************************
+void ossimCeosData::dumpRadiCompRec(ostream& stream) const
+{
+   const radi_comp_rec* p = theRadiCompRec;
+   
+   stream << "\n\n\tContents of radi_comp_rec:\n\t";
+   stream << "\n\t  seq_num            \""; stream.write(p->seq_num, 4);
+   stream << "\"\n\t  chan_ind           \""; stream.write(p->chan_ind, 4);
+   stream << "\"\n\t  n_dset             \""; stream.write(p->n_dset, 8);
+   stream << "\"\n\t  dset_size          \""; stream.write(p->dset_size, 8);
+   stream << "\"\n\t  [Use debugger to view contents of dset record]";
+   stream << endl;
+}
+
+
+//*****************************************************************************
+// PRIVATE METHOD: ossimCeosData::loadCeosRecords()
+//
+//  Reads the data files and initializes the data members. 
+//
+//*****************************************************************************
+void ossimCeosData::loadCeosRecords()
+{
+   static const char MODULE[] = "ossimCeosData::loadCeosFile()";
+   if (traceExec()) CLOG << " Entered method." << endl;
+
+   int       sizeOfRec;
+   char      bufI6[] = "123456";
+   int       numRecords;
+   
+   //***
+   // Open Volume Directory File and parse:
+   //***
+   FILE* fptr = fopen(theVolDirFileName.chars(), "r");
+   if (!fptr)
+   {
+      if(traceDebug())
+      {
+         CLOG << " ERROR:\n\tCannot open CEOS Volume Directory file: "
+              << theVolDirFileName << endl;
+      }
+      theErrorStatus = ERROR;
+      return;
+   }
+   sizeOfRec = sizeof(theVolumeDirectory);
+   fread(&theVolumeDirectory, sizeOfRec, 1, fptr);
+   fclose(fptr);
+   theVolDescRec = &theVolumeDirectory.volDescRec;
+   theTextRec    = &theVolumeDirectory.textRec;
+
+   if (traceDebug())
+   {
+      CLOG << "DEBUG\n   -- List of Records Present ---" << endl;
+   }
+
+   //***
+   // Open and parse Leader File:
+   //***
+   if (!theLeaderFileName.empty())
+   {
+      fptr = fopen(theLeaderFileName.chars(), "r");
+      if (!fptr)
+      {
+         if(traceDebug())
+         {
+            CLOG << " ERROR:\n\tCannot open CEOS Leader file: "
+                  << theLeaderFileName << endl;
+         }
+         theErrorStatus = ERROR;
+         return;
+      }
+      fread(&(theSarLeaderFile.sarDescRec), 720, 1, fptr);
+
+      //***
+      // Establish which CEOS records are in the leader file, and read them.
+      // First the dataset summary record:
+      //***
+      strncpy(bufI6, theSarLeaderFile.sarDescRec.n_dataset, 6);
+      numRecords = atoi(bufI6);
+      if (numRecords)
+      {
+         fread(&theSarLeaderFile.dataSetSumRec, sizeOfNextRec(fptr), 1, fptr);
+         theDataSetSumRec = &(theSarLeaderFile.dataSetSumRec);
+         if (traceDebug()) clog << "\t Leader: dataSetSumRec" << endl;
+      }
+
+      //***
+      // Data quality summary record:
+      //***
+      strncpy(bufI6, theSarLeaderFile.sarDescRec.n_qual_sum, 6);
+      numRecords = atoi(bufI6);
+      if (numRecords)
+      {
+         fread(&(theSarLeaderFile.qualSumRec), sizeOfNextRec(fptr), 1, fptr);
+         theQualSumRec = &(theSarLeaderFile.qualSumRec);
+         if (traceDebug()) clog << "\t Leader: qualSumRec" << endl;
+      }
+
+      //***
+      // Histogram records:
+      //***
+      strncpy(bufI6, theSarLeaderFile.sarDescRec.n_data_hist, 6);
+      numRecords = atoi(bufI6);
+      if (numRecords)
+      {
+         fread(&(theSarLeaderFile.sdrHistRec), sizeOfNextRec(fptr), 1, fptr);
+         theSdrHistRec = &(theSarLeaderFile.sdrHistRec);
+         fread(&(theSarLeaderFile.pdr16HistRec), sizeOfNextRec(fptr), 1, fptr);
+         thePdr16HistRec = &(theSarLeaderFile.pdr16HistRec);
+         if (traceDebug()) clog << "\t Leader: sdrHistRec & pdr16HistRec"
+                                << endl;
+      }
+
+      //***
+      // Processing parameter record:
+      //***
+      strncpy(bufI6, theSarLeaderFile.sarDescRec.n_det_proc, 6);
+      numRecords = atoi(bufI6);
+      if (numRecords)
+      {
+         fread(&(theSarLeaderFile.procParmRec), sizeOfNextRec(fptr), 1, fptr);
+         theProcParmRec = &(theSarLeaderFile.procParmRec);
+         if (traceDebug()) clog << "\t Leader: procParmRec" << endl;
+      }
+
+      //***
+      // Map projection record:
+      //***
+      strncpy(bufI6, theSarLeaderFile.sarDescRec.n_map_proj, 6);
+      numRecords = atoi(bufI6);
+      if (numRecords)
+      {
+         fread(&(theSarLeaderFile.mapProjRec), sizeOfNextRec(fptr), 1, fptr);
+         theMapProjRec = &(theSarLeaderFile.mapProjRec);
+         if (traceDebug()) clog << "\t Leader: mapProjRec" << endl;
+      }
+
+      //***
+      // Position data record:
+      //***
+      strncpy(bufI6, theSarLeaderFile.sarDescRec.n_plat_pos, 6);
+      numRecords = atoi(bufI6);
+      if (numRecords)
+      {
+         fread(&(theSarLeaderFile.posDataRec), sizeOfNextRec(fptr), 1, fptr);
+         thePosDataRec = &(theSarLeaderFile.posDataRec);
+         if (traceDebug()) clog << "\t Leader: posDataRec" << endl;
+      }
+
+      //***
+      // Attitude data record:
+      //***
+      strncpy(bufI6, theSarLeaderFile.sarDescRec.n_att_data, 6);
+      numRecords = atoi(bufI6);
+      if (numRecords)
+      {
+         fread(&(theSarLeaderFile.attDataRec), sizeOfNextRec(fptr), 1, fptr);
+         theAttDataRec = &(theSarLeaderFile.attDataRec);
+         if (traceDebug()) clog << "\t Leader: attDataRec" << endl;
+      }
+
+      //***
+      // Radiometric data record:
+      //***
+      strncpy(bufI6, theSarLeaderFile.sarDescRec.n_radi_data, 6);
+      numRecords = atoi(bufI6);
+      if (numRecords)
+      {
+         fread(&(theSarLeaderFile.radiDataRec), sizeOfNextRec(fptr), 1, fptr);
+         theRadiDataRec = &(theSarLeaderFile.radiDataRec);
+         if (traceDebug()) clog << "\t Leader: radiDataRec" << endl;
+      }
+
+      //***
+      // Radiometric compensation data record:
+      //***
+      strncpy(bufI6, theSarLeaderFile.sarDescRec.n_radi_comp, 6);
+      numRecords = atoi(bufI6);
+      if (numRecords)
+      {
+         fread(&(theSarLeaderFile.radiCompRec), sizeOfNextRec(fptr), 1, fptr);
+         theRadiCompRec = &(theSarLeaderFile.radiCompRec);
+         if (traceDebug()) clog << "\t Leader: radiCompRec" << endl;
+      }
+
+      fclose(fptr);
+   }
+   
+   //***
+   // Open and parse CEOS SAR data File to read the image options:
+   //***
+   fptr = fopen(theImageFileName.chars(), "r");
+   if (!fptr)
+   {
+      CLOG << " ERROR:\n\tCannot open CEOS image file: " << theImageFileName
+           << endl;
+      theErrorStatus = ERROR;
+      return;
+   }
+   sizeOfRec = sizeof(theImopDescRec);
+   fread(&theImopDescRec, sizeOfRec, 1, fptr);
+   fclose(fptr);
+
+   //***
+   // Open and parse trailer file:
+   //***
+   if (!theTrailerFileName.empty())
+   {
+      fptr = fopen(theTrailerFileName.chars(), "r");
+      if (!fptr)
+      {
+         CLOG << " ERROR:\n\tCannot open CEOS Trailer file: "
+              << theTrailerFileName << endl;
+         theErrorStatus = ERROR;
+         return;
+      }
+      fread(&(theSarTrailerFile.sarDescRec), 720, 1, fptr);
+
+      //***
+      // Establish which CEOS records are in the Trailer file, and read them.
+      // First the dataset summary record:
+      //***
+      strncpy(bufI6, theSarTrailerFile.sarDescRec.n_dataset, 6);
+      numRecords = atoi(bufI6);
+      if (numRecords)
+      {
+         fread(&(theSarTrailerFile.dataSetSumRec), sizeOfNextRec(fptr),1, fptr);
+         theDataSetSumRec = &(theSarTrailerFile.dataSetSumRec);
+         if (traceDebug()) clog << "\t Trailer: dataSetSumRec" << endl;
+      }
+
+      //***
+      // Data quality summary record:
+      //***
+      strncpy(bufI6, theSarTrailerFile.sarDescRec.n_qual_sum, 6);
+      numRecords = atoi(bufI6);
+      if (numRecords)
+      {
+         fread(&(theSarTrailerFile.qualSumRec), sizeOfNextRec(fptr), 1, fptr);
+         theQualSumRec = &(theSarTrailerFile.qualSumRec);
+         if (traceDebug()) clog << "\t Trailer: qualSumRec" << endl;
+      }
+
+      //***
+      // Histogram records:
+      //***
+      strncpy(bufI6, theSarTrailerFile.sarDescRec.n_data_hist, 6);
+      numRecords = atoi(bufI6);
+      if (numRecords)
+      {
+         fread(&(theSarTrailerFile.sdrHistRec), sizeOfNextRec(fptr), 1, fptr);
+         theSdrHistRec = &(theSarTrailerFile.sdrHistRec);
+         fread(&(theSarTrailerFile.pdr8HistRec), 16920, 1, fptr);
+         thePdr8HistRec = &(theSarTrailerFile.pdr8HistRec);
+         if (traceDebug()) clog << "\t Trailer: sdrHistRec & pdr8HistRec"
+                                << endl;
+      }
+
+      //***
+      // Processing parameter record:
+      //***
+      strncpy(bufI6, theSarTrailerFile.sarDescRec.n_det_proc, 6);
+      numRecords = atoi(bufI6);
+      if (numRecords)
+      {
+         fread(&(theSarTrailerFile.procParmRec), sizeOfNextRec(fptr), 1, fptr);
+         theProcParmRec = &(theSarTrailerFile.procParmRec);
+         if (traceDebug()) clog << "\t Trailer: procParmRec" << endl;
+      }
+
+      //***
+      // Attitude data record:
+      //***
+      strncpy(bufI6, theSarTrailerFile.sarDescRec.n_att_data, 6);
+      numRecords = atoi(bufI6);
+      if (numRecords)
+      {
+         fread(&(theSarTrailerFile.attDataRec), sizeOfNextRec(fptr), 1, fptr);
+         theAttDataRec = &(theSarTrailerFile.attDataRec);
+         if (traceDebug()) clog << "\t Trailer: attDataRec" << endl;
+      }
+
+      //***
+      // Radiometric data record:
+      //***
+      strncpy(bufI6, theSarTrailerFile.sarDescRec.n_radi_data, 6);
+      numRecords = atoi(bufI6);
+      if (numRecords)
+      {
+         fread(&(theSarTrailerFile.radiDataRec), sizeOfNextRec(fptr), 1, fptr);
+         theRadiDataRec = &(theSarTrailerFile.radiDataRec);
+         if (traceDebug()) clog << "\t Trailer: radiDataRec" << endl;
+      }
+
+      //***
+      // Radiometric compensation data record:
+      //***
+      strncpy(bufI6, theSarTrailerFile.sarDescRec.n_radi_comp, 6);
+      numRecords = atoi(bufI6);
+      if (numRecords)
+      {
+         fread(&(theSarTrailerFile.radiCompRec), sizeOfNextRec(fptr), 1, fptr);
+         theRadiCompRec = &(theSarTrailerFile.radiCompRec);
+         if (traceDebug()) clog << "\t Trailer: radiCompRec" << endl;
+      }
+
+      fclose(fptr);
+   }
+
+   if (traceExec()) CLOG << " Exiting method." << endl;
+}
+
+
+//******************************************************************************
+// PRIVATE METHOD: ossimCeosData::sizeOfNextRec(FILE*)
+//  
+//  Reads the descriptor record pointed to by the file ptr and returns the
+//  size of the following record in bytes.
+//  
+//******************************************************************************
+int ossimCeosData::sizeOfNextRec(FILE* fptr)
+{
+   static const char MODULE[] = "ossimCeosData::sizeOfNextRec(FILE* fptr)";
+   if (traceExec())  CLOG << "entering..." << endl;
+   
+   static desc_rec descRec;
+   static int DESC_REC_SIZE = 12;
+   
+   fread(&descRec, DESC_REC_SIZE, 1, fptr);
+   fseek(fptr, (long) -DESC_REC_SIZE, SEEK_CUR);
+   
+   if (traceDebug())
+   {
+      CLOG << "DEBUG -- "
+           << "\n\t length = " << descRec.length << endl;
+   }
+
+   if (traceExec())  CLOG << "returning..." << endl;
+   return descRec.length;
+}
diff --git a/src/ossim/support_data/ossimDemGrid.cpp b/ossim/src/ossim/support_data/ossimDemGrid.cpp
similarity index 100%
rename from src/ossim/support_data/ossimDemGrid.cpp
rename to ossim/src/ossim/support_data/ossimDemGrid.cpp
diff --git a/ossim/src/ossim/support_data/ossimDemHeader.cpp b/ossim/src/ossim/support_data/ossimDemHeader.cpp
new file mode 100644
index 0000000..7f06d9a
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimDemHeader.cpp
@@ -0,0 +1,786 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Ken Melero
+//         Orginally written by Jamie Moyers (jmoyers at geeks.com)
+//         Adapted from the package KDEM.
+// Description: This class parses a DEM header.
+//
+//********************************************************************
+// $Id: ossimDemHeader.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <fstream>
+#include <iostream>
+#include <iomanip>
+#include <ossim/support_data/ossimDemHeader.h>
+#include <ossim/support_data/ossimDemUtil.h>
+
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimKeywordNames.h>
+
+static const char* PROCESS_CODE[]
+= { "Autocorrelation resample simple bilinear",
+    "Manual profile GRIDEM simple bilinear",
+    "DLG/hypsography CTOG 8-direction bilinear",
+    "Interpolation from photogrammetic system contours DCASS",
+    "direction bilinear",
+    "DLG/hypsography LINETRACE, LT4X complex linear",
+    "DLG/hypsography CPS-3, ANUDEM, GRASS complex polynomial",
+    "Electronic imaging (non-photogrammetric), active or passive",
+    "sensor systems" };
+
+static const int MAX_PROCESS_CODE_INDEX = 8;
+
+static const char* GROUND_REF_SYSTEM[]
+= { "Geographic",
+    "UTM",
+    "State Plane" };
+
+static const int MAX_GROUND_REF_SYSTEM_INDEX = 2;
+
+static const char* GROUND_REF_SYSTEM_UNITS[]
+= { "Radians",
+    "Feet",
+    "Meters",
+    "Arc Seconds" };
+
+static const int MAX_GROUND_REF_SYSTEM_UNITS_INDEX = 3;
+
+
+static const char* VERTICAL_DATUM[]
+= { "local mean sea level",
+    "National Geodetic Vertical Datum 1929",
+    "North American Vertical Datum 1988" };
+
+static const int MAX_VERTICAL_DATUM_INDEX = 2;
+
+static const char* HORIZONTAL_DATUM[]
+= { "North American Datum 1927 (NAD 27)",
+    "World Geoditic System 1972 (WGS 72)",
+    "WGS 84",
+    "NAD 83",
+    "Old Hawaii Datum",
+    "Puerto Rico Datum" };
+
+static const int MAX_HORIZONTAL_DATUM_INDEX = 5;
+
+
+ossimDemHeader::ossimDemHeader()
+   : _seGeoCornerX(0.0),
+     _seGeoCornerY(0.0),
+     _processCode(0),
+     _levelCode(0),
+     _elevPattern(0),
+     _groundRefSysCode(0),
+     _groundRefSysZone(0),
+     _groundRefSysUnits(0),
+     _elevUnits(0),
+     _numPolySides(0),
+     _counterclockAngle(0.0),
+     _elevAccuracyCode(0),
+     _minElevation(0),
+     _maxElevation(0),
+     _spatialResX(0.0),
+     _spatialResY(0.0),
+     _spatialResZ(0.0),
+     _profileRows(0),
+     _profileColumns(0),
+     _largeContInt(0),
+     _maxSourceUnits(0),
+     _smallContInt(0),
+     _minSourceUnits(0),
+     _sourceDate(0),
+     _inspRevDate(0),
+     _valFlag(0),
+     _suspectVoidFlg(0),
+     _vertDatum(0),
+     _horizDatum(0),
+     _dataEdition(0),
+     _perctVoid(0),
+     _westEdgeFlag(0),
+     _northEdgeFlag(0),
+     _eastEdgeFlag(0),
+     _southEdgeFlag(0),
+     _vertDatumShift(0.0)
+{
+}
+   
+std::string const&
+ossimDemHeader::getQuadName() const
+{
+   return _quadName;
+}
+
+std::string const&
+ossimDemHeader::getProcessInfo() const
+{
+   return _processInfo;
+}
+
+double
+ossimDemHeader::getSEGeoCornerX() const
+{
+   return _seGeoCornerX;
+}
+
+double
+ossimDemHeader::getSEGeoCornerY() const
+{
+   return _seGeoCornerY;
+}
+
+ossim_int32
+ossimDemHeader::getProcessCode() const
+{
+   return _processCode;
+}
+
+std::string const&
+ossimDemHeader::getSectionIndicator() const
+{
+   return _sectionIndicator;
+}
+
+std::string const&
+ossimDemHeader::getMappingCenterCode() const
+{
+   return _mapCenterCode;
+}
+
+ossim_int32
+ossimDemHeader::getLevelCode() const
+{
+   return _levelCode;
+}
+         
+ossim_int32
+ossimDemHeader::getElevPattern() const
+{
+   return _elevPattern;
+}
+
+ossim_int32
+ossimDemHeader::getGroundRefSysCode() const
+{
+   return _groundRefSysCode;
+}
+    
+ossim_int32
+ossimDemHeader::getGroundRefSysZone() const
+{
+   return _groundRefSysZone;
+}
+
+ossim_int32
+ossimDemHeader::getGroundRefSysUnits() const
+{
+   return _groundRefSysUnits;
+}
+
+ossim_int32
+ossimDemHeader::getElevationUnits() const
+{
+   return _elevUnits;
+}
+
+ossim_int32
+ossimDemHeader::getNumPolySides() const
+{
+   return _numPolySides;
+}
+
+ossimDemPointVector const&
+ossimDemHeader::getDEMCorners() const
+{
+   return _demCorners;
+}
+
+double
+ossimDemHeader::getCounterclockAngle() const
+{
+   return _counterclockAngle;
+}
+
+ossim_int32
+ossimDemHeader::getElevAccuracyCode() const
+{
+   return _elevAccuracyCode;
+}
+
+double
+ossimDemHeader::getMinimumElev() const
+{
+   return _minElevation;
+}
+
+double
+ossimDemHeader::getMaximumElev() const
+{
+   return _maxElevation;
+}
+
+double
+ossimDemHeader::getSpatialResX() const
+{
+   return _spatialResX;
+}
+
+double
+ossimDemHeader::getSpatialResY() const
+{
+   return _spatialResY;
+}
+
+double
+ossimDemHeader::getSpatialResZ() const
+{
+   return _spatialResZ;
+}
+
+ossim_int32
+ossimDemHeader::getProfileRows() const
+{
+   return _profileRows;
+}
+
+ossim_int32
+ossimDemHeader::getProfileColumns() const
+{
+   return _profileColumns;
+}
+
+ossim_int32
+ossimDemHeader::getLargeContInt() const
+{
+   return _largeContInt;
+}
+
+ossim_int32
+ossimDemHeader::getMaxSourceUnits() const
+{
+   return _maxSourceUnits;
+}
+
+ossim_int32
+ossimDemHeader::getSmallContInt() const
+{
+   return _smallContInt;
+}
+
+ossim_int32
+ossimDemHeader::getMinSourceUnits() const
+{
+   return _minSourceUnits;
+}
+
+ossim_int32
+ossimDemHeader::getSourceDate() const
+{
+   return _sourceDate;
+}
+
+ossim_int32
+ossimDemHeader::getInspRevDate() const
+{
+   return _inspRevDate;
+}
+
+std::string const&
+ossimDemHeader::getInspFlag() const
+{
+   return _inspFlag;
+}
+
+ossim_int32
+ossimDemHeader::getDataValFlag() const
+{
+   return _valFlag;
+}
+
+ossim_int32
+ossimDemHeader::getSuspectVoidFlag() const
+{
+   return _suspectVoidFlg;
+}
+
+ossim_int32
+ossimDemHeader::getVertDatum () const
+{
+   return _vertDatum;
+}
+
+ossim_int32
+ossimDemHeader::getHorizDatum() const
+{
+   return _horizDatum;
+}
+
+ossim_int32
+ossimDemHeader::getDataEdition() const
+{
+   return _dataEdition;
+}
+
+ossim_int32
+ossimDemHeader::getPerctVoid() const
+{
+   return _perctVoid;
+}
+
+ossim_int32
+ossimDemHeader::getWestEdgeFlag() const
+{
+   return _westEdgeFlag;
+}
+
+ossim_int32
+ossimDemHeader::getNorthEdgeFlag() const
+{
+   return _northEdgeFlag;
+}
+
+ossim_int32
+ossimDemHeader::getEastEdgeFlag() const
+{
+   return _eastEdgeFlag;
+}
+
+ossim_int32
+ossimDemHeader::getSouthEdgeFlag() const
+{
+   return _southEdgeFlag;
+}
+
+double
+ossimDemHeader::getVertDatumShift() const
+{
+   return _vertDatumShift;
+}
+
+std::ostream&
+operator<<(std::ostream& s, const ossimDemHeader& header)
+{
+   return header.print(s);
+}
+
+bool ossimDemHeader::open(const ossimFilename& file)
+{
+   bool result = ossimDemUtil::isUsgsDem(file);
+   std::ifstream is(file.c_str(), std::ios_base::in | std::ios_base::binary);
+   if ( is.good() )
+   {
+      open(is);
+      is.close();
+   }
+   else
+   {
+      result = false;
+   }
+   return result;
+}
+
+std::istream& ossimDemHeader::open(std::istream& is)
+{
+   if ( is.good() )
+   {
+      char* bufstr = new char[1024];
+      char* temp   = new char[1024];
+      ossim_int32 i;
+      
+      ossimDemUtil::getRecord(is, bufstr);
+      
+      strncpy(temp, bufstr, 40);
+      temp[40] = '\0';
+      _quadName = temp;
+      
+      strncpy(temp,bufstr+40,40);
+      temp[40] = '\0';
+      _processInfo = temp;
+      
+      ossimDemUtil::getDouble(bufstr, 109, 13, _seGeoCornerX);
+      ossimDemUtil::getDouble(bufstr, 122, 13, _seGeoCornerY);
+      _processCode = ossimDemUtil::getLong(bufstr, 135, 1);
+      
+      strncpy(temp,bufstr+137,3);
+      temp[3] = '\0';
+      _sectionIndicator = temp;
+      
+      strncpy(temp,bufstr+140,4);
+      temp[4] = '\0';
+      _mapCenterCode = temp;
+      
+      _levelCode = ossimDemUtil::getLong(bufstr, 144, 6);
+      _elevPattern = ossimDemUtil::getLong(bufstr, 150, 6);
+      _groundRefSysCode = ossimDemUtil::getLong(bufstr, 156, 6);
+      _groundRefSysZone = ossimDemUtil::getLong(bufstr, 162, 6);
+      _groundRefSysUnits = ossimDemUtil::getLong(bufstr, 528, 6);
+      _elevUnits = ossimDemUtil::getLong(bufstr, 534, 6);
+      _numPolySides = ossimDemUtil::getLong(bufstr, 540, 6);
+      
+      for (i = 0; i < 4; i++)
+      {
+         double x,y;
+         ossim_int32 pos = 546 + (i * 48);
+         ossimDemUtil::getDouble(bufstr, pos, 24, x);
+         ossimDemUtil::getDouble(bufstr, pos + 24, 24, y);
+      _demCorners.push_back(ossimDemPoint(x,y));
+      }
+      
+      ossimDemUtil::getDouble(bufstr, 738, 24, _minElevation);
+      ossimDemUtil::getDouble(bufstr, 762, 24, _maxElevation);
+      ossimDemUtil::getDouble(bufstr, 786, 24, _counterclockAngle );
+      _elevAccuracyCode = ossimDemUtil::getLong(bufstr, 810, 6);
+      ossimDemUtil::getDouble(bufstr, 816, 12, _spatialResX);
+      ossimDemUtil::getDouble(bufstr, 828, 12, _spatialResY);
+      ossimDemUtil::getDouble(bufstr, 840, 12, _spatialResZ);
+      _profileRows = ossimDemUtil::getLong(bufstr, 852, 6);
+      _profileColumns = ossimDemUtil::getLong(bufstr, 858, 6);
+      _largeContInt = ossimDemUtil::getLong(bufstr, 864, 5);
+      _maxSourceUnits = ossimDemUtil::getLong(bufstr, 869, 1);
+      _smallContInt = ossimDemUtil::getLong(bufstr, 870, 5);
+      _minSourceUnits = ossimDemUtil::getLong(bufstr, 875, 1);
+      _sourceDate = ossimDemUtil::getLong(bufstr, 876, 4);
+      _inspRevDate = ossimDemUtil::getLong(bufstr, 880, 4);
+      
+      strncpy(temp, bufstr+884,1);
+      temp[1]='\0';
+      _inspFlag = temp;
+      
+      _valFlag = ossimDemUtil::getLong(bufstr, 885, 1);
+      _suspectVoidFlg = ossimDemUtil::getLong(bufstr, 886, 2);
+      _vertDatum = ossimDemUtil::getLong(bufstr, 888, 2);
+      _horizDatum = ossimDemUtil::getLong(bufstr, 890, 2);
+      if (_horizDatum == 0)
+         _horizDatum = 1;   // Default to NAD27
+      
+      _dataEdition = ossimDemUtil::getLong(bufstr, 892, 4);
+      _perctVoid = ossimDemUtil::getLong(bufstr, 896, 4);
+      _westEdgeFlag = ossimDemUtil::getLong(bufstr, 900, 2);
+      _northEdgeFlag = ossimDemUtil::getLong(bufstr, 902, 2);
+      _eastEdgeFlag = ossimDemUtil::getLong(bufstr, 904, 2);
+      _southEdgeFlag = ossimDemUtil::getLong(bufstr, 906, 2);
+      ossimDemUtil::getDouble(bufstr, 908, 7, _vertDatumShift);
+
+      delete [] bufstr;
+      delete [] temp;
+      bufstr = 0;
+      temp = 0;
+   }
+   return is;
+}
+
+
+std::ostream& ossimDemHeader::print(std::ostream& out) const
+{
+   const int W = 24; // format width
+   const int CW = W-8; // format corner width
+   
+   // Capture the original flags then set float output to full precision.
+   std::ios_base::fmtflags f = out.flags();
+
+   // Note:  This is only a partial print for now...
+   std::string prefix = "usgs_dem.";
+   
+   out << std::setiosflags(std::ios_base::fixed|std::ios_base::left)
+       << std::setprecision(10)
+      
+       << prefix << std::setw(W)
+       << "quadrangle_name:" << getQuadName().c_str() << "\n"
+       << prefix << std::setw(W)
+       << "process_info:" << getProcessInfo().c_str() << "\n"
+       << prefix << std::setw(W)
+       << "se_geo_corner_x:" << getSEGeoCornerX() << "\n"
+       << prefix << std::setw(W)
+       << "se_geo_corner_y:" << getSEGeoCornerY() << "\n"
+       << prefix << std::setw(W)
+       << "process_code:";
+   
+   ossim_int32 tmpl = getProcessCode() - 1;
+   if ( tmpl >= 0 && tmpl <= MAX_PROCESS_CODE_INDEX)
+   {
+      out << PROCESS_CODE[tmpl] << "\n";
+   }
+   else
+   {
+      out << "unknown" << "\n";
+   }
+
+   out << prefix << std::setw(W)
+       << "section_indicator: " << getSectionIndicator().c_str() << "\n"
+       << prefix << std::setw(W)
+       << "mapping_center_code: " << getMappingCenterCode().c_str() << "\n"
+       << prefix << std::setw(W)
+       << "level_code: " << getLevelCode() << "\n"
+       << prefix << std::setw(W)
+       << "elev_pattern: " << getElevPattern() << "\n"
+       << prefix << std::setw(W) << "ground_ref_sys: ";
+   
+   tmpl = getGroundRefSysCode();
+   if ( tmpl >= 0 && tmpl <= MAX_GROUND_REF_SYSTEM_INDEX)
+   {
+      out << GROUND_REF_SYSTEM[tmpl] << "\n";
+   }
+   else
+   {
+      out << "unknown\n";
+   }
+   
+   out << prefix << std::setw(W)
+       << "ground_ref_sys_zone: " << getGroundRefSysZone() << "\n"
+       << prefix << std::setw(W)
+       << "ground_ref_sys_units:";
+   tmpl = getGroundRefSysUnits();
+   if ( tmpl >= 0 && tmpl <= MAX_GROUND_REF_SYSTEM_UNITS_INDEX)
+   {
+      out << GROUND_REF_SYSTEM_UNITS[tmpl] << "\n";
+   }
+   else
+   {
+      out << "unknown\n";
+   }
+         
+   out << prefix << std::setw(W)
+       << "elevation_units: ";
+   tmpl = getElevationUnits();
+   if ( tmpl >= 0 && tmpl <= MAX_GROUND_REF_SYSTEM_UNITS_INDEX)
+   {
+      out << GROUND_REF_SYSTEM_UNITS[tmpl] << "\n";
+   }
+   else
+   {
+      out << "unknown\n";
+   }
+
+   out << prefix << std::setw(W)
+       << "number_poly_sides: " << getNumPolySides() << "\n"
+       << prefix << std::setw(W)
+       << "counterclock_angle: " << getCounterclockAngle()<< "\n"
+       << prefix << std::setw(W)
+       << "elev_accuracy_code: " << getElevAccuracyCode()<< "\n"
+       << prefix << std::setw(W)
+       << "minimum_elevation: " << getMinimumElev() << "\n"
+       << prefix << std::setw(W)
+       << "maximum_elevation: " << getMaximumElev() << "\n"
+       << prefix << std::setw(W)
+       << "spatial_res_x: " << getSpatialResX() << "\n"
+       << prefix << std::setw(W)
+       << "spatial_res_y: " << getSpatialResY() << "\n"
+       << prefix << std::setw(W)
+       << "spatial_res_z:" << getSpatialResZ() << "\n"
+       << prefix << std::setw(W)
+       << "profile_rows: " << getProfileRows() << "\n"
+       << prefix << std::setw(W)
+       << "profile_columns:" << getProfileColumns() << "\n"
+       << prefix << std::setw(W)
+       << "source_date:" << getSourceDate() << "\n"
+       << prefix << std::setw(W)
+       << "revision_date:" << getInspRevDate() << "\n"
+       << prefix  << std::setw(W)
+       << "vertical_datum:";
+   
+   tmpl = getVertDatum() - 1;
+   if ( tmpl >= 0 && tmpl <= MAX_VERTICAL_DATUM_INDEX)
+   {
+      out << VERTICAL_DATUM[tmpl] << "\n";
+   }
+   else
+   {
+      out << "unknown\n";
+   }
+
+   out << prefix << std::setw(W)
+       << "vertical_datum_shift:" << getVertDatumShift() << "\n"
+       << prefix << std::setw(W)
+       << "horizontal_datum:";
+   tmpl = getHorizDatum() - 1;
+   if ( tmpl >= 0 && tmpl <= MAX_HORIZONTAL_DATUM_INDEX)
+   {
+      out << HORIZONTAL_DATUM[tmpl] << "\n";
+   }
+   else
+   {
+      out << "unknown\n";
+   }
+
+   const ossimDemPointVector CORNERS = getDEMCorners();
+   for (unsigned int i=0; i < CORNERS.size(); ++i)
+   {
+      out << prefix << "corner[" << i
+          << std::setw(CW)<< "].x:  " << CORNERS[i].getX() << "\n"
+          << prefix << "corner[" << i
+          << std::setw(CW)<< "].y:  " << CORNERS[i].getY() << "\n"
+          << std::endl;
+   }
+
+   out << std::endl;
+
+   // Reset flags.
+   out.setf(f);   
+
+   return out;
+}
+
+std::istream& operator>>(std::istream& s, ossimDemHeader& header)
+{
+   return header.open(s);
+}
+
+bool ossimDemHeader::getImageGeometry(ossimKeywordlist& kwl,
+                                      const char* prefix) const
+{
+   ossimString type = getProjectionType();
+   ossimString datum = getHorizDatumCode();
+   if ( (type == "unknown") || (datum == "unknown") )
+   {
+      return false;
+   }
+
+   if (_demCorners.size() != 4)
+   {
+      return false;
+   }
+
+   double tieX   = _demCorners[1].getX();
+   double tieY   = _demCorners[1].getY();
+   double scaleX = getSpatialResX();
+   double scaleY = getSpatialResX();
+   
+   // Add these for all projections.
+   kwl.add(prefix,
+           ossimKeywordNames::TYPE_KW,
+           type);
+   
+   kwl.add(prefix,
+           ossimKeywordNames::DATUM_KW,
+           datum);
+
+   if (getGroundRefSysCode() == 0) // Geographic.
+   {
+      // ESH 10/2008 -- The Dem ground units can be either radians or 
+      // arc seconds, so we have to convert parameters in these units 
+      // to degrees which is what OSSIM is assuming.
+      bool bIsArcSecs = (getGroundRefSysUnits() == 3) ? true : false;
+      bool bIsRadians = (getGroundRefSysUnits() == 0) ? true : false;
+
+      double convertFactor = 1.0;
+      if ( bIsArcSecs == true )
+      {
+         convertFactor = 1.0 / 3600;
+      }
+      else if ( bIsRadians == true )
+      {
+         convertFactor = 180.0 / M_PI;
+      }
+
+      kwl.add(prefix,
+              ossimKeywordNames::TIE_POINT_LON_KW,
+              (tieX * convertFactor) );
+      kwl.add(prefix,
+              ossimKeywordNames::TIE_POINT_LAT_KW,
+              (tieY * convertFactor) );
+      kwl.add(prefix,
+              ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON,
+              (scaleX * convertFactor) );
+      kwl.add(prefix,
+              ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT,
+              (scaleY * convertFactor) );
+   }
+   else if (getGroundRefSysCode() == 1) // UTM
+   {
+      // Get the zone.
+      kwl.add(prefix,
+              ossimKeywordNames::ZONE_KW,
+              abs(getGroundRefSysZone()));
+
+      // Set the hemisphere.
+      kwl.add(prefix,
+              ossimKeywordNames::HEMISPHERE_KW,
+              (getGroundRefSysZone()<0?"S":"N"));
+
+      // Set the tie.
+      if (getGroundRefSysUnits() == 1) // Feet...
+      {
+         tieX = ossim::usft2mtrs(tieX);
+         tieY = ossim::usft2mtrs(tieY);
+         scaleX = ossim::usft2mtrs(scaleX);
+         scaleY = ossim::usft2mtrs(scaleY);
+         
+      }
+      kwl.add(prefix,
+              ossimKeywordNames::TIE_POINT_EASTING_KW,
+              tieX);
+      kwl.add(prefix,
+              ossimKeywordNames::TIE_POINT_NORTHING_KW,
+              tieY);
+      kwl.add(prefix,
+              ossimKeywordNames::METERS_PER_PIXEL_X_KW,
+              scaleX);
+      kwl.add(prefix,
+              ossimKeywordNames::METERS_PER_PIXEL_Y_KW,
+              scaleY);
+   }
+   else if (getGroundRefSysCode() == 2) // State Plane
+   {
+      return false; // Need to code...
+   }
+
+   
+   return true;
+}
+
+ossimString ossimDemHeader::getHorizDatumCode() const
+{
+   ossimString code;
+   switch(getHorizDatum())
+   {
+      case 1:
+         code = "NAS-C";
+         break;
+      case 2:
+         code = "WGD";
+         break;
+      case 3:
+         code = "WGE";
+        break;         
+      case 4:
+         code = "NAR-C";
+        break;         
+      case 5:
+         code = "OHA-M";
+        break;         
+      case 6:
+         code = "PUR";
+         break;
+      default:
+         code = "unknown";
+        break;         
+   }
+   return code;
+}
+         
+ossimString ossimDemHeader::getProjectionType() const
+{
+   ossimString type;
+   switch(getGroundRefSysCode())
+   {
+      case 0:
+         type = "ossimEquDistCylProjection";
+         break;
+      case 1:
+         type = "ossimUtmProjection";
+         break;
+      case 2:
+      default:
+         type = "unknown";
+         break;
+   }
+   return type;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimDemInfo.cpp b/ossim/src/ossim/support_data/ossimDemInfo.cpp
new file mode 100644
index 0000000..7c82e1a
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimDemInfo.cpp
@@ -0,0 +1,62 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: USGS DEM Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <iostream>
+
+#include <ossim/support_data/ossimDemInfo.h>
+
+#include <ossim/base/ossimErrorCodes.h>
+#include <ossim/base/ossimFilename.h>
+
+#include <ossim/support_data/ossimDemHeader.h>
+#include <ossim/support_data/ossimDemUtil.h>
+
+ossimDemInfo::ossimDemInfo()
+   : theFile()
+{
+}
+
+ossimDemInfo::~ossimDemInfo()
+{
+}
+
+bool ossimDemInfo::open(const ossimFilename& file)
+{
+   bool result = ossimDemUtil::isUsgsDem(file);
+
+   if ( result )
+   {
+      theFile = file;
+   }
+   else
+   {
+      theFile = ossimFilename::NIL;
+   }
+   
+   return result;
+}
+
+std::ostream& ossimDemInfo::print(std::ostream& out) const
+{
+   if ( theFile.exists() )
+   {
+      ossimDemHeader hdr;
+      if ( hdr.open(theFile) )
+      {
+         // std::string prefix;
+         hdr.print(std::cout);
+      }
+   }
+   return out;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimDemPoint.cpp b/ossim/src/ossim/support_data/ossimDemPoint.cpp
new file mode 100644
index 0000000..3c6e628
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimDemPoint.cpp
@@ -0,0 +1,17 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Contains class definition for DEMPoint.
+//*******************************************************************
+//  $Id: ossimDemPoint.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/support_data/ossimDemPoint.h>
+
diff --git a/ossim/src/ossim/support_data/ossimDemProfile.cpp b/ossim/src/ossim/support_data/ossimDemProfile.cpp
new file mode 100644
index 0000000..21aee6c
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimDemProfile.cpp
@@ -0,0 +1,156 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Ken Melero
+//         Orginally written by Jamie Moyers (jmoyers at geeks.com)
+//         Adapted from the package KDEM.
+// Description: This class defines a DEM profile.
+//
+//********************************************************************
+// $Id: ossimDemProfile.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstdlib>
+#include <iostream>
+#include <sstream>
+
+#include <ossim/support_data/ossimDemProfile.h>
+#include <ossim/support_data/ossimDemUtil.h>
+
+ossimDemProfile::ossimDemProfile()
+   : _row(0),
+     _column(0),
+     _numberElevations(0),
+     _locDatumElev(0.0),
+     _minElev(0.0),
+     _maxElev(0.0)
+{
+}
+
+ossimDemProfile::ossimDemProfile(ossimDemProfile const& right)
+{
+   operator=(right);
+}
+
+ossimDemProfile const&
+ossimDemProfile::operator=(ossimDemProfile const& right)
+{
+   if (this == &right)
+      return *this;
+
+   _row = right._row;
+   _column = right._column;
+   _numberElevations = right._numberElevations;
+   _profileLocation = right._profileLocation;
+   _locDatumElev = right._locDatumElev;
+   _minElev = right._minElev;
+   _maxElev = right._maxElev;
+   _elevations = right._elevations;
+
+   return *this;
+}
+
+ossim_int32
+ossimDemProfile::getRowNumber() const
+{
+   return _row;
+}
+
+ossim_int32
+ossimDemProfile::getColumnNumber() const
+{
+   return _column;
+}
+
+ossim_int32
+ossimDemProfile::getNumberOfElevations() const
+{
+   return _numberElevations;
+}
+
+ossimDemPoint const&
+ossimDemProfile::getProfileLocation() const
+{
+   return _profileLocation;
+}
+
+double
+ossimDemProfile::getLocalDatumElevation() const
+{
+   return _locDatumElev;
+}
+
+double
+ossimDemProfile::getMinimumElev() const
+{
+   return _minElev;
+}
+
+double
+ossimDemProfile::getMaximumElev() const
+{
+   return _maxElev;
+}
+
+ossimDemElevationVector const&
+ossimDemProfile::getElevations() const
+{
+   return _elevations;
+}
+
+std::istream&
+operator>>(std::istream& s, ossimDemProfile& demp)
+{
+   //   string bufstr;
+   char bufstr[1024];
+
+   ossimDemUtil::getRecord(s,bufstr);
+
+   demp._row = ossimDemUtil::getLong(bufstr, 0, 6);
+   demp._column = ossimDemUtil::getLong(bufstr, 6, 6);
+   demp._numberElevations = ossimDemUtil::getLong(bufstr, 12, 6);
+
+   double x,y;
+   ossimDemUtil::getDouble(bufstr, 24, 24, x);
+   ossimDemUtil::getDouble(bufstr, 48, 24, y);
+   demp._profileLocation.setXY(x,y);
+
+   ossimDemUtil::getDouble(bufstr, 72, 24, demp._locDatumElev);
+   ossimDemUtil::getDouble(bufstr, 96, 24, demp._minElev);
+   ossimDemUtil::getDouble(bufstr, 120, 24, demp._maxElev);
+
+   demp._elevations.erase(demp._elevations.begin(), demp._elevations.end());   
+   demp._elevations.reserve(demp._numberElevations);
+
+   // Extract elevations in this record.
+   ossim_int32 count = 0;
+   while ((count < 146) && (count < demp._numberElevations))
+   {
+      demp._elevations.push_back(ossimDemUtil::getLong(bufstr, 144+(count*6), 6));
+      count++;
+   }
+   
+   ossim_int32 t;
+   while (count < demp._numberElevations)
+   {
+      t = (count - 146) % 170;
+      if (t == 0)
+         ossimDemUtil::getRecord(s,bufstr);
+      demp._elevations.push_back(ossimDemUtil::getLong(bufstr, t*6, 6));
+      count++;
+   }
+
+   return s;
+}
+
+
+std::ostream& operator<<(std::ostream& s, ossimDemProfile& /* demp */)
+{
+   return s;
+}
+
+
+
diff --git a/ossim/src/ossim/support_data/ossimDemStats.cpp b/ossim/src/ossim/support_data/ossimDemStats.cpp
new file mode 100644
index 0000000..563511f
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimDemStats.cpp
@@ -0,0 +1,127 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Ken Melero
+//         Orginally written by Jamie Moyers (jmoyers at geeks.com)
+//         Adapted from the package KDEM.
+// Description: This class provides some statistics for DEMs.
+//
+//********************************************************************
+// $Id: ossimDemStats.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <stdlib.h>
+
+#include <ossim/support_data/ossimDemStats.h>
+#include <ossim/support_data/ossimDemUtil.h>
+using namespace std;
+
+ossimDemStats::ossimDemStats()
+   : _availCodeDE2(0),
+     _rsmeDE2x(0),
+     _rsmeDE2y(0),
+     _rsmeDE2z(0),
+     _sampleSizeDE2(0),
+     _availCodeDE5(0),
+     _rsmeDE5x(0),
+     _rsmeDE5y(0),
+     _rsmeDE5z(0),
+     _sampleSizeDE5(0)
+
+{
+}
+
+ossimDemStats::~ossimDemStats()
+{
+}
+
+long
+ossimDemStats::getAvailCodeDE2() const
+{
+   return _availCodeDE2;
+}
+
+long
+ossimDemStats::getRSMEDE2x() const
+{
+   return _rsmeDE2x;
+}
+
+long
+ossimDemStats::getRSMEDE2y() const
+{
+   return _rsmeDE2y;
+}
+
+long
+ossimDemStats::getRSMEDE2z() const
+{
+   return _rsmeDE2z;
+}
+
+long
+ossimDemStats::getSampleSizeDE2() const
+{
+   return _sampleSizeDE2;
+}
+
+long
+ossimDemStats::getAvailCodeDE5() const
+{
+   return _availCodeDE5;
+}
+
+long
+ossimDemStats::getRSMEDE5x() const
+{
+   return _rsmeDE5x;
+}
+
+long
+ossimDemStats::getRSMEDE5y() const
+{
+   return _rsmeDE5y;
+}
+
+long
+ossimDemStats::getRSMEDE5z() const
+{
+   return _rsmeDE5z;
+}
+
+long
+ossimDemStats::getSampleSizeDE5() const
+{
+   return _sampleSizeDE5;
+}
+
+ostream&
+operator<<(ostream& s,  ossimDemStats const& /* stats */)
+{
+   return s;
+}
+
+istream&
+operator>>(istream& s, ossimDemStats& stats)
+{
+   char bufstr[1024];
+
+   ossimDemUtil::getRecord(s, bufstr);
+
+   stats._availCodeDE2 = ossimDemUtil::getLong(bufstr, 0, 6);
+   stats._rsmeDE2x = ossimDemUtil::getLong(bufstr, 6, 6);
+   stats._rsmeDE2y = ossimDemUtil::getLong(bufstr, 12, 6);
+   stats._rsmeDE2z = ossimDemUtil::getLong(bufstr, 18, 6);
+   stats._sampleSizeDE2 = ossimDemUtil::getLong(bufstr, 24, 6);
+   stats._availCodeDE5 = ossimDemUtil::getLong(bufstr, 30, 6);
+   stats._rsmeDE5x = ossimDemUtil::getLong(bufstr, 36, 6);
+   stats._rsmeDE5y = ossimDemUtil::getLong(bufstr, 42, 6);
+   stats._rsmeDE5z = ossimDemUtil::getLong(bufstr, 48, 6);
+   stats._sampleSizeDE5 = ossimDemUtil::getLong(bufstr, 54, 6);
+
+   return s;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimDemUtil.cpp b/ossim/src/ossim/support_data/ossimDemUtil.cpp
new file mode 100644
index 0000000..8596813
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimDemUtil.cpp
@@ -0,0 +1,179 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Ken Melero
+//         Orginally written by Jamie Moyers (jmoyers at geeks.com)
+//         Adapted from the package KDEM.
+// Description: This class provides some simple utilities for DEMs.
+//
+//********************************************************************
+// $Id: ossimDemUtil.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstdio>
+#include <cstdlib>
+#include <iostream>
+
+#include <ossim/support_data/ossimDemUtil.h>
+
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+using namespace std;
+
+static const char DEM_TYPE_KW[] = "dem_type";
+static const char USGS_DEM_KW[] = "usgs_dem";
+
+bool ossimDemUtil::isUsgsDem(const ossimFilename& file)
+{
+   bool result = false;
+
+   if ( file.exists() )
+   {
+      
+      //---
+      // Open checks:
+      // 1) Check extension for .dem
+      //
+      // 2) Look for file.omd (ossim meta data) file containing keyword
+      //    "dem_type" with value of "usgs_dem".
+      //
+      // NOTE:
+      // There is a keyword list template stored in the templates directory:
+      // "ossim/etc/templates/usgs_dem_template.kwl"
+      //---
+      
+      ossimString ext = file.ext();
+      ext.downcase();
+      if (ext == "dem")
+      {
+         result = true;
+      }
+      else
+      {
+         // Look for file.omd
+         ossimFilename kwlFile = file;
+         kwlFile.setExtension("omd");
+         if (! kwlFile.exists() )
+         {
+            kwlFile.setExtension("OMD");
+         }
+         
+         if ( kwlFile.exists() )
+         {
+            ossimKeywordlist kwl(kwlFile);
+            if (kwl.getErrorStatus() == ossimErrorCodes::OSSIM_OK)
+            {
+               const char* lookup = kwl.find(DEM_TYPE_KW);
+               if (lookup)
+               {
+                  ossimString s = lookup;
+                  s.downcase();
+                  if (s == USGS_DEM_KW)
+                  {
+                     result = true;
+                  }
+               }
+            }
+         }
+      }
+      
+      if ( result )
+      {
+         // Open up the file for reading.
+         std::ifstream is(file.c_str(),
+                          std::ios_base::in | std::ios_base::binary);
+         if ( is.good() )
+         {
+            //---
+            // SPECIAL HACK (drb):
+            // Check some bytes and make sure there is no binary data.
+            // There are files out there with .dem extension that are binary
+            // rasters.
+            //---
+            ossim_uint8* ubuf = new ossim_uint8[512];
+            is.read((char*)ubuf, 512);
+            for (int i = 0; i < 512; ++i)
+            {
+               if (ubuf[i] > 0x7f)
+               {
+                  result = false;
+                  break;
+               }
+            }
+            delete [] ubuf;
+            ubuf = 0;
+            is.close();
+         }
+         else
+         {
+            result = false;
+         }
+      }
+      
+   } // matches:  if ( file.exists() )
+
+   return result;
+}
+
+bool
+ossimDemUtil::getRecord(istream& s, string& strbuf, long reclength)
+{
+   char* buf = new char[reclength + 1];
+
+   bool flag = ossimDemUtil::getRecord(s,buf,reclength);
+   if (flag == true)
+      strbuf = buf;
+
+   delete [] buf;
+
+   return flag;
+}
+
+bool
+ossimDemUtil::getRecord(istream& s, char* buf, long reclength)
+{
+   // buf is assumed to be at least reclength+1 in size.
+
+   if (!s)
+      return false;
+
+   long curpos = 0;
+   buf[curpos] = s.get();
+   while ((buf[curpos] != EOF) && 
+          (buf[curpos] != '\n') &&
+          (curpos < reclength-1))
+   {
+      curpos++;
+      buf[curpos] = s.get();
+   }
+   buf[curpos] = '\0';
+
+   if (s.peek() == '\n')
+      s.get();
+
+   return true;
+
+}
+
+bool
+ossimDemUtil::getDouble(string const& strbuf,
+                   long const startpos,
+                   long const width,
+                   double& val)
+{
+   if ((startpos + width - 1) > (long)(strbuf.length()))
+      return false;
+
+   // Convert FORTRAN 'D' exponent indicator to 'E'.
+   string tempbuf(strbuf.substr(startpos,width));
+   for (unsigned int i = 0; i < tempbuf.length(); i++)
+      if (tempbuf[i] == 'D')
+         tempbuf[i] = 'E';
+
+   val = atof(tempbuf.c_str());
+   return true;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimDoqq.cpp b/ossim/src/ossim/support_data/ossimDoqq.cpp
new file mode 100644
index 0000000..a565fa9
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimDoqq.cpp
@@ -0,0 +1,438 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Ken Melero
+// 
+// Description: This class parses a Digital Ortho Quarter Quad (DOQQ)
+//              header.
+//
+//********************************************************************
+// $Id: ossimDoqq.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <string.h>
+#include <ossim/support_data/ossimDoqq.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimNotifyContext.h>
+
+static ossimTrace traceDebug("ossimDoqq:debug");
+
+//**************************************************************************
+// CONSTRUCTOR
+//**************************************************************************
+ossimDoqq::ossimDoqq()
+   :  theErrorStatus(OSSIM_ERROR)
+{
+}
+
+//**************************************************************************
+// CONSTRUCTOR
+//**************************************************************************
+ossimDoqq::ossimDoqq(ossimFilename file)
+   :  theErrorStatus(OSSIM_ERROR)
+{
+   open(file);
+   theDoqFile.close();
+}
+
+//**************************************************************************
+// Opens the DOQ header and parses info.
+//**************************************************************************
+bool ossimDoqq::open(const ossimFilename& file)
+{
+   // Assume all kosher:
+   theErrorStatus = OSSIM_OK;
+
+   // Check first line of header to determine which version to parse.
+   if (theDoqFile.is_open())
+      theDoqFile.close();
+
+   theDoqFile.open(file.c_str(), std::ios::in);
+   char header[23];
+   theDoqFile.seekg(0, std::ios::beg);
+   theDoqFile.get(header, 22);
+   header[22] = '\0';
+   if(strcmp((const char*)header, "BEGIN_USGS_DOQ_HEADER") == 0)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimDoqq::ossimDoqq Loading DOQ version 2 header..."
+            << std::endl;
+      }
+
+      ldstr_v2(theDoqFile);
+   }
+   else
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimDoqq::ossimDoqq  Loading DOQ version 1 header..."
+            << std::endl;
+      }
+
+      ldstr_v1(theDoqFile);
+   }
+
+   // Check for error.
+   if(theErrorStatus)
+      return false;
+   return true;
+}
+
+ossimDoqq::~ossimDoqq()
+{
+}
+
+void ossimDoqq::ldstr_v2(std::istream& in)
+{
+   static const char MODULE[] = "ossimDoqq::ldstr_v2(istream& in)";
+
+   if (!in)
+   {
+      theErrorStatus = OSSIM_ERROR;
+      return;
+   }
+
+   char line[100];
+   char dum1[30];
+   char dum2[30];
+   char dum3[30];
+   char dum4[30];
+
+   while((strncmp(line, "END_USGS_HEADER", 15) != 0)&&
+			(in.good()))
+   {
+      // Read in one line of header at a time.
+      in.getline(line, 100);
+      
+      if(strncmp(line, "SAMPLES_AND_LINES", 17) == 0)
+      {
+         sscanf(line, "%s %s %s", dum1, dum2, dum3);
+         theLine = atoi(dum3);
+         theSample = atoi(dum2);
+      }
+
+      else if(strncmp(line, "HORIZONTAL_COORDINATE_SYSTEM", 28) == 0)
+      {
+         sscanf(line, "%s %s", dum1, dum2);
+         theProjection = dum2;
+      }
+      
+      else if(strncmp(line, "NW_QUAD_CORNER_XY", 17) == 0)
+      {         
+         sscanf(line, "%s %s %s", dum1, dum2, dum3);
+         
+         theUE = atof(dum2);
+         theUN = atof(dum3);
+      }
+      
+      else if(strncmp(line, "NE_QUAD_CORNER_XY", 17) == 0)
+      {
+         sscanf(line, "%s %s %s", dum1, dum2, dum3);
+         theLE = atof(dum2);
+         theLN = atof(dum3);
+      }
+
+      else if(strncmp(line, "COORDINATE_ZONE", 15) == 0)
+      {
+         sscanf(line, "%s %s", dum1, dum2);
+         theUtmZone = atoi(dum2);
+      }
+
+      else if(strncmp(line, "SOURCE_IMAGE_DATE", 17) == 0)
+      {
+         sscanf(line, "%s %s %s %s", dum1, dum2, dum3, dum4);
+         theAcqYear  = ossimString(dum2);
+         theAcqMonth = ossimString(dum3);
+         theAcqDay   = ossimString(dum4);
+      }
+
+      else if((strncmp(line, "XY_ORIGIN", 9) == 0))
+      {
+         sscanf(line, "%s %s %s", dum1, dum2, dum3);
+         theEasting = atof(dum2);
+         theNorthing = atof(dum3);        
+      }
+
+      else if((strncmp(line, "HORIZONTAL_DATUM", 16) == 0) && theDatum.empty())
+      {
+         ossimString datum;         
+         sscanf(line, "%s %s", dum1, dum2);
+         datum = dum2; 
+         
+         if(datum.contains("NAD27"))
+            theDatum = "NAD";
+         else
+            theDatum = "NAR";
+      }
+
+      else if(strncmp(line, "BYTE_COUNT", 10) == 0)
+      {
+         ossimString header;         
+         sscanf(line, "%s %s", dum1, dum2);
+         header = dum2;
+         
+         theHeaderSize = atoi(header.chars());
+      }
+
+      else if(strncmp(line, "BAND_CONTENT", 12) == 0)
+      {
+         ossimString rgbType;        
+         sscanf(line, "%s %s", dum1, dum2);
+         rgbType = dum2;
+
+         if(rgbType.contains("BLACK&WHITE"))
+            theRgb = 1;
+         else
+            theRgb = 3;
+      }
+
+      else if(strncmp(line, "HORIZONTAL_RESOLUTION", 21) == 0)
+      {
+         ossimString gsd;
+         sscanf(line, "%s %s", dum1, dum2);
+         gsd = dum2;
+
+         theGsd.x = gsd.toDouble();
+         theGsd.y = gsd.toDouble();
+      }
+
+      else if(strncmp(line, "QUADRANGLE_NAME", 15) == 0)
+      {
+         sscanf(line, "%s %29c", dum1, dum2);
+         dum2[29] = 0;
+         theQuadName = dum2;
+      }
+
+      else if(strncmp(line, "QUADRANT", 8) == 0)
+      {
+         sscanf(line, "%s %s", dum1, dum2);
+         theQuad = dum2;
+      }
+
+      else if(strncmp(line, "NATION", 6) == 0)
+      {
+         sscanf(line, "%s %s", dum1, dum2);
+         theNation = dum2;
+      }
+
+      else if(strncmp(line, "STATE", 5) == 0)
+      {
+         sscanf(line, "%s %s", dum1, dum2);
+         theState = dum2;
+      }
+
+      else if(strncmp(line, "RMSE_XY", 7) == 0)
+      {
+         sscanf(line, "%s %s", dum1, dum2);
+         theRMSE = ossimString(dum2).toDouble();
+      }
+
+      else if(strncmp(line, "IMAGE_SOURCE", 12) == 0)
+      {
+         sscanf(line, "%s %29c", dum1, dum2);
+         dum2[29] = 0;
+         theImageSource = dum2;
+      }
+
+      else if(strncmp(line, "SOURCE_IMAGE_ID", 15) == 0)
+      {
+         sscanf(line, "%s %29c", dum1, dum2);
+         dum2[29] = 0;
+         theSourceImageID = dum2;
+      }
+   }
+
+	if (!in.good())
+	{
+      theErrorStatus = OSSIM_ERROR;
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+			<< MODULE << " ERROR:\n"
+			<< "\tHeader stream is bad."
+			<< std::endl;
+      }
+		return;
+	}
+
+   // Check for valid lines and samples and header size.
+   if(theLine <= 0 || theSample <= 0 || theHeaderSize <= 0)
+   {
+      theErrorStatus = OSSIM_ERROR;
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << MODULE << " ERROR:\n"
+            << "\tInvalid lines or samples or header size."
+            << std::endl;
+      }
+      return;
+   }
+
+   // Assign concatenated acquisition date:
+   theAcqYearMonthDay = theAcqYear;
+   theAcqYearMonthDay += "-";
+   theAcqYearMonthDay += theAcqMonth;
+   theAcqYearMonthDay += "-";
+   theAcqYearMonthDay += theAcqDay;
+
+}
+
+void ossimDoqq::ldstr_v1(std::istream& in)
+{
+   static const char MODULE[] = "ossimDoqq::ldstr_v1(istream& in)";
+
+   if (!in)
+   {
+      theErrorStatus = OSSIM_ERROR;
+      return;
+   }
+
+   char tmp1[DATA_ORDER_SIZE+1];
+   in.seekg(DATA_ORDER_OFFSET, std::ios::beg);
+   in.get(tmp1, DATA_ORDER_SIZE+1);
+   theDataOrder = tmp1;
+
+   //***
+   // Perform a sanity check on the data order just in case this isn't a
+   // ossimDoqq file.
+   //***  
+   tmp1[DATA_ORDER_SIZE] = '\0';
+   int data_order = atoi(tmp1);
+   if ( (data_order != 1) && (data_order != 2) )
+   {
+      theErrorStatus = OSSIM_ERROR;
+
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << MODULE << " NOTICE:\n"
+            << "Invalid data ordering.  Not a doq?" << std::endl;
+      }
+   }
+   
+   char tmp2[LINE_SIZE+1];
+   in.seekg(LINE_OFFSET, std::ios::beg);
+   in.get(tmp2, LINE_SIZE+1);
+   theLine = atoi(tmp2);
+
+   char tmp3[SAMPLE_SIZE+1];
+   in.seekg(SAMPLE_OFFSET,std::ios::beg);
+   in.get(tmp3, SAMPLE_SIZE+1); 
+   theSample = atoi(tmp3);
+
+   // Check for valid lines and samples.
+   if (theLine <= 0 || theSample <= 0)
+   {
+      theErrorStatus = OSSIM_ERROR;
+
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << MODULE << " ERROR:\n"
+            << "\tInvalid lines or samples."
+            << std::endl;
+      }
+      
+      return;
+   }
+   
+   char tmp4[PROJECTION_SIZE+1];
+   in.seekg(PROJECTION_OFFSET, std::ios::beg);
+   in.get(tmp4, PROJECTION_SIZE+1);
+   theProjection = tmp4;
+
+   char tmp5[UTM_ZONE_SIZE+1];
+   in.seekg(UTM_ZONE_OFFSET, std::ios::beg);
+   in.get(tmp5, UTM_ZONE_SIZE+1);
+   theUtmZone = atoi(tmp5);
+
+   char tmp8[DATUM_SIZE+1];
+   in.seekg(DATUM_OFFSET, std::ios::beg);
+   in.get(tmp8, DATUM_SIZE+1);
+   theDatum = tmp8;
+
+   char rgbType[RGB_SIZE+1];
+   in.seekg(RGB_OFFSET, std::ios::beg);
+   in.get(rgbType, RGB_SIZE+1);
+
+
+   if(atoi(rgbType) == 5)
+   {
+      theRgb = 3;
+   }
+   else
+   {
+      theRgb = 1;
+   }
+   
+   theHeaderSize = (theSample * theRgb * 4);
+
+   // Calculate the size of each record.
+   theRecordSize = (theSample * theRgb);
+
+   char tmp6[UL_EASTING_SIZE+1];
+   in.seekg( (theRecordSize * 2) + UL_EASTING_OFFSET, std::ios::beg);
+   in.get(tmp6, UL_EASTING_SIZE+1);
+
+   char tmp7[UL_NORTHING_SIZE+1];
+   in.seekg( (theRecordSize * 2) + UL_NORTHING_OFFSET, std::ios::beg);
+   in.get(tmp7, UL_NORTHING_SIZE+1);
+   
+   // Get Easting and Northing.
+   theEasting = convertStr(tmp6);
+   theNorthing = convertStr(tmp7);
+
+   char tmp10[GSD_SIZE+1];
+   in.seekg( (theRecordSize*3) + GSD_X_OFFSET, std::ios::beg);
+   in.get(tmp10, GSD_SIZE+1);
+   theGsd.x = std::abs(ossimString(tmp10, tmp10+GSD_SIZE).toDouble());
+   in.seekg( (theRecordSize*3) + GSD_Y_OFFSET, std::ios::beg);
+   in.get(tmp10, GSD_SIZE+1);
+   theGsd.y = std::abs(ossimString(tmp10, tmp10+GSD_SIZE).toDouble());
+   
+}
+
+ossim_float64 ossimDoqq::convertStr(const char* str) const
+{
+   //***
+   // The USGS Projection Parameters in a OssimDoqq header have a "D" to
+   // denote the exponent.  This simply substitutes the "D" with an
+   // "E" so that atof works properly.
+   //***
+   ossimString tmp = str;
+   tmp.gsub("D", "E");
+   return tmp.toFloat64();
+}
+
+std::ostream& ossimDoqq::print(std::ostream& out) const
+{
+   const char* prefix = "doqq.";
+   out << prefix << "Quadrangle_Name: " << theQuadName << std::endl;
+   out << prefix << "Quadrant: " << theQuad << std::endl;
+   out << prefix << "Image_Source: " << theImageSource << std::endl;
+   out << prefix << "Source_Image_ID: " << theSourceImageID << std::endl;
+   out << prefix << "RMSE_XY: " << theRMSE << std::endl;
+   out << prefix << "Line: " << theLine << std::endl;
+   out << prefix << "Sample: " << theSample << std::endl;
+   out << prefix << "Projection: " << theProjection << std::endl;
+   out << prefix << "Datum: " << theDatum << std::endl;
+   out << prefix << "Easting: " << theEasting << std::endl;
+   out << prefix << "Northing: " << theNorthing << std::endl;
+   out << prefix << "UN: " << theUN << std::endl;
+   out << prefix << "UE: " << theUE << std::endl;
+   out << prefix << "LN: " << theLN << std::endl;
+   out << prefix << "LE: " << theLE << std::endl;
+   out << prefix << "GSD: " << theGsd << std::endl;
+   out << prefix << "Band: " << theRgb << std::endl;
+   out << prefix << "Utm_Zone: " << theUtmZone << std::endl;
+   
+   return out;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimDtedAcc.cpp b/ossim/src/ossim/support_data/ossimDtedAcc.cpp
new file mode 100644
index 0000000..a562ac0
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimDtedAcc.cpp
@@ -0,0 +1,287 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Ken Melero
+// 
+// Description:  This class gives access to the Accuracy Description
+//               (ACC) of a DTED Level 1 file.
+//
+//********************************************************************
+// $Id: ossimDtedAcc.cpp 23276 2015-04-24 21:01:51Z rashadkm $
+
+#include <cstdlib>
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+#include <string>
+
+#include <ossim/support_data/ossimDtedAcc.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimProperty.h>
+#include <ossim/base/ossimStringProperty.h>
+
+//**************************************************************************
+// CONSTRUCTOR
+//**************************************************************************
+ossimDtedAcc::ossimDtedAcc(const ossimFilename& dted_file,
+                           ossim_int32 offset)
+{
+   if(!dted_file.empty())
+   {
+      theStartOffset = offset;
+      // Check to see that dted file exists. 
+      if(!dted_file.exists())
+      {
+         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+         ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimDtedAcc::ossimDtedAcc: The DTED file does not exist: " << dted_file << std::endl;
+         return;
+      }
+      
+      // Check to see that the dted file is readable.
+      if(!dted_file.isReadable())
+      {
+         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+         ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimDtedAcc::ossimDtedAcc: The DTED file is not readable: " << dted_file << std::endl;
+         return;
+      }
+      
+      // Open the dted file for reading.
+      std::ifstream in(dted_file.c_str());
+      if(!in)
+      {
+         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+         ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimDtedAcc::ossimDtedAcc: Can't open the DTED file: " << dted_file << std::endl;
+         return;
+      }
+      in.seekg(offset);
+      parse(in);
+   }
+   else
+   {
+      clearFields();
+   }
+}
+ossimDtedAcc::ossimDtedAcc(std::istream& in)
+{
+   parse(in);
+}
+
+void ossimDtedAcc::clearFields()
+{
+   memset(theRecSen, '\0', FIELD1_SIZE+1);
+   memset(theAbsoluteCE, '\0',FIELD2_SIZE+1);
+   memset(theAbsoluteLE, '\0',FIELD3_SIZE+1);
+   memset(theRelativeCE, '\0',FIELD4_SIZE+1);
+   memset(theRelativeLE, '\0',FIELD5_SIZE+1);
+   memset(theField6, '\0',FIELD6_SIZE+1);
+   memset(theField7, '\0',FIELD7_SIZE+1);
+   memset(theField8, '\0',FIELD8_SIZE+1);
+   memset(theField9, '\0',FIELD9_SIZE+1);
+   memset(theField10, '\0',FIELD10_SIZE+1);
+   memset(theField11, '\0',FIELD11_SIZE+1);
+   memset(theField12, '\0',FIELD12_SIZE+1);
+   memset(theField13, '\0',FIELD13_SIZE+1);
+   memset(theField14, '\0',FIELD14_SIZE+1);
+   memset(theField15, '\0',FIELD15_SIZE+1);
+   memset(theField16, '\0',FIELD16_SIZE+1);
+   memset(theField17, '\0',FIELD17_SIZE+1);
+   
+   theStartOffset = 0;
+   theStopOffset = 0;
+}
+//**************************************************************************
+// ossimDtedAcc::parse()
+//**************************************************************************
+void ossimDtedAcc::parse(std::istream& in)
+{
+   clearErrorStatus();
+	clearFields();
+	theStartOffset = in.tellg();
+   theStopOffset  = theStartOffset;
+   // Parse theRecSen
+   in.read(theRecSen, FIELD1_SIZE);
+   theRecSen[FIELD1_SIZE] = '\0';
+
+   if(!(strncmp(theRecSen, "ACC", 3) == 0))
+   {
+      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+      in.seekg(theStartOffset);
+      return;
+   }
+   
+   // Parse theAbsoluteCE
+   in.read(theAbsoluteCE, FIELD2_SIZE);
+   theAbsoluteCE[FIELD2_SIZE] = '\0';
+   
+   // Parse theAbsoluteLE
+   in.read(theAbsoluteLE, FIELD3_SIZE);
+   theAbsoluteLE[FIELD3_SIZE] = '\0';
+   
+   // Parse theRelativeCE
+   in.read(theRelativeCE, FIELD4_SIZE);
+   theRelativeCE[FIELD4_SIZE] = '\0';
+   
+   // Parse theRelativeLE
+   in.read(theRelativeLE, FIELD5_SIZE);
+   theRelativeLE[FIELD5_SIZE] = '\0';
+   
+   // Parse Field 6
+   in.read(theField6, FIELD6_SIZE);
+   theField6[FIELD6_SIZE] = '\0';
+   
+   // Parse Field 7
+   in.read(theField7, FIELD7_SIZE);
+   theField7[FIELD7_SIZE] = '\0';
+   
+   // Parse Field 8
+   in.read(theField8, FIELD8_SIZE);
+   theField8[FIELD8_SIZE] = '\0';
+   
+   // Parse Field 9
+   in.read(theField9, FIELD9_SIZE);
+   theField9[FIELD9_SIZE] = '\0';
+   
+   // Parse Field 10
+   in.read(theField10, FIELD10_SIZE);
+   theField10[FIELD10_SIZE] = '\0';
+   
+   // Parse Field 11
+   in.read(theField11, FIELD11_SIZE);
+   theField11[FIELD11_SIZE] = '\0';
+   
+   // Parse Field 12
+   in.read(theField12, FIELD12_SIZE);
+   theField12[FIELD12_SIZE] = '\0';
+   
+   // Parse Field 13
+   in.read(theField13, FIELD13_SIZE);
+   theField13[FIELD13_SIZE] = '\0';
+   
+   // Parse Field 14
+   in.read(theField14, FIELD14_SIZE);
+   theField14[FIELD14_SIZE] = '\0';
+   
+   // Parse Field 15
+   in.read(theField15, FIELD15_SIZE);
+   theField15[FIELD15_SIZE] = '\0';
+   
+   // Parse Field 16
+   in.read(theField16, FIELD16_SIZE);
+   theField16[FIELD16_SIZE] = '\0';
+   
+   // Parse Field 17
+   in.read(theField17, FIELD17_SIZE);
+   theField17[FIELD17_SIZE] = '\0';
+
+   in.ignore(FIELD18_SIZE);
+   // Set the stop offset.
+   theStopOffset = theStartOffset + ACC_LENGTH;
+}
+
+ossimRefPtr<ossimProperty> ossimDtedAcc::getProperty(
+   const ossimString& name) const
+{
+   ossimRefPtr<ossimProperty> result = 0;
+   if (name == "recognition_sentinel")
+   {
+      result = new ossimStringProperty(name, theRecSen);
+      
+   }
+   else if (name == "absolute_ce")
+   {
+      result = new ossimStringProperty(name, theAbsoluteCE);
+   }
+   else if (name == "absolute_le")
+   {
+      result = new ossimStringProperty(name, theAbsoluteLE); 
+   }
+   else if (name == "relative_ce")
+   {
+      result = new ossimStringProperty(name, theRelativeCE);
+   }
+   else if (name == "relative_le")
+   {
+      result = new ossimStringProperty(name, theRelativeLE);
+   }
+   return result;
+}
+
+void ossimDtedAcc::getPropertyNames(
+   std::vector<ossimString>& propertyNames) const
+{
+   propertyNames.push_back(ossimString("recognition_sentinel"));
+   propertyNames.push_back(ossimString("absolute_ce"));
+   propertyNames.push_back(ossimString("absolute_le"));
+   propertyNames.push_back(ossimString("relative_ce"));
+   propertyNames.push_back(ossimString("relative_le"));
+}
+
+std::ostream& ossimDtedAcc::print(std::ostream& out,
+                                  const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += "acc.";
+
+   out << setiosflags(ios::left)
+       << pfx << setw(28) << "recognition_sentinel:" << theRecSen << "\n"
+       << pfx << setw(28) << "absolute_ce:"  << theAbsoluteCE << "\n"
+       << pfx << setw(28) << "absolute_le:"  << theAbsoluteLE << "\n"
+       << pfx << setw(28) << "relative ce:"  << theRelativeCE << "\n"
+       << pfx << setw(28) << "relative le:"  << theRelativeLE << "\n"
+       << pfx << setw(28) << "start_offset:" << theStartOffset << "\n"
+       << pfx << setw(28) << "stop_offset:"  << theStopOffset
+       << std::endl;
+   return out;
+}
+
+ossim_int32 ossimDtedAcc::absCE() const
+{
+   return atoi(theAbsoluteCE);
+}
+
+ossim_int32 ossimDtedAcc::absLE() const
+{
+   return atoi(theAbsoluteLE);
+}
+
+ossim_int32 ossimDtedAcc::relCE() const
+{
+   return atoi(theRelativeCE);
+}
+
+ossim_int32 ossimDtedAcc::relLE() const
+{
+   return atoi(theRelativeLE);
+}
+   
+ossim_int32 ossimDtedAcc::startOffset() const
+{
+   return theStartOffset;
+}
+
+ossim_int32 ossimDtedAcc::stopOffset()  const
+{
+   return theStopOffset;
+}
+
+
+
+//**************************************************************************
+// operator <<
+//**************************************************************************
+std::ostream& operator<<( std::ostream& os, const ossimDtedAcc& acc)
+{
+   std::string prefix;
+   return acc.print(os, prefix);
+}
+
+ossimDtedAcc::ossimDtedAcc(const ossimDtedAcc& /* source */)
+{
+      clearFields();
+}
+
+const ossimDtedAcc& ossimDtedAcc::operator=(const ossimDtedAcc& rhs)
+{
+   return rhs;
+}
diff --git a/ossim/src/ossim/support_data/ossimDtedDsi.cpp b/ossim/src/ossim/support_data/ossimDtedDsi.cpp
new file mode 100644
index 0000000..68f0a8f
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimDtedDsi.cpp
@@ -0,0 +1,586 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Ken Melero
+// 
+// Description:  This class gives access to the Data Set Identification
+//               (DSI) of a DTED Level 1 file.
+//
+//********************************************************************
+// $Id: ossimDtedDsi.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstdlib>
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+#include <string>
+
+#include <ossim/support_data/ossimDtedDsi.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimProperty.h>
+
+//**************************************************************************
+// CONSTRUCTOR
+//**************************************************************************
+ossimDtedDsi::ossimDtedDsi(const ossimFilename& dted_file, ossim_int32 offset)
+   :
+      theRecSen(),
+      theSecurityCode(),
+      theField3(),
+      theField4(),
+      theProductLevel(),
+      theField7(),
+      theField8(),
+      theEdition(),
+      theMatchMergeVersion(),
+      theMaintenanceDate(),
+      theMatchMergeDate(),
+      theMaintenanceCode(),
+      theProducerCode(),
+      theField15(),
+      theProductStockSpecNumber(),
+      theProductSpecNumber(),
+      theProductSpecDate(),
+      theVerticalDatum(),
+      theHorizontalDatum(),
+      theField21(),
+      theCompilationDate(),
+      theField23(),
+      theLatOrigin(),
+      theLonOrigin(),
+      theLatSW(),
+      theLonSW(),
+      theLatNW(),
+      theLonNW(),
+      theLatNE(),
+      theLonNE(),
+      theLatSE(),
+      theLonSE(),
+      theOrientation(),
+      theLatInterval(),
+      theLonInterval(),
+      theNumLatPoints(),
+      theNumLonLines(),
+      theCellIndicator(),
+      theField40(),
+      theField41(),
+      theField42(),
+      theStartOffset(0),
+      theStopOffset(0)
+{
+   if(!dted_file.empty())
+   {
+      // Check to see that dted file exists.
+      if(!dted_file.exists())
+      {
+         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedDsi::ossimDtedDsi: \nThe DTED file does not exist: " << dted_file << std::endl;
+         return;
+      }
+      
+      // Check to see that the dted file is readable.
+      if(!dted_file.isReadable())
+      {
+         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedDsi::ossimDtedDsi: The DTED file is not readable: " << dted_file << std::endl;
+         return;
+      }
+      
+      // Open the dted file for reading.
+      std::ifstream in(dted_file.c_str());
+      if(!in)
+      {
+         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedDsi::ossimDtedDsi: Unable to open the DTED file: " << dted_file << std::endl;
+         return;
+      }
+      in.seekg(offset);
+      parse(in);
+      
+      in.close();
+   }
+}
+
+//**************************************************************************
+// CONSTRUCTOR
+//**************************************************************************
+ossimDtedDsi::ossimDtedDsi(std::istream&  in)
+   :
+      theRecSen(),
+      theSecurityCode(),
+      theField3(),
+      theField4(),
+      theProductLevel(),
+      theField7(),
+      theField8(),
+      theEdition(),
+      theMatchMergeVersion(),
+      theMaintenanceDate(),
+      theMatchMergeDate(),
+      theMaintenanceCode(),
+      theProducerCode(),
+      theField15(),
+      theProductStockSpecNumber(),
+      theProductSpecNumber(),
+      theProductSpecDate(),
+      theVerticalDatum(),
+      theHorizontalDatum(),
+      theField21(),
+      theCompilationDate(),
+      theField23(),
+      theLatOrigin(),
+      theLonOrigin(),
+      theLatSW(),
+      theLonSW(),
+      theLatNW(),
+      theLonNW(),
+      theLatNE(),
+      theLonNE(),
+      theLatSE(),
+      theLonSE(),
+      theOrientation(),
+      theLatInterval(),
+      theLonInterval(),
+      theNumLatPoints(),
+      theNumLonLines(),
+      theCellIndicator(),
+      theField40(),
+      theField41(),
+      theField42(),
+      theStartOffset(0),
+      theStopOffset(0)
+{
+   parse(in);
+}
+
+void ossimDtedDsi::parse(std::istream& in)
+{
+   clearErrorStatus();
+   theStartOffset = in.tellg();
+   theStopOffset  = theStartOffset;
+   char tmp_chars[26]; // For blank field reads.
+   
+   // Seek to the start of the record.
+   in.seekg(theStartOffset, std::ios::beg);
+   
+   // Parse theRecSen
+   in.read(theRecSen, FIELD1_SIZE);
+   theRecSen[FIELD1_SIZE] = '\0';
+   if(!(strncmp(theRecSen, "DSI", 3) == 0))
+   {
+      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+      in.seekg(theStartOffset);
+      return;
+   }
+
+   // Parse theSecurityCode
+   in.read(theSecurityCode, FIELD2_SIZE);
+   theSecurityCode[FIELD2_SIZE] = '\0';
+   
+   // Parse Field 3
+   in.read(theField3, FIELD3_SIZE);
+   theField3[FIELD3_SIZE] = '\0';
+   
+   // Parse Field 4
+   in.read(theField4, FIELD4_SIZE);
+   theField4[FIELD4_SIZE] = '\0';
+   
+   // Parse Field 5 (currently blank)
+   in.read(tmp_chars, FIELD5_SIZE);
+   
+   // Parse theProductLevel
+   in.read(theProductLevel, FIELD6_SIZE);
+   theProductLevel[FIELD6_SIZE] = '\0';
+   
+   // Parse Field 7
+   in.read(theField7, FIELD7_SIZE);
+   theField7[FIELD7_SIZE] = '\0';
+   
+   // Parse Field 8
+   in.read(theField8, FIELD8_SIZE);
+   theField8[FIELD8_SIZE] = '\0';
+   
+   // Parse theEdition
+   in.read(theEdition, FIELD9_SIZE);
+   theEdition[FIELD9_SIZE] = '\0';
+   
+   // Parse theMatchMergeVersion
+   in.read(theMatchMergeVersion, FIELD10_SIZE);
+   theMatchMergeVersion[FIELD10_SIZE] = '\0';
+   
+   // Parse theMaintenanceDate
+   in.read(theMaintenanceDate, FIELD11_SIZE);
+   theMaintenanceDate[FIELD11_SIZE] = '\0';
+   
+   // Parse theMatchMergeDate
+   in.read(theMatchMergeDate, FIELD12_SIZE);
+   theMatchMergeDate[FIELD12_SIZE] = '\0';
+   
+   // Parse theMaintenanceCode
+   in.read(theMaintenanceCode, FIELD13_SIZE);
+   theMaintenanceCode[FIELD13_SIZE] = '\0';
+   
+   // Parse theProducerCode
+   in.read(theProducerCode, FIELD14_SIZE);
+   theProducerCode[FIELD14_SIZE] = '\0';
+   
+   // Parse Field 15
+   in.read(theField15, FIELD15_SIZE);
+   theField15[FIELD15_SIZE] = '\0';
+   
+   // Parse theProductStockSpecNumber
+   in.read(theProductStockSpecNumber, FIELD16_SIZE);
+   theProductStockSpecNumber[FIELD16_SIZE] = '\0';
+   
+   // Parse theProductSpecNumber
+   in.read(theProductSpecNumber, FIELD17_SIZE);
+   theProductSpecNumber[FIELD17_SIZE] = '\0';
+   
+   // Parse theProductSpecDate
+   in.read(theProductSpecDate, FIELD18_SIZE);
+   theProductSpecDate[FIELD18_SIZE] = '\0';
+   
+   // Parse theVerticalDatum
+   in.read(theVerticalDatum, FIELD19_SIZE);
+   theVerticalDatum[FIELD19_SIZE] = '\0';
+   
+   // Parse theHorizontalDatum
+   in.read(theHorizontalDatum, FIELD20_SIZE);
+   theHorizontalDatum[FIELD20_SIZE] = '\0';
+   
+   // Parse Field 21
+   in.read(theField21, FIELD21_SIZE);
+   theField21[FIELD21_SIZE] = '\0';
+   
+   // Parse theCompilationDate
+   in.read(theCompilationDate, FIELD22_SIZE);
+   theCompilationDate[FIELD22_SIZE] = '\0';
+   
+   // Parse Field 23
+   in.read(theField23, FIELD23_SIZE);
+   theField23[FIELD23_SIZE] = '\0';
+   
+   // Parse theLatOrigin
+   in.read(theLatOrigin, FIELD24_SIZE);
+   theLatOrigin[FIELD24_SIZE] = '\0';
+   
+   // Parse theLonOrigin
+   in.read(theLonOrigin, FIELD25_SIZE);
+   theLonOrigin[FIELD25_SIZE] = '\0';
+   
+   // Parse theLatSW
+   in.read(theLatSW, FIELD26_SIZE);
+   theLatSW[FIELD26_SIZE] = '\0';
+   
+   // Parse theLonSW
+   in.read(theLonSW, FIELD27_SIZE);
+   theLonSW[FIELD27_SIZE] = '\0';
+   
+   // Parse theLatNW
+   in.read(theLatNW, FIELD28_SIZE);
+   theLatNW[FIELD28_SIZE] = '\0';
+   
+   // Parse theLonNW
+   in.read(theLonNW, FIELD29_SIZE);
+   theLonNW[FIELD29_SIZE] = '\0';
+   
+   // Parse theLatNE
+   in.read(theLatNE, FIELD30_SIZE);
+   theLatNE[FIELD30_SIZE] = '\0';
+   
+   // Parse theLonNE
+   in.read(theLonNE, FIELD31_SIZE);
+   theLonNE[FIELD31_SIZE] = '\0';
+   
+   // Parse theLatSE
+   in.read(theLatSE, FIELD32_SIZE);
+   theLatSE[FIELD32_SIZE] = '\0';
+   
+   // Parse theLonSE
+   in.read(theLonSE, FIELD33_SIZE);
+   theLonSE[FIELD33_SIZE] = '\0';
+   
+   // Parse theOrientation
+   in.read(theOrientation, FIELD34_SIZE);
+   theOrientation[FIELD34_SIZE] = '\0';
+   
+   // Parse theLatInterval
+   in.read(theLatInterval, FIELD35_SIZE);
+   theLatInterval[FIELD35_SIZE] = '\0';
+   
+   // Parse theLonInterval
+   in.read(theLonInterval, FIELD36_SIZE);
+   theLonInterval[FIELD36_SIZE] = '\0';
+   
+   // Parse theNumLatPoints
+   in.read(theNumLatPoints, FIELD37_SIZE);
+   theNumLatPoints[FIELD37_SIZE] = '\0';
+   
+   // Parse theNumLonLines
+   in.read(theNumLonLines, FIELD38_SIZE);
+   theNumLonLines[FIELD38_SIZE] = '\0';
+   
+   // Parse theCellIndicator
+   in.read(theCellIndicator, FIELD39_SIZE);
+   theCellIndicator[FIELD39_SIZE] = '\0';
+   
+   // Parse Field 40
+   in.read(theField40, FIELD40_SIZE);
+   theField40[FIELD40_SIZE] = '\0';
+   
+   // Parse Field 41
+   in.read(theField41, FIELD41_SIZE);
+   theField41[FIELD41_SIZE] = '\0';
+   
+   // Parse Field 42
+   in.read(theField42, FIELD42_SIZE);
+   theField42[FIELD42_SIZE] = '\0';
+
+   // Set the stop offset.
+   theStopOffset = theStartOffset + DSI_LENGTH;
+}
+
+ossimRefPtr<ossimProperty> ossimDtedDsi::getProperty(
+   const ossimString& /* name */) const
+{
+   ossimRefPtr<ossimProperty> result = 0;
+   return result;
+}
+
+void ossimDtedDsi::getPropertyNames(
+   std::vector<ossimString>& propertyNames) const
+{
+   propertyNames.push_back(ossimString("dted_dsi_record"));
+}
+
+ossimString ossimDtedDsi::recognitionSentinel() const
+{
+   return theRecSen;
+}
+
+ossimString ossimDtedDsi::securityCode() const
+{
+   return ossimString(theSecurityCode);
+}
+
+ossimString ossimDtedDsi::productLevel() const
+{
+   return ossimString(theProductLevel);
+}
+
+ossimString ossimDtedDsi::edition() const
+{
+   return ossimString(theEdition);
+}
+
+ossimString ossimDtedDsi::matchMergeVersion() const
+{
+   return ossimString(theMatchMergeVersion);
+}
+
+ossimString ossimDtedDsi::maintanenceDate() const
+{
+   return ossimString(theMaintenanceDate);
+}
+
+ossimString ossimDtedDsi::matchMergeDate() const
+{
+   return ossimString(theMatchMergeDate);
+}
+
+ossimString ossimDtedDsi::maintenanceCode() const
+{
+   return ossimString(theMaintenanceCode);
+}
+
+ossimString ossimDtedDsi::producerCode() const
+{
+   return ossimString(theProducerCode);
+}
+
+ossimString ossimDtedDsi::productStockSpecNumber() const
+{
+   return ossimString(theProductStockSpecNumber);
+}
+
+ossimString ossimDtedDsi::productSpecNumber() const
+{
+   return ossimString(theProductSpecNumber);
+}
+
+ossimString ossimDtedDsi::productSpecDate() const
+{
+   return ossimString(theProductSpecDate);
+}
+
+ossimString ossimDtedDsi::verticalDatum() const
+{
+   return ossimString(theVerticalDatum);
+}
+
+ossimString ossimDtedDsi::horizontalDatum() const
+{
+   return ossimString(theHorizontalDatum);
+}
+
+ossimString ossimDtedDsi::compilationDate() const
+{
+   return ossimString(theCompilationDate);
+}
+
+ossimString ossimDtedDsi::latOrigin() const
+{
+   return ossimString(theLatOrigin);
+}
+
+ossimString ossimDtedDsi::lonOrigin() const
+{
+   return ossimString(theLonOrigin);
+}
+
+ossimString ossimDtedDsi::latSW() const
+{
+   return ossimString(theLatSW);
+}
+
+ossimString ossimDtedDsi::lonSW() const
+{
+   return ossimString(theLonSW);
+}
+
+ossimString ossimDtedDsi::latNW() const
+{
+   return ossimString(theLatNW);
+}
+
+ossimString ossimDtedDsi::lonNW() const
+{
+   return ossimString(theLonNW);
+}
+
+ossimString ossimDtedDsi::latNE() const
+{
+   return ossimString(theLatNE);
+}
+
+ossimString ossimDtedDsi::lonNE() const
+{
+   return ossimString(theLonNE);
+}
+
+ossimString ossimDtedDsi::latSE() const
+{
+   return ossimString(theLatSE);
+}
+
+ossimString ossimDtedDsi::lonSE() const
+{
+   return ossimString(theLonSE);
+}
+
+ossimString ossimDtedDsi::orientation() const
+{
+   return ossimString(theOrientation);
+}
+
+ossimString ossimDtedDsi::latInterval() const
+{
+   return ossimString(theLatInterval);
+}
+
+ossimString ossimDtedDsi::lonInterval() const
+{
+   return ossimString(theLonInterval);
+}
+
+ossim_int32  ossimDtedDsi::numLatPoints() const
+{
+   return atoi(theNumLatPoints);
+}
+
+ossim_int32  ossimDtedDsi::numLonLines() const
+{
+   return atoi(theNumLonLines);
+}
+
+ossim_int32  ossimDtedDsi::cellIndicator() const
+{
+   return atoi(theCellIndicator);
+}
+
+ossim_int32 ossimDtedDsi::startOffset() const
+{
+   return theStartOffset;
+}
+ossim_int32 ossimDtedDsi::stopOffset() const
+{
+   return theStopOffset;
+}
+
+//**************************************************************************
+// operator <<
+//**************************************************************************
+std::ostream& operator<<( std::ostream& os, const ossimDtedDsi& dsi)
+{
+   std::string prefix;
+   return dsi.print(os, prefix);
+}
+
+std::ostream& ossimDtedDsi::print(std::ostream& out,
+                                  const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += "dsi.";
+   
+   out << setiosflags(ios::left)
+       << pfx << setw(28) << "recognition_sentinel:" << theRecSen << "\n"
+       << pfx << setw(28) << "security_code:" << theSecurityCode << "\n"
+       << pfx << setw(28) << "product_level:" << theProductLevel << "\n"
+       << pfx << setw(28) << "edition:" << theEdition << "\n"
+       << pfx << setw(28) << "match_merge_version:" << theMatchMergeVersion
+       << "\n"
+       << pfx << setw(28) << "maintenance_date:" << theMaintenanceDate << "\n"
+       << pfx << setw(28) << "match_merge_date:" << theMatchMergeDate << "\n"
+       << pfx << setw(28) << "maintenance_code:" << theMaintenanceCode << "\n"
+       << pfx << setw(28) << "producer_code:" << theProducerCode << "\n"
+       << pfx << setw(28) << "product_stock_spec_number:"
+       << theProductStockSpecNumber
+       << "\n"
+       << pfx << setw(28) << "product_spec_number:"
+       << theProductSpecNumber << "\n"
+       << pfx << setw(28) << "vertical_datum:" << theVerticalDatum << "\n"
+       << pfx << setw(28) << "horizontal_datum:" << theHorizontalDatum << "\n"
+       << pfx << setw(28) << "compilation_date:" << theCompilationDate << "\n"
+       << pfx << setw(28) << "lat_origin:" << theLatOrigin << "\n"
+       << pfx << setw(28) << "lon_origin:" << theLonOrigin << "\n"
+       << pfx << setw(28) << "lat_sw:" << theLatSW << "\n"
+       << pfx << setw(28) << "lon_sw:" << theLonSW << "\n"
+       << pfx << setw(28) << "lat_nw:" << theLatNW << "\n"
+       << pfx << setw(28) << "lon_nw:" << theLonNW << "\n"
+       << pfx << setw(28) << "lat_ne:" << theLatNE << "\n"
+       << pfx << setw(28) << "lon_ne:" << theLonNE << "\n"
+       << pfx << setw(28) << "lat_se:" << theLatSE << "\n"
+       << pfx << setw(28) << "lon_se:" << theLonSE << "\n"
+       << pfx << setw(28) << "orientation:" << theOrientation << "\n"
+       << pfx << setw(28) << "lat_interval:" << theLatInterval << "\n"
+       << pfx << setw(28) << "lon_interval:" << theLonInterval << "\n"
+       << pfx << setw(28) << "number_of_lat_points:" << theNumLatPoints << "\n"
+       << pfx << setw(28) << "number_of_lon_lines:" << theNumLonLines << "\n"
+       << pfx << setw(28) << "cell_indicator:" << theCellIndicator << "\n"
+       << pfx << setw(28) << "start_offset:" << theStartOffset << "\n"
+       << pfx << setw(28) << "stop_offset:" << theStopOffset
+       << std::endl;
+   return out;
+}
+
+ossimDtedDsi::ossimDtedDsi(const ossimDtedDsi& /* source */)
+{}
+
+const ossimDtedDsi& ossimDtedDsi::operator=(const ossimDtedDsi& rhs)
+{
+   return rhs;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimDtedHdr.cpp b/ossim/src/ossim/support_data/ossimDtedHdr.cpp
new file mode 100644
index 0000000..c2b4044
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimDtedHdr.cpp
@@ -0,0 +1,234 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Ken Melero
+// 
+// Description:  This class gives access to the File Header Label
+//               (HDR) of a DTED Level 1 file.
+//
+//********************************************************************
+// $Id: ossimDtedHdr.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <iostream>
+#include <fstream>
+#include <string>
+
+#include <ossim/support_data/ossimDtedHdr.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimProperty.h>
+
+//**************************************************************************
+// CONSTRUCTOR
+//**************************************************************************
+ossimDtedHdr::ossimDtedHdr(const ossimFilename& dted_file, ossim_int32 offset)
+   :
+      theStartOffset(0),
+      theStopOffset(0)
+{
+   if(!dted_file.empty())
+   {
+      // Check to see that dted file exists.
+      if(!dted_file.exists())
+      {
+         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedHdr::ossimDtedHdr: The DTED file does not exist: " << dted_file << std::endl;
+         return;
+      }
+      
+      // Check to see that the dted file is readable.
+      if(!dted_file.isReadable())
+      {
+         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedHdr::ossimDtedHdr: The DTED file is not readable: " << dted_file << std::endl;
+         return;
+      }
+      
+      std::ifstream in(dted_file.c_str());
+      // Open the dted file for reading.
+      if(!in)
+      {
+         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedHdr::ossimDtedHdr: Error opening the DTED file: " << dted_file << std::endl;
+         return;
+      }
+      in.seekg(offset);
+      // Continue parsing all the record fields.
+      parse(in);
+      
+      in.close();
+   }
+}
+
+//**************************************************************************
+// CONSTRUCTOR
+//**************************************************************************
+ossimDtedHdr::ossimDtedHdr(std::istream& in)
+   :
+      theStartOffset(0),
+      theStopOffset(0)
+{
+   parse(in);
+}
+
+//**************************************************************************
+// ossimDtedHdr::parse()
+//**************************************************************************
+void ossimDtedHdr::parse(std::istream& in)
+{
+   clearErrorStatus();
+   theStartOffset = in.tellg();
+   theStopOffset  = theStartOffset;
+   // Parse theRecSen
+   in.read(theRecSen, FIELD1_SIZE);
+   theRecSen[FIELD1_SIZE] = '\0';
+
+   if(!(strncmp(theRecSen, "HDR", 3) == 0))
+   {
+      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+      in.seekg(theStartOffset);
+      return;
+   }
+   
+   // Parse Field 2
+   in.read(theField2, FIELD2_SIZE);
+   theField2[FIELD2_SIZE] = '\0';
+   
+   // Parse theFilename
+   in.read(theFilename, FIELD3_SIZE);
+   theFilename[FIELD3_SIZE] = '\0';
+   
+   // Parse Field 4
+   in.read(theField4, FIELD4_SIZE);
+   theField4[FIELD4_SIZE] = '\0';
+   
+   // Parse Field 5
+   in.read(theField5, FIELD5_SIZE);
+   theField5[FIELD5_SIZE] = '\0';
+   
+   // Parse Field 6
+   in.read(theField6, FIELD6_SIZE);
+   theField6[FIELD6_SIZE] = '\0';
+   
+   // Parse Field 7
+   in.read(theVersion, FIELD7_SIZE);
+   theVersion[FIELD7_SIZE] = '\0';
+   
+   // Parse theCreationDate
+   in.read(theCreationDate, FIELD8_SIZE);
+   theCreationDate[FIELD8_SIZE] = '\0';
+   
+   // Parse Field 9
+   in.read(theField9, FIELD9_SIZE);
+   theField9[FIELD9_SIZE] = '\0';   
+   
+   // Parse Field 10
+   in.read(theField10, FIELD10_SIZE);
+   theField10[FIELD10_SIZE] = '\0';   
+   
+   // Parse Field 11
+   in.read(theField11, FIELD11_SIZE);
+   theField11[FIELD11_SIZE] = '\0';   
+   
+   // Parse Field 12
+   in.read(theField12, FIELD12_SIZE);
+   theField12[FIELD12_SIZE] = '\0';   
+   
+   // Parse Field 13
+   in.read(theField13, FIELD13_SIZE);
+   theField13[FIELD13_SIZE] = '\0';   
+   
+   // Parse Field 14
+   in.read(theField14, FIELD14_SIZE);
+   theField14[FIELD14_SIZE] = '\0';
+
+   // Set the stop offset.
+   theStopOffset = theStartOffset + HDR_LENGTH;
+}
+
+ossimRefPtr<ossimProperty> ossimDtedHdr::getProperty(
+   const ossimString& /* name */) const
+{
+   ossimRefPtr<ossimProperty> result = 0;
+   return result;
+}
+
+void ossimDtedHdr::getPropertyNames(
+   std::vector<ossimString>& propertyNames) const
+{
+   propertyNames.push_back(ossimString("dted_hdr_record"));
+}
+
+
+//**************************************************************************
+// operator <<
+//**************************************************************************
+std::ostream& operator<<( std::ostream& os, const ossimDtedHdr& hdr)
+{
+   std::string prefix;
+   return hdr.print(os, prefix);
+}
+
+std::ostream& ossimDtedHdr::print(std::ostream& out,
+                                  const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += "hdr.";
+   
+   out << pfx << "recognition_sentinel:  " << theRecSen << "\n"
+       << pfx << "field2:                " << theField2 << "\n"
+       << pfx << "filename:              " << theFilename << "\n"
+       << pfx << "field4:                " << theField4 << "\n"
+       << pfx << "field5:                " << theField5 << "\n"
+       << pfx << "field6:                " << theField6 << "\n"
+       << pfx << "version:               " << theVersion << "\n"
+       << pfx << "creation_date:         " << theCreationDate << "\n"
+       << pfx << "field9:                " << theField9 << "\n"
+       << pfx << "field10:               " << theField10 << "\n"
+       << pfx << "field11:               " << theField11 << "\n"
+       << pfx << "field12:               " << theField12 << "\n"
+       << pfx << "field13:               " << theField13 << "\n"
+       << pfx << "field14:               " << theField14 << "\n"
+       << std::endl;
+   
+   return out;
+}
+
+ossimString ossimDtedHdr::recognitionSentinel() const
+{
+   return theRecSen;
+}
+
+ossimString ossimDtedHdr::fileName() const
+{
+   return theFilename;
+}
+ossimString ossimDtedHdr::version() const
+{ return theVersion;
+}
+
+ossimString ossimDtedHdr::creationDate() const
+{
+   return theCreationDate;
+}
+
+ossim_int32 ossimDtedHdr::startOffset() const
+{
+   return theStartOffset;
+}
+
+ossim_int32 ossimDtedHdr::stopOffset() const
+{
+   return theStopOffset;
+}
+
+ossimDtedHdr::ossimDtedHdr(const ossimDtedHdr& /* source */)
+{}
+
+const ossimDtedHdr& ossimDtedHdr::operator=(const ossimDtedHdr& rhs)
+{
+   return rhs;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimDtedInfo.cpp b/ossim/src/ossim/support_data/ossimDtedInfo.cpp
new file mode 100644
index 0000000..ae0c111
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimDtedInfo.cpp
@@ -0,0 +1,285 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: DTED Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <iostream>
+#include <ossim/support_data/ossimDtedInfo.h>
+#include <ossim/support_data/ossimDtedVol.h>
+#include <ossim/support_data/ossimDtedHdr.h>
+#include <ossim/support_data/ossimDtedUhl.h>
+#include <ossim/support_data/ossimDtedDsi.h>
+#include <ossim/support_data/ossimDtedAcc.h>
+#include <ossim/base/ossimErrorContext.h>
+#include <ossim/base/ossimProperty.h>
+#include <ossim/base/ossimContainerProperty.h>
+#include <ossim/base/ossimRegExp.h>
+
+
+ossimDtedInfo::ossimDtedInfo()
+   : theFile()
+{
+}
+
+ossimDtedInfo::~ossimDtedInfo()
+{
+}
+
+bool ossimDtedInfo::open(const ossimFilename& file)
+{
+   bool result = false;
+
+   // Test for extension, like dt0, dt1...
+   ossimString ext = file.ext();
+   ossimRegExp regExp("^[d|D][t|T][0-9]");
+   
+   if ( regExp.find( ext.c_str() ) )
+   {
+      ossimDtedVol vol(file, 0);
+      ossimDtedHdr hdr(file, vol.stopOffset());
+      ossimDtedUhl uhl(file, hdr.stopOffset());
+      ossimDtedDsi dsi(file, uhl.stopOffset());
+      ossimDtedAcc acc(file, dsi.stopOffset());
+      
+      //---
+      // Check for errors.  Must have uhl, dsi and acc records.  vol and hdr
+      // are for magnetic tape only; hence, may or may not be there.
+      //---
+      if ( (uhl.getErrorStatus() == ossimErrorCodes::OSSIM_OK) &&
+           (dsi.getErrorStatus() == ossimErrorCodes::OSSIM_OK) &&
+           (acc.getErrorStatus() == ossimErrorCodes::OSSIM_OK) )
+      {
+         theFile = file;
+         result = true;
+      }
+      else
+      {
+         theFile.clear();
+      }
+   }
+
+   return result;
+}
+
+std::ostream& ossimDtedInfo::print(std::ostream& out) const
+{
+   if ( theFile.size() )
+   {
+      std::string prefix = "dted.";
+      
+      ossimDtedVol vol(theFile, 0);
+      ossimDtedHdr hdr(theFile, vol.stopOffset());
+      ossimDtedUhl uhl(theFile, hdr.stopOffset());
+      ossimDtedDsi dsi(theFile, uhl.stopOffset());
+      ossimDtedAcc acc(theFile, dsi.stopOffset());
+      if( vol.getErrorStatus() == ossimErrorCodes::OSSIM_OK )
+      {
+         vol.print(out, prefix);
+      }
+      if( hdr.getErrorStatus() == ossimErrorCodes::OSSIM_OK )
+      {
+         hdr.print(out, prefix);
+      }
+      if( uhl.getErrorStatus() == ossimErrorCodes::OSSIM_OK )
+      {
+         uhl.print(out, prefix);
+      }
+      if( dsi.getErrorStatus() == ossimErrorCodes::OSSIM_OK )
+      {
+         dsi.print(out, prefix);
+      }
+      if( acc.getErrorStatus() == ossimErrorCodes::OSSIM_OK )
+      {
+         acc.print(out, prefix);
+      }
+   }
+   return out;
+}
+
+ossimRefPtr<ossimProperty> ossimDtedInfo::getProperty(
+   const ossimString& name)const
+{
+   ossimRefPtr<ossimProperty> result = 0;
+
+   //---
+   // Look through dted records.
+   // Must have uhl, dsi and acc records.  vol and hdr
+   // are for magnetic tape only; hence, may or may not be there.
+   //---
+   ossimDtedVol vol(theFile, 0);
+   if( vol.getErrorStatus() == ossimErrorCodes::OSSIM_OK )
+   {
+      if (name == "dted_vol_record")
+      {
+         ossimContainerProperty* box = new ossimContainerProperty();
+         box->setName(name);
+
+         std::vector<ossimString> list;
+         vol.getPropertyNames(list);
+
+         std::vector< ossimRefPtr<ossimProperty> > propList;
+
+         std::vector<ossimString>::const_iterator i = list.begin();
+         while (i != list.end())
+         {
+            ossimRefPtr<ossimProperty> prop = vol.getProperty( (*i) );
+            if (prop.valid())
+            {
+               propList.push_back(prop);
+            }
+            ++i;
+         }
+         box->addChildren(propList);
+         result = box;
+      }
+   }
+   if (result.valid() == false)
+   {
+      ossimDtedHdr hdr(theFile, vol.stopOffset());
+      if( hdr.getErrorStatus() == ossimErrorCodes::OSSIM_OK )
+      {
+         if (name == "dted_hdr_record")
+         {
+            ossimContainerProperty* box = new ossimContainerProperty();
+            box->setName(name);
+            
+            std::vector<ossimString> list;
+            hdr.getPropertyNames(list);
+            
+            std::vector< ossimRefPtr<ossimProperty> > propList;
+            
+            std::vector<ossimString>::const_iterator i = list.begin();
+            while (i != list.end())
+            {
+               ossimRefPtr<ossimProperty> prop = hdr.getProperty( (*i) );
+               if (prop.valid())
+               {
+                  propList.push_back(prop);
+               }
+               ++i;
+            }
+            box->addChildren(propList);
+            result = box;
+         }
+      }
+      if (result.valid() == false)
+      {
+         ossimDtedUhl uhl(theFile, hdr.stopOffset());
+         if( uhl.getErrorStatus() == ossimErrorCodes::OSSIM_OK )
+         {
+            if (name == "dted_uhl_record")
+            {
+               ossimContainerProperty* box = new ossimContainerProperty();
+               box->setName(name);
+               
+               std::vector<ossimString> list;
+               uhl.getPropertyNames(list);
+               
+               std::vector< ossimRefPtr<ossimProperty> > propList;
+               
+               std::vector<ossimString>::const_iterator i = list.begin();
+               while (i != list.end())
+               {
+                  ossimRefPtr<ossimProperty> prop = uhl.getProperty( (*i) );
+                  if (prop.valid())
+                  {
+                     propList.push_back(prop); 
+                  }
+                  ++i;
+               }
+               box->addChildren(propList);
+               result = box;
+            }
+         }
+         if (result.valid() == false)
+         {
+            ossimDtedDsi dsi(theFile, uhl.stopOffset());
+            if( dsi.getErrorStatus() == ossimErrorCodes::OSSIM_OK )
+            {
+               if (name == "dted_dsi_record")
+               {
+                  ossimContainerProperty* box =
+                     new ossimContainerProperty();
+                  box->setName(name);
+                  
+                  std::vector<ossimString> list;
+                  dsi.getPropertyNames(list);
+                  
+                  std::vector< ossimRefPtr<ossimProperty> > propList;
+                  
+                  std::vector<ossimString>::const_iterator i = list.begin();
+                  while (i != list.end())
+                  {
+                     ossimRefPtr<ossimProperty> prop =
+                        dsi.getProperty( (*i) );
+                     if (prop.valid())
+                     {
+                        propList.push_back(prop);
+                     }
+                     ++i;
+                  }
+                  box->addChildren(propList);
+                  result = box;
+               }
+            }
+            if (result.valid() == false)
+            {
+               ossimDtedAcc acc(theFile, dsi.stopOffset());
+               if( acc.getErrorStatus() == ossimErrorCodes::OSSIM_OK )
+               {
+                  if (name == "dted_acc_record")
+                  {
+                     ossimContainerProperty* box =
+                        new ossimContainerProperty();
+                     box->setName(name);
+                     
+                     std::vector<ossimString> list;
+                     acc.getPropertyNames(list);
+                     
+                     std::vector< ossimRefPtr<ossimProperty> > propList;
+                     
+                     ossimRefPtr<ossimProperty> prop = 0;
+                     std::vector<ossimString>::const_iterator i =
+                        list.begin();
+                     while (i != list.end())
+                     {
+                        ossimRefPtr<ossimProperty> prop =
+                           acc.getProperty( (*i) );
+                        if (prop.valid())
+                        {
+                           propList.push_back(prop);
+                        }
+                        ++i;
+                     }
+                     box->addChildren(propList);
+                     result = box;
+                  }
+               }
+            }
+         }
+      }
+   }
+
+   return result;
+}
+
+void ossimDtedInfo::getPropertyNames(
+   std::vector<ossimString>& propertyNames)const
+{
+   propertyNames.push_back(ossimString("dted_vol_record"));
+   propertyNames.push_back(ossimString("dted_hdr_record"));
+   propertyNames.push_back(ossimString("dted_uhl_record"));
+   propertyNames.push_back(ossimString("dted_dsi_record"));
+   propertyNames.push_back(ossimString("dted_acc_record"));
+}
+
+
+
diff --git a/src/ossim/support_data/ossimDtedRecord.cpp b/ossim/src/ossim/support_data/ossimDtedRecord.cpp
similarity index 100%
rename from src/ossim/support_data/ossimDtedRecord.cpp
rename to ossim/src/ossim/support_data/ossimDtedRecord.cpp
diff --git a/ossim/src/ossim/support_data/ossimDtedUhl.cpp b/ossim/src/ossim/support_data/ossimDtedUhl.cpp
new file mode 100644
index 0000000..3c5cdb5
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimDtedUhl.cpp
@@ -0,0 +1,331 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Ken Melero
+// 
+// Description:  This class gives access to the User Header Label
+//               (UHL) of a DTED Level 1 file.
+//
+//********************************************************************
+// $Id: ossimDtedUhl.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstdlib>
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+#include <string>
+
+#include <ossim/support_data/ossimDtedUhl.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimProperty.h>
+
+
+//**************************************************************************
+// CONSTRUCTOR
+//**************************************************************************
+ossimDtedUhl::ossimDtedUhl(const ossimFilename& dted_file, ossim_int32 offset)
+   :
+      theRecSen(),
+      theField2(),
+      theLonOrigin(),
+      theLatOrigin(),
+      theLonInterval(),
+      theLatInterval(),
+      theAbsoluteLE(),
+      theSecurityCode(),
+      theNumLonLines(),
+      theNumLatPoints(),
+      theMultipleAccuracy(),
+      theStartOffset(0),
+      theStopOffset(0)
+{
+   if(!dted_file.empty())
+   {
+      // Check to see that dted file exists.
+      if(!dted_file.exists())
+      {
+         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedUhl::ossimDtedUhl: The DTED file does not exist: " << dted_file << std::endl;
+         return;
+      }
+      
+      // Check to see that the dted file is readable.
+      if(!dted_file.isReadable())
+      {
+         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedUhl::ossimDtedUhl: The DTED file is not readable --> " << dted_file << std::endl;
+         return;
+      }
+      
+      std::ifstream in(dted_file.c_str());
+      if(!in)
+      {
+         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedUhl::ossimDtedUhl: Error opening the DTED file: " << dted_file << std::endl;
+         
+         return;
+      }
+      in.seekg(offset);
+      parse(in);
+      
+      in.close();
+   }
+}
+
+//**************************************************************************
+// CONSTRUCTOR
+//**************************************************************************
+ossimDtedUhl::ossimDtedUhl(std::istream& in)
+   :
+      theRecSen(),
+      theLonOrigin(),
+      theLatOrigin(),
+      theLonInterval(),
+      theLatInterval(),
+      theAbsoluteLE(),
+      theSecurityCode(),
+      theNumLonLines(),
+      theNumLatPoints(),
+      theMultipleAccuracy(),
+      theStartOffset(0),
+      theStopOffset(0)
+{
+   parse(in);
+}
+
+//**************************************************************************
+// ossimDtedUhl::parse()
+//**************************************************************************
+void ossimDtedUhl::parse(std::istream& in)
+{
+   clearErrorStatus();
+   theStartOffset = in.tellg();
+   theStopOffset  = theStartOffset;
+   // Parse theRecSen
+   in.read(theRecSen, FIELD1_SIZE);
+   theRecSen[FIELD1_SIZE] = '\0';
+
+   if(!(strncmp(theRecSen, "UHL", 3) == 0))
+   {
+      // Not a user header label.
+      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;  
+      in.seekg(theStartOffset);
+      return;
+   }  
+   
+   // Parse Field 2
+   in.read(theField2, FIELD2_SIZE);
+   theField2[FIELD2_SIZE] = '\0';
+   
+   // Parse theLonOrigin
+   in.read(theLonOrigin, FIELD3_SIZE);
+   theLonOrigin[FIELD3_SIZE] = '\0';
+   
+   // Parse theLatOrigin
+   in.read(theLatOrigin, FIELD4_SIZE);
+   theLatOrigin[FIELD4_SIZE] = '\0';
+   
+   // Parse theLonInterval
+   in.read(theLonInterval, FIELD5_SIZE);
+   theLonInterval[FIELD5_SIZE] = '\0';
+   
+   // Parse theLatInterval
+   in.read(theLatInterval, FIELD6_SIZE);
+   theLatInterval[FIELD6_SIZE] = '\0';
+   
+   // Parse theAbsoluteLE
+   in.read(theAbsoluteLE, FIELD7_SIZE);
+   theAbsoluteLE[FIELD7_SIZE] = '\0';
+   
+   // Parse theSecurityCode
+   in.read(theSecurityCode, FIELD8_SIZE);
+   theSecurityCode[FIELD8_SIZE] = '\0';
+   
+   // Parse Field 9
+   in.read(theField9, FIELD9_SIZE);
+   theField9[FIELD9_SIZE] = '\0';
+   
+   // Parse theNumLonLines
+   in.read(theNumLonLines, FIELD10_SIZE);
+   theNumLonLines[FIELD10_SIZE] = '\0';
+   
+   // Parse theNumLatPoints
+   in.read(theNumLatPoints, FIELD11_SIZE);
+   theNumLatPoints[FIELD11_SIZE] = '\0';
+   
+   // Parse theMultipleAccuracy
+   in.read(theMultipleAccuracy, FIELD12_SIZE);
+   theMultipleAccuracy[FIELD12_SIZE] = '\0';
+
+   // Field 13 not parsed as it's unused.
+   in.ignore(FIELD13_SIZE);
+   // Set the stop offset.
+   theStopOffset = theStartOffset + UHL_LENGTH;
+}
+
+ossimRefPtr<ossimProperty> ossimDtedUhl::getProperty(
+   const ossimString& /* name */) const
+{
+   ossimRefPtr<ossimProperty> result = 0;
+   return result;
+}
+
+void ossimDtedUhl::getPropertyNames(
+   std::vector<ossimString>& propertyNames) const
+{
+   propertyNames.push_back(ossimString("dted_uhl_record"));
+}
+
+ossimString ossimDtedUhl::recognitionSentinel() const
+{
+   return theRecSen;
+}
+
+double ossimDtedUhl::lonOrigin() const
+{
+   return degreesFromString(theLonOrigin);
+}
+
+double ossimDtedUhl::latOrigin() const
+{
+   return degreesFromString(theLatOrigin);
+}
+
+double ossimDtedUhl::lonInterval()      const
+{
+   return spacingFromString(theLonInterval);
+}
+
+double ossimDtedUhl::latInterval()      const
+{
+   return spacingFromString(theLatInterval);
+}
+  
+double ossimDtedUhl::degreesFromString(const char* str) const
+{
+   // Parse the string:  DDDMMMSSH
+   if (!str)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL)
+         << "FATAL ossimDtedUhl::degreesFromString: "
+         << "Null pointer passed to method!" << std::endl;
+      return 0.0;
+   }
+   
+   if (strlen(str) < 8)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL)
+         << "FATAL ossimDtedUhl::decimalDegreesFromString:"
+         << "String not big enough!" << std::endl;
+      return 0.0;
+   }
+
+   double d = ((str[0]-'0')*100 + (str[1]-'0')*10 + (str[2]-'0') +
+               (str[3]-'0')/6.0 + (str[4]-'0')/60.0 +
+               (str[5]-'0')/360.0 + (str[6]-'0')/3600.0);
+   
+   if ( (str[7] == 'S') || (str[7] == 's') ||
+        (str[7] == 'W') || (str[7] == 'w') )
+   {
+      d *= -1.0;
+   }
+   
+   return d;
+}
+ 
+double ossimDtedUhl::spacingFromString(const char* str) const
+{
+   // Parse the string: SSSS (tenths of a second)
+   if (!str)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL)
+         << "FATAL ossimDtedUhl::decimalDegreesFromString: "
+         << "Null pointer passed to method!" << std::endl;
+      return 0.0;
+   }
+
+   return atof(str) / 36000.0;  // return 10ths of second as decimal degrees.
+}
+
+double ossimDtedUhl::absoluteLE() const
+{
+  return strtod(theAbsoluteLE, NULL);  
+}
+
+ossimString ossimDtedUhl::securityCode() const
+{
+   return theSecurityCode;
+}
+
+ossim_int32 ossimDtedUhl::numLonLines() const
+{
+  return atoi(theNumLonLines);
+}
+
+ossim_int32 ossimDtedUhl::numLatPoints() const
+{
+  return atoi(theNumLatPoints);
+}
+
+ossim_int32 ossimDtedUhl::mulitpleAccuracy() const
+{
+  return atoi(theMultipleAccuracy);
+}
+
+ossim_int32 ossimDtedUhl::startOffset() const
+{
+  return theStartOffset;
+}
+
+ossim_int32 ossimDtedUhl::stopOffset() const
+{
+  return theStopOffset;
+}
+
+//**************************************************************************
+// operator <<
+//**************************************************************************
+std::ostream& operator<<( std::ostream& out, const ossimDtedUhl& uhl)
+{
+   std::string prefix;
+   return uhl.print(out, prefix);
+}
+
+std::ostream& ossimDtedUhl::print(std::ostream& out,
+                                  const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += "uhl.";
+   
+   out << setiosflags(ios::left)
+       << pfx << setw(28) << "recognition_sentinel:" << theRecSen << "\n"
+       << pfx << setw(28) << "lon_origin:" << theLonOrigin << "\n"
+       << pfx << setw(28) << "lat_origin:" << theLatOrigin << "\n"
+       << pfx << setw(28) << "lon_interval:" << theLonInterval << "\n"
+       << pfx << setw(28) << "lat_interval:" << theLatInterval << "\n"
+       << pfx << setw(28) << "absolute_le:" << theAbsoluteLE << "\n"
+       << pfx << setw(28) << "security_code:" << theSecurityCode << "\n"
+       << pfx << setw(28) << "number_of_lat_points:" << theNumLatPoints << "\n"
+       << pfx << setw(28) << "number_of_lon_lines:" << theNumLonLines << "\n"
+       << pfx << setw(28) << "multiple_accuracy:"
+       << theMultipleAccuracy << "\n"
+       << pfx << setw(28) << "start_offset:" << theStartOffset << "\n"
+       << pfx << setw(28) << "stop_offset:" << theStopOffset
+       << std::endl;
+   
+   return out;
+}
+
+ossimDtedUhl::ossimDtedUhl(const ossimDtedUhl& /* source */)
+{
+}
+
+const ossimDtedUhl& ossimDtedUhl::operator=(const ossimDtedUhl& rhs)
+{
+   return rhs;
+}
+
+
diff --git a/src/ossim/support_data/ossimDtedVol.cpp b/ossim/src/ossim/support_data/ossimDtedVol.cpp
similarity index 100%
rename from src/ossim/support_data/ossimDtedVol.cpp
rename to ossim/src/ossim/support_data/ossimDtedVol.cpp
diff --git a/src/ossim/support_data/ossimERS.cpp b/ossim/src/ossim/support_data/ossimERS.cpp
similarity index 100%
rename from src/ossim/support_data/ossimERS.cpp
rename to ossim/src/ossim/support_data/ossimERS.cpp
diff --git a/ossim/src/ossim/support_data/ossimEnviHeader.cpp b/ossim/src/ossim/support_data/ossimEnviHeader.cpp
new file mode 100644
index 0000000..33fc457
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimEnviHeader.cpp
@@ -0,0 +1,952 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Burken
+//
+// Description:
+// 
+// Class for reading and writing an ENVI (The Environment for Visualizing
+// Images) header file.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimEnviHeader.cpp 22349 2013-08-01 21:38:29Z dburken $
+
+#include <ossim/support_data/ossimEnviHeader.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/support_data/ossimWavelength.h>
+#include <algorithm>
+#include <fstream>
+#include <string>
+
+typedef  std::unary_function<std::pair<ossimString, ossimString>, bool> KwlCompareFunctionType;
+typedef  std::pair<const ossimString, ossimString> KwlComparePairType;
+
+class KwlKeyCaseInsensitiveEquals : public KwlCompareFunctionType
+{
+public:
+   KwlKeyCaseInsensitiveEquals(const ossimString& key):m_key(key){}
+   virtual bool operator()(const KwlComparePairType& rhs)const
+   {
+      return (m_key == rhs.first.downcase());
+   }
+   ossimString m_key;
+};
+class KwlKeySubStringCaseInsensitive : public KwlCompareFunctionType
+{
+public:
+   KwlKeySubStringCaseInsensitive(const ossimString& key):m_key(key){}
+   virtual bool operator()(const KwlComparePairType& rhs)const
+   {
+      return (rhs.first.downcase().contains(m_key));
+   }
+   ossimString m_key;
+};
+
+// Define keywords not already found in ossimKeywordNames.
+static const char HEADER_OFFSET_KW[]    = "header_offset";
+static const char FILE_TYPE_KW[]        = "file_type";
+static const char DATA_TYPE_KW[]        = "data_type";
+static const char SENSOR_TYPE_KW[]      = "sensor_type";
+static const char X_START_KW[]          = "x_start";
+static const char Y_START_KW[]          = "y_start";
+static const char MAP_INFO_KW[]         = "map_info";
+static const char WAVELENGTH_UNITS_KW[] = "wavelength_units";
+static const char BAND_NAME_KW[]        = "band_name";
+static const char WAVELENGTH_KW[]       = "wavelength";
+
+static ossimTrace traceDebug(ossimString("ossimEnviHeader:debug"));
+
+ossimEnviHeader::ossimEnviHeader()
+   :
+   m_file(),
+   m_keywords()
+{
+   // Start the byte order of with the machine byte order.
+   m_keywords[FILE_TYPE_KW] = "ENVI Standard";
+   setByteorder(ossim::byteOrder());   
+}
+
+ossimEnviHeader::~ossimEnviHeader()
+{
+}
+
+void ossimEnviHeader::reset()
+{
+   m_file.string().clear();
+   m_keywords.clear();
+   m_keywords[FILE_TYPE_KW] = "ENVI Standard";
+   setByteorder(ossim::byteOrder());
+}
+
+const ossimKeywordlist& ossimEnviHeader::getMap() const
+{
+   return m_keywords;
+}
+
+ossimKeywordlist& ossimEnviHeader::getMap()
+{
+   return m_keywords;
+}
+
+bool ossimEnviHeader::getValue( const ossimString& key, ossimString& value ) const
+{
+   bool result = false;
+   value.string() = m_keywords.findKey( key.string());
+   if( value.size() )
+   {
+      result = true;
+   }
+   else
+   {
+      result = m_keywords.hasKey( key.string() );
+   }
+   return result;
+}
+
+bool ossimEnviHeader::findSubStringCaseInsensitive(const ossimString& key,
+                                                   ossimString& value) const
+{
+   return m_keywords.findValue<KwlKeySubStringCaseInsensitive>(
+      value, KwlKeySubStringCaseInsensitive(key));
+}
+
+bool ossimEnviHeader::open(const ossimFilename& file)
+{
+   bool result = false;
+
+   reset(); // Clear the map, file name.
+
+   std::ifstream in;
+   in.open(file.c_str(), std::ios::in | std::ios::binary);
+   if( in.is_open() )
+   {
+      result = readStream( in );
+      if ( result )
+      {
+         m_file = file;
+      }
+   }
+
+   return result;
+}
+
+bool ossimEnviHeader::readStream(std::istream& in)
+{
+   reset();
+   bool result = isEnviHeader( in );
+   if ( result )
+   {
+      m_keywords.clear();
+      
+      while(!in.eof()&&in.good())
+      {
+         // read name
+         ossimString name = "";
+         ossimString value = "";
+         ossim::skipws(in);
+         int c = static_cast<char>(in.get());
+         while((c != '=')&&(in.good())&&!in.eof())
+         {
+            name +=static_cast<char>(c);
+            c = in.get();
+         }
+         ossim::skipws(in);
+         c = in.get();
+         
+         if(in.good()&&!in.eof())
+         {
+            if(c == '{') // continue til '}'
+            {
+               c = in.get();
+               while((c != '}')&&(in.good())&&!in.eof())
+               {
+                  value +=static_cast<char>(c);
+                  c = in.get();
+               }
+            }
+            else
+            {
+               while(((c != '\n')&&(c!='\r'))&&(in.good())&&!in.eof())
+               {
+                  value +=static_cast<char>(c);
+                  c = (in.get());
+               }
+               
+            }
+            m_keywords.add(name.trim(), value);
+         }
+      }
+
+      // Test for minimum set of keywords needed.
+      if ( m_keywords.findKey( std::string("samples") ).empty() ||
+           m_keywords.findKey( std::string("lines") ).empty() || 
+           m_keywords.findKey( std::string("bands") ).empty())
+      {
+         result =  false;
+      }
+   }
+
+   return result;
+}
+
+bool ossimEnviHeader::writeFile(const ossimFilename& file)
+{
+   if (m_keywords.findKey( std::string("description") ).empty())
+   {
+      m_keywords["description"] = file.c_str();
+   }
+   
+   std::ofstream out(file.c_str(), std::ios_base::out);
+
+   if (!out)
+   {
+      return false;
+   }
+   
+   print(out);
+   out.close();
+   return true;
+}
+
+std::ostream& ossimEnviHeader::print(std::ostream& out) const
+{
+   out << "ENVI" << "\n" << m_keywords << std::endl;
+   return out;
+}
+
+std::ostream& operator<<(std::ostream& out, const ossimEnviHeader& obj)
+{
+   return obj.print( out );
+}
+
+ossimString ossimEnviHeader::getDescription() const
+{
+   return ossimString( m_keywords.findKey( std::string("description") ) );
+}
+
+void ossimEnviHeader::setDescription(const ossimString& description)
+{
+   m_keywords["description"] = description.c_str();
+}
+
+ossim_uint32 ossimEnviHeader::getSamples() const
+{
+   ossim_uint32 result = 0;
+   ossimString value = m_keywords.findKey( std::string("samples") );
+   if( value.size() )
+   {
+      result = value.toUInt32();
+   }
+   return result;
+}
+
+void ossimEnviHeader::setSamples(ossim_uint32 samples)
+{
+   m_keywords[ std::string("samples") ] = ossimString::toString(samples).c_str();
+}
+
+ossim_uint32 ossimEnviHeader::getLines() const
+{
+   ossim_uint32 result = 0;
+   ossimString value = m_keywords.findKey( std::string("lines") );
+   if( value.size() )
+   {
+      result = value.toUInt32();
+   }
+   return result;
+}
+
+void ossimEnviHeader::setLines(ossim_uint32 lines)
+{
+   m_keywords["lines"] = ossimString::toString(lines).c_str();
+}
+
+ossim_uint32 ossimEnviHeader::getBands() const
+{
+   ossim_uint32 result = 0;
+   ossimString value = m_keywords.findKey( std::string("bands") );
+   if( value.size() )
+   {
+      result = value.toUInt32();
+   }
+   return result;
+}
+
+void ossimEnviHeader::setBands(ossim_uint32 bands)
+{
+   m_keywords["bands"] = ossimString::toString(bands).c_str();
+}
+
+bool ossimEnviHeader::getDefaultBands( std::vector<ossim_uint32>& bands ) const
+{
+   bands.clear();
+
+   // Note: We could do a "m_map.downcaseKeywords()". (drb)
+   ossimString value = m_keywords.findKey( std::string("default bands") );
+   if ( !value.size() )
+   {
+      value = m_keywords.findKey( std::string("Default bands") );
+      if ( !value.size() )
+      {
+        value = m_keywords.findKey( std::string("DEFAULT BANDS") );
+      }
+   }
+
+   if ( value.size() )
+   {
+      std::vector<ossimString> strLst;
+      value.split( strLst, ossimString(","));
+      if ( strLst.size() )
+      {
+         std::vector<ossimString>::const_iterator i = strLst.begin();
+         ossim_uint32 band = 0;
+         while ( i != strLst.end() )
+         {
+            band = (*i).toUInt32();
+            if ( band )
+            {
+               // Assuming "default bands" are one based.  Totally a hunch... (drb)
+               --band;
+               bands.push_back(band);
+            }
+            else
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << "ossimEnviHeader::getDefaultBands WARN!"
+                  << "\nDetected zero based bands in \"default bands\" from header!"
+                  << std::endl;
+            }
+            
+            ++i;
+         }
+      }
+   }
+
+   if ( rangeCheckBands( bands ) == false )
+   {
+      bands.clear();
+   }
+   
+   return (bands.size() ? true : false);
+}
+
+ossim_uint32 ossimEnviHeader::getHeaderOffset() const
+{
+   ossim_uint32 result = 0;
+   ossimString value = m_keywords["header offset"];
+   if( value.size() )
+   {
+      result = value.toUInt32();
+   }
+   return result;
+}
+
+void ossimEnviHeader::setHeaderOffset(ossim_uint32 headerOffset)
+{
+   m_keywords["header offset"] = ossimString::toString(headerOffset).c_str();
+}
+
+ossimString ossimEnviHeader::getFileType() const
+{
+   return m_keywords[FILE_TYPE_KW];
+}
+
+void ossimEnviHeader::setFileType(const ossimString& fileType)
+{
+    m_keywords[FILE_TYPE_KW] = fileType.c_str();
+}
+
+ossim_uint32 ossimEnviHeader::getDataType() const
+{
+   return ossimString(m_keywords["data type"]).toUInt32();
+}
+
+ossimScalarType ossimEnviHeader::getOssimScalarType() const
+{
+   ossim_uint32 dataTypeInt = ossimString(m_keywords["data type"]).toUInt32();
+   
+   ossimScalarType result = OSSIM_SCALAR_UNKNOWN;
+
+   switch( dataTypeInt )
+   {
+      case 1:
+         result = OSSIM_UINT8;
+         break;
+      case 2:
+         result = OSSIM_SINT16;
+         break;
+      case 3:
+         result = OSSIM_SINT32;
+         break;
+      case 4:
+         result = OSSIM_FLOAT32;
+         break;
+      case 5:
+         result = OSSIM_FLOAT64;
+         break;
+      case 6:
+         result = OSSIM_CFLOAT32;
+         break;
+      case 9:
+         result = OSSIM_CFLOAT64;
+         break;
+      case 12:
+         result = OSSIM_UINT16;
+         break;
+      case 13:
+         result = OSSIM_UINT32;
+         break;
+      default:
+         break;
+   }
+
+   return result;
+}
+
+void ossimEnviHeader::setDataType(ossimScalarType scalar)
+{
+   ossimString dataTypeString = "";
+   switch( scalar )
+   {
+      case OSSIM_UINT8:
+         dataTypeString = "1";
+         break;
+      case OSSIM_SINT16:
+         dataTypeString = "2";
+         break;
+      case OSSIM_SINT32:
+         dataTypeString = "3";
+         break;
+      case OSSIM_FLOAT32:
+         dataTypeString = "4";
+         break;
+      case OSSIM_FLOAT64:
+         dataTypeString = "5";
+         break;
+      case OSSIM_CFLOAT32:
+         dataTypeString = "6";
+         break;
+      case OSSIM_CFLOAT64:
+         dataTypeString = "9";
+         break;
+      case OSSIM_UINT16:
+         dataTypeString = "12";
+         break;
+      case OSSIM_UINT32:
+         dataTypeString = "13";
+         break;
+      default:
+         break;
+   }
+   
+   if(!dataTypeString.empty())
+   {
+      m_keywords["data type"] = dataTypeString.c_str();
+   }
+}
+ossimString ossimEnviHeader::getInterleaveType() const
+{
+   return m_keywords["interleave"];
+}
+ossimInterleaveType ossimEnviHeader::getOssimInterleaveType() const
+{
+   ossimString interleave = getInterleaveType();
+   if (interleave == "bsq")
+   {
+      return OSSIM_BSQ;
+   }
+   else if  (interleave == "bil")
+   {
+      return OSSIM_BIL;
+   }
+   else if  (interleave == "bip")
+   {
+      return OSSIM_BIP;
+   }
+   else
+   {
+      return OSSIM_INTERLEAVE_UNKNOWN;
+   }
+}
+
+void ossimEnviHeader::setInterleaveType(ossimInterleaveType interleave)
+{
+   std::string interleaveString = "";
+   switch (interleave)
+   {
+      case OSSIM_BIL:
+         interleaveString = "bil";
+         break;
+      case OSSIM_BSQ:
+         interleaveString = "bsq";
+         break;
+      case OSSIM_BIP:
+         interleaveString = "bip";
+         break;
+      default:
+         interleaveString = "Unknown";
+         break;
+   }
+   m_keywords["interleave"] = interleaveString;
+}
+
+ossimString ossimEnviHeader::getSensorType() const
+{
+   return m_keywords["sensor type"];
+}
+
+void ossimEnviHeader::setSensorType(const ossimString& sensorType)
+{
+   m_keywords["sensor type"] = sensorType.c_str();
+}
+
+ossimByteOrder ossimEnviHeader::getByteOrder() const
+{
+   ossimByteOrder result = ossim::byteOrder(); // System byte order.
+   std::string value = m_keywords["byte order"];
+   if ( value.size() )
+   {
+      // 0 = LITTLE_ENDIAN
+      // 1 = BIG_ENDIAN
+      ossim_int32 order = ossimString(value).toInt32();
+      result = order ? OSSIM_BIG_ENDIAN : OSSIM_LITTLE_ENDIAN;
+   }
+   return result;
+}
+
+void ossimEnviHeader::setByteorder(ossimByteOrder byteOrder)
+{
+   if(byteOrder==OSSIM_LITTLE_ENDIAN)
+   {
+      m_keywords["byte order"] = "0";
+   }
+   else
+   {
+      m_keywords["byte order"] = "1";
+   }
+}
+
+ossim_int32 ossimEnviHeader::getXStart() const
+{
+   ossim_int32 result = 0;
+   std::string s = m_keywords.findKey( std::string("x start") );
+   if ( !s.size() )
+   {
+      s = m_keywords.findKey( std::string("sample start") );
+   }
+   if ( s.size() )
+   {
+      result = ossimString( s ).toInt32();
+   }
+   return result;
+}
+
+void ossimEnviHeader::setXStart(ossim_int32 xstart)
+{
+   m_keywords["x start"] = ossimString::toString(xstart).c_str();
+}
+
+ossim_int32 ossimEnviHeader::getYStart() const
+{
+   ossim_int32 result = 0;
+   std::string s = m_keywords.findKey( std::string("y start") );
+   if ( !s.size() )
+   {
+      s = m_keywords.findKey( std::string("line start") );
+   }
+   if ( s.size() )
+   {
+      result = ossimString( s ).toInt32();
+   }
+   return result;
+}
+
+void ossimEnviHeader::setYStart(ossim_int32 ystart)
+{
+   m_keywords["y start"] = ossimString::toString(ystart).c_str();
+}
+
+ossimString ossimEnviHeader::getMapInfo() const
+{
+   return m_keywords["map info"];
+}
+
+void ossimEnviHeader::setMapInfo(const ossimString& mapInfo)
+{
+   m_keywords["map info"] = mapInfo.c_str();
+}
+
+void ossimEnviHeader::setMapInfo(const ossimKeywordlist& kwl,
+                                 const char* prefix)
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimEnviHeader::setMapInfo DEBUG:"
+         << "\nkwl:\n"
+         << kwl
+         << std::endl;
+   }
+   ossimString mapInfoString;
+   const char* lookup;
+   
+   // Get the projection type.
+   ossimString projection;
+   lookup = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
+   if (lookup)
+   {
+      projection = lookup;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimEnviHeader::setMapInfo WARNING:"
+         << "\nNo projection type found!\nReturning..."
+         << std::endl;
+         
+      return; // Have to have the projection type!
+   }
+
+   // Get the datum.
+   ossimString datum = "WGS-84";
+   lookup = kwl.find(prefix, ossimKeywordNames::DATUM_KW);
+   if (lookup)
+   {
+      ossimString os = lookup;
+      if (os == "WGE")
+      {
+         datum = "WGS-84";
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimEnviHeader::setMapInfo WARNING:"
+            << "\nUnhandled ossim -> envi datum:  " << datum
+            << "\nAssuming WGS-84!"
+            << std::endl;
+      }
+   }
+
+   if ( (projection == "ossimEquDistCylProjection") ||
+        (projection == "ossimLlxyProjection") )
+   {
+      const char* tieLat = NULL;
+      const char* tieLon = NULL;
+      const char* degLat = NULL;
+      const char* degLon = NULL;
+      tieLat = kwl.find(prefix, ossimKeywordNames::TIE_POINT_LAT_KW);
+      tieLon = kwl.find(prefix, ossimKeywordNames::TIE_POINT_LON_KW);
+      degLat = kwl.find(prefix,
+                        ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT);
+      degLon = kwl.find(prefix,
+                       ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON);
+      
+      if (!tieLat || !tieLon || !degLat || !degLon)
+      {
+         return;
+      }
+                 
+      mapInfoString = "{Geographic Lat/Lon, 1.0000, 1.0000, ";
+      mapInfoString += tieLon;
+      mapInfoString += ", ";
+      mapInfoString += tieLat;
+      mapInfoString += ", ";
+      mapInfoString += degLon;
+      mapInfoString += ", ";
+      mapInfoString += degLat;
+      mapInfoString += ", ";
+      mapInfoString += datum;
+      mapInfoString += ", units=degrees}";
+   }
+
+   m_keywords["map info"] = mapInfoString.c_str();
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimEnviHeader::setMapInfo DEBUG:"
+         << "\ntheMapInfo:  " << mapInfoString
+         << std::endl;
+   }
+}
+
+ossimString ossimEnviHeader::getWavelengthUnits() const
+{
+   return m_keywords["wavelength units"];
+}
+
+void ossimEnviHeader::setWavelengthUnits(const ossimString& waveLengthUnits)
+{
+   
+   m_keywords["wavelength units"] = waveLengthUnits.c_str();
+}
+
+void ossimEnviHeader::getBandNames(std::vector<ossimString>& bandNames) const
+{
+   bandNames.clear();
+   ossimString bandNamesString = m_keywords["band names"];
+   bandNamesString.split(bandNames, ",");
+}
+
+void ossimEnviHeader::setBandNames(const std::vector<ossimString>& bandNames)
+{
+   ossimString value;
+   value.join(bandNames, ",");
+   m_keywords["band names"] = value.c_str();
+}
+
+void ossimEnviHeader::getWavelengths(std::vector<ossimString>& waveLengths)
+   const
+{
+   waveLengths.clear();
+   ossimString bandNamesString = m_keywords[WAVELENGTH_KW];
+   bandNamesString.split(waveLengths, ",");
+}
+
+void ossimEnviHeader::setWavelengths(
+   const std::vector<ossimString>& wavelengths)
+{
+   ossimString value;
+   value.join(wavelengths, ",");
+   m_keywords[WAVELENGTH_KW] = value.c_str();
+}
+
+bool ossimEnviHeader::loadState(const ossimKeywordlist& kwl,
+                                const char* prefix)
+{
+   std::string lookup;
+   std::string pfx = (prefix ? prefix: "" );
+   ossimString s;
+
+   reset();
+
+   lookup = kwl.findKey(pfx, std::string(ossimKeywordNames::FILENAME_KW));
+   if (lookup.size())
+   {
+      m_file.string() = lookup;
+   }
+  
+   lookup = kwl.findKey(pfx, std::string(ossimKeywordNames::DESCRIPTION_KW));
+   if (lookup.size())
+   {
+      setDescription(lookup);
+   }
+
+   lookup = kwl.findKey(pfx, std::string(ossimKeywordNames::NUMBER_SAMPLES_KW));
+   if (lookup.size())
+   {
+      m_keywords["samples"] = lookup;
+   }
+   
+   lookup = kwl.findKey(pfx, std::string(ossimKeywordNames::NUMBER_LINES_KW));
+   if (lookup.size())
+   {
+      m_keywords["lines"] = lookup;
+   }
+
+   lookup = kwl.findKey(pfx, std::string(ossimKeywordNames::NUMBER_BANDS_KW));
+   if (lookup.size())
+   {
+      m_keywords["bands"] = lookup;
+   }
+
+   lookup = kwl.findKey(pfx, std::string(HEADER_OFFSET_KW));
+   if (lookup.size())
+   {
+      m_keywords["header offset"] = lookup;
+   }
+
+   lookup = kwl.findKey(pfx, std::string(FILE_TYPE_KW));
+   if (lookup.size())
+   {
+       m_keywords["file_type"] = lookup;
+   }
+
+   lookup = kwl.findKey(pfx, DATA_TYPE_KW);
+   if (lookup.size())
+   {
+      m_keywords["data type"] = lookup;
+   }
+
+   lookup = kwl.findKey(pfx, std::string(ossimKeywordNames::INTERLEAVE_TYPE_KW));
+   if (lookup.size())
+   {
+      m_keywords["interleave"] = lookup;
+   }
+
+   lookup = kwl.findKey(pfx, std::string(SENSOR_TYPE_KW));
+   if (lookup.size())
+   {
+      m_keywords["sensor type"] = lookup;
+   }
+
+   lookup = kwl.findKey(pfx, std::string(ossimKeywordNames::BYTE_ORDER_KW));
+   if (lookup.size())
+   {
+      s = lookup;
+      s.downcase();
+      if (s == "little_endian")
+      {
+         m_keywords["byte order"] = "0";
+      }
+      else if (s == "big_endian")
+      {
+         m_keywords["byte order"] = "1";
+      }
+      else
+      {
+         m_keywords["byte order"] = lookup;
+      }
+   }
+   
+   lookup = kwl.findKey(pfx, std::string(X_START_KW));
+   if (lookup.size())
+   {
+      m_keywords["x start"] = lookup;
+   }
+   lookup = kwl.findKey(pfx, std::string(Y_START_KW));
+   if (lookup.size())
+   {
+      m_keywords["y start"] = lookup;
+   }
+
+   lookup = kwl.findKey(pfx, std::string(MAP_INFO_KW));
+   if (lookup.size())
+   {
+      m_keywords["map info"] = lookup;
+   }
+
+   lookup = kwl.findKey(pfx, std::string(WAVELENGTH_UNITS_KW));
+   if (lookup.size())
+   {
+      m_keywords["wavelength units"] = lookup;
+   }
+
+   ossim_uint32 n;
+   ossim_uint32 count;
+   const ossim_uint32 MAX_TRIES = 1024; // Avoid infinate loop.
+   
+   // Get the band names.
+   n = kwl.numberOf(prefix, BAND_NAME_KW);
+   if (n)
+   {
+      ossimString value = "";
+      count = 0;
+      while ( (count < n) || (count > MAX_TRIES) )
+      {
+         s = BAND_NAME_KW;
+         s += ossimString::toString(count);
+         lookup = kwl.findKey(pfx, s.string());
+         if (lookup.size())
+         {
+            if(!value.empty())
+            {
+               value += ossimString(lookup);
+            }
+            else
+            {
+               value += (", " + ossimString(lookup));
+
+            }
+            
+         }
+         ++count;
+      }
+      m_keywords["band names"] = value.c_str();
+   }
+            
+   // Get the band names.
+   n = kwl.numberOf(prefix, WAVELENGTH_KW);
+   if (n)
+   {
+      ossimString value;
+      count = 0;
+      while ( (count < n) || (count > MAX_TRIES) )
+      {
+         s = WAVELENGTH_KW;
+         s += ossimString::toString(count);
+         lookup = kwl.findKey(pfx, s.string());
+         if (lookup.size())
+         {
+            if(!value.empty())
+            {
+               value += ossimString(lookup);
+            }
+            else
+            {
+               value += (", " + ossimString(lookup));
+            }
+         }
+         ++count;
+      }
+      m_keywords["wavelength"] = value.c_str();
+   }
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimEnviHeader::loadState DEUG\n";
+      print(ossimNotify(ossimNotifyLevel_DEBUG));
+   }
+   
+   return true;
+}
+
+bool ossimEnviHeader::isEnviHeader( const ossimFilename& file )
+{
+   bool result = false;
+   std::ifstream in;
+   in.open(file.c_str(), std::ios::in | std::ios::binary);
+   if ( in.is_open() )
+   {
+      result = isEnviHeader( in );
+      in.close();
+   }
+   return result;
+}
+
+bool ossimEnviHeader::isEnviHeader( std::istream& in )
+{
+   bool result = false;
+   ossim::skipws(in);
+   char eh[5];
+   in.read(eh, 4);
+   eh[4] = '\0';
+   std::string s(eh);
+   if ( s == "ENVI" )
+   {
+      result = true;
+   }
+   return result;
+}
+
+const ossimFilename& ossimEnviHeader::getFile() const
+{
+   return m_file;
+}
+
+bool ossimEnviHeader::rangeCheckBands( const std::vector<ossim_uint32>& bands ) const
+{
+   bool result = false;
+   const ossim_uint32 INPUT_BANDS = getBands();
+   if ( INPUT_BANDS )
+   {
+      result = true;
+      std::vector<ossim_uint32>::const_iterator i = bands.begin();
+      while ( i != bands.end() )
+      {
+         if ( (*i) >= INPUT_BANDS )
+         {
+            result = false;
+            break;
+         }
+         ++i;
+      }
+   }
+   return result;
+}
diff --git a/ossim/src/ossim/support_data/ossimEnviInfo.cpp b/ossim/src/ossim/support_data/ossimEnviInfo.cpp
new file mode 100644
index 0000000..c1606ea
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimEnviInfo.cpp
@@ -0,0 +1,79 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: ENVI Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/support_data/ossimEnviInfo.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/support_data/ossimEnviHeader.h>
+#include <iostream>
+
+ossimEnviInfo::ossimEnviInfo()
+   : ossimInfoBase(),
+     m_file()
+{
+}
+
+ossimEnviInfo::~ossimEnviInfo()
+{
+}
+
+bool ossimEnviInfo::open( const ossimFilename& file )
+{
+   bool result = false;
+
+   m_file = file;
+
+   if ( file.ext().downcase() != "hdr" )
+   {
+      // Typical case, we were fed the image file.  Look for a header file beside image.
+      m_file.setExtension("hdr"); // image.hdr
+      if ( !m_file.exists() )
+      {
+         m_file.setExtension("HDR"); // image.HDR
+         if ( !m_file.exists() )
+         {
+            m_file = file;
+            m_file.string() += ".hdr"; // image.ras.hdr
+         }
+      }
+   }
+
+   if ( m_file.exists() )
+   {
+      if ( ossimEnviHeader::isEnviHeader( m_file ) )
+      {
+         result = true;
+      }
+   }
+
+   if ( !result ) 
+   {
+      m_file.clear();
+   }
+
+   return result;
+}
+
+std::ostream& ossimEnviInfo::print( std::ostream& out ) const
+{
+   if ( m_file.size() )
+   {
+      ossimEnviHeader hdr;
+      if ( hdr.open( m_file ) )
+      {
+         hdr.getMap().addPrefixToAll( ossimString( "envi." ) );
+         out << hdr.getMap() << std::endl;
+      }
+   }
+   return out; 
+}
+
diff --git a/src/ossim/support_data/ossimFfL5.cpp b/ossim/src/ossim/support_data/ossimFfL5.cpp
similarity index 100%
rename from src/ossim/support_data/ossimFfL5.cpp
rename to ossim/src/ossim/support_data/ossimFfL5.cpp
diff --git a/ossim/src/ossim/support_data/ossimFfL7.cpp b/ossim/src/ossim/support_data/ossimFfL7.cpp
new file mode 100644
index 0000000..6d49103
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimFfL7.cpp
@@ -0,0 +1,707 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Ken Melero
+//         Orginally written by Oscar Kramer (SoBe Software)
+//         
+// Description: Container class for LandSat7 Fast Format header files.
+//
+//********************************************************************
+// $Id: ossimFfL7.cpp 23231 2015-04-08 00:00:33Z gpotts $
+
+#include <cstdio>
+#include <fstream>
+#include <sstream>
+#include <string>
+#include <iomanip>
+#include <ctime>  
+using namespace std;
+
+#include <ossim/support_data/ossimFfL7.h>
+
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimDate.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimProperty.h>
+#include <ossim/base/ossimDateProperty.h>
+#include <ossim/base/ossimStringProperty.h>
+
+static const ossimString ACQUISITION_DATE_KW = "acquisition_date";
+static const ossimString PATH_KW             = "path";
+static const ossimString PATH_ROW_KW         = "path_row";
+static const ossimString ROW_KW              = "row";
+static const ossimString SATELLITE_NAME_KW   = "satellite_name";
+static const ossimString SENSOR_NAME_KW      = "sensor_name";
+
+
+ossimFfL7::ossimFfL7()
+   :
+      ossimErrorStatusInterface()
+{
+   initialize();
+}
+
+ossimFfL7::ossimFfL7(const char* headerFile)
+   :
+      ossimErrorStatusInterface()
+{
+   initialize();
+   
+   // open the header file:
+   FILE* fptr = fopen(headerFile, "r");
+   if (!fptr)
+   {
+      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+   }
+
+   // Begin reading records:
+   if (!theErrorStatus)
+      readAdminRecord(fptr);
+   if (!theErrorStatus)
+      readRadiomRecord(fptr);
+   if (!theErrorStatus)
+      readGeomRecord(fptr);
+   if(fptr)
+   {
+      fclose(fptr);
+   }
+}
+ossimFfL7::~ossimFfL7()
+{}
+ 
+ossimString ossimFfL7::pathRow() const
+{
+   ossimString tmp = "p";
+   tmp += theLocationCode;
+   tmp.gsub("/", "r");
+   tmp.gsub(" ", "");
+
+   return tmp;
+}
+
+void ossimFfL7::dump(std::ostream& os) const
+{
+   os << setiosflags(ios::left | ios::fixed)
+      << "\nAdministrative Record:"
+      << setw(30) << "\ntheRequestNumber: " 
+      << theRequestNumber;
+
+   os << setw(30) << "\nLocationCode:     " << theLocationCode
+      << setw(30) << "\nAcquisitionDate:  " << theAcquisitionDate
+      << setw(30) << "\nSatelliteName:    " << theSatName
+      << setw(30) << "\nSensorName:       " << theSensorName
+      << setw(30) << "\nSensorMode:       " << theSensorMode
+      << setw(30) << "\nOffNadirAngle:    "
+      << setprecision(2) << theOffNadirAngle;
+
+   os << setw(30) << "\nProductType: " 
+      << theProductType
+      << setw(30) << "\nProductSize: " 
+      << theProductSize
+      << setw(30) << "\nProcessingType: " 
+      << theProcessingType 
+      << setw(30) << "\nResampAlgorithm: " 
+      << theResampAlgorithm
+      << setw(30) << "\nPixelsPerLine: " 
+      << thePixelsPerLine
+      << setw(30) << "\nLinesPerImage: " 
+      << theLinesPerBand
+      << setw(30) << "\nRecordSize: " 
+      << theRecordSize
+      << setw(30) << "\nGsd: " 
+      << setprecision(2) << theGsd
+      << setw(30) << "\nOutputBitsPerPixel: " 
+      << theOutputBitsPerPixel
+      << setw(30) << "\nAcquiredBitsPerPixel: " 
+      << theAcquiredBitsPerPixel
+      << setw(30) << "\nBandsPresentString: " 
+      << theBandsPresentString;
+   
+   for (int i=0; i<6; i++)
+      os << "\nBandFileNames["<<i<<"]:             " <<theBandFileNames[i];
+   os << endl;
+
+   os << setprecision(15) << setw(30) << "\nRadiometric record:" << endl;
+   ossim_uint32 band = 0;
+   vector<ossim_float64>::const_iterator bi = theBias.begin();
+   while (bi != theBias.end())
+   {
+      os << "band[" << band << "] bias:  " << (*bi) << endl;
+      ++bi;
+      ++band;
+   }
+
+   band = 0;
+   bi = theGain.begin();
+   while (bi != theGain.end())
+   {
+      os << "band[" << band << "] gain:  " << (*bi) << endl;
+      ++bi;
+      ++band;
+   }
+   
+   os << endl
+      << "Geometric Record:"
+      << setw(30) << "\nMapProjectionName:" 
+      << theMapProjectionName
+      << setw(30) << "\nEllipsoid:" 
+      << theEllipsoid
+      << setw(30) << "\nDatum:" 
+      << theDatum;
+
+   for (int i = 0; i < 15; i++)
+   {
+      os << "\nProjectionParams[" << setw(2) << i << setw(10) << "]:  "
+         << theProjectionParams[i];
+   }
+
+   os << setprecision(3) 
+      << setw(30) << "\nUL Corner:" << theUL_Corner
+      << setw(30) << "\nUR Corner:" << theUR_Corner
+      << setw(30) << "\nLR Corner:" << theLR_Corner
+      << setw(30) << "\nLL Corner:" << theLL_Corner
+      << setw(30) << "\nCenter Point (Ground):" << theCenterGP
+      << setw(30) << "\nCenter Point (Image):" << theCenterImagePoint
+      << setw(30) << "\nHorizontalOffset:" 
+      << theHorizontalOffset
+      << setprecision(2) << setw(30) << "\nOrientationAngle:" 
+      << theOrientationAngle
+      << setw(30) << "\nSunElevationAngle:" 
+      << setprecision(1) << theSunElevation
+      << setw(30) << "\nSunAzimuth:" <<  theSunAzimuth
+      << resetiosflags(ios::left)
+      << endl << endl;
+}
+
+void ossimFfL7::writeHeader(std::ostream& os) const
+{
+   ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimFfL7::writeHeader: This method is not yet implemented. Ignoring request..."
+                                      << std::endl;
+   os << "WARNING ossimFfL7::writeHeader: This method is not yet implemented. Ignoring request..."
+      << std::endl;
+}
+
+void ossimFfL7::readAdminRecord(FILE* fptr)
+{
+   static const int OFFSET = -1;
+   int converted;
+   theErrorStatus = ossimErrorCodes::OSSIM_ERROR; // assume error, prove not at end;
+
+   fseek(fptr, OFFSET + 9, SEEK_SET);
+   converted = fscanf(fptr, "%20c", theRequestNumber);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 35, SEEK_SET);
+   converted = fscanf(fptr, "%17c", theLocationCode);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 71, SEEK_SET);
+   converted = fscanf(fptr, "%8c", theAcquisitionDate);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 92, SEEK_SET);
+   converted = fscanf(fptr, "%10c", theSatName);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 111, SEEK_SET);
+   converted = fscanf(fptr, "%10c", theSensorName);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 135, SEEK_SET);
+   converted = fscanf(fptr, "%6c", theSensorMode);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 154, SEEK_SET);
+   converted = fscanf(fptr, "%6lf", &theOffNadirAngle);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 655, SEEK_SET);
+   converted = fscanf(fptr, "%18c", theProductType);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 688, SEEK_SET);
+   converted = fscanf(fptr, "%10c", theProductSize);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 741, SEEK_SET);
+   converted = fscanf(fptr, "%11c", theProcessingType);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 765, SEEK_SET);
+   converted = fscanf(fptr, "%2c", theResampAlgorithm);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 843, SEEK_SET);
+   converted = fscanf(fptr, "%5d", &thePixelsPerLine);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 865, SEEK_SET);
+   converted = fscanf(fptr, "%5d", &theLinesPerBand);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 932, SEEK_SET);
+   converted = fscanf(fptr, "%9d", &theRecordSize);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 954, SEEK_SET);
+   converted = fscanf(fptr, "%6lf", &theGsd);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 984, SEEK_SET);
+   converted = fscanf(fptr, "%2d", &theOutputBitsPerPixel);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 1012, SEEK_SET);
+   converted = fscanf(fptr, "%2d", &theAcquiredBitsPerPixel);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 1056, SEEK_SET);
+   converted = fscanf(fptr, "%32c", theBandsPresentString);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 1131, SEEK_SET);
+   converted = fscanf(fptr, "%29c", theBandFileNames[0]);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 1170, SEEK_SET);
+   converted = fscanf(fptr, "%29c", theBandFileNames[1]);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 1211, SEEK_SET);
+   converted = fscanf(fptr, "%29c", theBandFileNames[2]);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 1250, SEEK_SET);
+   converted = fscanf(fptr, "%29c", theBandFileNames[3]);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 1291, SEEK_SET);
+   converted = fscanf(fptr, "%29c", theBandFileNames[4]);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 1330, SEEK_SET);
+   converted = fscanf(fptr, "%29c", theBandFileNames[5]);
+   if (converted != 1) return;
+
+   std::vector<ossimString> arrayPathRow = ossimString(theLocationCode).split("/");
+   if(arrayPathRow.size() == 2)
+   {
+      thePathNumber = arrayPathRow[0].toInt();
+      theRowNumber = arrayPathRow[1].beforePos(3).toInt();
+   }
+   
+   // The Admin record was successfully extracted:
+   theErrorStatus = ossimErrorCodes::OSSIM_OK;   
+   return;
+}
+
+int ossimFfL7::path() const
+{
+   return thePathNumber;
+}
+
+int ossimFfL7::row() const
+{
+   return theRowNumber;
+}
+
+//***************************************************************************
+// PRIVATE METHOD: ossimFfL7::readRadiomRecord()
+//  
+//***************************************************************************
+void ossimFfL7::readRadiomRecord(FILE* fptr)
+{
+   int converted;
+   char radiom_record[1537];
+   
+   if (!theErrorStatus)
+   {
+      fseek(fptr, 1536, SEEK_SET);
+      converted = fscanf(fptr, "%1536c", radiom_record);
+      if (converted != 1) theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+   }
+
+   // Get the gains and biases.
+   theBias.clear();
+   theGain.clear();
+
+   const ossim_uint32 MAX = 128;
+   char temp_chars[MAX];
+   std::istringstream is(radiom_record);
+
+   // Eat the first line. "GAINS AND BIASES IN ASCENDING BAND NUMBER ORDER"
+   is.getline(temp_chars, MAX);
+   
+   const char SPACE     = 0x20;
+   const char LINE_FEED = 0x0a;
+   
+   // LS7 header has room for eight bands per spec.   
+   for (ossim_uint32 band = 0; band < 8; ++band)
+   {
+      is.getline(temp_chars, MAX);
+      bool blank_line = true;
+      for (ossim_uint32 i = 0; i < MAX; ++i)
+      {
+         if (temp_chars[i] == LINE_FEED) break;  // end of line...
+
+         if (temp_chars[i] != SPACE)
+         {
+            blank_line = false; // has bias and gain...
+            break;
+         }
+      }
+
+      if (blank_line == true) continue; // go to next line...
+      
+      std::vector<ossimString> splitString;
+      ossimString tempString(temp_chars);
+      tempString.split(splitString, " ");
+      
+      if(splitString.size() > 1)
+      {
+         theBias.push_back(splitString[0].toDouble());
+         theGain.push_back(splitString[1].toDouble());
+     }
+   }
+}
+
+//***************************************************************************
+// PRIVATE METHOD: ossimFfL7::readGeomRecord()
+//  
+//***************************************************************************
+void ossimFfL7::readGeomRecord(FILE* fptr)
+{
+   static const int OFFSET = 3071;
+   int converted;
+   theErrorStatus = ossimErrorCodes::OSSIM_ERROR; // assume error, prove not at end;
+
+   fseek(fptr, OFFSET + 32, SEEK_SET);
+   converted = fscanf(fptr, "%4c", theMapProjectionName);
+   if (converted != 1) return;
+
+   fseek(fptr, OFFSET + 48, SEEK_SET);
+   converted = fscanf(fptr, "%18c", theEllipsoid);
+   if (converted != 1) return;
+      
+   strcpy(theDatum, "WGS-84");
+
+   // added to read in all 15 parameters instead of the first two.
+   long currentOffset = OFFSET + 110;
+   for(long parameter=0;parameter < 15; ++parameter)
+   {
+      fseek(fptr, currentOffset, SEEK_SET);
+      converted = fscanf(fptr, "%24lf", &theProjectionParams[parameter]);
+      if (converted != 1) return;
+
+      currentOffset +=25;
+   }
+      
+   
+   fseek(fptr, OFFSET + 521, SEEK_SET);
+   converted = fscanf(fptr, "%6d", &theUsgsMapZone);
+   if (converted != 1) return;
+      
+   fseek(fptr, OFFSET + 566, SEEK_SET);
+   if(convertGeoPoint(fptr, theUL_Corner)) return;
+      
+   fseek(fptr, OFFSET + 646, SEEK_SET);
+   if(convertGeoPoint(fptr, theUR_Corner)) return;
+      
+   fseek(fptr, OFFSET + 726, SEEK_SET);
+   if(convertGeoPoint(fptr, theLR_Corner)) return;
+      
+   fseek(fptr, OFFSET + 806, SEEK_SET);
+   if(convertGeoPoint(fptr, theLL_Corner)) return;
+      
+   fseek(fptr, OFFSET + 890, SEEK_SET);
+   if(convertGeoPoint(fptr, theCenterGP)) return;
+      
+   fseek(fptr, OFFSET + 945, SEEK_SET);
+
+   int x;
+   int y;
+   
+   converted = fscanf(fptr, "%5d %5d", &x, &y);
+   if (converted != 2) return;
+   
+   theCenterImagePoint.x = x;
+   theCenterImagePoint.y = y;
+      
+   fseek(fptr, OFFSET + 969, SEEK_SET);
+   converted = fscanf(fptr, "%6d", &theHorizontalOffset);
+   if (converted != 1) return;
+      
+   fseek(fptr, OFFSET + 995, SEEK_SET);
+   converted = fscanf(fptr, "%6lf", &theOrientationAngle);
+   if (converted != 1) return;
+      
+   fseek(fptr, OFFSET + 1062, SEEK_SET);
+   converted = fscanf(fptr, "%4lf", &theSunElevation);
+   if (converted != 1) return;
+      
+   fseek(fptr, OFFSET + 1086, SEEK_SET);
+   converted = fscanf(fptr, "%5lf", &theSunAzimuth);
+   if (converted != 1) return;
+
+   // successfully reached the end of Geom record:
+   theErrorStatus = ossimErrorCodes::OSSIM_OK;
+
+   return;
+}
+
+
+//***************************************************************************
+// PRIVATE METHOD: ossimFfL7::convertGeoPoint(char* buffer);
+//  
+//***************************************************************************
+int ossimFfL7::convertGeoPoint(FILE* fptr, ossimGpt& geo_point)
+{
+   int    londeg;
+   int    lonmin;
+   double lonsec;
+   char   lonhem;
+   int    latdeg;
+   int    latmin;
+   double latsec;
+   char   lathem;
+   
+   int converted = fscanf(fptr, "%03d%02d%7lf%c %02d%02d%7lf%c",
+                          &londeg, &lonmin, &lonsec, &lonhem,
+                          &latdeg, &latmin, &latsec, &lathem);
+
+   if (converted != 8)
+   {
+      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
+      return ossimErrorCodes::OSSIM_ERROR;
+   }
+   
+   geo_point.lat = (double)latdeg + (double)latmin/60.0 + latsec/3600.0;
+   if (lathem == 'S')
+      geo_point.lat *= -1.0;
+   
+   geo_point.lon= (double)londeg + (double)lonmin/60.0 + lonsec/3600.0;
+   if (lonhem == 'W')
+      geo_point.lon *= -1.0;
+
+   return ossimErrorCodes::OSSIM_OK;
+}
+   
+//***************************************************************************
+// PRIVATE METHOD: ossimFfL7::initialize()
+// Initializes all fields to blanks (or 0's) and null terminates strings.
+//***************************************************************************
+void ossimFfL7::initialize()
+{
+   static const char source[] = "";
+
+   // The Admin Record:
+   strncpy(theRequestNumber, source, 21);
+   strncpy(theLocationCode, source, 18);
+   thePathNumber = 0;
+   theRowNumber = 0;
+   strncpy(theAcquisitionDate, source, 20);
+   strncpy(theSatName, source, 11);
+   strncpy(theSensorName, source, 11);
+   strncpy(theSensorMode, source, 7);
+   theOffNadirAngle = 0.0;      
+   strncpy(theProductType, source, 19);
+   strncpy(theProductSize, source, 11);
+   strncpy(theProcessingType, source, 12);
+   strncpy(theResampAlgorithm, source, 3);
+   thePixelsPerLine = 0;
+   theLinesPerBand = 0;
+   theRecordSize = 0;
+   theGsd = 0.0;
+   theOutputBitsPerPixel = 0;
+   theAcquiredBitsPerPixel = 0;
+   strncpy(theBandsPresentString, source, 33);
+   strncpy(theBandFileNames[0], source, 30);
+   strncpy(theBandFileNames[1], source, 30);
+   strncpy(theBandFileNames[2], source, 30);
+   strncpy(theBandFileNames[3], source, 30);
+   strncpy(theBandFileNames[4], source, 30);
+   strncpy(theBandFileNames[5], source, 30);
+
+   // The Radiometry Record:
+   theBias.clear();
+   theGain.clear();
+
+   // The Geometry Record:
+   strncpy(theMapProjectionName, source, 5);
+   strncpy(theEllipsoid, source, 19);
+   strncpy(theDatum, source, 7);
+   for (int i=0; i<15; i++)
+      theProjectionParams[i] = 0.0;
+   theUsgsMapZone = 0;
+
+   theHorizontalOffset  = 0;   
+   theOrientationAngle  = 0.0; 
+   theSunElevation      = 0.0; 
+   theSunAzimuth        = 0.0; 
+
+   return;
+}
+
+void ossimFfL7::getBias(vector<double>& bias) const
+{
+   bias = theBias;
+}
+
+double ossimFfL7::getBias(long bandIdx)const
+{
+   return theBias[bandIdx];
+}
+
+void ossimFfL7::getGain(vector<double>& gain) const
+{
+   gain = theGain;
+}
+
+double ossimFfL7::getGain(long bandIdx)const
+{
+   return theGain[bandIdx];
+}
+
+double ossimFfL7::getParam(ossim_uint32 i)const
+{
+   if(i < 15)
+   {
+      return theProjectionParams[i];
+   }
+   return 0.0;
+}
+
+long ossimFfL7::getJulianDay()const
+{
+   ossimDate date;
+   getAcquisitionDate(date);
+   return static_cast<long>(date.getJulian());
+}
+
+ossimString ossimFfL7::getAcquisitionDate() const
+{
+   return ossimString(theAcquisitionDate);
+}
+
+void ossimFfL7::getAcquisitionDate(ossimDate& date)const
+{
+   ossimString y = ossimString(theAcquisitionDate,
+                               theAcquisitionDate+4);
+   ossimString m = ossimString(theAcquisitionDate+4,
+                               theAcquisitionDate+6);
+   ossimString d = ossimString(theAcquisitionDate+6,
+                               theAcquisitionDate+8);
+
+   date = ossimDate(m.toInt(),
+                    d.toInt(),
+                    y.toInt());
+}
+
+ossimString ossimFfL7::getSatelliteName() const
+{
+   return ossimString(theSatName);
+}
+
+ossimFilename ossimFfL7::getBandFilename(ossim_uint32 idx)const
+{
+   ossimFilename result;
+   if (idx < getBandCount())
+   {
+      result = theBandFileNames[idx];
+   }
+   return result;
+}
+
+int ossimFfL7::getLinesPerBand() const
+{
+   return theLinesPerBand;
+}
+
+int ossimFfL7::getPixelsPerLine() const
+{
+   return thePixelsPerLine;
+}
+
+void ossimFfL7::getSunElevation(double& elevation) const
+{
+   elevation = theSunElevation;
+}
+
+void ossimFfL7::getSunAzimuth(double& azimuth) const
+{
+   azimuth = theSunAzimuth;
+}
+
+ossimRefPtr<ossimProperty> ossimFfL7::getProperty(const ossimString& name)const
+{
+   ossimRefPtr<ossimProperty> result = 0;
+
+   if(name == ACQUISITION_DATE_KW)
+   {
+      ossimDate date;
+      getAcquisitionDate(date);
+      result = new ossimDateProperty(ACQUISITION_DATE_KW, date);
+   }
+   else if (name == PATH_KW)
+   {
+      result = new ossimStringProperty(PATH_KW,
+                                       ossimString::toString(path()),
+                                       false);
+   }
+   else if (name == PATH_ROW_KW)
+   {
+      result = new ossimStringProperty(PATH_ROW_KW,
+                                       pathRow(),
+                                       false);
+   }                                       
+   else if (name == ROW_KW)
+   {
+      result = new ossimStringProperty(ROW_KW,
+                                       ossimString::toString(row()),
+                                       false);
+   }
+   else if (name == SATELLITE_NAME_KW)
+   {
+      result = new ossimStringProperty(SATELLITE_NAME_KW,
+                                       ossimString(theSatName),
+                                       false);
+   }
+   else if (name == SENSOR_NAME_KW)
+   {
+      result = new ossimStringProperty(SENSOR_NAME_KW,
+                                       ossimString(theSensorName),
+                                       false);
+   }
+
+   return result;
+}
+
+void ossimFfL7::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   propertyNames.push_back(ACQUISITION_DATE_KW);   
+   propertyNames.push_back(PATH_KW);
+   propertyNames.push_back(PATH_ROW_KW);
+   propertyNames.push_back(ROW_KW);      
+   propertyNames.push_back(SATELLITE_NAME_KW);
+   propertyNames.push_back(SENSOR_NAME_KW);
+}
+
+unsigned int ossimFfL7::getBandCount()const
+{
+   ossimString tmp(theBandsPresentString);
+   tmp.trim(); //remove spaces
+   return (unsigned int)tmp.length();
+//   return strlen(tmp.chars()); //beurk! should implement length in ossimString
+}
+ 
+//***************************************************************************
+// Function:
+// ostream& operator<<(ostream& os, const ossimFfL7& head)
+//***************************************************************************
+std::ostream& operator<<(std::ostream& os, const ossimFfL7& head)
+{
+   head.dump(os);
+   return os;
+}
+
diff --git a/src/ossim/support_data/ossimFfRevb.cpp b/ossim/src/ossim/support_data/ossimFfRevb.cpp
similarity index 100%
rename from src/ossim/support_data/ossimFfRevb.cpp
rename to ossim/src/ossim/support_data/ossimFfRevb.cpp
diff --git a/src/ossim/support_data/ossimFfRevc.cpp b/ossim/src/ossim/support_data/ossimFfRevc.cpp
similarity index 100%
rename from src/ossim/support_data/ossimFfRevc.cpp
rename to ossim/src/ossim/support_data/ossimFfRevc.cpp
diff --git a/ossim/src/ossim/support_data/ossimFgdcTxtDoc.cpp b/ossim/src/ossim/support_data/ossimFgdcTxtDoc.cpp
new file mode 100644
index 0000000..721fef4
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimFgdcTxtDoc.cpp
@@ -0,0 +1,307 @@
+//----------------------------------------------------------------------------
+//
+// File ossimFgdcTxtDoc.cpp
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: ossimFgdcTxtDoc class definition.
+//
+// FGDC = "Federal Geographic Data Committee"
+//
+// See: http://www.fgdc.gov/
+// 
+//----------------------------------------------------------------------------
+
+#include <ossim/support_data/ossimFgdcTxtDoc.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/projection/ossimMapProjectionFactory.h>
+#include <fstream>
+#include <iostream>
+#include <string>
+#include <vector>
+
+static const std::string ALTITUDE_DISTANCE_UNITS_KW = "altitude_distance_units";
+static const std::string FGDC_FILE_KW               = "fgdc_file";
+static const std::string FGDC_VERSION_KW            = "fgdc_version";
+static const std::string FGDC_VERSION_001_1998      = "FGDC-STD-001-1998";
+
+ossimFgdcTxtDoc::ossimFgdcTxtDoc()
+   : m_kwl( new ossimKeywordlist() )
+{
+}
+
+ossimFgdcTxtDoc::~ossimFgdcTxtDoc()
+{
+   m_kwl = 0; // Not a leak, m_kwl is a ossimRefPtr.
+}
+
+bool ossimFgdcTxtDoc::open(const ossimFilename& file)
+{
+   bool result = false;
+
+   // Open the file:
+   std::ifstream str( file.c_str(), std::ios_base::in );
+
+   if ( str.good() )
+   {
+      std::string key = "Metadata_Standard_Version";
+      std::string value;
+      if ( findKey( str, true, key, value ) )
+      {
+         if ( value == FGDC_VERSION_001_1998 )
+         {
+            result = true;
+            m_kwl->addPair( FGDC_VERSION_KW, value );
+            m_kwl->addPair( FGDC_FILE_KW, file.string() );
+
+            // Store for getAltitudeDistanceUnits() method if key found.
+            key = "Altitude_Distance_Units";
+            if ( findKey( str, false, key, value ) )
+            {
+               m_kwl->addPair( ALTITUDE_DISTANCE_UNITS_KW, value );
+            }
+         }
+      }
+   }
+
+   return result;
+}
+
+void ossimFgdcTxtDoc::close()
+{
+   m_kwl->clear();
+}
+
+void ossimFgdcTxtDoc::getProjection(ossimRefPtr<ossimProjection>& proj)
+{
+   static const char M[] = "ossimFgdcTxtDoc::getProjection";
+   
+   try
+   {
+      // Get the file name:
+      std::string file = m_kwl->findKey( FGDC_FILE_KW );
+      if ( file.size() )
+      {
+         // Get the version:
+         std::string version = m_kwl->findKey( FGDC_VERSION_KW );
+         if ( version.size() )
+         {
+            // Note: Currently only coded against FGDC-STD-001-1998
+            if ( version ==  FGDC_VERSION_001_1998)
+            {
+               // Open the file:
+               std::ifstream str( file.c_str(), std::ios_base::in );
+               if ( str.good() )
+               {
+                  // Find the Spatial_Reference_Information  section:
+                  std::string key = "Spatial_Reference_Information:";
+                  if ( findKey( str, key ) )
+                  {
+                     getProjectionV1( str, proj );
+                  }
+               }
+            }
+         }
+      }
+   }
+   catch (const ossimException& e)
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << M << " caught exception:\n" << e.what() << std::endl;
+   }
+}
+
+void ossimFgdcTxtDoc::getAltitudeDistanceUnits(std::string& units) const
+{
+   units = m_kwl->findKey( ALTITUDE_DISTANCE_UNITS_KW );
+}
+
+void ossimFgdcTxtDoc::getProjectionV1(std::ifstream& str, ossimRefPtr<ossimProjection>& proj)
+{
+   static const char M[] = "ossimFgdcTxtDoc::getProjectionV1";
+   
+   std::string fgdcKey;
+   std::string fgdcValue;
+   std::string key;
+   std::string value;
+   ossimKeywordlist projectionKwl;
+   
+   fgdcKey = "Grid_Coordinate_System_Name";
+   if ( findKey( str, true, fgdcKey, fgdcValue ) )
+   {
+      if ( fgdcValue == "Universal Transverse Mercator" )
+      {
+         key = "type";
+         value = "ossimUtmProjection";
+         projectionKwl.addPair(key, value);
+
+         // Get the zone:
+         fgdcKey = "UTM_Zone_Number";
+         if ( findKey( str, true, fgdcKey, fgdcValue ) )
+         {
+            key = "zone";
+            value = fgdcValue;
+            projectionKwl.addPair(key, value);
+         }
+         else
+         {
+            std::string errMsg = M;
+            errMsg += " ERROR: Could not determine utm zone!";
+            throw ossimException(errMsg);
+         }
+
+         // Check for Southern hemisphere.
+         fgdcKey = "False_Northing";
+         if ( findKey( str, true, fgdcKey, fgdcValue ) )
+         {
+            key = "hemisphere";
+            
+            // Hemisphere( North false easting = 0.0, South = 10000000):
+            ossim_float64 f = ossimString::toFloat64( fgdcKey.c_str() );
+            if ( f == 0.0 )
+            {
+               value = "N";
+            }
+            else
+            {
+               value = "S";
+            }
+            projectionKwl.addPair(key, value);
+         }
+         
+      } // UTM section:
+      else
+      {
+         // Exception thrown so that we see that we are not handling a projection.
+         std::string errMsg = M;
+         errMsg += "ERROR: Unhandled projection: ";
+         errMsg += fgdcValue;
+         throw ossimException(errMsg);  
+      }
+
+      fgdcKey = "Horizontal_Datum_Name";
+      if ( findKey( str, true, fgdcKey, fgdcValue ) )
+      {
+         getOssimDatum( fgdcValue, value );
+         key = "datum";
+         projectionKwl.addPair(key, value);
+      }
+      
+   } // Matches: findKey( Grid_Coordinate_System_Name )
+
+   if ( projectionKwl.getSize() )
+   {
+      proj = ossimMapProjectionFactory::instance()->createProjection(projectionKwl);
+   }
+   else
+   {
+      proj = 0;
+   }
+}
+
+bool ossimFgdcTxtDoc::findKey( std::ifstream& str, const std::string& key)
+{
+   bool result = false;
+   ossimString line;
+   while ( !str.eof() )
+   {
+      // Read line:
+      std::getline( str, line.string() );
+      if ( line.size() )
+      {
+         // Eat white space.
+         line.trim();
+         if ( line.string() == key )
+         {
+            result = true;
+            break;
+         }
+      }
+   }
+   return result;
+}
+
+bool ossimFgdcTxtDoc::findKey(
+   std::ifstream& str, bool seekBack, const std::string& key, std::string& value)
+{
+   bool result = false;
+
+   std::vector<ossimString> fgdcKeyValue;
+   ossimString separator = ":";
+   ossimString line;
+   ossimKeywordlist projectionKwl;
+   std::streampos currentPosition = str.tellg();
+   
+   while ( !str.eof() )
+   {
+      // Read line:
+      std::getline( str, line.string() );
+      
+      if ( line.size() )
+      {
+         // Eat white space.
+         line.trim();
+         
+         // Split between ':'
+         fgdcKeyValue.clear();
+         line.split(fgdcKeyValue, separator, false);
+         if ( fgdcKeyValue.size() == 2 )
+         {
+            fgdcKeyValue[0].trim();
+
+            if ( fgdcKeyValue[0].size() )
+            {
+               if ( fgdcKeyValue[0] == key )
+               {
+                  // Found it.  Initialize value and get out.
+                  result = true;
+                  fgdcKeyValue[1].trim();
+                  value = fgdcKeyValue[1].string();
+                  break; // from while loop.
+               }
+            }
+         }
+      }
+   }
+
+   if ( seekBack )
+   {
+      str.seekg(currentPosition);
+   }
+   
+   return result;
+}
+
+// Could be moved to base class for xml and text doc.
+void ossimFgdcTxtDoc::getOssimDatum( const std::string& fgdcDatumString,
+                                     std::string& ossimDatumCode ) const
+{
+   ossimString horizdn = fgdcDatumString;
+   horizdn.downcase();
+   if ( horizdn == "north american datum of 1983" )
+   {
+      ossimDatumCode = "NAR-C";
+   }
+   else if ( horizdn == "north american datum of 1927" )
+   {
+      ossimDatumCode = "NAS-C";
+   }
+   else if ( horizdn == "wgs84")
+   {
+      ossimDatumCode = "WGE";
+   }
+   else
+   {
+      // Exception thrown so that we see that we are not handling a datum.
+      std::string errMsg = "ossimFgdcTxtDoc::getOssimDatum ERROR: Unhandled datum: ";
+      errMsg += horizdn.string();
+      throw ossimException(errMsg);
+   }
+}
+
diff --git a/ossim/src/ossim/support_data/ossimFgdcXmlDoc.cpp b/ossim/src/ossim/support_data/ossimFgdcXmlDoc.cpp
new file mode 100644
index 0000000..4a12672
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimFgdcXmlDoc.cpp
@@ -0,0 +1,549 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: Utility class to encapsulate parsing projection info in the xml file.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimFgdcXmlDoc.cpp 2063 2011-01-19 19:38:12Z ming.su $
+
+#include <ossim/support_data/ossimFgdcXmlDoc.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimDatumFactoryRegistry.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimXmlNode.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimEpsgProjectionFactory.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/projection/ossimUtmProjection.h>
+
+#include <cmath> /* for std::fabs */
+
+// Static trace for debugging
+static ossimTrace traceDebug("ossimFgdcXmlDoc:debug");
+
+ossimFgdcXmlDoc::ossimFgdcXmlDoc()
+   : m_xmlFilename(ossimFilename::NIL),
+     m_xmlDocument(0),
+     m_projection(0),
+     m_boundInDegree(false)
+{
+}
+
+ossimFgdcXmlDoc::~ossimFgdcXmlDoc()
+{
+}
+
+bool ossimFgdcXmlDoc::open(const ossimFilename& xmlFileName)
+{
+   bool result = false;
+   if ( isOpen() )
+   {
+      close();
+   }
+   
+   if (xmlFileName.size())
+   {
+      m_xmlDocument = new ossimXmlDocument(xmlFileName);
+      if ( m_xmlDocument.valid() )
+      {
+         // May want to add a test for valid FGDC here??? (drb)
+         m_xmlFilename = xmlFileName;
+         result = true;
+      }
+   }
+   return result;
+}
+
+void ossimFgdcXmlDoc::close()
+{
+   m_xmlFilename = ossimFilename::NIL;
+   m_xmlDocument = 0;
+   m_projection  = 0;
+}
+
+ossimRefPtr<ossimProjection> ossimFgdcXmlDoc::getProjection()
+{
+   if ( (m_projection.valid() == false) && isOpen() )
+   {
+      ossimString projName;
+      if ( getProjCsn(projName) )
+      {
+         if (!projName.empty())
+         {
+            m_projection = ossimEpsgProjectionFactory::instance()->createProjection(projName);
+            
+            if ( m_projection.valid() )
+            {
+               ossimDpt gsd;
+               gsd.makeNan();
+               ossim_float64 d;
+               if ( getXRes(d) )
+               {
+                  gsd.x = std::fabs(d);
+               }
+               if ( getYRes(d) )
+               {
+                  gsd.y = std::fabs(d);
+               }
+               ossimMapProjection* mapProj = dynamic_cast<ossimMapProjection*>(m_projection.get());
+               if (mapProj)
+               {
+                  ossimDrect rect;
+                  getBoundingBox(rect);
+                  if (mapProj->isGeographic())
+                  {
+                     ossimGpt tie(rect.ul().lat, rect.ul().lon);
+                     mapProj->setUlTiePoints(tie);
+                     mapProj->setDecimalDegreesPerPixel(gsd);
+                  }
+                  else
+                  {
+                     ossimDpt tie(rect.ul().x, rect.ul().y);
+                     ossimUnitType unitType = getUnitType();
+                     if ( unitType == OSSIM_US_SURVEY_FEET)
+                     {
+                        gsd = gsd * US_METERS_PER_FT;
+                        tie = tie * US_METERS_PER_FT;
+                     }
+                     else if ( unitType == OSSIM_FEET )
+                     {
+                        gsd = gsd * MTRS_PER_FT;
+                        tie = tie * MTRS_PER_FT;
+                     }
+                        
+                     mapProj->setUlTiePoints(tie);
+                     mapProj->setMetersPerPixel(gsd);
+                  }
+               }
+            }
+         }
+      }
+   }
+   return m_projection;
+}
+
+ossimUnitType ossimFgdcXmlDoc::getUnitType() const
+{
+   ossimUnitType result = OSSIM_METERS; // default
+   ossimString units;
+   if ( getPlanarDistantUnits(units) )
+   {
+      units.downcase();
+      if ( units.contains("feet") )
+      {
+         if ( units.contains("international") )
+         {
+            result = OSSIM_FEET;
+         }
+         else
+         {
+            result = OSSIM_US_SURVEY_FEET; // Default for feet.
+         }
+      }
+   }
+   return result;
+}
+
+bool ossimFgdcXmlDoc::isOpen() const
+{
+   return m_xmlDocument.valid();
+}
+
+bool ossimFgdcXmlDoc::getGeoCsn(ossimString& s) const
+{
+   ossimString xpath = "/metadata/spref/horizsys/cordsysn/geogcsn";
+   return getPath(xpath, s);
+}
+
+bool ossimFgdcXmlDoc::getProjCsn(ossimString& s) const
+{
+   ossimString xpath = "/metadata/spref/horizsys/cordsysn/projcsn";
+   return getPath(xpath, s);
+}
+
+bool ossimFgdcXmlDoc::getAltitudeDistantUnits(ossimString& s) const
+{
+   ossimString xpath = "/metadata/spref/vertdef/altsys/altunits";
+   return getPath(xpath, s);
+}
+
+bool ossimFgdcXmlDoc::getGridCoordinateSystem(ossimString& s) const
+{
+   ossimString xpath = "/metadata/spref/horizsys/planar/gridsys/gridsysn";
+   return getPath(xpath, s);
+}
+
+ossimRefPtr<ossimProjection> ossimFgdcXmlDoc::getGridCoordSysProjection()
+{
+   static const char M[] = "ossimFgdcXmlDoc::getGridCoordSysProjection";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
+   }
+
+   if ( m_projection.valid() == false )
+   {
+      ossimString s;
+      if ( getGridCoordinateSystem(s) )
+      {
+         ossimString gridsysn = s.downcase();
+         if ( getHorizontalDatum(s) )
+         {
+            ossimString horizdn = s.downcase();
+            const ossimDatum* datum = createOssimDatum(s); // throws exception
+            
+            if ( gridsysn == "universal transverse mercator" )
+            {
+               // Get the zone:
+               if ( getUtmZone(s) )
+               {
+                  ossim_int32 zone = s.toInt32();
+
+                  //---
+                  // Note: Contruct with an origin with our datum.
+                  // "proj->setDatum" does not change the origin's datum.
+                  // This ensures theossimEpsgProjectionDatabase::findProjectionCode
+                  // sets the psc code correctly down the line.
+                  //---
+                  ossimRefPtr<ossimUtmProjection> utmProj =
+                     new ossimUtmProjection( *(datum->ellipsoid()), ossimGpt(0.0,0.0,0.0,datum) );
+                  utmProj->setDatum(datum);
+                  utmProj->setZone(zone);
+                  
+                  // Hemisphere( North false easting = 0.0, South = 10000000):
+                  bool tmpResult = getUtmFalseNorthing(s);
+                  if ( tmpResult && ( s != "0.0" ) )
+                  {
+                     utmProj->setHemisphere('S');
+                  }
+                  else
+                  {
+                     utmProj->setHemisphere('N');
+                  }
+                  utmProj->setPcsCode(0);
+
+                  ossim_float64 xRes = 0.0;
+                  ossim_float64 yRes = 0.0;
+                  if (getXRes(xRes) && getYRes(yRes))
+                  {
+                     ossimDrect rect;
+                     getBoundingBox(rect);
+
+                     ossimDpt gsd(std::fabs(xRes), std::fabs(yRes));
+                     ossimUnitType unitType = getUnitType();
+                   
+                     if (m_boundInDegree)
+                     {
+                        ossimGpt tieg(rect.ul().lat, rect.ul().lon);
+                        utmProj->setUlTiePoints(tieg);
+                     }
+                     else
+                     {
+                        ossimDpt tie(rect.ul().x, rect.ul().y);
+                        if ( unitType == OSSIM_US_SURVEY_FEET)
+                        {
+                           tie = tie * US_METERS_PER_FT;
+                        }
+                        else if ( unitType == OSSIM_FEET )
+                        {
+                           tie = tie * MTRS_PER_FT;
+                        }
+                        utmProj->setUlTiePoints(tie);
+                     }
+
+                     if ( unitType == OSSIM_US_SURVEY_FEET)
+                     {
+                        gsd = gsd * US_METERS_PER_FT;
+                     }
+                     else if ( unitType == OSSIM_FEET )
+                     {
+                        gsd = gsd * MTRS_PER_FT;
+                     }
+                     utmProj->setMetersPerPixel(gsd);
+                  }
+                  m_projection = utmProj.get(); // Capture projection.
+               }
+               else
+               {
+                  std::string errMsg = M;
+                  errMsg += " ERROR: Could not determine utm zone!";
+                  throw ossimException(errMsg);
+               }
+            }
+         }
+      }
+   }
+   
+   if ( traceDebug() )
+   {
+      if ( m_projection.valid() )
+      {
+         m_projection->print(ossimNotify(ossimNotifyLevel_DEBUG));
+      }
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exiting...\n";
+   }
+   return m_projection;
+}
+
+
+bool ossimFgdcXmlDoc::getHorizontalDatum(ossimString& s) const
+{
+   ossimString xpath = "/metadata/spref/horizsys/geodetic/horizdn";
+   return getPath(xpath, s);
+}
+
+bool ossimFgdcXmlDoc::getPlanarDistantUnits(ossimString& s) const
+{
+   ossimString xpath = "/metadata/spref/horizsys/planar/planci/plandu";
+   return getPath(xpath, s);
+}
+
+bool ossimFgdcXmlDoc::getUtmFalseNorthing(ossimString& s) const
+{
+   ossimString xpath = "/metadata/spref/horizsys/planar/gridsys/utm/transmer/fnorth";
+   return getPath(xpath, s); 
+}
+
+bool ossimFgdcXmlDoc::getUtmZone(ossimString& s) const
+{
+   ossimString xpath = "/metadata/spref/horizsys/planar/gridsys/utm/utmzone";
+   return getPath(xpath, s); 
+}
+
+bool ossimFgdcXmlDoc::getXRes(ossim_float64& v) const
+{
+   ossimString xpath = "/metadata/spdoinfo/rastinfo/rastxsz";
+   if (getPath(xpath, v) == false)
+   {
+      xpath = "/metadata/spref/horizsys/planar/planci/coordrep/absres";
+   }
+   return getPath(xpath, v);
+}
+
+bool ossimFgdcXmlDoc::getYRes(ossim_float64& v) const
+{
+   ossimString xpath = "/metadata/spdoinfo/rastinfo/rastysz";
+   if (getPath(xpath, v) == false)
+   {
+      xpath = "/metadata/spref/horizsys/planar/planci/coordrep/ordres";
+   }
+   return getPath(xpath, v);
+}
+
+bool ossimFgdcXmlDoc::getImageSize(ossimIpt& size) const
+{
+   bool result = false;
+   if (  m_xmlDocument.valid() )
+   {
+      ossimString xpath = "/metadata/spatRepInfo/GridSpatRep/axDimProps/Dimen/dimSize";
+      vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
+      m_xmlDocument->findNodes(xpath, xml_nodes);
+      if (xml_nodes.size() > 1)
+      {
+         size.x = xml_nodes[0]->getText().toInt32();
+         size.y = xml_nodes[1]->getText().toInt32();
+         result = true;
+      }
+
+      if (result == false)
+      {
+         xpath = "/metadata/spdoinfo/rastinfo/colcount";
+         ossim_float64 x = 0.0;
+         result = getPath(xpath, x);
+         if (result)
+         {
+            size.x = (ossim_int32)x;
+         }
+         xpath = "/metadata/spdoinfo/rastinfo/rowcount";
+         ossim_float64 y = 0.0;
+         result = getPath(xpath, y);
+         if (result)
+         {
+            size.y = (ossim_int32)y;
+         }
+      }
+   }
+   return result;
+}
+
+void ossimFgdcXmlDoc::getBoundingBox(ossimDrect& rect) const
+{
+   rect.makeNan();
+   
+   if (isOpen())
+   {
+      double ll_lat = 0.0;
+      double ll_lon = 0.0;
+      double lr_lat = 0.0;
+      double lr_lon = 0.0;
+      double ul_lat = 0.0;
+      double ul_lon = 0.0;
+      double ur_lat = 0.0;
+      double ur_lon = 0.0;
+     
+      ossimString xpath = "/metadata/idinfo/spdom/lboundng/leftbc";
+      bool result = getPath(xpath, ul_lon);
+      if (!result)
+      {
+         xpath = "/metadata/idinfo/spdom/bounding/westbc";
+         result = getPath(xpath, ul_lon);
+         m_boundInDegree = true;
+      }
+      if (result)
+      {
+         ll_lon = ul_lon;
+      }
+      
+      xpath = "/metadata/idinfo/spdom/lboundng/rightbc";
+      result = getPath(xpath, ur_lon);
+      if (!result)
+      {
+         xpath = "/metadata/idinfo/spdom/bounding/eastbc";
+         result = getPath(xpath, ur_lon);
+         m_boundInDegree = true;
+      }
+      if (result)
+      {
+         lr_lon = ur_lon;
+      }
+
+      xpath = "/metadata/idinfo/spdom/lboundng/bottombc";
+      result = getPath(xpath, ll_lat);
+      if (!result)
+      {
+         xpath = "/metadata/idinfo/spdom/bounding/southbc";
+         result = getPath(xpath, ll_lat);
+         m_boundInDegree = true;
+      }
+      if (result)
+      {
+         lr_lat = ll_lat;
+      }
+
+      xpath = "/metadata/idinfo/spdom/lboundng/topbc";
+      result = getPath(xpath, ul_lat);
+      if (!result)
+      {
+         xpath = "/metadata/idinfo/spdom/bounding/northbc";
+         result = getPath(xpath, ul_lat);
+         m_boundInDegree = true;
+      }
+      if (result)
+      {
+         ur_lat = ul_lat;
+      }
+      
+      rect = ossimDrect(ossimDpt(ul_lon, ul_lat),
+                        ossimDpt(ur_lon, ur_lat),
+                        ossimDpt(lr_lon, lr_lat),
+                        ossimDpt(ll_lon, ll_lat), OSSIM_RIGHT_HANDED); 
+   }
+}
+
+ossim_uint32 ossimFgdcXmlDoc::getNumberOfBands()
+{
+   ossim_uint32 numOfBands = 0;
+   ossimString s;
+   ossimString xpath = "/metadata/spdoinfo/rastinfo/vrtcount";
+   if (getPath(xpath, s))
+   {
+      numOfBands = s.toInt();
+   }
+   return numOfBands;
+}
+
+bool ossimFgdcXmlDoc::getPath(const ossimString& path, ossimString& s) const
+{
+   static const char M[] = "ossimFgdcXmlDoc::getPath";
+   
+   bool result = false;
+   if ( m_xmlDocument.valid() )
+   {
+      std::vector<ossimRefPtr<ossimXmlNode> > xnodes;
+      m_xmlDocument->findNodes(path, xnodes);
+      if ( xnodes.size() == 1 ) // Error if more than one.
+      {
+         if ( xnodes[0].valid() )
+         {
+            s = xnodes[0]->getText();
+            result = true;
+         }
+         else
+         {
+            if(traceDebug())
+            {
+               
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << M << " ERROR:\n"
+                  << "Node not found: " << path
+                  << std::endl;
+            }
+         }
+      }
+      else if ( xnodes.size() == 0 )
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN) << M << " ERROR:\nNode not found: " << path
+               << std::endl;
+         }
+      }
+      else
+      {
+         if(traceDebug())
+         {
+            
+            ossimNotify(ossimNotifyLevel_WARN)
+               << M << " ERROR:\nMultiple nodes found: " << path << std::endl;
+         }
+      }
+   }
+   if (!result)
+   {
+      s.clear();
+   }
+   return result;      
+}
+   
+bool ossimFgdcXmlDoc::getPath(const ossimString& path, ossim_float64& v) const
+{
+   ossimString s;
+   bool result = getPath(path, s);
+   if ( result )
+   {
+      v = s.toFloat64();
+   }
+   return result;
+}
+
+const ossimDatum* ossimFgdcXmlDoc::createOssimDatum(const ossimString& s) const
+{
+   ossimString horizdn = s.downcase();
+   ossimString datumCode;
+   if ( horizdn == "north american datum of 1983" )
+   {
+      datumCode = "NAR-C";
+   }
+   else if ( horizdn == "north american datum of 1927" )
+   {
+      datumCode = "NAS-C";
+   }
+   else if ( horizdn == "wgs84")
+   {
+      datumCode = "WGE";
+   }
+   else
+   {
+      std::string errMsg = "ossimFgdcXmlDoc::createOssimDatum ERROR: Unhandled datum: ";
+      errMsg += horizdn.string();
+      throw ossimException(errMsg);
+   }
+   return ossimDatumFactoryRegistry::instance()->create(datumCode);   
+}
+
diff --git a/src/ossim/support_data/ossimGeoTiff.cpp b/ossim/src/ossim/support_data/ossimGeoTiff.cpp
similarity index 100%
rename from src/ossim/support_data/ossimGeoTiff.cpp
rename to ossim/src/ossim/support_data/ossimGeoTiff.cpp
diff --git a/ossim/src/ossim/support_data/ossimGmlSupportData.cpp b/ossim/src/ossim/support_data/ossimGmlSupportData.cpp
new file mode 100644
index 0000000..7d7bdcc
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimGmlSupportData.cpp
@@ -0,0 +1,1092 @@
+//---
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: GML support data object.
+// 
+//---
+// $Id$
+
+#include <ossim/support_data/ossimGmlSupportData.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimGrect.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimXmlAttribute.h>
+#include <ossim/base/ossimXmlDocument.h>
+#include <ossim/base/ossimXmlNode.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/projection/ossimEpsgProjectionFactory.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/projection/ossimSensorModel.h>
+
+#include <iomanip>
+#include <sstream>
+
+static ossimTrace traceDebug("ossimGmlSupportData:debug");
+
+#define UNKNOWN_PCSCODE 32767
+
+ossimGmlSupportData::ossimGmlSupportData()
+   :
+   m_xmlDocument(0), m_mapProj(0), m_use_gmljp2_version2(true), 
+   m_pcsCodeMap(UNKNOWN_PCSCODE), m_pcsCodeGeo(UNKNOWN_PCSCODE),
+   m_srsNameStringMap("http://www.opengis.net/def/crs/EPSG/0/32767"),
+   m_srsNameStringGeo("http://www.opengis.net/def/crs/EPSG/0/32767"),
+   m_srsDimensionString("2"),
+   m_axisLabelsStringMap("X Y"), m_axisLabelsStringGeo("Lat Long"),
+   m_uomLabelsStringMap("m m"), m_uomLabelsStringGeo("deg deg")
+{
+}
+
+ossimGmlSupportData::~ossimGmlSupportData()
+{
+}
+
+bool ossimGmlSupportData::initialize( std::istream& in )
+{
+   bool status = false;
+   
+   if ( in.good() )
+   {
+      m_xmlDocument = new ossimXmlDocument();
+      m_xmlDocument->read( in );
+      
+      // TODO: Check for correct gml block.
+      
+      status = true;
+   }
+   else
+   {
+      m_xmlDocument = 0;
+   }
+   
+   return status;
+}
+
+bool ossimGmlSupportData::initialize( const ossimImageGeometry* geom )
+{
+   static const char MODULE[] = "ossimGmlSupportData::initialize(geom)";
+   
+   bool status = false;
+   
+   if ( geom )
+   {
+      // ossim_uint32 code = UNKNOWN_PCSCODE; // unknown code
+       
+      ossimRefPtr<const ossimProjection> proj = geom->getProjection();
+      if ( proj.valid() )
+      {
+         ossimRefPtr<const ossimMapProjection> mapProj =
+            dynamic_cast<const ossimMapProjection*>(proj.get());
+         if ( mapProj.valid() )
+         {
+            // Get the PCS code:
+            m_pcsCodeMap = mapProj->getPcsCode();
+            m_pcsCodeGeo = mapProj->getPcsCode();
+            m_mapProj    = mapProj;
+
+            // Create an SRS Name for the map projection
+            std::ostringstream os;
+            os << "http://www.opengis.net/def/crs/EPSG/0/" << m_pcsCodeMap;
+            m_srsNameStringMap = os.str();
+
+            // Create an SRS Name for the projection datum
+            std::ostringstream os2;
+            os2 << "http://www.opengis.net/def/crs/EPSG/0/" << m_pcsCodeGeo;
+            m_srsNameStringGeo = os2.str();
+
+            m_xmlDocument = new ossimXmlDocument(ossimFilename::NIL);
+
+            if ( m_use_gmljp2_version2 == true )
+            {
+               ossimRefPtr<ossimXmlNode> rootNode = getGmljp2V2RootNode();
+               m_xmlDocument->initRoot( rootNode );
+               status = configureGmljp2V2( rootNode, geom );
+            }
+            else
+            {
+               ossimRefPtr<ossimXmlNode> rootNode = getGmljp2V1RootNode();
+               m_xmlDocument->initRoot( rootNode );
+               status = configureGmljp2V1( rootNode, geom );
+            }
+
+            // cout << "gmljp2Node: " << *(gmljp2Node.get()) << endl;
+
+            // cout << "xmlDoc: " << *(m_xmlDocument.get()) << endl;
+         }
+      }
+
+      if ( status == false )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << " DEBUG Entered...\n";
+         
+      }
+   }
+
+   return status;
+   
+} // End: ossimGmlSupportData::initialize( geom, mapProj )
+
+bool ossimGmlSupportData::configureGmljp2V1( 
+   ossimRefPtr<ossimXmlNode> node0, const ossimImageGeometry* geom )
+{
+   bool success = true;
+   const ossimString BLANK = "";
+
+   ossimString gridHighString;
+   ossimString gridLowString;
+   getLimits( geom, gridHighString, gridLowString );
+
+   configureBounds( node0, geom );
+
+   ossimString path = "rectifiedGridDomain";
+   ossimRefPtr<ossimXmlNode> node2 = node0->addChildNode( path, BLANK );
+
+   path = "RectifiedGrid";
+   ossimRefPtr<ossimXmlNode> node2a = node2->addChildNode( path, BLANK );
+
+   ossimRefPtr<ossimXmlAttribute> attr1 = new ossimXmlAttribute();
+   ossimString name = "dimension";
+   ossimString value = "2";
+   attr1->setNameValue( name, value );
+   node2a->addAttribute( attr1 );
+
+   path = "limit";
+   ossimRefPtr<ossimXmlNode> node2a1 = node2a->addChildNode( path, BLANK );
+
+   path = "GridEnvelope"; 
+   ossimRefPtr<ossimXmlNode> node2a1a = node2a1->addChildNode( path, BLANK );
+
+   path = "low";
+   ossimRefPtr<ossimXmlNode> node2a1a1 = node2a1a->addChildNode( path, gridLowString );
+
+   path = "high";
+   ossimRefPtr<ossimXmlNode> node2a1a2 = node2a1a->addChildNode( path, gridHighString );
+
+   return success;
+}
+
+bool ossimGmlSupportData::configureGmljp2V2( 
+   ossimRefPtr<ossimXmlNode> node0, const ossimImageGeometry* geom )
+{
+   bool success = true;
+   const ossimString BLANK = "";
+
+   ossimRefPtr<ossimXmlAttribute> attr(0);
+   ossimString name;
+   ossimString value;
+
+   ossimString gridHighString;
+   ossimString gridLowString;
+   getLimits( geom, gridHighString, gridLowString );
+
+   configureBounds( node0, geom );
+
+   ossimString path = "domainSet";
+   ossimRefPtr<ossimXmlNode> node2 =
+      node0->addChildNode( path, BLANK );
+
+   path = "rangeSet";
+   ossimRefPtr<ossimXmlNode> node3 =
+      node0->addChildNode( path, BLANK );
+
+   path = "File";
+   ossimRefPtr<ossimXmlNode> node3a =
+      node3->addChildNode( path, BLANK );
+
+   path = "rangeParameters";
+   ossimRefPtr<ossimXmlNode> node3a1 =
+      node3a->addChildNode( path, BLANK );
+
+   path = "fileName";
+   ossimRefPtr<ossimXmlNode> node3a2 =
+      node3a->addChildNode( path, "gmljp2://codestream" );
+
+   path = "fileStructure";
+   ossimRefPtr<ossimXmlNode> node3a3 =
+      node3a->addChildNode( path, "inapplicable" );
+
+   path = "gmlcov:rangeType";
+   ossimRefPtr<ossimXmlNode> node4 =
+      node0->addChildNode( path, BLANK );
+
+   path = "gmljp2:featureMember";
+   ossimRefPtr<ossimXmlNode> node5 =
+      node0->addChildNode( path, BLANK );
+
+   path = "gmljp2:GMLJP2RectifiedGridCoverage";
+   ossimRefPtr<ossimXmlNode> node5a =
+      node5->addChildNode( path, BLANK );
+
+   attr  = new ossimXmlAttribute();
+   name  = "gml:id";
+   value = "CodeStream_0";
+   attr->setNameValue( name, value );
+   node5a->addAttribute( attr );
+
+   path = "domainSet";
+   ossimRefPtr<ossimXmlNode> node5a1 =
+      node5a->addChildNode( path, BLANK );
+
+   path = "RectifiedGrid";
+   ossimRefPtr<ossimXmlNode> node5a1a =
+      node5a1->addChildNode( path, BLANK );
+
+   attr  = new ossimXmlAttribute();
+   name  = "gml:id";
+   value = "RG0001";
+   attr->setNameValue( name, value );
+   node5a1a->addAttribute( attr );
+
+   attr  = new ossimXmlAttribute();
+   name  = "dimension";
+   value = "2";
+   attr->setNameValue( name, value );
+   node5a1a->addAttribute( attr );
+
+   attr  = new ossimXmlAttribute();
+   name  = "srsName";
+   attr->setNameValue( name, m_srsNameStringMap );
+   node5a1a->addAttribute( attr );
+
+   path = "limits";
+   ossimRefPtr<ossimXmlNode> node5a1a1 =
+      node5a1a->addChildNode( path, BLANK );
+
+   path = "GridEnvelope";
+   ossimRefPtr<ossimXmlNode> node5a1a1a =
+      node5a1a1->addChildNode( path, BLANK );
+
+   path = "low";
+   ossimRefPtr<ossimXmlNode> node5a1a1a1 =
+      node5a1a1a->addChildNode( path, gridLowString );
+
+   path = "high";
+   ossimRefPtr<ossimXmlNode> node5a1a1a2 =
+      node5a1a1a->addChildNode( path, gridHighString );
+
+   path = "axisLabels";
+   ossimRefPtr<ossimXmlNode> node5a1a2 =
+      node5a1a->addChildNode( path, 
+                              m_mapProj->isGeographic() ? 
+                              m_axisLabelsStringGeo : m_axisLabelsStringMap );
+
+   path = "origin";
+   ossimRefPtr<ossimXmlNode> node5a1a3 =
+      node5a1a->addChildNode( path, BLANK );
+
+   path = "Point";
+   ossimRefPtr<ossimXmlNode> node5a1a3a =
+      node5a1a3->addChildNode( path, BLANK );
+
+   attr  = new ossimXmlAttribute();
+   name  = "gml:id";
+   value = "P0001";
+   attr->setNameValue( name, value );
+   node5a1a3a->addAttribute( attr );
+
+   attr  = new ossimXmlAttribute();
+   name  = "srsName";
+   attr->setNameValue( name, m_srsNameStringMap );
+   node5a1a3a->addAttribute( attr );
+
+   ossimString originString;
+   ossimString offsetVector1String;
+   ossimString offsetVector2String;
+   getOrigin( geom, originString, 
+              offsetVector1String, 
+              offsetVector2String );
+
+   path = "pos";
+   ossimRefPtr<ossimXmlNode> node5a1a3a1 =
+      node5a1a3a->addChildNode( path, originString );
+
+   path = "offsetVector";
+   ossimRefPtr<ossimXmlNode> node5a1a4 =
+      node5a1a->addChildNode( path, offsetVector1String );
+
+   attr  = new ossimXmlAttribute();
+   name  = "srsName";
+   attr->setNameValue( name, 
+                       m_mapProj->isGeographic() ? 
+                       m_srsNameStringGeo : m_srsNameStringMap );
+   node5a1a4->addAttribute( attr );
+
+   path = "offsetVector";
+   ossimRefPtr<ossimXmlNode> node5a1a5 =
+      node5a1a->addChildNode( path, offsetVector2String );
+
+   attr  = new ossimXmlAttribute();
+   name  = "srsName";
+   attr->setNameValue( name, 
+                       m_mapProj->isGeographic() ? 
+                       m_srsNameStringGeo : m_srsNameStringMap );
+   node5a1a5->addAttribute( attr );
+
+   path = "rangeSet";
+   ossimRefPtr<ossimXmlNode> node5a2 =
+      node5a->addChildNode( path, BLANK );
+
+   path = "File";
+   ossimRefPtr<ossimXmlNode> node5a2a =
+      node5a2->addChildNode( path, BLANK );
+
+   path = "rangeParameters";
+   ossimRefPtr<ossimXmlNode> node5a2a1 =
+      node5a2a->addChildNode( path, BLANK );
+
+   path = "fileName";
+   ossimRefPtr<ossimXmlNode> node5a2a2 =
+      node5a2a->addChildNode( path, "gmljp2://codestream" );
+
+   path = "fileStructure";
+   ossimRefPtr<ossimXmlNode> node5a2a3 =
+      node5a2a->addChildNode( path, "inapplicable" );
+
+   return success;
+}
+
+bool ossimGmlSupportData::configureBounds(
+   ossimRefPtr<ossimXmlNode> node0, const ossimImageGeometry* geom )
+{
+   bool success = true;
+   const ossimString BLANK = "";
+
+   ossimString upperCornerString;         
+   ossimString lowerCornerString;
+   getGeoBounds( geom, upperCornerString, lowerCornerString );
+
+   ossimString path = "boundedBy";
+   ossimRefPtr<ossimXmlNode> node1 = node0->addChildNode( path, BLANK );
+
+   path = "Envelope";
+   ossimRefPtr<ossimXmlNode> node1a = node1->addChildNode( path, BLANK );
+
+   ossimRefPtr<ossimXmlAttribute> attr( 0 );
+   ossimString name;
+
+   attr = new ossimXmlAttribute();
+   name = "srsName";
+   attr->setNameValue( name, m_srsNameStringGeo );
+   node1a->addAttribute( attr );
+
+   attr = new ossimXmlAttribute();
+   name = "axisLabels";
+   attr->setNameValue( name, m_axisLabelsStringGeo );
+   node1a->addAttribute( attr );
+
+   attr = new ossimXmlAttribute();
+   name = "uomLabels";
+   attr->setNameValue( name, m_uomLabelsStringGeo );
+   node1a->addAttribute( attr );
+
+   attr = new ossimXmlAttribute();
+   name = "srsDimension";
+   attr->setNameValue( name, m_srsDimensionString );
+   node1a->addAttribute( attr );
+
+   path = "lowerCorner";
+   ossimRefPtr<ossimXmlNode> node1a1 =
+      node1a->addChildNode( path, lowerCornerString );
+
+   path = "upperCorner";
+   ossimRefPtr<ossimXmlNode> node1a2 =
+      node1a->addChildNode( path, upperCornerString );
+
+   return success;
+}
+
+ossimRefPtr<ossimXmlNode> ossimGmlSupportData::getGmljp2V2RootNode() const
+{
+   ossimRefPtr<ossimXmlNode> node = new ossimXmlNode();
+
+   ossimString os = "gmljp2:GMLJP2CoverageCollection";
+   node->setTag( os );
+
+   ossimRefPtr<ossimXmlAttribute> attr( 0 );
+   ossimString name;
+   ossimString value;
+
+   attr = new ossimXmlAttribute();
+   name = "gml:id";
+   value = "JPEG2000_0";
+   attr->setNameValue( name, value );
+   node->addAttribute( attr );
+
+   attr = new ossimXmlAttribute();
+   name = "xmlns";
+   value = "http://www.opengis.net/gml/3.2";
+   attr->setNameValue( name, value );
+   node->addAttribute( attr );
+
+   attr = new ossimXmlAttribute();   
+   name = "xmlns:gml";
+   value = "http://www.opengis.net/gml/3.2";
+   attr->setNameValue( name, value );
+   node->addAttribute( attr );
+
+   attr = new ossimXmlAttribute();   
+   name = "xmlns:gmlcov";
+   value = "http://www.opengis.net/gmlcov/1.0";
+   attr->setNameValue( name, value );
+   node->addAttribute( attr );
+
+   attr = new ossimXmlAttribute();   
+   name = "xmlns:gmljp2";
+   value = "http://www.opengis.net/gmljp2/2.0";
+   attr->setNameValue( name, value );
+   node->addAttribute( attr );
+
+   attr = new ossimXmlAttribute();     
+   name = "xmlns:xsi";
+   value = "http://www.w3.org/2001/XMLSchema-instance";
+   attr->setNameValue( name, value );
+   node->addAttribute( attr );
+      
+   attr = new ossimXmlAttribute();   
+   name = "xsi:schemaLocation";
+   value = "http://www.opengis.net/gmljp2/2.0 http://schemas.opengis.net/gmljp2/2.0/gmljp2.xsd";
+   attr->setNameValue( name, value );
+   node->addAttribute( attr );
+
+   return node;
+   
+} // ossimGmlSupportData::getGmljp2V2Node()
+
+ossimRefPtr<ossimXmlNode> ossimGmlSupportData::getGmljp2V1RootNode() const
+{
+   ossimRefPtr<ossimXmlNode> node = new ossimXmlNode();
+
+   ossimString os = "gml:FeatureCollection";
+   node->setTag( os );
+
+   ossimRefPtr<ossimXmlAttribute> attr(0);
+   ossimString name;
+   ossimString value;
+   
+   attr = new ossimXmlAttribute();
+   name = "xmlns";
+   value = "http://www.opengis.net/gml";
+   attr->setNameValue( name, value );
+   node->addAttribute( attr );
+
+   attr = new ossimXmlAttribute();   
+   name = "xmlns:gml";
+   value = "http://www.opengis.net/gml";
+   attr->setNameValue( name, value );
+   node->addAttribute( attr );
+
+   attr = new ossimXmlAttribute();     
+   name = "xmlns:xsi";
+   value = "http://www.w3.org/2001/XMLSchema-instance";
+   attr->setNameValue( name, value );
+   node->addAttribute( attr );
+      
+   attr = new ossimXmlAttribute();   
+   name = "xsi:schemaLocation";
+   value = "http://www.opengis.net/gml gmlJP2Profile.xsd";
+   attr->setNameValue( name, value );
+   node->addAttribute( attr );
+
+   return node;
+   
+} // ossimGmlSupportData::getGmljp2V1Node()
+
+bool ossimGmlSupportData::write(std::ostream& os)
+{
+   bool status = false;
+   
+   if ( m_xmlDocument.valid() )
+   {
+      os << *(m_xmlDocument.get());
+      
+      status = true;
+   }
+
+   return status;
+}
+
+ossimRefPtr<ossimXmlDocument> ossimGmlSupportData::getXmlDoc() const
+{
+   return m_xmlDocument;
+}
+
+bool ossimGmlSupportData::getImageGeometry( ossimKeywordlist& geomKwl ) const
+{
+   bool success = true;
+   
+   if ( m_xmlDocument.valid() )
+   {
+      vector< ossimRefPtr<ossimXmlNode> > xml_nodes;
+      bool gotSensorImage    = false;
+      bool gotRectifiedImage = false;
+      ossim_uint32 pcsCodeGrid = 32767; // only applies to rectified
+
+      // Check the GMLJP2CoverageCollection attributes for the default namespace.
+      ossimString defaultNamespaceStr( "" );
+      ossimString xpath_root = "/gmljp2:GMLJP2CoverageCollection";
+      xml_nodes.clear();
+      m_xmlDocument->findNodes( xpath_root, xml_nodes );
+      if ( xml_nodes.size() == 0 ) 
+      {
+          // check if the default namespace is gmljp2
+          xpath_root = "/GMLJP2CoverageCollection";
+          m_xmlDocument->findNodes( xpath_root, xml_nodes );
+      }
+      if ( xml_nodes.size() >= 1 )
+      {
+         const ossimString defaultNamespaceIdentifierStr( "xmlns" );
+         ossimString defaultNamespacePrependStr = defaultNamespaceIdentifierStr + ":";
+
+         const ossimRefPtr<ossimXmlAttribute> defaultNamespaceAttribute = xml_nodes[0]->findAttribute( defaultNamespaceIdentifierStr );
+         ossimString defaultNamespaceSettingStr = defaultNamespaceAttribute->getValue();
+
+         // search for the attribute value in the other attributes
+         const ossimXmlNode::AttributeListType& attributeList = xml_nodes[0]->getAttributes();
+         size_t nAttributes = attributeList.size();
+         for ( size_t i=0; i<nAttributes; ++i )
+         {
+            const ossimRefPtr<ossimXmlAttribute> attribute = attributeList[i];
+         
+            const ossimString& attribute_name  = attribute->getName();
+            const ossimString& attribute_value = attribute->getValue();
+
+            if ( attribute_name  != defaultNamespaceIdentifierStr && 
+                 attribute_value == defaultNamespaceSettingStr )
+            {
+                defaultNamespaceStr = attribute_name.after( defaultNamespacePrependStr );
+                defaultNamespaceStr += ":";
+            }
+         }
+      }
+       
+      // Check for a sensor image
+      ossimString xpath0 = "/gmljp2:GMLJP2CoverageCollection/gmljp2:featureMember/gmljp2:GMLJP2ReferenceableGridCoverage/gml:domainSet/gmlcov:ReferenceableGridBySensorModel";
+      xpath0 = xpath0.replaceAllThatMatch( defaultNamespaceStr.c_str(), "" );
+      xml_nodes.clear();
+      m_xmlDocument->findNodes( xpath0, xml_nodes );
+      if ( xml_nodes.size() >= 1 )
+      {
+         // we've got a sensor model image
+         gotSensorImage = true;
+      }
+      else
+      {
+         const ossimString srsNameStr( "srsName" );
+         ossimString pcsCodeDefinitionStr( "http://www.opengis.net/def/crs/EPSG/0/" );
+
+         xpath0 = "/gmljp2:GMLJP2CoverageCollection/gmljp2:featureMember/gmljp2:GMLJP2RectifiedGridCoverage/gml:domainSet/gml:RectifiedGrid";
+         xpath0 = xpath0.replaceAllThatMatch( defaultNamespaceStr.c_str(), "" );
+         xml_nodes.clear();
+         m_xmlDocument->findNodes( xpath0, xml_nodes );
+         if ( xml_nodes.size() >= 1 )
+         {
+            // we've got a rectified image
+            gotRectifiedImage = true;
+
+            const ossimRefPtr<ossimXmlAttribute> hrefAttribute = xml_nodes[0]->findAttribute( srsNameStr );
+            const ossimString& originSrsName = hrefAttribute->getValue();
+            ossimString pcsCodeGridStr = originSrsName.after( pcsCodeDefinitionStr.string() );
+            pcsCodeGrid = pcsCodeGridStr.toUInt32();
+            if ( pcsCodeGrid != 32767 )
+            {
+               //---
+               // The ossimEpsgProjectionFactory will not pick up the origin latitude if code is
+               // 4326 (geographic) so we use the projection name; else, the origin_latitude will
+               // always be 0.  This is so the gsd comes out correct for scale.
+               //---
+               if ( pcsCodeGrid != 4326 ) // map projection
+               {
+                  // Add the pcs code.
+                  geomKwl.add( ossimKeywordNames::PCS_CODE_KW,
+                               pcsCodeGridStr.c_str() );
+               }
+               else // geographic
+               {
+                  geomKwl.add( ossimKeywordNames::TYPE_KW, 
+                               ossimString( "ossimEquDistCylProjection" ) );
+               }
+            }
+         }
+      }
+
+      /* Number of lines & samples, for either sensor or rectified imagery */
+
+      ossimString xpath_limits_low  = "/gml:limits/gml:GridEnvelope/gml:low";
+      ossimString xpath_limits_high = "/gml:limits/gml:GridEnvelope/gml:high";
+
+      xpath_limits_low  = xpath_limits_low.replaceAllThatMatch( defaultNamespaceStr.c_str(), "" );
+      xpath_limits_high = xpath_limits_high.replaceAllThatMatch( defaultNamespaceStr.c_str(), "" );
+
+      bool gotLow = false;
+      ossim_int32 lowX, lowY;
+      ossimString xpath = xpath0 + xpath_limits_low;
+      xml_nodes.clear();
+      m_xmlDocument->findNodes( xpath, xml_nodes );
+      if ( xml_nodes.size() == 1 )
+      {
+         const ossimString& lowerCorner = xml_nodes[0]->getText();
+         size_t spacePos = lowerCorner.find( ' ' );
+         ossimString lowerXString = lowerCorner.beforePos( spacePos );
+         ossimString lowerYString = lowerCorner.afterPos ( spacePos );
+         lowX = lowerXString.toInt32();
+         lowY = lowerYString.toInt32();
+         gotLow = true;
+      }
+
+      bool gotHigh = false;
+      ossim_int32 highX = 0;
+      ossim_int32 highY = 0;
+      xpath = xpath0 + xpath_limits_high;
+      xml_nodes.clear();
+      m_xmlDocument->findNodes( xpath, xml_nodes );
+      if ( xml_nodes.size() == 1 )
+      {
+         const ossimString& higherCorner = xml_nodes[0]->getText();
+         size_t spacePos = higherCorner.find( ' ' );
+         ossimString higherXString = higherCorner.beforePos( spacePos );
+         ossimString higherYString = higherCorner.afterPos ( spacePos );
+         highX = higherXString.toInt32();
+         highY = higherYString.toInt32();
+         gotHigh = true;
+      }
+
+      if ( gotHigh && gotLow )
+      {
+         geomKwl.add( ossimKeywordNames::NUMBER_LINES_KW,   highY - lowY + 1 );
+         geomKwl.add( ossimKeywordNames::NUMBER_SAMPLES_KW, highX - lowX + 1 );
+      }
+
+      if ( gotSensorImage )
+      {
+         const ossimString hrefStr( "xlink:href" );
+         const ossimString codeSpaceStr( "codeSpace" );
+
+         ossimString sensorModelHref( "" );
+         ossimString xpath_sensor_model = "/gmlcov:sensorModel";
+         xpath_sensor_model = xpath_sensor_model.replaceAllThatMatch( defaultNamespaceStr.c_str(), "" );
+         xpath = xpath0 + xpath_sensor_model;
+         xml_nodes.clear();
+         m_xmlDocument->findNodes( xpath, xml_nodes );
+         if ( xml_nodes.size() == 1 )
+         {
+            const ossimRefPtr<ossimXmlAttribute> hrefAttribute = xml_nodes[0]->findAttribute( hrefStr );
+            sensorModelHref = hrefAttribute->getValue();
+         }
+
+         ossimString sensorInstanceHref( "" );
+         ossimString xpath_sensor_typeOf = "/gmlcov:sensorInstance/sml:SimpleProcess/sml:typeOf";
+         xpath_sensor_typeOf = xpath_sensor_typeOf.replaceAllThatMatch( defaultNamespaceStr.c_str(), "" );
+         xpath = xpath0 + xpath_sensor_typeOf;
+         xml_nodes.clear();
+         m_xmlDocument->findNodes( xpath, xml_nodes );
+         if ( xml_nodes.size() == 1 )
+         {
+            const ossimRefPtr<ossimXmlAttribute> hrefAttribute = xml_nodes[0]->findAttribute( hrefStr );
+            sensorInstanceHref = hrefAttribute->getValue();
+         }
+
+         ossimSensorModel* sensor_model = 0;
+         ossimString xpath_sensor_name = "/gmlcov:sensorInstance/sml:SimpleProcess/gml:name";
+         xpath_sensor_name = xpath_sensor_name.replaceAllThatMatch( defaultNamespaceStr.c_str(), "" );
+         xpath = xpath0 + xpath_sensor_name;
+         xml_nodes.clear();
+         m_xmlDocument->findNodes( xpath, xml_nodes );
+         int nSensorNames = (int)xml_nodes.size();
+         for ( int i=0; i<nSensorNames; ++i )
+         {
+            const ossimString& sensorName = xml_nodes[i]->getText();
+
+            ossimProjectionFactoryRegistry* registry = ossimProjectionFactoryRegistry::instance();
+            ossimProjection* proj = registry->createProjection( sensorName );
+
+            // Is it a sensor model ?
+            sensor_model = dynamic_cast<ossimSensorModel*>( proj );
+            if ( sensor_model != 0 )
+            {
+               geomKwl.add( ossimKeywordNames::TYPE_KW, sensorName.c_str() );
+               break;
+            }
+         }
+         if ( sensor_model == 0 )
+         {
+            // Add debug message
+            return false;
+         }
+
+         // Check if the sensor instance is typeOf the sensor model
+         if ( sensorModelHref == sensorInstanceHref )
+         {
+            const ossimString refStr( "ref" );
+
+            /* sml:setValue */
+            ossimString xpath_setValue = "/gmlcov:sensorInstance/sml:SimpleProcess/sml:configuration/sml:Settings/sml:setValue";
+            xpath_setValue = xpath_setValue.replaceAllThatMatch( defaultNamespaceStr.c_str(), "" );
+            xpath = xpath0 + xpath_setValue;
+            xml_nodes.clear();
+            m_xmlDocument->findNodes( xpath, xml_nodes );
+            size_t nXmlNodes = xml_nodes.size();
+            for( size_t i=0; i<nXmlNodes; ++i )
+            {
+               const ossimString& elementValue = xml_nodes[i]->getText();
+
+               const ossimRefPtr<ossimXmlAttribute> refAttribute = xml_nodes[i]->findAttribute( refStr );
+               const ossimString& settingsRef = refAttribute->getValue();
+
+               bool successSetValue = sensor_model->getImageGeometry( settingsRef, elementValue, geomKwl );
+               success &= successSetValue;
+               if ( !successSetValue )
+               {
+                  // Add debug message
+               }
+            }
+
+            /* sml:setArrayValues */
+            ossimString xpath_setArrayValues = "/gmlcov:sensorInstance/sml:SimpleProcess/sml:configuration/sml:Settings/sml:setArrayValues";
+            xpath_setArrayValues = xpath_setArrayValues.replaceAllThatMatch( defaultNamespaceStr.c_str(), "" );
+            xpath = xpath0 + xpath_setArrayValues;
+            xml_nodes.clear();
+            m_xmlDocument->findNodes( xpath, xml_nodes );
+            nXmlNodes = xml_nodes.size();
+            for( size_t i=0; i<nXmlNodes; ++i )
+            {
+               ossimString elementValue( "" );
+
+               const ossimRefPtr<ossimXmlAttribute> refAttribute = xml_nodes[i]->findAttribute( refStr );
+               const ossimString& settingsRef = refAttribute->getValue();
+
+               const ossimXmlNode::ChildListType& children = xml_nodes[i]->getChildNodes();
+               if ( children.size() > 0 )
+               {
+                  const ossimXmlNode::ChildListType& grandchildren = children[0]->getChildNodes();
+                   
+                  if ( (grandchildren.size() > 1) && (grandchildren[1]->getTag() == ossimString( "sml:value")) )
+                  {
+                     elementValue = grandchildren[1]->getText();
+                  }
+               }
+
+               bool successSetArrayValues = sensor_model->getImageGeometry( settingsRef, elementValue, geomKwl );
+               success &= successSetArrayValues;
+               if ( !successSetArrayValues )
+               {
+                  // Add debug message
+               }
+            }
+         }
+      }
+      else
+         if ( gotRectifiedImage )
+         {
+            const ossimString srsNameStr( "srsName" );
+            ossimString pcsCodeDefinitionStr( "http://www.opengis.net/def/crs/EPSG/0/" );
+
+            /* axis labels for rectified imagery */
+
+            ossimString xpath_axisLabels = "/gml:axisLabels";
+            xpath_axisLabels = xpath_axisLabels.replaceAllThatMatch( defaultNamespaceStr.c_str(), "" );
+            ossimString firstAxisLabelString( "" );
+            ossimString secondAxisLabelString( "" );
+            ossimString xpath = xpath0 + xpath_axisLabels;
+            xml_nodes.clear();
+            m_xmlDocument->findNodes( xpath, xml_nodes );
+            if ( xml_nodes.size() == 1 )
+            {
+               const ossimString& axisLabelsString = xml_nodes[0]->getText();
+               size_t spacePos = axisLabelsString.find( ' ' );
+               firstAxisLabelString  = axisLabelsString.beforePos( spacePos );
+               secondAxisLabelString = axisLabelsString.afterPos ( spacePos );
+            }
+
+            /* origin */
+
+            ossim_uint32 pcsCodeOrigin = 32767;
+            ossimString xpath_originPoint = "/gml:origin/gml:Point";
+            xpath_originPoint = xpath_originPoint.replaceAllThatMatch( defaultNamespaceStr.c_str(), "" );
+            xpath = xpath0 + xpath_originPoint;
+            xml_nodes.clear();
+            m_xmlDocument->findNodes( xpath, xml_nodes );
+            if ( xml_nodes.size() == 1 )
+            {
+               const ossimString& originString = xml_nodes[0]->getChildTextValue( ossimString( "pos" ) );
+               size_t spacePos = originString.find( ' ' );
+               ossimString firstOriginString  = originString.beforePos( spacePos );
+               ossimString secondOriginString = originString.afterPos ( spacePos );
+
+               const ossimRefPtr<ossimXmlAttribute> hrefAttribute = xml_nodes[0]->findAttribute( srsNameStr );
+               const ossimString& originSrsName = hrefAttribute->getValue();
+               ossimString pcsCodeOriginStr = originSrsName.after( pcsCodeDefinitionStr.string() );
+               pcsCodeOrigin = pcsCodeOriginStr.toUInt32();
+               if ( pcsCodeOrigin != 32767 )
+               {
+                  if ( pcsCodeOrigin != 4326 ) // map projection
+                  {
+                     /* Convert to geographic */
+                  }
+
+                  if ( firstAxisLabelString == ossimString( "Lat" ) )
+                  {
+                     geomKwl.add( ossimKeywordNames::ORIGIN_LATITUDE_KW, 
+                                  firstOriginString.c_str() );
+                     geomKwl.add( ossimKeywordNames::CENTRAL_MERIDIAN_KW, 
+                                  secondOriginString.c_str() );
+                  }
+                  else
+                  {
+                     geomKwl.add( ossimKeywordNames::ORIGIN_LATITUDE_KW, 
+                                  secondOriginString.c_str() );
+                     geomKwl.add( ossimKeywordNames::CENTRAL_MERIDIAN_KW, 
+                                  firstOriginString.c_str() );
+                  }
+               }
+            }
+
+            /* offset vector */
+
+            ossimString xpath_offsetVector = "/gml:offsetVector";
+            xpath_offsetVector = xpath_offsetVector.replaceAllThatMatch( defaultNamespaceStr.c_str(), "" );
+            xpath = xpath0 + xpath_offsetVector;
+            xml_nodes.clear();
+            m_xmlDocument->findNodes( xpath, xml_nodes );
+            size_t nNodes = xml_nodes.size();
+            for ( size_t i=0; i<nNodes; ++i )
+            {
+               const ossimString& offsetVectorString = xml_nodes[i]->getText();
+               size_t spacePos = offsetVectorString.find( ' ' );
+               ossimString firstOffsetVectorString  = offsetVectorString.beforePos( spacePos );
+               ossimString secondOffsetVectorString = offsetVectorString.afterPos ( spacePos );
+
+               const ossimRefPtr<ossimXmlAttribute> hrefAttribute = xml_nodes[i]->findAttribute( srsNameStr );
+               const ossimString& offsetVectorSrsName = hrefAttribute->getValue();
+               ossimString pcsCodeOffsetVectorStr = offsetVectorSrsName.after( pcsCodeDefinitionStr.string() );
+               ossim_uint32 pcsCodeOffsetVector = pcsCodeOffsetVectorStr.toUInt32();
+               if ( pcsCodeOffsetVector == 4326 )
+               {
+                  if ( firstAxisLabelString == ossimString( "Lat" ) )
+                  {
+                     if ( firstOffsetVectorString.toDouble() != 0.0 )
+                     {    
+                        geomKwl.add( ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT, 
+                                     firstOffsetVectorString.c_str() );
+                     }
+                     else
+                     {
+                        geomKwl.add( ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON, 
+                                     secondOffsetVectorString.c_str() );
+                     }
+                  }
+                  else
+                  {
+                     if ( firstOffsetVectorString.toDouble() != 0.0 )
+                     { 
+                        geomKwl.add( ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON, 
+                                     firstOffsetVectorString.c_str() );
+                     }
+                     else
+                     {
+                        geomKwl.add( ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT, 
+                                     secondOffsetVectorString.c_str() );
+                     }
+                  }
+               }
+               else // map projection
+                  if ( pcsCodeOffsetVector == pcsCodeGrid )
+                  {
+                     if ( firstAxisLabelString == ossimString( "X" ) )
+                     {
+                        if ( firstOffsetVectorString.toDouble() != 0.0 )
+                        {    
+                           geomKwl.add( ossimKeywordNames::METERS_PER_PIXEL_X_KW, 
+                                        firstOffsetVectorString.c_str() );
+                        }
+                        else
+                        {
+                           geomKwl.add( ossimKeywordNames::METERS_PER_PIXEL_Y_KW, 
+                                        secondOffsetVectorString.c_str() );
+                        }
+                     }
+                     else
+                     {
+                        if ( firstOffsetVectorString.toDouble() != 0.0 )
+                        { 
+                           geomKwl.add( ossimKeywordNames::METERS_PER_PIXEL_Y_KW, 
+                                        firstOffsetVectorString.c_str() );
+                        }
+                        else
+                        {
+                           geomKwl.add( ossimKeywordNames::METERS_PER_PIXEL_X_KW, 
+                                        secondOffsetVectorString.c_str() );
+                        }
+                     }
+                  }
+                  else
+                  {
+                     /*
+                       Need to perform a coordinate conversion on the 
+                       offset vector to the pcs code of the grid
+                     */
+                  }
+            }
+         }
+   }
+
+   return success;
+   
+} // End: ossimGmlSupportData::getImageGeometry( geoKwl )
+
+
+void ossimGmlSupportData::getOrigin( 
+   const ossimImageGeometry* geom,
+   ossimString& originString,
+   ossimString& offsetVector1String, 
+   ossimString& offsetVector2String ) const
+{
+   if ( m_mapProj != 0 )
+   {
+      // In meters or decimal degrees.
+      if ( m_mapProj->isGeographic() )
+      {
+         getGeoOrigin( geom, originString, 
+                       offsetVector1String, offsetVector2String );
+      }
+      else
+      {
+         getMapOrigin( geom, originString, 
+                       offsetVector1String, offsetVector2String );
+      }
+   }
+} // End: ossimGmlSupportData::getOrigin
+
+
+void ossimGmlSupportData::getGeoBounds( const ossimImageGeometry* geom,
+                                        ossimString& upperCornerString,
+                                        ossimString& lowerCornerString ) const
+{
+   if ( geom != 0 && m_mapProj != 0 )
+   {
+      // Get the bounding rect:
+      ossimGrect rect;
+      geom->getBoundingGroundRect( rect );
+      
+      ossimDpt upperEdge( rect.ul().lon, rect.ul().lat );
+      ossimDpt lowerEdge( rect.lr().lon, rect.lr().lat );
+
+      std::ostringstream os;
+      os.precision(5);
+      os << upperEdge.lat << " " << upperEdge.lon;
+      upperCornerString = os.str();
+      
+      std::ostringstream os2;
+      os2.precision(5);
+      os2 << lowerEdge.lat << " " << lowerEdge.lon;
+      lowerCornerString = os2.str();
+   }
+   
+} // End: ossimGmlSupportData::getGeoBounds
+
+void ossimGmlSupportData::getGeoOrigin( 
+   const ossimImageGeometry* geom,
+   ossimString& originString,
+   ossimString& offsetVector1String, 
+   ossimString& offsetVector2String ) const
+{
+   if ( geom )
+   {
+      // Get the gsd and bounding rect:
+      ossimDpt gsd;
+      ossimGrect rect;
+      geom->getDegreesPerPixel( gsd );
+      geom->getBoundingGroundRect( rect );
+
+      ossimDpt halfGsd = gsd/2.0;
+      ossimDpt upperEdge( rect.ul().lon + halfGsd.x, rect.ul().lat + halfGsd.y );
+
+      std::ostringstream os;
+      os.precision(15);
+      os << upperEdge.lat << " " << upperEdge.lon;
+      originString = os.str();
+
+      std::ostringstream os2;
+      os2.precision(15);
+      os2 << -gsd.y << " " << "0.0";
+      offsetVector1String = os2.str();
+
+      std::ostringstream os3;
+      os3.precision(15);
+      os3 << "0.0" << " " << gsd.x;
+      offsetVector2String = os3.str();
+   }
+
+} // End: ossimGmlSupportData::getGeoOrigin
+
+
+void ossimGmlSupportData::getMapOrigin( 
+   const ossimImageGeometry* geom,
+   ossimString& originString,
+   ossimString& offsetVector1String, 
+   ossimString& offsetVector2String ) const
+{
+   if ( geom )
+   {
+      if ( m_mapProj != 0 )
+      {
+         ossimDpt originMap = m_mapProj->getUlEastingNorthing();
+
+         std::ostringstream os;
+         os.precision(15);
+         os << originMap.x << " " << originMap.y;
+         originString = os.str();   
+      }
+
+      // Get the projected CS gsd:
+      ossimDpt gsdMap;
+      geom->getMetersPerPixel( gsdMap );
+
+      std::ostringstream os2;
+      os2.precision(15);
+      os2 << gsdMap.x << " " << "0.0";
+      offsetVector1String = os2.str();
+
+      std::ostringstream os3;
+      os3.precision(15);
+      os3 << "0.0" << " " << -gsdMap.y;
+      offsetVector2String = os3.str();
+   }
+
+} // End: ossimGmlSupportData::getMapBounds
+
+void ossimGmlSupportData::getLimits( const ossimImageGeometry* geom,
+                                     ossimString& gridHighString,
+                                     ossimString& gridLowString ) const
+{
+   if ( geom )
+   {
+      // Get the image bounding rect:
+      ossimIrect rect;
+      geom->getBoundingRect( rect );
+      
+      if ( rect.hasNans() == false )
+      {
+         std::ostringstream os;
+         os << rect.ul().x << " " << rect.ul().y;
+         gridLowString = os.str();
+         
+         std::ostringstream os2;
+         os2 << rect.lr().x << " " << rect.lr().y;
+         gridHighString = os2.str();
+      }
+   }
+   
+}
+
diff --git a/ossim/src/ossim/support_data/ossimIkonosMetaData.cpp b/ossim/src/ossim/support_data/ossimIkonosMetaData.cpp
new file mode 100644
index 0000000..b72cbb9
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimIkonosMetaData.cpp
@@ -0,0 +1,600 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Description:
+// 
+// Class definition for ossimIkonosMetaData.
+// 
+// This class parses a Space Imaging Ikonos meta data file.
+//
+//********************************************************************
+// $Id: ossimIkonosMetaData.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstdio>
+#include <iostream>
+#include <ossim/support_data/ossimIkonosMetaData.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimTrace.h>
+
+RTTI_DEF1(ossimIkonosMetaData, "ossimIkonosMetaData", ossimObject);
+
+// Define Trace flags for use within this file:
+static ossimTrace traceExec  ("ossimIkonosMetaData:exec");
+static ossimTrace traceDebug ("ossimIkonosMetaData:debug");
+
+ossimIkonosMetaData::ossimIkonosMetaData()
+  :
+  theNominalCollectionAzimuth(0.0),
+  theNominalCollectionElevation(0.0),
+  theSunAzimuth(0.0),
+  theSunElevation(0.0),
+  theNumBands(0),
+  theBandName("Unknown"),
+  theProductionDate("Unknown"),
+  theAcquisitionDate("Unknown"),
+  theAcquisitionTime("Unknown"),
+  theSensorID("Unknown")
+{
+}
+
+ossimIkonosMetaData::~ossimIkonosMetaData()
+{
+}
+
+bool ossimIkonosMetaData::open(const ossimFilename& imageFile)
+{
+   static const char MODULE[] = "ossimIkonosMetaData::open";
+   
+   clearFields();
+   
+   //retrieve information from the metadata file
+   //if the ikonos tif is po_2619900_pan_0000000.tif
+   //the metadata file will be po_2619900_metadata.txt
+
+   ossimString separator("_");
+   ossimString filenamebase = imageFile.fileNoExtension();
+   std::vector< ossimString > filenameparts = filenamebase.split(separator);
+   
+   if(filenameparts.size() < 2)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << " Ikonos filename non standard" << std::endl;
+      }
+      return false;
+   }
+   ossimFilename metadatafile = filenameparts[0];
+   metadatafile += "_";
+   metadatafile += filenameparts[1];
+   metadatafile += "_metadata.txt";
+   
+   metadatafile.setPath(imageFile.path());
+   
+   if( parseMetaData(metadatafile) == false )
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << MODULE << " errors parsing metadata" << std::endl;
+      }
+      return false;
+   }
+   
+   ossimFilename hdrfile = imageFile;
+   hdrfile.setExtension(ossimString("hdr"));
+   if( parseHdrData(hdrfile) == false )
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << MODULE << " errors parsing hdr" << std::endl;
+      }
+      return false;
+   }
+   
+   ossimFilename rpcfile = imageFile.noExtension();
+   rpcfile += "_rpc.txt";
+   if (parseRpcData (rpcfile) == false)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << MODULE << " errors parsing rpc" << std::endl;
+      }
+      return false;
+   }
+
+   return true;
+}
+
+void ossimIkonosMetaData::clearFields()
+{
+  theNominalCollectionAzimuth = 0.0;
+  theNominalCollectionElevation = 0.0;
+  theSunAzimuth = 0.0;
+  theSunElevation = 0.0;
+  theNumBands = 0;
+  theBandName = "Unknown";
+  theProductionDate = "Unknown";
+  theAcquisitionDate = "Unknown";
+  theAcquisitionTime = "Unknown";
+  theSensorID = "Unknown";
+}
+
+std::ostream& ossimIkonosMetaData::print(std::ostream& out) const
+{
+
+  out << "\n----------------- Info on Ikonos Image -------------------"
+      << "\n  "
+      << "\n  Nominal Azimuth:    " << theNominalCollectionAzimuth
+      << "\n  Nominal Elevation:   " << theNominalCollectionElevation
+      << "\n  Sun Azimuth:    " << theSunAzimuth
+      << "\n  Sun Elevation:   " << theSunElevation
+      << "\n  Number of bands:   " << theNumBands
+      << "\n  Band name:   " << theBandName
+      << "\n  Production date:   " << theProductionDate
+      << "\n  Acquisition date:   " << theAcquisitionDate
+      << "\n  Acquisition time:   " << theAcquisitionTime
+      << "\n  Sensor Type:   " << theSensorID
+      << "\n"
+      << "\n---------------------------------------------------------"
+      << "\n  " << std::endl;
+  return out;
+}
+
+ossimString ossimIkonosMetaData::getSensorID() const
+{
+  return theSensorID;
+}
+
+bool ossimIkonosMetaData::saveState(ossimKeywordlist& kwl,
+                                    const char* prefix)const
+{
+
+  kwl.add(prefix,
+          ossimKeywordNames::TYPE_KW,
+          "ossimIkonosMetaData",
+          true);
+
+  kwl.add(prefix,
+          "nominal_collection_azimuth_angle",
+          theNominalCollectionAzimuth,
+          true);
+
+  kwl.add(prefix,
+          "nominal_collection_elevation_angle",
+          theNominalCollectionElevation,
+          true);
+          
+  kwl.add(prefix,
+          ossimKeywordNames::AZIMUTH_ANGLE_KW,
+          theSunAzimuth,
+          true);
+
+  kwl.add(prefix,
+          ossimKeywordNames::ELEVATION_ANGLE_KW,
+          theSunElevation,
+          true);
+
+  kwl.add(prefix,
+          ossimKeywordNames::NUMBER_BANDS_KW,
+          theNumBands,
+          true);
+
+  kwl.add(prefix,
+          "band_name",
+          theBandName,
+          true);
+
+  kwl.add(prefix,
+          "production_date",
+          theProductionDate,
+          true);
+
+  kwl.add(prefix,
+          "acquisition_date",
+          theAcquisitionDate,
+          true);
+
+  kwl.add(prefix,
+          "acquisition_time",
+          theAcquisitionTime,
+          true);
+
+  kwl.add(prefix,
+          "sensor",
+          theSensorID,
+          true);
+
+  return true;
+}
+
+bool ossimIkonosMetaData::loadState(const ossimKeywordlist& kwl,
+                                    const char* prefix)
+{
+   clearFields();
+
+   const char* lookup = 0;
+   ossimString s;
+  
+   lookup = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
+   if (lookup)
+   {
+      s = lookup;
+      if(s != "ossimIkonosMetaData")
+      {
+         return false;
+      }
+   }
+
+  lookup = kwl.find(prefix, "nominal_collection_azimuth_angle");
+  if (lookup)
+  {
+     s = lookup;
+     theNominalCollectionAzimuth = s.toFloat64();
+  }
+
+  lookup = kwl.find(prefix, "nominal_collection_elevation_angle");
+  if (lookup)
+  {
+     s = lookup;
+     theNominalCollectionElevation = s.toFloat64();
+  }
+  
+   lookup = kwl.find(prefix, ossimKeywordNames::AZIMUTH_ANGLE_KW);
+   if (lookup)
+   {
+      s = lookup;
+      theSunAzimuth = s.toFloat64();
+   }
+
+   lookup = kwl.find(prefix, ossimKeywordNames::ELEVATION_ANGLE_KW);
+   if (lookup)
+   {
+      s = lookup;
+      theSunElevation = s.toFloat64();
+   }
+  
+   lookup = kwl.find(prefix, ossimKeywordNames::NUMBER_BANDS_KW);
+   if (lookup)
+   {
+      s = lookup;
+      theNumBands = s.toUInt32();
+   }
+
+   lookup = kwl.find(prefix, "band_name");
+   if (lookup)
+   {
+      theBandName = lookup;
+   }
+
+   lookup = kwl.find(prefix, "production_date");
+   if (lookup)
+   {
+      theProductionDate = lookup;
+   }
+
+  lookup = kwl.find(prefix, "acquisition_date");
+  if (lookup)
+  {
+     theAcquisitionDate = lookup;
+  }
+
+  lookup = kwl.find(prefix, "acquisition_time");
+  if (lookup)
+  {
+     theAcquisitionTime = lookup;
+  }
+
+  lookup = kwl.find(prefix, "sensor");
+  if (lookup)
+  {
+     theSensorID = lookup;
+  }
+  
+   return true;
+}
+
+//*****************************************************************************
+// PROTECTED METHOD: ossimIkonosMetaData::parseMetaData()
+//
+//  Parses the Ikonos metadata file.
+//
+//*****************************************************************************
+bool ossimIkonosMetaData::parseMetaData(const ossimFilename& data_file)
+{
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimIkonosRpcModel::parseMetaData(data_file): entering..."
+         << std::endl;
+   }
+
+   FILE* fptr = fopen (data_file, "r");
+   if (!fptr)
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimIkonosRpcModel::parseMetaData(data_file) DEBUG:"
+            << "\nCould not open Meta data file:  " << data_file
+            << "\nreturning with error..." << std::endl;
+      }
+      return false;
+   }
+
+   char* strptr;
+   char dummy[80], name[80];
+   double value;
+
+   //---
+   // Read the file into a buffer:
+   //---
+   ossim_int32 fileSize = static_cast<ossim_int32>(data_file.fileSize());
+   char* filebuf = new char[fileSize];
+   fread(filebuf, 1, fileSize, fptr);
+   fclose(fptr);
+
+   //---
+   // Production date:
+   //---
+   strptr = strstr(filebuf, "\nCreation Date:");
+   if (!strptr)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
+            << "\n\tAborting construction. Error encountered parsing "
+            << "presumed meta-data file." << std::endl;
+      }
+      delete [] filebuf;
+      return false;
+   }
+
+   sscanf(strptr, "%15c %s", dummy, name);
+   theProductionDate = name;
+
+   //***
+   // Sensor Type:
+   //***
+   strptr = strstr(strptr, "\nSensor:");
+   if (!strptr)
+   {
+      if(traceDebug())
+      { 
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
+            << "\n\tAborting construction. Error encountered parsing "
+            << "presumed meta-data file." << std::endl;
+      }
+      delete [] filebuf;
+      return false;
+   }
+
+   sscanf(strptr, "%8c %s", dummy, name);
+   theSensorID = name;
+
+
+   //***
+   // Nominal Azimuth:
+   //***
+   strptr = strstr(strptr, "\nNominal Collection Azimuth:");
+   if (!strptr)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
+            << "\n\tAborting construction. Error encountered parsing "
+            << "presumed meta-data file." << std::endl;
+      }
+      delete [] filebuf;
+      return false;
+   }
+
+   sscanf(strptr, "%28c %lf %s", dummy, &value, dummy);
+   theNominalCollectionAzimuth = value;
+
+   //***
+   // Nominal Elevation:
+   //***
+   strptr = strstr(strptr, "\nNominal Collection Elevation:");
+   if (!strptr)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
+            << "\n\tAborting construction. Error encountered parsing "
+            << "presumed meta-data file." << std::endl;
+      }
+      delete [] filebuf;
+      return false;
+   }
+  
+   sscanf(strptr, "%31c %lf %s", dummy, &value, dummy);
+   theNominalCollectionElevation = value;
+
+   //***
+   // Sun Azimuth:
+   //***
+   strptr = strstr(strptr, "\nSun Angle Azimuth:");
+   if (!strptr)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
+            << "\n\tAborting construction. Error encountered parsing "
+            << "presumed meta-data file." << std::endl;
+      }
+      delete [] filebuf;
+      return false;
+   }
+
+   sscanf(strptr, "%19c %lf %s", dummy, &value, dummy);
+   theSunAzimuth = value;
+
+   //***
+   // Sun Elevation:
+   //***
+   strptr = strstr(strptr, "\nSun Angle Elevation:");
+   if (!strptr)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
+            << "\n\tAborting construction. Error encountered parsing "
+            << "presumed meta-data file." << std::endl;
+      }
+      delete [] filebuf;
+      return false;
+   }
+
+   sscanf(strptr, "%21c %lf %s", dummy, &value, name);
+   theSunElevation = value;
+
+   //---
+   // Acquisition date and time:
+   //---
+   strptr = strstr(filebuf, "\nAcquisition Date/Time:");
+   if (!strptr)
+   {
+      if(traceDebug())
+      {
+      ossimNotify(ossimNotifyLevel_FATAL)
+          << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
+          << "\n\tAborting construction. Error encountered parsing "
+          << "presumed meta-data file." << std::endl;
+      }
+      delete [] filebuf;
+      return false;
+   }
+
+   char name2[80];
+   sscanf(strptr, "%23c %s %s", dummy, name, name2);
+   theAcquisitionDate = name;
+   theAcquisitionTime = name2;
+
+   delete [] filebuf;
+   filebuf = 0;
+
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimIkonosRpcModel::parseMetaData(data_file): returning..."
+         << std::endl;
+   }
+
+   return true;
+}
+
+//*****************************************************************************
+// PROTECTED METHOD: ossimIkonosMetaData::parseHdrData()
+//
+//  Parses the Ikonos hdr file.
+//
+//*****************************************************************************
+bool ossimIkonosMetaData::parseHdrData(const ossimFilename& data_file)
+{
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimIkonosRpcModel::parseHdrData(data_file): entering..."
+         << std::endl;
+   }
+
+   FILE* fptr = fopen (data_file, "r");
+   if (!fptr)
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimIkonosRpcModel::parseHdrData(data_file) WARN:"
+            << "\nCould not open hdr data file <" << data_file << ">. "
+            << "returning with error..." << std::endl;
+      }
+      return false;
+   }
+
+   char* strptr;
+   // char linebuf[80];
+   char dummy[80];
+   char name[80];
+   int value=0;
+
+   //***
+   // Read the file into a buffer:
+   //***
+   char filebuf[5000];
+   fread(filebuf, 1, 5000, fptr);
+   fclose(fptr);
+
+   //***
+   // Band name:
+   //***
+   strptr = strstr(filebuf, "\nBand:");
+   if (!strptr)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimIkonosRpcModel::parseHdrData(data_file):"
+            << "\n\tAborting construction. Error encountered parsing "
+            << "presumed hdr file." << std::endl;
+      }
+
+      return false;
+   }
+
+   sscanf(strptr, "%6c %s", dummy, name);
+   theBandName = name;
+
+   //***
+   // Number of Bands:
+   //***
+   strptr = strstr(filebuf, "\nNumber of Bands:");
+   if (!strptr)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimIkonosRpcModel::parseHdrData(data_file):"
+            << "\n\tAborting construction. Error encountered parsing "
+            << "presumed hdr file." << std::endl;
+      }
+
+      return false;
+   }
+
+   sscanf(strptr, "%17c %d", dummy, &value);
+   theNumBands = value;
+
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimIkonosRpcModel::parseHdrData(data_file): returning..."
+         << std::endl;
+   }
+   return true;
+}
+
+//*****************************************************************************
+// PROTECTED METHOD: ossimIkonosMetaData::parseRpcData()
+//
+//  Parses the Ikonos rpc file.
+//
+//*****************************************************************************
+bool ossimIkonosMetaData::parseRpcData(const ossimFilename& /* data_file */)
+{
+   return true;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimInfoBase.cpp b/ossim/src/ossim/support_data/ossimInfoBase.cpp
new file mode 100644
index 0000000..806de9b
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimInfoBase.cpp
@@ -0,0 +1,45 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Base class for Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/support_data/ossimInfoBase.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <sstream>
+
+ossimInfoBase::ossimInfoBase()
+   : theOverviewFlag(true)
+{}
+
+ossimInfoBase::~ossimInfoBase()
+{}
+
+void ossimInfoBase::setProcessOverviewFlag(bool flag)
+{
+   theOverviewFlag = flag;
+}
+
+bool ossimInfoBase::getProcessOverviewFlag() const
+{
+   return theOverviewFlag;
+}
+
+bool ossimInfoBase::getKeywordlist(ossimKeywordlist& kwl)const
+{  
+   // Do a print to a memory stream.
+   std::ostringstream out;
+   print(out);
+
+   std::istringstream in(out.str());
+   // Give the result to the keyword list.
+   return kwl.parseStream(in);
+}
+
diff --git a/ossim/src/ossim/support_data/ossimInfoFactory.cpp b/ossim/src/ossim/support_data/ossimInfoFactory.cpp
new file mode 100644
index 0000000..ac8f16c
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimInfoFactory.cpp
@@ -0,0 +1,135 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Factory for info objects.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimInfoFactory.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/support_data/ossimInfoFactory.h>
+#include <ossim/support_data/ossimInfoBase.h>
+#include <ossim/support_data/ossimCcfInfo.h>
+#include <ossim/support_data/ossimDemInfo.h>
+#include <ossim/support_data/ossimDoqq.h>
+#include <ossim/support_data/ossimDtedInfo.h>
+#include <ossim/support_data/ossimEnviInfo.h>
+#include <ossim/support_data/ossimJ2kInfo.h>
+#include <ossim/support_data/ossimJp2Info.h>
+#include <ossim/support_data/ossimLasInfo.h>
+#include <ossim/support_data/ossimNitfInfo.h>
+#include <ossim/support_data/ossimRpfInfo.h>
+#include <ossim/support_data/ossimTiffInfo.h>
+#include <ossim/support_data/ossimXmpInfo.h>
+
+#include <ossim/base/ossimFilename.h>
+
+ossimInfoFactory* ossimInfoFactory::theInstance = 0;
+
+ossimInfoFactory::~ossimInfoFactory()
+{}
+
+ossimInfoFactory* ossimInfoFactory::instance()
+{
+   if ( !theInstance )
+   {
+      theInstance = new ossimInfoFactory;
+   }
+   return theInstance;
+}
+
+ossimInfoBase* ossimInfoFactory::create(const ossimFilename& file) const
+{
+   ossimRefPtr<ossimInfoBase> result = 0;
+
+   result = new ossimTiffInfo();
+   if ( result->open(file) )
+   {
+      return result.release();
+   }
+
+   result = new ossimJp2Info();
+   if ( result->open(file) )
+   {
+      return result.release();
+   }
+
+   result = new ossimNitfInfo();
+   if ( result->open(file) )
+   {
+      return result.release();
+   }
+
+   result = new ossimDemInfo();
+   if ( result->open(file) )
+   {
+      return result.release();
+   }
+
+   result = new ossimDtedInfo();
+   if ( result->open(file) )
+   {
+      return result.release();
+   }
+
+   result = new ossimEnviInfo();
+   if ( result->open(file) )
+   {
+      return result.release();
+   }
+
+   result = new ossimRpfInfo();
+   if ( result->open(file) )
+   {
+      return result.release();
+   }
+   
+   result = new ossimXmpInfo();
+   if ( result->open(file) )
+   {
+      return result.release();
+   }
+   
+   result = new ossimLasInfo();
+   if ( result->open(file) )
+   {
+      return result.release();
+   }
+
+   result = new ossimDoqq();
+   if ( result->open(file) )
+   {
+      return result.release();
+   }
+
+   result = new ossimJ2kInfo();
+   if ( result->open(file) )
+   {
+      return result.release();
+   }
+   
+   result = new ossimCcfInfo();
+   if ( result->open(file) )
+   {
+      return result.release();
+   }
+   
+   return 0;
+}
+
+ossimInfoFactory::ossimInfoFactory()
+{}
+
+ossimInfoFactory::ossimInfoFactory(const ossimInfoFactory& /* obj */ )
+{}
+
+const ossimInfoFactory& ossimInfoFactory::operator=(
+   const ossimInfoFactory& /* rhs */)
+{
+   return *this;
+}
+
diff --git a/src/ossim/support_data/ossimInfoFactoryRegistry.cpp b/ossim/src/ossim/support_data/ossimInfoFactoryRegistry.cpp
similarity index 100%
rename from src/ossim/support_data/ossimInfoFactoryRegistry.cpp
rename to ossim/src/ossim/support_data/ossimInfoFactoryRegistry.cpp
diff --git a/ossim/src/ossim/support_data/ossimJ2kCodRecord.cpp b/ossim/src/ossim/support_data/ossimJ2kCodRecord.cpp
new file mode 100644
index 0000000..41b83f9
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimJ2kCodRecord.cpp
@@ -0,0 +1,124 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Container class for J2K Coding style default (COD) record.
+//
+// See document BPJ2K01.00 Table 7-7 Image and tile size (15444-1 Annex A5.1)
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimJ2kCodRecord.h,v 1.5 2005/10/13 21:24:47 dburken Exp $
+
+#include <iostream>
+#include <iomanip>
+
+#include <ossim/support_data/ossimJ2kCodRecord.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimEndian.h>
+
+
+ossimJ2kCodRecord::ossimJ2kCodRecord()
+   :
+   m_marker(0xff52),
+   m_lcod(0),
+   m_scod(0),
+   m_progressionOrder(0),
+   m_numberOfLayers(0),
+   m_multipleComponentTransform(0),
+   m_numberOfDecompositionLevels(0),
+   m_codeBlockWidth(0),
+   m_codeBlockHeight(0),
+   m_codeBlockStyle(0),
+   m_transformation(0),
+   m_precinctSize(0)
+{
+}
+
+ossimJ2kCodRecord::~ossimJ2kCodRecord()
+{
+}
+
+void ossimJ2kCodRecord::parseStream(std::istream& in)
+{
+   // Get the stream posistion.
+   std::streamoff pos = in.tellg();
+
+   // Note: Marker is not read.
+   in.read((char*)&m_lcod, 2);
+   in.read((char*)&m_scod, 1);
+   in.read((char*)&m_progressionOrder, 1);
+   in.read((char*)&m_numberOfLayers, 2);
+   in.read((char*)&m_multipleComponentTransform, 1);
+   in.read((char*)&m_numberOfDecompositionLevels, 1);
+   in.read((char*)&m_codeBlockWidth, 1);
+   in.read((char*)&m_codeBlockHeight, 1);
+   in.read((char*)&m_codeBlockStyle, 1);
+   in.read((char*)&m_transformation, 1);
+
+   //---
+   // SPcod - precinct size (only is defined, Scod = xxxx xxx1)
+   //---   
+   if ( 0 )
+   {
+      in.read((char*)&m_precinctSize, 1);
+   }
+
+   if (ossim::byteOrder() == OSSIM_LITTLE_ENDIAN)
+   {
+      // Stored big endian, must swap.
+      ossimEndian s;
+      s.swap(m_lcod);
+      s.swap(m_numberOfLayers);
+   }
+
+   //---
+   // Seek to next record.  This is needed because there are sometimes extra
+   // bytes.
+   //---
+   in.seekg(pos + m_lcod, std::ios_base::beg);
+}
+
+std::ostream& ossimJ2kCodRecord::print(std::ostream& out,
+                                       const std::string& prefix) const
+{
+   // Capture the original flags.
+   std::ios_base::fmtflags f = out.flags();
+
+   std::string pfx = prefix;
+   pfx += "cod.";
+
+   out.setf(std::ios_base::hex, std::ios_base::basefield);
+   out << pfx << "marker: 0x" << m_marker << "\n";
+   out.setf(std::ios_base::fmtflags(0), std::ios_base::basefield);
+
+   out << pfx << "Lcod: " << m_lcod       << "\n"
+       << pfx << "Scod: " << int(m_scod)  << "\n"
+       << pfx << "SGcod_progression_order:  " << int(m_progressionOrder) << "\n"
+       << pfx << "SGcod_number_of_layers:  " << m_numberOfLayers << "\n"
+       << pfx << "SGcod_multiple_component_transform:  "
+       << int(m_multipleComponentTransform) << "\n"
+       << pfx << "SPcod_mumber_of_decomposition_levels: "
+       << int(m_numberOfDecompositionLevels) << "\n"
+       << pfx << "SPcod_code_block_width: " << int(m_codeBlockWidth) << "\n"
+       << pfx << "SPcod_code_block_height: " << int(m_codeBlockHeight) << "\n"
+       << pfx << "SPcod_code_block_style: " << int(m_codeBlockStyle) << "\n"
+       << pfx << "SPcod_transformation: " << int(m_transformation) << "\n"
+       << pfx << "SPcod_precinct_size: " << int(m_precinctSize)
+       << std::endl;
+
+   // Reset flags.
+   out.setf(f);
+
+   return out;
+}
+
+std::ostream& operator<<(std::ostream& out, const ossimJ2kCodRecord& obj)
+{
+   return obj.print(out);
+}
+
diff --git a/ossim/src/ossim/support_data/ossimJ2kInfo.cpp b/ossim/src/ossim/support_data/ossimJ2kInfo.cpp
new file mode 100644
index 0000000..821cd61
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimJ2kInfo.cpp
@@ -0,0 +1,239 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: J2K Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/support_data/ossimJ2kInfo.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimTrace.h>
+// #include <ossim/support_data/ossimJ2kCommon.h>
+#include <ossim/support_data/ossimJ2kCodRecord.h>
+#include <ossim/support_data/ossimJ2kSizRecord.h>
+#include <ossim/support_data/ossimJ2kSotRecord.h>
+#include <fstream>
+#include <iostream>
+#include <iomanip>
+#include <sstream>
+
+// Static trace for debugging
+static ossimTrace traceDebug("ossimJ2kInfo:debug");
+static ossimTrace traceDump("ossimJ2kInfo:dump"); // This will dump offsets.
+
+ossimJ2kInfo::ossimJ2kInfo()
+   : ossimInfoBase(),
+     m_file(),
+     m_endian(0)
+{
+   // See if we need to byte swap.  J2k, JP2 boxes are big endian.
+   if (ossim::byteOrder() == OSSIM_LITTLE_ENDIAN)
+   {
+      m_endian = new ossimEndian();
+   }
+}
+
+ossimJ2kInfo::~ossimJ2kInfo()
+{
+   if (m_endian)
+   {
+      delete m_endian;
+      m_endian = 0;
+   }
+}
+
+bool ossimJ2kInfo::open(const ossimFilename& file)
+{
+   bool result = false;
+
+   //---
+   // Open the file.
+   //---
+   std::ifstream str(file.c_str(), std::ios_base::binary|std::ios_base::in);
+   if (str.good()) 
+   {
+      //---
+      // Check for the Start Of Codestream (SOC) and Size (SIZ) markers which
+      // are required as first and second fields in the main header.
+      //---
+      ossim_uint16 soc;
+      ossim_uint16 siz;
+      readUInt16(soc, str);
+      readUInt16(siz, str);
+
+      const ossim_uint16 SOC_MARKER = 0xff4f; // start of codestream marker
+      const ossim_uint16 SIZ_MARKER = 0xff51; // size maker
+      
+      if ( (soc == SOC_MARKER) && (siz == SIZ_MARKER) )
+      {
+         result = true; // Is a j2k...
+      }
+   }
+
+   if (result)
+   {
+      
+      m_file = file;
+   }
+   else
+   {
+      m_file.clear();
+      if (m_endian)
+      {
+         delete m_endian;
+         m_endian = 0;
+      }
+   }
+
+   return result;
+}
+
+std::ostream& ossimJ2kInfo::print(std::ostream& out) const
+{
+   static const char MODULE[] = "ossimJ2kInfo::print";
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " DEBUG Entered...\n";
+   }
+
+   if ( m_file.size() )
+   {  
+      // Open the file.
+      std::ifstream str(m_file.c_str(), std::ios_base::binary|std::ios_base::in);
+      if (str.good())
+      {
+         ossim_uint16 marker;
+         readUInt16(marker, str); // SOC
+         readUInt16(marker, str); // SIZ
+         
+         std::string prefix = "j2k.";
+         
+         // SIZ marker required next.
+         printSizMarker(out, prefix, str);
+         
+         readUInt16(marker, str);
+
+         const ossim_uint16 COD_MARKER = 0xff52; // cod maker
+         const ossim_uint16 EOC_MARKER = 0xffd9; // End of codestream marker.
+         const ossim_uint16 SOT_MARKER = 0xff90; // start of tile marker
+         
+         while ( str.good() && (marker != EOC_MARKER) )
+         {
+            switch(marker)
+            {
+               case COD_MARKER:
+               {
+                  printCodMarker(out, prefix, str);
+                  break;
+               }
+               case SOT_MARKER:
+               {
+                  printSotMarker(out, prefix, str);
+                  break;
+               }
+               default:
+               {
+                  printUnknownMarker(out, prefix, str, marker);
+               }
+            }
+            
+            readUInt16(marker, str);
+            
+         }
+      }
+   }
+
+   return out;
+}
+
+void ossimJ2kInfo::readUInt16(ossim_uint16& s, std::ifstream& str) const
+{
+   str.read((char*)&s, 2);
+   if (m_endian)
+   {
+      m_endian->swap(s);
+   }
+}
+
+std::ostream& ossimJ2kInfo::printCodMarker(std::ostream& out,
+                                           const std::string& prefix,
+                                           std::ifstream& str) const
+{
+   ossimJ2kCodRecord siz;
+   siz.parseStream(str);
+   siz.print(out, prefix);
+   return out;
+}
+
+std::ostream& ossimJ2kInfo::printSizMarker(std::ostream& out,
+                                           const std::string& prefix,
+                                           std::ifstream& str) const
+{
+   ossimJ2kSizRecord siz;
+   siz.parseStream(str);
+   siz.print(out, prefix);
+   return out;
+}
+
+std::ostream& ossimJ2kInfo::printSotMarker(std::ostream& out,
+                                           const std::string& prefix,
+                                           std::ifstream& str) const
+{
+   // Get the stream posistion.
+   std::streamoff pos = str.tellg();
+   
+   ossimJ2kSotRecord sot;
+   sot.parseStream(str);
+   pos += sot.thePsot - 2;
+
+   // Seek past the tile to the next marker.
+   str.seekg(pos, std::ios_base::beg);
+   
+   sot.print(out,prefix);
+   return out;
+}
+
+
+std::ostream& ossimJ2kInfo::printUnknownMarker(std::ostream& out,
+                                               const std::string& prefix,
+                                               std::ifstream& str,
+                                               ossim_uint16 marker) const
+{
+   // Capture the original flags.
+   std::ios_base::fmtflags f = out.flags();
+
+   ossim_uint16 segmentLength;
+   readUInt16(segmentLength, str);
+
+   std::string pfx = prefix;
+   pfx += "unkown.";
+
+   out.setf(std::ios_base::hex, std::ios_base::basefield);
+   out << pfx << "marker: 0x" << std::setfill('0') << std::setw(4)
+       << marker << "\n";
+   out.setf(std::ios_base::fmtflags(0), std::ios_base::basefield);
+   
+   out << pfx << "length: " << segmentLength
+       << std::endl;
+
+   // Reset flags.
+   out.setf(f);
+
+   // Seek to the next marker.
+   str.seekg( (segmentLength-2), std::ios_base::cur);
+
+   return out;
+}
+      
+
+
diff --git a/ossim/src/ossim/support_data/ossimJ2kSizRecord.cpp b/ossim/src/ossim/support_data/ossimJ2kSizRecord.cpp
new file mode 100644
index 0000000..3c90b66
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimJ2kSizRecord.cpp
@@ -0,0 +1,181 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Container class for J2K Image and tile size (SIZ) record.
+//
+// See document BPJ2K01.00 Table 7-6 Image and tile size (15444-1 Annex A5.1)
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimJ2kSizRecord.h,v 1.5 2005/10/13 21:24:47 dburken Exp $
+
+#include <iostream>
+#include <iomanip>
+
+#include <ossim/support_data/ossimJ2kSizRecord.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimEndian.h>
+
+
+ossimJ2kSizRecord::ossimJ2kSizRecord()
+   :
+   m_marker(0xff51),
+   m_Lsiz(0),
+   m_Rsiz(0),
+   m_Xsiz(0),
+   m_Ysiz(0),
+   m_XOsiz(0),
+   m_YOsiz(0),
+   m_XTsiz(0),
+   m_YTsiz(0),
+   m_XTOsiz(0),
+   m_YTOsiz(0),
+   m_Csiz(0),
+   m_Ssiz(0),
+   m_XRsiz(0),
+   m_YRsiz(0)
+{
+}
+
+ossimJ2kSizRecord::~ossimJ2kSizRecord()
+{
+}
+
+void ossimJ2kSizRecord::parseStream(std::istream& in)
+{
+   // Get the stream posistion.
+   std::streamoff pos = in.tellg();
+
+   // Note: Marker is not read.
+   in.read((char*)&m_Lsiz,      2);
+   in.read((char*)&m_Rsiz,      2);
+   in.read((char*)&m_Xsiz,      4);
+   in.read((char*)&m_Ysiz,      4);
+   in.read((char*)&m_XOsiz,     4);
+   in.read((char*)&m_YOsiz,     4);
+   in.read((char*)&m_XTsiz,     4);
+   in.read((char*)&m_YTsiz,     4);
+   in.read((char*)&m_XTOsiz,    4);
+   in.read((char*)&m_YTOsiz,    4);
+   in.read((char*)&m_Csiz,      2);
+   in.read((char*)&m_Ssiz,      1);
+   in.read((char*)&m_XRsiz,     1);
+   in.read((char*)&m_YRsiz,     1);
+
+   if (ossim::byteOrder() == OSSIM_LITTLE_ENDIAN)
+   {
+      // Stored big endian, must swap.
+      ossimEndian s;
+      s.swap(m_Lsiz);
+      s.swap(m_Rsiz);
+      s.swap(m_Xsiz);
+      s.swap(m_Ysiz);
+      s.swap(m_XOsiz);
+      s.swap(m_YOsiz);
+      s.swap(m_XTsiz);
+      s.swap(m_YTsiz);
+      s.swap(m_XTOsiz);
+      s.swap(m_YTOsiz);
+      s.swap(m_Csiz);
+   }
+
+   //---
+   // Seek to next record.  This is needed because there are sometimes extra
+   // bytes.
+   //---
+   in.seekg(pos + m_Lsiz, std::ios_base::beg);
+}
+
+ossimScalarType ossimJ2kSizRecord::getScalarType() const
+{
+   ossimScalarType result = OSSIM_SCALAR_UNKNOWN;
+
+   // Bits per pixel first seven bits plus one.
+   ossim_uint8 bpp = ( m_Ssiz & 0x3f ) + 1;
+
+   // Signed bit is msb.
+   bool isSigned = ( m_Ssiz & 0x80 ) ? true : false;
+
+   // std::cout << "bpp: " << int(bpp) << " signed: " << isSigned << std::endl;
+      
+   if ( bpp <= 8 )
+   {
+      if ( isSigned == 0 )
+      {
+         result = OSSIM_UINT8;
+      }
+      else if (isSigned == 1)
+      {
+         result = OSSIM_SINT8;
+      }
+   }
+   else if ( bpp == 11 )
+   {
+      if ( isSigned == 0 )
+      {
+         result = OSSIM_USHORT11;
+      }
+      else
+      {
+         result = OSSIM_SINT16;
+      }
+   }
+   else if( bpp <= 16 )
+   {
+      if( isSigned == 0 )
+      {
+         result = OSSIM_UINT16;
+      }
+      else if( isSigned == 1 )
+      {
+         result = OSSIM_SINT16;
+      }
+   }
+   return result;
+}
+
+std::ostream& ossimJ2kSizRecord::print(std::ostream& out,
+                                       const std::string& prefix) const
+{
+   // Capture the original flags.
+   std::ios_base::fmtflags f = out.flags();
+
+   std::string pfx = prefix;
+   pfx += "siz.";
+
+   out.setf(std::ios_base::hex, std::ios_base::basefield);
+   out << pfx << "marker: 0x" << m_marker << "\n";
+   out.setf(std::ios_base::fmtflags(0), std::ios_base::basefield);
+
+   out << pfx << "Lsiz:   " << m_Lsiz       << "\n"
+       << pfx << "Rsiz:   " << m_Rsiz       << "\n"
+       << pfx << "Xsiz:   " << m_Xsiz       << "\n"
+       << pfx << "Yziz:   " << m_Ysiz       << "\n"
+       << pfx << "XOsiz:  " << m_XOsiz      << "\n"
+       << pfx << "YOsiz:  " << m_YOsiz      << "\n"
+       << pfx << "XTsiz:  " << m_XTsiz      << "\n"
+       << pfx << "YTsiz:  " << m_YTsiz      << "\n"
+       << pfx << "XTOsiz: " << m_XTOsiz     << "\n"
+       << pfx << "YTOsiz: " << m_YTOsiz     << "\n"
+       << pfx << "Csiz:   " << m_Csiz       << "\n"
+       << pfx << "Ssiz:   " << int(m_Ssiz)  << "\n"
+       << pfx << "XRsiz:  " << int(m_XRsiz) << "\n"
+       << pfx << "YRsiz:  " << int(m_YRsiz)
+       << std::endl;
+
+   // Reset flags.
+   out.setf(f);
+
+   return out;
+}
+
+std::ostream& operator<<(std::ostream& out, const ossimJ2kSizRecord& obj)
+{
+   return obj.print(out);
+}
+
diff --git a/ossim/src/ossim/support_data/ossimJ2kSotRecord.cpp b/ossim/src/ossim/support_data/ossimJ2kSotRecord.cpp
new file mode 100644
index 0000000..5f1d827
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimJ2kSotRecord.cpp
@@ -0,0 +1,88 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// // Description: Container class for J2K "Start Of Tile" (SOT) record.
+//
+// See document BPJ2K01.00 Table 7-3 Image and tile size (15444-1 Annex A.4.2)
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimJ2kSotRecord.h,v 1.5 2005/10/13 21:24:47 dburken Exp $
+
+#include <iostream>
+#include <iomanip>
+
+#include <ossim/support_data/ossimJ2kSotRecord.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimEndian.h>
+
+ossimJ2kSotRecord::ossimJ2kSotRecord()
+   :
+   theMarker(0xff90),
+   theLsot(0),
+   theIsot(0),
+   thePsot(0),
+   theTpsot(0),
+   theTnsot(0)
+{
+}
+
+ossimJ2kSotRecord::~ossimJ2kSotRecord()
+{
+}
+
+void ossimJ2kSotRecord::parseStream(std::istream& in)
+{
+   // Note: marker not read...
+   
+   in.read((char*)&theLsot,  2);
+   in.read((char*)&theIsot,  2);
+   in.read((char*)&thePsot,  4);
+   in.read((char*)&theTpsot, 1);
+   in.read((char*)&theTnsot, 1);
+
+   if (ossim::byteOrder() == OSSIM_LITTLE_ENDIAN)
+   {
+      // Stored big endian, must swap.
+      ossimEndian s;
+      s.swap(theLsot);
+      s.swap(theIsot);
+      s.swap(thePsot);
+   }
+}
+
+std::ostream& ossimJ2kSotRecord::print(std::ostream& out,
+                                       const std::string& prefix) const
+{
+   // Capture the original flags.
+   std::ios_base::fmtflags f = out.flags();
+
+   std::string pfx = prefix;
+   pfx += "sot.";
+
+   out.setf(std::ios_base::hex, std::ios_base::basefield);
+   out << pfx << "marker: 0x" << theMarker << "\n";
+   out.setf(std::ios_base::fmtflags(0), std::ios_base::basefield);
+
+   out << pfx << "Lsot:   "  << theLsot      << "\n"
+       << pfx << "Isot:   "  << theIsot      << "\n"
+       << pfx << "Psot:   "  << thePsot      << "\n"
+       << pfx << "Tpsot:  " << int(theTpsot) << "\n"
+       << pfx << "Tnsot:  " << int(theTnsot)
+       << std::endl;
+
+   // Reset flags.
+   out.setf(f);
+
+   return out;
+}
+
+std::ostream& operator<<(std::ostream& out, const ossimJ2kSotRecord& obj)
+{
+   return obj.print(out);
+}
+
diff --git a/ossim/src/ossim/support_data/ossimJp2Info.cpp b/ossim/src/ossim/support_data/ossimJp2Info.cpp
new file mode 100644
index 0000000..31bb756
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimJp2Info.cpp
@@ -0,0 +1,654 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: JP2 Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimJp2Info.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/support_data/ossimJp2Info.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimTrace.h>
+// #include <ossim/support_data/ossimJ2kCommon.h>
+#include <ossim/support_data/ossimTiffInfo.h>
+#include <fstream>
+#include <istream>
+#include <iostream>
+
+static ossimTrace traceDebug("ossimJp2Info:debug");
+
+ossimJp2Info::ossimJp2Info()
+   : ossimJ2kInfo()
+{
+}
+
+ossimJp2Info::~ossimJp2Info()
+{
+}
+
+bool ossimJp2Info::open(const ossimFilename& file)
+{
+   bool result = false;
+
+   std::ifstream str;
+   str.open( file.c_str(), std::ios_base::in | std::ios_base::binary);
+
+   if ( str.is_open() )
+   {
+      const ossim_uint8 J2K_SIGNATURE_BOX[SIGNATURE_BOX_SIZE] = 
+         {0x00,0x00,0x00,0x0c,0x6a,0x50,0x20,0x20,0x0d,0x0a,0x87,0x0a};
+      
+      ossim_uint8 box[SIGNATURE_BOX_SIZE];
+      
+      // Read in the box.
+      str.read((char*)box, SIGNATURE_BOX_SIZE);
+      
+      result = true;
+      for (ossim_uint32 i = 0; i < SIGNATURE_BOX_SIZE; ++i)
+      {
+         if (box[i] != J2K_SIGNATURE_BOX[i])
+         {
+            result = false;
+            break;
+         }
+      }
+      
+      str.close();
+   }
+
+   if ( result )
+   {
+      m_file = file; // Capture file name.
+   }
+   
+   return result;
+}
+
+std::ostream& ossimJp2Info::print(std::ostream& out) const
+{
+   if ( m_file.size() )
+   {
+      // Open the file.
+      std::ifstream str( m_file.c_str(), std::ios_base::in | std::ios_base::binary );
+      if (str.good())
+      {
+         //---
+         // ISO/IEC 15444-1:2004 (E)
+         // LBox, Box Length. This field specifies the length of the box, stored
+         // as a 4-byte big endian unsigned integer. This value includes all of
+         // the fields of the box, including the length and type. If the value
+         // of this field is 1, then the XLBox field shall exist and the value
+         // of that field shall be the actual length of the box. If the value
+         // of this field is 0, then the length of the box was not known when
+         // the LBox field was written. In this case, this box contains all
+         // bytes up to the end of the file. If a box of length 0 is contained
+         // within another box (its superbox), then the length of that superbox
+         // shall also be 0.  This means that this box is the last box in the
+         // file. The values 2-7 are reserved for ISO use.
+         //---
+         ossim_uint32 lbox  = 0;
+         ossim_uint32 tbox  = 0;
+         ossim_uint64 xlbox = 0;
+
+         const ossim_uint32 UUID_TYPE = 0x75756964;
+         const ossim_uint8 GEOTIFF_UUID[GEOTIFF_UUID_SIZE] = 
+            {
+               0xb1, 0x4b, 0xf8, 0xbd,
+               0x08, 0x3d, 0x4b, 0x43,
+               0xa5, 0xae, 0x8c, 0xd7,
+               0xd5, 0xa6, 0xce, 0x03
+            };
+         
+         while ( str.good() )
+         {
+            std::streamoff boxPos = str.tellg();
+            
+            readUInt32( lbox, str );
+            readUInt32( tbox, str );
+            
+            if ( 1 == lbox )
+            {
+               readUInt64( xlbox, str );
+            }
+
+            if ( traceDebug() )
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << "jp2.lbox: " << std::dec << lbox << "\n"
+                  << "jp2.tbox: " << std::hex << tbox << std::dec << "\n";
+               printTboxType( tbox, ossimNotify(ossimNotifyLevel_DEBUG)  );
+
+               if ( 1 == lbox )
+               {
+                  ossimNotify(ossimNotifyLevel_DEBUG) << "jp2.xlbox: " << xlbox << std::endl;
+               }
+            }            
+            
+            if (tbox == UUID_TYPE)
+            {
+               // Check for GeoTIFF box.
+               
+               ossim_uint8 geotiffUuid[GEOTIFF_UUID_SIZE];
+               
+               // Read in the id.
+               str.read((char*)geotiffUuid, GEOTIFF_UUID_SIZE);
+
+#if 0
+               bool foundIt = true;
+               for (ossim_uint32 i = 0; i < GEOTIFF_UUID_SIZE; ++i)
+               {
+                  if (geotiffUuid[i] != GEOTIFF_UUID[i])
+                  {
+                     foundIt = false;
+                     break;
+                  }
+               }
+#endif          
+
+               if( memcmp( (char*)geotiffUuid, GEOTIFF_UUID, GEOTIFF_UUID_SIZE) == 0)
+               {
+                  //---
+                  // Feed the stream to the tiff info object to get a keyword
+                  // list with geometry/projection info.
+                  //---
+                  ossimTiffInfo info;
+                  
+                  //---
+                  // Have geotiff boxes with badly terminated geotiffs. So to keep
+                  // the tag parser from walking past the first image file directory
+                  // (IFD) into garbage we will set the process overview flag to false.
+                  //
+                  // Note if we ever get multiple entries we will need to take this out.
+                  //---
+                  info.setProcessOverviewFlag(false);
+
+                  // Do a print to a memory stream.
+                  std::ostringstream os;
+                  info.print(str, os);
+
+                  // Open an input stream to pass to the keyword list.
+                  std::istringstream in( os.str() );
+                  
+                  ossimKeywordlist kwl;
+                  if ( kwl.parseStream(in) )      
+                  {
+                     kwl.addPrefixToAll( ossimString("jp2.") );
+
+                     // Print it:
+                     out << kwl << std::endl;
+                  }
+                  
+                  // Get out of while loop.
+                  // break;
+               }
+            }
+
+            if (lbox == 0) // last box?
+            {
+               break;
+            }
+            
+            // Seek to the next box.  If xlbox is 1
+            if (lbox == 1)
+            {
+               boxPos += (std::streamoff)xlbox;
+            }
+            else
+            {
+               boxPos += (std::streamoff)lbox;
+            }
+
+            // Go to next box:
+            str.seekg(boxPos, std::ios_base::beg);
+            
+         } // matches: while ( str.good() )
+         
+         // Close the stream.
+         str.close();
+         
+      } // matches: if ( str.is_open() )
+      
+   } // matches: if ( m_file.size() )
+   
+   return out; 
+}
+
+void ossimJp2Info::readUInt32(ossim_uint32& i, std::ifstream& str) const
+{
+   str.read((char*)&i, 4);
+   if (m_endian)
+   {
+      m_endian->swap(i);
+   }
+}
+
+void ossimJp2Info::readUInt64(ossim_uint64& i, std::ifstream& str) const
+{
+   str.read((char*)&i, 8);
+   if (m_endian)
+   {
+      m_endian->swap(i);
+   }
+}
+
+std::streamoff ossimJp2Info::findBoxData( const ossim_uint32& type,
+                                          std::ifstream& str,
+                                          ossim_uint32& length ) const
+{
+   std::streamoff boxPos = 0;
+   std::streamoff dataPosOfType = 0;
+
+   if ( str.good() )
+   {
+      ossim_uint32   lbox   = 0;
+      ossim_uint32   tbox   = 0;
+      ossim_uint64   xlbox  = 0;
+      std::streamoff offsetToDbox = 0;
+
+      while ( str.good() )
+      {
+         boxPos = str.tellg();
+
+         readUInt32( lbox, str );
+         readUInt32( tbox, str );
+
+         if ( lbox == 1 )
+         {
+            readUInt64( xlbox, str );
+            offsetToDbox = 16;
+         }
+         else
+         {
+            offsetToDbox = 8;
+         }
+
+         if ( traceDebug() )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "jp2.lbox: " << std::dec << lbox << "\n"
+               << "jp2.tbox: " << std::hex << tbox << std::dec << "\n";
+            printTboxType( tbox, ossimNotify(ossimNotifyLevel_DEBUG)  );
+
+            if ( lbox == 1 )
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << "jp2.xlbox: " << xlbox << std::endl;
+            }
+         }            
+
+         if ( tbox == type )
+         {
+            dataPosOfType = boxPos + offsetToDbox; // set up return value
+            length = lbox;
+            break; // done...
+         }
+
+         if ( lbox == 0 ) // last box?
+         {
+            break;
+         }
+
+         // Seek to the next box.
+         std::streamoff nextBoxPos = boxPos;
+         if (lbox == 1)
+         {
+            nextBoxPos+= (std::streamoff)xlbox;
+         }
+         else
+         {
+            nextBoxPos+= (std::streamoff)lbox;
+         }
+
+         // Go to next box:
+         str.seekg(nextBoxPos, std::ios_base::beg);
+
+      } // matches: while ( str.good() )
+
+   } // matches: if ( str.good() )
+
+   return dataPosOfType;
+}
+
+std::streamoff ossimJp2Info::getBox( const ossim_uint32 type,
+                                     bool includeAll,
+                                     std::vector<ossim_uint8>& box ) const
+{
+   std::streamoff boxPos = 0;
+
+   if ( m_file.size() )
+   {
+      // Open the file.
+      std::ifstream str( m_file.c_str(), std::ios_base::in | std::ios_base::binary );
+      if (str.good())
+      {
+         boxPos = getBox( type, includeAll, str, box ) ;
+
+      } // matches: if ( str.is_open() )
+
+   } // matches: if ( m_file.size() ) 
+
+   return boxPos;
+
+} // End: ossimJp2Info::getBox( type, includeAll, box ) const
+
+std::streamoff ossimJp2Info::getBox( const ossim_uint32& type,
+                                     bool includeAll,
+                                     std::ifstream& str,
+                                     std::vector<ossim_uint8>& box ) const
+{
+   std::streamoff boxPos = 0;
+   std::streamoff boxPosOfType = 0;
+   box.clear();
+   
+   if ( str.good() )
+   {
+      ossim_uint32   lbox   = 0;
+      ossim_uint32   tbox   = 0;
+      ossim_uint64   xlbox  = 0;
+      std::streamoff offsetToDbox = 0;
+      
+      while ( str.good() )
+      {
+         boxPos = str.tellg();
+
+         readUInt32( lbox, str );
+         readUInt32( tbox, str );
+            
+         if ( lbox == 1 )
+         {
+            readUInt64( xlbox, str );
+            offsetToDbox = 16;
+         }
+
+         if ( !includeAll )
+         {
+            if ( lbox == 1 )
+            {
+               offsetToDbox = 16;
+            }
+            else
+            {
+               offsetToDbox = 8;
+            }
+         }
+
+         if ( traceDebug() )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "jp2.lbox: " << std::dec << lbox << "\n"
+               << "jp2.tbox: " << std::hex << tbox << std::dec << "\n";
+            printTboxType( tbox, ossimNotify(ossimNotifyLevel_DEBUG)  );
+            
+            if ( 1 == lbox )
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << "jp2.xlbox: " << xlbox << std::endl;
+            }
+         }            
+
+            
+         if ( tbox == type )
+         {
+            //---
+            // This is our box, copy it to box.
+            // Not copying the lbox,tbox or xlbox
+            std::streamoff boxSize = 0;
+            if ( lbox == 0 )
+            {
+               // Last box, goes to end of file.
+               str.seekg( 0, std::ios_base::end );
+               boxSize = str.tellg() - boxPos;
+            }
+            else if ( lbox == 1 )
+            {
+               boxSize = xlbox;
+            }
+            else
+            {
+               boxSize = lbox;
+            }
+            boxSize -= offsetToDbox;
+               
+            // Seek to box data start
+            str.seekg( boxPos + offsetToDbox, std::ios_base::beg );
+               
+            // std::vector::resize can throw a std::bad_alloc so wrap it...
+            try
+            {
+               box.resize( boxSize );
+               str.read( (char*)&box.front(), boxSize );
+            }
+            catch( std::exception& e )
+            {
+               std::ostringstream errMsg;
+               errMsg << "ossimJp2Info::getBox caught exception on resize:\n"
+                      << "Buffer size in bytes: " << boxSize
+                      << "\n" << e.what() << std::endl;
+               throw ossimException( errMsg.str() );
+            }
+
+            boxPosOfType = boxPos; // set up return value 
+            break; // done...
+         }
+            
+         if (lbox == 0) // last box?
+         {
+            break;
+         }
+            
+         // Seek to the next box.
+         std::streamoff nextBoxPos = boxPos;
+         if (lbox == 1)
+         {
+            nextBoxPos+= (std::streamoff)xlbox;
+         }
+         else
+         {
+            nextBoxPos+= (std::streamoff)lbox;
+         }
+
+         // Go to next box:
+         str.seekg(nextBoxPos, std::ios_base::beg);
+            
+      } // matches: while ( str.good() )
+         
+   } // matches: if ( str.good() )
+   
+   return boxPosOfType;
+   
+} // End: ossimJp2Info::getBox( type, includeAll, str, box ) const
+
+std::streamoff ossimJp2Info::getGeotiffBox(
+   std::ifstream& str, std::vector<ossim_uint8>& box ) const
+{
+   std::streamoff boxPos = 0;
+   if ( str.good() )
+   {
+      const ossim_uint32 UUID_TYPE = 0x75756964;
+      
+      boxPos = getBox( UUID_TYPE, false, str, box );
+      if ( boxPos && ( box.size() >= GEOTIFF_UUID_SIZE) )
+      {
+         const ossim_uint8 GEOTIFF_UUID[GEOTIFF_UUID_SIZE] = 
+            {
+               0xb1, 0x4b, 0xf8, 0xbd,
+               0x08, 0x3d, 0x4b, 0x43,
+               0xa5, 0xae, 0x8c, 0xd7,
+               0xd5, 0xa6, 0xce, 0x03
+            };
+         
+         if( memcmp( (char*)&box.front(), GEOTIFF_UUID, GEOTIFF_UUID_SIZE) != 0)
+         {
+            boxPos = 0;
+            box.clear();
+         }
+      }
+   }
+   return boxPos;
+}
+
+std::streamoff ossimJp2Info::getGmlBox(
+   std::ifstream& str, std::vector<ossim_uint8>& box ) const
+{
+   std::streamoff boxPos = 0;
+   if ( str.good() )
+   {
+      const ossim_uint32 ASOC_TBOX_ID = 0x61736F63;
+      const ossim_uint32 LBL_TBOX_ID  = 0x6C626C20;
+      const ossim_uint32 XML_TBOX_ID  = 0x786D6C20;
+      
+      ossim_uint32 asoc0_data_length = 0;
+      std::streamoff dataPosAsoc0 = findBoxData( ASOC_TBOX_ID, str, asoc0_data_length );
+
+      if ( dataPosAsoc0 > 0 && asoc0_data_length > 0 )
+      {
+         ossim_uint32 lbl0_data_length = 0;
+         std::streamoff dataPosLbl0 = findBoxData( LBL_TBOX_ID, str, lbl0_data_length );
+
+         if ( dataPosLbl0 > 0 && lbl0_data_length > 0 )
+         {
+            std::string gmlDataStr;
+            gmlDataStr.resize( lbl0_data_length );
+
+            // Removed c++ 11 call for portablility...
+            // str.read( (char*)&gmlDataStr.front(), lbl0_data_length );
+            str.read( (char*)&gmlDataStr[0], lbl0_data_length );            
+
+            // Do we have a GML data asoc ?
+            if ( gmlDataStr.compare( 0, 8, "gml.data" ) == 0 )
+            {
+               // Seek to asoc 0 start of data
+               str.seekg( dataPosAsoc0, std::ios_base::beg );
+
+               ossim_uint32 asoc1_data_length = 0;
+               std::streamoff dataPosAsoc1 = findBoxData( ASOC_TBOX_ID, str, asoc1_data_length );
+
+               if ( dataPosAsoc1 > 0 && asoc1_data_length > 0 )
+               {
+                  ossim_uint32 lbl1_data_length = 0;
+                  std::streamoff dataPosLbl1 = findBoxData( LBL_TBOX_ID, str, lbl1_data_length );
+
+                  if ( dataPosLbl1 > 0 && lbl1_data_length > 0 )
+                  {
+                     std::string gmlRootInstanceStr;
+                     gmlRootInstanceStr.resize( lbl1_data_length );
+                     // Removed c++ 11 call for portablility...
+                     // str.read( (char*)&gmlRootInstanceStr.front(), lbl1_data_length );
+                     str.read( (char*)&gmlRootInstanceStr[0], lbl1_data_length );
+
+                     // Do we have a GML root-instance asoc ?
+                     if ( gmlRootInstanceStr.compare( 0, 17, "gml.root-instance" ) == 0 )
+                     {
+                        // Seek to asoc 1 start of data
+                        str.seekg( dataPosAsoc1, std::ios_base::beg );
+
+                        boxPos = getBox( XML_TBOX_ID, false, str, box );
+                     }
+                  }
+               }
+            }
+         }
+      }
+   }
+   return boxPos;
+}
+
+void ossimJp2Info::printTboxType( ossim_uint32 tbox, std::ostream& out ) const
+{
+   std::string boxType;
+
+   const ossim_uint32 JP2_SIG_TYPE   = 0x6A502020;
+   const ossim_uint32 FILE_TYPE      = 0x66747970;
+   const ossim_uint32 JP2_HDR_TYPE   = 0x6A703268;
+   const ossim_uint32 IMG_HDR_TYPE   = 0x69686472;
+   const ossim_uint32 BPCC_TYPE      = 0x62706363;
+   const ossim_uint32 COLR_TYPE      = 0x636F6C72;
+   const ossim_uint32 PCLR_TYPE      = 0x70636C72;
+   const ossim_uint32 CMAP_TYPE      = 0x636D6170;
+   const ossim_uint32 CDEF_TYPE      = 0x63646566;
+   const ossim_uint32 RES_TYPE       = 0x72657320;
+   const ossim_uint32 RESC_TYPE      = 0x72657363;
+   const ossim_uint32 RESD_TYPE      = 0x72657364;
+   const ossim_uint32 JP2C_TYPE      = 0x6A703263;
+   const ossim_uint32 JP2I_TYPE      = 0x6A703269;
+   const ossim_uint32 XML_TYPE       = 0x786D6C20;
+   const ossim_uint32 UUID_TYPE      = 0x75756964;
+
+   if ( tbox == JP2_SIG_TYPE )
+   {
+      boxType = "jp2_sig";
+   }
+   else if ( tbox == FILE_TYPE )
+   {
+      boxType = "ftyp";
+   }
+   else if ( tbox == JP2_HDR_TYPE )
+   {
+      boxType = "jp2h";
+   }
+   else if ( tbox == IMG_HDR_TYPE )
+   {
+      boxType = "ihdr";
+   }
+   else if ( tbox == BPCC_TYPE )
+   {
+      boxType = "bpcc";
+   }
+   else if ( tbox == COLR_TYPE )
+   {
+      boxType = "colr";
+   }
+   else if ( tbox == PCLR_TYPE )
+   {
+      boxType = "pclr";
+   }
+   else if ( tbox == CMAP_TYPE )
+   {
+      boxType = "cmap";
+   }
+   else if ( tbox == CDEF_TYPE )
+   {
+      boxType = "cdef";
+   }
+   else if ( tbox == RES_TYPE )
+   {
+      boxType = "res";
+   }
+   else if ( tbox == RESC_TYPE )
+   {
+      boxType = "resc";
+   }
+   else if ( tbox == RESD_TYPE )
+   {
+      boxType = "resd";
+   }
+   else if ( tbox == JP2C_TYPE )
+   {
+      boxType = "jp2c";
+   }
+   else if ( tbox == JP2I_TYPE )
+   {
+      boxType = "jp2i";
+   }
+   else if ( tbox == XML_TYPE )
+   {
+      boxType = "xml";
+   }
+   else if ( tbox == UUID_TYPE )
+   {
+      boxType = "uuid";
+   }
+   else
+   {
+      boxType = "unhandled";
+   }
+
+   out << "jp2.box_type: " << boxType << "\n";
+}
+
diff --git a/src/ossim/support_data/ossimJpipMessage.cpp b/ossim/src/ossim/support_data/ossimJpipMessage.cpp
similarity index 100%
rename from src/ossim/support_data/ossimJpipMessage.cpp
rename to ossim/src/ossim/support_data/ossimJpipMessage.cpp
diff --git a/src/ossim/support_data/ossimJpipMessageDecoder.cpp b/ossim/src/ossim/support_data/ossimJpipMessageDecoder.cpp
similarity index 100%
rename from src/ossim/support_data/ossimJpipMessageDecoder.cpp
rename to ossim/src/ossim/support_data/ossimJpipMessageDecoder.cpp
diff --git a/ossim/src/ossim/support_data/ossimLasHdr.cpp b/ossim/src/ossim/support_data/ossimLasHdr.cpp
new file mode 100644
index 0000000..897eab1
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimLasHdr.cpp
@@ -0,0 +1,627 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimLasHdr.cpp
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Container class for LAS LIDAR format public header block.
+
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/support_data/ossimLasHdr.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimKeywordlist.h>
+
+#include <bitset>
+#include <cstring>
+#include <iomanip>
+#include <iostream>
+#include <sstream>
+
+ossimLasHdr::ossimLasHdr() :
+   m_fileSourceId(0),
+   m_globalEncoding(0),
+   m_projectIdGuidData1(0),
+   m_projectIdGuidData2(0),
+   m_projectIdGuidData3(0),
+   m_versionMajor(0),
+   m_versionMinor(0),
+   m_fileCreationDay(0),
+   m_fileCreateionYear(0),
+   m_headerSize(0),
+   m_offsetToPointData(0),
+   m_numberOfVariableLengthRecords(0),
+   m_pointDataFormatId(0),
+   m_pointDataRecordLength(0),
+   m_legacyNumberOfPointRecords(0),
+   m_xScaleFactor(0.0),
+   m_yScaleFactor(0.0),
+   m_zScaleFactor(0.0),
+   m_xOffset(0.0),
+   m_yOffset(0.0),
+   m_zOffset(0.0),
+   m_maxX(0.0),
+   m_minX(0.0),
+   m_maxY(0.0),
+   m_minY(0.0),
+   m_maxZ(0.0),
+   m_minZ(0.0),
+   m_startOfWaveformDataPacket(0),
+   m_startOfExtendedVariableLengthRecords(0),
+   m_numberOfExtendedVariableLengthRecords(0),
+   m_numberOfPointRecords(0)
+{
+   // Initialize arrays:
+   strncpy(m_fileSignature, "LASF", 4);
+   m_fileSignature[4] = '\0';
+   memset(m_projectIdGuidData4, 0, 8);
+   memset(m_systemIndentifier, 0, 32);
+   memset(m_generatingSoftware, 0, 32);
+   memset(m_legacyNumberOfPointsByReturn, 0, 20); // 5 uint32s(5 x 4)
+   memset(m_numberOfPointsByReturn, 0, 120);   // 15 unint64s(15 x 8)
+}
+
+ossimLasHdr::ossimLasHdr(const ossimLasHdr& hdr) :
+   m_fileSourceId(hdr.m_fileSourceId),
+   m_globalEncoding(hdr.m_globalEncoding),
+   m_projectIdGuidData1(hdr.m_projectIdGuidData1),
+   m_projectIdGuidData2(hdr.m_projectIdGuidData2),
+   m_projectIdGuidData3(hdr.m_projectIdGuidData3),
+   m_versionMajor(hdr.m_versionMajor),
+   m_versionMinor(hdr.m_versionMinor),
+   m_fileCreationDay(hdr.m_fileCreationDay),
+   m_fileCreateionYear(hdr.m_fileCreateionYear),
+   m_headerSize(hdr.m_headerSize),
+   m_offsetToPointData(hdr.m_offsetToPointData),
+   m_numberOfVariableLengthRecords(hdr.m_numberOfVariableLengthRecords),
+   m_pointDataFormatId(hdr.m_pointDataFormatId),
+   m_pointDataRecordLength(hdr.m_pointDataRecordLength),
+   m_legacyNumberOfPointRecords(hdr.m_legacyNumberOfPointRecords),
+   m_xScaleFactor(hdr.m_xScaleFactor),
+   m_yScaleFactor(hdr.m_yScaleFactor),
+   m_zScaleFactor(hdr.m_zScaleFactor),
+   m_xOffset(hdr.m_xOffset),
+   m_yOffset(hdr.m_yOffset),
+   m_zOffset(hdr.m_zOffset),
+   m_maxX(hdr.m_maxX),
+   m_minX(hdr.m_minX),
+   m_maxY(hdr.m_maxY),
+   m_minY(hdr.m_minY),
+   m_maxZ(hdr.m_maxZ),
+   m_minZ(hdr.m_minZ),
+   m_startOfWaveformDataPacket(hdr.m_startOfWaveformDataPacket),
+   m_startOfExtendedVariableLengthRecords(hdr.m_startOfExtendedVariableLengthRecords),
+   m_numberOfExtendedVariableLengthRecords(hdr.m_numberOfExtendedVariableLengthRecords),
+   m_numberOfPointRecords(hdr.m_numberOfPointRecords)
+{
+   // Copy arrays.
+   memcpy((void*)m_fileSignature, (void*)(hdr.m_fileSignature), 4);
+   memcpy((void*)m_projectIdGuidData4, (void*)(hdr.m_projectIdGuidData4), 8);
+   memcpy((void*)m_systemIndentifier, (void*)(hdr.m_systemIndentifier), 32);
+   memcpy((void*)m_generatingSoftware, (void*)(hdr.m_generatingSoftware), 32);
+   memcpy((void*)m_legacyNumberOfPointsByReturn, (void*)(hdr.m_legacyNumberOfPointsByReturn), 20);
+   memcpy((void*)m_numberOfPointsByReturn, (void*)(hdr.m_numberOfPointsByReturn), 120);
+}
+
+const ossimLasHdr& ossimLasHdr::operator=(const ossimLasHdr& hdr)
+{
+   if (this != &hdr)
+   {
+      m_fileSourceId = hdr.m_fileSourceId;
+      m_globalEncoding = hdr.m_globalEncoding;
+      m_projectIdGuidData1 = hdr.m_projectIdGuidData1;
+      m_projectIdGuidData2 = hdr.m_projectIdGuidData2;
+      m_projectIdGuidData3 = hdr.m_projectIdGuidData3;
+      m_versionMajor = hdr.m_versionMajor;
+      m_versionMinor = hdr.m_versionMinor;
+      strncpy(m_systemIndentifier, hdr.m_systemIndentifier, 32);
+      strncpy(m_generatingSoftware, hdr.m_generatingSoftware, 32);      
+      m_fileCreationDay = hdr.m_fileCreationDay;
+      m_fileCreateionYear = hdr.m_fileCreateionYear;
+      m_headerSize = hdr.m_headerSize;
+      m_offsetToPointData = hdr.m_offsetToPointData;
+      m_numberOfVariableLengthRecords = hdr.m_numberOfVariableLengthRecords;
+      m_pointDataFormatId = hdr.m_pointDataFormatId;
+      m_pointDataRecordLength = hdr.m_pointDataRecordLength;
+      m_legacyNumberOfPointRecords = hdr.m_legacyNumberOfPointRecords;
+      m_xScaleFactor = hdr.m_xScaleFactor;
+      m_yScaleFactor = hdr.m_yScaleFactor;
+      m_zScaleFactor = hdr.m_zScaleFactor;
+      m_xOffset = hdr.m_xOffset;
+      m_yOffset = hdr.m_yOffset;
+      m_zOffset = hdr.m_zOffset;
+      m_maxX = hdr.m_maxX;
+      m_minX = hdr.m_minX;
+      m_maxY = hdr.m_maxY;
+      m_minY = hdr.m_minY;
+      m_maxZ = hdr.m_maxZ;
+      m_minZ = hdr.m_minZ;
+      m_startOfWaveformDataPacket = hdr.m_startOfWaveformDataPacket;
+      m_startOfExtendedVariableLengthRecords = hdr.m_startOfExtendedVariableLengthRecords;
+      m_numberOfExtendedVariableLengthRecords = hdr.m_numberOfExtendedVariableLengthRecords;
+      m_numberOfPointRecords = hdr.m_numberOfPointRecords;
+
+      // Copy arrays.
+      memcpy((void*)m_fileSignature,(void*)(hdr.m_fileSignature), 4);
+      memcpy((void*)m_projectIdGuidData4, (void*)(hdr.m_projectIdGuidData4), 8);
+      memcpy((void*)m_systemIndentifier, (void*)(hdr.m_systemIndentifier), 32);
+      memcpy((void*)m_generatingSoftware, (void*)(hdr.m_generatingSoftware), 32);
+      memcpy((void*)m_legacyNumberOfPointsByReturn,
+             (void*)(hdr.m_legacyNumberOfPointsByReturn), 20);
+      memcpy((void*)m_numberOfPointsByReturn, (void*)(hdr.m_numberOfPointsByReturn), 120);
+   }
+   return *this;
+}
+
+ossimLasHdr::~ossimLasHdr()
+{
+}
+
+bool ossimLasHdr::checkSignature(std::istream& in) const
+{
+   bool result = false;
+   char SIG[4];
+   in.read(SIG, 4);
+   if ( (SIG[0] == 'L') && (SIG[1] == 'A') &&
+        (SIG[2] == 'S') && (SIG[3] == 'F') )
+   {
+      result = true;
+   }
+   return result;
+}
+
+void ossimLasHdr::readStream(std::istream& in)
+{
+   in.read(m_fileSignature, 4);
+   in.read((char*)&m_fileSourceId, 2);
+   in.read((char*)&m_globalEncoding, 2);
+   in.read((char*)&m_projectIdGuidData1, 4);
+   in.read((char*)&m_projectIdGuidData2, 2);
+   in.read((char*)&m_projectIdGuidData3, 2);
+   in.read((char*)&m_projectIdGuidData4, 8);
+   in.read((char*)&m_versionMajor, 1);
+   in.read((char*)&m_versionMinor, 1);
+   in.read(m_systemIndentifier, 32);
+   in.read(m_generatingSoftware, 32);
+   in.read((char*)&m_fileCreationDay, 2);
+   in.read((char*)&m_fileCreateionYear, 2);
+   in.read((char*)&m_headerSize, 2);
+   in.read((char*)&m_offsetToPointData, 4);
+   in.read((char*)&m_numberOfVariableLengthRecords, 4);
+   in.read((char*)&m_pointDataFormatId, 1);
+   in.read((char*)&m_pointDataRecordLength, 2);
+   in.read((char*)&m_legacyNumberOfPointRecords, 4);
+   in.read((char*)&m_legacyNumberOfPointsByReturn, 20);
+   in.read((char*)&m_xScaleFactor, 8);
+   in.read((char*)&m_yScaleFactor, 8);
+   in.read((char*)&m_zScaleFactor, 8);
+   in.read((char*)&m_xOffset, 8);
+   in.read((char*)&m_yOffset, 8);
+   in.read((char*)&m_zOffset, 8);
+   in.read((char*)&m_maxX, 8);
+   in.read((char*)&m_minX, 8);
+   in.read((char*)&m_maxY, 8);
+   in.read((char*)&m_minY, 8);
+   in.read((char*)&m_maxZ, 8);
+   in.read((char*)&m_minZ, 8);
+
+   // Version specific:
+   if ( versionGreaterThan( 1, 2 ) )
+   {
+      // Added in 1.3:
+      in.read((char*)&m_startOfWaveformDataPacket, 8);
+   }
+   if ( versionGreaterThan( 1, 3 ) )
+   {
+      // Added in 1.4:
+      in.read((char*)&m_startOfExtendedVariableLengthRecords, 8);
+      in.read((char*)&m_numberOfExtendedVariableLengthRecords, 4);
+      in.read((char*)&m_numberOfPointRecords, 8);
+      in.read((char*)&m_numberOfPointsByReturn, 120);
+   }
+
+   if ( ossim::byteOrder() == OSSIM_BIG_ENDIAN )
+   {
+      swap();
+   }
+
+   if ( !versionGreaterThan( 1, 3 ) ) // Less than 1.4
+   {
+      //---
+      // Copy legacy point count to 64 bit data members. This will allow LAS code
+      // to always go through same methods for point counts.
+      //---
+      m_numberOfPointRecords = m_legacyNumberOfPointRecords;
+      for ( ossim_uint32 i = 0; i < 5; ++i )
+      {
+         m_numberOfPointsByReturn[i] = m_legacyNumberOfPointsByReturn[i];
+      }
+   }
+}
+
+void ossimLasHdr::writeStream(std::ostream& out)
+{
+   if ( ossim::byteOrder() == OSSIM_BIG_ENDIAN )
+   {
+      // Write little endian per spec.
+      swap();
+   }
+   
+   out.write(m_fileSignature, 4);
+   out.write((char*)&m_fileSourceId, 2);
+   out.write((char*)&m_globalEncoding, 2);
+   out.write((char*)&m_projectIdGuidData1, 4);
+   out.write((char*)&m_projectIdGuidData2, 2);
+   out.write((char*)&m_projectIdGuidData3, 2);
+   out.write((char*)&m_projectIdGuidData4, 8);
+   out.write((char*)&m_versionMajor, 1);
+   out.write((char*)&m_versionMinor, 1);
+   out.write(m_systemIndentifier, 32);
+   out.write(m_generatingSoftware, 32);
+   out.write((char*)&m_fileCreationDay, 2);
+   out.write((char*)&m_fileCreateionYear, 2);
+   out.write((char*)&m_headerSize, 2);
+   out.write((char*)&m_offsetToPointData, 4);
+   out.write((char*)&m_numberOfVariableLengthRecords, 4);
+   out.write((char*)&m_pointDataFormatId, 1);
+   out.write((char*)&m_pointDataRecordLength, 2);
+   out.write((char*)&m_legacyNumberOfPointRecords, 4);
+   out.write((char*)&m_legacyNumberOfPointsByReturn, 20);
+   out.write((char*)&m_xScaleFactor, 8);
+   out.write((char*)&m_yScaleFactor, 8);
+   out.write((char*)&m_zScaleFactor, 8);
+   out.write((char*)&m_xOffset, 8);
+   out.write((char*)&m_yOffset, 8);
+   out.write((char*)&m_zOffset, 8);
+   out.write((char*)&m_maxX, 8);
+   out.write((char*)&m_minX, 8);
+   out.write((char*)&m_maxY, 8);
+   out.write((char*)&m_minY, 8);
+   out.write((char*)&m_maxZ, 8);
+   out.write((char*)&m_minZ, 8);
+
+   if ( versionGreaterThan( 1, 2 ) )
+   {
+      // Added in 1.3:
+      out.write((char*)&m_startOfWaveformDataPacket, 8);
+   }
+   if ( versionGreaterThan( 1, 3 ) )
+   {
+      // Added in 1.4:
+      out.write((char*)&m_startOfExtendedVariableLengthRecords, 8);
+      out.write((char*)&m_numberOfExtendedVariableLengthRecords, 4);
+      out.write((char*)&m_numberOfPointRecords, 8);
+      out.write((char*)&m_numberOfPointsByReturn, 120);
+   }
+
+   if ( ossim::byteOrder() == OSSIM_BIG_ENDIAN )
+   {
+      // Swap back to native byte order if needed:
+      swap();
+   }
+}
+
+std::ostream& ossimLasHdr::print(std::ostream& out) const
+{
+   ossimKeywordlist kwl;
+   getKeywordlist( kwl );
+   return out << kwl;
+}
+
+std::ostream& operator<<(std::ostream& out, const ossimLasHdr& hdr)
+{
+   return hdr.print(out);
+}
+
+void ossimLasHdr::getKeywordlist(ossimKeywordlist& kwl) const
+{
+   kwl.add("las.file_source_id", m_fileSourceId);
+
+   //---
+   // m_globalEncoding is a bit encoding so we output bit at a time:
+   // At the time of this coding only first four bits used.
+   //---
+
+   // 1.2:
+   kwl.add("las.gps_time_type", (getGpsTimeTypeBit()?"1":"0") );
+
+   if ( versionGreaterThan( 1, 2 ) )
+   {
+      // Added in 1.3:
+      kwl.add("las.waveform_data_packets_internal", (getWaveforDataPacketsInternalBit()?"1":"0") );
+      kwl.add("las.waveform_data_packets_external", (getWaveforDataPacketsExternalBit()?"1":"0") );
+      kwl.add("las.synthetically_generated", (getReturnsSyntheticallyGeneratedBit()?"1":"0") );
+   }
+
+   if (  versionGreaterThan( 1, 3 ) )
+   {
+      // 1.4:
+      kwl.add("las.wkt", (getWktBit()?"1":"0") );
+   }
+   
+   kwl.add("las.project_id_guid", getProjectIdGuid().c_str());
+
+   kwl.add("las.version", getVersion().c_str());
+
+   kwl.add("las.system_indentifier", getSystemIndentifier().c_str());
+   kwl.add("las.generating_software", getGeneratingSoftware().c_str());
+
+   kwl.add("las.file_creation_day", m_fileCreationDay);
+   kwl.add("las.file_creation_year", m_fileCreateionYear);
+
+   kwl.add("las.header_size", m_headerSize);
+   kwl.add("las.offset_to_point_data", m_offsetToPointData );
+   kwl.add("las.number_of_variable_length_records", m_numberOfVariableLengthRecords);
+   kwl.add("las.point_data_format_id", m_pointDataFormatId);
+   kwl.add("las.point_data_record_length", m_pointDataRecordLength);
+
+   kwl.add("las.x_scale_factor", m_xScaleFactor);
+   kwl.add("las.y_scale_factor", m_yScaleFactor);
+   kwl.add("las.z_scale_factor", m_zScaleFactor);
+
+   kwl.add("las.x_offset", m_xOffset);
+   kwl.add("las.y_offset", m_yOffset);
+   kwl.add("las.z_offset", m_zOffset);
+   
+   kwl.add("las.max_x", m_maxX);
+   kwl.add("las.min_x", m_minX);
+   kwl.add("las.max_y", m_maxY);
+   kwl.add("las.min_y", m_minY);
+   kwl.add("las.max_z", m_maxZ);
+   kwl.add("las.min_z", m_minZ);
+
+   kwl.add("las.start_of_wave_form_data", m_startOfWaveformDataPacket);
+
+   if ( versionGreaterThan( 1, 3 ) )
+   {
+      kwl.add("las.number_of_point_records", m_numberOfPointRecords);
+      for (ossim_uint32 i = 0; i < 15; ++i)
+      {
+         std::ostringstream os;
+         os << "las.number_of_points_return" << (i+1);
+         kwl.add( os.str().c_str(), m_numberOfPointsByReturn[i] );
+      }
+   }
+   else
+   {
+      // Prior to 1.4:
+      kwl.add("las.number_of_point_records", m_legacyNumberOfPointRecords);
+      for (ossim_uint32 i = 0; i < 5; ++i)
+      {
+         std::ostringstream os;
+         os << "las.number_of_points_return" << (i+1);
+         kwl.add( os.str().c_str(), m_legacyNumberOfPointsByReturn[i] );
+      } 
+   }
+}
+
+bool ossimLasHdr::getGpsTimeTypeBit() const
+{
+   // Test the first bit:
+   std::bitset<1> bs( m_globalEncoding );
+   return bs.test(0);
+}
+
+bool ossimLasHdr::getWaveforDataPacketsInternalBit() const
+{
+   // Test the second bit:
+   std::bitset<2> bs( m_globalEncoding );
+   return bs.test(1);
+}
+
+bool ossimLasHdr::getWaveforDataPacketsExternalBit() const
+{
+   // Test the third bit:
+   std::bitset<3> bs( m_globalEncoding );
+   return bs.test(2);
+}
+
+bool ossimLasHdr::getReturnsSyntheticallyGeneratedBit() const
+{
+   // Test the fourth bit:
+   std::bitset<4> bs( m_globalEncoding );
+   return bs.test(3);
+}
+
+bool ossimLasHdr::getWktBit() const
+{
+   // Test the fith bit:
+   std::bitset<5> bs( m_globalEncoding );
+   return bs.test(4); 
+}
+
+std::string ossimLasHdr::getProjectIdGuid() const
+{
+   std::ostringstream os;
+   os << std::hex
+      << m_projectIdGuidData1 << "-"
+      << m_projectIdGuidData2 << "-"
+      << m_projectIdGuidData3 << "-";
+   for (int i=0; i<8; ++i)
+   {
+      ossim_uint16 uid = m_projectIdGuidData4[i];
+      os << uid;
+   }
+   return os.str();
+}
+
+std::string ossimLasHdr::getVersion() const
+{
+   std::ostringstream os;
+   os << int(m_versionMajor) << "." << int(m_versionMinor);
+   return os.str();
+}
+
+std::string  ossimLasHdr::getSystemIndentifier() const
+{
+   std::string s;
+   s.reserve(32);
+   for (int i=0; i<32; ++i)
+   {
+      s.push_back(m_systemIndentifier[i]);
+   }
+   return s;
+}
+
+std::string  ossimLasHdr::getGeneratingSoftware() const
+{
+   std::string s;
+   s.reserve(32);
+   for (int i=0; i<32; ++i)
+   {
+      s.push_back(m_generatingSoftware[i]);
+   }
+   return s;
+}
+
+ossim_uint16 ossimLasHdr::getHeaderSize() const
+{
+   return m_headerSize;
+}
+
+ossim_uint32 ossimLasHdr::getOffsetToPointData() const
+{
+   return m_offsetToPointData;
+}
+
+ossim_uint32 ossimLasHdr::getNumberOfVlrs() const
+{
+   return m_numberOfVariableLengthRecords;
+}
+
+ossim_uint8 ossimLasHdr::getPointDataFormatId() const
+{
+   return m_pointDataFormatId;
+}
+
+ossim_uint64 ossimLasHdr::getNumberOfPoints() const
+{
+   return m_numberOfPointRecords;
+}
+
+ossim_uint64 ossimLasHdr::getNumberOfPoints(ossim_uint32 entry) const
+{
+   ossim_uint64 result = 0;
+   if ( entry < 15 )
+   {
+      result = m_numberOfPointsByReturn[entry];
+   }
+   return result;
+}
+
+const ossim_float64& ossimLasHdr::getScaleFactorX() const
+{
+   return m_xScaleFactor;
+}
+
+const ossim_float64& ossimLasHdr::getScaleFactorY() const
+{
+   return m_yScaleFactor;
+}
+
+const ossim_float64& ossimLasHdr::getScaleFactorZ() const
+{
+   return m_zScaleFactor;
+}
+
+const ossim_float64& ossimLasHdr::getOffsetX() const
+{
+   return m_xOffset;
+}
+
+const ossim_float64& ossimLasHdr::getOffsetY() const
+{
+   return m_yOffset;
+}
+
+const ossim_float64& ossimLasHdr::getOffsetZ() const
+{
+   return m_zOffset;
+}
+
+const ossim_float64& ossimLasHdr::getMinX() const
+{
+   return m_minX;
+}
+
+const ossim_float64& ossimLasHdr::getMinY() const
+{
+   return m_minY;
+}
+
+const ossim_float64& ossimLasHdr::getMinZ() const
+{
+   return m_minZ;
+}
+
+const ossim_float64& ossimLasHdr::getMaxX() const
+{
+   return m_maxX;
+}
+
+const ossim_float64& ossimLasHdr::getMaxY() const
+{
+   return m_maxY;
+}
+
+const ossim_float64& ossimLasHdr::getMaxZ() const
+{
+   return m_maxZ;
+}
+
+void ossimLasHdr::swap()
+{
+   ossimEndian endian;
+   endian.swap(m_fileSourceId);
+   endian.swap(m_globalEncoding);
+   endian.swap(m_projectIdGuidData1);
+   endian.swap(m_projectIdGuidData2);
+   endian.swap(m_projectIdGuidData3);
+   endian.swap(m_fileCreationDay);
+   endian.swap(m_fileCreateionYear);
+   endian.swap(m_headerSize);
+   endian.swap(m_offsetToPointData);
+   endian.swap(m_numberOfVariableLengthRecords);
+   endian.swap(m_pointDataRecordLength);
+   endian.swap(m_legacyNumberOfPointRecords);
+   endian.swap(m_legacyNumberOfPointsByReturn, 5);
+   endian.swap(m_xScaleFactor);
+   endian.swap(m_yScaleFactor);
+   endian.swap(m_zScaleFactor);
+   endian.swap(m_xOffset);
+   endian.swap(m_yOffset);
+   endian.swap(m_zOffset);
+   endian.swap(m_maxX);
+   endian.swap(m_minX);
+   endian.swap(m_maxY);
+   endian.swap(m_minY);
+   endian.swap(m_maxZ);
+   endian.swap(m_minZ);
+   endian.swap(m_startOfWaveformDataPacket);
+   endian.swap(m_startOfExtendedVariableLengthRecords);
+   endian.swap(m_numberOfExtendedVariableLengthRecords);
+   endian.swap(m_numberOfPointRecords);
+   endian.swap(m_numberOfPointsByReturn, 15);
+}
+
+bool ossimLasHdr::versionGreaterThan( ossim_uint8 major, ossim_uint8 minor ) const
+{
+   bool result = false;
+   if ( m_versionMajor == major )
+   {
+      result = m_versionMinor > minor;
+   }
+   else if ( m_versionMajor > major )
+   {
+      result = true;
+   }
+   return result;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimLasInfo.cpp b/ossim/src/ossim/support_data/ossimLasInfo.cpp
new file mode 100644
index 0000000..a022ab1
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimLasInfo.cpp
@@ -0,0 +1,60 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimLibLasInfo.cpp
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: LAS LIDAR info object.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/support_data/ossimLasInfo.h>
+#include <ossim/support_data/ossimLasHdr.h>
+
+#include <fstream>
+
+ossimLasInfo::ossimLasInfo()
+   : m_file()
+{
+}
+
+ossimLasInfo::~ossimLasInfo()
+{
+}
+
+bool ossimLasInfo::open(const ossimFilename& file)
+{
+   bool result = false;
+   std::ifstream istr;
+   istr.open(file.c_str(), std::ios_base::in | std::ios_base::binary);
+   if ( istr.is_open() )
+   {
+      ossimLasHdr hdr;
+      result = hdr.checkSignature(istr);
+      if (result) m_file = file;
+   }
+   return result;
+}
+
+std::ostream& ossimLasInfo::print(std::ostream& out) const
+{
+   std::ifstream istr;
+   istr.open(m_file.c_str(), std::ios_base::in | std::ios_base::binary);
+   if ( istr.is_open() )
+   {
+      ossimLasHdr hdr;
+      if ( hdr.checkSignature(istr) )
+      {
+         istr.seekg(0, std::ios_base::beg);
+         hdr.readStream(istr);
+         hdr.print(out);
+      }
+   }
+   return out;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfAcftbTag.cpp b/ossim/src/ossim/support_data/ossimNitfAcftbTag.cpp
new file mode 100644
index 0000000..623c976
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfAcftbTag.cpp
@@ -0,0 +1,265 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: ACFTB - Aircraft Infomation Extension Format tag class
+// declaration.
+//
+// See document STDI-0002 (version 3), Appendix E, Table E-6 for more info.
+// 
+//----------------------------------------------------------------------------
+// $Id
+
+#include <cstring>
+#include <istream>
+#include <iostream>
+#include <iomanip>
+
+#include <ossim/support_data/ossimNitfAcftbTag.h>
+
+
+RTTI_DEF1(ossimNitfAcftbTag, "ossimNitfAcftbTag", ossimNitfRegisteredTag);
+
+ossimNitfAcftbTag::ossimNitfAcftbTag()
+   : ossimNitfRegisteredTag(std::string("ACFTB"), CEL_SIZE)
+{
+   clearFields();
+}
+
+ossimNitfAcftbTag::~ossimNitfAcftbTag()
+{
+}
+
+void ossimNitfAcftbTag::parseStream(std::istream& in)
+{
+   clearFields();
+
+   in.read(theAcMsnId, AC_MSN_ID_SIZE);
+   in.read(theAcTailNo, AC_TAIL_NO_SIZE);
+   in.read(theAcTo, AC_TO_SIZE);
+   in.read(theSensorIdType, SENSOR_ID_TYPE_SIZE);
+   in.read(theSensorId, SENSOR_ID_SIZE);
+   in.read(theSceneSource, SCENE_SOURCE_SIZE);
+   in.read(theScNum, SCNUM_SIZE);
+   in.read(thePDate, PDATE_SIZE);
+   in.read(theImHostNo, IMHOSTNO_SIZE);
+   in.read(theImReqID, IMREQID_SIZE);
+   in.read(theMPlan, MPLAN_SIZE);
+   in.read(theEntLoc, ENTLOC_SIZE);
+   in.read(theLocAccy, LOC_ACCY_SIZE);
+   in.read(theEntelv, ENTELV_SIZE);
+   in.read(theElvUnit, ELV_UNIT_SIZE);
+   in.read(theExitLoc, EXITLOC_SIZE);
+   in.read(theExitElev, EXITELV_SIZE);
+   in.read(theTMap, TMAP_SIZE);
+   in.read(theRowSpacing, ROW_SPACING_SIZE);
+   in.read(theRowSpacingUnits, ROW_SPACING_UNITS_SIZE);
+   in.read(theColSpacing, COL_SPACING_SIZE);
+   in.read(theColSpacingUnits, COL_SPACING_UINTS_SIZE);
+   in.read(theFocalLength, FOCAL_LENGTH_SIZE);
+   in.read(theSenserial, SENSERIAL_SIZE);
+   in.read(theAbSwVer, ABSWVER_SIZE);
+   in.read(theCalDate, CAL_DATE_SIZE);
+   in.read(thePatchTot, PATCH_TOT_SIZE);
+   in.read(theMtiTot, MTI_TOT_SIZE);
+}
+
+void ossimNitfAcftbTag::writeStream(std::ostream& out)
+{
+   out.write(theAcMsnId, AC_MSN_ID_SIZE);
+   out.write(theAcTailNo, AC_TAIL_NO_SIZE);
+   out.write(theAcTo, AC_TO_SIZE);
+   out.write(theSensorIdType, SENSOR_ID_TYPE_SIZE);
+   out.write(theSensorId, SENSOR_ID_SIZE);
+   out.write(theSceneSource, SCENE_SOURCE_SIZE);
+   out.write(theScNum, SCNUM_SIZE);
+   out.write(thePDate, PDATE_SIZE);
+   out.write(theImHostNo, IMHOSTNO_SIZE);
+   out.write(theImReqID, IMREQID_SIZE);
+   out.write(theMPlan, MPLAN_SIZE);
+   out.write(theEntLoc, ENTLOC_SIZE);
+   out.write(theLocAccy, LOC_ACCY_SIZE);
+   out.write(theEntelv, ENTELV_SIZE);
+   out.write(theElvUnit, ELV_UNIT_SIZE);
+   out.write(theExitLoc, EXITLOC_SIZE);
+   out.write(theExitElev, EXITELV_SIZE);
+   out.write(theTMap, TMAP_SIZE);
+   out.write(theRowSpacing, ROW_SPACING_SIZE);
+   out.write(theRowSpacingUnits, ROW_SPACING_UNITS_SIZE);
+   out.write(theColSpacing, COL_SPACING_SIZE);
+   out.write(theColSpacingUnits, COL_SPACING_UINTS_SIZE);
+   out.write(theFocalLength, FOCAL_LENGTH_SIZE);
+   out.write(theSenserial, SENSERIAL_SIZE);
+   out.write(theAbSwVer, ABSWVER_SIZE);
+   out.write(theCalDate, CAL_DATE_SIZE);
+   out.write(thePatchTot, PATCH_TOT_SIZE);
+   out.write(theMtiTot, MTI_TOT_SIZE);
+}
+
+void ossimNitfAcftbTag::clearFields()
+{
+   // BCS-N's to '0's, BCS-A's to ' '(spaces)
+
+   // clear
+   memset(theAcMsnId, ' ', AC_MSN_ID_SIZE);
+   memset(theAcTailNo, ' ', AC_TAIL_NO_SIZE);
+   memset(theAcTo, ' ', AC_TO_SIZE);
+   memset(theSensorIdType, ' ', SENSOR_ID_TYPE_SIZE);
+   memset(theSensorId, ' ', SENSOR_ID_SIZE);
+   memset(theSceneSource, ' ', SCENE_SOURCE_SIZE);
+   memset(theScNum, ' ', SCNUM_SIZE);
+   memset(thePDate, ' ', PDATE_SIZE);
+   memset(theImHostNo, ' ', IMHOSTNO_SIZE);
+   memset(theImReqID, ' ', IMREQID_SIZE);
+   memset(theMPlan, ' ', MPLAN_SIZE);
+   memset(theEntLoc, ' ', ENTLOC_SIZE);
+   memset(theLocAccy, ' ', LOC_ACCY_SIZE);
+   memset(theEntelv, ' ', ENTELV_SIZE);
+   memset(theElvUnit, ' ', ELV_UNIT_SIZE);
+   memset(theExitLoc, ' ', EXITLOC_SIZE);
+   memset(theExitElev, ' ', EXITELV_SIZE);
+   memset(theTMap, ' ', TMAP_SIZE);
+   memset(theRowSpacing, ' ', ROW_SPACING_SIZE);
+   memset(theRowSpacingUnits, ' ', ROW_SPACING_UNITS_SIZE);
+   memset(theColSpacing, ' ', COL_SPACING_SIZE);
+   memset(theColSpacingUnits, ' ', COL_SPACING_UINTS_SIZE);
+   memset(theFocalLength, ' ', FOCAL_LENGTH_SIZE);
+   memset(theSenserial, ' ', SENSERIAL_SIZE);
+   memset(theAbSwVer, ' ', ABSWVER_SIZE);
+   memset(theCalDate, ' ', CAL_DATE_SIZE);
+   memset(thePatchTot, ' ', PATCH_TOT_SIZE);
+   memset(theMtiTot, ' ', MTI_TOT_SIZE);
+
+
+   // null terminate
+   theAcMsnId[AC_MSN_ID_SIZE] = '\0';
+   theAcTailNo[AC_TAIL_NO_SIZE] = '\0';
+   theAcTo[AC_TO_SIZE] = '\0';
+   theSensorIdType[SENSOR_ID_TYPE_SIZE] = '\0';
+   theSensorId[SENSOR_ID_SIZE] = '\0';
+   theSceneSource[SCENE_SOURCE_SIZE] = '\0';
+   theScNum[SCNUM_SIZE] = '\0';
+   thePDate[PDATE_SIZE] = '\0';
+   theImHostNo[IMHOSTNO_SIZE] = '\0';
+   theImReqID[IMREQID_SIZE] = '\0';
+   theMPlan[MPLAN_SIZE] = '\0';
+   theEntLoc[ENTLOC_SIZE] = '\0';
+   theLocAccy[LOC_ACCY_SIZE] = '\0';
+   theEntelv[ENTELV_SIZE] = '\0';
+   theElvUnit[ELV_UNIT_SIZE] = '\0';
+   theExitLoc[EXITLOC_SIZE] = '\0';
+   theExitElev[EXITELV_SIZE] = '\0';
+   theTMap[TMAP_SIZE] = '\0';
+   theRowSpacing[ROW_SPACING_SIZE] = '\0';
+   theRowSpacingUnits[ROW_SPACING_UNITS_SIZE] = '\0';
+   theColSpacing[COL_SPACING_SIZE] = '\0';
+   theColSpacingUnits[COL_SPACING_UINTS_SIZE] = '\0';
+   theFocalLength[FOCAL_LENGTH_SIZE] = '\0';
+   theSenserial[SENSERIAL_SIZE] = '\0';
+   theAbSwVer[ABSWVER_SIZE] = '\0';
+   theCalDate[CAL_DATE_SIZE] = '\0';
+   thePatchTot[PATCH_TOT_SIZE] = '\0';
+   theMtiTot[MTI_TOT_SIZE] = '\0';
+}
+
+ossimString ossimNitfAcftbTag::getFocalLength()const
+{
+   return ossimString(theFocalLength);
+}
+
+ossimString ossimNitfAcftbTag::getColumnSpacing()const
+{
+   return ossimString(theColSpacing);
+}
+
+ossimString ossimNitfAcftbTag::getColumnSpacingUnits()const
+{
+   return ossimString(theColSpacingUnits);
+}
+
+ossimString ossimNitfAcftbTag::getRowSpacing()const
+{
+   return ossimString(theRowSpacing);
+}
+
+ossimString ossimNitfAcftbTag::getRowSpacingUnits()const
+{
+   return ossimString(theRowSpacingUnits);
+}
+
+
+std::ostream& ossimNitfAcftbTag::print(
+   std::ostream& out, const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+   
+   out << setiosflags(std::ios::left)
+       << pfx << std::setw(24) << "CETAG:"
+       << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
+       << pfx << std::setw(24) << "AC_MSN_ID:"
+       << theAcMsnId << "\n"
+       << pfx << std::setw(24) << "AC_TAIL_NO:"
+       << theAcTailNo << "\n"
+       << pfx << std::setw(24) << "AC_TO:"
+       << theAcTo << "\n"
+       << pfx << std::setw(24) << "SENSOR_ID_TYPE:"
+       << theSensorIdType << "\n"
+       << pfx << std::setw(24) << "SENSOR_ID:"
+       << theSensorId << "\n"
+       << pfx << std::setw(24) << "SCENE_SOURCE:"
+       << theSceneSource << "\n"
+       << pfx << std::setw(24) << "SCNUM:"
+       << theScNum << "\n"
+       << pfx << std::setw(24) << "PDATE:"
+       << thePDate << "\n"
+       << pfx << std::setw(24) << "IMHOSTNO:"
+       << theImHostNo << "\n"
+       << pfx << std::setw(24) << "IMREQID:"
+       << theImReqID << "\n"
+       << pfx << std::setw(24) << "MPLAN:"
+       << theMPlan << "\n"
+       << pfx << std::setw(24) << "ENTLOC:"
+       << theEntLoc << "\n"
+       << pfx << std::setw(24) << "LOC_ACCY:"
+       << theLocAccy << "\n"
+       << pfx << std::setw(24) << "ENTELV:"
+       << theEntelv << "\n"
+       << pfx << std::setw(24) << "ELV_UNIT:"
+       << theElvUnit << "\n"
+       << pfx << std::setw(24) << "EXITLOC:"
+       << theExitLoc << "\n"
+       << pfx << std::setw(24) << "EXITELV:"
+       << theExitElev << "\n"
+       << pfx << std::setw(24) << "TMAP:"
+       << theTMap << "\n"
+       << pfx << std::setw(24) << "ROW_SPACING:"
+       << theRowSpacing << "\n"
+       << pfx << std::setw(24) << "ROW_SPACING_UNITS:"
+       << theRowSpacingUnits << "\n"
+       << pfx << std::setw(24) << "COL_SPACING:"
+       << theColSpacing << "\n"
+       << pfx << std::setw(24) << "COL_SPACING_UINTS:"
+       << theColSpacingUnits << "\n"
+       << pfx << std::setw(24) << "FOCAL_LENGTH:"
+       << theFocalLength << "\n"
+       << pfx << std::setw(24) << "SENSERIAL:"
+       << theSenserial << "\n"
+       << pfx << std::setw(24) << "ABSWVER:"
+       << theAbSwVer << "\n"
+       << pfx << std::setw(24) << "CAL_DATE:"
+       << theCalDate << "\n"
+       << pfx << std::setw(24) << "PATCH_TOT:"
+       << thePatchTot << "\n"
+       << pfx << std::setw(24) << "MTI_TOT:"
+       << theMtiTot << "\n";
+   
+   return out;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfAimidbTag.cpp b/ossim/src/ossim/support_data/ossimNitfAimidbTag.cpp
new file mode 100644
index 0000000..b8b9a4f
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfAimidbTag.cpp
@@ -0,0 +1,172 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: AIMIDB - Additional Image ID Extension Format tag class
+// definition.
+//
+// See document STDI-0002 (version 3), Appendix E, Table E-3 for more info.
+// 
+//----------------------------------------------------------------------------
+// $Id
+
+#include <cstring>
+#include <istream>
+#include <iostream>
+#include <iomanip>
+
+#include <ossim/support_data/ossimNitfAimidbTag.h>
+
+
+RTTI_DEF1(ossimNitfAimidbTag, "ossimNitfAimidbTag", ossimNitfRegisteredTag);
+
+ossimNitfAimidbTag::ossimNitfAimidbTag()
+   : ossimNitfRegisteredTag(std::string("AIMIDB"), CEL_SIZE)
+{
+   clearFields();
+}
+
+ossimNitfAimidbTag::~ossimNitfAimidbTag()
+{
+}
+
+void ossimNitfAimidbTag::parseStream(std::istream& in)
+{
+   clearFields();
+
+   in.read(theAcquisitionDate, ACQUISITION_DATE_SIZE);
+   in.read(theMissionNumber, MISSION_NO_SIZE);
+   in.read(theMissionIdentification, MISSION_IDENTIFICATION_SIZE);
+   in.read(theFlightNo, FLIGHT_NO_SIZE);
+   in.read(theOpNum, OP_NUM_SIZE);
+   in.read(theCurrentSegment, CURRENT_SEGMENT_SIZE);
+   in.read(theReproNum, REPRO_NUM_SIZE);
+   in.read(theReplay, REPLAY_SIZE);
+   in.read(theReserved1, RESERVED_1_SIZE);
+   in.read(theStartTileColumn, START_TILE_COLUMN_SIZE);
+   in.read(theStartTileRow, START_TILE_ROW_SIZE);
+   in.read(theEndSegment, END_SEGMENT_SIZE);
+   in.read(theTileColumn, END_TILE_COLUMN_SIZE);
+   in.read(theTileRow, END_TILE_ROW_SIZE);
+   in.read(theCountry, COUNTRY_SIZE);
+   in.read(theReserved2, RESERVED_2_SIZE);
+   in.read(theLocation, LOCATION_SIZE);
+   in.read(theReserved3, RESERVED_3_SIZE);
+}
+
+void ossimNitfAimidbTag::writeStream(std::ostream& out)
+{
+   out.write(theAcquisitionDate, ACQUISITION_DATE_SIZE);
+   out.write(theMissionNumber, MISSION_NO_SIZE);
+   out.write(theMissionIdentification, MISSION_IDENTIFICATION_SIZE);
+   out.write(theFlightNo, FLIGHT_NO_SIZE);
+   out.write(theOpNum, OP_NUM_SIZE);
+   out.write(theCurrentSegment, CURRENT_SEGMENT_SIZE);
+   out.write(theReproNum, REPRO_NUM_SIZE);
+   out.write(theReplay, REPLAY_SIZE);
+   out.write(theReserved1, RESERVED_1_SIZE);
+   out.write(theStartTileColumn, START_TILE_COLUMN_SIZE);
+   out.write(theStartTileRow, START_TILE_ROW_SIZE);
+   out.write(theEndSegment, END_SEGMENT_SIZE);
+   out.write(theTileColumn, END_TILE_COLUMN_SIZE);
+   out.write(theTileRow, END_TILE_ROW_SIZE);
+   out.write(theCountry, COUNTRY_SIZE);
+   out.write(theReserved2, RESERVED_2_SIZE);
+   out.write(theLocation, LOCATION_SIZE);
+   out.write(theReserved3, RESERVED_3_SIZE);
+}
+
+void ossimNitfAimidbTag::clearFields()
+{
+   // BCS-N's to '0's, BCS-A's to ' '(spaces)
+
+   // clear
+   memset(theAcquisitionDate, ' ', ACQUISITION_DATE_SIZE);
+   memset(theMissionNumber, ' ', MISSION_NO_SIZE);
+   memset(theMissionIdentification, ' ', MISSION_IDENTIFICATION_SIZE);
+   memset(theFlightNo, ' ', FLIGHT_NO_SIZE);
+   memset(theOpNum, ' ', OP_NUM_SIZE);
+   memset(theCurrentSegment, ' ', CURRENT_SEGMENT_SIZE);
+   memset(theReproNum, ' ', REPRO_NUM_SIZE);
+   memset(theReplay, ' ', REPLAY_SIZE);
+   memset(theReserved1, ' ', RESERVED_1_SIZE);
+   memset(theStartTileColumn, ' ', START_TILE_COLUMN_SIZE);
+   memset(theStartTileRow, ' ', START_TILE_ROW_SIZE);
+   memset(theEndSegment, ' ', END_SEGMENT_SIZE);
+   memset(theTileColumn, ' ', END_TILE_COLUMN_SIZE);
+   memset(theTileRow, ' ', END_TILE_ROW_SIZE);
+   memset(theCountry, ' ', COUNTRY_SIZE);
+   memset(theReserved2, ' ', RESERVED_2_SIZE);
+   memset(theLocation, ' ', LOCATION_SIZE);
+   memset(theReserved3, ' ', RESERVED_3_SIZE);
+
+   // null terminate
+   theAcquisitionDate[ACQUISITION_DATE_SIZE] = '\0';
+   theMissionNumber[MISSION_NO_SIZE] = '\0';
+   theMissionIdentification[MISSION_IDENTIFICATION_SIZE] = '\0';
+   theFlightNo[FLIGHT_NO_SIZE] = '\0';
+   theOpNum[OP_NUM_SIZE] = '\0';
+   theCurrentSegment[CURRENT_SEGMENT_SIZE] = '\0';
+   theReproNum[REPRO_NUM_SIZE] = '\0';
+   theReplay[REPLAY_SIZE] = '\0';
+   theReserved1[RESERVED_1_SIZE] = '\0';
+   theStartTileColumn[START_TILE_COLUMN_SIZE] = '\0';
+   theStartTileRow[START_TILE_ROW_SIZE] = '\0';
+   theEndSegment[END_SEGMENT_SIZE] = '\0';
+   theTileColumn[END_TILE_COLUMN_SIZE] = '\0';
+   theTileRow[END_TILE_ROW_SIZE] = '\0';
+   theCountry[COUNTRY_SIZE] = '\0';
+   theReserved2[RESERVED_2_SIZE] = '\0';
+   theLocation[LOCATION_SIZE] = '\0';
+   theReserved3[RESERVED_3_SIZE] = '\0';
+}
+
+std::ostream& ossimNitfAimidbTag::print(
+   std::ostream& out, const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+   
+   out << setiosflags(std::ios::left)
+       << pfx << std::setw(24) << "CETAG:"
+       << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
+       << pfx << std::setw(24) << "ACQUISITION_DATE:"
+       << theAcquisitionDate << "\n"
+       << pfx << std::setw(24) << "MISSION_NO:"
+       << theMissionNumber << "\n"
+       << pfx << std::setw(24) << "MISSION_IDENTIFICATION:"
+       << theMissionIdentification<< "\n"
+       << pfx << std::setw(24) << "FLIGHT_NO:"
+       << theFlightNo << "\n"
+       << pfx << std::setw(24) << "OP_NUM:"
+       << theOpNum << "\n"
+       << pfx << std::setw(24) << "CURRENT_SEGMENT:"
+       << theCurrentSegment << "\n"
+       << pfx << std::setw(24) << "REPRO_NUM:"
+       << theReproNum<< "\n"
+       << pfx << std::setw(24) << "REPLAY:"
+       << theReplay<< "\n"
+       << pfx << std::setw(24) << "START_TILE_COLUMN:"
+       << theStartTileColumn << "\n"
+       << pfx << std::setw(24) << "START_TILE_ROW:"
+       << theStartTileRow << "\n"
+       << pfx << std::setw(24) << "END_SEGMENT:"
+       << theEndSegment << "\n"
+       << pfx << std::setw(24) << "END_TILE_COLUMN:"
+       << theTileColumn << "\n"
+       << pfx << std::setw(24) << "END_TILE_ROW:"
+       << theTileRow << "\n"
+       << pfx << std::setw(24) << "COUNTRY:"
+       << theCountry << "\n"
+       << pfx << std::setw(24) << "LOCATION:"
+       << theLocation << "\n";
+   
+   return out;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfBlockaTag.cpp b/ossim/src/ossim/support_data/ossimNitfBlockaTag.cpp
new file mode 100644
index 0000000..10677d8
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfBlockaTag.cpp
@@ -0,0 +1,326 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: BLOCKA tag class declaration.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimNitfBlockaTag.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstring> /* for memcpy */
+#include <sstream>
+#include <iomanip>
+
+#include <ossim/support_data/ossimNitfBlockaTag.h>
+#include <ossim/support_data/ossimNitfCommon.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimDms.h>
+#include <ossim/base/ossimDpt.h>
+
+static const ossimTrace traceDebug(ossimString("ossimNitfBlockaTag:debug"));
+
+RTTI_DEF1(ossimNitfBlockaTag, "ossimNitfBlockaTag", ossimNitfRegisteredTag);
+
+ossimNitfBlockaTag::ossimNitfBlockaTag()
+   : ossimNitfRegisteredTag(std::string("BLOCKA"), 123)
+{
+   clearFields();
+}
+
+void ossimNitfBlockaTag::parseStream(std::istream& in)
+{
+   clearFields();
+   
+   in.read(theBlockInstance, BLOCK_INSTANCE_SIZE);
+   in.read(theNGray,         N_GRAY_SIZE);
+   in.read(theLLines,        L_LINES_SIZE);
+   in.read(theLayoverAngle,  LAYOVER_ANGLE_SIZE);
+   in.read(theShadowAngle,   SHADOW_ANGLE_SIZE);
+   in.read(theField6,        FIELD_6_SIZE);
+   in.read(theFrlcLoc,       FRLC_LOC_SIZE);
+   in.read(theLrlcLoc,       LRLC_LOC_SIZE);
+   in.read(theLrfcLoc,       LRFC_LOC_SIZE);
+   in.read(theFrfcLoc,       FRFC_LOC_SIZE);
+   in.read(theField11,       FIELD_11_SIZE);
+   
+}
+
+void ossimNitfBlockaTag::writeStream(std::ostream& out)
+{
+   out.write(theBlockInstance, BLOCK_INSTANCE_SIZE);
+   out.write(theNGray,         N_GRAY_SIZE);
+   out.write(theLLines,        L_LINES_SIZE);
+   out.write(theLayoverAngle,  LAYOVER_ANGLE_SIZE);
+   out.write(theShadowAngle,   SHADOW_ANGLE_SIZE);
+   out.write(theField6,        FIELD_6_SIZE);
+   out.write(theFrlcLoc,       FRLC_LOC_SIZE);
+   out.write(theLrlcLoc,       LRLC_LOC_SIZE);
+   out.write(theLrfcLoc,       LRFC_LOC_SIZE);
+   out.write(theFrfcLoc,       FRFC_LOC_SIZE);
+   out.write(theField11,       FIELD_11_SIZE);
+}
+
+void ossimNitfBlockaTag::clearFields()
+{
+   memcpy(theBlockInstance, "01",    BLOCK_INSTANCE_SIZE);
+   memset(theNGray,         0,     N_GRAY_SIZE);
+   memset(theLLines,        0,     L_LINES_SIZE);
+   memset(theLayoverAngle,  ' ',     LAYOVER_ANGLE_SIZE);
+   memset(theShadowAngle,   ' ',     SHADOW_ANGLE_SIZE);
+   memset(theField6,        ' ',     FIELD_6_SIZE);
+   memset(theFrlcLoc,       ' ',     FRLC_LOC_SIZE);
+   memset(theLrlcLoc,       ' ',     LRLC_LOC_SIZE);
+   memset(theLrfcLoc,       ' ',     LRFC_LOC_SIZE);
+   memset(theFrfcLoc,       ' ',     FRFC_LOC_SIZE);
+   memcpy(theField11,       "010.0", FIELD_11_SIZE);
+   
+   theBlockInstance[BLOCK_INSTANCE_SIZE] = '\0';
+   theNGray[N_GRAY_SIZE]                 = '\0';
+   theLLines[L_LINES_SIZE]               = '\0';
+   theLayoverAngle[LAYOVER_ANGLE_SIZE]   = '\0';
+   theShadowAngle[SHADOW_ANGLE_SIZE]     = '\0';
+   theField6[FIELD_6_SIZE]               = '\0';
+   theFrlcLoc[FRLC_LOC_SIZE]             = '\0';
+   theLrlcLoc[LRLC_LOC_SIZE]             = '\0';
+   theLrfcLoc[LRFC_LOC_SIZE]             = '\0';
+   theFrfcLoc[FRFC_LOC_SIZE]             = '\0';
+   theField11[FIELD_11_SIZE]              = '\0';
+}
+
+std::ostream& ossimNitfBlockaTag::print(std::ostream& out,
+                                        const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+   
+   // Grab the corners parsed into points.
+   ossimDpt ulPt;
+   ossimDpt urPt;
+   ossimDpt lrPt;
+   ossimDpt llPt;
+   getFrfcLoc(ulPt);
+   getFrlcLoc(urPt);
+   getLrlcLoc(lrPt);
+   getLrfcLoc(llPt);
+   
+   out << setiosflags(ios::left)
+       << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
+       << pfx << std::setw(24) << "BLOCK_INSTANCE:" << theBlockInstance << "\n"
+       << pfx << std::setw(24) << "N_GRAY:"         << theNGray << "\n"
+       << pfx << std::setw(24) << "L_LINES:"        << theLLines << "\n"
+       << pfx << std::setw(24) << "LAYOVER_ANGLE:"  << theLayoverAngle << "\n"
+       << pfx << std::setw(24) << "SHADOW_ANGLE:"   << theShadowAngle << "\n"
+       << pfx << std::setw(24) << "FIELD_6:"        << theField6 << "\n"
+       << pfx << std::setw(24) << "FRLC_LOC:"       << theFrlcLoc << "\n"
+       << pfx << std::setw(24) << "LRLC_LOC:"       << theLrlcLoc << "\n"
+       << pfx << std::setw(24) << "LRFC_LOC:"       << theLrfcLoc << "\n"
+       << pfx << std::setw(24) << "FRFC_LOC:"       << theFrfcLoc << "\n"
+       << pfx << std::setw(24) << "FIELD_11:"       << theField11 << "\n"
+       << pfx << std::setw(24) << "upper left:"     << ulPt << "\n"
+       << pfx << std::setw(24) << "upper right:"    << urPt << "\n"
+       << pfx << std::setw(24) << "lower right:"    << lrPt << "\n"
+       << pfx << std::setw(24) << "lower left:"     << llPt << "\n";
+
+   return out;
+}
+
+void ossimNitfBlockaTag::setBlockInstance(ossim_uint32 block)
+{
+   if ( (block > 0) && (block < 100) )
+   {
+      ossimString os =
+         ossimNitfCommon::convertToIntString(block,
+                                             BLOCK_INSTANCE_SIZE);
+      memcpy(theBlockInstance, os.c_str(), BLOCK_INSTANCE_SIZE);
+   }
+}
+
+ossimString ossimNitfBlockaTag::getBlockInstance() const
+{
+   return ossimString(theBlockInstance);
+}
+
+void ossimNitfBlockaTag::setNGray(ossim_uint32 grayCount)
+{
+   if (grayCount < 100000)
+   {
+      ossimString os =
+         ossimNitfCommon::convertToUIntString(grayCount,
+                                              N_GRAY_SIZE);
+      memcpy(theNGray, os.c_str(), N_GRAY_SIZE);
+   }
+}
+
+ossimString ossimNitfBlockaTag::getNGray() const
+{
+   return ossimString(theNGray);
+}
+
+void ossimNitfBlockaTag::setLLines(ossim_uint32 lines)
+{
+   if (lines < 100000)
+   {
+      ossimString os =
+         ossimNitfCommon::convertToUIntString(lines, L_LINES_SIZE);
+      memcpy(theLLines, os.c_str(), L_LINES_SIZE);
+   }
+}
+
+ossimString ossimNitfBlockaTag::getLLines() const
+{
+   return ossimString(theLLines);
+}
+
+void ossimNitfBlockaTag::setLayoverAngle(ossim_uint32 angle)
+{
+   if (angle < 360)
+   {
+      ossimString os =
+         ossimNitfCommon::convertToUIntString(angle, LAYOVER_ANGLE_SIZE);
+      memcpy(theLayoverAngle, os.c_str(), LAYOVER_ANGLE_SIZE);
+   }
+}
+
+ossimString ossimNitfBlockaTag::getLayoverAngle() const
+{
+   return ossimString(theLayoverAngle);
+}
+
+void ossimNitfBlockaTag::setShadowAngle(ossim_uint32 angle)
+{
+   if (angle < 360)
+   {
+      ossimString os =
+         ossimNitfCommon::convertToUIntString(angle, SHADOW_ANGLE_SIZE);
+      memcpy(theShadowAngle, os.c_str(), SHADOW_ANGLE_SIZE);
+   }
+}
+
+ossimString ossimNitfBlockaTag::getShadowAngle() const
+{
+   return ossimString(theShadowAngle);
+}
+
+void ossimNitfBlockaTag::setFrlcLoc(const ossimDpt& pt)
+{
+   ossimString os = ossimNitfCommon::convertToDdLatLonLocString(pt, 6);
+   memcpy(theFrlcLoc, os.c_str(), FRLC_LOC_SIZE);
+}
+
+ossimString ossimNitfBlockaTag::getFrlcLoc() const
+{
+   return ossimString(theFrlcLoc);
+}
+
+void ossimNitfBlockaTag::getFrlcLoc(ossimDpt& pt) const
+{
+   ossimString os = theFrlcLoc;
+   converLocStringToPt(os, pt);
+}
+
+void ossimNitfBlockaTag::setLrlcLoc(const ossimDpt& pt)
+{
+   ossimString os = ossimNitfCommon::convertToDdLatLonLocString(pt, 6);
+   memcpy(theLrlcLoc, os.c_str(), LRLC_LOC_SIZE);
+}
+   
+ossimString ossimNitfBlockaTag::getLrlcLoc() const
+{
+   return ossimString(theLrlcLoc);
+}
+
+void ossimNitfBlockaTag::getLrlcLoc(ossimDpt& pt) const
+{
+   ossimString os = theLrlcLoc;
+   converLocStringToPt(os, pt);
+}
+
+void ossimNitfBlockaTag::setLrfcLoc(const ossimDpt& pt)
+{
+   ossimString os = ossimNitfCommon::convertToDdLatLonLocString(pt, 6);
+   memcpy(theLrfcLoc, os.c_str(), LRFC_LOC_SIZE);
+}
+
+ossimString ossimNitfBlockaTag::getLrfcLoc() const
+{
+   return ossimString(theLrfcLoc);
+}
+
+void ossimNitfBlockaTag::getLrfcLoc(ossimDpt& pt) const
+{
+   ossimString os = theLrfcLoc;
+   converLocStringToPt(os, pt); 
+}
+
+void ossimNitfBlockaTag::setFrfcLoc(const ossimDpt& pt)
+{
+   ossimString os = ossimNitfCommon::convertToDdLatLonLocString(pt, 6);
+   memcpy(theFrfcLoc, os.c_str(), FRFC_LOC_SIZE);
+}
+
+ossimString ossimNitfBlockaTag::getFrfcLoc() const
+{
+   return ossimString(theFrfcLoc);
+}
+
+void ossimNitfBlockaTag::getFrfcLoc(ossimDpt& pt) const
+{
+   ossimString os = theFrfcLoc;
+   converLocStringToPt(os, pt);
+}
+
+void ossimNitfBlockaTag::converLocStringToPt(const ossimString& locationString,
+                                             ossimDpt& pt) const
+{
+   if (locationString.size() != 21) return;
+
+   std::string s = locationString;
+   
+   std::string lat(s, 0, 10);
+   std::string lon(s, 10, 11);
+
+   if ( (lat[0] == 'N') || (lat[0] == 'S') )
+   {
+      // Need to enter spaces for ossimDms to parse correctly
+      std::ostringstream latStream;
+      latStream << lat.substr(0, 3) << " " << lat.substr(3, 2)
+                << " " << lat.substr(5);
+      lat = latStream.str();
+      
+      // Use the dms class to parse.
+      ossimDms dms(0.0, true);
+      dms.setDegrees(lat.c_str());
+      pt.y = dms.getDegrees();
+   }
+   else
+   {
+      ossimString os = lat;
+      pt.y = os.toDouble();
+   }
+   if ( (lon[0] == 'E') || (lon[0] == 'W') )
+   {
+      // Need to enter spaces for ossimDms to parse correctly
+      std::ostringstream lonStream;
+      lonStream << lon.substr(0, 4) << " " << lon.substr(4, 2)
+                << " " << lon.substr(6);
+      lon = lonStream.str();
+      
+      // Use the dms class to parse.
+      ossimDms dms(0.0, false);
+      dms.setDegrees(lon.c_str());
+      pt.x = dms.getDegrees();
+   }
+   else
+   {
+      ossimString os = lon;
+      pt.x = os.toDouble();
+   }
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfCommon.cpp b/ossim/src/ossim/support_data/ossimNitfCommon.cpp
new file mode 100644
index 0000000..69f0cf7
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfCommon.cpp
@@ -0,0 +1,542 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Utility class for global nitf methods.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimNitfCommon.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstring> /* for memcpy */
+#include <sstream>
+#include <iomanip>
+#include <sstream>
+#include <stdexcept>
+#include <iostream>
+#include <ossim/support_data/ossimNitfCommon.h>
+#include <ossim/base/ossimDms.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimTrace.h>
+
+static const ossimTrace traceDebug(ossimString("ossimNitfCommon:debug"));
+
+                                   
+ossimNitfCommon::ossimNitfCommon(){}
+
+ossimNitfCommon::~ossimNitfCommon(){}
+
+ossimString ossimNitfCommon::convertToScientificString(
+   const ossim_float64& aValue,
+   ossim_uint32 size)
+{
+   // Precision cannot hit 0 for this to work...
+   if ( ((aValue < 0.0) && (size < 8)) ||
+        ((aValue >= 0.0) && (size < 7)) )
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfCommon::convertToScientificString DEBUG:"
+            << "\nsize range error!"
+            << std::endl;
+      }
+      return ossimString();
+   }
+
+   //--
+   // Set the precision to account for size with 1.xxxxxE+01
+   //---
+   ossim_uint32 precision = size - 6;
+   
+   if (aValue < 0.0)
+   {
+      --precision;
+   }
+   
+   std::ostringstream s1;
+   s1 << std::setiosflags(std::ios_base::scientific|std::ios_base::internal)
+      << std::setfill('0')
+      // << setw(size)
+      << std::setprecision(precision)
+      << aValue;
+   
+   ossimString result = s1.str();
+
+   // Upcase the "e".
+   result.upcase();
+   
+   if (traceDebug())
+   {
+      if (result.size() != size)
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfCommon::convertToScientificString DEBUG:"
+            << "\nIncorrect output size!"
+            << "\nValue:  " << aValue
+            << "\nString: " << result
+            << std::endl;
+      }
+   }
+   return result;
+}
+
+ossimString ossimNitfCommon::convertToDoubleString(
+   const ossim_float64& aValue,
+   ossim_uint32 precision,
+   ossim_uint32 size)
+{
+   ossim_uint32 width = size;
+   
+   std::ostringstream s1;
+   s1 << std::setiosflags(std::ios_base::fixed|
+                     std::ios_base::internal)
+      << std::setprecision(precision)
+      << std::setfill('0')
+      << std::setw(width)
+      << aValue;
+   
+   ossimString result = s1.str();
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfCommon::convertToDoubleString DEBUG:"
+         << "\nresult: " << result << std::endl;
+      
+      if (result.size() != size)
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfCommon::convertToDoubleString DEBUG:"
+            << "\nIncorrect output size!"
+            << std::endl;
+      }
+   }
+   return result;
+}
+
+ossimString ossimNitfCommon::convertToUIntString(ossim_uint32 aValue,
+                                                ossim_uint32 size)
+{
+   ossim_uint32 width = size;
+   
+   std::ostringstream s1;
+   s1 << std::setiosflags(std::ios_base::fixed|
+                     std::ios_base::internal)
+      << std::setfill('0')
+      << std::setw(width)
+      << aValue;
+   
+   ossimString result = s1.str();
+
+   if (traceDebug())
+   {
+      if (result.size() != size)
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfCommon::convertToUIntString DEBUG:"
+            << "\nIncorrect output size!"
+            << "\nValue:  " << aValue
+            << "\nString: " << result
+            << std::endl;
+      }
+   }
+   return result;   
+}
+
+ossimString ossimNitfCommon::convertToIntString(ossim_int32 aValue,
+                                                ossim_uint32 size)
+{
+   ossim_uint32 width = size;
+   
+   std::ostringstream s1;
+   s1 << std::setiosflags(std::ios_base::fixed|
+                     std::ios_base::internal)
+      << std::setfill('0')
+      << std::setw(width)
+      << aValue;
+   
+   ossimString result = s1.str();
+
+   if (traceDebug())
+   {
+      if (result.size() != size)
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfCommon::convertToIntString DEBUG:"
+            << "\nIncorrect output size!"
+            << "\nValue:  " << aValue
+            << "\nString: " << result
+            << std::endl;
+      }
+   }
+   return result;   
+}
+
+ossimString ossimNitfCommon::convertToDdLatLonLocString(const ossimDpt& pt,
+                                                        ossim_uint32 precision)
+{
+   ossimString lat;
+   ossimString lon;
+   ossim_uint32 latSize = precision+4; // size = precision + "-33."
+   ossim_uint32 lonSize = precision+5; // size = precision + "-122."
+   
+   if (pt.y >= 0.0)
+   {
+      lat = "+";
+      --latSize;
+   }
+   if (pt.x >= 0.0)
+   {
+      lon = "+";
+      --lonSize;
+   }
+   lat += convertToDoubleString(pt.y,
+                                precision,
+                                latSize);
+   lon += convertToDoubleString(pt.x,
+                                precision,
+                                lonSize);
+   ossimString result = lat+lon;
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfCommon::convertToDdLatLonLocString DEBUG:"
+         << "\nresult: " << result
+         << std::endl;
+   }
+
+   return result;
+}
+
+void ossimNitfCommon::setField(void* fieldDestination,
+                               const ossimString& src,
+                               std::streamsize width,
+                               std::ios_base::fmtflags ioflags,
+                               char fill)
+{
+   std::ostringstream out;
+   out << std::setw(width)
+       << std::setfill(fill)
+       << std::setiosflags(ioflags)
+       << src.trim().c_str();
+   
+   memcpy(fieldDestination, out.str().c_str(), width);
+}
+
+ossimString ossimNitfCommon::encodeUtm(
+                                       ossim_uint32 zone,
+                                       const ossimDpt& ul,
+                                       const ossimDpt& ur,
+                                       const ossimDpt& lr,
+                                       const ossimDpt& ll)
+{
+   std::ostringstream out;
+   
+   if(zone > 60)
+   {
+      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUTM zone greate than 60!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+   
+   ossim_float64 east  = ul.x;
+   ossim_float64 north = ul.y;
+   
+   if((ossim_uint32)(east+.5) > 999999)
+   {
+      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUpper left easting too large for NITF field!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+   
+   if((ossim_uint32)(north+.5) > 9999999)
+   {
+      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUpper left northing too large for NITF field!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+   
+   out << std::setw(2)
+   << std::setfill('0')
+   << zone
+   << std::setw(6)
+   << std::setfill('0')
+   <<(ossim_uint32)(east+.5)
+   << std::setw(7)
+   << std::setfill('0')
+   <<(ossim_uint32)(north+.5);
+   
+   
+   east  = ur.x;
+   north = ur.y;
+   
+   if((ossim_uint32)(east+.5) > 999999)
+   {
+      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUpper right easting too large for NITF field!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+   
+   if((ossim_uint32)(north+.5) > 9999999)
+   {
+      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUpper right northing too large for NITF field!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+   
+   out << std::setw(2)
+   << std::setfill('0')
+   << zone
+   << std::setw(6)
+   << std::setfill('0')
+   <<(ossim_uint32)(east+.5)
+   << std::setw(7)
+   << std::setfill('0')
+   <<(ossim_uint32)(north+.5);
+   east  = lr.x;
+   north = lr.y;
+   
+   if((ossim_uint32)(east+.5) > 999999)
+   {
+      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nLower right easting too large for NITF field!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+   
+   if((ossim_uint32)(north+.5) > 9999999)
+   {
+      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nLower right northing too large for NITF field!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }   
+   
+   out << std::setw(2)
+   << std::setfill('0')
+   << zone
+   << std::setw(6)
+   << std::setfill('0')
+   <<(ossim_uint32)(east+.5)
+   << std::setw(7)
+   << std::setfill('0')
+   <<(ossim_uint32)(north+.5);
+   
+   east  = ll.x;
+   north = ll.y;
+   
+   if((ossim_uint32)(east+.5) > 999999)
+   {
+      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nLower left easting too large for NITF field!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+   
+   if((ossim_uint32)(north+.5) > 9999999)
+   {
+      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nLower left northing too large for NITF field!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+   
+   out << std::setw(2)
+   << std::setfill('0')
+   << zone
+   << std::setw(6)
+   << std::setfill('0')
+   <<(ossim_uint32)(east+.5)
+   << std::setw(7)
+   << std::setfill('0')
+   <<(ossim_uint32)(north+.5);
+   
+   return out.str().c_str();
+}
+
+ossimString ossimNitfCommon::encodeGeographicDms(const ossimDpt& ul,
+                                                 const ossimDpt& ur,
+                                                 const ossimDpt& lr,
+                                                 const ossimDpt& ll)
+{
+   std::ostringstream out;
+   
+   out << ossimDms(ul.y, true).toString("ddmmssC").c_str();
+   out << ossimDms(ul.x, false).toString("dddmmssC").c_str();
+   out << ossimDms(ur.y, true).toString("ddmmssC").c_str();
+   out << ossimDms(ur.x, false).toString("dddmmssC").c_str();
+   out << ossimDms(lr.y, true).toString("ddmmssC").c_str();
+   out << ossimDms(lr.x, false).toString("dddmmssC").c_str();
+   out << ossimDms(ll.y, true).toString("ddmmssC").c_str();
+   out << ossimDms(ll.x, false).toString("dddmmssC").c_str();
+
+   return ossimString(out.str());
+}
+
+ossimString ossimNitfCommon::encodeGeographicDecimalDegrees(const ossimDpt& ul,
+                                                            const ossimDpt& ur,
+                                                            const ossimDpt& lr,
+                                                            const ossimDpt& ll)
+{
+   std::ostringstream out;
+   
+   out << (ul.lat >= 0.0?"+":"")
+   << std::setw(6)
+   << std::setfill('0')
+   << std::setprecision(3)
+   << std::setiosflags(std::ios::fixed)
+   << ul.lat
+   << (ul.lon >= 0.0?"+":"")
+   << std::setw(7)
+   << std::setfill('0')
+   << std::setprecision(3)
+   << std::setiosflags(std::ios::fixed)
+   << ul.lon;
+   out << (ur.lat >= 0.0?"+":"")
+   << std::setw(6)
+   << std::setfill('0')
+   << std::setprecision(3)
+   << std::setiosflags(std::ios::fixed)
+   << ur.lat
+   << (ur.lon >= 0.0?"+":"")
+   << std::setw(7)
+   << std::setfill('0')
+   << std::setprecision(3)
+   << std::setiosflags(std::ios::fixed)
+   << ur.lon;
+   out << (lr.lat >= 0.0?"+":"")
+   << std::setw(6)
+   << std::setfill('0')
+   << std::setprecision(3)
+   << std::setiosflags(std::ios::fixed)
+   << lr.lat
+   << (lr.lon >= 0.0?"+":"")
+   << std::setw(7)
+   << std::setfill('0')
+   << std::setprecision(3)
+   << std::setiosflags(std::ios::fixed)
+   << lr.lon;
+   out << (ll.lat >= 0.0?"+":"")
+   << std::setw(6)
+   << std::setfill('0')
+   << std::setprecision(3)
+   << std::setiosflags(std::ios::fixed)
+   << ll.lat
+   << (ll.lon >= 0.0?"+":"")
+   << std::setw(7)
+   << std::setfill('0')
+   << std::setprecision(3)
+   << std::setiosflags(std::ios::fixed)
+   << ll.lon;
+   
+   return ossimString(out.str());
+}
+
+ossimString ossimNitfCommon::getNitfPixelType(ossimScalarType scalarType)
+{
+   ossimString pixelType;
+   switch(scalarType)
+   {
+      case OSSIM_UINT8:
+      case OSSIM_USHORT11:
+      case OSSIM_UINT16:
+      case OSSIM_UINT32:
+      {
+         pixelType = "INT";
+         break;
+      }
+      case OSSIM_SINT16:
+      case OSSIM_SINT32:
+      {
+         pixelType    = "SI";
+         break;
+      }
+      case OSSIM_FLOAT:
+      case OSSIM_NORMALIZED_FLOAT:
+      case OSSIM_DOUBLE:
+      case OSSIM_NORMALIZED_DOUBLE:
+      {
+         pixelType    = "R";
+         break;
+      }
+      default:
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << __FILE__ << ":" << __LINE__
+            << "\nUnhandled scalar type:  " << scalarType << std::endl;
+         break;
+      }
+   }
+   return pixelType;
+}
+
+ossimString ossimNitfCommon::getCompressionRate(const ossimIrect& rect,
+                                                ossim_uint32 bands,
+                                                ossimScalarType scalar,
+                                                ossim_uint64 lengthInBytes)
+{
+   ossimString result("");
+   
+   ossim_float64 uncompressedSize =
+      ossim::scalarSizeInBytes(scalar) * rect.width() * rect.height() * bands;
+   ossim_float64 bitsPerPix = ossim::getBitsPerPixel(scalar);
+   ossim_float64 rate = ( bitsPerPix *
+                          (static_cast<ossim_float64>(lengthInBytes) /
+                           uncompressedSize) );
+
+   // Multiply by ten as there is an implied decimal point.
+   rate *= 10.0;
+
+   // Convert to string with zero precision.
+   ossimString s = ossimString::toString(rate, 0);
+
+   if (s.size())
+   {
+      if (s.size() <= 3)
+      {
+         result = "N";
+         if (s.size() == 2)
+         {
+            result += "0";
+         }
+         else if (s.size() == 1)
+         {
+            result += "00";
+         }
+         result += s;
+      }
+   }
+   return result;
+}
+
+
diff --git a/ossim/src/ossim/support_data/ossimNitfCompressionHeader.cpp b/ossim/src/ossim/support_data/ossimNitfCompressionHeader.cpp
new file mode 100644
index 0000000..dc40359
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfCompressionHeader.cpp
@@ -0,0 +1,20 @@
+//*******************************************************************
+// Copyright (C) 2004 Garrett Potts
+//
+// LICENSE: MIT see top level LICENSE.txt for more details
+// 
+// Author: Garrett Potts
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfCompressionHeader.cpp 23666 2015-12-14 20:01:22Z rashadkm $
+#include <ossim/support_data/ossimNitfCompressionHeader.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <sstream>
+
+RTTI_DEF1(ossimNitfCompressionHeader, "ossimNitfCompressionHeader", ossimObject);
+
+bool ossimNitfCompressionHeader::saveState(ossimKeywordlist& kwl, const ossimString& prefix)const
+{
+   return ossimObject::saveState(kwl, prefix);
+}
diff --git a/ossim/src/ossim/support_data/ossimNitfCsccgaTag.cpp b/ossim/src/ossim/support_data/ossimNitfCsccgaTag.cpp
new file mode 100644
index 0000000..25dd87b
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfCsccgaTag.cpp
@@ -0,0 +1,86 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Garrett Potts
+//
+// Description: CSCCGA tag source file
+//
+//----------------------------------------------------------------------------
+// $Id$
+#include <ossim/support_data/ossimNitfCsccgaTag.h>
+#include <iomanip>
+#include <iostream>
+
+ossimNitfCsccgaTag::ossimNitfCsccgaTag()
+   : ossimNitfRegisteredTag(std::string("CSCCGA"), CEL_SIZE)
+{
+   clearFields();
+}
+
+void ossimNitfCsccgaTag::parseStream(std::istream& in)
+{
+   in.read(m_ccgSource, CCG_SOURCE_SIZE);
+   in.read(m_regSensor, REG_SENSOR_SIZE);
+   in.read(m_originLine, ORIGIN_LINE_SIZE);
+   in.read(m_originSample, ORIGIN_SAMPLE_SIZE);
+   in.read(m_asCellSize, AS_CELL_SIZE_SIZE);
+   in.read(m_csCellSize, CS_CELL_SIZE_SIZE);
+   in.read(m_ccgMaxLine, CCG_MAX_LINE_SIZE);
+   in.read(m_ccgMaxSample, CCG_MAX_SAMPLE_SIZE);
+}
+
+void ossimNitfCsccgaTag::writeStream(std::ostream& out)
+{
+   out.write(m_ccgSource, CCG_SOURCE_SIZE);
+   out.write(m_regSensor, REG_SENSOR_SIZE);
+   out.write(m_originLine, ORIGIN_LINE_SIZE);
+   out.write(m_originSample, ORIGIN_SAMPLE_SIZE);
+   out.write(m_asCellSize, AS_CELL_SIZE_SIZE);
+   out.write(m_csCellSize, CS_CELL_SIZE_SIZE);
+   out.write(m_ccgMaxLine, CCG_MAX_LINE_SIZE);
+   out.write(m_ccgMaxSample, CCG_MAX_SAMPLE_SIZE);
+}
+
+std::ostream& ossimNitfCsccgaTag::print(std::ostream& out,
+                                        const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+   out << setiosflags(ios::left)
+       << pfx << std::setw(24) << "CETAG:"      << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:"        << getTagLength() << "\n"
+       << pfx << std::setw(24) << "CCG_SOURCE:" << m_ccgSource << "\n"
+       << pfx << std::setw(24) << "CCG_SOURCE:" << m_regSensor << "\n"
+       << pfx << std::setw(24) << "ORIGIN_LINE:" << m_originLine << "\n"
+       << pfx << std::setw(24) << "ORIGIN_SAMPLE:" << m_originSample << "\n"
+       << pfx << std::setw(24) << "AS_CELL_SIZE:" << m_asCellSize << "\n"
+       << pfx << std::setw(24) << "CS_CELL_SIZE:" << m_csCellSize << "\n"
+       << pfx << std::setw(24) << "CCG_MAX_LINE:" << m_ccgMaxLine << "\n"
+       << pfx << std::setw(24) << "CCG_MAX_SAMPLE:" << m_ccgMaxSample << "\n";
+
+
+   return out;
+}
+
+void ossimNitfCsccgaTag::clearFields()
+{
+   memset(m_ccgSource,' ', CCG_SOURCE_SIZE);
+   memset(m_regSensor, ' ', REG_SENSOR_SIZE);
+   memset(m_originLine, 0, ORIGIN_LINE_SIZE);
+   memset(m_originSample, 0, ORIGIN_SAMPLE_SIZE);
+   memset(m_asCellSize, 0, AS_CELL_SIZE_SIZE);
+   memset(m_csCellSize, 0, CS_CELL_SIZE_SIZE);
+   memset(m_ccgMaxLine, 0, CCG_MAX_LINE_SIZE);
+   memset(m_ccgMaxSample, 0, CCG_MAX_SAMPLE_SIZE);
+
+   m_ccgSource[CCG_SOURCE_SIZE] = '\0';
+   m_regSensor[REG_SENSOR_SIZE] = '\0';
+   m_originLine[ORIGIN_LINE_SIZE] = '\0';
+   m_originSample[ORIGIN_SAMPLE_SIZE] = '\0';
+   m_asCellSize[AS_CELL_SIZE_SIZE] = '\0';
+   m_csCellSize[CS_CELL_SIZE_SIZE] = '\0';
+   m_ccgMaxLine[CCG_MAX_LINE_SIZE] = '\0';
+   m_ccgMaxSample[CCG_MAX_SAMPLE_SIZE] = '\0';
+}
diff --git a/ossim/src/ossim/support_data/ossimNitfCscrnaTag.cpp b/ossim/src/ossim/support_data/ossimNitfCscrnaTag.cpp
new file mode 100644
index 0000000..2602f16
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfCscrnaTag.cpp
@@ -0,0 +1,155 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: CSCRNA tag class definition.
+//
+// Corner Footprint TRE.
+//
+// See document STDI-0006-NCDRD Table 3.2-13 for more info.
+// 
+//----------------------------------------------------------------------------
+// $Id
+
+#include <cstring>
+#include <istream>
+#include <iostream>
+#include <iomanip>
+
+#include <ossim/support_data/ossimNitfCscrnaTag.h>
+
+
+RTTI_DEF1(ossimNitfCscrnaTag, "ossimNitfCscrnaTag", ossimNitfRegisteredTag);
+
+ossimNitfCscrnaTag::ossimNitfCscrnaTag()
+   : ossimNitfRegisteredTag(std::string("CSCRNA"), 109)
+{
+   clearFields();
+}
+
+ossimNitfCscrnaTag::~ossimNitfCscrnaTag()
+{
+}
+
+void ossimNitfCscrnaTag::parseStream(std::istream& in)
+{
+   clearFields();
+
+   in.read(thePredictedCornerFlag, 1);
+
+   in.read(theUlLat, 9);
+   in.read(theUlLon, 10);
+   in.read(theUlHt, 8);
+
+   in.read(theUrLat, 9);
+   in.read(theUrLon, 10);
+   in.read(theUrHt, 8);
+
+   in.read(theLrLat, 9);
+   in.read(theLrLon, 10);
+   in.read(theLrHt, 8);
+
+   in.read(theLlLat, 9);
+   in.read(theLlLon, 10);
+   in.read(theLlHt, 8);
+}
+
+void ossimNitfCscrnaTag::writeStream(std::ostream& out)
+{
+   out.write(thePredictedCornerFlag, 1);
+
+   out.write(theUlLat, 9);
+   out.write(theUlLon, 10);
+   out.write(theUlHt, 8);
+
+   out.write(theUrLat, 9);
+   out.write(theUrLon, 10);
+   out.write(theUrHt, 8);
+
+   out.write(theLrLat, 9);
+   out.write(theLrLon, 10);
+   out.write(theLrHt, 8);
+
+   out.write(theLlLat, 9);
+   out.write(theLlLon, 10);
+   out.write(theLlHt, 8);
+}
+
+void ossimNitfCscrnaTag::clearFields()
+{
+   // BCS-N's to '0's, BCS-A's to ' '(spaces)
+   memset(thePredictedCornerFlag, ' ', 1);
+   
+   memset(theUlLat, 0, 9);
+   memset(theUlLon, 0, 10);
+   memset(theUlHt, 0, 8);
+
+   memset(theUrLat, 0, 9);
+   memset(theUrLon, 0, 10);
+   memset(theUrHt, 0, 8);
+
+   memset(theLrLat, 0, 9);
+   memset(theLrLon, 0, 10);
+   memset(theLrHt, 0, 8);
+
+   memset(theLlLat, 0, 9);
+   memset(theLlLon, 0, 10);
+   memset(theLlHt, 0, 8);
+
+   thePredictedCornerFlag[1] = '\0';
+   
+   theUlLat[9] = '\0';
+   theUlLon[10] = '\0';
+   theUlHt[8] = '\0';
+
+   theUrLat[9] = '\0';
+   theUrLon[10] = '\0';
+   theUrHt[8] = '\0';
+
+   theLrLat[9] = '\0';
+   theLrLon[10] = '\0';
+   theLrHt[8] = '\0';
+
+   theLlLat[9] = '\0';
+   theLlLon[10] = '\0';
+   theLlHt[8] = '\0';
+}
+
+std::ostream& ossimNitfCscrnaTag::print(
+   std::ostream& out, const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+   
+   out << setiosflags(std::ios::left)
+       << pfx << std::setw(24) << "CETAG:"
+       << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
+      
+       << pfx << std::setw(24) << "PREDICT_CORNERS:"
+       << thePredictedCornerFlag << "\n"
+      
+       << pfx << std::setw(24) << "ULCRN_LAT:" << theUlLat << "\n"
+       << pfx << std::setw(24) << "ULCRN_LON:" << theUlLon << "\n"
+       << pfx << std::setw(24) << "ULCRN_HT:" << theUlHt << "\n"
+
+       << pfx << std::setw(24) << "URCRN_LAT:" << theUrLat << "\n"
+       << pfx << std::setw(24) << "URCRN_LON:" << theUrLon << "\n"
+       << pfx << std::setw(24) << "URCRN_HT:" << theUrHt << "\n"
+   
+       << pfx << std::setw(24) << "LRCRN_LAT:" << theLrLat << "\n"
+       << pfx << std::setw(24) << "LRCRN_LON:" << theLrLon << "\n"
+       << pfx << std::setw(24) << "LRCRN_HT:" << theLrHt << "\n"
+      
+       << pfx << std::setw(24) << "LLCRN_LAT:" << theLlLat << "\n"
+       << pfx << std::setw(24) << "LLCRN_LON:" << theLlLon << "\n"
+       << pfx << std::setw(24) << "LLCRN_HT:" << theLlHt << "\n";
+
+      return out;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfCsdidaTag.cpp b/ossim/src/ossim/support_data/ossimNitfCsdidaTag.cpp
new file mode 100644
index 0000000..346696d
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfCsdidaTag.cpp
@@ -0,0 +1,150 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: CSDIDA tag class definition.
+//
+// Dataset Indentification TRE.
+//
+// See document STDI-0006-NCDRD Table 3.3-14 for more info.
+// 
+//----------------------------------------------------------------------------
+// $Id
+
+#include <cstring>
+#include <istream>
+#include <iostream>
+#include <iomanip>
+
+#include <ossim/support_data/ossimNitfCsdidaTag.h>
+
+
+RTTI_DEF1(ossimNitfCsdidaTag, "ossimNitfCsdidaTag", ossimNitfRegisteredTag);
+
+ossimNitfCsdidaTag::ossimNitfCsdidaTag()
+   : ossimNitfRegisteredTag(std::string("CSDIDA"), 70)
+{
+   clearFields();
+}
+
+ossimNitfCsdidaTag::~ossimNitfCsdidaTag()
+{
+}
+
+void ossimNitfCsdidaTag::parseStream(std::istream& in)
+{
+   clearFields();
+
+   in.read(theDay, 2);
+   in.read(theMonth, 3);
+   in.read(theYear, 4);
+   in.read(thePlatformCode, 2);
+   in.read(theVehicleId, 2);
+   in.read(thePass, 2);
+   in.read(theOperation, 3);
+   in.read(theSensorId, 2);
+   in.read(theProductId, 2);
+   in.read(theReservedField1, 4);
+   in.read(theTime, 14);
+   in.read(theProcessTime, 14);
+   in.read(theReservedField2, 2);
+   in.read(theReservedField3, 2);
+   in.read(theReservedField4, 1);
+   in.read(theReservedField5, 1);
+   in.read(theSoftwareVersionNumber, 10);
+}
+
+void ossimNitfCsdidaTag::writeStream(std::ostream& out)
+{
+   out.write(theDay, 2);
+   out.write(theMonth, 3);
+   out.write(theYear, 4);
+   out.write(thePlatformCode, 2);
+   out.write(theVehicleId, 2);
+   out.write(thePass, 2);
+   out.write(theOperation, 3);
+   out.write(theSensorId, 2);
+   out.write(theProductId, 2);
+   out.write(theReservedField1, 4);
+   out.write(theTime, 14);
+   out.write(theProcessTime, 14);
+   out.write(theReservedField2, 2);
+   out.write(theReservedField3, 2);
+   out.write(theReservedField4, 1);
+   out.write(theReservedField5, 1);
+   out.write(theSoftwareVersionNumber, 10);
+}
+
+void ossimNitfCsdidaTag::clearFields()
+{
+   // BCS-N's to '0's, BCS-A's to ' '(spaces)
+   
+   memset(theDay, '0', 2);
+   memset(theMonth, ' ', 3);
+   memset(theYear, '0', 4);
+   memset(thePlatformCode, ' ', 2);
+   memset(theVehicleId, '0', 2);
+   memset(thePass, '0', 2);
+   memset(theOperation, '0', 3);
+   memset(theSensorId, ' ', 2);
+   memset(theProductId, ' ', 2);
+   memcpy(theReservedField1, "00  ", 4);
+   memset(theTime, '0', 14);
+   memset(theProcessTime, '0', 14);
+   memcpy(theReservedField2, "00", 2);
+   memcpy(theReservedField3, "01", 2);
+   memcpy(theReservedField4, "N", 1);
+   memcpy(theReservedField5, "N", 1);
+   memset(theSoftwareVersionNumber, ' ', 10);
+
+   theDay[2] = '\0';
+   theMonth[3] = '\0';
+   theYear[4] = '\0';
+   thePlatformCode[2] = '\0';
+   theVehicleId[2] = '\0';
+   thePass[2] = '\0';
+   theOperation[3] = '\0';
+   theSensorId[2] = '\0';
+   theProductId[2] = '\0';
+   theReservedField1[4] = '\0';
+   theTime[14] = '\0';
+   theProcessTime[14] = '\0';
+   theReservedField2[2] = '\0';
+   theReservedField3[2] = '\0';
+   theReservedField4[0] = '\0';
+   theReservedField5[0] = '\0';
+   theSoftwareVersionNumber[10] = '\0';
+}
+
+std::ostream& ossimNitfCsdidaTag::print(
+   std::ostream& out, const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+   
+   out << setiosflags(std::ios::left)
+       << pfx << std::setw(24) << "CETAG:"
+       << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
+       << pfx << std::setw(24) << "DAY:" << theDay << "\n"
+       << pfx << std::setw(24) << "MONTH:" << theMonth << "\n"
+       << pfx << std::setw(24) << "YEAR:" << theYear << "\n"
+       << pfx << std::setw(24) << "PLATFORM_CODE:" << thePlatformCode << "\n"
+       << pfx << std::setw(24) << "VEHICLE_ID:" << theVehicleId << "\n"
+       << pfx << std::setw(24) << "PASS:" << thePass << "\n"
+       << pfx << std::setw(24) << "OPERATION:" << theOperation << "\n"
+       << pfx << std::setw(24) << "SENSOR_ID:" << theSensorId << "\n"
+       << pfx << std::setw(24) << "PRODUCT_ID:" << theProductId << "\n"
+       << pfx << std::setw(24) << "TIME:" << theTime << "\n"
+       << pfx << std::setw(24) << "PROCESS_TIME:" << theProcessTime << "\n"
+       << pfx << std::setw(24) << "SOFTWARE_VERSION_NUMBER:"
+       << theSoftwareVersionNumber << "\n";
+   
+   return out;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfCsexraTag.cpp b/ossim/src/ossim/support_data/ossimNitfCsexraTag.cpp
new file mode 100644
index 0000000..a3f6372
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfCsexraTag.cpp
@@ -0,0 +1,338 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: CSEXRA tag class definition.
+//
+// Exploitation Reference Data TRE.
+//
+// See document STDI-0006-NCDRD Table 3.5-16 for more info.
+// 
+//----------------------------------------------------------------------------
+// $Id
+
+#include <cstring>
+#include <istream>
+#include <iostream>
+#include <iomanip>
+
+#include <ossim/support_data/ossimNitfCsexraTag.h>
+
+
+RTTI_DEF1(ossimNitfCsexraTag, "ossimNitfCsexraTag", ossimNitfRegisteredTag);
+
+ossimNitfCsexraTag::ossimNitfCsexraTag()
+   : ossimNitfRegisteredTag(std::string("CSEXRA"), 132)
+{
+   clearFields();
+}
+
+ossimNitfCsexraTag::~ossimNitfCsexraTag()
+{
+}
+
+void ossimNitfCsexraTag::parseStream(std::istream& in)
+{
+   clearFields();
+
+   in.read(theSensor, 6);
+   in.read(theTileFirstLine, 12);
+   in.read(theImageTimeDuration, 12);
+   in.read(theMaxGsd, 5);
+   in.read(theAlongScanGsd, 5);
+   in.read(theCrossScanGsd, 5);
+   in.read(theGeoMeanGsd, 5);
+   in.read(theAlongScanVertGsd, 5);
+   in.read(theCrossScanVertGsd, 5);
+   in.read(theGeoMeanVertGsd, 5);
+   in.read(theGeoBetaAngle, 5);
+   in.read(theDynamicRange, 5);
+   in.read(theLine, 7);
+   in.read(theSamples, 5);
+   in.read(theAngleToNorth, 7);
+   in.read(theObliquityAngle, 6);
+   in.read(theAzOfObliquity, 7);
+   in.read(theGrdCover, 1);
+   in.read(theSnowDepthCategory, 1);
+   in.read(theSunAzimuth, 7);
+   in.read(theSunElevation, 7);
+   in.read(thePredictedNiirs, 3);
+   in.read(theCircularError, 3);
+   in.read(theLinearError, 3);
+}
+
+void ossimNitfCsexraTag::writeStream(std::ostream& out)
+{
+   out.write(theSensor, 6);
+   out.write(theTileFirstLine, 12);
+   out.write(theImageTimeDuration, 12);
+   out.write(theMaxGsd, 5);
+   out.write(theAlongScanGsd, 5);
+   out.write(theCrossScanGsd, 5);
+   out.write(theGeoMeanGsd, 5);
+   out.write(theAlongScanVertGsd, 5);
+   out.write(theCrossScanVertGsd, 5);
+   out.write(theGeoMeanVertGsd, 5);
+   out.write(theGeoBetaAngle, 5);
+   out.write(theDynamicRange, 5);
+   out.write(theLine, 7);
+   out.write(theSamples, 5);
+   out.write(theAngleToNorth, 7);
+   out.write(theObliquityAngle, 6);
+   out.write(theAzOfObliquity, 7);
+   out.write(theGrdCover, 1);
+   out.write(theSnowDepthCategory, 1);
+   out.write(theSunAzimuth, 7);
+   out.write(theSunElevation, 7);
+   out.write(thePredictedNiirs, 3);
+   out.write(theCircularError, 3);
+   out.write(theLinearError, 3);
+}
+
+void ossimNitfCsexraTag::clearFields()
+{
+   //---
+   // No attempt made to set to defaults.
+   // BCS-N's to '0's, BCS-A's to ' '(spaces)
+   //---
+
+   memset(theSensor, ' ',  6);
+   memset(theTileFirstLine, 0, 12);
+   memset(theImageTimeDuration, 0, 12);
+   memset(theMaxGsd, 0, 5);
+   memset(theAlongScanGsd, ' ', 5);
+   memset(theCrossScanGsd, ' ', 5);
+   memset(theGeoMeanGsd, ' ', 5);
+   memset(theAlongScanVertGsd, ' ', 5);
+   memset(theCrossScanVertGsd, ' ', 5);
+   memset(theGeoMeanVertGsd, ' ', 5);
+   memset(theGeoBetaAngle, ' ', 5);
+   memset(theDynamicRange, 0, 5);
+   memset(theLine, 0, 7);
+   memset(theSamples, 0, 5);
+   memset(theAngleToNorth, 0, 7);
+   memset(theObliquityAngle, 0, 6);
+   memset(theAzOfObliquity, 0, 7);
+   memset(theGrdCover, 0, 1);
+   memset(theSnowDepthCategory, 0, 1);
+   memset(theSunAzimuth, 0, 7);
+   memset(theSunElevation, 0, 7);
+   memset(thePredictedNiirs, ' ', 3);
+   memset(theCircularError, 0, 3);
+   memset(theLinearError, 0, 3);
+
+   theSensor[6] = '\0';
+   theTileFirstLine[12] = '\0';
+   theImageTimeDuration[12] = '\0';
+   theMaxGsd[5] = '\0';
+   theAlongScanGsd[5] = '\0';
+   theCrossScanGsd[5] = '\0';
+   theGeoMeanGsd[5] = '\0';
+   theAlongScanVertGsd[5] = '\0';
+   theCrossScanVertGsd[5] = '\0';
+   theGeoMeanVertGsd[5] = '\0';
+   theGeoBetaAngle[5] = '\0';
+   theDynamicRange[5] = '\0';
+   theLine[7] = '\0';
+   theSamples[5] = '\0';
+   theAngleToNorth[7] = '\0';
+   theObliquityAngle[6] = '\0';
+   theAzOfObliquity[7] = '\0';
+   theGrdCover[1] = '\0';
+   theSnowDepthCategory[1] = '\0';
+   theSunAzimuth[7] = '\0';
+   theSunElevation[7] = '\0';
+   thePredictedNiirs[3] = '\0';
+   theCircularError[3] = '\0';
+   theLinearError[3] = '\0';
+   
+}
+
+std::ostream& ossimNitfCsexraTag::print(
+   std::ostream& out, const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+   
+   out << setiosflags(std::ios::left)
+       << pfx << std::setw(24) << "CETAG:"
+       << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:"
+       << getTagLength() << "\n"
+       << pfx << std::setw(24) << "SENSOR:"
+       << theSensor << "\n"
+       << pfx << std::setw(24) << "TIME_FIRST_LINE_IMAGE:"
+       << theTileFirstLine << "\n"
+       << pfx << std::setw(24) << "TIME_IMAGE_DURATION:"
+       << theImageTimeDuration << "\n"
+       << pfx << std::setw(24) << "MAX_GSD:"
+       << theMaxGsd << "\n"
+       << pfx << std::setw(24) << "ALONG_SCAN_GSD:"
+       << theAlongScanGsd << "\n"
+       << pfx << std::setw(24) << "CROSS_SCAN_GSD:"
+       << theCrossScanGsd << "\n"
+       << pfx << std::setw(24) << "GEO_MEAN_GSD:"
+       << theGeoMeanGsd << "\n"
+       << pfx << std::setw(24) << "A_S_VERT_GSD:"
+       << theAlongScanVertGsd << "\n"
+       << pfx << std::setw(24) << "C_S_VERT_GSD:"
+       << theCrossScanVertGsd << "\n"
+       << pfx << std::setw(24) << "GEO_MEAN_VERT_GSD:"
+       << theGeoMeanVertGsd << "\n"
+       << pfx << std::setw(24) << "GEO_BETA_ANGLE:"
+       << theGeoBetaAngle << "\n"
+       << pfx << std::setw(24) << "DYNAMIC_RANGE:"
+       << theDynamicRange << "\n"
+       << pfx << std::setw(24) << "NUM_LINES:"
+       << theLine << "\n"
+       << pfx << std::setw(24) << "NUM_SAMPLES:"
+       << theSamples << "\n"
+       << pfx << std::setw(24) << "ANGLE_TO_NORTH:"
+       << theAngleToNorth << "\n"
+       << pfx << std::setw(24) << "OBLIQUITY_ANGLE:"
+       << theObliquityAngle << "\n"
+       << pfx << std::setw(24) << "AZ_OF_OBLIQUITY:"
+       << theAzOfObliquity << "\n"
+       << pfx << std::setw(24) << "GRD_COVER:"
+       << theGrdCover << "\n"
+       << pfx << std::setw(24) << "SNOW_DEPTH_CAT:"
+       << theSnowDepthCategory << "\n"
+       << pfx << std::setw(24) << "SUN_AZIMUTH:"
+       << theSunAzimuth << "\n"
+       << pfx << std::setw(24) << "SUN_ELEVATION:"
+       << theSunElevation << "\n"
+       << pfx << std::setw(24) << "PREDICTED_NIIRS:"
+       << thePredictedNiirs << "\n"
+       << pfx << std::setw(24) << "CIRCL_ERR:"
+       << theCircularError << "\n"
+       << pfx << std::setw(24) << "LINEAR_ERR:"
+       << theLinearError<< "\n";
+   
+   return out;
+}
+
+ossimString ossimNitfCsexraTag::getSensor() const
+{
+   return ossimString(theSensor);
+}
+   
+ossimString ossimNitfCsexraTag::getTimeFirstLineImage() const
+{
+   return ossimString(theTileFirstLine);
+}
+   
+ossimString ossimNitfCsexraTag::getTimeImageDuration() const
+{
+   return ossimString(theImageTimeDuration);
+}
+   
+ossimString ossimNitfCsexraTag::getMaxGsd() const
+{
+   return ossimString(theMaxGsd);
+}
+   
+ossimString ossimNitfCsexraTag::getAlongScanGsd() const
+{
+   return ossimString(theAlongScanGsd);
+}
+   
+ossimString ossimNitfCsexraTag::getCrossScanGsd() const
+{
+   return ossimString(theCrossScanGsd);
+}
+   
+ossimString ossimNitfCsexraTag::getGeoMeanGsd() const
+{
+   return ossimString(theGeoMeanGsd);
+}
+   
+ossimString ossimNitfCsexraTag::getAlongScanVerticalGsd() const
+{
+   return ossimString(theAlongScanVertGsd);
+}
+   
+ossimString ossimNitfCsexraTag::getCrossScanVerticalGsd() const
+{
+   return ossimString(theCrossScanVertGsd);
+}
+
+ossimString ossimNitfCsexraTag::getGeoMeanVerticalGsd() const
+{
+   return ossimString(theGeoMeanVertGsd);
+}
+
+ossimString ossimNitfCsexraTag::getGeoBetaAngle() const
+{
+   return ossimString(theGeoBetaAngle);
+}
+
+ossimString ossimNitfCsexraTag::getDynamicRange() const
+{
+   return ossimString(theDynamicRange);
+}
+   
+ossimString ossimNitfCsexraTag::getNumLines() const
+{
+   return ossimString(theLine);
+}
+   
+ossimString ossimNitfCsexraTag::getNumSamples() const
+{
+   return ossimString(theSamples);
+}
+   
+ossimString ossimNitfCsexraTag::getAngleToNorth() const
+{
+   return ossimString(theAngleToNorth);
+}
+
+ossimString ossimNitfCsexraTag::getObliquityAngle() const
+{
+   return ossimString(theObliquityAngle);
+}
+
+ossimString ossimNitfCsexraTag::getAzimuthOfObliquity() const
+{
+   return ossimString(theAzOfObliquity);
+}
+   
+ossimString ossimNitfCsexraTag::getGroundCover() const
+{
+   return ossimString(theGrdCover);
+}
+
+ossimString ossimNitfCsexraTag::getSnowDepth() const
+{
+   return ossimString(theSnowDepthCategory);
+}
+   
+ossimString ossimNitfCsexraTag::getSunAzimuth() const
+{
+   return ossimString(theSunAzimuth);
+}
+
+ossimString ossimNitfCsexraTag::getSunElevation() const
+{
+   return ossimString(theSunElevation);
+}
+
+ossimString ossimNitfCsexraTag::getPredictedNiirs() const
+{
+   return ossimString(thePredictedNiirs);
+}
+   
+ossimString ossimNitfCsexraTag::getCE90() const
+{
+   return ossimString(theCircularError);
+}
+
+ossimString ossimNitfCsexraTag::getLE90() const
+{
+   return ossimString(theLinearError);
+}
+
diff --git a/src/ossim/support_data/ossimNitfCsproaTag.cpp b/ossim/src/ossim/support_data/ossimNitfCsproaTag.cpp
similarity index 100%
rename from src/ossim/support_data/ossimNitfCsproaTag.cpp
rename to ossim/src/ossim/support_data/ossimNitfCsproaTag.cpp
diff --git a/ossim/src/ossim/support_data/ossimNitfDataExtensionSegment.cpp b/ossim/src/ossim/support_data/ossimNitfDataExtensionSegment.cpp
new file mode 100644
index 0000000..901dfed
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfDataExtensionSegment.cpp
@@ -0,0 +1,58 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfDataExtensionSegment.cpp 22418 2013-09-26 15:01:12Z gpotts $
+
+#include <ostream>
+
+#include <ossim/support_data/ossimNitfDataExtensionSegment.h>
+RTTI_DEF2(ossimNitfDataExtensionSegment,
+          "ossimNitfDataExtensionSegment",
+          ossimObject, ossimPropertyInterface)
+
+
+const ossimString ossimNitfDataExtensionSegment::DE_KW = "de";
+const ossimString ossimNitfDataExtensionSegment::DESVER_KW = "desver";
+const ossimString ossimNitfDataExtensionSegment::DESOFLW_KW = "desoflw";
+const ossimString ossimNitfDataExtensionSegment::DESITEM_KW = "desitem";
+const ossimString ossimNitfDataExtensionSegment::DESSHL_KW = "desshl";
+const ossimString ossimNitfDataExtensionSegment::DESSHF_KW = "desshf";
+const ossimString ossimNitfDataExtensionSegment::DESDATA_KW = "desdata";
+const ossimString ossimNitfDataExtensionSegment::DECLAS_KW = "declas";
+const ossimString ossimNitfDataExtensionSegment::DESCODE_KW = "descode";
+const ossimString ossimNitfDataExtensionSegment::DESCTLH_KW = "desctlh";
+const ossimString ossimNitfDataExtensionSegment::DESREL_KW = "desrel";
+const ossimString ossimNitfDataExtensionSegment::DESCAUT_KW = "descaut";
+const ossimString ossimNitfDataExtensionSegment::DESCTLN_KW = "desctln";
+
+std::ostream& operator <<(std::ostream &out,
+                          const ossimNitfDataExtensionSegment &data)
+{
+   data.print(out);
+   
+   return out;
+}
+
+void ossimNitfDataExtensionSegment::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   propertyNames.push_back(DE_KW);
+   propertyNames.push_back(DESVER_KW);
+   propertyNames.push_back(DESOFLW_KW);
+   propertyNames.push_back(DESITEM_KW);
+   propertyNames.push_back(DESSHL_KW);
+   propertyNames.push_back(DESSHF_KW);
+   propertyNames.push_back(DESDATA_KW);
+   propertyNames.push_back(DECLAS_KW);
+   propertyNames.push_back(DESCODE_KW);
+   propertyNames.push_back(DESCTLH_KW);
+   propertyNames.push_back(DESREL_KW);
+   propertyNames.push_back(DESCAUT_KW);
+   propertyNames.push_back(DESCTLN_KW);
+}
diff --git a/ossim/src/ossim/support_data/ossimNitfDataExtensionSegmentV2_0.cpp b/ossim/src/ossim/support_data/ossimNitfDataExtensionSegmentV2_0.cpp
new file mode 100644
index 0000000..afe0a1f
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfDataExtensionSegmentV2_0.cpp
@@ -0,0 +1,247 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfDataExtensionSegmentV2_0.cpp 22429 2013-10-02 12:53:06Z gpotts $
+
+#include <iostream>
+#include <ossim/support_data/ossimNitfDataExtensionSegmentV2_0.h>
+
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimBinaryDataProperty.h>
+RTTI_DEF1(ossimNitfDataExtensionSegmentV2_0, "ossimNitfDataExtensionSegmentV2_0",ossimNitfDataExtensionSegment)
+
+const ossimString ossimNitfDataExtensionSegmentV2_0::DESTAG_KW = "destag";
+const ossimString ossimNitfDataExtensionSegmentV2_0::DESDWNG_KW = "desdwng";
+const ossimString ossimNitfDataExtensionSegmentV2_0::DESDEVT_KW = "desdevt";
+
+std::ostream& operator <<(std::ostream& out,
+                          const ossimNitfDataExtIdentSecurityChunkV2_0& data)
+{
+   out << "theFilePartType:                " << data.theFilePartType
+       << "\ntheUniqueDataExtTypeId:         " << data.theUniqueDataExtTypeId
+       << "\ntheVersionDataFieldDef:         " << data.theVersionDataFieldDef
+       << "\ntheDataExtSecurityClass:        " << data.theDataExtSecurityClass
+       << "\ntheDataExtCodewords:            " << data.theDataExtCodewords
+       << "\ntheDataExtControlAndHand:       " << data.theDataExtControlAndHand
+       << "\ntheDataExtReleasingInst:        " << data.theDataExtReleasingInst
+       << "\ntheDataExtClassAuthority:       " << data.theDataExtClassAuthority
+       << "\ntheDataExtSecurityConNum:       " << data.theDataExtSecurityConNum
+       << "\ntheDataExtSecurityDowngrade:     " << data.theDataExtSecurityDowngrade
+       << "\ntheDataExtDowngradingEvent:     " << data.theDataExtDowngradingEvent
+       << std::endl;
+   
+   return out;
+}
+   
+ossimNitfDataExtensionSegmentV2_0::ossimNitfDataExtensionSegmentV2_0()
+{
+   clearFields();
+}
+
+ossimNitfDataExtensionSegmentV2_0::~ossimNitfDataExtensionSegmentV2_0()
+{
+}
+
+void ossimNitfDataExtensionSegmentV2_0::parseStream(std::istream &in, ossim_uint64 dataLength)
+{
+   if(in)
+   {
+      clearFields();
+
+      in.read(theIdentSecurityChunk.theFilePartType, 2); // 2 byte alpha
+      in.read(theIdentSecurityChunk.theUniqueDataExtTypeId, 25); // 25 byte alpha numeric
+      in.read(theIdentSecurityChunk.theVersionDataFieldDef, 2); // 2 byte numeric
+      in.read(theIdentSecurityChunk.theDataExtSecurityClass, 1); // 1 byte alpha
+      in.read(theIdentSecurityChunk.theDataExtCodewords, 40);    // 40 byte alpha numeric
+      in.read(theIdentSecurityChunk.theDataExtControlAndHand, 40); // 40 byte alpha numeric
+      in.read(theIdentSecurityChunk.theDataExtReleasingInst, 40); // 40 byte alpha numeric
+      in.read(theIdentSecurityChunk.theDataExtClassAuthority, 20); // 20 byte alph num
+      in.read(theIdentSecurityChunk.theDataExtSecurityConNum, 20); // 20 byte alpha num
+      in.read(theIdentSecurityChunk.theDataExtSecurityDowngrade, 6); // 6 byte alpha num      
+      if(ossimString(theIdentSecurityChunk.theDataExtSecurityDowngrade) == "999998")
+      {
+         in.read(theIdentSecurityChunk.theDataExtDowngradingEvent, 40); // 40 byte alpha num
+      }
+
+      ossimString desTag = ossimString(theIdentSecurityChunk.theUniqueDataExtTypeId,
+                                       theIdentSecurityChunk.theUniqueDataExtTypeId+25);
+      desTag = desTag.trim().upcase();
+      const bool overflow = (desTag == "REGISTERED EXTENSIONS" || 
+                             desTag == "CONTROLLED EXTENSIONS");
+
+      if (overflow&&in.good())
+      {
+         in.read(theOverflowedHeaderType, 6);
+         in.read(theDataItemOverflowed, 3);
+      }
+      in.read(theLengthOfUserDefinedSubheaderFields, 4);
+      // look to see if there is any data and if so read the tag
+      // to see what it is
+      long length = ossimString(theLengthOfUserDefinedSubheaderFields).toLong();
+      if (length > 0)
+      {
+         theUserDefinedSubheaderFields.resize(length);
+         in.read(reinterpret_cast<char*>(&theUserDefinedSubheaderFields.front()), theUserDefinedSubheaderFields.size());
+      }
+
+      if (dataLength != 0)
+      {
+         if (overflow)
+         {
+            istream::pos_type dataBegin = in.tellg();
+            istream::pos_type endData = dataBegin + static_cast<istream::pos_type>(dataLength);
+            while (in.good()&&(in.tellg() < endData))
+            {
+               ossimNitfTagInformation tag;
+               tag.parseStream(in);
+               theTagList.push_back(tag);
+            }
+            if(!in.good()) in.clear();
+            in.seekg(dataBegin);
+         }
+         theData.resize(dataLength);
+         in.read(reinterpret_cast<char*>(&theData.front()), theData.size());
+      }
+   }
+}
+
+void ossimNitfDataExtensionSegmentV2_0::clearFields()
+{
+
+   memset(theIdentSecurityChunk.theFilePartType, ' ', 2); // 2 byte alpha
+   memset(theIdentSecurityChunk.theUniqueDataExtTypeId, ' ', 25); // 25 byte alpha numeric
+   memset(theIdentSecurityChunk.theVersionDataFieldDef, ' ', 2); // 2 byte numeric
+   memset(theIdentSecurityChunk.theDataExtSecurityClass, ' ', 1); // 1 byte alpha
+   memset(theIdentSecurityChunk.theDataExtCodewords, ' ', 40);    // 40 byte alpha numeric
+   memset(theIdentSecurityChunk.theDataExtControlAndHand, ' ', 40); // 40 byte alpha numeric
+   memset(theIdentSecurityChunk.theDataExtReleasingInst, ' ', 40); // 40 byte alpha numeric
+   memset(theIdentSecurityChunk.theDataExtClassAuthority, ' ', 20); // 20 byte alph num
+   memset(theIdentSecurityChunk.theDataExtSecurityConNum, ' ', 20); // 20 byte alpha num
+   memset(theIdentSecurityChunk.theDataExtSecurityDowngrade, ' ', 6); // 6 byte alpha num
+   memset(theIdentSecurityChunk.theDataExtDowngradingEvent, ' ', 40); // 40 byte alpha num
+   memset(theOverflowedHeaderType, ' ', 6);
+   memset(theDataItemOverflowed, ' ', 3);
+   memset(theLengthOfUserDefinedSubheaderFields, ' ', 4);
+
+   theIdentSecurityChunk.theFilePartType[2] = '\0'; // 2 byte alpha
+   theIdentSecurityChunk.theUniqueDataExtTypeId[25] = '\0'; // 25 byte alpha numeric
+   theIdentSecurityChunk.theVersionDataFieldDef[2] = '\0'; // 2 byte numeric
+   theIdentSecurityChunk.theDataExtSecurityClass[1] = '\0'; // 1 byte alpha
+   theIdentSecurityChunk.theDataExtCodewords[40] = '\0';    // 40 byte alpha numeric
+   theIdentSecurityChunk.theDataExtControlAndHand[40] = '\0'; // 40 byte alpha numeric
+   theIdentSecurityChunk.theDataExtReleasingInst[40] = '\0'; // 40 byte alpha numeric
+   theIdentSecurityChunk.theDataExtClassAuthority[20] = '\0'; // 20 byte alph num
+   theIdentSecurityChunk.theDataExtSecurityConNum[20] = '\0'; // 20 byte alpha num
+   theIdentSecurityChunk.theDataExtSecurityDowngrade[6] = '\0'; // 6 byte alpha num
+   theIdentSecurityChunk.theDataExtDowngradingEvent[40] = '\0'; // 40 byte alpha num
+   theOverflowedHeaderType[6] = '\0';
+   theDataItemOverflowed[3]   = '\0';
+   theLengthOfUserDefinedSubheaderFields[4] = '\0';
+
+   theUserDefinedSubheaderFields.clear();
+   theData.clear();
+   theTagList.clear();
+}
+
+  
+std::ostream& ossimNitfDataExtensionSegmentV2_0::print(std::ostream& out)const
+{
+   out << "theIdentSecurityChunk:                   "
+       << theIdentSecurityChunk
+       << "\ntheOverflowedHeaderType:               "
+       << theOverflowedHeaderType
+       << "\ntheDataItemOverflowed:                 "
+       << theDataItemOverflowed
+       << "\ntheLengthOfUserDefinedSubheaderFields: "
+       << theLengthOfUserDefinedSubheaderFields
+       << "\ntag count:                             "
+       << theTagList.size() << std::endl;
+   return out;
+}
+
+ossimRefPtr<ossimProperty> ossimNitfDataExtensionSegmentV2_0::getProperty(const ossimString& name)const
+{
+   ossimProperty* property = 0;
+   if (name == DE_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theFilePartType).trim());
+   }
+   else if (name == DESTAG_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theUniqueDataExtTypeId).trim());
+   }
+   else if (name == DESVER_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theVersionDataFieldDef).trim());
+   }
+   else if (name == DECLAS_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtSecurityClass).trim());
+   }
+   else if (name == DESCODE_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtCodewords).trim());
+   }
+   else if (name == DESCTLH_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtControlAndHand).trim());
+   }
+   else if (name == DESREL_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtReleasingInst).trim());
+   }
+   else if (name == DESCAUT_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtClassAuthority).trim());
+   }
+   else if (name == DESCTLN_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtSecurityConNum).trim());
+   }
+   else if (name == DESDWNG_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtSecurityDowngrade).trim());
+   }
+   else if (name == DESDEVT_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtDowngradingEvent).trim());
+   }
+   else if (name == DESOFLW_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theOverflowedHeaderType).trim());
+   }
+   else if (name == DESITEM_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theDataItemOverflowed).trim());
+   }
+   else if (name == DESSHL_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theLengthOfUserDefinedSubheaderFields).trim());
+   }
+   else if (name == DESSHF_KW)
+   {
+      property = new ossimBinaryDataProperty(name, theUserDefinedSubheaderFields);
+   }
+   else if (name == DESDATA_KW)
+   {
+      // Only valid if setTagList has not been called on this object.
+      property = new ossimBinaryDataProperty(name, theData);
+   }
+
+   return property;
+}
+
+void ossimNitfDataExtensionSegmentV2_0::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimNitfDataExtensionSegment::getPropertyNames(propertyNames);
+   propertyNames.push_back(DESTAG_KW);
+   propertyNames.push_back(DESDWNG_KW);
+   propertyNames.push_back(DESDEVT_KW);
+}
diff --git a/ossim/src/ossim/support_data/ossimNitfDataExtensionSegmentV2_1.cpp b/ossim/src/ossim/support_data/ossimNitfDataExtensionSegmentV2_1.cpp
new file mode 100644
index 0000000..6885397
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfDataExtensionSegmentV2_1.cpp
@@ -0,0 +1,554 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfDataExtensionSegmentV2_1.cpp 9094 2006-06-13 19:12:40Z dburken $
+
+#include <iostream>
+
+#include <ossim/support_data/ossimNitfCommon.h>
+#include <ossim/support_data/ossimNitfDataExtensionSegmentV2_1.h>
+#include <ossim/support_data/ossimNitfFileHeaderV2_1.h>
+
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimIoStream.h>
+#include <ossim/base/ossimBinaryDataProperty.h>
+RTTI_DEF1(ossimNitfDataExtensionSegmentV2_1, "ossimNitfDataExtensionSegmentV2_1",ossimNitfDataExtensionSegment)
+
+
+const ossimString ossimNitfDataExtensionSegmentV2_1::DESID_KW = "desid";
+const ossimString ossimNitfDataExtensionSegmentV2_1::DESCLSY_KW = "desclsy";
+const ossimString ossimNitfDataExtensionSegmentV2_1::DESDCTP_KW = "desdctp";
+const ossimString ossimNitfDataExtensionSegmentV2_1::DESDCDT_KW = "desdcdt";
+const ossimString ossimNitfDataExtensionSegmentV2_1::DESDCXM_KW = "desdcxm";
+const ossimString ossimNitfDataExtensionSegmentV2_1::DESDG_KW = "desdg";
+const ossimString ossimNitfDataExtensionSegmentV2_1::DESDGDT_KW = "desdgdt";
+const ossimString ossimNitfDataExtensionSegmentV2_1::DESCLTX_KW = "descltx";
+const ossimString ossimNitfDataExtensionSegmentV2_1::DESCATP_KW = "descatp";
+const ossimString ossimNitfDataExtensionSegmentV2_1::DESCRSN_KW = "descrsn";
+const ossimString ossimNitfDataExtensionSegmentV2_1::DESSRDT_KW = "dessrdt";
+
+std::ostream& operator <<(std::ostream& out,
+                          const ossimNitfDataExtIdentSecurityChunkV2_1& data)
+{
+   out << "theFilePartType:                  " << data.theFilePartType
+       << "\ntheUniqueDataExtTypeId:         " << data.theUniqueDataExtTypeId
+       << "\ntheVersionDataFieldDef:         " << data.theVersionDataFieldDef
+       << "\ntheDataExtSecurityClass:        " << data.theDataExtSecurityClass
+       << "\ntheDataExtClassSystem:          " << data.theDataExtClassSystem
+       << "\ntheDataExtCodewords:            " << data.theDataExtCodewords
+       << "\ntheDataExtControlAndHand:       " << data.theDataExtControlAndHand
+       << "\ntheDataExtReleasingInst:        " << data.theDataExtReleasingInst
+       << "\ntheDataExtDeclassType:          " << data.theDataExtDeclassType
+       << "\ntheDataExtDeclassDate:          " << data.theDataExtDeclassDate
+       << "\ntheDataExtDeclassExempt:        " << data.theDataExtDeclassExempt
+       << "\ntheDataExtSecurityDowngrade:    " << data.theDataExtSecurityDowngrade
+       << "\ntheDataExtSecurityDowngradeDate:" << data.theDataExtSecurityDowngradeDate
+       << "\ntheDataExtSecurityClassText:    " << data.theDataExtSecurityClassText
+       << "\ntheDataExtClassAuthType:        " << data.theDataExtClassAuthType
+       << "\ntheDataExtClassAuthority:       " << data.theDataExtClassAuthority
+       << "\ntheDataExtClassReason:          " << data.theDataExtClassReason
+       << "\ntheDataExtSecuritySourceDate:   " << data.theDataExtSecuritySourceDate
+       << "\ntheDataExtSecurityConNum:       " << data.theDataExtSecurityConNum
+       << std::endl;
+   
+   return out;
+}
+   
+ossimNitfDataExtensionSegmentV2_1::ossimNitfDataExtensionSegmentV2_1() :
+   theUserDefinedSubheaderFields(0),
+   theData(0)
+{
+   clearFields();
+}
+
+ossimNitfDataExtensionSegmentV2_1::~ossimNitfDataExtensionSegmentV2_1()
+{
+
+}
+
+void ossimNitfDataExtensionSegmentV2_1::parseStream(std::istream &in, ossim_uint64 dataLength)
+{
+   if(in)
+   {
+      clearFields();
+
+      in.read(theIdentSecurityChunk.theFilePartType, 2); // 2 byte alpha
+      in.read(theIdentSecurityChunk.theUniqueDataExtTypeId, 25); // 25 byte alpha numeric
+      in.read(theIdentSecurityChunk.theVersionDataFieldDef, 2); // 2 byte numeric
+      in.read(theIdentSecurityChunk.theDataExtSecurityClass, 1); // 1 byte alpha
+      in.read(theIdentSecurityChunk.theDataExtClassSystem, 2);
+      in.read(theIdentSecurityChunk.theDataExtCodewords, 11);    // 11 byte alpha numeric
+      in.read(theIdentSecurityChunk.theDataExtControlAndHand, 2); // 2 byte alpha numeric
+      in.read(theIdentSecurityChunk.theDataExtReleasingInst, 20); // 20 byte alpha numeric
+      in.read(theIdentSecurityChunk.theDataExtDeclassType, 2); // 2 byte alph num
+      in.read(theIdentSecurityChunk.theDataExtDeclassDate, 8); // 8 byte alph num
+      in.read(theIdentSecurityChunk.theDataExtDeclassExempt, 4); // 4 byte alpha num
+      in.read(theIdentSecurityChunk.theDataExtSecurityDowngrade, 1); // 1 byte alpha num      
+      in.read(theIdentSecurityChunk.theDataExtSecurityDowngradeDate, 8); // 8 byte alpha num      
+      in.read(theIdentSecurityChunk.theDataExtSecurityClassText, 43); // 43 byte alpha num      
+      in.read(theIdentSecurityChunk.theDataExtClassAuthType, 1); // 1 byte alpha num      
+      in.read(theIdentSecurityChunk.theDataExtClassAuthority, 40); // 40 byte alpha num      
+      in.read(theIdentSecurityChunk.theDataExtClassReason, 1); // 1 byte alpha num      
+      in.read(theIdentSecurityChunk.theDataExtSecuritySourceDate, 8); // 8 byte alpha num      
+      in.read(theIdentSecurityChunk.theDataExtSecurityConNum, 15); // 15 byte alpha num      
+
+      bool overflow = ossimString(theIdentSecurityChunk.theUniqueDataExtTypeId).trim().upcase() == "TRE_OVERFLOW";
+      if (overflow)
+      {
+         in.read(theOverflowedHeaderType, 6);
+         in.read(theDataItemOverflowed, 3);
+      }
+
+      in.read(theLengthOfUserDefinedSubheaderFields, 4);
+
+      // look to see if there is any data and if so read the tag
+      // to see what it is
+      long length = ossimString(theLengthOfUserDefinedSubheaderFields).toLong();
+      if (length > 0)
+      {
+         theUserDefinedSubheaderFields.resize(length);
+         in.read(reinterpret_cast<char*>(&theUserDefinedSubheaderFields.front()), theUserDefinedSubheaderFields.size());
+      }
+
+      if (dataLength != 0)
+      {
+         if (overflow)
+         {
+            std::streamoff dataBegin = in.tellg();
+            std::streamoff dataEnd   = dataBegin + static_cast<std::streamoff>(dataLength);
+            
+            // dataBegin + static_cast<istream::pos_type>(dataLength))
+            while (in.good() && (in.tellg() < dataEnd) ) 
+            {
+               ossimNitfTagInformation tag;
+               tag.clearFields();
+               tag.parseStream(in);
+               theTagList.push_back(tag);
+            }
+
+            ossimIFStream64::seekg64(in, dataBegin, ios::beg);
+            in.clear();
+         }
+
+         theData.resize(dataLength);
+         in.read(reinterpret_cast<char*>(&theData.front()), theData.size());
+      }
+   }
+}
+
+void ossimNitfDataExtensionSegmentV2_1::writeStream(std::ostream &out)
+{
+   if (out)
+   {
+      out.write(theIdentSecurityChunk.theFilePartType, 2);
+      out.write(theIdentSecurityChunk.theUniqueDataExtTypeId, 25);
+      out.write(theIdentSecurityChunk.theVersionDataFieldDef, 2);
+      out.write(theIdentSecurityChunk.theDataExtSecurityClass, 1);
+      out.write(theIdentSecurityChunk.theDataExtClassSystem, 2);
+      out.write(theIdentSecurityChunk.theDataExtCodewords, 11);
+      out.write(theIdentSecurityChunk.theDataExtControlAndHand, 2);
+      out.write(theIdentSecurityChunk.theDataExtReleasingInst, 20);
+      out.write(theIdentSecurityChunk.theDataExtDeclassType, 2);
+      out.write(theIdentSecurityChunk.theDataExtDeclassDate, 8);
+      out.write(theIdentSecurityChunk.theDataExtDeclassExempt, 4);
+      out.write(theIdentSecurityChunk.theDataExtSecurityDowngrade, 1);
+      out.write(theIdentSecurityChunk.theDataExtSecurityDowngradeDate, 8);
+      out.write(theIdentSecurityChunk.theDataExtSecurityClassText, 43);
+      out.write(theIdentSecurityChunk.theDataExtClassAuthType, 1);
+      out.write(theIdentSecurityChunk.theDataExtClassAuthority, 40);
+      out.write(theIdentSecurityChunk.theDataExtClassReason, 1);
+      out.write(theIdentSecurityChunk.theDataExtSecuritySourceDate, 8);
+      out.write(theIdentSecurityChunk.theDataExtSecurityConNum, 15);
+
+      bool overflow = ossimString(theIdentSecurityChunk.theUniqueDataExtTypeId).trim().upcase() == "TRE_OVERFLOW";
+      if (overflow)
+      {
+         out.write(theOverflowedHeaderType, 6);
+         out.write(theDataItemOverflowed, 3);
+      }
+
+      out.write(theLengthOfUserDefinedSubheaderFields, 4);
+      for (unsigned int i = 0; i < theUserDefinedSubheaderFields.size(); i++)
+      {
+         out.write(reinterpret_cast<char*>(&theUserDefinedSubheaderFields.front()), theUserDefinedSubheaderFields.size());
+      }
+
+      if (overflow && theTagList.empty() == false)
+      {
+         for (std::vector<ossimNitfTagInformation>::iterator iter = theTagList.begin();
+            iter != theTagList.end(); ++iter)
+         {
+            iter->writeStream(out);
+         }
+      }
+      else
+      {
+         out.write(reinterpret_cast<char*>(&theData.front()), theData.size());
+      }
+   }
+}
+
+void ossimNitfDataExtensionSegmentV2_1::clearFields()
+{
+   memset(theIdentSecurityChunk.theFilePartType, ' ', 2);
+   memset(theIdentSecurityChunk.theUniqueDataExtTypeId, ' ', 25);
+   memset(theIdentSecurityChunk.theVersionDataFieldDef, 0, 2);
+   memset(theIdentSecurityChunk.theDataExtSecurityClass, ' ', 1);
+   memset(theIdentSecurityChunk.theDataExtClassSystem, ' ', 2);
+   memset(theIdentSecurityChunk.theDataExtCodewords, ' ', 11);
+   memset(theIdentSecurityChunk.theDataExtControlAndHand, ' ', 2);
+   memset(theIdentSecurityChunk.theDataExtReleasingInst, ' ', 20);
+   memset(theIdentSecurityChunk.theDataExtDeclassType, ' ', 2);
+   memset(theIdentSecurityChunk.theDataExtDeclassDate, ' ', 8);
+   memset(theIdentSecurityChunk.theDataExtDeclassExempt, ' ', 4);
+   memset(theIdentSecurityChunk.theDataExtSecurityDowngrade, ' ', 1);
+   memset(theIdentSecurityChunk.theDataExtSecurityDowngradeDate, ' ', 8);
+   memset(theIdentSecurityChunk.theDataExtSecurityClassText, ' ', 43);
+   memset(theIdentSecurityChunk.theDataExtClassAuthType, ' ', 1);
+   memset(theIdentSecurityChunk.theDataExtClassAuthority, ' ', 40);
+   memset(theIdentSecurityChunk.theDataExtClassReason, ' ', 1);
+   memset(theIdentSecurityChunk.theDataExtSecuritySourceDate, ' ', 8);
+   memset(theIdentSecurityChunk.theDataExtSecurityConNum, ' ', 15);
+
+   memset(theOverflowedHeaderType, ' ', 6);
+   memset(theDataItemOverflowed, '0', 3);
+   memset(theLengthOfUserDefinedSubheaderFields, '0', 4);
+   
+   theIdentSecurityChunk.theFilePartType[2] = '\0';
+   theIdentSecurityChunk.theUniqueDataExtTypeId[25] = '\0';
+   theIdentSecurityChunk.theVersionDataFieldDef[2] = '\0';
+   theIdentSecurityChunk.theDataExtSecurityClass[1] = '\0';
+   theIdentSecurityChunk.theDataExtClassSystem[2] = '\0';
+   theIdentSecurityChunk.theDataExtCodewords[11] = '\0';
+   theIdentSecurityChunk.theDataExtControlAndHand[2] = '\0';
+   theIdentSecurityChunk.theDataExtReleasingInst[20] = '\0';
+   theIdentSecurityChunk.theDataExtDeclassType[2] = '\0';
+   theIdentSecurityChunk.theDataExtDeclassDate[8] = '\0';
+   theIdentSecurityChunk.theDataExtDeclassExempt[4] = '\0';
+   theIdentSecurityChunk.theDataExtSecurityDowngrade[1] = '\0';
+   theIdentSecurityChunk.theDataExtSecurityDowngradeDate[8] = '\0';
+   theIdentSecurityChunk.theDataExtSecurityClassText[43] = '\0';
+   theIdentSecurityChunk.theDataExtClassAuthType[1] = '\0';
+   theIdentSecurityChunk.theDataExtClassAuthority[40] = '\0';
+   theIdentSecurityChunk.theDataExtClassReason[1] = '\0';
+   theIdentSecurityChunk.theDataExtSecuritySourceDate[8] = '\0';
+   theIdentSecurityChunk.theDataExtSecurityConNum[15] = '\0';
+
+   theOverflowedHeaderType[6] = '\0';
+   theDataItemOverflowed[3]   = '\0';
+   theLengthOfUserDefinedSubheaderFields[4] = '\0';
+   theUserDefinedSubheaderFields.clear();
+   theData.clear();
+   theTagList.clear();
+}
+
+void ossimNitfDataExtensionSegmentV2_1::setTagList(const std::vector<ossimNitfTagInformation> &tagList)
+{
+   theTagList = tagList;
+   theData.clear();
+}
+
+void ossimNitfDataExtensionSegmentV2_1::setSecurityMarkings(const ossimNitfFileHeaderV2_1 &fileHeader)
+{
+   strcpy(theIdentSecurityChunk.theDataExtSecurityClass, fileHeader.getSecurityClassification().c_str());
+   strcpy(theIdentSecurityChunk.theDataExtClassSystem, fileHeader.getSecurityClassificationSys().c_str());
+   strcpy(theIdentSecurityChunk.theDataExtCodewords, fileHeader.getCodeWords().c_str());
+   strcpy(theIdentSecurityChunk.theDataExtControlAndHand, fileHeader.getControlAndHandling().c_str());
+   strcpy(theIdentSecurityChunk.theDataExtReleasingInst, fileHeader.getReleasingInstructions().c_str());
+   strcpy(theIdentSecurityChunk.theDataExtDeclassType, fileHeader.getDeclassificationType().c_str());
+   strcpy(theIdentSecurityChunk.theDataExtDeclassDate, fileHeader.getDeclassificationDate().c_str());
+   strcpy(theIdentSecurityChunk.theDataExtDeclassExempt, fileHeader.getDeclassificationExemption().c_str());
+   strcpy(theIdentSecurityChunk.theDataExtSecurityDowngrade, fileHeader.getDowngrade().c_str());
+   strcpy(theIdentSecurityChunk.theDataExtSecurityDowngradeDate, fileHeader.getDowngradingDate().c_str());
+   strcpy(theIdentSecurityChunk.theDataExtSecurityClassText, fileHeader.getClassificationText().c_str());
+   strcpy(theIdentSecurityChunk.theDataExtClassAuthType, fileHeader.getClassificationAuthorityType().c_str());
+   strcpy(theIdentSecurityChunk.theDataExtClassAuthority, fileHeader.getClassificationAuthority().c_str());
+   strcpy(theIdentSecurityChunk.theDataExtClassReason, fileHeader.getClassificationReason().c_str());
+   strcpy(theIdentSecurityChunk.theDataExtSecuritySourceDate, fileHeader.getSecuritySourceDate().c_str());
+   strcpy(theIdentSecurityChunk.theDataExtSecurityConNum, fileHeader.getSecurityControlNumber().c_str());
+}
+  
+std::ostream& ossimNitfDataExtensionSegmentV2_1::print(std::ostream& out)const
+{
+   out << "theIdentSecurityChunk:                   "
+       << theIdentSecurityChunk
+       << "\ntheOverflowedHeaderType:               "
+       << theOverflowedHeaderType
+       << "\ntheDataItemOverflowed:                 "
+       << theDataItemOverflowed
+       << "\ntheLengthOfUserDefinedSubheaderFields: "
+       << theLengthOfUserDefinedSubheaderFields
+       << "\ntag count:                             "
+       << theTagList.size() << std::endl;
+   return out;
+}
+
+ossim_uint32 ossimNitfDataExtensionSegmentV2_1::getHeaderLength() const
+{
+   if (ossimString(theIdentSecurityChunk.theUniqueDataExtTypeId).trim().upcase() == "TRE_OVERFLOW")
+   {
+      return 209;
+   }
+
+   return 200 + theUserDefinedSubheaderFields.size();
+}
+
+ossim_uint64 ossimNitfDataExtensionSegmentV2_1::getDataLength() const
+{
+   ossim_uint64 totalDataLength = 0;
+   if (theTagList.empty() == true)
+   {
+      totalDataLength = theData.size();
+   }
+   else
+   {
+      for (std::vector<ossimNitfTagInformation>::const_iterator iter = theTagList.begin();
+         iter != theTagList.end(); iter++)
+      {
+         totalDataLength += iter->getTotalTagLength();
+      }
+   }
+
+   return totalDataLength;
+}
+
+void ossimNitfDataExtensionSegmentV2_1::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if (property.get() == NULL)
+   {
+      return;
+   }
+
+   const ossimString& name = property->getName();
+   if (name == DE_KW)
+   {
+      ossimNitfCommon::setField(theIdentSecurityChunk.theFilePartType, property->valueToString(), 2);
+   }
+   else if (name == DESID_KW)
+   {
+      ossimNitfCommon::setField(theIdentSecurityChunk.theUniqueDataExtTypeId, property->valueToString(), 25);
+   }
+   else if (name == DESVER_KW)
+   {
+      ossimNitfCommon::setField(theIdentSecurityChunk.theVersionDataFieldDef, property->valueToString(), 2, ios::right, '0');
+   }
+   else if (name == DECLAS_KW)
+   {
+      ossimNitfCommon::setField(theIdentSecurityChunk.theDataExtSecurityClass, property->valueToString(), 1);
+   }
+   else if (name == DESCLSY_KW)
+   {
+      ossimNitfCommon::setField(theIdentSecurityChunk.theDataExtClassSystem, property->valueToString(), 2);
+   }
+   else if (name == DESCODE_KW)
+   {
+      ossimNitfCommon::setField(theIdentSecurityChunk.theDataExtCodewords, property->valueToString(), 11);
+   }
+   else if (name == DESCTLH_KW)
+   {
+      ossimNitfCommon::setField(theIdentSecurityChunk.theDataExtControlAndHand, property->valueToString(), 2);
+   }
+   else if (name == DESREL_KW)
+   {
+      ossimNitfCommon::setField(theIdentSecurityChunk.theDataExtReleasingInst, property->valueToString(), 20);
+   }
+   else if (name == DESDCTP_KW)
+   {
+      ossimNitfCommon::setField(theIdentSecurityChunk.theDataExtDeclassType, property->valueToString(), 2);
+   }
+   else if (name == DESDCDT_KW)
+   {
+      ossimNitfCommon::setField(theIdentSecurityChunk.theDataExtDeclassDate, property->valueToString(), 8);
+   }
+   else if (name == DESDCXM_KW)
+   {
+      ossimNitfCommon::setField(theIdentSecurityChunk.theDataExtDeclassExempt, property->valueToString(), 4);
+   }
+   else if (name == DESDG_KW)
+   {
+      ossimNitfCommon::setField(theIdentSecurityChunk.theDataExtSecurityDowngrade, property->valueToString(), 1);
+   }
+   else if (name == DESDGDT_KW)
+   {
+      ossimNitfCommon::setField(theIdentSecurityChunk.theDataExtSecurityDowngradeDate, property->valueToString(), 8);
+   }
+   else if (name == DESCLTX_KW)
+   {
+      ossimNitfCommon::setField(theIdentSecurityChunk.theDataExtSecurityClassText, property->valueToString(), 43);
+   }
+   else if (name == DESCATP_KW)
+   {
+      ossimNitfCommon::setField(theIdentSecurityChunk.theDataExtClassAuthType, property->valueToString(), 1);
+   }
+   else if (name == DESCAUT_KW)
+   {
+      ossimNitfCommon::setField(theIdentSecurityChunk.theDataExtClassAuthority, property->valueToString(), 40);
+   }
+   else if (name == DESCRSN_KW)
+   {
+      ossimNitfCommon::setField(theIdentSecurityChunk.theDataExtClassReason, property->valueToString(), 1);
+   }
+   else if (name == DESSRDT_KW)
+   {
+      ossimNitfCommon::setField(theIdentSecurityChunk.theDataExtSecuritySourceDate, property->valueToString(), 8);
+   }
+   else if (name == DESCTLN_KW)
+   {
+      ossimNitfCommon::setField(theIdentSecurityChunk.theDataExtSecurityConNum, property->valueToString(), 15);
+   }
+   else if (name == DESOFLW_KW)
+   {
+      ossimNitfCommon::setField(theOverflowedHeaderType, property->valueToString(), 6);
+   }
+   else if (name == DESITEM_KW)
+   {
+      ossimNitfCommon::setField(theDataItemOverflowed, property->valueToString(), 3, ios::right, '0');
+   }
+   else if (name == DESSHL_KW)
+   {
+      ossimNitfCommon::setField(theLengthOfUserDefinedSubheaderFields, property->valueToString(), 4, ios::right, '0');
+   }
+   else if (name == DESSHF_KW)
+   {
+      ossimBinaryDataProperty* pBinaryData = PTR_CAST(ossimBinaryDataProperty, property.get());
+      if (pBinaryData != NULL)
+      {
+         theUserDefinedSubheaderFields = pBinaryData->getBinaryData();
+      }
+   }
+   else if (name == DESDATA_KW)
+   {
+      ossimBinaryDataProperty* pBinaryData = PTR_CAST(ossimBinaryDataProperty, property.get());
+      if (pBinaryData != NULL)
+      {
+         theData = pBinaryData->getBinaryData();
+      }
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimNitfDataExtensionSegmentV2_1::getProperty(const ossimString& name)const
+{
+   ossimProperty* property = 0;
+   if (name == DE_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theFilePartType).trim());
+   }
+   else if (name == DESID_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theUniqueDataExtTypeId).trim());
+   }
+   else if (name == DESVER_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theVersionDataFieldDef).trim());
+   }
+   else if (name == DECLAS_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtSecurityClass).trim());
+   }
+   else if (name == DESCLSY_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtClassSystem).trim());
+   }
+   else if (name == DESCODE_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtCodewords).trim());
+   }
+   else if (name == DESCTLH_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtControlAndHand).trim());
+   }
+   else if (name == DESREL_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtReleasingInst).trim());
+   }
+   else if (name == DESDCTP_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtDeclassType).trim());
+   }
+   else if (name == DESDCDT_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtDeclassDate).trim());
+   }
+   else if (name == DESDCXM_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtDeclassExempt).trim());
+   }
+   else if (name == DESDG_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtSecurityDowngrade).trim());
+   }
+   else if (name == DESDGDT_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtSecurityDowngradeDate).trim());
+   }
+   else if (name == DESCLTX_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtSecurityClassText).trim());
+   }
+   else if (name == DESCATP_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtClassAuthType).trim());
+   }
+   else if (name == DESCAUT_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtClassAuthority).trim());
+   }
+   else if (name == DESCRSN_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtClassReason).trim());
+   }
+   else if (name == DESSRDT_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtSecuritySourceDate).trim());
+   }
+   else if (name == DESCTLN_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theIdentSecurityChunk.theDataExtSecurityConNum).trim());
+   }
+   else if (name == DESOFLW_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theOverflowedHeaderType).trim());
+   }
+   else if (name == DESITEM_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theDataItemOverflowed).trim());
+   }
+   else if (name == DESSHL_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theLengthOfUserDefinedSubheaderFields).trim());
+   }
+   else if (name == DESSHF_KW)
+   {
+      property = new ossimBinaryDataProperty(name, theUserDefinedSubheaderFields);
+   }
+   else if (name == DESDATA_KW)
+   {
+      // Only valid if setTagList has not been called on this object.
+      property = new ossimBinaryDataProperty(name, theData);
+   }
+
+   return property;
+}
+
+void ossimNitfDataExtensionSegmentV2_1::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimNitfDataExtensionSegment::getPropertyNames(propertyNames);
+   propertyNames.push_back(DESID_KW);
+   propertyNames.push_back(DESCLSY_KW);
+   propertyNames.push_back(DESDCTP_KW);
+   propertyNames.push_back(DESDCDT_KW);
+   propertyNames.push_back(DESDCXM_KW);
+   propertyNames.push_back(DESDG_KW);
+   propertyNames.push_back(DESDGDT_KW);
+   propertyNames.push_back(DESCLTX_KW);
+   propertyNames.push_back(DESCATP_KW);
+   propertyNames.push_back(DESCRSN_KW);
+   propertyNames.push_back(DESSRDT_KW);
+}
diff --git a/ossim/src/ossim/support_data/ossimNitfEmbeddedRpfDes.cpp b/ossim/src/ossim/support_data/ossimNitfEmbeddedRpfDes.cpp
new file mode 100644
index 0000000..1075179
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfEmbeddedRpfDes.cpp
@@ -0,0 +1,39 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfEmbeddedRpfDes.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <istream>
+#include <ostream>
+#include <ossim/support_data/ossimNitfEmbeddedRpfDes.h>
+
+
+RTTI_DEF1(ossimNitfEmbeddedRpfDes, "ossimNitfEmbeddedRpfDes", ossimNitfRegisteredTag)
+
+
+ossimNitfEmbeddedRpfDes::ossimNitfEmbeddedRpfDes()
+   : ossimNitfRegisteredTag(std::string("RPFDES"), 0)
+{
+}
+
+ossimNitfEmbeddedRpfDes::~ossimNitfEmbeddedRpfDes()
+{
+}
+
+void ossimNitfEmbeddedRpfDes::parseStream(std::istream& /* in */ )
+{
+}
+
+std::ostream& ossimNitfEmbeddedRpfDes::print(std::ostream& out, const std::string& /* prefix */)const
+{
+   return out;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfEngrdaTag.cpp b/ossim/src/ossim/support_data/ossimNitfEngrdaTag.cpp
new file mode 100644
index 0000000..78be623
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfEngrdaTag.cpp
@@ -0,0 +1,254 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: ENGRDA - Engineering Data tag class declaration.
+//
+// See document STDI-0002 (version 3), Appendix N for more info.
+// 
+//----------------------------------------------------------------------------
+// $Id
+
+#include <cstring>
+#include <istream>
+#include <iostream>
+#include <iomanip>
+#include <sstream>
+
+#include <ossim/support_data/ossimNitfEngrdaTag.h>
+#include <ossim/base/ossimNotify.h>
+
+
+RTTI_DEF1(ossimNitfEngrdaTag, "ossimNitfEngrdaTag", ossimNitfRegisteredTag);
+
+ossimNitfEngrdaTag::ossimNitfEngrdaTag()
+   : ossimNitfRegisteredTag(std::string("ENGRDA"), 0)
+{
+   clearFields();
+}
+
+ossimNitfEngrdaTag::~ossimNitfEngrdaTag()
+{
+}
+
+void ossimNitfEngrdaTag::parseStream(std::istream& in)
+{
+   clearFields();
+
+   // m_tagLength = RETAG_SIZE + REL_SIZE;
+   
+   in.read(theReSrc, RESRC_SIZE);
+   m_tagLength += RESRC_SIZE;
+   
+   in.read(theReCnt, RECNT_SIZE);
+   m_tagLength += RECNT_SIZE;
+
+   const ossim_uint16 ELEMENT_COUNT = ossimString(theReCnt).toUInt16();
+   
+   for (ossim_uint16 i = 0; i < ELEMENT_COUNT; ++i)
+   {
+      ossimString os;
+      char buf[TMP_BUF_SIZE];
+      ossimEngDataElement element;
+
+      // ENGLN - label length field
+      in.read(buf, ENGLN_SIZE);
+      m_tagLength += ENGLN_SIZE;
+      buf[ENGLN_SIZE] = '\n';
+      os = buf;
+
+      // ENGLBL - label field
+      ossim_uint32 size = os.toUInt16();
+      in.read(buf, size);
+      m_tagLength += size;
+      buf[size] = '\0';
+      element.theEngLbl = buf;
+
+      // ENGMTXC - data column count
+      in.read(buf, ENGMTXC_SIZE);
+      m_tagLength += ENGMTXC_SIZE;
+      buf[ENGMTXC_SIZE] = '\0';
+      os = buf;
+      element.theEngMtxC = os.toUInt16();
+
+      // ENGMTXR - data row count
+      in.read(buf, ENGMTXR_SIZE);
+      m_tagLength += ENGMTXR_SIZE;
+      buf[ENGMTXR_SIZE] = '\0';
+      os = buf;
+      element.theEngMtxR = os.toUInt16();
+
+      // ENGTYP - Value Type of Engineering Data Element.
+      in.get( element.theEngTyp );
+      m_tagLength += ENGTYP_SIZE;
+
+      // ENGDTS - Engineering Data Element Size
+      element.theEngDts = static_cast<ossim_uint8>(in.get());
+      m_tagLength += ENGDTS_SIZE;
+
+      // ENGDATU - Engineering Data Units.
+      in.read(buf, ENGDATU_SIZE);
+      m_tagLength += ENGDATU_SIZE;
+      buf[ENGDATU_SIZE] = '\0';
+      element.theEngDatU = buf;
+
+      // ENGDATC - Engineering Data Count
+      in.read(buf, ENGDATC_SIZE);
+      m_tagLength += ENGDATC_SIZE;
+      buf[ENGDATC_SIZE] = '\n';
+      os = buf;
+      ossim_uint32 engDatC = os.toUInt32();
+
+      // ENGDATA - Engineering Data
+      element.theEngDat.resize(engDatC);
+      in.read((char*)&(element.theEngDat.front()), (std::streamsize)element.theEngDat.size());
+      m_tagLength += engDatC;
+      
+      theData.push_back(element);
+
+   } // Matches: for (ossim_uint16 i = 0; i < ELEMENT_COUNT; ++i)
+}
+
+void ossimNitfEngrdaTag::writeStream(std::ostream& out)
+{
+   //out.write(theAcMsnId, AC_MSN_ID_SIZE);
+   // out.write(theAcTailNo, AC_TAIL_NO_SIZE);
+
+   out.write(theReSrc, RESRC_SIZE);
+   out.write(theReCnt, RECNT_SIZE);
+
+   const ossim_uint16 ELEMENT_COUNT = ossimString(theReCnt).toUInt16();
+   
+   for (ossim_uint16 i = 0; i < ELEMENT_COUNT; ++i)
+   {
+      // ENGLN - label length field      
+      std::string s;
+      getValueAsString(theData[i].theEngLbl.size(), ENGLN_SIZE, s);
+      out.write(s.data(), ENGLN_SIZE);
+
+      // ENGLBL - label field
+      out.write(theData[i].theEngLbl.data(), (std::streamsize)theData[i].theEngLbl.size());
+
+      // ENGMTXC - data column count
+      getValueAsString(theData[i].theEngMtxC, ENGMTXC_SIZE, s); 
+      out.write(s.data(), ENGMTXC_SIZE);
+
+      // ENGMTXR - data row count
+      getValueAsString(theData[i].theEngMtxR, ENGMTXR_SIZE, s);
+      out.write(s.data(), ENGMTXR_SIZE);
+
+      // ENGTYP - Value Type of Engineering Data Element.
+      out.write(&theData[i].theEngTyp, ENGTYP_SIZE);
+
+      // ENGDTS - Engineering Data Element Size
+      out.write((char*)(&theData[i].theEngDts), ENGDTS_SIZE);
+
+      // ENGDATU - Engineering Data Units.
+      out.write(theData[i].theEngDatU.data(), ENGDATU_SIZE);
+
+      // ENGDATC - Engineering Data Count
+      getValueAsString(theData[i].theEngDat.size(), ENGDATC_SIZE, s); 
+      out.write(s.data(), ENGDATC_SIZE);
+
+      // ENGDATA - Engineering Data NOTE: should be big endian...
+      out.write((char*)&(theData[i].theEngDat.front()),
+                (std::streamsize)theData[i].theEngDat.size());
+
+   } // Matches: for (ossim_uint16 i = 0; i < ELEMENT_COUNT; ++i)
+   
+}
+
+void ossimNitfEngrdaTag::clearFields()
+{
+   // BCS-N's to '0's, BCS-A's to ' '(spaces)
+
+   // clear
+   memset(theReSrc, ' ', RESRC_SIZE);
+   memset(theReCnt, ' ', RECNT_SIZE);
+   theData.clear();
+
+   // null terminate
+   theReSrc[RESRC_SIZE] = '\0';
+   theReCnt[RECNT_SIZE] = '\0';
+
+   m_tagLength = 0;
+}
+
+std::ostream& ossimNitfEngrdaTag::print(
+   std::ostream& out, const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+   
+   out << setiosflags(std::ios::left)
+       << pfx << std::setw(24) << "CETAG:"
+       << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:"   << getSizeInBytes() << "\n"
+       << pfx << std::setw(24) << "RESRC:" << theReSrc << "\n"
+       << pfx << std::setw(24) << "RECNT:" << theReCnt << "\n";
+
+   for (ossim_uint32 i = 0; i < theData.size(); ++i)
+   {
+      out << pfx << "ENGLBL[" << i << std::setw(24) << "]:"
+          << theData[i].theEngLbl << "\n"
+          << pfx << "ENGMTXC[" << i << std::setw(24) << "]:"
+          << theData[i].theEngMtxC << "\n"
+          << pfx << "ENGMTXR[" << i << std::setw(24) << "]:"
+          << theData[i].theEngMtxR << "\n"
+          << pfx << "ENGTYP[" << i << std::setw(24) << "]:"
+          << theData[i].theEngTyp << "\n"
+          << pfx << "ENGDTS[" << i << std::setw(24) << "]:"
+          << theData[i].theEngDts << "\n"
+          << pfx << "ENGDATU[" << i << std::setw(24) << "]:"
+          << theData[i].theEngDatU << "\n"
+          << pfx << "ENGDATC[" << i << std::setw(24) << "]:"
+          << theData[i].theEngDat.size() << "\n";
+      
+      printData(out, theData[i], i, pfx);
+
+      
+   }
+   
+   return out;
+}
+
+std::ostream& ossimNitfEngrdaTag::printData(std::ostream& out,
+                                            const ossimEngDataElement& element,
+                                            ossim_uint32 /* elIndex */,
+                                            const std::string& /* prefix */) const
+{
+   if (element.theEngTyp == 'A')
+   {
+      std::vector<ossim_uint8>::const_iterator i = element.theEngDat.begin();
+      while (i != element.theEngDat.end())
+      {
+         out << static_cast<ossim_int8>(*i);
+         ++i;
+      }
+      out << "\n";
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimNitfEngrdaTag::printData WARNING unhandled data type."
+         << "Data type = " << (char)element.theEngTyp << "\n"
+         << std::endl;
+   } 
+   return out;
+}
+
+template <class T>
+void ossimNitfEngrdaTag::getValueAsString(
+   T v, ossim_uint16 w, std::string& s) const
+{
+   std::ostringstream os;
+   os << std::setw(w) << std::setfill('0') << setiosflags(ios::right) << v;
+   s = os.str();
+}
+   
+
diff --git a/src/ossim/support_data/ossimNitfExoptaTag.cpp b/ossim/src/ossim/support_data/ossimNitfExoptaTag.cpp
similarity index 100%
rename from src/ossim/support_data/ossimNitfExoptaTag.cpp
rename to ossim/src/ossim/support_data/ossimNitfExoptaTag.cpp
diff --git a/ossim/src/ossim/support_data/ossimNitfFile.cpp b/ossim/src/ossim/support_data/ossimNitfFile.cpp
new file mode 100644
index 0000000..f5445cb
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfFile.cpp
@@ -0,0 +1,416 @@
+//*******************************************************************
+//
+//  License:  MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfFile.cpp 23666 2015-12-14 20:01:22Z rashadkm $
+
+#include <ossim/support_data/ossimNitfFile.h>
+#include <ossim/support_data/ossimNitfFileHeader.h>
+#include <ossim/support_data/ossimNitfImageHeader.h>
+#include <ossim/support_data/ossimNitfFileHeaderV2_0.h>
+#include <ossim/support_data/ossimNitfFileHeaderV2_1.h>
+#include <ossim/support_data/ossimNitfImageHeaderV2_0.h>
+#include <ossim/support_data/ossimNitfImageHeaderV2_1.h>
+#include <ossim/support_data/ossimNitfTagFactoryRegistry.h>
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+#include <ossim/support_data/ossimRpfToc.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimIoStream.h>
+#include <fstream>
+#include <iostream>
+#include <iomanip>
+
+
+// Static trace for debugging
+static ossimTrace traceDebug("ossimNitfFile:debug");
+
+std::ostream& operator <<(std::ostream& out, const ossimNitfFile& data)
+{
+   return data.print(out);
+}
+
+std::ostream& ossimNitfFile::print(std::ostream& out,
+                                   const std::string& prefix,
+                                   bool printOverviews) const
+{
+   if(theNitfFileHeader.valid())
+   {
+      std::string pfx = prefix;
+      pfx += "nitf.";
+      theNitfFileHeader->print(out, pfx);
+      
+      ossim_int32 n = theNitfFileHeader->getNumberOfImages();
+      for(ossim_int32 idx = 0; idx < n; ++idx)
+      {
+         ossimNitfImageHeader* ih = getNewImageHeader(idx);
+         if(ih)
+         {
+            bool printIt = true;
+            
+            if ( !printOverviews )
+            {
+               // Check the IMAG field.
+               ossim_float64 imag;
+               ih->getDecimationFactor(imag);
+               if ( !ossim::isnan(imag) )
+               {
+                  if ( imag < 1.0)
+                  {
+                     printIt = false;
+                  }
+               }
+
+               //---
+               // Now see if it's a cloud mask image.  Do not print
+               // cloud mask images if the printOverviews is false.
+               //---
+               if ( printIt )
+               {
+                  if ( (ih->getCategory().trim(ossimString(" ")) ==
+                        "CLOUD") &&
+                       (ih->getRepresentation().trim(ossimString(" ")) ==
+                        "NODISPLY") )
+                  {
+                     printIt = false;
+                  }
+               }
+            }
+
+            if (printIt)
+            {
+               // Add our prefix onto prefix.
+               std::string s = pfx;
+               s += "image";
+               s += ossimString::toString(idx).string();
+               s += ".";
+               
+               ih->print(out, s);
+            }
+            
+            delete ih;
+            ih = 0;
+         }
+      }
+
+      //---
+      // Check for RPF stuff:
+      //---
+      ossimNitfTagInformation info; 
+      theNitfFileHeader->getTag(info, "RPFHDR");
+      if(info.getTagName() == "RPFHDR")
+      {
+         // Open of the a.toc.
+         ossimRefPtr<ossimRpfToc> toc = new ossimRpfToc;
+         if ( toc->parseFile(getFilename()) ==
+              ossimErrorCodes::OSSIM_OK )
+         {
+            pfx += "rpf.";
+            toc->print(out, pfx, printOverviews);
+         }
+      }
+      
+   } // matches:  if(theNitfFileHeader.valid())
+
+   return out;
+   
+}
+
+bool ossimNitfFile::saveState(ossimKeywordlist& kwl, const ossimString& prefix)const
+{
+   bool result = theNitfFileHeader.valid(); 
+   
+   if(theNitfFileHeader.valid())
+   {
+      theNitfFileHeader->saveState(kwl, prefix);
+   }
+   ossim_int32 n = theNitfFileHeader->getNumberOfImages();
+   for(ossim_int32 idx = 0; idx < n; ++idx)
+   {
+      ossimRefPtr<ossimNitfImageHeader> ih = getNewImageHeader(idx);
+      ossimString newPrefix = prefix + "image" + ossimString::toString(idx) + ".";
+#if 1     
+      ih->saveState(kwl, newPrefix);
+#else
+      if ( (ih->getCategory().trim(ossimString(" ")) !=
+            "CLOUD") ||
+          (ih->getRepresentation().trim(ossimString(" ")) !=
+           "NODISPLY") )
+      {
+         ih->saveState(kwl, newPrefix);
+      }
+#endif
+   }
+   return result;
+}
+
+ossimNitfFile::ossimNitfFile()
+   : theFilename(""),
+     theNitfFileHeader(0)
+{
+}
+
+ossimNitfFile::~ossimNitfFile()
+{
+   theNitfFileHeader = 0;
+}
+
+bool ossimNitfFile::parseFile(const ossimFilename& file)
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimNitfFile::parseFile: "
+         << "endtered......"
+         << std::endl;
+   }
+   if(!file.exists()) return false;
+   // this currently crashes if the open fails so I am going back to
+   // using ifstream instead of this one
+   //
+
+   //ossimIFStream64 in(file.c_str(), std::ios::in|std::ios::binary);
+
+   std::ifstream in(file.c_str(), std::ios::in|std::ios::binary);
+   if (in.fail())
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG ossimNitfFile::parseFile: "
+            << "Could not open file:  " << file.c_str()
+            << "\nReturning..." << std::endl;
+      }
+      return false;
+   }
+      
+   if(theNitfFileHeader.valid())
+   {
+      theNitfFileHeader = 0;
+   }
+
+   char temp[10];
+   in.read(temp, 9);
+   //in.seekg64(0, std::ios::beg);
+   in.seekg(0, std::ios::beg);
+   temp[9] ='\0';
+   
+   theFilename = file;
+
+   ossimString s(temp);
+   if(s == "NITF02.00")
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG: NITF Version 2.0"
+            << std::endl;
+      }
+      theNitfFileHeader = new ossimNitfFileHeaderV2_0;
+   }
+   else if ( (s == "NITF02.10") || (s == "NSIF01.00") )
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG: NITF Version 2.1"
+            << std::endl;
+      }
+      theNitfFileHeader = new ossimNitfFileHeaderV2_1;
+   }
+   else
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG ossimNitfFile::parseFile: "
+            << "Not an NITF file!"
+            << std::endl;
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG ossimNitfFile::parseFile: returning...........false"
+            << "endtered......"
+            << std::endl;
+      }
+      return false;
+   }
+
+   if(theNitfFileHeader.valid())
+   {
+      try
+      {
+         theNitfFileHeader->parseStream(in);
+
+         // Sanity check the size before going on:
+
+#if 0                                                                   \
+   /*
+    * Temp removed for release as workaround for VS10 >2gb offset issue.
+    * drb 20130418
+    */
+         if ( file.fileSize() < theNitfFileHeader->getFileSize() )
+         {
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << "ossimNitfFile::parseFile ERROR:\n"
+                  << "File size is less than file length in header!"
+                  << "\nNITF FL field: " << theNitfFileHeader->getFileSize()
+                  << "\nActual file length: " << file.fileSize()
+                  << std::endl;
+            }
+            return false;
+         }
+#endif
+         
+      }
+      catch( const ossimException& e )
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimNitfFile::parseFile caught exception:\n"
+               << e.what()
+               << std::endl;
+         }
+         return false;
+      }
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimNitfFile::parseFile: returning...........true"
+         << std::endl;
+   }
+   return true;
+}
+
+const ossimNitfFileHeader* ossimNitfFile::getHeader() const
+{
+   return theNitfFileHeader.get();
+}
+
+ossimNitfFileHeader* ossimNitfFile::getHeader() 
+{
+   return theNitfFileHeader.get();
+}
+
+ossimIrect ossimNitfFile::getImageRect()const
+{
+   if(theNitfFileHeader.valid())
+   {
+      return theNitfFileHeader->getImageRect();
+   }
+
+   return ossimIrect(ossimIpt(0,0), ossimIpt(0,0));
+}
+
+ossimNitfImageHeader* ossimNitfFile::getNewImageHeader(
+   ossim_uint32 imageNumber)const
+{
+   ossimNitfImageHeader* result = 0;
+   if(theNitfFileHeader.valid())
+   {
+      try // getNewImageHeader can throw exception on parse.
+      {
+         std::ifstream in(theFilename.c_str(), std::ios::in|std::ios::binary);
+         result = theNitfFileHeader->getNewImageHeader(imageNumber, in);
+         in.close();
+      }
+      catch( const ossimException& e )
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimNitfFile::getNewImageHeader caught exception:\n"
+               << e.what()
+               << std::endl;
+         }
+         result = 0;
+      }
+   }
+   return result;
+}
+
+ossimNitfSymbolHeader* ossimNitfFile::getNewSymbolHeader(
+   ossim_uint32 symbolNumber)const
+{
+   ossimNitfSymbolHeader* result = 0;
+   if(theNitfFileHeader.valid())
+   {
+      std::ifstream in(theFilename.c_str(), std::ios::in|std::ios::binary);
+
+      result = theNitfFileHeader->getNewSymbolHeader(symbolNumber, in);
+      in.close();
+   }
+   
+   return result;
+}
+
+ossimNitfLabelHeader* ossimNitfFile::getNewLabelHeader(
+   ossim_uint32 labelNumber)const
+{
+   ossimNitfLabelHeader* result = 0;
+   if(theNitfFileHeader.valid())
+   {
+      std::ifstream in(theFilename.c_str(), std::ios::in|std::ios::binary);
+
+      result = theNitfFileHeader->getNewLabelHeader(labelNumber, in);
+      in.close();
+   }
+   
+   return result;
+}
+
+ossimNitfTextHeader* ossimNitfFile::getNewTextHeader(
+   ossim_uint32 textNumber)const
+{
+   ossimNitfTextHeader* result = 0;
+   if(theNitfFileHeader.valid())
+   {
+      std::ifstream in(theFilename.c_str(), std::ios::in|std::ios::binary);
+
+      result = theNitfFileHeader->getNewTextHeader(textNumber, in);
+      in.close();
+   }
+   
+   return result;
+}
+
+ossimNitfDataExtensionSegment* ossimNitfFile::getNewDataExtensionSegment(
+   ossim_uint32 dataExtNumber)const
+{
+   ossimNitfDataExtensionSegment* result = 0;
+   if(theNitfFileHeader.valid())
+   {
+      std::ifstream in(theFilename.c_str(), std::ios::in|std::ios::binary);
+
+      result = theNitfFileHeader->getNewDataExtensionSegment(dataExtNumber, in);
+      in.close();
+   }
+   
+   return result;
+}
+
+ossimString ossimNitfFile::getVersion()const
+{
+   if(theNitfFileHeader.valid())
+   {
+      return ossimString(theNitfFileHeader->getVersion());
+   }
+   
+   return ossimString("");
+}
+
+ossimFilename ossimNitfFile::getFilename() const
+{
+   return theFilename;
+}
diff --git a/ossim/src/ossim/support_data/ossimNitfFileHeader.cpp b/ossim/src/ossim/support_data/ossimNitfFileHeader.cpp
new file mode 100644
index 0000000..4fcbf1c
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfFileHeader.cpp
@@ -0,0 +1,230 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfFileHeader.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/support_data/ossimNitfFileHeader.h>
+#include <ossim/base/ossimContainerProperty.h>
+#include <iostream>
+#include <sstream>
+
+static const char* TAGS_KW = "tags";
+
+RTTI_DEF2(ossimNitfFileHeader, "ossimNitfFileHeader", ossimObject, ossimPropertyInterface);
+
+std::ostream& ossimNitfImageOffsetInformation::print(std::ostream& out) const
+{
+   return out << "theImageHeaderOffset:          "
+              << theImageHeaderOffset << std::endl
+              << "theImageDataOffset:            "
+              << theImageDataOffset;
+}
+
+ossimNitfFileHeader::ossimNitfFileHeader()
+{
+}
+
+ossimNitfFileHeader::~ossimNitfFileHeader()
+{
+}
+
+
+bool ossimNitfFileHeader::getTag(ossimNitfTagInformation& tagInfo,
+                                 const ossimString& tagName)const
+{
+   if(theTagList.size())
+   {
+      for(ossim_uint32 i = 0; i < theTagList.size(); ++i)
+      {
+         if(theTagList[i].getTagName() == tagName)
+         {
+            tagInfo = theTagList[i];
+            return true;
+         }
+      }
+   }
+
+   return false;
+}
+
+bool  ossimNitfFileHeader::hasImages()const
+{
+   return (getNumberOfImages() > 0);
+}
+
+bool  ossimNitfFileHeader::hasSymbols()const
+{
+   return (getNumberOfSymbols() > 0);
+}
+
+bool  ossimNitfFileHeader::hasGraphics()const
+{
+   return (getNumberOfGraphics() > 0);
+}
+
+bool  ossimNitfFileHeader::hasText()const
+{
+   return (getNumberOfTextSegments() > 0);
+}
+
+bool  ossimNitfFileHeader::hasLabels()const
+{
+   return (getNumberOfLabels() > 0);
+}
+bool ossimNitfFileHeader::hasDataExtSegments()const
+{
+   return (getNumberOfDataExtSegments() > 0);
+}
+
+void ossimNitfFileHeader::removeTag(const ossimString& tagName)
+{
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx < theTagList.size(); ++idx)
+   {
+      if(theTagList[idx].getTagName() == tagName)
+      {
+         theTagList.erase(theTagList.begin() + idx);
+         return;
+      }
+   }
+}
+void ossimNitfFileHeader::addTag(const ossimNitfTagInformation& tag, bool unique)
+{
+   if(unique)
+   {
+      removeTag(tag.getTagName());
+   }
+   theTagList.push_back(tag);
+}
+
+bool ossimNitfFileHeader::getTagInformation(ossimNitfTagInformation& tag,
+                                            int idx) const
+{
+   bool result = false;
+   
+   if(static_cast<ossim_uint32>(idx) < theTagList.size())
+   {
+      tag = theTagList[idx];
+      result = true;
+   }
+   
+   return result;
+}
+
+int ossimNitfFileHeader::getNumberOfTags()const
+{
+   return (int)theTagList.size();
+}
+
+ossim_uint32 ossimNitfFileHeader::getTotalTagLength()const
+{
+   ossim_uint32 tagLength = 0;
+   
+   for(ossim_uint32 i = 0; i < theTagList.size(); ++i)
+   {
+      tagLength += theTagList[i].getTotalTagLength();
+   }
+   
+   return tagLength;
+}
+
+
+void ossimNitfFileHeader::setProperty(ossimRefPtr<ossimProperty> /* property */)
+{
+}
+
+ossimRefPtr<ossimProperty> ossimNitfFileHeader::getProperty(const ossimString& name)const
+{
+   ossimRefPtr<ossimProperty> result = 0;
+
+   if(name == TAGS_KW)
+   {
+      ossim_uint32 idxMax = (ossim_uint32)theTagList.size();
+      if(idxMax > 0)
+      {
+         ossimContainerProperty* containerProperty = new ossimContainerProperty;
+         containerProperty->setName(name);
+         ossim_uint32 idx = 0;
+
+         result = containerProperty;
+         for(idx = 0; idx < idxMax; ++idx)
+         {
+            ossimNitfTagInformation tagInfo;
+            getTagInformation(tagInfo, idx);
+            
+            const ossimRefPtr<ossimNitfRegisteredTag> tagData = tagInfo.getTagData();
+            if(tagData.valid())
+            {
+               ossimContainerProperty* containerPropertyTag = new ossimContainerProperty;
+               containerPropertyTag->setName(tagInfo.getTagName());
+               std::vector<ossimRefPtr<ossimProperty> > propertyList;
+               tagData->getPropertyList(propertyList);
+               
+               containerPropertyTag->addChildren(propertyList);
+               containerProperty->addChild(containerPropertyTag);
+            }
+            else
+            {
+               containerProperty->addStringProperty(tagInfo.getTagName(), "", true);
+            }
+         }
+      }
+   }
+   
+   return result;
+}
+
+void ossimNitfFileHeader::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   propertyNames.push_back(TAGS_KW);
+}
+
+bool ossimNitfFileHeader::saveState(ossimKeywordlist& kwl, const ossimString& prefix)const
+{
+   ossimObject::saveState(kwl, prefix);
+   
+   bool result = true;
+   ossimString tagsPrefix = prefix;
+   for(ossim_uint32 i = 0; i < theTagList.size(); ++i)
+   {
+      ossimRefPtr<ossimNitfRegisteredTag> tag = theTagList[i].getTagData();
+      if (tag.valid())
+      {
+         // we eventually need to do our own prefix for this object and not let the calling object do any prefix definitions
+//         ossimString newPrefix = tagsPrefix + tag->getRegisterTagName() + ".";
+
+         tag->saveState(kwl, tagsPrefix);
+      }
+   }
+   
+   return result;
+}
+
+std::ostream& ossimNitfFileHeader::print(std::ostream& out,
+                                         const std::string& prefix ) const
+{
+   return printTags(out, prefix);
+}
+
+std::ostream& ossimNitfFileHeader::printTags(std::ostream& out,
+                                             const std::string& prefix) const
+{
+   for(ossim_uint32 i = 0; i < theTagList.size(); ++i)
+   {
+      ossimRefPtr<ossimNitfRegisteredTag> tag = theTagList[i].getTagData();
+      if (tag.valid())
+      {
+         tag->print(out, prefix);
+      }
+   }
+
+   return out;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfFileHeaderV2_0.cpp b/ossim/src/ossim/support_data/ossimNitfFileHeaderV2_0.cpp
new file mode 100644
index 0000000..81d10f4
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfFileHeaderV2_0.cpp
@@ -0,0 +1,1704 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfFileHeaderV2_0.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+
+#include <sstream>
+#include <cstring> // for memset
+#include <iostream>
+#include <iomanip>
+#include <stdexcept>
+#include <ossim/support_data/ossimNitfCommon.h>
+#include <ossim/support_data/ossimNitfFileHeaderV2_0.h>
+#include <ossim/support_data/ossimNitfImageHeaderV2_0.h>
+#include <ossim/support_data/ossimNitfSymbolHeaderV2_0.h>
+#include <ossim/support_data/ossimNitfLabelHeaderV2_0.h>
+#include <ossim/support_data/ossimNitfTextHeaderV2_0.h>
+#include <ossim/support_data/ossimNitfDataExtensionSegmentV2_0.h>
+
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimStringProperty.h>
+
+
+const ossimString ossimNitfFileHeaderV2_0::FSDWNG_KW = "fsdwng";
+const ossimString ossimNitfFileHeaderV2_0::FSDEVT_KW = "fsdevt";
+
+static const ossimTrace traceDebug("ossimNitfFileHeaderV2_0:debug");
+
+RTTI_DEF1(ossimNitfFileHeaderV2_0, "ossimNitfFileHeaderV2_0", ossimNitfFileHeaderV2_X)
+
+std::ostream& operator <<(std::ostream& out,
+                          const ossimNitfImageInfoRecordV2_0 &data)
+{
+   return out << "theImageSubheaderLength:       "
+              << data.theImageSubheaderLength << std::endl
+              << "theImageLength:                "
+              << data.theImageLength;
+}
+
+ossim_uint32 ossimNitfImageInfoRecordV2_0::getHeaderLength()const
+{
+   return ossimString(theImageSubheaderLength).toInt32();
+}
+
+ossim_uint64  ossimNitfImageInfoRecordV2_0::getImageLength()const
+{
+   return ossimString(theImageLength).toInt32();
+}
+
+ossim_uint64 ossimNitfImageInfoRecordV2_0::getTotalLength()const
+{
+   return (getHeaderLength() + getImageLength());
+}
+
+void ossimNitfImageInfoRecordV2_0::setSubheaderLength(ossim_uint32 length)
+{
+   ostringstream out;
+   
+   out << std::setw(6)
+   << std::setfill('0')
+   << std::setiosflags(ios::right)
+   << length;
+   
+   memcpy(theImageSubheaderLength, out.str().c_str(), 6);
+   theImageSubheaderLength[6] = '\0';
+}
+
+void ossimNitfImageInfoRecordV2_0::setImageLength(ossim_uint64 length)
+{
+   ostringstream out;
+   
+   out << std::setw(10)
+   << std::setfill('0')
+   << std::setiosflags(ios::right)
+   << length;
+   
+   memcpy(theImageLength, out.str().c_str(), 10);
+   theImageLength[10] = '\0';
+}
+
+std::ostream& operator <<(std::ostream& out,
+                     const ossimNitfSymbolInfoRecordV2_0 &data)
+{
+   return out << "theSymbolSubheaderLength:       "
+              << data.theSymbolSubheaderLength << std::endl
+              << "theSymbolLength:                "
+              << data.theSymbolLength;
+}
+ossim_int32 ossimNitfSymbolInfoRecordV2_0::getHeaderLength()const
+{
+   return ossimString(theSymbolSubheaderLength).toInt32();
+}
+
+ossim_int32 ossimNitfSymbolInfoRecordV2_0::getImageLength()const
+{
+   return ossimString(theSymbolLength).toInt32();
+}
+
+ossim_int32 ossimNitfSymbolInfoRecordV2_0::getTotalLength()const
+{
+   return (getHeaderLength() + getImageLength());
+}
+
+std::ostream& operator <<(std::ostream& out,
+                     const ossimNitfLabelInfoRecordV2_0 &data)
+{
+   return out << "theLabelSubheaderLength:       "
+              << data.theLabelSubheaderLength << std::endl
+              << "theLabelLength:                "
+              << data.theLabelLength;
+}
+
+ossim_int32 ossimNitfLabelInfoRecordV2_0::getHeaderLength()const
+{
+   return ossimString(theLabelSubheaderLength).toInt32();
+}
+
+ossim_int32 ossimNitfLabelInfoRecordV2_0::getImageLength()const
+{
+   return ossimString(theLabelLength).toInt32();
+}
+
+ossim_int32 ossimNitfLabelInfoRecordV2_0::getTotalLength()const
+{
+   return (getHeaderLength() + getImageLength());
+}
+
+std::ostream& operator <<(std::ostream& out,
+                     const ossimNitfTextInfoRecordV2_0 &data)
+{
+   return out << "theTextSubheaderLength:       "
+              << data.theTextSubheaderLength << std::endl
+              << "theTextLength:                "
+              << data.theTextLength;
+}
+
+ossim_int32 ossimNitfTextInfoRecordV2_0::getHeaderLength()const
+{
+   return ossimString(theTextSubheaderLength).toInt32();
+}
+
+ossim_int32 ossimNitfTextInfoRecordV2_0::getImageLength()const
+{
+   return ossimString(theTextLength).toInt32();
+}
+
+ossim_int32 ossimNitfTextInfoRecordV2_0::getTotalLength()const
+{
+   return (getHeaderLength() + getImageLength());
+}
+
+std::ostream& operator <<(std::ostream& out,
+                     const ossimNitfDataExtSegInfoRecordV2_0 &data)
+{
+   return out << "theDataExtSegSubheaderLength:       "
+              << data.theDataExtSegSubheaderLength << std::endl
+              << "theDataExtSegLength:                "
+              << data.theDataExtSegLength;
+}
+
+ossim_int32 ossimNitfDataExtSegInfoRecordV2_0::getHeaderLength()const
+{
+   return ossimString(theDataExtSegSubheaderLength).toInt32();
+}
+
+ossim_int32 ossimNitfDataExtSegInfoRecordV2_0::getImageLength()const
+{
+   return ossimString(theDataExtSegLength).toInt32();
+}
+
+ossim_int32 ossimNitfDataExtSegInfoRecordV2_0::getTotalLength()const
+{
+   return (getHeaderLength() + getImageLength());
+}
+
+std::ostream& operator <<(std::ostream& out,
+                     const ossimNitfResExtSegInfoRecordV2_0 &data)
+{
+   return out << "theResExtSegSubheaderLength:       "
+              << data.theResExtSegSubheaderLength << std::endl
+              << "theResExtSegLength:                "
+              << data.theResExtSegLength;
+}
+
+ossimNitfFileHeaderV2_0::ossimNitfFileHeaderV2_0()
+   :ossimNitfFileHeaderV2_X()
+{
+   clearFields();
+}
+
+ossimNitfFileHeaderV2_0::~ossimNitfFileHeaderV2_0()
+{
+}
+
+void ossimNitfFileHeaderV2_0::parseStream(std::istream &in)
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfFileHeaderV2_0::parseStream:   entered ......."
+         << std::endl;
+   }
+   
+   clearFields();
+   
+   // identification and origination group
+   in.read(theFileTypeVersion, 9);
+   theHeaderSize+=9;
+   in.read(theComplexityLevel, 2);
+   theHeaderSize+=2;
+   in.read(theSystemType, 4);
+   theHeaderSize+=4;
+   in.read(theOriginatingStationId, 10);
+   theHeaderSize+=10;
+   in.read(theDateTime, 14);
+   theHeaderSize+=14;
+   in.read(theFileTitle, 80);
+   theHeaderSize+=80;
+   
+   // read security group
+   in.read(theSecurityClassification, 1);
+   theHeaderSize++;
+   in.read(theCodewords, 40);
+   theHeaderSize+=40;
+   in.read(theControlAndHandling, 40);
+   theHeaderSize+=40;
+   in.read(theReleasingInstructions, 40);
+   theHeaderSize+=40;
+   in.read(theClassificationAuthority, 20);
+   theHeaderSize+=20;
+   in.read(theSecurityControlNumber, 20);
+   theHeaderSize+=20;
+   in.read(theSecurityDowngrade, 6);
+   theHeaderSize+=6;
+   if(ossimString(theSecurityDowngrade) == "999998")
+   {
+      in.read(theDowngradingEvent, 40);
+      theHeaderSize+=40;
+   }      
+   in.read(theCopyNumber, 5);
+   theHeaderSize+=5;
+   in.read(theNumberOfCopies, 5);
+   theHeaderSize+=5;
+   in.read(theEncryption, 1);
+   theHeaderSize++;
+   in.read(theOriginatorsName, 27);
+   theHeaderSize+=27;
+   in.read(theOriginatorsPhone, 18);
+   theHeaderSize+=18;
+   
+   in.read(theFileLength, 12);
+   theHeaderSize+=12;
+   in.read(theHeaderLength, 6);
+   theHeaderSize+=6;
+   
+   // image description group
+   in.read(theNumberOfImageInfoRecords, 3);
+   theHeaderSize+=3;
+   readImageInfoRecords(in);
+
+   // symbol description group
+   in.read(theNumberOfSymbolInfoRecords, 3);
+   theHeaderSize+=3;
+   readSymbolInfoRecords(in);
+   
+   // label description group
+   in.read(theNumberOfLabelInfoRecords, 3);
+   theHeaderSize+=3;
+   readLabelInfoRecords(in);
+   
+   // text file information group
+   in.read(theNumberOfTextFileInfoRecords, 3);
+   theHeaderSize+=3;
+   readTextFileInfoRecords(in);
+   
+   // Data extension group
+   in.read(theNumberOfDataExtSegInfoRecords, 3);
+   theHeaderSize+=3;
+   readDataExtSegInfoRecords(in);
+   
+   // Reserve Extension Segment group
+   in.read(theNumberOfResExtSegInfoRecords, 3);
+   theHeaderSize+=3;
+   readResExtSegInfoRecords(in);
+   
+   in.read(theUserDefinedHeaderDataLength, 5);
+   theHeaderSize+=5;
+   
+   theTagList.clear();
+   // only get the header overflow if there even exists
+   // user defined data.
+   ossim_int32 userDefinedHeaderLength = ossimString(theUserDefinedHeaderDataLength).toInt32();
+   
+   ossimNitfTagInformation         headerTag;
+   
+   std::streampos start   = in.tellg();
+   std::streampos current = in.tellg();
+
+   theHeaderSize+=userDefinedHeaderLength;
+   if(userDefinedHeaderLength > 0)
+   {
+      in.read(theUserDefinedHeaderOverflow, 3);
+      
+      current = in.tellg();
+      while((current - start) < userDefinedHeaderLength)
+      {
+         headerTag.parseStream(in);
+         headerTag.setTagType("UDHD");
+         theTagList.push_back(headerTag);
+         // in.ignore(headerTag.getTagLength());
+         // headerTag.clearFields();
+
+         //---
+         // We will check the stream here as there have been instances of
+         // rpf's with bad stream offsets.
+         //---
+         if (!in)
+         {
+            std::string e =
+               "ossimNitfFileHeaderV2_0::parseStream stream error!";
+            throw ossimException(e);
+         }
+
+         current = in.tellg();
+      }
+   }
+   in.read(theExtendedHeaderDataLength, 5);
+   theHeaderSize+=5;
+   ossim_int32 extendedHeaderDataLength = ossimString(theExtendedHeaderDataLength).toInt32();
+   theHeaderSize+=extendedHeaderDataLength;
+   
+   start   = in.tellg();
+   current = in.tellg();
+   // for now let's just ignore it
+   if(extendedHeaderDataLength > 0)
+   {
+      in.read(theExtendedHeaderOverflow, 3);
+      current = in.tellg();
+     
+      while((current - start) < extendedHeaderDataLength)
+      {
+         headerTag.parseStream(in);
+         headerTag.setTagType("XHD");
+         theTagList.push_back(headerTag);
+         in.ignore(headerTag.getTagLength());
+         headerTag.clearFields();
+         current = in.tellg();
+      }
+   }
+   
+   // this need to be re-thought
+   initializeAllOffsets();
+   readOverflowTags(in);
+
+   if(traceDebug())
+   {
+      ossimNitfFileHeader::print( ossimNotify(ossimNotifyLevel_DEBUG) );
+   }
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimNitfFileHeaderV2_0::parseStream:   Leaving......."
+         << std::endl;
+   }
+//      initializeDisplayLevels(in);
+
+}
+
+void ossimNitfFileHeaderV2_0::readOverflowTags(istream& in)
+{
+   ossim_int32 overflow = ossimString(theUserDefinedHeaderOverflow).toInt32();
+   if (overflow != 0)
+   {
+      ossimRefPtr<ossimNitfDataExtensionSegment> des = getNewDataExtensionSegment(overflow-1, in);
+      if (des.valid())
+      {
+         const vector<ossimNitfTagInformation> &desTags = des->getTagList();
+         for (vector<ossimNitfTagInformation>::const_iterator iter = desTags.begin(); 
+              iter != desTags.end(); 
+              ++iter)
+         {
+            iter->setTagType("UDHD");
+            theTagList.push_back(*iter);
+         }
+         des = 0;
+      }
+   }
+
+   overflow = ossimString(theExtendedHeaderOverflow).toInt32();
+   if (overflow != 0)
+   {
+      ossimRefPtr<ossimNitfDataExtensionSegment> des = getNewDataExtensionSegment(overflow-1, in);
+      if (des.valid())
+      {
+         const vector<ossimNitfTagInformation> &desTags = des->getTagList();
+         for (vector<ossimNitfTagInformation>::const_iterator iter = desTags.begin(); iter != desTags.end(); ++iter)
+         {
+            iter->setTagType("XHD");
+            theTagList.push_back(*iter);
+         }
+         des = 0;
+
+      }
+   }
+}
+
+void ossimNitfFileHeaderV2_0::writeStream(std::ostream &out)
+{
+   // identification and origination group
+   out.write(theFileTypeVersion, 9);
+   out.write(theComplexityLevel, 2);
+   out.write(theSystemType, 4);
+   out.write(theOriginatingStationId, 10);
+   out.write(theDateTime, 14);
+   out.write(theFileTitle, 80);
+   
+   // read security group
+   out.write(theSecurityClassification, 1);
+   out.write(theCodewords, 40);
+   out.write(theControlAndHandling, 40);
+   out.write(theReleasingInstructions, 40);
+   out.write(theClassificationAuthority, 20);
+   out.write(theSecurityControlNumber, 20);
+   out.write(theSecurityDowngrade, 6);
+   if(ossimString(theSecurityDowngrade) == "999998")
+   {
+      out.write(theDowngradingEvent, 40);
+   }      
+   out.write(theCopyNumber, 5);
+   out.write(theNumberOfCopies, 5);
+   out.write(theEncryption, 1);
+   out.write(theOriginatorsName, 27);
+   out.write(theOriginatorsPhone, 18);
+   
+   out.write(theFileLength, 12);
+   out.write(theHeaderLength, 6);   
+   ossim_uint32 idx = 0;
+   {
+      ostringstream outString;
+      
+      
+      outString << std::setw(3)
+      << std::setfill('0')
+      << std::setiosflags(ios::right)
+      << theNitfImageInfoRecords.size();
+      
+      out.write(outString.str().c_str(), 3);
+      
+      for(idx = 0; idx < theNitfImageInfoRecords.size(); ++idx)
+      {
+         out.write(theNitfImageInfoRecords[idx].theImageSubheaderLength, 6);
+         out.write(theNitfImageInfoRecords[idx].theImageLength, 10);
+      }
+   }
+   {
+      ostringstream outString;
+      
+      outString << std::setw(3)
+      << std::setfill('0')
+      << std::setiosflags(ios::right)
+      << theNitfSymbolInfoRecords.size();
+      
+      out.write(outString.str().c_str(), 3);
+      
+      for(idx = 0; idx < theNitfSymbolInfoRecords.size(); ++idx)
+      {
+         out.write(theNitfSymbolInfoRecords[idx].theSymbolSubheaderLength, 4);
+         out.write(theNitfSymbolInfoRecords[idx].theSymbolLength, 6);
+      }
+   }
+   {
+      ostringstream outString;
+      
+      outString << std::setw(3)
+      << std::setfill('0')
+      << std::setiosflags(ios::right)
+      << theNitfLabelInfoRecords.size();
+      
+      out.write(outString.str().c_str(), 3);
+      
+      for(idx = 0; idx < theNitfLabelInfoRecords.size(); ++idx)
+      {
+         out.write(theNitfLabelInfoRecords[idx].theLabelSubheaderLength, 4);
+         out.write(theNitfLabelInfoRecords[idx].theLabelLength, 3);
+      }
+   }
+   {
+      ostringstream outString;
+      
+      outString << std::setw(3)
+      << std::setfill('0')
+      << std::setiosflags(ios::right)
+      << theNitfTextInfoRecords.size();
+      
+      out.write(outString.str().c_str(), 3);
+      
+      for(idx = 0; idx < theNitfTextInfoRecords.size(); ++idx)
+      {
+         out.write(theNitfTextInfoRecords[idx].theTextSubheaderLength, 4);
+         out.write(theNitfTextInfoRecords[idx].theTextLength, 5);
+      }
+   }
+   {
+      ostringstream outString;
+      
+      outString << std::setw(3)
+      << std::setfill('0')
+      << std::setiosflags(ios::right)
+      << theNitfDataExtSegInfoRecords.size();
+      
+      out.write(outString.str().c_str(), 3);
+      
+      for(idx = 0; idx < theNitfDataExtSegInfoRecords.size(); ++idx)
+      {
+         out.write(theNitfDataExtSegInfoRecords[idx].theDataExtSegSubheaderLength, 4);
+         out.write(theNitfDataExtSegInfoRecords[idx].theDataExtSegLength, 9);
+      }
+   }
+   {
+      ostringstream outString;
+      
+      outString << std::setw(3)
+      << std::setfill('0')
+      << std::setiosflags(ios::right)
+      << theNitfResExtSegInfoRecords.size();
+      
+      out.write(outString.str().c_str(), 3);
+      
+      for(idx = 0; idx < theNitfResExtSegInfoRecords.size(); ++idx)
+      {
+         out.write(theNitfResExtSegInfoRecords[idx].theResExtSegSubheaderLength, 4);
+         out.write(theNitfResExtSegInfoRecords[idx].theResExtSegLength, 7);
+      }
+   }
+   out.write(theUserDefinedHeaderDataLength, 5);
+   if(ossimString(theUserDefinedHeaderDataLength).toInt32() > 0)
+   {
+      out.write(theUserDefinedHeaderOverflow, 3);
+   }
+   ossim_uint32 totalLength = getTotalTagLength();
+   if(totalLength <= 99999)
+   {
+      std::ostringstream tempOut;
+      
+      tempOut << std::setw(5)
+      << std::setfill('0')
+      << std::setiosflags(ios::right)
+      << totalLength;
+      
+      memcpy(theExtendedHeaderDataLength, tempOut.str().c_str(), 5);
+      
+      out.write(theExtendedHeaderDataLength, 5);
+      
+      // for now we hard code te 000 for we do not currently support writing to the DES if the total tag length is
+      // larger than supported
+      //
+      memset(theExtendedHeaderOverflow, '0', 3);
+      if(totalLength > 0)
+      {
+         ossim_uint32 i = 0;
+         out.write(theExtendedHeaderOverflow, 3);
+         
+         for(i = 0; i < theTagList.size(); ++i)
+         {
+            theTagList[i].writeStream(out);
+         }
+      }
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimNitfFileHeaderV2_0::writeStream: Only support writing of total tag length < 99999" << std::endl;
+   }
+}
+
+std::ostream& ossimNitfFileHeaderV2_0::print(std::ostream& out,
+                                             const std::string& prefix) const
+{
+   out << setiosflags(std::ios::left)
+       << prefix << std::setw(24) << "FHDR:"
+       << theFileTypeVersion << "\n"
+       << prefix << std::setw(24) << "CLEVEL:"
+       << theComplexityLevel << "\n"
+       << prefix << std::setw(24) << "STYPE:"
+       << theSystemType  << "\n"    
+       << prefix << std::setw(24) << "OSTAID:"
+       << theOriginatingStationId << "\n"
+       << prefix << std::setw(24) << "FDT:"
+       << theDateTime  << "\n"      
+       << prefix << std::setw(24) << "FTITLE:"
+       << theFileTitle  << "\n"     
+       << prefix << std::setw(24) << "FSCLAS:"
+       << theSecurityClassification << "\n"
+       << prefix << std::setw(24) << "FSCODE:"
+       << theCodewords << "\n"
+       << prefix << std::setw(24) << "FSCTLH:"
+       << theControlAndHandling << "\n"
+       << prefix << std::setw(24) << "FSREL:"
+       << theReleasingInstructions << "\n"
+       << prefix << std::setw(24) << "FSCAUT:"
+       << theClassificationAuthority << "\n"
+       << prefix << std::setw(24) << "FSCTLN:"
+       << theSecurityControlNumber << "\n"
+       << prefix << std::setw(24) << "FSDWNG:"
+       << theSecurityDowngrade << "\n"
+       << prefix << std::setw(24) << "FSDEVT:"
+       << theDowngradingEvent << "\n"
+       << prefix << std::setw(24) << "FSCOP:"
+       << theCopyNumber << "\n"
+       << prefix << std::setw(24) << "FSCPYS:"
+       << theNumberOfCopies << "\n"
+       << prefix << std::setw(24) << "ENCRYP:"
+       << theEncryption << "\n"
+       << prefix << std::setw(24) << "ONAME:"
+       << theOriginatorsName << "\n"
+       << prefix << std::setw(24) << "OPHONE:"
+       << theOriginatorsPhone << "\n"
+       << prefix << std::setw(24) << "FL:"
+       << theFileLength << "\n"
+       << prefix << std::setw(24) << "HL:"
+       << theHeaderLength << "\n"
+       << prefix << std::setw(24) << "NUMI:"
+       << theNumberOfImageInfoRecords << "\n";
+
+   ossim_uint32 index;
+   
+   for (index = 0; index < theNitfImageInfoRecords.size(); ++index)
+   {
+      std::ostringstream os;
+      os << std::setw(3) << std::setfill('0') << (index+1) << ":";
+      
+      ossimString tmpStr = "LISH";
+      tmpStr += os.str();
+      
+      out << prefix << std::setw(24) << tmpStr
+          << theNitfImageInfoRecords[index].theImageSubheaderLength << "\n";
+      tmpStr = "LI";
+      tmpStr += os.str();
+      
+      out << prefix << std::setw(24) << tmpStr
+          << theNitfImageInfoRecords[index].theImageLength << "\n";
+   }
+
+   out << prefix << std::setw(24) << "NUMS:" << theNumberOfSymbolInfoRecords
+       << "\n";
+
+   for (index = 0; index < theNitfSymbolInfoRecords.size(); ++index)
+   {
+      std::ostringstream os;
+      os << std::setw(3) << std::setfill('0') << (index+1) << ":";
+
+      ossimString tmpStr = "LSSH";
+      tmpStr += os.str();
+
+      out << tmpStr
+          << theNitfSymbolInfoRecords[index].theSymbolSubheaderLength << "\n";
+
+      tmpStr = "LS";
+      tmpStr += os.str();
+
+      out << tmpStr 
+          << theNitfSymbolInfoRecords[index].theSymbolLength << "\n";
+   }
+
+   
+   out << prefix << std::setw(24) << "NUML:" << theNumberOfLabelInfoRecords
+       << "\n";
+
+   for (index = 0; index < theNitfLabelInfoRecords.size(); ++index)
+   {
+      std::ostringstream os;
+      os << std::setw(3) << std::setfill('0') << (index+1) << ":";
+
+      ossimString tmpStr = "LLSH";
+      tmpStr += os.str();
+
+      out << tmpStr
+          << theNitfLabelInfoRecords[index].theLabelSubheaderLength  << "\n";
+
+      tmpStr = "LL";
+      tmpStr += os.str();
+
+      out << tmpStr 
+          << theNitfLabelInfoRecords[index].theLabelLength << "\n";
+   }
+
+   out << prefix << std::setw(24) << "NUMT:" << theNumberOfTextFileInfoRecords
+       << "\n";
+
+   for (index = 0; index < theNitfTextInfoRecords.size(); ++index)
+   {
+      std::ostringstream os;
+      os << std::setw(3) << std::setfill('0') << (index+1) << ":";
+
+      ossimString tmpStr = "LTSH";
+      tmpStr += os.str();
+
+      out << prefix << std::setw(24) << tmpStr
+          << theNitfTextInfoRecords[index].theTextSubheaderLength << "\n";
+
+      tmpStr = "LT";
+      tmpStr += os.str();
+
+      out << prefix << std::setw(24) << tmpStr 
+          << theNitfTextInfoRecords[index].theTextLength<< "\n";
+   }
+
+   out << prefix << std::setw(24) << "NUMDES:"
+       << theNumberOfDataExtSegInfoRecords << "\n";
+
+   for (index = 0; index < theNitfDataExtSegInfoRecords.size(); ++index)
+   {
+      std::ostringstream os;
+      os << std::setw(3) << std::setfill('0') << (index+1) << ":";
+
+      ossimString tmpStr = "LDSH";
+      tmpStr += os.str();
+
+      out << prefix << std::setw(24) << tmpStr
+          << theNitfDataExtSegInfoRecords[index].theDataExtSegSubheaderLength
+          << "\n";
+
+      tmpStr = "LD";
+      tmpStr += os.str();
+
+      out << prefix << std::setw(24) << tmpStr 
+          << theNitfDataExtSegInfoRecords[index].theDataExtSegLength << "\n";
+   }
+
+   out << prefix << std::setw(24) << "NUMRES:"
+       << theNumberOfResExtSegInfoRecords << "\n";
+
+   for (index = 0; index < theNitfResExtSegInfoRecords.size(); ++index)
+   {
+      std::ostringstream os;
+      os << std::setw(3) << std::setfill('0') << (index+1) << ":";
+
+      ossimString tmpStr = "LRSH";
+      tmpStr += os.str();
+
+      out << tmpStr
+          << theNitfResExtSegInfoRecords[index].theResExtSegSubheaderLength
+          << "\n";
+
+      tmpStr = "LR";
+      tmpStr += os.str();
+
+      out << tmpStr 
+          << theNitfResExtSegInfoRecords[index].theResExtSegLength
+          << "\n";
+   }
+
+   out << prefix << std::setw(24) << "UDHDL:"
+       << theUserDefinedHeaderDataLength << "\n"
+       << prefix << std::setw(24) << "UDHOFL:"
+       << theUserDefinedHeaderOverflow << "\n"
+       << prefix << std::setw(24) << "XHDL:"
+       << theExtendedHeaderDataLength << "\n";
+   
+   return ossimNitfFileHeader::print(out, prefix);
+}
+
+
+bool ossimNitfFileHeaderV2_0::saveState(ossimKeywordlist& kwl, const ossimString& prefix)const
+{
+   bool result = ossimNitfFileHeaderV2_X::saveState(kwl, prefix);
+   
+   if(result)
+   {
+      kwl.add(prefix, "FSCODE",theCodewords);
+      kwl.add(prefix, "FSCTLH",theControlAndHandling);
+      kwl.add(prefix, "FSREL",theReleasingInstructions);
+      kwl.add(prefix, "FSCAUT",theClassificationAuthority);
+      kwl.add(prefix, "FSCTLN",theSecurityControlNumber);
+      kwl.add(prefix, "FSDWNG",theSecurityDowngrade);
+      kwl.add(prefix, "FSDEVT",theDowngradingEvent);
+      kwl.add(prefix, "ONAME",theOriginatorsName);
+      kwl.add(prefix, "OPHONE",theOriginatorsPhone);
+      kwl.add(prefix, "FL",theFileLength);
+      kwl.add(prefix, "HL",theHeaderLength);
+      kwl.add(prefix, "NUMI",theNumberOfImageInfoRecords);
+      kwl.add(prefix, "UDHDL",theUserDefinedHeaderDataLength);
+      kwl.add(prefix, "UDHOFL",theUserDefinedHeaderDataLength);
+      kwl.add(prefix, "XHDL",theExtendedHeaderDataLength);
+
+      std::ostringstream out;
+      ossim_uint32 index;
+      for (index = 0; index < theNitfImageInfoRecords.size(); ++index)
+      {
+         std::ostringstream os;
+         os << std::setw(3) << std::setfill('0') << (index+1) << ":";
+         
+         ossimString tmpStr = "LISH";
+         tmpStr += os.str();
+         
+         out << tmpStr
+         << theNitfImageInfoRecords[index].theImageSubheaderLength << "\n";
+         tmpStr = "LI";
+         tmpStr += os.str();
+         
+         out << tmpStr
+         << theNitfImageInfoRecords[index].theImageLength << "\n";
+      }
+      
+      out <<"NUMS:" << theNumberOfSymbolInfoRecords
+      << "\n";
+      
+      for (index = 0; index < theNitfSymbolInfoRecords.size(); ++index)
+      {
+         std::ostringstream os;
+         os << std::setw(3) << std::setfill('0') << (index+1) << ":";
+         
+         ossimString tmpStr = "LSSH";
+         tmpStr += os.str();
+         
+         out << tmpStr
+         << theNitfSymbolInfoRecords[index].theSymbolSubheaderLength << "\n";
+         
+         tmpStr = "LS";
+         tmpStr += os.str();
+         
+         out << tmpStr 
+         << theNitfSymbolInfoRecords[index].theSymbolLength << "\n";
+      }
+      
+      
+      out << "NUML:" << theNumberOfLabelInfoRecords
+      << "\n";
+      
+      for (index = 0; index < theNitfLabelInfoRecords.size(); ++index)
+      {
+         std::ostringstream os;
+         os << std::setw(3) << std::setfill('0') << (index+1) << ":";
+         
+         ossimString tmpStr = "LLSH";
+         tmpStr += os.str();
+         
+         out << tmpStr
+         << theNitfLabelInfoRecords[index].theLabelSubheaderLength  << "\n";
+         
+         tmpStr = "LL";
+         tmpStr += os.str();
+         
+         out << tmpStr 
+         << theNitfLabelInfoRecords[index].theLabelLength << "\n";
+      }
+      
+      out << "NUMT:" << theNumberOfTextFileInfoRecords
+      << "\n";
+      
+      for (index = 0; index < theNitfTextInfoRecords.size(); ++index)
+      {
+         std::ostringstream os;
+         os << std::setw(3) << std::setfill('0') << (index+1) << ":";
+         
+         ossimString tmpStr = "LTSH";
+         tmpStr += os.str();
+         
+         out << tmpStr
+         << theNitfTextInfoRecords[index].theTextSubheaderLength << "\n";
+         
+         tmpStr = "LT";
+         tmpStr += os.str();
+         
+         out << tmpStr 
+         << theNitfTextInfoRecords[index].theTextLength<< "\n";
+      }
+      
+      out << "NUMDES:"
+      << theNumberOfDataExtSegInfoRecords << "\n";
+      
+      for (index = 0; index < theNitfDataExtSegInfoRecords.size(); ++index)
+      {
+         std::ostringstream os;
+         os << std::setw(3) << std::setfill('0') << (index+1) << ":";
+         
+         ossimString tmpStr = "LDSH";
+         tmpStr += os.str();
+         
+         out << tmpStr
+         << theNitfDataExtSegInfoRecords[index].theDataExtSegSubheaderLength
+         << "\n";
+         
+         tmpStr = "LD";
+         tmpStr += os.str();
+         
+         out << tmpStr 
+         << theNitfDataExtSegInfoRecords[index].theDataExtSegLength << "\n";
+      }
+      
+      out << "NUMRES:"
+      << theNumberOfResExtSegInfoRecords << "\n";
+      
+      for (index = 0; index < theNitfResExtSegInfoRecords.size(); ++index)
+      {
+         std::ostringstream os;
+         os << std::setw(3) << std::setfill('0') << (index+1) << ":";
+         
+         ossimString tmpStr = "LRSH";
+         tmpStr += os.str();
+         
+         out << tmpStr
+         << theNitfResExtSegInfoRecords[index].theResExtSegSubheaderLength
+         << "\n";
+         
+         tmpStr = "LR";
+         tmpStr += os.str();
+         
+         out << tmpStr 
+         << theNitfResExtSegInfoRecords[index].theResExtSegLength
+         << "\n";
+      }
+      
+      {
+         std::istringstream in(out.str());
+         ossimKeywordlist tempKwl;
+         if(tempKwl.parseStream(in))
+         {
+            result = true;
+            kwl.add(prefix, tempKwl);
+         }
+      }
+   }
+   
+   return result;
+}
+
+ossimDrect ossimNitfFileHeaderV2_0::getImageRect()const
+{
+   return theImageRect;
+}
+
+void ossimNitfFileHeaderV2_0::addImageInfoRecord(const ossimNitfImageInfoRecordV2_0& recordInfo)
+{
+   theNitfImageInfoRecords.push_back(recordInfo);
+   
+   setNumberOfImageInfoRecords(theNitfImageInfoRecords.size());
+}
+
+void ossimNitfFileHeaderV2_0::replaceImageInfoRecord(ossim_uint32 i, const ossimNitfImageInfoRecordV2_0& recordInfo)
+{
+   theNitfImageInfoRecords[i]=recordInfo;
+}
+
+ossimNitfImageHeader*
+ossimNitfFileHeaderV2_0::getNewImageHeader(ossim_uint32 imageNumber,
+                                           std::istream& in)const
+{
+   ossimNitfImageHeader *result = 0;
+   
+   if( (getNumberOfImages() > 0) && (imageNumber < theImageOffsetList.size()) )
+   {
+      result = allocateImageHeader();
+      in.seekg(theImageOffsetList[imageNumber].theImageHeaderOffset, std::ios::beg);
+      result->parseStream(in);
+   }
+   else
+   {
+#if 0
+      ossimNotify(ossimNotifyLevel_FATAL) << "ossimNitfFileHeaderV2_0::getNewImageHeader ERROR:"
+                                          << "\nNo images in file or image number (" << imageNumber
+                                          << ") is out of range!\n";
+#endif
+   }
+   
+   return result;
+}
+
+ossimNitfSymbolHeader *ossimNitfFileHeaderV2_0::getNewSymbolHeader(
+   ossim_uint32 symbolNumber, std::istream& in)const
+{
+   ossimNitfSymbolHeader *result = 0;
+
+   if( (getNumberOfSymbols() > 0) &&
+       (symbolNumber < theSymbolOffsetList.size()) )
+   {
+      result = allocateSymbolHeader();
+      in.seekg(theSymbolOffsetList[symbolNumber].theSymbolHeaderOffset, std::ios::beg);
+      result->parseStream(in);
+   }
+   
+   return result;
+}
+
+ossimNitfLabelHeader *ossimNitfFileHeaderV2_0::getNewLabelHeader(
+   ossim_uint32 labelNumber, std::istream& in)const
+{
+   ossimNitfLabelHeader *result = 0;
+
+   if( (getNumberOfLabels() > 0) &&
+       (labelNumber < theLabelOffsetList.size()) )
+   {
+      result = allocateLabelHeader();
+      in.seekg(theLabelOffsetList[labelNumber].theLabelHeaderOffset, std::ios::beg);
+      result->parseStream(in);
+   }
+   
+   return result;
+}
+
+ossimNitfTextHeader *ossimNitfFileHeaderV2_0::getNewTextHeader(
+   ossim_uint32 textNumber, std::istream& in)const
+{
+   ossimNitfTextHeader *result = 0;
+
+   if( (getNumberOfTextSegments() > 0) &&
+       (textNumber < theTextOffsetList.size()) )
+   {
+      result = allocateTextHeader();
+      in.seekg(theTextOffsetList[textNumber].theTextHeaderOffset, std::ios::beg);
+      result->parseStream(in);
+   }
+   
+   return result;
+}
+
+ossimNitfDataExtensionSegment* ossimNitfFileHeaderV2_0::getNewDataExtensionSegment(ossim_int32 dataExtNumber,
+                                                                                   std::istream& in)const
+{
+   ossimNitfDataExtensionSegment *result = 0;
+
+   if((getNumberOfDataExtSegments() > 0) &&
+      (dataExtNumber < (ossim_int32)theNitfDataExtSegInfoRecords.size()) &&
+      (dataExtNumber >= 0))
+   {
+      result = allocateDataExtSegment();
+      in.seekg(theDataExtSegOffsetList[dataExtNumber].theDataExtSegHeaderOffset, std::ios::beg);
+      result->parseStream(in, theNitfDataExtSegInfoRecords[dataExtNumber].getImageLength());
+   }
+   
+   return result;
+}
+
+void ossimNitfFileHeaderV2_0::initializeDisplayLevels(std::istream& in)
+{
+   // we will need to temporarily save the get pointer since
+   // initializeDisplayLevels changes it.
+   std::streampos saveTheGetPointer = in.tellg();
+   
+   std::vector<ossimNitfImageOffsetInformation>::iterator imageOffsetList = theImageOffsetList.begin();
+
+   // allocate temporary space to store image headers
+   ossimNitfImageHeader* imageHeader = allocateImageHeader();
+
+   // clear the list
+   theDisplayInformationList.clear();
+   
+   theImageRect = ossimDrect(0,0,0,0);
+   if(!imageHeader)
+   {
+      return;
+   }
+   
+   ossim_uint32 idx = 0;
+   while(imageOffsetList != theImageOffsetList.end())
+   {
+      // position the get pointer in the input
+      // stream to the start of the image header
+      in.seekg((*imageOffsetList).theImageHeaderOffset, std::ios::beg);
+      // get the data
+      imageHeader->parseStream(in);
+      // create a union of rects.  The result should be the image rect.
+      ossimDrect tempRect = imageHeader->getImageRect();
+      if((tempRect.width() > 1) &&
+         (tempRect.height() > 1))
+      {
+         theImageRect = theImageRect.combine(tempRect);
+      }
+      
+      insertIntoDisplayInfoList(ossimNitfDisplayInfo(ossimString("IM"),
+                                                     imageHeader->getDisplayLevel(),
+                                                     idx));
+      
+      ++imageOffsetList;
+      ++idx;                                       
+   }
+   delete imageHeader;
+   imageHeader = 0;
+
+
+   
+   // finally we reset the saved get state back
+   // to its original position
+   in.seekg(saveTheGetPointer, std::ios::beg);
+}
+
+void ossimNitfFileHeaderV2_0::insertIntoDisplayInfoList(const ossimNitfDisplayInfo &displayInformation)
+{
+   std::vector<ossimNitfDisplayInfo>::iterator displayList = theDisplayInformationList.begin();
+
+   while(displayList != theDisplayInformationList.end())
+   {
+      if(displayInformation.theDisplayLevel < (*displayList).theDisplayLevel)
+      {
+         theDisplayInformationList.insert(displayList, displayInformation);
+         return;
+      }
+      ++displayList;
+   }
+
+   // If we get here it means it's larger than all others
+   // and we push onto the end
+   theDisplayInformationList.push_back(displayInformation);
+}
+
+void ossimNitfFileHeaderV2_0::initializeAllOffsets()
+{
+   // this will be a running tally 
+   ossim_uint64 tally = theHeaderSize;
+   ossim_uint32 idx = 0;
+
+   // clear out all offset inforamtion and begin populating them
+   theImageOffsetList.clear();
+   theSymbolOffsetList.clear();
+   theLabelOffsetList.clear();
+   theLabelOffsetList.clear();
+   
+
+   for(idx = 0; idx < theNitfImageInfoRecords.size(); ++idx)
+   {
+      theImageOffsetList.push_back(ossimNitfImageOffsetInformation(tally,
+                                                                   tally + theNitfImageInfoRecords[idx].getHeaderLength()));
+      tally += theNitfImageInfoRecords[idx].getTotalLength();
+   }
+   for(idx = 0; idx < theNitfSymbolInfoRecords.size(); ++idx)
+   {
+      theSymbolOffsetList.push_back(ossimNitfSymbolOffsetInformation(tally,
+                                                                     tally + theNitfSymbolInfoRecords[idx].getHeaderLength()));
+      tally += theNitfSymbolInfoRecords[idx].getTotalLength();
+   }
+
+   for(idx = 0; idx < theNitfLabelInfoRecords.size(); ++idx)
+   {
+      theLabelOffsetList.push_back(ossimNitfLabelOffsetInformation(tally,
+                                                                   tally + theNitfLabelInfoRecords[idx].getHeaderLength()));
+      tally += theNitfLabelInfoRecords[idx].getTotalLength();
+   }
+
+   for(idx = 0; idx < theNitfTextInfoRecords.size(); ++idx)
+   {
+      theTextOffsetList.push_back(ossimNitfTextOffsetInformation(tally,
+                                                                 tally + theNitfTextInfoRecords[idx].getHeaderLength()));
+      tally += theNitfTextInfoRecords[idx].getTotalLength();
+   }
+
+   for(idx = 0; idx < theNitfDataExtSegInfoRecords.size(); ++idx)
+   {
+      theDataExtSegOffsetList.push_back(ossimNitfDataExtSegOffsetInformation(tally,
+                                                                             tally + theNitfDataExtSegInfoRecords[idx].getHeaderLength()));
+      tally += theNitfDataExtSegInfoRecords[idx].getTotalLength();
+   }
+}
+
+ossimNitfImageHeader *ossimNitfFileHeaderV2_0::allocateImageHeader()const
+{
+   return new ossimNitfImageHeaderV2_0;
+}
+
+ossimNitfSymbolHeader *ossimNitfFileHeaderV2_0::allocateSymbolHeader()const
+{
+   return new ossimNitfSymbolHeaderV2_0;
+}
+
+ossimNitfLabelHeader *ossimNitfFileHeaderV2_0::allocateLabelHeader()const
+{
+   return new ossimNitfLabelHeaderV2_0;
+}
+
+ossimNitfTextHeader *ossimNitfFileHeaderV2_0::allocateTextHeader()const
+{
+   return new ossimNitfTextHeaderV2_0;
+}
+
+ossimNitfDataExtensionSegment* ossimNitfFileHeaderV2_0::allocateDataExtSegment()const
+{
+   return new ossimNitfDataExtensionSegmentV2_0();
+}
+
+bool ossimNitfFileHeaderV2_0::isEncrypted()const
+{
+   return (theEncryption[0] == '1');
+}
+
+ossim_int32 ossimNitfFileHeaderV2_0::getNumberOfImages()const
+{
+   return (ossim_int32)theNitfImageInfoRecords.size();
+}
+
+ossim_int32 ossimNitfFileHeaderV2_0::getNumberOfLabels()const
+{
+   return ((ossim_int32)theNitfLabelInfoRecords.size());
+}
+
+ossim_int32 ossimNitfFileHeaderV2_0::getNumberOfSymbols()const
+{
+   return ((ossim_int32)theNitfSymbolInfoRecords.size());
+}
+
+ossim_int32 ossimNitfFileHeaderV2_0::getNumberOfGraphics()const
+{
+   return 0;
+}
+
+ossim_int32 ossimNitfFileHeaderV2_0::getNumberOfTextSegments()const
+{
+   return (ossim_int32)theNitfTextInfoRecords.size();
+}
+
+ossim_int32 ossimNitfFileHeaderV2_0::getNumberOfDataExtSegments()const
+{
+   return (ossim_int32)theNitfDataExtSegInfoRecords.size();
+}
+
+ossim_int32 ossimNitfFileHeaderV2_0::getHeaderSize()const
+{
+   return theHeaderSize;
+}
+
+ossim_int32 ossimNitfFileHeaderV2_0::getNumberOfReservedExtSegments()const
+{
+   return theNitfResExtSegInfoRecords.size();
+}
+
+ossim_int64 ossimNitfFileHeaderV2_0::getFileSize()const
+{
+   ossimString temp = theFileLength;
+   if(temp == "999999999999")
+   {
+      return -1;
+   }
+   else
+   {
+      return temp.toInt64();
+   }
+}
+
+const char* ossimNitfFileHeaderV2_0::getVersion()const
+{
+   return &theFileTypeVersion[4];
+}
+
+const char* ossimNitfFileHeaderV2_0::getDateTime()const
+{
+   return theDateTime;
+}
+
+ossimString ossimNitfFileHeaderV2_0::getSecurityClassification()const
+{
+   return theSecurityClassification;
+}
+
+void ossimNitfFileHeaderV2_0::clearFields()
+{
+   theDisplayInformationList.clear();
+   theImageOffsetList.clear();
+   theSymbolOffsetList.clear();
+   theLabelOffsetList.clear();
+   theTextOffsetList.clear();
+   theDataExtSegOffsetList.clear();
+   theNitfSymbolInfoRecords.clear();
+   theNitfLabelInfoRecords.clear();
+   theNitfTextInfoRecords.clear();
+   theNitfDataExtSegInfoRecords.clear();
+   theNitfResExtSegInfoRecords.clear();
+   
+   theFilename = "";
+   memcpy(theFileTypeVersion, "NITF02.00", 9);
+   memset(theComplexityLevel, ' ', 2);
+   memset(theSystemType, ' ', 4);
+   memset(theOriginatingStationId, ' ', 10);
+   memset(theDateTime, ' ', 14);
+   memset(theFileTitle, ' ', 80);
+   memset(theSecurityClassification, ' ', 1);
+   memset(theCodewords, ' ', 40);
+   memset(theControlAndHandling, ' ', 40);
+   memset(theReleasingInstructions, ' ', 40);
+   memset(theClassificationAuthority, ' ', 20);
+   memset(theSecurityControlNumber, ' ', 20);
+   memset(theSecurityDowngrade, ' ', 6);
+   memset(theDowngradingEvent, ' ', 40);
+   memset(theCopyNumber, ' ', 5);
+   memset(theNumberOfCopies, ' ', 5);
+   memset(theEncryption, ' ', 1);
+   memset(theOriginatorsName, ' ', 27);
+   memset(theOriginatorsPhone, ' ', 18);
+   memset(theFileLength, ' ', 12);
+   memset(theHeaderLength, ' ', 6);
+   memset(theNumberOfImageInfoRecords, ' ', 3);
+   memset(theNumberOfSymbolInfoRecords, ' ', 3);
+   memset(theNumberOfLabelInfoRecords, ' ', 3);
+   memset(theNumberOfTextFileInfoRecords, ' ', 3);
+   memset(theNumberOfDataExtSegInfoRecords, ' ', 3);
+   memset(theNumberOfResExtSegInfoRecords, ' ', 3);
+   memset(theUserDefinedHeaderDataLength, '0', 5);
+   memset(theUserDefinedHeaderOverflow, ' ', 3);
+   memset(theExtendedHeaderDataLength, '0', 5);
+   memset(theExtendedHeaderOverflow, ' ', 3);
+   
+   theFileTypeVersion[9] = '\0';
+   theComplexityLevel[2] = '\0';
+   theSystemType[4]      = '\0';
+   theOriginatingStationId[10] = '\0';
+   theDateTime[14]       = '\0';
+   theFileTitle[80]      = '\0';
+   theSecurityClassification[1] = '\0';
+   theCodewords[40] = '\0';
+   theControlAndHandling[40] = '\0';
+   theReleasingInstructions[40] = '\0';
+   theClassificationAuthority[20] = '\0';
+   theSecurityControlNumber[20] = '\0';
+   theSecurityDowngrade[6] = '\0';
+   theDowngradingEvent[40] = '\0';
+   theCopyNumber[5] = '\0';
+   theNumberOfCopies[5] = '\0';
+   theEncryption[1] = '\0';
+   theOriginatorsName[27] = '\0';
+   theOriginatorsPhone[18] = '\0';
+   theFileLength[12]  = '\0';
+   theHeaderLength[6] = '\0';
+   theNumberOfImageInfoRecords[3] = '\0';
+   theNumberOfSymbolInfoRecords[3] = '\0';
+   theNumberOfLabelInfoRecords[3] = '\0';
+   theNumberOfTextFileInfoRecords[3] = '\0';
+   theNumberOfDataExtSegInfoRecords[3] = '\0';
+   theNumberOfResExtSegInfoRecords[3] = '\0';
+   theUserDefinedHeaderDataLength[5] = '\0';
+   theUserDefinedHeaderOverflow[3] = '\0';
+   theExtendedHeaderDataLength[5] = '\0';
+   theExtendedHeaderOverflow[3] = '\0';
+   theHeaderSize = 0;
+}
+
+void ossimNitfFileHeaderV2_0::setNumberOfImageInfoRecords(ossim_uint64 num)
+{
+   if (num < 1000)
+   {
+      ostringstream out;
+      
+      out << std::setw(3)
+      << std::setfill('0')
+      << std::setiosflags(ios::right)
+      << num;
+      
+      memcpy(theNumberOfImageInfoRecords, out.str().c_str(), 3);
+   }
+   else
+   {
+      std::string s = "ossimNitfFileHeaderV2_0::setNumberOfImageInfoRecords:";
+      s += " ERROR\nExceeded max image info number of 999!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+}
+
+void ossimNitfFileHeaderV2_0::readImageInfoRecords(std::istream &in)
+{
+   ossim_int32 numberOfImages = ossimString(theNumberOfImageInfoRecords).toInt32();
+   ossim_int32 index;
+
+   theNitfImageInfoRecords.clear();
+   for(index=0; index < numberOfImages; index++)
+   {
+      ossimNitfImageInfoRecordV2_0 temp;
+      
+      in.read(temp.theImageSubheaderLength, 6);
+      in.read(temp.theImageLength, 10);
+      theHeaderSize+=16;
+      temp.theImageSubheaderLength[6] = '\0';
+      temp.theImageLength[10] = '\0';
+
+      theNitfImageInfoRecords.push_back(temp);
+   }
+}
+
+void ossimNitfFileHeaderV2_0::readSymbolInfoRecords(std::istream &in)
+{
+   ossim_int32 numberOfSymbols = ossimString(theNumberOfSymbolInfoRecords).toInt32();
+   ossim_int32 index;
+
+   theNitfSymbolInfoRecords.clear();
+   
+   for(index=0; index < numberOfSymbols; index++)
+   {
+      ossimNitfSymbolInfoRecordV2_0 temp;
+
+      
+      in.read(temp.theSymbolSubheaderLength, 4);
+      in.read(temp.theSymbolLength, 6);
+      theHeaderSize+=10;
+      
+      temp.theSymbolSubheaderLength[4] = '\0';
+      temp.theSymbolLength[6] = '\0';
+      
+      theNitfSymbolInfoRecords.push_back(temp);
+   }
+}
+
+void ossimNitfFileHeaderV2_0::readLabelInfoRecords(std::istream &in)
+{
+   ossim_int32 numberOfLabels = ossimString(theNumberOfLabelInfoRecords).toInt32();
+   ossim_int32 index;
+
+   theNitfLabelInfoRecords.clear();
+   
+   for(index=0; index < numberOfLabels; index++)
+   {
+      ossimNitfLabelInfoRecordV2_0 temp;
+      
+      in.read(temp.theLabelSubheaderLength, 4);
+      in.read(temp.theLabelLength, 3);
+      theHeaderSize+=7;
+      temp.theLabelSubheaderLength[4] = '\0';
+      temp.theLabelLength[3]          = '\0';
+
+      theNitfLabelInfoRecords.push_back(temp);
+   }
+}
+
+void ossimNitfFileHeaderV2_0::readTextFileInfoRecords(std::istream &in)
+{
+   ossim_int32 numberOfTextFiles = ossimString(theNumberOfTextFileInfoRecords).toInt32();
+   ossim_int32 index;
+
+   theNitfTextInfoRecords.clear();
+   for(index=0; index < numberOfTextFiles; index++)
+   {
+      ossimNitfTextInfoRecordV2_0 temp;
+      
+      in.read(temp.theTextSubheaderLength, 4);
+      in.read(temp.theTextLength, 5);
+      theHeaderSize+=9;
+      
+      temp.theTextSubheaderLength[4] = '\0';
+      temp.theTextLength[5] = '\0';
+      
+      theNitfTextInfoRecords.push_back(temp);
+   }
+}
+
+void ossimNitfFileHeaderV2_0::readDataExtSegInfoRecords(std::istream &in)
+{
+   ossim_int32 numberOfDataExtSegs = ossimString(theNumberOfDataExtSegInfoRecords).toInt32();
+   ossim_int32 index;
+
+   theNitfDataExtSegInfoRecords.clear();
+   for(index=0; index < numberOfDataExtSegs; index++)
+   {
+      ossimNitfDataExtSegInfoRecordV2_0 temp;
+      
+      in.read(temp.theDataExtSegSubheaderLength, 4);
+      in.read(temp.theDataExtSegLength, 9);
+      theHeaderSize+=13;
+      
+      temp.theDataExtSegSubheaderLength[4] = '\0';
+      temp.theDataExtSegLength[9]          = '\0';
+
+      theNitfDataExtSegInfoRecords.push_back(temp);
+   }
+}
+
+void ossimNitfFileHeaderV2_0::readResExtSegInfoRecords(std::istream &in)
+{
+   ossim_int32 numberOfResExtSegs = ossimString(theNumberOfResExtSegInfoRecords).toInt32();
+   ossim_int32 index;
+
+   theNitfResExtSegInfoRecords.clear();
+   for(index=0; index < numberOfResExtSegs; index++)
+   {
+      ossimNitfResExtSegInfoRecordV2_0 temp;
+
+      in.read(temp.theResExtSegSubheaderLength, 4);
+      in.read(temp.theResExtSegLength, 7);
+      theHeaderSize+=11;
+      
+      temp.theResExtSegSubheaderLength[4] = '\0';
+      temp.theResExtSegLength[7]          = '\0';
+      
+      theNitfResExtSegInfoRecords.push_back(temp);      
+   }
+}
+
+void ossimNitfFileHeaderV2_0::setComplianceLevel(const ossimString& complianceLevel)
+{
+   ossimNitfCommon::setField(theComplexityLevel, complianceLevel, 2);
+}
+
+void ossimNitfFileHeaderV2_0::setCodeWords(const ossimString& codeWords)
+{
+   ossimNitfCommon::setField(theCodewords, codeWords, 40);
+}
+
+void ossimNitfFileHeaderV2_0::setControlAndHandling(const ossimString& controlAndHandling)
+{
+   ossimNitfCommon::setField(theControlAndHandling, controlAndHandling, 40);
+}
+
+void ossimNitfFileHeaderV2_0::setReleasingInstructions(const ossimString& releasingInstructions)
+{
+   ossimNitfCommon::setField(theReleasingInstructions, releasingInstructions, 40);
+}
+
+void ossimNitfFileHeaderV2_0::setClassificationAuthority(const ossimString& classAuth)
+{
+   ossimNitfCommon::setField(theClassificationAuthority, classAuth, 20);
+}
+
+void ossimNitfFileHeaderV2_0::setSecurityControlNumber(const ossimString& controlNo)
+{
+   ossimNitfCommon::setField(theSecurityControlNumber, controlNo, 20);
+}
+
+void ossimNitfFileHeaderV2_0::setOriginatorsName(const ossimString& originatorName)
+{
+   ossimNitfCommon::setField(theOriginatorsName, originatorName, 27);
+}
+
+void ossimNitfFileHeaderV2_0::setOriginatorsPhone(const ossimString& originatorPhone)
+{
+   ossimNitfCommon::setField(theOriginatorsPhone, originatorPhone, 18);
+}
+
+void ossimNitfFileHeaderV2_0::setSecurityDowngrade(const ossimString& securityDowngrade)
+{
+   ossimNitfCommon::setField(theSecurityDowngrade, securityDowngrade, 6);
+}
+
+void ossimNitfFileHeaderV2_0::setDowngradingEvent(const ossimString& downgradeEvent)
+{
+   ossimNitfCommon::setField(theDowngradingEvent, downgradeEvent, 40);
+}
+
+void ossimNitfFileHeaderV2_0::setFileLength(ossim_uint64 fileLength)
+{
+   ostringstream out;
+   
+   out << std::setw(12)
+   << std::setfill('0')
+   << std::setiosflags(ios::right)
+   << fileLength;
+   
+   memcpy(theFileLength, out.str().c_str(), 12);
+}
+
+void ossimNitfFileHeaderV2_0::setHeaderLength(ossim_uint64 headerLength)
+{
+   ostringstream out;
+   
+   out << std::setw(6)
+   << std::setfill('0')
+   << std::setiosflags(ios::right)
+   << headerLength;
+   
+   memcpy(theHeaderLength, out.str().c_str(), 6);
+}
+
+ossimString ossimNitfFileHeaderV2_0::getComplianceLevel()const
+{
+   return theComplexityLevel;
+}
+
+ossimString ossimNitfFileHeaderV2_0::getSecurityDowngrade()const
+{
+   return theSecurityDowngrade;
+}
+
+ossimString ossimNitfFileHeaderV2_0::getDowngradingEvent()const
+{
+   return theDowngradingEvent;
+}
+
+ossimString ossimNitfFileHeaderV2_0::getCodeWords()const
+{
+   return theCodewords;
+}
+
+ossimString ossimNitfFileHeaderV2_0::getControlAndHandling()const
+{
+   return theControlAndHandling;
+}
+
+ossimString ossimNitfFileHeaderV2_0::getReleasingInstructions()const
+{
+   return theReleasingInstructions;
+}
+
+ossimString ossimNitfFileHeaderV2_0::getClassificationAuthority()const
+{
+   return theClassificationAuthority;
+}
+
+ossimString ossimNitfFileHeaderV2_0::getSecurityControlNumber()const
+{
+   return theSecurityControlNumber;
+}
+
+ossimString ossimNitfFileHeaderV2_0::getOriginatorsName()const
+{
+   return theOriginatorsName;
+}
+
+ossimString ossimNitfFileHeaderV2_0::getOriginatorsPhone()const
+{
+   return theOriginatorsPhone;
+}
+
+void ossimNitfFileHeaderV2_0::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   const ossimString& name = property->getName();
+   if(name == CLEVEL_KW)
+   {
+      setComplianceLevel(property->valueToString());
+   }
+   else if(name == FSDWNG_KW)
+   {
+      setSecurityDowngrade(property->valueToString());
+   }
+   else if(name == FSDEVT_KW)
+   {
+      setDowngradingEvent(property->valueToString());
+   }
+   else if(name == ONAME_KW)
+   {
+      setOriginatorsName(property->valueToString());
+   }
+   else if(name == OPHONE_KW)
+   {
+      setOriginatorsPhone(property->valueToString());
+   }
+   else
+   {
+      ossimNitfFileHeaderV2_X::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimNitfFileHeaderV2_0::getProperty(const ossimString& name)const
+{
+   ossimProperty* property = 0;
+
+	
+   if(name == CLEVEL_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theComplexityLevel).trim());
+   }
+   else if(name == FSDWNG_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theSecurityDowngrade).trim());
+   }
+   else if(name == FSDEVT_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theDowngradingEvent).trim());
+   }
+   else if(name == ONAME_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theOriginatorsName).trim());
+   }
+   else if(name == OPHONE_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theOriginatorsPhone).trim());
+   }
+   else
+   {
+      return ossimNitfFileHeaderV2_X::getProperty(name);
+   }
+   return property;
+}
+
+void ossimNitfFileHeaderV2_0::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimNitfFileHeaderV2_X::getPropertyNames(propertyNames);
+
+   propertyNames.push_back(CLEVEL_KW);
+   propertyNames.push_back(STYPE_KW);
+   propertyNames.push_back(OSTAID_KW);
+   propertyNames.push_back(FDT_KW);
+   propertyNames.push_back(FTITLE_KW);
+   propertyNames.push_back(FSCLAS_KW);
+   propertyNames.push_back(FSCODE_KW);
+   propertyNames.push_back(FSCTLH_KW);
+   propertyNames.push_back(FSREL_KW);
+   propertyNames.push_back(FSCAUT_KW);
+   propertyNames.push_back(FSCTLN_KW);
+   propertyNames.push_back(FSCOP_KW);
+   propertyNames.push_back(FSCPYS_KW);
+   propertyNames.push_back(ENCRYP_KW);
+   propertyNames.push_back(ONAME_KW);
+   propertyNames.push_back(OPHONE_KW);
+}
+
+
diff --git a/ossim/src/ossim/support_data/ossimNitfFileHeaderV2_1.cpp b/ossim/src/ossim/support_data/ossimNitfFileHeaderV2_1.cpp
new file mode 100644
index 0000000..5e4eaea
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfFileHeaderV2_1.cpp
@@ -0,0 +1,2115 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfFileHeaderV2_1.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <iostream>
+#include <iomanip>
+#include <sstream>
+#include <cstring> // for memset
+
+#include <ossim/support_data/ossimNitfFileHeaderV2_1.h>
+#include <ossim/support_data/ossimNitfTextHeaderV2_0.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimColorProperty.h>
+#include <ossim/base/ossimDateProperty.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimIoStream.h>
+#include <ossim/base/ossimNumericProperty.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/support_data/ossimNitfImageHeaderV2_1.h>
+#include <ossim/support_data/ossimNitfImageHeaderV2_X.h>
+#include <ossim/support_data/ossimNitfDataExtensionSegmentV2_1.h> // ??? drb
+
+
+RTTI_DEF1(ossimNitfFileHeaderV2_1,
+          "ossimNitfFileHeaderV2_1",
+          ossimNitfFileHeaderV2_X)
+
+const ossimString ossimNitfFileHeaderV2_1::FSCLSY_KW  = "FSCLSY";
+const ossimString ossimNitfFileHeaderV2_1::FSDCTP_KW  = "FSDCTP";
+const ossimString ossimNitfFileHeaderV2_1::FSDCDT_KW  = "FSDCDT";
+const ossimString ossimNitfFileHeaderV2_1::FSDCXM_KW  = "FSDCXM";
+const ossimString ossimNitfFileHeaderV2_1::FSDG_KW    = "FSDG";
+const ossimString ossimNitfFileHeaderV2_1::FSDGDT_KW  = "FSDGDT";
+const ossimString ossimNitfFileHeaderV2_1::FSCLTX_KW  = "FSCLTX";
+const ossimString ossimNitfFileHeaderV2_1::FSCATP_KW  = "FSCATP";
+const ossimString ossimNitfFileHeaderV2_1::FSCRSN_KW  = "FSCRSN";
+const ossimString ossimNitfFileHeaderV2_1::FSSRDT_KW  = "FSSRDT";
+const ossimString ossimNitfFileHeaderV2_1::FBKGC_KW   = "FBKGC";
+
+static const
+ossimTrace traceDebug(ossimString("ossimNitfFileHeaderV2_1:debug"));
+   
+std::ostream& operator <<(std::ostream& out,
+                     const ossimNitfImageInfoRecordV2_1 &data)
+{
+   return out << "theImageSubheaderLength:       "
+              << data.theImageSubheaderLength
+              << "\ntheImageLength:                "
+              << data.theImageLength
+              << std::endl;
+}
+
+ossim_uint64 ossimNitfImageInfoRecordV2_1::getHeaderLength()const
+{
+   return ossimString(theImageSubheaderLength).toUInt64();
+}
+
+ossim_uint64 ossimNitfImageInfoRecordV2_1::getImageLength()const
+{
+   return ossimString(theImageLength).toUInt64();
+}
+
+ossim_uint64 ossimNitfImageInfoRecordV2_1::getTotalLength()const
+{
+   return (getHeaderLength() + getImageLength());
+}
+
+std::ostream& operator <<(std::ostream& out,
+                     const ossimNitfGraphicInfoRecordV2_1 &data)
+{
+   return out << "theGraphicSubheaderLength:     "
+              << data.theGraphicSubheaderLength
+              << "\ntheGraphicLength:              "
+              << data.theGraphicLength
+              << std::endl;
+}
+
+std::ostream& operator <<(std::ostream& out,
+                     const ossimNitfTextFileInfoRecordV2_1 &data)
+{
+   return out << "theTextFileSubheaderLength:    "
+              << data.theTextFileSubheaderLength
+              << "\ntheTextFileLength:             "
+              << data.theTextFileLength
+              << std::endl;
+}
+ossim_uint64 ossimNitfGraphicInfoRecordV2_1::getHeaderLength()const
+{
+   return ossimString(theGraphicSubheaderLength).toUInt64();
+}
+
+ossim_uint64 ossimNitfGraphicInfoRecordV2_1::getGraphicLength()const
+{
+   return ossimString(theGraphicLength).toUInt64();
+}
+
+ossim_uint64 ossimNitfGraphicInfoRecordV2_1::getTotalLength()const
+{
+   return getGraphicLength() + getHeaderLength();
+}
+
+void ossimNitfTextFileInfoRecordV2_1::setSubheaderLength(ossim_uint64 length)
+{
+   ostringstream out;
+   
+   out << std::setw(4)
+   << std::setfill('0')
+   << std::setiosflags(ios::right)
+   << length;
+   
+   memcpy(theTextFileSubheaderLength, out.str().c_str(), 4);
+   theTextFileSubheaderLength[4] = '\0';
+}
+
+void ossimNitfTextFileInfoRecordV2_1::setTextLength(ossim_uint64 length)
+{
+   ostringstream out;
+   
+   out << std::setw(5)
+   << std::setfill('0')
+   << std::setiosflags(ios::right)
+   << length;
+   
+   memcpy(theTextFileLength, out.str().c_str(), 5);
+   theTextFileLength[5] = '\0';
+}
+
+ossim_uint64 ossimNitfTextFileInfoRecordV2_1::getHeaderLength()const
+{
+   return ossimString(theTextFileSubheaderLength).toUInt64();
+}
+
+ossim_uint64 ossimNitfTextFileInfoRecordV2_1::getTextLength()const
+{
+   return ossimString(theTextFileLength).toUInt64();
+}
+
+ossim_uint64 ossimNitfTextFileInfoRecordV2_1::getTotalLength()const
+{
+   return (getHeaderLength() + getTextLength());
+}
+
+
+std::ostream& operator <<(std::ostream& out,
+                     const ossimNitfDataExtSegInfoRecordV2_1 &data)
+{
+   return out << "theDataExtSegSubheaderLength:  "
+              << data.theDataExtSegSubheaderLength
+              << "\ntheDataExtSegLength:           "
+              << data.theDataExtSegLength
+              << std::endl;
+}
+
+ossim_uint64 ossimNitfDataExtSegInfoRecordV2_1::getHeaderLength()const
+{
+   return ossimString(theDataExtSegSubheaderLength).toUInt64();
+}
+
+ossim_uint64 ossimNitfDataExtSegInfoRecordV2_1::getDataExtSegLength()const
+{
+   return ossimString(theDataExtSegLength).toUInt64();
+}
+
+ossim_uint64 ossimNitfDataExtSegInfoRecordV2_1::getTotalLength()const
+{
+   return getDataExtSegLength() + getHeaderLength();
+}
+
+std::ostream& operator <<(std::ostream& out,
+                     const ossimNitfResExtSegInfoRecordV2_1 &data)
+{
+   return out << "theResExtSegSubheaderLength:   "
+              << data.theResExtSegSubheaderLength
+              << "\ntheResExtSegLength:            "
+              << data.theResExtSegLength
+              << std::endl;
+}
+
+ossim_uint64 ossimNitfResExtSegInfoRecordV2_1::getHeaderLength()const
+{
+   return ossimString(theResExtSegSubheaderLength).toUInt64();
+}
+
+ossim_uint64 ossimNitfResExtSegInfoRecordV2_1::getResExtSegLength()const
+{
+   return ossimString(theResExtSegLength).toUInt64();
+}
+
+ossim_uint64 ossimNitfResExtSegInfoRecordV2_1::getTotalLength()const
+{
+   return getResExtSegLength() + getHeaderLength();
+}
+
+void ossimNitfImageInfoRecordV2_1::setSubheaderLength(ossim_uint32 length)
+{
+   ostringstream out;
+
+   out << std::setw(6)
+       << std::setfill('0')
+       << std::setiosflags(ios::right)
+       << length;
+
+   memcpy(theImageSubheaderLength, out.str().c_str(), 6);
+   theImageSubheaderLength[6] = '\0';
+}
+
+void ossimNitfImageInfoRecordV2_1::setImageLength(ossim_uint64 length)
+{
+   ostringstream out;
+
+   out << std::setw(10)
+       << std::setfill('0')
+       << std::setiosflags(ios::right)
+       << length;
+   
+   memcpy(theImageLength, out.str().c_str(), 10);
+   theImageLength[10] = '\0';
+}
+
+// 
+
+ossimNitfFileHeaderV2_1::ossimNitfFileHeaderV2_1()
+   :ossimNitfFileHeaderV2_X()
+{
+   clearFields();
+}
+
+ossimNitfFileHeaderV2_1::~ossimNitfFileHeaderV2_1()
+{
+}
+
+void ossimNitfFileHeaderV2_1::parseStream(std::istream& in)
+{
+   clearFields();
+
+   // identification and origination group
+   in.read(theFileTypeVersion, 9);
+   theHeaderSize += 9;
+   in.read(theComplexityLevel, 2);
+   theHeaderSize += 2;
+   in.read(theSystemType, 4);
+   theHeaderSize += 4;
+   in.read(theOriginatingStationId, 10);
+   theHeaderSize += 10;
+   in.read(theDateTime, 14);
+   theHeaderSize += 14;
+   in.read(theFileTitle, 80);
+   theHeaderSize += 80;
+
+   // read security group
+   in.read(theSecurityClassification, 1);
+   theHeaderSize ++;
+   in.read(theSecurityClassificationSys, 2);
+   theHeaderSize += 2;
+   in.read(theCodewords, 11);
+   theHeaderSize += 11;
+   in.read(theControlAndHandling, 2);
+   theHeaderSize += 2;
+   in.read(theReleasingInstructions, 20);
+   theHeaderSize += 20;
+   in.read(theDeclassificationType, 2);
+   theHeaderSize += 2;
+   in.read(theDeclassificationDate, 8);
+   theHeaderSize += 8;
+   in.read(theDeclassificationExemption, 4);
+   theHeaderSize += 4;
+      
+   in.read(theDowngrade, 1);
+   theHeaderSize ++;
+   in.read(theDowngradingDate, 8);
+   theHeaderSize += 8;
+   in.read(theClassificationText, 43);
+   theHeaderSize += 43;
+   in.read(theClassificationAuthorityType, 1);
+   theHeaderSize ++;
+   in.read(theClassificationAuthority, 40);
+   theHeaderSize += 40;
+   in.read(theClassificationReason, 1);
+   theHeaderSize ++;
+   in.read(theSecuritySourceDate, 8);
+   theHeaderSize += 8;
+   in.read(theSecurityControlNumber, 15);
+   theHeaderSize += 15;
+   in.read(theCopyNumber, 5);
+   theHeaderSize += 5;
+   in.read(theNumberOfCopies, 5);
+   theHeaderSize += 5;
+   in.read(theEncryption, 1);
+   theHeaderSize ++;
+   in.read((char*)theFileBackgroundColor, 3);
+   theHeaderSize += 3;
+   in.read(theOriginatorsName, 24);
+   theHeaderSize += 24;
+   in.read(theOriginatorsPhone, 18);
+   theHeaderSize += 18;
+   in.read(theFileLength, 12);
+   theHeaderSize += 12;
+   in.read(theHeaderLength, 6);
+   theHeaderSize += 6;
+   
+   // image description group
+   in.read(theNumberOfImageInfoRecords, 3); 
+   theHeaderSize += 3;
+   readImageInfoRecords(in); 
+
+   // symbol description group
+   in.read(theNumberOfGraphicInfoRecords, 3); 
+   theHeaderSize += 3;
+   readGraphicInfoRecords(in);
+
+   in.read(theReservedForFutureUse1, 3);
+   theHeaderSize += 3;
+      
+   // text file information group
+   in.read(theNumberOfTextFileInfoRecords, 3); 
+   theHeaderSize += 3;
+   readTextFileInfoRecords(in);
+
+   // Data extension group
+   in.read(theNumberOfDataExtSegInfoRecords, 3); 
+   theHeaderSize += 3;
+   readDataExtSegInfoRecords(in);
+
+   // Reserve Extension Segment group
+   in.read(theNumberOfResExtSegInfoRecords, 3); 
+   theHeaderSize += 3;
+   readResExtSegInfoRecords(in);
+
+   in.read(theUserDefinedHeaderDataLength, 5);
+   theHeaderSize += 5;
+
+   // only get the header overflow if there even exists
+   // user defined data.
+   std::streampos userDefinedHeaderLength = ossimString(theUserDefinedHeaderDataLength).toInt32();
+   ossimNitfTagInformation         headerTag;
+   std::streampos start   = in.tellg();
+   std::streampos current = in.tellg();
+   if(userDefinedHeaderLength > 0)
+   {
+      in.read(theUserDefinedHeaderOverflow, 3);
+      current = in.tellg();
+         
+      while((current - start) < userDefinedHeaderLength)
+      {
+         headerTag.parseStream(in);
+         headerTag.setTagType("UDHD");
+         theTagList.push_back(headerTag);
+         // in.ignore(headerTag.getTagLength());
+         // headerTag.clearFields();
+         current = in.tellg();
+      }
+      //in.seekg(start + userDefinedHeaderLength);
+      theHeaderSize += (userDefinedHeaderLength);
+   }
+   in.read(theExtendedHeaderDataLength, 5);
+   theHeaderSize += 5;
+   std::streampos extendedHeaderDataLength = ossimString(theExtendedHeaderDataLength).toInt32();
+
+   start   = in.tellg();
+   current = in.tellg();
+   // for now let's just ignore it
+   if(extendedHeaderDataLength > 0)
+   {
+      in.read(theExtendedHeaderDataOverflow, 3);
+      current = in.tellg();
+      while((current - start) < extendedHeaderDataLength)
+      {
+         headerTag.parseStream(in);
+	 headerTag.setTagType("XHD");
+         theTagList.push_back(headerTag);
+         
+         // in.ignore(headerTag.getTagLength());
+         // headerTag.clearFields();
+         current = in.tellg();
+      }
+      theHeaderSize += extendedHeaderDataLength;
+      //in.seekg(start + extendedHeaderDataLength);
+   }
+
+   // this need to be re-thought
+   initializeAllOffsets();
+   readOverflowTags(in);
+}
+
+void ossimNitfFileHeaderV2_1::readOverflowTags(istream& in)
+{
+   ossim_int32 overflow = ossimString(theUserDefinedHeaderOverflow).toInt32();
+   if (overflow != 0)
+   {
+      ossimNitfDataExtensionSegment *des = getNewDataExtensionSegment(overflow-1, in);
+      if (des != NULL)
+      {
+         const vector<ossimNitfTagInformation> &desTags = des->getTagList();
+         for (vector<ossimNitfTagInformation>::const_iterator iter = desTags.begin(); iter != desTags.end(); ++iter)
+         {
+            iter->setTagType("UDHD");
+            theTagList.push_back(*iter);
+         }
+      }
+      delete des;
+   }
+
+   overflow = ossimString(theExtendedHeaderDataOverflow).toInt32();
+   if (overflow != 0)
+   {
+      ossimNitfDataExtensionSegment *des = getNewDataExtensionSegment(overflow-1, in);
+      if (des != NULL)
+      {
+         const vector<ossimNitfTagInformation> &desTags = des->getTagList();
+         for (vector<ossimNitfTagInformation>::const_iterator iter = desTags.begin(); iter != desTags.end(); ++iter)
+         {
+            iter->setTagType("XHD");
+            theTagList.push_back(*iter);
+         }
+      }
+      delete des;
+   }
+}
+
+void ossimNitfFileHeaderV2_1::writeStream(std::ostream &out)
+{
+   out.write(theFileTypeVersion, 9);
+   out.write(theComplexityLevel, 2);
+   out.write(theSystemType, 4);
+   out.write(theOriginatingStationId, 10);
+   out.write(theDateTime, 14);
+   out.write(theFileTitle, 80);
+   out.write(theSecurityClassification, 1);
+   out.write(theSecurityClassificationSys, 2);
+   out.write(theCodewords, 11);
+   out.write(theControlAndHandling, 2);
+   out.write(theReleasingInstructions, 20);
+   out.write(theDeclassificationType, 2);
+   out.write(theDeclassificationDate, 8);
+   out.write(theDeclassificationExemption, 4);
+   out.write(theDowngrade, 1);
+   out.write(theDowngradingDate, 8);
+   out.write(theClassificationText, 43);
+   out.write(theClassificationAuthorityType, 1);
+   out.write(theClassificationAuthority, 40);
+   out.write(theClassificationReason, 1);
+   out.write(theSecuritySourceDate, 8);
+   out.write(theSecurityControlNumber, 15);
+   out.write(theCopyNumber, 5);
+   out.write(theNumberOfCopies, 5);
+   out.write(theEncryption, 1);
+   out.write((char*)theFileBackgroundColor, 3);
+   out.write(theOriginatorsName, 24);
+   out.write(theOriginatorsPhone, 18);
+   out.write(theFileLength, 12);
+   out.write(theHeaderLength, 6);
+   ossim_uint32 idx = 0;
+   {
+      ostringstream outString;
+      
+      
+      outString << std::setw(3)
+                << std::setfill('0')
+                << std::setiosflags(ios::right)
+                << theNitfImageInfoRecords.size();
+      
+      out.write(outString.str().c_str(), 3);
+      
+      for(idx = 0; idx < theNitfImageInfoRecords.size(); ++idx)
+      {
+         out.write(theNitfImageInfoRecords[idx].theImageSubheaderLength, 6);
+         out.write(theNitfImageInfoRecords[idx].theImageLength, 10);
+      }
+   }
+   {
+      ostringstream outString;
+      
+      
+      outString << std::setw(3)
+                << std::setfill('0')
+                << std::setiosflags(ios::right)
+                << theNitfGraphicInfoRecords.size();
+      
+      out.write(outString.str().c_str(), 3);
+      for(idx = 0; idx < theNitfGraphicInfoRecords.size(); ++idx)
+      {
+         out.write(theNitfGraphicInfoRecords[idx].theGraphicSubheaderLength, 4);
+         out.write(theNitfGraphicInfoRecords[idx].theGraphicLength, 6);
+      }
+   }
+   out.write(theReservedForFutureUse1, 3);
+   {
+      ostringstream outString;
+      
+      
+      outString << std::setw(3)
+                << std::setfill('0')
+                << std::setiosflags(ios::right)
+                << theNitfTextFileInfoRecords.size();
+      
+      out.write(outString.str().c_str(), 3);
+      for(idx = 0; idx < theNitfTextFileInfoRecords.size(); ++idx)
+      {
+         out.write(theNitfTextFileInfoRecords[idx].theTextFileSubheaderLength, 4);
+         out.write(theNitfTextFileInfoRecords[idx].theTextFileLength, 5);
+      }
+   }
+   {
+      ostringstream outString;
+      
+      
+      outString << std::setw(3)
+                << std::setfill('0')
+                << std::setiosflags(ios::right)
+                << theNitfDataExtSegInfoRecords.size();
+      
+      out.write(outString.str().c_str(), 3);
+      for(idx = 0; idx < theNitfDataExtSegInfoRecords.size(); ++idx)
+      {
+         out.write(theNitfDataExtSegInfoRecords[idx].theDataExtSegSubheaderLength, 4);
+         out.write(theNitfDataExtSegInfoRecords[idx].theDataExtSegLength, 9);
+      }
+   }
+   {
+      ostringstream outString;
+      
+      
+      outString << std::setw(3)
+                << std::setfill('0')
+                << std::setiosflags(ios::right)
+                << theNitfResExtSegInfoRecords.size();
+
+      out.write(outString.str().c_str(), 3);
+      for(idx = 0; idx < theNitfResExtSegInfoRecords.size(); ++idx)
+      {
+         out.write(theNitfResExtSegInfoRecords[idx].theResExtSegSubheaderLength, 4);
+         out.write(theNitfResExtSegInfoRecords[idx].theResExtSegLength, 7);
+      }
+   }
+/*
+   out.write(theUserDefinedHeaderDataLength, 5);
+   if(ossimString(theUserDefinedHeaderDataLength).toInt32() > 0)
+   {
+      out.write(theUserDefinedHeaderOverflow, 3);
+   }
+   ossim_uint32 totalLength = getTotalTagLength();
+   if(totalLength <= 99999)
+   {
+      std::ostringstream tempOut;
+
+      tempOut << std::setw(5)
+              << std::setfill('0')
+	      << std::setiosflags(ios::right)
+              << totalLength;
+      
+      memcpy(theExtendedHeaderDataLength, tempOut.str().c_str(), 5);
+      
+      out.write(theExtendedHeaderDataLength, 5);
+
+      // for now we hard code the 000 for we do not currently support writing to the DES if the total tag length is
+      // larger than supported
+      //
+      memset(theExtendedHeaderDataOverflow, '0', 3);
+
+      if(totalLength > 0)
+      {
+         out.write(theExtendedHeaderDataOverflow, 3);
+         ossim_uint32 i = 0;
+         
+         for(i = 0; i < theTagList.size(); ++i)
+         {
+            theTagList[i].writeStream(out);
+         }
+      }
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimNitfFileHeaderV2_1::writeStream: Only support writing of total tag length < 99999" << std::endl;
+   }
+   */
+      ossim_uint32 totalLength = ossimString(theUserDefinedHeaderDataLength).toUInt32();
+   if (totalLength > 0)
+   {
+      totalLength += 3;
+   }
+
+   // Scope tempOut
+   {
+      std::ostringstream tempOut;
+      tempOut << std::setw(5)
+              << std::setfill('0')
+              << std::setiosflags(ios::right)
+              << totalLength;
+
+      out.write(tempOut.str().c_str(), 5);
+   }
+
+   if (totalLength > 0)
+   {
+      if(totalLength <= 99999)
+      {
+         out.write(theUserDefinedHeaderOverflow, 3);
+
+         for (unsigned int i = 0; i < theTagList.size(); ++i)
+         {
+            if (theTagList[i].getTagType() == "UDHD")
+            {
+               theTagList[i].writeStream(out);
+            }
+         }
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimNitfFileHeaderV2_1::writeStream: Only support writing of total tag length <= 99999" << std::endl;
+      }
+   }
+
+   totalLength = ossimString(theExtendedHeaderDataLength).toUInt32();
+   if (totalLength > 0)
+   {
+      totalLength += 3;
+   }
+
+   // Scope tempOut
+   {
+      std::ostringstream tempOut;
+      tempOut << std::setw(5)
+              << std::setfill('0')
+              << std::setiosflags(ios::right)
+              << totalLength;
+
+      out.write(tempOut.str().c_str(), 5);
+   }
+
+   if (totalLength > 0)
+   {
+      if(totalLength <= 99999)
+      {
+         out.write(theExtendedHeaderDataOverflow, 3);
+
+         for(unsigned int i = 0; i < theTagList.size(); ++i)
+         {
+            if (theTagList[i].getTagType() == "XHD")
+            {
+               theTagList[i].writeStream(out);
+            }
+         }
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimNitfFileHeaderV2_1::writeStream: Only support writing of total tag length <= 99999" << std::endl;
+      }
+   }
+
+}
+
+std::ostream& ossimNitfFileHeaderV2_1::print(std::ostream& out,
+                                             const std::string& prefix) const
+{
+   out << setiosflags(ios::left)
+       << prefix << std::setw(24) << "FHDR:"
+       << theFileTypeVersion << "\n"
+       << prefix << std::setw(24) << "CLEVEL:"
+       << theComplexityLevel << "\n"
+       << prefix << std::setw(24) << "STYPE:"
+       << theSystemType << "\n"
+       << prefix << std::setw(24) << "OSTAID:"
+       << theOriginatingStationId << "\n"
+       << prefix << std::setw(24) << "FDT:"
+       << theDateTime << "\n"      
+       << prefix << std::setw(24) << "FTITLE:"
+       << theFileTitle << "\n"    
+       << prefix << std::setw(24) << "FSCLAS:"
+       << theSecurityClassification<< "\n"
+       << prefix << std::setw(24) << "FSCLSY:"
+       << theSecurityClassificationSys<< "\n"
+       << prefix << std::setw(24) << "FSCODE:"
+       << theCodewords << "\n"
+       << prefix << std::setw(24) << "FSCTLH:"
+       << theControlAndHandling << "\n"
+       << prefix << std::setw(24) << "FSREL:"
+       << theReleasingInstructions << "\n"
+       << prefix << std::setw(24) << "FSDCTP:"
+       << theDeclassificationType << "\n"
+       << prefix << std::setw(24) << "FSDCDT:"
+       << theDeclassificationDate << "\n"
+       << prefix << std::setw(24) << "FSDCXM:"
+       << theDeclassificationExemption << "\n"
+       << prefix << std::setw(24) << "FSDG:"
+       << theDowngrade << "\n"
+       << prefix << std::setw(24) << "FSDGDT:"
+       << theDowngradingDate << "\n"
+       << prefix << std::setw(24) << "FSCLTX:"
+       << theClassificationText << "\n"
+       << prefix << std::setw(24) << "FSCATP:"
+       << theClassificationAuthorityType << "\n"
+       << prefix << std::setw(24) << "FSCAUT:"
+       << theClassificationAuthority << "\n"
+       << prefix << std::setw(24) << "FSCRSN:"
+       << theClassificationReason << "\n"
+       << prefix << std::setw(24) << "FSSRDT:"
+       << theSecuritySourceDate << "\n"
+       << prefix << std::setw(24) << "FSCTLN:"
+       << theSecurityControlNumber << "\n"
+       << prefix << std::setw(24) << "FSCOP:"
+       << theCopyNumber << "\n"
+       << prefix << std::setw(24) << "FSCOPYS:"
+       << theNumberOfCopies << "\n"
+       << prefix << std::setw(24) << "ENCRYP:"
+       << theEncryption << "\n"
+       << prefix << std::setw(24) << "FBKGC[0]:"
+       << (int)theFileBackgroundColor[0] << "\n"
+       << prefix << std::setw(24) << "FBKGC[1]:"
+       << (int)theFileBackgroundColor[1] << "\n"
+       << prefix << std::setw(24) << "FBKGC[2]:"
+       << (int)theFileBackgroundColor[2] << "\n"
+       << prefix << std::setw(24) << "ONAME:"
+       << theOriginatorsName<< "\n"
+       << prefix << std::setw(24) << "OPHONE:"
+       << theOriginatorsPhone << "\n"
+       << prefix << std::setw(24) << "FL:"
+       << theFileLength  << "\n"
+       << prefix << std::setw(24) << "HL:"
+       << theHeaderLength << "\n"
+       << prefix << std::setw(24) << "NUMI:"
+       << theNumberOfImageInfoRecords << "\n";
+
+   ossim_uint32 index;
+
+   for (index = 0; index < theNitfImageInfoRecords.size(); ++index)
+   {
+      ostringstream os;
+      os << setw(3) << setfill('0') << (index+1) << ":";
+
+      ossimString tmpStr = "LISH";
+      tmpStr += os.str();
+      
+      out << prefix << std::setw(24) << tmpStr
+          << theNitfImageInfoRecords[index].theImageSubheaderLength << "\n";
+      tmpStr = "LI";
+      tmpStr += os.str();
+
+      out << prefix << std::setw(24) << tmpStr
+          << theNitfImageInfoRecords[index].theImageLength << "\n";
+   }
+
+   out << prefix << std::setw(24) << "NUMS:" << theNumberOfGraphicInfoRecords
+       << "\n";
+ 
+   for (index = 0; index < theNitfGraphicInfoRecords.size(); ++index)
+   {
+      ostringstream os;
+      os << setw(3) << setfill('0') << (index+1) << ":";
+
+      ossimString tmpStr = "LSSH";
+      tmpStr += os.str();
+
+      out << prefix << std::setw(24) << tmpStr
+          << theNitfGraphicInfoRecords[index].theGraphicSubheaderLength
+          << "\n";
+
+      tmpStr = "LS";
+      tmpStr += os.str();
+
+      out << prefix << std::setw(24) << tmpStr 
+          << theNitfGraphicInfoRecords[index].theGraphicLength
+          << "\n";
+   }
+
+   out << prefix << std::setw(24) << "NUMX:" << theReservedForFutureUse1 << "\n"
+       << prefix << std::setw(24) << "NUMT:" 
+       << theNumberOfTextFileInfoRecords << "\n";
+   
+   for (index = 0; index < theNitfTextFileInfoRecords.size(); ++index)
+   {
+      ostringstream os;
+      os << setw(3) << setfill('0') << (index+1) << ":";
+
+      ossimString tmpStr = "LTSH";
+      tmpStr += os.str();
+      
+      out << prefix << std::setw(24) << tmpStr
+          << theNitfTextFileInfoRecords[index].theTextFileSubheaderLength
+          << "\n";
+
+      tmpStr = "LT";
+      tmpStr += os.str();
+
+      out << prefix << std::setw(24) << tmpStr
+          << theNitfTextFileInfoRecords[index].theTextFileLength << "\n";
+   }
+
+   out << prefix << std::setw(24) << "NUMDES:" << theNumberOfDataExtSegInfoRecords
+       << "\n";
+
+   for (index = 0; index < theNitfDataExtSegInfoRecords.size(); ++index)
+   {
+      ostringstream os;
+      os << setw(3) << setfill('0') << (index+1) << ":";
+
+      ossimString tmpStr = "LDSH";
+      tmpStr += os.str();
+      
+      out << prefix << std::setw(24) << tmpStr
+          << theNitfDataExtSegInfoRecords[index].theDataExtSegSubheaderLength
+          << "\n";
+
+      tmpStr = "LD";
+      tmpStr += os.str();
+
+      out << prefix << std::setw(24) << tmpStr
+          << theNitfDataExtSegInfoRecords[index].theDataExtSegLength
+          << "\n";
+   }
+
+   out << prefix << std::setw(24) << "NUMRES:"
+       << theNumberOfResExtSegInfoRecords << "\n";
+   
+   for (index = 0; index < theNitfResExtSegInfoRecords.size(); ++index)
+   {
+      ostringstream os;
+      os << setw(3) << setfill('0') << (index+1) << ":";
+
+      ossimString tmpStr = "LRESSH";
+      tmpStr += os.str();
+      
+      out << prefix << std::setw(24) << tmpStr
+          << theNitfResExtSegInfoRecords[index].theResExtSegSubheaderLength
+          << "\n";
+
+      tmpStr = "LRE";
+      tmpStr += os.str();
+
+      out << prefix << std::setw(24) << tmpStr
+          << theNitfResExtSegInfoRecords[index].theResExtSegLength
+          << "\n";
+   }
+   
+   out << prefix << std::setw(24) << "UDHDL:"
+       << theUserDefinedHeaderDataLength
+       << "\n"
+       << prefix << std::setw(24) << "UDHOFL:"
+       << theUserDefinedHeaderOverflow
+       << "\n"
+       << prefix << std::setw(24) << "XHDL:"
+       << theExtendedHeaderDataLength
+       << "\n"
+       << prefix << std::setw(24) << "XHDLOFL:"
+       << theExtendedHeaderDataOverflow
+       << "\n";
+
+   return ossimNitfFileHeader::print(out, prefix);
+}
+
+ossimNitfImageHeader* ossimNitfFileHeaderV2_1::allocateImageHeader()const
+{
+   return new ossimNitfImageHeaderV2_1;
+}
+
+ossimNitfTextHeader *ossimNitfFileHeaderV2_1::allocateTextHeader()const
+{
+   return new ossimNitfTextHeaderV2_0;
+}
+
+ossimNitfDataExtensionSegment* ossimNitfFileHeaderV2_1::allocateDataExtSegment()const
+{
+   return new ossimNitfDataExtensionSegmentV2_1;
+}
+
+bool ossimNitfFileHeaderV2_1::isEncrypted()const
+{
+   return (theEncryption[0]=='1');
+}
+
+ossim_int32 ossimNitfFileHeaderV2_1::getNumberOfImages()const
+{
+   return (ossim_int32)theNitfImageInfoRecords.size();
+}
+
+ossim_int32 ossimNitfFileHeaderV2_1::getNumberOfTextSegments()const
+{
+   return static_cast<ossim_int32>(theNitfTextFileInfoRecords.size());
+}
+
+ossim_int32 ossimNitfFileHeaderV2_1::getHeaderSize()const
+{
+   return theHeaderSize;
+}
+
+ossim_int64 ossimNitfFileHeaderV2_1::getFileSize()const
+{
+   ossimString temp = theFileLength;
+
+   if(temp == "999999999999")
+   {
+      return -1;
+   }
+   else
+   {
+      return temp.toInt64();
+   }
+}
+
+const char* ossimNitfFileHeaderV2_1::getVersion()const
+{
+   return &theFileTypeVersion[4];
+}
+
+
+void ossimNitfFileHeaderV2_1::clearFields()
+{
+   memcpy(theFileTypeVersion, "NITF02.10", 9);
+   memcpy(theComplexityLevel, "01", 2);
+   memcpy(theSystemType, "BF01", 4);
+   memset(theOriginatingStationId, ' ', 10);
+   memset(theDateTime, ' ', 14);
+   memset(theFileTitle, ' ', 80);
+   memset(theSecurityClassification, ' ', 1);
+   memset(theSecurityClassificationSys, ' ', 2);
+   memset(theCodewords, ' ', 11);
+   memset(theControlAndHandling, ' ', 2);
+   memset(theReleasingInstructions, ' ', 20);
+   memset(theDeclassificationType, ' ', 2);
+   memset(theDeclassificationDate, ' ', 8);
+   memset(theDeclassificationExemption, ' ', 4);
+   memset(theDowngrade, ' ', 1);
+   memset(theDowngradingDate, ' ', 8);
+   memset(theClassificationText, ' ', 43);
+   memset(theClassificationAuthorityType, ' ', 1);
+   memset(theClassificationAuthority, ' ', 40);
+   memset(theClassificationReason, ' ', 1);
+   memset(theSecuritySourceDate, ' ', 8);
+   memset(theSecurityControlNumber, ' ', 15);
+   memset(theCopyNumber, '0', 5);
+   memset(theNumberOfCopies, '0', 5);
+   memset(theEncryption, ' ', 1);
+   memset(theFileBackgroundColor, 0, 3);
+   memset(theOriginatorsName, ' ', 24);
+   memset(theOriginatorsPhone, ' ', 18);
+   memset(theFileLength, ' ', 12);
+   memset(theHeaderLength, ' ', 6);
+   memset(theNumberOfImageInfoRecords, '0', 3);
+   memset(theNumberOfGraphicInfoRecords, '0', 3);
+   memset(theReservedForFutureUse1, '0', 3);
+   memset(theNumberOfTextFileInfoRecords, '0', 3);
+   memset(theNumberOfDataExtSegInfoRecords, '0', 3);
+   memset(theNumberOfResExtSegInfoRecords, '0', 3);
+   memset(theUserDefinedHeaderDataLength, '0', 5);
+   memset(theUserDefinedHeaderOverflow, '0',3);
+   memset(theExtendedHeaderDataLength, '0',5);
+   memset(theExtendedHeaderDataOverflow, '0', 3);
+   theFileTypeVersion[9] = '\0';
+   theComplexityLevel[2] = '\0';
+   theSystemType[4] = '\0';
+   theOriginatingStationId[10] = '\0';
+   theDateTime[14] = '\0';
+   theFileTitle[80] = '\0';
+   theSecurityClassification[1] = '\0';
+   theSecurityClassificationSys[2] = '\0';
+   theCodewords[11] = '\0';
+   theControlAndHandling[2] = '\0';
+   theReleasingInstructions[20] = '\0';
+   theDeclassificationType[2] = '\0';
+   theDeclassificationDate[8] = '\0';
+   theDeclassificationExemption[4] = '\0';
+   theDowngrade[1] = '\0';
+   theDowngradingDate[8] = '\0';
+   theClassificationText[43] = '\0';
+   theClassificationAuthorityType[1] = '\0';
+   theClassificationAuthority[40] = '\0';
+   theClassificationReason[1] = '\0';
+   theSecuritySourceDate[8] = '\0';
+   theSecurityControlNumber[15] = '\0';
+   theCopyNumber[5] = '\0';
+   theNumberOfCopies[5] = '\0';
+   theEncryption[1] = '\0';
+   theOriginatorsName[24] = '\0';
+   theOriginatorsPhone[18] = '\0';
+   theFileLength[12] = '\0';
+   theHeaderLength[6] = '\0';
+   theNumberOfImageInfoRecords[3] = '\0';
+   theNumberOfGraphicInfoRecords[3] = '\0';
+   theReservedForFutureUse1[3] = '\0';
+   theNumberOfTextFileInfoRecords[3] = '\0';
+   theNumberOfDataExtSegInfoRecords[3] = '\0';
+   theNumberOfResExtSegInfoRecords[3] = '\0';
+   theUserDefinedHeaderDataLength[5] = '\0';
+   theUserDefinedHeaderOverflow[3] = '\0';
+   theExtendedHeaderDataLength[5] = '\0';
+   theExtendedHeaderDataOverflow[3] = '\0';
+
+   theHeaderSize = 0;
+}
+
+void ossimNitfFileHeaderV2_1::readImageInfoRecords(std::istream &in)
+{
+   ossim_int32 numberOfImages = ossimString(theNumberOfImageInfoRecords).toInt32();
+   ossim_int32 index;
+
+   theNitfImageInfoRecords.clear();
+   for(index=0; index < numberOfImages; index++)
+   {
+      ossimNitfImageInfoRecordV2_1 temp;
+
+      
+      in.read(temp.theImageSubheaderLength, 6);
+      in.read(temp.theImageLength, 10);
+      theHeaderSize += 16;
+
+      temp.theImageSubheaderLength[6] = '\0';
+      temp.theImageLength[10] = '\0';
+      
+      theNitfImageInfoRecords.push_back(temp);
+   }
+}
+
+void ossimNitfFileHeaderV2_1::readGraphicInfoRecords(std::istream &in)
+{
+   ossim_int32 numberOfGraphics = ossimString(theNumberOfGraphicInfoRecords).toInt32();
+   ossim_int32 index;
+
+   theNitfGraphicInfoRecords.clear();
+   
+   for(index=0; index < numberOfGraphics; index++)
+   {
+      ossimNitfGraphicInfoRecordV2_1 temp;
+
+      
+      in.read(temp.theGraphicSubheaderLength, 4);
+      in.read(temp.theGraphicLength, 6);
+      theHeaderSize += 10;
+
+      temp.theGraphicSubheaderLength[4] = '\0';
+      temp.theGraphicLength[6] = '\0';
+      
+      theNitfGraphicInfoRecords.push_back(temp);
+   }
+}
+
+void ossimNitfFileHeaderV2_1::readTextFileInfoRecords(std::istream &in)
+{
+   ossim_int32 numberOfTextFiles = ossimString(theNumberOfTextFileInfoRecords).toInt32();
+   ossim_int32 index;
+
+   theNitfTextFileInfoRecords.clear();
+   for(index=0; index < numberOfTextFiles; index++)
+   {
+      ossimNitfTextFileInfoRecordV2_1 temp;
+      
+      in.read(temp.theTextFileSubheaderLength, 4);
+      in.read(temp.theTextFileLength, 5);
+      theHeaderSize += 9;
+      
+      temp.theTextFileSubheaderLength[4] = '\0';
+      temp.theTextFileLength[5] = '\0';
+      
+      theNitfTextFileInfoRecords.push_back(temp);
+   }
+}
+
+void ossimNitfFileHeaderV2_1::readDataExtSegInfoRecords(std::istream &in)
+{
+   ossim_int32 numberOfDataExtSegs = ossimString(theNumberOfDataExtSegInfoRecords).toInt32();
+   ossim_int32 index;
+
+   theNitfDataExtSegInfoRecords.clear();
+   for(index=0; index < numberOfDataExtSegs; index++)
+   {
+      ossimNitfDataExtSegInfoRecordV2_1 temp;
+      
+      in.read(temp.theDataExtSegSubheaderLength, 4);
+      in.read(temp.theDataExtSegLength, 9);
+      theHeaderSize += 13;
+
+      temp.theDataExtSegSubheaderLength[4] = '\0';
+      temp.theDataExtSegLength[9]          = '\0';
+
+      theNitfDataExtSegInfoRecords.push_back(temp);
+   }
+}
+
+void ossimNitfFileHeaderV2_1::readResExtSegInfoRecords(std::istream &in)
+{
+   ossim_int32 numberOfResExtSegs = ossimString(theNumberOfResExtSegInfoRecords).toInt32();
+   ossim_int32 index;
+
+   theNitfResExtSegInfoRecords.clear();
+   for(index=0; index < numberOfResExtSegs; index++)
+   {
+      ossimNitfResExtSegInfoRecordV2_1 temp;
+
+      in.read(temp.theResExtSegSubheaderLength, 4);
+      in.read(temp.theResExtSegLength, 7);
+      theHeaderSize += 11;
+
+      temp.theResExtSegSubheaderLength[4] = '\0';
+      temp.theResExtSegLength[7]          = '\0';
+      
+      theNitfResExtSegInfoRecords.push_back(temp);      
+   }
+}
+
+ossim_int32 ossimNitfFileHeaderV2_1::getNumberOfLabels()const
+{
+   return 0;
+}
+
+ossim_int32 ossimNitfFileHeaderV2_1::getNumberOfSymbols()const
+{
+   return 0;
+}
+
+ossim_int32 ossimNitfFileHeaderV2_1::getNumberOfGraphics()const
+{
+   return theNitfGraphicInfoRecords.size();
+}
+
+ossim_int32 ossimNitfFileHeaderV2_1::getNumberOfDataExtSegments()const
+{
+   return theNitfDataExtSegInfoRecords.size();
+}
+
+ossim_int32 ossimNitfFileHeaderV2_1::getNumberOfReservedExtSegments()const
+{
+   return theNitfResExtSegInfoRecords.size();
+}
+
+const char* ossimNitfFileHeaderV2_1::getDateTime()const
+{
+   return theDateTime;
+}
+
+ossimDrect ossimNitfFileHeaderV2_1::getImageRect()const
+{
+   return theImageRect;
+}
+
+void ossimNitfFileHeaderV2_1::addImageInfoRecord(const ossimNitfImageInfoRecordV2_1& recordInfo)
+{
+   theNitfImageInfoRecords.push_back(recordInfo);
+
+   setNumberOfImageInfoRecords(theNitfImageInfoRecords.size());
+}
+
+void ossimNitfFileHeaderV2_1::addTextInfoRecord(const ossimNitfTextFileInfoRecordV2_1& recordInfo)
+{
+   theNitfTextFileInfoRecords.push_back(recordInfo);
+
+   setNumberOfTextInfoRecords(theNitfTextFileInfoRecords.size());
+}
+
+void ossimNitfFileHeaderV2_1::addDataExtSegInfoRecord(const ossimNitfDataExtSegInfoRecordV2_1& recordInfo)
+{
+   theNitfDataExtSegInfoRecords.push_back(recordInfo);
+
+   setNumberOfDataExtSegInfoRecords(theNitfDataExtSegInfoRecords.size());
+}
+
+
+void ossimNitfFileHeaderV2_1::replaceImageInfoRecord(int i, const ossimNitfImageInfoRecordV2_1& recordInfo)
+{
+   if ( i < static_cast<int>(theNitfImageInfoRecords.size()) )
+   {
+      theNitfImageInfoRecords[i] = recordInfo;
+   }
+}
+
+ossimNitfSymbolHeader *ossimNitfFileHeaderV2_1::allocateSymbolHeader()const
+{
+   return 0;
+}
+
+ossimNitfLabelHeader *ossimNitfFileHeaderV2_1::allocateLabelHeader()const
+{
+   return 0;
+}
+
+void ossimNitfFileHeaderV2_1::initializeAllOffsets()
+{
+   // this will be a running tally 
+   ossim_uint64 tally = theHeaderSize;
+   ossim_uint64 idx = 0;
+
+   // clear out all offset inforamtion and begin populating them
+   theImageOffsetList.clear();
+   theGraphicOffsetList.clear();
+   theTextFileOffsetList.clear();
+   theDataExtSegOffsetList.clear();
+
+   for(idx = 0; idx < theNitfImageInfoRecords.size(); ++idx)
+   {
+      theImageOffsetList.push_back(ossimNitfImageOffsetInformation(tally,
+                                                                   tally + theNitfImageInfoRecords[idx].getHeaderLength()));
+      tally += theNitfImageInfoRecords[idx].getTotalLength();
+   }
+   for(idx = 0; idx < theNitfGraphicInfoRecords.size(); ++idx)
+   {
+      theGraphicOffsetList.push_back(ossimNitfGraphicOffsetInformation(tally,
+                                                                     tally + theNitfGraphicInfoRecords[idx].getHeaderLength()));
+      tally += theNitfGraphicInfoRecords[idx].getTotalLength();
+   }
+
+   for(idx = 0; idx < theNitfTextFileInfoRecords.size(); ++idx)
+   {
+      theTextFileOffsetList.push_back(ossimNitfTextOffsetInformation(tally,
+                                                                     tally + theNitfTextFileInfoRecords[idx].getHeaderLength()));
+      tally += theNitfTextFileInfoRecords[idx].getTotalLength();
+   }
+
+   for(idx = 0; idx < theNitfDataExtSegInfoRecords.size(); ++idx)
+   {
+      theDataExtSegOffsetList.push_back(ossimNitfDataExtSegOffsetInformation(tally,
+                                                                             tally + theNitfDataExtSegInfoRecords[idx].getHeaderLength()));
+      tally += theNitfDataExtSegInfoRecords[idx].getTotalLength();
+   }
+}
+
+ossimNitfImageHeader*
+ossimNitfFileHeaderV2_1::getNewImageHeader(ossim_uint32 imageNumber,
+                                           std::istream& in)const
+{
+   ossimNitfImageHeader *result = 0;
+   
+   if( (getNumberOfImages() > 0) && (imageNumber < theImageOffsetList.size()) )
+   {
+      result = allocateImageHeader();
+      in.seekg(theImageOffsetList[imageNumber].theImageHeaderOffset, ios::beg);
+      ((ossimNitfImageHeaderV2_1*)result)->parseStream(in, this);
+   }
+   else
+   {
+#if 0
+      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimNitfFileHeaderV2_1::getNewImageHeader: "
+                                          << "\nNo images in file or image number (" << imageNumber
+                                          << ") is out of range!\n";
+#endif
+   }
+   
+   return result;
+}
+
+ossimNitfSymbolHeader*
+ossimNitfFileHeaderV2_1::getNewSymbolHeader(ossim_uint32 /* symbolNumber */,
+                                            std::istream& /* in */)const
+{
+   // Currently not implemented...
+   
+   ossimNitfSymbolHeader *result = 0;
+
+
+   
+   return result;
+}
+
+ossimNitfLabelHeader*
+ossimNitfFileHeaderV2_1::getNewLabelHeader(ossim_uint32 /* labelNumber */,
+                                           std::istream& /* in */)const
+{
+   // Currently not implemented...
+   ossimNitfLabelHeader *result = 0;
+   
+   return result;
+}
+
+ossimNitfTextHeader*
+ossimNitfFileHeaderV2_1::getNewTextHeader(ossim_uint32 /* textNumber */,
+                                          std::istream& /* in */)const
+{
+   // Currently not implemented...
+   ossimNitfTextHeader *result = 0;
+   
+   return result;
+}
+
+ossimNitfDataExtensionSegment*
+ossimNitfFileHeaderV2_1::getNewDataExtensionSegment(
+   ossim_int32 dataExtNumber, std::istream&  in )const
+{
+   ossimNitfDataExtensionSegment *result = 0;
+
+   if((getNumberOfDataExtSegments() > 0) &&
+      (dataExtNumber < (ossim_int32)theNitfDataExtSegInfoRecords.size()) &&
+      (dataExtNumber >= 0))
+   {
+      result = allocateDataExtSegment();
+      ossimIFStream64::seekg64(in, theDataExtSegOffsetList[dataExtNumber].theDataExtSegHeaderOffset, ios::beg);
+      result->parseStream(in, theNitfDataExtSegInfoRecords[dataExtNumber].getDataExtSegLength());
+   }
+   
+   return result;
+}
+
+ossimString ossimNitfFileHeaderV2_1::getSecurityClassificationSys()const
+{
+   return theSecurityClassificationSys;
+}
+
+ossimString ossimNitfFileHeaderV2_1::getCodeWords()const
+{
+   return theCodewords;
+}
+
+ossimString ossimNitfFileHeaderV2_1::getControlAndHandling()const
+{
+   return theControlAndHandling;
+}
+
+ossimString ossimNitfFileHeaderV2_1::getReleasingInstructions()const
+{
+   return theReleasingInstructions;
+}
+
+ossimString ossimNitfFileHeaderV2_1::getDeclassificationType()const
+{
+   return theDeclassificationType;
+}
+
+ossimString ossimNitfFileHeaderV2_1::getDeclassificationDate()const
+{
+   return theDeclassificationDate;
+}
+
+ossimString ossimNitfFileHeaderV2_1::getDeclassificationExemption()const
+{
+   return theDeclassificationExemption;
+}
+
+ossimString ossimNitfFileHeaderV2_1::getDowngrade()const
+{
+   return theDowngrade;
+}
+
+ossimString ossimNitfFileHeaderV2_1::getDowngradingDate()const
+{
+   return theDowngradingDate;
+}
+
+ossimString ossimNitfFileHeaderV2_1::getClassificationText()const
+{
+   return theClassificationText;
+}
+
+ossimString ossimNitfFileHeaderV2_1::getClassificationAuthorityType()const
+{
+   return theClassificationAuthorityType;
+}
+
+ossimString ossimNitfFileHeaderV2_1::getClassificationAuthority()const
+{
+   return theClassificationAuthority;
+}
+
+ossimString ossimNitfFileHeaderV2_1::getClassificationReason()const
+{
+   return theClassificationReason;
+}
+
+ossimString ossimNitfFileHeaderV2_1::getSecuritySourceDate()const
+{
+   return theSecuritySourceDate;
+}
+
+ossimString ossimNitfFileHeaderV2_1::getSecurityControlNumber()const
+{
+   return theSecurityControlNumber;
+}
+
+void ossimNitfFileHeaderV2_1::getBackgroundColor(ossim_uint8& r,
+                                                 ossim_uint8& g,
+                                                 ossim_uint8& b)const
+{
+   r = theFileBackgroundColor[0];
+   g = theFileBackgroundColor[1];
+   b = theFileBackgroundColor[2];
+}
+
+ossimString ossimNitfFileHeaderV2_1::getOriginatorsName()const
+{
+   return theOriginatorsName;
+}
+
+ossimString ossimNitfFileHeaderV2_1::getOriginatorsPhone()const
+{
+   return theOriginatorsPhone;
+}
+
+void ossimNitfFileHeaderV2_1::setFileLength(ossim_uint64 fileLength)
+{
+   ostringstream out;
+
+   out << std::setw(12)
+       << std::setfill('0')
+       << std::setiosflags(ios::right)
+       << fileLength;
+
+   memcpy(theFileLength, out.str().c_str(), 12);
+}
+
+
+
+void ossimNitfFileHeaderV2_1::setNumberOfGraphicInfoRecords(ossim_uint64 num)
+	{
+		if (num < 1000)
+   {
+      ostringstream out;
+      
+      out << std::setw(3)
+          << std::setfill('0')
+          << std::setiosflags(ios::right)
+          << num;
+      
+      memcpy(theNumberOfGraphicInfoRecords, out.str().c_str(), 3);
+   }
+   else
+   {
+      std::string s = "ossimNitfFileHeaderV2_1::setNumberOfGraphicInfoRecords:";
+      s += " ERROR\nExceeded max number of 999!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+		
+	}
+
+void ossimNitfFileHeaderV2_1::setNumberOfDataExtSegInfoRecords(ossim_uint64 num)
+{
+   if (num < 1000)
+   {
+      ostringstream out;
+      
+      out << std::setw(3)
+          << std::setfill('0')
+          << std::setiosflags(ios::right)
+          << num;
+      
+      memcpy(theNumberOfDataExtSegInfoRecords, out.str().c_str(), 3);
+   }
+   else
+   {
+      std::string s = "ossimNitfFileHeaderV2_1::setNumberOfDataExtSegInfoRecords:";
+      s += " ERROR\nExceeded max number of 999!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+}
+
+
+void ossimNitfFileHeaderV2_1::setNumberOfTextInfoRecords(ossim_uint64 num)
+{
+   if (num < 1000)
+   {
+      ostringstream out;
+      
+      out << std::setw(3)
+          << std::setfill('0')
+          << std::setiosflags(ios::right)
+          << num;
+      
+      memcpy(theNumberOfTextFileInfoRecords, out.str().c_str(), 3);
+   }
+   else
+   {
+      std::string s = "ossimNitfFileHeaderV2_1::setNumberOfTextRecords:";
+      s += " ERROR\nExceeded max number of 999!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+}
+
+
+void ossimNitfFileHeaderV2_1::setNumberOfImageInfoRecords(ossim_uint64 num)
+{
+   if (num < 1000)
+   {
+      ostringstream out;
+      
+      out << std::setw(3)
+          << std::setfill('0')
+          << std::setiosflags(ios::right)
+          << num;
+      
+      memcpy(theNumberOfImageInfoRecords, out.str().c_str(), 3);
+   }
+   else
+   {
+      std::string s = "ossimNitfFileHeaderV2_1::setNumberOfImageInfoRecords:";
+      s += " ERROR\nExceeded max image info number of 999!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+}
+
+void ossimNitfFileHeaderV2_1::setHeaderLength(ossim_uint64 headerLength)
+{
+   ostringstream out;
+
+   out << std::setw(6)
+       << std::setfill('0')
+       << std::setiosflags(ios::right)
+       << headerLength;
+
+   memcpy(theHeaderLength, out.str().c_str(), 6);
+}
+
+void ossimNitfFileHeaderV2_1::setSecurityClassificationSys(const ossimString& value)
+{
+   std::ostringstream out;
+   
+   out << std::setw(2)
+       << std::setfill(' ')
+       << std::setiosflags(ios::left)
+       << ossimString(value).trim();
+
+   memcpy(theSecurityClassificationSys, out.str().c_str(), 2);
+}
+
+void ossimNitfFileHeaderV2_1::setCodeWords(const ossimString& codeWords)
+{
+   std::ostringstream out;
+   
+   out << std::setw(11)
+       << std::setfill(' ')
+       << std::setiosflags(ios::left)
+       << ossimString(codeWords).trim();
+
+   memcpy(theCodewords, out.str().c_str(), 11);
+}
+
+void ossimNitfFileHeaderV2_1::setControlAndHandling(const ossimString& controlAndHandling)
+{
+   std::ostringstream out;
+   
+   out << std::setw(2)
+       << std::setfill(' ')
+       << std::setiosflags(ios::left)
+       << ossimString(controlAndHandling).trim();
+
+   memcpy(theControlAndHandling, out.str().c_str(), 2);
+}
+
+void ossimNitfFileHeaderV2_1::setReleasingInstructions(const ossimString& releasingInstructions)
+{
+   std::ostringstream out;
+   
+   out << std::setw(20)
+       << std::setfill(' ')
+       << std::setiosflags(ios::left)
+       << ossimString(releasingInstructions).trim();
+
+   memcpy(theReleasingInstructions, out.str().c_str(), 20);
+}
+
+void ossimNitfFileHeaderV2_1::setDeclassificationType(const ossimString& declassType)
+{
+   std::ostringstream out;
+   
+   out << std::setw(2)
+       << std::setfill(' ')
+       << std::setiosflags(ios::left)
+       << declassType.trim();
+
+   memcpy(theDeclassificationType, out.str().c_str(), 2);
+}
+
+void ossimNitfFileHeaderV2_1::setDeclassificationDate(const ossimLocalTm& d)
+{
+   memcpy(theDeclassificationDate, formatDate(getVersion(), d).c_str(), 8);
+}
+
+void ossimNitfFileHeaderV2_1::setDeclassificationDate(const ossimString& d)
+{
+   if(d.size() >=8)
+   {
+      memcpy(theDeclassificationDate, d.c_str(), 8);
+   }
+}
+
+void ossimNitfFileHeaderV2_1::setDeclassificationExemption(const ossimString& exemption)
+{
+   std::ostringstream out;
+   
+   out << std::setw(4)
+       << std::setfill(' ')
+       << std::setiosflags(ios::left)
+       << exemption.trim();
+
+   memcpy(theDeclassificationExemption, out.str().c_str(), 4);
+}
+
+void ossimNitfFileHeaderV2_1::setDowngrade(const ossimString& downgrade)
+{
+   std::ostringstream out;
+   
+   out << std::setw(1)
+       << std::setfill(' ')
+       << std::setiosflags(ios::left)
+       << downgrade.trim();
+
+   memcpy(theDowngrade, out.str().c_str(), 1);
+}
+
+void ossimNitfFileHeaderV2_1::setDowngradingDate(const ossimLocalTm& d)
+{
+   memcpy(theDowngradingDate, formatDate(getVersion(), d).c_str(), 8);
+}
+
+void ossimNitfFileHeaderV2_1::setDowngradingDate(const ossimString& d)
+{
+   if(d.size() >=8)
+   {
+      memcpy(theDowngradingDate, d.c_str(), 8);
+   }
+}
+
+void ossimNitfFileHeaderV2_1::setClassificationText(const ossimString& classificationText)
+{
+   std::ostringstream out;
+   
+   out << std::setw(43)
+       << std::setfill(' ')
+       << std::setiosflags(ios::left)
+       << classificationText.trim();
+
+   memcpy(theClassificationText, out.str().c_str(), 43);
+}
+
+void ossimNitfFileHeaderV2_1::setClassificationAuthorityType(const ossimString& authorityType)
+{
+   std::ostringstream out;
+   
+   out << std::setw(1)
+       << std::setfill(' ')
+       << std::setiosflags(ios::left)
+       << authorityType.trim();
+
+   memcpy(theClassificationAuthorityType, out.str().c_str(), 1);
+}
+
+void ossimNitfFileHeaderV2_1::setClassificationAuthority(const ossimString& authority)
+{
+   std::ostringstream out;
+   
+   out << std::setw(40)
+       << std::setfill(' ')
+       << std::setiosflags(ios::left)
+       << authority.trim();
+
+   memcpy(theClassificationAuthority, out.str().c_str(), 40);
+}
+
+void ossimNitfFileHeaderV2_1::setClassificationReason(const ossimString& reason)
+{
+   std::ostringstream out;
+   
+   out << std::setw(1)
+       << std::setfill(' ')
+       << std::setiosflags(ios::left)
+       << reason.trim();
+
+   memcpy(theClassificationReason, out.str().c_str(), 1);
+}
+
+void ossimNitfFileHeaderV2_1::setSecuritySourceDate(const ossimLocalTm& d)
+{
+   memcpy(theSecuritySourceDate, formatDate(getVersion(), d).c_str(), 8);
+}
+
+void ossimNitfFileHeaderV2_1::setSecuritySourceDate(const ossimString& d)
+{
+   if(d.size() >=8)
+   {
+      memcpy(theSecuritySourceDate, d.c_str(), 8);
+   }
+}
+
+void ossimNitfFileHeaderV2_1::setSecurityControlNumber(const ossimString& number)
+{
+   std::ostringstream out;
+   
+   out << std::setw(15)
+       << std::setfill(' ')
+       << std::setiosflags(ios::left)
+       << number.trim();
+
+   memcpy(theSecurityControlNumber, out.str().c_str(), 15);
+}
+
+void ossimNitfFileHeaderV2_1::setFileBackgroundColor(ossim_uint8 r,
+                                                     ossim_uint8 g,
+                                                     ossim_uint8 b)
+{
+   theFileBackgroundColor[0] = r;
+   theFileBackgroundColor[1] = g;
+   theFileBackgroundColor[2] = b;
+}
+
+void ossimNitfFileHeaderV2_1::setOriginatorsName(const ossimString& name)
+{
+   std::ostringstream out;
+   
+   out << std::setw(24)
+       << std::setfill(' ')
+       << std::setiosflags(ios::left)
+       << name.trim();
+   
+   memcpy(theOriginatorsName, out.str().c_str(), 24);
+}
+
+void ossimNitfFileHeaderV2_1::setOriginatorsPhone(const ossimString& phone)
+{
+   std::ostringstream out;
+   
+   out << std::setw(18)
+       << std::setfill(' ')
+       << std::setiosflags(ios::left)
+       << phone.trim();
+   
+   memcpy(theOriginatorsPhone, out.str().c_str(), 18);
+}
+
+bool ossimNitfFileHeaderV2_1::loadState(const ossimKeywordlist& kwl,
+                                        const char* prefix)
+{
+   // Note: Currently not looking up all fieds only ones that make sense.
+   
+   const char* lookup;
+
+   lookup = kwl.find( prefix, FSCLSY_KW);
+   if ( lookup )
+   {
+      setSecurityClassificationSys( ossimString(lookup) );
+   }  
+   lookup = kwl.find( prefix, FSDCTP_KW);
+   if ( lookup )
+   {
+      setDeclassificationType( ossimString(lookup) );
+   }  
+   lookup = kwl.find( prefix, FSDCDT_KW);
+   if ( lookup )
+   {
+      setDeclassificationDate( ossimString(lookup) );
+   }  
+   lookup = kwl.find( prefix, FSDCXM_KW);
+   if ( lookup )
+   {
+      setDeclassificationExemption( ossimString(lookup) );
+   }  
+   lookup = kwl.find( prefix, FSDG_KW);
+   if ( lookup )
+   {
+      setDowngrade( ossimString(lookup) );
+   }  
+   lookup = kwl.find( prefix, FSDGDT_KW);
+   if ( lookup )
+   {
+      setDowngradingDate( ossimString(lookup) );
+   }  
+   lookup = kwl.find( prefix, FSCLTX_KW );
+   if ( lookup )
+   {
+      setClassificationText( ossimString(lookup) );
+   }  
+   lookup = kwl.find( prefix, FSCATP_KW );
+   if ( lookup )
+   {
+      setClassificationAuthorityType( ossimString(lookup) );
+   }  
+   lookup = kwl.find( prefix, FSCRSN_KW );
+   if ( lookup )
+   {
+      setClassificationReason( ossimString(lookup) );
+   }  
+   lookup = kwl.find( prefix, FSSRDT_KW );
+   if ( lookup )
+   {
+      setClassificationReason( ossimString(lookup) );
+   }  
+   lookup = kwl.find( prefix, FSSRDT_KW);
+   if ( lookup )
+   {
+      setSecuritySourceDate( ossimString(lookup) );
+   }  
+   lookup = kwl.find( prefix, FBKGC_KW );
+   if ( lookup )
+   {
+      ossimString value = lookup;
+      std::vector<ossimString> splitString;
+      value = value.trim();
+      value.split(splitString, " ");
+      if(splitString.size() == 3)
+      {
+         setFileBackgroundColor((ossim_uint8)splitString[0].toUInt32(), 
+                                (ossim_uint8)splitString[1].toUInt32(), 
+                                (ossim_uint8)splitString[2].toUInt32());
+      }
+   }  
+   
+   return ossimNitfFileHeaderV2_X::loadState(kwl, prefix);
+}
+
+void ossimNitfFileHeaderV2_1::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property.valid()) return;
+   
+   ossimString name = property->getName();
+
+   // Make case insensitive:
+   name.upcase();
+   
+   if(name == FSCLSY_KW)
+   {
+     setSecurityClassificationSys(property->valueToString()); 
+   }
+   else if(name == FSDCTP_KW)
+   {
+      setDeclassificationType(property->valueToString());
+   }
+   else if(name == FSDCDT_KW)
+   {
+      setDeclassificationDate(property->valueToString());
+   }
+   else if(name == FSDCXM_KW)
+   {
+      setDeclassificationExemption(property->valueToString());
+   }
+   else if(name == FSDG_KW)
+   {
+      setDowngrade(property->valueToString());
+   }
+   else if(name == FSDGDT_KW)
+   {
+      setDowngradingDate(property->valueToString());
+   }
+   else if(name == FSCLTX_KW)
+   {
+      setClassificationText(property->valueToString());
+   }
+   else if(name == FSCATP_KW)
+   {
+      setClassificationAuthorityType(property->valueToString());
+   }
+   else if(name == FSCRSN_KW)
+   {
+      setClassificationReason(property->valueToString());
+   }
+   else if(name == FSSRDT_KW)
+   {
+      setSecuritySourceDate(property->valueToString());
+   }
+   else if(name == FBKGC_KW)
+   {
+      ossimColorProperty* colorProp = PTR_CAST(ossimColorProperty, property.get());
+      if (colorProp)
+      {
+         ossim_uint8 r = colorProp->getRed();
+         ossim_uint8 g = colorProp->getGreen();
+         ossim_uint8 b = colorProp->getBlue();
+
+         setFileBackgroundColor(r, g, b);
+      }
+      else
+      {
+        ossimString value = property->valueToString();
+        std::vector<ossimString> splitString;
+        value = value.trim();
+        value.split(splitString, " ");
+        if(splitString.size() == 3)
+        {
+           setFileBackgroundColor((ossim_uint8)splitString[0].toUInt32(), 
+                                  (ossim_uint8)splitString[1].toUInt32(), 
+                                  (ossim_uint8)splitString[2].toUInt32());
+        }
+      }
+
+   }
+   else
+   {
+      ossimNitfFileHeaderV2_X::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimNitfFileHeaderV2_1::getProperty(const ossimString& name)const
+{
+   ossimProperty* property = 0;
+   ossimStringProperty* stringProperty = 0;
+   ossimColorProperty* colorProperty = 0;
+
+   if(name == CLEVEL_KW)
+   {
+      property = new ossimStringProperty(name, getComplexityLevel().trim());
+   }
+   else if(name == FSCLSY_KW)
+   {
+      property = new ossimStringProperty(name,
+                                               getSecurityClassificationSys().trim());
+   }
+   else if(name == FSDCTP_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         getDeclassificationType().trim());
+   }
+   else if(name == FSDCDT_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         getDeclassificationDate().trim());
+   }
+   else if(name == FSDCXM_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         getDeclassificationExemption().trim());
+   }
+   else if(name == FSDG_KW)
+   {
+      stringProperty = new ossimStringProperty(name,
+                                               getDowngrade().trim(),
+                                               false);
+      
+      stringProperty->addConstraint("");
+      stringProperty->addConstraint("S");
+      stringProperty->addConstraint("C");
+      stringProperty->addConstraint("R");
+
+      property = stringProperty;
+   }
+   else if(name == FSDGDT_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         getDowngradingDate().trim());
+   }
+   else if(name == FSCLTX_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         getClassificationText().trim());
+   }
+   else if(name == FSCATP_KW)
+   {
+      stringProperty = new ossimStringProperty(name,
+                                               getClassificationAuthorityType().trim(),
+                                               false);
+      
+      stringProperty->addConstraint("");
+      stringProperty->addConstraint("O");
+      stringProperty->addConstraint("D");
+      stringProperty->addConstraint("M");
+      
+      property = stringProperty;
+   }
+   else if(name == FSCRSN_KW)
+   {
+      stringProperty = new ossimStringProperty(name,
+                                               getClassificationReason().trim(),
+                                               false);
+      
+      stringProperty->addConstraint("");
+      stringProperty->addConstraint("A");
+      stringProperty->addConstraint("B");
+      stringProperty->addConstraint("C");
+      stringProperty->addConstraint("D");
+      stringProperty->addConstraint("E");
+      stringProperty->addConstraint("F");
+      stringProperty->addConstraint("G");
+      
+      property = stringProperty;
+   }
+   else if(name == FSSRDT_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         getSecuritySourceDate().trim());
+   }
+   else if(name == FBKGC_KW)
+   {
+      ossim_uint8 r, g, b;
+      getBackgroundColor(r, g, b);
+      
+      colorProperty = new ossimColorProperty(name,
+                                             ossimRgbVector(r, g, b));
+
+      property = colorProperty;
+   }
+   else if(name == ONAME_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theOriginatorsName).trim());
+   }
+   else if(name == OPHONE_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theOriginatorsPhone).trim());
+   }
+   else
+   {
+      return ossimNitfFileHeaderV2_X::getProperty(name);
+   }
+   return property;
+}
+
+
+void ossimNitfFileHeaderV2_1::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimNitfFileHeaderV2_X::getPropertyNames(propertyNames);
+
+   propertyNames.push_back(FSCLSY_KW);
+   propertyNames.push_back(FSDCTP_KW);
+   propertyNames.push_back(FSDCDT_KW);
+   propertyNames.push_back(FSDCXM_KW);
+   propertyNames.push_back(FSDG_KW);
+   propertyNames.push_back(FSDGDT_KW);
+   propertyNames.push_back(FSCLTX_KW);
+   propertyNames.push_back(FSCATP_KW);
+   propertyNames.push_back(FSCRSN_KW);
+   propertyNames.push_back(FSSRDT_KW);
+   propertyNames.push_back(FBKGC_KW);
+}
+
+void ossimNitfFileHeaderV2_1::addTag(ossimNitfTagInformation tag, bool unique)
+{
+   if (unique)
+   {
+      removeTag(tag.getTagName());
+   }
+   theTagList.push_back(tag);
+}
+
+void ossimNitfFileHeaderV2_1::removeTag(const ossimString& tagName)
+{
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx < theTagList.size(); ++idx)
+   {
+      if(theTagList[idx].getTagName() == tagName)
+      {
+         theTagList.erase(theTagList.begin() + idx);
+         return;
+      }
+   }
+}
+
+bool ossimNitfFileHeaderV2_1::takeOverflowTags(std::vector<ossimNitfTagInformation> &overflowTags,
+   ossim_uint32 potentialDesIndex, bool userDefinedTags)
+{
+   overflowTags.clear();
+   std::vector<ossimNitfTagInformation>::iterator iter;
+   std::vector<ossimNitfTagInformation> specifiedTags;
+   const ossimString tagType(userDefinedTags ? "UDHD" : "XHD");
+   for (iter = theTagList.begin(); iter != theTagList.end(); ++iter)
+   {
+      if (iter->getTagType() == tagType)
+      {
+         specifiedTags.push_back(*iter);
+      }
+   }
+
+   std::sort(specifiedTags.begin(), specifiedTags.end());
+
+   ossim_uint32 totalSize = 0;
+   const ossim_uint32 maxSize = 9996;
+   for (iter = specifiedTags.begin(); iter != specifiedTags.end() &&
+      totalSize + iter->getTotalTagLength() <= maxSize; ++iter)
+   {
+      totalSize += iter->getTotalTagLength();
+   }
+
+   for (; iter != specifiedTags.end(); ++iter)
+   {
+      overflowTags.push_back(*iter);
+      removeTag(iter->getTagName());
+   }
+
+   // If there are no overflow tags, then no DES is required
+   if (overflowTags.empty() == true)
+   {
+      potentialDesIndex = 0;
+   }
+
+   std::ostringstream overflowDes;
+   overflowDes << std::setw(3)
+           << std::setfill('0')
+           << std::setiosflags(ios::right)
+           << potentialDesIndex;
+
+   std::ostringstream tagLength;
+   tagLength << std::setw(5)
+           << std::setfill('0')
+           << std::setiosflags(ios::right)
+           << totalSize;
+
+   // Even if no overflow tags exist, update the fields
+   if (userDefinedTags)
+   {
+      strcpy(theUserDefinedHeaderOverflow, overflowDes.str().c_str());
+      strcpy(theUserDefinedHeaderDataLength, tagLength.str().c_str());
+   }
+   else
+   {
+      strcpy(theExtendedHeaderDataOverflow, overflowDes.str().c_str());
+      strcpy(theExtendedHeaderDataLength, tagLength.str().c_str());
+   }
+
+   return (overflowTags.empty() == false);
+}
+
+
diff --git a/ossim/src/ossim/support_data/ossimNitfFileHeaderV2_X.cpp b/ossim/src/ossim/support_data/ossimNitfFileHeaderV2_X.cpp
new file mode 100644
index 0000000..3ad0c17
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfFileHeaderV2_X.cpp
@@ -0,0 +1,532 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimNitfFileHeaderV2_X.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/support_data/ossimNitfFileHeaderV2_X.h>
+#include <ossim/support_data/ossimNitfCommon.h>
+
+#include <iomanip>
+#include <sstream>
+#include <ossim/base/ossimDate.h> /* for ossimLocalTm */
+#include <ossim/base/ossimDateProperty.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimNumericProperty.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/support_data/ossimNitfCommon.h>
+
+RTTI_DEF1(ossimNitfFileHeaderV2_X, "ossimNitfFileHeaderV2_X", ossimNitfFileHeader);
+static ossimString monthConversionTable[] = {"   ", "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"};
+
+const ossimString ossimNitfFileHeaderV2_X::FILE_TYPE_KW = "FILE_TYPE";
+const ossimString ossimNitfFileHeaderV2_X::VERSION_KW   = "VERSION";
+const ossimString ossimNitfFileHeaderV2_X::FHDR_KW      = "FHDR";
+const ossimString ossimNitfFileHeaderV2_X::CLEVEL_KW    = "CLEVEL";
+const ossimString ossimNitfFileHeaderV2_X::STYPE_KW     = "STYPE";
+const ossimString ossimNitfFileHeaderV2_X::OSTAID_KW    = "OSTAID";
+const ossimString ossimNitfFileHeaderV2_X::FDT_KW       = "FDT";  
+const ossimString ossimNitfFileHeaderV2_X::FTITLE_KW    = "FTITLE";
+const ossimString ossimNitfFileHeaderV2_X::FSCLAS_KW    = "FSCLAS";
+const ossimString ossimNitfFileHeaderV2_X::FSCODE_KW    = "FSCODE";
+const ossimString ossimNitfFileHeaderV2_X::FSCTLH_KW    = "FSCTLH";
+const ossimString ossimNitfFileHeaderV2_X::FSREL_KW     = "FSREL";
+const ossimString ossimNitfFileHeaderV2_X::FSCAUT_KW    = "FSCAUT";
+const ossimString ossimNitfFileHeaderV2_X::FSCTLN_KW    = "FSCTLN";
+const ossimString ossimNitfFileHeaderV2_X::FSCOP_KW     = "FSCOP";
+const ossimString ossimNitfFileHeaderV2_X::FSCPYS_KW    = "FSCPYS";
+const ossimString ossimNitfFileHeaderV2_X::ENCRYP_KW    = "ENCRYP";
+const ossimString ossimNitfFileHeaderV2_X::ONAME_KW     = "ONAME";
+const ossimString ossimNitfFileHeaderV2_X::OPHONE_KW    = "OPHONE";
+
+ossimNitfFileHeaderV2_X::ossimNitfFileHeaderV2_X()
+{
+}
+
+void ossimNitfFileHeaderV2_X::setComplexityLevel(const ossimString& level)
+{
+   ossimNitfCommon::setField(theComplexityLevel, level, 2, std::ios::right, '0');
+}
+
+void ossimNitfFileHeaderV2_X::setSystemType(const ossimString& systemType)
+{
+   ossimNitfCommon::setField(theSystemType, systemType, 4);
+}
+
+void ossimNitfFileHeaderV2_X::setOriginatingStationId(const ossimString& originationId)
+{
+   ossimNitfCommon::setField(theOriginatingStationId, originationId, 10);
+}
+
+ossimString ossimNitfFileHeaderV2_X::formatDate(const ossimString& version,
+                                                const ossimLocalTm& d)
+{
+   // Convert to ZULU as per spec for both versions.
+   ossimLocalTm d1 = d.convertToGmt();
+   
+   std::ostringstream out;
+
+   if(version.contains("2.1"))
+   {
+      out << std::setw(4)
+      << std::setfill('0')
+      << d1.getYear()
+      << std::setw(2)
+      << std::setfill('0')
+      << d1.getMonth()
+      << std::setw(2)
+      << std::setfill('0')
+      << d1.getDay()
+      << std::setw(2)
+      << std::setfill('0')
+      << d1.getHour()
+      << std::setw(2)
+      << std::setfill('0')
+      << d1.getMin()
+      << std::setw(2)
+      << std::setfill('0')
+      << d1.getSec();
+   }
+   else
+   {
+      out  << std::setw(2)
+      << std::setfill('0')
+      << d1.getDay()
+      << std::setw(2)
+      << std::setfill('0')
+      << d1.getHour()
+      << std::setw(2)
+      << std::setfill('0')
+      << d1.getMin()
+      << std::setw(2)
+      << std::setfill('0')
+      << d1.getSec()
+      << "Z"
+      <<monthConversionTable[d1.getMonth()]
+      << std::setw(2)
+      << std::setfill('0')
+      <<d1.getShortYear();
+      
+   }
+      
+   return out.str();
+}
+
+void ossimNitfFileHeaderV2_X::setDate(const ossimLocalTm& d)
+{
+   memcpy(theDateTime, formatDate(getVersion(), d).c_str(), 14);
+}
+
+void ossimNitfFileHeaderV2_X::setDate(const ossimString& d)
+{
+   if(d.size()==14)
+   {
+      memcpy(theDateTime, d.c_str(), 14);
+   }
+}
+
+void ossimNitfFileHeaderV2_X::setDate()
+{
+   setDate(ossimLocalTm(0));
+}  
+
+void ossimNitfFileHeaderV2_X::setTitle(const ossimString& title)
+{
+   ossimNitfCommon::setField(theFileTitle, title, 80);
+}
+
+void ossimNitfFileHeaderV2_X::setFileSecurityClassification(const ossimString& securityClassification)
+{
+   ossimNitfCommon::setField(theSecurityClassification, securityClassification, 1);
+}
+
+void ossimNitfFileHeaderV2_X::setCopyNumber(const ossimString& copyNumber)
+{
+   if(copyNumber.trim() == "")
+   {
+      memset(theCopyNumber, '0', 5);
+   }
+   else
+   {
+      ossimNitfCommon::setField(theCopyNumber, copyNumber, 5, std::ios::right, '0');
+   }
+}
+
+void ossimNitfFileHeaderV2_X::setNumberOfCopies(const ossimString& numberOfCopies)
+{
+   if(numberOfCopies.trim() == "")
+   {
+      memset(theNumberOfCopies, 0, 5);
+   }
+   else
+   {
+      ossimNitfCommon::setField(theNumberOfCopies, numberOfCopies, 5, std::ios::right, '0');
+   }
+}
+
+void ossimNitfFileHeaderV2_X::setEncryption(const ossimString& encryption)
+{
+   ossimNitfCommon::setField(theEncryption, encryption, 1);
+}
+
+ossimString ossimNitfFileHeaderV2_X::getComplexityLevel()const
+{
+   return theComplexityLevel;
+}
+
+ossimString ossimNitfFileHeaderV2_X::getSystemType()const
+{
+   return theSystemType;
+}
+
+ossimString ossimNitfFileHeaderV2_X::getOriginatingStationId()const
+{
+   return theOriginatingStationId;
+}
+
+ossimString ossimNitfFileHeaderV2_X::getDate()const
+{
+   return theDateTime;
+}
+
+ossimString ossimNitfFileHeaderV2_X::getTitle()const
+{
+   return theFileTitle;
+}
+
+ossimString ossimNitfFileHeaderV2_X::getSecurityClassification()const
+{
+   return theSecurityClassification;
+}
+
+ossimString ossimNitfFileHeaderV2_X::getCopyNumber()const
+{
+   return theCopyNumber;
+}
+
+ossimString ossimNitfFileHeaderV2_X::getNumberOfCopies()const
+{
+   return theNumberOfCopies;
+}
+
+ossimString ossimNitfFileHeaderV2_X::getEncryption()const
+{
+   return theEncryption;
+}
+
+void ossimNitfFileHeaderV2_X::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   if(!property.valid()) return;
+
+   ossimString name = property->getName();
+
+   // Make case insensitive:
+   name.upcase();
+
+   if(name == FHDR_KW)
+   {
+      
+   }
+   else if(name == STYPE_KW)
+   {
+      setSystemType(property->valueToString());
+   }
+   else if(name == OSTAID_KW)
+   {
+      setOriginatingStationId(property->valueToString());
+   }
+   else if(name == FDT_KW)
+   {
+      setDate(property->valueToString());
+   }
+   else if(name == FTITLE_KW)
+   {
+      setTitle(property->valueToString());
+   }
+   else if(name == FSCLAS_KW)
+   {
+      setFileSecurityClassification(property->valueToString());
+   }
+   else if(name == FSCODE_KW)
+   {
+      setCodeWords(property->valueToString()); 
+   }
+   else if(name == FSCTLH_KW)
+   {
+      setControlAndHandling(property->valueToString());
+   }
+   else if(name == FSREL_KW)
+   {
+      setReleasingInstructions(property->valueToString());
+   }
+   else if(name == FSCAUT_KW)
+   {
+      setClassificationAuthority(property->valueToString()); 
+   }
+   else if(name == FSCTLN_KW)
+   {
+      setSecurityControlNumber(property->valueToString());
+   }
+   else if(name == FSCOP_KW)
+   {
+      setCopyNumber(property->valueToString());
+   }
+   else if(name == FSCPYS_KW)
+   {
+      setNumberOfCopies(property->valueToString());
+   }
+   else if(name == ENCRYP_KW)
+   {
+      setEncryption(property->valueToString());
+   }
+   else if(name == ONAME_KW)
+   {
+      setOriginatorsName(property->valueToString());
+   }
+   else if(name == OPHONE_KW)
+   {
+      setOriginatorsPhone(property->valueToString());
+   }
+   else
+   {
+      ossimNitfFileHeader::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimNitfFileHeaderV2_X::getProperty(const ossimString& name)const
+{
+   ossimRefPtr<ossimProperty> property = 0;
+   
+   if(name == FHDR_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(theFileTypeVersion));
+   }
+   else if(name == VERSION_KW)
+   {
+      property = new ossimStringProperty(name, ossimString(getVersion()));
+   }
+   else if(name == FILE_TYPE_KW)
+   {
+      property = new ossimStringProperty(name, "NITF");
+   }
+   else if(name == CLEVEL_KW)
+   {
+      ossimNumericProperty* numericProperty =
+         new ossimNumericProperty(name,
+                                  getComplexityLevel(),
+                                  1,
+                                  99);
+      numericProperty->setNumericType(ossimNumericProperty::ossimNumericPropertyType_INT);
+      property = numericProperty;
+      
+   }
+   else if(name == STYPE_KW)
+   {
+      property = new ossimStringProperty(name, getSystemType().trim());
+   }
+   else if(name == OSTAID_KW)
+   {
+      property = new ossimStringProperty(name, getOriginatingStationId().trim());
+   }
+   else if(name == FDT_KW)
+   {
+      property = new ossimStringProperty(name, getDate());
+   }
+   else if(name == FTITLE_KW)
+   {
+      property = new ossimStringProperty(name, getTitle().trim());
+   }
+   else if(name == FSCLAS_KW)
+   {
+      ossimStringProperty* stringProperty =
+         new ossimStringProperty(name,
+                                 getSecurityClassification().trim(),
+                                 false);
+      
+      stringProperty->addConstraint("");
+      stringProperty->addConstraint("T");
+      stringProperty->addConstraint("S");
+      stringProperty->addConstraint("C");
+      stringProperty->addConstraint("R");
+      stringProperty->addConstraint("U");
+      
+      property = stringProperty;
+   }
+   else if(name == FSCODE_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         getCodeWords().trim());
+   }
+   else if(name == FSCTLH_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         getControlAndHandling().trim());
+   }
+   else if(name == FSREL_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         getReleasingInstructions().trim());
+   }
+   else if(name == FSCAUT_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         getClassificationAuthority().trim());
+   }
+   else if(name == FSCTLN_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         getSecurityControlNumber().trim());
+      
+   }
+   else if(name == FSCOP_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         getCopyNumber().trim());
+   }
+   else if(name == FSCPYS_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         getNumberOfCopies().trim());
+   }
+   else if(name == ENCRYP_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         getEncryption().trim(),
+                                         false);
+   }
+   else
+   {
+      property = ossimNitfFileHeader::getProperty(name).get();
+   }
+   
+   return property;
+}
+
+bool ossimNitfFileHeaderV2_X::saveState(ossimKeywordlist& kwl, const ossimString& prefix)const
+{
+   bool result = ossimNitfFileHeader::saveState(kwl, prefix);
+   
+   if(result)
+   {
+      kwl.add(prefix, FHDR_KW.c_str(),   theFileTypeVersion);
+      kwl.add(prefix, CLEVEL_KW.c_str(), theComplexityLevel);
+      kwl.add(prefix, STYPE_KW.c_str(),  theSystemType);
+      kwl.add(prefix, OSTAID_KW.c_str(), theOriginatingStationId);
+      kwl.add(prefix, FDT_KW.c_str(),    theDateTime);
+      kwl.add(prefix, FTITLE_KW.c_str(), theFileTitle);
+      kwl.add(prefix, FSCLAS_KW.c_str(), theSecurityClassification);
+      kwl.add(prefix, FSCOP_KW.c_str(),  theCopyNumber);
+      kwl.add(prefix, FSCPYS_KW.c_str(), theNumberOfCopies);
+      kwl.add(prefix, ENCRYP_KW.c_str(), theEncryption);
+   }
+   
+   return result;
+}
+
+bool ossimNitfFileHeaderV2_X::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   // Note: Currently not looking up all fieds only ones that make sense.
+   
+   const char* lookup;
+   
+   lookup = kwl.find( prefix, OSTAID_KW);
+   if ( lookup )
+   {
+      setOriginatingStationId( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, FDT_KW);
+   if ( lookup )
+   {
+      setDate( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, FTITLE_KW);
+   if ( lookup )
+   {
+      setTitle( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, FSCLAS_KW);
+   if ( lookup )
+   {
+      setFileSecurityClassification( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, FSCODE_KW);
+   if ( lookup )
+   {
+      setCodeWords( ossimString(lookup) ); 
+   }
+   lookup = kwl.find( prefix, FSCTLH_KW);
+   if ( lookup )
+   {
+      setControlAndHandling( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, FSREL_KW);
+   if ( lookup )
+   {
+      setReleasingInstructions( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, FSCAUT_KW);
+   if ( lookup )
+   {
+      setClassificationAuthority( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, FSCTLN_KW);
+   if ( lookup )
+   {
+      setSecurityControlNumber( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, FSCOP_KW);
+   if ( lookup )
+   {
+      setCopyNumber( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, FSCPYS_KW);
+   if ( lookup )
+   {
+      setNumberOfCopies( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, ENCRYP_KW);
+   if ( lookup )
+   {
+      setEncryption( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, ONAME_KW);
+   if ( lookup )
+   {
+      setOriginatorsName( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, OPHONE_KW);
+   if ( lookup )
+   {
+      setOriginatorsPhone( ossimString(lookup) );
+   }
+
+   return true;
+}
+
+void ossimNitfFileHeaderV2_X::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimNitfFileHeader::getPropertyNames(propertyNames);
+   propertyNames.push_back(FILE_TYPE_KW);
+   propertyNames.push_back(VERSION_KW);
+   propertyNames.push_back(FHDR_KW);
+   propertyNames.push_back(CLEVEL_KW);
+   propertyNames.push_back(STYPE_KW);
+   propertyNames.push_back(OSTAID_KW);
+   propertyNames.push_back(FDT_KW);
+   propertyNames.push_back(FTITLE_KW);
+   propertyNames.push_back(FSCLAS_KW);
+   propertyNames.push_back(FSCODE_KW);
+   propertyNames.push_back(FSCTLH_KW);
+   propertyNames.push_back(FSREL_KW);
+   propertyNames.push_back(FSCAUT_KW);
+   propertyNames.push_back(FSCTLN_KW);
+   propertyNames.push_back(FSCOP_KW);
+   propertyNames.push_back(FSCPYS_KW);
+   propertyNames.push_back(ENCRYP_KW);
+   propertyNames.push_back(ONAME_KW);
+   propertyNames.push_back(OPHONE_KW);
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfGeoPositioningTag.cpp b/ossim/src/ossim/support_data/ossimNitfGeoPositioningTag.cpp
new file mode 100644
index 0000000..78c4d4b
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfGeoPositioningTag.cpp
@@ -0,0 +1,143 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfGeoPositioningTag.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/support_data/ossimNitfGeoPositioningTag.h>
+#include <cstring>
+#include <istream>
+#include <iostream>
+#include <iomanip>
+
+RTTI_DEF1(ossimNitfGeoPositioningTag, "ossimNitfGeoPositioningTag", ossimNitfRegisteredTag);
+
+ossimNitfGeoPositioningTag::ossimNitfGeoPositioningTag()
+   : ossimNitfRegisteredTag(std::string("GEOPSB"),  443)
+{
+   clearFields();
+}
+
+ossimNitfGeoPositioningTag::~ossimNitfGeoPositioningTag()
+{
+}
+
+void ossimNitfGeoPositioningTag::parseStream(std::istream& in)
+{
+   clearFields();
+   
+   in.read(theType, 3);
+   in.read(theCoordinateUnits, 3);
+   in.read(theGeodeticDatumName, 80);
+   in.read(theGeodeticDatumCode, 4);
+   in.read(theEllipsoidName, 80);
+   in.read(theEllipsoidCode, 3);
+   in.read(theVerticalDatumReference, 80);
+   in.read(theVerticalReferenceCode, 4);
+   in.read(theSoundingDatumName, 80);
+   in.read(theSoundingDatumCode, 4);
+   in.read(theZFalseOrigin, 15);
+   in.read(theGridCode, 3);
+   in.read(theGridDescription, 80);
+   in.read(theGridZoneNumber, 4);
+}
+
+void ossimNitfGeoPositioningTag::writeStream(std::ostream& out)
+{
+   out.write(theType, 3);
+   out.write(theCoordinateUnits, 3);
+   out.write(theGeodeticDatumName, 80);
+   out.write(theGeodeticDatumCode, 4);
+   out.write(theEllipsoidName, 80);
+   out.write(theEllipsoidCode, 3);
+   out.write(theVerticalDatumReference, 80);
+   out.write(theVerticalReferenceCode, 4);
+   out.write(theSoundingDatumName, 80);
+   out.write(theSoundingDatumCode, 4);
+   out.write(theZFalseOrigin, 15);
+   out.write(theGridCode, 3);
+   out.write(theGridDescription, 80);
+   out.write(theGridZoneNumber, 4);
+}
+
+void ossimNitfGeoPositioningTag::clearFields()
+{
+   memset(theType, ' ', 3);
+   memset(theCoordinateUnits, ' ', 3);
+   memset(theGeodeticDatumName, ' ', 80);
+   memset(theGeodeticDatumCode, ' ', 4);
+   memset(theEllipsoidName, ' ', 80);
+   memset(theEllipsoidCode, ' ', 3);
+   memset(theVerticalDatumReference, ' ', 80);
+   memset(theVerticalReferenceCode, ' ', 4);
+   memset(theSoundingDatumName, ' ', 80);
+   memset(theSoundingDatumCode, ' ', 4);
+   memset(theZFalseOrigin, '0', 15);
+   memset(theGridCode, ' ', 3);
+   memset(theGridDescription, ' ', 80);
+   memset(theGridZoneNumber, '0',  4);
+   
+   memcpy(theType, "MAP", 3);
+   memcpy(theCoordinateUnits, "M  ", 3);
+   memcpy(theGeodeticDatumName, "World Geodetic System 1984", 26);
+   memcpy(theGeodeticDatumCode, "WGE", 3);
+   memcpy(theEllipsoidName, "World Geodetic System 1984", 26);
+   memcpy(theEllipsoidCode, "WE", 2);
+   memcpy(theVerticalDatumReference, "Geodetic", 8);
+   memcpy(theVerticalReferenceCode, "GEOD", 4);
+   memcpy(theSoundingDatumName, "Mean Sea", 8);
+   memcpy(theSoundingDatumCode, "MSL", 3);
+
+   theType[3]                    = '\0';
+   theCoordinateUnits[3]         = '\0';
+   theGeodeticDatumName[80]      = '\0';
+   theGeodeticDatumCode[4]       = '\0';
+   theEllipsoidName[80]          = '\0';
+   theEllipsoidCode[3]           = '\0';
+   theVerticalDatumReference[80] = '\0';
+   theVerticalReferenceCode[4]   = '\0';
+   theSoundingDatumName[80]      = '\0';
+   theSoundingDatumCode[4]       = '\0';
+   theZFalseOrigin[15]           = '\0';
+   theGridCode[3]                = '\0';
+   theGridDescription[80]        = '\0';
+   theGridZoneNumber[4]          = '\0';
+   
+}
+
+std::ostream& ossimNitfGeoPositioningTag::print(
+   std::ostream& out, const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+   
+   out << setiosflags(std::ios::left)
+       << pfx << std::setw(24) << "CETAG:"
+       << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
+       << pfx << std::setw(24) << "TYP:" << theType << "\n"
+       << pfx << std::setw(24) << "UNI:" << theCoordinateUnits << "\n"
+       << pfx << std::setw(24) << "DAG:" << theGeodeticDatumName << "\n"
+       << pfx << std::setw(24) << "DCD:" << theGeodeticDatumCode << "\n"
+       << pfx << std::setw(24) << "ELL:" << theEllipsoidName << "\n"
+       << pfx << std::setw(24) << "ELC:" << theEllipsoidCode << "\n"
+       << pfx << std::setw(24) << "DVR:" << theVerticalDatumReference << "\n"
+       << pfx << std::setw(24) << "VDCDVR:" << theVerticalReferenceCode << "\n"
+       << pfx << std::setw(24) << "SDA:" << theSoundingDatumName << "\n"
+       << pfx << std::setw(24) << "VDCSDA:" << theSoundingDatumCode << "\n"
+       << pfx << std::setw(24) << "ZOR:" << theZFalseOrigin << "\n"
+       << pfx << std::setw(24) << "GRD:" << theGridCode << "\n"
+       << pfx << std::setw(24) << "GRN:" << theGridDescription << "\n"
+       << pfx << std::setw(24) << "ZNA:" << theGridZoneNumber << "\n";
+   
+   return out;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfHistoaTag.cpp b/ossim/src/ossim/support_data/ossimNitfHistoaTag.cpp
new file mode 100644
index 0000000..83a37cc
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfHistoaTag.cpp
@@ -0,0 +1,470 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Garrett Potts
+//
+// Description: HISTOA tag class definition.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimNitfHistoaTag.cpp 23245 2015-04-08 20:53:04Z rashadkm $
+
+#include <ossim/support_data/ossimNitfHistoaTag.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimString.h>
+#include <iomanip>
+
+ossimNitfHistoaProcessingEvent::ossimNitfHistoaProcessingEvent()
+{
+   clearFields();
+}
+
+ossim_uint32 ossimNitfHistoaProcessingEvent::getSizeInBytes()const
+{
+   ossim_uint32 sizeInBytes = (PDATE_SIZE + PSITE_SIZE + PAS_SIZE + NIPCOM_SIZE);
+
+   if ( (*m_nIpcom != '0') && m_comment.size() )
+   {
+      sizeInBytes += ( m_comment.size() * IPCOM_SIZE );
+   }
+
+   sizeInBytes += (IBPP_SIZE + IPVTYPE_SIZE + INBWC_SIZE + 
+                   DISP_FLAG_SIZE + ROT_FLAG_SIZE);
+
+   if(*m_rotFlag == '1')
+   {
+      sizeInBytes += ROT_ANGLE_SIZE;
+   }
+   
+   sizeInBytes += ASYM_FLAG_SIZE;
+   if(*m_asymFlag == '1')
+   {
+      sizeInBytes += (ZOOMROW_SIZE + ZOOMCOL_SIZE);
+   }
+   
+   sizeInBytes += ( PROJ_FLAG_SIZE + SHARP_FLAG_SIZE );
+   if(*m_sharpFlag == '1')
+   {
+      sizeInBytes += (SHARPFAM_SIZE + SHARPMEM_SIZE);
+   }
+
+   sizeInBytes += MAG_FLAG_SIZE;
+   if(*m_magFlag == '1')
+   {
+      sizeInBytes += MAG_LEVEL_SIZE;
+   }
+
+   sizeInBytes += DRA_FLAG_SIZE;
+   if(*m_draFlag == '1')
+   {
+      sizeInBytes += (DRA_MULT_SIZE + DRA_SUB_SIZE);
+   }
+
+   sizeInBytes += TTC_FLAG_SIZE;
+   if(*m_ttcFlag == '1')
+   {
+      sizeInBytes += (TTCFAM_SIZE + TTCMEM_SIZE);
+   }
+
+   sizeInBytes += DEVLUT_FLAG_SIZE + OBPP_SIZE + OPVTYPE_SIZE + OUTBWC_SIZE;
+
+   return sizeInBytes;
+}
+
+void ossimNitfHistoaProcessingEvent::parseStream(std::istream& in)
+{
+   clearFields();
+
+   in.read(m_pdate, PDATE_SIZE);
+   in.read(m_psite, PSITE_SIZE);
+   in.read(m_pas, PAS_SIZE);
+   in.read(m_nIpcom, NIPCOM_SIZE);
+   ossim_uint32 nIpcom = ossimString(m_nIpcom).toUInt32();
+   if(nIpcom < 10)
+   {
+      ossim_uint32 idx = 0;
+      for(;idx < nIpcom;++idx)
+      {
+         char tempBuf[IPCOM_SIZE+1];
+         in.read(tempBuf, IPCOM_SIZE);
+         tempBuf[IPCOM_SIZE] = '\0';
+      
+         // m_comment += std::string(tempBuf, tempBuf + 80);
+         
+         m_comment.push_back( std::string(tempBuf) );
+      }
+   }
+   in.read(m_ibpp, IBPP_SIZE);
+   in.read(m_ipvType, IPVTYPE_SIZE);
+   
+   in.read(m_inbwc, INBWC_SIZE);
+   in.read(m_dispFlag, DISP_FLAG_SIZE);
+   in.read(m_rotFlag, ROT_FLAG_SIZE);
+   if(*m_rotFlag =='1')
+   {
+      in.read(m_rotAngle, ROT_ANGLE_SIZE);
+   }
+
+   in.read(m_asymFlag, ASYM_FLAG_SIZE);
+   if(ossimString(m_asymFlag).toBool())
+   {
+      in.read(m_zoomRow, ZOOMROW_SIZE);
+      in.read(m_zoomCol, ZOOMCOL_SIZE);
+   }
+
+   in.read(m_projFlag, PROJ_FLAG_SIZE);   
+   in.read(m_sharpFlag, SHARP_FLAG_SIZE);
+   if(ossimString(m_sharpFlag).toBool())
+   {
+      in.read(m_sharpFam, SHARPFAM_SIZE);
+      in.read(m_sharpMem, SHARPMEM_SIZE);
+   }
+
+   in.read(m_magFlag, MAG_FLAG_SIZE);
+   if(ossimString(m_magFlag).toBool())
+   {
+      in.read(m_magLevel, MAG_LEVEL_SIZE);
+   }
+
+   in.read(m_draFlag, DRA_FLAG_SIZE);
+   if(ossimString(m_draFlag).toBool())
+   {
+      in.read(m_draMult, DRA_MULT_SIZE);
+      in.read(m_draSub, DRA_SUB_SIZE);
+   }
+
+   in.read(m_ttcFlag, TTC_FLAG_SIZE);
+   if(ossimString(m_ttcFlag).toBool())
+   {
+      in.read(m_ttcFam, TTCFAM_SIZE);
+      in.read(m_ttcMem, TTCMEM_SIZE);
+   }
+
+   in.read(m_devLutFlag, DEVLUT_FLAG_SIZE);
+   in.read(m_obpp, OBPP_SIZE);
+   in.read(m_opvType, OPVTYPE_SIZE);
+   in.read(m_outBwc, OUTBWC_SIZE);
+}
+
+void ossimNitfHistoaProcessingEvent::writeStream(std::ostream& out)
+{
+   out.write(m_pdate, PDATE_SIZE);
+   out.write(m_psite, PSITE_SIZE);
+   out.write(m_pas, PAS_SIZE);
+   out.write(m_nIpcom, NIPCOM_SIZE);
+   ossim_uint32 nIpcom = ossimString(m_nIpcom).toUInt32();
+   if( (nIpcom > 0) && (nIpcom < 10) )
+   {
+      for( ossim_uint32 i = 0; i < nIpcom; ++i )
+      {
+         // Should size check std::string or make set method that ensures 80 chars.
+         out.write( m_comment[i].data(), IPCOM_SIZE );
+      }
+   }
+   out.write(m_ibpp, IBPP_SIZE);
+   out.write(m_ipvType, IPVTYPE_SIZE);
+   
+   out.write(m_inbwc, INBWC_SIZE);
+   out.write(m_dispFlag, DISP_FLAG_SIZE);
+   out.write(m_rotFlag, ROT_FLAG_SIZE);
+   if(*m_rotFlag =='1')
+   {
+      out.write(m_rotAngle, ROT_ANGLE_SIZE);
+   }
+   out.write(m_asymFlag, ASYM_FLAG_SIZE);
+   if(*m_asymFlag == '1')
+   {
+      out.write(m_zoomRow, ZOOMROW_SIZE);
+      out.write(m_zoomCol, ZOOMCOL_SIZE);
+   }
+   out.write(m_projFlag, PROJ_FLAG_SIZE);
+   out.write(m_sharpFlag, SHARP_FLAG_SIZE);
+   if(*m_sharpFlag == '1')
+   {
+      out.write(m_sharpFam, SHARPFAM_SIZE);
+      out.write(m_sharpMem, SHARPMEM_SIZE);
+   }
+   out.write(m_magFlag, MAG_FLAG_SIZE);
+   if(*m_magFlag == '1')
+   {
+      out.write(m_magLevel, MAG_LEVEL_SIZE);
+   }
+   out.write(m_draFlag, DRA_FLAG_SIZE);
+   if(*m_draFlag == '1')
+   {
+      out.write(m_draMult, DRA_MULT_SIZE);
+      out.write(m_draSub, DRA_SUB_SIZE);
+   }
+   out.write(m_ttcFlag, TTC_FLAG_SIZE);
+   if(*m_ttcFlag == '1')
+   {
+      out.write(m_ttcFam, TTCFAM_SIZE);
+      out.write(m_ttcMem, TTCMEM_SIZE);
+   }
+   out.write(m_devLutFlag, DEVLUT_FLAG_SIZE);
+   out.write(m_obpp, OBPP_SIZE);
+   out.write(m_opvType, OPVTYPE_SIZE);
+   out.write(m_outBwc, OUTBWC_SIZE);
+}
+
+std::ostream& ossimNitfHistoaProcessingEvent::print(std::ostream& out,
+                                                    const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += ".";
+   
+   out << setiosflags(std::ios::left)
+   << pfx << std::setw(24) << "PDATE:"     << m_pdate << "\n"
+   << pfx << std::setw(24) << "PSITE:"  << m_psite << "\n"
+   << pfx << std::setw(24) << "PAS:"  << m_pas << "\n"
+   << pfx << std::setw(24) << "NIPCOM:"   << m_nIpcom << "\n";
+   ossim_uint32 nIpcom = ossimString(m_nIpcom).toUInt32();
+   if( ( nIpcom > 0 ) && ( nIpcom < 10 ) )
+   {
+      for( ossim_uint32 i = 0; i < nIpcom; ++i )
+      {
+         std::string s = "IPCOM";
+         
+         //---
+         // NOTE:
+         // Doing  s += ossimString::toString( i ).string() core dumping linux gcc version 4.7.0.
+         //---
+         std::string s2 = ossimString::toString( i ).string();
+         s += s2;
+         s += ":";
+         out << pfx << std::setw(24) << s.c_str();
+         out.write( m_comment[i].data(), IPCOM_SIZE );
+         out << "\n";
+      }
+   }
+   
+   out << setiosflags(std::ios::left)
+   << pfx << std::setw(24) << "IBPP:"     << m_ibpp << "\n"
+   << pfx << std::setw(24) << "IPVTYPE:"     << m_ipvType << "\n"
+   << pfx << std::setw(24) << "INBWC:"     << m_inbwc << "\n"
+   << pfx << std::setw(24) << "DISP_FLAG:"     << m_dispFlag << "\n"
+   << pfx << std::setw(24) << "ROT_FLAG:"     << m_rotFlag << "\n";
+   if(*m_rotFlag == '1')
+   {
+      out<< pfx << std::setw(24) << "ROT_ANGLE:" << m_rotAngle << "\n";
+   }
+
+   out<< pfx << std::setw(24) << "ASYM_FLAG:" << m_asymFlag << "\n";
+   
+   if(*m_asymFlag=='1')
+   {
+      out<< pfx << std::setw(24) << "ZOOMROW:" << m_zoomRow << "\n";
+      out<< pfx << std::setw(24) << "ZOOMCOL:" << m_zoomCol << "\n";
+   }
+   out<< pfx << std::setw(24) << "PROJ_FLAG:" << m_projFlag << "\n";
+   out<< pfx << std::setw(24) << "SHARP_FLAG:" << *m_sharpFlag << "\n";
+   if(*m_sharpFlag == '1')
+   {
+      out<< pfx << std::setw(24) << "SHARPFAM:" << m_sharpFam << "\n";
+      out<< pfx << std::setw(24) << "SHARPMEM:" << m_sharpMem << "\n";
+   }
+   out<< pfx << std::setw(24) << "MAG_FLAG:" << *m_magFlag << "\n";
+   if(*m_magFlag  == '1')
+   {
+      out<< pfx << std::setw(24) << "MAG_LEVEL:" << m_magLevel << "\n";
+   }
+   out<< pfx << std::setw(24) << "DRA_FLAG:" << *m_draFlag << "\n";
+   if(*m_draFlag=='1')
+   {
+      out<< pfx << std::setw(24) << "DRA_MULT:" << m_draMult << "\n";
+      out<< pfx << std::setw(24) << "DRA_SUB:" << m_draSub << "\n";
+   }
+   out<< pfx << std::setw(24) << "TTC_FLAG:" << *m_ttcFlag << "\n";
+   if(*m_ttcFlag == '1')
+   {
+      out<< pfx << std::setw(24) << "TTCFAM:" << m_ttcFam << "\n";
+      out<< pfx << std::setw(24) << "TTCMEM:" << m_ttcMem << "\n";
+   }
+   out<< pfx << std::setw(24) << "DEVLUT_FLAG:" << *m_devLutFlag << "\n";
+   out<< pfx << std::setw(24) << "OBPP:" << m_obpp << "\n";
+   out<< pfx << std::setw(24) << "OPVTYPE:" << m_opvType << "\n";
+   out<< pfx << std::setw(24) << "OUTBWC:" << m_outBwc << "\n";
+   
+   return out;
+}
+
+void ossimNitfHistoaProcessingEvent::clearFields()
+{
+   memset(m_pdate, ' ', PDATE_SIZE+1);
+   memset(m_psite, ' ', PSITE_SIZE+1);
+   memset(m_pas, ' ', PAS_SIZE+1);
+   memset(m_nIpcom, ' ', NIPCOM_SIZE+1);
+   memset(m_ibpp, ' ', IBPP_SIZE+1);
+   memset(m_ipvType, ' ', IPVTYPE_SIZE+1);
+   
+   memset(m_inbwc, ' ', INBWC_SIZE);
+   memset(m_dispFlag, 0, DISP_FLAG_SIZE);
+   memset(m_rotFlag, 0, DISP_FLAG_SIZE);
+   memset(m_rotAngle, 0, ROT_ANGLE_SIZE);
+   m_rotAngle[3]='.';
+   memset(m_projFlag, 0, PROJ_FLAG_SIZE);
+   memset(m_asymFlag, 0, ASYM_FLAG_SIZE);
+   memset(m_zoomRow, 0, ZOOMROW_SIZE);
+   m_zoomRow[2]='.';
+   memset(m_zoomCol, 0, ZOOMCOL_SIZE);
+   m_zoomCol[2]='.';
+   memset(m_sharpFlag, 0, SHARP_FLAG_SIZE);
+   memset(m_sharpFam, ' ', SHARPFAM_SIZE);
+   memset(m_sharpMem, ' ', SHARPMEM_SIZE);
+   memset(m_magFlag, 0, MAG_FLAG_SIZE);
+   memset(m_magLevel, ' ', MAG_LEVEL_SIZE);
+   memset(m_draFlag, 0, DRA_FLAG_SIZE);
+   memset(m_draMult, ' ', DRA_MULT_SIZE);
+   
+   memset(m_draSub, ' ', DRA_SUB_SIZE);
+   memset(m_ttcFlag, 0, TTC_FLAG_SIZE);
+   memset(m_ttcFam, ' ', TTCFAM_SIZE);
+   memset(m_ttcMem, ' ', TTCMEM_SIZE);
+   memset(m_obpp, ' ', OBPP_SIZE);
+   memset(m_opvType, ' ', OPVTYPE_SIZE);
+   memset(m_outBwc, ' ', OUTBWC_SIZE);
+   
+   m_pdate[PDATE_SIZE]     = '\0';
+   m_psite[PSITE_SIZE]     = '\0';
+   m_pas[PAS_SIZE]         = '\0';
+   m_nIpcom[NIPCOM_SIZE]   = '\0';
+   m_ibpp[IBPP_SIZE]       = '\0';
+   m_ipvType[IPVTYPE_SIZE] = '\0';
+   
+   m_comment.clear();
+
+   m_inbwc[INBWC_SIZE] = '\0';
+   m_dispFlag[DISP_FLAG_SIZE] = '\0';
+   m_rotFlag[ROT_FLAG_SIZE] = '\0';
+   m_rotAngle[ROT_ANGLE_SIZE] = '\0';
+   m_projFlag[PROJ_FLAG_SIZE] = '\0';
+   m_asymFlag[ASYM_FLAG_SIZE] = '\0';
+   m_zoomRow[ZOOMROW_SIZE] = '\0';
+   m_zoomCol[ZOOMCOL_SIZE] = '\0';
+   m_sharpFlag[SHARP_FLAG_SIZE] = '\0';
+   m_sharpFam[SHARPFAM_SIZE] = '\0';
+   m_sharpMem[SHARPMEM_SIZE] = '\0';
+   m_magFlag[MAG_FLAG_SIZE] = '\0';
+   m_magLevel[MAG_LEVEL_SIZE] = '\0';
+   m_draFlag[DRA_FLAG_SIZE] = '\0';
+   m_draMult[DRA_MULT_SIZE] = '\0';
+   m_draSub[DRA_SUB_SIZE] = '\0';
+   m_ttcFlag[TTC_FLAG_SIZE] = '\0';
+   m_ttcFam[TTCFAM_SIZE] = '\0';
+   m_ttcMem[TTCMEM_SIZE] = '\0';
+   m_obpp[OBPP_SIZE] = '\0';
+   m_opvType[OPVTYPE_SIZE] = '\0';
+   m_outBwc[OUTBWC_SIZE] = '\0';
+}
+
+ossimNitfHistoaTag::ossimNitfHistoaTag()
+   : ossimNitfRegisteredTag( std::string("HISTOA"), 0 )
+{
+}
+
+void ossimNitfHistoaTag::parseStream(std::istream& in)
+{
+   clearFields();
+
+   in.read(m_systype, SYSTYPE_SIZE);
+   in.read(m_pc, PC_SIZE);
+   in.read(m_pe, PE_SIZE);
+   in.read(m_remapFlag, REMAP_FLAG_SIZE);
+   in.read(m_lutid, LUTID_SIZE);
+   in.read(m_nEvents, NEVENTS_SIZE);
+
+   ossim_uint32 nEvents = ossimString(m_nEvents).toUInt32();
+   if(nEvents < 100)
+   {
+      for(ossim_uint32 idx = 0; idx < nEvents; ++idx)
+      {
+         ossimNitfHistoaProcessingEvent evt;
+         evt.parseStream(in);
+         m_eventList.push_back(evt);
+      }
+   }
+
+   // Set the tag length in base for the getTagLenth method.
+   setTagLength( getSizeInBytes() );
+}
+
+void ossimNitfHistoaTag::writeStream(std::ostream& out)
+{
+   out.write(m_systype, SYSTYPE_SIZE);
+   out.write(m_pc, PC_SIZE);
+   out.write(m_pe, PE_SIZE);
+   out.write(m_remapFlag, REMAP_FLAG_SIZE);
+   out.write(m_lutid, LUTID_SIZE);
+   out.write(m_nEvents, NEVENTS_SIZE);
+   ossim_uint32 idx = 0;
+   ossim_uint32 nEvents = ossimString(m_nEvents).toUInt32();
+   if(nEvents < 100)
+   {
+      for(;idx < nEvents; ++idx)
+      {
+         m_eventList[idx].writeStream(out);
+      }
+   }
+}
+
+ossim_uint32 ossimNitfHistoaTag::getSizeInBytes()const
+{
+   // Make this dynamic for constructed HISTOA tags instead of using theTagLength.
+   ossim_uint32 sizeInBytes = (SYSTYPE_SIZE + PC_SIZE + PE_SIZE + 
+                               REMAP_FLAG_SIZE + LUTID_SIZE + NEVENTS_SIZE);
+
+   for ( ossim_uint32 idx = 0; idx < m_eventList.size(); ++idx)
+   {
+      sizeInBytes += m_eventList[idx].getSizeInBytes();
+   }
+
+   return sizeInBytes;
+}
+
+void ossimNitfHistoaTag::clearFields()
+{
+   memset(m_systype,     ' ', SYSTYPE_SIZE);
+   memset(m_pc,     ' ', PC_SIZE);
+   memset(m_pe,     ' ', PE_SIZE);
+   memset(m_remapFlag,     ' ', REMAP_FLAG_SIZE);
+   memset(m_lutid,     '0', LUTID_SIZE);
+   memset(m_nEvents,     '0', NEVENTS_SIZE);
+
+   m_systype[SYSTYPE_SIZE] = '\0';
+   m_pc[PC_SIZE] = '\0';
+   m_pe[PE_SIZE] = '\0';
+   m_remapFlag[REMAP_FLAG_SIZE] = '\0';
+   m_lutid[LUTID_SIZE] = '\0';
+   m_nEvents[NEVENTS_SIZE] = '\0';
+   m_eventList.clear();
+
+   // Clear the tag length in base.
+   setTagLength(0);
+}
+
+std::ostream& ossimNitfHistoaTag::print(std::ostream& out,
+                                        const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+   
+   out << setiosflags(std::ios::left)
+   << pfx << std::setw(24) << "CETAG:"
+   << getTagName() << "\n"
+   << pfx << std::setw(24) << "CEL:"
+   << getSizeInBytes() << "\n"
+   << pfx << std::setw(24) << "SYSTYPE:"     << m_systype << "\n"
+   << pfx << std::setw(24) << "PC:"  << m_pc << "\n"
+   << pfx << std::setw(24) << "PE:"  << m_pe << "\n"
+   << pfx << std::setw(24) << "REMAP_FLAG:"   << m_remapFlag << "\n"
+   << pfx << std::setw(24) << "LUTID:"     << m_lutid << "\n"
+   << pfx << std::setw(24) << "NEVENTS:"     << m_nEvents << "\n";
+   for ( ossim_uint32 idx = 0; idx < m_eventList.size(); ++idx )
+   {
+      m_eventList[idx].print(out, pfx+"EVENT"+ossimString::toString(idx));
+   }
+   
+   return out;
+}
+
diff --git a/src/ossim/support_data/ossimNitfIchipbTag.cpp b/ossim/src/ossim/support_data/ossimNitfIchipbTag.cpp
similarity index 100%
rename from src/ossim/support_data/ossimNitfIchipbTag.cpp
rename to ossim/src/ossim/support_data/ossimNitfIchipbTag.cpp
diff --git a/ossim/src/ossim/support_data/ossimNitfImageBand.cpp b/ossim/src/ossim/support_data/ossimNitfImageBand.cpp
new file mode 100644
index 0000000..907d1fb
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfImageBand.cpp
@@ -0,0 +1,27 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfImageBand.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/support_data/ossimNitfImageBand.h>
+#include <ossim/support_data/ossimNitfImageLut.h>
+#include <ossim/base/ossimString.h>
+
+RTTI_DEF1(ossimNitfImageBand, "ossimNitfImageBand", ossimObject);
+
+ossimNitfImageBand::ossimNitfImageBand()
+{
+}
+
+ossimNitfImageBand::~ossimNitfImageBand()
+{
+}
+
+
diff --git a/ossim/src/ossim/support_data/ossimNitfImageBandV2_0.cpp b/ossim/src/ossim/support_data/ossimNitfImageBandV2_0.cpp
new file mode 100644
index 0000000..2212c8e
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfImageBandV2_0.cpp
@@ -0,0 +1,223 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfImageBandV2_0.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <sstream>
+#include <iostream>
+#include <iomanip>
+#include <ossim/support_data/ossimNitfImageBandV2_0.h>
+#include <ossim/base/ossimString.h>
+
+ossimNitfImageBandV2_0::ossimNitfImageBandV2_0()
+{
+   clearFields();
+}
+
+ossimNitfImageBandV2_0::~ossimNitfImageBandV2_0()
+{
+}
+
+void ossimNitfImageBandV2_0::parseStream(std::istream& in)
+{
+   theLookupTables.clear();
+   if(in)
+   {      
+      theLookupTables.clear();
+      in.read(theBandRepresentation, 2);
+      in.read(theBandSignificance, 6);
+      in.read(theBandImageFilterCondition, 1);
+      in.read(theBandStandardImageFilterCode, 3);
+      in.read(theBandNumberOfLuts, 1);
+
+      long numberOfLuts = ossimString(theBandNumberOfLuts).toLong();
+
+      if(numberOfLuts > 0)
+      {
+         theLookupTables.resize(numberOfLuts);
+         in.read(theBandNumberOfLutEntries, 5);
+         
+         ossim_uint32 numberOfLutsIndex = numberOfLuts;
+         ossim_uint32 numberOfLutEntries = ossimString(theBandNumberOfLutEntries).toLong();
+         ossim_uint32 idx = 0;
+
+         while(idx < numberOfLutsIndex)
+         {
+            theLookupTables[idx] = new ossimNitfImageLutV2_0; 
+            theLookupTables[idx]->setNumberOfEntries(numberOfLutEntries);
+            theLookupTables[idx]->parseStream(in);
+            
+            ++idx;
+         }
+      }
+   }   
+}
+
+void ossimNitfImageBandV2_0::writeStream(std::ostream& out)
+{
+   out.write(theBandRepresentation, 2);
+   out.write(theBandSignificance, 6);
+   out.write(theBandImageFilterCondition, 1);
+   out.write(theBandStandardImageFilterCode, 3);
+   out.write(theBandNumberOfLuts, 1);
+
+   if(ossimString(theBandNumberOfLuts).toUInt32() > 0)
+   {
+      // lut output not supported currently
+   }
+}
+
+std::ostream& ossimNitfImageBandV2_0::print(std::ostream& out,
+                                            const std::string& prefix,
+                                            ossim_uint32 band)const
+{
+   std::ostringstream os;
+   os << std::setw(3) << std::setfill('0') << (band+1) << ":";
+
+   ossimString tmpStr = "IREPBAND";
+   tmpStr += os.str();
+   
+   out << prefix << std::setw(24)
+       << tmpStr << theBandRepresentation << "\n";
+
+   tmpStr = "ISUBCAT";
+   tmpStr += os.str();
+   
+   out << prefix << std::setw(24)
+       << tmpStr << theBandSignificance << "\n";
+
+   tmpStr = "IFC";
+   tmpStr += os.str();
+   
+   out << prefix << std::setw(24)
+       << tmpStr << theBandImageFilterCondition << "\n";
+
+   tmpStr = "IMFLT";
+   tmpStr += os.str();
+
+   out << prefix << std::setw(24)
+       << tmpStr << theBandStandardImageFilterCode << "\n";
+
+   tmpStr = "NLUTS";
+   tmpStr += os.str();
+
+   out << prefix << std::setw(24)
+       << tmpStr << theBandNumberOfLuts << "\n";
+
+   tmpStr = "NELUTS";
+   tmpStr += os.str();
+
+   out << prefix << std::setw(24)
+       << tmpStr << theBandNumberOfLutEntries << "\n";
+
+   for(ossim_uint32 idx = 0; idx < theLookupTables.size(); ++idx)
+   {
+      out << *theLookupTables[idx] << std::endl;
+   }
+   
+   return out;
+}
+
+ossim_uint32 ossimNitfImageBandV2_0::getNumberOfLuts()const
+{
+   return static_cast<ossim_uint32>(theLookupTables.size());
+}
+
+const ossimRefPtr<ossimNitfImageLut> ossimNitfImageBandV2_0::getLut(ossim_uint32 idx)const
+{
+   if(idx < getNumberOfLuts())
+   {
+      return theLookupTables[idx];
+   }
+   
+   return NULL;
+}
+
+ossimRefPtr<ossimNitfImageLut> ossimNitfImageBandV2_0::getLut(ossim_uint32 idx)
+{
+   if(idx < getNumberOfLuts())
+   {
+      return theLookupTables[idx];
+   }
+   
+   return NULL;
+}
+
+ossimString ossimNitfImageBandV2_0::getBandRepresentation()const
+{
+   return ossimString(theBandRepresentation);
+}
+
+void ossimNitfImageBandV2_0::setBandRepresentation(const ossimString& rep)
+{
+   std::ostringstream out;
+
+   out << std::setw(2)
+       << std::setfill(' ')
+       << std::setiosflags(std::ios::left)
+       << rep.c_str();
+
+   memcpy(theBandRepresentation, out.str().c_str(), 2);
+}
+
+ossimString ossimNitfImageBandV2_0::getBandSignificance()const
+{
+   return ossimString(theBandSignificance);
+}
+
+void ossimNitfImageBandV2_0::setBandSignificance(const ossimString& rep)
+{
+   std::ostringstream out;
+   
+   out << std::setw(6)
+       << std::setfill(' ')
+       << rep.c_str();
+
+   memcpy(theBandSignificance, out.str().c_str(), 6);
+}
+
+void ossimNitfImageBandV2_0::clearFields()
+{
+   memset(theBandRepresentation, ' ', 2);
+   memset(theBandSignificance, ' ', 6);
+   memset(theBandImageFilterCondition, 'N', 1);
+   memset(theBandStandardImageFilterCode, ' ', 3);
+   memset(theBandNumberOfLuts, 0, 1);
+   memset(theBandNumberOfLutEntries, ' ', 5);
+   
+   theLookupTables.clear();
+   theBandRepresentation[2] = '\0';
+   theBandSignificance[6] = '\0';
+   theBandImageFilterCondition[1] = '\0';
+   theBandStandardImageFilterCode[3] = '\0';
+   theBandNumberOfLuts[1] = '\0';
+   theBandNumberOfLutEntries[5] = '\0';
+}
+
+void ossimNitfImageBandV2_0::printLookupTables(std::ostream& out)const
+{
+   std::vector<ossimRefPtr<ossimNitfImageLut> >::const_iterator tables;
+
+   tables = theLookupTables.begin();
+   while(tables != theLookupTables.end())
+   {
+      if((*tables).valid())
+      {
+         out << *((*tables).get());
+      }
+      ++tables;
+      if(tables != theLookupTables.end())
+      {
+         out << std::endl;
+      }
+   }
+}
+
diff --git a/src/ossim/support_data/ossimNitfImageBandV2_1.cpp b/ossim/src/ossim/support_data/ossimNitfImageBandV2_1.cpp
similarity index 100%
rename from src/ossim/support_data/ossimNitfImageBandV2_1.cpp
rename to ossim/src/ossim/support_data/ossimNitfImageBandV2_1.cpp
diff --git a/ossim/src/ossim/support_data/ossimNitfImageDataMaskV2_1.cpp b/ossim/src/ossim/support_data/ossimNitfImageDataMaskV2_1.cpp
new file mode 100644
index 0000000..1800f4a
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfImageDataMaskV2_1.cpp
@@ -0,0 +1,79 @@
+//*******************************************************************
+// Copyright (C) 2007 Ball Aerspace & Technologies Corp 
+//
+// LICENSE: See top level LICENSE.txt file.
+// 
+// Author: Lucas Eckels
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: $
+
+#include <ossim/support_data/ossimNitfImageDataMaskV2_1.h>
+#include <ossim/base/ossimEndian.h>
+
+ossimNitfImageDataMaskV2_1::ossimNitfImageDataMaskV2_1() : theBlockLength(0)
+{
+}
+
+void ossimNitfImageDataMaskV2_1::setBlockCount(ossim_uint32 blockCount)
+{
+   theIncludedBlocks.resize(blockCount, true);
+}
+
+void ossimNitfImageDataMaskV2_1::setBlockLengthInBytes(ossim_uint32 blockLength)
+{
+   theBlockLength = blockLength;
+}
+
+void ossimNitfImageDataMaskV2_1::setIncludeBlock(ossim_uint32 blockNumber, bool included)
+{
+   if (blockNumber < theIncludedBlocks.size())
+   {
+      theIncludedBlocks[blockNumber] = included;
+   }
+}
+
+void ossimNitfImageDataMaskV2_1::writeStream(std::ostream &out)
+{
+   ossimEndian endian;
+
+   ossim_uint32 imdatoff = 4 + 2 + 2 + 2 + 4 * theIncludedBlocks.size();
+   ossim_uint16 bmrlnth = 4; // only support band mask
+   ossim_uint16 tmrlnth = 0;
+   ossim_uint16 tpxcdlnth = 0;
+
+   if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
+   {
+      endian.swap(imdatoff);
+      endian.swap(bmrlnth);
+      endian.swap(tmrlnth);
+      endian.swap(tpxcdlnth);
+   }
+
+   out.write(reinterpret_cast<char*>(&imdatoff), sizeof(imdatoff));
+   out.write(reinterpret_cast<char*>(&bmrlnth), sizeof(bmrlnth));
+   out.write(reinterpret_cast<char*>(&tmrlnth), sizeof(tmrlnth));
+   out.write(reinterpret_cast<char*>(&tpxcdlnth), sizeof(tpxcdlnth));
+
+   ossim_uint32 position = 0;
+   // Band Masks
+   for (std::vector<bool>::const_iterator iter = theIncludedBlocks.begin();
+      iter != theIncludedBlocks.end(); ++iter)
+   {
+      ossim_uint32 offset = 0xFFFFFFFF;
+      if (*iter)
+      {
+         offset = position;
+         position += theBlockLength;
+      }
+      if (endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
+      {
+         endian.swap(offset);
+      }
+      out.write(reinterpret_cast<char*>(&offset), sizeof(offset));
+   }
+
+   // Pad pixels not supported, always set to length 0, so don't need to write anything
+}
diff --git a/ossim/src/ossim/support_data/ossimNitfImageHeader.cpp b/ossim/src/ossim/support_data/ossimNitfImageHeader.cpp
new file mode 100644
index 0000000..c1dfa95
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfImageHeader.cpp
@@ -0,0 +1,400 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfImageHeader.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cmath> /* for fmod */
+#include <iomanip>
+#include <sstream>
+
+#include <ossim/support_data/ossimNitfImageHeader.h>
+#include <ossim/base/ossimContainerProperty.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimNotifyContext.h>
+
+RTTI_DEF2(ossimNitfImageHeader,
+          "ossimNitfImageHeader",
+          ossimObject,
+          ossimPropertyInterface)
+static const char* TAGS_KW = "tags";
+ossimNitfImageHeader::ossimNitfImageHeader()
+{
+}
+
+ossimNitfImageHeader::~ossimNitfImageHeader()
+{
+}
+
+bool ossimNitfImageHeader::getTagInformation(ossimNitfTagInformation& tagInfo,
+                                             const ossimString& tagName)const
+{
+   if(theTagList.size())
+   {
+      for(ossim_uint32 idx = 0; idx < theTagList.size(); ++idx)
+      {
+         if(theTagList[idx].getTagName() == tagName)
+         {
+            tagInfo = theTagList[idx];
+            return true;
+         }
+      }
+   }
+   
+   return false;
+}
+
+bool ossimNitfImageHeader::getTagInformation(ossimNitfTagInformation& tag,
+                                             ossim_uint32 idx)const
+{
+   bool result = false;
+   
+   if(idx < theTagList.size())
+   {
+      tag = theTagList[idx];
+      result = true;
+   }
+   
+   return result;
+}
+
+ossimRefPtr<ossimNitfRegisteredTag> ossimNitfImageHeader::getTagData(
+   const ossimString& tagName)
+{
+   if(theTagList.size())
+   {
+      for(ossim_uint32 idx = 0; idx < theTagList.size(); ++idx)
+      {
+         if(theTagList[idx].getTagName() == tagName)
+         {
+            return theTagList[idx].getTagData();
+         }
+      }
+   }
+
+   return ossimRefPtr<ossimNitfRegisteredTag>();
+}
+   
+const ossimRefPtr<ossimNitfRegisteredTag> ossimNitfImageHeader::getTagData(
+   const ossimString& tagName) const
+{
+   if(theTagList.size())
+   {
+      for(ossim_uint32 idx = 0; idx < theTagList.size(); ++idx)
+      {
+         if(theTagList[idx].getTagName() == tagName)
+         {
+            return theTagList[idx].getTagData();
+         }
+      }
+   }
+   
+   return ossimRefPtr<ossimNitfRegisteredTag>();
+}
+
+ossim_uint32 ossimNitfImageHeader::getNumberOfTags()const
+{
+   return static_cast<ossim_uint32>(theTagList.size());
+}
+
+void ossimNitfImageHeader::addTag(const ossimNitfTagInformation& tag, bool unique)
+{
+   if(unique)
+   {
+      removeTag(tag.getTagName());
+   }
+   theTagList.push_back(tag);
+}
+
+void ossimNitfImageHeader::removeTag(const ossimString& tagName)
+{
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx < theTagList.size(); ++idx)
+   {
+      if(theTagList[idx].getTagName() == tagName)
+      {
+         theTagList.erase(theTagList.begin() + idx);
+         return;
+      }
+   }
+}
+
+bool ossimNitfImageHeader::isSameAs(const ossimNitfImageHeader* hdr) const
+{
+   if (!hdr) return false;
+   
+   return ( (isCompressed() == hdr->isCompressed()) &&
+            (getNumberOfRows() == hdr->getNumberOfRows()) &&
+            (getNumberOfBands() == hdr->getNumberOfBands()) &&
+            (getNumberOfCols() == hdr->getNumberOfCols()) &&
+            (getNumberOfBlocksPerRow() == hdr->getNumberOfBlocksPerRow()) &&
+            (getNumberOfBlocksPerCol() == hdr->getNumberOfBlocksPerCol()) &&
+            (getNumberOfPixelsPerBlockHoriz() ==
+             hdr->getNumberOfPixelsPerBlockHoriz()) &&
+            (getNumberOfPixelsPerBlockVert() ==
+             hdr->getNumberOfPixelsPerBlockVert()) &&
+            (getBitsPerPixelPerBand() == hdr->getBitsPerPixelPerBand()) &&
+            (getImageRect() == hdr->getImageRect()) &&
+            (getIMode() == hdr->getIMode()) &&
+            (getCoordinateSystem() == hdr->getCoordinateSystem()) &&
+            (getGeographicLocation() == hdr->getGeographicLocation()) );
+}
+
+
+void ossimNitfImageHeader::setProperty(ossimRefPtr<ossimProperty> /* property */)
+{
+}
+
+ossimRefPtr<ossimProperty> ossimNitfImageHeader::getProperty(const ossimString& name)const
+{
+   ossimProperty* result = 0;
+
+   if(name == TAGS_KW)
+   {
+      ossim_uint32 idxMax = getNumberOfTags();
+      if(idxMax > 0)
+      {
+         ossimContainerProperty* containerProperty = new ossimContainerProperty;
+         containerProperty->setName(name);
+         ossim_uint32 idx = 0;
+
+         result = containerProperty;
+         for(idx = 0; idx < idxMax; ++idx)
+         {
+            ossimNitfTagInformation tagInfo;
+            getTagInformation(tagInfo, idx);
+            
+            const ossimRefPtr<ossimNitfRegisteredTag> tagData = tagInfo.getTagData();
+            if(tagData.valid())
+            {
+               ossimContainerProperty* containerPropertyTag = new ossimContainerProperty;
+               containerPropertyTag->setName(tagInfo.getTagName());
+               std::vector<ossimRefPtr<ossimProperty> > propertyList;
+               tagData->getPropertyList(propertyList);
+               
+               containerPropertyTag->addChildren(propertyList);
+               containerProperty->addChild(containerPropertyTag);
+            }
+            else
+            {
+               containerProperty->addStringProperty(tagInfo.getTagName(), "", true);
+            }
+         }
+      }
+   }
+   
+   return result;
+}
+
+void ossimNitfImageHeader::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   propertyNames.push_back(TAGS_KW);
+  
+}
+
+ossim_uint32 ossimNitfImageHeader::getTotalTagLength()const
+{
+   ossim_uint32 tagLength = 0;
+   
+   for(ossim_uint32 i = 0; i < theTagList.size(); ++i)
+   {
+      tagLength += theTagList[i].getTotalTagLength();
+   }
+
+   return tagLength;
+}
+
+std::ostream& ossimNitfImageHeader::printTags(std::ostream& out,
+                                              const std::string& prefix)const
+{
+   for(ossim_uint32 i = 0; i < theTagList.size(); ++i)
+   {
+      ossimRefPtr<ossimNitfRegisteredTag> tag = theTagList[i].getTagData();
+      if (tag.valid())
+      {
+         tag->print(out, prefix);
+      }
+   }
+   return out;
+}
+
+void ossimNitfImageHeader::getMetadata(ossimKeywordlist& kwl,
+                                       const char* prefix) const
+{
+   kwl.add(prefix, "source",
+           getImageSource().c_str(),
+           false);
+   kwl.add(prefix,
+           "image_date",
+           getAcquisitionDateMonthDayYear().c_str(),
+           false);
+   kwl.add(prefix,
+           "image_title",
+           getTitle().c_str(),
+           false);
+}
+
+bool ossimNitfImageHeader::hasLut() const
+{
+   bool result = false;
+
+   const ossim_uint32 BANDS = static_cast<ossim_uint32>(getNumberOfBands());
+   for (ossim_uint32 band = 0; band < BANDS; ++band)
+   {
+      const ossimRefPtr<ossimNitfImageBand> imgBand = getBandInformation(band);
+      if(imgBand.valid())
+      {
+         ossim_uint32 luts = imgBand->getNumberOfLuts();
+         if(luts > 0)
+         {
+            if(imgBand->getLut(0).valid())
+            {
+               result = true;
+               break;
+            }
+         }
+      }
+   }
+   
+   return result;
+}
+
+ossimRefPtr<ossimNBandLutDataObject> ossimNitfImageHeader::createLut(
+   ossim_uint32 bandIdx)const
+{
+   ossimRefPtr<ossimNBandLutDataObject> result;
+   
+   if(bandIdx < (ossim_uint32)getNumberOfBands())
+   {
+      const ossimRefPtr<ossimNitfImageBand> band = getBandInformation(bandIdx);
+      if(band.valid())
+      {
+         ossim_uint32 bands = band->getNumberOfLuts();
+         if(bands > 0)
+         {
+            if(band->getLut(0).valid())
+            {
+               ossim_uint32 entries = band->getLut(0)->getNumberOfEntries();
+               
+               result = new ossimNBandLutDataObject();
+               result->create(entries, band->getNumberOfLuts());
+               ossim_uint32 bIdx;
+               ossim_uint32 entryIdx;
+
+               for(bIdx = 0; bIdx < bands; ++bIdx)
+               {
+                  const ossimRefPtr<ossimNitfImageLut> lut = band->getLut(bIdx);
+                  if(lut.valid())
+                  {
+                     for(entryIdx = 0; entryIdx < entries; ++entryIdx)
+                     {
+                        (*result)[entryIdx][bIdx] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(lut->getValue(entryIdx));
+                     }
+                  }
+               }
+            }
+         }
+      }
+   }
+
+   return result;
+}
+
+
+void ossimNitfImageHeader::checkForGeographicTiePointTruncation(
+   const ossimDpt& tie) const
+{
+   // One arc second in decimal degrees.
+   const ossim_float64 ARC_SECOND = 1.0/3600.0;
+
+   // Very small number.
+   const ossim_float64 FUDGE_FACTOR = 0.000000001;
+
+   // Remainder portion of latitude divided by an arc second.
+   ossim_float64 y = std::fmod(tie.y, ARC_SECOND);
+
+   // Remainder portion of longitue divided by an arc second.
+   ossim_float64 x = std::fmod(tie.x, ARC_SECOND);
+
+   if ( (std::fabs(y) > FUDGE_FACTOR) || (std::fabs(x) > FUDGE_FACTOR) )
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimNitfImageHeader WARNING:\n"
+         << "Tie point will be truncated in image header:  "
+         << tie
+         << std::endl;
+   }
+}
+
+void ossimNitfImageHeader::getDecimationFactor(ossim_float64& result) const
+{
+   //---
+   // Look for string like:
+   // 
+   // "/2" = 1/2
+   // "/4  = 1/4
+   // ...
+   // "/16 = 1/16
+   // 
+   // If it is full resolution it should be "1.0"
+   //
+   // or
+   //
+   // "0.5" which is the same as "/2"
+   // "0.25" which is the same as "/4"
+   //---
+   ossimString os = getImageMagnification();
+
+   // Spec says to fill with spaces so strip them.
+   os.trim(ossimString(" "));
+
+   if (os.size())
+   {
+      if ( os.contains("/") )
+      {
+         os = os.after("/");
+         result = os.toFloat64();
+         if (result)
+         {
+            result = 1.0 / result;
+         }
+      }
+      else
+      {
+         result = os.toFloat64();
+      }
+   }
+   else
+   {
+      result = ossim::nan();
+   }
+}
+
+
+bool ossimNitfImageHeader::saveState(ossimKeywordlist& kwl, const ossimString& prefix)const
+{
+   if(!ossimObject::saveState(kwl, prefix)) return false;
+   ossimString tagsPrefix = prefix;
+   
+   for(ossim_uint32 i = 0; i < theTagList.size(); ++i)
+   {
+      ossimRefPtr<ossimNitfRegisteredTag> tag = theTagList[i].getTagData();
+      if (tag.valid())
+      {
+         if(!tag->saveState(kwl, tagsPrefix))
+         {
+            return false;
+         }
+      }
+   }
+   return true;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfImageHeaderV2_0.cpp b/ossim/src/ossim/support_data/ossimNitfImageHeaderV2_0.cpp
new file mode 100644
index 0000000..4462851
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfImageHeaderV2_0.cpp
@@ -0,0 +1,1039 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfImageHeaderV2_0.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+
+#include <iomanip>
+
+#include <ossim/support_data/ossimNitfImageHeaderV2_0.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimDrect.h>
+#include <cstring> //for memset
+#include <ossim/base/ossimEndian.h>
+#include <ossim/support_data/ossimNitfVqCompressionHeader.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <stdexcept>
+#include <sstream>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/support_data/ossimNitfCommon.h>
+static const ossimTrace traceDebug(ossimString("ossimNitfImageHeaderV2_0:debug"));
+
+RTTI_DEF1(ossimNitfImageHeaderV2_0,
+          "ossimNitfImageHeaderV2_0",
+          ossimNitfImageHeaderV2_X);
+
+const ossimString ossimNitfImageHeaderV2_0::ISCODE_KW = "iscode";
+const ossimString ossimNitfImageHeaderV2_0::ISCTLH_KW = "isctlh";
+const ossimString ossimNitfImageHeaderV2_0::ISREL_KW = "isrel";
+const ossimString ossimNitfImageHeaderV2_0::ISCAUT_KW = "iscaut";
+const ossimString ossimNitfImageHeaderV2_0::CTLN_KW = "ctln";
+const ossimString ossimNitfImageHeaderV2_0::ISDWNG_KW = "isdwng";
+const ossimString ossimNitfImageHeaderV2_0::ISDEVT_KW = "isdevt";
+
+ossimNitfImageHeaderV2_0::ossimNitfImageHeaderV2_0()
+{
+   clearFields();
+}
+
+ossimNitfImageHeaderV2_0::~ossimNitfImageHeaderV2_0()
+{
+}
+
+void ossimNitfImageHeaderV2_0::parseStream(std::istream &in)
+{
+   clearFields();
+   theImageBands.clear();
+      
+   in.read(theType, 2);
+   if(ossimString(theType) != "IM")
+   {
+      // error
+   }
+   in.read(theImageId, 10);
+   in.read(theDateTime, 14);
+   in.read(theTargetId, 17);
+   in.read(theTitle, 80);
+   in.read(theSecurityClassification, 1);
+   in.read(theCodewords, 40);
+   in.read(theControlAndHandling, 40);
+   in.read(theReleasingInstructions, 40);
+   in.read(theClassificationAuthority, 20);
+   in.read(theSecurityControlNumber, 20);
+   in.read(theSecurityDowngrade, 6);
+   if(ossimString(theSecurityDowngrade) == "999998")
+   {
+      in.read(theDowngradingEvent, 40);
+   }
+   in.read(theEncryption, 1);
+   in.read(theImageSource, 42);
+   in.read(theSignificantRows, 8);
+   in.read(theSignificantCols, 8);
+   in.read(thePixelValueType, 3);
+   in.read(theRepresentation, 8);
+   in.read(theCategory, 8);
+   in.read(theActualBitsPerPixelPerBand, 2);
+   in.read(theJustification, 1);
+   in.read(theCoordinateSystem, 1);
+   if(theCoordinateSystem[0] != 'N')
+   {
+      in.read(theGeographicLocation, 60);
+   }
+   in.read(theNumberOfComments, 1);
+   ossim_uint32 numberOfComments = ossimString(theNumberOfComments).toInt32();
+   if(numberOfComments > 0)
+   {
+      // for now let's ignore the comments about the image
+      in.ignore(numberOfComments*80);
+   }
+   in.read(theCompression, 2);
+   // check to see if there is compression
+   ossimString temp = theCompression;
+   if((temp !=  "NC") &&
+      (temp != "NM"))
+   {
+      // get the rate if compression exists.
+      in.read(theCompressionRateCode, 4);
+   }
+   in.read(theNumberOfBands, 1);
+   ossim_uint32 numberOfBands = ossimString(theNumberOfBands).toUInt32();
+   theImageBands.resize(numberOfBands);
+   ossim_uint32 idx = 0;
+   while(idx < numberOfBands)
+   {
+      theImageBands[idx] = new ossimNitfImageBandV2_0;
+      theImageBands[idx]->parseStream(in);
+      ++idx;
+   }
+   in.read(theImageSyncCode, 1);
+   in.read(theImageMode, 1);
+   in.read(theNumberOfBlocksPerRow, 4);
+   in.read(theNumberOfBlocksPerCol, 4);
+   in.read(theNumberOfPixelsPerBlockHoriz, 4);
+   in.read(theNumberOfPixelsPerBlockVert, 4);
+   in.read(theNumberOfBitsPerPixelPerBand, 2);
+   in.read(theDisplayLevel, 3);
+   in.read(theAttachmentLevel, 3);
+   in.read(theImageLocation, 10);
+   in.read(theImageMagnification, 4);
+   in.read(theUserDefinedImageDataLength, 5);
+   std::streampos userDefinedDataLen = (std::streampos)ossimString(theUserDefinedImageDataLength).toUInt32();
+   theTagList.clear();
+   ossimNitfTagInformation         headerTag;
+   std::streampos start   = in.tellg();
+   std::streampos current = in.tellg();
+   if(userDefinedDataLen > 0)
+   {
+      in.read(theUserDefinedOverflow, 3);
+      
+      while((current - start) < userDefinedDataLen)
+      {
+         headerTag.parseStream(in);
+         theTagList.push_back(headerTag);
+         // in.ignore(headerTag.getTagLength());
+         // headerTag.clearFields();
+         current = in.tellg();
+      }
+   }
+
+   in.read(theExtendedSubheaderDataLen, 5);
+   std::streampos extSubHeadLen = (std::streampos)ossimString(theExtendedSubheaderDataLen).toUInt32();
+   start   = in.tellg();
+   current = in.tellg();
+   if(extSubHeadLen > 0)
+   {
+      in.read(theExtendedSubheaderOverflow, 3);
+
+      // ossim_uint32 test = 0;
+      while((current - start) < extSubHeadLen)
+      {
+         headerTag.parseStream(in);
+         theTagList.push_back(headerTag);
+         // test = headerTag.getTagLength()+in.tellg();
+         // in.ignore(headerTag.getTagLength());
+         // headerTag.clearFields();
+         current = in.tellg();
+      }
+   }
+   
+   ossimString compressionType = theCompression;
+   compressionType = compressionType.trim().upcase();
+   ossimEndian endian;
+   ossim_uint64 locationBefore = in.tellg();
+
+   //---
+   // Note: "C4" added to skip over the image data mask subheader.
+   // See MIL-STD-2500A paragraph 5.5.1.5
+   //
+   // Seems like CIB data does not have.  Could not find a hard and fast
+   // rule in the specs.  Need a better was to detect if this needs to be
+   // read. (drb - 20100317)
+   //---
+   if( (compressionType == "NM") ||
+       (compressionType == "M0") ||
+       (compressionType == "M3") ||
+       (compressionType == "M4") ||
+       ( (compressionType == "C4") && ( !getImageId().contains("CIB")) ) )
+   {
+      in.read((char*)(&theBlockedImageDataOffset), 4);
+      in.read((char*)(&theBlockMaskRecordLength),2);
+      in.read((char*)(&thePadPixelMaskRecordLength), 2);
+      in.read((char*)(&theTransparentOutputPixelCodeLength), 2);
+
+      
+      if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
+      {
+         endian.swap(theBlockedImageDataOffset);
+         endian.swap(theBlockMaskRecordLength);
+         endian.swap(thePadPixelMaskRecordLength);
+         endian.swap(theTransparentOutputPixelCodeLength);
+      }
+      if(theTransparentOutputPixelCodeLength <9)
+      {
+         if(theTransparentOutputPixelCodeLength != 0)
+         {
+            ossim_uint8 padOutputPixelCode;
+            in.read((char*)(&padOutputPixelCode), 1);
+            thePadOutputPixelCode = padOutputPixelCode;
+         }
+      }
+      else
+      {
+         in.read((char*)(&thePadOutputPixelCode), 2);
+         if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
+         {
+            endian.swap(thePadOutputPixelCode);
+         }
+         // I need to add code here to check for justification when its 2 bytes
+         // but the code length is less than 16 bits.
+         //
+      }
+      if(theBlockMaskRecordLength>0)
+      {
+         ossim_uint32 totalNumber = 0;
+         if(theImageMode[0] == 'S')
+         {
+            totalNumber = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol()*getNumberOfBands();
+         }
+         else
+         {
+            totalNumber = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol();
+         }
+         ossim_uint32 *blockRead = new ossim_uint32[totalNumber];
+         ossim_uint32 idx = 0;
+         theBlockMaskRecords.resize(totalNumber);
+         in.read((char*)(blockRead), totalNumber*4);
+         for(idx = 0; idx < totalNumber; ++idx)
+         {
+            if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
+            {
+               endian.swap(blockRead[idx]);
+            }
+            theBlockMaskRecords[idx] = blockRead[idx];
+         }
+         delete [] blockRead;
+      }
+      if((thePadPixelMaskRecordLength > 0)||
+         (( (getCompressionCode().upcase() == "M3"))&&
+          (thePadPixelMaskRecordLength == 0)))
+      {
+         ossim_uint32 totalNumber = 0;
+         if(theImageMode[0] == 'S')
+         {
+            totalNumber = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol()*getNumberOfBands();
+         }
+         else
+         {
+            totalNumber = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol();
+         }
+         ossim_uint32 *blockRead = new ossim_uint32[totalNumber];
+         ossim_uint32 idx = 0;
+         thePadPixelMaskRecords.resize(totalNumber);
+         in.read((char*)(blockRead), totalNumber*4);
+         for(idx = 0; idx < totalNumber; ++idx)
+         {
+            if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
+            {
+               endian.swap(blockRead[idx]);
+            }
+            thePadPixelMaskRecords[idx] = blockRead[idx];
+         }
+         delete [] blockRead;
+      }
+   }
+
+   theCompressionHeader = 0;
+   if((getCompressionCode() == "C4")||
+      (getCompressionCode() == "M4"))
+   {
+      ossimRefPtr<ossimNitfVqCompressionHeader> compressionHeader =
+         new ossimNitfVqCompressionHeader;
+      compressionHeader->parseStream(in);
+      // do a check to see if the compression header is good
+      //
+      
+      if( compressionHeader->getCompressionAlgorithmId()!= 1 )
+      {
+         compressionHeader = 0;
+      }
+      theCompressionHeader = compressionHeader.get();
+   }
+
+   ossim_uint64 delta = (ossim_uint64)in.tellg() - locationBefore;
+   if(delta < theBlockedImageDataOffset)
+   {
+      in.ignore(theBlockedImageDataOffset-delta);
+   }
+   
+   //
+   // The stream should now be at the start of the data location so capture
+   // it.
+   //
+   theDataLocation = in.tellg();
+}
+
+void ossimNitfImageHeaderV2_0::writeStream(std::ostream &out)
+{
+   out.write(theType, 2);
+   out.write(theImageId, 10);
+   out.write(theDateTime, 14);
+   out.write(theTargetId, 17);
+   out.write(theTitle, 80);
+   out.write(theSecurityClassification, 1);
+   out.write(theCodewords, 40);
+   out.write(theControlAndHandling, 40);
+   out.write(theReleasingInstructions, 40);
+   out.write(theClassificationAuthority, 20);
+   out.write(theSecurityControlNumber, 20);
+   out.write(theSecurityDowngrade, 6);
+   if(ossimString(theSecurityDowngrade) == "999998")
+   {
+      out.write(theDowngradingEvent, 40);
+   }
+   out.write(theEncryption, 1);
+   out.write(theImageSource, 42);
+   out.write(theSignificantRows, 8);
+   out.write(theSignificantCols, 8);
+   out.write(thePixelValueType, 3);
+   out.write(theRepresentation, 8);
+   out.write(theCategory, 8);
+   out.write(theActualBitsPerPixelPerBand, 2);
+   out.write(theJustification, 1);
+   out.write(theCoordinateSystem, 1);
+   if(theCoordinateSystem[0] != 'N')
+   {
+      out.write(theGeographicLocation, 60);
+   }
+   out.write(theNumberOfComments, 1);
+   out.write(theCompression, 2);
+   if(ossimString(theCompression) != "NC")
+   {
+      out.write(theCompressionRateCode, 4);
+   }
+   out.write(theNumberOfBands, 1);
+   ossim_uint32 bandIdx = 0;
+   for(bandIdx=0;bandIdx<theImageBands.size();++bandIdx)
+   {
+      theImageBands[bandIdx]->writeStream(out);
+   }
+   out.write(theImageSyncCode, 1);
+   out.write(theImageMode, 1);
+   out.write(theNumberOfBlocksPerRow, 4);
+   out.write(theNumberOfBlocksPerCol, 4);
+   out.write(theNumberOfPixelsPerBlockHoriz, 4);
+   out.write(theNumberOfPixelsPerBlockVert, 4);
+   out.write(theNumberOfBitsPerPixelPerBand, 2);
+   out.write(theDisplayLevel, 3);
+   out.write(theAttachmentLevel, 3);
+   out.write(theImageLocation, 10);
+   out.write(theImageMagnification, 4);
+   out.write(theUserDefinedImageDataLength, 5);
+   if(ossimString(theUserDefinedImageDataLength).toInt32() > 0)
+   {
+      out.write(theUserDefinedOverflow, 3);
+   }
+   ossim_uint32 totalLength = getTotalTagLength();
+   
+   if(totalLength == 0)
+   {
+      //memcpy(theExtendedSubheaderDataLen, "00000", 5);
+      out.write(theExtendedSubheaderDataLen, 5);
+   }
+   else
+   {
+      totalLength += 3; // per Table A-3 of MIL-STD-2500B
+      
+      if(totalLength <= 99999)
+      {
+         std::ostringstream tempOut;
+         
+         tempOut << std::setw(5)
+         << std::setfill('0')
+         << std::setiosflags(ios::right)
+         << totalLength;
+         
+         memcpy(theExtendedSubheaderDataLen, tempOut.str().c_str(), 5);
+         
+         out.write(theExtendedSubheaderDataLen, 5);
+         memset(theExtendedSubheaderOverflow, '0', 3);
+         
+         if(totalLength > 0)
+         {
+            out.write(theExtendedSubheaderOverflow, 3);
+            
+            ossim_uint32 i = 0;
+            
+            for(i = 0; i < theTagList.size(); ++i)
+            {
+               theTagList[i].writeStream(out);
+            }
+         }
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimNitfFileHeaderV2_0::writeStream: Only support writing of total tag length < 99999" << std::endl;
+      }
+   }
+}
+
+std::ostream& ossimNitfImageHeaderV2_0::print(std::ostream& out,
+                                              const std::string& prefix) const
+{
+   out << setiosflags(std::ios::left)
+       << prefix << std::setw(24) << "IM:"
+       << theType << "\n"
+       << prefix << std::setw(24) << "IID:"
+       << theImageId  << "\n"
+       << prefix << std::setw(24) << "IDATIM:"
+       << theDateTime << "\n" 
+       << prefix << std::setw(24) << "TGTID:"
+       << theTargetId  << "\n"
+       << prefix << std::setw(24) << "ITITLE:"
+       << theTitle  << "\n"   
+       << prefix << std::setw(24) << "ISCLAS:"
+       << theSecurityClassification << "\n"
+       << prefix << std::setw(24) << "ISCODE:"
+       << theCodewords  << "\n"
+       << prefix << std::setw(24) << "ISCTLH:"
+       << theControlAndHandling << "\n" 
+       << prefix << std::setw(24) << "ISREL:"
+       << theReleasingInstructions << "\n" 
+       << prefix << std::setw(24) << "ISCAUT:"
+       << theClassificationAuthority << "\n" 
+       << prefix << std::setw(24) << "ISCTLN:"
+       << theSecurityControlNumber << "\n" 
+       << prefix << std::setw(24) << "ISDWNG:"
+       << theSecurityDowngrade  << "\n"    
+       << prefix << std::setw(24) << "ISDEBT:"
+       << theDowngradingEvent  << "\n"
+       << prefix << std::setw(24) << "ENCRYP:"
+       << theEncryption  << "\n"
+       << prefix << std::setw(24) << "ISORCE:"
+       << theImageSource  << "\n"
+       << prefix << std::setw(24) << "NROWS:"
+       << theSignificantRows  << "\n"
+       << prefix << std::setw(24) << "NCOLS:"
+       << theSignificantCols  << "\n"
+       << prefix << std::setw(24) << "PVTYPE:"
+       << thePixelValueType  << "\n"
+       << prefix << std::setw(24) << "IREP:"
+       << theRepresentation  << "\n"
+       << prefix << std::setw(24) << "ICAT:"
+       << theCategory  << "\n"      
+       << prefix << std::setw(24) << "ABPP:"
+       << theActualBitsPerPixelPerBand << "\n"
+       << prefix << std::setw(24) << "PJUST:"
+       << theJustification  << "\n"
+       << prefix << std::setw(24) << "ICORDS:"
+       << theCoordinateSystem  << "\n"
+       << prefix << std::setw(24) << "IGEOLO:"
+       << theGeographicLocation  << "\n"
+       << prefix << std::setw(24) << "NICOM:"
+       << theNumberOfComments << "\n" 
+       << prefix << std::setw(24) << "IC:"
+       << theCompression  << "\n"     
+       << prefix << std::setw(24) << "COMRAT:"
+       << theCompressionRateCode  << "\n"
+       << prefix << std::setw(24) << "NBANDS:"
+       << theNumberOfBands  << "\n";
+
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx < theImageBands.size(); ++idx)
+   {
+      if(theImageBands[idx].valid())
+      {
+         theImageBands[idx]->print(out, prefix, idx); 
+      }
+   }
+   
+   out << prefix << std::setw(24) << "ISYNC:"
+       << theImageSyncCode << "\n" 
+       << prefix << std::setw(24) << "IMODE:"
+       << theImageMode  << "\n"
+       << prefix << std::setw(24) << "NBPR:"
+       << theNumberOfBlocksPerRow << "\n" 
+       << prefix << std::setw(24) << "NBPC:"
+       << theNumberOfBlocksPerCol << "\n" 
+       << prefix << std::setw(24) << "NPPBH:"
+       << theNumberOfPixelsPerBlockHoriz << "\n" 
+       << prefix << std::setw(24) << "NPPBV:"
+       << theNumberOfPixelsPerBlockVert  << "\n"
+       << prefix << std::setw(24) << "NBPP:"
+       << theNumberOfBitsPerPixelPerBand  << "\n"
+       << prefix << std::setw(24) << "IDLVL:"
+       << theDisplayLevel << "\n"
+       << prefix << std::setw(24) << "IALVL:"
+       << theAttachmentLevel << "\n" 
+       << prefix << std::setw(24) << "ILOC:"
+       << theImageLocation << "\n" 
+       << prefix << std::setw(24) << "IMAG:"
+       << theImageMagnification  << "\n"
+       << prefix << std::setw(24) << "UDIDL:"
+       << theUserDefinedImageDataLength  << "\n"
+       << prefix << std::setw(24) << "UDOFL:"
+       << theUserDefinedOverflow  << "\n"
+       << prefix << std::setw(24) << "IXSHDL:"
+       << theExtendedSubheaderDataLen  << "\n"
+       << prefix << std::setw(24) << "IXSOFL:"
+       << theExtendedSubheaderOverflow  << "\n";
+
+   if ( traceDebug() )
+   {
+       out << prefix << std::setw(24) << "theDataLocation:"
+           << theDataLocation << "\n"
+           << prefix << std::setw(24) << "theBlockedImageDataOffset:"
+           << theBlockedImageDataOffset << "\n"
+           << prefix << std::setw(24) << "theBlockMaskRecordLength:"
+           << theBlockMaskRecordLength << "\n"
+           << prefix << std::setw(24) << "thePadPixelMaskRecordLength:"
+           << thePadPixelMaskRecordLength << "\n"
+           << prefix << std::setw(24) << "theTransparentOutputPixelCodeLength:"
+           << theTransparentOutputPixelCodeLength << "\n"
+           << prefix << std::setw(24) << "thePadOutputPixelCode:"
+           << thePadOutputPixelCode << "\n";
+   }
+
+   if(theCompressionHeader.valid())
+   {
+      theCompressionHeader->print(out, prefix);
+   }
+
+   out << std::endl;
+
+   return printTags(out, prefix);
+}
+
+bool ossimNitfImageHeaderV2_0::saveState(ossimKeywordlist& kwl, const ossimString& prefix)const
+{
+   ossimNitfImageHeaderV2_X::saveState(kwl, prefix);
+   std::ostringstream out;
+   
+   kwl.add(prefix, "ITITLE", theTitle);
+
+   ossim_uint32 idx = 0;
+   if(theCompressionHeader.valid())
+   {
+      theCompressionHeader->saveState(kwl, prefix + "compression_header.");
+   }
+   
+   for(idx = 0; idx < theImageBands.size(); ++idx)
+   {
+      if(theImageBands[idx].valid())
+      {
+         theImageBands[idx]->print(out, "", idx); 
+      }
+   }
+   
+   out << std::endl;
+   
+   ossimKeywordlist kwlTemp;
+   
+   std::istringstream in(out.str());
+   if(kwlTemp.parseStream(in))
+   {
+      kwl.add(prefix, kwlTemp);
+   }
+   return true;
+}
+
+bool ossimNitfImageHeaderV2_0::isCompressed()const
+{
+   ossimString temp = theCompression;
+   temp = temp.trim();
+   return ((temp != "NC") &&
+           (temp != "NM"));
+}
+
+bool ossimNitfImageHeaderV2_0::isEncrypted()const
+{
+   return (theEncryption[0] == '1');
+}
+
+ossim_int32 ossimNitfImageHeaderV2_0::getNumberOfBands()const
+{
+   return ossimString(theNumberOfBands).toInt32();
+}
+
+ossim_int32 ossimNitfImageHeaderV2_0::getNumberOfRows()const
+{
+   return ossimString(theSignificantRows).toInt32();
+}
+
+ossim_int32 ossimNitfImageHeaderV2_0::getNumberOfCols()const
+{
+   return ossimString(theSignificantCols).toInt32();
+}
+
+ossim_int32 ossimNitfImageHeaderV2_0::getNumberOfBlocksPerRow()const
+{
+   return ossimString(theNumberOfBlocksPerRow).toInt32();
+}
+
+ossim_int32 ossimNitfImageHeaderV2_0::getNumberOfBlocksPerCol()const
+{
+   return ossimString(theNumberOfBlocksPerCol).toInt32();
+}
+
+ossim_int32 ossimNitfImageHeaderV2_0::getNumberOfPixelsPerBlockHoriz()const
+{
+   return ossimString(theNumberOfPixelsPerBlockHoriz).toInt32();
+}
+
+ossim_int32 ossimNitfImageHeaderV2_0::getNumberOfPixelsPerBlockVert()const
+{
+   return ossimString(theNumberOfPixelsPerBlockVert).toInt32();
+}
+
+ossimString ossimNitfImageHeaderV2_0::getImageId()const
+{
+   return theImageId;
+}
+
+ossim_int32 ossimNitfImageHeaderV2_0::getBitsPerPixelPerBand()const
+{
+   return ossimString(theNumberOfBitsPerPixelPerBand).toInt32();
+}
+
+ossim_int32 ossimNitfImageHeaderV2_0::getActualBitsPerPixelPerBand()const
+{
+   return ossimString(theActualBitsPerPixelPerBand).toInt32();
+}
+
+ossimString ossimNitfImageHeaderV2_0::getIMode() const
+{
+   return ossimString(theImageMode).trim();
+}
+
+ossimString ossimNitfImageHeaderV2_0::getSecurityClassification()const
+{
+   return ossimString(theSecurityClassification);
+}
+
+ossimString  ossimNitfImageHeaderV2_0::getImageDateAndTime() const
+{
+   return ossimString(theDateTime);
+}
+
+ossimString ossimNitfImageHeaderV2_0::getAcquisitionDateMonthDayYear(ossim_uint8 separationChar)const
+{
+   ossimString result;
+   ossimString month(theDateTime+9,
+                     theDateTime+12);
+   month = month.downcase();
+   if(month == "jan")
+   {
+      result += "01";
+   }
+   else if(month == "feb")
+   {
+      result += "02";
+   }
+   else if(month == "mar")
+   {
+      result += "03";
+   }
+   else if(month == "apr")
+   {
+      result += "04";
+   }
+   else if(month == "may")
+   {
+      result += "05";
+   }
+   else if(month == "jun")
+   {
+      result += "06";
+   }
+   else if(month == "jul")
+   {
+      result += "07";
+   }
+   else if(month == "aug")
+   {
+      result += "08";
+   }
+   else if(month == "sep")
+   {
+      result += "09";
+   }
+   else if(month == "oct")
+   {
+      result += "10";
+   }
+   else if(month == "nov")
+   {
+      result += "11";
+   }
+   else if(month == "dec")
+   {
+      result += "12";
+   }
+   result += ossimString(separationChar);
+   result += ossimString(theDateTime,
+                         theDateTime + 2);
+   result += ossimString(separationChar);
+   ossimString year(theDateTime+12,
+                    theDateTime+14);
+   if(year.toUInt32() < 70)
+   {
+      result += "20";
+   }
+   else
+   {
+      result += "19";
+   }
+   result += ossimString(theDateTime+12,
+                         theDateTime+14);
+
+   return result;
+}
+
+ossimString ossimNitfImageHeaderV2_0::getCategory()const
+{
+   return theCategory;
+}
+
+ossimString ossimNitfImageHeaderV2_0::getImageSource()const
+{
+   return theImageSource;
+}
+
+ossimString ossimNitfImageHeaderV2_0::getRepresentation()const
+{
+   return theRepresentation;
+}
+
+ossimString ossimNitfImageHeaderV2_0::getCoordinateSystem()const
+{
+	return theCoordinateSystem;
+}
+
+ossimString ossimNitfImageHeaderV2_0::getPixelValueType()const
+{
+   return ossimString(thePixelValueType).trim();
+}
+
+bool ossimNitfImageHeaderV2_0::hasBlockMaskRecords()const
+{
+   return (theBlockMaskRecords.size() > 0);
+}
+
+bool ossimNitfImageHeaderV2_0::hasPadPixelMaskRecords()const
+{
+   return (thePadPixelMaskRecords.size() > 0);
+}
+
+bool ossimNitfImageHeaderV2_0::hasTransparentCode()const
+{
+   return (theTransparentOutputPixelCodeLength > 0);
+}
+
+ossim_uint32 ossimNitfImageHeaderV2_0::getTransparentCode()const
+{
+   return thePadOutputPixelCode;
+}
+
+ossim_uint32 ossimNitfImageHeaderV2_0::getBlockMaskRecordOffset(ossim_uint32 blockNumber,
+                                                                ossim_uint32 bandNumber)const
+{
+   ossim_uint32 maxBlock = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol();
+   ossim_uint32 result = 0xffffffff;
+   
+   if((hasBlockMaskRecords())&&
+      (blockNumber < maxBlock))
+   {
+      if(theImageMode[0] == 'S')
+      {
+         if(bandNumber < (ossim_uint32)getNumberOfBands())
+         {
+            result = theBlockMaskRecords[bandNumber*maxBlock + blockNumber];
+         }
+      }
+      else
+      {
+         result = theBlockMaskRecords[blockNumber];
+      }
+   }
+
+   return result;
+}
+ossim_uint32 ossimNitfImageHeaderV2_0::getPadPixelMaskRecordOffset(ossim_uint32 blockNumber,
+                                                                   ossim_uint32 bandNumber)const
+{
+   ossim_uint32 maxBlock = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol();
+   ossim_uint32 result = 0xffffffff;
+   
+   if((hasPadPixelMaskRecords())&&
+      (blockNumber < maxBlock))
+   {
+      if(theImageMode[0] == 'S')
+      {
+         if(bandNumber < (ossim_uint32)getNumberOfBands())
+         {
+            result = thePadPixelMaskRecords[bandNumber*maxBlock + blockNumber];
+         }
+      }
+      else
+      {
+         result = thePadPixelMaskRecords[blockNumber];
+      }
+   }
+
+   return result;
+}
+
+void ossimNitfImageHeaderV2_0::clearFields()
+{
+   theTagList.clear();
+   
+   memcpy(theType, "IM", 2);
+   memset(theImageId, ' ', 10);
+   memset(theDateTime, ' ', 14);
+   memset(theTargetId, ' ', 17);
+   memset(theTitle, ' ', 80);
+   memset(theSecurityClassification, ' ', 1);
+   memset(theCodewords, ' ', 40);
+   memset(theControlAndHandling, ' ', 40);
+   memset(theReleasingInstructions, ' ', 40);
+   memset(theClassificationAuthority, ' ', 20);
+   memset(theSecurityControlNumber, ' ', 20);
+   memset(theSecurityDowngrade, ' ', 6);
+   memset(theDowngradingEvent, ' ', 40);
+   memset(theEncryption, '0', 1);
+   memset(theImageSource, ' ', 42);
+   memset(theSignificantRows, ' ', 8);
+   memset(theSignificantCols, ' ', 8);
+   memset(thePixelValueType, ' ', 3);
+   memset(theRepresentation, ' ', 8);
+   memset(theCategory, ' ', 8);
+   memset(theActualBitsPerPixelPerBand, '0', 2);
+   memset(theJustification, ' ', 1);
+   memset(theCoordinateSystem, 'N', 1);
+   memset(theGeographicLocation, ' ', 60);
+   memset(theNumberOfComments, '0', 1);
+   memcpy(theCompression, "NC", 2);
+   memset(theCompressionRateCode, ' ', 4);
+   memset(theNumberOfBands, ' ', 1);
+   memset(theImageSyncCode, '0', 1);
+   memset(theImageMode, ' ', 1);
+   memset(theNumberOfBlocksPerRow, ' ', 4);
+   memset(theNumberOfBlocksPerCol, ' ', 4);
+   memset(theNumberOfPixelsPerBlockHoriz, ' ', 4);
+   memset(theNumberOfPixelsPerBlockVert, ' ', 4);
+   memset(theNumberOfBitsPerPixelPerBand, '0', 2);
+   memset(theDisplayLevel, ' ', 3);
+   memset(theAttachmentLevel, ' ', 3);
+   memcpy(theImageLocation, "0000000000", 10);
+   memcpy(theImageMagnification, "1.00", 4);
+   memset(theUserDefinedImageDataLength, '0', 5);
+   memset(theUserDefinedOverflow, '0', 3);
+   memset(theExtendedSubheaderDataLen, '0', 5);
+   memset(theExtendedSubheaderOverflow, ' ', 3);
+   
+   theBlockMaskRecords.clear();
+   thePadPixelMaskRecords.clear();
+
+   theBlockedImageDataOffset = 0;
+   theBlockMaskRecordLength = 0;
+   thePadPixelMaskRecordLength = 0;
+   theTransparentOutputPixelCodeLength = 0;
+   thePadOutputPixelCode = 0;
+   theCompressionHeader  = 0;
+   theType[2] = '\0';
+   theImageId[10] = '\0';
+   theDateTime[14] = '\0';
+   theTargetId[17] = '\0';
+   theTitle[80] = '\0';
+   theSecurityClassification[1] = '\0';
+   theCodewords[40] = '\0';
+   theControlAndHandling[40] = '\0';
+   theReleasingInstructions[40] = '\0';
+   theClassificationAuthority[20] = '\0';
+   theSecurityControlNumber[20] = '\0';
+   theSecurityDowngrade[6] = '\0';
+   theDowngradingEvent[40] = '\0';
+   theEncryption[1] = '\0';
+   theImageSource[42] = '\0';
+   theSignificantRows[8] = '\0';
+   theSignificantCols[8] = '\0';
+   thePixelValueType[3] = '\0';
+   theRepresentation[8] = '\0';
+   theCategory[8] = '\0';
+   theActualBitsPerPixelPerBand[2] = '\0';
+   theJustification[1] = '\0';
+   theCoordinateSystem[1] = '\0';
+   theGeographicLocation[60] = '\0';
+   theNumberOfComments[1] = '\0';
+   theCompression[2] = '\0';
+   theCompressionRateCode[4] = '\0';
+   theNumberOfBands[1] = '\0';
+   theImageSyncCode[1] = '\0';
+   theImageMode[1] = '\0';
+   theNumberOfBlocksPerRow[4] = '\0';
+   theNumberOfBlocksPerCol[4] = '\0';
+   theNumberOfPixelsPerBlockHoriz[4] = '\0';
+   theNumberOfPixelsPerBlockVert[4] = '\0';
+   theNumberOfBitsPerPixelPerBand[2] = '\0';
+   theDisplayLevel[3] = '\0';
+   theAttachmentLevel[3] = '\0';
+   theImageLocation[10] = '\0';
+   theImageMagnification[4] = '\0';
+   theUserDefinedImageDataLength[5] = '\0';
+   theUserDefinedOverflow[3] = '\0';
+   theExtendedSubheaderDataLen[5] = '\0';
+   theExtendedSubheaderOverflow[3] = '\0'; 
+   theDataLocation = 0;
+}
+
+const ossimRefPtr<ossimNitfCompressionHeader> ossimNitfImageHeaderV2_0::getCompressionHeader()const
+{
+   return theCompressionHeader;
+}
+
+const ossimRefPtr<ossimNitfImageBand> ossimNitfImageHeaderV2_0::getBandInformation(ossim_uint32 idx)const
+{
+   if(idx < theImageBands.size())
+   {
+      return (ossimNitfImageBand*)theImageBands[idx].get();
+   }
+   
+   return NULL;
+}
+
+void ossimNitfImageHeaderV2_0::setNumberOfBands(ossim_uint32 nbands)
+{
+   std::ostringstream out;
+   if(nbands > 9)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "ossimNitfImageHeaderV2_0::setNumberOfBands: NBANDS is too large.  For 2.0 spec we can only have up to 9 bands\n";
+      }
+      std::string s = "ossimNitfImageHeaderV2_0::setNumberOfBands:";
+      s += " ERROR\nExceeded max number of bands of 9!";
+      throw std::out_of_range(s);
+   }
+   else
+   {
+      out << nbands;
+      theNumberOfBands[0] = out.str().c_str()[0];
+   }
+   
+   theImageBands.resize(getNumberOfBands());
+}
+
+void ossimNitfImageHeaderV2_0::setBandInfo(ossim_uint32 idx,
+                                           const ossimNitfImageBandV2_0& info)
+{
+   if(idx < theImageBands.size())
+   {
+      if(!theImageBands[idx].valid())
+      {
+         theImageBands[idx] = new ossimNitfImageBandV2_0;
+      }
+      (*theImageBands[idx]) = info;
+   }
+}
+void ossimNitfImageHeaderV2_0::setNumberOfRows(ossim_uint32 rows)
+{
+   std::ostringstream out;
+   if(rows > 99999999) rows = 99999999;
+   
+   out << rows;
+   ossimNitfCommon::setField(theSignificantRows, out.str(), 8, ios::right, '0');
+}
+
+void ossimNitfImageHeaderV2_0::setNumberOfCols(ossim_uint32 cols)
+{
+   std::ostringstream out;
+   if(cols > 99999999) cols = 99999999;
+   
+   out << cols;
+   ossimNitfCommon::setField(theSignificantCols, out.str(), 8, ios::right, '0');
+}
+
+void ossimNitfImageHeaderV2_0::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   ossimNitfImageHeaderV2_X::setProperty(property);
+}
+
+ossimRefPtr<ossimProperty> ossimNitfImageHeaderV2_0::getProperty(const ossimString& name)const
+{
+   ossimRefPtr<ossimProperty> property = 0;
+   if(name == ISCODE_KW)
+   {
+      property = new ossimStringProperty(name, theCodewords);
+   }
+   else if(name == ISCTLH_KW)
+   {
+      property = new ossimStringProperty(name, theControlAndHandling);
+   }
+   else if(name == ISREL_KW)
+   {
+      property = new ossimStringProperty(name, theReleasingInstructions);
+   }
+   else if(name == ISCAUT_KW)
+   {
+      property = new ossimStringProperty(name, theClassificationAuthority);
+   }
+   else if(name == CTLN_KW)
+   {
+      property = new ossimStringProperty(name, theSecurityControlNumber);
+   }
+   else if(name == ISDWNG_KW)
+   {
+      property = new ossimStringProperty(name, theSecurityDowngrade);
+   }
+   else if(name == ISDEVT_KW)
+   {
+      property = new ossimStringProperty(name, theDowngradingEvent);
+   }
+   else 
+   {
+      property = ossimNitfImageHeaderV2_X::getProperty(name);
+   }
+   return property;
+}
+
+void ossimNitfImageHeaderV2_0::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimNitfImageHeaderV2_X::getPropertyNames(propertyNames);
+   propertyNames.push_back(ISCODE_KW);
+   propertyNames.push_back(ISCTLH_KW);
+   propertyNames.push_back(ISREL_KW);
+   propertyNames.push_back(ISCAUT_KW);
+   propertyNames.push_back(CTLN_KW);
+   propertyNames.push_back(ISDWNG_KW);
+   propertyNames.push_back(ISDEVT_KW);
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfImageHeaderV2_1.cpp b/ossim/src/ossim/support_data/ossimNitfImageHeaderV2_1.cpp
new file mode 100644
index 0000000..a78e794
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfImageHeaderV2_1.cpp
@@ -0,0 +1,1816 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfImageHeaderV2_1.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <sstream>
+#include <iomanip>
+#include <cstring> // for memset
+
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimDms.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimIoStream.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/support_data/ossimNitfCommon.h>
+#include <ossim/support_data/ossimNitfImageHeaderV2_1.h>
+#include <ossim/support_data/ossimNitfVqCompressionHeader.h>
+#include <ossim/support_data/ossimNitfFileHeaderV2_1.h>
+#include <ossim/support_data/ossimNitfDataExtensionSegmentV2_1.h>
+
+RTTI_DEF1(ossimNitfImageHeaderV2_1,
+          "ossimNitfImageHeaderV2_1",
+          ossimNitfImageHeaderV2_X)
+
+const ossimString ossimNitfImageHeaderV2_1::ISCLSY_KW = "isclsy";
+const ossimString ossimNitfImageHeaderV2_1::ISCODE_KW = "iscode";
+const ossimString ossimNitfImageHeaderV2_1::ISCTLH_KW = "isctlh";
+const ossimString ossimNitfImageHeaderV2_1::ISREL_KW  = "isrel";
+const ossimString ossimNitfImageHeaderV2_1::ISDCTP_KW = "isdctp";
+const ossimString ossimNitfImageHeaderV2_1::ISDCDT_KW = "isdcdt";
+const ossimString ossimNitfImageHeaderV2_1::ISDCXM_KW = "isdcxm";
+const ossimString ossimNitfImageHeaderV2_1::ISDG_KW   = "isdg";
+const ossimString ossimNitfImageHeaderV2_1::ISDGDT_KW = "isdgdt";
+const ossimString ossimNitfImageHeaderV2_1::ISCLTX_KW = "iscltx";
+const ossimString ossimNitfImageHeaderV2_1::ISCATP_KW = "iscatp";
+const ossimString ossimNitfImageHeaderV2_1::ISCAUT_KW = "iscaut";
+const ossimString ossimNitfImageHeaderV2_1::ISCRSN_KW = "iscrsn";
+const ossimString ossimNitfImageHeaderV2_1::ISSRDT_KW = "issrdt";
+const ossimString ossimNitfImageHeaderV2_1::ISCTLN_KW = "isctln";
+const ossimString ossimNitfImageHeaderV2_1::XBANDS_KW = "xbands";
+
+static const
+ossimTrace traceDebug(ossimString("ossimNitfImageHeaderV2_1:debug"));
+
+ossimNitfImageHeaderV2_1::ossimNitfImageHeaderV2_1()
+{
+   clearFields();
+}
+ossimNitfImageHeaderV2_1::~ossimNitfImageHeaderV2_1()
+{
+}
+
+void ossimNitfImageHeaderV2_1::parseStream(std::istream &in)
+{
+   parseStream(in, NULL);
+}
+
+void ossimNitfImageHeaderV2_1::parseStream(std::istream &in, const ossimNitfFileHeaderV2_1 *file)
+{
+   if (!in)
+   {
+      return;
+   }
+   clearFields();
+   theTagList.clear();
+   in.read(theType, 2);
+   in.read(theImageId, 10);
+   in.read(theDateTime,14);
+   in.read(theTargetId, 17);
+   in.read(theTitle, 80);
+   in.read(theSecurityClassification, 1);
+   in.read(theSecurityClassificationSys, 2);
+   in.read(theCodewords, 11);
+   in.read(theControlAndHandling, 2);
+   in.read(theReleasingInstructions, 20);
+   in.read(theDeclassificationType, 2);
+   in.read(theDeclassificationDate, 8);
+   in.read(theDeclassificationExempt, 4);
+   in.read(theDowngrade, 1);
+   in.read(theDowngradeDate, 8);
+   in.read(theClassificationText, 43);
+   in.read(theClassificationAuthType, 1);
+   in.read(theClassificationAuthority, 40);
+   in.read(theClassificationReason, 1);
+   in.read(theSecuritySourceDate, 8);
+   in.read(theSecurityControlNumber, 15);
+   in.read(theEncryption, 1);
+   in.read(theImageSource, 42);
+   in.read(theSignificantRows, 8);
+   in.read(theSignificantCols, 8);
+   in.read(thePixelValueType, 3);
+   in.read(theRepresentation, 8);
+   in.read(theCategory, 8);
+   in.read(theActualBitsPerPixelPerBand, 2);
+   in.read(theJustification, 1);
+   in.read(theCoordinateSystem, 1);
+   // if it's not blank then read coordinates
+   if(theCoordinateSystem[0] != ' ')
+   {
+      in.read(theGeographicLocation, 60);
+   }
+   in.read(theNumberOfComments, 1);
+   ossim_int32 numberOfComments = ossimString(theNumberOfComments).toInt32();
+   
+   // for now just ignore the comments
+   if(numberOfComments > 0)
+   {
+      in.ignore(numberOfComments*80);
+   }
+   in.read(theCompression, 2);
+   
+   // only need the Rate code if its not
+   // NC (No compression)
+   ossimString temp = theCompression;
+   if((temp != "NC") &&
+      (temp != "NM"))
+   {
+      in.read(theCompressionRateCode, 4);
+   }
+   in.read(theNumberOfBands, 1);
+   // check to see if multi spectral bands
+   // exceed 9.  A value of 0 indicates this
+   ossim_int32 numberOfBands = ossimString(theNumberOfBands).toInt32();
+   if (numberOfBands == 0)
+   {
+      in.read(theNumberOfMultispectralBands, 5);
+      numberOfBands = ossimString(theNumberOfMultispectralBands).toInt32();
+   }
+   theImageBands.clear();
+   theImageBands.resize(numberOfBands);
+   for (ossim_int32 band = 0; band < numberOfBands; ++band)
+   {
+      theImageBands[band] = new ossimNitfImageBandV2_1;
+      theImageBands[band]->parseStream(in);
+   }
+   in.read(theImageSyncCode, 1);
+   in.read(theImageMode, 1);
+   in.read(theNumberOfBlocksPerRow, 4);
+   in.read(theNumberOfBlocksPerCol, 4);
+   in.read(theNumberOfPixelsPerBlockHoriz, 4);
+   in.read(theNumberOfPixelsPerBlockVert, 4);
+   in.read(theNumberOfBitsPerPixelPerBand, 2);
+   in.read(theDisplayLevel, 3);
+   in.read(theAttachmentLevel, 3);
+   in.read(theImageLocation, 10);
+   in.read(theImageMagnification, 4);
+   in.read(theUserDefinedImageDataLength, 5);
+   
+   ossimNitfTagInformation         headerTag;
+   std::streampos start   = in.tellg();
+   std::streampos current = in.tellg();
+   
+   std::streampos userDefinedDataLen
+      = ossimString(theUserDefinedImageDataLength).toInt32();
+   if(userDefinedDataLen > 0)
+   {
+      in.read(theUserDefinedOverflow, 3);
+      current = in.tellg();
+      
+      while((current - start) < userDefinedDataLen)
+      {
+         headerTag.parseStream(in);
+         theTagList.push_back(headerTag);
+         headerTag.setTagType("UDID");
+         // in.ignore(headerTag.getTagLength());
+         // headerTag.clearFields();
+         current = in.tellg();
+      }
+//      in.seekg(start + userDefinedDataLen);
+            ossim_int32 overflow = ossimString(theUserDefinedOverflow).toLong();
+      if (overflow != 0 && file != NULL)
+      {
+         ossimNitfDataExtensionSegment *des = file->getNewDataExtensionSegment(overflow-1, in);
+         if (des != NULL)
+         {
+            const vector<ossimNitfTagInformation> &desTags = des->getTagList();
+            for (vector<ossimNitfTagInformation>::const_iterator iter = desTags.begin(); iter != desTags.end(); ++iter)
+            {
+               iter->setTagType("UDID");
+               theTagList.push_back(*iter);
+            }
+         }
+         delete des;
+      }
+      ossimIFStream64::seekg64(in, start + userDefinedDataLen, ios::beg);
+   }
+   in.read(theExtendedSubheaderDataLen, 5);
+   std::streampos extSubHeadLen = ossimString(theExtendedSubheaderDataLen).toInt32();
+   start   = in.tellg();
+   current = in.tellg();
+   if(extSubHeadLen > 0)
+   {
+      in.read(theExtendedSubheaderOverflow, 3);
+      current = in.tellg();
+      while((current - start) < extSubHeadLen)
+      {
+         headerTag.parseStream(in);
+         headerTag.setTagType("IXSHD");
+         theTagList.push_back(headerTag);
+         
+         // in.ignore(headerTag.getTagLength());
+         // headerTag.clearFields();
+         current = in.tellg();
+      }
+//      in.seekg(start + extSubHeadLen);
+      ossim_int32 overflow = ossimString(theExtendedSubheaderOverflow).toLong();
+      if (overflow != 0 && file != NULL)
+      {
+         ossimNitfDataExtensionSegment *des = file->getNewDataExtensionSegment(overflow-1, in);
+         if (des != NULL)
+         {
+            const vector<ossimNitfTagInformation> &desTags = des->getTagList();
+            for (vector<ossimNitfTagInformation>::const_iterator iter = desTags.begin(); iter != desTags.end(); ++iter)
+            {
+               iter->setTagType("IXSHD");
+               theTagList.push_back(*iter);
+            }
+            delete des;
+         }
+      }
+      ossimIFStream64::seekg64(in, start + extSubHeadLen, ios::beg);
+   }
+   ossimString compressionType = theCompression;
+   compressionType = compressionType.trim().upcase();
+   ossimEndian endian;
+
+   //---
+   // Note: "C4" added to skip over the image data mask subheader.
+   // See MIL-STD-2500C paragraph 5.4.3.2
+   //---
+   if((compressionType == "NM")||
+      (compressionType == "M1")||
+      (compressionType == "M3")||
+      (compressionType == "M4")||
+      (compressionType == "M5")||
+      (compressionType == "C4"))
+   {
+      ossim_uint64 locationBefore = in.tellg();
+      in.read((char*)(&theBlockedImageDataOffset), 4);
+      in.read((char*)(&theBlockMaskRecordLength),2);
+      in.read((char*)(&thePadPixelMaskRecordLength), 2);
+      in.read((char*)(&theTransparentOutputPixelCodeLength), 2);
+
+      
+      if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
+      {
+         endian.swap(theBlockedImageDataOffset);
+         endian.swap(theBlockMaskRecordLength);
+         endian.swap(thePadPixelMaskRecordLength);
+         endian.swap(theTransparentOutputPixelCodeLength);
+      }
+      if(theTransparentOutputPixelCodeLength <9)
+      {
+         if(theTransparentOutputPixelCodeLength != 0)
+         {
+            ossim_uint8 padOutputPixelCode;
+            in.read((char*)(&padOutputPixelCode), 1);
+            thePadOutputPixelCode = padOutputPixelCode;
+         }
+      }
+      else
+      {
+         in.read((char*)(&thePadOutputPixelCode), 2);
+         if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
+         {
+            endian.swap(thePadOutputPixelCode);
+         }
+         // I need to add code here to check for justification when its 2 bytes
+         // but the code length is less than 16 bits.
+         //
+      }
+      if(theBlockMaskRecordLength>0)
+      {
+         ossim_uint32 totalNumber = 0;
+         if(theImageMode[0] == 'S')
+         {
+             totalNumber = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol()*getNumberOfBands();
+         }
+         else
+         {
+            totalNumber = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol();
+         }
+         ossim_uint32 *blockRead = new ossim_uint32[totalNumber];
+         ossim_uint32 idx = 0;
+         theBlockMaskRecords.resize(totalNumber);
+         in.read((char*)(blockRead), totalNumber*4);
+         for(idx = 0; idx < totalNumber; ++idx)
+         {
+            if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
+            {
+               endian.swap(blockRead[idx]);
+            }
+            theBlockMaskRecords[idx] = blockRead[idx];
+         }
+         delete [] blockRead;
+      }
+      if( (thePadPixelMaskRecordLength > 0) ||
+          ( (getCompressionCode().upcase() == "M3") && (thePadPixelMaskRecordLength == 0) ) )
+      {
+         ossim_uint32 totalNumber = 0;
+         if(theImageMode[0] == 'S')
+         {
+            totalNumber = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol()*getNumberOfBands();
+         }
+         else
+         {
+            totalNumber = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol();
+         }
+         ossim_uint32 *blockRead = new ossim_uint32[totalNumber];
+         ossim_uint32 idx = 0;
+         thePadPixelMaskRecords.resize(totalNumber);
+         in.read((char*)(blockRead), totalNumber*4);
+         for(idx = 0; idx < totalNumber; ++idx)
+         {
+            if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
+            {
+               endian.swap(blockRead[idx]);
+            }
+            thePadPixelMaskRecords[idx] = blockRead[idx];
+         }
+         delete [] blockRead;
+      }
+      theCompressionHeader = 0;
+      if((getCompressionCode() == "C4")||
+         (getCompressionCode() == "M4"))
+      {
+         ossimRefPtr<ossimNitfVqCompressionHeader> compressionHeader = new ossimNitfVqCompressionHeader;
+         compressionHeader->parseStream(in);
+         // do a check to see if the compression header is good
+         //
+         if(compressionHeader->getCompressionAlgorithmId()!= 1)
+         {
+            compressionHeader = 0;
+         }
+         theCompressionHeader = compressionHeader.get();
+      }
+      
+      ossim_uint64 delta = (ossim_uint64)in.tellg() - locationBefore;
+      if(delta < theBlockedImageDataOffset)
+      {
+         in.ignore(theBlockedImageDataOffset-delta);
+      }
+   }
+   //***
+   // The stream should now be at the start of the data location so capture
+   // it.
+   //***
+   theDataLocation = in.tellg();
+}
+
+void ossimNitfImageHeaderV2_1::writeStream(std::ostream &out)
+{
+   out.write(theType, 2);
+   out.write(theImageId, 10);
+   out.write(theDateTime,14);
+   out.write(theTargetId, 17);
+   out.write(theTitle, 80);
+   out.write(theSecurityClassification, 1);
+   out.write(theSecurityClassificationSys, 2);
+   out.write(theCodewords, 11);
+   out.write(theControlAndHandling, 2);
+   out.write(theReleasingInstructions, 20);
+   out.write(theDeclassificationType, 2);
+   out.write(theDeclassificationDate, 8);
+   out.write(theDeclassificationExempt, 4);
+   out.write(theDowngrade, 1);
+   out.write(theDowngradeDate, 8);
+   out.write(theClassificationText, 43);
+   out.write(theClassificationAuthType, 1);
+   out.write(theClassificationAuthority, 40);
+   out.write(theClassificationReason, 1);
+   out.write(theSecuritySourceDate, 8);
+   out.write(theSecurityControlNumber, 15);
+   out.write(theEncryption, 1);
+   out.write(theImageSource, 42);
+   out.write(theSignificantRows, 8);
+   out.write(theSignificantCols, 8);
+   out.write(thePixelValueType, 3);
+   out.write(theRepresentation, 8);
+   out.write(theCategory, 8);
+   out.write(theActualBitsPerPixelPerBand, 2);
+   out.write(theJustification, 1);
+   out.write(theCoordinateSystem, 1);
+   
+   if(theCoordinateSystem[0] != ' ')
+   {
+      out.write(theGeographicLocation, 60);
+   }
+   // for now force the number of comments to be 0
+   out.write(theNumberOfComments, 1);
+   
+   out.write(theCompression, 2);
+   ossimString compressionTest = theCompression;
+   if(compressionTest != "NC" &&
+      compressionTest != "NM")
+     {
+      out.write(theCompressionRateCode, 4);
+     }
+
+   out.write(theNumberOfBands, 1);
+
+   if(ossimString(theNumberOfBands).toInt32() == 0)
+   {
+      out.write(theNumberOfMultispectralBands, 5);
+   }
+
+   if(theImageBands.size())
+   {
+      ossim_uint32 idx = 0;
+      for(idx = 0; idx < theImageBands.size(); ++idx)
+      {
+         if (theImageBands[idx].valid() == false)
+         {
+            theImageBands[idx] = new ossimNitfImageBandV2_1;
+         }
+         theImageBands[idx]->writeStream(out);
+      }
+   }
+
+   out.write(theImageSyncCode, 1);
+   out.write(theImageMode, 1);
+   out.write(theNumberOfBlocksPerRow, 4);
+   out.write(theNumberOfBlocksPerCol, 4);
+   out.write(theNumberOfPixelsPerBlockHoriz, 4);
+   out.write(theNumberOfPixelsPerBlockVert, 4);
+   out.write(theNumberOfBitsPerPixelPerBand, 2);
+   out.write(theDisplayLevel, 3);
+   out.write(theAttachmentLevel, 3);
+   out.write(theImageLocation, 10);
+   out.write(theImageMagnification, 4);
+   out.write(theUserDefinedImageDataLength, 5);
+
+   if(ossimString(theUserDefinedImageDataLength).toInt32() > 0)
+   {
+      out.write(theUserDefinedOverflow, 3);
+   }
+
+   // need to ouput tagged data
+   // here
+   //
+   ossim_uint32 totalLength = getTotalTagLength();
+
+   if (totalLength == 0)
+   {
+      out.write(theExtendedSubheaderDataLen, 5);
+   }
+   else
+   {
+      totalLength += 3; // per Table A-3 of MIL-STD-2500B
+      
+      if(totalLength <= 99999)
+      {
+         std::ostringstream tempOut;
+         
+         tempOut << std::setw(5)
+                 << std::setfill('0')
+                 << std::setiosflags(ios::right)
+                 << totalLength;
+         
+         memcpy(theExtendedSubheaderDataLen, tempOut.str().c_str(), 5);
+         
+         out.write(theExtendedSubheaderDataLen, 5);
+         memset(theExtendedSubheaderOverflow, '0', 3);
+         
+         if(totalLength > 0)
+         {
+            out.write(theExtendedSubheaderOverflow, 3);
+            
+            ossim_uint32 i = 0;
+            
+            for(i = 0; i < theTagList.size(); ++i)
+            {
+               theTagList[i].writeStream(out);
+            }
+         }
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "WARNING ossimNitfFileHeaderV2_1::writeStream: Only support writing of total tag length < 99999" << std::endl;
+      }
+   }
+}
+
+std::ostream& ossimNitfImageHeaderV2_1::print(std::ostream& out,
+                                              const std::string& prefix) const
+{
+   out << setiosflags(ios::left)
+       << prefix << setw(24)
+       << "IM:"     << theType << "\n"
+       << prefix << setw(24)
+       << "IID1:"   << theImageId << "\n"
+       << prefix << setw(24)
+       << "IDATIM:" << theDateTime << "\n"
+       << prefix << setw(24)
+       << "TGTID:"  << theTargetId << "\n"
+       << prefix << setw(24)
+       << "IID2:"   << theTitle << "\n"
+       << prefix << setw(24)
+       << "ISCLAS:" << theSecurityClassification << "\n"
+       << prefix << setw(24)
+       << "ISCLSY:" << theSecurityClassificationSys << "\n"
+       << prefix << setw(24)
+       << "ISCODE:" << theCodewords << "\n"
+       << prefix << setw(24)
+       << "ISCTLH:" << theControlAndHandling << "\n"
+       << prefix << setw(24)
+       << "ISREL:"  << theReleasingInstructions << "\n"
+       << prefix << setw(24)
+       << "ISDCTP:" << theDeclassificationType << "\n"
+       << prefix << setw(24)
+       << "ISDCDT:" << theDeclassificationDate << "\n"
+       << prefix << setw(24)
+       << "ISDCXM:" << theDeclassificationExempt << "\n"
+       << prefix << setw(24)
+       << "ISDG:"   << theDowngrade << "\n"
+       << prefix << setw(24)
+       << "ISDGDT:" << theDowngradeDate << "\n"
+       << prefix << setw(24)
+       << "ISCLTX:" << theClassificationText << "\n"
+       << prefix << setw(24)
+       << "ISCATP:" << theClassificationAuthType << "\n"
+       << prefix << setw(24)
+       << "ISCAUT:" << theClassificationAuthority << "\n"
+       << prefix << setw(24)
+       << "ISCRSN:" << theClassificationReason << "\n"
+       << prefix << setw(24)
+       << "ISSRDT:" << theSecuritySourceDate << "\n"
+       << prefix << setw(24)
+       << "ISCTLN:" << theSecurityControlNumber << "\n"
+       << prefix << setw(24)
+       << "ENCRYP:" << theEncryption << "\n"
+       << prefix << setw(24)
+       << "ISORCE:" << theImageSource << "\n"
+       << prefix << setw(24)
+       << "NROWS:"  << theSignificantRows << "\n"
+       << prefix << setw(24)
+       << "NCOLS:"  << theSignificantCols << "\n"
+       << prefix << setw(24)
+       << "PVTYPE:" << thePixelValueType << "\n"
+       << prefix << setw(24)
+       << "IREP:"   << theRepresentation << "\n"
+       << prefix << setw(24)
+       << "ICAT:"   << theCategory << "\n"
+       << prefix << setw(24)
+       << "ABPP:"   << theActualBitsPerPixelPerBand << "\n"
+       << prefix << setw(24)
+       << "PJUST:"  << theJustification << "\n"
+       << prefix << setw(24)
+       << "ICORDS:" << theCoordinateSystem << "\n"
+       << prefix << setw(24)
+       << "IGEOLO:" << theGeographicLocation << "\n"
+       << prefix << setw(24)
+       << "NICOM:"  << theNumberOfComments << "\n"
+       << prefix << setw(24)
+       << "IC:"     << theCompression << "\n"
+       << prefix << setw(24)
+       << "COMRAT:" << theCompressionRateCode << "\n"
+       << prefix << setw(24)
+       << "NBANDS:" << theNumberOfBands << "\n"
+       << prefix << setw(24)
+       << "XBANDS:" << theNumberOfMultispectralBands << "\n";
+   
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx < theImageBands.size(); ++idx)
+   {
+      if(theImageBands[idx].valid())
+      {
+         theImageBands[idx]->print(out, prefix, idx); 
+      }
+   }
+
+   out << prefix << setw(24)
+       << "ISYNC:"     << theImageSyncCode << "\n"
+       << prefix << setw(24)
+       << "IMODE:"     << theImageMode << "\n"
+       << prefix << setw(24)
+       << "NBPR:"      << theNumberOfBlocksPerRow << "\n"
+       << prefix << setw(24)
+       << "NBPC:"      << theNumberOfBlocksPerCol << "\n"
+       << prefix << setw(24)
+       << "NPPBH:"     << theNumberOfPixelsPerBlockHoriz << "\n"
+       << prefix << setw(24)
+       << "NPPBV:"     << theNumberOfPixelsPerBlockVert << "\n"
+       << prefix << setw(24)
+       << "NBPP:"      << theNumberOfBitsPerPixelPerBand << "\n"
+       << prefix << setw(24)
+       << "IDLVL:"     << theDisplayLevel << "\n"
+       << prefix << setw(24)
+       << "IALVL:"     << theAttachmentLevel << "\n"
+       << prefix << setw(24)
+       << "ILOC:"      << theImageLocation << "\n"
+       << prefix << setw(24)
+       << "IMAG:"      << theImageMagnification << "\n"
+       << prefix << setw(24)
+       << "UDIDL:"     << theUserDefinedImageDataLength << "\n"
+       << prefix << setw(24)
+       << "UDOFL:"     << theUserDefinedOverflow << "\n"
+       << prefix << setw(24)
+       << "IXSHDL:"    << theExtendedSubheaderDataLen << "\n"
+       << prefix << setw(24)
+       << "IXSOFL:"    << theExtendedSubheaderOverflow << "\n"
+       << prefix << setw(24)
+       << "IMDATOFF:"  << theBlockedImageDataOffset << "\n"
+       << prefix << setw(24)
+       << "BMRLNTH:"   << theBlockMaskRecordLength << "\n"
+       << prefix << setw(24)
+       << "TMRLNTH:"   << thePadPixelMaskRecordLength << "\n"
+       << prefix << setw(24)
+       << "TPXCDLNTH:" << theTransparentOutputPixelCodeLength << "\n"
+       << prefix << setw(24)
+       << "TPXCD:"     << thePadOutputPixelCode << "\n";
+
+   if ( traceDebug() )
+   {
+      out << prefix << setw(24)
+          << "theDataLocation:" << theDataLocation << "\n";
+   }
+
+   out << std::endl;
+
+   return printTags(out, prefix);
+}
+
+
+bool ossimNitfImageHeaderV2_1::saveState(ossimKeywordlist& kwl, const ossimString& prefix)const
+{
+   ossimNitfImageHeaderV2_X::saveState(kwl, prefix);
+   
+   kwl.add(prefix, "ISCLSY", theSecurityClassificationSys);
+   kwl.add(prefix, "ISCODE", theCodewords);
+   kwl.add(prefix, "ISCTLH", theControlAndHandling);
+   kwl.add(prefix, "ISREL", theReleasingInstructions);
+   kwl.add(prefix, "ISDCTP", theDeclassificationType);
+   kwl.add(prefix, "ISDCDT", theDeclassificationDate);
+   kwl.add(prefix, "ISDCXM", theDeclassificationExempt);
+   kwl.add(prefix, "ISDG", theDowngrade);
+   kwl.add(prefix, "ISDGDT", theDowngradeDate);
+   kwl.add(prefix, "ISCLTX", theClassificationText);
+   kwl.add(prefix, "ISCATP", theClassificationAuthType);
+   kwl.add(prefix, "ISCAUT", theClassificationAuthority);
+   kwl.add(prefix, "ISCRSN", theClassificationReason);
+   kwl.add(prefix, "ISSRDT", theSecuritySourceDate);
+   kwl.add(prefix, "ISCTLN", theSecurityControlNumber);
+   kwl.add(prefix, "XBANDS", theNumberOfMultispectralBands);
+   
+   ossim_uint32 idx = 0;
+   
+   std::ostringstream out;
+   if(theCompressionHeader.valid())
+   {
+      theCompressionHeader->saveState(kwl, prefix);
+   }
+
+   for(idx = 0; idx < theImageBands.size(); ++idx)
+   {
+      if(theImageBands[idx].valid())
+      {
+         theImageBands[idx]->print(out, "", idx); 
+      }
+   }
+   
+   out << std::endl;
+   
+   ossimKeywordlist kwlTemp;
+   
+   std::istringstream in(out.str());
+   if(kwlTemp.parseStream(in))
+   {
+      kwl.add(prefix, kwlTemp);
+   }
+   
+   return true;
+}
+
+bool ossimNitfImageHeaderV2_1::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   // Note: Currently not looking up all fieds only ones that make sense.
+   
+   const char* lookup;
+
+   lookup = kwl.find( prefix, ISCLSY_KW );
+   if ( lookup )
+   {
+      setSecurityClassificationSystem( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, ISCODE_KW );
+   if ( lookup )
+   {
+      setCodewords( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, ISCTLH_KW );
+   if ( lookup )
+   {
+      setControlAndHandling( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, ISREL_KW);
+   if ( lookup )
+   {
+      setReleasingInstructions( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, ISDCTP_KW );
+   if ( lookup )
+   {
+      setDeclassificationType( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, ISDCDT_KW );
+   if ( lookup )
+   {
+      setDeclassificationDate( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, ISDCXM_KW );
+   if ( lookup )
+   {
+      setDeclassificationExempt( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, ISDG_KW );
+   if ( lookup )
+   {
+      setDowngrade( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, ISDGDT_KW );
+   if ( lookup )
+   {
+      setDowngradeDate( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, ISCLTX_KW );
+   if ( lookup )
+   {
+      setClassificationText( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, ISCATP_KW );
+   if ( lookup )
+   {
+      setClassificationAuthorityType( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, ISCAUT_KW );
+   if ( lookup )
+   {
+      setClassificationAuthority( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, ISCRSN_KW );
+   if ( lookup )
+   {
+      setClassificationReason( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, ISSRDT_KW );
+   if ( lookup )
+   {
+      setSecuritySourceDate( ossimString(lookup) );
+   }
+   lookup = kwl.find( prefix, ISCTLN_KW );
+   if ( lookup )
+   {
+      setSecurityControlNumber( ossimString(lookup) );
+   }
+   
+   return ossimNitfImageHeaderV2_X::loadState(kwl, prefix);
+}
+
+bool ossimNitfImageHeaderV2_1::isCompressed()const
+{
+   ossimString temp = theCompression;
+   temp = temp.trim();
+   return ((temp != "NC") && (temp != "NM"));
+}
+
+bool ossimNitfImageHeaderV2_1::isEncrypted()const
+{
+   return (theEncryption[0] == '1');
+}
+
+ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfBands()const
+{
+   if(theNumberOfBands[0] == '0')
+   {
+      return ossimString(theNumberOfMultispectralBands).toInt32();
+   }
+   else
+   {
+      return ossimString(theNumberOfBands).toInt32();
+   }
+}
+
+ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfRows()const
+{
+   return ossimString(theSignificantRows).toInt32();
+}
+
+ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfCols()const
+{
+   return ossimString(theSignificantCols).toInt32();
+}
+
+ossimString ossimNitfImageHeaderV2_1::getImageId()const
+{
+   return theImageId;
+}
+
+ossim_int32 ossimNitfImageHeaderV2_1::getBitsPerPixelPerBand()const
+{
+   return ossimString(theNumberOfBitsPerPixelPerBand).toInt32();
+}
+
+ossim_int32 ossimNitfImageHeaderV2_1::getActualBitsPerPixelPerBand()const
+{
+   return ossimString(theActualBitsPerPixelPerBand).toInt32();
+}
+
+ossimString ossimNitfImageHeaderV2_1::getIMode() const
+{
+   return ossimString(theImageMode).trim();
+}
+
+ossimString ossimNitfImageHeaderV2_1::getSecurityClassification()const
+{
+   return theSecurityClassification;
+}
+
+ossimString  ossimNitfImageHeaderV2_1::getImageDateAndTime() const
+{
+   return ossimString(theDateTime);
+}
+
+ossimString ossimNitfImageHeaderV2_1::getAcquisitionDateMonthDayYear(ossim_uint8 separationChar)const
+{
+   ossimString result;
+
+   result += ossimString(theDateTime + 4,
+                         theDateTime + 6);
+   result += ossimString(separationChar);
+   result += ossimString(theDateTime + 6,
+                         theDateTime + 8);
+   result += ossimString(separationChar);
+   result += ossimString(theDateTime,
+                         theDateTime + 4);
+   
+   return result;
+}
+
+ossimString ossimNitfImageHeaderV2_1::getCategory()const
+{
+   return theCategory;
+}
+
+ossimString ossimNitfImageHeaderV2_1::getImageSource()const
+{
+   return theImageSource;
+}
+
+ossimString ossimNitfImageHeaderV2_1::getRepresentation()const
+{
+   return theRepresentation;
+}
+
+ossimString ossimNitfImageHeaderV2_1::getCoordinateSystem()const
+{
+   return theCoordinateSystem;
+}
+ossimString ossimNitfImageHeaderV2_1::getGeographicLocation()const
+{
+  return theGeographicLocation;
+}
+
+bool ossimNitfImageHeaderV2_1::hasBlockMaskRecords()const
+{
+   return (theBlockMaskRecords.size() > 0);
+}
+
+bool ossimNitfImageHeaderV2_1::hasPadPixelMaskRecords()const
+{
+   return (thePadPixelMaskRecords.size()>0);
+}
+
+bool ossimNitfImageHeaderV2_1::hasTransparentCode()const
+{
+   return (theTransparentOutputPixelCodeLength > 0);
+}
+
+ossim_uint32 ossimNitfImageHeaderV2_1::getTransparentCode()const
+{
+   return thePadOutputPixelCode;
+}
+
+ossim_uint32 ossimNitfImageHeaderV2_1::getBlockMaskRecordOffset(ossim_uint32 blockNumber,
+                                                                ossim_uint32 bandNumber)const
+{
+   ossim_uint32 maxBlock = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol();
+   ossim_uint32 result = 0xffffffff;
+   
+   if((hasBlockMaskRecords())&&
+      (blockNumber < maxBlock))
+   {
+      if(theImageMode[0] == 'S')
+      {
+         if(bandNumber < (ossim_uint32)getNumberOfBands())
+         {
+            result = theBlockMaskRecords[bandNumber*maxBlock + blockNumber];
+         }
+      }
+      else
+      {
+         result = theBlockMaskRecords[blockNumber];
+      }
+   }
+
+   return result;
+}
+
+ossim_uint32 ossimNitfImageHeaderV2_1::getPadPixelMaskRecordOffset(ossim_uint32 blockNumber,
+                                                                   ossim_uint32 bandNumber)const
+{
+   ossim_uint32 maxBlock = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol();
+   ossim_uint32 result = 0xffffffff;
+   
+   if((hasPadPixelMaskRecords())&&
+      (blockNumber < maxBlock))
+   {
+      if(theImageMode[0] == 'S')
+      {
+         if(bandNumber < (ossim_uint32)getNumberOfBands())
+         {
+            result = thePadPixelMaskRecords[bandNumber*maxBlock + blockNumber];
+         }
+      }
+      else
+      {
+         result = thePadPixelMaskRecords[blockNumber];
+      }
+   }
+
+   return result;
+}
+
+
+void ossimNitfImageHeaderV2_1::clearFields()
+{
+   memcpy(theType, "IM", 2);
+   memset(theImageId, ' ',10);
+   memset(theDateTime, '-',14);
+   memset(theTargetId, ' ',17);
+   memset(theTitle, ' ',80);
+   memset(theSecurityClassification, ' ',1);
+   memset(theSecurityClassificationSys, ' ',2);
+   memset(theCodewords, ' ',11);
+   memset(theControlAndHandling, ' ',2);
+   memset(theReleasingInstructions, ' ',20);
+   memset(theDeclassificationType, ' ',2);
+   memset(theDeclassificationDate, ' ',8);
+   memset(theDeclassificationExempt, ' ',4);
+   memset(theDowngrade, ' ',1);
+   memset(theDowngradeDate, ' ',8);
+   memset(theClassificationText, ' ',43);
+   memset(theClassificationAuthType, ' ',1);
+   memset(theClassificationAuthority, ' ',40);
+   memset(theClassificationReason, ' ',1);
+   memset(theSecuritySourceDate, ' ',8);
+   memset(theSecurityControlNumber, ' ',15);
+   memset(theEncryption, '0',1);
+   memset(theImageSource, ' ',42);
+   memset(theSignificantRows, '0',8);
+   memset(theSignificantCols, '0',8);
+   memset(thePixelValueType, ' ',3);
+   memset(theRepresentation, ' ',8);
+   memset(theCategory, ' ',8);
+   memset(theActualBitsPerPixelPerBand, ' ',2);
+   memset(theJustification, 'R',1);
+   memset(theCoordinateSystem, ' ',1);
+   memset(theGeographicLocation, ' ',60);
+   memset(theNumberOfComments, '0', 1);
+   memcpy(theCompression, "NC",2);
+   memset(theCompressionRateCode, ' ',4);
+   memset(theNumberOfBands, '0',1);
+   memset(theNumberOfMultispectralBands, ' ',5);
+   memset(theImageSyncCode, '0', 1);
+   memset(theImageMode, 'B', 1);
+   memset(theNumberOfBlocksPerRow, '0', 4);
+   memset(theNumberOfBlocksPerCol, '0', 4);
+   memset(theNumberOfPixelsPerBlockHoriz, '0', 4);
+   memset(theNumberOfPixelsPerBlockVert, '0', 4);
+   memset(theNumberOfBitsPerPixelPerBand, '0', 2);
+   memcpy(theDisplayLevel, "001", 3);
+   memset(theAttachmentLevel, '0', 3);
+   memset(theImageLocation, '0', 10);
+   memcpy(theImageMagnification, "1.0 ", 4);
+   
+   memset(theUserDefinedImageDataLength,'0', 5);
+   memset(theUserDefinedOverflow, '0', 3);
+   memset(theExtendedSubheaderDataLen, '0', 5);
+   memset(theExtendedSubheaderOverflow, '0', 3);
+   theBlockMaskRecords.clear();
+   thePadPixelMaskRecords.clear();
+
+   theBlockedImageDataOffset = 0;
+   theBlockMaskRecordLength = 0;
+   thePadPixelMaskRecordLength = 0;
+   theTransparentOutputPixelCodeLength = 0;
+   thePadOutputPixelCode = 0;
+   
+   theCompressionHeader = 0;
+   
+   theType[2] = '\0';
+   theImageId[10] = '\0';
+   theDateTime[14] = '\0';
+   theTargetId[17] = '\0';
+   theTitle[80] = '\0';
+   theSecurityClassification[1] = '\0';
+   theSecurityClassificationSys[2] = '\0';
+   theCodewords[11] = '\0';
+   theControlAndHandling[2] = '\0';
+   theReleasingInstructions[20] = '\0';
+   theDeclassificationType[2] = '\0';
+   theDeclassificationDate[8] = '\0';
+   theDeclassificationExempt[4] = '\0';
+   theDowngrade[1] = '\0';
+   theDowngradeDate[8] = '\0';
+   theClassificationText[43] = '\0';
+   theClassificationAuthType[1] = '\0';
+   theClassificationAuthority[40] = '\0';
+   theClassificationReason[1] = '\0';
+   theSecuritySourceDate[8] = '\0';
+   theSecurityControlNumber[15] = '\0';
+   theEncryption[1] = '\0';
+   theImageSource[42] = '\0';
+   theSignificantRows[8] = '\0';
+   theSignificantCols[8] = '\0';
+   thePixelValueType[3] = '\0';
+   theRepresentation[8] = '\0';
+   theCategory[8] = '\0';
+   theActualBitsPerPixelPerBand[2] = '\0';
+   theJustification[1] = '\0';
+   theCoordinateSystem[1] = '\0';
+   theGeographicLocation[60] = '\0';
+   theNumberOfComments[1] = '\0';
+   theCompression[2] = '\0';
+   theCompressionRateCode[4] = '\0';
+   theNumberOfBands[1] = '\0';
+   theNumberOfMultispectralBands[5] = '\0';
+   theImageSyncCode[1] = '\0';
+   theImageMode[1] = '\0';
+   theNumberOfBlocksPerRow[4] = '\0';
+   theNumberOfBlocksPerCol[4] = '\0';
+   theNumberOfPixelsPerBlockHoriz[4] = '\0';
+   theNumberOfPixelsPerBlockVert[4] = '\0';
+   theNumberOfBitsPerPixelPerBand[2] = '\0';
+   theDisplayLevel[3] = '\0';
+   theAttachmentLevel[3] = '\0';
+   theImageLocation[10] = '\0';
+   theImageMagnification[4] = '\0';
+   theUserDefinedImageDataLength[5] = '\0';
+   theUserDefinedOverflow[3] = '\0';
+   theExtendedSubheaderDataLen[5] = '\0';
+   theExtendedSubheaderOverflow[3] = '\0';
+   
+   theDataLocation = 0;
+}
+
+ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfBlocksPerRow()const
+{
+   return ossimString(theNumberOfBlocksPerRow).toInt32();
+}
+
+ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfBlocksPerCol()const
+{
+   return ossimString(theNumberOfBlocksPerCol).toInt32();
+}
+
+ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfPixelsPerBlockHoriz()const
+{
+ //  return ossimString(theNumberOfPixelsPerBlockHoriz).toInt32();
+   ossim_int32 rval = ossimString(theNumberOfPixelsPerBlockHoriz).toInt32();
+   if ((rval == 0) && (getNumberOfBlocksPerCol() == 1))
+   {
+      rval = getNumberOfCols();
+   }
+   return rval;
+   
+}
+
+ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfPixelsPerBlockVert()const
+{
+//   return ossimString(theNumberOfPixelsPerBlockVert).toInt32();
+   ossim_int32 rval = ossimString(theNumberOfPixelsPerBlockVert).toInt32();
+   if ((rval == 0) && (getNumberOfBlocksPerRow() == 1))
+   {
+      rval = getNumberOfRows();
+   }
+   return rval;
+}
+
+ossimIrect ossimNitfImageHeaderV2_1::getImageRect()const
+{
+   ossimDpt ul(ossimString((char*)(&theImageLocation[5])).toDouble(),
+               ossimString((char*)theImageLocation,
+                           (char*)(&theImageLocation[5])).toDouble());
+   
+    double rows = ossimString(theSignificantRows).toDouble();
+    double cols = ossimString(theSignificantCols).toDouble();
+
+    ossimDpt lr(ul.x + cols-1,
+                ul.y + rows-1);
+   
+    return ossimIrect(ul, lr);
+}
+
+ossimIrect ossimNitfImageHeaderV2_1::getBlockImageRect()const
+{
+   ossimDpt ul(ossimString((char*)(&theImageLocation[5])).toDouble(),
+               ossimString((char*)theImageLocation,
+                           (char*)(&theImageLocation[5])).toDouble());
+   
+   double rows = getNumberOfPixelsPerBlockVert()*getNumberOfBlocksPerCol();
+   double cols = getNumberOfPixelsPerBlockHoriz()*getNumberOfBlocksPerRow();;
+   
+   ossimDpt lr(ul.x + cols-1,
+               ul.y + rows-1);
+   
+    return ossimIrect(ul, lr);
+}
+
+
+ossimString ossimNitfImageHeaderV2_1::getPixelValueType()const
+{
+   return ossimString(thePixelValueType).trim();
+}
+
+
+void ossimNitfImageHeaderV2_1::setNumberOfBands(ossim_uint32 nbands)
+{
+   std::ostringstream out;
+
+   if(nbands > 9)
+   {
+      out << std::setw(5)
+          << std::setfill('0')
+          << std::setiosflags(ios::right)
+          << nbands;
+
+      theNumberOfBands[0] = '0';
+      memcpy(theNumberOfMultispectralBands, out.str().c_str(), 5);
+   }
+   else
+   {
+      out << nbands;
+      theNumberOfBands[0] = out.str().c_str()[0];
+   }
+
+   theImageBands.resize(getNumberOfBands());
+}
+
+void ossimNitfImageHeaderV2_1::setBandInfo(ossim_uint32 idx,
+                                           const ossimNitfImageBandV2_1& info)
+{
+   if(idx < theImageBands.size())
+   {
+      if(!theImageBands[idx].valid())
+      {
+         theImageBands[idx] = new ossimNitfImageBandV2_1;
+      }
+      (*theImageBands[idx]) = info;
+   }
+}
+
+void ossimNitfImageHeaderV2_1::setNumberOfRows(ossim_uint32 rows)
+{
+   std::ostringstream out;
+   if(rows > 99999999) rows = 99999999;
+   
+   out << rows;
+   ossimNitfCommon::setField(theSignificantRows, out.str(), 8, ios::right, '0');
+}
+
+void ossimNitfImageHeaderV2_1::setNumberOfCols(ossim_uint32 cols)
+{
+   std::ostringstream out;
+   if(cols > 99999999) cols = 99999999;
+
+   out << cols;
+   ossimNitfCommon::setField(theSignificantCols, out.str(), 8, ios::right, '0');
+}
+
+void ossimNitfImageHeaderV2_1::setGeographicLocationDms(const ossimDpt& ul,
+                                                        const ossimDpt& ur,
+                                                        const ossimDpt& lr,
+                                                        const ossimDpt& ll)
+{
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << ossimDms(ul.y, true).toString("ddmmss.ssssC").c_str()
+         << ossimDms(ul.x, false).toString("dddmmss.ssssC").c_str()
+         << ossimDms(ur.y, true).toString("ddmmss.ssssC").c_str()
+         << ossimDms(ur.x, false).toString("dddmmss.ssssC").c_str()
+         << ossimDms(lr.y, true).toString("ddmmss.ssssC").c_str()
+         << ossimDms(lr.x, false).toString("dddmmss.ssssC").c_str()
+         << ossimDms(ll.y, true).toString("ddmmss.ssssC").c_str()
+         << ossimDms(ll.x, false).toString("dddmmss.ssssC").c_str()
+         << std::endl;
+
+      checkForGeographicTiePointTruncation(ul);
+      checkForGeographicTiePointTruncation(ur);
+      checkForGeographicTiePointTruncation(lr);
+      checkForGeographicTiePointTruncation(ll);
+   }
+      
+   theCoordinateSystem[0] = 'G';
+   std::ostringstream out;
+
+   out << ossimDms(ul.y, true).toString("ddmmssC").c_str();
+   out << ossimDms(ul.x, false).toString("dddmmssC").c_str();
+   out << ossimDms(ur.y, true).toString("ddmmssC").c_str();
+   out << ossimDms(ur.x, false).toString("dddmmssC").c_str();
+   out << ossimDms(lr.y, true).toString("ddmmssC").c_str();
+   out << ossimDms(lr.x, false).toString("dddmmssC").c_str();
+   out << ossimDms(ll.y, true).toString("ddmmssC").c_str();
+   out << ossimDms(ll.x, false).toString("dddmmssC").c_str();
+
+   memcpy(theGeographicLocation, out.str().c_str(), 60);
+}
+
+void ossimNitfImageHeaderV2_1::setGeographicLocationDecimalDegrees(
+   const ossimDpt& ul,
+   const ossimDpt& ur,
+   const ossimDpt& lr,
+   const ossimDpt& ll)
+{
+   theCoordinateSystem[0] = 'D';
+   ostringstream out;
+
+   out << (ul.lat >= 0.0?"+":"")
+       << std::setw(6)
+       << std::setfill('0')
+       << std::setprecision(3)
+       << std::setiosflags(std::ios::fixed)
+       << ul.lat
+       << (ul.lon >= 0.0?"+":"")
+       << std::setw(7)
+       << std::setfill('0')
+       << std::setprecision(3)
+       << std::setiosflags(std::ios::fixed)
+       << ul.lon;
+   out << (ur.lat >= 0.0?"+":"")
+       << std::setw(6)
+       << std::setfill('0')
+       << std::setprecision(3)
+       << std::setiosflags(std::ios::fixed)
+       << ur.lat
+       << (ur.lon >= 0.0?"+":"")
+       << std::setw(7)
+       << std::setfill('0')
+       << std::setprecision(3)
+       << std::setiosflags(std::ios::fixed)
+       << ur.lon;
+   out << (lr.lat >= 0.0?"+":"")
+       << std::setw(6)
+       << std::setfill('0')
+       << std::setprecision(3)
+       << std::setiosflags(std::ios::fixed)
+       << lr.lat
+       << (lr.lon >= 0.0?"+":"")
+       << std::setw(7)
+       << std::setfill('0')
+       << std::setprecision(3)
+       << std::setiosflags(std::ios::fixed)
+       << lr.lon;
+   out << (ll.lat >= 0.0?"+":"")
+       << std::setw(6)
+       << std::setfill('0')
+       << std::setprecision(3)
+       << std::setiosflags(std::ios::fixed)
+       << ll.lat
+       << (ll.lon >= 0.0?"+":"")
+       << std::setw(7)
+       << std::setfill('0')
+       << std::setprecision(3)
+       << std::setiosflags(std::ios::fixed)
+       << ll.lon;
+
+   memcpy(theGeographicLocation, out.str().c_str(), 60);
+}
+
+void ossimNitfImageHeaderV2_1::setUtmNorth(ossim_uint32 zone,
+                                           const ossimDpt& ul,
+                                           const ossimDpt& ur,
+                                           const ossimDpt& lr,
+                                           const ossimDpt& ll)
+{
+   theCoordinateSystem[0] = 'N';
+   
+   memcpy(theGeographicLocation,
+          encodeUtm(zone, ul, ur, lr, ll).c_str(), 60);
+}
+
+void ossimNitfImageHeaderV2_1::setUtmSouth(ossim_uint32 zone,
+                                           const ossimDpt& ul,
+                                           const ossimDpt& ur,
+                                           const ossimDpt& lr,
+                                           const ossimDpt& ll)
+{
+   theCoordinateSystem[0] = 'S';
+   
+   memcpy(theGeographicLocation,
+          encodeUtm(zone, ul, ur, lr, ll).c_str(), 60);
+}
+
+
+void ossimNitfImageHeaderV2_1::setSecurityClassificationSystem(const ossimString& value)
+{
+   ossimNitfCommon::setField(theSecurityClassificationSys, value, 2);
+}
+
+void ossimNitfImageHeaderV2_1::setCodewords(const ossimString& value)
+{
+   ossimNitfCommon::setField(theCodewords, value, 11);
+}
+
+void ossimNitfImageHeaderV2_1::setControlAndHandling(const ossimString& value)
+{
+   ossimNitfCommon::setField(theControlAndHandling, value, 2);
+}
+
+void ossimNitfImageHeaderV2_1::setReleasingInstructions(const ossimString& value)
+{
+   ossimNitfCommon::setField(theReleasingInstructions, value, 20);
+}
+
+void ossimNitfImageHeaderV2_1::setDeclassificationType(const ossimString& value)
+{
+   ossimNitfCommon::setField(theDeclassificationType, value, 2);
+}
+
+void ossimNitfImageHeaderV2_1::setDeclassificationDate(const ossimString& value)
+{
+   ossimNitfCommon::setField(theDeclassificationDate, value, 8);
+}
+
+void ossimNitfImageHeaderV2_1::setDeclassificationExempt(const ossimString& value)
+{
+   ossimNitfCommon::setField(theDeclassificationExempt, value, 4);
+}
+
+void ossimNitfImageHeaderV2_1::setDowngrade(const ossimString& value)
+{
+   ossimNitfCommon::setField(theDowngrade, value, 1);
+}
+
+void ossimNitfImageHeaderV2_1::setDowngradeDate(const ossimString& value)
+{
+   ossimNitfCommon::setField(theDowngradeDate, value, 8);
+}
+
+void ossimNitfImageHeaderV2_1::setClassificationText(const ossimString& value)
+{
+   ossimNitfCommon::setField(theClassificationText, value, 43);
+}
+
+void ossimNitfImageHeaderV2_1::setClassificationAuthorityType(const ossimString& value)
+{
+   ossimNitfCommon::setField(theClassificationAuthType, value, 1);
+}
+
+void ossimNitfImageHeaderV2_1::setClassificationAuthority(const ossimString& value)
+{
+   ossimNitfCommon::setField(theClassificationAuthority, value, 40);
+}
+
+void ossimNitfImageHeaderV2_1::setClassificationReason(const ossimString& value)
+{
+   ossimNitfCommon::setField(theClassificationReason, value, 1);
+}
+
+void ossimNitfImageHeaderV2_1::setSecuritySourceDate(const ossimString& value)
+{
+   ossimNitfCommon::setField(theSecuritySourceDate, value, 8);
+}
+
+void ossimNitfImageHeaderV2_1::setSecurityControlNumber(const ossimString& value)
+{
+   ossimNitfCommon::setField(theSecurityControlNumber, value, 15);
+}
+
+void ossimNitfImageHeaderV2_1::setImageMagnification(const ossimString& value)
+{
+   ossimNitfCommon::setField(theImageMagnification, value, 4);
+}
+
+void ossimNitfImageHeaderV2_1::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   ossimString name = property->getName();
+
+   // Make case insensitive:
+   name.downcase();
+   
+   std::ostringstream out;
+   
+   if(!property) return;
+   
+   if(name.contains(ISCLSY_KW))
+   {
+      setSecurityClassificationSystem(property->valueToString());
+   }
+   else if(name.contains(ISCODE_KW))
+   {
+      setCodewords(property->valueToString());
+   }
+   else if(name.contains(ISCTLH_KW))
+   {
+      setControlAndHandling(property->valueToString());
+   }
+   else if(name.contains(ISREL_KW))
+   {
+      setReleasingInstructions(property->valueToString());
+   }
+   else if(name.contains(ISDCTP_KW))
+   {
+      setDeclassificationType(property->valueToString());
+   }
+   else if(name.contains(ISDCDT_KW))
+   {
+      setDeclassificationDate(property->valueToString());
+   }
+   else if(name.contains(ISDCXM_KW))
+   {
+      setDeclassificationExempt(property->valueToString());
+   }
+   else if(name.contains(ISDGDT_KW)) // Must be before: "ISDG_KW"
+   {
+      setDowngradeDate(property->valueToString());
+   }   
+   else if(name.contains(ISDG_KW))
+   {
+      setDowngrade(property->valueToString());
+   }
+   else if(name.contains(ISCLTX_KW))
+   {
+      setClassificationText(property->valueToString());
+   }
+   else if(name.contains(ISCATP_KW))
+   {
+      setClassificationAuthorityType(property->valueToString());
+   }
+   else if(name.contains(ISCAUT_KW))
+   {
+      setClassificationAuthority(property->valueToString());
+   }
+   else if(name.contains(ISCRSN_KW))
+   {
+      setClassificationReason(property->valueToString());
+   }
+   else if(name.contains(ISSRDT_KW))
+   {
+      setSecuritySourceDate(property->valueToString());
+   }
+   else if(name.contains(ISCTLN_KW))
+   {
+      setSecurityControlNumber(property->valueToString());
+   }
+   else
+   {
+      ossimNitfImageHeaderV2_X::setProperty(property);
+   }
+}
+
+ossimRefPtr<ossimProperty> ossimNitfImageHeaderV2_1::getProperty(const ossimString& name)const
+{
+   ossimProperty* property = 0;
+
+   if(name == ISCLSY_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         ossimString(theSecurityClassificationSys).trim());
+   }
+   else if(name == ISCODE_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         ossimString(theCodewords).trim());
+   }
+   else if(name == ISCTLH_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         ossimString(theControlAndHandling).trim());
+   }
+   else if(name == ISREL_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         ossimString(theReleasingInstructions).trim());
+   }
+   else if(name == ISDCTP_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         ossimString(theDeclassificationType).trim());
+   }
+   else if(name == ISDCDT_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         ossimString(theDeclassificationDate).trim());
+   }
+   else if(name == ISDCXM_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         ossimString(theDeclassificationExempt).trim());
+   }
+   else if(name == ISDG_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         ossimString(theDowngrade).trim());
+   }
+   else if(name == ISDGDT_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         ossimString(theDowngradeDate).trim());
+   }
+   else if(name == ISCLTX_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         ossimString(theClassificationText).trim());
+   }
+   else if(name == ISCATP_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         ossimString(theClassificationAuthType).trim());
+   }
+   else if(name == ISCAUT_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         ossimString(theClassificationAuthority).trim());
+   }
+   else if(name == ISCRSN_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         ossimString(theClassificationReason).trim());
+   }
+   else if(name == ISSRDT_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         ossimString(theSecuritySourceDate).trim());
+   }
+   else if(name == ISCTLN_KW)
+   {
+      property = new ossimStringProperty(name,
+                                         ossimString(theSecurityControlNumber).trim());
+   }
+   else
+   {
+      return ossimNitfImageHeaderV2_X::getProperty(name);
+   }
+   
+   return property;
+}
+
+void ossimNitfImageHeaderV2_1::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimNitfImageHeaderV2_X::getPropertyNames(propertyNames);
+
+   propertyNames.push_back(ISCLSY_KW);
+   propertyNames.push_back(ISCODE_KW);
+   propertyNames.push_back(ISCTLH_KW);
+   propertyNames.push_back(ISREL_KW);
+   propertyNames.push_back(ISDCTP_KW);
+   propertyNames.push_back(ISDCDT_KW);
+   propertyNames.push_back(ISDCXM_KW);
+   propertyNames.push_back(ISDG_KW);
+   propertyNames.push_back(ISDGDT_KW);
+   propertyNames.push_back(ISCLTX_KW);
+   propertyNames.push_back(ISCATP_KW);
+   propertyNames.push_back(ISCAUT_KW);
+   propertyNames.push_back(ISCRSN_KW);
+   propertyNames.push_back(ISSRDT_KW);
+   propertyNames.push_back(ISCTLN_KW);
+   propertyNames.push_back(XBANDS_KW);
+}
+
+const ossimRefPtr<ossimNitfCompressionHeader> ossimNitfImageHeaderV2_1::getCompressionHeader()const
+{
+   return theCompressionHeader;
+}
+
+const ossimRefPtr<ossimNitfImageBand> ossimNitfImageHeaderV2_1::getBandInformation(ossim_uint32 idx)const
+{
+   if(idx < theImageBands.size())
+   {
+      return (ossimNitfImageBand*)theImageBands[idx].get();
+   }
+   
+   return 0;
+}
+
+
+ossimString ossimNitfImageHeaderV2_1::encodeUtm(
+   ossim_uint32 zone,
+   const ossimDpt& ul,
+   const ossimDpt& ur,
+   const ossimDpt& lr,
+   const ossimDpt& ll) const
+{
+   ostringstream out;
+
+   if(zone > 60)
+   {
+      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUTM zone greate than 60!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+   
+   ossim_float64 east  = ul.x;
+   ossim_float64 north = ul.y;
+   
+   if((ossim_uint32)(east+.5) > 999999)
+   {
+      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUpper left easting too large for NITF field!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+   
+   if((ossim_uint32)(north+.5) > 9999999)
+   {
+      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUpper left northing too large for NITF field!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+
+   out << setw(2)
+       << setfill('0')
+       << zone
+       << setw(6)
+       << setfill('0')
+       <<(ossim_uint32)(east+.5)
+       << setw(7)
+          << setfill('0')
+       <<(ossim_uint32)(north+.5);
+
+   
+   east  = ur.x;
+   north = ur.y;
+   
+   if((ossim_uint32)(east+.5) > 999999)
+   {
+      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUpper right easting too large for NITF field!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+   
+   if((ossim_uint32)(north+.5) > 9999999)
+   {
+      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUpper right northing too large for NITF field!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+   
+   out << setw(2)
+       << setfill('0')
+       << zone
+       << setw(6)
+       << setfill('0')
+       <<(ossim_uint32)(east+.5)
+       << setw(7)
+       << setfill('0')
+       <<(ossim_uint32)(north+.5);
+   east  = lr.x;
+   north = lr.y;
+
+   if((ossim_uint32)(east+.5) > 999999)
+   {
+      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nLower right easting too large for NITF field!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+   
+   if((ossim_uint32)(north+.5) > 9999999)
+   {
+      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nLower right northing too large for NITF field!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }   
+
+   out << setw(2)
+       << setfill('0')
+       << zone
+       << setw(6)
+       << setfill('0')
+       <<(ossim_uint32)(east+.5)
+       << setw(7)
+       << setfill('0')
+       <<(ossim_uint32)(north+.5);
+   
+   east  = ll.x;
+   north = ll.y;
+
+   if((ossim_uint32)(east+.5) > 999999)
+   {
+      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nLower left easting too large for NITF field!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+   
+   if((ossim_uint32)(north+.5) > 9999999)
+   {
+      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nLower left northing too large for NITF field!";
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
+      }
+      throw std::out_of_range(s);
+   }
+   
+   out << setw(2)
+       << setfill('0')
+       << zone
+       << setw(6)
+       << setfill('0')
+       <<(ossim_uint32)(east+.5)
+       << setw(7)
+       << setfill('0')
+       <<(ossim_uint32)(north+.5);
+   
+   return out.str().c_str();
+}
+
+bool ossimNitfImageHeaderV2_1::takeOverflowTags(std::vector<ossimNitfTagInformation> &overflowTags,
+   ossim_uint32 potentialDesIndex, bool userDefinedTags)
+{
+   overflowTags.clear();
+   std::vector<ossimNitfTagInformation>::iterator iter;
+   std::vector<ossimNitfTagInformation> specifiedTags;
+   const ossimString tagType(userDefinedTags ? "UDID" : "IXSHD");
+   for (iter = theTagList.begin(); iter != theTagList.end(); ++iter)
+   {
+      if (iter->getTagType() == tagType)
+      {
+         specifiedTags.push_back(*iter);
+      }
+   }
+
+   std::sort(specifiedTags.begin(), specifiedTags.end());
+
+   ossim_uint32 totalSize = 0;
+   const ossim_uint32 maxSize = 9996;
+   for (iter = specifiedTags.begin(); iter != specifiedTags.end() &&
+      totalSize + iter->getTotalTagLength() <= maxSize; ++iter)
+   {
+      totalSize += iter->getTotalTagLength();
+   }
+
+   for (; iter != specifiedTags.end(); ++iter)
+   {
+      overflowTags.push_back(*iter);
+      removeTag(iter->getTagName());
+   }
+
+   // If there are no overflow tags, then no DES is required
+   if (overflowTags.empty() == true)
+   {
+      potentialDesIndex = 0;
+   }
+
+   std::ostringstream overflowDes;
+   overflowDes << std::setw(3)
+           << std::setfill('0')
+           << std::setiosflags(ios::right)
+           << potentialDesIndex;
+
+   std::ostringstream tagLength;
+   tagLength << std::setw(5)
+           << std::setfill('0')
+           << std::setiosflags(ios::right)
+           << totalSize;
+
+   if (userDefinedTags)
+   {
+      strcpy(theUserDefinedOverflow, overflowDes.str().c_str());
+      strcpy(theUserDefinedImageDataLength, tagLength.str().c_str());
+   }
+   else
+   {
+      strcpy(theExtendedSubheaderOverflow, overflowDes.str().c_str());
+      strcpy(theExtendedSubheaderDataLen, tagLength.str().c_str());
+   }
+
+   return (overflowTags.empty() == false);
+}
+
+
diff --git a/src/ossim/support_data/ossimNitfImageHeaderV2_X.cpp b/ossim/src/ossim/support_data/ossimNitfImageHeaderV2_X.cpp
similarity index 100%
rename from src/ossim/support_data/ossimNitfImageHeaderV2_X.cpp
rename to ossim/src/ossim/support_data/ossimNitfImageHeaderV2_X.cpp
diff --git a/src/ossim/support_data/ossimNitfImageLut.cpp b/ossim/src/ossim/support_data/ossimNitfImageLut.cpp
similarity index 100%
rename from src/ossim/support_data/ossimNitfImageLut.cpp
rename to ossim/src/ossim/support_data/ossimNitfImageLut.cpp
diff --git a/src/ossim/support_data/ossimNitfImageLutV2_0.cpp b/ossim/src/ossim/support_data/ossimNitfImageLutV2_0.cpp
similarity index 100%
rename from src/ossim/support_data/ossimNitfImageLutV2_0.cpp
rename to ossim/src/ossim/support_data/ossimNitfImageLutV2_0.cpp
diff --git a/src/ossim/support_data/ossimNitfImageLutV2_1.cpp b/ossim/src/ossim/support_data/ossimNitfImageLutV2_1.cpp
similarity index 100%
rename from src/ossim/support_data/ossimNitfImageLutV2_1.cpp
rename to ossim/src/ossim/support_data/ossimNitfImageLutV2_1.cpp
diff --git a/ossim/src/ossim/support_data/ossimNitfInfo.cpp b/ossim/src/ossim/support_data/ossimNitfInfo.cpp
new file mode 100644
index 0000000..1f11e12
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfInfo.cpp
@@ -0,0 +1,60 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: NITF Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <iostream>
+
+#include <ossim/support_data/ossimNitfInfo.h>
+
+ossimNitfInfo::ossimNitfInfo()
+   : m_nitfFile(0)
+{
+}
+
+ossimNitfInfo::~ossimNitfInfo()
+{
+   m_nitfFile = 0;
+}
+
+bool ossimNitfInfo::open(const ossimFilename& file)
+{
+   m_nitfFile = new ossimNitfFile();
+
+   bool result = m_nitfFile->parseFile(file);
+
+   if (result == false)
+   {
+      m_nitfFile = 0;
+   }
+
+   return result;
+}
+
+std::ostream& ossimNitfInfo::print(std::ostream& out) const
+{
+   if ( m_nitfFile.valid() )
+   {
+      std::string prefix;
+      m_nitfFile->print(out, prefix, getProcessOverviewFlag());
+   }
+   return out;
+}
+
+bool ossimNitfInfo::getKeywordlist(ossimKeywordlist& kwl)const
+{
+   bool result = false;
+   if ( m_nitfFile.valid() )
+   {
+      m_nitfFile->saveState(kwl, "nitf.");
+   }
+   
+   return result;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfJ2klraTag.cpp b/ossim/src/ossim/support_data/ossimNitfJ2klraTag.cpp
new file mode 100644
index 0000000..d8e8a4f
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfJ2klraTag.cpp
@@ -0,0 +1,182 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimNitfJ2klraTag.cpp
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: NITF J2KLRA tag.
+//
+// See:  ISO/IEC BIIF Profile BPJ2K01.00 Table 9-3.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+
+#include <ossim/support_data/ossimNitfJ2klraTag.h>
+#include <ossim/base/ossimString.h>
+
+#include <cstring> /* for memcpy */
+#include <iomanip>
+#include <istream>
+#include <ostream>
+
+RTTI_DEF1(ossimNitfJ2klraTag, "ossimNitfJ2klraTag", ossimNitfRegisteredTag);
+
+ossimNitfJ2klraTag::ossimNitfJ2klraTag()
+   : ossimNitfRegisteredTag(std::string("J2KLRA"), 0),
+     m_layer(1)
+{
+   clearFields();
+}
+
+void ossimNitfJ2klraTag::parseStream(std::istream& in)
+{
+   clearFields();
+   
+   in.read(m_orig, ORIG_SIZE);
+   in.read(m_levels_o, NLEVELS_O_SIZE);
+   in.read(m_bands_o, NBANDS_O_SIZE);
+   in.read(m_layers_o, NLAYERS_O_SIZE);
+
+   ossim_uint32 layers = getNumberOfLayersOriginal();
+   if ( layers && (layers < 1000) ) // 999 max
+   {
+      m_layer.resize(layers);
+      for ( ossim_uint32 i = 0; i < layers; ++i )
+      {
+         in.read(m_layer[i].m_layer_id, LAYER_ID_SIZE);
+         in.read(m_layer[i].m_bitrate, BITRATE_SIZE);
+         m_layer[i].m_layer_id[LAYER_ID_SIZE] = '\0';
+         m_layer[i].m_bitrate[BITRATE_SIZE]   = '\0';
+      }
+   }
+   else
+   {
+      m_layer.clear();
+   }
+
+   // Conditional:
+   ossim_uint32 orig = getOriginNumber();
+   if ( (orig == 1) || ( orig == 3 ) || ( orig == 9 ) )
+   {
+      in.read(m_nlevels_i, NLEVELS_I_SIZE);
+      in.read(m_nbands_i, NBANDS_I_SIZE);
+      in.read(m_nlayers_i, NLAYERS_I_SIZE);
+   }
+
+   // Set the base tag length.
+   setTagLength( getSizeInBytes() );
+}
+
+void ossimNitfJ2klraTag::writeStream(std::ostream& out)
+{
+   out.write(m_orig, ORIG_SIZE);
+   out.write(m_levels_o, NLEVELS_O_SIZE);
+   out.write(m_bands_o, NBANDS_O_SIZE);
+   out.write(m_layers_o, NLAYERS_O_SIZE);
+   
+   ossim_uint32 size = m_layer.size();
+   for ( ossim_uint32 i = 0; i < size; ++i )
+   {
+      out.write(m_layer[i].m_layer_id, LAYER_ID_SIZE);
+      out.write(m_layer[i].m_bitrate, BITRATE_SIZE);
+   }
+
+   // Conditional:
+   ossim_uint32 orig = getOriginNumber();
+   if ( (orig == 1) || ( orig == 3 ) || ( orig == 9 ) )
+   {
+      out.write(m_nlevels_i, NLEVELS_I_SIZE);
+      out.write(m_nbands_i, NBANDS_I_SIZE);
+      out.write(m_nlayers_i, NLAYERS_I_SIZE);
+   }
+}
+
+ossim_uint32 ossimNitfJ2klraTag::getSizeInBytes()const
+{
+   ossim_uint32 result = 11 + (m_layer.size() * 12);
+
+   // Conditional:
+   ossim_uint32 orig = getOriginNumber();
+   if ( (orig == 1) || ( orig == 3 ) || ( orig == 9 ) )
+   {
+      result += 10;
+   }
+   return result;
+}
+
+void ossimNitfJ2klraTag::clearFields()
+{
+   memset(m_orig, 0, ORIG_SIZE);
+
+   memset(m_levels_o, 0, NLEVELS_O_SIZE);
+   memset(m_bands_o, 0, NBANDS_O_SIZE);
+   memset(m_layers_o, 0, NLAYERS_O_SIZE);
+
+   m_layer.clear();
+
+   memset(m_nlevels_i, 0, NLEVELS_I_SIZE);
+   memset(m_nbands_i, 0, NBANDS_I_SIZE);
+   memset(m_nlayers_i, 0, NLAYERS_I_SIZE);
+   
+   m_orig[ORIG_SIZE]= '\0';
+   
+   m_levels_o[NLEVELS_O_SIZE]= '\0';
+   m_bands_o[NBANDS_O_SIZE]= '\0';
+   m_layers_o[NLAYERS_O_SIZE]= '\0';
+
+   m_nlevels_i[NLEVELS_I_SIZE]= '\0';
+   m_nbands_i[NBANDS_I_SIZE] = '\0';
+   m_nlayers_i[NLAYERS_I_SIZE] = '\0';
+
+   // Set the base tag length.
+   setTagLength( 0 );
+}
+
+std::ostream& ossimNitfJ2klraTag::print(std::ostream& out,
+                                        const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+   
+   out << setiosflags(ios::left)
+       << pfx << std::setw(24) << "CETAG:"     << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:"       << getTagLength() << "\n"
+       << pfx << std::setw(24) << "ORIG:"      << m_orig << "\n"
+       << pfx << std::setw(24) << "NLEVELS_O:" << m_levels_o << "\n"
+       << pfx << std::setw(24) << "NBANDS_O:"  << m_bands_o << "\n"
+       << pfx << std::setw(24) << "NLAYERS_O:" << m_layers_o << "\n";
+
+   ossim_uint32 size = m_layer.size();
+   for ( ossim_uint32 i = 0; i < size; ++i )
+   {
+      out << pfx << "LAYER_ID[" << i << std::setw(14) << "]:" << m_layer[i].m_layer_id << "\n"
+          << pfx << "BITRATE[" << i << std::setw(15) << "]:" << m_layer[i].m_bitrate << "\n";
+   }
+
+   // Conditional:
+   ossim_uint32 orig = getOriginNumber();
+   if ( (orig == 1) || ( orig == 3 ) || ( orig == 9 ) )
+   {
+      out << pfx << std::setw(24) << "NLEVELS_I:"     << m_nlevels_i << "\n"
+          << pfx << std::setw(24) << "NBANDS_I_SIZE:" << m_nbands_i << "\n"
+          << pfx << std::setw(24) << "NLAYERS_I:"     << m_nlayers_i << "\n";
+   }
+   return out;
+}
+   
+ossim_uint32 ossimNitfJ2klraTag::getOriginNumber() const
+{
+   return ossimString(m_orig).toUInt32();
+}
+   
+ossim_uint32 ossimNitfJ2klraTag::getNumberOfLayersOriginal() const
+{
+   return ossimString(m_layers_o).toUInt32();
+}
+
diff --git a/src/ossim/support_data/ossimNitfLabelHeader.cpp b/ossim/src/ossim/support_data/ossimNitfLabelHeader.cpp
similarity index 100%
rename from src/ossim/support_data/ossimNitfLabelHeader.cpp
rename to ossim/src/ossim/support_data/ossimNitfLabelHeader.cpp
diff --git a/src/ossim/support_data/ossimNitfLabelHeaderV2_0.cpp b/ossim/src/ossim/support_data/ossimNitfLabelHeaderV2_0.cpp
similarity index 100%
rename from src/ossim/support_data/ossimNitfLabelHeaderV2_0.cpp
rename to ossim/src/ossim/support_data/ossimNitfLabelHeaderV2_0.cpp
diff --git a/ossim/src/ossim/support_data/ossimNitfLocalCartographicTag.cpp b/ossim/src/ossim/support_data/ossimNitfLocalCartographicTag.cpp
new file mode 100644
index 0000000..f60a00b
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfLocalCartographicTag.cpp
@@ -0,0 +1,137 @@
+//*******************************************************************
+//
+// LICENSE: MIT
+//
+// see top level LICENSE.txt
+// 
+// Author: Garrett Potts
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfLocalCartographicTag.cpp 23666 2015-12-14 20:01:22Z rashadkm $
+
+#include <sstream>
+#include <iostream>
+#include <iomanip>
+#include <ossim/support_data/ossimNitfLocalCartographicTag.h>
+
+RTTI_DEF1(ossimNitfLocalCartographicTag, "ossimNitfLocalCartographicTag", ossimNitfRegisteredTag);
+
+ossimNitfLocalCartographicTag::ossimNitfLocalCartographicTag()
+   : ossimNitfRegisteredTag(std::string("MAPLOB"), 43)
+{
+}
+
+ossimNitfLocalCartographicTag::~ossimNitfLocalCartographicTag()
+{
+}
+
+void ossimNitfLocalCartographicTag::parseStream(std::istream& in)
+{
+   clearFields();
+   
+   in.read(theLengthUnits, 3);
+   in.read(theEastingInterval, 5);
+   in.read(theNorthingInterval, 5);
+   in.read(theEastingReferenceOrigin, 15);
+   in.read(theNorthingReferenceOrigin, 15);
+}
+
+void ossimNitfLocalCartographicTag::writeStream(std::ostream& out)
+{
+   out.write(theLengthUnits, 3);
+   out.write(theEastingInterval, 5);
+   out.write(theNorthingInterval, 5);
+   out.write(theEastingReferenceOrigin, 15);
+   out.write(theNorthingReferenceOrigin, 15);
+}
+
+void ossimNitfLocalCartographicTag::clearFields()
+{
+   memset(theLengthUnits, ' ', 3);
+   memset(theEastingInterval, '0', 5);
+   memset(theNorthingInterval, '0', 5);
+   memset(theEastingReferenceOrigin, '0', 15);
+   memset(theNorthingReferenceOrigin, '0', 15);
+
+   theLengthUnits[3]              = '\0';
+   theEastingInterval[5]          = '\0';
+   theNorthingInterval[5]         = '\0';
+   theEastingReferenceOrigin[15]  = '\0';
+   theNorthingReferenceOrigin[15] = '\0';
+}
+
+void ossimNitfLocalCartographicTag::setLengthUnits(const ossimString& units)
+{
+   ossimString temp = ossimString(units).trim().upcase();
+   std::ostringstream out;
+
+   out << std::setw(3)
+       << std::setfill(' ')
+       << temp.c_str();
+   
+   memcpy(theLengthUnits, out.str().c_str(), 3);
+}
+
+void ossimNitfLocalCartographicTag::setEastingInterval(ossim_uint32 eastingInterval)
+{
+   ossim_uint32 temp = eastingInterval;
+
+   if(temp > 99999)
+   {
+      temp = 99999;
+   }
+   
+   std::ostringstream out;
+
+   out << std::setw(5)
+       << std::setfill('0')
+       << temp;
+   
+   memcpy(theEastingInterval, out.str().c_str(), 5);
+}
+
+void ossimNitfLocalCartographicTag::setNorthingInterval(ossim_uint32 northingInterval)
+{
+   ossim_uint32 temp = northingInterval;
+
+   if(temp > 99999)
+   {
+      temp = 99999;
+   }
+   
+   std::ostringstream out;
+
+   out << std::setw(5)
+       << std::setfill('0')
+       << temp;
+   
+   memcpy(theNorthingInterval, out.str().c_str(), 5);
+}
+
+void ossimNitfLocalCartographicTag::setEastingReferenceOrigin(ossim_float64 east)
+{
+   std::ostringstream out;
+
+   out << std::setw(15)
+       << std::setfill(' ')
+       << std::setprecision(1)
+       << std::setiosflags(std::ios::fixed)
+       << east;
+   
+   memcpy(theEastingReferenceOrigin, out.str().c_str(), 15);
+   
+}
+
+void ossimNitfLocalCartographicTag::setNorthingReferenceOrigin(ossim_float64 north)
+{
+   std::ostringstream out;
+
+   out << std::setw(15)
+       << std::setfill(' ')
+       << std::setprecision(1)
+       << std::setiosflags(std::ios::fixed)
+       << north;
+   
+   memcpy(theNorthingReferenceOrigin, out.str().c_str(), 15);
+}
diff --git a/ossim/src/ossim/support_data/ossimNitfLocalGeographicTag.cpp b/ossim/src/ossim/support_data/ossimNitfLocalGeographicTag.cpp
new file mode 100644
index 0000000..3b33c6b
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfLocalGeographicTag.cpp
@@ -0,0 +1,110 @@
+//*******************************************************************
+// Copyright (C) 2004 Intelligence Data Systems. 
+//
+// LICENSE: MIT
+//
+// see top level LICENSE.txt
+// 
+// Author: Garrett Potts
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfLocalGeographicTag.cpp 23666 2015-12-14 20:01:22Z rashadkm $
+#include <ossim/support_data/ossimNitfLocalGeographicTag.h>
+#include <iomanip>
+#include <sstream>
+
+RTTI_DEF1(ossimNitfLocalGeographicTag, "ossimNitfLocalGeographicTag", ossimNitfRegisteredTag);
+
+ossimNitfLocalGeographicTag::ossimNitfLocalGeographicTag()
+   : ossimNitfRegisteredTag(std::string("GEOLOB"), 48)
+{
+   clearFields();
+}
+
+ossimNitfLocalGeographicTag::~ossimNitfLocalGeographicTag()
+{
+}
+
+void ossimNitfLocalGeographicTag::parseStream(std::istream& in)
+{
+   in.read(theLonDensity, 9);
+   in.read(theLatDensity, 9);
+   in.read(theLonOrigin, 15);
+   in.read(theLatOrigin, 15);
+}
+
+void ossimNitfLocalGeographicTag::writeStream(std::ostream& out)
+{
+   out.write(theLonDensity, 9);
+   out.write(theLatDensity, 9);
+   out.write(theLonOrigin, 15);
+   out.write(theLatOrigin, 15);
+}
+
+void ossimNitfLocalGeographicTag::clearFields()
+{
+   memset(theLonDensity, ' ', 9);
+   memset(theLatDensity, ' ', 9);
+   memset(theLonOrigin, 0, 15);
+   memset(theLatOrigin, 0, 15);
+
+   
+   
+   theLonDensity[9] = '\0';
+   theLatDensity[9] = '\0';
+   theLonOrigin[15] = '\0';
+   theLatOrigin[14] = '\0';
+}
+
+void ossimNitfLocalGeographicTag::setDegreesPerPixelLat(double deltaLat)
+{
+   ossim_uint32 pixels = 0;
+   if(deltaLat > 0.0)
+   {
+      pixels = (ossim_uint32)((1.0/deltaLat)*360.0 + .5);
+   }
+   std::ostringstream out;
+
+   out << std::setw(9)
+       << std::setfill('0')
+       << pixels;
+
+   memcpy(theLatDensity, out.str().c_str(), 9);
+}
+
+void ossimNitfLocalGeographicTag::setDegreesPerPixelLon(double deltaLon)
+{
+   ossim_uint32 pixels = 0;
+   if(deltaLon > 0.0)
+   {
+      pixels = (ossim_uint32)((1.0/deltaLon)*360.0 + .5);
+   }
+   std::ostringstream out;
+
+   out << std::setw(9)
+       << std::setfill('0')
+       << pixels;
+
+   memcpy(theLonDensity, out.str().c_str(), 9);
+}
+
+void ossimNitfLocalGeographicTag::setLatOrigin(double origin)
+{
+   std::ostringstream out;
+
+   out << std::setw(15)
+       << std::setfill('0')
+       << origin;
+   memcpy(theLatOrigin, out.str().c_str(), 15);
+}
+
+void ossimNitfLocalGeographicTag::setLonOrigin(double origin)
+{
+   std::ostringstream out;
+
+   out << std::setw(15)
+       << std::setfill('0')
+       << origin;
+   memcpy(theLonOrigin, out.str().c_str(), 15);
+}
diff --git a/ossim/src/ossim/support_data/ossimNitfMstgtaTag.cpp b/ossim/src/ossim/support_data/ossimNitfMstgtaTag.cpp
new file mode 100644
index 0000000..4ae3322
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfMstgtaTag.cpp
@@ -0,0 +1,135 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: MSTGTA Mission Target Information Extension Format
+// tag class definition.
+//
+// See document STDI-0002 Table 8-16 for more info.
+// 
+//----------------------------------------------------------------------------
+// $Id
+
+#include <cstring>
+#include <istream>
+#include <iostream>
+#include <iomanip>
+
+#include <ossim/support_data/ossimNitfMstgtaTag.h>
+
+
+RTTI_DEF1(ossimNitfMstgtaTag, "ossimNitfMstgtaTag", ossimNitfRegisteredTag);
+
+ossimNitfMstgtaTag::ossimNitfMstgtaTag()
+   : ossimNitfRegisteredTag(std::string("MSTGTA"), 101)
+{
+   clearFields();
+}
+
+ossimNitfMstgtaTag::~ossimNitfMstgtaTag()
+{
+}
+
+void ossimNitfMstgtaTag::parseStream(std::istream& in)
+{
+   clearFields();
+   
+   in.read(theTgtNum, TGT_NUM_SIZE);
+   in.read(theTgtId, TGT_ID_SIZE);
+   in.read(theTgtBe, TGT_BE_SIZE);
+   in.read(theTgtPri, TGT_PRI_SIZE);
+   in.read(theTgtReq, TGT_REQ_SIZE);
+   in.read(theTgtLtiov, TGT_LTIOV_SIZE);
+   in.read(theTgtType, TGT_TYPE_SIZE);
+   in.read(theTgtColl, TGT_COLL_SIZE);
+   in.read(theTgtCat, TGT_CAT_SIZE);
+   in.read(theTgtUtc, TGT_UTC_SIZE);
+   in.read(theTgtElev, TGT_ELEV_SIZE);
+   in.read(theTgtElevUnit, TGT_ELEV_UNIT_SIZE);
+   in.read(theTgtLoc, TGT_LOC_SIZE);
+}
+
+void ossimNitfMstgtaTag::writeStream(std::ostream& out)
+{
+   out.write(theTgtNum, TGT_NUM_SIZE);
+   out.write(theTgtId, TGT_ID_SIZE);
+   out.write(theTgtBe, TGT_BE_SIZE);
+   out.write(theTgtPri, TGT_PRI_SIZE);
+   out.write(theTgtReq, TGT_REQ_SIZE);
+   out.write(theTgtLtiov, TGT_LTIOV_SIZE);
+   out.write(theTgtType, TGT_TYPE_SIZE);
+   out.write(theTgtColl, TGT_COLL_SIZE);
+   out.write(theTgtCat, TGT_CAT_SIZE);
+   out.write(theTgtUtc, TGT_UTC_SIZE);
+   out.write(theTgtElev, TGT_ELEV_SIZE);
+   out.write(theTgtElevUnit, TGT_ELEV_UNIT_SIZE);
+   out.write(theTgtLoc, TGT_LOC_SIZE);
+}
+
+void ossimNitfMstgtaTag::clearFields()
+{
+   // BCS-N's to '0's, BCS-A's to ' '(spaces)
+
+   // clear
+   memset(theTgtNum, '0', TGT_NUM_SIZE);
+   memset(theTgtId, ' ', TGT_ID_SIZE);
+   memset(theTgtBe, ' ', TGT_BE_SIZE);
+   memset(theTgtPri, ' ', TGT_PRI_SIZE);
+   memset(theTgtReq, ' ', TGT_REQ_SIZE);
+   memset(theTgtLtiov, ' ', TGT_LTIOV_SIZE);
+   memset(theTgtType, ' ', TGT_TYPE_SIZE);
+   memset(theTgtColl, '0', TGT_COLL_SIZE);
+   memset(theTgtCat, ' ', TGT_CAT_SIZE);
+   memset(theTgtUtc, ' ', TGT_UTC_SIZE);
+   memset(theTgtElev, ' ', TGT_ELEV_SIZE);
+   memset(theTgtElevUnit, ' ', TGT_ELEV_UNIT_SIZE);
+   memset(theTgtLoc, ' ', TGT_LOC_SIZE);
+
+   // null terminate
+   theTgtNum[TGT_NUM_SIZE] = '\0';
+   theTgtId[TGT_ID_SIZE] = '\0';
+   theTgtBe[TGT_BE_SIZE] = '\0';
+   theTgtPri[TGT_PRI_SIZE] = '\0';
+   theTgtReq[TGT_REQ_SIZE] = '\0';
+   theTgtLtiov[TGT_LTIOV_SIZE] = '\0';
+   theTgtType[TGT_TYPE_SIZE] = '\0';
+   theTgtColl[TGT_COLL_SIZE] = '\0';
+   theTgtCat[TGT_CAT_SIZE] = '\0';
+   theTgtUtc[TGT_UTC_SIZE] = '\0';
+   theTgtElev[TGT_ELEV_SIZE] = '\0';
+   theTgtElevUnit[TGT_ELEV_UNIT_SIZE] = '\0';
+   theTgtLoc[TGT_LOC_SIZE] = '\0';
+}
+
+std::ostream& ossimNitfMstgtaTag::print(
+   std::ostream& out, const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+   
+   out << setiosflags(std::ios::left)
+       << pfx << std::setw(24) << "CETAG:"
+       << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
+       << pfx << std::setw(24) << "TGT_NUM:" << theTgtNum << "\n"
+       << pfx << std::setw(24) << "TGT_ID:" << theTgtId << "\n"
+       << pfx << std::setw(24) << "TGT_BE:" << theTgtBe << "\n"
+       << pfx << std::setw(24) << "TGT_PRI:" << theTgtPri << "\n"
+       << pfx << std::setw(24) << "TGT_REQ:" << theTgtReq << "\n"
+       << pfx << std::setw(24) << "TGT_LTIOV:" << theTgtLtiov << "\n"
+       << pfx << std::setw(24) << "TGT_TYPE:" << theTgtType << "\n"
+       << pfx << std::setw(24) << "TGT_COLL:" << theTgtColl << "\n"
+       << pfx << std::setw(24) << "TGT_CAT:" << theTgtCat << "\n"
+       << pfx << std::setw(24) << "TGT_UTC:" << theTgtUtc << "\n"
+       << pfx << std::setw(24) << "TGT_ELEV:" << theTgtElev << "\n"
+       << pfx << std::setw(24) << "TGT_ELEV_UNIT:" << theTgtElevUnit << "\n"
+       << pfx << std::setw(24) << "TGT_LOC:" << theTgtLoc << "\n";
+   
+   return out;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfNameConversionTables.cpp b/ossim/src/ossim/support_data/ossimNitfNameConversionTables.cpp
new file mode 100644
index 0000000..ef356a1
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfNameConversionTables.cpp
@@ -0,0 +1,164 @@
+//*******************************************************************
+// Copyright (C) 2004 Garrett Potts.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimNitfNameConversionTables.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstddef>
+#include <ossim/support_data/ossimNitfNameConversionTables.h>
+#include <ossim/base/ossimString.h>
+
+struct ossimNitfMapProjectionCodeToOssimName
+{
+   const char* nitfProjCode; // nitf code name
+   const char* projectionName; // ossim projection name
+};
+
+struct ossimNitfMapProjectionCodeToNitfName
+{
+   const char* nitfProjCode; // nitf code name
+   const char* projectionName; // ossim projection name
+};
+
+static const ossimNitfMapProjectionCodeToOssimName mapProjectiontable[]=
+{
+   {"AC", "ossimAlbersProjection"},
+   {"AL", "ossimAzimEquDistProjection"},
+   {"BF", "ossimBonneProjection"},
+   {"CP", "ossimEquDistCylProjection"},
+   {"CP", "ossimLlxyProjection"},
+   {"CS", "ossimCassiniProjection"},
+   {"ED", "ossimEckert6Projection"},
+   {"EF", "ossimEckert4Projection"},
+   {"GN", "ossimGnomonicProjection"},
+   {"LE", "ossimLambertConformalConicProjection"},
+   {"LI", "ossimCylEquAreaProjection"},
+   {"MC", "ossimMercatorProjection"},
+   {"MH", "ossimMillerProjection"},
+   {"MP", "ossimMollweidProjection"},
+   {"NT", "ossimNewZealandMapGridProjection"},
+   {"OD", "ossimOrthoGraphicProjection"},
+   {"PG", "ossimPolarStereoProjection"},
+   {"PH", "ossimPolyconicProjection"},
+   {"SA", "ossimSinusoidalProjection"},
+   {"SX", "ossimSpaceObliqueMercatorProjection"},
+   {"TC", "ossimTransMercatorProjection"},
+   {"TX", "ossimTransCylEquAreaProjection"},
+   {"VA", "ossimVanDerGrintenProjection"},
+   { 0, 0 }
+};
+
+static const ossimNitfMapProjectionCodeToNitfName nitfMapProjectiontable[]=
+{
+   {"AC", "Albers Equal-Area Conic"},
+   {"AK", "(Lambert) Azimuthal Equal-Area"},
+   {"AL", "Azimuthal Equidistant"},
+   {"BF", "Bonne"},
+   {"CC", "Equidistant Conic with 1 Standard Parallel"},
+   {"CP", "Equirectangular"},
+   {"CS", "Cassini-Soldner"},
+   {"ED", "Eckert VI"},
+   {"EF", "Eckert IV"},
+   {"GN", "Gnomonic"},
+   {"HX", "Hotine Oblique Mercator based on 2 Points"},
+   {"KA", " Equidistant Conic with 2 Standard Parallels"},
+   {"LA", "Laborde"},
+   {"LE", "Lambert Conformal Conic"},
+   {"LI", "Cylindrical Equal Area"},
+   {"LJ", " Lambert Equal-Area Meridional"},
+   {"MC", "Mercator"},
+   {"MH", "Miller Cylindrical"},
+   {"MJ", "French Lambert"},
+   {"MP", "Mollweide"},
+   {"NT", "New Zealand Map Grid"},
+   {"OC", "Oblique Mercator"},
+   {"OD", "Orthographic"},
+   {"PG", "Polar Stereographic"},
+   {"PH", "Polyconic"},
+   {"RS", "Hotine Oblique Mercator (Rectified Skew Orthomorphic)"},
+   {"RB", "Hotine Oblique Mercator (Rectified Skew Orthomorphic)"},
+   {"RX", "Robinson"},
+   {"SA", "Sinusoidal"},
+   {"SD", "Oblique Stereographic"},
+   {"SX", "Space Oblique Mercator"},
+   {"TC", " Transverse Mercator"},
+   {"TX", "Transverse Cylindrical Equal Area"},
+   {"VA", "Van der Grinten"},
+   {"VX", "General Vertical NearSide Perspective"},
+   { 0, 0 }
+};
+
+ossimNitfNameConversionTables::ossimNitfNameConversionTables()
+{
+}
+
+ossimString ossimNitfNameConversionTables::convertMapProjectionNameToNitfCode(const ossimString& mapProjectionName)const
+{
+   ossim_uint32 idx = 0;
+
+   while(mapProjectiontable[idx].nitfProjCode)
+   {
+      if(mapProjectionName == mapProjectiontable[idx].projectionName)
+      {
+         return mapProjectiontable[idx].nitfProjCode;
+      }
+      ++idx;
+   }
+
+   return "";
+}
+
+ossimString ossimNitfNameConversionTables::convertNitfCodeToOssimProjectionName(const ossimString& nitfProjectionCode)const
+{
+   ossim_uint32 idx = 0;
+
+   while(mapProjectiontable[idx].nitfProjCode)
+   {
+      if(nitfProjectionCode == mapProjectiontable[idx].nitfProjCode)
+      {
+         return mapProjectiontable[idx].projectionName;
+      }
+      ++idx;
+   }
+
+   return "";
+}
+
+ossimString ossimNitfNameConversionTables::convertNitfCodeToNitfProjectionName(const ossimString& nitfProjectionCode)const
+{
+   ossim_uint32 idx = 0;
+
+   while(nitfMapProjectiontable[idx].nitfProjCode)
+   {
+      if(nitfProjectionCode == nitfMapProjectiontable[idx].nitfProjCode)
+      {
+         return nitfMapProjectiontable[idx].projectionName;
+      }
+      ++idx;
+   }
+
+   return "";
+}
+
+ossimString ossimNitfNameConversionTables::convertNitfProjectionNameToNitfCode(const ossimString& nitfProjectionName)const
+{
+   ossim_uint32 idx = 0;
+
+   while(nitfMapProjectiontable[idx].nitfProjCode)
+   {
+      if(nitfProjectionName ==  nitfMapProjectiontable[idx].projectionName)
+      {
+         return nitfMapProjectiontable[idx].nitfProjCode;
+      }
+      ++idx;
+   }
+
+   return "";
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfPiaimcTag.cpp b/ossim/src/ossim/support_data/ossimNitfPiaimcTag.cpp
new file mode 100644
index 0000000..bcffd2b
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfPiaimcTag.cpp
@@ -0,0 +1,412 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: PIAIMC tag class declaration.
+// 
+// "Profile for Imagery Access Image Support Extensions"
+//
+// See document STDI-0002 Table 6-1 for more info.
+// 
+// http://164.214.2.51/ntb/baseline/docs/stdi0002/final.pdf
+//
+//----------------------------------------------------------------------------
+// $Id: ossimNitfPiaimcTag.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstring> /* for memcpy */
+#include <iostream>
+#include <iomanip>
+
+#include <ossim/support_data/ossimNitfPiaimcTag.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimCommon.h>
+
+static const ossimString CLOUDCVR_KW = "CLOUDCVR";
+static const ossimString SRP_KW = "SRP";
+static const ossimString SENSMODE_KW = "SENSMODE";
+static const ossimString SENSNAME_KW = "SENSNAME";
+static const ossimString SOURCE_KW = "SOURCE";
+static const ossimString COMGEN_KW = "COMGEN";
+static const ossimString SUBQUAL_KW = "SUBQUAL";
+static const ossimString PIAMSNNUM_KW = "PIAMSNNUM";
+static const ossimString CAMSPECS_KW = "CAMSPECS";
+static const ossimString PROJID_KW = "PROJID";
+static const ossimString GENERATION_KW = "GENERATION";
+static const ossimString ESD_KW = "ESD";
+static const ossimString OTHERCOND_KW = "OTHERCOND";
+static const ossimString MEANGSD_KW = "MEANGSD";
+static const ossimString IDATUM_KW = "IDATUM";
+static const ossimString IELLIP_KW = "IELLIP";
+static const ossimString PREPROC_KW = "PREPROC";
+static const ossimString IPROJ_KW = "IPROJ";
+static const ossimString SATTRACK_KW = "SATTRACK";
+
+RTTI_DEF1(ossimNitfPiaimcTag,
+          "ossimNitfPiaimcTag",
+          ossimNitfRegisteredTag);
+
+ossimNitfPiaimcTag::ossimNitfPiaimcTag()
+   : ossimNitfRegisteredTag(std::string("PIAIMC"), 362)
+{
+   clearFields();
+}
+
+void ossimNitfPiaimcTag::parseStream(std::istream& in)
+{
+   clearFields();
+   
+   in.read(theCloudcvr,   CLOUDCVR_SIZE);
+   in.read(theSrp,        SRP_SIZE);
+   in.read(thesSensmode,  SENSMODE_SIZE);
+   in.read(theSensname,   SENSNAME_SIZE);
+   in.read(theSource,     SOURCE_SIZE);
+   in.read(theComgen,     COMGEN_SIZE);
+   in.read(theSubqual,    SUBQUAL_SIZE);
+   in.read(thePiamsnnum,  PIAMSNNUM_SIZE);
+   in.read(theCamspecs,   CAMSPECS_SIZE);
+   in.read(theProjid,     PROJID_SIZE);
+   in.read(theGeneration, GENERATION_SIZE);
+   in.read(theEsd,        ESD_SIZE);
+   in.read(theOthercond,  OTHERCOND_SIZE);
+   in.read(theMeanGsd,    MEANGSD_SIZE);
+   in.read(theIdatum,     IDATUM_SIZE);
+   in.read(theIellip,     IELLIP_SIZE);
+   in.read(thePreproc,    PREPROC_SIZE);
+   in.read(theIproj,      IPROJ_SIZE);
+   in.read(theSattrack,   SATTRACK_SIZE);
+}
+
+void ossimNitfPiaimcTag::writeStream(std::ostream& out)
+{
+   out.write(theCloudcvr,   CLOUDCVR_SIZE);
+   out.write(theSrp,        SRP_SIZE);
+   out.write(thesSensmode,  SENSMODE_SIZE);
+   out.write(theSensname,   SENSNAME_SIZE);
+   out.write(theSource,     SOURCE_SIZE);
+   out.write(theComgen,     COMGEN_SIZE);
+   out.write(theSubqual,    SUBQUAL_SIZE);
+   out.write(thePiamsnnum,  PIAMSNNUM_SIZE);
+   out.write(theCamspecs,   CAMSPECS_SIZE);
+   out.write(theProjid,     PROJID_SIZE);
+   out.write(theGeneration, GENERATION_SIZE);
+   out.write(theEsd,        ESD_SIZE);
+   out.write(theOthercond,  OTHERCOND_SIZE);
+   out.write(theMeanGsd,    MEANGSD_SIZE);
+   out.write(theIdatum,     IDATUM_SIZE);
+   out.write(theIellip,     IELLIP_SIZE);
+   out.write(thePreproc,    PREPROC_SIZE);
+   out.write(theIproj,      IPROJ_SIZE);
+   out.write(theSattrack,   SATTRACK_SIZE);
+}
+
+void ossimNitfPiaimcTag::clearFields()
+{
+   memcpy(theCloudcvr, "999",   CLOUDCVR_SIZE);
+   memset(theSrp,        ' ',        SRP_SIZE);
+   memset(thesSensmode,  ' ',  SENSMODE_SIZE);
+   memset(theSensname,   ' ',   SENSNAME_SIZE);
+   memset(theSource,     ' ',     SOURCE_SIZE);
+   memset(theComgen,     ' ',     COMGEN_SIZE);
+   memset(theSubqual,    ' ',    SUBQUAL_SIZE);
+   memset(thePiamsnnum,  ' ',  PIAMSNNUM_SIZE);
+   memset(theCamspecs,   ' ',   CAMSPECS_SIZE);
+   memset(theProjid,     ' ',     PROJID_SIZE);
+   memset(theGeneration, ' ', GENERATION_SIZE);
+   memset(theEsd,        ' ',        ESD_SIZE);
+   memset(theOthercond,  ' ',  OTHERCOND_SIZE);
+   memset(theMeanGsd,    ' ',    MEANGSD_SIZE);
+   memset(theIdatum,     ' ',     IDATUM_SIZE);
+   memset(theIellip,     ' ',     IELLIP_SIZE);
+   memset(thePreproc,    ' ',    PREPROC_SIZE);
+   memset(theIproj,      ' ',     IPROJ_SIZE);
+   memset(theSattrack,   ' ',   SATTRACK_SIZE);
+
+   theCloudcvr[CLOUDCVR_SIZE]     = '\0';
+   theSrp[SRP_SIZE]               = '\0';
+   thesSensmode[SENSMODE_SIZE]    = '\0';
+   theSensname[SENSNAME_SIZE]     = '\0';
+   theSource[SOURCE_SIZE]         = '\0';
+   theComgen[COMGEN_SIZE]         = '\0';
+   theSubqual[SUBQUAL_SIZE]       = '\0';
+   thePiamsnnum[PIAMSNNUM_SIZE]   = '\0';
+   theCamspecs[CAMSPECS_SIZE]     = '\0';
+   theProjid[PROJID_SIZE]         = '\0';
+   theGeneration[GENERATION_SIZE] = '\0';
+   theEsd[ESD_SIZE]               = '\0';
+   theOthercond[OTHERCOND_SIZE]   = '\0';
+   theMeanGsd[MEANGSD_SIZE]       = '\0';
+   theIdatum[IDATUM_SIZE]         = '\0';
+   theIellip[IELLIP_SIZE]         = '\0';
+   thePreproc[PREPROC_SIZE]       = '\0';
+   theIproj[IPROJ_SIZE]           = '\0';
+   theSattrack[SATTRACK_SIZE]     = '\0';
+}
+
+std::ostream& ossimNitfPiaimcTag::print(std::ostream& out,
+                                        const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+   
+   out << setiosflags(std::ios::left)
+       << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
+       << pfx << std::setw(24) << "CLOUDCVR:"  << theCloudcvr << "\n"
+       << pfx << std::setw(24) << "SRP:"       << theSrp << "\n"
+       << pfx << std::setw(24) << "SENSMODE:"   << thesSensmode << "\n"
+       << pfx << std::setw(24) << "SENSNAME:"   << theSensname << "\n"
+       << pfx << std::setw(24) << "SOURCE:"     << theSource << "\n"
+       << pfx << std::setw(24) << "COMGEN:"     << theComgen << "\n"
+       << pfx << std::setw(24) << "SUBQUAL:"    << theSubqual << "\n"
+       << pfx << std::setw(24) << "PIAMSNNUM:"  << thePiamsnnum << "\n"
+       << pfx << std::setw(24) << "CAMSPECS:"   << theCamspecs << "\n"
+       << pfx << std::setw(24) << "PROJID:"     << theProjid << "\n"
+       << pfx << std::setw(24) << "GENERATION:" << theGeneration << "\n"
+       << pfx << std::setw(24) << "ESD:"        << theEsd << "\n"
+       << pfx << std::setw(24) << "OTHERCOND:"  << theOthercond << "\n"
+       << pfx << std::setw(24) << "MEANGSD:"    << theMeanGsd << "\n"
+       << pfx << std::setw(24) << "IDATUM:"     << theIdatum << "\n"
+       << pfx << std::setw(24) << "IELLIP:"     << theIellip << "\n"
+       << pfx << std::setw(24) << "PREPROC:"    << thePreproc << "\n"
+       << pfx << std::setw(24) << "IPROJ:"     << theIproj << "\n"
+       << pfx << std::setw(24) << "SATTRACK:"  << theSattrack << "\n";
+
+   return out;
+}
+
+ossimString ossimNitfPiaimcTag::getCloudcvrString() const
+{
+   return ossimString(theCloudcvr);
+}
+
+ossimString ossimNitfPiaimcTag::getSrpString() const
+{
+   return ossimString(theSrp);
+}
+   
+ossimString ossimNitfPiaimcTag::getSensmodeString() const
+{
+   return ossimString(thesSensmode);
+}
+
+ossimString ossimNitfPiaimcTag::getSensnameString() const
+{
+   return ossimString(theSensname);
+}
+   
+ossimString ossimNitfPiaimcTag::getSourceString() const
+{
+   return ossimString(theSource);
+}
+  
+ossimString ossimNitfPiaimcTag::getComgenString() const
+{
+   return ossimString(theComgen);
+}
+
+ossimString ossimNitfPiaimcTag::getSubqualString() const
+{
+   return ossimString(theSubqual);
+}
+
+ossimString ossimNitfPiaimcTag::getPiamsnnumString() const
+{
+   return ossimString(thePiamsnnum);
+}
+
+ossimString ossimNitfPiaimcTag::getCamspecsString() const
+{
+   return ossimString(theCamspecs);
+}
+
+ossimString ossimNitfPiaimcTag::getProjidString() const
+{
+   return ossimString(theProjid);
+}
+
+ossimString ossimNitfPiaimcTag::getGenerationString() const
+{
+   return ossimString(theGeneration);
+}
+
+ossimString ossimNitfPiaimcTag::getEsdString() const
+{
+   return ossimString(theEsd);
+}
+   
+ossimString ossimNitfPiaimcTag::getOthercondString() const
+{
+   return ossimString(theOthercond);
+}
+
+ossimString ossimNitfPiaimcTag::getMeadGsdString() const
+{
+   return ossimString(theMeanGsd);
+}
+
+ossim_float64 ossimNitfPiaimcTag::getMeanGsdInMeters() const
+{
+   ossim_float64 gsd = 0.0;
+   
+   ossimString s = theMeanGsd;
+   if (s.size())
+   {
+      ossim_float64 d = s.toFloat64();
+      if ( (d != 0.0) && (ossim::isnan(d) == false) )
+      {
+         gsd = d / 12.0 * MTRS_PER_FT;
+      }
+   }
+   
+   return gsd;
+}
+
+ossimString ossimNitfPiaimcTag::getIdatumString() const
+{
+   return ossimString(theIdatum);
+}
+   
+ossimString ossimNitfPiaimcTag::getIellipString() const
+{
+   return ossimString(theIellip);
+}
+   
+ossimString ossimNitfPiaimcTag::getPreprocString() const
+{
+   return ossimString(thePreproc);
+}
+   
+ossimString ossimNitfPiaimcTag::getIprojString() const
+{
+   return ossimString(theIproj);
+}
+   
+ossimString ossimNitfPiaimcTag::getSattrackString() const
+{
+   return ossimString(theSattrack);
+}
+
+void ossimNitfPiaimcTag::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   ossimNitfRegisteredTag::setProperty(property);
+}
+
+ossimRefPtr<ossimProperty> ossimNitfPiaimcTag::getProperty(const ossimString& name)const
+{
+   ossimProperty* result = 0;
+
+   if(name == CLOUDCVR_KW)
+   {
+      result = new ossimStringProperty(name, theCloudcvr);
+   }
+   else if(name == SRP_KW)
+   {
+      result = new ossimStringProperty(name, theSrp);
+   }
+   else if(name == SENSMODE_KW)
+   {
+      result = new ossimStringProperty(name, thesSensmode);
+   }
+   else if(name == SENSNAME_KW)
+   {
+      result = new ossimStringProperty(name, theSensname);
+   }
+   else if(name == SOURCE_KW)
+   {
+      result = new ossimStringProperty(name, theSource);
+   }
+   else if(name == COMGEN_KW)
+   {
+      result = new ossimStringProperty(name, theComgen);
+   }
+   else if(name == SUBQUAL_KW)
+   {
+      result = new ossimStringProperty(name, theSubqual);
+   }
+   else if(name == PIAMSNNUM_KW)
+   {
+      result = new ossimStringProperty(name, thePiamsnnum);
+   }
+   else if(name == CAMSPECS_KW)
+   {
+      result = new ossimStringProperty(name, theCamspecs);
+   }
+   else if(name == PROJID_KW)
+   {
+      result = new ossimStringProperty(name, theProjid);
+   }
+   else if(name == GENERATION_KW)
+   {
+      result = new ossimStringProperty(name, theGeneration);
+   }
+   else if(name == ESD_KW)
+   {
+      result = new ossimStringProperty(name, theEsd);
+   }
+   else if(name == OTHERCOND_KW)
+   {
+      result = new ossimStringProperty(name, theOthercond);
+   }
+   else if(name == MEANGSD_KW)
+   {
+      result = new ossimStringProperty(name, theMeanGsd);
+   }
+   else if(name == IDATUM_KW)
+   {
+      result = new ossimStringProperty(name, theIdatum);
+   }
+   else if(name == IELLIP_KW)
+   {
+      result = new ossimStringProperty(name, theIellip);
+   }
+   else if(name == PREPROC_KW)
+   {
+      result = new ossimStringProperty(name, thePreproc);
+   }
+   else if(name == IPROJ_KW)
+   {
+      result = new ossimStringProperty(name, theIproj);
+   }
+   else if(name == SATTRACK_KW)
+   {
+      result = new ossimStringProperty(name, theSattrack);
+   }
+   else
+   {
+      return ossimNitfRegisteredTag::getProperty(name);
+   }
+
+   return result;
+}
+
+void ossimNitfPiaimcTag::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimNitfRegisteredTag::getPropertyNames(propertyNames);
+   
+   propertyNames.push_back(CLOUDCVR_KW);
+   propertyNames.push_back(SRP_KW);
+   propertyNames.push_back(SENSMODE_KW);
+   propertyNames.push_back(SENSNAME_KW);
+   propertyNames.push_back(SOURCE_KW);
+   propertyNames.push_back(COMGEN_KW);
+   propertyNames.push_back(SUBQUAL_KW);
+   propertyNames.push_back(PIAMSNNUM_KW);
+   propertyNames.push_back(CAMSPECS_KW);
+   propertyNames.push_back(PROJID_KW);
+   propertyNames.push_back(GENERATION_KW);
+   propertyNames.push_back(ESD_KW);
+   propertyNames.push_back(OTHERCOND_KW);
+   propertyNames.push_back(MEANGSD_KW);
+   propertyNames.push_back(IDATUM_KW);
+   propertyNames.push_back(IELLIP_KW);
+   propertyNames.push_back(PREPROC_KW);
+   propertyNames.push_back(IPROJ_KW);
+   propertyNames.push_back(SATTRACK_KW);
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfProjectionParameterTag.cpp b/ossim/src/ossim/support_data/ossimNitfProjectionParameterTag.cpp
new file mode 100644
index 0000000..4c4bc39
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfProjectionParameterTag.cpp
@@ -0,0 +1,213 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfProjectionParameterTag.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/support_data/ossimNitfProjectionParameterTag.h>
+#include <sstream>
+#include <iomanip>
+
+ossimNitfProjectionParameterTag::ossimNitfProjectionParameterTag()
+   :ossimNitfRegisteredTag(std::string("PRJPSB"), 0 )
+{
+   clearFields();
+}
+
+ossimNitfProjectionParameterTag::~ossimNitfProjectionParameterTag()
+{
+}
+
+void ossimNitfProjectionParameterTag::parseStream(std::istream& in)
+{
+   clearFields();
+   
+   in.read(theProjectionName, 80);
+   in.read(theProjectionCode, 2);
+   in.read(theNumberOfParameters, 1);
+
+   ossim_uint32 numberOfParameters = ossimString(theNumberOfParameters).toUInt32();
+
+   for(ossim_uint32 i = 0; i < numberOfParameters; ++i)
+   {
+      char param[15];
+
+      in.read(param, 15);
+      theProjectionParameters.push_back(ossimString(param,
+                                                    param + 15));
+   }
+   in.read(theFalseXOrigin, 15);
+   in.read(theFalseYOrigin, 15);
+
+   // Set the base tag length.
+   setTagLength( getSizeInBytes() );
+}
+
+void ossimNitfProjectionParameterTag::writeStream(std::ostream& out)
+{
+   out.write(theProjectionName, 80);
+   out.write(theProjectionCode, 2);
+
+   {
+      std::ostringstream tempOut;
+
+      tempOut << std::setw(1)
+              << theProjectionParameters.size();
+      theNumberOfParameters[0] = *(tempOut.str().c_str());
+   }
+   out.write(theNumberOfParameters, 1);
+   ossim_uint32 numberOfParameters = ossimString(theNumberOfParameters).toUInt32();
+
+   for(ossim_uint32 i = 0; i < numberOfParameters; ++i)
+   {
+      out.write(theProjectionParameters[i].c_str(), 15);
+   }
+   out.write(theFalseXOrigin, 15);
+   out.write(theFalseYOrigin, 15);
+}
+
+ossim_uint32 ossimNitfProjectionParameterTag::getSizeInBytes()const
+{
+   return (113 + (ossim_uint32)theProjectionParameters.size()*15);
+}
+
+std::ostream& ossimNitfProjectionParameterTag::print(
+   std::ostream& out, const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getRegisterTagName();
+   pfx += ".";
+
+   out << setiosflags(std::ios::left)
+       << pfx << std::setw(24) << "CETAG:" << getRegisterTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
+       << pfx << std::setw(24) << "PRN:"   << theProjectionName << "\n"
+       << pfx << std::setw(24) << "PCO:"   << theProjectionCode << "\n"
+       << pfx << std::setw(24) << "NUM_PRJ:" << theNumberOfParameters << "\n";
+
+   for (ossim_uint32 i = 0; i < theProjectionParameters.size(); ++i)
+   {
+      ossimString s = "PRJ";
+      s += ossimString::toString(i);
+      s += ":";
+      out << pfx << std::setw(24) << s
+          << theProjectionParameters[i] << "\n";
+   }
+
+   out << pfx << std::setw(24) << "XOR:"   <<theFalseXOrigin << "\n"
+       << pfx << std::setw(24) << "YOR:"   <<theFalseYOrigin << std::endl;
+   
+   return out;   
+}
+    
+void ossimNitfProjectionParameterTag::clearFields()
+{
+   theProjectionParameters.clear();
+   
+   memset(theProjectionName, ' ', 80);
+   memset(theProjectionCode, ' ', 2);
+   memset(theNumberOfParameters, '0', 1);
+   memset(theFalseXOrigin, '0', 15);
+   memset(theFalseYOrigin, '0', 15);
+
+   theProjectionName[80] = '\0';
+   theProjectionCode[2] = '\0';
+   theNumberOfParameters[1] = '\0';
+   theFalseXOrigin[15] = '\0';
+   theFalseYOrigin[15] = '\0';
+
+   // Set the base tag length.
+   setTagLength( 0 );
+}
+
+void ossimNitfProjectionParameterTag::clearParameters()
+{
+   theProjectionParameters.clear();
+   theNumberOfParameters[0] = '0';
+}
+
+void ossimNitfProjectionParameterTag::addParameter(const ossimString& param)
+{
+   std::ostringstream out;
+
+   out << std::setw(15)
+       << std::setfill('0')
+       << param.c_str();
+
+   theProjectionParameters.push_back(out.str());
+}
+
+void ossimNitfProjectionParameterTag::addParameter(const ossim_float64& param)
+{
+   addParameter(ossimString::toString(param));
+}
+
+void ossimNitfProjectionParameterTag::setName(const ossimString& name)
+{
+   std::ostringstream out;
+
+   out << std::setw(80)
+       << std::setfill(' ')
+       << name.c_str();
+
+   memcpy(theProjectionName, out.str().c_str(), 80);
+}
+
+void ossimNitfProjectionParameterTag::setCode(const ossimString& code)
+{
+   std::ostringstream out;
+
+   out << std::setw(2)
+       << std::setfill(' ')
+       << code.c_str();
+
+   memcpy(theProjectionCode, out.str().c_str(), 2);
+}
+
+ossimString ossimNitfProjectionParameterTag::getName()const
+{
+   return ossimString(theProjectionName).trim();
+}
+
+ossimString ossimNitfProjectionParameterTag::getCode()const
+{
+   return ossimString(theProjectionCode).trim();
+}
+
+void ossimNitfProjectionParameterTag::setFalseX(double falseX)
+{
+   std::ostringstream out;
+   out << std::setw(15)
+       << std::setprecision(15)
+       << std::setfill('0')
+       << falseX;
+   
+   memcpy(theFalseXOrigin, out.str().c_str(), 15);
+}
+
+void ossimNitfProjectionParameterTag::setFalseY(double falseY)
+{
+   std::ostringstream out;
+   out << std::setw(15)
+       << std::setprecision(15)
+       << std::setfill('0')
+       << falseY;
+   
+   memcpy(theFalseYOrigin, out.str().c_str(), 15);
+}
+
+double ossimNitfProjectionParameterTag::getFalseX()const
+{
+   return ossimString(theFalseXOrigin).toDouble();
+}
+
+double ossimNitfProjectionParameterTag::getFalseY()const
+{
+   return ossimString(theFalseYOrigin).toDouble();
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfRegisteredTag.cpp b/ossim/src/ossim/support_data/ossimNitfRegisteredTag.cpp
new file mode 100644
index 0000000..5a9ec4d
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfRegisteredTag.cpp
@@ -0,0 +1,117 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfRegisteredTag.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <iostream>
+#include <sstream>
+#include <string>
+#include <sstream>
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+
+RTTI_DEF2(ossimNitfRegisteredTag, "ossimNitfRegisteredTag", ossimObject, ossimPropertyInterface)
+
+ossimNitfRegisteredTag::ossimNitfRegisteredTag()
+   : 
+   ossimObject(),
+   ossimPropertyInterface(),
+   m_tagName(),
+   m_tagLength(0)
+{}
+ossimNitfRegisteredTag::ossimNitfRegisteredTag(const std::string& tagName, ossim_uint32 tagLength)
+   : 
+   ossimObject(),
+   ossimPropertyInterface(),
+   m_tagName(tagName),
+   m_tagLength(tagLength)
+{}
+
+ossimNitfRegisteredTag::~ossimNitfRegisteredTag()
+{}
+
+std::string ossimNitfRegisteredTag::getRegisterTagName() const
+{
+   // Deprecated:
+   return m_tagName;
+}
+
+const std::string& ossimNitfRegisteredTag::getTagName() const
+{
+   return m_tagName;
+}
+
+void ossimNitfRegisteredTag::setTagName(const std::string& tagName)
+{
+   m_tagName = tagName;
+}
+
+ossim_uint32 ossimNitfRegisteredTag::getSizeInBytes() const
+{
+   // Deprecated:
+   return getTagLength();
+}
+
+ossim_uint32 ossimNitfRegisteredTag::getTagLength() const
+{
+   return m_tagLength;
+}
+
+void ossimNitfRegisteredTag::setTagLength(ossim_uint32 length)
+{
+   m_tagLength = length;
+}
+
+void ossimNitfRegisteredTag::setProperty(ossimRefPtr<ossimProperty> /* property */)
+{
+}
+
+ossimRefPtr<ossimProperty> ossimNitfRegisteredTag::getProperty(const ossimString& /* name */)const
+{
+   return 0;
+}
+
+void ossimNitfRegisteredTag::getPropertyNames(std::vector<ossimString>& /* propertyNames */)const
+{
+}
+
+void ossimNitfRegisteredTag::getMetadata(ossimKeywordlist& /* kwl */,
+                                         const char* /* prefix */ ) const
+{
+}
+
+std::ostream& ossimNitfRegisteredTag::print(
+   std::ostream& out, const std::string& /* prefix */) const
+{
+   // return print(out);
+   return out;
+}
+
+bool ossimNitfRegisteredTag::saveState(ossimKeywordlist& kwl, const ossimString& prefix)const
+{
+   bool result = false;
+   // by default we will use the already implemented print method as backup
+   //
+   std::ostringstream out;
+   
+   print(out);
+   
+   ossimKeywordlist kwlTemp;
+   
+   std::istringstream in(out.str());
+   if(kwlTemp.parseStream(in))
+   {
+      result = true;
+      kwl.add(prefix, kwlTemp);
+   }
+   
+   return result;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfRegisteredTagFactory.cpp b/ossim/src/ossim/support_data/ossimNitfRegisteredTagFactory.cpp
new file mode 100644
index 0000000..77ae98c
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfRegisteredTagFactory.cpp
@@ -0,0 +1,210 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+//
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfRegisteredTagFactory.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/support_data/ossimNitfRegisteredTagFactory.h>
+
+#include <ossim/support_data/ossimNitfAcftbTag.h>
+#include <ossim/support_data/ossimNitfAimidbTag.h>
+#include <ossim/support_data/ossimNitfBlockaTag.h>
+#include <ossim/support_data/ossimNitfCscrnaTag.h>
+#include <ossim/support_data/ossimNitfCsdidaTag.h>
+#include <ossim/support_data/ossimNitfCsexraTag.h>
+#include <ossim/support_data/ossimNitfCsexraTag.h>
+#include <ossim/support_data/ossimNitfEngrdaTag.h>
+#include <ossim/support_data/ossimNitfGeoPositioningTag.h>
+#include <ossim/support_data/ossimNitfIchipbTag.h>
+#include <ossim/support_data/ossimNitfJ2klraTag.h>
+#include <ossim/support_data/ossimNitfLocalGeographicTag.h>
+#include <ossim/support_data/ossimNitfLocalCartographicTag.h>
+#include <ossim/support_data/ossimNitfMstgtaTag.h>
+#include <ossim/support_data/ossimNitfPiaimcTag.h>
+#include <ossim/support_data/ossimNitfProjectionParameterTag.h>
+#include <ossim/support_data/ossimNitfRpcBTag.h>
+#include <ossim/support_data/ossimNitfRpcATag.h>
+#include <ossim/support_data/ossimNitfSensraTag.h>
+#include <ossim/support_data/ossimNitfStdidcTag.h>
+#include <ossim/support_data/ossimNitfUse00aTag.h>
+#include <ossim/support_data/ossimNitfHistoaTag.h>
+#include <ossim/support_data/ossimNitfCsccgaTag.h>
+#include <ossim/support_data/ossimNitfCsproaTag.h>
+#include <ossim/support_data/ossimNitfExoptaTag.h>
+#include <ossim/support_data/ossimNitfRsmecaTag.h>
+#include <ossim/support_data/ossimNitfRsmidaTag.h>
+#include <ossim/support_data/ossimNitfRsmpcaTag.h>
+#include <ossim/support_data/ossimNitfRsmpiaTag.h>
+
+RTTI_DEF1(ossimNitfRegisteredTagFactory, "ossimNitfRegisteredTagFactory", ossimNitfTagFactory);
+
+static const char ACFTB_TAG[]                = "ACFTB";
+static const char AIMIDB_TAG[]               = "AIMIDB";
+static const char BLOCKA_TAG[]               = "BLOCKA";
+static const char CSCRNA_TAG[]               = "CSCRNA";
+static const char CSDIDA_TAG[]               = "CSDIDA";
+static const char CSEXRA_TAG[]               = "CSEXRA";
+static const char ENGRDA_TAG[]               = "ENGRDA";
+static const char GEO_POSITIONING_TAG[]      = "GEOPSB";
+static const char ICHIPB_TAG[]               = "ICHIPB";
+static const char J2KLRA_TAG[]               = "J2KLRA";
+static const char LOCAL_GEOGRAPHIC_TAG[]     = "GEOLOB";
+static const char LOCAL_CARTOGRAPHIC_TAG[]   = "MAPLOB";
+static const char MSTGTA_TAG[]               = "MSTGTA";
+static const char PIAIMC_TAG[]               = "PIAIMC";
+static const char PROJECTION_PARAMETER_TAG[] = "PRJPSB";
+static const char RPCB_TAG[]                 = "RPC00B";
+static const char RPCA_TAG[]                 = "RPC00A";
+static const char SENSRA_TAG[]               = "SENSRA";
+static const char STDIDC_TAG[]               = "STDIDC";
+static const char USE00A_TAG[]               = "USE00A";
+static const char HISTOA_TAG[]               = "HISTOA";
+static const char CSCCGA_TAG[]               = "CSCCGA";
+static const char CSPROA_TAG[]               = "CSPROA";
+static const char EXOPTA_TAG[]               = "EXOPTA";
+static const char RSMECA_TAG[]               = "RSMECA";
+static const char RSMIDA_TAG[]               = "RSMIDA";
+static const char RSMPCA_TAG[]               = "RSMPCA";
+static const char RSMPIA_TAG[]               = "RSMPIA";
+
+ossimNitfRegisteredTagFactory::ossimNitfRegisteredTagFactory()
+{
+}
+
+ossimNitfRegisteredTagFactory::~ossimNitfRegisteredTagFactory()
+{
+}
+
+ossimNitfRegisteredTagFactory* ossimNitfRegisteredTagFactory::instance()
+{
+   static ossimNitfRegisteredTagFactory inst;
+   return &inst;
+}
+
+ossimRefPtr<ossimNitfRegisteredTag> ossimNitfRegisteredTagFactory::create(
+   const ossimString& tagName)const
+{
+   ossimString name = ossimString(tagName).trim().upcase();
+   
+   if(tagName == ACFTB_TAG)
+   {
+      return new ossimNitfAcftbTag;
+   }
+   else if(tagName == AIMIDB_TAG)
+   {
+      return new ossimNitfAimidbTag;
+   }
+   else if(tagName == BLOCKA_TAG)
+   {
+      return new ossimNitfBlockaTag;
+   }
+   else if(tagName == CSCRNA_TAG)
+   {
+      return new ossimNitfCscrnaTag;
+   }
+   else if(tagName == CSDIDA_TAG)
+   {
+      return new ossimNitfCsdidaTag;
+   }
+   else if(tagName == CSEXRA_TAG)
+   {
+      return new ossimNitfCsexraTag;
+   }
+   else if(tagName == ENGRDA_TAG)
+   {
+      return new ossimNitfEngrdaTag;
+   }
+   else if(tagName == GEO_POSITIONING_TAG)
+   {
+      return new ossimNitfGeoPositioningTag;
+   }
+   else if(tagName == ICHIPB_TAG)
+   {
+      return new ossimNitfIchipbTag;
+   }
+   else if(tagName == J2KLRA_TAG)
+   {
+      return new ossimNitfJ2klraTag;
+   }
+   else if(tagName == LOCAL_GEOGRAPHIC_TAG)
+   {
+      return new ossimNitfLocalGeographicTag;
+   }
+   else if(tagName == LOCAL_CARTOGRAPHIC_TAG)
+   {
+      return new ossimNitfLocalCartographicTag;
+   }
+   else if(tagName == MSTGTA_TAG)
+   {
+      return new ossimNitfMstgtaTag;
+   }
+   else if(tagName == PIAIMC_TAG)
+   {
+      return new ossimNitfPiaimcTag;
+   }
+   else if(tagName == PROJECTION_PARAMETER_TAG)
+   {
+      return new ossimNitfProjectionParameterTag;
+   }
+   else if(tagName == RPCB_TAG)
+   {
+      return new ossimNitfRpcBTag;
+   }
+   else if(tagName == RPCA_TAG)
+   {
+      return new ossimNitfRpcATag;
+   }
+   else if (tagName == SENSRA_TAG)
+   {
+      return new ossimNitfSensraTag;
+   }
+   else if (tagName == STDIDC_TAG)
+   {
+      return new ossimNitfStdidcTag;
+   }
+   else if (tagName == USE00A_TAG)
+   {
+      return new ossimNitfUse00aTag;
+   }
+   else if(tagName == HISTOA_TAG)
+   {
+      return new ossimNitfHistoaTag;
+   }
+   else if(tagName == CSCCGA_TAG)
+   {
+      return new ossimNitfCsccgaTag;
+   }
+   else if(tagName == CSPROA_TAG)
+   {
+      return new ossimNitfCsproaTag;
+   }
+   else if(tagName == EXOPTA_TAG)
+   {
+      return new ossimNitfExoptaTag;
+   }
+   else if(tagName == RSMECA_TAG)
+   {
+      return new ossimNitfRsmecaTag();
+   }
+   else if(tagName == RSMIDA_TAG)
+   {
+      return new ossimNitfRsmidaTag();
+   }
+   else if(tagName == RSMPCA_TAG)
+   {
+      return new ossimNitfRsmpcaTag();
+   }
+   else if(tagName == RSMPIA_TAG)
+   {
+      return new ossimNitfRsmpiaTag();
+   }
+   return NULL;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfRpcATag.cpp b/ossim/src/ossim/support_data/ossimNitfRpcATag.cpp
new file mode 100644
index 0000000..90170cd
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfRpcATag.cpp
@@ -0,0 +1,24 @@
+//*******************************************************************
+//
+// LICENSE: MIT
+//
+// see top level LICENSE.txt
+// 
+// Author: Garrett Potts
+//
+// Description: Nitf support class for RPC00A -
+// Rational Polynomial Coefficient extension.
+//
+//********************************************************************
+// $Id: ossimNitfRpcATag.cpp 23666 2015-12-14 20:01:22Z rashadkm $
+
+#include <ossim/support_data/ossimNitfRpcATag.h>
+
+RTTI_DEF1(ossimNitfRpcATag, "ossimNitfRpcATag", ossimNitfRpcBase);
+
+ossimNitfRpcATag::ossimNitfRpcATag()
+   : ossimNitfRpcBase()
+{
+   // Set the tag name in base.
+   setTagName(std::string("RPC00A"));
+}
diff --git a/ossim/src/ossim/support_data/ossimNitfRpcBTag.cpp b/ossim/src/ossim/support_data/ossimNitfRpcBTag.cpp
new file mode 100644
index 0000000..bb0f06a
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfRpcBTag.cpp
@@ -0,0 +1,22 @@
+//*******************************************************************
+//
+// LICENSE: MIT
+//
+// see top level LICENSE.txt
+// 
+// Author: Garrett Potts
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfRpcBTag.cpp 23666 2015-12-14 20:01:22Z rashadkm $
+
+#include <ossim/support_data/ossimNitfRpcBTag.h>
+
+RTTI_DEF1(ossimNitfRpcBTag, "ossimNitfRpcBTag", ossimNitfRpcBase);
+
+ossimNitfRpcBTag::ossimNitfRpcBTag()
+   : ossimNitfRpcBase()
+{
+   // Set the tag name in base.
+   setTagName(std::string("RPC00B"));
+}
diff --git a/ossim/src/ossim/support_data/ossimNitfRpcBase.cpp b/ossim/src/ossim/support_data/ossimNitfRpcBase.cpp
new file mode 100644
index 0000000..43e5998
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfRpcBase.cpp
@@ -0,0 +1,929 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+//
+// Description: Nitf support class for RPC00A -
+// Rational Polynomial Coefficient extension.
+//
+//********************************************************************
+// $Id: ossimNitfRpcBase.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <algorithm>
+#include <iostream>
+#include <iomanip>
+#include <vector>
+#include <ossim/support_data/ossimNitfRpcBase.h>
+#include <ossim/support_data/ossimNitfCommon.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimStringProperty.h>
+
+static const ossimTrace traceDebug(ossimString("ossimNitfRpcBase:debug"));
+static const ossimString ERR_BIAS_KW = "ERR_BIAS";
+static const ossimString ERR_RAND_KW = "ERR_RAND";
+static const ossimString LINE_OFF_KW = "LINE_OFF";
+static const ossimString SAMP_OFF_KW = "SAMP_OFF";
+static const ossimString LAT_OFF_KW = "LAT_OFF";
+static const ossimString LONG_OFF_KW = "LONG_OFF";
+static const ossimString HEIGHT_OFF_KW = "HEIGHT_OFF";
+static const ossimString LINE_SCALE_KW = "LINE_SCALE";
+static const ossimString SAMP_SCALE_KW = "SAMP_SCALE";
+static const ossimString LAT_SCALE_KW = "LAT_SCALE";
+static const ossimString LONG_SCALE_KW = "LONG_SCALE";
+static const ossimString HEIGHT_SCALE_KW = "HEIGHT_SCALE";
+static const ossimString LINE_NUM_COEFF_KW = "LINE_NUM_COEFF_";
+static const ossimString LINE_DEN_COEFF_KW = "LINE_DEN_COEFF_";
+static const ossimString SAMP_NUM_COEFF_KW = "SAMP_NUM_COEFF_";
+static const ossimString SAMP_DEN_COEFF_KW = "SAMP_DEN_COEFF_";
+
+RTTI_DEF1(ossimNitfRpcBase, "ossimNitfRpcBase", ossimNitfRegisteredTag);
+
+
+ossimNitfRpcBase::ossimNitfRpcBase()
+   : ossimNitfRegisteredTag()
+{
+   // Set the tag length in base.
+   setTagLength(1041);
+   
+   clearFields();
+}
+
+void ossimNitfRpcBase::parseStream(std::istream& in)
+{
+   clearFields();
+   
+   in.read(theSuccess, SUCCESS_SIZE);
+   in.read(theErrorBias, ERROR_BIAS_SIZE);
+   in.read(theErrRand, ERR_RAND_SIZE);
+   in.read(theLineOffset, LINE_OFFSET_SIZE);
+   in.read(theSampleOffset, SAMPLE_OFFSET_SIZE);
+   in.read(theGeodeticLatOffset, GEODETIC_LAT_OFFSET_SIZE);
+   in.read(theGeodeticLonOffset, GEODETIC_LON_OFFSET_SIZE);
+   in.read(theGeodeticHeightOffset, GEODETIC_HEIGHT_OFFSET_SIZE);
+   in.read(theLineScale, LINE_SCALE_SIZE);
+   in.read(theSampleScale, SAMPLE_SCALE_SIZE);
+   in.read(theGeodeticLatScale, GEODETIC_LAT_SCALE_SIZE);
+   in.read(theGeodeticLonScale, GEODETIC_LON_SCALE_SIZE);
+   in.read(theGeodeticHeightScale, GEODETIC_HEIGHT_SCALE_SIZE);
+   
+   ossim_uint32 idx = 0;
+   
+   char temp1[LINE_NUMERATOR_COEFFICIENT_SIZE+1];
+   temp1[LINE_NUMERATOR_COEFFICIENT_SIZE] = '\0';
+   for(idx = 0; idx < LINE_NUMERATOR_COEFFICIENT_COUNT; ++idx)
+   {
+      in.read(temp1, LINE_NUMERATOR_COEFFICIENT_SIZE);
+      theLineNumeratorCoefficient[idx] = temp1;
+   }
+   
+   char temp2[LINE_DENOMINATOR_COEFFICIENT_SIZE+1];
+   temp2[LINE_DENOMINATOR_COEFFICIENT_SIZE] = '\0';
+   for(idx = 0; idx < LINE_DENOMINATOR_COEFFICIENT_COUNT; ++idx)
+   {
+      in.read(temp2, LINE_DENOMINATOR_COEFFICIENT_SIZE);
+      theLineDenominatorCoefficient[idx] = temp2;
+   }
+   
+   char temp3[SAMPLE_NUMERATOR_COEFFICIENT_SIZE+1];
+   temp3[SAMPLE_NUMERATOR_COEFFICIENT_SIZE] = '\0';
+   for(idx = 0; idx < SAMPLE_NUMERATOR_COEFFICIENT_COUNT; ++idx)
+   {
+      in.read(temp3, SAMPLE_NUMERATOR_COEFFICIENT_SIZE);
+      theSampleNumeratorCoefficient[idx] = temp3;
+   }
+   
+   char temp4[SAMPLE_DENOMINATOR_COEFFICIENT_SIZE+1];
+   temp4[SAMPLE_DENOMINATOR_COEFFICIENT_SIZE] = '\0';
+   for(idx = 0; idx < SAMPLE_DENOMINATOR_COEFFICIENT_COUNT; ++idx)
+   {
+      in.read(temp4, SAMPLE_DENOMINATOR_COEFFICIENT_SIZE);
+      theSampleDenominatorCoefficient[idx] = temp4;
+   }
+}
+
+void ossimNitfRpcBase::writeStream(std::ostream& out)
+{
+   ossim_uint32 idx = 0;
+   
+   out.write(theSuccess, SUCCESS_SIZE);
+   out.write(theErrorBias, ERROR_BIAS_SIZE);
+   out.write(theErrRand, ERR_RAND_SIZE);
+   out.write(theLineOffset, LINE_OFFSET_SIZE);
+   out.write(theSampleOffset, SAMPLE_OFFSET_SIZE);
+   out.write(theGeodeticLatOffset, GEODETIC_LAT_OFFSET_SIZE);
+   out.write(theGeodeticLonOffset, GEODETIC_LON_OFFSET_SIZE);
+   out.write(theGeodeticHeightOffset, GEODETIC_HEIGHT_OFFSET_SIZE);
+   out.write(theLineScale, LINE_SCALE_SIZE);
+   out.write(theSampleScale, SAMPLE_SCALE_SIZE);
+   out.write(theGeodeticLatScale, GEODETIC_LAT_SCALE_SIZE);
+   out.write(theGeodeticLonScale, GEODETIC_LON_SCALE_SIZE);
+   out.write(theGeodeticHeightScale, GEODETIC_HEIGHT_SCALE_SIZE);
+   for(idx = 0; idx < LINE_NUMERATOR_COEFFICIENT_COUNT; ++idx)
+   {
+      out.write(theLineNumeratorCoefficient[idx].c_str(),
+                LINE_NUMERATOR_COEFFICIENT_SIZE);
+   }
+   for(idx = 0; idx < LINE_DENOMINATOR_COEFFICIENT_COUNT; ++idx)
+   {
+      out.write(theLineDenominatorCoefficient[idx].c_str(),
+                LINE_DENOMINATOR_COEFFICIENT_SIZE);
+   }
+   for(idx = 0; idx < SAMPLE_NUMERATOR_COEFFICIENT_COUNT; ++idx)
+   {
+      out.write(theSampleNumeratorCoefficient[idx].c_str(),
+                SAMPLE_NUMERATOR_COEFFICIENT_SIZE);
+   }
+   for(idx = 0; idx < SAMPLE_DENOMINATOR_COEFFICIENT_COUNT; ++idx)
+   {
+      out.write(theSampleDenominatorCoefficient[idx].c_str(),
+                SAMPLE_DENOMINATOR_COEFFICIENT_SIZE);
+   }
+}
+
+void ossimNitfRpcBase::clearFields()
+{
+   theSuccess[0] = '1';
+   memcpy(theErrorBias, "0000.00", 7);
+   memcpy(theErrRand, "0000.00", 7);
+   memcpy(theLineOffset, "000000", 6);
+   memcpy(theSampleOffset, "00000", 5);
+   memcpy(theGeodeticLatOffset, "+00.0000", 8);
+   memcpy(theGeodeticLonOffset, "+000.0000", 9);
+   memcpy(theGeodeticHeightOffset, "+0000", 5);
+   memcpy(theLineScale, "000001", 6);
+   memcpy(theSampleScale, "00001", 5);
+   memcpy(theGeodeticLatScale, "+00.0000", 8);
+   memcpy(theGeodeticLonScale, "+000.0000", 9);
+   memcpy(theGeodeticHeightScale, "+0000", 5);
+   
+   theSuccess[1] = '\0';
+   theErrorBias[7] = '\0';
+   theErrRand[7] = '\0';
+   theLineOffset[6] = '\0';
+   theSampleOffset[5] = '\0';
+   theGeodeticLatOffset[8]='\0';
+   theGeodeticLonOffset[9]='\0';
+   theGeodeticHeightOffset[5]='\0';
+   theLineScale[6]='\0';
+   theSampleScale[5]='\0';
+   theGeodeticLatScale[8]='\0';
+   theGeodeticLonScale[9]='\0';
+   theGeodeticHeightScale[5]='\0';
+   
+   theLineNumeratorCoefficient.resize(20);
+   theLineDenominatorCoefficient.resize(20);
+   theSampleNumeratorCoefficient.resize(20);
+   theSampleDenominatorCoefficient.resize(20);
+   ossim_uint32 idx = 0;
+   const char* zeroString = "+0.000000E+0";
+   
+   for(idx = 0; idx < theLineNumeratorCoefficient.size();++idx)
+   {
+      theLineNumeratorCoefficient[idx] = zeroString; 
+      theLineDenominatorCoefficient[idx] = zeroString;;
+      theSampleNumeratorCoefficient[idx] = zeroString;;
+      theSampleDenominatorCoefficient[idx] = zeroString;;
+   }
+}
+
+bool ossimNitfRpcBase::getSuccess()const
+{
+   return (theSuccess[0] == '1');
+}
+
+void ossimNitfRpcBase::setSuccess(bool success)
+{
+   theSuccess[0] = success?'1':'0';
+}
+
+ossimString ossimNitfRpcBase::getErrorBias()const
+{
+   return theErrorBias;
+}
+
+void ossimNitfRpcBase::setErrorBias(const ossim_float64& errorBias)
+{
+   ossimString os = ossimNitfCommon::convertToDoubleString(errorBias,
+                                                           2,
+                                                           ERROR_BIAS_SIZE);
+   setErrorBias(os);
+}
+
+void ossimNitfRpcBase::setErrorBias(const ossimString& errorBias)
+{
+   memset(theErrorBias, ' ', ERROR_BIAS_SIZE);
+   memcpy(theErrorBias, errorBias.c_str(), std::min((size_t)ERROR_BIAS_SIZE, errorBias.length()));
+}
+
+ossimString ossimNitfRpcBase::getErrorRand()const
+{
+   return theErrRand;
+}
+
+void ossimNitfRpcBase::setErrorRand(const ossim_float64& errorRand)
+{
+   ossimString os = ossimNitfCommon::convertToDoubleString(errorRand,
+                                                           2,
+                                                           ERROR_BIAS_SIZE);
+   setErrorRand(os);
+}
+
+void ossimNitfRpcBase::setErrorRand(const ossimString& errorRand)
+{
+   memset(theErrRand, ' ', ERR_RAND_SIZE);
+   memcpy(theErrRand, errorRand.c_str(), std::min((size_t)ERR_RAND_SIZE, errorRand.length()));
+}
+
+ossimString ossimNitfRpcBase::getLineOffset()const
+{
+   return theLineOffset;
+}
+
+void ossimNitfRpcBase::setLineOffset(ossim_uint32 lineOffset)
+{
+   ossimString os = ossimNitfCommon::convertToUIntString(lineOffset,
+                                                         LINE_OFFSET_SIZE);
+   setLineOffset(os);
+}
+
+void ossimNitfRpcBase::setLineOffset(const ossimString& lineOffset)
+{
+   memset(theLineOffset, ' ', LINE_OFFSET_SIZE);
+   memcpy(theLineOffset, lineOffset.c_str(), std::min((size_t)LINE_OFFSET_SIZE, lineOffset.length()));
+}
+
+ossimString ossimNitfRpcBase::getSampleOffset()const
+{
+   return theSampleOffset;
+}
+
+void ossimNitfRpcBase::setSampleOffset(ossim_uint32 sampleOffset)
+{
+   ossimString os = ossimNitfCommon::convertToUIntString(sampleOffset,
+                                                         SAMPLE_OFFSET_SIZE);
+   setSampleOffset(os);
+}
+
+void ossimNitfRpcBase::setSampleOffset(const ossimString& sampleOffset)
+{
+   memset(theSampleOffset, ' ', SAMPLE_OFFSET_SIZE);
+   memcpy(theSampleOffset, sampleOffset.c_str(), std::min((size_t)SAMPLE_OFFSET_SIZE, sampleOffset.length()));
+}
+
+ossimString ossimNitfRpcBase::getGeodeticLatOffset()const
+{
+   return theGeodeticLatOffset;
+}
+
+void ossimNitfRpcBase::setGeodeticLatOffset(
+   const ossim_float64& geodeticLatOffset)
+{
+   if ( (geodeticLatOffset >= -90.0) && (geodeticLatOffset <= 90.0) )
+   {
+      ossimString os =
+         ossimNitfCommon::convertToDoubleString(geodeticLatOffset,
+                                                4,
+                                                GEODETIC_LAT_OFFSET_SIZE);
+      setGeodeticLatOffset(os);
+   }
+}
+
+void ossimNitfRpcBase::setGeodeticLatOffset(
+   const ossimString& geodeticLatOffset)
+{
+   memset(theGeodeticLatOffset, ' ', GEODETIC_LAT_OFFSET_SIZE);
+   memcpy(theGeodeticLatOffset, geodeticLatOffset.c_str(), std::min((size_t)GEODETIC_LAT_OFFSET_SIZE, geodeticLatOffset.length()));
+}
+
+ossimString ossimNitfRpcBase::getGeodeticLonOffset()const
+{
+   return theGeodeticLonOffset;
+}
+
+void ossimNitfRpcBase::setGeodeticLonOffset(
+   const ossim_float64& geodeticLonOffset)
+{
+   if ( (geodeticLonOffset >= -180.0) && (geodeticLonOffset <= 180.0) )
+   {
+      ossimString os =
+         ossimNitfCommon::convertToDoubleString(geodeticLonOffset,
+                                                4,
+                                                GEODETIC_LON_OFFSET_SIZE);
+      setGeodeticLonOffset(os);
+   }
+}
+
+void ossimNitfRpcBase::setGeodeticLonOffset(const ossimString& geodeticLonOffset)
+{
+   memset(theGeodeticLonOffset, ' ', GEODETIC_LON_OFFSET_SIZE);
+   memcpy(theGeodeticLonOffset, geodeticLonOffset.c_str(), std::min((size_t)GEODETIC_LON_OFFSET_SIZE, geodeticLonOffset.length()));
+}
+
+ossimString ossimNitfRpcBase::getGeodeticHeightOffset()const
+{
+   return theGeodeticHeightOffset;
+}
+
+void ossimNitfRpcBase::setGeodeticHeightOffset(
+   ossim_int32 geodeticHeightOffset)
+{
+   ossimString os =
+      ossimNitfCommon::convertToIntString(geodeticHeightOffset,
+                                          GEODETIC_HEIGHT_OFFSET_SIZE);
+   setGeodeticHeightOffset(os);
+}
+
+void ossimNitfRpcBase::setGeodeticHeightOffset(const ossimString& geodeticHeightOffset)
+{
+   memset(theGeodeticHeightOffset, ' ', GEODETIC_HEIGHT_OFFSET_SIZE);
+   memcpy(theGeodeticHeightOffset, geodeticHeightOffset.c_str(), std::min((size_t)GEODETIC_HEIGHT_OFFSET_SIZE, geodeticHeightOffset.length()));
+}
+
+ossimString ossimNitfRpcBase::getLineScale()const
+{
+   return theLineScale;
+}
+
+void ossimNitfRpcBase::setLineScale(ossim_uint32 lineScale)
+{
+   ossimString os = ossimNitfCommon::convertToUIntString(lineScale,
+                                                         LINE_SCALE_SIZE);
+   setLineScale(os);
+}
+
+void ossimNitfRpcBase::setLineScale(const ossimString& lineScale)
+{
+   memset(theLineScale, ' ', LINE_SCALE_SIZE);
+   memcpy(theLineScale, lineScale.c_str(), std::min((size_t)LINE_SCALE_SIZE, lineScale.length()));
+}
+
+ossimString ossimNitfRpcBase::getSampleScale()const
+{
+   return theSampleScale;
+}
+
+void ossimNitfRpcBase::setSampleScale(ossim_uint32 sampleScale)
+{
+   ossimString os = ossimNitfCommon::convertToUIntString(sampleScale,
+                                       SAMPLE_SCALE_SIZE);
+   setSampleScale(os);
+}
+
+void ossimNitfRpcBase::setSampleScale(const ossimString& sampleScale)
+{
+   memset(theSampleScale, ' ', SAMPLE_SCALE_SIZE);
+   memcpy(theSampleScale, sampleScale.c_str(), std::min((size_t)SAMPLE_SCALE_SIZE, sampleScale.length()));
+}
+
+ossimString ossimNitfRpcBase::getGeodeticLatScale()const
+{
+   return theGeodeticLatScale;
+}
+
+void ossimNitfRpcBase::setGeodeticLatScale(
+   const ossim_float64& geodeticLatScale)
+{
+   if (geodeticLatScale == 0.0)
+   {
+      // Error scale cannot be zero.
+      return;
+   }
+   
+   if ( (geodeticLatScale >= -90.0) && (geodeticLatScale <= 90.0) )
+   {
+      ossimString os = ossimNitfCommon::convertToDoubleString(geodeticLatScale,
+                                             4,
+                                             GEODETIC_LAT_SCALE_SIZE);
+      setGeodeticLatScale(os);
+   }
+}
+
+void ossimNitfRpcBase::setGeodeticLatScale(const ossimString& geodeticLatScale)
+{
+   memset(theGeodeticLatScale, ' ', GEODETIC_LAT_SCALE_SIZE);
+   memcpy(theGeodeticLatScale, geodeticLatScale.c_str(), std::min((size_t)GEODETIC_LAT_SCALE_SIZE, geodeticLatScale.length()));
+}
+
+ossimString ossimNitfRpcBase::getGeodeticLonScale()const
+{
+   return theGeodeticLonScale;
+}
+
+void ossimNitfRpcBase::setGeodeticLonScale(
+   const ossim_float64& geodeticLonScale)
+{
+   if (geodeticLonScale == 0.0)
+   {
+      // Error scale cannot be zero.
+      return;
+   }
+   
+   if ( (geodeticLonScale >= -180.0) && (geodeticLonScale <= 180.0) )
+   {
+      ossimString os = ossimNitfCommon::convertToDoubleString(geodeticLonScale,
+                                             4,
+                                             GEODETIC_LON_SCALE_SIZE);
+      setGeodeticLonScale(os);
+   }
+}
+
+void ossimNitfRpcBase::setGeodeticLonScale(const ossimString& geodeticLonScale)
+{
+   memset(theGeodeticLonScale, ' ', GEODETIC_LON_SCALE_SIZE);
+   memcpy(theGeodeticLonScale, geodeticLonScale.c_str(), std::min((size_t)GEODETIC_LON_SCALE_SIZE, geodeticLonScale.length()));
+}
+
+ossimString ossimNitfRpcBase::getGeodeticHeightScale()const
+{
+   return theGeodeticHeightScale;
+}
+
+void ossimNitfRpcBase::setGeodeticHeightScale(ossim_int32 geodeticHeightScale)
+{
+   ossimString os =
+      ossimNitfCommon::convertToIntString(geodeticHeightScale,
+                                          GEODETIC_HEIGHT_SCALE_SIZE);
+   setGeodeticHeightScale(os);
+}
+
+void ossimNitfRpcBase::setGeodeticHeightScale(
+   const ossimString& geodeticHeightScale)
+{
+   memset(theGeodeticHeightScale, ' ', GEODETIC_HEIGHT_SCALE_SIZE);
+   memcpy(theGeodeticHeightScale, geodeticHeightScale.c_str(), std::min((size_t)GEODETIC_HEIGHT_SCALE_SIZE, geodeticHeightScale.length()));
+}
+
+/* Temp comment out until range error handling is decided.*/
+#if 0
+// The assert here will be ignored when compiled with -DNDEBUG so ossimSetError and fix the index
+#define ASSERT_ARRAY_CONSTRAINT(expression, idx, correctedValue, module) \
+   assert(expression);                                                  \
+   ossimSetError(getClassName().c_str(), ossimErrorCodes::OSSIM_ERROR,  \
+                 "File %s line %d Module %s Error:\nArray index constraint error.\n", \
+                 __FILE__, __LINE__, module);                           \
+   if (! (expression) ) idx = correctedValue;
+
+#endif
+   
+ossimString ossimNitfRpcBase::getLineNumeratorCoeff(ossim_uint32 idx)const
+{
+//ASSERT_ARRAY_CONSTRAINT(idx >= 0 && idx < LINE_NUMERATOR_COEFFICIENT_COUNT,idx,0,"ossimNitfRpcBase::getLineNumeratorCoeff");
+
+   if (idx >= LINE_NUMERATOR_COEFFICIENT_COUNT)
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimNitfRpcBase::getLineNumeratorCoeff range error!"
+            << std::endl;
+      }
+      return ossimString();
+   }
+   
+   return theLineNumeratorCoefficient[idx];
+}
+
+void ossimNitfRpcBase::setLineNumeratorCoeff(
+   const std::vector<ossim_float64>& coeff)
+{
+   if (coeff.size() != LINE_NUMERATOR_COEFFICIENT_COUNT)
+   {
+      // Error...
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfRpcBase::setLineNumeratorCoeff WARNING:"
+            << "\nArray not of correct size!"
+            << std::endl;
+      }
+      return;
+   }
+
+   for (ossim_uint32 i = 0; i < LINE_NUMERATOR_COEFFICIENT_COUNT; ++i)
+   {
+      ossimString os = ossimNitfCommon::convertToScientificString(
+         coeff[i], LINE_NUMERATOR_COEFFICIENT_SIZE);
+      setLineNumeratorCoeff(i, os);
+   }
+}
+
+void ossimNitfRpcBase::setLineNumeratorCoeff(ossim_uint32 idx,
+                                             const ossimString& coeff)
+{
+   // ASSERT_ARRAY_CONSTRAINT(idx >= 0 && idx < LINE_NUMERATOR_COEFFICIENT_COUNT,idx,0,"ossimNitfRpcBase::setLineNumeratorCoeff");
+
+   if (idx >= LINE_NUMERATOR_COEFFICIENT_COUNT)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimNitfRpcBase::setLineNumeratorCoeff range error!"
+         << std::endl;
+      return;
+   } 
+
+   std::string s(coeff, 0, LINE_NUMERATOR_COEFFICIENT_SIZE);
+   theLineNumeratorCoefficient[idx] = s;  
+}
+
+ossimString ossimNitfRpcBase::getLineDenominatorCoeff(ossim_uint32 idx)const
+{
+   // ASSERT_ARRAY_CONSTRAINT(idx >= 0 && idx < LINE_DENOMINATOR_COEFFICIENT_COUNT,idx,0,"ossimNitfRpcBase::getLineDenominatorCoeff");
+
+   if (idx >= LINE_DENOMINATOR_COEFFICIENT_COUNT)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimNitfRpcBase::getLineDenominatorCoeff range error!"
+         << std::endl;
+      return ossimString();
+   }  
+   
+   return theLineDenominatorCoefficient[idx];
+}
+
+void ossimNitfRpcBase::setLineDenominatorCoeff(
+   const std::vector<ossim_float64>& coeff)
+{
+   if (coeff.size() != LINE_DENOMINATOR_COEFFICIENT_COUNT)
+   {
+      // Error...
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfRpcBase::setLineDenominatorCoeff WARNING:"
+            << "\nArray not of correct size!"
+            << std::endl;
+      }
+      return;
+   }
+
+   for (ossim_uint32 i = 0; i < LINE_DENOMINATOR_COEFFICIENT_COUNT; ++i)
+   {
+      ossimString os = ossimNitfCommon::convertToScientificString(
+         coeff[i], LINE_DENOMINATOR_COEFFICIENT_SIZE);
+      setLineDenominatorCoeff(i, os);
+   }
+}
+
+void ossimNitfRpcBase::setLineDenominatorCoeff(ossim_uint32 idx,
+                                               const ossimString& coeff)
+{
+   // ASSERT_ARRAY_CONSTRAINT(idx >= 0 && idx < LINE_DENOMINATOR_COEFFICIENT_COUNT,idx,0,"ossimNitfRpcBase::setLineDenominatorCoeff");
+
+   if (idx >= LINE_DENOMINATOR_COEFFICIENT_COUNT)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimNitfRpcBase::setLineDenominatorCoeff range error!"
+         << std::endl;
+      return;
+   } 
+   
+   std::string s(coeff, 0, LINE_DENOMINATOR_COEFFICIENT_SIZE);
+   theLineDenominatorCoefficient[idx] = s;  
+}
+
+ossimString ossimNitfRpcBase::getSampleNumeratorCoeff(ossim_uint32 idx)const
+{
+   // ASSERT_ARRAY_CONSTRAINT(idx >= 0 && idx < SAMPLE_NUMERATOR_COEFFICIENT_COUNT,idx,0,"ossimNitfRpcBase::getSampleNumeratorCoeff");
+
+   if (idx >= SAMPLE_NUMERATOR_COEFFICIENT_COUNT)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimNitfRpcBase::getSampleNumeratorCoeff range error!"
+         << std::endl;
+      return ossimString();
+   } 
+   return theSampleNumeratorCoefficient[idx];
+}
+
+void ossimNitfRpcBase::setSampleNumeratorCoeff(
+   const std::vector<ossim_float64>& coeff)
+{
+   if (coeff.size() != SAMPLE_NUMERATOR_COEFFICIENT_COUNT)
+   {
+      // Error...
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfRpcBase::setSampleNumeratorCoeff WARNING:"
+            << "\nArray not of correct size!"
+            << std::endl;
+      }
+      return;
+   }
+
+   for (ossim_uint32 i = 0; i < SAMPLE_NUMERATOR_COEFFICIENT_COUNT; ++i)
+   {
+      ossimString os = ossimNitfCommon::convertToScientificString(
+         coeff[i], SAMPLE_NUMERATOR_COEFFICIENT_SIZE);
+      setSampleNumeratorCoeff(i, os);
+   }
+}
+
+void ossimNitfRpcBase::setSampleNumeratorCoeff(ossim_uint32 idx,
+                                               const ossimString& coeff)
+{
+   // ASSERT_ARRAY_CONSTRAINT(idx >= 0 && idx < SAMPLE_NUMERATOR_COEFFICIENT_COUNT,idx,0,"ossimNitfRpcBase::setSampleNumeratorCoeff");
+
+   if (idx >= SAMPLE_NUMERATOR_COEFFICIENT_COUNT)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimNitfRpcBase::setSampleNumeratorCoeff range error!"
+         << std::endl;
+      return;
+   } 
+   
+   std::string s(coeff, 0, SAMPLE_NUMERATOR_COEFFICIENT_SIZE);
+   theSampleNumeratorCoefficient[idx] = s;  
+}
+
+ossimString ossimNitfRpcBase::getSampleDenominatorCoeff(ossim_uint32 idx)const
+{
+   // ASSERT_ARRAY_CONSTRAINT(idx >= 0 && idx < SAMPLE_DENOMINATOR_COEFFICIENT_COUNT,idx,0,"ossimNitfRpcBase::getSampleDenominatorCoeff");
+
+   if (idx >= SAMPLE_DENOMINATOR_COEFFICIENT_COUNT)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimNitfRpcBase::getSampleDenominatorCoeff range error!"
+         << std::endl;
+      return ossimString();
+   } 
+   
+   return theSampleDenominatorCoefficient[idx];
+}
+
+void ossimNitfRpcBase::setSampleDenominatorCoeff(
+   const std::vector<ossim_float64>& coeff)
+{
+   if (coeff.size() != SAMPLE_DENOMINATOR_COEFFICIENT_COUNT)
+   {
+      // Error...
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimNitfRpcBase::setSampleDenominatorCoeff WARNING:"
+            << "\nArray not of correct size!"
+            << std::endl;
+      }
+      return;
+   }
+
+   for (ossim_uint32 i = 0; i < SAMPLE_DENOMINATOR_COEFFICIENT_COUNT; ++i)
+   {
+      ossimString os = ossimNitfCommon::convertToScientificString(
+         coeff[i], SAMPLE_DENOMINATOR_COEFFICIENT_SIZE);
+      setSampleDenominatorCoeff(i, os);
+   }
+}
+
+void ossimNitfRpcBase::setSampleDenominatorCoeff(
+   ossim_uint32 idx, const ossimString& coeff)
+{
+   // ASSERT_ARRAY_CONSTRAINT(idx >= 0 && idx < SAMPLE_DENOMINATOR_COEFFICIENT_COUNT,idx,0,"ossimNitfRpcBase::setSampleDenominatorCoeff");
+
+   if (idx >= SAMPLE_DENOMINATOR_COEFFICIENT_COUNT)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossimNitfRpcBase::setSampleDenominatorCoeff range error!"
+         << std::endl;
+      return;
+   }
+   
+  std::string s(coeff, 0, SAMPLE_DENOMINATOR_COEFFICIENT_SIZE);
+  s.resize(SAMPLE_DENOMINATOR_COEFFICIENT_SIZE, ' ');
+  theSampleDenominatorCoefficient[idx] = s;  
+}
+
+std::ostream& ossimNitfRpcBase::print(std::ostream& out,
+                                      const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+
+   out << setiosflags(std::ios::left)
+       << pfx << std::setw(24) << "CETAG:"
+       << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:"
+       << getSizeInBytes() << "\n"
+       << pfx << std::setw(24) << "SUCCESS:"
+       << theSuccess << "\n" 
+       << pfx << std::setw(24) << "ERR_BIAS:"
+       << theErrorBias << "\n"
+       << pfx << std::setw(24) << "ERR_RAND:"
+       <<theErrRand  << "\n" 
+       << pfx << std::setw(24) << "LINE_OFF:"
+       << theLineOffset << "\n"
+       << pfx << std::setw(24) << "SAMP_OFF:"
+       << theSampleOffset << "\n" 
+       << pfx << std::setw(24) << "LAT_OFF:"
+       << theGeodeticLatOffset << "\n"
+       << pfx << std::setw(24) << "LONG_OFF:"
+       << theGeodeticLonOffset << "\n" 
+       << pfx << std::setw(24) << "HEIGHT_OFF:"
+       << theGeodeticHeightOffset << "\n"
+       << pfx << std::setw(24) << "LINE_SCALE:"
+       << theLineScale  << "\n" 
+       << pfx << std::setw(24)
+       << "SAMP_SCALE:" << theSampleScale << "\n"
+       << pfx << std::setw(24) << "LAT_SCALE:"
+       << theGeodeticLatScale << "\n" 
+       << pfx << std::setw(24) << "LONG_SCALE:"
+       << theGeodeticLonScale << "\n"
+       << pfx << std::setw(24) << "HEIGHT_SCALE:"
+       << theGeodeticHeightScale << "\n";
+
+   ossim_int32 i;
+   ossimString s;
+   
+   for (i=0; i<LINE_NUMERATOR_COEFFICIENT_COUNT; ++i)
+   {
+      s = "LINE_NUM_COEFF_";
+      s += ossimString::toString(i);
+      s += ":";
+      out << pfx << std::setw(24) << s
+          << theLineNumeratorCoefficient[i] << "\n";
+   }
+
+   for (i=0; i<LINE_DENOMINATOR_COEFFICIENT_COUNT; ++i)
+   {
+      s = "LINE_DEN_COEFF_";
+      s += ossimString::toString(i);
+      s += ":";
+      out << pfx << std::setw(24) << s
+          << theLineDenominatorCoefficient[i] << "\n";
+   }
+
+   for (i=0; i<LINE_NUMERATOR_COEFFICIENT_COUNT; ++i)
+   {
+      s = "SAMP_NUM_COEFF_";
+      s += ossimString::toString(i);
+      s += ":";
+      out << pfx << std::setw(24) << s
+          << theSampleNumeratorCoefficient[i] << "\n";
+   }
+
+   for (i=0; i<LINE_DENOMINATOR_COEFFICIENT_COUNT; ++i)
+   {
+      s = "SAMP_DEN_COEFF_";
+      s += ossimString::toString(i);
+      s += ":";
+      out << pfx << std::setw(24) << s
+          << theSampleDenominatorCoefficient[i] << "\n";
+   }
+
+   out.flush();
+   
+   return out;
+}
+
+void ossimNitfRpcBase::setProperty(ossimRefPtr<ossimProperty> /* property */)
+{
+   
+}
+
+ossimRefPtr<ossimProperty> ossimNitfRpcBase::getProperty(const ossimString& name)const
+{
+   ossimProperty* result = 0;
+   if(name == ERR_BIAS_KW)
+   {
+      result = new ossimStringProperty(name, theErrorBias);
+   }
+   else if(name == ERR_RAND_KW)
+   {
+      result = new ossimStringProperty(name, theErrRand);
+   }
+   else if(name == LINE_OFF_KW)
+   {
+      result = new ossimStringProperty(name, theLineOffset);
+   }
+   else if(name == SAMP_OFF_KW)
+   {
+      result = new ossimStringProperty(name, theSampleOffset);
+   }
+   else if(name == LAT_OFF_KW)
+   {
+      result = new ossimStringProperty(name, theGeodeticLatOffset);
+   }
+   else if(name == LONG_OFF_KW)
+   {
+      result = new ossimStringProperty(name, theGeodeticLonOffset);
+   }
+   else if(name == HEIGHT_OFF_KW)
+   {
+      result = new ossimStringProperty(name, theGeodeticHeightOffset);
+   }
+   else if(name == LINE_SCALE_KW)
+   {
+      result = new ossimStringProperty(name, theLineScale);
+   }
+   else if(name == SAMP_SCALE_KW)
+   {
+      result = new ossimStringProperty(name,theSampleScale );
+   }
+   else if(name == LAT_SCALE_KW)
+   {
+      result = new ossimStringProperty(name, theGeodeticLatScale);
+   }
+   else if(name == LONG_SCALE_KW)
+   {
+      result = new ossimStringProperty(name, theGeodeticLonScale);
+   }
+   else if(name == HEIGHT_SCALE_KW)
+   {
+      result = new ossimStringProperty(name, theGeodeticHeightScale);
+   }
+   else if(name.contains(LINE_NUM_COEFF_KW))
+   {
+      ossim_uint32 idx = 0;
+
+         idx = ossimString(name.begin()+LINE_NUM_COEFF_KW.length(),
+                           name.end()).toUInt32();
+      --idx;
+
+      if(idx < theLineNumeratorCoefficient.size())
+      {
+         result = new ossimStringProperty(name, theLineNumeratorCoefficient[idx]);
+      }
+   }
+   else if(name.contains(LINE_DEN_COEFF_KW))
+   {
+      ossim_uint32 idx = 0;
+
+      idx = ossimString(name.begin()+LINE_DEN_COEFF_KW.length(),
+                        name.end()).toUInt32();
+      --idx;
+
+      if(idx < theLineDenominatorCoefficient.size())
+      {
+         result = new ossimStringProperty(name, theLineDenominatorCoefficient[idx]);
+      }
+   }
+   else if(name.contains(SAMP_NUM_COEFF_KW))
+   {
+      ossim_uint32 idx = 0;
+
+      idx = ossimString(name.begin()+SAMP_NUM_COEFF_KW.length(),
+                        name.end()).toUInt32(); 
+      --idx;
+
+      if(idx < theSampleNumeratorCoefficient.size())
+      {
+         result = new ossimStringProperty(name, theSampleNumeratorCoefficient[idx]);
+      }
+   }
+   else if(name.contains(SAMP_DEN_COEFF_KW))
+   {
+      ossim_uint32 idx = 0;
+
+      idx = ossimString(name.begin()+SAMP_DEN_COEFF_KW.length(),
+                        name.end()).toUInt32();
+      --idx;
+
+      if(idx < theSampleDenominatorCoefficient.size())
+      {
+         result = new ossimStringProperty(name, theSampleDenominatorCoefficient[idx]);
+      }
+   }
+
+   return result;
+}
+
+void ossimNitfRpcBase::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossim_uint32 idx = 0;
+   
+   propertyNames.push_back(ERR_BIAS_KW);
+   propertyNames.push_back(ERR_RAND_KW);
+   propertyNames.push_back(LINE_OFF_KW);
+   propertyNames.push_back(SAMP_OFF_KW);
+   propertyNames.push_back(LAT_OFF_KW);
+   propertyNames.push_back(LONG_OFF_KW);
+   propertyNames.push_back(HEIGHT_OFF_KW);
+   propertyNames.push_back(LINE_SCALE_KW);
+   propertyNames.push_back(SAMP_SCALE_KW);
+   propertyNames.push_back(LAT_SCALE_KW);
+   propertyNames.push_back(LONG_SCALE_KW);
+   propertyNames.push_back(HEIGHT_SCALE_KW);
+
+   for(idx = 1; idx <= 20; ++idx)
+   {
+      propertyNames.push_back(LINE_NUM_COEFF_KW+ossimString::toString(idx));
+   }
+   for(idx = 1; idx <= 20; ++idx)
+   {
+      propertyNames.push_back(LINE_DEN_COEFF_KW+ossimString::toString(idx));
+   }
+   for(idx = 1; idx <= 20; ++idx)
+   {
+      propertyNames.push_back(SAMP_NUM_COEFF_KW+ossimString::toString(idx));
+   }
+   for(idx = 1; idx <= 20; ++idx)
+   {
+      propertyNames.push_back(SAMP_DEN_COEFF_KW+ossimString::toString(idx));
+   }
+}
+
+
diff --git a/ossim/src/ossim/support_data/ossimNitfRpfTagFactory.cpp b/ossim/src/ossim/support_data/ossimNitfRpfTagFactory.cpp
new file mode 100644
index 0000000..d9d4651
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfRpfTagFactory.cpp
@@ -0,0 +1,54 @@
+//*******************************************************************
+//
+// LICENSE: MIT  see top level LICENSE.txt
+// 
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfRpfTagFactory.cpp 23666 2015-12-14 20:01:22Z rashadkm $
+#include <ossim/support_data/ossimNitfRpfTagFactory.h>
+#include <ossim/support_data/ossimRpfHeader.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimTrace.h>
+
+RTTI_DEF1(ossimNitfRpfTagFactory, "ossimNitfRpfTagFactory", ossimNitfTagFactory);
+
+static const ossimString REGISTERED_RPF_HEADER_TAG = "RPFHDR";
+static const ossimString REGISTERED_RPF_DES_TAG    = "RPFDES";
+
+static ossimTrace traceDebug = ossimTrace("ossimNitfRpfTagFactory:debug");
+
+ossimNitfRpfTagFactory::ossimNitfRpfTagFactory()
+{
+}
+
+ossimNitfRpfTagFactory::~ossimNitfRpfTagFactory()
+{
+}
+
+ossimNitfRpfTagFactory* ossimNitfRpfTagFactory::instance()
+{
+   static ossimNitfRpfTagFactory inst;
+   return &inst;
+}
+
+ossimRefPtr<ossimNitfRegisteredTag> ossimNitfRpfTagFactory::create(const ossimString &tagName)const
+{
+   ossimString temp(ossimString(tagName).trim().upcase());
+   
+   if(temp == REGISTERED_RPF_HEADER_TAG)
+   {
+      return new ossimRpfHeader;
+   }
+   if(temp == REGISTERED_RPF_DES_TAG)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "WARNING  ossimNitfRpfTagFactory::create: Reader for REGISTERED_RPF_DES_TAG not implemented yet" << std::endl;
+      }
+   }
+   
+   return 0;
+}
diff --git a/ossim/src/ossim/support_data/ossimNitfRsmecaTag.cpp b/ossim/src/ossim/support_data/ossimNitfRsmecaTag.cpp
new file mode 100644
index 0000000..6cb8e35
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfRsmecaTag.cpp
@@ -0,0 +1,1160 @@
+//---
+// File: ossimNitfRsmecaTag.cpp
+//---
+
+#include <ossim/support_data/ossimNitfRsmecaTag.h>
+#include <ossim/support_data/ossimNitfCommon.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimStringProperty.h>
+
+#include <iostream>
+#include <iomanip>
+
+
+static const ossimTrace traceDebug(ossimString("ossimNitfRsmecaTag:debug"));
+static const ossimString RNPCF_KW = "RNPCF";
+static const ossimString RDPCF_KW = "RDPCF";
+//				  "0        1          2"; 
+//				  "123456789012345678901";
+static const ossimString FILL21 = "                     ";
+
+ossimNitfRsmecaIsg::ossimNitfRsmecaIsg()
+   :
+   m_numopg(),
+   m_errcvg(),
+   m_tcdf(),
+   m_ncseg(),
+   m_corseg(),
+   m_tauseg(),
+   m_errCovNum(0),
+   m_opgNum(0),
+   m_corSegNum(0)
+{
+}
+
+ossimNitfRsmecaIsg::ossimNitfRsmecaIsg(const ossimNitfRsmecaIsg& obj)
+   :
+   m_numopg(),
+   m_errcvg(obj.m_errcvg),
+   m_tcdf(),
+   m_ncseg(),
+   m_corseg(obj.m_corseg),
+   m_tauseg(obj.m_tauseg),
+   m_errCovNum(obj.m_errCovNum),
+   m_opgNum(obj.m_opgNum),
+   m_corSegNum(obj.m_corSegNum)
+{
+   strncpy( m_numopg, obj.m_numopg, (NUMOPG_SIZE+1) );
+   strncpy( m_tcdf,   obj.m_tcdf,   (TCDF_SIZE+1)   );
+   strncpy( m_ncseg,  obj.m_ncseg,  (NCSEG_SIZE+1)  );
+}
+
+const ossimNitfRsmecaIsg& ossimNitfRsmecaIsg::operator=(const ossimNitfRsmecaIsg& rhs)
+{
+   if (this != &rhs)
+   {
+      strncpy( m_numopg, rhs.m_numopg, (NUMOPG_SIZE+1) );
+      m_errcvg    = rhs.m_errcvg;
+      strncpy( m_tcdf,   rhs.m_tcdf,   (TCDF_SIZE+1)   );
+      strncpy( m_ncseg,  rhs.m_ncseg,  (NCSEG_SIZE+1)  );
+      m_corseg    = rhs.m_corseg;
+      m_tauseg    = rhs.m_tauseg;
+      m_errCovNum = rhs.m_errCovNum;
+      m_opgNum    = rhs.m_opgNum;
+      m_corSegNum = rhs.m_corSegNum;
+   }
+   return *this;
+}
+
+void ossimNitfRsmecaIsg::parseStream(std::istream& in)
+{
+   clearFields();
+   in.read(m_numopg, NUMOPG_SIZE);
+   m_opgNum = ossimString(m_numopg).toUInt32();
+   m_errCovNum = (m_opgNum * (m_opgNum + 1)) / 2;
+   ossim_uint32 i = 0;
+   char temp1[FLOAT21_SIZE+1];
+   temp1[FLOAT21_SIZE] = '\0';
+   m_errcvg.resize(m_errCovNum);
+   for (i=0; i < m_errCovNum; ++i)
+   {
+      in.read(temp1, FLOAT21_SIZE);
+      m_errcvg[i] = FILL21;
+      m_errcvg[i] = temp1;
+   }
+   in.read(m_tcdf, TCDF_SIZE);
+   in.read(m_ncseg, NCSEG_SIZE);
+   m_corSegNum = ossimString(m_ncseg).toUInt32();
+   m_corseg.resize(m_corSegNum);
+   m_tauseg.resize(m_corSegNum);
+
+   for (i=0; i < m_corSegNum; ++i)
+   {
+      in.read(temp1, FLOAT21_SIZE);
+      m_corseg[i] = FILL21;
+      m_corseg[i] = temp1;
+      in.read(temp1, FLOAT21_SIZE);
+      m_tauseg[i] = FILL21;
+      m_tauseg[i] = temp1;
+   }
+}
+
+void ossimNitfRsmecaIsg::writeStream(std::ostream& out)
+{
+   out.write(m_numopg, NUMOPG_SIZE);
+   ossim_uint32 i = 0;
+   for (i=0; i < m_errCovNum; ++i)
+   {
+      out.write(m_errcvg[i], FLOAT21_SIZE);
+   }
+   out.write(m_tcdf, TCDF_SIZE);
+   out.write(m_ncseg, NCSEG_SIZE);
+   
+   for (i=0; i < m_corSegNum; ++i)
+   {
+      out.write(m_corseg[i], FLOAT21_SIZE);
+      out.write(m_tauseg[i], FLOAT21_SIZE);
+   }
+}
+
+void ossimNitfRsmecaIsg::clearFields()
+{
+   memset(m_numopg, ' ', NUMOPG_SIZE);
+   memset(m_tcdf, ' ', TCDF_SIZE);
+   memset(m_ncseg, ' ', NCSEG_SIZE);
+   m_numopg[NUMOPG_SIZE] = '\0';
+   m_tcdf[TCDF_SIZE] = '\0';
+   m_ncseg[NCSEG_SIZE] = '\0';
+}
+
+std::ostream& ossimNitfRsmecaIsg::print(
+   std::ostream& out, const std::string& prefix, ossim_uint32 index) const
+{
+   std::string pfx = prefix;
+   pfx += "RSMECA";
+   pfx += ".ISG"; 
+   pfx += ossimString::toString(index).c_str();
+   pfx += ".";
+   ossim_uint32 i = 0;
+
+   out << setiosflags(std::ios::left)
+       << pfx << std::setw(24) << "NUMOPG:" << m_numopg << "\n";
+   for(i=0;i<m_errCovNum;++i)
+   {
+      ossimString field  = "ERRCVG" + ossimString::toString(i) + ":";
+      out << pfx << std::setw(24) <<  field << m_errcvg[i] << "\n";
+   }
+
+   out << pfx << std::setw(24) << "TCDF:" << m_tcdf << "\n"
+       << pfx << std::setw(24) << "NCSEG:" << m_ncseg << "\n";
+
+   for(i=0;i<m_corSegNum;++i)
+   {
+      ossimString field = "CORSEG" + ossimString::toString(i) + ":";
+      out << pfx << std::setw(24) << field << m_corseg[i] << "\n";
+   }
+   for(i=0;i<m_corSegNum;++i)
+   {
+      ossimString field = "TAUSEG" + ossimString::toString(i) + ":";
+      out << pfx << std::setw(24) << field << m_tauseg[i] << "\n";
+   }
+
+   return out;
+}
+
+RTTI_DEF1(ossimNitfRsmecaTag, "ossimNitfRsmecaTag", ossimNitfRegisteredTag);
+
+
+ossimNitfRsmecaTag::ossimNitfRsmecaTag()
+   :
+   ossimNitfRegisteredTag(std::string("RSMECA"), 0),
+   m_iid(),
+   m_edition(),
+   m_tid(),
+   m_inclic(),
+   m_incluc(),
+   m_npar(),
+   m_nparo(),
+   m_ign(),
+   m_cvdate(),
+   m_xuol(),
+   m_yuol(),
+   m_zuol(),
+   m_xuxl(),
+   m_xuyl(),
+   m_xuzl(),
+   m_yuxl(),
+   m_yuyl(),
+   m_yuzl(),
+   m_zuxl(),
+   m_zuyl(),
+   m_zuzl(),
+   m_iro(),
+   m_irx(),
+   m_iry(),
+   m_irz(),
+   m_irxx(),
+   m_irxy(),
+   m_irxz(),
+   m_iryy(),
+   m_iryz(),
+   m_irzz(),
+   m_ico(),
+   m_icx(),
+   m_icy(),
+   m_icz(),
+   m_icxx(),
+   m_icxy(),
+   m_icxz(),
+   m_icyy(),
+   m_icyz(),
+   m_iczz(),
+   m_gxo(),
+   m_gyo(),
+   m_gzo(),
+   m_gxr(),
+   m_gyr(),
+   m_gzr(),
+   m_gs(),
+   m_gxx(),
+   m_gxy(),
+   m_gxz(),
+   m_gyx(),
+   m_gyy(),
+   m_gyz(),
+   m_gzx(),
+   m_gzy(),
+   m_gzz(),
+
+   m_isg(),
+   m_map(),
+   
+   m_urr(),
+   m_urc(),
+   m_ucc(),
+   m_uncsr(),
+   m_ucorsr(),
+   m_utausr(),
+   m_uncsc(),
+   m_ucorsc(),
+   m_utausc(),
+
+   m_inclicFlag(false),
+   m_inclucFlag(false),
+   m_ignNum(0),
+   m_mapNum(0),
+   m_rowCorSegNum(0),
+   m_colCorSegNum(0)
+{
+}
+
+void ossimNitfRsmecaTag::parseStream(std::istream& in)
+{
+   memset(m_iid,' ', IID_SIZE);
+   memset(m_edition,' ', EDITION_SIZE);
+   memset(m_tid,' ', TID_SIZE);
+   memset(m_inclic,' ', INCLIC_SIZE);
+   memset(m_incluc,' ', INCLUC_SIZE);
+   m_iid[IID_SIZE] = '\0';
+   m_edition[EDITION_SIZE] = '\0';
+   m_tid[TID_SIZE] = '\0';
+   m_inclic[INCLIC_SIZE] = '\0';
+   m_incluc[INCLUC_SIZE] = '\0';
+   in.read(m_iid, IID_SIZE);
+   in.read(m_edition, EDITION_SIZE);
+   in.read(m_tid, TID_SIZE);
+   in.read(m_inclic, INCLIC_SIZE);
+   m_inclicFlag = (ossimString(m_inclic) == "Y") ? true : false;
+   in.read(m_incluc, INCLUC_SIZE);
+   m_inclucFlag = (ossimString(m_incluc) == "Y") ? true : false;
+   ossim_uint32 i = 0;
+
+   if (m_inclicFlag)
+   {
+     memset(m_npar,' ', NPAR_SIZE);
+     memset(m_nparo,' ', NPARO_SIZE);
+     memset(m_ign,' ', IGN_SIZE);
+     memset(m_cvdate,' ', CVDATE_SIZE);
+     memset(m_xuol,' ', FLOAT21_SIZE);
+     memset(m_yuol,' ', FLOAT21_SIZE);
+     memset(m_zuol,' ', FLOAT21_SIZE);
+     memset(m_xuxl,' ', FLOAT21_SIZE);
+     memset(m_xuyl,' ', FLOAT21_SIZE);
+     memset(m_xuzl,' ', FLOAT21_SIZE);
+     memset(m_yuxl,' ', FLOAT21_SIZE);
+     memset(m_yuyl,' ', FLOAT21_SIZE);
+     memset(m_yuzl,' ', FLOAT21_SIZE);
+     memset(m_zuxl,' ', FLOAT21_SIZE);
+     memset(m_zuyl,' ', FLOAT21_SIZE);
+     memset(m_zuzl,' ', FLOAT21_SIZE);
+     memset(m_iro,' ', IR_SIZE);
+     memset(m_irx,' ', IR_SIZE);
+     memset(m_iry,' ', IR_SIZE);
+     memset(m_irz,' ', IR_SIZE);
+     memset(m_irxx,' ', IR_SIZE);
+     memset(m_irxy,' ', IR_SIZE);
+     memset(m_irxz,' ', IR_SIZE);
+     memset(m_iryy,' ', IR_SIZE);
+     memset(m_iryz,' ', IR_SIZE);
+     memset(m_irzz,' ', IR_SIZE);
+     memset(m_ico,' ', IC_SIZE);
+     memset(m_icx,' ', IC_SIZE);
+     memset(m_icy,' ', IC_SIZE);
+     memset(m_icz,' ', IC_SIZE);
+     memset(m_icxx,' ', IC_SIZE);
+     memset(m_icxy,' ', IC_SIZE);
+     memset(m_icxz,' ', IC_SIZE);
+     memset(m_icyy,' ', IC_SIZE);
+     memset(m_icyz,' ', IC_SIZE);
+     memset(m_iczz,' ', IC_SIZE);
+     memset(m_gxo,' ', G_SIZE);
+     memset(m_gyo,' ', G_SIZE);
+     memset(m_gzo,' ', G_SIZE);
+     memset(m_gxr,' ', G_SIZE);
+     memset(m_gyr,' ', G_SIZE);
+     memset(m_gzr,' ', G_SIZE);
+     memset(m_gs,' ', G_SIZE);
+     memset(m_gxx,' ', G_SIZE);
+     memset(m_gxy,' ', G_SIZE);
+     memset(m_gxz,' ', G_SIZE);
+     memset(m_gyx,' ', G_SIZE);
+     memset(m_gyy,' ', G_SIZE);
+     memset(m_gyz,' ', G_SIZE);
+     memset(m_gzx,' ', G_SIZE);
+     memset(m_gzy,' ', G_SIZE);
+     memset(m_gzz,' ', G_SIZE);
+     m_npar[NPAR_SIZE] = '\0';
+     m_nparo[NPARO_SIZE] = '\0';
+     m_ign[IGN_SIZE] = '\0';
+     m_cvdate[CVDATE_SIZE] = '\0';
+     m_xuol[FLOAT21_SIZE] = '\0';
+     m_yuol[FLOAT21_SIZE] = '\0';
+     m_zuol[FLOAT21_SIZE] = '\0';
+     m_xuxl[FLOAT21_SIZE] = '\0';
+     m_xuyl[FLOAT21_SIZE] = '\0';
+     m_xuzl[FLOAT21_SIZE] = '\0';
+     m_yuxl[FLOAT21_SIZE] = '\0';
+     m_yuyl[FLOAT21_SIZE] = '\0';
+     m_yuzl[FLOAT21_SIZE] = '\0';
+     m_zuxl[FLOAT21_SIZE] = '\0';
+     m_zuyl[FLOAT21_SIZE] = '\0';
+     m_zuzl[FLOAT21_SIZE] = '\0';
+     m_iro[IR_SIZE] = '\0';
+     m_irx[IR_SIZE] = '\0';
+     m_iry[IR_SIZE] = '\0';
+     m_irz[IR_SIZE] = '\0';
+     m_irxx[IR_SIZE] = '\0';
+     m_irxy[IR_SIZE] = '\0';
+     m_irxz[IR_SIZE] = '\0';
+     m_iryy[IR_SIZE] = '\0';
+     m_iryz[IR_SIZE] = '\0';
+     m_irzz[IR_SIZE] = '\0';
+     m_ico[IR_SIZE] = '\0';
+     m_icx[IR_SIZE] = '\0';
+     m_icy[IR_SIZE] = '\0';
+     m_icz[IR_SIZE] = '\0';
+     m_icxx[IR_SIZE] = '\0';
+     m_icxy[IR_SIZE] = '\0';
+     m_icxz[IR_SIZE] = '\0';
+     m_icyy[IR_SIZE] = '\0';
+     m_icyz[IR_SIZE] = '\0';
+     m_iczz[IR_SIZE] = '\0';
+     m_gxo[G_SIZE] = '\0';
+     m_gyo[G_SIZE] = '\0';
+     m_gzo[G_SIZE] = '\0';
+     m_gxr[G_SIZE] = '\0';
+     m_gyr[G_SIZE] = '\0';
+     m_gzr[G_SIZE] = '\0';
+     m_gs[G_SIZE] = '\0';
+     m_gxx[G_SIZE] = '\0';
+     m_gxy[G_SIZE] = '\0';
+     m_gxz[G_SIZE] = '\0';
+     m_gyx[G_SIZE] = '\0';
+     m_gyy[G_SIZE] = '\0';
+     m_gyz[G_SIZE] = '\0';
+     m_gzx[G_SIZE] = '\0';
+     m_gzy[G_SIZE] = '\0';
+     m_gzz[G_SIZE] = '\0';
+
+     in.read(m_npar, NPAR_SIZE);
+     in.read(m_nparo, NPARO_SIZE);
+     m_mapNum = ossimString(m_npar).toUInt32() * ossimString(m_nparo).toUInt32();
+     in.read(m_ign, IGN_SIZE);
+     m_ignNum = ossimString(m_ign).toUInt32();
+     in.read(m_cvdate, CVDATE_SIZE);
+     in.read(m_xuol, FLOAT21_SIZE);
+     in.read(m_yuol, FLOAT21_SIZE);
+     in.read(m_zuol, FLOAT21_SIZE);
+     in.read(m_xuxl, FLOAT21_SIZE);
+     in.read(m_xuyl, FLOAT21_SIZE);
+     in.read(m_xuzl, FLOAT21_SIZE);
+     in.read(m_yuxl, FLOAT21_SIZE);
+     in.read(m_yuyl, FLOAT21_SIZE);
+     in.read(m_yuzl, FLOAT21_SIZE);
+     in.read(m_zuxl, FLOAT21_SIZE);
+     in.read(m_zuyl, FLOAT21_SIZE);
+     in.read(m_zuzl, FLOAT21_SIZE);
+     in.read(m_iro, IR_SIZE);
+     in.read(m_irx, IR_SIZE);
+     in.read(m_iry, IR_SIZE);
+     in.read(m_irz, IR_SIZE);
+     in.read(m_irxx, IR_SIZE);
+     in.read(m_irxy, IR_SIZE);
+     in.read(m_irxz, IR_SIZE);
+     in.read(m_iryy, IR_SIZE);
+     in.read(m_iryz, IR_SIZE);
+     in.read(m_irzz, IR_SIZE);
+     in.read(m_ico, IC_SIZE);
+     in.read(m_icx, IC_SIZE);
+     in.read(m_icy, IC_SIZE);
+     in.read(m_icz, IC_SIZE);
+     in.read(m_icxx, IC_SIZE);
+     in.read(m_icxy, IC_SIZE);
+     in.read(m_icxz, IC_SIZE);
+     in.read(m_icyy, IC_SIZE);
+     in.read(m_icyz, IC_SIZE);
+     in.read(m_iczz, IC_SIZE);
+     in.read(m_gxo, G_SIZE);
+     in.read(m_gyo, G_SIZE);
+     in.read(m_gzo, G_SIZE);
+     in.read(m_gxr, G_SIZE);
+     in.read(m_gyr, G_SIZE);
+     in.read(m_gzr, G_SIZE);
+     in.read(m_gs, G_SIZE);
+     in.read(m_gxx, G_SIZE);
+     in.read(m_gxy, G_SIZE);
+     in.read(m_gxz, G_SIZE);
+     in.read(m_gyx, G_SIZE);
+     in.read(m_gyy, G_SIZE);
+     in.read(m_gyz, G_SIZE);
+     in.read(m_gzx, G_SIZE);
+     in.read(m_gzy, G_SIZE);
+     in.read(m_gzz, G_SIZE);
+ 
+     m_isg.resize(m_ignNum);
+     m_map.resize(m_mapNum);
+
+     for (i=0; i < m_ignNum; ++i)
+     {
+        ossimNitfRsmecaIsg isg;
+        m_isg[i] = isg;
+        m_isg[i].parseStream(in);
+     }
+     char temp1[FLOAT21_SIZE+1];
+     temp1[FLOAT21_SIZE] = '\0';
+     for (i=0; i < m_mapNum; ++i)
+     {
+        in.read(temp1, FLOAT21_SIZE);
+        m_map[i] = FILL21;
+        m_map[i] = temp1;
+     }
+   }
+   if (m_inclucFlag)
+   {
+     memset(m_urr,' ', FLOAT21_SIZE);
+     memset(m_urc,' ', FLOAT21_SIZE);
+     memset(m_ucc,' ', FLOAT21_SIZE);
+     memset(m_uncsr, ' ', 1);
+     m_urr[FLOAT21_SIZE] = '\0';
+     m_urc[FLOAT21_SIZE] = '\0';
+     m_ucc[FLOAT21_SIZE] = '\0';
+     m_uncsr[1] = '\0';
+     in.read(m_urr, FLOAT21_SIZE);
+     in.read(m_urc, FLOAT21_SIZE);
+     in.read(m_ucc, FLOAT21_SIZE);
+     in.read(m_uncsr, 1);
+     m_rowCorSegNum = ossimString(m_uncsr).toUInt32();
+     m_ucorsr.resize(m_rowCorSegNum);
+     m_utausr.resize(m_rowCorSegNum);
+     char temp1[FLOAT21_SIZE+1];
+     temp1[FLOAT21_SIZE] = '\0';
+     for (i=0; i < m_rowCorSegNum; ++i)
+     {
+	in.read(temp1, FLOAT21_SIZE);
+        m_ucorsr[i] = FILL21;
+        m_ucorsr[i] = temp1;
+	in.read(temp1, FLOAT21_SIZE);
+	m_utausr[i] = FILL21;
+	m_utausr[i] = temp1;
+     }
+     memset(m_uncsc, ' ', 1);
+     m_uncsc[1] = '\0';
+     in.read(m_uncsc, 1);
+     m_colCorSegNum = ossimString(m_uncsc).toUInt32();
+     m_ucorsc.resize(m_colCorSegNum);
+     m_utausc.resize(m_colCorSegNum);
+     for (i=0; i < m_colCorSegNum; ++i)
+     {
+        in.read(temp1, FLOAT21_SIZE);
+        m_ucorsc[i] = FILL21;
+        m_ucorsc[i] = temp1;
+	in.read(temp1, FLOAT21_SIZE);
+        m_utausc[i] = FILL21;
+        m_utausc[i] = temp1;
+     }
+   }
+
+}
+
+void ossimNitfRsmecaTag::writeStream(std::ostream& out)
+{
+   out.write(m_iid, IID_SIZE);
+   out.write(m_edition, EDITION_SIZE);
+   out.write(m_tid, TID_SIZE);
+   out.write(m_inclic, INCLIC_SIZE);
+   out.write(m_incluc, INCLUC_SIZE);
+   ossim_uint32 i = 0;
+
+   if (m_inclicFlag)
+   {
+     out.write(m_npar, NPAR_SIZE);
+     out.write(m_nparo, NPARO_SIZE);
+     out.write(m_ign, IGN_SIZE);
+     out.write(m_cvdate, CVDATE_SIZE);
+     out.write(m_xuol, FLOAT21_SIZE);
+     out.write(m_yuol, FLOAT21_SIZE);
+     out.write(m_zuol, FLOAT21_SIZE);
+     out.write(m_xuxl, FLOAT21_SIZE);
+     out.write(m_xuyl, FLOAT21_SIZE);
+     out.write(m_xuzl, FLOAT21_SIZE);
+     out.write(m_yuxl, FLOAT21_SIZE);
+     out.write(m_yuyl, FLOAT21_SIZE);
+     out.write(m_yuzl, FLOAT21_SIZE);
+     out.write(m_zuxl, FLOAT21_SIZE);
+     out.write(m_zuyl, FLOAT21_SIZE);
+     out.write(m_zuzl, FLOAT21_SIZE);
+     out.write(m_iro, IR_SIZE);
+     out.write(m_irx, IR_SIZE);
+     out.write(m_iry, IR_SIZE);
+     out.write(m_irz, IR_SIZE);
+     out.write(m_irxx, IR_SIZE);
+     out.write(m_irxy, IR_SIZE);
+     out.write(m_irxz, IR_SIZE);
+     out.write(m_iryy, IR_SIZE);
+     out.write(m_iryz, IR_SIZE);
+     out.write(m_irzz, IR_SIZE);
+     out.write(m_ico, IC_SIZE);
+     out.write(m_icx, IC_SIZE);
+     out.write(m_icy, IC_SIZE);
+     out.write(m_icz, IC_SIZE);
+     out.write(m_icxx, IC_SIZE);
+     out.write(m_icxy, IC_SIZE);
+     out.write(m_icxz, IC_SIZE);
+     out.write(m_icyy, IC_SIZE);
+     out.write(m_icyz, IC_SIZE);
+     out.write(m_iczz, IC_SIZE);
+     out.write(m_gxo, G_SIZE);
+     out.write(m_gyo, G_SIZE);
+     out.write(m_gzo, G_SIZE);
+     out.write(m_gxr, G_SIZE);
+     out.write(m_gyr, G_SIZE);
+     out.write(m_gzr, G_SIZE);
+     out.write(m_gs, G_SIZE);
+     out.write(m_gxx, G_SIZE);
+     out.write(m_gxy, G_SIZE);
+     out.write(m_gxz, G_SIZE);
+     out.write(m_gyx, G_SIZE);
+     out.write(m_gyy, G_SIZE);
+     out.write(m_gyz, G_SIZE);
+     out.write(m_gzx, G_SIZE);
+     out.write(m_gzy, G_SIZE);
+     out.write(m_gzz, G_SIZE);
+
+     for (i=0; i < m_ignNum; ++i)
+     {
+        m_isg[i].writeStream(out);
+     }
+     for (i=0; i < m_mapNum; ++i)
+     {
+        out.write(m_map[i], FLOAT21_SIZE);
+     }
+   }
+   if (m_inclucFlag)
+   {
+      out.write(m_urr, FLOAT21_SIZE);
+      out.write(m_urc, FLOAT21_SIZE);
+      out.write(m_ucc, FLOAT21_SIZE);
+      out.write(m_uncsr, 1);
+      for (i=0; i < m_rowCorSegNum; ++i)
+      {
+         out.write(m_ucorsr[i], FLOAT21_SIZE);
+         out.write(m_utausr[i], FLOAT21_SIZE);
+      }
+      out.write(m_uncsc, 1);
+      for (i=0; i < m_colCorSegNum; ++i)
+      {
+         out.write(m_ucorsc[i], FLOAT21_SIZE);
+         out.write(m_utausc[i], FLOAT21_SIZE);
+      }
+   }
+}
+
+void ossimNitfRsmecaTag::clearFields()
+{
+}
+
+std::ostream& ossimNitfRsmecaTag::print(std::ostream& out,
+                                        const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+   ossim_uint32 i = 0;
+
+   out << setiosflags(std::ios::left)
+       << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:" << getSizeInBytes() << "\n"
+       << pfx << std::setw(24) << "IID:" << m_iid << "\n" 
+       << pfx << std::setw(24) << "EDITION:" << m_edition << "\n"
+       << pfx << std::setw(24) << "TID:" << m_tid << "\n"
+       << pfx << std::setw(24) << "INCLIC:" << m_inclic << "\n"
+       << pfx << std::setw(24) << "INCLUC:" << m_incluc << "\n";
+
+   if(m_inclicFlag)
+   {
+      out << pfx << std::setw(24) << "NPAR:" << m_npar << "\n"
+          << pfx << std::setw(24) << "NPARO:" << m_nparo << "\n"
+          << pfx << std::setw(24) << "IGN:" << m_ign << "\n"
+          << pfx << std::setw(24) << "CVDATE:" << m_cvdate << "\n"
+          << pfx << std::setw(24) << "XUOL:" << m_xuol << "\n"
+          << pfx << std::setw(24) << "YUOL:" << m_yuol << "\n"
+          << pfx << std::setw(24) << "ZUOL:" << m_zuol << "\n"
+          << pfx << std::setw(24) << "XUXL:" << m_xuxl << "\n"
+          << pfx << std::setw(24) << "XUYL:" << m_xuyl << "\n"
+          << pfx << std::setw(24) << "XUZL:" << m_xuzl << "\n"
+          << pfx << std::setw(24) << "YUXL:" << m_yuxl << "\n"
+          << pfx << std::setw(24) << "YUYL:" << m_yuyl << "\n"
+          << pfx << std::setw(24) << "YUZL:" << m_yuzl << "\n"
+          << pfx << std::setw(24) << "ZUXL:" << m_zuxl << "\n"
+          << pfx << std::setw(24) << "ZUYL:" << m_zuyl << "\n"
+          << pfx << std::setw(24) << "ZUZL:" << m_zuzl << "\n"
+          << pfx << std::setw(24) << "IRO:" << m_iro << "\n"
+          << pfx << std::setw(24) << "IRX:" << m_irx << "\n"
+          << pfx << std::setw(24) << "IRY:" << m_iry << "\n"
+          << pfx << std::setw(24) << "IRZ:" << m_irz << "\n"
+          << pfx << std::setw(24) << "IRXX:" << m_irxx << "\n"
+          << pfx << std::setw(24) << "IRXY:" << m_irxy << "\n"
+          << pfx << std::setw(24) << "IRXZ:" << m_irxz << "\n"
+          << pfx << std::setw(24) << "IRYY:" << m_iryy << "\n"
+          << pfx << std::setw(24) << "IRYZ:" << m_iryz << "\n"
+          << pfx << std::setw(24) << "IRZZ:" << m_irzz << "\n"
+          << pfx << std::setw(24) << "ICO:" << m_ico << "\n"
+          << pfx << std::setw(24) << "ICX:" << m_icx << "\n"
+          << pfx << std::setw(24) << "ICY:" << m_icy << "\n"
+          << pfx << std::setw(24) << "ICZ:" << m_icz << "\n"
+          << pfx << std::setw(24) << "ICXX:" << m_icxx << "\n"
+          << pfx << std::setw(24) << "ICXY:" << m_icxy << "\n"
+          << pfx << std::setw(24) << "ICXZ:" << m_icxz << "\n"
+          << pfx << std::setw(24) << "ICYY:" << m_icyy << "\n"
+          << pfx << std::setw(24) << "ICYZ:" << m_icyz << "\n"
+          << pfx << std::setw(24) << "ICZZ:" << m_iczz << "\n"
+          << pfx << std::setw(24) << "GXO:" << m_gxo << "\n"
+          << pfx << std::setw(24) << "GYO:" << m_gyo << "\n"
+          << pfx << std::setw(24) << "GZO:" << m_gzo << "\n"
+          << pfx << std::setw(24) << "GXR:" << m_gxr << "\n"
+          << pfx << std::setw(24) << "GYR:" << m_gyr << "\n"
+          << pfx << std::setw(24) << "GZR:" << m_gzr << "\n"
+          << pfx << std::setw(24) << "GS:" << m_gs << "\n"
+          << pfx << std::setw(24) << "GXX:" << m_gxx << "\n"
+          << pfx << std::setw(24) << "GXY:" << m_gxy << "\n"
+          << pfx << std::setw(24) << "GXZ:" << m_gxz << "\n"
+          << pfx << std::setw(24) << "GYX:" << m_gyx << "\n"
+          << pfx << std::setw(24) << "GYY:" << m_gyy << "\n"
+          << pfx << std::setw(24) << "GYZ:" << m_gyz << "\n"
+          << pfx << std::setw(24) << "GZX:" << m_gzx << "\n"
+          << pfx << std::setw(24) << "GZY:" << m_gzy << "\n"
+          << pfx << std::setw(24) << "GZZ:" << m_gzz << "\n";
+	
+      for (i=0; i<m_ignNum; ++i)
+      {
+         m_isg[i].print(out, prefix, i);
+	
+      }
+      for (i=0; i<m_mapNum; ++i)
+      {
+         ossimString field = "MAP" + ossimString::toString(i) + ":";	
+         out << pfx << std::setw(24) << field << m_map[i] << "\n"; 
+      }
+   }
+   if (m_inclucFlag)
+   {
+      out << pfx << std::setw(24) << "URR:" << m_urr << "\n"
+          << pfx << std::setw(24) << "URC:" << m_urc << "\n"
+          << pfx << std::setw(24) << "UCC:" << m_ucc << "\n"
+          << pfx << std::setw(24) << "UNCSR:" << m_uncsr << "\n";
+     
+      for (i=0; i<m_rowCorSegNum; ++i)
+      {
+	 ossimString field = "UCORSR" + ossimString::toString(i) + ":";
+	 out << pfx << std::setw(24) << field << m_ucorsr[i] << "\n";
+      }
+      for (i=0; i<m_rowCorSegNum; ++i)
+      {
+         ossimString field = "UTAUSR" + ossimString::toString(i) + ":";
+         out << pfx << std::setw(24) << field << m_utausr[i] << "\n";
+      }
+      
+      for (i=0; i<m_colCorSegNum; ++i)
+      {
+         ossimString field = "UCORSC" + ossimString::toString(i) + ":";
+         out << pfx << std::setw(24) << field << m_ucorsc[i] << "\n";
+      }
+      for (i=0; i<m_colCorSegNum; ++i)
+      {
+         ossimString field = "UTAUSC" + ossimString::toString(i) + ":";
+         out << pfx << std::setw(24) << field << m_utausc[i] << "\n";
+      }
+   }
+   
+   out.flush();
+   
+   return out;
+}
+
+ossimString ossimNitfRsmecaTag::getIid() const
+{
+   return ossimString(m_iid);
+}
+
+ossimString ossimNitfRsmecaTag::getEdition() const
+{
+   return ossimString(m_edition);
+}
+
+ossimString ossimNitfRsmecaTag::getTid() const
+{
+   return ossimString(m_tid);
+}
+
+ossimString ossimNitfRsmecaTag::getInclic() const
+{
+   return ossimString(m_inclic);
+}
+
+ossimString ossimNitfRsmecaTag::getIncluc() const
+{
+   return ossimString(m_incluc);
+}
+
+ossimString ossimNitfRsmecaTag::getNpar() const
+{
+   return ossimString(m_npar);
+}
+
+ossimString ossimNitfRsmecaTag::getNparo() const
+{
+   return ossimString(m_nparo);
+}
+
+ossimString ossimNitfRsmecaTag::getIgn() const
+{
+   return ossimString(m_ign);
+}
+
+ossimString ossimNitfRsmecaTag::getCvdate() const
+{
+   return ossimString(m_cvdate);
+}
+
+ossimString ossimNitfRsmecaTag::getXuol() const
+{
+   return ossimString(m_xuol);
+}
+
+ossimString ossimNitfRsmecaTag::getYuol() const
+{
+   return ossimString(m_yuol);
+}
+
+ossimString ossimNitfRsmecaTag::getZuol() const
+{
+   return ossimString(m_zuol);
+}
+
+ossimString ossimNitfRsmecaTag::getXuxl() const
+{
+   return ossimString(m_xuxl);
+}
+
+ossimString ossimNitfRsmecaTag::getXuyl() const
+{
+   return ossimString(m_xuyl);
+}
+
+ossimString ossimNitfRsmecaTag::getXuzl() const
+{
+   return ossimString(m_xuzl);
+}
+
+ossimString ossimNitfRsmecaTag::getYuxl() const
+{
+   return ossimString(m_yuxl);
+}
+
+ossimString ossimNitfRsmecaTag::getYuyl() const
+{
+   return ossimString(m_yuyl);
+}
+
+ossimString ossimNitfRsmecaTag::getYuzl() const
+{
+   return ossimString(m_yuzl);
+}
+
+ossimString ossimNitfRsmecaTag::getZuxl() const
+{
+   return ossimString(m_zuxl);
+}
+
+ossimString ossimNitfRsmecaTag::getZuyl() const
+{
+   return ossimString(m_zuyl);
+}
+
+ossimString ossimNitfRsmecaTag::getZuzl() const
+{
+   return ossimString(m_zuzl);
+}
+
+ossimString ossimNitfRsmecaTag::getIro() const
+{
+   return ossimString(m_iro);
+}
+
+ossimString ossimNitfRsmecaTag::getIrx() const
+{
+   return ossimString(m_irx);
+}
+ossimString ossimNitfRsmecaTag::getIry() const
+{
+   return ossimString(m_iry);
+}
+
+ossimString ossimNitfRsmecaTag::getIrz() const
+{
+   return ossimString(m_irz);
+}
+
+ossimString ossimNitfRsmecaTag::getIrxx() const
+{
+   return ossimString(m_irxx);
+}
+
+ossimString ossimNitfRsmecaTag::getIrxy() const
+{
+   return ossimString(m_irxy);
+}
+
+ossimString ossimNitfRsmecaTag::getIrxz() const
+{
+   return ossimString(m_irxz);
+}
+
+ossimString ossimNitfRsmecaTag::getIryy() const
+{
+   return ossimString(m_iryy);
+}
+
+ossimString ossimNitfRsmecaTag::getIryz() const
+{
+   return ossimString(m_iryz);
+}
+
+ossimString ossimNitfRsmecaTag::getIrzz() const
+{
+   return ossimString(m_irzz);
+}
+
+ossimString ossimNitfRsmecaTag::getIco() const
+{
+   return ossimString(m_ico);
+}
+
+ossimString ossimNitfRsmecaTag::getIcx() const
+{
+   return ossimString(m_icx);
+}
+
+ossimString ossimNitfRsmecaTag::getIcy() const
+{
+   return ossimString(m_icy);
+}
+
+ossimString ossimNitfRsmecaTag::getIcz() const
+{
+   return ossimString(m_icz);
+}
+
+ossimString ossimNitfRsmecaTag::getIcxx() const
+{
+   return ossimString(m_icxx);
+}
+
+ossimString ossimNitfRsmecaTag::getIcxy() const
+{
+   return ossimString(m_icxy);
+}
+
+ossimString ossimNitfRsmecaTag::getIcxz() const
+{
+   return ossimString(m_icxz);
+}
+
+ossimString ossimNitfRsmecaTag::getIcyy() const
+{
+   return ossimString(m_icyy);
+}
+
+ossimString ossimNitfRsmecaTag::getIcyz() const
+{
+   return ossimString(m_icyz);
+}
+
+ossimString ossimNitfRsmecaTag::getIczz() const
+{
+   return ossimString(m_iczz);
+}
+
+ossimString ossimNitfRsmecaTag::getGxo() const
+{
+   return ossimString(m_gxo);
+}
+
+ossimString ossimNitfRsmecaTag::getGyo() const
+{
+   return ossimString(m_gyo);
+}
+
+ossimString ossimNitfRsmecaTag::getGzo() const
+{
+   return ossimString(m_gzo);
+}
+
+ossimString ossimNitfRsmecaTag::getGxr() const
+{
+   return ossimString(m_gxr);
+}
+
+ossimString ossimNitfRsmecaTag::getGyr() const
+{
+   return ossimString(m_gyr);
+}
+
+ossimString ossimNitfRsmecaTag::getGzr() const
+{
+   return ossimString(m_gzr);
+}
+
+ossimString ossimNitfRsmecaTag::getGs() const
+{
+   return ossimString(m_gs);
+}
+
+ossimString ossimNitfRsmecaTag::getGxx() const
+{
+   return ossimString(m_gxx);
+}
+
+ossimString ossimNitfRsmecaTag::getGxy() const
+{
+   return ossimString(m_gxy);
+}
+
+ossimString ossimNitfRsmecaTag::getGxz() const
+{
+   return ossimString(m_gxz);
+}
+
+ossimString ossimNitfRsmecaTag::getGyx() const
+{
+   return ossimString(m_gyx);
+}
+
+ossimString ossimNitfRsmecaTag::getGyy() const
+{
+   return ossimString(m_gyy);
+}
+
+ossimString ossimNitfRsmecaTag::getGyz() const
+{
+   return ossimString(m_gyz);
+}
+
+ossimString ossimNitfRsmecaTag::getGzx() const
+{
+   return ossimString(m_gzx);
+}
+
+ossimString ossimNitfRsmecaTag::getGzy() const
+{
+   return ossimString(m_gzy);
+}
+
+ossimString ossimNitfRsmecaTag::getGzz() const
+{
+   return ossimString(m_gzz);
+}
+
+ossimNitfRsmecaIsg ossimNitfRsmecaTag::getIsg(ossim_uint32 index) const
+{
+   ossimNitfRsmecaIsg result;
+   if (index < m_isg.size())
+   {
+      result = m_isg[index];
+   }
+   else
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimNitfRsmecaTag::getIsg range error!" << std::endl;
+      }
+   }   
+   return result;
+}
+
+ossimString ossimNitfRsmecaTag::getMap(ossim_uint32 index) const
+{
+   ossimString result;
+   if (index < m_map.size())
+   {
+      result = m_map[index];
+   }
+   else
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimNitfRsmecaTag::getMap range error!" << std::endl;
+      }
+   }   
+   return result;
+}
+
+ossimString ossimNitfRsmecaTag::getUrr() const
+{
+   return ossimString(m_urr);
+}
+
+ossimString ossimNitfRsmecaTag::getUrc() const
+{
+   return ossimString(m_urc);
+}
+
+ossimString ossimNitfRsmecaTag::getUcc() const
+{
+   return ossimString(m_ucc);
+}
+
+ossimString ossimNitfRsmecaTag::getUncsr() const
+{
+   return ossimString(m_uncsr);
+}
+
+ossimString ossimNitfRsmecaTag::getUcorsr(ossim_uint32 index) const
+{
+   ossimString result;
+   if (index < m_ucorsr.size())
+   {
+      result = m_ucorsr[index];
+   }
+   else
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimNitfRsmecaTag::getUcorsr range error!" << std::endl;
+      }
+   }   
+   return result;
+}
+
+ossimString ossimNitfRsmecaTag::getUtausr(ossim_uint32 index) const
+{
+   ossimString result;
+   if (index < m_utausr.size())
+   {
+      result = m_utausr[index];
+   }
+   else
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimNitfRsmecaTag::getUtausr range error!" << std::endl;
+      }
+   }   
+   return result;
+}
+
+ossimString ossimNitfRsmecaTag::getUncsc() const
+{
+   return ossimString(m_uncsr);
+}
+
+ossimString ossimNitfRsmecaTag::getUcorsc(ossim_uint32 index) const
+{
+   ossimString result;
+   if (index < m_ucorsc.size())
+   {
+      result = m_ucorsc[index];
+   }
+   else
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimNitfRsmecaTag::getUcorsc range error!" << std::endl;
+      }
+   }   
+   return result;
+}
+
+ossimString ossimNitfRsmecaTag::getUtausc(ossim_uint32 index) const
+{
+   ossimString result;
+   if (index < m_utausc.size())
+   {
+      result = m_utausc[index];
+   }
+   else
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimNitfRsmecaTag::getUtausc range error!" << std::endl;
+      }
+   }   
+   return result;
+}
+
+bool ossimNitfRsmecaTag::getInclicFlag() const
+{
+   return m_inclicFlag;
+}
+
+bool ossimNitfRsmecaTag::getInclucFlag() const
+{
+   return m_inclucFlag;
+}
+
+ossimString ossimNitfRsmecaTag::getIgnNum() const
+{
+   return ossimString(m_ignNum);
+}
+
+ossimString ossimNitfRsmecaTag::getMapNum() const
+{
+   return ossimString(m_mapNum);
+}
+
+ossimString ossimNitfRsmecaTag::getRowCorSegNum() const
+{
+   return ossimString(m_rowCorSegNum);
+}
+
+ossimString ossimNitfRsmecaTag::getColCorSegNum() const
+{
+   return ossimString(m_colCorSegNum);
+}
diff --git a/ossim/src/ossim/support_data/ossimNitfRsmidaTag.cpp b/ossim/src/ossim/support_data/ossimNitfRsmidaTag.cpp
new file mode 100644
index 0000000..9b0bff5
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfRsmidaTag.cpp
@@ -0,0 +1,952 @@
+//---
+// File: ossimNitfRsmidaTag.cpp
+//---
+
+#include <ossim/support_data/ossimNitfRsmidaTag.h>
+#include <iomanip>
+#include <iostream>
+
+RTTI_DEF1(ossimNitfRsmidaTag, "ossimNitfRsmidaTag", ossimNitfRegisteredTag);
+
+ossimNitfRsmidaTag::ossimNitfRsmidaTag()
+   :
+   ossimNitfRegisteredTag(std::string("RSMIDA"), CEL_SIZE),
+   m_iid(),
+   m_edition(),
+   m_isid(),
+   m_sid(),
+   m_stid(),
+   m_year(),
+   m_month(),
+   m_day(),
+   m_hour(),
+   m_minute(),
+   m_second(),
+   m_nrg(),
+   m_ncg(),
+   m_trg(),
+   m_tcg(),
+   m_grndd(),
+
+   m_xuor(),
+   m_yuor(),
+   m_zuor(),
+   m_xuxr(),
+   m_xuyr(),
+   m_xuzr(),
+   m_yuxr(),
+   m_yuyr(),
+   m_yuzr(),
+   m_zuxr(),
+   m_zuyr(),
+   m_zuzr(),
+
+   m_v1x(),
+   m_v1y(),
+   m_v1z(),
+   m_v2x(),
+   m_v2y(),
+   m_v2z(),
+   m_v3x(),
+   m_v3y(),
+   m_v3z(),
+   m_v4x(),
+   m_v4y(),
+   m_v4z(),
+   m_v5x(),
+   m_v5y(),
+   m_v5z(),
+   m_v6x(),
+   m_v6y(),
+   m_v6z(),
+   m_v7x(),
+   m_v7y(),
+   m_v7z(),
+   m_v8x(),
+   m_v8y(),
+   m_v8z(),
+
+   m_grpx(),
+   m_grpy(),
+   m_grpz(),
+
+   m_fullr(),
+   m_fullc(),
+
+   m_minr(),
+   m_maxr(),
+   m_minc(),
+   m_maxc(),
+
+   m_ie0(),
+   m_ier(),
+   m_iec(),
+   m_ierr(),
+   m_ierc(),
+   m_iecc(),
+   m_ia0(),
+   m_iar(),
+   m_iac(),
+   m_iarr(),
+   m_iarc(),
+   m_iacc(),
+
+   m_spx(),
+   m_svx(),
+   m_sax(),
+   m_spy(),
+   m_svy(),
+   m_say(),
+   m_spz(),
+   m_svz(),
+   m_saz()
+{
+   clearFields();
+}
+
+void ossimNitfRsmidaTag::parseStream(std::istream& in)
+{
+   in.read(m_iid, IID_SIZE);
+   in.read(m_edition, EDITION_SIZE);
+   in.read(m_isid, ISID_SIZE);
+   in.read(m_sid, SID_SIZE);
+   in.read(m_stid, STID_SIZE);
+   in.read(m_year, YEAR_SIZE);
+   in.read(m_month, MONTH_SIZE);
+   in.read(m_day, DAY_SIZE);
+   in.read(m_hour, HOUR_SIZE);
+   in.read(m_minute, MINUTE_SIZE);
+   in.read(m_second, SECOND_SIZE);
+   in.read(m_nrg, NRG_SIZE);
+   in.read(m_ncg, NCG_SIZE);
+   in.read(m_trg, FLOAT21_SIZE);
+   in.read(m_tcg, FLOAT21_SIZE);
+   in.read(m_grndd, GRNDD_SIZE);
+   in.read(m_xuor, FLOAT21_SIZE);
+   in.read(m_yuor, FLOAT21_SIZE);
+   in.read(m_zuor, FLOAT21_SIZE);
+   in.read(m_xuxr, FLOAT21_SIZE);
+   in.read(m_xuyr, FLOAT21_SIZE);
+   in.read(m_xuzr, FLOAT21_SIZE);
+   in.read(m_yuxr, FLOAT21_SIZE);
+   in.read(m_yuyr, FLOAT21_SIZE);
+   in.read(m_yuzr, FLOAT21_SIZE);
+   in.read(m_zuxr, FLOAT21_SIZE);
+   in.read(m_zuyr, FLOAT21_SIZE);
+   in.read(m_zuzr, FLOAT21_SIZE);
+   in.read(m_v1x, FLOAT21_SIZE);
+   in.read(m_v1y, FLOAT21_SIZE);
+   in.read(m_v1z, FLOAT21_SIZE);
+   in.read(m_v2x, FLOAT21_SIZE);
+   in.read(m_v2y, FLOAT21_SIZE);
+   in.read(m_v2z, FLOAT21_SIZE);
+   in.read(m_v3x, FLOAT21_SIZE);
+   in.read(m_v3y, FLOAT21_SIZE);
+   in.read(m_v3z, FLOAT21_SIZE);
+   in.read(m_v4x, FLOAT21_SIZE);
+   in.read(m_v4y, FLOAT21_SIZE);
+   in.read(m_v4z, FLOAT21_SIZE);
+   in.read(m_v5x, FLOAT21_SIZE);
+   in.read(m_v5y, FLOAT21_SIZE);
+   in.read(m_v5z, FLOAT21_SIZE);
+   in.read(m_v6x, FLOAT21_SIZE);
+   in.read(m_v6y, FLOAT21_SIZE);
+   in.read(m_v6z, FLOAT21_SIZE);
+   in.read(m_v7x, FLOAT21_SIZE);
+   in.read(m_v7y, FLOAT21_SIZE);
+   in.read(m_v7z, FLOAT21_SIZE);
+   in.read(m_v8x, FLOAT21_SIZE);
+   in.read(m_v8y, FLOAT21_SIZE);
+   in.read(m_v8z, FLOAT21_SIZE);
+   in.read(m_grpx, FLOAT21_SIZE);
+   in.read(m_grpy, FLOAT21_SIZE);
+   in.read(m_grpz, FLOAT21_SIZE);
+   in.read(m_fullr, FULL_SIZE);
+   in.read(m_fullc, FULL_SIZE);
+   in.read(m_minr, MIN_SIZE);
+   in.read(m_maxr, MAX_SIZE);
+   in.read(m_minc, MIN_SIZE);
+   in.read(m_maxc, MAX_SIZE);
+   in.read(m_ie0, FLOAT21_SIZE);
+   in.read(m_ier, FLOAT21_SIZE);
+   in.read(m_iec, FLOAT21_SIZE);
+   in.read(m_ierr, FLOAT21_SIZE);
+   in.read(m_ierc, FLOAT21_SIZE);
+   in.read(m_iecc, FLOAT21_SIZE);
+   in.read(m_ia0, FLOAT21_SIZE);
+   in.read(m_iar, FLOAT21_SIZE);
+   in.read(m_iac, FLOAT21_SIZE);
+   in.read(m_iarr, FLOAT21_SIZE);
+   in.read(m_iarc, FLOAT21_SIZE);
+   in.read(m_iacc, FLOAT21_SIZE);
+   in.read(m_spx, FLOAT21_SIZE);
+   in.read(m_svx, FLOAT21_SIZE);
+   in.read(m_sax, FLOAT21_SIZE);
+   in.read(m_spy, FLOAT21_SIZE);
+   in.read(m_svy, FLOAT21_SIZE);
+   in.read(m_say, FLOAT21_SIZE);
+   in.read(m_spz, FLOAT21_SIZE);
+   in.read(m_svz, FLOAT21_SIZE);
+   in.read(m_saz, FLOAT21_SIZE);
+}
+
+void ossimNitfRsmidaTag::writeStream(std::ostream& out)
+{
+   out.write(m_iid, IID_SIZE);
+   out.write(m_edition, EDITION_SIZE);
+   out.write(m_isid, ISID_SIZE);
+   out.write(m_sid, SID_SIZE);
+   out.write(m_stid, STID_SIZE);
+   out.write(m_year, YEAR_SIZE);
+   out.write(m_month, MONTH_SIZE);
+   out.write(m_day, DAY_SIZE);
+   out.write(m_hour, HOUR_SIZE);
+   out.write(m_minute, MINUTE_SIZE);
+   out.write(m_second, SECOND_SIZE);
+   out.write(m_nrg, NRG_SIZE);
+   out.write(m_ncg, NCG_SIZE);
+   out.write(m_trg, FLOAT21_SIZE);
+   out.write(m_tcg, FLOAT21_SIZE);
+   out.write(m_grndd, GRNDD_SIZE);
+   out.write(m_xuor, FLOAT21_SIZE);
+   out.write(m_yuor, FLOAT21_SIZE);
+   out.write(m_zuor, FLOAT21_SIZE);
+   out.write(m_xuxr, FLOAT21_SIZE);
+   out.write(m_xuyr, FLOAT21_SIZE);
+   out.write(m_xuzr, FLOAT21_SIZE);
+   out.write(m_yuxr, FLOAT21_SIZE);
+   out.write(m_yuyr, FLOAT21_SIZE);
+   out.write(m_yuzr, FLOAT21_SIZE);
+   out.write(m_zuxr, FLOAT21_SIZE);
+   out.write(m_zuyr, FLOAT21_SIZE);
+   out.write(m_zuzr, FLOAT21_SIZE);
+   out.write(m_v1x, FLOAT21_SIZE);
+   out.write(m_v1y, FLOAT21_SIZE);
+   out.write(m_v1z, FLOAT21_SIZE);
+   out.write(m_v2x, FLOAT21_SIZE);
+   out.write(m_v2y, FLOAT21_SIZE);
+   out.write(m_v2z, FLOAT21_SIZE);
+   out.write(m_v3x, FLOAT21_SIZE);
+   out.write(m_v3y, FLOAT21_SIZE);
+   out.write(m_v3z, FLOAT21_SIZE);
+   out.write(m_v4x, FLOAT21_SIZE);
+   out.write(m_v4y, FLOAT21_SIZE);
+   out.write(m_v4z, FLOAT21_SIZE);
+   out.write(m_v5x, FLOAT21_SIZE);
+   out.write(m_v5y, FLOAT21_SIZE);
+   out.write(m_v5z, FLOAT21_SIZE);
+   out.write(m_v6x, FLOAT21_SIZE);
+   out.write(m_v6y, FLOAT21_SIZE);
+   out.write(m_v6z, FLOAT21_SIZE);
+   out.write(m_v7x, FLOAT21_SIZE);
+   out.write(m_v7y, FLOAT21_SIZE);
+   out.write(m_v7z, FLOAT21_SIZE);
+   out.write(m_v8x, FLOAT21_SIZE);
+   out.write(m_v8y, FLOAT21_SIZE);
+   out.write(m_v8z, FLOAT21_SIZE);
+   out.write(m_grpx, FLOAT21_SIZE);
+   out.write(m_grpy, FLOAT21_SIZE);
+   out.write(m_grpz, FLOAT21_SIZE);
+   out.write(m_fullr, FULL_SIZE);
+   out.write(m_fullc, FULL_SIZE);
+   out.write(m_minr, MIN_SIZE);
+   out.write(m_maxr, MAX_SIZE);
+   out.write(m_minc, MIN_SIZE);
+   out.write(m_maxc, MAX_SIZE);
+   out.write(m_ie0, FLOAT21_SIZE);
+   out.write(m_ier, FLOAT21_SIZE);
+   out.write(m_iec, FLOAT21_SIZE);
+   out.write(m_ierr, FLOAT21_SIZE);
+   out.write(m_ierc, FLOAT21_SIZE);
+   out.write(m_iecc, FLOAT21_SIZE);
+   out.write(m_ia0, FLOAT21_SIZE);
+   out.write(m_iar, FLOAT21_SIZE);
+   out.write(m_iac, FLOAT21_SIZE);
+   out.write(m_iarr, FLOAT21_SIZE);
+   out.write(m_iarc, FLOAT21_SIZE);
+   out.write(m_iacc, FLOAT21_SIZE);
+   out.write(m_spx, FLOAT21_SIZE);
+   out.write(m_svx, FLOAT21_SIZE);
+   out.write(m_sax, FLOAT21_SIZE);
+   out.write(m_spy, FLOAT21_SIZE);
+   out.write(m_svy, FLOAT21_SIZE);
+   out.write(m_say, FLOAT21_SIZE);
+   out.write(m_spz, FLOAT21_SIZE);
+   out.write(m_svz, FLOAT21_SIZE);
+   out.write(m_saz, FLOAT21_SIZE);
+}
+
+std::ostream& ossimNitfRsmidaTag::print(std::ostream& out,
+                                        const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+   out << setiosflags(ios::left)
+       << pfx << std::setw(24) << "CETAG:"      << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:"        << getTagLength() << "\n"
+       << pfx << std::setw(24) << "IID:" << m_iid << "\n"
+       << pfx << std::setw(24) << "EDITION:" << m_edition << "\n"
+       << pfx << std::setw(24) << "ISID:" << m_isid << "\n"
+       << pfx << std::setw(24) << "SID:" << m_sid << "\n"
+       << pfx << std::setw(24) << "STID:" << m_stid << "\n"
+       << pfx << std::setw(24) << "YEAR:" << m_year << "\n"
+       << pfx << std::setw(24) << "MONTH:" << m_month << "\n"
+       << pfx << std::setw(24) << "DAY:" << m_day << "\n"
+       << pfx << std::setw(24) << "HOUR:" << m_hour << "\n"
+       << pfx << std::setw(24) << "MINUTE:" << m_minute << "\n"
+       << pfx << std::setw(24) << "SECOND:" << m_second << "\n"
+       << pfx << std::setw(24) << "NRG:" << m_nrg << "\n"
+       << pfx << std::setw(24) << "NCG:" << m_ncg << "\n"
+       << pfx << std::setw(24) << "TRG:" << m_trg << "\n"
+       << pfx << std::setw(24) << "TCG:" << m_tcg << "\n"
+       << pfx << std::setw(24) << "GRNDD:" << m_grndd << "\n"
+       << pfx << std::setw(24) << "XUOR:" << m_xuor << "\n"
+       << pfx << std::setw(24) << "YUOR:" << m_yuor << "\n"
+       << pfx << std::setw(24) << "ZUOR:" << m_zuor << "\n"
+       << pfx << std::setw(24) << "XUXR:" << m_xuxr << "\n"
+       << pfx << std::setw(24) << "XUYR:" << m_xuyr << "\n"
+       << pfx << std::setw(24) << "XUZR:" << m_xuzr << "\n"
+       << pfx << std::setw(24) << "YUXR:" << m_yuxr << "\n"
+       << pfx << std::setw(24) << "YUYR:" << m_yuyr << "\n"
+       << pfx << std::setw(24) << "YUZR:" << m_yuzr << "\n"
+       << pfx << std::setw(24) << "ZUXR:" << m_zuxr << "\n"
+       << pfx << std::setw(24) << "ZUYR:" << m_zuyr << "\n"
+       << pfx << std::setw(24) << "ZUZR:" << m_zuzr << "\n"
+       << pfx << std::setw(24) << "V1X:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V1Y:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V1Z:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V2X:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V2Y:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V2Z:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V3X:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V3Y:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V3Z:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V4X:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V4Y:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V4Z:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V5X:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V5Y:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V5Z:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V6X:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V6Y:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V6Z:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V7X:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V7Y:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V7Z:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V8X:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V8Y:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "V8Z:" << m_v1x << "\n"
+       << pfx << std::setw(24) << "GRPX:" << m_grpx << "\n"
+       << pfx << std::setw(24) << "GRPY:" << m_grpy << "\n"
+       << pfx << std::setw(24) << "GRPZ:" << m_grpz << "\n"
+       << pfx << std::setw(24) << "FULLR:" << m_fullr << "\n"
+       << pfx << std::setw(24) << "FULLC:" << m_fullc << "\n"
+       << pfx << std::setw(24) << "MINR:" << m_minr << "\n"
+       << pfx << std::setw(24) << "MAXR:" << m_maxr << "\n"
+       << pfx << std::setw(24) << "MINC:" << m_minc << "\n"
+       << pfx << std::setw(24) << "MAXC:" << m_maxc << "\n"
+       << pfx << std::setw(24) << "IE0:" << m_ie0 << "\n"
+       << pfx << std::setw(24) << "IER:" << m_ier << "\n"
+       << pfx << std::setw(24) << "IEC:" << m_iec << "\n"
+       << pfx << std::setw(24) << "IERR:" << m_ierr << "\n"
+       << pfx << std::setw(24) << "IERC:" << m_ierc << "\n"
+       << pfx << std::setw(24) << "IECC:" << m_iecc << "\n"
+       << pfx << std::setw(24) << "IA0:" << m_ia0 << "\n"
+       << pfx << std::setw(24) << "IAR:" << m_iar << "\n"
+       << pfx << std::setw(24) << "IAC:" << m_iac << "\n"
+       << pfx << std::setw(24) << "IARR:" << m_iarr << "\n"
+       << pfx << std::setw(24) << "IARC:" << m_iarc << "\n"
+       << pfx << std::setw(24) << "IACC:" << m_iacc << "\n"
+       << pfx << std::setw(24) << "SPX:" << m_spx << "\n"
+       << pfx << std::setw(24) << "SVX:" << m_svx << "\n"
+       << pfx << std::setw(24) << "SAX:" << m_sax << "\n"
+       << pfx << std::setw(24) << "SPY:" << m_spy << "\n"
+       << pfx << std::setw(24) << "SVY:" << m_svy << "\n"
+       << pfx << std::setw(24) << "SAY:" << m_say << "\n"
+       << pfx << std::setw(24) << "SPZ:" << m_spz << "\n"
+       << pfx << std::setw(24) << "SVZ:" << m_svz << "\n"
+       << pfx << std::setw(24) << "SAZ:" << m_saz << "\n";
+
+   return out;
+}
+
+void ossimNitfRsmidaTag::clearFields()
+{
+   memset(m_iid,' ', IID_SIZE);
+   memset(m_edition, ' ', EDITION_SIZE);
+   memset(m_isid, ' ', ISID_SIZE);
+   memset(m_sid, ' ', SID_SIZE);
+   memset(m_stid, ' ', STID_SIZE);
+   memset(m_year, ' ', YEAR_SIZE);
+   memset(m_month, ' ', MONTH_SIZE);
+   memset(m_day, ' ', DAY_SIZE);
+   memset(m_hour,' ', HOUR_SIZE);
+   memset(m_minute, ' ', MINUTE_SIZE);
+   memset(m_second, ' ', SECOND_SIZE);
+   memset(m_nrg, ' ', NRG_SIZE);
+   memset(m_ncg, ' ', NCG_SIZE);
+   memset(m_trg, ' ', FLOAT21_SIZE);
+   memset(m_tcg, ' ', FLOAT21_SIZE);
+   memset(m_grndd, ' ', GRNDD_SIZE);
+   memset(m_xuor, ' ', FLOAT21_SIZE);
+   memset(m_yuor, ' ', FLOAT21_SIZE);
+   memset(m_zuor, ' ', FLOAT21_SIZE);
+   memset(m_xuxr, ' ', FLOAT21_SIZE);
+   memset(m_xuyr, ' ', FLOAT21_SIZE);
+   memset(m_xuzr, ' ', FLOAT21_SIZE);
+   memset(m_yuxr, ' ', FLOAT21_SIZE);
+   memset(m_yuyr, ' ', FLOAT21_SIZE);
+   memset(m_yuzr, ' ', FLOAT21_SIZE);
+   memset(m_zuxr, ' ', FLOAT21_SIZE);
+   memset(m_zuyr, ' ', FLOAT21_SIZE);
+   memset(m_zuzr, ' ', FLOAT21_SIZE);
+   memset(m_v1x, ' ', FLOAT21_SIZE);
+   memset(m_v1y, ' ', FLOAT21_SIZE);
+   memset(m_v1z, ' ', FLOAT21_SIZE);
+   memset(m_v2x, ' ', FLOAT21_SIZE);
+   memset(m_v2y, ' ', FLOAT21_SIZE);
+   memset(m_v2z, ' ', FLOAT21_SIZE);
+   memset(m_v3x, ' ', FLOAT21_SIZE);
+   memset(m_v3y, ' ', FLOAT21_SIZE);
+   memset(m_v3z, ' ', FLOAT21_SIZE);
+   memset(m_v4x, ' ', FLOAT21_SIZE);
+   memset(m_v4y, ' ', FLOAT21_SIZE);
+   memset(m_v4z, ' ', FLOAT21_SIZE);
+   memset(m_v5x, ' ', FLOAT21_SIZE);
+   memset(m_v5y, ' ', FLOAT21_SIZE);
+   memset(m_v5z, ' ', FLOAT21_SIZE);
+   memset(m_v6x, ' ', FLOAT21_SIZE);
+   memset(m_v6y, ' ', FLOAT21_SIZE);
+   memset(m_v6z, ' ', FLOAT21_SIZE);
+   memset(m_v7x, ' ', FLOAT21_SIZE);
+   memset(m_v7y, ' ', FLOAT21_SIZE);
+   memset(m_v7z, ' ', FLOAT21_SIZE);
+   memset(m_v8x, ' ', FLOAT21_SIZE);
+   memset(m_v8y, ' ', FLOAT21_SIZE);
+   memset(m_v8z, ' ', FLOAT21_SIZE);
+   memset(m_grpx, ' ', FLOAT21_SIZE);
+   memset(m_grpy, ' ', FLOAT21_SIZE);
+   memset(m_grpz, ' ', FLOAT21_SIZE);
+   memset(m_fullr, ' ', FULL_SIZE);
+   memset(m_fullc, ' ', FULL_SIZE);
+   memset(m_minr, ' ', MIN_SIZE);
+   memset(m_maxr, ' ', MAX_SIZE);
+   memset(m_minc, ' ', MIN_SIZE);
+   memset(m_maxc, ' ', MAX_SIZE);
+   memset(m_ie0, ' ', FLOAT21_SIZE);
+   memset(m_ier, ' ', FLOAT21_SIZE);
+   memset(m_iec, ' ', FLOAT21_SIZE);
+   memset(m_ierr, ' ', FLOAT21_SIZE);
+   memset(m_ierc, ' ', FLOAT21_SIZE);
+   memset(m_iecc, ' ', FLOAT21_SIZE);
+   memset(m_ia0, ' ', FLOAT21_SIZE);
+   memset(m_iar, ' ', FLOAT21_SIZE);
+   memset(m_iac, ' ', FLOAT21_SIZE);
+   memset(m_iarr, ' ', FLOAT21_SIZE);
+   memset(m_iarc, ' ', FLOAT21_SIZE);
+   memset(m_iacc, ' ', FLOAT21_SIZE);
+   memset(m_spx, ' ', FLOAT21_SIZE);
+   memset(m_svx, ' ', FLOAT21_SIZE);
+   memset(m_sax, ' ', FLOAT21_SIZE);
+   memset(m_spy, ' ', FLOAT21_SIZE);
+   memset(m_svy, ' ', FLOAT21_SIZE);
+   memset(m_say, ' ', FLOAT21_SIZE);
+   memset(m_spz, ' ', FLOAT21_SIZE);
+   memset(m_svz, ' ', FLOAT21_SIZE);
+   memset(m_saz, ' ', FLOAT21_SIZE);
+
+   m_iid[IID_SIZE] = '\0';
+   m_edition[EDITION_SIZE] = '\0';
+   m_isid[ISID_SIZE] = '\0';
+   m_sid[SID_SIZE] = '\0';
+   m_stid[STID_SIZE] = '\0';
+   m_year[YEAR_SIZE] = '\0';
+   m_month[MONTH_SIZE] = '\0';
+   m_day[DAY_SIZE] = '\0';
+   m_hour[HOUR_SIZE] = '\0';
+   m_minute[MINUTE_SIZE] = '\0';
+   m_second[SECOND_SIZE] = '\0';
+   m_nrg[NRG_SIZE] = '\0';
+   m_ncg[NCG_SIZE] = '\0';
+   m_trg[FLOAT21_SIZE] = '\0';
+   m_tcg[FLOAT21_SIZE] = '\0';
+   m_grndd[GRNDD_SIZE] = '\0';
+   m_xuor[FLOAT21_SIZE] = '\0';
+   m_yuor[FLOAT21_SIZE] = '\0';
+   m_zuor[FLOAT21_SIZE] = '\0';
+   m_xuxr[FLOAT21_SIZE] = '\0';
+   m_xuyr[FLOAT21_SIZE] = '\0';
+   m_xuzr[FLOAT21_SIZE] = '\0';
+   m_yuxr[FLOAT21_SIZE] = '\0';
+   m_yuyr[FLOAT21_SIZE] = '\0';
+   m_yuzr[FLOAT21_SIZE] = '\0';
+   m_zuxr[FLOAT21_SIZE] = '\0';
+   m_zuyr[FLOAT21_SIZE] = '\0';
+   m_zuzr[FLOAT21_SIZE] = '\0';
+   m_v1x[FLOAT21_SIZE] = '\0';
+   m_v1y[FLOAT21_SIZE] = '\0';
+   m_v1z[FLOAT21_SIZE] = '\0';
+   m_v2x[FLOAT21_SIZE] = '\0';
+   m_v2y[FLOAT21_SIZE] = '\0';
+   m_v2z[FLOAT21_SIZE] = '\0';
+   m_v3x[FLOAT21_SIZE] = '\0';
+   m_v3y[FLOAT21_SIZE] = '\0';
+   m_v3z[FLOAT21_SIZE] = '\0';
+   m_v4x[FLOAT21_SIZE] = '\0';
+   m_v4y[FLOAT21_SIZE] = '\0';
+   m_v4z[FLOAT21_SIZE] = '\0';
+   m_v5x[FLOAT21_SIZE] = '\0';
+   m_v5y[FLOAT21_SIZE] = '\0';
+   m_v5z[FLOAT21_SIZE] = '\0';
+   m_v6x[FLOAT21_SIZE] = '\0';
+   m_v6y[FLOAT21_SIZE] = '\0';
+   m_v6z[FLOAT21_SIZE] = '\0';
+   m_v7x[FLOAT21_SIZE] = '\0';
+   m_v7y[FLOAT21_SIZE] = '\0';
+   m_v7z[FLOAT21_SIZE] = '\0';
+   m_v8x[FLOAT21_SIZE] = '\0';
+   m_v8y[FLOAT21_SIZE] = '\0';
+   m_v8z[FLOAT21_SIZE] = '\0';
+   m_grpx[FLOAT21_SIZE] = '\0';
+   m_grpy[FLOAT21_SIZE] = '\0';
+   m_grpz[FLOAT21_SIZE] = '\0';
+   m_fullr[FULL_SIZE] = '\0';
+   m_fullc[FULL_SIZE] = '\0';
+   m_minr[MIN_SIZE] = '\0';
+   m_maxr[MAX_SIZE] = '\0';
+   m_minc[MIN_SIZE] = '\0';
+   m_maxc[MAX_SIZE] = '\0';
+   m_ie0[FLOAT21_SIZE] = '\0';
+   m_ier[FLOAT21_SIZE] = '\0';
+   m_iec[FLOAT21_SIZE] = '\0';
+   m_ierr[FLOAT21_SIZE] = '\0';
+   m_ierc[FLOAT21_SIZE] = '\0';
+   m_iecc[FLOAT21_SIZE] = '\0';
+   m_ia0[FLOAT21_SIZE] = '\0';
+   m_iar[FLOAT21_SIZE] = '\0';
+   m_iac[FLOAT21_SIZE] = '\0';
+   m_iarr[FLOAT21_SIZE] = '\0';
+   m_iarc[FLOAT21_SIZE] = '\0';
+   m_iacc[FLOAT21_SIZE] = '\0';
+   m_spx[FLOAT21_SIZE] = '\0';
+   m_svx[FLOAT21_SIZE] = '\0';
+   m_sax[FLOAT21_SIZE] = '\0';
+   m_spy[FLOAT21_SIZE] = '\0';
+   m_svy[FLOAT21_SIZE] = '\0';
+   m_say[FLOAT21_SIZE] = '\0';
+   m_spz[FLOAT21_SIZE] = '\0';
+   m_svz[FLOAT21_SIZE] = '\0';
+   m_saz[FLOAT21_SIZE] = '\0';
+}
+
+ossimString ossimNitfRsmidaTag::getIid() const
+{
+   return ossimString(m_iid);
+}
+
+ossimString ossimNitfRsmidaTag::getEdition() const
+{
+   return ossimString(m_edition);
+}
+
+ossimString ossimNitfRsmidaTag::getIsid() const
+{
+   return ossimString(m_isid);
+}
+
+ossimString ossimNitfRsmidaTag::getSid() const
+{
+   return ossimString(m_sid);
+}
+
+ossimString ossimNitfRsmidaTag::getStid() const
+{
+   return ossimString(m_stid);
+}
+
+ossimString ossimNitfRsmidaTag::getYear() const
+{
+   return ossimString(m_year);
+}
+
+ossimString ossimNitfRsmidaTag::getMonth() const
+{
+   return ossimString(m_month);
+}
+
+ossimString ossimNitfRsmidaTag::getDay() const
+{
+   return ossimString(m_day);
+}
+
+ossimString ossimNitfRsmidaTag::getHour() const
+{
+   return ossimString(m_hour);
+}
+
+ossimString ossimNitfRsmidaTag::getMinute() const
+{
+   return ossimString(m_minute);
+}
+
+ossimString ossimNitfRsmidaTag::getSecond() const
+{
+   return ossimString(m_second);
+}
+
+ossimString ossimNitfRsmidaTag::getNrg() const
+{
+   return ossimString(m_nrg);
+}
+
+ossimString ossimNitfRsmidaTag::getNcg() const
+{
+   return ossimString(m_ncg);
+}
+
+ossimString ossimNitfRsmidaTag::getTrg() const
+{
+   return ossimString(m_trg);
+}
+
+ossimString ossimNitfRsmidaTag::getTcg() const
+{
+   return ossimString(m_tcg);
+}
+
+ossimString ossimNitfRsmidaTag::getGrndd() const
+{
+   return ossimString(m_grndd);
+}
+   
+ossimString ossimNitfRsmidaTag::getXuor() const
+{
+   return ossimString(m_xuor);
+}
+
+ossimString ossimNitfRsmidaTag::getYuor() const
+{
+   return ossimString(m_yuor);
+}
+
+ossimString ossimNitfRsmidaTag::getZuor() const
+{
+   return ossimString(m_zuor);
+}
+
+ossimString ossimNitfRsmidaTag::getXuxr() const
+{
+   return ossimString(m_xuxr);
+}
+
+ossimString ossimNitfRsmidaTag::getXuyr() const
+{
+   return ossimString(m_xuyr);
+}
+
+ossimString ossimNitfRsmidaTag::getXuzr() const
+{
+   return ossimString(m_xuzr);
+}
+
+ossimString ossimNitfRsmidaTag::getYuxr() const
+{
+   return ossimString(m_yuxr);
+}
+
+ossimString ossimNitfRsmidaTag::getYuyr() const
+{
+   return ossimString(m_yuyr);
+}
+
+ossimString ossimNitfRsmidaTag::getYuzr() const
+{
+   return ossimString(m_yuzr);
+}
+
+ossimString ossimNitfRsmidaTag::getZuxr() const
+{
+   return ossimString(m_zuxr);
+}
+
+ossimString ossimNitfRsmidaTag::getZuyr() const
+{
+   return ossimString(m_zuyr);
+}
+
+ossimString ossimNitfRsmidaTag::getZuzr() const
+{
+   return ossimString(m_zuzr);
+}
+   
+ossimString ossimNitfRsmidaTag::getV1x() const
+{
+   return ossimString(m_v1x);
+}
+
+ossimString ossimNitfRsmidaTag::getV1y() const
+{
+   return ossimString(m_v1y);
+}
+
+ossimString ossimNitfRsmidaTag::getV1z() const
+{
+   return ossimString(m_v1z);
+}
+
+ossimString ossimNitfRsmidaTag::getV2x() const
+{
+   return ossimString(m_v2x);
+}
+
+ossimString ossimNitfRsmidaTag::getV2y() const
+{
+   return ossimString(m_v2y);
+}
+
+ossimString ossimNitfRsmidaTag::getV2z() const
+{
+   return ossimString(m_v2z);
+}
+
+ossimString ossimNitfRsmidaTag::getV3x() const
+{
+   return ossimString(m_v3x);
+}
+
+ossimString ossimNitfRsmidaTag::getV3y() const
+{
+   return ossimString(m_v3y);
+}
+
+ossimString ossimNitfRsmidaTag::getV3z() const
+{
+   return ossimString(m_v3z);
+}
+
+ossimString ossimNitfRsmidaTag::getV4x() const
+{
+   return ossimString(m_v4x);
+}
+
+ossimString ossimNitfRsmidaTag::getV4y() const
+{
+   return ossimString(m_v4y);
+}
+
+ossimString ossimNitfRsmidaTag::getV4z() const
+{
+   return ossimString(m_v4z);
+}
+
+ossimString ossimNitfRsmidaTag::getV5x() const
+{
+   return ossimString(m_v5x);
+}
+
+ossimString ossimNitfRsmidaTag::getV5y() const
+{
+   return ossimString(m_v5y);
+}
+
+ossimString ossimNitfRsmidaTag::getV5z() const
+{
+   return ossimString(m_v5z);
+}
+
+ossimString ossimNitfRsmidaTag::getV6x() const
+{
+   return ossimString(m_v6x);
+}
+
+ossimString ossimNitfRsmidaTag::getV6y() const
+{
+   return ossimString(m_v6y);
+}
+
+ossimString ossimNitfRsmidaTag::getV6z() const
+{
+   return ossimString(m_v6z);
+}
+
+ossimString ossimNitfRsmidaTag::getV7x() const
+{
+   return ossimString(m_v7x);
+}
+
+ossimString ossimNitfRsmidaTag::getV7y() const
+{
+   return ossimString(m_v7y);
+}
+
+ossimString ossimNitfRsmidaTag::getV7z() const
+{
+   return ossimString(m_v7z);
+}
+
+ossimString ossimNitfRsmidaTag::getV8x() const
+{
+   return ossimString(m_v8x);
+}
+
+ossimString ossimNitfRsmidaTag::getV8y() const
+{
+   return ossimString(m_v8y);
+}
+
+ossimString ossimNitfRsmidaTag::getV8z() const
+{
+   return ossimString(m_v8z);
+}
+   
+ossimString ossimNitfRsmidaTag::getGrpx() const
+{
+   return ossimString(m_grpx);
+}
+
+ossimString ossimNitfRsmidaTag::getGrpy() const
+{
+   return ossimString(m_grpy);
+}
+
+ossimString ossimNitfRsmidaTag::getGrpz() const
+{
+   return ossimString(m_grpz);
+}
+
+ossimString ossimNitfRsmidaTag::getFullr() const
+{
+   return ossimString(m_fullr);
+}
+
+ossimString ossimNitfRsmidaTag::getFullc() const
+{
+   return ossimString(m_fullc);
+}
+
+ossimString ossimNitfRsmidaTag::getMinr() const
+{
+   return ossimString(m_minr);
+}
+
+ossimString ossimNitfRsmidaTag::getMaxr() const
+{
+   return ossimString(m_maxr);
+}
+
+ossimString ossimNitfRsmidaTag::getMinc() const
+{
+   return ossimString(m_minc);
+}
+
+ossimString ossimNitfRsmidaTag::getMaxc() const
+{
+   return ossimString(m_maxc);
+}
+
+ossimString ossimNitfRsmidaTag::getIe0() const
+{
+   return ossimString(m_ie0);
+}
+
+ossimString ossimNitfRsmidaTag::getIer() const
+{
+   return ossimString(m_ier);
+}
+
+ossimString ossimNitfRsmidaTag::getIec() const
+{
+   return ossimString(m_iec);
+}
+
+ossimString ossimNitfRsmidaTag::getIerr() const
+{
+   return ossimString(m_ierr);
+}
+
+ossimString ossimNitfRsmidaTag::getIerc() const
+{
+   return ossimString(m_ierc);
+}
+
+ossimString ossimNitfRsmidaTag::getIecc() const
+{
+   return ossimString(m_iecc);
+}
+
+ossimString ossimNitfRsmidaTag::getIa0() const
+{
+   return ossimString(m_ia0);
+}
+
+ossimString ossimNitfRsmidaTag::getIar() const
+{
+   return ossimString(m_iar);
+}
+
+ossimString ossimNitfRsmidaTag::getIac() const
+{
+   return ossimString(m_iac);
+}
+
+ossimString ossimNitfRsmidaTag::getIarr() const
+{
+   return ossimString(m_iarr);
+}
+
+ossimString ossimNitfRsmidaTag::getIarc() const
+{
+   return ossimString(m_iarc);
+}
+
+ossimString ossimNitfRsmidaTag::getIacc() const
+{
+   return ossimString(m_iacc);
+}
+
+ossimString ossimNitfRsmidaTag::getSpx() const
+{
+   return ossimString(m_spx);
+}
+
+ossimString ossimNitfRsmidaTag::getSvx() const
+{
+   return ossimString(m_svx);
+}
+
+ossimString ossimNitfRsmidaTag::getSax() const
+{
+   return ossimString(m_sax);
+}
+
+ossimString ossimNitfRsmidaTag::getSpy() const
+{
+   return ossimString(m_spy);
+}
+
+ossimString ossimNitfRsmidaTag::getSvy() const
+{
+   return ossimString(m_svy);
+}
+
+ossimString ossimNitfRsmidaTag::getSay() const
+{
+   return ossimString(m_say);
+}
+
+ossimString ossimNitfRsmidaTag::getSpz() const
+{
+   return ossimString(m_spz);
+}
+
+ossimString ossimNitfRsmidaTag::getSvz() const
+{
+   return ossimString(m_svz);
+}
+
+ossimString ossimNitfRsmidaTag::getSaz() const
+{
+   return ossimString(m_saz);
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfRsmpcaTag.cpp b/ossim/src/ossim/support_data/ossimNitfRsmpcaTag.cpp
new file mode 100644
index 0000000..9b37655
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfRsmpcaTag.cpp
@@ -0,0 +1,607 @@
+//---
+// File: ossimNitfRsmpcaTag.cpp
+//---
+#include <ossim/support_data/ossimNitfRsmpcaTag.h>
+#include <ossim/support_data/ossimNitfCommon.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <iostream>
+#include <iomanip>
+
+static const ossimTrace traceDebug(ossimString("ossimNitfRsmpcaTag:debug"));
+static const ossimString CNPCF_KW = "CNPCF";
+static const ossimString CDPCF_KW = "CDPCF";
+static const ossimString RNPCF_KW = "RNPCF";
+static const ossimString RDPCF_KW = "RDPCF";
+static const ossimString POLYFILL = "                     ";
+
+RTTI_DEF1(ossimNitfRsmpcaTag, "ossimNitfRsmpcaTag", ossimNitfRegisteredTag);
+
+
+ossimNitfRsmpcaTag::ossimNitfRsmpcaTag()
+   :
+   ossimNitfRegisteredTag(std::string("RSMPCA"), 0),
+   m_iid(),
+   m_edition(),
+   m_rsn(),
+   m_csn(),
+   m_rfep(),
+   m_cfep(),
+   m_rnrmo(),
+   m_cnrmo(),
+   m_xnrmo(),
+   m_ynrmo(),
+   m_znrmo(),
+   m_rnrmsf(),
+   m_cnrmsf(),
+   m_xnrmsf(),
+   m_ynrmsf(),
+   
+   m_znrmsf(),
+   
+   m_rnpwrx(),
+   m_rnpwry(),
+   m_rnpwrz(),
+   m_rntrms(),
+   
+   m_rnpcf(),
+   
+   m_rdpwrx(),
+   m_rdpwry(),
+   m_rdpwrz(),
+   m_rdtrms(),
+   
+   m_rdpcf(),
+   
+   m_cnpwrx(),
+   m_cnpwry(),
+   m_cnpwrz(),
+   m_cntrms(),
+   
+   m_cnpcf(),
+   
+   m_cdpwrx(),
+   m_cdpwry(),
+   m_cdpwrz(),
+   m_cdtrms(),
+   
+   m_cdpcf(),
+   
+   m_rowNumNumTerms(0),
+   m_rowDenNumTerms(0),
+   m_colNumNumTerms(0),
+   m_colDenNumTerms(0)
+{
+}
+
+void ossimNitfRsmpcaTag::parseStream(std::istream& in)
+{
+   clearFields();
+   
+   in.read(m_iid, IID_SIZE);
+   in.read(m_edition, EDITION_SIZE);
+   in.read(m_rsn, RSN_SIZE);
+   in.read(m_csn, CSN_SIZE);
+   in.read(m_rfep, FLOAT21_SIZE);
+   in.read(m_cfep, FLOAT21_SIZE);
+   in.read(m_rnrmo, FLOAT21_SIZE);
+   in.read(m_cnrmo, FLOAT21_SIZE);
+   in.read(m_xnrmo, FLOAT21_SIZE);
+   in.read(m_ynrmo, FLOAT21_SIZE);
+   in.read(m_znrmo, FLOAT21_SIZE);
+   in.read(m_rnrmsf, FLOAT21_SIZE);
+   in.read(m_cnrmsf, FLOAT21_SIZE);
+   in.read(m_xnrmsf, FLOAT21_SIZE);
+   in.read(m_ynrmsf, FLOAT21_SIZE);
+   in.read(m_znrmsf, FLOAT21_SIZE);
+
+   in.read(m_rnpwrx, MAXPOWER_SIZE);
+   in.read(m_rnpwry, MAXPOWER_SIZE);
+   in.read(m_rnpwrz, MAXPOWER_SIZE);
+   in.read(m_rntrms, NUMTERMS_SIZE);
+   ossim_uint32 idx = 0;
+   m_rowNumNumTerms = ossimString(m_rntrms).toUInt32();
+   m_rnpcf.resize(m_rowNumNumTerms);
+   char temp1[FLOAT21_SIZE+1];
+   temp1[FLOAT21_SIZE] = '\0';
+   for(idx = 0; idx < m_rowNumNumTerms; ++idx)
+   {
+      in.read(temp1, FLOAT21_SIZE);
+      m_rnpcf[idx] = POLYFILL; 
+      m_rnpcf[idx] = temp1;
+   }
+
+   in.read(m_rdpwrx, MAXPOWER_SIZE);
+   in.read(m_rdpwry, MAXPOWER_SIZE);
+   in.read(m_rdpwrz, MAXPOWER_SIZE);
+   in.read(m_rdtrms, NUMTERMS_SIZE);
+   m_rowDenNumTerms = ossimString(m_rdtrms).toUInt32();
+   m_rdpcf.resize(m_rowDenNumTerms);
+   char temp2[FLOAT21_SIZE+1];
+   temp2[FLOAT21_SIZE] = '\0';
+   for(idx = 0; idx < m_rowDenNumTerms; ++idx)
+   {
+      in.read(temp2, FLOAT21_SIZE);
+      m_rdpcf[idx] = POLYFILL; 
+      m_rdpcf[idx] = temp2;
+   }
+
+   in.read(m_cnpwrx, MAXPOWER_SIZE);
+   in.read(m_cnpwry, MAXPOWER_SIZE);
+   in.read(m_cnpwrz, MAXPOWER_SIZE);
+   in.read(m_cntrms, NUMTERMS_SIZE);
+   m_colNumNumTerms = ossimString(m_cntrms).toUInt32();
+   m_cnpcf.resize(m_colNumNumTerms); 
+   char temp3[FLOAT21_SIZE+1];
+   temp3[FLOAT21_SIZE] = '\0';
+   for(idx = 0; idx < m_colNumNumTerms; ++idx)
+   {
+      in.read(temp3, FLOAT21_SIZE);
+      m_cnpcf[idx] = POLYFILL; 
+      m_cnpcf[idx] = temp3;
+   }
+
+   in.read(m_cdpwrx, MAXPOWER_SIZE);
+   in.read(m_cdpwry, MAXPOWER_SIZE);
+   in.read(m_cdpwrz, MAXPOWER_SIZE);
+   in.read(m_cdtrms, NUMTERMS_SIZE);
+   m_colDenNumTerms = ossimString(m_cdtrms).toUInt32();
+   m_cdpcf.resize(m_colDenNumTerms); 
+   char temp4[FLOAT21_SIZE+1];
+   temp4[FLOAT21_SIZE] = '\0';
+   for(idx = 0; idx < m_colDenNumTerms; ++idx)
+   {
+      in.read(temp4, FLOAT21_SIZE);
+      m_cdpcf[idx] = POLYFILL; 
+      m_cdpcf[idx] = temp4;
+   }
+}
+
+void ossimNitfRsmpcaTag::writeStream(std::ostream& out)
+{
+   out.write(m_iid, IID_SIZE);
+   out.write(m_edition, EDITION_SIZE);
+   out.write(m_rsn, RSN_SIZE);
+   out.write(m_csn, CSN_SIZE);
+   out.write(m_rfep, FLOAT21_SIZE);
+   out.write(m_cfep, FLOAT21_SIZE);
+   out.write(m_rnrmo, FLOAT21_SIZE);
+   out.write(m_cnrmo, FLOAT21_SIZE);
+   out.write(m_xnrmo, FLOAT21_SIZE);
+   out.write(m_ynrmo, FLOAT21_SIZE);
+   out.write(m_znrmo, FLOAT21_SIZE);
+   out.write(m_rnrmsf, FLOAT21_SIZE);
+   out.write(m_cnrmsf, FLOAT21_SIZE);
+   out.write(m_xnrmsf, FLOAT21_SIZE);
+   out.write(m_ynrmsf, FLOAT21_SIZE);
+   out.write(m_znrmsf, FLOAT21_SIZE);
+
+   out.write(m_rnpwrx, MAXPOWER_SIZE);
+   out.write(m_rnpwry, MAXPOWER_SIZE);
+   out.write(m_rnpwrz, MAXPOWER_SIZE);
+   out.write(m_rntrms, NUMTERMS_SIZE);
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx < m_rowNumNumTerms; ++idx)
+   {
+      out.write(m_rnpcf[idx], FLOAT21_SIZE);
+   }
+
+   out.write(m_rdpwrx, MAXPOWER_SIZE);
+   out.write(m_rdpwry, MAXPOWER_SIZE);
+   out.write(m_rdpwrz, MAXPOWER_SIZE);
+   out.write(m_rdtrms, NUMTERMS_SIZE);
+   for(idx = 0; idx < m_rowDenNumTerms; ++idx)
+   {
+      out.write(m_rdpcf[idx], FLOAT21_SIZE);
+   }
+
+   out.write(m_cnpwrx, MAXPOWER_SIZE);
+   out.write(m_cnpwry, MAXPOWER_SIZE);
+   out.write(m_cnpwrz, MAXPOWER_SIZE);
+   out.write(m_cntrms, NUMTERMS_SIZE);
+   for(idx = 0; idx < m_colNumNumTerms; ++idx)
+   {
+      out.write(m_cnpcf[idx], FLOAT21_SIZE);
+   }
+
+   out.write(m_cdpwrx, MAXPOWER_SIZE);
+   out.write(m_cdpwry, MAXPOWER_SIZE);
+   out.write(m_cdpwrz, MAXPOWER_SIZE);
+   out.write(m_cdtrms, NUMTERMS_SIZE);
+   for(idx = 0; idx < m_colDenNumTerms; ++idx)
+   {
+      out.write(m_cdpcf[idx], FLOAT21_SIZE);
+   }
+}
+
+void ossimNitfRsmpcaTag::clearFields()
+{
+   memset(m_iid, ' ', IID_SIZE);
+   memset(m_edition, ' ', EDITION_SIZE);
+   memset(m_rsn, ' ', RSN_SIZE);
+   memset(m_csn, ' ', CSN_SIZE);
+   memset(m_rfep, ' ', FLOAT21_SIZE);
+   memset(m_cfep, ' ', FLOAT21_SIZE);
+   memset(m_rnrmo, ' ', FLOAT21_SIZE);
+   memset(m_cnrmo, ' ', FLOAT21_SIZE);
+   memset(m_xnrmo, ' ', FLOAT21_SIZE);
+   memset(m_ynrmo, ' ', FLOAT21_SIZE);
+   memset(m_znrmo, ' ', FLOAT21_SIZE);
+   memset(m_rnrmsf, ' ', FLOAT21_SIZE);
+   memset(m_cnrmsf, ' ', FLOAT21_SIZE);
+   memset(m_xnrmsf, ' ', FLOAT21_SIZE);
+   memset(m_ynrmsf, ' ', FLOAT21_SIZE);
+   memset(m_znrmsf, ' ', FLOAT21_SIZE);
+   memset(m_rnpwrx, ' ', MAXPOWER_SIZE);
+   memset(m_rnpwry, ' ', MAXPOWER_SIZE);
+   memset(m_rnpwrz, ' ', MAXPOWER_SIZE);
+   memset(m_rntrms, ' ', NUMTERMS_SIZE);
+   memset(m_rdpwrx, ' ', MAXPOWER_SIZE);
+   memset(m_rdpwry, ' ', MAXPOWER_SIZE);
+   memset(m_rdpwrz, ' ', MAXPOWER_SIZE);
+   memset(m_rdtrms, ' ', NUMTERMS_SIZE);
+   memset(m_cnpwrx, ' ', MAXPOWER_SIZE);
+   memset(m_cnpwry, ' ', MAXPOWER_SIZE);
+   memset(m_cnpwrz, ' ', MAXPOWER_SIZE);
+   memset(m_cntrms, ' ', NUMTERMS_SIZE);
+   memset(m_cdpwrx, ' ', MAXPOWER_SIZE);
+   memset(m_cdpwry, ' ', MAXPOWER_SIZE);
+   memset(m_cdpwrz, ' ', MAXPOWER_SIZE);
+   memset(m_cdtrms, ' ', NUMTERMS_SIZE);
+   
+   m_iid[IID_SIZE] = '\0';
+   m_edition[EDITION_SIZE] = '\0';
+   m_rsn[RSN_SIZE] = '\0';
+   m_csn[CSN_SIZE] = '\0';
+   m_rfep[FLOAT21_SIZE] = '\0';
+   m_cfep[FLOAT21_SIZE] = '\0';
+   m_rnrmo[FLOAT21_SIZE] = '\0';
+   m_cnrmo[FLOAT21_SIZE] = '\0';
+   m_xnrmo[FLOAT21_SIZE] = '\0';
+   m_ynrmo[FLOAT21_SIZE] = '\0';
+   m_znrmo[FLOAT21_SIZE] = '\0';
+   m_rnrmsf[FLOAT21_SIZE] = '\0';
+   m_cnrmsf[FLOAT21_SIZE] = '\0';
+   m_xnrmsf[FLOAT21_SIZE] = '\0';
+   m_ynrmsf[FLOAT21_SIZE] = '\0';
+   m_znrmsf[FLOAT21_SIZE] = '\0';
+   m_rnpwrx[MAXPOWER_SIZE] = '\0';
+   m_rnpwry[MAXPOWER_SIZE] = '\0';
+   m_rnpwrz[MAXPOWER_SIZE] = '\0';
+   m_rntrms[NUMTERMS_SIZE] = '\0';
+   m_rdpwrx[MAXPOWER_SIZE] = '\0';
+   m_rdpwry[MAXPOWER_SIZE] = '\0';
+   m_rdpwrz[MAXPOWER_SIZE] = '\0';
+   m_rdtrms[NUMTERMS_SIZE] = '\0';
+   m_cnpwrx[MAXPOWER_SIZE] = '\0';
+   m_cnpwry[MAXPOWER_SIZE] = '\0';
+   m_cnpwrz[MAXPOWER_SIZE] = '\0';
+   m_cntrms[NUMTERMS_SIZE] = '\0';
+   m_cdpwrx[MAXPOWER_SIZE] = '\0';
+   m_cdpwry[MAXPOWER_SIZE] = '\0';
+   m_cdpwrz[MAXPOWER_SIZE] = '\0';
+   m_cdtrms[NUMTERMS_SIZE] = '\0';
+}
+
+std::ostream& ossimNitfRsmpcaTag::print(std::ostream& out,
+                                      const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+
+   out << setiosflags(std::ios::left)
+       << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:" << getSizeInBytes() << "\n"
+       << pfx << std::setw(24) << "IID:" << m_iid << "\n" 
+       << pfx << std::setw(24) << "EDITION:" << m_edition << "\n"
+       << pfx << std::setw(24) << "RSN:" << m_rsn << "\n" 
+       << pfx << std::setw(24) << "CSN:" << m_csn << "\n"
+       << pfx << std::setw(24) << "RFEP:" << m_rfep << "\n" 
+       << pfx << std::setw(24) << "CFEP:" << m_cfep << "\n"
+       << pfx << std::setw(24) << "RNRMO:" << m_rnrmo << "\n" 
+       << pfx << std::setw(24) << "CNRMO:" << m_cnrmo << "\n"                
+       << pfx << std::setw(24) << "XNRMO:" << m_xnrmo << "\n"                
+       << pfx << std::setw(24) << "YNRMO:" << m_ynrmo << "\n"                
+       << pfx << std::setw(24) << "ZNRMO:" << m_znrmo << "\n"                
+       << pfx << std::setw(24) << "RNRMSF:" << m_rnrmsf << "\n"                
+       << pfx << std::setw(24) << "CNRMSF:" << m_cnrmsf << "\n"
+       << pfx << std::setw(24) << "XNRMSF:" << m_xnrmsf << "\n"
+       << pfx << std::setw(24) << "YNRMSF:" << m_ynrmsf << "\n"
+       << pfx << std::setw(24) << "ZNRMSF:" << m_znrmsf << "\n"
+       << pfx << std::setw(24) << "RNPWRX:" << m_rnpwrx << "\n"
+       << pfx << std::setw(24) << "RNPWRY:" << m_rnpwry << "\n"
+       << pfx << std::setw(24) << "RNPWRZ:" << m_rnpwrz << "\n"
+       << pfx << std::setw(24) << "RNTRMS:" << m_rntrms << "\n"
+       << pfx << std::setw(24) << "RDPWRX:" << m_rdpwrx << "\n"
+       << pfx << std::setw(24) << "RDPWRY:" << m_rdpwry << "\n"
+       << pfx << std::setw(24) << "RDPWRZ:" << m_rdpwrz << "\n"
+       << pfx << std::setw(24) << "RDTRMS:" << m_rdtrms << "\n"
+       << pfx << std::setw(24) << "CNPWRX:" << m_rnpwrx << "\n"
+       << pfx << std::setw(24) << "CNPWRY:" << m_rnpwry << "\n"
+       << pfx << std::setw(24) << "CNPWRZ:" << m_rnpwrz << "\n"
+       << pfx << std::setw(24) << "CNTRMS:" << m_rntrms << "\n"
+       << pfx << std::setw(24) << "CDPWRX:" << m_rdpwrx << "\n"
+       << pfx << std::setw(24) << "CDPWRY:" << m_rdpwry << "\n"
+       << pfx << std::setw(24) << "CDPWRZ:" << m_rdpwrz << "\n"
+       << pfx << std::setw(24) << "CDTRMS:" << m_rdtrms << "\n";
+
+
+   ossim_uint32 i;
+   ossimString s;
+   
+   for (i=0; i<m_rowNumNumTerms; ++i)
+   {
+      s = ossimString(RNPCF_KW);
+      s += ossimString::toString(i);
+      s += ":";
+      out << pfx << std::setw(24) << s
+          << m_rnpcf[i] << "\n";
+   }
+   for (i=0; i<m_rowDenNumTerms; ++i)
+   {
+      s = ossimString(RDPCF_KW);
+      s += ossimString::toString(i);
+      s += ":";
+      out << pfx << std::setw(24) << s
+          << m_rdpcf[i] << "\n";
+   }
+   for (i=0; i<m_colNumNumTerms; ++i)
+   {
+      s = ossimString(CNPCF_KW);
+      s += ossimString::toString(i);
+      s += ":";
+      out << pfx << std::setw(24) << s
+          << m_cnpcf[i] << "\n";
+   }
+   for (i=0; i<m_colDenNumTerms; ++i)
+   {
+      s = ossimString(CDPCF_KW);
+      s += ossimString::toString(i);
+      s += ":";
+      out << pfx << std::setw(24) << s
+          << m_cdpcf[i] << "\n";
+   }
+
+   out.flush();
+   
+   return out;
+}
+
+ossimString ossimNitfRsmpcaTag::getIid() const
+{
+   return ossimString(m_iid);
+}
+
+ossimString ossimNitfRsmpcaTag::getEdition() const
+{
+   return ossimString(m_edition);
+}
+
+
+ossimString ossimNitfRsmpcaTag::getRsn() const
+{
+   return ossimString(m_rsn);
+}
+
+ossimString ossimNitfRsmpcaTag::getCsn() const
+{
+   return ossimString(m_csn);
+}
+
+ossimString ossimNitfRsmpcaTag::getRfep() const
+{
+   return ossimString(m_rfep);
+}
+
+ossimString ossimNitfRsmpcaTag::getCfep() const
+{
+   return ossimString(m_cfep);
+}
+
+ossimString ossimNitfRsmpcaTag::getRnrmo() const
+{
+   return ossimString(m_rnrmo);
+}
+
+ossimString ossimNitfRsmpcaTag::getCnrmo() const
+{
+   return ossimString(m_cnrmo);
+}
+
+ossimString ossimNitfRsmpcaTag::getXnrmo() const
+{
+   return ossimString(m_xnrmo);
+}
+
+ossimString ossimNitfRsmpcaTag::getYnrmo() const
+{
+   return ossimString(m_ynrmo);
+}
+
+ossimString ossimNitfRsmpcaTag::getZnrmo() const
+{
+   return ossimString(m_znrmo);
+}
+
+ossimString ossimNitfRsmpcaTag::getRnrmsf() const
+{
+   return ossimString(m_rnrmsf);
+}
+
+ossimString ossimNitfRsmpcaTag::getCnrmsf() const
+{
+   return ossimString(m_cnrmsf);
+}
+
+ossimString ossimNitfRsmpcaTag::getXnrmsf() const
+{
+   return ossimString(m_xnrmsf);
+}
+
+ossimString ossimNitfRsmpcaTag::getYnrmsf() const
+{
+   return ossimString(m_ynrmsf);
+}
+
+ossimString ossimNitfRsmpcaTag::getZnrmsf() const
+{
+   return ossimString(m_znrmsf);
+}
+
+ossimString ossimNitfRsmpcaTag::getRnpwrx() const
+{
+   return ossimString(m_rnpwrx);
+}
+
+ossimString ossimNitfRsmpcaTag::getRnpwry() const
+{
+   return ossimString(m_rnpwry);
+}
+
+ossimString ossimNitfRsmpcaTag::getRnpwrz() const
+{
+   return ossimString(m_rnpwrz);
+}
+
+ossimString ossimNitfRsmpcaTag::getRntrms() const
+{
+   return ossimString(m_rntrms);
+}
+
+ossimString ossimNitfRsmpcaTag::getRnpcf(ossim_uint32 index) const
+{
+   ossimString result;
+   if (index < m_rowNumNumTerms)
+   {
+      result = m_rnpcf[index];
+   }
+   else
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimNitfRsmpiaTag::getRnpcf range error!" << std::endl;
+      }
+   }
+   return result;
+}
+
+ossimString ossimNitfRsmpcaTag::getRdpwrx() const
+{
+   return ossimString(m_rdpwrx);
+}
+
+ossimString ossimNitfRsmpcaTag::getRdpwry() const
+{
+   return ossimString(m_rdpwry);
+}
+
+ossimString ossimNitfRsmpcaTag::getRdpwrz() const
+{
+   return ossimString(m_rdpwrz);
+}
+
+ossimString ossimNitfRsmpcaTag::getRdtrms() const
+{
+   return ossimString(m_rdtrms);
+}
+
+ossimString ossimNitfRsmpcaTag::getRdpcf(ossim_uint32 index) const
+{
+   ossimString result;
+   
+   if (index < m_rowDenNumTerms)
+   {
+      result = m_rdpcf[index];
+   }
+   else
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimNitfRsmpiaTag::getRdpcf range error!" << std::endl;
+      }
+   }
+   return result;
+}
+
+ossimString ossimNitfRsmpcaTag::getCnpwrx() const
+{
+   return ossimString(m_cnpwrx);
+}
+
+ossimString ossimNitfRsmpcaTag::getCnpwry() const
+{
+   return ossimString(m_cnpwry);
+}
+
+ossimString ossimNitfRsmpcaTag::getCnpwrz() const
+{
+   return ossimString(m_cnpwrz);
+}
+
+ossimString ossimNitfRsmpcaTag::getCntrms() const
+{
+   return ossimString(m_cntrms);
+}
+
+ossimString ossimNitfRsmpcaTag::getCnpcf(ossim_uint32 index) const
+{
+   ossimString result;
+   
+   if (index < m_colNumNumTerms)
+   {
+      result = m_cnpcf[index];
+   }
+   else
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimNitfRsmpiaTag::getCnpcf range error!" << std::endl;
+      }
+   }
+
+   return result;
+}
+
+ossimString ossimNitfRsmpcaTag::getCdpwrx() const
+{
+   return ossimString(m_cdpwrx);
+}
+
+ossimString ossimNitfRsmpcaTag::getCdpwry() const
+{
+   return ossimString(m_cdpwry);
+}
+
+ossimString ossimNitfRsmpcaTag::getCdpwrz() const
+{
+   return ossimString(m_cdpwrz);
+}
+
+ossimString ossimNitfRsmpcaTag::getCdtrms() const
+{
+   return ossimString(m_cdtrms);
+}
+
+ossimString ossimNitfRsmpcaTag::getCdpcf(ossim_uint32 index) const
+{
+   ossimString result;
+   
+   if (index < m_colDenNumTerms)
+   {
+      result = m_cdpcf[index];
+   }
+   else
+   {
+      if ( traceDebug() )
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimNitfRsmpiaTag::getCdpcf range error!" << std::endl;
+      }
+   }
+   return result;
+}
diff --git a/ossim/src/ossim/support_data/ossimNitfRsmpiaTag.cpp b/ossim/src/ossim/support_data/ossimNitfRsmpiaTag.cpp
new file mode 100644
index 0000000..77589c0
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfRsmpiaTag.cpp
@@ -0,0 +1,341 @@
+//---
+// File: ossimNitfRsmpiaTag.cpp
+//---
+
+
+#include <ossim/support_data/ossimNitfRsmpiaTag.h>
+#include <iomanip>
+#include <iostream>
+
+RTTI_DEF1(ossimNitfRsmpiaTag, "ossimNitfRsmpiaTag", ossimNitfRegisteredTag);
+
+ossimNitfRsmpiaTag::ossimNitfRsmpiaTag()
+   :
+   ossimNitfRegisteredTag(std::string("RSMPIA"), CEL_SIZE),
+   m_iid(),
+   m_edition(),
+   m_r0(),
+   m_rx(),
+   m_ry(),
+   m_rz(),
+   m_rxx(),
+   m_rxy(),
+   m_rxz(),
+   m_ryy(),
+   m_ryz(),
+   m_rzz(),
+   m_c0(),
+   m_cx(),
+   m_cy(),
+   m_cz(),
+   m_cxx(),
+   m_cxy(),
+   m_cxz(),
+   m_cyy(),
+   m_cyz(),
+   m_czz(),
+   m_rnis(),
+   m_cnis(),
+   m_tnis(),
+   m_rssiz(),
+   m_cssiz()   
+{
+   clearFields();
+}
+
+void ossimNitfRsmpiaTag::parseStream(std::istream& in)
+{
+   in.read(m_iid, IID_SIZE);
+   in.read(m_edition, EDITION_SIZE);
+   in.read(m_r0, FLOAT21_SIZE);
+   in.read(m_rx, FLOAT21_SIZE);
+   in.read(m_ry, FLOAT21_SIZE);
+   in.read(m_rz, FLOAT21_SIZE);
+   in.read(m_rxx, FLOAT21_SIZE);
+   in.read(m_rxy, FLOAT21_SIZE);
+   in.read(m_rxz, FLOAT21_SIZE);
+   in.read(m_ryy, FLOAT21_SIZE);
+   in.read(m_ryz, FLOAT21_SIZE);
+   in.read(m_rzz, FLOAT21_SIZE);
+   in.read(m_c0, FLOAT21_SIZE);
+   in.read(m_cx, FLOAT21_SIZE);
+   in.read(m_cy, FLOAT21_SIZE);
+   in.read(m_cz, FLOAT21_SIZE);
+   in.read(m_cxx, FLOAT21_SIZE);
+   in.read(m_cxy, FLOAT21_SIZE);
+   in.read(m_cxz, FLOAT21_SIZE);
+   in.read(m_cyy, FLOAT21_SIZE);
+   in.read(m_cyz, FLOAT21_SIZE);
+   in.read(m_czz, FLOAT21_SIZE);
+   in.read(m_rnis, NIS_SIZE);
+   in.read(m_cnis, NIS_SIZE);
+   in.read(m_tnis, NIS_SIZE);
+   in.read(m_rssiz, FLOAT21_SIZE);
+   in.read(m_cssiz, FLOAT21_SIZE);
+}
+
+void ossimNitfRsmpiaTag::writeStream(std::ostream& out)
+{
+   out.write(m_iid, IID_SIZE);
+   out.write(m_edition, EDITION_SIZE);
+   out.write(m_r0, FLOAT21_SIZE);
+   out.write(m_rx, FLOAT21_SIZE);
+   out.write(m_ry, FLOAT21_SIZE);
+   out.write(m_rz, FLOAT21_SIZE);
+   out.write(m_rxx, FLOAT21_SIZE);
+   out.write(m_rxy, FLOAT21_SIZE);
+   out.write(m_rxz, FLOAT21_SIZE);
+   out.write(m_ryy, FLOAT21_SIZE);
+   out.write(m_ryz, FLOAT21_SIZE);
+   out.write(m_rzz, FLOAT21_SIZE);
+   out.write(m_c0, FLOAT21_SIZE);
+   out.write(m_cx, FLOAT21_SIZE);
+   out.write(m_cy, FLOAT21_SIZE);
+   out.write(m_cz, FLOAT21_SIZE);
+   out.write(m_cxx, FLOAT21_SIZE);
+   out.write(m_cxy, FLOAT21_SIZE);
+   out.write(m_cxz, FLOAT21_SIZE);
+   out.write(m_cyy, FLOAT21_SIZE);
+   out.write(m_cyz, FLOAT21_SIZE);
+   out.write(m_czz, FLOAT21_SIZE);
+   out.write(m_rnis, NIS_SIZE);
+   out.write(m_cnis, NIS_SIZE);
+   out.write(m_tnis, NIS_SIZE);
+   out.write(m_rssiz, FLOAT21_SIZE);
+   out.write(m_cssiz, FLOAT21_SIZE);
+}
+
+std::ostream& ossimNitfRsmpiaTag::print(std::ostream& out,
+                                        const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+   out << setiosflags(ios::left)
+       << pfx << std::setw(24) << "CETAG:"      << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:"        << getTagLength() << "\n"
+       << pfx << std::setw(24) << "IID:" << m_iid << "\n"
+       << pfx << std::setw(24) << "EDITION:" << m_edition << "\n"
+       << pfx << std::setw(24) << "R0:" << m_r0 << "\n"
+       << pfx << std::setw(24) << "RX:" << m_rx << "\n"
+       << pfx << std::setw(24) << "RY:" << m_ry << "\n"
+       << pfx << std::setw(24) << "RZ:" << m_rz << "\n"
+       << pfx << std::setw(24) << "RXX:" << m_rxx << "\n"
+       << pfx << std::setw(24) << "RXY:" << m_rxy << "\n"
+       << pfx << std::setw(24) << "RXZ:" << m_rxz << "\n"
+       << pfx << std::setw(24) << "RYY:" << m_ryy << "\n"
+       << pfx << std::setw(24) << "RYZ:" << m_ryz << "\n"
+       << pfx << std::setw(24) << "RZZ:" << m_rzz << "\n"
+       << pfx << std::setw(24) << "C0:" << m_c0 << "\n"
+       << pfx << std::setw(24) << "CX:" << m_cx << "\n"
+       << pfx << std::setw(24) << "CY:" << m_cy << "\n"
+       << pfx << std::setw(24) << "CZ:" << m_cz << "\n"
+       << pfx << std::setw(24) << "CXX:" << m_cxx << "\n"
+       << pfx << std::setw(24) << "CXY:" << m_cxy << "\n"
+       << pfx << std::setw(24) << "CXZ:" << m_cxz << "\n"
+       << pfx << std::setw(24) << "CYY:" << m_cyy << "\n"
+       << pfx << std::setw(24) << "CYZ:" << m_cyz << "\n"
+       << pfx << std::setw(24) << "CZZ:" << m_czz << "\n"
+       << pfx << std::setw(24) << "RNIS:" << m_rnis << "\n"
+       << pfx << std::setw(24) << "CNIS:" << m_cnis << "\n"
+       << pfx << std::setw(24) << "TNIS:" << m_tnis << "\n"
+       << pfx << std::setw(24) << "RSSIZ:" << m_rssiz << "\n"
+       << pfx << std::setw(24) << "CSSIZ:" << m_cssiz << "\n";
+
+   return out;
+}
+
+void ossimNitfRsmpiaTag::clearFields()
+{
+   memset(m_iid,' ', IID_SIZE);
+   memset(m_edition, ' ', EDITION_SIZE);
+   memset(m_r0, ' ', FLOAT21_SIZE);
+   memset(m_rx, ' ', FLOAT21_SIZE);
+   memset(m_ry, ' ', FLOAT21_SIZE);
+   memset(m_rz, ' ', FLOAT21_SIZE);
+   memset(m_rxx, ' ', FLOAT21_SIZE);
+   memset(m_rxy, ' ', FLOAT21_SIZE);
+   memset(m_rxz, ' ', FLOAT21_SIZE);
+   memset(m_ryy, ' ', FLOAT21_SIZE);
+   memset(m_ryz, ' ', FLOAT21_SIZE);
+   memset(m_rzz, ' ', FLOAT21_SIZE);
+   memset(m_c0, ' ', FLOAT21_SIZE);
+   memset(m_cx, ' ', FLOAT21_SIZE);
+   memset(m_cy, ' ', FLOAT21_SIZE);
+   memset(m_cz, ' ', FLOAT21_SIZE);
+   memset(m_cxx, ' ', FLOAT21_SIZE);
+   memset(m_cxy, ' ', FLOAT21_SIZE);
+   memset(m_cxz, ' ', FLOAT21_SIZE);
+   memset(m_cyy, ' ', FLOAT21_SIZE);
+   memset(m_cyz, ' ', FLOAT21_SIZE);
+   memset(m_czz, ' ', FLOAT21_SIZE);
+   memset(m_rnis, ' ', NIS_SIZE);
+   memset(m_cnis, ' ', NIS_SIZE);
+   memset(m_tnis, ' ', NIS_SIZE);
+   memset(m_rssiz, ' ', FLOAT21_SIZE);
+   memset(m_cssiz, ' ', FLOAT21_SIZE);
+
+   m_iid[IID_SIZE] = '\0';
+   m_edition[EDITION_SIZE] = '\0';
+   m_r0[FLOAT21_SIZE] = '\0';
+   m_rx[FLOAT21_SIZE] = '\0';
+   m_ry[FLOAT21_SIZE] = '\0';
+   m_rz[FLOAT21_SIZE] = '\0';
+   m_rxx[FLOAT21_SIZE] = '\0';
+   m_rxy[FLOAT21_SIZE] = '\0';
+   m_rxz[FLOAT21_SIZE] = '\0';
+   m_ryy[FLOAT21_SIZE] = '\0';
+   m_ryz[FLOAT21_SIZE] = '\0';
+   m_rzz[FLOAT21_SIZE] = '\0';
+   m_c0[FLOAT21_SIZE] = '\0';
+   m_cx[FLOAT21_SIZE] = '\0';
+   m_cy[FLOAT21_SIZE] = '\0';
+   m_cz[FLOAT21_SIZE] = '\0';
+   m_cxx[FLOAT21_SIZE] = '\0';
+   m_cxy[FLOAT21_SIZE] = '\0';
+   m_cxz[FLOAT21_SIZE] = '\0';
+   m_cyy[FLOAT21_SIZE] = '\0';
+   m_cyz[FLOAT21_SIZE] = '\0';
+   m_czz[FLOAT21_SIZE] = '\0';
+   m_rnis[NIS_SIZE] = '\0';
+   m_cnis[NIS_SIZE] = '\0';
+   m_tnis[NIS_SIZE] = '\0';
+   m_rssiz[FLOAT21_SIZE] = '\0';
+   m_cssiz[FLOAT21_SIZE] = '\0';
+}
+
+
+ossimString ossimNitfRsmpiaTag::getIid() const
+{
+   return ossimString(m_iid);
+}
+
+ossimString ossimNitfRsmpiaTag::getEdition() const
+{
+   return ossimString(m_edition);
+}
+
+ossimString ossimNitfRsmpiaTag::getR0() const
+{
+   return ossimString(m_r0);
+}
+
+ossimString ossimNitfRsmpiaTag::getRx() const
+{
+   return ossimString(m_rx);
+}
+
+ossimString ossimNitfRsmpiaTag::getRy() const
+{
+   return ossimString(m_ry);
+}
+
+ossimString ossimNitfRsmpiaTag::getRz() const
+{
+   return ossimString(m_rz);
+}
+
+ossimString ossimNitfRsmpiaTag::getRxx() const
+{
+   return ossimString(m_rxx);
+}
+
+ossimString ossimNitfRsmpiaTag::getRxy() const
+{
+   return ossimString(m_rxy);
+}
+
+ossimString ossimNitfRsmpiaTag::getRxz() const
+{
+   return ossimString(m_rxz);
+}
+
+ossimString ossimNitfRsmpiaTag::getRyy() const
+{
+   return ossimString(m_ryy);
+}
+
+ossimString ossimNitfRsmpiaTag::getRyz() const
+{
+   return ossimString(m_ryz);
+}
+
+ossimString ossimNitfRsmpiaTag::getRzz() const
+{
+   return ossimString(m_rzz);
+}
+
+ossimString ossimNitfRsmpiaTag::getC0() const
+{
+   return ossimString(m_c0);
+}
+
+ossimString ossimNitfRsmpiaTag::getCx() const
+{
+   return ossimString(m_cx);
+}
+
+ossimString ossimNitfRsmpiaTag::getCy() const
+{
+   return ossimString(m_cy);
+}
+
+ossimString ossimNitfRsmpiaTag::getCz() const
+{
+   return ossimString(m_cz);
+}
+
+ossimString ossimNitfRsmpiaTag::getCxx() const
+{
+   return ossimString(m_cxx);
+}
+
+ossimString ossimNitfRsmpiaTag::getCxy() const
+{
+   return ossimString(m_cxy);
+}
+
+ossimString ossimNitfRsmpiaTag::getCxz() const
+{
+   return ossimString(m_cxz);
+}
+
+ossimString ossimNitfRsmpiaTag::getCyy() const
+{
+   return ossimString(m_cyy);
+}
+
+ossimString ossimNitfRsmpiaTag::getCyz() const
+{
+   return ossimString(m_cyz);
+}
+
+ossimString ossimNitfRsmpiaTag::getCzz() const
+{
+   return ossimString(m_czz);
+}
+
+ossimString ossimNitfRsmpiaTag::getRnis() const
+{
+   return ossimString(m_rnis);
+}
+
+ossimString ossimNitfRsmpiaTag::getCnis() const
+{
+   return ossimString(m_cnis);
+}
+
+ossimString ossimNitfRsmpiaTag::getTnis() const
+{
+   return ossimString(m_tnis);
+}
+
+ossimString ossimNitfRsmpiaTag::getRssiz() const
+{
+   return ossimString(m_rssiz);
+}
+
+ossimString ossimNitfRsmpiaTag::getCssiz() const
+{
+   return ossimString(m_cssiz);
+}
diff --git a/ossim/src/ossim/support_data/ossimNitfSensraTag.cpp b/ossim/src/ossim/support_data/ossimNitfSensraTag.cpp
new file mode 100644
index 0000000..99aabd8
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfSensraTag.cpp
@@ -0,0 +1,444 @@
+//*******************************************************************
+
+// LICENSE: MIT
+//
+// see top level LICENSE.txt
+// 
+// Author: Walt Bunch
+//
+// Description: Nitf support class for SENSRA - Sensor parameters extension.
+// 
+//********************************************************************
+// $Id: ossimNitfSensraTag.cpp 23666 2015-12-14 20:01:22Z rashadkm $
+
+#include <istream>
+#include <iomanip>
+#include <ossim/support_data/ossimNitfSensraTag.h>
+
+RTTI_DEF1(ossimNitfSensraTag, "ossimNitfSensraTag", ossimNitfRegisteredTag);
+
+
+ossimNitfSensraTag::ossimNitfSensraTag()
+   : ossimNitfRegisteredTag(std::string("SENSRA"), 132)
+{
+   clearFields();
+}
+
+ossimNitfSensraTag::~ossimNitfSensraTag()
+{
+}
+
+void ossimNitfSensraTag::parseStream(std::istream& in)
+{
+   clearFields();
+   
+   in.read(theRefRow, REF_ROW_SIZE);
+   in.read(theRefCol, REF_COL_SIZE);
+   in.read(theSensorModel, SENSOR_MODEL_SIZE);
+   in.read(theSensorMount, SENSOR_MOUNT_SIZE);
+   in.read(theSensorLoc, SENSOR_LOC_SIZE);
+   in.read(theSensorAltSrc, SENSOR_ALT_SRC_SIZE);
+   in.read(theSensorAlt, SENSOR_ALT_SIZE);
+   in.read(theSensorAltUnit, SENSOR_ALT_UNIT_SIZE);
+   in.read(theSensorAgl, SENSOR_AGL_SIZE);
+   in.read(theSensorPitch, SENSOR_PITCH_SIZE);
+   in.read(theSensorRoll, SENSOR_ROLL_SIZE);
+   in.read(theSensorYaw, SENSOR_YAW_SIZE);
+   in.read(thePlatformPitch, PLATFORM_PITCH_SIZE);
+   in.read(thePlatformRoll, PLATFORM_ROLL_SIZE);
+   in.read(thePlatformHdg, PLATFORM_HDG_SIZE);
+   in.read(theGroundSpdSrc, GROUND_SPD_SRC_SIZE);
+   in.read(theGroundSpeed, GROUND_SPEED_SIZE);
+   in.read(theGroundSpdUnit, GROUND_SPD_UNIT_SIZE);
+   in.read(theGroundTrack, GROUND_TRACK_SIZE);
+   in.read(theVerticalVel, VERTICAL_VEL_SIZE);
+   in.read(theVertVelUnit, VERT_VEL_UNIT_SIZE);
+   in.read(theSwathFrames, SWATH_FRAMES_SIZE);
+   in.read(theNSwaths, N_SWATHS_SIZE);
+   in.read(theSpotNum, SPOT_NUM_SIZE);
+}
+
+void ossimNitfSensraTag::writeStream(std::ostream& out)
+{
+   out.write(theRefRow, REF_ROW_SIZE);
+   out.write(theRefCol, REF_COL_SIZE);
+   out.write(theSensorModel, SENSOR_MODEL_SIZE);
+   out.write(theSensorMount, SENSOR_MOUNT_SIZE);
+   out.write(theSensorLoc, SENSOR_LOC_SIZE);
+   out.write(theSensorAltSrc, SENSOR_ALT_SRC_SIZE);
+   out.write(theSensorAlt, SENSOR_ALT_SIZE);
+   out.write(theSensorAltUnit, SENSOR_ALT_UNIT_SIZE);
+   out.write(theSensorAgl, SENSOR_AGL_SIZE);
+   out.write(theSensorPitch, SENSOR_PITCH_SIZE);
+   out.write(theSensorRoll, SENSOR_ROLL_SIZE);
+   out.write(theSensorYaw, SENSOR_YAW_SIZE);
+   out.write(thePlatformPitch, PLATFORM_PITCH_SIZE);
+   out.write(thePlatformRoll, PLATFORM_ROLL_SIZE);
+   out.write(thePlatformHdg, PLATFORM_HDG_SIZE);
+   out.write(theGroundSpdSrc, GROUND_SPD_SRC_SIZE);
+   out.write(theGroundSpeed, GROUND_SPEED_SIZE);
+   out.write(theGroundSpdUnit, GROUND_SPD_UNIT_SIZE);
+   out.write(theGroundTrack, GROUND_TRACK_SIZE);
+   out.write(theVerticalVel, VERTICAL_VEL_SIZE);
+   out.write(theVertVelUnit, VERT_VEL_UNIT_SIZE);
+   out.write(theSwathFrames, SWATH_FRAMES_SIZE);
+   out.write(theNSwaths, N_SWATHS_SIZE);
+   out.write(theSpotNum, SPOT_NUM_SIZE);
+}
+
+void ossimNitfSensraTag::clearFields()
+{
+   memset(theRefRow, ' ', REF_ROW_SIZE);
+   memset(theRefCol, ' ', REF_COL_SIZE);
+   memset(theSensorModel, ' ', SENSOR_MODEL_SIZE);
+   memset(theSensorMount, ' ', SENSOR_MOUNT_SIZE);
+   memset(theSensorLoc, ' ', SENSOR_LOC_SIZE);
+   memset(theSensorAltSrc, ' ', SENSOR_ALT_SRC_SIZE);
+   memset(theSensorAlt, ' ', SENSOR_ALT_SIZE);
+   memset(theSensorAltUnit, ' ', SENSOR_ALT_UNIT_SIZE);
+   memset(theSensorAgl, ' ', SENSOR_AGL_SIZE);
+   memset(theSensorPitch, ' ', SENSOR_PITCH_SIZE);
+   memset(theSensorRoll, ' ', SENSOR_ROLL_SIZE);
+   memset(theSensorYaw, ' ', SENSOR_YAW_SIZE);
+   memset(thePlatformPitch, ' ', PLATFORM_PITCH_SIZE);
+   memset(thePlatformRoll, ' ', PLATFORM_ROLL_SIZE);
+   memset(thePlatformHdg, ' ', PLATFORM_HDG_SIZE);
+   memset(theGroundSpdSrc, ' ', GROUND_SPD_SRC_SIZE);
+   memset(theGroundSpeed, ' ', GROUND_SPEED_SIZE);
+   memset(theGroundSpdUnit, ' ', GROUND_SPD_UNIT_SIZE);
+   memset(theGroundTrack, ' ', GROUND_TRACK_SIZE);
+   memset(theVerticalVel, ' ', VERTICAL_VEL_SIZE);
+   memset(theVertVelUnit, ' ', VERT_VEL_UNIT_SIZE);
+   memset(theSwathFrames, ' ', SWATH_FRAMES_SIZE);
+   memset(theNSwaths, ' ', N_SWATHS_SIZE);
+   memset(theSpotNum, ' ', SPOT_NUM_SIZE);
+
+   theRefRow[REF_ROW_SIZE] = '\0';
+   theRefCol[REF_COL_SIZE] = '\0';
+   theSensorModel[SENSOR_MODEL_SIZE] = '\0';
+   theSensorMount[SENSOR_MOUNT_SIZE] = '\0';
+   theSensorLoc[SENSOR_LOC_SIZE] = '\0';
+   theSensorAltSrc[SENSOR_ALT_SRC_SIZE] = '\0';
+   theSensorAlt[SENSOR_ALT_SIZE] = '\0';
+   theSensorAltUnit[SENSOR_ALT_UNIT_SIZE] = '\0';
+   theSensorAgl[SENSOR_AGL_SIZE] = '\0';
+   theSensorPitch[SENSOR_PITCH_SIZE] = '\0';
+   theSensorRoll[SENSOR_ROLL_SIZE] = '\0';
+   theSensorYaw[SENSOR_YAW_SIZE] = '\0';
+   thePlatformPitch[PLATFORM_PITCH_SIZE] = '\0';
+   thePlatformRoll[PLATFORM_ROLL_SIZE] = '\0';
+   thePlatformHdg[PLATFORM_HDG_SIZE] = '\0';
+   theGroundSpdSrc[GROUND_SPD_SRC_SIZE] = '\0';
+   theGroundSpeed[GROUND_SPEED_SIZE] = '\0';
+   theGroundSpdUnit[GROUND_SPD_UNIT_SIZE] = '\0';
+   theGroundTrack[GROUND_TRACK_SIZE] = '\0';
+   theVerticalVel[VERTICAL_VEL_SIZE] = '\0';
+   theVertVelUnit[VERT_VEL_UNIT_SIZE] = '\0';
+   theSwathFrames[SWATH_FRAMES_SIZE] = '\0';
+   theNSwaths[N_SWATHS_SIZE] = '\0';
+   theSpotNum[SPOT_NUM_SIZE] = '\0';
+}
+
+std::ostream& ossimNitfSensraTag::print(
+   std::ostream& out, const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+   
+   out << std::setiosflags(std::ios::left)
+       << pfx << std::setw(24) << "CETAG:"
+       << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:" << getTagLength() << "\n"
+       << pfx << std::setw(24) << "REFROW:" << theRefRow << "\n"
+       << pfx << std::setw(24) << "REFCOL:" << theRefCol << "\n"
+       << pfx << std::setw(24) << "SENSORMODEL:" << theSensorModel<< "\n"
+       << pfx << std::setw(24) << "SENSORMOUNT:" << theSensorMount << "\n"
+       << pfx << std::setw(24) << "SENSORLOC:" << theSensorLoc << "\n"
+       << pfx << std::setw(24) << "SENSORALTSRC:" << theSensorAltSrc<< "\n"
+       << pfx << std::setw(24) << "SENSORALT:" << theSensorAlt << "\n"
+       << pfx << std::setw(24) << "SENSORALTUNIT:" << theSensorAltUnit << "\n"
+       << pfx << std::setw(24) << "SENSORAGL:" << theSensorAgl << "\n"
+       << pfx << std::setw(24) << "SENSORPITCH:" << theSensorPitch << "\n"
+       << pfx << std::setw(24) << "SENSORROLL:" << theSensorRoll<< "\n"
+       << pfx << std::setw(24) << "SENSORYAW:" << theSensorYaw << "\n"
+       << pfx << std::setw(24) << "PLATFORMPITCH:" << thePlatformPitch << "\n"
+       << pfx << std::setw(24) << "PLATFORMROLL:" << thePlatformRoll << "\n"
+       << pfx << std::setw(24) << "PLATFORMHDG:" << thePlatformHdg << "\n"
+       << pfx << std::setw(24) << "GROUNDSPDSRC:" << theGroundSpdSrc << "\n"
+       << pfx << std::setw(24) << "GROUNDSPEED:" << theGroundSpeed << "\n"
+       << pfx << std::setw(24) << "GROUNDSPDUNIT:" << theGroundSpdUnit << "\n"
+       << pfx << std::setw(24) << "GROUNDTRACK:" << theGroundTrack << "\n"
+       << pfx << std::setw(24) << "VERTICALVEL:" << theVerticalVel<< "\n"
+       << pfx << std::setw(24) << "VERTVELUNIT:" << theVertVelUnit << "\n"
+       << pfx << std::setw(24) << "SWATHFRAMES:" << theSwathFrames<< "\n"
+       << pfx << std::setw(24) << "NSWATHS:" << theNSwaths << "\n"
+       << pfx << std::setw(24) << "SPOTNUM:" << theSpotNum << "\n";
+   
+   return out;
+}
+
+ossimString ossimNitfSensraTag::getRefRow()const
+{
+   return theRefRow;
+}
+
+void ossimNitfSensraTag::setRefRow(ossimString refRow)
+{
+   memset(theRefRow, ' ', REF_ROW_SIZE);
+   memcpy(theRefRow, refRow.c_str(), std::min((size_t)REF_ROW_SIZE, refRow.length()));
+}
+
+ossimString ossimNitfSensraTag::getRefCol()const
+{
+   return theRefCol;
+}
+
+void ossimNitfSensraTag::setRefCol(ossimString refCol)
+{
+   memset(theRefCol, ' ', REF_COL_SIZE);
+   memcpy(theRefCol, refCol.c_str(), std::min((size_t)REF_COL_SIZE, refCol.length()));
+}
+
+ossimString ossimNitfSensraTag::getSensorModel()const
+{
+   return theSensorModel;
+}
+
+void ossimNitfSensraTag::setSensorModel(ossimString sensorModel)
+{
+   memset(theSensorModel, ' ', SENSOR_MODEL_SIZE);
+   memcpy(theSensorModel, sensorModel.c_str(), std::min((size_t)SENSOR_MODEL_SIZE, sensorModel.length()));
+}
+
+ossimString ossimNitfSensraTag::getSensorMount()const
+{
+   return theSensorMount;
+}
+
+void ossimNitfSensraTag::setSensorMount(ossimString sensorMount)
+{
+   memset(theSensorMount, ' ', SENSOR_MOUNT_SIZE);
+   memcpy(theSensorMount, sensorMount.c_str(), std::min((size_t)SENSOR_MOUNT_SIZE, sensorMount.length()));
+}
+
+ossimString ossimNitfSensraTag::getSensorLoc()const
+{
+   return theSensorLoc;
+}
+
+void ossimNitfSensraTag::setSensorLoc(ossimString sensorLoc)
+{
+   memset(theSensorLoc, ' ', SENSOR_LOC_SIZE);
+   memcpy(theSensorLoc, sensorLoc.c_str(), std::min((size_t)SENSOR_LOC_SIZE, sensorLoc.length()));
+}
+
+ossimString ossimNitfSensraTag::getSensorAltSrc()const
+{
+   return theSensorAltSrc;
+}
+
+void ossimNitfSensraTag::setSensorAltSrc(ossimString sensorAltSrc)
+{
+   memset(theSensorAltSrc, ' ', SENSOR_ALT_SRC_SIZE);
+   memcpy(theSensorAltSrc, sensorAltSrc.c_str(), std::min((size_t)SENSOR_ALT_SRC_SIZE, sensorAltSrc.length()));
+}
+
+ossimString ossimNitfSensraTag::getSensorAlt()const
+{
+   return theSensorAlt;
+}
+
+void ossimNitfSensraTag::setSensorAlt(ossimString sensorAlt)
+{
+   memset(theSensorAlt, ' ', SENSOR_ALT_SIZE);
+   memcpy(theSensorAlt, sensorAlt.c_str(), std::min((size_t)SENSOR_ALT_SIZE, sensorAlt.length()));
+}
+
+ossimString ossimNitfSensraTag::getSensorAltUnit()const
+{
+   return theSensorAltUnit;
+}
+
+void ossimNitfSensraTag::setSensorAltUnit(ossimString sensorAltUnit)
+{
+   memset(theSensorAltUnit, ' ', SENSOR_ALT_UNIT_SIZE);
+   memcpy(theSensorAltUnit, sensorAltUnit.c_str(), std::min((size_t)SENSOR_ALT_UNIT_SIZE, sensorAltUnit.length()));
+}
+
+ossimString ossimNitfSensraTag::getSensorAgl()const
+{
+   return theSensorAgl;
+}
+
+void ossimNitfSensraTag::setSensorAgl(ossimString sensorAgl)
+{
+   memset(theSensorAgl, ' ', SENSOR_AGL_SIZE);
+   memcpy(theSensorAgl, sensorAgl.c_str(), std::min((size_t)SENSOR_AGL_SIZE, sensorAgl.length()));
+}
+
+ossimString ossimNitfSensraTag::getSensorPitch()const
+{
+   return theSensorPitch;
+}
+
+void ossimNitfSensraTag::setSensorPitch(ossimString sensorPitch)
+{
+   memset(theSensorPitch, ' ', SENSOR_PITCH_SIZE);
+   memcpy(theSensorPitch, sensorPitch.c_str(), std::min((size_t)SENSOR_PITCH_SIZE, sensorPitch.length()));
+}
+
+ossimString ossimNitfSensraTag::getSensorRoll()const
+{
+   return theSensorRoll;
+}
+
+void ossimNitfSensraTag::setSensorRoll(ossimString sensorRoll)
+{
+   memset(theSensorRoll, ' ', SENSOR_ROLL_SIZE);
+   memcpy(theSensorRoll, sensorRoll.c_str(), std::min((size_t)SENSOR_ROLL_SIZE, sensorRoll.length()));
+}
+
+ossimString ossimNitfSensraTag::getSensorYaw()const
+{
+   return theSensorYaw;
+}
+
+void ossimNitfSensraTag::setSensorYaw(ossimString sensorYaw)
+{
+   memset(theSensorYaw, ' ', SENSOR_YAW_SIZE);
+   memcpy(theSensorYaw, sensorYaw.c_str(), std::min((size_t)SENSOR_YAW_SIZE, sensorYaw.length()));
+}
+
+ossimString ossimNitfSensraTag::getPlatformPitch()const
+{
+   return thePlatformPitch;
+}
+
+void ossimNitfSensraTag::setPlatformPitch(ossimString platformPitch)
+{
+   memset(thePlatformPitch, ' ', PLATFORM_PITCH_SIZE);
+   memcpy(thePlatformPitch, platformPitch.c_str(), std::min((size_t)PLATFORM_PITCH_SIZE, platformPitch.length()));
+}
+
+ossimString ossimNitfSensraTag::getPlatformRoll()const
+{
+   return thePlatformRoll;
+}
+
+void ossimNitfSensraTag::setPlatformRoll(ossimString platformRoll)
+{
+   memset(thePlatformRoll, ' ', PLATFORM_ROLL_SIZE);
+   memcpy(thePlatformRoll, platformRoll.c_str(), std::min((size_t)PLATFORM_ROLL_SIZE, platformRoll.length()));
+}
+
+ossimString ossimNitfSensraTag::getPlatformHdg()const
+{
+   return thePlatformHdg;
+}
+
+void ossimNitfSensraTag::setPlatformHdg(ossimString platformHdg)
+{
+   memset(thePlatformHdg, ' ', PLATFORM_HDG_SIZE);
+   memcpy(thePlatformHdg, platformHdg.c_str(), std::min((size_t)PLATFORM_HDG_SIZE, platformHdg.length()));
+}
+
+ossimString ossimNitfSensraTag::getGroundSpdSrc()const
+{
+   return theGroundSpdSrc;
+}
+
+void ossimNitfSensraTag::setGroundSpdSrc(ossimString groundSpdSrc)
+{
+   memset(theGroundSpdSrc, ' ', GROUND_SPD_SRC_SIZE);
+   memcpy(theGroundSpdSrc, groundSpdSrc.c_str(), std::min((size_t)GROUND_SPD_SRC_SIZE, groundSpdSrc.length()));
+}
+
+ossimString ossimNitfSensraTag::getGroundSpeed()const
+{
+   return theGroundSpeed;
+}
+
+void ossimNitfSensraTag::setGroundSpeed(ossimString groundSpeed)
+{
+   memset(theGroundSpeed, ' ', GROUND_SPEED_SIZE);
+   memcpy(theGroundSpeed, groundSpeed.c_str(), std::min((size_t)GROUND_SPEED_SIZE, groundSpeed.length()));
+}
+
+ossimString ossimNitfSensraTag::getGroundSpdUnit()const
+{
+   return theGroundSpdUnit;
+}
+
+void ossimNitfSensraTag::setGroundSpdUnit(ossimString groundSpdUnit)
+{
+   memset(theGroundSpdUnit, ' ', GROUND_SPD_UNIT_SIZE);
+   memcpy(theGroundSpdUnit, groundSpdUnit.c_str(), std::min((size_t)GROUND_SPD_UNIT_SIZE, groundSpdUnit.length()));
+}
+
+ossimString ossimNitfSensraTag::getGroundTrack()const
+{
+   return theGroundTrack;
+}
+
+void ossimNitfSensraTag::setGroundTrack(ossimString groundTrack)
+{
+   memset(theGroundTrack, ' ', GROUND_TRACK_SIZE);
+   memcpy(theGroundTrack, groundTrack.c_str(), std::min((size_t)GROUND_TRACK_SIZE, groundTrack.length()));
+}
+
+ossimString ossimNitfSensraTag::getVerticalVel()const
+{
+   return theVerticalVel;
+}
+
+void ossimNitfSensraTag::setVerticalVel(ossimString verticalVel)
+{
+   memset(theVerticalVel, ' ', VERTICAL_VEL_SIZE);
+   memcpy(theVerticalVel, verticalVel.c_str(), std::min((size_t)VERTICAL_VEL_SIZE, verticalVel.length()));
+}
+
+ossimString ossimNitfSensraTag::getVertVelUnit()const
+{
+   return theVertVelUnit;
+}
+
+void ossimNitfSensraTag::setVertVelUnit(ossimString vertVelUnit)
+{
+   memset(theVertVelUnit, ' ', VERT_VEL_UNIT_SIZE);
+   memcpy(theVertVelUnit, vertVelUnit.c_str(), std::min((size_t)VERT_VEL_UNIT_SIZE, vertVelUnit.length()));
+}
+
+ossimString ossimNitfSensraTag::getSwathFrames()const
+{
+   return theSwathFrames;
+}
+
+void ossimNitfSensraTag::setSwathFrames(ossimString swathFrames)
+{
+   memset(theSwathFrames, ' ', SWATH_FRAMES_SIZE);
+   memcpy(theSwathFrames, swathFrames.c_str(), std::min((size_t)SWATH_FRAMES_SIZE, swathFrames.length()));
+}
+
+ossimString ossimNitfSensraTag::getNSwaths()const
+{
+   return theNSwaths;
+}
+
+void ossimNitfSensraTag::setNSwaths(ossimString nSwaths)
+{
+   memset(theNSwaths, ' ', N_SWATHS_SIZE);
+   memcpy(theNSwaths, nSwaths.c_str(), std::min((size_t)N_SWATHS_SIZE, nSwaths.length()));
+}
+
+ossimString ossimNitfSensraTag::getSpotNum()const
+{
+   return theSpotNum;
+}
+
+void ossimNitfSensraTag::setSpotNum(ossimString spotNum)
+{
+   memset(theSpotNum, ' ', SPOT_NUM_SIZE);
+   memcpy(theSpotNum, spotNum.c_str(), std::min((size_t)SPOT_NUM_SIZE, spotNum.length()));
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfStdidcTag.cpp b/ossim/src/ossim/support_data/ossimNitfStdidcTag.cpp
new file mode 100644
index 0000000..91cbe7e
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfStdidcTag.cpp
@@ -0,0 +1,469 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author:  Walt Bunch
+// 
+// Description:   NITF support data class for STDIDC - Standard ID extension.
+//
+// See:  STDI-000_v2.1 Table 7-3 for detailed description.
+// 
+//********************************************************************
+// $Id: ossimNitfStdidcTag.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <iostream>
+#include <iomanip>
+#include <ossim/support_data/ossimNitfStdidcTag.h>
+#include <ossim/base/ossimStringProperty.h>
+
+RTTI_DEF1(ossimNitfStdidcTag, "ossimNitfStdidcTag", ossimNitfRegisteredTag);
+static const ossimString ACQDATE_KW = "ACQDATE";
+static const ossimString MISSION_KW = "MISSION";
+static const ossimString PASS_KW = "PASS";
+static const ossimString OPNUM_KW = "OPNUM";
+static const ossimString STARTSEGMENT_KW = "STARTSEGMENT";
+static const ossimString REPRONUM_KW = "REPRONUM";
+static const ossimString REPLAYREGEN_KW = "REPLAYREGEN";
+static const ossimString BLANKFILL_KW = "BLANKFILL";
+static const ossimString STARTCOLUMN_KW = "STARTCOLUMN";
+static const ossimString STARTROW_KW = "STARTROW";
+static const ossimString ENDSEGMENT_KW = "ENDSEGMENT";
+static const ossimString ENDCOLUMN_KW = "ENDCOLUMN";
+static const ossimString ENDROW_KW = "ENDROW";
+static const ossimString COUNTRY_KW = "COUNTRY";
+static const ossimString WAC_KW = "WAC";
+static const ossimString LOCATION_KW = "LOCATION";
+
+
+ossimNitfStdidcTag::ossimNitfStdidcTag()
+   : ossimNitfRegisteredTag(std::string("STDIDC"), 89)
+{
+   clearFields();
+}
+
+ossimNitfStdidcTag::~ossimNitfStdidcTag()
+{
+}
+
+void ossimNitfStdidcTag::parseStream(std::istream& in)
+{
+   clearFields();
+   
+   in.read(theAcqDate,      ACQ_DATE_SIZE);
+   in.read(theMission,      MISSION_SIZE);
+   in.read(thePass,         PASS_SIZE);
+   in.read(theOpNum,        OP_NUM_SIZE);
+   in.read(theStartSegment, START_SEGMENT_SIZE);
+   in.read(theReproNum,     REPRO_NUM_SIZE);
+   in.read(theReplayRegen,  REPLAY_REGEN_SIZE);
+   in.read(theBlankFill,    BLANK_FILL_SIZE);
+   in.read(theStartColumn,  START_COLUMN_SIZE);
+   in.read(theStartRow,     START_ROW_SIZE);
+   in.read(theEndSegment,   END_SEGMENT_SIZE);
+   in.read(theEndColumn,    END_COLUMN_SIZE);
+   in.read(theEndRow,       END_ROW_SIZE);
+   in.read(theCountry,      COUNTRY_SIZE);
+   in.read(theWac,          WAC_SIZE);
+   in.read(theLocation,     LOCATION_SIZE);
+   in.read(theField17,      FIELD17_SIZE);
+   in.read(theField18,      FIELD18_SIZE);
+}
+
+void ossimNitfStdidcTag::writeStream(std::ostream& out)
+{
+   out.write(theAcqDate,      ACQ_DATE_SIZE);
+   out.write(theMission,      MISSION_SIZE);
+   out.write(thePass,         PASS_SIZE);
+   out.write(theOpNum,        OP_NUM_SIZE);
+   out.write(theStartSegment, START_SEGMENT_SIZE);
+   out.write(theReproNum,     REPRO_NUM_SIZE);
+   out.write(theReplayRegen,  REPLAY_REGEN_SIZE);
+   out.write(theBlankFill,    BLANK_FILL_SIZE);
+   out.write(theStartColumn,  START_COLUMN_SIZE);
+   out.write(theStartRow,     START_ROW_SIZE);
+   out.write(theEndSegment,   END_SEGMENT_SIZE);
+   out.write(theEndColumn,    END_COLUMN_SIZE);
+   out.write(theEndRow,       END_ROW_SIZE);
+   out.write(theCountry,      COUNTRY_SIZE);
+   out.write(theWac,          WAC_SIZE);
+   out.write(theLocation,     LOCATION_SIZE);
+   out.write(theField17,      FIELD17_SIZE);
+   out.write(theField18,      FIELD18_SIZE);
+}
+
+void ossimNitfStdidcTag::clearFields()
+{
+   memset(theAcqDate,      ' ', ACQ_DATE_SIZE);
+   memset(theMission,      ' ', MISSION_SIZE);
+   memset(thePass,         ' ', PASS_SIZE);
+   memset(theOpNum,        ' ', OP_NUM_SIZE);
+   memset(theStartSegment, ' ', START_SEGMENT_SIZE);
+   memset(theReproNum,     ' ', REPRO_NUM_SIZE);
+   memset(theReplayRegen,  ' ', REPLAY_REGEN_SIZE);
+   memset(theBlankFill,    ' ', BLANK_FILL_SIZE);
+   memset(theStartColumn,  ' ', START_COLUMN_SIZE);
+   memset(theStartRow,     ' ', START_ROW_SIZE);
+   memset(theEndSegment,   ' ', END_SEGMENT_SIZE);
+   memset(theEndColumn,    ' ', END_COLUMN_SIZE);
+   memset(theEndRow,       ' ', END_ROW_SIZE);
+   memset(theCountry,      ' ', COUNTRY_SIZE);
+   memset(theWac,          ' ', WAC_SIZE);
+   memset(theLocation,     ' ', LOCATION_SIZE);
+   memset(theField17,      ' ', FIELD17_SIZE);
+   memset(theField18,      ' ', FIELD18_SIZE);
+
+   theAcqDate[ACQ_DATE_SIZE]           = '\0';
+   theMission[MISSION_SIZE]            = '\0';
+   thePass[PASS_SIZE]                  = '\0';
+   theOpNum[OP_NUM_SIZE]               = '\0';
+   theStartSegment[START_SEGMENT_SIZE] = '\0';
+   theReproNum[REPRO_NUM_SIZE]         = '\0';
+   theReplayRegen[REPLAY_REGEN_SIZE]   = '\0';
+   theBlankFill[BLANK_FILL_SIZE]       = '\0';
+   theStartColumn[START_COLUMN_SIZE]   = '\0';
+   theStartRow[START_ROW_SIZE]         = '\0';
+   theEndSegment[END_SEGMENT_SIZE]     = '\0';
+   theEndColumn[END_COLUMN_SIZE]       = '\0';
+   theEndRow[END_ROW_SIZE]             = '\0';
+   theCountry[COUNTRY_SIZE]            = '\0';
+   theWac[WAC_SIZE]                    = '\0';
+   theLocation[LOCATION_SIZE]          = '\0';
+   theField17[FIELD17_SIZE]            = '\0';
+   theField18[FIELD18_SIZE]            = '\0';
+}
+
+ossimString ossimNitfStdidcTag::getAcqDate()const
+{
+  return ossimString(theAcqDate);
+}
+
+void ossimNitfStdidcTag::setAcqDate(ossimString acqDate)
+{
+   memset(theAcqDate, ' ', ACQ_DATE_SIZE);
+   memcpy(theAcqDate, acqDate.c_str(), std::min((size_t)ACQ_DATE_SIZE, acqDate.length()));
+}
+
+ossimString ossimNitfStdidcTag::getMission()const
+{
+  return ossimString(theMission);
+}
+
+void ossimNitfStdidcTag::setMission(ossimString mission)
+{
+   memset(theMission, ' ', MISSION_SIZE);
+   memcpy(theMission, mission.c_str(), std::min((size_t)MISSION_SIZE, mission.length()));
+}
+
+ossimString ossimNitfStdidcTag::getPass()const
+{
+  return ossimString(thePass);
+}
+
+void ossimNitfStdidcTag::setPass(ossimString pass)
+{
+   memset(thePass, ' ', PASS_SIZE);
+   memcpy(thePass, pass.c_str(), std::min((size_t)PASS_SIZE, pass.length()));
+}
+
+ossimString ossimNitfStdidcTag::getOpNum()const
+{
+  return ossimString(theOpNum);
+}
+
+void ossimNitfStdidcTag::setOpNum(ossimString opNum) 
+{
+   memset(theOpNum, ' ', OP_NUM_SIZE);
+   memcpy(theOpNum, opNum.c_str(), std::min((size_t)OP_NUM_SIZE, opNum.length()));
+}
+
+ossimString ossimNitfStdidcTag::getStartSegment()const
+{
+  return ossimString(theStartSegment);
+}
+
+void ossimNitfStdidcTag::setStartSegment(ossimString startSegment) 
+{
+   memset(theStartSegment, ' ', START_SEGMENT_SIZE);
+   memcpy(theStartSegment, startSegment.c_str(), std::min((size_t)START_SEGMENT_SIZE, startSegment.length()));
+}
+
+ossimString ossimNitfStdidcTag::getReproNum()const
+{
+  return ossimString(theReproNum);
+}
+
+void ossimNitfStdidcTag::setReproNum(ossimString reproNum) 
+{
+   memset(theReproNum, ' ', REPRO_NUM_SIZE);
+   memcpy(theReproNum, reproNum.c_str(), std::min((size_t)REPRO_NUM_SIZE, reproNum.length()));
+}
+
+ossimString ossimNitfStdidcTag::getReplayRegen()const
+{
+  return ossimString(theReplayRegen);
+}
+
+void ossimNitfStdidcTag::setReplayRegen(ossimString replayRegen) 
+{
+   memset(theReplayRegen, ' ', REPLAY_REGEN_SIZE);
+   memcpy(theReplayRegen, replayRegen.c_str(), std::min((size_t)REPLAY_REGEN_SIZE, replayRegen.length()));
+}
+
+ossimString ossimNitfStdidcTag::getBlankFill()const
+{
+  return ossimString(theBlankFill);
+}
+
+void ossimNitfStdidcTag::setBlankFill(ossimString blankFill) 
+{
+   memset(theBlankFill, ' ', BLANK_FILL_SIZE);
+   memcpy(theBlankFill, blankFill.c_str(), std::min((size_t)BLANK_FILL_SIZE, blankFill.length()));
+}
+
+ossimString ossimNitfStdidcTag::getStartColumn()const
+{
+  return ossimString(theStartColumn);
+}
+
+void ossimNitfStdidcTag::setStartColumn(ossimString startColumn) 
+{
+   memset(theStartColumn, ' ', START_COLUMN_SIZE);
+   memcpy(theStartColumn, startColumn.c_str(), std::min((size_t)START_COLUMN_SIZE, startColumn.length()));
+}
+
+ossimString ossimNitfStdidcTag::getStartRow()const
+{
+  return ossimString(theStartRow);
+}
+
+void ossimNitfStdidcTag::setStartRow(ossimString startRow) 
+{
+   memset(theStartRow, ' ', START_ROW_SIZE);
+   memcpy(theStartRow, startRow.c_str(), std::min((size_t)START_ROW_SIZE, startRow.length()));
+}
+
+ossimString ossimNitfStdidcTag::getEndSegment()const
+{
+  return ossimString(theEndSegment);
+}
+
+void ossimNitfStdidcTag::setEndSegment(ossimString endSegment) 
+{
+   memset(theEndSegment, ' ', END_SEGMENT_SIZE);
+   memcpy(theEndSegment, endSegment.c_str(), std::min((size_t)END_SEGMENT_SIZE, endSegment.length()));
+}
+
+ossimString ossimNitfStdidcTag::getEndColumn()const
+{
+  return ossimString(theEndColumn);
+}
+
+void ossimNitfStdidcTag::setEndColumn(ossimString endColumn) 
+{
+   memset(theEndColumn, ' ', END_COLUMN_SIZE);
+   memcpy(theEndColumn, endColumn.c_str(), std::min((size_t)END_COLUMN_SIZE, endColumn.length()));
+}
+
+ossimString ossimNitfStdidcTag::getEndRow()const
+{
+  return ossimString(theEndRow);
+}
+
+void ossimNitfStdidcTag::setEndRow(ossimString endRow) 
+{
+   memset(theEndRow, ' ', END_ROW_SIZE);
+   memcpy(theEndRow, endRow.c_str(), std::min((size_t)END_ROW_SIZE, endRow.length()));
+}
+
+ossimString ossimNitfStdidcTag::getCountry()const
+{
+  return ossimString(theCountry);
+}
+
+void ossimNitfStdidcTag::setCountry(ossimString country) 
+{
+   memset(theCountry, ' ', COUNTRY_SIZE);
+   memcpy(theCountry, country.c_str(), std::min((size_t)COUNTRY_SIZE, country.length()));
+}
+
+ossimString ossimNitfStdidcTag::getWac()const
+{
+  return ossimString(theWac);
+}
+
+void ossimNitfStdidcTag::setWac(ossimString wac) 
+{
+   memset(theWac, ' ', WAC_SIZE);
+   memcpy(theWac, wac.c_str(), std::min((size_t)WAC_SIZE, wac.length()));
+}
+
+ossimString ossimNitfStdidcTag::getLocation()const
+{
+  return ossimString(theLocation);
+}
+
+void ossimNitfStdidcTag::setLocation(ossimString location) 
+{
+   memset(theLocation, ' ', LOCATION_SIZE);
+   memcpy(theLocation, location.c_str(), std::min((size_t)LOCATION_SIZE, location.length()));
+}
+
+ossimString ossimNitfStdidcTag::getField17()const
+{
+  return ossimString(theField17);
+}
+
+void ossimNitfStdidcTag::setField17(ossimString field17) 
+{
+   memset(theField17, ' ', FIELD17_SIZE);
+   memcpy(theField17, field17.c_str(), std::min((size_t)FIELD17_SIZE, field17.length()));
+}
+
+ossimString ossimNitfStdidcTag::getField18()const
+{
+  return ossimString(theField18);
+}
+
+void ossimNitfStdidcTag::setField18(ossimString field18) 
+{
+   memset(theField18, ' ', FIELD18_SIZE);
+   memcpy(theField18, field18.c_str(), std::min((size_t)FIELD18_SIZE, field18.length()));
+}
+
+std::ostream& ossimNitfStdidcTag::print(std::ostream& out,
+                                        const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+   
+   out << setiosflags(std::ios::left)
+       << pfx << std::setw(24) << "CETAG:"
+       << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
+       << pfx << std::setw(24) << "ACQDATE:"      << theAcqDate << "\n"
+       << pfx << std::setw(24) << "MISSION:"      << theMission << "\n"
+       << pfx << std::setw(24) << "PASS:"         << thePass << "\n"
+       << pfx << std::setw(24) << "OPNUM:"        << theOpNum  << "\n"
+       << pfx << std::setw(24) << "STARTSEGMENT:" << theStartSegment << "\n"
+       << pfx << std::setw(24) << "REPRONUM:"     << theReproNum << "\n"
+       << pfx << std::setw(24) << "REPLAYREGEN:"  << theReplayRegen << "\n"
+       << pfx << std::setw(24) << "STARTCOLUMN:"  << theStartColumn << "\n"
+       << pfx << std::setw(24) << "STARTROW:"     << theStartRow << "\n"
+       << pfx << std::setw(24) << "ENDSEGMENT:"   << theEndSegment << "\n"
+       << pfx << std::setw(24) << "ENDCOLUMN:"    << theEndColumn << "\n"
+       << pfx << std::setw(24) << "ENDROW:"       << theEndRow << "\n"
+       << pfx << std::setw(24) << "COUNTRY:"      << theCountry << "\n"
+       << pfx << std::setw(24) << "WAC:"          << theWac << "\n"
+       << pfx << std::setw(24) << "LOCATION:"     << theLocation << "\n";
+
+   return out;
+}
+
+void ossimNitfStdidcTag::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   ossimNitfRegisteredTag::setProperty(property);
+}
+
+ossimRefPtr<ossimProperty> ossimNitfStdidcTag::getProperty(const ossimString& name)const
+{
+   ossimProperty* result = 0;
+   
+   if(name == ACQDATE_KW)
+   {
+      result = new ossimStringProperty(name, theAcqDate);
+   }
+   else if(name == MISSION_KW)
+   {
+      result = new ossimStringProperty(name, theMission);
+   }
+   else if(name == PASS_KW)
+   {
+      result = new ossimStringProperty(name, thePass);
+   }
+   else if(name == OPNUM_KW)
+   {
+      result = new ossimStringProperty(name, theOpNum);
+   }
+   else if(name == STARTSEGMENT_KW)
+   {
+      result = new ossimStringProperty(name, theStartSegment);
+   }
+   else if(name == REPRONUM_KW)
+   {
+      result = new ossimStringProperty(name, theReproNum);
+   }
+   else if(name == REPLAYREGEN_KW)
+   {
+      result = new ossimStringProperty(name, theReplayRegen);
+   }
+   else if(name == BLANKFILL_KW)
+   {
+      result = new ossimStringProperty(name, theBlankFill);
+   }
+   else if(name == STARTCOLUMN_KW)
+   {
+      result = new ossimStringProperty(name, theStartColumn);
+   }
+   else if(name == STARTROW_KW)
+   {
+      result = new ossimStringProperty(name, theStartRow);
+   }
+   else if(name == ENDSEGMENT_KW)
+   {
+      result = new ossimStringProperty(name, theEndSegment);
+   }
+   else if(name == ENDCOLUMN_KW)
+   {
+      result = new ossimStringProperty(name, theEndColumn);
+   }
+   else if(name == ENDROW_KW)
+   {
+      result = new ossimStringProperty(name, theEndRow);
+   }
+   else if(name == COUNTRY_KW)
+   {
+      result = new ossimStringProperty(name,theCountry );
+   }
+   else if(name == WAC_KW)
+   {
+      result = new ossimStringProperty(name, theWac);
+   }
+   else if(name == LOCATION_KW)
+   {
+      result = new ossimStringProperty(name, theLocation);
+   }
+   else
+   {
+      return ossimNitfRegisteredTag::getProperty(name);
+   }
+
+   return result;
+}
+
+void ossimNitfStdidcTag::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimNitfRegisteredTag::getPropertyNames(propertyNames);
+
+   propertyNames.push_back(ACQDATE_KW);
+   propertyNames.push_back(MISSION_KW);
+   propertyNames.push_back(PASS_KW);
+   propertyNames.push_back(OPNUM_KW);
+   propertyNames.push_back(STARTSEGMENT_KW);
+   propertyNames.push_back(REPRONUM_KW);
+   propertyNames.push_back(REPLAYREGEN_KW);
+   propertyNames.push_back(BLANKFILL_KW);
+   propertyNames.push_back(STARTCOLUMN_KW);
+   propertyNames.push_back(STARTROW_KW);
+   propertyNames.push_back(ENDSEGMENT_KW);
+   propertyNames.push_back(ENDCOLUMN_KW);
+   propertyNames.push_back(ENDROW_KW);
+   propertyNames.push_back(COUNTRY_KW);
+   propertyNames.push_back(WAC_KW);
+   propertyNames.push_back(LOCATION_KW);
+   
+}
+
+
diff --git a/src/ossim/support_data/ossimNitfSymbolHeader.cpp b/ossim/src/ossim/support_data/ossimNitfSymbolHeader.cpp
similarity index 100%
rename from src/ossim/support_data/ossimNitfSymbolHeader.cpp
rename to ossim/src/ossim/support_data/ossimNitfSymbolHeader.cpp
diff --git a/src/ossim/support_data/ossimNitfSymbolHeaderV2_0.cpp b/ossim/src/ossim/support_data/ossimNitfSymbolHeaderV2_0.cpp
similarity index 100%
rename from src/ossim/support_data/ossimNitfSymbolHeaderV2_0.cpp
rename to ossim/src/ossim/support_data/ossimNitfSymbolHeaderV2_0.cpp
diff --git a/src/ossim/support_data/ossimNitfTagFactory.cpp b/ossim/src/ossim/support_data/ossimNitfTagFactory.cpp
similarity index 100%
rename from src/ossim/support_data/ossimNitfTagFactory.cpp
rename to ossim/src/ossim/support_data/ossimNitfTagFactory.cpp
diff --git a/ossim/src/ossim/support_data/ossimNitfTagFactoryRegistry.cpp b/ossim/src/ossim/support_data/ossimNitfTagFactoryRegistry.cpp
new file mode 100644
index 0000000..521bc3b
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfTagFactoryRegistry.cpp
@@ -0,0 +1,101 @@
+//*******************************************************************
+//
+// LICENSE: See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+// 
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfTagFactoryRegistry.cpp 22875 2014-08-27 13:52:03Z dburken $
+
+#include <ossim/support_data/ossimNitfTagFactoryRegistry.h>
+#include <ossim/support_data/ossimNitfRpfTagFactory.h>
+#include <ossim/support_data/ossimNitfRegisteredTagFactory.h>
+#include <ossim/support_data/ossimNitfUnknownTag.h>
+
+#include <algorithm> /* for std::find */
+
+ossimNitfTagFactoryRegistry::ossimNitfTagFactoryRegistry()
+{
+   initializeDefaults();
+}
+
+ossimNitfTagFactoryRegistry::~ossimNitfTagFactoryRegistry()
+{
+}
+
+void ossimNitfTagFactoryRegistry::registerFactory(ossimNitfTagFactory* aFactory)
+{
+   if(aFactory&&!exists(aFactory))
+   {
+      theFactoryList.push_back(aFactory);
+   }
+}
+
+void ossimNitfTagFactoryRegistry::unregisterFactory
+(ossimNitfTagFactory* aFactory)
+{
+   std::vector<ossimNitfTagFactory*>::iterator iter =
+      std::find(theFactoryList.begin(),
+                theFactoryList.end(),
+                aFactory);
+   if(iter != theFactoryList.end())
+   {
+      theFactoryList.erase(iter);
+   }
+}
+
+ossimNitfTagFactoryRegistry* ossimNitfTagFactoryRegistry::instance()
+{
+   static ossimNitfTagFactoryRegistry inst;
+   return &inst;
+}
+
+ossimRefPtr<ossimNitfRegisteredTag> ossimNitfTagFactoryRegistry::create(const ossimString &tagName)const
+{
+   std::vector<ossimNitfTagFactory*>::const_iterator factory;
+   ossimRefPtr<ossimNitfRegisteredTag> result = 0;
+
+   factory = theFactoryList.begin();
+   while(factory != theFactoryList.end())
+   {
+      result = (*factory)->create(tagName);
+
+      if(result.valid())
+      {
+         return result;
+      }
+      ++factory;
+   }
+
+   ossimRefPtr<ossimNitfRegisteredTag> tag = new ossimNitfUnknownTag;
+   return tag;
+}
+
+void ossimNitfTagFactoryRegistry::initializeDefaults()
+{
+   theFactoryList.push_back(ossimNitfRegisteredTagFactory::instance());
+   theFactoryList.push_back(ossimNitfRpfTagFactory::instance());
+}
+
+bool ossimNitfTagFactoryRegistry::exists(ossimNitfTagFactory* factory)const
+{
+   std::vector<ossimNitfTagFactory*>::const_iterator iter = std::find(theFactoryList.begin(),
+                                                                      theFactoryList.end(),
+                                                                      factory);
+
+   return (iter != theFactoryList.end());
+   
+}
+
+ossimNitfTagFactoryRegistry::ossimNitfTagFactoryRegistry(
+   const ossimNitfTagFactoryRegistry&)
+{
+}
+
+const ossimNitfTagFactoryRegistry& ossimNitfTagFactoryRegistry::operator=(
+   const ossimNitfTagFactoryRegistry&)
+{
+   return *this;
+}
diff --git a/ossim/src/ossim/support_data/ossimNitfTagInformation.cpp b/ossim/src/ossim/support_data/ossimNitfTagInformation.cpp
new file mode 100644
index 0000000..b606de6
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfTagInformation.cpp
@@ -0,0 +1,209 @@
+//*******************************************************************
+//
+// LICENSE: MIT  see top level LICENSE.txt
+//
+// Author: Garrett Potts
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfTagInformation.cpp 23666 2015-12-14 20:01:22Z rashadkm $
+
+#include <ossim/support_data/ossimNitfTagInformation.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/support_data/ossimNitfTagFactoryRegistry.h>
+#include <ossim/support_data/ossimNitfUnknownTag.h>
+#include <sstream>
+#include <iomanip>
+#include <cstring> // for memset
+
+ossimNitfTagInformation::ossimNitfTagInformation(ossimRefPtr<ossimNitfRegisteredTag> tagData)
+{
+   clearFields();
+   setTagData(tagData);
+}
+
+ossimNitfTagInformation::~ossimNitfTagInformation()
+{
+}
+
+void ossimNitfTagInformation::parseStream(std::istream &in)
+{
+   if(in)
+   {
+      clearFields();
+      theTagOffset = in.tellg();
+      in.read(theTagName, 6);
+      in.read(theTagLength, 5);
+      theTagDataOffset = in.tellg();
+
+      theTagData = ossimNitfTagFactoryRegistry::instance()->create(getTagName());
+
+      if (theTagData.valid())
+      {
+         if (theTagData->getClassName() == "ossimNitfUnknownTag")
+         {
+            // Unknown tag doesn't know his tag name yet.
+            theTagData->setTagName( getTagName() );
+         }
+
+         //---
+         // Tags with dynamic tag length construct with 0 length.
+         // Set if 0.
+         //---
+         if ( theTagData->getTagLength() == 0 )
+         {
+            theTagData->setTagLength( getTagLength() );
+         }
+         // Sanity check fixed length in code with length from CEL field:
+         else if ( theTagData->getTagLength() != getTagLength() )
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimNitfTagInformation::parseStream WARNING!"
+               << "\nCEL field length does not match fixed tag length for tag: "
+               << theTagData->getTagName().c_str()
+               << "\nCEL: " << getTagLength()
+               << "\nTag: " << theTagData->getTagLength()
+               << std::endl;
+         }
+                               
+         theTagData->parseStream(in);
+      }
+      else
+      {
+         theTagData = (ossimNitfRegisteredTag*)NULL;
+      }
+   }
+}
+
+void ossimNitfTagInformation::writeStream(std::ostream &out)
+{
+   theTagOffset = out.tellp(); // Capture the offset.
+   out.write(theTagName, 6);
+   out.write(theTagLength, 5);
+   if(theTagData.valid())
+   {
+      theTagDataOffset = out.tellp();
+      theTagData->writeStream(out);
+   }
+}
+
+ossim_uint32 ossimNitfTagInformation::getTotalTagLength()const
+{
+   return (getTagLength() + (ossim_uint32)11);
+}
+
+ossim_uint32 ossimNitfTagInformation::getTagLength()const
+{
+   return ossimString(theTagLength).toUInt32();
+}
+
+ossim_uint64 ossimNitfTagInformation::getTagOffset()const
+{
+   return theTagOffset;
+}
+
+ossim_uint64 ossimNitfTagInformation::getTagDataOffset()const
+{
+   return theTagDataOffset;
+}
+
+ossimString ossimNitfTagInformation::getTagName()const
+{
+   return ossimString(theTagName).trim();
+}
+
+std::ostream& ossimNitfTagInformation::print(std::ostream& out)const
+{
+   out << "theTagName:       " << theTagName
+       << "\ntheTagLength:     " << theTagLength
+       << "\ntheTagType:       " << theTagType
+       << "\ntheTagOffset:     " << theTagOffset
+       << "\ntheTagDataOffset: " << theTagDataOffset
+       << std::endl;
+
+   return out;
+}
+
+void ossimNitfTagInformation::clearFields()
+{
+   memset(theTagName, ' ', 6);
+   memset(theTagLength, 0, 5);
+   strcpy(theTagType, "IXSHD ");
+
+   theTagName[6]    = '\0';
+   theTagLength[5]  = '\0';
+   
+   theTagOffset     = 0;
+   theTagDataOffset = 0;
+}
+
+void ossimNitfTagInformation::setTagName(const ossimString& tagName)
+{
+   memset(theTagName, ' ', 6);
+
+   std::ostringstream out;
+
+   out << std::setw(6)
+       << std::setfill(' ')
+       << tagName;
+   memcpy(theTagName, out.str().c_str(), 6);
+}
+
+void ossimNitfTagInformation::setTagLength(ossim_uint32 tagLength)
+{
+   memset(theTagLength, 0, 5);
+   
+   if(tagLength > 99999)
+   {
+      tagLength = 99999;
+   }
+
+   std::ostringstream out;
+
+   out << std::setw(5)
+       << std::setfill('0')
+       << tagLength;
+   
+   memcpy(theTagLength, out.str().c_str(), 5);
+}
+
+ossimRefPtr<ossimNitfRegisteredTag> ossimNitfTagInformation::getTagData()
+{
+   return theTagData;
+}
+
+const ossimRefPtr<ossimNitfRegisteredTag> ossimNitfTagInformation::getTagData()const
+{
+   return theTagData;
+}
+
+void ossimNitfTagInformation::setTagData(ossimRefPtr<ossimNitfRegisteredTag> tagData)
+{
+   theTagData = tagData;
+
+   memset(theTagName, ' ', 6);
+   memset(theTagLength, ' ', 5);
+   
+   if(theTagData.valid())
+   {
+      setTagName(theTagData->getRegisterTagName());
+      setTagLength(theTagData->getSizeInBytes());
+   }
+}
+ossimString ossimNitfTagInformation::getTagType() const
+{
+   return ossimString(theTagType).trim();
+}
+
+void ossimNitfTagInformation::setTagType(const ossimString& tagType) const
+{
+   std::ostringstream out;
+   out << std::setw(6)
+       << std::setfill(' ')
+       << std::setiosflags(std::ios::left)
+       << tagType;
+   memcpy(theTagType, out.str().c_str(), 6);
+   theTagType[6] = 0;
+}
+
diff --git a/src/ossim/support_data/ossimNitfTextHeader.cpp b/ossim/src/ossim/support_data/ossimNitfTextHeader.cpp
similarity index 100%
rename from src/ossim/support_data/ossimNitfTextHeader.cpp
rename to ossim/src/ossim/support_data/ossimNitfTextHeader.cpp
diff --git a/src/ossim/support_data/ossimNitfTextHeaderV2_0.cpp b/ossim/src/ossim/support_data/ossimNitfTextHeaderV2_0.cpp
similarity index 100%
rename from src/ossim/support_data/ossimNitfTextHeaderV2_0.cpp
rename to ossim/src/ossim/support_data/ossimNitfTextHeaderV2_0.cpp
diff --git a/src/ossim/support_data/ossimNitfTextHeaderV2_1.cpp b/ossim/src/ossim/support_data/ossimNitfTextHeaderV2_1.cpp
similarity index 100%
rename from src/ossim/support_data/ossimNitfTextHeaderV2_1.cpp
rename to ossim/src/ossim/support_data/ossimNitfTextHeaderV2_1.cpp
diff --git a/ossim/src/ossim/support_data/ossimNitfUnknownTag.cpp b/ossim/src/ossim/support_data/ossimNitfUnknownTag.cpp
new file mode 100644
index 0000000..a20099e
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfUnknownTag.cpp
@@ -0,0 +1,126 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Unknown tag class declaration.
+//
+// Note: By "unknown" this means that the tag name was not found in any of
+// the tag factories.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimNitfUnknownTag.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ostream>
+#include <iomanip>
+#include <cctype> /* for isascii */
+
+#include <ossim/support_data/ossimNitfUnknownTag.h>
+#include <ossim/support_data/ossimNitfCommon.h>
+
+RTTI_DEF1(ossimNitfUnknownTag, "ossimNitfUnknownTag", ossimNitfRegisteredTag);
+
+ossimNitfUnknownTag::ossimNitfUnknownTag()
+   : m_tagData(0)
+{
+}
+
+ossimNitfUnknownTag::~ossimNitfUnknownTag()
+{
+   if (m_tagData)
+   {
+      delete [] m_tagData;
+      m_tagData = 0;
+   }
+}
+
+void ossimNitfUnknownTag::parseStream(std::istream& in)
+{
+   if (m_tagLength)
+   {
+      if (m_tagData)
+      {
+         delete [] m_tagData;
+      }
+
+      m_tagData = new char[m_tagLength+1];
+      
+      in.read(m_tagData, m_tagLength);
+
+      m_tagData[m_tagLength] = '\0';
+   }
+}
+
+void ossimNitfUnknownTag::writeStream(std::ostream& out)
+{
+   if (m_tagLength && m_tagData)
+   {
+      out.write(m_tagData, m_tagLength);
+   }
+}
+
+void ossimNitfUnknownTag::clearFields()
+{
+   if (m_tagData)
+   {
+      delete [] m_tagData;
+      m_tagData = 0;
+   }
+}
+
+std::ostream& ossimNitfUnknownTag::print(std::ostream& out,
+                                         const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+
+   out << setiosflags(std::ios::left)
+       << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
+       << pfx << std::setw(24) << "unformatted_tag_data: ";
+   
+   if (tagDataIsAscii())
+   {
+      out << m_tagData << "\n";
+   }
+   else
+   {
+      out << "binary not displayed\n";
+   }
+   
+   return out;
+}
+
+void ossimNitfUnknownTag::setTagLength(ossim_uint32 length)
+{
+   if (m_tagData)
+   {
+      delete [] m_tagData;
+      m_tagData = 0;
+   }
+   m_tagLength = length;
+}
+
+bool ossimNitfUnknownTag::tagDataIsAscii() const
+{
+   if ( (m_tagLength == 0) || !m_tagData )
+   {
+      return false;
+   }
+
+   for (ossim_uint32 i = 0; i < m_tagLength; ++i)
+   {
+      int c = m_tagData[i];
+      if (isascii(c) == false)
+      {
+         return false;
+      }
+   }
+
+   return true;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfUse00aTag.cpp b/ossim/src/ossim/support_data/ossimNitfUse00aTag.cpp
new file mode 100644
index 0000000..caca609
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfUse00aTag.cpp
@@ -0,0 +1,540 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Walt Bunch
+//
+// Description: Nitf support class for USE00A -
+// Exploitation Usability extension.
+// 
+//********************************************************************
+// $Id: ossimNitfUse00aTag.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <iostream>
+#include <iomanip>
+#include <ossim/support_data/ossimNitfUse00aTag.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimCommon.h>
+
+RTTI_DEF1(ossimNitfUse00aTag, "ossimNitfUse00aTag", ossimNitfRegisteredTag);
+
+static const ossimString ANGLETONORTH_KW = "ANGLETONORTH";
+static const ossimString MEANGSD_KW = "MEANGSD";
+static const ossimString DYNAMICRANGE_KW = "DYNAMICRANGE";
+static const ossimString OBLANG_KW = "OBLANG";
+static const ossimString ROLLANG_KW = "ROLLANG";
+static const ossimString NREF_KW = "NREF";
+static const ossimString REVNUM_KW = "REVNUM";
+static const ossimString NSEG_KW = "NSEG";
+static const ossimString MAXLPSEG_KW = "MAXLPSEG";
+static const ossimString SUNEL_KW = "SUNEL";
+static const ossimString SUNAZ_KW = "SUNAZ";
+
+
+ossimNitfUse00aTag::ossimNitfUse00aTag()
+   : ossimNitfRegisteredTag(std::string("USE00A"), 107) 
+{
+   clearFields();
+}
+
+ossimNitfUse00aTag::~ossimNitfUse00aTag()
+{
+}
+
+void ossimNitfUse00aTag::parseStream(std::istream& in)
+{
+   clearFields();
+   
+   in.read(theAngleToNorth, ANGLE_TO_NORTH_SIZE);
+   in.read(theMeanGsd, MEAN_GSD_SIZE);
+   in.read(theField3, FIELD3_SIZE);
+   in.read(theDynamicRange, DYNAMIC_RANGE_SIZE);
+   in.read(theField5, FIELD5_SIZE);
+   in.read(theField6, FIELD6_SIZE);
+   in.read(theField7, FIELD7_SIZE);
+   in.read(theOblAng, OBL_ANG_SIZE);
+   in.read(theRollAng, ROLL_ANG_SIZE);
+   in.read(theField10, FIELD10_SIZE);
+   in.read(theField11, FIELD11_SIZE);
+   in.read(theField12, FIELD12_SIZE);
+   in.read(theField13, FIELD13_SIZE);
+   in.read(theField14, FIELD14_SIZE);
+   in.read(theField15, FIELD15_SIZE);
+   in.read(theField16, FIELD16_SIZE);
+   in.read(theNRef, N_REF_SIZE);
+   in.read(theRevNum, REV_NUM_SIZE);
+   in.read(theNSeg, N_SEG_SIZE);
+   in.read(theMaxLpSeg, MAX_LP_SEG_SIZE);
+   in.read(theField20, FIELD20_SIZE);
+   in.read(theField21, FIELD21_SIZE);
+   in.read(theSunEl, SUN_EL_SIZE);
+   in.read(theSunAz, SUN_AZ_SIZE);
+}
+
+void ossimNitfUse00aTag::writeStream(std::ostream& out)
+{
+   out.write(theAngleToNorth, ANGLE_TO_NORTH_SIZE);
+   out.write(theMeanGsd, MEAN_GSD_SIZE);
+   out.write(theField3, FIELD3_SIZE);
+   out.write(theDynamicRange, DYNAMIC_RANGE_SIZE);
+   out.write(theField5, FIELD5_SIZE);
+   out.write(theField6, FIELD6_SIZE);
+   out.write(theField7, FIELD7_SIZE);
+   out.write(theOblAng, OBL_ANG_SIZE);
+   out.write(theRollAng, ROLL_ANG_SIZE);
+   out.write(theField10, FIELD10_SIZE);
+   out.write(theField11, FIELD11_SIZE);
+   out.write(theField12, FIELD12_SIZE);
+   out.write(theField13, FIELD13_SIZE);
+   out.write(theField14, FIELD14_SIZE);
+   out.write(theField15, FIELD15_SIZE);
+   out.write(theField16, FIELD16_SIZE);
+   out.write(theNRef, N_REF_SIZE);
+   out.write(theRevNum, REV_NUM_SIZE);
+   out.write(theNSeg, N_SEG_SIZE);
+   out.write(theMaxLpSeg, MAX_LP_SEG_SIZE);
+   out.write(theField20, FIELD20_SIZE);
+   out.write(theField21, FIELD21_SIZE);
+   out.write(theSunEl, SUN_EL_SIZE);
+   out.write(theSunAz, SUN_AZ_SIZE);
+}
+
+void ossimNitfUse00aTag::clearFields()
+{
+   memset(theAngleToNorth, ' ', ANGLE_TO_NORTH_SIZE);
+   memset(theMeanGsd, ' ', MEAN_GSD_SIZE);
+   memset(theField3, ' ', FIELD3_SIZE);
+   memset(theDynamicRange, ' ', DYNAMIC_RANGE_SIZE);
+   memset(theField5, ' ', FIELD5_SIZE);
+   memset(theField6, ' ', FIELD6_SIZE);
+   memset(theField7, ' ', FIELD7_SIZE);
+   memset(theOblAng, ' ', OBL_ANG_SIZE);
+   memset(theRollAng, ' ', ROLL_ANG_SIZE);
+   memset(theField10, ' ', FIELD10_SIZE);
+   memset(theField11, ' ', FIELD11_SIZE);
+   memset(theField12, ' ', FIELD12_SIZE);
+   memset(theField13, ' ', FIELD13_SIZE);
+   memset(theField14, ' ', FIELD14_SIZE);
+   memset(theField15, ' ', FIELD15_SIZE);
+   memset(theField16, ' ', FIELD16_SIZE);
+   memset(theNRef, ' ', N_REF_SIZE);
+   memset(theRevNum, ' ', REV_NUM_SIZE);
+   memset(theNSeg, ' ', N_SEG_SIZE);
+   memset(theMaxLpSeg, ' ', MAX_LP_SEG_SIZE);
+   memset(theField20, ' ', FIELD20_SIZE);
+   memset(theField21, ' ', FIELD21_SIZE);
+   memset(theSunEl, ' ', SUN_EL_SIZE);
+   memset(theSunAz, ' ', SUN_AZ_SIZE);
+
+   theAngleToNorth[ANGLE_TO_NORTH_SIZE] = '\0';
+   theMeanGsd[MEAN_GSD_SIZE] = '\0';
+   theField3[FIELD3_SIZE] = '\0';
+   theDynamicRange[DYNAMIC_RANGE_SIZE] = '\0';
+   theField5[FIELD5_SIZE] = '\0';
+   theField6[FIELD6_SIZE] = '\0';
+   theField7[FIELD7_SIZE] = '\0';
+   theOblAng[OBL_ANG_SIZE] = '\0';
+   theRollAng[ROLL_ANG_SIZE] = '\0';
+   theField10[FIELD10_SIZE] = '\0';
+   theField11[FIELD11_SIZE] = '\0';
+   theField12[FIELD12_SIZE] = '\0';
+   theField13[FIELD13_SIZE] = '\0';
+   theField14[FIELD14_SIZE] = '\0';
+   theField15[FIELD15_SIZE] = '\0';
+   theField16[FIELD16_SIZE] = '\0';
+   theNRef[N_REF_SIZE] = '\0';
+   theRevNum[REV_NUM_SIZE] = '\0';
+   theNSeg[N_SEG_SIZE] = '\0';
+   theMaxLpSeg[MAX_LP_SEG_SIZE] = '\0';
+   theField20[FIELD20_SIZE] = '\0';
+   theField21[FIELD21_SIZE] = '\0';
+   theSunEl[SUN_EL_SIZE] = '\0';
+   theSunAz[SUN_AZ_SIZE] = '\0';
+}
+
+ossimString ossimNitfUse00aTag::getAngleToNorth()const
+{
+   return theAngleToNorth;
+}
+
+void ossimNitfUse00aTag::setAngleToNorth(const ossimString& angleToNorth)
+{
+   memset(theAngleToNorth, ' ', ANGLE_TO_NORTH_SIZE);
+   memcpy(theAngleToNorth, angleToNorth.c_str(), std::min((size_t)ANGLE_TO_NORTH_SIZE, angleToNorth.length()));
+}
+
+ossimString ossimNitfUse00aTag::getMeanGsd()const
+{
+   return theMeanGsd;
+}
+
+ossim_float64 ossimNitfUse00aTag::getMeanGsdInMeters() const
+{
+   ossim_float64 gsd = 0.0;
+   
+   ossimString s = theMeanGsd;
+   if (s.size())
+   {
+      ossim_float64 d = s.toFloat64();
+      if ( (d != 0.0) && (ossim::isnan(d) == false) )
+      {
+         gsd = d / 12.0 * MTRS_PER_FT;
+      }
+   }
+   
+   return gsd;
+}
+
+void ossimNitfUse00aTag::setMeanGsd(const ossimString& meanGsd)
+{
+   memset(theMeanGsd, ' ', MEAN_GSD_SIZE);
+   memcpy(theMeanGsd, meanGsd.c_str(), std::min((size_t)MEAN_GSD_SIZE, meanGsd.length()));
+}
+
+ossimString ossimNitfUse00aTag::getField3()const
+{
+   return theField3;
+}
+
+void ossimNitfUse00aTag::setField3(const ossimString& field3)
+{
+   memset(theField3, ' ', FIELD3_SIZE);
+   memcpy(theField3, field3.c_str(), std::min((size_t)FIELD3_SIZE, field3.length()));
+}
+
+ossimString ossimNitfUse00aTag::getDynamicRange()const
+{
+   return theDynamicRange;
+}
+
+void ossimNitfUse00aTag::setDynamicRange(const ossimString& dynamicRange)
+{
+   memset(theDynamicRange, ' ', DYNAMIC_RANGE_SIZE);
+   memcpy(theDynamicRange, dynamicRange.c_str(), std::min((size_t)DYNAMIC_RANGE_SIZE, dynamicRange.length()));
+}
+
+ossimString ossimNitfUse00aTag::getField5()const
+{
+   return theField5;
+}
+
+void ossimNitfUse00aTag::setField5(const ossimString& field5)
+{
+   memset(theField5, ' ', FIELD5_SIZE);
+   memcpy(theField5, field5.c_str(), std::min((size_t)FIELD5_SIZE, field5.length()));
+}
+
+ossimString ossimNitfUse00aTag::getField6()const
+{
+   return theField6;
+}
+
+void ossimNitfUse00aTag::setField6(const ossimString& field6)
+{
+   memset(theField6, ' ', FIELD6_SIZE);
+   memcpy(theField6, field6.c_str(), std::min((size_t)FIELD6_SIZE, field6.length()));
+}
+
+ossimString ossimNitfUse00aTag::getField7()const
+{
+   return theField7;
+}
+
+void ossimNitfUse00aTag::setField7(const ossimString& field7)
+{
+   memset(theField7, ' ', FIELD7_SIZE);
+   memcpy(theField7, field7.c_str(), std::min((size_t)FIELD7_SIZE, field7.length()));
+}
+
+ossimString ossimNitfUse00aTag::getOblAng()const
+{
+   return theOblAng;
+}
+
+void ossimNitfUse00aTag::setOblAng(const ossimString& oblAng)
+{
+   memset(theOblAng, ' ', OBL_ANG_SIZE);
+   memcpy(theOblAng, oblAng.c_str(), std::min((size_t)OBL_ANG_SIZE, oblAng.length()));
+}
+
+ossimString ossimNitfUse00aTag::getRollAng()const
+{
+   return theRollAng;
+}
+
+void ossimNitfUse00aTag::setRollAng(const ossimString& rollAng)
+{
+   memset(theRollAng, ' ', ROLL_ANG_SIZE);
+   memcpy(theRollAng, rollAng.c_str(), std::min((size_t)ROLL_ANG_SIZE, rollAng.length()));
+}
+
+ossimString ossimNitfUse00aTag::getField10()const
+{
+   return theField10;
+}
+
+void ossimNitfUse00aTag::setField10(const ossimString& field10)
+{
+   memset(theField10, ' ', FIELD10_SIZE);
+   memcpy(theField10, field10.c_str(), std::min((size_t)FIELD10_SIZE, field10.length()));
+}
+
+ossimString ossimNitfUse00aTag::getField11()const
+{
+   return theField11;
+}
+
+void ossimNitfUse00aTag::setField11(const ossimString& field11)
+{
+   memset(theField11, ' ', FIELD11_SIZE);
+   memcpy(theField11, field11.c_str(), std::min((size_t)FIELD11_SIZE, field11.length()));
+}
+
+ossimString ossimNitfUse00aTag::getField12()const
+{
+   return theField12;
+}
+
+void ossimNitfUse00aTag::setField12(const ossimString& field12)
+{
+   memset(theField12, ' ', FIELD12_SIZE);
+   memcpy(theField12, field12.c_str(), std::min((size_t)FIELD12_SIZE, field12.length()));
+}
+
+ossimString ossimNitfUse00aTag::getField13()const
+{
+   return theField13;
+}
+
+void ossimNitfUse00aTag::setField13(const ossimString& field13)
+{
+   memset(theField13, ' ', FIELD13_SIZE);
+   memcpy(theField13, field13.c_str(), std::min((size_t)FIELD13_SIZE, field13.length()));
+}
+
+ossimString ossimNitfUse00aTag::getField14()const
+{
+   return theField14;
+}
+
+void ossimNitfUse00aTag::setField14(const ossimString& field14)
+{
+   memset(theField14, ' ', FIELD14_SIZE);
+   memcpy(theField14, field14.c_str(), std::min((size_t)FIELD14_SIZE, field14.length()));
+}
+
+ossimString ossimNitfUse00aTag::getField15()const
+{
+   return theField15;
+}
+
+void ossimNitfUse00aTag::setField15(const ossimString& field15)
+{
+   memset(theField15, ' ', FIELD15_SIZE);
+   memcpy(theField15, field15.c_str(), std::min((size_t)FIELD15_SIZE, field15.length()));
+}
+
+ossimString ossimNitfUse00aTag::getField16()const
+{
+   return theField16;
+}
+
+void ossimNitfUse00aTag::setField16(const ossimString& field16)
+{
+   memset(theField16, ' ', FIELD16_SIZE);
+   memcpy(theField16, field16.c_str(), std::min((size_t)FIELD16_SIZE, field16.length()));
+}
+
+ossimString ossimNitfUse00aTag::getNRef()const
+{
+   return theNRef;
+}
+
+void ossimNitfUse00aTag::setNRef(const ossimString& nRef)
+{
+   memset(theNRef, ' ', N_REF_SIZE);
+   memcpy(theNRef, nRef.c_str(), std::min((size_t)N_REF_SIZE, nRef.length()));
+}
+
+ossimString ossimNitfUse00aTag::getRevNum()const
+{
+   return theRevNum;
+}
+
+void ossimNitfUse00aTag::setRevNum(const ossimString& revNum)
+{
+   memset(theRevNum, ' ', REV_NUM_SIZE);
+   memcpy(theRevNum, revNum.c_str(), std::min((size_t)REV_NUM_SIZE, revNum.length()));
+}
+
+ossimString ossimNitfUse00aTag::getNSeg()const
+{
+   return theNSeg;
+}
+
+void ossimNitfUse00aTag::setNSeg(const ossimString& nSeg)
+{
+   memset(theNSeg, ' ', N_SEG_SIZE);
+   memcpy(theNSeg, nSeg.c_str(), std::min((size_t)N_SEG_SIZE, nSeg.length()));
+}
+
+ossimString ossimNitfUse00aTag::getMaxLpSeg()const
+{
+   return theMaxLpSeg;
+}
+
+void ossimNitfUse00aTag::setMaxLpSeg(const ossimString& maxLpSeg)
+{
+   memset(theMaxLpSeg, ' ', MAX_LP_SEG_SIZE);
+   memcpy(theMaxLpSeg, maxLpSeg.c_str(), std::min((size_t)MAX_LP_SEG_SIZE, maxLpSeg.length()));
+}
+
+ossimString ossimNitfUse00aTag::getField20()const
+{
+   return theField20;
+}
+
+void ossimNitfUse00aTag::setField20(const ossimString& field20)
+{
+   memset(theField20, ' ', FIELD20_SIZE);
+   memcpy(theField20, field20.c_str(), std::min((size_t)FIELD20_SIZE, field20.length()));
+}
+
+ossimString ossimNitfUse00aTag::getField21()const
+{
+   return theField21;
+}
+
+void ossimNitfUse00aTag::setField21(const ossimString& field21)
+{
+   memset(theField21, ' ', FIELD21_SIZE);
+   memcpy(theField21, field21.c_str(), std::min((size_t)FIELD21_SIZE, field21.length()));
+}
+
+ossimString ossimNitfUse00aTag::getSunEl()const
+{
+   return theSunEl;
+}
+
+void ossimNitfUse00aTag::setSunEl(const ossimString& sunEl)
+{
+   memset(theSunEl, ' ', SUN_EL_SIZE);
+   memcpy(theSunEl, sunEl.c_str(), std::min((size_t)SUN_EL_SIZE, sunEl.length()));
+}
+
+ossimString ossimNitfUse00aTag::getSunAz()const
+{
+   return theSunAz;
+}
+
+void ossimNitfUse00aTag::setSunAz(const ossimString& sunAz)
+{
+   memset(theSunAz, ' ', SUN_AZ_SIZE);
+   memcpy(theSunAz, sunAz.c_str(), std::min((size_t)SUN_AZ_SIZE, sunAz.length()));
+}
+
+std::ostream& ossimNitfUse00aTag::print(std::ostream& out,
+                                        const std::string& prefix) const
+{
+   std::string pfx = prefix;
+   pfx += getTagName();
+   pfx += ".";
+
+   out << setiosflags(std::ios::left)
+       << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n"
+       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
+       << pfx << std::setw(24) << "ANGLETONORTH:" << theAngleToNorth << "\n" 
+       << pfx << std::setw(24) << "MEANGSD:"      << theMeanGsd << "\n"
+       << pfx << std::setw(24) << "DYNAMICRANGE:" << theDynamicRange << "\n"
+       << pfx << std::setw(24) << "OBLANG:"       << theOblAng << "\n"
+       << pfx << std::setw(24) << "ROLLANG:"      << theRollAng << "\n"
+       << pfx << std::setw(24) << "NREF:"         << theNRef << "\n"
+       << pfx << std::setw(24) << "REVNUM:"       << theRevNum << "\n"
+       << pfx << std::setw(24) << "NSEG:"         << theNSeg << "\n"
+       << pfx << std::setw(24) << "MAXLPSEG:"     << theMaxLpSeg << "\n"
+       << pfx << std::setw(24) << "SUNEL:"        << theSunEl << "\n"
+       << pfx << std::setw(24) << "SUNAZ:"        << theSunAz << "\n";
+
+   return out; 
+}
+   
+void ossimNitfUse00aTag::setProperty(ossimRefPtr<ossimProperty> property)
+{
+   ossimNitfRegisteredTag::setProperty(property);
+}
+
+ossimRefPtr<ossimProperty> ossimNitfUse00aTag::getProperty(const ossimString& name)const
+{
+   ossimProperty* result = 0;
+
+   if(name == ANGLETONORTH_KW)
+   {
+      result = new ossimStringProperty(name, theAngleToNorth);
+   }
+   else if(name == MEANGSD_KW)
+   {
+      result = new ossimStringProperty(name, theMeanGsd);
+   }
+   else if(name == DYNAMICRANGE_KW)
+   {
+      result = new ossimStringProperty(name, theDynamicRange);
+   }
+   else if(name == OBLANG_KW)
+   {
+      result = new ossimStringProperty(name, theOblAng);
+   }
+   else if(name == ROLLANG_KW)
+   {
+      result = new ossimStringProperty(name, theRollAng);
+   }
+   else if(name == NREF_KW)
+   {
+      result = new ossimStringProperty(name, theNRef);
+   }
+   else if(name == REVNUM_KW)
+   {
+      result = new ossimStringProperty(name, theRevNum);
+   }
+   else if(name == NSEG_KW)
+   {
+      result = new ossimStringProperty(name, theNSeg);
+   }
+   else if(name == MAXLPSEG_KW)
+   {
+      result = new ossimStringProperty(name, theMaxLpSeg);
+   }
+   else if(name == SUNEL_KW)
+   {
+      result = new ossimStringProperty(name, theSunEl);
+   }
+   else if(name == SUNAZ_KW)
+   {
+      result = new ossimStringProperty(name, theSunAz);
+   }
+   else
+   {
+      return ossimNitfRegisteredTag::getProperty(name);
+   }
+
+   return result;
+}
+
+void ossimNitfUse00aTag::getPropertyNames(std::vector<ossimString>& propertyNames)const
+{
+   ossimNitfRegisteredTag::getPropertyNames(propertyNames);
+
+   propertyNames.push_back(ANGLETONORTH_KW);
+   propertyNames.push_back(MEANGSD_KW);
+   propertyNames.push_back(DYNAMICRANGE_KW);
+   propertyNames.push_back(OBLANG_KW);
+   propertyNames.push_back(ROLLANG_KW);
+   propertyNames.push_back(NREF_KW);
+   propertyNames.push_back(REVNUM_KW);
+   propertyNames.push_back(NSEG_KW);
+   propertyNames.push_back(MAXLPSEG_KW);
+   propertyNames.push_back(SUNEL_KW);
+   propertyNames.push_back(SUNAZ_KW);
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNitfVqCompressionHeader.cpp b/ossim/src/ossim/support_data/ossimNitfVqCompressionHeader.cpp
new file mode 100644
index 0000000..ba45465
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNitfVqCompressionHeader.cpp
@@ -0,0 +1,349 @@
+//*******************************************************************
+// Copyright (C) 2004 Garrett Potts
+//
+// LICENSE: MIT see top level LICENSE.txt for more details
+// 
+// Author: Garrett Potts
+// Description: Nitf support class
+// 
+//********************************************************************
+// $Id: ossimNitfVqCompressionHeader.cpp 23666 2015-12-14 20:01:22Z rashadkm $
+
+#include <iostream>
+#include <sstream>
+#include <iomanip>
+
+#include <ossim/support_data/ossimNitfVqCompressionHeader.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimKeywordlist.h>
+
+RTTI_DEF1(ossimNitfVqCompressionHeader, "ossimNitfVqCompressionHeader", ossimNitfCompressionHeader);
+
+#if 0
+std::ostream& operator<<(std::ostream& out,
+                         const ossimNitfVqCompressionOffsetTableData& data)
+{
+   out << "theTableId:                              " << data.theTableId << std::endl
+       << "theNumberOfCompressionLookupRecords:     " << data.theNumberOfCompressionLookupRecords << std::endl
+       << "theNumberOfValuesPerCompressionLookup:   " << data.theNumberOfValuesPerCompressionLookup << std::endl
+       << "theCompressionLookupValueBitLength:      " << data.theCompressionLookupValueBitLength<< std::endl
+       << "theCompressionLookupTableOffset:         " << data.theCompressionLookupTableOffset;
+
+   return out;
+}
+#endif
+
+
+ossimNitfVqCompressionOffsetTableData::ossimNitfVqCompressionOffsetTableData()
+      :theData(NULL)
+{
+   clearFields();
+}
+
+ossimNitfVqCompressionOffsetTableData::ossimNitfVqCompressionOffsetTableData(const ossimNitfVqCompressionOffsetTableData& rhs)
+      :theTableId(rhs.theTableId),
+       theNumberOfCompressionLookupRecords(rhs.theNumberOfCompressionLookupRecords),
+       theNumberOfValuesPerCompressionLookup(rhs.theNumberOfValuesPerCompressionLookup),
+       theCompressionLookupValueBitLength(rhs.theCompressionLookupValueBitLength),
+       theCompressionLookupTableOffset(rhs.theCompressionLookupTableOffset),
+       theData(NULL)
+
+{
+   ossim_uint32 size = (theNumberOfValuesPerCompressionLookup*
+                        theNumberOfCompressionLookupRecords*
+                        theCompressionLookupValueBitLength)/8;
+   if(size > 0)
+   {
+      theData = new unsigned char[size];
+      if(rhs.theData)
+      {
+         memcpy(theData, rhs.theData, size);
+      }
+   }
+}
+
+ossimNitfVqCompressionOffsetTableData::~ossimNitfVqCompressionOffsetTableData()
+{
+   if(theData)
+   {
+      delete [] theData;
+      theData = NULL;
+   }
+}
+
+const ossimNitfVqCompressionOffsetTableData& ossimNitfVqCompressionOffsetTableData::operator =(const ossimNitfVqCompressionOffsetTableData& rhs)
+{
+   if(this != &rhs)
+   {
+      if(theData)
+      {
+         delete [] theData;
+         theData = NULL;
+      }
+
+      theTableId                            = rhs.theTableId;
+      theNumberOfCompressionLookupRecords   = rhs.theNumberOfCompressionLookupRecords;
+      theCompressionLookupValueBitLength    = rhs.theCompressionLookupValueBitLength;
+      theNumberOfValuesPerCompressionLookup = rhs.theNumberOfValuesPerCompressionLookup;
+      theCompressionLookupTableOffset       = rhs.theCompressionLookupTableOffset;
+      
+      if(rhs.theData)
+      {
+         ossim_uint32 size = (theNumberOfValuesPerCompressionLookup*
+                              theNumberOfCompressionLookupRecords*
+                              theCompressionLookupValueBitLength)/8;
+         if(size > 0)
+         {
+            theData = new unsigned char[size];
+            memcpy(theData, rhs.theData, size);
+         }
+      }
+   }
+   
+   return *this;
+   
+}
+ossim_uint32 ossimNitfVqCompressionOffsetTableData::getDataLengthInBytes()const
+{
+   return (theNumberOfValuesPerCompressionLookup*
+           theNumberOfCompressionLookupRecords*
+           theCompressionLookupValueBitLength)/8;
+}
+
+void ossimNitfVqCompressionOffsetTableData::parseStream(std::istream& in)
+{
+   ossimEndian endian;
+   in.read((char*)(&theTableId), 2);
+   in.read((char*)(&theNumberOfCompressionLookupRecords),4);
+   in.read((char*)(&theNumberOfValuesPerCompressionLookup), 2);
+   in.read((char*)(&theCompressionLookupValueBitLength),2);
+   in.read((char*)(&theCompressionLookupTableOffset), 4);
+
+   if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
+   {
+      endian.swap(theTableId);
+      endian.swap(theNumberOfCompressionLookupRecords);
+      endian.swap(theNumberOfValuesPerCompressionLookup);
+      endian.swap(theCompressionLookupValueBitLength);
+      endian.swap(theCompressionLookupTableOffset);
+   }
+}
+
+void ossimNitfVqCompressionOffsetTableData::clearFields()
+{
+   theTableId = 0;
+   theNumberOfCompressionLookupRecords = 0;
+   theNumberOfValuesPerCompressionLookup = 0;
+   theCompressionLookupValueBitLength = 0;
+   theCompressionLookupTableOffset = 0;
+
+   if(theData)
+   {
+      delete [] theData;
+      theData = NULL;
+   }
+}
+
+ossimNitfVqCompressionHeader::ossimNitfVqCompressionHeader()
+{
+   clearFields();
+}
+
+void ossimNitfVqCompressionHeader::parseStream(std::istream &in)
+{
+   ossimEndian endian;
+
+   in.read((char*)(&theNumberOfImageRows), 4);
+   in.read((char*)(&theNumberOfImageCodesPerRow), 4);
+   in.read((char*)(&theImageCodeBitLength), 1);
+   in.read((char*)(&theCompressionAlgorithmId), 2);
+
+   in.read((char*)(&theNumberOfCompressionLookupOffsetRecords), 2);
+   in.read((char*)(&theNumberOfCompressionParameterOffsetRecords), 2);
+   in.read((char*)(&theCompressionLookupOffsetTableOffset), 4);
+   in.read((char*)(&theCompressionLookupTableOffsetRecordLength), 2);
+   
+   if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
+   {
+      endian.swap(theNumberOfImageRows);
+      endian.swap(theNumberOfImageCodesPerRow);
+      endian.swap(theCompressionAlgorithmId);
+      endian.swap(theNumberOfCompressionLookupOffsetRecords);
+      endian.swap(theNumberOfCompressionParameterOffsetRecords);
+      endian.swap(theCompressionLookupOffsetTableOffset);
+      endian.swap(theCompressionLookupTableOffsetRecordLength);
+   }
+   
+   if((theNumberOfCompressionLookupOffsetRecords > 0)&&
+      (theCompressionAlgorithmId == 1)) 
+   {
+      theTable.clear();
+      theTable.resize(theNumberOfCompressionLookupOffsetRecords);
+
+      ossim_uint32 idx = 0;
+
+      for(idx = 0; idx < theNumberOfCompressionLookupOffsetRecords; ++idx)
+      {
+         theTable[idx].parseStream(in);
+      }
+      for(idx = 0; idx < theTable.size(); ++idx)
+      {
+         if(theTable[idx].theData)
+         {
+            delete [] theTable[idx].theData;
+            theTable[idx].theData = 0;
+         }
+         if(theTable[idx].getDataLengthInBytes()>0)
+         {
+            theTable[idx].theData = new ossim_uint8[theTable[idx].getDataLengthInBytes()];
+            in.read((char*)(theTable[idx].theData), theTable[idx].getDataLengthInBytes());
+         }
+      }
+   }
+}
+
+std::ostream& ossimNitfVqCompressionHeader::print(std::ostream& out) const
+{
+   return this->print(out, std::string(""));
+}
+
+std::ostream& ossimNitfVqCompressionHeader::print(
+   std::ostream& out, const std::string& prefix ) const
+{
+   std::string pfx = prefix;
+   pfx += "vq_header.";
+
+   out << std::setiosflags(std::ios::left)
+       << pfx << std::setw(24) << "image_rows:"
+       << theNumberOfImageRows << "\n"
+       << pfx << std::setw(24) << "codes_per_row:"
+       << theNumberOfImageCodesPerRow << "\n"
+       << pfx << std::setw(24) << "codebit_length:"
+       << (ossim_uint32)theImageCodeBitLength << "\n"
+       << pfx << std::setw(24) << "algorithm_id:"
+       << theCompressionAlgorithmId << "\n"
+       << pfx << std::setw(24)
+       << "offset_records:"
+       << theNumberOfCompressionLookupOffsetRecords << "\n"
+       << pfx << std::setw(24)
+       << "offset_record_length:"
+       << theCompressionLookupTableOffsetRecordLength << "\n";
+
+   if(theTable.size() > 0)
+   {
+      for(ossim_uint32 idx = 0; idx < theTable.size()-1; ++idx)
+      {
+         std::string tblPfx = pfx;
+         tblPfx += "table";
+         tblPfx += ossimString::toString(idx).string();
+         tblPfx += ".";
+
+         out << tblPfx << std::setw(24) << "id:"
+             << theTable[idx].theTableId << "\n"
+             << tblPfx << std::setw(24) << "lookup_records:"
+             << theTable[idx].theNumberOfCompressionLookupRecords << "\n"
+             << tblPfx << std::setw(24) << "values_per_lookup:"
+             << theTable[idx].theNumberOfValuesPerCompressionLookup << "\n"
+             << tblPfx << std::setw(24) << "lookup_bit_length:"
+             << theTable[idx].theCompressionLookupValueBitLength << "\n"
+             << tblPfx << std::setw(24) << "lookup_table_offset:"
+             << theTable[idx].theCompressionLookupTableOffset << "\n";
+      }
+
+   }
+
+   return out;
+}
+
+bool ossimNitfVqCompressionHeader::saveState(ossimKeywordlist& kwl, const ossimString& prefix)const
+{
+   bool result = ossimNitfCompressionHeader::saveState(kwl, prefix);
+   
+   if(result)
+   {
+      std::ostringstream out;
+      
+      out << std::setiosflags(std::ios::left)
+      << "image_rows:" << theNumberOfImageRows << "\n"
+      << "codes_per_row:" << theNumberOfImageCodesPerRow << "\n"
+      << "codebit_length:" << (ossim_uint32)theImageCodeBitLength << "\n"
+      << "algorithm_id:" << theCompressionAlgorithmId << "\n"
+      << "offset_records:" << theNumberOfCompressionLookupOffsetRecords << "\n"
+      << "offset_record_length:" << theCompressionLookupTableOffsetRecordLength << "\n";
+      
+      if(theTable.size() > 0)
+      {
+         for(ossim_uint32 idx = 0; idx < theTable.size()-1; ++idx)
+         {
+            std::string tblPfx = "table";
+            tblPfx += ossimString::toString(idx).string();
+            tblPfx += ".";
+            
+            out << tblPfx<< "id:"
+            << theTable[idx].theTableId << "\n"
+            << tblPfx << "lookup_records:"<< theTable[idx].theNumberOfCompressionLookupRecords << "\n"
+            << tblPfx <<"values_per_lookup:"<< theTable[idx].theNumberOfValuesPerCompressionLookup << "\n"
+            << tblPfx << "lookup_bit_length:"<< theTable[idx].theCompressionLookupValueBitLength << "\n"
+            << tblPfx << "lookup_table_offset:"<< theTable[idx].theCompressionLookupTableOffset << "\n";
+         }
+      }
+      ossimKeywordlist kwlTemp;
+      
+      std::istringstream in(out.str());
+      if(kwlTemp.parseStream(in))
+      {
+         kwl.add(prefix, kwlTemp);
+      }
+   }
+   
+   return result;
+}
+
+ossim_uint32 ossimNitfVqCompressionHeader::getBlockSizeInBytes()const
+{
+   return (getNumberOfImageRows()*
+           getNumberOfImageCodesPerRow()*
+           getImageCodeBitLength())/8;
+}
+
+ossim_uint32 ossimNitfVqCompressionHeader::getNumberOfImageRows()const
+{
+   return theNumberOfImageRows;
+}
+
+ossim_uint32 ossimNitfVqCompressionHeader::getNumberOfImageCodesPerRow()const
+{
+   return theNumberOfImageCodesPerRow;
+}
+
+ossim_uint32 ossimNitfVqCompressionHeader::getCompressionAlgorithmId()const
+{
+   return theCompressionAlgorithmId;
+}
+
+ossim_uint32 ossimNitfVqCompressionHeader::getImageCodeBitLength()const
+{
+   return theImageCodeBitLength;
+}
+
+ossim_uint32 ossimNitfVqCompressionHeader::getNumberOfTables()const
+{
+   return (ossim_uint32)theTable.size();
+}
+
+const std::vector<ossimNitfVqCompressionOffsetTableData>& ossimNitfVqCompressionHeader::getTable()const
+{
+   return theTable;
+}
+
+void ossimNitfVqCompressionHeader::clearFields()
+{
+   theNumberOfImageRows                        = 0;
+   theNumberOfImageCodesPerRow                 = 0;
+   theImageCodeBitLength                       = 0;
+   theCompressionAlgorithmId                   = 0;
+   theNumberOfCompressionLookupOffsetRecords   = 0;
+   theCompressionLookupTableOffsetRecordLength = 0;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimNmeaMessage.cpp b/ossim/src/ossim/support_data/ossimNmeaMessage.cpp
new file mode 100644
index 0000000..47222f6
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimNmeaMessage.cpp
@@ -0,0 +1,99 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+//
+// File: ossimNmeaMessage.h
+//
+// Author:  Garrett Potts
+//
+// Description: Contains a general parser for NMEA messages.
+//
+//
+// $Id$
+//----------------------------------------------------------------------------
+#include <ossim/support_data/ossimNmeaMessage.h>
+#include <ossim/base/ossimCommon.h>
+#include <iomanip>
+
+ossim_uint32 ossimNmeaMessage::checksum(std::string::const_iterator start, std::string::const_iterator end)
+{
+   ossim_uint32 sum = 0;
+   
+   while(start!=end&&((*start)!='*'))
+   {
+      sum ^= ((*start)%128);
+      ++start;
+   }
+   return sum;
+}
+
+void ossimNmeaMessage::setFields(std::string::const_iterator start, std::string::const_iterator end)
+{
+   m_fields.clear();
+   ossim_uint32 idx = 0;
+   while(start != end)
+   {
+      m_fields.push_back("");
+      
+      while((start!=end)&&
+            (*start!=','))
+      {
+         m_fields[idx]+=*start;
+         ++start;
+      }
+      
+      if(start!=end)
+      {
+         ++start;
+      }
+      ++idx;
+   }
+}
+
+bool ossimNmeaMessage::isValidStartChar(char c)const
+{
+   std::string::const_iterator iter = std::find(m_startChars.begin(), m_startChars.end(), c);
+   return (iter != m_startChars.end());
+}
+
+
+void ossimNmeaMessage::parseMessage(std::istream& in)throw(ossimException)
+{
+   ossim::skipws(in);
+   m_validCheckSum = false;
+   m_message = "";
+   if(!isValidStartChar(static_cast<char>(in.peek())))
+   {
+      throw ossimException(ossimString("Starting NMEA messsage indicator not found, expected one of ") +
+                           m_startChars + " but found " +
+                           ossimString((char)in.peek()));
+   }
+   
+   char c = static_cast<char>(in.get());
+   while(((c!='\n')&&(c!='\r'))&&
+         !in.eof()&&!in.bad()) 
+   {
+      m_message += c;
+      c = static_cast<char>(in.get());
+   }
+   std::string::iterator iter = std::find(m_message.begin(), m_message.end(), '*');
+   
+   if(iter != m_message.end())
+   {
+      setFields(m_message.begin()+1, m_message.end());
+      ossim_uint32 check = checksum(m_message.begin()+1, iter);
+      std::ostringstream out;
+      out << std::setw(2) << std::setfill('0') << std::hex << check;
+      std::string::iterator endChecksumIter = iter+1;
+      while((endChecksumIter!= m_message.end())&&(*endChecksumIter!=',')) ++endChecksumIter;
+      if(out.str() == ossimString(iter+1, endChecksumIter).downcase()) 
+      {
+         m_validCheckSum = true;
+      }
+   }
+   else
+   {
+      throw ossimException("Terminating * indicator for cbecksum not found in NMEA message format");
+   }
+}
+
diff --git a/src/ossim/support_data/ossimNmeaMessageSequencer.cpp b/ossim/src/ossim/support_data/ossimNmeaMessageSequencer.cpp
similarity index 100%
rename from src/ossim/support_data/ossimNmeaMessageSequencer.cpp
rename to ossim/src/ossim/support_data/ossimNmeaMessageSequencer.cpp
diff --git a/src/ossim/support_data/ossimPpjFrameSensorFile.cpp b/ossim/src/ossim/support_data/ossimPpjFrameSensorFile.cpp
similarity index 100%
rename from src/ossim/support_data/ossimPpjFrameSensorFile.cpp
rename to ossim/src/ossim/support_data/ossimPpjFrameSensorFile.cpp
diff --git a/ossim/src/ossim/support_data/ossimQuickbirdMetaData.cpp b/ossim/src/ossim/support_data/ossimQuickbirdMetaData.cpp
new file mode 100644
index 0000000..05b0b40
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimQuickbirdMetaData.cpp
@@ -0,0 +1,819 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Description:
+// 
+// Class definition for ossimQuickbirdMetaData.
+// 
+// This class parses a Space Imaging Quickbird meta data file.
+//
+//********************************************************************
+// $Id: ossimQuickbirdMetaData.cpp 14431 2009-04-30 21:58:33Z dburken $
+
+#include <ossim/support_data/ossimQuickbirdMetaData.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimTrace.h>
+#include <cstdio>
+#include <iostream>
+
+
+RTTI_DEF1(ossimQuickbirdMetaData, "ossimQuickbirdMetaData", ossimObject);
+ 
+// Define Trace flags for use within this file:
+static ossimTrace traceExec  ("ossimQuickbirdMetaData:exec");
+static ossimTrace traceDebug ("ossimQuickbirdMetaData:debug");
+
+ossimQuickbirdMetaData::ossimQuickbirdMetaData()
+   :
+   theGenerationDate("Unknown"),
+   theBandId("Unknown"),
+   theBitsPerPixel(0),
+   theSatID("Unknown"),
+   theTLCDate("Unknown"),
+   theSunAzimuth(0.0),
+   theSunElevation(0.0),
+   theSatAzimuth(0.0),
+   theSatElevation(0.0),
+   theTDILevel(0),
+   theAbsCalFactors(),
+   theBandNameList("Unknown"),
+   theImageSize()
+{
+   theImageSize.makeNan();
+   theAbsCalFactors.clear();
+}
+
+ossimQuickbirdMetaData::~ossimQuickbirdMetaData()
+{
+}
+
+bool ossimQuickbirdMetaData::open(const ossimFilename& imageFile)
+{
+   static const char MODULE[] = "ossimQuickbirdMetaData::open";
+
+   clearFields();
+
+   //retrieve information from the metadata file
+   //if the Quickbird tif is 02APR01105228-M1BS-000000128955_01_P001.TIF
+   //the metadata file will be 02APR01105228-M1BS-000000128955_01_P001.IMD
+
+   ossimFilename metadatafile = imageFile;
+   metadatafile.setExtension(ossimString("IMD"));
+
+   if( parseMetaData(metadatafile) == false )
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+	    << MODULE << " errors parsing metadata" << std::endl;
+      }
+      return false;
+   }
+
+   return true;
+}
+
+void ossimQuickbirdMetaData::clearFields()
+{
+   theGenerationDate = "Unknown";
+   theBitsPerPixel = 0;
+   theBandId = "Unknown";
+   theSatID = "Unknown";
+   theTLCDate = "Unknown";
+   theSunAzimuth = 0.0;
+   theSunElevation = 0.0;
+   theSatAzimuth = 0.0;
+   theSatElevation = 0.0;
+   theTDILevel = 0;
+   theAbsCalFactors.clear();
+   theBandNameList = "Unknown";
+   theImageSize.makeNan();
+}
+
+std::ostream& ossimQuickbirdMetaData::print(std::ostream& out) const
+{
+
+   out << "\n----------------- Info on Quickbird Image -------------------"
+       << "\n  "
+       << "\n  Generation date:    " << theGenerationDate
+       << "\n  Band Id:            " << theBandId
+       << "\n  Bits per pixel:     " << theBitsPerPixel
+       << "\n  Sat Id:             " << theSatID
+       << "\n  TLC date:           " << theTLCDate
+       << "\n  Sun Azimuth:        " << theSunAzimuth
+       << "\n  Sun Elevation:      " << theSunElevation
+       << "\n  Sat Azimuth:        " << theSatAzimuth
+       << "\n  Sat Elevation:      " << theSatElevation
+       << "\n  Band name list:     " << theBandNameList
+       << "\n  TDI Level:          " << theTDILevel
+       << "\n  abs Calibration Factors:   " 
+       << std::endl;
+   for(unsigned int i=0; i<theAbsCalFactors.size(); i++)
+   {
+      out<<theAbsCalFactors[i] << "   ";
+   }
+   out << "\n  Image Size:         " << theImageSize
+       << "n"
+       << "\n---------------------------------------------------------"
+       << "\n  " << std::endl;
+   return out;
+}
+
+bool ossimQuickbirdMetaData::saveState(ossimKeywordlist& kwl,
+				       const char* prefix)const
+{
+   kwl.add(prefix,
+           ossimKeywordNames::TYPE_KW,
+           "ossimQuickbirdMetaData",
+           true);
+
+   kwl.add(prefix,
+           "generation_date",
+           theGenerationDate,
+           true);
+
+   kwl.add(prefix,
+           "bits_per_pixel",
+           theBitsPerPixel,
+           true);
+
+   kwl.add(prefix,
+           "band_id",
+           theBandId,
+           true);
+
+   kwl.add(prefix,
+           "sat_id",
+           theSatID,
+           true);
+
+   kwl.add(prefix,
+           "tlc_date",
+           theTLCDate,
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::AZIMUTH_ANGLE_KW,
+           theSunAzimuth,
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::ELEVATION_ANGLE_KW,
+           theSunElevation,
+           true);
+
+   kwl.add(prefix,
+           "sat_azimuth_angle",
+           theSatAzimuth,
+           true);
+
+   kwl.add(prefix,
+           "sat_elevation_angle",
+           theSatElevation,
+           true);
+          
+   kwl.add(prefix,
+           "TDI_level",
+           theTDILevel,
+           true);
+   kwl.add(prefix,
+           "band_name_list",
+           theBandNameList,
+           true);
+
+   if( theBandId=="Multi" )
+   {
+      std::vector<ossimString> bandNameList = theBandNameList.split(" ");
+      for(unsigned int i = 0 ; i < bandNameList.size(); ++i)
+      {
+         kwl.add(prefix,
+                 bandNameList[i] + "_band_absCalFactor",
+                 theAbsCalFactors[i],
+                 true);
+      }
+   }
+   else if(!theAbsCalFactors.empty())
+   {
+      kwl.add(prefix,
+              "absCalFactor",
+              theAbsCalFactors[0],
+              true);  	
+   }
+
+   return true;
+}
+
+bool ossimQuickbirdMetaData::loadState(const ossimKeywordlist& kwl,
+				       const char* prefix)
+{
+   clearFields();
+
+   const char* lookup = 0;
+   ossimString s;
+  
+   lookup = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
+   if (lookup)
+   {
+      s = lookup;
+      if(s != "ossimQuickbirdMetaData")
+      {
+         return false;
+      }
+   }
+
+   lookup = kwl.find(prefix, "generation_date");
+   if (lookup)
+   {
+      theGenerationDate = lookup;
+   }
+
+   lookup = kwl.find(prefix, "band_id");
+   if (lookup)
+   {
+      theBandId = lookup;
+   }
+  
+   lookup = kwl.find(prefix, "bits_per_pixel");
+   if (lookup)
+   {
+      s = lookup;
+      theBitsPerPixel = s.toInt();;
+   }
+    
+   lookup = kwl.find(prefix, "sat_id");
+   if (lookup)
+   {
+      theSatID = lookup;
+   }
+
+   lookup = kwl.find(prefix, "tlc_date");
+   if (lookup)
+   {
+      theTLCDate= lookup;
+   }
+
+   lookup = kwl.find(prefix, "TDI_level");
+   if (lookup)
+   {
+      s = lookup;
+      theTDILevel = s.toInt();
+   }
+
+   lookup = kwl.find(prefix, ossimKeywordNames::AZIMUTH_ANGLE_KW);
+   if (lookup)
+   {
+      s = lookup;
+      theSunAzimuth = s.toFloat64();
+   }
+
+   lookup = kwl.find(prefix, ossimKeywordNames::ELEVATION_ANGLE_KW);
+   if (lookup)
+   {
+      s = lookup;
+      theSunElevation = s.toFloat64();
+   }
+
+   lookup = kwl.find(prefix, "sat_azimuth_angle");
+   if (lookup)
+   {
+      s = lookup;
+      theSatAzimuth = s.toFloat64();
+   }
+
+   lookup = kwl.find(prefix, "sat_elevation_angle");
+   if (lookup)
+   {
+      s = lookup;
+      theSatElevation = s.toFloat64();
+   }
+
+   lookup = kwl.find(prefix, "band_name_list");
+   if (lookup)
+   {
+      theBandNameList= lookup;
+   }
+
+   if(theBandId=="Multi")
+   {
+      std::vector<ossimString> bandNameList = theBandNameList.split(" ");
+      theAbsCalFactors = std::vector<double>(bandNameList.size(), 1.);
+      for(unsigned int i = 0 ; i < bandNameList.size() ; ++i)
+      {
+         lookup = kwl.find(prefix, bandNameList[i] + "_band_absCalFactor");
+         if (lookup)
+         {
+            s = lookup;
+            theAbsCalFactors[i] = s.toDouble();
+         }
+      }
+   }
+   else if (theBandId=="P")
+   {
+      theAbsCalFactors = std::vector<double>(1, 1.);
+      lookup = kwl.find(prefix, "absCalFactor");
+      if (lookup)
+      {
+         s = lookup;
+         theAbsCalFactors[0] = s.toDouble();
+      }	
+   }
+   return true;
+}
+
+//*****************************************************************************
+// PROTECTED METHOD: ossimQuickbirdMetaData::parseMetaData()
+//
+//  Parses the Quickbird IMD file.
+//
+//*****************************************************************************
+bool ossimQuickbirdMetaData::parseMetaData(const ossimFilename& data_file)
+{
+   if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimQuickbirdMetaData::parseMetaData(data_file): entering..." << std::endl;
+   
+   if( !data_file.exists() )
+   {
+      if (traceExec()) ossimNotify(ossimNotifyLevel_WARN) << "ossimQuickbirdMetaData::parseMetaData(data_file) WARN:" << "\nmetadate data file <" << data_file << ">. " << "doesn't exist..." << std::endl;
+      return false;
+   }
+  
+
+   FILE* fptr = fopen (data_file, "r");
+   if (!fptr)
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+	    << "ossimQuickbirdRpcModel::parseMetaData(data_file) DEBUG:"
+	    << "\nCould not open Meta data file:  " << data_file
+	    << "\nreturning with error..." << std::endl;
+      }
+      return false;
+   }
+
+   char* strptr(NULL);
+
+   //---
+   // Read the file into a buffer:
+   //---
+   ossim_int32 fileSize = static_cast<ossim_int32>(data_file.fileSize());
+   char* filebuf = new char[fileSize];
+   fread(filebuf, 1, fileSize, fptr);
+   strptr = filebuf;
+   fclose(fptr);
+   ossimString temp;
+
+   //---
+   // Generation time:
+   //---
+  
+   if(getEndOfLine( strptr, ossimString("\ngenerationTime ="), "%17c %s", temp))
+      theGenerationDate = ossimString(temp).before(";");
+   else
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+	    << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
+	    << "\n\tAborting construction. Error encountered parsing "
+	    << "presumed meta-data file." << std::endl;
+
+         delete [] filebuf;
+         return false;
+      }
+   }
+
+   // Number of rows and columns in full image:
+   if(getEndOfLine( strptr, ossimString("\nnumRows ="), "%10c %s", temp))
+      theImageSize.line = ossimString(temp).before("\";").toInt();
+
+   if(getEndOfLine( strptr, ossimString("\nnumColumns ="), "%13c %s", temp))
+      theImageSize.samp = ossimString(temp).before("\";").toInt();
+
+   //---
+   // BandId:
+   //---
+   if(getEndOfLine( strptr, ossimString("\nbandId ="), "%9c %s", temp))
+      theBandId = ossimString(temp).after("\"").before("\";");
+   else
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+	    << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
+	    << "\n\tAborting construction. Error encountered parsing "
+	    << "presumed meta-data file." << std::endl;
+
+         delete [] filebuf;
+         return false;
+      }
+   }
+    
+  
+   //---
+   // BitsPerPixel:
+   //---
+   if(getEndOfLine( strptr, ossimString("\nbitsPerPixel = "), "%16c %s", temp))
+      theBitsPerPixel = ossimString(temp).before(";").toInt();
+   else
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+	    << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
+	    << "\n\tAborting construction. Error encountered parsing "
+	    << "presumed meta-data file." << std::endl;
+
+         delete [] filebuf;
+         return false;
+      }
+   }
+     
+   //---
+   // absCalFactors:
+   //---
+
+   char *iter = (char *)filebuf;
+   unsigned int nbBand = 0;
+   theBandNameList = "";
+   for(iter = strstr(iter, "BEGIN_GROUP = BAND_"); iter ; iter = strstr(iter, "BEGIN_GROUP = BAND_"))
+   {
+      ++nbBand;
+      char dummy[80], nameChar[80];
+      sscanf(iter, "%19c %s", dummy, nameChar);
+      ossimString bandCur = ossimString(nameChar).before("\n");
+      theBandNameList = theBandNameList + bandCur + " ";
+      ++iter;
+   }
+   theBandNameList.trim();
+   
+   //--- Multispectral
+   if(theBandId=="Multi")
+   {
+      std::vector<ossimString> bandList;
+      bandList = theBandNameList.split(" ");
+      theAbsCalFactors = std::vector<double>(bandList.size(), 1.);
+      for(unsigned int j=0; j<bandList.size(); j++)
+      {
+         ossimString begin_group = "BEGIN_GROUP = BAND_" + bandList[j];
+         strptr = strstr(filebuf, begin_group.c_str());
+         if(!strptr && traceDebug())
+         {	  				
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
+               << "\n\tAborting construction. Error encountered parsing "
+               << "presumed meta-data file." << std::endl;
+            delete [] filebuf;
+            return false;
+         }
+         else
+         {
+            char dummy[80], nameChar[80];
+            sscanf(strptr, "%19c %s", dummy, nameChar);
+            ossimString bandCur = ossimString(nameChar).before("\n");
+            if(!strptr && traceDebug())
+            {	  				
+               ossimNotify(ossimNotifyLevel_FATAL)
+                  << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
+                  << "\n\tAborting construction. Error encountered parsing "
+                  << "presumed meta-data file." << std::endl;
+               delete [] filebuf;
+               return false;
+            }
+            else
+            {
+               if(bandList[j] == bandCur)
+               {
+                  strptr = strstr(strptr, "\tabsCalFactor = ");
+                  sscanf(strptr, "%16c %s", dummy, nameChar);
+                  theAbsCalFactors[j] = ossimString(nameChar).before(";").toDouble();
+               }
+            }
+         }
+      }
+   }
+   //--- Panchromatic
+   else
+   {
+      theAbsCalFactors = std::vector<double>(1, 1.);
+      if(getEndOfLine( strptr, ossimString("\tabsCalFactor = "), "%16c %s", temp))
+         theAbsCalFactors[0] = ossimString(temp).before(";").toDouble();
+      else
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
+               << "\n\tAborting construction. Error encountered parsing "
+               << "presumed meta-data file." << std::endl;
+
+            delete [] filebuf;
+            return false;
+         }
+      }
+   }
+    
+   //---
+   // SatID:
+   //---
+   if(getEndOfLine( strptr, ossimString("\n\tsatId ="), "%9c %s", temp))
+      theSatID = ossimString(temp).after("\"").before("\";");
+   else
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+	    << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
+	    << "\n\tAborting construction. Error encountered parsing "
+	    << "presumed meta-data file." << std::endl;
+
+         delete [] filebuf;
+         return false;
+      }
+   }
+
+   //---
+   // TLCTime:
+   //---
+   if(getEndOfLine( strptr, ossimString("\n\tTLCTime ="), "%11c %s", temp))
+      theTLCDate = ossimString(temp).before("\";");
+   else
+   {
+      if(getEndOfLine( strptr, ossimString("\n\tfirstLineTime ="), "%17c %s", temp))
+         theTLCDate = ossimString(temp).before("\";");
+      else
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
+               << "\n\tAborting construction. Error encountered parsing "
+               << "presumed meta-data file." << std::endl;
+            delete [] filebuf;
+            return false;
+         }
+      }
+   }
+   
+   //---
+   // Sun Azimuth:
+   //---
+   if(getEndOfLine( strptr, ossimString("\n\tsunAz ="), "%9c %s", temp))
+        theSunAzimuth = ossimString(temp).before(";").toFloat64();
+   else
+   {
+      if(getEndOfLine( strptr, ossimString("\n\tmeanSunAz ="), "%13c %s", temp))
+         theSunAzimuth = ossimString(temp).before(";").toFloat64();
+      else
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
+               << "\n\tAborting construction. Error encountered parsing "
+               << "presumed meta-data file." << std::endl;
+
+            delete [] filebuf;
+            return false;
+         }
+      }
+   }
+
+   //---
+   // Sun Elevation:
+   //---
+   if(getEndOfLine( filebuf, ossimString("\n\tsunEl ="), "%9c %s", temp))
+        theSunElevation = ossimString(temp).before(";").toFloat64();
+   else
+   {
+      if(getEndOfLine( filebuf, ossimString("\n\tmeanSunEl ="), "%13c %s", temp))
+         theSunElevation = ossimString(temp).before(";").toFloat64();
+      else
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
+               << "\n\tAborting construction. Error encountered parsing "
+               << "presumed meta-data file." << std::endl;
+
+            delete [] filebuf;
+            return false;
+         }
+      }
+   }
+
+   //---
+   // Sun Azimuth:
+   //---
+   if(getEndOfLine( strptr, ossimString("\n\tsunAz ="), "%9c %s", temp))
+      theSunAzimuth = ossimString(temp).before(";").toFloat64();
+   else
+   {
+      if(getEndOfLine( strptr, ossimString("\n\tmeanSunAz ="), "%13c %s", temp))
+         theSunAzimuth = ossimString(temp).before(";").toFloat64();
+      else
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
+               << "\n\tAborting construction. Error encountered parsing "
+               << "presumed meta-data file." << std::endl;
+            
+            delete [] filebuf;
+            return false;
+         }
+      }
+   }
+
+   //---
+   // Sun Elevation:
+   //---
+   if(getEndOfLine( filebuf, ossimString("\n\tsunEl ="), "%9c %s", temp))
+      theSunElevation = ossimString(temp).before(";").toFloat64();
+   else
+   {
+      if(getEndOfLine( filebuf, ossimString("\n\tmeanSunEl ="), "%13c %s", temp))
+         theSunElevation = ossimString(temp).before(";").toFloat64();
+      else
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
+               << "\n\tAborting construction. Error encountered parsing "
+               << "presumed meta-data file." << std::endl;
+
+            delete [] filebuf;
+            return false;
+         }
+      }
+   }
+
+
+   //---
+   // Sat Azimuth:
+   //---
+   if(getEndOfLine( strptr, ossimString("\n\tsatAz ="), "%9c %s", temp))
+      theSatAzimuth = ossimString(temp).before(";").toFloat64();
+   else
+   {
+      if(getEndOfLine( strptr, ossimString("\n\tmeanSatAz ="), "%13c %s", temp))
+         theSatAzimuth = ossimString(temp).before(";").toFloat64();
+      else
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
+               << "\n\tAborting construction. Error encountered parsing "
+               << "presumed meta-data file." << std::endl;
+            
+            delete [] filebuf;
+            return false;
+         }
+      }
+   }
+   
+   //---
+   // Sat Elevation:
+   //---
+   if(getEndOfLine( filebuf, ossimString("\n\tsatEl ="), "%9c %s", temp))
+      theSatElevation = ossimString(temp).before(";").toFloat64();
+   else
+   {
+      if(getEndOfLine( filebuf, ossimString("\n\tmeanSatEl ="), "%13c %s", temp))
+         theSatElevation = ossimString(temp).before(";").toFloat64();
+      else
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
+               << "\n\tAborting construction. Error encountered parsing "
+               << "presumed meta-data file." << std::endl;
+            
+            delete [] filebuf;
+            return false;
+         }
+      }
+   }
+   
+   
+   //---
+   // TDILevel:
+   //---
+   if(getEndOfLine( strptr, ossimString("\n\tTDILevel = "), "%13c %s", temp))
+      theTDILevel = ossimString(temp).before(";").toInt();
+   else
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+	    << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
+	    << "\n\tAborting construction. Error encountered parsing "
+	    << "presumed meta-data file." << std::endl;
+
+         delete [] filebuf;
+         return false;
+      }
+   }
+
+
+   delete [] filebuf;
+   filebuf = 0;
+
+   if (traceExec())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "DEBUG ossimQuickbirdRpcModel::parseMetaData(data_file): returning..."
+         << std::endl;
+   }
+
+   return true;
+}
+
+//*****************************************************************************
+// PROTECTED METHOD: ossimQuickbirdMetaData::parseGEOData()
+//
+//  Parses the Quickbird GEO file.
+//
+//*****************************************************************************
+bool ossimQuickbirdMetaData::parseGEOData(const ossimFilename& /* data_file */)
+{
+  return true;
+}
+
+//*****************************************************************************
+// PROTECTED METHOD: ossimQuickbirdMetaData::parseRpcData()
+//
+//  Parses the Quickbird EPH file.
+//
+//*****************************************************************************
+bool ossimQuickbirdMetaData::parseEPHData(const ossimFilename& /* data_file */)
+{
+  return true;
+}
+
+//*****************************************************************************
+// PROTECTED METHOD: ossimQuickbirdMetaData::parseRpcData()
+//
+//  Parses the Quickbird ATT file.
+//
+//*****************************************************************************
+bool ossimQuickbirdMetaData::parseATTData(const ossimFilename& /* data_file */)
+{
+  return true;
+}
+
+ossimString ossimQuickbirdMetaData::getSatID() const
+{
+   return theSatID;
+}
+
+//*****************************************************************************
+// PROTECTED METHOD: ossimQuickbirdMetaData::getEndOfLine
+//
+// //  Parse a char * to find another char *. Change the pointer only if the second char * is found.
+//
+//*****************************************************************************
+bool ossimQuickbirdMetaData::getEndOfLine( char * fileBuf,
+                                           ossimString lineBeginning,
+                                           const char * format,
+                                           ossimString & name)
+{
+   //char * res = strstr(fileBuf, lineBeginning.c_str());
+   //if (!res)
+   //{
+   //  return false;
+   // }
+   //// if the lineBeginning is found, update the start pointer adress
+   //fileBuf = res;
+   
+   //char dummy[80], nameChar[80];
+   //sscanf(res, format, dummy, nameChar);    
+   //name = ossimString(nameChar);
+    
+   char * res = strstr(fileBuf, lineBeginning.c_str());
+   if(!res)
+   {
+      return false;
+   }
+   fileBuf = strstr(fileBuf, lineBeginning.c_str());
+   char dummy[80], nameChar[80];
+   sscanf(fileBuf, format, dummy, nameChar);  
+   name = ossimString(nameChar);
+    
+   return true;
+}
+
+const ossimIpt& ossimQuickbirdMetaData::getImageSize() const
+{
+   return theImageSize;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimQuickbirdRpcHeader.cpp b/ossim/src/ossim/support_data/ossimQuickbirdRpcHeader.cpp
new file mode 100644
index 0000000..ba8ab5c
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimQuickbirdRpcHeader.cpp
@@ -0,0 +1,247 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+//----------------------------------------------------------------------------
+// $Id: ossimQuickbirdRpcHeader.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/support_data/ossimQuickbirdRpcHeader.h>
+#include <iostream>
+#include <fstream>
+#include <algorithm>
+#include <iterator>
+
+std::ostream& operator << (std::ostream& out,
+		      const ossimQuickbirdRpcHeader& data)
+{
+   out << "theSatId      = " << data.theSatId << std::endl
+       << "theBandId     = " << data.theBandId << std::endl
+       << "theSpecId     = " << data.theSpecId << std::endl
+       << "theErrBias    = " << data.theErrBias << std::endl
+       << "theLineOffset = " << data.theLineOffset << std::endl
+       << "theSampOffset = " << data.theSampOffset << std::endl
+       << "theLatOffset  = " << data.theLatOffset << std::endl
+       << "theLonOffset  = " << data.theLonOffset << std::endl
+       << "theHeightOffset  = " << data.theHeightOffset << std::endl
+       << "theLineScale  = " << data.theLineScale << std::endl
+       << "theSampScale  = " << data.theSampScale << std::endl
+       << "theLatScale  = " << data.theLatScale << std::endl
+       << "theLonScale  = " << data.theLonScale << std::endl
+       << "theHeightScale  = " << data.theHeightScale << std::endl;
+   
+   out << "lineNumCoef = " << std::endl;
+   std::copy(data.theLineNumCoeff.begin(),
+             data.theLineNumCoeff.end(),
+             std::ostream_iterator<double>(out, "\n"));
+   out << "lineDenCoef = " << std::endl;
+   std::copy(data.theLineDenCoeff.begin(),
+             data.theLineDenCoeff.end(),
+             std::ostream_iterator<double>(out, "\n"));
+   out << "sampNumCoef = " << std::endl;
+   std::copy(data.theSampNumCoeff.begin(),
+             data.theSampNumCoeff.end(),
+             std::ostream_iterator<double>(out, "\n"));
+   out << "sampDenCoef = " << std::endl;
+   std::copy(data.theSampDenCoeff.begin(),
+             data.theSampDenCoeff.end(),
+             std::ostream_iterator<double>(out, "\n"));
+   
+   return out;
+}
+
+
+ossimQuickbirdRpcHeader::ossimQuickbirdRpcHeader()
+{
+}
+
+bool ossimQuickbirdRpcHeader::open(const ossimFilename& file)
+{
+   theFilename = file;
+   std::ifstream in(file.c_str(), std::ios::in|std::ios::binary);
+   
+   char test[64];
+   
+   in.read((char*)test, 63);
+   test[63] = '\0';
+   in.seekg(0);
+   ossimString line = test;
+   line = line.upcase();
+   
+   if(parseNameValue(line))
+   {
+      theErrorStatus = ossimErrorCodes::OSSIM_OK;
+      getline(in,
+              line);
+      while((in)&&(theErrorStatus == ossimErrorCodes::OSSIM_OK))
+      {
+         line = line.upcase();
+         if(line.contains("LINENUMCOEF"))
+         {
+            if(!readCoeff(in, theLineNumCoeff))
+            {
+               setErrorStatus();
+               break;
+            }
+         }
+         else if(line.contains("LINEDENCOEF"))
+         {
+            if(!readCoeff(in, theLineDenCoeff))
+            {
+               setErrorStatus();
+               break;
+            }
+         }
+         else if(line.contains("SAMPNUMCOEF"))
+         {
+            if(!readCoeff(in, theSampNumCoeff))
+            {
+               setErrorStatus();
+               break;
+            }
+         }
+         else if(line.contains("SAMPDENCOEF"))
+         {
+            if(!readCoeff(in, theSampDenCoeff))
+            {
+               setErrorStatus();
+               break;
+            }
+         }
+         else if(!parseNameValue(line))
+         {
+            setErrorStatus();
+            break;
+         }
+         getline(in,
+                 line);
+      }
+   }
+   else
+   {
+      setErrorStatus();
+   }
+   return (theErrorStatus == ossimErrorCodes::OSSIM_OK);
+}
+
+bool ossimQuickbirdRpcHeader::readCoeff(std::istream& in,
+					std::vector<double>& coeff)
+{
+   coeff.clear();
+   bool done = false;
+   ossimString line;
+   while(!in.eof()&&!in.bad()&&!done)
+   {
+      getline(in,
+	      line);
+      line.trim();
+      line.trim(',');
+      if(line.contains(");"))
+      {
+         done = true;
+         line.trim(';');
+         line.trim(')');
+      }
+      coeff.push_back(line.toDouble());
+   }
+   return done;
+}
+
+bool ossimQuickbirdRpcHeader::parseNameValue(const ossimString& line)
+{
+   bool result = true;
+   ossimString lineCopy = line;
+   
+   if(lineCopy.contains("SATID"))
+   {
+      theSatId = lineCopy.after("\"");
+      theSatId = theSatId.before("\"");
+   }
+   else if(lineCopy.contains("BANDID"))
+   {
+      theBandId = lineCopy.after("\"");
+      theBandId = theBandId.before("\"");
+   }
+   else if(lineCopy.contains("SPECID"))
+   {
+      theSpecId = lineCopy.after("\"");
+      theSpecId = theSpecId.before("\"");
+   }
+   else if(lineCopy.contains("BEGIN_GROUP"))
+   {
+   }
+   else if(lineCopy.contains("ERRBIAS"))
+   {
+      lineCopy = lineCopy.after("=");
+      theErrBias = lineCopy.before(";").toDouble();
+   }
+   else if(lineCopy.contains("ERRRAND"))
+   {
+      lineCopy = lineCopy.after("=");
+      theErrRand = lineCopy.before(";").toDouble();
+   }
+   else if(lineCopy.contains("LINEOFFSET"))
+   {
+      lineCopy = lineCopy.after("=");
+      theLineOffset = lineCopy.before(";").toInt();
+   }
+   else if(lineCopy.contains("SAMPOFFSET"))
+   {
+      lineCopy = lineCopy.after("=");
+      theSampOffset = lineCopy.before(";").toInt();
+   }
+   else if(lineCopy.contains("LATOFFSET"))
+   {
+      lineCopy = lineCopy.after("=");
+      theLatOffset = lineCopy.before(";").toDouble();
+   }
+   else if(lineCopy.contains("LONGOFFSET"))
+   {
+      lineCopy = lineCopy.after("=");
+      theLonOffset = lineCopy.before(";").toDouble();
+   }
+   else if(lineCopy.contains("HEIGHTOFFSET"))
+   {
+      lineCopy = lineCopy.after("=");
+      theHeightOffset = lineCopy.before(";").toDouble();
+   }
+   else if(lineCopy.contains("LINESCALE"))
+   {
+      lineCopy = lineCopy.after("=");
+      theLineScale = lineCopy.before(";").toDouble();
+   }
+   else if(lineCopy.contains("SAMPSCALE"))
+   {
+      lineCopy = lineCopy.after("=");
+      theSampScale = lineCopy.before(";").toDouble();
+   }
+   else if(lineCopy.contains("LATSCALE"))
+   {
+      lineCopy = lineCopy.after("=");
+      theLatScale = lineCopy.before(";").toDouble();
+   }
+   else if(lineCopy.contains("LONGSCALE"))
+   {
+      lineCopy = lineCopy.after("=");
+      theLonScale = lineCopy.before(";").toDouble();
+   }
+   else if(lineCopy.contains("HEIGHTSCALE"))
+   {
+      lineCopy = lineCopy.after("=");
+      theHeightScale = lineCopy.before(";").toDouble();
+   }
+   else if(lineCopy.contains("END_GROUP"))
+   {
+   }
+   else if(lineCopy.contains("END"))
+   {
+   }
+   else
+   {
+      result = false;
+   }
+
+   return result;
+}
+
diff --git a/src/ossim/support_data/ossimQuickbirdTile.cpp b/ossim/src/ossim/support_data/ossimQuickbirdTile.cpp
similarity index 100%
rename from src/ossim/support_data/ossimQuickbirdTile.cpp
rename to ossim/src/ossim/support_data/ossimQuickbirdTile.cpp
diff --git a/src/ossim/support_data/ossimRpfAttributeOffsetRecord.cpp b/ossim/src/ossim/support_data/ossimRpfAttributeOffsetRecord.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfAttributeOffsetRecord.cpp
rename to ossim/src/ossim/support_data/ossimRpfAttributeOffsetRecord.cpp
diff --git a/src/ossim/support_data/ossimRpfAttributeSectionSubheader.cpp b/ossim/src/ossim/support_data/ossimRpfAttributeSectionSubheader.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfAttributeSectionSubheader.cpp
rename to ossim/src/ossim/support_data/ossimRpfAttributeSectionSubheader.cpp
diff --git a/ossim/src/ossim/support_data/ossimRpfAttributes.cpp b/ossim/src/ossim/support_data/ossimRpfAttributes.cpp
new file mode 100644
index 0000000..3707dfa
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimRpfAttributes.cpp
@@ -0,0 +1,171 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimRpfAttributes.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <iostream>
+ 
+#include <ossim/support_data/ossimRpfAttributes.h>
+
+std::ostream& operator<<(std::ostream& out,
+                    const ossimRpfAttributes& data)
+{
+   data.print(out);
+   
+   return out;
+}
+
+ossimRpfAttributes::ossimRpfAttributes()
+{
+   clearFields();
+}
+ossimRpfAttributes::~ossimRpfAttributes()
+{
+}
+
+std::ostream& ossimRpfAttributes::print(std::ostream& out,
+                                        const std::string& prefix) const
+{
+   out << prefix << "CurrencyDate: " << theCurrencyDate << "\n"
+       << prefix << "ProductionDate: " << theProductionDate << "\n"
+       << prefix << "SignificantDate: " << theSignificantDate << "\n"
+       << prefix << "ChartSeriesCode: " << theChartSeriesCode << "\n"
+       << prefix << "MapDesignationCode: " << theMapDesignationCode << "\n"
+       << prefix << "OldHorDatum: " << theOldHorDatum << "\n"
+       << prefix << "Edition: " << theEdition << "\n"
+       << prefix << "ProjectionCode: " << theProjectionCode << "\n"
+       << prefix << "ProjectionA: " << theProjectionA << "\n"
+       << prefix << "ProjectionB: " << theProjectionB << "\n"
+       << prefix << "ProjectionC: " << theProjectionC << "\n"
+       << prefix << "ProjectionD: " << theProjectionD << "\n"
+       << prefix << "VertDatumCode: " << theVertDatumCode<< "\n"
+       << prefix << "HorDatumCode: " << theHorDatumCode << "\n"
+       << prefix << "VertAbsAccuracy: " << theVertAbsAccuracy << "\n"
+       << prefix << "VertAbsUnits: " << theVertAbsUnits << "\n"
+       << prefix << "HorAbsAccuracy: " << theHorAbsAccuracy << "\n"
+       << prefix << "HorAbsUnits: " << theHorAbsUnits << "\n"
+       << prefix << "VertRelAccuracy: " << theVertRelAccuracy << "\n"
+       << prefix << "VertRelUnits: " << theVertRelUnits << "\n"
+       << prefix << "HorRelAccuracy: " << theHorRelAccuracy << "\n"
+       << prefix << "HorRelUnits: " << theHorRelUnits << "\n"
+       << prefix << "ellipsoidCode: " << ellipsoidCode << "\n"
+       << prefix << "SoundingDatumCode: " << theSoundingDatumCode << "\n"
+       << prefix << "NavSystemCode: " << theNavSystemCode << "\n"
+       << prefix << "GridCode: " << theGridCode << "\n"
+       << prefix << "EeasterlyMagChange: " << theEeasterlyMagChange << "\n"
+       << prefix << "EasterlyMagChangeUnits: " << theEasterlyMagChangeUnits << "\n"
+       << prefix << "WesterlyMagChange: " << theWesterlyMagChange << "\n"
+       << prefix << "WesterlyMagChangeUnits: " << theWesterlyMagChangeUnits << "\n"
+       << prefix << "MagAngle: " << theMagAngle << "\n"
+       << prefix << "GridConver: " << theGridConver << "\n"
+       << prefix << "GridConverUnits: " << theGridConverUnits << "\n"
+       << prefix << "HighElevation: " << theHighElevation << "\n"
+       << prefix << "HighElevationUnits: " << theHighElevationUnits << "\n"
+       << prefix << "HighLat: " << theHighLat << "\n"
+       << prefix << "HighLon: " << theHighLon << "\n"
+       << prefix << "LegendFileName: " << theLegendFileName << "\n"
+       << prefix << "DataSource: " << theDataSource << "\n"
+       << prefix << "gsd: " << theGsd << "\n"
+       << prefix << "DataLevel: " << theDataLevel << std::endl;
+   return out;
+}
+
+bool ossimRpfAttributes::isEmpty()const
+{
+   for(std::map<ossim_uint32, bool>::const_iterator iter= theAttributeIdBoolMap.begin();
+       iter != theAttributeIdBoolMap.end();++iter)
+   {
+      if(iter->second!=false)
+      {
+         return false;
+      }
+   }
+   return true;
+}
+
+void ossimRpfAttributes::clearFields()
+{
+   theCurrencyDate    = "";
+   theProductionDate  = "";
+   theSignificantDate = "";
+   theChartSeriesCode = "";
+   theMapDesignationCode = "";
+   theOldHorDatum = "";
+   theEdition = "";
+   theProjectionCode = "";
+   theProjectionA = 0.0;
+   theProjectionB = 0.0;
+   theProjectionC = 0.0;
+   theProjectionD = 0.0;
+   theVertDatumCode = "";
+   theHorDatumCode = "";
+   theVertAbsAccuracy = 0;
+   theVertAbsUnits = 0;
+   theHorAbsAccuracy = 0;
+   theHorAbsUnits    = 0;
+   theVertRelAccuracy = 0;
+   theVertRelUnits = 0;
+   theHorRelAccuracy = 0;
+   theHorRelUnits = 0;
+   ellipsoidCode = "";
+   theSoundingDatumCode = "";
+   theNavSystemCode = 0;
+   theGridCode = "";
+   theEeasterlyMagChange = 0.0;
+   theEasterlyMagChangeUnits = 0;
+   theWesterlyMagChange = 0.0;
+   theWesterlyMagChangeUnits = 0;
+   theMagAngle = 0.0;
+   theMagAngleUnits = 0;
+   theGridConver = 0.0;
+   theGridConverUnits = 0;
+   theHighElevation = 0.0;
+   theHighElevationUnits = 0;
+   theHighLat = 0.0;
+   theHighLon = 0.0;
+   theLegendFileName = "";
+   theDataSource = "";
+   theGsd = 0;
+   theDataLevel = 0;
+
+   theAttributeIdBoolMap.clear();
+}
+
+void ossimRpfAttributes::setAttributeFlag(ossim_uint32 id,
+                                          bool flag)
+{
+   std::map<ossim_uint32, bool>::iterator iter = theAttributeIdBoolMap.find(id);
+
+   if(iter != theAttributeIdBoolMap.end())
+   {
+      if(flag)
+      {
+         iter->second = flag;
+      }
+      else
+      {
+         theAttributeIdBoolMap.erase(iter); 
+      }
+   }
+   else if(flag)
+   {
+	   theAttributeIdBoolMap.insert(std::make_pair(id, flag));
+   }
+}
+
+bool ossimRpfAttributes::getAttributeFlag(ossim_uint32 id)const
+{
+   std::map<ossim_uint32, bool>::const_iterator iter = theAttributeIdBoolMap.find(id);
+
+   if(iter != theAttributeIdBoolMap.end())
+   {
+      return iter->second;
+   }
+
+   return false;
+}
+
diff --git a/src/ossim/support_data/ossimRpfBoundaryRectRecord.cpp b/ossim/src/ossim/support_data/ossimRpfBoundaryRectRecord.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfBoundaryRectRecord.cpp
rename to ossim/src/ossim/support_data/ossimRpfBoundaryRectRecord.cpp
diff --git a/src/ossim/support_data/ossimRpfBoundaryRectSectionSubheader.cpp b/ossim/src/ossim/support_data/ossimRpfBoundaryRectSectionSubheader.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfBoundaryRectSectionSubheader.cpp
rename to ossim/src/ossim/support_data/ossimRpfBoundaryRectSectionSubheader.cpp
diff --git a/src/ossim/support_data/ossimRpfBoundaryRectTable.cpp b/ossim/src/ossim/support_data/ossimRpfBoundaryRectTable.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfBoundaryRectTable.cpp
rename to ossim/src/ossim/support_data/ossimRpfBoundaryRectTable.cpp
diff --git a/src/ossim/support_data/ossimRpfColorConverterOffsetRecord.cpp b/ossim/src/ossim/support_data/ossimRpfColorConverterOffsetRecord.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfColorConverterOffsetRecord.cpp
rename to ossim/src/ossim/support_data/ossimRpfColorConverterOffsetRecord.cpp
diff --git a/ossim/src/ossim/support_data/ossimRpfColorConverterSubsection.cpp b/ossim/src/ossim/support_data/ossimRpfColorConverterSubsection.cpp
new file mode 100644
index 0000000..1252f6d
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimRpfColorConverterSubsection.cpp
@@ -0,0 +1,131 @@
+//*******************************************************************
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//********************************************************************
+// $Id: ossimRpfColorConverterSubsection.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/support_data/ossimRpfColorConverterSubsection.h>
+#include <ossim/support_data/ossimRpfColorConverterOffsetRecord.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimErrorCodes.h>
+
+ostream& operator <<(ostream& out,
+                     const ossimRpfColorConverterSubsection& data)
+{
+   data.print(out);
+   
+   return out;
+}
+
+ossimRpfColorConverterSubsection::ossimRpfColorConverterSubsection()
+{
+   theNumberOfColorConverterOffsetRecords = 0;
+   clearFields();
+}
+
+void ossimRpfColorConverterSubsection::clearFields()
+{
+   theColorConverterOffsetTableOffset     = 0;
+   theColorConverterOffsetRecordLength    = 0;
+   theConverterRecordLength               = 0;
+
+   theTableList.clear();
+}
+
+const ossimRpfColorConverterTable* ossimRpfColorConverterSubsection::getColorConversionTable(ossim_uint32 givenThisNumberOfEntires)const
+{
+   vector<ossimRpfColorConverterTable>::const_iterator listElement = theTableList.begin();
+
+   while(listElement != theTableList.end())
+   {
+      if((*listElement).getNumberOfEntries() == givenThisNumberOfEntires)
+      {
+         return &(*listElement);
+      }
+   }
+
+   return NULL;
+}
+
+ossimErrorCode ossimRpfColorConverterSubsection::parseStream(istream& in,
+                                                             ossimByteOrder byteOrder)
+{
+   if(in)
+   {
+      clearFields();
+
+      // this is the start of the subsection
+      theStartOffset = in.tellg();
+      in.read((char*)&theColorConverterOffsetTableOffset, 4);
+      in.read((char*)&theColorConverterOffsetRecordLength, 2);
+      in.read((char*)&theConverterRecordLength, 2);
+
+      // this grabs the end of the subsection
+      theEndOffset   = in.tellg();
+
+      ossimEndian anEndian;
+
+      if(anEndian.getSystemEndianType() != byteOrder)
+      {
+         anEndian.swap(theColorConverterOffsetTableOffset);
+         anEndian.swap(theColorConverterOffsetRecordLength);
+         anEndian.swap(theConverterRecordLength);
+
+      }
+      theTableList.resize(theNumberOfColorConverterOffsetRecords);
+      for(unsigned long index = 0;
+          index < theNumberOfColorConverterOffsetRecords;
+          ++index)
+      {
+         ossimRpfColorConverterOffsetRecord recordInfo;
+         
+         if(recordInfo.parseStream(in, byteOrder) ==
+            ossimErrorCodes::OSSIM_OK)
+         {
+            unsigned long rememberGet = in.tellg();
+
+            theTableList[index].setNumberOfEntries(recordInfo.theNumberOfColorConverterRecords);
+            theTableList[index].setTableId(recordInfo.theColorConverterTableId);
+            in.seekg(theStartOffset + recordInfo.theColorConverterTableOffset, ios::beg);
+            theTableList[index].parseStream(in, byteOrder);
+            
+            in.seekg(rememberGet, ios::beg);
+         }
+         else
+         {
+            return ossimErrorCodes::OSSIM_ERROR;
+         }
+      }
+   }
+   else
+   {
+      return ossimErrorCodes::OSSIM_ERROR;
+   }
+
+   return ossimErrorCodes::OSSIM_OK;
+}
+
+void ossimRpfColorConverterSubsection::setNumberOfColorConverterOffsetRecords(ossim_uint16 numberOfRecords)
+{
+   theNumberOfColorConverterOffsetRecords = numberOfRecords;
+}
+
+void ossimRpfColorConverterSubsection::print(ostream& out)const
+{
+   out << "theColorConverterOffsetTableOffset:      "
+       << theColorConverterOffsetTableOffset << endl
+       << "theColorConverterOffsetRecordLength:     "
+       << theColorConverterOffsetRecordLength << endl
+       << "theConverterRecordLength:                "
+       << theConverterRecordLength << endl;
+
+   copy(theTableList.begin(),
+        theTableList.end(),
+        ostream_iterator<ossimRpfColorConverterTable>(out, "\n"));
+}
+
diff --git a/src/ossim/support_data/ossimRpfColorConverterTable.cpp b/ossim/src/ossim/support_data/ossimRpfColorConverterTable.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfColorConverterTable.cpp
rename to ossim/src/ossim/support_data/ossimRpfColorConverterTable.cpp
diff --git a/src/ossim/support_data/ossimRpfColorGrayscaleOffsetRecord.cpp b/ossim/src/ossim/support_data/ossimRpfColorGrayscaleOffsetRecord.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfColorGrayscaleOffsetRecord.cpp
rename to ossim/src/ossim/support_data/ossimRpfColorGrayscaleOffsetRecord.cpp
diff --git a/src/ossim/support_data/ossimRpfColorGrayscaleSubheader.cpp b/ossim/src/ossim/support_data/ossimRpfColorGrayscaleSubheader.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfColorGrayscaleSubheader.cpp
rename to ossim/src/ossim/support_data/ossimRpfColorGrayscaleSubheader.cpp
diff --git a/src/ossim/support_data/ossimRpfColorGrayscaleTable.cpp b/ossim/src/ossim/support_data/ossimRpfColorGrayscaleTable.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfColorGrayscaleTable.cpp
rename to ossim/src/ossim/support_data/ossimRpfColorGrayscaleTable.cpp
diff --git a/src/ossim/support_data/ossimRpfComponentIdLut.cpp b/ossim/src/ossim/support_data/ossimRpfComponentIdLut.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfComponentIdLut.cpp
rename to ossim/src/ossim/support_data/ossimRpfComponentIdLut.cpp
diff --git a/src/ossim/support_data/ossimRpfCompressionLookupOffsetRecord.cpp b/ossim/src/ossim/support_data/ossimRpfCompressionLookupOffsetRecord.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfCompressionLookupOffsetRecord.cpp
rename to ossim/src/ossim/support_data/ossimRpfCompressionLookupOffsetRecord.cpp
diff --git a/src/ossim/support_data/ossimRpfCompressionSection.cpp b/ossim/src/ossim/support_data/ossimRpfCompressionSection.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfCompressionSection.cpp
rename to ossim/src/ossim/support_data/ossimRpfCompressionSection.cpp
diff --git a/src/ossim/support_data/ossimRpfCompressionSectionSubheader.cpp b/ossim/src/ossim/support_data/ossimRpfCompressionSectionSubheader.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfCompressionSectionSubheader.cpp
rename to ossim/src/ossim/support_data/ossimRpfCompressionSectionSubheader.cpp
diff --git a/ossim/src/ossim/support_data/ossimRpfCoverageSection.cpp b/ossim/src/ossim/support_data/ossimRpfCoverageSection.cpp
new file mode 100644
index 0000000..b82407f
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimRpfCoverageSection.cpp
@@ -0,0 +1,296 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+// 
+// Description: Rpf support class
+// 
+//********************************************************************
+// $Id: ossimRpfCoverageSection.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <istream>
+#include <iostream>
+
+#include <ossim/support_data/ossimRpfCoverageSection.h>
+#include <ossim/base/ossimCommon.h> /* ossim::byteOrder */
+#include <ossim/base/ossimEndian.h>
+
+std::ostream& operator <<(std::ostream &out, const ossimRpfCoverageSection &data)
+{
+   return data.print(out);
+}
+
+ossimRpfCoverageSection::ossimRpfCoverageSection()
+   :
+   theUpperLeftLat(0.0),
+   theUpperLeftLon(0.0),
+
+   theLowerLeftLat(0.0),
+   theLowerLeftLon(0.0),
+
+   theUpperRightLat(0.0),
+   theUpperRightLon(0.0),
+
+   theLowerRightLat(0.0),
+   theLowerRightLon(0.0),
+
+   theVerticalResolution(0.0),
+   theHorizontalResolution(0.0),
+
+   theVerticalInterval(0.0),
+   theHorizontalInterval(0.0)
+{
+}
+
+ossimRpfCoverageSection::ossimRpfCoverageSection(const ossimRpfCoverageSection& obj)
+   :
+   theUpperLeftLat(obj.theUpperLeftLat),
+   theUpperLeftLon(obj.theUpperLeftLon),
+
+   theLowerLeftLat(obj.theLowerLeftLat),
+   theLowerLeftLon(obj.theLowerLeftLon),
+
+   theUpperRightLat(obj.theUpperRightLat),
+   theUpperRightLon(obj.theUpperRightLon),
+
+   theLowerRightLat(obj.theLowerRightLat),
+   theLowerRightLon(obj.theLowerRightLon),
+
+   theVerticalResolution(obj.theVerticalResolution),
+   theHorizontalResolution(obj.theHorizontalResolution),
+
+   theVerticalInterval(obj.theVerticalInterval),
+   theHorizontalInterval(obj.theHorizontalInterval)
+{
+}
+
+const ossimRpfCoverageSection& ossimRpfCoverageSection::operator=(
+   const ossimRpfCoverageSection& rhs)
+{
+   if ( this != & rhs )
+   {
+      theUpperLeftLat = rhs.theUpperLeftLat;
+      theUpperLeftLon = rhs.theUpperLeftLon;
+      
+      theLowerLeftLat = rhs.theLowerLeftLat;
+      theLowerLeftLon = rhs.theLowerLeftLon;
+      
+      theUpperRightLat = rhs.theUpperRightLat;
+      theUpperRightLon = rhs.theUpperRightLon;
+      
+      theLowerRightLat = rhs.theLowerRightLat;
+      theLowerRightLon = rhs.theLowerRightLon;
+      
+      theVerticalResolution = rhs.theVerticalResolution;
+      theHorizontalResolution = rhs.theHorizontalResolution;
+      
+      theVerticalInterval = rhs.theVerticalInterval;
+      theHorizontalInterval = rhs.theHorizontalInterval;
+   }
+   return *this;
+}
+
+ossimErrorCode ossimRpfCoverageSection::parseStream(std::istream &in,
+                                                    ossimByteOrder byteOrder)
+{
+   if(in)
+   {
+      in.read((char*)&theUpperLeftLat,  8);
+      in.read((char*)&theUpperLeftLon,  8);
+      in.read((char*)&theLowerLeftLat,  8);
+      in.read((char*)&theLowerLeftLon,  8);
+      in.read((char*)&theUpperRightLat, 8);
+      in.read((char*)&theUpperRightLon, 8);
+      in.read((char*)&theLowerRightLat, 8);
+      in.read((char*)&theLowerRightLon, 8);
+      in.read((char*)&theVerticalResolution,   8);
+      in.read((char*)&theHorizontalResolution, 8);
+      in.read((char*)&theVerticalInterval,     8);
+      in.read((char*)&theHorizontalInterval,   8);
+
+      if( ossim::byteOrder()  != byteOrder )
+      {
+         ossimEndian anEndian;
+         anEndian.swap(theUpperLeftLat);
+         anEndian.swap(theUpperLeftLon);
+         anEndian.swap(theLowerLeftLat);
+         anEndian.swap(theLowerLeftLon);
+         anEndian.swap(theUpperRightLat);
+         anEndian.swap(theUpperRightLon);
+         anEndian.swap(theLowerRightLat);
+         anEndian.swap(theLowerRightLon);
+         anEndian.swap(theVerticalResolution);
+         anEndian.swap(theHorizontalResolution);
+         anEndian.swap(theVerticalInterval);
+         anEndian.swap(theHorizontalInterval);
+      }
+   }
+   else
+   {
+      return ossimErrorCodes::OSSIM_ERROR;
+   }
+
+   return ossimErrorCodes::OSSIM_OK;
+}
+
+void ossimRpfCoverageSection::writeStream(std::ostream& out)
+{
+   ossimEndian anEndian;
+
+   if( anEndian.getSystemEndianType() != OSSIM_BIG_ENDIAN )
+   {
+      // Always write out big endian.
+      anEndian.swap(theUpperLeftLat);
+      anEndian.swap(theUpperLeftLon);
+      anEndian.swap(theLowerLeftLat);
+      anEndian.swap(theLowerLeftLon);
+      anEndian.swap(theUpperRightLat);
+      anEndian.swap(theUpperRightLon);
+      anEndian.swap(theLowerRightLat);
+      anEndian.swap(theLowerRightLon);
+      anEndian.swap(theVerticalResolution);
+      anEndian.swap(theHorizontalResolution);
+      anEndian.swap(theVerticalInterval);
+      anEndian.swap(theHorizontalInterval);
+   }     
+   
+   out.write((char*)&theUpperLeftLat,  8);
+   out.write((char*)&theUpperLeftLon,  8);
+   out.write((char*)&theLowerLeftLat,  8);
+   out.write((char*)&theLowerLeftLon,  8);
+   out.write((char*)&theUpperRightLat, 8);
+   out.write((char*)&theUpperRightLon, 8);
+   out.write((char*)&theLowerRightLat, 8);
+   out.write((char*)&theLowerRightLon, 8);
+   out.write((char*)&theVerticalResolution,   8);
+   out.write((char*)&theHorizontalResolution, 8);
+   out.write((char*)&theVerticalInterval,     8);
+   out.write((char*)&theHorizontalInterval,   8);
+   
+   if( anEndian.getSystemEndianType() != OSSIM_BIG_ENDIAN )
+   {
+      // Swap back to native byte order.
+      anEndian.swap(theUpperLeftLat);
+      anEndian.swap(theUpperLeftLon);
+      anEndian.swap(theLowerLeftLat);
+      anEndian.swap(theLowerLeftLon);
+      anEndian.swap(theUpperRightLat);
+      anEndian.swap(theUpperRightLon);
+      anEndian.swap(theLowerRightLat);
+      anEndian.swap(theLowerRightLon);
+      anEndian.swap(theVerticalResolution);
+      anEndian.swap(theHorizontalResolution);
+      anEndian.swap(theVerticalInterval);
+      anEndian.swap(theHorizontalInterval);
+   }
+}
+
+std::ostream& ossimRpfCoverageSection::print(
+   std::ostream& out, const std::string& prefix) const
+{
+   out << prefix << "ul_lat: "
+       << theUpperLeftLat << "\n"
+       << prefix << "ul_lon: "
+       << theUpperLeftLon << "\n"
+       << prefix << "ll_lat: "
+       << theLowerLeftLat << "\n"
+       << prefix << "ll_lon: "
+       << theLowerLeftLon << "\n"
+       << prefix << "ur_lat: "
+       << theUpperRightLat << "\n"
+       << prefix << "ur_lon: "
+       << theUpperRightLon << "\n"
+       << prefix << "lr_lat: "
+       << theLowerRightLat << "\n"
+       << prefix << "lr_lon: "
+       << theLowerRightLon << "\n"
+       << prefix << "vertical_resolution: "
+       << theVerticalResolution << "\n"
+       << prefix << "horizontal_resolution: "
+       << theHorizontalResolution << "\n"
+       << prefix << "vertical_interval: "
+       << theVerticalInterval << "\n"
+       << prefix << "horizontal_interval: "
+       << theHorizontalInterval << std::endl;
+   return out;
+}
+
+void ossimRpfCoverageSection::clearFields()
+{
+   theUpperLeftLat  = 0.0;
+   theUpperLeftLon  = 0.0;
+   theLowerLeftLat  = 0.0;
+   theLowerLeftLon  = 0.0;
+   theUpperRightLat = 0.0;
+   theUpperRightLon = 0.0;
+   theLowerRightLat = 0.0;
+   theLowerRightLon = 0.0;
+   theVerticalResolution   = 0.0;
+   theHorizontalResolution = 0.0;
+   theVerticalInterval     = 0.0;
+   theHorizontalInterval   = 0.0;
+}
+
+void ossimRpfCoverageSection::setUlLat(ossim_float64 value)
+{
+   theUpperLeftLat = value;
+}
+
+void ossimRpfCoverageSection::setUlLon(ossim_float64 value)
+{
+   theUpperLeftLon = value;
+}
+
+void ossimRpfCoverageSection::setLlLat(ossim_float64 value)
+{
+   theLowerLeftLat = value;
+}
+
+void ossimRpfCoverageSection::setLlLon(ossim_float64 value)
+{
+   theLowerLeftLon = value;
+}
+
+void ossimRpfCoverageSection::setLrLat(ossim_float64 value)
+{
+   theLowerRightLat = value;
+}
+
+void ossimRpfCoverageSection::setLrLon(ossim_float64 value)
+{
+   theLowerRightLon = value;
+}
+
+void ossimRpfCoverageSection::setUrLat(ossim_float64 value)
+{
+   theUpperRightLat = value;
+}
+
+void ossimRpfCoverageSection::setUrLon(ossim_float64 value)
+{
+   theUpperRightLon = value;
+}
+
+void ossimRpfCoverageSection::setVerticalResolution(ossim_float64 value)
+{
+   theVerticalResolution = value;
+}
+
+void ossimRpfCoverageSection::setHorizontalResolution(ossim_float64 value)
+{
+   theHorizontalResolution = value;
+}
+
+void ossimRpfCoverageSection::setVerticalInterval(ossim_float64 value)
+{
+   theVerticalInterval = value;
+}
+
+void ossimRpfCoverageSection::setHorizontalInterval(ossim_float64 value)
+{
+   theHorizontalInterval = value;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimRpfFrame.cpp b/ossim/src/ossim/support_data/ossimRpfFrame.cpp
new file mode 100644
index 0000000..14c950d
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimRpfFrame.cpp
@@ -0,0 +1,1130 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+// Description: This class give the capability to access tiles from an
+//              rpf file.
+//
+//********************************************************************
+// $Id: ossimRpfFrame.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/support_data/ossimRpfFrame.h>
+#include <ossim/support_data/ossimRpfHeader.h>
+#include <ossim/support_data/ossimRpfAttributes.h>
+#include <ossim/support_data/ossimRpfAttributeOffsetRecord.h>
+#include <ossim/support_data/ossimRpfAttributeSectionSubheader.h>
+#include <ossim/support_data/ossimRpfCoverageSection.h>
+#include <ossim/support_data/ossimRpfImageDescriptionSubheader.h>
+#include <ossim/support_data/ossimRpfImageDisplayParameterSubheader.h>
+#include <ossim/support_data/ossimRpfMaskSubheader.h>
+#include <ossim/support_data/ossimRpfCompressionSection.h>
+#include <ossim/support_data/ossimRpfColorGrayscaleSubheader.h>
+#include <ossim/support_data/ossimRpfColorGrayscaleOffsetRecord.h>
+#include <ossim/support_data/ossimRpfColorConverterSubsection.h>
+#include <ossim/support_data/ossimRpfColorConverterTable.h>
+#include <ossim/support_data/ossimRpfColorGrayscaleTable.h>
+#include <ossim/support_data/ossimRpfLocationSection.h>
+#include <ossim/support_data/ossimRpfColorConverterSubsection.h>
+#include <ossim/support_data/ossimRpfConstants.h>
+#include <ossim/support_data/ossimRpfReplaceUpdateRecord.h>
+#include <ossim/support_data/ossimRpfReplaceUpdateSectionSubheader.h>
+#include <ossim/support_data/ossimNitfFile.h>
+#include <ossim/support_data/ossimNitfFileHeader.h>
+#include <ossim/support_data/ossimNitfTagInformation.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimErrorCodes.h>
+#include <ossim/base/ossimTrace.h>
+#include <istream>
+#include <ostream>
+
+static const ossimTrace traceDebug("ossimRpfFrame:debug");
+
+std::ostream& operator <<(std::ostream& out, const ossimRpfFrame& data)
+{
+   data.print(out);
+   
+   return out;
+}
+
+ossimRpfFrame::ossimRpfFrame()
+   :theHeader(0),
+    theFilename(""),
+    theCoverage(0),
+    theAttributes(0),
+    theImageDescriptionSubheader(0),
+    theMaskSubheader(0),
+    theImageDisplayParameterSubheader(0),
+    theCompressionSection(0),
+    theColorGrayscaleSubheader(0),
+    theColorConverterSubsection(0),
+    theNitfFile(0),
+    theSubframeMaskTable(0),
+    theSubframeTransparencyMaskTable(0),
+    theReplaceUpdateTable(0)
+{
+}
+
+ossimRpfFrame::~ossimRpfFrame()
+{
+   deleteAll();
+}
+
+std::ostream& ossimRpfFrame::print(std::ostream& out, const std::string& prefix) const
+{
+   if (traceDebug())
+   {
+      out << "begin_rpf_frame_print:\n";
+   }
+   
+   if(theHeader)
+   {
+      theHeader->print(out, prefix);
+   }
+
+   out << prefix << "filename: " << theFilename << "\n";
+
+   if ( theReplaceUpdateTable.valid() )
+   {
+      theReplaceUpdateTable->print(out, prefix);
+   }
+
+   if (traceDebug())
+   {
+      if(theCoverage)
+      {
+         theCoverage->print(out, prefix);
+      }
+   }
+
+   if(theAttributes)
+   {
+      theAttributes->print(out, prefix);
+   }
+
+   if (traceDebug())
+   {
+      if(theImageDescriptionSubheader)
+      {
+         theImageDescriptionSubheader->print(out, prefix);
+      }
+      
+      if(theMaskSubheader)
+      {
+         out << *theMaskSubheader << endl;
+      }
+      if(theImageDisplayParameterSubheader)
+      {
+         out << *theImageDisplayParameterSubheader << endl;
+      }
+      if(theCompressionSection)
+      {
+         out << *theCompressionSection << endl;
+      }
+      if(theColorGrayscaleSubheader)
+      {
+         out << *theColorGrayscaleSubheader << endl;
+      }
+      if(theColorConverterSubsection)
+      {
+         out << *theColorConverterSubsection << endl;
+      }
+      
+      copy(theColorGrayscaleTable.begin(),
+           theColorGrayscaleTable.end(),
+           ostream_iterator<ossimRpfColorGrayscaleTable>(out, "\n"));
+      
+      if(theImageDescriptionSubheader&&
+         !(theImageDescriptionSubheader->isSubframeMaskTableOffsetNull()))
+      {
+         out << "Subframe Mask Table:" << endl;
+         unsigned long spectralIndex;
+         unsigned long rowIndex;
+         unsigned long colIndex;
+         // first loop through the Mask table and allocate while we do it
+         for(spectralIndex = 0;
+             spectralIndex < theImageDescriptionSubheader->getNumberOfSpectralGroups();
+             ++spectralIndex)
+         {
+            for(rowIndex = 0;
+                rowIndex < theImageDescriptionSubheader->getNumberOfSubframesVertical();
+                ++rowIndex)
+            {
+               for(colIndex = 0;
+                   colIndex < theImageDescriptionSubheader->getNumberOfSubframesHorizontal();
+                   ++colIndex)
+               {
+                  if( theSubframeMaskTable[spectralIndex][rowIndex][colIndex] == OSSIM_RPF_ULONG_NULL)
+                  {
+                     out << "NULL ";
+                  }
+                  else
+                  {
+                     out << theSubframeMaskTable[spectralIndex][rowIndex][colIndex] << " ";
+                  }
+               }
+               out << endl;
+            }
+         }
+      }
+
+
+      if(theImageDescriptionSubheader&&
+         !(theImageDescriptionSubheader->isTransparencyMaskTableOffsetNull()))
+      {
+         out << "Transparency Mask Table:" << endl;
+         unsigned long spectralIndex;
+         unsigned long rowIndex;
+         unsigned long colIndex;
+         // first loop through the Mask table and allocate while we do it
+         for(spectralIndex = 0;
+             spectralIndex < theImageDescriptionSubheader->getNumberOfSpectralGroups();
+             ++spectralIndex)
+         {
+            for(rowIndex = 0;
+                rowIndex < theImageDescriptionSubheader->getNumberOfSubframesVertical();
+                ++rowIndex)
+            {
+               for(colIndex = 0;
+                   colIndex < theImageDescriptionSubheader->getNumberOfSubframesHorizontal();
+                   ++colIndex)
+               {
+                  if( theSubframeTransparencyMaskTable[spectralIndex][rowIndex][colIndex] == OSSIM_RPF_ULONG_NULL)
+                  {
+                     out << "NULL ";
+                  }
+                  else
+                  {
+                     out << theSubframeTransparencyMaskTable[spectralIndex][rowIndex][colIndex] << " ";
+                  }
+               }
+            }
+         }
+      }
+
+
+      
+      out << "end_rpf_frame_print:\n";
+      
+   } // matches:  if (traceDebug())
+
+   out << std::endl;
+   
+   return out;
+}
+
+ossimErrorCode ossimRpfFrame::parseFile(const ossimFilename& filename,
+                                        bool minimalParse)
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimRpfFrame::parseFile: entered......" << std::endl;
+   }
+   ossimErrorCode result = ossimErrorCodes::OSSIM_OK;
+
+   //Make sure any fileds have beend cleared
+   clearFields();
+
+   // Make sure all data is deleted.  The initialize call the
+   // populate methods.  These methods will re-allocate the information
+   deleteAll();
+
+
+   theNitfFile = new ossimNitfFile;
+   theNitfFile->parseFile(filename);
+   
+   const ossimRefPtr<ossimNitfFileHeader> nitfFileHeader =
+      theNitfFile.valid() ? theNitfFile->getHeader() : 0;
+
+   if(!nitfFileHeader)
+   {
+      theNitfFile = 0;
+
+      return ossimErrorCodes::OSSIM_ERROR;
+   }
+   ossimNitfTagInformation info;
+   nitfFileHeader->getTag(info, "RPFHDR");
+
+   theFilename = filename;
+   if(info.getTagName() == "RPFHDR")
+   {
+      ifstream in(filename.c_str(), ios::in|ios::binary);
+      // set the get pointer for the stream to the start
+      // of the Rpf header data
+      in.seekg(info.getTagDataOffset(), ios::beg);
+
+      if(theHeader) delete theHeader;
+      theHeader = new ossimRpfHeader;
+      
+      // if(theHeader->parseStream(in) != ossimErrorCodes::OSSIM_OK)
+      theHeader->parseStream(in);
+
+      if ( in.fail() )
+      {
+         deleteAll();
+         
+         return ossimErrorCodes::OSSIM_ERROR;
+      }
+      else
+         // if(!in.fail()&&theHeader)
+      {
+         result = populateAttributeSection(in);
+
+         // This is needed for ossim-rpf --list-frames so NOT put in full parse section.
+         if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
+         {
+            result = populateReplaceUpdateTable(in);
+         }
+
+         if ( minimalParse == false )
+         {
+            if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
+            {
+               populateCompressionSection(in);
+            }
+            if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
+            {
+               result = populateCoverageSection(in);
+            }
+            if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
+            {
+               result = populateImageSection(in);
+            }
+            if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
+            {
+               result = populateColorGrayscaleSection(in);
+            }
+            if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
+            {
+               result = populateMasks(in);
+            }
+         }
+      }
+   }
+   else
+   {
+      return ossimErrorCodes::OSSIM_ERROR;
+   }
+
+   return ossimErrorCodes::OSSIM_OK;
+}
+
+bool ossimRpfFrame::hasSubframeMaskTable()const
+{
+   if(theImageDescriptionSubheader)
+   {
+      return (!theImageDescriptionSubheader->isSubframeMaskTableOffsetNull());
+   }
+
+   return false;
+          
+}
+
+bool ossimRpfFrame::fillSubFrameBuffer(ossim_uint8* buffer,
+                                       ossim_uint32 /* spectralGroup */,
+                                       ossim_uint32 row,
+                                       ossim_uint32 col)const
+{
+   if(theImageDescriptionSubheader &&
+      theImageDisplayParameterSubheader&&
+      theHeader&&
+      (col < theImageDescriptionSubheader->getNumberOfSubframesHorizontal()) &&
+      (row < theImageDescriptionSubheader->getNumberOfSubframesVertical()))
+   {
+      ossimRpfComponentLocationRecord info;
+      
+      if(!theHeader->getLocationSection()->getComponent(OSSIM_RPF_SPATIAL_DATA_SUBSECTION, info))
+      {
+         return false;
+      }
+      
+      ossim_uint32 offset = info.m_componentLocation;
+      ossim_uint32 bytesPerSubframe = 0;
+
+      // note that the code length is bit encoded so we must devide by 8
+      // in order to get the byte offset instead of the bit offset.  We
+      // then add that to the start of the spatial data section which is
+      // the current value of offset.
+      bytesPerSubframe = (theImageDisplayParameterSubheader->getNumberOfImageRows()*
+                          theImageDisplayParameterSubheader->getNumberOfImageCodesPerRow()*
+                          theImageDisplayParameterSubheader->getImageCodeLength())/8;
+      
+         
+      if(hasSubframeMaskTable())
+      {
+         // check to see if the offset is NULL.  If it is
+         // then just return false to let the caller know that the
+         // buffer did not exist.
+         if(theSubframeMaskTable[0][row][col] != OSSIM_RPF_ULONG_NULL)
+         {
+            offset += theSubframeMaskTable[0][row][col];
+         }
+         else
+         {
+            return false;
+         }
+      }
+      else
+      {
+         ossim_uint32 bytes = bytesPerSubframe*(row*theImageDescriptionSubheader->getNumberOfSubframesHorizontal()+
+                                                col);
+         offset += bytes;
+      }
+      
+      // now since we have the adjustment and we got to this point then
+      // we can read in the data into the destination buffer.
+      ifstream in(theFilename.c_str(), ios::in|ios::binary);
+      if(!in.fail())
+      {
+         in.seekg(offset, ios::beg);
+         in.read((char*)buffer, bytesPerSubframe);
+         if(in.fail())
+         {
+            return false;
+         }
+      }
+      else
+      {
+         return false;
+      }
+   }
+   else
+   {
+      // this is if it was not within the rows and cols of
+      // the subframe or if the image description header didn't exist
+      return false;
+   }
+
+   return true;
+}
+
+void ossimRpfFrame::clearFields()
+{   
+   theFilename = "";
+}
+
+void ossimRpfFrame::deleteAll()
+{
+   if(theHeader)
+   {
+      delete theHeader;
+      theHeader = 0;
+   }
+   if(theAttributes)
+   {
+      delete theAttributes;
+      theAttributes = 0;
+   }
+   if(theCoverage)
+   {
+      delete theCoverage;
+      theCoverage = 0;
+   }
+   if(theImageDescriptionSubheader)
+   {
+      delete theImageDescriptionSubheader;
+      theImageDescriptionSubheader = 0;
+   }
+   if(theMaskSubheader)
+   {
+      delete theMaskSubheader;
+      theMaskSubheader = 0;
+   }
+   if(theImageDisplayParameterSubheader)
+   {
+      delete theImageDisplayParameterSubheader;
+      theImageDisplayParameterSubheader = 0;
+   }
+   if(theCompressionSection)
+   {
+      delete theCompressionSection;
+      theCompressionSection = 0;
+   }
+   if(theColorGrayscaleSubheader)
+   {
+      delete theColorGrayscaleSubheader;
+      theColorGrayscaleSubheader = 0;
+   }
+   if(theColorConverterSubsection)
+   {
+      delete theColorConverterSubsection;
+      theColorConverterSubsection = 0;
+   }
+   if (theNitfFile.valid())
+   {
+      theNitfFile = 0;
+   }
+}
+
+ossimErrorCode ossimRpfFrame::populateCoverageSection(istream& in)
+{
+   if(theCoverage) delete theCoverage;
+   theCoverage = 0;
+   if(theHeader)
+   {
+      theCoverage = theHeader->getNewCoverageSection(in);
+   }
+   return ossimErrorCodes::OSSIM_OK;
+}
+
+ossimErrorCode ossimRpfFrame::populateCompressionSection(istream& in)
+{
+   if(theCompressionSection) delete theCompressionSection;
+   theCompressionSection = 0;
+   if(theHeader)
+   {
+      theCompressionSection = theHeader->getNewCompressionSection(in);
+   }
+   return ossimErrorCodes::OSSIM_OK;
+}
+
+ossimErrorCode ossimRpfFrame::populateColorGrayscaleSection(istream& in)
+{
+   ossimErrorCode resultError = ossimErrorCodes::OSSIM_OK;
+   if(theColorGrayscaleSubheader) delete theColorGrayscaleSubheader;
+   theColorGrayscaleSubheader = 0;
+   if(theHeader)
+   {
+      theColorGrayscaleSubheader  = theHeader->getNewColorGrayscaleSubheader(in);
+
+      if(theColorGrayscaleSubheader)
+      {
+         const ossimRpfLocationSection* location = theHeader->getLocationSection();
+         if(location)
+         {
+            ossimRpfComponentLocationRecord component;
+            
+            if(location->getComponent(OSSIM_RPF_COLOR_CONVERTER_SUBSECTION,
+                                     component))
+            {
+               in.seekg(component.m_componentLocation,ios::beg);
+               if(theColorConverterSubsection) delete theColorConverterSubsection;
+               theColorConverterSubsection = new ossimRpfColorConverterSubsection;
+               theColorConverterSubsection->setNumberOfColorConverterOffsetRecords(
+                  theColorGrayscaleSubheader->getNumberOfColorConverterOffsetRecords());
+               resultError = theColorConverterSubsection->parseStream(in, theHeader->getByteOrder());
+            }
+            if(location->getComponent(OSSIM_RPF_COLORMAP_SUBSECTION, component))
+            {
+               in.seekg(component.m_componentLocation, ios::beg);
+               
+               theColorGrayscaleTable.clear();
+               theColorGrayscaleTable.resize(theColorGrayscaleSubheader->getNumberOfColorGreyscaleOffsetRecords());
+
+               // we will ignore the offset table offset which is a 4 byte value
+               // and ignore the offset record length which is a 2 byte value.
+               // This is suppose to put us at the beginning of the
+               // [color/grayscale offset record].  The total number of
+               // these offset records is found in the [color/grayscale section
+               // subheader.
+               in.ignore(6);
+               for(ossim_uint32 index = 0;
+                   index < theColorGrayscaleSubheader->getNumberOfColorGreyscaleOffsetRecords();
+                   ++index)
+               {
+                  
+                  ossimRpfColorGrayscaleOffsetRecord grayscaleOffsetRecord;
+
+                  if(grayscaleOffsetRecord.parseStream(in, theHeader->getByteOrder()) == ossimErrorCodes::OSSIM_OK)
+                  {
+                     ossim_uint32 rememberLocation = in.tellg();
+                     in.seekg(grayscaleOffsetRecord.getColorGrayscaleTableOffset()+component.m_componentLocation, ios::beg);
+                     theColorGrayscaleTable[index].setTableData(grayscaleOffsetRecord.getColorGrayscaleTableId(),
+                                                                grayscaleOffsetRecord.getNumberOfColorGrayscaleRecords());
+                     theColorGrayscaleTable[index].parseStream(in, theHeader->getByteOrder());
+                     in.seekg(rememberLocation, ios::beg);
+                  }
+                  else
+                  {
+                     return ossimErrorCodes::OSSIM_ERROR;
+                  }
+               }
+            }
+         }
+      }
+   }
+   
+   return resultError;
+}
+
+ossimErrorCode ossimRpfFrame::populateImageSection(istream& in)
+{
+   ossimErrorCode result = ossimErrorCodes::OSSIM_OK;
+   if(theImageDescriptionSubheader) delete theImageDescriptionSubheader;
+   theImageDescriptionSubheader = 0;
+   if(theHeader&&in)
+   {
+      // get the subheader information.
+      theImageDescriptionSubheader = theHeader->getNewImageDescriptionSubheader(in);
+
+      
+      // need to do something with the table before going to the display.
+      if(theImageDescriptionSubheader &&(!theImageDescriptionSubheader->isSubframeMaskTableOffsetNull()))
+      {
+         if(theMaskSubheader) delete theMaskSubheader;
+         // need to get the mask subheader
+         theMaskSubheader = new ossimRpfMaskSubheader;
+
+         // seek to the start of the subheader
+         in.seekg(theImageDescriptionSubheader->getEndOffset() +
+                  theImageDescriptionSubheader->getSubframeMaskTableOffset(), ios::beg);
+
+         // get the information
+         result = theMaskSubheader->parseStream(in, theHeader->getByteOrder());
+      }
+
+      if(theImageDisplayParameterSubheader) delete theImageDisplayParameterSubheader;
+      // Get the display parameter header
+      theImageDisplayParameterSubheader = theHeader->getNewImageDisplayParameterSubheader(in);
+   }
+   return result;
+}
+
+ossimErrorCode ossimRpfFrame::populateAttributeSection(istream& in)
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimRpfFrame::populateAttributeSection:  entered ..." << std::endl;
+   }
+   ossimRpfAttributeSectionSubheader* temp = 0;
+   
+   const ossimRpfLocationSection* location = theHeader->getLocationSection();
+   if(location)
+   {
+      ossimRpfComponentLocationRecord component;
+      
+      if(location->getComponent(OSSIM_RPF_ATTRIBUTE_SECTION_SUBHEADER,
+                               component))
+      {
+         temp = new ossimRpfAttributeSectionSubheader;
+         in.seekg(component.m_componentLocation, std::ios::beg);
+         if(temp->parseStream(in, theHeader->getByteOrder()) != ossimErrorCodes::OSSIM_OK)
+         {
+            delete temp;
+            temp =0;
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << "ossimRpfFrame::populateAttributeSection:  leaving 1 ..." << std::endl;
+            }
+            return ossimErrorCodes::OSSIM_ERROR;
+         }
+      }
+   }
+   if(!in.fail()&&temp)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG: Has attribute section" << std::endl;
+      }
+      if(theAttributes) delete theAttributes;
+      theAttributes = new ossimRpfAttributes;
+      ossimRpfAttributeOffsetRecord record;
+      ossim_uint64 locationAttributeSubsection = in.tellg();
+      ossim_uint64 absoluteAddresToTable = locationAttributeSubsection + temp->getAttributeOffsetTableOffset();
+      ossimEndian anEndian;
+
+      
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG: Number of attributes = "
+            <<  temp->getNumberOfAttributeOffsetRecords()
+            << std::endl;
+      }
+      in.seekg(absoluteAddresToTable, ios::beg);
+      for(ossim_uint32 index = 0;
+          index < temp->getNumberOfAttributeOffsetRecords();
+          index++)
+      {
+         if((!in.fail())&&
+            record.parseStream(in, theHeader->getByteOrder()) ==
+            ossimErrorCodes::OSSIM_OK)
+         {
+            // make sure we save the current position.  The attribute
+            // parser in the switch/case will change the location and
+            // we must come back to the start of the next record.
+            ossim_uint64 currentLocation = in.tellg();
+
+            // go to the location of the start of the attribute.               
+            in.seekg(locationAttributeSubsection + record.getAttributeRecordOffset(), ios::beg);
+
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << "DEBUG: Parsing attribute number  " << index
+                  << " with id = " << record.getAttributeId()
+                  << std::endl;
+            }
+            // allocate some temporary space for the string type
+            // attributes.
+            char tempString[50];
+            if(!theAttributes->getAttributeFlag(record.getAttributeId()))
+            {
+               theAttributes->setAttributeFlag(record.getAttributeId(), true);
+               switch(record.getAttributeId())
+               {
+               case 1:
+               {
+                  in.read((char*)tempString, 8);
+                  tempString[8] = '\0';
+                  theAttributes->theCurrencyDate = tempString;
+                  break;
+               }
+               case 2:
+               {
+                  in.read((char*)tempString, 8);
+                  tempString[8] = '\0';
+                  theAttributes->theProductionDate = tempString;
+                  break;
+               }
+               case 3:
+               {
+                  in.read((char*)tempString, 8);
+                  tempString[8] = '\0';
+                  theAttributes->theSignificantDate = tempString;
+                  break;
+               }
+               case 4:
+               {
+                  in.read((char*)tempString, 10);
+                  theAttributes->theChartSeriesCode = ossimString(tempString,
+                                                                  &tempString[10]);
+                  in.read((char*)tempString, 8);
+                  theAttributes->theMapDesignationCode = ossimString(tempString,
+                                                                     &tempString[8]);
+                  in.read((char*)tempString, 4);
+                  theAttributes->theOldHorDatum = ossimString(tempString,
+                                                              &tempString[4]);
+                  in.read((char*)tempString, 7);
+                  theAttributes->theEdition = ossimString(tempString,
+                                                          &tempString[7]);
+                  break;
+               }
+               case 5:
+               {
+                  in.read((char*)tempString, 2);
+                  theAttributes->theProjectionCode = ossimString(tempString,
+                                                                 &tempString[2]);
+                  theAttributes->theProjectionCode = theAttributes->theProjectionCode.upcase();
+                  if((theAttributes->theProjectionCode == "AC") ||
+                     (theAttributes->theProjectionCode == "LE") ||
+                     (theAttributes->theProjectionCode == "PG"))
+                  {
+                     in.read((char*)&(theAttributes->theProjectionA), 4);
+                     in.read((char*)&(theAttributes->theProjectionB), 4);
+                     in.read((char*)&(theAttributes->theProjectionC), 4);
+                     in.read((char*)&(theAttributes->theProjectionD), 4);
+                  }
+                  else if((theAttributes->theProjectionCode == "RB") ||
+                          (theAttributes->theProjectionCode == "OC") ||
+                          (theAttributes->theProjectionCode == "TC"))
+                  {
+                     in.read((char*)&(theAttributes->theProjectionA), 4);
+                     in.read((char*)&(theAttributes->theProjectionB), 4);
+                     in.read((char*)&(theAttributes->theProjectionC), 4);
+                  }
+                  else if((theAttributes->theProjectionCode == "AL") ||
+                          (theAttributes->theProjectionCode == "MC") ||
+                          (theAttributes->theProjectionCode == "OD") ||
+                          (theAttributes->theProjectionCode == "PH"))
+                  {
+                     in.read((char*)&(theAttributes->theProjectionA), 4);
+                     in.read((char*)&(theAttributes->theProjectionB), 4);
+                  }
+                  else if((theAttributes->theProjectionCode == "UT"))
+                  {
+                     in.read((char*)&(theAttributes->theProjectionA), 4);
+                  }
+                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
+                  {
+                     anEndian.swap(theAttributes->theProjectionA);
+                     anEndian.swap(theAttributes->theProjectionB);
+                     anEndian.swap(theAttributes->theProjectionC);
+                     anEndian.swap(theAttributes->theProjectionD);
+                  }
+                  break;
+               }
+               case 6:
+               {
+                  in.read((char*)tempString, 4);
+                  theAttributes->theVertDatumCode = ossimString(tempString,
+                                                                &tempString[4]);
+                  break;
+               }
+               case 7:
+               {
+                  in.read((char*)tempString, 4);
+                  theAttributes->theHorDatumCode = ossimString(tempString,
+                                                               &tempString[4]);
+                  break;
+               }
+               case 8:
+               {
+                  in.read((char*)&(theAttributes->theVertAbsAccuracy), 4);
+                  in.read((char*)&(theAttributes->theVertAbsUnits), 2);
+                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
+                  {
+                     anEndian.swap(theAttributes->theVertAbsAccuracy);
+                     anEndian.swap(theAttributes->theVertAbsUnits);
+                  }
+                  break;
+               }
+               case 9:
+               {
+                  in.read((char*)&(theAttributes->theHorAbsAccuracy), 4);
+                  in.read((char*)&(theAttributes->theHorAbsUnits), 2);
+                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
+                  {
+                     anEndian.swap(theAttributes->theHorAbsAccuracy);
+                     anEndian.swap(theAttributes->theHorAbsUnits);
+                  }
+                  break;
+               }
+               case 10:
+               {
+                  in.read((char*)&(theAttributes->theVertRelAccuracy), 4);
+                  in.read((char*)&(theAttributes->theVertRelUnits), 2);
+                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
+                  {
+                     anEndian.swap(theAttributes->theVertRelAccuracy);
+                     anEndian.swap(theAttributes->theVertRelUnits);
+                  }
+                  break;
+               }
+               case 11:
+               {
+                  in.read((char*)&(theAttributes->theHorRelAccuracy), 4);
+                  in.read((char*)&(theAttributes->theHorRelUnits), 2);
+                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
+                  {
+                     anEndian.swap(theAttributes->theHorRelAccuracy);
+                     anEndian.swap(theAttributes->theHorRelUnits);
+                  }
+                  break;
+               }            
+               case 12:
+               {
+                  in.read((char*)tempString, 3);
+                  theAttributes->ellipsoidCode = ossimString(tempString,
+                                                             &tempString[3]);
+                  break;
+               }            
+               case 13:
+               {
+                  in.read((char*)tempString, 4);
+                  theAttributes->theSoundingDatumCode = ossimString(tempString,
+                                                                    &tempString[4]);
+                  break;
+               }            
+               case 14:
+               {
+                  in.read((char*)&(theAttributes->theNavSystemCode), 2);
+                  
+                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
+                  {
+                     anEndian.swap(theAttributes->theNavSystemCode);
+                  }
+                  break;
+               }            
+               case 15:
+               {
+                  in.read((char*)tempString, 2);
+                  theAttributes->theGridCode = ossimString(tempString,
+                                                           &tempString[2]);
+                  break;
+               }            
+               case 16:
+               {
+                  in.read((char*)&(theAttributes->theEeasterlyMagChange), 4);
+                  in.read((char*)&(theAttributes->theEasterlyMagChangeUnits), 2);
+                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
+                  {
+                     anEndian.swap(theAttributes->theEeasterlyMagChange);
+                     anEndian.swap(theAttributes->theEasterlyMagChangeUnits);
+                  }
+                  break;
+               }
+               case 17:
+               {
+                  in.read((char*)&(theAttributes->theWesterlyMagChange), 4);
+                  in.read((char*)&(theAttributes->theWesterlyMagChangeUnits), 2);
+                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
+                  {
+                     anEndian.swap(theAttributes->theWesterlyMagChange);
+                     anEndian.swap(theAttributes->theWesterlyMagChangeUnits);
+                  }
+                  break;
+               }
+               case 18:
+               {
+                  in.read((char*)&(theAttributes->theMagAngle), 4);
+                  in.read((char*)&(theAttributes->theMagAngleUnits), 2);
+                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
+                  {
+                     anEndian.swap(theAttributes->theMagAngle);
+                     anEndian.swap(theAttributes->theMagAngleUnits);
+                  }
+                  break;
+               }
+               case 19:
+               {
+                  in.read((char*)&(theAttributes->theGridConver), 4);
+                  in.read((char*)&(theAttributes->theGridConverUnits), 2);
+                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
+                  {
+                     anEndian.swap(theAttributes->theGridConver);
+                     anEndian.swap(theAttributes->theGridConverUnits);
+                  }
+                  break;
+               }
+               case 20:
+               {
+                  in.read((char*)&(theAttributes->theHighElevation), 8);
+                  in.read((char*)&(theAttributes->theHighElevationUnits), 2);
+                  in.read((char*)&(theAttributes->theHighLat), 8);
+                  in.read((char*)&(theAttributes->theHighLon), 8);
+                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
+                  {
+                     anEndian.swap(theAttributes->theHighElevation);
+                     anEndian.swap(theAttributes->theHighElevationUnits);
+                     anEndian.swap(theAttributes->theHighLat);
+                     anEndian.swap(theAttributes->theHighLon);
+                  }
+                  break;
+               }
+               case 21:
+               {
+                  in.read((char*)tempString, 12);
+                  theAttributes->theLegendFileName = ossimString(tempString,
+                                                                 &tempString[12]);
+                  break;
+               }
+               case 22:
+               {
+                  in.read((char*)tempString, 12);
+                  tempString[12] = '\0';
+                  theAttributes->theDataSource = tempString;
+                  in.read((char*)&(theAttributes->theGsd), 4);
+                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
+                  {
+                     anEndian.swap(theAttributes->theGsd);
+                  }
+                  break;
+               }
+               case 23:
+               {
+                  in.read((char*)&(theAttributes->theDataLevel), 2);
+                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
+                  {
+                     anEndian.swap(theAttributes->theDataLevel);
+                  }
+                  break;
+               }
+               }
+            }
+            in.seekg(currentLocation, ios::beg);
+         }
+         else
+         {
+            delete temp;
+            temp = 0;
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << "ossimRpfFrame::populateAttributeSection:  leaving 2 ..." << std::endl;
+            }
+            return ossimErrorCodes::OSSIM_ERROR;
+         }
+      }
+   }
+   if(temp) delete temp;
+   temp = 0;
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimRpfFrame::populateAttributeSection:  leaving OK ..." << std::endl;
+   }
+   return ossimErrorCodes::OSSIM_OK;
+}
+
+ossimErrorCode ossimRpfFrame::populateMasks(istream& in)
+{
+   theSubframeMaskTable.clear();
+   theSubframeTransparencyMaskTable.clear();
+
+   if(!in)
+   {
+      return ossimErrorCodes::OSSIM_ERROR;
+   }
+   
+   if(theImageDescriptionSubheader)
+   {
+      const ossimRpfLocationSection* location = theHeader->getLocationSection();
+      if(location)
+      {
+         ossimRpfComponentLocationRecord component;
+         
+         if(location->getComponent(OSSIM_RPF_MASK_SUBSECTION,
+                                   component))
+         {
+            
+            // now allocate the space we need and then reader the table in
+            
+            theSubframeMaskTable.resize(theImageDescriptionSubheader->getNumberOfSpectralGroups());
+            theSubframeTransparencyMaskTable.resize(theImageDescriptionSubheader->getNumberOfSpectralGroups());
+            
+            ossim_uint32 spectralIndex;
+            ossim_uint32 rowIndex;
+            ossim_uint32 colIndex;
+            
+            if(!theImageDescriptionSubheader->isSubframeMaskTableOffsetNull())
+            {
+               // move get to the first byte of the Mask table.  This is the offset from the
+               // start of the maskSubsection. 
+               in.seekg(component.m_componentLocation +
+                        theImageDescriptionSubheader->getSubframeMaskTableOffset(), ios::beg);
+               // first loop through the Mask table and allocate while we do it
+               for(spectralIndex = 0;
+                   spectralIndex < theImageDescriptionSubheader->getNumberOfSpectralGroups();
+                   ++spectralIndex)
+               {
+                  // reserve space for the number of rows
+                  theSubframeMaskTable[spectralIndex].resize(theImageDescriptionSubheader->getNumberOfSubframesVertical());
+                  for(rowIndex = 0;
+                      rowIndex < theImageDescriptionSubheader->getNumberOfSubframesVertical();
+                      ++rowIndex)
+                  {
+                     // allocate the columns
+                     theSubframeMaskTable[spectralIndex][rowIndex].resize(theImageDescriptionSubheader->getNumberOfSubframesHorizontal());
+                     for(colIndex = 0;
+                         colIndex < theImageDescriptionSubheader->getNumberOfSubframesHorizontal();
+                         ++colIndex)
+                     {
+                        ossim_uint32 value;
+                        
+                        in.read((char*)&value, 4);
+                        ossimEndian anEndian;
+                        
+                        if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
+                        {
+                           anEndian.swap(value);
+                        }
+                        theSubframeMaskTable[spectralIndex][rowIndex][colIndex] = value;
+                     }
+                  }
+               }
+            }
+            if(!theImageDescriptionSubheader->isTransparencyMaskTableOffsetNull())
+            {
+               // move get to the first byte of the Mask table.  This is the offset from the
+               // start of the maskSubsection. 
+               in.seekg(component.m_componentLocation +
+                        theImageDescriptionSubheader->getTransparencyMaskTableOffset(),ios::beg);
+               for(spectralIndex = 0;
+                   spectralIndex < theImageDescriptionSubheader->getNumberOfSpectralGroups();
+                   ++spectralIndex)
+               {
+                  // reserve space for the number of rows
+                  theSubframeTransparencyMaskTable[spectralIndex].resize(theImageDescriptionSubheader->getNumberOfSubframesVertical());
+                  for(rowIndex = 0;
+                      rowIndex < theImageDescriptionSubheader->getNumberOfSubframesVertical();
+                      ++rowIndex)
+                  {
+                     // allocate the columns
+                     theSubframeTransparencyMaskTable[spectralIndex][rowIndex].resize(theImageDescriptionSubheader->getNumberOfSubframesHorizontal());
+                     for(colIndex = 0;
+                         colIndex < theImageDescriptionSubheader->getNumberOfSubframesHorizontal();
+                         ++colIndex)
+                     {
+                        ossim_uint32 value;
+                        
+                        in.read((char*)&value, 4);
+                        ossimEndian anEndian;
+                        
+                        if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
+                        {
+                           anEndian.swap(value);
+                        }
+                        theSubframeTransparencyMaskTable[spectralIndex][rowIndex][colIndex] = value;
+                     }
+                  }
+               }
+            }
+         }
+      }
+   }
+   
+   return ossimErrorCodes::OSSIM_OK;
+}
+
+ossimErrorCode ossimRpfFrame::populateReplaceUpdateTable(std::istream& in)
+{
+   ossimErrorCode result = ossimErrorCodes::OSSIM_OK;
+   
+   const ossimRpfLocationSection* location = theHeader->getLocationSection();
+
+   if( location )
+   {
+      if ( location->hasComponent(OSSIM_RPF_REPLACE_UPDATE_SECTION_SUBHEADER) )
+      {
+         ossimRpfComponentLocationRecord component;
+         if( location->getComponent(OSSIM_RPF_REPLACE_UPDATE_SECTION_SUBHEADER, component) )
+         {
+            ossimRefPtr<ossimRpfReplaceUpdateSectionSubheader> hdr =
+               new ossimRpfReplaceUpdateSectionSubheader();
+            
+            in.seekg(component.m_componentLocation, ios::beg);
+            
+            if( hdr->parseStream( in, theHeader->getByteOrder() ) == ossimErrorCodes::OSSIM_OK )
+            {
+               ossim_uint16 count = hdr->getNumberOfRecords();
+               if ( count )
+               {
+                  if ( theReplaceUpdateTable.valid() )
+                  {
+                     theReplaceUpdateTable->clear();
+                  }
+                  else
+                  {
+                     theReplaceUpdateTable = new ossimRpfReplaceUpdateTable();
+                  }
+                  ossimRpfReplaceUpdateRecord record;
+                  for ( ossim_uint16 i = 0; i < count; ++i )
+                  {
+                     if ( record.parseStream(in) == ossimErrorCodes::OSSIM_OK )
+                     {
+                        theReplaceUpdateTable->addRecord( record );
+                     }
+                     else
+                     {
+                        break;
+                     }
+                  }
+               }
+               
+            }
+         }  
+      }
+   }
+
+   if ( in.fail() )
+   {
+      theReplaceUpdateTable = 0;
+      result = ossimErrorCodes::OSSIM_ERROR;
+   }
+
+   return result;
+
+} // End: ossimRpfFrame::populateReplaceUpdateTable(std::istream& in)
+
+ossimRefPtr<ossimRpfReplaceUpdateTable> ossimRpfFrame::getRpfReplaceUpdateTable() const
+{
+   return theReplaceUpdateTable;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimRpfFrameEntry.cpp b/ossim/src/ossim/support_data/ossimRpfFrameEntry.cpp
new file mode 100644
index 0000000..d658c1f
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimRpfFrameEntry.cpp
@@ -0,0 +1,126 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+//
+// Description: Rpf support class
+// 
+//********************************************************************
+// $Id: ossimRpfFrameEntry.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ostream>
+#include <ossim/support_data/ossimRpfFrameEntry.h>
+
+std::ostream& operator<<(std::ostream& out, const ossimRpfFrameEntry& data)
+{
+   return data.print(out);
+}
+
+ossimRpfFrameEntry::ossimRpfFrameEntry(const ossimFilename& rootDirectory,
+                                       const ossimFilename& pathToFrameFileFromRoot)
+   :m_exists(false),
+    m_rootDirectory(rootDirectory),
+    m_pathToFrameFileFromRoot(pathToFrameFileFromRoot),
+    m_fullValidPath()
+{
+   setEntry(rootDirectory,
+            pathToFrameFileFromRoot);
+}
+
+ossimRpfFrameEntry::ossimRpfFrameEntry(const ossimRpfFrameEntry& obj)
+   :m_exists(obj.m_exists),
+    m_rootDirectory(obj.m_rootDirectory),
+    m_pathToFrameFileFromRoot(obj.m_pathToFrameFileFromRoot),
+    m_fullValidPath(obj.m_fullValidPath)
+{}
+
+const ossimRpfFrameEntry& ossimRpfFrameEntry::operator=(const ossimRpfFrameEntry& rhs)
+{
+   if (this != &rhs)
+   {
+      m_exists                  = rhs.m_exists;
+      m_rootDirectory           = rhs.m_rootDirectory;
+      m_pathToFrameFileFromRoot = rhs.m_pathToFrameFileFromRoot;
+      m_fullValidPath           = rhs.m_fullValidPath;
+   }
+   return *this;
+}
+
+void ossimRpfFrameEntry::setEntry(const ossimFilename& rootDirectory,
+                                  const ossimFilename& pathToFrameFileFromRoot)
+{
+   //---
+   // We must check for case combinations:
+   //---
+   m_rootDirectory           = rootDirectory;
+   m_pathToFrameFileFromRoot = pathToFrameFileFromRoot;
+   m_fullValidPath = m_rootDirectory.dirCat(m_pathToFrameFileFromRoot);
+
+   // Check as supplied:
+   if(m_fullValidPath.exists())
+   {
+      m_exists = true;
+   }
+   else // Check root/downcased_path
+   {
+      m_pathToFrameFileFromRoot = m_pathToFrameFileFromRoot.downcase();
+      m_fullValidPath = m_rootDirectory.dirCat(m_pathToFrameFileFromRoot);
+
+      if(m_fullValidPath.exists())
+      {
+         m_exists = true;
+      }
+      else // Check root/upcased_path
+      {
+         m_pathToFrameFileFromRoot = m_pathToFrameFileFromRoot.upcase();
+         m_fullValidPath =
+            m_rootDirectory.dirCat(m_pathToFrameFileFromRoot);
+         if(m_fullValidPath.exists())
+         {
+            m_exists = true;
+         }
+         else
+         {
+            m_pathToFrameFileFromRoot = pathToFrameFileFromRoot;
+            m_fullValidPath =
+               m_rootDirectory.dirCat(m_pathToFrameFileFromRoot);
+            m_exists = false;
+         }
+      }
+   }
+}
+std::ostream& ossimRpfFrameEntry::print(
+   std::ostream& out, const std::string& prefix) const
+{
+   out << prefix << "exists:       " << m_exists << "\n"
+       << prefix << "root_directory: " << m_rootDirectory << "\n"
+       << prefix << "relative_path: "
+       << m_pathToFrameFileFromRoot << "\n"
+       << prefix << "full_path:     " << m_fullValidPath << "\n";
+
+   return out;
+}
+
+bool ossimRpfFrameEntry::exists() const
+{
+   return m_exists;
+}
+
+const ossimFilename& ossimRpfFrameEntry::getFullPath() const
+{
+   return m_fullValidPath;
+}
+
+const ossimString& ossimRpfFrameEntry::getRootDirectory() const
+{
+   return m_rootDirectory;
+}
+
+const ossimString ossimRpfFrameEntry::getPathToFrameFileFromRoot() const
+{
+   return m_pathToFrameFileFromRoot;
+}
+
diff --git a/src/ossim/support_data/ossimRpfFrameFileIndexRecord.cpp b/ossim/src/ossim/support_data/ossimRpfFrameFileIndexRecord.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfFrameFileIndexRecord.cpp
rename to ossim/src/ossim/support_data/ossimRpfFrameFileIndexRecord.cpp
diff --git a/src/ossim/support_data/ossimRpfFrameFileIndexSectionSubheader.cpp b/ossim/src/ossim/support_data/ossimRpfFrameFileIndexSectionSubheader.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfFrameFileIndexSectionSubheader.cpp
rename to ossim/src/ossim/support_data/ossimRpfFrameFileIndexSectionSubheader.cpp
diff --git a/src/ossim/support_data/ossimRpfFrameFileIndexSubsection.cpp b/ossim/src/ossim/support_data/ossimRpfFrameFileIndexSubsection.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfFrameFileIndexSubsection.cpp
rename to ossim/src/ossim/support_data/ossimRpfFrameFileIndexSubsection.cpp
diff --git a/src/ossim/support_data/ossimRpfFrameFileReader.cpp b/ossim/src/ossim/support_data/ossimRpfFrameFileReader.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfFrameFileReader.cpp
rename to ossim/src/ossim/support_data/ossimRpfFrameFileReader.cpp
diff --git a/ossim/src/ossim/support_data/ossimRpfHeader.cpp b/ossim/src/ossim/support_data/ossimRpfHeader.cpp
new file mode 100644
index 0000000..ad16c54
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimRpfHeader.cpp
@@ -0,0 +1,873 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: This class extends the stl's string class.
+//
+//********************************************************************
+// $Id: ossimRpfHeader.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <cstring>
+#include <iostream>
+#include <fstream>
+
+#include <ossim/support_data/ossimRpfHeader.h>
+#include <ossim/base/ossimCommon.h> /* ossim::byteOrder() */
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimErrorCodes.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/support_data/ossimNitfCommon.h>
+#include <ossim/support_data/ossimRpfLocationSection.h>
+#include <ossim/support_data/ossimRpfCoverageSection.h>
+#include <ossim/support_data/ossimRpfBoundaryRectSectionSubheader.h>
+#include <ossim/support_data/ossimRpfBoundaryRectTable.h>
+#include <ossim/support_data/ossimRpfFrameFileIndexSectionSubheader.h>
+#include <ossim/support_data/ossimRpfFrameFileIndexSubsection.h>
+#include <ossim/support_data/ossimRpfImageDescriptionSubheader.h>
+#include <ossim/support_data/ossimRpfMaskSubsection.h>
+#include <ossim/support_data/ossimRpfAttributeSectionSubheader.h>
+#include <ossim/support_data/ossimRpfImageDisplayParameterSubheader.h>
+#include <ossim/support_data/ossimRpfCompressionSectionSubheader.h>
+#include <ossim/support_data/ossimRpfCompressionSection.h>
+#include <ossim/support_data/ossimRpfColorGrayscaleSubheader.h>
+
+#include <ossim/base/ossimTrace.h>
+
+ // Static trace for debugging
+static ossimTrace traceDebug("ossimRpfHeader:debug");
+
+// Keywords:
+static const ossimString HEADER_SECTION_LENGTH_KW    = "HeaderSectionLength";
+static const ossimString NEW_REP_UP_INDICATOR_KW     = "NewRepUpIndicator";
+static const ossimString GOV_SPEC_NUMBER_KW          = "GovSpecNumber";
+static const ossimString GOV_SPEC_DATE_KW            = "GovSpecDate";
+static const ossimString SECURITY_CLASSIFICATION_KW  = "SecurityClassification";
+static const ossimString COUNTRY_CODE_KW             = "CountryCode";
+static const ossimString SECURITY_RELEASE_MARKING_KW = "SecurityReleaseMarking";
+
+
+ossimRpfHeader::ossimRpfHeader()
+   :
+   ossimNitfRegisteredTag(std::string("RPFHDR"), 48),
+   m_littleBigEndianIndicator(0x00),
+   m_headerSectionLength(48),
+   m_fileName(),
+   m_newRepUpIndicator(0),
+   m_govSpecNumber(),
+   m_govSpecDate(),
+   m_securityClassification(),
+   m_countryCode(),
+   m_securityReleaseMarking(),
+   m_locSectionLoc(0),
+   m_locationSection(new ossimRpfLocationSection)
+{
+   memset(m_fileName, ' ' , 12);
+   memset(m_govSpecNumber, ' ', 15);
+   memset(m_govSpecDate, ' ', 8);
+   memset(m_securityClassification, ' ', 1);
+   memset(m_countryCode, ' ', 2);
+   memset(m_securityReleaseMarking, ' ', 2);
+   
+   m_fileName[12] = '\0';
+   m_govSpecNumber[15] = '\0';
+   m_govSpecDate[8] = '\0';
+   m_securityClassification[1] = '\0';
+   m_countryCode[2] = '\0';
+   m_securityReleaseMarking[2] = '\0';
+}
+
+ossimRpfHeader::ossimRpfHeader(const ossimRpfHeader& obj)
+   :
+   ossimNitfRegisteredTag(std::string("RPFHDR"), 48),
+   m_littleBigEndianIndicator(obj.m_littleBigEndianIndicator),
+   m_headerSectionLength(obj.m_headerSectionLength),
+   m_fileName(),
+   m_newRepUpIndicator(obj.m_newRepUpIndicator),
+   m_govSpecNumber(),
+   m_govSpecDate(),
+   m_securityClassification(),
+   m_countryCode(),
+   m_securityReleaseMarking(),
+   m_locSectionLoc(obj.m_locSectionLoc),
+   m_locationSection( new ossimRpfLocationSection( *(obj.m_locationSection) ) )
+{
+   memcpy(m_fileName, obj.m_fileName, 13);
+   memcpy(m_govSpecNumber, obj.m_govSpecNumber, 16);
+   memcpy(m_govSpecDate, obj.m_govSpecDate, 9);
+   memcpy(m_securityClassification, obj.m_securityClassification, 2);
+   memcpy(m_countryCode, obj.m_countryCode, 3);
+   memcpy(m_securityReleaseMarking, obj.m_securityReleaseMarking, 3);
+}
+
+const ossimRpfHeader& ossimRpfHeader::operator=(const ossimRpfHeader& rhs)
+{
+   if ( this != &rhs )
+   {
+      m_littleBigEndianIndicator = rhs.m_littleBigEndianIndicator;
+      m_headerSectionLength = rhs.m_headerSectionLength;
+      memcpy(m_fileName, rhs.m_fileName, 13);
+      m_newRepUpIndicator = rhs.m_newRepUpIndicator;
+      memcpy(m_govSpecNumber, rhs.m_govSpecNumber, 16);
+      memcpy(m_govSpecDate, rhs.m_govSpecDate, 9);   
+      memcpy(m_securityClassification, rhs.m_securityClassification, 2);
+      memcpy(m_countryCode, rhs.m_countryCode, 3);
+      memcpy(m_securityReleaseMarking, rhs.m_securityReleaseMarking, 3);
+      m_locSectionLoc = rhs.m_locSectionLoc;
+
+      m_locationSection = new ossimRpfLocationSection( *(rhs.m_locationSection) );
+   }
+   return *this;
+}
+
+ossimRpfHeader::~ossimRpfHeader()
+{
+   if(m_locationSection)
+   {
+      delete m_locationSection;
+      m_locationSection = 0;
+   }
+}
+
+void ossimRpfHeader::parseStream(std::istream& in)
+{
+   if(in)
+   {
+      in.read((char*)&m_littleBigEndianIndicator, 1);
+
+      in.read((char*)&m_headerSectionLength, 2);
+      in.read((char*)m_fileName, 12);
+      in.read((char*)&m_newRepUpIndicator, 1);
+      in.read((char*)m_govSpecNumber, 15);
+      in.read((char*)m_govSpecDate, 8);
+      in.read((char*)m_securityClassification, 1);
+      in.read((char*)m_countryCode, 2);
+      in.read((char*)m_securityReleaseMarking, 2);
+      in.read((char*)&m_locSectionLoc, 4);
+      
+      m_fileName[12] = '\0';
+      m_govSpecNumber[15] = '\0';
+      m_govSpecDate[8] = '\0';
+      m_securityClassification[1] = '\0';
+      m_countryCode[2] = '\0';
+      m_securityReleaseMarking[2] = '\0';
+      
+      //---
+      // From spec:  MIL-PRF-89038CARDG m_littleBigEndianIndicator shall
+      // be 0x00 for all data denoting big endian storage.  We will test
+      // anyway just in case...
+      //---
+      ossimByteOrder dataByteOrder = getByteOrder();
+
+      if( ossim::byteOrder() != dataByteOrder )
+      {
+         ossimEndian anEndian;
+         anEndian.swap(m_headerSectionLength);
+         anEndian.swap(m_locSectionLoc);
+      }
+
+      std::streamoff saveGet = in.tellg();
+      in.seekg(m_locSectionLoc, ios::beg);
+      m_locationSection->parseStream(in, dataByteOrder);
+      in.seekg(saveGet, ios::beg);
+   }
+}
+
+void ossimRpfHeader::writeStream(std::ostream& out)
+{
+   // Always write in big endian.
+   if (m_littleBigEndianIndicator != 0x00)
+   {
+      ossimNotify(ossimNotifyLevel_NOTICE)
+         << "ossimRpfHeader::writeStream writing in big endian even though"
+         << " the m_littleBigEndianIndicator is set to little endian."
+         << std::endl;
+      m_littleBigEndianIndicator = 0x00;
+   }
+   
+   ossimByteOrder dataByteOrder = getByteOrder();
+
+   if( ossim::byteOrder() != dataByteOrder )
+   {
+      ossimEndian anEndian;
+      anEndian.swap(m_headerSectionLength);
+      anEndian.swap(m_locSectionLoc);
+   }
+
+   out.write((char*)&m_littleBigEndianIndicator, 1);
+   
+   out.write((char*)&m_headerSectionLength, 2);
+   out.write((char*)m_fileName, 12);
+   out.write((char*)&m_newRepUpIndicator, 1);
+   out.write((char*)m_govSpecNumber, 15);
+   out.write((char*)m_govSpecDate, 8);
+   out.write((char*)m_securityClassification, 1);
+   out.write((char*)m_countryCode, 2);
+   out.write((char*)m_securityReleaseMarking, 2);
+   out.write((char*)&m_locSectionLoc, 4);
+
+   if( ossim::byteOrder() != dataByteOrder )
+   {
+      // Must swap things back or we will seek to a bad location.
+      ossimEndian anEndian;
+      anEndian.swap(m_headerSectionLength);
+      anEndian.swap(m_locSectionLoc);
+   }
+
+   if (m_locSectionLoc) // May or may not be set.
+   {
+      std::streampos pos = out.tellp();
+      out.seekp(m_locSectionLoc, ios::beg);
+      m_locationSection->writeStream(out);
+      out.seekp(pos);
+   }
+}
+
+std::ostream& ossimRpfHeader::print(std::ostream& out, const std::string& prefix) const
+{
+   out << prefix << "byte_order:               "
+       << (m_littleBigEndianIndicator==0x00?"big_endian\n":"little_endian\n")
+       << prefix << HEADER_SECTION_LENGTH_KW << ":      "
+       << m_headerSectionLength << "\n"
+       << prefix << ossimKeywordNames::FILENAME_KW << ":                 "
+       << m_fileName << "\n"
+       << prefix << NEW_REP_UP_INDICATOR_KW << ":        "
+       << int(m_newRepUpIndicator) << "\n"       
+       << prefix << GOV_SPEC_NUMBER_KW << ":            "
+       << m_govSpecNumber << "\n"
+       << prefix << GOV_SPEC_DATE_KW << ":              "
+       << m_govSpecDate << "\n"
+       << prefix << SECURITY_CLASSIFICATION_KW << ":   "
+       << m_securityClassification << "\n"
+       << prefix << COUNTRY_CODE_KW << ":              "
+       << m_countryCode   << "\n"           
+       << prefix << SECURITY_RELEASE_MARKING_KW << ":   "
+       << m_securityReleaseMarking << "\n";
+
+   if ( traceDebug() )
+   {
+      out << prefix << "LocSectionLoc:            "
+          << m_locSectionLoc << "\n";
+      if (m_locationSection)
+      {
+         m_locationSection->print(out, prefix);
+      }
+   }
+
+   return out;
+}
+
+ossimByteOrder ossimRpfHeader::getByteOrder()const
+{
+   return ( (m_littleBigEndianIndicator==0x00) ? OSSIM_BIG_ENDIAN : OSSIM_LITTLE_ENDIAN);
+}
+
+const ossimRpfLocationSection* ossimRpfHeader::getLocationSection() const
+{
+   return m_locationSection;
+}
+
+ossimRpfLocationSection* ossimRpfHeader::getLocationSection()
+{
+   return m_locationSection;
+}
+
+bool ossimRpfHeader::hasComponent(ossimRpfComponentId componentId)const
+{
+   if(m_locationSection)
+   {
+      return m_locationSection->hasComponent(componentId);
+   }
+   
+   return false;
+}
+
+ossimString ossimRpfHeader::getSecurityClassification()const
+{
+   return m_securityClassification;
+}
+
+ossimRpfCoverageSection* ossimRpfHeader::getNewCoverageSection(std::istream& in)const
+{
+   ossimRpfCoverageSection* result = 0;
+
+   if(in&&m_locationSection)
+   {
+      ossimRpfComponentLocationRecord component;
+
+      if(m_locationSection->getComponent(OSSIM_RPF_COVERAGE_SECTION_SUBHEADER,
+                                          component))
+      {
+         result = new ossimRpfCoverageSection;
+
+         in.seekg(component.m_componentLocation, ios::beg);
+         
+         if(in)
+         {
+            result->parseStream(in, getByteOrder());
+         }
+         else
+         {
+            delete result;
+            result = 0;
+         }
+      }
+   }
+   return result;
+}
+
+ossimRpfMaskSubsection*  ossimRpfHeader::getNewMaskSubsection(std::istream& in)const
+{
+   ossimRpfMaskSubsection* result = 0;
+
+   if(in&&m_locationSection)
+   {
+      ossimRpfComponentLocationRecord component;
+
+      if(m_locationSection->getComponent(OSSIM_RPF_MASK_SUBSECTION,
+                                          component))
+      {
+         result = new ossimRpfMaskSubsection;
+
+         in.seekg(component.m_componentLocation, ios::beg);
+         
+         if(in)
+         {
+            if(result->parseStream(in, getByteOrder()) !=
+               ossimErrorCodes::OSSIM_OK)
+            {
+               delete result;
+               result = 0;
+            }
+         }
+         else
+         {
+            delete result;
+            result = 0;
+         }
+      }
+   }
+   
+   return result;   
+}
+
+
+ossimRpfAttributeSectionSubheader* ossimRpfHeader::getNewAttributeSectionSubheader(std::istream& in)const
+{
+   ossimRpfAttributeSectionSubheader* result = 0;
+
+   if(in&&m_locationSection)
+   {
+      ossimRpfComponentLocationRecord component;
+
+      if(m_locationSection->getComponent(OSSIM_RPF_ATTRIBUTE_SECTION_SUBHEADER,
+                                          component))
+      {
+         result = new ossimRpfAttributeSectionSubheader;
+
+         in.seekg(component.m_componentLocation, ios::beg);
+         
+         if(in)
+         {
+            if(result->parseStream(in, getByteOrder()) !=
+               ossimErrorCodes::OSSIM_OK)
+            {
+               delete result;
+               result = 0;
+            }
+         }
+         else
+         {
+            delete result;
+            result = 0;
+         }
+      }
+   }
+   
+   return result;
+}
+
+ossimRpfColorGrayscaleSubheader* ossimRpfHeader::getNewColorGrayscaleSubheader(std::istream& in)const
+{
+   ossimRpfColorGrayscaleSubheader* result = 0;
+   
+   if(in&&m_locationSection)
+   {
+      ossimRpfComponentLocationRecord component;
+
+      if(m_locationSection->getComponent(OSSIM_RPF_COLOR_GRAYSCALE_SECTION_SUBHEADER,
+                                          component))
+      {
+         result = new ossimRpfColorGrayscaleSubheader;
+
+         in.seekg(component.m_componentLocation, ios::beg);
+         
+         if(in)
+         {
+            if(result->parseStream(in, getByteOrder()) !=
+               ossimErrorCodes::OSSIM_OK)
+            {
+               delete result;
+               result = 0;
+            }
+         }
+         else
+         {
+            delete result;
+            result = 0;
+         }
+      }      
+   }
+
+   return result;
+}
+
+ossimRpfCompressionSection* ossimRpfHeader::getNewCompressionSection(std::istream& in)const
+{   
+   ossimRpfCompressionSection* result = 0;
+
+   if(in&&m_locationSection)
+   {
+      ossimRpfComponentLocationRecord component;
+
+      if(m_locationSection->getComponent(OSSIM_RPF_COMPRESSION_SECTION_SUBHEADER,
+                                          component))
+      {
+         result = new ossimRpfCompressionSection;
+         
+         in.seekg(component.m_componentLocation, ios::beg);
+         
+         if(in)
+         {
+            if(result->parseStream(in, getByteOrder()) !=
+               ossimErrorCodes::OSSIM_OK)
+            {
+               delete result;
+               result = 0;
+            }
+         }
+         else
+         {
+            delete result;
+            result = 0;
+         }
+      }
+   }
+   
+   return result;   
+}
+
+ossimRpfCompressionSectionSubheader* ossimRpfHeader::getNewCompressionSectionSubheader(std::istream& in)const
+{
+   ossimRpfCompressionSectionSubheader* result = 0;
+
+   if(in&&m_locationSection)
+   {
+      ossimRpfComponentLocationRecord component;
+
+      if(m_locationSection->getComponent(OSSIM_RPF_COMPRESSION_SECTION_SUBHEADER,
+                                          component))
+      {
+         result = new ossimRpfCompressionSectionSubheader;
+
+         in.seekg(component.m_componentLocation, ios::beg);
+         
+         if(in)
+         {
+            if(result->parseStream(in, getByteOrder()) !=
+               ossimErrorCodes::OSSIM_OK)
+            {
+               delete result;
+               result = 0;
+            }
+         }
+         else
+         {
+            delete result;
+            result = 0;
+         }
+      }
+   }
+   
+   return result;   
+}
+
+   
+
+ossimRpfImageDisplayParameterSubheader* ossimRpfHeader::getNewImageDisplayParameterSubheader(std::istream& in)const
+{
+   ossimRpfImageDisplayParameterSubheader* result = 0;
+
+   if(in&&m_locationSection)
+   {
+      ossimRpfComponentLocationRecord component;
+
+      if(m_locationSection->getComponent(OSSIM_RPF_IMAGE_DISPLAY_PARAMETERS_SUBHEADER,
+                                          component))
+      {
+         result = new ossimRpfImageDisplayParameterSubheader;
+
+         in.seekg(component.m_componentLocation, ios::beg);
+         
+         if(in)
+         {
+            if(result->parseStream(in, getByteOrder()) !=
+               ossimErrorCodes::OSSIM_OK)
+            {
+               delete result;
+               result = 0;
+            }
+         }
+         else
+         {
+            delete result;
+            result = 0;
+         }
+      }
+   }
+   
+   return result;
+}
+
+ossimRpfImageDescriptionSubheader* ossimRpfHeader::getNewImageDescriptionSubheader(std::istream& in)const
+{
+   ossimRpfImageDescriptionSubheader* result = 0;
+
+   if(in&&m_locationSection)
+   {
+      ossimRpfComponentLocationRecord component;
+
+      if(m_locationSection->getComponent(OSSIM_RPF_IMAGE_DESCRIPTION_SUBHEADER,
+                                          component))
+      {
+         result = new ossimRpfImageDescriptionSubheader;
+
+         in.seekg(component.m_componentLocation, ios::beg);
+         
+         if(in)
+         {
+            if(result->parseStream(in, getByteOrder()) !=
+               ossimErrorCodes::OSSIM_OK)
+            {
+               delete result;
+               result = 0;
+            }
+         }
+         else
+         {
+            delete result;
+            result = 0;
+         }
+      }
+   }
+   
+   return result;
+}
+
+
+ossimRpfBoundaryRectTable* ossimRpfHeader::getNewBoundaryRectTable(std::istream &in)const
+{
+   ossimRpfBoundaryRectTable* result = 0;
+
+   if(in&&m_locationSection)
+   {
+      ossimRpfComponentLocationRecord component;
+
+      ossimRpfBoundaryRectSectionSubheader* tempSubheader = getNewBoundaryRectSectSubheader(in);
+
+      if(tempSubheader)
+      {
+         if(m_locationSection->getComponent(OSSIM_RPF_BOUNDARY_RECT_TABLE,
+                                             component))
+         {
+            result = new ossimRpfBoundaryRectTable;
+            
+            result->setNumberOfEntries(tempSubheader->getNumberOfEntries());
+            in.seekg(component.m_componentLocation, ios::beg);
+            if(in)
+            {
+               if(result->parseStream(in, getByteOrder()) !=
+                  ossimErrorCodes::OSSIM_OK)
+               {
+                  delete result;
+                  result = 0;
+               }
+            }
+            else
+            {
+               delete result;
+               result = 0;
+            }
+         }
+
+         delete tempSubheader;
+         tempSubheader = 0;
+      }
+   }   
+
+   return result;
+}
+
+ossimRpfBoundaryRectSectionSubheader* ossimRpfHeader::getNewBoundaryRectSectSubheader(std::istream &in)const
+{
+   ossimRpfBoundaryRectSectionSubheader* result = 0;
+
+   if(in&&m_locationSection)
+   {
+      ossimRpfComponentLocationRecord component;
+      
+      if(m_locationSection->getComponent(OSSIM_RPF_BOUNDARY_RECT_SECTION_SUBHEADER,
+                                          component))
+      {
+         result = new ossimRpfBoundaryRectSectionSubheader;
+
+         in.seekg(component.m_componentLocation, ios::beg);
+         
+         if(in)
+         {
+            if(result->parseStream(in, getByteOrder()) !=
+               ossimErrorCodes::OSSIM_OK)
+            {
+               delete result;
+               result = 0;
+            }
+         }
+         else
+         {
+            delete result;
+            result = 0;
+         }
+      }
+   }   
+
+   return result;
+   
+}
+
+ossimRpfFrameFileIndexSectionSubheader* ossimRpfHeader::getNewFrameFileIndexSectionSubheader(std::istream &in)const
+{
+   ossimRpfFrameFileIndexSectionSubheader* result = 0;
+
+   if(in&&m_locationSection)
+   {
+      ossimRpfComponentLocationRecord component;
+
+      if(m_locationSection->getComponent(OSSIM_RPF_FRAME_FILE_INDEX_SECTION_SUBHEADER,
+                                          component))
+      {
+         result = new ossimRpfFrameFileIndexSectionSubheader;
+
+         in.seekg(component.m_componentLocation, ios::beg);
+         if(in)
+         {
+            if(result->parseStream(in, getByteOrder()) !=
+               ossimErrorCodes::OSSIM_OK)
+            {
+               delete result;
+               result = 0;
+            }
+         }
+         else
+         {
+            delete result;
+            result = 0;
+         }
+      }
+   }   
+
+   return result;   
+}
+
+ossimRpfFrameFileIndexSubsection* ossimRpfHeader::getNewFileIndexSubsection(std::istream& in)const
+{
+   ossimRpfFrameFileIndexSubsection* result = 0;
+
+   if(in&&m_locationSection)
+   {
+      ossimRpfComponentLocationRecord component;
+      ossimRpfFrameFileIndexSectionSubheader* tempSubheader = getNewFrameFileIndexSectionSubheader(in);
+
+      if(m_locationSection->getComponent(OSSIM_RPF_FRAME_FILE_INDEX_SUBSECTION,
+                                          component))
+      {
+         result = new ossimRpfFrameFileIndexSubsection;
+
+         result->setNumberOfFileIndexRecords(tempSubheader->getNumberOfIndexRecords());
+         result->setNumberOfPathnames(tempSubheader->getNumberOfPathnameRecords());
+         in.seekg(component.m_componentLocation, ios::beg);
+         if(in)
+         {
+            if(result->parseStream(in, getByteOrder()) !=
+               ossimErrorCodes::OSSIM_OK)
+            {
+               delete result;
+               result = 0;
+            }
+         }
+         else
+         {
+            delete result;
+            result = 0;
+         }
+      }
+      if(tempSubheader)
+      {
+         delete tempSubheader;
+         tempSubheader = 0;
+      }
+   }   
+
+   return result;      
+}
+
+ossimRpfCompressionSection* ossimRpfHeader::getNewCompressionSection(const ossimFilename& file)const
+{
+   ifstream in(file.c_str(), ios::in|ios::binary);
+
+   return getNewCompressionSection(in);
+}
+
+ossimRpfCoverageSection* ossimRpfHeader::getNewCoverageSection(const ossimFilename& file)const
+{
+   ifstream in(file.c_str(), ios::in|ios::binary);
+   
+   return getNewCoverageSection(in);
+}
+
+ossimRpfBoundaryRectTable* ossimRpfHeader::getNewBoundaryRectTable(const ossimFilename &file)const
+{
+   ifstream in(file.c_str(), ios::in|ios::binary);
+   
+   return getNewBoundaryRectTable(in);
+}
+
+ossimRpfBoundaryRectSectionSubheader* ossimRpfHeader::getNewBoundaryRectSectSubheader(const ossimFilename &file)const
+{
+   ifstream in(file.c_str(), ios::in|ios::binary);
+
+   return getNewBoundaryRectSectSubheader(in);
+}
+
+ossimRpfFrameFileIndexSectionSubheader* ossimRpfHeader::getNewFrameFileIndexSectionSubheader(const ossimFilename &file)const
+{
+   ifstream in(file.c_str(), ios::in|ios::binary);
+
+   return getNewFrameFileIndexSectionSubheader(in);
+}
+
+ossimRpfFrameFileIndexSubsection* ossimRpfHeader::getNewFileIndexSubsection(const ossimFilename& file)const
+{
+   ifstream in(file.c_str(), ios::in|ios::binary);
+
+   return getNewFileIndexSubsection(in);
+}
+
+ossimString ossimRpfHeader::getDate()const
+{
+   return m_govSpecDate;
+}
+
+ossim_uint32 ossimRpfHeader::getLocationSectionLocation() const
+{
+   return m_locSectionLoc;
+}
+
+void ossimRpfHeader::setFilename(const ossimString& file)
+{
+   ossimNitfCommon::setField(m_fileName, file, 12);
+}
+
+void ossimRpfHeader::setNewRepUpIndicator(const ossimString& s)
+{
+   if (s.size())
+   {
+      // Range check maybe??? (drb)
+      m_newRepUpIndicator = static_cast<ossim_uint8>(*s.begin());
+   }
+}
+
+void ossimRpfHeader::setGovSpecNumber(const ossimString& s)
+{
+   ossimNitfCommon::setField(m_govSpecNumber, s, 15); 
+}
+
+void ossimRpfHeader::setGovSpecDate(const ossimString& s)
+{
+   ossimNitfCommon::setField(m_govSpecDate, s, 8); 
+}
+
+void ossimRpfHeader::setSecurityClassification(const ossimString& s)
+{
+   ossimNitfCommon::setField(m_securityClassification, s, 1);
+}
+
+void ossimRpfHeader::setCountryCode(const ossimString& s)
+{
+   ossimNitfCommon::setField(m_countryCode, s, 2); 
+}
+
+void ossimRpfHeader::setSecurityReleaseMarking(const ossimString& s)
+{
+   ossimNitfCommon::setField(m_securityReleaseMarking, s, 2);
+}
+
+void ossimRpfHeader::setLocationSectionPos(std::streamoff off)
+{
+   m_locSectionLoc = static_cast<ossim_uint32>(off);
+}
+
+bool ossimRpfHeader::loadState(const ossimKeywordlist& kwl, const char* prefix)
+{
+   const char* lookup = 0;
+   ossimString s;
+
+   lookup = kwl.find(prefix, NEW_REP_UP_INDICATOR_KW);
+   if (lookup)
+   {
+      s = lookup;
+      setNewRepUpIndicator(s);
+   }
+
+   lookup = kwl.find(prefix, GOV_SPEC_NUMBER_KW);
+   if (lookup)
+   {
+      s = lookup;
+      setGovSpecNumber(s);
+   }
+
+   lookup = kwl.find(prefix, GOV_SPEC_DATE_KW);
+   if (lookup)
+   {
+      s = lookup;
+      setGovSpecDate(s);
+   }
+
+   lookup = kwl.find(prefix, SECURITY_CLASSIFICATION_KW);
+   if (lookup)
+   {
+      s = lookup;
+      setSecurityClassification(s);
+   }
+
+   lookup = kwl.find(prefix, COUNTRY_CODE_KW);
+   if (lookup)
+   {
+      s = lookup;
+      setCountryCode(s);
+   }
+
+   lookup = kwl.find(prefix, SECURITY_RELEASE_MARKING_KW);
+   if (lookup)
+   {
+      s = lookup;
+      setSecurityReleaseMarking(s);
+   }
+
+   return true;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimRpfImageDescriptionSubheader.cpp b/ossim/src/ossim/support_data/ossimRpfImageDescriptionSubheader.cpp
new file mode 100644
index 0000000..7897cb6
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimRpfImageDescriptionSubheader.cpp
@@ -0,0 +1,115 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: This class extends the stl's string class.
+//
+//********************************************************************
+// $Id: ossimRpfImageDescriptionSubheader.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <istream>
+#include <ostream>
+#include <ossim/support_data/ossimRpfImageDescriptionSubheader.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimErrorCodes.h>
+
+std::ostream& operator <<(std::ostream& out,
+                          const ossimRpfImageDescriptionSubheader& data)
+{
+   return data.print(out);
+}
+
+ossimRpfImageDescriptionSubheader::ossimRpfImageDescriptionSubheader()
+{
+   clearFields();
+}
+
+ossimErrorCode ossimRpfImageDescriptionSubheader::parseStream(
+   std::istream& in, ossimByteOrder byteOrder)
+{
+   if(in)
+   {
+      theStartOffset = in.tellg();
+      in.read((char*)&theNumberOfSpectralGroups, 2);
+      in.read((char*)&theNumberOfSubframeTables, 2);
+      in.read((char*)&theNumberOfSpectralBandTables, 2);
+      in.read((char*)&theNumberOfSpectralBandLinesPerImageRow, 2);
+      in.read((char*)&theNumberOfSubframesHorizontal, 2);
+      in.read((char*)&theNumberOfSubframesVertical, 2);
+      in.read((char*)&theNumberOfOutputColumnsPerSubframe, 4);
+      in.read((char*)&theNumberOfOutputRowsPerSubframe, 4);
+      in.read((char*)&theSubframeMaskTableOffset, 4);
+      in.read((char*)&theTransparencyMaskTableOffset, 4);
+
+      theEndOffset = in.tellg();
+      ossimEndian anEndian;
+
+      if(anEndian.getSystemEndianType() != byteOrder)
+      {
+         anEndian.swap(theNumberOfSpectralGroups);
+         anEndian.swap(theNumberOfSubframeTables);
+         anEndian.swap(theNumberOfSpectralBandTables);
+         anEndian.swap(theNumberOfSpectralBandLinesPerImageRow);
+         anEndian.swap(theNumberOfSubframesHorizontal);
+         anEndian.swap(theNumberOfSubframesVertical);
+         anEndian.swap(theNumberOfOutputColumnsPerSubframe);
+         anEndian.swap(theNumberOfOutputRowsPerSubframe);
+         anEndian.swap(theSubframeMaskTableOffset);
+         anEndian.swap(theTransparencyMaskTableOffset);
+      }
+   }
+   else
+   {
+      return ossimErrorCodes::OSSIM_ERROR;
+   }
+
+   return ossimErrorCodes::OSSIM_OK;
+}
+
+std::ostream& ossimRpfImageDescriptionSubheader::print(
+   std::ostream& out, const std::string& prefix) const
+{
+   out << prefix << "NumberOfSpectralGroups: "
+       << theNumberOfSpectralGroups << "\n"
+       << prefix << "NumberOfSubframeTables: "
+       << theNumberOfSubframeTables << "\n"
+       << prefix << "NumberOfSpectralBandTables: "
+       << theNumberOfSpectralBandTables << "\n"
+       << prefix << "NumberOfSpectralBandLinesPerImageRow: "
+       << theNumberOfSpectralBandLinesPerImageRow << "\n"
+       << prefix << "NumberOfSubframesHorizontal: "
+       << theNumberOfSubframesHorizontal << "\n"
+       << prefix << "NumberOfSubframesVertical: "
+       << theNumberOfSubframesVertical << "\n"
+       << prefix << "NumberOfOutputColumnsPerSubframe: "
+       << theNumberOfOutputColumnsPerSubframe << "\n"
+       << prefix << "NumberOfOutputRowsPerSubframe: "
+       << theNumberOfOutputRowsPerSubframe << "\n"
+       << prefix << "SubframeMaskTableOffset: "
+       << theSubframeMaskTableOffset << "\n"
+       << prefix << "TransparencyMaskTableOffset: "
+       << theTransparencyMaskTableOffset << std::endl;
+   return out;
+}
+
+void ossimRpfImageDescriptionSubheader::clearFields()
+{
+   theStartOffset                          = 0;
+   theEndOffset                            = 0;
+   
+   theNumberOfSpectralGroups               = 0;
+   theNumberOfSubframeTables               = 0;
+   theNumberOfSpectralBandTables           = 0;
+   theNumberOfSpectralBandLinesPerImageRow = 0;
+   theNumberOfSubframesHorizontal          = 0;
+   theNumberOfSubframesVertical            = 0;
+   theNumberOfOutputColumnsPerSubframe     = 0;
+   theNumberOfOutputRowsPerSubframe        = 0;
+   theSubframeMaskTableOffset              = 0;
+   theTransparencyMaskTableOffset          = 0;
+}
+
diff --git a/src/ossim/support_data/ossimRpfImageDisplayParameterSubheader.cpp b/ossim/src/ossim/support_data/ossimRpfImageDisplayParameterSubheader.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfImageDisplayParameterSubheader.cpp
rename to ossim/src/ossim/support_data/ossimRpfImageDisplayParameterSubheader.cpp
diff --git a/ossim/src/ossim/support_data/ossimRpfInfo.cpp b/ossim/src/ossim/support_data/ossimRpfInfo.cpp
new file mode 100644
index 0000000..c125b76
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimRpfInfo.cpp
@@ -0,0 +1,92 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Mingjie Su
+//
+// Description: Rpf Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimRpfInfo.cpp 1237 2010-08-05 19:50:27Z ming.su $
+
+//ossim includes
+#include <ossim/base/ossimTrace.h>
+#include <ossim/support_data/ossimRpfInfo.h>
+#include <ossim/support_data/ossimInfoFactory.h>
+
+// Static trace for debugging
+static ossimTrace traceDebug("ossimRpfInfo:debug");
+static ossimTrace traceDump("ossimRpfInfo:dump"); // This will dump offsets.
+
+ossimRpfInfo::ossimRpfInfo()
+   : ossimInfoBase(),
+     theFile(),
+     m_infoFile()
+{
+}
+
+ossimRpfInfo::~ossimRpfInfo()
+{
+}
+
+bool ossimRpfInfo::open(const ossimFilename& file)
+{
+   theFile = file;
+   if (isOpen())
+   {
+     std::ifstream in((theFile).c_str() );
+
+     std::string line;
+     int index = 0;
+     while(in.good())
+     {
+       // Read in a line.
+       std::getline(in, line);
+       ossimString tmpStr = ossimString(line);
+       if (index > 0)
+       {
+         if (!tmpStr.empty())
+         {
+           std::vector<ossimString> tmpVector = tmpStr.split("|");
+           if (tmpVector.size() > 0)
+           {
+             m_infoFile = tmpVector[0];
+             break;
+           }
+         }
+       }
+       index++;
+     }
+     in.close();
+
+     return true;
+   }
+   return false;
+}
+
+bool ossimRpfInfo::isOpen()
+{
+  ossimString ext = theFile.ext().downcase();
+
+  if(ext == "rpf")
+  {
+    return true;
+  }
+  else
+  {
+    return false;
+  }
+}
+
+std::ostream& ossimRpfInfo::print(std::ostream& out) const
+{
+  ossimInfoBase* info = ossimInfoFactory::instance()->create(m_infoFile);
+  if (info)
+  {
+    info->print(out);
+  }
+
+  return out;
+}
diff --git a/ossim/src/ossim/support_data/ossimRpfLocationSection.cpp b/ossim/src/ossim/support_data/ossimRpfLocationSection.cpp
new file mode 100644
index 0000000..df3e2ee
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimRpfLocationSection.cpp
@@ -0,0 +1,316 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: Rpf support class
+//
+//********************************************************************
+// $Id: ossimRpfLocationSection.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/support_data/ossimRpfLocationSection.h>
+#include <ossim/base/ossimCommon.h> /* ossim::byteOrder() */
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimErrorCodes.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/support_data/ossimRpfComponentIdLut.h>
+#include <istream>
+#include <ostream>
+#include <iterator>
+
+static const ossimTrace traceDebug("ossimRpfLocationSection:debug");
+
+std::ostream& operator<<(std::ostream& out, const ossimRpfComponentLocationRecord& data)
+{
+   return data.print(out);
+}
+
+ossimRpfComponentLocationRecord::ossimRpfComponentLocationRecord()
+   : m_componentId(0),
+     m_componentLength(0),
+     m_componentLocation(0)
+{
+}
+
+ossimRpfComponentLocationRecord::ossimRpfComponentLocationRecord(
+   const ossimRpfComponentLocationRecord& record)
+   : m_componentId(record.m_componentId),
+     m_componentLength(record.m_componentLength),
+     m_componentLocation(record.m_componentLocation)
+{
+}
+
+const ossimRpfComponentLocationRecord& ossimRpfComponentLocationRecord::operator=(
+   const ossimRpfComponentLocationRecord& rhs)
+{
+   if (this != &rhs)
+   {
+      m_componentId       = rhs.m_componentId;
+      m_componentLength   = rhs.m_componentLength;
+      m_componentLocation = rhs.m_componentLocation;
+   }
+   return *this;
+}
+
+std::ostream& ossimRpfComponentLocationRecord::print(
+   std::ostream& out, const std::string& prefix) const
+{
+   out << prefix << "ComponentId:             "
+       << m_componentId << "\n"
+       << prefix << "ComponentIdString:       "
+       << ossimRpfComponentIdLut::instance()->getEntryString(m_componentId) << "\n"
+       << prefix << "ComponentLength:         "
+       << m_componentLength   << "\n"
+       << prefix << "ComponentLocation:       "
+       << m_componentLocation << "\n";
+   return out;
+}
+
+std::ostream& operator <<(std::ostream& out, const ossimRpfLocationSection &data)
+{
+   return data.print(out);
+}
+
+ossimErrorCode ossimRpfComponentLocationRecord::parseStream(
+   std::istream& in, ossimByteOrder byteOrder)
+{
+   if(in)
+   {
+      in.read((char*)&m_componentId, 2);
+      in.read((char*)&m_componentLength, 4);
+      in.read((char*)&m_componentLocation, 4);
+
+      if( ossim::byteOrder() != byteOrder)
+      {
+         // swap to native
+         ossimEndian anEndian;
+         anEndian.swap(m_componentId);
+         anEndian.swap(m_componentLength);
+         anEndian.swap(m_componentLocation);
+      }
+   }
+   else
+   {
+      return ossimErrorCodes::OSSIM_ERROR;
+   }
+
+   return  ossimErrorCodes::OSSIM_OK;
+}
+
+void ossimRpfComponentLocationRecord::writeStream(std::ostream& out)
+{
+   if( ossim::byteOrder() != OSSIM_BIG_ENDIAN)
+   {
+      ossimEndian endian;
+      endian.swap(m_componentId);
+      endian.swap(m_componentLength);
+      endian.swap(m_componentLocation);
+   }
+
+   out.write((char*)&m_componentId, 2);
+   out.write((char*)&m_componentLength, 4);
+   out.write((char*)&m_componentLocation, 4);
+
+   if( ossim::byteOrder() != OSSIM_BIG_ENDIAN)
+   {
+      // Swap back to native byte order.
+      ossimEndian endian;
+      endian.swap(m_componentId);
+      endian.swap(m_componentLength);
+      endian.swap(m_componentLocation);
+   }
+}
+
+ossimRpfLocationSection::ossimRpfLocationSection()
+{
+   clearFields();
+}
+
+ossimErrorCode ossimRpfLocationSection::parseStream(std::istream& in,
+                                                    ossimByteOrder byteOrder)
+{
+   ossimErrorCode result = ossimErrorCodes::OSSIM_OK;
+   
+   if(in)
+   {
+      clearFields();
+      
+      in.read((char*)&m_locationSectionLength, 2);
+      in.read((char*)&m_locationTableOffset, 4);
+      in.read((char*)&m_numberOfComponentLocationRecords, 2);
+      in.read((char*)&m_locationRecordLength, 2);
+      in.read((char*)&m_componentAggregateLength, 4);
+
+      if( ossim::byteOrder() != byteOrder )
+      {
+         ossimEndian anEndian;
+         anEndian.swap(m_locationSectionLength);
+         anEndian.swap(m_locationTableOffset);
+         anEndian.swap(m_numberOfComponentLocationRecords);
+         anEndian.swap(m_locationRecordLength);
+         anEndian.swap(m_componentAggregateLength);
+      }
+      
+      if(traceDebug())
+      {
+         print(ossimNotify(ossimNotifyLevel_DEBUG));
+         ossimNotify(ossimNotifyLevel_DEBUG) << std::endl;
+      }
+
+      m_componentLocationList.resize(m_numberOfComponentLocationRecords);
+      for(ossim_uint32 index = 0;
+          (index < m_componentLocationList.size())&&
+             (result == ossimErrorCodes::OSSIM_OK);
+          ++index)
+      {        
+         result = m_componentLocationList[index].parseStream(in, byteOrder);
+      }
+   }
+   else
+   {
+      result = ossimErrorCodes::OSSIM_ERROR;
+   }
+
+   return result;
+}
+
+
+void ossimRpfLocationSection::writeStream(std::ostream& out)
+{
+   if( ossim::byteOrder() != OSSIM_BIG_ENDIAN)
+   {
+      // Always write in big endian.
+      ossimEndian endian;
+      endian.swap(m_locationSectionLength);
+      endian.swap(m_locationTableOffset);
+      endian.swap(m_numberOfComponentLocationRecords);
+      endian.swap(m_locationRecordLength);
+      endian.swap(m_componentAggregateLength);
+   }
+   
+   out.write((char*)&m_locationSectionLength, 2);
+   out.write((char*)&m_locationTableOffset, 4);
+   out.write((char*)&m_numberOfComponentLocationRecords, 2);
+   out.write((char*)&m_locationRecordLength, 2);
+   out.write((char*)&m_componentAggregateLength, 4);
+
+   if( ossim::byteOrder() != OSSIM_BIG_ENDIAN)
+   {
+      // Swap back to native byte order.
+      ossimEndian endian;
+      endian.swap(m_locationSectionLength);
+      endian.swap(m_locationTableOffset);
+      endian.swap(m_numberOfComponentLocationRecords);
+      endian.swap(m_locationRecordLength);
+      endian.swap(m_componentAggregateLength);
+   }
+   
+   for(ossim_uint32 i = 0; i < m_componentLocationList.size(); ++i)
+   {
+      m_componentLocationList[i].writeStream(out);
+   }
+}
+
+std::ostream& ossimRpfLocationSection::print(
+   std::ostream& out, const std::string& prefix) const
+{
+   out << prefix << "LocationSectionLength:            "
+       << m_locationSectionLength << "\n"
+       << prefix << "LocationTableOffset:              "
+       << m_locationTableOffset << "\n"
+       << prefix << "NumberOfComponentLocationRecords: "
+       << m_numberOfComponentLocationRecords << "\n"
+       << prefix << "LocationRecordLength:             "
+       << m_locationRecordLength << "\n"
+       << prefix << "ComponentAggregateLength:         "
+       << m_componentAggregateLength << "\n";
+   
+   if(m_numberOfComponentLocationRecords > 0)
+   {
+      std::vector<ossimRpfComponentLocationRecord>::const_iterator i =
+         m_componentLocationList.begin();
+      while (i != m_componentLocationList.end())
+      {
+         (*i).print(out, prefix);
+         ++i;
+      }
+   }
+   return out;
+}
+
+bool ossimRpfLocationSection::hasComponent(ossimRpfComponentId componentId)const
+{
+   ossimRpfComponentLocationRecord result;
+   
+   return getComponent(componentId, result);
+}
+
+bool ossimRpfLocationSection::getComponent(ossimRpfComponentId componentId,
+                                           ossimRpfComponentLocationRecord &result)const
+{
+   std::vector<ossimRpfComponentLocationRecord>::const_iterator component =
+      m_componentLocationList.begin();
+   
+   while(component != m_componentLocationList.end())
+   {
+      if((*component).m_componentId == static_cast<unsigned short>(componentId))
+      {
+         result = *component;
+
+         return true;
+      }      
+      ++component;
+   }
+   
+   return false;
+}
+
+void ossimRpfLocationSection::addComponentRecord(const ossimRpfComponentLocationRecord& record)
+{
+   m_componentLocationList.push_back(record);
+}
+
+void ossimRpfLocationSection::setLocationSectionLength(ossim_uint16 length)
+{
+   m_locationSectionLength = length;
+}
+
+void ossimRpfLocationSection::setLocationTableOffset(ossim_uint32 offset)
+{
+   m_locationTableOffset = offset;
+}
+
+void ossimRpfLocationSection::setNumberOfComponentLocationRecords(ossim_uint16 count)
+{
+   m_numberOfComponentLocationRecords = count;
+}
+
+void ossimRpfLocationSection::setLocationRecordLength(ossim_uint16 length)
+{
+   m_locationRecordLength = length;
+}
+
+void ossimRpfLocationSection::setComponentAggregateLength(ossim_uint32 length)
+{
+   m_componentAggregateLength = length;
+}
+
+void ossimRpfLocationSection::clearFields()
+{
+   m_locationSectionLength            = 0;
+   m_locationTableOffset              = 0;
+   m_numberOfComponentLocationRecords = 0;
+   m_locationRecordLength             = 0;
+   m_componentAggregateLength         = 0;
+
+   m_componentLocationList.clear();
+}
+
+std::vector<ossimRpfComponentLocationRecord>& ossimRpfLocationSection::getLocationRecordList()
+{
+   return m_componentLocationList;
+}
+
diff --git a/src/ossim/support_data/ossimRpfMaskSubheader.cpp b/ossim/src/ossim/support_data/ossimRpfMaskSubheader.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfMaskSubheader.cpp
rename to ossim/src/ossim/support_data/ossimRpfMaskSubheader.cpp
diff --git a/src/ossim/support_data/ossimRpfMaskSubsection.cpp b/ossim/src/ossim/support_data/ossimRpfMaskSubsection.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfMaskSubsection.cpp
rename to ossim/src/ossim/support_data/ossimRpfMaskSubsection.cpp
diff --git a/src/ossim/support_data/ossimRpfPathnameRecord.cpp b/ossim/src/ossim/support_data/ossimRpfPathnameRecord.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfPathnameRecord.cpp
rename to ossim/src/ossim/support_data/ossimRpfPathnameRecord.cpp
diff --git a/src/ossim/support_data/ossimRpfReplaceUpdateRecord.cpp b/ossim/src/ossim/support_data/ossimRpfReplaceUpdateRecord.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfReplaceUpdateRecord.cpp
rename to ossim/src/ossim/support_data/ossimRpfReplaceUpdateRecord.cpp
diff --git a/src/ossim/support_data/ossimRpfReplaceUpdateSectionSubheader.cpp b/ossim/src/ossim/support_data/ossimRpfReplaceUpdateSectionSubheader.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfReplaceUpdateSectionSubheader.cpp
rename to ossim/src/ossim/support_data/ossimRpfReplaceUpdateSectionSubheader.cpp
diff --git a/src/ossim/support_data/ossimRpfReplaceUpdateTable.cpp b/ossim/src/ossim/support_data/ossimRpfReplaceUpdateTable.cpp
similarity index 100%
rename from src/ossim/support_data/ossimRpfReplaceUpdateTable.cpp
rename to ossim/src/ossim/support_data/ossimRpfReplaceUpdateTable.cpp
diff --git a/ossim/src/ossim/support_data/ossimRpfToc.cpp b/ossim/src/ossim/support_data/ossimRpfToc.cpp
new file mode 100644
index 0000000..b7c0fcf
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimRpfToc.cpp
@@ -0,0 +1,1295 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+// 
+// Description: Rpf support class
+// 
+//********************************************************************
+// $Id: ossimRpfToc.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/support_data/ossimRpfToc.h>
+#include <ossim/base/ossimErrorCodes.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimProperty.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/support_data/ossimNitfFileHeaderV2_X.h>
+#include <ossim/support_data/ossimNitfFileHeaderV2_0.h>
+#include <ossim/support_data/ossimRpfFrame.h>
+#include <ossim/support_data/ossimRpfFrameFileIndexSectionSubheader.h>
+#include <ossim/support_data/ossimRpfFrameFileIndexSubsection.h>
+#include <ossim/support_data/ossimRpfBoundaryRectTable.h>
+#include <ossim/support_data/ossimRpfLocationSection.h>
+#include <ossim/support_data/ossimRpfTocEntry.h>
+#include <ossim/support_data/ossimRpfFrameFileIndexRecord.h>
+#include <ossim/support_data/ossimRpfBoundaryRectSectionSubheader.h>
+#include <ossim/support_data/ossimRpfPathnameRecord.h>
+#include <ossim/support_data/ossimNitfFile.h>
+#include <ossim/base/ossimTrace.h>
+#include <iostream>
+#include <fstream>
+
+static ossimTrace traceDebug("ossimRpfToc:debug");
+
+std::ostream& operator <<(std::ostream& out, const ossimRpfToc& data)
+{
+   return data.print(out);
+}
+
+ossimRpfToc::ossimRpfToc()
+   :m_tocEntryList(),
+    m_filename(),
+    m_nitfFileHeader(0),
+    m_rpfHeader(0)
+{
+}
+
+ossimRpfToc::~ossimRpfToc()
+{
+   deleteAll();
+}
+
+ossimErrorCode ossimRpfToc::parseFile(const ossimFilename &fileName, bool keepFileHeader)
+{
+   static const char MODULE[] = "ossimRpfToc::parseFile";
+   
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered....." << std::endl;
+   }
+
+   ossimRefPtr<ossimNitfFile> nitfFile = new ossimNitfFile;
+
+   clearAll();
+
+   nitfFile->parseFile(fileName);
+
+   m_nitfFileHeader = nitfFile->getHeader();
+
+   m_rpfHeader = 0; // ossimRefPtr
+   
+   if( !m_nitfFileHeader.valid() )
+   {
+      nitfFile = 0;
+      
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << " leaving with no nitf header found....." << std::endl;
+      }
+      return ossimErrorCodes::OSSIM_ERROR;
+   }
+   
+   ossimNitfTagInformation info; 
+   m_nitfFileHeader->getTag(info, "RPFHDR");
+
+   if(traceDebug() && (info.getTagName() == "RPFHDR") )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " nitf file header print\n";
+      m_nitfFileHeader->print( ossimNotify(ossimNotifyLevel_DEBUG) );
+   }
+   
+   if ( !keepFileHeader )
+   {
+      // we no longer need access to the nitf header.  We got what we needed.
+      m_nitfFileHeader = 0;
+   }
+   nitfFile = 0;
+   
+   m_filename = fileName;
+
+   if(info.getTagName() == "RPFHDR")
+   {
+      m_rpfHeader = new ossimRpfHeader;
+
+      std::ifstream in(m_filename.c_str(), std::ios::in|std::ios::binary);
+      
+      // set the get pointer for the stream to the start
+      // of the Rpf header data
+      in.seekg(info.getTagDataOffset(), std::ios::beg);
+      
+      // now get the header data.  We do not need to pass in the byte order.
+      // this is grabbed from the first byte of the stream.  To see this,
+      // Look at the RpfHeader implementation.
+      m_rpfHeader->parseStream(in);
+
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << " DEBUG: Found RPF HEADER tag\n";
+         m_rpfHeader->print( ossimNotify(ossimNotifyLevel_DEBUG) );
+      }
+
+   }
+   else
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimRpfToc::parseFile: Leaving No RPFHDR tag found" << "\n";
+      }
+      return ossimErrorCodes::OSSIM_ERROR;
+   }
+   
+   if( m_rpfHeader.valid() )
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG: Building toc list" << "\n";
+      }
+      buildTocEntryList( m_rpfHeader.get() );
+   }
+   else
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimRpfToc::parseFile: Leaving no RPFHDR " << __LINE__ << "\n";
+      }
+      return ossimErrorCodes::OSSIM_ERROR;
+   }
+   
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimRpfToc::parseFile: Returning with OK." << std::endl;
+   }
+   
+   return ossimErrorCodes::OSSIM_OK;
+}
+
+void ossimRpfToc::createTocAndCopyFrames( const ossimFilename& dotRpfFile,
+                                          const ossimFilename& outputDir )
+{
+   static const char MODULE[] = "ossimRpfToc::createTocAndCopyFrames";
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " entered..."
+         << "\ndot rpf file:      " << dotRpfFile
+         << "\noutput directory:  " << outputDir
+         << "\n";
+   }
+
+   if ( outputDir.expand().exists() == false )
+   {
+      if ( !outputDir.createDirectory(true, 0775) )
+      {
+         std::string e = MODULE;
+         e += " ERROR:\nCould not create directory: ";
+         e+= outputDir.c_str();
+         throw ossimException(e);
+      }
+   }
+
+   // Open the dot rpf file.
+   std::ifstream* dotRpfStr = new std::ifstream;
+   dotRpfStr->open(dotRpfFile.c_str(), ios_base::in);
+   if ( !dotRpfStr->good() )
+   {
+      delete dotRpfStr;
+      dotRpfStr = 0;
+
+      std::string e = MODULE;
+      e += " ERROR:\nCould not open: ";
+      e += dotRpfFile.c_str();
+      throw ossimException(e);
+   }
+
+   ossimFilename sourceADotTocFile = getSourceTocFile(*dotRpfStr);
+   if ( sourceADotTocFile.empty() )
+   {
+      delete dotRpfStr;
+      dotRpfStr = 0;
+
+      std::string e = MODULE;
+      e += " ERROR:\nCould not deduce source a.toc file!";
+      throw ossimException(e);
+   }
+   
+   // Open the source a.toc file. Note the true flag is to keep the file header.
+   ossimRefPtr<ossimRpfToc> sourceADotToc = new ossimRpfToc;
+   if ( sourceADotToc->parseFile(sourceADotTocFile, true) != ossimErrorCodes::OSSIM_OK )
+   {
+      delete dotRpfStr;
+      dotRpfStr = 0;
+ 
+      std::string e = MODULE;
+      e += " ERROR:\nCould not open: ";
+      e += sourceADotTocFile.c_str();
+      throw ossimException(e);
+   }
+
+   ossimRefPtr<const ossimNitfFileHeader> sourceNitfFileHdr = sourceADotToc->getNitfFileHeader();
+   if ( !sourceNitfFileHdr.valid() )
+   {
+      delete dotRpfStr;
+      dotRpfStr = 0;        
+
+      std::string e = MODULE;
+      e += " ERROR:\nCould not get nitf file header from: ";
+      e += sourceADotTocFile.c_str();
+      throw ossimException(e);
+   }
+   
+   ossimRefPtr<const ossimRpfHeader> sourceRpfHdr = sourceADotToc->getRpfHeader();
+   if ( !sourceRpfHdr.valid() )
+   {
+      delete dotRpfStr;
+      dotRpfStr = 0;
+      
+      std::string e = MODULE;
+      e += " ERROR:\nCould not get rpf header from: ";
+      e += sourceADotTocFile.c_str();
+      throw ossimException(e);
+   }
+
+   // Get the boundary rect sub header from the source a.toc.
+   ossimRefPtr<ossimRpfBoundaryRectSectionSubheader> boundaryRectSectionSubheader =
+      sourceRpfHdr->getNewBoundaryRectSectSubheader(sourceADotTocFile);
+   if ( !boundaryRectSectionSubheader.valid() )
+   {
+      delete dotRpfStr;
+      dotRpfStr = 0;
+
+      std::string e = MODULE;
+      e += " ERROR:\nCould not pull boundary rect sub header from source file: ";
+      e += sourceADotTocFile.c_str();
+      throw ossimException(e);
+   }   
+
+   // Get the boundary rect table from the source a.toc.
+   ossimRefPtr<ossimRpfBoundaryRectTable> boundaryRectTable =
+      sourceRpfHdr->getNewBoundaryRectTable(sourceADotTocFile);
+   if ( !boundaryRectTable.valid() )
+   {
+      delete dotRpfStr;
+      dotRpfStr = 0;
+      
+      std::string e = MODULE;
+      e += " ERROR:\nCould not pull boundary rect table from source file: ";
+      e += sourceADotTocFile.c_str();
+      throw ossimException(e);
+   }
+   
+   // Get the frame file subheader from the source a.toc.
+   ossimRefPtr<ossimRpfFrameFileIndexSectionSubheader> frameFileSubHeader =
+      sourceRpfHdr->getNewFrameFileIndexSectionSubheader(sourceADotTocFile);
+   if ( !frameFileSubHeader.valid() )
+   {
+      delete dotRpfStr;
+      dotRpfStr = 0;
+
+      std::string e = MODULE;
+      e += " ERROR:\nCould not pull frame file sub header from source file: ";
+      e += sourceADotTocFile.c_str();
+      throw ossimException(e);
+   }
+
+   // Get the frame file subsection from the source a.toc.
+   ossimRefPtr<ossimRpfFrameFileIndexSubsection> frameFileSubSection =
+      sourceRpfHdr->getNewFileIndexSubsection(sourceADotTocFile);
+   if ( !frameFileSubSection.valid() )
+   {
+      delete dotRpfStr;
+      dotRpfStr = 0;
+
+      std::string e = MODULE;
+      e += " ERROR:\nCould not pull frame file sub section from source file: ";
+      e += sourceADotTocFile.c_str();
+      throw ossimException(e); 
+   }
+   
+   // Open the output file to write to.
+   const ossimFilename A_DOT_TOC_FILE = "a.toc";
+   ossimFilename dotTocFile = outputDir.dirCat(A_DOT_TOC_FILE);
+   std::ofstream* dotTocStr = new std::ofstream;
+   dotTocStr->open( dotTocFile.c_str(), ios::out|ios::binary );
+   if ( !dotTocStr->good() )
+   {
+      delete dotRpfStr;
+      dotRpfStr = 0;
+      delete dotTocStr;
+      dotTocStr =0;
+
+      std::string e = MODULE;
+      e += " ERROR:\nCould not open: ";
+      e += dotTocFile.c_str();
+      throw ossimException(e);
+   }
+   
+   // Variables used throughout:
+   ossimRefPtr<ossimProperty> prop = new ossimStringProperty();
+   ossimString field;
+   ossimString s;
+   // std::streampos fileHeaderLength = 0;
+   // std::streampos fileLength = 0;
+      
+   ossimRefPtr<ossimNitfFileHeaderV2_0> fileHdr = new ossimNitfFileHeaderV2_0();
+   
+   // Set the CLEVEL:
+   s = "01";
+   fileHdr->setComplexityLevel(s);
+   
+   // Set the OSTAID:
+   prop = sourceNitfFileHdr->getProperty(ossimNitfFileHeaderV2_X::OSTAID_KW);
+   fileHdr->setProperty(prop);
+   
+   // Set the FDT (date):
+   fileHdr->setDate();
+   
+   // Set the FTITLE:
+   s = "a.toc";
+   fileHdr->setTitle(s);
+   
+   // Set the FSCLAS:
+   prop = sourceNitfFileHdr->getProperty(ossimNitfFileHeaderV2_X::FSCLAS_KW);
+   fileHdr->setProperty(prop);
+   
+   // Set the FSCODE:
+   prop = sourceNitfFileHdr->getProperty(ossimNitfFileHeaderV2_X::FSCODE_KW);
+   fileHdr->setProperty(prop);
+   
+   // Set the FSCTLH:
+   prop = sourceNitfFileHdr->getProperty(ossimNitfFileHeaderV2_X::FSCTLH_KW);
+   fileHdr->setProperty(prop);
+   
+   // Set the ONAME:
+   prop = sourceNitfFileHdr->getProperty(ossimNitfFileHeaderV2_X::ONAME_KW);
+   fileHdr->setProperty(prop);
+   
+   // Set the OPHONE:
+   prop = sourceNitfFileHdr->getProperty(ossimNitfFileHeaderV2_X::OPHONE_KW);
+   fileHdr->setProperty(prop);
+   
+   // Add the rpf header.
+   ossimRpfHeader* rpfHdr = new ossimRpfHeader( *(sourceRpfHdr.get()) );
+   
+   ossimRefPtr<ossimNitfRegisteredTag> rpfHdrRp = rpfHdr;
+   ossimNitfTagInformation rpfHdrInfo(rpfHdrRp);
+   fileHdr->addTag(rpfHdrInfo);
+   
+   //---
+   // Write it out...
+   // The first write will be with an rpfheader with no location sections just
+   // to see where the end of the file header is.
+   //---
+   fileHdr->writeStream(*dotTocStr);
+   
+   //---
+   // End of file header. Get the header length. This will also be the
+   // start of the location section.
+   //---
+   std::streampos pos = dotTocStr->tellp();
+   std::streamoff locationSectionOffset = pos;
+   
+   // Set the header length:
+   fileHdr->setHeaderLength( static_cast<ossim_uint64>(locationSectionOffset) );
+   
+   // Set the location of the location section.
+   rpfHdr->setLocationSectionPos(locationSectionOffset);
+
+   // Set the file name.
+   rpfHdr->setFilename(A_DOT_TOC_FILE);
+   
+   // Add the component location records to the header.
+   ossimRpfLocationSection* locSec = rpfHdr->getLocationSection();
+   
+   // Clear the records copied from the source a.toc.
+   locSec->clearFields();
+   
+   //---
+   // Set the length of the locSec to 74.  The record itself is 14 bytes plus
+   // an additional 60 bytes for six location records ten bytes each.
+   //---
+   const ossim_uint16 LOCATION_SECTION_SIZE = 74;
+   locSec->setLocationSectionLength(LOCATION_SECTION_SIZE);
+   
+   // Set the offset which 14 bytes to get to the first record.
+   locSec->setLocationTableOffset(14);
+   
+   // Six records:
+   locSec->setNumberOfComponentLocationRecords(6);
+   
+   // Each record 10 bytes:
+   locSec->setLocationRecordLength(10);
+   
+   // Don't know the aggregate length yet.
+   
+   ossimRpfComponentLocationRecord locRec;
+   
+   // Note: See ossimRpfConstants for enum ossimRpfComponentId
+   
+   const ossim_uint32 RPFHDR_SIZE = 48;
+   const ossim_uint32 LOCATION_SECTION_OFFSET = static_cast<ossim_uint32>(locationSectionOffset);
+   const ossim_uint32 BOUNDARY_SUBHEADER_SIZE = 8;
+   const ossim_uint32 BOUNDARY_RECORD_SIZE = 132;
+   const ossim_uint32 FILE_SUBHEADER_SIZE = 13;
+   // const ossim_uint32 = ;
+   
+   // Record 1 RPFHDR location:
+   ossim_uint32 rpfHdrOffset = 0;
+   if ( fileHdr->getTag(rpfHdrInfo, "RPFHDR") )
+   {
+      rpfHdrOffset = rpfHdrInfo.getTagDataOffset();
+   }
+
+   locRec.m_componentId = OSSIM_RPF_HEADER_COMPONENT; // 128
+   locRec.m_componentLength = RPFHDR_SIZE;
+   locRec.m_componentLocation = static_cast<ossim_uint32>(rpfHdrInfo.getTagDataOffset());
+   locSec->addComponentRecord(locRec);
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)<< "rpf hdr offset: " << rpfHdrOffset << "\n";
+      locRec.print( ossimNotify(ossimNotifyLevel_DEBUG) );
+   }
+   
+   // Record 2 location section:
+   locRec.m_componentId = OSSIM_RPF_LOCATION_COMPONENT; // 129
+   locRec.m_componentLength = LOCATION_SECTION_SIZE;
+   locRec.m_componentLocation = LOCATION_SECTION_OFFSET;
+   locSec->addComponentRecord(locRec);
+
+   if ( traceDebug() )
+   {
+      locRec.print( ossimNotify(ossimNotifyLevel_DEBUG) );
+   }
+   
+   // Record 3 boundary rect sub header section:
+   locRec.m_componentId = OSSIM_RPF_BOUNDARY_RECT_SECTION_SUBHEADER; // 148
+   locRec.m_componentLength = BOUNDARY_SUBHEADER_SIZE;
+   locRec.m_componentLocation = locRec.m_componentLocation + LOCATION_SECTION_SIZE;
+   locSec->addComponentRecord(locRec);
+
+   if ( traceDebug() )
+   {
+      locRec.print( ossimNotify(ossimNotifyLevel_DEBUG) );
+   }
+   
+   // Capture the location.
+   std::streamoff boundaryRectPosition = locRec.m_componentLocation;
+   
+   // Record 4 boundary rect table:
+   locRec.m_componentId = OSSIM_RPF_BOUNDARY_RECT_TABLE; // 149
+   locRec.m_componentLength = BOUNDARY_RECORD_SIZE;
+   locRec.m_componentLocation = locRec.m_componentLocation + BOUNDARY_SUBHEADER_SIZE;
+   locSec->addComponentRecord(locRec);
+
+   if ( traceDebug() )
+   {
+      locRec.print( ossimNotify(ossimNotifyLevel_DEBUG) );
+   }
+   
+   // Record 5 file index sub header:
+   locRec.m_componentId = OSSIM_RPF_FRAME_FILE_INDEX_SECTION_SUBHEADER; // 150
+   locRec.m_componentLength = FILE_SUBHEADER_SIZE;
+   locRec.m_componentLocation = locRec.m_componentLocation + BOUNDARY_RECORD_SIZE;
+   locSec->addComponentRecord(locRec);
+
+   if ( traceDebug() )
+   {
+      locRec.print( ossimNotify(ossimNotifyLevel_DEBUG) );
+   }
+    
+   // Record 6 file index sub header:
+   locRec.m_componentId = OSSIM_RPF_FRAME_FILE_INDEX_SUBSECTION; // 151
+   locRec.m_componentLength = 0;  // need to calculate.
+   locRec.m_componentLocation = locRec.m_componentLocation + FILE_SUBHEADER_SIZE;
+   locSec->addComponentRecord(locRec);
+
+   if ( traceDebug() )
+   {
+      locRec.print( ossimNotify(ossimNotifyLevel_DEBUG) );
+   }
+   
+   // Seek back and re-write...
+   dotTocStr->seekp(0, ios::beg);
+   fileHdr->writeStream(*dotTocStr);
+   
+   dotTocStr->seekp(boundaryRectPosition, ios::beg);
+
+   // Only writing one entry:
+   boundaryRectSectionSubheader->setNumberOfEntries(1);
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "writing boundaryRectSectionSubheader:\n" << *(boundaryRectSectionSubheader.get())
+         << "\n";
+   }
+
+   //---
+   // Write the boundary rectangle section.  This includes the subheader and subsection.
+   // These coorespond to location records 3 and 4 above.
+   //---
+   boundaryRectSectionSubheader->writeStream(*dotTocStr);
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) 
+         << "Original boundaryRectTable:\n" << *(boundaryRectTable.get()) << "\n";
+   }
+
+   ossim_uint32 entry;
+   if ( getCorespondingEntry( frameFileSubSection.get(), *dotRpfStr, entry ) )
+   {
+      ossimRpfBoundaryRectRecord boundaryRectRecord;
+      if ( boundaryRectTable->getEntry( entry, boundaryRectRecord) )
+      {
+         if ( traceDebug() )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) 
+               << "writing boundaryRectTable:\n" << boundaryRectRecord << "\n";
+         }
+         
+         boundaryRectRecord.writeStream(*dotTocStr);
+      }
+      else
+      {
+         std::string e = MODULE;
+         e += " ERROR:\nCould not get bounding rect record for entry: ";
+         e += ossimString::toString(entry).c_str();
+         throw ossimException(e);
+      }
+   }
+   else
+   {
+      std::string e = MODULE;
+      e += " ERROR:\nCould not deduce entry from frame list!";
+      throw ossimException(e);
+   }
+
+   frameFileSubHeader->setNumberOfIndexRecords( getNumberOfFrames(*dotRpfStr) );
+   frameFileSubHeader->setNumberOfPathnameRecords(1);
+   const ossim_uint16 FRAME_FILE_INDEX_RECORD_LENGTH = 33;
+   frameFileSubHeader->setIndexRecordLength( FRAME_FILE_INDEX_RECORD_LENGTH );
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "writing frameFileSubHeader:\n" << *(frameFileSubHeader.get()) << "\n";
+   }
+   frameFileSubHeader->writeStream( *dotTocStr );
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "writing frameFileSubSection:\n";
+   }
+
+   std::streamoff frameFileIndexSectionStartPos = dotTocStr->tellp();
+   
+   writeFrameFileIndexSection(frameFileSubSection.get(), *dotRpfStr, *dotTocStr);
+   
+   std::streamoff endOfFilePos = dotTocStr->tellp();
+
+   // Update the location section length for the frame file index section.
+   locSec->getLocationRecordList()[5].m_componentLength =
+      static_cast<ossim_uint32>(endOfFilePos - frameFileIndexSectionStartPos);
+
+   // Update the length of all location sections.
+   locSec->setComponentAggregateLength(
+      static_cast<ossim_uint32>(endOfFilePos) - rpfHdr->getLocationSectionLocation() );
+   
+
+   fileHdr->setFileLength(static_cast<ossim_uint64>(endOfFilePos));
+   dotTocStr->seekp(0, ios::beg);
+   fileHdr->writeStream(*dotTocStr);
+
+   ossimNotify(ossimNotifyLevel_DEBUG) << "Wrote file: " << dotTocFile << "\n";
+
+   // Copy the frames to the output directory.
+   copyFrames(*dotRpfStr, outputDir);
+
+   // Cleanup:
+   delete dotRpfStr;
+   dotRpfStr = 0;
+   delete dotTocStr;
+   dotTocStr =0;
+}
+
+std::ostream& ossimRpfToc::print(std::ostream& out,
+                                 const std::string& prefix,
+                                 bool printOverviews) const
+{
+   if( m_rpfHeader.valid() )
+   {
+      m_rpfHeader->print(out, prefix);
+
+      //---
+      // Go through the entries...  We're going to skip overviews here.
+      //---
+      ossim_uint32 prefixIndex = 0;
+      std::vector< ossimRpfTocEntry*>::const_iterator tocEntry =
+         m_tocEntryList.begin();
+      while(tocEntry != m_tocEntryList.end())
+      {
+         if (*tocEntry)
+         {
+            if ( traceDebug() )
+            {
+               (*tocEntry)->print(out, prefix);
+            }
+            
+            const ossimRpfBoundaryRectRecord REC =
+               (*tocEntry)->getBoundaryInformation();
+
+            ossimString scale = REC.getScale();
+            if ( (scale.contains("OVERVIEW")) == false ||
+                 printOverviews )
+            {
+               ossimString entryPrefix = prefix;
+               entryPrefix += "image";
+               entryPrefix += ossimString::toString(prefixIndex);
+               entryPrefix += ".";
+               REC.print(out, entryPrefix);
+
+               //---
+               // Get the first frame that exists so we can get to
+               // the attributes.
+               //---
+               ossimRpfFrameEntry frameEntry;
+               getFirstEntry((*tocEntry), frameEntry);
+
+               if (frameEntry.exists())
+               {
+                  ossimRpfFrame rpfFrame;
+                  if ( rpfFrame.parseFile(frameEntry.getFullPath())
+                       == ossimErrorCodes::OSSIM_OK )
+                  {
+                     rpfFrame.print(out, entryPrefix);
+                  }
+               }
+            }
+         }
+         ++prefixIndex;
+         ++tocEntry;
+      }
+   }
+   return out;
+}
+
+ossim_uint32 ossimRpfToc::getNumberOfEntries()const
+{
+   return static_cast<ossim_uint32>(m_tocEntryList.size());
+}
+
+const ossimRpfTocEntry* ossimRpfToc::getTocEntry(ossim_uint32 index)const
+{
+   if(index < m_tocEntryList.size())
+   {
+      return m_tocEntryList[index];
+   }
+   return 0;
+}
+
+ossim_int32 ossimRpfToc::getTocEntryIndex(const ossimRpfTocEntry* entry)
+
+{
+   for(ossim_int32 i = 0; i < (ossim_int32)m_tocEntryList.size(); ++i)
+   {
+      if(m_tocEntryList[i] == entry)
+      {
+         return i;
+      }
+   }
+
+   return -1;
+}
+
+const ossimNitfFileHeader* ossimRpfToc::getNitfFileHeader()const
+{
+   return m_nitfFileHeader.get();
+}
+
+const ossimRpfHeader* ossimRpfToc::getRpfHeader()const
+{
+   return m_rpfHeader.get();
+}
+
+ossim_uint32 ossimRpfToc::getNumberOfFramesHorizontal(ossim_uint32 idx) const
+{
+   ossim_uint32 nFrames = 0;
+   const ossimRpfTocEntry* pEntry = getTocEntry( idx );
+   if ( pEntry != NULL )
+   {
+      nFrames = pEntry->getNumberOfFramesHorizontal();
+   }
+   return nFrames;
+}
+
+ossim_uint32 ossimRpfToc::getNumberOfFramesVertical(ossim_uint32 idx) const
+{
+   ossim_uint32 nFrames = 0;
+   const ossimRpfTocEntry* pEntry = getTocEntry( idx );
+   if ( pEntry != NULL )
+   {
+      nFrames = pEntry->getNumberOfFramesVertical();
+   }
+   return nFrames;
+}
+
+bool ossimRpfToc::getRpfFrameEntry(ossim_uint32 entryIdx, 
+                                   ossim_uint32 row,
+                                   ossim_uint32 col,
+                                   ossimRpfFrameEntry& result)const
+{
+   const ossimRpfTocEntry* pEntry = getTocEntry( entryIdx );
+   if ( pEntry != NULL )
+   {
+      return pEntry->getEntry( row, col, result );
+   }
+   return false;
+}
+
+const ossimString ossimRpfToc::getRelativeFramePath( ossim_uint32 entryIdx,
+                                                     ossim_uint32 row,
+                                                     ossim_uint32 col) const
+{
+   ossimRpfFrameEntry frameEntry;
+   bool bResult = getRpfFrameEntry( entryIdx, row, col, frameEntry );
+   if ( bResult == true )
+   {
+      return frameEntry.getPathToFrameFileFromRoot();
+   }
+   return ossimString("");
+}
+
+void ossimRpfToc::deleteAll()
+{
+   m_rpfHeader = 0;
+
+   deleteTocEntryList();
+}
+
+void ossimRpfToc::clearAll()
+{
+   deleteTocEntryList();
+   m_filename = "";
+}
+
+void ossimRpfToc::deleteTocEntryList()
+{
+   std::vector< ossimRpfTocEntry*>::iterator tocEntry =
+      m_tocEntryList.begin();
+   while(tocEntry != m_tocEntryList.end())
+   {
+      if(*tocEntry)
+      {
+         delete (*tocEntry);
+         *tocEntry = NULL;
+      }
+      ++tocEntry;
+   }
+   m_tocEntryList.clear();
+}
+
+void ossimRpfToc::buildTocEntryList(ossimRpfHeader* rpfHeader)
+{
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimRpfToc::buildTocEntryList: entered.....\n";
+   }
+   std::ifstream in(m_filename.c_str(), std::ios::in | std::ios::binary);
+
+   if(!in)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ossimRpfToc::buildTocEntryList: invalid input leaving..... " << std::endl;
+      }
+      return;
+   }
+   
+   if(rpfHeader)
+   {
+      if(traceDebug())
+      {
+         rpfHeader->print(ossimNotify(ossimNotifyLevel_DEBUG));
+      }
+      
+      deleteTocEntryList();
+      ossimRpfBoundaryRectSectionSubheader *boundaryRect =
+         rpfHeader->getNewBoundaryRectSectSubheader(in);
+
+      if(boundaryRect)
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG: Got boundary rect\n";
+         }
+         std::streamoff current = in.tellg();
+
+         // they give the offset from the
+         // end of the boundary subheader to the start of the 
+         // entry table.  We have to create an absolute
+         // offset.
+         current += boundaryRect->getTableOffset();
+
+         // take to the start of the table entries
+         in.seekg(current, ios::beg);
+         allocateTocEntryList(boundaryRect->getNumberOfEntries());
+
+         // now we can read the entries
+         if(m_tocEntryList.size() > 0)
+         {
+            for(ossim_uint32 index = 0; index < m_tocEntryList.size(); index++)
+            {
+               m_tocEntryList[index]->parseStream(in, rpfHeader->getByteOrder());
+            }
+         }
+         
+         ossimRpfFrameFileIndexSectionSubheader* frameFileIndexHead = rpfHeader->getNewFrameFileIndexSectionSubheader(in);
+         // get the offset to the table
+         long offsetToIndexSubsection = in.tellg();
+         if(frameFileIndexHead)
+         {
+            ossimRpfFrameFileIndexRecord tempIndexRec;
+            ossimRpfPathnameRecord       tempPathNameRec;
+            
+            ossim_int32 count = frameFileIndexHead->getNumberOfIndexRecords();
+            while(count > 0)
+            {
+               tempIndexRec.parseStream(in, rpfHeader->getByteOrder() );
+
+               // get the path information.  we must seek to a different location
+               // within the file.  So we must remember where we currently are at
+               std::streamoff currentPosition = in.tellg();
+               
+               in.seekg(offsetToIndexSubsection + tempIndexRec.getPathnameRecordOffset(), ios::beg);
+               tempPathNameRec.parseStream(in, rpfHeader->getByteOrder());
+
+               // We have the root directory where all frame files are subfiles of
+//               ossimString rootDirectory(ossimFilename(m_filename.path())+
+               // ossimFilename(ossimFilename::thePathSeparator));
+               ossimFilename rootDirectory;
+               getRootDirectory(rootDirectory);
+
+               // we have the actual path from the root directory to the
+               // frame file.  We must separate the two.  There have been
+               // occurrences where the path in the A.TOC file
+               // is upper case but the path in the directory on the file
+               // system is lower case.  This
+               // will fool the system in thinking the file does not exist
+               // when it actually does.
+               ossimString pathToFrameFile( ossimFilename(tempPathNameRec.getPathname()) +
+                                              tempIndexRec.getFilename());
+
+               ossimRpfFrameEntry entry(rootDirectory,
+                                        pathToFrameFile);
+               m_tocEntryList[tempIndexRec.getBoundaryRecNumber()]->setEntry(entry,
+                                                                              tempIndexRec.getLocationRowNumber(),
+                                                                              tempIndexRec.getLocationColNumber());
+               // now go back to where we were
+               in.seekg(currentPosition, ios::beg);
+               
+               --count;
+            }
+            delete frameFileIndexHead;
+            frameFileIndexHead = 0;
+         }
+      }
+      delete boundaryRect;
+      boundaryRect = NULL;
+   }
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimRpfToc::buildTocEntryList: leaving....." << std::endl;
+   }
+}
+
+void ossimRpfToc::allocateTocEntryList(ossim_uint32 numberOfEntries)
+{
+   if(m_tocEntryList.size() > 0)
+   {
+      deleteTocEntryList();
+   }
+   for(ossim_uint32 index = 0; index < numberOfEntries; index++)
+   {
+      m_tocEntryList.push_back(new ossimRpfTocEntry);
+   }   
+}
+
+void ossimRpfToc::getRootDirectory(ossimFilename& dir) const
+{
+   dir = m_filename.expand().path();
+}
+
+void ossimRpfToc::getFirstEntry(const ossimRpfTocEntry* rpfTocEntry,
+                                ossimRpfFrameEntry& frameEntry) const
+{
+   if (rpfTocEntry)
+   {
+      ossim_int32 framesHorizontal =
+         rpfTocEntry->getNumberOfFramesHorizontal();
+      ossim_int32 framesVertical =
+         rpfTocEntry->getNumberOfFramesVertical();
+   
+      bool foundEntry = false;
+      for (ossim_int32 v = 0; v < framesVertical; ++v)
+      {
+         for (ossim_int32 h = 0; h < framesHorizontal; ++h)
+         {
+            rpfTocEntry->getEntry(v, h, frameEntry);
+            if (frameEntry.exists())
+            {
+               foundEntry = true;
+               break;
+            }
+         }
+         if (foundEntry)
+         {
+            break;
+         }
+      }
+   }
+}
+
+void ossimRpfToc::writeFrameFileIndexSection(ossimRpfFrameFileIndexSubsection* frameFileSubSection,
+                                             std::ifstream& dotRpfStr,
+                                             std::ofstream& dotTocStr)
+{
+   static const char MODULE[] = "ossimRpfToc::writeFrameFileIndexSection";
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   const ossim_uint16 FRAME_FILE_INDEX_RECORD_LENGTH = 33;
+   ossim_uint32 frames = getNumberOfFrames(dotRpfStr);
+   ossim_uint32 pathnameRecordOffset = FRAME_FILE_INDEX_RECORD_LENGTH * frames;
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "frames: " << frames << "\n";
+   }
+   
+   if ( !dotRpfStr.good() )
+   {
+      // see if we can clear it.  Someone might have hit end of file(eof).
+      dotRpfStr.clear();
+   }
+
+   dotRpfStr.seekg(0, ios_base::beg);
+
+   std::string line;
+   ossimFilename file;
+   ossimRpfFrameFileIndexRecord record;
+   ossim_uint32 framesWritten = 0;
+
+   // Eat the first line which is the bounding rect line
+   std::getline(dotRpfStr, line);
+
+   while( dotRpfStr.good() )
+   {
+      std::getline(dotRpfStr, line);
+
+      if ( dotRpfStr.good() )
+      {
+         if ( getFile(line, file) )
+         {
+            if ( frameFileSubSection->getFrameFileIndexRecordFromFile(file.file(), record) )
+            {
+               // Always single entry.
+               record.setBoundaryRecNumber(0);
+               
+               record.setPathnameRecordOffset(pathnameRecordOffset);
+               record.writeStream(dotTocStr);
+               ++framesWritten;
+
+               if ( traceDebug() )
+               {
+                  ossimNotify(ossimNotifyLevel_DEBUG) << "wrote record:\n" << record << "\n";
+               }
+            }
+         }
+      }
+   }
+
+   // Now set the path record.
+   ossimFilename d = file.path();
+   ossimString s = "./";
+   s += d.file();
+   s += "/";
+   ossimRpfPathnameRecord pathRecord;
+   pathRecord.setPathName(s);
+   pathRecord.writeStream(dotTocStr);
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "frames written: " << framesWritten
+         << "\nwrote record:\n" << pathRecord
+         << "\n";
+   }
+
+   dotRpfStr.clear();
+   dotRpfStr.seekg(0, ios_base::beg);
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited..." << std::endl;
+   }
+}
+
+void ossimRpfToc::copyFrames(std::ifstream& dotRpfStr, const ossimFilename& outputDir)
+{
+   static const char MODULE[] = "ossimRpfToc::copyFrames";
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   ossim_uint32 frames = getNumberOfFrames(dotRpfStr);
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "frames to copy: " << frames << "\n";
+   }
+   
+   if ( !dotRpfStr.good() )
+   {
+      // see if we can clear it.  Someone might have hit end of file(eof).
+      dotRpfStr.clear();
+   }
+
+   dotRpfStr.seekg(0, ios_base::beg);
+
+   std::string line;
+   ossimFilename file;
+   ossimFilename destinationFile;
+   ossimFilename subDir;
+   ossim_uint32 framesCopied = 0;
+            
+   // Eat the first line which is the bounding rect line
+   std::getline(dotRpfStr, line);
+
+   // Get the second line which is first file. 
+   std::getline(dotRpfStr, line);
+
+   // Get the file name and make the sub directory if needed.
+   if ( getFile(line, file) )
+   {
+      destinationFile = outputDir;
+      subDir = file.path();
+      subDir = subDir.file();
+      destinationFile = destinationFile.dirCat( subDir );
+      
+      // This is output_dir/subdir.  See if subdir exist:
+      if ( !destinationFile.exists() )
+      {
+         destinationFile.createDirectory();
+      }
+   }
+
+   // Start over:
+   if ( !dotRpfStr.good() )
+   {
+      // see if we can clear it.  Someone might have hit end of file(eof).
+      dotRpfStr.clear();
+   }
+   dotRpfStr.seekg(0, ios_base::beg);
+   
+   // Eat the first line which is the bounding rect line
+   std::getline(dotRpfStr, line);
+   
+   while( dotRpfStr.good() )
+   {
+      std::getline(dotRpfStr, line);
+
+      if ( dotRpfStr.good() )
+      {
+         if ( getFile(line, file) )
+         {
+            destinationFile = outputDir;
+            subDir = file.path();
+            subDir = subDir.file();
+            destinationFile = destinationFile.dirCat( subDir );
+            destinationFile = destinationFile.dirCat( file.file() );
+
+            if ( file.copyFileTo(destinationFile) )
+            {
+               ++framesCopied;
+            }
+            if ( traceDebug() )
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << "Copied frame: " << destinationFile << "\n";
+            }
+         }
+      }
+   }
+
+   ossimNotify(ossimNotifyLevel_NOTICE) << "Frames copied: " << framesCopied << std::endl;
+
+   dotRpfStr.clear();
+   dotRpfStr.seekg(0, ios_base::beg);
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited..." << std::endl;
+   }
+}
+
+ossim_uint32 ossimRpfToc::getNumberOfFrames(std::ifstream& dotRpfStr) const
+{
+   ossim_uint32 result = 0;
+
+   if ( !dotRpfStr.good() )
+   {
+      // see if we can clear it.  Someone might have hit end of file(eof).
+      dotRpfStr.clear();
+   }
+
+   dotRpfStr.seekg(0, ios_base::beg);
+
+   // Eat the first line which is the bounding rect.
+   std::string line;
+   std::getline(dotRpfStr, line);
+   
+   while( dotRpfStr.good() )
+   {
+      std::getline(dotRpfStr, line);
+
+      if ( dotRpfStr.good() )
+      {
+         ++result;
+      }
+   }
+
+   dotRpfStr.clear();
+   dotRpfStr.seekg(0, ios_base::beg);
+
+   return result;
+}
+
+ossimFilename ossimRpfToc::getSourceTocFile(std::ifstream& dotRpfStr) const
+{
+   ossimFilename tocFile;
+   
+   if ( !dotRpfStr.good() )
+   {
+      dotRpfStr.clear();
+   }
+
+   dotRpfStr.seekg(0, ios_base::beg);
+
+   // Eat the first line which is the bounding rect.
+   std::string line;
+   std::getline(dotRpfStr, line);
+
+   // Get the second line which is first file. 
+   std::getline(dotRpfStr, line);
+
+   // Get the file name and make the sub directory if needed.
+   ossimFilename file;
+   if ( getFile(line, file) )
+   {
+      ossimFilename subDir = file.path();
+      tocFile = subDir.dirCat("a.toc");
+      if ( !tocFile.exists() )
+      {
+         tocFile = subDir.dirCat("A.TOC");
+         if ( !tocFile.exists() )
+         {
+            subDir = subDir.path();
+            tocFile = subDir.dirCat("a.toc");
+            if ( !tocFile.exists() )
+            {
+               tocFile = subDir.dirCat("A.TOC");
+               if ( !tocFile.exists() )
+               {
+                  tocFile.clear();
+               }
+            }
+         }
+      }
+   }
+
+   if ( !dotRpfStr.good() )
+   {
+      dotRpfStr.clear();
+   }
+   dotRpfStr.seekg(0, ios_base::beg);
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimRpfToc::getSourceTocFile result: " << tocFile << "\n";
+   }
+
+   return tocFile;
+}
+
+bool ossimRpfToc::getCorespondingEntry(
+   ossimRpfFrameFileIndexSubsection* frameFileSubSection,
+   std::ifstream& dotRpfStr, ossim_uint32& entry) const
+{
+   bool result = false;
+   
+   if ( !dotRpfStr.good() )
+   {
+      // see if we can clear it.  Someone might have hit end of file(eof).
+      dotRpfStr.clear();
+   }
+   
+   dotRpfStr.seekg(0, ios_base::beg);
+
+   std::string line;
+   ossimFilename file;
+   ossimRpfFrameFileIndexRecord record;
+
+   // Eat the first line which is the bounding rect line
+   std::getline(dotRpfStr, line);
+
+   std::getline(dotRpfStr, line);
+
+   if ( getFile(line, file) )
+   {
+      if ( frameFileSubSection->getFrameFileIndexRecordFromFile(file.file(), record) )
+      {
+         entry = record.getBoundaryRecNumber();
+         result = true;
+      }
+   }
+
+   if ( !dotRpfStr.good() )
+   {
+      dotRpfStr.clear();
+   }
+
+   dotRpfStr.seekg(0, ios_base::beg);
+   return result;
+}
+
+bool ossimRpfToc::getFile(const std::string& line, ossimFilename& file) const
+{
+   //---
+   // line form:
+   // /some_path/N03E030/006EZC1B.I21|30.4654240835311,3.59074642049858|30.5401678385356,3.65984532949882
+   //           <file>                    <lr_lon>           <lr_lat>        <ur_lon>          <ur_lat>
+   //---
+   
+   bool result = false;
+   if ( line.size() )
+   {
+      ossimString os(line);
+      std::vector<ossimString> lineArray;
+      os.split(lineArray, "|");
+      if ( lineArray.size() )
+      {
+         file = lineArray[0];
+         result = true;
+      }
+   }
+   return result;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimRpfTocEntry.cpp b/ossim/src/ossim/support_data/ossimRpfTocEntry.cpp
new file mode 100644
index 0000000..58d38a4
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimRpfTocEntry.cpp
@@ -0,0 +1,280 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+// 
+// Author: Garrett Potts
+//
+//*************************************************************************
+// $Id: ossimRpfTocEntry.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <istream>
+#include <ostream>
+#include <iterator>
+
+#include <ossim/support_data/ossimRpfTocEntry.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimErrorCodes.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/projection/ossimAzimEquDistProjection.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/support_data/ossimRpfFrameEntry.h>
+
+std::ostream& operator <<(std::ostream& out,
+                          const ossimRpfTocEntry& data)
+{
+   data.print(out);
+   return out;
+}
+
+ossimRpfTocEntry::ossimRpfTocEntry()
+{
+   
+}
+
+ossimErrorCode ossimRpfTocEntry::parseStream(
+   std::istream &in, ossimByteOrder byteOrder)
+{
+   ossimErrorCode result = ossimErrorCodes::OSSIM_OK;
+   
+   result = theBoundaryInformation.parseStream(in, byteOrder);
+   if(result == ossimErrorCodes::OSSIM_OK)
+   {
+      allocateFrameEntryArray();
+   }
+
+   // Fetch the number of samples as data member since it may need to be adjusted due to 
+   // wrap (OLK 10/10):
+   theNumSamples =  theBoundaryInformation.getNumberOfFramesHorizontal() * 1536;
+   ossimDpt ddpp;
+   getDecimalDegreesPerPixel(ddpp);
+   ossim_float64 width_in_deg = theNumSamples*ddpp.x;
+   if (width_in_deg >= 360.0)
+      theNumSamples -= (width_in_deg - 360.0)/ddpp.x;
+
+   return result;
+}
+
+std::ostream& ossimRpfTocEntry::print(std::ostream& out,
+                                      const std::string& prefix) const
+{
+   theBoundaryInformation.print(out, prefix);
+
+   std::vector< std::vector<ossimRpfFrameEntry> >::const_iterator frameEntry =
+      theFrameEntryArray.begin();
+
+   while( frameEntry != theFrameEntryArray.end() )
+   {
+      std::vector<ossimRpfFrameEntry>::const_iterator i =
+         (*frameEntry).begin();
+      while ( i != (*frameEntry).end() ) 
+      {
+         (*i).print(out, prefix);
+         ++i;
+      }
+      ++frameEntry;
+   }
+   return out;
+}
+
+ossim_uint32 ossimRpfTocEntry::getNumberOfFramesHorizontal()const
+{
+   return theBoundaryInformation.getNumberOfFramesHorizontal();
+}
+
+ossim_uint32 ossimRpfTocEntry::getNumberOfFramesVertical()const
+{
+   return theBoundaryInformation.getNumberOfFramesVertical();
+}
+
+ossim_uint32 ossimRpfTocEntry::getNumberOfLines() const
+{
+   return  theBoundaryInformation.getNumberOfFramesVertical() * 1536;
+}
+
+ossim_uint32 ossimRpfTocEntry::getNumberOfSamples() const
+{
+   return theNumSamples;
+}
+
+ossim_uint32 ossimRpfTocEntry::getNumberOfBands() const
+{
+   ossim_uint32 result = 0;
+   ossimString productType = getProductType().trim().upcase();
+   if( productType == "CIB" )
+   {
+      result = 1;
+   }
+   else if ( productType == "CADRG" )
+   {
+      result = 3;
+   }
+   return result;
+}
+
+void ossimRpfTocEntry::getBoundingRect(ossimIrect& rect) const
+{
+   rect = ossimIrect(0, 0, getNumberOfSamples()-1, getNumberOfLines()-1); 
+}
+
+const ossimRpfBoundaryRectRecord& ossimRpfTocEntry::getBoundaryInformation() const
+{
+   return theBoundaryInformation;
+}
+
+void ossimRpfTocEntry::setEntry(const ossimRpfFrameEntry& entry,
+                                long row,
+                                long col)
+{
+   if(row < (long)theFrameEntryArray.size() && row >= 0)
+   {
+      if(col < (long)theFrameEntryArray[row].size() && col >= 0)
+      {
+         theFrameEntryArray[row][col] = entry;
+      }
+   }
+}
+
+bool ossimRpfTocEntry::getEntry(long row,
+                                long col,
+                                ossimRpfFrameEntry& result)const
+{
+   if(row < (long)theFrameEntryArray.size() && row >= 0)
+   {
+      if(col < (long)theFrameEntryArray[row].size() && col >= 0)
+      {
+         result = theFrameEntryArray[row][col];
+      }
+      else
+      {
+         return false;
+      }
+   }
+   else
+   {
+      return false;
+   }
+   
+   return true;
+}
+
+ossimString ossimRpfTocEntry::getProductType() const
+{
+   return theBoundaryInformation.getProductType();
+}
+
+/*!
+ * If there is an entry and all the files don't exist we will return
+ * true.
+ */
+bool ossimRpfTocEntry::isEmpty()const
+{
+   long rows = (long)theFrameEntryArray.size();
+   long cols = 0;
+   if(rows > 0)
+   {
+      cols = (long)theFrameEntryArray[0].size();
+      for(long rowIndex = 0; rowIndex < rows; ++ rowIndex)
+      {
+         for(long colIndex = 0; colIndex < cols; ++colIndex)
+         {
+            if(theFrameEntryArray[rowIndex][colIndex].exists())
+            {
+               return false;
+            }
+         }
+      }
+   }
+
+   return true;
+}
+
+ossimRefPtr<ossimImageGeometry> ossimRpfTocEntry::getImageGeometry() const
+{
+
+   ossimGpt ul(theBoundaryInformation.getCoverage().getUlLat(), 
+               theBoundaryInformation.getCoverage().getUlLon());
+
+   // Decimal degrees per pixel:
+   ossimDpt ddpp;
+   getDecimalDegreesPerPixel(ddpp);
+   
+   // Tie point - Shifted to pixel-is-point:
+   ossimGpt tie( (ul.latd() - (ddpp.y/2.0)), (ul.lond() + (ddpp.x/2.0)), 0.0 );
+   
+   // Origin - Use the center latitude for horizontal scale, and the left edge as origin longitude
+   // (OLK 10/10)
+   ossimGpt origin ((ul.lat + theBoundaryInformation.getCoverage().getLlLat())/2.0, tie.lon);
+
+#if 0 /* Please leave for debug. (drb) */
+   std::cout << "boundaryInfo:\n" << boundaryInfo << std::endl;
+#endif
+
+   int z = theBoundaryInformation.getZone();
+   
+   if (z == 74) z--; // Fix J to a zone.
+   if (z > 64) z -= 64; // Below the equator
+   else z -= 48; // Above the equator
+
+   ossimRefPtr<ossimMapProjection> mapProj = 0;
+   if ( z != 9 )
+   {
+      mapProj = new ossimEquDistCylProjection;
+   }
+   else
+   {
+      mapProj = new ossimAzimEquDistProjection;
+   }
+
+   // Set the origin:
+   mapProj->setOrigin(origin);
+   
+   // Set the scale:
+   mapProj->setDecimalDegreesPerPixel(ddpp);
+
+   // Set the tie:
+   mapProj->setUlTiePoints(tie);
+
+   // Give projection to the geometry object.
+   ossimRefPtr<ossimImageGeometry> geom =  new ossimImageGeometry;
+   geom->setProjection( mapProj.get() );
+
+   return geom;
+}
+
+void ossimRpfTocEntry::getDecimalDegreesPerPixel(ossimDpt& scale) const
+{
+#if 1
+   scale.x = theBoundaryInformation.getCoverage().getHorizontalInterval();
+   scale.y = theBoundaryInformation.getCoverage().getVerticalInterval();
+#else
+   ossim_float64 ulLat = theBoundaryInformation.getCoverage().getUlLat();
+   ossim_float64 ulLon = theBoundaryInformation.getCoverage().getUlLon();
+   ossim_float64 urLon = theBoundaryInformation.getCoverage().getUrLon();
+   ossim_float64 llLat = theBoundaryInformation.getCoverage().getLrLat();
+   ossim_float64 lines = getNumberOfLines();
+   ossim_float64 samps = getNumberOfSamples();
+   scale.x = (urLon - ulLon) / samps;
+   scale.y = (ulLat - llLat) / lines;
+#endif
+}
+
+void ossimRpfTocEntry::getMetersPerPixel(ossimDpt& scale) const
+{
+   scale.x = theBoundaryInformation.getCoverage().getVerticalResolution();
+   scale.y = theBoundaryInformation.getCoverage().getHorizontalResolution();
+}
+
+void ossimRpfTocEntry::allocateFrameEntryArray()
+{
+   theFrameEntryArray.resize(theBoundaryInformation.getNumberOfFramesVertical());
+   ossim_uint32 horizontalSize = theBoundaryInformation.getNumberOfFramesHorizontal();
+
+   for(ossim_uint32 index = 0; index < theFrameEntryArray.size(); index++)
+   {
+      theFrameEntryArray[index].resize(horizontalSize);
+   }
+}
+
diff --git a/src/ossim/support_data/ossimSpaceImagingGeom.cpp b/ossim/src/ossim/support_data/ossimSpaceImagingGeom.cpp
similarity index 100%
rename from src/ossim/support_data/ossimSpaceImagingGeom.cpp
rename to ossim/src/ossim/support_data/ossimSpaceImagingGeom.cpp
diff --git a/src/ossim/support_data/ossimSpotDimapSupportData.cpp b/ossim/src/ossim/support_data/ossimSpotDimapSupportData.cpp
similarity index 100%
rename from src/ossim/support_data/ossimSpotDimapSupportData.cpp
rename to ossim/src/ossim/support_data/ossimSpotDimapSupportData.cpp
diff --git a/src/ossim/support_data/ossimSrcRecord.cpp b/ossim/src/ossim/support_data/ossimSrcRecord.cpp
similarity index 100%
rename from src/ossim/support_data/ossimSrcRecord.cpp
rename to ossim/src/ossim/support_data/ossimSrcRecord.cpp
diff --git a/src/ossim/support_data/ossimSrtmFilename.cpp b/ossim/src/ossim/support_data/ossimSrtmFilename.cpp
similarity index 100%
rename from src/ossim/support_data/ossimSrtmFilename.cpp
rename to ossim/src/ossim/support_data/ossimSrtmFilename.cpp
diff --git a/src/ossim/support_data/ossimSrtmSupportData.cpp b/ossim/src/ossim/support_data/ossimSrtmSupportData.cpp
similarity index 100%
rename from src/ossim/support_data/ossimSrtmSupportData.cpp
rename to ossim/src/ossim/support_data/ossimSrtmSupportData.cpp
diff --git a/ossim/src/ossim/support_data/ossimSupportFilesList.cpp b/ossim/src/ossim/support_data/ossimSupportFilesList.cpp
new file mode 100644
index 0000000..0224a1f
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimSupportFilesList.cpp
@@ -0,0 +1,43 @@
+//**************************************************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Oscar Kramer
+// 
+// Description: Singleton class for logging all support data files opened during a session.
+//
+//**************************************************************************************************
+// $Id$
+
+#include <ossim/support_data/ossimSupportFilesList.h>
+#include <ossim/base/ossimKeywordlist.h>
+
+ossimSupportFilesList* ossimSupportFilesList::m_instance = 0;
+
+//*************************************************************************************************
+// Implements singleton pattern
+//*************************************************************************************************
+ossimSupportFilesList* ossimSupportFilesList::instance()
+{
+   if (!m_instance)
+      m_instance = new ossimSupportFilesList;
+
+   return m_instance;
+}
+
+//*************************************************************************************************
+// Saves the list to a KWL
+//*************************************************************************************************
+void ossimSupportFilesList::save(ossimKeywordlist& kwl, const char* prefix) const
+{
+   ossimString baseName ("support_file");
+   for (unsigned int i=0; i< (unsigned int) m_list.size(); i++)
+   {
+      ossimString key = baseName + ossimString::toString(i);
+      kwl.add(prefix, key.chars(), m_list[i]);
+   }
+}
+
diff --git a/ossim/src/ossim/support_data/ossimTiffInfo.cpp b/ossim/src/ossim/support_data/ossimTiffInfo.cpp
new file mode 100644
index 0000000..ce2e6c0
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimTiffInfo.cpp
@@ -0,0 +1,3913 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: TIFF Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimTiffInfo.cpp 2673 2011-06-06 14:57:24Z david.burken $
+
+#include <ossim/support_data/ossimTiffInfo.h>
+
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimGeoTiffCoordTransformsLut.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimTieGptSet.h>
+#include <ossim/base/ossimTrace.h>
+
+#include <ossim/projection/ossimBilinearProjection.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/projection/ossimEpsgProjectionFactory.h>
+
+#include <fstream>
+#include <iostream>
+#include <iomanip>
+#include <sstream>
+
+// Static trace for debugging
+static ossimTrace traceDebug("ossimTiffInfo:debug");
+static ossimTrace traceDump("ossimTiffInfo:dump"); // This will dump offsets.
+
+static const std::string PHOTO_INTERP[] =
+{
+   "MINISWHITE",
+   "MINISBLACK",
+   "RGB",
+   "PALETTE",
+   "MASK",
+   "SEPARATED",
+   "YCBCR",
+   "CIELAB"
+};
+
+static const std::string ANGULAR_UNITS_KW = "angular_units";
+static const std::string CENTER_LATITUDE__KW = "center_latitude";
+static const std::string CENTER_LONGITUDE_KW = "center_longitude";
+static const std::string COORD_TRANS_CODE_KW = "coord_trans_code";
+static const std::string FALSE_ORIGIN_LONGITUDE_KW = "false_origin_longitude";
+static const std::string FALSE_ORIGIN_LATITUDE_KW = "false_origin_latitude";
+static const std::string FALSE_ORIGIN_EASTING_KW = "false_origin_easting";
+static const std::string FALSE_ORIGIN_NORTHING_KW = "false_origin_northing";
+static const std::string GEODETIC_DATUM_KW = "geodetic_datum";
+static const std::string IMAGE_LENGTH_KW = "image_length";
+static const std::string IMAGE_WIDTH_KW = "image_width";
+static const std::string LINEAR_UNITS_KW = "linear_units";
+static const std::string MODEL_PIXEL_SCALE_KW = "model_pixel_scale";
+static const std::string MODEL_TIE_POINT_KW = "model_tie_point";
+static const std::string MODEL_TRANSFORM_KW = "model_transform";
+static const std::string MODEL_TYPE_KW = "model_type";
+static const std::string ORIGIN_LATITUDE_KW = "origin_latitude";
+static const std::string ORIGIN_LONGITUDE_KW = "origin_longitude";
+static const std::string RASTER_TYPE_KW = "raster_type";
+static const std::string VERTICAL_UNITS_KW = "vertical_units";
+
+
+ossimTiffInfo::ossimTiffInfo()
+   : ossimInfoBase(),
+     theFile(),
+     theEndian(0)
+{
+}
+
+ossimTiffInfo::~ossimTiffInfo()
+{
+   if (theEndian)
+   {
+      delete theEndian;
+      theEndian = 0;
+   }
+}
+
+bool ossimTiffInfo::open(const ossimFilename& file)
+{
+   bool result = false;
+
+   //---
+   // Open the tif file.
+   //---
+   std::ifstream str(file.c_str(), std::ios_base::binary|std::ios_base::in);
+   if (str.good()) 
+   {
+      //---
+      // Get the byte order.  First two byte should be "II" or "MM".
+      //---
+      char byteOrder[2];
+      str.read(byteOrder, 2); // Read the byte order.
+      ossimByteOrder sysByteOrder = ossim::byteOrder();
+      ossimByteOrder tifByteOrder = OSSIM_LITTLE_ENDIAN;
+      
+      if (byteOrder[0] == 'M')
+      {
+         tifByteOrder = OSSIM_BIG_ENDIAN;
+      }
+
+      if (sysByteOrder != tifByteOrder)
+      {
+         if (!theEndian)
+         {
+            theEndian = new ossimEndian();
+         }
+      }
+      else if (theEndian)
+      {
+         delete theEndian;
+         theEndian = 0;
+      }
+      
+      //--
+      // Get the version. Note theEndian must be set/unset before calling
+      // "readShort".
+      //---
+      ossim_uint16 version;
+      readShort(version, str);
+
+      if ( ( (byteOrder[0] == 'M') || (byteOrder[0] == 'I') ) &&
+           ( (version == 42) || (version == 43) ) )
+      {
+         result = true;  // is a tif...
+      }
+   }
+
+   if (result)
+   {
+      theFile = file;
+   }
+   else
+   {
+      theFile.clear();
+      if (theEndian)
+      {
+         delete theEndian;
+         theEndian = 0;
+      }
+   }
+
+   return result;
+}
+
+std::ostream& ossimTiffInfo::print(std::ostream& out) const
+{
+   static const char MODULE[] = "ossimTiffInfo::print";
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " DEBUG Entered...\n";
+   }
+
+   //---
+   // Open the tif file.
+   //---
+   std::ifstream str(theFile.c_str(), std::ios_base::binary|std::ios_base::in);
+   if (!str) 
+   {
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << " Cannot open file:  " << theFile << std::endl;
+      }
+      return out;
+   }
+   
+   //---
+   // Get the byte order.  First two byte should be "II" or "MM".
+   //---
+   char byteOrder[2];
+   str.read(byteOrder, 2); // Read the byte order.
+   ossimByteOrder sysByteOrder = ossim::byteOrder();
+   ossimByteOrder tifByteOrder = OSSIM_LITTLE_ENDIAN;
+   
+   if (byteOrder[0] == 'M')
+   {
+      tifByteOrder = OSSIM_BIG_ENDIAN;
+   }
+   
+   if (sysByteOrder != tifByteOrder)
+   {
+      if (!theEndian)
+      {
+         theEndian = new ossimEndian();
+      }
+   }
+   else if (theEndian) // No swapping required.
+   {
+      delete theEndian;
+      theEndian = 0;
+   }
+
+   //--
+   // Get the version. Note theEndian must be set/unset before calling
+   // "readShort".
+   //---
+   ossim_uint16 version;
+   readShort(version, str);
+
+   // Set the tag value length.
+   ossim_uint64 tagValueLength;
+   if (version == 42)
+   {
+      tagValueLength = 4;
+   }
+   else
+   {
+      tagValueLength = 8;
+   }
+
+   out << "tiff.version: " << int(version)
+       << ((version==42)?"(classic)\n":"(big)\n")
+       << "tiff.byte_order: ";
+   
+   if (byteOrder[0] == 'M')
+   {
+      out << "big_endian\n";
+   }
+   else // OSSIM_LITTLE_ENDIAN
+   {
+      out  << "little_endian\n";
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)<< "system_byte_order: ";
+      if (ossim::byteOrder() == OSSIM_BIG_ENDIAN)
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)<< "big_endian\n";
+      }
+      else // OSSIM_LITTLE_ENDIAN
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)<< "little_endian\n";
+      }
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "tiff.tag_value_length: " << tagValueLength << "\n";
+   }
+
+   //---
+   // Variables used within the loop.
+   //---
+   std::streamoff seekOffset;      // used throughout
+   std::streampos streamPosition;  // used throughout
+
+   if (version == 43)
+   {
+      // We must skip the first four bytes.
+      ossim_uint32 offsetSize;
+      readLong(offsetSize, str);
+   }
+
+   // Get the offset.
+   if (getOffset(seekOffset, str, version) == false)
+   {
+     ossimNotify(ossimNotifyLevel_WARN) 
+        << MODULE << " FATAL ERROR - "
+        << "No offset to an image file directory found.\n"
+        << "Returning with error."
+        << std::endl;
+     str.close();
+     return out;
+   }
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " DEBUG: "
+         << "Offset to first ifd:  " << seekOffset
+         << "\n";
+   }
+
+   // Capture the original flags then set float output to full precision.
+   std::ios_base::fmtflags f = out.flags();
+   out << std::setprecision(15);
+   
+   // Image File Directory (IFD) loop.
+   ossim_int32 ifdIndex = 0;
+   while(seekOffset)
+   {
+      out << "tiff.directory_offset: " << seekOffset << "\n";
+
+      // Seek to the image file directory.
+      str.seekg(seekOffset, std::ios_base::beg);  
+
+      // directory prefix for prints.
+      std::string prefix = "tiff.";
+      getDirPrefix(ifdIndex, prefix);
+
+      //---
+      // Things we need to save for printGeoKeys:
+      //---
+      ossim_uint16*  geoKeyBlock     = 0;
+      ossim_uint64   geoKeyLength    = 0;
+      ossim_float64* geoDoubleBlock  = 0;
+      ossim_uint64   geoDoubleLength = 0;
+      ossim_int8*    geoAsciiBlock   = 0;
+      ossim_uint64   geoAsciiLength  = 0;
+      
+      //---
+      // Get the number of directories within the IFD.
+      //---
+      ossim_uint64 nTags; // Number of tags in an IFD.
+      if (getValue(nTags, str, TWO_OR_EIGHT, version) == false)
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << " FATAL error reading number of direcories."
+               << std::endl;
+         }
+         str.close();
+         return out;
+      }
+
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << " DEBUG:\n"
+            << "ifd:  " << seekOffset
+            << "\ntags in directory:  " << nTags<< "\n";
+      }
+
+      // Tag loop:
+      for (ossim_uint64 tagIdx = 0; tagIdx < nTags; ++tagIdx)
+      {
+         // Variables used within the loop.
+         ossim_uint16   tag              = 0; // Tag number
+         ossim_uint16   type             = 0; // Type(short, long...)
+         ossim_uint64   count            = 0;
+         ossim_uint64   arraySizeInBytes = 0; // 
+         ossim_uint8*   valueArray       = 0; // To hold value.
+         
+         //---
+         // Get the tag.
+         //---
+         readShort(tag, str);
+         if (!str)
+         {
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << MODULE << " FATAL error reading tag number."
+                  << std::endl;
+            }
+            str.close();
+            return out;
+         }
+
+         //---
+         // Get the type (byte, ascii, short...)
+         //---
+         readShort(type, str);
+         if (!str)
+         {
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << MODULE << " FATAL error reading type number."
+                  << std::endl;
+            }
+            str.close();
+            return out;
+         }
+
+         //---
+         // Get the count.  This is not in bytes.  It is based on the
+         // type.  So if the type is a short and the count is one then
+         // read "sizeof(short"(2) bytes.
+         //---
+         getValue(count, str, FOUR_OR_EIGHT, version);
+         if (!str)
+         {
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << MODULE << " FATAL error reading count."
+                  << std::endl;
+            }
+            str.close();
+            return out;
+         }
+
+         // Get the array size in bytes.
+         arraySizeInBytes = getArraySizeInBytes(count, type);
+         if (arraySizeInBytes == 0)
+         {
+            // Could be an unhandle type.  Gobble the value.
+            eatValue(str, version);
+         }
+         else
+         {
+            // Allocate array.
+            if (valueArray) delete [] valueArray;
+            valueArray = new ossim_uint8[arraySizeInBytes];
+
+            if (arraySizeInBytes <= tagValueLength)
+            {
+               // Read in the value(s).
+               str.read((char*)valueArray, arraySizeInBytes);
+
+               // Skip any byes left in the field.
+               if (arraySizeInBytes < tagValueLength)
+               {
+                  // Skip these bytes.
+                  str.ignore(tagValueLength-arraySizeInBytes);
+               }
+            }
+            else // Data to big for field.  Stored elsewhere...
+            {
+               // Get the offset to the data.
+               getOffset(seekOffset, str, version);
+
+               // Capture the seek position to come back to.
+               streamPosition = str.tellg();
+
+               // Seek to the data.
+               str.seekg(seekOffset, std::ios_base::beg);
+
+               // Read in the value(s).
+               str.read((char*)valueArray, arraySizeInBytes);
+
+               // Seek back.
+               str.seekg(streamPosition);
+            }
+
+            // Swap the bytes if needed.
+            swapBytes(valueArray, type, count);
+         }
+
+         if( traceDebug() )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << MODULE << " DEBUG:"
+               << "\ntag[" << tagIdx << "]:" << tag
+               << "\ntype:                " << type
+               << "\ncount:        " << count
+               << "\narray size in bytes: " << arraySizeInBytes
+               << "\n";
+	 }
+
+         if (tag == OGEO_KEY_DIRECTORY_TAG)
+         {
+            // tag 34735 save for printGeoKeys
+            if ( geoKeyBlock )
+            {
+               delete [] geoKeyBlock;
+            }
+            geoKeyBlock = reinterpret_cast<ossim_uint16*>(valueArray);
+            geoKeyLength = count;
+         }
+         else if (tag == OGEO_DOUBLE_PARAMS_TAG)
+         {
+            // tag 34736 save for printGeoKeys
+            if ( geoDoubleBlock )
+            {
+               delete [] geoDoubleBlock;
+            }
+            geoDoubleBlock  = reinterpret_cast<ossim_float64*>(valueArray);
+            geoDoubleLength = count;
+         }
+         else if (tag == OGEO_ASCII_PARAMS_TAG)
+         {
+            // tag 34737 save for printGeoKeys
+            if ( geoAsciiBlock )
+            {
+               delete [] geoAsciiBlock;
+            }
+            geoAsciiBlock   = reinterpret_cast<ossim_int8*>(valueArray);
+            geoAsciiLength  = count;
+         }
+         else
+         {
+            print(out,
+                  prefix,
+                  tagIdx,
+                  tag,
+                  type,
+                  count,
+                  arraySizeInBytes,
+                  valueArray);
+            
+            // Free memory if allocated...
+            if (valueArray)
+            {
+               delete [] valueArray;
+               valueArray = 0;
+            }
+         }
+         
+      } // End of tag loop.
+
+      //---
+      // If Geotiff Keys read them.
+      // This had to done last since the keys could
+      // have references to tags GEO_DOUBLE_PARAMS_TAG and
+      // GEO_ASCII_PARAMS_TAG.
+      //---
+      if (geoKeyBlock)
+      {
+         printGeoKeys(out, prefix, geoKeyLength, geoKeyBlock,
+                      geoDoubleLength,geoDoubleBlock,
+                      geoAsciiLength,geoAsciiBlock);
+
+         delete [] geoKeyBlock;
+         geoKeyBlock = 0;
+      }
+
+      if (geoDoubleBlock)
+      {
+         delete [] geoDoubleBlock;
+         geoDoubleBlock = 0;
+      }
+      if (geoAsciiBlock)
+      {
+         delete [] geoAsciiBlock;
+         geoAsciiBlock = 0;
+      }
+      geoKeyLength = 0;
+      geoDoubleLength = 0;
+      geoAsciiLength = 0;
+
+      //---
+      // Get the next IFD offset.  Continue this loop until the offset is
+      // zero.
+      //---
+      if (getOffset(seekOffset, str, version) == false)
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << " No offset to an image file directory found.\n"
+               << "Returning with error."
+               << std::endl;
+         }
+         str.close();
+         return out;
+      }
+      
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG ossimTiffInfo::readTags: "
+            << "Next Image File Directory(IFD) offset = "
+            << seekOffset << "\n";
+      }
+
+      ++ifdIndex; // next ifd
+
+      //---
+      // Note this does NOT check to see if sub_file_type is '1' simply
+      // skips all directories past the first if theOverviewFlag is false.
+      //---
+      if ( ifdIndex && !theOverviewFlag) // Don't process overviews...
+      {
+         break;
+      }
+      
+   } // End of loop through the IFD's.
+   
+   out << std::endl;
+    
+   str.close();
+
+   // Reset flags.
+   out.setf(f);
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " DEBUG Exited..." << std::endl;
+   }
+   
+   return out;
+}
+
+std::ostream& ossimTiffInfo::print(std::istream& inStr,
+                                   std::ostream& outStr) const
+{
+   static const char MODULE[] = "ossimTiffInfo::print(std::istream&, std::ostream&)";
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG Entered...\n";
+   }
+
+   std::streampos startPosition = inStr.tellg();
+   
+   //---
+   // Get the byte order.  First two byte should be "II" or "MM".
+   //---
+   char byteOrder[2];
+   inStr.read(byteOrder, 2); // Read the byte order.
+   ossimByteOrder sysByteOrder = ossim::byteOrder();
+   ossimByteOrder tifByteOrder = OSSIM_LITTLE_ENDIAN;
+   
+   if (byteOrder[0] == 'M')
+   {
+      tifByteOrder = OSSIM_BIG_ENDIAN;
+   }
+   
+   if (sysByteOrder != tifByteOrder)
+   {
+      if (!theEndian)
+      {
+         theEndian = new ossimEndian();
+      }
+   }
+   else if (theEndian) // No swapping required.
+   {
+      delete theEndian;
+      theEndian = 0;
+   }
+
+   //--
+   // Get the version. Note theEndian must be set/unset before calling
+   // "readShort".
+   //---
+   ossim_uint16 version;
+   readShort(version, inStr);
+
+   // Set the tag value length.
+   ossim_uint64 tagValueLength;
+   if (version == 42)
+   {
+      tagValueLength = 4;
+   }
+   else
+   {
+      tagValueLength = 8;
+   }
+
+   outStr << "tiff.version: " << int(version)
+          << ((version==42)?"(classic)\n":"(big)\n")
+          << "tiff.byte_order: ";
+   
+   if (byteOrder[0] == 'M')
+   {
+      outStr << "big_endian\n";
+   }
+   else // OSSIM_LITTLE_ENDIAN
+   {
+      outStr  << "little_endian\n";
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)<< "system_byte_order: ";
+      if (ossim::byteOrder() == OSSIM_BIG_ENDIAN)
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)<< "big_endian\n";
+      }
+      else // OSSIM_LITTLE_ENDIAN
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)<< "little_endian\n";
+      }
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "tiff.tag_value_length: " << tagValueLength << "\n";
+   }
+
+   //---
+   // Variables used within the loop.
+   //---
+   std::streamoff seekOffset;      // used throughout
+   std::streampos streamPosition;  // used throughout
+
+   if (version == 43)
+   {
+      // We must skip the first four bytes.
+      ossim_uint32 offsetSize;
+      readLong(offsetSize, inStr);
+   }
+
+   // Get the offset.
+   if (getOffset(seekOffset, inStr, version) == false)
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN) 
+            << MODULE << " FATAL ERROR - "
+            << "No offset to an image file directory found.\n"
+            << "Returning with error."
+            << std::endl;
+      }
+      return outStr;
+   }
+   
+   if (traceDebug())
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << " DEBUG: "
+            << "Offset to first ifd:  " << seekOffset
+            << "\n";
+      }
+   }
+
+   // Capture the original flags then set float output to full precision.
+   std::ios_base::fmtflags f = outStr.flags();
+   outStr << std::setprecision(15);
+   
+   // Image File Directory (IFD) loop.
+   ossim_int32 ifdIndex = 0;
+   while(seekOffset)
+   {
+      outStr << "tiff.directory_offset: " << seekOffset << "\n";
+
+      // Seek to the image file directory.
+      inStr.seekg(startPosition+seekOffset, std::ios_base::beg);  
+
+      // directory prefix for prints.
+      std::string prefix = "tiff.";
+      getDirPrefix(ifdIndex, prefix);
+
+      //---
+      // Things we need to save for printGeoKeys:
+      //---
+      ossim_uint16*  geoKeyBlock     = 0;
+      ossim_uint64   geoKeyLength    = 0;
+      ossim_float64* geoDoubleBlock  = 0;
+      ossim_uint64   geoDoubleLength = 0;
+      ossim_int8*    geoAsciiBlock   = 0;
+      ossim_uint64   geoAsciiLength  = 0;
+      
+      //---
+      // Get the number of directories within the IFD.
+      //---
+      ossim_uint64 nTags; // Number of tags in an IFD.
+      if (getValue(nTags, inStr, TWO_OR_EIGHT, version) == false)
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << " FATAL error reading number of direcories."
+               << std::endl;
+         }
+         return outStr;
+      }
+
+      if (traceDebug())
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << MODULE << " DEBUG:\n"
+               << "ifd:  " << seekOffset
+               << "\ntags in directory:  " << nTags<< "\n";
+         }
+      }
+
+      // Tag loop:
+      for (ossim_uint64 tagIdx = 0; tagIdx < nTags; ++tagIdx)
+      {
+         // Variables used within the loop.
+         ossim_uint16   tag              = 0; // Tag number
+         ossim_uint16   type             = 0; // Type(short, long...)
+         ossim_uint64   count            = 0;
+         ossim_uint64   arraySizeInBytes = 0; // 
+         ossim_uint8*   valueArray       = 0; // To hold value.
+         
+         //---
+         // Get the tag.
+         //---
+         readShort(tag, inStr);
+         if (!inStr)
+         {
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << MODULE << " FATAL error reading tag number."
+                  << std::endl;
+            }
+            return outStr;
+         }
+
+         //---
+         // Get the type (byte, ascii, short...)
+         //---
+         readShort(type, inStr);
+         if (!inStr)
+         {
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << MODULE << " FATAL error reading type number."
+                  << std::endl;
+            }
+            return outStr;
+         }
+
+         //---
+         // Get the count.  This is not in bytes.  It is based on the
+         // type.  So if the type is a short and the count is one then
+         // read "sizeof(short"(2) bytes.
+         //---
+         getValue(count, inStr, FOUR_OR_EIGHT, version);
+         if (!inStr)
+         {
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << MODULE << " FATAL error reading count."
+                  << std::endl;
+            }
+            return outStr;
+         }
+
+         // Get the array size in bytes.
+         arraySizeInBytes = getArraySizeInBytes(count, type);
+         if (arraySizeInBytes == 0)
+         {
+            // Could be an unhandle type.  Gobble the value.
+            eatValue(inStr, version);
+         }
+         else
+         {
+            // Allocate array.
+            if (valueArray) delete [] valueArray;
+            valueArray = new ossim_uint8[arraySizeInBytes];
+
+            if (arraySizeInBytes <= tagValueLength)
+            {
+               // Read in the value(s).
+               inStr.read((char*)valueArray, arraySizeInBytes);
+
+               // Skip any byes left in the field.
+               if (arraySizeInBytes < tagValueLength)
+               {
+                  // Skip these bytes.
+                  inStr.ignore(tagValueLength-arraySizeInBytes);
+               }
+            }
+            else // Data to big for field.  Stored elsewhere...
+            {
+               // Get the offset to the data.
+               getOffset(seekOffset, inStr, version);
+
+               // Capture the seek position to come back to.
+               streamPosition = inStr.tellg();
+
+               // Seek to the data.
+               inStr.seekg(startPosition+seekOffset, std::ios_base::beg);
+
+               // Read in the value(s).
+               inStr.read((char*)valueArray, arraySizeInBytes);
+
+               // Seek back.
+               inStr.seekg(streamPosition);
+            }
+
+            // Swap the bytes if needed.
+            swapBytes(valueArray, type, count);
+         }
+
+         if( traceDebug() )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << MODULE << " DEBUG:"
+               << "\ntag[" << tagIdx << "]:" << tag
+               << "\ntype:                " << type
+               << "\ncount:        " << count
+               << "\narray size in bytes: " << arraySizeInBytes
+               << "\n";
+         }
+
+         if (tag == OGEO_KEY_DIRECTORY_TAG)
+         {
+            // tag 34735 save for printGeoKeys
+            geoKeyBlock = reinterpret_cast<ossim_uint16*>(valueArray);
+            geoKeyLength = count;
+         }
+         else if (tag == OGEO_DOUBLE_PARAMS_TAG)
+         {
+            // tag 34736 save for printGeoKeys
+            geoDoubleBlock  = reinterpret_cast<ossim_float64*>(valueArray);
+            geoDoubleLength = count;
+         }
+         else if (tag == OGEO_ASCII_PARAMS_TAG)
+         {
+            // tag 34737 save for printGeoKeys
+            geoAsciiBlock   = reinterpret_cast<ossim_int8*>(valueArray);
+            geoAsciiLength  = count;
+         }
+         else
+         {
+            print(outStr,
+                  prefix,
+                  tagIdx,
+                  tag,
+                  type,
+                  count,
+                  arraySizeInBytes,
+                  valueArray);
+            
+            // Free memory if allocated...
+            if (valueArray)
+            {
+               delete [] valueArray;
+               valueArray = 0;
+            }
+         }
+         
+      } // End of tag loop.
+
+      //---
+      // If Geotiff Keys read them.
+      // This had to done last since the keys could
+      // have references to tags GEO_DOUBLE_PARAMS_TAG and
+      // GEO_ASCII_PARAMS_TAG.
+      //---
+      if (geoKeyBlock)
+      {
+         printGeoKeys(outStr, prefix, geoKeyLength, geoKeyBlock,
+                      geoDoubleLength,geoDoubleBlock,
+                      geoAsciiLength,geoAsciiBlock);
+
+         delete [] geoKeyBlock;
+         geoKeyBlock = 0;
+      }
+
+      if (geoDoubleBlock)
+      {
+         delete [] geoDoubleBlock;
+         geoDoubleBlock = 0;
+      }
+      if (geoAsciiBlock)
+      {
+         delete [] geoAsciiBlock;
+         geoAsciiBlock = 0;
+      }
+      geoKeyLength = 0;
+      geoDoubleLength = 0;
+      geoAsciiLength = 0;
+
+      //---
+      // Get the next IFD offset.  Continue this loop until the offset is
+      // zero.
+      //---
+      if (getOffset(seekOffset, inStr, version) == false)
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << MODULE << " No offset to an image file directory found.\n"
+               << "Returning with error."
+               << std::endl;
+         }
+         return outStr;
+      }
+      
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "DEBUG ossimTiffInfo::readTags: "
+            << "Next Image File Directory(IFD) offset = "
+            << seekOffset << "\n";
+      }
+
+      ++ifdIndex; // next ifd
+
+      //---
+      // Note this does NOT check to see if sub_file_type is '1' simply
+      // skips all directories past the first if theOverviewFlag is false.
+      //---
+      if ( ifdIndex && !theOverviewFlag) // Don't process overviews...
+      {
+         break;
+      }
+      
+   } // End of loop through the IFD's.
+   
+   outStr << std::endl;
+    
+   // Reset flags.
+   outStr.setf(f);
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " DEBUG Exited..." << std::endl;
+   }
+   
+   return outStr;
+}
+
+bool ossimTiffInfo::getImageGeometry(ossimKeywordlist& geomKwl,
+                                     ossim_uint32 entryIndex) const
+{
+   static const char MODULE[] = "ossimTiffInfo::getImageGeometry #1";
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << " entered...\n";
+   }
+   
+   bool result = false;
+
+   // Open the file.
+   std::ifstream str;
+   str.open(theFile.c_str(), ios::in | ios::binary);
+   
+   if ( str.is_open() )
+   {
+      result = getImageGeometry(str, geomKwl, entryIndex);
+
+      str.close();
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "geomKwl:\n"
+         << geomKwl
+         << MODULE << " exit status = " << (result?"true":"false") << "\n";
+   }
+
+   return result;
+}
+
+bool ossimTiffInfo::getImageGeometry(std::istream& inStr,
+                                     ossimKeywordlist& geomKwl,
+                                     ossim_uint32 entryIndex) const
+{
+   static const char M[] = "ossimTiffInfo::getImageGeometry #2";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
+   }
+   
+   bool result = false;
+
+   // Do a print to a memory stream.
+   std::ostringstream out;
+   print(inStr, out);
+
+   // Open an input stream to pass to the keyword list.
+   std::istringstream in( out.str() );
+
+   // Since the print is in key:value format we can pass to a keyword list.
+   ossimKeywordlist gtiffKwl;
+   if ( gtiffKwl.parseStream(in) )      
+   {
+      result = getImageGeometry(gtiffKwl, geomKwl, entryIndex);
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "geomKwl:\n"
+         << geomKwl
+         << M << " exit status = " << (result?"true":"false") << "\n";
+   }
+
+   return result;
+}
+
+void ossimTiffInfo::getImageGeometry(ossim_uint64   geoKeyLength,
+                                     ossim_uint16*  geoKeyBlock,
+                                     ossim_uint64   geoDoubleLength,
+                                     ossim_float64* geoDoubleBlock,
+                                     ossim_uint64   geoAsciiLength,
+                                     ossim_int8*    geoAsciiBlock,
+                                     ossimKeywordlist& geomKwl) const
+{
+   static const char M[] = "ossimTiffInfo::getImageGeometry #3";
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
+   }
+
+   // Dump the geotiff keys to memory.
+   ostringstream out;
+   printGeoKeys(out, std::string("tiff.image0."),
+                geoKeyLength, geoKeyBlock,
+                geoDoubleLength,geoDoubleBlock,
+                geoAsciiLength,geoAsciiBlock);
+
+   // Open an input stream to pass to the keyword list.
+   std::istringstream in( out.str() );
+
+   // Since the print is in key:value format we can pass to a keyword list.
+   ossimKeywordlist gtiffKwl;
+   if ( gtiffKwl.parseStream(in) )
+   {
+      getImageGeometry(gtiffKwl, geomKwl, 0);
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
+   }
+}
+
+// Private method:
+bool ossimTiffInfo::getImageGeometry(const ossimKeywordlist& gtiffKwl,
+                                     ossimKeywordlist& geomKwl,
+                                     ossim_uint32 entryIndex) const
+{
+   static const char M[] = "ossimTiffInfo::getImageGeometry #4";
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
+   }
+   
+   //---
+   // Start with a return status of true and set to false if something bad
+   // happens.
+   //---
+   bool result = true;
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "tiffinfo dump to kwl:\n" << gtiffKwl << "\n";
+   }
+   
+   ossimString gtiffPrefix = "tiff.image";
+   gtiffPrefix += ossimString::toString(entryIndex);
+   gtiffPrefix += ".";
+   ossimString geomPrefix = "image";
+   geomPrefix += ossimString::toString(entryIndex);
+   geomPrefix += ".";
+   
+   // Get the pixel type.
+   ossimString pixelType;
+   if ( getPixelType(gtiffPrefix, gtiffKwl, pixelType) == false )
+   {
+      pixelType = "pixel_is_point"; // Not an error we'll make assumption?
+   }
+   geomKwl.add(geomPrefix.c_str(),
+               ossimKeywordNames::PIXEL_TYPE_KW,
+               pixelType.c_str());
+   
+   // Get the lines.
+   ossim_uint32 height = getLines(gtiffPrefix, gtiffKwl);
+   if (height)
+   {
+      geomKwl.add(geomPrefix.c_str(),
+                  ossimKeywordNames::NUMBER_LINES_KW,
+                  height);
+   }
+   else
+   {
+      result = false;
+   }
+   
+   // Get the samples.
+   ossim_uint32 width = getSamples(gtiffPrefix, gtiffKwl);
+   if (width)
+   {
+      geomKwl.add(geomPrefix.c_str(),
+                  ossimKeywordNames::NUMBER_SAMPLES_KW,
+                  width);
+   }
+   else
+   {
+      result = false;
+   }
+   
+   // Add the pixel type.
+   geomKwl.add(geomPrefix.c_str(),
+               ossimKeywordNames::PIXEL_TYPE_KW,
+               pixelType.c_str());
+   
+   // Set the projection type.
+   bool isGeographic = false;
+   ossimString pcsCode;
+   ossimString ossimProjectionName = "";
+   bool hasPcsCode = getPcsCode(gtiffPrefix, gtiffKwl, pcsCode);
+
+   //---
+   // The ossimEpsgProjectionFactory will not pick up the origin latitude if code is
+   // 4326 (geographic) so we use the projection name; else, the origin_latitude will
+   // always be 0.  This is so the gsd comes out correct for scale.
+   //---
+   if ( hasPcsCode && ( pcsCode != "4326" ) )
+   {
+      // Add the pcs code.
+      geomKwl.add(geomPrefix.c_str(),
+                  ossimKeywordNames::PCS_CODE_KW,
+                  pcsCode.c_str());
+   }
+   else
+   {
+      if ( getOssimProjectionName(gtiffPrefix, gtiffKwl, ossimProjectionName) == false )
+      {
+         ossimProjectionName = "ossimEquDistCylProjection";
+      }
+      geomKwl.add(geomPrefix.c_str(), ossimKeywordNames::TYPE_KW, ossimProjectionName);
+
+      if ( ossimProjectionName == "ossimEquDistCylProjection" )
+      {
+         isGeographic = true;
+      }
+   }
+   
+   // Get the units. 
+   ossimString units = "";
+   getUnits(gtiffPrefix, gtiffKwl, units);
+   if (units.empty() || (units.contains("unknown")))
+   {
+      // HACK: Encountered JP2 with geotiff info that did not specify units, so using projection
+      // type to discern units if none explicitly specified. (OLK 05/11)
+      if (ossimProjectionName == "ossimEquDistCylProjection")
+         units = "degrees";
+   }
+   
+   // Get the pixel scale.
+   ossimDpt scale;
+   bool hasScale = getPixelScale(gtiffPrefix, gtiffKwl, scale);
+   
+   // Get the tie point.
+   std::vector<ossim_float64> ties;
+   getTiePoint(gtiffPrefix, gtiffKwl, ties);
+
+   //---
+   // Tie count:
+   // NOTE: It takes six doubles to make one tie point ie:
+   // x,y,z,longitude,latitude,height or x,y,z,easting,northing,height
+   //--- 
+   ossim_uint32 tieCount = (ossim_uint32)ties.size()/6;
+   
+   // Get the model transform.
+   std::vector<ossim_float64> xfrm;
+   getModelTransform(gtiffPrefix, gtiffKwl, xfrm);
+   
+   bool useXfrm = false;
+   if ( xfrm.size() == 16 )
+   {
+      // Need at least 24 (which is four ties) to use bilinear.
+      if ( !hasScale && ties.size() < 24 )
+      {
+         useXfrm = true;
+      }
+   }
+   if (useXfrm)
+   {
+      std::ostringstream out;
+      out << std::setprecision(15); // To avoid truncating.
+      ossim_uint32 idx = 0;
+      for(idx =0; idx < 16; ++idx)
+      {
+         out << xfrm[idx] << " ";
+      }
+      geomKwl.add(geomPrefix.c_str(),
+                  ossimKeywordNames::IMAGE_MODEL_TRANSFORM_MATRIX_KW,
+                  out.str().c_str(), true);
+      geomKwl.add(geomPrefix.c_str(),
+                  ossimKeywordNames::IMAGE_MODEL_TRANSFORM_UNIT_KW,
+                  units.c_str(), true);
+   }
+   else // Use tie points.
+   {
+      if ( hasScale && (tieCount == 1) )
+      {
+         // Shift the tile to 0,0 pixel of image if not already there.
+         ossimDpt tie;
+         tie.x = ties[3] - ties[0] * scale.x;
+         tie.y = ties[4] + ties[1] * scale.y;
+         geomKwl.add(geomPrefix.c_str(),
+                     ossimKeywordNames::TIE_POINT_XY_KW,
+                     tie.toString().c_str());
+         geomKwl.add(geomPrefix.c_str(),
+                     ossimKeywordNames::TIE_POINT_UNITS_KW,
+                     units.c_str());
+         
+         // Add the scale.
+         geomKwl.add(geomPrefix.c_str(),
+                     ossimKeywordNames::PIXEL_SCALE_XY_KW,
+                     scale.toString().c_str());
+         geomKwl.add(geomPrefix.c_str(),
+                     ossimKeywordNames::PIXEL_SCALE_UNITS_KW,
+                     units.c_str());
+      }
+      else if (tieCount > 1) // four or better tie points.
+      {
+         ossimTieGptSet tieSet;
+         getTieSets(ties, width, height, tieSet);
+         
+         if(tieCount >= 4)
+         {
+            ossimRefPtr<ossimBilinearProjection> proj =
+               new ossimBilinearProjection;
+            proj->optimizeFit(tieSet);
+            proj->saveState(geomKwl, geomPrefix.c_str());
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << "Creating a bilinear projection\n";
+            }
+         }
+         else  // Need at least four ties.
+         {
+            result = false;
+         }
+      }
+      else
+      {
+         result = false;
+      }
+      
+   } // matches: else Use tie points block.
+   
+   ossimString tmpStr;
+   if ( getStdParallelOne(gtiffPrefix, gtiffKwl, tmpStr) )
+   {
+      geomKwl.add(geomPrefix.c_str(),
+                  ossimKeywordNames::STD_PARALLEL_1_KW,
+                  tmpStr);
+   }
+   
+   if ( getStdParallelTwo(gtiffPrefix, gtiffKwl, tmpStr) )
+   {
+      geomKwl.add(geomPrefix.c_str(),
+                  ossimKeywordNames::STD_PARALLEL_2_KW,
+                  tmpStr);
+   }
+   
+   ossimDpt eastingNorthing;
+   if ( getFalseEastingNorthing(gtiffPrefix, gtiffKwl,
+                                eastingNorthing) )
+   {
+      geomKwl.add(geomPrefix.c_str(),
+                  ossimKeywordNames::FALSE_EASTING_NORTHING_KW,
+                  eastingNorthing.toString());
+      geomKwl.add(geomPrefix.c_str(),
+                  ossimKeywordNames::
+                  FALSE_EASTING_NORTHING_UNITS_KW, units);
+   }
+   
+   ossim_float64 tmpDbl = ossim::nan();
+   
+   if ( getOriginLat(gtiffPrefix, gtiffKwl, tmpDbl) == false )
+   {
+      if ( isGeographic && hasScale && scale.x )
+      {
+         //---
+         // ossimEquDistCylProjection uses the origin_latitude for meters per pixel (gsd)
+         // computation.  So is not set in tiff tags, compute to achieve the proper
+         // horizontal scaling.
+         //---
+         tmpDbl = ossim::acosd(scale.y/scale.x);
+      }
+   }
+   if ( !ossim::isnan(tmpDbl) )
+   {
+      geomKwl.add(geomPrefix.c_str(),
+                  ossimKeywordNames::ORIGIN_LATITUDE_KW,
+                  tmpDbl);
+   }
+   
+   if ( getCentralMeridian(gtiffPrefix, gtiffKwl, tmpDbl) )
+   {
+      geomKwl.add(geomPrefix.c_str(),
+                  ossimKeywordNames::CENTRAL_MERIDIAN_KW,
+                  tmpDbl);
+   }
+   
+   if ( getScaleFactor(gtiffPrefix, gtiffKwl, tmpDbl) )
+   {
+      geomKwl.add(geomPrefix.c_str(),
+                  ossimKeywordNames::SCALE_FACTOR_KW,
+                  tmpDbl);
+   }
+   
+   if ( getDatumCode(gtiffPrefix, gtiffKwl, tmpStr) )
+   {
+      geomKwl.add(geomPrefix.c_str(),
+                  ossimKeywordNames::DATUM_KW,
+                  tmpStr.c_str());
+   }
+
+   //---
+   // Linear and vertical units not read by projection factories but added so external user could
+   // query.
+   //---
+   if ( getLinearUnits(gtiffPrefix, gtiffKwl, tmpStr) )
+   {
+      geomKwl.add(geomPrefix.c_str(),
+                  LINEAR_UNITS_KW.c_str(),
+                  tmpStr.c_str());
+   }
+
+   if ( getVerticalUnits(gtiffPrefix, gtiffKwl, tmpStr) )
+   {
+      geomKwl.add(geomPrefix.c_str(),
+                  VERTICAL_UNITS_KW.c_str(),
+                  tmpStr.c_str());
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "geomKwl:\n"
+         << geomKwl << "\n"
+         << M << " exit status = " << (result?"true":"false") << "\n";
+   }
+   
+   return result;
+}
+
+void ossimTiffInfo::readShort(ossim_uint16& s, std::istream& str) const
+{
+   str.read((char*)&s, sizeof(s));
+   if (theEndian)
+   {
+      theEndian->swap(s);
+   }
+}
+
+void ossimTiffInfo::readLong(ossim_uint32& l, std::istream& str) const
+{
+   str.read((char*)&l, sizeof(l));
+   if (theEndian)
+   {
+      theEndian->swap(l);
+   }
+}
+
+void ossimTiffInfo::readLongLong(ossim_uint64& l, std::istream& str) const
+{
+   str.read((char*)&l, sizeof(l));
+   if (theEndian)
+   {
+      theEndian->swap(l);
+   }
+}
+
+
+
+bool ossimTiffInfo::getOffset(
+   std::streamoff& offset, std::istream& str, ossim_uint16 version) const
+{
+   bool status = true;
+   if  (version == 42)
+   {
+      ossim_uint32   littleOffset;
+      readLong(littleOffset, str);
+      offset = littleOffset;
+   }
+   else
+   {
+      ossim_uint64 bigOffset;
+      readLongLong(bigOffset, str);
+      offset = bigOffset;
+   }
+   if (!str)
+   {
+      status = false;
+   }
+   return status;
+}
+
+bool ossimTiffInfo::getValue(ossim_uint64& value,
+                             std::istream& str,
+                             WordType type,
+                             ossim_uint16 version) const
+{
+   bool status = true;
+   if  (version == 42)
+   {
+      if (type == TWO_OR_EIGHT)
+      {
+         ossim_uint16 i;
+         readShort(i, str);
+         value = i;
+      }
+      else
+      {
+         ossim_uint32 i;
+         readLong(i, str);
+         value = i;
+      }
+   }
+   else
+   {
+      ossim_uint64 i;
+      readLongLong(i, str);
+      value = i;
+   }
+   if (!str)
+   {
+      status = false;
+   }
+   return status;
+}
+
+ossim_uint64 ossimTiffInfo::getArraySizeInBytes(ossim_uint64 length,
+                                                ossim_uint16 type) const
+{
+   return length * getTypeByteSize(type);
+}
+
+ossim_uint16 ossimTiffInfo::getTypeByteSize(ossim_uint16 type) const
+{
+   ossim_uint16 result = 0;
+   
+   switch (type)
+   {
+      case OTIFF_BYTE:
+      case OTIFF_ASCII:
+      case OTIFF_SBYTE:
+      case OTIFF_UNDEFINED:
+      {
+         result = 1;
+         break;
+      }
+         
+      case OTIFF_SHORT:
+      case OTIFF_SSHORT:
+      {
+         result = 2;
+         break;
+      }
+         
+      case OTIFF_LONG:
+      case OTIFF_SLONG:
+      case OTIFF_IFD:
+      case OTIFF_FLOAT:
+      {
+         result = 4;
+         break;
+      }
+         
+      case OTIFF_RATIONAL:
+      case OTIFF_SRATIONAL:
+      case OTIFF_DOUBLE:
+      case 16:             // TIFF_LONG8 defined in big tiff only.
+      case 17:             // TIFF_SLONG8 defined in big tiff only.
+      case 18:             // TIFF_IFD8 defined in big tiff only.
+      {
+         result = 8;
+         break;
+      }
+
+      default:
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "ossimTiffInfo::getTypeByteSize DEBUG:"
+               << "\nUnhandled type: " << int(type) << "\n";
+         }
+         break;
+      }
+   }
+   return result;
+}
+
+void ossimTiffInfo::eatValue(std::istream& str, ossim_uint16 version) const
+{
+   if (version == 42)
+   {
+      ossim_uint32 dummy;
+      readLong(dummy, str);
+   }
+   else
+   {
+      ossim_uint64 dummy;
+      readLongLong(dummy, str);
+   }
+}
+
+void ossimTiffInfo::swapBytes(ossim_uint8* v,
+                              ossim_uint16 type,
+                              ossim_uint64 count) const
+{
+   if (theEndian)
+   {
+      ossim_uint32 byteSize = getTypeByteSize(type);
+      switch(byteSize)
+      {
+         case 2:
+            theEndian->swapTwoBytes(v, count);
+            break;
+         case 4:
+            theEndian->swapFourBytes(v, count);
+            break;
+         case 8:
+            theEndian->swapEightBytes(v, count);
+            break;
+         default:
+            break;
+      }
+   }
+}
+
+template <class T> void ossimTiffInfo::getArrayValue(
+   T& v,
+   ossim_uint8* array,
+   ossim_uint64 position) const
+{
+   T* p = (T*)array;
+   v = p[position];
+}
+
+std::ostream& ossimTiffInfo::print(std::ostream& out,
+                                   const std::string& prefix,
+                                   ossim_uint64 tagIdx,
+                                   ossim_uint16 tag,
+                                   ossim_uint16 type,
+                                   ossim_uint64 count,
+                                   ossim_uint64 arraySizeInBytes,
+                                   ossim_uint8* valueArray) const
+{
+   switch(tag)
+   {
+      case OTIFFTAG_SUBFILETYPE: // tag 254
+      {
+         out << prefix << "sub_file_type: ";
+         printValue(out, type, valueArray);
+         break;
+      }
+      case OTIFFTAG_IMAGEWIDTH: // tag 256
+      {
+         out << prefix << IMAGE_WIDTH_KW << ": ";
+         printValue(out, type, valueArray);
+         break;
+      }
+      
+      case OTIFFTAG_IMAGELENGTH: // tag 257
+      {
+         out << prefix << IMAGE_LENGTH_KW << ": ";
+         printValue(out, type, valueArray);
+         break;
+      }
+
+      case OTIFFTAG_BITSPERSAMPLE: // tag 258
+      {
+         out << prefix << "bits_per_sample: ";
+         if (count == 1)
+         {
+            printValue(out, type, valueArray);
+         }
+         else if (valueArray)
+         {
+            printArray(out, type, count, valueArray);
+         }
+         break;
+      }
+         
+      case OTIFFTAG_COMPRESSION: // tag 259
+      {
+         if ( (count == 1) && (type == OTIFF_SHORT) )
+         {
+            out << prefix << "compression: ";
+            
+            ossim_uint16 s;
+            getArrayValue(s, valueArray, 0);
+            if (s == 1)
+            {
+               out << "false\n";
+            }
+            else
+            {
+               out << "true\n";
+            }
+         }
+         break;
+      }
+
+      case OTIFFTAG_PHOTOMETRIC: // tag 262
+      {
+         out << prefix << "photo_interpretation: ";
+
+         if ( (count == 1) && (type == OTIFF_SHORT) )
+         {
+            ossim_uint16 s;
+            getArrayValue(s, valueArray, 0);
+            if (s <= OPHOTO_CIELAB)
+            {
+               out << PHOTO_INTERP[s] << "\n";
+            }
+            else
+            {
+               out <<"range error!\n";
+            }
+         }
+         break;
+      }
+
+      case OTIFFTAG_FILLORDER: // tag 266
+      {
+         if ( (count == 1) && (type == OTIFF_SHORT) )
+         {
+            out << prefix << "fill_order: ";
+            ossim_uint16 s;
+            getArrayValue(s, valueArray, 0);
+            out << s << "\n";
+
+         }
+         break;
+      }
+
+      case OTIFFTAG_IMAGEDESCRIPTION: // tag 270
+      {
+         out << prefix << "image_description: ";
+         printArray(out, type, count, valueArray);
+         break;
+      }
+
+      case OTIFFTAG_STRIPOFFSETS: // tag 273
+      {
+         if (traceDump())
+         {
+            out << prefix << "bytes_per_strip: ";
+            
+            if (count == 1)
+            {
+               printValue(out, type, valueArray);
+            }
+            else
+            {
+               printArray(out, type, count, valueArray);
+            }
+         }
+         break;
+      }
+      case OTIFFTAG_ORIENTATION: // tag 274
+      {
+         ossim_uint16 code;
+         getArrayValue(code, valueArray, 0);
+         printOrientation(out, prefix, code);
+         break;
+      }
+      
+      case OTIFFTAG_SAMPLESPERPIXEL: // tag 277
+      {
+         out << prefix << "samples_per_pixel: ";
+         printValue(out, type, valueArray);
+         break;
+      }
+
+      case OTIFFTAG_ROWSPERSTRIP: // tag 278
+      {
+         out << prefix << "rows_per_strip: ";
+         printValue(out, type, valueArray);
+         break;
+      }
+
+      case OTIFFTAG_STRIPBYTECOUNTS: // tag 279
+      {
+         if (traceDump())
+         {
+            out << prefix << "bytes_per_strip: ";
+            
+            if (count == 1)
+            {
+               printValue(out, type, valueArray);
+            }
+            else
+            {
+               printArray(out, type, count, valueArray);
+            }
+         }
+         break;
+      }
+      
+      case OTIFFTAG_MINSAMPLEVALUE: // tag 280
+      {
+         out << prefix << "min_sample_value: ";
+         printValue(out, type, valueArray);
+         break;
+      }
+      case OTIFFTAG_MAXSAMPLEVALUE: // tag 281
+      {
+         out << prefix << "max_sample_value: ";
+         printValue(out, type, valueArray);
+         break;
+      }
+      
+      case OTIFFTAG_XRESOLUTION: // tag 282
+      {
+         out << prefix << "xresolution: ";
+         printValue(out, type, valueArray);
+         break;
+      }
+      case OTIFFTAG_YRESOLUTION: // tag 283
+      {
+         out << prefix << "yresolution: ";
+         printValue(out, type, valueArray);
+         break;
+      }
+      
+      case OTIFFTAG_PLANARCONFIG: // tag 284
+      {
+         if ( (count == 1) && (type == OTIFF_SHORT) )
+         {
+            out << prefix << "planar_configuration: ";
+            ossim_uint16 v;
+            getArrayValue(v, valueArray, 0);
+            if (v == 1)
+            {
+               out << "single image plane\n";
+            }
+            else if (v == 2)
+            {
+               out << "separate image planes\n";
+            }
+            else
+            {
+               out << "unknown planar value!\n";
+            }
+         }
+         break;
+      }
+
+      case OTIFFTAG_RESOLUTIONUNIT: // tag 296
+      {
+         out << prefix << "resolution_units: ";
+         ossim_uint16 v;
+         getArrayValue(v, valueArray, 0);
+         if (v == 2) 
+         {
+            out << "inch\n";
+         }
+         else if (v == 3)
+         {
+            out << "cm\n";
+         }
+         else
+         {
+            out << "none\n";
+         }
+         break;
+      }
+
+      case OTIFFTAG_PAGENUMBER: // tag 297
+      {
+         if ( (count == 2) && (type == OTIFF_SHORT) )
+         {
+            out << prefix << "page_number: ";
+            ossim_uint16 s;
+            getArrayValue(s, valueArray, 0);
+            out << s << "\n";
+            out << prefix << "total_pages: ";
+            getArrayValue(s, valueArray, 1);
+            out << s << "\n";
+         }
+         break;
+      }
+      
+      case OTIFFTAG_SOFTWARE: // tag 305
+      {
+         out << prefix << "software: ";
+         printArray(out, type, count, valueArray);
+         break;
+      }
+
+      case OTIFFTAG_DATETIME: // tag 306
+      {
+         out << prefix << "date_time: ";
+         printArray(out, type, count, valueArray);
+         break;
+      }
+
+      case OTIFFTAG_ARTIST: // tag 315
+      {
+         out << prefix << "artist: ";
+         printArray(out, type, count, valueArray);
+         break;
+      }
+      
+      case OTIFFTAG_TILEWIDTH: // tag 322
+      {
+         out << prefix << "tile_width: ";
+         printValue(out, type, valueArray);
+         break;
+      }
+      case OTIFFTAG_TILELENGTH: // tag 323
+      {
+         out << prefix << "tile_length: ";
+         printValue(out, type, valueArray);
+         break;
+      }
+      case OTIFFTAG_TILEOFFSETS: // tag 324
+      {
+         if (traceDump())
+         {
+            out << prefix << "tile_offsets: ";
+            if (count == 1)
+            {
+               printValue(out, type, valueArray);
+            }
+            else
+            {
+               printArray(out, type, count, valueArray);
+            }
+         }
+         break;
+      }
+      case OTIFFTAG_TILEBYTECOUNTS: // tag 325
+      {
+         if (traceDump())
+         {
+            out << prefix << "tile_byte_counts: ";
+            if (count == 1)
+            {
+               printValue(out, type, valueArray);
+            }
+            else
+            {
+               printArray(out, type, count, valueArray);
+            }
+         }
+         break;
+      }
+      case OTIFFTAG_SUBIFD: // tag 330
+      {
+         if ( (count == 1) && (type == OTIFF_IFD8) )
+         {
+            out << prefix << "subimage_descriptor: ";
+            ossim_uint64 v;
+            getArrayValue(v, valueArray, 0);
+            out << v << "\n";
+         }
+         else
+         {
+            out << prefix << "tag 330 unhandled condition.\n";
+         }
+         break;
+      }
+      case OTIFFTAG_EXTRASAMPLES: // tag 338
+      {
+         out << prefix << "extra_samples: ";
+         ossim_uint16 v;
+         getArrayValue(v, valueArray, 0);
+         switch (v)
+         {
+            case 1:
+            {
+               out << "associated_alpha_data\n";
+               break;
+            }
+            case 2:
+            {
+               out << "unassociated_alpha_data\n";
+               break;
+            }
+            default:
+            {
+               out << "unspecified_data\n";
+               break;
+            }
+         }
+         break;
+      }
+      case OTIFFTAG_SAMPLEFORMAT: // tag 339
+      {
+         out << prefix << "sample_format: ";
+         
+         if (count == 1)
+         {
+            printValue(out, type, valueArray);
+         }
+         else if (valueArray)
+         {
+            printArray(out, type, count, valueArray);
+         }
+         for (ossim_uint64 i = 0; i < count; ++i)
+         {
+            std::ostringstream s;
+            s << "sample_format_string";
+            if (count > 1)
+            {
+               s << i;
+            }
+            out << prefix << s.str() << ": ";
+            
+            ossim_uint16 v;
+            getArrayValue(v, valueArray, i);
+            switch (v)
+            {
+               case OSAMPLEFORMAT_UINT:
+                  out << "unsigned integer data\n";
+                  break;
+               case OSAMPLEFORMAT_INT:
+                  out << "signed integer data\n";
+                  break;
+               case OSAMPLEFORMAT_IEEEFP:
+                  out << "IEEE floating point data\n";
+                  break;
+               case OSAMPLEFORMAT_COMPLEXINT:
+                  out << "complex signed int\n";
+                  break;
+               case OSAMPLEFORMAT_COMPLEXIEEEFP:
+                  out << "complex ieee floating\n";
+                  break;
+               case OSAMPLEFORMAT_VOID:
+               default:
+                  out << "untyped data\n";
+                  break;
+            }
+         }
+         break;
+      }
+      case OTIFFTAG_SMINSAMPLEVALUE: // tag 340
+      {
+         out << prefix << "smin_sample_value: ";
+         printValue(out, type, valueArray);
+         break;
+      }
+      case OTIFFTAG_SMAXSAMPLEVALUE: // tag 341
+      {
+         out << prefix << "smax_sample_value: ";
+         printValue(out, type, valueArray);
+         break;
+      }
+      case OTIFFTAG_COPYRIGHT: // tag 33432
+      {
+         out << prefix << "copyright: ";
+         printArray(out, type, count, valueArray);
+         break;
+      }
+      case OMODEL_PIXEL_SCALE_TAG: // tag 33550
+      {
+         out << prefix << MODEL_PIXEL_SCALE_KW << ": ";
+         printArray(out, type, count, valueArray);
+         break;
+      }
+      case OMODEL_TIE_POINT_TAG: // tag 33992
+      {
+         out << prefix << MODEL_TIE_POINT_KW << ": ";
+         printArray(out, type, count, valueArray);
+         break;
+      }
+      case OMODEL_TRANSFORM_TAG: // tag 34264
+      {
+         out << prefix << MODEL_TRANSFORM_KW << ": ";
+         printArray(out, type, count, valueArray);
+         break;
+      }
+      case OTIFFTAG_PHOTOSHOP:  // tag 34377
+      {
+         out << prefix << "photoshop_image_resource_blocks: found\n";
+         break;
+      }
+      case OGEO_DOUBLE_PARAMS_TAG: // tag 34736
+      {
+         out << prefix << "double_params: ";
+         printArray(out, type, count, valueArray);
+         break;
+      }
+      case OGEO_ASCII_PARAMS_TAG: // tag 34737
+      {
+         out << prefix << "ascii_params: ";
+         printArray(out, type, count, valueArray);
+         break;
+      }
+      case OGDAL_METADATA_TAG: // tag  42112
+      {
+         printGdalMetadata(out, prefix, count, valueArray);
+         break;
+      }
+      case OGDAL_NODATA: // tag 42113
+      {
+         out << prefix << "gdal_nodata: ";
+         printArray(out, type, count, valueArray);
+         break;
+      }
+      default:
+      {
+         out << prefix << "unhandled_tag: " << tag << "\n";
+         if (traceDebug())
+         {
+             ossimNotify(ossimNotifyLevel_DEBUG)
+                << "generic:"
+                << "\ntag[" << tagIdx << "]:         " << tag
+                << "\ntype:                " << type
+                << "\ncount:        " << count
+                << "\narray size in bytes: " << arraySizeInBytes
+                << "\n";
+            printArray(out, type, count, valueArray);
+         }
+         break;
+      }
+
+   } // end of switch on tag...
+
+   return out;
+
+} // end of print
+
+std::ostream& ossimTiffInfo::printValue(std::ostream& out,
+                                        ossim_uint16 type,
+                                        ossim_uint8* valueArray) const
+{
+   switch (type)
+   {
+      case OTIFF_BYTE:
+      {
+         ossim_uint8 v;
+         getArrayValue(v, valueArray, 0);
+         out << (ossim_uint16)v << "\n";
+         break;
+      }
+      case OTIFF_SHORT:
+      {
+         ossim_uint16 v;
+         getArrayValue(v, valueArray, 0);
+         out << v << "\n";
+         break;
+      }
+      case OTIFF_SSHORT:
+      {
+         ossim_sint16 v;
+         getArrayValue(v, valueArray, 0);
+         out << v << "\n";
+         break;
+      }
+      case OTIFF_LONG:
+      {
+         ossim_uint32 v;
+         getArrayValue(v, valueArray, 0);
+         out << v << "\n";
+         break;
+      }
+      case OTIFF_RATIONAL: // two longs first=numerator, second=denominator
+      {
+         ossim_uint32 num;
+         ossim_uint32 den;
+         
+         getArrayValue(num, valueArray, 0);
+         getArrayValue(den, valueArray, 1);
+
+         if ( den )
+         {
+            out << (num/den) << "\n";
+         }
+         else
+         {
+            out << num << " / " << den << "\n";
+         }
+         
+         break;
+         
+      }
+      case OTIFF_SLONG:
+      {
+         ossim_sint32 v;
+         getArrayValue(v, valueArray, 0);
+         out << v << "\n";
+         break;
+      }
+      case OTIFF_FLOAT:
+      {
+         ossim_float32 v;
+         getArrayValue(v, valueArray, 0);
+         out << v << "\n";
+         break;
+      }
+      case OTIFF_DOUBLE:
+      {
+         ossim_float64 v;
+         getArrayValue(v, valueArray, 0);
+         out << v << "\n";
+         break;
+      }
+      default:
+      {
+         out << "print_value_unhandled type: " << type << "\n";
+         break;
+      }
+   }
+   return out;
+}
+
+std::ostream& ossimTiffInfo::printArray(std::ostream& out,
+                                        ossim_uint16 type,
+                                        ossim_uint64 arraySizeInBytes,
+                                        ossim_uint8* valueArray) const
+{
+   if (valueArray)
+   {
+      switch (type)
+      {
+         case OTIFF_BYTE:
+         {
+            for (ossim_uint64 i = 0; i < arraySizeInBytes; ++i)
+            {
+               out << ((ossim_uint8)valueArray[i]);
+            }
+            out << "\n";
+            break;
+         }
+         case OTIFF_ASCII:
+         {
+            //---
+            // Add tripple quotes front and back for ossimKeywordlist to handle multi-line
+            // comments.
+            //---
+            out << "\"\"\"";
+            for (ossim_uint64 i = 0; i < arraySizeInBytes; ++i)
+            {
+               //---
+               // Test to avoid putting nulls in the ascii string out.  Added to fix
+               // ossimKeywordlist::parseStream returning false on trailing null Where array was
+               // tagged as 11 bytes and ascii string was OrthoVista(10 bytes) and 11 byte was
+               // ascii NUL '\0'.
+               //---
+               if ( valueArray[i] != 0 )
+               {
+                  out << ((char)valueArray[i]);
+               }
+            }
+            out << "\"\"\"\n";
+            break;
+         }
+         case OTIFF_SHORT:
+         {
+            ossim_uint16* p = (ossim_uint16*)valueArray;
+            for (ossim_uint64 i = 0; i < arraySizeInBytes; ++i)
+            {
+               out << p[i] << " ";
+            }
+            out << "\n";
+            break;
+         }
+         case OTIFF_LONG:
+         {
+            ossim_uint32* p = (ossim_uint32*)valueArray;
+            for (ossim_uint64 i = 0; i < arraySizeInBytes; ++i)
+            {
+               out << p[i] << " ";
+            }
+            out << "\n";
+            break;
+         }
+         case OTIFF_DOUBLE:
+         {
+            ossim_float64* p = (ossim_float64*)valueArray;
+            for (ossim_uint64 i = 0; i < arraySizeInBytes; ++i)
+            {
+               out << p[i] << " ";
+            }
+            out << "\n";
+            break;
+         }
+         default:
+         {
+            out << "print_array_unhandled type: " << type << "\n";
+            break;
+         }
+      }
+   }
+   else
+   {
+      out << "null array passed to ossimTiffInfo::printArray method." << "\n";
+   }
+   return out;
+}
+
+std::ostream& ossimTiffInfo::printGdalMetadata(std::ostream& out,
+                                               const std::string& prefix,
+                                               ossim_uint64 count,
+                                               ossim_uint8* valueArray) const
+{
+   ossimString xmlString(valueArray, valueArray+count);
+   ossimRefPtr<ossimXmlNode> xmlNode = new ossimXmlNode();
+   std::istringstream in(xmlString);
+   if(xmlNode->read(in))
+   {
+      const ossimXmlNode::ChildListType& children = xmlNode->getChildNodes();
+      
+      ossim_uint32 idx = 0;
+      for(idx = 0; idx < children.size(); ++idx)
+      {
+         out << prefix << "gdalmetadata."
+             << ossimString(children[idx]->getAttributeValue("name")).downcase()
+             << ":" << children[idx]->getText() << std::endl;
+      }
+   }
+   return out;
+}
+
+std::ostream& ossimTiffInfo::printGeoKeys(
+   std::ostream& out,
+   const std::string&  prefix,
+   ossim_uint64   geoKeyLength,
+   ossim_uint16*  geoKeyBlock,
+   ossim_uint64   geoDoubleLength,
+   ossim_float64* geoDoubleBlock,
+   ossim_uint64   geoAsciiLength,
+   ossim_int8*    geoAsciiBlock) const
+{
+   if (geoKeyLength && geoKeyBlock)
+   {
+      //---
+      // Length passed in is the total number of shorts in the geo key
+      // directory.  Each key has four short values; hence, "length/4".
+      //---
+      ossim_int32 index = 0;
+      ossim_int32 tagCount = static_cast<ossim_int32>(geoKeyLength/4);
+      for (ossim_int32 i = 0; i < tagCount; ++i)
+      {
+         //---
+         // Each key contains four unsigned shorts:
+         // GeoKey ID
+         // TIFF Tag ID or 0
+         // GeoKey value count
+         // value or tag offset
+         //---
+         ossim_uint16 key   = geoKeyBlock[index++];
+         ossim_uint16 tag   = geoKeyBlock[index++];
+         ossim_uint16 count = geoKeyBlock[index++];
+         ossim_uint16 code  = geoKeyBlock[index++];
+
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "DEBUG  ossimTiffInfo::printGeoKeys"
+               << "\nKey index:  " << i
+               << "\ngeo key:  " << key
+               << "\ntag:      " << tag
+               << "\ncount:    " << count
+               << "\ncode:     " << code
+               << "\n";
+         }
+
+         //---
+         // NOTE: Add tripple quotes front and back of ascii blocks for
+         // ossimKeywordlist to handle multi-line comments.
+         //---
+         
+         switch (key)
+         {
+            case OGT_MODEL_TYPE_GEO_KEY:  // key 1024 Section 6.3.1.1 Codes
+            {
+               printModelType(out, prefix, code);
+               break;
+            }               
+            case OGT_RASTER_TYPE_GEO_KEY:  // key 1025 Section 6.3.1.2 Code
+            {
+               printRasterType(out, prefix, code);
+               break;
+            }
+
+            case OGT_CITATION_GEO_KEY: // key 1026
+            {
+               if (tag == 34737) // using ascii array
+               {
+                  if (geoAsciiBlock && ( (code+count) <= geoAsciiLength ) )
+                  {
+                     std::string s;
+                     int i = 0;
+                     while (i < count)
+                     {
+                        s.push_back(geoAsciiBlock[code+i]);
+                        ++i;
+                     }
+                     out << prefix << "citation: \"\"\"" << s << "\"\"\"\n";
+                  }
+               }
+               break;
+            }
+
+            case OGEOGRAPHIC_TYPE_GEO_KEY:  // key 2048  Section 6.3.2.1 Codes
+            {
+               out << prefix << ossimKeywordNames::GCS_CODE_KW << ": "
+                   << code << "\n";
+               break;
+            }
+
+            case OGEOG_CITATION_GEO_KEY: // key 2049
+            {
+               if (tag == 34737) // using ascii array
+               {
+                  if (geoAsciiBlock && ( (code+count) <= geoAsciiLength ) )
+                  {
+                     std::string s;
+                     int i = 0;
+                     while (i < count)
+                     {
+                        s.push_back(geoAsciiBlock[code+i]);
+                        ++i;
+                     }
+                     out << prefix << "geographic_citation: \"\"\"" << s << "\"\"\"\n";
+                  }
+               }
+               break;
+            }
+
+            case OGEOG_GEODETIC_DATUM_GEO_KEY:// key 2050 Section 6.3.2.2 Codes
+            {
+               out << prefix << GEODETIC_DATUM_KW << ": " << code << "\n";
+               break;
+            }
+
+            case OGEOG_PRIME_MERIDIAN_GEOKEY:// key 2051 Section 6.3.2.4 Codes
+            {
+               out << prefix << "prime_meridian_code: " << code << "\n";
+               break;
+            }
+            
+            case OGEOG_LINEAR_UNITS_GEO_KEY:// key 2052  Section 6.3.1.3 Codes
+            {
+               out << prefix << "linear_units_code: " << code << "\n";
+               printLinearUnits(out, prefix, LINEAR_UNITS_KW, code);
+               break;
+            }
+            
+            case OGEOG_ANGULAR_UNITS_GEO_KEY:// key 2054  Section 6.3.1.4 Codes
+            {
+               out << prefix << "angular_units_code: " << code << "\n";
+               printAngularUnits(out, prefix, code);
+               break;
+            }
+
+            case OGEOG_ANGULAR_UNIT_SIZE_GEO_KEY:// key 2055 Size in radians Section 6.2.2
+            {
+               if (tag == 34736) // using double array
+               {
+                  // Code is index into array.
+                  if ( geoDoubleBlock && (code < geoDoubleLength) )
+                  {
+                     // Always count of one.
+                     out << prefix << "angular_units_size_radians: "
+                         << geoDoubleBlock[code] << "\n";
+                  }
+               }
+               break;
+            }
+            
+            case OGEOG_ELLIPSOID_GEO_KEY:// key 2056  Section 6.3.23 Codes
+            {
+               out << prefix << "ellipsoid_code: " << code << "\n";
+               break;
+            }
+            
+            case OGEOG_SEMI_MAJOR_AXIS: // key 2057
+            {
+               if (tag == 34736) // using double array
+               {
+                  // Code is index into array.
+                  if ( geoDoubleBlock && (code < geoDoubleLength) )
+                  {
+                     // Always count of one.
+                     out << prefix << "semi_major_axis: " << geoDoubleBlock[code] << "\n";
+                  }
+               }
+               break;
+            }
+            
+            case OGEOG_SEMI_MINOR_AXIS: // key 2058
+            {
+               if (tag == 34736) // using double array
+               {
+                  // Code is index into array.
+                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
+                  {
+                     // Always count of one.
+                     out << prefix << "semi_minor_axis: "  << geoDoubleBlock[code] << "\n";
+                  }
+               }
+               break;
+            }
+
+            case OGEOG_INV_FLATTENING_GEO_KEY: // key 2059 ratio Section 6.2.2
+            {
+               if (tag == 34736) // using double array
+               {  
+                  // Code is index into array.
+                  if ( geoDoubleBlock && (code < geoDoubleLength) )
+                  {
+                     // Always count of one.
+                     out << prefix << "inverse_flattening_ratio: " << geoDoubleBlock[code] << "\n";
+                  }
+               }
+               break;
+            }
+
+            case OGEOG_PRIME_MERIDIAN_LONG_GEO_KEY: // key 2061 GeogAngularUnit Section 6.2.2
+            {
+               if (tag == 34736) // using double array
+               {
+                  // Code is index into array.
+                  if ( geoDoubleBlock && (code < geoDoubleLength) )
+                  {
+                     // Always count of one.
+                     out << prefix << "prime_meridian_longitude: " << geoDoubleBlock[code] << "\n";
+                  }
+               }
+               break;
+            }
+
+            case OPROJECTED_CS_TYPE_GEO_KEY: // key 3072 Section 6.3.3.1 codes
+            {
+               out << prefix << "pcs_code: " << code << "\n";
+               break;
+            }
+
+            case OPCS_CITATION_GEO_KEY: // key 3073 ascii
+            {
+               if (tag == 34737) // using ascii array
+               {
+                  if (geoAsciiBlock && ( (code+count) <= geoAsciiLength ) )
+                  {
+                     std::string s;
+                     int i = 0;
+                     while (i < count)
+                     {
+                        s.push_back(geoAsciiBlock[code+i]);
+                        ++i;
+                     }
+                     out << prefix << "pcs_citation: \"\"\"" << s << "\"\"\"\n";
+                  }
+               }
+               
+               break;
+            }
+      
+            case OPROJECTION_GEO_KEY: // key 3074 Section 6.3.3.2 codes
+            {
+               out << prefix << "proj_code: " << code << "\n";
+               break;
+            }
+            
+            case OPROJ_COORD_TRANS_GEO_KEY:  // key 3075 Section 6.3.3.3 codes
+            {
+               out << prefix << COORD_TRANS_CODE_KW << ": " << code << "\n";
+               printCoordTrans(out, prefix, code);
+               break;
+            }
+         
+            case OPROJ_LINEAR_UNITS_GEO_KEY:  // key 3076 Section 6.3.1.3 codes
+            {
+               out << prefix << "linear_units_code: " << code << "\n";
+               printLinearUnits(out, prefix, std::string("linear_units"), code);
+               break;
+            }
+
+            case OPROJ_LINEAR_UNIT_SIZE_GEO_KEY:  // key 3077 meters Section 6.2.3
+            {
+               if (tag == 34736) // using double array
+               {
+                  // Code is index into array.
+                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
+                  {
+                     // Always count of one.
+                     out << prefix << "linear_units_size: " << geoDoubleBlock[code] << "\n";
+                  }
+               }
+               break;
+            }
+
+            case OPROJ_STD_PARALLEL1_GEO_KEY:  // key 3078
+            {
+               if (tag == 34736) // using double array
+               {
+                  // Code is index into array.
+                  if ( geoDoubleBlock && (code < geoDoubleLength) )
+                  {
+                     // Always count of one.
+                     out << prefix
+                         << ossimKeywordNames::STD_PARALLEL_1_KW << ": "
+                         << geoDoubleBlock[code] << "\n";
+                  }
+               }
+               break;
+            }
+         
+            case OPROJ_STD_PARALLEL2_GEO_KEY:  // key 3079
+            {
+               if (tag == 34736) // using double array
+               {
+                  // Code is index into array.
+                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
+                  {
+                     // Always count of one.
+                     out << prefix
+                         << ossimKeywordNames::STD_PARALLEL_2_KW << ": "
+                         << geoDoubleBlock[code] << "\n";
+                  }
+               }
+               break;
+            }
+         
+            case OPROJ_NAT_ORIGIN_LONG_GEO_KEY:  // key 3080
+            {
+               if (tag == 34736) // using double array
+               {
+                  // Code is index into array.
+                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
+                  {
+                     // Always count of one.
+                     out << prefix << ORIGIN_LONGITUDE_KW << ": "
+                         << geoDoubleBlock[code] << "\n";
+                  }
+               }
+               break;
+            }
+               
+            case OPROJ_NAT_ORIGIN_LAT_GEO_KEY:  // key 3081
+            {
+               if (tag == 34736) // using double array
+               {
+                  // Code is index into array.
+                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
+                  {
+                     // Always count of one.
+                     out << prefix << ORIGIN_LATITUDE_KW << ": "
+                         << geoDoubleBlock[code] << "\n";
+                  }
+               }
+               break;
+            }
+
+            case OPROJ_FALSE_EASTING_GEO_KEY:  // key 3082
+            {
+               if (tag == 34736) // using double array
+               {
+                  // Code is index into array.
+                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
+                  {
+                     // Always count of one.
+                     out << prefix
+                         << ossimKeywordNames::FALSE_EASTING_KW<< ": "
+                         << geoDoubleBlock[code] << "\n";
+                  }
+               }
+               break;
+            }
+
+            case OPROJ_FALSE_NORTHING_GEO_KEY:  // key 3083
+            {
+               if (tag == 34736) // using double array
+               {
+                  // Code is index into array.
+                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
+                  {
+                     // Always count of one.
+                     out << prefix
+                         << ossimKeywordNames::FALSE_NORTHING_KW
+                         << ": "
+                         << geoDoubleBlock[code] << "\n";
+                  }
+               }
+               break;
+            }
+            
+            case OPROJ_FALSE_ORIGIN_LONG_GEO_KEY:  // key 3084
+            {
+               if (tag == 34736) // using double array
+               {
+                  // Code is index into array.
+                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
+                  {
+                     // Always count of one.
+                     out << prefix
+                         << FALSE_ORIGIN_LONGITUDE_KW << ": "
+                         << geoDoubleBlock[code] << "\n";
+                  }
+               }
+               break;
+            }
+            
+            case OPROJ_FALSE_ORIGIN_LAT_GEO_KEY:  // key 3085
+            {
+               if (tag == 34736) // using double array
+               {
+                  // Code is index into array.
+                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
+                  {
+                     // Always count of one.
+                     out << prefix
+                         << FALSE_ORIGIN_LATITUDE_KW << ": "
+                         << geoDoubleBlock[code] << "\n";
+                  }
+               }
+               break;
+            }
+            
+            case OPROJ_FALSE_ORIGIN_EASTING_GEO_KEY:  // key 3086
+            {
+               if (tag == 34736) // using double array
+               {
+                  // Code is index into array.
+                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
+                  {
+                     // Always count of one.
+                     out << prefix
+                         <<  FALSE_ORIGIN_EASTING_KW<< ": "
+                         << geoDoubleBlock[code] << "\n";
+                  }
+               }
+               break;
+            }
+            
+            case OPROJ_FALSE_ORIGIN_NORTHING_GEO_KEY:  // key 3087
+            {
+               if (tag == 34736) // using double array
+               {
+                  // Code is index into array.
+                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
+                  {
+                     // Always count of one.
+                     out << prefix
+                         <<  FALSE_ORIGIN_NORTHING_KW<< ": "
+                         << geoDoubleBlock[code] << "\n";
+                  }
+               }
+               break;
+            }
+           
+            case OPROJ_CENTER_LONG_GEO_KEY:  // key 3088
+            {
+               if (tag == 34736) // using double array
+               {
+                  // Code is index into array.
+                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
+                  {
+                     // Always count of one.
+                     out << prefix << "center_longitude: "
+                         << geoDoubleBlock[code] << "\n";
+                  }
+               }
+               break;
+            }
+
+            case OPROJ_CENTER_LAT_GEO_KEY:  // key 3089
+            {
+               if (tag == 34736) // using double array
+               {
+                  // Code is index into array.
+                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
+                  {
+                     // Always count of one.
+                     out << prefix << "center_latitude: "
+                         << geoDoubleBlock[code] << "\n";
+                  }
+               }
+               break;
+            }
+
+            case OPROJ_SCALE_AT_NAT_ORIGIN_GEO_KEY:  // key 3092
+            {
+               if (tag == 34736) // using double array
+               {
+                  // Code is index into array.
+                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
+                  {
+                     // Always count of one.
+                     out << prefix << ossimKeywordNames::SCALE_FACTOR_KW
+                         << ": "
+                         << geoDoubleBlock[code] << "\n";
+                  }
+               }
+               break;
+            }
+            case OPROJ_SCALE_AT_CENTER_GEO_KEY:  // key 3093
+            {
+               if (tag == 34736) // using double array
+               {
+                  // Code is index into array.
+                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
+                  {
+                     // Always count of one.
+                     out << prefix << ossimKeywordNames::SCALE_FACTOR_KW
+                         << ": "
+                         << geoDoubleBlock[code] << "\n";
+                  }
+               }
+               break;
+            }
+
+            case OVERTICAL_CITATION_GEO_KEY: // key 4097
+            {               
+               if (tag == 34737) // using ascii array
+               {
+                  if (geoAsciiBlock && ( (code+count) <= geoAsciiLength ) )
+                  {
+                     std::string s;
+                     int i = 0;
+                     while (i < count)
+                     {
+                        s.push_back(geoAsciiBlock[code+i]);
+                        ++i;
+                     }
+                     out << prefix << "vertical_citation: \"\"\"" << s << "\"\"\"\n";
+                  }
+               }
+               break;
+            }
+
+            case OVERTICAL_UNITS_GEO_KEY: // key 4099  Section 6.3.1.3 Codes
+            {
+               out << prefix << "vertical_units_code: " << code << "\n";
+               printLinearUnits(out, prefix, VERTICAL_UNITS_KW, code);
+               break;
+            }
+ 
+            default:
+            {
+               if (key > 1)
+               {
+                  if (tag == 34737) // using ascii array
+                  {
+                     if (geoAsciiBlock && ( (code+count) <= geoAsciiLength ) )
+                     {
+                        std::string s;
+                        int i = 0;
+                        while (i < count)
+                        {
+                           s.push_back(geoAsciiBlock[code+i]);
+                           ++i;
+                        }
+                        out << prefix << "key_" << key << ": \"\"\"" << s << "\"\"\"\n";
+                     }
+                  }
+                  else
+                  {
+                     out << prefix << "unhandle_key: " << key << "\n";
+                  }
+               }
+               break;
+            }
+            
+         } // matches: switch(key)
+
+      } //  for (ossim_int32 i = 0; i < tagCount; ++i)
+      
+      if (traceDebug())
+      {
+         if (geoAsciiBlock && geoAsciiLength)
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "ossimTiffInfo::printGeoKeys DEBUG: geo ascii block: ";
+            std::string s(geoAsciiBlock, static_cast<std::string::size_type>(geoAsciiLength));
+            ossimNotify(ossimNotifyLevel_DEBUG)<< s << "\n";
+         }
+      } 
+      
+   } // if (geoKeyLength && geoKeyBlock)
+   
+   return out;
+}
+
+
+std::ostream& ossimTiffInfo::printModelType(std::ostream& out,
+                                            const std::string& prefix,
+                                            ossim_uint16 code) const
+{
+   // key 1024 Section 6.3.1.1 Codes
+   out << prefix << MODEL_TYPE_KW << ": ";
+   if (code == 1)
+   {
+      out << "projected\n";
+   }
+   else if (code == 2)
+   {
+      out << "geographic\n";
+   }
+   else if (code == 2)
+   {
+      out << "geocentric\n";
+   }
+   else
+   {
+      out << "unknown\n";
+   }
+   return out;
+}
+
+std::ostream& ossimTiffInfo::printRasterType(std::ostream& out,
+                                             const std::string& prefix,
+                                             ossim_uint16 code) const
+{
+   // key 1025 Section 6.3.1.2 Codes
+   out << prefix << RASTER_TYPE_KW << ": ";
+   if (code == 1)
+   {
+      out << "pixel_is_area\n";
+   }
+   else if (code == 2)
+   {
+      out << "pixel_is_point\n";
+   }
+   else
+   {
+      out << "unknown\n";
+   }
+   return out;
+}
+
+std::ostream& ossimTiffInfo::printAngularUnits(std::ostream& out,
+                                               const std::string& prefix,
+                                               ossim_uint16 code) const
+{
+   // key 2054 Section 6.3.1.4 Codes
+   out << prefix << ANGULAR_UNITS_KW << ": ";
+   switch (code)
+   {
+      case 9101:
+      {
+         out << "radians\n";
+         break;
+      }
+      case 9102:
+      {
+         out << "degrees\n";
+         break;
+      }
+      case 9103:
+      {
+         out << "arc_minutes\n";
+         break;
+      }
+      case 9104:
+      {
+         out << "arc_seconds\n";
+         break;
+      }
+      case 9105:
+      {
+         out << "grad\n";
+         break;
+      }
+      case 9106:
+      {
+         out << "gon\n";
+         break;
+      }
+      case 9107:
+      {
+         out << "dms\n";
+         break;
+      }
+      case 9108:
+      {
+         out << "dms_hemisphere\n";
+         break;
+      }
+      default:
+      {
+         out << "unknown\n";
+         break;
+      }
+   }
+   return out;
+}
+
+std::ostream& ossimTiffInfo::printCoordTrans(std::ostream& out,
+                                             const std::string& prefix,
+                                             ossim_uint16 code) const
+{
+   // key 3075 Section 6.3.3.3 Codes
+   out << prefix << "coord_trans: ";
+   switch (code)
+   {
+      case 1:
+      {
+         out << "TransverseMercator\n";
+         break;
+      }
+      case 2:
+      {
+         out << "TransvMercator_Modified_Alaska\n";
+         break;
+      }
+      case 3:
+      {
+         out << "ObliqueMercator\n";
+         break;
+      }
+      case 4:
+      {
+         out << "ObliqueMercator_Laborde\n";
+         break;
+      }
+      case 5:
+      {
+         out << "ObliqueMercator_Rosenmund\n";
+         break;
+      }
+      case 6:
+      {
+         out << "ObliqueMercator_Spherical\n";
+         break;
+      }
+      case 7:
+      {
+         out << "Mercator\n";
+         break;
+      }
+      case 8:
+      {
+         out << "LambertConfConic_2SP\n";
+         break;
+      }
+      case 9:
+      {
+         out << "LambertConfConic_Helmert\n";
+         break;
+      }
+      case 10:
+      {
+         out << "LambertAzimEqualArea\n";
+         break;
+      }
+      case 11:
+      {
+         out << "AlbersEqualArea\n";
+         break;
+      }
+      case 12:
+      {
+         out << "AzimuthalEquidistant\n";
+         break;
+      }
+      case 13:
+      {
+         out << "EquidistantConic\n";
+         break;
+      }
+      case 14:
+      {
+         out << "Stereographic\n";
+         break;
+      }
+      case 15:
+      {
+         out << "PolarStereographic\n";
+         break;
+      }
+      case 16:
+      {
+         out << "ObliqueStereographic\n";
+         break;
+      }
+      case 17:
+      {
+         out << "Equirectangular\n";
+         break;
+      }
+      case 18:
+      {
+         out << "CassiniSoldner\n";
+         break;
+      }
+      case 19:
+      {
+         out << "Gnomonic\n";
+         break;
+      }
+      case 20:
+      {
+         out << "MillerCylindrical\n";
+         break;
+      }
+      case 21:
+      {
+         out << "Orthographic\n";
+         break;
+      }
+      case 22:
+      {
+         out << "Polyconic\n";
+         break;
+      }
+      case 23:
+      {
+         out << "Robinson\n";
+         break;
+      }
+      case 24:
+      {
+         out << "Sinusoidal\n";
+         break;
+      }
+      case 25:
+      {
+         out << "VanDerGrinten\n";
+         break;
+      }
+      case 26:
+      {
+         out << "NewZealandMapGrid\n";
+         break;
+      }
+      case 27:
+      {
+         out << "TransvMercator_SouthOriented\n";
+         break;
+      }
+      default:
+      {
+         out << code << " unknown\n";
+         break;
+      }
+   }
+   return out;
+}
+
+std::ostream& ossimTiffInfo::printLinearUnits(std::ostream& out,
+                                              const std::string& prefix,
+                                              const std::string& key,
+                                              ossim_uint16 code) const
+{
+   // key 3076 Section 6.3.1.3 Codes
+   out << prefix << key << ": ";
+   switch (code)
+   {
+      case 9001:
+      {
+         out << "meters\n";
+         break;
+      }
+      case 9002:
+      {
+         out << "feet\n";
+         break;
+      }
+      case 9003:
+      {
+         out << "us_survey_feet\n";
+         break;
+      }
+      case 9004:
+      {
+         out << "foot_modified_american\n";
+         break;
+      }
+      case 9005:
+      {
+         out << "foot_clarke\n";
+         break;
+      }
+      case 9006:
+      {
+         out << "foot_indian\n";
+         break;
+      }
+      case 9007:
+      {
+         out << "link\n";
+         break;
+      }
+      case 9008:
+      {
+         out << "link_benoit\n";
+         break;
+      }
+      case 9009:
+      {
+         out << "link_sears\n";
+         break;
+      }
+      case 9010:
+      {
+         out << "chain_benoit\n";
+         break;
+      }
+      case 9011:
+      {
+         out << "chain_sears\n";
+         break;
+      }
+      case 9012:
+      {
+         out << "yard_sears\n";
+         break;
+      }
+      case 9013:
+      {
+         out << "yard_indian\n";
+         break;
+      }
+      case 9014:
+      {
+         out << "fathom\n";
+         break;
+      }
+      case 9015:
+      {
+         out << "mile_international_nautical\n";
+         break;
+      }
+      default:
+      {
+         out << code << " unknown\n";
+         break;
+      }
+   }
+   return out;
+}
+
+std::ostream& ossimTiffInfo::printOrientation(std::ostream& out,
+                                              const std::string& prefix,
+                                              ossim_uint16 code) const
+{
+   // Tag 274:
+   out << prefix << "orientation: ";
+   switch (code)
+   {
+      case 1:
+      {
+         out << "top_left\n";
+         break;
+      }
+      case 2:
+      {
+         out << "top_right\n";
+         break;
+      }
+      case 3:
+      {
+         out << "bottom_right\n";
+         break;
+      }
+      case 4:
+      {
+         out << "bottom_left\n";
+         break;
+      }
+      case 5:
+      {
+         out << "left_top\n";
+         break;
+      }
+      case 6:
+      {
+         out << "right_top\n";
+         break;
+      }
+      case 7:
+      {
+         out << "right_bottom\n";
+         break;
+      }
+      case 8:
+      {
+         out << "left_bottom\n";
+         break;
+      }
+      default:
+      {
+         out << code << " unknown\n";
+         break;
+      }
+   }
+   return out;
+}
+
+void ossimTiffInfo::getDirPrefix(ossim_int32 index,
+                                 std::string& prefix) const
+{
+   prefix += "image";
+   std::ostringstream s;
+   s << index;
+   prefix += s.str();
+   prefix += ".";
+}
+
+bool ossimTiffInfo::getPixelScale(const ossimString& gtiffPrefix,
+                                  const ossimKeywordlist& gtiffKwl,
+                                  ossimDpt& scale) const
+{
+   bool result = false;
+
+   std::vector<ossim_float64> floats;
+   if ( getFloats(gtiffPrefix, MODEL_PIXEL_SCALE_KW, gtiffKwl, floats) )
+   {
+      if ( floats.size() == 3 )
+      {
+         scale.x = floats[0];
+         scale.y = floats[1];
+         result = true;
+      }
+   }
+
+   return result;
+}
+
+bool ossimTiffInfo::getTiePoint(const ossimString& gtiffPrefix,
+                                const ossimKeywordlist& gtiffKwl,
+                                std::vector<ossim_float64>& ties) const
+{
+   return getFloats(gtiffPrefix, MODEL_TIE_POINT_KW, gtiffKwl, ties);
+}
+
+bool ossimTiffInfo::getModelTransform(const ossimString& gtiffPrefix,
+                                      const ossimKeywordlist& gtiffKwl,
+                                      std::vector<ossim_float64>& xfrm) const
+{
+   return getFloats(gtiffPrefix, MODEL_TRANSFORM_KW, gtiffKwl, xfrm);
+}
+
+bool ossimTiffInfo::getFloats(const ossimString& gtiffPrefix,
+                              const ossimString& key,
+                              const ossimKeywordlist& gtiffKwl,
+                              std::vector<ossim_float64>& floats) const
+{
+   bool result = false;
+   
+   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), key.c_str());
+   if ( lookup )
+   {
+      ossimString line = lookup;
+      result  = getFloats(line, floats);
+   }
+
+   return result; 
+}
+
+bool ossimTiffInfo::getFloats(const ossimString& line,
+                              std::vector<ossim_float64>& floats) const
+{
+   bool result = false;
+   
+   floats.clear();
+   
+   if (line.size())
+   {
+      ossim_float64 f;
+      std::istringstream is(line);
+
+      is >> f; // Get the first double.
+      while ( ! is.fail() )
+      {
+         floats.push_back(f);
+         is >> f;
+      }
+   }
+
+   if ( floats.size() )
+   {
+      result = true;
+   }
+
+   return result;
+}
+
+bool ossimTiffInfo::getDatumCode(const ossimString& gtiffPrefix,
+                                 const ossimKeywordlist& gtiffKwl,
+                                 ossimString& datumCode) const
+{
+   bool result = false;
+   
+   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), GEODETIC_DATUM_KW.c_str());
+
+   // There is some ambiguity in the definition of EPSG GCS code. Here both the datum code (6000-
+   // series) and projection code (4000-series) are tested to get to the datum's native ascii code:
+
+   // Look for GEODETIC_DATUM_KW code first:
+   if (lookup)
+   {
+      ossim_int32 code = ossimString(lookup).toInt32();
+      result = getDatumCode( code, datumCode );
+   }
+
+   if ( !result )
+   {
+      // Try GCS_CODE_KW:
+      lookup = gtiffKwl.find(gtiffPrefix.c_str(), ossimKeywordNames::GCS_CODE_KW);
+      if ( lookup )
+      {
+         ossim_int32 code = ossimString(lookup).toInt32();
+         result = getDatumCode( code, datumCode );
+      }
+   }
+   return result;
+}
+
+bool ossimTiffInfo::getDatumCode(ossim_int32 code, ossimString& datumCode) const
+{
+   bool result = false;
+   datumCode.clear();
+   switch(code)
+   {
+      case 4267:
+      case 6267:   
+      {
+         datumCode = "NAS-C";
+         break;
+      }
+      case 4269:
+      case 6269:
+      {
+         datumCode = "NAR-C";
+         break;
+      }
+      case 4322:
+      case 6322:
+      {
+         datumCode = "WGD";
+         break;
+      }
+      case 4326:
+      case 6326:
+      {
+         datumCode = "WGE";
+         break;
+      }
+      
+   } // matches: switch(code)
+
+   if ( datumCode.size() )
+   {
+      result = true;
+   }
+   return result;
+}
+
+bool ossimTiffInfo::getPcsCode(const ossimString& gtiffPrefix,
+                               const ossimKeywordlist& gtiffKwl,
+                               ossimString& pcsCode) const
+{
+   bool result = false;
+
+   // Check for key "pcs_code":
+   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), ossimKeywordNames::PCS_CODE_KW);
+   if (lookup)
+   {
+      pcsCode = lookup;
+      
+      ossim_uint32 code = pcsCode.toUInt32();
+      if ( code != 32767 )
+      {
+         // See if we handle this code in our projection factories.
+         ossimRefPtr<ossimProjection>  proj = 
+            ossimEpsgProjectionFactory::instance()->createProjection(pcsCode);
+         if (proj.valid())
+         {
+            proj = 0;
+            result = true;
+         }
+      }
+      
+   }
+
+   if (result == false)
+   {
+      // Check for key "pcs_citation":
+      lookup = gtiffKwl.find(gtiffPrefix.c_str(), "pcs_citation");
+      if ( lookup )
+      {
+         ossimString spec = lookup;
+
+         // Strip commonly found or bar '|' from end if present.
+         spec.trim(ossimString("|"));
+
+         // See if we handle this code in our projection factories.
+         ossimRefPtr<ossimProjection>  proj =
+            ossimEpsgProjectionFactory::instance()->createProjection(spec);
+         if (proj.valid())
+         {
+            ossimMapProjection* mapProj = dynamic_cast<ossimMapProjection*>(proj.get());
+            if ( mapProj )
+            {
+               ossim_uint32 intCode = mapProj->getPcsCode();
+               if ( intCode != 32767 )
+               {
+                  proj = 0;
+                  pcsCode = ossimString::toString(intCode);
+                  result = true;
+               }
+            }
+         }
+      }
+   }
+
+   return result;
+}
+
+bool ossimTiffInfo::getUnits(const ossimString& gtiffPrefix,
+                             const ossimKeywordlist& gtiffKwl,
+                             ossimString& units) const
+{
+   bool result = true;
+   
+   ossimString linearUnits = "";
+   getLinearUnits(gtiffPrefix, gtiffKwl, linearUnits);
+   
+   ossimString angularUnits = "";
+   getAngularUnits(gtiffPrefix, gtiffKwl, angularUnits);
+
+   ossimString modelType;
+   getModelType(gtiffPrefix, gtiffKwl, modelType);
+   
+   if (modelType == "geographic")
+   {
+      if (angularUnits.size())
+      {
+         units = angularUnits;
+      }
+      else
+      {
+         units = "degrees";
+      }
+   }
+   else if (modelType == "projected")
+   {
+      if (linearUnits.size())
+      {
+         units = linearUnits;
+      }
+      else
+      {
+         units = "meters";
+      }
+   }
+   else
+   {
+      units = "meters";
+   }
+
+   return result;
+}
+
+
+bool ossimTiffInfo::getLinearUnits(const ossimString& gtiffPrefix,
+                                   const ossimKeywordlist& gtiffKwl,
+                                   ossimString& linearUnits) const
+{
+   bool result = false;
+   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), LINEAR_UNITS_KW.c_str());
+   if (lookup)
+   {
+      linearUnits = lookup;
+      result = true;
+   }
+   return result;
+}
+
+bool ossimTiffInfo::getVerticalUnits(const ossimString& gtiffPrefix,
+                                     const ossimKeywordlist& gtiffKwl,
+                                     ossimString& verticalUnits) const
+{
+   bool result = false;
+   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), VERTICAL_UNITS_KW.c_str());
+   if (lookup)
+   {
+      verticalUnits = lookup;
+      result = true;
+   }
+   return result;
+}
+
+bool ossimTiffInfo::getAngularUnits(const ossimString& gtiffPrefix,
+                                    const ossimKeywordlist& gtiffKwl,
+                                    ossimString& angularUnits) const
+{
+   bool result = false;
+   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), ANGULAR_UNITS_KW.c_str());
+   if (lookup)
+   {
+      angularUnits = lookup;
+      result = true;
+   }
+   return result;
+}
+
+bool ossimTiffInfo::getPixelType(const ossimString& gtiffPrefix,
+                                 const ossimKeywordlist& gtiffKwl,
+                                 ossimString& pixelType) const
+{
+   bool result = false;
+   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), RASTER_TYPE_KW.c_str());
+   if (lookup)
+   {
+      pixelType = lookup;
+      result = true;
+   }
+   return result;
+}
+
+bool ossimTiffInfo::getModelType(const ossimString& gtiffPrefix,
+                                 const ossimKeywordlist& gtiffKwl,
+                                 ossimString& modelType) const
+{
+   bool result = false;
+   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), MODEL_TYPE_KW.c_str());
+   if (lookup)
+   {
+      modelType = lookup;
+      result = true;
+   }
+   return result;
+}
+
+bool ossimTiffInfo::getOssimProjectionName(const ossimString& gtiffPrefix,
+                                           const ossimKeywordlist& gtiffKwl,
+                                           ossimString& ossimProj) const
+{
+   bool result = false;
+   ossimProj.clear();
+   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), COORD_TRANS_CODE_KW.c_str());
+   if (lookup)
+   {
+      ossim_uint32 code = ossimString(lookup).toUInt32();
+
+      ossimGeoTiffCoordTransformsLut lut;
+      
+      ossimProj = lut.getEntryString(code);
+      
+      if (ossimProj.size())
+      {
+         result = true;
+      }
+   }
+   return result;
+}
+
+ossim_uint32 ossimTiffInfo::getLines(const ossimString& gtiffPrefix,
+                                     const ossimKeywordlist& gtiffKwl) const
+{
+   ossim_uint32 result = 0;
+   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), IMAGE_LENGTH_KW.c_str());
+   if (lookup)
+   {
+      result = ossimString(lookup).toUInt32();
+   }
+   return result;
+}
+
+ossim_uint32 ossimTiffInfo::getSamples(const ossimString& gtiffPrefix,
+                                       const ossimKeywordlist& gtiffKwl) const
+{
+   ossim_uint32 result = 0;
+   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), IMAGE_WIDTH_KW.c_str());
+   if (lookup)
+   {
+      result = ossimString(lookup).toUInt32();
+   }   
+   return result;
+}
+
+bool ossimTiffInfo::getStdParallelOne(const ossimString& gtiffPrefix,
+                                      const ossimKeywordlist& gtiffKwl,
+                                      ossimString& value) const
+{
+   bool result = false;
+   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), ossimKeywordNames::STD_PARALLEL_1_KW);
+   if (lookup)
+   {
+      value = lookup;
+      result = true;
+   }
+   return result;
+}
+
+bool ossimTiffInfo::getStdParallelTwo(const ossimString& gtiffPrefix,
+                                      const ossimKeywordlist& gtiffKwl,
+                                      ossimString& value) const
+{
+   bool result = false;
+   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), ossimKeywordNames::STD_PARALLEL_2_KW);
+   if (lookup)
+   {
+      value = lookup;
+      result = true;
+   }
+   return result;
+}
+
+bool ossimTiffInfo::getFalseEasting(const ossimString& gtiffPrefix,
+                                    const ossimKeywordlist& gtiffKwl,
+                                    ossimString& value) const
+{
+   bool result = false;
+   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), ossimKeywordNames::FALSE_EASTING_KW);
+   if (lookup)
+   {
+      value = lookup;
+      result = true;
+   }
+   return result; 
+}
+
+bool ossimTiffInfo::getFalseNorthing(const ossimString& gtiffPrefix,
+                                     const ossimKeywordlist& gtiffKwl,
+                                     ossimString& value) const
+{
+   bool result = false;
+   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), ossimKeywordNames::FALSE_NORTHING_KW);
+   if (lookup)
+   {
+      value = lookup;
+      result = true;
+   }
+   return result; 
+}
+
+bool ossimTiffInfo::getFalseEastingNorthing(const ossimString& gtiffPrefix,
+                                            const ossimKeywordlist& gtiffKwl,
+                                            ossimDpt& eastingNorthing) const
+{
+   bool result = false;
+   ossimString value;
+   if ( getFalseEasting(gtiffPrefix, gtiffKwl, value) )
+   {
+      eastingNorthing.x = value.toFloat64();
+
+      if ( getFalseNorthing(gtiffPrefix, gtiffKwl, value) )
+      {
+         eastingNorthing.y = value.toFloat64();
+         result = true;
+      }
+   }
+   return result;
+}
+
+bool ossimTiffInfo::getScaleFactor(const ossimString& gtiffPrefix,
+                                   const ossimKeywordlist& gtiffKwl,
+                                   ossim_float64& value) const
+{
+   bool result = false;
+
+   const char* lookup =
+      gtiffKwl.find(gtiffPrefix.c_str(), ossimKeywordNames::SCALE_FACTOR_KW);
+   
+   if (lookup)
+   {
+      value = ossimString(lookup).toFloat64();
+      result = true;
+   }
+
+   return result; 
+}
+
+bool ossimTiffInfo::getOriginLat(const ossimString& gtiffPrefix,
+                                 const ossimKeywordlist& gtiffKwl,
+                                 ossim_float64& value) const
+{
+   bool result = false;
+
+   //---
+   // Not sure of the order of precedence here.
+   //---
+   const char* projOriginLatGeoKey =
+      gtiffKwl.find(gtiffPrefix.c_str(), ORIGIN_LATITUDE_KW.c_str());
+
+   //---
+   // Go for this key first as it is used in geotiff spec example:
+   // http://www.remotesensing.org/geotiff/spec/geotiff3.html#3.1.3.
+   //---
+   if (projOriginLatGeoKey)
+   {
+      value = ossimString(projOriginLatGeoKey).toFloat64();
+      result = true;
+   }
+   else
+   {
+      const char* projCenterLatGeoKey =
+         gtiffKwl.find(gtiffPrefix.c_str(), CENTER_LATITUDE__KW.c_str());
+
+      if (projCenterLatGeoKey)
+      {
+         value = ossimString(projCenterLatGeoKey).toFloat64();
+         result = true;
+      }
+      else
+      {
+         const char* projFalseOriginLatGeoKey =
+            gtiffKwl.find(gtiffPrefix.c_str(),
+                          FALSE_ORIGIN_LATITUDE_KW.c_str());
+
+         if (projFalseOriginLatGeoKey)
+         {
+            //---
+            // Seems the term "false" implies it should be added to the real
+            // origin?
+            //---
+            value = ossimString(projFalseOriginLatGeoKey).toFloat64();
+            result = true;
+         }
+      }
+   }
+   
+   return result;
+}
+
+bool ossimTiffInfo::getCentralMeridian(const ossimString& gtiffPrefix,
+                                       const ossimKeywordlist& gtiffKwl,
+                                       ossim_float64& value) const
+{
+   bool result = false;
+
+   //---
+   // Not sure of the order of precedence here.
+   //---
+   const char* projCenterLongGeoKey =
+      gtiffKwl.find(gtiffPrefix.c_str(), CENTER_LONGITUDE_KW.c_str());
+
+   //---
+   // Go for this key first as it is used in geotiff spec example:
+   // http://www.remotesensing.org/geotiff/spec/geotiff3.html#3.1.3.
+   //---
+   if (projCenterLongGeoKey)
+   {
+      value = ossimString(projCenterLongGeoKey).toFloat64();
+      result = true;
+   }
+   else
+   {
+      const char* projOriginLongGeoKey =
+         gtiffKwl.find(gtiffPrefix.c_str(), ORIGIN_LONGITUDE_KW.c_str());
+
+      if (projOriginLongGeoKey)
+      {
+         value = ossimString(projOriginLongGeoKey).toFloat64();
+         result = true;
+      }
+      else
+      {
+         const char* projFalseOriginLongGeoKey =
+            gtiffKwl.find(gtiffPrefix.c_str(),
+                          FALSE_ORIGIN_LONGITUDE_KW.c_str());
+
+         if (projFalseOriginLongGeoKey)
+         {
+            //---
+            // Seems the term "false" implies it should be added to the real
+            // origin?
+            //---
+            value = ossimString(projFalseOriginLongGeoKey).toFloat64();
+            result = true;
+         }
+      }
+   }
+   
+   return result;
+}
+
+void ossimTiffInfo::getTieSets(const std::vector<ossim_float64>& ties,
+                               ossim_uint32 width,
+                               ossim_uint32 height,
+                               ossimTieGptSet& tieSet) const
+{
+   ossim_uint32 idx = 0;
+   ossim_uint32 tieCount = (ossim_uint32)ties.size()/6;
+   const double* tiePointsPtr = &ties.front();
+   double offset = 0;
+   if (hasOneBasedTiePoints(ties, width, height))
+   {
+      offset = -1.0;
+   }
+   
+   for(idx = 0; idx < tieCount; ++idx)
+   {
+      ossimDpt xyPixel(tiePointsPtr[0]+offset, tiePointsPtr[1]+offset);
+      // tie[3] = x, tie[4]
+      ossimGpt gpt(tiePointsPtr[4], tiePointsPtr[3], tiePointsPtr[5]);
+      
+      tieSet.addTiePoint(new ossimTieGpt(gpt, xyPixel, .5));
+      tiePointsPtr+=6;
+   }
+}
+
+bool ossimTiffInfo::hasOneBasedTiePoints(
+   const std::vector<ossim_float64>& ties,
+   ossim_uint32 width, ossim_uint32 height) const
+{
+   bool result = false;
+   
+   // Assuming ties of (x,y,z,lat,lon,hgt) so size should be divide by 3.
+   if (ties.size()%6)
+   {
+      return result;
+   }
+   
+   ossim_float64 minX = 999999.0;
+   ossim_float64 minY = 999999.0;
+   ossim_float64 maxX = 0.0;
+   ossim_float64 maxY = 0.0;
+
+   const ossim_uint32 SIZE = (ossim_uint32)ties.size();
+   ossim_uint32 tieIndex = 0;
+
+   while (tieIndex < SIZE)
+   {
+      if ( ties[tieIndex]   < minX ) minX = ties[tieIndex];
+      if ( ties[tieIndex]   > maxX ) maxX = ties[tieIndex];
+      if ( ties[tieIndex+1] < minY ) minY = ties[tieIndex+1];
+      if ( ties[tieIndex+1] > maxY ) maxY = ties[tieIndex+1];
+      tieIndex += 6;
+   }
+
+   if ( (minX == 1) && (maxX == width) &&
+        (minY == 1) && (maxY == height) )
+   {
+      result = true;
+   }
+
+#if 0
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimGeoTiff::hasOneBasedTiePoints DEBUG:"
+         << "\nminX:       " << minX
+         << "\nmaxX:       " << maxX
+         << "\nminY:       " << minY
+         << "\nmaxY:       " << maxY
+         << "\ntheWidth:   " << theWidth
+         << "\ntheLength:  " << theLength
+         << "\none based:  " << (result?"true":"false")
+         << std::endl;
+   }
+#endif
+   
+   return result;
+}
+
diff --git a/ossim/src/ossim/support_data/ossimTiffWorld.cpp b/ossim/src/ossim/support_data/ossimTiffWorld.cpp
new file mode 100644
index 0000000..12cd7d7
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimTiffWorld.cpp
@@ -0,0 +1,269 @@
+//*******************************************************************
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Ken Melero
+// 
+// Description: Container class for a tiff world file data.
+//
+//********************************************************************
+// $Id: ossimTiffWorld.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimDirectory.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimUnitConversionTool.h>
+#include <ossim/support_data/ossimTiffWorld.h>
+#include <ossim/base/ossimNotify.h>
+#include <cmath>
+#include <fstream>
+#include <iomanip>
+#include <iostream>
+using namespace std;
+
+//**************************************************************************
+// ossimTiffWorld::ossimTiffWorld()
+//***************************************************************************
+ossimTiffWorld::ossimTiffWorld()
+   :
+      theXform1(1.0),
+      theXform2(0.0),
+      theXform3(0.0),
+      theXform4(-1.0),
+      theTranslation(0.0,0.0),
+      thePixelType(OSSIM_PIXEL_IS_AREA),
+      theUnit(OSSIM_METERS),
+      theComputedScale(0.0, 0.0),
+      theComputedRotation(0.0)
+{}
+
+//**************************************************************************
+// ossimTiffWorld::ossimTiffWorld(const char* file, PixelType ptype)
+//***************************************************************************
+ossimTiffWorld::ossimTiffWorld(const char* file, 
+			       ossimPixelType ptype,
+			       ossimUnitType  scaleUnits)
+   :
+      theXform1(1.0),
+      theXform2(0.0),
+      theXform3(0.0),
+      theXform4(-1.0),
+      theTranslation(0.0,0.0),
+      thePixelType(ptype),
+      theUnit(scaleUnits),
+      theComputedScale(0.0, 0.0),
+      theComputedRotation(0.0)
+{
+   open(ossimFilename(file), ptype, scaleUnits);
+}
+
+bool ossimTiffWorld::open(const ossimFilename& file, ossimPixelType ptype, ossimUnitType  unit)
+{
+   bool result = false;
+
+   ifstream is;
+   is.open(file.c_str());
+
+   if( !is.is_open() )
+   {
+      // ESH 07/2008, Trac #234: OSSIM is case sensitive 
+      // when using worldfile templates during ingest
+      // -- If first you don't succeed with the user-specified
+      // filename, try again with the results of a case insensitive search.
+      ossimFilename fullName(file);
+      ossimDirectory directory(fullName.path());
+      ossimFilename filename(fullName.file());
+      
+      std::vector<ossimFilename> result;
+      bool bSuccess = directory.findCaseInsensitiveEquivalents(
+         filename, result );
+      if ( bSuccess == true )
+      {
+         int numResults = (int)result.size();
+         int i;
+         for ( i=0; i<numResults && !is.is_open(); ++i )
+         {
+            is.open( result[i].c_str() );
+         }
+      }
+   }
+      
+   if ( is.is_open() )
+   {
+      double x,y;
+      is >> theXform1 >> theXform2 >> theXform3 >> theXform4 >> x >> y;
+      theTranslation = ossimDpt(x,y);
+      
+      // Compute the affine parameters from the transform:
+      theComputedRotation = atan2(theXform2,theXform1);
+      
+/*
+ * Commented out warning.
+ * Used all the time for tie and scale, NOT for affine. We could wrap around trace
+ * if we added trace to class. (drb - 20110115)
+ */
+#if 0
+      double angle2 = atan2(theXform4,theXform3);
+      if (fabs(theComputedRotation - angle2) > 0.00001)
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimTiffWorld -- Non-affine transform encountered."
+            << " Use of an affine transform to represent this world file geometry will result in errors."
+            << endl;
+      }
+#endif
+      
+      double cos_rot = cos(theComputedRotation);
+      if (cos_rot != 0.0)
+      {
+         theComputedScale.x = theXform1/cos_rot;
+         theComputedScale.y = theXform4/cos_rot;
+      }
+      else
+      {
+         theComputedScale.x = theXform4;
+         theComputedScale.y = theXform1;
+      }
+      thePixelType = ptype;
+      theUnit = unit;
+      is.close();
+      result = true;
+   }
+   return result;
+}
+
+ossimTiffWorld::~ossimTiffWorld()
+{
+}
+
+void ossimTiffWorld::forward(const ossimDpt& ip,
+                             ossimDpt& transformedPoint)
+{
+   transformedPoint.x = ip.x*theXform1 + ip.y*theXform2 + theTranslation.x;
+   transformedPoint.y = ip.x*theXform3 + ip.y*theXform4 + theTranslation.y;
+}
+
+bool ossimTiffWorld::saveToOssimGeom(ossimKeywordlist& kwl, const char* prefix)const
+{
+   ossimDpt scale(fabs(theXform1), fabs(theXform4));
+   ossimDpt tie(theTranslation.x, theTranslation.y);
+
+   if ( (theUnit == OSSIM_FEET) || (theUnit == OSSIM_US_SURVEY_FEET) )
+   {
+      // Convert to meters.
+      scale.x = ossimUnitConversionTool(scale.x, theUnit).getMeters();
+      scale.y = ossimUnitConversionTool(scale.y, theUnit).getMeters();
+      tie.x   = ossimUnitConversionTool(tie.x, theUnit).getMeters();
+      tie.y   = ossimUnitConversionTool(tie.y, theUnit).getMeters();
+   }
+   
+   // Shift the tie point to be relative to the center of the pixel.
+   if(thePixelType == OSSIM_PIXEL_IS_AREA)
+   {
+      tie.x += (scale.x/2.0);
+      tie.y -= (scale.y/2.0);
+
+      // Adjust the keyword list to reflect pixel is point.
+      kwl.add(prefix,
+              ossimKeywordNames::PIXEL_TYPE_KW,
+              "pixel_is_point",
+              true);
+   }
+
+   // Units in feet converted to meters up above.
+   ossimString units = "meters";
+   if(theUnit == OSSIM_DEGREES)
+   {
+      units = "degrees";
+   }
+   
+   kwl.add(prefix,
+           ossimKeywordNames::TIE_POINT_XY_KW,
+           tie.toString().c_str(),
+           true);
+   
+   kwl.add(prefix,
+           ossimKeywordNames::TIE_POINT_UNITS_KW,
+           units.c_str(),
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::PIXEL_SCALE_XY_KW,
+           scale.toString().c_str(),
+           true);
+
+   kwl.add(prefix,
+           ossimKeywordNames::PIXEL_SCALE_UNITS_KW,
+           units.c_str(),
+           true);
+
+   return true;
+}
+
+bool ossimTiffWorld::loadFromOssimGeom(const ossimKeywordlist& kwl, const char* prefix)
+{
+   theXform2 = 0.0;
+   theXform3 = 0.0;
+
+   const char* lookup;
+
+   // Get the scale...
+   lookup = kwl.find(prefix, ossimKeywordNames::PIXEL_SCALE_XY_KW);
+   if (lookup)
+   {
+      ossimDpt scale;
+      scale.toPoint(std::string(lookup));
+      theXform1      = scale.x;
+      theXform4      = -(scale.y);
+   }
+   else // BACKWARDS COMPATIBILITY LOOKUPS...
+   {
+      ossimString xscale = kwl.find(prefix, ossimKeywordNames::METERS_PER_PIXEL_X_KW);
+      ossimString yscale = kwl.find(prefix, ossimKeywordNames::METERS_PER_PIXEL_Y_KW);
+      theXform1 = xscale.toDouble();
+      theXform4 = -(yscale.toDouble());
+   }
+
+   // Get the tie...
+   lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_XY_KW);
+   if (lookup)
+   {
+      ossimDpt tie;
+      tie.toPoint(std::string(lookup));
+      theTranslation.x  = tie.x;
+      theTranslation.y  = tie.y;
+   }
+   else // BACKWARDS COMPATIBILITY LOOKUPS...
+   {
+      ossimString easting  =
+         kwl.find(prefix, ossimKeywordNames::TIE_POINT_EASTING_KW);
+      ossimString northing =
+         kwl.find(prefix, ossimKeywordNames::TIE_POINT_NORTHING_KW);
+      theTranslation.x  = easting.toDouble();
+      theTranslation.y  = northing.toDouble(); 
+   }
+   
+   return true;
+}
+
+std::ostream& ossimTiffWorld::print(std::ostream& out) const
+{
+   out << setiosflags(ios::fixed) << setprecision(15)
+       << theXform1     << "\n"
+       << theXform2     << "\n"
+       << theXform3     << "\n"
+       << theXform4     << "\n"
+       << theTranslation
+       << endl;
+   return out;
+}
+
+std::ostream& operator<<(std::ostream& out, const ossimTiffWorld& obj)
+{
+   return obj.print(out);
+}
+
+
diff --git a/ossim/src/ossim/support_data/ossimWavelength.cpp b/ossim/src/ossim/support_data/ossimWavelength.cpp
new file mode 100644
index 0000000..419ee08
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimWavelength.cpp
@@ -0,0 +1,204 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Class definition for ossimWavelength.
+//
+//----------------------------------------------------------------------------
+
+#include <ossim/support_data/ossimWavelength.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/support_data/ossimEnviHeader.h>
+#include <cmath>
+
+ossimWavelength::ossimWavelength()
+   : m_map()
+{}
+
+ossimWavelength::ossimWavelength( const ossimWavelength& obj )
+   : m_map( obj.m_map )
+{}
+
+const ossimWavelength& ossimWavelength::operator=( const ossimWavelength& rhs )
+{
+   if ( this != &rhs )
+   {
+      m_map = rhs.m_map;
+   }
+   return *this;   
+}
+
+ossimWavelength::~ossimWavelength()
+{
+}
+   
+const ossimWavelength::WavelengthMap& ossimWavelength::getMap() const
+{
+   return m_map;
+}
+   
+ossimWavelength::WavelengthMap& ossimWavelength::getMap()
+{
+   return m_map;
+}
+
+bool ossimWavelength::initialize( const ossimEnviHeader& hdr )
+{
+   //---
+   // Example envi wavelength format:
+   // wavelength = { 374.323608,  382.530487,  390.737427 }
+   //---
+   ossimString value;
+
+   // Check the units...
+   ossimString key = "wavelength units";
+   if ( hdr.getValue( key, value ) )
+   {
+      if ( value.downcase() == "nanometers" )
+      {
+         // Check for wavelength key:
+         key = "wavelength";
+         if ( hdr.getValue( key, value ) )
+         {
+            if ( value.size() )
+            {
+               // Split into array.
+               value.trim( ossimString("{}") );
+               std::vector<ossimString> list;
+               value.split( list, ossimString(","), true );
+
+               if ( list.size() )
+               {
+                  // Initialize the map:
+                  
+                  std::vector<ossimString>::const_iterator i = list.begin();
+                  ossim_uint32 band = 0;
+                  ossim_float32 wavelength = 0.0;
+            
+                  while ( i != list.end() )
+                  {
+                     wavelength = (*i).toFloat64();
+                     m_map.insert( std::make_pair( wavelength, band ) );
+                     ++band;
+                     ++i;
+                  }
+               }
+            }
+         }
+      }
+   }
+   
+   return ( m_map.size() ? true : false);
+   
+} // End: bool ossimWavelength::initialize(const ossimEnviHeader&)
+
+using namespace std;
+ossimWavelength::WavelengthMap::const_iterator ossimWavelength::findClosestIterator(
+   const ossim_float64& requestedWavelength,
+   const ossim_float64& thresholdFromCenter  ) const
+{
+   WavelengthMap::const_iterator result = m_map.lower_bound( requestedWavelength );
+   if ( result != m_map.end() )
+   {
+      if ( result != m_map.begin() ) //  && (result->first > requestedWavelength) )
+      {
+         // Somewhere in the middle.
+         WavelengthMap::const_iterator lower = result;
+         --lower;
+
+         ossim_float64 t = (requestedWavelength - lower->first) / (result->first -lower->first);
+         if ( t < 0.5 )
+         {
+            result = lower;
+         }
+      }
+   }
+   else
+   {
+      --result;
+   }
+      
+   if ( result != m_map.end() )
+   {
+      // Within threshold check.
+      if ( std::fabs( result->first - requestedWavelength) > thresholdFromCenter )
+      {
+         result = m_map.end();
+      }
+      
+   } // if ( result != m_map.end() )
+
+   return result;
+   
+} // End: WavelengthMap::const_iterator ossimWavelength::findClosestIterator
+
+ossim_int32 ossimWavelength::findClosestIndex(
+   const ossim_float64& requestedWavelength, const ossim_float64& thresholdFromCenter  ) const
+{
+   ossim_int32 result = -1;
+   WavelengthMap::const_iterator i =
+      findClosestIterator( requestedWavelength, thresholdFromCenter );
+   if ( i != m_map.end() )
+   {
+      result = (*i).second;
+   }
+   return result;
+   
+} // End: ossim_int32 ossimWavelength::findClosestIndex(...
+
+bool ossimWavelength::getRgbBands( std::vector<ossim_uint32>& bands ) const
+{
+   bool result = false;
+
+   if ( m_map.size() )
+   {
+      //---
+      // Attempt to find bands with closest rgb wavelengths.
+      // red:   620 - 750 nm
+      // green: 495 - 570 nm
+      // blue:  450 - 495 nm
+      //---
+      //const ossim_float32 RED_WAVELENGTH              = 439.978577; // 442.0;      
+      //const ossim_float32 GREEN_WAVELENGTH            = 546.666504; // 546.0;
+      //const ossim_float32 BLUE_WAVELENGTH             = 636.941406; // 637.0;
+      const ossim_float32 RED_WAVELENGTH              = 685.0;      
+      const ossim_float32 GREEN_WAVELENGTH            = 532.5;
+      const ossim_float32 BLUE_WAVELENGTH             = 472.5;
+      const ossim_float32 RED_THRESHOLD_FROM_CENTER   =  65.0;      
+      const ossim_float32 GREEN_THRESHOLD_FROM_CENTER =  37.5;
+      const ossim_float32 BLUE_THRESHOLD_FROM_CENTER  =  22.5;
+
+      WavelengthMap::const_iterator r =
+         findClosestIterator( RED_WAVELENGTH, RED_THRESHOLD_FROM_CENTER );
+      WavelengthMap::const_iterator g =
+         findClosestIterator( GREEN_WAVELENGTH, GREEN_THRESHOLD_FROM_CENTER );
+      WavelengthMap::const_iterator b =
+         findClosestIterator( BLUE_WAVELENGTH, BLUE_THRESHOLD_FROM_CENTER );
+
+      if ( (r != m_map.end()) && (g != m_map.end()) && (b != m_map.end()) )
+      {
+         bands.resize(3);
+         bands[0] = (*r).second;
+         bands[1] = (*g).second;
+         bands[2] = (*b).second;
+         result = true;
+      }
+   }
+   return result;
+   
+} // bool ossimWavelength::getRgbBands( std::vector<ossim_uint32>& ) const
+
+ossimWavelength::WavelengthMap::const_iterator ossimWavelength::end() const
+{
+   return m_map.end();
+}
+
+ossimWavelength::WavelengthMap::iterator ossimWavelength::end()
+{
+   return m_map.end();
+}
+
diff --git a/ossim/src/ossim/support_data/ossimWkt.cpp b/ossim/src/ossim/support_data/ossimWkt.cpp
new file mode 100644
index 0000000..fc30aa1
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimWkt.cpp
@@ -0,0 +1,274 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// ossimWkt class definition.  A well known text(WKT) utility class.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+/*************************************************************************************************
+ * Sample WKT string (for reference, line feeds and spaces added for human readability)
+ *
+ * PROJCS["NAD_1983_HARN_Lambert_Conformal_Conic",
+ *        GEOGCS["GCS_North_American_1983_HARN",
+ *               DATUM["NAD83_High_Accuracy_Regional_Network",
+ *                     SPHEROID["GRS_1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]],
+ *                     AUTHORITY["EPSG","6152"]],
+ *               PRIMEM["Greenwich",0],
+ *               UNIT["degree",0.0174532925199433]],
+ *        PROJECTION["Lambert_Conformal_Conic_2SP"],
+ *        PARAMETER["standard_parallel_1",43],
+ *        PARAMETER["standard_parallel_2",45.5],
+ *        PARAMETER["latitude_of_origin",41.75],
+ *        PARAMETER["central_meridian",-120.5],
+ *        PARAMETER["false_easting",1312335.958005249],
+ *        PARAMETER["false_northing",0],
+ *        UNIT["foot",0.3048, AUTHORITY["EPSG","9002"]]]
+ *
+ **************************************************************************************************/
+#include <ossim/support_data/ossimWkt.h>
+#include <cstdio>
+#include <iostream>
+#include <sstream>
+
+using namespace std; // tmp drb...
+
+ossimWkt::ossimWkt()
+   : m_kwl()
+{
+}
+
+ossimWkt::~ossimWkt()
+{
+}
+
+bool ossimWkt::parse( const std::string& wkt )
+{
+   bool result = false;
+   if ( wkt.size() )
+   {
+      std::istringstream is( wkt );
+      result = parseWktGroup( is, m_kwl );
+   }
+   return result;
+}
+
+const ossimKeywordlist& ossimWkt::getKwl() const
+{
+   return m_kwl;
+}
+
+bool ossimWkt::parseWktGroup( std::istringstream& is, ossimKeywordlist& kwl )
+{
+   bool result = false;
+
+   if ( is.good() )
+   {
+      char c;
+
+      // Get the wkt group name up to '[', e.g. "PROJCS[".
+      std::string prefix = "";      
+      std::string object;
+      // std::string v;
+      while ( is.good() )
+      {
+         is.get(c);
+         if ( is.good() )
+         {
+            // Look for parens or square brackets.
+            if ( (c != '[') && (c != '(') )
+            {
+               object.push_back(c);
+            }
+            else
+            {
+               result = parseObject( is, prefix, object, kwl );
+            }
+         }
+         else
+         {
+            break;
+         }
+      }
+   }
+   
+   return result;
+}
+
+bool ossimWkt::parseObject( std::istringstream& is,
+                            const std::string& prefix,
+                            const std::string& object,
+                            ossimKeywordlist& kwl )
+{
+   bool result = false;
+
+   result = parseName( is, prefix, object, kwl );
+
+   if ( result && is.good() )
+   {
+      char c;
+      ossim_uint32 myObjectIndex = 0;
+      ossim_uint32 paramIndex = 0;
+      while ( is.good() )
+      {
+         is.get(c);
+         if ( is.good() )
+         {  
+            if ( c == ',' )
+            {
+               parseParam( is, prefix, object, myObjectIndex, paramIndex, kwl );
+            }
+            else if ( (c == ']') || (c == ')') )
+            {
+               break; // End of object.
+            }
+         }
+      }
+      
+   }
+   
+   return result;
+}
+
+bool ossimWkt::parseName( std::istringstream& is,
+                          const std::string& prefix,
+                          const std::string& object,
+                          ossimKeywordlist& kwl )
+{
+   bool result = false;
+   char c;
+   std::string name;
+
+   // Find the first quote:
+   while ( is.good() )
+   {
+      is.get(c);
+      if ( is.good() )
+      {  
+         if ( c == '"' )
+         {
+            break;
+         }
+      }
+   }
+
+   // Get the name:
+   while ( is.good() )
+   {
+      is.get(c);
+      if ( is.good() )
+      {  
+         if ( c != '"' )
+         {
+            name.push_back(c);
+         }
+         else
+         {
+            break; // End quote:
+         }
+      }
+   }
+
+   if ( name.size() )
+   {
+      // Add to keyword list.
+      std::string key;
+      if ( prefix.size() )
+      {
+         key += prefix;
+      }
+      key += object;
+      key += ".name";
+      kwl.addPair( key, name );
+      result = true;
+   }
+   
+   return result;
+}
+
+bool ossimWkt::parseParam( std::istringstream& is,
+                           const std::string& prefix,
+                           const std::string& object,
+                           ossim_uint32& objectIndex,
+                           ossim_uint32& paramIndex,
+                           ossimKeywordlist& kwl )
+{
+   bool result = false;
+   char c;
+   std::string name;
+
+   // Get the name:
+   while ( is.good() )
+   {
+      int i = is.peek(); // Don't gobble the trailing comma or bracket.
+      
+      if ( (i == ',') || (i == ']') || (i == ')') )
+      {
+         // End of param.
+         if ( name.size() )
+         {
+            // Add to keyword list.
+            std::string key;
+            if ( prefix.size() )
+            {
+               key += prefix;
+            }
+            key += object;
+            key += ".param";
+            key += ossimString::toString(paramIndex).string();
+            kwl.addPair( key, name );
+            name = "";
+            ++paramIndex;
+            result = true;
+         }
+         
+         break; // Next param or at end of object.
+      }
+
+      is.get(c);
+      if ( is.good() )
+      {
+         // Look nexted object.
+         if ( (c == '[') || (c == '(') )
+         {
+            std::string myPrefix;
+            if ( prefix.size() )
+            {
+               myPrefix += prefix;
+            }
+            
+            myPrefix += object;
+
+            myPrefix += ".";
+
+            //---
+            // Special hack for duplicated keyword "PARAMETER"
+            //---
+            if ( name == "PARAMETER" )
+            {
+               name += ossimString::toString(objectIndex).string();
+               ++objectIndex;
+            }
+
+            result = parseObject( is, myPrefix, name, kwl );
+
+            name = "";
+         }
+         else
+         {
+            name.push_back(c);
+         }
+      }
+   }
+   
+   return result;
+}
+
+
diff --git a/ossim/src/ossim/support_data/ossimXmpInfo.cpp b/ossim/src/ossim/support_data/ossimXmpInfo.cpp
new file mode 100644
index 0000000..93243fd
--- /dev/null
+++ b/ossim/src/ossim/support_data/ossimXmpInfo.cpp
@@ -0,0 +1,645 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Extensible Metadata Platform (XMP) Info object.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/support_data/ossimXmpInfo.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimEndian.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimXmlDocument.h>
+#include <ossim/base/ossimXmlNode.h>
+#include <ossim/projection/ossimBilinearProjection.h>
+#include <ossim/projection/ossimProjection.h>
+#include <fstream>
+#include <iomanip>
+#include <iostream>
+#include <sstream>
+#include <vector>
+
+// Static trace for debugging.
+static const ossimTrace traceDebug( ossimString("ossimXmpInfo:debug") );
+
+ossimXmpInfo::ossimXmpInfo()
+   : ossimInfoBase(),
+     m_file(),
+     m_xmpApp1XmlBlock()
+{
+}
+
+ossimXmpInfo::~ossimXmpInfo()
+{
+}
+
+bool ossimXmpInfo::open(const ossimFilename& file)
+{
+   //---
+   // NOTE:
+   // This parser was written for a specific aerial camera.  If something more generic is
+   // needed please provide sample to the group. D. Burken, 17 January 2013.
+   //---
+   
+   bool result = false;
+
+   //---
+   // Open the file.
+   //---
+   std::ifstream str(file.c_str(), std::ios_base::binary|std::ios_base::in);
+   if ( str.good() ) 
+   {
+      // Parse for XMP APP1 XML block. Currently only case.
+      std::string xmlString;
+      result = getXmpApp1XmlBlock( str, xmlString );
+      if ( result )
+      {
+         m_file = file;
+         m_xmpApp1XmlBlock = xmlString;
+      }
+      else
+      {
+         m_file.clear();
+         m_xmpApp1XmlBlock.clear();
+      }
+   }
+
+   return result;
+}
+
+bool ossimXmpInfo::getXmpApp1XmlBlock( std::ifstream& str, std::string& xmpApp1XmlBlock ) const
+{
+   bool result = false;
+
+   if ( str.good() )
+   {
+      ossim_uint8 c;
+      
+      // Look for Start Of Image (SOI) marker 0xFFD8:
+      str.read( (char*)&c, 1);
+      if ( c == 0xff )
+      {
+         str.read( (char*)&c, 1);
+         if ( c == 0xd8 )
+         {
+            // Found SOI marker.
+            
+            // Now find APP1 marker 0xffe1.  Only do 24 iterations max:
+            for ( ossim_uint32 i = 0; i < 24; ++i )
+            {
+               str.read( (char*)&c, 1);
+               if ( c == 0xff )
+               {
+                  str.read( (char*)&c, 1);
+                  if ( c == 0xe1 )
+                  {
+                     // Found APP1 marker.
+                     
+                     //---
+                     // Next two bytes are the length, MSB first (big endian) per jpeg spec.
+                     // length = 2 + 29 + length_of_xmp_packet
+                     //---
+                     ossim_uint16 xpacketLength = 0;
+                     str.read( (char*)&xpacketLength, 2 );
+                     
+                     // See if system is not big endian and swap if needed.
+                     if ( ossim::byteOrder() != OSSIM_BIG_ENDIAN )
+                     {
+                        ossimEndian swapper;
+                        swapper.swap( xpacketLength );
+                     }
+                     
+                     if ( xpacketLength > 31 )
+                     {
+                        //---
+                        // XMP namepsace URI, used as unique ID:
+                        // Null terminated ascii string: "http://ns.adobe.com/xap/1.0/"
+                        // (29 bytes)
+                        // Not using getline until ID verified.
+                        //---
+                        const ossim_uint32 XMP_ID_SIZE = 29;
+                        std::vector<char> v( XMP_ID_SIZE );
+                        
+                        // Read the next 29 bytes.  (string + null)
+                        str.read( &v.front(), XMP_ID_SIZE );
+                        
+                        // Copy.
+                        v.push_back( '\0' ); // Just in case string is bad.
+                        std::string s = &v.front();
+                        
+                        if ( s == "http://ns.adobe.com/xap/1.0/" )
+                        {
+                           //---
+                           // Now read header to determine encoding:
+                           // Note: Currently hard coded for UTF-8.
+                           //---
+                           
+                           //---
+                           // Look for "<?xpacket begin="
+                           // Line has binary data in it or getline could be used.
+                           //---
+                           const ossim_uint32 HEADER_SIZE = 16;
+                           v.resize( HEADER_SIZE );
+                           str.read( &v.front(), HEADER_SIZE );
+                           
+                           v.push_back( '\0' ); // Null terminate.
+                           s = &v.front();
+                           
+                           if ( s == "<?xpacket begin=" )
+                           {
+                              // Skip the quote which can be single or double.
+                              str.seekg( 1, std::ios_base::cur );
+                              
+                              // Now look for 0xEF, 0xBB, 0xBF which is UTF-8
+                              ossim_uint8 encode_bytes[3];
+                              str.read( (char*)encode_bytes, 3 );
+                              
+                              if ( ( encode_bytes[0] == 0xef ) &&
+                                   ( encode_bytes[1] == 0xbb ) &&
+                                   ( encode_bytes[2] == 0xbf ) )
+                              {
+                                 // Skip the next six bytes: "' id='"
+                                 str.seekg( 6, std::ios_base::cur );
+                                 
+                                 // Read the ID: W5M0MpCehiHzreSzNTczkc9d
+                                 const ossim_uint32 XPACKET_ID_SIZE = 24;
+                                 v.resize( XPACKET_ID_SIZE );
+                                 str.read ( &v.front(), XPACKET_ID_SIZE );
+                                 
+                                 v.push_back( '\0' ); // null terminate
+                                 s = &v.front();
+                                 
+                                 if ( s == "W5M0MpCehiHzreSzNTczkc9d" )
+                                 {
+                                    //---
+                                    // Gobble the rest of the line. No more binary characters
+                                    // so just use getline.
+                                    //---
+                                    std::getline( str, s );
+                                    
+                                    // Read in the xml string (single line):
+                                    std::getline( str, xmpApp1XmlBlock );
+                                    
+                                    if ( xmpApp1XmlBlock.size() )
+                                    {
+                                       result = true;
+                                    }
+                                 }
+                              }
+                              
+                           } // Matches: if ( s == "<?xpacket begin=" )
+                           
+                        } // Matches: if ( s == "http://ns.adobe.com/xap/1.0/" )
+                        
+                     } // Matches: if ( xpacketLength > 31 )
+                  
+                  } // Matches: if ( c == 0xd8 )
+                  
+               } // Matches: if ( c == 0xff )
+               
+            } // Matches: for ( ossim_uint32 i; i < 24; ++i )
+            
+         } // Matches: if ( c == 0xd8 )
+         
+      } // Matches: if ( c == 0xff )
+      
+   } // Matches: if ( str.good() ) 
+
+   return result;
+   
+} // End: ossimXmpInfo::getXmpApp1XmlBlock
+
+std::ostream& ossimXmpInfo::print(std::ostream& out) const
+{
+   if ( getXmpApp1XmlBlock().size() )
+   {
+      std::string prefix = "";
+      std::string ext = m_file.ext().downcase().string();
+      if ( ( ext == "jpg" ) || ( ext == "jpeg" ) )
+      {
+         prefix = "jpeg.";
+      }
+      
+      std::string s;
+
+      // Date:
+      getDate( s );
+      if ( s.size() )
+      {
+         out << prefix << "acquisitionDate: " << s << std::endl;
+      }      
+      
+      // Mission ID:
+      getMissionId( s );
+      if ( s.size() )
+      {
+         out << prefix << "missionId: " << s << std::endl;
+      }
+
+      // Sensor ID:
+      getSensorId( s );
+      if ( s.size() )
+      {
+         out << prefix << "sensorId: " << s << std::endl;
+      }
+      
+      out << prefix << "xmp.app1.xml: " << getXmpApp1XmlBlock() << std::endl;
+      
+   }
+   return out;
+
+} // End: std::ostream& ossimXmpInfo::print(std::ostream& out) const
+
+const std::string& ossimXmpInfo::getXmpApp1XmlBlock() const
+{
+   return m_xmpApp1XmlBlock;
+}
+
+ossimRefPtr<ossimProjection> ossimXmpInfo::getProjection( const ossimDrect& imageRect ) const
+{
+   ossimRefPtr<ossimProjection> result = 0;
+
+   if ( getXmpApp1XmlBlock().size() && ( imageRect.hasNans() == false ) )
+   {
+      // Open a stream to the xml block.
+      std::istringstream is;
+      is.str( m_xmpApp1XmlBlock );
+
+      ossimXmlDocument xmlDoc;
+
+      // Read the xml document:
+      if ( xmlDoc.read( is ) )
+      {
+         // Find the four corner ground points.
+         ossimString s;
+         ossimString path;
+         ossimGpt ulg;
+         ossimGpt urg;
+         ossimGpt lrg;
+         ossimGpt llg;
+         bool foundAll = false;
+
+         while ( 1 )
+         {
+            // Upper left:
+            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:UL_Latitude";
+            if ( getPath( path, xmlDoc, s ) )
+            {
+               ulg.lat = s.toFloat64();
+            }
+            else
+            {
+               break;
+            }
+            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:UL_Longitude";
+            if ( getPath( path, xmlDoc, s ) )
+            {
+               ulg.lon = s.toFloat64();
+            }
+            else
+            {
+               break;
+            }
+
+            // Upper right:
+            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:UR_Latitude";
+            if ( getPath( path, xmlDoc, s ) )
+            {
+               urg.lat = s.toFloat64();
+            }
+            else
+            {
+               break;
+            }
+            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:UR_Longitude";
+            if ( getPath( path, xmlDoc, s ) )
+            {
+               urg.lon = s.toFloat64();
+            }
+            else
+            {
+               break;
+            }
+            
+            // Lower right:
+            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:LR_Latitude";
+            if ( getPath( path, xmlDoc, s ) )
+            {
+               lrg.lat = s.toFloat64();
+            }
+            else
+            {
+               break;
+            }
+            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:LR_Longitude";
+            if ( getPath( path, xmlDoc, s ) )
+            {
+               lrg.lon = s.toFloat64();
+            }
+            else
+            {
+               break;
+            }
+            
+            // Lower left:
+            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:LL_Latitude";
+            if ( getPath( path, xmlDoc, s ) )
+            {
+               llg.lat = s.toFloat64();
+            }
+            else
+            {
+               break;
+            }
+            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:LL_Longitude";
+            if ( getPath( path, xmlDoc, s ) )
+            {
+               llg.lon = s.toFloat64();
+
+               // If we get here mark the status good:
+               foundAll = true;
+            }
+            else
+            {
+               break;
+            }
+
+            //---
+            // Final trailing break out of infinite loop.
+            // No code past this point if while loop.
+            //---
+            break;
+         }
+
+         if ( foundAll )
+         {
+            result = new ossimBilinearProjection( imageRect.ul(),
+                                                  imageRect.ur(),
+                                                  imageRect.lr(),
+                                                  imageRect.ll(),
+                                                  ulg,
+                                                  urg,
+                                                  lrg,
+                                                  llg );
+         }
+         
+      } // Matches: if ( xmlDoc.read( is ) )
+      
+   } // Matches: if ( getXmpApp1XmlBlock().size() )
+   
+   return result;
+   
+} // End: ossimXmpInfo::getProjection
+
+void  ossimXmpInfo::getDate( std::string& date ) const
+{
+   date.clear();
+   
+   if ( getXmpApp1XmlBlock().size() )
+   {
+      // Open a stream to the xml block.
+      std::istringstream is;
+      is.str( m_xmpApp1XmlBlock );
+      
+      ossimXmlDocument xmlDoc;
+      
+      // Read the xml document:
+      if ( xmlDoc.read( is ) )
+      {
+         //---
+         // ISO8601 date in the form of: YYYY-MM-DDThh:mm:ss.sssZ
+         // Find the four corner ground points.
+         //---
+         ossimString s;
+         ossimString path;
+         std::string year;
+         std::string month;
+         std::string dayOfMonth;
+         std::string hour;
+         std::string minute;
+         std::string second;
+         std::string milliSecond;
+         
+         bool foundAll = false;
+
+         while ( 1 )
+         {
+            // year:
+            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:IRIG_Year";
+            if ( getPath( path, xmlDoc, s ) )
+            {
+               year = s.string();
+            }
+            else
+            {
+               break;
+            }
+            // month:
+            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:IRIG_Month";
+            if ( getPath( path, xmlDoc, s ) )
+            {
+               month = s.string();
+            }
+            else
+            {
+               break;
+            }
+            
+            // day of month:
+            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:IRIG_Day_of_Month";
+            if ( getPath( path, xmlDoc, s ) )
+            {
+               dayOfMonth = s.string();
+            }
+            else
+            {
+               break;
+            }
+            
+            // hour:
+            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:IRIG_Hour";
+            if ( getPath( path, xmlDoc, s ) )
+            {
+               hour = s.string();
+            }
+            else
+            {
+               break;
+            }
+            
+            // minute:
+            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:IRIG_Min";
+            if ( getPath( path, xmlDoc, s ) )
+            {
+               minute = s.string();
+            }
+            else
+            {
+               break;
+            }
+            
+            // second:
+            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:IRIG_Sec";
+            if ( getPath( path, xmlDoc, s ) )
+            {
+               second = s.string();
+            }
+            else
+            {
+               break;
+            }
+            
+            // millisecond:
+            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:IRIG_Msec";
+            if ( getPath( path, xmlDoc, s ) )
+            {
+               milliSecond = s.string();
+            }
+            else
+            {
+               break;
+            }
+
+            // If we get here mark the status good for downstream code.
+            foundAll = true;
+            
+            //---
+            // Final trailing break out of infinite loop.
+            // No code past this point if while loop.
+            //---
+            break;
+
+         } // End: while ( 1 )
+         
+         if ( foundAll )
+         {
+            date = year + "-"; // Assuming year in 4 digit form, e.g. 2013.
+
+            // Month two digit wide.
+            std::ostringstream os1;
+            os1 << std::setiosflags(std::ios_base::fixed|std::ios_base::right) 
+                << std::setfill('0')
+                << std::setw(2)
+                << month;
+            date += os1.str() + "-";
+
+            // Day two digit wide.
+            std::ostringstream os2;
+            os2 << std::setiosflags(std::ios_base::fixed|std::ios_base::right) 
+                << std::setfill('0')
+                << std::setw(2)
+                << dayOfMonth;
+            date += os2.str() + "T";
+
+            // Hour two digit wide.
+            std::ostringstream os3;
+            os3 << std::setiosflags(std::ios_base::fixed|std::ios_base::right) 
+                << std::setfill('0')
+                << std::setw(2)
+                << hour;
+            date += os3.str() + ":";
+
+            // Minute two digit wide.
+            std::ostringstream os4;
+            os4 << std::setiosflags(std::ios_base::fixed|std::ios_base::right) 
+                << std::setfill('0')
+                << std::setw(2)
+                << minute;
+            date += os4.str() + ":";
+
+            // Second two digit wide.
+            std::ostringstream os5;
+            os5 << std::setiosflags(std::ios_base::fixed|std::ios_base::right) 
+                << std::setfill('0')
+                << std::setw(2)
+                << second;
+            date += os5.str() + ".";
+
+             // Milli second three digit wide.
+            std::ostringstream os6;
+            os6 << std::setiosflags(std::ios_base::fixed|std::ios_base::right) 
+                << std::setfill('0')
+                << std::setw(3)
+                << milliSecond;
+            date += os6.str() + "Z"; // Assumption...
+         }
+         
+      } // Matches: if ( xmlDoc.read( is ) )
+      
+   } // Matches: if ( getXmpApp1XmlBlock().size() )
+   
+} // End: void  ossimXmpInfo::getDate( std::string& date ) const
+
+
+void ossimXmpInfo::getMissionId( std::string& mission ) const
+{
+   // Currently nothing in sample data to grab so using mission "x".
+   mission = "x";
+}
+
+void ossimXmpInfo::getSensorId( std::string& sensor ) const
+{
+   // Currently nothing in sample data to grab so using sensor "x".
+   sensor = "x";
+}
+
+bool ossimXmpInfo::getPath(
+   const ossimString& path, const ossimXmlDocument& xdoc, ossimString& s) const
+{
+   bool result = false;
+
+   std::vector<ossimRefPtr<ossimXmlNode> > xnodes;
+   xdoc.findNodes(path, xnodes);
+   if ( xnodes.size() == 1 ) // Error if more than one.
+   {
+      if ( xnodes[0].valid() )
+      {
+         s = xnodes[0]->getText();
+         result = true;
+      }
+      else if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimXmpInfo::getPath ERROR:\n"
+            << "Node not found: " << path
+            << std::endl;
+      }
+   }
+   else if ( xnodes.size() == 0 )
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimXmpInfo::getPath ERROR:\n"
+            << "Node not found: " << path
+            << std::endl;
+      }
+   }
+   else
+   {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimXmpInfo::getPath ERROR:\n"
+            << "Multiple nodes found: " << path
+            << std::endl;
+      }
+   }
+
+   if (!result)
+   {
+      s.clear();
+   }
+   return result;
+   
+} // bool ossimXmpInfo::getPath
+
+
diff --git a/ossim/src/ossim/util/ossimAutRegUtil.cpp b/ossim/src/ossim/util/ossimAutRegUtil.cpp
new file mode 100644
index 0000000..1cc5cf6
--- /dev/null
+++ b/ossim/src/ossim/util/ossimAutRegUtil.cpp
@@ -0,0 +1,1747 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimAutRegUtil.cpp
+//
+// License: MIT
+// 
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Hicks
+//
+// Description: Utility class for autonomous registration operations.
+//
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/util/ossimAutRegUtil.h>
+
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimConnectableObject.h>
+#include <ossim/base/ossimDate.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimProperty.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimVisitor.h>
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/base/ossimTieMeasurementGeneratorInterface.h>
+#include <ossim/base/ossimAdjustmentExecutive.h>
+#include <ossim/base/ossimPointObservation.h>
+#include <ossim/base/ossimObservationSet.h>
+
+#include <ossim/elevation/ossimElevManager.h>
+#include <ossim/projection/ossimImageViewAffineTransform.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/init/ossimInit.h>
+
+#include <iostream>
+
+static ossimTrace traceDebug ("ossimAutRegUtil:debug");
+static ossimTrace traceLog("ossimAutRegUtil:log");
+static ossimTrace traceOptions("ossimAutRegUtil:options");
+
+static const std::string APPLICATION_NAME_KW            = "application_name";
+static const std::string ADJ_DESC_LABEL_KW              = "adj_desc_label";
+static const std::string FALSE_KW                       = "false";
+static const std::string IMG_1_KW                       = "img_1";
+static const std::string IMG_2_KW                       = "img_2";
+static const std::string IMG_M_KW                       = "img_m"; // master
+static const std::string IMG_S_KW                       = "img_s"; // slave
+static const std::string OP_KW                          = "operation";
+static const std::string SRC_FILE_KW                    = "src_file";
+static const std::string TRUE_KW                        = "true";
+static const std::string ROI_CENTER_LAT_KW              = "roi_center_lat";
+static const std::string ROI_CENTER_LON_KW              = "roi_center_lon";
+static const std::string ROI_RADIUS_KW                  = "roi_radius";  // meters
+static const std::string ROI_HEIGHT_KW                  = "roi_height";  // pixels
+static const std::string ROI_MAX_LAT_KW                 = "roi_max_lat";
+static const std::string ROI_MAX_LON_KW                 = "roi_max_lon";
+static const std::string ROI_MIN_LAT_KW                 = "roi_min_lat";
+static const std::string ROI_MIN_LON_KW                 = "roi_min_lon";
+static const std::string ROI_WIDTH_KW                   = "roi_width";   // pixels
+static const std::string REPORT_FILE_KW                 = "report_file";
+        
+static const std::string FILE_KW                 = "file";
+static const std::string IMG_KW                  = "image";
+static const std::string READER_PROPERTY_KW      = "reader_property";
+
+static const std::string OCV_CONFIG_FILE_KW             = "ocv_config_file";
+static const std::string OCV_DETECTOR_NAME_KW           = "ocv_detector_name";
+static const std::string OCV_DRAW_MATCHES_FLAG_KW       = "ocv_draw_matches_flag";
+static const std::string OCV_EXTRACTOR_NAME_KW          = "ocv_extractor_name";
+static const std::string OCV_MATCHER_NAME_KW            = "ocv_matcher_name";
+static const std::string OCV_MAX_MATCHES_KW             = "ocv_max_matches";
+static const std::string OCV_USE_CROSS_CHECK_KW         = "ocv_use_cross_check";
+static const std::string OCV_USE_GRID_ADAPTED_DETECT_KW = "ocv_use_grid_adapted_detect";
+static const std::string OCV_RESULTS_WINDOW_SHOW_KW     = "ocv_results_window_show";//????
+
+static const std::string OAX_CONFIG_FILE_KW             = "oax_config_file";
+static const std::string OAX_CONVERGENCE_CRITERIA_KW    = "oax_convergence_criteria";
+static const std::string OAX_GROUND_SIGMA_KW            = "oax_ground_sigma";
+static const std::string OAX_LAT_SIGMA_KW               = "oax_lat_sigma";
+static const std::string OAX_LON_SIGMA_KW               = "oax_lon_sigma";
+static const std::string OAX_HGT_SIGMA_KW               = "oax_hgt_sigma";
+static const std::string OAX_CONTROL_SIGMA_KW           = "oax_control_sigma";
+static const std::string OAX_MAX_ITERATIONS_KW          = "oax_max_iterations";
+
+
+//*****************************************************************************
+//  METHOD: ossimAutRegUtil::ossimAutRegUtil()
+//  
+//  Constructor.
+//*****************************************************************************
+ossimAutRegUtil::ossimAutRegUtil()
+   : ossimReferenced(),
+     m_tGen(0),
+     m_tGenObj(0),
+     m_roiRects(),
+     m_showMatchWindow(false),
+     m_adjExec(0),
+     m_obsSet(0),
+     m_LatLonHgtSigmas(),
+     m_LatLonHgtControlSigmas(),
+     m_rep(0),
+     m_imgLayer(0),
+     m_kwl(new ossimKeywordlist()),
+     m_ocvKwl(0),
+     m_oaxKwl(0),
+     m_srcKwl(0),
+     m_operation(OSSIM_AUTREG_OP_UNKNOWN)
+{
+   // traceDebug.setTraceFlag(true);
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "\nossimAutRegUtil::ossimAutRegUtil 1 DEBUG:" << std::endl;
+   }
+
+   // Default tie point ground sigmas
+   m_LatLonHgtSigmas[0] = 50.0;
+   m_LatLonHgtSigmas[1] = 50.0;
+   m_LatLonHgtSigmas[2] = 50.0;
+
+   // Default control point ground sigmas
+   m_LatLonHgtControlSigmas[0] = 1.0;
+   m_LatLonHgtControlSigmas[1] = 1.0;
+   m_LatLonHgtControlSigmas[2] = 1.0;
+
+   // ossimImageGeometry
+   m_geom[0] = 0;
+   m_geom[1] = 0;
+
+   // Default control image flags
+   m_controlImage[0] = false;
+   m_controlImage[1] = false;
+
+
+   m_kwl->setExpandEnvVarsFlag(true);
+
+}
+
+// Private/hidden
+ossimAutRegUtil::ossimAutRegUtil( const ossimAutRegUtil& /* obj */ )
+{
+}
+
+// Private/hidden
+const ossimAutRegUtil& ossimAutRegUtil::operator=( const ossimAutRegUtil& /* rhs */)
+{
+   return *this;
+}
+
+
+//*****************************************************************************
+//  DESTRUCTOR: ~ossimAutRegUtil()
+//*****************************************************************************
+ossimAutRegUtil::~ossimAutRegUtil()
+{
+   
+   if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG)
+      << "DEBUG: ~ossimAutRegUtil(): entered..." << std::endl;
+
+   clear();
+
+   *m_rep << "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
+   *m_rep << endl;
+
+   if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG)
+      << "DEBUG: ~ossimAutRegUtil(): returning..." << std::endl;
+}
+
+
+void ossimAutRegUtil::addArguments(ossimArgumentParser& ap)
+{
+   ossimString usageString = ap.getApplicationName();
+   usageString += " [option]... [input-option]... -img_1 <input-file 1> -img_2 <input-file 2>\n\nAvailable traces:\n-T \"ossimAutRegUtil:debug\"   - General debug trace to standard out.\n-T \"ossimAutRegUtil:log\"     - Writes a log file to output-file.log.\n-T \"ossimAutRegUtil:options\" - Writes the options to output-file-options.kwl.";
+
+   ossimApplicationUsage* au = ap.getApplicationUsage();
+   
+   au->setCommandLineUsage(usageString);
+    
+   au->setDescription(ap.getApplicationName()+": Utility application for autonomous image registration.");
+
+   au->addCommandLineOption("-h or --help", "Display this help and exit.");
+
+   au->addCommandLineOption("--quality", "<quality>\nNOT WORKING... Desired quality of tiepoint collection.\nRange: 1 to 5, Default = 3");
+   
+   au->addCommandLineOption("--roi-center-llwh","<latitude> <longitude> <width> <height>\nSpecify the center ROI in latitude longitude space with width and height in pixels.");
+
+   au->addCommandLineOption("--roi-center-llr","<latitude> <longitude> <radius_in_meters>\nSpecify the center ROI in latitude longitude space with radius in meters.");
+
+   au->addCommandLineOption("--ocv_config_file","<file_path>\nSpecify a keyword list OpenCV configuration file.");
+
+   au->addCommandLineOption("--oax_config_file","<file_path>\nSpecify a keyword list oax configuration file.");
+
+   
+} // End: ossimAutRegUtil::addArguments
+
+
+void ossimAutRegUtil::clear()
+{
+   // Must disconnect chains so that they destroy.
+   std::vector< ossimRefPtr<ossimSingleImageChain> >::iterator i = m_imgLayer.begin();
+   while ( i != m_imgLayer.end() )
+   {
+      (*i)->disconnect();
+      (*i) = 0;
+      ++i;
+   }
+   m_imgLayer.clear();
+
+   // i = m_demLayer.begin();
+   // while ( i != m_demLayer.end() )
+   // {
+   //    (*i)->disconnect();
+   //    (*i) = 0;
+   //    ++i;
+   // }
+   // m_demLayer.clear();
+}
+
+bool ossimAutRegUtil::initialize(ossimArgumentParser& ap)
+{
+   static const char MODULE[] = "ossimAutRegUtil::initialize(ossimArgumentParser&)";
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   clear();
+   if( ap.read("-h") || ap.read("--help") || (ap.argc() == 1) )
+   {
+      usage(ap);
+      
+      return false; // Indicates process should be terminated to caller.
+   }
+
+   // Start with clean options keyword list.
+   m_kwl->clear();
+
+   std::string tempString1;
+   ossimArgumentParser::ossimParameter stringParam1(tempString1);
+   std::string tempString2;
+   ossimArgumentParser::ossimParameter stringParam2(tempString2);
+   std::string tempString3;
+   ossimArgumentParser::ossimParameter stringParam3(tempString3);
+   std::string tempString4;
+   ossimArgumentParser::ossimParameter stringParam4(tempString4);
+
+   double tempDouble1;
+   ossimArgumentParser::ossimParameter doubleParam1(tempDouble1);
+   double tempDouble2;
+   ossimArgumentParser::ossimParameter doubleParam2(tempDouble2);
+
+   ossimString key = "";
+   
+   // Extract arguments and stuff them in a keyword list.
+   if( ap.read("--report_file", stringParam1) )
+   {
+      m_kwl->addPair( std::string(REPORT_FILE_KW), tempString1 );
+   }
+
+   // report file
+   if( ap.read("--quality", stringParam1) )
+   {
+      m_kwl->addPair( std::string(ossimKeywordNames::QUALITY_KW), tempString1 );
+   }
+
+   // operation
+   if( ap.read("--op", stringParam1) )
+   {
+      m_kwl->addPair( OP_KW, tempString1 );
+   }
+
+   // image 1
+   if( ap.read("--img_1", stringParam1))
+   {
+      m_kwl->addPair( std::string(IMG_1_KW), tempString1 );
+   }
+
+   // image 2
+   if( ap.read("--img_2", stringParam1))
+   {
+     m_kwl->addPair( std::string(IMG_2_KW), tempString1 );
+   }
+
+   // master image
+   if( ap.read("--img_m", stringParam1))
+   {
+      m_kwl->addPair( std::string(IMG_M_KW), tempString1 );
+   }
+
+   // slave image
+   if( ap.read("--img_s", stringParam1))
+   {
+     m_kwl->addPair( std::string(IMG_S_KW), tempString1 );
+   }
+
+   // OpenCV config
+   if( ap.read("--ocv_config_file", stringParam1))
+   {
+     m_kwl->addPair( std::string(OCV_CONFIG_FILE_KW), tempString1 );
+   }
+
+   // oax config
+   if( ap.read("--oax_config_file", stringParam1))
+   {
+     m_kwl->addPair( std::string(OAX_CONFIG_FILE_KW), tempString1 );
+   }
+
+   // llwh chipping parameters
+   if( ap.read("--roi-center-llwh", stringParam1, stringParam2, stringParam3, stringParam4) )
+   {
+      m_kwl->addPair( ROI_CENTER_LAT_KW, tempString1 );
+      m_kwl->addPair( ROI_CENTER_LON_KW, tempString2 );
+      m_kwl->addPair( ROI_WIDTH_KW,      tempString3 );
+      m_kwl->addPair( ROI_HEIGHT_KW,     tempString4 );
+   }
+
+   // llr chipping parameters
+   if( ap.read("--roi-center-llr", stringParam1, stringParam2, stringParam3) )
+   {
+      m_kwl->addPair( ROI_CENTER_LAT_KW, tempString1 );
+      m_kwl->addPair( ROI_CENTER_LON_KW, tempString2 );
+      m_kwl->addPair( ROI_RADIUS_KW,     tempString3 );
+   }
+
+   // TODO Necessary???
+   if( ap.read("--input-src", stringParam1) )
+   {
+      m_kwl->addPair( SRC_FILE_KW, tempString1 );
+   }
+
+   // TODO  For now, just an example of using ossimKeywordNames content
+   if( ap.read("--quality", stringParam1) )
+   {
+      m_kwl->addPair( std::string(ossimKeywordNames::QUALITY_KW), tempString1 );
+   }
+
+   //---
+   // Deprecated: "--options-keyword-list"
+   //---
+   if( ap.read("--options", stringParam1) )
+   {
+      ossimFilename optionsKwl = tempString1;
+      if ( optionsKwl.exists() )
+      {
+         if ( m_kwl->addFile(optionsKwl) == false )
+         {
+            std::string errMsg = "ERROR could not open options keyword list file: ";
+            errMsg += optionsKwl.string();
+            throw ossimException(errMsg);
+         }
+      }
+      else
+      {
+         std::string errMsg = "ERROR options keyword list file does not exists: ";
+         errMsg += optionsKwl.string();
+         throw ossimException(errMsg); 
+      }
+   }
+
+
+   // End of arg parsing.
+
+
+   ap.reportRemainingOptionsAsUnrecognized();
+   if ( ap.errors() )
+   {
+      ap.writeErrorMessages(ossimNotify(ossimNotifyLevel_NOTICE));
+      std::string errMsg = "Unknown option...";
+      throw ossimException(errMsg);
+   }
+
+
+   if ( ap.argc() >= 2 )
+   {
+      // Output file is last arg:
+      m_kwl->add( ossimKeywordNames::OUTPUT_FILE_KW, ap[ap.argc()-1]);
+   }
+   else
+   {
+      if ( !m_kwl->find(ossimKeywordNames::OUTPUT_FILE_KW) )
+      {
+         ap.writeErrorMessages(ossimNotify(ossimNotifyLevel_NOTICE));
+         std::string errMsg = "Must supply an output file.";
+         throw ossimException(errMsg);
+      }
+   }
+
+   if ( ap.argc() > 2 ) // User passed inputs in front of output file.
+   {
+      int pos = 1; // ap.argv[0] is application name. 
+      while ( pos < (ap.argc()-1) )
+      {
+         ossimFilename file = ap[pos];
+         if ( traceDebug() )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "argv[" << pos << "]: " << file << "\n";
+         }
+         
+         if ( isSrcFile(file) ) 
+         {
+            if ( m_kwl->find( SRC_FILE_KW.c_str() ) ) // --input-src used also
+            {
+               std::string errMsg = MODULE;
+               errMsg += "ERROR Multiple src files passed in.  Please combine into one.";
+               throw ossimException(errMsg);
+            }
+            
+            m_kwl->addPair( SRC_FILE_KW, file.string() );
+         }
+         else // Add as an input image.
+         {
+            // key = IMG_KW;
+            // key += ossimString::toString(imgIdx);
+            // key += ".";
+            // key += FILE_KW;
+            // m_kwl->addPair(key.string(), file.string() );
+            // ++imgIdx;
+         }
+         
+         ++pos; // Go to next arg...
+         
+      } // End: while ( pos < (ap.argc()-1) )
+       
+   } // End: if ( ap.argc() > 2 )
+
+   initialize();
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited..." << std::endl;
+   }  
+   return true;
+   
+} // End: void ossimAutRegUtil::initialize(ossimArgumentParser& ap)
+
+
+void ossimAutRegUtil::initialize( const ossimKeywordlist& kwl )
+{
+   clear();
+
+   // Start with clean options keyword list.
+   m_kwl->clear();
+
+   m_kwl->addList( kwl, true );
+
+   initialize();
+}
+
+
+
+void ossimAutRegUtil::initialize()
+{
+   static const char MODULE[] = "ossimAutRegUtil::initialize()";
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+   
+   if ( traceOptions() )
+   {
+      ossimFilename optionsFile;
+      getOutputFilename(optionsFile);
+      optionsFile = optionsFile.noExtension();
+      optionsFile += "-options.kwl";
+      ossimString comment = " Can be use for --options argument.";
+      m_kwl->write( optionsFile.c_str(), comment.c_str() );
+   }
+
+   // Determine the operation to do.
+   std::string op = m_kwl->findKey( OP_KW );
+   if ( op.size() )
+   {
+      ossimString s = op;
+      s.downcase();
+      
+      if ( s == "coreg" )
+      {
+         m_operation = OSSIM_AUTREG_OP_COREG;
+      }
+      else if ( s == "masreg" )
+      {
+         m_operation = OSSIM_AUTREG_OP_MASREG;
+      }
+      else
+      {
+         std::string errMsg = "unknown operation: ";
+         errMsg += s.string();
+         throw ossimException(errMsg);
+      }
+   }
+   else
+   {
+      std::string errMsg = "keyword not found: ";
+      errMsg += OP_KW;
+      errMsg += "\nUse --op option to specify operation.\n";
+      throw ossimException(errMsg);  
+   }
+
+   //---
+   // Report file
+   //---
+   ossimFilename repFile = m_kwl->findKey( REPORT_FILE_KW );
+
+   if (repFile.size())
+   {
+      m_rep = new ofstream( repFile.c_str(), ios::out );
+   }
+   else
+   {
+      m_rep = &std::cout;
+   }
+   *m_rep << "\n ossimAutRegUtil Summary..."<<std::endl;
+   ossimString ts;
+   ossim::getFormattedTime("%a %m.%d.%y %H:%M:%S", false, ts);
+   *m_rep << "\n" << ts;
+   *m_rep << "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
+   *m_rep << endl;
+
+
+   //---
+   // Populate the m_srcKwl if --src option was set.
+   // Note do this before creating chains.
+   //---
+   initializeSrcKwl();
+   
+   //---
+   // Load OpenCV config if --ocv_config_file option was set.
+   //---
+   initializeOcvKwl();
+   
+   //---
+   // Load oax config if --oax_config_file option was set.
+   //---
+   initializeOaxKwl();
+
+
+   //---
+   // Load input image pair
+   //---
+   if (!loadImages())
+   {
+      throw ossimException("loadImages() failed...");
+   }
+
+//=========================================================
+// TODO...  Is there a possibility of ortho image input?
+//   What about associated geometry/adjustbale parameters?
+//=========================================================
+   //--
+   // Raw image input
+   //--
+   createIdentityProjection(0);
+   createIdentityProjection(1);
+
+
+   //---
+   // Determine overlap ROIs
+   //---
+   if (!delineateROIs())
+   {
+      throw ossimException("delineateROIs() failed...");
+   }
+
+
+   if ( traceLog() )
+   {
+      ossimKeywordlist logKwl;
+      // m_writer->saveStateOfAllInputs(logKwl);
+      
+      ossimFilename logFile;
+      getOutputFilename(logFile);
+      logFile.setExtension("log");
+
+      logKwl.write( logFile.c_str() );
+   }
+
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "options keyword list:\n"
+         << *(m_kwl.get()) << "\n";
+      
+      if ( m_srcKwl.valid() )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "support record keyword list:\n"
+            << *(m_srcKwl.get()) << "\n";
+      }
+   }
+
+   //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   // Instantiate ossimTieMeasurementGenerator
+   //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    m_tGenObj = ossimObjectFactoryRegistry::instance()->
+      createObject(ossimString("ossimTieMeasurementGenerator"));
+   if(m_tGenObj.valid())
+   {
+      m_tGen = dynamic_cast<ossimTieMeasurementGeneratorInterface*> (m_tGenObj.get());
+   }
+   else
+   {
+      throw ossimException("ossimTieMeasurementGenerator createObject failed...");
+   }
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
+   }
+
+} // End: void ossimAutRegUtil::initialize()
+
+
+
+//*****************************************************************************
+//  METHOD: ossimAutRegUtil::loadImages()
+//  
+//  Load image pair.
+//  
+//*****************************************************************************
+bool ossimAutRegUtil::loadImages()
+{
+   static const char MODULE[] = "ossimAutRegUtil::loadImages";
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   bool isGoodLoad = false;
+   ossimFilename inputFile;
+
+   ossimString key;
+
+
+   // Load 1st image
+   if (m_operation == OSSIM_AUTREG_OP_COREG)
+   {
+      key = IMG_1_KW;
+   }
+   else  // Load master image
+   {
+      key = IMG_M_KW;
+      m_controlImage[0] = true;
+   }
+   inputFile = m_kwl->findKey(key.string());
+   if (addImgSource(inputFile, 0 ))
+   {
+      ossimImageHandler *ih1 = m_imgLayer[0]->getImageHandler().get();
+      if (!ih1)
+      {
+         *m_rep << " open for image 1 failed..."<<std::endl;
+      }
+      else
+      {
+         int overviews     = ih1->getNumberOfDecimationLevels();
+         ossimIrect bounds = ih1->getBoundingRect(0);
+         // ossimScalarType scalarType = ih1->getOutputScalarType();
+         ossimScalarTypeLut* lut = ossimScalarTypeLut::instance();
+         *m_rep << "-----------------" << endl
+                << "filename       = " << ih1->getFilename() << endl
+                << "width          = " << bounds.width() << endl
+                << "height         = " << bounds.height() << endl
+                << "overview count = " << (overviews-1) << endl
+                << "scalar type    = " << lut->getEntryString(ih1->getOutputScalarType()) << endl
+                << "Handler used   = " << ih1->getClassName() << endl;
+
+
+         // Load 2nd image
+         if (m_operation == OSSIM_AUTREG_OP_COREG)
+         {
+            key = IMG_2_KW;
+         }
+         else  // Load slave image
+         {
+            key = IMG_S_KW;
+            m_controlImage[1] = false;
+         }
+         inputFile = m_kwl->findKey(key.string());
+         if (addImgSource(inputFile, 0 ))
+         {
+            ossimImageHandler *ih2 = m_imgLayer[1]->getImageHandler().get();
+            if (!ih2)
+            {
+               *m_rep << " open for image 2 failed"<<std::endl;
+            }
+            else
+            {
+               int overviews     = ih2->getNumberOfDecimationLevels();
+               ossimIrect bounds = ih2->getBoundingRect(0);
+               // ossimScalarType scalarType = ih2->getOutputScalarType();
+               ossimScalarTypeLut* lut = ossimScalarTypeLut::instance();
+               *m_rep << "-----------------" << endl
+                      << "filename       = " << ih2->getFilename() << endl
+                      << "width          = " << bounds.width() << endl
+                      << "height         = " << bounds.height() << endl
+                      << "overview count = " << (overviews-1) << endl
+                      << "scalar type    = " << lut->getEntryString(ih2->getOutputScalarType()) << endl
+                      << "Handler used   = " << ih2->getClassName() << endl;
+               *m_rep << "-----------------" << endl;
+               isGoodLoad = true;
+            }
+         }
+      }  
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
+   }   
+   return isGoodLoad;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimAutRegUtil::delineateROIs()
+//  
+//  Determine correlation region of interest.
+//  
+//*****************************************************************************
+bool ossimAutRegUtil::delineateROIs()
+{
+   static const char MODULE[] = "ossimAutRegUtil::delineateROIs";
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   bool isGoodOp = false;
+
+   for (int img=0; img<2; ++img)
+   {
+      ossimIrect rect;
+      rect.makeNan();
+   
+      ossimImageSource* source = m_imgLayer[img].get();
+      
+      if ( source )
+      {
+   
+         if ( m_geom[img].valid() )
+         {
+            if ( m_kwl->find( ROI_CENTER_LAT_KW.c_str() ) ) 
+            {
+               // "ROI Center" with: --roi-center-llwh or --roi-center-llr:
+               ossimString latStr = m_kwl->findKey( ROI_CENTER_LAT_KW );
+               ossimString lonStr = m_kwl->findKey( ROI_CENTER_LON_KW );
+               if ( latStr.size() && lonStr.size() )
+               {
+                  ossimGpt centerGpt;
+   
+                  //---
+                  // Want the height nan going into worldToLocal call so it gets picked
+                  // up by the elevation manager.
+                  //---
+                  centerGpt.makeNan(); 
+   
+                  centerGpt.lat = latStr.toFloat64();
+                  centerGpt.lon = lonStr.toFloat64();
+   
+                  if ( !centerGpt.isLatNan() && !centerGpt.isLonNan() )
+                  {
+                     // Ground "cut center" to view:
+                     ossimDpt centerDpt(0.0, 0.0);
+                     m_geom[img]->worldToLocal(centerGpt, centerDpt);
+   
+                     if ( !centerDpt.hasNans() )
+                     {
+                        // if ( isIdentity() && m_ivt.valid() ) // Chipping in image space.
+                        if ( m_ivt[img].valid() ) // Chipping in image space.
+                        {
+                           // Transform image center point to view:
+                           ossimDpt ipt = centerDpt;
+                           m_ivt[img]->imageToView( ipt, centerDpt );
+                        }
+                        
+                        // --roi-center-llwh:
+                        ossimString widthStr  = m_kwl->findKey( ROI_WIDTH_KW );
+                        ossimString heightStr = m_kwl->findKey( ROI_HEIGHT_KW );
+                        if ( widthStr.size() && heightStr.size() )
+                        {
+                           ossim_int32 width  = widthStr.toInt32();
+                           ossim_int32 height = heightStr.toInt32();
+                           if ( width && height )
+                           {
+                              ossimIpt ul( ossim::round<int>(centerDpt.x - (width/2)),
+                                           ossim::round<int>(centerDpt.y - (height/2)) );
+                              ossimIpt lr( (ul.x + width - 1), ul.y + height - 1);
+                              rect = ossimIrect(ul, lr);
+                           }
+                        }
+                        else // --roi-center-llr: 
+                        {
+                           ossimString radiusStr = m_kwl->findKey( ROI_RADIUS_KW );
+                           if ( radiusStr.size() )
+                           {
+                              ossim_float64 radius = radiusStr.toFloat64();
+                              if ( radius )
+                              {
+                                 ossimDpt mpp;
+                                 m_geom[0]->getMetersPerPixel( mpp );
+   
+                                 if ( !mpp.hasNans() )
+                                 {
+                                    ossim_float64 rx = radius/mpp.x;
+                                    ossim_float64 ry = radius/mpp.y;
+                                    
+                                    ossimIpt ul( ossim::round<int>( centerDpt.x - rx ),
+                                                 ossim::round<int>( centerDpt.y - ry ) );
+                                    ossimIpt lr( ossim::round<int>( centerDpt.x + rx ),
+                                                 ossim::round<int>( centerDpt.y + ry ) );
+                                    rect = ossimIrect(ul, lr);
+                                 }
+                              }
+                           }
+                        }
+                     }
+                     
+                  } // Matches: if ( !centerGpt.hasNans() )
+                  
+               } // Matches: if ( latStr && lonStr )
+               
+            } // Matches: if ( m_kwl->find( ROI_CENTER_LAT_KW ) )
+   
+         } // if ( igeom.valid() )
+   
+         else
+         {
+            // Should never happen...
+            std::string errMsg = MODULE;
+            if ( !source )
+            {
+               errMsg += " image source null!";
+            }
+            throw( ossimException(errMsg) );
+         }
+   
+         // rect.print(*m_rep);
+         m_roiRects.push_back(rect);
+      } // if ( source )
+
+   }
+
+   isGoodOp = true;
+
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
+   }   
+   return isGoodOp;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimAutRegUtil::populateObsSet()
+//  
+//  Transfer tie points from generator to observation set.
+//  
+//*****************************************************************************
+bool ossimAutRegUtil::populateObsSet()
+{
+   static const char MODULE[] = "ossimAutRegUtil::populateObsSet";
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   bool isGoodLoad = true;
+
+   ossimString id;
+   ossimGpt gp;
+
+
+   for (int m=0; m<m_tGen->numMeasurements(); ++m)
+   {
+      id = ossimString::toString(m+1);
+
+      // Initialize ground point
+      gp.makeNan();
+      ossimPointObservation *pt = new ossimPointObservation(gp, id, m_LatLonHgtSigmas);
+
+      for (int img=0; img<2; ++img)
+      {
+         ossimDpt imgPt = m_tGen->pointIndexedAt(img,m);
+         // If control, set ground coordinates and reset sigmas
+         if (m_controlImage[img])
+         {
+            // Point drop to get control coordinates
+            ossimGpt worldPt;
+            m_geom[img]->localToWorld(imgPt, worldPt);
+            if (worldPt.isHgtNan())
+            {
+               ossim_float64 hgt =
+                  ossimElevManager::instance()->getHeightAboveEllipsoid(worldPt);
+               worldPt.height(hgt);
+            }
+            pt->Gpt() = worldPt;
+
+            // Set control sigmas
+            pt->setGroundSigmas
+               (m_LatLonHgtControlSigmas[0],m_LatLonHgtControlSigmas[1],m_LatLonHgtControlSigmas[2]);
+         }
+         else
+         {
+            // Get image filename
+            ossimFilename filename = m_imgLayer[img]->getImageHandler()->getFilename();
+            
+            // Add measurement to point observation
+            pt->addMeasurement(imgPt, filename);
+         }
+      }
+      // Add point observation to set
+      if (pt->numMeas() > 0)
+      {
+         m_obsSet->addObservation(pt);
+      }
+   }
+
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
+   }   
+   return isGoodLoad;
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimAutRegUtil::configureTieMeasGenerator()
+//  
+//  Configure the tie measurement generator using m_ocvKwl
+//  
+//*****************************************************************************
+void ossimAutRegUtil::configureTieMeasGenerator()
+{
+   static const char MODULE[] = "ossimAutRegUtil::configureTieMeasGenerator";
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   if ( m_ocvKwl.valid() )
+   {
+
+      // Draw OpenCV match window
+      m_showMatchWindow = keyIsTrue(m_ocvKwl, OCV_DRAW_MATCHES_FLAG_KW);
+      m_tGen->setShowCvWindow(m_showMatchWindow);
+   
+      // OpenCV detector
+      if (m_ocvKwl->find(OCV_DETECTOR_NAME_KW.c_str()))
+      {
+         m_tGen->setFeatureDetector(m_ocvKwl->findKey(OCV_DETECTOR_NAME_KW));
+      }
+   
+      // OpenCV descriptor/extractor
+      if (m_ocvKwl->find(OCV_EXTRACTOR_NAME_KW.c_str()))
+      {
+         m_tGen->setDescriptorExtractor(m_ocvKwl->findKey(OCV_EXTRACTOR_NAME_KW));
+      }
+   
+      // OpenCV matcher
+      if (m_ocvKwl->find(OCV_MATCHER_NAME_KW.c_str()))
+      {
+         m_tGen->setDescriptorMatcher(m_ocvKwl->findKey(OCV_MATCHER_NAME_KW));
+      }
+
+      // OpenCV maximum number of matches
+      if (m_ocvKwl->find(OCV_MAX_MATCHES_KW.c_str()))
+      {
+         ossimString maxMatches = m_ocvKwl->findKey(OCV_MAX_MATCHES_KW);
+         if (maxMatches.size())
+         {
+            ossim_int32 max  = maxMatches.toInt32();
+            m_tGen->setMaxMatches(max);
+         }
+      }
+   
+      // TODO: set crossCheck currently commented out in ossimTieMeasurementGenerator
+      // m_tGen->setUseCrossCheck(keyIsTrue(m_ocvKwl, OCV_USE_CROSS_CHECK_KW));
+   
+      // Use OpenCV GridAdaptedFeatureDetector
+      m_tGen->setUseGrid(keyIsTrue(m_ocvKwl, OCV_USE_GRID_ADAPTED_DETECT_KW));
+
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
+   }   
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimAutRegUtil::configureAdjustmentExecutive()
+//  
+//  Configure the adjustment executive using m_oaxKwl
+//  
+//*****************************************************************************
+void ossimAutRegUtil::configureAdjustmentExecutive()
+{
+   static const char MODULE[] = "ossimAutRegUtil::configureAdjustmentExecutive";
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   if ( m_oaxKwl.valid() )
+   {
+
+      if (m_oaxKwl->find(OAX_MAX_ITERATIONS_KW.c_str()))
+      {
+         ossimString maxIter = m_oaxKwl->findKey(OAX_MAX_ITERATIONS_KW);
+         if (maxIter.size())
+         {
+            ossim_int32 max  = maxIter.toInt32();
+            m_adjExec->setMaxIter(max);
+         }
+      }
+
+      if (m_oaxKwl->find(OAX_CONVERGENCE_CRITERIA_KW.c_str()))
+      {
+         ossimString conv = m_oaxKwl->findKey(OAX_CONVERGENCE_CRITERIA_KW);
+         if (conv.size())
+         {
+            ossim_float64 convPerc = conv.toFloat64();
+            m_adjExec->setConvCriteria(convPerc);
+         }
+      }
+
+      if (m_oaxKwl->find(OAX_GROUND_SIGMA_KW.c_str()))
+      {
+         ossimString conv = m_oaxKwl->findKey(OAX_GROUND_SIGMA_KW);
+         if (conv.size())
+         {
+            ossim_float64 gndSigma = conv.toFloat64();
+            m_LatLonHgtSigmas[0] = gndSigma;
+            m_LatLonHgtSigmas[1] = gndSigma;
+            m_LatLonHgtSigmas[2] = gndSigma;
+         }
+      }
+
+      if (m_oaxKwl->find(OAX_CONTROL_SIGMA_KW.c_str()))
+      {
+         ossimString conv = m_oaxKwl->findKey(OAX_CONTROL_SIGMA_KW);
+         if (conv.size())
+         {
+            ossim_float64 gndSigma = conv.toFloat64();
+            m_LatLonHgtControlSigmas[0] = gndSigma;
+            m_LatLonHgtControlSigmas[1] = gndSigma;
+            m_LatLonHgtControlSigmas[2] = gndSigma;
+         }
+      }
+
+      if (m_oaxKwl->find(OAX_LAT_SIGMA_KW.c_str()))
+      {
+         ossimString conv = m_oaxKwl->findKey(OAX_LAT_SIGMA_KW);
+         if (conv.size())
+         {
+            ossim_float64 gndLatSigma = conv.toFloat64();
+            m_LatLonHgtSigmas[0] = gndLatSigma;
+         }
+      }
+
+      if (m_oaxKwl->find(OAX_LON_SIGMA_KW.c_str()))
+      {
+         ossimString conv = m_oaxKwl->findKey(OAX_LON_SIGMA_KW);
+         if (conv.size())
+         {
+            ossim_float64 gndLonSigma = conv.toFloat64();
+            m_LatLonHgtSigmas[1] = gndLonSigma;
+         }
+      }
+
+      if (m_oaxKwl->find(OAX_HGT_SIGMA_KW.c_str()))
+      {
+         ossimString conv = m_oaxKwl->findKey(OAX_HGT_SIGMA_KW);
+         if (conv.size())
+         {
+            ossim_float64 gndHgtSigma = conv.toFloat64();
+            m_LatLonHgtSigmas[2] = gndHgtSigma;
+         }
+      }
+
+   }
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
+   }   
+}
+
+
+//*****************************************************************************
+//  METHOD: ossimAutRegUtil::execute()
+//  
+//  Execute registration operation.
+//*****************************************************************************
+void ossimAutRegUtil::execute()
+{
+   static const char MODULE[] = "ossimAutRegUtil::execute";
+
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+
+   //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   // Initialize the measurement generator
+   //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   *m_rep<<"\n\n >> Tie point collection follows...\n"<<endl;
+   m_tGen->init(*m_rep);
+
+   //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   // Configure the measurement generator
+   //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   configureTieMeasGenerator();
+
+
+   //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   // Load ossimImageSource vector
+   //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   std::vector<ossimImageSource*> src;
+   src.push_back(m_imgLayer[0].get());
+   src.push_back(m_imgLayer[1].get());
+
+
+   //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   // Set correlation areas
+   //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   int primeIndex = 0; //TODO
+   m_tGen->setBox(m_roiRects, primeIndex, src);
+
+
+   //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   // Run the OpenCV detector/extractor/matcher to collect tiepoints
+   //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   if (m_tGen->run())
+   {
+
+      //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      // Close match window if active
+      //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      if (m_showMatchWindow)
+      {
+         bool waitKey = true;
+         m_tGen->closeCvWindow(waitKey);
+      }
+
+      //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      // Check for adjustable parameter interface before adjustment
+      //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      ossimAdjustableParameterInterface* iface1 = m_geom[0]->getAdjustableParameterInterface();
+      ossimAdjustableParameterInterface* iface2 = m_geom[1]->getAdjustableParameterInterface();
+      
+      if (iface1 && iface2)
+      {
+
+         //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+         // Create observation set
+         //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+         m_obsSet = new ossimObservationSet;
+
+         //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+         // Create adjustment executive
+         //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+         m_adjExec = new ossimAdjustmentExecutive(*m_rep);
+
+         //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+         // Configure adjustment executive
+         //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+         configureAdjustmentExecutive();
+
+         //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+         // Load measurements into the observation set
+         //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+         if (populateObsSet())
+         {
+   
+            //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+            // Perform adjustment
+            //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+            bool solutionOK = false;
+         
+            *m_rep<<"\n\n >> Adjustment summary follows...\n"<<endl;
+            if (m_adjExec->initializeSolution(*m_obsSet))
+            {
+               solutionOK = m_adjExec->runSolution();
+               m_adjExec->summarizeSolution();
+               if (solutionOK)
+               {
+                  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+                  // Write updated geometry files
+                  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+                  saveAdjustment();
+
+                  if (traceDebug())
+                  {
+                     ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << "Solution complete...\n";
+                  }   
+               }
+               else
+               {
+                  throw ossimException("m_adjExec->runSolution() failed...");
+               } //end if m_adjExec->runSolution()
+            }
+            else
+            {
+               throw ossimException("m_adjExec->initializeSolution() failed...");
+            } //end if m_adjExec->initializeSolution()
+      
+         } 
+         else
+         {
+            throw ossimException("populateObsSet() failed...");
+         } //end if (populateObsSet())
+
+      }
+      else
+      {
+         throw ossimException("ossimAdjustableParameterInterface missing...");
+      } //end if (iface1 && iface2)
+
+   }
+   else
+   {
+      throw ossimException( "m_tGen->run() failed...");
+   } //end if (m_tGen->run())
+   
+   if (traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
+   }   
+}
+
+
+void ossimAutRegUtil::saveAdjustment()
+{
+   ossimString ts;
+   ossim::getFormattedTime("ossim-autreg_%a_%m.%d.%y_%H:%M:%S", false, ts);
+ 
+   ossimAdjustmentInfo* adjInfo = new ossimAdjustmentInfo;
+
+   for (int img=0; img<2; ++img)
+   {
+      if (!m_controlImage[img])
+      {
+         // Get the adjustment info from the bundle adjustment via m_obsSet
+         ossimFilename filename = m_imgLayer[img]->getImageHandler()->getFilename();
+
+         ossimAdjustableParameterInterface* adjParIface;
+
+         for (ossim_uint32 ii=0; ii<m_obsSet->numImages(); ++ii)
+         {
+            if (filename == m_obsSet->imageFile(ii))
+               adjParIface = m_obsSet->getImageGeom(ii)->getAdjustableParameterInterface();
+         }
+
+         adjParIface->setAdjustmentDescription(ts);
+         adjParIface->getAdjustment(*adjInfo);
+   
+         // Grab adjustable parameter interface and update it with the adjustment info
+         ossimAdjustableParameterInterface* iface = m_geom[img]->getAdjustableParameterInterface();
+         iface->setAdjustment(*adjInfo, true);
+
+         if (iface)
+         {
+            ossimFilename fn = m_imgLayer[img]->getImageHandler()->createDefaultGeometryFilename();
+// TODO ***********
+//  dirty flag????
+// fn += "_test";
+// TODO ***********
+            ossimKeywordlist kwl;
+            iface->getBaseObject()->saveState(kwl);
+            kwl.write(fn);
+         }
+      }
+   }
+
+   delete adjInfo;
+}
+
+
+void ossimAutRegUtil::getOutputFilename(ossimFilename& f) const
+{
+   f.string() = m_kwl->findKey( std::string(ossimKeywordNames::OUTPUT_FILE_KW) );
+}
+
+
+bool ossimAutRegUtil::isSrcFile(const ossimFilename& file) const
+{
+   bool result = false;
+   ossimString ext = file.ext();
+   ext.downcase();
+   if ( ext == "src" )
+   {
+      result = true;
+   }
+   return result;
+}
+
+
+void ossimAutRegUtil::usage(ossimArgumentParser& ap)
+{
+   // Add global usage options.
+   ossimInit::instance()->addOptions(ap);
+   
+   // Set app name.
+   std::string appName = ap.getApplicationName();
+   ap.getApplicationUsage()->setApplicationName( ossimString( appName ) );
+
+   // Add options.
+   addArguments(ap);
+   
+   // Write usage.
+   ap.getApplicationUsage()->write(ossimNotify(ossimNotifyLevel_INFO));
+
+   // Keeping single line in tact for examples for cut and paste purposes.
+   ossimNotify(ossimNotifyLevel_INFO)
+      << "NOTES:\n"
+      << "1) Note 1 content\n"
+      << "   Note 1 place holder continued...\n"
+      << "2) Note 2 content\n"
+      << "   Note 2 place holder continued...\n"
+      
+      << "\nExample commands:\n"
+
+      << "\n// Co-register image1 and image2 with 512x512 ROIs centered on point:\n"
+      << appName << " --op coreg --img_1 image1.ntf --img_2 image2.ntf --roi-center-llwh 28.097255037664400 -80.630762190246145 512 512\n"
+
+      << "\n// Register image2 to control image1 (master): (TBD... not working)\n"
+      << appName << " --op masreg -img_m image1.ntf -img_s image2.ntf -cfg configFile.kwl\n"
+
+      << "\n// Above command where all options are in a keyword list:\n"
+      << appName << " --options autreg-options.kwl\n"
+      << std::endl;
+}
+
+
+void  ossimAutRegUtil::initializeSrcKwl()
+{
+   static const char MODULE[] = "ossimAutRegUtil::initializeSrcKwl";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " entered...\n";
+   }
+
+   std::string value = m_kwl->findKey(std::string(SRC_FILE_KW));
+   if ( value.size() )
+   {
+      m_srcKwl = new ossimKeywordlist();
+      m_srcKwl->setExpandEnvVarsFlag(true);
+      if ( m_srcKwl->addFile( value.c_str() ) == false )
+      {
+         m_srcKwl = 0;
+      }
+   }
+   else
+   {
+      m_srcKwl = 0; 
+   }
+
+   if ( traceDebug() )
+   {
+      if ( m_srcKwl.valid() )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "src keyword list:\n" << *(m_srcKwl.get()) << "\n";
+      }
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " exited...\n";
+   }
+}
+
+
+void  ossimAutRegUtil::initializeOcvKwl()
+{
+   static const char MODULE[] = "ossimAutRegUtil::initializeOcvKwl";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " entered...\n";
+   }
+
+   std::string value = m_kwl->findKey(std::string(OCV_CONFIG_FILE_KW));
+   if ( value.size() )
+   {
+      m_ocvKwl = new ossimKeywordlist();
+      m_ocvKwl->setExpandEnvVarsFlag(true);
+      if ( m_ocvKwl->addFile( value.c_str() ) == false )
+      {
+         m_ocvKwl = 0;
+      }
+   }
+   else
+   {
+      m_ocvKwl = 0; 
+   }
+
+   if ( traceDebug() )
+   {
+      if ( m_ocvKwl.valid() )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "ocv keyword list:\n" << *(m_ocvKwl.get()) << "\n";
+      }
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " exited...\n";
+   }
+}
+
+
+void  ossimAutRegUtil::initializeOaxKwl()
+{
+   static const char MODULE[] = "ossimAutRegUtil::initializeOaxKwl";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " entered...\n";
+   }
+
+   std::string value = m_kwl->findKey(std::string(OAX_CONFIG_FILE_KW));
+   if ( value.size() )
+   {
+      m_oaxKwl = new ossimKeywordlist();
+      m_oaxKwl->setExpandEnvVarsFlag(true);
+      if ( m_oaxKwl->addFile( value.c_str() ) == false )
+      {
+         m_oaxKwl = 0;
+      }
+   }
+   else
+   {
+      m_oaxKwl = 0; 
+   }
+
+   if ( traceDebug() )
+   {
+      if ( m_oaxKwl.valid() )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "oax keyword list:\n" << *(m_oaxKwl.get()) << "\n";
+      }
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " exited...\n";
+   }
+}
+
+
+bool ossimAutRegUtil::addImgSource(const ossimFilename& file, ossim_uint32 entryIndex)
+{
+   static const char MODULE[] = "ossimAutRegUtil::addImgSource";
+
+   bool addOK = false;
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " entered...\nFile: " << file << "\n";
+   }
+
+   ossimRefPtr<ossimSingleImageChain> ic = createChain(file, entryIndex);
+   if ( ic.valid() )
+   {
+      m_imgLayer.push_back(ic);
+      addOK = true;
+   }
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exiting...\n";
+   }
+
+   return addOK;
+}
+
+
+void ossimAutRegUtil::setReaderProps( ossimImageHandler* ih ) const
+{
+   if ( ih && m_kwl.valid() )
+   {
+      ossim_uint32 count = m_kwl->numberOf( READER_PROPERTY_KW.c_str() );
+      for (ossim_uint32 i = 0; i < count; ++i)
+      {
+         ossimString key = READER_PROPERTY_KW;
+         key += ossimString::toString(i);
+         ossimString value = m_kwl->findKey( key.string() );
+         if ( value.size() )
+         {
+            std::vector<ossimString> splitArray;
+            value.split(splitArray, "=");
+            if(splitArray.size() == 2)
+            {
+               ossimRefPtr<ossimProperty> prop =
+                  new ossimStringProperty(splitArray[0], splitArray[1]);
+               
+               ih->setProperty( prop );
+            }
+         }
+      }
+   }
+}
+
+
+bool ossimAutRegUtil::setChainEntry(
+   ossimRefPtr<ossimSingleImageChain>& chain, ossim_uint32 entryIndex ) const
+{
+   bool result = false;
+   if ( chain.valid() )
+   {
+      ossimRefPtr<ossimImageHandler> ih = chain->getImageHandler();
+      if ( ih.valid() )
+      {
+         result = ih->setCurrentEntry( entryIndex );
+      }
+   }
+   return result;
+}
+
+ossimRefPtr<ossimSingleImageChain> ossimAutRegUtil::createChain(const ossimFilename& file,
+                                                                 ossim_uint32 entryIndex) const
+{
+   static const char MODULE[] = "ossimAutRegUtil::createChain(const ossimFilename&";
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " entered..."
+         << "\nfile: " << file
+         << "\nentry: " << entryIndex
+         << "\n";
+   }   
+   
+   ossimRefPtr<ossimSingleImageChain> ic = 0;
+
+   if ( file.size() )
+   {
+      if ( file.exists() )
+      {
+         ic = new ossimSingleImageChain;
+         if ( ic->open( file ) )
+         {
+            // Set any reader props:
+            setReaderProps( ic->getImageHandler().get() );
+            
+            // we can't guarantee the state of the image handler at this point so
+            // let's make sure that the entry is always set to the requested location
+            //  On Cib/Cadrg we were having problems.  Removed the compare for entry 0
+            //
+             if ( setChainEntry( ic, entryIndex ) == false )
+             {
+                std::ostringstream errMsg;
+                errMsg << MODULE << " ERROR:\nEntry " << entryIndex << " out of range!"
+                       << std::endl;
+                throw ossimException( errMsg.str() );
+             }
+
+            
+            // Always have resampler cache.
+            ic->setAddResamplerCacheFlag(true);
+
+            //---
+            // Don't need a chain cache as we're doing a sequential write.  So the same tile
+            // should never be visited more than once.
+            //---
+            ic->setAddChainCacheFlag(false);
+
+
+            // // Brightness, contrast. Note in same filter.
+            // if ( hasBrightnesContrastOperation() )
+            // {
+            //    ic->setBrightnessContrastFlag(true);
+            // }
+
+            // std::string sharpnessMode = getSharpenMode();
+            // if ( sharpnessMode.size() )
+            // {
+            //    ic->setSharpenFlag(true);
+            // }
+
+            // Create the chain.
+            ic->createRenderedChain();
+
+
+            // // Histogram setup.
+            // if ( hasHistogramOperation() )
+            // {
+            //    setupChainHistogram( ic );
+            // }
+
+            // // Brightness contrast setup:
+            // if ( hasBrightnesContrastOperation() )
+            // {
+            //    // Assumption bright contrast filter in chain:
+               
+            //    ossim_float64 value = getBrightness();
+            //    ic->getBrightnessContrast()->setBrightness( value );
+               
+            //    value = getContrast();
+            //    ic->getBrightnessContrast()->setContrast( value );
+            // }
+
+            // // Sharpness:
+            // if ( sharpnessMode.size() )
+            // {
+            //    if ( sharpnessMode == "light" )
+            //    {
+            //       ic->getSharpenFilter()->setWidthAndSigma( 3, 0.5 );
+            //    }
+            //    else if ( sharpnessMode == "heavy" )
+            //    {
+            //       ic->getSharpenFilter()->setWidthAndSigma( 5, 1.0 );
+            //    }
+            // }
+         }
+      }
+   }
+
+   if ( ic.valid() == false )
+   {
+      std::string errMsg = "Could not open: ";
+      errMsg += file.string();
+      throw ossimException(errMsg); 
+   }
+
+   if ( traceDebug() )
+   {
+      ossimKeywordlist kwl;
+      ic->saveState(kwl, 0);
+
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "chain:\n" << kwl << "\n"
+         << MODULE << " exiting...\n";
+   }   
+
+   return ic;
+}
+
+
+void ossimAutRegUtil::createIdentityProjection(int idx)
+{
+   static const char MODULE[] = "ossimAutRegUtil::createIdentityProjection";
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   // Get the singe image chain.  Should be only one.
+   ossimRefPtr<ossimSingleImageChain> sic = 0;
+   if ( m_imgLayer.size() )
+   {
+      sic = m_imgLayer[idx];
+   }
+
+   if ( sic.valid() )
+   {
+      // Get the image handler.
+      ossimRefPtr<ossimImageHandler>  ih = sic->getImageHandler();
+
+      // Resampler:
+      ossimRefPtr<ossimImageRenderer> resampler = sic->getImageRenderer();
+
+      if ( ih.valid() )
+      {
+         //---
+         // Get the geometry from the image handler.  Since we're in "identity"
+         // mode use the inputs for the outputs.
+         //---
+         m_geom[idx] = ih->getImageGeometry();
+
+         if ( m_geom[idx].valid() )
+         {
+            // Get the image projection.
+            ossimRefPtr<ossimProjection> proj = m_geom[idx]->getProjection();
+            if ( proj.valid() )
+            {
+               ossim_float64 rotation = 0.0;
+               
+               ossimDrect rect;
+               m_geom[idx]->getBoundingRect(rect);
+               ossimDpt midPt = rect.midPoint();
+               
+               if ( traceDebug() )
+               {
+                  ossimNotify(ossimNotifyLevel_DEBUG)
+                     << MODULE
+                     << "\nAffine transform parameters:"
+                     << "\nrotation:  " << rotation
+                     << "\nmid point: " << midPt << std::endl;
+               }
+               
+               m_ivt[idx] = new ossimImageViewAffineTransform(-rotation,
+                                                              1.0, 1.0, // image space scale x and y
+                                                              1.0, 1.0, //scale x and y
+                                                              0.0, 0.0, // translate x,y
+                                                              midPt.x, midPt.y); // pivot point
+               
+               resampler->setImageViewTransform( m_ivt[idx].get() );
+            }
+
+         } // Matches: if ( m_geom.valid() )
+         
+      } // Matches: if ( ih.valid() )
+      
+   } // Matches: if ( sic.valid() 
+   
+} // End: createIdentityProjection()
+
+
+bool ossimAutRegUtil::keyIsTrue(ossimRefPtr<ossimKeywordlist> kwl, const std::string& key ) const
+{
+   bool result = false;
+   if ( kwl.valid() )
+   {
+      std::string value = kwl->findKey( key );
+      if ( value.size() )
+      {
+         result = ossimString(value).toBool();
+      }
+   }
+   return result;
+}
+
diff --git a/ossim/src/ossim/util/ossimBatchTest.cpp b/ossim/src/ossim/util/ossimBatchTest.cpp
new file mode 100644
index 0000000..99b0368
--- /dev/null
+++ b/ossim/src/ossim/util/ossimBatchTest.cpp
@@ -0,0 +1,1257 @@
+//----------------------------------------------------------------------------
+//
+// File ossim-batch-test.cpp
+// 
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Burken, Oscar Kramer
+//
+// Description: Test code application ossim batch test.
+//
+//----------------------------------------------------------------------------
+// $Id: ossim-batch-test.cpp 3112 2012-01-26 17:28:00Z david.burken $
+
+#include <ossim/util/ossimBatchTest.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimEnvironmentUtility.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimTimer.h>
+#include <ossim/init/ossimInit.h>
+
+#include <cstdlib> /* for system() */
+#include <ctime>
+#include <iomanip>
+#include <iostream>
+#include <string>
+#include <sstream>
+
+using namespace std;
+
+//**************************************************************************************************
+// Constructor
+//**************************************************************************************************
+ossimBatchTest::ossimBatchTest()
+   :
+   m_acceptTestList(),
+   m_cleanTestList(),
+   m_preprocessTestList(),
+   m_runTestList(),
+   m_templateModeActive(false),
+   m_configFileName(),
+   m_outDir(),
+   m_expDir(),
+   m_logStr()
+{
+}
+
+//**************************************************************************************************
+// Initialize parses the command line. Returns true if status OK.
+//**************************************************************************************************
+bool ossimBatchTest::initialize(ossimArgumentParser& ap)
+{
+   if ( (ap.argc() == 1) || ap.read("-h") || ap.read("--help") )
+   {
+      usage(ap);
+
+      // continue_after_init to false
+      return false;
+   }
+
+   // Initialize environment:
+#if defined(WIN32) || defined(_MSC_VER) && !defined(__CYGWIN__) && !defined(__MWERKS__)
+   _putenv("DEL_CMD=del /Q"); // For backwards compatiblity.
+   _putenv("DIFF_CMD=fc /W");
+   _putenv("COPY_CMD=copy /Y");
+   _putenv("MKDIR_CMD=mkdir");
+   _putenv("RM_CMD=del /Q");
+   _putenv("RMDIR_CMD=rmdir /S /Q");
+   
+#else
+   setenv("DEL_CMD",  "rm -rf",    1); // For backwards compatiblity.
+   setenv("DIFF_CMD",  "diff -w",  1);
+   setenv("COPY_CMD",  "cp",       1);
+   setenv("MKDIR_CMD", "mkdir -p", 1);
+   setenv("RM_CMD",    "rm -f",    1);
+   setenv("RMDIR_CMD", "rm -rf",   1);
+   
+#endif
+   
+   std::string tempString;
+   ossimArgumentParser::ossimParameter stringParam(tempString);
+   
+   if (ap.read("-W", stringParam) || ap.read("-W"))
+   {
+      ossimFilename templateFile (tempString.c_str());
+      if (templateFile.empty())
+         templateFile = "obt_config_long_template.kwl";
+      m_templateModeActive = true;
+      writeTemplate(templateFile, true);
+      return true;
+   }
+   if (ap.read("-w", stringParam) || ap.read("-w"))
+   {
+      ossimFilename templateFile(tempString.c_str());
+      if (templateFile.empty())
+         templateFile = "obt_config_short_template.kwl";
+      m_templateModeActive = true;
+      writeTemplate(templateFile, false);
+      return true;
+   }
+   
+   while ( ap.read("-a", stringParam) || ap.read("--accept-test", stringParam) )
+   {
+      if ( tempString.size() )
+      {
+         ossimString os = tempString;
+         ossimString separatorList = " ";
+         std::vector<ossimString> result;
+         os.split(result, separatorList);
+         std::vector<ossimString>::const_iterator i = result.begin();
+         while ( i != result.end() )
+         {
+            m_acceptTestList.push_back((*i));
+            ++i;
+         }
+      }
+   }
+
+   while ( ap.read("-c", stringParam) || ap.read("--clean-test", stringParam) )
+   {
+      if ( tempString.size() )
+      {
+         ossimString os = tempString;
+         ossimString separatorList = " ";
+         std::vector<ossimString> result;
+         os.split(result, separatorList);
+         std::vector<ossimString>::const_iterator i = result.begin();
+         while ( i != result.end() )
+         {
+            m_cleanTestList.push_back((*i));
+            ++i;
+         }
+      }
+   }
+
+   while ( ap.read("-p", stringParam) || ap.read("--preprocess-test", stringParam) )
+   {
+      if ( tempString.size() )
+      {
+         ossimString os = tempString;
+         ossimString separatorList = " ";
+         std::vector<ossimString> result;
+         os.split(result, separatorList);
+         std::vector<ossimString>::const_iterator i = result.begin();
+         while ( i != result.end() )
+         {
+            m_preprocessTestList.push_back((*i));
+            ++i;
+         }
+      }
+   }
+
+   while ( ap.read("-r", stringParam) || ap.read("--run-test", stringParam) )
+   {
+      if ( tempString.size() )
+      {
+         ossimString os = tempString;
+         ossimString separatorList = " ";
+         std::vector<ossimString> result;
+         os.split(result, separatorList);
+         std::vector<ossimString>::const_iterator i = result.begin();
+         while ( i != result.end() )
+         {
+            m_runTestList.push_back((*i));
+            ++i;
+         }
+      }
+   }
+
+   // End of arg parsing.
+   ap.reportRemainingOptionsAsUnrecognized();
+   if ( ap.errors() )
+   {
+      ap.writeErrorMessages(ossimNotify(ossimNotifyLevel_NOTICE));
+      return false;
+   }
+
+   if (ap.argc() > 1 )
+   {
+      m_configFileName = ap.argv()[1];
+   }
+   else
+   {
+      usage(ap);
+
+      // continue_after_init to false
+      return false;
+   }
+
+   // Special command line case: When only a config filename is provided, this implies "run all 
+   // tests".
+   if (m_cleanTestList.empty()  && m_preprocessTestList.empty() &&
+       m_acceptTestList.empty() && m_runTestList.empty() && m_configFileName.size())
+   {
+      m_runTestList.push_back("all");
+   }
+
+   return true;
+}
+
+//**************************************************************************************************
+// Writes a template (either long form or short) to the file name specified.
+//**************************************************************************************************
+void ossimBatchTest::writeTemplate(const ossimFilename& templateFile, bool write_long_form)
+{
+   if (templateFile.exists())
+   {
+      ossimString del_cmd ("$(RM_CMD) ");
+      del_cmd += templateFile;
+      del_cmd = del_cmd.expandEnvironmentVariable();
+      if (system(del_cmd.chars()) != 0)
+      {
+         cerr << "ERROR: Could not delete existing template file before writing new template."
+            " Please delete the existing and rerun the command."<< endl;
+         return;
+      }
+   }
+
+   std::ofstream out(templateFile.c_str());
+   if ( !out.good() )
+   {
+      ossimNotify(ossimNotifyLevel_NOTICE)
+         << "Could not open: " << templateFile.c_str() << std::endl;
+      return;
+   }
+
+   if (write_long_form)
+   {
+      out<< "//===================================================================================\n"
+         << "// \n"
+         << "// File: " << templateFile.c_str() << "\n"
+         << "// Generated by command: ossim-batch-test -W " << templateFile.c_str() << "\n"
+         << "// Description: ossim-batch-test template config file.\n"
+         << "// \n"
+         << "// Control flags:\n"
+         << "// Use 1 or true, 0 or false to turn on and off sections.\n"
+         << "// Typically preprocess and expected results only turned on for first run.\n"
+         << "// Clean commands should erase anything created by this test.\n"
+         << "// Command order if flag turned on:\n"
+         << "// 1) clean, 2) pre-process, 3) expected, 4) test, 5) post-process\n"
+         << "// \n"
+         << "// NOTES:\n"
+         << "// * The following environment variables must be set before running batch test:\n"
+         << "//     OSSIM_BATCH_TEST_DATA     Top-level dir containing all test source data\n"
+         << "//     OSSIM_BATCH_TEST_RESULTS  Top-level dir containing all test results (exp, \n"
+         << "//                               out and log),\n"
+         << "// \n"
+         << "// * The variables OBT_EXP_DIR and OBT_OUT_DIR are assigned during run-time to\n"
+         << "//   the proper paths according to the config filename. It isn't required to replace\n"
+         << "//   these nor predefine them in the environment. You can leave them as is or modify\n"
+         << "//   the paths to your unconventional file paths.\n"
+         << "// \n"
+         << "// * In order to preserve platform independence, please utilize the following \n"
+         << "//   variables for the common OS commands when adding new commands to the test\n"
+         << "//   configuration KWL file. Examples are provided in this template\n"
+         << "//       $(DIFF_CMD) Use this var for windows \"fc\" or linux \"diff\"\n"
+         << "//       $(COPY_CMD) Use this var for windows \"copy\" or linux \"cp\"\n"
+         << "//       $(MKDIR_CMD) Use this var for windows \"mkdir\" or linux \"mkdir\"\n"
+         << "//       $(RM_CMD) Use this var for windows \"del /Q\" or linux \"rm -f\"\n"
+         << "//       $(RMDIR_CMD) Use this var for windows \"rmdir /S /Q\" or linux \"rm -rf\"\n"
+         << "//   This application will set the environment variables to the proper values at \n"
+         << "//   runtime, so no need to worry about defining these.\n"
+         << "// \n"
+         << "// * Use forward slashes \"//\", at beginning of line for comments.\n"
+         << "// \n"
+         << "// * You can use existing environment variables as $(YOUR_VARIABLE). They will be \n"
+         << "//   expanded at run time if valid.\n"
+         << "// \n"
+         << "// * Clean, preprocess, run, and accept test sections can be switched on or off\n"
+         << "//   at run time.  These override config file flags.  Optional arguments are the \n"
+         << "//   the following: \n"
+         << "//      -c or --clean-test \n"
+         << "//      -p or --preprocess-test\n"
+         << "//      -r or --run-test \n"
+         << "//      -a or --accept-test \n"
+         << "//   Multiple tests can be entered by quoting string of space-separated\n"
+         << "//   test names, e.g. \"test1 test2\". To do all tests use \"all\" or leave blank.\n"
+         << "// \n"
+         << "//===================================================================================\n"
+         << "\n"
+         << "// If the config file will contain only a list of subordinate config files to be\n"
+         << "// run as one consolidated \"super-test\", then use only the following suffixed\n"
+         << "// keywords. Otherwise, REMOVE THESE:\n"
+         << "test_config_file1: <my_first_test_config.kwl>\n"
+         << "test_config_file2: <my_second_test_config.kwl>\n"
+         << "// ... etc.\n"
+         << "\n"
+         << "// The remaining keywords are used exclusive of \"test_config_fileX\" above. The\n"
+         << "// config files must be either a list of subordinate configs, or a concrete, \n"
+         << "// low-level config file.\n"
+         << "\n"
+         << "// Where you want the top-level (inter-test) log files to go:\n"
+         << "log_directory: $(OBT_OUT_DIR)\\..\\log\n"
+         << "\n"
+         << "//===================================================================================\n"
+         << "// Begin Test 1\n"
+         << "// NOTE: If the config file contains just a single test, then the use of the \"test1\"\n"
+         << "// prefix is optional. Make sure the results directory spec reflects the proper path.\n"
+         << "\n"
+         << "test1.name: <YOUR_TEST_NAME>\n"
+         << "test1.description: Test height for the center of the image for test2 and test3.\n"
+         << "\n"
+         << "// Controls/turns on/off whole test (all sections):\n"
+         << "test1.enabled: 1\n"
+         << "\n"
+         << "// Individual control flags:\n"
+         << "test1.run_clean_commands: 0\n"
+         << "test1.run_preprocessing_commands: 0\n"
+         << "test1.run_expected_results_commands: 0\n"
+         << "test1.run_test_commands: 1\n"
+         << "test1.run_postprocessing_commands: 1\n"
+         << "\n"
+         << "// Temp file to catch diff output.\n"
+         << "test1.temp_file: $(TEMP)\\tmp.txt\n"
+         << "\n"
+         << "// Clean up commands\n"
+         << "test1.clean_command1: $(RMDIR_CMD) $(OBT_OUT_DIR)\n"
+         << "\n"
+         << "// Pre-process commands\n"
+         << "test1.preprocess_command1: $(MKDIR_CMD) $(OBT_OUT_DIR)\n"
+         << "test1.preprocess_command1: $(MKDIR_CMD) $(OBT_OUT_DIR)\\..\\log\n"
+         << "\n"
+         << "//---------------------------------------\n"
+         << "// Commands to generate expected results\n"
+         << "//---------------------------------------\n"
+         << "// Since test2 and test3 are dependent on elevation test the center of the image.\n"
+         << "test1.expected_results_command0: ossim-info --height -42.8508 147.2537 > $(OBT_EXP_DIR)\\height.txt\n"
+         << "test1.expected_results_command1: $(COPY_CMD) $(OBT_OUT_DIR)\\height.txt $(OBT_EXP_DIR)\\height.txt\n"
+         << "\n"
+         << "//---------------------------------------\n"
+         << "// The actual commands to test\n"
+         << "//---------------------------------------\n"
+         << "test1.test_command0: ossim-info --height -42.8508 147.2537 > $(OBT_OUT_DIR)\\height.txt\n"
+         << "\n"
+         << "//-------------------------------------------\n"
+         << "// Post process commands for diffs, etc.\n"
+         << "//-------------------------------------------\n"
+         << "test1.postprocess_command0: $(DIFF_CMD) $(OBT_EXP_DIR)\\height.txt $(OBT_OUT_DIR)\\height.txt\n"
+         << " \n"
+         << "\n"
+         << "// End <TEST_NAME>\n"
+         << "//===================================================================================\n"
+         << "// Begin <TEST2_NAME>...\n"
+         << "\n"
+         << "// You can specify additional tests by copying the test1 keywords and changing the\n"
+         << "// prefix indices to be unique. It is not necessary to be consecutive.\n"
+         << "\n"
+         << std::endl;
+   }
+   else 
+   {
+      out<< "//===================================================================================\n"
+         << "// \n"
+         << "// File: " << templateFile.c_str() << "\n"
+         << "// Generated by command: ossim-batch-test -w " << templateFile.c_str() << "\n"
+         << "// Description: ossim-batch-test template config file.\n"
+         << "// \n"
+         << "// NOTES:\n"
+         << "// * The following environment variables must be set before running batch test:\n"
+         << "//     OSSIM_BATCH_TEST_DATA     Top-level dir containing all test source data\n"
+         << "//     OSSIM_BATCH_TEST_RESULTS  Top-level dir containing all test results (exp, \n"
+         << "//                               out and log),\n"
+         << "// \n"
+         << "// * You can use existing environment variables as $(YOUR_VARIABLE). They will be \n"
+         << "//   expanded at run time if valid.\n"
+         << "// \n"
+         << "// * If the config file contains more than a single test, then it will be necessary \n" 
+         << "//   to prefix all test-specific keywords with \"testN.\"\n"
+         << "// \n"
+         << "// * The variables OBT_EXP_DIR and OBT_OUT_DIR are assigned during runtime to\n"
+         << "//   the proper paths according to the config filename. It isn't required to replace\n"
+         << "//   these nor predefine them in the environment. You can leave them as is or modify\n"
+         << "//   the paths to your unconventional file paths.\n"
+         << "// \n"
+         << "//===================================================================================\n"
+         << "\n"
+         << "description: Test height for the center of the image for test2 and test3.\n"
+         << "\n"
+         << "//---------------------------------------\n"
+         << "// Commands to generate expected results.\n"
+         << "//---------------------------------------\n"
+         << "expected_results_command0: ossim-info --height -42.8508 147.2537 > $(OBT_OUT_DIR)\\height.txt\n"
+         << "expected_results_command1: $(COPY_CMD) $(OBT_OUT_DIR)\\height.txt $(OBT_EXP_DIR)\\height.txt\n"
+         << "\n"
+         << "//---------------------------------------\n"
+         << "// The actual commands to test.\n"
+         << "//---------------------------------------\n"
+         << "test_command0: ossim-info --height -42.8508 147.2537 > $(OBT_OUT_DIR)\\height.txt\n"
+         << "\n"
+         << "//---------------------------------------\n"
+         << "// The post-processing (comparison) commands. Typically these involve a file \n"
+         << "// comparison of last run command against expected results.\n"
+         << "//---------------------------------------\n"
+         << "postprocess_command0: $(DIFF_CMD) $(OBT_EXP_DIR)\\height.txt $(OBT_OUT_DIR)\\height.txt\n"
+         << std::endl;
+   }
+
+   out.close();
+   ossimNotify(ossimNotifyLevel_NOTICE) << "Wrote file: " << templateFile.c_str() << std::endl;
+
+}
+
+//**************************************************************************************************
+// Processes a test config file
+//**************************************************************************************************
+ossim_uint8 ossimBatchTest::execute()
+{
+   if (m_templateModeActive)
+      return (ossim_uint8) TEST_PASSED;
+
+   // Establish the top-level test directory that will contain log, exp and out subdirs:
+   ossimFilename base_output_dir = ossimEnvironmentUtility::instance()->getEnvironmentVariable(
+         ossimString("OSSIM_BATCH_TEST_RESULTS") );
+   if (base_output_dir.empty())
+   {
+      cout<<"\nossimBatchTest WARNING: The environment variable OSSIM_BATCH_TEST_RESULTS is not "
+         "defined. Results will be written relative to the current working directory."<<endl;
+   }
+   base_output_dir = base_output_dir.expand().dirCat(m_configFileName.fileNoExtension());
+   
+   // The following env vars permits the user to specify the test directory as a variable in the KWL
+   // config file:
+   m_outDir = base_output_dir.dirCat("out");
+   m_expDir = base_output_dir.dirCat("exp");
+#if defined(WIN32) || defined(_MSC_VER) && !defined(__CYGWIN__) && !defined(__MWERKS__)
+   ossimString env_spec = ossimString("OBT_OUT_DIR=") + m_outDir;
+   _putenv(env_spec.chars());
+   env_spec = ossimString("OBT_EXP_DIR=") + m_expDir;
+   _putenv(env_spec.chars());
+#else
+   setenv("OBT_OUT_DIR", m_outDir.chars(), 1);
+   setenv("OBT_EXP_DIR", m_expDir.chars(), 1);
+#endif
+
+   // Turn expansion of for like: $(OBT_TEST_RESULTS)
+   ossimKeywordlist kwl;
+   kwl.setExpandEnvVarsFlag(true);
+   if (!kwl.addFile(m_configFileName))
+   {
+      return (ossim_uint8) TEST_ERROR;
+   }
+
+   // The KWL may contain names of other test config files. Is this a list of config files? If the
+   // status returns anything other than TBD, then a list was present and processed:
+   ossim_uint8 status = processConfigList(kwl);
+   if (status != TEST_TBD)
+   {
+      return status;
+   }
+
+   // Pick up individual test options passed in by user.  These will adjust the keyword list
+   // flags loaded in memory.
+   if ( m_cleanTestList.size() ) // Do this first always...
+   {
+      std::string testCommand = "run_clean_commands";
+      preprocessKwl(m_cleanTestList, testCommand, kwl);
+   }
+
+   if ( m_preprocessTestList.size() )
+   {
+      std::string testCommand = "run_preprocessing_commands";
+      preprocessKwl(m_preprocessTestList, testCommand, kwl);
+   }
+
+   if ( m_acceptTestList.size() )
+   {
+      std::string testCommand = "run_expected_results_commands";
+      preprocessKwl(m_acceptTestList, testCommand, kwl);
+   }
+
+   if ( m_runTestList.size() ) // Do this last always...
+   {
+      std::string testCommand = "run_test_commands";
+      preprocessKwl(m_runTestList, testCommand, kwl);
+   }
+
+   ossimFilename logDir = base_output_dir.dirCat("log");
+   const char* lookup = kwl.find("log_directory");
+   if ( lookup )
+   {
+      logDir = convertToNative( lookup ).c_str();
+   }
+
+   if ( logDir.exists() == false ) 
+   {
+      if ( logDir.createDirectory() == false )
+      {
+         cerr << "Could not create: " << logDir << endl;
+         return (ossim_uint8) TEST_ERROR;
+      }
+   }
+
+   // Establish path to and active stream for the log file:
+   ossimFilename logFile;
+   getLogFilename(logFile);
+   logFile = logDir.dirCat(logFile);
+   ossimSetLogFilename(logFile);
+   m_logStr.open(logFile.c_str());
+   if ( m_logStr.fail() )
+   {
+      cerr << "Could not open: " << logFile << endl;
+      return (ossim_uint8) TEST_ERROR;
+   }
+   else
+   {
+      cout << "Logging to file: " << logFile << "\n";
+   }
+
+   ossimString date;
+   getDateString(date);
+   m_logStr << "// ---\n"
+      << "// ossim-batch-test log:\n"
+      << "// date format = yyyymmddhhmmss\n"
+      << "//---\n"
+      << "start_time: " << date << "\n"
+      << "config_file: " << m_configFileName<< "\n";
+   // Start the timer.
+   ossimTimer::instance()->setStartTick();
+
+   double startTime = ossimTimer::instance()->time_s();
+
+   // Get the number of test:
+   ossimString regExpStr = "test[0-9]+\\.";
+   ossim_uint32 num_tests = kwl.getNumberOfSubstringKeys(regExpStr);
+   const ossim_uint32 MAX_INDEX = num_tests + 1000;
+   ossimString prefixBase = "test";
+   ossim_uint32 index = 0;
+   ossim_uint32 processedIndexes = 0;
+   ossimString prefix;
+
+   // If no test prefix is used, this implies a single test:
+   bool is_single_test = (num_tests == 0);
+   if (is_single_test)
+   {
+      num_tests = 1;
+      prefix = "";
+   }
+   
+   ossim_uint8 overall_test_status = (ossim_uint8) TEST_TBD;
+   while ( processedIndexes < num_tests )
+   {
+      if (!is_single_test)
+         prefix = prefixBase + ossimString::toString(index) + ".";
+
+      ossim_uint8 individual_test_status = processTest( prefix, kwl);
+      if ( individual_test_status != (ossim_uint8) TEST_TBD)
+         ++processedIndexes;
+
+      overall_test_status |= individual_test_status;
+      ++index;
+      if ( index >= MAX_INDEX ) 
+         break; 
+   }
+
+   getDateString(date);
+   m_logStr << "\nstop_time: " << date << "\n";
+   double stopTime = ossimTimer::instance()->time_s();
+   m_logStr << "total elapsed time in seconds: "
+      << std::setiosflags(ios::fixed) << std::setprecision(4)
+      << (stopTime-startTime)
+      << endl; // flush
+   m_logStr.close();
+
+   cout << "\nWrote log: " << logFile << "\n" << endl;
+   return overall_test_status;
+}
+
+//************************************************************************************************
+// Special handler for KWL containing list of test config files.
+//************************************************************************************************
+ossim_uint8 ossimBatchTest::processConfigList(const ossimKeywordlist& kwl)
+{
+   ossim_uint8 overall_test_status = (ossim_uint8) TEST_TBD;
+   ossimFilename config_list_path = m_configFileName.path();
+
+   // Look for keywords for config file name:
+   ossimString prefixBase = "test_config_file";
+   ossimString regExpStr = prefixBase + "[0-9]+";
+   const ossim_uint32 count = kwl.getNumberOfSubstringKeys(regExpStr);
+   const ossim_uint32 MAX_INDEX = count + 100;
+   if (count != 0)
+   {
+      // This is indeed a list of config files:
+      ossim_uint32 index = 0;
+      ossim_uint32 processedIndexes = 0;
+      while (processedIndexes < count)
+      {
+         // Looping over each config file listed, performing an execute() on each:
+         ossimString kw = prefixBase + ossimString::toString(index);
+         m_configFileName = ossimFilename(kwl.find(kw.chars()));
+         
+         if (!m_configFileName.empty())
+         {
+            // Expand any environment variable:
+            if (m_configFileName.contains("$("))
+               m_configFileName = m_configFileName.expand();
+
+            // Handle paths relative to the master config list file:
+            if (m_configFileName.path().empty())
+               m_configFileName = m_configFileName.setPath(config_list_path);
+         }
+
+         // Execute this config file:
+         if (m_configFileName.isReadable())
+         {
+            overall_test_status |= execute();
+            ++processedIndexes;
+         }
+
+         ++index;
+         
+         if ( index >= MAX_INDEX )
+         {
+            break;  // Config file has bad numbering...
+         }
+      }
+   }
+
+   return overall_test_status;
+}
+
+//************************************************************************************************
+//! Fetches string from OS for naming and tagging the log file.
+//************************************************************************************************
+void ossimBatchTest::getDateString(ossimString& date)
+{
+   time_t t;
+   time(&t);
+   tm* lt;
+   lt = localtime(&t);
+   std::string frmt = "%Y%m%d%H%M%S";
+   // yyyymmddhhmmss
+   char s[15];
+   size_t count = strftime(s, 15, frmt.c_str(), lt);
+   if ( count && (count < 15) )
+      date = s;
+   else
+      date.clear();
+
+}
+
+//**************************************************************************************************
+//! Establishes name of output log file.
+//**************************************************************************************************
+void ossimBatchTest::getLogFilename(ossimFilename& logFile)
+{
+   logFile = "obt-log-";
+   ossimString date;
+   getDateString(date);
+   logFile += date;
+   logFile += ".txt";
+}
+
+//**************************************************************************************************
+//! Within a single config file can be multiple tests, distinguished by the "test*." prefix. This
+//! method manages the execution of a single test.
+//**************************************************************************************************
+ossim_uint8 ossimBatchTest::processTest(const ossimString& prefix, const ossimKeywordlist& kwl)
+{
+   ossim_uint8 testStatus = TEST_TBD;
+
+   // Determine first if this test prefix is represented in the KWL:
+   if (kwl.getNumberOfSubstringKeys(prefix) == 0)
+      return testStatus;
+
+   ossimString testName;
+   const char* lookup = kwl.find( prefix, "name" );
+   if ( lookup )
+   {
+      testName = lookup;
+   }
+   if (testName.empty())
+   {
+      if (prefix.empty())
+         testName = m_configFileName.fileNoExtension();
+      else
+         testName = prefix.trim(".");
+   }
+
+   m_logStr << "\n----------------------------------------------------------------------\n";
+
+   // See if test is disabled/enabled:
+   
+   bool enabled = true;
+   lookup = kwl.find( prefix, "enabled" );
+   if ( lookup )
+   {
+      enabled = ossimString(lookup).toBool();
+   }
+
+   if ( !enabled )
+   {
+      testStatus = TEST_DISABLED;
+      ossimString statusString;
+      if ( prefix.size() )
+      {
+         statusString = prefix.trim(ossimString(".")) + ossimString(": disabled");
+      }
+      else
+      {
+         statusString = "test: disabled";
+      }
+      cout << "test_name: " << testName << "\n" << statusString << endl;
+      m_logStr << "test_name: " << testName << "\n" << statusString << endl;
+      return testStatus;
+   }
+
+   cout     << "\n\nbegin_test:\n" << prefix << "name: " << testName << "\n";
+   m_logStr << "\n\nbegin_test:\n" << prefix << "name: " << testName << "\n";   
+   lookup = kwl.find( prefix, "description" );
+   if ( lookup )
+      m_logStr << "description: " << lookup << "\n";
+
+   bool preProcessFlag  = false;
+   bool expectedFlag    = false;
+   bool testFlag        = false;
+   bool postProcessFlag = false;
+   bool cleanFlag       = false;
+   std::string date; 
+
+   lookup = kwl.find(prefix.c_str(), "run_clean_commands");
+   if ( lookup )
+   {
+      cleanFlag = ossimString(lookup).toBool();
+   }
+
+   lookup = kwl.find(prefix.c_str(), "run_preprocessing_commands");
+   if ( lookup )
+   {  
+      preProcessFlag = ossimString(lookup).toBool();
+   }
+
+   lookup = kwl.find(prefix.c_str(), "run_expected_results_commands");
+   if ( lookup )
+   {
+      expectedFlag = ossimString(lookup).toBool();
+   }
+
+   lookup = kwl.find(prefix.c_str(), "run_test_commands");
+   if ( lookup )
+   {
+      testFlag = ossimString(lookup).toBool();
+   }
+
+   lookup = kwl.find(prefix.c_str(), "run_postprocessing_commands");
+   if ( lookup )
+   {
+      postProcessFlag = ossimString(lookup).toBool();
+   }
+
+   m_logStr << "preProcessFlag:  " << preProcessFlag
+            << "\nexpectedFlag:    " <<expectedFlag
+            << "\ntestFlag:        " <<testFlag
+            << "\npostProcessFlag: " <<postProcessFlag
+            << "\ncleanFlag:       " <<cleanFlag
+            << "\n";
+
+   // Run the clean first if set...
+   if ( cleanFlag )
+   {
+      ossimString prefixBase = prefix + "clean_command";
+      testStatus |= processCommands( prefixBase, kwl, testName, false );
+   }
+
+   if ( preProcessFlag && !(testStatus & TEST_ERROR))
+   {
+      ossimString prefixBase = prefix + "preprocess_command";
+      testStatus |= processCommands( prefixBase, kwl, testName, false );
+   }
+   if ( expectedFlag  && !(testStatus & TEST_ERROR))
+   {
+      ossimString prefixBase = prefix + "expected_results_command";
+      testStatus |= processCommands( prefixBase, kwl, testName, true );
+   }
+   if ( testFlag  && !(testStatus & TEST_ERROR))
+   {
+      ossimString prefixBase = prefix + "test_command";
+      testStatus |= processCommands( prefixBase, kwl, testName, true );
+   }
+   if ( postProcessFlag  && !(testStatus & TEST_ERROR))
+   {
+      ossimFilename tempFile;
+
+      if ( getTempFileName( prefix, kwl, tempFile ) )
+      {
+         ossimString prefixBase = prefix + "postprocess_command";
+         testStatus |= processCommands( prefixBase, kwl, testName, false, tempFile );
+      }
+      else
+      {
+         m_logStr << testName << ": ERROR temp file could not be derived..." << endl;
+         testStatus |= TEST_ERROR; // Set an error bit...
+      }
+   }
+
+   cout     << "end_test:\n";
+   m_logStr << "end_test:\n";
+
+   m_logStr << "----------------------------------------------------------------------\n"; 
+   return testStatus; 
+}
+
+//**************************************************************************************************
+ossim_uint8 ossimBatchTest::processCommands(const ossimString& prefixBase,
+                                            const ossimKeywordlist& kwl,
+                                            const ossimString& testName,
+                                            bool logTime,
+                                            const ossimFilename& tempFileName)
+{
+   ossim_uint8 result = TEST_TBD;
+
+   //---
+   // We must do these in order so we will use the
+   // ossimKeywordlist::getNumberOfSubstringKeys
+   // instead of: ossimKeywordlist::getSubstringKeyList
+   //
+   // MAX_INDEX is just so people can skip numbers in their config file like:
+   // test1.command
+   // test3.command oops...
+   //---
+   ossimString regExpStr = prefixBase + "[0-9]+";
+   const ossim_uint32 num_commands = kwl.getNumberOfSubstringKeys(regExpStr);
+   const ossim_uint32 MAX_INDEX = num_commands + 1000;
+
+   // Hack to permit defaulted results paths and default clean operation:
+   if (num_commands == 0)
+   {
+      bool rtn_ok = true;
+      if (prefixBase.contains("preprocess"))
+         rtn_ok = makeDefaultResultsDir();
+      if (prefixBase.contains("clean"))
+         rtn_ok = doDefaultClean();
+      if (rtn_ok)
+         result = TEST_PASSED;
+      else
+         result = TEST_ERROR;
+      return result;
+   }
+
+   ossimString date;
+   double startTime;
+   double stopTime;
+   
+   ossimString command;
+   ossim_uint32 index = 0;
+   ossim_uint32 processedIndexes = 0;
+   const char* lookup = 0;
+   
+   bool postprocessing = false;
+   if (prefixBase.contains("postprocess"))
+      postprocessing = true;
+
+   while (  processedIndexes < num_commands )
+   {
+      ossimString cmd_kw =  prefixBase + ossimString::toString(index);
+      lookup = kwl.find( cmd_kw );
+      if ( lookup )
+      {
+         ossimString command_line = convertToNative( lookup ).c_str();
+         if ( tempFileName.size() )
+         {
+            command_line += " > " + tempFileName;
+         }
+
+         m_logStr << "executing command: " << command_line << "\n";
+
+         if ( logTime )
+         {
+            getDateString(date);
+            m_logStr << "begin: " << date << "\n";
+
+            // Start the clock:
+            startTime = ossimTimer::instance()->time_s();
+         }
+            
+         // Launch the command:
+         int status = system(command_line.chars());
+         if (status == 0)
+            result |= TEST_PASSED;
+         else if (postprocessing)
+            result |= TEST_FAILED;
+         else
+            result |= TEST_ERROR;
+
+         if ( logTime )
+         {
+            // Log the time and status:
+            stopTime = ossimTimer::instance()->time_s();
+            getDateString(date);
+            m_logStr << "end: " << date << "\n"
+                   << testName << "[" << index << "]: elapsed time in seconds: "
+                   << std::setiosflags(ios::fixed)
+                   << std::setprecision(4)
+                   << (stopTime-startTime) << "\n";
+         }
+         
+         m_logStr << "return status: " << status << "\n";
+         
+         // Output the status.
+         // If failed write the temp file to the log.  This should have the diffs in it.
+         ostringstream statusString;
+         if ( prefixBase.size() )
+         {
+            statusString << prefixBase;
+         }
+         else
+         {
+            statusString << "test";
+         }
+         statusString << "[" << index << "]: ";
+
+         if ( status != 0 )
+         {
+            // A bad return status can be a test fail if the command was a postprocess:
+            if ( postprocessing )
+            {
+               statusString << "FAILED";
+            }
+            else
+            {
+               statusString << "ERROR";
+            }
+
+            cout << statusString.str() << endl;
+            m_logStr << statusString.str() << endl;
+            m_logStr << command << "\noutput follows:\n";
+            std::ifstream in;
+            if (!tempFileName.empty())
+            {
+               in.open(tempFileName.c_str(), ios::in | ios::binary);
+               if ( in.is_open() )
+               {
+                  char ch;
+                  while ( in.get(ch) ) m_logStr.put(ch);
+                  m_logStr << "\n";
+                  in.close();
+               }
+            }
+         }
+         else
+         {
+            statusString << "PASSED";
+            cout << statusString.str() << endl;
+            m_logStr << statusString.str() << endl;
+         }
+
+         ++processedIndexes;
+      }
+      ++index;
+      
+      if ( index >= MAX_INDEX ) 
+         break; // Config file has bad numbering...
+   }
+   return result;
+}
+
+//**************************************************************************************************
+void ossimBatchTest::preprocessKwl(const std::vector<std::string>& testList,
+                                   const std::string& testCommand,
+                                   ossimKeywordlist& kwl)
+{
+   if ( testList.empty() || testCommand.empty() || (kwl.getSize()==0) )
+      return;
+
+   // Check for user passed in "all" to option.
+   std::vector<std::string>::const_iterator testIter = testList.begin();
+   bool enableAllTestFlag = false;
+   ossimString firstTest(*testIter);
+   firstTest.downcase();
+   if ( firstTest == "all" )
+   {
+      enableAllTestFlag = true;
+   }
+
+   while ( testIter != testList.end() )
+   {
+      // Get the number of test:
+      ossimString regExpStr = "test[0-9]+\\.";
+      ossim_uint32 num_tests = kwl.getNumberOfSubstringKeys(regExpStr);
+      const ossim_uint32 MAX_INDEX = num_tests + 1000;
+      ossimString prefixBase = "test";
+      ossim_uint32 index = 0;
+      ossim_uint32 processedIndexes = 0;
+
+      // A count of 0 may indicate that the config file consists of a single, unprefixed test spec:
+      bool is_single_test = false;
+      if (num_tests == 0)
+      {
+         regExpStr = "test_command[0-9]+";
+         const ossim_uint32 cmd_count = kwl.getNumberOfSubstringKeys(regExpStr);
+         if (cmd_count != 0)
+         {
+            ++num_tests;
+            is_single_test = true;
+         }
+         else
+            break; // Nothing to do here:
+      }
+
+      while ( processedIndexes < num_tests )
+      {
+         ossimString prefix ("");
+         bool test_name_matches = true;
+         bool test_exists = true;
+         
+         if (!is_single_test)
+         {
+            // The tests are prefixed with "test*". Assign the prefix for this test set:
+            prefix = prefixBase + ossimString::toString(index);
+            test_name_matches = (prefix == (*testIter).c_str());
+            prefix += ".";
+            
+            // With a valid prefix, check if this test even exists before doing any more 
+            // preprocessing:
+            regExpStr = prefix + "test_command[0-9]+";
+            const ossim_uint32 cmd_count = kwl.getNumberOfSubstringKeys(regExpStr);
+            test_exists = cmd_count > 0;
+         }
+
+         if ( test_exists )
+         {
+            if ( test_name_matches || enableAllTestFlag )
+            {
+               //---
+               // Removed adjustment of "enable" flag. Let the config file "enable" key
+               // control this.  drb - 20151202
+               // kwl.add(prefix.c_str(), "enabled", "1", true);
+               //---
+               kwl.add(prefix.c_str(), testCommand.c_str(), "1", true);
+               if ( testCommand == "run_expected_results_commands" )
+               {
+                  // Need pre-processing if clean performed.
+                  kwl.add(prefix.c_str(), "run_preprocessing_commands", "1", true);
+               }
+               if ( testCommand == "run_test_commands" )
+               {
+                  // Need pre/post-processing:
+                  kwl.add(prefix.c_str(), "run_preprocessing_commands", "1", true);
+                  kwl.add(prefix.c_str(), "run_postprocessing_commands", "1", true);
+               }
+            }
+            ++processedIndexes;
+         }
+         ++index;
+         if ( index >= MAX_INDEX ) break; 
+      }
+      ++testIter;
+
+   } // End: while ( testIter != testList.end() )
+   
+} // End: preprocessKwl method
+
+//**************************************************************************************************
+//! Default preprocessing step makes expected and output results directories. Returns TRUE if
+//! successful.
+//**************************************************************************************************
+bool ossimBatchTest::makeDefaultResultsDir()
+{
+   if ( !m_outDir.exists() && !m_outDir.createDirectory() )
+   {
+      cerr << "Could not create: " << m_outDir << endl;
+      return false;
+   }
+   if ( !m_expDir.exists() &&  !m_expDir.createDirectory() )
+   {
+      cerr << "Could not create: " << m_expDir << endl;
+      return false;
+   }
+   return true;
+}
+
+//**************************************************************************************************
+//! Default clean step deletes all files in out and exp dirs. Returns TRUE if successful.
+//**************************************************************************************************
+bool ossimBatchTest::doDefaultClean()
+{
+   bool result = true;
+
+   ossimString del_cmd = ossimEnvironmentUtility::instance()->getEnvironmentVariable(
+      ossimString("RMDIR_CMD") );
+   ossimString command_line;
+   
+   if ( m_outDir.exists() )
+   {
+      command_line = del_cmd + " " + m_outDir;
+      m_logStr << "executing command: " << command_line << "\n";
+      if (system(command_line) != 0)
+      {
+         m_logStr << "ERROR: execution failed!\n";
+         cerr << "ERROR: Could not delete <"<<m_outDir<<">. Clean operation failed."<< endl;
+         result = false;
+      }
+   }
+   
+   ossimFilename tmpDir;
+   if ( getDefaultTempFileDir( tmpDir ) )
+   {
+      if ( tmpDir.exists() )
+      {
+         command_line = del_cmd + " " + tmpDir;
+         m_logStr << "executing command: " << command_line << "\n";
+         if (system(command_line) != 0)
+         {
+            m_logStr << "ERROR: execution failed!\n";
+            cerr << "ERROR: Could not delete <"<<m_outDir<<">. Clean operation failed."<< endl;
+            result = false;
+         }
+      }
+   }
+   
+   return result;
+}
+
+bool ossimBatchTest::getTempFileName( const ossimString& prefix,
+                                      const ossimKeywordlist& kwl,
+                                      ossimFilename& tempFile ) const
+{
+   const char* lookup = kwl.find(prefix.c_str(), "temp_file");
+   if ( lookup )
+   {
+      tempFile = ossimFilename(lookup);
+      if (tempFile.contains("$("))
+         tempFile = tempFile.expand();
+   }
+   else
+   {
+      if ( getDefaultTempFileDir( tempFile ) )
+      {
+         if ( tempFile.createDirectory( true, 0775 ) )
+         {
+            // Tack on the file name.
+            tempFile = tempFile.dirCat("tmp.txt");
+         }
+         else
+         {
+            tempFile.clear();
+         }
+      }
+   }
+   return ( tempFile.size() > 0 );
+}
+
+bool ossimBatchTest::getDefaultTempFileDir( ossimFilename& tempFile ) const
+{
+   // Create a default tmp directory under OSSIM_BATCH_TEST_RESULTS.
+   tempFile = ossimEnvironmentUtility::instance()->getEnvironmentVariable(
+      ossimString("OSSIM_BATCH_TEST_RESULTS") );
+   if (!tempFile.empty())
+      tempFile = tempFile.dirCat("tmp");
+   else
+      tempFile = ossimEnvironmentUtility::instance()->getEnvironmentVariable(ossimString("TEMP"));
+   return ( tempFile.size() > 0 );
+}
+
+void ossimBatchTest::usage(ossimArgumentParser& ap)
+{
+   ossimApplicationUsage* au = ap.getApplicationUsage();
+
+   au->setApplicationName(ap.getApplicationName());
+   au->setDescription(ap.getApplicationName()+" batch test application.");
+   
+   au->setCommandLineUsage(ap.getApplicationName()+" <test-configuration-file.kwl>\n\n"
+      "This will run all test within the configuration file.  For individual test control edit "
+      "flags of the configuration file or use individual test options below. The following status "
+      "is returned on exit:"
+      "\n   -1 if any error occurred during test"
+      "\n    1 if any test failed"
+      "\n    0 if all tests passed\n");
+
+   au->addCommandLineOption("-a or --accept-test", 
+      "<testX> Runs \"run_expected_results_commands\" portion from test configuration file for "
+      "testX where X is some test number, i.e. 1, 2, 3...  This will turn off all other test in "
+      "the test config file. Notes: Multiple tests can be entered by quoting string of space "
+      "separated test, e.g. \"test1 test2\". To accept all tests use \"all\" for test.");
+   
+   au->addCommandLineOption("-c or --clean-test", "<testX> Runs \"run_clean_commands\" portion "
+      "from test configuration file for testX where X is some test number, i.e. 1, 2, 3...  This "
+      "will turn off all other test in the test config file. Notes: Multiple tests can be entered "
+      "by quoting string of space separated test, e.g. \"test1 test2\". To clean all tests use "
+      "\"all\" for test.");
+
+   au->addCommandLineOption("-p or --preprocess-test", 
+      "<testX> Runs \"run_preprocessing_commands\" portion from test configuration file for testX "
+      "where X is some test number, i.e. 1, 2, 3...  This will turn off all other test in the test "
+      "config file. Notes: Multiple tests can be entered by quoting string of space separated "
+      "test, e.g. \"test1 test2\". To preprocess all tests use \"all\" for test.");
+   
+   au->addCommandLineOption("-r or --run-test", 
+      "<testX> Runs \"run_test_commands\" portion from test configuration file for testX where X "
+      "is some test number, i.e. 1, 2, 3...  This will turn off all other test in the test config "
+      "file. Notes: Multiple tests can be entered by quoting string of space separated test, e.g. "
+      "\"test1 test2\". To run all tests use \"all\" for test.");
+   
+   au->addCommandLineOption("-h or --help", "Display usage.");
+   
+   au->addCommandLineOption("-W or -w", 
+      "<template_name.kwl> Writes a long-form (-W) or a short-form (-w) template test "
+      "configuration file.");
+
+   // Write usage.
+   au->write(ossimNotify(ossimNotifyLevel_INFO));
+}
+
+std::string ossimBatchTest::convertToNative( const char* lookup ) const
+{
+   std::string s;
+   
+   if ( lookup )
+   {
+      s = lookup;
+      const std::string::size_type SIZE = s.size();
+      std::string::size_type i = 0;
+      
+#if defined(_WIN32)
+      //---
+      // Must not convert slashes for: "del /Q", "fc /W", and "copy /Y"
+      //---
+      while( i < SIZE )
+      {
+         if( s[i] == '/' )
+         {
+            bool replace = true;
+            if ( (i+2) < SIZE ) // Could fit a window command and space like: "/Y "
+            {
+               if ( (s[i+1] == 'Q') || (s[i+1] == 'W') || (s[i+1] == 'Y') )
+               {
+                  if ( s[i+2] == ' ' ) // Check for space after "/Q".
+                  {
+                     replace = false;
+                  }
+               }
+            }
+            if ( replace )
+            {
+               s[i] = '\\';
+            }
+         }
+         ++i;
+      }
+#else
+      while( i < SIZE )
+      {
+         if( s[i] == '\\' )
+         {
+            s[i] = '/';
+         }
+         ++i;
+      }
+#endif
+      
+   } // Matches: if ( lookup )
+   
+   return s;
+}
+
diff --git a/ossim/src/ossim/util/ossimChipperUtil.cpp b/ossim/src/ossim/util/ossimChipperUtil.cpp
new file mode 100644
index 0000000..b54888c
--- /dev/null
+++ b/ossim/src/ossim/util/ossimChipperUtil.cpp
@@ -0,0 +1,5081 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimChipperUtil.cpp
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Utility class definition processing digital elevation
+// models(dems).
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimChipperUtil.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/util/ossimChipperUtil.h>
+
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimConnectableObject.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimGeoPolygon.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimProperty.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimRefreshEvent.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimVisitor.h>
+
+#include <ossim/imaging/ossimBrightnessContrastSource.h>
+#include <ossim/imaging/ossimBumpShadeTileSource.h>
+#include <ossim/imaging/ossimFilterResampler.h>
+#include <ossim/imaging/ossimFusionCombiner.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageFileWriter.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageMosaic.h>
+#include <ossim/imaging/ossimImageRenderer.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/imaging/ossimImageSourceFilter.h>
+#include <ossim/imaging/ossimImageToPlaneNormalFilter.h>
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <ossim/imaging/ossimIndexToRgbLutFilter.h>
+#include <ossim/imaging/ossimRectangleCutFilter.h>
+#include <ossim/imaging/ossimScalarRemapper.h>
+#include <ossim/imaging/ossimSFIMFusion.h>
+#include <ossim/imaging/ossimTwoColorView.h>
+#include <ossim/imaging/ossimImageSourceFactoryRegistry.h>
+#include <ossim/init/ossimInit.h>
+
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/projection/ossimImageViewAffineTransform.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/projection/ossimUtmProjection.h>
+
+#include <ossim/support_data/ossimSrcRecord.h>
+
+#include <cmath>
+#include <sstream>
+#include <string>
+
+static ossimTrace traceDebug("ossimChipperUtil:debug");
+static ossimTrace traceLog("ossimChipperUtil:log");
+static ossimTrace traceOptions("ossimChipperUtil:options");
+
+static const std::string APPLICATION_NAME_KW     = "application_name";
+static const std::string BRIGHTNESS_KW           = "brightness";
+static const std::string COLOR_BLUE_KW           = "color_blue";
+static const std::string COLOR_GREEN_KW          = "color_green";
+static const std::string COLOR_RED_KW            = "color_red";
+static const std::string CONTRAST_KW             = "contrast";
+static const std::string CLIP_WMS_BBOX_LL_KW     = "clip_wms_bbox_ll";
+static const std::string CLIP_POLY_LAT_LON_KW    = "clip_poly_lat_lon";
+static const std::string CUT_BBOX_XYWH_KW        = "cut_bbox_xywh";
+static const std::string CUT_WMS_BBOX_KW         = "cut_wms_bbox";
+static const std::string CUT_WMS_BBOX_LL_KW      = "cut_wms_bbox_ll";
+static const std::string CUT_CENTER_LAT_KW       = "cut_center_lat";
+static const std::string CUT_CENTER_LON_KW       = "cut_center_lon";
+static const std::string CUT_RADIUS_KW           = "cut_radius";  // meters
+static const std::string CUT_HEIGHT_KW           = "cut_height";  // pixels
+static const std::string CUT_MAX_LAT_KW          = "cut_max_lat";
+static const std::string CUT_MAX_LON_KW          = "cut_max_lon";
+static const std::string CUT_MIN_LAT_KW          = "cut_min_lat";
+static const std::string CUT_MIN_LON_KW          = "cut_min_lon";
+static const std::string CUT_WIDTH_KW            = "cut_width";   // pixels
+static const std::string DEM_KW                  = "dem";
+static const std::string GAIN_KW                 = "gain";
+static const std::string FILE_KW                 = "file";
+static const std::string HISTO_OP_KW             = "hist_op";
+static const std::string IMAGE_SPACE_SCALE_X_KW  = "image_space_scale_x";
+static const std::string IMAGE_SPACE_SCALE_Y_KW  = "image_space_scale_y";
+static const std::string IMG_KW                  = "image";
+static const std::string LUT_FILE_KW             = "lut_file";
+static const std::string DEGREES_X_KW            = "degrees_x";
+static const std::string DEGREES_Y_KW            = "degrees_y";
+static const std::string METERS_KW               = "meters";
+static const std::string NORTH_UP_KW             = "north_up"; // bool
+static const std::string OP_KW                   = "operation";
+static const std::string OUTPUT_RADIOMETRY_KW    = "output_radiometry";
+static const std::string PAD_THUMBNAIL_KW        = "pad_thumbnail"; // bool
+static const std::string READER_PROPERTY_KW      = "reader_property";
+static const std::string RESAMPLER_FILTER_KW     = "resampler_filter";
+static const std::string ROTATION_KW             = "rotation";
+static const std::string RRDS_KW                 = "rrds";
+static const std::string SCALE_2_8_BIT_KW        = "scale_2_8_bit";
+static const std::string SHARPEN_MODE_KW         = "sharpen_mode";
+static const std::string SNAP_TIE_TO_ORIGIN_KW   = "snap_tie_to_origin";
+static const std::string SRC_FILE_KW             = "src_file";
+static const std::string SRS_KW                  = "srs";
+static const std::string THREE_BAND_OUT_KW       = "three_band_out"; // bool
+static const std::string THUMBNAIL_RESOLUTION_KW = "thumbnail_resolution"; // pixels
+static const std::string TILE_SIZE_KW            = "tile_size"; // pixels
+static const std::string TRUE_KW                 = "true";
+static const std::string UP_IS_UP_KW             = "up_is_up"; // bool
+static const std::string WRITER_KW               = "writer";
+static const std::string WRITER_PROPERTY_KW      = "writer_property";
+static const std::string COMBINER_TYPE_KW        = "combiner_type"; 
+
+static const std::string TWOCMV_OLD_INPUT_BAND_KW      = "2cmv_old_input_band";
+static const std::string TWOCMV_NEW_INPUT_BAND_KW      = "2cmv_new_input_band";
+static const std::string TWOCMV_RED_OUTPUT_SOURCE_KW   = "2cmv_red_output_source";
+static const std::string TWOCMV_GREEN_OUTPUT_SOURCE_KW = "2cmv_green_output_source";
+static const std::string TWOCMV_BLUE_OUTPUT_SOURCE_KW  = "2cmv_blue_output_source";
+
+ossimChipperUtil::ossimChipperUtil()
+   : ossimReferenced(),
+     m_operation(OSSIM_CHIPPER_OP_UNKNOWN),
+     m_kwl(new ossimKeywordlist()),
+     m_srcKwl(0),
+     m_geom(0),
+     m_ivt(0),
+     m_demLayer(0),
+     m_imgLayer(0)
+{
+   // traceDebug.setTraceFlag(true);
+   
+   m_kwl->setExpandEnvVarsFlag(true);
+}
+
+// Private/hidden from use.
+ossimChipperUtil::ossimChipperUtil( const ossimChipperUtil& /* obj */ )
+{
+}
+
+// Private/hidden from use.
+const ossimChipperUtil& ossimChipperUtil::operator=( const ossimChipperUtil& /* rhs */)
+{
+   return *this;
+}
+
+ossimRefPtr<ossimImageSource> ossimChipperUtil::createCombiner()const
+{
+   ossimRefPtr<ossimImageSource> result;
+   ossimString combinerType = m_kwl->find(COMBINER_TYPE_KW.c_str());
+   if(combinerType.empty())
+   {
+      combinerType = "ossimImageMosaic";
+   }
+
+   result = ossimImageSourceFactoryRegistry::instance()->createImageSource(combinerType);
+   if(!result.valid())
+   {
+      result = new ossimImageMosaic();
+   }
+
+   return result;
+}
+
+ossimChipperUtil::~ossimChipperUtil()
+{
+   clear();
+}
+
+void ossimChipperUtil::addArguments(ossimArgumentParser& ap)
+{
+   ossimString usageString = ap.getApplicationName();
+   usageString += " [option]... [input-option]... <input-file(s)> <output-file>\nNote at least one input is required either from one of the input options, e.g. --input-dem <my-dem.hgt> or adding to command line in front of the output file in which case the code will try to ascertain what type of input it is.\n\nAvailable traces:\n-T \"ossimChipperUtil:debug\"   - General debug trace to standard out.\n-T \"ossimChipperUtil:log\"     - Writes a log file to output-file.log.\n-T \"ossimChipp [...]
+
+   ossimApplicationUsage* au = ap.getApplicationUsage();
+   
+   au->setCommandLineUsage(usageString);
+    
+   au->setDescription(ap.getApplicationName()+" Utility application for generating elevation products from dem data.");
+   
+   au->addCommandLineOption("--azimuth", "<azimuth>\nhillshade option - Light source azimuth angle for bump shade.\nRange: 0 to 360, Default = 180.0");
+
+   au->addCommandLineOption( "-b or --bands <n,n...>", "Use the specified bands in given order: e.g. \"3,2,1\" will select bands 3, 2 and 1 of the input image.\nNote: it is 1 based" );
+
+   au->addCommandLineOption( "--brightness", "<brightness>\nApply brightness to input image(s). Valid range: -1.0 to 1.0" );
+
+   au->addCommandLineOption("--central-meridian","<central_meridian_in_decimal_degrees>\nNote if set this will be used for the central meridian of the projection.  This can be used to lock the utm zone.");
+
+   au->addCommandLineOption("--color","<r> <g> <b>\nhillshade option - Set the red, green and blue color values to be used with hillshade.\nThis option can be used with or without an image source for color.\nRange 0 to 255, Defualt r=255, g=255, b=255");
+
+   au->addCommandLineOption("--color-table","<color-table.kwl>\nhillshade or color-relief option - Keyword list containing color table for color-relief option.");
+
+   au->addCommandLineOption( "--contrast", "<constrast>\nApply constrast to input image(s). Valid range: -1.0 to 1.0" );
+
+   au->addCommandLineOption("--cut-bbox-xywh", "<x>,<y>,<width>,<height>\nSpecify a comma separated bounding box.");
+   
+   au->addCommandLineOption("--cut-wms-bbox", "<minx>,<miny>,<maxx>,<maxy>\nSpecify a comma separated list in the format of a WMS BBOX.\nThe units are in the units of the projector defined by the --srs key");
+
+   au->addCommandLineOption("--cut-wms-bbox-ll", "<minx>,<miny>,<maxx>,<maxy>\nSpecify a comma separated list in the format of a WMS BBOX.\nThe units are always decimal degrees");
+
+   au->addCommandLineOption("--cut-width", "<width>\nSpecify the cut width in pixel");
+
+   au->addCommandLineOption("--cut-height", "<height>\nSpecify the cut height in pixel");
+
+   au->addCommandLineOption("--clip-wms-bbox-ll", "<minx>,<miny>,<maxx>,<maxy>\nSpecify a comma separated list in the format of a WMS BBOX.\nThe units are always decimal degrees");
+   
+   au->addCommandLineOption("--clip-poly-lat-lon", "Polygon in the form of a string: (lat,lon),(lat,lon),...(lat,lon)");
+
+   au->addCommandLineOption("--cut-bbox-ll", "<min_lat> <min_lon> <max_lat> <max_lon>\nSpecify a bounding box with the minimum latitude/longitude and max latitude/longitude in decimal degrees.\nNote coordinates are edge to edge.");
+   
+   au->addCommandLineOption("--cut-bbox-llwh", "<min_lat> <min_lon> <max_lat> <max_lon> <width> <height>\nSpecify a bounding box with the minimum latitude/longitude, max latitude/longitude in decimal degrees and width/height in pixels.\nNote coordinates are edge to edge.");
+   
+   au->addCommandLineOption("--cut-center-llwh","<latitude> <longitude> <width> <height>\nSpecify the center cut in latitude longitude space with width and height in pixels.");
+
+   au->addCommandLineOption("--cut-center-llr","<latitude> <longitude> <radius_in_meters>\nSpecify the center cut in latitude longitude space with radius in meters.");
+
+   au->addCommandLineOption("--degrees","<dpp_xy> | <dpp_x> <dpp_y>\nSpecifies an override for degrees per pixel. Takes either a single value applied equally to x and y directions, or two values applied correspondingly to x then y. This option takes precedence over the \"--meters\" option.");
+
+   au->addCommandLineOption("--elevation", "<elevation>\nhillshade option - Light source elevation angle for bumb shade.\nRange: 0 to 90, Default = 45.0");
+
+   au->addCommandLineOption("-e or --entry", "<entry> For multi image handlers which entry do you wish to extract. For list of entries use: \"ossim-info -i <your_image>\" ");  
+
+   au->addCommandLineOption("--exaggeration", "<factor>\nMultiplier for elevation values when computing surface normals. Has the effect of lengthening shadows for oblique lighting.\nRange: .0001 to 50000, Default = 1.0");
+   
+   au->addCommandLineOption("-h or --help", "Display this help and exit.");
+
+   au->addCommandLineOption("--hemisphere", "<hemisphere>\nSpecify a projection hemisphere if supported. E.g. UTM projection. This will lock the hemisphere even if input scene center is the other hemisphere. Valid values for UTM are \"N\" and \"S\""); 
+   
+   au->addCommandLineOption("--histogram-op", "<operation>\nHistogram operation to perform. Valid operations are \"auto-minmax\", \"std-stretch-1\", \"std-stretch-2\" and \"std-stretch-3\".");
+
+   au->addCommandLineOption("--image-space-scale","<x> <y>\nSpecifies an image space scale for x and y direction. \"chip\" operation only.");
+
+   au->addCommandLineOption("--input-dem", "<dem> Input dem to process.");
+
+   au->addCommandLineOption("--input-img", "<image> Input image to process.");
+   
+   au->addCommandLineOption("--input-src","<file.src> Input source file list keyword list with list of dems or images or both to process.");
+   
+   au->addCommandLineOption("--meters", "<meters>\nSpecifies an override for the meters per pixel");
+
+   au->addCommandLineOption("-n or --north-up", "Rotates image North up. \"chip\" operation only.");
+   
+   au->addCommandLineOption( "--op", "<operation>\nOperation to perform. Valid operations are \"chip\", \"color-relief\", \"hillshade\", \"psm\"(pan sharpened multispectral), \"2cmv\"(two color multi view) and \"ortho\".\nchip = input projection = output projection(image space), single image operation only." );
+
+   au->addCommandLineOption("--options","<options.kwl>  This can be all or part of the application options.  To get a template you can turn on trace to the ossimChipperUtil class by adding \"-T ossimChipperUtil\" to your command.");
+
+   au->addCommandLineOption("--origin-latitude","<latidude_in_decimal_degrees>\nNote if set this will be used for the origin latitude of the projection.  Setting this to something other than 0.0 with a geographic projection creates a scaled geographic projection.");
+
+   au->addCommandLineOption("--output-radiometry", "<R>\nSpecifies the desired product's pixel radiometry type. Possible values for <R> are: U8, U11, U16, S16, F32. Note this overrides the deprecated option \"scale-to-8-bit\".");
+
+   au->addCommandLineOption("--pad-thumbnail", "<boolean>\nIf true, output thumbnail dimensions will be padded in width or height to make square; else, it will have the aspect ratio of input,  Default=false");
+
+   au->addCommandLineOption("--projection", "<output_projection> Valid projections: geo, geo-scaled, input or utm\ngeo = Equidistant Cylindrical, origin latitude = 0.0\ngeo-scaled = Equidistant Cylindrical, origin latitude = image center\ninput Use first images projection. Must be a map projecion.\nutm = Universal Tranverse Mercator\nIf input and multiple sources the projection of the first image will be used.\nIf utm the zone will be set from the scene center of first image.\nNOTE: --sr [...]
+
+   au->addCommandLineOption("--resample-filter","<type>\nSpecify what resampler filter to use, e.g. nearest neighbor, bilinear, cubic, sinc.\nSee ossim-info --resampler-filters"); 
+
+   au->addCommandLineOption("-r or --rotate", "<degrees>\nRotate image by degrees. \"chip\" operation only.");
+
+   au->addCommandLineOption("--reader-prop", "<string>Adds a property to send to the reader. format is name=value");
+
+   au->addCommandLineOption("--rrds", "<rrds> Reduced resolution data set where 0 is full resolution. \"chip\" operation only.");
+   
+   au->addCommandLineOption("--scale-to-8-bit", "Scales the output to unsigned eight bits per band. This option has been deprecated by the newer \"--output-radiometry\" option.");
+
+   au->addCommandLineOption("--sharpen-mode", "<mode> Applies sharpness to image chain(s). Valid modes: \"light\", \"heavy\"");
+
+   au->addCommandLineOption("--snap-tie-to-origin",
+                                "Snaps tie point to projection origin so that (tie-origin)/gsd come out on an even integer boundary.");   
+   
+   au->addCommandLineOption("--srs","<src_code>\nSpecify a spatial reference system(srs) code for the output projection. Example: --srs EPSG:4326");
+
+   au->addCommandLineOption("-t or --thumbnail", "<max_dimension>\nSpecify a thumbnail resolution.\nScale will be adjusted so the maximum dimension = argument given.");
+
+   au->addCommandLineOption("--three-band-out", "Force three band output even if input is not. Attempts to map bands to RGB if possible.");
+
+   au->addCommandLineOption("--tile-size", "<size_in_pixels>\nSets the output tile size if supported by writer.  Notes: This sets both dimensions. Must be a multiple of 16, e.g. 1024.");
+
+   au->addCommandLineOption("-u or --up-is-up", "Rotates image to up is up. \"chip\" operation only.");
+
+   au->addCommandLineOption("-w or --writer","<writer>\nSpecifies the output writer.  Default uses output file extension to determine writer. For valid output writer types use: \"ossim-info --writers\"\n");
+   
+   au->addCommandLineOption("--writer-prop", "<writer-property>\nPasses a name=value pair to the writer for setting it's property. Any number of these can appear on the line.");
+
+   au->addCommandLineOption("--zone", "<zone>\nSpecify a projection zone if supported.  E.g. UTM projection. This will lock the zone even if input scene center is in another zone. Valid values for UTM are \"1\" to \"60\"");  
+
+   au->addCommandLineOption("--2cmv-old-input-band", "<band>\nBand to use for two color multi view old input.\n");   
+   au->addCommandLineOption("--2cmv-new-input-band", "<band>\nBand to use for two color multi view new input.\n");
+   
+   au->addCommandLineOption("--2cmv-red-output-source", "<source>\nTwo color multi view source input for red output.  Either, old, new, or mp(min pix).  Default=old.\n");
+   
+   au->addCommandLineOption("--2cmv-green-output-source", "<source>\nTwo color multi view source input for green output.  Either, old, new, or mp(min pix).  Default=new.\n");
+   
+   au->addCommandLineOption("--2cmv-blue-output-source", "<source>\nTwo color multi view source input for blue output.  Either, old, new, or mp(min pix).  Default=new.\n");
+   au->addCommandLineOption("--combiner-type", "<type>\nossimBlendMosaic, ossimFeatherMosaic, ossimImageMosaic.  Default: ossimImageMosaic.  Example --combiner-type ossimImageMosaic\n");
+   
+} // End: ossimChipperUtil::addArguments
+
+void ossimChipperUtil::clear()
+{
+      // Must disonnect chains so that they destroy.
+   std::vector< ossimRefPtr<ossimSingleImageChain> >::iterator i = m_imgLayer.begin();
+   while ( i != m_imgLayer.end() )
+   {
+      (*i)->disconnect();
+      (*i) = 0;
+      ++i;
+   }
+   m_imgLayer.clear();
+
+   i = m_demLayer.begin();
+   while ( i != m_demLayer.end() )
+   {
+      (*i)->disconnect();
+      (*i) = 0;
+      ++i;
+   }
+   m_demLayer.clear();
+
+   if(m_writer.valid())
+   {
+      m_writer->disconnect();
+      m_writer = 0;
+   }
+}
+
+bool ossimChipperUtil::initialize(ossimArgumentParser& ap)
+{
+   static const char MODULE[] = "ossimChipperUtil::initialize(ossimArgumentParser&)";
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   clear();
+   if( ap.read("-h") || ap.read("--help") || (ap.argc() == 1) )
+   {
+      usage(ap);
+      
+      return false; // Indicates process should be terminated to caller.
+   }
+
+   // Start with clean options keyword list.
+   m_kwl->clear();
+
+   std::string tempString1;
+   ossimArgumentParser::ossimParameter stringParam1(tempString1);
+   std::string tempString2;
+   ossimArgumentParser::ossimParameter stringParam2(tempString2);
+   std::string tempString3;
+   ossimArgumentParser::ossimParameter stringParam3(tempString3);
+   std::string tempString4;
+   ossimArgumentParser::ossimParameter stringParam4(tempString4);
+   std::string tempString5;
+   ossimArgumentParser::ossimParameter stringParam5(tempString5);
+   std::string tempString6;
+   ossimArgumentParser::ossimParameter stringParam6(tempString6);
+   double tempDouble1;
+   ossimArgumentParser::ossimParameter doubleParam1(tempDouble1);
+   double tempDouble2;
+   ossimArgumentParser::ossimParameter doubleParam2(tempDouble2);
+
+   ossim_uint32 demIdx        = 0;
+   ossim_uint32 imgIdx        = 0;
+   ossim_uint32 readerPropIdx = 0;
+   ossim_uint32 writerPropIdx = 0;
+   ossimString  key           = "";
+   
+   // Extract optional arguments and stuff them in a keyword list.
+   if( ap.read("--azimuth", stringParam1) )
+   {
+      m_kwl->addPair( std::string(ossimKeywordNames::AZIMUTH_ANGLE_KW), tempString1 );
+   }
+
+   if (ap.read("-b", stringParam1) || ap.read("--bands", stringParam1))
+   {
+      m_kwl->addPair( std::string(ossimKeywordNames::BANDS_KW), tempString1 );
+   }   
+
+   if( ap.read("--brightness", stringParam1) )
+   {
+      m_kwl->addPair( BRIGHTNESS_KW, tempString1 );
+   }
+   
+   if( ap.read("--central-meridian", stringParam1) )
+   {
+      m_kwl->addPair( std::string(ossimKeywordNames::CENTRAL_MERIDIAN_KW), tempString1 );
+   }
+
+   if( ap.read("--color", stringParam1, stringParam2, stringParam3) )
+   {
+      m_kwl->addPair( COLOR_RED_KW,   tempString1 );
+      m_kwl->addPair( COLOR_GREEN_KW, tempString2 );
+      m_kwl->addPair( COLOR_BLUE_KW,  tempString3 );
+   }
+
+   if( ap.read("--color-table", stringParam1) )
+   {
+      m_kwl->addPair( LUT_FILE_KW, tempString1 );
+   }
+
+   if( ap.read("--contrast", stringParam1) )
+   {
+      m_kwl->addPair( CONTRAST_KW, tempString1 );
+   }
+
+   if( ap.read("--cut-width", stringParam1) )
+   {
+      m_kwl->addPair( CUT_WIDTH_KW,   tempString1 );
+   }
+   if( ap.read("--cut-height", stringParam1) )
+   {
+      m_kwl->addPair( CUT_HEIGHT_KW,  tempString1 );
+   }
+   if( ap.read("--cut-bbox-xywh", stringParam1) )
+   {
+      m_kwl->addPair(CUT_BBOX_XYWH_KW, tempString1);
+   }
+   if( ap.read("--cut-wms-bbox", stringParam1) )
+   {
+      m_kwl->addPair(CUT_WMS_BBOX_KW, tempString1);
+   }
+   if( ap.read("--cut-wms-bbox-ll", stringParam1) )
+   {
+      m_kwl->addPair(CUT_WMS_BBOX_LL_KW, tempString1);
+   }
+   
+   if( ap.read("--clip-wms-bbox-ll", stringParam1) )
+   {
+      m_kwl->addPair(CLIP_WMS_BBOX_LL_KW, tempString1);
+   }
+   
+   if( ap.read("--clip-poly-lat-lon", stringParam1) )
+   {
+      //std::vector<ossimGpt> result;
+      //ossim::toVector(result, ossimString(tempString1));
+      //std::cout << result[0] << std::endl;
+      //std::cout <<tempString1<<std::endl;
+      //exit(0);
+      m_kwl->addPair(CLIP_POLY_LAT_LON_KW, tempString1);
+   }
+
+   if( ap.read("--cut-bbox-ll", stringParam1, stringParam2, stringParam3, stringParam4) )
+   {
+      m_kwl->addPair( CUT_MIN_LAT_KW, tempString1 );
+      m_kwl->addPair( CUT_MIN_LON_KW, tempString2 );
+      m_kwl->addPair( CUT_MAX_LAT_KW, tempString3 );
+      m_kwl->addPair( CUT_MAX_LON_KW, tempString4 );
+   }
+
+   if( ap.read("--cut-bbox-llwh", stringParam1, stringParam2, stringParam3,
+               stringParam4, stringParam5, stringParam6) )
+   {
+      m_kwl->addPair( CUT_MIN_LAT_KW, tempString1 );
+      m_kwl->addPair( CUT_MIN_LON_KW, tempString2 );
+      m_kwl->addPair( CUT_MAX_LAT_KW, tempString3 );
+      m_kwl->addPair( CUT_MAX_LON_KW, tempString4 );
+      m_kwl->addPair( CUT_WIDTH_KW,   tempString5 );
+      m_kwl->addPair( CUT_HEIGHT_KW,  tempString6 );
+   }
+   
+   if( ap.read("--cut-center-llwh", stringParam1, stringParam2, stringParam3, stringParam4) )
+   {
+      m_kwl->addPair( CUT_CENTER_LAT_KW, tempString1 );
+      m_kwl->addPair( CUT_CENTER_LON_KW, tempString2 );
+      m_kwl->addPair( CUT_WIDTH_KW,      tempString3 );
+      m_kwl->addPair( CUT_HEIGHT_KW,     tempString4 );
+   }
+
+   if( ap.read("--cut-center-llr", stringParam1, stringParam2, stringParam3) )
+   {
+      m_kwl->addPair( CUT_CENTER_LAT_KW, tempString1 );
+      m_kwl->addPair( CUT_CENTER_LON_KW, tempString2 );
+      m_kwl->addPair( CUT_RADIUS_KW,     tempString3 );
+   }
+
+   int num_params = ap.numberOfParams("--degrees", doubleParam1);
+   if (num_params == 1)
+   {
+      ap.read("--degrees", doubleParam1);
+      m_kwl->add( DEGREES_X_KW.c_str(), tempDouble1 );
+      m_kwl->add( DEGREES_Y_KW.c_str(), tempDouble1 );
+   }
+   else if (num_params == 2)
+   {
+      ap.read("--degrees", doubleParam1, doubleParam2);
+      m_kwl->add( DEGREES_X_KW.c_str(), tempDouble1 );
+      m_kwl->add( DEGREES_Y_KW.c_str(), tempDouble2 );
+   }   
+
+   if ( ap.read("--elevation", stringParam1) )
+   {
+      m_kwl->addPair( std::string(ossimKeywordNames::ELEVATION_ANGLE_KW), tempString1 );
+   }
+
+   if ( ap.read("-e", stringParam1) || ap.read("--entry", stringParam1) )
+   {
+      m_kwl->addPair( std::string(ossimKeywordNames::ENTRY_KW), tempString1 );
+   }
+
+   if ( ap.read("--exaggeration", stringParam1) )
+   {
+      m_kwl->addPair( GAIN_KW, tempString1 );
+   }
+
+   if ( ap.read("--hemisphere", stringParam1) )
+   {
+      m_kwl->addPair( std::string(ossimKeywordNames::HEMISPHERE_KW), tempString1 );
+   }
+
+   if ( ap.read("--histogram-op", stringParam1) )
+   {
+      m_kwl->addPair( HISTO_OP_KW, tempString1 );
+   }
+
+   if ( ap.read("--image-space-scale", doubleParam1, doubleParam2) )
+   {
+      m_kwl->add( IMAGE_SPACE_SCALE_X_KW.c_str(), tempDouble1 );
+      m_kwl->add( IMAGE_SPACE_SCALE_Y_KW.c_str(), tempDouble2 );      
+   }
+
+   while( ap.read("--input-dem", stringParam1) )
+   {
+      key = DEM_KW;
+      key += ossimString::toString(demIdx);
+      key += ".";
+      key += FILE_KW;
+      m_kwl->addPair( key.string(), tempString1 );
+      ++demIdx;
+   }
+   
+   while( ap.read("--input-img", stringParam1) )
+   {
+      key = IMG_KW;
+      key += ossimString::toString(imgIdx);
+      key += ".";
+      key += FILE_KW;
+      m_kwl->addPair(key.string(), tempString1 );
+      ++imgIdx;
+   }
+
+   if( ap.read("--input-src", stringParam1) )
+   {
+      m_kwl->addPair( SRC_FILE_KW, tempString1 );
+   }
+
+   if( ap.read("--meters", stringParam1) )
+   {
+      m_kwl->addPair( METERS_KW, tempString1 );
+   }
+
+   if ( ap.read("-n") || ap.read("--north-up") )
+   {
+      m_kwl->addPair( NORTH_UP_KW, TRUE_KW);
+   }
+
+   if( ap.read("--op", stringParam1) )
+   {
+      m_kwl->addPair( OP_KW, tempString1 );
+   }
+
+   //---
+   // Deprecated: "--options-keyword-list"
+   //---
+   if( ap.read("--options", stringParam1) )
+   {
+      ossimFilename optionsKwl = tempString1;
+      if ( optionsKwl.exists() )
+      {
+         if ( m_kwl->addFile(optionsKwl) == false )
+         {
+            std::string errMsg = "ERROR could not open options keyword list file: ";
+            errMsg += optionsKwl.string();
+            throw ossimException(errMsg);
+         }
+      }
+      else
+      {
+         std::string errMsg = "ERROR options keyword list file does not exists: ";
+         errMsg += optionsKwl.string();
+         throw ossimException(errMsg); 
+      }
+   }
+   
+   if( ap.read("--origin-latitude", stringParam1) )
+   {
+      m_kwl->addPair( std::string(ossimKeywordNames::ORIGIN_LATITUDE_KW), tempString1 );
+   }
+
+   if(ap.read("--output-radiometry", stringParam1))
+   {
+      m_kwl->addPair( OUTPUT_RADIOMETRY_KW, tempString1 );
+   }
+   
+   if ( ap.read("--pad-thumbnail", stringParam1) )
+   {
+      m_kwl->addPair( PAD_THUMBNAIL_KW, tempString1 );
+   }
+   
+   if( ap.read("--projection", stringParam1) )
+   {
+      m_kwl->addPair( std::string(ossimKeywordNames::PROJECTION_KW), tempString1 );
+   }
+
+   if( ap.read("--resample-filter", stringParam1) )
+   {
+      m_kwl->addPair( RESAMPLER_FILTER_KW, tempString1 );
+   }
+
+   if ( ap.read("-r", stringParam1) || ap.read("--rotate", stringParam1) )
+   {
+      m_kwl->addPair( ROTATION_KW, tempString1 );
+   }
+
+   while (ap.read("--reader-prop", stringParam1))
+   {
+      key = READER_PROPERTY_KW;
+      key += ossimString::toString(readerPropIdx);
+      m_kwl->addPair(key.string(), tempString1 );
+      ++readerPropIdx;
+   }
+
+   if ( ap.read("--rrds", stringParam1) )
+   {
+      m_kwl->addPair( RRDS_KW, tempString1);
+   }
+
+   if ( ap.read("--scale-to-8-bit") )
+   {
+      m_kwl->addPair( SCALE_2_8_BIT_KW, TRUE_KW);
+   }
+
+   if ( ap.read("--sharpen-mode", stringParam1) )
+   {
+      m_kwl->addPair( SHARPEN_MODE_KW, tempString1 );
+   }
+
+   if ( ap.read("--snap-tie-to-origin") )
+   {
+      m_kwl->addPair( SNAP_TIE_TO_ORIGIN_KW, TRUE_KW);
+   }
+   
+   if( ap.read("--srs", stringParam1) )
+   {
+      ossimString os = tempString1;
+      if ( os.contains("EPSG:") )
+      {
+         os.gsub( ossimString("EPSG:"), ossimString("") );
+      }
+      m_kwl->addPair( SRS_KW, os.string() );
+   }
+
+   if( ap.read("-t", stringParam1) || ap.read("--thumbnail", stringParam1) )
+   {
+      m_kwl->addPair( THUMBNAIL_RESOLUTION_KW, tempString1 );
+   }
+
+   if ( ap.read("--three-band-out") )
+   {
+      m_kwl->addPair( THREE_BAND_OUT_KW, TRUE_KW);
+   }
+
+   if( ap.read("--tile-size", stringParam1) )
+   {
+      m_kwl->addPair( TILE_SIZE_KW, tempString1 );
+   }
+
+   if ( ap.read("-u") || ap.read("--up-is-up") )
+   {
+      m_kwl->addPair( UP_IS_UP_KW, TRUE_KW);
+   }
+
+   if( ap.read("-w", stringParam1) || ap.read("--writer", stringParam1) )
+   {
+      m_kwl->addPair( WRITER_KW, tempString1); 
+   }
+
+   while (ap.read("--writer-prop", stringParam1))
+   {
+      key = WRITER_PROPERTY_KW;
+      key += ossimString::toString(writerPropIdx);
+      m_kwl->addPair(key.string(), tempString1 );
+      ++writerPropIdx;
+   }
+
+   if( ap.read("--zone", stringParam1) )
+   {
+      m_kwl->addPair( std::string(ossimKeywordNames::ZONE_KW), tempString1); 
+   }
+   
+   if( ap.read("--2cmv-old-input-band", stringParam1) )
+   {
+      m_kwl->addPair( TWOCMV_OLD_INPUT_BAND_KW, tempString1 );
+   }
+
+   if( ap.read("--2cmv-new-input-band", stringParam1) )
+   {
+      m_kwl->addPair( TWOCMV_NEW_INPUT_BAND_KW, tempString1 );
+   }
+   if( ap.read("--2cmv-red-output-source", stringParam1) )
+   {
+      m_kwl->addPair( TWOCMV_RED_OUTPUT_SOURCE_KW, tempString1 );
+   }
+   
+   if( ap.read("--2cmv-green-output-source", stringParam1) )
+   {
+      m_kwl->addPair( TWOCMV_GREEN_OUTPUT_SOURCE_KW, tempString1 );
+   }
+   
+   if( ap.read("--2cmv-blue-output-source", stringParam1) )
+   {
+      m_kwl->addPair( TWOCMV_BLUE_OUTPUT_SOURCE_KW, tempString1 );
+   }
+   if(ap.read("--combiner-type", stringParam1))
+   {
+      m_kwl->addPair(COMBINER_TYPE_KW, tempString1);
+   }
+   // End of arg parsing.
+   ap.reportRemainingOptionsAsUnrecognized();
+   if ( ap.errors() )
+   {
+      ap.writeErrorMessages(ossimNotify(ossimNotifyLevel_NOTICE));
+      std::string errMsg = "Unknown option...";
+      throw ossimException(errMsg);
+   }
+
+   if ( ap.argc() >= 2 )
+   {
+      // Output file is last arg:
+      m_kwl->add( ossimKeywordNames::OUTPUT_FILE_KW, ap[ap.argc()-1]);
+   }
+   else
+   {
+      if ( !m_kwl->find(ossimKeywordNames::OUTPUT_FILE_KW) )
+      {
+         ap.writeErrorMessages(ossimNotify(ossimNotifyLevel_NOTICE));
+         std::string errMsg = "Must supply an output file.";
+         throw ossimException(errMsg);
+      }
+   }
+
+   if ( ap.argc() > 2 ) // User passed inputs in front of output file.
+   {
+      int pos = 1; // ap.argv[0] is application name. 
+      while ( pos < (ap.argc()-1) )
+      {
+         ossimFilename file = ap[pos];
+         if ( traceDebug() )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "argv[" << pos << "]: " << file << "\n";
+         }
+         
+         if ( isDemFile(file) )
+         {
+            key = DEM_KW;
+            key += ossimString::toString(demIdx);
+            key += ".";
+            key += FILE_KW;
+            m_kwl->addPair( key, file.string() );
+            ++demIdx;
+         }
+         else if ( isSrcFile(file) ) 
+         {
+            if ( m_kwl->find( SRC_FILE_KW.c_str() ) ) // --input-src used also
+            {
+               std::string errMsg = MODULE;
+               errMsg += "ERROR Multiple src files passed in.  Please combine into one.";
+               throw ossimException(errMsg);
+            }
+            
+            m_kwl->addPair( SRC_FILE_KW, file.string() );
+         }
+         else // Add as an input image.
+         {
+            key = IMG_KW;
+            key += ossimString::toString(imgIdx);
+            key += ".";
+            key += FILE_KW;
+            m_kwl->addPair(key.string(), file.string() );
+            ++imgIdx;
+         }
+         
+         ++pos; // Go to next arg...
+         
+      } // End: while ( pos < (ap.argc()-1) )
+       
+   } // End: if ( ap.argc() > 2 )
+
+   initialize();
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited..." << std::endl;
+   }  
+   return true;
+   
+} // End: void ossimChipperUtil::initialize(ossimArgumentParser& ap)
+
+void ossimChipperUtil::initialize( const ossimKeywordlist& kwl )
+{
+   clear();
+
+   // Start with clean options keyword list.
+   m_kwl->clear();
+
+   m_kwl->addList( kwl, true );
+
+   initialize();
+}
+
+void ossimChipperUtil::initialize()
+{
+   static const char MODULE[] = "ossimChipperUtil::initialize()";
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+   
+   if ( traceOptions() )
+   {
+      ossimFilename optionsFile;
+      getOutputFilename(optionsFile);
+      optionsFile = optionsFile.noExtension();
+      optionsFile += "-options.kwl";
+      ossimString comment = " Can be use for --options argument.";
+      m_kwl->write( optionsFile.c_str(), comment.c_str() );
+   }
+
+   // Determine the operation to do.
+   std::string op = m_kwl->findKey( OP_KW );
+   if ( op.size() )
+   {
+      ossimString s = op;
+      s.downcase();
+      
+      if ( s == "chip" )
+      {
+         m_operation = OSSIM_CHIPPER_OP_CHIP;
+      }
+      else if ( s == "hillshade" )
+      {
+         m_operation = OSSIM_CHIPPER_OP_HILL_SHADE;
+      }
+
+      else if ( s == "color-relief" )
+      {
+         m_operation = OSSIM_CHIPPER_OP_COLOR_RELIEF;
+      }
+      else if ( s == "ortho" )
+      {
+         m_operation = OSSIM_CHIPPER_OP_ORTHO;
+      }
+      else if ( s == "psm" )
+      {
+         m_operation = OSSIM_CHIPPER_OP_PSM;
+      }
+      else if ( s == "2cmv" )
+      {
+         m_operation = OSSIM_CHIPPER_OP_2CMV;
+      }
+      else
+      {
+         std::string errMsg = "unknown operation: ";
+         errMsg += s.string();
+         throw ossimException(errMsg);
+      }
+   }
+   else
+   {
+      std::string errMsg = "keyword not found: ";
+      errMsg += OP_KW;
+      errMsg += "\nUse --op option to specify operation.\n";
+      throw ossimException(errMsg);  
+   }
+
+   //---
+   // Populate the m_srcKwl if --src option was set.
+   // Note do this before creating chains.
+   //---
+   initializeSrcKwl();
+   
+   // Check for required inputs. Do this after initializeSrcKwl.
+   if ( m_operation == OSSIM_CHIPPER_OP_CHIP )
+   {
+      if ( getNumberOfInputs() != 1 )
+      {
+         std::ostringstream errMsg;
+         errMsg << op << " operation takes one input.";
+         throw ossimException( errMsg.str() );
+      }
+   }
+   
+   if ( ( m_operation == OSSIM_CHIPPER_OP_2CMV ) || ( m_operation == OSSIM_CHIPPER_OP_PSM ) )
+   {
+      if ( getNumberOfInputs() != 2 )
+      {
+         std::ostringstream errMsg;
+         errMsg << op << " operation requires two inputs.";
+         throw ossimException( errMsg.str() );
+      }
+   }
+
+   // Sanity check rotation options.
+   if ( upIsUp() || northUp() || hasRotation() )
+   {
+      std::string option;
+      ossim_uint32 rotationOptionCount = 0;
+      if ( upIsUp() )
+      {
+         option = UP_IS_UP_KW;
+         ++rotationOptionCount; 
+      }
+      if ( northUp() )
+      {
+         option = NORTH_UP_KW;
+         ++rotationOptionCount; 
+      }
+      if ( hasRotation() )
+      {
+         option = ROTATION_KW; 
+         ++rotationOptionCount;
+      }
+
+      // Can only do ONE rotation option.
+      if ( rotationOptionCount > 1 )
+      {
+         std::ostringstream errMsg;
+         if ( upIsUp() )
+         {
+            errMsg << UP_IS_UP_KW << " is on.\n";
+         }
+         if ( northUp() )
+         {
+            errMsg << NORTH_UP_KW << " is on.\n";
+         }
+         if ( hasRotation() )
+         {
+            errMsg << ROTATION_KW << " is on.\n";
+         }
+         errMsg << "Multiple rotation options do not make sense!";
+         throw ossimException( errMsg.str() );
+      }
+         
+      // One input, chip operation only.
+      if ( getNumberOfInputs() != 1 )
+      {
+         std::ostringstream errMsg;
+         errMsg << option << " option takes one input.";
+         throw ossimException( errMsg.str() );
+      }
+
+      if ( m_operation != OSSIM_CHIPPER_OP_CHIP )
+      {
+         std::ostringstream errMsg;
+         errMsg << option << " option only valid with \"chip\" operation.";
+         throw ossimException( errMsg.str() );
+      }
+   }
+
+   // Create chains for any dem sources.
+   addDemSources();
+
+   // Create chains for any image sources.
+   addImgSources();
+
+   // Initialize projection and propagate to chains.
+   initializeOutputProjection();
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "options keyword list:\n"
+         << *(m_kwl.get()) << "\n";
+      
+      if ( m_srcKwl.valid() )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "support record keyword list:\n"
+            << *(m_srcKwl.get()) << "\n";
+      }
+      
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
+   }
+   
+} // End: void ossimChipperUtil::initialize()
+
+ossimRefPtr<ossimImageSource> ossimChipperUtil::initializeChain( ossimIrect& aoi )
+{
+   static const char MODULE[] = "ossimChipperUtil::initializeChain";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   ossimString lookup;  // used throughout...
+
+   ossimRefPtr<ossimImageSource> source = 0;
+
+   if ( hasBumpShadeArg() )
+   {
+      // Create chain:
+      source = initializeBumpShadeChain();
+   }
+   else if ( m_operation == OSSIM_CHIPPER_OP_COLOR_RELIEF )
+   {
+      source = initializeColorReliefChain();
+   }
+   else if ( ( m_operation == OSSIM_CHIPPER_OP_CHIP ) ||
+             ( m_operation == OSSIM_CHIPPER_OP_ORTHO ) )  
+   {
+      source = combineLayers();
+   }
+   else if ( m_operation == OSSIM_CHIPPER_OP_2CMV )
+   {
+      source = initialize2CmvChain(); // Two Color Multiview.
+   }
+   else if ( m_operation == OSSIM_CHIPPER_OP_PSM )
+   {
+      source = initializePsmChain(); // Pan sharpened multispectral.
+   }
+
+   if ( source.valid() )
+   {
+      //---
+      // This is conditional.  Output radiometry may of may not be set.  This can also be set at
+      // the ossimSingleImageChain level.
+      //---
+      if ( ( getOutputScalarType() != OSSIM_SCALAR_UNKNOWN) &&
+           ( source->getOutputScalarType() != getOutputScalarType() ) )
+      {
+         source = addScalarRemapper( source, getOutputScalarType() );
+      }
+      
+      //---
+      // Get the area of interest. This will be the scene bounding rect if not
+      // explicitly set by user with one of the --cut options.
+      //  Need to get this before the thumbnail code.
+      //---
+      getAreaOfInterest(source.get(), aoi);
+
+      //---
+      // Set the image size here.  Note must be set after combineLayers.  This is needed for
+      // the ossimImageGeometry::worldToLocal call for a geographic projection to handle wrapping
+      // accross the date line.
+      //---
+      m_geom->setImageSize( aoi.size() );
+
+      if ( hasThumbnailResolution() )
+      {
+         //---
+         // Adjust the projection scale and get the new rect.
+         // Note this will resize the ossimImageGeometry::m_imageSize is scale changes.
+         //---
+         initializeThumbnailProjection( aoi, aoi );
+
+         // Reset the source bounding rect if it changed.
+         source->initialize();
+      }
+   }
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
+   }
+
+   return source;
+}
+
+void ossimChipperUtil::setOptionsToChain(
+   ossimIrect& aoi, const ossimKeywordlist& /* kwl */ )
+{
+   getAreaOfInterest(m_source.get(), aoi);  
+}
+
+ossimRefPtr<ossimImageSource> ossimChipperUtil::initializeBumpShadeChain()
+{
+   static const char MODULE[] = "ossimChipperUtil::initializeBumpShadeChain";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   ossimString lookup;
+   ossimRefPtr<ossimImageSource> source = 0;
+
+   // Combine the dems.
+   ossimRefPtr<ossimImageSource> demSource = combineLayers( m_demLayer );
+   
+   // Set up the normal source.
+   ossimRefPtr<ossimImageToPlaneNormalFilter> normSource = new ossimImageToPlaneNormalFilter;
+
+   //---
+   // Set the track scale flag to true.  This enables scaling the surface
+   // normals by the GSD in order to maintain terrain proportions.
+   //---
+   normSource->setTrackScaleFlag(true);
+   
+   // Connect to dems.
+   normSource->connectMyInputTo( demSource.get() );
+   
+   // Set the smoothness factor.
+   ossim_float64 gain = 1.0;
+   lookup = m_kwl->findKey( GAIN_KW );
+   if ( lookup.size() )
+   {
+      gain = lookup.toFloat64();
+   }
+   normSource->setSmoothnessFactor(gain);
+
+   ossimRefPtr<ossimImageSource> colorSource = 0;
+   if ( hasLutFile() )
+   {
+      if ( m_imgLayer.size() )
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << MODULE << " WARNING:"
+            << "\nBoth a color table and image(s) have been provided for a color source.\n"
+            << "Choosing color table of image(s).\n";
+      }
+
+      colorSource = addIndexToRgbLutFilter( demSource );
+   }
+   else
+   {
+      // Combine the images and set as color source for bump shade.
+      colorSource = combineLayers( m_imgLayer );
+   }
+
+   // Create the bump shade.
+   ossimRefPtr<ossimBumpShadeTileSource> bumpShade = new ossimBumpShadeTileSource;
+
+   // Set the azimuth angle.
+   ossim_float64 azimuthAngle = 180;
+   lookup = m_kwl->findKey( ossimKeywordNames::AZIMUTH_ANGLE_KW );
+   if ( lookup.size() )
+   {
+      ossim_float64 f = lookup.toFloat64();
+      if ( (f >= 0) && (f <= 360) )
+      {
+         azimuthAngle = f;
+      }
+   }
+   bumpShade->setAzimuthAngle(azimuthAngle);
+
+   // Set the elevation angle.
+   ossim_float64 elevationAngle = 45.0;
+   lookup = m_kwl->findKey( ossimKeywordNames::ELEVATION_ANGLE_KW );
+   if ( lookup.size() )
+   {
+      ossim_float64 f = lookup.toFloat64();
+      if ( (f >= 0.0) && (f <= 90) )
+      {
+         elevationAngle = f;
+      }
+   }
+   bumpShade->setElevationAngle(elevationAngle);
+
+   if ( !hasLutFile() )
+   {
+      // Set the color.
+      ossim_uint8 r = 0xff;
+      ossim_uint8 g = 0xff;
+      ossim_uint8 b = 0xff;
+      lookup = m_kwl->findKey( COLOR_RED_KW );
+      if ( lookup.size() )
+      {
+         r = lookup.toUInt8();
+      }
+      lookup = m_kwl->findKey( COLOR_GREEN_KW );
+      if ( lookup.size() )
+      {
+         g = lookup.toUInt8();
+      }
+      lookup = m_kwl->findKey( COLOR_BLUE_KW );
+      if ( lookup.size() )
+      {
+         b = lookup.toUInt8();
+      }
+      bumpShade->setRgbColorSource(r, g, b);
+   }
+
+   // Connect the two sources.
+   bumpShade->connectMyInputTo(0, normSource.get());
+   bumpShade->connectMyInputTo(1, colorSource.get());
+   
+   if ( traceDebug() )
+   {
+      ossim_uint8 r = 0xff;
+      ossim_uint8 g = 0xff;
+      ossim_uint8 b = 0xff;
+      bumpShade->getRgbColorSource(r, g, b);
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "\nazimuthAngle:      " << azimuthAngle
+         << "\nelevation angle:   " << elevationAngle
+         << "\ngain factor:       " << gain
+         << "\nr:                 " << int(r)
+         << "\ng:                 " << int(g)
+         << "\nb:                 " << int(b)
+         << "\n";
+   }
+   
+   // Capture the pointer to give to the writer.
+   source = bumpShade.get();
+
+   return source;
+   
+} // End: ossimChipperUtil::initializeBumpShadeChain()
+
+ossimRefPtr<ossimImageSource> ossimChipperUtil::initializeColorReliefChain()
+{
+   ossimRefPtr<ossimImageSource> result = combineLayers();
+   if ( hasLutFile() )
+   {
+      result = addIndexToRgbLutFilter( result );
+   }
+   else
+   {
+      // No LUT file provided, so doing the default 8-bit linear stretch:
+      if ( result->getOutputScalarType() != OSSIM_UINT8 )
+      {
+         result = addScalarRemapper( result, OSSIM_UINT8 );
+      }
+   }
+   return result;  
+}
+
+ossimRefPtr<ossimImageSource> ossimChipperUtil::initializePsmChain()
+{
+   ossimRefPtr<ossimImageSource> result = 0;
+   
+   ossim_uint32 layerCount = (ossim_uint32) (m_demLayer.size() + m_imgLayer.size());
+
+   // Must have two and only two inputs.
+   if ( layerCount == 2 )
+   {     
+      ossimRefPtr<ossimSingleImageChain> input1 = 0; // First input should be color.
+      ossimRefPtr<ossimSingleImageChain> input2 = 0; // Second input should be pan.
+
+      // Most likely case, two image layers.
+      if ( m_imgLayer.size() )
+      {
+         input1 = m_imgLayer[0].get();
+         
+         if ( m_imgLayer.size() == 2 )
+         {
+            input2 = m_imgLayer[1].get();
+         }
+      }
+
+      if ( m_demLayer.size() )
+      {
+         if ( !input1.valid() )
+         {
+            input1 = m_demLayer[0].get();
+         }
+
+         if ( !input2.valid() )
+         {
+            if ( m_demLayer.size() == 1 )
+            {
+               input2 = m_demLayer[0].get();
+            }
+            else if ( m_demLayer.size() == 2 )
+            {
+               input2 = m_demLayer[1].get();
+            }
+         }
+      }
+
+      if ( input1.valid() && input2.valid() )
+      {
+         // Make the color input the first connection to the combiner.
+         if ( input1->getNumberOfOutputBands() == 1 )
+         {
+            // Swap:
+            ossimRefPtr<ossimSingleImageChain> tmpChain = input1;
+            input1 = input2;
+            input2 = tmpChain;
+         }
+
+         //---
+         // Check the pan source for one band:
+         // This really shouldn't happen, i.e. caller should typically pass a
+         // one band pan image that is higher resolution than the color source.
+         //---
+         if ( input2->getNumberOfOutputBands() > 1 )
+         {
+            // Note this will add a band selector if there isn't one in chain.
+            std::vector<ossim_uint32> bandList(1);
+            bandList[0] = 0;
+            input2->setBandSelection( bandList );
+         }
+
+         // TODO: Make dynamic by type.
+         ossimRefPtr<ossimFusionCombiner> psm = new ossimSFIMFusion();
+         psm->connectMyInputTo(0, input1.get());
+         psm->connectMyInputTo(1, input2.get());
+         psm->initialize();
+         result = dynamic_cast<ossimImageSource*>(psm.get());
+      }
+      
+   } // Matches: if ( layerCount == 2 ) 
+   
+   return result;
+   
+} // End: ossimChipperUtil::initializePsmChain() 
+
+void ossimChipperUtil::initializeOutputProjection()
+{
+   if ( isIdentity() )
+   {
+      createIdentityProjection();
+   }
+   else
+   {
+      // Create the output projection.
+      createOutputProjection();
+      
+      // Setup the view in all the chains.
+      propagateOutputProjectionToChains();
+   }
+}
+
+void ossimChipperUtil::execute()
+{
+   static const char MODULE[] = "ossimChipperUtil::execute";
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   ossimIrect aoi;
+   ossimRefPtr<ossimImageSource> source = initializeChain( aoi );
+
+   if ( source.valid() && !aoi.hasNans() )
+   {
+      //---
+      // Add a cut filter. This will:
+      // 1) Null out/clip any data pulled in.
+      // 2) Speed up by not propagating get tile request outside the cut or "aoi"
+      //    to the left hand side(input).
+      //---
+      ossimRefPtr<ossimRectangleCutFilter> cutter = new ossimRectangleCutFilter();
+
+      // Set the cut rectangle:
+      cutter->setRectangle( aoi );
+
+      // Null outside.
+      cutter->setCutType( ossimRectangleCutFilter::OSSIM_RECTANGLE_NULL_OUTSIDE );
+
+      // Connect cutter input to source chain.
+      cutter->connectMyInputTo( 0, source.get() );
+      
+      // Set up the writer.
+      m_writer = createNewWriter();
+
+      // Connect the writer to the cutter.
+      m_writer->connectMyInputTo(0, cutter.get());
+
+      //---
+      // Set the area of interest.
+      // NOTE: This must be called after the writer->connectMyInputTo as
+      // ossimImageFileWriter::initialize incorrectly resets theAreaOfInterest
+      // back to the bounding rect.
+      //---
+      m_writer->setAreaOfInterest(aoi);
+
+      if (m_writer->getErrorStatus() == ossimErrorCodes::OSSIM_OK)
+      {
+         // Add a listener to get percent complete.
+         ossimStdOutProgress prog(0, true);
+         m_writer->addListener(&prog);
+
+         if ( traceLog() )
+         {
+            ossimKeywordlist logKwl;
+            m_writer->saveStateOfAllInputs(logKwl);
+            
+            ossimFilename logFile;
+            getOutputFilename(logFile);
+            logFile.setExtension("log");
+
+            logKwl.write( logFile.c_str() );
+         }
+         
+         // Write the file:
+         m_writer->execute();
+
+         m_writer->removeListener(&prog);
+
+         if(m_writer->isAborted())
+         {
+            throw ossimException( "Writer Process aborted!" );
+         }
+      }
+      else
+      {
+         throw ossimException( "Unable to initialize writer for execution" );
+      }
+   }
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
+   }   
+}
+void ossimChipperUtil::abort()
+{
+   if(m_writer.valid())
+   {
+      m_writer->abort();
+   }
+}
+  
+ossimRefPtr<ossimImageData> ossimChipperUtil::getChip(const ossimKeywordlist& optionsKwl)
+{
+  ossimRefPtr<ossimImageData> result = 0;
+
+  ossimIrect aoi;
+  
+  if(optionsKwl.getSize() > 0)
+  {
+    m_kwl->addList(optionsKwl, true);
+  }
+
+  // (GP)
+  // Until we add more ellaborate code to check for scale changes 
+  // as well as moving windows we will just always initialize
+  // the output projection
+  //
+  initializeOutputProjection();
+  if(!m_source.valid())
+  {
+    m_source = initializeChain( aoi );
+  }
+  getAreaOfInterest(m_source.get(), aoi);
+
+  m_geom->setImageSize( aoi.size() );
+
+  if ( m_source.valid() )
+  {    
+    result = m_source->getTile( aoi, 0 );
+  }
+
+   return result;
+}
+
+void ossimChipperUtil::addDemSources()
+{
+   static const char MODULE[] = "ossimChipperUtil::addDemSources";
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   // Add the images from the options keyword list.
+   ossim_uint32 demCount = m_kwl->numberOf( DEM_KW.c_str() );
+   ossim_uint32 maxIndex = demCount + 100; // Allow for skippage in numbering.
+   ossim_uint32 foundRecords = 0;
+   ossim_uint32 i = 0;
+   while ( foundRecords < demCount )
+   {
+      ossimString key = DEM_KW;
+      key += ossimString::toString(i);
+      key += ".";
+      key += FILE_KW;
+      ossimFilename f = m_kwl->findKey( key.string() );
+      if ( f.size() )
+      {
+         // Look for the entry key, e.g. dem0.entry: 10
+         ossim_uint32 entryIndex = 0;
+         key = DEM_KW;
+         key += ossimString::toString(i);
+         key += ".";
+         key += ossimKeywordNames::ENTRY_KW;
+         std::string value = m_kwl->findKey( key.string() );
+         if ( value.size() )
+         {
+            entryIndex = ossimString(value).toUInt32();
+         }
+         else
+         {
+            // Get global entry.  Set by "-e" on command line apps.
+            entryIndex = getEntryNumber();
+         }
+         
+         addDemSource( f, entryIndex );
+         ++foundRecords;
+      }
+      ++i;
+      if ( i >= maxIndex ) break;
+   }
+
+   if ( m_srcKwl.valid() )
+   {
+      // Add stuff from src keyword list.
+      demCount = m_srcKwl->numberOf( DEM_KW.c_str() );
+      maxIndex = demCount + 100;
+      foundRecords = 0;
+      i = 0;
+      while ( foundRecords < demCount )
+      {
+         ossimString prefix = DEM_KW;
+         prefix += ossimString::toString(i);
+         prefix += ".";
+         ossimSrcRecord src;
+         if ( src.loadState( *(m_srcKwl.get()), prefix ) )
+         {
+            addDemSource(src);
+            ++foundRecords;
+         }
+         ++i;
+         if ( i >= maxIndex ) break;
+      }
+   }
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
+   } 
+}
+
+void ossimChipperUtil::addDemSource(const ossimFilename& file, ossim_uint32 entryIndex)
+{
+   static const char MODULE[] = "ossimChipperUtil::addDemSource(const ossimFilename&)";
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   ossimRefPtr<ossimSingleImageChain> ic = createChain(file, entryIndex, true);
+   if ( ic.valid() )
+   {
+      m_demLayer.push_back(ic);
+   }
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exiting...\n";
+   }
+}
+
+void ossimChipperUtil::addDemSource(const ossimSrcRecord& rec)
+{
+   static const char MODULE[] = "ossimChipperUtil::addDemSource(const ossimSrcRecord&)";
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   ossimRefPtr<ossimSingleImageChain> ic = createChain(rec, true);
+   if ( ic.valid() )
+   {
+      m_demLayer.push_back(ic);
+   }
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exiting...\n";
+   }
+}
+
+void ossimChipperUtil::addImgSources()
+{
+   static const char MODULE[] = "ossimChipperUtil::addImgSources";
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+   
+   ossim_uint32 imgCount = m_kwl->numberOf( IMG_KW.c_str() );
+   ossim_uint32 maxIndex = imgCount + 100; // Allow for skippage in numbering.
+   ossim_uint32 foundRecords = 0;
+   ossim_uint32 i = 0;
+   while ( foundRecords < imgCount )
+   {
+      ossimString key = IMG_KW;
+      key += ossimString::toString(i);
+      key += ".";
+      key += FILE_KW;
+      ossimFilename f = m_kwl->findKey( key.string() );
+      if ( f.size() )
+      {
+         // Look for the entry key, e.g. image0.entry: 10
+         ossim_uint32 entryIndex = 0;
+         key = IMG_KW;
+         key += ossimString::toString(i);
+         key += ".";
+         key += ossimKeywordNames::ENTRY_KW;
+         std::string value = m_kwl->findKey( key.string() );
+         if ( value.size() )
+         {
+            entryIndex = ossimString(value).toUInt32();
+         }
+         else
+         {
+            // Get global entry.  Set by "-e" on command line apps.
+            entryIndex = getEntryNumber();
+         }
+         // Add it:
+         addImgSource(f, entryIndex );         
+         ++foundRecords;
+      }
+      ++i;
+      if ( i >= maxIndex ) break;
+   }
+
+   if ( m_srcKwl.valid() )
+   {
+      // Add stuff from src keyword list.
+      imgCount = m_srcKwl->numberOf( IMG_KW.c_str() );
+      maxIndex = imgCount + 100;
+      foundRecords = 0;
+      i = 0;
+      while ( foundRecords < imgCount )
+      {
+         ossimString prefix = IMG_KW;
+         prefix += ossimString::toString(i);
+         prefix += ".";
+         ossimSrcRecord src;
+         if ( src.loadState( *(m_srcKwl.get()), prefix ) )
+         {
+            addImgSource(src);
+            ++foundRecords;
+         }
+         ++i;
+         if ( i >= maxIndex ) break;
+      }
+   }
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
+   }
+}
+
+void ossimChipperUtil::addImgSource(const ossimFilename& file, ossim_uint32 entryIndex)
+{
+   static const char MODULE[] = "ossimChipperUtil::addImgSource";
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " entered...\nFile: " << file << "\n";
+   }
+
+   ossimRefPtr<ossimSingleImageChain> ic = createChain(file, entryIndex, false);
+   if ( ic.valid() )
+   {
+      m_imgLayer.push_back(ic);
+   }
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exiting...\n";
+   }
+}
+
+void ossimChipperUtil::addImgSource(const ossimSrcRecord& rec)
+{
+   static const char MODULE[] = "ossimChipperUtil::addImgSource(const ossimSrcRecord&)";
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   ossimRefPtr<ossimSingleImageChain> ic = createChain(rec, false);
+   if ( ic.valid() )
+   {
+      m_imgLayer.push_back(ic);
+   }
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exiting...\n";
+   }
+}
+
+ossimRefPtr<ossimSingleImageChain> ossimChipperUtil::createChain(const ossimFilename& file,
+                                                                 ossim_uint32 entryIndex,
+                                                                 bool isDemSource) const
+{
+   static const char MODULE[] = "ossimChipperUtil::createChain(const ossimFilename&";
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " entered..."
+         << "\nfile: " << file
+         << "\nentry: " << entryIndex
+         << "\nisDemSource: " << (isDemSource?"true":"false")
+         << "\n";
+   }   
+   
+   ossimRefPtr<ossimSingleImageChain> ic = 0;
+
+   if ( file.size() )
+   {
+      if ( file.exists() )
+      {
+         ic = new ossimSingleImageChain;
+         if ( ic->open( file ) )
+         {
+            // Set any reader props:
+            setReaderProps( ic->getImageHandler().get() );
+            
+            // we can't guarantee the state of the image handler at this point so
+            // let's make sure that the entry is always set to the requested location
+            //  On Cib/Cadrg we were having problems.  Removed the compare for entry 0
+            //
+
+             if ( setChainEntry( ic, entryIndex ) == false )
+             {
+                std::ostringstream errMsg;
+                errMsg << MODULE << " ERROR:\nEntry " << entryIndex << " out of range!"
+                       << std::endl;
+                throw ossimException( errMsg.str() );
+             }
+
+            //---
+            // If PSM (pan sharpening) operation and this input is one band, don't
+            // mess with its bands.
+            //---
+            bool psmPanInput = false;
+            if ( ( m_operation == OSSIM_CHIPPER_OP_PSM ) && ( ic->getNumberOfOutputBands() == 1 ) )
+            {
+               psmPanInput = true;
+            }
+            
+            // Bands selection.  Note: Not performed on PSM pan band.
+            if ( !psmPanInput )
+            {
+               if ( isThreeBandOut() )
+               {
+                  //---
+                  // This will guarantee three bands out.  Will put band selector at
+                  // the end of the chain if input is one band.
+                  //---
+                  ic->setThreeBandFlag( true );
+               }
+
+               if ( hasBandSelection() ) 
+               {
+                  // User entered band list.
+                  std::vector<ossim_uint32> bandList(0);
+                  getBandList( bandList );
+                  if ( bandList.size() )
+                  {
+                     ic->setBandSelection( bandList );
+                  }
+               }
+            }
+            
+            //---
+            // If multiple inputs and scaleToEightBit do it at the end of the processing
+            // chain to alleviate un-even stretches between inputs.
+            //---
+            const ossim_uint32 INPUT_COUNT = getNumberOfInputs();
+            bool scaleFlag = ( scaleToEightBit() && (INPUT_COUNT == 1) );
+            ic->setRemapToEightBitFlag( scaleFlag );
+            
+            // Always have resampler cache.
+            ic->setAddResamplerCacheFlag(true);
+
+            //---
+            // Don't need a chain cache as we're doing a sequential write.  So the same tile
+            // should never be visited more than once.
+            //---
+            ic->setAddChainCacheFlag(false);
+
+            //---
+            // Histogram:
+            // Don't apply histogram stretch to dem sources for hill shade
+            // operation.
+            //---
+            if ( ( isDemSource == false ) ||
+                 ( isDemSource && (m_operation != OSSIM_CHIPPER_OP_HILL_SHADE) ) )
+            {
+               ic->setAddHistogramFlag( hasHistogramOperation() );
+            }
+
+            // Brightness, contrast. Note in same filter.
+            if ( hasBrightnesContrastOperation() )
+            {
+               ic->setBrightnessContrastFlag(true);
+            }
+
+            std::string sharpnessMode = getSharpenMode();
+            if ( sharpnessMode.size() )
+            {
+               ic->setSharpenFlag(true);
+            }
+
+            // Create the chain.
+            ic->createRenderedChain();
+
+            // Set the filter type if needed.
+            ossimString lookup = m_kwl->findKey( RESAMPLER_FILTER_KW );
+            if ( lookup.size() )
+            {
+               // Assumption image renderer is in chain:
+               ic->getImageRenderer()->getResampler()->setFilterType( lookup );
+            }
+
+            // Histogram setup.
+            if ( hasHistogramOperation() )
+            {
+               setupChainHistogram( ic );
+            }
+
+            // Brightness constrast setup:
+            if ( hasBrightnesContrastOperation() )
+            {
+               // Assumption bright contrast filter in chain:
+               
+               ossim_float64 value = getBrightness();
+               ic->getBrightnessContrast()->setBrightness( value );
+               
+               value = getContrast();
+               ic->getBrightnessContrast()->setContrast( value );
+            }
+
+            // Sharpness:
+            if ( sharpnessMode.size() )
+            {
+               if ( sharpnessMode == "light" )
+               {
+                  ic->getSharpenFilter()->setWidthAndSigma( 3, 0.5 );
+               }
+               else if ( sharpnessMode == "heavy" )
+               {
+                  ic->getSharpenFilter()->setWidthAndSigma( 5, 1.0 );
+               }
+            }
+
+            if(hasGeoPolyCutterOption())
+            {
+               ossimGeoPolygon polygon;
+               getClipPolygon(polygon);
+               if(polygon.size()>0)
+               {
+                  ic->addGeoPolyCutterPolygon(polygon);
+               }
+            }
+         }
+      }
+   }
+
+   if ( ic.valid() == false )
+   {
+      std::string errMsg = "Could not open: ";
+      errMsg += file.string();
+      throw ossimException(errMsg); 
+   }
+
+   if ( traceDebug() )
+   {
+      ossimKeywordlist kwl;
+      ic->saveState(kwl, 0);
+
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "chain:\n" << kwl << "\n"
+         << MODULE << " exiting...\n";
+   }   
+
+   return ic;
+}
+
+ossimRefPtr<ossimSingleImageChain> ossimChipperUtil::createChain(const ossimSrcRecord& rec,
+                                                                 bool isDemSource) const
+{
+   static const char MODULE[] = "ossimChipperUtil::createChain(const ossimSrcRecord&)";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }   
+   
+   ossimRefPtr<ossimSingleImageChain> ic = new ossimSingleImageChain;
+   if ( ic->open(rec) )
+   {
+      //---
+      // If multiple inputs and scaleToEightBit do it at the end of the processing
+      // chain to alleviate un-even strectes between inputs.
+      //---
+      bool scaleFlag = ( scaleToEightBit() && ( getNumberOfInputs() == 1) );
+      ic->setRemapToEightBitFlag( scaleFlag );
+      
+      // Always have resampler cache.
+      ic->setAddResamplerCacheFlag(true);
+      
+      //---
+      // Don't need a chain cache as we're doing a sequential write.  So the same tile
+      // should never be visited more than once.
+      //---
+      ic->setAddChainCacheFlag(false);
+
+      // Histogram.
+      if ( isDemSource == false )
+      {
+         ic->setAddHistogramFlag( hasHistogramOperation() );
+      }
+
+      //---
+      // NOTE: Histogram and band selector can be set in ic->createRenderedChain(rec)
+      // if the right keywords are there.
+      //---
+      ic->createRenderedChain(rec);
+
+      // Set the filter type if needed.
+      ossimString lookup = m_kwl->findKey( RESAMPLER_FILTER_KW );
+      if ( lookup.size() )
+      {
+         ic->getImageRenderer()->getResampler()->setFilterType( lookup );
+      }
+   }
+   else // Open failed.
+   {
+      std::string errMsg = "Could not open from src record!";
+      throw ossimException(errMsg); 
+   }
+
+   if ( traceDebug() )
+   {
+      ossimKeywordlist kwl;
+      ic->saveState(kwl, 0);
+
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "chain:\n" << kwl << "\n"
+         << MODULE << " exiting...\n";
+   }   
+
+   return ic;
+}
+   
+void ossimChipperUtil::createOutputProjection()
+{
+   static const char MODULE[] = "ossimChipperUtil::createOutputProjection";
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   std::string op  = m_kwl->findKey( std::string(ossimKeywordNames::PROJECTION_KW) );
+   std::string srs = m_kwl->findKey( SRS_KW );
+   
+   if ( op.size() && srs.size() )
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << MODULE << " WARNING:"
+         << "\nBoth " << SRS_KW << " and " << ossimKeywordNames::PROJECTION_KW
+         << " keywords are set!"
+         << "\nsrs:               " << srs
+         << "\noutput_projection: " << op
+         << "\nTaking " << srs << " over " << op << "\n";
+   }
+   
+   bool usingInput = false;
+   ossimChipperOutputProjection projType = getOutputProjectionType();
+   ossimRefPtr<ossimMapProjection> proj = 0;
+   
+   // If an srs code use that first.
+   if ( srs.size() )
+   {
+      proj = getNewProjectionFromSrsCode( srs );
+   }
+   else if ( op.size() )
+   {
+      switch ( projType )
+      {
+         case ossimChipperUtil::OSSIM_CHIPPER_PROJ_GEO:
+         {
+            proj = getNewGeoProjection();
+            break;
+         }
+         case ossimChipperUtil::OSSIM_CHIPPER_PROJ_GEO_SCALED:
+         {
+            proj = getNewGeoScaledProjection();
+            break;
+         }
+         case ossimChipperUtil::OSSIM_CHIPPER_PROJ_INPUT:
+         {
+            proj = getFirstInputProjection();
+            usingInput = true;
+            break;
+         }
+         case ossimChipperUtil::OSSIM_CHIPPER_PROJ_UTM:
+         {
+            proj = getNewUtmProjection();
+            break;
+         }
+         default:
+         {
+            break; // Just for un-handled type warning.
+         }
+      }
+   }
+   
+   // Check for identity projection:
+   ossimRefPtr<ossimMapProjection> inputProj = getFirstInputProjection();   
+   if ( proj.valid() && inputProj.valid() )
+   {
+      if ( *(inputProj.get()) == *(proj.get()) )
+      {
+         if ( projType == OSSIM_CHIPPER_PROJ_GEO_SCALED )
+         {
+            // Get the origin used for scaling. 
+            ossimGpt origin = proj->getOrigin();
+
+            // Copy the input projection to our projection.  Has the tie and scale we need.
+            proj = inputProj;
+
+            // Set the origin for scaling.
+            proj->setOrigin(origin);
+         }
+         else
+         {
+            proj = inputProj;
+         }
+         usingInput = true;
+      }
+   }
+   
+   if ( !proj.valid() )
+   {
+      // Try first input. If map projected use that.
+      if ( inputProj.valid() )
+      {
+         proj = inputProj;
+         usingInput = true;
+         if ( traceDebug() )
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "WARNING: No projection set!"
+               << "\nDefaulting to first input's projection.\n";
+         }
+      }
+      else
+      {
+         proj = getNewGeoScaledProjection();
+         if ( traceDebug() )
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "WARNING: No projection set!"
+               << "\nDefaulting to scaled geographic at scene center.\n";
+         }
+      }
+   }
+
+   // Create our ossimImageGeometry with projection (no transform).
+   m_geom  = new ossimImageGeometry( 0, proj.get() );
+
+   //---
+   // If the input is the same as output projection do not modify; else, set
+   // the gsd to user selected "METERS_KW" or the best resolution of the inputs,
+   // set the tie and then snap it to the projection origin.
+   //---
+   if ( !usingInput || hasScaleOption() )
+   {
+      // Set the scale.
+      initializeProjectionGsd();
+   }
+
+   // Set the tie.
+   intiailizeProjectionTiePoint();
+
+   if ( snapTieToOrigin() )
+   {
+      // Adjust the projection tie to the origin.
+      proj->snapTiePointToOrigin();
+   }
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "using input projection: " << (usingInput?"true":"false")
+         << "\noutput image geometry:\n";
+
+      m_geom->print(ossimNotify(ossimNotifyLevel_DEBUG));
+
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
+   }
+   
+} // End: ossimChipperUtil::createOutputProjection()
+
+void ossimChipperUtil::createIdentityProjection()
+{
+   static const char MODULE[] = "ossimChipperUtil::createIdentityProjection";
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   // Get the singe image chain.  Sould be only one.
+   ossimRefPtr<ossimSingleImageChain> sic = 0;
+   if ( m_demLayer.size() )
+   {
+      sic = m_demLayer[0];
+   }
+   else if ( m_imgLayer.size() )
+   {
+      sic = m_imgLayer[0];
+   }
+
+   if ( sic.valid() )
+   {
+      // Get the image handler.
+      ossimRefPtr<ossimImageHandler>  ih = sic->getImageHandler();
+
+      // Resampler:
+      ossimRefPtr<ossimImageRenderer> resampler = sic->getImageRenderer();
+
+      if ( ih.valid() )
+      {
+         //---
+         // Get the geometry from the image handler.  Since we're in "identity"
+         // mode use the inputs for the outputs.
+         //---
+         m_geom = ih->getImageGeometry();
+
+         if ( m_geom.valid() )
+         {
+            // Get the image projection.
+            ossimRefPtr<ossimProjection> proj = m_geom->getProjection();
+            if ( proj.valid() )
+            {
+               ossim_float64 rotation = 0.0;
+               if ( upIsUp() )
+               {
+                  rotation = m_geom->upIsUpAngle();
+               }
+               else if ( northUp() )
+               {
+                  rotation = m_geom->northUpAngle();
+               }
+               else if ( hasRotation() )
+               {
+                  rotation = getRotation();
+               }
+
+               if ( ossim::isnan( rotation ) )
+               {
+                  rotation = 0.0;
+               }
+
+               ossimDpt imageSpaceScale;
+               getImageSpaceScale( imageSpaceScale );
+               
+               ossimDrect rect;
+               m_geom->getBoundingRect(rect);
+               ossimDpt midPt = rect.midPoint();
+               
+               if ( traceDebug() )
+               {
+                  ossimNotify(ossimNotifyLevel_DEBUG)
+                     << MODULE
+                     << "\nAffine transform parameters:"
+                     << "\nrotation:  " << rotation
+                     << "\nmid point: " << midPt << std::endl;
+               }
+               
+               m_ivt = new ossimImageViewAffineTransform(-rotation,
+                                                         imageSpaceScale.x, // image space scale x
+                                                         imageSpaceScale.y, // image space scale y
+                                                         1.0,1.0,  //scale x and y
+                                                         0.0, 0.0, // translate x,y
+                                                         midPt.x, midPt.y); // pivot point
+
+               if ( m_kwl->hasKey( METERS_KW )    ||
+                    m_kwl->hasKey( DEGREES_X_KW ) ||
+                    m_kwl->hasKey( RRDS_KW ) )
+               {
+                  // Set the image view transform scale.
+                  initializeIvtScale();
+               }
+               
+               resampler->setImageViewTransform( m_ivt.get() );
+            }
+
+         } // Matches: if ( m_geom.valid() )
+         
+      } // Matches: if ( ih.valid() )
+      
+   } // Matches: if ( sic.valid() 
+   
+} // End: createIdentityProjection()
+
+void ossimChipperUtil::initializeIvtScale()
+{
+   if ( isIdentity() && m_ivt.valid() && m_geom.valid() )
+   {
+      ossimDpt scale;
+      scale.makeNan();
+      
+      // Check for GSD spec. Degrees/pixel takes priority over meters/pixel:
+      ossimString lookup;
+      lookup.string() = m_kwl->findKey( DEGREES_X_KW );
+      if ( lookup.size() )
+      {
+         ossimDpt outputDpp;
+         outputDpp.makeNan();
+
+         outputDpp.x = lookup.toFloat64();
+
+         lookup.string() = m_kwl->findKey( DEGREES_Y_KW );
+         if ( lookup.size() )
+         {
+            outputDpp.y = lookup.toFloat64();
+         }
+         
+         if ( !outputDpp.hasNans() )
+         {
+            // Input degress per pixel.  Consider this a scale of 1.0.
+            ossimDpt inputDpp;
+            m_geom->getDegreesPerPixel( inputDpp );
+
+            if ( !inputDpp.hasNans() )
+            {
+               scale.x = inputDpp.x/outputDpp.x;
+               scale.y = inputDpp.y/outputDpp.y;
+            }
+         }
+      }
+
+      if ( scale.hasNans() )
+      {
+         lookup = m_kwl->findKey( METERS_KW );
+         if ( lookup.size() )
+         {
+            ossimDpt outputMpp;
+            outputMpp.makeNan();
+            outputMpp.x = lookup.toFloat64();
+            outputMpp.y = outputMpp.x;
+
+            if ( !outputMpp.hasNans() )
+            {
+               // Input meters per pixel.  Consider this a scale of 1.0.
+               ossimDpt inputMpp;
+               m_geom->getMetersPerPixel( inputMpp );
+               
+               if ( !inputMpp.hasNans() )
+               {
+                  scale.x = inputMpp.x/outputMpp.x;
+                  scale.y = inputMpp.y/outputMpp.y;
+               }
+            }
+         }
+      }
+
+      if ( scale.hasNans() )
+      {
+         lookup = m_kwl->findKey( RRDS_KW );
+         if ( lookup.size() )
+         {
+            ossim_float64 d = lookup.toInt32();
+            if ( d == 0.0 )
+            {
+               scale.x = 1.0;
+            }
+            else
+            {
+               scale.x = 1.0 / std::pow(2.0, d);
+            }
+            scale.y = scale.x;
+         }
+      }
+
+      if ( !scale.hasNans() )
+      {
+         m_ivt->scale( scale.x, scale.y );
+      }
+      else
+      {
+         std::string errMsg = "ossimChipperUtil::initializeIvtScale failed!";
+         throw ossimException(errMsg);
+      }
+      
+   } // Matches: if ( isIdentity() && ... )
+   
+} // End: ossimChipperUtil::initializeIvtScale()
+
+void ossimChipperUtil::intiailizeProjectionTiePoint()
+{
+   static const char MODULE[] = "ossimChipperUtil::initializeProjectionTiePoint()";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   // Get the map projection from the output geometry:
+   ossimRefPtr<ossimMapProjection> mapProj = getMapProjection();
+
+   if ( mapProj.valid() )
+   {
+      //---
+      // If the output is geographic of there are sensor model inputs, get the tie
+      // using the ground point.
+      //---
+      if ( mapProj->isGeographic() || hasSensorModelInput() )
+      {
+         ossimGpt tiePoint;
+         tiePoint.makeNan();
+         getTiePoint(tiePoint);
+         
+         if ( !tiePoint.hasNans() )
+         {
+            //---
+            // The tie point coordinates currently reflect the UL edge of the UL pixel.
+            // We'll need to shift the tie point bac from the edge to the center base on the
+            // output gsd.
+            //---
+            ossimDpt half_pixel_shift = m_geom->getDegreesPerPixel() * 0.5;
+            tiePoint.lat -= half_pixel_shift.lat;
+            tiePoint.lon += half_pixel_shift.lon;
+            mapProj->setUlTiePoints(tiePoint);
+         }
+         else
+         {
+            std::string errMsg = MODULE;
+            errMsg += " tie point has nans!";
+            throw( ossimException(errMsg) );
+         }
+
+         if ( traceDebug() )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "projection tie point: " << tiePoint << "\n" << MODULE << " exited...\n";
+         }
+      }
+      else
+      {
+         //---
+         // TODO: Add test for like input projections and use above geographic tie
+         // code if not.
+         //---
+         ossimDpt tiePoint;
+         tiePoint.makeNan();
+         getTiePoint(tiePoint);
+
+         if ( !tiePoint.hasNans() )
+         {
+            //---
+            // The tie point coordinates currently reflect the UL edge of the UL pixel.
+            // We'll need to shift the tie point bac from the edge to the center base on the
+            // output gsd.
+            //---
+            ossimDpt half_pixel_shift = m_geom->getMetersPerPixel() * 0.5;
+            tiePoint.y -= half_pixel_shift.y;
+            tiePoint.x += half_pixel_shift.x;
+            mapProj->setUlTiePoints(tiePoint);
+         }
+         else
+         {
+            std::string errMsg = MODULE;
+            errMsg += " tie point has nans!";
+            throw( ossimException(errMsg) );
+         }
+
+         if ( traceDebug() )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "projection tie point: " << tiePoint << "\n" << MODULE << " exited...\n";
+         }
+      }
+      
+   } // Matches: if ( mapProj.valid() )
+   else
+   {
+      std::string errMsg = MODULE;
+      errMsg += "m_projection is null!";
+      throw( ossimException(errMsg) ); 
+   }
+}
+
+void ossimChipperUtil::initializeProjectionGsd()
+{
+   static const char MODULE[] = "ossimChipperUtil::initializeProjectionGsd()";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   ossimRefPtr<ossimMapProjection> mapProj = getMapProjection();
+   if ( !mapProj.valid() )
+   {
+      std::string errMsg = MODULE;
+      errMsg += " projection is null!";
+      throw( ossimException(errMsg) ); 
+   }
+   
+   ossimDpt gsd;
+   gsd.makeNan();
+
+   ossimString degreesX;
+   ossimString degreesY;
+   ossimString meters;
+   degreesX.string() = m_kwl->findKey( DEGREES_X_KW );
+   degreesY.string() = m_kwl->findKey( DEGREES_Y_KW );      
+   meters.string()   = m_kwl->findKey( METERS_KW );
+   
+   if ( hasCutBoxWidthHeight() )
+   {
+      // --cut-bbox-llwh Implies a scale...
+      if ( degreesX.size() || degreesY.size() || meters.size() )
+      {
+         std::ostringstream errMsg;
+         errMsg << MODULE << " ERROR: Ambiguous scale keywords!\n"
+                << "Do not combine meters or degrees with cut box with a width and height.\n";
+         throw( ossimException( errMsg.str() ) );
+      }
+
+      ossimString cutMinLat;
+      ossimString cutMinLon;
+      ossimString cutMaxLat;
+      ossimString cutMaxLon;
+      ossimString cutWidth;
+      ossimString cutHeight;
+      cutMinLat.string() = m_kwl->findKey( CUT_MIN_LAT_KW );
+      cutMinLon.string() = m_kwl->findKey( CUT_MIN_LON_KW );
+      cutMaxLat.string() = m_kwl->findKey( CUT_MAX_LAT_KW );
+      cutMaxLon.string() = m_kwl->findKey( CUT_MAX_LON_KW );
+      cutWidth.string()  = m_kwl->findKey( CUT_WIDTH_KW );
+      cutHeight.string() = m_kwl->findKey( CUT_HEIGHT_KW );
+      if ( cutMinLat.size() && cutMinLon.size() && cutMaxLat.size() &&
+           cutMaxLon.size() && cutWidth.size() && cutHeight.size() )
+      {
+         ossim_float64 minLat = cutMinLat.toFloat64();
+         ossim_float64 minLon = cutMinLon.toFloat64();
+         ossim_float64 maxLat = cutMaxLat.toFloat64();
+         ossim_float64 maxLon = cutMaxLon.toFloat64();
+         ossim_float64 width  = cutWidth.toFloat64();
+         ossim_float64 height = cutHeight.toFloat64();
+         if ( !ossim::isnan(minLat) && !ossim::isnan(minLon) && !ossim::isnan(maxLat) &&
+              !ossim::isnan(maxLon) && !ossim::isnan(width) && !ossim::isnan(height) )
+         {
+            gsd.x = std::fabs( maxLon - minLon ) / width;
+            gsd.y = std::fabs( maxLat - minLat ) / height;
+
+            mapProj->setDecimalDegreesPerPixel(gsd);
+         }
+      }
+   }
+   else if(hasWmsBboxCutWidthHeight())
+   {
+      ossimString cutWidth;
+      ossimString cutHeight;
+      ossimString cutWmsBbox;
+
+      cutWidth.string()   = m_kwl->findKey( CUT_WIDTH_KW );
+      cutHeight.string()  = m_kwl->findKey( CUT_HEIGHT_KW );
+      cutWmsBbox.string() = m_kwl->findKey( CUT_WMS_BBOX_KW );
+
+      cutWmsBbox = cutWmsBbox.upcase().replaceAllThatMatch("BBOX:","");
+      std::vector<ossimString> cutBox = cutWmsBbox.split(",");
+      if(cutBox.size()==4)
+      {
+         ossim_float64 minx = cutBox[0].toFloat64();
+         ossim_float64 miny = cutBox[1].toFloat64();
+         ossim_float64 maxx = cutBox[2].toFloat64();
+         ossim_float64 maxy = cutBox[3].toFloat64();
+         ossim_float64 width  = cutWidth.toFloat64();
+         ossim_float64 height = cutHeight.toFloat64();
+         gsd.x = std::fabs( maxx - minx ) / width;
+         gsd.y = std::fabs( maxy - miny ) / height;
+
+         // bbox is in the units of the projector
+         if(mapProj->isGeographic())
+         {
+
+            mapProj->setDecimalDegreesPerPixel(gsd);
+         }
+         else
+         {
+            mapProj->setMetersPerPixel(gsd);
+         }
+      }
+      else
+      {
+         std::ostringstream errMsg;
+         errMsg << MODULE << " ERROR: cut box does not have 4 values!\n";
+         throw( ossimException( errMsg.str() ) );
+      }
+   } 
+   else
+   {
+      if ( meters.size() && ( degreesX.size() || degreesY.size() ) )
+      {  
+         std::ostringstream errMsg;
+         errMsg << MODULE << " ERROR: Ambiguous scale keywords!\n"
+                << "Do not combine meters with degrees.\n";
+         throw( ossimException( errMsg.str() ) );
+      }
+      
+      if ( degreesX.size() )
+      {
+         // --degrees
+         gsd.x = degreesX.toFloat64();
+
+         if ( degreesY.size() )
+         {
+            gsd.y = degreesY.toFloat64();
+         }
+         if ( !gsd.hasNans() )
+         {
+            mapProj->setDecimalDegreesPerPixel(gsd);
+         }
+      }
+      else if ( meters.size() )
+      {
+         // --meters
+         gsd.x = meters.toFloat64();
+         gsd.y = gsd.x;
+         if ( !gsd.hasNans() )
+         {
+            mapProj->setMetersPerPixel(gsd);
+         }
+      }
+   }
+
+   if ( gsd.hasNans() )
+   {
+      // Get the best resolution from the inputs.
+      getMetersPerPixel(gsd);
+
+      // See if the output projection is geo-scaled; if so, make the pixels square in meters.
+      if ( getOutputProjectionType() == ossimChipperUtil::OSSIM_CHIPPER_PROJ_GEO_SCALED )
+      {
+         // Pick the best resolution and make them both the same.
+         gsd.x = ossim::min<ossim_float64>(gsd.x, gsd.y);
+         gsd.y = gsd.x;
+      }
+
+      // Set to input gsd.
+      mapProj->setMetersPerPixel(gsd);
+   }
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "projection gsd: " << gsd << "\n" << MODULE << " exited...\n";
+   }
+}
+
+void ossimChipperUtil::getTiePoint(ossimGpt& tie)
+{
+   static const char MODULE[] = "ossimChipperUtil::getTiePoint(ossimGpt&)";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   std::vector< ossimRefPtr<ossimSingleImageChain> >::iterator chainIdx;
+
+   tie.lat = ossim::nan();
+   tie.lon = ossim::nan();
+   tie.hgt = 0.0;
+   
+   // Loop through dem layers.
+   ossimGpt chainTiePoint;
+   chainIdx = m_demLayer.begin();
+   while ( chainIdx != m_demLayer.end() )
+   {
+      getTiePoint( (*chainIdx).get(), chainTiePoint );
+      if ( tie.hasNans() )
+      {
+         tie = chainTiePoint;
+      }
+      else
+      {
+         if ( chainTiePoint.lat > tie.lat )
+         {
+            tie.lat = chainTiePoint.lat;
+         }
+         if ( chainTiePoint.lon < tie.lon )
+         {
+            tie.lon = chainTiePoint.lon;
+         }
+      }
+      ++chainIdx;
+   }
+
+   // Loop through image layers.
+   chainIdx = m_imgLayer.begin();
+   while ( chainIdx != m_imgLayer.end() )
+   {
+      getTiePoint( (*chainIdx).get(), chainTiePoint );
+      if ( tie.hasNans() )
+      {
+         tie = chainTiePoint;
+      }
+      else
+      {
+         if ( chainTiePoint.lat > tie.lat )
+         {
+            tie.lat = chainTiePoint.lat;
+         }
+         if ( chainTiePoint.lon < tie.lon )
+         {
+            tie.lon = chainTiePoint.lon;
+         }
+      }
+      ++chainIdx;
+   }
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "tie point: " << tie << "\n" << MODULE << " exited...\n";
+   }
+}
+
+void ossimChipperUtil::getTiePoint(ossimSingleImageChain* chain, ossimGpt& tie)
+{
+   static const char MODULE[] = "ossimChipperUtil::getTiePoint(ossimSingleImageChain*,ossimGpt&)";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }   
+
+   if (chain && m_geom.valid() )
+   {
+      //---
+      // The view is not set yet in the chain so we get the tie point from the
+      // image handler geometry not from the chain which will come from the
+      // ossimImageRenderer.
+      //---
+      ossimRefPtr<ossimImageHandler> ih = chain->getImageHandler();
+      if ( ih.valid() )
+      {
+         ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
+         if ( geom.valid() )
+         {
+            geom->getTiePoint( tie, true );
+         }
+         
+
+         // Set height to 0.0 even though it's not used so hasNans test works.
+         tie.hgt = 0.0;
+         
+         if ( tie.hasNans() )
+         {
+            std::string errMsg = MODULE;
+            errMsg += "\ngeom->localToWorld returned nan for chain.";
+            errMsg += "\nChain: ";
+            errMsg += chain->getFilename().string();
+            throw ossimException(errMsg);
+         }
+      }
+      else
+      {
+         std::string errMsg = MODULE;
+         errMsg += "\nNo geometry for chain: ";
+         errMsg += chain->getFilename().string();
+         throw ossimException(errMsg);
+      }
+   }
+   else
+   {
+      std::string errMsg = MODULE;
+      errMsg += " ERROR: Null chain passed to method!";
+      throw ossimException(errMsg);
+   }
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "chain name: " << chain->getFilename()
+         << "\ntie point:  " << tie << "\n"
+         << MODULE << " exited...\n";
+   }
+}
+
+void ossimChipperUtil::getTiePoint(ossimDpt& tie)
+{
+   static const char MODULE[] = "ossimChipperUtil::getTiePoint(ossimDpt&)";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   std::vector< ossimRefPtr<ossimSingleImageChain> >::iterator chainIdx;
+
+   tie.makeNan();
+   
+   // Loop through dem layers.
+   ossimDpt chainTiePoint;
+   chainIdx = m_demLayer.begin();
+   while ( chainIdx != m_demLayer.end() )
+   {
+      getTiePoint( (*chainIdx).get(), chainTiePoint );
+      if ( tie.hasNans() )
+      {
+         tie = chainTiePoint;
+      }
+      else
+      {
+         if ( chainTiePoint.y > tie.y )
+         {
+            tie.y = chainTiePoint.y;
+         }
+         if ( chainTiePoint.x < tie.x )
+         {
+            tie.x = chainTiePoint.x;
+         }
+      }
+      ++chainIdx;
+   }
+
+   // Loop through image layers.
+   chainIdx = m_imgLayer.begin();
+   while ( chainIdx != m_imgLayer.end() )
+   {
+      getTiePoint( (*chainIdx).get(), chainTiePoint );
+      if ( tie.hasNans() )
+      {
+         tie = chainTiePoint;
+      }
+      else
+      {
+         if ( chainTiePoint.y > tie.y )
+         {
+            tie.y = chainTiePoint.y;
+         }
+         if ( chainTiePoint.x < tie.x )
+         {
+            tie.x = chainTiePoint.x;
+         }
+      }
+      ++chainIdx;
+   }
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "tie point: " << tie << "\n" << MODULE << " exited...\n";
+   }
+}
+
+void ossimChipperUtil::getTiePoint(ossimSingleImageChain* chain, ossimDpt& tie)
+{
+   static const char MODULE[] = "ossimChipperUtil::getTiePoint(ossimSingleImageChain*,ossimDpt&)";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }   
+
+   if (chain && m_geom.valid() )
+   {
+      //---
+      // The view is not set yet in the chain so we get the tie point from the
+      // image handler geometry not from the chain which will come from the
+      // ossimImageRenderer.
+      //---
+      ossimRefPtr<ossimImageHandler> ih = chain->getImageHandler();
+      if ( ih.valid() )
+      {
+         ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
+         if ( geom.valid() )
+         {
+            geom->getTiePoint( tie, true );
+         }
+         
+         if ( tie.hasNans() )
+         {
+            std::string errMsg = MODULE;
+            errMsg += "\ngeom->localToWorld returned nan for chain.";
+            errMsg += "\nChain: ";
+            errMsg += chain->getFilename().string();
+            throw ossimException(errMsg);
+         }
+      }
+      else
+      {
+         std::string errMsg = MODULE;
+         errMsg += "\nNo geometry for chain: ";
+         errMsg += chain->getFilename().string();
+         throw ossimException(errMsg);
+      }
+   }
+   else
+   {
+      std::string errMsg = MODULE;
+      errMsg += " ERROR: Null chain passed to method!";
+      throw ossimException(errMsg);
+   }
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "chain name: " << chain->getFilename()
+         << "\ntie point:  " << tie << "\n"
+         << MODULE << " exited...\n";
+   }
+}
+
+void ossimChipperUtil::getMetersPerPixel(ossimDpt& gsd)
+{
+   static const char MODULE[] = "ossimChipperUtil::getMetersPerPixel(ossimDpt&)";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   gsd.makeNan();
+   
+   ossimDpt chainGsd;
+   std::vector< ossimRefPtr<ossimSingleImageChain> >::iterator chainIdx;
+
+   // Loop through dem layers.
+   chainIdx = m_demLayer.begin();
+   while ( chainIdx != m_demLayer.end() )
+   {
+      getMetersPerPixel( (*chainIdx).get(), chainGsd);
+      if ( gsd.hasNans() || ( chainGsd.x < gsd.x ) ) 
+      {
+         gsd = chainGsd;
+      }
+      ++chainIdx;
+   }
+
+   // Loop through image layers.
+   chainIdx = m_imgLayer.begin();
+   while ( chainIdx != m_imgLayer.end() )
+   {
+      getMetersPerPixel( (*chainIdx).get(), chainGsd);
+      if ( gsd.hasNans() || ( chainGsd.x < gsd.x ) )
+      {
+         gsd = chainGsd;
+      }
+      ++chainIdx;
+   }
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "gsd: " << gsd << "\n" << MODULE << " exited...\n";
+   }
+}
+
+void ossimChipperUtil::getMetersPerPixel(ossimSingleImageChain* chain, ossimDpt& gsd)
+{
+   static const char MODULE[] = "ossimChipperUtil::getMetersPerPixel(ossimSingleImageChain*,ossimDpt&)";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   if (chain)
+   {
+      ossimRefPtr<ossimImageGeometry> geom = chain->getImageGeometry();
+      if ( geom.valid() )
+      {
+         geom->getMetersPerPixel( gsd );
+         if ( gsd.hasNans() )
+         {
+            std::string errMsg = MODULE;
+            errMsg += "\ngeom->getMetersPerPixel returned nan for chain.";
+            errMsg += "\nChain: ";
+            errMsg += chain->getFilename().string();
+            throw ossimException(errMsg);
+         }
+      }
+      else
+      {
+         std::string errMsg = MODULE;
+         errMsg += "\nNo geometry for chain: ";
+         errMsg += chain->getFilename().string();
+         throw ossimException(errMsg);
+      }
+   }
+   else
+   {
+      std::string errMsg = MODULE;
+      errMsg += " ERROR: Null chain passed to method!";
+      throw ossimException(errMsg);
+   }
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "chain name: " << chain->getFilename()
+         << "\nmeters per pixel: " << gsd << "\n" << MODULE << " exited...\n";
+   }
+}
+
+ossim_float64 ossimChipperUtil::getCentralMeridian() const
+{
+   ossim_float64 result = ossim::nan();
+   ossimString lookup = m_kwl->findKey( std::string(ossimKeywordNames::CENTRAL_MERIDIAN_KW) );
+   if ( lookup.size() )
+   {
+      result = lookup.toFloat64();
+      if ( (result < -180.0) || (result > 180.0) )
+      {
+         std::string errMsg = "central meridian range error!";
+         errMsg += " Valid range: -180 to 180";
+         throw ossimException(errMsg);
+      }
+   }
+   return result;
+}
+
+ossim_float64 ossimChipperUtil::getOriginLatitude() const
+{
+   ossim_float64 result = ossim::nan();
+   ossimString lookup = m_kwl->find(ossimKeywordNames::ORIGIN_LATITUDE_KW);
+   if ( lookup.size() )
+   {
+      result = lookup.toFloat64();
+      if ( (result < -90) || (result > 90.0) )
+      {
+         std::string errMsg = "origin latitude range error!";
+         errMsg += " Valid range: -90 to 90";
+         throw ossimException(errMsg);
+      }
+   }
+   return result;
+}
+
+void ossimChipperUtil::getSceneCenter(ossimGpt& gpt)
+{
+   static const char MODULE[] = "ossimChipperUtil::getSceneCenter(ossimGpt&)";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   std::vector<ossimGpt> centerGptArray;
+   ossimGpt centerGpt;
+   
+   std::vector< ossimRefPtr<ossimSingleImageChain> >::iterator chainIdx;
+
+   // Loop through dem layers.
+   chainIdx = m_demLayer.begin();
+   while ( chainIdx != m_demLayer.end() )
+   {
+      getSceneCenter( (*chainIdx).get(), centerGpt);
+      if ( !centerGpt.hasNans() )
+      {
+         centerGptArray.push_back( centerGpt );
+      }
+      ++chainIdx;
+   }
+
+   // Loop through image layers.
+   chainIdx = m_imgLayer.begin();
+   while ( chainIdx != m_imgLayer.end() )
+   {
+      getSceneCenter( (*chainIdx).get(), centerGpt);
+      if ( !centerGpt.hasNans() )
+      {
+         centerGptArray.push_back( centerGpt );
+      }
+      ++chainIdx;
+   }
+
+   ossim_float64 lat = 0.0;
+   ossim_float64 lon = 0.0;
+   
+   std::vector<ossimGpt>::const_iterator pointIdx = centerGptArray.begin();
+   while ( pointIdx != centerGptArray.end() )
+   {
+      lat += (*pointIdx).lat;
+      lon += (*pointIdx).lon;
+      ++pointIdx;
+   }
+
+   lat /= centerGptArray.size();
+   lon /= centerGptArray.size();
+
+   if ( (lat >= -90.0) && (lat <= 90.0) && (lon >= -180.0) && (lon <= 180.0) )
+   {
+      gpt.lat = lat;
+      gpt.lon = lon;
+   }
+   else
+   {
+      std::ostringstream errMsg;
+      errMsg << MODULE << " range error!\nlatitude = "
+             << ossimString::toString(lat).string()
+             << "\nlongitude = "
+             << ossimString::toString(lon).string();
+      throw ossimException( errMsg.str() );
+   }
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "scene center: " << gpt << "\n" << MODULE << " exited...\n";
+   }
+}
+
+void ossimChipperUtil::getSceneCenter(ossimSingleImageChain* chain, ossimGpt& gpt)
+{
+   static const char MODULE[] =
+      "ossimChipperUtil::getSceneCenter(const ossimSingleImageChain*,ossimGpt&)";
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }   
+   
+   if (chain)
+   {
+      ossimRefPtr<ossimImageGeometry> geom = chain->getImageGeometry();
+      if ( geom.valid() )
+      {
+         ossimIrect boundingRect = chain->getBoundingRect();
+         ossimDpt midPoint = boundingRect.midPoint();
+         geom->localToWorld(midPoint, gpt);
+         gpt.hgt = 0.0;
+         
+         if ( gpt.hasNans() )
+         {
+            std::string errMsg = MODULE;
+            errMsg += "\ngeom->localToWorld returned nan for chain.";
+            errMsg += "\nChain: ";
+            errMsg += chain->getFilename().string();
+            throw ossimException(errMsg);
+         }
+      }
+      else
+      {
+         std::string errMsg = MODULE;
+         errMsg += "\nNo geometry for chain: ";
+         errMsg += chain->getFilename().string();
+         throw ossimException(errMsg);
+      }
+   }
+   else
+   {
+      std::string errMsg = MODULE;
+      errMsg += " ERROR: Null chain passed to method!";
+      throw ossimException(errMsg);
+   }
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "chain name: " << chain->getFilename()
+         << "\nscene center: " << gpt << "\n"
+         << MODULE << " exited...\n";
+   }
+}
+
+ossimRefPtr<ossimMapProjection> ossimChipperUtil::getFirstInputProjection()
+{
+   static const char MODULE[] = "ossimChipperUtil::getFirstInputProjection";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   ossimRefPtr<ossimImageHandler>  ih     = 0;
+   ossimRefPtr<ossimMapProjection> result = 0;
+
+   // Get the first image handler.
+   if ( m_demLayer.size() )
+   {
+      ih = m_demLayer[0]->getImageHandler();
+   }
+   else if ( m_imgLayer.size() )
+   {
+      ih = m_imgLayer[0]->getImageHandler();
+   }
+   
+   if ( ih.valid() )
+   {
+      // Get the geometry from the first image handler.      
+      ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
+      if ( geom.valid() )
+      {
+         // Get the image projection.
+         ossimRefPtr<ossimProjection> proj = geom->getProjection();
+         if ( proj.valid() )
+         {
+            // Cast and assign to result.
+            ossimMapProjection* mapProj = PTR_CAST( ossimMapProjection, proj.get() );
+            if (mapProj)
+            {
+               // Must duplicate in case the output projection gets modified.
+               result = (ossimMapProjection*) mapProj->dup();
+            }
+            if ( !result.valid() && traceDebug() )
+            {
+               ossimNotify(ossimNotifyLevel_WARN) << "Could not cast to map projection.\n";
+            }
+         }
+         else if ( traceDebug() )
+         {
+            ossimNotify(ossimNotifyLevel_WARN) << "No projection in first chain...\n";
+         }
+      }
+   }
+   else if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "No image handler in first chain...\n";
+   }
+   
+   if ( traceDebug() )
+   {
+      if ( result.valid() )
+      {
+         result->print(ossimNotify(ossimNotifyLevel_DEBUG));
+      }
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
+   }
+   
+   return result;
+}
+
+ossimRefPtr<ossimMapProjection> ossimChipperUtil::getNewGeoProjection()
+{
+   return ossimRefPtr<ossimMapProjection>(new ossimEquDistCylProjection());
+}
+
+ossimRefPtr<ossimMapProjection> ossimChipperUtil::getNewGeoScaledProjection()
+{
+   // Make projection:
+   ossimRefPtr<ossimMapProjection> result = getNewGeoProjection();
+
+   // Set the origin for scaling:
+   
+   // First check for user set "central_meridian" and "origin_latitude":
+   ossimGpt origin;
+   origin.lat = getOriginLatitude();
+   origin.lon = getCentralMeridian();
+   origin.hgt = 0.0;
+   
+   if ( origin.hasNans() )
+   {
+      // Use the scene center from the input.
+      getSceneCenter( origin );
+
+      //---
+      // Note only latitude used for scaling, origin kept at 0.0.
+      // This is a fix/hack for ossimEquDistCylProjection wrapping issues.
+      //---
+      origin.lon = 0.0;
+   }
+
+   if ( !origin.hasNans() )
+   {
+      result->setOrigin(origin);
+   }
+   else
+   {
+      std::string errMsg = "ossimChipperUtil::getNewGeoScaledProjection ERROR";
+      errMsg += "\nOrigin has nans!";
+      throw ossimException(errMsg);
+   }
+   
+   return result;
+}
+
+ossimRefPtr<ossimMapProjection> ossimChipperUtil::getNewProjectionFromSrsCode(
+   const std::string& code)
+{
+   ossimRefPtr<ossimMapProjection> result = 0;
+
+   if (code == "4326")  // Avoid factory call for this.
+   {
+      result = new ossimEquDistCylProjection();
+   }
+   else
+   {
+      ossimRefPtr<ossimProjection> proj = ossimProjectionFactoryRegistry::instance()->
+         createProjection(code);
+      if ( proj.valid() )
+      {
+         result = PTR_CAST( ossimMapProjection, proj.get() );
+      }
+   }
+   return result;
+}
+
+ossimRefPtr<ossimMapProjection> ossimChipperUtil::getNewUtmProjection()
+{
+   // Make projection:
+   ossimRefPtr<ossimUtmProjection> utm = new ossimUtmProjection;
+
+   // Set the zone from keyword option:
+   bool setZone = false;
+   ossim_int32 zone = getZone();
+   if ( (zone > 0 ) && ( zone < 61 ) )
+   {
+      utm->setZone( zone );
+      setZone = true;
+   }
+   
+   // Set the hemisphere from keyword option:
+   bool setHemisphere = false;
+   std::string hemisphere = getHemisphere();
+   if ( hemisphere.size() )
+   {
+      ossimString h(hemisphere);
+      h.upcase();
+      if ( ( h == "N" ) || ( h == "NORTH" ) )
+      {
+         char c = 'N';
+         utm->setHemisphere( c );
+         setHemisphere = true;
+      }
+      if ( ( h == "S" ) || ( h == "SOUTH" ) )
+      {
+         char c = 'S';
+         utm->setHemisphere( c );
+         setHemisphere = true;
+      }
+   }
+
+   if ( !setZone || !setHemisphere )
+   {
+      // First check for user set "central_meridian" and "origin_latitude":
+      ossimGpt origin;
+      origin.lat = getOriginLatitude();
+      origin.lon = getCentralMeridian();
+      origin.hgt = 0.0;
+      
+      if ( origin.hasNans() )
+      {
+         // Use the scene center from the input.
+         getSceneCenter( origin );
+      }
+      
+      if ( !origin.hasNans() )
+      {
+         if ( !setZone )
+         {
+            utm->setZone(origin);
+         }
+         if ( !setHemisphere )
+         {
+            utm->setHemisphere(origin);
+         }
+      }
+      else
+      {
+         std::string errMsg = "ossimChipperUtil::getNewUtmProjection ERROR";
+         errMsg += "\nOrigin has nans!";
+         throw ossimException(errMsg);
+      }
+   }
+
+   return ossimRefPtr<ossimMapProjection>(utm.get());
+}
+
+ossimRefPtr<ossimMapProjection> ossimChipperUtil::getMapProjection()
+{
+   ossimRefPtr<ossimMapProjection> mp = 0;
+   if ( m_geom.valid() )
+   {
+      mp = dynamic_cast<ossimMapProjection*>( m_geom->getProjection() );
+   }
+   return mp;
+}
+
+ossimRefPtr<ossimImageFileWriter> ossimChipperUtil::createNewWriter() const
+{
+   static const char MODULE[] = "ossimChipperUtil::createNewWriter()";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   ossimFilename outputFile;
+   getOutputFilename(outputFile);
+
+   if ( outputFile == ossimFilename::NIL)
+   {
+      std::string errMsg = MODULE;
+      errMsg += " ERROR no output file name!";
+      throw ossimException(errMsg);
+   }
+
+   ossimRefPtr<ossimImageFileWriter> writer = 0;
+   
+   ossimString lookup = m_kwl->findKey( WRITER_KW );
+   if ( lookup.size() )
+   {
+      writer = ossimImageWriterFactoryRegistry::instance()->createWriter( lookup );
+      if ( !writer.valid() )
+      {
+         std::string errMsg = MODULE;
+         errMsg += " ERROR creating writer: ";
+         errMsg += lookup.string();
+         throw ossimException(errMsg);
+      }
+   }
+   else // Create from output file extension.
+   {
+      writer = ossimImageWriterFactoryRegistry::instance()->
+         createWriterFromExtension( outputFile.ext() );
+
+      if ( !writer.valid() )
+      {
+         std::string errMsg = MODULE;
+         errMsg += " ERROR creating writer from extension: ";
+         errMsg += outputFile.ext().string();
+         throw ossimException(errMsg);
+      }
+   }
+
+   // Set the output name.
+   writer->setFilename( outputFile );
+
+   // Add any writer props.
+   ossim_uint32 count = m_kwl->numberOf( WRITER_PROPERTY_KW.c_str() );
+   for (ossim_uint32 i = 0; i < count; ++i)
+   {
+      ossimString key = WRITER_PROPERTY_KW;
+      key += ossimString::toString(i);
+      lookup = m_kwl->findKey( key.string() );
+      if ( lookup.size() )
+      {
+         std::vector<ossimString> splitArray;
+         lookup.split(splitArray, "=");
+         if(splitArray.size() == 2)
+         {
+            ossimRefPtr<ossimProperty> prop =
+               new ossimStringProperty(splitArray[0], splitArray[1]);
+
+            if ( traceDebug() )
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG)
+                  << "Setting writer prop: " << splitArray[0] << "=" << splitArray[1] << "\n";
+            }
+            
+            writer->setProperty( prop );
+         }
+      }
+   }
+
+   // Output tile size:
+   lookup = m_kwl->findKey( TILE_SIZE_KW );
+   if ( lookup.size() )
+   {
+      ossimIpt tileSize;
+      tileSize.x = lookup.toInt32();
+      if ( (tileSize.x % 16) == 0 )
+      {
+         tileSize.y = tileSize.x;
+         writer->setTileSize( tileSize );
+      }
+      else if ( traceDebug() )
+      {
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << MODULE << " NOTICE:"
+            << "\nTile width must be a multiple of 16! Using default.."
+            << std::endl;
+      }
+   }
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "writer name: " << writer->getClassName() << "\n"
+         << MODULE << " exited...\n";
+   }
+
+   return writer;
+}
+
+void ossimChipperUtil::propagateOutputProjectionToChains()
+{
+   static const char MODULE[] = "ossimChipperUtil::propagateOutputProjectionToChains()";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   std::vector< ossimRefPtr<ossimSingleImageChain> >::iterator chainIdx;
+   
+   // we need to make sure the outputs are refreshed so they can reset themselves
+   // Needed when we are doing interactive update to the GSD and clip window
+   ossimRefPtr<ossimRefreshEvent> refreshEvent = new ossimRefreshEvent();
+   ossimEventVisitor eventVisitor(refreshEvent.get());
+   ossimViewInterfaceVisitor viewVisitor(m_geom.get());
+   // Loop through dem layers.
+   chainIdx = m_demLayer.begin();
+   while ( chainIdx != m_demLayer.end() )
+   {
+    viewVisitor.reset();
+    eventVisitor.reset();
+    (*chainIdx)->accept(viewVisitor);
+    (*chainIdx)->accept(eventVisitor);
+
+    ossimRefPtr<ossimImageRenderer> resampler = (*chainIdx)->getImageRenderer();
+      if ( resampler.valid() )
+      {
+         //resampler->setView( m_geom.get() );
+        // resampler->propagateEventToOutputs(refreshEvent);
+      }
+      else
+      {
+         std::string errMsg = MODULE;
+         errMsg += " chain has no resampler!";
+         throw( ossimException(errMsg) );
+      }
+      ++chainIdx;
+   }
+
+   // Loop through image layers.
+   chainIdx = m_imgLayer.begin();
+   while ( chainIdx != m_imgLayer.end() )
+   {
+      ossimRefPtr<ossimImageRenderer> resampler = (*chainIdx)->getImageRenderer();
+      eventVisitor.reset();
+      viewVisitor.reset();
+      (*chainIdx)->accept(viewVisitor);
+      (*chainIdx)->accept(eventVisitor);
+
+      if ( resampler.valid() )
+      {
+//         resampler->setView( m_geom.get() );
+        // resampler->propagateEventToOutputs(refreshEvent);
+      }
+      else
+      {
+         std::string errMsg = MODULE;
+         errMsg += " chain has no resampler!";
+         throw( ossimException(errMsg) );
+      }
+      ++chainIdx;
+   }
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
+   }
+}
+
+ossimRefPtr<ossimImageSource> ossimChipperUtil::combineLayers(
+   std::vector< ossimRefPtr<ossimSingleImageChain> >& layers) const
+{
+   static const char MODULE[] = "ossimChipperUtil::combineLayers(layers)";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   ossimRefPtr<ossimImageSource> result = 0;
+
+   if ( layers.size() == 1 )
+   {
+      result = layers[0].get();
+   }
+   else if ( layers.size() > 1 )
+   {
+
+      result = createCombiner();//new ossimImageMosaic;
+
+      std::vector< ossimRefPtr<ossimSingleImageChain> >::iterator chainIdx = layers.begin();
+      while ( chainIdx != layers.end() )
+      {
+         result->connectMyInputTo( (*chainIdx).get() );
+         ++chainIdx;
+      }
+   }
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
+   }
+
+   return result;
+}
+
+ossimRefPtr<ossimImageSource> ossimChipperUtil::combineLayers()
+{
+   static const char MODULE[] = "ossimChipperUtil::combineLayers()";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   ossimRefPtr<ossimImageSource> result = 0;
+
+   ossim_uint32 layerCount = (ossim_uint32) (m_demLayer.size() + m_imgLayer.size());
+
+   if ( layerCount )
+   {
+      if ( layerCount == 1 )
+      {
+         if ( m_imgLayer.size() )
+         {
+            result = m_imgLayer[0].get();
+         }
+         else
+         {
+            result = m_demLayer[0].get();
+         }
+      }
+      else
+      {
+         result = createCombiner();//new ossimImageMosaic;
+         
+         // Combine the images.  Note we'll put the images on top of the dems.
+         if ( m_imgLayer.size() )
+         {
+            std::vector< ossimRefPtr<ossimSingleImageChain> >::iterator chainIdx =
+               m_imgLayer.begin();
+            while ( chainIdx !=  m_imgLayer.end() )
+            {
+               result->connectMyInputTo( (*chainIdx).get() );
+               ++chainIdx;
+            }
+         }
+         if ( m_demLayer.size() ) // Combine any dem layers.
+         {
+            std::vector< ossimRefPtr<ossimSingleImageChain> >::iterator chainIdx =
+               m_demLayer.begin();
+            while ( chainIdx != m_demLayer.end() )
+            {
+               result->connectMyInputTo( (*chainIdx).get() );
+               ++chainIdx;
+            }
+         }
+      }
+   }
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
+   }
+   
+   return result;
+   
+} // End: ossimChipperUtil::combineLayers
+
+ossimRefPtr<ossimImageSource> ossimChipperUtil::initialize2CmvChain()
+{
+   ossimRefPtr<ossimImageSource> result = 0;
+
+   ossim_uint32 layerCount = (ossim_uint32) (m_demLayer.size() + m_imgLayer.size());
+
+   // Must have two and only two inputs.
+   if ( layerCount == 2 )
+   {     
+      ossimRefPtr<ossimConnectableObject> oldImg = 0;
+      ossimRefPtr<ossimConnectableObject> newImg = 0;
+
+      //---
+      // Expecting two image layers.  We'll code it for flexabilty though...
+      // - Take old and new from m_imgLayer if present.
+      // - Use m_demLayer only if missing.
+      // - Using first image found as old, second new.
+      //---
+
+      // Most likely case, two image layers.
+      if ( m_imgLayer.size() )
+      {
+         oldImg = m_imgLayer[0].get();
+         
+         if ( m_imgLayer.size() == 2 )
+         {
+            newImg = m_imgLayer[1].get();
+         }
+      }
+
+      if ( m_demLayer.size() )
+      {
+         if ( !oldImg.valid() )
+         {
+            oldImg = m_demLayer[0].get();
+         }
+
+         if ( !newImg.valid() )
+         {
+            if ( m_demLayer.size() == 1 )
+            {
+               newImg = m_demLayer[0].get();
+            }
+            else if ( m_demLayer.size() == 2 )
+            {
+               newImg = m_demLayer[1].get();
+            }
+         }
+      }
+
+      if ( newImg.valid() && oldImg.valid() )
+      {
+         // Input 0 is old, 1 is new.
+         ossimRefPtr<ossimTwoColorView> tcmv = new ossimTwoColorView;
+         tcmv->connectMyInputTo( 0, oldImg.get() );
+         tcmv->connectMyInputTo( 1, newImg.get() );
+
+         // Look for 2cmv options.
+         ossim_uint32 oldInputBandIndex = 0;
+         ossim_uint32 newInputBandIndex = 0;
+         ossimTwoColorView::ossimTwoColorMultiViewOutputSource redOutputSource =
+            ossimTwoColorView::OLD;
+         ossimTwoColorView::ossimTwoColorMultiViewOutputSource grnOutputSource =
+            ossimTwoColorView::NEW;
+         ossimTwoColorView::ossimTwoColorMultiViewOutputSource bluOutputSource =
+            ossimTwoColorView::NEW;
+
+         ossimString os;
+         std::string key = TWOCMV_OLD_INPUT_BAND_KW;
+         std::string val = m_kwl->findKey( key );
+         
+         if ( val.size() )
+         {
+            os = val;
+            oldInputBandIndex = os.toUInt32();
+         }
+         
+         key = TWOCMV_NEW_INPUT_BAND_KW;
+         val = m_kwl->findKey( key );
+         if ( val.size() )
+         {
+            os = val;
+            newInputBandIndex = os.toUInt32();
+         }
+
+         key = TWOCMV_RED_OUTPUT_SOURCE_KW;
+         val = m_kwl->findKey( key );
+         if ( val.size() )
+         {
+            os = val;
+            os.downcase();
+            
+            if ( os == "new" )
+            {
+               redOutputSource = ossimTwoColorView::NEW;
+            }
+            else if ( os == "MIN" )
+            {
+               redOutputSource = ossimTwoColorView::MIN;
+            }
+         }
+
+         key = TWOCMV_GREEN_OUTPUT_SOURCE_KW;
+         val = m_kwl->findKey( key );
+         if ( val.size() )
+         {
+            os = val;
+            os.downcase();
+            
+            if ( os == "old" )
+            {
+               grnOutputSource = ossimTwoColorView::OLD;
+            }
+            else if ( os == "MIN" )
+            {
+               grnOutputSource = ossimTwoColorView::MIN;
+            }
+         }
+
+         key = TWOCMV_BLUE_OUTPUT_SOURCE_KW;
+         val = m_kwl->findKey( key );
+         if ( val.size() )
+         {
+            os = val;
+            os.downcase();
+            
+            if ( os == "old" )
+            {
+               bluOutputSource = ossimTwoColorView::OLD;
+            }
+            else if ( os == "MIN" )
+            {
+               bluOutputSource = ossimTwoColorView::MIN;
+            }
+         }
+
+         // Set options.
+         tcmv->setBandIndexMapping( oldInputBandIndex,
+                                    newInputBandIndex,
+                                    redOutputSource,
+                                    grnOutputSource,
+                                    bluOutputSource );
+         tcmv->initialize();
+
+         result = tcmv.get();
+      }
+   }
+   
+   return result;
+   
+} // ossimChipperUtil::initialize2CmvChain()
+
+ossimRefPtr<ossimImageSource> ossimChipperUtil::addIndexToRgbLutFilter(
+   ossimRefPtr<ossimImageSource> &source) const
+{
+   static const char MODULE[] = "ossimChipperUtil::addIndexToRgbLutFilter(source)";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   ossimRefPtr<ossimImageSource> result = 0;
+
+   if ( source.valid() )
+   {
+      ossimRefPtr<ossimIndexToRgbLutFilter> lut = new ossimIndexToRgbLutFilter();
+      ossimFilename lutFile;
+      lutFile.string() = m_kwl->findKey( LUT_FILE_KW );
+      if ( lutFile.exists() )
+      {
+         //---
+         // Connect to dems:
+         // Must do this first so that the min and max get set from the input
+         // connection prior to initializing the lut.
+         //---
+         lut->connectMyInputTo( source.get() );
+
+         // Note sure about this.  Make option maybe? (drb)
+         lut->setMode(ossimIndexToRgbLutFilter::REGULAR);
+
+         lut->setLut(lutFile);
+         
+         // Set as color source for bump shade.
+         result = lut.get();
+      }
+      else
+      {
+         std::string errMsg = MODULE;
+         errMsg += " color table does not exists: ";
+         errMsg += lutFile.string();
+         throw ossimException(errMsg);
+      }
+   }
+   else
+   {
+      std::string errMsg = MODULE;
+      errMsg += " ERROR: Null source passed to method!";
+      throw ossimException(errMsg);
+   }
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
+   }
+
+   return result;
+}
+
+ossimRefPtr<ossimImageSource> ossimChipperUtil::addScalarRemapper(
+   ossimRefPtr<ossimImageSource> &source, ossimScalarType scalar) const
+{
+   static const char MODULE[] = "ossimChipperUtil::addScalarRemapper(source)";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   ossimRefPtr<ossimImageSource> result = 0;
+   
+   if ( source.valid() )
+   {
+      if ( ( scalar != OSSIM_SCALAR_UNKNOWN ) && ( source->getOutputScalarType() != scalar ) )
+      {
+         ossimRefPtr<ossimScalarRemapper> remapper = new ossimScalarRemapper();
+         remapper->setOutputScalarType(scalar);
+         remapper->connectMyInputTo( source.get() );
+         result = remapper.get();
+         
+         if ( traceDebug() )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "\nOutput remapped to: "
+               << ossimScalarTypeLut::instance()->getEntryString(scalar) << "\n";
+         }
+      }
+      else
+      {
+         result = source;
+      }
+   }
+   else
+   {
+      std::string errMsg = MODULE;
+      errMsg += " ERROR: Null source passed to method!";
+      throw ossimException(errMsg);
+   }
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " exited...\n";
+   }
+   
+   return result;
+}
+
+bool ossimChipperUtil::setupChainHistogram( ossimRefPtr<ossimSingleImageChain>& chain) const
+{
+   static const char MODULE[] = "ossimChipperUtil::setupChainHistogram(chain)";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   } 
+   
+   bool result = false;
+
+   if ( chain.valid() )
+   {
+      ossimRefPtr<ossimHistogramRemapper> remapper = chain->getHistogramRemapper();
+
+      if ( remapper.valid() )
+      {
+         if ( remapper->getHistogramFile() == ossimFilename::NIL )
+         {
+            ossimRefPtr<ossimImageHandler> ih = chain->getImageHandler();
+            if ( ih.valid() )
+            {
+               ossimFilename f = ih->getFilenameWithThisExtension( ossimString("his") );
+
+               if ( f.empty() || (f.exists() == false) )
+               {
+                  // For backward compatibility check if single entry and _e0.his
+                  f = ih->getFilenameWithThisExtension( ossimString("his"), true );
+               }
+
+               if ( remapper->openHistogram( f ) == false )
+               {
+                  if(traceDebug())
+                  {
+                     ossimNotify(ossimNotifyLevel_WARN)
+                        << MODULE << " WARNING:"
+                        << "\nCould not open:  " << f << "\n";
+                  }
+               }
+            }
+         }
+
+         if ( remapper->getHistogramFile() != ossimFilename::NIL )
+         {
+            ossimString op = m_kwl->findKey( HISTO_OP_KW );
+            if ( op.size() )
+            {
+               result = true;
+               
+               // Enable.
+               remapper->setEnableFlag(true);
+               
+               // Set the histo mode:
+               op.downcase();
+               if ( op == "auto-minmax" )
+               {
+                  remapper->setStretchMode( ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX );
+               }
+               else if ( (op == "std-stretch-1") || (op == "std-stretch 1") )
+               {
+                  remapper->setStretchMode( ossimHistogramRemapper::LINEAR_1STD_FROM_MEAN );
+               } 
+               else if ( (op == "std-stretch-2") || (op == "std-stretch 2") )
+               {
+                  remapper->setStretchMode( ossimHistogramRemapper::LINEAR_2STD_FROM_MEAN );
+               } 
+               else if ( (op == "std-stretch-3") || (op == "std-stretch 3") )
+               {
+                  remapper->setStretchMode( ossimHistogramRemapper::LINEAR_3STD_FROM_MEAN );
+               }
+               else
+               {
+                  result = false;
+                  remapper->setEnableFlag(false);
+                  if(traceDebug())
+                  {
+                     ossimNotify(ossimNotifyLevel_WARN)
+                        << MODULE << "\nUnhandled operation: " << op << "\n";
+                  }
+               }
+            }
+         }
+      }
+   }
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
+   }
+   
+   return result;
+}
+
+bool ossimChipperUtil::setChainEntry(
+   ossimRefPtr<ossimSingleImageChain>& chain, ossim_uint32 entryIndex ) const
+{
+   bool result = false;
+   if ( chain.valid() )
+   {
+      ossimRefPtr<ossimImageHandler> ih = chain->getImageHandler();
+      if ( ih.valid() )
+      {
+         result = ih->setCurrentEntry( entryIndex );
+      }
+   }
+   return result;
+}
+
+void ossimChipperUtil::getOutputFilename(ossimFilename& f) const
+{
+   f.string() = m_kwl->findKey( std::string(ossimKeywordNames::OUTPUT_FILE_KW) );
+}
+
+void ossimChipperUtil::getAreaOfInterest(ossimImageSource* source, ossimIrect& rect) const
+{
+   static const char MODULE[] = "ossimChipperUtil::getAreaOfInterest()";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+   }
+
+   // Nan rect for starters.
+   rect.makeNan();
+   
+   if ( source )
+   {
+      if (  m_kwl->hasKey( CUT_BBOX_XYWH_KW ) )
+      {
+         // <x>,<y>,<w>,<h>
+         ossimString cutBbox = m_kwl->findKey( CUT_BBOX_XYWH_KW );
+         std::vector<ossimString> keys;
+         cutBbox.split(keys, ",");
+         if( keys.size() > 3 )
+         {
+            ossimIpt ul;
+            ossimIpt lr;
+            ul.x = keys[0].toInt32();
+            ul.y = keys[1].toInt32();
+            lr.x = ul.x + keys[2].toInt32() - 1;
+            lr.y = ul.y + keys[3].toInt32() - 1;
+            rect = ossimIrect(ul, lr);
+         }
+      }
+      
+      if ( rect.hasNans() )
+      {
+         if ( m_geom.valid() )
+         {
+            if ( m_kwl->find( CUT_CENTER_LAT_KW.c_str() ) ) 
+            {
+               // "Cut Center" with: --cut-center-llwh or --cut-center-llr:
+               
+               ossimString latStr = m_kwl->findKey( CUT_CENTER_LAT_KW );
+               ossimString lonStr = m_kwl->findKey( CUT_CENTER_LON_KW );
+               if ( latStr.size() && lonStr.size() )
+               {
+                  ossimGpt centerGpt;
+
+                  //---
+                  // Want the height nan going into worldToLocal call so it gets picked
+                  // up by the elevation manager.
+                  //---
+                  centerGpt.makeNan(); 
+
+                  centerGpt.lat = latStr.toFloat64();
+                  centerGpt.lon = lonStr.toFloat64();
+
+                  if ( !centerGpt.isLatNan() && !centerGpt.isLonNan() )
+                  {
+                     // Ground "cut center" to view:
+                     ossimDpt centerDpt(0.0, 0.0);
+                     m_geom->worldToLocal(centerGpt, centerDpt);
+
+                     if ( !centerDpt.hasNans() )
+                     {
+                        if ( isIdentity() && m_ivt.valid() ) // Chipping in image space.
+                        {
+                           // Tranform image center point to view:
+                           ossimDpt ipt = centerDpt;
+                           m_ivt->imageToView( ipt, centerDpt );
+                        }
+                     
+                        // --cut-center-llwh:
+                        ossimString widthStr  = m_kwl->findKey( CUT_WIDTH_KW );
+                        ossimString heightStr = m_kwl->findKey( CUT_HEIGHT_KW );
+                        if ( widthStr.size() && heightStr.size() )
+                        {
+                           ossim_int32 width  = widthStr.toInt32();
+                           ossim_int32 height = heightStr.toInt32();
+                           if ( width && height )
+                           {
+                              ossimIpt ul( ossim::round<int>(centerDpt.x - (width/2)),
+                                           ossim::round<int>(centerDpt.y - (height/2)) );
+                              ossimIpt lr( (ul.x + width - 1), ul.y + height - 1);
+                              rect = ossimIrect(ul, lr);
+                           }
+                        }
+                        else // --cut-center-llr: 
+                        {
+                           ossimString radiusStr = m_kwl->findKey( CUT_RADIUS_KW );
+                           if ( radiusStr.size() )
+                           {
+                              ossim_float64 radius = radiusStr.toFloat64();
+                              if ( radius )
+                              {
+                                 ossimDpt mpp;
+                                 m_geom->getMetersPerPixel( mpp );
+
+                                 if ( !mpp.hasNans() )
+                                 {
+                                    ossim_float64 rx = radius/mpp.x;
+                                    ossim_float64 ry = radius/mpp.y;
+                                 
+                                    ossimIpt ul( ossim::round<int>( centerDpt.x - rx ),
+                                                 ossim::round<int>( centerDpt.y - ry ) );
+                                    ossimIpt lr( ossim::round<int>( centerDpt.x + rx ),
+                                                 ossim::round<int>( centerDpt.y + ry ) );
+                                    rect = ossimIrect(ul, lr);
+                                 }
+                              }
+                           }
+                        }
+                     }
+                  
+                  } // Matches: if ( !centerGpt.hasNans() )
+               
+               } // Matches: if ( latStr && lonStr )
+            
+            } // Matches: if ( m_kwl->find( CUT_CENTER_LAT_KW ) )
+         
+            else if ( (m_kwl->find( CUT_MAX_LAT_KW.c_str() ) ||
+                       (m_kwl->find( CUT_WMS_BBOX_LL_KW.c_str() )))) 
+            {
+               ossimString maxLat;
+               ossimString maxLon;
+               ossimString minLat;
+               ossimString minLon;
+
+               // --cut-bbox-ll or --cut-bbox-llwh
+               if(m_kwl->find( CUT_MAX_LAT_KW.c_str() ))
+               {
+                  maxLat = m_kwl->findKey( CUT_MAX_LAT_KW );
+                  maxLon = m_kwl->findKey( CUT_MAX_LON_KW );
+                  minLat = m_kwl->findKey( CUT_MIN_LAT_KW );
+                  minLon = m_kwl->findKey( CUT_MIN_LON_KW );               
+               }
+               else
+               {
+                  ossimString cutBbox = m_kwl->findKey( CUT_WMS_BBOX_LL_KW );
+
+                  cutBbox = cutBbox.upcase().replaceAllThatMatch("BBOX:");
+                  std::vector<ossimString> cutBox = cutBbox.split(",");
+                  if(cutBox.size() >3)
+                  {
+                     minLon = cutBox[0];
+                     minLat = cutBox[1];
+                     maxLon = cutBox[2];
+                     maxLat = cutBox[3];
+                  }
+               }
+        
+               if ( maxLat.size() && maxLon.size() && minLat.size() && minLon.size() )
+               {
+                  ossim_float64 minLatF = minLat.toFloat64();
+                  ossim_float64 maxLatF = maxLat.toFloat64();
+                  ossim_float64 minLonF = minLon.toFloat64();
+                  ossim_float64 maxLonF = maxLon.toFloat64();
+
+                  //---
+                  // Check for swap so we don't get a negative height.
+                  // Note no swap check for longitude as box could cross date line.
+                  //---
+                  if ( minLatF > maxLatF )
+                  {
+                     ossim_float64 tmpF = minLatF;
+                     minLatF = maxLatF;
+                     maxLatF = tmpF;
+                  }
+
+                  //---
+                  // Assume cut box is edge to edge or "Pixel Is Area". Our
+                  // AOI(area of interest) uses center of pixel or "Pixel Is Point"
+                  // so get the degrees per pixel and shift AOI to center.
+                  //---
+                  ossimDpt halfDpp;
+                  m_geom->getDegreesPerPixel( halfDpp );
+                  halfDpp = halfDpp/2.0;
+            
+                  ossimGpt gpt(0.0, 0.0, 0.0);
+                  ossimDpt ulPt;
+                  ossimDpt lrPt;
+            
+                  // Upper left:
+                  gpt.lat = maxLatF - halfDpp.y;
+                  gpt.lon = minLonF + halfDpp.x;
+                  m_geom->worldToLocal(gpt, ulPt);
+            
+                  // Lower right:
+                  gpt.lat = minLatF + halfDpp.y;
+                  gpt.lon = maxLonF - halfDpp.x;
+                  m_geom->worldToLocal(gpt, lrPt);
+
+                  if ( isIdentity() && m_ivt.valid() )
+                  {
+                     // Chipping in image space:
+                  
+                     // Tranform image ul point to view:
+                     ossimDpt ipt = ulPt;
+                     m_ivt->imageToView( ipt, ulPt );
+                  
+                     // Tranform image lr point to view:
+                     ipt = lrPt;
+                     m_ivt->imageToView( ipt, lrPt );
+                  }
+            
+                  rect = ossimIrect( ossimIpt(ulPt), ossimIpt(lrPt) );
+               }
+            }
+            else if ( m_kwl->find( CUT_WMS_BBOX_KW.c_str() ) ) 
+            {
+               ossimString cutBbox = m_kwl->findKey( CUT_WMS_BBOX_KW );
+
+               cutBbox = cutBbox.upcase().replaceAllThatMatch("BBOX:");
+               std::vector<ossimString> cutBox = cutBbox.split(",");
+               if(cutBox.size()==4)
+               {
+
+                  ossim_float64 minx=cutBox[0].toFloat64();
+                  ossim_float64 miny=cutBox[1].toFloat64();
+                  ossim_float64 maxx=cutBox[2].toFloat64();
+                  ossim_float64 maxy=cutBox[3].toFloat64();
+
+                  const ossimMapProjection* mapProj = m_geom->getAsMapProjection();
+                  if(mapProj)
+                  {
+                     std::vector<ossimDpt> pts(4);
+                     ossimDpt* ptsArray = &pts.front();
+                     if(mapProj->isGeographic())
+                     {
+                        ossimDpt halfDpp;
+                        m_geom->getDegreesPerPixel( halfDpp );
+                        halfDpp = halfDpp/2.0;
+                  
+                        ossimGpt gpt(0.0, 0.0, 0.0);
+                        ossimDpt ulPt;
+                        ossimDpt lrPt;
+                  
+                        // Upper left:
+                        gpt.lat = maxy - halfDpp.y;
+                        gpt.lon = minx + halfDpp.x;
+                        m_geom->worldToLocal(gpt, ptsArray[0]);
+                        // Upper right:
+                        gpt.lat = maxy - halfDpp.y;
+                        gpt.lon = maxx - halfDpp.x;
+                        m_geom->worldToLocal(gpt, ptsArray[1]);
+                  
+                        // Lower right:
+                        gpt.lat = miny + halfDpp.y;
+                        gpt.lon = maxx - halfDpp.x;
+                        m_geom->worldToLocal(gpt, ptsArray[2]);
+
+                        //Lower left
+                        gpt.lat = miny + halfDpp.y;
+                        gpt.lon = minx + halfDpp.x;
+                        m_geom->worldToLocal(gpt, ptsArray[3]);
+                        //m_geom->worldToLocal(ossimGpt(miny,minx), ptsArray[0]);
+                        //m_geom->worldToLocal(ossimGpt(maxy,minx), ptsArray[1]);
+                        //m_geom->worldToLocal(ossimGpt(maxy,maxx), ptsArray[2]);
+                        //m_geom->worldToLocal(ossimGpt(miny,maxx), ptsArray[3]);
+
+                     }
+                     else
+                     {
+                        ossimDpt halfMpp;
+                        ossimDpt eastingNorthing;
+                        m_geom->getMetersPerPixel( halfMpp );
+                        halfMpp = halfMpp/2.0;
+
+                        eastingNorthing.x = minx+halfMpp.x;
+                        eastingNorthing.y = miny+halfMpp.y;
+                        mapProj->eastingNorthingToLineSample(eastingNorthing, ptsArray[0]);
+                        eastingNorthing.x = minx+halfMpp.x;
+                        eastingNorthing.y = maxy-halfMpp.y;
+                        mapProj->eastingNorthingToLineSample(eastingNorthing, ptsArray[1]);
+                        eastingNorthing.x = maxx-halfMpp.x;
+                        eastingNorthing.y = maxy-halfMpp.y;
+                        mapProj->eastingNorthingToLineSample(eastingNorthing, ptsArray[2]);
+                        eastingNorthing.x = maxx-halfMpp.x;
+                        eastingNorthing.y = miny+halfMpp.y;
+                        mapProj->eastingNorthingToLineSample(eastingNorthing, ptsArray[3]);
+                     }
+                     rect = ossimIrect(pts);
+                  }
+               }
+            }
+
+            // If no user defined rect set to scene bounding rect.
+            if ( rect.hasNans() ) 
+            {
+               // Get the rectangle from the input chain:
+               rect = source->getBoundingRect(0);
+            }
+      
+         } // if ( m_getOuputGeometry.valid() )
+         else
+         {
+            // Should never happer...
+            std::string errMsg = MODULE;
+            if ( !source )
+            {
+               errMsg += " image source null!";
+            }
+            else
+            {
+               errMsg += " output projection null!";
+            }
+            throw( ossimException(errMsg) );
+         }
+         
+      } // if ( rect.hasNans() )
+
+   } // if ( source )
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "aoi: " << rect << "\n"
+         << MODULE << " exited...\n";
+   }
+   
+} // End: ossimChipperUtil::getAreaOfInterest
+
+void ossimChipperUtil::initializeThumbnailProjection(const ossimIrect& originalRect,
+                                                     ossimIrect& adjustedRect)
+{
+   static const char MODULE[] = "ossimChipperUtil::initializeThumbnailProjection";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " entered...\n"
+         << "origial rect:  " << originalRect << "\n";
+
+      if (m_geom.valid())
+      {
+         m_geom->print(ossimNotify(ossimNotifyLevel_DEBUG));
+      }
+   }
+
+   if ( !originalRect.hasNans() && m_geom.valid() )
+   {
+      //---
+      // Thumbnail setup:
+      //---
+      ossimString thumbRes = m_kwl->findKey( THUMBNAIL_RESOLUTION_KW );
+      if ( thumbRes.size() )
+      {
+         ossim_float64 thumbSize = thumbRes.toFloat64();
+         ossim_float64 maxRectDimension =
+            ossim::max( originalRect.width(), originalRect.height() );
+
+         if ( maxRectDimension > thumbSize )
+         {
+            // Need to adjust scale:
+            
+            // Get the corners before the scale change:
+            ossimGpt ulGpt;
+            ossimGpt lrGpt;
+            
+            m_geom->localToWorld(ossimDpt(originalRect.ul()), ulGpt);
+            m_geom->localToWorld(ossimDpt(originalRect.lr()), lrGpt);         
+            
+            if ( isIdentity()  && m_ivt.valid() ) // Chipping in image space.)
+            {
+               ossim_float64 scale = thumbSize / maxRectDimension;
+               if ( m_ivt->getScale().hasNans() )
+               {
+                  m_ivt->scale( scale, scale );
+               }
+               else
+               {
+                  m_ivt->scale( m_ivt->getScale().x*scale,m_ivt->getScale().y*scale ); 
+               }
+            }
+            else
+            {
+               ossim_float64 scale = maxRectDimension / thumbSize;
+               
+               //---
+               // Adjust the projection scale.  Note the "true" is to recenter
+               // the tie point so it falls relative to the projection origin.
+               //
+               // This call also scales: ossimImageGeometry::m_imageSize
+               //---
+               m_geom->applyScale(ossimDpt(scale, scale), true);
+            }
+
+            // Must call to reset the ossimImageRenderer's bounding rect for each input.
+            propagateOutputProjectionToChains();  
+
+            // Get the new upper left in view space.
+            ossimDpt dpt;
+            m_geom->worldToLocal(ulGpt, dpt);
+            ossimIpt ul(dpt);
+            
+            // Get the new lower right in view space.
+            m_geom->worldToLocal(lrGpt, dpt);
+            ossimIpt lr(dpt);
+
+            //---
+            // Clamp to thumbnail bounds with padding if turned on.
+            // Padding is optional. If padding turned on alway make square.
+            //---
+            ossim_int32 ts = thumbSize;
+            bool pad = padThumbnail();
+            
+            if ( ( (lr.x - ul.x + 1) > ts ) || pad )
+            {
+               lr.x = ul.x + ts - 1;
+            }
+            if ( ( (lr.y - ul.y + 1) > ts ) || pad )
+            {
+               lr.y = ul.y + ts - 1;
+            }
+            
+            adjustedRect = ossimIrect(ul, lr);
+         }
+      }
+      
+   } // if ( !originalRect.hasNans() && m_geom.valid() )
+   else
+   {
+      // Should never happer...
+      std::string errMsg = MODULE;
+      if ( originalRect.hasNans() )
+      {
+         errMsg += " passed in rect has nans!";
+      }
+      else
+      {
+         errMsg += " output projection null!";
+      }
+      throw( ossimException(errMsg) );
+   }
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << "\nadjusted rect: " << adjustedRect << "\n";
+      if (m_geom.valid())
+      {
+         m_geom->print(ossimNotify(ossimNotifyLevel_DEBUG));
+      }
+      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
+   }
+}
+
+bool ossimChipperUtil::hasBandSelection() const
+{
+   bool result = false;
+   if ( m_kwl.valid() )
+   {
+      result = m_kwl->hasKey( std::string(ossimKeywordNames::BANDS_KW) );
+   }
+   return result;
+}
+
+bool ossimChipperUtil::hasWmsBboxCutWidthHeight()const
+{
+   bool result = false;
+
+   if(m_kwl.valid())
+   {
+      result = (m_kwl->hasKey( CUT_HEIGHT_KW )&&
+                m_kwl->hasKey( CUT_WIDTH_KW ) &&
+                (m_kwl->hasKey( CUT_WMS_BBOX_KW )||
+                  m_kwl->hasKey(CUT_WMS_BBOX_LL_KW)));
+   }
+
+   return result;
+}
+        
+bool ossimChipperUtil::hasCutBoxWidthHeight() const
+{
+   bool result = false;
+   if ( m_kwl.valid() )
+   {
+      if ( m_kwl->hasKey( CUT_HEIGHT_KW ) )
+      {
+         if ( m_kwl->hasKey( CUT_WIDTH_KW ) )
+         {
+            if ( m_kwl->hasKey( CUT_MIN_LAT_KW ) )
+            {
+               if ( m_kwl->hasKey( CUT_MIN_LON_KW ) )               
+               {
+                  if ( m_kwl->hasKey( CUT_MAX_LAT_KW ) )
+                  {
+                     if ( m_kwl->hasKey( CUT_MAX_LON_KW ) )
+                     {
+                        result = true;
+                     }
+                  }
+               }
+            } // if lat and lon WMS style bbox is specified then we will behave the same as above
+            else if( m_kwl->hasKey(CUT_WMS_BBOX_LL_KW))
+            {
+              result = true;
+            }
+         }
+      }
+   }
+   return result;
+}
+
+bool ossimChipperUtil::hasScaleOption() const
+{
+   bool result = false;
+   if ( m_kwl.valid() )
+   {
+      if ( m_kwl->hasKey( METERS_KW.c_str() ) ||
+           m_kwl->hasKey( DEGREES_X_KW.c_str() ) ||
+           hasCutBoxWidthHeight()||
+           hasWmsBboxCutWidthHeight() )
+      {
+         result = true;
+      }
+   }
+   return result;
+}
+
+bool ossimChipperUtil::isThreeBandOut() const
+{
+   return keyIsTrue( THREE_BAND_OUT_KW );
+}
+
+bool ossimChipperUtil::padThumbnail() const
+{
+   return  keyIsTrue( PAD_THUMBNAIL_KW );
+}
+
+void ossimChipperUtil::setReaderProps( ossimImageHandler* ih ) const
+{
+   if ( ih && m_kwl.valid() )
+   {
+      ossim_uint32 count = m_kwl->numberOf( READER_PROPERTY_KW.c_str() );
+      for (ossim_uint32 i = 0; i < count; ++i)
+      {
+         ossimString key = READER_PROPERTY_KW;
+         key += ossimString::toString(i);
+         ossimString value = m_kwl->findKey( key.string() );
+         if ( value.size() )
+         {
+            std::vector<ossimString> splitArray;
+            value.split(splitArray, "=");
+            if(splitArray.size() == 2)
+            {
+               ossimRefPtr<ossimProperty> prop =
+                  new ossimStringProperty(splitArray[0], splitArray[1]);
+               
+               ih->setProperty( prop );
+            }
+         }
+      }
+   }
+}
+
+void ossimChipperUtil::getBandList( std::vector<ossim_uint32>& bandList ) const
+{
+   bandList.clear();
+   if ( m_kwl.valid() )
+   {
+      ossimString os;
+      os.string() = m_kwl->findKey( std::string( ossimKeywordNames::BANDS_KW ) );
+      if ( os.size() )
+      {
+         std::vector<ossimString> band_list(0);
+         os.split( band_list, ossimString(","), false );
+         if ( band_list.size() )
+         {
+            std::vector<ossimString>::const_iterator i = band_list.begin();
+            while ( i != band_list.end() )
+            {
+               ossim_uint32 band = (*i).toUInt32();
+               if ( band ) // One based so we need to subtract.
+               {
+                  bandList.push_back( band - 1 );
+               }
+               ++i;
+            }
+         }
+      }
+   }
+   
+} // End: ossimChipperUtil::getBandList
+
+bool ossimChipperUtil::hasLutFile() const
+{
+   bool result = false;
+   if ( m_kwl.valid() )
+   {
+      result = ( m_kwl->find( LUT_FILE_KW.c_str() ) != 0 );
+   }
+   return result;
+}
+
+bool ossimChipperUtil::hasBrightnesContrastOperation() const
+{
+   bool result = false;
+   std::string value = m_kwl->findKey( BRIGHTNESS_KW );
+   if ( value.size() )
+   {
+      result = true;
+   }
+   else
+   {
+      value = m_kwl->findKey( CONTRAST_KW );
+      if ( value.size() )
+      {
+         result = true;
+      }
+   }
+   return result;
+}
+
+bool ossimChipperUtil::hasGeoPolyCutterOption()const
+{
+   bool result = (m_kwl->find(CLIP_WMS_BBOX_LL_KW.c_str())||
+                  m_kwl->find(CLIP_POLY_LAT_LON_KW.c_str()));
+   
+   return result;
+}
+
+bool ossimChipperUtil::hasBumpShadeArg() const
+{
+   bool result = ( m_operation == OSSIM_CHIPPER_OP_HILL_SHADE );
+   if ( !result && m_kwl.valid() )
+   {
+      result = ( m_kwl->find( ossimKeywordNames::AZIMUTH_ANGLE_KW ) ||
+                 m_kwl->find( COLOR_RED_KW.c_str() ) ||
+                 m_kwl->find( COLOR_GREEN_KW.c_str() ) ||
+                 m_kwl->find( COLOR_BLUE_KW.c_str() ) ||
+                 m_kwl->find( ossimKeywordNames::ELEVATION_ANGLE_KW ) ||
+                 m_kwl->find( GAIN_KW.c_str() ) );
+   }
+   return result;
+}
+
+bool ossimChipperUtil::hasThumbnailResolution() const
+{
+   bool result = false;
+   if ( m_kwl.valid() )
+   {
+      result = ( m_kwl->find( THUMBNAIL_RESOLUTION_KW.c_str() ) != 0 );
+   }
+   return result;
+}
+
+bool ossimChipperUtil::hasHistogramOperation() const
+{
+   bool result = false;
+   
+   if ( m_kwl.valid() )
+   {
+      result = ( m_kwl->find( HISTO_OP_KW.c_str() ) != 0 );
+   }
+   // No option for this right now.  Only through src file.
+   return result;
+}
+
+bool ossimChipperUtil::isDemFile(const ossimFilename& file) const
+{
+   bool result = false;
+   ossimString ext = file.ext();
+   if ( ext.size() >= 2 )
+   {
+      ext.downcase();
+      if ( ( ext == "hgt" ) ||
+           ( ext == "dem" ) ||
+          ( ( (*ext.begin()) == 'd' ) && ( (*(ext.begin()+1)) == 't' ) ) )
+      {
+         result = true;
+      }
+   }
+   return result;
+}
+
+bool ossimChipperUtil::isSrcFile(const ossimFilename& file) const
+{
+   bool result = false;
+   ossimString ext = file.ext();
+   ext.downcase();
+   if ( ext == "src" )
+   {
+      result = true;
+   }
+   return result;
+}
+
+ossimScalarType ossimChipperUtil::getOutputScalarType() const
+{
+   ossimScalarType scalar = OSSIM_SCALAR_UNKNOWN;
+   ossimString lookup = m_kwl->findKey( OUTPUT_RADIOMETRY_KW );
+   if ( lookup.size() )
+   {
+      scalar = ossimScalarTypeLut::instance()->getScalarTypeFromString( lookup );
+   }
+   if ( scalar == OSSIM_SCALAR_UNKNOWN )
+   {
+      // deprecated keyword...
+      if ( keyIsTrue( std::string(SCALE_2_8_BIT_KW) ) )
+      {
+         scalar = OSSIM_UINT8;
+      }
+   }
+   return scalar;
+}
+
+bool ossimChipperUtil::scaleToEightBit() const
+{
+   bool result = false;
+   if ( getOutputScalarType() == OSSIM_UINT8 )
+   {
+      result = true;
+   }
+   return result;
+}
+
+bool ossimChipperUtil::snapTieToOrigin() const
+{
+   return keyIsTrue( SNAP_TIE_TO_ORIGIN_KW );
+}
+
+void ossimChipperUtil::getImageSpaceScale( ossimDpt& imageSpaceScale ) const
+{
+   std::string value = m_kwl->findKey( IMAGE_SPACE_SCALE_X_KW );
+   if ( value.size() )
+   {
+      imageSpaceScale.x = ossimString(value).toFloat64();
+   }
+   else
+   {
+      imageSpaceScale.x = 1.0;
+   }
+   value = m_kwl->findKey( IMAGE_SPACE_SCALE_Y_KW );
+   if ( value.size() )
+   {
+      imageSpaceScale.y = ossimString(value).toFloat64();
+   }
+   else
+   {
+      imageSpaceScale.y = 1.0;
+   }
+}
+
+ossim_float64 ossimChipperUtil::getRotation() const
+{
+   ossim_float64 result = ossim::nan();
+   if ( m_kwl.valid() )
+   {
+      std::string value = m_kwl->findKey( ROTATION_KW);
+      if ( value.size() )
+      {
+         result = ossimString(value).toFloat64();
+         if ( result < 0 )
+         {
+            result += 360.0;
+         }
+
+         // Range check:
+         if ( ( result < 0.0 ) || ( result > 360.0 ) )
+         {
+            std::ostringstream errMsg;
+            errMsg << "ossimChipperUtil::getRotation range error!\n"
+                   << "rotation = " << result
+                   << "\nMust be between 0 and 360.";
+            throw ossimException( errMsg.str() );
+         }
+      }
+   }
+   return result;
+}
+
+bool ossimChipperUtil::upIsUp() const
+{
+   return keyIsTrue( std::string(UP_IS_UP_KW) );
+}
+
+bool ossimChipperUtil::hasRotation() const
+{
+   bool result = false;
+   std::string value = m_kwl->findKey(std::string(ROTATION_KW));
+   if ( value.size() )
+   {
+      result = true;
+   }
+   return result;
+}
+
+bool ossimChipperUtil::northUp() const
+{
+   return keyIsTrue( std::string(NORTH_UP_KW) );
+}
+
+bool ossimChipperUtil::isIdentity() const
+{
+   return (m_operation == OSSIM_CHIPPER_OP_CHIP);
+}
+
+bool ossimChipperUtil::keyIsTrue( const std::string& key ) const
+{
+   bool result = false;
+   if ( m_kwl.valid() )
+   {
+      std::string value = m_kwl->findKey( key );
+      if ( value.size() )
+      {
+         result = ossimString(value).toBool();
+      }
+   }
+   return result;
+}
+
+ossim_uint32 ossimChipperUtil::getEntryNumber() const
+{
+   ossim_uint32 result = 0;
+   if ( m_kwl.valid() )
+   {
+      std::string value = m_kwl->findKey( std::string( ossimKeywordNames::ENTRY_KW ) );
+      if ( value.size() )
+      {
+         result = ossimString(value).toUInt32();
+      }
+   }
+   return result;
+}
+
+ossim_int32 ossimChipperUtil::getZone() const
+{
+   ossim_int32 result = 0;
+   if ( m_kwl.valid() )
+   {
+      std::string value = m_kwl->findKey( std::string( ossimKeywordNames::ZONE_KW ) );
+      if ( value.size() )
+      {
+         result = ossimString(value).toUInt32();
+      }
+   }
+   return result;
+}
+      
+
+std::string ossimChipperUtil::getHemisphere() const
+{
+   std::string result;
+   if ( m_kwl.valid() )
+   {
+      result = m_kwl->findKey( std::string( ossimKeywordNames::HEMISPHERE_KW ) );
+   }
+   return result;
+}
+
+bool ossimChipperUtil::hasSensorModelInput()
+{
+   bool result = false;
+
+   // Test image layers.
+   std::vector< ossimRefPtr<ossimSingleImageChain> >::iterator chainIdx = m_imgLayer.begin();
+   while ( chainIdx != m_imgLayer.end() )
+   {
+      // Get the image handler:
+      ossimRefPtr<ossimImageHandler> ih = (*chainIdx)->getImageHandler();
+      if ( ih.valid() )
+      {
+         // Get the geometry from the first image handler.      
+         ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
+         if ( geom.valid() )
+         {
+            // Get the image projection.
+            ossimRefPtr<ossimProjection> proj = geom->getProjection();
+            if ( proj.valid() )
+            {
+               // Cast and assign to result.
+               ossimMapProjection* mapProj = PTR_CAST( ossimMapProjection, proj.get() );
+               if ( !mapProj )
+               {
+                  result = true;
+                  break;
+               }
+            }
+         }
+      }   
+      ++chainIdx;
+   }
+
+   if ( !result )
+   {
+      // Test dem layers.
+      chainIdx = m_demLayer.begin();
+      while ( chainIdx != m_demLayer.end() )
+      {
+         // Get the image handler:
+         ossimRefPtr<ossimImageHandler>  ih = (*chainIdx)->getImageHandler();
+         if ( ih.valid() )
+         {
+            // Get the geometry from the first image handler.      
+            ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
+            if ( geom.valid() )
+            {
+               // Get the image projection.
+               ossimRefPtr<ossimProjection> proj = geom->getProjection();
+               if ( proj.valid() )
+               {
+                  // Cast and assign to result.
+                  ossimMapProjection* mapProj = PTR_CAST( ossimMapProjection, proj.get() );
+                  if ( !mapProj )
+                  {
+                     result = true;
+                     break;
+                  }
+               }
+            }
+         }   
+         ++chainIdx;
+      }
+   }
+   
+   return result;
+}
+
+void  ossimChipperUtil::initializeSrcKwl()
+{
+   static const char MODULE[] = "ossimChipperUtil::initializeSrcKwl";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " entered...\n";
+   }
+
+   std::string value = m_kwl->findKey(std::string(SRC_FILE_KW));
+   if ( value.size() )
+   {
+      m_srcKwl = new ossimKeywordlist();
+      m_srcKwl->setExpandEnvVarsFlag(true);
+      if ( m_srcKwl->addFile( value.c_str() ) == false )
+      {
+         m_srcKwl = 0;
+      }
+   }
+   else
+   {
+      m_srcKwl = 0; 
+   }
+
+   if ( traceDebug() )
+   {
+      if ( m_srcKwl.valid() )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "src keyword list:\n" << *(m_srcKwl.get()) << "\n";
+      }
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " exited...\n";
+   }
+}
+
+ossim_uint32 ossimChipperUtil::getNumberOfInputs() const
+{
+   ossim_uint32 result = 0;
+   if ( m_kwl.valid() )
+   {
+      // Look for dems, e.g. dem0.file: foo.tif
+      ossimString regularExpression = "dem[0-9]*\\.file";
+      result = m_kwl->getNumberOfKeysThatMatch( regularExpression );
+      
+      // Look for images, e.g. image0.file: foo.tif
+      regularExpression = "image[0-9]*\\.file";
+      result += m_kwl->getNumberOfKeysThatMatch( regularExpression );
+   }
+   if ( m_srcKwl.valid() )
+   {
+      result += m_srcKwl->numberOf( DEM_KW.c_str() );
+      result += m_srcKwl->numberOf( IMG_KW.c_str() );
+   }
+   return result;
+}
+
+ossimChipperUtil::ossimChipperOutputProjection ossimChipperUtil::getOutputProjectionType() const
+{
+   ossimChipperOutputProjection result = ossimChipperUtil::OSSIM_CHIPPER_PROJ_UNKNOWN;
+   const char* op  = m_kwl->find(ossimKeywordNames::PROJECTION_KW);
+   if ( op )
+   {
+      ossimString os = op;
+      os.downcase();
+      if (os == "geo")
+      {
+         result = ossimChipperUtil::OSSIM_CHIPPER_PROJ_GEO;
+      }
+      else if (os == "geo-scaled")
+      {
+         result = ossimChipperUtil::OSSIM_CHIPPER_PROJ_GEO_SCALED;
+      }
+      else if ( os == "input" )
+      {
+         result = ossimChipperUtil::OSSIM_CHIPPER_PROJ_INPUT;
+      }
+      else if ( (os == "utm") || (os == "ossimutmprojection") )
+      {
+         result = ossimChipperUtil::OSSIM_CHIPPER_PROJ_UTM;
+      }
+   }
+   return result;
+}
+
+void ossimChipperUtil::getClipPolygon(ossimGeoPolygon& polygon)const
+{
+   ossimString param = m_kwl->find(CLIP_WMS_BBOX_LL_KW.c_str());
+   if(!param.empty())
+   {
+      if(!polygon.addWmsBbox(param))
+      {
+         polygon.clear();
+      }
+   }
+   else
+   {
+      param = m_kwl->find(CLIP_POLY_LAT_LON_KW.c_str());
+      if(!param.empty())
+      {
+         std::vector<ossimGpt> points;
+         ossim::toVector(points, param);
+         if(!points.empty())
+         {
+            polygon = points;
+         }
+      }
+   }
+}
+
+ossim_float64 ossimChipperUtil::getBrightness() const
+{
+   ossim_float64 brightness = 0.0;
+   std::string value = m_kwl->findKey( BRIGHTNESS_KW );
+   if ( value.size() )
+   {
+      brightness = ossimString(value).toFloat64();
+
+      // Range check it:
+      if ( ( brightness < -1.0 ) || ( brightness > 1.0 ) )
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimChipperUtil::getBrightness range error!"
+            << "\nbrightness: " << brightness
+            << "\nvalid range: -1.0 to 1.0"
+            << "\nReturned brightness has been reset to: 0.0"
+            << std::endl;
+         
+         brightness = 0.0;
+      }
+   }
+   return brightness;
+   
+}
+
+ossim_float64 ossimChipperUtil::getContrast() const
+{
+   ossim_float64 contrast = 1.0;
+   std::string value = m_kwl->findKey( CONTRAST_KW );
+   if ( value.size() )
+   {
+      contrast = ossimString(value).toFloat64();
+
+      // Range check it:
+      if ( ( contrast < 0.0 ) || ( contrast > 20.0 ) )
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimChipperUtil::getContrast range error!"
+            << "\ncontrast: " << contrast
+            << "\nvalid range: 0 to 20.0"
+            << "\nReturned contrast has been reset to: 1.0"
+            << std::endl;
+         
+         contrast = 1.0;
+      }
+   }
+   return contrast;
+   
+}
+
+std::string ossimChipperUtil::getSharpenMode() const
+{
+   ossimString mode = m_kwl->findKey( SHARPEN_MODE_KW );
+   if ( mode.size() )
+   {   
+      mode.downcase();
+      if ( (mode != "light") && (mode != "heavy") && (mode != "none") )
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimChipperUtil::getSharpnessMode WARNING!"
+            << "\nInvalid sharpness mode: " << mode
+            << "\nValid modes: \"light\" and \"heavy\""
+            << std::endl;
+         mode = "";
+      }
+   }
+   return mode.string();
+}
+
+void ossimChipperUtil::usage(ossimArgumentParser& ap)
+{
+   // Add global usage options.
+   ossimInit::instance()->addOptions(ap);
+   
+   // Set app name.
+   std::string appName = ap.getApplicationName();
+   ap.getApplicationUsage()->setApplicationName( ossimString( appName ) );
+
+   // Add options.
+   addArguments(ap);
+   
+   // Write usage.
+   ap.getApplicationUsage()->write(ossimNotify(ossimNotifyLevel_INFO));
+
+   // Keeping single line in tact for examples for cut and paste purposes.
+   ossimNotify(ossimNotifyLevel_INFO)
+
+      << "NOTES:\n"
+      << "1) Never use same base name in the same directory! Example is you have a Chicago.tif\n"
+      << "   and you want a Chicago.jp2, output Chicago.jp2 to its own directory.\n"
+      
+      << "\nExample commands:\n"
+
+      << "\n// File conversion: Convert geotiff to a jp2 file.\n"
+      << appName << " --op chip -w ossim_kakadu_jp2 Chicago.tif outputs/Chicago.jp2\n"
+
+      << "\n// Orthorectification: Orthorectify a nitf with RPC model out to a geotiff.\n"
+      << appName << " --op ortho 5V090205P0001912264B220000100282M_001508507.ntf outputs/ortho.tif\n"
+      
+      << "\n// Mosaic: Mosaic multiple images together and output to a geotiff.\n"
+      << appName << " --combiner-type ossimImageMosaic --op ortho f1.tif f2.tif f3.tif outputs/mosaic.tif\n"
+      
+      << "\n// Mosaic: Feather Mosaic multiple images together and output to a geotiff.\n"
+      << appName << " --combiner-type ossimFeatherMosaic --op ortho f1.tif f2.tif f3.tif outputs/feather.tif\n"
+
+      << "\n// Color relief: Colorize two DEMs from a lut, output to a geotiff.\n"
+      << appName << " --op color-relief --color-table ossim-dem-color-table-template.kwl N37W123.hgt N38W123.hgt outputs/color-relief.tif\n"
+
+      << "\n// Color relief: Colorize two DEMs from a lut, output to a png thumbnail.\n"
+      << appName << " --op color-relief --color-table ossim-dem-color-table-template.kwl -t 1024 -w ossim_png N37W123.hgt N38W123.hgt outputs/color-relief.png\n"
+
+      << "\n// Hill shade: Hill shade two DEMs, output to a geotiff.\n"
+      << appName << " --color 255 255 255 --azimuth 270 --elevation 45 --exaggeration 2.0 --op  hillshade N37W123.hgt N38W123.hgt outputs/hillshade.tif\n"
+      
+      << "\n// Two color multi view with cut box.  First image is old, second image is new:\n"
+      << appName << " --cut-bbox-ll 28.092885092033352 -80.664539599998633 28.109128691071547 -80.626914963229325 --op 2cmv oldMLB.tif newMLB.tif outputs/2cmv-test1.tif\n"
+
+      << "\n// Ortho about point, 512x512, with histogram stretch, and 3,2,1 band order:\n"
+      << appName << " --op ortho -b 3,2,1 --histogram-op auto-minmax --cut-center-llwh -42.819784401784275 147.265811350983 512 512 5V090205M0001912264B220000100072M_001508507.ntf orth.tif\n"
+
+      << "\n// Chip, in image space, about point, 512x512, with histogram stretch, and 3,2,1 band order:\n"
+      << appName << " --op chip -b 3,2,1 --histogram-op auto-minmax --cut-center-llwh -42.819784401784275 147.265811350983 512 512 5V090205M0001912264B220000100072M_001508507.ntf chip.tif\n"
+
+      << "\n// Chip in image space, rotate \"up is up\"(-u option) about point, 512x512 with histogram stretch and 3,2,1 band order:\n"
+      << appName << " --op chip -u -b 3,2,1 --histogram-op auto-minmax --cut-center-llwh -42.819784401784275 147.265811350983 512 512 5V090205M0001912264B220000100072M_001508507.ntf up-is-up-chip.tif\n"
+
+      << "\n// Chip in image space, rotate 39 degrees (-r option) about point, 1024x1024, scaled to eight bit:\n"
+      << appName << " --op chip -r 39 --histogram-op auto-minmax --cut-center-llwh -42.883809539602893 147.331984112985765 1024 1024 --output-radiometry U8 5V090205P0001912264B220000100282M_001508507.ntf outputs/r39.png\n"
+
+      << "\n// Above command where all options are in a keyword list:\n"
+      << appName << " --options r39-options.kwl\n"
+      << std::endl;
+}
+
+
diff --git a/ossim/src/ossim/util/ossimEquationUtil.cpp b/ossim/src/ossim/util/ossimEquationUtil.cpp
new file mode 100644
index 0000000..201d80e
--- /dev/null
+++ b/ossim/src/ossim/util/ossimEquationUtil.cpp
@@ -0,0 +1,410 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Garrett Potts
+//
+//*******************************************************************
+//  $Id: ossimEquationUtil.cpp 23434 2015-07-15 17:01:59Z gpotts $
+#include <iostream>
+#include <sstream>
+#include <fstream>
+using namespace std;
+
+#include <ossim/util/ossimEquationUtil.h>
+#include <ossim/imaging/ossimEquationCombiner.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <ossim/imaging/ossimImageFileWriter.h>
+#include <ossim/imaging/ossimImageRenderer.h>
+#include <ossim/projection/ossimImageViewProjectionTransform.h>
+#include <ossim/projection/ossimUtmProjection.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimConnectableObject.h>
+#include <ossim/base/ossimRtti.h>
+
+static ossimTrace traceDebug(ossimString("mosaic:main"));
+
+// Copied from ossimEquationCombiner.h:
+static const char* EQ_SPEC = "\nEquation Specification:\n\
+\n\
+sin(x)                 takes the sine of the input  \n\
+sind(x)                takes the sin of the input and assumes degree input \n\
+cos(x)                 takes cosine of input \n\
+cosd(x)                takes the cosine of input and assumes input in degrees \n\
+sqrt(x)                takes square root of input \n\
+log(x)                 takes the natural log of input \n\
+log10(x)               takes the log base 10 of the input \n\
+exp(x)                 takes the e raised to the passed in argument \n\
+abs(x)                 takes the absolute value of the passed in value \n\
+min(x1, x2, ... xn)    takes the min of all values in the list \n\
+max(x1, x2, ... xn)    takes the max of all values in the list. \n\
+\n\
+clamp(image_data, min, max) \n\
+                      will clamp all data to be between the min max values. \n\
+                      will set anything less than min to min and anythin \n\
+                      larger than max to max \n\
+\n\
+band(image_data, num)  returns a single band image object \n\
+                      by selecting band num from input image i1.  Note \n\
+                      the first argument must be an image \n\
+                      and the second argument must be a number \n\
+\n\
+shift(index, num_x, num_y) \n\
+                      currently, the first argument must be an image \n\
+                      variable(i1, i2, ... in) and x, and y must b numbers \n\
+                      indicating the delta in that direction to shift the \n\
+                      input. \n\
+\n\
+blurr(index, rows, cols) \n\
+                      Will blurr the input image i with a \n\
+                      rows-by-cols kernel.  All values are equal \n\
+                      weight.  Note the fist argument must by an image \n\
+                      variable (ex: i1, i2,....in). \n\
+\n\
+conv(index, rows, cols, <row ordered list of values> ) \n\
+                      this allows you to define an arbitrary matrix.  The \n\
+                      <row ordered list of values> is a comma separated \n\
+                      list of constant values. \n\
+\n\
+assign_band(image_data, num1, data2, num2) \n\
+                      will take band num2 from image data2 and assign it to \n\
+                      band num1 in data 1. \n\
+\n\
+assign_band(image_data, num1, data2) \n\
+                      will take band 1 from image data2 and assign it to \n\
+                      band num1 in data 1. \n\
+\n\
+assign_band(image_data, num1, num2) \n\
+                      will assin to band num1 of data 1 the value of num2 \n\
+\n\
+x1 * x2                will multiply x1 and x2 \n\
+x1 + x2                will add x1 and x2 \n\
+x1 - x2                will subtract x1 and x2 \n\
+x1 / x2                will divide x1 and x2 \n\
+x1 ^ x2                will do a power, raises x1 to x2 \n\
+x1 | x2                will do a bitwise or operation \n\
+                      ( will do it in unisgned char precision) \n\
+\n\
+x1 & x2                will do a bitwise and operation \n\
+                      ( will do it in unsigned char precision) \n\
+\n\
+~x1                    will do the ones complement of the input \n\
+\n\
+x1 xor x2              will do an xclusive or operation \n\
+                      (will do it in unsigned char precision) \n\
+\n\
+- x1                   will negative of x1 \n\
+\n\
+Boolean ops: 1=true, 0=false \n\
+x1 > x2 \n\
+x1 >= x2 \n\
+x1 == x2 \n\
+x1 <= x2 \n\
+x1 < x2 \n\
+x1 <> x2 \n\
+\n\
+Note: \n\
+\n\
+Currently an image input is reference by the variable in[<I>] where \n\
+<I> is the input image index beginning at 0.  So 1 referes to the second image \n\
+in the input list. \n\
+\n\
+(in[0] + in[1])/2 \n\
+Will take image 1 and add it to image 2 and average them. \n\
+\n\
+exp(sqrt(in[0])/4) \n\
+Will take the root of the image and divide by 4 and then raise e to that \n\
+amount. \n\
+\n\
+128 \n\
+Will return a constant value of 128 for all input bands. \n\
+\n\
+min(1,in[2],in[3], max(in[1],in[0])) \n\
+\n\
+shift(0, 1, 1) - i1 \n\
+Will shift input 0 by 1 pixel along the diagonal  and then subtract it \n\
+from input 1. \n\
+\n\
+assign_band(in[0], 1, blurr(in[0], 5, 5), 2) \n\
+Will assign to the first band of i1 the 2nd band of the 5x5 blurr of i1. \n\
+\n\
+conv(0, 3, 3, -1, -2, -1, 0, 0, 0, 1, 2, 1) \n\
+Will convolve the first input connection with a 3x3 matrix. \n\
+The args are row ordered: \n\
+                        -1, -2, -1 \n\
+                         0,  0,  0 \n\
+                         1,  2,  1 \n\
+\n\
+NDVI: \n\
+N=(in[0]-in[1])/(in[0]+in[1]) \n\
+\n\
+For indexed-type values,like NDVI, (with limited values) it is better \n\
+to rescale between 0.0 and 1.0 and use type NormalizedFloat. \n\
+\n\
+Rescaled NDVI between 0 and 1: \n\
+(N+1)/2 = in[0]/(in[0]+in[1]) \n\
+\n";
+
+ossimEquationUtil::ossimEquationUtil(ossimArgumentParser& ap)
+:  m_argumentParser(new ossimArgumentParser(ap))
+{
+   m_usage.setApplicationName(ap.getApplicationName());
+   m_usage.setDescription(ap.getApplicationName() +
+                        " Takes a list of images and performs the specified equation. The inputs"
+                        "must be in the same projection as the operations are done at the pixel"
+                        "level with no renderer in th chain. The output file will contain the same"
+                        "geospatial header info as the first image in the input list.");
+   m_usage.setCommandLineUsage(ap.getApplicationName()+
+                              " \"<equation spec>\" <input_file1> <input_file2> <input_file...> <output_file>");
+   m_usage.addCommandLineOption("-h or --help","Display this information");
+   m_usage.addCommandLineOption("-k <filename>", "keyword list to load from");
+   m_usage.addCommandLineOption("-w <type>", "Writer type (tiff_strip, jpeg, etc... see ossim-info --writers) (default=tiff_strip)");
+   m_usage.addCommandLineOption("--writer-prop <string>", "Adds a property to send to the writer. format is name=value");
+   m_usage.addCommandLineOption("-t <filename>", "ouput a keyword list template");
+}
+
+bool ossimEquationUtil::execute()
+{
+   // Allocate some stuff up front for use later
+   ossimString writerType = "tiff_strip";
+   ossimString equationSpec;
+   std::string tempString;
+   ossimArgumentParser::ossimParameter stringParam(tempString);
+   std::map<ossimString, ossimString, ossimStringLtstr> writerPropertyMap;
+   vector<ossimFilename> infiles;
+   ossimFilename outfile;
+
+   // Display Help
+   if (m_argumentParser->read("-h") || m_argumentParser->read("--help") || (m_argumentParser->argc() < 4))
+   {
+      m_usage.write(ossimNotify(ossimNotifyLevel_INFO));
+      ossimNotify(ossimNotifyLevel_INFO)<<EQ_SPEC<<endl;
+      return false;
+   }
+
+   // Output KWL template
+   if (m_argumentParser->read("-t", stringParam))
+   {
+      ossimFilename templateFilename = tempString.c_str();
+      outputTemplateKeywordlist(templateFilename);
+      return false;
+   }
+
+   // Keyword list to load from
+   if (m_argumentParser->read("-k", stringParam))
+   {
+      if (!parseKwl(tempString.c_str(), infiles, equationSpec, outfile, writerType))
+         return false;
+   }
+   else
+   {
+      // Everything on command line:
+      // user input writer props, should use those
+      while(m_argumentParser->read("--writer-prop", stringParam))
+      {
+         std::vector<ossimString> nameValue;
+         ossimString(tempString).split(nameValue, "=");
+         if(nameValue.size() == 2)
+            writerPropertyMap.insert(std::make_pair(nameValue[0], nameValue[1]));
+      }
+
+      // User input a writer type
+      if (m_argumentParser->read("-w", stringParam))
+         writerType = tempString;
+
+      int argCount = m_argumentParser->argc();
+      if (argCount < 4)
+      {
+         m_usage.write(ossimNotify(ossimNotifyLevel_INFO));
+         ossimNotify(ossimNotifyLevel_INFO)<<EQ_SPEC<<endl;
+         return false;
+      }
+
+      // First the equation spec:
+      equationSpec = m_argumentParser->argv()[1];
+
+      // Get the input files.
+      for (int i=2; i< (argCount-1); ++i)
+         infiles.push_back(ossimFilename(m_argumentParser->argv()[i]));
+
+      // Get the output file.
+      outfile = m_argumentParser->argv()[argCount-1];
+   }
+
+   if (!initInputSources(infiles))
+      return false;
+
+   // Create combiner object
+   ossimRefPtr<ossimEquationCombiner> combiner = new ossimEquationCombiner(m_inputSources);
+   combiner->setEquation(equationSpec);
+
+   // Create writer:
+   ossimRefPtr<ossimImageFileWriter> writer;
+   writer = ossimImageWriterFactoryRegistry::instance()->createWriter(writerType);
+   if(!writer.valid())
+   {
+      ossimNotify(ossimNotifyLevel_FATAL)<<"Could not create writer of type <"<<writerType<<">"<<endl;
+      return false;
+   }
+   writer->connectMyInputTo(combiner.get());
+   writer->setFilename(outfile);
+   ossimIrect bounding_irect;
+   m_prodGeometry->getBoundingRect(bounding_irect);
+   writer->setAreaOfInterest(bounding_irect);
+   writer->initialize();
+
+   if ( writerPropertyMap.size() )
+   {
+      ossimPropertyInterface* propInterface = (ossimPropertyInterface*) writer.get();
+      std::map<ossimString, ossimString, ossimStringLtstr>::iterator iter = writerPropertyMap.begin();
+      while(iter!=writerPropertyMap.end())
+      {
+         propInterface->setProperty(iter->first, iter->second);
+         ++iter;
+      }
+   }
+
+   // Execute:
+   ossimStdOutProgress listener;
+   writer->addListener(&listener);
+   if (!writer->execute())
+   {
+      ossimNotify(ossimNotifyLevel_WARN)<< "Error encountered writing file..."<<endl;
+      return false;
+   }
+
+   writer->close();
+   return true;
+}
+
+void ossimEquationUtil::outputTemplateKeywordlist(const ossimFilename &templateFilename)
+{
+   ofstream out(templateFilename.c_str());
+
+   out << "file1.filename: <full path and file name>" << endl
+       << "file2.filename: <full path and file name>" << endl
+       << "// :\n"
+       << "// :\n"
+       << "// fileN.filename:: <full path and file name>" << endl
+       << "\n// currently this option has been tested\n"
+       << "// with ossimTiffWriter and ossimJpegWriter\n"
+       << "writer.type: tiff_strip"            << endl
+       << "writer.filename: <full path to output file>"  << endl
+       << "\n// Equation specification:\n"
+       << "equation: <equation spec string>"<<endl;
+
+   ossimNotify(ossimNotifyLevel_NOTICE) << "Wrote file: " << templateFilename << std::endl;
+}
+
+bool ossimEquationUtil::parseKwl(const ossimFilename& kwl_file,
+              vector<ossimFilename>& inputs,
+              ossimString& equationSpec,
+              ossimFilename& output,
+              ossimString& writerType)
+{
+   ossimKeywordlist kwl;
+   if (!kwl.addFile(kwl_file))
+      return false;
+
+   ossim_int32 index = 0;
+   ossim_int32 result = kwl.getNumberOfSubstringKeys("file[0-9]+\\.filename");
+   const char* lookup = NULL;
+   ossim_int32 numberOfMatches = 0;
+
+   while(numberOfMatches < result)
+   {
+      ossimString searchValue = "file" + ossimString::toString(index);
+
+      ossimString filename = searchValue + ".filename";
+      lookup = kwl.find(filename.c_str());
+      if(lookup)
+      {
+         inputs.push_back(ossimFilename(lookup));
+         ++numberOfMatches;
+      }
+      ++index;
+   }
+
+   equationSpec = kwl.find("equation");
+   if (equationSpec.empty())
+   {
+      ossimNotify(ossimNotifyLevel_FATAL)<<"No equation specified in KWL"<<endl;
+      return false;
+   }
+
+   output = kwl.find("writer.filename");
+   if (output.empty())
+   {
+      ossimNotify(ossimNotifyLevel_FATAL)<<"No output filename specified in KWL"<<endl;
+      return false;
+   }
+
+   writerType = kwl.find("writer.type");
+   if (writerType.empty())
+      writerType = "tiff_strip";
+
+   return true;
+}
+
+bool ossimEquationUtil::initInputSources(vector<ossimFilename>& fileList)
+{
+   bool result = true;
+   m_inputSources.clear();
+   ossimRefPtr<ossimImageGeometry> input_geom;
+
+   for(ossim_int32 index = 0; index < (ossim_int32)fileList.size();++index)
+   {
+      ossimRefPtr<ossimImageHandler> handler =
+            ossimImageHandlerRegistry::instance()->open(fileList[index]);
+      if(!handler.valid())
+      {
+         cerr << "Error: Unable to load image " << fileList[index] << endl;
+         result = false;
+         break;
+      }
+
+      input_geom = handler->getImageGeometry();
+
+      if (index == 0)
+      {
+         m_prodGeometry = (ossimImageGeometry*) input_geom->dup();
+         ossimGpt origin;
+         m_prodGeometry->getTiePoint(origin, false);
+         ossimDpt gsd (m_prodGeometry->getMetersPerPixel());
+
+         if (m_prodGeometry->isAffectedByElevation())
+         {
+            // Need to ortho to UTM, so define output geometry shared by all input chains:
+            ossimMapProjection* prod_proj = new ossimUtmProjection;
+            prod_proj->setOrigin(origin);
+            prod_proj->setMetersPerPixel(m_prodGeometry->getMetersPerPixel());
+            m_prodGeometry->setProjection(prod_proj);
+         }
+      }
+
+      // Set up the IVT for this input's renderer:
+      ossimRefPtr<ossimImageViewProjectionTransform> transform = new ossimImageViewProjectionTransform;
+      transform->setImageGeometry(input_geom.get());
+      transform->setViewGeometry(m_prodGeometry.get());
+
+      ossimRefPtr<ossimImageRenderer> renderer = new ossimImageRenderer;
+      renderer->connectMyInputTo(0, handler.get());
+      renderer->setImageViewTransform(transform.get());
+      renderer->initialize();
+
+      m_inputSources.push_back(renderer.get());
+   }
+
+   return result;
+}
+
diff --git a/ossim/src/ossim/util/ossimFileWalker.cpp b/ossim/src/ossim/util/ossimFileWalker.cpp
new file mode 100644
index 0000000..50f1fcf
--- /dev/null
+++ b/ossim/src/ossim/util/ossimFileWalker.cpp
@@ -0,0 +1,535 @@
+//----------------------------------------------------------------------------
+//
+// File: ossimFileWalker.h
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:
+//
+// Utility class to walk through directories and get a list of files to
+// process.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/util/ossimFileWalker.h>
+#include <ossim/base/ossimDirectory.h>
+#include <ossim/base/ossimFileProcessorInterface.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/parallel/ossimJobQueue.h>
+#include <OpenThreads/Thread>
+
+static ossimTrace traceDebug(ossimString("ossimFileWalker:debug"));
+
+ossimFileWalker::ossimFileWalker()
+   : m_fileProcessor(0),
+     m_jobQueue(new ossimJobMultiThreadQueue(new ossimJobQueue(), 1)),     
+     m_filteredExtensions(0),
+     m_recurseFlag(true),
+     m_waitOnDirFlag(false),
+     m_abortFlag(false),
+     m_mutex()
+{
+}
+
+ossimFileWalker::~ossimFileWalker()
+{
+   m_jobQueue = 0; // Not a leak, ref pointer.
+}
+
+void ossimFileWalker::walk(const std::vector<ossimFilename>& files)
+{
+   static const char M[] = "ossimFileWalker::walk";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered\n";
+   }
+
+   if ( files.size() )
+   {
+      std::vector<ossimFilename>::const_iterator i = files.begin();
+      while ( i != files.end() )
+      {
+         // Must have call back set at this point.
+         if ( !m_abortFlag && m_fileProcessor )
+         {
+            ossimFilename file = (*i).expand();
+            if ( file.size() && file.exists() )
+            {
+               if ( file.isDir() ) // Directory:
+               {
+                  walkDir(file);
+               }  
+               else // File:
+               {
+                  if ( isFiltered(file) == false )
+                  {
+                     if(traceDebug())
+                     {
+                        ossimNotify(ossimNotifyLevel_DEBUG)
+                           << "Making the job for: " << (*i) << std::endl;
+                     }
+                     
+                     // Make the job:
+                     ossimRefPtr<ossimFileWalkerJob> job =
+                        new ossimFileWalkerJob( m_fileProcessor, file );
+                     
+                     job->setName( ossimString( file.string() ) );
+                     
+                     job->setCallback( new ossimFileWalkerJobCallback() );
+                     
+                     // Set the state to ready:
+                     job->ready();
+                     
+                     // Add job to the queue:
+                     m_jobQueue->getJobQueue()->add( job.get() );
+                     
+                     m_mutex.lock();
+                     if ( m_abortFlag )
+                     {
+                        // Clear out the queue.
+                        m_jobQueue->getJobQueue()->clear();
+                        
+                        break; // Callee set our abort flag so break out of loop.
+                     }
+                     m_mutex.unlock();
+                  }
+               }
+            }
+            else
+            {
+               ossimNotify(ossimNotifyLevel_WARN)
+                  << M << " WARNING: file: \""<< file << "\" does not exist" << std::endl;
+            }
+         }
+
+         ++i;
+      
+      } // while ( i != files.end() )
+
+      // FOREVER loop until all jobs are completed.
+      while (1)
+      {
+         if ( OpenThreads::Thread::microSleep(250) == 0 )
+         {
+            if ( m_jobQueue->hasJobsToProcess() == false )
+            {
+               break;
+            }
+         }
+      }
+
+   } // if ( files.size() )
+
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exiting...\n";
+   }  
+}
+
+void ossimFileWalker::walk(const ossimFilename& root)
+{
+   static const char M[] = "ossimFileWalker::walk";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered root=" << root << "\n";
+   }
+
+   // Must have call back set at this point.
+   if ( !m_abortFlag && m_fileProcessor )
+   {
+      ossimFilename rootFile = root.expand();
+      if ( rootFile.size() && rootFile.exists() )
+      {
+         if ( rootFile.isDir() )
+         {
+            walkDir(rootFile);
+
+            // FOREVER loop until all jobs are completed.
+            while (1)
+            {
+               if ( OpenThreads::Thread::microSleep(250) == 0 )
+               {
+                  if ( m_jobQueue->hasJobsToProcess() == false )
+                  {
+                     break;
+                  }
+               }
+            }
+         }
+         else
+         {
+            // Single file no job queue needed.
+            if ( isFiltered( rootFile ) == false )
+            {
+               m_fileProcessor->processFile( rootFile );
+            }
+         }
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << M << " WARNING: file: \""<< rootFile << "\" does not exist" << std::endl;
+      }
+   }
+   
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exiting...\n";
+   }  
+}
+
+void ossimFileWalker::walkDir(const ossimFilename& dir)
+{
+   static const char M[] = "ossimFileWalker::walkDir";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << M << " entered...\n" << "processing dir: " << dir << "\n";
+   }
+
+   // List of directories in this directory...
+   std::vector<ossimFilename> dirs;
+   
+   // List of files in this directory...
+   std::vector<ossimFilename> files;
+
+   m_mutex.lock();
+   ossimDirectory d;
+   bool ossimDirectoryStatus = d.open(dir);
+   m_mutex.unlock();
+
+   if ( ossimDirectoryStatus )
+   {
+      // Loop to get the list of files and directories in this directory.
+      m_mutex.lock();
+      ossimFilename f;
+      bool valid_file = d.getFirst(f);
+      while ( valid_file )
+      {
+         if ( isFiltered(f) == false )
+         {
+            if (f.isDir())
+            {
+               dirs.push_back(f);
+            }
+            else
+            {
+               files.push_back(f);
+            }
+         }
+         valid_file = d.getNext(f);
+      }
+      m_mutex.unlock();
+
+      //---
+      // Process files first before recursing directories.  If a file is a directory base image,
+      // e.g. RPF, then the callee should call ossimFileWalker::setRecurseFlag to false to
+      // stop us from going into sub directories.
+      //---
+      std::vector<ossimFilename>::const_iterator i = files.begin();
+      while (i != files.end())
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << "Making the job for: " << (*i) << std::endl;
+         }
+         
+         // Make the job:
+         ossimRefPtr<ossimFileWalkerJob> job =
+            new ossimFileWalkerJob( m_fileProcessor, (*i) );
+
+         job->setName( ossimString( (*i).string() ) );
+
+         job->setCallback( new ossimFileWalkerJobCallback() );
+
+         // Set the state to ready:
+         job->ready();
+
+         // Add job to the queue:
+         m_jobQueue->getJobQueue()->add( job.get() );
+
+         m_mutex.lock();
+         if ( m_abortFlag )
+         {
+            // Clear out the queue.
+            m_jobQueue->getJobQueue()->clear();
+            
+            break; // Callee set our abort flag so break out of loop.
+         }
+         m_mutex.unlock();
+
+         ++i;
+      }
+
+      if ( m_waitOnDirFlag )
+      {
+         // FOREVER loop until all jobs are completed.
+         while (1)
+         {
+            if ( OpenThreads::Thread::microSleep(250) == 0 )
+            {
+               if ( m_jobQueue->hasJobsToProcess() == false )
+               {
+                  break;
+               }
+            }
+         }
+      }
+
+      m_mutex.lock();
+      if ( !m_abortFlag && m_recurseFlag )
+      {
+         // Process sub directories...
+         i = dirs.begin();
+         while (i != dirs.end())
+         {
+            m_mutex.unlock();
+            walkDir( (*i) );
+            m_mutex.lock();
+
+            if ( m_abortFlag )
+            {
+               break; // Callee set our abort flag so break out of loop.
+            }
+            ++i;
+         }
+      }
+      m_mutex.unlock();
+      
+   } // if ( ossimDirectoryOpenStatus )
+
+   // Reset the m_recurseFlag.
+   m_mutex.lock();
+   m_recurseFlag = true;
+   m_mutex.unlock();
+   
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
+   }
+}
+
+bool ossimFileWalker::isFiltered(const ossimFilename& file) const
+{
+   bool result = false;
+   if ( file.size() )
+   {
+      if ( isDotFile(file) )
+      {
+         result = true;
+      }
+      else if ( file[file.size()-1] == '~' )
+      {
+         result = true;
+      }
+      else 
+      {
+         std::string ext = file.ext().downcase().c_str();
+         if ( ext.size() )
+         {
+            std::vector<std::string>::const_iterator i = m_filteredExtensions.begin();
+            while ( i != m_filteredExtensions.end() )
+            {
+               if ( ext == (*i) )
+               {
+                  result = true;
+                  break;
+               }
+               ++i;
+            }
+         }
+      }
+   }
+#if 0 /* Please leave for debug. (drb) */
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimFileWalker::isFiltered file " << (result?"filtered: ":"not filtered: ")
+         << file << "\n";
+   }
+#endif
+   
+   return result;
+}
+
+bool ossimFileWalker::isDotFile(const ossimFilename& f) const
+{
+   bool result = false;
+   
+   // Get the size in bytes.
+   if ( f.size() )
+   {
+      std::string::size_type firstDotPos = f.find('.');
+      if ( firstDotPos == 0 )
+      {
+         result = true;
+      }
+      else if ( firstDotPos != std::string::npos ) // Dot in file.
+      {
+         // Get the position of first dot from the end.
+         std::string::size_type lastDotPos = f.find_last_of('.');
+         if ( lastDotPos != std::string::npos )
+         {
+            // Make copy.
+            ossimFilename f2 = f;
+            
+            // Convert an '\'s to '/'s. 
+            f2.convertBackToForwardSlashes();
+            
+            // Find the first slash from end.
+            std::string::size_type lastSlashPos = f2.find_last_of('/');
+            
+            if (lastSlashPos != std::string::npos) // Found a slash.
+            {
+               if ( (lastSlashPos+1) == lastDotPos )
+               {
+                  // dot in front of slash like /home/foo/.xemacs
+                  result = true;
+               }
+            }
+         }
+      }
+   }
+
+   return result;
+}
+
+const std::vector<std::string>& ossimFileWalker::getFilteredExtensions() const
+{
+   return m_filteredExtensions;
+}
+
+std::vector<std::string>& ossimFileWalker::getFilteredExtensions()
+{
+   return m_filteredExtensions;
+}
+
+void ossimFileWalker::dumpFilteredExtensionList() const
+{
+   ossimNotify(ossimNotifyLevel_NOTICE) << "Filtered extension list:\n";
+   std::vector<std::string>::const_iterator i = m_filteredExtensions.begin();
+   while ( i != m_filteredExtensions.end() )
+   {
+      ossimNotify(ossimNotifyLevel_NOTICE) << (*i) << "\n";
+      ++i;
+   }
+   ossimNotify(ossimNotifyLevel_NOTICE) << std::endl;
+}
+
+void ossimFileWalker::initializeDefaultFilterList()
+{
+   m_mutex.lock();
+   
+   // Common extensions to filter out, most common first.
+   m_filteredExtensions.push_back(std::string("ovr"));
+   m_filteredExtensions.push_back(std::string("omd"));
+   m_filteredExtensions.push_back(std::string("his"));
+   m_filteredExtensions.push_back(std::string("geom"));
+   
+   // The rest alphabetical.
+   m_filteredExtensions.push_back(std::string("aux"));
+   m_filteredExtensions.push_back(std::string("bin"));
+   m_filteredExtensions.push_back(std::string("dbf"));
+   m_filteredExtensions.push_back(std::string("h5"));
+   m_filteredExtensions.push_back(std::string("hdr"));
+   m_filteredExtensions.push_back(std::string("jgw"));
+   m_filteredExtensions.push_back(std::string("jpw"));   
+   m_filteredExtensions.push_back(std::string("kwl"));
+   m_filteredExtensions.push_back(std::string("log"));
+   m_filteredExtensions.push_back(std::string("man"));
+   m_filteredExtensions.push_back(std::string("ocg"));
+   m_filteredExtensions.push_back(std::string("out"));
+   m_filteredExtensions.push_back(std::string("prj"));
+   m_filteredExtensions.push_back(std::string("save"));
+   m_filteredExtensions.push_back(std::string("sdw"));
+   m_filteredExtensions.push_back(std::string("sh"));
+   m_filteredExtensions.push_back(std::string("shp"));
+   m_filteredExtensions.push_back(std::string("shx"));
+   m_filteredExtensions.push_back(std::string("spec"));
+   m_filteredExtensions.push_back(std::string("statistics"));
+   m_filteredExtensions.push_back(std::string("tar"));
+   m_filteredExtensions.push_back(std::string("til"));   
+   m_filteredExtensions.push_back(std::string("tfw"));
+   m_filteredExtensions.push_back(std::string("tgz"));
+   m_filteredExtensions.push_back(std::string("tmp"));
+   m_filteredExtensions.push_back(std::string("txt"));
+
+   m_mutex.unlock();
+}
+
+void ossimFileWalker::setRecurseFlag(bool flag)
+{
+   m_mutex.lock();
+   m_recurseFlag = flag;
+   m_mutex.unlock();
+}
+
+void ossimFileWalker::setWaitOnDirFlag(bool flag)
+{
+   m_mutex.lock();
+   m_waitOnDirFlag = flag;
+   m_mutex.unlock();
+}
+
+void ossimFileWalker::setAbortFlag(bool flag)
+{
+   m_mutex.lock();
+   m_abortFlag = flag;
+   m_mutex.unlock();
+}
+
+void ossimFileWalker::setNumberOfThreads(ossim_uint32 nThreads)
+{
+   m_mutex.lock();
+   m_jobQueue->setNumberOfThreads(nThreads);
+   m_mutex.unlock();
+}
+
+void ossimFileWalker::setFileProcessor(ossimFileProcessorInterface* fpi)
+{
+   m_mutex.lock();
+   m_fileProcessor = fpi;
+   m_mutex.unlock();
+}
+
+ossimFileWalker::ossimFileWalkerJob::ossimFileWalkerJob(
+   ossimFileProcessorInterface* fpi,
+   const ossimFilename& file)
+   : m_fileProcessor( fpi ),
+     m_file( file )
+{
+}
+
+void ossimFileWalker::ossimFileWalkerJob::start()
+{
+   if ( m_fileProcessor && m_file.size() )
+   {
+      m_fileProcessor->processFile( m_file );
+   }
+}
+
+ossimFileWalker::ossimFileWalkerJobCallback::ossimFileWalkerJobCallback()
+   : ossimJobCallback()
+{
+}
+
+void ossimFileWalker::ossimFileWalkerJobCallback::started(ossimJob* job)
+{
+   ossimJobCallback::started(job);
+}
+
+void ossimFileWalker::ossimFileWalkerJobCallback::finished(ossimJob* job)
+{
+   ossimJobCallback::finished(job);
+}
+
+void ossimFileWalker::ossimFileWalkerJobCallback::canceled(ossimJob* job)
+{
+   ossimJobCallback::canceled(job);
+}
+
diff --git a/ossim/src/ossim/util/ossimHLZUtil.cpp b/ossim/src/ossim/util/ossimHLZUtil.cpp
new file mode 100644
index 0000000..0822e8e
--- /dev/null
+++ b/ossim/src/ossim/util/ossimHLZUtil.cpp
@@ -0,0 +1,1108 @@
+//*******************************************************************
+// License:  See top level LICENSE.txt file.
+// Author:  Oscar Kramer
+//*******************************************************************
+//  $Id: ossimHLZUtil.cpp 23465 2015-08-13 13:36:26Z okramer $
+
+#include <ossim/util/ossimHLZUtil.h>
+
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimRtti.h>
+#include <ossim/base/ossimGrect.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/elevation/ossimElevManager.h>
+#include <ossim/elevation/ossimImageElevationDatabase.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageRenderer.h>
+#include <ossim/imaging/ossimImageMosaic.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimSlopeFilter.h>
+#include <ossim/imaging/ossimTiffWriter.h>
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <ossim/imaging/ossimMemoryImageSource.h>
+#include <ossim/imaging/ossimIndexToRgbLutFilter.h>
+#include <ossim/point_cloud/ossimPointCloudHandlerRegistry.h>
+#include <fstream>
+
+const char* MASK_PREFIX = "mask";
+const char* MASK_EXCLUDE_KW = "exclude";
+
+ossimHLZUtil::ossimHLZUtil()
+: m_slopeThreshold(7.0),
+  m_roughnessThreshold(0.5),
+  m_hlzMinRadius(25.0),
+  m_aoiRadius(0),
+  m_outBuffer(NULL),
+  m_gsd(0),
+  m_reticleSize(10),
+  m_outputSummary(false),
+  m_jobCount(0),
+  m_badLzValue(0),
+  m_marginalLzValue(1),
+  m_goodLzValue(2),
+  m_reticleValue(3),
+  m_useLsFitMethod(false),
+  m_numThreads(1),
+  d_accumT(0)
+{
+   m_destinationGpt.makeNan();
+}
+
+ossimHLZUtil::~ossimHLZUtil()
+{
+}
+
+void ossimHLZUtil::usage(ossimArgumentParser& ap)
+{
+   // Add global usage options.
+   ossimInit::instance()->addOptions(ap);
+
+   // Add options.
+   addArguments(ap);
+
+   // Write usage.
+   ap.getApplicationUsage()->write(ossimNotify(ossimNotifyLevel_INFO));
+
+   ossimNotify(ossimNotifyLevel_INFO)
+   << "\nFinds acceptable helicopter landing zones given terrain data and LZ criteria. The "
+   << "output is an 8-bit, single band, raster image. Options exist for customizing the output"
+   << " pixel values including an option to generate a color raster with the use of a look-up"
+   << " table.\n\n"
+   << "Examples:\n\n"
+   << "    "<<ap.getApplicationName()<<" [options] --roi 5000 --rlz 25 --target 25.5000 -80.000 output-hlz.tif\n"
+   << "    "<<ap.getApplicationName()<<" [options] --dem mydata.hgt --rlz 25 output-hlz.tif \n\n"
+   << std::endl;
+}
+
+void ossimHLZUtil::addArguments(ossimArgumentParser& ap)
+{
+   // Set the general usage:
+   ossimApplicationUsage* au = ap.getApplicationUsage();
+   ossimString usageString = ap.getApplicationName();
+   usageString += " [options] <output-image>";
+   au->setCommandLineUsage(usageString);
+
+   // Set the command line options:
+   au->addCommandLineOption(
+         "--gsd <meters>",
+         "Specifies output GSD in meters. Defaults to the same resolution as best input DEM. "
+         "Alternatively, if a DEM file is specified, the product GSD defaults to the input DEM's GSD.");
+   au->addCommandLineOption(
+         "--dem <filename>",
+         "Specifies the input DEM filename to use for level-1 processing. If none provided, the "
+         "elevation database is referenced as specified in prefs file for the ROI specified.");
+   au->addCommandLineOption(
+         "--ls-fit",
+         "Slope is computed via an LS fit to a plane instead of the default slope computation using "
+         "differences to compute normal vector.");
+   au->addCommandLineOption(
+         "--lut <filename>",
+         "Specifies the optional lookup table filename for mapping the single-band output image to "
+         "an RGB. The LUT provided must be in the ossimIndexToRgbLutFilter format and must handle "
+         "the discrete output values (see --values option).");
+   au->addCommandLineOption(
+         "--mask <filename>",
+         "Either a Keyword-list file or raster image. The KWL file can contain multiple mask files "
+         "and how to interpret them, i.e., whether non-null pixels define exclusion zones (cannot "
+         "land inside) or inclusion (must land inside). A single mask raster image is assumed to "
+         "represent exclusion zones.");
+   au->addCommandLineOption(
+         "--output-slope <filename.tif>",
+         "Generates a slope byproduct image (floating point degrees) to the specified filename. "
+         "Only valid if normal-vector method used (i.e., --ls-fit option NOT specified)");
+   au->addCommandLineOption(
+         "--pc | --point-cloud <filename>",
+         "Specifies ancillary point-cloud data file for level-2 search for obstructions.");
+   au->addCommandLineOption(
+         "--request-api",
+         "Causes applications API to be output as JSON to stdout. Accepts optional filename to "
+         "store JSON output.");
+   au->addCommandLineOption(
+         "--reticle <int>",
+         "Specifies the size of the reticle at the destination point location in pixels from the "
+         "center (i.e., the radius of the reticle). Defaults to 10. A value of 0 hides the reticle. "
+         "See --values option for setting reticle color.");
+   au->addCommandLineOption(
+         "--rlz <meters>",
+         "Specifies minimum radius of landing zone. Defaults to 25 m. ");
+   au->addCommandLineOption(
+         "--roi <meters>",
+         "radius of interest surrounding the destination point. If absent, the product defaults to "
+         "1024 x 1024 pixels, with a radius of 512 * GSD. Alternatively, if a DEM file is "
+         "specified, the product ROI defaults to the full DEM coverage.");
+   au->addCommandLineOption(
+         "--roughness <meters>",
+         "Specifies the terrain roughness threshold (meters). This is the maximum deviation from a "
+         "flat plane permitted. Defaults to 0.5 m. Valid only with --ls-fit specified.");
+   au->addCommandLineOption("--simulation", "For engineering/debug purposes ");
+   au->addCommandLineOption(
+         "--size <int>",
+         "Instead of a radius of interest, directly specifies the dimensions of the "
+         " output product in pixels (output is square). Required unless --roi is specified and/or "
+         "an inout DEM is specified.");
+   au->addCommandLineOption(
+         "--slope <degrees>",
+         "Threshold for acceptable landing zone terrain slope. Defaults to 7 deg.");
+   au->addCommandLineOption(
+         "--summary",
+         "Causes a product summary to be output to the console.");
+   au->addCommandLineOption(
+         "--target <lat> <lon>",
+         "The center target destination around which suitable HLZs are identified. This can be "
+         "omitted if an input DEM file is provided, in which case the center of the DEM is the target.");
+   au->addCommandLineOption(
+         "--threads <n>",
+         "Number of threads. Defaults to use single core. For engineering/debug purposes.");
+   au->addCommandLineOption(
+         "--values <bad marg good ret>",
+         "Specifies the pixel values (0-255) for the output product corresponding to bad, marginal, "
+         "and good landing zones, respectively, with the fourth value representing the reticle "
+         "value. Defaults to bad=0 (null), marg=1, , good=2, and reticle is highlighted with 3.");
+}
+
+bool ossimHLZUtil::parseCommand(ossimArgumentParser& ap)
+{
+   if ((ap.argc() == 1) || ap.read("-h") || ap.read("--help"))
+   {
+      usage(ap);
+      return false;
+   }
+
+   std::string ts1;
+   ossimArgumentParser::ossimParameter sp1(ts1);
+   std::string ts2;
+   ossimArgumentParser::ossimParameter sp2(ts2);
+   std::string ts3;
+   ossimArgumentParser::ossimParameter sp3(ts3);
+   std::string ts4;
+   ossimArgumentParser::ossimParameter sp4(ts4);
+
+   if (ap.read("--gsd", sp1))
+      m_gsd = ossimString(ts1).toDouble();
+
+   if (ap.read("--dem", sp1))
+      m_demFile = ts1;
+
+   if (ap.read("--ls-fit"))
+      m_useLsFitMethod = true;
+
+   if (ap.read("--lut", sp1))
+      m_lutFile = ts1;
+
+   if (ap.read("--mask", sp1))
+      m_maskFile = ts1;
+
+   if ( ap.read("--output-slope", sp1))
+   {
+      m_slopeFile = ts1;
+   }
+   if (ap.read("--pc", sp1) || ap.read("--point-cloud", sp1))
+      m_pcFile = ts1;
+
+   if ( ap.read("--request-api", sp1))
+   {
+      ofstream ofs ( ts1.c_str() );
+      printApiJson(ofs);
+      ofs.close();
+      return false;
+   }
+   if ( ap.read("--request-api"))
+   {
+      printApiJson(cout);
+      return false;
+   }
+   if (ap.read("--reticle", sp1))
+      m_reticleSize = ossimString(ts1).toInt32();
+
+   if (ap.read("--rlz", sp1))
+      m_hlzMinRadius = ossimString(ts1).toDouble();
+
+   if (ap.read("--roi", sp1))
+      m_aoiRadius = ossimString(ts1).toDouble();
+
+   if (ap.read("--roughness", sp1))
+      m_roughnessThreshold = ossimString(ts1).toDouble();
+
+   if (ap.read("--summary"))
+      m_outputSummary = true;
+
+   if (ap.read("--size", sp1))
+   {
+      m_viewRect.set_lrx(ossimString(ts1).toUInt32());
+      m_viewRect.set_lry(m_viewRect.lr().x);
+   }
+
+   if (ap.read("--slope", sp1))
+      m_slopeThreshold = ossimString(ts1).toDouble();
+
+   if (ap.read("--target", sp1, sp2))
+   {
+      m_destinationGpt.lat = ossimString(ts1).toDouble();
+      m_destinationGpt.lon = ossimString(ts2).toDouble();
+   }
+
+   if (ap.read("--threads", sp1))
+   {
+      m_numThreads = ossimString(ts1).toUInt32();
+   }
+
+   if (ap.read("--values", sp1, sp2, sp3, sp4))
+   {
+      m_badLzValue = ossimString(ts1).toUInt8();
+      m_marginalLzValue = ossimString(ts2).toUInt8();
+      m_goodLzValue = ossimString(ts3).toUInt8();
+      m_reticleValue = ossimString(ts4).toUInt8();
+   }
+
+   // There should only be the required command line args left:
+   if (ap.argc() != 2)
+   {
+      usage(ap);
+      return false;
+   }
+
+   // Parse the required command line params:
+   m_productFile = ap[1];
+
+   // Verify minimum required args were specified:
+   if (m_demFile.empty() && m_destinationGpt.isLonLatNan())
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+                  << "ossimHLZUtil::initialize ERR: Command line is underspecified." << std::endl;
+      usage(ap);
+      return false;
+   }
+   return initialize();
+}
+
+bool ossimHLZUtil::initialize()
+{
+   m_productGeom = new ossimImageGeometry;
+
+   // If DEM provided as file on command line, reset the elev manager to use only this:
+   if (!m_demFile.empty() && !loadDemFile())
+      return false;
+
+   // Determine if default GSD needs to be computed.
+   if (m_gsd == 0)
+   {
+      // Query for target H so as to autoload cell(s):
+      ossimElevManager::instance()->getHeightAboveEllipsoid(m_destinationGpt);
+      m_gsd = ossimElevManager::instance()->getMeanSpacingMeters();
+      if (ossim::isnan(m_gsd))
+         m_gsd = 0;
+   }
+
+   // Make sure that AOI and GSD are initialized:
+   if ((m_aoiRadius == 0) && (m_gsd != 0))
+   {
+      // The radius of interest can default given a GSD to achieve a specific output image size.
+      if (m_viewRect.area() <= 1)
+            m_viewRect = ossimIrect(0, 0, 1023, 1023);
+      m_aoiRadius = (m_viewRect.size().x + m_viewRect.size().y - 2) * m_gsd / 4.0;
+   }
+   else if ((m_gsd == 0) && (m_aoiRadius != 0))
+   {
+      // Likewise, the GSD can default given an AOI and image size:
+      if (m_viewRect.area() <= 1)
+            m_viewRect = ossimIrect(0,0,1023,1023);
+      m_gsd = 4.0 * m_aoiRadius / (m_viewRect.size().x + m_viewRect.size().y - 2);
+   }
+   if ((m_gsd == 0) || (m_aoiRadius == 0))
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << "ossimHLZUtil::initialize() ERROR: GSD and/or AOI "
+            "radius have not been set." << std::endl;
+      return false;
+   }
+
+   // If needed, compute the bounding rect in pixel space given the visibility range and the GSD:
+   if (m_viewRect.area() <= 1)
+   {
+      m_viewRect.set_lrx(2.0 * ossim::round<ossim_int32, double>(m_aoiRadius / m_gsd) - 1);
+      m_viewRect.set_lry(m_viewRect.lr().x);
+   }
+
+   // Establish the output image geometry's map projection if not already done:
+   ossimRefPtr<ossimMapProjection> mapProj = m_productGeom->getAsMapProjection();
+   if (!mapProj.valid())
+   {
+      mapProj = new ossimEquDistCylProjection();
+      m_productGeom->setProjection(mapProj.get());
+   }
+
+   mapProj->setOrigin(m_destinationGpt);
+   mapProj->setMetersPerPixel(ossimDpt(m_gsd, m_gsd));
+   ossimDpt degPerPixel(mapProj->getDecimalDegreesPerPixel());
+   mapProj->setElevationLookupFlag(false);
+   ossimGpt ulTiePt(m_destinationGpt);
+   ossimIpt image_size(m_viewRect.width(), m_viewRect.height());
+   ossimDpt offset (-image_size.x / 2.0, -image_size.y / 2.0);
+   ulTiePt.lat -= degPerPixel.lat * offset.y;
+   ulTiePt.lon += degPerPixel.lon * offset.x;
+   mapProj->setUlTiePoints(ulTiePt);
+
+   // Need a transform so that we can use the observer point as the output image origin (0,0):
+   m_productGeom->setImageSize(image_size);
+
+   // Establish the ground rect:
+   ossimGpt ul, ur, lr, ll;
+   m_productGeom->getBoundingGroundRect(m_gndRect);
+
+   // If PC provided as file on command line, Load it. This uses the output ground rect so needs to
+   // be after the initialization of m_geometry:
+   if (!m_pcFile.empty() && !loadPcFile())
+      return false;
+
+   // If threat-domes spec (or any mask) provided as file on command line, Load it:
+   if (!m_maskFile.empty() && !loadMaskFiles())
+      return false;
+
+   // Allocate the output image buffer:
+   m_outBuffer = ossimImageDataFactory::instance()->create(0, OSSIM_UINT8, 1, m_viewRect.width(),
+                                                           m_viewRect.height());
+   if (!m_outBuffer.valid())
+      return false;
+
+   // Initialize the image with all points hidden:
+   m_outBuffer->initialize();
+   m_outBuffer->setImageRectangle(m_viewRect);
+   m_outBuffer->fill(m_badLzValue);
+
+   // Establish connection to DEM posts directly as raster "images" versus using the OSSIM elev
+   // manager that performs interpolation of DEM posts for arbitrary locations. These elev images
+   // feed into a combiner in order to have a common tap for elev pixels:
+   if (!initProcessingChain())
+      return false;
+
+   if (!initHlzFilter())
+      return false;
+
+   if (m_outputSummary)
+      dumpProductSummary();
+
+   return true;
+}
+
+void ossimHLZUtil::setProductGSD(const double& meters_per_pixel)
+{
+   m_gsd = meters_per_pixel;
+
+   if (m_productGeom.valid())
+   {
+      ossimMapProjection* map_proj =
+            dynamic_cast<ossimMapProjection*>(m_productGeom->getProjection());
+      if (map_proj)
+         map_proj->setMetersPerPixel(ossimDpt(m_gsd, m_gsd));
+   }
+}
+
+bool ossimHLZUtil::loadDemFile()
+{
+   ossimElevManager* elevMgr = ossimElevManager::instance();
+   elevMgr->clear();
+
+   ossimRefPtr<ossimImageElevationDatabase> ied = new ossimImageElevationDatabase;
+   if (!ied->open(m_demFile))
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimHLZUtil::initialize ERR: Cannot open DEM file at <" << m_demFile << ">\n"
+               << std::endl;
+      return false;
+   }
+   elevMgr->addDatabase(ied.get());
+
+   // When a dem file is provided, certain parameters can be implied versus explicitely provided
+   // in the command-line arguments:
+   ossimRefPtr<ossimImageHandler> dem_handler =
+         ossimImageHandlerRegistry::instance()->open(m_demFile, true, false);
+   if (!dem_handler.valid())
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimHLZUtil::initialize ERR: Cannot open DEM file <" << m_demFile << "> "
+               "as image handler.\n" << std::endl;
+      return false;
+   }
+
+   // Create the processing chain used for this elevation single image source:
+   createInputChain(dem_handler, m_combinedElevSource);
+   ossimRefPtr<ossimImageGeometry> dem_geom = dem_handler->getImageGeometry();
+   if (dem_geom == 0)
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimHLZUtil::loadDemFile() ERR: DEM file <" << m_demFile << "> "
+               "does not have valid geometry.\n" << std::endl;
+      return false;
+   }
+
+   // Match the DEM's projection:
+   //m_productGeom = new ossimImageGeometry(*dem_geom);
+   dem_geom->getBoundingGroundRect(m_gndRect);
+   if (m_destinationGpt.isLatLonNan())
+   {
+      m_destinationGpt = m_gndRect.midPoint();
+   }
+   if (m_gsd == 0)
+   {
+      ossimDpt gsdPt (dem_geom->getMetersPerPixel());
+      m_gsd = 0.5 * (gsdPt.x + gsdPt.y);
+   }
+   if (m_aoiRadius == 0)
+   {
+      ossimDpt mtrsPerDeg (m_destinationGpt.metersPerDegree());
+      m_aoiRadius = 0.25 * (m_gndRect.width()*mtrsPerDeg.x + m_gndRect.height()*mtrsPerDeg.y);
+   }
+
+   return true;
+}
+
+void ossimHLZUtil::createInputChain(ossimRefPtr<ossimImageHandler>& handler,
+                                    ossimRefPtr<ossimImageSource>& chain)
+{
+   ossimRefPtr<ossimImageViewProjectionTransform> ivt = new ossimImageViewProjectionTransform;
+   ivt->setImageGeometry(handler->getImageGeometry().get());
+   ivt->setViewGeometry(m_productGeom.get());
+
+   chain = new ossimImageRenderer(handler.get(),ivt.get());
+   chain->initialize();
+}
+
+
+bool ossimHLZUtil::initProcessingChain()
+{
+   // If a DEM file was not provided as an argument, the elev sources array needs be initialized:
+   if (!m_combinedElevSource.valid())
+   {
+      // HLZ requires access to individual elevation posts for computing statistics. We use the
+      // elevation manager to identify cells that provide coverage over the AOI, then we open those
+      // cells as images with associated geometries.
+      ossimElevManager* elevMgr = ossimElevManager::instance();
+
+      // Query elevation manager for cells providing needed coverage:
+      std::vector<std::string> cells;
+      elevMgr->getCellsForBounds(m_gndRect, cells);
+
+      // Open a raster image for each elevation source being considered:
+      ossimConnectableObject::ConnectableObjectList elevChains;
+      std::vector<std::string>::iterator fname_iter = cells.begin();
+      while (fname_iter != cells.end())
+      {
+         ossimRefPtr<ossimImageHandler> dem =
+               ossimImageHandlerRegistry::instance()->open(*fname_iter);
+         if (!dem.valid())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+                    << "ossimHLZUtil::initElevSources() ERR: Cannot open DEM file at <"
+                    <<*fname_iter<<">\n"<< std::endl;
+            return false;
+         }
+
+         ossimRefPtr<ossimImageSource> chain;
+         createInputChain(dem, chain);
+         ossimRefPtr<ossimConnectableObject> connectable = chain.get();
+         elevChains.push_back(connectable);
+         ++fname_iter;
+      }
+
+      if (elevChains.size() == 1)
+         m_combinedElevSource = (ossimImageSource*) elevChains[0].get();
+      else
+         m_combinedElevSource = new ossimImageMosaic(elevChains);
+   }
+
+   if (!m_useLsFitMethod)
+   {
+      // Add the slope computation engine on the elevation source.
+      // Set up processing chain with plane to normal filter, equation combiner, and band selector.
+      ossimRefPtr<ossimSlopeFilter> slope_filter = new ossimSlopeFilter;
+      slope_filter->connectMyInputTo(m_combinedElevSource.get());
+      slope_filter->setSlopeType(ossimSlopeFilter::DEGREES);
+      m_combinedElevSource = slope_filter.get();
+      m_combinedElevSource->initialize();
+
+      if (!m_slopeFile.empty())
+         writeSlopeImage();
+   }
+
+   return true;
+}
+
+bool ossimHLZUtil::loadPcFile()
+{
+   // When a PC file is provided, certain parameters can be implied versus explicitely provided
+   // in the command-line arguments:
+   ossimRefPtr<ossimPointCloudHandler> pc_handler =
+         ossimPointCloudHandlerRegistry::instance()->open(m_pcFile);
+   if (!pc_handler.valid())
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimHLZUtil::loadPointCloudFile ERR: Cannot open point-cloud file <" << m_pcFile << "> "
+            << std::endl;
+      return false;
+   }
+
+   // Verify that PC bounding rect overlaps the output bounding rect:
+   ossimGrect pc_bbox;
+   pc_handler->getBounds(pc_bbox);
+   if (!m_gndRect.intersects(pc_bbox))
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+            << "ossimHLZUtil::loadPointCloudFile ERR: point-cloud file <" << m_pcFile << "> "
+            << "does not overlap the output ROI." << std::endl;
+      return false;
+   }
+
+   m_pcSources.push_back(pc_handler);
+   return true;
+}
+
+bool ossimHLZUtil::loadMaskFiles()
+{
+   // First check if the filename specified is an image file:
+   MaskSource mask_image (this, m_maskFile);
+   if (mask_image.valid)
+   {
+      m_maskSources.push_back(mask_image);
+      return true;
+   }
+
+   ossimKeywordlist mask_kwl (m_maskFile);
+   ossim_uint32 index = 0;
+   while (true)
+   {
+      MaskSource mask_source (this, mask_kwl, index);
+      if (mask_source.valid)
+         m_maskSources.push_back(mask_source);
+      else if (index > 0)
+         break;
+      ++index;
+   }
+
+   return true;
+}
+
+bool ossimHLZUtil::initHlzFilter()
+{
+   if ((m_hlzMinRadius == 0) || !m_combinedElevSource.valid())
+      return false;
+
+   // Determine number of posts (in one dimension) needed to cover the specified LZ radius:
+   m_demGsd = m_productGeom->getMetersPerPixel();
+   m_demFilterSize.x = (int) ceil(m_hlzMinRadius/m_demGsd.x);
+   m_demFilterSize.y = (int) ceil(m_hlzMinRadius/m_demGsd.y);
+   if ((m_demFilterSize.x < 2) || (m_demFilterSize.y < 2))
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+                  << "ossimHLZUtil::initHlzFilter() ERR: The DEM provided does not have sufficient"
+                  " resolution to determine HLZs. Aborting..." << std::endl;
+      return false;
+   }
+
+   // clip the requested output geo rect by the rect available from the dem:
+   ossimGrect demGndRect;
+   m_productGeom->getBoundingGroundRect(demGndRect);
+   if (m_gndRect.hasNans())
+      m_gndRect = demGndRect;
+   else
+      m_gndRect = m_gndRect.clipToRect(demGndRect);
+
+   // Convert (clipped) requested rect to raster coordinate space in the DEM file:
+   ossimDpt ulp, lrp;
+   m_productGeom->worldToLocal(m_gndRect.ul(), ulp);
+   m_productGeom->worldToLocal(m_gndRect.lr(), lrp);
+   m_demRect.set_ul(ulp);
+   m_demRect.set_lr(lrp);
+
+   // To help with multithreading, just load entire AOI of DEM into memory:
+   m_demBuffer = m_combinedElevSource->getTile(m_demRect);
+   if (!m_demBuffer.valid())
+      return false;
+
+   return true;
+}
+
+bool ossimHLZUtil::execute()
+{
+   if (!m_productGeom.valid() && !initialize())
+      return false;
+
+   d_accumT = 0;
+   bool success = false;
+
+   // Establish loop limits in input DEM raster coordinate space:
+   ossim_int32 min_x = m_demRect.ul().x;
+   ossim_int32 min_y = m_demRect.ul().y;
+   ossim_int32 max_x = m_demRect.lr().x - m_demFilterSize.x;
+   ossim_int32 max_y = m_demRect.lr().y - m_demFilterSize.y;
+   ossimIpt chip_origin;
+   ossim_uint32 numChips = (max_x-min_x)*(max_y-min_y);
+
+   // Determine the DEM step size as a fraction of the LZ radius:
+   const double CHIP_STEP_FACTOR = 0.25; // chip position increment as fraction of chip width
+   ossim_int32 dem_step =
+         (ossim_int32) floor(4*CHIP_STEP_FACTOR*m_hlzMinRadius/(m_demGsd.x+m_demGsd.y));
+
+   // Hack: degrading to single thread when slope-image scheme is used. Runs extremely slow in
+   // multithread mode, but much faster as single thread than multithreaded ls-fit
+   if ((m_numThreads == 1) || !m_useLsFitMethod)
+   {
+      // Not threaded (or slope-image scheme):
+      setPercentComplete(0);
+      ossim_uint32 chipId = 0;
+      for (chip_origin.y = min_y; chip_origin.y <= max_y; chip_origin.y += dem_step)
+      {
+         for (chip_origin.x = min_x; chip_origin.x <= max_x; chip_origin.x += dem_step)
+         {
+            ossimHLZUtil::ChipProcessorJob* job = 0;
+            if (m_useLsFitMethod)
+               job = new ossimHLZUtil::LsFitChipProcessorJob(this, chip_origin, chipId++);
+            else
+               job = new ossimHLZUtil::NormChipProcessorJob(this, chip_origin, chipId++);
+            job->start();
+         }
+         setPercentComplete(100*chipId/numChips);
+      }
+   }
+   else
+   {
+      if (m_numThreads == 0)
+         m_numThreads = ossim::getNumberOfThreads();
+
+      // Loop over input DEM, creating a thread job for each filter window:
+      ossimRefPtr<ossimJobQueue> jobQueue = new ossimJobQueue();
+      m_jobMtQueue = new ossimJobMultiThreadQueue(jobQueue.get(), m_numThreads);
+
+      cout << "\nPreparing " << numChips << " jobs..." << endl; // TODO: DEBUG
+      setPercentComplete(0);
+      ossim_int32 qsize = 0;
+      ossimIpt chip_origin;
+      ossim_uint32 chipId = 0;
+      for (chip_origin.y = min_y; chip_origin.y <= max_y; ++chip_origin.y)
+      {
+         for (chip_origin.x = min_x; chip_origin.x <= max_x; ++chip_origin.x)
+         {
+            //cout << "Submitting " << chipId << endl;
+            ossimHLZUtil::ChipProcessorJob* job = 0;
+            if (m_useLsFitMethod)
+               job = new ossimHLZUtil::LsFitChipProcessorJob(this, chip_origin, chipId++);
+            else
+               job = new ossimHLZUtil::NormChipProcessorJob(this, chip_origin, chipId++);
+            jobQueue->add(job, false);
+         }
+         qsize = jobQueue->size();
+         setPercentComplete(100*(chipId-qsize)/numChips);
+      }
+
+      // Wait until all chips have been processed before proceeding:
+      cout << "All jobs queued. Waiting for job threads to finish..." << endl;
+      while (m_jobMtQueue->hasJobsToProcess() || m_jobMtQueue->numberOfBusyThreads())
+      {
+         qsize = m_jobMtQueue->getJobQueue()->size();
+         setPercentComplete(100*(numChips-qsize)/numChips);
+         OpenThreads::Thread::microSleep(10000);
+      }
+   }
+
+   cout << "Finished processing chips." << endl;
+   paintReticle();
+
+   cout << "Writing output file..." << endl;
+   success = writeFile();
+
+   cout << "Returning..." << endl;
+   return success;
+}
+
+void ossimHLZUtil::paintReticle()
+{
+   // Highlight the observer position with X reticle:
+   ossimDpt center;
+   m_viewRect.getCenter(center);
+
+   if (m_reticleSize > 0)
+   {
+      m_outBuffer->setValue((int) center.x, (int) center.y, m_reticleValue);
+      for (int i = -m_reticleSize; i <= m_reticleSize; ++i)
+      {
+         m_outBuffer->setValue(i + (int) center.x,       (int) center.y, m_reticleValue);
+         m_outBuffer->setValue(    (int) center.x  , i + (int) center.y, m_reticleValue);
+      }
+   }
+
+   // Also outline the square area of interest:
+   for (ossim_int32 x = m_viewRect.ul().x; x <= m_viewRect.lr().x; ++x)
+   {
+      m_outBuffer->setValue(x, m_viewRect.ul().y, m_reticleValue);
+      m_outBuffer->setValue(x, m_viewRect.lr().y, m_reticleValue);
+   }
+   for (ossim_int32 y = m_viewRect.ul().y; y <= m_viewRect.lr().y; ++y)
+   {
+      m_outBuffer->setValue(m_viewRect.ul().x, y, m_reticleValue);
+      m_outBuffer->setValue(m_viewRect.lr().x, y, m_reticleValue);
+   }
+}
+
+bool ossimHLZUtil::writeFile()
+{
+   ossimIrect rect(0, 0, m_viewRect.width() - 1, m_viewRect.height() - 1);
+   m_outBuffer->setImageRectangle(rect);
+
+   ossimRefPtr<ossimMemoryImageSource> memSource = new ossimMemoryImageSource;
+   memSource->setImage(m_outBuffer);
+   memSource->setImageGeometry(m_productGeom.get());
+   ossimImageSource* last_source = memSource.get();
+
+   // See if an LUT is requested:
+   ossimRefPtr<ossimIndexToRgbLutFilter> lutSource = 0;
+   if (!m_lutFile.empty())
+   {
+      ossimKeywordlist lut_kwl;
+      lut_kwl.addFile(m_lutFile);
+      lutSource = new ossimIndexToRgbLutFilter;
+      if (!lutSource->loadState(lut_kwl))
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "ossimHLZUtil::writeFile() ERROR: The LUT "
+               "file <"
+               << m_lutFile
+               << "> could not be read. Ignoring remap request.\n"
+               << std::endl;
+         lutSource = 0;
+      }
+      else
+      {
+         lutSource->connectMyInputTo(last_source);
+         lutSource->initialize();
+         last_source = lutSource.get();
+      }
+   }
+
+   // Set up the writer:
+   ossimRefPtr<ossimImageFileWriter> writer = 0;
+   if (m_productFile.ext().contains("tif"))
+   {
+      ossimTiffWriter* tif_writer = new ossimTiffWriter();
+      tif_writer->setGeotiffFlag(true);
+      tif_writer->setFilename(m_productFile);
+      writer = tif_writer;
+   }
+   else
+   {
+      writer = ossimImageWriterFactoryRegistry::instance()->createWriter(m_productFile);
+   }
+   bool success = false;
+   if (writer.valid())
+   {
+      writer->connectMyInputTo(0, last_source);
+      success = writer->execute();
+   }
+
+   return success;
+}
+
+void ossimHLZUtil::writeSlopeImage()
+{
+   // Set up the writer:
+   ossimRefPtr<ossimImageFileWriter> writer = 0;
+   ossimTiffWriter* tif_writer = new ossimTiffWriter();
+   tif_writer->setGeotiffFlag(true);
+   tif_writer->setFilename(m_slopeFile);
+   writer = tif_writer;
+   writer->connectMyInputTo(0, m_combinedElevSource.get());
+   writer->setAreaOfInterest(m_viewRect);
+   if (writer->execute())
+      cout<<"Wrote slope image to <"<<m_slopeFile<<">."<<endl;
+   else
+   {
+      cout<<"ossimHLZUtil::writeSlopeImage() Error encountered writing slope image to <"
+            <<m_slopeFile<<">."<<endl;
+   }
+}
+
+void ossimHLZUtil::dumpProductSummary() const
+{
+   ossimIpt isize(m_productGeom->getImageSize());
+   cout << "\nSummary of HLZ product image:" << "\n   Output file name: " << m_productFile
+         << "\n   Image size: " << isize
+         << "\n   Slope threshold: " << m_slopeThreshold << " deg"
+         << "\n   Roughness threshold: " << m_roughnessThreshold << " m"
+         << "\n   Min LZ radius: " << m_hlzMinRadius << " m"
+         << "\n   product GSD: " << m_gsd << " m"
+         << "\n   radius-of-interest: " << (int) (m_gsd * isize.x / 2.0) << " m"
+         << "\n   Scalar type: " << m_outBuffer->getScalarTypeAsString() << endl;
+}
+
+OpenThreads::ReadWriteMutex ossimHLZUtil::ChipProcessorJob::m_bufMutex;
+
+ossimHLZUtil::ChipProcessorJob::ChipProcessorJob(ossimHLZUtil* hlzUtil, const ossimIpt& origin,
+                                   ossim_uint32 /*chip_id*/)
+: m_hlzUtil (hlzUtil),
+  m_demChipUL (origin),
+  m_status (0),
+  m_nullValue (hlzUtil->m_demBuffer->getNullPix(0))
+{
+   m_demChipLR.x = m_demChipUL.x + m_hlzUtil->m_demFilterSize.x;
+   m_demChipLR.y = m_demChipUL.y + m_hlzUtil->m_demFilterSize.y;
+}
+
+void ossimHLZUtil::ChipProcessorJob::start()
+{
+   if (level1Test() && level2Test() && maskTest())
+   {
+      // Passed all tests (though m_status may indicate obstruction), so mark this chip
+      // appropriately as marginal or good:
+      ossimIpt p;
+
+      for (p.y = m_demChipUL.y; p.y < m_demChipLR.y; ++p.y)
+      {
+         for (p.x = m_demChipUL.x; p.x < m_demChipLR.x; ++p.x)
+         {
+            OpenThreads::ScopedWriteLock lock (m_bufMutex);
+            if (m_status == 2)
+               m_hlzUtil->m_outBuffer->setValue(p.x, p.y, m_hlzUtil->m_goodLzValue);
+            else
+               m_hlzUtil->m_outBuffer->setValue(p.x, p.y, m_hlzUtil->m_marginalLzValue);
+         }
+      }
+   }
+}
+
+bool ossimHLZUtil::ChipProcessorJob::level2Test()
+{
+   // Level 2 only valid if a point cloud dataset is available:
+   if (m_hlzUtil->m_pcSources.empty())
+   {
+      ++m_status; // assumes level2 passes
+      return true;
+   }
+
+   // Need to convert DEM file coordinate bounds to geographic.
+   ossimGpt chipUlGpt, chipLrGpt;
+   m_hlzUtil->m_productGeom->localToWorld(ossimDpt(m_demChipUL), chipUlGpt);
+   m_hlzUtil->m_productGeom->localToWorld(ossimDpt(m_demChipLR), chipLrGpt);
+   chipUlGpt.hgt = ossim::nan();
+   chipLrGpt.hgt = ossim::nan();
+   ossimGrect grect (chipUlGpt, chipLrGpt);
+
+   // TODO: LIMITATION: Only a single point cloud source is considered. Need to expand to handle
+   // a list:
+   const ossimPointCloudHandler* pc_src = m_hlzUtil->m_pcSources[0].get();
+
+   // First check if there is even any coverage:
+   m_status = 0; // reset assumes no coverage
+   ossimGrect bb;
+   pc_src->getBounds(bb);
+   if (!bb.intersects(grect))
+      return false;
+
+   ossimPointBlock pc_block(0, ossimPointRecord::ReturnNumber|ossimPointRecord::NumberOfReturns);
+   pc_src->getBlock(grect, pc_block);
+   if (pc_block.empty())
+      return false;
+
+   bool found_obstruction = false;
+   m_status = 1; // bump to indicate passed level 1
+
+   // Scan the block for obstructions:
+   ossimGpt point_plh;
+   ossimDpt point_xy;
+   ossim_uint32 numPoints = pc_block.size();
+   for (ossim_uint32 i=0; (i<numPoints) && !found_obstruction; ++i)
+   {
+      //If this is not the only return, implies clutter along the ray:
+      int num_returns = (int) pc_block[i]->getField(ossimPointRecord::NumberOfReturns);
+      if (num_returns > 1)
+      {
+         found_obstruction = true;
+         break;
+      }
+   }
+
+   if (!found_obstruction)
+      m_status = 2;
+
+   return true;
+}
+
+
+bool ossimHLZUtil::ChipProcessorJob::maskTest()
+{
+   // Threat dome only valid if a point cloud dataset is available:
+   if (m_hlzUtil->m_maskSources.empty())
+      return true;
+
+   ossimIrect chipRect (m_demChipUL, m_demChipLR);
+   vector<MaskSource>::iterator mask_source = m_hlzUtil->m_maskSources.begin();
+   bool test_passed = true;
+   ossimIpt p;
+   ossim_uint8 mask_value;
+
+   while (mask_source != m_hlzUtil->m_maskSources.end())
+   {
+      ossimRefPtr<ossimImageData> mask_data = mask_source->image->getTile(chipRect);
+      for (p.y = m_demChipUL.y; (p.y < m_demChipLR.y) && test_passed; ++p.y)
+      {
+         for (p.x = m_demChipUL.x; (p.x < m_demChipLR.x) && test_passed; ++p.x)
+         {
+            mask_value = mask_data->getPix(p);
+            if (  ( mask_value &&  mask_source->exclude) ||
+                  (!mask_value && !mask_source->exclude) )
+               test_passed = false;
+         }
+      }
+      if (!test_passed)
+         break;
+
+      ++mask_source;
+   }
+
+   return test_passed;
+}
+
+
+bool ossimHLZUtil::LsFitChipProcessorJob::level1Test()
+{
+   // Start with computing best-fit plane:
+   ossimIpt p;
+   double z;
+   double y_meters;
+   for (p.y = m_demChipUL.y; p.y < m_demChipLR.y; ++p.y)
+   {
+      y_meters = p.y*m_hlzUtil->m_demGsd.y;
+      for (p.x = m_demChipUL.x; p.x < m_demChipLR.x; ++p.x)
+      {
+         z = m_hlzUtil->m_demBuffer->getPix(p, 0);
+         if ((z == m_nullValue) || ossim::isnan(z))
+            return false;
+         m_plane->addSample(p.x*m_hlzUtil->m_demGsd.x, y_meters, z);
+      }
+   }
+   if (!m_plane->solveLS())
+      return false;
+
+   // The slope is derived from the normal unit vector. Extract that from the solution and test
+   // against threshold:
+   double a, b, c;
+   m_plane->getLSParms(a, b, c);
+   double z_proj = 1.0 / sqrt(a*a + b*b + 1.0);
+   double theta = fabs(ossim::acosd(z_proj));
+   if (theta > m_hlzUtil->m_slopeThreshold)
+      return false;
+
+   // Passed the slope test. Now measure the roughness as peak deviation from the plane:
+   double distance;
+   for (p.y = m_demChipUL.y; (p.y < m_demChipLR.y); ++p.y)
+   {
+      for (p.x = m_demChipUL.x; (p.x < m_demChipLR.x); ++p.x)
+      {
+         z = m_hlzUtil->m_demBuffer->getPix(p, 0);
+         distance = fabs(z_proj * (a*p.x + b*p.y + c - z));
+         if (distance > m_hlzUtil->m_roughnessThreshold)
+            return false;
+      }
+   }
+
+   m_status = 1; // indicates passed level 1
+   return true;
+}
+
+bool ossimHLZUtil::NormChipProcessorJob::level1Test()
+{
+   // The processing chain is outputing slope values in degrees from vertical.
+   // Scan the data tile for slopes outside the threshold:
+   ossimIpt p;
+   float theta;
+   for (p.y = m_demChipUL.y; p.y < m_demChipLR.y; ++p.y)
+   {
+      for (p.x = m_demChipUL.x; p.x < m_demChipLR.x; ++p.x)
+      {
+         theta = m_hlzUtil->m_demBuffer->getPix(p, 0);
+         if ((theta == m_nullValue) || ossim::isnan(theta) || (theta > m_hlzUtil->m_slopeThreshold))
+            return false;
+      }
+   }
+
+   m_status = 1; // indicates passed level 1
+   return true;
+}
+
+void ossimHLZUtil::printApiJson(ostream& out) const
+{
+   ossimFilename json_path (ossimPreferences::instance()->findPreference("ossim_share_directory"));
+   json_path += "/ossim/util/ossimHlzApi.json";
+   if (json_path.isReadable())
+   {
+      char line[256];
+      ifstream ifs (json_path.chars());
+      ifs.getline(line, 256);
+
+       while (ifs.good())
+       {
+         out << line << endl;
+         ifs.getline(line, 256);
+       }
+
+       ifs.close();
+   }
+}
+
+ossimHLZUtil::MaskSource::MaskSource(ossimHLZUtil* hlzUtil, ossimKeywordlist& kwl,
+                                     ossim_uint32 index)
+:  exclude (true),
+   valid (false)
+{
+   ossimString prefix (MASK_PREFIX);
+   prefix += ossimString::toString(index) + ".";
+
+   ossimFilename maskFile = kwl.find(prefix.chars(), ossimKeywordNames::FILENAME_KW);
+   if (maskFile.empty())
+      return;
+
+   ossimRefPtr<ossimImageHandler> handler = ossimImageHandlerRegistry::instance()->open(maskFile);
+   if (!handler.valid())
+   {
+      ossimNotify(ossimNotifyLevel_WARN) <<
+            "ossimHLZUtil::MaskSource -- Error encountered instantiating mask image <"
+            <<maskFile<<">. Ignoring mask source." << endl;
+      return;
+   }
+
+   kwl.getBoolKeywordValue(exclude, MASK_EXCLUDE_KW, prefix.chars());
+
+   hlzUtil->createInputChain(handler, image);
+   valid = true;
+};
+
+
+
+ossimHLZUtil::MaskSource::MaskSource(ossimHLZUtil* hlzUtil, const ossimFilename& mask_image)
+:  exclude (true),
+   valid (false)
+{
+   ossimRefPtr<ossimImageHandler> handler = ossimImageHandlerRegistry::instance()->open(mask_image);
+   if (handler.valid())
+   {
+      hlzUtil->createInputChain(handler, image);
+      valid = true;
+   }
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ossim/src/ossim/util/ossimImageUtil.cpp b/ossim/src/ossim/util/ossimImageUtil.cpp
new file mode 100644
index 0000000..4b721e6
--- /dev/null
+++ b/ossim/src/ossim/util/ossimImageUtil.cpp
@@ -0,0 +1,2133 @@
+//----------------------------------------------------------------------------
+// File: ossimImageUtil.cpp
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: ossimImageUtil class definition
+//
+// Utility class for processing image recursively.  This is for doing things like:
+// building overview, histograms, compute min/max, extract vertices.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/util/ossimImageUtil.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimContainerProperty.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimDatumFactoryRegistry.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+#include <ossim/base/ossimEllipsoid.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimGeoidManager.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/base/ossimProperty.h>
+#include <ossim/base/ossimPropertyInterface.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimXmlDocument.h>
+#include <ossim/elevation/ossimElevManager.h>
+#include <ossim/imaging/ossimFilterResampler.h>
+#include <ossim/imaging/ossimHistogramWriter.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimImageHistogramSource.h>
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <ossim/imaging/ossimOverviewBuilderFactoryRegistry.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/plugin/ossimSharedPluginRegistry.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/support_data/ossimSupportFilesList.h>
+#include <ossim/util/ossimFileWalker.h>
+
+#include <cstdlib>
+#include <iomanip>
+#include <string>
+#include <vector>
+ 
+static std::string CMM_MAX_KW                  = "cmm_max"; // CMM(ComputeMinMax)
+static std::string CMM_MIN_KW                  = "cmm_min";
+static std::string CMM_NULL_KW                 = "cmm_null";
+static std::string COPY_ALL_FLAG_KW            = "copy_all_flag";
+static std::string CREATE_HISTOGRAM_KW         = "create_histogram";
+static std::string CREATE_HISTOGRAM_FAST_KW    = "create_histogram_fast";
+static std::string CREATE_HISTOGRAM_R0_KW      = "create_histogram_r0";
+static std::string CREATE_OVERVIEWS_KW         = "create_overviews";
+static std::string DUMP_FILTERED_IMAGES_KW     = "dump_filter_image";
+static std::string FALSE_KW                    = "false";
+static std::string FILE_KW                     = "file";
+static std::string INTERNAL_OVERVIEWS_FLAG_KW  = "internal_overviews_flag";
+static std::string OUTPUT_DIRECTORY_KW         = "output_directory";
+static std::string OUTPUT_FILENAMES_KW         = "output_filenames";
+static std::string OVERRIDE_FILTERED_IMAGES_KW = "override_filtered_images";
+static std::string OVERVIEW_STOP_DIM_KW        = "overview_stop_dimension";
+static std::string OVERVIEW_TYPE_KW            = "overview_type";
+static std::string READER_PROP_KW              = "reader_prop";
+static std::string REBUILD_HISTOGRAM_KW        = "rebuild_histogram";
+static std::string REBUILD_OVERVIEWS_KW        = "rebuild_overviews";
+static std::string SCAN_MIN_MAX_KW             = "scan_for_min_max";
+static std::string SCAN_MIN_MAX_NULL_KW        = "scan_for_min_max_null";
+static std::string THREADS_KW                  = "threads";
+static std::string TILE_SIZE_KW                = "tile_size";
+static std::string TRUE_KW                     = "true";
+static std::string WRITER_PROP_KW              = "writer_prop";
+ 
+// Static trace for debugging.  Use -T ossimImageUtil to turn on.
+static ossimTrace traceDebug = ossimTrace("ossimImageUtil:debug");
+ 
+ossimImageUtil::ossimImageUtil()
+   :
+   ossimReferenced(),
+   ossimFileProcessorInterface(),
+   m_kwl( new ossimKeywordlist() ),
+   m_fileWalker(0),
+   m_mutex(),
+   m_errorStatus(0),
+   m_filteredImages(0)
+{
+}
+ 
+ossimImageUtil::~ossimImageUtil()
+{
+   if ( m_fileWalker )
+   {
+      delete m_fileWalker;
+      m_fileWalker = 0;
+   }
+}
+    
+void ossimImageUtil::addOptions(ossimApplicationUsage* au)
+{
+   // Set the command line options:
+   au->addCommandLineOption("-a or --include-fullres", "Copy full res dataset to overview file as well as building reduced res sets. Option only valid with tiff overview builder. Requires -o option.");
+ 
+   au->addCommandLineOption("--ch or --create-histogram", "Computes full histogram alongside overview.");
+ 
+   au->addCommandLineOption("--chf or --create-histogram-fast", "Computes a histogram in fast mode which samples partial tiles.");
+ 
+   au->addCommandLineOption("--compression-quality", "Compression quality for TIFF JPEG takes values from 0 to 100, where 100 is best.  For J2K plugin, numerically_lossless, visually_lossless, lossy");
+ 
+   au->addCommandLineOption("--compute-min-max", "Turns on min, max scanning when reading tiles and writes a dot omd file. This option assumes the null is known.");
+ 
+   au->addCommandLineOption("--compute-min-max-null", "Turns on min, max, null scanning when reading tiles and write a dot omd file. This option tries to find a null value which is useful for float data.");
+ 
+   au->addCommandLineOption("--compression-type", "Compression type can be: deflate, jpeg, lzw, none or packbits");
+ 
+   au->addCommandLineOption("--create-histogram-r0", "Forces create-histogram code to compute a histogram using r0 instead of the starting resolution for the overview builder. Can require a separate pass of R0 layer if the base image has built in overviews.");
+ 
+   au->addCommandLineOption("-d", "<output_directory> Write overview to output directory specified.");
+ 
+   au->addCommandLineOption("--dump-filtered-image-list", "Outputs list of filtered images and extensions.");
+ 
+   au->addCommandLineOption("-h", "Display this information");
+ 
+   au->addCommandLineOption("-i or --internal-overviews", "Builds internal overviews. Requires -o option. Option only valid with tiff input image and tiff overview builder. WARNING: Modifies source image and cannot be undone!");
+ 
+   au->addCommandLineOption("--list-entries", "Lists the entries within the image");
+ 
+   au->addCommandLineOption("--max","Overrides max value for compute-min-max option.");
+ 
+   au->addCommandLineOption("--min","Overrides min value for compute-min-max option.");
+ 
+   au->addCommandLineOption("--null", "<null_value> Overrides null value for compute-min-max option.  e.g. -9999.0 for float data");
+ 
+   au->addCommandLineOption("-o", "Creates overviews. (default=ossim_tiff_box)");
+ 
+   au->addCommandLineOption("--of or --output-files", "Output image files we can open, exluding overviews.");
+
+   au->addCommandLineOption("--options","<options.kwl>  This can be all or part of the application options. Also used for custom prep, per file and post system commands. To get a template you can turn on trace to the ossimImageUtil class by adding \"-T ossimImageUtil\" to your command.");
+ 
+   au->addCommandLineOption("--ot", "<overview_type> Overview type. see list at bottom for valid types. (default=ossim_tiff_box)");
+ 
+   au->addCommandLineOption("--override-filtered-images", "Allows processing of file that is in the filtered image list.");
+ 
+   au->addCommandLineOption("-r or --rebuild-overviews", "Rebuild overviews even if they are already present.");
+ 
+   au->addCommandLineOption("--rebuild-histogram", "Rebuild histogram even if they are already present.");
+ 
+   au->addCommandLineOption("--reader-prop", "Adds a property to send to the reader. format is name=value");
+ 
+   au->addCommandLineOption("-s",  "Stop dimension for overviews.  This controls how \nmany layers will be built. If set to 64 then the builder will stop when height and width for current level are less than or equal to 64.  Note a default can be set in the ossim preferences file by setting the keyword \"overview_stop_dimension\".");
+
+   au->addCommandLineOption("--tile-size", "<size> Defines the tile size for overview builder.  Tiff option only. Must be a multiple of 16. Size will be used in both x and y directions. Note a default can be set in your ossim preferences file by setting the key \"tile_size\".");
+ 
+   au->addCommandLineOption("--threads", "<threads> The number of threads to use. (default=1) Note a default can be set in your ossim preferences file by setting the key \"ossim_threads\".");
+ 
+   au->addCommandLineOption("--writer-prop", "Adds a property to send to the writer. format is name=value");
+}
+
+void ossimImageUtil::addArguments(ossimArgumentParser& ap)
+{
+   // Set the general usage:
+   ossimApplicationUsage* au = ap.getApplicationUsage();
+   ossimString usageString = ap.getApplicationName();
+   usageString += " [options] <file-or-directory-to-walk>";
+   au->setCommandLineUsage(usageString);
+
+   addOptions(au);
+ 
+} // void ossimImageUtil::addArguments(ossimArgumentParser& ap)
+ 
+bool ossimImageUtil::initialize(ossimArgumentParser& ap)
+{
+   static const char M[] = "ossimImageUtil::initialize(ossimArgumentParser&)";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
+   }
+ 
+   bool result = true;
+ 
+   if ( (ap.argc() == 1) || ap.read("-h") || ap.read("--help") )
+   {
+      usage(ap);
+ 
+      // continue_after_init to false
+      result = false;
+   }
+   else
+   {
+      // Start with clean options keyword list.
+      m_kwl->clear();
+
+      // Used throughout below:
+      std::string ts1;
+      ossimArgumentParser::ossimParameter sp1(ts1);
+      std::string ts2;
+      ossimArgumentParser::ossimParameter sp2(ts2);
+ 
+      while ( 1 ) //  While forever loop...
+      {
+         if( ap.read("-a") || ap.read("--include-fullres") )
+         {
+            setCopyAllFlag( true );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         if( ap.read("--compression-quality", sp1) )
+         {
+            if ( ts1.size() )
+            {
+               setCompressionQuality( ts1 );
+            }
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         if( ap.read("--compression-type", sp1) )
+         {
+            if ( ts1.size() )
+            {
+               setCompressionType( ts1 );
+            }
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         if( ap.read("--ch") || ap.read("--create-histogram") )
+         {
+            setCreateHistogramFlag( true );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         if( ap.read("--chf") || ap.read("--create-histogram-fast") )
+         {
+            setCreateHistogramFastFlag( true );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         if( ap.read("--compute-min-max") )
+         {
+            setScanForMinMax( true );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         if( ap.read("--compute-min-max-null") )
+         {
+            setScanForMinMaxNull( true );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         if( ap.read("--create-histogram-r0") )
+         {
+            setCreateHistogramR0Flag( true );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         if( ap.read("-d", sp1) )
+         {
+            setOutputDirectory( ts1 );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         if( ap.read("--dump-filtered-image-list") )
+         {
+            setDumpFilteredImageListFlag( true );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         if( ap.read("-i") || ap.read("--internal-overviews") )
+         {
+            setInternalOverviewsFlag( true );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         if( ap.read("--max", sp1) )
+         {
+            addOption( CMM_MAX_KW, ts1 );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         if( ap.read("--min", sp1) )
+         {
+            addOption( CMM_MIN_KW, ts1 );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         if( ap.read("--null", sp1) )
+         {
+            addOption( CMM_NULL_KW, ts1 );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--options", sp1) )
+         {
+            ossimFilename optionsKwl = ts1;
+            if ( optionsKwl.exists() )
+            {
+               if ( m_kwl->addFile(optionsKwl) == false )
+               {
+                  std::string errMsg = "ERROR could not open options keyword list file: ";
+                  errMsg += optionsKwl.string();
+                  throw ossimException(errMsg);
+               }
+            }
+            else
+            {
+               std::string errMsg = "ERROR options keyword list file does not exists: ";
+               errMsg += optionsKwl.string();
+               throw ossimException(errMsg); 
+            }
+         }
+         
+         if( ap.read("--of") || ap.read("--output-files") )
+         {
+            setOutputFileNamesFlag( true );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         if( ap.read("-o") )
+         {
+            setCreateOverviewsFlag( true );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }        
+ 
+         if( ap.read("--ot", sp1) )
+         {
+            setOverviewType( ts1 );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         if( ap.read("--override-filtered-images") )
+         {
+            setOverrideFilteredImagesFlag( true );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         if( ap.read("-r") || ap.read("--rebuild-overviews") )
+         {
+            setRebuildOverviewsFlag( true );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         if( ap.read("--rebuild-histogram") )
+         {
+            setRebuildHistogramFlag( true );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         while(ap.read("--reader-prop", sp1))
+         {
+            if (ts1.size())
+            {
+               std::string key = READER_PROP_KW;
+               key += ossimString::toString( getNextReaderPropIndex() ).string();
+               addOption( key, ts1 );
+            }
+         }
+         if ( ap.argc() < 2 )
+         {
+            break;
+         }
+ 
+ 
+ 
+         if( ap.read("-s", sp1) )
+         {
+            setOverviewStopDimension( ts1 );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         if ( ap.read("-tile-size", sp1))
+         {
+            setTileSize( ossimString(ts1).toInt32() );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         if( ap.read("--threads", sp1) )
+         {
+            m_kwl->addPair( THREADS_KW, ts1 );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+ 
+         while(ap.read("--writer-prop", sp1))
+         {
+            if (ts1.size())
+            {
+               std::string key = WRITER_PROP_KW;
+               key += ossimString::toString( getNextWriterPropIndex() ).string();
+               addOption( key, ts1 );
+            }
+         }
+         if ( ap.argc() < 2 )
+         {
+            break;
+         }
+ 
+         // End of arg parsing.
+         ap.reportRemainingOptionsAsUnrecognized();
+         if ( ap.errors() )
+         {
+            ap.writeErrorMessages(ossimNotify(ossimNotifyLevel_NOTICE));
+            std::string errMsg = "Unknown option...";
+            throw ossimException(errMsg);
+         }
+ 
+         break; // Break from while forever.
+ 
+      } // End while (forever) loop.
+ 
+      if(ap.argc() > 1)
+      {
+         for (ossim_int32 i = 0; i < (ap.argc()-1); ++i)
+         {
+            ossimString kw = FILE_KW;
+            kw += ossimString::toString(i);
+            std::string value = ap[i+1];
+            m_kwl->addPair(kw.string(), value, true);
+         }
+      }
+      else
+      {
+         if ( getDumpFilterImagesFlag() )
+         {
+            // Caller wants to see filtered image names:
+            if ( m_filteredImages.empty() )
+            {
+               initializeDefaultFilterList();
+            }
+
+            // Dump our filtered images.
+            dumpFilteredImageList();
+
+            if ( !m_fileWalker )
+            {
+               m_fileWalker = new ossimFileWalker();
+               m_fileWalker->initializeDefaultFilterList();
+            }
+
+            // Dump the file walker's filtered extensions.
+            m_fileWalker->dumpFilteredExtensionList();
+         }
+         else
+         {
+            usage(ap);
+         }
+ 
+         // continue_after_init to false
+         result = false; 
+ 
+      }
+ 
+   } // not usage
+ 
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "m_kwl:\n" << *(m_kwl.get()) << "\n"
+         << M << " exit result = " << (result?"true":"false")
+         << "\n";
+   }
+ 
+   return result;
+}
+ 
+ossim_int32 ossimImageUtil::execute()
+{
+   static const char M[] = "ossimImageUtil::execute()";
+ 
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
+   }
+
+   // Launch any prep system commands:
+   executePrepCommands();
+
+   // Get the number of "file*" keywords.
+   ossim_uint32 fileCount = m_kwl->numberOf("file");
+ 
+   if ( fileCount )
+   {
+      if ( !m_fileWalker )
+      {
+         m_fileWalker = new ossimFileWalker();
+      }
+ 
+      if ( !getOverrideFilteredImagesFlag() )
+      {
+         if ( m_filteredImages.empty() )
+         {
+            initializeDefaultFilterList();
+         }
+         if ( m_fileWalker->getFilteredExtensions().empty() )
+         {
+            m_fileWalker->initializeDefaultFilterList();
+         }
+      }
+ 
+      m_fileWalker->setNumberOfThreads( getNumberOfThreads() );
+ 
+      // Must set this so we can stop recursion on directory based images.
+      m_fileWalker->setWaitOnDirFlag( true );
+ 
+      // This links the file walker back to our "processFile" method.
+      m_fileWalker->setFileProcessor( this );
+ 
+      // Wrap in try catch block as excptions can be thrown under the hood.
+      try
+      {
+         // Get the list of files passed to us:
+         std::vector<ossimFilename> files;
+         ossim_uint32 processedFiles = 0;;
+         ossim_uint32 i = 0;
+         while ( processedFiles < fileCount )
+         {
+            ossimString key = FILE_KW;
+            key += ossimString::toString(i);
+            std::string lookup = m_kwl->findKey( key.string() );
+            if ( lookup.size() )
+            {
+               files.push_back( ossimFilename(lookup) );
+               ++processedFiles;
+            }
+ 
+            ++i;
+            if ( i > (fileCount + 100) ) break;
+         }
+
+         // Process the files:
+         m_fileWalker->walk( files ); 
+      }
+      catch (const ossimException& e)
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "Caught exception: " << e.what() << endl;
+         setErrorStatus( ossimErrorCodes::OSSIM_ERROR );
+      }
+ 
+   } // if ( fileCount )
+
+   // Launch any post system commands:
+   executePostCommands();
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << M << " exit status: " << m_errorStatus << std::endl;
+   }
+ 
+   // Zero is good, non zero is bad.
+   return m_errorStatus; 
+}
+ 
+//---
+// This method is called back by the ossimFileWalker::walk method for each file it finds that it
+// deems can be processed.
+//---
+void ossimImageUtil::processFile(const ossimFilename& file)
+{
+   static const char M[] = "ossimImageUtil::processFile";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << M << " entered...\n" << "file: " << file << "\n";
+   }
+ 
+   bool processFileFlag = true;
+   if ( !getOverrideFilteredImagesFlag() )
+   {
+      processFileFlag = !isFiltered( file );
+   }
+ 
+   if ( processFileFlag )
+   {
+      ossimNotify(ossimNotifyLevel_NOTICE) << "Processing file: " << file << std::endl;
+ 
+      m_mutex.lock();
+      ossimRefPtr<ossimImageHandler> ih =
+         ossimImageHandlerRegistry::instance()->open(file, true, true);
+      m_mutex.unlock();
+ 
+      if ( ih.valid() && !ih->hasError() )
+      {
+         // Check for output directory:
+         if ( m_kwl->hasKey( OUTPUT_DIRECTORY_KW ) )
+         {
+            ossimFilename outputDir;
+            outputDir.string() = m_kwl->findKey( OUTPUT_DIRECTORY_KW );
+
+            if ( outputDir.exists() && outputDir.isDir() )
+            {
+               ih->setSupplementaryDirectory( outputDir );
+            }
+         }
+         
+         if ( isDirectoryBasedImage( ih.get() ) )
+         {
+            // Tell the walker not to recurse this directory.
+            m_mutex.lock();
+            m_fileWalker->setRecurseFlag(false);
+            m_mutex.unlock();
+         }
+
+         // Set any reader props:
+         ossimPropertyInterface* pi = dynamic_cast<ossimPropertyInterface*>(ih.get());
+         if ( pi ) setProps(pi);
+ 
+         bool consumedHistogramOptions  = false;
+         bool consumedCmmOptions = false;
+ 
+         if ( getOutputFileNamesFlag() )
+         {
+            // Simply output the file name of any images we can open:
+            ossimNotify(ossimNotifyLevel_NOTICE) << ih->getFilename().expand(); 
+         }
+ 
+         if ( createOverviews() )
+         {
+            // Skip shape files...
+            if ( ih->getClassName() != "ossimOgrGdalTileSource" )
+            {
+               createOverview(ih, consumedHistogramOptions, consumedCmmOptions);
+            }
+         }
+ 
+         // Build stand alone histogram.  Note the overview sequencer may have computed for us.
+         if ( hasHistogramOption() && !consumedHistogramOptions)
+         {
+            createHistogram( ih );
+         }
+ 
+         // Compute/Scan for min, max.  Note the overview sequencer may have computed for us.
+         if ( ( scanForMinMax() || scanForMinMaxNull() ) && !consumedCmmOptions )
+         {
+            computeMinMax( ih );
+         }
+
+         // Launch any file system commands.
+         executeFileCommands( file );
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << M << "\nCould not open: " << file << std::endl;
+      }
+   }
+   else // Matches: if ( processFileFlag )
+   {
+      ossimNotify(ossimNotifyLevel_NOTICE)
+         << "Filtered file, not processing: " << file << std::endl;
+   }
+ 
+   if(traceDebug())
+   {
+      // Since ossimFileWalker is threaded output the file so we know which job exited.
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << "\nfile: " << file << "\nexited...\n";
+   }
+}
+
+// Create overview for image:
+void ossimImageUtil::createOverview( ossimRefPtr<ossimImageHandler>& ih,
+                                     bool& consumedHistogramOptions,
+                                     bool& consumedCmmOptions )
+{
+   static const char M[] = "ossimImageUtil::createOverview #1";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
+   }
+ 
+   if ( ih.valid() )
+   {
+      // Get the entry list:
+      std::vector<ossim_uint32> entryList;
+      ih->getEntryList(entryList);
+ 
+      bool useEntryIndex = false;
+      if ( entryList.size() )
+      {
+         if ( (entryList.size() > 1) || (entryList[0] != 0) ) useEntryIndex = true;
+      }
+
+      // Create the overview builder:
+      ossimString overviewType;
+      getOverviewType( overviewType.string() );
+      ossimRefPtr<ossimOverviewBuilderBase> ob =
+         ossimOverviewBuilderFactoryRegistry::instance()->createBuilder(overviewType);
+      if ( ob.valid() )
+      {
+         // Set up any overview builder options that don't involve histograms.
+         ossimPropertyInterface* pi = dynamic_cast<ossimPropertyInterface*>( ob.get() );
+         if ( pi ) setProps(pi);
+ 
+         ossim_uint32 stopDimension = getOverviewStopDimension();
+         if ( stopDimension ) ob->setOverviewStopDimension(stopDimension);
+ 
+         if ( ( scanForMinMax() || scanForMinMaxNull() ) && !hasCmmOption() )
+         {
+            //---
+            // If scan is set and we don't have any min, max, null overrides let the
+            // overview builder scan for min, max.
+            //
+            // If min, max, or null option is set, scan will be performed in
+            // separate function.
+            //---
+            ob->setScanForMinMax( scanForMinMax() );
+            ob->setScanForMinMaxNull( scanForMinMaxNull() );
+            consumedCmmOptions = true;
+         }
+ 
+         for(ossim_uint32 idx = 0; idx < entryList.size(); ++idx)
+         {
+            createOverview(ih, ob, entryList[idx], useEntryIndex, consumedHistogramOptions);
+         }
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "ERROR:\nCould not create builder for:  "<< overviewType << std::endl;
+         outputOverviewWriterTypes();
+      }
+   }
+ 
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
+   }
+}
+
+// Create overview for entry:
+void ossimImageUtil::createOverview(ossimRefPtr<ossimImageHandler>& ih,
+                                    ossimRefPtr<ossimOverviewBuilderBase>& ob,
+                                    ossim_uint32 entry,
+                                    bool useEntryIndex,
+                                    bool& consumedHistogramOptions)
+{
+   static const char M[] = "ossimImageUtil::createOverview #2";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
+   }
+ 
+   if ( ih.valid() && ob.valid() )
+   {
+      if (useEntryIndex)
+      {
+         // Set entry before deriving file name.
+         ih->setCurrentEntry(entry);
+         ossimNotify(ossimNotifyLevel_NOTICE) << "entry number: "<< entry << std::endl;
+      }
+ 
+      ossimFilename outputFile =
+         ih->getFilenameWithThisExtension(ossimString(".ovr"), useEntryIndex);
+ 
+      if ( rebuildOverviews() )
+      {
+         ih->closeOverview(); 
+         if ( outputFile.exists() )
+         {
+            outputFile.remove();
+         }
+      }
+ 
+      if ( getInternalOverviewsFlag() )
+      {
+         if ( ih->getClassName() == "ossimTiffTileSource")
+         {
+            //---
+            // INTERNAL_OVERVIEWS_FLAG_KW is set to true:
+            // Tiff reader can handle internal overviews.  Set the output file to
+            // input file.  Do it after the above remove so that if there were
+            // external overviews they will get removed.
+            //---
+            outputFile = ih->getFilename();
+         }
+         else 
+         {
+            ossimNotify(ossimNotifyLevel_NOTICE)
+               << "Internal overviews not supported for reader type: "
+               <<ih->getClassName()
+               << "\nIgnoring option..."
+               << endl;
+         }
+      }
+ 
+      if ( hasRequiredOverview( ih, ob ) == false )
+      {
+         //---
+         // Set create histogram code...
+         //
+         // Notes:
+         // 1) Must put this logic after any removal of external overview file.
+         // 
+         // 2) Base file could have built in overviews, e.g. jp2 files.  So the sequensor could
+         //    start at R6 even if there is no external overview file.
+         //
+         // 3) If user want the histogram from R0 the overview builder can do as long as
+         //    ossimImageHandler::getNumberOfDecimationLevels returns 1.  If we are starting
+         //    overview building at R6 then we must do the create histogram in a separate path.
+         //---
+         ossimHistogramMode histoMode = OSSIM_HISTO_MODE_UNKNOWN;
+         if ( createHistogram() ||
+              ( createHistogramR0() && ( ih->getNumberOfDecimationLevels() == 1 ) ) )
+         {
+            histoMode = OSSIM_HISTO_MODE_NORMAL;
+         }
+         else if ( createHistogramFast() )
+         {
+            histoMode = OSSIM_HISTO_MODE_FAST;
+         }
+ 
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << "Histogram mode: " << histoMode << "\n";
+         }
+ 
+         if ( histoMode != OSSIM_HISTO_MODE_UNKNOWN )
+         {
+            consumedHistogramOptions = true;
+            ob->setHistogramMode(histoMode);
+ 
+            ossimNotify(ossimNotifyLevel_NOTICE)
+               << "Creating overviews with histogram for file: " << ih->getFilename() << std::endl;
+         }
+         else
+         {
+            if ( histoMode != OSSIM_HISTO_MODE_UNKNOWN )
+            {
+               consumedHistogramOptions = false;  
+               ossimNotify(ossimNotifyLevel_NOTICE)
+                  << "Creating overviews for file: " << ih->getFilename() << std::endl;
+            }
+         }
+ 
+         ob->setOutputFile(outputFile);
+         ob->setInputSource(ih.get());
+
+         // Create the overview for this entry in this file:
+         if ( ob->execute() == false )
+         {
+            setErrorStatus( ossimErrorCodes::OSSIM_ERROR );
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "Error returned creating overviews for file: " << ih->getFilename() << std::endl;
+         }
+      }
+      else
+      {
+         consumedHistogramOptions = false;
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << "Image has required reduced resolution data sets." << std::endl;
+      }
+   }
+ 
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
+   }
+}
+ 
+bool ossimImageUtil::hasRequiredOverview( ossimRefPtr<ossimImageHandler>& ih,
+                                          ossimRefPtr<ossimOverviewBuilderBase>& ob )
+{
+   bool result = false;
+   if ( ih.valid() && ob.valid() && ( getCopyAllFlag() == false ) )
+   {
+      if ( ih->getClassName() == "ossimCcfTileSource" )
+      {
+         // CCF reader does not use external overviews.
+         result = true;
+      }
+      else
+      {
+         // Note we always have one rset
+         ossim_uint32 required = 1;
+ 
+         ossim_uint32 startingResLevel      = ih->getNumberOfDecimationLevels();
+         ossim_uint32 overviewStopDimension = ob->getOverviewStopDimension();
+ 
+         ossim_uint32 largestImageDimension =
+            ih->getNumberOfSamples(0) >
+            ih->getNumberOfLines(0) ?
+            ih->getNumberOfSamples(0) :
+            ih->getNumberOfLines(0);
+ 
+         while(largestImageDimension > overviewStopDimension)
+         {
+            largestImageDimension /= 2;
+            ++required;
+         }
+ 
+         if ( startingResLevel >= required )
+         {
+            result = true;
+         }
+      }
+   }
+   return result;
+}
+ 
+void ossimImageUtil::createHistogram(ossimRefPtr<ossimImageHandler>& ih)
+{
+   static const char M[] = "ossimImageUtil::createHistogram #1";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
+   }
+ 
+   if ( ih.valid() )
+   {
+      // Get the entry list:
+      std::vector<ossim_uint32> entryList;
+      ih->getEntryList(entryList);
+ 
+      bool useEntryIndex = false;
+      if ( entryList.size() )
+      {
+         if ( (entryList.size() > 1) || (entryList[0] != 0) ) useEntryIndex = true;
+      }
+ 
+      for(ossim_uint32 idx = 0; idx < entryList.size(); ++idx)
+      {
+         createHistogram(ih, entryList[idx], useEntryIndex);
+      }
+   }
+ 
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
+   }
+}
+
+// Create histogram for entry:
+void ossimImageUtil::createHistogram(ossimRefPtr<ossimImageHandler>& ih,
+                                     ossim_uint32 entry,
+                                     bool useEntryIndex)
+{
+   static const char M[] = "ossimImageUtil::createHistogram #2";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
+   }
+ 
+   if ( ih.valid() )
+   {
+      if (useEntryIndex)
+      {
+         // Set entry before deriving file name.
+         ih->setCurrentEntry(entry);
+         ossimNotify(ossimNotifyLevel_NOTICE) << "entry number: "<< entry << std::endl;
+      }
+ 
+      ossimFilename outputFile =
+         ih->getFilenameWithThisExtension(ossimString(".his"), useEntryIndex);
+
+      // Only build if needed:
+      if ( (outputFile.exists() == false) || rebuildHistogram() )
+      {
+         ossimNotify(ossimNotifyLevel_NOTICE)
+            << "Computing histogram for file: " << ih->getFilename() << std::endl;
+ 
+         // Check handler to see if it's filtering bands.
+         std::vector<ossim_uint32> originalBandList(0);
+         if ( ih->isBandSelector() )
+         { 
+            // Capture for finalize method.
+            ih->getOutputBandList( originalBandList );
+ 
+            // Set output list to input.
+            ih->setOutputToInputBandList();
+         }
+ 
+         ossimRefPtr<ossimImageHistogramSource> histoSource = new ossimImageHistogramSource;
+         ossimRefPtr<ossimHistogramWriter> writer = new ossimHistogramWriter;
+ 
+         histoSource->setMaxNumberOfRLevels(1); // Currently hard coded...
+ 
+#if 0 /* TODO tmp drb */
+         if( !ossim::isnan(histoMin) )
+         {
+            histoSource->setMinValueOverride(histoMin);
+         }
+ 
+         if( !ossim::isnan(histoMax) )
+         {
+            histoSource->setMaxValueOverride(histoMax);
+         }
+ 
+         if(histoBins > 0)
+         {
+            histoSource->setNumberOfBinsOverride(histoBins);
+         }
+#endif
+ 
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "Histogram mode: " << getHistogramMode() << "\n";
+         }
+ 
+         // Connect histogram source to image handler.
+         histoSource->setComputationMode( getHistogramMode() );
+         histoSource->connectMyInputTo(0, ih.get() );
+         histoSource->enableSource();
+ 
+         // Connect writer to histogram source.
+         writer->connectMyInputTo(0, histoSource.get());
+         writer->setFilename(outputFile);
+         theStdOutProgress.setFlushStreamFlag(true);
+         writer->addListener(&theStdOutProgress);
+ 
+         // Compute...
+         writer->execute();
+ 
+         writer=0;
+ 
+         // Reset the band list.
+         if ( ih->isBandSelector() && originalBandList.size() )
+         {
+            ih->setOutputBandList( originalBandList );
+         }
+ 
+      } // Matches: if ( (outputFile.exists() == false) || rebuildHistogram() )
+ 
+   } // Matches: if ( ih.valid() )
+ 
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
+   }
+ 
+} // End: ossimImageUtil::createHistogram #2
+ 
+void ossimImageUtil::computeMinMax(ossimRefPtr<ossimImageHandler>& ih)
+{
+   static const char M[] = "ossimImageUtil::computeMinMax #1";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
+   }
+ 
+   if ( ih.valid() )
+   {
+      // Get the entry list:
+      std::vector<ossim_uint32> entryList;
+      ih->getEntryList(entryList);
+ 
+      bool useEntryIndex = false;
+      if ( entryList.size() )
+      {
+         if ( (entryList.size() > 1) || (entryList[0] != 0) ) useEntryIndex = true;
+      }
+ 
+      for(ossim_uint32 idx = 0; idx < entryList.size(); ++idx)
+      {
+         computeMinMax(ih, entryList[idx], useEntryIndex);
+      }
+   }
+ 
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
+   }
+ 
+} // End: ossimImageUtil::computeMinMax( ih )
+ 
+void ossimImageUtil::computeMinMax( ossimRefPtr<ossimImageHandler>& ih,
+                                    ossim_uint32 entry,
+                                    bool useEntryIndex )
+{
+   static const char M[] = "ossimImageUtil::computeMinMax #2";
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
+   }
+ 
+   if ( ih.valid() )
+   {
+      // Get any min, max, null overrides;
+      double maxValue  = ossim::nan();
+      double minValue  = ossim::nan();
+      double nullValue = ossim::nan();
+
+      ossimString value = m_kwl->findKey( CMM_MAX_KW );
+      if ( value.size() )
+      {
+         maxValue = value.toDouble();
+      }
+
+      value = m_kwl->findKey( CMM_MIN_KW );
+      if ( value.size() )
+      {
+         minValue = value.toDouble();
+      }
+
+      bool hasNull = false;
+      value = m_kwl->findKey( CMM_NULL_KW );
+      if ( value.size() )
+      {
+         nullValue = value.toDouble();
+         if ( !ossim::isnan(nullValue) )
+         {
+            hasNull = true;
+         }
+      }
+ 
+      // Select the entry.
+      ih->setCurrentEntry( entry );
+ 
+      // Build the .omd file name.
+      ossimFilename omd_file = ih->getFilename();;
+
+      // Check for output directory:
+      if ( m_kwl->hasKey( OUTPUT_DIRECTORY_KW ) )
+      {
+         ossimFilename outputDir;
+         outputDir.string() = m_kwl->findKey( OUTPUT_DIRECTORY_KW );
+         
+         if ( outputDir.exists() && outputDir.isDir() )
+         {
+            omd_file = outputDir.dirCat( omd_file.file() );
+         }
+      }
+ 
+      if ( useEntryIndex )
+      {
+         ossim_uint32 currentEntry = ih->getCurrentEntry();
+         omd_file.setExtension("");
+         omd_file += "_e";
+         omd_file += ossimString::toString(currentEntry);
+ 
+         //---
+         // Note:  Set extension was not used here deliberately to avoid
+         // messing
+         // up a MODIS file in hdf format with multiple '.'s in the file
+         // name.
+         //---
+         omd_file += ".omd";
+      }
+      else
+      {
+         omd_file.setExtension("omd");
+      }
+ 
+      ossimRefPtr<ossimImageSourceSequencer> is = new ossimImageSourceSequencer(ih.get());
+ 
+      //---
+      // Note: getImageTileWidth/Height will return zero if the image is not
+      // intenally tiles.
+      //---
+      ossimIpt tileWidthHeight(ih->getImageTileWidth(), ih->getImageTileHeight());
+ 
+      if (!tileWidthHeight.x)
+      {
+         //---
+         // Make the sequencer read entire strips from the image handler
+         // at a time.  This will speed up access time for strip images
+         //---
+         tileWidthHeight.x = ih->getBoundingRect().width();
+      }
+      if(!tileWidthHeight.y)
+      {
+         tileWidthHeight.y = ih->getTileHeight();
+      }
+ 
+      if ( traceDebug() )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "Sequencer tile size: " << tileWidthHeight << endl;
+      }
+ 
+      is->setTileSize(tileWidthHeight);
+ 
+      //---
+      // Make arrays of doubles to hold the min/max values.
+      // Initialize mins to default maxes and maxes to default mins to be
+      // safe.
+      //---
+      ossim_uint32 i; // for numerous iterations...
+ 
+      const ossimScalarType ST = ih->getOutputScalarType();
+ 
+      const double DEFAULT_MIN = ossim::defaultMin(ST);
+      const double DEFAULT_MAX = ossim::defaultMax(ST);
+ 
+      const ossim_uint32 BANDS = ih->getNumberOfInputBands();
+ 
+      vector<double> tmin(BANDS);
+      vector<double> tmax(BANDS);
+      vector<double> tnull(BANDS);
+      for (i = 0; i < BANDS; ++i)
+      {
+         tmin[i] = DEFAULT_MAX;
+         tmax[i] = DEFAULT_MIN;
+ 
+         if ( hasNull )
+         {
+            // User passed in with --null option so set here.
+            tnull[i] = nullValue;
+         }
+         else
+         {
+            tnull[i] = ih->getNullPixelValue(i);
+         }
+      }
+ 
+      // Scan the image and compute the min and max.
+      const double TOTAL_TILES = is->getNumberOfTiles();
+      double tile_count = 0.0;
+      ossimNotify(ossimNotifyLevel_INFO)
+         << setiosflags(ios::fixed) << setprecision(0);
+ 
+      if( (ossim::isnan(minValue) ) || (ossim::isnan(maxValue) ) )
+      {
+         ossimRefPtr<ossimImageData> id = is->getNextTile();
+         while(id.valid())
+         {
+            if ( hasNull )
+            {
+               // Pass null to image data object so it doesn't get picked up as "min".
+               id->setNullPix( nullValue );
+            }
+            id->computeMinMaxPix(tmin, tmax);
+            id = is->getNextTile();
+            ++tile_count;
+            ossimNotify(ossimNotifyLevel_INFO)
+               << "\r"  << setw(3)
+               << (tile_count / TOTAL_TILES * 100.0) << "%"
+               << flush;
+         }
+      }
+      
+      if(!ossim::isnan(minValue))
+      {
+         std::fill(tmin.begin(), tmin.end(), minValue);
+      }
+      if(!ossim::isnan(maxValue))
+      {
+         std::fill(tmax.begin(), tmax.end(), maxValue);
+      }
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "\r100%\nFinished..." << endl;
+ 
+      ossimKeywordlist okwl(omd_file);
+ 
+      for(i = 0; i < BANDS; ++i)
+      {
+         //---
+         // Check to see if values got assigned.  If not flip to default and
+         // issue a warning.
+         //---
+         if (tmin[i] == DEFAULT_MAX)
+         {
+            tmin[i] = DEFAULT_MIN;
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "cmm scan for min failed! Using default min."
+               << std::endl;
+         }
+         if (tmax[i] == DEFAULT_MIN)
+         {
+            tmax[i] = DEFAULT_MAX;
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "cmm scan for max failed! Using default max."
+               << std::endl;
+         }
+            
+         ossimString band =
+            ossimString("band")+ossimString::toString(i+1)+".";
+
+         if (tmin[i] == DEFAULT_MAX)
+         {
+            tmin[i] = DEFAULT_MIN;
+         }
+         // if (tmax[i] == DEFAULT_MIN){}
+            
+         okwl.add(band + "min_value", tmin[i], true);
+         okwl.add(band + "max_value", tmax[i], true);
+         okwl.add(band + "null_value", tnull[i], true); 
+         
+         if( traceDebug() )
+         {
+            ossimNotify(ossimNotifyLevel_INFO)
+               << setiosflags(ios::fixed) << setprecision(16)
+               << "band" << ossimString::toString(i+1) << ".min_value: "
+               << tmin[i]
+               << "\nband" << ossimString::toString(i+1) << ".max_value: "
+               << tmax[i]
+               << "\nband" << ossimString::toString(i+1) << ".null_value: "
+               << tnull[i] << endl;
+         }
+         
+      } // End of band loop.
+      
+      // Add missing info (number of bands, scalar type) to the .omd file
+      okwl.add("bytes_per_pixel", ossim::scalarSizeInBytes(ST), true);
+      okwl.add("number_bands", BANDS, true);
+      okwl.add("scalar_type", (ossimScalarTypeLut::instance()->getEntryString(ST)), true);
+
+      // Write the file to disk:
+      okwl.write(omd_file);
+      ossimNotify(ossimNotifyLevel_INFO)
+         << "wrote file:  " << omd_file << endl;
+         
+   } // Matches: if ( ih.valid() )
+   
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
+   }
+   
+} // End: ossimImageUtil::computeMinMax( ih, entry, ... )
+
+void ossimImageUtil::usage(ossimArgumentParser& ap)
+{
+   // Add global usage options.
+   ossimInit::instance()->addOptions(ap);
+   
+   // Set app name.
+   ap.getApplicationUsage()->setApplicationName(ap.getApplicationName());
+
+   // Add options.
+   addArguments(ap);
+   
+   // Write usage.
+   ap.getApplicationUsage()->write(ossimNotify(ossimNotifyLevel_INFO));
+
+   outputOverviewWriterTypes();
+   
+   ossimNotify(ossimNotifyLevel_INFO)
+      << "\nExample commands:\n"
+
+      << "\n// A single image standard tiff overviews, histogram:\n"
+      << "ossim-preproc -o --ch <file>\n"
+
+      << "\n// A single image with j2k overviews(requires kakadu plugin), histogram:\n"
+      << "ossim-preproc --ot ossim_kakadu_nitf_j2k --ch <file>\n"
+      << "\n// j2k, histogram, 4 threads\n"
+
+      << "\n// standard tiff overviews, full histogram, 4 threads:\n"
+      << "ossim-preproc -r -o --ch --threads 4 <directory_to_walk>\n"
+
+      << "\n// j2k, histogram (fast mode), 4 threads\n"
+      << "ossim-preproc -r --ot ossim_kakadu_nitf_j2k --chf --threads 4 "
+      << "<directory_to_walk>\n"
+
+      << "\n// tiff, jpeg compression, histogram, 4 threads\n"
+      << "ossim-preproc -r --ch --compression-quality 75 --compression-type "
+      << "jpeg --threads 4 <directory_to_walk>\n"
+      << "ossim-preproc -r --ch --compression-quality 75 --compression-type "
+      << "jpeg --threads 4 <directory_to_walk>\n"
+
+      << "\n// Process all the tiffs in a directory feeding \"prep\", \"file\", \"post\" system commands via the --options option which includes indexing file into the omar database via omar-data-mgr app:\n"
+      << "ossim-preproc --options preproc-options.kwl -r -o --ch *.tif\n"
+      << "\n// Contents of preproc-options.kwl used in above command:\n"
+      << "prep.command0: echo start_time: %{date}\n"
+      << "prep.command0.strf_time_format: %Y%m%d%H%M%S\n"
+      << "prep.command1: mkdir -p %{date}\n"
+      << "file.command0: mv %{file_no_ext}.* %{date}/.\n"
+      << "file.command1: omar-data-mgr -u http://localhost:8080/omar add %{date}/%{basename}\n"
+      << "post.command0: echo end_time: %{date}\n"
+      << "post.command0.strf_time_format: %Y%m%d%H%M%S\n"
+      
+      << "\nNOTES:\n"
+      << "\n  --ch  equals --create-histogram"
+      << "\n  --chf equals --create-histogram-fast"
+
+      << "\n\nExpanded command option variables:\n\n"
+      << "%{basename}        = filename without path\n"
+      << "%{basename_no_ext} = filename without path and without extention\n"
+      << "%{date}            = Expanded to current zulu time. Default format=yyyymmdd\n"
+      << "                     output format controlled by command0.strf_time_format key.\n"
+      << "%{dirname}         = path of filename\n"
+      << "%{file}            = filename being processed\n"
+      << "%{file_no_ext}     = filename with no extension\n"
+
+      << std::endl;
+}
+
+// Private method:
+void ossimImageUtil::outputOverviewWriterTypes() const
+{
+   ossimNotify(ossimNotifyLevel_NOTICE)
+      << "\nValid overview types: " << std::endl;
+   
+   std::vector<ossimString> outputType;
+   
+   ossimOverviewBuilderFactoryRegistry::instance()->getTypeNameList(outputType);
+   std::copy(outputType.begin(),
+             outputType.end(),
+             std::ostream_iterator<ossimString>(ossimNotify(ossimNotifyLevel_NOTICE), "\t\n"));
+}
+
+// Private method:
+bool ossimImageUtil::isDirectoryBasedImage(const ossimImageHandler* ih) const
+{
+   bool result = false;
+   if ( ih )
+   {
+      // Get the image handler name.
+      ossimString imageHandlerName = ih->getClassName();
+      if ( (imageHandlerName == "ossimAdrgTileSource") ||
+           (imageHandlerName == "ossimCibCadrgTileSource") )  
+      {
+         result = true;
+      }
+   }
+   return result;
+}
+
+void ossimImageUtil::setCreateOverviewsFlag( bool flag )
+{
+   addOption( CREATE_OVERVIEWS_KW, ( flag ? TRUE_KW : FALSE_KW ) );
+}
+
+bool ossimImageUtil::createOverviews() const
+{
+   return  keyIsTrue( CREATE_OVERVIEWS_KW );
+}
+
+void ossimImageUtil::setRebuildOverviewsFlag( bool flag )
+{
+   addOption( REBUILD_OVERVIEWS_KW, ( flag ? TRUE_KW : FALSE_KW ) );
+   if ( flag )
+   {
+      setCreateOverviewsFlag( true ); // Turn on overview building.
+   }
+}
+
+bool ossimImageUtil::rebuildOverviews() const
+{
+   return keyIsTrue( REBUILD_OVERVIEWS_KW );
+}
+
+void ossimImageUtil::setRebuildHistogramFlag( bool flag )
+{
+   addOption( REBUILD_HISTOGRAM_KW, ( flag ? TRUE_KW : FALSE_KW ) );
+   if ( flag )
+   {
+      setCreateHistogramFlag( true ); // Turn on histogram building.
+   }
+}
+
+bool ossimImageUtil::rebuildHistogram() const
+{
+   return keyIsTrue( REBUILD_HISTOGRAM_KW );
+}
+
+void ossimImageUtil::setScanForMinMax( bool flag )
+{
+   addOption( SCAN_MIN_MAX_KW, ( flag ? TRUE_KW : FALSE_KW ) ); 
+}
+
+bool ossimImageUtil::scanForMinMax() const
+{
+   return keyIsTrue( SCAN_MIN_MAX_KW );
+}
+
+void ossimImageUtil::setScanForMinMaxNull( bool flag )
+{
+   addOption( SCAN_MIN_MAX_NULL_KW, ( flag ? TRUE_KW : FALSE_KW ) ); 
+}
+
+bool ossimImageUtil::scanForMinMaxNull() const
+{
+   return keyIsTrue( SCAN_MIN_MAX_NULL_KW );
+}
+
+void ossimImageUtil::setCompressionQuality( const std::string& quality )
+{
+   if ( quality.size() )
+   {
+      std::string key = WRITER_PROP_KW;
+      key += ossimString::toString( getNextWriterPropIndex() ).string();
+      std::string value = ossimKeywordNames::COMPRESSION_QUALITY_KW;
+      value += "=";
+      value += quality;
+      addOption( key, value );
+   }
+}
+
+void ossimImageUtil::setCompressionType(const std::string& type)
+{
+   if ( type.size() )
+   {
+      std::string key = WRITER_PROP_KW;
+      key += ossimString::toString( getNextWriterPropIndex() ).string();
+      std::string value = ossimKeywordNames::COMPRESSION_TYPE_KW;
+      value += "=";
+      value += type;
+      addOption( key, value );
+   }   
+}
+
+void ossimImageUtil::setCopyAllFlag( bool flag )
+{
+   // Add this for hasRequiredOverview method.
+   std::string key   = COPY_ALL_FLAG_KW;
+   std::string value = ( flag ? TRUE_KW : FALSE_KW );
+   addOption( key, value );
+
+   // Add as a writer prop:
+   key = WRITER_PROP_KW;
+   key += ossimString::toString( getNextWriterPropIndex() ).string();
+   value = COPY_ALL_FLAG_KW;
+   value += "=";
+   value += ( flag ? TRUE_KW : FALSE_KW );
+   addOption( key, value );
+}
+
+bool ossimImageUtil::getCopyAllFlag() const
+{
+   return keyIsTrue( COPY_ALL_FLAG_KW );
+}
+
+void ossimImageUtil::setDumpFilteredImageListFlag( bool flag )
+{
+   std::string key   = DUMP_FILTERED_IMAGES_KW;
+   std::string value = ( flag ? TRUE_KW : FALSE_KW );
+   addOption( key, value );
+}
+
+bool ossimImageUtil::getDumpFilterImagesFlag() const
+{
+   return keyIsTrue( DUMP_FILTERED_IMAGES_KW );
+}
+
+void ossimImageUtil::setInternalOverviewsFlag( bool flag )
+{
+   // Add this for hasRequiredOverview method.
+   std::string key   = INTERNAL_OVERVIEWS_FLAG_KW;
+   std::string value = ( flag ? TRUE_KW : FALSE_KW );
+   addOption( key, value );
+
+   // Add as a writer prop:
+   key = WRITER_PROP_KW;
+   key += ossimString::toString( getNextWriterPropIndex() ).string();
+   value = INTERNAL_OVERVIEWS_FLAG_KW;
+   value += "=";
+   value += ( flag ? TRUE_KW : FALSE_KW );
+   addOption( key, value );
+}
+
+bool ossimImageUtil::getInternalOverviewsFlag() const
+{
+   return keyIsTrue( INTERNAL_OVERVIEWS_FLAG_KW );
+}
+
+void ossimImageUtil::setOutputFileNamesFlag( bool flag )
+{
+   std::string key   = OUTPUT_FILENAMES_KW;
+   std::string value = ( flag ? TRUE_KW : FALSE_KW );
+   addOption( key, value );
+}
+
+bool ossimImageUtil::getOutputFileNamesFlag() const
+{
+   return keyIsTrue( OUTPUT_FILENAMES_KW );
+}
+
+void ossimImageUtil::setOverrideFilteredImagesFlag( bool flag )
+{
+   std::string key   = OVERRIDE_FILTERED_IMAGES_KW;
+   std::string value = ( flag ? TRUE_KW : FALSE_KW );
+   addOption( key, value );
+}
+
+bool ossimImageUtil::getOverrideFilteredImagesFlag() const
+{
+   return keyIsTrue( OVERRIDE_FILTERED_IMAGES_KW );
+}
+
+void ossimImageUtil::setOutputDirectory( const std::string& directory )
+{
+   std::string key = OUTPUT_DIRECTORY_KW;
+   addOption( key, directory );
+}
+   
+void ossimImageUtil::setOverviewType( const std::string& type )
+{
+   std::string key = OVERVIEW_TYPE_KW;
+   addOption( key, type );
+   setCreateOverviewsFlag( true ); // Assume caller wants overviews.
+}
+
+void ossimImageUtil::getOverviewType(std::string& type) const
+{
+   std::string lookup = m_kwl->findKey(OVERVIEW_TYPE_KW);
+   if ( lookup.size() )
+   {
+      type = lookup;
+   }
+   else
+   {
+      type = "ossim_tiff_box"; // default
+   }
+}
+
+void ossimImageUtil::setProps(ossimPropertyInterface* pi) const
+{
+   if ( pi )
+   {
+      ossimString baseKey;
+      if ( dynamic_cast<ossimImageHandler*>(pi) )
+      {
+         baseKey = READER_PROP_KW;
+      }
+      else
+      {
+         baseKey = WRITER_PROP_KW;
+      }
+      
+      ossim_uint32 propCount = m_kwl->numberOf( baseKey.c_str() );
+      if ( propCount )
+      {
+         ossim_uint32 foundProps = 0;
+         ossim_uint32 index = 0;
+         
+         // (propCount+100) is to allow for holes like reader_prop0, reader_prop2...
+         while ( (foundProps < propCount) && (index < (propCount+100) ) ) 
+         {
+            ossimString key = baseKey;
+            key += ossimString::toString(index);
+            std::string lookup = m_kwl->findKey( key.string() );
+            if ( lookup.size() )
+            {
+               ossimString value = lookup;
+               std::vector<ossimString> v = value.split("=");
+               if (v.size() == 2)
+               {
+                  ossimString propertyName  = v[0];
+                  ossimString propertyValue = v[1];
+                  ossimRefPtr<ossimProperty> p =
+                     new ossimStringProperty(propertyName, propertyValue);
+                  pi->setProperty( p );
+               }
+               ++foundProps;
+            }
+            ++index;
+         }
+      }
+   }
+}
+
+void ossimImageUtil::setOverviewStopDimension( ossim_uint32 dimension )
+{
+   addOption( OVERVIEW_STOP_DIM_KW, dimension );
+}
+
+void ossimImageUtil::setOverviewStopDimension( const std::string& dimension )
+{
+   addOption( OVERVIEW_STOP_DIM_KW, dimension );
+}
+
+void ossimImageUtil::setTileSize( ossim_uint32 tileSize )
+{
+   if ((tileSize % 16) == 0)
+   {
+      addOption( TILE_SIZE_KW, tileSize );
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_NOTICE)
+         << "ossimImageUtil::setTileSize NOTICE:"
+         << "\nTile width must be a multiple of 16!"
+         << std::endl;
+   }
+}
+
+
+ossim_uint32 ossimImageUtil::getOverviewStopDimension() const
+{
+   ossim_uint32 result = 0;
+   std::string lookup = m_kwl->findKey( OVERVIEW_STOP_DIM_KW );
+   if ( lookup.size() )
+   {
+      result = ossimString(lookup).toUInt32();
+   }
+   return result;
+}
+
+void ossimImageUtil::setCreateHistogramFlag( bool flag )
+{
+   addOption( CREATE_HISTOGRAM_KW, ( flag ? TRUE_KW : FALSE_KW ) );
+}
+
+bool ossimImageUtil::createHistogram() const
+{
+   return keyIsTrue( CREATE_HISTOGRAM_KW );
+}
+
+void ossimImageUtil::setCreateHistogramFastFlag( bool flag )
+{
+   addOption( CREATE_HISTOGRAM_FAST_KW, ( flag ? TRUE_KW : FALSE_KW ) );
+}
+
+bool ossimImageUtil::createHistogramFast() const
+{
+   return keyIsTrue( CREATE_HISTOGRAM_FAST_KW );
+}
+
+void ossimImageUtil::setCreateHistogramR0Flag( bool flag )
+{
+   addOption( CREATE_HISTOGRAM_R0_KW, ( flag ? TRUE_KW : FALSE_KW ) );
+}
+
+bool ossimImageUtil::createHistogramR0() const
+{
+   return keyIsTrue( CREATE_HISTOGRAM_R0_KW );
+}
+
+bool ossimImageUtil::hasHistogramOption() const
+{
+   return ( createHistogram() || createHistogramFast() || createHistogramR0() );
+}
+
+bool ossimImageUtil::hasCmmOption() const
+{
+   return ( keyIsTrue( CMM_MAX_KW ) || keyIsTrue( CMM_MIN_KW )|| keyIsTrue( CMM_NULL_KW ) );
+}
+
+ossimHistogramMode ossimImageUtil::getHistogramMode() const
+{
+   ossimHistogramMode result = OSSIM_HISTO_MODE_UNKNOWN;
+   if ( createHistogram() || createHistogramR0() )
+   {
+      result = OSSIM_HISTO_MODE_NORMAL;
+   }
+   else if ( createHistogramFast() )
+   {
+      result = OSSIM_HISTO_MODE_FAST;
+   }
+   return result;
+}
+
+void ossimImageUtil::setNumberOfThreads( ossim_uint32 threads )
+{
+   addOption( THREADS_KW, threads );
+}
+
+void ossimImageUtil::setNumberOfThreads( const std::string& threads )
+{
+   addOption( THREADS_KW, threads );
+}
+
+ossim_uint32 ossimImageUtil::getNumberOfThreads() const
+{
+   ossim_uint32 result;
+   std::string lookup = m_kwl->findKey( THREADS_KW );
+   if ( lookup.size() )
+   {
+      result = ossimString(lookup).toUInt32();
+   }
+   else
+   {
+      result = ossim::getNumberOfThreads();
+   }
+   return result;
+}
+
+ossim_uint32 ossimImageUtil::getNextWriterPropIndex() const
+{
+   ossim_uint32 result = m_kwl->numberOf( WRITER_PROP_KW.c_str() );
+   if ( result )
+   {
+      ossim_uint32 foundProps = 0;
+      ossim_uint32 index = 0;
+
+      //---
+      // Loop until we find the last index used for WRITER_PROP_KW.
+      // (result+100) is to allow for holes like writer_prop0, writer_prop2...
+      //---
+      while ( (foundProps < result) && (index < (result+100) ) ) 
+      {
+         ossimString key = WRITER_PROP_KW;
+         key += ossimString::toString(index);
+         std::string lookup = m_kwl->findKey( key.string() );
+         if ( lookup.size() )
+         {
+            ++foundProps;
+         }
+         ++index;
+      }
+      result = index;
+   }
+   return result;
+}
+
+ossim_uint32 ossimImageUtil::getNextReaderPropIndex() const
+{
+   ossim_uint32 result = m_kwl->numberOf( READER_PROP_KW.c_str() );
+   if ( result )
+   {
+      ossim_uint32 foundProps = 0;
+      ossim_uint32 index = 0;
+      
+      //---
+      // Loop until we find the last index used for WRITER_PROP_KW.
+      // (result+100) is to allow for holes like reader_prop0, reader_prop2...
+      //---
+      while ( (foundProps < result) && (index < (result+100) ) ) 
+      {
+         ossimString key = READER_PROP_KW;
+         key += ossimString::toString(index);
+         std::string lookup = m_kwl->findKey( key.string() );
+         if ( lookup.size() )
+         {
+            ++foundProps;
+         }
+         ++index;
+      }
+      result = index;
+   }
+   return result;
+}
+
+void ossimImageUtil::addOption( const std::string& key, ossim_uint32 value )
+{
+   addOption( key, ossimString::toString( value ).string() );
+}
+
+void ossimImageUtil::addOption(  const std::string& key, const std::string& value )
+{
+   m_mutex.lock();
+   if ( m_kwl.valid() )
+   {
+      if ( key.size() && value.size() )
+      {
+         m_kwl->addPair( key, value );
+      }
+   }
+   m_mutex.unlock();
+}
+
+void ossimImageUtil::setErrorStatus( ossim_int32 status )
+{
+   m_mutex.lock();
+   m_errorStatus = status;
+   m_mutex.unlock();
+}
+
+bool ossimImageUtil::isFiltered(const ossimFilename& file) const
+{
+   bool result = false;
+   if ( file.size() )
+   {
+      // Strip full path to base name.
+      std::string baseName = file.file().string();
+      if ( baseName.size() )
+      {
+         std::vector<std::string>::const_iterator i = m_filteredImages.begin();
+         while ( i != m_filteredImages.end() )
+         {
+            if ( baseName == (*i) )
+            {
+               result = true;
+               break;
+            }
+            ++i;
+         }
+      }
+   }
+#if 0 /* Please leave for debug. (drb) */
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "ossimFileWalker::isFiltered file " << (result?"filtered: ":"not filtered: ")
+         << file << "\n";
+   }
+#endif
+   
+   return result;
+}
+
+bool ossimImageUtil::keyIsTrue( const std::string& key ) const
+{
+   bool result = false;
+   if ( m_kwl.valid() )
+   {
+      std::string value = m_kwl->findKey( key );
+      if ( value.size() )
+      {
+         result = ossimString(value).toBool();
+      }
+   }
+   return result;
+}
+
+const std::vector<std::string>& ossimImageUtil::getFilteredImages() const
+{
+   return m_filteredImages;
+}
+
+std::vector<std::string>& ossimImageUtil::getFilteredImages()
+{
+   return m_filteredImages;
+}
+
+void ossimImageUtil::initializeDefaultFilterList()
+{
+   m_mutex.lock();
+
+   // Common images to filter out, put most common first.
+   m_filteredImages.push_back(std::string("icon.jpg"));
+   m_filteredImages.push_back(std::string("logo.jpg"));
+   m_filteredImages.push_back(std::string("preview.jpg"));
+   
+   m_mutex.unlock();
+}
+
+void ossimImageUtil::dumpFilteredImageList() const
+{
+   ossimNotify(ossimNotifyLevel_NOTICE) << "Filtered image list:\n";
+   std::vector<std::string>::const_iterator i = m_filteredImages.begin();
+   while ( i != m_filteredImages.end() )
+   {
+      ossimNotify(ossimNotifyLevel_NOTICE) << (*i) << "\n";
+      ++i;
+   }
+   ossimNotify(ossimNotifyLevel_NOTICE) << std::endl;
+}
+
+void ossimImageUtil::executePrepCommands() const
+{
+   std::string prefix = "prep.";
+   ossimFilename file = "";
+   executeCommands( prefix, file );
+}
+
+void ossimImageUtil::executeFileCommands( const ossimFilename& file ) const
+{
+   std::string prefix = "file.";
+   executeCommands( prefix, file ); 
+}
+
+void ossimImageUtil::executePostCommands() const
+{
+   std::string prefix = "post.";
+   ossimFilename file = "";
+   executeCommands( prefix, file );   
+}
+
+void ossimImageUtil::executeCommands(
+   const std::string& prefix, const ossimFilename& file  ) const
+{
+   const std::string BASE_KEY = "command";
+   
+   // Get the number of test:
+   const std::string REG_EXP_STR = prefix + BASE_KEY + std::string("[0-9]+");
+   const ossim_uint32 NUM_COMMANDS = m_kwl->getNumberOfSubstringKeys(REG_EXP_STR);
+   if ( NUM_COMMANDS )
+   {
+      const ossim_uint32 MAX_INDEX = NUM_COMMANDS + 1000; // for skipage...
+      ossim_uint32 index = 0;
+      ossim_uint32 processedIndexes = 0;
+      std::string commandKey;
+      ossimString command;
+
+      while ( processedIndexes < MAX_INDEX )
+      {
+         commandKey = prefix + BASE_KEY + ossimString::toString( index++ ).string();
+         command.string() = m_kwl->findKey( commandKey );
+
+         if ( command.size() )
+         {
+            substituteCommandString( file, prefix, commandKey, command );
+
+            ossimNotify( ossimNotifyLevel_NOTICE )
+               << "executing_command: " << command << std::endl;
+            
+            // Launch the command:
+            int status = system( command.c_str() );
+
+            ossimNotify( ossimNotifyLevel_NOTICE )
+               << "return_status: " << status << std::endl;
+            
+            ++processedIndexes;
+
+            if ( processedIndexes == NUM_COMMANDS )
+            {
+               break;
+            }
+         }
+      }
+   }
+}
+
+void ossimImageUtil::substituteCommandString(
+   const ossimFilename& file,
+   const std::string& prefix,
+   const std::string& commandKey,
+   ossimString& command ) const
+{
+   // Expand any environment vars, e.g. $(env_var_name):
+   command.expandEnvironmentVariable();
+
+   gsubDate( commandKey, command );
+
+   if ( prefix == "file." )
+   {
+      substituteFileStrings( file, command );
+   }
+}
+
+void ossimImageUtil::substituteFileStrings( const ossimFilename& file,
+                                            ossimString& command ) const
+{
+   const std::string BASENAME_VARIABLE = "%{basename}";
+   command.gsub( BASENAME_VARIABLE, file.file().string() );
+   
+   const std::string BASENAME_NO_EXT_VARIABLE = "%{basename_no_ext}";
+   command.gsub( BASENAME_NO_EXT_VARIABLE, file.file().string() );
+
+   const std::string DIRNAME_VARIABLE = "%{dirname}";
+   command.gsub( DIRNAME_VARIABLE, file.path().string() );
+
+   const std::string FILE_VARIABLE = "%{file}";
+   command.gsub( FILE_VARIABLE, file.string(), true );
+
+   const std::string FILE_NO_EXT_VARIABLE = "%{file_no_ext}";
+   command.gsub( FILE_NO_EXT_VARIABLE, file.noExtension().string(), true );
+}
+
+void ossimImageUtil::gsubDate( const std::string& commandKey,
+                               ossimString& command ) const
+{
+   // Date:
+   const std::string DATE_VARIABLE = "%{date}";
+   if ( command.find( DATE_VARIABLE ) )
+   {
+      std::string key = ".strf_time_format";
+      std::string strfTimeFormat = m_kwl->findKey( commandKey, key );
+      if ( strfTimeFormat.empty() )
+      {
+         // yyyymmdd
+         strfTimeFormat = "%Y%m%d";
+      }
+      
+      //---
+      // Get the date as a string, e.g 20150411.
+      // true for gmt time.
+      //---
+      std::string date;
+      ossim::getFormattedTime( strfTimeFormat, true, date );
+      
+      if ( date.size() )
+      {
+         // Sustitute:
+         command.gsub( DATE_VARIABLE, date, true );
+      }
+   }
+}
+
+   
+
diff --git a/ossim/src/ossim/util/ossimInfo.cpp b/ossim/src/ossim/util/ossimInfo.cpp
new file mode 100644
index 0000000..831a900
--- /dev/null
+++ b/ossim/src/ossim/util/ossimInfo.cpp
@@ -0,0 +1,2772 @@
+//----------------------------------------------------------------------------
+// File: ossimInfo.cpp
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: ossimInfo class definition
+//
+// Utility class for getting information from the ossim library.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossimInfo.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/util/ossimInfo.h>
+#include <ossim/ossimVersion.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimContainerProperty.h>
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimDatumFactoryRegistry.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+#include <ossim/base/ossimEllipsoid.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/imaging/ossimFilterResampler.h>
+#include <ossim/base/ossimGeoidManager.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/base/ossimProperty.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimXmlDocument.h>
+#include <ossim/elevation/ossimElevManager.h>
+#include <ossim/imaging/ossimFilterResampler.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <ossim/imaging/ossimOverviewBuilderFactoryRegistry.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/plugin/ossimSharedPluginRegistry.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/support_data/ossimInfoBase.h>
+#include <ossim/support_data/ossimInfoFactoryRegistry.h>
+#include <ossim/support_data/ossimSupportFilesList.h>
+
+#include <iomanip>
+#include <sstream>
+#include <vector>
+
+static const char BUILD_DATE_KW[]           = "build_date";
+static const char CENTER_GROUND_KW[]        = "center_ground";
+static const char CENTER_IMAGE_KW[]         = "center_image";
+static const char CONFIGURATION_KW[]        = "configuration";
+static const char DATUMS_KW[]               = "datums";
+static const char DEG2RAD_KW[]              = "deg2rad";
+static const char DUMP_KW[]                 = "dump";
+static const char DUMP_NO_OVERVIEWS_KW[]    = "dump_no_overviews";
+static const char FACTORIES_KW[]            = "factories";
+static const char FACTORY_KEYWORD_LIST_KW[] = "factory_keyword_list";
+static const char FACTORY_OBJECT_KW[]       = "factory_object";
+static const char FACTORY_TYPE_KW[]         = "factory_type";
+static const char FORMAT_KW[]               = "format"; 
+static const char FT2MTRS_KW[]              = "ft2mtrs";
+static const char FT2MTRS_US_SURVEY_KW[]    = "ft2mtrs_us_survey";
+static const char GEOM_INFO_KW[]            = "geometry_info";
+static const char HEIGHT_KW[]               = "height";
+static const char IMAGE_CENTER_KW[]         = "image_center";
+static const char IMAGE_FILE_KW[]           = "image_file";
+static const char IMAGE_INFO_KW[]           = "image_info";
+static const char IMAGE_RECT_KW[]           = "image_rect";
+static const char METADATA_KW[]             = "metadata";
+static const char MTRS2FT_KW[]              = "mtrs2ft";
+static const char MTRS2FT_US_SURVEY_KW[]    = "mtrs2ft_us_survey";
+static const char MTRSPERDEG_KW[]           = "mtrs_per_deg";
+static const char NORTH_UP_KW[]             = "north_up_angle";
+static const char OUTPUT_FILE_KW[]          = "output_file";
+static const char OSSIM_LOGFILE_KW[]        = "ossim_logfile";
+static const char OVERVIEW_TYPES_KW[]       = "overview_types";
+static const char OVERWRITE_KW[]            = "overwrite";
+static const char PALETTE_KW[]              = "palette";
+static const char PLUGINS_KW[]              = "plugins";
+static const char PLUGIN_TEST_KW[]          = "plugin_test";
+static const char PROJECTIONS_KW[]          = "projections";
+static const char RAD2DEG_KW[]              = "rad2deg";
+static const char READER_PROPS_KW[]         = "reader_props";
+static const char RESAMPLER_FILTERS_KW[]    = "resampler_filters";
+static const char REVISION_NUMBER_KW[]      = "revision_number";
+static const char UP_IS_UP_KW[]             = "up_is_up_angle";
+static const char VERSION_KW[]              = "version";
+static const char WRITERS_KW[]              = "writers_kw";
+static const char WRITER_PROPS_KW[]         = "writer_props";
+static const char ZOOM_LEVEL_GSDS_KW[]      = "zoom_level_gsds";
+
+// Static trace for debugging.  Use -T ossimInfo to turn on.
+static ossimTrace traceDebug = ossimTrace("ossimInfo:debug");
+
+ossimInfo::ossimInfo() :
+   m_kwl(new ossimKeywordlist()),
+   m_img(0)
+{
+}
+
+ossimInfo::~ossimInfo()
+{
+}
+
+void ossimInfo::addArguments(ossimArgumentParser& ap)
+{
+   // Set the general usage:
+   ossimApplicationUsage* au = ap.getApplicationUsage();
+   ossimString usageString = ap.getApplicationName();
+   usageString += " [options] <optional-image>";
+   au->setCommandLineUsage(usageString);
+
+   // Set the command line options:
+   au->addCommandLineOption("--build-date", "Build date of code.");
+   
+   au->addCommandLineOption("-c", "Will print ground and image center.");
+
+   au->addCommandLineOption("--cg", "Will print out ground center.");
+
+   au->addCommandLineOption("--ci", "Will print out image center.");
+
+   au->addCommandLineOption("--config", "Displays configuration info.");
+
+   au->addCommandLineOption("-d", "A generic dump if one is available.");
+
+   au->addCommandLineOption("--datums", "Prints datum list.");   
+
+   au->addCommandLineOption("--deg2rad", "<degrees> Gives radians from degrees.");
+   
+   au->addCommandLineOption("--dno", "A generic dump if one is available.  This option ignores overviews.");
+   
+   au->addCommandLineOption("-f", "<format> Will output the information specified format [KWL | XML].  Default is KWL.");   
+
+   au->addCommandLineOption("--factories", "<keyword_list_flag> Prints factory list.  If keyword_list_flag is true, the result of a saveState will be output for each object.");
+   
+   au->addCommandLineOption("--ft2mtrs", "<feet> Gives meters from feet (0.3048 meters per foot).");
+   
+   au->addCommandLineOption("--ft2mtrs-us-survey", "<feet> Gives meters from feet (0.3048006096 meters per foot).");
+   
+   au->addCommandLineOption("-h", "Display this information");
+
+   au->addCommandLineOption("--height", "<latitude-in-degrees> <longitude-in-degrees> Returns the MSL and ellipoid height given a latitude longitude position.");
+
+   au->addCommandLineOption("-i", "Will print out the general image information.");
+   
+   au->addCommandLineOption("-m", "Will print out meta data image information.");
+
+   au->addCommandLineOption("--mtrsPerDeg", "<latitude> Gives meters per degree and meters per minute for a given latitude.");
+   
+   au->addCommandLineOption("--mtrs2ft", "<meters> Gives feet from meters (0.3048 meters per foot).");
+
+   au->addCommandLineOption("--mtrs2ft-us-survey", "<meters> Gives feet from meters (0.3048006096 meters per foot).");
+
+   au->addCommandLineOption("-n or --north-up", "Rotation angle to North for an image.");
+   
+   au->addCommandLineOption("-o", "<output-file> Will output the information to the file specified.  Default is to standard out.");
+
+   au->addCommandLineOption("--overview-types", "Prints overview builder types.");
+   
+   au->addCommandLineOption("-p", "Will print out the image projection information.");
+   
+   au->addCommandLineOption("--palette", "Will print out the color palette if one exists.");
+
+   au->addCommandLineOption("--plugins", "Prints plugin list.");
+   
+   au->addCommandLineOption("--plugin-test", "Test plugin passed to option.");
+   
+   au->addCommandLineOption("--projections", "Prints projections.");
+   
+   au->addCommandLineOption("-r", "Will print image rectangle.");
+
+   au->addCommandLineOption("--rad2deg", "<radians> Gives degrees from radians.");
+
+   au->addCommandLineOption("--reader-props", "Prints readers and properties.");
+
+   au->addCommandLineOption("--resampler-filters", "Prints resampler filter list.");
+
+   au->addCommandLineOption("--revision-number", "Revision number of code.");
+   
+   au->addCommandLineOption("-s", "Force the ground rect to be the specified datum");
+   
+   au->addCommandLineOption("-u or --up-is-up", "Rotation angle to \"up is up\" for an image.\nWill return 0 if image's projection is not affected by elevation.");
+
+   au->addCommandLineOption("-v", "Overwrite existing geometry.");
+
+   au->addCommandLineOption("-V or --vesion", "Version of code, e.g. 1.8.20");
+   
+   au->addCommandLineOption("--writer-props", "Prints writers and properties.");
+
+   au->addCommandLineOption("--writers", "Prints list of available writers.");
+
+   au->addCommandLineOption("--zoom-level-gsds", "Prints zoom level gsds for projections EPSG:4326 and EPSG:3857.");
+   
+} // void ossimInfo::addArguments(ossimArgumentParser& ap)
+
+bool ossimInfo::initialize(ossimArgumentParser& ap)
+{
+   static const char M[] = "ossimInfo::initialize(ossimArgumentParser&)";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
+   }
+
+   bool result = true;
+
+   if ( (ap.argc() == 1) || ap.read("-h") || ap.read("--help") )
+   {
+      usage(ap);
+
+      // continue_after_init to false
+      result = false;
+   }
+   else
+   {
+      //---
+      // Start with clean options keyword list.
+      //---
+      m_kwl->clear();
+
+      bool requiresInputImage = false;
+      
+      while ( 1 ) //  While forever loop...
+      {
+         // Used throughout below:
+         std::string ts1;
+         ossimArgumentParser::ossimParameter sp1(ts1);
+         std::string ts2;
+         ossimArgumentParser::ossimParameter sp2(ts2);
+         const char TRUE_KW[] = "true";
+         
+         if( ap.read("--build-date") )
+         {
+            m_kwl->add( BUILD_DATE_KW, TRUE_KW );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("-c") )
+         {
+            m_kwl->add( IMAGE_CENTER_KW, TRUE_KW );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--cg") )
+         {
+            m_kwl->add( CENTER_GROUND_KW, TRUE_KW );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--ci") )
+         {
+            m_kwl->add( CENTER_IMAGE_KW, TRUE_KW );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--config") || ap.read("--configuration") )
+         {
+            m_kwl->add( CONFIGURATION_KW, TRUE_KW );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--datums") )
+         {
+            m_kwl->add( DATUMS_KW, TRUE_KW );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--deg2rad", sp1) )
+         {
+            m_kwl->add( DEG2RAD_KW, ts1.c_str() );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+         if( ap.read("-d") )
+         {
+            m_kwl->add( DUMP_KW, TRUE_KW );
+            requiresInputImage = true;
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--dno") )
+         {
+            m_kwl->add( DUMP_KW, TRUE_KW );
+            m_kwl->add( DUMP_NO_OVERVIEWS_KW, TRUE_KW );
+            requiresInputImage = true;
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("-f", sp1) )
+         {
+            m_kwl->add( FORMAT_KW, ts1.c_str());
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--factories", sp1) )
+         {
+            m_kwl->add( FACTORIES_KW, TRUE_KW);
+            m_kwl->add( FACTORY_KEYWORD_LIST_KW, ts1.c_str());
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--ft2mtrs", sp1) )
+         {
+            m_kwl->add( FT2MTRS_KW, ts1.c_str());
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--ft2mtrs-us-survey", sp1) )
+         {
+            m_kwl->add( FT2MTRS_KW, ts1.c_str());
+            m_kwl->add( FT2MTRS_US_SURVEY_KW, TRUE_KW);
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--height", sp1, sp2) )
+         {
+            ossimString lat = ts1;
+            ossimString lon = ts2;
+            ossimGpt gpt;
+            gpt.lat = lat.toFloat64();
+            gpt.lon = lon.toFloat64();
+            m_kwl->add( HEIGHT_KW, gpt.toString().c_str() );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+         
+         if( ap.read("-i") )
+         {
+            m_kwl->add( IMAGE_INFO_KW, TRUE_KW );
+            requiresInputImage = true;
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("-m") )
+         {
+            m_kwl->add( METADATA_KW, TRUE_KW );
+            requiresInputImage = true;
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--mtrs2ft", sp1) )
+         {
+            m_kwl->add( MTRS2FT_KW, ts1.c_str());
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--mtrs2ft-us-survey", sp1) )
+         {
+            m_kwl->add( MTRS2FT_KW, ts1.c_str());
+            m_kwl->add( MTRS2FT_US_SURVEY_KW, TRUE_KW);
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+         
+         if( ap.read("--mtrsPerDeg", sp1) )
+         {
+            m_kwl->add( MTRSPERDEG_KW, ts1.c_str());
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("-n") || ap.read("--north-up") )
+         {
+            m_kwl->add( NORTH_UP_KW, TRUE_KW );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("-o", sp1) )
+         {
+            m_kwl->add( OUTPUT_FILE_KW, ts1.c_str());
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--overview-types") )
+         {
+            m_kwl->add( OVERVIEW_TYPES_KW, TRUE_KW );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("-p") )
+         {
+            m_kwl->add( GEOM_INFO_KW, TRUE_KW );
+            requiresInputImage = true;
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+         
+         if( ap.read("--palette") )
+         {
+            m_kwl->add( PALETTE_KW, TRUE_KW );
+            requiresInputImage = true;
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--plugins") )
+         {
+            m_kwl->add( PLUGINS_KW, TRUE_KW );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--plugin-test", sp1) )
+         {
+            m_kwl->add( PLUGIN_TEST_KW, ts1.c_str());
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--projections") )
+         {
+            m_kwl->add( PROJECTIONS_KW, TRUE_KW );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("-r") )
+         {
+            m_kwl->add( IMAGE_RECT_KW, TRUE_KW );
+            requiresInputImage = true;
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--rad2deg", sp1) )
+         {
+            m_kwl->add( RAD2DEG_KW, ts1.c_str());
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--reader-props") )
+         {
+            m_kwl->add( READER_PROPS_KW, TRUE_KW );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+         
+         if( ap.read("--resampler-filters") )
+         {
+            m_kwl->add( RESAMPLER_FILTERS_KW, TRUE_KW );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--revision-number") )
+         {
+            m_kwl->add( REVISION_NUMBER_KW, TRUE_KW );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+         
+         if( ap.read("-u") || ap.read("--up-is-up") )
+         {
+            m_kwl->add( UP_IS_UP_KW, TRUE_KW );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("-v") )
+         {
+            m_kwl->add( OVERWRITE_KW, TRUE_KW );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--version") || ap.read("-V") )
+         {
+            m_kwl->add( VERSION_KW, TRUE_KW );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+         
+         if( ap.read("--writer-props") )
+         {
+            m_kwl->add( WRITER_PROPS_KW, TRUE_KW );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+
+         if( ap.read("--writers") )
+         {
+            m_kwl->add( WRITERS_KW, TRUE_KW );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+         
+         if( ap.read("--zoom-level-gsds") )
+         {
+            m_kwl->add( ZOOM_LEVEL_GSDS_KW, TRUE_KW );
+            if ( ap.argc() < 2 )
+            {
+               break;
+            }
+         }
+        
+         // End of arg parsing.
+         ap.reportRemainingOptionsAsUnrecognized();
+         if ( ap.errors() )
+         {
+            ap.writeErrorMessages(ossimNotify(ossimNotifyLevel_NOTICE));
+            std::string errMsg = "Unknown option...";
+            throw ossimException(errMsg);
+         }
+
+         break; // Break from while forever.
+         
+      } // End while (forever) loop.
+
+      if ( ap.argc() == 2 )
+      {
+         m_kwl->add( IMAGE_FILE_KW, ap[1]  );
+      }
+
+      if ( requiresInputImage && ( ap.argc() == 1 ) )
+      {
+         usage(ap);
+         
+         // continue_after_init to false
+         result = false;
+      }
+
+   } // not usage
+         
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "m_kwl:\n" << *(m_kwl.get()) << "\n"
+         << M << " exit result = " << (result?"true":"false")
+         << "\n";
+   }
+   
+   return result;
+}
+
+void ossimInfo::execute()
+{
+   static const char M[] = "ossimInfo::execute()";
+   
+   const ossim_uint32 KEY_COUNT = m_kwl->getSize();
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << M << " entered..."
+         << "\nMap size: " << KEY_COUNT << "\n";
+   }
+
+   if ( KEY_COUNT )
+   {
+      ossim_uint32 consumedKeys = 0;
+   
+      const char* lookup;
+
+      lookup = m_kwl->find(IMAGE_FILE_KW);
+      if ( lookup )
+      {
+         ++consumedKeys;
+         ossimFilename image = lookup;
+
+         consumedKeys += executeImageOptions(image);
+      }
+
+      if ( consumedKeys < KEY_COUNT )
+      {
+         ossimString value;
+
+         if ( keyIsTrue( std::string(BUILD_DATE_KW)) )
+         {
+            getBuildDate( value.string() );
+            ossimNotify(ossimNotifyLevel_INFO)
+               << BUILD_DATE_KW << ": " << value << "\n";
+         }
+         
+         lookup = m_kwl->find(CONFIGURATION_KW);
+         if ( lookup )
+         {
+            ++consumedKeys;
+            value = lookup;
+            if ( value.toBool() )
+            {
+               printConfiguration();
+            }
+         }
+   
+         lookup = m_kwl->find(DATUMS_KW);
+         if ( lookup )
+         {
+            ++consumedKeys;
+            value = lookup;
+            if ( value.toBool() )
+            {
+               printDatums();
+            }
+         }
+
+         lookup = m_kwl->find(DEG2RAD_KW);
+         if ( lookup )
+         {
+            ++consumedKeys;
+            value = lookup;
+            deg2rad( value.toFloat64() );
+         }
+
+         lookup = m_kwl->find(FACTORIES_KW);
+         if ( lookup )
+         {
+            ++consumedKeys;
+            ossimString factories = lookup;
+            bool keywordListFlag = false;
+            lookup = m_kwl->find(FACTORY_KEYWORD_LIST_KW);
+            if ( lookup )
+            {
+               ++consumedKeys;
+               keywordListFlag = ossimString(lookup).toBool();
+            }
+            printFactories(keywordListFlag);
+         }
+
+         lookup = m_kwl->find(FT2MTRS_KW);
+         if ( lookup )
+         {
+            ++consumedKeys;
+            value = lookup;
+            bool us_survey = false;
+            lookup = m_kwl->find(FT2MTRS_US_SURVEY_KW);
+            if ( lookup )
+            {
+               ++consumedKeys;
+               us_survey = ossimString(lookup).toBool();
+            }
+            ft2mtrs( value.toFloat64(), us_survey);
+         }
+
+         lookup = m_kwl->find(HEIGHT_KW);
+         if ( lookup )
+         {
+            ++consumedKeys;
+            value = lookup;
+            ossimGpt gpt;
+            gpt.toPoint(value);
+            outputHeight(gpt);
+         }
+
+         lookup = m_kwl->find(MTRS2FT_KW);
+         if ( lookup )
+         {
+            ++consumedKeys;
+            value = lookup;
+            bool us_survey = false;
+            lookup = m_kwl->find(MTRS2FT_US_SURVEY_KW);
+            if ( lookup )
+            {
+               ++consumedKeys;
+               us_survey = ossimString(lookup).toBool();
+            }
+            mtrs2ft( value.toFloat64(), us_survey);
+         }
+
+         lookup = m_kwl->find(MTRSPERDEG_KW);
+         if ( lookup )
+         {
+            ++consumedKeys;
+            value = lookup;
+            mtrsPerDeg( value.toFloat64() );
+         }
+
+         lookup = m_kwl->find(OVERVIEW_TYPES_KW);
+         if ( lookup )
+         {
+            ++consumedKeys;
+            value = lookup;
+            if ( value.toBool() )
+            {
+               printOverviewTypes();
+            }
+         }
+
+         lookup = m_kwl->find(PLUGINS_KW);
+         if ( lookup )
+         {
+            ++consumedKeys;
+            value = lookup;
+            if ( value.toBool() )
+            {
+               printPlugins();
+            }
+         }
+
+         lookup = m_kwl->find(PLUGIN_TEST_KW);
+         if ( lookup )
+         {
+            ++consumedKeys;
+            value = lookup;
+            testPlugin(value);
+         }
+
+         lookup = m_kwl->find(PROJECTIONS_KW);
+         if ( lookup )
+         {
+            ++consumedKeys;
+            value = lookup;
+            if ( value.toBool() )
+            {
+               printProjections();
+            }
+         }
+
+         lookup = m_kwl->find(RAD2DEG_KW);
+         if ( lookup )
+         {
+            ++consumedKeys;
+            value = lookup;
+            rad2deg( value.toFloat64() );
+         }
+
+         lookup = m_kwl->find(READER_PROPS_KW);
+         if ( lookup )
+         {
+            ++consumedKeys;
+            value = lookup;
+            if ( value.toBool() )
+            {
+               printReaderProps();
+            }
+         }
+   
+         lookup = m_kwl->find(RESAMPLER_FILTERS_KW);
+         if ( lookup )
+         {
+            ++consumedKeys;
+            value = lookup;
+            if ( value.toBool() )
+            {
+               printResamplerFilters();
+            }
+         }
+
+         if ( keyIsTrue( std::string(REVISION_NUMBER_KW) ) )
+         {
+            getRevisionNumber( value.string() );
+            ossimNotify(ossimNotifyLevel_INFO)
+               << REVISION_NUMBER_KW << ": " << value << "\n";
+         }
+
+         if ( keyIsTrue( std::string(VERSION_KW) ) )
+         {
+            getVersion( value.string() );
+            ossimNotify(ossimNotifyLevel_INFO)
+               << VERSION_KW << ": " << value << "\n";
+         }
+
+         lookup = m_kwl->find(WRITERS_KW);
+         if ( lookup )
+         {
+            ++consumedKeys;
+            value = lookup;
+            if ( value.toBool() )
+            {
+               printWriters();
+            }
+         }
+
+         lookup = m_kwl->find(WRITER_PROPS_KW);
+         if ( lookup )
+         {
+            ++consumedKeys;
+            value = lookup;
+            if ( value.toBool() )
+            {
+               printWriterProps();
+            }
+         }
+
+         lookup = m_kwl->find(ZOOM_LEVEL_GSDS_KW);
+         if ( lookup )
+         {
+            ++consumedKeys;
+            value = lookup;
+            if ( value.toBool() )
+            {
+               printZoomLevelGsds();
+            }
+         }
+         
+      } // if ( consumedKeys < KEY_COUNT )
+
+      if ( traceDebug() )
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "KEY_COUNT:    " << KEY_COUNT
+            << "\nconsumedKeys: " << consumedKeys << "\n";
+      }
+         
+   } // if ( KEY_COUNT )
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
+   }
+}
+
+ossim_uint32 ossimInfo::executeImageOptions(const ossimFilename& file)
+{
+   static const char M[] = "ossimInfo::executeImageOptions()";
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\nfile: " << file << "\n";
+   }
+
+   // Output keyword list.
+   ossimKeywordlist okwl;
+
+   ossim_uint32 consumedKeys = 0;
+   const char* lookup = 0;
+   ossimString value  = "";
+   
+   bool dnoFlag       = false;
+   bool overwriteFlag = false;   
+   bool xmlOutFlag    = false;
+
+   lookup = m_kwl->find( OVERWRITE_KW );
+   if ( lookup )
+   {
+      ++consumedKeys;
+      value = lookup;
+      overwriteFlag = value.toBool();
+   }
+   
+   // Check for xml format option.
+   lookup = m_kwl->find( FORMAT_KW );
+   if ( lookup )
+   {
+      ++consumedKeys;
+      ossimString format = lookup;
+      if ( format.upcase() == "XML" )
+      {
+         xmlOutFlag = true;
+      }
+   }
+
+   lookup = m_kwl->find( OUTPUT_FILE_KW );
+   ossimFilename outputFile;
+   if ( lookup )
+   {
+      ++consumedKeys;
+      outputFile = lookup;
+   }
+   
+   // Check for dump.  Does not require image to be opened.
+   lookup = m_kwl->find( DUMP_KW );
+   if ( lookup )
+   {
+      ++consumedKeys;
+      lookup = m_kwl->find( DUMP_NO_OVERVIEWS_KW );
+      if ( lookup )
+      {
+         ++consumedKeys;
+         value = lookup;
+         dnoFlag = value.toBool();
+      }
+
+      if ( !xmlOutFlag && ( outputFile == ossimFilename::NIL ) )
+      {
+         //---
+         // Write to standard out:
+         // This dump will come out in order so is preferred over going to
+         // okwl(output keyword list) which will come out alphabetical.
+         //---
+         dumpImage(file, dnoFlag);
+      }
+      else
+      {
+         // Save to output keyword list. Will be output later.
+         dumpImage(file, dnoFlag, okwl);
+      }
+   }
+   
+   bool centerGroundFlag = false;
+   bool centerImageFlag  = false;
+   bool imageCenterFlag  = false;
+   bool imageGeomFlag    = false;
+   bool imageInfoFlag    = false;
+   bool imageRectFlag    = false;
+   bool metaDataFlag     = false;
+   bool northUpFlag      = false;
+   bool paletteFlag      = false;
+   bool upIsUpFlag       = false;
+   
+   // Center Ground:
+   lookup = m_kwl->find( CENTER_GROUND_KW );
+   if ( lookup )
+   {
+      ++consumedKeys;
+      value = lookup;
+      centerGroundFlag = value.toBool();
+   }
+
+   // Center Image:
+   lookup = m_kwl->find( CENTER_IMAGE_KW );
+   if ( lookup )
+   {
+      ++consumedKeys;
+      value = lookup;
+      centerImageFlag = value.toBool();
+   }
+
+   // Metadata:
+   lookup = m_kwl->find( METADATA_KW );
+   if ( lookup )
+   {
+      ++consumedKeys;
+      value = lookup;
+      metaDataFlag = value.toBool();
+   }
+   
+   // Palette:
+   lookup = m_kwl->find( PALETTE_KW );
+   if ( lookup )
+   {
+      ++consumedKeys;
+      value = lookup;
+      paletteFlag = value.toBool();
+   }
+
+   // Image center:
+   lookup = m_kwl->find( IMAGE_CENTER_KW );
+   if ( lookup )
+   {
+      ++consumedKeys;
+      value = lookup;
+      imageCenterFlag = value.toBool();
+   }
+
+   // Image rect:
+   lookup = m_kwl->find( IMAGE_RECT_KW );
+   if ( lookup )
+   {
+      ++consumedKeys;
+      value = lookup;
+      imageRectFlag = value.toBool();
+   }
+   
+   //---
+   // General image info:
+   // Defaulted ON if no image options set.
+   //---
+   lookup = m_kwl->find( IMAGE_INFO_KW ); 
+   if ( lookup )
+   {
+      ++consumedKeys;
+      value = lookup;
+      imageInfoFlag = value.toBool();
+   }
+   
+   //---
+   // Image geometry info:
+   // Defaulted on if no image options set.
+   //---
+   lookup = m_kwl->find( GEOM_INFO_KW );
+   if ( lookup )
+   {
+      ++consumedKeys;
+      value = lookup;
+      imageGeomFlag = value.toBool();
+   }      
+
+   // North up:
+   lookup = m_kwl->find( NORTH_UP_KW );
+   if ( lookup )
+   {
+      ++consumedKeys;
+      value = lookup;
+      northUpFlag = value.toBool();
+   }
+
+   // Up is up:
+   lookup = m_kwl->find( UP_IS_UP_KW );
+   if ( lookup )
+   {
+      ++consumedKeys;
+      value = lookup;
+      upIsUpFlag = value.toBool();
+   }
+   
+   // If no options consumed default is image info and geom info:
+   if ( consumedKeys == 0 )
+   {
+      imageInfoFlag = true;
+      imageGeomFlag = true;
+   }
+
+   if ( centerGroundFlag || centerImageFlag || imageCenterFlag || imageRectFlag ||
+        metaDataFlag || paletteFlag || imageInfoFlag || imageGeomFlag ||
+        northUpFlag || upIsUpFlag )
+   {
+      // Requires open image.
+      if ( m_img.valid() == false )
+      {
+         openImage(file);
+      }
+
+      if ( centerGroundFlag )
+      {
+         getCenterGround(okwl);
+      }
+
+      if ( centerImageFlag )
+      {
+         getCenterImage(okwl);
+      }
+
+      if ( imageCenterFlag )
+      {
+         getCenterGround(okwl);
+         getCenterImage(okwl);
+      }
+
+      if ( imageRectFlag )
+      {
+         getImageRect(okwl);
+      }
+    
+      if ( metaDataFlag )
+      {
+         getImageMetadata(okwl);
+      }
+      
+      if ( paletteFlag )
+      {
+         getImagePalette(okwl);
+      }
+      
+      if ( imageInfoFlag )
+      {
+         getImageInfo(okwl, dnoFlag);
+      }
+      
+      if ( imageGeomFlag )
+      {
+         getImageGeometryInfo(okwl, dnoFlag);
+      }
+
+      if ( imageRectFlag )
+      {
+         getImageRect(okwl);
+      }
+
+      if ( northUpFlag )
+      {
+         getNorthUpAngle( okwl );
+      }
+      
+      if ( upIsUpFlag )
+      {
+         getUpIsUpAngle( okwl );
+      }
+      
+   } // if ( metaDataFlag || paletteFlag || imageInfoFlag || imageGeomFlag )
+   
+   if ( okwl.getSize() ) // Output section:
+   {
+      if ( outputFile == ossimFilename::NIL )
+      {
+         // Write to standard out:
+         if ( !xmlOutFlag )
+         {
+            ossimNotify(ossimNotifyLevel_INFO) << okwl << std::endl;
+         }
+         else
+         {
+            outputXml( okwl );
+         }
+      }
+      else
+      {
+         // Write to file:
+         
+         if ( !overwriteFlag && outputFile.exists() )
+         {
+            ossimNotify(ossimNotifyLevel_INFO)
+               << "ERROR: File already exists: "  << outputFile
+               << "\nUse -v option to overwrite."
+               << std::endl;
+         }
+         else
+         {
+            if ( !xmlOutFlag )
+            {
+               okwl.write( outputFile );
+            }
+            else
+            {
+               outputXml( okwl, outputFile );
+            }
+         }
+      }
+      
+   } // if ( okwl )
+   
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "consumedKeys: " << consumedKeys << "\n"
+         << M << " exited...\n";
+   }
+   
+   return consumedKeys;
+   
+} // ossim_uint32 ossimInfo::executeImageOptions(const ossimFilename& file)
+
+void ossimInfo::getImageInfo( const ossimFilename& file,
+                              bool dumpFlag,
+                              bool dnoFlag,
+                              bool imageGeomFlag,
+                              bool imageInfoFlag,
+                              bool metaDataFlag,
+                              bool paletteFlag,
+                              ossimKeywordlist& kwl ) const
+{
+   if ( dumpFlag || dnoFlag )
+   {
+      dumpImage(file, dnoFlag, kwl);
+   }
+
+   // These flags requires open image.
+   if ( imageGeomFlag || imageInfoFlag || metaDataFlag || paletteFlag )
+   {
+      // Note: openImageHandler throws ossimException if it can't open.
+      ossimRefPtr<ossimImageHandler> ih = openImageHandler( file );
+      if ( ih.valid() )
+      {
+         if ( metaDataFlag )
+         {
+            getImageMetadata( ih.get(), kwl );
+         }
+         if ( paletteFlag )
+         {
+            getImagePalette( ih.get(), kwl );
+         }
+         if ( imageInfoFlag )
+         {
+            getImageInfo( ih.get(), kwl, dnoFlag );
+         }
+         if ( imageGeomFlag )
+         {
+            getImageGeometryInfo( ih.get(), kwl, dnoFlag) ;
+         }
+      }
+   }
+}
+ 
+bool ossimInfo::getImageInfo( const ossimFilename& file,
+                              ossim_uint32 entry,
+                              ossimKeywordlist& kwl ) const
+{
+   bool result = false;
+   
+   // Note: openImageHandler throws ossimException if it can't open.
+   ossimRefPtr<ossimImageHandler> ih = openImageHandler( file );
+   if ( ih.valid() )
+   {
+      if ( ih->setCurrentEntry( entry ) )
+      {
+         if ( getImageInfo( ih.get(), entry, kwl, false ) )
+         {
+            result = getImageGeometryInfo( ih.get(), entry, kwl, false );
+         }
+      }
+      else
+      {
+         std::ostringstream errMsg;
+         errMsg << "ossimInfo::getImageInfo ERROR:\nInvalid entry: " << entry
+                << "\n";
+         throw ossimException( errMsg.str() );
+      }
+   }
+
+   return result;
+}
+
+void ossimInfo::openImage(const ossimFilename& file)
+{
+   m_img = openImageHandler( file );
+}
+
+ossimRefPtr<ossimImageHandler> ossimInfo::openImageHandler(const ossimFilename& file) const
+{
+   ossimRefPtr<ossimImageHandler> result = ossimImageHandlerRegistry::instance()->open(file);
+   if ( result.valid() == false )
+   {
+      std::string errMsg = "ossimInfo::openImage ERROR:\nCould not open: ";
+      errMsg += file.string();
+      throw ossimException(errMsg);
+   }
+   return result;
+}
+
+void ossimInfo::closeImage()
+{
+   m_img = 0;
+}
+
+ossimRefPtr<ossimImageHandler> ossimInfo::getImageHandler()
+{
+   return m_img;
+}
+
+void ossimInfo::dumpImage(const ossimFilename& file, bool dnoFlag) const
+{
+   ossimRefPtr<ossimInfoBase> info = ossimInfoFactoryRegistry::instance()->create(file);
+   if (info.valid())
+   {
+      if (dnoFlag) // Default info processes overviews.
+      {
+         info->setProcessOverviewFlag(false);
+      }
+      info->print(ossimNotify(ossimNotifyLevel_INFO));
+      info = 0;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_INFO)
+         << "No dump available for:  " << file.c_str() << std::endl;
+   }
+}
+
+void ossimInfo::dumpImage(const ossimFilename& file,
+                          bool dnoFlag,
+                          ossimKeywordlist& kwl) const
+{
+   ossimRefPtr<ossimInfoBase> info = ossimInfoFactoryRegistry::instance()->create(file);
+   if (info.valid())
+   {
+      if (dnoFlag) // Default info processes overviews.
+      {
+         info->setProcessOverviewFlag(false);
+      }
+      info->getKeywordlist(kwl);
+      info = 0;
+   }
+   else
+   {
+      ossimNotify(ossimNotifyLevel_INFO)
+         << "No dump available for:  " << file.c_str() << std::endl;
+   }
+}
+void ossimInfo::getImageMetadata(ossimKeywordlist& kwl) const
+{
+   if ( m_img.valid() )
+   {
+      getImageMetadata( m_img.get(), kwl);
+   }
+}
+
+void ossimInfo::getImageMetadata(const ossimImageHandler* ih, ossimKeywordlist& kwl) const
+{
+   if ( ih )
+   {
+      std::vector< ossimRefPtr< ossimProperty > > list;
+      ih->getPropertyList(list);
+      std::vector< ossimRefPtr< ossimProperty > >::const_iterator i = list.begin();
+      while (i != list.end())
+      {
+         if ( (*i).valid() )
+         {
+            ossimString key;
+            ossimString value;
+            
+            // Check for one level of nested container.
+            if ((*i)->getClassName() == "ossimContainerProperty")
+            {
+               ossimContainerProperty* ptr = PTR_CAST(ossimContainerProperty, (*i).get());
+               if (ptr)
+               {
+                  std::vector< ossimRefPtr< ossimProperty > > list2;    
+                  ptr->getPropertyList(list2);
+                  
+                  std::vector< ossimRefPtr< ossimProperty > >::const_iterator i2 = list2.begin();
+                  while (i2 != list2.end())
+                  {
+                     key   = (*i2)->getName();
+                     value = (*i2)->valueToString();
+                     kwl.add(key.c_str(), value.c_str(), true);
+                     ++i2;
+                  }
+               }
+            }
+            else // Not a container.
+            {
+               key   = (*i)->getName();
+               value = (*i)->valueToString();
+               kwl.add(key.c_str(), value.c_str(), true);
+            }
+         }
+         ++i;
+      }
+      
+   } // if ( ih )
+
+} // End: getImageMetadata(ossimImageHandler* ih, ossimKeywordlist& kwl)
+
+void ossimInfo::getImagePalette(ossimKeywordlist& kwl)
+{
+   if ( m_img.valid() )
+   {
+      getImagePalette( m_img.get(), kwl );
+   }
+}
+
+void ossimInfo::getImagePalette(ossimImageHandler* ih, ossimKeywordlist& kwl) const
+{
+   if ( ih )
+   {
+      if(ih->getLut().valid())
+      {
+         ossim_uint32 entryIdx = 0;
+         std::vector<ossim_uint32> entryList;
+         ih->getEntryList(entryList);
+         for(entryIdx = 0; entryIdx < ih->getNumberOfEntries();++entryIdx)
+         {
+            ih->setCurrentEntry(entryList[entryIdx]);
+            ossimString prefix = "image";
+            prefix = prefix + ossimString::toString(entryList[entryIdx]) + ".lut.";
+            if(ih->getLut().valid())
+            {
+               ih->getLut()->saveState(kwl, prefix);
+            }
+         }
+      }
+      
+   } // if ( ih )
+}
+
+void ossimInfo::getImageInfo(ossimKeywordlist& kwl, bool dnoFlag)
+{
+   if ( m_img.valid() )
+   {
+      getImageInfo( m_img.get(), kwl, dnoFlag );
+   }
+}
+
+void ossimInfo::getImageInfo( ossimImageHandler* ih, ossimKeywordlist& kwl, bool dnoFlag ) const
+{
+   if ( ih )
+   {
+      ossim_uint32 numEntries = 0;
+
+      std::vector<ossim_uint32> entryList;
+      ih->getEntryList(entryList);
+
+      std::vector<ossim_uint32>::const_iterator i = entryList.begin();
+      while ( i != entryList.end() )
+      {
+         if ( getImageInfo( ih, (*i), kwl, dnoFlag ) )
+         {
+            ++numEntries;
+         }
+         ++i;
+      }
+      
+      kwl.add(ossimKeywordNames::NUMBER_ENTRIES_KW, numEntries, true);
+
+   } // if ( ih )
+}
+   
+bool ossimInfo::getImageInfo( ossim_uint32 entry, ossimKeywordlist& kwl, bool dnoFlag )
+{
+   bool result = false;
+   if ( m_img.valid() )
+   {
+      result = getImageInfo( m_img.get(), entry, kwl, dnoFlag );
+   }
+   return result;
+}
+ 
+bool ossimInfo::getImageInfo( ossimImageHandler* ih, ossim_uint32 entry, 
+                              ossimKeywordlist& kwl, bool dnoFlag ) const
+{
+   bool result = false;
+   
+   if ( ih )
+   {
+      if ( ih->setCurrentEntry(entry) )
+      {
+         bool outputEntry = true;
+         if ( dnoFlag )
+         {
+            if ( isImageEntryOverview() )
+            {
+               outputEntry = false;
+            }
+         }
+
+         if ( outputEntry )
+         {
+            result = true;
+
+            // Entry number:
+            ossimString prefix = "image";
+            prefix = prefix + ossimString::toString(entry) + ".";
+            kwl.add(prefix.c_str(), ossimKeywordNames::ENTRY_KW, entry, true);
+            
+            // Get the entry_name (specialized multi-entry readers only):
+            std::string entryName;
+            ih->getEntryName( entry, entryName );
+            if ( entryName.size() )
+            {
+               kwl.add(prefix.c_str(), "entry_name", entryName.c_str(), true);
+            }
+
+            // Type/class of reader:
+            kwl.add(prefix, "type", ih->getClassName().c_str(), true);
+
+            // Add RGB bands if available:
+            getRgbBands( ih, entry, kwl );
+
+            // Driver name if different from class name:
+            if ( ih->getClassName() != ih->getShortName() )
+            {
+               kwl.add(prefix, "driver", ih->getShortName().c_str(), true);
+            }
+
+            // Type/class of overview reader:
+            if (ih->getOverview())
+            {
+               kwl.add(prefix, "overview.type",
+                       ih->getOverview()->getClassName().c_str(), true);
+            }
+            
+            ossimDrect boundingRect = ih->getBoundingRect();
+            kwl.add(prefix,ossimKeywordNames::UL_X_KW, boundingRect.ul().x, true);
+            kwl.add(prefix,ossimKeywordNames::UL_Y_KW, boundingRect.ul().y, true);
+            kwl.add(prefix,ossimKeywordNames::LR_X_KW, boundingRect.lr().x, true);
+            kwl.add(prefix,ossimKeywordNames::LR_Y_KW, boundingRect.lr().y, true);
+            
+            const ossim_uint32 BANDS = ih->getNumberOfInputBands();
+            kwl.add(prefix,ossimKeywordNames::NUMBER_INPUT_BANDS_KW, BANDS, true);
+            kwl.add(prefix,ossimKeywordNames::NUMBER_OUTPUT_BANDS_KW,
+                    ih->getNumberOfOutputBands(), true);
+            kwl.add(prefix,ossimKeywordNames::NUMBER_LINES_KW,
+                    boundingRect.height(), true);
+            kwl.add(prefix,ossimKeywordNames::NUMBER_SAMPLES_KW,
+                    boundingRect.width(), true);
+            
+            ossimScalarType scalar = ih->getOutputScalarType();
+            
+            for(ossim_uint32 i = 0; i < BANDS; ++i)
+            {
+               ossimString band = ossimString("band") + ossimString::toString(i) + ".";
+               
+               kwl.add(prefix, band+"null_value", ih->getNullPixelValue(i), true);
+               kwl.add(prefix, band+"min_value", ih->getMinPixelValue(i), true);
+               kwl.add(prefix, band+"max_value", ih->getMaxPixelValue(i), true);
+            }
+            
+            // Output Radiometry.
+            std::string rad;
+            getRadiometry(scalar, rad);
+            kwl.add(prefix, "radiometry", rad.c_str(), true);
+            kwl.add(prefix,"number_decimation_levels", ih->getNumberOfDecimationLevels(), true);
+            
+         } // if ( outputEntry )
+         
+      } // if ( ih->setCurrentEntry(entry) )
+      
+   } // if ( ih )
+   
+   return result;
+
+} // End: ossimInfo::getImageInfo( ih, entry...
+
+void ossimInfo::getImageGeometryInfo(ossimKeywordlist& kwl, bool dnoFlag)
+{
+   if ( m_img.valid() )
+   {
+      getImageGeometryInfo( m_img.get(), kwl, dnoFlag );
+   }
+}
+
+void ossimInfo::getImageGeometryInfo( ossimImageHandler* ih, ossimKeywordlist& kwl, bool dnoFlag) const
+{
+   if ( ih )
+   {      ossim_uint32 numEntries = 0;
+
+      std::vector<ossim_uint32> entryList;
+      ih->getEntryList(entryList);
+
+      std::vector<ossim_uint32>::const_iterator i = entryList.begin();
+      while ( i != entryList.end() )
+      {
+         if ( getImageGeometryInfo( ih, (*i), kwl, dnoFlag ) )
+         {
+            ++numEntries;
+         }
+         ++i;
+      }
+      
+      kwl.add(ossimKeywordNames::NUMBER_ENTRIES_KW, numEntries, true);
+
+   } // if ( ih )
+}
+   
+bool ossimInfo::getImageGeometryInfo(ossim_uint32 entry, ossimKeywordlist& kwl, bool dnoFlag)
+{
+   bool result = false; 
+   if ( m_img.valid() )
+   {
+      getImageGeometryInfo( m_img.get(), entry, kwl, dnoFlag );
+   }
+   return result;
+}
+
+bool ossimInfo::getImageGeometryInfo( ossimImageHandler* ih,
+                                      ossim_uint32 entry, 
+                                      ossimKeywordlist& kwl, 
+                                      bool dnoFlag) const
+{
+   bool result = false;
+   
+   if ( ih )
+   {      
+      if ( ih->setCurrentEntry(entry) )
+      {
+         bool outputEntry = true;
+         if ( dnoFlag )
+         {
+            if ( isImageEntryOverview() )
+            {
+               outputEntry = false;
+            }
+         }
+
+         if ( outputEntry )
+         {
+            ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
+            if(geom.valid())
+            {
+               result = true;
+               
+               ossimString prefix = "image";
+               prefix = prefix + ossimString::toString(entry) + ossimString(".geometry.");
+               
+               geom->saveState(kwl, prefix);
+               
+               // Output support files list:
+               ossimSupportFilesList::instance()->save(kwl, prefix);
+               
+               ossimGpt ulg;
+               ossimGpt llg;
+               ossimGpt lrg;
+               ossimGpt urg;
+
+               ossimDrect outputRect = ih->getBoundingRect();
+
+               geom->localToWorld(outputRect.ul(), ulg);
+               geom->localToWorld(outputRect.ll(), llg);
+               geom->localToWorld(outputRect.lr(), lrg);
+               geom->localToWorld(outputRect.ur(), urg);
+               
+               //---
+               // *** HACK *** 
+               // Encountered CADRG RPF imagery where the left edge was longitude -180 and
+               // right edge +180. The projection code above reasonably maps all -180 to +180.
+               // This however breaks the image footprint since it would appear that the left
+               // and right edges were coincident instead of 360 degrees apart, i.e., a line
+               // segment instead of a rect. So added check here for coincident left and right
+               // edges and remapping left edge to -180.
+               //---
+               if ((ulg.lon == 180.0) && (urg.lon == 180.0))  
+               {
+                  ulg.lon = -180.0;
+               }
+               if ((llg.lon == 180.0) && (lrg.lon == 180.0))  
+               {
+                  llg.lon = -180.0;
+               }
+
+               kwl.add(prefix, "ul_lat", ulg.latd(), true);
+               kwl.add(prefix, "ul_lon", ulg.lond(), true);
+               kwl.add(prefix, "ll_lat", llg.latd(), true);
+               kwl.add(prefix, "ll_lon", llg.lond(), true);
+               kwl.add(prefix, "lr_lat", lrg.latd(), true);
+               kwl.add(prefix, "lr_lon", lrg.lond(), true);
+               kwl.add(prefix, "ur_lat", urg.latd(), true);
+               kwl.add(prefix, "ur_lon", urg.lond(), true);
+               
+               if(!kwl.find(ossimKeywordNames::TIE_POINT_LAT_KW))
+               {
+                  kwl.add(prefix, ossimKeywordNames::TIE_POINT_LAT_KW, ulg.latd(), true);
+                  kwl.add(prefix, ossimKeywordNames::TIE_POINT_LON_KW, ulg.lond(), true);
+                  
+                  if ( outputRect.height()-1.0 > DBL_EPSILON )
+                  {
+                     kwl.add(prefix, ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT,
+                             fabs(ulg.latd()-llg.latd())/(outputRect.height()-1.0), true);
+                  }
+                  
+                  if ( outputRect.width()-1.0 > DBL_EPSILON )
+                  {
+                     kwl.add(prefix, ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON,
+                             fabs(ulg.lond()-urg.lond())/(outputRect.width()-1.0), true);
+                  }
+               }
+               
+               ossimDpt gsd = geom->getMetersPerPixel();
+               kwl.add(prefix, ossimKeywordNames::METERS_PER_PIXEL_X_KW, gsd.x, true);
+               kwl.add(prefix, ossimKeywordNames::METERS_PER_PIXEL_Y_KW, gsd.y, true);
+               
+            } // if(geom.valid())
+
+         } // if ( outputEntry )
+
+      } // if ( ih->setCurrentEntry(entry) )
+
+      if ( !result )
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "No geometry for file " << ih->getFilename() << std::endl;
+      }
+      
+   } // if ( ih )
+   
+   return result;
+
+} // End: ossimInfo::getImageGeometryInfo( ih, entry...
+
+void ossimInfo::getCenterImage(ossimKeywordlist& kwl)
+{
+   if ( m_img.valid() )
+   {
+      getCenterImage( m_img.get(), kwl );
+   }
+}
+
+void ossimInfo::getCenterImage( ossimImageHandler* ih, ossimKeywordlist& kwl) const
+{
+   if ( ih )
+   {  
+      std::vector<ossim_uint32> entryList;
+      ih->getEntryList(entryList);
+      
+      std::vector<ossim_uint32>::const_iterator i = entryList.begin();
+      while ( i != entryList.end() )
+      {
+         getCenterImage( ih, (*i), kwl );
+         ++i;
+      }
+   } 
+}
+   
+void ossimInfo::getCenterImage(ossim_uint32 entry, ossimKeywordlist& kwl)
+{
+   if ( m_img.valid() )
+   {
+      getCenterImage( m_img.get(), entry, kwl );
+   }
+}
+
+void ossimInfo::getCenterImage( ossimImageHandler* ih,
+                                ossim_uint32 entry, 
+                                ossimKeywordlist& kwl ) const
+{
+   if ( ih )
+   {
+      if ( ih->setCurrentEntry(entry) )
+      {
+         ossimString prefix = "image";
+         prefix = prefix + ossimString::toString(entry) + ".";
+         ossimDrect bounds = ih->getBoundingRect();
+
+         if( !bounds.hasNans() )
+         {
+            ossimDpt iPt = bounds.midPoint();
+            kwl.add(prefix, "center_image", iPt.toString().c_str(), true);
+         }
+
+      } // if ( ih->setCurrentEntry(entry) )
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "Could not get image center for: " << ih->getFilename() << std::endl;
+      }
+      
+   } // if ( ih )
+}
+
+void ossimInfo::getCenterGround(ossimKeywordlist& kwl)
+{
+   if ( m_img.valid() )
+   {
+      getCenterGround( m_img.get(), kwl );
+   }
+}
+
+void ossimInfo::getCenterGround( ossimImageHandler* ih, ossimKeywordlist& kwl) const
+{
+   if ( ih )
+   {  
+      std::vector<ossim_uint32> entryList;
+      ih->getEntryList(entryList);
+      
+      std::vector<ossim_uint32>::const_iterator i = entryList.begin();
+      while ( i != entryList.end() )
+      {
+         getCenterGround( ih, (*i), kwl );
+         ++i;
+      }
+   } 
+}
+   
+void ossimInfo::getCenterGround(ossim_uint32 entry, ossimKeywordlist& kwl)
+{
+   if ( m_img.valid() )
+   {
+      getCenterGround( m_img.get(), entry, kwl );
+   }
+}
+
+void ossimInfo::getCenterGround( ossimImageHandler* ih,
+                                 ossim_uint32 entry, 
+                                 ossimKeywordlist& kwl ) const
+{
+   if ( ih )
+   {
+      if ( ih->setCurrentEntry(entry) )
+      {
+         ossimString prefix = "image";
+         prefix = prefix + ossimString::toString(entry) + ".";
+
+         ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
+         if(geom.valid())
+         {
+            ossimDrect bounds;
+            geom->getBoundingRect( bounds );
+            
+            if( !bounds.hasNans() )
+            {
+               ossimDpt iPt = bounds.midPoint();
+               ossimGpt gPt;
+               geom->localToWorld(iPt, gPt);
+               kwl.add(prefix, "center_ground", gPt.toString().c_str(), true);
+            }
+         }
+
+      } // if ( ih->setCurrentEntry(entry) )
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "Could not get ground center for: " << ih->getFilename() << std::endl;
+      }
+      
+   } // if ( ih )
+}
+
+void ossimInfo::getUpIsUpAngle(ossimKeywordlist& kwl)
+{
+   if ( m_img.valid() )
+   {
+      getUpIsUpAngle( m_img.get(), kwl );
+   }
+}
+
+void ossimInfo::getUpIsUpAngle( ossimImageHandler* ih, ossimKeywordlist& kwl) const
+{
+   if ( ih )
+   {  
+      std::vector<ossim_uint32> entryList;
+      ih->getEntryList(entryList);
+      
+      std::vector<ossim_uint32>::const_iterator i = entryList.begin();
+      while ( i != entryList.end() )
+      {
+         getUpIsUpAngle( ih, (*i), kwl );
+         ++i;
+      }
+   } 
+}
+
+void ossimInfo::getUpIsUpAngle(ossim_uint32 entry, ossimKeywordlist& kwl)
+{
+   if ( m_img.valid() )
+   {
+      getUpIsUpAngle( m_img.get(), entry, kwl );
+   }
+}
+
+void ossimInfo::getUpIsUpAngle( ossimImageHandler* ih,
+                                ossim_uint32 entry, 
+                                ossimKeywordlist& kwl ) const
+{
+   if ( ih )
+   {
+      bool result = false;
+
+      if ( ih->setCurrentEntry(entry) )
+      {
+         ossimString prefix = "image";
+         prefix = prefix + ossimString::toString(entry) + ".";
+         
+         ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
+         if(geom.valid())
+         {
+            ossim_float64 upIsUp = 0.0;
+            if ( geom->isAffectedByElevation() )
+            {
+               upIsUp = geom->upIsUpAngle();
+               kwl.add(prefix, UP_IS_UP_KW, upIsUp, true);
+            }
+         }
+
+         result = true;
+
+      } // if ( ih->setCurrentEntry(entry) )
+
+      if ( !result )
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "Could not get up is up angle for: " << ih->getFilename() << std::endl;
+      }
+      
+   } // if ( ih )
+}
+   
+void ossimInfo::getNorthUpAngle(ossimKeywordlist& kwl)
+{
+   if ( m_img.valid() )
+   {
+      getNorthUpAngle( m_img.get(), kwl );
+   }
+}
+
+void ossimInfo::getNorthUpAngle( ossimImageHandler* ih, ossimKeywordlist& kwl) const
+{
+   if ( ih )
+   {  
+      std::vector<ossim_uint32> entryList;
+      ih->getEntryList(entryList);
+      
+      std::vector<ossim_uint32>::const_iterator i = entryList.begin();
+      while ( i != entryList.end() )
+      {
+         getNorthUpAngle( ih, (*i), kwl );
+         ++i;
+      }
+   } 
+}
+
+void ossimInfo::getNorthUpAngle(ossim_uint32 entry, ossimKeywordlist& kwl)
+{
+   if ( m_img.valid() )
+   {
+      getNorthUpAngle( m_img.get(), entry, kwl );
+   }
+}
+
+void ossimInfo::getNorthUpAngle( ossimImageHandler* ih,
+                                 ossim_uint32 entry, 
+                                 ossimKeywordlist& kwl ) const
+{
+   if ( ih )
+   {
+      bool result = false;
+
+      if ( ih->setCurrentEntry(entry) )
+      {
+         ossimString prefix = "image";
+         prefix = prefix + ossimString::toString(entry) + ".";
+         
+         ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
+         if(geom.valid())
+         {
+            ossim_float64 northUp = geom->northUpAngle();
+            kwl.add(prefix, NORTH_UP_KW, northUp, true);
+         }
+
+         result = true;
+
+      } // if ( ih->setCurrentEntry(entry) )
+
+      if ( !result )
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "Could not get north up angle for: " << ih->getFilename() << std::endl;
+      }
+      
+   } // if ( ih )
+}
+
+void ossimInfo::getImageRect(ossimKeywordlist& kwl)
+{
+   if ( m_img.valid() )
+   {
+      getImageRect( m_img.get(), kwl );
+   }
+}
+
+void ossimInfo::getImageRect( ossimImageHandler* ih, ossimKeywordlist& kwl) const
+{
+   if ( ih )
+   {  
+      std::vector<ossim_uint32> entryList;
+      ih->getEntryList(entryList);
+      
+      std::vector<ossim_uint32>::const_iterator i = entryList.begin();
+      while ( i != entryList.end() )
+      {
+         getImageRect( ih, (*i), kwl );
+         ++i;
+      }
+   } // if ( ih )
+}
+
+bool ossimInfo::getRgbBands(
+   ossimImageHandler* ih, ossim_uint32 entry, ossimKeywordlist& kwl ) const
+{
+   bool result = false;
+   if ( ih )
+   {
+      std::vector<ossim_uint32> bandList;
+      result = ih->getRgbBandList( bandList );
+      if ( result && ( bandList.size() == 3 ) )
+      {
+         ossimString os;
+         ossim::toSimpleStringList<ossim_uint32>(os, bandList);
+         if ( os.size() )
+         {
+            ossimString prefix = "image";
+            prefix = prefix + ossimString::toString(entry) + ".";
+            kwl.add(prefix, "rgb_bands", os.c_str(), true);
+         }
+      }
+   }
+   return result;
+   
+} // End: ossimInfo::getRgbBands( ... )
+   
+void ossimInfo::getImageRect(ossim_uint32 entry, ossimKeywordlist& kwl)
+{
+   if ( m_img.valid() )
+   {
+      getImageRect( m_img.get(), entry, kwl );
+   }
+}
+
+void ossimInfo::getImageRect( ossimImageHandler* ih,
+                              ossim_uint32 entry, 
+                              ossimKeywordlist& kwl ) const
+{
+   if ( ih )
+   {
+      if ( ih->setCurrentEntry(entry) )
+      {
+         ossimString prefix = "image";
+         prefix = prefix + ossimString::toString(entry) + ".";
+         ossimIrect outputRect = ih->getBoundingRect();
+         kwl.add(prefix, "image_rectangle", outputRect.toString().c_str(), true);
+
+      } // if ( ih->setCurrentEntry(entry) )
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+            << "Could not get image rectangle for: " << ih->getFilename() << std::endl;
+      }
+      
+   } // if ( ih )
+
+} // End: getImageRect( ih, entry...
+
+// Note be sure to m_img->setCurrentEntry before calling.
+bool ossimInfo::isImageEntryOverview() const
+{
+   bool result = false; // Have to prove it.
+   if ( m_img.valid() )
+   {
+      result = isImageEntryOverview( m_img.get() );
+   }
+   return result;
+}
+ 
+bool ossimInfo::isImageEntryOverview( const ossimImageHandler* ih ) const
+{
+   bool result = false; // Have to prove it.
+   if ( ih )
+   {     
+      ossimString s = "imag";
+      ossimRefPtr<ossimProperty> prop = ih->getProperty(s);
+      if (prop.valid())
+      {
+         ossimString s;
+         prop->valueToString(s);
+         if (s.toFloat32() < 1.0)
+         {
+            result = true;
+         }
+      }
+   }
+   return result;
+}
+
+void ossimInfo::printConfiguration() const
+{
+   printConfiguration( ossimNotify(ossimNotifyLevel_INFO) );
+}
+
+std::ostream& ossimInfo::printConfiguration(std::ostream& out) const
+{
+   out << "\npreferences_keyword_list:\n"
+       << ossimPreferences::instance()->preferencesKWL()
+       << std::endl;
+   return out;
+}
+
+void ossimInfo::printFactories(bool keywordListFlag)const
+{
+   std::vector<ossimString> typeList;
+   ossimObjectFactoryRegistry::instance()->getTypeNameList(typeList);
+   for(int i = 0; i < (int)typeList.size(); ++i)
+   {
+      if(keywordListFlag)
+      {
+         ossimObject* obj = ossimObjectFactoryRegistry::instance()->createObject(typeList[i]);
+         if(obj)
+         {
+            cout << typeList[i] << endl;
+            cout << "______________________________________________________" << endl;
+            ossimKeywordlist kwl;
+            obj->saveState(kwl);
+            cout << kwl << endl;
+            cout << "______________________________________________________" << endl;
+            delete obj;
+         }
+      }
+      else
+      {
+         cout << typeList[i] << endl;
+      }
+   }  
+}
+
+void ossimInfo::printDatums() const
+{
+   ossimInfo::printDatums( ossimNotify(ossimNotifyLevel_INFO) );
+}
+
+std::ostream& ossimInfo::printDatums(std::ostream& out) const
+{
+   // Capture the original flags.
+   std::ios_base::fmtflags f = out.flags();
+
+   std::vector<ossimString> datumList;
+   ossimDatumFactoryRegistry::instance()->getList(datumList);
+   
+   std::vector<ossimString>::const_iterator i = datumList.begin();
+   
+   while ( i != datumList.end() )
+   {
+      const ossimDatum* datum = ossimDatumFactoryRegistry::instance()->create(*i);
+      if (datum)
+      {
+         if ( datum->ellipsoid() )
+         {
+            out << setiosflags(ios::left)
+                << setw(7)
+                << datum->code().c_str()
+                << setw(48)
+                << datum->name().c_str()
+                << setw(10) 
+                << "Ellipse:"
+                << datum->ellipsoid()->name()
+                << std::endl;
+         }
+         else
+         {
+            out << "No ellipsoid for code: " << (*i) << std::endl;
+         }
+      }
+      else
+      {
+         out << "No datum for code: " << (*i) << std::endl;
+      }
+      
+      ++i;
+   }
+
+   // Reset flags.
+   out.setf(f);
+   
+   return out;
+}
+
+void ossimInfo::deg2rad(const ossim_float64& degrees) const
+{
+   deg2rad( degrees, ossimNotify(ossimNotifyLevel_INFO) );
+}
+
+std::ostream& ossimInfo::deg2rad(const ossim_float64& degrees, std::ostream& out) const
+{
+   double radians = degrees * RAD_PER_DEG;
+
+   // Capture the original flags.
+   std::ios_base::fmtflags f = out.flags();
+   
+   out << std::setiosflags(std::ios::fixed) << std::setprecision(15)
+       << "\n" << degrees << " degrees = "
+       << radians << " radians.\n" << std::endl;
+
+   // Reset flags.
+   out.setf(f);
+
+   return out;
+}
+
+void ossimInfo::rad2deg(const ossim_float64& radians) const
+{
+   rad2deg(radians, ossimNotify(ossimNotifyLevel_INFO));
+}
+
+std::ostream& ossimInfo::rad2deg(const ossim_float64& radians, std::ostream& out) const
+{
+   double degrees = radians * DEG_PER_RAD;
+
+   // Capture the original flags.
+   std::ios_base::fmtflags f = out.flags();
+   
+   out << std::setiosflags(std::ios::fixed) << std::setprecision(15)
+       << "\n" << radians << " radians = "
+       << degrees << " degrees.\n" << std::endl;
+
+   // Reset flags.
+   out.setf(f);
+
+   return out;
+}
+
+void ossimInfo::ft2mtrs(const ossim_float64& feet, bool us_survey) const
+{
+   ft2mtrs( feet, us_survey, ossimNotify(ossimNotifyLevel_INFO) );
+}
+
+std::ostream& ossimInfo::ft2mtrs(const ossim_float64& feet,
+                                 bool us_survey,
+                                 std::ostream& out) const
+{
+   ossim_float64 meters = 0.0;
+   std::string conversionString;
+   if (us_survey)
+   {
+      meters = feet * US_METERS_PER_FT;
+      conversionString = "0.3048006096";
+   }
+   else
+   {
+      meters = feet * MTRS_PER_FT;
+      conversionString = "0.3048";
+   }
+
+   // Capture the original flags.
+   std::ios_base::fmtflags f = out.flags();
+   
+   out << setiosflags(ios::fixed) << setprecision(15)
+       << feet << " * " << conversionString << " = "
+       << meters << " meters." << std::endl;
+
+   // Reset flags.
+   out.setf(f);
+
+   return out;
+}
+
+void ossimInfo::mtrs2ft(const ossim_float64& meters, bool us_survey) const
+{
+   mtrs2ft(meters, us_survey, ossimNotify(ossimNotifyLevel_INFO));
+}
+
+std::ostream& ossimInfo::mtrs2ft(const ossim_float64& meters,
+                                 bool us_survey,
+                                 std::ostream& out) const
+{
+   // Capture the original flags.
+   std::ios_base::fmtflags f = out.flags();
+
+   double feet = 0.0;
+   std::string conversionString;
+
+   if (us_survey)
+   {
+      feet = meters / US_METERS_PER_FT;
+      conversionString = "0.3048006096";
+   }
+   else
+   {
+      feet = meters / MTRS_PER_FT;
+      conversionString = "0.3048";
+   }
+
+   out << setiosflags(ios::fixed) << setprecision(15)
+       << meters << " / " << conversionString << " = "
+       << feet << " feet." << std::endl;
+
+   // Reset flags.
+   out.setf(f);
+   
+   return out;
+}
+
+void ossimInfo::mtrsPerDeg(const ossim_float64& latitude) const
+{
+   mtrsPerDeg(latitude, ossimNotify(ossimNotifyLevel_INFO));
+}
+
+std::ostream& ossimInfo::mtrsPerDeg(const ossim_float64& latitude, std::ostream& out) const
+{
+   ossimGpt gpt(latitude, 0.0);
+   ossimDpt      mpd          = gpt.metersPerDegree();  
+   ossim_float64 radius       = gpt.datum()->ellipsoid()->geodeticRadius(latitude);
+   ossim_float64 arcLengthLat = mpd.y/60.0;
+   ossim_float64 arcLengthLon = mpd.x/60.0;
+   out << setiosflags(ios::fixed) << setprecision(15)
+       << "Meters per degree and minute at latitude of " << latitude << ":\n"
+       << "Meters per degree latitude:   "
+       << setw(20) << mpd.y << "\n"
+       << "Meters per degree longitude:  "
+       << setw(20) << mpd.x << "\n"
+       << "Meters per minute latitude:   "
+       << setw(20) << arcLengthLat << "\n"
+       << "Meters per minute longitude:  "
+       << setw(20) << arcLengthLon << "\n"
+       << "Geodetic radius:              "
+       << setw(20) << radius << "\n"
+       << std::endl;
+   return out;
+}
+
+void ossimInfo::outputHeight(const ossimGpt& gpt) const
+{
+   outputHeight(gpt, ossimNotify(ossimNotifyLevel_INFO));
+}
+
+std::ostream& ossimInfo::outputHeight(const ossimGpt& gpt, std::ostream& out) const
+{
+   // Capture the original flags.
+   std::ios_base::fmtflags f = out.flags();
+
+   // Handle wrap conditions.
+   ossimGpt copyGpt = gpt;
+   copyGpt.wrap();
+
+   ossim_float64 hgtAboveMsl = ossimElevManager::instance()->getHeightAboveMSL(copyGpt);
+   ossim_float64 hgtAboveEllipsoid =
+      ossimElevManager::instance()->getHeightAboveEllipsoid(copyGpt);
+   ossim_float64 geoidOffset = ossimGeoidManager::instance()->offsetFromEllipsoid(copyGpt);
+   ossim_float64 mslOffset = 0.0;
+   
+   if(ossim::isnan(hgtAboveEllipsoid)||ossim::isnan(hgtAboveMsl))
+   {
+      mslOffset = ossim::nan();
+   }
+   else
+   {
+      mslOffset = hgtAboveEllipsoid - hgtAboveMsl;
+   }
+   
+   std::vector<ossimFilename> cellList;
+   ossimElevManager::instance()->getOpenCellList(cellList);
+   
+   if (!cellList.empty())
+   {
+      out << "Opened cell:            " << cellList[0] << "\n";
+   }
+   else
+   {
+      out << "Did not find cell for point: " << gpt << "\n";
+   }
+   
+   out << "MSL to ellipsoid delta: ";
+   if (!ossim::isnan(mslOffset))
+   {
+      out << std::setprecision(15) << mslOffset;
+   }
+   else
+   {
+      out << "nan";
+   }
+   out << "\nHeight above MSL:       ";
+   if (!ossim::isnan(hgtAboveMsl))
+   {
+      out << std::setprecision(15) << hgtAboveMsl;
+   }
+   else
+   {
+      out << "nan";
+   }
+   out << "\nHeight above ellipsoid: ";
+   if (!ossim::isnan(hgtAboveEllipsoid))
+   {
+      out << std::setprecision(15) << hgtAboveEllipsoid << "\n";
+   }
+   else
+   {
+      out << "nan" << "\n";
+   }
+   out << "Geoid value:            ";
+
+   if (!ossim::isnan(geoidOffset))
+   {
+      out << std::setprecision(15) << geoidOffset << std::endl;
+   }
+   else
+   {
+      out << "nan" << std::endl;
+   }
+
+   // Reset flags.
+   out.setf(f);
+   
+   return out;
+}
+
+void ossimInfo::printPlugins() const
+{
+   printPlugins(ossimNotify(ossimNotifyLevel_INFO));
+}
+
+std::ostream& ossimInfo::printPlugins(std::ostream& out) const
+{
+   if(ossimSharedPluginRegistry::instance()->getNumberOfPlugins() > 0)
+   {
+      ossimSharedPluginRegistry::instance()->printAllPluginInformation(out);
+   }
+   else
+   {
+      out << "No plugins loaded in the OSSIM core library" << std::endl;
+   }
+   return out;
+}
+
+void ossimInfo::testPlugin(const ossimFilename& plugin) const
+{
+   testPlugin(plugin, ossimNotify(ossimNotifyLevel_INFO));
+}
+
+std::ostream& ossimInfo::testPlugin(const ossimFilename& plugin, std::ostream& out) const
+{
+   if( ossimSharedPluginRegistry::instance()->registerPlugin(plugin.expand()) )
+   {
+      out << "Plugin loaded: " << plugin << std::endl;
+   }
+   else
+   {
+      out << "Unable to load plugin: " << plugin << std::endl;
+   }
+   return out;
+}
+
+void ossimInfo::printOverviewTypes() const
+{
+   printOverviewTypes(ossimNotify(ossimNotifyLevel_INFO));
+}
+
+std::ostream& ossimInfo::printOverviewTypes(std::ostream& out) const
+{
+   out << "\nValid overview types: " << std::endl;
+   
+   std::vector<ossimString> outputType;
+   
+   ossimOverviewBuilderFactoryRegistry::instance()->getTypeNameList(outputType);
+   std::copy(outputType.begin(),
+             outputType.end(),
+             std::ostream_iterator<ossimString>(out, "\t\n"));
+   return out;
+}
+
+void ossimInfo::printProjections() const
+{
+   printProjections(ossimNotify(ossimNotifyLevel_INFO));
+}
+
+std::ostream& ossimInfo::printProjections(std::ostream& out) const
+{
+   out << "Projections:\n";
+   
+   std::vector<ossimString> list;
+   ossimProjectionFactoryRegistry::instance()->
+      getAllTypeNamesFromRegistry(list);
+   
+   std::vector<ossimString>::const_iterator i = list.begin();
+   while ( i != list.end() )
+   {
+      out << *i << "\n";
+      ++i;
+   }
+   out << std::endl;
+   
+   return out;
+}
+
+void ossimInfo::printReaderProps() const
+{
+   printReaderProps(ossimNotify(ossimNotifyLevel_INFO));
+}
+
+std::ostream& ossimInfo::printReaderProps(std::ostream& out) const
+{
+   return ossimImageHandlerRegistry::instance()->printReaderProps( out );
+}
+
+void ossimInfo::printResamplerFilters() const
+{
+   printResamplerFilters(ossimNotify(ossimNotifyLevel_INFO));
+}
+
+std::ostream& ossimInfo::printResamplerFilters(std::ostream& out) const
+{
+   std::vector<ossimString> list;
+   ossimFilterResampler f;
+   f.getFilterTypes(list);
+   std::vector<ossimString>::const_iterator i = list.begin();
+   while ( i != list.end() )
+   {
+      out << *i << "\n";
+      ++i;
+   }
+   out << std::endl;
+   return out;
+}
+
+void ossimInfo::printWriters() const
+{
+   printWriters(ossimNotify(ossimNotifyLevel_INFO));
+}
+
+std::ostream& ossimInfo::printWriters(std::ostream& out) const
+{
+   return ossimImageWriterFactoryRegistry::instance()->printImageTypeList( out );
+}
+
+void ossimInfo::printZoomLevelGsds() const
+{
+   printZoomLevelGsds(ossimNotify(ossimNotifyLevel_INFO));
+}
+
+std::ostream& ossimInfo::printZoomLevelGsds(std::ostream& out) const
+{
+   // Capture the original flags.
+   std::ios_base::fmtflags f = out.flags();
+   
+   out << setprecision(15)<< setiosflags(std::ios_base::fixed|std::ios_base::right);
+   
+   const int MAX_LEVEL = 24;
+   const double TILE_SIZE = 256.0;
+   const double EPSG_4326_BOUNDS = 180.0;
+   const double EPSG_3857_BOUNDS = 40075016.685578488;
+   
+   // From: ossim-info --mtrsPerDeg 0.0
+   const double MTRS_PER_DEGREE_AT_EQUATOR = 111319.490793273565941;
+   
+   out << "Notes:\n"
+       << "tile size: 256\n"
+       << "dpp = \"degrees per pixel\"\n"
+       << "mpp = \"meters per pixel\"\n\n";
+   
+   // Assuming square pixels, level 0 having (2 x 1) tiles.
+   double level_0_gsd = EPSG_4326_BOUNDS / TILE_SIZE;
+   double level_gsd = 0.0;
+   int i = 0;
+   
+   out << "EPSG:4326 level info:\n"
+       << "Note: Assuming square pixels, level 0 having (2x1) tiles.\n"
+       << "bounds: 360.0 X 180.0\n"
+       << "level[" << std::setw(2) << std::setfill('0') << i << "] dpp:"
+       << std::setw(20) << std::setfill(' ') << level_0_gsd
+       << "  equivalent mpp:" << std::setw(23)
+       << (level_0_gsd * MTRS_PER_DEGREE_AT_EQUATOR) << "\n";
+   
+   for ( i = 1; i <= MAX_LEVEL; ++i )
+   {
+      level_gsd = level_0_gsd / std::pow( 2.0, i );
+      out << "level[" << std::setw(2) << std::setfill('0') << i << "] dpp:"
+          << std::setw(20) << std::setfill(' ') << level_gsd
+          << "  equivalent mpp:" << std::setw(23)
+          << (level_gsd * MTRS_PER_DEGREE_AT_EQUATOR) << "\n";
+      
+   }
+   
+   // Assuming square pixels, level 0 having (1 x 1) tiles.
+   level_0_gsd = EPSG_3857_BOUNDS / TILE_SIZE;
+   level_gsd = 0.0;
+   i = 0;
+   
+   out << "\n\nEPSG:3857 level info:\n"
+       << "Note: Assuming square pixels, level 0 having (1x1) tile.\n"
+       << "bounds: 40075016.685578488 X 40075016.685578488\n"
+       << "level[" << std::setw(2) << std::setfill('0') << i << "] mpp:"
+       << std::setw(24) << std::setfill(' ') << level_0_gsd << "\n";
+   
+   for ( i = 1; i <= MAX_LEVEL; ++i )
+   {
+      level_gsd = level_0_gsd / std::pow( 2.0, i );
+      out << "level[" << std::setw(2) << std::setfill('0') << i << "] mpp:"
+          << std::setw(24) << std::setfill(' ') << level_gsd << "\n";
+   }
+
+   // Reset flags.
+   out.setf(f);
+
+   return out;
+   
+} // End: ossimInfo::printZoomLevelGsds(std::ostream& out)
+
+void ossimInfo::printWriterProps() const
+{
+   printWriterProps(ossimNotify(ossimNotifyLevel_INFO));
+}
+
+std::ostream& ossimInfo::printWriterProps(std::ostream& out) const
+{
+   return ossimImageWriterFactoryRegistry::instance()->printWriterProps( out );
+}
+
+void ossimInfo::getRadiometry(ossimScalarType scalar, std::string& s) const
+{
+   // Output Radiometry.
+   switch(scalar)
+   {
+      case OSSIM_UINT8:
+      {
+         s = "8-bit";
+         break;
+      }
+      case OSSIM_USHORT11:
+      {
+         s = "11-bit";
+         break;
+      }
+      case OSSIM_UINT16:
+      {
+         s = "16-bit unsigned";
+         break;
+      }
+      case OSSIM_SINT16:
+      {
+         s = "16-bit signed";
+         break;
+      }
+      case OSSIM_UINT32:
+      {
+         s = "32-bit unsigned";
+         break;
+      }
+      case OSSIM_SINT32:
+      {
+         s = "32-bit signed";
+         break;
+      }
+      case OSSIM_FLOAT32:
+      {
+         s = "float";
+         break;
+      }
+      case OSSIM_NORMALIZED_FLOAT:
+      {
+         s = "normalized float";
+         break;
+      }
+      default:
+      {
+         s = "unknown";
+         break;
+      }
+   }
+}
+
+void ossimInfo::getBuildDate(std::string& s) const
+{
+#ifdef OSSIM_BUILD_DATE
+   s = OSSIM_BUILD_DATE;
+#else
+   s = "unknown";
+#endif
+}
+
+void ossimInfo::getRevisionNumber(std::string& s) const
+{
+#ifdef OSSIM_REVISION_NUMBER
+   s = OSSIM_REVISION_NUMBER;
+#else
+   s = "unknown";
+#endif
+}
+
+void ossimInfo::getVersion(std::string& s) const
+{
+#ifdef OSSIM_VERSION
+   s = OSSIM_VERSION;
+#else
+   s = "unknown";
+#endif
+}
+
+void ossimInfo::usage(ossimArgumentParser& ap)
+{
+   // Add global usage options.
+   ossimInit::instance()->addOptions(ap);
+   
+   // Set app name.
+   ap.getApplicationUsage()->setApplicationName(ap.getApplicationName());
+
+   // Add options.
+   addArguments(ap);
+   
+   // Write usage.
+   ap.getApplicationUsage()->write(ossimNotify(ossimNotifyLevel_INFO));
+   
+   ossimNotify(ossimNotifyLevel_INFO)
+      << " examples:\n\n" 
+      << "    ossim-info --version\n"
+      << "    ossim-info -i ./myfile.tif\n"
+      << "      prints out only general image information\n\n"
+      << "    ossim-info -p ./myfile.tif\n"
+      << "      prints out only image projection information\n\n"
+      << "    ossim-info -p -s wge ./myfile.tif\n"
+      << "      prints out only image projection information and shifts to wgs84\n\n"
+      << "    ossim-info -p -i ./myfile.tif\n"
+      << "      prints out both image and projection information\n\n"
+      << "    ossim-info -p -i ./myfile.tif -o ./myfile.geom\n"
+      << "      writes geometry file with both image and projection information\n\n"
+      << "    ossim-info -p -i ./myfile.tif -v -o ./myfile.geom\n"
+      << "      writes geometry file with both image and projection information\n"
+      << "      while overwriting existing .geom file.\n\n"
+      << "    ossim-info -f XML ./myfile.tif\n"
+      << "      prints out image and projection information as an XML document\n\n"
+      << "    ossim-info -d myfile.ntf\n"
+      << "      Dumps all data available, in this case, all nitf tags, from file.\n\n"
+      << "    ossim-info -d a.toc\n"
+      << "      Dumps all data available, in this case, all nitf and rpf tags, from file.\n\n"
+      << "    ossim-info --dno a.toc\n"
+      << "      \"dno\" for \"dump no overviews\" Dumps all data available,\n"
+      << "       in this case, all nitf and rpf tags, from file ignoring overviews.\n\n"
+      << "    ossim-info -d -i -p myfile.ntf\n"
+      << "      Typical usage case, i.e. do a dump of tags and print out image and\n"
+      << "      projection information.\n\n"
+      << std::endl;
+}
+
+void ossimInfo::outputXml( const ossimKeywordlist& kwl ) const
+{
+   ossimXmlDocument document;
+   document.fromKwl( kwl );
+   ossimNotify(ossimNotifyLevel_INFO) << document << std::endl;
+}
+
+void ossimInfo::outputXml( const ossimKeywordlist& kwl, const ossimFilename& file  ) const
+{
+   ossimXmlDocument document;
+   document.fromKwl( kwl );
+   document.write( file );
+}
+
+bool ossimInfo::keyIsTrue( const std::string& key ) const
+{
+   bool result = false;
+   if ( m_kwl.valid() )
+   {
+      std::string value = m_kwl->findKey( key );
+      if ( value.size() )
+      {
+         result = ossimString(value).toBool();
+      }
+   }
+   return result;
+}
+
diff --git a/ossim/src/ossim/util/ossimRpfUtil.cpp b/ossim/src/ossim/util/ossimRpfUtil.cpp
new file mode 100644
index 0000000..df3ede9
--- /dev/null
+++ b/ossim/src/ossim/util/ossimRpfUtil.cpp
@@ -0,0 +1,349 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description:  ossimRpfUtil.cpp
+// 
+// Utility class to stuff with rpf files.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/util/ossimRpfUtil.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/support_data/ossimRpfToc.h>
+#include <ossim/support_data/ossimRpfTocEntry.h>
+#include <ctime>
+#include <iomanip>
+
+static ossimTrace traceDebug = ossimTrace("ossimRpfUtil:debug");
+
+ossimRpfUtil::ossimRpfUtil()
+{
+}
+
+ossimRpfUtil::~ossimRpfUtil()
+{
+}
+
+
+// Note: throws ossimException on error.
+void ossimRpfUtil::writeDotRpfFiles( const ossimFilename& aDotTocFile,
+                                     const ossimFilename& outputDir )
+{
+   static const char MODULE[] = "ossimRpfUtil::writeDotRpfFiles";
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " entered..."
+         << "\na.toc file:        " << aDotTocFile
+         << "\noutput directory:  " << outputDir
+         << "\n";
+   }
+   
+   // Parse the a.toc file:
+   ossimRefPtr<ossimRpfToc> toc = new ossimRpfToc();
+   
+   if ( toc->parseFile(aDotTocFile) != ossimErrorCodes::OSSIM_OK )
+   {
+      std::string e = MODULE;
+      e += " ERROR:\nCould not open: ";
+      e+= aDotTocFile.string();
+      throw ossimException(e);
+   }
+
+   if ( outputDir.expand().exists() == false )
+   {
+      if ( !outputDir.createDirectory(true, 0775) )
+      {
+         std::string e = MODULE;
+         e += " ERROR:\nCould not create directory: ";
+         e+= outputDir.c_str();
+         throw ossimException(e);
+      }
+   }
+
+   //---
+   // Go through the entries...
+   //---
+   ossim_uint32 entries = toc->getNumberOfEntries();
+   for (ossim_uint32 entry = 0; entry < entries; ++entry)
+   {
+      const ossimRpfTocEntry* tocEntry = toc->getTocEntry(entry);
+      if (tocEntry)
+      {
+         if ( tocEntry->isEmpty() == false )
+         {
+            writeDotRpfFile(toc.get(), tocEntry, outputDir, entry);
+         }
+      }
+      else
+      {
+         std::string e = MODULE;
+         e += " ERROR:  Null entry: ";
+         e += ossimString::toString(entry).string();
+         throw ossimException(e);
+      }
+   }
+   
+} // End: ossimRpfUtil::writeDotRpfFiles
+
+//---
+// Writer a dot rpf file for entry to output directory.
+// 
+// NOTES:
+//
+// 1) All coordinate written out in AREA or edge to edge format.
+// 2) Throws ossimException on error.
+//---
+void ossimRpfUtil::writeDotRpfFile( const ossimRpfToc* toc,
+                                    const ossimRpfTocEntry* tocEntry,
+                                    const ossimFilename& outputDir,
+                                    ossim_uint32 entry)
+{
+   static const char MODULE[] = "ossimRpfUtil::writeDotRpfFile";
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << MODULE << " entered..."
+         << "\noutput directory:  " << outputDir
+         << "\nentry: " << entry << "\n";
+   }
+
+   if ( !toc )
+   {
+      std::string errMsg = MODULE;
+      errMsg += " ERROR toc pointer null!";
+      throw ossimException(errMsg);
+   }
+   if ( !tocEntry )
+   {
+      std::string errMsg = MODULE;
+      errMsg += " ERROR toc entry pointer null!";
+      throw ossimException(errMsg);
+   }
+
+   // Get the file name.
+   ossimFilename outFile;
+   if ( outputDir.expand().isDir() )
+   {
+      getDotRfpFilenameForEntry(outputDir, entry, outFile);
+   }
+   else
+   {
+      outFile = outputDir;
+   }
+   
+   // Open the file to write.
+   std::ofstream os;
+   os.open(outFile.c_str(), ios::out);
+   if ( os.good() == false )
+   {
+      std::string errMsg = MODULE;
+      errMsg += "ERROR could not open: ";
+      errMsg += outFile.string();
+      throw ossimException(errMsg);
+   }
+   
+   // Set up the output stream fix with full precision for ground points.
+   os << setiosflags(std::ios_base::fixed) << setprecision(15);
+   
+   //---
+   // Overall TOC entry bounds:
+   // 
+   // Write the first line which is the bounding box of the entry in the form of:
+   // "89.9850464205332, 23.9892538162654|90.5085823882692, 24.5002602501599|1"
+   //      lr-lon            lr-lat           ul-lon            ul-lat
+   //---
+   ossimRefPtr<ossimImageGeometry> geom = tocEntry->getImageGeometry();
+   if( geom.valid() == false)
+   {
+      std::string errMsg = "ERROR could not get geometry.";
+      errMsg += outFile.string();
+      throw ossimException(errMsg);  
+   }
+
+   // Rectangle in image space.
+   ossimIrect outputRect;
+   tocEntry->getBoundingRect(outputRect);
+
+   // bands:
+   ossim_uint32 bands = tocEntry->getNumberOfBands();
+
+   // scale:
+   ossimDpt scale;
+   tocEntry->getDecimalDegreesPerPixel(scale);
+   ossimDpt halfPix = scale / 2.0;
+
+   ossimGpt llg;
+   ossimGpt urg;
+   geom->localToWorld(outputRect.ur(), urg);
+   geom->localToWorld(outputRect.ll(), llg);
+
+   if ( traceDebug() )
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "outputRect: " << outputRect
+         << "\nbands: " << bands
+         << "\nscale: " << scale
+         << "\nllg:   " << llg
+         << "\nurg:   " << urg
+         << std::endl;
+   }
+
+   // Expand coordinates to edge:
+   llg.lon -= halfPix.x;
+   llg.lat -= halfPix.y;
+   urg.lon += halfPix.x;
+   urg.lat += halfPix.y;
+   
+   // Test for 360 degrees apart.
+   checkLongitude(llg, urg);
+   
+   os << llg.lon << "," // lower left longitude
+      << llg.lat << "|" // lower left latitude
+      << urg.lon << "," // upper right longitude
+      << urg.lat << "|" // upper right latitude
+      << bands << "\n";
+
+   // Frame loop:
+   const ossim_int32 FRAMESIZE = 1536;
+   const ossim_int32 ROWS = static_cast<ossim_int32>(tocEntry->getNumberOfFramesVertical());
+   if( ROWS == 0 )
+   {
+      std::string errMsg = MODULE;
+      errMsg += " ERROR no rows!";
+      throw ossimException(errMsg);  
+   }
+   const ossim_int32 COLS = static_cast<ossim_int32>(tocEntry->getNumberOfFramesHorizontal());
+   if( COLS == 0 )
+   {
+      std::string errMsg = MODULE;
+      errMsg += " ERROR no columns!";
+      throw ossimException(errMsg);  
+   }
+
+   // Set the initial lower left and upper right image points for localToWorld call.
+   //ossimDpt urd( ( (ROWS-1)*FRAMESIZE) -1, 0.0);
+   //ossimDpt lld(0.0, (ROWS*FRAMESIZE)-1);
+   ossimDpt urd( FRAMESIZE-1, 0.0);
+   ossimDpt lld(0.0, FRAMESIZE-1);
+   
+   for (ossim_int32 row = ROWS-1; row > -1; --row)
+   {
+      for (ossim_int32 col = 0; col < COLS; ++col)
+      {
+         //---
+         // Example format (only with 15 digit precision):
+         // /data/spadac/rpf/world/cb01/ng467a1/0xslpk1a.i41|90.0448,24.3621|90.0598,24.3750
+         //---
+         
+         // Get the path to the frame.
+         ossimFilename path;
+         toc->getRootDirectory(path);
+         
+         path = path.dirCat( toc->getRelativeFramePath(entry, row, col) );
+
+         // Not sure if this is backwards:
+         geom->localToWorld(urd, urg);
+         geom->localToWorld(lld, llg);
+
+         // Expand coordinates to edge:
+         llg.lon -= halfPix.x;
+         llg.lat -= halfPix.y;
+         urg.lon += halfPix.x;
+         urg.lat += halfPix.y;
+         
+         // Test for 360 degrees apart.
+         checkLongitude(llg, urg);
+
+         os << path.c_str() << "|"
+            << llg.lon << "," // lower left longitude
+            << llg.lat << "|" // lower left latitude
+            << urg.lon << "," // upper right longitude
+            << urg.lat        // upper right latitude
+            << "\n";
+
+         if ( traceDebug() )
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "row[" << row << "]col[" << col << "]path: " << path
+               << "\nlld: " << lld
+               << "\nllg: " << llg
+               << "\nurd: " << urd
+               << "\nurg: " << urg
+               << std::endl;
+         }
+
+         // Go to next col.
+         urd.x += FRAMESIZE;
+         lld.x += FRAMESIZE;
+            
+      } // End column loop.
+
+      // Go to nex row.
+      urd.y += FRAMESIZE;
+      urd.x = FRAMESIZE-1;
+      lld.y += FRAMESIZE;
+      lld.x = 0;
+      
+   } // End row loop.
+
+   // Close the file.
+   os.close();
+
+   ossimNotify(ossimNotifyLevel_DEBUG) << "wrote file: " << outFile << std::endl;
+   
+} // End: ossimRpfUtil::writeDotRpfFile
+
+void ossimRpfUtil::checkLongitude(ossimGpt& left, ossimGpt& right) const
+{
+   //---
+   // Test for scene coordinates being 180 to 180 (360 degree spread) and
+   // adjust leftLon to -180 if so.
+   //
+   // NOTE:
+   // Setting tolerance to 1/7200 about 15 meters.
+   // Not sure if this is too loose or not. (drb)
+   //---
+   const ossim_float64 TOLERANCE = 0.000138889; // 1/7200 about 15 meters.
+
+   if ( ossim::almostEqual(left.lon, 180.0, TOLERANCE) )
+   {
+      if ( ossim::almostEqual(right.lon, 180.0, TOLERANCE) )
+      {
+         left.lon = -180.0;
+         right.lon = 180.0;
+      }
+   }
+}
+
+void ossimRpfUtil::getDotRfpFilenameForEntry(const ossimFilename& outputDir,
+                                             ossim_uint32 entry,
+                                             ossimFilename& outFile) const
+{
+   // Get the build date in the format of (yyyymmddhhmmss).
+   char s[15];
+   s[14] = '\0';
+   time_t t;
+   time(&t);
+   tm* lt = localtime(&t);
+   strftime(s, 15, "%Y%m%d%H%M%S", lt);
+   std::string date = s;
+   
+   outFile = outputDir.dirCat(s);
+   outFile += "_e";
+   outFile += ossimString::toString(entry);
+   outFile += ".rpf";
+}
+
diff --git a/ossim/src/ossim/util/ossimSlopeUtil.cpp b/ossim/src/ossim/util/ossimSlopeUtil.cpp
new file mode 100644
index 0000000..d846618
--- /dev/null
+++ b/ossim/src/ossim/util/ossimSlopeUtil.cpp
@@ -0,0 +1,374 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Oscar Kramer
+//
+//*******************************************************************
+//  $Id: ossimSlopeUtil.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/util/ossimSlopeUtil.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/base/ossimGrect.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/elevation/ossimElevManager.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/projection/ossimImageViewProjectionTransform.h>
+#include <ossim/imaging/ossimSlopeFilter.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <ossim/imaging/ossimTiffWriter.h>
+#include <ossim/imaging/ossimIndexToRgbLutFilter.h>
+#include <ossim/imaging/ossimScalarRemapper.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageRenderer.h>
+#include <ossim/imaging/ossimImageMosaic.h>
+#include <iostream>
+
+using namespace std;
+
+ossimSlopeUtil::ossimSlopeUtil()
+:  m_aoiRadius(0),
+   m_remapToByte(false)
+{
+   m_centerGpt.makeNan();
+}
+
+ossimSlopeUtil::~ossimSlopeUtil()
+{
+}
+
+void ossimSlopeUtil::usage(ossimArgumentParser& ap)
+{
+   // Add global usage options.
+   ossimInit::instance()->addOptions(ap);
+
+   // Add options.
+   addArguments(ap);
+
+   // Write usage.
+   ap.getApplicationUsage()->write(ossimNotify(ossimNotifyLevel_INFO));
+
+   ossimNotify(ossimNotifyLevel_INFO)
+   << "\nUtility for computing the slope at each elevation post and generating "
+   << "a corresponding slope image. The output scalar type is a normalized float with 1.0 = 90 "
+   << "degree angle from the local vertical. Optional 8-bit scalar type is available."
+   << "Examples:\n\n"
+   << "    ossim-slope [options] --dem <input-dem> <output-slope-image-file>\n"
+   << "    ossim-slope [options] --center <lat> <lon> --roi <meters> <output-slope-image-file>\n"
+   << std::endl;
+}
+
+void ossimSlopeUtil::addArguments(ossimArgumentParser& ap)
+{
+   // Set the general usage:
+   ossimApplicationUsage* au = ap.getApplicationUsage();
+   ossimString usageString = ap.getApplicationName();
+   usageString += " [options] <output-image>";
+   au->setCommandLineUsage(usageString);
+
+   // Set the command line options:
+   au->addCommandLineOption(
+         "--center <lat> <lon>",
+         "The center position of the output product. Required if no input DEM is specified.");
+   au->addCommandLineOption(
+         "--dem <filename>",
+         "Specifies the input DEM filename. If none provided, the elevation database is referenced "
+         "as specified in prefs file for the center and ROI specified.");
+   au->addCommandLineOption(
+         "--remap",
+         "The range of slope angle (0.0 to 90.0) is remapped to 0-255 (one byte/pixel)");
+   au->addCommandLineOption(
+         "--lut <filename>",
+         "Specifies the optional lookup table filename for mapping the single-band output "
+         "image to an RGB. The LUT provided must be in the ossimIndexToRgbLutFilter format "
+         "and should accomodate the output pixel range. This option forces remap to 8-bit, "
+         "0-255 where 255 = 90 deg slope");
+   au->addCommandLineOption(
+         "--request-api",
+         "Causes applications API to be output as JSON to stdout. Accepts optional filename "
+         "to store JSON output.");
+   au->addCommandLineOption(
+         "--roi <meters>",
+         "radius of interest surrounding the center point. If absent, the product defaults to "
+         "1024 x 1024 pixels, with a radius of 512 * GSD. Alternatively, if a DEM file is "
+         "specified, the product ROI defaults to the full DEM coverage.");
+}
+
+bool ossimSlopeUtil::initialize(ossimArgumentParser& ap)
+{
+   if ( (ap.argc() == 1) || ap.read("-h") || ap.read("--help") )
+   {
+      usage(ap);
+      return false;
+   }
+
+   std::string ts1;
+   ossimArgumentParser::ossimParameter sp1(ts1);
+   std::string ts2;
+   ossimArgumentParser::ossimParameter sp2(ts2);
+
+   if (ap.read("--center", sp1, sp2))
+   {
+      m_centerGpt.lat = ossimString(ts1).toDouble();
+      m_centerGpt.lon = ossimString(ts2).toDouble();
+      m_centerGpt.hgt = 0.0;
+   }
+
+   if (ap.read("--dem", sp1))
+      m_demFile = ts1;
+
+   if ( ap.read("--remap"))
+   {
+      m_remapToByte = true;
+   }
+
+   if ( ap.read("--lut", sp1) )
+      m_lutFile = ts1;
+
+   if ( ap.read("--request-api", sp1))
+   {
+      ofstream ofs ( ts1.c_str() );
+      printApiJson(ofs);
+      ofs.close();
+      return false;
+   }
+   if ( ap.read("--request-api"))
+   {
+      printApiJson(cout);
+      return false;
+   }
+
+   if (ap.read("--roi", sp1))
+      m_aoiRadius = ossimString(ts1).toDouble();
+
+   if (m_demFile.empty() && m_centerGpt.hasNans())
+   {
+      ossimNotify(ossimNotifyLevel_WARN)<<"No DEM file nor center point provided. Cannot "
+            <<"compute slope image."<<endl;
+      usage(ap);
+      return false;
+   }
+
+   // There should only be the required command line args left:
+   if (ap.argc() != 2)
+   {
+      usage(ap);
+      return false;
+   }
+
+   m_slopeFile = ap[1];
+
+   return initializeChain();
+}
+
+bool ossimSlopeUtil::initializeChain()
+{
+   // Establish connection to elevation data. Image handler (or combiner) returned in m_procChain:
+   if (!m_demFile.empty())
+   {
+      if (!loadDemFile())
+      return false;
+   }
+   else if (!loadElevDb())
+      return false;
+
+   ossimRefPtr<ossimSlopeFilter> slope_filter = new ossimSlopeFilter(m_procChain.get());
+   slope_filter->setSlopeType(ossimSlopeFilter::NORMALIZED);
+   m_procChain = slope_filter.get();
+
+   // If remap to one byte per pixel selected, insert remapper here:
+   if (m_remapToByte || !m_lutFile.empty())
+   {
+      ossimRefPtr<ossimScalarRemapper> sr = new ossimScalarRemapper;
+      sr->connectMyInputTo(0, m_procChain.get());
+      m_procChain = sr.get();
+      sr->setOutputScalarType(OSSIM_UINT8);
+   }
+
+   // If LUT remap requested, insert here in the chain:
+   if (!m_lutFile.empty())
+   {
+      if (m_lutFile.isReadable())
+      {
+         ossimRefPtr<ossimIndexToRgbLutFilter> lut = new ossimIndexToRgbLutFilter;
+         lut->connectMyInputTo(0, m_procChain.get());
+         m_procChain = lut.get();
+         lut->setLut(m_lutFile);
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)<<"The LUT file specified, <"<<m_lutFile<<"> is "
+               "not readbale. The LUT remap will be ignored."<<endl;
+      }
+   }
+
+   m_procChain->initialize();
+   return true;
+}
+
+bool ossimSlopeUtil::loadDemFile()
+{
+   m_procChain = ossimImageHandlerRegistry::instance()->open(m_demFile, true, false);
+   if (!m_procChain.valid())
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "Could not open DEM file at <"<<m_demFile
+            <<">. Aborting..."<<endl;
+      return false;
+   }
+
+   return true;
+}
+
+bool ossimSlopeUtil::loadElevDb()
+{
+   // Determine if default GSD needs to be computed. Query for target H so as to autoload cell:
+   ossimElevManager* elevMgr = ossimElevManager::instance();
+   elevMgr->getHeightAboveEllipsoid(m_centerGpt);
+   double gsd = elevMgr->getMeanSpacingMeters();
+   if (ossim::isnan(gsd))
+   {
+      ossimNotify(ossimNotifyLevel_FATAL) << "Could not establish DEM GSD at center point "
+            <<m_centerGpt<<". Verify that the elevation database provides coverage at this "
+            <<"location."<<endl;
+      return false;
+   }
+
+   // Establish output radius if not provided:
+   ossimIrect viewRect(0, 0, 1023, 1023);
+   if (m_aoiRadius == 0)
+   {
+      // The radius of interest can default given a GSD to achieve a specific output image size.
+      m_aoiRadius = (viewRect.size().x + viewRect.size().y -2) * gsd / 4.0;
+   }
+
+   // Establish ground-space AOI rectangle:
+   ossimDpt metersPerDeg (m_centerGpt.metersPerDegree());
+   double dlat = m_aoiRadius/metersPerDeg.y;
+   double dlon = m_aoiRadius/metersPerDeg.x;
+   ossimGrect gndRect (m_centerGpt.lat + dlat, m_centerGpt.lon - dlon,
+                       m_centerGpt.lat - dlat, m_centerGpt.lon + dlon);
+
+   // Query elevation manager for cells providing needed coverage:
+   std::vector<std::string> cells;
+   elevMgr->getCellsForBounds(gndRect, cells);
+
+   // Open a raster image for each elevation source being considered:
+   ossimConnectableObject::ConnectableObjectList elevChains;
+   std::vector<std::string>::iterator fname_iter = cells.begin();
+   while (fname_iter != cells.end())
+   {
+      ossimRefPtr<ossimImageHandler> dem =
+            ossimImageHandlerRegistry::instance()->open(*fname_iter);
+      if (!dem.valid())
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+              << "ossimHLZUtil::initElevSources() ERR: Cannot open DEM file at <"
+              <<*fname_iter<<">\n"<< std::endl;
+         return false;
+      }
+
+      elevChains.push_back(dem.get());
+      ++fname_iter;
+   }
+
+   // Establish the output image's projection geometry:
+   ossimRefPtr<ossimEquDistCylProjection> mapProj = new ossimEquDistCylProjection();
+   mapProj->setOrigin(m_centerGpt);
+   mapProj->setMetersPerPixel(ossimDpt(gsd, gsd));
+   ossimDpt degPerPixel(mapProj->getDecimalDegreesPerPixel());
+   mapProj->setElevationLookupFlag(false);
+   mapProj->setUlTiePoints(gndRect.ul());
+   ossimRefPtr<ossimImageGeometry> productGeom = new ossimImageGeometry(0, mapProj.get());
+   ossimDpt viewPt;
+   productGeom->worldToLocal(gndRect.ul(), viewPt);
+   viewRect.set_ulx(ossim::round<ossim_int32, double>(viewPt.x));
+   viewRect.set_uly(ossim::round<ossim_int32, double>(viewPt.y));
+   productGeom->worldToLocal(gndRect.lr(), viewPt);
+   viewRect.set_lrx(ossim::round<ossim_int32, double>(viewPt.x));
+   viewRect.set_lry(ossim::round<ossim_int32, double>(viewPt.y));
+   ossimIpt image_size(viewRect.width(), viewRect.height());
+   productGeom->setImageSize(image_size);
+
+   // Now loop to add a renderer to each input cell to insure common output projection:
+   ossimConnectableObject::ConnectableObjectList::iterator cell_iter = elevChains.begin();
+   while (cell_iter != elevChains.end())
+   {
+      ossimImageSource* chain = (ossimImageSource*) cell_iter->get();
+      ossimRefPtr<ossimImageViewProjectionTransform> ivt = new ossimImageViewProjectionTransform(
+            chain->getImageGeometry().get(), productGeom.get());
+
+      chain = new ossimImageRenderer(chain, ivt.get());
+      chain->initialize();
+      *cell_iter = chain;
+      ++cell_iter;
+   }
+
+   // Finally create the combiner:
+   m_procChain = new ossimImageMosaic(elevChains);
+   return true;
+}
+
+bool ossimSlopeUtil::execute()
+{
+   if (!m_procChain.valid())
+   {
+      if (!initializeChain())
+         return false;
+   }
+
+   // Set up the writer:
+   bool all_good = false;
+
+   ossimRefPtr<ossimTiffWriter> tif_writer =  new ossimTiffWriter();
+   tif_writer->setGeotiffFlag(true);
+
+   tif_writer->setFilename(m_slopeFile);
+   if (tif_writer.valid())
+   {
+      tif_writer->connectMyInputTo(0, m_procChain.get());
+      ossimIrect viewRect;
+      m_procChain->getImageGeometry()->getBoundingRect(viewRect);
+      tif_writer->setAreaOfInterest(viewRect);
+
+      all_good = tif_writer->execute();
+      if (all_good)
+         ossimNotify(ossimNotifyLevel_INFO)<<"Output written to <"<<m_slopeFile<<">"<<endl;
+      else
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)<<"Error encountered writing out slope image to <"
+               <<m_slopeFile<<">."<<endl;
+      }
+   }
+
+   return all_good;
+}
+
+
+void ossimSlopeUtil::printApiJson(ostream& out) const
+{
+   ossimFilename json_path (ossimPreferences::instance()->findPreference("ossim_share_directory"));
+   json_path += "/ossim/util/ossimSlopeApi.json";
+   if (json_path.isReadable())
+   {
+      char line[256];
+      ifstream ifs (json_path.chars());
+      ifs.getline(line, 256);
+
+       while (ifs.good())
+       {
+         out << line << endl;
+         ifs.getline(line, 256);
+       }
+
+       ifs.close();
+   }
+}
+
diff --git a/ossim/src/ossim/util/ossimViewshedUtil.cpp b/ossim/src/ossim/util/ossimViewshedUtil.cpp
new file mode 100644
index 0000000..1373e39
--- /dev/null
+++ b/ossim/src/ossim/util/ossimViewshedUtil.cpp
@@ -0,0 +1,873 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License: MIT
+//
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  Oscar Kramer
+//
+//*******************************************************************
+//  $Id: ossimViewshedUtil.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/util/ossimViewshedUtil.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimPolygon.h>
+#include <ossim/base/ossimRtti.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossim2dTo2dShiftTransform.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimPreferences.h>
+#include <ossim/elevation/ossimElevManager.h>
+#include <ossim/elevation/ossimImageElevationDatabase.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimTiffWriter.h>
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <ossim/imaging/ossimMemoryImageSource.h>
+#include <ossim/imaging/ossimIndexToRgbLutFilter.h>
+
+ossimViewshedUtil::ossimViewshedUtil()
+:   m_obsHgtAbvTer (1.5),
+    m_visRadius (0.0),
+    m_radials (0),
+    m_initialized (false),
+    m_halfWindow (0),
+    m_outBuffer (NULL),
+    m_gsd (0),
+    m_visibleValue (0),
+    m_hiddenValue (128),
+    m_observerValue (255),
+    m_reticleSize(2),
+    m_simulation (false),
+    m_numThreads(0),
+    m_outputSummary(false),
+    m_startFov(0),
+    m_stopFov(0),
+    m_threadBySector(false),
+    d_accumT(0)
+{
+   m_observerGpt.makeNan();
+}
+
+ossimViewshedUtil::~ossimViewshedUtil()
+{
+   for (int i=0; i<4; ++i)
+      delete [] m_radials[i];
+   delete [] m_radials;
+}
+
+void ossimViewshedUtil::usage(ossimArgumentParser& ap)
+{
+   // Add global usage options.
+   ossimInit::instance()->addOptions(ap);
+
+   // Add options.
+   addArguments(ap);
+
+   // Write usage.
+   ap.getApplicationUsage()->write(ossimNotify(ossimNotifyLevel_INFO));
+
+   ossimNotify(ossimNotifyLevel_INFO)
+   <<"\nComputes the viewshed for the given viewpt coordinates. The output is a binary image "
+   << "with 0 representing hidden points, and 1 representing visible points.\n\n"
+   << "Examples:\n\n"
+   << "    ossim-viewshed --radius 50  28.0 -80.5 output-hlz.tif\n"
+   << "    ossim-viewshed --size 1024  28.0 -80.5 output-hlz.tif\n\n"
+   << "An alternate command line provides switch for observer lat and lon:\n\n"
+   << "    ossim-viewshed --rlz 25 --observer 28.0 -80.5  output-hlz.tif \n"
+   << std::endl;
+}
+
+void ossimViewshedUtil::addArguments(ossimArgumentParser& ap)
+{
+   // Set the general usage:
+   ossimApplicationUsage* au = ap.getApplicationUsage();
+   ossimString usageString = ap.getApplicationName();
+   usageString += " [options] <obs_lat> <obs_lon> <output-image>";
+   au->setCommandLineUsage(usageString);
+
+   // Set the command line options:
+   au->addCommandLineOption(
+         "--fov <start> <end>",
+         "Optional arguments specifying the field-of"
+         "-view boundary azimuths (in degrees). By default, a 360 deg FOV is"
+         " computed. The arc is taken clockwise from start to end, so for a"
+         " FOV of 225 deg from W, through N to SE, start=270 and end=135");
+   au->addCommandLineOption(
+         "--gsd <meters>",
+         "Specifies output GSD in meters. Defaults to the same "
+         "resolution as input DEM.");
+   au->addCommandLineOption(
+         "--hgt-of-eye <meters>",
+         "Specifies the observers height-of-eye above the "
+         "terrain in meters. Defaults to 1.5 m.");
+   au->addCommandLineOption(
+         "--horizon <filename>",
+         "Experimental. Outputs the max elevation angles "
+         "for all azimuths to <filename>, for horizon profiling.");
+   au->addCommandLineOption(
+         "--dem <filename>",
+         "Specifies the input DEM filename. If none "
+         "provided, the elevation database is referenced as specified in prefs file");
+   au->addCommandLineOption(
+         "--lut <filename>",
+         "Specifies the optional lookup table filename for "
+         "mapping the single-band output image to an RGB. The LUT provided must be "
+         "in the ossimIndexToRgbLutFilter format and must handle the three output "
+         "viewshed values (see --values option).");
+   au->addCommandLineOption(
+         "--radius <meters>",
+         "Specifies max visibility in meters. Required "
+         "unless --size is specified. This option constrains output to a circle, "
+         "similar to a radar display");
+   au->addCommandLineOption(
+         "--request-api",
+         "Causes applications API to be output as JSON to stdout."
+         " Accepts optional filename to store JSON output.");
+   au->addCommandLineOption(
+         "--reticle <int>",
+         "Specifies the size of the reticle at the observer"
+         "location in pixels from the center (i.e., the radius of the reticle). "
+         "Defaults to 2. A value of 0 hides the reticle. See --values option for "
+         "setting reticle color.");
+   au->addCommandLineOption(
+         "--simulation",
+         "For engineering/debug purposes ");
+   au->addCommandLineOption(
+         "--size <int>",
+         "Instead of a visibility radius, directly specifies "
+         "the dimensions of the output product in pixels (output is "
+         "square). Required unless --radius is specified.");
+   au->addCommandLineOption(
+         "--summary",
+         "Causes a product summary to be output to the console.");
+   au->addCommandLineOption(
+         "--tbs",
+         "\"Thread By Sector\". For engineering/debug purposes ");
+   au->addCommandLineOption(
+         "--threads <n>",
+         "Number of threads. Defaults to use all available cores. "
+         "For engineering/debug purposes ");
+   au->addCommandLineOption(
+         "--values <int int int>",
+         "Specifies the pixel values (0-255) for the visible,"
+         " hidden and reticle pixels, respectively. Defaults to visible=null (0), "
+         "hidden=128, and observer position reticle is highlighted with 255.");
+}
+
+bool ossimViewshedUtil::initialize(ossimArgumentParser& ap)
+{
+   if ( (ap.argc() == 1) || ap.read("-h") || ap.read("--help") )
+   {
+      usage(ap);
+      return false;
+   }
+
+   std::string ts1;
+   ossimArgumentParser::ossimParameter sp1(ts1);
+   std::string ts2;
+   ossimArgumentParser::ossimParameter sp2(ts2);
+   std::string ts3;
+   ossimArgumentParser::ossimParameter sp3(ts3);
+
+   if ( ap.read("--dem", sp1) )
+      m_demFile = ts1;
+
+   if ( ap.read("--fov", sp1, sp2) )
+   {
+      m_startFov = ossimString(ts1).toDouble();
+      m_stopFov = ossimString(ts2).toDouble();
+      if (m_startFov < 0)
+         m_startFov += 360.0;
+   }
+
+   if ( ap.read("--gsd", sp1) )
+      m_gsd = ossimString(ts1).toDouble();
+
+   if ( ap.read("--hgt-of-eye", sp1) )
+      m_obsHgtAbvTer = ossimString(ts1).toDouble();
+
+   if ( ap.read("--horizon", sp1) )
+      m_horizonFile = ossimString(ts1);
+
+   if ( ap.read("--lut", sp1) )
+      m_lutFile = ts1;
+
+   if ( ap.read("--observer", sp1, sp2) )
+   {
+      m_observerGpt.lat = ossimString(ts1).toDouble();
+      m_observerGpt.lon = ossimString(ts2).toDouble();
+      m_observerGpt.hgt = 0.0;
+   }
+
+   if ( ap.read("--radius", sp1) )
+      m_visRadius = ossimString(ts1).toDouble();
+
+   if ( ap.read("--request-api", sp1))
+   {
+      ofstream ofs ( ts1.c_str() );
+      printApiJson(ofs);
+      ofs.close();
+      return false;
+   }
+   if ( ap.read("--request-api"))
+   {
+      printApiJson(cout);
+      return false;
+   }
+   if ( ap.read("--reticle", sp1) )
+      m_reticleSize = ossimString(ts1).toInt32();
+
+   if ( ap.read("--tbs") )
+      m_threadBySector = true;
+
+   if ( ap.read("--simulation") )
+      m_simulation = true;
+
+   if ( ap.read("--summary") )
+      m_outputSummary = true;
+
+   if ( ap.read("--size", sp1) )
+      m_halfWindow = ossimString(ts1).toUInt32() / 2;
+
+   if ( ap.read("--threads", sp1) )
+      m_numThreads = ossimString(ts1).toUInt32();
+
+   if ( ap.read("--values", sp1, sp2, sp3) )
+   {
+      m_visibleValue = ossimString(ts1).toUInt8();
+      m_hiddenValue = ossimString(ts2).toUInt8();
+      m_observerValue = ossimString(ts3).toUInt8();
+   }
+
+   // There should only be the required command line args left:
+   if ( (m_observerGpt.hasNans() && (ap.argc() != 4)) ||
+        (!m_observerGpt.hasNans() && (ap.argc() != 2)) )
+   {
+      usage(ap);
+      return false;
+   }
+
+   // Verify minimum required args were specified:
+   if (m_demFile.empty() && (m_visRadius == 0) && (m_halfWindow == 0))
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+                  << "ossimViewshedUtil::initialize ERR: Command line is underspecified."
+                  << std::endl;
+      usage(ap);
+      return false;
+   }
+   // Parse the required command line params:
+   int ap_idx = 1;
+   if (m_observerGpt.hasNans())
+   {
+      m_observerGpt.lat =  ossimString(ap[1]).toDouble();
+      m_observerGpt.lon =  ossimString(ap[2]).toDouble();
+      m_observerGpt.hgt =  0;
+      ap_idx = 3;
+   }
+   m_filename = ap[ap_idx];
+
+   return initialize();
+}
+
+bool ossimViewshedUtil::initialize()
+{
+   if (m_observerGpt.hasNans())
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+                  << "ossimViewshedUtil::initialize ERR: Observer ground position has not been set."
+                  << std::endl;
+      return false;
+   }
+
+   ossimElevManager* elevMgr = ossimElevManager::instance();
+
+   // If DEM provided as file on command line, reset the elev manager to use only this:
+   if (!m_demFile.empty())
+   {
+      elevMgr->clear();
+      ossimRefPtr<ossimImageElevationDatabase> ied = new ossimImageElevationDatabase;
+      if(!ied->open(m_demFile))
+      {
+         ossimNotify(ossimNotifyLevel_WARN)
+                     << "ossimViewshedUtil::initialize ERR: Cannot open DEM file at <"<<m_demFile<<">\n"
+                     << std::endl;
+         return false;
+      }
+
+      if (m_simulation)
+         ied->setGeoid(new ossimIdentityGeoid);
+
+      elevMgr->addDatabase(ied.get());
+
+      // Possibly the image size has not been specified, in which case we use the same dimensions
+      // as the input dem:
+      if (((m_halfWindow == 0) && (m_visRadius == 0)) || (m_gsd == 0))
+      {
+
+         ossimRefPtr<ossimImageHandler> dem = ossimImageHandlerRegistry::instance()->open(m_demFile);
+         if (!dem.valid())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+                        << "ossimViewshedUtil::initialize ERR: Cannot open DEM file at <"<<m_demFile<<">\n"
+                        << std::endl;
+            return false;
+         }
+         ossimRefPtr<ossimImageGeometry> geom = dem->getImageGeometry();
+         if (!geom.valid())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+                        << "ossimViewshedUtil::initialize ERR: Could not establish geometry of DEM file at <"<<m_demFile<<">\n"
+                        << std::endl;
+            return false;
+         }
+
+         // Hack workaround for ossimElevManager::getMeanSpacingMeters() returning 0 when DEM file
+         // specified:
+         if (m_gsd == 0)
+         {
+            ossimDpt gsd = geom->getMetersPerPixel();
+            m_gsd = (gsd.x + gsd.y)/2.0;
+         }
+         if ((m_halfWindow == 0) && (m_visRadius == 0))
+         {
+            ossimIpt size = geom->getImageSize();
+            m_halfWindow = (size.x + size.y) / 4;
+         }
+      }
+
+      // When DEM file specified, need to turn off all defaulting to ellipsoid/geoid to make sure
+      // only the DEM file data is processed:
+      elevMgr->setDefaultHeightAboveEllipsoid(ossim::nan());
+      elevMgr->setUseGeoidIfNullFlag(false);
+   }
+
+   if (m_simulation)
+      elevMgr->setEnableFlag(false);
+
+   // Initialize the height of eye component of observer position:
+   m_observerGpt.hgt = ossimElevManager::instance()->getHeightAboveEllipsoid(m_observerGpt);
+   m_observerGpt.hgt += m_obsHgtAbvTer;
+
+   // Determine if default GSD needs to be computed.
+   if (m_gsd == 0)
+   {
+      // This is incorrectly returning 0 when DEM is provided on command line:
+      m_gsd = ossimElevManager::instance()->getMeanSpacingMeters();
+      if (ossim::isnan(m_gsd))
+         m_gsd = 0;
+   }
+
+   // Compute the bounding rect in pixel space given the visibility range and the GSD:
+   if ((m_gsd == 0) || ((m_visRadius == 0) && (m_halfWindow == 0)))
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+                  << "ossimViewshedUtil::initialize ERR: GSD, visibility radius or image size have not"
+                  " been set."  << std::endl;
+      return false;
+   }
+   if (m_halfWindow == 0)
+      m_halfWindow = ossim::round<ossim_int32, double>(m_visRadius/m_gsd);
+
+   m_viewRect.set_ulx(-m_halfWindow);
+   m_viewRect.set_uly(-m_halfWindow);
+   m_viewRect.set_lrx(m_halfWindow);
+   m_viewRect.set_lry(m_halfWindow);
+   ossimIpt image_size (m_viewRect.width(), m_viewRect.height());
+
+   // Establish the image geometry's map projection:
+   ossimRefPtr<ossimEquDistCylProjection> mapProj = new ossimEquDistCylProjection();
+   mapProj->setOrigin(m_observerGpt);
+   mapProj->setMetersPerPixel(ossimDpt(m_gsd, m_gsd));
+   ossimDpt degPerPixel (mapProj->getDecimalDegreesPerPixel());
+   mapProj->setElevationLookupFlag(true);
+   ossimGpt ulTiePt (m_observerGpt);
+   ulTiePt.lat += degPerPixel.lat * m_halfWindow;
+   ulTiePt.lon -= degPerPixel.lon * m_halfWindow;
+   mapProj->setUlTiePoints(ulTiePt);
+
+   // Need a transform so that we can use the observer point as the output image origin (0,0):
+   ossimRefPtr<ossim2dTo2dTransform> transform =  new ossim2dTo2dShiftTransform(m_viewRect.lr());
+   m_geometry = new ossimImageGeometry(transform.get(), mapProj.get());
+   m_geometry->setImageSize(image_size);
+
+   // Allocate the output image buffer:
+   m_outBuffer = ossimImageDataFactory::instance()->create(0, OSSIM_UINT8, 1,
+                                                           m_viewRect.width(), m_viewRect.height());
+   if(!m_outBuffer.valid())
+      return false;
+
+   // Initialize the image with all points hidden:
+   m_outBuffer->initialize();
+   m_outBuffer->setImageRectangle(m_viewRect);
+   m_outBuffer->fill(m_visibleValue);
+
+#if 0
+   //### TODO: REMOVE DEBUG BLOCK
+   {
+      ossimDpt viewPt;
+      m_geometry->worldToLocal(m_observerGpt, viewPt);
+      cout<<"ossimViewshedUtil::initialize() should get (0,0)... viewPt="<<viewPt<<endl;
+      ossimGpt testPt(m_observerGpt);
+      testPt.lat -= 100*degPerPixel.y;
+      testPt.lon += 100*degPerPixel.x;
+      m_geometry->worldToLocal(testPt, viewPt);
+      cout<<"ossimViewshedUtil::initialize() should get ~(100,100)... viewPt="<<viewPt<<endl;
+   }
+#endif
+
+   // Initialize the radials:
+   initRadials();
+
+   if (m_outputSummary)
+      dumpProductSummary();
+
+   m_initialized = true;
+   return true;
+}
+
+void ossimViewshedUtil::initRadials()
+{
+   // All eaight sectors' radials have the same azimuths except that the abscissa and ordinate are
+   // reversed between the N-S and E-W sectors, i.e., the N and S sectors use the y-axis as the
+   // abscissa (u) and the x-axis is the ordinate (v). The azimuth (dv/du) is therefore DX/DY for
+   // the north and south, while the azimuth is DY/DX for the east and west sectors. Nevertheless,
+   // each sectors radials must be maintained separately as they contain the max elevation angle.
+
+   // First determine which sectors are involved given the desired FOV:
+   bool* sectorInFov = new bool[8];
+   std::memset(sectorInFov, false, 8);
+   bool crossed_north = true;
+   if (m_stopFov <= m_startFov) // Crosses 0 azimuth
+      crossed_north = false;
+   double azimuth = m_startFov;
+   for (int i=0; (i < 8) && ((azimuth < m_stopFov) || !crossed_north); ++i)
+   {
+      if ((azimuth >= 0) && (azimuth < 45.0))
+         sectorInFov[0] = true;
+      else if (azimuth < 90.0)
+         sectorInFov[1] = true;
+      else if (azimuth < 135.0)
+         sectorInFov[2] = true;
+      else if (azimuth < 180.0)
+         sectorInFov[3] = true;
+      else if (azimuth < 225.0)
+         sectorInFov[4] = true;
+      else if (azimuth < 270.0)
+         sectorInFov[5] = true;
+      else if (azimuth < 315.0)
+         sectorInFov[6] = true;
+      else if (azimuth < 360.0)
+         sectorInFov[7] = true;
+
+      azimuth += 45.0;
+      if (azimuth >= 360.0)
+      {
+         azimuth -= 360.0;
+         crossed_north = true;
+      }
+   }
+
+   // Compute the azimuth slopes for each radial in the sector.
+   m_radials = new Radial* [8];
+   double du = m_halfWindow;
+   for (int sector=0; sector<8; ++sector)
+   {
+      if (!sectorInFov[sector])
+      {
+         m_radials[sector] = 0;
+         continue;
+      }
+
+      ossim_uint32 ridx = 0;
+      m_radials[sector] = new Radial [m_halfWindow+1];
+      for (ossim_int32 dv = 0; dv <= (ossim_int32) m_halfWindow; ++dv)
+      {
+         if (sector & 1) // odd-numbered sector, azimuths computed in reverse order
+            m_radials[sector][m_halfWindow-ridx].azimuth = ((double)dv)/du;
+         else
+            m_radials[sector][ridx].azimuth = ((double)dv)/du;
+         ++ridx;
+      }
+   }
+
+   // Cleanup:
+   delete [] sectorInFov;
+   sectorInFov = 0;
+}
+
+bool ossimViewshedUtil::execute()
+{
+   if (!m_initialized)
+   {
+      initialize();
+      if (!m_initialized)
+         return false;
+   }
+
+   d_accumT = 0;
+   bool success =  false;
+
+   if (m_numThreads == 0)
+      m_numThreads = ossim::getNumberOfThreads();
+
+if (m_numThreads > 1)
+   {
+      ossimRefPtr<ossimJobQueue> jobQueue = new ossimJobQueue();
+      for (int sector=0; sector<8; ++sector)
+      {
+         if (m_radials[sector] == 0)
+            continue;
+
+         if (m_threadBySector)
+         {
+            SectorProcessorJob* job = new SectorProcessorJob(this, sector, m_halfWindow);
+            jobQueue->add(job, false);
+         }
+         else
+         {
+            for (ossim_uint32 r=0; r<=m_halfWindow; ++r)
+            {
+               RadialProcessorJob* job = new RadialProcessorJob(this, sector, r, m_halfWindow);
+               jobQueue->add(job, false);
+            }
+         }
+         if (needsAborting())
+            return false;
+      }
+
+      cout << "\nSubmitting "<<jobQueue->size()<<" jobs..."<<endl;
+      m_jobMtQueue = new ossimJobMultiThreadQueue(jobQueue.get(), m_numThreads);
+
+      // Wait until all radials have been processed before proceeding:
+      cout << "Waiting for job threads to finish..."<<endl;
+      while (m_jobMtQueue->hasJobsToProcess() || m_jobMtQueue->numberOfBusyThreads())
+         OpenThreads::Thread::microSleep(250);
+   }
+   else
+   {
+      // Unthreaded processing:
+      cout << "\nProcessing radials (non-threaded)..."<<endl;
+
+      // Loop over pixels in layer for each sector:
+      for (int sector=0; sector<8; ++sector)
+      {
+         if (m_radials[sector] == 0)
+            continue;
+
+         SectorProcessorJob spj (this, sector, m_halfWindow);
+         spj.start();
+
+         if (needsAborting())
+            return false;
+
+      } // end loop over sectors
+   }
+
+   cout << "Finished processing radials."<<endl;
+   paintReticle();
+
+   cout << "Writing output file..." <<endl;
+   success = writeFile();
+
+   if (!m_horizonFile.empty())
+   {
+      cout << "Writing horizon profile output file..." <<endl;
+      success = writeHorizonProfile();
+   }
+
+   cout << "Returning..."<<endl;
+   return success;
+}
+
+void ossimViewshedUtil::paintReticle()
+{
+   // Highlight the observer position with X reticle:
+   if (m_reticleSize > 0)
+   {
+      m_outBuffer->setValue(0, 0, m_observerValue);
+      for (int i=-m_reticleSize; i<=m_reticleSize; ++i)
+      {
+         m_outBuffer->setValue(i, 0, m_observerValue);
+         m_outBuffer->setValue(0,  i, m_observerValue);
+      }
+   }
+
+   if (m_visRadius == 0)
+   {
+      // Also outline the square area of interest:
+      ossim_int32 hw = (ossim_int32) m_halfWindow;
+      for (ossim_int32 u=-hw; u<=hw; ++u)
+      {
+         m_outBuffer->setValue(  u,-hw, m_observerValue);
+         m_outBuffer->setValue(  u, hw, m_observerValue);
+         m_outBuffer->setValue(-hw,  u, m_observerValue);
+         m_outBuffer->setValue( hw,  u, m_observerValue);
+      }
+   }
+}
+
+bool ossimViewshedUtil::writeFile()
+{
+   ossimIrect rect (0, 0, m_viewRect.width()-1, m_viewRect.height()-1);
+   m_outBuffer->setImageRectangle(rect);
+
+   ossimRefPtr<ossimMemoryImageSource> memSource = new ossimMemoryImageSource;
+   memSource->setImage(m_outBuffer);
+   memSource->setImageGeometry(m_geometry.get());
+   ossimImageSource* last_source = memSource.get();
+
+   // See if an LUT is requested:
+   ossimRefPtr<ossimIndexToRgbLutFilter> lutSource = 0;
+   if (!m_lutFile.empty())
+   {
+      ossimKeywordlist lut_kwl;
+      lut_kwl.addFile(m_lutFile);
+      lutSource = new ossimIndexToRgbLutFilter;
+      if (!lutSource->loadState(lut_kwl))
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << "ossimViewshedUtil::writeFile() ERROR: The LUT "
+               "file <"<<m_lutFile<<"> could not be read. Ignoring remap request.\n"<< std::endl;
+         lutSource = 0;
+      }
+      else
+      {
+         lutSource->connectMyInputTo(last_source);
+         lutSource->initialize();
+         last_source = lutSource.get();
+      }
+   }
+
+   // Set up the writer:
+   ossimRefPtr<ossimImageFileWriter> writer = 0;
+   if (m_filename.ext().contains("tif"))
+   {
+      ossimTiffWriter* tif_writer = new ossimTiffWriter();
+      tif_writer->setGeotiffFlag(true);
+      tif_writer->setFilename(m_filename);
+      writer = tif_writer;
+   }
+   else
+   {
+      writer = ossimImageWriterFactoryRegistry::instance()->createWriter(m_filename);
+   }
+   bool success = false;
+   if (writer.valid())
+   {
+      writer->connectMyInputTo(0, last_source);
+      success = writer->execute();
+   }
+
+   return success;
+}
+
+bool ossimViewshedUtil::writeHorizonProfile()
+{
+   // Store the max elevation angles for horizon profiling:
+   double az_deg, arctan;
+   for (ossim_uint32 sector=0; sector<8; ++sector)
+   {
+      if (m_radials[sector] == 0)
+         continue;
+
+      for (ossim_uint32 radial = 0; radial <= m_halfWindow; ++radial)
+      {
+         arctan = ossim::atand(m_radials[sector][radial].azimuth);
+         switch (sector)
+         {
+         case 0: // 0 - 45
+            az_deg = arctan;
+            break;
+         case 1: // 45 - 90
+            az_deg = 90 - arctan;
+            break;
+         case 2: // 90 - 135
+            az_deg = 90 + arctan;
+            break;
+         case 3: // 135 - 180
+            az_deg = 180 - arctan;
+            break;
+         case 4: // 180 - 225
+            az_deg = 180 + arctan;
+            break;
+         case 5: // 225 - 270
+            az_deg = 270 - arctan;
+            break;
+         case 6: // 270 - 315
+            az_deg = 270 + arctan;
+            break;
+         case 7: // 315 - 360
+            az_deg = 360 - arctan;
+            break;
+         default:
+            break;
+         }
+
+         m_horizonMap.insert(pair<double, double>(az_deg, m_radials[sector][radial].elevation));
+      }
+   }
+
+   // Open output file and write the map:
+   ofstream fstr (m_horizonFile.chars());
+   if (!fstr.is_open())
+      return false;
+   std::map<double, double>::iterator iter = m_horizonMap.begin();
+   while (iter != m_horizonMap.end())
+   {
+      fstr << iter->first << ", " << iter->second << endl;
+      ++iter;
+   }
+
+   fstr.close();
+   return true;
+}
+
+void ossimViewshedUtil::dumpProductSummary() const
+{
+   ossimIpt isize (m_geometry->getImageSize());
+   cout  << "\nSummary of Viewshed product image:"
+         << "\n   Output file name: " << m_filename
+         << "\n   Image size: " << isize
+         << "\n   product GSD: " << m_gsd << " m"
+         << "\n   View radius: " << (int) (m_gsd * isize.x/2.0) << " m"
+         << "\n   Scalar type: " << m_outBuffer->getScalarTypeAsString()
+         << endl;
+}
+
+void SectorProcessorJob::start()
+{
+   // Loop over all the sector's radials and walk over each one.
+   for (ossim_uint32 r=0; r<=m_numRadials; ++r)
+      RadialProcessor::doRadial(m_vsUtil, m_sector, r);
+}
+
+
+void RadialProcessorJob::start()
+{
+   RadialProcessor::doRadial(m_vsUtil, m_sector, m_radial);
+}
+
+OpenThreads::ReadWriteMutex RadialProcessor::m_bufMutex;
+OpenThreads::ReadWriteMutex RadialProcessor::m_radMutex;
+
+void RadialProcessor::doRadial(ossimViewshedUtil* vsUtil,
+                               ossim_uint32 sector,
+                               ossim_uint32 radial)
+{
+   double v;
+   ossimDpt pt_i;
+   double elev_i, elev;
+   double r2_max = vsUtil->m_halfWindow*vsUtil->m_halfWindow;
+
+   // Walk along the radial using the appropriate coordinate abscissa for that sector and
+   // compute ordinate using the radials azimuth:
+   for (double u=1.0; u <= (double) vsUtil->m_halfWindow; u += 1.0)
+   {
+      // Compute ordinate from abscissa and slope of this radial:
+      v = vsUtil->m_radials[sector][radial].azimuth*(u);
+      switch (sector)
+      {
+      case 0: // N-NE, (u, v) = (-y, x)
+         pt_i.y = -u;
+         pt_i.x = v;
+         break;
+      case 1: // NE-E, (u, v) = (x, -y)
+         pt_i.x = u;
+         pt_i.y = -v;
+         break;
+      case 2: // E-SE, (u, v) = (x, y)
+         pt_i.x = u;
+         pt_i.y = v;
+         break;
+      case 3: // SE-S, (u, v) = (y, x)
+         pt_i.y = u;
+         pt_i.x = v;
+         break;
+      case 4: // S-SW, (u, v) = (y, -x)
+         pt_i.y = u;
+         pt_i.x = -v;
+         break;
+      case 5: // SW-W, (u, v) = (-x, y)
+         pt_i.x = -u;
+         pt_i.y = v;
+         break;
+      case 6: // W-NW, (u, v) = (-x, -y)
+         pt_i.x = -u;
+         pt_i.y = -v;
+         break;
+      case 7: // NW-N, (u, v) = (-y, -x)
+         pt_i.y = -u;
+         pt_i.x = -v;
+         break;
+      default:
+         break;
+      }
+
+      ossimIpt ipt (ossim::round<ossim_int32,double>(pt_i.x),
+                    ossim::round<ossim_int32,double>(pt_i.y));
+
+      // Check if we passed beyong the visibilty radius, and exit loop if so:
+      if ((vsUtil->m_visRadius > 0) && ((u*u + v*v) >= r2_max))
+      {
+         OpenThreads::ScopedWriteLock lock (m_bufMutex);
+         vsUtil->m_outBuffer->setValue(ipt.x, ipt.y, vsUtil->m_observerValue);
+         break;
+      }
+
+      // Fetch the pixel value as the elevation value and compute elevation angle from
+      // the observer pt as dz/dx
+      ossimGpt gpt_i;
+      vsUtil->m_geometry->localToWorld(pt_i, gpt_i);
+
+      if (vsUtil->m_simulation && ossim::isnan(gpt_i.hgt))
+         gpt_i.hgt = vsUtil->m_observerGpt.hgt-vsUtil->m_obsHgtAbvTer; // ground level
+
+      else if (!gpt_i.hasNans())
+      {
+         // Compare elev angle to max angle latched so far along this radial:
+         elev_i = (gpt_i.hgt - vsUtil->m_observerGpt.hgt) / u;
+         elev = vsUtil->m_radials[sector][radial].elevation;
+         if (elev_i > elev)
+         {
+            // point is visible, latch this line-of-sight as the new max elevation angle for this
+            // radial, and mark the output pixel as visible:
+            //   m_outBuffer->setValue(ossim::round<ossim_int32,double>(pt_i.x),
+            //                           ossim::round<ossim_int32,double>(pt_i.y), m_visibleValue);
+            //OpenThreads::ScopedWriteLock lock (m_radMutex);
+            vsUtil->m_radials[sector][radial].elevation = elev_i;
+         }
+         else
+         {
+            OpenThreads::ScopedWriteLock lock (m_bufMutex);
+            vsUtil->m_outBuffer->setValue(ipt.x, ipt.y, vsUtil->m_hiddenValue);
+         }
+      }
+   } // end loop over radial's abscissas
+}
+
+void ossimViewshedUtil::printApiJson(ostream& out) const
+{
+   ossimFilename json_path (ossimPreferences::instance()->findPreference("ossim_share_directory"));
+   json_path += "/ossim/util/ossimViewshedApi.json";
+   if (json_path.isReadable())
+   {
+      char line[256];
+      ifstream ifs (json_path.chars());
+      ifs.getline(line, 256);
+
+       while (ifs.good())
+       {
+         out << line << endl;
+         ifs.getline(line, 256);
+       }
+
+       ifs.close();
+   }
+}
+
diff --git a/src/ossim/vec/makefile.vc b/ossim/src/ossim/vec/makefile.vc
similarity index 100%
rename from src/ossim/vec/makefile.vc
rename to ossim/src/ossim/vec/makefile.vc
diff --git a/src/ossim/vec/ossimVpfBoundingRecordTable.cpp b/ossim/src/ossim/vec/ossimVpfBoundingRecordTable.cpp
similarity index 100%
rename from src/ossim/vec/ossimVpfBoundingRecordTable.cpp
rename to ossim/src/ossim/vec/ossimVpfBoundingRecordTable.cpp
diff --git a/ossim/src/ossim/vec/ossimVpfCoverage.cpp b/ossim/src/ossim/vec/ossimVpfCoverage.cpp
new file mode 100644
index 0000000..cce3e93
--- /dev/null
+++ b/ossim/src/ossim/vec/ossimVpfCoverage.cpp
@@ -0,0 +1,187 @@
+//*******************************************************************
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+// 
+// Description: This class extends the stl's string class.
+//
+//********************************************************************
+// $Id: ossimVpfCoverage.cpp 23244 2015-04-08 20:48:34Z rashadkm $
+#include <algorithm>
+using namespace std;
+
+#include <ossim/vec/ossimVpfCoverage.h>
+#include <ossim/vec/ossimVpfLibrary.h>
+#include <ossim/vec/ossimVpfFeatureClassSchema.h>
+#include <ossim/vec/ossimVpfBoundingRecordTable.h>
+#include <ossim/base/ossimErrorCodes.h>
+
+ossimVpfCoverage::ossimVpfCoverage()
+   :theLibrary(NULL),
+    theCoverageName(""),
+    theCoverageNameFullPath("")
+{
+}
+
+ossimVpfCoverage::~ossimVpfCoverage()
+{
+   theLibrary = NULL;
+}
+
+bool ossimVpfCoverage::openCoverage(ossimVpfLibrary* library,
+                                    const ossimString& name,
+                                    const ossimFilename& fullPath)
+{
+   bool result = true;
+   theCoverageName         = name;
+   theCoverageNameFullPath = fullPath;
+   theLibrary = library;
+
+   if(!theCoverageNameFullPath.dirCat("fcs").exists())
+   {
+      result = false;
+   }
+   
+   return result;
+}
+
+const ossimFilename& ossimVpfCoverage::getPath()const
+{
+   return theCoverageNameFullPath;
+}
+
+const ossimString& ossimVpfCoverage::getName()const
+{
+   return theCoverageName;
+}
+
+void ossimVpfCoverage::print(ostream& out)const
+{
+  ossimVpfTable table;
+  if(table.openTable(theCoverageNameFullPath.dirCat("fcs")))
+  {
+     table.print(out);
+  }
+}
+
+bool ossimVpfCoverage::getExtent(ossimVpfExtent& extent)const
+{
+   bool result = false;
+   bool firstOneSetFlag = false;
+   ossimVpfExtent resultExtent;
+   ossimVpfExtent tempExtent;
+   if(theLibrary)
+   {
+      if(theCoverageNameFullPath.dirCat("ebr").exists())
+      {
+         ossimVpfBoundingRecordTable boundingRecord;
+         
+         if(boundingRecord.openTable(theCoverageNameFullPath.dirCat("ebr")))
+         {
+            boundingRecord.getExtent(tempExtent);
+	    resultExtent = tempExtent;
+	    firstOneSetFlag = true;
+            result = true;
+         }
+      }
+      if(theCoverageNameFullPath.dirCat("fbr").exists())
+      {
+         ossimVpfBoundingRecordTable boundingRecord;
+         
+         if(boundingRecord.openTable(theCoverageNameFullPath.dirCat("fbr")))
+         {
+            boundingRecord.getExtent(tempExtent);
+            
+            if(!firstOneSetFlag)
+            {
+               resultExtent = tempExtent;
+               firstOneSetFlag = true;
+            }
+            else
+            {
+               resultExtent = resultExtent + tempExtent;
+            }
+            
+            result = true;
+         }
+      }
+      std::vector<ossimString> tileNames;
+      
+      theLibrary->getTileNames(tileNames);
+      
+      for(int i = 0; i < (int)tileNames.size(); ++i)
+      {
+         ossimFilename tileName = tileNames[0];
+         ossimFilename tileDir;
+         if(theCoverageNameFullPath.dirCat(tileName).exists())
+         {
+            tileDir = theCoverageNameFullPath.dirCat(tileName);
+         }
+         else if(theCoverageNameFullPath.dirCat(tileName.downcase()).exists())
+         {
+            tileDir = theCoverageNameFullPath.dirCat(tileName.downcase());
+         }
+         if(tileDir != "")
+         {
+            if(tileDir.dirCat("ebr").exists())
+            {
+               ossimVpfBoundingRecordTable boundingRecord;
+               
+               if(boundingRecord.openTable(tileDir.dirCat("ebr")))
+               {
+                  boundingRecord.getExtent(tempExtent);
+                  
+                  if(!firstOneSetFlag)
+                  {
+                     resultExtent = tempExtent;
+                     firstOneSetFlag = true;
+                  }
+                  else
+                  {
+                     resultExtent = resultExtent + tempExtent;
+                  }
+                  
+                  result = true;
+               }
+            }
+            if(tileDir.dirCat("fbr").exists())
+            {
+               ossimVpfBoundingRecordTable boundingRecord;
+               
+               if(boundingRecord.openTable(tileDir.dirCat("fbr")))
+               {
+                  boundingRecord.getExtent(tempExtent);
+                  
+                  if(!firstOneSetFlag)
+                  {
+                     resultExtent = tempExtent;
+                     firstOneSetFlag = true;
+                  }
+                  else
+                  {
+                     resultExtent = resultExtent + tempExtent;
+                  }
+                  
+                  result = true;
+               }
+            }
+         }
+      }
+   }
+
+   extent = resultExtent;
+   
+   return result;
+}
+
+ossimVpfLibrary* ossimVpfCoverage::getLibrary()
+{
+   return theLibrary;
+}
+
+bool ossimVpfCoverage::openFeatureClassSchema(ossimVpfFeatureClassSchema& schema)
+{
+   if(!schema.isClosed()) schema.closeTable();
+
+   return schema.openSchema(this);
+}
diff --git a/src/ossim/vec/ossimVpfDatabase.cpp b/ossim/src/ossim/vec/ossimVpfDatabase.cpp
similarity index 100%
rename from src/ossim/vec/ossimVpfDatabase.cpp
rename to ossim/src/ossim/vec/ossimVpfDatabase.cpp
diff --git a/src/ossim/vec/ossimVpfDatabaseHeader.cpp b/ossim/src/ossim/vec/ossimVpfDatabaseHeader.cpp
similarity index 100%
rename from src/ossim/vec/ossimVpfDatabaseHeader.cpp
rename to ossim/src/ossim/vec/ossimVpfDatabaseHeader.cpp
diff --git a/ossim/src/ossim/vec/ossimVpfDatabaseHeaderTableValidator.cpp b/ossim/src/ossim/vec/ossimVpfDatabaseHeaderTableValidator.cpp
new file mode 100644
index 0000000..b49df27
--- /dev/null
+++ b/ossim/src/ossim/vec/ossimVpfDatabaseHeaderTableValidator.cpp
@@ -0,0 +1,133 @@
+//-----------------------------------------------------------------
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//-----------------------------------------------------------------
+#include <ossim/vec/ossimVpfDatabaseHeaderTableValidator.h>
+#include <ossim/vec/ossimVpfTable.h>
+
+ossimVpfDatabaseHeaderTableValidator::~ossimVpfDatabaseHeaderTableValidator()
+{
+}
+
+bool ossimVpfDatabaseHeaderTableValidator::isValid(ossimVpfTable& aTable)const
+{
+   // make sure the table is not null
+   if(&aTable == NULL)
+   {
+      return false;
+   }
+
+   // and make sure that the table is not closed
+   if(aTable.isClosed())
+   {
+      return false;
+   }
+
+   // get the table data defined in vpf_util/vpftable.h"
+   const vpf_table_type* data = aTable.getVpfTableData();
+
+   if(!data)
+   {
+      return false;
+   }
+   
+   // if the file is not open then we can't validate
+   if(!data->fp)
+   {
+      return false;
+   }
+
+   // The way that we will validate is to see if the columns of a dht
+   // exist.  if the column didn't exist then the position
+   // will be negative
+   long column = table_pos("ID", *data);
+   if(column < 0)
+   {
+      return false;
+   }
+   column = table_pos("VPF_VERSION", *data);
+   if(column < 0)
+   {
+      return false;
+   }
+   column = table_pos("DATABASE_NAME", *data);
+   if(column < 0)
+   {
+      return false;
+   }
+   column = table_pos("DATABASE_DESC", *data);
+   if(column < 0)
+   {
+      return false;
+   }
+   column = table_pos("MEDIA_STANDARD", *data);
+   if(column < 0)
+   {
+      return false;
+   }
+   column = table_pos("ORIGINATOR", *data);
+   if(column < 0)
+   {
+      return false;
+   }
+   column = table_pos("ADDRESSEE", *data);
+   if(column < 0)
+   {
+      return false;
+   }
+   column = table_pos("MEDIA_VOLUMES", *data);
+   if(column < 0)
+   {
+      return false;
+   }
+   column = table_pos("SEQ_NUMBERS", *data);
+   if(column < 0)
+   {
+      return false;
+   }
+   column = table_pos("NUM_DATA_SETS", *data);
+   if(column < 0)
+   {
+      return false;
+   }
+   column = table_pos("SECURITY_CLASS", *data);
+   if(column < 0)
+   {
+      return false;
+   }
+   column = table_pos("DOWNGRADING", *data);
+   if(column < 0)
+   {
+      return false;
+   }
+   column = table_pos("DOWNGRADE_DATE", *data);
+   if(column < 0)
+   {
+      return false;
+   }
+   column = table_pos("RELEASABILITY", *data);
+   if(column < 0)
+   {
+      return false;
+   }
+   column = table_pos("TRANSMITTAL_ID", *data);
+   if(column < 0)
+   {
+      return false;
+   }
+   column = table_pos("EDITION_NUMBER", *data);
+   if(column < 0)
+   {
+      return false;
+   }
+   column = table_pos("EDITION_DATE", *data);
+   if(column < 0)
+   {
+      return false;
+   }
+   
+   return true;
+
+}
+
diff --git a/src/ossim/vec/ossimVpfExtent.cpp b/ossim/src/ossim/vec/ossimVpfExtent.cpp
similarity index 100%
rename from src/ossim/vec/ossimVpfExtent.cpp
rename to ossim/src/ossim/vec/ossimVpfExtent.cpp
diff --git a/src/ossim/vec/ossimVpfFeatureClass.cpp b/ossim/src/ossim/vec/ossimVpfFeatureClass.cpp
similarity index 100%
rename from src/ossim/vec/ossimVpfFeatureClass.cpp
rename to ossim/src/ossim/vec/ossimVpfFeatureClass.cpp
diff --git a/ossim/src/ossim/vec/ossimVpfFeatureClassSchema.cpp b/ossim/src/ossim/vec/ossimVpfFeatureClassSchema.cpp
new file mode 100644
index 0000000..1524a33
--- /dev/null
+++ b/ossim/src/ossim/vec/ossimVpfFeatureClassSchema.cpp
@@ -0,0 +1,149 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc. 
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author: Garrett Potts
+//
+//********************************************************************
+// $Id: ossimVpfFeatureClassSchema.cpp 23664 2015-12-14 14:17:27Z dburken $
+#include <ossim/vec/ossimVpfLibrary.h>
+#include <ossim/vec/ossimVpfCoverage.h>
+#include <ossim/vec/ossimVpfFeatureClassSchema.h>
+#include <ossim/vec/ossimVpfFeatureClass.h>
+
+ossimVpfFeatureClassSchema::ossimVpfFeatureClassSchema()
+   :theCoverage(NULL)
+{
+}
+
+bool ossimVpfFeatureClassSchema::openSchema(ossimVpfCoverage* coverage)
+{
+   theCoverage = coverage;
+   bool result = false;
+
+   if(theCoverage)
+   {
+      theSchemaTableName = theCoverage->getPath().dirCat("fcs");
+
+      if(theSchemaTableName.exists())
+      {
+         result = openTable(theSchemaTableName);
+
+         if(result)
+         {
+            result = validateColumnNames();
+         }
+         if(result)
+         {
+            setFeatureClassMapping();
+         }
+      }
+   }
+   
+   return result;
+}
+
+void ossimVpfFeatureClassSchema::closeTable()
+{
+   ossimVpfTable::closeTable();
+   theFeatureClassMap.clear();
+}
+
+void ossimVpfFeatureClassSchema::getFeatureClasses(std::vector<ossimString>& featureClassArray)const
+{
+   featureClassArray.clear();
+   std::map<ossimString, ossimVpfFeatureClassSchemaNode, ossimStringLtstr>::const_iterator featureClassIter = theFeatureClassMap.begin();
+
+   while(featureClassIter != theFeatureClassMap.end())
+   {
+      featureClassArray.push_back((*featureClassIter).first);
+      ++featureClassIter;
+   }
+}
+
+bool ossimVpfFeatureClassSchema::getFeatureClassNode(const ossimString& featureClass,
+                                                     ossimVpfFeatureClassSchemaNode& featureClassNode)const
+{
+   std::map<ossimString, ossimVpfFeatureClassSchemaNode, ossimStringLtstr>::const_iterator fIter = theFeatureClassMap.find(featureClass);
+
+   if(fIter != theFeatureClassMap.end())
+   {
+      featureClassNode = (*fIter).second;
+      return true;
+   }
+
+   return false;
+}
+
+ossim_int32 ossimVpfFeatureClassSchema::getNumberOfFeatureClasses()const
+{
+   return (ossim_int32)theFeatureClassMap.size();
+}
+
+bool ossimVpfFeatureClassSchema::validateColumnNames()const
+{
+   if(isClosed()) return false;
+   return ((getColumnPosition("feature_class")>=0)&&
+           (getColumnPosition("table1")>=0)&&
+           (getColumnPosition("table1_key")>=0)&&
+           (getColumnPosition("table2")>=0)&&
+           (getColumnPosition("table2_key")>=0));
+}
+
+void ossimVpfFeatureClassSchema::setFeatureClassMapping()
+{
+   if(!isClosed())
+   {
+      ossim_int32 featureIdx = getColumnPosition("feature_class");
+      ossim_int32 table1Idx = getColumnPosition("table1");
+      ossim_int32 table1KeyIdx = getColumnPosition("table1_key");
+      ossim_int32 table2Idx = getColumnPosition("table2");
+      ossim_int32 table2KeyIdx = getColumnPosition("table2_key");
+      reset();
+      if(getNumberOfRows() > 0)
+      {
+         row_type row;
+         const int ROWS = getNumberOfRows();
+         for(int rowIdx = 1; rowIdx <= ROWS; ++rowIdx)
+         {
+            if(rowIdx == 1)
+            {
+               row = read_row(rowIdx,
+                              *theTableInformation);
+            }
+            else
+            {
+               row = read_next_row(*theTableInformation);
+            }
+            ossimFilename primitiveTable =  getColumnValueAsString(row,
+                                                                   table2Idx);
+            if(ossimVpfFeatureClass::isPrimitive(primitiveTable))
+            {
+               ossimString primitiveTableKey = getColumnValueAsString(row,
+                                                                      table2KeyIdx);
+               ossimFilename table = getColumnValueAsString(row,
+                                                            table1Idx);
+               ossimString tableKey = getColumnValueAsString(row,
+                                                             table1KeyIdx);
+               ossimString featureClass = getColumnValueAsString(row,
+                                                                 featureIdx);
+               ossimVpfFeatureClassSchemaNode node(table,
+                                                   tableKey,
+                                                   primitiveTable,
+                                                   primitiveTableKey);
+               
+               theFeatureClassMap.insert(make_pair(featureClass,
+                                                   node));
+            }
+            
+            free_row(row, *theTableInformation);
+         }
+      }
+   }
+}
+
+
+
diff --git a/src/ossim/vec/ossimVpfLibrary.cpp b/ossim/src/ossim/vec/ossimVpfLibrary.cpp
similarity index 100%
rename from src/ossim/vec/ossimVpfLibrary.cpp
rename to ossim/src/ossim/vec/ossimVpfLibrary.cpp
diff --git a/src/ossim/vec/ossimVpfLibraryAttributeTableValidator.cpp b/ossim/src/ossim/vec/ossimVpfLibraryAttributeTableValidator.cpp
similarity index 100%
rename from src/ossim/vec/ossimVpfLibraryAttributeTableValidator.cpp
rename to ossim/src/ossim/vec/ossimVpfLibraryAttributeTableValidator.cpp
diff --git a/ossim/src/ossim/vec/ossimVpfTable.cpp b/ossim/src/ossim/vec/ossimVpfTable.cpp
new file mode 100644
index 0000000..9e505ce
--- /dev/null
+++ b/ossim/src/ossim/vec/ossimVpfTable.cpp
@@ -0,0 +1,913 @@
+//*******************************************************************
+// Copyright (C) 2000 ImageLinks Inc.
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author: Garrett Potts
+// 
+// Description: This class give the capability to access tiles from an
+//              vpf file.
+//
+//********************************************************************
+// $Id: ossimVpfTable.cpp 23205 2015-03-25 13:54:42Z gpotts $
+#include <ossim/vec/ossimVpfTable.h>
+#include <ossim/vec/vpf.h>
+#include <ossim/base/ossimErrorCodes.h>
+#include <cstdlib>
+#include <cstring>
+
+std::ostream& operator <<(std::ostream& out,
+                     const ossimVpfTable& data)
+{
+   data.print(out);
+   return out;
+}
+
+ossimVpfTable::ossimVpfTable()
+   :theTableInformation(NULL)
+{
+}
+
+ossimVpfTable::~ossimVpfTable()
+{
+   if(theTableInformation)
+   {
+      closeTable();
+      delete theTableInformation;
+      theTableInformation = NULL;
+   }
+}
+
+bool ossimVpfTable::openTable(const ossimFilename& tableName)
+{
+   closeTable();
+
+   if(is_vpf_table(const_cast<char*>(tableName.c_str())))
+   {
+      if(theTableInformation)
+      {
+         delete theTableInformation;
+         theTableInformation = NULL;
+      }
+      theTableInformation = new vpf_table_type;
+      memset(theTableInformation, 0, sizeof(vpf_table_type));
+
+      theTableName = tableName;
+      *theTableInformation = vpf_open_table(const_cast<char*>(tableName.c_str()),
+                                            disk,
+                                            "rb",
+                                            NULL);
+   }
+   else
+   {
+      delete theTableInformation;
+      theTableInformation = NULL;
+
+      return false;
+   }
+
+   return true;
+}
+
+void ossimVpfTable::closeTable()
+{
+   if(theTableInformation&&(theTableInformation->status!=CLOSED))
+   {
+      vpf_close_table(theTableInformation);
+   }
+}
+
+int ossimVpfTable::getNumberOfRows()const
+{
+  if(theTableInformation) return theTableInformation->nrows;
+
+  return 0;
+}
+
+int ossimVpfTable::getNumberOfColumns()const
+{
+  if(theTableInformation) return theTableInformation->nfields;
+
+  return 0;
+}
+
+ossimString ossimVpfTable::getColumnName(int idx)const
+{
+  if((idx < 0) || idx > getNumberOfColumns())
+    {
+      return ossimString("");
+    }
+  return ossimString(theTableInformation->header[idx].name);
+}
+
+bool ossimVpfTable::isClosed()const
+{
+   return (theTableInformation &&
+           (theTableInformation->status==CLOSED));
+}
+
+void ossimVpfTable::reset()const
+{
+   if(theTableInformation &&
+      (theTableInformation->status!=CLOSED))
+   {
+      long fpos;
+
+      fpos = index_pos(0, *theTableInformation);
+      fseek(theTableInformation->fp, fpos, SEEK_SET);
+   }
+}
+
+bool ossimVpfTable::goToRow(long row)const
+{
+   if(theTableInformation &&
+      (theTableInformation->status!=CLOSED))
+   {
+      long fpos;
+
+      fpos = index_pos(row, *theTableInformation);
+      if(fpos < 0)
+      {
+         return false;
+      }
+      fseek(theTableInformation->fp, fpos, SEEK_SET);
+   }
+
+   return true;
+}
+
+std::vector<ossimString> ossimVpfTable::getColumnValues(const ossimString& columnName)const
+{
+  std::vector<ossimString> result;
+
+   if(theTableInformation &&
+      theTableInformation->status == OPENED)
+   {
+      long int columnNumber = table_pos(const_cast<char*>(columnName.c_str()), *theTableInformation);
+
+      if(columnNumber >=0 &&
+         (columnNumber < theTableInformation->nfields))
+      {
+         row_type row;
+         // start at the first row of the table
+         reset();
+         for (int rowIndex = 1;
+              rowIndex <= theTableInformation->nrows;
+              ++rowIndex)
+         {
+            row = read_next_row(*theTableInformation);
+            ossimString value = getColumnValueAsString(row,
+                                                       columnNumber);
+      value.trim();
+            result.push_back(value);
+            free_row(row, *theTableInformation);
+         }
+      }
+   }
+
+   return result;
+}
+
+std::vector<ossimString> ossimVpfTable::getColumnValues(long columnNumber)const
+{
+  std::vector<ossimString> result;
+
+   if(theTableInformation &&
+      theTableInformation->status == OPENED)
+   {
+      if(columnNumber >=0 &&
+         (columnNumber < theTableInformation->nfields))
+      {
+         row_type row;
+         // start at the first row of the table
+         reset();
+         for (int rowIndex = 0;
+              rowIndex < theTableInformation->nrows;
+              ++rowIndex)
+         {
+            row = read_next_row(*theTableInformation);
+            ossimString value = getColumnValueAsString(row,
+                                                       columnNumber);
+//            value = value.downcase();
+            value = value.trim();
+            result.push_back(value);
+            free_row(row, *theTableInformation);
+         }
+      }
+   }
+
+   return result;
+}
+
+
+
+ossimString ossimVpfTable::getColumnValueAsString(row_type& row,
+                                                  long columnNumber)const
+{
+   ossimString result;
+   ossim_int32 n=1;
+   switch(theTableInformation->header[columnNumber].type)
+   {
+   case 'T': // it's of type text so
+   {
+      char c;
+      char *buf = (char *)get_table_element(columnNumber,
+                                            row,
+                                            *theTableInformation,
+                                            &c,
+                                            &n);
+      if(buf)
+      {
+         result = buf;
+         free(buf);
+      }
+      else
+      {
+         result = c;
+      }
+      break;
+   }
+   case 'I':
+   {
+      ossim_int32 value;
+      ossim_int32* v = (ossim_int32*)get_table_element(columnNumber,
+                                                       row,
+                                                       *theTableInformation,
+                                                       &value,
+                                                       &n);
+      if(v)
+      {
+         result = ossimString::toString(v[0]);
+
+         free(v);
+      }
+      else
+      {
+         result = ossimString::toString(value);
+      }
+      break;
+   }
+   case 'S':
+   {
+      short int value;
+      short int* v = (short int*)get_table_element(columnNumber,
+                                                   row,
+                                                   *theTableInformation,
+                                                   &value,
+                                                   &n);
+      if(v)
+      {
+         result = ossimString::toString(v[0]);
+
+         free(v);
+      }
+      else
+      {
+         result = ossimString::toString(value);
+      }
+      break;
+   }
+   case 'F':
+   {
+      float value;
+      float* v = (float*)get_table_element(columnNumber,
+                                           row,
+                                           *theTableInformation,
+                                           &value,
+                                           &n);
+      if(v)
+      {
+         value = v[0];
+         free(v);
+      }
+      if (!is_vpf_null_float(value))
+      {
+         result = ossimString::toString(value);
+      }
+      else
+      {
+         result = "nan";
+      }
+      break;
+   }
+   case 'B':
+   {
+      double value;
+      double* tempBuf = (double*)get_table_element(columnNumber,
+                                                 row,
+                                                 *theTableInformation,
+                                                 &value,
+                                                 &n);
+      if(tempBuf)
+      {
+         value = tempBuf[0];
+         free(tempBuf);
+      }
+      if (!is_vpf_null_double(value))
+      {
+         result = ossimString::toString(value);
+      }
+      else
+      {
+         result = "nan";
+      }
+
+      break;
+   }
+   case 'C':
+   {
+      coordinate_type coordType;
+      coordinate_type* temp = (coordinate_type*)get_table_element(columnNumber,
+                                                                  row,
+                                                                  *theTableInformation,
+                                                                  &coordType,
+                                                                  &n);
+      if(temp)
+      {
+         coordType = temp[0];
+         free(temp);
+      }
+      result = ossimString::toString(coordType.x)+
+               ossimString(" ") +
+               ossimString::toString(coordType.y);
+      break;
+   }
+   case 'K':
+   {
+      id_triplet_type idTripletType;
+      id_triplet_type* tempType = (id_triplet_type*)get_table_element(columnNumber,
+                                                                      row,
+                                                                      *theTableInformation,
+                                                                      &idTripletType,
+                                                                      &n);
+      if(tempType)
+      {
+         idTripletType = tempType[0];
+         free (tempType);
+      }
+      result = ossimString(idTripletType.type) +
+         ossimString(" ") +
+         ossimString::toString(static_cast<ossim_int32>(idTripletType.id)) +
+         ossimString(" ") +
+         ossimString::toString(static_cast<ossim_int32>(idTripletType.tile))+
+         ossimString(" ") +
+         ossimString::toString(static_cast<ossim_int32>(idTripletType.exid));
+      break;
+   }
+   case 'D':
+   {
+      date_type date, formatDate;
+      date_type* temp = (date_type*)get_table_element(columnNumber,
+                                                      row,
+                                                      *theTableInformation,
+                                                      &date,
+                                                      &n);
+      if(temp)
+      {
+         free(temp);
+      }
+      format_date(date, formatDate);
+      result = formatDate;
+      break;
+   }
+   case 'Z': // tri coordinate types x, y, z
+   {
+      tri_coordinate_type  *tcptr=NULL;
+      tcptr = (tri_coordinate_type *) get_table_element(columnNumber,row,
+                                                        *theTableInformation, NULL,&n);
+      result = "";
+      for (int k=0;k<n;k++)
+      {
+         
+         result = result + " (" +
+            ossimString::toString(tcptr[k].x) +
+            ossimString(" ") +
+            ossimString::toString(tcptr[k].y) +
+            ossimString(" ") +
+            ossimString::toString(tcptr[k].z) +
+            ossimString(") ") ;
+      }
+      
+      if (tcptr)
+      {
+         free(tcptr);
+      }
+      break;
+   }   
+   }
+   result.trim();
+   return result;
+}
+
+ossimString ossimVpfTable::getColumnValueAsString(ossim_int32 rowNumber,
+                                                  long columnNumber)const
+{
+   row_type row = read_row( rowNumber, *theTableInformation);
+   ossimString result = getColumnValueAsString(row,
+                                               columnNumber);
+   free_row(row, *theTableInformation);
+
+   return result;
+}
+
+ossimString ossimVpfTable::getColumnValueAsString(const ossimString& columnName)
+{
+   if(theTableInformation &&
+      (theTableInformation->status!=CLOSED))
+   {
+      long int columnNumber = table_pos(const_cast<char*>(columnName.c_str()),
+                                        *theTableInformation);
+      row_type row = read_next_row(*theTableInformation);
+      ossimString result = getColumnValueAsString(row,
+                                                  columnNumber);
+      free_row(row, *theTableInformation);
+      return result;
+   }
+
+   return "";
+}
+
+ossim_int32 ossimVpfTable::getColumnPosition(const ossimString& columnName)const
+{
+   return ((ossim_int32)table_pos(const_cast<char*>(columnName.c_str()), *theTableInformation));
+}
+
+void ossimVpfTable::print(std::ostream& out)const
+{
+   if(theTableInformation &&
+      (theTableInformation->status!=CLOSED))
+   {
+      // make sure we are at the beginning of the table.
+      this->reset();
+
+
+      // the rest of this code is from the vpfutil.  The vpfutil
+      // was grabbed from the vhcl map server software.
+      vpf_table_type& table = *theTableInformation;
+
+      ossim_int32       i,j,k,n;
+      ossim_int16  ival=0,*iptr=NULL;
+      ossim_int32       lval=0,*lptr=NULL;
+      ossim_float32      fval=0,*fptr=NULL;
+      date_type  dval,*dptr=NULL;
+      id_triplet_type kval={0,0,0}, *kptr=NULL;
+      coordinate_type cval={0,0}, *cptr=NULL;
+      char       *buf,  ch, date[40];
+      row_type   row;
+
+
+    out << "table name:        " << theTableName << std::endl
+      << "desciption:        " << table.description << std::endl
+      << std::endl;
+
+    out << "Definition:" << std::endl;
+      for (i=0;i<table.nfields;i++) {
+         if (table.header[i].count < 0)
+         {
+
+            out << table.header[i].name << " ("
+                << table.header[i].type << ",*)  "
+        << table.header[i].description << std::endl;
+         }
+         else
+         {
+            out << table.header[i].name << " ("
+                << table.header[i].type << ","
+                << table.header[i].count << ")  "
+        << table.header[i].description << std::endl;
+         }
+      }
+
+    out << "\nContents:" << std::endl;
+      for (i=1;i<=table.nrows;i++)
+      {
+         row = read_next_row(table);
+         for (j=0;j<table.nfields;j++)
+         {
+            out << table.header[j].name << ": ";
+            switch (table.header[j].type) {
+      case 'T':
+         if (table.header[j].count==1)
+               {
+      get_table_element(j,row,table,&ch,&n);
+
+      out << ch << std::endl;
+         }
+               else
+               {
+      buf = (char *)get_table_element(j,row,table,NULL,&n);
+      n = (long)strlen(table.header[j].name) + 2;
+      for (k=0;k<(long)strlen(buf);k++)
+                  {
+                     out << buf[k];
+         n++;
+         if (n>80)
+                     {
+             out << std::endl;
+      n = 0;
+         }
+      }
+          out << std::endl;
+      free(buf);
+         }
+         break;
+      case 'I': // long
+         if (table.header[j].count==1)
+               {
+      get_table_element(j,row,table,&lval,&n);
+      if (!is_vpf_null_float(lval))
+                  {
+            out << lval << std::endl;
+                  }
+      else
+                  {
+            out << "null" << std::endl;
+                  }
+         }
+               else
+               {
+      lptr = (ossim_int32*)get_table_element(j,row,table,NULL,&n);
+      for (k=0;k<n;k++)
+                  {
+         if (!is_vpf_null_float(lptr[k]))
+                     {
+                        out << lptr[k];
+                     }
+         else
+                     {
+                        out << "null";
+                     }
+      }
+          out << std::endl;
+      free(lptr);
+         }
+         break;
+            case 'R': // for double
+            {
+               double *dptr=NULL;
+               double value = 0;
+         if (table.header[j].count==1)
+               {
+      get_table_element(j,row,table,&value,&n);
+                  if(!is_vpf_null_double(value))
+                  {
+            out << "null" << std::endl;
+                  }
+                  else
+                  {
+            out << value << std::endl;
+                  }
+               }
+               else
+               {
+      dptr = (double*)get_table_element(j,row,table,NULL,&n);
+      for (k=0;k<n;k++)
+                  {
+         if (!is_vpf_null_double(dptr[k]))
+                     {
+                        out << dptr[k];
+                     }
+         else
+                     {
+                        out << "null ";
+                     }
+      }
+          out << std::endl;
+      free(dptr);
+               }
+            }
+      case 'S': // integer
+         if (table.header[j].count==1)
+               {
+      get_table_element(j,row,table,&ival,&n);
+      if (ival != (short int)INT_MAX)
+                  {
+            out << ival << std::endl;
+                  }
+      else
+                  {
+            out << "null" << std::endl;
+                  }
+         }
+               else
+               {
+      iptr = (short int*)get_table_element(j,row,table,NULL,&n);
+      for (k=0;k<n;k++)
+                  {
+         if (iptr[k] != (short int)INT_MAX)
+                     {
+                        out << iptr[k];
+                     }
+         else
+                     {
+                        out << "null ";
+                     }
+      }
+          out << std::endl;
+      free(iptr);
+         }
+         break;
+      case 'F': // float type
+         if (table.header[j].count==1)
+               {
+      get_table_element(j,row,table,&fval,&n);
+      if (!is_vpf_null_float(fval))
+                  {
+            out << fval << std::endl;
+                  }
+      else
+                  {
+            out << "null" << std::endl;
+                  }
+         }
+               else
+               {
+      fptr = (float*)get_table_element(j,row,table,NULL,&n);
+      for (k=0;k<n;k++)
+                  {
+         if (!is_vpf_null_float(fptr[k]))
+                     {
+                        out << fptr[k] << " ";
+                     }
+         else
+                     {
+                        out << "null ";
+                     }
+      }
+          out << std::endl;
+      free(fptr);
+         }
+         break;
+            case 'Y':
+            {
+               double_tri_coordinate_type dtctValue, *dtctPtr;
+         if (table.header[j].count==1)
+               {
+                  get_table_element(j,row,table,&dtctValue,&n);
+                  out << "(";
+                  if(is_vpf_null_double(dtctValue.x))
+                  {
+                     out << "null, ";
+                  }
+                  else
+                  {
+                     out << dtctValue.x << ", ";
+                  }
+                  if(is_vpf_null_double(dtctValue.y))
+                  {
+                     out << "null, ";
+                  }
+                  else
+                  {
+                     out << dtctValue.y << ", ";
+                  }
+                  if(is_vpf_null_double(dtctValue.z))
+                  {
+                     out << "null, ";
+                  }
+                  else
+                  {
+                     out << dtctValue.z << ", ";
+                  }
+               }
+               else
+               {
+      dtctPtr = (double_tri_coordinate_type*)get_table_element(j,row,table,NULL,&n);
+      for (k=0;k<n;k++)
+                  {
+                     out << "(";
+                     if(is_vpf_null_double(dtctPtr[k].x))
+                     {
+                        out << "null, ";
+                     }
+                     else
+                     {
+                        out << dtctPtr[k].x  << ", ";
+                     }
+                     if(is_vpf_null_double(dtctPtr[k].y))
+                     {
+                        out << "null, ";
+                     }
+                     else
+                     {
+                        out << dtctPtr[k].y  << ", ";
+                     }
+                     if(is_vpf_null_double(dtctPtr[k].z))
+                     {
+                        out << "null, ";
+                     }
+                     else
+                     {
+                        out << dtctPtr[k].z  << ", ";
+                     }
+                  }
+                  free(dtctPtr);
+               }
+               break;
+            }
+            case 'Z': // tri coordinate types x, y, z
+            {
+               tri_coordinate_type tcval={0,0,0}, *tcptr=NULL;
+         if (table.header[j].count==1)
+               {
+      get_table_element(j,row,table,&tcval,&n);
+                  out << "(";
+                  if(is_vpf_null_float(tcval.x))
+                  {
+                     out << "null" << ",";
+                  }
+                  else
+                  {
+                     out << tcval.x << ", ";
+                  }
+                  if(is_vpf_null_float(tcval.y))
+                  {
+                     out << "null" << ", ";
+                  }
+                  else
+                  {
+                     out << tcval.y << ", ";
+                  }
+                  if(is_vpf_null_float(tcval.z))
+                  {
+            out << "null)" << std::endl;
+                  }
+                  else
+                  {
+            out << tcval.z << ")" << std::endl;
+                  }
+         }
+               else
+               {
+      tcptr = (tri_coordinate_type*)get_table_element(j,row,table,NULL,&n);
+      for (k=0;k<n;k++)
+                  {
+                     out << "(";
+                     if(is_vpf_null_float(tcptr[k].x))
+                     {
+                        out << "null, ";
+                     }
+                     else
+                     {
+                        out << tcptr[k].x << ", ";
+                     }
+                     if(is_vpf_null_float(tcptr[k].y))
+                     {
+                        out << "null, ";
+                     }
+                     else
+                     {
+                        out << tcptr[k].y << ", ";
+                     }
+                     if(is_vpf_null_float(tcptr[k].z))
+                     {
+                        out << "null)";
+                     }
+                     else
+                     {
+                        out << tcptr[k].z << ")";
+                     }
+                  }
+          out << std::endl;
+      free(tcptr);
+         }
+         break;
+            }
+      case 'C': // coordinate type  x, y
+         if (table.header[j].count==1)
+               {
+      get_table_element(j,row,table,&cval,&n);
+                  out << "(";
+                  if(is_vpf_null_float(cval.x))
+                  {
+                     out << "null, ";
+                  }
+                  else
+                  {
+                     out << cval.x << ", ";
+                  }
+                  if(is_vpf_null_float(cval.y))
+                  {
+                     out << "null, ";
+                  }
+                  else
+                  {
+                     out << cval.y << ")";
+                  }
+         }
+               else
+               {
+      cptr = (coordinate_type*)get_table_element(j,row,table,NULL,&n);
+      for (k=0;k<n;k++)
+                  {
+
+                     out << "(" << cptr[k].x << "," << cptr[k].y << ") ";
+                  }
+          out << std::endl;
+      free(cptr);
+         }
+         break;
+            case 'B': // double coordinate type
+            {
+               double_coordinate_type dct, *dctPtr;
+
+         if (table.header[j].count==1)
+               {
+      get_table_element(j,row,table,&dct,&n);
+
+                  out << "(";
+                  if(is_vpf_null_double(dct.x))
+                  {
+                     out << "null, ";
+                  }
+                  else
+                  {
+                     out << dct.x << ", ";
+                  }
+                  if(is_vpf_null_double(dct.y))
+                  {
+                     out << "null, ";
+                  }
+                  else
+                  {
+                     out << dct.y << ")";
+                  }
+         }
+               else
+               {
+      dctPtr = (double_coordinate_type*)get_table_element(j,row,table,NULL,&n);
+      for (k=0;k<n;k++)
+                  {
+                     out << "(";
+                     if(is_vpf_null_double(dctPtr[k].x))
+                     {
+                        out << "null,";
+                     }
+                     else
+                     {
+                        out << dctPtr[k].x << ", ";
+                     }
+                     if(is_vpf_null_double(dctPtr[k].y))
+                     {
+                        out << "null,";
+                     }
+                     else
+                     {
+                        out << dctPtr[k].y << ", ";
+                     }
+                  }
+          out << std::endl;
+      free(dctPtr);
+         }
+
+            }
+      case 'K': //id triplet
+         if (table.header[j].count==1)
+               {
+      get_table_element(j,row,table,&kval,&n);
+                  out <<  "(" << kval.id
+                      << ", " << kval.tile
+                      << ", " << kval.exid
+            << ")" << std::endl;
+         }
+               else
+               {
+      kptr = (id_triplet_type*)get_table_element(j,row,table,NULL,&n);
+      for (k=0;k<n;k++)
+                  {
+                     out <<  "(" << kptr[k].id
+                         << ", " << kptr[k].tile
+                         << ", " << kptr[k].exid
+             << ")  " << std::endl;
+
+                  }
+          out << std::endl;
+      free(kptr);
+         }
+         break;
+      case 'D':   /* Date */
+         if (table.header[j].count==1)
+               {
+      get_table_element(j,row,table,&dval,&n);
+      format_date(dval,date);
+      out << date << std::endl;
+         }
+               else
+               {
+      dptr = (date_type*)get_table_element(j,row,table,NULL,&n);
+      for (k=0;k<n;k++)
+                  {
+         format_date((char*)(&dptr[k]),date);
+                     out << dptr[k] << " ";
+      }
+          out << std::endl;
+      free(dptr);
+         }
+         break;
+            }
+         }
+     out << std::endl;
+         free_row( row, table );
+      }
+   }
+}
diff --git a/src/ossim/version-config.cpp b/ossim/src/ossim/version-config.cpp
similarity index 100%
rename from src/ossim/version-config.cpp
rename to ossim/src/ossim/version-config.cpp
diff --git a/src/ossim/video/ossimVideoGeometry.cpp b/ossim/src/ossim/video/ossimVideoGeometry.cpp
similarity index 100%
rename from src/ossim/video/ossimVideoGeometry.cpp
rename to ossim/src/ossim/video/ossimVideoGeometry.cpp
diff --git a/src/ossim/video/ossimVideoHandler.cpp b/ossim/src/ossim/video/ossimVideoHandler.cpp
similarity index 100%
rename from src/ossim/video/ossimVideoHandler.cpp
rename to ossim/src/ossim/video/ossimVideoHandler.cpp
diff --git a/src/ossim/video/ossimVideoImageHandler.cpp b/ossim/src/ossim/video/ossimVideoImageHandler.cpp
similarity index 100%
rename from src/ossim/video/ossimVideoImageHandler.cpp
rename to ossim/src/ossim/video/ossimVideoImageHandler.cpp
diff --git a/src/ossim/video/ossimVideoImageSource.cpp b/ossim/src/ossim/video/ossimVideoImageSource.cpp
similarity index 100%
rename from src/ossim/video/ossimVideoImageSource.cpp
rename to ossim/src/ossim/video/ossimVideoImageSource.cpp
diff --git a/src/ossim/video/ossimVideoSource.cpp b/ossim/src/ossim/video/ossimVideoSource.cpp
similarity index 100%
rename from src/ossim/video/ossimVideoSource.cpp
rename to ossim/src/ossim/video/ossimVideoSource.cpp
diff --git a/src/ossim/vpfutil/bitarray.c b/ossim/src/ossim/vpfutil/bitarray.c
similarity index 100%
rename from src/ossim/vpfutil/bitarray.c
rename to ossim/src/ossim/vpfutil/bitarray.c
diff --git a/src/ossim/vpfutil/distance.c b/ossim/src/ossim/vpfutil/distance.c
similarity index 100%
rename from src/ossim/vpfutil/distance.c
rename to ossim/src/ossim/vpfutil/distance.c
diff --git a/src/ossim/vpfutil/linklist.c b/ossim/src/ossim/vpfutil/linklist.c
similarity index 100%
rename from src/ossim/vpfutil/linklist.c
rename to ossim/src/ossim/vpfutil/linklist.c
diff --git a/src/ossim/vpfutil/makefile.vc b/ossim/src/ossim/vpfutil/makefile.vc
similarity index 100%
rename from src/ossim/vpfutil/makefile.vc
rename to ossim/src/ossim/vpfutil/makefile.vc
diff --git a/src/ossim/vpfutil/polygrf.c b/ossim/src/ossim/vpfutil/polygrf.c
similarity index 100%
rename from src/ossim/vpfutil/polygrf.c
rename to ossim/src/ossim/vpfutil/polygrf.c
diff --git a/ossim/src/ossim/vpfutil/set.c b/ossim/src/ossim/vpfutil/set.c
new file mode 100644
index 0000000..0631d5b
--- /dev/null
+++ b/ossim/src/ossim/vpfutil/set.c
@@ -0,0 +1,1304 @@
+/*************************************************************************
+ *
+ *N  Module SET.C
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This module contains functions that make up an abstract data type
+ *     "set".  The data structures and algorithms herein allow programs
+ *     to perform basic manipulations defined in the mathematics of set
+ *     theory.  These operations are fundamental to relational database
+ *     theory, as well.
+ *
+ *     This version allows sets too large to fit in memory to be swapped
+ *     out to disk.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    N/A
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   July 1990                       DOS Turbo C
+ *    Nov 1991 - Embedded bit manipulation routines instead of using a
+ *               separate module (speed & size).
+ *    Nov 1991 - Added disk swapping capabilities.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    set_type set_init( long int n );
+ *    int  set_empty( set_type set );
+ *    void set_insert( long int element, set_type set );
+ *    void set_delete( long int element, set_type set );
+ *    int set_member( long int element, set_type set );
+ *    long int set_min( set_type set );
+ *    long int set_max( set_type set );
+ *    int  num_in_set( set_type set );
+ *    void set_on( set_type set );
+ *    void set_off( set_type set );
+ *    int  set_equal( set_type a, set_type b );
+ *    void set_assign( set_type *a, set_type b );
+ *    set_type set_union( set_type a, set_type b );
+ *    set_type set_intersection( set_type a, set_type b );
+ *    set_type set_difference( set_type a, set_type b );
+ *    void set_nuke( set_type *set );
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    These functions are all ANSI C compatible.
+ *E
+ *************************************************************************/
+#if defined(__MSDOS__) || defined(__MINGW32__)
+#    include <dirent.h>
+#    include <malloc.h>
+#    include <mem.h>
+#    include <dos.h>
+#else
+#ifndef _WIN32
+
+#include <unistd.h>
+
+#endif
+
+#endif
+
+#include <stdlib.h>
+#include <ossim/vpfutil/set.h>
+
+#include <stdio.h>
+#include <string.h>
+#ifndef TRUE
+#define TRUE  1
+#endif
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+static char chkmask[] = {254,253,251,247,239,223,191,127};
+static char setmask[] = {1,2,4,8,16,32,64,128};
+
+#define BITSET(bit,byte)  ((byte | chkmask[bit]) ^ chkmask[bit])
+#define SET_BIT(bit,byte)  (byte | setmask[bit])
+#define UNSET_BIT(bit,byte)  (byte ^ setmask[bit])
+
+#define NBYTES(set)  ((set.size>>3L) + 1L)
+
+/* #define BOUNDSCHECK 1 */
+
+
+static char set_byte( long int nbyte, set_type set )
+{
+   char byte;
+
+   if ( (nbyte < 0) || (nbyte > NBYTES(set)) ) return 0;
+
+   if (set.diskstorage) {
+      fseek(set.fp,nbyte,SEEK_SET);
+      fread(&byte,1,1,set.fp);
+   } else {
+      byte = set.buf[nbyte];
+   }
+   return byte;
+}
+
+#define SET_BYTE( nbyte, set, byte )\
+   if ( (nbyte < 0) || (nbyte > NBYTES(set)) ) byte = 0;        \
+   if (set.diskstorage) {					\
+      fseek(set.fp,nbyte,SEEK_SET);                             \
+      fread(&byte,1,1,set.fp);                                  \
+   } else {                                                     \
+      byte = set.buf[nbyte];                                    \
+   }
+
+
+/*************************************************************************
+ *
+ *N  set_off
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     Turns each element in the set 'off'.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    set <inout> == (set_type) set to be acted upon.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   Nov 1991                   DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This function conforms to ANSI C standards.
+ *E
+ *************************************************************************/
+void set_off( set_type set )
+{
+   register long int nbytes, nbyte, bufsize;
+   char byte=0, *buf;
+
+   if (set.diskstorage) {
+      rewind(set.fp);
+      nbytes = NBYTES(set);
+      /* Use buffered reads and writes to set blocks of bits at a time */
+      nbyte = 0;
+      while (nbyte < nbytes) {
+#ifdef __MSDOS__
+	 bufsize = (long int)min(nbytes-nbyte,farcoreleft()/2L);
+#else
+	 bufsize = (long int)(nbytes-nbyte);
+#endif
+	 buf = (char *)malloc(bufsize);
+	 memset(buf,byte,bufsize);
+	 fwrite(buf,bufsize,1,set.fp);
+	 free(buf);
+	 nbyte += bufsize;
+      }
+
+      rewind(set.fp);
+
+   } else {
+      SET_OFF(set);
+   }
+}
+
+/*************************************************************************
+ *
+ *N  set_on
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     Turns each element in the set 'on'.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    set <inout> == (set_type) set to be acted upon.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   Nov 1991                   DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This function conforms to ANSI C standards.
+ *E
+ *************************************************************************/
+void set_on( set_type set )
+{
+   register long int nbytes,i, bufsize, nbyte;
+#if !defined(__MSDOS__)
+   unsigned
+#endif
+   char byte=255, *buf;
+
+   if (set.diskstorage) {
+      rewind(set.fp);
+      nbytes = NBYTES(set);
+      /* Use buffered reads and writes to set blocks of bits */
+      nbyte = 0;
+      while (nbyte < nbytes) {
+#ifdef __MSDOS__
+	 bufsize = (long int)min(nbytes-nbyte,farcoreleft()/2L);
+ 	buf = (char*)malloc(bufsize);
+#else
+	 bufsize = (long int)(nbytes-nbyte);
+	buf = (unsigned char*)malloc(bufsize);
+#endif
+	 memset(buf,byte,bufsize);
+	 fwrite(buf,bufsize,1,set.fp);
+	 free(buf);
+	 nbyte += bufsize;
+      }
+
+   } else {
+      /* Turn on all bits up through set.size. */
+      /* All but the last byte. */
+      memset(set.buf,byte,set.size>>3L);
+      /* The valid bits of the last byte. */
+      for (i=(set.size>>3L)*8L;i<=set.size;i++)
+	 set_insert(i,set);
+   }
+}
+
+#if __MSDOS__
+static long int available_space( char *drive )
+{
+   struct dfree disktable;
+   int disknum;
+
+   if (!drive) return 0;
+   disknum=toupper(drive[0])-'A'+1;
+   getdfree(disknum,&disktable);
+   return (long int) disktable.df_avail *
+	  (long int) disktable.df_sclus *
+	  (long int) disktable.df_bsec;
+}
+#endif
+
+/*************************************************************************
+ *
+ *N  set_init
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     Initialize the set for 'n' elements.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    n       <input> == (long int) maximum number of elements in the set.
+ *    return <output> == (set_type) initialized set.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   July 1990                  DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This function conforms to ANSI C standards.
+ *E
+ *************************************************************************/
+set_type set_init( long int n )
+{
+   set_type s;
+   long int nbytes;
+
+   s.size = n;
+   nbytes = NBYTES(s);
+   s.fp = 0; // initialize variable
+#ifdef __MSDOS__
+   if (nbytes < (farcoreleft()/2L)-4096L) {
+#endif
+      s.buf = (char *)malloc(nbytes);
+      s.diskstorage = 0;
+#ifdef __MSDOS__
+   } else {
+      s.diskstorage = 1;
+      s.buf = (char *)malloc(20);
+      /* If the user has specified a RAM disk, use it (faster) */
+      if (getenv("TMP")  &&  nbytes < available_space(getenv("TMP")))
+	 sprintf(s.buf,"%s\\%s",getenv("TMP"),tmpnam(NULL));
+      else
+	 tmpnam(s.buf);
+      s.fp = fopen(s.buf,"w+b");
+      if (!s.fp) {
+	 perror("set_init: ");
+	 exit(1);
+      }
+   }
+#endif
+   set_off(s);
+   return s;
+}
+
+/*************************************************************************
+ *
+ *N  set_empty
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function returns TRUE if the given set is empty; else it
+ *     returns FALSE.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    set     <input> == (set_type) set.
+ *    return <output> == (int) TRUE[1] or FALSE[0].
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   July 1990                  DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This function conforms to ANSI C standards.
+ *E
+ *************************************************************************/
+int set_empty( set_type set )
+{
+   register long int i, nbytes;
+
+   nbytes = NBYTES(set);
+   for (i=0;i<nbytes;i++) {
+      if (set_byte(i,set)) {
+	 return FALSE;
+      }
+   }
+   return TRUE;
+}
+
+/*************************************************************************
+ *
+ *N  set_insert
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function inserts the given element into the specified set.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    element <input> == (long int) element to insert into the set.
+ *    set     <inout> == (set_type) set.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   July 1990                  DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This function conforms to ANSI C standards.
+ *E
+ *************************************************************************/
+void set_insert( long int element,
+		 set_type set )
+{
+   long int nbyte,bit;
+   char byte;
+
+   if ((element<0)||(element>set.size)) {
+#ifdef BOUNDSCHECK
+printf("Invalid call to set_insert! (%ld, %ld)\n",
+       element,set.size);
+exit(1);
+#endif
+      return;
+   }
+   nbyte = element>>3L; /* element/8 */
+   bit = element%8L;
+   SET_BYTE(nbyte,set,byte);
+   byte = SET_BIT(bit,byte);
+   if (set.diskstorage) {
+      fseek(set.fp,nbyte,SEEK_SET);
+      fwrite(&byte,1,1,set.fp);
+   } else {
+      set.buf[nbyte] = byte;
+   }
+}
+
+/*************************************************************************
+ *
+ *N  set_delete
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function deletes the given element from the specified set.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    element <input> == (long int) element to delete from the set.
+ *    set     <inout> == (set_type) set.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   July 1990                  DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    void unset_bit()    BITSTUFF.C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This function conforms to ANSI C standards.
+ *E
+ *************************************************************************/
+void set_delete( long int element,
+		 set_type set )
+{
+   long int nbyte,bit;
+   char byte;
+
+   if ((element<0)||(element>set.size)) {
+#ifdef BOUNDSCHECK
+printf("Invalid call to set_delete!\n");
+exit(1);
+#endif
+      return;
+   }
+   nbyte = element>>3L;  /* element/8 */
+   bit = element%8L;
+   SET_BYTE(nbyte,set,byte);
+   if (!BITSET(bit,byte)) return;
+   byte = UNSET_BIT(bit,byte);
+   if (set.diskstorage) {
+      fseek(set.fp,nbyte,SEEK_SET);
+      fwrite(&byte,1,1,set.fp);
+   } else {
+      set.buf[nbyte] = byte;
+   }
+}
+
+/*************************************************************************
+ *
+ *N  set_member
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function determines whether a given element is a member of
+ *     the specified set.  It returns either TRUE or FALSE.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    element <input> == (long int) element to check in the set.
+ *    set     <input> == (set_type) set.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   July 1990                  DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    void bitset()    BITSTUFF.C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This function conforms to ANSI C standards.
+ *E
+ *************************************************************************/
+int set_member( long int element,
+		set_type set )
+{
+   long int nbyte,bit;
+   char byte;
+
+   if ((element < 0)||(element > set.size)) return FALSE;
+   nbyte = element>>3L;  /* element/8L */
+   bit = element%8L;
+   SET_BYTE(nbyte,set,byte);
+   return BITSET(bit,byte);
+}
+
+/*************************************************************************
+ *
+ *N  set_min
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function returns the minimum element in the given set.
+ *     If the set is empty, the return value is -1.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    set     <input> == (set_type) set.
+ *    return <output> == (long int) minimum element in the set.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   July 1990                  DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    void bitset()    BITSTUFF.C
+ *    int set_empty( set_type set )     SET.C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This function conforms to ANSI C standards.
+ *E
+ *************************************************************************/
+long int set_min( set_type set )
+{
+   register long int nbyte, bit, element, nbytes, bufsize, i;
+   char byte='\0', *buf, on;
+
+   /* Find the first byte with a bit set */
+   nbytes = NBYTES(set);
+
+   if (set.diskstorage) {
+
+      /* Set is stored on disk, use block reads to get set into */
+      /* memory one chunk at a time */
+      nbyte = 0;
+      on = 0;
+      rewind(set.fp);
+      while (nbyte < nbytes) {
+#ifdef __MSDOS__
+	 bufsize = (long int)min(nbytes-nbyte,farcoreleft()/2L);
+#else
+	 bufsize = (long int)(nbytes-nbyte);
+#endif
+	 buf = (char *)malloc(bufsize);
+	 fread(buf,bufsize,1,set.fp);
+	 for (i=0;i<bufsize;i++,nbyte++) {
+	    if (buf[i]) {
+	       on = 1;
+	       byte = buf[i];
+	       break;
+	    }
+	 }
+	 free(buf);
+	 if (on) break;
+      }
+
+   } else {
+      for (nbyte=0;nbyte<nbytes;nbyte++)
+	 if (set.buf[nbyte]) {
+	    byte = set.buf[nbyte];
+	    break;
+	 }
+   }
+
+   /* Now find the first bit set in the byte */
+   element = nbyte*8L;
+   for (bit=0; bit<8; bit++,element++) {
+      if (element > set.size) return -1;
+      if (BITSET(bit,byte)) return element;
+   }
+   return -1;
+}
+
+/*************************************************************************
+ *
+ *N  set_max
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function returns the maximum element in the given set.
+ *     If the set is empty, the return value is 0.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    set     <input> == (set_type) set.
+ *    return <output> == (long int) maximum element in the set.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   July 1990                  DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This function conforms to ANSI C standards.
+ *E
+ *************************************************************************/
+long int set_max( set_type set )
+{
+   register long int nbyte, bit, element, nbytes, bufsize, i;
+   char byte='\0', *buf=0, on='\0';
+
+   /* Find the last byte with a bit set */
+   nbytes = NBYTES(set);
+
+   if (set.diskstorage) {
+
+      /* Set is stored on disk, use block reads to get set into */
+      /* memory one chunk at a time */
+      nbyte = nbytes-1L;
+      on = 0;
+      while (nbyte > 0) {
+#ifdef __MSDOS__
+	 bufsize = (long int)min(nbyte+1L,farcoreleft()/2L);
+#else
+	 bufsize = (long int)(nbyte+1L);
+#endif
+	 buf = (char *)malloc(bufsize);
+	 fseek(set.fp,nbyte-bufsize+1L,SEEK_SET);
+	 fread(buf,bufsize,1,set.fp);
+	 for (i=bufsize-1L;i>0;i--,nbyte--) {
+	    if (buf[i]) {
+	       on = 1;
+	       byte = buf[i];
+	       break;
+	    }
+	 }
+	 free(buf);
+	 if (on) break;
+      }
+   } else {
+
+      for (nbyte = nbytes-1; nbyte >= 0; nbyte--) {
+	 if (set.buf[nbyte]) {
+	    byte = set.buf[nbyte];
+	    break;
+	 }
+      }
+      if (nbyte < 0) return 0L;
+
+   }
+
+   /* Now find last bit set in the byte */
+   element = nbyte*8L + 7L;
+   for (bit=7; bit >= 0; bit--,element--) {
+      if (BITSET(bit,byte)) {
+	 return element;
+      }
+   }
+
+   return 0L;
+}
+
+/*************************************************************************
+ *
+ *N  num_in_set
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function returns the number of elements in the given set.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    set     <input> == (set_type) set.
+ *    return <output> == (long int) number of elements in the set.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   July 1990                  DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    void bitset()    BITSTUFF.C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This function conforms to ANSI C standards.
+ *E
+ *************************************************************************/
+long int num_in_set( set_type set )
+{
+   register long int nbyte,bit,n=0, nbytes;
+   char byte;
+
+   nbytes = NBYTES(set);
+   for (nbyte=0;nbyte<nbytes;nbyte++) {
+      byte = set_byte(nbyte,set);
+      if (byte) {
+	 for (bit=0;bit<8;bit++)
+	    if (BITSET(bit,byte)) n++;
+      }
+   }
+   return n;
+}
+
+#if 0
+/*************************************************************************
+ *
+ *N  set_equal
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function determines whether two sets are equal to each other.
+ *     It returns TRUE or FALSE.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    a       <input> == (set_type) first set to compare.
+ *    b       <input> == (set_type) second set to compare.
+ *    return <output> == (int) TRUE if (a==b) or FALSE if (a!=b).
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   July 1990                  DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This function conforms to ANSI C standards.
+ *E
+ *************************************************************************/
+int  set_equal( set_type a,
+		set_type b )
+{
+   long int i, nbytes;
+
+   if (a.size != b.size) return FALSE;
+   if ((!a.diskstorage)&&(!b.diskstorage)) {
+      if (memcmp(a.buf,b.buf,NBYTES(a))==0)
+	 return TRUE;
+      else
+	 return FALSE;
+   } else {
+      nbytes = NBYTES(a);
+      for (i=0;i<nbytes;i++) {
+	 if (set_byte(i,a) != set_byte(i,b)) return FALSE;
+      }
+      return TRUE;
+   }
+}
+#endif
+
+/*************************************************************************
+ *
+ *N  set_assign
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function assigns set a to be equal to set b.  If a and b are
+ *     different sizes, the function will reallocate a to match b.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    a       <input> == (set_type *) set to be assigned.
+ *    b       <input> == (set_type) set to assign to a.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   July 1990                  DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This function conforms to ANSI C standards.
+ *E
+ *************************************************************************/
+void set_assign( set_type *a,
+		 set_type b )
+{
+   register long int nbytes, nbyte, bufsize;
+   char *buf;
+
+   nbytes = NBYTES(b);
+
+   if (!a->diskstorage && !b.diskstorage) {
+      if (a->size == b.size) {
+	 memcpy(a->buf,b.buf,nbytes);
+      } else {    /* a and b are different sizes */
+	 a->buf = (char *)realloc(a->buf,nbytes);
+	 if (a->buf==NULL) {
+	    a->diskstorage = 1;
+	    a->fp = tmpfile();
+	    fwrite(b.buf,1,nbytes,a->fp);
+	 } else {
+	    memcpy(a->buf,b.buf,nbytes);
+	 }
+	 a->size = b.size;
+      }
+   } else {
+      /* Either a or b or both are stored on disk */
+      if (a->diskstorage && !b.diskstorage) {
+	 rewind(a->fp);
+	 fwrite(b.buf,1,nbytes,a->fp);
+	 a->size = b.size;
+      } else {
+	 /* b.diskstorage must be true to get here */
+	 if (!a->diskstorage) {
+	    /* Force a->diskstorage */
+	    a->diskstorage = 1;
+	    if (a->size > 0) free(a->buf);
+	    a->fp = tmpfile();
+	 }
+
+	 /* Block copy file from b.fp to a->fp */
+	 nbyte = 0;
+	 rewind(b.fp);
+	 rewind(a->fp);
+	 while (nbyte < nbytes) {
+#ifdef __MSDOS__
+	    bufsize = (long int)min(nbytes-nbyte,farcoreleft()/2L);
+#else
+	    bufsize = (long int)(nbytes-nbyte);
+#endif
+	    buf = (char *)malloc(bufsize);
+	    fread(buf,bufsize,1,b.fp);
+	    fwrite(buf,bufsize,1,a->fp);
+	    free(buf);
+	    nbyte += bufsize;
+	 }
+
+	 a->size = b.size;
+      }
+   }
+}
+
+#if 0
+/*************************************************************************
+ *
+ *N  set_union
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     Return the set C such that C = (A U B).  C is initialized within
+ *     this function, and should be nuked when no longer needed.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    a       <input> == (set_type) set to be unioned.
+ *    b       <input> == (set_type) set to be unioned.
+ *    return <output> == (set_type) (A U B).
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   July 1990                  DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    set_type set_init()   SET.C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This function conforms to ANSI C standards.
+ *E
+ *************************************************************************/
+set_type set_union( set_type a,
+		    set_type b )
+{
+   register long int i, nbytes;
+   set_type c;
+   char byte;
+
+   c = set_init( (long int)max(a.size,b.size) );
+
+   nbytes = NBYTES(c);
+
+   for (i=0;i<nbytes;i++) {
+
+      byte = set_byte(i,a) | set_byte(i,b);
+
+      if (c.diskstorage) {
+	 if (byte) {
+	    fseek(c.fp,i,SEEK_SET);
+	    fwrite(&byte,1,1,c.fp);
+	 }
+      } else {
+	 c.buf[i] = byte;
+      }
+
+   }
+
+   return c;
+}
+#endif
+
+
+/*************************************************************************
+ *
+ *N  set_intersection
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     Return the set C such that C = (A o B).  C is initialized within
+ *     this function, and should be nuked when no longer needed.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    a       <input> == (set_type) set to be intersectioned.
+ *    b       <input> == (set_type) set to be intersectioned.
+ *    return <output> == (set_type) (A o B).
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   July 1990                  DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    set_type set_init()   SET.C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This function conforms to ANSI C standards.
+ *E
+ *************************************************************************/
+set_type set_intersection( set_type a,
+			   set_type b )
+{
+   register long int i, nbytes;
+   set_type c;
+   char byte;
+#ifdef __MSDOS__
+   c = set_init( (long int)max(a.size,b.size) );
+#else
+   c = set_init( a.size > b.size ? a.size : b.size );
+#endif
+
+   if (c.diskstorage) rewind(c.fp);
+
+   nbytes = NBYTES(c);
+   for (i=0;i<nbytes;i++) {
+      byte = set_byte(i,a) & set_byte(i,b);
+      if (c.diskstorage)
+	 fwrite(&byte,1,1,c.fp);
+      else
+	 c.buf[i] = byte;
+   }
+
+   return c;
+}
+
+#if 0
+/*************************************************************************
+ *
+ *N  set_difference
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     Return the set C such that C = (A - B).  C is initialized within
+ *     this function, and should be nuked when no longer needed.
+ *
+ *     NOTE:  This function can be sped up, if necessary, by direct
+ *     manipulation of the bytes and bits rather than the abstract
+ *     set function calls used presently.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    a       <input> == (set_type) set to subtract from.
+ *    b       <input> == (set_type) set to be subtracted.
+ *    return <output> == (set_type) (A - B).
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   July 1990                  DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    set_type set_init()   SET.C
+ *    int set_member()      SET.C
+ *    void set_insert()     SET.C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This function conforms to ANSI C standards.
+ *E
+ *************************************************************************/
+set_type set_difference( set_type a,
+			 set_type b )
+{
+   register long int i;
+   set_type c;
+
+   c = set_init( a.size );
+
+   for (i=0;i<=a.size;i++) {
+      if ( i > b.size ) {
+	 if (set_member(i,a)) set_insert( i, c );
+      } else {
+	 if ((set_member(i,a)) && (!set_member(i,b))) set_insert(i,c);
+      }
+   }
+
+   return c;
+}
+#endif
+
+/*************************************************************************
+ *
+ *N  set_nuke
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     Nucleate a set from existence.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    set     <inout> == (set_type *) set to be nuked.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   July 1990                  DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This function conforms to ANSI C standards.
+ *E
+ *************************************************************************/
+void set_nuke( set_type *set )
+{
+   if (set->diskstorage) {
+      fclose(set->fp);
+      unlink(set->buf);
+   }
+   free( set->buf );
+   set->size = -1;
+   set->diskstorage = 0;
+}
diff --git a/src/ossim/vpfutil/vpfclip.c b/ossim/src/ossim/vpfutil/vpfclip.c
similarity index 100%
rename from src/ossim/vpfutil/vpfclip.c
rename to ossim/src/ossim/vpfutil/vpfclip.c
diff --git a/src/ossim/vpfutil/vpfcntnt.c b/ossim/src/ossim/vpfutil/vpfcntnt.c
similarity index 100%
rename from src/ossim/vpfutil/vpfcntnt.c
rename to ossim/src/ossim/vpfutil/vpfcntnt.c
diff --git a/src/ossim/vpfutil/vpfdict.c b/ossim/src/ossim/vpfutil/vpfdict.c
similarity index 100%
rename from src/ossim/vpfutil/vpfdict.c
rename to ossim/src/ossim/vpfutil/vpfdict.c
diff --git a/ossim/src/ossim/vpfutil/vpfdisp.c b/ossim/src/ossim/vpfutil/vpfdisp.c
new file mode 100644
index 0000000..ca033c7
--- /dev/null
+++ b/ossim/src/ossim/vpfutil/vpfdisp.c
@@ -0,0 +1,504 @@
+/*************************************************************************
+ *
+ *N  Module VPFDISP - Display VPF records
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This module contains functions used to display VPF records in
+ *     human readable format.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    N/A
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels    May 1991                      DOS Turbo C
+ *E
+ *************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#if defined(__MINGW32__)
+#  include <dirent.h>
+#  include <malloc.h>
+#  include <mem.h>
+#  include <dos.h>
+#  ifdef __MSDOS__
+#    include <graphics.h>
+#    include <conio.h>
+#    include <dos.h>
+#    include <alloc.h>
+#    include <mem.h>
+#  endif
+#  ifdef _MSC_VER
+#    include <io.h>
+#  endif
+#  ifndef _WIN32
+#    include <unistd.h>
+#  endif
+#  ifdef __APPLE__
+#    include <sys/types.h>
+#    include <sys/malloc.h>
+#    define MAXSHORT 255
+#    define MAXLONG  LONG_MAX
+#  else
+#    include <malloc.h>
+#  endif
+#endif
+
+
+#include <string.h>
+#include <ctype.h>
+#include <math.h>
+#if defined(__CYGWIN__) || defined(__APPLE__)|| defined(_WIN32)
+#include <ossim/vpfutil/values.h>
+#else
+#include <ossim/vpfutil/values.h>
+#endif
+#include <ossim/vpfutil/vpfapi.h>
+#include <ossim/vpfutil/vpftable.h>
+#include <ossim/vpfutil/vpfview.h>
+
+#if (!defined(_WIN32)||defined(__CYGWIN__))
+#    include <unistd.h>  /* For "access" function. */
+#endif
+
+extern color_type menucolor, menubordercolor, menutextcolor;
+
+#ifndef __MSDOS__
+void strupr2(char* str) {
+  char* s = str;
+  while (*s)
+  {
+	  *s = toupper(*s);
+	  ++s;
+  }
+}
+#endif
+
+
+/*************************************************************************
+ *
+ *N  format_date
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function converts a VPF date value into a string of the
+ *     form  mm/dd/yyyy with time displayed as hh:mm:ss if non-zero.
+ *     'fmtdate' must be a character string with at least 18 bytes
+ *     allocated.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *     date     <input>==(date_type) VPF date type value.
+ *     fmtdate <output>==(char *) output formatted date string.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels    Sept 1991                     DOS Turbo C
+ *E
+ *************************************************************************/
+void format_date( date_type date, char *fmtdate )
+{
+   char year[8], month[8], day[8], hour[8], min[8], sec[8];
+
+   date[20]='\0';
+   strncpy(year, date, 4);
+   year[4]='\0';
+   strncpy(month, &date[4], 2);
+   month[2]='\0';
+   strncpy(day, &date[6], 2);
+   day[2]='\0';
+   strncpy(hour, &date[8], 2);
+   hour[2]='\0';
+   strncpy(min, &date[10], 2);
+   min[2]='\0';
+   strncpy(sec, &date[12], 2);
+   sec[2]='\0';
+   if ( (strcmp(hour,"00") == 0) && (strcmp(min,"00")==0) &&
+	(strcmp(sec,"00") == 0) )
+      sprintf(fmtdate,"%s/%s/%s",month,day,year);
+   else
+      sprintf(fmtdate,"%s/%s/%s %s:%s:%s",month,day,year,hour,min,sec);
+}
+
+/*************************************************************************
+ *
+ *N  vpf_display_record
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function displays all of the fields of a particular VPF
+ *     record, including the descriptions of the fields and their
+ *     values.  It accesses the online data dictionary metadata
+ *     contained in the specified Value Description Tables.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    row     <input> == (row_type) vpf table row structure.
+ *    table   <input> == (vpf_table_type) vpf table.
+ *    fp      <input> == (FILE *) pointer to the output file.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels    Sept 1991                     DOS Turbo C
+ *E
+ *************************************************************************/
+void vpf_display_record( row_type row,
+			 vpf_table_type table,
+			 FILE *fp )
+{
+   register int i,j;
+   char *buf,*num, path[128], *tablename;
+   char *attr,*val,*descr, vdtpath[128], fmtdate[40];
+   vpf_table_type vdt;
+   row_type vdtrow;
+   int found;
+   ossim_int32 l, lval, count, *lptr;
+   short int s,sval,*sptr;
+   float f,*fptr;
+   date_type date;
+   int TABLE_ = 1, ATTR_ = 2, VAL_ = 3, DESCR_ = 4;
+   vdt.status = CLOSED;
+   num = (char *)vpfmalloc(20*sizeof(char));
+
+   strcpy( vdtpath, "" );
+
+   /* Display all secondary attributes */
+   for (i=0;i<table.nfields;i++) {
+      switch (table.header[i].type) {
+	 case 'T':
+	    buf = (char *)get_table_element(i,row,table,
+					    NULL,&count);
+	    rightjust(buf);
+	    if (strcmp( buf, "" ) != 0) {
+	       fputs(table.header[i].name,fp);
+	       fputs(" - ",fp);
+	       fputs(table.header[i].description,fp);
+	       fputs(": ",fp);
+	       fputs(buf,fp);
+
+
+	       strcpy( path, table.path );
+	       strcat( path, table.header[i].vdt );
+	       if ( (access(path,4)==0) &&
+		    (strcmp(table.header[i].vdt,"") != 0) ) {
+
+		  if (strcmp(vdtpath,path) != 0) {
+		     if (strcmp(vdtpath,"") != 0) {
+			vpf_close_table(&vdt);
+		     }
+		     vdt = vpf_open_table( path, disk, "rb", NULL );
+		  }
+
+		  strcpy( vdtpath, path );
+		  for (j=1;j<=vdt.nrows;j++) {
+		     vdtrow = read_row( j, vdt );
+		     tablename = (char *)get_table_element( TABLE_, vdtrow,
+							 vdt, NULL, &count );
+		     rightjust(tablename);
+		     strupr2(tablename);
+		     attr = (char *)get_table_element( ATTR_, vdtrow, vdt,
+						       NULL, &count );
+		     rightjust(attr);
+		     val = (char *)get_table_element( VAL_, vdtrow, vdt,
+						      NULL, &count );
+		     rightjust(val);
+
+		     found = FALSE;
+		     if ( (strstr(table.name,tablename)) &&
+			  (ossim_strcasecmp(attr,table.header[i].name)==0) &&
+			  (ossim_strcasecmp(val,buf)==0) ) {
+			descr = (char *)get_table_element(DESCR_,vdtrow,vdt,
+							  NULL, &count);
+			rightjust(descr);
+			fputs(" (",fp);
+			fputs(descr,fp);
+			fputs(")",fp);
+
+			free(descr);
+			found = TRUE;
+		     }
+		     free(tablename);
+		     free(attr);
+		     free(val);
+		     free_row( vdtrow, vdt );
+		     if (found) break;
+		  }
+	       }
+
+
+	       fputc('\n',fp);
+	    }
+	    free(buf);
+	    break;
+	 case 'I':
+	    if (table.header[i].count==1) {
+	       get_table_element(i,row,table,&l,&count);
+	       if ((long int)l != NULLINT) {
+		  fputs(table.header[i].name,fp);
+		  fputs(" - ",fp);
+		  fputs(table.header[i].description,fp);
+		  fputs(": ",fp);
+		  ltoa((int)l,num,10);
+		  fputs(num,fp);
+
+		  strcpy( path, table.path );
+		  strcat( path, table.header[i].vdt );
+		  if ( (access(path,4)==0) &&
+		     (strcmp(table.header[i].vdt,"") != 0) ) {
+
+		     if (strcmp(vdtpath,path) != 0) {
+			if (strcmp(vdtpath,"") != 0) {
+			   vpf_close_table(&vdt);
+			}
+			vdt = vpf_open_table( path, disk, "rb", NULL );
+		     }
+		     strcpy( vdtpath, path );
+
+		     for (j=1;j<=vdt.nrows;j++) {
+			vdtrow = read_row( j, vdt );
+			tablename = (char *)get_table_element( TABLE_,
+					      vdtrow, vdt, NULL, &count );
+			rightjust(tablename);
+			strupr2(tablename);
+			attr = (char *)get_table_element( ATTR_, vdtrow, vdt,
+							  NULL, &count );
+			rightjust(attr);
+			get_table_element( VAL_, vdtrow, vdt,
+					   &lval, &count );
+
+			found = FALSE;
+			if ( (strstr(table.name,tablename)) &&
+			   (ossim_strcasecmp(attr,table.header[i].name)==0) &&
+			   (lval==l) ) {
+			   descr = (char *)get_table_element(DESCR_,vdtrow,
+							 vdt, NULL, &count);
+			   rightjust(descr);
+			   fputs(" (",fp);
+			   fputs(descr,fp);
+			   fputs(")",fp);
+
+			   free(descr);
+			   found = TRUE;
+			}
+			free(tablename);
+			free(attr);
+			free_row( vdtrow, vdt );
+			if (found) break;
+		     }
+		  }
+
+		  fputc('\n',fp);
+	       }
+	    } else {
+	       get_table_element(i,row,table,&lptr,&count);
+	       fputs(table.header[i].name,fp);
+	       fputs(" - ",fp);
+	       fputs(table.header[i].description,fp);
+	       fputs(": (",fp);
+	       for (j=0;j<count;j++) {
+		  ltoa((int)lptr[j],num,10);
+		  fputs(num,fp);
+		  if (j<count-1) fputs(", ",fp);
+	       }
+	       fputs(")\n",fp);
+	    }
+	    break;
+	 case 'S':
+	    if (table.header[i].count==1) {
+	       get_table_element(i,row,table,&s,&count);
+	       if (s != NULLSHORT) {
+		  fputs(table.header[i].name,fp);
+		  fputs(" - ",fp);
+		  fputs(table.header[i].description,fp);
+		  fputs(": ",fp);
+		  itoa(s,num,10);
+		  fputs(num,fp);
+
+		  strcpy( path, table.path );
+		  strcat( path, table.header[i].vdt );
+		  if ( (access(path,4)==0) &&
+		     (strcmp(table.header[i].vdt,"") != 0) ) {
+
+		     if (strcmp(vdtpath,path) != 0) {
+			if (strcmp(vdtpath,"") != 0) {
+			   vpf_close_table(&vdt);
+			}
+			vdt = vpf_open_table( path, disk, "rb", NULL );
+		     }
+		     strcpy( vdtpath, path );
+
+		     for (j=1;j<=vdt.nrows;j++) {
+			vdtrow = read_row( j, vdt );
+			tablename = (char *)get_table_element( TABLE_,
+					      vdtrow, vdt, NULL, &count );
+			rightjust(tablename);
+			strupr2(tablename);
+			attr = (char *)get_table_element( ATTR_, vdtrow, vdt,
+							  NULL, &count );
+			rightjust(attr);
+			get_table_element( VAL_, vdtrow, vdt,
+					   &sval, &count );
+
+			found = FALSE;
+			if ( (strstr(table.name,tablename)) &&
+			   (ossim_strcasecmp(attr,table.header[i].name)==0) &&
+			   (sval==s) ) {
+			   descr = (char *)get_table_element(DESCR_,vdtrow,
+							 vdt, NULL, &count);
+			   rightjust(descr);
+			   fputs(" (",fp);
+			   fputs(descr,fp);
+			   fputs(")",fp);
+
+			   free(descr);
+			   found = TRUE;
+			}
+			free(tablename);
+			free(attr);
+			free_row( vdtrow, vdt );
+			if (found) break;
+		     }
+		  }
+
+		  fputc('\n',fp);
+	       }
+	    } else {
+	       get_table_element(i,row,table,&sptr,&count);
+	       fputs(table.header[i].name,fp);
+	       fputs(" - ",fp);
+	       fputs(table.header[i].description,fp);
+	       fputs(": (",fp);
+	       for (j=0;j<count;j++) {
+		  itoa(sptr[j],num,10);
+		  fputs(num,fp);
+		  if (j<count-1) fputs(", ",fp);
+	       }
+	       fputs(")\n",fp);
+	    }
+	    break;
+	 case 'F':
+	    if (table.header[i].count==1) {
+	       get_table_element(i,row,table,&f,&count);
+	       if (!is_vpf_null_float(f)) {
+		  fputs(table.header[i].name,fp);
+		  fputs(" - ",fp);
+		  fputs(table.header[i].description,fp);
+		  fputs(": ",fp);
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
+		  gcvt(f,6,num);
+#endif
+		  fputs(num,fp);
+		  fputc('\n',fp);
+	       }
+	    } else {
+	       get_table_element(i,row,table,&fptr,&count);
+	       fputs(table.header[i].name,fp);
+	       fputs(" - ",fp);
+	       fputs(table.header[i].description,fp);
+	       fputs(": (",fp);
+	       for (j=0;j<count;j++) {
+		  if (is_vpf_null_float(fptr[j])) {
+		     fputs("(null)",fp);
+		  } else {
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
+		     gcvt(fptr[j],6,num);
+#endif
+		     fputs(num,fp);
+		  }
+		  if (j<count-1) fputs(", ",fp);
+	       }
+	       fputs(")\n",fp);
+	    }
+	    break;
+	 case 'D':
+	    if (table.header[i].count==1) {
+	       get_table_element(i,row,table,date,&count);
+	       fputs(table.header[i].name,fp);
+	       fputs(" - ",fp);
+	       fputs(table.header[i].description,fp);
+	       fputs(": ",fp);
+	       format_date(date,fmtdate);
+	       fputs(fmtdate,fp);
+	       fputc('\n',fp);
+	    }
+	    break;
+      }
+   }
+
+   if (strcmp(vdtpath,"") != 0)
+      vpf_close_table( &vdt );
+
+   free(num);
+}
+
+
+
+
+/*************************************************************************
+ *
+ *N  display_attributes
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function displays all of the attributes of a particular
+ *     feature, including the descriptions of the fields and their
+ *     values.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    fc      <input> == (int) feature class number.
+ *    row     <input> == (ossim_int32) row of the attribute table.
+ *    library <input> == (library_type *) VPF library structure.
+ *    fp      <input> == (FILE *) pointer to the output file.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels    May 1991                      DOS Turbo C
+ *E
+ *************************************************************************/
+void display_attributes( int fc,
+			 ossim_int32 row,
+			 library_type *library,
+			 FILE *fp )
+{
+   vpf_table_type feature_table;
+   row_type vpfrow;
+
+   feature_table = vpf_open_table(library->fc[fc].table,disk,"rb",NULL);
+
+   vpfrow = read_row( row, feature_table );
+
+   vpf_display_record( vpfrow, feature_table, fp );
+
+   free_row(vpfrow,feature_table);
+
+   vpf_close_table(&feature_table);
+}
diff --git a/src/ossim/vpfutil/vpfdraw.c b/ossim/src/ossim/vpfutil/vpfdraw.c
similarity index 100%
rename from src/ossim/vpfutil/vpfdraw.c
rename to ossim/src/ossim/vpfutil/vpfdraw.c
diff --git a/src/ossim/vpfutil/vpfmisc.c b/ossim/src/ossim/vpfutil/vpfmisc.c
similarity index 100%
rename from src/ossim/vpfutil/vpfmisc.c
rename to ossim/src/ossim/vpfutil/vpfmisc.c
diff --git a/src/ossim/vpfutil/vpfnear.c b/ossim/src/ossim/vpfutil/vpfnear.c
similarity index 100%
rename from src/ossim/vpfutil/vpfnear.c
rename to ossim/src/ossim/vpfutil/vpfnear.c
diff --git a/src/ossim/vpfutil/vpfprim.c b/ossim/src/ossim/vpfutil/vpfprim.c
similarity index 100%
rename from src/ossim/vpfutil/vpfprim.c
rename to ossim/src/ossim/vpfutil/vpfprim.c
diff --git a/src/ossim/vpfutil/vpfptply.c b/ossim/src/ossim/vpfutil/vpfptply.c
similarity index 100%
rename from src/ossim/vpfutil/vpfptply.c
rename to ossim/src/ossim/vpfutil/vpfptply.c
diff --git a/src/ossim/vpfutil/vpfquery.c b/ossim/src/ossim/vpfutil/vpfquery.c
similarity index 100%
rename from src/ossim/vpfutil/vpfquery.c
rename to ossim/src/ossim/vpfutil/vpfquery.c
diff --git a/ossim/src/ossim/vpfutil/vpfread.c b/ossim/src/ossim/vpfutil/vpfread.c
new file mode 100644
index 0000000..ff4d4e2
--- /dev/null
+++ b/ossim/src/ossim/vpfutil/vpfread.c
@@ -0,0 +1,1649 @@
+/*************************************************************************
+ *
+ *N  Module VPFREAD.C
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This module contains functions for reading VPF tables.  It, along
+ *     with VPFTABLE.C and VPFWRITE.C (and VPFIO.C for UNIX), comprises a
+ *     fairly extensive set of functions for handling VPF tables.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    N/A
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   May 1991  Original Version   DOS Turbo C
+ *    David Flinn      Jul 1991	 Merged with Barry & Mody's code for UNIX
+ *    Jim TenBrink     Oct 1991  Split this module off from vpftable and
+ *                               merged converter and vpfview branches
+ *                               for the functions included here..
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.  It includes #ifdefs for
+ *    all system dependencies, so that it will work efficiently with
+ *    either Turbo C in DOS or (at least) GNU C in UNIX.
+ *E
+ *
+ *************************************************************************/
+
+#include <ossim/vpfutil/machine.h>
+
+#ifdef __MSDOS__
+#include <mem.h>
+#include <io.h>
+#include <alloc.h>
+#include <dos.h>
+#include <graphics.h>
+#else
+#ifndef _WIN32
+#include <unistd.h>
+#endif
+#endif
+
+#if UNIX
+#include <sys/stat.h>
+#define   SEEK_SET    0         /* Turbo C fseek value */
+#define   SEEK_CUR    1
+#define   farmalloc   malloc    /* no farmallocs on UNIX */
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <ossim/vpfutil/vpftable.h>
+#include <ossim/vpfutil/vpfmisc.h>
+#  ifndef min
+#    define min(a,b) ((a) <= (b) ? (a) : (b))
+#  endif
+#  ifndef max
+#    define max(a,b) ((a) <= (b) ? (b) : (a))
+#  endif
+
+extern int STORAGE_BYTE_ORDER;
+
+
+/* Repeat functions statically to reduce external module dependencies */
+
+/*
+ * currently being used by the converter routines, not by the vpfview
+ * routines
+ */
+static char * get_line (FILE *fp)
+{
+  ossim_int32 CurrentChar,   /* This is an int because fgetc returns an int */
+      count ,
+      NextBlock = 256 ,
+      LineAllocation = 0 ;
+  char *CurrentLine = (char *) NULL ;
+
+/* This forever loop searches past all lines beginning with #,
+   indicating comments. */
+
+  for (;;) {
+      CurrentChar = fgetc(fp);
+      if ( CurrentChar == COMMENT )             /* skip past comment line */
+        for (;CurrentChar != NEW_LINE; ) {
+          if (CurrentChar == EOF) return (char *) NULL ;
+          CurrentChar = fgetc (fp) ;
+        }
+      else
+        break ;
+    }  /* end of forever loop */
+
+  if (CurrentChar == EOF ) return (char *) NULL ;
+
+  for(count = 0; CurrentChar != EOF; CurrentChar = fgetc(fp), count++) {
+
+    /* Allocate space for output line, if needed */
+ 
+    if (! ( count < LineAllocation )) {
+      LineAllocation += NextBlock ;
+      if ( CurrentLine )
+        CurrentLine = (char *) realloc ( CurrentLine, LineAllocation );
+      else
+        CurrentLine = (char *) vpfmalloc ( LineAllocation );
+      if (!CurrentLine) {
+        return (char *) NULL ;
+      }
+    }  
+    if ( ( CurrentChar == (ossim_int32) LINE_CONTINUE ) ) {
+      CurrentChar = fgetc(fp ) ;        /* read character after backslash */
+      /* A newline will be ignored and thus skipped over */
+      if ( CurrentChar == (ossim_int32) SPACE )  /* Assume line continue error */
+        while ( fgetc (fp) != (ossim_int32) SPACE ) ;
+      else if (CurrentChar != (ossim_int32) NEW_LINE ) {
+        /* copy it if not new line */
+        CurrentLine[count++] = (char) LINE_CONTINUE ;
+        CurrentLine[count] = (char) CurrentChar ;
+      } else
+        count -- ;      /* Decrement the counter on a newline character */
+    } else if (CurrentChar == (ossim_int32) NEW_LINE )     /* We're done */
+        break;
+    else
+      CurrentLine[count] = (char)CurrentChar;
+
+  }  /* end of for count */
+
+  CurrentLine[count] = '\0';  /* terminate string */
+  return CurrentLine ;
+
+}
+
+
+/* #if UNIX */
+
+ossim_int32 VpfRead ( void *to, VpfDataType type, ossim_int32 count, FILE *from )
+{
+  ossim_int32 retval=0 , i ;
+
+  switch ( type ) {
+  case VpfChar:
+    retval = (long)fread ( to, sizeof (char), count, from ) ;
+    break ;
+  case VpfShort:
+    {
+      short int stemp ,
+                *sptr = (short *) to ;
+      for ( i=0; i < count; i++ ) {
+	retval = (long)fread ( &stemp, sizeof (short), 1, from ) ;
+	if (STORAGE_BYTE_ORDER != MACHINE_BYTE_ORDER)
+	   swap_two ( (char*)&stemp, (char*)sptr ) ;
+	else
+	   *sptr = stemp;
+        sptr++ ;
+      }
+    }  
+    break ;
+  case VpfInteger:
+    {
+      if (STORAGE_BYTE_ORDER != MACHINE_BYTE_ORDER) {
+	ossim_int32 itemp,
+	  *iptr = (ossim_int32 *) to ;
+	for ( i=0; i < count; i++ ) {
+	  retval = (long)fread ( &itemp, sizeof (ossim_int32), 1, from ) ;
+	  swap_four ( (char*)&itemp, (char*)iptr ) ;
+	  iptr++ ;
+	}
+      } else {
+	retval = (long)fread ( to, sizeof (ossim_int32), count, from ) ;
+      }
+    }  
+    break ;
+  case VpfFloat:
+    {
+      float ftemp ,
+            *fptr = (float *) to ;
+      for ( i=0; i < count; i++ ) {
+        retval = (long)fread ( &ftemp, sizeof (float), 1, from ) ;
+	if (STORAGE_BYTE_ORDER != MACHINE_BYTE_ORDER)
+	   swap_four ( (char*)&ftemp, (char*)fptr ) ;
+	else
+	   *fptr = ftemp;
+	fptr++ ;
+      }
+    }
+    break ;
+  case VpfDouble:
+    {
+      double dtemp ,
+             *dptr = (double *) to ;
+      for ( i=0; i < count; i++ ) {
+        retval = (long)fread ( &dtemp, sizeof (double), 1, from ) ;
+	if (STORAGE_BYTE_ORDER != MACHINE_BYTE_ORDER)
+	   swap_eight ( (char*)&dtemp, (char*)dptr ) ;
+	else
+	   *dptr = dtemp;
+	dptr++ ;
+      }
+    }
+    break ;
+  case VpfDate:
+    {
+      date_type *dp = (date_type *) to ;
+      retval = (long)fread(dp,sizeof(date_type)-1,count,from);
+    }
+    break ;
+  case VpfCoordinate:
+    {
+      if (STORAGE_BYTE_ORDER != MACHINE_BYTE_ORDER) {
+	 coordinate_type ctemp ,
+		      *cptr = (coordinate_type *) to ;
+	 for ( i=0; i < count; i++ ) {
+	   retval = (long)fread ( &ctemp, sizeof (coordinate_type), 1, from ) ;
+	   swap_four ( (char*)&ctemp.x, (char*)&cptr->x ) ;
+	   swap_four ( (char*)&ctemp.y, (char*)&cptr->y ) ;
+	   cptr++ ;
+	 }
+      } else {
+	 retval = (long)fread ( to, sizeof (coordinate_type), count, from ) ;
+      }
+    }  
+    break ;
+  case VpfDoubleCoordinate:
+    {
+      double_coordinate_type dctemp ,
+                             *dcptr = (double_coordinate_type *) to ;
+      for ( i=0; i < count; i++ ) {
+        retval = (long)fread ( &dctemp, sizeof (double_coordinate_type), 1, from ) ;
+	if (STORAGE_BYTE_ORDER != MACHINE_BYTE_ORDER) {
+	   swap_eight ( (char*)&dctemp.x, (char*)&dcptr->x ) ;
+	   swap_eight ( (char*)&dctemp.y, (char*)&dcptr->y ) ;
+	} else {
+	   dcptr->x = dctemp.x;
+	   dcptr->y = dctemp.y;
+	}
+	dcptr++ ;
+      }
+    }
+    break ;
+  case VpfTriCoordinate:
+    {
+      tri_coordinate_type ttemp ,
+                          *tptr = (tri_coordinate_type *) to ;
+      for ( i=0; i < count; i++ ) {
+        retval = (long)fread ( &ttemp, sizeof (tri_coordinate_type), 1, from ) ;
+	if (STORAGE_BYTE_ORDER != MACHINE_BYTE_ORDER) {
+	   swap_four ( (char*)&ttemp.x, (char*)&tptr->x ) ;
+	   swap_four ( (char*)&ttemp.y, (char*)&tptr->y ) ;
+	   swap_four ( (char*)&ttemp.z, (char*)&tptr->z ) ;
+	} else {
+	   tptr->x = ttemp.x;
+	   tptr->y = ttemp.y;
+	   tptr->z = ttemp.z;
+	}
+	tptr++ ;
+      }
+    }
+    break ;
+  case VpfDoubleTriCoordinate:
+    {
+      double_tri_coordinate_type dttemp ,
+                                 *dtptr = (double_tri_coordinate_type *) to ;
+      for ( i=0; i < count; i++ ) {
+        retval = (long)fread ( &dttemp, sizeof (double_tri_coordinate_type), 1, from);
+	if (STORAGE_BYTE_ORDER != MACHINE_BYTE_ORDER) {
+	   swap_eight ( (char*)&dttemp.x, (char*)&dtptr->x ) ;
+	   swap_eight ( (char*)&dttemp.y, (char*)&dtptr->y ) ;
+	   swap_eight ( (char*)&dttemp.z, (char*)&dtptr->z ) ;
+	} else {
+	   dtptr->x = dttemp.x;
+	   dtptr->y = dttemp.y;
+	   dtptr->z = dttemp.z;
+	}
+	dtptr++ ;
+      }
+    }  
+    break ;
+  case VpfNull:
+    /* Do Nothing */
+    break ;
+  default:
+    break ;
+  }   /* end of switch */
+
+  return retval ;       /* whatever fread returns */
+
+}
+
+/* #endif */
+
+
+
+/*************************************************************************
+ *
+ *N  read_text_defstr
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function reads the definition string from an input file for
+ *     creating a VPF table.
+ *     Currently being used by converter routines, not by vpfview routines.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    infile  <input> == (FILE *) file pointer to the input file.
+ *    outerr  <input> == (FILE *) file pointer to the error file.
+ *    return <output> == (char *) definition string of the file.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Dave Flinn       July 1991      Original version developed for UNIX
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    get_line()
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+char *read_text_defstr ( FILE *infile, FILE * outerr )
+{
+  char *definition ;
+
+  rewind ( infile );
+
+  if (( (definition = get_line (infile )) == NULL ) ||
+      ( definition[strlen(definition)-1] != ';' )) {
+    return (char *) NULL ;
+  }
+
+  return definition ;
+
+}
+
+#if UNIX
+/*
+ * currently being used by converter routines, not by vpfview
+ * routines
+ */
+int add_null_values ( char *name, vpf_table_type table, FILE * fpout )
+{
+  FILE *nullfp=0;
+  ossim_int32  i , ptr ;
+  char *cval=0, *line=0, *field=0 ;
+ 
+  nullfp = fopen( name, "r");
+  if ( !nullfp )
+    return 0;
+ 
+  /* Now read nulls from file and populate table structure */
+
+  while ( (line = get_line ( nullfp )) ) {
+ 
+    ptr = 0 ;
+    field = get_string ( &ptr, line, FIELD_SEPERATOR ) ;
+    i = table_pos ( field, table ) ;
+ 
+    switch ( table.header[i].type ) {
+    case 'T':
+      cval = get_string ( &ptr, line, FIELD_SEPERATOR ) ;
+      free ( table.header[i].nullval.Char ) ;   /* get rid of default */
+      table.header[i].nullval.Char = (char *) vpfmalloc ( (unsigned long)strlen (cval)+1) ;
+      strcpy ( table.header[i].nullval.Char, cval ) ;
+      free (cval) ;
+      break ;
+    case 'I':
+      table.header[i].nullval.Int = get_number ( &ptr, line, FIELD_SEPERATOR );
+      break ;
+    case 'S':
+      table.header[i].nullval.Short =
+        (short int) get_number ( &ptr, line, FIELD_SEPERATOR );
+      break ;
+    case 'R':
+      cval = get_string ( &ptr, line, FIELD_SEPERATOR ) ;
+      table.header[i].nullval.Double = atof ( cval ) ;
+      free ( cval ) ;
+      break ;
+    case 'F':
+      cval = get_string ( &ptr, line, FIELD_SEPERATOR ) ;
+      table.header[i].nullval.Float = (float) atof ( cval ) ;
+      free ( cval ) ;
+      break ;
+    default:
+          free(field);fclose(nullfp);
+      return 0 ;
+      break ;
+    }
+    free(field);
+    free(line);
+  }
+  fclose(nullfp);
+  return 1 ;
+}
+#endif
+
+/*************************************************************************
+ *
+ *N  index_length
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function returns the length of a specified row from the table
+ *     index.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    row_number <input> == (ossim_int32) row number in the table.
+ *    table      <input> == (vpf_table_type) VPF table structure.
+ *    return    <output> == (ossim_int32) length of the table row or 0 on error.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   May 1991       Original Version   DOS Turbo C
+ *    Dave Flinn       July 1991      UNIX extensions
+ *    JTB              10/91          removed aborts()
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+ossim_int32 index_length( ossim_int32 row_number,
+		       vpf_table_type table )
+{
+   ossim_int32   recsize,len=0;
+   ossim_uint32 ulen;
+   long  int pos;
+
+   STORAGE_BYTE_ORDER = table.byte_order;
+
+   if (row_number < 1) row_number = 1;
+   if (row_number > table.nrows) row_number = table.nrows;
+
+   switch (table.xstorage) {
+      case COMPUTE:
+	 len = table.reclen;
+	 break;
+      case DISK:
+	 recsize = sizeof(index_cell);
+	 fseek( table.xfp, (ossim_int32)(row_number*recsize), SEEK_SET );
+
+	 if ( ! Read_Vpf_Int(&pos,table.xfp,1) ) {
+	   len = (ossim_int32)0 ;
+	 }
+
+	 if ( ! Read_Vpf_Int(&ulen,table.xfp,1) ) {
+	   return (ossim_int32)0 ;
+	 }
+	 len = ulen;
+	 break;
+      case RAM:
+	 len = table.index[row_number-1].length;
+	 break;
+      default:
+	if ( table.mode == Write && table.nrows != row_number ) {
+	   /* Just an error check, should never get here in writing */
+	   fprintf(stderr,"\nindex_length: error trying to access row %d",
+		   (int)row_number ) ;
+	   len = (ossim_int32)0 ;
+	}
+	break;
+   }
+   return len;
+}
+
+/*************************************************************************
+ *
+ *N  index_pos
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function returns the position of a specified row from the table
+ *     index.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    row_number <input> == (ossim_int32) row number in the table.
+ *    table      <input> == (vpf_table_type) VPF table structure.
+ *    return    <output> == (ossim_int32) position of the table row 
+ *                          or zero on error.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   May 1991       Original Version   DOS Turbo C
+ *    Dave Flinn       July 1991      Updated for UNIX
+ *    JTB              10/91          removed aborts()
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+ossim_int32 index_pos( ossim_int32 row_number,
+		    vpf_table_type table )
+{
+   ossim_int32   recsize;
+   ossim_uint32 pos=0;
+
+   STORAGE_BYTE_ORDER = table.byte_order;
+
+   if (row_number < 1) row_number = 1;
+   if (row_number > table.nrows) row_number = table.nrows;
+
+   switch (table.xstorage) {
+      case COMPUTE:
+	 pos = table.ddlen + ((row_number-1) * table.reclen);
+	 break;
+      case DISK:
+	 recsize = sizeof(index_cell);
+	 fseek( table.xfp, (ossim_int32)(row_number*recsize), SEEK_SET );
+	 if ( ! Read_Vpf_Int(&pos,table.xfp,1) ) {
+	   pos = (ossim_uint32)0 ;
+	 }
+	 break;
+      case RAM:
+	 pos = table.index[row_number-1].pos;
+	 break;
+      default:
+	 if ( table.mode == Write && table.nrows != row_number ) {
+	   /* Just an error check, should never get here in writing */
+	   fprintf(stderr,"\nindex_length: error trying to access row %d",
+		   (int)row_number ) ;
+	   pos = (ossim_uint32)0;
+	 }
+	 break;
+   }
+   return pos;
+}
+
+#if 0
+/* Compute the offset from the start of the row to the given field */
+static ossim_int32 row_offset( int field, row_type row, vpf_table_type table)
+{
+   ossim_int32 offset,n,size;
+   int i;
+   id_triplet_type key;
+   int keysize[] = {0,sizeof(char),sizeof(short int),sizeof(ossim_int32)};
+
+   if (field < 0 || field >= table.nfields) return -1;
+
+   offset = 0L;
+   for (i=0;i<field;i++) {
+      switch (table.header[i].type) {
+	 case 'I':
+	    offset += sizeof(ossim_int32)*row[i].count;
+	    break;
+	 case 'S':
+	    offset += sizeof(short int)*row[i].count;
+	    break;
+	 case 'T':
+	    offset += sizeof(char)*row[i].count;
+	    break;
+	 case 'F':
+	    offset += sizeof(float)*row[i].count;
+	    break;
+	 case 'D':
+	    offset += sizeof(date_type)*row[i].count;
+	    break;
+	 case 'K':
+	    get_table_element(i,row,table,&key,&n);
+	    size = sizeof(char) +
+		   keysize[TYPE0(key.type)] +
+		   keysize[TYPE1(key.type)] +
+		   keysize[TYPE2(key.type)];
+	    offset += size*row[i].count;
+	    break;
+	 case 'R':
+	    offset += sizeof(double)*row[i].count;
+	    break;
+	 case 'C':
+	    offset += sizeof(coordinate_type)*row[i].count;
+	    break;
+	 case 'B':
+	    offset += sizeof(double_coordinate_type)*row[i].count;
+	    break;
+	 case 'Z':
+	    offset += sizeof(tri_coordinate_type)*row[i].count;
+	    break;
+	 case 'Y':
+	    offset += sizeof(double_tri_coordinate_type)*row[i].count;
+	    break;
+      }
+   }
+   return offset;
+}
+#endif
+
+/*************************************************************************
+ *
+ *N  read_key
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function reads an id triplet key from a VPF table.
+ *     The table must be open for read.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    table    <input>  == (vpf_table_type) VPF table.
+ *    read_key <output> == (id_triplet_type) id triplet key.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   May 1991       Original Version   DOS Turbo C
+ *    Dave Flinn       July 1991      Updated for UNIX
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+id_triplet_type read_key( vpf_table_type table )
+{
+   id_triplet_type key;
+   unsigned char ucval;
+   unsigned short int uival;
+
+   STORAGE_BYTE_ORDER = table.byte_order;
+
+   key.id = 0L;
+   key.tile = 0L;
+   key.exid = 0L;
+
+   /* just doing this to be consistent */
+   Read_Vpf_Char (&(key.type),table.fp,1);
+
+   switch (TYPE0(key.type)) {
+      case 0:
+	 break;
+      case 1:
+
+	 Read_Vpf_Char (&ucval, table.fp, 1 ) ;
+	 key.id = (ossim_int32)ucval;
+	 break;
+      case 2:
+
+	 Read_Vpf_Short (&uival, table.fp, 1 ) ;
+	 key.id = (ossim_int32)uival;
+	 break;
+      case 3:
+
+	 Read_Vpf_Int (&(key.id), table.fp, 1 ) ;
+	 break;
+   }
+   switch (TYPE1(key.type)) {
+   case 0:
+     break;
+   case 1:
+     Read_Vpf_Char (&ucval, table.fp, 1 ) ;
+     key.tile = (ossim_int32)ucval;
+     break;
+   case 2:
+     Read_Vpf_Short (&uival, table.fp, 1 ) ;
+     key.tile = (ossim_int32)uival;
+     break;
+   case 3:
+     Read_Vpf_Int (&(key.tile), table.fp, 1 ) ;
+     break;
+   }
+
+   switch (TYPE2(key.type)) {
+   case 0:
+     break;
+   case 1:
+     Read_Vpf_Char (&ucval, table.fp, 1 ) ;
+     key.exid = (ossim_int32)ucval;
+     break;
+   case 2:
+     Read_Vpf_Short (&uival, table.fp, 1 ) ;
+     key.exid = (ossim_int32)uival;
+     break;
+   case 3:
+     Read_Vpf_Int (&(key.exid), table.fp, 1 ) ;
+     break;
+   }
+
+   return key;
+ }
+
+/*************************************************************************
+ *
+ *N  read_next_row
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function reads the next row of the table.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    table      <input> == (vpf_table_type) vpf table structure.
+ *    return    <output> == (row_type) the next row in the table.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   May 1991       Original Version   DOS Turbo C
+ *    Dave Flinn       July 1991      Updated for UNIX
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    void *vpfmalloc()
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+row_type read_next_row( vpf_table_type table )
+{
+   register ossim_int32 i,j;
+   ossim_int32      status;
+   char     *tptr;
+   ossim_int32 size,count;
+   row_type row;
+   id_triplet_type * keys;
+   coordinate_type dummycoord;
+
+   if (feof(table.fp)) {
+      return NULL;
+   }
+
+   STORAGE_BYTE_ORDER = table.byte_order;
+
+   row = (row_type)vpfmalloc((table.nfields+1) * sizeof(column_type));
+
+   for (i=0;i<table.nfields;i++) row[i].ptr = NULL;
+
+   for (i=0;i<table.nfields;i++) {
+      if (table.header[i].count < 0) {
+
+	 Read_Vpf_Int (&count,table.fp,1) ;
+
+      } else {
+	 count = table.header[i].count;
+      }
+      row[i].count = count;
+
+      status = 0;
+      switch (table.header[i].type) {
+	 case 'T':
+	    if (count == 1) {
+	       row[i].ptr = (char *)vpfmalloc(sizeof(char));
+	       Read_Vpf_Char(row[i].ptr, table.fp, 1) ;
+	    } else {
+	       size = count*sizeof(char);
+	       row[i].ptr = (char *)vpfmalloc(size+2);
+	       tptr = (char *)vpfmalloc(size+2);
+	       Read_Vpf_Char(tptr,table.fp,count) ;
+	       tptr[count] = '\0';
+	       strcpy((char*)row[i].ptr,(char*)tptr);
+	       free(tptr);
+	    }
+	    break;
+	 case 'I':
+	    row[i].ptr = (ossim_int32 *)vpfmalloc(count*sizeof(ossim_int32));
+	    Read_Vpf_Int (row[i].ptr, table.fp, count ) ;
+	    break;
+	 case 'S':
+	    row[i].ptr = (short int *)vpfmalloc(count*sizeof(short int));
+	    Read_Vpf_Short (row[i].ptr, table.fp, count ) ;
+	    break;
+	 case 'F':
+	    row[i].ptr = (float *)vpfmalloc(count*sizeof(float));
+	    Read_Vpf_Float (row[i].ptr, table.fp, count ) ;
+	    break;
+	 case 'R':
+	    row[i].ptr = (double *)vpfmalloc(count*sizeof(double));
+	    Read_Vpf_Double (row[i].ptr, table.fp, count ) ;
+	    break;
+	 case 'D':
+	    row[i].ptr = (date_type *)vpfmalloc(count*sizeof(date_type));
+	    Read_Vpf_Date (row[i].ptr, table.fp, count ) ;
+	    break;
+	 case 'C':
+	    /* Coordinate strings may be quite large.          */
+	    /* Allow for null coordinate string pointer if     */
+	    /* not enough memory that can be handled one       */
+	    /* coordinate at a time in higher level functions. */
+	    row[i].ptr = (coordinate_type *)malloc(count*
+			 sizeof(coordinate_type));
+	    if (row[i].ptr)
+	       Read_Vpf_Coordinate(row[i].ptr,table.fp,count);
+	    else
+	       for (j=0;j<count;j++)
+		  Read_Vpf_Coordinate(&dummycoord,table.fp,1);
+	    break;
+	 case 'Z':
+	    row[i].ptr = (tri_coordinate_type *)vpfmalloc(count*
+			 sizeof(tri_coordinate_type));
+	    Read_Vpf_CoordinateZ(row[i].ptr,table.fp,count);
+	    break;
+	 case 'B':
+	    row[i].ptr = (double_coordinate_type *)vpfmalloc(count*
+			 sizeof(double_coordinate_type));
+	    Read_Vpf_DoubleCoordinate(row[i].ptr,table.fp,count);
+	    break;
+	 case 'Y':
+	    row[i].ptr = (double_tri_coordinate_type *)vpfmalloc(count*
+			 sizeof(double_tri_coordinate_type));
+	    Read_Vpf_DoubleCoordinateZ(row[i].ptr,table.fp,count);
+	    break;
+	 case 'K':   /* ID Triplet */
+	    row[i].ptr = (id_triplet_type *)vpfmalloc(count*
+			 sizeof(id_triplet_type));
+	    keys = (id_triplet_type *)vpfmalloc(count*
+		   sizeof(id_triplet_type));
+	    for (j=0;j<count;j++) {
+	       keys[j] = read_key(table);
+	    }
+	    memcpy(row[i].ptr,keys,count*sizeof(id_triplet_type));
+	    free(keys);
+	    break;
+	 case 'X':
+	    row[i].ptr = NULL;
+	    break;
+	  default:
+	    fprintf(stderr,"\n%s%s >>> read_next_row: no such type < %c >",
+		table.path,table.name,table.header[i].type ) ;
+	    status = 1;
+	    break ;
+	  }   /* end of switch */
+      if (status == 1) {
+	 free_row ( row, table ) ;
+	 return (row_type) NULL;
+      }
+   }
+   return row;
+}
+
+/*************************************************************************
+ *
+ *N  rowcpy
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function returns a copy of the specified row.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    origrow    <input> == (row_type) row to copy.
+ *    table      <input> == (vpf_table_type) vpf table structure.
+ *    return    <output> == (row_type) copy of the row.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   May 1991                     DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    void *vpfmalloc()                            VPFMISC.C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+row_type rowcpy( row_type origrow,
+		 vpf_table_type table )
+{
+   register ossim_int32 i;
+   ossim_int32      count;
+   ossim_int32 size;
+   row_type row;
+
+   row = (row_type)vpfmalloc(table.nfields * sizeof(column_type));
+   for (i=0;i<table.nfields;i++) {
+      count = origrow[i].count;
+      row[i].count = count;
+      switch (table.header[i].type) {
+	 case 'T':
+	    if (count==1) {
+	       row[i].ptr = (char *)vpfmalloc(1);
+	       memcpy(row[i].ptr,origrow[i].ptr,sizeof(char));
+	    } else {
+	       size = count*sizeof(char);
+	       row[i].ptr = (char *)vpfmalloc(size+1);
+	       strcpy((char*)row[i].ptr,(char*)origrow[i].ptr);
+	    }
+	    break;
+	 case 'I':
+	    size = count*sizeof(ossim_int32);
+	    row[i].ptr = (ossim_int32 *)vpfmalloc(size);
+	    memcpy(row[i].ptr,origrow[i].ptr,size);
+	    break;
+	 case 'S':
+	    size = count*sizeof(short int);
+	    row[i].ptr = (short int *)vpfmalloc(size);
+	    memcpy(row[i].ptr,origrow[i].ptr,size);
+	    break;
+	 case 'F':
+	    size = count*sizeof(float);
+	    row[i].ptr = (float *)vpfmalloc(size);
+	    memcpy(row[i].ptr,origrow[i].ptr,size);
+	    break;
+	 case 'R':
+	    size = count*sizeof(double);
+	    row[i].ptr = (double *)vpfmalloc(size);
+	    memcpy(row[i].ptr,origrow[i].ptr,size);
+	    break;
+	 case 'C':
+	    size = count*sizeof(coordinate_type);
+	    row[i].ptr = (coordinate_type *)malloc(size);
+	    if (row[i].ptr && origrow[i].ptr)
+	       memcpy(row[i].ptr,origrow[i].ptr,size);
+	    else
+	       row[i].ptr = NULL;
+	    break;
+	 case 'Z':
+	    size = count*sizeof(tri_coordinate_type);
+	    row[i].ptr = (tri_coordinate_type *)vpfmalloc(size);
+	    memcpy(row[i].ptr,origrow[i].ptr,size);
+	    break;
+	 case 'B':
+	    size = count*sizeof(double_coordinate_type);
+	    row[i].ptr = (double_coordinate_type *)vpfmalloc(size);
+	    memcpy(row[i].ptr,origrow[i].ptr,size);
+	    break;
+	 case 'Y':
+	    size = count*sizeof(double_tri_coordinate_type);
+	    row[i].ptr = (double_tri_coordinate_type *)vpfmalloc(size);
+	    memcpy(row[i].ptr,origrow[i].ptr,size);
+	    break;
+	 case 'D':  /* Date */
+	    size = count*sizeof(date_type);
+	    row[i].ptr = (date_type *)vpfmalloc(size);
+	    memcpy(row[i].ptr,origrow[i].ptr,size);
+	    break;
+	 case 'K':  /* ID Triplet */
+	    size = count*sizeof(id_triplet_type);
+	    row[i].ptr = (id_triplet_type *)vpfmalloc(size);
+	    memcpy(row[i].ptr,origrow[i].ptr,size);
+	    break;
+	 case 'X':
+	    row[i].ptr = NULL;
+	    break;
+	  default:
+	    fprintf (stderr,"\nrow_cpy: error in data type < %c >",
+		     table.header[i].type ) ;
+	    abort () ;
+	    break ;
+	  }   	/* end of switch */
+    }    	/* end of table.nfields */
+   return row;
+}
+
+/*************************************************************************
+ *
+ *N  read_row
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function reads a specified row from the table.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    row_number <input> == (ossim_int32) row number.
+ *    table      <input> == (vpf_table_type) vpf table structure.
+ *    return    <output> == (row_type) row that was read in.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   May 1991      DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    ossim_int32 index_pos()                             VPFTABLE.C
+ *    row_type read_next_row()                         VPFTABLE.C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+row_type read_row( ossim_int32 row_number,
+		   vpf_table_type table )
+{
+   ossim_int32 fpos;
+
+   fpos = index_pos(row_number,table);
+
+   fseek(table.fp,fpos,SEEK_SET);
+
+   return read_next_row(table);
+}
+
+/*************************************************************************
+ *
+ *N  free_row
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function frees the memory that was dynamically allocated for the
+ *     specified row.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    row   <input> == (row_type) row to be freed.
+ *    table <input> == (vpf_table_type) vpf table structure.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   May 1991                     DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+void free_row( row_type row,
+	       vpf_table_type table)
+{
+   register ossim_int32 i;
+
+   if (!row) return;
+   for (i=0;i<table.nfields;i++)
+      if (row[i].ptr) free(row[i].ptr);
+   free(row);
+}
+
+/*************************************************************************
+ *
+ *N  get_row
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function returns the specified row of the table.  If the table
+ *     is stored in memory, the row is copied from there.  If it is on disk,
+ *     it is read and returned.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    row_number <input> == (ossim_int32) row number in range [1 .. table.nrows].
+ *    table      <input> == (vpf_table_type) vpf table structure.
+ *    return    <output> == (row_type) returned row.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   May 1991      DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    row_type rowcpy                VPFREAD.C
+ *    row_type read_row              VPFREAD.C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+row_type get_row( ossim_int32 row_number,
+		  vpf_table_type table )
+{
+   row_type row;
+
+   row_number = max(min(row_number, table.nrows), 1);
+
+   if (table.storage == RAM) {
+      row = rowcpy(table.row[row_number-1],table);
+      return row;
+   } else {
+      return read_row( row_number, table );
+   }
+}
+
+/*************************************************************************
+ *
+ *N  table_pos
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function returns the column offset of the specified field name
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    field_name <input> == (char *) field name.
+ *    table      <input> == (vpf_table_type) VPF table structure.
+ *    table_pos  <output> == (ossim_int32) returned column number.
+ *                          UNIX returns -1 if not exists
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   May 1991                     DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+ossim_int32 table_pos( const char* field_name, vpf_table_type table )
+{
+   register ossim_int32 i;
+   ossim_int32 col;
+   char altfn[256];
+
+   col = -1;
+   for (i = 0; i < table.nfields; i++) {
+      strcpy(altfn, ",:");
+      strcat(altfn, field_name);
+      if (ossim_strcasecmp(field_name,table.header[i].name) == 0
+	  || ossim_strcasecmp(altfn,table.header[i].name) == 0) {
+	 col = i;
+	 break;
+      }
+   }
+   return col;
+}
+
+/*************************************************************************
+ *
+ *N  get_table_element
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function returns the element in the given row in the given
+ *     column.  If the element is a single element (count=1), the value
+ *     is passed back via the void pointer *value; otherwise, an array
+ *     is allocated and passed back as the return value.
+ *     NOTE: If an array is allocated in this function, it should be freed
+ *     when no longer needed.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    field_number <input> == (ossim_int32) field column number.
+ *    row          <input> == (row_type) vpf table row.
+ *    table        <input> == (vpf_table_type) VPF table structure.
+ *    value       <output> == (void *) pointer to a single element value.
+ *    count       <output> == (ossim_int32 *) pointer to the array size for a
+ *                                    multiple element value.
+ *    return      <output> == (void *) returned multiple element value.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   May 1991             DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    void *vpfmalloc()
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+void *get_table_element( ossim_int32 field_number,
+			 row_type row,
+			 vpf_table_type table,
+			 void *value,
+			 ossim_int32  *count )
+{
+   ossim_int32   col;
+   char     * tptr;
+   void     * retvalue;
+
+   retvalue = NULL;
+   col = field_number;
+   if ((col < 0) || (col >= table.nfields)) {
+      fprintf(stderr,"%s: Invalid field number %d\n",
+	      table.name,(int)field_number);
+      return NULL;
+   }
+
+   if (!row) return NULL;
+
+   switch (table.header[col].type) {
+      case 'X':
+	 retvalue = NULL;
+	 break;
+      case 'T':
+	 if (table.header[col].count == 1) {
+	    memcpy(value,row[col].ptr,sizeof(char));
+	 } else {
+	    retvalue = (char *)vpfmalloc((row[col].count+1)*sizeof(char));
+	    tptr = (char *)vpfmalloc((row[col].count+1)*sizeof(char));
+	    memcpy(tptr,row[col].ptr,row[col].count*sizeof(char));
+	    tptr[row[col].count] = '\0';
+	    strcpy((char *)retvalue,tptr);
+	    free(tptr);
+	 }
+	 break;
+      case 'I':
+	 if (table.header[col].count == 1) {
+	    memcpy(value,row[col].ptr,sizeof(ossim_int32));
+	 } else {
+	    retvalue = (ossim_int32 *)vpfmalloc(row[col].count*
+					     sizeof(ossim_int32));
+	    memcpy(retvalue,row[col].ptr,row[col].count*sizeof(ossim_int32));
+	 }
+	 break;
+      case 'S':
+	 if (table.header[col].count == 1) {
+	    memcpy(value,row[col].ptr,sizeof(short int));
+	 } else {
+	    retvalue = (short int *)vpfmalloc(row[col].count*
+					     sizeof(short int));
+	    memcpy(retvalue,row[col].ptr,row[col].count*sizeof(short int));
+	 }
+	 break;
+      case 'F':
+	 if (table.header[col].count == 1) {
+	    memcpy(value,row[col].ptr,sizeof(float));
+	 } else {
+	    retvalue = (float *)vpfmalloc(row[col].count*sizeof(float));
+	    memcpy(retvalue,row[col].ptr,row[col].count*sizeof(float));
+	 }
+	 break;
+      case 'R':
+	 if (table.header[col].count == 1) {
+	    memcpy(value,row[col].ptr,sizeof(double));
+	 } else {
+	    retvalue = (double *)vpfmalloc(row[col].count*sizeof(double));
+	    memcpy(retvalue,row[col].ptr,row[col].count*sizeof(double));
+	 }
+	 break;
+      case 'C':
+	 if (table.header[col].count == 1) {
+	    memcpy(value,row[col].ptr,sizeof(coordinate_type));
+	 } else {
+	    if (row[col].ptr) {
+	       retvalue = (coordinate_type *)malloc(row[col].count*
+			  sizeof(coordinate_type));
+	       if (retvalue)
+		  memcpy(retvalue,row[col].ptr,row[col].count*
+			 sizeof(coordinate_type));
+	    } else {
+	       retvalue = NULL;
+	    }
+	 }
+	 break;
+      case 'Z':
+	 if (table.header[col].count == 1) {
+	    memcpy(value,row[col].ptr,sizeof(tri_coordinate_type));
+	 } else {
+	    retvalue = (tri_coordinate_type *)vpfmalloc(row[col].count*
+			sizeof(tri_coordinate_type));
+	    memcpy(retvalue,row[col].ptr,row[col].count*
+		    sizeof(tri_coordinate_type));
+	 }
+	 break;
+      case 'B':
+	 if (table.header[col].count == 1) {
+	    memcpy(value,row[col].ptr,sizeof(double_coordinate_type));
+	 } else {
+	    retvalue = (double_coordinate_type *)vpfmalloc(row[col].count*
+			sizeof(double_coordinate_type));
+	    memcpy(retvalue,row[col].ptr,row[col].count*
+		    sizeof(double_coordinate_type));
+	 }
+	 break;
+      case 'Y':
+	 if (table.header[col].count == 1) {
+	    memcpy(value,row[col].ptr,sizeof(double_tri_coordinate_type));
+	 } else {
+	    retvalue = (double_tri_coordinate_type *)vpfmalloc(row[col].count*
+			sizeof(double_tri_coordinate_type));
+	    memcpy(retvalue,row[col].ptr,row[col].count*
+		    sizeof(double_tri_coordinate_type));
+	 }
+	 break ;
+      case 'D':
+	 if (table.header[col].count == 1) {
+	    memcpy(value,row[col].ptr,sizeof(date_type));
+	 } else {
+	    retvalue = (date_type *)vpfmalloc(row[col].count*
+					      sizeof(date_type));
+	    memcpy(retvalue,row[col].ptr,row[col].count*
+					  sizeof(date_type));
+	 }
+	 break;
+      case 'K':  /* ID Triplet */
+	 if (table.header[col].count == 1) {
+	    memcpy(value,row[col].ptr,sizeof(id_triplet_type));
+	 } else {
+	    retvalue = (id_triplet_type *)vpfmalloc(row[col].count*
+					      sizeof(id_triplet_type));
+	    memcpy(retvalue,row[col].ptr,row[col].count*
+					  sizeof(id_triplet_type));
+	 }
+	 break;
+   }
+   *count = row[col].count;
+
+   return retvalue;
+}
+
+/*************************************************************************
+ *
+ *N  named_table_element
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function returns the element in the specified row in the column
+ *     matching the given field name.  If the element is a single element
+ *     (count=1), the value is passed back via the void pointer *value;
+ *     otherwise, an array is allocated and passed back as the return value.
+ *     NOTE: If an array is allocated in this function, it should be freed
+ *     when no longer needed.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    field_name <input> == (char *) field name.
+ *    row_number <input> == (ossim_int32) row_number.
+ *    table      <input> == (vpf_table_type) VPF table structure.
+ *    value     <output> == (void *) pointer to a single element value.
+ *    count     <output> == (ossim_int32 *) pointer to the array size for a multiple
+ *                                  element value.
+ *    return    <output> == (void *) returned multiple element value.
+ *                          or NULL if field_name could not be found
+ *                          as a column
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   May 1991                     DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    void *vpfmalloc()                    VPFREAD.C
+ *    row_type get_row()                   VPFREAD.C
+ *    void free_row()                      VPFREAD.C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+void *named_table_element( char           * field_name,
+			   ossim_int32         row_number,
+			   vpf_table_type   table,
+			   void           * value,
+			   ossim_int32       * count )
+{
+   ossim_int32     col;
+   row_type     row;
+   void       * retvalue;
+
+   col = table_pos(field_name, table);
+
+   if (col < 0) {
+      fprintf(stderr,"%s: Invalid field name <%s>\n",table.name,field_name);
+      return NULL;
+   }
+   row = get_row(row_number,table);
+
+   retvalue = get_table_element( col, row, table, value, count );
+
+   free_row(row, table);
+
+   return retvalue;
+}
+
+/*************************************************************************
+ *
+ *N  table_element
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function returns the element in the specified row in the column
+ *     matching the given field number.  If the element is a single element
+ *     (count=1), the value is passed back via the void pointer *value;
+ *     otherwise, an array is allocated and passed back as the return value.
+ *     NOTE: If an array is allocated in this function, it should be freed
+ *     when no longer needed.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    field_number <input> == (ossim_int32) field number (offset from
+ *                                   first field in table).
+ *    row_number <input> == (ossim_int32) row_number.
+ *    table      <input> == (vpf_table_type) VPF table structure.
+ *    value     <output> == (void *) pointer to a single element value.
+ *    count     <output> == (ossim_int32 *) pointer to the array size for a multiple
+ *                                  element value.
+ *    return    <output> == (void *) returned multiple element value or
+ *                          NULL of the field number is invalid
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   May 1991                     DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    row_type get_row()                   VPFREAD.C
+ *    void free_row()                      VPFREAD.C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+void *table_element( ossim_int32         field_number,
+		     ossim_int32         row_number,
+		     vpf_table_type   table,
+		     void           * value,
+		     ossim_int32       * count )
+{
+   row_type    row;
+   void      * retvalue;
+
+   row      = get_row(row_number, table);
+   retvalue = get_table_element(field_number, row, table, value, count);
+   free_row(row,table);
+
+   return retvalue;
+}
diff --git a/ossim/src/ossim/vpfutil/vpfrelat.c b/ossim/src/ossim/vpfutil/vpfrelat.c
new file mode 100644
index 0000000..6fe2592
--- /dev/null
+++ b/ossim/src/ossim/vpfutil/vpfrelat.c
@@ -0,0 +1,907 @@
+/***************************************************************************
+ *
+ *N  Module VPFRELAT.C
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *    This module contains functions supporting relates between VPF
+ *    feature classes and primitives (and vice versa).  It relies
+ *    upon the information provided by the Feature Class Schema table.
+ *    This table is used to generate a feature class relationship (fcrel)
+ *    data structure for a feature class.  This structure contains all
+ *    of the tables and their primary and foreign keys for the
+ *    relationships between a feature table and its primitive, or
+ *    from a primitive to its feature table (each relate chain is one way).
+ *    This module tries to be as much of a black box as it can to
+ *    enable a programmer to simply return the corresponding primitive
+ *    row of a feature record, or the corresponding feature row of a
+ *    primitive record.
+ *
+ *    This is one of the most difficult modules required to support
+ *    a truly 'generic' VPF application, since VPF allows so many
+ *    variations of feature-primitive relationships.  The final version
+ *    of this module must support every allowed relationship.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels
+ *
+ *    Added one-to-many relates 3/2/92 - BJM
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ **************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef __MSDOS__
+#include <alloc.h>
+#include <mem.h>
+#else
+#ifdef __APPLE__ 
+#include <sys/types.h>
+#include <sys/malloc.h>
+#else
+#ifndef __FreeBSD__
+#include <malloc.h>
+#include <string.h>
+#endif
+#endif
+#endif
+
+
+#if defined(__CYGWIN__)||defined(__APPLE__)|| defined(_WIN32)
+#include <ossim/vpfutil/values.h>
+#else
+#include <ossim/vpfutil/values.h>
+#endif
+#include <string.h>
+#include <stdarg.h>
+#include <ossim/vpfutil/vpftable.h>
+#include <ossim/vpfutil/vpfview.h>
+#include <ossim/vpfutil/vpfrelat.h>
+#include <ossim/vpfutil/vpftidx.h>
+
+/* Determine if the given table name is in the given list of */
+/* vpf relate structures.                */
+static int table_in_list( char *tablename, linked_list_type rlist )
+{
+   position_type p;
+   vpf_relate_struct rcell;
+
+   p = ll_first(rlist);
+   while (!ll_end(p)) {
+      ll_element(p,&rcell);
+      if (strcmp(rcell.table1,tablename)==0) return 1;
+      p = ll_next(p);
+   }
+   return 0;
+}
+
+/**************************************************************************
+ *
+ *N  fcs_relate_list
+ *
+ *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *    Read the feature class schema table and create the list of
+ *    tables to chain through.
+ *E
+ *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    fcname       <input> == (char *) feature class name.
+ *    start_table  <input> == (char *) table to start from.
+ *    end_table    <input> == (char *) table to end with.
+ *    fcs          <input> == (vpf_table_type) feature class schema table.
+ *    fcs_relate_list <output> == (linked_list_type) list of tables to
+ *                                chain through.
+ *E
+ *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels  DOS Turbo C
+ *E
+ *************************************************************************/
+linked_list_type fcs_relate_list( char *fcname, char *start_table,
+              char *end_table, vpf_table_type fcs )
+{
+   linked_list_type rlist;
+   vpf_relate_struct rstruct;
+   set_type fcset, set1, set2;
+   char tablename[255], *buf, expr[255];
+   row_type row;
+   ossim_int32 rownum,n;
+   int TABLE1_, KEY1_, TABLE2_, KEY2_;
+
+   rlist = ll_init();
+
+   sprintf(expr,"FEATURE_CLASS = %s",fcname);
+
+   fcset = query_table(expr,fcs);
+
+   if (set_empty(fcset)) {
+      set_nuke(&fcset);
+      return rlist;
+   }
+
+   TABLE1_ = table_pos("TABLE1",fcs);
+   KEY1_ = table_pos("FOREIGN_KEY",fcs);
+   if (KEY1_ < 0) KEY1_ = table_pos("TABLE1_KEY",fcs);
+   TABLE2_ = table_pos("TABLE2",fcs);
+   KEY2_ = table_pos("PRIMARY_KEY",fcs);
+   if (KEY2_ < 0) KEY2_ = table_pos("TABLE2_KEY",fcs);
+
+   strcpy( tablename, start_table );
+   while (1) {
+      sprintf(expr,"TABLE1 = %s",tablename);
+
+      set1 = query_table(expr,fcs);
+      set2 = set_intersection(set1,fcset);
+      set_nuke(&set1);
+      if (set_empty(set2)) {
+    set_nuke(&fcset);
+    set_nuke(&set2);
+    return rlist;
+      }
+      rownum = set_min(set2);
+
+      set_nuke(&set2);
+
+      row = get_row(rownum,fcs);
+
+      buf = (char *)get_table_element(TABLE1_,row,fcs,NULL,&n);
+      strcpy(rstruct.table1,buf);
+      rightjust(rstruct.table1);
+      free(buf);
+
+      buf = (char *)get_table_element(KEY1_,row,fcs,NULL,&n);
+      strcpy(rstruct.key1,buf);
+      rightjust(rstruct.key1);
+      free(buf);
+
+      buf = (char *)get_table_element(TABLE2_,row,fcs,NULL,&n);
+      strcpy(rstruct.table2,buf);
+      rightjust(rstruct.table2);
+      free(buf);
+
+      buf = (char *)get_table_element(KEY2_,row,fcs,NULL,&n);
+      strcpy(rstruct.key2,buf);
+      rightjust(rstruct.key2);
+      free(buf);
+
+      rstruct.degree = R_ONE;  /* Default */
+
+      free_row( row, fcs );
+
+      if (table_in_list(rstruct.table1, rlist)) break;
+
+      ll_insert( &rstruct, sizeof(rstruct), ll_last(rlist) );
+
+      strcpy( tablename, rstruct.table2 );
+
+      if (ossim_strcasecmp(tablename,end_table)==0) break;
+   }
+
+   set_nuke(&fcset);
+
+   return rlist;
+}
+
+
+/**************************************************************************
+ *
+ *N  vpf_binary_search
+ *
+ *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *    This function performs a binary search on a VPF table for the
+ *    specified integer value.  Only VPF data type 'I' is supported.
+ *    The table must be sorted on the specified field, or this function
+ *    will give unpredictable results.  The table must have been
+ *    successfully opened.  If more than one row matches the search
+ *    value, only the first encountered will be returned.
+ *E
+ *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    srchval <input> == (ossim_int32) specified search value.
+ *    field   <input> == (int) table sort field.
+ *    table   <input> == (vpf_table_type) VPF table.
+ *    vpf_binary_search <output> == (ossim_int32) first matching row.
+ *E
+ *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels  DOS Turbo C
+ *E
+ *************************************************************************/
+ossim_int32 vpf_binary_search( ossim_int32 srchval,
+             int field,
+             vpf_table_type table )
+{
+   ossim_int32 left,right, ival, rowid, n;
+   row_type row;
+
+   left = 1;
+   right = table.nrows;
+
+   do {
+      rowid = (left+right)/2;
+      row = get_row(rowid,table);
+      get_table_element(field,row,table,&ival,&n);
+      free_row(row,table);
+      if (ival < srchval)
+    right = rowid-1;
+      else
+    left = rowid+1;
+   } while ((srchval != ival) && (left <= right));
+
+   if (srchval != ival) rowid = 0;
+
+   return rowid;
+}
+
+
+/**************************************************************************
+ *
+ *N  related_row
+ *
+ *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *    Return the related row of table2 based upon the value of table 1's key
+ *    Table 2 must be the '1' side of an n:1 relationship  --  If it isn't,
+ *    use 'related_rows()'.
+ *    Supported data types - I and T<n>.
+ *    Binary search supported only for data type I. (column must be sorted)
+ *E
+ *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels  DOS Turbo C
+ *E
+ *************************************************************************/
+ossim_int32 related_row( void *keyval1,
+            vpf_table_type table2, char *key2,
+            int sort_flag )
+{
+   ossim_int32 rowid, i, ival, kval, n;
+   row_type row;
+   int KEY2_;
+   char cval, *tval;
+
+   if (ossim_strcasecmp(key2,"ID")==0) {
+      memcpy( &rowid, keyval1, sizeof(rowid) );
+      return rowid;
+   }
+
+   rowid = 0;
+
+   KEY2_ = table_pos(key2,table2);
+
+   if ((table2.header[KEY2_].type != 'I')&&
+       (table2.header[KEY2_].type != 'T')) return rowid;
+
+   if ((table2.header[KEY2_].type == 'I')&&
+       (table2.header[KEY2_].count != 1)) return rowid;
+
+   if ((table2.header[KEY2_].type == 'T')&&(sort_flag)) sort_flag = 0;
+
+   if (table2.header[KEY2_].type == 'I') memcpy(&kval,keyval1,sizeof(kval));
+
+   if (!sort_flag) {   /* Sequential search */
+
+      for (i=1;i<=table2.nrows;i++) {
+    row = get_row(i,table2);
+    if (table2.header[KEY2_].type == 'I') {
+       get_table_element(KEY2_,row,table2,&ival,&n);
+       if (ival == kval) rowid = i;
+    } else {
+       if (table2.header[KEY2_].count==1) {
+          get_table_element(KEY2_,row,table2,&cval,&n);
+          if (memcmp(&cval,keyval1,sizeof(ival))==0) rowid = i;
+       } else {
+          tval = (char*)get_table_element(KEY2_,row,table2,NULL,&n);
+          if (strcmp(tval,(char *)keyval1)==0) rowid = i;
+       }
+    }
+    free_row(row,table2);
+    if (rowid > 0) break;
+      }
+
+   } else {   /* Binary search */
+
+      memcpy(&kval,keyval1,sizeof(kval));
+      rowid = vpf_binary_search( kval, KEY2_, table2 );
+
+   }
+
+   return rowid;
+}
+
+
+/**************************************************************************
+ *
+ *N  related_rows
+ *
+ *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *    Return the list of related rows of table2 based upon the value of
+ *    table 1's key.
+ *    Supported data types - I and T<n>.
+ *    Binary search supported only for data type I. (column must be sorted)
+ *    Thematic index used, if present on key column.
+ *    NOTE: A sequential search operation will search the entire
+ *          table ...zzz...
+ *E
+ *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels  DOS Turbo C
+ *E
+ *************************************************************************/
+linked_list_type related_rows( void *keyval1,
+             vpf_table_type table2, char *key2,
+             int sort_flag,
+             ThematicIndex *idx )
+{
+   linked_list_type rowlist;
+   set_type rowset;
+   ossim_int32 rowid, i, ival, kval, n, start,end;
+   row_type row = 0;
+   int KEY2_;
+   char cval, *tval;
+
+   rowlist = ll_init();
+
+   if (ossim_strcasecmp(key2,"ID")==0) {
+      memcpy( &rowid, keyval1, sizeof(rowid) );
+      ll_insert(&rowid,sizeof(rowid),rowlist);
+      return rowlist;
+   }
+
+   KEY2_ = table_pos(key2,table2);
+
+   if ((table2.header[KEY2_].type != 'I')&&
+       (table2.header[KEY2_].type != 'T')) return rowlist;
+
+   if ((table2.header[KEY2_].type == 'I')&&
+       (table2.header[KEY2_].count != 1)) return rowlist;
+
+   if ((table2.header[KEY2_].type == 'T')&&(sort_flag)) sort_flag = 0;
+
+   if (idx) {
+      if (idx->fp) {
+    rowset = search_thematic_index(idx,(char *)keyval1);
+    start = set_min(rowset);
+    end = set_max(rowset);
+    for (i=start;i<=end;i++)
+       if (set_member(i,rowset)) {
+          ll_insert(&i,sizeof(i),ll_last(rowlist));
+       }
+    set_nuke(&rowset);
+    return rowlist;
+      }
+   }
+
+   if (!sort_flag) {   /* Sequential search */
+
+      for (i=1;i<=table2.nrows;i++) {
+    row = get_row(i,table2);
+    if (table2.header[KEY2_].type == 'I') {
+       get_table_element(KEY2_,row,table2,&ival,&n);
+       if (memcmp(&ival,keyval1,sizeof(ival))==0)
+          ll_insert(&i,sizeof(i),ll_last(rowlist));
+    } else {
+       if (table2.header[KEY2_].count==1) {
+          get_table_element(KEY2_,row,table2,&cval,&n);
+          if (memcmp(&cval,keyval1,sizeof(ival))==0)
+        ll_insert(&i,sizeof(i),ll_last(rowlist));
+       } else {
+          tval = (char*)get_table_element(KEY2_,row,table2,NULL,&n);
+          if (strcmp(tval,(char *)keyval1)==0)
+        ll_insert(&i,sizeof(i),ll_last(rowlist));
+       }
+    }
+    free_row(row,table2);
+      }
+
+   } else {   /* Binary search */
+
+      memcpy(&kval,keyval1,sizeof(kval));
+      rowid = vpf_binary_search( kval, KEY2_, table2 );
+
+      if (rowid > 0) {
+    ll_insert(&rowid,sizeof(rowid),ll_last(rowlist));
+    i = rowid-1L;
+    do {
+       row = get_row(i,table2);
+       get_table_element(KEY2_,row,table2,&ival,&n);
+       if (ival == kval)
+          ll_insert(&i,sizeof(i),ll_last(rowlist));
+       i--;
+       free_row(row, table2);
+    } while ((ival==kval)&&(i>0));
+    i = rowid+1L;
+    do {
+
+       row = get_row(i,table2);
+       get_table_element(KEY2_,row,table2,&ival,&n);
+       if (ival == kval)
+          ll_insert(&i,sizeof(i),ll_last(rowlist));
+       i++;
+       free_row(row, table2);
+    } while ((ival==kval)&&(i<=table2.nrows));
+      }
+
+   }
+
+   return rowlist;
+}
+
+
+/**************************************************************************
+ *
+ *N  vpf_nullify_table
+ *
+ *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *    Nullify the given VPF table structure.
+ *E
+ *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels  DOS Turbo C
+ *E
+ *************************************************************************/
+void vpf_nullify_table( vpf_table_type *table )
+{
+   strcpy(table->name,"");
+   table->path = NULL;
+   table->nfields = 0;
+   strcpy(table->description,"");
+   strcpy(table->narrative,"");
+   table->header = NULL;
+   table->xfp = NULL;
+   table->index = NULL;
+   table->xstorage = (storage_type)0;
+   table->fp = NULL;
+   table->nrows = 0;
+   table->row = NULL;
+   table->reclen = 0;
+   table->ddlen = 0;
+   table->defstr = NULL;
+   table->storage = (storage_type)0;
+   table->mode = (file_mode)0;
+   table->status = CLOSED;
+}
+
+
+/**************************************************************************
+ *
+ *N  select_feature_class_relate
+ *
+ *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *    Set up the relationships between features and primitives or between
+ *    primitives and features (one way only) for a specified feature class.
+ *E
+ *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels  DOS Turbo C
+ *E
+ *************************************************************************/
+fcrel_type select_feature_class_relate( int fcnum,
+               library_type *library,
+               char *start_table,
+               char *end_table )
+{
+   int storage, cov;
+   vpf_table_type fcs;
+   ossim_int32 i;
+   char path[255], covpath[255];
+   position_type p;
+   vpf_relate_struct rcell;
+   fcrel_type fcrel;
+
+   fcrel.nchain = 0;
+   fcrel.table = NULL;
+   fcrel.relate_list = NULL;
+
+   cov = library->fc[fcnum].coverage;
+   strcpy(covpath,library->cover[cov].path);
+   rightjust(covpath);
+   sprintf( path, "%sfcs", covpath );
+
+   /* Feature Class Schema table */
+   fcs = vpf_open_table( path, disk, "rb", NULL );
+
+   fcrel.relate_list = fcs_relate_list( library->fc[fcnum].name,
+               start_table,end_table,
+               fcs );
+
+   if (ll_empty(fcrel.relate_list)) {
+      ll_reset(fcrel.relate_list);
+      displaymessage("ERROR in feature class relationship!",
+           start_table,end_table,NULL);
+      return fcrel;
+   }
+
+   /* Find the number of tables in the relate chain */
+   p = ll_first(fcrel.relate_list);
+   fcrel.nchain = 0;
+   while (!ll_end(p)) {
+      fcrel.nchain++;
+      p = ll_next(p);
+   }
+   /* Allow for last table2 */
+   fcrel.nchain++;
+
+   fcrel.table = (vpf_table_type *)
+        vpfmalloc((fcrel.nchain+1)*
+              sizeof(vpf_table_type));
+
+   for (i=0;i<fcrel.nchain+1;i++)
+      vpf_nullify_table( &(fcrel.table[i]) );
+
+
+   p = ll_first(fcrel.relate_list);
+   for (i=0;i<fcrel.nchain-1;i++) {
+
+      ll_element(p,&rcell);
+
+      /** Can't open primitive table - may be several under tile **/
+      /** directories.  Open all others **/
+      if (!is_primitive(rcell.table1)) {
+
+    sprintf(path,"%s%s",covpath,rcell.table1);
+    if (is_join(rcell.table1))
+       storage = ram;
+    else
+       storage = disk;
+
+    fcrel.table[i] = vpf_open_table(path,(storage_type)storage,"rb",NULL);
+
+      }
+
+      if (!ll_end(p)) p = ll_next(p);
+   }
+
+   /* End of relate chain */
+   i = fcrel.nchain-1;
+   if (!is_primitive(rcell.table2)) {
+
+      sprintf(path,"%s%s",covpath,rcell.table2);
+      storage = disk;
+
+      fcrel.table[i] = vpf_open_table(path,(storage_type)storage,"rb",NULL);
+
+   }
+
+
+   vpf_close_table( &fcs );
+
+   return fcrel;
+}
+
+
+/**************************************************************************
+ *
+ *N  fc_row_number
+ *
+ *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *    Given the starting row of a feature class relationship, return the
+ *    row number of the table at the end of the feature class relate
+ *    chain.
+ *    If your relate goes from the feature to the primitive, this will
+ *    return the primitive id for the given feature row.
+ *    If your relate goes from the primitive to the feature, this will
+ *    return the feature id of the given primitive row.
+ *
+ *    Currently only supports relates on 'I' or 'K' fields.
+ *E
+ *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels  DOS Turbo C
+ *E
+ *************************************************************************/
+ossim_int32 fc_row_number( row_type row, fcrel_type fcrel, ossim_int32 tile )
+{
+   row_type relrow;
+   ossim_int32 count;
+   ossim_int32 i, rownum, keyval;
+   id_triplet_type triplet_keyval;
+   int KEY1_, KEY_;
+   position_type p;
+   vpf_relate_struct rcell;
+
+   p = ll_first(fcrel.relate_list);
+   ll_element(p,&rcell);
+   KEY1_ = table_pos(rcell.key1,fcrel.table[0]);
+
+   get_table_element(0,row,fcrel.table[0],&rownum,&count);
+
+   if (KEY1_ == 0) {     /* "ID" */
+      keyval = rownum;
+   } else {
+      switch (fcrel.table[0].header[KEY1_].type) {
+    case 'I':
+       get_table_element(KEY1_,row,fcrel.table[0],&keyval,&count);
+       break;
+    case 'K':
+       get_table_element(KEY1_,row,fcrel.table[0],&triplet_keyval,
+               &count);
+       keyval = triplet_keyval.exid;
+       if (tile != triplet_keyval.tile) {
+          return -2;
+       }
+       break;
+    default:
+       keyval = 0;
+       break;
+      }
+   }
+
+   p = ll_first(fcrel.relate_list);
+   for (i=1;i<(fcrel.nchain-1);i++) {
+      /* Relate through Join table(s) */
+      rownum = related_row(&keyval,fcrel.table[i],rcell.key2,0);
+      relrow = get_row(rownum,fcrel.table[i]);
+
+      p = ll_next(p);
+      ll_element(p,&rcell);
+      KEY_ = table_pos(rcell.key1,fcrel.table[i]);
+
+      if (KEY_ == 0) {     /* "ID" */
+    keyval = rownum;
+      } else {
+    switch (fcrel.table[i].header[KEY_].type) {
+    case 'I':
+       get_table_element(KEY_,relrow,fcrel.table[i],&keyval,&count);
+       break;
+    case 'K':
+       get_table_element(KEY_,relrow,fcrel.table[i],&triplet_keyval,
+               &count);
+       keyval = triplet_keyval.exid;
+       if (tile != triplet_keyval.tile) {
+         free_row(relrow,fcrel.table[i]);
+          return -2;
+       }
+       break;
+    default:
+       keyval = 0;
+       break;
+    }
+      }
+
+      free_row(relrow,fcrel.table[i]);
+   }
+
+   if (ossim_strcasecmp(rcell.key2,"ID")==0)
+      rownum = keyval;
+   else
+      rownum = related_row(&keyval,fcrel.table[i],rcell.key2,0);
+
+   return rownum;
+}
+
+
+/**************************************************************************
+ *
+ *N  fc_row_numbers
+ *
+ *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *    Given the starting row of a feature class relationship, return the
+ *    list of row numbers of the table at the end of the feature class
+ *    relate chain.
+ *    If your relate goes from the feature to the primitive, this will
+ *    return the primitive ids for the given feature row.
+ *    If your relate goes from the primitive to the feature, this will
+ *    return the feature ids of the given primitive row.
+ *
+ *    Currently only supports relates on 'I' or 'K' fields.
+ *E
+ *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels  DOS Turbo C
+ *E
+ *************************************************************************/
+linked_list_type fc_row_numbers( row_type row,
+             fcrel_type fcrel,
+             ossim_int32 tile,
+             ThematicIndex *idx )
+{
+   row_type relrow;
+   ossim_int32 count;
+   ossim_int32 n, rownum, keyval;
+   id_triplet_type triplet_keyval;
+   int KEY1_, KEY_;
+   position_type p, prow, pkey;
+   vpf_relate_struct rcell;
+   linked_list_type rowlist, keylist, templist;
+
+   p = ll_first(fcrel.relate_list);
+   ll_element(p,&rcell);
+   KEY1_ = table_pos(rcell.key1,fcrel.table[0]);
+
+   get_table_element(0,row,fcrel.table[0],&rownum,&count);
+
+   if (KEY1_ == 0) {     /* "ID" */
+      keyval = rownum;
+   } else {
+      switch (fcrel.table[0].header[KEY1_].type) {
+    case 'I':
+       get_table_element(KEY1_,row,fcrel.table[0],&keyval,&count);
+       break;
+    case 'K':
+       get_table_element(KEY1_,row,fcrel.table[0],&triplet_keyval,
+               &count);
+       keyval = triplet_keyval.exid;
+       if (tile != triplet_keyval.tile) {
+          keyval = -2;
+       }
+       break;
+    default:
+       keyval = 0;
+       break;
+      }
+   }
+
+   keylist = ll_init();
+   ll_insert(&keyval,sizeof(keyval),keylist);
+
+   n = 0;
+
+   p = ll_first(fcrel.relate_list);
+   for (n=1;n<(fcrel.nchain-1);n++) {
+
+      /* Relate through Join table(s) */
+
+      rowlist = ll_init();
+      pkey = ll_first(keylist);
+      while (!ll_end(pkey)) {
+    ll_element(pkey,&keyval);
+    templist = related_rows(&keyval,fcrel.table[n],rcell.key2,0,NULL);
+    prow = ll_first(templist);
+    while (!ll_end(prow)) {
+       ll_element(prow,&rownum);
+       if (!ll_locate(&rownum,rowlist))
+          ll_insert(&rownum,sizeof(rownum),ll_last(rowlist));
+       prow = ll_next(prow);
+    }
+    ll_reset(templist);
+    pkey = ll_next(pkey);
+      }
+      ll_reset(keylist);
+
+      p = ll_next(p);
+      ll_element(p,&rcell);
+      KEY_ = table_pos(rcell.key1,fcrel.table[n]);
+
+      keylist = ll_init();
+      prow = ll_first(rowlist);
+      while (!ll_end(prow)) {
+    ll_element(prow,&rownum);
+    relrow = get_row(rownum,fcrel.table[n]);
+
+    if (KEY_ == 0) {     /* "ID" */
+       keyval = rownum;
+    } else {
+       switch (fcrel.table[n].header[KEY_].type) {
+       case 'I':
+          get_table_element(KEY_,relrow,fcrel.table[n],&keyval,&count);
+          break;
+       case 'K':
+          get_table_element(KEY_,relrow,fcrel.table[n],&triplet_keyval,
+             &count);
+          keyval = triplet_keyval.exid;
+          if (tile != triplet_keyval.tile) {
+        keyval = -2;
+          }
+          break;
+       default:
+          keyval = 0;
+          break;
+       }
+    }
+    if (keyval > 0)
+       ll_insert(&keyval,sizeof(keyval),ll_last(keylist));
+    prow = ll_next(prow);
+    free_row(relrow,fcrel.table[n]);
+      }
+      ll_reset(rowlist);
+   }
+
+   rowlist = ll_init();
+   p = ll_first(keylist);
+   while (!ll_end(p)) {
+      ll_element(p,&keyval);
+      templist = related_rows(&keyval,fcrel.table[n],rcell.key2,0,idx);
+      prow = ll_first(templist);
+      while (!ll_end(prow)) {
+    ll_element(prow,&rownum);
+    if (!ll_locate(&rownum,rowlist))
+       ll_insert(&rownum,sizeof(rownum),ll_last(rowlist));
+    prow = ll_next(prow);
+      }
+      ll_reset(templist);
+      p = ll_next(p);
+   }
+   ll_reset(keylist);
+
+   return rowlist;
+}
+
+
+/**************************************************************************
+ *
+ *N  deselect_feature_class_relate
+ *
+ *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *    Clear out a previously allocated feature class relate structure
+ *    from memory.
+ *E
+ *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels  DOS Turbo C
+ *E
+ *************************************************************************/
+void deselect_feature_class_relate( fcrel_type *fcrel )
+{
+   register int i;
+
+   if (fcrel->nchain > 0) {
+      for (i=0;i<fcrel->nchain;i++) {
+    if (fcrel->table[i].status == OPENED) {
+       vpf_close_table(&(fcrel->table[i]));
+    }
+      }
+      free(fcrel->table);
+      ll_reset(fcrel->relate_list);
+   }
+   fcrel->nchain = 0;
+}
\ No newline at end of file
diff --git a/src/ossim/vpfutil/vpfselec.c b/ossim/src/ossim/vpfutil/vpfselec.c
similarity index 100%
rename from src/ossim/vpfutil/vpfselec.c
rename to ossim/src/ossim/vpfutil/vpfselec.c
diff --git a/src/ossim/vpfutil/vpfspx.c b/ossim/src/ossim/vpfutil/vpfspx.c
similarity index 100%
rename from src/ossim/vpfutil/vpfspx.c
rename to ossim/src/ossim/vpfutil/vpfspx.c
diff --git a/ossim/src/ossim/vpfutil/vpftable.c b/ossim/src/ossim/vpfutil/vpftable.c
new file mode 100644
index 0000000..e0aeb35
--- /dev/null
+++ b/ossim/src/ossim/vpfutil/vpftable.c
@@ -0,0 +1,1087 @@
+/*************************************************************************
+ *
+ * Environmental Systems Research Institute (ESRI) Applications Programming
+ *
+ *N  Module VPFTABLE.C
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This module contains functions to open, close and parse VPF relational
+ *     tables.  VPF tables are defined as being a set of rows and columns.
+ *     Each column may contain a single value, a fixed array of values,
+ *     or a variable number of values.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    N/A
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   April 1991  - DOS Turbo C.
+ *    Mody Buchbinder  May 1991    - Modified parse_data_def for new table
+ *                                   header structure.
+ *    Dave Flinn       July 1991   - Updated file for UNIX.
+ *    JTB              10/91       - split off read routines into vpfread.c
+ *                                   merged view and converter branches of
+ *                                   this module; replaced various aborts()
+ *                                   and exits with return codes
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    (function) displayerror(char *text[], int nlines) - function
+ *       specified by the application to display a message to the user.
+ *       It should return an integer indicating whether to retry (1) or
+ *       not (0).
+ *    FILE *errorfp - file pointer to error file.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    N/A
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *    Updated to port to UNIX platforms with big-endian architectures
+ *E
+ *************************************************************************/
+
+#include <ossim/vpfutil/machine.h>
+#ifdef CARBON
+#define MACHINE_BYTE_ORDER 0
+#endif
+
+#ifdef __MSDOS__
+#include <mem.h>
+#include <io.h>
+#include <alloc.h>
+#include <dos.h>
+#include <graphics.h>
+#else
+#ifndef _WIN32
+#define UNIX 1
+#include <unistd.h>
+#endif
+#endif
+
+#if UNIX
+#include <sys/stat.h>
+#include <sys/types.h>
+#define   getch()               /* Make this a null function */
+#define   farcoreleft()	" "
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <ossim/vpfutil/values.h>
+#include <ossim/vpfutil/vpftable.h>
+#include <ossim/vpfutil/vpftidx.h>
+#include <ossim/vpfutil/vpfmisc.h>
+
+#ifndef __64K
+#define __64K 65536
+#endif
+
+/*
+ * per heap block byte overhead
+ */
+#define HEAP_OVERHEAD 4
+
+/* Global variable shared by VPFTABLE.C, VPFREAD.C, and VPFWRITE.C  */
+/* The above modules are logically one, only separated by file size */
+/* constraints. */
+int STORAGE_BYTE_ORDER = LEAST_SIGNIFICANT;  /* default */
+
+
+int  vpfutilMachineByteOrder()
+{
+   unsigned short  test = 0x0001;
+   unsigned char*  testPtr=NULL;
+   
+   testPtr       = (unsigned char*)(&test);
+   return (testPtr[0] ? LEAST_SIGNIFICANT : MOST_SIGNIFICANT);
+}
+
+/* Include these to decrease external module dependencies */
+
+#if 0 /* Defined in vpfmisc??? (drb) */
+static char *rightjust( char *str )
+{
+   register int  len,i;
+
+   len = strlen(str);
+   i = len - 1;
+   while ((i>0) && ((str[i]==0) || (str[i]==' '))) i--;
+   if (i < (len-1)) str[i+1] = '\0';
+   for (i=0;i<strlen(str);i++) if (str[i]=='\n') str[i] = '\0';
+   return str;
+}
+#endif
+
+
+
+void swap_two ( char *in, char *out )
+{
+  out[0] = in[1] ;
+  out[1] = in[0] ;
+}
+
+void swap_four ( char *in, char *out )
+{
+  out[0] = in[3] ;
+  out[1] = in[2] ;
+  out[2] = in[1] ;
+  out[3] = in[0] ;
+}
+
+void swap_eight ( char *in, char *out )
+{
+  out[0] = in[7] ;
+  out[1] = in[6] ;
+  out[2] = in[5] ;
+  out[3] = in[4] ;
+  out[4] = in[3] ;
+  out[5] = in[2] ;
+  out[6] = in[1] ;
+  out[7] = in[0] ;
+}
+
+/* Return floating point Not a Number (for NULL values) */
+double quiet_nan( int unused )
+{
+   char nanstr[8] = {-1,-1,-1,-1,-1,-1,-1,127};
+   double n;
+   memcpy(&n,&nanstr[0],sizeof(n));
+   if (unused) return n;
+   return n;
+}
+
+int is_vpf_null_float( float num )
+{
+   float nan;
+   nan = (float)quiet_nan(0);
+   if (memcmp(&nan,&num,sizeof(float))==0) return 1;
+   return 0;
+}
+
+int is_vpf_null_double( double num )
+{
+   double nan;
+   nan = (double)quiet_nan(0);
+   if (memcmp(&nan,&num,sizeof(double))==0) return 1;
+   return 0;
+}
+
+
+/***********Mody B**********/
+/* get string until delimeter */
+static char *cpy_del(char *src, char delimiter, ossim_int32 *ind )
+{
+  ossim_int32 i, skipchar ;
+  char *temp, *tempstr ;
+
+  /* remove all blanks ahead of good data */
+
+  skipchar = 0 ;
+  while ( src[skipchar] == SPACE || src[skipchar] == TAB )
+    skipchar++ ;
+
+  temp = &src[skipchar];
+
+  /* If t
+  he first character is a COMMENT, goto LINE_CONTINUE */
+
+  if ( *temp == COMMENT ) {
+    while ( *temp != LINE_CONTINUE && *temp != END_OF_FIELD && *temp != '\0'){
+      temp++ ;
+      skipchar ++ ;
+    }
+    skipchar++ ;
+    temp++ ;		/* skip past LC, EOF, or NULL */
+  }
+
+  /* Start with temporary string value */
+
+  tempstr = (char *)vpfmalloc ( (unsigned long)strlen ( temp ) + 10 ) ;
+
+  if ( *temp == '"' ) {	/* If field is quoted, do no error checks */
+
+    temp++ ; 	  /* skip past quote character */
+    skipchar++ ;  /* update the position pointer */
+
+    for ( i=0 ; *temp != '\0'; temp++,i++) {
+      if ( *temp == LINE_CONTINUE || *temp == TAB ) {
+	temp++ ;
+	skipchar++ ;
+      } else if ( *temp == '"' )
+	break ;
+      /* Now copy the char into the output string */
+      tempstr[i] = *temp ;
+    }
+    tempstr[i] = '\0';		/* terminate string */
+    *ind += ( i + skipchar + 2) ;	/* Increment position locate past */
+    return tempstr ;			/* quote and semicolon */
+  }
+
+  /* search for delimiter to end, or end of string */
+
+  i=0 ;	/* initialize */
+
+  if ( *temp != END_OF_FIELD ) {	/* backward compatability check */
+
+    for ( i=0; *temp != '\0';temp++,i++){/* Stop on NULL*/
+
+      if ( ( *temp == LINE_CONTINUE && *(temp+1) == '\n') ||  *temp == TAB ) {
+	temp++ ;
+	skipchar++ ;
+      } else if ( *temp == delimiter )
+	break ;					/* break for delimiter  */
+      /* Now copy the char into the output string */
+      tempstr[i] = *temp ;
+    }
+                             /* Eat the delimiter from ind also */
+    *ind += ( i + skipchar + 1) ;	/* Increment position locate */
+  }	
+  tempstr[i] = '\0';		/* terminate string */   
+  return tempstr;
+}
+/***********Mody B*********/
+char *get_string(ossim_int32 *ind,char *src,char delimeter )
+{ char *temp;
+  temp  = cpy_del(&src[*ind],delimeter, ind);
+  if( ! strcmp ( temp, TEXT_NULL ))
+    strcpy ( temp, "" ) ;
+  return temp;
+}
+/**********Mody B*************/
+char vpf_get_char(ossim_int32 *ind, char *src)
+{  char temp;
+   while ( src[*ind] == SPACE || src[*ind] == TAB ) (*ind)++ ;
+   temp  = src[*ind];
+   *ind += 2;
+   return temp;
+}
+/***********Mody B***********/
+ossim_int32 get_number(ossim_int32 *ind, char *src,char delimeter)
+{  char *temp;
+   ossim_int32  num;
+   temp  = cpy_del(&src[*ind],delimeter, ind);
+   if (strchr(temp, VARIABLE_COUNT ) == NULL)
+      num = atoi(temp);
+   else
+      num = -1;
+   free(temp);
+   return num;
+}
+
+
+/*************************************************************************
+ *
+ *N  parse_data_def
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function parses a table's data definition and creates a header
+ *     in memory that is associated with the table.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    table <inout> == (vpf_table_type *) vpf table structure.
+ *    ddlen <input> == (ossim_int32) length of the table's data definition.
+ *
+ *    return value is the record length if all items are fixed length, or
+ *    -1 if the record contains variable length items
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   April 1991                        DOS Turbo C
+ *    Mody Buchbinder  May 1991 - Modified for new table header.
+ *    Dave Flinn       July 1991 - updated for UNIX
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    void *vpfmalloc()                                  VPFMISC.C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+ossim_int32 parse_data_def( vpf_table_type *table )
+{
+   register ossim_int32 n,i;
+   ossim_int32 p, k;
+   char *buf,*des,*nar,*vdt, *tdx, *doc, byte ;/*temporary storage */
+   char end_of_rec;
+   int status;
+   ossim_int32 ddlen;
+   ossim_int32 reclen = 0;
+#if UNIX
+   /* just for backward compat check */
+   ossim_int32 bkcompat = 1 ;
+#endif
+
+   if ( table->mode == Read ) {
+     fread(&ddlen,sizeof(ddlen),1,table->fp);
+
+     /* Check the next byte to see if the byte order is specified */
+     fread(&byte,1,1,table->fp);
+     p=0;
+     table->byte_order = LEAST_SIGNIFICANT; /* default */
+     switch (toupper(byte)) {
+	case 'L':
+	   p++;
+	   break;
+	case 'M':
+	   table->byte_order = MOST_SIGNIFICANT;
+	   p++;
+	   break;
+     }
+     if (MACHINE_BYTE_ORDER != table->byte_order) {
+	k = ddlen;
+	swap_four((char *)&k,(char *)&ddlen);
+     }
+     if ( ddlen < 0 ) {
+       return (ossim_int32)0 ;
+     }
+
+     STORAGE_BYTE_ORDER = table->byte_order;
+
+     /* header without first 4 bytes */
+     table->ddlen = ddlen + sizeof (ossim_int32) ;
+     buf = (char *)vpfmalloc((ddlen+3)*sizeof(char));
+     buf[0] = byte; /* already have the first byte of the buffer */
+     Read_Vpf_Char(&buf[1],table->fp,ddlen-1) ;
+   } else {
+     table->ddlen = (long)strlen ( table->defstr ) ;
+     ddlen = table->ddlen ;
+     buf = (char *)vpfmalloc((ddlen+3)*sizeof(char));
+     strncpy ( buf, table->defstr, ddlen ) ;
+     p=0;
+     table->byte_order = LEAST_SIGNIFICANT; /* default */
+     byte = buf[0];
+     switch (toupper(byte)) {
+	case 'L':
+	   p++;
+	   break;
+	case 'M':
+	   table->byte_order = MOST_SIGNIFICANT;
+	   p++;
+	   break;
+     }
+     STORAGE_BYTE_ORDER = table->byte_order;
+   }
+
+   buf[ddlen-1] = '\0'; /* mark end of string for reading functions */
+   if ( buf[p] == ';' )
+     p++; /* buf[p] is semi-colon */
+   des = get_string(&p,buf,COMPONENT_SEPERATOR );
+   strncpy(table->description,des,80);
+   free(des);
+   nar = get_string(&p,buf,COMPONENT_SEPERATOR );
+   strncpy(table->narrative ,nar,12);
+   free(nar);
+   n = 0 ;
+   /* get number of fields */
+   for (i=p; i < ddlen;i++)
+     if ( buf[i] == LINE_CONTINUE )
+       i++ ;	/* skip past line continue, and next character */
+     else if (buf[i] == END_OF_FIELD ) 		/* Found end of field */
+	n++;					/* increment nfields */
+     else if (buf[i] == COMMENT )		/* skip past comments */
+       while ( buf[i] != LINE_CONTINUE &&
+	       buf[i] != END_OF_FIELD &&
+	       buf[i] != '\0')
+	 i++ ;					/* increment i */
+
+   table->nfields = n ;
+   table->header = (header_type)vpfmalloc((n+1)*sizeof(header_cell));
+
+   for(i=0;i<n;i++) {
+     end_of_rec = FALSE;
+     table->header[i].name  = get_string(&p,buf, FIELD_COUNT);  /*****/
+     rightjust(table->header[i].name);
+     table->header[i].type  = toupper(vpf_get_char  (&p,buf));
+     table->header[i].count = get_number(&p,buf,FIELD_SEPERATOR );
+
+     if ( i == 0 )
+       if ( ossim_strcasecmp ( table->header[0].name, "ID" ) ) {
+        free(buf);
+	      return (ossim_int32)0 ;
+       }
+
+     if(table->header[i].count == -1)
+       reclen = -1;			/* set reclen to variable len flag */
+
+     /* Now set null values and add up record length, if fixed length */
+
+     status = 0;
+
+     switch (table->header[i].type) {
+     case 'I':
+       if ( reclen >= 0 )
+	 reclen += (sizeof(ossim_int32)*table->header[i].count);
+       table->header[i].nullval.Int = NULLINT ;
+       break;
+     case 'S':
+       if ( reclen >= 0 )
+	 reclen += (sizeof(short int)*table->header[i].count);
+       table->header[i].nullval.Short = NULLSHORT ;
+       break;
+     case 'F':
+       if ( reclen >= 0 )
+	 reclen += (sizeof(float)*table->header[i].count);
+       table->header[i].nullval.Float = NULLFLOAT ;
+       break;
+     case 'R':
+       if ( reclen >= 0 )
+	 reclen += (sizeof(double)*table->header[i].count);
+       table->header[i].nullval.Double = NULLDOUBLE ;
+       break;
+     case 'T':
+       if ( reclen >= 0 ) { 		/* if fixed length */
+	 reclen += (sizeof(char)*table->header[i].count);
+	 table->header[i].nullval.Char =
+	   (char *) vpfmalloc ( table->header[i].count + 1 ) ;
+	 for ( k=0; k < table->header[i].count; k++ )
+	   table->header[i].nullval.Char[k] = NULLCHAR ;
+	 table->header[i].nullval.Char[k] = '\0';
+       } else {			/* variable length */
+	 table->header[i].nullval.Char =
+	   (char *) vpfmalloc ( VARIABLE_STRING_NULL_LENGTH + 1 ) ;
+	 for ( k=0; k < VARIABLE_STRING_NULL_LENGTH ; k++ )
+	   table->header[i].nullval.Char[k] = NULLCHAR ;
+	 table->header[i].nullval.Char[k] = '\0';
+       }
+       break;
+     case 'C':
+       if ( reclen >= 0 )
+	 reclen += (sizeof(coordinate_type)*table->header[i].count);
+       table->header[i].nullval.Other = '\0';
+       break;
+     case 'Z':
+       if ( reclen >= 0 )
+	 reclen += (sizeof(tri_coordinate_type)*table->header[i].count);
+       table->header[i].nullval.Other = '\0' ;
+       break;
+     case 'B':
+       if ( reclen >= 0 )
+	 reclen += (sizeof(double_coordinate_type)*table->header[i].count);
+       table->header[i].nullval.Other = '\0' ;
+       break;
+     case 'Y':
+       if ( reclen >= 0 )
+	 reclen +=
+	   (sizeof(double_tri_coordinate_type)*table->header[i].count);
+       table->header[i].nullval.Other ='\0';
+       break;
+     case 'D':
+       if ( reclen >= 0 )
+	 reclen += ((sizeof(date_type)-1)*table->header[i].count);
+       strcpy ( table->header[i].nullval.Date, NULLDATE ) ;
+       break;
+     case 'K':
+       reclen = -1;
+       table->header[i].nullval.Other = '\0' ;
+       break;
+     case 'X':
+       /* do nothing */
+       table->header[i].nullval.Other = '\0' ;
+       break ;
+     default:
+       status = 1;
+       break ;
+     } /** switch type **/
+
+     if (status)
+     {
+        free(buf);
+        return (ossim_int32)0;
+     } 
+
+     table->header[i].keytype     = vpf_get_char  (&p,buf);
+     des = get_string(&p,buf, FIELD_SEPERATOR );
+     rightjust(des);
+     strncpy(table->header[i].description,des,80);
+     free(des);
+     vdt = get_string(&p,buf, FIELD_SEPERATOR );
+     strncpy(table->header[i].vdt,vdt,12);
+     free(vdt);
+#if UNIX
+     /* This is for backward compatability qc checking */
+     if ( bkcompat && buf[p] == END_OF_FIELD ) {
+       bkcompat= 0 ;
+     }
+#endif
+     tdx = get_string(&p,buf, FIELD_SEPERATOR ) ;
+     if ( ! strcmp ( tdx, "" ) ) {
+       table->header[i].tdx = (char *) NULL ;
+       if (buf[p] == ':')
+	 end_of_rec = TRUE;
+     } else {
+       if (strcmp(tdx,"-") != 0) {
+	  table->header[i].tdx =(char*) vpfmalloc ( (unsigned long)strlen ( tdx ) +1 ) ;
+	  strcpy (table->header[i].tdx, tdx );
+       } else table->header[i].tdx = (char *)NULL;
+     }
+     free(tdx);
+     if (!end_of_rec) {
+	doc = get_string(&p,buf, FIELD_SEPERATOR ) ;
+	if ( ! strcmp ( doc, "" ) ) {
+	  table->header[i].narrative = (char *) NULL ;
+	  end_of_rec = TRUE;
+	} else {
+	  if (strcmp(doc,"-") != 0) {
+	     table->header[i].narrative = (char*)vpfmalloc ( (unsigned long)strlen(doc) +1) ;
+	     strcpy (table->header[i].narrative, doc );
+	  } else table->header[i].narrative = (char *)NULL;
+	}
+	free(doc);
+     } else table->header[i].narrative = (char *)NULL;
+     p += 1; /** eat semicolon **/
+    }
+   free(buf);
+   return reclen;
+}
+
+
+/*************************************************************************
+ *
+ *N  vpfhandler
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function temporarily takes the place of the DOS hard error
+ *     handler.  It is needed when 'vpfopencheck' replaces the DOS error
+ *     handler for disk operations, so that the disk errors may be handled
+ *     more suitably for our environment.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels    May 1991                       DOS Turbo C
+ *    Dave Flinn        July 1991  Updated for UNIX, basically commented
+ *                                 the subroutine out
+ *E
+ *************************************************************************/
+/*static int disk_error;*/
+#define IGNORE 0
+#define RETRY  1
+#define ABORT  2
+#define DISPLAY_STRING 0x09
+
+#ifdef __MSDOS__
+static int vpfhandler(ossim_int32 errval, ossim_int32 ax, ossim_int32 bp, ossim_int32 si)
+{
+   if (ax < 0) {
+      bdosptr(DISPLAY_STRING,"device error$", 0);
+      hardretn(-1);
+   }
+   disk_error = errval;
+
+   si++; bp++;  /* get rid of compiler warning */
+   return(IGNORE);
+}
+#endif
+
+
+/*************************************************************************
+ *
+ *N  vpfopencheck
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function tries its darndest to open a file.  It initially calls
+ *     fopen with the given filename and mode.  If that doesn't work and
+ *     the file is not on the hard disk, it displays a message asking the
+ *     user to enter the correct disk in the drive, waits for either a retry
+ *     or a cancel response, and, if told to retry, tries again.  This
+ *     process is repeated until either the file is opened or the user
+ *     requests cancel.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    filename <input> == (char *) full path name of the file to be opened.
+ *    mode     <input> == (char *) mode of the file.
+ *    diskname <input> == (char *) descriptive name of the disk the file is
+ *                                 on.
+ *    return  <output> == (FILE *) file pointer newly associated with
+ *                                 filename.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels    May 1991                       DOS Turbo C
+ *    Dave Flinn        July 1991     Updated for UNIX
+ *E
+ *************************************************************************/
+FILE *vpfopencheck( const char *filename,
+		    const char *mode,
+		    const char * diskname )
+{
+   FILE *fp;
+   char* tmpFilename = (char*) malloc ( strlen(filename) + 1 );
+/*
+   char *text[] = {"Please insert",
+		   "                                        ",
+		   "in data drive",
+		   "                                                      "};
+*/
+   ossim_int32 retry = 0;
+#ifdef __MSDOS__
+   extern char home[255];
+   void interrupt (*doshandler)();
+
+   doshandler = getvect(36);
+   harderr(vpfhandler);
+
+   strncpy(text[1],diskname,strlen(text[1]));
+   strcpy(text[3],filename);
+#endif
+   fp = NULL;
+
+
+   /* copy the filename because we might modify it. */
+   tmpFilename[strlen(filename)] = '\0'; /* just in case */
+   strcpy(tmpFilename, filename);
+   
+   while (fp == NULL)
+   {
+      fp = fopen(tmpFilename,mode);
+      if (fp == NULL)
+      {
+#ifdef __MSDOS__
+	 if ( toupper(home[0]) != toupper(tmpFilename[0]) )
+	    retry = displayerror(text,   4);
+	 else
+#else
+            /* give names ending in dot another chance without the dot */
+            if (tmpFilename[strlen(tmpFilename)-1] == '.')
+            {
+               tmpFilename[strlen(tmpFilename)-1] = '\0';
+               retry = TRUE;
+            }
+            else
+#endif
+               retry = FALSE;
+	 if (!retry) break;
+      }
+   }
+
+   free(tmpFilename);
+   tmpFilename = 0;
+   
+#ifdef __MSDOS__
+   setvect(36,doshandler);
+#endif
+   return fp;
+}
+
+
+/*************************************************************************
+ *
+ *N  vpf_open_table
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function opens a vpf table and either loads it into RAM or sets
+ *     up the structure to read off of disk.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    tablename <input> == (const char *) file name of the table.
+ *    storage   <input> == (storage_type) table storage mode -
+ *                                        either ram or disk.
+ *    mode      <input> == (const char *) file mode for opening the table -
+ *                                  same as fopen() mode in C.
+ *    defstr    <input> == (char *) table definition string used for
+ *                                  creating a writable table.
+ *    vpf_open_table <output> == (vpf_table_type) VPF table structure.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   April 1991                   DOS Turbo C
+ *    Dave Flinn       July 1991                    UNIX compatable
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+vpf_table_type vpf_open_table( const char * tablename,
+			       storage_type   storage ,
+			       const char * mode,
+			       char         * defstr )
+{
+   vpf_table_type   table;
+   char             tablepath[255],
+		  * idxname;
+   ossim_int32         i,
+		    j;
+   ossim_int32         tablesize,
+		    idxsize,
+		    memsize;
+   ossim_uint32 ulval;
+   char            * diskname = "VPF data disc";
+
+   strcpy(tablepath,tablename);
+   rightjust(tablepath);
+
+   /* Parse out name and path */
+   j = -1;
+   i=(long)strlen(tablepath);
+   while (i>0) {
+#ifdef __MSDOS__
+      if (tablepath[i] == '\\') {
+#else
+      if (tablepath[i] == '/') {
+#endif
+	 j = i;
+	 break;
+      }
+      i--;
+   }
+   strncpy(table.name,&(tablepath[j+1]),12);
+   rightjust(table.name);
+   strupr(table.name);
+   table.path = (char *)vpfmalloc(((unsigned long)strlen(tablepath)+5)*(unsigned long)sizeof(char));
+   strcpy(table.path, tablepath);
+   table.path[j+1] = '\0';
+
+ /* Establish a read or write table operation */
+
+   if ( mode[0] == 'r' )
+     table.mode = Read ;
+   else
+     table.mode = Write ;
+
+   /*fprintf(stderr, "vpf_open_table opening %s\n", tablepath);*/
+   table.fp = vpfopencheck(tablepath,mode,diskname);
+   if (table.fp == NULL) {
+      perror(tablepath);
+/*
+#if __MSDOS__
+      perror(tablepath);
+      getch();
+      if (getgraphmode() >= 0) closegraph();
+      exit(0);
+#endif
+*/
+      free(table.path);
+      if (table.fp) {
+	fclose(table.fp);
+	table.fp = NULL;
+      } 
+      return table;
+   }
+
+   /* If file is to be created, copy the def string ptr into header for now */
+
+   if ( table.mode == Write )
+     table.defstr = defstr ;
+
+#ifdef __MSDOS__
+   tablesize = (filelength(fileno(table.fp)));
+#else
+   {  /* UNIX doesn't have a filelength function, so this is the best */
+     struct stat statbuf ;
+     if ( stat ( tablepath, &statbuf ) < 0 ) {
+       fprintf (stderr, "vpf_open_table: can't stat file\n" ) ;
+       free(table.path);
+       fclose(table.fp);
+       table.fp = NULL;
+       return table;
+     }
+     tablesize = statbuf.st_size ;
+   }
+#endif
+
+   /* Populate table structure with correct data, either for read or write */
+
+   table.reclen = parse_data_def(&table);
+
+   if ( table.mode == Write ) {   /* write out header */
+     rewind ( table.fp ) ;
+     Write_Vpf_Int ( &table.ddlen, table.fp, 1 ) ;
+     Write_Vpf_Char ( table.defstr, table.fp, table.ddlen ) ;
+     free ( table.defstr ) ;
+     table.defstr = (char *) NULL ;
+     table.nrows = 0 ;
+   }
+
+   if (table.reclen > 0) {      /* Index file */
+      table.xstorage = (storage_type)COMPUTE;
+      if (table.mode != Write)
+	 table.nrows = (tablesize - table.ddlen)/table.reclen;
+      table.xfp = (FILE *) NULL ;
+   } else {
+      idxname = strdup( tablepath );
+#ifdef __MSDOS__
+      idxname[strlen(tablepath)-1] = 'x';
+#else
+      if (idxname[strlen(tablepath)-1] == '.')
+	idxname[strlen(tablepath)-2] = 'x';
+      else
+	idxname[strlen(tablepath)-1] = 'x';
+#endif
+      table.xfp = fopen(idxname, mode);
+
+      if ((!table.xfp) && (table.mode == Read)) {
+	 perror(idxname);
+         fprintf(stderr, "hit RETURN to continue...");
+	 i=getc(stdin);
+	 free(idxname);
+	 for (i = 0; i < table.nfields; i++)
+	   free(table.header[i].name);
+	 free(table.header);
+	 free(table.path);
+         fclose(table.fp);
+         table.fp = NULL;
+         return table;
+      }
+
+      free(idxname);
+
+/*#ifdef __MSDOS__*/
+      table.xstorage = (storage_type)DISK;   /* Worst case default */
+/*#endif*/
+
+   /* Only read in index if file is read only */
+
+      if (table.xfp && ( table.mode == Read ) ) {
+	Read_Vpf_Int (&(table.nrows), table.xfp, 1 ) ;
+	Read_Vpf_Int (&ulval, table.xfp, 1 ) ;
+	idxsize = table.nrows*sizeof(index_cell) + 10L;
+
+#ifdef __MSDOS__
+	if ( (idxsize < (farcoreleft()/2)) && (idxsize < __64K) )
+#else
+	if (0)
+#endif
+	  {
+	    table.xstorage = (storage_type)RAM;
+	    table.index = (index_type)vpfmalloc(idxsize);
+	    for (i=0;i<table.nrows;i++) {
+	      Read_Vpf_Int (&(table.index[i].pos), table.xfp, 1) ;
+	      Read_Vpf_Int (&(table.index[i].length),table.xfp,1 ) ;
+	    }
+	    fclose(table.xfp);
+	  }
+      } else if (table.mode == Write) {
+
+     /* Write out dummy header record for index file. vpf_close_table finishes
+	the job. */
+
+	 Write_Vpf_Int ( &(table.ddlen), table.xfp, 1 ) ;
+	 Write_Vpf_Int ( &(table.ddlen), table.xfp, 1 ) ;
+	 table.xstorage = (storage_type)DISK;
+	 table.index = (index_type) NULL ;
+
+      }
+   }  /* end of if table .reclen */
+
+    table.storage = (storage_type)DISK;
+#ifdef __MSDOS__
+   memsize = (ossim_int32)min(farcoreleft(),__64K);
+#else
+   memsize = MAXINT;
+#endif
+
+   if ( (storage != disk) && ( table.mode == Read ) ) {
+      if (tablesize + table.nrows * table.nfields * HEAP_OVERHEAD < memsize) {
+	 fseek(table.fp,index_pos(1,table),SEEK_SET);
+	 table.row = (row_type *)vpfmalloc((table.nrows+1)*sizeof(row_type));
+	 for (i=0;i<table.nrows;i++) {
+	    table.row[i] = read_next_row(table);
+	 }
+	 fclose(table.fp);
+	 table.storage = (storage_type)RAM;
+      }
+   }
+   table.status = OPENED;
+   return table;
+ }
+
+/*************************************************************************
+ *
+ *N  vpf_close_table
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     This function frees an entire table from memory.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    table       <inout> == (vpf_table_type) VPF table structure.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Barry Michaels   May 1991                     DOS Turbo C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+void vpf_close_table( vpf_table_type *table )
+{
+   register ossim_int32 i;
+
+   if (table->status != OPENED) {
+      return;
+   }
+   /*fprintf(stderr, "vpf_close_table closing %s%s\n", table->path, table->name);*/
+
+   /* If the table is writable, write out the final record count */
+
+   if ( table->mode == Write && table->xfp ) {
+     rewind ( table->xfp ) ;
+     Write_Vpf_Int ( &table->nrows, table->xfp, 1 ) ;
+     Write_Vpf_Int ( &table->ddlen, table->xfp, 1 ) ;
+   }
+
+   for (i=0;i<table->nfields;i++) {
+      free(table->header[i].name);
+      /* free up null text string */
+      if ( table->header[i].type == 'T')
+	 free(table->header[i].nullval.Char);
+      /* free up index file string */
+      if (table->header[i].tdx!=(char *)NULL)
+	free ( table->header[i].tdx ) ;
+      /* free up narrative table string */
+      if (table->header[i].narrative!=(char *)NULL) {
+	free ( table->header[i].narrative ) ;
+      }
+   }
+   free(table->header);
+
+   switch (table->storage) {
+      case RAM:
+	 for (i=0;i<table->nrows;i++) free_row(table->row[i],*table);
+	 free(table->row);
+	 break;
+      case DISK:
+	 fclose(table->fp);
+	 break;
+      default:
+	 printf("%s%s: unknown storage flag: %d\n",table->path,table->name,
+		table->storage);
+	 break;
+   }
+
+   switch (table->xstorage) {
+      case RAM:
+	 free(table->index);
+	 break;
+      case DISK:
+	 fclose(table->xfp);
+	 break;
+      case COMPUTE:
+	 break;
+      default:
+	 printf("%s%s: unknown index storage flag: %d\n",
+		table->path,table->name,table->storage);
+	 break;
+   }
+   table->nfields = 0;
+   free(table->path);
+   table->status = CLOSED;
+}
+
+
+
+ossim_int32 is_vpf_table( const char *fname )
+{
+   FILE *fp;
+   ossim_int32 n, ok;
+
+   fp = fopen( fname, "rb" );
+   if (!fp) {
+      return FALSE;
+   }
+   Read_Vpf_Int ( &n, fp, 1 ) ;
+   fseek( fp, n-1, SEEK_CUR );
+   if (fgetc(fp) == ';')
+      ok = TRUE;
+   else
+      ok = FALSE;
+   fclose(fp);
+   return ok;
+}
+
diff --git a/ossim/src/ossim/vpfutil/vpftidx.c b/ossim/src/ossim/vpfutil/vpftidx.c
new file mode 100644
index 0000000..1761201
--- /dev/null
+++ b/ossim/src/ossim/vpfutil/vpftidx.c
@@ -0,0 +1,1968 @@
+/*************************************************************************
+ *
+ * Environmental Systems Research Institute (ESRI) Applications Programming
+ *
+ *N  Module VPFTIDX
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *P
+ *   Purpose: Subroutines to create and read both the thematic index
+ *	      or a gazeteer index on a VPF table column.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    N/A
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Dave Flinn       September/October 1991
+ *    Barry Michaels   January 1992   A few adjustments for DOS.
+ *                                    Added sets to create function to
+ *                                    take advantage of SET's disk-
+ *				      swapping ability when low on memory.
+ *E
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions:
+ *F
+ *
+ *    set_type read_thematic_index ( char *tablename,
+ *				     char *value ) ;
+ *
+ *    ThematicIndex open_thematic_index ( char *tablename );
+ *
+ *    set_type search_thematic_index ( ThematicIndex *themindex,
+ *				       char *value ) ;
+ *
+ *    void close_thematic_index ( ThematicIndex *themindex );
+ *
+ *    set_type read_gazetteer_index (char * vpfname, char * query_str ) ;
+ *
+ *    set_type search_gazetteer_index (ThematicIndex *idx,
+ *				       char * query_str ) ;
+ *
+ *    ossim_int32 read_gazetteer_index_directory (
+ *					ThematicIndexDirectory ** gid,
+ *					ThematicIndexHeader     * gi,
+ *					FILE * idx_fp);
+ *
+ *    ossim_int32 write_thematic_index_header ( ThematicIndexHeader h ,
+ *					     FILE *fp ) ;
+ *
+ *    ossim_int32 read_thematic_index_header ( ThematicIndexHeader *h ,
+ *					    FILE *fp ) ;
+ *
+ *    ossim_int32 write_thematic_index_directory (
+ *				       ThematicIndexHeader h ,
+ *				       ThematicIndexDirectory *d,
+ *				       ossim_int32 size,
+ *				       FILE *fp ) ;
+ *
+ *    ossim_int32 write_gazetteer_index_directory (
+ *				       ThematicIndexHeader h ,
+ *				       ThematicIndexDirectory *d,
+ *				       ossim_int32 size,
+ *				       FILE *fp ) ;
+ *
+ *    ossim_int32 create_thematic_index ( char indextype,
+ *				       char *tablename,
+ *				       char *idxname ,
+ *				       char *columnname,
+ *				       char *idx_set );
+ *
+ *    ossim_int32 create_gazetteer_index (char *tablename,
+ *				       char *idx_fname ,
+ *				       char *columnname,
+ *				       char *idx_set);
+ *
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible. Created on UNIX first
+ *E
+ *************************************************************************/
+
+#include <ctype.h>
+#include <ossim/vpfutil/machine.h>
+#include <ossim/vpfutil/vpfmisc.h>
+#include <ossim/vpfutil/vpftable.h>
+#include <ossim/vpfutil/vpftidx.h>
+#include <string.h>
+#include <stdlib.h>
+#include <memory.h>
+
+#ifndef __MSDOS__ 
+#  ifndef _WIN32
+#    include <unistd.h>
+#  endif
+#endif
+
+void *vpfmalloc(unsigned long size);
+
+#define Whimper(str) {\
+      return ((ossim_int32)0) ; }
+
+#define SWhimper(str) {\
+      set_type err; err = set_init (1) ;\
+      printf("\nvpftidx: < %s >\n", str ) ;\
+      return err ; }
+
+#define OWhimper(str) {\
+      printf("\nvpftidx: < %s >\n", str ) ;\
+      return idx ; }
+
+
+/*
+ * an index file directory entry takes up a different amount
+ * of space in memory than it does on disk; the following constant
+ * should be used to calculate the starting offset for
+ * index data
+ *
+ * example: if the number of items to be indexed is t, and each item is
+ *          s bytes long, then use
+ *
+ *          sizeof(ThematicIndexHeader) + t * (s + DIR_ON_DISK_INCR)
+ *
+ * to find out where the first byte of indexing data will be placed.
+ *
+ * That first byte is what must be stored as the value of Header.nbytes
+ */
+
+#define DIR_ON_DISK_INCR (2 * sizeof(ossim_int32))
+
+/*************************************************************************
+ *
+ *N  create_thematic_index
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *
+ *      Create a thematic index file on a given vpf table.
+ *P
+ *
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    indextype  <input> == (char) either 'T' for thematic index or
+ *					  'G' for gazetteer.
+ *    tablename  <input> == (char *) path name of the vpf table.
+ *    idxname    <input> == (char *) name of the index file to be created.
+ *    columnname <input> == (char *) name of column to create index on
+ *			    if the column is a triplet id, the columnname
+ *			    should be as such: EDG_ID\ID
+ *					       EDG_ID\TILE_ID
+ *					       EDG_ID\EXT_ID
+ *    idxset     <input> == (char *) array of character values to index on
+ *                          if the index type is gazetteer.  Not used for
+ *                          index type = 'T'.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Dave Flinn       October	 1991 
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *    void *vpfmalloc                                    VPFMISC.C
+ *    vpf_open_table					 VPFTABLE.C
+ *    table_pos
+ *    table_element
+ *    vpf_close_table
+ *    write_thematic_index_header			see below
+ *    write_thematic_index_directory			see below
+ *    Vpf_Write_* macros
+ *    set_init						SET.C
+ *    set_insert
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.  developed on UNIX
+ *E
+ *************************************************************************/
+ossim_int32 create_thematic_index ( char indextype,
+		 	         char *tablename,
+				 char *idxname ,
+				 char *columnname,
+				 char *idx_set ) 
+{
+   unsigned int i;
+   unsigned int column_length;
+   FILE           *ifp ;
+   ossim_int32	 j,tablepos,k,
+      keycolumn = 0 ,	/* 1 if key column */
+      itemp , n,
+      idsize ,		/* either 2 or 4 bytes */
+      datasize ;		/* Directory value data size */
+   char           *buf ,
+      hack[80] ;
+   vpf_table_type table ;
+   ThematicIndexHeader		h ;
+   ThematicIndexDirectory	*d ;
+   short int			stemp ;
+   float				ftemp ;
+   double			dtemp ;
+   id_triplet_type		key ;
+   
+   if ( indextype == 'G' )
+   {
+      return ( create_gazetteer_index ( tablename, idxname,columnname,idx_set)) ;
+   }
+   
+   /* convert columnname to uppercase and check for id triplet */
+   column_length = (unsigned int)strlen(columnname);
+   for ( i=0 ; i < column_length; i++ )
+   {
+      /* copy into header structure */
+      h.vpf_column_name[i] = toupper ( columnname[i] ) ;
+   }
+   
+   h.vpf_column_name[i] = '\0';
+   
+   h.index_type = 'T' ;		/* default */
+   h.type_count = 1 ;
+
+   for (i=0 ; i < column_length; i++ )
+   {
+      columnname[i] = toupper ( columnname[i] ) ;
+
+#if 0
+    /* check if request is on a triplet id field */
+
+    if ( columnname[i] == '\\' ) {
+
+      columnname[i+1] = toupper ( columnname[i+1] ) ;
+      
+      switch ( columnname[i+1] ) {	/* locate sub-column key */
+      case 'I':	/* ID of triplet id */
+	keycolumn = 1 ; break ;
+      case 'T':	/* TILE_ID of triplet id */
+	keycolumn = 2 ; break ;
+      case 'E':	/* EXT_ID of triplet id */
+	keycolumn = 3 ; break ;
+      default:
+	Whimper ("error in key column request") ;
+	/* break ; Whimper contains a return */
+      }	/* end of switch */
+      strcpy( h.vpf_column_name, strupr ( columnname )) ;
+      columnname[i] = (char) NULL ;
+    }     /* end of if columnname == \ */
+#endif
+  }	/* end of for loop */
+
+  table = vpf_open_table ( tablename, disk, "rb", NULL ) ;
+
+
+  /* Determine the id_data_size. This will save 50% of file size  */
+
+  if ( table.nrows > MAX_ID ) {
+    h.id_data_type = 'I' ;		/* ossim_int32s */
+    idsize = sizeof ( ossim_int32 ) ;
+  } else {
+    h.id_data_type = 'S' ;		/* ossim_int32s */
+    idsize = sizeof ( short int ) ;
+  }
+
+  /* Find position of column in input table */
+
+  tablepos = table_pos ( columnname, table ) ;
+
+  /* Now check data type */
+
+  switch (table.header[tablepos].type) {
+  case 'X':
+    Whimper ("Cannot make index on Null Column") ;
+    /* A return is in Whimper - break statement cannot be reached */
+  case 'T':
+    /* Don't bother with variable length, it's too hard for now */
+    if ( table.header[tablepos].count <= 0 )
+      Whimper ("Cannot make index on variable length text column") ;
+    datasize = table.header[tablepos].count ;
+    h.type_count = datasize ;		/* the special case */
+    break;
+  case 'D': 
+    datasize = sizeof ( date_type ) ;
+    Whimper ("Not implemented yet") ;
+  case 'I':
+    datasize = sizeof ( ossim_int32 ) ;
+    break ;
+  case 'K':				/* treat keys like integers */
+    Whimper ("Cannot make index on key column") ;
+  case 'S':
+    datasize = sizeof ( short int ) ;
+    break ;
+  case 'F':
+    datasize = sizeof ( float ) ;
+    break ;
+  case 'R':
+    datasize = sizeof ( double ) ;
+    break ;
+  case 'C':
+  case 'Z':
+  case 'B':
+  case 'Y':
+    Whimper ("Cannot make index on Coordinate Column") ;
+  default:
+    sprintf (hack,"No such type < %c >", table.header[tablepos].type ) ;
+    Whimper ( hack ) ;
+  }  /* end of switch */
+
+  /* open output index file */
+
+  if (( ifp = fopen ( idxname, "wb" )) == NULL )
+    Whimper ( idxname ) ;
+
+  /* Create directory size as big as table, for worst case */
+
+  d = (ThematicIndexDirectory *)
+    vpfmalloc(sizeof(ThematicIndexDirectory)) ;
+  h.nbins = 0 ;		/* initialize the directory counter */
+
+#define REALLOC_DIRECTORY(loc) {\
+  if ((d = (ThematicIndexDirectory *) \
+       realloc(d,sizeof(ThematicIndexDirectory) * (loc+1))) == NULL )\
+    Whimper ("error in reallocing directory") ; \
+  d[loc].num_items = 0 ;\
+  d[loc].idset = set_init(table.nrows+1); }
+
+#define INSERT_ID(loc,val) {\
+  d[loc].num_items++ ; \
+  set_insert(val,d[loc].idset); }
+
+/* Fill up id sets */
+
+  switch ( table.header[tablepos].type ) {
+  case 'I':
+
+    for ( i=1; (int)i <= table.nrows; i++ ) {
+      /* read in record from disk */
+      table_element ( tablepos,i,table,&itemp,&n);
+      for ( k=0; k < h.nbins; k++ )	/* Search directory for value*/
+	if ( d[k].value.ival == itemp )
+	  break ;/* Found a match */
+      if ( k == h.nbins ) { 		/* New value in column */
+	REALLOC_DIRECTORY ( k ) ;
+	d[k].value.ival = itemp ;
+	h.nbins++ ;
+      }
+      INSERT_ID(k,i) ;
+    }   /* end of for i loop */ 
+
+    break ;
+  case 'T':
+
+    /* initialize */
+    buf = (char *) table_element (tablepos,1,table,NULL,&n);
+    REALLOC_DIRECTORY ( 0 ) ;
+    d[0].value.strval = (char *) vpfmalloc ( (unsigned long)strlen ( buf ) +1) ;
+    memcpy( d[0].value.strval, buf, (unsigned long)strlen(buf) ) ;
+    free (buf) ;
+    h.nbins++ ;
+
+    for ( i=1; (int)i <= table.nrows; i++ ) {
+      /* read in record from disk */
+      buf = (char *) table_element (tablepos,i,table,NULL,&n);
+
+      /* strlen ( buf ) should equal datasize */
+
+      for ( k=0; k < h.nbins; k++ )	/* Search directory for value*/
+	if ( ! strcmp ( d[k].value.strval, buf ) )
+	  break ;/* Found a match */
+
+      if ( k == h.nbins ) { 		/* New value in column */
+	REALLOC_DIRECTORY ( k ) ;
+	d[k].value.strval = (char *) vpfmalloc ( (unsigned long)strlen ( buf ) +1) ;
+	memcpy( d[0].value.strval, buf, strlen(buf) ) ;
+	h.nbins++ ;
+      }
+      INSERT_ID(k,i) ;
+      free(buf);
+    }   /* end of for i loop */
+
+    break ;
+  case 'S':
+
+    for ( i=1; (int)i <= table.nrows; i++ ) {
+      /* read in record from disk */
+      table_element ( tablepos,i,table,&stemp,&n);
+      for ( k=0; k < h.nbins; k++ )	/* Search directory for value*/
+	if ( d[k].value.sval == stemp ) 
+	  break ;/* Found a match */
+      if ( k == h.nbins ) { 		/* New value in column */
+	REALLOC_DIRECTORY ( k ) ;
+	d[k].value.sval = stemp ;
+	h.nbins++ ;
+      }
+      INSERT_ID (k,i) ;
+    }   /* end of for i loop */
+
+    break ;
+  case 'F':
+
+    for ( i=1; (int)i <= table.nrows; i++ ) {
+      /* read in record from disk */
+      table_element ( tablepos,i,table,&ftemp,&n);
+      for ( k=0; k < h.nbins; k++ )	/* Search directory for value*/
+	if ( d[k].value.fval == ftemp ) 
+	  break ;/* Found a match */
+      if ( k == h.nbins ) { 		/* New value in column */
+	REALLOC_DIRECTORY ( k ) ;
+	d[k].value.fval = ftemp ;
+	h.nbins++ ;
+      }
+      INSERT_ID (k,i) ;
+    }   /* end of for i loop */
+
+    break ;
+  case 'R':
+    for ( i=1; (int)i <= table.nrows; i++ ) {
+      /* read in record from disk */
+      table_element ( tablepos,i,table,&dtemp,&n);
+      for ( k=0; k < h.nbins; k++ )	/* Search directory for value*/
+	if ( d[k].value.dval == dtemp )
+	  break ;/* Found a match */
+      if ( k == h.nbins ) { 		/* New value in column */
+	REALLOC_DIRECTORY ( k ) ;
+	d[k].value.dval = dtemp ;
+	h.nbins++ ;
+      }
+      INSERT_ID (k,i) ;
+    }   /* end of for i loop */
+
+    break ;
+  case 'K':
+
+    for ( i=1; (int)i <= table.nrows; i++ ) {
+      /* read in record from disk */
+      table_element ( tablepos,i,table,&key,&n);
+
+      if ( keycolumn == 1 ) 
+	itemp = key.id ;
+      else if ( keycolumn == 2 ) 
+	itemp = key.tile ;
+      else 
+	itemp = key.exid ;
+
+      for ( k=0; k < h.nbins; k++ )	/* Search directory for value*/
+	if ( d[k].value.ival == itemp ) 
+	  break ;/* Found a match */
+      if ( k == h.nbins ) { 		/* New value in column */
+	REALLOC_DIRECTORY ( k ) ;
+	d[k].value.ival = itemp ;
+	h.nbins++ ;
+      }
+      INSERT_ID (k,i) ;
+    }   /* end of for i loop */ 
+
+    break ;
+  default:
+    Whimper ("error in table reading switch, no such type") ;
+  } /* end of switch */
+
+  /* set up header and write it out */
+  /* h.id_data_size and columnname set up above */
+  /* h.type_count set above */
+
+  h.nbytes = THEMATIC_INDEX_HEADER_SIZE +
+             h.nbins * ( datasize + DIRECTORY_SIZE ) ;
+
+  h.column_type = table.header[tablepos].type ;
+  if ( h.column_type == 'K' )		/* It's really an I */
+    h.column_type = 'I' ;
+  for ( i=0; i < 4; i++ )
+    h.padding[i] = '\0' ;
+
+  /* only write the table name, no pathname */
+
+  for ( i = (unsigned int)strlen ( tablename ); i > 0; i-- )
+    if ( tablename[i] == '/' ) break ;
+  if ( i && i < strlen (tablename) )
+    strcpy ( h.vpf_table_name, strupr ( &tablename[i+1] ) ) ;
+  else
+    strcpy( h.vpf_table_name, strupr ( tablename) );
+  
+  for ( i=(unsigned int)strlen(h.vpf_table_name); i < 12 ; i++ )
+    h.vpf_table_name[i] = ' ' ;
+  h.vpf_table_name[11] = '\0';
+
+  /* columname setup above */
+
+  h.table_nrows = table.nrows ;
+
+  if ( write_thematic_index_header ( h, ifp ) == (ossim_int32)0 )
+    Whimper ( "error writing index header" ) ;
+
+  /* Now write out the rest of the header directory */
+
+  if ( write_thematic_index_directory ( h, d, idsize, ifp ) == (ossim_int32)0 )
+    Whimper ( "error writing index directory" ) ;
+
+  /* now write the data */
+  if ( h.id_data_type == 'I' ) {
+    for ( i=0; (int)i < h.nbins; i++ )
+      for ( j=1; j <= table.nrows; j++ )
+	if (set_member(j,d[i].idset))
+	  Write_Vpf_Int ( &j, ifp, 1 ) ;
+  } else {
+    for ( i=0; (int)i < h.nbins; i++ )
+      for ( j=1; j <= table.nrows; j++ )
+	if (set_member(j,d[i].idset)) {
+	  stemp = (short int)j;
+	  Write_Vpf_Short ( &stemp, ifp, 1 ) ;
+	}
+  }
+
+  /* close up shop and exit */
+
+  vpf_close_table ( &table );
+  fclose ( ifp ) ;
+  for ( i=0; (int)i < h.nbins; i++ )
+    set_nuke(&d[i].idset);
+  free ( d ) ;
+  return ( h.nbins ) ;
+
+}
+
+
+/*************************************************************************
+ *
+ *N  read_thematic_index
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *	To read an index file, regardless of its type ( T or G ) and 
+ *	return a set type array
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    idxname <input> == (char *) name of index file
+ *    value   <input> == (char *) address of value to search on. 
+ *			 THE PROGRAMMER MUST INSURE THAT THIS ADDRESS
+ *			 CORRESPONDS TO THE TABLE COLUMN AND INDEX FILE.
+ *
+ *   Returns:
+ *
+ *    set_type		a set corresponding to the vpf table, where each
+ *			bit relates to the ID in the table.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Dave Flinn       October 1991
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *	read_thematic_index_header		see below
+ *	set_init				SET.C
+ *	set_insert
+ *	Vpf_Read_*                              VPFREAD.C
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+set_type read_thematic_index ( char *idxname,
+			       char *value )
+{
+  ossim_int32 			i , ival = 0, Match = -1;
+  short int			sval = 0;
+  float				fval = 0.0 ;
+  double			dval = 0.0 , atof () ;
+  FILE				*ifp ;
+  char				hack[80] , *buf = (char *) NULL, bufalloc=0 ;
+  ThematicIndexHeader		h ;
+  ThematicIndexDirectory	d ;
+  set_type			s ;
+
+  /* open output index file */
+
+  if (( ifp = fopen ( idxname, "rb" )) == NULL ) {
+    sprintf ( hack, "No such index < %s >", idxname ) ;
+    SWhimper ( hack ) ;
+  }
+
+  if ( read_thematic_index_header ( &h, ifp ) == (ossim_int32)0 )
+  {
+    fclose(ifp);
+    SWhimper ( "error reading index header" ) ;    
+  }
+
+  if ( h.index_type == 'G' ) {
+    fclose ( ifp ) ;
+    s = read_gazetteer_index ( idxname, value ) ;
+    return s ;
+  }
+
+  if ( value ) 		/* search for pattern */
+    switch ( h.column_type ) {			/* using address */
+    case	'I':
+      memcpy ( &ival, value, sizeof (ossim_int32)) ;
+      break ;
+    case	'S':
+      memcpy ( &sval, value, sizeof (short int)) ;
+      break ;
+    case	'F':
+      memcpy ( &fval, value, sizeof (float)) ;
+      break ;
+    case	'R':
+      memcpy ( &dval, value, sizeof (double)) ;
+      break ;
+    case	'T':
+      buf = (char *) vpfmalloc ( h.type_count ) ;
+      /* leave value as is */
+      bufalloc = 1;
+      break ;
+    }
+  else{
+    fclose ( ifp ) ;
+    SWhimper ( "require a value to search on.") ;    
+  }
+
+  /* create set */
+
+  s = set_init ( h.table_nrows ) ;
+
+  /* Look for a matching directory entry */
+
+  for ( i=0; i < h.nbins; i++ ) {
+
+    switch ( h.column_type ) {
+    case 	'I':
+      Read_Vpf_Int ( &d.value.ival, ifp, 1) ;
+      if ( ival == d.value.ival ) {
+	/* found the match */
+	Match = i ;
+	i = h.nbins ;	/* exit */
+      }
+      break ;
+    case 	'S':         
+      Read_Vpf_Short ( &d.value.sval, ifp, 1) ;
+      if ( sval == d.value.sval ) {
+	/* found the match */
+	Match = i ;
+	i = h.nbins ;	/* exit */
+      }
+      break ;
+    case 	'F':
+      Read_Vpf_Float ( &d.value.fval, ifp, 1) ;
+      if ( fval == d.value.fval ) {
+	/* found the match */
+	Match = i ;
+	i = h.nbins ;	/* exit */
+      }
+      break ;
+    case 	'R':         
+      Read_Vpf_Float ( &d.value.dval, ifp, 1) ;
+      if ( dval == d.value.dval ) {
+	/* found the match */
+	Match = i ;
+	i = h.nbins ;	/* exit */
+      }
+      break ;
+    case 	'T':
+      Read_Vpf_Char ( buf, ifp, h.type_count ) ;
+      bufalloc = 1;
+      if ( ! strcmp ( value, buf ) ) {
+	/* found the match */
+	Match = i ;
+	i = h.nbins ;	/* exit */
+      }
+      break ;
+    } /* end of switch */
+
+    Read_Vpf_Int ( &d.start_offset, ifp, 1) ;
+    Read_Vpf_Int ( &d.num_items, ifp, 1) ;
+
+  }  /* end of i loop */
+
+  if ( bufalloc ) free ( buf ) ;
+
+  if ( Match < 0 ) {
+     fclose(ifp);
+     return s;
+  }
+
+  /* We've got a match, so now read the ids in */
+
+  if ( fseek ( ifp, d.start_offset, 0 ) != 0 )
+  {
+    fclose ( ifp ) ;
+    SWhimper ( "error in fseek") ;
+
+  }
+
+  /* read data into user-defined pointer.  User must free this pointer */
+
+  if ( h.id_data_type == 'I' )
+    for ( i=0 ; i < d.num_items; i++ ) {
+      Read_Vpf_Int ( &ival, ifp, 1 ) ;
+      set_insert ( ival, s ) ;			/* set the id in the set */
+    }
+  else
+    for ( i=0 ; i < d.num_items; i++ ) {
+      Read_Vpf_Short ( &sval, ifp, 1 ) ;
+      set_insert ( (ossim_int32) sval, s ) ;
+    }
+
+  fclose ( ifp ) ;
+
+  return s ;					/* also return set */
+
+}   /*end of read_index */
+
+
+/*************************************************************************
+ *
+ *N  open_thematic_index
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *     Open and initialize a thematic index.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    idxname <input> == (char *) name of index file
+ *
+ *   Returns:
+ *
+ *    ThematicIndex     Thematic index structure.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Dave Flinn       October 1991
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *	read_thematic_index_header		see below
+ *	set_init				SET.C
+ *	set_insert
+ *	Vpf_Read_* macros
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+ThematicIndex open_thematic_index ( char *idxname )
+{
+  char				hack[80];
+  ThematicIndex		        idx ;
+
+  idx.d = NULL;
+  idx.gid = NULL;
+
+  /* open output index file */
+
+  if (( idx.fp = fopen ( idxname, "rb" )) == NULL ) {
+    sprintf ( hack, "No such index < %s >", idxname ) ;
+    OWhimper ( hack ) ;
+  }
+
+  if ( read_thematic_index_header ( &idx.h, idx.fp ) == (ossim_int32)0 )
+    OWhimper ( "error reading index header" ) ;
+
+  if ( idx.h.index_type == 'G' ) {
+    /* gazetteer_index  */
+     if (read_gazetteer_index_directory(&idx.gid,&idx.h,idx.fp) == (ossim_int32)0) {
+	   fclose(idx.fp);
+	   idx.fp = NULL;
+     }
+  }
+
+  return idx;
+}
+
+/*************************************************************************
+ *
+ *N  search_thematic_index
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *	To search an index file, regardless of its type ( T or G ) and
+ *	return a set type array
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    idx     <input> == (ThematicIndex) thematic index
+ *    value   <input> == (char *) address of value to search on.
+ *			 THE PROGRAMMER MUST INSURE THAT THIS ADDRESS
+ *			 CORRESPONDS TO THE TABLE COLUMN AND INDEX FILE.
+ *
+ *   Returns:
+ *
+ *    set_type		a set corresponding to the vpf table, where each
+ *			bit relates to the ID in the table.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Dave Flinn       October 1991
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *	read_thematic_index_header		see below
+ *	set_init				SET.C
+ *	set_insert
+ *	Vpf_Read_* macros
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+set_type search_thematic_index ( ThematicIndex *idx,
+				 char *value )
+{
+  ossim_int32 			i , ival = 0, Match = -1;
+  short int			sval = 0;
+  float				fval = 0.0 ;
+  double			dval = 0.0 , atof () ;
+  char				*buf = (char *) NULL, bufalloc=0 ;
+  ThematicIndexDirectory	d ;
+  set_type			s ;
+
+  /* open output index file */
+
+  if (!idx->fp) {
+     s = set_init(1);
+     return s;
+  }
+
+  if ( idx->h.index_type == 'G' ) {
+    s = search_gazetteer_index ( idx, value ) ;
+    return s ;
+  }
+
+  if ( value ) 		/* search for pattern */
+    switch ( idx->h.column_type ) {			/* using address */
+    case	'I':
+      memcpy ( &ival, value, sizeof (ossim_int32)) ;
+      break ;
+    case	'S':
+      memcpy ( &sval, value, sizeof (short int)) ;
+      break ;
+    case	'F':
+      memcpy ( &fval, value, sizeof (float)) ;
+      break ;
+    case	'R':
+      memcpy ( &dval, value, sizeof (double)) ;
+      break ;
+    case	'T':
+      buf = (char *) vpfmalloc ( idx->h.type_count ) ;
+      /* leave value as is */
+      bufalloc = 1;
+      break ;
+    }
+  else
+    SWhimper ( "require a value to search on.") ;
+
+  /* create set */
+
+  s = set_init ( idx->h.table_nrows ) ;
+
+  /* Look for a matching directory entry */
+
+  fseek(idx->fp,THEMATIC_INDEX_HEADER_SIZE,SEEK_SET);
+
+  for ( i=0; i < idx->h.nbins; i++ ) {
+
+    switch ( idx->h.column_type ) {
+    case 	'I':
+      Read_Vpf_Int ( &d.value.ival, idx->fp, 1) ;
+      if ( ival == d.value.ival ) {
+	/* found the match */
+	Match = i ;
+	i = idx->h.nbins ;	/* exit */
+      }
+      break ;
+    case 	'S':         
+      Read_Vpf_Short ( &d.value.sval, idx->fp, 1) ;
+      if ( sval == d.value.sval ) {
+	/* found the match */
+	Match = i ;
+	i = idx->h.nbins ;	/* exit */
+      }
+      break ;
+    case 	'F':
+      Read_Vpf_Float ( &d.value.fval, idx->fp, 1) ;
+      if ( fval == d.value.fval ) {
+	/* found the match */
+	Match = i ;
+	i = idx->h.nbins ;	/* exit */
+      }
+      break ;
+    case 	'R':         
+      Read_Vpf_Float ( &d.value.dval, idx->fp, 1) ;
+      if ( dval == d.value.dval ) {
+	/* found the match */
+	Match = i ;
+	i = idx->h.nbins ;	/* exit */
+      }
+      break ;
+    case 	'T':
+      Read_Vpf_Char ( buf, idx->fp, idx->h.type_count ) ;
+      bufalloc = 1;
+      if ( ! strcmp ( value, buf ) ) {
+	/* found the match */
+	Match = i ;
+	i = idx->h.nbins ;	/* exit */
+      }
+      break ;
+    } /* end of switch */
+
+    Read_Vpf_Int ( &d.start_offset, idx->fp, 1) ;
+    Read_Vpf_Int ( &d.num_items, idx->fp, 1) ;
+
+  }  /* end of i loop */
+
+  if ( bufalloc ) free ( buf ) ;
+
+  if ( Match < 0 ) {
+     return s;
+  }
+
+  /* We've got a match, so now read the ids in */
+
+  if ( fseek ( idx->fp, d.start_offset, 0 ) != 0 )
+    SWhimper ( "error in fseek") ;
+
+  /* read data into user-defined pointer.  User must free this pointer */
+
+  if ( idx->h.id_data_type == 'I' )
+    for ( i=0 ; i < d.num_items; i++ ) {
+      Read_Vpf_Int ( &ival, idx->fp, 1 ) ;
+      set_insert ( ival, s ) ;			/* set the id in the set */
+    }
+  else
+    for ( i=0 ; i < d.num_items; i++ ) {
+      Read_Vpf_Short ( &sval, idx->fp, 1 ) ;
+      set_insert ( (ossim_int32) sval, s ) ;
+    }
+
+  return s ;					/* also return set */
+
+}   /*end of search_index */
+
+
+/*************************************************************************
+ *
+ *N  close_thematic_index
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *	Close a thematic index.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    idx <input> == (ThematicIndex *) thematic index
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Dave Flinn       October 1991
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *	read_thematic_index_header		see below
+ *	set_init				SET.C
+ *	set_insert
+ *	Vpf_Read_* macros
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+void close_thematic_index ( ThematicIndex *idx )
+{
+  fclose ( idx->fp ) ;
+  if (idx->d) free(idx->d);
+  if (idx->gid) free(idx->gid);
+}
+
+/*************************************************************************
+ *
+ *N  create_gazetteer_index
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *	To create a gazetteer file
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *
+ *    tablename  <input> == (char *) the name of an existing file
+ *					<= 11 chars long
+ *    idx_fname  <input> == (char *) name of index file
+ *    columnname <input> == (char *) is a column existing in tablename
+ *				        <= 24 chars long
+ *
+ *    idx_set <input> == (char *) is an array of printable ASCII characters 
+ *				with no duplicates
+ *
+ *    return value < 0
+ *
+ *  	  -1 some OS error, check errno for something more exact
+ *        -2 tablename is not a vpf table
+ *        -3 columnname is not in the vpf table 
+ *        -4 column type not text
+ *
+ *    return value = 0
+ *         an index record for each character in index_set has been created
+ *
+ *         the index file name is the same as tablename but with .?ti
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    	Jim Tenbrink
+ *	Dave Flinn       October 1991
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *	read_thematic_index_header		see below
+ *	set_init				SET.C
+ *	set_insert
+ *	Vpf_Read_* macros
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+
+ossim_int32 create_gazetteer_index (char *tablename,
+				 char *idx_fname ,
+				 char *columnname,
+				 char *idx_set)
+{
+  vpf_table_type t;
+  row_type       r;
+  ossim_int32       c;
+  FILE         * idx_fp;
+  ThematicIndexHeader
+                 gi;
+  ThematicIndexDirectory
+               * gid;
+  set_type     * idx_bit_sets;
+  register ossim_int32   i,
+                      j;
+  ossim_uint32 l,
+                    set_byte_size;
+
+  t = vpf_open_table(tablename, disk, "rb", NULL);
+  c = table_pos(strupr(columnname), t);
+
+  if (t.header[c].type != 'T') {
+    vpf_close_table(&t);
+    return -4;
+  }
+
+  idx_fp = fopen(idx_fname, "wb");
+
+  if (idx_fp == NULL)
+    return -1;
+
+  /* only write out the table name, not the rest */
+
+  for ( i = (long)strlen ( tablename ); i > 0; i-- )
+    if ( tablename[i] == '/' ) break ;
+  if ( i && (unsigned int)i < strlen (tablename) )
+    strcpy ( gi.vpf_table_name, strupr ( &tablename[i+1] ) ) ;
+  else
+    strcpy(gi.vpf_table_name, strupr ( tablename) );
+  strcpy(gi.vpf_column_name, columnname);
+
+  gi.column_type = 'T';
+  gi.index_type  = 'G';
+  gi.type_count = 1 ;
+  gi.id_data_type = 'S' ;
+  gi.nbins       = (long)strlen(idx_set);
+  gi.table_nrows = t.nrows;
+  set_byte_size  = (unsigned int)ceil(t.nrows/8.0);
+
+  /* force input string to lower case , rdf */
+
+  for ( i=0; i < gi.nbins; i++ )
+    idx_set[i] = tolower ( idx_set[i] ) ;
+
+  /*
+   * ti.nbytes is the offset into the index file at which the
+   * bit arrays start
+   */
+
+  gi.nbytes = THEMATIC_INDEX_HEADER_SIZE +
+              gi.nbins * ( sizeof (char) + DIRECTORY_SIZE ) ;
+
+  gid = (ThematicIndexDirectory *) malloc(sizeof(ThematicIndexDirectory)
+					  * gi.nbins);
+  idx_bit_sets = (set_type *) malloc(sizeof(set_type) * gi.nbins);
+
+  for (i = 0; i < gi.nbins; i++) {
+    idx_bit_sets[i]   = set_init(t.nrows);
+    gid[i].value.cval = idx_set[i];
+    gid[i].num_items  = 1;
+  }
+
+  /*
+   * lets suck up some CPU cycles here
+   */
+  for (l = 0; (int)l < t.nrows; l++) {
+
+    r = get_row(l+1, t);
+
+    for (i = 0; i < gi.nbins; i++)
+      for (j = 0; j < r[c].count; j++)
+	/* No matter the input character, make it lower case , rdf added */
+        if ( tolower (*((char *) r[c].ptr + j)) == idx_set[i]) {
+          set_insert(l, idx_bit_sets[i]);
+          break;
+        }
+
+    free_row(r, t);
+
+  }
+
+  vpf_close_table(&t);
+
+  if (write_thematic_index_header(gi, idx_fp) == (ossim_int32)0) {
+    fclose(idx_fp);
+    for (i = 0; i < gi.nbins; i++)
+      set_nuke(&idx_bit_sets[i]);
+    return -1;
+  }
+
+  if (write_gazetteer_index_directory(gi,
+                                     gid,
+                                     set_byte_size,
+                                     idx_fp) == 0         ) {
+    fclose(idx_fp);
+    for (i = 0; i < gi.nbins; i++)
+      set_nuke(&idx_bit_sets[i]);
+    return -1;
+  }
+
+  for (i = 0; i < gi.nbins; i++) {
+    if ( ! Write_Vpf_Char(idx_bit_sets[i].buf, idx_fp, set_byte_size) ) {
+      fclose(idx_fp);
+      for (i = 0; i < gi.nbins; i++)
+        set_nuke(&idx_bit_sets[i]);
+      return -1;
+    }
+  }
+
+  fclose(idx_fp);
+  for (i = 0; i < gi.nbins; i++)
+    set_nuke(&idx_bit_sets[i]);
+  free(idx_bit_sets);
+
+  return 0;
+}
+
+
+
+/*************************************************************************
+ *
+ *N  read_gazetteer_index
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *	To read an gazeeteer index file, and return a set type array
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *    idx_fname <input> == (char *) the name of a vpf gazetteer index
+ *                         created with a call to to create_gaz_index.
+ *
+ *    query_str <input> == (char *) string that contains only characters
+ *                         which form a subset of the characters passed
+ *                         to create_gaz_index when idx_fname was created.
+ *
+ *      the vpf table from which the file idx_fname was derived must
+ *      exist in the same directory as idx_fname
+ *
+ * out: case the returned set size > 0
+ *        a bit array which can be used as a rough filter for the
+ *        vpf table from which the index file idx_fname was derived.
+ *    
+ *      bits which are set in the array are the record numbers in the vpf table
+ *        (from which idx_fname was derived) which may contain query_string
+ *
+ *      case the returned set size = 0
+ *        some system error occurred
+ *        most likely the indexed vpf table couldn't be found in the
+ *        same directory
+ *
+ * note: query_str is treated as a set, so duplicate occurrences
+ *       of the same character are ignored. I need a way of flagging
+ *       those duplicate occurrences. Instead of sorting the string
+ *       and removing duplicates, I use the num_items field in each
+ *       element of the directory array.
+ *
+ *   Returns:
+ *
+ *    set_type		a set corresponding to the vpf table, where each
+ *			bit relates to the ID in the table.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    	Jim Tenbrink
+ * 	Dave Flinn       October 1991
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *	read_thematic_index_header		see below
+ *	set_init				SET.C
+ *	set_insert
+ *	Vpf_Read_* macros
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+set_type read_gazetteer_index (char *idx_fname, char *query_str )
+{
+  ThematicIndexHeader gi;
+  ThematicIndexDirectory
+                    * gid;
+  FILE              * idx_fp;
+  set_type            query_set = {0, 0},
+		      xsect_set,
+                      result_set;
+  register int        query_len = (int)strlen(query_str),
+                      i,
+                      j;
+  unsigned long       set_byte_size;
+  char                query_char;
+
+  idx_fp = fopen(idx_fname, "rb");
+
+  if (idx_fp == NULL)
+    return query_set;
+
+  if (read_thematic_index_header (&gi, idx_fp) == (ossim_int32)0) {
+    fclose(idx_fp);
+    return query_set;
+  }
+
+  if (read_gazetteer_index_directory (&gid, &gi, idx_fp) == (ossim_int32)0) {
+    fclose(idx_fp);
+    return query_set;
+  }
+
+  for (j = 0; j < gi.nbins; j++)
+    gid[j].num_items = 0;
+
+  query_set = set_init(gi.table_nrows);
+  xsect_set = set_init(gi.table_nrows);
+
+  set_on(query_set);
+  set_byte_size = (unsigned int)ceil(gi.table_nrows/8.0);
+
+  for (i = 0; i < query_len; i++) {
+
+    query_char = tolower(query_str[i]);
+
+    for (j = 0; j < gi.nbins; j++)
+      if (gid[j].value.cval == query_char)  {
+        gid[j].num_items++;
+        break;
+      }
+    if (gid[j].num_items > 1)
+      continue;
+
+    fseek(idx_fp, gid[j].start_offset, 0);
+    if ( ! Read_Vpf_Char(xsect_set.buf, idx_fp, set_byte_size) ) {
+      set_type err = set_init ( 0 ) ;
+      fclose(idx_fp);
+      return err ;
+    }
+
+    result_set = set_intersection(query_set, xsect_set);
+    set_assign(&query_set, result_set);
+    set_nuke(&result_set);
+
+  }
+
+  fclose(idx_fp);
+  free(gid);
+  set_nuke(&xsect_set);
+
+  return query_set;
+}
+
+/*************************************************************************
+ *
+ *N  search_gazetteer_index
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *	To search an gazeeteer index file, and return a set type array
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ * in : idx is the gazetteer index opened with open_thematic_index
+ *
+ *      query_str contains only characters which form a subset of
+ *      the characters passed to create_gaz_index when idx_fname
+ *      was created
+ *
+ *      the vpf table from which the file idx_fname was derived must
+ *      exist in the same directory as idx_fname
+ *
+ * out: case the returned set size > 0
+ *        a bit array which can be used as a rough filter for the
+ *        vpf table from which the index file idx_fname was derived.
+ *    
+ *      bits which are set in the array are the record numbers in the vpf table
+ *        (from which idx_fname was derived) which may contain query_string
+ *
+ *      case the returned set size = 0
+ *        some system error occurred
+ *        most likely the indexed vpf table couldn't be found in the
+ *        same directory
+ *
+ * note: query_str is treated as a set, so duplicate occurrences
+ *       of the same character are ignored. I need a way of flagging
+ *       those duplicate occurrences. Instead of sorting the string
+ *       and removing duplicates, I use the num_items field in each
+ *       element of the directory array.
+ *
+ *   Returns:
+ *
+ *    set_type		a set corresponding to the vpf table, where each
+ *			bit relates to the ID in the table.
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    	Jim Tenbrink
+ * 	Dave Flinn       October 1991
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *	read_thematic_index_header		see below
+ *	set_init				SET.C
+ *	set_insert
+ *	Vpf_Read_* macros
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+set_type search_gazetteer_index (ThematicIndex *idx, char *query_str )
+{
+  set_type            query_set = {0, 0, 0, 0},
+		      xsect_set,
+                      result_set;
+  register int        query_len = (int)strlen(query_str),
+                      i,
+                      j;
+  unsigned long       set_byte_size;
+  char                query_char;
+
+  if (idx->fp == NULL)
+    return query_set;
+
+  for (j = 0; j < idx->h.nbins; j++)
+    idx->gid[j].num_items = 0;
+
+  query_set = set_init(idx->h.table_nrows);
+  xsect_set = set_init(idx->h.table_nrows);
+
+  set_on(query_set);
+  set_byte_size = (unsigned int)ceil(idx->h.table_nrows/8.0);
+
+  for (i = 0; i < query_len; i++) {
+
+    query_char = tolower(query_str[i]);
+
+    for (j = 0; j < idx->h.nbins; j++)
+      if (idx->gid[j].value.cval == query_char)  {
+	idx->gid[j].num_items++;
+	break;
+      }
+    if (idx->gid[j].num_items > 1)
+      continue;
+
+    fseek(idx->fp, idx->gid[j].start_offset, 0);
+    if ( ! Read_Vpf_Char(xsect_set.buf, idx->fp, set_byte_size) ) {
+      set_type err = set_init ( 1 ) ;
+      return err ;
+    }
+
+    result_set = set_intersection(query_set, xsect_set);
+    set_assign(&query_set, result_set);
+    set_nuke(&result_set);
+
+  }
+
+  set_nuke(&xsect_set);
+
+  return query_set;
+}
+
+/*************************************************************************
+ *
+ *N  read_gazetteer_index_directory
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *	To read an index file, regardless of its type ( T or G ) and
+ *	return a set type array
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ * in : *gid is undefined
+ *
+ *      *gi is the gazetteer index header for the open index file
+ *      referenced by idx_fp
+ *
+ * out: case return value is one
+ *        *gid is an array of directory entries with gi->nbin elements
+ *
+ *        the sval member of the value union contains the indexed character
+ *
+ *        the start_offset member of the directory structure contains the
+ *        disk offset for the start of the indexed characters bit array
+ *
+ *      case zero return value
+ *        an error was probably encountered during the read
+ *        *gid is undefined
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Dave Flinn       October 1991
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *	read_thematic_index_header		see below
+ *	set_init				SET.C
+ *	set_insert
+ *	Vpf_Read_* macros
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+ossim_int32 read_gazetteer_index_directory(
+				   ThematicIndexDirectory **gid,
+				   ThematicIndexHeader     *gi,
+				   FILE                    *idx_fp)
+{
+  int i;
+
+#if UNIX
+  if ( fseek ( idx_fp,sizeof (ThematicIndexHeader)-sizeof(ossim_int32), 0 )!= 0 )
+#else
+  if (fseek(idx_fp, sizeof (ThematicIndexHeader), 0) != 0)
+#endif
+    return 0 ;
+
+  *gid = (ThematicIndexDirectory *) malloc(sizeof(ThematicIndexDirectory)
+                                           * gi->nbins);
+  if (*gid == NULL)
+    return 0;
+
+  for (i = 0; i < gi->nbins; i++) {
+    if ( ( ! Read_Vpf_Char(  &( (*gid)[i].value.cval ),   idx_fp, 1) ) ||
+	 ( ! Read_Vpf_Int(   &( (*gid)[i].start_offset ), idx_fp, 1) ) ||
+	 ( ! Read_Vpf_Int(   &( (*gid)[i].num_items ),    idx_fp, 1) )) {
+      return (ossim_int32)0 ;
+    }
+  }
+  return 1;
+}
+
+/*************************************************************************
+ *
+ *N  read_thematic_index_header
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *	To read the thematic index header in a standard way
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *	h < in/out > == (ThematicIndexHeader *) header structure to be filled
+ *	ifp <input>  == ( FILE *ifp ) index file pointer
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Dave Flinn       October 1991
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *	Read_Vpf_Int
+ *	Read_Vpf_Char
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+
+#define RWhimper() {\
+   return (ossim_int32)0 ; }
+
+ossim_int32 read_thematic_index_header ( ThematicIndexHeader *h, FILE *ifp ) 
+{
+  if ( fseek ( ifp, 0, 0 ) != 0 ) 	/* rewind, just in case */
+    return 0 ;				/* error */
+  if ( ! Read_Vpf_Int ( &h->nbytes, ifp, 1 ) )
+    RWhimper();
+  if ( ! Read_Vpf_Int ( &h->nbins, ifp, 1 ) )
+    RWhimper() ;
+  if ( ! Read_Vpf_Int ( &h->table_nrows, ifp, 1 ) )
+    RWhimper() ;
+  if ( ! Read_Vpf_Char ( &h->index_type, ifp, 1 ) )
+    RWhimper() ;
+  if ( ! Read_Vpf_Char ( &h->column_type, ifp, 1 ) )
+    RWhimper() ;
+  if ( ! Read_Vpf_Int ( &h->type_count, ifp, 1 ) )
+    RWhimper() ;
+  if ( ! Read_Vpf_Char ( &h->id_data_type, ifp, 1 ) )
+    RWhimper() ;
+  if ( ! Read_Vpf_Char ( &h->vpf_table_name, ifp, 12 ) )
+    RWhimper() ;
+  if ( ! Read_Vpf_Char ( &h->vpf_column_name, ifp, 25 ) )
+    RWhimper() ;
+  if ( ! Read_Vpf_Char ( &h->padding, ifp, 4 ) )
+    RWhimper() ;
+  return 1 ;
+}
+
+/*************************************************************************
+ *
+ *N  write_thematic_index_header
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *	To write the thematic index header in a standard way
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *	h < input > == (ThematicIndexHeader) header structure to write from
+ *	ifp <input>  == ( FILE *ifp ) index file pointer
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Dave Flinn       October 1991
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *	Write_Vpf_Int
+ *	Write_Vpf_Char
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+
+#define WWhimper() {\
+   return (ossim_int32)0 ; }
+
+ossim_int32 write_thematic_index_header ( ThematicIndexHeader h, FILE *ifp ) 
+{
+  if ( fseek ( ifp, 0, 0 ) != 0 ) 	/* rewind, just in case */
+    WWhimper() ;				/* error */
+  if ( ! Write_Vpf_Int ( &h.nbytes, ifp, 1 ) )
+    WWhimper() ;
+  if ( ! Write_Vpf_Int ( &h.nbins, ifp, 1 ) )
+    WWhimper() ;
+  if ( ! Write_Vpf_Int ( &h.table_nrows, ifp, 1 ) )
+    WWhimper() ;
+  if ( ! Write_Vpf_Char ( &h.index_type, ifp, 1 ) )
+    WWhimper() ;
+  if ( ! Write_Vpf_Char ( &h.column_type, ifp, 1 ) )
+    WWhimper() ;
+  if ( ! Write_Vpf_Int ( &h.type_count, ifp, 1 ) )
+    WWhimper() ;
+  if ( ! Write_Vpf_Char ( &h.id_data_type, ifp, 1 ) )
+    WWhimper() ;
+  if ( ! Write_Vpf_Char ( &h.vpf_table_name, ifp, 12 ) )
+    WWhimper() ;
+  if ( ! Write_Vpf_Char ( &h.vpf_column_name, ifp, 25 ) )
+    WWhimper() ;
+  if ( ! Write_Vpf_Char ( &h.padding, ifp, 4 ) )
+    WWhimper() ;
+  return 1 ;
+}
+
+
+/*************************************************************************
+ *
+ *N  write_thematic_index_directory
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *	To write the thematic index header in a standard way
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *	h < input > == (ThematicIndexHeader) header structure
+ *	d < input > == (ThematicIndexDirectory *) directory array structure
+ *	idsize < input > == (ossim_int32) size of each data element.
+ *		for T indexes, this is either 2 bytes or 4 bytes
+ *		for G indexes, it will be num_in_set (set) 
+ *			       or the size of the bit array.
+ *	ifp <input>  == ( FILE *ifp ) index file pointer
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Dave Flinn       October 1991
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *	Vpf_Write_*
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+
+#define WTWhimper() {\
+   return (ossim_int32)0 ; }
+
+ossim_int32 write_thematic_index_directory ( ThematicIndexHeader h, 
+					  ThematicIndexDirectory *d,
+					  ossim_int32 idsize , /* size of data */
+					  FILE *ifp )
+{
+  long	int	offset = h.nbytes ,
+                i ;
+
+  /* rewind, just in case */
+#if UNIX
+  if ( fseek ( ifp, sizeof (ThematicIndexHeader)-sizeof(ossim_int32), 0 ) != 0 )
+#else
+  if ( fseek ( ifp, sizeof (ThematicIndexHeader), 0 ) != 0 )
+#endif
+    WTWhimper() ;
+
+  for ( i=0; i < h.nbins; i++ ) {
+    
+    switch ( h.column_type ) {
+    case 'I':
+      if ( ! Write_Vpf_Int ( &d[i].value.ival, ifp, 1 ) )
+	WTWhimper() ;
+      break ;
+    case 'T':
+      /* Not tested for text strings */
+      if ( ! Write_Vpf_Char ( &d[i].value.strval, ifp, h.type_count ) )
+	WTWhimper() ;
+      break ;
+    case 'S':
+      if ( ! Write_Vpf_Short ( &d[i].value.sval, ifp, 1 ) )
+	WTWhimper() ;				
+      break ;
+    case 'F':
+      if ( ! Write_Vpf_Float ( &d[i].value.fval, ifp, 1 ) )
+	WTWhimper() ;				
+      break ;
+    case 'R':
+      if ( ! Write_Vpf_Double ( &d[i].value.dval, ifp, 1 ) )
+	WTWhimper() ;				
+      break ;
+    }	/* end of switch */
+
+    if ( ! Write_Vpf_Int ( &offset, ifp, 1 ) )
+	WTWhimper() ;				
+    if ( ! Write_Vpf_Int ( &d[i].num_items, ifp, 1 ) )
+	WTWhimper() ;				
+    
+    /* this offset is constant, no matter the data type */
+
+    offset += ( idsize * d[i].num_items ) ;
+
+  }  /* end of i loop */
+
+  return 1 ;
+
+}    /* end of write_directory */
+
+
+/*************************************************************************
+ *
+ *N  write_gazetteer_index_directory
+ *
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Purpose:
+ *P
+ *	To write the gazetteer thematic index header in a standard way
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Parameters:
+ *A
+ *	h < input > == (ThematicIndexHeader) header structure 
+ *	d < input > == (ThematicIndexDirectory *) directory array structure
+ *	idsize < input > == (ossim_int32) size of each data element.
+ *		for T indexes, this is either 2 bytes or 4 bytes
+ *		for G indexes, it will be num_in_set (set) 
+ *			       or the size of the bit array.
+ *	ifp <input>  == ( FILE *ifp ) index file pointer
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   History:
+ *H
+ *    Dave Flinn       October 1991
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   External Variables:
+ *X
+ *    None
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Functions Called:
+ *F
+ *	Vpf_Write_*
+ *E
+ *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+ *
+ *   Portability:
+ *O
+ *    This module should be ANSI C compatible.
+ *E
+ *************************************************************************/
+
+#define WTGWhimper() {\
+  return (ossim_int32)0 ; }
+
+ossim_int32 write_gazetteer_index_directory ( ThematicIndexHeader h, 
+					  ThematicIndexDirectory *d, 
+					  ossim_int32 idsize , /* size of data */
+					  FILE *ifp )
+{
+  long	int	offset = h.nbytes ,
+                i ;
+
+  /* rewind, just in case */
+
+  if ( fseek ( ifp, THEMATIC_INDEX_HEADER_SIZE, 0 )!= 0 )
+    WTWhimper() ;				
+
+  for ( i=0; i < h.nbins; i++ ) {
+    
+    if ( ! Write_Vpf_Char ( &d[i].value.cval, ifp, 1 ) )
+      WTGWhimper() ;
+
+    if ( ! Write_Vpf_Int ( &offset, ifp, 1 ) )
+	WTGWhimper() ;				
+    if ( ! Write_Vpf_Int ( &d[i].num_items, ifp, 1 ) )
+	WTGWhimper() ;				
+    
+    /* this offset is constant, no matter the data type */
+
+    offset += ( idsize * d[i].num_items ) ;
+
+  }  /* end of i loop */
+
+  return 1 ;
+
+}    /* end of write_directory */
+
+
diff --git a/src/ossim/vpfutil/vpfwrite.c b/ossim/src/ossim/vpfutil/vpfwrite.c
similarity index 100%
rename from src/ossim/vpfutil/vpfwrite.c
rename to ossim/src/ossim/vpfutil/vpfwrite.c
diff --git a/ossim/src/test/CMakeLists.txt b/ossim/src/test/CMakeLists.txt
new file mode 100644
index 0000000..23bf264
--- /dev/null
+++ b/ossim/src/test/CMakeLists.txt
@@ -0,0 +1,71 @@
+# $Id: CMakeLists.txt 23496 2015-08-28 15:26:18Z okramer $
+
+OSSIM_SETUP_APPLICATION(ossim-aux-dot-xml-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-aux-dot-xml-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-byte-stream-buffer-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-byte-stream-buffer-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-csv-file-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-csv-file-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-date-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-date-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-datum-shift COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-datum-shift.cpp)
+OSSIM_SETUP_APPLICATION(ossim-directory-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-directory-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-dms-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-dms-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-dted-handler-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-dted-handler-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-dump-vpf-table COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-dump-vpf-table.cpp)
+OSSIM_SETUP_APPLICATION(ossim-duration-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-duration-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-elevation-manager-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-elevation-manager-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-envi-hdr-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-envi-hdr-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-epsg-factory-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-epsg-factory-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-eq-projection-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-eq-projection-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-fgdc-txt-doc-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-fgdc-txt-doc-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-filename-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-filename-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-foo COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-foo.cpp)
+OSSIM_SETUP_APPLICATION(ossim-get-pixel-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-get-pixel-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-gpkg-writer-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-gpkg-writer-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-gpt-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-gpt-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-gsd-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-gsd-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-gsoc1 COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-gsoc1.cpp)
+OSSIM_SETUP_APPLICATION(ossim-histo-compare COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-histo-compare.cpp)
+OSSIM_SETUP_APPLICATION(ossim-image-chain-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-image-chain-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-image-elevation-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-image-elevation-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-image-geometry-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-image-geometry-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-image-handler-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-image-handler-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-index-to-rgb-lut-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-index-to-rgb-lut-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-info-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-info-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-image-writer-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-image-writer-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-jobqueue-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-jobqueue-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-keywordlist-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-keywordlist-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-least-squares-plane-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-least-squares-plane-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-loadtile-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-loadtile-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-lsr-space-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-lsr-space-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-mask-filter-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-mask-filter-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-nitf-rsm-model-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-nitf-rsm-model-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-notify-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-notify-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-obj-allocate COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-obj-allocate.cpp)
+OSSIM_SETUP_APPLICATION(ossim-piecewise-remapper-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-piecewise-remapper-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-pixel-flipper-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-pixel-flipper-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-point-cloud-handler-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-point-cloud-handler-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-point-cloud-image-handler-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-point-cloud-image-handler-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-point-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-point-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-projection-factory-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-projection-factory-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-projection-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-projection-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-range-dome-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-range-dome-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-read-write-consistency-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-read-write-consistency-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-rect-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-rect-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-ref-ptr-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-ref-ptr-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-remap-table-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-remap-table-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-shift-filter-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-shift-filter-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-single-image-chain-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-single-image-chain-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-single-image-chain-threaded-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-single-image-chain-threaded-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-srtm-support-data-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-srtm-support-data-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-string-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-string-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-thin-plate-spline-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-thin-plate-spline-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-threaded-chain-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-threaded-chain-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-threaded-elevation-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-threaded-elevation-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-threaded-polyarea2d-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-threaded-polyarea2d-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-threaded-logfile-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-threaded-logfile-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-tiled-elevation-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-tiled-elevation-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-tiff-info-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-tiff-info-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-visitor-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-visitor-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-wavelength-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-wavelength-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-wkt-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-wkt-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-wkt-proj-factory-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-wkt-proj-factory-test.cpp)
+OSSIM_SETUP_APPLICATION(ossim-xml-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-xml-test.cpp)
diff --git a/ossim/src/test/ossim-aux-dot-xml-test.cpp b/ossim/src/test/ossim-aux-dot-xml-test.cpp
new file mode 100644
index 0000000..60bd859
--- /dev/null
+++ b/ossim/src/test/ossim-aux-dot-xml-test.cpp
@@ -0,0 +1,66 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// File: ossim-aux-dot-xml-test.cpp
+//
+// Author:  David Burken
+//
+// Description: Test application for ossimAuxXmlSupportData class.
+//
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/support_data/ossimAuxXmlSupportData.h>
+
+#include <iostream>
+#include <sstream>
+using namespace std;
+
+int main(int argc, char *argv[])
+{
+   ossimArgumentParser ap(&argc, argv);
+   ossimInit::instance()->addOptions(ap);
+   ossimInit::instance()->initialize(ap);
+
+   int status = 0;
+   
+   if (argc == 2)
+   {
+      try
+      {   
+         ossimFilename f = ossimFilename(argv[1]);
+         ossimAuxXmlSupportData sd;
+         ossimRefPtr<ossimProjection> proj = sd.getProjection( f );
+         if ( proj.valid() )
+         {
+            proj->print( cout );
+         }
+         else
+         {
+            cerr << "Could not get projection from: " << f << endl;
+            status = 1;
+         }
+      }
+      catch (const ossimException& e)
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
+         status = 1;
+      }
+   }
+   else
+   {
+      cout << argv[0] << " <input-aux.xml>"
+           << "\nAttempts to get/print a projection from aux dot xml file."
+           << endl;
+   }
+      
+   return status;
+}
diff --git a/src/test/ossim-byte-stream-buffer-test.cpp b/ossim/src/test/ossim-byte-stream-buffer-test.cpp
similarity index 100%
rename from src/test/ossim-byte-stream-buffer-test.cpp
rename to ossim/src/test/ossim-byte-stream-buffer-test.cpp
diff --git a/src/test/ossim-csv-file-test.cpp b/ossim/src/test/ossim-csv-file-test.cpp
similarity index 100%
rename from src/test/ossim-csv-file-test.cpp
rename to ossim/src/test/ossim-csv-file-test.cpp
diff --git a/ossim/src/test/ossim-date-test.cpp b/ossim/src/test/ossim-date-test.cpp
new file mode 100644
index 0000000..cc2a85a
--- /dev/null
+++ b/ossim/src/test/ossim-date-test.cpp
@@ -0,0 +1,57 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Test code for generic ossim test.
+//
+// 
+//----------------------------------------------------------------------------
+// $Id: ossim-date-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <iostream>
+using namespace std;
+
+#include <ossim/base/ossimDate.h>
+#include <ossim/init/ossimInit.h>
+
+int main(int argc, char *argv[])
+{
+   ossimInit::instance()->initialize(argc, argv);
+
+   std::string s1 = "2009-02-05T11:26:13.458650Z";
+   ossimLocalTm d1;
+   d1.setIso8601(s1);
+   
+   std::string s2 = "2009-01-11T09:06:05.606000Z";
+   ossimLocalTm d2;
+   d2.setIso8601(s2);
+
+   cout << "s1: " << s1 << "\n";
+   d1.dump(std::cout);
+   cout << "s2: " << s2 << "\n";
+   d2.dump(std::cout);
+
+   ossimLocalTm d4;
+   cout << "local time:\n";
+   d4.dump(cout);
+ 
+   ossimLocalTm d5 = d4.convertToGmt();
+   cout << "local time converted to GMT:\n";
+   d5.dump(cout);
+
+   
+   ossimDate d6;
+   cout << "Date:\n";
+   d6.print(cout);
+   cout << "\n";
+   d6.dump(cout);
+   cout << endl;
+
+   return 0;
+}
+
+
diff --git a/src/test/ossim-datum-shift.cpp b/ossim/src/test/ossim-datum-shift.cpp
similarity index 100%
rename from src/test/ossim-datum-shift.cpp
rename to ossim/src/test/ossim-datum-shift.cpp
diff --git a/ossim/src/test/ossim-directory-test.cpp b/ossim/src/test/ossim-directory-test.cpp
new file mode 100644
index 0000000..2f7aac5
--- /dev/null
+++ b/ossim/src/test/ossim-directory-test.cpp
@@ -0,0 +1,81 @@
+//----------------------------------------------------------------------------
+//
+// File: ossim-directory-test.cpp
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description:
+//
+// Test application for ossimDirectory class.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimDirectory.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimFilename.h>
+#include <iostream>
+using namespace std;
+
+static void usage()
+{
+   cout << "ossim-directory-test <directory>"
+        << "\nDumps files in directory..." << endl;
+}
+
+int main(int argc, char *argv[])
+{
+   int result = 0;
+   
+   ossimInit::instance()->initialize(argc, argv);
+   
+   if (argc == 2)
+   {
+      try // Exceptions can be thrown so 
+      {
+         ossimFilename directory = argv[1];
+         
+         cout << "directory: " << directory << "\n";
+         directory = directory.expand();
+
+         ossimDirectory d;
+         if ( d.open(directory) )
+         {
+            ossimFilename f;
+            if ( d.getFirst(f) )
+            {
+               do
+               {
+                  if ( f.size() )
+                  {
+                     cout << "file: " << f << endl;
+                  }
+                  else
+                  {
+                     cout << "file is empty!" << endl;
+                  }
+               } while ( d.getNext(f) );
+            }
+            else
+            {
+               cout << "ossimDirectory::getFirst() returned false!" << endl;
+            }
+         }
+      }
+      catch( const ossimException& e )
+      {
+         cout << e.what() << endl;
+         result = 1;
+      }
+   }
+   else
+   {
+      usage();
+   }
+   
+   return result;
+}
+
diff --git a/ossim/src/test/ossim-dms-test.cpp b/ossim/src/test/ossim-dms-test.cpp
new file mode 100644
index 0000000..aeb9bcd
--- /dev/null
+++ b/ossim/src/test/ossim-dms-test.cpp
@@ -0,0 +1,100 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Burken
+//
+// Description: Contains application for simple ossimDms class code examples.
+//
+// $Id: ossim-dms-test.cpp 23494 2015-08-28 15:11:03Z okramer $
+//----------------------------------------------------------------------------
+
+#include <ossim/base/ossimDms.h>
+#include <iostream>
+using namespace std;
+
+int main()   
+{
+   // Test default constructor.
+   ossimDms dms;
+   cout << "dms using default constuctor:"
+        << "\ndms.getDegrees():  " << dms.getDegrees()
+        << "\ndms.toString():    " << dms.toString()
+        << endl;
+   
+   const ossimString LAT_FORMAT = "dd@ mm' ss.ssss\" C";
+   const ossimString LON_FORMAT = "ddd@ mm' ss.ssss\" C";
+
+   ossimDms d(0.0);
+
+   ossimString dmsstr = "S30 20 20";
+   
+   if (d.setDegrees(dmsstr) == true)
+   {
+      cout << "dmsstr:          " << dmsstr
+           << "\nd.getDegrees():  " << d.getDegrees()
+           << "\nd.toString():    " << d.toString(LAT_FORMAT)
+           << endl;
+   }
+   else
+   {
+      cout << "setDegrees failed..." << endl;
+   }
+
+   dmsstr = " N30 20 20";
+
+   if (d.setDegrees(dmsstr))
+   {
+      cout << "dmsstr:          " << dmsstr
+           << "\nd.getDegrees():  " << d.getDegrees()
+           << "\nd.toString():    " << d.toString(LAT_FORMAT)
+           << endl;
+   }
+   else
+   {
+      cout << "setDegrees failed..." << endl;
+   }
+
+   dmsstr = "/some/one/punched/in/a/file/name...";
+
+   if (d.setDegrees(dmsstr))
+   {
+      cout << "dmsstr:          " << dmsstr
+           << "\nd.getDegrees():  " << d.getDegrees()
+           << "\nd.toString():    " << d.toString(LAT_FORMAT)
+           << endl;
+   }
+   else
+   {
+      cout << "setDegrees failed..." << endl;
+   }
+
+   dmsstr = "32 59 00 N";
+   d.setLatFlag(true);
+   if (d.setDegrees(dmsstr))
+   {
+      cout << "dmsstr:          " << dmsstr
+           << "\nd.getDegrees():  " << d.getDegrees()
+           << "\nd.toString():    " << d.toString(LAT_FORMAT)
+           << endl;
+   }
+   else
+   {
+      cout << "setDegrees failed..." << endl;
+   }
+
+   dmsstr = "085 00 00 E";
+   d.setLatFlag(false);
+   if (d.setDegrees(dmsstr))
+   {
+      cout << "dmsstr:          " << dmsstr
+           << "\nd.getDegrees():  " << d.getDegrees()
+           << "\nd.toString():    " << d.toString(LAT_FORMAT)
+           << endl;
+   }
+   else
+   {
+      cout << "setDegrees failed..." << endl;
+   }
+   return 0;
+}
diff --git a/ossim/src/test/ossim-dted-handler-test.cpp b/ossim/src/test/ossim-dted-handler-test.cpp
new file mode 100644
index 0000000..78f3124
--- /dev/null
+++ b/ossim/src/test/ossim-dted-handler-test.cpp
@@ -0,0 +1,81 @@
+//----------------------------------------------------------------------------
+// Copyright (C) 2005 David Burken, all rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Test application / example code of opening a dted handler
+// and using it.
+//
+// $Id: ossim-dted-handler-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+//----------------------------------------------------------------------------
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimGrect.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/elevation/ossimDtedHandler.h>
+
+
+int main(int argc, char *argv[])
+{
+   ossimInit::instance()->initialize(argc, argv);
+
+   //---
+   // Note: You must tweak the next three variables...
+   // This is a 3601x3601 cell.
+   //---
+   ossimFilename dtedCell = "/work/drb/image_formats/dted/1arc/w092/n40.dt1";
+   double neLat = 41.0;
+   double neLon = -92.0;
+   
+   ossimDtedHandler* dh = new ossimDtedHandler(dtedCell);
+   double p00 = dh->getPostValue(ossimIpt(0, 3599));
+   double p01 = dh->getPostValue(ossimIpt(0, 3600));
+   double p10 = dh->getPostValue(ossimIpt(1, 3599));
+   double p11 = dh->getPostValue(ossimIpt(1, 3600));
+
+   double ps  = 1.0/3601.0; // post spacing
+   double hps = ps/2.0;     // half post spacing
+   
+   ossimGpt gp00( (neLat-ps),    neLon,      0.0 );
+   ossimGpt gp01(  neLat,        neLon,      0.0 );
+   ossimGpt gp10( (neLat-ps),   (neLon+ps),  0.0);
+   ossimGpt gp11(  neLat,       (neLon+ps),  0.0 );
+   ossimGpt gpMid( (neLat-hps), (neLon+hps), 0.0 );
+   
+   double hp00  =  dh->getHeightAboveMSL(gp00);   
+   double hp01  =  dh->getHeightAboveMSL(gp01);
+   double hp10  =  dh->getHeightAboveMSL(gp10);
+   double hp11  =  dh->getHeightAboveMSL(gp11);
+   double hpMid =  dh->getHeightAboveMSL(gpMid);
+
+   cout << "\ngp00:   " << gp00
+        << "\np00:    " << p00
+        << "\nhp00:   " << hp00
+      
+        << "\ngp01:   " << gp01
+        << "\np01:    " << p01
+        << "\nhp01:   " << hp01
+      
+        << "\ngp10:   " << gp10
+        << "\np10:    " << p10
+        << "\nhp10:   " << hp10
+
+        << "\ngp11:   " << gp11
+        << "\np11:    " << p11
+        << "\nhp11:   " << hp11
+
+        << "\ngpMid:  " << gpMid
+        << "\nhpMid:  " << hpMid
+
+        << endl;
+
+   delete dh;
+   
+   return 0;
+}
+
diff --git a/ossim/src/test/ossim-dump-vpf-table.cpp b/ossim/src/test/ossim-dump-vpf-table.cpp
new file mode 100644
index 0000000..585e5a9
--- /dev/null
+++ b/ossim/src/test/ossim-dump-vpf-table.cpp
@@ -0,0 +1,36 @@
+//*******************************************************************
+//
+// License:  See top level LICENSE.txt file.
+// 
+// Author: Garrett Potts (gpotts at imagelinks.com)
+// Description: Does a table dump on any vpf table.
+//
+//********************************************************************
+// $Id: ossim-dump-vpf-table.cpp 23495 2015-08-28 15:25:19Z okramer $
+#include <ossim/vec/ossimVpfTable.h>
+#include <ossim/base/ossimErrorCodes.h>
+#include <iostream>
+
+using namespace std;
+
+void displayUsage()
+{
+   cout << "usage:\ndump_table <full path to table>" << endl;
+}
+
+int main(int argc, char *argv[])
+{
+   if(argc == 2)
+   {
+      ossimVpfTable table;
+   
+      if(table.openTable(argv[1]) == ossimErrorCodes::OSSIM_OK)
+      {
+         cout << table << endl;
+      }
+   }
+   else
+   {
+      displayUsage();
+   }
+}
diff --git a/src/test/ossim-duration-test.cpp b/ossim/src/test/ossim-duration-test.cpp
similarity index 100%
rename from src/test/ossim-duration-test.cpp
rename to ossim/src/test/ossim-duration-test.cpp
diff --git a/ossim/src/test/ossim-elevation-manager-test.cpp b/ossim/src/test/ossim-elevation-manager-test.cpp
new file mode 100644
index 0000000..12a6055
--- /dev/null
+++ b/ossim/src/test/ossim-elevation-manager-test.cpp
@@ -0,0 +1,55 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Burken
+//
+// Description: Test code for ossimElevManger.
+//
+// $Id: ossim-elevation-manager-test.cpp 22751 2014-04-25 17:54:56Z dburken $
+//----------------------------------------------------------------------------
+#include <iostream>
+using namespace std;
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/elevation/ossimElevManager.h>
+
+int main(int argc, char *argv[])
+{
+   ossimInit::instance()->initialize(argc, argv);
+
+#if 1
+   if (argc != 2)
+   {
+      cout << "usage: " << argv[0] << " <elevationDirectoryToOpen>" << endl;
+      return 0;
+   }
+   
+   ossimFilename dir = argv[1];
+
+   cout << "dir: " << dir << endl;
+   
+   if (ossimElevManager::instance()->loadElevationPath(dir))
+   {
+      cout << "ossimElevManager::openDirectory worked for: " << dir << endl;
+   }
+   else
+   {
+      cout << "ossimElevManager::openDirectory failed for: " << dir << endl;
+   }
+#endif
+#if 1
+   std::vector<std::string> cells;
+   ossimElevManager::instance()->getCellsForBounds( 24.0, -83.0, 28.0, -80.0, cells );
+
+   std::vector<std::string>::const_iterator i = cells.begin();
+   while ( i != cells.end() )
+   {
+      cout << "cell: " << (*i) << endl;
+      ++i;
+   }
+#endif
+   
+   return 0;
+}
diff --git a/ossim/src/test/ossim-envi-hdr-test.cpp b/ossim/src/test/ossim-envi-hdr-test.cpp
new file mode 100644
index 0000000..f5c6c4d
--- /dev/null
+++ b/ossim/src/test/ossim-envi-hdr-test.cpp
@@ -0,0 +1,49 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Test app for ossimEnviHeader class.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/support_data/ossimEnviHeader.h>
+#include <iostream>
+using namespace std;
+
+
+int main(int argc, char *argv[])
+{
+   ossimInit::instance()->initialize(argc, argv);
+
+   if (argc != 2)
+   {
+      cout << argv[0] << " <envi_header_file>"
+           << "\nOpen, parse and print ossimEnviHeader object." << endl;
+      return 0;
+   }
+
+   cout << "ossimEnviHeader test:\n";
+
+   ossimEnviHeader hdr;
+   if ( hdr.open( ossimFilename( argv[1] ) ) )
+   {
+      ossimString s = "Hello world...";
+      hdr.setDescription( s );
+      
+      cout << hdr << endl;
+   }
+   else
+   {
+      cout << "Could not open: " << argv[1] << endl;
+   }
+
+   return 0;
+}
+
diff --git a/src/test/ossim-epsg-factory-test.cpp b/ossim/src/test/ossim-epsg-factory-test.cpp
similarity index 100%
rename from src/test/ossim-epsg-factory-test.cpp
rename to ossim/src/test/ossim-epsg-factory-test.cpp
diff --git a/ossim/src/test/ossim-eq-projection-test.cpp b/ossim/src/test/ossim-eq-projection-test.cpp
new file mode 100644
index 0000000..915f29e
--- /dev/null
+++ b/ossim/src/test/ossim-eq-projection-test.cpp
@@ -0,0 +1,51 @@
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <iostream>
+
+using namespace std;
+
+int main(int argc, char *argv[])
+{
+   ossimGpt gpt_ul (38.0, -77.0);
+   ossimDpt ipt_ul (0.0, 0.0);
+   ossimDpt ipt_lr (255.0, 255.0);
+   ossimGpt gpt;
+   ossimDpt gsd;
+
+   ossimEquDistCylProjection proj;
+
+   proj.setUlTiePoints(gpt_ul);
+   proj.setDecimalDegreesPerPixel(ossimDpt(0.0000090,0.0000090));
+
+   cout << "\n Normal initialization ***************"<<endl;
+   cout << "ORIG: "<<proj.getOrigin()<<endl;
+   cout << "TP: "<<proj.getUlGpt()<<endl;
+   cout << "GSD: "<<proj.getMetersPerPixel() << endl;
+   proj.lineSampleHeightToWorld(ipt_ul, 0.0, gpt);
+   cout << "UL: " <<gpt << endl;
+   proj.lineSampleHeightToWorld(ipt_lr, 0.0, gpt);
+   cout << "LR: " <<gpt << endl;
+
+   proj.setOrigin(gpt_ul);
+
+   cout << "\n Origin set to UL ***************"<<endl;
+   cout << "ORIG: "<<proj.getOrigin()<<endl;
+   cout << "TP: "<<proj.getUlGpt()<<endl;
+   cout << "GSD: "<<proj.getMetersPerPixel() << endl;
+   proj.lineSampleHeightToWorld(ipt_ul, 0.0, gpt);
+   cout << "UL: " <<gpt << endl;
+   proj.lineSampleHeightToWorld(ipt_lr, 0.0, gpt);
+   cout << "LR: " <<gpt << endl;
+
+   proj.setUlTiePoints(gpt_ul);
+
+   cout << "\n Tiepoint reset to UL ***************"<<endl;
+   cout << "ORIG: "<<proj.getOrigin()<<endl;
+   cout << "TP: "<<proj.getUlGpt()<<endl;
+   cout << "GSD: "<<proj.getMetersPerPixel() << endl;
+   proj.lineSampleHeightToWorld(ipt_ul, 0.0, gpt);
+   cout << "UL: " <<gpt << endl;
+   proj.lineSampleHeightToWorld(ipt_lr, 0.0, gpt);
+   cout << "LR: " <<gpt << endl;
+
+   return 0;
+}
diff --git a/ossim/src/test/ossim-fgdc-txt-doc-test.cpp b/ossim/src/test/ossim-fgdc-txt-doc-test.cpp
new file mode 100644
index 0000000..77df47c
--- /dev/null
+++ b/ossim/src/test/ossim-fgdc-txt-doc-test.cpp
@@ -0,0 +1,74 @@
+//----------------------------------------------------------------------------
+//
+// File ossim-fgdc-txt-doc-test.cpp
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Test application for ossimFgdcTxtDoc class.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossim-info-test.cpp 19751 2011-06-13 15:13:07Z dburken $
+
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/support_data/ossimFgdcTxtDoc.h>
+
+#include <iostream>
+using namespace std;
+
+int main(int argc, char *argv[])
+{
+   ossimArgumentParser ap(&argc, argv);
+
+   // Initialize ossim stuff, factories, plugin, etc.
+   ossimInit::instance()->initialize(ap);
+
+   if ( ap.argc() == 2 )
+   {
+      try
+      {
+         // Test the ossimFgdcTxtDoc
+         ossimRefPtr<ossimFgdcTxtDoc> fgdcDoc = new ossimFgdcTxtDoc();
+         ossimFilename file(argv[1]);
+         if ( fgdcDoc->open( file ) )
+         {
+            cout << "opened: " << file << endl;
+            ossimRefPtr<ossimProjection> proj;
+            fgdcDoc->getProjection(proj);
+            if ( proj.valid() )
+            {
+               proj->print(cout);
+            }
+
+            std::string units;
+            fgdcDoc->getAltitudeDistanceUnits(units);
+            cout << "units: " << units << endl;
+         }
+         
+      }
+      catch (const ossimException& e)
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
+         return 1;
+      }
+      
+   }  // End: if ( ( ap.argc() == 2 ) ...
+   else
+   {
+      cout << argv[0] << " <FGDC-text-doc.txt>\nTest ossimFgdcTxtDoc class..." << endl;
+   }
+   
+   return 0;
+   
+} // End of main...
+
diff --git a/ossim/src/test/ossim-filename-test.cpp b/ossim/src/test/ossim-filename-test.cpp
new file mode 100644
index 0000000..8817c0d
--- /dev/null
+++ b/ossim/src/test/ossim-filename-test.cpp
@@ -0,0 +1,202 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// ossimFilename class test app.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossim-filename-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimFilename.h>
+
+#include <iostream>
+#include <string>
+using namespace std;
+
+int main(int argc, char *argv[])
+{
+   ossimInit::instance()->initialize(argc, argv);
+
+   ossimFilename directoryToDelete;
+
+   if ( argc == 2 )
+   {
+      ossimString osArg1 = argv[1];
+      osArg1.downcase();
+      if ( (osArg1 == "-h") || (osArg1 == "--help") )
+      {
+         cout << "\nUsage: ossim-filename-test <optional_directory_to_delete>\n"
+              << "Runs various test on ossimFilename class.\n"
+              << "If optional_directory_to_delete is set calls ossimFilename::remove on it.\n"
+              << "Options: -h --help Gives this usage.\n" << endl;
+         return 0;
+      }
+      else
+      {
+         directoryToDelete = argv[1];
+      }
+   }
+         
+   ossimFilename a  = "c:\\foo\\you";
+   ossimFilename a2 = "\\foo\\you";
+   ossimFilename b  = "/foo/you";
+   ossimFilename c  = "foo/you";
+   ossimFilename d1 = "~/docs";
+   ossimFilename d2 = "./foo";
+   ossimFilename d3 = "../../foo";
+   ossimFilename d4 = ".";
+   ossimFilename d5 = "ab";
+   ossimFilename d6 = "a";
+
+   // Environment var WORK must be set.
+   ossimFilename d7 = "$(WORK)/ossim";
+   ossimFilename d8 = "~/tmp/$(WORK)/ossim";
+   
+  ossimFilename e = "/foo/you.xxx";
+   ossimString   ext1 = ".tif";
+   ossimString   ext2 = "jpg";
+   ossimString   ext3;
+
+
+   cout << "\na:              " << a
+        << "\na.expand():     " << a.expand()
+        << "\na.isRelative(): " << a.isRelative() << "\n"
+
+        << "\na2:              " << a2
+        << "\na2.expand():     " << a2.expand()
+        << "\na2.isRelative(): " << a2.isRelative() << "\n"      
+
+        << "\nb:              " << b
+        << "\nb.expand():     " << b.expand()
+        << "\nb.isRelative(): " << b.isRelative() << "\n"
+      
+        << "\nc:              " << c
+        << "\nc.expand():     " << c.expand()
+        << "\nc.isRelative(): " << c.isRelative() << "\n"
+
+        << "\nd1:              " << d1
+        << "\nd1.expand():     " << d1.expand()
+        << "\nd1.isRelative(): " << d1.isRelative() << "\n"
+      
+        << "\nd2:              " << d2
+        << "\nd2.expand():     " << d2.expand()
+        << "\nd2.isRelative(): " << d2.isRelative() << "\n"
+
+        << "\nd3:              " << d3
+        << "\nd3.expand():     " << d3.expand()
+        << "\nd3.isRelative(): " << d3.isRelative() << "\n"
+
+        << "\nd4:              " << d4
+        << "\nd4.expand():     " << d4.expand()
+        << "\nd4.isRelative(): " << d4.isRelative() << "\n"
+
+        << "\nd5:              " << d5
+        << "\nd5.expand():     " << d5.expand()
+        << "\nd5.isRelative(): " << d5.isRelative() << "\n"
+      
+        << "\nd6:              " << d6
+        << "\nd6.expand():     " << d6.expand()
+        << "\nd6.isRelative(): " << d6.isRelative() << "\n";
+
+   cout << "\nNOTE: d7 and d8 output require variable WORK be set in your "
+        << "environment.\n"
+      
+        << "\nd7:              " << d7
+        << "\nd7.expand():     " << d7.expand()
+        << "\nd7.isRelative(): " << d7.isRelative() << "\n"
+
+        << "\nd8:              " << d8
+        << "\nd8.expand():     " << d8.expand()
+        << "\nd8.isRelative(): " << d8.isRelative() << "\n"
+      
+        << "\next1:        " << ext1
+        << "\next2:        " << ext2
+        << "\next3:        " << ext3 << "\n";
+   
+   cout << "e:                    " << e << "\n";
+   cout << "e.setExtension(ext1): " << e.setExtension(ext1) << "\n";
+   cout << "e.setExtension(ext2): " << e.setExtension(ext2) << "\n";
+   cout << "e.setExtension(ext3): " << e.setExtension(ext3) << "\n";
+
+   // Test dir cat.
+   a = "/foo/";
+   b = "you";
+   c = a.dirCat(b);
+   cout << "\na:           " << a
+        << "\nb:           " << b
+        << "\nc = a.dirCat(b): " << c << "\n";
+
+   a = "/foo";
+   b = "you";
+   c = a.dirCat(b);
+   cout << "\na:           " << a
+        << "\nb:           " << b
+        << "\nc = a.dirCat(b): " << c << "\n";
+
+   a = "/foo";
+   b = "./you";
+   c = a.dirCat(b);
+   cout << "\na:           " << a
+        << "\nb:           " << b
+        << "\nc = a.dirCat(b): " << c << "\n";
+
+   a = "/foo";
+   b = "/you";
+   c = a.dirCat(b);
+   cout << "\na:           " << a
+        << "\nb:           " << b
+        << "\nc = a.dirCat(b): " << c << "\n";
+
+   a = "/foo";
+   b = "";
+   c = a.dirCat(b);
+   cout << "\na:           " << a
+        << "\nb:           " << b
+        << "\nc = a.dirCat(b): " << c << "\n";
+
+   a = "";
+   b = "you";
+   c = a.dirCat(b);
+   cout << "\na:           " << a
+        << "\nb:           " << b
+        << "\nc = a.dirCat(b): " << c << "\n";
+
+   a = "/data/images/t1.tif";
+   cout << "\na: " << a
+        << "\na.fileNoExtension(): " << a.fileNoExtension()
+        << "\na.noExtension(): " << a.noExtension() << "\n";
+
+   // Test a file with two dots.
+   a = "/data/ascii_dems/dtm_v1.5_5mp_3141.asc";
+   cout << "\n// Test a file with two dots."
+        << "\na: " << a
+        << "\na.fileNoExtension(): " << a.fileNoExtension()
+        << "\na.noExtension(): " << a.noExtension() << "\n";
+
+   std::string s = "abc";
+   ossimFilename f = s; // Used to not compile.
+   cout << "ossimFilename f = std::string(abc): " << f << "\n";
+
+   if ( directoryToDelete.size() )
+   {
+      cout << "ossimFilename::remove on " << directoryToDelete << " was ";
+      if ( directoryToDelete.remove() )
+      {
+         cout << "successful...\n";
+      }
+      else
+      {
+         cout << "unsuccessful...\n";
+      }
+   }
+
+   cout << endl;
+   
+   return 0;
+}
+
diff --git a/ossim/src/test/ossim-foo.cpp b/ossim/src/test/ossim-foo.cpp
new file mode 100644
index 0000000..1a317a2
--- /dev/null
+++ b/ossim/src/test/ossim-foo.cpp
@@ -0,0 +1,111 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// File: ossim-foo.cpp
+//
+// Author:  David Burken
+//
+// Description: Contains application definition "ossim-foo" app.
+//
+// NOTE:  This is supplied for simple quick test. DO NOT checkin your test to
+//        the svn repository.  Simply edit ossim-foo.cpp and run your test.
+//        After completion you can do a "svn revert foo.cpp" if you want to
+//        keep your working repository up to snuff.
+//
+// $Id: ossim-foo.cpp 23002 2014-11-24 17:11:17Z dburken $
+//----------------------------------------------------------------------------
+
+// ossim includes:  These are here just to save time/typing...
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimConnectableObject.h>
+#include <ossim/base/ossimCsvFile.h>
+#include <ossim/base/ossimDate.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimIrect.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimObjectFactory.h>
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+#include <ossim/base/ossimProperty.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimScalarTypeLut.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimVisitor.h>
+
+#include <ossim/imaging/ossimBrightnessContrastSource.h>
+#include <ossim/imaging/ossimBumpShadeTileSource.h>
+#include <ossim/imaging/ossimFilterResampler.h>
+#include <ossim/imaging/ossimFusionCombiner.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageFileWriter.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageMosaic.h>
+#include <ossim/imaging/ossimImageRenderer.h>
+#include <ossim/imaging/ossimImageSource.h>
+#include <ossim/imaging/ossimImageSourceFilter.h>
+#include <ossim/imaging/ossimImageToPlaneNormalFilter.h>
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <ossim/imaging/ossimIndexToRgbLutFilter.h>
+#include <ossim/imaging/ossimRectangleCutFilter.h>
+#include <ossim/imaging/ossimScalarRemapper.h>
+#include <ossim/imaging/ossimSFIMFusion.h>
+#include <ossim/imaging/ossimTwoColorView.h>
+#include <ossim/imaging/ossimImageSourceFactoryRegistry.h>
+
+#include <ossim/init/ossimInit.h>
+
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/projection/ossimImageViewAffineTransform.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+#include <ossim/projection/ossimUtmProjection.h>
+
+#include <ossim/support_data/ossimSrcRecord.h>
+#include <ossim/support_data/ossimWkt.h>
+
+// Put your includes here:
+
+// System includes:
+#include <cmath>
+#include <sstream>
+#include <iostream>
+using namespace std;
+
+int main(int argc, char *argv[])
+{
+   int returnCode = 0;
+   
+   ossimArgumentParser ap(&argc, argv);
+   ossimInit::instance()->addOptions(ap);
+   ossimInit::instance()->initialize(ap);
+   
+   try
+   {
+      // Put your code here.
+   }
+   catch(const ossimException& e)
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
+      returnCode = 1;
+   }
+   catch( ... )
+   {
+      ossimNotify(ossimNotifyLevel_WARN)
+         << "ossim-foo caught unhandled exception!" << std::endl;
+      returnCode = 1;
+   }
+   
+   return returnCode;
+}
diff --git a/ossim/src/test/ossim-get-pixel-test.cpp b/ossim/src/test/ossim-get-pixel-test.cpp
new file mode 100644
index 0000000..176d8c9
--- /dev/null
+++ b/ossim/src/test/ossim-get-pixel-test.cpp
@@ -0,0 +1,219 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: ossim-get-pixel-test.cpp
+//
+// Test code to spit out a pixel value at a given band, line, sample.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossim-get-pixel-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimProperty.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+
+#include <iostream>
+#include <vector>
+using namespace std;
+
+static void usage(ossimArgumentParser& ap)
+{
+   // Add global usage options.
+   ossimInit::instance()->addOptions(ap);
+   
+   ossimApplicationUsage* au = ap.getApplicationUsage();
+   
+   // Set app name.
+   au->setApplicationName(ap.getApplicationName());
+   
+   au->setDescription(ossimString("Returns pixel value at the given sample and line.\nNotes:\nBand, line and sample are zero based.\nUse an \"a\" for <band> if you want to see all bands.\n"));
+   
+   ossimString usageString = ap.getApplicationName();
+   usageString += " [options] <imagefile> <band> <sample> <line>\n";
+   au->setCommandLineUsage(usageString);
+   
+   au->addCommandLineOption("-e","<entry_index> Entry index to get pixel from.  Only significant with multi entry data only.");
+
+   au->addCommandLineOption("--reader-prop","Passes a name=value pair to the reader(s) for setting it's property.  Any number of these can appear on the line.");
+   
+   // Write usage.
+   au->write(ossimNotify(ossimNotifyLevel_INFO));
+}
+
+struct readerProp
+{
+   ossimString name;
+   ossimString value;
+};
+
+/**
+ * @brief Adds band to bandList returning true on success, false on range error
+ * with error message to standard out.
+ */
+static bool addBand( ossim_uint32 band,
+                     ossim_uint32 bandCount,
+                     vector<ossim_uint32>& bandList );
+
+int main(int argc, char *argv[])
+{
+   // Initialize:
+   ossimArgumentParser ap(&argc, argv);
+   ossimInit::instance()->addOptions(ap);
+   ossimInit::instance()->initialize(ap);
+
+   // Argument check:
+   if ( (ap.argc() < 5) || ap.read("-h") || ap.read("--help") )
+   {
+      usage(ap);
+      return 1;
+   }
+
+   // Read options:
+   
+   // For argument parser reads.
+   ossimString ts1;
+   ossimArgumentParser::ossimParameter sp1(ts1);
+
+   // Entry index:
+   ossim_uint32 entryIndex = 0;
+   if ( ap.read("-e", sp1) )
+   {
+      entryIndex = ts1.toUInt32();
+   }
+
+   // Set the reader properties if any.
+   std::vector<readerProp> readerProps;
+   while(ap.read("--reader-prop", sp1))
+   {
+      std::vector<ossimString> splitArray;
+      ts1.split(splitArray, "=");
+      if(splitArray.size() == 2)
+      {
+         readerProp prop;
+         prop.name = splitArray[0];
+         prop.value = splitArray[1];
+         readerProps.push_back(prop);
+      }
+   }
+
+   ap.reportRemainingOptionsAsUnrecognized();
+
+   // Check the input file:
+   ossimFilename imageFile = argv[1];
+   if ( !imageFile.exists() )
+   {
+      usage(ap);
+      return 1;
+   }
+
+   // Open up an image handler.
+   ossimRefPtr<ossimImageHandler> ih
+      = (ossimImageHandler*)ossimImageHandlerRegistry::instance()->open( imageFile );
+   if ( ih.valid() == false )
+   {
+      cerr << "Could not open: " << imageFile << endl;
+      return 1;
+   }
+
+   if ( entryIndex )
+   {
+      if ( ih->setCurrentEntry( entryIndex ) == false )
+      {
+         cerr << "Invalid entry: " << entryIndex << endl;
+         return 1;
+      }
+   }
+   
+   // Set the reader properties if any.
+   if ( readerProps.size() )
+   {
+      std::vector<readerProp>::const_iterator i = readerProps.begin();
+      while( i != readerProps.end() )
+      {
+         ossimRefPtr<ossimProperty> prop = new ossimStringProperty( (*i).name, (*i).value );
+         ih->setProperty(prop);
+         ++i;
+      }
+   }
+
+   vector<ossim_uint32> bandList;
+   ossimString bandString = argv[2];
+
+   const ossim_uint32 BANDS = ih->getNumberOfOutputBands();
+   if ( bandString.downcase() == "a" )
+   {
+      for ( ossim_uint32 band = 0; band < BANDS; ++band)
+      {
+         if ( addBand( band, BANDS, bandList ) == false )
+         {
+            return 1;
+         }
+      }
+   }
+   else
+   {
+      ossim_int32 band = bandString.toUInt32();
+      if ( addBand( band, BANDS, bandList ) == false )
+      {
+         return 1;
+      }
+   }
+      
+   ossimIpt pt;
+   pt.x = ossimString::toInt32(argv[3]);
+   pt.y = ossimString::toInt32(argv[4]);
+   
+   ossimIrect rect(pt.x, pt.y, pt.x+1, pt.y+1);
+   ossimRefPtr<ossimImageData> id = ih->getTile(rect, 0);
+
+   if ( id.valid() )
+   {
+      cout << "image_file: " << imageFile
+           << "\nsample:     " << pt.x
+           << "\nline:       " << pt.y;
+
+      vector<ossim_uint32>::const_iterator i = bandList.begin();
+      while ( i != bandList.end() )
+      {
+         cout << "\nvalue[" << (*i) << "]: " << id->getPix( pt, (*i) );
+         ++i;
+      }
+      cout << endl;
+   }
+   else
+   {
+      cerr << "getTile request failed!" << endl;
+      return 1;
+   }
+   
+   return 0;
+}
+
+bool addBand( ossim_uint32 band, ossim_uint32 bandCount, vector<ossim_uint32>& bandList )
+{
+   bool result = true;
+   if ( band < bandCount )
+   {
+      bandList.push_back(band);
+   }
+   else
+   {
+      cerr << "Band number " << band << " is out of range!" << endl;
+      result = false;
+   }
+   return result;
+}
+
diff --git a/ossim/src/test/ossim-gpkg-writer-test.cpp b/ossim/src/test/ossim-gpkg-writer-test.cpp
new file mode 100644
index 0000000..365d4d1
--- /dev/null
+++ b/ossim/src/test/ossim-gpkg-writer-test.cpp
@@ -0,0 +1,233 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// File: ossim-gpkg-writer-test.cpp
+//
+// Description: Test class for ossimGpkgWriter.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/imaging/ossimGpkgWriterInterface.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/imaging/ossimU8ImageData.h>
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+
+#include <iomanip>
+#include <iostream>
+#include <string>
+using namespace std;
+
+int main(int argc, char* argv[])
+{
+   int status = 0;
+   
+   ossimInit::instance()->initialize(argc, argv);
+
+   if (argc == 2 )
+   {
+      ossimFilename outputFile = argv[1];
+      
+      ossimString writerClass = "ossimGpkgWriter";
+      ossimRefPtr<ossimImageFileWriter> writer =
+         ossimImageWriterFactoryRegistry::instance()->createWriter( writerClass );
+
+      if ( writer.valid() )
+      {
+         ossimGpkgWriterInterface* gpkgWriter =
+            dynamic_cast<ossimGpkgWriterInterface*>( writer.get() );
+
+         if ( gpkgWriter )
+         {
+            ossimKeywordlist kwl;
+            std::string key;
+            std::string value;
+            
+            key = "zoom_levels";
+            // value = "(0,1,2,3,4,5,6,7,8,9,10,11)";
+            value = "(2,3,4,5)";
+            kwl.addPair( key, value );
+            
+            key = "epsg";
+            value = "3857";
+            kwl.addPair( key, value );
+            
+            key = "filename";
+            value = outputFile.string();
+            kwl.addPair( key, value );
+
+            if ( gpkgWriter->openFile( kwl ) )
+            {
+               gpkgWriter->beginTileProcessing();
+               
+               // Write some tiles:
+               ossimRefPtr<ossimImageData> id = new ossimU8ImageData(0, 3, 256, 256);
+               id->initialize();
+               id->createTestTile();
+
+               // Valid tile:
+               if ( gpkgWriter->writeTile( id, 2, 0, 0 ) ) // tile, level, row, col
+               {
+                  cout << "writeTile id, 2, 0, 0 success..." << endl;
+               }
+               else
+               {
+                  cout << "writeTile id, 2, 0, 0 failed..." << endl;
+               }
+               
+               if ( gpkgWriter->writeTile( id, 2, 0, 1 ) ) // tile, level, row, col
+               {
+                  cout << "writeTile id, 2, 0, 1 success..." << endl;
+               }
+               else
+               {
+                  cout << "writeTile id, 2, 0, 1 failed..." << endl;
+               }
+               
+               if ( gpkgWriter->writeTile( id, 2, 1, 0 ) ) // tile, level, row, col
+               {
+                  cout << "writeTile id, 2, 1, 0 success..." << endl;
+               }
+               else
+               {
+                  cout << "writeTile id, 2, 1, 0 failed..." << endl;
+               }
+
+               if ( gpkgWriter->writeTile( id, 2, 1, 1 ) ) // tile, level, row, col
+               {
+                  cout << "writeTile id, 2, 1, 1 success..." << endl;
+               }
+               else
+               {
+                  cout << "writeTile id, 2, 1, 1 failed..." << endl;
+               }
+
+               if ( gpkgWriter->writeTile( id, 3, 0, 0 ) ) // tile, level, row, col
+               {
+                  cout << "writeTile id, 3, 0, 0 success..." << endl;
+               }
+               else
+               {
+                  cout << "writeTile id, 3, 0, 0 failed..." << endl;
+               }
+               
+               if ( gpkgWriter->writeTile( id, 4, 0, 0 ) ) // tile, level, row, col
+               {
+                  cout << "writeTile id, 4, 0, 0 success..." << endl;
+               }
+               else
+               {
+                  cout << "writeTile id, 4, 0, 0 failed..." << endl;
+               }
+
+               if ( gpkgWriter->writeTile( id, 5, 0, 0 ) ) // tile, level, row, col
+               {
+                  cout << "writeTile id, 5, 0, 0 success..." << endl;
+               }
+               else
+               {
+                  cout << "writeTile id, 5, 0, 0 failed..." << endl;
+               }
+               // Invalid level
+               if ( gpkgWriter->writeTile( id, 20, 0, 0 ) ) // tile, level, row, col
+               {
+                  cout << "writeTile id, 20, 0, 0 success..." << endl;
+               }
+               else
+               {
+                  cout << "writeTile id, 20, 0, 0 failed..." << endl;
+               }
+
+               // Invalid row
+               if ( gpkgWriter->writeTile( id, 4, 10000, 0 ) ) // tile, level, row, col
+               {
+                  cout << "writeTile id, 4, 10000, 0success..." << endl;
+               }
+               else
+               {
+                  cout << "writeTile id, 4, 10000, 0 failed..." << endl;
+               }
+
+               // Invalid col
+               if ( gpkgWriter->writeTile( id, 4, 0, 10000 ) ) // tile, level, row, col
+               {
+                  cout << "writeTile id, 4, 0, 10000 success..." << endl;
+               }
+               else
+               {
+                  cout << "writeTile id, 4, 0, 10000 failed..." << endl;
+               }
+
+               gpkgWriter->finalizeTileProcessing();
+
+               // Close this writer and test append mode:
+               writer->close();
+               gpkgWriter = 0;
+               writer = 0; // ref ptr
+
+               cout << "Testing append mode..." << endl;
+               
+               writer = ossimImageWriterFactoryRegistry::instance()->createWriter( writerClass );
+               if ( writer.valid() )
+               {
+                  ossimGpkgWriterInterface* gpkgWriter =
+                     dynamic_cast<ossimGpkgWriterInterface*>( writer.get() );
+                  
+                  if ( gpkgWriter )
+                  {
+                     // Add append to options:
+                     key = "append";
+                     value = "true";
+                     kwl.addPair( key, value );
+
+                     if ( gpkgWriter->openFile( kwl ) )
+                     {
+                        gpkgWriter->beginTileProcessing();
+                        
+                        if ( gpkgWriter->writeTile( id, 3, 0, 1 ) ) // tile, level, row, col
+                        {
+                           cout << "writeTile id, 3, 0, 1 success..." << endl;
+                        }
+                        else
+                        {
+                           cout << "writeTile id, 3, 0, 1 failed..." << endl;
+                        }
+                     }
+
+                     gpkgWriter->finalizeTileProcessing();
+                     
+                     writer->close();
+                     gpkgWriter = 0;
+                  }
+                  writer = 0;
+               }
+            }
+         }
+         else
+         {
+            cerr << "Could not cast!" << endl;
+         }
+         
+         writer = 0;
+      }
+      else // Matches: 
+      {
+         cerr << "ossimImageWriterFactoryRegistry::instance()->createWriter( ossimGpkgWriter ) failed!" << endl;
+      }
+   }
+   else // Matches: if (argc == 2 ){ ... }
+   {
+      cout << argv[0] << " <output_file>"
+           << "\n\nGeoPackage writer test code.\n" << endl;
+   }
+
+   return status;
+}
+
diff --git a/ossim/src/test/ossim-gpt-test.cpp b/ossim/src/test/ossim-gpt-test.cpp
new file mode 100644
index 0000000..274a094
--- /dev/null
+++ b/ossim/src/test/ossim-gpt-test.cpp
@@ -0,0 +1,142 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Test code for ossimGpt class.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossim-gpt-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <iostream>
+using namespace std;
+
+#include <ossim/base/ossimGpt.h>
+#include <ossim/init/ossimInit.h>
+
+int main(int argc, char *argv[])
+{
+   ossimInit::instance()->initialize(argc, argv);
+
+   cout << "ossimGpt::wrap test:\n";
+   
+   ossimGpt gpt(0.0, 0.0, 0.0);
+   cout << "gpt: " << gpt << "\n";
+   gpt.wrap();
+   cout << "gpt::wrap: " << gpt << "\n\n";
+
+   gpt.lat = 45.0;
+   gpt.lon = 45.0;
+   cout << "gpt: " << gpt << "\n";
+   gpt.wrap();
+   cout << "gpt::wrap: " << gpt << "\n\n";
+   
+   gpt.lat = 90.0;
+   gpt.lon = 180.0;
+   cout << "gpt: " << gpt << "\n";
+   gpt.wrap();
+   cout << "gpt::wrap: " << gpt << "\n\n";
+
+   gpt.lat = 91.0;
+   gpt.lon = 181.0;
+   cout << "gpt: " << gpt << "\n";
+   gpt.wrap();
+   cout << "gpt::wrap: " << gpt << "\n\n";
+
+   gpt.lat = 179.0;
+   gpt.lon = 359.0;
+   cout << "gpt: " << gpt << "\n";
+   gpt.wrap();
+   cout << "gpt::wrap: " << gpt << "\n\n";
+
+   gpt.lat = 181.0;
+   gpt.lon = 361.0;
+   cout << "gpt: " << gpt << "\n";
+   gpt.wrap();
+   cout << "gpt::wrap: " << gpt << "\n\n";
+
+   gpt.lat = 271.0;
+   gpt.lon = 361.0;
+   cout << "gpt: " << gpt << "\n";
+   gpt.wrap();
+   cout << "gpt::wrap: " << gpt << "\n\n";
+
+   gpt.lat = 359.0;
+   gpt.lon = 361.0;
+   cout << "gpt: " << gpt << "\n";
+   gpt.wrap();
+   cout << "gpt::wrap: " << gpt << "\n\n";
+
+   gpt.lat = 361.0;
+   gpt.lon = 721.0;
+   cout << "gpt: " << gpt << "\n";
+   gpt.wrap();
+   cout << "gpt::wrap: " << gpt << "\n\n";
+
+   gpt.lat = 451.0;
+   gpt.lon = 901.0;
+   cout << "gpt: " << gpt << "\n";
+   gpt.wrap();
+   cout << "gpt::wrap: " << gpt << "\n\n";
+
+   gpt.lat = -45.0;
+   gpt.lon = -45.0;
+   cout << "gpt: " << gpt << "\n";
+   gpt.wrap();
+   cout << "gpt::wrap: " << gpt << "\n\n";
+   
+   gpt.lat = -90.0;
+   gpt.lon = -180.0;
+   cout << "gpt: " << gpt << "\n";
+   gpt.wrap();
+   cout << "gpt::wrap: " << gpt << "\n\n";
+
+   gpt.lat = -91.0;
+   gpt.lon = -181.0;
+   cout << "gpt: " << gpt << "\n";
+   gpt.wrap();
+   cout << "gpt::wrap: " << gpt << "\n\n";
+
+   gpt.lat = -179.0;
+   gpt.lon = -359.0;
+   cout << "gpt: " << gpt << "\n";
+   gpt.wrap();
+   cout << "gpt::wrap: " << gpt << "\n\n";
+
+   gpt.lat = -181.0;
+   gpt.lon = -361.0;
+   cout << "gpt: " << gpt << "\n";
+   gpt.wrap();
+   cout << "gpt::wrap: " << gpt << "\n\n";
+
+   gpt.lat = -271.0;
+   gpt.lon = -361.0;
+   cout << "gpt: " << gpt << "\n";
+   gpt.wrap();
+   cout << "gpt::wrap: " << gpt << "\n\n";
+
+   gpt.lat = -359.0;
+   gpt.lon = -361.0;
+   cout << "gpt: " << gpt << "\n";
+   gpt.wrap();
+   cout << "gpt::wrap: " << gpt << "\n\n";
+
+   gpt.lat = -361.0;
+   gpt.lon = -721.0;
+   cout << "gpt: " << gpt << "\n";
+   gpt.wrap();
+   cout << "gpt::wrap: " << gpt << "\n\n";
+
+   gpt.lat = -451.0;
+   gpt.lon = -901.0;
+   cout << "gpt: " << gpt << "\n";
+   gpt.wrap();
+   cout << "gpt::wrap: " << gpt << "\n\n";
+
+   
+   return 0;
+}
+
diff --git a/ossim/src/test/ossim-gsd-test.cpp b/ossim/src/test/ossim-gsd-test.cpp
new file mode 100644
index 0000000..fa05dcf
--- /dev/null
+++ b/ossim/src/test/ossim-gsd-test.cpp
@@ -0,0 +1,119 @@
+//----------------------------------------------------------------------------
+//
+// File: ossim-gsd-test.cpp
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description:
+//
+// Test to output gsd from image geometry and then compute the gsd from center
+// latitude of the image if the projecion is geographic, i.e. scale is in
+// decimal degrees.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossim-gsd-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+
+#include <iostream>
+using namespace std;
+
+static void usage()
+{
+   cout << "ossim-gsd-test <imagefile>"
+        << "\nThis will compute meters per pixel from the center latitude if the\n"
+        << "underlying projection scale units are in degrees." << endl;
+}
+
+int main(int argc, char *argv[])
+{
+   ossimInit::instance()->initialize(argc, argv);
+
+   if (argc != 2)
+   {
+      usage();
+      return 0;
+   }
+
+   ossimFilename imageFile = argv[argc - 1];
+
+   if ( !imageFile.exists() )
+   {
+      usage();
+      return 1;
+   }
+
+   // Open up an image handler.
+   ossimRefPtr<ossimImageHandler> ih = ossimImageHandlerRegistry::instance()->open(
+      ossimFilename(argv[argc - 1]));
+   if ( ih.valid() == false )
+   {
+      cerr << "Could not open: " << imageFile << endl;
+      return 1;
+   }
+   
+   cout << "image_file:  " << imageFile << "\n";
+   
+   ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
+   if ( geom.valid() )
+   {
+      ossimDpt imageGeomGsd = geom->getMetersPerPixel();
+      cout << "image_geometry_meters_per_pixel: " << imageGeomGsd << "\n";
+
+      ossimDrect rect = ih->getImageRectangle(0);
+      ossimKeywordlist kwl;
+      geom->saveState(kwl);
+      ossimDpt ipt = rect.midPoint();
+      cout << "center_image_point: " << ipt << "\n";
+      ossimGpt wpt;
+      geom->localToWorld(ipt, wpt);
+      cout << "center_world_point: " << wpt << "\n";
+
+      ossimDpt scale;
+      bool scaleDegrees = false;
+      const char* lookup = kwl.find("projection.pixel_scale_xy");
+      if ( lookup )
+      {
+         ossimString s = lookup;
+         scale.toPoint(s);
+         cout << "projection.pixel_scale_xy: " << scale << "\n";
+         const char* lookup = kwl.find("projection.pixel_scale_units");
+         if ( lookup )
+         {
+            s = lookup;
+            scaleDegrees = (s == "degrees");
+            cout << "projection.scale_units: " << s << "\n";
+         }
+
+         if ( scaleDegrees )
+         {
+            ossimDpt mpd = wpt.metersPerDegree();
+            cout << "meters_per_degree_for_center: " << mpd << "\n";
+            ossimDpt computeGsd;
+            computeGsd.x = mpd.x * scale.x;
+            computeGsd.y = mpd.y * scale.y;
+            cout << "computed_meters_per_pixel_for_center_lat: " << computeGsd << "\n";
+         }
+      }
+   }
+   else
+   {
+      cout << "null geometry!\n";
+   }
+
+   cout << endl;
+   return 0;
+}
+
+
diff --git a/ossim/src/test/ossim-gsoc1.cpp b/ossim/src/test/ossim-gsoc1.cpp
new file mode 100644
index 0000000..a1f864c
--- /dev/null
+++ b/ossim/src/test/ossim-gsoc1.cpp
@@ -0,0 +1,91 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// File: ossim-foo.cpp
+//
+// Author:  David Burken
+//
+// Description: Contains application definition "ossim-foo" app.
+//
+// NOTE:  This is supplied for simple quick test. DO NOT checkin your test to
+//        the svn repository.  Simply edit ossim-foo.cpp and run your test.
+//        After completion you can do a "svn revert foo.cpp" if you want to
+//        keep your working repository up to snuff.
+//
+// $Id: ossim-gsoc1.cpp 23420 2015-07-12 11:58:34Z dburken $
+//----------------------------------------------------------------------------
+
+// ossim includes:  These are here just to save time/typing...
+#include <ossim/init/ossimInit.h>
+#include <ossim/point_cloud/ossimPointCloudImageHandler.h>
+#include <ossim/point_cloud/ossimGenericPointCloudHandler.h>
+#include <vector>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/imaging/ossimTiffWriter.h>
+
+using namespace std;
+
+int main(int argc, char *argv[])
+{
+   ossimInit::instance()->initialize(argc, argv);
+   
+   // TODO: Read your ECEF points from your input file here:
+   vector<ossimEcefPoint> ecef_points; // Need to fill this vector array
+
+   ossimEcefPoint Pt1( 4347158.78960514, 848070.80152498, 4573989.32558993);
+   ossimEcefPoint Pt2( 4347158.78960514, 853070.80152498, 4573927.96772204);
+   ossimEcefPoint Pt3( 4347158.78960514, 858070.80152498, 4573866.60985415);
+   ossimEcefPoint Pt4( 4352158.78960514, 848070.80152498, 4569848.07121407);
+   ossimEcefPoint Pt5( 4352158.78960514, 853070.80152498, 4569786.71334618);
+   ossimEcefPoint Pt6( 4352158.78960514, 858070.80152498, 4569725.35547829);
+   ossimEcefPoint Pt7( 4357158.78960514, 848070.80152498, 4565706.81683821);
+   ossimEcefPoint Pt8( 4357158.78960514, 853070.80152498, 4565645.45897032);
+   ossimEcefPoint Pt9( 4357158.78960514, 858070.80152498, 4565584.10110243);
+
+   ecef_points.push_back(Pt1);
+   ecef_points.push_back(Pt2);
+   ecef_points.push_back(Pt3);
+   ecef_points.push_back(Pt4);
+   ecef_points.push_back(Pt5);
+   ecef_points.push_back(Pt6);
+   ecef_points.push_back(Pt7);
+   ecef_points.push_back(Pt8);
+   ecef_points.push_back(Pt9);
+
+   ossimRefPtr<ossimGenericPointCloudHandler> pc_handler =
+      new ossimGenericPointCloudHandler(ecef_points);
+
+   ossimRefPtr<ossimPointCloudImageHandler> ih =  new ossimPointCloudImageHandler;
+   ih->setCurrentEntry((ossim_uint32)ossimPointCloudImageHandler::HIGHEST);
+   ih->setPointCloudHandler(pc_handler.get());
+
+   // TODO: This sets the resolution of the output file. There is a default value computed but you
+   // may either adjust it or set it manually here:
+   ossimDpt gsd;
+   ih->getGSD(gsd, 0);
+   ossimString gsdstr = ossimString::toString((gsd.x + gsd.y)/2.0); // I use 1/6th of default
+   ossimRefPtr<ossimProperty> gsd_prop =
+         new ossimStringProperty(ossimKeywordNames::METERS_PER_PIXEL_KW, gsdstr);
+   ih->setProperty(gsd_prop);
+
+   // Set up the writer:
+   ossimRefPtr<ossimTiffWriter> tif_writer =  new ossimTiffWriter();
+   tif_writer->setGeotiffFlag(true);
+
+   ossimFilename outfile ("output.tif");
+   tif_writer->setFilename(outfile);
+   if (tif_writer.valid())
+   {
+      tif_writer->connectMyInputTo(0, ih.get());
+      tif_writer->execute();
+   }
+
+   cout << "Output written to <"<<outfile<<">"<<endl;
+   tif_writer->close();
+   tif_writer = 0;
+   ih = 0;
+   pc_handler = 0;
+   return 0;
+}
diff --git a/src/test/ossim-histo-compare.cpp b/ossim/src/test/ossim-histo-compare.cpp
similarity index 100%
rename from src/test/ossim-histo-compare.cpp
rename to ossim/src/test/ossim-histo-compare.cpp
diff --git a/ossim/src/test/ossim-image-chain-test.cpp b/ossim/src/test/ossim-image-chain-test.cpp
new file mode 100644
index 0000000..9d0bf16
--- /dev/null
+++ b/ossim/src/test/ossim-image-chain-test.cpp
@@ -0,0 +1,81 @@
+//----------------------------------------------------------------------------
+//
+// File: ossim-image-chain-test.cpp
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description:
+//
+// Test application for ossimImageChain class.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossim-image-chain-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/imaging/ossimImageChain.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+
+#include <iostream>
+using namespace std;
+
+static void usage()
+{
+   cout << "ossim-image-chain-test <image>" << endl;
+}
+
+int main(int argc, char *argv[])
+{
+   int result = 0;
+   
+   ossimInit::instance()->initialize(argc, argv);
+
+   if (argc == 2)
+   {
+      try // In case exceptions is thrown. 
+      {
+         ossimFilename image = argv[1];
+         ossimRefPtr<ossimImageHandler> ih = ossimImageHandlerRegistry::instance()->open(image);
+         if ( ih.valid() )
+         {
+            cout << "Opened image: " << image << endl;
+
+            ossimRefPtr<ossimImageChain> ic = new ossimImageChain();
+            ic->addLast( ih.get() );
+            cout << "Added to image chain via ossimImageChain::addLast" << endl;
+
+            cout << "Calling ossimImageChain::removeChild" << endl;
+
+            if ( ic->removeChild( ih.get() ) )
+            {
+               cout << "Removed from chain..." << endl;
+               ih = 0;
+            }
+
+            ic = 0;
+         }
+         else
+         {
+            cout << "Could not open: " << image << endl;
+            result = 1;
+         }
+      }
+      catch( const ossimException& e )
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
+         result = 1;
+      }
+   }
+   else
+   {
+      usage();
+   }
+
+   return result;
+}
+
diff --git a/ossim/src/test/ossim-image-elevation-test.cpp b/ossim/src/test/ossim-image-elevation-test.cpp
new file mode 100644
index 0000000..71b2153
--- /dev/null
+++ b/ossim/src/test/ossim-image-elevation-test.cpp
@@ -0,0 +1,99 @@
+//----------------------------------------------------------------------------
+//
+// File: ossim-tiled-elevation-test.cpp
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description:
+//
+// Test application for ossimImageElevationDatabase class.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossim-image-elevation-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimTimer.h>
+#include <ossim/elevation/ossimImageElevationDatabase.h>
+
+#include <iomanip>
+#include <iostream>
+using namespace std;
+
+static void usage()
+{
+   cout << "ossim-image-elevation-test <elev-dir>"
+        << "\nCreates a ossimImageElevationDatabase from elev-dir." << endl;
+}
+
+int main(int argc, char *argv[])
+{
+   int result = 0;
+
+   ossimTimer::instance()->setStartTick();
+
+   // Turn off elevation initialization as we want to use ours.
+   ossimInit::instance()->setElevEnabledFlag(false);
+   
+   ossimInit::instance()->initialize(argc, argv);
+
+   cout << std::setiosflags(ios::fixed) << std::setprecision(3)
+        << "elapsed time after initialize: "
+        << ossimTimer::instance()->time_s() << "\n";
+   
+   if (argc == 2)
+   {
+      try // Exceptions can be thrown so 
+      {
+         ossimString elevDir = argv[1];
+         
+         cout << "elev-dir: " << elevDir << "\n";
+         
+         ossimImageElevationDatabase* elevdb = new ossimImageElevationDatabase();
+         if ( elevdb->open(elevDir) )
+         {
+            std::vector<ossimGpt> pts(10);
+            
+            pts[0] = ossimGpt(3.5, -67.5);
+            pts[1] = ossimGpt(7.5, -79.5);
+            pts[2] = ossimGpt(35.694166666666668, 51.598333333333336);
+            pts[3] = ossimGpt(35.821992089329882, 51.437673634967858);
+            pts[4] = ossimGpt(35.843333333333334, 51.373333333333335);
+            pts[5] = ossimGpt(3.25, -67.25);
+            pts[6] = ossimGpt(7.5, -79.5);
+            pts[7] = ossimGpt(35.821992089329882, 51.437673634967858);
+            pts[8] = ossimGpt(7, -80);
+            pts[9] = ossimGpt(7.9, -79.1);
+            std::vector<ossimGpt>::iterator i = pts.begin();
+
+            while ( i != pts.end() )
+            {
+               cout << "getHeightAboveEllipsoid(" << (*i) << "): " 
+                    << elevdb->getHeightAboveEllipsoid( (*i) ) << endl;
+               ++i;
+            }
+         }
+         else
+         {
+            cout << "Could not open: " << elevDir << endl;
+         }
+      }
+      catch( const ossimException& e )
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
+         result = 1;
+      }
+   }
+   else
+   {
+      usage();
+   }
+   return result;
+}
+
+
diff --git a/ossim/src/test/ossim-image-geometry-test.cpp b/ossim/src/test/ossim-image-geometry-test.cpp
new file mode 100644
index 0000000..644f210
--- /dev/null
+++ b/ossim/src/test/ossim-image-geometry-test.cpp
@@ -0,0 +1,349 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description:
+//
+// Test app for image geometries.  Prints out projection keyword
+// list.  Performs lineSampleToWorld, worldToLineSample, lineSampleToWorld
+// round trip dumping points and delta on image points.  Dumps elevation cells
+// used.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossim-image-geometry-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <iostream>
+#include <iomanip>
+#include <string>
+#include <sstream>
+#include <ctime>
+using namespace std;
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/elevation/ossimElevManager.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+
+// Points in one direction.  If 5, will get 5X5 or 25.
+static const ossim_int32 POINTS = 5; 
+
+static std::string getDate()
+{
+// Get the build date in the format of (yyyymmdd).
+   char s[9];
+   s[8] = '\0';
+   time_t t;
+   time(&t);
+   tm* lt = localtime(&t);
+   strftime(s, 9, "%Y%m%d", lt);
+   std::string date = s;
+   return date;
+}
+
+static void usage()
+{
+   cout << "ossimGeometryTest <imagefile>"
+        << "\nTest image geometry." << endl;
+}
+
+static const ossim_uint32 W = 14;
+
+static void print(const std::string& prefix,
+                  const ossimDpt& ipt,
+                  const ossimGpt& wpt,
+                  const ossimDpt& rpt)
+{
+   ossimDpt delta = ipt - rpt;
+   ossim_uint32 w =
+      (prefix.size() < W) ? (W - prefix.size()) : prefix.size();
+                                                     
+   cout << std::setfill(' ') << setiosflags(ios::left) 
+        << prefix << std::setw(w) << "ipt:" << ipt.toString().c_str() << "\n"
+        << prefix << std::setw(w) << "wpt:" << wpt.toString().c_str() << "\n"
+        << prefix << std::setw(w) << "rpt:" << rpt.toString().c_str() << "\n"
+        << prefix << std::setw(w) << "delta:" << delta.toString() << "\n\n";
+}
+
+
+int main(int argc, char *argv[])
+{
+   ossimInit::instance()->initialize(argc, argv);
+
+   if (argc != 2)
+   {
+      usage();
+      return 0;
+   }
+
+   ossimFilename imageFile = argv[argc - 1];
+
+   if ( !imageFile.exists() )
+   {
+      usage();
+      return 1;
+   }
+
+   // Open up an image handler.
+   ossimRefPtr<ossimImageHandler> ih
+      = (ossimImageHandler*)ossimImageHandlerRegistry::instance()->open(
+         ossimFilename(argv[argc - 1]));
+   if ( !ih )
+   {
+      cerr << "Could not open: " << imageFile << endl;
+      return 1;
+   }
+
+   cout << "image_file:  " << imageFile << "\n";
+
+   // cout << "date_yyyymmdd: " << getDate().c_str() << "\n"; 
+   
+   // Get the entry list:
+   std::vector<ossim_uint32> entryList;
+   ih->getEntryList(entryList);
+   
+   std::vector<ossim_uint32>::const_iterator entry = entryList.begin();
+   while ( entry != entryList.end() )
+   {
+      cout << "entry_index:  " << (*entry) << "\n";
+      ih->setCurrentEntry( (*entry) );
+
+      ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
+
+      if ( geom.valid() )
+      {
+#if 1    /* Comment out to disable elevation for map projections. */
+         ossimRefPtr<ossimProjection> proj = geom->getProjection();
+         if (proj.valid() )
+         {
+            ossimRefPtr<ossimMapProjection> mp = PTR_CAST(ossimMapProjection, proj.get());
+            if (mp.valid())
+            {
+               cout << "setting elev lookup flag..." << endl;
+               mp->setElevationLookupFlag(true);
+            }
+         }
+#endif
+         ossimKeywordlist kwl;
+         geom->saveState(kwl, 0);
+         cout << kwl << "\n";
+
+         ossimDrect rect = ih->getImageRectangle(0);
+
+         cout << "image_rect: " << rect << "\n\n";
+
+         // Do forward, inverse, forward on corners and center.
+
+         std::string prefix;
+         ossimDpt ipt;  // image point
+         ossimDpt rpt;  // round trip image point
+         ossimGpt wpt;  // world point
+
+         // Upper left:
+         prefix = "ul.";
+         ipt = rect.ul();
+         geom->localToWorld(ipt, wpt);
+         geom->worldToLocal(wpt, rpt);
+         print(prefix, ipt, wpt, rpt);
+
+         // Upper right:
+         prefix = "ur.";
+         ipt = rect.ur();
+         geom->localToWorld(ipt, wpt);
+         geom->worldToLocal(wpt, rpt);
+         print(prefix, ipt, wpt, rpt);
+
+         // Lower right:
+         prefix = "lr.";
+         ipt = rect.lr();
+         geom->localToWorld(ipt, wpt);
+         geom->worldToLocal(wpt, rpt);
+         print(prefix, ipt, wpt, rpt);
+
+         // Lower left:
+         prefix = "ll.";
+         ipt = rect.ll();
+         geom->localToWorld(ipt, wpt);
+         geom->worldToLocal(wpt, rpt);
+         print(prefix, ipt, wpt, rpt);
+
+         // center:
+         prefix = "center.";
+         ipt = rect.midPoint();
+         geom->localToWorld(ipt, wpt);
+         geom->worldToLocal(wpt, rpt);
+         print(prefix, ipt, wpt, rpt);
+
+         geom->setTargetRrds(2);
+         cout << "geometry target rrds set to: " << geom->getTargetRrds() << "\n\n";
+         
+         // Upper left:
+         prefix = "ul-r2.";
+         geom->rnToRn(rect.ul(), 0, 2, ipt);
+         geom->localToWorld(ipt, wpt);
+         geom->worldToLocal(wpt, rpt);
+         print(prefix, ipt, wpt, rpt);
+
+         // Upper right:
+         prefix = "ur-r2.";
+         geom->rnToRn(rect.ur(), 0, 2, ipt);
+         geom->localToWorld(ipt, wpt);
+         geom->worldToLocal(wpt, rpt);
+         print(prefix, ipt, wpt, rpt);
+
+         // Lower right:
+         prefix = "lr-r2.";
+         geom->rnToRn(rect.lr(), 0, 2, ipt);
+         geom->localToWorld(ipt, wpt);
+         geom->worldToLocal(wpt, rpt);
+         print(prefix, ipt, wpt, rpt);
+
+         // Lower left:
+         prefix = "ll-r2.";
+         ipt = rect.ll();
+         geom->rnToRn(rect.ll(), 0, 2, ipt);
+         geom->localToWorld(ipt, wpt);
+         geom->worldToLocal(wpt, rpt);
+         print(prefix, ipt, wpt, rpt);
+
+         // center:
+         prefix = "center-r2.";
+         ipt = rect.midPoint();
+         geom->rnToRn(ipt, 0, 2, ipt);
+         geom->localToWorld(ipt, wpt);
+         geom->worldToLocal(wpt, rpt);
+         print(prefix, ipt, wpt, rpt);
+
+         // Test rnToWorld and world to rn:
+         cout << "testing rnToWorld and worldToRn:\n\n";
+         prefix = "center-r3.";
+         ipt = rect.midPoint();
+         geom->rnToRn(ipt, 0, 3, ipt);
+         geom->rnToWorld(ipt, 3, wpt);
+         geom->worldToRn(wpt, 3, rpt);
+         print(prefix, ipt, wpt, rpt);
+
+         geom->setTargetRrds(0);
+         cout << "geometry target rrds set to: " << geom->getTargetRrds() << "\n\n";
+
+         prefix = "center-r3.";
+         ipt = rect.midPoint();
+         geom->rnToRn(ipt, 0, 3, ipt);
+         geom->rnToWorld(ipt, 3, wpt);
+         geom->worldToRn(wpt, 3, rpt);
+         print(prefix, ipt, wpt, rpt);
+         
+
+         ossim_int32 tenthW  = rect.width()  / POINTS;
+         ossim_int32 tenthH  = rect.height() / POINTS;
+         ossim_int32 offW    = tenthW / 2;
+         ossim_int32 offH    = tenthH / 2;
+         ossimIpt    ul      = rect.ul();
+         ossimIpt    lr      = rect.lr();
+         ossim_int32 ptIndex = 0;
+
+         // Line loop:
+         for (ossim_int32 y = ul.y+offH; y < lr.y; y += tenthH)
+         {
+            ipt.y = y;
+            
+            // Sample loop:
+            for (ossim_int32 x = ul.x+offW; x < lr.x; x += tenthW)
+            {
+               ipt.x = x;
+
+               std::ostringstream s;
+               s << std::setfill('0') << setiosflags(ios::right) 
+                 << "pt" << std::setw(3) << ptIndex << ".";
+               prefix = s.str();
+               geom->localToWorld(ipt, wpt);
+               geom->worldToLocal(wpt, rpt);
+               print(s.str(), ipt, wpt, rpt);
+
+               ++ptIndex;
+            }
+         }
+
+      } // matches: if ( proj.valid() )
+
+      // Test the decimationFactors method.
+      ossim_uint32 level;
+      std::vector<ossimDpt> decimations;
+      geom->decimationFactors(decimations);
+      
+      for (level = 0; level < decimations.size(); ++level)
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "decimation[" << level << "]: " << decimations[level]
+            << std::endl;
+      }
+
+      bool isAffectedByElevation = geom->isAffectedByElevation();
+      ossimNotify(ossimNotifyLevel_DEBUG)
+         << "\nImage projection " << ( isAffectedByElevation ? "is" : "isn't")
+         << " affected by elevation." << std::endl;
+      
+      // Test up is code:
+      if ( isAffectedByElevation )
+      {
+         ossim_float64 upIsUpAngle = geom->upIsUpAngle();
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "\nUp is up rotation angle: " << upIsUpAngle << "\n" << std::endl;
+      }
+      
+#if 0 /* commented out as one time test is good */
+      
+      // Test the decimationFactor method.
+      ossimDpt decimation;
+      geom->decimationFactors(decimations);
+      ossim_float64 r0_lines = ih->getNumberOfLines(0);
+      ossim_float64 r0_samps = ih->getNumberOfSamples(0);
+      
+      for (level = 0; level < geom->getNumberOfDecimations(); ++level)
+      {
+         geom->decimationFactor(level, decimation);
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << "decimation[" << level << "]:          " << decimation
+            << "\nlines[" << level << "]:             " << ih->getNumberOfLines(level)
+            << "\nsamples[" << level << "]:           " << ih->getNumberOfSamples(level)
+            << "\ncomputed lines[" << level << "]:    " << (r0_lines * decimation.y)
+            << "\ncomputed samples[" << level << "]:  " << (r0_samps * decimation.x)
+            << std::endl;
+      }
+#endif
+      
+      ++entry; // Go to next entry.
+      
+   } // matches: while ( entry != entryList.end() )
+
+#if 0
+   // Dump the elevation cells used:
+   std::vector<ossimFilename> cells;
+   ossimElevManager::instance()->getOpenCellList(cells);
+
+   for (ossim_uint32 cellIndex = 0; cellIndex < cells.size(); ++cellIndex)
+   {
+      std::ostringstream s;
+      s << std::setfill('0')
+        << "cell" << std::setw(3) << cellIndex << ": ";
+
+      cout << std::setfill(' ') << setiosflags(ios::left) << std::setw(W)
+           << s.str().c_str() << cells[cellIndex] << "\n";
+   }
+
+   cout << endl;
+#endif
+   return 0;
+}
+
+
diff --git a/src/test/ossim-image-handler-test.cpp b/ossim/src/test/ossim-image-handler-test.cpp
similarity index 100%
rename from src/test/ossim-image-handler-test.cpp
rename to ossim/src/test/ossim-image-handler-test.cpp
diff --git a/ossim/src/test/ossim-image-writer-test.cpp b/ossim/src/test/ossim-image-writer-test.cpp
new file mode 100644
index 0000000..4db5b19
--- /dev/null
+++ b/ossim/src/test/ossim-image-writer-test.cpp
@@ -0,0 +1,76 @@
+#include <cstdlib> /* for exit */
+#include <iostream>
+
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+
+
+int main(int argc, char *argv[])
+{
+   ossimArgumentParser argumentParser(&argc, argv);
+   ossimInit::instance()->addOptions(argumentParser);
+   ossimInit::instance()->initialize(argumentParser);
+   argumentParser.getApplicationUsage()->addCommandLineOption("-h or --help", "Shows help");
+   argumentParser.getApplicationUsage()->setCommandLineUsage(argumentParser.getApplicationName()+" [options] ");
+   argumentParser.getApplicationUsage()->setApplicationName(argumentParser.getApplicationName());
+   
+   if(argumentParser.read("-h") || argumentParser.read("--help"))
+   {
+      argumentParser.getApplicationUsage()->write(std::cout);
+      exit(0);
+   }
+   ossimString extensions = "png,gif,j2k,jp2,jpg,jpeg,tif,tiff,nitf,ntf,ccf,til,img,toc,rpf,doq,doqq,dt0,dt1,dt2,dt3,dt4,dt5,dt6,hgt,dem,fst,ras";
+   ossimString mimeTypes = "image/gif,image/jpg,image/png,image/jpx,image/jp2,image/jpeg,image/tiff,image/nitf,image/ntf,image/doq,image/doqq,image/dted,image/hgt,image/dem";
+   std::vector<ossimString> extensionArray;
+   std::vector<ossimString> mimeArray;
+
+   extensions.split(extensionArray, ",");
+   mimeTypes.split(mimeArray, ",");
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx < extensionArray.size(); ++idx)
+   {
+      ossimImageWriterFactoryBase::ImageFileWriterList result;
+      ossimImageWriterFactoryRegistry::instance()->getImageFileWritersBySuffix(result, extensionArray[idx]);
+      
+      std::cout << "extension  " << extensionArray[idx] << ": ";
+      if(!result.empty())
+      {
+         for(ossim_uint32 resultIdx = 0; resultIdx < result.size(); ++resultIdx)
+         {
+            std::cout << result[resultIdx]->getClassName() << (((resultIdx+1)==result.size())?"":", ");
+         }
+      }
+      std::cout << "\n";
+   }
+   for(idx = 0; idx < mimeArray.size(); ++idx)
+   {
+      ossimImageWriterFactoryBase::ImageFileWriterList result;
+      ossimImageWriterFactoryRegistry::instance()->getImageFileWritersByMimeType(result, mimeArray[idx]);
+      
+      std::cout << "mimeType  " << mimeArray[idx] << ": ";
+      if(!result.empty())
+      {
+         for(ossim_uint32 resultIdx = 0; resultIdx < result.size(); ++resultIdx)
+         {
+            std::cout << result[resultIdx]->getClassName() << (((resultIdx+1)==result.size())?"":", ");
+         }
+      }
+      std::cout << "\n";
+   }
+   if(argc > 1)
+   {
+      for(idx = 1; static_cast<ossim_int32>(idx) < argc; ++idx)
+      {
+         ossimRefPtr<ossimImageFileWriter> writer = ossimImageWriterFactoryRegistry::instance()->createWriter(ossimFilename(argv[idx]));
+         
+         if(writer.valid())
+         {
+            std::cout << writer->getClassName() << ": Opened by extension for file " << argv[idx] << std::endl;
+         }
+      }
+   }
+   
+   return 0;
+}
diff --git a/ossim/src/test/ossim-index-to-rgb-lut-test.cpp b/ossim/src/test/ossim-index-to-rgb-lut-test.cpp
new file mode 100644
index 0000000..a18dd5f
--- /dev/null
+++ b/ossim/src/test/ossim-index-to-rgb-lut-test.cpp
@@ -0,0 +1,200 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Oscar Kramer
+//
+// Description: Test of ossimIndexToRgbLutFilter.
+//
+// $Id: ossim-index-to-rgb-lut-test.cpp 23068 2015-01-07 23:08:29Z okramer $
+//----------------------------------------------------------------------------
+
+#include <iostream>
+using namespace std;
+
+#include <ossim/base/ossimConstants.h>  // ossim contants...
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/imaging/ossimIndexToRgbLutFilter.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/imaging/ossimMemoryImageSource.h>
+#include <ossim/imaging/ossimImageDataFactory.h>
+#include <ossim/imaging/ossimTiffWriter.h>
+
+static const std::string kwl_literal =
+      "type: ossimIndexToRgbLutFilter \n"
+      "mode: literal  \n"
+      "entry0.index: 0 \n"
+      "entry0.color: 1 2 3 \n"
+      "entry1.index: 1.0 \n"
+      "entry1.color: 255 1 1 \n"
+      "entry2.index: 2.0 \n"
+      "entry2.color: 1 255 1 \n";
+
+static const std::string kwl_vertices =
+      "type: ossimIndexToRgbLutFilter \n"
+      "mode: vertices  \n"
+      "entry0.index: 0.5 \n"
+      "entry0.color: 1 2 3 \n"
+      "entry1.index: 127.5 \n"
+      "entry1.color: 255 1 1 \n"
+      "entry2.index: 250.0 \n"
+      "entry2.color: 1 255 1 \n";
+
+static const std::string kwl_regular =
+      "type: ossimIndexToRgbLutFilter \n"
+      "mode: regular \n"
+      "entry0: 1 1 255 \n"
+      "entry1: 1 255 1 \n"
+      "entry2: 255 1 1 \n"
+      "max_value:  250 \n"
+      "min_value:  1 \n";
+
+static const std::string kwl_regular2 =
+      "type: ossimIndexToRgbLutFilter \n"
+      "mode: regular \n"
+      "entry0.r: 1 \n"
+      "entry0.g: 1 \n"
+      "entry0.b: 255 \n"
+      "entry1.r: 1 \n"
+      "entry1.g: 255 \n"
+      "entry1.b: 1 \n"
+      "entry2.r: 255 \n"
+      "entry2.g: 1 \n"
+      "entry2.b: 1 \n"
+      "max_value:  250 \n"
+      "min_value:  1 \n";
+
+static const std::string kwl_regnorm =
+      "type: ossimIndexToRgbLutFilter \n"
+      "mode: regular \n"
+      "entry0: 1 1 255 \n"
+      "entry1: 1 255 1 \n"
+      "entry2: 255 1 1 \n"
+      "max_value:  1.0 \n"
+      "min_value:  0 \n";
+
+
+bool runTest(const std::string& kwlString, ossimRefPtr<ossimImageSourceFilter>& lutFilter)
+{
+   ossimKeywordlist kwl;
+   kwl.parseString(kwlString);
+   if (!lutFilter->loadState(kwl))
+   {
+      cout << "ERROR: bad state returned from ossimIndexToRgbLutFilter::loadState()" << endl;
+      return false;
+   }
+
+   ossimKeywordlist savedKwl;
+   lutFilter->saveState(savedKwl);
+   cout << savedKwl << endl;
+
+   lutFilter->initialize();
+   ossimIrect rect (lutFilter->getBoundingRect());
+   ossimRefPtr<ossimImageData> rgbBuffer = lutFilter->getTile(rect);
+
+   ossim_uint8* outBuf[3];
+   outBuf[0] = (ossim_uint8*)(rgbBuffer->getBuf(0));
+   outBuf[1] = (ossim_uint8*)(rgbBuffer->getBuf(1));
+   outBuf[2] = (ossim_uint8*)(rgbBuffer->getBuf(2));
+   for (int x=0; x<256; ++x)
+   {
+      cout << "[" <<  x  << "] : " << (int)outBuf[0][x] << "  " << (int)outBuf[1][x] << "  "
+            << (int)outBuf[2][x] << endl;
+   }
+   cout << endl;
+
+   return true;
+}
+
+int main(int argc, char *argv[])
+{
+   ossimInit::instance()->initialize(argc, argv);
+
+   // For batch testing, permit assigning output dir for test tiff:
+   ossimFilename tiffOutFile ("./test-tif.tif");
+   if (argc > 1)
+      tiffOutFile = argv[1];
+
+   // Initialize the input index buffer:
+   ossimRefPtr<ossimImageData> indexBuffer =
+         ossimImageDataFactory::instance()->create(0, OSSIM_UINT8, 1, 256, 1);
+   if(!indexBuffer.valid())
+      return -1;
+   indexBuffer->initialize();
+   for (int x=0; x<256; ++x)
+      indexBuffer->setValue(x, 0, x);
+   indexBuffer->validate();
+
+   // Create output image chain:
+   ossimRefPtr<ossimMemoryImageSource> memSource = new ossimMemoryImageSource;
+   memSource->setImage(indexBuffer);
+   memSource->setRect(0, 0, 256, 1);
+   ossimRefPtr<ossimImageSourceFilter> lutFilter = new ossimIndexToRgbLutFilter();
+   lutFilter->connectMyInputTo(memSource.get());
+   bool success;
+
+   // Test 1: LITERAL mode
+   cout << "\nTEST 1 -- Running LITERAL mode test...\n"<<endl;
+   if (!runTest(kwl_literal, lutFilter))
+      return -1;
+
+   // Test 2: VERTICES mode
+   cout << "\nTEST 2 -- Running VERTICES mode test...\n"<<endl;
+   if (!runTest(kwl_vertices, lutFilter))
+      return -1;
+
+   // Test 3: REGULAR mode, compact-format
+   cout << "\nTEST 3 -- Running REGULAR mode, compact-format test...\n"<<endl;
+   if (!runTest(kwl_regular, lutFilter))
+      return -1;
+
+   // Test 4: REGULAR mode, bloated-format
+   cout << "\nTEST 4 -- Running REGULAR mode, bloated-format test...\n"<<endl;
+   if (!runTest(kwl_regular2, lutFilter))
+      return -1;
+
+   // Test 5: Heat map tile output using type double input index:
+   cout << "\nTEST 5 --Output of heatmap tile from floating point normalized index data...\n"<<endl;
+   indexBuffer = ossimImageDataFactory::instance()->create(0, OSSIM_FLOAT64, 1, 512, 512);
+   indexBuffer->initialize();
+   for (int y=0; y<512; ++y)
+   {
+      for (int x=0; x<512; ++x)
+      {
+         double distance = sqrt((double) ((x-256)*(x-256) + (y-256)*(y-256)));
+         double d = (256.0 - distance) / 256.0;
+         if (d <= 0)
+            d = 0.0;
+         indexBuffer->setValue(x, y, d);
+      }
+   }
+   indexBuffer->validate();
+
+   ossimRefPtr<ossimMemoryImageSource> idxSource = new ossimMemoryImageSource;
+   idxSource->setImage(indexBuffer);
+
+   ossimRefPtr<ossimImageSourceFilter> lut2Filter = new ossimIndexToRgbLutFilter();
+   lut2Filter->connectMyInputTo(idxSource.get());
+   ossimKeywordlist kwl;
+   kwl.parseString(kwl_regnorm);
+   lut2Filter->loadState(kwl);
+   lut2Filter->initialize();
+   ossimIrect rect (lut2Filter->getBoundingRect());
+
+   ossimRefPtr<ossimImageData> rgbBuffer = lut2Filter->getTile(rect);
+
+   ossimRefPtr<ossimMemoryImageSource> rgbSource = new ossimMemoryImageSource;
+   rgbSource->setImage(rgbBuffer);
+   ossimRefPtr<ossimTiffWriter> writer = new ossimTiffWriter;
+   writer->setFilename(tiffOutFile);
+   writer->connectMyInputTo(0, rgbSource.get());
+   writer->setAreaOfInterest(rect);
+   writer->setGeotiffFlag(false);
+   success = writer->execute();
+   if (success)
+      cout << "Heat map image successfully written."<<endl;
+   else
+      return -1;
+
+   return 0;
+}
diff --git a/ossim/src/test/ossim-info-test.cpp b/ossim/src/test/ossim-info-test.cpp
new file mode 100644
index 0000000..bfe14c2
--- /dev/null
+++ b/ossim/src/test/ossim-info-test.cpp
@@ -0,0 +1,72 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Test application for ossimInfo class.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossim-info-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/util/ossimInfo.h>
+
+#include <iostream>
+using namespace std;
+
+int main(int argc, char *argv[])
+{
+   //---
+   // Get the arg count so we can tell if an arg was consumed by
+   // ossimInit::instance()->initialize
+   //---
+   // int originalArgCount = argc;
+
+   ossimArgumentParser ap(&argc, argv);
+
+   // Initialize ossim stuff, factories, plugin, etc.
+   ossimInit::instance()->initialize(ap);
+
+   if ( ap.argc() == 2 )
+   {
+      try
+      {
+         // Test the ossimInfo::getImageInfo method.
+         ossimRefPtr<ossimInfo> oi = new ossimInfo;
+         ossimFilename file(argv[1]);
+         ossimKeywordlist kwl;
+         oi->getImageInfo(file,
+                          true,  // dump
+                          false, // dno
+                          true,  // image geom
+                          true,  // image info
+                          true,  // metadata
+                          true,  // palette
+                          kwl);
+         cout << kwl << endl;
+      }
+      catch (const ossimException& e)
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
+         return 1;
+      }
+      
+   }  // End: if ( ( ap.argc() == 2 ) ...
+   else
+   {
+      cout << argv[0] << " <image_file>\nTest ossimInfo class..." << endl;
+   }
+   
+   return 0;
+   
+} // End of main...
+
diff --git a/src/test/ossim-jobqueue-test.cpp b/ossim/src/test/ossim-jobqueue-test.cpp
similarity index 100%
rename from src/test/ossim-jobqueue-test.cpp
rename to ossim/src/test/ossim-jobqueue-test.cpp
diff --git a/src/test/ossim-keywordlist-test.cpp b/ossim/src/test/ossim-keywordlist-test.cpp
similarity index 100%
rename from src/test/ossim-keywordlist-test.cpp
rename to ossim/src/test/ossim-keywordlist-test.cpp
diff --git a/ossim/src/test/ossim-least-squares-plane-test.cpp b/ossim/src/test/ossim-least-squares-plane-test.cpp
new file mode 100644
index 0000000..66436d9
--- /dev/null
+++ b/ossim/src/test/ossim-least-squares-plane-test.cpp
@@ -0,0 +1,42 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Burken
+//
+// Description: Test code for generic ossim test.
+//
+// $Id: ossim-least-squares-plane-test.cpp 23148 2015-02-13 16:39:40Z okramer $
+//----------------------------------------------------------------------------
+#include <iostream>
+#include <iomanip>
+using namespace std;
+
+#include <ossim/base/ossimLeastSquaresPlane.h>
+#include <ossim/base/ossimCommon.h>
+//#include <ossim/init/ossimInit.h>
+
+
+int main(int argc, char *argv[])
+{
+   //ossimInit::instance()->initialize(argc, argv);
+
+   ossimLeastSquaresPlane lsp;
+
+   lsp.addSample(0, 0, 4.5);
+   lsp.addSample(1, 0, 5.5);
+   lsp.addSample(0, 1, 7.5);
+   lsp.addSample(1, 1, 7.5);
+   lsp.addSample(-1, 0, 2.5);
+   lsp.addSample(0, -1, 0.5);
+   lsp.addSample(-1, -1, -0.5);
+
+   lsp.solveLS();
+
+   double a, b, c;
+   lsp.getLSParms(a, b, c);
+
+   cout << "\n   a = "<<a<<"\n   b = "<<b<<"\n   c = "<<c<<endl;
+
+   return 0;
+}
diff --git a/ossim/src/test/ossim-loadtile-test.cpp b/ossim/src/test/ossim-loadtile-test.cpp
new file mode 100644
index 0000000..1762f92
--- /dev/null
+++ b/ossim/src/test/ossim-loadtile-test.cpp
@@ -0,0 +1,127 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// File: ossim-foo.cpp
+//
+// Author:  David Burken
+//
+// Description: Test app:
+//
+// 1) Makes a 256x256 tile.  Each line having a single value from 0 to 255.
+// 2) Test ossimImageData::loadTile where source is 16 bit, destination 8 bit.
+// 3) Test histogram.  Should have 256 bins (0 to 255) each with count of 256.
+//
+// Returns 0 on success and outputs PASSED, 1 on failure and outputs FAILED.
+//
+// $Id$
+//----------------------------------------------------------------------------
+
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimHistogram.h>
+#include <ossim/base/ossimMultiBandHistogram.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/imaging/ossimImageData.h>
+#include <ossim/init/ossimInit.h>
+
+#include <iostream>
+using namespace std;
+
+int main( int argc, char* argv[] )
+{
+   enum
+   {
+      PASSED = 0,
+      FAILED = 1
+   };
+
+   int status = PASSED;
+   
+   ossimArgumentParser ap(&argc, argv);
+   ossimInit::instance()->addOptions(ap);
+   ossimInit::instance()->initialize(ap);
+
+   try
+   {
+      ossimIrect rect(0,0,255,255);
+      
+      ossimRefPtr<ossimImageData> srcTile = new ossimImageData(0, OSSIM_UINT16, 1, 256, 256);
+      srcTile->initialize();
+      srcTile->setImageRectangle( rect );
+
+      // Set max for conversion to 8 bit.
+      srcTile->setMaxPix( 255, 0 );
+      ossim_uint16* src = srcTile->getUshortBuf();
+      
+      const ossim_uint32 LINES   = 256;
+      const ossim_uint32 SAMPLES = 256;
+      ossim_uint32 s = 0;
+   
+      // line loop
+      for(ossim_uint32 line = 0; line < LINES; ++line)
+      {
+         // sample loop
+         for(ossim_uint32 samp = 0; samp < SAMPLES; ++samp)
+         {
+            src[samp] = s;
+         }
+         src += SAMPLES;
+         ++s;
+      }
+      
+      ossimRefPtr<ossimImageData> destTile = new ossimImageData(0, OSSIM_UINT8, 1, 256, 256);
+      destTile->initialize();
+      destTile->setImageRectangle( rect );
+      destTile->loadTile( srcTile.get() );
+      destTile->validate();
+
+      ossimRefPtr<ossimMultiBandHistogram> his = new ossimMultiBandHistogram( 1, 256, 0, 255 );
+
+      destTile->populateHistogram( his );
+
+      const ossimRefPtr<ossimHistogram> h = his->getHistogram( 0 );
+      if ( h.valid() )
+      {
+         float count;
+         for( ossim_uint32 i = 0; i < LINES; ++i )
+         {
+            count = h->GetCount( static_cast<float>(i) );
+            if ( count != 256.0 )
+            {
+               status = FAILED;
+ 
+               cerr << "bin[254]: " << h->GetCount( 254.0)
+                    << "\nbin[" << i << "]: count = " << count
+                    << "\nShould be 256..."
+                    << "\nhistogram bin count: " << h->GetRes()
+                    << endl;
+
+               const ossim_uint8* buf = destTile->getUcharBuf();
+               if ( buf )
+               {
+                  cerr << "tile buffer index(255, 255) = "
+                       << (int)buf[65535] << endl;
+               }
+
+               break;
+            }
+         }
+      }
+      else
+      {
+         status = FAILED;
+      }
+   }
+   catch (const ossimException& e)
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
+      status = FAILED;
+   }
+
+   cout << "ossim-loadtile-test: " << (status == PASSED ? "PASSED" : "FAILED")  << endl;
+   return status;
+}
diff --git a/src/test/ossim-lsr-space-test.cpp b/ossim/src/test/ossim-lsr-space-test.cpp
similarity index 100%
rename from src/test/ossim-lsr-space-test.cpp
rename to ossim/src/test/ossim-lsr-space-test.cpp
diff --git a/ossim/src/test/ossim-mask-filter-test.cpp b/ossim/src/test/ossim-mask-filter-test.cpp
new file mode 100644
index 0000000..a44dd78
--- /dev/null
+++ b/ossim/src/test/ossim-mask-filter-test.cpp
@@ -0,0 +1,182 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// File: ossim-mask-filter-test.cpp
+//
+// Author:  David Burken
+//
+// Description: Test application for ossimMaskFilter.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossim-mask-filter-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <iostream>
+using namespace std;
+
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimTimer.h>
+#include <ossim/base/ossimViewInterface.h>
+#include <ossim/imaging/ossimImageFileWriter.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimMaskFilter.h>
+#include <ossim/imaging/ossimSingleImageChain.h>
+#include <ossim/imaging/ossimTiffWriter.h>
+#include <ossim/init/ossimInit.h>
+
+int main(int argc, char* argv[])
+{
+   ossimTimer::instance()->setStartTick();
+   
+   ossimInit::instance()->initialize(argc, argv);
+
+   if (argc != 6)
+   {
+      cout << argv[0] << " <mask_type> <resample_flag> <image_file> <shape_file> <output_file>"
+           << "\nCombines image and shape files with mask filter and writes "
+           << "result to output file.\n"
+           << "valid mask_types:\n"
+           << "1 = OSSIM_MASK_TYPE_SELECT\n"
+           << "2 = OSSIM_MASK_TYPE_INVERT\n"
+           << "3 = OSSIM_MASK_TYPE_WEIGHTED\n"
+           << "4 = OSSIM_MASK_TYPE_BINARY\n"
+           << "5 = OSSIM_MASK_TYPE_BINARY_INVERSE\n"
+           << "resample_flag if true the output will be rendered to a geographic projection.\n"
+           << "output_file is a mask of image and shape.\n"
+           << endl;
+      return 0;
+   }
+
+
+   int i = atoi(argv[1]);
+   if ( (i < 1) || (i > 5) )
+   {
+      cerr << "mask type out of range!" << endl;
+      return 1;
+   }
+   ossimMaskFilter::ossimFileSelectionMaskType mask_type =
+      static_cast<ossimMaskFilter::ossimFileSelectionMaskType>(i);
+   i = atoi(argv[2]);
+   bool resample_flag = (i?true:false);
+   ossimFilename inputImgName = ossimFilename(argv[3]);
+   ossimFilename inputShpName = ossimFilename(argv[4]);
+   ossimFilename outputFile  = ossimFilename(argv[5]);
+
+   cout << "ossim-mask-filter-test:"
+        << "\nmask_type:     " << mask_type
+        << "\nresample_flag: " << resample_flag
+        << "\ninputImgName:  " << inputImgName
+        << "\ninputShpName:  " << inputShpName
+        << "\noutputFile:    " << outputFile
+        << endl;
+
+   //---
+   // Test masking shape and image:
+   //---
+   ossimRefPtr<ossimImageSource> inputImg = 0;
+   if ( !resample_flag )
+   {
+      inputImg = ossimImageHandlerRegistry::instance()->open(inputImgName);
+   }
+   else
+   {
+      ossimRefPtr<ossimSingleImageChain> sic = new ossimSingleImageChain();
+      if ( sic->open( inputImgName ) )
+      {
+         // Render the image chain.
+         sic->createRenderedChain();
+         inputImg = sic.get();
+      }
+      else
+      {
+         sic = 0;
+      }
+   }
+   if ( inputImg.valid() == false )
+   {
+      cout << "Could not open: " << inputImgName  << endl;
+      return 1;
+   }
+         
+   ossimRefPtr<ossimImageHandler> inputShp =
+      ossimImageHandlerRegistry::instance()->open(inputShpName);
+   if ( inputShp.valid() )
+   {
+      if ( inputShp->getClassName() == "ossimOgrGdalTileSource" )
+      {
+         ossimViewInterface* shpView = PTR_CAST(ossimViewInterface, inputShp.get());
+         if (shpView)
+         {
+            //---
+            // Test masking image handler and shape file.
+            //---
+            
+            // Set the shape reader's view to that of the image's.
+            shpView->setView(inputImg->getImageGeometry().get());
+            
+            // Turn fill on...
+            ossimRefPtr<ossimProperty> fillProp =
+               new ossimStringProperty(ossimString("fill_flag"),
+                                       ossimString("1"));
+            inputShp->setProperty(fillProp);
+            
+            
+            ossimRefPtr<ossimMaskFilter> maskFlt = new ossimMaskFilter();
+            maskFlt->setMaskType(mask_type);
+            maskFlt->connectMyInputTo( 0, inputImg.get() );
+            // maskFlt->connectMyInputTo(1, inputShp.get());
+            maskFlt->setMaskSource( inputShp.get() );
+            maskFlt->initialize();
+            
+            ossimRefPtr<ossimImageFileWriter> writer =
+               ossimImageWriterFactoryRegistry::instance()->
+               createWriterFromExtension(outputFile.ext());
+            
+            if ( writer->open( outputFile ) )
+            {
+               // Add a listener to get percent complete.
+               ossimStdOutProgress prog(0, true);
+               writer->addListener(&prog);
+               
+               writer->connectMyInputTo(0, maskFlt.get());
+               
+               // Set the cut rect to the input image.
+               writer->setAreaOfInterest(inputImg->getBoundingRect());
+               
+               writer->execute();
+               
+               cout << "Wrote file: " << outputFile
+                    << "\nElapsed time(seconds): "
+                    << ossimTimer::instance()->time_s() << "\n";
+            }
+            else
+            {
+               cout << "Could not open: " << argv[3] << endl;
+            }
+         }
+         else
+         {
+            cerr << "Could not get view interface..." << endl;
+         }
+      }
+      else
+      {
+         cerr << "2nd argument must be a shape file." << endl;
+      }
+   }
+   else
+   {
+      cerr << "Could not open: " << inputShpName << endl;
+   }
+
+   return 0;
+}
+
diff --git a/ossim/src/test/ossim-nitf-rsm-model-test.cpp b/ossim/src/test/ossim-nitf-rsm-model-test.cpp
new file mode 100644
index 0000000..bd26341
--- /dev/null
+++ b/ossim/src/test/ossim-nitf-rsm-model-test.cpp
@@ -0,0 +1,513 @@
+//---
+// File: ossim-nitf-rsm-model-test.cpp
+//
+// Description: Test app for ossimNitfRsmModel class.
+// 
+//---
+
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/projection/ossimNitfRsmModel.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/projection/ossimRsmModel.h>
+#include <ossim/support_data/ossimNitfRegisteredTag.h>
+#include <ossim/support_data/ossimNitfRsmecaTag.h>
+#include <ossim/support_data/ossimNitfRsmidaTag.h>
+#include <ossim/support_data/ossimNitfRsmpcaTag.h>
+#include <ossim/support_data/ossimNitfRsmpiaTag.h>
+#include <ossim/support_data/ossimNitfTagFactoryRegistry.h>
+
+#include <fstream>
+#include <iomanip>
+#include <iostream>
+#include <string>
+#include <vector>
+
+using namespace std;
+
+static ossimRefPtr<ossimNitfRegisteredTag> getTag( const std::string& tagLine );
+static ossimRefPtr<ossimNitfRsmModel> getModel( const ossimFilename& file );
+static ossimRefPtr<ossimNitfRsmModel> getModelFromExtFile( const ossimFilename& file );
+static ossimRefPtr<ossimNitfRsmModel> getModelFromImage( const ossimFilename& file );
+static void testGpts( ossimRefPtr<ossimNitfRsmModel>& model, const ossimKeywordlist& kwl );
+static void testIpts( ossimRefPtr<ossimNitfRsmModel>& model, const ossimKeywordlist& kwl );
+
+int main(int argc, char *argv[])
+{
+   ossimInit::instance()->initialize(argc, argv);
+
+   if ( argc == 3 )
+   {
+      ossimFilename file = argv[1];
+      ossimKeywordlist kwl;
+      if ( kwl.addFile( argv[2] ) )
+      {
+         ossimString ext = file.ext();
+         
+         ossimRefPtr<ossimNitfRsmModel> model = getModel( file );
+         if ( model.valid() )
+         {
+            testGpts( model, kwl );
+            testIpts( model, kwl );
+         }
+         else
+         {
+            cerr << "Could not create model!" << endl;
+         }
+      }
+      else
+      {
+         cerr << "Could not open keyword list: " << argv[2] << endl;
+      }  
+   }
+   else
+   {
+      cout << "\n" << argv[0] << " <input-test-file> <options.kwl>"
+           << "\ninput-test-file can be an input test file or a test.ext file.\n"
+           << "\nPrints out debug info for model testing.."
+           << "\ngpts test:"
+           << "\nmodel->worldToLineSample(...), model->lineSampleToWorld(...)"
+           << "\nipts test:"
+           << "\nmodel->lineSampleHeightToWorld(...), model->worldToLineSample(...)"
+           << "\noptions.kwl format example:\n"
+
+           << "\ngtest_id0: E123456\n"
+           << "gtest_gpt0: ( lat, lon, hgt )\n"
+
+           << "gtest_gpt_id1: E123457\n"
+           << "gtest_gpt1: ( lat, lon, hgt )\n"
+
+           << "ggtest_pt_id2: E123458\n"
+           << "gtest_gpt2: ( lat, lon, hgt )\n"
+
+           << "gtest_gpt_id3: E123459\n"
+           << "gtest_gpt3: ( lat, lon, hgt )\n"
+
+           << "gtest_gpt_id4: E123459\n"
+           << "gtest_pt4: ( lat, lon, hgt )\n"
+
+           << "\nitest_height_units: feet\n"
+         
+           << "itest_id0: E123456\n"
+           << "itest_ipt0: ( sample, line )\n"
+           << "itest_hgt0: hgt\n"
+         
+           << "itest_id1: E123457\n"
+           << "itest_ipt1: ( x, y )\n"
+           << "itest_hgt1: hgt\n"
+
+           << "itest_id2: E123458\n"
+           << "itest_ipt2: ( x, y )\n"
+           << "itest_hgt2: hgt\n"
+
+           << "itest_id3: E123459\n"
+           << "itest_ipt3: ( x, y )\n"
+           << "itest_hgt3: hgt\n"
+
+           << "itest_id4: E123459\n"
+           << "itest_ipt4: ( x, y )\n"
+           << "itest_hgt4: hgt\n"
+
+           << "\nNotes:\n"
+           << "* itest_hgt default = meters if units not specified.\n"
+           << "* gpt0: ( lat, lon, hgt ) \"hgt\" is in meters.\n"
+           << "* All test height output is in meters.\n"
+           << "* \"rtd\"=round trip delta.\n"
+           << endl;
+   }
+
+   return 0;
+}
+
+
+ossimRefPtr<ossimNitfRegisteredTag> getTag( const std::string& tagLine )
+{
+   ossimRefPtr<ossimNitfRegisteredTag> result = 0;
+
+   if ( tagLine.size() > 6 )
+   {
+      ossimString tagName = tagLine.substr(0, 6);
+      result = ossimNitfTagFactoryRegistry::instance()->create( tagName );
+      if ( result.valid() )
+      {
+         cout << "tag_name: " << tagName << "\n";
+         
+         istringstream is( tagLine );
+         if ( is.good() )
+         {
+            is.seekg( 6 );
+            char tagLength[6];
+            tagLength[5] = '\0';
+            is.read( tagLength, 5 );
+            cout << "tag_length: " << tagLength << "\n";
+            result->parseStream( is );
+
+            result->print( cout, std::string("") );
+         }
+      }
+      else
+      {
+         cerr << "unhandled_tag: " << tagName << endl;
+      }
+   }
+   return result;
+}
+
+ossimRefPtr<ossimNitfRsmModel> getModel( const ossimFilename& file )
+{
+   ossimRefPtr<ossimNitfRsmModel> result = 0;
+   if ( file.size() )
+   {
+      // Get downcased extension:
+      std::string ext = file.ext().downcase().string();
+      
+      if ( ext == "ext" )
+      {
+         result = getModelFromExtFile( file );
+      }
+      else if ( ( ext == "ntf" ) || ( ext == "nitf" ) )
+      {
+         result = getModelFromImage( file );
+      }
+   }
+   return result;
+}
+
+ossimRefPtr<ossimNitfRsmModel> getModelFromExtFile( const ossimFilename& file )
+{
+   ossimRefPtr<ossimNitfRsmModel> result = 0;
+
+   // Test file with newline separated nitf tags only.
+   ifstream is( file.c_str() );
+   if ( is.good() )
+   {
+      const std::string RSMECA_TAG = "RSMECA";
+      const std::string RSMIDA_TAG = "RSMIDA";
+      const std::string RSMPCA_TAG = "RSMPCA";
+      const std::string RSMPIA_TAG = "RSMPIA";
+      
+      ossimRefPtr<ossimNitfRsmecaTag> rsmecaTag = 0;
+      ossimRefPtr<ossimNitfRsmidaTag> rsmidaTag = 0;
+      ossimRefPtr<ossimNitfRsmpcaTag> rsmpcaTag = 0; 
+      ossimRefPtr<ossimNitfRsmpiaTag> rsmpiaTag = 0;        
+      std::vector< ossimRefPtr<ossimNitfRegisteredTag> > tags;
+      
+      while ( is.good() )
+      {
+         string tagLine;
+         std::getline( is, tagLine );
+         
+         ossimRefPtr<ossimNitfRegisteredTag> tag = getTag( tagLine );
+         if ( tag.valid() )
+         {
+            tags.push_back( tag );
+            if ( tag->getTagName() ==  RSMECA_TAG )
+            {
+               rsmecaTag = dynamic_cast<ossimNitfRsmecaTag*>( tag.get() );
+            }
+            else if ( tag->getTagName() == RSMIDA_TAG )
+            {
+               rsmidaTag = dynamic_cast<ossimNitfRsmidaTag*>( tag.get() );
+            }
+            else if ( tag->getTagName() == RSMPCA_TAG )
+            {
+               rsmpcaTag = dynamic_cast<ossimNitfRsmpcaTag*>( tag.get() );
+            }
+            else if ( tag->getTagName() == RSMPIA_TAG )
+            {
+               rsmpiaTag = dynamic_cast<ossimNitfRsmpiaTag*>( tag.get() );
+            }
+         }
+      }
+      
+      if ( rsmecaTag.valid() && rsmidaTag.valid() &&
+           rsmpcaTag.valid() && rsmpiaTag.valid() )
+      {
+         result = new ossimNitfRsmModel();
+         if ( result->initializeModel( rsmecaTag.get() ) )
+         {
+            if ( result->initializeModel( rsmidaTag.get() ) )
+            {
+               if ( result->initializeModel( rsmpcaTag.get() ) )
+               {
+                  if ( result->initializeModel( rsmpiaTag.get() ) )
+                  {
+                     cout << "Initialize from ext file success!" << endl;
+                  }
+                  else
+                  {
+                     result = 0;
+                     cerr << "ossimNitfRsmModel::initializeModel(" << RSMPIA_TAG
+                          << ") failed!" << endl;
+                  }
+               }
+               else
+               {
+                  result = 0;
+                  cerr << "ossimNitfRsmModel::initializeModel(" << RSMPCA_TAG
+                       << ") failed!" << endl;
+               }
+            }
+            else
+            {
+               result = 0;
+               cerr << "ossimNitfRsmModel::initializeModel(" << RSMIDA_TAG
+                    << ") failed!" << endl;
+            }
+         }
+         else
+         {
+            result = 0;
+            cerr << "ossimNitfRsmModel::initializeModel(" << RSMECA_TAG
+                 << ") failed!" << endl;
+         }
+      }
+      else
+      {
+         // At least one RSM tag was not found.
+         if ( rsmecaTag.valid() == false )
+         {
+            cerr << RSMECA_TAG << " not found!" << endl;
+         }
+         if ( rsmidaTag.valid() == false )
+         {
+            cerr << RSMIDA_TAG << " not found!" << endl;
+         }
+         if ( rsmpcaTag.valid() == false )
+         {
+            cerr << RSMPCA_TAG << " not found!" << endl;
+         }
+         if ( rsmpiaTag.valid() == false )
+         {
+            cerr << RSMPIA_TAG << " not found!" << endl;
+         }
+      }
+   }
+   else
+   {
+      cerr << "Could not open: " << file << endl;
+   }
+         
+   return result;
+   
+} // End: getModelFromExtFile(...)
+
+
+ossimRefPtr<ossimNitfRsmModel> getModelFromImage( const ossimFilename& file )
+{
+   ossimRefPtr<ossimNitfRsmModel> result = 0;
+
+   ossimRefPtr<ossimImageHandler> ih =
+      ossimImageHandlerRegistry::instance()->open(file,
+                                                  true,   // try suffix first
+                                                  false); // open overview
+   if ( ih.valid() )
+   {
+      ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
+      if ( geom.valid() )
+      {
+         ossimRefPtr<ossimProjection> proj = geom->getProjection();
+         if ( proj.valid() )
+         {
+            result = dynamic_cast<ossimNitfRsmModel*>( proj.get() );
+         }
+      }
+   }
+   
+   return result;  
+}
+
+void testGpts( ossimRefPtr<ossimNitfRsmModel>& model, const ossimKeywordlist& kwl )
+{
+   if ( model.valid() )
+   {
+      cout << std::setfill(' ') << setiosflags(ios::left);
+      
+      const std::string  ID_KW  = "gtest_id";
+      const std::string  GPT_KW = "gtest_gpt";
+      const ossim_uint32 POINTS = kwl.numberOf( ID_KW.c_str() );
+      
+      cout << "\ngtest begin ********************************\n\n"
+           << "number_of_points_world_points: " << POINTS << "\n";
+      
+      ossim_uint32 foundPts = 0;
+      ossim_uint32 i = 0;
+      
+      std::string key;
+      std::string value;
+      
+      while ( foundPts < POINTS )
+      {
+         // ID:
+         key = ID_KW + ossimString::toString( i ).string();
+         value = kwl.findKey( key );
+         if ( value.size() )
+         {
+            cout << "gtest_id" << std::setw(6) << i << ":  " << value << "\n";
+         }
+      
+         // World point :
+         key = GPT_KW + ossimString::toString( i ).string();
+         value = kwl.findKey( key );
+      
+         if ( value.size() )
+         {
+            ossimDpt ipt; // image point
+            ossimGpt wpt; // world point
+            ossimGpt rtp; // round trip point
+            ossimDpt rtd; // round trip delta;
+         
+            wpt.toPoint( value );
+
+            cout << "gtest_gpt" << std::setw(5) << i << ":  " << wpt << "\n";
+
+            model->worldToLineSample( wpt, ipt );
+
+            if ( wpt.hasNans() == false )
+            {
+               model->lineSampleHeightToWorld( ipt, wpt.hgt, rtp );
+            
+               rtd.x = wpt.lon - rtp.lon;
+               rtd.y = wpt.lat - rtp.lat;
+            
+               cout << "gtest_ipt" << std::setw(5) << i << ":  " << ipt << "\n"
+                    << "gtest_rtp" << std::setw(5) << i << ":  " << rtp << "\n"
+                    << "gtest_rtd" << std::setw(5) << i << ":  " << rtd << "\n\n";  
+            }
+            else
+            {
+               cerr << "model->worldToLineSample(...) result has nans!\n"
+                    << wpt << endl;
+            }
+         
+            ++foundPts;
+         }
+      
+         ++i;
+      
+         if ( i > POINTS+100 )
+         {
+            break;
+         }
+      }
+
+      cout << "\ngtest end **********************************\n\n";
+   }
+   
+} // End: testGpts
+
+void testIpts( ossimRefPtr<ossimNitfRsmModel>& model, const ossimKeywordlist& kwl )
+{
+   if ( model.valid() )
+   {
+      cout << std::setfill(' ') << setiosflags(ios::left);
+
+      const std::string  ID_KW      = "itest_id";
+      const std::string  IPT_KW     = "itest_ipt";
+      const std::string  IPT_HGT_KW = "itest_hgt";
+      const ossim_uint32 POINTS     = kwl.numberOf( ID_KW.c_str() );
+   
+      // Test data height values can be in feet.
+      ossimUnitType heightUnits = OSSIM_METERS;
+      std::string key = "itest_height_units";
+      std::string value = kwl.findKey( key );
+      if ( value.size() )
+      {
+         cout << key << ": " << value << "\n";
+         if ( value == "feet" )
+         {
+            heightUnits = OSSIM_FEET;
+         }
+      }
+      cout << "\nitest begin ********************************\n\n"
+           << "number_of_line_sample_points: " << POINTS << "\n";
+      
+      ossim_uint32 foundPts = 0;
+      ossim_uint32 i = 0;
+
+      while ( foundPts < POINTS )
+      {
+         // ID:
+         key = ID_KW + ossimString::toString( i ).string();
+         value = kwl.findKey( key );
+         if ( value.size() )
+         {
+            cout << "itest_id" << std::setw(6) << i << ":  " << value << "\n";
+         }
+      
+         // Image point, sample, line:
+         key = IPT_KW + ossimString::toString( i ).string();
+         value = kwl.findKey( key );
+      
+         if ( value.size() )
+         {
+            ossimDpt ipt; // image point
+            ossimGpt wpt; // world point
+            ossimDpt rtp; // round trip point
+            ossimDpt rtd; // round trip delta;
+         
+            ipt.toPoint( value );
+         
+            cout << "itest_ipt" << std::setw(5) << i << ":  " << value << "\n";
+         
+            // Get the height above ellipsoid:
+            ossim_float64 hgt = 0.0;
+            key = IPT_HGT_KW + ossimString::toString( i ).string();
+            value = kwl.findKey( key );
+            if ( value.size() )
+            {
+               ossimString os ( value );
+               hgt = os.toFloat64();
+            
+               if ( heightUnits == OSSIM_FEET )
+               {
+                  hgt *= MTRS_PER_FT;
+               }
+            }
+            else
+            {
+               cerr << "missing height above ellipsoid for point!  Using 0.0."
+                    << endl;
+            }
+         
+            cout << "itest_hgt" << std::setw(5) << i << ":  " << value << "\n";
+         
+            model->lineSampleHeightToWorld( ipt, hgt, wpt );
+            if ( wpt.hasNans() == false )
+            {
+               model->worldToLineSample( wpt, rtp );
+            
+               rtd = ipt - rtp;
+            
+               cout << "itest_wpt" << std::setw(5) << i << ":  " << wpt << "\n"
+                    << "itest_rtp" << std::setw(5) << i << ":  " << rtp << "\n"
+                    << "itest_rtd" << std::setw(5) << i << ":  " << rtd << "\n\n";
+            }
+            else
+            {
+               cerr << "model->worldToLineSample(...) result has nans!\n"
+                    << wpt << endl;
+            }
+         
+            ++foundPts;
+         }
+      
+         ++i;
+      
+         if ( i > POINTS+100 )
+         {
+            break;
+         }
+      }
+
+      cout << "\ntestIpts end **********************************\n\n";
+   }
+   
+} // End: testIpts
diff --git a/ossim/src/test/ossim-notify-test.cpp b/ossim/src/test/ossim-notify-test.cpp
new file mode 100644
index 0000000..b6289b7
--- /dev/null
+++ b/ossim/src/test/ossim-notify-test.cpp
@@ -0,0 +1,52 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// ossimNotify functions test.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossim-notify-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <iostream>
+using namespace std;
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimNotify.h>
+
+int main(int argc, char *argv[])
+{
+   ossimInit::instance()->initialize(argc, argv);
+
+   ossimFilename logFile;
+   ossimGetLogFilename(logFile);
+
+   cout << "log file after ossimInit::instance()->initialize: "
+        << logFile << endl;
+
+   if (logFile.size() == 0)
+   {
+      logFile = "/tmp/ossim-log.txt";
+      ossimSetLogFilename(logFile);
+   }
+
+   ossimGetLogFilename(logFile);
+
+   cout << "set logFile end of test: " << logFile << endl;
+
+   // ossimSetError was hanging:
+   cout << "Calling ossimSetError(...) ..." << endl;
+   ossimSetError( ossimString("ossimTiffOverviewBuilder"),
+                 ossimErrorCodes::OSSIM_WRITE_FILE_ERROR,
+                 "%s file %s line %d\nError creating reduced res set!",
+                 "MODULE",
+                 __FILE__,
+                 __LINE__);
+   cout << "ossimSetError(...) returned..." << endl;
+   
+   return 0;
+}
+
diff --git a/ossim/src/test/ossim-obj-allocate.cpp b/ossim/src/test/ossim-obj-allocate.cpp
new file mode 100644
index 0000000..750869e
--- /dev/null
+++ b/ossim/src/test/ossim-obj-allocate.cpp
@@ -0,0 +1,75 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// File: ossim-foo.cpp
+//
+// Author:  David Burken
+//
+// Description: Contains application definition "ossim-foo" app.
+//
+// NOTE:  This is supplied for simple quick test. DO NOT checkin your test to
+//        the svn repository.  Simply edit ossim-foo.cpp and run your test.
+//        After completion you can do a "svn revert foo.cpp" if you want to
+//        keep your working repository up to snuff.
+//
+// $Id: ossim-foo.cpp 20095 2011-09-14 14:37:26Z dburken $
+//----------------------------------------------------------------------------
+
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimConstants.h>  // ossim contants...
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+// Put your includes here:
+
+#include <iostream>
+#include <sstream>
+using namespace std;
+static void usage()
+{
+   cout << "ossim-obj-allocate <kwl file>" << endl;
+}
+
+int main(int argc, char *argv[])
+{
+   ossimArgumentParser ap(&argc, argv);
+   ossimInit::instance()->addOptions(ap);
+   ossimInit::instance()->initialize(ap);
+
+   try
+   {
+   	if(argc == 1)
+   	{
+   		usage();
+   		return 0;
+   	} 
+		ossimKeywordlist kwl;
+
+		if(!kwl.addFile(argv[1]))
+		{
+			std::cout << "FILE '" << argv[1] << "' is not a keywordlist with a type: keyword\n"; 
+		}
+		ossimRefPtr<ossimObject> obj = ossimObjectFactoryRegistry::instance()->createObject(kwl);
+		ossimKeywordlist kwl2;
+		if(obj.valid())
+		{
+			obj->saveState(kwl2);
+			std::cout << kwl2 << std::endl;
+		}
+		else
+		{
+			std::cout << "Unable to allocate object with passed in keywordlist file\n";
+		}
+	      // Put your code here.
+	}
+   catch (const ossimException& e)
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
+      return 1;
+   }
+
+   return 0;
+}
\ No newline at end of file
diff --git a/ossim/src/test/ossim-piecewise-remapper-test.cpp b/ossim/src/test/ossim-piecewise-remapper-test.cpp
new file mode 100644
index 0000000..3560428
--- /dev/null
+++ b/ossim/src/test/ossim-piecewise-remapper-test.cpp
@@ -0,0 +1,257 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Test application for ossimPiecewiseRemapper class.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossim-single-image-chain-test.cpp 21631 2012-09-06 18:10:55Z dburken $
+
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimTimer.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageRenderer.h>
+#include <ossim/imaging/ossimPiecewiseRemapper.h>
+#include <ossim/imaging/ossimSingleImageChain.h>
+#include <ossim/imaging/ossimTiffWriter.h>
+#include <ossim/init/ossimInit.h>
+#include <iomanip>
+#include <iostream>
+using namespace std;
+
+int main(int argc, char* argv[])
+{
+   ossimTimer::instance()->setStartTick();
+   
+   ossimInit::instance()->initialize(argc, argv);
+
+   ossimTimer::Timer_t t1 = ossimTimer::instance()->tick();
+   
+   cout << "elapsed time after initialize(ms): "
+        << std::setiosflags(ios::fixed)
+        << std::setprecision(3)
+        << ossimTimer::instance()->time_s() << "\n";
+
+   if (argc < 2)
+   {
+      cout << argv[0] << "<image_file> <optional_output_file>"
+           << "\nOpens up single image chain and dumps the state to keyword"
+           << " list." << endl;
+      return 0;
+   }
+
+   ossimRefPtr<ossimSingleImageChain> sic1 = new ossimSingleImageChain();
+   if ( sic1->open( ossimFilename(argv[1]) ) )
+   {
+      cout << "Opened: " << argv[1] << endl;
+      
+      ossimRefPtr<ossimPiecewiseRemapper> pwr = new ossimPiecewiseRemapper();
+
+      // Add to the end of the chain. So it's image_handler->piecewise_remapper.
+      sic1->addFirst( pwr.get() );
+
+      ossimKeywordlist kwl;
+      std::string key;
+      std::string val;
+      
+      key = "number_bands";
+      val = "1";
+      kwl.addPair(key, val);
+
+      key = "remap_type";
+      val = "linear_native";
+      kwl.addPair(key, val);
+
+      // ((<min_in> <max_in> <min_out> <max_out>),(<min_in> <max_in> <min_out> <max_out>))
+      key = "band0.remap0";
+      val = "((0, 127, 0, 127), (128, 255, 128, 382))";
+      kwl.addPair(key, val);
+      key = "band0.remap1";
+      val = "((0, 382, 0, 255))";
+      kwl.addPair(key, val);
+
+      key = "scalar_type";
+      val = "OSSIM_UINT8";
+      kwl.addPair(key, val);
+
+      key = "type";
+      val = "ossimPiecewiseRemapper";
+      kwl.addPair(key, val);
+
+      cout << "kwl:\n" << kwl << "\n";
+
+      pwr->loadState( kwl, 0 );
+      // pwr->initialize();
+
+      // sic1->addScalarRemapper();
+      sic1->addCache();
+
+      sic1->initialize();
+      
+      // Set up chain:
+      if ( sic1->getImageHandler()->getNumberOfOutputBands() == 4 )
+      {
+         // Just guessing...
+         // sic1->setThreeBandReverseFlag(true);
+      }
+               
+      // Always have resampler cache.
+      // sic1->setAddResamplerCacheFlag(true);
+
+      // Histogram:
+      // sic1->setAddHistogramFlag(true);
+
+      // sic1->createRenderedChain();
+
+      kwl.clear();
+      sic1->saveState(kwl, 0);
+
+      cout << "sic1 state: " << kwl << endl;
+   }
+
+   if (argc == 3)
+   {
+      // Write image:
+      ossimRefPtr<ossimImageFileWriter> writer = new ossimTiffWriter();
+      if ( writer->open( ossimFilename(argv[2]) ) )
+      {
+         cout << "Outputting file: " << ossimFilename(argv[2]) << endl;
+         
+         // Add a listener to get percent complete.
+         ossimStdOutProgress prog(0, true);
+         writer->addListener(&prog);
+         
+         writer->connectMyInputTo(0, sic1.get());
+         writer->execute();
+         ossimTimer::Timer_t t2 = ossimTimer::instance()->tick();
+         cout << "elapsed time after write(ms): "
+              << std::setiosflags(ios::fixed)
+              << std::setprecision(3)
+              << ossimTimer::instance()->time_s() << "\n";
+         
+         cout << "write time minus initialize: "
+              << std::setiosflags(ios::fixed)
+              << std::setprecision(3)
+              << ossimTimer::instance()->delta_s(t1, t2) << "\n";
+      }
+   }
+
+   return 0;
+}
+
+#if 0
+      // Histogram stretch:
+      if ( sic1->openHistogram(ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX) == false )
+      {
+         cout << "Could not do histogram stretch!" << endl;
+      }
+      
+      if (argc == 3)
+      {
+         // Write image:
+         ossimRefPtr<ossimImageFileWriter> writer = new ossimTiffWriter();
+         if ( writer->open( ossimFilename(argv[2]) ) )
+         {
+            cout << "Outputting file: " << ossimFilename(argv[2]) << endl;
+            
+            // Add a listener to get percent complete.
+            ossimStdOutProgress prog(0, true);
+            writer->addListener(&prog);
+
+            writer->connectMyInputTo(0, sic1.get());
+            writer->execute();
+            ossimTimer::Timer_t t2 = ossimTimer::instance()->tick();
+            cout << "elapsed time after write(ms): "
+                 << std::setiosflags(ios::fixed)
+                 << std::setprecision(3)
+                 << ossimTimer::instance()->time_s() << "\n";
+
+            cout << "write time minus initialize: "
+                 << std::setiosflags(ios::fixed)
+                 << std::setprecision(3)
+                 << ossimTimer::instance()->delta_s(t1, t2) << "\n";
+         }
+      }
+#endif
+
+#if 0 
+      ossimRefPtr<ossimImageGeometry> geom = sic1->getImageGeometry();
+      if (geom.valid())
+      {
+         geom->print(cout);
+      }
+
+      // Test the load state.
+      // ossimKeywordlist kwl;
+      kwl.clear();
+      sic1->saveState(kwl, 0);
+
+      ossimSingleImageChain* sic2 = new ossimSingleImageChain();
+      sic2->loadState(kwl, 0);
+
+      kwl.clear();
+      sic2->saveState(kwl, 0);
+
+      cout << "\n\nSingle image chain from load state kwl\n" << kwl;
+   }
+
+#endif
+
+#if 0
+
+   // Create a normal chain.
+   sic1 = new ossimSingleImageChain(true,  // addHistogramFlag
+                                    true,  // addResamplerCacheFlag
+                                    true,  // addChainCacheFlag
+                                    false, // remapToEightBitFlag
+                                    false, // threeBandFlag
+                                    false); // threeBandReverseFlag
+   
+   if ( sic1->open( ossimFilename(argv[1]) ) )
+   {
+      sic1->createRenderedChain();
+      ossimKeywordlist kwl;
+      sic1->saveState(kwl, 0);
+      cout << "\n\nNormal single image chain kwl\n" << kwl;
+   }
+
+   // Create a stripped down chain.
+   sic1 = new ossimSingleImageChain();
+   if ( sic1->open( ossimFilename(argv[1]) ) )
+   {
+      sic1->createRenderedChain();
+      ossimKeywordlist kwl;
+      sic1->saveState(kwl, 0);
+      cout << "\n\nSingle image chain stripped down kwl\n" << kwl;
+   }
+
+   // Create a rgb reversed chain.
+   sic1 = new ossimSingleImageChain();
+   if ( sic1->open( ossimFilename(argv[1]) ) )
+   {
+      sic1->setThreeBandReverseFlag(true);
+      sic1->createRenderedChain();
+      ossimKeywordlist kwl;
+      sic1->saveState(kwl, 0);
+      cout << "\n\nSingle image chain rgb reversed kwl\n" << kwl;
+   }
+
+   cout << "constness test:\n";
+   ossimRefPtr<const ossimSingleImageChain> consSic = sic1.get();
+   ossimRefPtr<const ossimImageHandler> ihConst =  consSic->getImageHandler().get();
+   cout << "image handler bands: " << ihConst->getNumberOfOutputBands() << endl;
+
+
+   
+   return 0;
+}
+#endif
+
diff --git a/src/test/ossim-pixel-flipper-test.cpp b/ossim/src/test/ossim-pixel-flipper-test.cpp
similarity index 100%
rename from src/test/ossim-pixel-flipper-test.cpp
rename to ossim/src/test/ossim-pixel-flipper-test.cpp
diff --git a/ossim/src/test/ossim-point-cloud-handler-test.cpp b/ossim/src/test/ossim-point-cloud-handler-test.cpp
new file mode 100644
index 0000000..42617b0
--- /dev/null
+++ b/ossim/src/test/ossim-point-cloud-handler-test.cpp
@@ -0,0 +1,93 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Oscar Kramer
+//
+// Description: Unit test application for WKT Projection Factory.
+//
+// $Id$
+//----------------------------------------------------------------------------
+
+#include <vector>
+#include <iostream>
+#include <fstream>
+#include <cassert>
+
+using namespace std;
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/point_cloud/ossimPointCloudHandlerRegistry.h>
+#include <ossim/point_cloud/ossimPointCloudHandler.h>
+#include <ossim/point_cloud/ossimPointRecord.h>
+
+
+int main(int argc, char* argv[])
+{
+   cout << "ossim-point-cloud-handler Test:" << endl;
+   ossimInit::instance()->initialize(argc, argv);
+
+   if (argc < 2)
+   {
+      cout  << "Missing input point-cloud data file name.\n"
+            << "Usage: " << argv[0] << " <filename.las> [<output.dat>]" << endl;
+      return -1;
+   }
+   ossimFilename fname (argv[1]);
+
+   bool genDatFile = false;
+   ofstream outStream;
+   if (argc > 2)
+   {
+      outStream.open(argv[2]);
+      genDatFile = true;
+   }
+
+   cout << "  Testing open() via factory registry... "; cout.flush();
+   ossimPointCloudHandlerRegistry* factory = ossimPointCloudHandlerRegistry::instance();
+   ossimPointCloudHandler* handler = factory->open(fname);
+   assert(handler);
+   cout << "  Passed.\n";
+
+   cout << "  Testing getPoints()... "<<endl;
+   const ossim_uint32 BLOCK_SIZE = 1024; // Read the points from the file in 1024-point blocks:
+   ossim_uint32 offset=0;
+   int blockNum = 0;
+   ossimGpt position;
+   ossimPointBlock points;
+   while (1)
+   {
+      // Fetch block of points:
+      cout << "  ... Fetching block at offset = " << offset<<endl;
+
+      handler->getFileBlock(offset, points, BLOCK_SIZE);
+      ossim_uint32 size_read = points.size();
+      if (points.empty() )
+         break;
+      ossimPointRecord* p = points[0];
+
+      // Sum intensity channel as "checksum" value:
+      double checksum = 0;
+      for (ossim_uint32 i=0; i< points.size(); ++i)
+      {
+         if (genDatFile)
+         {
+            ossim_uint32 id = points[i]->getPointId();
+            position = points[i]->getPosition();
+            outStream << position << endl;
+         }
+         checksum += points[i]->getField(ossimPointRecord::Intensity);
+      }
+      cout << "  Intensity checksum for block "<<blockNum <<" = " << checksum <<endl;
+      ++blockNum;
+   }
+   cout << "  Passed."<<endl;
+
+   if (genDatFile)
+      outStream.close();
+
+   delete handler;
+   return 0;
+}
+
+
diff --git a/ossim/src/test/ossim-point-cloud-image-handler-test.cpp b/ossim/src/test/ossim-point-cloud-image-handler-test.cpp
new file mode 100644
index 0000000..d26199e
--- /dev/null
+++ b/ossim/src/test/ossim-point-cloud-image-handler-test.cpp
@@ -0,0 +1,81 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Oscar Kramer
+//
+// Description: Unit test application for WKT Projection Factory.
+//
+// $Id$
+//----------------------------------------------------------------------------
+
+#include <vector>
+#include <iostream>
+#include <fstream>
+#include <cassert>
+
+using namespace std;
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/point_cloud/ossimPointCloudImageHandler.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/imaging/ossimImageSourceSequencer.h>
+
+int main(int argc, char* argv[])
+{
+   cout << "ossim-point-cloud-image-handler Test:" << endl;
+   ossimInit::instance()->initialize(argc, argv);
+
+   if (argc != 2)
+   {
+      cout  << "Missing input point-cloud data file name.\n"
+            << "Usage: " << argv[0] << " <filename.las>" << endl;
+      return -1;
+   }
+   ossimFilename fname (argv[1]);
+
+   cout << "  Testing open() via image handler registry... "; cout.flush();
+   ossimImageHandlerRegistry* registry = ossimImageHandlerRegistry::instance();
+   ossimRefPtr<ossimImageHandler> iHandler = registry->open(fname, true, true);
+   ossimPointCloudImageHandler* pciHandler = dynamic_cast<ossimPointCloudImageHandler*>(iHandler.get());
+   assert(pciHandler);
+   cout << "  Passed.\n";
+
+   cout << "  Testing getImageGeometry()... "; cout.flush();
+   ossimRefPtr<ossimImageGeometry> igeom = iHandler->getImageGeometry();
+   assert(igeom.valid() && igeom->hasProjection());
+   cout << "  Passed.\n";
+
+
+   ossimRefPtr<ossimImageSourceSequencer> seq = new ossimImageSourceSequencer (iHandler.get());
+   seq->initialize();
+   seq->setToStartOfSequence();
+   int numTiles = seq->getNumberOfTiles();
+   cout << "Number of Tiles: "<<numTiles<<endl;
+   cout << "Number of Tiles Horizontal: "<<seq->getNumberOfTilesHorizontal()<<endl;
+   cout << "Number of Tiles Vertical: "<<seq->getNumberOfTilesVertical()<<endl;
+
+   cout << "  Testing getTile()... "; cout.flush();
+   int count = 1;
+   while (1) {
+      ossimRefPtr<ossimImageData> tile = seq->getNextTile();
+      if (!tile.valid())
+         break;
+
+      //ossim_uint32 numBandsIn  = pciHandler->getNumberOfInputBands();
+      //ossim_uint32 numBandsOut = tile->getNumberOfBands();
+      //const ossim_float64* minpix = tile->getMinPix();
+      //const ossim_float64* maxpix = tile->getMaxPix();
+      if (count == 20)
+         break;
+   }
+   cout << "  Passed.\n";
+
+   seq = 0;
+   igeom = 0;
+   iHandler = 0;
+
+   return 0;
+}
+
+
diff --git a/ossim/src/test/ossim-point-test.cpp b/ossim/src/test/ossim-point-test.cpp
new file mode 100644
index 0000000..893be4a
--- /dev/null
+++ b/ossim/src/test/ossim-point-test.cpp
@@ -0,0 +1,185 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+//----------------------------------------------------------------------------
+// $Id: ossim-point-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <string>
+#include <iostream>
+#include <sstream>
+
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimDpt3d.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimEcefPoint.h>
+#include <ossim/base/ossimEcefVector.h>
+
+int main()
+{
+   //---
+   // Test ossiIpt::operator>>
+   //---
+   std::string is1(" ( 0, 1 )");
+   std::string is2(" (2,3)");
+   std::string is3(" ( 4, 5 )");
+   std::string is4_5_6_7(" ( 6, 7 )(8, 9) ( 10, 11 ) ( 12, 13) 9876");
+
+   ossimIpt ip1;
+   ossimIpt ip2;
+   ossimIpt ip3;
+   ossimIpt ip4;
+   ossimIpt ip5;
+   ossimIpt ip6;
+   ossimIpt ip7;
+   
+
+   ip1.toPoint(is1);
+   ip2.toPoint(is2);
+   ip3.toPoint(is3);
+   int i;
+
+   std::istringstream istr(is4_5_6_7);
+   istr >> ip4 >> ip5 >> ip6 >> ip7 >> i;
+
+   //---
+   // Test ossiDpt::operator>>
+   //---
+   std::string ds1(" ( 0.0, 1.1 )");
+   std::string ds2(" (2.2,3.3)");
+   std::string ds3(" ( 4.4, 5.5 )");
+   std::string ds4_5_6_7(" ( 6.6, 7.7 )(8.8, 9.9) ( 10.0, 11.0 ) ( 12.0, 13.0) 9876.12345678");
+   std::string ds8("12 20");
+
+   ossimDpt dp1;
+   ossimDpt dp2;
+   ossimDpt dp3;
+   ossimDpt dp4;
+   ossimDpt dp5;
+   ossimDpt dp6;
+   ossimDpt dp7;
+   ossimDpt dp8;
+
+   dp1.toPoint(ds1);
+   dp2.toPoint(ds2);
+   dp3.toPoint(ds3);
+   double d;
+
+   std::istringstream istr2(ds4_5_6_7);
+   istr2 >> dp4 >> dp5 >> dp6 >> dp7 >> d;
+
+   dp8.toPoint(ds8); // Test an invalid string "12 20"
+
+    //---
+   // Test ossiDpt3d
+   //---
+   std::string ds3d1  = " ( 0.0, 1.1, 2.2 )";
+   std::string ds3d2 = "(1.0,2.0,3.0)";
+   
+   ossimDpt3d dp3d1;
+   ossimDpt3d dp3d2;
+   dp3d1.toPoint(ds3d1);
+   dp3d2.toPoint(ds3d2);
+
+
+   //---
+   // Test ossiGpt::operator>>
+   //---
+   std::string gs1("(0.0,0.0,0.0,WGE)");
+   std::string gs2("(1.1,2.2,3.3,NAR-C)");
+   std::string gs3(" (4.4,5.5,6.6,NAS-C )");
+   std::string gs4_5_6_7(" (4.4,5.5,6.6,NAS-C )( 10.0, 10.0 ,5.0, TOY-C ) (17, -89, 50.0, xxx) (28.2, -44.5, 10000.0, NAS-B) 12345.6789");
+
+   ossimGpt gp1;
+   ossimGpt gp2;
+   ossimGpt gp3;
+   ossimGpt gp4;
+   ossimGpt gp5;
+   ossimGpt gp6;
+   ossimGpt gp7;
+   double d2;
+
+   gp1.toPoint(gs1);
+   gp2.toPoint(gs2);
+   gp3.toPoint(gs3);
+
+   std::istringstream istr4(gs4_5_6_7);
+   istr4 >> gp4 >> gp5 >> gp6 >> gp7 >> d2;
+
+
+   //---
+   // Test ossimEcefPoint toString and toPoint methods.
+   //---
+   std::string es1("(1.0,2.0,3.0)");
+   ossimEcefPoint ep1;
+   ep1.toPoint(es1);
+   std::string es2 = ep1.toString(10).string();
+
+   //---
+   // Test ossimEcefPoint toString and toPoint methods.
+   //---
+   ossimEcefVector ev1;
+   ev1.toPoint(es1);
+   std::string es3 = ev1.toString(10).string();
+  
+   std::cout
+      << "\nis1:       " << is1
+      << "\nip1:       " << ip1
+      << "\nis2:       " << is2
+      << "\nip2:       " << ip2
+      << "\nis3:       " << is3
+      << "\nip3:       " << ip3
+      << "\nis4_5_6_7: " << is4_5_6_7
+      << "\nip4:       " << ip4
+      << "\nip5:       " << ip5
+      << "\nip6:       " << ip6
+      << "\nip7:       " << ip7
+      << "\ni:         " << i
+
+      << "\n\n\nds1:       " << ds1
+      << "\ndp1:       " << dp1
+      << "\nds2:       " << ds2
+      << "\ndp2:       " << dp2
+      << "\nds3:       " << ds3
+      << "\ndp3:       " << dp3
+      << "\nds4_5_6_7: " << ds4_5_6_7
+      << "\ndp4:       " << dp4
+      << "\ndp5:       " << dp5
+      << "\ndp6:       " << dp6
+      << "\ndp7:       " << dp7
+      << "\nds8:       " << ds8
+      << "\ndp8:       " << dp8
+      << "\nd:         " << d
+
+      << "\n\nds3d1:       " << ds3d1
+      << "\nds3d2:     " << ds3d2
+      << "\ndp3d1:     " << dp3d1
+      << "\ndp3d2:     " << dp3d2
+
+      << "\n\n\ngs1:       " << gs1
+      << "\ngp1:       " << gp1
+      << "\ngs2:       " << gs2
+      << "\ngp2:       " << gp2
+      << "\ngs3:       " << gs3
+      << "\ngp3:       " << gp3
+      << "\ngs4_5_6_7: " << gs4_5_6_7
+      << "\ngp4:       " << gp4
+      << "\ngp5:       " << gp5
+      << "\ngp6:       " << gp6
+      << "\ngp7:       " << gp7
+      << "\nd2:         " << d2
+
+      << "\n\n\nes1:       " << es1
+      << "\nep1:       " << ep1
+      << "\nes2:       " << es2
+      << "\nev1:       " << ev1
+      << "\nes3:       " << es3
+
+      << std::endl;
+
+   return 0;
+}
+
diff --git a/src/test/ossim-projection-factory-test.cpp b/ossim/src/test/ossim-projection-factory-test.cpp
similarity index 100%
rename from src/test/ossim-projection-factory-test.cpp
rename to ossim/src/test/ossim-projection-factory-test.cpp
diff --git a/ossim/src/test/ossim-projection-test.cpp b/ossim/src/test/ossim-projection-test.cpp
new file mode 100644
index 0000000..119fb70
--- /dev/null
+++ b/ossim/src/test/ossim-projection-test.cpp
@@ -0,0 +1,94 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  David Burken
+//
+// Description: Test application to for projection classes.
+//
+//----------------------------------------------------------------------------
+// $Id: ossim-projection-test.cpp 2777 2011-06-27 19:14:17Z david.burken $
+
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/projection/ossimMapProjection.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/projection/ossimGoogleProjection.h>
+#include <ossim/projection/ossimProjection.h>
+#include <ossim/projection/ossimProjectionFactoryRegistry.h>
+
+#include <vector>
+#include <iostream>
+#include <fstream>
+using namespace std;
+
+
+int main(int argc, char* argv[])   
+{
+   ossimInit::instance()->initialize(argc, argv);
+
+   ossimRefPtr<ossimMapProjection> proj1 = new ossimEquDistCylProjection();
+
+   cout << "\n\nproj1 orgin=(0,0):\n";
+   proj1->print(cout);
+
+   ossim_float64 dpp = 1.0/3600.0; // Degrees per pixel.
+   ossimDpt scale(dpp, dpp);
+   proj1->setDecimalDegreesPerPixel(scale);
+   cout << "\n\nproj1 after setDecimalDegreesPerPixel(0.000277778, 0.000277778):\n";
+   proj1->print(cout);
+
+   ossimGpt origin(38.0, -123.0, 0.0);
+   proj1->setOrigin(origin);
+
+   cout << "\n\nproj1 after setOrgin=(38, -123):\n";
+   proj1->print(cout);
+
+   proj1->setDecimalDegreesPerPixel(scale);
+   cout << "\n\nproj1 after setDecimalDegreesPerPixel(0.000277778, 0.000277778) with origin lat of 38N:\n";
+   proj1->print(cout);
+
+   ossimRefPtr<ossimMapProjection> proj2 =  static_cast<ossimMapProjection*>(proj1->dup());
+   cout << "\n\nproj2 a dup of proj1:\n";
+   proj2->print(cout);
+
+   ossimKeywordlist kwl;
+   proj2->saveState(kwl);
+
+   cout << "\n\nproj2 save state:\n"
+        << kwl << endl;
+
+   ossimRefPtr<ossimProjection> proj3 = ossimProjectionFactoryRegistry::instance()->
+      createProjection(kwl);
+   cout << "\n\nproj3 created from proj2's saveState via ossimProjectionFactoryRegistry::createProjection\n";
+   if ( proj3.valid() )
+   {
+      proj3->print(cout);
+   }
+
+   ossimRefPtr<ossimMapProjection> proj4 = new ossimEquDistCylProjection();
+   proj4->loadState(kwl);
+   
+   cout << "\n\nproj4 from proj2 save state via ossimEquDistCylProjection::loadState:\n";
+   proj4->print(cout);
+
+   ossimRefPtr<ossimMapProjection> proj5 = new ossimGoogleProjection();
+
+   ossimDpt dpt(-20037508.3428, 20037508.3428);
+   ossimGpt gpt = proj5->inverse( dpt );
+   
+   cout << "\n\nossimGoogleProjection test:"
+        << "\ndpt:         " << dpt
+        << "\ninverse gpt: " << gpt
+        << endl;
+
+   dpt.x = 20037508.3428;
+   dpt.y = -20037508.3428;
+   gpt = proj5->inverse( dpt );
+
+   cout << "\ndpt:         " << dpt
+        << "\ninverse gpt: " << gpt
+        << "\n" << endl;
+
+   return 0;
+}
diff --git a/ossim/src/test/ossim-range-dome-test.cpp b/ossim/src/test/ossim-range-dome-test.cpp
new file mode 100644
index 0000000..32ca4a1
--- /dev/null
+++ b/ossim/src/test/ossim-range-dome-test.cpp
@@ -0,0 +1,247 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Description: Functional test for ossimRangeDomeTileSource class.
+//
+// $Id: ossim-range-dome-test.cpp 23468 2015-08-19 01:51:42Z dburken $
+//----------------------------------------------------------------------------
+
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/imaging/ossimTiffWriter.h>
+#include <ossim/imaging/ossimIndexToRgbLutFilter.h>
+#include <ossim/imaging/ossimRangeDomeTileSource.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <iostream>
+#include <cstdlib> /* for exit */
+
+using namespace std;
+
+const char* data = "OSSIM_RANGE_DOMES 1.0\n"
+      "# ID, Lat, Lon, Hgt, Radius, Classification [, Az_start, Az_end] [, \"Description\"]\n"
+      "1, 25.8607, -80.1343, 0, 20, 1\n"
+      "2, 25.8601, -80.1336, 0, 40, 3, 135, 45, NATO friendly dome\n"
+      "3, 25.8605, -80.1343, 0, 40, 102, 135, 225, 50mm battery threat dome\n"
+      "4, 25.8601, -80.1335, 0, 50, 103, 45, 135\n"
+      "5, 25.8605, -80.1336, 0, 50, 104, 340, 20\n";
+
+const char* lut =
+      "type: ossimIndexToRgbLutFilter \n"
+      "mode: literal \n"
+      "entry0.index: 1 \n"
+      "entry0.color: 48 48 255\n"
+      "entry1.index: 2 \n"
+      "entry1.color: 32 32 255 \n"
+      "entry2.index: 3 \n"
+      "entry2.color: 16 16 255 \n"
+      "entry3.index: 4 \n"
+      "entry3.color: 1 1 255 \n"
+      "entry0.index: 101 \n"
+      "entry0.color: 255 32 32 \n"
+      "entry4.index: 102 \n"
+      "entry4.color: 255 128 1 \n"
+      "entry5.index: 103 \n"
+      "entry5.color: 255 64 1 \n"
+      "entry6.index: 104 \n"
+      "entry6.color: 255 1 1 \n";
+
+const char* TEMP_CSV_FILE = "rdtltest-default.csv";
+const char* TEMP_LUT_FILE = "rdtltest-default.lut";
+const char* DEFAULT_RESULTS_FILE = "rdtltest-RESULT.tif";
+
+class Executive
+{
+public:
+   Executive(ossimArgumentParser& ap);
+   ~Executive();
+   bool run();
+
+private:
+   ossimFilename m_csvFile;
+   ossimFilename m_lutFile;
+   ossimFilename m_resultsFile;
+   double m_gsd;
+   bool m_saveFiles;
+};
+
+Executive::Executive(ossimArgumentParser& ap)
+:  m_gsd (1.0),
+   m_saveFiles (false)
+{
+   // Set the general usage:
+   ossimApplicationUsage* au = ap.getApplicationUsage();
+   ossimString usageString = ap.getApplicationName();
+   usageString += " [options]";
+   au->setCommandLineUsage(usageString);
+
+   // Set the command line options:
+   au->addCommandLineOption(
+         "--domes <filename>",
+         "Specifies the input range-dome specifications CSV file name.");
+   au->addCommandLineOption(
+         "--gsd <meters>",
+         "Specifies output GSD in meters. Defaults to 1 meter. ");
+   au->addCommandLineOption(
+         "--lut <filename>",
+         "Causes single-band, output range-dome raster to be remapped to the RGB LUT specified in "
+         "<filename>. Implies \"--use-lut\" option.");
+   au->addCommandLineOption(
+         "--out <filename>",
+         "Specifies output filename. Defaults to <rdtltest-OUT.tif>.");
+   au->addCommandLineOption(
+         "--save",
+         "Prevents temporary domes CSV file and LUT file from being deleted after test so they "
+         "can be used as examples for custom inputs.");
+   au->addCommandLineOption(
+         "--use-lut",
+         "Causes single-band, output range-dome raster to be remapped to default "
+         "range-dome RGB LUT.");
+
+   if (ap.read("-h") || ap.read("--help"))
+   {
+      ap.getApplicationUsage()->write(ossimNotify(ossimNotifyLevel_INFO));
+      return;
+   }
+
+   std::string ts1;
+   ossimArgumentParser::ossimParameter sp1(ts1);
+   m_csvFile = TEMP_CSV_FILE;
+   m_resultsFile = DEFAULT_RESULTS_FILE;
+   m_lutFile.clear();
+
+   if (ap.read("--gsd", sp1))
+      m_gsd = ossimString(ts1).toDouble();
+
+   if (ap.read("--domes", sp1))
+      m_csvFile = ts1;
+
+   if (ap.read("--lut", sp1))
+      m_lutFile = ts1;
+
+   if (ap.read("--out", sp1))
+      m_resultsFile = ts1;
+
+   if (ap.read("--save"))
+      m_saveFiles = true;
+
+   if (ap.read("--use-lut"))
+      m_lutFile = TEMP_LUT_FILE;
+}
+
+Executive::~Executive()
+{
+   if (!m_saveFiles)
+   {
+      if (m_csvFile == TEMP_CSV_FILE)
+         m_csvFile.remove();
+
+      if (m_lutFile == TEMP_LUT_FILE)
+         m_lutFile.remove();
+   }
+}
+
+bool Executive::run()
+{
+   if (m_resultsFile.empty())
+      return false;
+
+   // Output temp datafile if none provided:
+   if (m_csvFile == TEMP_CSV_FILE)
+   {
+      ofstream ofs (m_csvFile.string().c_str(), ios_base::trunc);
+      if (ofs.fail())
+      {
+         ossimNotify(ossimNotifyLevel_FATAL)
+               << "Could not write out temporary CSV file to CWD. Check permissions." << endl;
+         return false;
+      }
+      ofs << data << endl;
+      ofs.close();
+   }
+
+   // Use factory to open the RDTS:
+   ossimRefPtr<ossimImageHandler> handler = ossimImageHandlerRegistry::instance()->open(m_csvFile);
+   if (!handler.valid())
+   {
+      ossimNotify(ossimNotifyLevel_FATAL)
+            << "Error encountered instantiating threat dome handler from CSV." << std::endl;
+      return false;
+   }
+
+   // Set up the range-dome filter chain:
+   ossimRangeDomeTileSource* rdts =  dynamic_cast<ossimRangeDomeTileSource*>(handler.get());
+   if (!rdts)
+   {
+      ossimNotify(ossimNotifyLevel_FATAL)
+            << "Error encountered casting handler to ossimRangeDomeTileSource" << std::endl;
+      return false;
+   }
+   ossimConnectableObject* chain_head = rdts;
+   rdts->setGSD(m_gsd);
+
+   cout<<" numLines = "<< rdts->getNumberOfLines()<<endl;
+   cout<<" numSamps = "<< rdts->getNumberOfSamples()<<endl;
+   cout<<" numDomes = "<< rdts->getNumRangeDomes()<<endl;
+
+   // Add LUT for visibility if requested:
+   if (!m_lutFile.empty())
+   {
+      if (m_lutFile == TEMP_LUT_FILE)
+      {
+         // Need to output default temporary LUT:
+         ofstream lutfs (m_lutFile.string().c_str(), ios_base::trunc);
+         if (lutfs.fail())
+         {
+            cout << "Could not write out temporary LUT file to CWD. Check permissions." << endl;
+            return false;
+         }
+         lutfs << lut << endl;
+         lutfs.close();
+      }
+
+      ossimRefPtr<ossimIndexToRgbLutFilter> lutFilter = new ossimIndexToRgbLutFilter();
+      lutFilter->connectMyInputTo(chain_head);
+      lutFilter->setLut(m_lutFile);
+      lutFilter->initialize();
+      chain_head = lutFilter.get();
+   }
+
+   // Set up the writer for results file:
+   ossimRefPtr<ossimTiffWriter> tiffWriter = new ossimTiffWriter();
+   tiffWriter->connectMyInputTo(chain_head);
+   tiffWriter->setFilename(m_resultsFile);
+   if (!tiffWriter->execute())
+   {
+      cout << "Could not write results file <"<<m_resultsFile<<">." << endl;
+      return false;
+   }
+
+   tiffWriter->close();
+   tiffWriter = 0;
+   handler = 0;
+
+   cout<<"\nTest completed. Output written to <"<<m_resultsFile<<">.\n"<<endl;
+   return true;
+}
+
+int main(int argc, char *argv[])
+{
+   ossimArgumentParser ap(&argc, argv);
+   ap.getApplicationUsage()->setApplicationName(argv[0]);
+   ossimInit::instance()->initialize(ap);
+
+   Executive* executive = new Executive(ap);
+   bool success = executive->run();
+   delete executive;
+
+   if (!success)
+      exit(1);
+
+   exit(0);
+}
+
+
diff --git a/src/test/ossim-read-write-consistency-test.cpp b/ossim/src/test/ossim-read-write-consistency-test.cpp
similarity index 100%
rename from src/test/ossim-read-write-consistency-test.cpp
rename to ossim/src/test/ossim-read-write-consistency-test.cpp
diff --git a/ossim/src/test/ossim-rect-test.cpp b/ossim/src/test/ossim-rect-test.cpp
new file mode 100644
index 0000000..5a01061
--- /dev/null
+++ b/ossim/src/test/ossim-rect-test.cpp
@@ -0,0 +1,72 @@
+//----------------------------------------------------------------------------
+//
+// File: ossim-rect-test.cpp
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description:
+//
+// Test app for ossimIrect and ossimDrect classes.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimIrect.h>
+
+#include <iostream>
+using namespace std;
+
+int main()
+{
+   // IRECTS:
+
+   // left handed irects
+   ossimIrect ir1(0, 0, 10, 10);
+   ossimIrect ir2(1, 1, 9, 9);
+   ossimIrect ir3 = ir1.clipToRect(ir2);
+   cout << "ossimIrect Left Handed:"
+        << "\nrect ir1:            " << ir1
+        << "\nrect ir2:            " << ir2
+        << "\nir1.clipToRect(ir2): " << ir3
+        << "\nexpected: ul=(1,1), ur=(9,1), lr=(9,9), ll=(1,9)\n\n";
+   
+   // right handed irects
+   ossimIrect ir4(0,10, 10,0,OSSIM_RIGHT_HANDED);
+   ossimIrect ir5(-5,8,14,1,OSSIM_RIGHT_HANDED);
+   ossimIrect ir6 = ir4.clipToRect(ir5);
+   cout << "ossimIrect Right Handed:"
+        << "\nrect ir4:          " << ir4
+        << "\nrect ir5:          " << ir5
+        << "\nd.clipToRect(e):   " << ir6
+        << "\nexpected: ul=(0,8), ur=(10,8), lr=(10,1), ll=(0,1)\n\n";
+
+   // DRECTS:
+
+   // left handed irects
+   ossimDrect dr1(0, 0, 10, 10);
+   ossimDrect dr2(1, 1, 9, 9);
+   ossimDrect dr3 = dr1.clipToRect(dr2);
+   cout << "ossimDrect Left Handed:"
+        << "\nrect dr1:            " << dr1
+        << "\nrect dr2:            " << dr2
+        << "\ndr1.clipToRect(dr2): " << dr3
+        << "\nexpected: ul=(1,1), ur=(9,1), lr=(9,9), ll=(1,9)\n\n";
+   
+   // right handed drects
+   ossimDrect dr4(0,10, 10,0,OSSIM_RIGHT_HANDED);
+   ossimDrect dr5(-5,8,14,1,OSSIM_RIGHT_HANDED);
+   ossimDrect dr6 = dr4.clipToRect(dr5);
+   cout << "ossimDrect Right Handed:"
+        << "\nrect dr4:          " << dr4
+        << "\nrect dr5:          " << dr5
+        << "\nd.clipToRect(e):   " << dr6
+        << "\nexpected: ul=(0,8), ur=(10,8), lr=(10,1), ll=(0,1)\n"
+        << endl;
+
+   return 0;
+}
+
+
diff --git a/ossim/src/test/ossim-ref-ptr-test.cpp b/ossim/src/test/ossim-ref-ptr-test.cpp
new file mode 100644
index 0000000..b7561d4
--- /dev/null
+++ b/ossim/src/test/ossim-ref-ptr-test.cpp
@@ -0,0 +1,91 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Test application for ossimRefPtr class.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossim-ref-ptr-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <iostream>
+using namespace std;
+
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimReferenced.h>
+#include <ossim/init/ossimInit.h>
+
+// Referenced object.
+class Obj : public ossimReferenced
+{
+public:
+   Obj(){}
+   virtual ~Obj(){ cout << "~Obj..." << endl; }
+};
+
+// Owns a ref ptr.
+class Foo
+{
+public:
+   Foo() : m_refPtr(new Obj) {}
+   ~Foo() { m_refPtr = 0; }
+   ossimRefPtr<Obj>& getRefPtr() { return m_refPtr; }
+
+private:
+   ossimRefPtr<Obj> m_refPtr;
+};
+
+static void assignRefPtr(ossimRefPtr<Obj>& rp)
+{
+   rp = new Obj;
+}
+
+static ossimRefPtr<Obj> getRefPtr()
+{
+   return ossimRefPtr<Obj>(new Obj);
+}
+
+// Test app
+int main( /* int argc, char* argv[] */ )
+{
+   ossimInit::instance()->initialize();
+
+   Foo* f = new Foo;
+
+   cout << "count(1): " << f->getRefPtr()->referenceCount() << endl;
+
+   ossimRefPtr<Obj> rp = f->getRefPtr();
+
+   cout << "count(2): " << f->getRefPtr()->referenceCount() << endl;
+
+   delete f;  
+   f = 0;
+
+   cout << "count(1): " << rp->referenceCount() << endl;
+
+   rp = 0; // Should destroy here...
+
+   rp = 0;
+   assignRefPtr(rp);
+
+   if ( rp.valid() )
+   {
+      cout << "assignRefPtr rp count(1): " << rp->referenceCount() << endl;
+   }
+
+   rp = 0;
+
+   rp = getRefPtr();
+
+   if ( rp.valid() )
+   {
+      cout << "getRefPtr rp count(1): " << rp->referenceCount() << endl;
+   }
+   
+   
+   return 0;
+}
+
diff --git a/ossim/src/test/ossim-remap-table-test.cpp b/ossim/src/test/ossim-remap-table-test.cpp
new file mode 100644
index 0000000..d6089ab
--- /dev/null
+++ b/ossim/src/test/ossim-remap-table-test.cpp
@@ -0,0 +1,360 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description: Test normalized remap table.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossim-remap-table-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <iostream>
+#include <iomanip>
+using namespace std;
+
+#include <ossim/base/ossimConstants.h>  // ossim contants...
+#include <ossim/imaging/ossimNormalizedS16RemapTable.h>
+#include <ossim/imaging/ossimNormalizedU16RemapTable.h>
+#include <ossim/imaging/ossimNormalizedU11RemapTable.h>
+#include <ossim/imaging/ossimNormalizedU8RemapTable.h>
+
+
+int main(int argc, char *argv[])
+{
+   cout << setiosflags(std::ios::fixed) << setprecision(15);
+
+   ossim_float64 n;
+   ossim_int32   p;
+   ossim_int32   i;
+   
+   cout << "//------------------------------------------\n"
+        << "// *** ossimNormalizedS16RemapTable test ***\n"
+        << "//------------------------------------------\n"
+        << endl;
+   
+   ossimNormalizedS16RemapTable s16tbl;
+   
+   i = -32768;
+   while (i < 32768)
+   {
+      n = s16tbl[i];
+      p = s16tbl.pixFromNorm(n);
+      cout << "idx[" << i << "]: n (" << n << "), p(" << p << ")\n";
+      ++i;
+   }
+
+   n = -0.1;
+   p = s16tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+    
+   n = 0.0;
+   p = s16tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 0.000000250; // Just above null pixel
+   p = s16tbl.pixFromNorm(n);
+   cout << "Just above null\n";
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+   
+   n = 0.000015250; // Slightly less than -32767
+   p = s16tbl.pixFromNorm(n);
+   cout << "Slightly less than -32767\n";
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 0.0000152588; // -32767
+   p = s16tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+   
+   n = 0.000015258;  // Slightly bigger than -32767
+   p = s16tbl.pixFromNorm(n);
+   cout << "Slightly bigger than -32767\n";
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 0.000030518043793; // -32766
+   p = s16tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+   
+   n = 0.0000305180436;  // Slightly to the left of -32766
+   p = s16tbl.pixFromNorm(n);
+   cout << "Slightly less than -32766\n";
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 0.5;
+   p = s16tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 0.999984740977; // Slightly less than 32766
+   p = s16tbl.pixFromNorm(n);
+   cout << "Slightly less than 32766\n";
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 0.999984740978103; // 32766
+   p = s16tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 0.99998474098; // Slightly greater than 32766
+   p = s16tbl.pixFromNorm(n);
+   cout << "Slightly greater than 32766\n";
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+   
+   n = 1.0;
+   p = s16tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+   
+   n = 1.1;
+   p = s16tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   p = -32768;
+   n = s16tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+   
+   p = -32767;
+   n = s16tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+
+   p = 0;
+   n = s16tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+
+   p = 32766.99999999999;
+   n = s16tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+
+   p = 32767;
+   n = s16tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+
+   p = 32768;
+   n = s16tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+
+   cout << "//------------------------------------------\n"
+        << "// *** ossimNormalizedU16RemapTable test ***\n"
+        << "//------------------------------------------\n"
+        << endl;
+   
+   ossimNormalizedU16RemapTable u16tbl;
+   
+   i = 0;
+   while (i < 65536)
+   {
+      n = u16tbl[i];
+      p = u16tbl.pixFromNorm(n);
+      cout << "idx[" << i << "]: n (" << n << "), p(" << p << ")\n";
+      ++i;
+   }
+
+   n = -0.1;
+   p = u16tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+
+   n = 0.0;
+   p = u16tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 0.001;
+   p = u16tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 0.000000250; // Just above null pixel
+   p = u16tbl.pixFromNorm(n);
+   cout << "Just above null\n";
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 1.0;
+   p = u16tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 1.1;
+   p = u16tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   p = -1;
+   n = u16tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+
+   p = 0;
+   n = u16tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+
+   p = 1;
+   n = u16tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+
+   p = 65534;
+   n = u16tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+
+   p = 65535;
+   n = u16tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+
+   p = 65536;
+   n = u16tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+      
+   cout << "\n\n//------------------------------------------\n"
+        << "// *** ossimNormalizedU11RemapTable test ***\n"
+        << "//------------------------------------------\n"
+        << endl;
+   
+   ossimNormalizedU11RemapTable u11tbl;
+   
+   i = 0;
+   while (i < 2048)
+   {
+      n = u11tbl[i];
+      p = u11tbl.pixFromNorm(n);
+      cout << "idx[" << i << "]: n (" << n << "), p(" << p << ")\n";
+      ++i;
+   }
+
+   n = -0.1;
+   p = u11tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+    
+   n = 0.0;
+   p = u11tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 0.00000852; // Just above null pixel
+   p = u11tbl.pixFromNorm(n);
+   cout << "Just above null\n";
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 0.000;
+   p = u11tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+   
+   n = .000488519785; // Slightly less than 1
+   p = u11tbl.pixFromNorm(n);
+   cout << "Slightly less than 1\n";
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 0.000488519785051; // 1
+   cout << "1\n";
+   p = u11tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 0.000488519786;  // Slightly bigger than 1
+   p = u11tbl.pixFromNorm(n);
+   cout << "Slightly bigger than 1\n";
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 0.9995114802149; // Slightly less than 2046
+   p = u11tbl.pixFromNorm(n);
+   cout << "Slightly less than 2046\n";
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 0.999511480214949; // 2046
+   p = u11tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 0.999511480215; // Slightly greater than 2046
+   p = u11tbl.pixFromNorm(n);
+   cout << "Slightly greater than 2046\n";
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+   
+   n = 1.0;
+   p = u11tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+   
+   n = 1.1;
+   p = u11tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   p = -1;
+   n = u11tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+   
+   p = 0;
+   n = u11tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+
+   p = 2046;
+   n = u11tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+
+   p = 2047;
+   n = u11tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+
+   p = 2048;
+   n = u11tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+
+   cout << "\n\n//------------------------------------------\n"
+        << "// *** ossimNormalizedU8RemapTable test ***\n"
+        << "//------------------------------------------\n"
+        << endl;
+   
+   ossimNormalizedU8RemapTable u8tbl;
+   
+   i = 0;
+   while (i < 256)
+   {
+      n = u8tbl[i];
+      p = u8tbl.pixFromNorm(n);
+      cout << "idx[" << i << "]: n (" << n << "), p(" << p << ")\n";
+      ++i;
+   }
+
+   n = -0.1;
+   p = u8tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+    
+   n = 0.0;
+   p = u8tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 0.00000625; // Just above null pixel
+   p = u8tbl.pixFromNorm(n);
+   cout << "Just above null\n";
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 0.001;
+   p = u8tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 1.0;
+   p = u8tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 1.1;
+   p = u8tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   n = 1.0;
+   p = u8tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+   
+   n = 1.1;
+   p = u8tbl.pixFromNorm(n);
+   cout << "pixFromNorm(" << n << "): " << p << "\n";
+
+   p = -1;
+   n = u8tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+   
+   p = 0;
+   n = u8tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+
+   p = 254;
+   n = u8tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+
+   p = 255;
+   n = u8tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+
+   p = 256;
+   n = u8tbl.normFromPix(p);
+   cout << "normFromPix(" << p << "): " << n << "\n";
+   
+   return 0;
+}
+
diff --git a/ossim/src/test/ossim-shift-filter-test.cpp b/ossim/src/test/ossim-shift-filter-test.cpp
new file mode 100644
index 0000000..287513c
--- /dev/null
+++ b/ossim/src/test/ossim-shift-filter-test.cpp
@@ -0,0 +1,201 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// File: ossim-viirs-proc
+//
+// Description: Application to extract VIIRS Radiance layer, shifting
+// min/max linearly to 16 bit space with coarse grid geometry file.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimMetadataInterface.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimStringProperty.h>
+#include <ossim/base/ossimTimer.h>
+#include <ossim/imaging/ossimCastTileSourceFilter.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimShiftFilter.h>
+#include <ossim/imaging/ossimSingleImageChain.h>
+#include <ossim/imaging/ossimTiffWriter.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/projection/ossimCoarseGridModel.h>
+#include <ossim/projection/ossimProjection.h>
+
+#include <iomanip>
+#include <iostream>
+#include <string>
+using namespace std;
+
+int main(int argc, char* argv[])
+{
+   int status = 0;
+
+   // Timer for elapsed time:
+   ossimTimer::instance()->setStartTick();
+   
+   ossimInit::instance()->initialize(argc, argv);
+
+   if (argc == 2 )
+   {
+      ossimFilename inputFile = argv[1];
+      if ( inputFile.exists() )
+      {
+         ossimFilename outputFile = inputFile.expand().noExtension();
+         outputFile.string() += "_1.tif";
+         
+         if ( inputFile != outputFile )
+         {
+            std::string command =
+               "ossim-cmm --null -9999.0 --reader-prop layer=/All_Data/VIIRS-DNB-SDR_All/Radiance ";
+            command += inputFile.string();
+            cout << "Executing command: " << command << endl;
+
+            status = system( command.c_str() );
+
+            if ( status == 0 )
+            {
+               ossimRefPtr<ossimSingleImageChain> sic = new ossimSingleImageChain();
+               if ( sic->open( inputFile, false ) )
+               {
+                  cout << "Opened: " << inputFile << endl;
+
+                  // Set the entry to the Radiance layer.
+                  ossimRefPtr<ossimProperty> readerProp = new  ossimStringProperty(
+                     ossimString("layer"),
+                     ossimString("/All_Data/VIIRS-DNB-SDR_All/Radiance") );
+
+                  sic->getImageHandler()->setProperty( readerProp );
+
+                  // Add filter to shift/stretch data uint16 range.
+                  ossimRefPtr<ossimShiftFilter> sf = new ossimShiftFilter();
+                  sf->setNullPixelValue( 0.0 );
+                  sf->setMinPixelValue( 1.0 );
+                  sf->setMaxPixelValue( 65535.0 );
+                  sic->addFirst( sf.get() );
+
+                  // Cast it to uint16:
+                  ossimRefPtr<ossimCastTileSourceFilter> cf =
+                     new ossimCastTileSourceFilter(0, OSSIM_UINT16 );
+                  sic->addFirst( cf.get() );
+
+                  // Put a cache in front of resampler.
+                  sic->addCache();
+                  
+                  // sic->addResampler();
+                  
+                  sic->initialize();
+                  
+                  // Write image:
+                  ossimRefPtr<ossimImageFileWriter> writer = new ossimTiffWriter();
+                  if ( writer->open( outputFile ) )
+                  {
+                     // Turn on overviews and histograms:
+                     writer->setWriteOverviewFlag( true );
+                     writer->setWriteHistogramFlag( true );
+
+                     // Add a listener to get percent complete.
+                     ossimStdOutProgress prog(0, true);
+                     writer->addListener(&prog);
+                     
+                     writer->connectMyInputTo(0, sic.get());
+
+                     ossimIrect rect = writer->getAreaOfInterest();
+                     
+                     writer->execute();
+
+                     cout << "Wrote file: " << outputFile << endl;
+                     
+                     ossimRefPtr<ossimImageHandler> ih = sic->getImageHandler();
+
+                     if ( ih.valid() )
+                     {
+                        //---
+                        // If there is a coarse grid model write it out so the
+                        // oqutput file will pick it up.
+                        //---
+                        ossimRefPtr<ossimImageGeometry> geom = sic->getImageHandler()->
+                           getImageGeometry();
+                        if ( geom.valid() )
+                        {
+                           ossimRefPtr<ossimProjection> proj = geom->getProjection();
+                           if ( proj.valid() )
+                           {
+                              ossimRefPtr<ossimCoarseGridModel> cg =
+                                 dynamic_cast<ossimCoarseGridModel*>( proj.get() );
+                              if ( cg.valid() )
+                              {
+                                 ossimFilename geomFile = outputFile.noExtension();
+                                 geomFile.string() += ".geom";
+
+                                 // this saves geom file as well
+                                 cg->saveCoarseGrid( geomFile );
+                                 cout << "Wrote file: " << geomFile << endl;
+                              }
+                           }
+                        }
+
+                        //---
+                        // If the image handler is a metadata interface pass the metadata
+                        // to the dot.omd file and rewrite it.
+                        //---
+                        ossimMetadataInterface* mdi =
+                           dynamic_cast<ossimMetadataInterface*>( ih.get() );
+                        if ( mdi )
+                        {
+                           ossimFilename omdFile = outputFile.noExtension();
+                           omdFile += ".omd";
+                           ossimRefPtr<ossimKeywordlist> kwl = new ossimKeywordlist();
+                           if ( omdFile.exists() )
+                           {
+                              kwl->addFile( omdFile );
+                           }
+                           
+                           std::string prefix = "";
+                           mdi->addMetadata( kwl.get(), prefix );
+                           kwl->write( omdFile.c_str() );
+                           cout << "Wrote file: " << omdFile << endl;
+                        }
+                     }
+                  }
+                  else
+                  {
+                     cerr << "Could not open: " << outputFile << endl;
+                  }
+               }
+            }
+         } 
+         else // Matches: 
+         {
+            cerr << "Input file is same as output file!  Returning..." << endl;
+            status = -1;
+         }
+      }
+      else // Match: if ( inputFile.exists() ){ ... }
+      {
+         cerr << "Input file does not exists!" << endl;
+         status = -1;
+      }
+   }
+   else // Matches: if (argc == 2 ){ ... }
+   {
+      cout << argv[0] << " <image_file>"
+           << "\n\nExtracts VIIRS Radiance layer from hdf5 file, shifting min/max "
+           << "linearly to 16 bit space with coarse grid geometry file.\n" << endl;
+   }
+
+   cout << "Elapsed time in seconds: "
+        << std::setiosflags(ios::fixed)
+        << std::setprecision(3)
+        << ossimTimer::instance()->time_s() << "\n";
+
+   return status;
+}
+
diff --git a/ossim/src/test/ossim-single-image-chain-test.cpp b/ossim/src/test/ossim-single-image-chain-test.cpp
new file mode 100644
index 0000000..03563d1
--- /dev/null
+++ b/ossim/src/test/ossim-single-image-chain-test.cpp
@@ -0,0 +1,166 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Test application for ossimSingleImageChain class.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossim-single-image-chain-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimTimer.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageRenderer.h>
+#include <ossim/imaging/ossimPiecewiseRemapper.h>
+#include <ossim/imaging/ossimSingleImageChain.h>
+#include <ossim/imaging/ossimTiffWriter.h>
+#include <ossim/init/ossimInit.h>
+#include <iomanip>
+#include <iostream>
+using namespace std;
+
+int main(int argc, char* argv[])
+{
+   ossimTimer::instance()->setStartTick();
+   
+   ossimInit::instance()->initialize(argc, argv);
+
+   ossimTimer::Timer_t t1 = ossimTimer::instance()->tick();
+   
+   cout << "elapsed time after initialize(ms): "
+        << std::setiosflags(ios::fixed)
+        << std::setprecision(3)
+        << ossimTimer::instance()->time_s() << "\n";
+
+   if (argc < 2)
+   {
+      cout << argv[0] << "<image_file> <optional_output_file>"
+           << "\nOpens up single image chain and dumps the state to keyword"
+           << " list." << endl;
+      return 0;
+   }
+
+   ossimRefPtr<ossimSingleImageChain> sic1 = new ossimSingleImageChain();
+   if ( sic1->open( ossimFilename(argv[1]) ) )
+   {
+      // Set up chain:
+      
+      if ( sic1->getImageHandler()->getNumberOfOutputBands() == 4 )
+      {
+         // Just guessing...
+         sic1->setThreeBandReverseFlag(true);
+      }
+               
+      // Always have resampler cache.
+      sic1->setAddResamplerCacheFlag(true);
+
+      // Histogram:
+      sic1->setAddHistogramFlag(true);
+
+      sic1->createRenderedChain();
+
+      // Histogram stretch:
+      if ( sic1->openHistogram(ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX) == false )
+      {
+         cout << "Could not do histogram stretch!" << endl;
+      }
+      
+      if (argc == 3)
+      {
+         // Write image:
+         ossimRefPtr<ossimImageFileWriter> writer = new ossimTiffWriter();
+         if ( writer->open( ossimFilename(argv[2]) ) )
+         {
+            cout << "Outputting file: " << ossimFilename(argv[2]) << endl;
+            
+            // Add a listener to get percent complete.
+            ossimStdOutProgress prog(0, true);
+            writer->addListener(&prog);
+
+            writer->connectMyInputTo(0, sic1.get());
+            writer->execute();
+            ossimTimer::Timer_t t2 = ossimTimer::instance()->tick();
+            cout << "elapsed time after write(ms): "
+                 << std::setiosflags(ios::fixed)
+                 << std::setprecision(3)
+                 << ossimTimer::instance()->time_s() << "\n";
+
+            cout << "write time minus initialize: "
+                 << std::setiosflags(ios::fixed)
+                 << std::setprecision(3)
+                 << ossimTimer::instance()->delta_s(t1, t2) << "\n";
+         }
+      }
+
+      ossimRefPtr<ossimImageGeometry> geom = sic1->getImageGeometry();
+      if (geom.valid())
+      {
+         geom->print(cout);
+      }
+
+      // Test the load state.
+      ossimKeywordlist kwl;
+      sic1->saveState(kwl, 0);
+
+      ossimSingleImageChain* sic2 = new ossimSingleImageChain();
+      sic2->loadState(kwl, 0);
+
+      kwl.clear();
+      sic2->saveState(kwl, 0);
+
+      cout << "\n\nSingle image chain from load state kwl\n" << kwl;
+   }
+
+   // Create a normal chain.
+   sic1 = new ossimSingleImageChain(true,  // addHistogramFlag
+                                    true,  // addResamplerCacheFlag
+                                    true,  // addChainCacheFlag
+                                    false, // remapToEightBitFlag
+                                    false, // threeBandFlag
+                                    false); // threeBandReverseFlag
+   
+   if ( sic1->open( ossimFilename(argv[1]) ) )
+   {
+      sic1->createRenderedChain();
+      ossimKeywordlist kwl;
+      sic1->saveState(kwl, 0);
+      cout << "\n\nNormal single image chain kwl\n" << kwl;
+   }
+
+   // Create a stripped down chain.
+   sic1 = new ossimSingleImageChain();
+   if ( sic1->open( ossimFilename(argv[1]) ) )
+   {
+      sic1->createRenderedChain();
+      ossimKeywordlist kwl;
+      sic1->saveState(kwl, 0);
+      cout << "\n\nSingle image chain stripped down kwl\n" << kwl;
+   }
+
+   // Create a rgb reversed chain.
+   sic1 = new ossimSingleImageChain();
+   if ( sic1->open( ossimFilename(argv[1]) ) )
+   {
+      sic1->setThreeBandReverseFlag(true);
+      sic1->createRenderedChain();
+      ossimKeywordlist kwl;
+      sic1->saveState(kwl, 0);
+      cout << "\n\nSingle image chain rgb reversed kwl\n" << kwl;
+   }
+
+   cout << "constness test:\n";
+   ossimRefPtr<const ossimSingleImageChain> consSic = sic1.get();
+   ossimRefPtr<const ossimImageHandler> ihConst =  consSic->getImageHandler();
+   cout << "image handler bands: " << ihConst->getNumberOfOutputBands() << endl;
+
+   return 0;
+}
+
diff --git a/ossim/src/test/ossim-single-image-chain-threaded-test.cpp b/ossim/src/test/ossim-single-image-chain-threaded-test.cpp
new file mode 100644
index 0000000..8d487cc
--- /dev/null
+++ b/ossim/src/test/ossim-single-image-chain-threaded-test.cpp
@@ -0,0 +1,102 @@
+//----------------------------------------------------------------------------
+//
+// File: ossim-single-image-chain-threaded-test.cpp
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Test application for ossimSingleImageChain with a
+// ossimMultiThreadSequencer.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossim-single-image-chain-threaded-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <iostream>
+using namespace std;
+
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimTimer.h>
+#include <ossim/imaging/ossimSingleImageChain.h>
+#include <ossim/imaging/ossimTiffWriter.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/parallel/ossimMultiThreadSequencer.h>
+
+int main(int argc, char* argv[])
+{
+   ossimTimer::instance()->setStartTick();
+   
+   ossimInit::instance()->initialize(argc, argv);
+
+   ossimTimer::Timer_t t1 = ossimTimer::instance()->tick();
+   
+   cout << "elapsed time after initialize(ms): "
+        << ossimTimer::instance()->time_s() << "\n";
+
+   if (argc < 4)
+   {
+      cout << argv[0] << "<threads> <image_file> <output_file.tif>"
+           << "\nOpens up single image chain and writes to output_file using N threads."
+           << " list.\nNOTE: Hard wired tiff writer; hence, the output_file.tif." << endl;
+      return 0;
+   }
+
+   ossim_uint32  threads     = ossimString(argv[1]).toUInt32();
+   if ( threads == 0 )
+   {
+      threads = ossim::getNumberOfThreads();
+   }
+   ossimFilename image_file  = argv[2];
+   ossimFilename output_file = argv[3];
+
+   cout << "threads:     " << threads
+        << "\nimage_file:  " << image_file
+        << "\noutput_file: " << output_file
+        << "\n";
+   
+   ossimRefPtr<ossimSingleImageChain> sic1 = new ossimSingleImageChain();
+   
+   if ( sic1->open( image_file ) )
+   {
+      sic1->createRenderedChain();
+
+      // Establish the MT sequencer:
+      ossimRefPtr<ossimMultiThreadSequencer> mts =
+         new ossimMultiThreadSequencer( sic1.get(), threads );
+
+      ossimRefPtr<ossimImageFileWriter> writer = new ossimTiffWriter();
+      writer->changeSequencer( mts.get() );
+      
+      if ( writer->open( output_file ) )
+      {
+         // Add a listener to get percent complete.
+         ossimStdOutProgress prog(0, true);
+         writer->addListener(&prog);
+
+         // Connect the chain to writer.
+         writer->connectMyInputTo(0, sic1.get());
+
+         // Write the file.
+         writer->execute();
+         
+         ossimTimer::Timer_t t2 = ossimTimer::instance()->tick();
+         cout << "elapsed time after write(ms): "
+              << std::setiosflags(ios::fixed)
+              << std::setprecision(3)
+              << ossimTimer::instance()->time_s() << "\n";
+         
+         cout << "write time minus initialize: "
+              << std::setiosflags(ios::fixed)
+              << std::setprecision(3)
+              << ossimTimer::instance()->delta_s(t1, t2) << "\n";
+      }
+   }
+
+   return 0;
+}
+
diff --git a/ossim/src/test/ossim-srtm-support-data-test.cpp b/ossim/src/test/ossim-srtm-support-data-test.cpp
new file mode 100644
index 0000000..71268e3
--- /dev/null
+++ b/ossim/src/test/ossim-srtm-support-data-test.cpp
@@ -0,0 +1,49 @@
+//----------------------------------------------------------------------------
+// Copyright (C) 2005 David Burken, all rights reserved.
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Test application / example code for srtm support data class.
+// and using it.
+//
+// $Id: ossim-srtm-support-data-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+//----------------------------------------------------------------------------
+
+#include <iostream>
+using namespace std;
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/support_data/ossimSrtmSupportData.h>
+#include <ossim/base/ossimKeywordlist.h>
+
+int main(int argc, char *argv[])
+{
+   ossimInit::instance()->initialize(argc, argv);
+
+   if (argc != 2)
+   {
+      cout << "usage:  " << argv[0] << " srtm_file" << endl;
+      return 0;
+   }
+
+   ossimSrtmSupportData sd;
+   if (sd.setFilename(ossimFilename(argv[1]), true))
+   {
+      cout << sd << endl;
+
+      ossimKeywordlist kwl;
+      sd.getImageGeometry(kwl);
+      cout << "geometry file:\n" << kwl << endl;
+   }
+   else
+   {
+      cout << "Could not open:  " << argv[1] << endl;
+   }
+   
+   return 0;
+}
+
diff --git a/src/test/ossim-string-test.cpp b/ossim/src/test/ossim-string-test.cpp
similarity index 100%
rename from src/test/ossim-string-test.cpp
rename to ossim/src/test/ossim-string-test.cpp
diff --git a/src/test/ossim-test.cpp b/ossim/src/test/ossim-test.cpp
similarity index 100%
rename from src/test/ossim-test.cpp
rename to ossim/src/test/ossim-test.cpp
diff --git a/src/test/ossim-thin-plate-spline-test.cpp b/ossim/src/test/ossim-thin-plate-spline-test.cpp
similarity index 100%
rename from src/test/ossim-thin-plate-spline-test.cpp
rename to ossim/src/test/ossim-thin-plate-spline-test.cpp
diff --git a/src/test/ossim-threaded-app-tile-cache-test.cpp b/ossim/src/test/ossim-threaded-app-tile-cache-test.cpp
similarity index 100%
rename from src/test/ossim-threaded-app-tile-cache-test.cpp
rename to ossim/src/test/ossim-threaded-app-tile-cache-test.cpp
diff --git a/ossim/src/test/ossim-threaded-chain-test.cpp b/ossim/src/test/ossim-threaded-chain-test.cpp
new file mode 100644
index 0000000..2bf925c
--- /dev/null
+++ b/ossim/src/test/ossim-threaded-chain-test.cpp
@@ -0,0 +1,221 @@
+//**************************************************************************************************
+//                          OSSIM -- Open Source Software Image Map
+//
+// License:  See top level LICENSE.txt file.
+//
+// Authors:  Oscar Kramer, David Burken
+//
+// Description: Test code for multi-threaded sequencer and associated logic.
+//
+// $Id$
+//**************************************************************************************************
+
+#include <ossim/base/ossimConstants.h>  
+#include <ossim/base/ossimCommon.h>  
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/imaging/ossimSingleImageChain.h>
+#include <ossim/imaging/ossimImageRenderer.h>
+#include <ossim/imaging/ossimFilterResampler.h>
+#include <ossim/parallel/ossimMultiThreadSequencer.h>
+#include <ossim/parallel/ossimMtDebug.h>
+#include <ossim/base/ossimTimer.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/imaging/ossimTiffWriter.h>
+#include <ossim/imaging/ossimImageMosaic.h>
+#include <iostream>
+#include <sstream>
+
+using namespace std;
+
+//**************************************************************************************************
+// USAGE:  ossim-threaded-chain-test <num_threads> <input_file> <output_file>
+//**************************************************************************************************
+int main(int argc, char *argv[])
+{
+   ossimTimer::instance()->setStartTick();
+
+   ossimArgumentParser ap(&argc, argv);
+   ossimInit::instance()->initialize(ap);
+
+   unsigned int tempUint;
+   ossimArgumentParser::ossimParameter uintParam(tempUint);
+   ossimMtDebug* mt_debug = ossimMtDebug::instance();
+   bool chainCacheEnabled=false;
+   if (ap.read("--chain-cache"))
+      chainCacheEnabled = true;
+   if (ap.read("--handler-cache"))
+      mt_debug->handlerCacheEnabled = true;
+   if (ap.read("--faux-input"))
+      mt_debug->handlerUseFauxTile = true;
+   if (ap.read("--shared-handler"))
+      mt_debug->chainSharedHandlers = true;
+   if (ap.read("--seq-debug"))
+      mt_debug->seqDebugEnabled = true;
+   if (ap.read("--timer"))
+      mt_debug->seqMetricsEnabled = true;
+   if (ap.read("--tblocks", uintParam))
+      mt_debug->seqTimedBlocksDt = tempUint;
+   if (ap.read("--cache-size", uintParam))
+      mt_debug->maxTileCacheSize = tempUint;
+
+   // Parse command line "<num_threads> <input_file> <output_file>":
+   if (argc < 2)
+   {
+      cout << "\n   "<< argv[0] << " [options] <image_file> [<output_file.tif>]\n"
+         << "\n Opens up single image chain and writes to output_file using N threads."
+         << "\n If N=0, this indicates a conventional (unthreaded) sequencer will be used."
+         << "\n If no output file is specified, the processed tiles are dumped on the floor."
+         << "\n Only TIFF file output is supported."
+         << "\n"
+         << "\n Options:"
+         << "\n    --threads <int>     Must be nonzero for multi-threading sequencer"
+         << "\n    --shared-handler    Enable shared handlers"
+         << "\n    --handler-cache     Adds cache to handler adaptor (valid only with shared handler)"
+         << "\n    --chain-cache       Inserts cache source in the image chain"
+         << "\n    --faux-input        Use faux input tiles"
+         << "\n    --seq-debug         Enable sequencer debug"
+         << "\n    --timer             Enable sequencer timing metrics"
+         << "\n    --tblocks <msec>    Enable timed blocks at specified interval"
+         << "\n    --cache-size <int>  Specify the max tile cache factor in sequencer"
+         << endl;
+      return 0;
+   }
+   
+   double t1 = (double)ossimTimer::instance()->time_m()/1000.0;
+
+   ossim_uint32  num_threads = 0;
+   if (ap.read("--threads", uintParam))
+      num_threads = tempUint;
+
+   ossimFilename image_file  = argv[1];
+   ossimFilename output_file;
+   if (argc > 2)
+      output_file = argv[2];
+   
+   // Create original chain:
+   ossimRefPtr<ossimSingleImageChain> singleImageChain =
+      new ossimSingleImageChain(false, chainCacheEnabled, false, false, false, false);
+   if (!singleImageChain->open(image_file))
+   {
+      cout<<"\nUnable to open image file at <"<<image_file<<">. Aborting..."<<endl;
+      return 1;
+   }
+   singleImageChain->createRenderedChain();
+   ossimRefPtr<ossimImageRenderer> renderer = singleImageChain->getImageRenderer();
+   if (renderer.valid())
+      renderer->getResampler()->setFilterType(ossimFilterResampler::ossimFilterResampler_GAUSSIAN);
+   ossimIrect rect = singleImageChain->getBoundingRect();
+
+   // Create complex chain of chains:
+   ossimRefPtr<ossimImageChain> product_chain = new ossimImageChain;
+   ossimRefPtr<ossimImageMosaic> mosaicObject = new ossimImageMosaic;
+   mosaicObject->connectMyInputTo(singleImageChain.get());
+   singleImageChain->changeOwner(mosaicObject.get());
+   product_chain->addFirst(mosaicObject.get());
+
+   // Make sequencer:
+   ossimRefPtr<ossimMultiThreadSequencer> mts = 0;
+   ossimRefPtr<ossimImageSourceSequencer> seq = 0;
+   ossimRefPtr<ossimImageFileWriter> writer = 0;
+   const char* noyes[2]={"no","yes"};
+   if (num_threads > 0)
+   {
+      // Establish the MT sequencer:
+      mts = new ossimMultiThreadSequencer(product_chain.get(), num_threads);
+      seq = mts.get();
+      cout<<"\nUsing multi-threaded sequencer..."
+         << "\n   Input file:             " << image_file
+         << "\n   Output file:            " << output_file
+         << "\n   Number of threads:      " << num_threads
+         << "\n   Using faux input tiles: " << noyes[(int)mt_debug->handlerUseFauxTile]
+         << "\n   Using shared handler:   " << noyes[(int)mt_debug->chainSharedHandlers]
+         << "\n   Using handler cache:    " << noyes[(int)mt_debug->handlerCacheEnabled]
+         << "\n   Using chain cache:      " << noyes[(int)chainCacheEnabled];
+      if ( mt_debug->seqTimedBlocksDt > 0)
+         cout<< "\n   Using timed blocks:     yes (" << mt_debug->seqTimedBlocksDt<<" ms)";
+      else
+         cout<< "\n   Using timed blocks:     no";
+      cout<<"\n   Sequencer cache size:   " << mts->maxCacheSize() << endl;
+   }
+   else
+   {
+      cout<<"\nUsing conventional (unthreaded) sequencer..."
+         << "\n   Input file:             " << image_file
+         << "\n   Output file:            " << output_file<<endl;
+      seq = new ossimImageSourceSequencer(product_chain.get());
+   }
+
+   if (output_file.empty())
+   {
+      // No writer specified, so simply perform the sequencing here:
+      seq->setToStartOfSequence();
+      ossim_uint32 num_tiles = seq->getNumberOfTiles();
+      ossim_uint32 show_every_n = num_tiles/20;
+      ossim_uint32 percent_complete = 0;
+      ossim_uint32 n = 0;
+      cout << "  0%   \r"<<ends;
+      for (ossim_uint32 tile_idx=0; tile_idx<num_tiles; ++tile_idx)
+      {
+         seq->getNextTile();
+         if (++n >= show_every_n)
+         {
+            percent_complete += 5;
+            cout << "  "<<percent_complete<<"%   \r"<<ends;
+            n = 0;
+         }
+      }
+      cout<<endl;
+   }
+   else
+   {
+      // Make writer object since output file was specified:
+      writer = new ossimTiffWriter();
+      writer->connectMyInputTo(product_chain.get());
+      writer->setOutputName(output_file);
+      writer->changeSequencer( seq.get() );
+      if ( !writer->open( output_file ) )
+      {
+         cout<<"\nUnable to create output file at <"<<output_file<<">. Aborting..."<<endl;
+         return 1;
+      }
+
+      // Add a listener to get percent complete and start:
+      ossimStdOutProgress prog(0, true);
+      writer->addListener(&prog);
+
+      // Write the file:
+      double writeStartTime = ossimTimer::instance()->time_s();
+      writer->execute();
+      double writeStopTime = ossimTimer::instance()->time_s();
+      double writeTime = writeStopTime - writeStartTime;
+      
+      double bps = ((ossim_uint64)output_file.fileSize())/writeTime;
+      double megaBytePerSecond = bps / ((double) 1024*1024);
+      cout << "   Write MB per second:    " << setprecision(3) << megaBytePerSecond << endl;
+   }
+   double t2 = (double)ossimTimer::instance()->time_m()/1000.0;
+
+   if (mts.valid())
+   {
+      cout << "   Max cache used:         "<< mts->d_maxCacheUsed << endl;
+      cout << "   Cache emptied count:    "<< ossimString::toString(mts->d_cacheEmptyCount) << endl;
+   }
+   cout << setprecision(3);
+
+   if (mts.valid())
+   {
+      double jgtt = mts->d_jobGetTileT;
+      double jgttpj = jgtt/num_threads;
+      cout << "   Time waiting on jobs:   "<<mts->d_idleTime2<<" s"<<endl;
+      cout << "   Time waiting on cache:  "<<mts->d_idleTime5<<" s"<<endl;
+      cout << "   Handler getTile T:      "<<mts->handlerGetTileT()<<" s"<<endl;
+      cout << "   Job getTile T:          "<<jgtt<<" s"<<endl;
+      cout << "   Average getTile T/job:  "<<jgttpj<<" s"<<endl;
+   }
+   cout << "   Execution time:         " << t2-t1  << " s" << endl;
+   cout << "   Total time:             " << t2    << " s" << endl;
+
+   writer = 0;
+   return 0;
+}
diff --git a/ossim/src/test/ossim-threaded-elevation-test.cpp b/ossim/src/test/ossim-threaded-elevation-test.cpp
new file mode 100644
index 0000000..543cd0d
--- /dev/null
+++ b/ossim/src/test/ossim-threaded-elevation-test.cpp
@@ -0,0 +1,192 @@
+#include <cstdlib> /* for exit */
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/elevation/ossimElevManager.h>
+#include <ossim/elevation/ossimDtedElevationDatabase.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimTimer.h>
+#include <ossim/init/ossimInit.h>
+#include <OpenThreads/Mutex>
+#include <OpenThreads/Barrier>
+#include <OpenThreads/Thread>
+
+OpenThreads::Barrier* startBarrier = 0;
+OpenThreads::Barrier* endBarrier = 0;
+OpenThreads::Mutex accumMutex;
+ossimRefPtr<ossimDtedElevationDatabase> dtedDatabase = new ossimDtedElevationDatabase;
+double accumH = 0.0;
+
+class ElevationThread : public OpenThreads::Thread
+{
+public:
+   ElevationThread(const ossimString& threadName="",
+                   double minLon=-180.0, 
+                   double minLat=-90.0,
+                   double maxLon=180.0,
+                   double maxLat=90.0)
+   :m_threadName(threadName),
+   m_minLat(minLat),
+   m_minLon(minLon),
+   m_maxLat(maxLat),
+   m_maxLon(maxLon)
+   {
+      m_numberOfPointsToQuery = 1000;
+      m_lonDelta = m_maxLon-m_minLon;
+      m_latDelta = m_maxLat-m_minLat;
+      m_mslTest = false;
+   }
+   void setNumberOfPointsToQuery(ossim_uint32 nPoints)
+   {
+      m_numberOfPointsToQuery = nPoints;
+   }
+   virtual void run()
+   {
+      // let all threads start at the same time
+      startBarrier->block();
+      ossim_uint32 idx = 0;
+      double hs=0.0;
+      for(idx = 0; idx < m_numberOfPointsToQuery; ++idx)
+      {
+         ossim_float32 xt = static_cast<double>(rand())/static_cast<double>(RAND_MAX);
+         ossim_float32 yt = static_cast<double>(rand())/static_cast<double>(RAND_MAX);
+         ossimGpt gpt(m_minLat + yt*m_latDelta, m_minLon + xt*m_lonDelta);
+         double h;
+
+#if 0
+         h = ossimElevManager::instance()->getHeightAboveEllipsoid(gpt);// << "==" << ossimElevManager::instance()->getHeightAboveMSL(gpt) << "\n";
+         std::cout << h << "\n";
+#else
+         if(m_mslTest)
+         {
+            h = ossimElevManager::instance()->getHeightAboveMSL(gpt);
+         }
+         else
+         {
+            h = ossimElevManager::instance()->getHeightAboveEllipsoid(gpt);
+         }
+#endif
+         hs += h;
+      }
+
+      accumMutex.lock();
+      accumH += hs / m_numberOfPointsToQuery;
+      accumMutex.unlock();
+
+      // let all threads end at the same time
+      endBarrier->block();
+   }
+   
+   ossimString m_threadName;
+   ossim_uint32 m_numberOfPointsToQuery;
+   double m_minLat;
+   double m_minLon;
+   double m_maxLat;
+   double m_maxLon;
+   double m_latDelta;
+   double m_lonDelta;
+   
+   bool m_mslTest;
+};
+
+int main(int argc, char* argv[])
+{
+   ossimString tempString;
+   ossimArgumentParser::ossimParameter stringParam(tempString);
+   ossimArgumentParser argumentParser(&argc, argv);
+   //ossimInit::instance()->addOptions(argumentParser);
+   ossimInit::instance()->initialize(argumentParser);
+   ossim_uint32 num_threads = 10;
+   ossim_uint32 round_robin = 10;
+   ossim_uint32 num_posts = 1000;
+   ossim_uint32 randomSeed = 0;
+   double minLon = -110.0;
+   double minLat = -90.0;
+   double maxLon = -80.0;
+   double maxLat = 90.0;
+   argumentParser.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
+   argumentParser.getApplicationUsage()->addCommandLineOption("--threads","<int> Specify the number of threads to test simultaneus access to elevation");
+   argumentParser.getApplicationUsage()->addCommandLineOption("--elev-post-queries","<int> Number of elevation post queries per thread");
+   argumentParser.getApplicationUsage()->addCommandLineOption("--posts","Same as elev-post-queries option");
+   argumentParser.getApplicationUsage()->addCommandLineOption("--random-seed", "<int> Value to use as the seed for the random elevation post generator");
+   argumentParser.getApplicationUsage()->addCommandLineOption("--use-geoid-if-null", "<true|false> Specify true or false to use the geoid if the elevation post is null");
+   argumentParser.getApplicationUsage()->addCommandLineOption("--bbox", "<min-lat, min-lon, max-lat, max-lon> Ground rect to constrain the random values to");
+   argumentParser.getApplicationUsage()->addCommandLineOption("--round-robin", "<int> Specifies size of round robin list used by elevation manager.");
+   if (argumentParser.read("-h") ||
+       argumentParser.read("--help"))
+   {
+      argumentParser.getApplicationUsage()->write(ossimNotify(ossimNotifyLevel_WARN));
+      exit(0);
+   }
+   if(argumentParser.read("--threads", stringParam))
+   {
+      num_threads = tempString.toUInt32();
+      round_robin = num_threads;
+   }
+   if(argumentParser.read("--round-robin", stringParam))
+   {
+      round_robin = tempString.toUInt32();
+   }
+   if (argumentParser.read("--elev-post-queries", stringParam) ||
+       argumentParser.read("--posts", stringParam))
+   {
+      num_posts = tempString.toUInt32();
+   }
+   if(argumentParser.read("--random-seed", stringParam))
+   {
+      randomSeed = tempString.toUInt32();
+   }
+   if(argumentParser.read("--use-geoid-if-null", stringParam))
+   {
+      ossimElevManager::instance()->setUseGeoidIfNullFlag(tempString.toBool());
+   }
+   if(argumentParser.read("--bbox", stringParam))
+   {
+      std::vector<ossimString> splitArray;
+      tempString.split(splitArray, ",");
+      if(splitArray.size()==4)
+      {
+         minLon = splitArray[0].toDouble();
+         minLat = splitArray[1].toDouble();
+         maxLon = splitArray[2].toDouble();
+         maxLat = splitArray[3].toDouble();
+         
+         std::cout  << "minlon = " << minLon << "\n";
+         std::cout  << "minlat = " << minLat << "\n";
+         std::cout  << "maxlon = " << maxLon << "\n";
+         std::cout  << "maxlat = " << maxLat << "\n";
+      }
+   }
+
+   ossimElevManager::instance()->setRoundRobinMaxSize(round_robin);
+
+   ossimKeywordlist kwl;
+//   kwl.add("connection_string", "/data/elevation/dted/1k");
+//   kwl.add("type", "ossimDtedElevationDatabase");
+  // std::cout << "Loaded database? " << dtedDatabase->loadState(kwl) << std::endl;
+   srand(randomSeed);
+   std::vector<ElevationThread*> threadList(num_threads);
+   startBarrier = new OpenThreads::Barrier(num_threads); // include the main thread for synching
+   endBarrier = new OpenThreads::Barrier(num_threads+1); //   include main thread for syncing end
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx < num_threads; ++ idx)
+   {
+      threadList[idx] = new ElevationThread("Thread " + ossimString::toString(idx), minLon, minLat, maxLon, maxLat);
+      threadList[idx]->setNumberOfPointsToQuery(num_posts);
+      threadList[idx]->start();
+   }
+   ossimTimer::Timer_t t1 = ossimTimer::instance()->tick();
+
+   // synch all threads to start at the same time
+   std::cout << "Number of threads:         " << num_threads      << "\n";
+   std::cout << "Posts to query per thread: " << num_posts << "\n";
+   //   startBarrier->block();
+   endBarrier->block();
+   std::cout << "All threads finished\n";
+   ossimTimer::Timer_t t2 = ossimTimer::instance()->tick();
+   std::cout << "Time elapsed:              " << ossimTimer::instance()->delta_s(t1, t2) << " seconds" << "\n";
+   std::cout << "mean elevation:              " << accumH/num_threads << "\n";
+   delete startBarrier;
+   delete endBarrier;
+   return 0;
+}
diff --git a/ossim/src/test/ossim-threaded-logfile-test.cpp b/ossim/src/test/ossim-threaded-logfile-test.cpp
new file mode 100644
index 0000000..93fd6f4
--- /dev/null
+++ b/ossim/src/test/ossim-threaded-logfile-test.cpp
@@ -0,0 +1,94 @@
+#include <cstdlib> /* for exit */
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimNotifyContext.h>
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimTimer.h>
+#include <ossim/init/ossimInit.h>
+
+#include <OpenThreads/Mutex>
+#include <OpenThreads/Barrier>
+#include <OpenThreads/Thread>
+OpenThreads::Barrier* startBarrier = 0;
+OpenThreads::Barrier* endBarrier = 0;
+class LogThread : public OpenThreads::Thread
+{
+public:
+   LogThread(const ossimString& threadName)
+   :m_threadName(threadName)
+   {
+      m_numberOfStringsToLog = 1000000;
+   }
+   void setNumberOfStringsToLog(ossim_uint32 nStrings)
+   {
+      m_numberOfStringsToLog = nStrings;
+   }
+   virtual void run()
+   {
+      // let all threads start at the same time
+      startBarrier->block();
+      ossim_uint32 idx = 0;
+      for(idx = 0; idx < m_numberOfStringsToLog; ++idx)
+      {
+         ossimNotify() << m_threadName << std::endl;
+ //        ossimGpt gpt(m_minLat + yt*m_latDelta, m_minLon + xt*m_lonDelta);
+      }
+      // let all threads end at the same time
+      endBarrier->block();
+   }
+   
+   ossimString m_threadName;
+   ossim_uint32 m_numberOfStringsToLog;
+};
+
+int main(int argc, char* argv[])
+{
+   ossimString tempString;
+   ossimArgumentParser::ossimParameter stringParam(tempString);
+   ossimArgumentParser argumentParser(&argc, argv);
+   ossimInit::instance()->addOptions(argumentParser);
+   ossimInit::instance()->initialize(argumentParser);
+   ossim_uint32 threads = 10;
+   ossim_uint32 nvalues = 10;
+   ossim_uint32 randomSeed = 0;
+
+   argumentParser.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
+   argumentParser.getApplicationUsage()->addCommandLineOption("--threads","Specify the number of threads to test simultaneus access to elevation");
+   argumentParser.getApplicationUsage()->addCommandLineOption("--nvalues","Specify the number of random values");
+   if (argumentParser.read("-h") ||
+       argumentParser.read("--help"))
+   {
+      argumentParser.getApplicationUsage()->write(ossimNotify(ossimNotifyLevel_WARN));
+      exit(0);
+   }
+   if(argumentParser.read("--threads", stringParam))
+   {
+      threads = tempString.toUInt32();
+   }
+   if(argumentParser.read("--nvalues", stringParam))
+   {
+      nvalues = tempString.toUInt32();
+   }
+
+   std::vector<LogThread*> threadList(threads);
+   startBarrier = new OpenThreads::Barrier(threads); // include the main thread for synching
+   endBarrier   = new OpenThreads::Barrier(threads+1); //   include main thread for syncing end 
+   ossim_uint32 idx = 0;
+   for(idx = 0; idx < threads; ++ idx)
+   {
+      threadList[idx] = new LogThread("Thread " + ossimString::toString(idx));
+      threadList[idx]->setNumberOfStringsToLog(nvalues);
+      threadList[idx]->start();
+   }
+   ossimTimer::Timer_t t1 = ossimTimer::instance()->tick();
+   // synch all threads to start at the same time
+   std::cout << "Number of threads:         " << threads      << "\n";
+//   startBarrier->block();
+   endBarrier->block();
+   std::cout << "All threads finished\n";
+   ossimTimer::Timer_t t2 = ossimTimer::instance()->tick();
+   std::cout << "Time elapsed:              " << ossimTimer::instance()->delta_s(t1, t2) << " seconds" << "\n";
+   delete startBarrier;
+   delete endBarrier;
+   return 0;
+}
diff --git a/src/test/ossim-threaded-polyarea2d-test.cpp b/ossim/src/test/ossim-threaded-polyarea2d-test.cpp
similarity index 100%
rename from src/test/ossim-threaded-polyarea2d-test.cpp
rename to ossim/src/test/ossim-threaded-polyarea2d-test.cpp
diff --git a/ossim/src/test/ossim-tiff-info-test.cpp b/ossim/src/test/ossim-tiff-info-test.cpp
new file mode 100644
index 0000000..f8128b3
--- /dev/null
+++ b/ossim/src/test/ossim-tiff-info-test.cpp
@@ -0,0 +1,83 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// Description: Test app for ossimTiffInfo class.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossim-tiff-info-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <iostream>
+using namespace std;
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/support_data/ossimTiffInfo.h>
+#include <ossim/support_data/ossimGeoTiff.h>
+
+
+
+int main(int argc, char *argv[])
+{
+   ossimInit::instance()->initialize(argc, argv);
+
+   if (argc != 2)
+   {
+      cout << argv[0] << "<tiff_file>"
+           << "\nPrint dump and geometry info for tiff_file." << endl;
+      return 0;
+   }
+
+   cout << "ossimTiffInfo test:\n";
+   
+   ossimTiffInfo* info = new ossimTiffInfo();
+
+   if ( info->open( ossimFilename(argv[1]) ) )
+   {
+      cout << "ossimTiffInfo dump info:\n";
+      info->print(cout);
+
+      ossimKeywordlist kwl;
+      if ( info->getImageGeometry(kwl, 0) )
+      {
+         cout << "ossimTiffInfo geometry info:\n" << kwl << endl;
+      }
+      else
+      {
+         cout << "ossimTiffInfo get image geometry failed..." << endl;
+      }
+   }
+   else
+   {
+      cout << "Could not open: " << argv[1] << endl;
+   }
+
+   delete info;
+   info = 0;
+
+   cout << "ossimGeoTiff test:\n";
+   
+   ossimGeoTiff* gtif = new ossimGeoTiff();
+   if ( gtif->readTags(argv[1], 0) )
+   {
+      ossimKeywordlist kwl;
+      if ( gtif->addImageGeometry(kwl, 0) )
+      {
+         cout << "ossimGeoTiff geometry info:\n" << kwl << endl;
+      }
+      else
+      {
+         cout << "ossimGeoTiff get image geometry failed..." << endl;
+      }
+   }
+
+   delete gtif;
+   gtif = 0;
+
+   return 0;
+}
+
diff --git a/ossim/src/test/ossim-tiled-elevation-test.cpp b/ossim/src/test/ossim-tiled-elevation-test.cpp
new file mode 100644
index 0000000..1900049
--- /dev/null
+++ b/ossim/src/test/ossim-tiled-elevation-test.cpp
@@ -0,0 +1,209 @@
+//----------------------------------------------------------------------------
+//
+// File: ossim-tiled-elevation-test.cpp
+// 
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description:
+//
+// Test application for ossimTiledElevationDatabase class.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossim-tiled-elevation-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimGpt.h>
+#include <ossim/base/ossimGrect.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimStdOutProgress.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimTimer.h>
+#include <ossim/elevation/ossimElevManager.h>
+#include <ossim/elevation/ossimTiledElevationDatabase.h>
+#include <ossim/imaging/ossimImageGeometry.h>
+#include <ossim/imaging/ossimSingleImageChain.h>
+#include <ossim/imaging/ossimTiffWriter.h>
+
+#include <iostream>
+using namespace std;
+
+static void usage()
+{
+   cout << "ossim-tiled-elevation-test <elev-dir> <input-image> <output-image>"
+        << "\n\nCreates a ossimTiledElevationDatabase from elev-dir for the bounding box of\ninput-image and writes output-image in tiff format.\n\nThis test the ossimTiledElevationDatabase ability to map a region of interest\nand serve it up as an elevation source.  Since this is testing elevation, the\n\"input-image\" should have a projection affected by elevation.  In other words,\nsome type of sensor model." << endl;
+}
+
+int main(int argc, char *argv[])
+{
+   int result = 0;
+
+   ossimTimer::instance()->setStartTick();
+
+   // Turn off elevation initialization as we want to use ours.
+   ossimInit::instance()->setElevEnabledFlag(false);
+   
+   ossimInit::instance()->initialize(argc, argv);
+
+   cout << std::setiosflags(ios::fixed) << std::setprecision(3)
+        << "elapsed time after initialize: "
+        << ossimTimer::instance()->time_s() << "\n";
+   
+   if (argc == 4)
+   {
+      try // Exceptions can be thrown so 
+      {
+         ossimFilename elevDir     = argv[1];
+         ossimFilename inputImage  = argv[2];
+         ossimFilename outputImage = argv[3];
+         
+         cout << "elev-dir: " << elevDir << "\ninput-image: " << inputImage
+              << "\noutput-image: " << outputImage << "\n";
+         
+         ossimTiledElevationDatabase* elevdb = new ossimTiledElevationDatabase();
+         
+         ossimKeywordlist kwl;
+         kwl.setExpandEnvVarsFlag(true);
+         // kwl.add("connection_string", "$(OSSIM_DATA)/elevation/srtm/3arc");
+         kwl.add("connection_string", elevDir.c_str());
+         kwl.add("geoid.type", "geoid1996");
+         kwl.add("max_open_cells", "50");
+         kwl.add("memory_map_cells", "false");
+         kwl.add("min_open_cells", "25");
+         kwl.add("type", "ossimTiledElevationDatabase");
+         
+         if ( elevdb->loadState(kwl, 0) )
+         {
+            ossimRefPtr<ossimSingleImageChain> sic1 = new ossimSingleImageChain();
+            sic1->setAddResamplerCacheFlag(true);
+            sic1->setAddChainCacheFlag(true);
+
+            // Open:
+            if ( sic1->open( inputImage ) )
+            {
+               // Get the geometry:
+               ossimRefPtr<ossimImageGeometry> geom = sic1->getImageGeometry();
+               
+               // Get the bounding rectangle:
+               ossimGrect boundingRect;
+               std::vector<ossimGpt> corner(4);
+               if ( geom->getCornerGpts(corner[0], corner[1], corner[2], corner[3]) )
+               {
+                  ossimGpt ulGpt(corner[0]);
+                  ossimGpt lrGpt(corner[0]);
+                  cout << "corner[0]: " << corner[0] << endl;
+                  for ( ossim_uint32 i = 1; i < 4; ++i )
+                  {
+                     cout << "corner[" << i << "]: " << corner[i] << endl;
+                     if ( corner[i].lon < ulGpt.lon ) ulGpt.lon = corner[i].lon;
+                     if ( corner[i].lat > ulGpt.lat ) ulGpt.lat = corner[i].lat;
+                     if ( corner[i].lon > lrGpt.lon ) lrGpt.lon = corner[i].lon;
+                     if ( corner[i].lat < lrGpt.lat ) lrGpt.lat = corner[i].lat;
+                  }
+
+                  //---
+                  // Add a padding to ensure no nans on edges:
+                  // Should check for wrap here but just test code.
+                  //---
+                  const ossim_float64 PADDING = 1.0/60.0; // one minute.
+                  ulGpt.lon -= PADDING;
+                  ulGpt.lat += PADDING;
+                  lrGpt.lon += PADDING;
+                  lrGpt.lat -= PADDING;
+                  cout << "ulGpt: " << ulGpt
+                       << "\nlrGpt: " << lrGpt
+                       << endl;
+                  boundingRect = ossimGrect(ulGpt, lrGpt);
+               }
+               else
+               {
+                  boundingRect.makeNan();
+               }
+               
+               if ( boundingRect.isLonLatNan() == false )
+               {
+                  // Create the chain:
+                  sic1->createRenderedChain();
+                  
+                  cout << "boundingRect: " << boundingRect << endl;
+                  elevdb->mapRegion(boundingRect);
+
+                  cout << std::setiosflags(ios::fixed) << std::setprecision(3)
+                       << "elapsed time after mapping elevation: "
+                       << ossimTimer::instance()->time_s() << "\n";
+
+                  cout << "ossimTiledElevationDatabase::getMeanSpacingMeters: "
+                       << elevdb->getMeanSpacingMeters() << "\n";
+                  
+                  cout << "mappedRect: " << elevdb->getBoundingGndRect() << endl;
+                  ossimElevManager::instance()->setDefaultHeightAboveEllipsoid(0.0);
+                  ossimElevManager::instance()->setUseGeoidIfNullFlag(true);
+                  ossimElevManager::instance()->addDatabase(elevdb);
+
+#if 0
+                  // 35.821992089329882, 51.437673634967858
+                  // Height: 1874.649761970292 MSL: 1871.642024320508
+                  ossimGpt pt1(35.821992089329882, 51.437673634967858);
+                  ossimGpt pt2(35.843333333333334, 51.373333333333335);
+                  ossimGpt pt3(35.694166666666668, 51.598333333333336);
+
+                  cout << "getHeightAboveEllipsoid(35.821992089329882, 51.437673634967858): "
+                       << ossimElevManager::instance()->getHeightAboveEllipsoid(pt1)
+                       << "\ngetHeightAboveEllipsoid(35.843333333333334, 51.373333333333335): "
+                       << ossimElevManager::instance()->getHeightAboveEllipsoid(pt2)
+                       << "\ngetHeightAboveEllipsoid(35.694166666666668, 51.598333333333336): "
+                       << ossimElevManager::instance()->getHeightAboveEllipsoid(pt3) << endl;
+#endif
+                  
+                  ossimRefPtr<ossimImageFileWriter> writer = new ossimTiffWriter();
+                  if ( writer->open( outputImage ) )
+                  {
+                     // Add a listener to get percent complete.
+                     ossimStdOutProgress prog(0, true);
+                     writer->addListener(&prog);
+                     
+                     writer->connectMyInputTo(0, sic1.get());
+                     writer->execute();
+                     cout << std::setiosflags(ios::fixed) << std::setprecision(3)
+                          << "elapsed time in seconds: "
+                          << ossimTimer::instance()->time_s() << "\n";
+                  }
+                  else
+                  {
+                    cout << "Could not open: " << outputImage << endl;
+                  }
+               }
+               else
+               {
+                  cout << "bounding box for " << inputImage << " has nans...\n";
+               }
+               
+            } // if ( sic1->open( inputImage) ) )
+            else
+            {
+               cout << "Could not open: " << inputImage << endl;
+            }
+            
+            // ossimDrect boundingRect = elevdb->getBounding
+         }
+
+            
+      }
+      catch( const ossimException& e )
+      {
+         ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
+         result = 1;
+      }
+   }
+   else
+   {
+      usage();
+   }
+   return result;
+}
+
+
diff --git a/ossim/src/test/ossim-visitor-test.cpp b/ossim/src/test/ossim-visitor-test.cpp
new file mode 100644
index 0000000..2c6974f
--- /dev/null
+++ b/ossim/src/test/ossim-visitor-test.cpp
@@ -0,0 +1,105 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// File: ossim-foo.cpp
+//
+// Author:  David Burken
+//
+// Description: Contains application definition "foo" app.
+//
+// NOTE:  This is supplied for simple quick test.  Makefile links with
+//        libossim so you don't have to muck with that.
+//        DO NOT checkin your test to the svn repository.  Simply
+//        edit foo.cc (Makefile if needed) and run your test.
+//        After completion you can do a "svn revert foo.cpp" if you want to
+//        keep your working repository up to snuff.  Enjoy!
+//
+// $Id: ossim-visitor-test.cpp 22790 2014-05-16 19:19:30Z gpotts $
+//----------------------------------------------------------------------------
+
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimConstants.h>  // ossim contants...
+#include <ossim/base/ossimCommon.h>  // ossim contants...
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimConnectableObject.h>
+#include <ossim/base/ossimObjectFactoryRegistry.h>
+#include <ossim/base/ossimVisitor.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/init/ossimInit.h>
+
+
+// Put your includes here:
+
+#include <iostream>
+#include <sstream>
+#include <iomanip>
+#include <list>
+#include <algorithm>
+
+static const char* kwl1String = "type: ossimImageChain\n"
+"object1.type: ossimRectangleCutFilter\n";
+
+static const char* kwl2String = "type: ossimImageChain\n"
+"object2.type: ossimBrightnessContrastSource\n";
+
+static const char* kwl3NestedString = "type: ossimImageChain\n"
+"object10.type: ossimScalarRemapper\n"
+"object30.type: ossimImageChain\n"
+"object30.object1.type: ossimImageRenderer\n";
+
+int main(int argc, char *argv[])
+{
+   ossimArgumentParser ap(&argc, argv);
+   ossimInit::instance()->addOptions(ap);
+   ossimInit::instance()->initialize(ap);
+   ossimKeywordlist kwl1;
+   ossimKeywordlist kwl2;
+   ossimKeywordlist kwl3;
+   if(kwl1.parseString(kwl1String)&&
+      kwl2.parseString(kwl2String)&&
+      kwl3.parseString(kwl3NestedString))
+   {
+      ossimRefPtr<ossimObject> obj1 =  ossimObjectFactoryRegistry::instance()->createObject(kwl1);
+      ossimRefPtr<ossimObject> obj2 =  ossimObjectFactoryRegistry::instance()->createObject(kwl2);
+      ossimRefPtr<ossimObject> obj3 =  ossimObjectFactoryRegistry::instance()->createObject(kwl3);
+      
+      ossimRefPtr<ossimConnectableObject> connectable1 = dynamic_cast<ossimConnectableObject*> (obj1.get());
+      ossimRefPtr<ossimConnectableObject> connectable2 = dynamic_cast<ossimConnectableObject*> (obj2.get());
+      ossimRefPtr<ossimConnectableObject> connectable3 = dynamic_cast<ossimConnectableObject*> (obj3.get());
+      
+      if(connectable1.valid()&&connectable2.valid()&&connectable3.valid())
+      {
+         connectable2->connectMyInputTo(connectable1.get());
+         connectable3->connectMyInputTo(connectable2.get());
+         
+         ossimTypeNameVisitor visitor("ossimConnectableObject", false, ossimVisitor::VISIT_CHILDREN|ossimVisitor::VISIT_INPUTS);
+         connectable3->accept(visitor);
+         
+         
+         ossimCollectionVisitor::ListRef& collection = visitor.getObjects();
+         if(collection.size() == 8)
+         {
+            std::cout << "PASSED..." << std::endl;
+         }
+         else 
+         {
+            std::cout << "FAILED..." << std::endl;
+         }
+
+         ossimCollectionVisitor::ListRef::iterator iter=collection.begin();
+//         while(iter != collection.end())
+//         {
+//            std::cout << (*iter)->getClassName() << std::endl;
+//            ++iter;
+//         }
+
+         ossimSourceInitializeVisitor sourceInitVisitor;
+
+         obj1->accept(sourceInitVisitor);
+      }
+   }
+   
+   return 0;
+}
diff --git a/ossim/src/test/ossim-wavelength-test.cpp b/ossim/src/test/ossim-wavelength-test.cpp
new file mode 100644
index 0000000..cbe06f6
--- /dev/null
+++ b/ossim/src/test/ossim-wavelength-test.cpp
@@ -0,0 +1,128 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Description:
+//
+// Test app for ossimWavelength class.
+// 
+//----------------------------------------------------------------------------
+// $Id$
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/support_data/ossimEnviHeader.h>
+#include <ossim/support_data/ossimWavelength.h>
+
+#include <iostream>
+#include <vector>
+using namespace std;
+
+static void usage()
+{
+   cout << "\nUsage:\nossim-wavelength-test <envi-header-file> <wavelength> <threshold_from_center>"
+        << "\nWill output found closest index and wavelength."
+        << "Note: Units in nanometers"
+        << "\nContents of minimal header file:"
+        << "\nwavelength units = Nanometers"
+        << "\nwavelength = {374.323608,  382.530487,  390.737427,  398.944336,  407.150970}"
+        << "\n" << endl;
+}
+
+int main(int argc, char *argv[])
+{
+   ossimInit::instance()->initialize(argc, argv);
+
+   if (argc != 4)
+   {
+      usage();
+      return 0;
+   }
+
+   ossimFilename hdrFile                   = argv[argc - 3];
+   ossimString   waveLengthString          = argv[argc - 2];
+   ossimString   thresholdFromCenterString = argv[argc - 1];
+   ossim_float64 wavelength                = waveLengthString.toFloat64();
+   ossim_float64 thresholdFromCenter       = thresholdFromCenterString.toFloat64();
+   
+
+   cout << "header file: " << hdrFile
+        << "\nwavelength:  " << waveLengthString
+        << "\nthreshold from center: " << thresholdFromCenterString
+        << "\n";
+
+   if ( hdrFile.exists() )
+   {
+      ossimEnviHeader hdr;
+      if ( hdr.open( hdrFile ) )
+      {
+         ossimWavelength wl;
+         if ( wl.initialize( hdr ) )
+         {
+            cout << "\nossimWavelength::getRgbBands returned:\n";
+            std::vector<ossim_uint32> bands;
+            ossim_uint32 band = 0;
+            if ( wl.getRgbBands( bands ) )
+            {
+               std::vector<ossim_uint32>::const_iterator i = bands.begin();
+               while ( i != bands.end() )
+               {
+                  cout << "band[" << band << "]: " << (*i) << "\n";
+                  ++band;
+                  ++i;
+               }
+            }
+            else
+            {
+               cout << "error...\n";
+            }
+
+            cout << "\nossimWavelength::findClosestIterator(...) returned:\n";
+            ossimWavelength::WavelengthMap::const_iterator i =
+               wl.findClosestIterator( wavelength, thresholdFromCenter );
+            if ( i != wl.end() )
+            {
+               cout << "(*i).first: " << (*i).first << " (*i).second: " << (*i).second << "\n";
+            }
+            else
+            {
+               cout << "error...\n";
+            }
+
+            cout << "\nossimWavelength::findClosestIndex(...) returned:\n";
+            ossim_int32 index = wl.findClosestIndex( wavelength, thresholdFromCenter );
+            if ( index > -1 )
+            {
+               cout << "index: " << index << "\n";
+            }
+            else
+            {
+               cout << "error...\n";
+            }
+
+
+            
+         }
+         else
+         {
+            cerr << "ossimWavelength::initialize( ossimEnviHeader ) failed!" << endl;
+         }
+      }
+      else
+      {
+         cout << "Could not open: " << hdrFile << endl;
+      }
+   }
+   else
+   {
+      cerr << "File: " << hdrFile << "\nDoes not exists!" << endl;
+      usage();
+   }
+   cout << endl;
+   
+   return 0;
+   
+} // End of main...
+
+
diff --git a/ossim/src/test/ossim-wkt-proj-factory-test.cpp b/ossim/src/test/ossim-wkt-proj-factory-test.cpp
new file mode 100644
index 0000000..cb081b4
--- /dev/null
+++ b/ossim/src/test/ossim-wkt-proj-factory-test.cpp
@@ -0,0 +1,123 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// Author:  Oscar Kramer
+//
+// Description: Unit test application for WKT Projection Factory.
+//
+// $Id$
+//----------------------------------------------------------------------------
+
+#include <vector>
+#include <iostream>
+#include <fstream>
+#include <cassert>
+
+using namespace std;
+
+#include <ossim/init/ossimInit.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/projection/ossimWktProjectionFactory.h>
+#include <ossim/projection/ossimEquDistCylProjection.h>
+#include <ossim/projection/ossimCylEquAreaProjection.h>
+#include <ossim/projection/ossimTransMercatorProjection.h>
+#include <ossim/projection/ossimMercatorProjection.h>
+#include <ossim/projection/ossimLambertConformalConicProjection.h>
+#include <ossim/projection/ossimUtmProjection.h>
+
+static const char* P1 = "PROJCS[\"NAD_1983_HARN_Lambert_Conformal_Conic\",\
+GEOGCS[\"GCS_North_American_1983_HARN\",DATUM[\"NAD83_High_Accuracy_Regional_Network\",\
+SPHEROID[\"GRS_1980\",6378137,298.257222101, AUTHORITY[\"EPSG\",\"7019\"]],\
+AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433]],\
+PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",43],\
+PARAMETER[\"standard_parallel_2\",45.5],PARAMETER[\"latitude_of_origin\",41.75],\
+PARAMETER[\"central_meridian\",-120.5],PARAMETER[\"false_easting\",1312335.958005249],\
+PARAMETER[\"false_northing\",0],UNIT[\"foot\",0.3048, AUTHORITY[\"EPSG\",\"9002\"]]]";
+
+static const char* P2 = "PROJCS[\"WGS_1984_UTM_Zone_41N\",\
+AUTHORITY[\"EPSG\",\"32641\"]],GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",\
+SPHEROID[\"WGS 84\",6378137,298.2572235630016, AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],\
+PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],\
+PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",63],PARAMETER[\"scale_factor\",0.9996],\
+PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,\
+AUTHORITY[\"EPSG\",\"9001\"]]]";
+
+static const char* P3 = "PROJCS[\"Cylindrical_Equal_Area \",\
+GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",\
+SPHEROID[\"WGS 84\",6378137,298.2572235630016, AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],\
+PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433]],PROJECTION[\"Cylindrical_Equal_Area\"],\
+PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",63],PARAMETER[\"scale_factor\",0.9996],\
+PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,\
+AUTHORITY[\"EPSG\",\"9001\"]]]";
+
+static const char* P4 = "PROJCS[\"World_Equidistant_Cylindrical\",\
+GEOGCS[\"GCS_WGS_1984\",DATUM[\"WGS_1984\",SPHEROID[\"WGS_1984\",6378137,298.257223563]],\
+PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]],PROJECTION[\"Equirectangular\"],\
+PARAMETER[\"False_Easting\",0],PARAMETER[\"False_Northing\",0],PARAMETER[\"Central_Meridian\",0],\
+PARAMETER[\"Standard_Parallel_1\",60],UNIT[\"Meter\",1],AUTHORITY[\"EPSG\",\"54002\"]]";
+
+static const char* P5 = "PROJCS[\"ETRS89 / Jersey Transverse Mercator\",\
+GEOGCS[\"ETRS89\",DATUM[\"European_Terrestrial_Reference_System_1989\",\
+SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],\
+AUTHORITY[\"EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],\
+UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4258\"]],\
+PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",49.225],\
+PARAMETER[\"central_meridian\",-2.135],PARAMETER[\"scale_factor\",0.9999999],\
+PARAMETER[\"false_easting\",40000],PARAMETER[\"false_northing\",70000],UNIT[\"metre\",1,\
+AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]]";
+
+static const char* P6 = "PROJCS[\"World_Mercator\",\
+GEOGCS[\"GCS_WGS_1984\",DATUM[\"WGS_1984\",SPHEROID[\"WGS_1984\",6378137,298.257223563]],\
+PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]],PROJECTION[\"Mercator_1SP\"],\
+PARAMETER[\"False_Easting\",0],PARAMETER[\"False_Northing\",0],PARAMETER[\"Central_Meridian\",0],\
+PARAMETER[\"latitude_of_origin\",0],UNIT[\"Meter\",1]]";
+
+int main(int argc, char* argv[])
+{
+   cout << "ossimWktProjectionFactory Test:" << endl;
+   ossimInit::instance()->initialize(argc, argv);
+
+   cout << "  Testing getTypeNameList()... "; cout.flush();
+   std::vector<ossimString> typeList;
+   ossimWktProjectionFactory::instance()->getTypeNameList(typeList);
+   std::size_t size = typeList.size();
+   assert(size == 2917);
+   cout << "  Passed.\n" << endl;
+
+   ossimMapProjection* proj;
+
+//   cout << "  Testing Lambert_Conformal_Conic (P1)... "; cout.flush();
+//   assert(dynamic_cast<ossimLambertConformalConicProjection*>(
+//         ossimWktProjectionFactory::instance()->createProjection(ossimString(P1))));
+//   cout << "  Passed.\n";
+
+   cout << "  Testing WGS_1984_UTM_Zone_41N (P2)... "; cout.flush();
+   assert(dynamic_cast<ossimUtmProjection*>(
+         ossimWktProjectionFactory::instance()->createProjection(ossimString(P2))));
+   cout << "  Passed.\n";
+
+   cout << "  Testing Cylindrical_Equal_Area (P3)... "; cout.flush();
+   assert(dynamic_cast<ossimCylEquAreaProjection*>(
+         ossimWktProjectionFactory::instance()->createProjection(ossimString(P3))));
+   cout << "  Passed.\n";
+
+   cout << "  Testing Equidistant_Cylindrical (P4)... "; cout.flush();
+   assert(dynamic_cast<ossimEquDistCylProjection*>(
+         ossimWktProjectionFactory::instance()->createProjection(ossimString(P4))));
+   cout << "  Passed.\n";
+
+   cout << "  Testing Transverse_Mercator (P5)... "; cout.flush();
+   assert(dynamic_cast<ossimTransMercatorProjection*>(
+         ossimWktProjectionFactory::instance()->createProjection(ossimString(P5))));
+   cout << "  Passed.\n";
+
+   cout << "  Testing Mercator (P6)... "; cout.flush();
+   assert(dynamic_cast<ossimMercatorProjection*>(
+         ossimWktProjectionFactory::instance()->createProjection(ossimString(P6))));
+   cout << "  Passed.\n";
+
+   return 0;
+}
+
+
diff --git a/ossim/src/test/ossim-wkt-test.cpp b/ossim/src/test/ossim-wkt-test.cpp
new file mode 100644
index 0000000..2a0595c
--- /dev/null
+++ b/ossim/src/test/ossim-wkt-test.cpp
@@ -0,0 +1,53 @@
+//----------------------------------------------------------------------------
+//
+// License:  See top level LICENSE.txt file.
+//
+// File: ossim-wkt-test.cpp
+//
+// Author:  David Burken
+//
+// Description: Contains application definition "ossim-wkt-test" app.
+//----------------------------------------------------------------------------
+
+#include <ossim/base/ossimArgumentParser.h>
+#include <ossim/base/ossimApplicationUsage.h>
+#include <ossim/base/ossimException.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/init/ossimInit.h>
+#include <ossim/support_data/ossimWkt.h>
+
+#include <iostream>
+#include <string>
+using namespace std;
+
+int main(int argc, char *argv[])
+{
+   int returnCode = 0;
+   
+   ossimArgumentParser ap(&argc, argv);
+   ossimInit::instance()->addOptions(ap);
+   ossimInit::instance()->initialize(ap);
+
+   try
+   {
+      std::string wktString = "PROJCS[\"WGS 84 / UTM zone 55S\",GEOGCS[\"WGS 84\",DATUM[\"World Geodetic System_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse Mercator\",AUTHORITY[\"EPSG\",\"9807\"]],PARAMETER[\"Latitude of natural origin\",0],PARAMETER[\"Lo [...]
+
+      ossimWkt wkt;
+      if ( wkt.parse( wktString ) )
+      {
+          ossimNotify(ossimNotifyLevel_NOTICE) << wkt.getKwl() << endl;
+      }
+      else
+      {
+         ossimNotify(ossimNotifyLevel_WARN)  << "wkt string parse failed!" << endl;
+         returnCode = 1;
+      }
+   }
+   catch (const ossimException& e)
+   {
+      ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
+      returnCode = 1;
+   }
+   
+   return returnCode;
+}
diff --git a/ossim/src/test/ossim-xml-test.cpp b/ossim/src/test/ossim-xml-test.cpp
new file mode 100644
index 0000000..8c41a81
--- /dev/null
+++ b/ossim/src/test/ossim-xml-test.cpp
@@ -0,0 +1,49 @@
+//----------------------------------------------------------------------------
+//
+// License: MIT
+// 
+// See LICENSE.txt file in the top level directory for more details.
+//
+// Author:  David Burken
+//
+// XML functions test.
+// 
+//----------------------------------------------------------------------------
+// $Id: ossim-xml-test.cpp 23664 2015-12-14 14:17:27Z dburken $
+
+#include <iostream>
+using namespace std;
+
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimXmlDocument.h>
+#include <ossim/init/ossimInit.h>
+
+int main(int argc, char *argv[])
+{
+   ossimInit::instance()->initialize(argc, argv);
+
+   if (argc != 2)
+   {
+      cout << "usage: " << argv[0] << " <xml_file>" << endl;
+      return 0;
+   }
+   
+   ossimFilename f = argv[1];
+
+   cout << "file: " << f << endl;
+
+   ossimXmlDocument* xdoc = new ossimXmlDocument();
+   if ( xdoc->openFile(f) )
+   {
+      cout << "opened..." << endl;
+   }
+   else
+   {
+      cout << "not opened..." << endl;
+   }
+   
+   delete xdoc;
+
+   return 0;
+}
+
diff --git a/scripts/.cvsignore b/scripts/.cvsignore
deleted file mode 100644
index e69de29..0000000
diff --git a/scripts/Makefile b/scripts/Makefile
deleted file mode 100755
index 1263948..0000000
--- a/scripts/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-all:
diff --git a/scripts/change_report b/scripts/change_report
deleted file mode 100755
index 602f6ec..0000000
--- a/scripts/change_report
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-if test $# != 2 -a $# != 1 ; then
-    echo "Need to supply a date string"
-    echo "change_report <date format> <verbose_flag>"
-    echo "where <data format> is of the form support by cvs"
-    echo "one example might be <year>-<month>-<day>"
-    echo "<verbose_flag> is set to true then a log is printed for each file"
-    exit 0
-fi
-
-cvs diff -D $1 2> change_report_temp_error |grep "Index:" > change_report_temp.txt 
-
-if test "$2" = "true" ; then
-  sed /Index:\ /s/// change_report_temp.txt | cvs log -d $1 2> change_report_temp_error
-else
-  sed /Index:\ /s/// change_report_temp.txt > change_report_temp2.txt
-  cat change_report_temp2.txt
-fi
-
-
-
-rm -f change_report_temp2.txt change_report_temp.txt change_report_temp_error
diff --git a/scripts/convert_headers.pl b/scripts/convert_headers.pl
deleted file mode 100755
index 55b4b5f..0000000
--- a/scripts/convert_headers.pl
+++ /dev/null
@@ -1,176 +0,0 @@
-#!/usr/bin/perl
-use File::Copy;
-$Base_Dir = "";
-$header_index;
-#$Headers_Dir = "";
- at headers;
-$cpp_index;
-$c_index;
- at cpp;
- at c;
-
-sub process_headers
-{
-	if (opendir(Input_Files, $Base_Dir . $_[0]))
-	{
-		foreach $name (sort readdir(Input_Files))
-		{ 
-			if (substr($name, length($name) - 2, length($name)) eq ".h")
-			{
-				@headers[$header_index] = $name;
-				@headers_Path[$header_index] = $Base_Dir . $_[0] .  "/" . $name;
-				$header_index = $header_index + 1;
-			} elsif ($name ne "." && $name ne ".." && $name[0] ne '.')
-			{
-				process_headers($_[0] .  "/" . $name);
-			}			
-		} 
-		closedir(Input_Files);
-	}
-}
-
-sub process_cpp
-{
-	if (opendir(Input_Files, $Base_Dir . $_[0]))
-	{
-		foreach $name (sort readdir(Input_Files))
-		{ 
-			if (substr($name, length($name) - 4, length($name)) eq ".cpp" or
-				substr($name, length($name) - 2, length($name)) eq ".c")
-			{
-				@cpp[$cpp_index] = $Base_Dir . $_[0] .  "/" . $name;
-				$cpp_index = $cpp_index + 1;
-			} elsif ($name ne "." && $name ne ".." && $name[0] ne '.')
-			{
-				process_cpp($_[0] .  "/" . $name);
-			}			
-		} 
-		closedir(Input_Files);
-	}
-}
-
-sub mod_headers
-{
-	# open each file in $headers_path
-	open(HANDLE, @headers_Path[$_[0]]);
-#	$outpath = $Headers_Dir . "/" . $headers[$_[0]];
-	@raw_data=<HANDLE>;
-	close(HANDLE);
-	open(OUTHANDLE, ">@headers_Path[$_[0]]");
-	
-	foreach $line (@raw_data)
-	{
-		# search for lines starting with "#include"
-		if ($line =~ m/#include/)
-		{
-			chop($line);
-    		# compare .h file to all values in @headaers
-			for ($j=1; $j < $header_index; $j++)
-			{
-				$position = index($line, @headers[$j]);
-
-		 		if ($position ge 0)
-		 		{
-		 			if (substr($line, $position - 1, 1) eq '/' | substr($line, $position - 1, 1) eq '"' |
-		 				substr($line, $position - 1, 1) eq '<')
-		 			{
-						 # if found change to "ossim/@headers[i]"
-						$start = index($line, '"');
-						if ($start eq -1)
-						{
-							$start = index($line, '<');
-							$end = index($line, '>', $start + 1);
-						} else
-						{
-							$end = index($line, '"', $start + 1);
-						}
-						$line = substr($line, 0, $start + 1) . "ossim/" . $headers[$j] . substr($line, $end, length($line));
-						goto EXIT;
-					}
-		 		}
-		 	}
-		 	EXIT:
-			print OUTHANDLE $line . "\n";
-		} else
-		{
-			print OUTHANDLE $line;
-		}
-	}
-	close(OUTHANDLE);
-}
-
-sub mod_body
-{
-print @cpp[$_[0]] . "\n";
-	open(HANDLE, @cpp[$_[0]]);
-	@raw_data=<HANDLE>;
-	close(HANDLE);
-	open(OUTHANDLE, ">@cpp[$_[0]]");
-	
-	foreach $line (@raw_data)
-	{
-		# search for lines starting with "#include"
-		if ($line =~ m/#include/)
-		{
-			chop($line);
-    		# compare .h file to all values in @headaers
-			for ($j=1; $j < $header_index; $j++)
-			{
-				$position = index($line, @headers[$j]);
-
-		 		if ($position ge 0)
-		 		{
-		 			if (substr($line, $position - 1, 1) eq '/' | substr($line, $position - 1, 1) eq '"' |
-		 				substr($line, $position - 1, 1) eq '<')
-		 			{		 		
-						# if found change to "ossim/@headers[i]"
-						
-						$start = index($line, '"');
-						if ($start eq -1)
-						{
-							$start = index($line, '<');
-							$end = index($line, '>', $start + 1);
-						} else
-						{
-							$end = index($line, '"', $start + 1);
-						}
-						$line = substr($line, 0, $start + 1) . "ossim/" . $headers[$j] . substr($line, $end, length($line));
-						goto EXIT;
-					}
-		 		}
-		 	}
-		 	EXIT:
-			print OUTHANDLE $line . "\n";
-		} else
-		{
-			print OUTHANDLE $line;
-		}
-	}
-	close(OUTHANDLE);
-
-}
-
-sub move_headers
-{
-#	mkdir "includes", 777
-#	mkdir "includes/ossim", 777
-	for ($j=1; $j < $header_index; $j++)
-	{
-		print $headers_Path[$j] . "\n";
-		move($headers_Path[$j],"includes/ossim/");
-	}
-}
-
-$header_index = 1;
-process_headers("src/ossim_core");
-for ($i=1; $i < $header_index; $i++)
-{
-	mod_headers($i);
-}
-$cpp_index = 1;
-process_cpp("src");
-for ($i=1; $i < $cpp_index; $i++)
-{
-	mod_body($i);
-}
-move_headers("src/ossim_core")
\ No newline at end of file
diff --git a/scripts/convert_headers_readme.txt b/scripts/convert_headers_readme.txt
deleted file mode 100644
index 9cd94c6..0000000
--- a/scripts/convert_headers_readme.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-run this from the main ossim directory.  but first create directory includes/ossim (you can mod the script fairly easily to change this.
-
-then it will change the header and body files to use ossim/xxx.h then move the header files to includes/ossim.
-
-i am off to work, send me email there if you have questions.
diff --git a/scripts/icp.sh b/scripts/icp.sh
deleted file mode 100755
index 0257174..0000000
--- a/scripts/icp.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-#--------------------------------------------------------------------
-# -*-Shell-script-*-
-#
-# Script wrapper for ossim igen application.  Intention is to set
-# environment up for application, then call it.
-#
-# License: LGPL
-#
-#--------------------------------------------------------------------
-# $Id: icp.sh 7891 2005-08-05 12:54:29Z dburken $
-
-# Source the environment file.
-. /usr/local/ossim/bin/ossim_environment
-
-# Call the icp application passing all args.
-icp $*
diff --git a/scripts/igen.sh b/scripts/igen.sh
deleted file mode 100755
index eef7b93..0000000
--- a/scripts/igen.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-#--------------------------------------------------------------------
-# -*-Shell-script-*-
-#
-# Script wrapper for ossim igen application.  Intention is to set
-# environment up for application, then call it.
-#
-# License: LGPL
-#
-# $Id: igen.sh 7891 2005-08-05 12:54:29Z dburken $
-#--------------------------------------------------------------------
-
-# Source the environment file.
-. /usr/local/ossim/bin/ossim_environment
-
-# Call the igen application passing all args.
-igen $*
diff --git a/scripts/movecc2cpp.sh b/scripts/movecc2cpp.sh
deleted file mode 100755
index 35192a1..0000000
--- a/scripts/movecc2cpp.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-for i in `find src -name "*.cc"`
-do
-base=`echo $i | cut -d. -f1`
-
-mv $i $base.cpp
-done
\ No newline at end of file
diff --git a/scripts/orthoigen.sh b/scripts/orthoigen.sh
deleted file mode 100755
index 24011d5..0000000
--- a/scripts/orthoigen.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-#--------------------------------------------------------------------
-# -*-Shell-script-*-
-#
-# Script wrapper for ossim igen application.  Intention is to set
-# environment up for application, then call it.
-#
-# License: LGPL
-#
-#--------------------------------------------------------------------
-# $Id: orthoigen.sh 8065 2005-09-12 15:30:21Z dburken $
-
-# Source the environment file.
-. /usr/local/ossim/bin/ossim_environment
-
-###
-# Call the orthoigen application passing all args.
-# We're going to use the full path to avoid problems with MPI.
-###
-/usr/local/ossim/bin/orthoigen $*
diff --git a/scripts/ossim_environment b/scripts/ossim_environment
deleted file mode 100755
index 65c5e74..0000000
--- a/scripts/ossim_environment
+++ /dev/null
@@ -1,33 +0,0 @@
-#-------------------------------------------------------------------
-# -*-Shell-script-*-
-#
-# This file is not a stand-alone shell script; it provides the 
-# environment for ossim application script wrappers that source it.
-#
-# License: LGPL
-#
-#-------------------------------------------------------------------
-# $Id: ossim_environment 8012 2005-09-01 19:56:50Z dburken $
-
-# Set up a default search path.
-PATH="/usr/local/ossim/bin"
-export PATH
-
-#---
-# Tell ossim where to find the ossim_preferences file:
-#---
-OSSIM_PREFS_FILE="/usr/local/ossim/bin/ossim_preferences"
-export OSSIM_PREFS_FILE
-
-#---
-# Set up a default ld library path.
-#
-# Note:
-#   
-# In this example all code that ossim relies upon was configured with
-# the --prefix=/usr/local/ossim to make a sandbox for ossim applications; 
-# hence, there is only one place to look for libraries.
-#
-#---
-LD_LIBRARY_PATH="/usr/local/ossim/lib"
-export LD_LIBRARY_PATH
diff --git a/scripts/whatsout b/scripts/whatsout
deleted file mode 100755
index 11abda0..0000000
--- a/scripts/whatsout
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/perl
-#
-# Author:  David Burken
-#
-# Description:
-#
-# Script to check a svn workspace and return whatsout.
-#
-# $Id: whatsout 11781 2007-09-30 19:15:03Z dburken $
-
-
-###
-# Use the "svn status" command and stuff the output to an array.
-###
-$command = "svn status";
-
-# print("$command\n");
- at output = `$command`;
-
-###
-# Parse the output and print any files that have been modified.
-###
-foreach $line (@output)	
-{
-   chop ($line);
-   if($line =~ /^M /)
-   {
-      $line =~ s/M //;
-      print ("$line\n");
-   }
-}
-
-exit 0;
diff --git a/share/ossim/ossim_epsg_projections-v7_4.csv b/share/ossim/ossim_epsg_projections-v7_4.csv
deleted file mode 100644
index 93c5996..0000000
--- a/share/ossim/ossim_epsg_projections-v7_4.csv
+++ /dev/null
@@ -1,3252 +0,0 @@
-EPSG_DB_FORMAT_A
-code,name,type,unit,datum code,datum name,ellipsoid,False easting,Latitude of natural origin,False northing,Longitude of natural origin,Scale factor at natural origin,Azimuth of initial line,Latitude of projection centre,Northing at projection centre,Angle from Rectified to Skew Grid,Scale factor on initial line,Easting at projection centre,Longitude of projection centre,Latitude of pseudo standard parallel,Scale factor on pseudo standard parallel,Longitude of origin,Latitude of 2nd stan [...]
-2000,Anguilla 1957 / British West Indies Grid,Transverse Mercator,metre,4600,Anguilla 1957,Clarke 1880 (RGS),400000,0,0,-62,0.9995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2001,Antigua 1943 / British West Indies Grid,Transverse Mercator,metre,4601,Antigua 1943,Clarke 1880 (RGS),400000,0,0,-62,0.9995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2002,Dominica 1945 / British West Indies Grid,Transverse Mercator,metre,4602,Dominica 1945,Clarke 1880 (RGS),400000,0,0,-62,0.9995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2003,Grenada 1953 / British West Indies Grid,Transverse Mercator,metre,4603,Grenada 1953,Clarke 1880 (RGS),400000,0,0,-62,0.9995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2004,Montserrat 1958 / British West Indies Grid,Transverse Mercator,metre,4604,Montserrat 1958,Clarke 1880 (RGS),400000,0,0,-62,0.9995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2005,St. Kitts 1955 / British West Indies Grid,Transverse Mercator,metre,4605,St. Kitts 1955,Clarke 1880 (RGS),400000,0,0,-62,0.9995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2006,St. Lucia 1955 / British West Indies Grid,Transverse Mercator,metre,4606,St. Lucia 1955,Clarke 1880 (RGS),400000,0,0,-62,0.9995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2007,St. Vincent 45 / British West Indies Grid,Transverse Mercator,metre,4607,St. Vincent 1945,Clarke 1880 (RGS),400000,0,0,-62,0.9995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2008,NAD27(CGQ77) / SCoPQ zone 2,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,304800,0,0,-55.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2009,NAD27(CGQ77) / SCoPQ zone 3,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,304800,0,0,-58.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2010,NAD27(CGQ77) / SCoPQ zone 4,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,304800,0,0,-61.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2011,NAD27(CGQ77) / SCoPQ zone 5,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,304800,0,0,-64.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2012,NAD27(CGQ77) / SCoPQ zone 6,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,304800,0,0,-67.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2013,NAD27(CGQ77) / SCoPQ zone 7,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,304800,0,0,-70.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2014,NAD27(CGQ77) / SCoPQ zone 8,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,304800,0,0,-73.3,0.9999
-2015,NAD27(CGQ77) / SCoPQ zone 9,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,304800,0,0,-76.3,0.9999
-2016,NAD27(CGQ77) / SCoPQ zone 10,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,304800,0,0,-79.3,0.9999
-2017,NAD27(76) / MTM zone 8,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,304800,0,0,-73.3,0.9999
-2018,NAD27(76) / MTM zone 9,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,304800,0,0,-76.3,0.9999
-2019,NAD27(76) / MTM zone 10,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,304800,0,0,-79.3,0.9999
-2020,NAD27(76) / MTM zone 11,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,304800,0,0,-82.3,0.9999
-2021,NAD27(76) / MTM zone 12,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,304800,0,0,-81,0.9999
-2022,NAD27(76) / MTM zone 13,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,304800,0,0,-84,0.9999
-2023,NAD27(76) / MTM zone 14,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,304800,0,0,-87,0.9999
-2024,NAD27(76) / MTM zone 15,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,304800,0,0,-90,0.9999
-2025,NAD27(76) / MTM zone 16,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,304800,0,0,-93,0.9999
-2026,NAD27(76) / MTM zone 17,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,304800,0,0,-96,0.9999
-2027,NAD27(76) / UTM zone 15N,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,500000,0,0,-93,0.9996
-2028,NAD27(76) / UTM zone 16N,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,500000,0,0,-87,0.9996
-2029,NAD27(76) / UTM zone 17N,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,500000,0,0,-81,0.9996
-2030,NAD27(76) / UTM zone 18N,Transverse Mercator,metre,4608,North American Datum 1927 (1976),Clarke 1866,500000,0,0,-75,0.9996
-2031,NAD27(CGQ77) / UTM zone 17N,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,500000,0,0,-81,0.9996
-2032,NAD27(CGQ77) / UTM zone 18N,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,500000,0,0,-75,0.9996
-2033,NAD27(CGQ77) / UTM zone 19N,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,500000,0,0,-69,0.9996
-2034,NAD27(CGQ77) / UTM zone 20N,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,500000,0,0,-63,0.9996
-2035,NAD27(CGQ77) / UTM zone 21N,Transverse Mercator,metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,500000,0,0,-57,0.9996
-2039,Israel / Israeli TM Grid,Transverse Mercator,metre,4141,Israel,GRS 1980,219529.584,31.4403817,626907.39,35.1216261,1.0000067
-2040,Locodjo 1965 / UTM zone 30N,Transverse Mercator,metre,4142,Locodjo 1965,Clarke 1880 (RGS),500000,0,0,-3,0.9996
-2041,Abidjan 1987 / UTM zone 30N,Transverse Mercator,metre,4143,Abidjan 1987,Clarke 1880 (RGS),500000,0,0,-3,0.9996
-2042,Locodjo 1965 / UTM zone 29N,Transverse Mercator,metre,4142,Locodjo 1965,Clarke 1880 (RGS),500000,0,0,-9,0.9996
-2043,Abidjan 1987 / UTM zone 29N,Transverse Mercator,metre,4143,Abidjan 1987,Clarke 1880 (RGS),500000,0,0,-9,0.9996
-2044,Hanoi 1972 / Gauss-Kruger zone 18,Transverse Mercator,metre,4147,Hanoi 1972,Krassowsky 1940,18500000,0,0,105,1
-2045,Hanoi 1972 / Gauss-Kruger zone 19,Transverse Mercator,metre,4147,Hanoi 1972,Krassowsky 1940,19500000,0,0,111,1
-2046,Hartebeesthoek94 / Lo15,Transverse Mercator (South Orientated),metre,4148,Hartebeesthoek94,WGS 84,0,0,0,15,1
-2047,Hartebeesthoek94 / Lo17,Transverse Mercator (South Orientated),metre,4148,Hartebeesthoek94,WGS 84,0,0,0,17,1
-2048,Hartebeesthoek94 / Lo19,Transverse Mercator (South Orientated),metre,4148,Hartebeesthoek94,WGS 84,0,0,0,19,1
-2049,Hartebeesthoek94 / Lo21,Transverse Mercator (South Orientated),metre,4148,Hartebeesthoek94,WGS 84,0,0,0,21,1,0,0,0,0,0,0,0,0,0,
-2050,Hartebeesthoek94 / Lo23,Transverse Mercator (South Orientated),metre,4148,Hartebeesthoek94,WGS 84,0,0,0,23,1,0,0,0,0,0,0,0,0,0,
-2051,Hartebeesthoek94 / Lo25,Transverse Mercator (South Orientated),metre,4148,Hartebeesthoek94,WGS 84,0,0,0,25,1,0,0,0,0,0,0,0,0,0,
-2052,Hartebeesthoek94 / Lo27,Transverse Mercator (South Orientated),metre,4148,Hartebeesthoek94,WGS 84,0,0,0,27,1,0,0,0,0,0,0,0,0,0,
-2053,Hartebeesthoek94 / Lo29,Transverse Mercator (South Orientated),metre,4148,Hartebeesthoek94,WGS 84,0,0,0,29,1,0,0,0,0,0,0,0,0,0,
-2054,Hartebeesthoek94 / Lo31,Transverse Mercator (South Orientated),metre,4148,Hartebeesthoek94,WGS 84,0,0,0,31,1,0,0,0,0,0,0,0,0,0,
-2055,Hartebeesthoek94 / Lo33,Transverse Mercator (South Orientated),metre,4148,Hartebeesthoek94,WGS 84,0,0,0,33,1,0,0,0,0,0,0,0,0,0,
-2056,CH1903+ / LV95,Oblique Mercator,metre,4149,CH1903+,Bessel 1841,0,0,0,0,0,90,46.570866,1200000,90,1,2600000,7.26225,0,0,
-2057,Rassadiran / Nakhl e Taqi,Oblique Mercator,metre,4153,Rassadiran,International 1924,0,0,0,0,0,0.34179803,27.31077837,3044969.194,0.34179803,0.999895934,658377.437,52.3612741,0,0,
-2058,ED50(ED77) / UTM zone 38N,Transverse Mercator,metre,4154,European Datum 1950(1977),International 1924,500000,0,0,45,0.9996,0,0,0,0,0,0,0,0,0,
-2059,ED50(ED77) / UTM zone 39N,Transverse Mercator,metre,4154,European Datum 1950(1977),International 1924,500000,0,0,51,0.9996,0,0,0,0,0,0,0,0,0,
-2060,ED50(ED77) / UTM zone 40N,Transverse Mercator,metre,4154,European Datum 1950(1977),International 1924,500000,0,0,57,0.9996,0,0,0,0,0,0,0,0,0,
-2061,ED50(ED77) / UTM zone 41N,Transverse Mercator,metre,4154,European Datum 1950(1977),International 1924,500000,0,0,63,0.9996,0,0,0,0,0,0,0,0,0,
-2062,Madrid 1870 (Madrid) / Spain,Lambert Conic Conformal (1SP),metre,4903,Madrid 1870 (Madrid),Struve 1860,600000,40,600000,0,0.998808529,0,0,0,0,0,0,0,0,0,
-2065,S-JTSK (Ferro) / Krovak,Krovak Oblique Conic Conformal,metre,4156,S-JTSK (Ferro),Bessel 1841,0,0,0,0,0,30.1717303,49.3,0,0,0,0,0,78.3,0.9999,42.3
-2066,Mount Dillon / Tobago Grid,Cassini-Soldner,Clarke's link,4157,Mount Dillon,Clarke 1858,187500,11.1507843,180000,-60.4109632,0,0,0,0,0,0,0,0,0,0,
-2067,Naparima 1955 / UTM zone 20N,Transverse Mercator,metre,4158,Naparima 1955,International 1924,500000,0,0,-63,0.9996
-2068,ELD79 / Libya zone 5,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,200000,0,0,9,0.9999
-2069,ELD79 / Libya zone 6,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,200000,0,0,11,0.9999
-2070,ELD79 / Libya zone 7,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,200000,0,0,13,0.9999
-2071,ELD79 / Libya zone 8,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,200000,0,0,15,0.9999
-2072,ELD79 / Libya zone 9,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,200000,0,0,17,0.9999
-2073,ELD79 / Libya zone 10,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,200000,0,0,19,0.9999
-2074,ELD79 / Libya zone 11,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,200000,0,0,21,0.9999
-2075,ELD79 / Libya zone 12,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,200000,0,0,23,0.9999
-2076,ELD79 / Libya zone 13,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,200000,0,0,25,0.9999
-2077,ELD79 / UTM zone 32N,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,500000,0,0,9,0.9996
-2078,ELD79 / UTM zone 33N,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,500000,0,0,15,0.9996
-2079,ELD79 / UTM zone 34N,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,500000,0,0,21,0.9996
-2080,ELD79 / UTM zone 35N,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,500000,0,0,27,0.9996
-2081,Chos Malal 1914 / Argentina zone 2,Transverse Mercator,metre,4160,Chos Malal 1914,International 1924,2500000,-90,0,-69,1
-2082,Pampa del Castillo / Argentina zone 2,Transverse Mercator,metre,4161,Pampa del Castillo,International 1924,2500000,-90,0,-69,1
-2083,Hito XVIII 1963 / Argentina zone 2,Transverse Mercator,metre,4254,Hito XVIII 1963,International 1924,2500000,-90,0,-69,1
-2084,Hito XVIII 1963 / UTM zone 19S,Transverse Mercator,metre,4254,Hito XVIII 1963,International 1924,500000,0,10000000,-69,0.9996
-2087,ELD79 / TM 12 NE,Transverse Mercator,metre,4159,European Libyan Datum 1979,International 1924,500000,0,0,12,0.9996
-2088,Carthage / TM 11 NE,Transverse Mercator,metre,4223,Carthage,Clarke 1880 (IGN),500000,0,0,11,0.9996
-2089,Yemen NGN96 / UTM zone 38N,Transverse Mercator,metre,4163,Yemen National Geodetic Network 1996,WGS 84,500000,0,0,45,0.9996
-2090,Yemen NGN96 / UTM zone 39N,Transverse Mercator,metre,4163,Yemen National Geodetic Network 1996,WGS 84,500000,0,0,51,0.9996
-2093,Hanoi 1972 / GK 106 NE,Transverse Mercator,metre,4147,Hanoi 1972,Krassowsky 1940,500000,0,0,106,1
-2094,WGS 72BE / TM 106 NE,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,106,0.9996
-2095,Bissau / UTM zone 28N,Transverse Mercator,metre,4165,Bissau,International 1924,500000,0,0,-15,0.9996
-2096,Korean 1985 / Korea East Belt,Transverse Mercator,metre,4162,Korean Datum 1985,Bessel 1841,200000,38,500000,129,1
-2097,Korean 1985 / Korea Central Belt,Transverse Mercator,metre,4162,Korean Datum 1985,Bessel 1841,200000,38,500000,127,1
-2098,Korean 1985 / Korea West Belt,Transverse Mercator,metre,4162,Korean Datum 1985,Bessel 1841,200000,38,500000,125,1
-2099,Qatar 1948 / Qatar Grid,Cassini-Soldner,metre,4286,Qatar 1948,Helmert 1906,100000,25.22565,100000,50.4541,
-2100,GGRS87 / Greek Grid,Transverse Mercator,metre,4121,Greek Geodetic Reference System 1987,GRS 1980,500000,0,0,24,0.9996
-2101,Lake / Maracaibo Grid M1,Lambert Conic Conformal (1SP),metre,4249,Lake,International 1924,0,10.1,-52684.972,-71.3620224,1
-2102,Lake / Maracaibo Grid,Lambert Conic Conformal (1SP),metre,4249,Lake,International 1924,200000,10.1,147315.028,-71.3620224,1
-2103,Lake / Maracaibo Grid M3,Lambert Conic Conformal (1SP),metre,4249,Lake,International 1924,500000,10.1,447315.028,-71.3620224,1
-2104,Lake / Maracaibo La Rosa Grid,Lambert Conic Conformal (1SP),metre,4249,Lake,International 1924,-17044,10.1,-23139.97,-71.3620224,1
-2105,NZGD2000 / Mount Eden 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-36.5247,800000,174.4551,0.9999
-2106,NZGD2000 / Bay of Plenty 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-37.454,800000,176.2758,1
-2107,NZGD2000 / Poverty Bay 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-38.3728,800000,177.5308,1
-2108,NZGD2000 / Hawkes Bay 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-39.3903,800000,176.4025,1
-2109,NZGD2000 / Taranaki 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-39.0808,800000,174.134,1
-2110,NZGD2000 / Tuhirangi 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-39.3044,800000,175.3824,1
-2111,NZGD2000 / Wanganui 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-40.1431,800000,175.2917,1
-2112,NZGD2000 / Wairarapa 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-40.5531,800000,175.385,1
-2113,NZGD2000 / Wellington 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-41.1804,800000,174.4635,1
-2114,NZGD2000 / Collingwood 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-40.4253,800000,172.4019,1
-2115,NZGD2000 / Nelson 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-41.1628,800000,173.1757,1
-2116,NZGD2000 / Karamea 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-41.1723,800000,172.0632,1
-2117,NZGD2000 / Buller 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-41.4838,800000,171.3452,1
-2118,NZGD2000 / Grey 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-42.2001,800000,171.3259,1
-2119,NZGD2000 / Amuri 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-42.412,800000,173.0036,1
-2120,NZGD2000 / Marlborough 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-41.324,800000,173.4807,1
-2121,NZGD2000 / Hokitika 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-42.531,800000,170.5847,1
-2122,NZGD2000 / Okarito 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-43.0636,800000,170.1539,1
-2123,NZGD2000 / Jacksons Bay 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-43.584,800000,168.3622,1
-2124,NZGD2000 / Mount Pleasant 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-43.3526,800000,172.4337,1
-2125,NZGD2000 / Gawler 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-43.4455,800000,171.2138,1
-2126,NZGD2000 / Timaru 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-44.2407,800000,171.0326,1
-2127,NZGD2000 / Lindis Peak 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-44.4406,800000,169.2803,1
-2128,NZGD2000 / Mount Nicholas 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-45.0758,800000,168.2355,1
-2129,NZGD2000 / Mount York 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-45.3349,800000,167.4419,1
-2130,NZGD2000 / Observation Point 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-45.4858,800000,170.3742,1
-2131,NZGD2000 / North Taieri 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-45.5141,800000,170.1657,0.99996
-2132,NZGD2000 / Bluff 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-46.36,800000,168.2034,1
-2133,NZGD2000 / UTM zone 58S,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,500000,0,10000000,165,0.9996
-2134,NZGD2000 / UTM zone 59S,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,500000,0,10000000,171,0.9996
-2135,NZGD2000 / UTM zone 60S,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,500000,0,10000000,177,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2136,Accra / Ghana National Grid,Transverse Mercator,Gold Coast foot,4168,Accra,War Office,900000,4.4,0,-1,0.99975,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2137,Accra / TM 1 NW,Transverse Mercator,metre,4168,Accra,War Office,500000,0,0,-1,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2138,NAD27(CGQ77) / Quebec Lambert,Lambert Conic Conformal (2SP),metre,4609,North American Datum 1927 (CGQ77),Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,44,-68.3,60,0,0
-2154,RGF93 / Lambert-93,Lambert Conic Conformal (2SP),metre,4171,Reseau Geodesique Francais 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,46.3,3,49,6600000,700000
-2157,IRENET95 / Irish Transverse Mercator,Transverse Mercator,metre,4173,IRENET95,GRS 1980,600000,53.3,750000,-8,0.99982,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2158,IRENET95 / UTM zone 29N,Transverse Mercator,metre,4173,IRENET95,GRS 1980,500000,0,0,-9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2159,Sierra Leone 1924 / New Colony Grid,Transverse Mercator,Gold Coast foot,4174,Sierra Leone Colony 1924,War Office,500000,6.4,0,-12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2160,Sierra Leone 1924 / New War Office Grid,Transverse Mercator,Gold Coast foot,4174,Sierra Leone Colony 1924,War Office,800000,6.4,600000,-12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2161,Sierra Leone 1968 / UTM zone 28N,Transverse Mercator,metre,4175,Sierra Leone 1968,Clarke 1880 (RGS),500000,0,0,-15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2162,Sierra Leone 1968 / UTM zone 29N,Transverse Mercator,metre,4175,Sierra Leone 1968,Clarke 1880 (RGS),500000,0,0,-9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2163,US National Atlas Equal Area,Lambert Azimuthal Equal Area (Spherical),metre,4035,Not specified (based on Clarke 1866 Authalic Sphere),Clarke 1866 Authalic Sphere,0,45,0,-100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2164,Locodjo 1965 / TM 5 NW,Transverse Mercator,metre,4142,Locodjo 1965,Clarke 1880 (RGS),500000,0,0,-5,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2165,Abidjan 1987 / TM 5 NW,Transverse Mercator,metre,4143,Abidjan 1987,Clarke 1880 (RGS),500000,0,0,-5,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2169,Luxembourg 1930 / Gauss,Transverse Mercator,metre,4181,Luxembourg 1930,International 1924,80000,49.5,100000,6.1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2172,Pulkovo 1942(58) / Poland zone II,Oblique Stereographic,metre,4179,Pulkovo 1942(58),Krassowsky 1940,4603000,53.0007,5806000,21.301,0.9998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2173,Pulkovo 1942(58) / Poland zone III,Oblique Stereographic,metre,4179,Pulkovo 1942(58),Krassowsky 1940,3501000,53.35,5999000,17.003,0.9998
-2174,Pulkovo 1942(58) / Poland zone IV,Oblique Stereographic,metre,4179,Pulkovo 1942(58),Krassowsky 1940,3703000,51.4015,5627000,16.402,0.9998
-2175,Pulkovo 1942(58) / Poland zone V,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,237000,0,-4700000,18.573,0.999983
-2176,ETRS89 / Poland CS2000 zone 5,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,5500000,0,0,15,0.999923
-2177,ETRS89 / Poland CS2000 zone 6,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,6500000,0,0,18,0.999923
-2178,ETRS89 / Poland CS2000 zone 7,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,7500000,0,0,21,0.999923
-2179,ETRS89 / Poland CS2000 zone 8,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,8500000,0,0,24,0.999923
-2180,ETRS89 / Poland CS92,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,-5300000,19,0.9993
-2188,Azores Occidental 1939 / UTM zone 25N,Transverse Mercator,metre,4182,Azores Occidental Islands 1939,International 1924,500000,0,0,-33,0.9996
-2189,Azores Central 1948 / UTM zone 26N,Transverse Mercator,metre,4183,Azores Central Islands 1948,International 1924,500000,0,0,-27,0.9996
-2190,Azores Oriental 1940 / UTM zone 26N,Transverse Mercator,metre,4184,Azores Oriental Islands 1940,International 1924,500000,0,0,-27,0.9996
-2192,ED50 / France EuroLambert,Lambert Conic Conformal (1SP),metre,4154,European Datum 1950,International 1924,600000,46.48,2200000,2.2014025,0.99987742
-2193,NZGD2000 / New Zealand Transverse Mercator 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,1600000,0,10000000,173,0.9996
-2195,NAD83(HARN) / UTM zone 2S,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,10000000,-171,0.9996
-2196,ETRS89 / Kp2000 Jutland,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,200000,0,0,9.3,0.99995
-2197,ETRS89 / Kp2000 Zealand,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,12,0.99995
-2198,ETRS89 / Kp2000 Bornholm,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,900000,0,0,15,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2200,ATS77 / New Brunswick Stereographic (ATS77),Oblique Stereographic,metre,4041,Average Terrestrial System 1977,Average Terrestrial System 1977,300000,46.3,800000,-66.3,0.999912,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2201,REGVEN / UTM zone 18N,Transverse Mercator,metre,4189,Red Geodesica Venezolana,GRS 1980,500000,0,0,-75,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2202,REGVEN / UTM zone 19N,Transverse Mercator,metre,4189,Red Geodesica Venezolana,GRS 1980,500000,0,0,-69,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2203,REGVEN / UTM zone 20N,Transverse Mercator,metre,4189,Red Geodesica Venezolana,GRS 1980,500000,0,0,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2204,NAD27 / Tennessee,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.25,34.4,-86,35.15,100000,2000000
-2205,NAD83 / Kentucky North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.58,37.3,-84.15,37.58,0,500000
-2206,ED50 / 3-degree Gauss-Kruger zone 9,Transverse Mercator,metre,4154,European Datum 1950,International 1924,9500000,0,0,27,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2207,ED50 / 3-degree Gauss-Kruger zone 10,Transverse Mercator,metre,4154,European Datum 1950,International 1924,10500000,0,0,30,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2208,ED50 / 3-degree Gauss-Kruger zone 11,Transverse Mercator,metre,4154,European Datum 1950,International 1924,11500000,0,0,33,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2209,ED50 / 3-degree Gauss-Kruger zone 12,Transverse Mercator,metre,4154,European Datum 1950,International 1924,12500000,0,0,36,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2210,ED50 / 3-degree Gauss-Kruger zone 13,Transverse Mercator,metre,4154,European Datum 1950,International 1924,13500000,0,0,39,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2211,ED50 / 3-degree Gauss-Kruger zone 14,Transverse Mercator,metre,4154,European Datum 1950,International 1924,14500000,0,0,42,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2212,ED50 / 3-degree Gauss-Kruger zone 15,Transverse Mercator,metre,4154,European Datum 1950,International 1924,15500000,0,0,45,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2213,ETRS89 / TM 30 NE,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,30,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2215,Manoca 1962 / UTM zone 32N,Transverse Mercator,metre,4193,Manoca 1962,Clarke 1880 (IGN),500000,0,0,9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2216,Qornoq 1927 / UTM zone 22N,Transverse Mercator,metre,4194,Qornoq 1927,International 1924,500000,0,0,-51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2217,Qornoq 1927 / UTM zone 23N,Transverse Mercator,metre,4194,Qornoq 1927,International 1924,500000,0,0,-45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2218,Scoresbysund 1952 / Greenland zone 5 east,Lambert Conic Conformal (West Orientated),metre,4195,Scoresbysund 1952,International 1924,0,70.3,0,-24,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2219,ATS77 / UTM zone 19N,Transverse Mercator,metre,4041,Average Terrestrial System 1977,Average Terrestrial System 1977,500000,0,0,-69,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2220,ATS77 / UTM zone 20N,Transverse Mercator,metre,4041,Average Terrestrial System 1977,Average Terrestrial System 1977,500000,0,0,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2221,Scoresbysund 1952 / Greenland zone 6 east,Lambert Conic Conformal (West Orientated),metre,4195,Scoresbysund 1952,International 1924,0,67.3,0,-32,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2222,NAD83 / Arizona East (ft),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,700000,31,0,-110.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2223,NAD83 / Arizona Central (ft),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,700000,31,0,-111.55,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2224,NAD83 / Arizona West (ft),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,700000,31,0,-113.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2225,NAD83 / California zone 1 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.2,-122,41.4,1640416.667,6561666.667
-2226,NAD83 / California zone 2 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.2,37.4,-122,39.5,1640416.667,6561666.667
-2227,NAD83 / California zone 3 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.04,36.3,-120.3,38.26,1640416.667,6561666.667
-2228,NAD83 / California zone 4 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,35.2,-119,37.15,1640416.667,6561666.667
-2229,NAD83 / California zone 5 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.02,33.3,-118,35.28,1640416.667,6561666.667
-2230,NAD83 / California zone 6 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.47,32.1,-116.15,33.53,1640416.667,6561666.667
-2231,NAD83 / Colorado North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.43,39.2,-105.3,40.47,1000000,3000000
-2232,NAD83 / Colorado Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.27,37.5,-105.3,39.45,1000000,3000000
-2233,NAD83 / Colorado South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.14,36.4,-105.3,38.26,1000000,3000000
-2234,NAD83 / Connecticut (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.12,40.5,-72.45,41.52,500000,1000000
-2235,NAD83 / Delaware (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,656166.667,38,0,-75.25,0.999995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2236,NAD83 / Florida East (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,656166.667,24.2,0,-81,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2237,NAD83 / Florida West (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,656166.667,24.2,0,-82,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2238,NAD83 / Florida North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.35,29,-84.3,30.45,0,1968500
-2239,NAD83 / Georgia East (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,656166.667,30,0,-82.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2240,NAD83 / Georgia West (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,2296583.333,30,0,-84.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2241,NAD83 / Idaho East (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,656166.667,41.4,0,-112.1,0.999947368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2242,NAD83 / Idaho Central (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1640416.667,41.4,0,-114,0.999947368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2243,NAD83 / Idaho West (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,2624666.667,41.4,0,-115.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2246,NAD83 / Kentucky North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.58,37.3,-84.15,37.58,0,1640416.667
-2247,NAD83 / Kentucky South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.44,36.2,-85.45,37.56,1640416.667,1640416.667
-2248,NAD83 / Maryland (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.18,37.4,-77,39.27,0,1312333.333
-2249,NAD83 / Massachusetts Mainland (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.43,41,-71.3,42.41,2460625,656166.667
-2250,NAD83 / Massachusetts Island (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.17,41,-70.3,41.29,0,1640416.667
-2251,NAD83 / Michigan North (ft),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.29,44.47,-87,47.05,0,26246719.16
-2252,NAD83 / Michigan Central (ft),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.11,43.19,-84.22,45.42,0,19685039.37
-2253,NAD83 / Michigan South (ft),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.06,41.3,-84.22,43.4,0,13123359.58
-2254,NAD83 / Mississippi East (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,984250,29.3,0,-88.5,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2255,NAD83 / Mississippi West (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,2296583.333,29.3,0,-90.2,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2256,NAD83 / Montana (ft),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,44.15,-109.3,49,0,1968503.937
-2257,NAD83 / New Mexico East (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,541337.5,31,0,-104.2,0.999909091,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2258,NAD83 / New Mexico Central (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1640416.667,31,0,-106.15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2259,NAD83 / New Mexico West (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,2723091.667,31,0,-107.5,0.999916667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2260,NAD83 / New York East (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,492125,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2261,NAD83 / New York Central (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,820208.333,40,0,-76.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2262,NAD83 / New York West (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1148291.667,40,0,-78.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2263,NAD83 / New York Long Island (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.4,40.1,-74,41.02,0,984250
-2264,NAD83 / North Carolina (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.2,33.45,-79,36.1,0,2000000
-2265,NAD83 / North Dakota North (ft),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.26,47,-100.3,48.44,0,1968503.937
-2266,NAD83 / North Dakota South (ft),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46.11,45.4,-100.3,47.29,0,1968503.937
-2267,NAD83 / Oklahoma North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.34,35,-98,36.46,0,1968500
-2268,NAD83 / Oklahoma South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.56,33.2,-98,35.14,0,1968500
-2269,NAD83 / Oregon North (ft),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.2,43.4,-120.3,46,0,8202099.738
-2270,NAD83 / Oregon South (ft),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.2,41.4,-120.3,44,0,4921259.843
-2271,NAD83 / Pennsylvania North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.53,40.1,-77.45,41.57,0,1968500
-2272,NAD83 / Pennsylvania South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.56,39.2,-77.45,40.58,0,1968500
-2273,NAD83 / South Carolina (ft),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.3,31.5,-81,34.5,0,2000000
-2274,NAD83 / Tennessee (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.15,34.2,-86,36.25,0,1968500
-2275,NAD83 / Texas North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.39,34,-101.3,36.11,3280833.333,656166.667
-2276,NAD83 / Texas North Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.08,31.4,-98.3,33.58,6561666.667,1968500
-2277,NAD83 / Texas Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30.07,29.4,-100.2,31.53,9842500,2296583.333
-2278,NAD83 / Texas South Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28.23,27.5,-99,30.17,13123333.33,1968500
-2279,NAD83 / Texas South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26.1,25.4,-98.3,27.5,16404166.67,984250
-2280,NAD83 / Utah North (ft),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.43,40.2,-111.3,41.47,3280839.895,1640419.948
-2281,NAD83 / Utah Central (ft),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.01,38.2,-111.3,40.39,6561679.79,1640419.948
-2282,NAD83 / Utah South (ft),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.13,36.4,-111.3,38.21,9842519.685,1640419.948
-2283,NAD83 / Virginia North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.02,37.4,-78.3,39.12,6561666.667,11482916.67
-2284,NAD83 / Virginia South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.46,36.2,-78.3,37.58,3280833.333,11482916.67
-2285,NAD83 / Washington North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.3,47,-120.5,48.44,0,1640416.667
-2286,NAD83 / Washington South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.5,45.2,-120.3,47.2,0,1640416.667
-2287,NAD83 / Wisconsin North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.34,45.1,-90,46.46,0,1968500
-2288,NAD83 / Wisconsin Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.15,43.5,-90,45.3,0,1968500
-2289,NAD83 / Wisconsin South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.44,42,-90,44.04,0,1968500
-2290,ATS77 / Prince Edward Isl. Stereographic (ATS77),Oblique Stereographic,metre,4041,Average Terrestrial System 1977,Average Terrestrial System 1977,700000,47.15,400000,-63,0.999912,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2294,ATS77 / MTM Nova Scotia zone 4,Transverse Mercator,metre,4041,Average Terrestrial System 1977,Average Terrestrial System 1977,4500000,0,0,-61.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2295,ATS77 / MTM Nova Scotia zone 5,Transverse Mercator,metre,4041,Average Terrestrial System 1977,Average Terrestrial System 1977,5500000,0,0,-64.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2296,Ammassalik 1958 / Greenland zone 7 east,Lambert Conic Conformal (West Orientated),metre,4196,Ammassalik 1958,International 1924,0,64.3,0,-40,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2299,Qornoq 1927 / Greenland zone 2 west,Lambert Conic Conformal (West Orientated),metre,4194,Qornoq 1927,International 1924,0,79.3,0,-64,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2301,Qornoq 1927 / Greenland zone 3 west,Lambert Conic Conformal (West Orientated),metre,4194,Qornoq 1927,International 1924,0,76.3,0,-64,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2303,Qornoq 1927 / Greenland zone 4 west,Lambert Conic Conformal (West Orientated),metre,4194,Qornoq 1927,International 1924,0,73.3,0,-52,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2304,Qornoq 1927 / Greenland zone 5 west,Lambert Conic Conformal (West Orientated),metre,4194,Qornoq 1927,International 1924,0,70.3,0,-52,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2305,Qornoq 1927 / Greenland zone 6 west,Lambert Conic Conformal (West Orientated),metre,4194,Qornoq 1927,International 1924,0,67.3,0,-52,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2306,Qornoq 1927 / Greenland zone 7 west,Lambert Conic Conformal (West Orientated),metre,4194,Qornoq 1927,International 1924,0,64.3,0,-52,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2307,Qornoq 1927 / Greenland zone 8 east,Lambert Conic Conformal (West Orientated),metre,4194,Qornoq 1927,International 1924,0,61.3,0,-48,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2308,Batavia / TM 109 SE,Transverse Mercator,metre,4211,Batavia,Bessel 1841,500000,0,10000000,109,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2309,WGS 84 / TM 116 SE,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,116,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2310,WGS 84 / TM 132 SE,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,132,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2311,WGS 84 / TM 6 NE,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,6,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2312,Garoua / UTM zone 33N,Transverse Mercator,metre,4197,Garoua,Clarke 1880 (RGS),500000,0,0,15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2313,Kousseri / UTM zone 33N,Transverse Mercator,metre,4198,Kousseri,Clarke 1880 (RGS),500000,0,0,15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2314,Trinidad 1903 / Trinidad Grid (ftCla),Cassini-Soldner,Clarke's foot,4302,Trinidad 1903,Clarke 1858,283800,10.263,214500,-61.2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2315,Campo Inchauspe / UTM zone 19S,Transverse Mercator,metre,4221,Campo Inchauspe,International 1924,500000,0,10000000,-69,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2316,Campo Inchauspe / UTM zone 20S,Transverse Mercator,metre,4221,Campo Inchauspe,International 1924,500000,0,10000000,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2317,PSAD56 / ICN Regional,Lambert Conic Conformal (2SP),metre,4248,Provisional South American Datum 1956,International 1924,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,6,-66,9,1000000,1000000
-2318,Ain el Abd / Aramco Lambert,Lambert Conic Conformal (2SP),metre,4204,Ain el Abd 1970,International 1924,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,25.0522236,48,17,0,0
-2319,ED50 / TM27,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,27,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2320,ED50 / TM30,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,30,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2321,ED50 / TM33,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,33,1
-2322,ED50 / TM36,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,36,1
-2323,ED50 / TM39,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,39,1
-2324,ED50 / TM42,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,42,1
-2325,ED50 / TM45,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,45,1
-2326,Hong Kong 1980 Grid System,Transverse Mercator,metre,4611,Hong Kong 1980,International 1924,836694.05,22.184368,819069.8,114.10428,1
-2327,Xian 1980 / Gauss-Kruger zone 13,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,13500000,0,0,75,1
-2328,Xian 1980 / Gauss-Kruger zone 14,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,14500000,0,0,81,1
-2329,Xian 1980 / Gauss-Kruger zone 15,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,15500000,0,0,87,1
-2330,Xian 1980 / Gauss-Kruger zone 16,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,16500000,0,0,93,1
-2331,Xian 1980 / Gauss-Kruger zone 17,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,17500000,0,0,99,1
-2332,Xian 1980 / Gauss-Kruger zone 18,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,18500000,0,0,105,1
-2333,Xian 1980 / Gauss-Kruger zone 19,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,19500000,0,0,111,1
-2334,Xian 1980 / Gauss-Kruger zone 20,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,20500000,0,0,117,1
-2335,Xian 1980 / Gauss-Kruger zone 21,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,21500000,0,0,123,1
-2336,Xian 1980 / Gauss-Kruger zone 22,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,22500000,0,0,129,1
-2337,Xian 1980 / Gauss-Kruger zone 23,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,23500000,0,0,135,1
-2338,Xian 1980 / Gauss-Kruger CM 75E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,75,1
-2339,Xian 1980 / Gauss-Kruger CM 81E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,81,1
-2340,Xian 1980 / Gauss-Kruger CM 87E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,87,1
-2341,Xian 1980 / Gauss-Kruger CM 93E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,93,1
-2342,Xian 1980 / Gauss-Kruger CM 99E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,99,1
-2343,Xian 1980 / Gauss-Kruger CM 105E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,105,1
-2344,Xian 1980 / Gauss-Kruger CM 111E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,111,1
-2345,Xian 1980 / Gauss-Kruger CM 117E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,117,1
-2346,Xian 1980 / Gauss-Kruger CM 123E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,123,1
-2347,Xian 1980 / Gauss-Kruger CM 129E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,129,1
-2348,Xian 1980 / Gauss-Kruger CM 135E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,135,1
-2349,Xian 1980 / 3-degree Gauss-Kruger zone 25,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,25500000,0,0,75,1
-2350,Xian 1980 / 3-degree Gauss-Kruger zone 26,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,26500000,0,0,78,1
-2351,Xian 1980 / 3-degree Gauss-Kruger zone 27,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,27500000,0,0,81,1
-2352,Xian 1980 / 3-degree Gauss-Kruger zone 28,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,28500000,0,0,84,1
-2353,Xian 1980 / 3-degree Gauss-Kruger zone 29,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,29500000,0,0,87,1
-2354,Xian 1980 / 3-degree Gauss-Kruger zone 30,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,30500000,0,0,90,1
-2355,Xian 1980 / 3-degree Gauss-Kruger zone 31,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,31500000,0,0,93,1
-2356,Xian 1980 / 3-degree Gauss-Kruger zone 32,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,32500000,0,0,96,1
-2357,Xian 1980 / 3-degree Gauss-Kruger zone 33,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,33500000,0,0,99,1
-2358,Xian 1980 / 3-degree Gauss-Kruger zone 34,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,34500000,0,0,102,1
-2359,Xian 1980 / 3-degree Gauss-Kruger zone 35,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,35500000,0,0,105,1
-2360,Xian 1980 / 3-degree Gauss-Kruger zone 36,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,36500000,0,0,108,1
-2361,Xian 1980 / 3-degree Gauss-Kruger zone 37,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,37500000,0,0,111,1
-2362,Xian 1980 / 3-degree Gauss-Kruger zone 38,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,38500000,0,0,114,1
-2363,Xian 1980 / 3-degree Gauss-Kruger zone 39,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,39500000,0,0,117,1
-2364,Xian 1980 / 3-degree Gauss-Kruger zone 40,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,40500000,0,0,120,1
-2365,Xian 1980 / 3-degree Gauss-Kruger zone 41,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,41500000,0,0,123,1
-2366,Xian 1980 / 3-degree Gauss-Kruger zone 42,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,42500000,0,0,126,1
-2367,Xian 1980 / 3-degree Gauss-Kruger zone 43,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,43500000,0,0,129,1
-2368,Xian 1980 / 3-degree Gauss-Kruger zone 44,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,44500000,0,0,132,1
-2369,Xian 1980 / 3-degree Gauss-Kruger zone 45,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,45500000,0,0,135,1
-2370,Xian 1980 / 3-degree Gauss-Kruger CM 75E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,75,1
-2371,Xian 1980 / 3-degree Gauss-Kruger CM 78E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,78,1
-2372,Xian 1980 / 3-degree Gauss-Kruger CM 81E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,81,1
-2373,Xian 1980 / 3-degree Gauss-Kruger CM 84E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,84,1
-2374,Xian 1980 / 3-degree Gauss-Kruger CM 87E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,87,1
-2375,Xian 1980 / 3-degree Gauss-Kruger CM 90E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,90,1
-2376,Xian 1980 / 3-degree Gauss-Kruger CM 93E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,93,1
-2377,Xian 1980 / 3-degree Gauss-Kruger CM 96E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,96,1
-2378,Xian 1980 / 3-degree Gauss-Kruger CM 99E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,99,1
-2379,Xian 1980 / 3-degree Gauss-Kruger CM 102E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,102,1
-2380,Xian 1980 / 3-degree Gauss-Kruger CM 105E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,105,1
-2381,Xian 1980 / 3-degree Gauss-Kruger CM 108E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,108,1
-2382,Xian 1980 / 3-degree Gauss-Kruger CM 111E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,111,1
-2383,Xian 1980 / 3-degree Gauss-Kruger CM 114E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,114,1
-2384,Xian 1980 / 3-degree Gauss-Kruger CM 117E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,117,1
-2385,Xian 1980 / 3-degree Gauss-Kruger CM 120E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,120,1
-2386,Xian 1980 / 3-degree Gauss-Kruger CM 123E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,123,1
-2387,Xian 1980 / 3-degree Gauss-Kruger CM 126E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,126,1
-2388,Xian 1980 / 3-degree Gauss-Kruger CM 129E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,129,1
-2389,Xian 1980 / 3-degree Gauss-Kruger CM 132E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,132,1
-2390,Xian 1980 / 3-degree Gauss-Kruger CM 135E,Transverse Mercator,metre,4610,Xian 1980,IAG 1975,500000,0,0,135,1
-2391,KKJ / Finland zone 1,Transverse Mercator,metre,4123,Kartastokoordinaattijarjestelma (1966),International 1924,1500000,0,0,21,1
-2392,KKJ / Finland zone 2,Transverse Mercator,metre,4123,Kartastokoordinaattijarjestelma (1966),International 1924,2500000,0,0,24,1
-2393,KKJ / Finland Uniform Coordinate System,Transverse Mercator,metre,4123,Kartastokoordinaattijarjestelma (1966),International 1924,3500000,0,0,27,1
-2394,KKJ / Finland zone 4,Transverse Mercator,metre,4123,Kartastokoordinaattijarjestelma (1966),International 1924,4500000,0,0,30,1
-2395,South Yemen / Gauss-Kruger zone 8,Transverse Mercator,metre,4164,South Yemen,Krassowsky 1940,8500000,0,0,45,1
-2396,South Yemen / Gauss-Kruger zone 9,Transverse Mercator,metre,4164,South Yemen,Krassowsky 1940,9500000,0,0,51,1
-2397,Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 3,Transverse Mercator,metre,4178,Pulkovo 1942(83),Krassowsky 1940,3500000,0,0,9,1
-2398,Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 4,Transverse Mercator,metre,4178,Pulkovo 1942(83),Krassowsky 1940,4500000,0,0,12,1
-2399,Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 5,Transverse Mercator,metre,4178,Pulkovo 1942(83),Krassowsky 1940,5500000,0,0,15,1
-2401,Beijing 1954 / 3-degree Gauss-Kruger zone 25,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,25500000,0,0,75,1
-2402,Beijing 1954 / 3-degree Gauss-Kruger zone 26,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,26500000,0,0,78,1
-2403,Beijing 1954 / 3-degree Gauss-Kruger zone 27,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,27500000,0,0,81,1
-2404,Beijing 1954 / 3-degree Gauss-Kruger zone 28,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,28500000,0,0,84,1
-2405,Beijing 1954 / 3-degree Gauss-Kruger zone 29,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,29500000,0,0,87,1
-2406,Beijing 1954 / 3-degree Gauss-Kruger zone 30,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,30500000,0,0,90,1
-2407,Beijing 1954 / 3-degree Gauss-Kruger zone 31,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,31500000,0,0,93,1
-2408,Beijing 1954 / 3-degree Gauss-Kruger zone 32,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,32500000,0,0,96,1
-2409,Beijing 1954 / 3-degree Gauss-Kruger zone 33,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,33500000,0,0,99,1
-2410,Beijing 1954 / 3-degree Gauss-Kruger zone 34,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,34500000,0,0,102,1
-2411,Beijing 1954 / 3-degree Gauss-Kruger zone 35,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,35500000,0,0,105,1
-2412,Beijing 1954 / 3-degree Gauss-Kruger zone 36,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,36500000,0,0,108,1
-2413,Beijing 1954 / 3-degree Gauss-Kruger zone 37,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,37500000,0,0,111,1
-2414,Beijing 1954 / 3-degree Gauss-Kruger zone 38,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,38500000,0,0,114,1
-2415,Beijing 1954 / 3-degree Gauss-Kruger zone 39,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,39500000,0,0,117,1
-2416,Beijing 1954 / 3-degree Gauss-Kruger zone 40,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,40500000,0,0,120,1
-2417,Beijing 1954 / 3-degree Gauss-Kruger zone 41,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,41500000,0,0,123,1
-2418,Beijing 1954 / 3-degree Gauss-Kruger zone 42,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,42500000,0,0,126,1
-2419,Beijing 1954 / 3-degree Gauss-Kruger zone 43,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,43500000,0,0,129,1
-2420,Beijing 1954 / 3-degree Gauss-Kruger zone 44,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,44500000,0,0,132,1
-2421,Beijing 1954 / 3-degree Gauss-Kruger zone 45,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,45500000,0,0,135,1
-2422,Beijing 1954 / 3-degree Gauss-Kruger CM 75E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,75,1
-2423,Beijing 1954 / 3-degree Gauss-Kruger CM 78E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,78,1
-2424,Beijing 1954 / 3-degree Gauss-Kruger CM 81E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,81,1
-2425,Beijing 1954 / 3-degree Gauss-Kruger CM 84E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,84,1
-2426,Beijing 1954 / 3-degree Gauss-Kruger CM 87E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,87,1
-2427,Beijing 1954 / 3-degree Gauss-Kruger CM 90E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,90,1
-2428,Beijing 1954 / 3-degree Gauss-Kruger CM 93E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,93,1
-2429,Beijing 1954 / 3-degree Gauss-Kruger CM 96E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,96,1
-2430,Beijing 1954 / 3-degree Gauss-Kruger CM 99E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,99,1
-2431,Beijing 1954 / 3-degree Gauss-Kruger CM 102E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,102,1
-2432,Beijing 1954 / 3-degree Gauss-Kruger CM 105E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,105,1
-2433,Beijing 1954 / 3-degree Gauss-Kruger CM 108E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,108,1
-2434,Beijing 1954 / 3-degree Gauss-Kruger CM 111E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,111,1
-2435,Beijing 1954 / 3-degree Gauss-Kruger CM 114E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,114,1
-2436,Beijing 1954 / 3-degree Gauss-Kruger CM 117E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,117,1
-2437,Beijing 1954 / 3-degree Gauss-Kruger CM 120E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,120,1
-2438,Beijing 1954 / 3-degree Gauss-Kruger CM 123E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,123,1
-2439,Beijing 1954 / 3-degree Gauss-Kruger CM 126E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,126,1
-2440,Beijing 1954 / 3-degree Gauss-Kruger CM 129E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,129,1
-2441,Beijing 1954 / 3-degree Gauss-Kruger CM 132E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,132,1
-2442,Beijing 1954 / 3-degree Gauss-Kruger CM 135E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,135,1
-2443,JGD2000 / Japan Plane Rectangular CS I,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,33,0,129.3,0.9999
-2444,JGD2000 / Japan Plane Rectangular CS II,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,33,0,131,0.9999
-2445,JGD2000 / Japan Plane Rectangular CS III,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,36,0,132.1,0.9999
-2446,JGD2000 / Japan Plane Rectangular CS IV,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,33,0,133.3,0.9999
-2447,JGD2000 / Japan Plane Rectangular CS V,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,36,0,134.2,0.9999
-2448,JGD2000 / Japan Plane Rectangular CS VI,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,36,0,136,0.9999
-2449,JGD2000 / Japan Plane Rectangular CS VII,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,36,0,137.1,0.9999
-2450,JGD2000 / Japan Plane Rectangular CS VIII,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,36,0,138.3,0.9999
-2451,JGD2000 / Japan Plane Rectangular CS IX,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,36,0,139.5,0.9999
-2452,JGD2000 / Japan Plane Rectangular CS X,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,40,0,140.5,0.9999
-2453,JGD2000 / Japan Plane Rectangular CS XI,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,44,0,140.15,0.9999
-2454,JGD2000 / Japan Plane Rectangular CS XII,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,44,0,142.15,0.9999
-2455,JGD2000 / Japan Plane Rectangular CS XIII,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,44,0,144.15,0.9999
-2456,JGD2000 / Japan Plane Rectangular CS XIV,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,26,0,142,0.9999
-2457,JGD2000 / Japan Plane Rectangular CS XV,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,26,0,127.3,0.9999
-2458,JGD2000 / Japan Plane Rectangular CS XVI,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,26,0,124,0.9999
-2459,JGD2000 / Japan Plane Rectangular CS XVII,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,26,0,131,0.9999
-2460,JGD2000 / Japan Plane Rectangular CS XVIII,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,20,0,136,0.9999
-2461,JGD2000 / Japan Plane Rectangular CS XIX,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,0,26,0,154,0.9999
-2462,Albanian 1987 / Gauss-Kruger zone 4,Transverse Mercator,metre,4191,Albanian 1987,Krassowsky 1940,4500000,0,0,21,1
-2463,Pulkovo 1995 / Gauss-Kruger CM 21E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,21,1
-2464,Pulkovo 1995 / Gauss-Kruger CM 27E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,27,1
-2465,Pulkovo 1995 / Gauss-Kruger CM 33E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,33,1
-2466,Pulkovo 1995 / Gauss-Kruger CM 39E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,39,1
-2467,Pulkovo 1995 / Gauss-Kruger CM 45E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,45,1
-2468,Pulkovo 1995 / Gauss-Kruger CM 51E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,51,1
-2469,Pulkovo 1995 / Gauss-Kruger CM 57E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,57,1
-2470,Pulkovo 1995 / Gauss-Kruger CM 63E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,63,1
-2471,Pulkovo 1995 / Gauss-Kruger CM 69E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,69,1
-2472,Pulkovo 1995 / Gauss-Kruger CM 75E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,75,1
-2473,Pulkovo 1995 / Gauss-Kruger CM 81E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,81,1
-2474,Pulkovo 1995 / Gauss-Kruger CM 87E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,87,1
-2475,Pulkovo 1995 / Gauss-Kruger CM 93E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,93,1
-2476,Pulkovo 1995 / Gauss-Kruger CM 99E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,99,1
-2477,Pulkovo 1995 / Gauss-Kruger CM 105E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,105,1
-2478,Pulkovo 1995 / Gauss-Kruger CM 111E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,111,1
-2479,Pulkovo 1995 / Gauss-Kruger CM 117E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,117,1
-2480,Pulkovo 1995 / Gauss-Kruger CM 123E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,123,1
-2481,Pulkovo 1995 / Gauss-Kruger CM 129E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,129,1
-2482,Pulkovo 1995 / Gauss-Kruger CM 135E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,135,1
-2483,Pulkovo 1995 / Gauss-Kruger CM 141E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,141,1
-2484,Pulkovo 1995 / Gauss-Kruger CM 147E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,147,1
-2485,Pulkovo 1995 / Gauss-Kruger CM 153E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,153,1
-2486,Pulkovo 1995 / Gauss-Kruger CM 159E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,159,1
-2487,Pulkovo 1995 / Gauss-Kruger CM 165E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,165,1
-2488,Pulkovo 1995 / Gauss-Kruger CM 171E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,171,1
-2489,Pulkovo 1995 / Gauss-Kruger CM 177E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,177,1
-2490,Pulkovo 1995 / Gauss-Kruger CM 177W,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,-177,1
-2491,Pulkovo 1995 / Gauss-Kruger CM 171W,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,-171,1
-2494,Pulkovo 1942 / Gauss-Kruger CM 21E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,21,1
-2495,Pulkovo 1942 / Gauss-Kruger CM 27E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,27,1
-2496,Pulkovo 1942 / Gauss-Kruger CM 33E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,33,1
-2497,Pulkovo 1942 / Gauss-Kruger CM 39E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,39,1
-2498,Pulkovo 1942 / Gauss-Kruger CM 45E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,45,1
-2499,Pulkovo 1942 / Gauss-Kruger CM 51E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,51,1
-2500,Pulkovo 1942 / Gauss-Kruger CM 57E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,57,1
-2501,Pulkovo 1942 / Gauss-Kruger CM 63E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,63,1
-2502,Pulkovo 1942 / Gauss-Kruger CM 69E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,69,1
-2503,Pulkovo 1942 / Gauss-Kruger CM 75E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,75,1
-2504,Pulkovo 1942 / Gauss-Kruger CM 81E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,81,1
-2505,Pulkovo 1942 / Gauss-Kruger CM 87E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,87,1
-2506,Pulkovo 1942 / Gauss-Kruger CM 93E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,93,1
-2507,Pulkovo 1942 / Gauss-Kruger CM 99E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,99,1
-2508,Pulkovo 1942 / Gauss-Kruger CM 105E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,105,1
-2509,Pulkovo 1942 / Gauss-Kruger CM 111E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,111,1
-2510,Pulkovo 1942 / Gauss-Kruger CM 117E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,117,1
-2511,Pulkovo 1942 / Gauss-Kruger CM 123E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,123,1
-2512,Pulkovo 1942 / Gauss-Kruger CM 129E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,129,1
-2513,Pulkovo 1942 / Gauss-Kruger CM 135E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,135,1
-2514,Pulkovo 1942 / Gauss-Kruger CM 141E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,141,1
-2515,Pulkovo 1942 / Gauss-Kruger CM 147E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,147,1
-2516,Pulkovo 1942 / Gauss-Kruger CM 153E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,153,1
-2517,Pulkovo 1942 / Gauss-Kruger CM 159E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,159,1
-2518,Pulkovo 1942 / Gauss-Kruger CM 165E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,165,1
-2519,Pulkovo 1942 / Gauss-Kruger CM 171E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,171,1
-2520,Pulkovo 1942 / Gauss-Kruger CM 177E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,177,1
-2521,Pulkovo 1942 / Gauss-Kruger CM 177W,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,-177,1
-2522,Pulkovo 1942 / Gauss-Kruger CM 171W,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,-171,1
-2523,Pulkovo 1942 / 3-degree Gauss-Kruger zone 7,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,7500000,0,0,21,1
-2524,Pulkovo 1942 / 3-degree Gauss-Kruger zone 8,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,8500000,0,0,24,1
-2525,Pulkovo 1942 / 3-degree Gauss-Kruger zone 9,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,9500000,0,0,27,1
-2526,Pulkovo 1942 / 3-degree Gauss-Kruger zone 10,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,10500000,0,0,30,1
-2527,Pulkovo 1942 / 3-degree Gauss-Kruger zone 11,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,11500000,0,0,33,1
-2528,Pulkovo 1942 / 3-degree Gauss-Kruger zone 12,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,12500000,0,0,36,1
-2529,Pulkovo 1942 / 3-degree Gauss-Kruger zone 13,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,13500000,0,0,39,1
-2530,Pulkovo 1942 / 3-degree Gauss-Kruger zone 14,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,14500000,0,0,42,1
-2531,Pulkovo 1942 / 3-degree Gauss-Kruger zone 15,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,15500000,0,0,45,1
-2532,Pulkovo 1942 / 3-degree Gauss-Kruger zone 16,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,16500000,0,0,48,1
-2533,Pulkovo 1942 / 3-degree Gauss-Kruger zone 17,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,17500000,0,0,51,1
-2534,Pulkovo 1942 / 3-degree Gauss-Kruger zone 18,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,18500000,0,0,54,1
-2535,Pulkovo 1942 / 3-degree Gauss-Kruger zone 19,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,19500000,0,0,57,1
-2536,Pulkovo 1942 / 3-degree Gauss-Kruger zone 20,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,20500000,0,0,60,1
-2537,Pulkovo 1942 / 3-degree Gauss-Kruger zone 21,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,21500000,0,0,63,1
-2538,Pulkovo 1942 / 3-degree Gauss-Kruger zone 22,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,22500000,0,0,66,1
-2539,Pulkovo 1942 / 3-degree Gauss-Kruger zone 23,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,23500000,0,0,69,1
-2540,Pulkovo 1942 / 3-degree Gauss-Kruger zone 24,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,24500000,0,0,72,1
-2541,Pulkovo 1942 / 3-degree Gauss-Kruger zone 25,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,25500000,0,0,75,1
-2542,Pulkovo 1942 / 3-degree Gauss-Kruger zone 26,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,26500000,0,0,78,1
-2543,Pulkovo 1942 / 3-degree Gauss-Kruger zone 27,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,27500000,0,0,81,1
-2544,Pulkovo 1942 / 3-degree Gauss-Kruger zone 28,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,28500000,0,0,84,1
-2545,Pulkovo 1942 / 3-degree Gauss-Kruger zone 29,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,29500000,0,0,87,1
-2546,Pulkovo 1942 / 3-degree Gauss-Kruger zone 30,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,30500000,0,0,90,1
-2547,Pulkovo 1942 / 3-degree Gauss-Kruger zone 31,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,31500000,0,0,93,1
-2548,Pulkovo 1942 / 3-degree Gauss-Kruger zone 32,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,32500000,0,0,96,1
-2549,Pulkovo 1942 / 3-degree Gauss-Kruger zone 33,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,33500000,0,0,99,1
-2551,Pulkovo 1942 / 3-degree Gauss-Kruger zone 34,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,34500000,0,0,102,1
-2552,Pulkovo 1942 / 3-degree Gauss-Kruger zone 35,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,35500000,0,0,105,1
-2553,Pulkovo 1942 / 3-degree Gauss-Kruger zone 36,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,36500000,0,0,108,1
-2554,Pulkovo 1942 / 3-degree Gauss-Kruger zone 37,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,37500000,0,0,111,1
-2555,Pulkovo 1942 / 3-degree Gauss-Kruger zone 38,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,38500000,0,0,114,1
-2556,Pulkovo 1942 / 3-degree Gauss-Kruger zone 39,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,39500000,0,0,117,1
-2557,Pulkovo 1942 / 3-degree Gauss-Kruger zone 40,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,40500000,0,0,120,1
-2558,Pulkovo 1942 / 3-degree Gauss-Kruger zone 41,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,41500000,0,0,123,1
-2559,Pulkovo 1942 / 3-degree Gauss-Kruger zone 42,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,42500000,0,0,126,1
-2560,Pulkovo 1942 / 3-degree Gauss-Kruger zone 43,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,43500000,0,0,129,1
-2561,Pulkovo 1942 / 3-degree Gauss-Kruger zone 44,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,44500000,0,0,132,1
-2562,Pulkovo 1942 / 3-degree Gauss-Kruger zone 45,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,45500000,0,0,135,1
-2563,Pulkovo 1942 / 3-degree Gauss-Kruger zone 46,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,46500000,0,0,138,1
-2564,Pulkovo 1942 / 3-degree Gauss-Kruger zone 47,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,47500000,0,0,141,1
-2565,Pulkovo 1942 / 3-degree Gauss-Kruger zone 48,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,48500000,0,0,144,1
-2566,Pulkovo 1942 / 3-degree Gauss-Kruger zone 49,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,49500000,0,0,147,1
-2567,Pulkovo 1942 / 3-degree Gauss-Kruger zone 50,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,50500000,0,0,150,1
-2568,Pulkovo 1942 / 3-degree Gauss-Kruger zone 51,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,51500000,0,0,153,1
-2569,Pulkovo 1942 / 3-degree Gauss-Kruger zone 52,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,52500000,0,0,156,1
-2570,Pulkovo 1942 / 3-degree Gauss-Kruger zone 53,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,53500000,0,0,159,1
-2571,Pulkovo 1942 / 3-degree Gauss-Kruger zone 54,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,54500000,0,0,162,1
-2572,Pulkovo 1942 / 3-degree Gauss-Kruger zone 55,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,55500000,0,0,165,1
-2573,Pulkovo 1942 / 3-degree Gauss-Kruger zone 56,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,56500000,0,0,168,1
-2574,Pulkovo 1942 / 3-degree Gauss-Kruger zone 57,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,57500000,0,0,171,1
-2575,Pulkovo 1942 / 3-degree Gauss-Kruger zone 58,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,58500000,0,0,174,1
-2576,Pulkovo 1942 / 3-degree Gauss-Kruger zone 59,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,59500000,0,0,177,1
-2578,Pulkovo 1942 / 3-degree Gauss-Kruger zone 61,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,61500000,0,0,-177,1
-2579,Pulkovo 1942 / 3-degree Gauss-Kruger zone 62,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,62500000,0,0,-174,1
-2580,Pulkovo 1942 / 3-degree Gauss-Kruger zone 63,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,63500000,0,0,-171,1
-2581,Pulkovo 1942 / 3-degree Gauss-Kruger zone 64,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,64500000,0,0,-168,1
-2582,Pulkovo 1942 / 3-degree Gauss-Kruger CM 21E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,21,1
-2583,Pulkovo 1942 / 3-degree Gauss-Kruger CM 24E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,24,1
-2584,Pulkovo 1942 / 3-degree Gauss-Kruger CM 27E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,27,1
-2585,Pulkovo 1942 / 3-degree Gauss-Kruger CM 30E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,30,1
-2586,Pulkovo 1942 / 3-degree Gauss-Kruger CM 33E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,33,1
-2587,Pulkovo 1942 / 3-degree Gauss-Kruger CM 36E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,36,1
-2588,Pulkovo 1942 / 3-degree Gauss-Kruger CM 39E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,39,1
-2589,Pulkovo 1942 / 3-degree Gauss-Kruger CM 42E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,42,1
-2590,Pulkovo 1942 / 3-degree Gauss-Kruger CM 45E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,45,1
-2591,Pulkovo 1942 / 3-degree Gauss-Kruger CM 48E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,48,1
-2592,Pulkovo 1942 / 3-degree Gauss-Kruger CM 51E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,51,1
-2593,Pulkovo 1942 / 3-degree Gauss-Kruger CM 54E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,54,1
-2594,Pulkovo 1942 / 3-degree Gauss-Kruger CM 57E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,57,1
-2595,Pulkovo 1942 / 3-degree Gauss-Kruger CM 60E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,60,1
-2596,Pulkovo 1942 / 3-degree Gauss-Kruger CM 63E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,63,1
-2597,Pulkovo 1942 / 3-degree Gauss-Kruger CM 66E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,66,1
-2598,Pulkovo 1942 / 3-degree Gauss-Kruger CM 69E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,69,1
-2599,Pulkovo 1942 / 3-degree Gauss-Kruger CM 72E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,72,1
-2601,Pulkovo 1942 / 3-degree Gauss-Kruger CM 75E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,75,1
-2602,Pulkovo 1942 / 3-degree Gauss-Kruger CM 78E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,78,1
-2603,Pulkovo 1942 / 3-degree Gauss-Kruger CM 81E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,81,1
-2604,Pulkovo 1942 / 3-degree Gauss-Kruger CM 84E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,84,1
-2605,Pulkovo 1942 / 3-degree Gauss-Kruger CM 87E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,87,1
-2606,Pulkovo 1942 / 3-degree Gauss-Kruger CM 90E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,90,1
-2607,Pulkovo 1942 / 3-degree Gauss-Kruger CM 93E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,93,1
-2608,Pulkovo 1942 / 3-degree Gauss-Kruger CM 96E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,96,1
-2609,Pulkovo 1942 / 3-degree Gauss-Kruger CM 99E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,99,1
-2610,Pulkovo 1942 / 3-degree Gauss-Kruger CM 102E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,102,1
-2611,Pulkovo 1942 / 3-degree Gauss-Kruger CM 105E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,105,1
-2612,Pulkovo 1942 / 3-degree Gauss-Kruger CM 108E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,108,1
-2613,Pulkovo 1942 / 3-degree Gauss-Kruger CM 111E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,111,1
-2614,Pulkovo 1942 / 3-degree Gauss-Kruger CM 114E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,114,1
-2615,Pulkovo 1942 / 3-degree Gauss-Kruger CM 117E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,117,1
-2616,Pulkovo 1942 / 3-degree Gauss-Kruger CM 120E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,120,1
-2617,Pulkovo 1942 / 3-degree Gauss-Kruger CM 123E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,123,1
-2618,Pulkovo 1942 / 3-degree Gauss-Kruger CM 126E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,126,1
-2619,Pulkovo 1942 / 3-degree Gauss-Kruger CM 129E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,129,1
-2620,Pulkovo 1942 / 3-degree Gauss-Kruger CM 132E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,132,1
-2621,Pulkovo 1942 / 3-degree Gauss-Kruger CM 135E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,135,1
-2622,Pulkovo 1942 / 3-degree Gauss-Kruger CM 138E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,138,1
-2623,Pulkovo 1942 / 3-degree Gauss-Kruger CM 141E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,141,1
-2624,Pulkovo 1942 / 3-degree Gauss-Kruger CM 144E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,144,1
-2625,Pulkovo 1942 / 3-degree Gauss-Kruger CM 147E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,147,1
-2626,Pulkovo 1942 / 3-degree Gauss-Kruger CM 150E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,150,1
-2627,Pulkovo 1942 / 3-degree Gauss-Kruger CM 153E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,153,1
-2628,Pulkovo 1942 / 3-degree Gauss-Kruger CM 156E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,156,1
-2629,Pulkovo 1942 / 3-degree Gauss-Kruger CM 159E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,159,1
-2630,Pulkovo 1942 / 3-degree Gauss-Kruger CM 162E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,162,1
-2631,Pulkovo 1942 / 3-degree Gauss-Kruger CM 165E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,165,1
-2632,Pulkovo 1942 / 3-degree Gauss-Kruger CM 168E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,168,1
-2633,Pulkovo 1942 / 3-degree Gauss-Kruger CM 171E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,171,1
-2634,Pulkovo 1942 / 3-degree Gauss-Kruger CM 174E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,174,1
-2635,Pulkovo 1942 / 3-degree Gauss-Kruger CM 177E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,177,1
-2636,Pulkovo 1942 / 3-degree Gauss-Kruger CM 180E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,180,1
-2637,Pulkovo 1942 / 3-degree Gauss-Kruger CM 177W,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,-177,1
-2638,Pulkovo 1942 / 3-degree Gauss-Kruger CM 174W,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,-174,1
-2639,Pulkovo 1942 / 3-degree Gauss-Kruger CM 171W,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,-171,1
-2640,Pulkovo 1942 / 3-degree Gauss-Kruger CM 168W,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,-168,1
-2641,Pulkovo 1995 / 3-degree Gauss-Kruger zone 7,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,7500000,0,0,21,1
-2642,Pulkovo 1995 / 3-degree Gauss-Kruger zone 8,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,8500000,0,0,24,1
-2643,Pulkovo 1995 / 3-degree Gauss-Kruger zone 9,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,9500000,0,0,27,1
-2644,Pulkovo 1995 / 3-degree Gauss-Kruger zone 10,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,10500000,0,0,30,1
-2645,Pulkovo 1995 / 3-degree Gauss-Kruger zone 11,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,11500000,0,0,33,1
-2646,Pulkovo 1995 / 3-degree Gauss-Kruger zone 12,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,12500000,0,0,36,1
-2647,Pulkovo 1995 / 3-degree Gauss-Kruger zone 13,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,13500000,0,0,39,1
-2648,Pulkovo 1995 / 3-degree Gauss-Kruger zone 14,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,14500000,0,0,42,1
-2649,Pulkovo 1995 / 3-degree Gauss-Kruger zone 15,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,15500000,0,0,45,1
-2650,Pulkovo 1995 / 3-degree Gauss-Kruger zone 16,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,16500000,0,0,48,1
-2651,Pulkovo 1995 / 3-degree Gauss-Kruger zone 17,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,17500000,0,0,51,1
-2652,Pulkovo 1995 / 3-degree Gauss-Kruger zone 18,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,18500000,0,0,54,1
-2653,Pulkovo 1995 / 3-degree Gauss-Kruger zone 19,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,19500000,0,0,57,1
-2654,Pulkovo 1995 / 3-degree Gauss-Kruger zone 20,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,20500000,0,0,60,1
-2655,Pulkovo 1995 / 3-degree Gauss-Kruger zone 21,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,21500000,0,0,63,1
-2656,Pulkovo 1995 / 3-degree Gauss-Kruger zone 22,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,22500000,0,0,66,1
-2657,Pulkovo 1995 / 3-degree Gauss-Kruger zone 23,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,23500000,0,0,69,1
-2658,Pulkovo 1995 / 3-degree Gauss-Kruger zone 24,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,24500000,0,0,72,1
-2659,Pulkovo 1995 / 3-degree Gauss-Kruger zone 25,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,25500000,0,0,75,1
-2660,Pulkovo 1995 / 3-degree Gauss-Kruger zone 26,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,26500000,0,0,78,1
-2661,Pulkovo 1995 / 3-degree Gauss-Kruger zone 27,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,27500000,0,0,81,1
-2662,Pulkovo 1995 / 3-degree Gauss-Kruger zone 28,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,28500000,0,0,84,1
-2663,Pulkovo 1995 / 3-degree Gauss-Kruger zone 29,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,29500000,0,0,87,1
-2664,Pulkovo 1995 / 3-degree Gauss-Kruger zone 30,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,30500000,0,0,90,1
-2665,Pulkovo 1995 / 3-degree Gauss-Kruger zone 31,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,31500000,0,0,93,1
-2666,Pulkovo 1995 / 3-degree Gauss-Kruger zone 32,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,32500000,0,0,96,1
-2667,Pulkovo 1995 / 3-degree Gauss-Kruger zone 33,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,33500000,0,0,99,1
-2668,Pulkovo 1995 / 3-degree Gauss-Kruger zone 34,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,34500000,0,0,102,1
-2669,Pulkovo 1995 / 3-degree Gauss-Kruger zone 35,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,35500000,0,0,105,1
-2670,Pulkovo 1995 / 3-degree Gauss-Kruger zone 36,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,36500000,0,0,108,1
-2671,Pulkovo 1995 / 3-degree Gauss-Kruger zone 37,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,37500000,0,0,111,1
-2672,Pulkovo 1995 / 3-degree Gauss-Kruger zone 38,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,38500000,0,0,114,1
-2673,Pulkovo 1995 / 3-degree Gauss-Kruger zone 39,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,39500000,0,0,117,1
-2674,Pulkovo 1995 / 3-degree Gauss-Kruger zone 40,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,40500000,0,0,120,1
-2675,Pulkovo 1995 / 3-degree Gauss-Kruger zone 41,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,41500000,0,0,123,1
-2676,Pulkovo 1995 / 3-degree Gauss-Kruger zone 42,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,42500000,0,0,126,1
-2677,Pulkovo 1995 / 3-degree Gauss-Kruger zone 43,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,43500000,0,0,129,1
-2678,Pulkovo 1995 / 3-degree Gauss-Kruger zone 44,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,44500000,0,0,132,1
-2679,Pulkovo 1995 / 3-degree Gauss-Kruger zone 45,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,45500000,0,0,135,1
-2680,Pulkovo 1995 / 3-degree Gauss-Kruger zone 46,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,46500000,0,0,138,1
-2681,Pulkovo 1995 / 3-degree Gauss-Kruger zone 47,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,47500000,0,0,141,1
-2682,Pulkovo 1995 / 3-degree Gauss-Kruger zone 48,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,48500000,0,0,144,1
-2683,Pulkovo 1995 / 3-degree Gauss-Kruger zone 49,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,49500000,0,0,147,1
-2684,Pulkovo 1995 / 3-degree Gauss-Kruger zone 50,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,50500000,0,0,150,1
-2685,Pulkovo 1995 / 3-degree Gauss-Kruger zone 51,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,51500000,0,0,153,1
-2686,Pulkovo 1995 / 3-degree Gauss-Kruger zone 52,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,52500000,0,0,156,1
-2687,Pulkovo 1995 / 3-degree Gauss-Kruger zone 53,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,53500000,0,0,159,1
-2688,Pulkovo 1995 / 3-degree Gauss-Kruger zone 54,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,54500000,0,0,162,1
-2689,Pulkovo 1995 / 3-degree Gauss-Kruger zone 55,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,55500000,0,0,165,1
-2690,Pulkovo 1995 / 3-degree Gauss-Kruger zone 56,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,56500000,0,0,168,1
-2691,Pulkovo 1995 / 3-degree Gauss-Kruger zone 57,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,57500000,0,0,171,1
-2692,Pulkovo 1995 / 3-degree Gauss-Kruger zone 58,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,58500000,0,0,174,1
-2693,Pulkovo 1995 / 3-degree Gauss-Kruger zone 59,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,59500000,0,0,177,1
-2695,Pulkovo 1995 / 3-degree Gauss-Kruger zone 61,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,61500000,0,0,-177,1
-2696,Pulkovo 1995 / 3-degree Gauss-Kruger zone 62,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,62500000,0,0,-174,1
-2697,Pulkovo 1995 / 3-degree Gauss-Kruger zone 63,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,63500000,0,0,-171,1
-2698,Pulkovo 1995 / 3-degree Gauss-Kruger zone 64,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,64500000,0,0,-168,1
-2699,Pulkovo 1995 / 3-degree Gauss-Kruger CM 21E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,21,1
-2700,Pulkovo 1995 / 3-degree Gauss-Kruger CM 24E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,24,1
-2701,Pulkovo 1995 / 3-degree Gauss-Kruger CM 27E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,27,1
-2702,Pulkovo 1995 / 3-degree Gauss-Kruger CM 30E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,30,1
-2703,Pulkovo 1995 / 3-degree Gauss-Kruger CM 33E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,33,1
-2704,Pulkovo 1995 / 3-degree Gauss-Kruger CM 36E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,36,1
-2705,Pulkovo 1995 / 3-degree Gauss-Kruger CM 39E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,39,1
-2706,Pulkovo 1995 / 3-degree Gauss-Kruger CM 42E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,42,1
-2707,Pulkovo 1995 / 3-degree Gauss-Kruger CM 45E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,45,1
-2708,Pulkovo 1995 / 3-degree Gauss-Kruger CM 48E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,48,1
-2709,Pulkovo 1995 / 3-degree Gauss-Kruger CM 51E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,51,1
-2710,Pulkovo 1995 / 3-degree Gauss-Kruger CM 54E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,54,1
-2711,Pulkovo 1995 / 3-degree Gauss-Kruger CM 57E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,57,1
-2712,Pulkovo 1995 / 3-degree Gauss-Kruger CM 60E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,60,1
-2713,Pulkovo 1995 / 3-degree Gauss-Kruger CM 63E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,63,1
-2714,Pulkovo 1995 / 3-degree Gauss-Kruger CM 66E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,66,1
-2715,Pulkovo 1995 / 3-degree Gauss-Kruger CM 69E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,69,1
-2716,Pulkovo 1995 / 3-degree Gauss-Kruger CM 72E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,72,1
-2717,Pulkovo 1995 / 3-degree Gauss-Kruger CM 75E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,75,1
-2718,Pulkovo 1995 / 3-degree Gauss-Kruger CM 78E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,78,1
-2719,Pulkovo 1995 / 3-degree Gauss-Kruger CM 81E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,81,1
-2720,Pulkovo 1995 / 3-degree Gauss-Kruger CM 84E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,84,1
-2721,Pulkovo 1995 / 3-degree Gauss-Kruger CM 87E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,87,1
-2722,Pulkovo 1995 / 3-degree Gauss-Kruger CM 90E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,90,1
-2723,Pulkovo 1995 / 3-degree Gauss-Kruger CM 93E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,93,1
-2724,Pulkovo 1995 / 3-degree Gauss-Kruger CM 96E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,96,1
-2725,Pulkovo 1995 / 3-degree Gauss-Kruger CM 99E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,99,1
-2726,Pulkovo 1995 / 3-degree Gauss-Kruger CM 102E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,102,1
-2727,Pulkovo 1995 / 3-degree Gauss-Kruger CM 105E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,105,1
-2728,Pulkovo 1995 / 3-degree Gauss-Kruger CM 108E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,108,1
-2729,Pulkovo 1995 / 3-degree Gauss-Kruger CM 111E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,111,1
-2730,Pulkovo 1995 / 3-degree Gauss-Kruger CM 114E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,114,1
-2731,Pulkovo 1995 / 3-degree Gauss-Kruger CM 117E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,117,1
-2732,Pulkovo 1995 / 3-degree Gauss-Kruger CM 120E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,120,1
-2733,Pulkovo 1995 / 3-degree Gauss-Kruger CM 123E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,123,1
-2734,Pulkovo 1995 / 3-degree Gauss-Kruger CM 126E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,126,1
-2735,Pulkovo 1995 / 3-degree Gauss-Kruger CM 129E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,129,1
-2736,Tete / UTM zone 36S,Transverse Mercator,metre,4127,Tete,Clarke 1866,500000,0,10000000,33,0.9996
-2737,Tete / UTM zone 37S,Transverse Mercator,metre,4127,Tete,Clarke 1866,500000,0,10000000,39,0.9996
-2738,Pulkovo 1995 / 3-degree Gauss-Kruger CM 132E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,132,1
-2739,Pulkovo 1995 / 3-degree Gauss-Kruger CM 135E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,135,1
-2740,Pulkovo 1995 / 3-degree Gauss-Kruger CM 138E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,138,1
-2741,Pulkovo 1995 / 3-degree Gauss-Kruger CM 141E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,141,1
-2742,Pulkovo 1995 / 3-degree Gauss-Kruger CM 144E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,144,1
-2743,Pulkovo 1995 / 3-degree Gauss-Kruger CM 147E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,147,1
-2744,Pulkovo 1995 / 3-degree Gauss-Kruger CM 150E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,150,1
-2745,Pulkovo 1995 / 3-degree Gauss-Kruger CM 153E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,153,1
-2746,Pulkovo 1995 / 3-degree Gauss-Kruger CM 156E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,156,1
-2747,Pulkovo 1995 / 3-degree Gauss-Kruger CM 159E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,159,1
-2748,Pulkovo 1995 / 3-degree Gauss-Kruger CM 162E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,162,1
-2749,Pulkovo 1995 / 3-degree Gauss-Kruger CM 165E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,165,1
-2750,Pulkovo 1995 / 3-degree Gauss-Kruger CM 168E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,168,1
-2751,Pulkovo 1995 / 3-degree Gauss-Kruger CM 171E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,171,1
-2752,Pulkovo 1995 / 3-degree Gauss-Kruger CM 174E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,174,1
-2753,Pulkovo 1995 / 3-degree Gauss-Kruger CM 177E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,177,1
-2754,Pulkovo 1995 / 3-degree Gauss-Kruger CM 180E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,180,1
-2755,Pulkovo 1995 / 3-degree Gauss-Kruger CM 177W,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,-177,1
-2756,Pulkovo 1995 / 3-degree Gauss-Kruger CM 174W,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,-174,1
-2757,Pulkovo 1995 / 3-degree Gauss-Kruger CM 171W,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,-171,1
-2758,Pulkovo 1995 / 3-degree Gauss-Kruger CM 168W,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,-168,1
-2759,NAD83(HARN) / Alabama East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,200000,30.3,0,-85.5,0.99996
-2760,NAD83(HARN) / Alabama West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,600000,30,0,-87.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2761,NAD83(HARN) / Arizona East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,213360,31,0,-110.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2762,NAD83(HARN) / Arizona Central,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,213360,31,0,-111.55,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2763,NAD83(HARN) / Arizona West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,213360,31,0,-113.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2764,NAD83(HARN) / Arkansas North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.56,34.2,-92,36.14,0,400000
-2765,NAD83(HARN) / Arkansas South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.18,32.4,-92,34.46,400000,400000
-2766,NAD83(HARN) / California zone 1,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.2,-122,41.4,500000,2000000
-2767,NAD83(HARN) / California zone 2,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.2,37.4,-122,39.5,500000,2000000
-2768,NAD83(HARN) / California zone 3,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.04,36.3,-120.3,38.26,500000,2000000
-2769,NAD83(HARN) / California zone 4,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,35.2,-119,37.15,500000,2000000
-2770,NAD83(HARN) / California zone 5,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.02,33.3,-118,35.28,500000,2000000
-2771,NAD83(HARN) / California zone 6,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.47,32.1,-116.15,33.53,500000,2000000
-2772,NAD83(HARN) / Colorado North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.43,39.2,-105.3,40.47,304800.6096,914401.8289
-2773,NAD83(HARN) / Colorado Central,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.27,37.5,-105.3,39.45,304800.6096,914401.8289
-2774,NAD83(HARN) / Colorado South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.14,36.4,-105.3,38.26,304800.6096,914401.8289
-2775,NAD83(HARN) / Connecticut,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.12,40.5,-72.45,41.52,152400.3048,304800.6096
-2776,NAD83(HARN) / Delaware,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,200000,38,0,-75.25,0.999995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2777,NAD83(HARN) / Florida East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,200000,24.2,0,-81,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2778,NAD83(HARN) / Florida West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,200000,24.2,0,-82,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2779,NAD83(HARN) / Florida North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.35,29,-84.3,30.45,0,600000
-2780,NAD83(HARN) / Georgia East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,200000,30,0,-82.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2781,NAD83(HARN) / Georgia West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,700000,30,0,-84.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2782,NAD83(HARN) / Hawaii zone 1,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,18.5,0,-155.3,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2783,NAD83(HARN) / Hawaii zone 2,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,20.2,0,-156.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2784,NAD83(HARN) / Hawaii zone 3,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,21.1,0,-158,0.99999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2785,NAD83(HARN) / Hawaii zone 4,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,21.5,0,-159.3,0.99999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2786,NAD83(HARN) / Hawaii zone 5,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,21.4,0,-160.1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2787,NAD83(HARN) / Idaho East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,200000,41.4,0,-112.1,0.999947368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2788,NAD83(HARN) / Idaho Central,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,41.4,0,-114,0.999947368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2789,NAD83(HARN) / Idaho West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,800000,41.4,0,-115.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2790,NAD83(HARN) / Illinois East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,300000,36.4,0,-88.2,0.999975,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2791,NAD83(HARN) / Illinois West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,700000,36.4,0,-90.1,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2792,NAD83(HARN) / Indiana East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,100000,37.3,250000,-85.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2793,NAD83(HARN) / Indiana West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,900000,37.3,250000,-87.05,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2794,NAD83(HARN) / Iowa North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.04,41.3,-93.3,43.16,1000000,1500000
-2795,NAD83(HARN) / Iowa South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.37,40,-93.3,41.47,0,500000
-2796,NAD83(HARN) / Kansas North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.43,38.2,-98,39.47,0,400000
-2797,NAD83(HARN) / Kansas South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.16,36.4,-98.3,38.34,400000,400000
-2798,NAD83(HARN) / Kentucky North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.58,37.3,-84.15,37.58,0,500000
-2799,NAD83(HARN) / Kentucky South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.44,36.2,-85.45,37.56,500000,500000
-2800,NAD83(HARN) / Louisiana North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.1,30.3,-92.3,32.4,0,1000000
-2801,NAD83(HARN) / Louisiana South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.18,28.3,-91.2,30.42,0,1000000
-2802,NAD83(HARN) / Maine East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,300000,43.4,0,-68.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2803,NAD83(HARN) / Maine West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,900000,42.5,0,-70.1,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2804,NAD83(HARN) / Maryland,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.18,37.4,-77,39.27,0,400000
-2805,NAD83(HARN) / Massachusetts Mainland,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.43,41,-71.3,42.41,750000,200000
-2806,NAD83(HARN) / Massachusetts Island,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.17,41,-70.3,41.29,0,500000
-2807,NAD83(HARN) / Michigan North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.29,44.47,-87,47.05,0,8000000
-2808,NAD83(HARN) / Michigan Central,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.11,43.19,-84.22,45.42,0,6000000
-2809,NAD83(HARN) / Michigan South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.06,41.3,-84.22,43.4,0,4000000
-2810,NAD83(HARN) / Minnesota North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.02,46.3,-93.06,48.38,100000,800000
-2811,NAD83(HARN) / Minnesota Central,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.37,45,-94.15,47.03,100000,800000
-2812,NAD83(HARN) / Minnesota South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43.47,43,-94,45.13,100000,800000
-2813,NAD83(HARN) / Mississippi East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,300000,29.3,0,-88.5,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2814,NAD83(HARN) / Mississippi West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,700000,29.3,0,-90.2,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2815,NAD83(HARN) / Missouri East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,250000,35.5,0,-90.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2816,NAD83(HARN) / Missouri Central,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,35.5,0,-92.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2817,NAD83(HARN) / Missouri West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,850000,36.1,0,-94.3,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2818,NAD83(HARN) / Montana,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,44.15,-109.3,49,0,600000
-2819,NAD83(HARN) / Nebraska,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.5,-100,43,0,500000
-2820,NAD83(HARN) / Nevada East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,200000,34.45,8000000,-115.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2821,NAD83(HARN) / Nevada Central,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,34.45,6000000,-116.4,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2822,NAD83(HARN) / Nevada West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,800000,34.45,4000000,-118.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2823,NAD83(HARN) / New Hampshire,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,300000,42.3,0,-71.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2824,NAD83(HARN) / New Jersey,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,150000,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2825,NAD83(HARN) / New Mexico East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,165000,31,0,-104.2,0.999909091,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2826,NAD83(HARN) / New Mexico Central,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,31,0,-106.15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2827,NAD83(HARN) / New Mexico West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,830000,31,0,-107.5,0.999916667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2828,NAD83(HARN) / New York East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,150000,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2829,NAD83(HARN) / New York Central,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,250000,40,0,-76.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2830,NAD83(HARN) / New York West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,350000,40,0,-78.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2831,NAD83(HARN) / New York Long Island,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.4,40.1,-74,41.02,0,300000
-2832,NAD83(HARN) / North Dakota North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.26,47,-100.3,48.44,0,600000
-2833,NAD83(HARN) / North Dakota South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46.11,45.4,-100.3,47.29,0,600000
-2834,NAD83(HARN) / Ohio North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.26,39.4,-82.3,41.42,0,600000
-2835,NAD83(HARN) / Ohio South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.44,38,-82.3,40.02,0,600000
-2836,NAD83(HARN) / Oklahoma North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.34,35,-98,36.46,0,600000
-2837,NAD83(HARN) / Oklahoma South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.56,33.2,-98,35.14,0,600000
-2838,NAD83(HARN) / Oregon North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.2,43.4,-120.3,46,0,2500000
-2839,NAD83(HARN) / Oregon South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.2,41.4,-120.3,44,0,1500000
-2840,NAD83(HARN) / Rhode Island,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,100000,41.05,0,-71.3,0.99999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2841,NAD83(HARN) / South Dakota North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.25,43.5,-100,45.41,0,600000
-2842,NAD83(HARN) / South Dakota South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.5,42.2,-100.2,44.24,0,600000
-2843,NAD83(HARN) / Tennessee,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.15,34.2,-86,36.25,0,600000
-2844,NAD83(HARN) / Texas North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.39,34,-101.3,36.11,1000000,200000
-2845,NAD83(HARN) / Texas North Central,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.08,31.4,-98.3,33.58,2000000,600000
-2846,NAD83(HARN) / Texas Central,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30.07,29.4,-100.2,31.53,3000000,700000
-2847,NAD83(HARN) / Texas South Central,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28.23,27.5,-99,30.17,4000000,600000
-2848,NAD83(HARN) / Texas South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26.1,25.4,-98.3,27.5,5000000,300000
-2849,NAD83(HARN) / Utah North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.43,40.2,-111.3,41.47,1000000,500000
-2850,NAD83(HARN) / Utah Central,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.01,38.2,-111.3,40.39,2000000,500000
-2851,NAD83(HARN) / Utah South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.13,36.4,-111.3,38.21,3000000,500000
-2852,NAD83(HARN) / Vermont,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,42.3,0,-72.3,0.999964286,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2853,NAD83(HARN) / Virginia North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.02,37.4,-78.3,39.12,2000000,3500000
-2854,NAD83(HARN) / Virginia South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.46,36.2,-78.3,37.58,1000000,3500000
-2855,NAD83(HARN) / Washington North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.3,47,-120.5,48.44,0,500000
-2856,NAD83(HARN) / Washington South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.5,45.2,-120.3,47.2,0,500000
-2857,NAD83(HARN) / West Virginia North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39,38.3,-79.3,40.15,0,600000
-2858,NAD83(HARN) / West Virginia South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.29,37,-81,38.53,0,600000
-2859,NAD83(HARN) / Wisconsin North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.34,45.1,-90,46.46,0,600000
-2860,NAD83(HARN) / Wisconsin Central,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.15,43.5,-90,45.3,0,600000
-2861,NAD83(HARN) / Wisconsin South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.44,42,-90,44.04,0,600000
-2862,NAD83(HARN) / Wyoming East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,200000,40.3,0,-105.1,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2863,NAD83(HARN) / Wyoming East Central,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,400000,40.3,100000,-107.2,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2864,NAD83(HARN) / Wyoming West Central,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,600000,40.3,0,-108.45,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2865,NAD83(HARN) / Wyoming West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,800000,40.3,100000,-110.05,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2866,NAD83(HARN) / Puerto Rico and Virgin Is.,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18.02,17.5,-66.26,18.26,200000,200000
-2867,NAD83(HARN) / Arizona East (ft),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,700000,31,0,-110.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2868,NAD83(HARN) / Arizona Central (ft),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,700000,31,0,-111.55,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2869,NAD83(HARN) / Arizona West (ft),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,700000,31,0,-113.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2870,NAD83(HARN) / California zone 1 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.2,-122,41.4,1640416.667,6561666.667
-2871,NAD83(HARN) / California zone 2 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.2,37.4,-122,39.5,1640416.667,6561666.667
-2872,NAD83(HARN) / California zone 3 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.04,36.3,-120.3,38.26,1640416.667,6561666.667
-2873,NAD83(HARN) / California zone 4 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,35.2,-119,37.15,1640416.667,6561666.667
-2874,NAD83(HARN) / California zone 5 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.02,33.3,-118,35.28,1640416.667,6561666.667
-2875,NAD83(HARN) / California zone 6 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.47,32.1,-116.15,33.53,1640416.667,6561666.667
-2876,NAD83(HARN) / Colorado North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.43,39.2,-105.3,40.47,1000000,3000000
-2877,NAD83(HARN) / Colorado Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.27,37.5,-105.3,39.45,1000000,3000000
-2878,NAD83(HARN) / Colorado South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.14,36.4,-105.3,38.26,1000000,3000000
-2879,NAD83(HARN) / Connecticut (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.12,40.5,-72.45,41.52,500000,1000000
-2880,NAD83(HARN) / Delaware (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,656166.667,38,0,-75.25,0.999995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2881,NAD83(HARN) / Florida East (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,656166.667,24.2,0,-81,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2882,NAD83(HARN) / Florida West (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,656166.667,24.2,0,-82,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2883,NAD83(HARN) / Florida North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.35,29,-84.3,30.45,0,1968500
-2884,NAD83(HARN) / Georgia East (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,656166.667,30,0,-82.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2885,NAD83(HARN) / Georgia West (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,2296583.333,30,0,-84.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2886,NAD83(HARN) / Idaho East (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,656166.667,41.4,0,-112.1,0.999947368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2887,NAD83(HARN) / Idaho Central (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,1640416.667,41.4,0,-114,0.999947368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2888,NAD83(HARN) / Idaho West (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,2624666.667,41.4,0,-115.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2891,NAD83(HARN) / Kentucky North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.58,37.3,-84.15,37.58,0,1640416.667
-2892,NAD83(HARN) / Kentucky South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.44,36.2,-85.45,37.56,1640416.667,1640416.667
-2893,NAD83(HARN) / Maryland (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.18,37.4,-77,39.27,0,1312333.333
-2894,NAD83(HARN) / Massachusetts Mainland (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.43,41,-71.3,42.41,2460625,656166.667
-2895,NAD83(HARN) / Massachusetts Island (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.17,41,-70.3,41.29,0,1640416.667
-2896,NAD83(HARN) / Michigan North (ft),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.29,44.47,-87,47.05,0,26246719.16
-2897,NAD83(HARN) / Michigan Central (ft),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.11,43.19,-84.22,45.42,0,19685039.37
-2898,NAD83(HARN) / Michigan South (ft),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.06,41.3,-84.22,43.4,0,13123359.58
-2899,NAD83(HARN) / Mississippi East (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,984250,29.3,0,-88.5,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2900,NAD83(HARN) / Mississippi West (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,2296583.333,29.3,0,-90.2,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2901,NAD83(HARN) / Montana (ft),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,44.15,-109.3,49,0,1968503.937
-2902,NAD83(HARN) / New Mexico East (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,541337.5,31,0,-104.2,0.999909091,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2903,NAD83(HARN) / New Mexico Central (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,1640416.667,31,0,-106.15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2904,NAD83(HARN) / New Mexico West (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,2723091.667,31,0,-107.5,0.999916667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2905,NAD83(HARN) / New York East (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,492125,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2906,NAD83(HARN) / New York Central (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,820208.333,40,0,-76.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2907,NAD83(HARN) / New York West (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,1148291.667,40,0,-78.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2908,NAD83(HARN) / New York Long Island (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.4,40.1,-74,41.02,0,984250
-2909,NAD83(HARN) / North Dakota North (ft),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.26,47,-100.3,48.44,0,1968503.937
-2910,NAD83(HARN) / North Dakota South (ft),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46.11,45.4,-100.3,47.29,0,1968503.937
-2911,NAD83(HARN) / Oklahoma North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.34,35,-98,36.46,0,1968500
-2912,NAD83(HARN) / Oklahoma South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.56,33.2,-98,35.14,0,1968500
-2913,NAD83(HARN) / Oregon North (ft),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.2,43.4,-120.3,46,0,8202099.738
-2914,NAD83(HARN) / Oregon South (ft),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.2,41.4,-120.3,44,0,4921259.843
-2915,NAD83(HARN) / Tennessee (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.15,34.2,-86,36.25,0,1968500
-2916,NAD83(HARN) / Texas North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.39,34,-101.3,36.11,3280833.333,656166.667
-2917,NAD83(HARN) / Texas North Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.08,31.4,-98.3,33.58,6561666.667,1968500
-2918,NAD83(HARN) / Texas Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30.07,29.4,-100.2,31.53,9842500,2296583.333
-2919,NAD83(HARN) / Texas South Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28.23,27.5,-99,30.17,13123333.33,1968500
-2920,NAD83(HARN) / Texas South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26.1,25.4,-98.3,27.5,16404166.67,984250
-2921,NAD83(HARN) / Utah North (ft),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.43,40.2,-111.3,41.47,3280839.895,1640419.948
-2922,NAD83(HARN) / Utah Central (ft),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.01,38.2,-111.3,40.39,6561679.79,1640419.948
-2923,NAD83(HARN) / Utah South (ft),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.13,36.4,-111.3,38.21,9842519.685,1640419.948
-2924,NAD83(HARN) / Virginia North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.02,37.4,-78.3,39.12,6561666.667,11482916.67
-2925,NAD83(HARN) / Virginia South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.46,36.2,-78.3,37.58,3280833.333,11482916.67
-2926,NAD83(HARN) / Washington North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.3,47,-120.5,48.44,0,1640416.667
-2927,NAD83(HARN) / Washington South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.5,45.2,-120.3,47.2,0,1640416.667
-2928,NAD83(HARN) / Wisconsin North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.34,45.1,-90,46.46,0,1968500
-2929,NAD83(HARN) / Wisconsin Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.15,43.5,-90,45.3,0,1968500
-2930,NAD83(HARN) / Wisconsin South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.44,42,-90,44.04,0,1968500
-2931,Beduaram / TM 13 NE,Transverse Mercator,metre,4213,Beduaram,Clarke 1880 (IGN),500000,0,0,13,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2932,QND95 / Qatar National Grid,Transverse Mercator,metre,4614,Qatar National Datum 1995,International 1924,200000,24.27,300000,51.13,0.99999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2933,Segara / UTM zone 50S,Transverse Mercator,metre,4820,Gunung Segara,Bessel 1841,500000,0,10000000,117,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2935,Pulkovo 1942 / CS63 zone A1,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,1300000,0.07,0,41.32,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2936,Pulkovo 1942 / CS63 zone A2,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,2300000,0.07,0,44.32,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2937,Pulkovo 1942 / CS63 zone A3,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,3300000,0.07,0,47.32,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2938,Pulkovo 1942 / CS63 zone A4,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,4300000,0.07,0,50.32,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2939,Pulkovo 1942 / CS63 zone K2,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,2300000,0.08,0,50.46,1
-2940,Pulkovo 1942 / CS63 zone K3,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,3300000,0.08,0,53.46,1
-2941,Pulkovo 1942 / CS63 zone K4,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,4300000,0.08,0,56.46,1
-2942,Porto Santo / UTM zone 28N,Transverse Mercator,metre,4615,Porto Santo 1936,International 1924,500000,0,0,-15,0.9996
-2943,Selvagem Grande / UTM zone 28N,Transverse Mercator,metre,4616,Selvagem Grande,International 1924,500000,0,0,-15,0.9996
-2944,NAD83(CSRS) / SCoPQ zone 2,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-55.3,0.9999
-2945,NAD83(CSRS) / MTM zone 3,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-58.3,0.9999
-2946,NAD83(CSRS) / MTM zone 4,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-61.3,0.9999
-2947,NAD83(CSRS) / MTM zone 5,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-64.3,0.9999
-2948,NAD83(CSRS) / MTM zone 6,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-67.3,0.9999
-2949,NAD83(CSRS) / MTM zone 7,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-70.3,0.9999
-2950,NAD83(CSRS) / MTM zone 8,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-73.3,0.9999
-2951,NAD83(CSRS) / MTM zone 9,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-76.3,0.9999
-2952,NAD83(CSRS) / MTM zone 10,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-79.3,0.9999
-2953,NAD83(CSRS) / New Brunswick Stereographic,Oblique Stereographic,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,2500000,46.3,7500000,-66.3,0.999912
-2954,NAD83(CSRS) / Prince Edward Isl. Stereographic (NAD83),Oblique Stereographic,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,400000,47.15,800000,-63,0.999912
-2955,NAD83(CSRS) / UTM zone 11N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-117,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2956,NAD83(CSRS) / UTM zone 12N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-111,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2957,NAD83(CSRS) / UTM zone 13N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-105,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2958,NAD83(CSRS) / UTM zone 17N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-81,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2959,NAD83(CSRS) / UTM zone 18N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-75,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2960,NAD83(CSRS) / UTM zone 19N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-69,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2961,NAD83(CSRS) / UTM zone 20N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2962,NAD83(CSRS) / UTM zone 21N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-57,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2963,Lisbon 1890 (Lisbon) / Portugal Bonne,Bonne (South Orientated),metre,4666,Lisbon 1890 (Lisbon),Bessel 1841,0,39.4,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2964,NAD27 / Alaska Albers,Albers Equal Area,US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,50,-154,55,0,0
-2965,NAD83 / Indiana East (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,328083.333,37.3,820208.333,-85.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2966,NAD83 / Indiana West (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,2952750,37.3,820208.333,-87.05,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2967,NAD83(HARN) / Indiana East (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,328083.333,37.3,820208.333,-85.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2968,NAD83(HARN) / Indiana West (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,2952750,37.3,820208.333,-87.05,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2969,Fort Marigot / UTM zone 20N,Transverse Mercator,metre,4621,Fort Marigot,International 1924,500000,0,0,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2970,Guadeloupe 1948 / UTM zone 20N,Transverse Mercator,metre,4622,Guadeloupe 1948,International 1924,500000,0,0,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2971,CSG67 / UTM zone 22N,Transverse Mercator,metre,4623,Centre Spatial Guyanais 1967,International 1924,500000,0,0,-51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2972,RGFG95 / UTM zone 22N,Transverse Mercator,metre,4624,Reseau Geodesique Francais Guyane 1995,GRS 1980,500000,0,0,-51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2973,Martinique 1938 / UTM zone 20N,Transverse Mercator,metre,0,Martinique 1938,International 1924,500000,0,0,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2975,RGR92 / UTM zone 40S,Transverse Mercator,metre,4627,Reseau Geodesique de la Reunion 1992,GRS 1980,500000,0,10000000,57,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2976,Tahiti 52 / UTM zone 6S,Transverse Mercator,metre,4628,Tahiti 52,International 1924,500000,0,10000000,-147,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2977,Tahaa 54 / UTM zone 5S,Transverse Mercator,metre,4629,Tahaa 54,International 1924,500000,0,10000000,-153,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2978,IGN72 Nuku Hiva / UTM zone 7S,Transverse Mercator,metre,4630,IGN72 Nuku Hiva,International 1924,500000,0,10000000,-141,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2980,Combani 1950 / UTM zone 38S,Transverse Mercator,metre,4632,Combani 1950,International 1924,500000,0,10000000,45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2981,IGN56 Lifou / UTM zone 58S,Transverse Mercator,metre,4633,IGN56 Lifou,International 1924,500000,0,10000000,165,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2985,Petrels 1972 / Terre Adelie Polar Stereographic,Polar Stereographic (variant C),metre,4636,Petrels 1972,International 1924,0,0,0,0,0,0,0,0,0,0,0,0,0,0,140,0,0,0,0,200000,300000,-67
-2986,Perroud 1950 / Terre Adelie Polar Stereographic,Polar Stereographic (variant C),metre,4637,Pointe Geologie Perroud 1950,International 1924,0,0,0,0,0,0,0,0,0,0,0,0,0,0,140,0,0,0,0,200000,300000,-67
-2987,Saint Pierre et Miquelon 1950 / UTM zone 21N,Transverse Mercator,metre,4638,Saint Pierre et Miquelon 1950,Clarke 1866,500000,0,0,-57,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2988,MOP78 / UTM zone 1S,Transverse Mercator,metre,4639,MOP78,International 1924,500000,0,10000000,-177,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2991,NAD83 / Oregon Lambert,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.3,41.45,-120.3,43,0,400000,
-2992,NAD83 / Oregon Lambert (ft),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.3,41.45,-120.3,43,0,1312335.958,
-2993,NAD83(HARN) / Oregon Lambert,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.3,41.45,-120.3,43,0,400000,
-2994,NAD83(HARN) / Oregon Lambert (ft),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.3,41.45,-120.3,43,0,1312335.958
-2995,IGN53 Mare / UTM zone 58S,Transverse Mercator,metre,4641,IGN53 Mare,International 1924,500000,0,10000000,165,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2996,ST84 Ile des Pins / UTM zone 58S,Transverse Mercator,metre,4642,ST84 Ile des Pins,International 1924,500000,0,10000000,165,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2997,ST71 Belep / UTM zone 58S,Transverse Mercator,metre,4643,ST71 Belep,International 1924,500000,0,10000000,165,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2998,NEA74 Noumea / UTM zone 58S,Transverse Mercator,metre,4644,NEA74 Noumea,International 1924,500000,0,10000000,165,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-2999,Grand Comoros / UTM zone 38S,Transverse Mercator,metre,4646,Grand Comoros,International 1924,500000,0,10000000,45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3000,Segara / NEIEZ,Mercator (1SP),metre,4820,Gunung Segara,Bessel 1841,3900000,0,900000,110,0.997,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3001,Batavia / NEIEZ,Mercator (1SP),metre,4211,Batavia,Bessel 1841,3900000,0,900000,110,0.997,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3002,Makassar / NEIEZ,Mercator (1SP),metre,4257,Makassar,Bessel 1841,3900000,0,900000,110,0.997,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3003,Monte Mario / Italy zone 1,Transverse Mercator,metre,4265,Monte Mario,International 1924,1500000,0,0,9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3004,Monte Mario / Italy zone 2,Transverse Mercator,metre,4265,Monte Mario,International 1924,2520000,0,0,15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3005,NAD83 / BC Albers,Albers Equal Area,metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58.3,45,-126,50,0,1000000
-3006,SWEREF99 TM,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,500000,0,0,15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3007,SWEREF99 12 00,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3008,SWEREF99 13 30,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,13.3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3009,SWEREF99 15 00,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,15,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3010,SWEREF99 16 30,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,16.3,1
-3011,SWEREF99 18 00,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,18,1
-3012,SWEREF99 14 15,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,14.15,1
-3013,SWEREF99 15 45,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,15.45,1
-3014,SWEREF99 17 15,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,17.15,1
-3015,SWEREF99 18 45,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,18.45,1
-3016,SWEREF99 20 15,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,20.15,1
-3017,SWEREF99 21 45,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,21.45,1
-3018,SWEREF99 23 15,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,150000,0,0,23.15,1
-3019,RT90 7.5 gon V,Transverse Mercator,metre,4124,Rikets koordinatsystem 1990,Bessel 1841,1500000,0,0,11.18298,1
-3020,RT90 5 gon V,Transverse Mercator,metre,4124,Rikets koordinatsystem 1990,Bessel 1841,1500000,0,0,13.33298,1
-3021,RT90 2.5 gon V,Transverse Mercator,metre,4124,Rikets koordinatsystem 1990,Bessel 1841,1500000,0,0,15.48298,1
-3022,RT90 0 gon,Transverse Mercator,metre,4124,Rikets koordinatsystem 1990,Bessel 1841,1500000,0,0,18.03298,1
-3023,RT90 2.5 gon O,Transverse Mercator,metre,4124,Rikets koordinatsystem 1990,Bessel 1841,1500000,0,0,20.18298,1
-3024,RT90 5 gon O,Transverse Mercator,metre,4124,Rikets koordinatsystem 1990,Bessel 1841,1500000,0,0,22.33298,1
-3025,RT38 7.5 gon V,Transverse Mercator,metre,4308,Stockholm 1938,Bessel 1841,1500000,0,0,11.18298,1
-3026,RT38 5 gon V,Transverse Mercator,metre,4308,Stockholm 1938,Bessel 1841,1500000,0,0,13.33298,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3027,RT38 2.5 gon V,Transverse Mercator,metre,4308,Stockholm 1938,Bessel 1841,1500000,0,0,15.48298,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3028,RT38 0 gon,Transverse Mercator,metre,4308,Stockholm 1938,Bessel 1841,1500000,0,0,18.03298,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3029,RT38 2.5 gon O,Transverse Mercator,metre,4308,Stockholm 1938,Bessel 1841,1500000,0,0,20.18298,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3030,RT38 5 gon O,Transverse Mercator,metre,4308,Stockholm 1938,Bessel 1841,1500000,0,0,22.33298,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3031,WGS 84 / Antarctic Polar Stereographic,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71
-3032,WGS 84 / Australian Antarctic Polar Stereographic,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,6000000,0,6000000,0,0,0,0,0,0,0,0,0,0,0,70,0,0,0,0,0,0,-71
-3033,WGS 84 / Australian Antarctic Lambert,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-74.3,-50,70,-68.3,6000000,6000000,
-3034,ETRS89 / ETRS-LCC,Lambert Conic Conformal (2SP),metre,4258,European Terrestrial Reference System 1989,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,52,10,35,2800000,4000000,
-3035,ETRS89 / ETRS-LAEA,Lambert Azimuthal Equal Area,metre,4258,European Terrestrial Reference System 1989,GRS 1980,4321000,52,3210000,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3036,Moznet / UTM zone 36S,Transverse Mercator,metre,4130,Moznet (ITRF94),WGS 84,500000,0,10000000,33,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3037,Moznet / UTM zone 37S,Transverse Mercator,metre,4130,Moznet (ITRF94),WGS 84,500000,0,10000000,39,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3038,ETRS89 / ETRS-TM26,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,-27,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3039,ETRS89 / ETRS-TM27,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,-21,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3040,ETRS89 / ETRS-TM28,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,-15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3041,ETRS89 / ETRS-TM29,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,-9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3042,ETRS89 / ETRS-TM30,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,-3,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3043,ETRS89 / ETRS-TM31,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,3,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3044,ETRS89 / ETRS-TM32,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3045,ETRS89 / ETRS-TM33,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3046,ETRS89 / ETRS-TM34,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,21,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3047,ETRS89 / ETRS-TM35,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,27,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3048,ETRS89 / ETRS-TM36,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,33,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3049,ETRS89 / ETRS-TM37,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,39,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3050,ETRS89 / ETRS-TM38,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3051,ETRS89 / ETRS-TM39,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3052,Reykjavik 1900 / Lambert 1900,Lambert Conic Conformal (West Orientated),metre,4657,Reykjavik 1900,Danish 1876,0,65,0,-19.011965,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3053,Hjorsey 1955 / Lambert 1955,Lambert Conic Conformal (West Orientated),metre,4658,Hjorsey 1955,International 1924,500000,65,500000,-18,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3054,Hjorsey 1955 / UTM zone 26N,Transverse Mercator,metre,4658,Hjorsey 1955,International 1924,500000,0,0,-27,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3055,Hjorsey 1955 / UTM zone 27N,Transverse Mercator,metre,4658,Hjorsey 1955,International 1924,500000,0,0,-21,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3056,Hjorsey 1955 / UTM zone 28N,Transverse Mercator,metre,4658,Hjorsey 1955,International 1924,500000,0,0,-15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3057,ISN93 / Lambert 1993,Lambert Conic Conformal (2SP),metre,4659,Islands Network 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65.45,65,-19,64.15,500000,500000
-3058,Helle 1954 / Jan Mayen Grid,Transverse Mercator,metre,4660,Helle 1954,International 1924,50000,0,-7800000,-8.3,1
-3059,LKS92 / Latvia TM,Transverse Mercator,metre,4661,Latvia 1992,GRS 1980,500000,0,-6000000,24,0.9996
-3060,IGN72 Grande Terre / UTM zone 58S,Transverse Mercator,metre,4662,IGN72 Grande Terre,International 1924,500000,0,10000000,165,0.9996
-3061,Porto Santo 1995 / UTM zone 28N,Transverse Mercator,metre,4663,Porto Santo 1995,International 1924,500000,0,0,-15,0.9996
-3062,Azores Oriental 1995 / UTM zone 26N,Transverse Mercator,metre,4664,Azores Oriental Islands 1995,International 1924,500000,0,0,-27,0.9996
-3063,Azores Central 1995 / UTM zone 26N,Transverse Mercator,metre,4665,Azores Central Islands 1995,International 1924,500000,0,0,-27,0.9996
-3064,IGM95 / UTM zone 32N,Transverse Mercator,metre,4670,Istituto Geografico Militaire 1995,WGS 84,500000,0,0,9,0.9996
-3065,IGM95 / UTM zone 33N,Transverse Mercator,metre,4670,Istituto Geografico Militaire 1995,WGS 84,500000,0,0,15,0.9996
-3066,ED50 / Jordan TM,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,-3000000,37,0.9998
-3067,ETRS89 / ETRS-TM35FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,27,0.9996
-3068,DHDN / Soldner Berlin,Cassini-Soldner,metre,4314,Deutsches Hauptdreiecksnetz,Bessel 1841,40000,52.25071338,10000,13.37379332,
-3069,NAD27 / Wisconsin Transverse Mercator,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,-4500000,-90,0.9996
-3070,NAD83 / Wisconsin Transverse Mercator,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,520000,0,-4480000,-90,0.9996
-3071,NAD83(HARN) / Wisconsin Transverse Mercator,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,520000,0,-4480000,-90,0.9996
-3072,NAD83 / Maine CS2000 East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,700000,43.5,0,-67.523,0.99998
-3074,NAD83 / Maine CS2000 West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,300000,42.5,0,-70.223,0.99998
-3075,NAD83(HARN) / Maine CS2000 East,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,700000,43.5,0,-67.523,0.99998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3077,NAD83(HARN) / Maine CS2000 West,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,300000,42.5,0,-70.223,0.99998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3078,NAD83 / Michigan Oblique Mercator,Hotine Oblique Mercator,metre,4269,North American Datum 1983,GRS 1980,2546731.496,0,-4354009.816,0,0,337.25556,45.1833,0,337.25556,0.9996,0,-86,0,0,0,0,0,0,0,0,
-3079,NAD83(HARN) / Michigan Oblique Mercator,Hotine Oblique Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,2546731.496,0,-4354009.816,0,0,337.25556,45.1833,0,337.25556,0.9996,0,-86,0,0,0,0,0,0,0,0,
-3080,NAD27 / Shackleford,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.55,31.1,-100,27.25,3000000,3000000
-3081,NAD83 / Texas State Mapping System,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.55,31.1,-100,27.25,1000000,1000000
-3082,NAD83 / Texas Centric Lambert Conformal,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,18,-100,27.3,5000000,1500000
-3083,NAD83 / Texas Centric Albers Equal Area,Albers Equal Area,metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,18,-100,27.3,6000000,1500000
-3084,NAD83(HARN) / Texas Centric Lambert Conformal,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,18,-100,27.3,5000000,1500000
-3085,NAD83(HARN) / Texas Centric Albers Equal Area,Albers Equal Area,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,18,-100,27.3,6000000,1500000
-3086,NAD83 / Florida GDL Albers,Albers Equal Area,metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.3,24,-84,24,0,400000
-3087,NAD83(HARN) / Florida GDL Albers,Albers Equal Area,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.3,24,-84,24,0,400000
-3088,NAD83 / Kentucky Single Zone,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.4,36.2,-85.45,37.05,1000000,1500000
-3089,NAD83 / Kentucky Single Zone (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.4,36.2,-85.45,37.05,3280833.333,4921250
-3090,NAD83(HARN) / Kentucky Single Zone,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.4,36.2,-85.45,37.05,1000000,1500000
-3091,NAD83(HARN) / Kentucky Single Zone (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.4,36.2,-85.45,37.05,3280833.333,4921250
-3092,Tokyo / UTM zone 51N,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,500000,0,0,123,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3093,Tokyo / UTM zone 52N,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,500000,0,0,129,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3094,Tokyo / UTM zone 53N,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,500000,0,0,135,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3095,Tokyo / UTM zone 54N,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,500000,0,0,141,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3096,Tokyo / UTM zone 55N,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,500000,0,0,147,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3097,JGD2000 / UTM zone 51N,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,500000,0,0,123,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3098,JGD2000 / UTM zone 52N,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,500000,0,0,129,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3099,JGD2000 / UTM zone 53N,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,500000,0,0,135,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3100,JGD2000 / UTM zone 54N,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,500000,0,0,141,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3101,JGD2000 / UTM zone 55N,Transverse Mercator,metre,4612,Japanese Geodetic Datum 2000,GRS 1980,500000,0,0,147,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3102,American Samoa 1962 / American Samoa Lambert,Lambert Conic Conformal (1SP),US survey foot,4169,American Samoa 1962,Clarke 1866,500000,-14.16,312234.65,-170,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3106,Gulshan 303 / Bangladesh Transverse Mercator,Transverse Mercator,metre,0,Gulshan 303,Everest 1830 (1937 Adjustment),500000,0,0,90,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3107,GDA94 / SA Lambert,Lambert Conic Conformal (2SP),metre,4283,Geocentric Datum of Australia 1994,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-36,-32,135,-28,2000000,1000000
-3108,ETRS89 / Guernsey Grid,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,47000,49.3,50000,-2.25,0.999997,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3109,ETRS89 / Jersey Transverse Mercator,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,40000,49.225,70000,-2.135,0.9999999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3110,AGD66 / Vicgrid66,Lambert Conic Conformal (2SP),metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-38,-37,145,-36,4500000,2500000
-3111,GDA94 / Vicgrid94,Lambert Conic Conformal (2SP),metre,4283,Geocentric Datum of Australia 1994,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-38,-37,145,-36,2500000,2500000
-3112,GDA94 / Geoscience Australia Lambert,Lambert Conic Conformal (2SP),metre,4283,Geocentric Datum of Australia 1994,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-36,0,134,-18,0,0
-3113,GDA94 / BCSG02,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,50000,-28,100000,153,0.99999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3114,MAGNA-SIRGAS / Colombia Far West zone,Transverse Mercator,metre,4170,Marco Geocentrico Nacional de Referencia,GRS 1980,1000000,4.35463215,1000000,-80.04390285,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3115,MAGNA-SIRGAS / Colombia West zone,Transverse Mercator,metre,4170,Marco Geocentrico Nacional de Referencia,GRS 1980,1000000,4.35463215,1000000,-77.04390285,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3116,MAGNA-SIRGAS / Colombia Bogota zone,Transverse Mercator,metre,4170,Marco Geocentrico Nacional de Referencia,GRS 1980,1000000,4.35463215,1000000,-74.04390285,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3117,MAGNA-SIRGAS / Colombia East Central zone,Transverse Mercator,metre,4170,Marco Geocentrico Nacional de Referencia,GRS 1980,1000000,4.35463215,1000000,-71.04390285,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3118,MAGNA-SIRGAS / Colombia East zone,Transverse Mercator,metre,4170,Marco Geocentrico Nacional de Referencia,GRS 1980,1000000,4.35463215,1000000,-68.04390285,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3119,Douala 1948 / AEF west,Transverse Mercator,metre,4192,Douala 1948,International 1924,1000000,0,1000000,10.3,0.999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3120,Pulkovo 1942(58) / Poland zone I,Oblique Stereographic,metre,4179,Pulkovo 1942(58),Krassowsky 1940,4637000,50.373,5467000,21.05,0.9998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3121,PRS92 / Philippines zone 1,Transverse Mercator,metre,0,Philippine Reference System 1992,Clarke 1866,500000,0,0,117,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3122,PRS92 / Philippines zone 2,Transverse Mercator,metre,0,Philippine Reference System 1992,Clarke 1866,500000,0,0,119,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3123,PRS92 / Philippines zone 3,Transverse Mercator,metre,0,Philippine Reference System 1992,Clarke 1866,500000,0,0,121,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3124,PRS92 / Philippines zone 4,Transverse Mercator,metre,0,Philippine Reference System 1992,Clarke 1866,500000,0,0,123,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3125,PRS92 / Philippines zone 5,Transverse Mercator,metre,0,Philippine Reference System 1992,Clarke 1866,500000,0,0,125,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3126,ETRS89 / ETRS-GK19FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,19,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3127,ETRS89 / ETRS-GK20FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,20,1
-3128,ETRS89 / ETRS-GK21FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,21,1
-3129,ETRS89 / ETRS-GK22FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,22,1
-3130,ETRS89 / ETRS-GK23FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,23,1
-3131,ETRS89 / ETRS-GK24FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,24,1
-3132,ETRS89 / ETRS-GK25FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,25,1
-3133,ETRS89 / ETRS-GK26FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,26,1
-3134,ETRS89 / ETRS-GK27FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,27,1
-3135,ETRS89 / ETRS-GK28FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,28,1
-3136,ETRS89 / ETRS-GK29FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,29,1
-3137,ETRS89 / ETRS-GK30FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,30,1
-3138,ETRS89 / ETRS-GK31FIN,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,31,1
-3139,Vanua Levu 1915 / Vanua Levu Grid,Hyperbolic Cassini-Soldner,link,0,Vanua Levu 1915,Clarke 1880 (international foot),1251331.8,-16.15,1662888.5,179.2,
-3140,Viti Levu 1912 / Viti Levu Grid,Cassini-Soldner,link,0,Viti Levu 1912,Clarke 1880 (international foot),544000,-18,704000,178,
-3141,Fiji 1956 / UTM zone 60S,Transverse Mercator,metre,0,Fiji 1956,International 1924,500000,0,10000000,177,0.9996
-3142,Fiji 1956 / UTM zone 1S,Transverse Mercator,metre,0,Fiji 1956,International 1924,500000,0,10000000,-177,0.9996
-3144,FD54 / Faroe Lambert,Lambert Conic Conformal (West Orientated),metre,0,Faroe Datum 1954,International 1924,500000,62,500000,-9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3145,ETRS89 / Faroe Lambert,Lambert Conic Conformal (West Orientated),metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,62,500000,-9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3146,Pulkovo 1942 / 3-degree Gauss-Kruger zone 6,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,6500000,0,0,18,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3147,Pulkovo 1942 / 3-degree Gauss-Kruger CM 18E,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,500000,0,0,18,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3148,Indian 1960 / UTM zone 48N,Transverse Mercator,metre,4131,Indian 1960,Everest 1830 (1937 Adjustment),500000,0,0,105,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3149,Indian 1960 / UTM zone 49N,Transverse Mercator,metre,4131,Indian 1960,Everest 1830 (1937 Adjustment),500000,0,0,111,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3150,Pulkovo 1995 / 3-degree Gauss-Kruger zone 6,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,6500000,0,0,18,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3151,Pulkovo 1995 / 3-degree Gauss-Kruger CM 18E,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,500000,0,0,18,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3152,ST74,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,100178.1808,0,-6500614.784,18.0328044,0.99999425,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3153,NAD83(CSRS) / BC Albers,Albers Equal Area,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58.3,45,-126,50,0,1000000
-3154,NAD83(CSRS) / UTM zone 7N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-141,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3155,NAD83(CSRS) / UTM zone 8N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-135,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3156,NAD83(CSRS) / UTM zone 9N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-129,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3157,NAD83(CSRS) / UTM zone 10N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-123,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3158,NAD83(CSRS) / UTM zone 14N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-99,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3159,NAD83(CSRS) / UTM zone 15N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-93,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3160,NAD83(CSRS) / UTM zone 16N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-87,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3161,NAD83 / Ontario MNR Lambert,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53.5,0,-85,44.5,6430000,930000
-3162,NAD83(CSRS) / Ontario MNR Lambert,Lambert Conic Conformal (2SP),metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53.5,0,-85,44.5,6430000,930000
-3163,RGNC91-93 / Lambert New Caledonia,Lambert Conic Conformal (2SP),metre,4645,Reseau Geodesique de Nouvelle Caledonie 91-93,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-22.2,-21.3,166,-20.4,300000,400000
-3164,ST87 Ouvea / UTM zone 58S,Transverse Mercator,metre,4635,ST87 Ouvea,WGS 84,500000,0,10000000,165,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3165,NEA74 Noumea / Noumea Lambert,Lambert Conic Conformal (2SP),metre,4644,NEA74 Noumea,International 1924,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-22.17408903,-22.16108903,166.2632733,-22.14408903,1.02,0.66
-3166,NEA74 Noumea / Noumea Lambert 2,Lambert Conic Conformal (2SP),metre,4644,NEA74 Noumea,International 1924,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-22.1741,-22.1611,166.2633,-22.1441,-2.354,8.313
-3167,Kertau (RSO) / RSO Malaya (ch),Hotine Oblique Mercator,British chain (Sears 1922 truncated),4245,Kertau (RSO),Everest 1830 (RSO 1969),40000,0,0,0,0,323.0132846,4,0,323.0748369,0.99984,0,102.15,0,0,0,0,0,0,0,0,
-3168,Kertau (RSO) / RSO Malaya (m),Hotine Oblique Mercator,metre,4245,Kertau (RSO),Everest 1830 (RSO 1969),804670.24,0,0,0,0,323.0132846,4,0,323.0748369,0.99984,0,102.15,0,0,0,0,0,0,0,0,
-3169,RGNC91-93 / UTM zone 57S,Transverse Mercator,metre,4645,Reseau Geodesique de Nouvelle Caledonie 91-93,GRS 1980,500000,0,10000000,159,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3170,RGNC91-93 / UTM zone 58S,Transverse Mercator,metre,4645,Reseau Geodesique de Nouvelle Caledonie 91-93,GRS 1980,500000,0,10000000,165,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3171,RGNC91-93 / UTM zone 59S,Transverse Mercator,metre,4645,Reseau Geodesique de Nouvelle Caledonie 91-93,GRS 1980,500000,0,10000000,171,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3172,IGN53 Mare / UTM zone 59S,Transverse Mercator,metre,4641,IGN53 Mare,International 1924,500000,0,10000000,171,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3173,fk89 / Faroe Lambert FK89,Lambert Conic Conformal (West Orientated),metre,0,fk89,International 1924,700000,62,700000,-9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3174,NAD83 / Great Lakes Albers,Albers Equal Area,metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49.01518,45.568977,-84.455955,42.122774,1000000,1000000
-3175,NAD83 / Great Lakes and St Lawrence Albers,Albers Equal Area,metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49.01518,45.568977,-83.248627,42.122774,1000000,1000000
-3176,Indian 1960 / TM 106 NE,Transverse Mercator,metre,4131,Indian 1960,Everest 1830 (1937 Adjustment),500000,0,0,106,0.9996
-3177,LGD2006 / Libya TM,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,1000000,0,0,17,0.9965
-3178,GR96 / UTM zone 18N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-75,0.9996
-3179,GR96 / UTM zone 19N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-69,0.9996
-3180,GR96 / UTM zone 20N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-63,0.9996
-3181,GR96 / UTM zone 21N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-57,0.9996
-3182,GR96 / UTM zone 22N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-51,0.9996
-3183,GR96 / UTM zone 23N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-45,0.9996
-3184,GR96 / UTM zone 24N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-39,0.9996
-3185,GR96 / UTM zone 25N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-33,0.9996
-3186,GR96 / UTM zone 26N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-27,0.9996
-3187,GR96 / UTM zone 27N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-21,0.9996
-3188,GR96 / UTM zone 28N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-15,0.9996
-3189,GR96 / UTM zone 29N,Transverse Mercator,metre,0,Greenland 1996,GRS 1980,500000,0,0,-9,0.9996
-3190,LGD2006 / Libya TM zone 5,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,200000,0,0,9,0.99995
-3191,LGD2006 / Libya TM zone 6,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,200000,0,0,11,0.99995
-3192,LGD2006 / Libya TM zone 7,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,200000,0,0,13,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3193,LGD2006 / Libya TM zone 8,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,200000,0,0,15,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3194,LGD2006 / Libya TM zone 9,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,200000,0,0,17,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3195,LGD2006 / Libya TM zone 10,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,200000,0,0,19,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3196,LGD2006 / Libya TM zone 11,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,200000,0,0,21,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3197,LGD2006 / Libya TM zone 12,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,200000,0,0,23,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3198,LGD2006 / Libya TM zone 13,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,200000,0,0,25,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3199,LGD2006 / UTM zone 32N,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,500000,0,0,9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3200,FD58 / Iraq zone,Lambert Conic Conformal (1SP),metre,4132,Final Datum 1958,Clarke 1880 (RGS),1500000,32.3,1166200,45,0.998786408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3201,LGD2006 / UTM zone 33N,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,500000,0,0,15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3202,LGD2006 / UTM zone 34N,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,500000,0,0,21,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3203,LGD2006 / UTM zone 35N,Transverse Mercator,metre,0,Libyan Geodetic Datum 2006,International 1924,500000,0,0,27,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3204,WGS 84 / SCAR IMW SP19-20,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-63.2,-90,-66,-60.4,0,0
-3205,WGS 84 / SCAR IMW SP21-22,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-63.2,-90,-54,-60.4,0,0
-3206,WGS 84 / SCAR IMW SP23-24,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-63.2,-90,-42,-60.4,0,0
-3207,WGS 84 / SCAR IMW SQ01-02,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,-174,-64.4,0,0
-3208,WGS 84 / SCAR IMW SQ19-20,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,-66,-64.4,0,0
-3209,WGS 84 / SCAR IMW SQ21-22,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,-54,-64.4,0,0
-3210,WGS 84 / SCAR IMW SQ37-38,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,42,-64.4,0,0
-3211,WGS 84 / SCAR IMW SQ39-40,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,54,-64.4,0,0
-3212,WGS 84 / SCAR IMW SQ41-42,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,66,-64.4,0,0
-3213,WGS 84 / SCAR IMW SQ43-44,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,78,-64.4,0,0
-3214,WGS 84 / SCAR IMW SQ45-46,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,90,-64.4,0,0
-3215,WGS 84 / SCAR IMW SQ47-48,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,102,-64.4,0,0
-3216,WGS 84 / SCAR IMW SQ49-50,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,114,-64.4,0,0
-3217,WGS 84 / SCAR IMW SQ51-52,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,126,-64.4,0,0
-3218,WGS 84 / SCAR IMW SQ53-54,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,138,-64.4,0,0
-3219,WGS 84 / SCAR IMW SQ55-56,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,150,-64.4,0,0
-3220,WGS 84 / SCAR IMW SQ57-58,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-67.2,-90,162,-64.4,0,0
-3221,WGS 84 / SCAR IMW SR13-14,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,-102,-68.4,0,0
-3222,WGS 84 / SCAR IMW SR15-16,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,-90,-68.4,0,0
-3223,WGS 84 / SCAR IMW SR17-18,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,-78,-68.4,0,0
-3224,WGS 84 / SCAR IMW SR19-20,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,-66,-68.4,0,0
-3225,WGS 84 / SCAR IMW SR27-28,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,-18,-68.4,0,0
-3226,WGS 84 / SCAR IMW SR29-30,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,-6,-68.4,0,0
-3227,WGS 84 / SCAR IMW SR31-32,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,6,-68.4,0,0
-3228,WGS 84 / SCAR IMW SR33-34,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,18,-68.4,0,0
-3229,WGS 84 / SCAR IMW SR35-36,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,30,-68.4,0,0
-3230,WGS 84 / SCAR IMW SR37-38,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,42,-68.4,0,0
-3231,WGS 84 / SCAR IMW SR39-40,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,54,-68.4,0,0
-3232,WGS 84 / SCAR IMW SR41-42,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,66,-68.4,0,0
-3233,WGS 84 / SCAR IMW SR43-44,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,78,-68.4,0,0
-3234,WGS 84 / SCAR IMW SR45-46,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,90,-68.4,0,0
-3235,WGS 84 / SCAR IMW SR47-48,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,102,-68.4,0,0
-3236,WGS 84 / SCAR IMW SR49-50,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,114,-68.4,0,0
-3237,WGS 84 / SCAR IMW SR51-52,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,126,-68.4,0,0
-3238,WGS 84 / SCAR IMW SR53-54,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,138,-68.4,0,0
-3239,WGS 84 / SCAR IMW SR55-56,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,150,-68.4,0,0
-3240,WGS 84 / SCAR IMW SR57-58,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,162,-68.4,0,0
-3241,WGS 84 / SCAR IMW SR59-60,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-71.2,-90,174,-68.4,0,0
-3242,WGS 84 / SCAR IMW SS04-06,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,-153,-72.4,0,0
-3243,WGS 84 / SCAR IMW SS07-09,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,-135,-72.4,0,0
-3244,WGS 84 / SCAR IMW SS10-12,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,-117,-72.4,0,0
-3245,WGS 84 / SCAR IMW SS13-15,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,-99,-72.4,0,0
-3246,WGS 84 / SCAR IMW SS16-18,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,-81,-72.4,0,0
-3247,WGS 84 / SCAR IMW SS19-21,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,-63,-72.4,0,0
-3248,WGS 84 / SCAR IMW SS25-27,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,-27,-72.4,0,0
-3249,WGS 84 / SCAR IMW SS28-30,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,-9,-72.4,0,0
-3250,WGS 84 / SCAR IMW SS31-33,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,9,-72.4,0,0
-3251,WGS 84 / SCAR IMW SS34-36,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,27,-72.4,0,0
-3252,WGS 84 / SCAR IMW SS37-39,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,45,-72.4,0,0
-3253,WGS 84 / SCAR IMW SS40-42,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,63,-72.4,0,0
-3254,WGS 84 / SCAR IMW SS43-45,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,81,-72.4,0,0
-3255,WGS 84 / SCAR IMW SS46-48,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,99,-72.4,0,0
-3256,WGS 84 / SCAR IMW SS49-51,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,117,-72.4,0,0
-3257,WGS 84 / SCAR IMW SS52-54,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,135,-72.4,0,0
-3258,WGS 84 / SCAR IMW SS55-57,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,153,-72.4,0,0
-3259,WGS 84 / SCAR IMW SS58-60,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75.2,-90,171,-72.4,0,0
-3260,WGS 84 / SCAR IMW ST01-04,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,-168,-76.4,0,0
-3261,WGS 84 / SCAR IMW ST05-08,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,-144,-76.4,0,0
-3262,WGS 84 / SCAR IMW ST09-12,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,-120,-76.4,0,0
-3263,WGS 84 / SCAR IMW ST13-16,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,-96,-76.4,0,0
-3264,WGS 84 / SCAR IMW ST17-20,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,-72,-76.4,0,0
-3265,WGS 84 / SCAR IMW ST21-24,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,-48,-76.4,0,0
-3266,WGS 84 / SCAR IMW ST25-28,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,-24,-76.4,0,0
-3267,WGS 84 / SCAR IMW ST29-32,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,0,-76.4,0,0
-3268,WGS 84 / SCAR IMW ST33-36,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,24,-76.4,0,0
-3269,WGS 84 / SCAR IMW ST37-40,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,48,-76.4,0,0
-3270,WGS 84 / SCAR IMW ST41-44,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,72,-76.4,0,0
-3271,WGS 84 / SCAR IMW ST45-48,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,96,-76.4,0,0
-3272,WGS 84 / SCAR IMW ST49-52,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,120,-76.4,0,0,
-3273,WGS 84 / SCAR IMW ST53-56,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,144,-76.4,0,0,
-3274,WGS 84 / SCAR IMW ST57-60,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,168,-76.4,0,0,
-3275,WGS 84 / SCAR IMW SU01-05,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-165,0,0,0,0,0,0,-80.1419
-3276,WGS 84 / SCAR IMW SU06-10,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-135,0,0,0,0,0,0,-80.1419
-3277,WGS 84 / SCAR IMW SU11-15,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-105,0,0,0,0,0,0,-80.1419
-3278,WGS 84 / SCAR IMW SU16-20,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-75,0,0,0,0,0,0,-80.1419
-3279,WGS 84 / SCAR IMW SU21-25,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-45,0,0,0,0,0,0,-80.1419
-3280,WGS 84 / SCAR IMW SU26-30,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-15,0,0,0,0,0,0,-80.1419
-3281,WGS 84 / SCAR IMW SU31-35,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,-80.1419
-3282,WGS 84 / SCAR IMW SU36-40,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,0,0,0,0,0,0,-80.1419
-3283,WGS 84 / SCAR IMW SU41-45,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,75,0,0,0,0,0,0,-80.1419
-3284,WGS 84 / SCAR IMW SU46-50,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,105,0,0,0,0,0,0,-80.1419
-3285,WGS 84 / SCAR IMW SU51-55,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,135,0,0,0,0,0,0,-80.1419
-3286,WGS 84 / SCAR IMW SU56-60,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,165,0,0,0,0,0,0,-80.1419
-3287,WGS 84 / SCAR IMW SV01-10,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-150,0,0,0,0,0,0,-80.1419
-3288,WGS 84 / SCAR IMW SV11-20,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-90,0,0,0,0,0,0,-80.1419
-3289,WGS 84 / SCAR IMW SV21-30,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-30,0,0,0,0,0,0,-80.1419
-3290,WGS 84 / SCAR IMW SV31-40,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,0,0,0,0,0,0,-80.1419
-3291,WGS 84 / SCAR IMW SV41-50,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,90,0,0,0,0,0,0,-80.1419
-3292,WGS 84 / SCAR IMW SV51-60,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,150,0,0,0,0,0,0,-80.1419
-3293,WGS 84 / SCAR IMW SW01-60,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-80.1419
-3294,WGS 84 / USGS Transantarctic Mountains,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-78,162,-76.4,0,0,
-3295,Guam 1963 / Yap Islands,Modified Azimuthal Equidistant,metre,0,Guam 1963,Clarke 1866,40000,9.324815,60000,138.100748,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3296,RGPF / UTM zone 5S,Transverse Mercator,metre,0,Reseau Geodesique de la Polynesie Francaise,GRS 1980,500000,0,10000000,-153,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3297,RGPF / UTM zone 6S,Transverse Mercator,metre,0,Reseau Geodesique de la Polynesie Francaise,GRS 1980,500000,0,10000000,-147,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3298,RGPF / UTM zone 7S,Transverse Mercator,metre,0,Reseau Geodesique de la Polynesie Francaise,GRS 1980,500000,0,10000000,-141,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3299,RGPF / UTM zone 8S,Transverse Mercator,metre,0,Reseau Geodesique de la Polynesie Francaise,GRS 1980,500000,0,10000000,-135,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3300,Estonian Coordinate System of 1992,Lambert Conic Conformal (2SP),metre,0,Estonia 1992,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,57.31031942,24,59.2,6375000,500000,
-3301,Estonian Coordinate System of 1997,Lambert Conic Conformal (2SP),metre,0,Estonia 1997,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,57.31031942,24,59.2,6375000,500000,
-3302,IGN63 Hiva Oa / UTM zone 7S,Transverse Mercator,metre,0,IGN63 Hiva Oa,International 1924,500000,0,10000000,-141,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3303,Fatu Iva 72 / UTM zone 7S,Transverse Mercator,metre,0,Fatu Iva 72,International 1924,500000,0,10000000,-141,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3304,Tahiti 79 / UTM zone 6S,Transverse Mercator,metre,0,Tahiti 79,International 1924,500000,0,10000000,-147,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3305,Moorea 87 / UTM zone 6S,Transverse Mercator,metre,0,Moorea 87,International 1924,500000,0,10000000,-147,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3306,Maupiti 83 / UTM zone 5S,Transverse Mercator,metre,0,Maupiti 83,International 1924,500000,0,10000000,-153,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3307,Nakhl-e Ghanem / UTM zone 39N,Transverse Mercator,metre,0,Nakhl-e Ghanem,WGS 84,500000,0,0,51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3308,GDA94 / NSW Lambert,Lambert Conic Conformal (2SP),metre,4283,Geocentric Datum of Australia 1994,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-35.75,-33.25,147,-30.75,4500000,9300000
-3309,NAD27 / California Albers,Albers Equal Area,metre,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.5,0,-120,34,-4000000,0
-3310,NAD83 / California Albers,Albers Equal Area,metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.5,0,-120,34,-4000000,0
-3311,NAD83(HARN) / California Albers,Albers Equal Area,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.5,0,-120,34,-4000000,0
-3312,CSG67 / UTM zone 21N,Transverse Mercator,metre,4623,Centre Spatial Guyanais 1967,International 1924,500000,0,0,-57,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3313,RGFG95 / UTM zone 21N,Transverse Mercator,metre,4624,Reseau Geodesique Francais Guyane 1995,GRS 1980,500000,0,0,-57,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3316,Kasai 1953 / Congo TM zone 22,Transverse Mercator,metre,0,Kasai 1953,Clarke 1880 (RGS),500000,0,10000000,22,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3317,Kasai 1953 / Congo TM zone 24,Transverse Mercator,metre,0,Kasai 1953,Clarke 1880 (RGS),500000,0,10000000,24,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3318,IGC 1962 / Congo TM zone 12,Transverse Mercator,metre,0,IGC 1962 Arc of the 6th Parallel South,Clarke 1880 (RGS),500000,0,10000000,12,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3319,IGC 1962 / Congo TM zone 14,Transverse Mercator,metre,0,IGC 1962 Arc of the 6th Parallel South,Clarke 1880 (RGS),500000,0,10000000,14,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3320,IGC 1962 / Congo TM zone 16,Transverse Mercator,metre,0,IGC 1962 Arc of the 6th Parallel South,Clarke 1880 (RGS),500000,0,10000000,16,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3321,IGC 1962 / Congo TM zone 18,Transverse Mercator,metre,0,IGC 1962 Arc of the 6th Parallel South,Clarke 1880 (RGS),500000,0,10000000,18,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3322,IGC 1962 / Congo TM zone 20,Transverse Mercator,metre,0,IGC 1962 Arc of the 6th Parallel South,Clarke 1880 (RGS),500000,0,10000000,20,0.9999
-3323,IGC 1962 / Congo TM zone 22,Transverse Mercator,metre,0,IGC 1962 Arc of the 6th Parallel South,Clarke 1880 (RGS),500000,0,10000000,22,0.9999
-3324,IGC 1962 / Congo TM zone 24,Transverse Mercator,metre,0,IGC 1962 Arc of the 6th Parallel South,Clarke 1880 (RGS),500000,0,10000000,24,0.9999
-3325,IGC 1962 / Congo TM zone 26,Transverse Mercator,metre,0,IGC 1962 Arc of the 6th Parallel South,Clarke 1880 (RGS),500000,0,10000000,26,0.9999
-3326,IGC 1962 / Congo TM zone 28,Transverse Mercator,metre,0,IGC 1962 Arc of the 6th Parallel South,Clarke 1880 (RGS),500000,0,10000000,28,0.9999
-3327,IGC 1962 / Congo TM zone 30,Transverse Mercator,metre,0,IGC 1962 Arc of the 6th Parallel South,Clarke 1880 (RGS),500000,0,10000000,30,0.9999
-3328,Pulkovo 1942(58) / GUGiK-80,Oblique Stereographic,metre,4179,Pulkovo 1942(58),Krassowsky 1940,500000,52.1,500000,19.1,0.999714
-3329,Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 5,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,5500000,0,0,15,1
-3330,Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 6,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,6500000,0,0,18,1
-3331,Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 7,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,7500000,0,0,21,1
-3332,Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 8,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,8500000,0,0,24,1
-3333,Pulkovo 1942(58) / Gauss-Kruger zone 3,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,3500000,0,0,15,1
-3334,Pulkovo 1942(58) / Gauss-Kruger zone 4,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,4500000,0,0,21,1
-3335,Pulkovo 1942(58) / Gauss-Kruger zone 5,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,5500000,0,0,27,1
-3336,IGN 1962 Kerguelen / UTM zone 42S,Transverse Mercator,metre,0,IGN 1962 Kerguelen,International 1924,500000,0,10000000,69,0.9996
-3337,Le Pouce 1934 / Mauritius Grid,Lambert Conic Conformal (1SP),metre,0,Le Pouce 1934,Clarke 1880 (RGS),1000000,-20.114225,1000000,57.311858,1
-3338,NAD83 / Alaska Albers,Albers Equal Area,metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,50,-154,55,0,0
-3339,IGCB 1955 / Congo TM zone 12,Transverse Mercator,metre,0,Institut Geographique du Congo Belge 1955,Clarke 1880 (RGS),500000,0,10000000,12,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3340,IGCB 1955 / Congo TM zone 14,Transverse Mercator,metre,0,Institut Geographique du Congo Belge 1955,Clarke 1880 (RGS),500000,0,10000000,14,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3341,IGCB 1955 / Congo TM zone 16,Transverse Mercator,metre,0,Institut Geographique du Congo Belge 1955,Clarke 1880 (RGS),500000,0,10000000,16,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3342,IGCB 1955 / UTM zone 33S,Transverse Mercator,metre,0,Institut Geographique du Congo Belge 1955,Clarke 1880 (RGS),500000,0,10000000,15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3343,Mauritania 1999 / UTM zone 28N,Transverse Mercator,metre,0,Mauritania 1999,GRS 1980,500000,0,0,-15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3344,Mauritania 1999 / UTM zone 29N,Transverse Mercator,metre,0,Mauritania 1999,GRS 1980,500000,0,0,-9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3345,Mauritania 1999 / UTM zone 30N,Transverse Mercator,metre,0,Mauritania 1999,GRS 1980,500000,0,0,-3,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3346,LKS94 / Lithuania TM,Transverse Mercator,metre,4669,Lithuania 1994 (ETRS89),GRS 1980,500000,0,0,24,0.9998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3347,NAD83 / Statistics Canada Lambert,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,77,63.390675,-91.52,49,3000000,6200000
-3348,NAD83(CSRS) / Statistics Canada Lambert,Lambert Conic Conformal (2SP),metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,77,63.390675,-91.52,49,3000000,6200000
-3350,Pulkovo 1942 / CS63 zone C0,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,250000,0.06,0,21.57,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3351,Pulkovo 1942 / CS63 zone C1,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,1250000,0.06,0,24.57,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3352,Pulkovo 1942 / CS63 zone C2,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,2250000,0.06,0,27.57,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3353,Mhast (onshore) / UTM zone 32S,Transverse Mercator,metre,4264,Mhast (onshore),International 1924,500000,0,10000000,9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3354,Mhast (offshore) / UTM zone 32S,Transverse Mercator,metre,4264,Mhast (offshore),International 1924,500000,0,10000000,9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3355,Egypt Gulf of Suez S-650 TL / Red Belt,Transverse Mercator,metre,0,Egypt Gulf of Suez S-650 TL,Helmert 1906,615000,30,810000,31,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3356,Grand Cayman 1959 / UTM zone 17N,Transverse Mercator,metre,0,Grand Cayman 1959,Clarke 1866,500000,0,0,-81,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3357,Little Cayman 1961 / UTM zone 17N,Transverse Mercator,metre,0,Little Cayman 1961,Clarke 1866,500000,0,0,-81,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3358,NAD83(HARN) / North Carolina,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.2,33.45,-79,36.1,0,609601.22
-3360,NAD83(HARN) / South Carolina,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.3,31.5,-81,34.5,0,609600
-3361,NAD83(HARN) / South Carolina (ft),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.3,31.5,-81,34.5,0,2000000
-3362,NAD83(HARN) / Pennsylvania North,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.53,40.1,-77.45,41.57,0,600000
-3363,NAD83(HARN) / Pennsylvania North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.53,40.1,-77.45,41.57,0,1968500
-3364,NAD83(HARN) / Pennsylvania South,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.56,39.2,-77.45,40.58,0,600000
-3365,NAD83(HARN) / Pennsylvania South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.56,39.2,-77.45,40.58,0,1968500
-3367,IGN Astro 1960 / UTM zone 28N,Transverse Mercator,metre,0,IGN Astro 1960,Clarke 1880 (RGS),500000,0,0,-15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3368,IGN Astro 1960 / UTM zone 29N,Transverse Mercator,metre,0,IGN Astro 1960,Clarke 1880 (RGS),500000,0,0,-9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3369,IGN Astro 1960 / UTM zone 30N,Transverse Mercator,metre,0,IGN Astro 1960,Clarke 1880 (RGS),500000,0,0,-3,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3370,NAD27 / UTM zone 59N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,171,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3371,NAD27 / UTM zone 60N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,177,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3372,NAD83 / UTM zone 59N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,171,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3373,NAD83 / UTM zone 60N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,177,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3374,FD54 / UTM zone 29N,Transverse Mercator,metre,0,Faroe Datum 1954,International 1924,500000,0,0,-9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3375,GDM2000 / Peninsula RSO,Hotine Oblique Mercator,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,804671,0,0,0,0,323.0132867,4,0,323.0748369,0.99984,0,102.15,0,0,0,0,0,0,
-3376,GDM2000 / East Malaysia BRSO,Hotine Oblique Mercator,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,0,0,0,0,0,53.18569158,4,0,53.07483685,0.99984,0,115,0,0,0,0,0,0,
-3377,GDM2000 / Johor Grid,Cassini-Soldner,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,-14810.562,2.071804708,8758.32,103.254057,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3378,GDM2000 / Sembilan and Melaka Grid,Cassini-Soldner,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,3673.785,2.405645149,-4240.573,101.5829658,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3379,GDM2000 / PahangGrid,Cassini-Soldner,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,-7368.228,3.460979712,6485.858,102.2205876,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3380,GDM2000 / Selangor Grid,Cassini-Soldner,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,-34836.161,3.410473658,56464.049,101.2320788,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3381,GDM2000 / Terengganu Grid,Cassini-Soldner,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,19594.245,4.583462672,3371.895,103.0412992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3382,GDM2000 / Pinang Grid,Cassini-Soldner,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,-23.414,5.251746315,62.283,100.2039757,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3383,GDM2000 / Kedah and Perlis Grid,Cassini-Soldner,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,0,5.575282177,0,100.3810936,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3384,GDM2000 / Perak Grid,Cassini-Soldner,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,-1.769,4.513262688,133454.779,100.4855478,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3385,GDM2000 / Kelantan Grid,Cassini-Soldner,metre,0,Geodetic Datum of Malaysia 2000,GRS 1980,13227.851,5.582115717,8739.894,102.174287,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3386,KKJ / Finland zone 0,Transverse Mercator,metre,4123,Kartastokoordinaattijarjestelma (1966),International 1924,500000,0,0,18,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3387,KKJ / Finland zone 5,Transverse Mercator,metre,4123,Kartastokoordinaattijarjestelma (1966),International 1924,5500000,0,0,33,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3388,Pulkovo 1942 / Caspian Sea Mercator,Mercator (2SP),metre,4284,Pulkovo 1942,Krassowsky 1940,0,0,0,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42
-3389,Pulkovo 1942 / 3-degree Gauss-Kruger zone 60,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,60500000,0,0,180,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3390,Pulkovo 1995 / 3-degree Gauss-Kruger zone 60,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,60500000,0,0,180,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3391,Karbala 1979 / UTM zone 37N,Transverse Mercator,metre,0,Karbala 1979,Clarke 1880 (RGS),500000,0,0,39,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3392,Karbala 1979 / UTM zone 38N,Transverse Mercator,metre,0,Karbala 1979,Clarke 1880 (RGS),500000,0,0,45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3393,Karbala 1979 / UTM zone 39N,Transverse Mercator,metre,0,Karbala 1979,Clarke 1880 (RGS),500000,0,0,51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3394,Nahrwan 1934 / Iraq zone,Lambert Conic Conformal (1SP),metre,0,Nahrwan 1934,Clarke 1880 (RGS),1500000,32.3,1166200,45,0.998786408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3395,WGS 84 / World Mercator,Mercator (1SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3396,PD/83 / 3-degree Gauss-Kruger zone 3,Transverse Mercator,metre,0,Potsdam Datum/83,Bessel 1841,3500000,0,0,9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3397,PD/83 / 3-degree Gauss-Kruger zone 4,Transverse Mercator,metre,0,Potsdam Datum/83,Bessel 1841,4500000,0,0,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3398,RD/83 / 3-degree Gauss-Kruger zone 4,Transverse Mercator,metre,0,Rauenberg Datum/83,Bessel 1841,4500000,0,0,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3399,RD/83 / 3-degree Gauss-Kruger zone 5,Transverse Mercator,metre,0,Rauenberg Datum/83,Bessel 1841,5500000,0,0,15,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3400,NAD83 / Alberta 10-TM (Forest),Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-115,0.9992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3401,NAD83 / Alberta 10-TM (Resource),Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,0,0,0,-115,0.9992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3402,NAD83(CSRS) / Alberta 10-TM (Forest),Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-115,0.9992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3403,NAD83(CSRS) / Alberta 10-TM (Resource),Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,-115,0.9992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3404,NAD83(HARN) / North Carolina (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.2,33.45,-79,36.1,0,2000000
-3405,VN-2000 / UTM zone 48N,Transverse Mercator,metre,0,Vietnam 2000,WGS 84,500000,0,0,105,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3406,VN-2000 / UTM zone 49N,Transverse Mercator,metre,0,Vietnam 2000,WGS 84,500000,0,0,111,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3407,Hong Kong 1963 Grid System,Cassini-Soldner,Clarke's foot,0,Hong Kong 1963,Clarke 1858,132033.92,22.184368,62565.96,114.10428,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3408,NSIDC EASE-Grid North,Lambert Azimuthal Equal Area (Spherical),metre,0,Not specified (based on International 1924 Authalic Sphere),International 1924 Authalic Sphere,0,90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3409,NSIDC EASE-Grid South,Lambert Azimuthal Equal Area (Spherical),metre,0,Not specified (based on International 1924 Authalic Sphere),International 1924 Authalic Sphere,0,-90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3410,NSIDC EASE-Grid Global,Lambert Cylindrical Equal Area (Spherical),metre,0,Not specified (based on International 1924 Authalic Sphere),International 1924 Authalic Sphere,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,0,0,
-3411,NSIDC Sea Ice Polar Stereographic North,Polar Stereographic (variant B),metre,0,Not specified (based on Hughes 1980 ellipsoid),Hughes 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-45,0,0,0,0,0,0,70
-3412,NSIDC Sea Ice Polar Stereographic South,Polar Stereographic (variant B),metre,0,Not specified (based on Hughes 1980 ellipsoid),Hughes 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-70
-3413,WGS 84 / NSIDC Sea Ice Polar Stereographic North,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-45,0,0,0,0,0,0,70
-3414,SVY21 / Singapore TM,Transverse Mercator,metre,0,SVY21,WGS 84,28001.642,1.22,38744.572,103.5,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3415,WGS 72BE / South China Sea Lambert,Lambert Conic Conformal (2SP),metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,21,114,18,500000,500000,
-3416,ETRS89 / Austria Lambert,Lambert Conic Conformal (2SP),metre,4258,European Terrestrial Reference System 1989,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,47.3,13.2,49,400000,400000,
-3417,NAD83 / Iowa North (ft US),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.04,41.3,-93.3,43.16,3280833.333,4921250,
-3418,NAD83 / Iowa South (ft US),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.37,40,-93.3,41.47,0,1640416.667,
-3419,NAD83 / Kansas North (ft US),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.43,38.2,-98,39.47,0,1312333.333,
-3420,NAD83 / Kansas South (ft US),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.16,36.4,-98.3,38.34,1312333.333,1312333.333,
-3421,NAD83 / Nevada East (ft US),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,656166.6667,34.45,26246666.67,-115.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3422,NAD83 / Nevada Central (ft US),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1640416.667,34.45,19685000,-116.4,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3423,NAD83 / Nevada West (ft US),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,2624666.667,34.45,13123333.33,-118.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3424,NAD83 / New Jersey (ft US),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,492125,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3425,NAD83(HARN) / Iowa North (ft US),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.04,41.3,-93.3,43.16,3280833.333,4921250
-3426,NAD83(HARN) / Iowa South (ft US),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.37,40,-93.3,41.47,0,1640416.667
-3427,NAD83(HARN) / Kansas North (ft US),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.43,38.2,-98,39.47,0,1312333.333
-3428,NAD83(HARN) / Kansas South (ft US),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.16,36.4,-98.3,38.34,1312333.333,1312333.333
-3429,NAD83(HARN) / Nevada East (ft US),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,656166.6667,34.45,26246666.67,-115.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3430,NAD83(HARN) / Nevada Central (ft US),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,1640416.667,34.45,19685000,-116.4,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3431,NAD83(HARN) / Nevada West (ft US),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,2624666.667,34.45,13123333.33,-118.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3432,NAD83(HARN) / New Jersey (ft US),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,492125,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3433,NAD83 / Arkansas North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.56,34.2,-92,36.14,0,1312333.333
-3434,NAD83 / Arkansas South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.18,32.4,-92,34.46,1312333.333,1312333.333
-3435,NAD83 / Illinois East (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,984250,36.4,0,-88.2,0.999975,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3436,NAD83 / Illinois West (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,2296583.333,36.4,0,-90.1,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3437,NAD83 / New Hampshire (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,984250,42.3,0,-71.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3438,NAD83 / Rhode Island (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,328083.3333,41.05,0,-71.3,0.99999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3439,PSD93 / UTM zone 39N,Transverse Mercator,metre,4134,PDO Survey Datum 1993,Clarke 1880 (RGS),500000,0,0,51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3440,PSD93 / UTM zone 40N,Transverse Mercator,metre,4134,PDO Survey Datum 1993,Clarke 1880 (RGS),500000,0,0,57,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3441,NAD83(HARN) / Arkansas North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.56,34.2,-92,36.14,0,1312333.333
-3442,NAD83(HARN) / Arkansas South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.18,32.4,-92,34.46,1312333.333,1312333.333
-3443,NAD83(HARN) / Illinois East (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,984250,36.4,0,-88.2,0.999975,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3444,NAD83(HARN) / Illinois West (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,2296583.333,36.4,0,-90.1,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3445,NAD83(HARN) / New Hampshire (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,984250,42.3,0,-71.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3446,NAD83(HARN) / Rhode Island (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,328083.3333,41.05,0,-71.3,0.99999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3447,ETRS89 / Belgian Lambert 2005,Lambert Conic Conformal (2SP),metre,4258,European Terrestrial Reference System 1989,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51.1,50.4752134,4.2133177,49.5,166262,150328
-3448,JAD2001 / Jamaica Metric Grid,Lambert Conic Conformal (1SP),metre,0,Jamaica 2001,WGS 84,750000,18,650000,-77,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3449,JAD2001 / UTM zone 17N,Transverse Mercator,metre,0,Jamaica 2001,WGS 84,500000,0,0,-81,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3450,JAD2001 / UTM zone 18N,Transverse Mercator,metre,0,Jamaica 2001,WGS 84,500000,0,0,-75,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3451,NAD83 / Louisiana North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.1,30.3,-92.3,32.4,0,3280833.333
-3452,NAD83 / Louisiana South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.18,28.3,-91.2,30.42,0,3280833.333
-3453,NAD83 / Louisiana Offshore (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26.1,25.3,-91.2,27.5,0,3280833.333
-3455,NAD83 / South Dakota South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.5,42.2,-100.2,44.24,0,1968500
-3456,NAD83(HARN) / Louisiana North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.1,30.3,-92.3,32.4,0,3280833.333
-3457,NAD83(HARN) / Louisiana South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.18,28.3,-91.2,30.42,0,3280833.333
-3458,NAD83(HARN) / South Dakota North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.25,43.5,-100,45.41,0,1968500
-3459,NAD83(HARN) / South Dakota South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.5,42.2,-100.2,44.24,0,1968500
-3460,Fiji 1986 / Fiji Map Grid,Transverse Mercator,metre,0,Fiji Geodetic Datum 1986,WGS 72,2000000,-17,4000000,178.45,0.99985,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3461,Dabola 1981 / UTM zone 28N,Transverse Mercator,metre,0,Dabola 1981,Clarke 1880 (IGN),500000,0,0,-15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3462,Dabola 1981 / UTM zone 29N,Transverse Mercator,metre,0,Dabola 1981,Clarke 1880 (IGN),500000,0,0,-9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3463,NAD83 / Maine CS2000 Central,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,43.3,0,-69.073,0.99998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3464,NAD83(HARN) / Maine CS2000 Central,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,43.3,0,-69.073,0.99998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3465,NAD83(NSRS2007) / Alabama East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,200000,30.3,0,-85.5,0.99996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3466,NAD83(NSRS2007) / Alabama West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,600000,30,0,-87.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3467,NAD83(NSRS2007) / Alaska Albers,Albers Equal Area,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,50,-154,55,0,0
-3468,NAD83(NSRS2007) / Alaska zone 1,Hotine Oblique Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,5000000,0,-5000000,0,0,323.0748369,57,0,323.0748369,0.9999,0,-133.4,0,0,0,0,0,0,0,0,
-3469,NAD83(NSRS2007) / Alaska zone 2,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,54,0,-142,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3470,NAD83(NSRS2007) / Alaska zone 3,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,54,0,-146,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3471,NAD83(NSRS2007) / Alaska zone 4,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,54,0,-150,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3472,NAD83(NSRS2007) / Alaska zone 5,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,54,0,-154,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3473,NAD83(NSRS2007) / Alaska zone 6,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,54,0,-158,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3474,NAD83(NSRS2007) / Alaska zone 7,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,54,0,-162,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3475,NAD83(NSRS2007) / Alaska zone 8,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,54,0,-166,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3476,NAD83(NSRS2007) / Alaska zone 9,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,54,0,-170,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3477,NAD83(NSRS2007) / Alaska zone 10,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51.5,51,-176,53.5,0,1000000
-3478,NAD83(NSRS2007) / Arizona Central,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,213360,31,0,-111.55,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3479,NAD83(NSRS2007) / Arizona Central (ft),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,700000,31,0,-111.55,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3480,NAD83(NSRS2007) / Arizona East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,213360,31,0,-110.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3481,NAD83(NSRS2007) / Arizona East (ft),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,700000,31,0,-110.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3482,NAD83(NSRS2007) / Arizona West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,213360,31,0,-113.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3483,NAD83(NSRS2007) / Arizona West (ft),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,700000,31,0,-113.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3484,NAD83(NSRS2007) / Arkansas North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.56,34.2,-92,36.14,0,400000
-3485,NAD83(NSRS2007) / Arkansas North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.56,34.2,-92,36.14,0,1312333.333
-3486,NAD83(NSRS2007) / Arkansas South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.18,32.4,-92,34.46,400000,400000
-3487,NAD83(NSRS2007) / Arkansas South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.18,32.4,-92,34.46,1312333.333,1312333.333
-3488,NAD83(NSRS2007) / California Albers,Albers Equal Area,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.5,0,-120,34,-4000000,0
-3489,NAD83(NSRS2007) / California zone 1,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.2,-122,41.4,500000,2000000
-3490,NAD83(NSRS2007) / California zone 1 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.2,-122,41.4,1640416.667,6561666.667
-3491,NAD83(NSRS2007) / California zone 2,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.2,37.4,-122,39.5,500000,2000000
-3492,NAD83(NSRS2007) / California zone 2 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.2,37.4,-122,39.5,1640416.667,6561666.667
-3493,NAD83(NSRS2007) / California zone 3,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.04,36.3,-120.3,38.26,500000,2000000
-3494,NAD83(NSRS2007) / California zone 3 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.04,36.3,-120.3,38.26,1640416.667,6561666.667
-3495,NAD83(NSRS2007) / California zone 4,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,35.2,-119,37.15,500000,2000000
-3496,NAD83(NSRS2007) / California zone 4 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,35.2,-119,37.15,1640416.667,6561666.667
-3497,NAD83(NSRS2007) / California zone 5,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.02,33.3,-118,35.28,500000,2000000
-3498,NAD83(NSRS2007) / California zone 5 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.02,33.3,-118,35.28,1640416.667,6561666.667
-3499,NAD83(NSRS2007) / California zone 6,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.47,32.1,-116.15,33.53,500000,2000000
-3500,NAD83(NSRS2007) / California zone 6 (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.47,32.1,-116.15,33.53,1640416.667,6561666.667
-3501,NAD83(NSRS2007) / Colorado Central,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.27,37.5,-105.3,39.45,304800.6096,914401.8289
-3502,NAD83(NSRS2007) / Colorado Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.27,37.5,-105.3,39.45,1000000,3000000
-3503,NAD83(NSRS2007) / Colorado North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.43,39.2,-105.3,40.47,304800.6096,914401.8289
-3504,NAD83(NSRS2007) / Colorado North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.43,39.2,-105.3,40.47,1000000,3000000
-3505,NAD83(NSRS2007) / Colorado South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.14,36.4,-105.3,38.26,304800.6096,914401.8289
-3506,NAD83(NSRS2007) / Colorado South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.14,36.4,-105.3,38.26,1000000,3000000
-3507,NAD83(NSRS2007) / Connecticut,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.12,40.5,-72.45,41.52,152400.3048,304800.6096
-3508,NAD83(NSRS2007) / Connecticut (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.12,40.5,-72.45,41.52,500000,1000000
-3509,NAD83(NSRS2007) / Delaware,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,200000,38,0,-75.25,0.999995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3510,NAD83(NSRS2007) / Delaware (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,656166.667,38,0,-75.25,0.999995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3511,NAD83(NSRS2007) / Florida East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,200000,24.2,0,-81,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3512,NAD83(NSRS2007) / Florida East (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,656166.667,24.2,0,-81,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3513,NAD83(NSRS2007) / Florida GDL Albers,Albers Equal Area,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.3,24,-84,24,0,400000
-3514,NAD83(NSRS2007) / Florida North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.35,29,-84.3,30.45,0,600000
-3515,NAD83(NSRS2007) / Florida North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.35,29,-84.3,30.45,0,1968500
-3516,NAD83(NSRS2007) / Florida West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,200000,24.2,0,-82,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3517,NAD83(NSRS2007) / Florida West (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,656166.667,24.2,0,-82,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3518,NAD83(NSRS2007) / Georgia East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,200000,30,0,-82.1,0.9999
-3519,NAD83(NSRS2007) / Georgia East (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,656166.667,30,0,-82.1,0.9999
-3520,NAD83(NSRS2007) / Georgia West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,700000,30,0,-84.1,0.9999
-3521,NAD83(NSRS2007) / Georgia West (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,2296583.333,30,0,-84.1,0.9999
-3522,NAD83(NSRS2007) / Idaho Central,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,41.4,0,-114,0.999947368
-3523,NAD83(NSRS2007) / Idaho Central (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,1640416.667,41.4,0,-114,0.999947368
-3524,NAD83(NSRS2007) / Idaho East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,200000,41.4,0,-112.1,0.999947368
-3525,NAD83(NSRS2007) / Idaho East (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,656166.667,41.4,0,-112.1,0.999947368
-3526,NAD83(NSRS2007) / Idaho West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,800000,41.4,0,-115.45,0.999933333
-3527,NAD83(NSRS2007) / Idaho West (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,2624666.667,41.4,0,-115.45,0.999933333
-3528,NAD83(NSRS2007) / Illinois East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,300000,36.4,0,-88.2,0.999975
-3529,NAD83(NSRS2007) / Illinois East (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,984250,36.4,0,-88.2,0.999975
-3530,NAD83(NSRS2007) / Illinois West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,700000,36.4,0,-90.1,0.999941177
-3531,NAD83(NSRS2007) / Illinois West (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,2296583.333,36.4,0,-90.1,0.999941177
-3532,NAD83(NSRS2007) / Indiana East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,100000,37.3,250000,-85.4,0.999966667
-3533,NAD83(NSRS2007) / Indiana East (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,328083.333,37.3,820208.333,-85.4,0.999966667
-3534,NAD83(NSRS2007) / Indiana West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,900000,37.3,250000,-87.05,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3535,NAD83(NSRS2007) / Indiana West (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,2952750,37.3,820208.333,-87.05,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3536,NAD83(NSRS2007) / Iowa North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.04,41.3,-93.3,43.16,1000000,1500000
-3537,NAD83(NSRS2007) / Iowa North (ft US),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.04,41.3,-93.3,43.16,3280833.333,4921250
-3538,NAD83(NSRS2007) / Iowa South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.37,40,-93.3,41.47,0,500000
-3539,NAD83(NSRS2007) / Iowa South (ft US),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.37,40,-93.3,41.47,0,1640416.667
-3540,NAD83(NSRS2007) / Kansas North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.43,38.2,-98,39.47,0,400000
-3541,NAD83(NSRS2007) / Kansas North (ft US),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.43,38.2,-98,39.47,0,1312333.333
-3542,NAD83(NSRS2007) / Kansas South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.16,36.4,-98.3,38.34,400000,400000
-3543,NAD83(NSRS2007) / Kansas South (ft US),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.16,36.4,-98.3,38.34,1312333.333,1312333.333
-3544,NAD83(NSRS2007) / Kentucky North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.58,37.3,-84.15,37.58,0,500000
-3545,NAD83(NSRS2007) / Kentucky North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.58,37.3,-84.15,37.58,0,1640416.667
-3546,NAD83(NSRS2007) / Kentucky Single Zone,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.4,36.2,-85.45,37.05,1000000,1500000
-3547,NAD83(NSRS2007) / Kentucky Single Zone (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.4,36.2,-85.45,37.05,3280833.333,4921250
-3548,NAD83(NSRS2007) / Kentucky South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.44,36.2,-85.45,37.56,500000,500000
-3549,NAD83(NSRS2007) / Kentucky South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.44,36.2,-85.45,37.56,1640416.667,1640416.667
-3550,NAD83(NSRS2007) / Louisiana North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.1,30.3,-92.3,32.4,0,1000000
-3551,NAD83(NSRS2007) / Louisiana North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.1,30.3,-92.3,32.4,0,3280833.333
-3552,NAD83(NSRS2007) / Louisiana South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.18,28.3,-91.2,30.42,0,1000000
-3553,NAD83(NSRS2007) / Louisiana South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.18,28.3,-91.2,30.42,0,3280833.333
-3554,NAD83(NSRS2007) / Maine CS2000 Central,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,43.3,0,-69.073,0.99998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3555,NAD83(NSRS2007) / Maine CS2000 East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,700000,43.5,0,-67.523,0.99998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3556,NAD83(NSRS2007) / Maine CS2000 West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,300000,42.5,0,-70.223,0.99998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3557,NAD83(NSRS2007) / Maine East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,300000,43.4,0,-68.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3558,NAD83(NSRS2007) / Maine West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,900000,42.5,0,-70.1,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3559,NAD83(NSRS2007) / Maryland,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.18,37.4,-77,39.27,0,400000
-3560,NAD83 / Utah North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.43,40.2,-111.3,41.47,3280833.333,1640416.667
-3561,Old Hawaiian / Hawaii zone 1,Transverse Mercator,US survey foot,4135,Old Hawaiian,Clarke 1866,500000,18.5,0,-155.3,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3562,Old Hawaiian / Hawaii zone 2,Transverse Mercator,US survey foot,4135,Old Hawaiian,Clarke 1866,500000,20.2,0,-156.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3563,Old Hawaiian / Hawaii zone 3,Transverse Mercator,US survey foot,4135,Old Hawaiian,Clarke 1866,500000,21.1,0,-158,0.99999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3564,Old Hawaiian / Hawaii zone 4,Transverse Mercator,US survey foot,4135,Old Hawaiian,Clarke 1866,500000,21.5,0,-159.3,0.99999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3565,Old Hawaiian / Hawaii zone 5,Transverse Mercator,US survey foot,4135,Old Hawaiian,Clarke 1866,500000,21.4,0,-160.1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3566,NAD83 / Utah Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.01,38.2,-111.3,40.39,6561666.667,1640416.667
-3567,NAD83 / Utah South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.13,36.4,-111.3,38.21,9842500,1640416.667
-3568,NAD83(HARN) / Utah North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.43,40.2,-111.3,41.47,3280833.333,1640416.667
-3569,NAD83(HARN) / Utah Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.01,38.2,-111.3,40.39,6561666.667,1640416.667
-3570,NAD83(HARN) / Utah South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.13,36.4,-111.3,38.21,9842500,1640416.667
-3571,WGS 84 / North Pole LAEA Bering Sea,Lambert Azimuthal Equal Area,metre,4326,World Geodetic System 1984,WGS 84,0,90,0,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3572,WGS 84 / North Pole LAEA Alaska,Lambert Azimuthal Equal Area,metre,4326,World Geodetic System 1984,WGS 84,0,90,0,-150,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3573,WGS 84 / North Pole LAEA Canada,Lambert Azimuthal Equal Area,metre,4326,World Geodetic System 1984,WGS 84,0,90,0,-100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3574,WGS 84 / North Pole LAEA Atlantic,Lambert Azimuthal Equal Area,metre,4326,World Geodetic System 1984,WGS 84,0,90,0,-40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3575,WGS 84 / North Pole LAEA Europe,Lambert Azimuthal Equal Area,metre,4326,World Geodetic System 1984,WGS 84,0,90,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3576,WGS 84 / North Pole LAEA Russia,Lambert Azimuthal Equal Area,metre,4326,World Geodetic System 1984,WGS 84,0,90,0,90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3577,GDA94 / Australian Albers,Albers Equal Area,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-36,0,132,-18,0,0
-3578,NAD83 / Yukon Albers,Albers Equal Area,metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,59,-132.3,61.4,500000,500000
-3579,NAD83(CSRS) / Yukon Albers,Albers Equal Area,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,59,-132.3,61.4,500000,500000
-3580,NAD83 / NWT Lambert,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,70,0,-112,62,0,0
-3581,NAD83(CSRS) / NWT Lambert,Lambert Conic Conformal (2SP),metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,70,0,-112,62,0,0
-3582,NAD83(NSRS2007) / Maryland (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.18,37.4,-77,39.27,0,1312333.333
-3583,NAD83(NSRS2007) / Massachusetts Island,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.17,41,-70.3,41.29,0,500000
-3584,NAD83(NSRS2007) / Massachusetts Island (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.17,41,-70.3,41.29,0,1640416.667
-3585,NAD83(NSRS2007) / Massachusetts Mainland,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.43,41,-71.3,42.41,750000,200000
-3586,NAD83(NSRS2007) / Massachusetts Mainland (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.43,41,-71.3,42.41,2460625,656166.667
-3587,NAD83(NSRS2007) / Michigan Central,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.11,43.19,-84.22,45.42,0,6000000
-3588,NAD83(NSRS2007) / Michigan Central (ft),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.11,43.19,-84.22,45.42,0,19685039.37
-3589,NAD83(NSRS2007) / Michigan North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.29,44.47,-87,47.05,0,8000000
-3590,NAD83(NSRS2007) / Michigan North (ft),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.29,44.47,-87,47.05,0,26246719.16
-3591,NAD83(NSRS2007) / Michigan Oblique Mercator,Hotine Oblique Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,2546731.496,0,-4354009.816,0,0,337.25556,45.1833,0,337.25556,0.9996,0,-86,0,0,0,0,0,0,0,0,
-3592,NAD83(NSRS2007) / Michigan South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.06,41.3,-84.22,43.4,0,4000000
-3593,NAD83(NSRS2007) / Michigan South (ft),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.06,41.3,-84.22,43.4,0,13123359.58
-3594,NAD83(NSRS2007) / Minnesota Central,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.37,45,-94.15,47.03,100000,800000
-3595,NAD83(NSRS2007) / Minnesota North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.02,46.3,-93.06,48.38,100000,800000
-3596,NAD83(NSRS2007) / Minnesota South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43.47,43,-94,45.13,100000,800000
-3597,NAD83(NSRS2007) / Mississippi East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,300000,29.3,0,-88.5,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3598,NAD83(NSRS2007) / Mississippi East (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,984250,29.3,0,-88.5,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3599,NAD83(NSRS2007) / Mississippi West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,700000,29.3,0,-90.2,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3600,NAD83(NSRS2007) / Mississippi West (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,2296583.333,29.3,0,-90.2,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3601,NAD83(NSRS2007) / Missouri Central,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,35.5,0,-92.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3602,NAD83(NSRS2007) / Missouri East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,250000,35.5,0,-90.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3603,NAD83(NSRS2007) / Missouri West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,850000,36.1,0,-94.3,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3604,NAD83(NSRS2007) / Montana,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,44.15,-109.3,49,0,600000
-3605,NAD83(NSRS2007) / Montana (ft),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,44.15,-109.3,49,0,1968503.937
-3606,NAD83(NSRS2007) / Nebraska,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.5,-100,43,0,500000
-3607,NAD83(NSRS2007) / Nevada Central,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,34.45,6000000,-116.4,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3608,NAD83(NSRS2007) / Nevada Central (ft US),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,1640416.667,34.45,19685000,-116.4,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3609,NAD83(NSRS2007) / Nevada East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,200000,34.45,8000000,-115.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3610,NAD83(NSRS2007) / Nevada East (ft US),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,656166.6667,34.45,26246666.67,-115.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3611,NAD83(NSRS2007) / Nevada West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,800000,34.45,4000000,-118.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3612,NAD83(NSRS2007) / Nevada West (ft US),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,2624666.667,34.45,13123333.33,-118.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3613,NAD83(NSRS2007) / New Hampshire,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,300000,42.3,0,-71.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3614,NAD83(NSRS2007) / New Hampshire (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,984250,42.3,0,-71.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3615,NAD83(NSRS2007) / New Jersey,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,150000,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3616,NAD83(NSRS2007) / New Jersey (ft US),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,492125,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3617,NAD83(NSRS2007) / New Mexico Central,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,31,0,-106.15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3618,NAD83(NSRS2007) / New Mexico Central (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,1640416.667,31,0,-106.15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3619,NAD83(NSRS2007) / New Mexico East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,165000,31,0,-104.2,0.999909091,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3620,NAD83(NSRS2007) / New Mexico East (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,541337.5,31,0,-104.2,0.999909091,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3621,NAD83(NSRS2007) / New Mexico West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,830000,31,0,-107.5,0.999916667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3622,NAD83(NSRS2007) / New Mexico West (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,2723091.667,31,0,-107.5,0.999916667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3623,NAD83(NSRS2007) / New York Central,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,250000,40,0,-76.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3624,NAD83(NSRS2007) / New York Central (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,820208.333,40,0,-76.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3625,NAD83(NSRS2007) / New York East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,150000,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3626,NAD83(NSRS2007) / New York East (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,492125,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3627,NAD83(NSRS2007) / New York Long Island,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.4,40.1,-74,41.02,0,300000
-3628,NAD83(NSRS2007) / New York Long Island (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.4,40.1,-74,41.02,0,984250
-3629,NAD83(NSRS2007) / New York West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,350000,40,0,-78.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3630,NAD83(NSRS2007) / New York West (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,1148291.667,40,0,-78.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3631,NAD83(NSRS2007) / North Carolina,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.2,33.45,-79,36.1,0,609601.22
-3632,NAD83(NSRS2007) / North Carolina (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.2,33.45,-79,36.1,0,2000000
-3633,NAD83(NSRS2007) / North Dakota North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.26,47,-100.3,48.44,0,600000
-3634,NAD83(NSRS2007) / North Dakota North (ft),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.26,47,-100.3,48.44,0,1968503.937
-3635,NAD83(NSRS2007) / North Dakota South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46.11,45.4,-100.3,47.29,0,600000
-3636,NAD83(NSRS2007) / North Dakota South (ft),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46.11,45.4,-100.3,47.29,0,1968503.937
-3637,NAD83(NSRS2007) / Ohio North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.26,39.4,-82.3,41.42,0,600000
-3638,NAD83(NSRS2007) / Ohio South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.44,38,-82.3,40.02,0,600000
-3639,NAD83(NSRS2007) / Oklahoma North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.34,35,-98,36.46,0,600000
-3640,NAD83(NSRS2007) / Oklahoma North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.34,35,-98,36.46,0,1968500
-3641,NAD83(NSRS2007) / Oklahoma South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.56,33.2,-98,35.14,0,600000
-3642,NAD83(NSRS2007) / Oklahoma South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.56,33.2,-98,35.14,0,1968500
-3643,NAD83(NSRS2007) / Oregon Lambert,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.3,41.45,-120.3,43,0,400000
-3644,NAD83(NSRS2007) / Oregon Lambert (ft),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.3,41.45,-120.3,43,0,1312335.958
-3645,NAD83(NSRS2007) / Oregon North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.2,43.4,-120.3,46,0,2500000
-3646,NAD83(NSRS2007) / Oregon North (ft),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.2,43.4,-120.3,46,0,8202099.738
-3647,NAD83(NSRS2007) / Oregon South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.2,41.4,-120.3,44,0,1500000
-3648,NAD83(NSRS2007) / Oregon South (ft),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.2,41.4,-120.3,44,0,4921259.843
-3649,NAD83(NSRS2007) / Pennsylvania North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.53,40.1,-77.45,41.57,0,600000
-3650,NAD83(NSRS2007) / Pennsylvania North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.53,40.1,-77.45,41.57,0,1968500
-3651,NAD83(NSRS2007) / Pennsylvania South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.56,39.2,-77.45,40.58,0,600000
-3652,NAD83(NSRS2007) / Pennsylvania South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.56,39.2,-77.45,40.58,0,1968500
-3653,NAD83(NSRS2007) / Rhode Island,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,100000,41.05,0,-71.3,0.99999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3654,NAD83(NSRS2007) / Rhode Island (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,328083.3333,41.05,0,-71.3,0.99999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3655,NAD83(NSRS2007) / South Carolina,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.3,31.5,-81,34.5,0,609600
-3656,NAD83(NSRS2007) / South Carolina (ft),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.3,31.5,-81,34.5,0,2000000
-3657,NAD83(NSRS2007) / South Dakota North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.25,43.5,-100,45.41,0,600000
-3658,NAD83(NSRS2007) / South Dakota North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.25,43.5,-100,45.41,0,1968500
-3659,NAD83(NSRS2007) / South Dakota South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.5,42.2,-100.2,44.24,0,600000
-3660,NAD83(NSRS2007) / South Dakota South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.5,42.2,-100.2,44.24,0,1968500
-3661,NAD83(NSRS2007) / Tennessee,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.15,34.2,-86,36.25,0,600000
-3662,NAD83(NSRS2007) / Tennessee (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.15,34.2,-86,36.25,0,1968500
-3663,NAD83(NSRS2007) / Texas Central,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30.07,29.4,-100.2,31.53,3000000,700000
-3664,NAD83(NSRS2007) / Texas Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30.07,29.4,-100.2,31.53,9842500,2296583.333
-3665,NAD83(NSRS2007) / Texas Centric Albers Equal Area,Albers Equal Area,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,18,-100,27.3,6000000,1500000
-3666,NAD83(NSRS2007) / Texas Centric Lambert Conformal,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,18,-100,27.3,5000000,1500000
-3667,NAD83(NSRS2007) / Texas North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.39,34,-101.3,36.11,1000000,200000
-3668,NAD83(NSRS2007) / Texas North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.39,34,-101.3,36.11,3280833.333,656166.667
-3669,NAD83(NSRS2007) / Texas North Central,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.08,31.4,-98.3,33.58,2000000,600000
-3670,NAD83(NSRS2007) / Texas North Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.08,31.4,-98.3,33.58,6561666.667,1968500
-3671,NAD83(NSRS2007) / Texas South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26.1,25.4,-98.3,27.5,5000000,300000
-3672,NAD83(NSRS2007) / Texas South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26.1,25.4,-98.3,27.5,16404166.67,984250
-3673,NAD83(NSRS2007) / Texas South Central,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28.23,27.5,-99,30.17,4000000,600000
-3674,NAD83(NSRS2007) / Texas South Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28.23,27.5,-99,30.17,13123333.33,1968500
-3675,NAD83(NSRS2007) / Utah Central,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.01,38.2,-111.3,40.39,2000000,500000
-3676,NAD83(NSRS2007) / Utah Central (ft),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.01,38.2,-111.3,40.39,6561679.79,1640419.948
-3677,NAD83(NSRS2007) / Utah Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.01,38.2,-111.3,40.39,6561666.667,1640416.667
-3678,NAD83(NSRS2007) / Utah North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.43,40.2,-111.3,41.47,1000000,500000
-3679,NAD83(NSRS2007) / Utah North (ft),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.43,40.2,-111.3,41.47,3280839.895,1640419.948
-3680,NAD83(NSRS2007) / Utah North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.43,40.2,-111.3,41.47,3280833.333,1640416.667
-3681,NAD83(NSRS2007) / Utah South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.13,36.4,-111.3,38.21,3000000,500000
-3682,NAD83(NSRS2007) / Utah South (ft),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.13,36.4,-111.3,38.21,9842519.685,1640419.948
-3683,NAD83(NSRS2007) / Utah South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.13,36.4,-111.3,38.21,9842500,1640416.667
-3684,NAD83(NSRS2007) / Vermont,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,42.3,0,-72.3,0.999964286,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3685,NAD83(NSRS2007) / Virginia North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.02,37.4,-78.3,39.12,2000000,3500000
-3686,NAD83(NSRS2007) / Virginia North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.02,37.4,-78.3,39.12,6561666.667,11482916.67
-3687,NAD83(NSRS2007) / Virginia South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.46,36.2,-78.3,37.58,1000000,3500000
-3688,NAD83(NSRS2007) / Virginia South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.46,36.2,-78.3,37.58,3280833.333,11482916.67
-3689,NAD83(NSRS2007) / Washington North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.3,47,-120.5,48.44,0,500000
-3690,NAD83(NSRS2007) / Washington North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.3,47,-120.5,48.44,0,1640416.667
-3691,NAD83(NSRS2007) / Washington South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.5,45.2,-120.3,47.2,0,500000
-3692,NAD83(NSRS2007) / Washington South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.5,45.2,-120.3,47.2,0,1640416.667
-3693,NAD83(NSRS2007) / West Virginia North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39,38.3,-79.3,40.15,0,600000
-3694,NAD83(NSRS2007) / West Virginia South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.29,37,-81,38.53,0,600000
-3695,NAD83(NSRS2007) / Wisconsin Central,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.15,43.5,-90,45.3,0,600000
-3696,NAD83(NSRS2007) / Wisconsin Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.15,43.5,-90,45.3,0,1968500
-3697,NAD83(NSRS2007) / Wisconsin North,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.34,45.1,-90,46.46,0,600000
-3698,NAD83(NSRS2007) / Wisconsin North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.34,45.1,-90,46.46,0,1968500
-3699,NAD83(NSRS2007) / Wisconsin South,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.44,42,-90,44.04,0,600000
-3700,NAD83(NSRS2007) / Wisconsin South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.44,42,-90,44.04,0,1968500
-3701,NAD83(NSRS2007) / Wisconsin Transverse Mercator,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,520000,0,-4480000,-90,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3702,NAD83(NSRS2007) / Wyoming East,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,200000,40.3,0,-105.1,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3703,NAD83(NSRS2007) / Wyoming East Central,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,400000,40.3,100000,-107.2,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3704,NAD83(NSRS2007) / Wyoming West Central,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,600000,40.3,0,-108.45,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3705,NAD83(NSRS2007) / Wyoming West,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,800000,40.3,100000,-110.05,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3706,NAD83(NSRS2007) / UTM zone 59N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,171,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3707,NAD83(NSRS2007) / UTM zone 60N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,177,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3708,NAD83(NSRS2007) / UTM zone 1N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-177,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3709,NAD83(NSRS2007) / UTM zone 2N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-171,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3710,NAD83(NSRS2007) / UTM zone 3N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-165,0.9996
-3711,NAD83(NSRS2007) / UTM zone 4N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-159,0.9996
-3712,NAD83(NSRS2007) / UTM zone 5N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-153,0.9996
-3713,NAD83(NSRS2007) / UTM zone 6N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-147,0.9996
-3714,NAD83(NSRS2007) / UTM zone 7N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-141,0.9996
-3715,NAD83(NSRS2007) / UTM zone 8N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-135,0.9996
-3716,NAD83(NSRS2007) / UTM zone 9N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-129,0.9996
-3717,NAD83(NSRS2007) / UTM zone 10N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-123,0.9996
-3718,NAD83(NSRS2007) / UTM zone 11N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-117,0.9996
-3719,NAD83(NSRS2007) / UTM zone 12N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-111,0.9996
-3720,NAD83(NSRS2007) / UTM zone 13N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-105,0.9996
-3721,NAD83(NSRS2007) / UTM zone 14N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-99,0.9996
-3722,NAD83(NSRS2007) / UTM zone 15N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-93,0.9996
-3723,NAD83(NSRS2007) / UTM zone 16N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-87,0.9996
-3724,NAD83(NSRS2007) / UTM zone 17N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-81,0.9996
-3725,NAD83(NSRS2007) / UTM zone 18N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-75,0.9996
-3726,NAD83(NSRS2007) / UTM zone 19N,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,0,0,-69,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3727,Reunion 1947 / TM Reunion,Transverse Mercator,metre,0,Reunion 1947,International 1924,160000,-21.07,50000,55.32,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3728,NAD83(NSRS2007) / Ohio North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.26,39.4,-82.3,41.42,0,1968500
-3729,NAD83(NSRS2007) / Ohio South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.44,38,-82.3,40.02,0,1968500
-3730,NAD83(NSRS2007) / Wyoming East (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,656166.6667,40.3,0,-105.1,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3731,NAD83(NSRS2007) / Wyoming East Central (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,1312333.333,40.3,328083.3333,-107.2,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3732,NAD83(NSRS2007) / Wyoming West Central (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,1968500,40.3,0,-108.45,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3733,NAD83(NSRS2007) / Wyoming West (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,2624666.667,40.3,328083.3333,-110.05,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3734,NAD83 / Ohio North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.26,39.4,-82.3,41.42,0,1968500
-3735,NAD83 / Ohio South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.44,38,-82.3,40.02,0,1968500
-3736,NAD83 / Wyoming East (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,656166.6667,40.3,0,-105.1,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3737,NAD83 / Wyoming East Central (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1312333.333,40.3,328083.3333,-107.2,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3738,NAD83 / Wyoming West Central (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1968500,40.3,0,-108.45,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3739,NAD83 / Wyoming West (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,2624666.667,40.3,328083.3333,-110.05,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3740,NAD83(HARN) / UTM zone 10N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-123,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3741,NAD83(HARN) / UTM zone 11N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-117,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3742,NAD83(HARN) / UTM zone 12N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-111,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3743,NAD83(HARN) / UTM zone 13N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-105,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3744,NAD83(HARN) / UTM zone 14N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-99,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3745,NAD83(HARN) / UTM zone 15N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-93,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3746,NAD83(HARN) / UTM zone 16N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-87,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3747,NAD83(HARN) / UTM zone 17N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-81,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3748,NAD83(HARN) / UTM zone 18N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-75,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3749,NAD83(HARN) / UTM zone 19N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-69,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3750,NAD83(HARN) / UTM zone 4N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-159,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3751,NAD83(HARN) / UTM zone 5N,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,0,0,-153,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3753,NAD83(HARN) / Ohio North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.26,39.4,-82.3,41.42,0,1968500
-3754,NAD83(HARN) / Ohio South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.44,38,-82.3,40.02,0,1968500
-3755,NAD83(HARN) / Wyoming East (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,656166.6667,40.3,0,-105.1,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3756,NAD83(HARN) / Wyoming East Central (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,1312333.333,40.3,328083.3333,-107.2,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3757,NAD83(HARN) / Wyoming West Central (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,1968500,40.3,0,-108.45,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3758,NAD83(HARN) / Wyoming West (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,2624666.667,40.3,328083.3333,-110.05,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3759,NAD83 / Hawaii zone 3 (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1640416.667,21.1,0,-158,0.99999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3760,NAD83(HARN) / Hawaii zone 3 (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,1640416.667,21.1,0,-158,0.99999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3761,NAD83(CSRS) / UTM zone 22N,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,500000,0,0,-51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3762,WGS 84 / South Georgia Lambert,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-54.45,-55,-37,-54,0,0
-3763,ETRS89 / Portugal TM06,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,0,39.400573,0,-8.075919,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3764,NZGD2000 / Chatham Island Circuit 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,400000,-44,800000,-176.3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3765,HTRS96 / Croatia TM,Transverse Mercator,metre,0,Croatian Terrestrial Reference System,GRS 1980,500000,0,0,16.5,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3766,HTRS96 / Croatia LCC,Lambert Conic Conformal (2SP),metre,0,Croatian Terrestrial Reference System,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43.05,0,16.3,45.55,0,0
-3767,HTRS96 / UTM zone 33N,Transverse Mercator,metre,0,Croatian Terrestrial Reference System,GRS 1980,500000,0,0,15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3768,HTRS96 / UTM zone 34N,Transverse Mercator,metre,0,Croatian Terrestrial Reference System,GRS 1980,500000,0,0,21,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3769,Bermuda 1957 / UTM zone 20N,Transverse Mercator,metre,4216,Bermuda 1957,Clarke 1866,500000,0,0,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3770,BDA2000 / Bermuda 2000 National Grid,Transverse Mercator,metre,0,Bermuda 2000,WGS 84,550000,32,100000,-64.45,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3771,NAD27 / Alberta 3TM ref merid 111 W,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,0,0,0,-111,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3772,NAD27 / Alberta 3TM ref merid 114 W,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,0,0,0,-114,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3773,NAD27 / Alberta 3TM ref merid 117 W,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,0,0,0,-117,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3774,NAD27 / Alberta 3TM ref merid 120 W (deprecated),Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,0,0,0,-120,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3775,NAD83 / Alberta 3TM ref merid 111 W,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,0,0,0,-111,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3776,NAD83 / Alberta 3TM ref merid 114 W,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,0,0,0,-114,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3777,NAD83 / Alberta 3TM ref merid 117 W,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,0,0,0,-117,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3778,NAD83 / Alberta 3TM ref merid 120 W (deprecated),Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,0,0,0,-120,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3779,NAD83(CSRS) / Alberta 3TM ref merid 111 W,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,-111,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3780,NAD83(CSRS) / Alberta 3TM ref merid 114 W,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,-114,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3781,NAD83(CSRS) / Alberta 3TM ref merid 117 W,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,-117,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3782,NAD83(CSRS) / Alberta 3TM ref merid 120 W (deprecated),Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,-120,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3783,Pitcairn 2006 / Pitcairn TM 2006,Transverse Mercator,metre,0,Pitcairn 2006,WGS 84,14200,-25.04067894,15500,-130.0646682,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3784,Pitcairn 1967 / UTM zone 9S,Transverse Mercator,metre,0,Pitcairn 1967,International 1924,500000,0,10000000,-129,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3788,NZGD2000 / Auckland Islands TM 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,3500000,0,10000000,166,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3789,NZGD2000 / Campbell Island TM 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,3500000,0,10000000,169,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3790,NZGD2000 / Antipodes Islands TM 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,3500000,0,10000000,179,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3791,NZGD2000 / Raoul Island TM 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,3500000,0,10000000,-178,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3793,NZGD2000 / Chatham Islands TM 2000,Transverse Mercator,metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,3500000,0,10000000,-176.3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3794,Slovenia 1996 / Slovene National Grid,Transverse Mercator,metre,0,Slovenia Geodetic Datum 1996,GRS 1980,500000,0,-5000000,15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3795,NAD27 / Cuba Norte,Lambert Conic Conformal (2SP),metre,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21.42,22.21,-81,23,280296.016,500000
-3796,NAD27 / Cuba Sur,Lambert Conic Conformal (2SP),metre,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20.08,20.43,-76.5,21.18,229126.939,500000
-3797,NAD27 / MTQ Lambert,Lambert Conic Conformal (2SP),metre,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,44,-70,50,0,800000
-3798,NAD83 / MTQ Lambert,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,44,-70,50,0,800000
-3799,NAD83(CSRS) / MTQ Lambert,Lambert Conic Conformal (2SP),metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,44,-70,50,0,800000
-3800,NAD27 / Alberta 3TM ref merid 120 W,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,0,0,0,-120,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3801,NAD83 / Alberta 3TM ref merid 120 W,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,0,0,0,-120,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3802,NAD83(CSRS) / Alberta 3TM ref merid 120 W,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,-120,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3812,ETRS89 / Belgian Lambert 2008,Lambert Conic Conformal (2SP),metre,4258,European Terrestrial Reference System 1989,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51.1,50.4752134,4.2133177,49.5,665262,649328
-3814,NAD83 / Mississippi TM,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,32.3,1300000,-89.45,0.9998335,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3815,NAD83(HARN) / Mississippi TM,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,500000,32.3,1300000,-89.45,0.9998335,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3816,NAD83(NSRS2007) / Mississippi TM,Transverse Mercator,metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,500000,32.3,1300000,-89.45,0.9998335,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3825,TWD97 / TM2 zone 119,Transverse Mercator,metre,0,Taiwan Datum 1997,GRS 1980,250000,0,0,119,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3826,TWD97 / TM2 zone 121,Transverse Mercator,metre,0,Taiwan Datum 1997,GRS 1980,250000,0,0,121,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3827,TWD67 / TM2 zone 119,Transverse Mercator,metre,0,Taiwan Datum 1967,GRS 1967 Modified,250000,0,0,119,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3828,TWD67 / TM2 zone 121,Transverse Mercator,metre,0,Taiwan Datum 1967,GRS 1967 Modified,250000,0,0,121,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3829,Hu Tzu Shan / UTM zone 51N,Transverse Mercator,metre,4236,Hu Tzu Shan 1950,International 1924,500000,0,0,123,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3832,WGS 84 / PDC Mercator,Mercator (1SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,150,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3833,Pulkovo 1942(58) / Gauss-Kruger zone 2,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,2500000,0,0,9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3834,Pulkovo 1942(83) / Gauss-Kruger zone 2,Transverse Mercator,metre,4178,Pulkovo 1942(83),Krassowsky 1940,2500000,0,0,9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3835,Pulkovo 1942(83) / Gauss-Kruger zone 3,Transverse Mercator,metre,4178,Pulkovo 1942(83),Krassowsky 1940,3500000,0,0,15,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3836,Pulkovo 1942(83) / Gauss-Kruger zone 4,Transverse Mercator,metre,4178,Pulkovo 1942(83),Krassowsky 1940,4500000,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3837,Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 3,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,3500000,0,0,9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3838,Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 4,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,4500000,0,0,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3839,Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 9,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,9500000,0,0,27,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3840,Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 10,Transverse Mercator,metre,4179,Pulkovo 1942(58),Krassowsky 1940,10500000,0,0,30,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3841,Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 6,Transverse Mercator,metre,4178,Pulkovo 1942(83),Krassowsky 1940,6500000,0,0,18,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3844,Pulkovo 1942(58) / Stereo70,Oblique Stereographic,metre,4179,Pulkovo 1942(58),Krassowsky 1940,500000,46,500000,25,0.99975,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3845,SWEREF99 / RT90 7.5 gon V emulation,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,1500025.141,0,-667.282,11.18225,1.000006,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3846,SWEREF99 / RT90 5 gon V emulation,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,1500044.695,0,-667.13,13.332256,1.0000058,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3847,SWEREF99 / RT90 2.5 gon V emulation,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,1500064.274,0,-667.711,15.48226243,1.00000561,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3848,SWEREF99 / RT90 0 gon emulation,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,1500083.521,0,-668.844,18.032268,1.0000054,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3849,SWEREF99 / RT90 2.5 gon O emulation,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,1500102.765,0,-670.706,20.182274,1.0000052,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3850,SWEREF99 / RT90 5 gon O emulation,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,1500121.846,0,-672.557,22.33228,1.0000049,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3851,NZGD2000 / NZCS2000,Lambert Conic Conformal (2SP),metre,4167,New Zealand Geodetic Datum 2000,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-44.3,-41,173,-37.3,7000000,3000000
-3852,RSRGD2000 / DGLC2000,Lambert Conic Conformal (2SP),metre,0,Ross Sea Region Geodetic Datum 2000,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-79.2,-90,157,-76.4,0,500000
-3854,County ST74,Transverse Mercator,metre,4619,SWEREF99,GRS 1980,100182.7406,0,-6500620.121,18.0328332,0.99999506,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3857,WGS 84 / Pseudo-Mercator,Popular Visualisation Pseudo Mercator,metre,6055,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3890,IGRS / UTM zone 37N,Transverse Mercator,metre,0,Iraqi Geospatial Reference System,GRS 1980,500000,0,0,39,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3891,IGRS / UTM zone 38N,Transverse Mercator,metre,0,Iraqi Geospatial Reference System,GRS 1980,500000,0,0,45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3892,IGRS / UTM zone 39N,Transverse Mercator,metre,0,Iraqi Geospatial Reference System,GRS 1980,500000,0,0,51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3893,ED50 / Iraq National Grid,Transverse Mercator,metre,4154,European Datum 1950,International 1924,800000,29.0134566,0,46.3,0.9994,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3907,MGI 1901 / Balkans zone 5,Transverse Mercator,metre,4312,MGI 1901,Bessel 1841,5500000,0,0,15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3908,MGI 1901 / Balkans zone 6,Transverse Mercator,metre,4312,MGI 1901,Bessel 1841,6500000,0,0,18,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3909,MGI 1901 / Balkans zone 7,Transverse Mercator,metre,4312,MGI 1901,Bessel 1841,7500000,0,0,21,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3910,MGI 1901 / Balkans zone 8,Transverse Mercator,metre,4312,MGI 1901,Bessel 1841,8500000,0,0,24,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3911,MGI 1901 / Slovenia Grid,Transverse Mercator,metre,4312,MGI 1901,Bessel 1841,500000,0,0,15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3912,MGI 1901 / Slovene National Grid,Transverse Mercator,metre,4312,MGI 1901,Bessel 1841,500000,0,-5000000,15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3920,Puerto Rico / UTM zone 20N,Transverse Mercator,metre,4139,Puerto Rico,Clarke 1866,500000,0,0,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3942,RGF93 / CC42,Lambert Conic Conformal (2SP),metre,4171,Reseau Geodesique Francais 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.75,42,3,41.25,1200000,1700000
-3943,RGF93 / CC43,Lambert Conic Conformal (2SP),metre,4171,Reseau Geodesique Francais 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43.75,43,3,42.25,2200000,1700000
-3944,RGF93 / CC44,Lambert Conic Conformal (2SP),metre,4171,Reseau Geodesique Francais 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.75,44,3,43.25,3200000,1700000
-3945,RGF93 / CC45,Lambert Conic Conformal (2SP),metre,4171,Reseau Geodesique Francais 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.75,45,3,44.25,4200000,1700000
-3946,RGF93 / CC46,Lambert Conic Conformal (2SP),metre,4171,Reseau Geodesique Francais 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46.75,46,3,45.25,5200000,1700000
-3947,RGF93 / CC47,Lambert Conic Conformal (2SP),metre,4171,Reseau Geodesique Francais 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.75,47,3,46.25,6200000,1700000
-3948,RGF93 / CC48,Lambert Conic Conformal (2SP),metre,4171,Reseau Geodesique Francais 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48.75,48,3,47.25,7200000,1700000
-3949,RGF93 / CC49,Lambert Conic Conformal (2SP),metre,4171,Reseau Geodesique Francais 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49.75,49,3,48.25,8200000,1700000
-3950,RGF93 / CC50,Lambert Conic Conformal (2SP),metre,4171,Reseau Geodesique Francais 1993,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50.75,50,3,49.25,9200000,1700000
-3968,NAD83 / Virginia Lambert,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.5,36,-79.5,37,0,0
-3969,NAD83(HARN) / Virginia Lambert,Lambert Conic Conformal (2SP),metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.5,36,-79.5,37,0,0
-3970,NAD83(NSRS2007) / Virginia Lambert,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.5,36,-79.5,37,0,0
-3973,WGS 84 / NSIDC EASE-Grid North,Lambert Azimuthal Equal Area (Spherical),metre,4326,World Geodetic System 1984,WGS 84,0,90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3974,WGS 84 / NSIDC EASE-Grid South,Lambert Azimuthal Equal Area (Spherical),metre,4326,World Geodetic System 1984,WGS 84,0,-90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-3975,WGS 84 / NSIDC EASE-Grid Global,Lambert Cylindrical Equal Area (Spherical),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,0,0
-3976,WGS 84 / NSIDC Sea Ice Polar Stereographic South,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-70
-3978,NAD83 / Canada Atlas Lambert,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,77,49,-95,49,0,0,
-3979,NAD83(CSRS) / Canada Atlas Lambert,Lambert Conic Conformal (2SP),metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,77,49,-95,49,0,0,
-3986,Katanga 1955 / Katanga Gauss zone A,Transverse Mercator,metre,0,Katanga 1955,Clarke 1866,200000,-9,500000,30,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3987,Katanga 1955 / Katanga Gauss zone B,Transverse Mercator,metre,0,Katanga 1955,Clarke 1866,200000,-9,500000,28,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3988,Katanga 1955 / Katanga Gauss zone C,Transverse Mercator,metre,0,Katanga 1955,Clarke 1866,200000,-9,500000,26,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3989,Katanga 1955 / Katanga Gauss zone D,Transverse Mercator,metre,0,Katanga 1955,Clarke 1866,200000,-9,500000,24,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3991,Puerto Rico State Plane CS of 1927,Lambert Conic Conformal (2SP),US survey foot,4139,Puerto Rico,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18.02,17.5,-66.26,18.26,0,500000,
-3992,Puerto Rico / St. Croix,Lambert Conic Conformal (2SP),US survey foot,4139,Puerto Rico,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18.02,17.5,-66.26,18.26,100000,500000,
-3993,Guam 1963 / Guam SPCS,Guam Projection,metre,0,Guam 1963,Clarke 1866,50000,13.28208789,50000,144.4455503,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-3994,WGS 84 / Mercator 41,Mercator (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-41,0,0,
-3995,WGS 84 / Arctic Polar Stereographic,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,71
-3996,WGS 84 / IBCAO Polar Stereographic,Polar Stereographic (variant B),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,75
-3997,WGS 84 / Dubai Local TM,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,55.2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-4026,MOLDREF99 / Moldova TM,Transverse Mercator,metre,0,MOLDREF99,GRS 1980,200000,0,-5000000,28.24,0.99994,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-4037,WGS 84 / TMzn35N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,27,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-4038,WGS 84 / TMzn36N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,33,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-4048,RGRDC 2005 / Congo TM zone 12,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,12,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-4049,RGRDC 2005 / Congo TM zone 14,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,14,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-4050,RGRDC 2005 / Congo TM zone 16,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,16,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
-4051,RGRDC 2005 / Congo TM zone 18,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,18,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
-4056,RGRDC 2005 / Congo TM zone 20,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,20,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
-4057,RGRDC 2005 / Congo TM zone 22,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,22,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
-4058,RGRDC 2005 / Congo TM zone 24,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,24,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
-4059,RGRDC 2005 / Congo TM zone 26,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,26,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
-4060,RGRDC 2005 / Congo TM zone 28,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,28,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
-4061,RGRDC 2005 / UTM zone 33S,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
-4062,RGRDC 2005 / UTM zone 34S,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,21,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
-4063,RGRDC 2005 / UTM zone 35S,Transverse Mercator,metre,0,Reseau Geodesique de la RDC 2005,GRS 1980,500000,0,10000000,27,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
-4071,Chua / UTM zone 23S,Transverse Mercator,metre,0,Chua,International 1924,500000,0,10000000,-45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
-4082,REGCAN95 / UTM zone 27N,Transverse Mercator,metre,0,Red Geodesica de Canarias 1995,GRS 1980,500000,0,0,-21,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
-4083,REGCAN95 / UTM zone 28N,Transverse Mercator,metre,0,Red Geodesica de Canarias 1995,GRS 1980,500000,0,0,-15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
-4088,World Equidistant Cylindrical (Sphere),Equidistant Cylindrical (Spherical),metre,0,Not specified (based on GRS 1980 Authalic Sphere),GRS 1980 Authalic Sphere,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,,
-4093,ETRS89 / DKTM1,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,200000,0,-5000000,9,0.99998,0,0,0,0,0,0,0,0,0,0,0,0,0,,,
-4094,ETRS89 / DKTM2,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,400000,0,-5000000,10,0.99998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-4095,ETRS89 / DKTM3,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,600000,0,-5000000,11.75,0.99998,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-4096,ETRS89 / DKTM4,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,800000,0,-5000000,15,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-4326,WGS 84 / World Equidistant Cylindrical,Equidistant Cylindrical,metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,,
-4414,NAD83(HARN) / Guam Map Grid,Transverse Mercator,metre,4152,NAD83 (High Accuracy Regional Network),GRS 1980,100000,13.3,200000,144.45,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-4415,Katanga 1955 / Katanga Lambert,Lambert Conic Conformal (2SP),metre,0,Katanga 1955,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-11.5,-9,26,-6.5,500000,500000
-4417,Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 7,Transverse Mercator,metre,4178,Pulkovo 1942(83),Krassowsky 1940,7500000,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-4434,Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 8,Transverse Mercator,metre,4178,Pulkovo 1942(83),Krassowsky 1940,8500000,0,0,24,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-4437,NAD83(NSRS2007) / Puerto Rico and Virgin Is.,Lambert Conic Conformal (2SP),metre,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18.02,17.5,-66.26,18.26,200000,200000
-4455,NAD27 / Pennsylvania South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.56,39.2,-77.45,40.58,0,2000000
-4456,NAD27 / New York Long Island,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.4,40.3,-74,41.02,100000,2000000
-4457,NAD83 / South Dakota North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.25,43.5,-100,45.41,0,1968500
-4462,WGS 84 / Australian Centre for Remote Sensing Lambert,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-36,-27,132,-18,0,0
-4467,RGSPM06 / UTM zone 21N,Transverse Mercator,metre,0,Reseau Geodesique de Saint Pierre et Miquelon 2006,GRS 1980,500000,0,0,-57,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-4471,RGM04 / UTM zone 38S,Transverse Mercator,metre,0,Reseau Geodesique de Mayotte 2004,GRS 1980,500000,0,10000000,45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-4474,Cadastre 1997 / UTM zone 38S,Transverse Mercator,metre,4632,Combani 1950,International 1924,500000,0,10000000,45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-4484,Mexican Datum of 1993 / UTM zone 11N,Transverse Mercator,metre,0,Mexican Datum of 1993,GRS 1980,500000,0,0,-117,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-4485,Mexican Datum of 1993 / UTM zone 12N,Transverse Mercator,metre,0,Mexican Datum of 1993,GRS 1980,500000,0,0,-111,0.9996,,,,,,,,,,,,,,,
-4486,Mexican Datum of 1993 / UTM zone 13N,Transverse Mercator,metre,0,Mexican Datum of 1993,GRS 1980,500000,0,0,-105,0.9996,,,,,,,,,,,,,,,
-4487,Mexican Datum of 1993 / UTM zone 14N,Transverse Mercator,metre,0,Mexican Datum of 1993,GRS 1980,500000,0,0,-99,0.9996,,,,,,,,,,,,,,,
-4488,Mexican Datum of 1993 / UTM zone 15N,Transverse Mercator,metre,0,Mexican Datum of 1993,GRS 1980,500000,0,0,-93,0.9996,,,,,,,,,,,,,,,
-4489,Mexican Datum of 1993 / UTM zone 16N,Transverse Mercator,metre,0,Mexican Datum of 1993,GRS 1980,500000,0,0,-87,0.9996,,,,,,,,,,,,,,,
-4491,CGCS2000 / Gauss-Kruger zone 13,Transverse Mercator,metre,0,China 2000,CGCS2000,13500000,0,0,75,1,,,,,,,,,,,,,,,
-4492,CGCS2000 / Gauss-Kruger zone 14,Transverse Mercator,metre,0,China 2000,CGCS2000,14500000,0,0,81,1,,,,,,,,,,,,,,,
-4493,CGCS2000 / Gauss-Kruger zone 15,Transverse Mercator,metre,0,China 2000,CGCS2000,15500000,0,0,87,1,,,,,,,,,,,,,,,
-4494,CGCS2000 / Gauss-Kruger zone 16,Transverse Mercator,metre,0,China 2000,CGCS2000,16500000,0,0,93,1,,,,,,,,,,,,,,,
-4495,CGCS2000 / Gauss-Kruger zone 17,Transverse Mercator,metre,0,China 2000,CGCS2000,17500000,0,0,99,1,,,,,,,,,,,,,,,
-4496,CGCS2000 / Gauss-Kruger zone 18,Transverse Mercator,metre,0,China 2000,CGCS2000,18500000,0,0,105,1,,,,,,,,,,,,,,,
-4497,CGCS2000 / Gauss-Kruger zone 19,Transverse Mercator,metre,0,China 2000,CGCS2000,19500000,0,0,111,1,,,,,,,,,,,,,,,
-4498,CGCS2000 / Gauss-Kruger zone 20,Transverse Mercator,metre,0,China 2000,CGCS2000,20500000,0,0,117,1,,,,,,,,,,,,,,,
-4499,CGCS2000 / Gauss-Kruger zone 21,Transverse Mercator,metre,0,China 2000,CGCS2000,21500000,0,0,123,1
-4500,CGCS2000 / Gauss-Kruger zone 22,Transverse Mercator,metre,0,China 2000,CGCS2000,22500000,0,0,129,1
-4501,CGCS2000 / Gauss-Kruger zone 23,Transverse Mercator,metre,0,China 2000,CGCS2000,23500000,0,0,135,1
-4502,CGCS2000 / Gauss-Kruger CM 75E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,75,1
-4503,CGCS2000 / Gauss-Kruger CM 81E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,81,1
-4504,CGCS2000 / Gauss-Kruger CM 87E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,87,1
-4505,CGCS2000 / Gauss-Kruger CM 93E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,93,1
-4506,CGCS2000 / Gauss-Kruger CM 99E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,99,1
-4507,CGCS2000 / Gauss-Kruger CM 105E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,105,1
-4508,CGCS2000 / Gauss-Kruger CM 111E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,111,1
-4509,CGCS2000 / Gauss-Kruger CM 117E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,117,1
-4510,CGCS2000 / Gauss-Kruger CM 123E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,123,1
-4511,CGCS2000 / Gauss-Kruger CM 129E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,129,1
-4512,CGCS2000 / Gauss-Kruger CM 135E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,135,1
-4513,CGCS2000 / 3-degree Gauss-Kruger zone 25,Transverse Mercator,metre,0,China 2000,CGCS2000,25500000,0,0,75,1
-4514,CGCS2000 / 3-degree Gauss-Kruger zone 26,Transverse Mercator,metre,0,China 2000,CGCS2000,26500000,0,0,78,1
-4515,CGCS2000 / 3-degree Gauss-Kruger zone 27,Transverse Mercator,metre,0,China 2000,CGCS2000,27500000,0,0,81,1
-4516,CGCS2000 / 3-degree Gauss-Kruger zone 28,Transverse Mercator,metre,0,China 2000,CGCS2000,28500000,0,0,84,1
-4517,CGCS2000 / 3-degree Gauss-Kruger zone 29,Transverse Mercator,metre,0,China 2000,CGCS2000,29500000,0,0,87,1
-4518,CGCS2000 / 3-degree Gauss-Kruger zone 30,Transverse Mercator,metre,0,China 2000,CGCS2000,30500000,0,0,90,1
-4519,CGCS2000 / 3-degree Gauss-Kruger zone 31,Transverse Mercator,metre,0,China 2000,CGCS2000,31500000,0,0,93,1
-4520,CGCS2000 / 3-degree Gauss-Kruger zone 32,Transverse Mercator,metre,0,China 2000,CGCS2000,32500000,0,0,96,1
-4521,CGCS2000 / 3-degree Gauss-Kruger zone 33,Transverse Mercator,metre,0,China 2000,CGCS2000,33500000,0,0,99,1
-4522,CGCS2000 / 3-degree Gauss-Kruger zone 34,Transverse Mercator,metre,0,China 2000,CGCS2000,34500000,0,0,102,1
-4523,CGCS2000 / 3-degree Gauss-Kruger zone 35,Transverse Mercator,metre,0,China 2000,CGCS2000,35500000,0,0,105,1
-4524,CGCS2000 / 3-degree Gauss-Kruger zone 36,Transverse Mercator,metre,0,China 2000,CGCS2000,36500000,0,0,108,1
-4525,CGCS2000 / 3-degree Gauss-Kruger zone 37,Transverse Mercator,metre,0,China 2000,CGCS2000,37500000,0,0,111,1
-4526,CGCS2000 / 3-degree Gauss-Kruger zone 38,Transverse Mercator,metre,0,China 2000,CGCS2000,38500000,0,0,114,1
-4527,CGCS2000 / 3-degree Gauss-Kruger zone 39,Transverse Mercator,metre,0,China 2000,CGCS2000,39500000,0,0,117,1
-4528,CGCS2000 / 3-degree Gauss-Kruger zone 40,Transverse Mercator,metre,0,China 2000,CGCS2000,40500000,0,0,120,1
-4529,CGCS2000 / 3-degree Gauss-Kruger zone 41,Transverse Mercator,metre,0,China 2000,CGCS2000,41500000,0,0,123,1
-4530,CGCS2000 / 3-degree Gauss-Kruger zone 42,Transverse Mercator,metre,0,China 2000,CGCS2000,42500000,0,0,126,1
-4531,CGCS2000 / 3-degree Gauss-Kruger zone 43,Transverse Mercator,metre,0,China 2000,CGCS2000,43500000,0,0,129,1
-4532,CGCS2000 / 3-degree Gauss-Kruger zone 44,Transverse Mercator,metre,0,China 2000,CGCS2000,44500000,0,0,132,1
-4533,CGCS2000 / 3-degree Gauss-Kruger zone 45,Transverse Mercator,metre,0,China 2000,CGCS2000,45500000,0,0,135,1
-4534,CGCS2000 / 3-degree Gauss-Kruger CM 75E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,75,1
-4535,CGCS2000 / 3-degree Gauss-Kruger CM 78E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,78,1
-4536,CGCS2000 / 3-degree Gauss-Kruger CM 81E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,81,1
-4537,CGCS2000 / 3-degree Gauss-Kruger CM 84E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,84,1
-4538,CGCS2000 / 3-degree Gauss-Kruger CM 87E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,87,1
-4539,CGCS2000 / 3-degree Gauss-Kruger CM 90E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,90,1
-4540,CGCS2000 / 3-degree Gauss-Kruger CM 93E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,93,1
-4541,CGCS2000 / 3-degree Gauss-Kruger CM 96E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,96,1
-4542,CGCS2000 / 3-degree Gauss-Kruger CM 99E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,99,1
-4543,CGCS2000 / 3-degree Gauss-Kruger CM 102E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,102,1
-4544,CGCS2000 / 3-degree Gauss-Kruger CM 105E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,105,1
-4545,CGCS2000 / 3-degree Gauss-Kruger CM 108E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,108,1
-4546,CGCS2000 / 3-degree Gauss-Kruger CM 111E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,111,1
-4547,CGCS2000 / 3-degree Gauss-Kruger CM 114E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,114,1
-4548,CGCS2000 / 3-degree Gauss-Kruger CM 117E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,117,1
-4549,CGCS2000 / 3-degree Gauss-Kruger CM 120E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,120,1
-4550,CGCS2000 / 3-degree Gauss-Kruger CM 123E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,123,1
-4551,CGCS2000 / 3-degree Gauss-Kruger CM 126E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,126,1
-4552,CGCS2000 / 3-degree Gauss-Kruger CM 129E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,129,1
-4553,CGCS2000 / 3-degree Gauss-Kruger CM 132E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,132,1
-4554,CGCS2000 / 3-degree Gauss-Kruger CM 135E,Transverse Mercator,metre,0,China 2000,CGCS2000,500000,0,0,135,1
-4559,RRAF 1991 / UTM zone 20N,Transverse Mercator,metre,4640,Reseau de Reference des Antilles Francaises 1991,GRS 1980,500000,0,0,-63,0.9996
-4568,New Beijing / Gauss-Kruger zone 13,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,13500000,0,0,75,1
-4569,New Beijing / Gauss-Kruger zone 14,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,14500000,0,0,81,1
-4570,New Beijing / Gauss-Kruger zone 15,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,15500000,0,0,87,1
-4571,New Beijing / Gauss-Kruger zone 16,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,16500000,0,0,93,1
-4572,New Beijing / Gauss-Kruger zone 17,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,17500000,0,0,99,1
-4573,New Beijing / Gauss-Kruger zone 18,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,18500000,0,0,105,1
-4574,New Beijing / Gauss-Kruger zone 19,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,19500000,0,0,111,1
-4575,New Beijing / Gauss-Kruger zone 20,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,20500000,0,0,117,1
-4576,New Beijing / Gauss-Kruger zone 21,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,21500000,0,0,123,1
-4577,New Beijing / Gauss-Kruger zone 22,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,22500000,0,0,129,1
-4578,New Beijing / Gauss-Kruger zone 23,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,23500000,0,0,135,1
-4579,New Beijing / Gauss-Kruger CM 75E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,75,1
-4580,New Beijing / Gauss-Kruger CM 81E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,81,1
-4581,New Beijing / Gauss-Kruger CM 87E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,87,1
-4582,New Beijing / Gauss-Kruger CM 93E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,93,1
-4583,New Beijing / Gauss-Kruger CM 99E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,99,1
-4584,New Beijing / Gauss-Kruger CM 105E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,105,1
-4585,New Beijing / Gauss-Kruger CM 111E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,111,1
-4586,New Beijing / Gauss-Kruger CM 117E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,117,1
-4587,New Beijing / Gauss-Kruger CM 123E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,123,1
-4588,New Beijing / Gauss-Kruger CM 129E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,129,1
-4589,New Beijing / Gauss-Kruger CM 135E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,135,1
-4647,ETRS89 / UTM zone N32,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,32500000,0,0,9,0.9996
-4652,New Beijing / 3-degree Gauss-Kruger zone 25,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,25500000,0,0,75,1
-4653,New Beijing / 3-degree Gauss-Kruger zone 26,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,26500000,0,0,78,1
-4654,New Beijing / 3-degree Gauss-Kruger zone 27,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,27500000,0,0,81,1
-4655,New Beijing / 3-degree Gauss-Kruger zone 28,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,28500000,0,0,84,1
-4656,New Beijing / 3-degree Gauss-Kruger zone 29,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,29500000,0,0,87,1
-4766,New Beijing / 3-degree Gauss-Kruger zone 30,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,30500000,0,0,90,1
-4767,New Beijing / 3-degree Gauss-Kruger zone 31,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,31500000,0,0,93,1
-4768,New Beijing / 3-degree Gauss-Kruger zone 32,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,32500000,0,0,96,1
-4769,New Beijing / 3-degree Gauss-Kruger zone 33,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,33500000,0,0,99,1
-4770,New Beijing / 3-degree Gauss-Kruger zone 34,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,34500000,0,0,102,1
-4771,New Beijing / 3-degree Gauss-Kruger zone 35,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,35500000,0,0,105,1
-4772,New Beijing / 3-degree Gauss-Kruger zone 36,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,36500000,0,0,108,1
-4773,New Beijing / 3-degree Gauss-Kruger zone 37,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,37500000,0,0,111,1
-4774,New Beijing / 3-degree Gauss-Kruger zone 38,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,38500000,0,0,114,1
-4775,New Beijing / 3-degree Gauss-Kruger zone 39,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,39500000,0,0,117,1
-4776,New Beijing / 3-degree Gauss-Kruger zone 40,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,40500000,0,0,120,1
-4777,New Beijing / 3-degree Gauss-Kruger zone 41,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,41500000,0,0,123,1
-4778,New Beijing / 3-degree Gauss-Kruger zone 42,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,42500000,0,0,126,1
-4779,New Beijing / 3-degree Gauss-Kruger zone 43,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,43500000,0,0,129,1
-4780,New Beijing / 3-degree Gauss-Kruger zone 44,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,44500000,0,0,132,1
-4781,New Beijing / 3-degree Gauss-Kruger zone 45,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,45500000,0,0,135,1
-4782,New Beijing / 3-degree Gauss-Kruger CM 75E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,75,1
-4783,New Beijing / 3-degree Gauss-Kruger CM 78E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,78,1
-4784,New Beijing / 3-degree Gauss-Kruger CM 81E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,81,1
-4785,New Beijing / 3-degree Gauss-Kruger CM 84E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,84,1
-4786,New Beijing / 3-degree Gauss-Kruger CM 87E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,87,1
-4787,New Beijing / 3-degree Gauss-Kruger CM 90E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,90,1
-4788,New Beijing / 3-degree Gauss-Kruger CM 93E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,93,1
-4789,New Beijing / 3-degree Gauss-Kruger CM 96E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,96,1
-4790,New Beijing / 3-degree Gauss-Kruger CM 99E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,99,1
-4791,New Beijing / 3-degree Gauss-Kruger CM 102E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,102,1
-4792,New Beijing / 3-degree Gauss-Kruger CM 105E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,105,1
-4793,New Beijing / 3-degree Gauss-Kruger CM 108E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,108,1,,,,,,,,,,,,,,,,
-4794,New Beijing / 3-degree Gauss-Kruger CM 111E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,111,1,,,,,,,,,,,,,,,,
-4795,New Beijing / 3-degree Gauss-Kruger CM 114E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,114,1,,,,,,,,,,,,,,,,
-4796,New Beijing / 3-degree Gauss-Kruger CM 117E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,117,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-4797,New Beijing / 3-degree Gauss-Kruger CM 120E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,120,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-4798,New Beijing / 3-degree Gauss-Kruger CM 123E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,123,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-4799,New Beijing / 3-degree Gauss-Kruger CM 126E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,126,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-4800,New Beijing / 3-degree Gauss-Kruger CM 129E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,129,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-4812,New Beijing / 3-degree Gauss-Kruger CM 132E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,132,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-4822,New Beijing / 3-degree Gauss-Kruger CM 135E,Transverse Mercator,metre,0,New Beijing,Krassowsky 1940,500000,0,0,135,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-4826,WGS 84 / Cape Verde National,Lambert Conic Conformal (2SP),metre,4326,World Geodetic System 1984,WGS 84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16.4,15.5,-24,15,128511.202,161587.83
-20004,Pulkovo 1995 / Gauss-Kruger zone 4,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,4500000,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-20005,Pulkovo 1995 / Gauss-Kruger zone 5,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,5500000,0,0,27,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-20006,Pulkovo 1995 / Gauss-Kruger zone 6,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,6500000,0,0,33,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-20007,Pulkovo 1995 / Gauss-Kruger zone 7,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,7500000,0,0,39,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-20008,Pulkovo 1995 / Gauss-Kruger zone 8,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,8500000,0,0,45,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-20009,Pulkovo 1995 / Gauss-Kruger zone 9,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,9500000,0,0,51,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-20010,Pulkovo 1995 / Gauss-Kruger zone 10,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,10500000,0,0,57,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-20011,Pulkovo 1995 / Gauss-Kruger zone 11,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,11500000,0,0,63,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-20012,Pulkovo 1995 / Gauss-Kruger zone 12,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,12500000,0,0,69,1,,,,,,,,,,,,,,,
-20013,Pulkovo 1995 / Gauss-Kruger zone 13,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,13500000,0,0,75,1,,,,,,,,,,,,,,,
-20014,Pulkovo 1995 / Gauss-Kruger zone 14,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,14500000,0,0,81,1,,,,,,,,,,,,,,,
-20015,Pulkovo 1995 / Gauss-Kruger zone 15,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,15500000,0,0,87,1,,,,,,,,,,,,,,,
-20016,Pulkovo 1995 / Gauss-Kruger zone 16,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,16500000,0,0,93,1,,,,,,,,,,,,,,,
-20017,Pulkovo 1995 / Gauss-Kruger zone 17,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,17500000,0,0,99,1,,,,,,,,,,,,,,,
-20018,Pulkovo 1995 / Gauss-Kruger zone 18,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,18500000,0,0,105,1,,,,,,,,,,,,,,,
-20019,Pulkovo 1995 / Gauss-Kruger zone 19,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,19500000,0,0,111,1,,,,,,,,,,,,,,,
-20020,Pulkovo 1995 / Gauss-Kruger zone 20,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,20500000,0,0,117,1,,,,,,,,,,,,,,,
-20021,Pulkovo 1995 / Gauss-Kruger zone 21,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,21500000,0,0,123,1,,,,,,,,,,,,,,,
-20022,Pulkovo 1995 / Gauss-Kruger zone 22,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,22500000,0,0,129,1,,,,,,,,,,,,,,,
-20023,Pulkovo 1995 / Gauss-Kruger zone 23,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,23500000,0,0,135,1,,,,,,,,,,,,,,,
-20024,Pulkovo 1995 / Gauss-Kruger zone 24,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,24500000,0,0,141,1,,,,,,,,,,,,,,,
-20025,Pulkovo 1995 / Gauss-Kruger zone 25,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,25500000,0,0,147,1
-20026,Pulkovo 1995 / Gauss-Kruger zone 26,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,26500000,0,0,153,1
-20027,Pulkovo 1995 / Gauss-Kruger zone 27,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,27500000,0,0,159,1
-20028,Pulkovo 1995 / Gauss-Kruger zone 28,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,28500000,0,0,165,1
-20029,Pulkovo 1995 / Gauss-Kruger zone 29,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,29500000,0,0,171,1
-20030,Pulkovo 1995 / Gauss-Kruger zone 30,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,30500000,0,0,177,1
-20031,Pulkovo 1995 / Gauss-Kruger zone 31,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,31500000,0,0,-177,1
-20032,Pulkovo 1995 / Gauss-Kruger zone 32,Transverse Mercator,metre,4200,Pulkovo 1995,Krassowsky 1940,32500000,0,0,-171,1
-20135,Adindan / UTM zone 35N,Transverse Mercator,metre,4201,Adindan,Clarke 1880 (RGS),500000,0,0,27,0.9996
-20136,Adindan / UTM zone 36N,Transverse Mercator,metre,4201,Adindan,Clarke 1880 (RGS),500000,0,0,33,0.9996
-20137,Adindan / UTM zone 37N,Transverse Mercator,metre,4201,Adindan,Clarke 1880 (RGS),500000,0,0,39,0.9996
-20138,Adindan / UTM zone 38N,Transverse Mercator,metre,4201,Adindan,Clarke 1880 (RGS),500000,0,0,45,0.9996
-20248,AGD66 / AMG zone 48,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,105,0.9996
-20249,AGD66 / AMG zone 49,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,111,0.9996
-20250,AGD66 / AMG zone 50,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,117,0.9996
-20251,AGD66 / AMG zone 51,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,123,0.9996
-20252,AGD66 / AMG zone 52,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,129,0.9996
-20253,AGD66 / AMG zone 53,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,135,0.9996
-20254,AGD66 / AMG zone 54,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,141,0.9996
-20255,AGD66 / AMG zone 55,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,147,0.9996
-20256,AGD66 / AMG zone 56,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,153,0.9996
-20257,AGD66 / AMG zone 57,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,159,0.9996
-20258,AGD66 / AMG zone 58,Transverse Mercator,metre,4202,Australian Geodetic Datum 1966,Australian National Spheroid,500000,0,10000000,165,0.9996
-20348,AGD84 / AMG zone 48,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,105,0.9996
-20349,AGD84 / AMG zone 49,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,111,0.9996
-20350,AGD84 / AMG zone 50,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,117,0.9996
-20351,AGD84 / AMG zone 51,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,123,0.9996
-20352,AGD84 / AMG zone 52,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,129,0.9996
-20353,AGD84 / AMG zone 53,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,135,0.9996
-20354,AGD84 / AMG zone 54,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,141,0.9996
-20355,AGD84 / AMG zone 55,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,147,0.9996
-20356,AGD84 / AMG zone 56,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,153,0.9996
-20357,AGD84 / AMG zone 57,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,159,0.9996
-20358,AGD84 / AMG zone 58,Transverse Mercator,metre,4203,Australian Geodetic Datum 1984,Australian National Spheroid,500000,0,10000000,165,0.9996
-20436,Ain el Abd / UTM zone 36N,Transverse Mercator,metre,4204,Ain el Abd 1970,International 1924,500000,0,0,33,0.9996
-20437,Ain el Abd / UTM zone 37N,Transverse Mercator,metre,4204,Ain el Abd 1970,International 1924,500000,0,0,39,0.9996
-20438,Ain el Abd / UTM zone 38N,Transverse Mercator,metre,4204,Ain el Abd 1970,International 1924,500000,0,0,45,0.9996
-20439,Ain el Abd / UTM zone 39N,Transverse Mercator,metre,4204,Ain el Abd 1970,International 1924,500000,0,0,51,0.9996
-20440,Ain el Abd / UTM zone 40N,Transverse Mercator,metre,4204,Ain el Abd 1970,International 1924,500000,0,0,57,0.9996
-20499,Ain el Abd / Bahrain Grid,Transverse Mercator,metre,4204,Ain el Abd 1970,International 1924,500000,0,0,51,0.9996
-20538,Afgooye / UTM zone 38N,Transverse Mercator,metre,4205,Afgooye,Krassowsky 1940,500000,0,0,45,0.9996
-20539,Afgooye / UTM zone 39N,Transverse Mercator,metre,4205,Afgooye,Krassowsky 1940,500000,0,0,51,0.9996
-20790,Lisbon (Lisbon) / Portuguese National Grid,Transverse Mercator,metre,4207,Lisbon 1937 (Lisbon),International 1924,200000,39.4,300000,1,1
-20791,Lisbon (Lisbon) / Portuguese Grid,Transverse Mercator,metre,4207,Lisbon 1937 (Lisbon),International 1924,0,39.4,0,1,1
-20822,Aratu / UTM zone 22S,Transverse Mercator,metre,4208,Aratu,International 1924,500000,0,10000000,-51,0.9996
-20823,Aratu / UTM zone 23S,Transverse Mercator,metre,4208,Aratu,International 1924,500000,0,10000000,-45,0.9996
-20824,Aratu / UTM zone 24S,Transverse Mercator,metre,4208,Aratu,International 1924,500000,0,10000000,-39,0.9996
-20934,Arc 1950 / UTM zone 34S,Transverse Mercator,metre,4209,Arc 1950,Clarke 1880 (Arc),500000,0,10000000,21,0.9996
-20935,Arc 1950 / UTM zone 35S,Transverse Mercator,metre,4209,Arc 1950,Clarke 1880 (Arc),500000,0,10000000,27,0.9996
-20936,Arc 1950 / UTM zone 36S,Transverse Mercator,metre,4209,Arc 1950,Clarke 1880 (Arc),500000,0,10000000,33,0.9996
-21035,Arc 1960 / UTM zone 35S,Transverse Mercator,metre,4210,Arc 1960,Clarke 1880 (RGS),500000,0,10000000,27,0.9996
-21036,Arc 1960 / UTM zone 36S,Transverse Mercator,metre,4210,Arc 1960,Clarke 1880 (RGS),500000,0,10000000,33,0.9996
-21037,Arc 1960 / UTM zone 37S,Transverse Mercator,metre,4210,Arc 1960,Clarke 1880 (RGS),500000,0,10000000,39,0.9996
-21095,Arc 1960 / UTM zone 35N,Transverse Mercator,metre,4210,Arc 1960,Clarke 1880 (RGS),500000,0,0,27,0.9996
-21096,Arc 1960 / UTM zone 36N,Transverse Mercator,metre,4210,Arc 1960,Clarke 1880 (RGS),500000,0,0,33,0.9996
-21097,Arc 1960 / UTM zone 37N,Transverse Mercator,metre,4210,Arc 1960,Clarke 1880 (RGS),500000,0,0,39,0.9996
-21148,Batavia / UTM zone 48S,Transverse Mercator,metre,4211,Batavia,Bessel 1841,500000,0,10000000,105,0.9996
-21149,Batavia / UTM zone 49S,Transverse Mercator,metre,4211,Batavia,Bessel 1841,500000,0,10000000,111,0.9996
-21150,Batavia / UTM zone 50S,Transverse Mercator,metre,4211,Batavia,Bessel 1841,500000,0,10000000,117,0.9996
-21291,Barbados 1938 / British West Indies Grid,Transverse Mercator,metre,4212,Barbados 1938,Clarke 1880 (RGS),400000,0,0,-62,0.9995
-21292,Barbados 1938 / Barbados National Grid,Transverse Mercator,metre,4212,Barbados 1938,Clarke 1880 (RGS),30000,13.1035,75000,-59.3335,0.9999986
-21413,Beijing 1954 / Gauss-Kruger zone 13,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,13500000,0,0,75,1
-21414,Beijing 1954 / Gauss-Kruger zone 14,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,14500000,0,0,81,1
-21415,Beijing 1954 / Gauss-Kruger zone 15,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,15500000,0,0,87,1
-21416,Beijing 1954 / Gauss-Kruger zone 16,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,16500000,0,0,93,1
-21417,Beijing 1954 / Gauss-Kruger zone 17,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,17500000,0,0,99,1
-21418,Beijing 1954 / Gauss-Kruger zone 18,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,18500000,0,0,105,1
-21419,Beijing 1954 / Gauss-Kruger zone 19,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,19500000,0,0,111,1
-21420,Beijing 1954 / Gauss-Kruger zone 20,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,20500000,0,0,117,1
-21421,Beijing 1954 / Gauss-Kruger zone 21,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,21500000,0,0,123,1
-21422,Beijing 1954 / Gauss-Kruger zone 22,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,22500000,0,0,129,1
-21423,Beijing 1954 / Gauss-Kruger zone 23,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,23500000,0,0,135,1
-21453,Beijing 1954 / Gauss-Kruger CM 75E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,75,1
-21454,Beijing 1954 / Gauss-Kruger CM 81E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,81,1
-21455,Beijing 1954 / Gauss-Kruger CM 87E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,87,1
-21456,Beijing 1954 / Gauss-Kruger CM 93E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,93,1
-21457,Beijing 1954 / Gauss-Kruger CM 99E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,99,1
-21458,Beijing 1954 / Gauss-Kruger CM 105E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,105,1
-21459,Beijing 1954 / Gauss-Kruger CM 111E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,111,1
-21460,Beijing 1954 / Gauss-Kruger CM 117E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,117,1
-21461,Beijing 1954 / Gauss-Kruger CM 123E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,123,1,,,,,,,,,,,,,,,,
-21462,Beijing 1954 / Gauss-Kruger CM 129E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,129,1,,,,,,,,,,,,,,,,
-21463,Beijing 1954 / Gauss-Kruger CM 135E,Transverse Mercator,metre,4214,Beijing 1954,Krassowsky 1940,500000,0,0,135,1,,,,,,,,,,,,,,,,
-21500,Belge 1950 (Brussels) / Belge Lambert 50,Lambert Conic Conformal (2SP),metre,4215,Reseau National Belge 1950 (Brussels),International 1924,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51.1,90,0,49.5,5400000,150000
-21780,Bern 1898 (Bern) / LV03C,Oblique Mercator,metre,4801,CH1903 (Bern),Bessel 1841,0,0,0,0,0,90,46.570866,0,90,1,0,0,0,0,0,0,0,0,0,0,
-21781,CH1903 / LV03,Oblique Mercator,metre,4149,CH1903,Bessel 1841,0,0,0,0,0,90,46.570866,200000,90,1,600000,7.26225,0,0,0,0,0,0,0,0,
-21782,CH1903 / LV03C-G,Oblique Mercator,metre,4149,CH1903,Bessel 1841,0,0,0,0,0,90,46.570866,0,90,1,0,7.26225,0,0,0,0,0,0,0,0,
-21818,Bogota 1975 / UTM zone 18N,Transverse Mercator,metre,4218,Bogota 1975,International 1924,500000,0,0,-75,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-21896,Bogota 1975 / Colombia West zone,Transverse Mercator,metre,4218,Bogota 1975,International 1924,1000000,4.355657,1000000,-77.04513,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-21897,Bogota 1975 / Colombia Bogota zone,Transverse Mercator,metre,4218,Bogota 1975,International 1924,1000000,4.355657,1000000,-74.04513,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-21898,Bogota 1975 / Colombia East Central zone,Transverse Mercator,metre,4218,Bogota 1975,International 1924,1000000,4.355657,1000000,-71.04513,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-21899,Bogota 1975 / Colombia East,Transverse Mercator,metre,4218,Bogota 1975,International 1924,1000000,4.355657,1000000,-68.04513,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-22032,Camacupa / UTM zone 32S,Transverse Mercator,metre,4220,Camacupa,Clarke 1880 (RGS),500000,0,10000000,9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-22033,Camacupa / UTM zone 33S,Transverse Mercator,metre,4220,Camacupa,Clarke 1880 (RGS),500000,0,10000000,15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-22091,Camacupa / TM 11.30 SE,Transverse Mercator,metre,4220,Camacupa,Clarke 1880 (RGS),500000,0,10000000,11.3,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-22092,Camacupa / TM 12 SE,Transverse Mercator,metre,4220,Camacupa,Clarke 1880 (RGS),500000,0,10000000,12,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-22171,POSGAR 98 / Argentina 1,Transverse Mercator,metre,4190,Posiciones Geodesicas Argentinas 1998,GRS 1980,1500000,-90,0,-72,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-22172,POSGAR 98 / Argentina 2,Transverse Mercator,metre,4190,Posiciones Geodesicas Argentinas 1998,GRS 1980,2500000,-90,0,-69,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-22173,POSGAR 98 / Argentina 3,Transverse Mercator,metre,4190,Posiciones Geodesicas Argentinas 1998,GRS 1980,3500000,-90,0,-66,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-22174,POSGAR 98 / Argentina 4,Transverse Mercator,metre,4190,Posiciones Geodesicas Argentinas 1998,GRS 1980,4500000,-90,0,-63,1,,,,,,,,,,,,,,,
-22175,POSGAR 98 / Argentina 5,Transverse Mercator,metre,4190,Posiciones Geodesicas Argentinas 1998,GRS 1980,5500000,-90,0,-60,1,,,,,,,,,,,,,,,
-22176,POSGAR 98 / Argentina 6,Transverse Mercator,metre,4190,Posiciones Geodesicas Argentinas 1998,GRS 1980,6500000,-90,0,-57,1,,,,,,,,,,,,,,,
-22177,POSGAR 98 / Argentina 7,Transverse Mercator,metre,4190,Posiciones Geodesicas Argentinas 1998,GRS 1980,7500000,-90,0,-54,1,,,,,,,,,,,,,,,
-22181,POSGAR 94 / Argentina 1,Transverse Mercator,metre,4172,Posiciones Geodesicas Argentinas 1994,WGS 84,1500000,-90,0,-72,1,,,,,,,,,,,,,,,
-22182,POSGAR 94 / Argentina 2,Transverse Mercator,metre,4172,Posiciones Geodesicas Argentinas 1994,WGS 84,2500000,-90,0,-69,1,,,,,,,,,,,,,,,
-22183,POSGAR 94 / Argentina 3,Transverse Mercator,metre,4172,Posiciones Geodesicas Argentinas 1994,WGS 84,3500000,-90,0,-66,1,,,,,,,,,,,,,,,
-22184,POSGAR 94 / Argentina 4,Transverse Mercator,metre,4172,Posiciones Geodesicas Argentinas 1994,WGS 84,4500000,-90,0,-63,1,,,,,,,,,,,,,,,
-22185,POSGAR 94 / Argentina 5,Transverse Mercator,metre,4172,Posiciones Geodesicas Argentinas 1994,WGS 84,5500000,-90,0,-60,1,,,,,,,,,,,,,,,
-22186,POSGAR 94 / Argentina 6,Transverse Mercator,metre,4172,Posiciones Geodesicas Argentinas 1994,WGS 84,6500000,-90,0,-57,1,,,,,,,,,,,,,,,
-22187,POSGAR 94 / Argentina 7,Transverse Mercator,metre,4172,Posiciones Geodesicas Argentinas 1994,WGS 84,7500000,-90,0,-54,1,,,,,,,,,,,,,,,
-22191,Campo Inchauspe / Argentina 1,Transverse Mercator,metre,4221,Campo Inchauspe,International 1924,1500000,-90,0,-72,1,,,,,,,,,,,,,,,
-22192,Campo Inchauspe / Argentina 2,Transverse Mercator,metre,4221,Campo Inchauspe,International 1924,2500000,-90,0,-69,1,,,,,,,,,,,,,,,
-22193,Campo Inchauspe / Argentina 3,Transverse Mercator,metre,4221,Campo Inchauspe,International 1924,3500000,-90,0,-66,1,,,,,,,,,,,,,,,
-22194,Campo Inchauspe / Argentina 4,Transverse Mercator,metre,4221,Campo Inchauspe,International 1924,4500000,-90,0,-63,1,,,,,,,,,,,,,,,
-22195,Campo Inchauspe / Argentina 5,Transverse Mercator,metre,4221,Campo Inchauspe,International 1924,5500000,-90,0,-60,1,,,,,,,,,,,,,,,
-22196,Campo Inchauspe / Argentina 6,Transverse Mercator,metre,4221,Campo Inchauspe,International 1924,6500000,-90,0,-57,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-22197,Campo Inchauspe / Argentina 7,Transverse Mercator,metre,4221,Campo Inchauspe,International 1924,7500000,-90,0,-54,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-22234,Cape / UTM zone 34S,Transverse Mercator,metre,4222,Cape,Clarke 1880 (Arc),500000,0,10000000,21,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-22235,Cape / UTM zone 35S,Transverse Mercator,metre,4222,Cape,Clarke 1880 (Arc),500000,0,10000000,27,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-22236,Cape / UTM zone 36S,Transverse Mercator,metre,4222,Cape,Clarke 1880 (Arc),500000,0,10000000,33,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-22275,Cape / Lo15,Transverse Mercator (South Orientated),metre,4222,Cape,Clarke 1880 (Arc),0,0,0,15,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-22277,Cape / Lo17,Transverse Mercator (South Orientated),metre,4222,Cape,Clarke 1880 (Arc),0,0,0,17,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-22279,Cape / Lo19,Transverse Mercator (South Orientated),metre,4222,Cape,Clarke 1880 (Arc),0,0,0,19,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-22281,Cape / Lo21,Transverse Mercator (South Orientated),metre,4222,Cape,Clarke 1880 (Arc),0,0,0,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-22283,Cape / Lo23,Transverse Mercator (South Orientated),metre,4222,Cape,Clarke 1880 (Arc),0,0,0,23,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-22285,Cape / Lo25,Transverse Mercator (South Orientated),metre,4222,Cape,Clarke 1880 (Arc),0,0,0,25,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-22287,Cape / Lo27,Transverse Mercator (South Orientated),metre,4222,Cape,Clarke 1880 (Arc),0,0,0,27,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-22289,Cape / Lo29,Transverse Mercator (South Orientated),metre,4222,Cape,Clarke 1880 (Arc),0,0,0,29,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-22291,Cape / Lo31,Transverse Mercator (South Orientated),metre,4222,Cape,Clarke 1880 (Arc),0,0,0,31,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-22293,Cape / Lo33,Transverse Mercator (South Orientated),metre,4222,Cape,Clarke 1880 (Arc),0,0,0,33,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-22300,Carthage (Paris) / Tunisia Mining Grid,Tunisia Mining Grid,kilometre,4816,Carthage (Paris),Clarke 1880 (IGN),0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.81973,7.83445,0,582,270
-22332,Carthage / UTM zone 32N,Transverse Mercator,metre,4223,Carthage,Clarke 1880 (IGN),500000,0,0,9,0.9996,,,,,,,,,,,,,,,,
-22391,Carthage / Nord Tunisie,Lambert Conic Conformal (1SP),metre,4223,Carthage,Clarke 1880 (IGN),500000,40,300000,11,0.999625544,,,,,,,,,,,,,,,,
-22392,Carthage / Sud Tunisie,Lambert Conic Conformal (1SP),metre,4223,Carthage,Clarke 1880 (IGN),500000,37,300000,11,0.999625769,,,,,,,,,,,,,,,,
-22521,Corrego Alegre / UTM zone 21S,Transverse Mercator,metre,4225,Corrego Alegre,International 1924,500000,0,10000000,-57,0.9996,,,,,,,,,,,,,,,,
-22522,Corrego Alegre / UTM zone 22S,Transverse Mercator,metre,4225,Corrego Alegre,International 1924,500000,0,10000000,-51,0.9996,,,,,,,,,,,,,,,,
-22523,Corrego Alegre / UTM zone 23S,Transverse Mercator,metre,4225,Corrego Alegre,International 1924,500000,0,10000000,-45,0.9996,,,,,,,,,,,,,,,,
-22524,Corrego Alegre / UTM zone 24S,Transverse Mercator,metre,4225,Corrego Alegre,International 1924,500000,0,10000000,-39,0.9996,,,,,,,,,,,,,,,,
-22525,Corrego Alegre / UTM zone 25S,Transverse Mercator,metre,4225,Corrego Alegre,International 1924,500000,0,10000000,-33,0.9996,,,,,,,,,,,,,,,,
-22700,Deir ez Zor / Levant Zone,Lambert Conic Near-Conformal,metre,4227,Deir ez Zor,Clarke 1880 (IGN),300000,34.39,300000,37.21,0.9996256,,,,,,,,,,,,,,,,
-22770,Deir ez Zor / Syria Lambert,Lambert Conic Conformal (1SP),metre,4227,Deir ez Zor,Clarke 1880 (IGN),300000,34.39,300000,37.21,0.9996256,,,,,,,,,,,,,,,,
-22780,Deir ez Zor / Levant Stereographic,Oblique Stereographic,metre,4227,Deir ez Zor,Clarke 1880 (IGN),0,38,0,43.5,0.9995341,,,,,,,,,,,,,,,,
-22991,Egypt 1907 / Blue Belt,Transverse Mercator,metre,4229,Egypt 1907,Helmert 1906,300000,30,1100000,35,1,,,,,,,,,,,,,,,,
-22992,Egypt 1907 / Red Belt,Transverse Mercator,metre,4229,Egypt 1907,Helmert 1906,615000,30,810000,31,1,,,,,,,,,,,,,,,,
-22993,Egypt 1907 / Purple Belt,Transverse Mercator,metre,4229,Egypt 1907,Helmert 1906,700000,30,200000,27,1,,,,,,
-22994,Egypt 1907 / Extended Purple Belt,Transverse Mercator,metre,4229,Egypt 1907,Helmert 1906,700000,30,1200000,27,1,,,,,,
-23028,ED50 / UTM zone 28N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,-15,0.9996,,,,,,
-23029,ED50 / UTM zone 29N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,-9,0.9996,0,0,0,0,0,0
-23030,ED50 / UTM zone 30N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,-3,0.9996,0,0,0,0,0,0
-23031,ED50 / UTM zone 31N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,3,0.9996,0,0,0,0,0,0
-23032,ED50 / UTM zone 32N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,9,0.9996,0,0,0,0,0,0
-23033,ED50 / UTM zone 33N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,15,0.9996,0,0,0,0,0,0
-23034,ED50 / UTM zone 34N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,21,0.9996,0,0,0,0,0,0
-23035,ED50 / UTM zone 35N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,27,0.9996,0,0,0,0,0,0
-23036,ED50 / UTM zone 36N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,33,0.9996,0,0,0,0,0,0
-23037,ED50 / UTM zone 37N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,39,0.9996,0,0,0,0,0,0
-23038,ED50 / UTM zone 38N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,45,0.9996,0,0,0,0,0,0
-23090,ED50 / TM 0 N,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,0,0.9996,0,0,0,0,0,0
-23095,ED50 / TM 5 NE,Transverse Mercator,metre,4154,European Datum 1950,International 1924,500000,0,0,5,0.9996,0,0,0,0,0,0
-23239,Fahud / UTM zone 39N,Transverse Mercator,metre,4232,Fahud,Clarke 1880 (RGS),500000,0,0,51,0.9996,0,0,0,0,0,0
-23240,Fahud / UTM zone 40N,Transverse Mercator,metre,4232,Fahud,Clarke 1880 (RGS),500000,0,0,57,0.9996,0,0,0,0,0,0,
-23700,HD72 / EOV,Oblique Mercator,metre,4237,Hungarian Datum 1972,GRS 1967,0,0,0,0,0,90,47.08398174,200000,90,0.99993,650000,19.02548584
-23830,DGN95 / Indonesia TM-3 zone 46.2,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,94.5,0.9999,0,0,0,0,0,0,
-23831,DGN95 / Indonesia TM-3 zone 47.1,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,97.5,0.9999,,,,,,,
-23832,DGN95 / Indonesia TM-3 zone 47.2,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,100.5,0.9999,,,,,,,
-23833,DGN95 / Indonesia TM-3 zone 48.1,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,103.5,0.9999,,,,,,,
-23834,DGN95 / Indonesia TM-3 zone 48.2,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,106.5,0.9999,,,,,,,
-23835,DGN95 / Indonesia TM-3 zone 49.1,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,109.5,0.9999,,,,,,,
-23836,DGN95 / Indonesia TM-3 zone 49.2,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,112.5,0.9999,,,,,,,
-23837,DGN95 / Indonesia TM-3 zone 50.1,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,115.5,0.9999,,,,,,,
-23838,DGN95 / Indonesia TM-3 zone 50.2,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,118.5,0.9999,,,,,,,
-23839,DGN95 / Indonesia TM-3 zone 51.1,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,121.5,0.9999,,,,,,,
-23840,DGN95 / Indonesia TM-3 zone 51.2,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,124.5,0.9999,,,,,,,
-23841,DGN95 / Indonesia TM-3 zone 52.1,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,127.5,0.9999,,,,,,,
-23842,DGN95 / Indonesia TM-3 zone 52.2,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,130.5,0.9999,,,,,,,
-23843,DGN95 / Indonesia TM-3 zone 53.1,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,133.5,0.9999,,,,,,,
-23844,DGN95 / Indonesia TM-3 zone 53.2,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,136.5,0.9999
-23845,DGN95 / Indonesia TM-3 zone 54.1,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,200000,0,1500000,139.5,0.9999
-23846,ID74 / UTM zone 46N,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,0,93,0.9996
-23847,ID74 / UTM zone 47N,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,0,99,0.9996
-23848,ID74 / UTM zone 48N,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,0,105,0.9996
-23849,ID74 / UTM zone 49N,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,0,111,0.9996
-23850,ID74 / UTM zone 50N,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,0,117,0.9996
-23851,ID74 / UTM zone 51N,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,0,123,0.9996
-23852,ID74 / UTM zone 52N,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,0,129,0.9996
-23866,DGN95 / UTM zone 46N,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,0,93,0.9996
-23867,DGN95 / UTM zone 47N,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,0,99,0.9996
-23868,DGN95 / UTM zone 48N,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,0,105,0.9996
-23869,DGN95 / UTM zone 49N,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,0,111,0.9996
-23870,DGN95 / UTM zone 50N,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,0,117,0.9996
-23871,DGN95 / UTM zone 51N,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,0,123,0.9996
-23872,DGN95 / UTM zone 52N,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,0,129,0.9996
-23877,DGN95 / UTM zone 47S,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,10000000,99,0.9996
-23878,DGN95 / UTM zone 48S,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,10000000,105,0.9996
-23879,DGN95 / UTM zone 49S,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,10000000,111,0.9996
-23880,DGN95 / UTM zone 50S,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,10000000,117,0.9996
-23881,DGN95 / UTM zone 51S,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,10000000,123,0.9996
-23882,DGN95 / UTM zone 52S,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,10000000,129,0.9996
-23883,DGN95 / UTM zone 53S,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,10000000,135,0.9996
-23884,DGN95 / UTM zone 54S,Transverse Mercator,metre,4021,Datum Geodesi Nasional 1995,WGS 84,500000,0,10000000,141,0.9996
-23887,ID74 / UTM zone 47S,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,10000000,99,0.9996
-23888,ID74 / UTM zone 48S,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,10000000,105,0.9996
-23889,ID74 / UTM zone 49S,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,10000000,111,0.9996
-23890,ID74 / UTM zone 50S,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,10000000,117,0.9996
-23891,ID74 / UTM zone 51S,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,10000000,123,0.9996
-23892,ID74 / UTM zone 52S,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,10000000,129,0.9996
-23893,ID74 / UTM zone 53S,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,10000000,135,0.9996
-23894,ID74 / UTM zone 54S,Transverse Mercator,metre,4238,Indonesian Datum 1974,Indonesian National Spheroid,500000,0,10000000,141,0.9996
-23946,Indian 1954 / UTM zone 46N,Transverse Mercator,metre,4239,Indian 1954,Everest 1830 (1937 Adjustment),500000,0,0,93,0.9996
-23947,Indian 1954 / UTM zone 47N,Transverse Mercator,metre,4239,Indian 1954,Everest 1830 (1937 Adjustment),500000,0,0,99,0.9996
-23948,Indian 1954 / UTM zone 48N,Transverse Mercator,metre,4239,Indian 1954,Everest 1830 (1937 Adjustment),500000,0,0,105,0.9996
-24047,Indian 1975 / UTM zone 47N,Transverse Mercator,metre,4240,Indian 1975,Everest 1830 (1937 Adjustment),500000,0,0,99,0.9996
-24048,Indian 1975 / UTM zone 48N,Transverse Mercator,metre,4240,Indian 1975,Everest 1830 (1937 Adjustment),500000,0,0,105,0.9996
-24100,Jamaica 1875 / Jamaica (Old Grid),Lambert Conic Conformal (1SP),Clarke's foot,4241,Jamaica 1875,Clarke 1880,550000,18,400000,-77,1
-24200,JAD69 / Jamaica National Grid,Lambert Conic Conformal (1SP),metre,4242,Jamaica 1969,Clarke 1866,250000,18,150000,-77,1
-24305,Kalianpur 1937 / UTM zone 45N,Transverse Mercator,metre,4144,Kalianpur 1937,Everest 1830 (1937 Adjustment),500000,0,0,87,0.9996
-24306,Kalianpur 1937 / UTM zone 46N,Transverse Mercator,metre,4144,Kalianpur 1937,Everest 1830 (1937 Adjustment),500000,0,0,93,0.9996
-24311,Kalianpur 1962 / UTM zone 41N,Transverse Mercator,metre,4145,Kalianpur 1962,Everest 1830 (1962 Definition),500000,0,0,63,0.9996
-24312,Kalianpur 1962 / UTM zone 42N,Transverse Mercator,metre,4145,Kalianpur 1962,Everest 1830 (1962 Definition),500000,0,0,69,0.9996
-24313,Kalianpur 1962 / UTM zone 43N,Transverse Mercator,metre,4145,Kalianpur 1962,Everest 1830 (1962 Definition),500000,0,0,75,0.9996
-24342,Kalianpur 1975 / UTM zone 42N,Transverse Mercator,metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),500000,0,0,69,0.9996
-24343,Kalianpur 1975 / UTM zone 43N,Transverse Mercator,metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),500000,0,0,75,0.9996
-24344,Kalianpur 1975 / UTM zone 44N,Transverse Mercator,metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),500000,0,0,81,0.9996
-24345,Kalianpur 1975 / UTM zone 45N,Transverse Mercator,metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),500000,0,0,87,0.9996
-24346,Kalianpur 1975 / UTM zone 46N,Transverse Mercator,metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),500000,0,0,93,0.9996
-24347,Kalianpur 1975 / UTM zone 47N,Transverse Mercator,metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),500000,0,0,99,0.9996
-24370,Kalianpur 1880 / India zone 0,Lambert Conic Conformal (1SP),Indian yard,4243,Kalianpur 1880,Everest (1830 Definition),2355500,39.3,2590000,68,0.99846154
-24371,Kalianpur 1880 / India zone I,Lambert Conic Conformal (1SP),Indian yard,4243,Kalianpur 1880,Everest (1830 Definition),3000000,32.3,1000000,68,0.99878641
-24372,Kalianpur 1880 / India zone IIa,Lambert Conic Conformal (1SP),Indian yard,4243,Kalianpur 1880,Everest (1830 Definition),3000000,26,1000000,74,0.99878641
-24373,Kalianpur 1880 / India zone III,Lambert Conic Conformal (1SP),Indian yard,4243,Kalianpur 1880,Everest (1830 Definition),3000000,19,1000000,80,0.99878641
-24374,Kalianpur 1880 / India zone IV,Lambert Conic Conformal (1SP),Indian yard,4243,Kalianpur 1880,Everest (1830 Definition),3000000,12,1000000,80,0.99878641
-24375,Kalianpur 1937 / India zone IIb,Lambert Conic Conformal (1SP),metre,4144,Kalianpur 1937,Everest 1830 (1937 Adjustment),2743185.69,26,914395.23,90,0.99878641
-24376,Kalianpur 1962 / India zone I,Lambert Conic Conformal (1SP),metre,4145,Kalianpur 1962,Everest 1830 (1962 Definition),2743196.4,32.3,914398.8,68,0.99878641
-24377,Kalianpur 1962 / India zone IIa,Lambert Conic Conformal (1SP),metre,4145,Kalianpur 1962,Everest 1830 (1962 Definition),2743196.4,26,914398.8,74,0.99878641
-24378,Kalianpur 1975 / India zone I,Lambert Conic Conformal (1SP),metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),2743195.5,32.3,914398.5,68,0.99878641
-24379,Kalianpur 1975 / India zone IIa,Lambert Conic Conformal (1SP),metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),2743195.5,26,914398.5,74,0.99878641
-24380,Kalianpur 1975 / India zone IIb,Lambert Conic Conformal (1SP),metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),2743195.5,26,914398.5,90,0.99878641
-24381,Kalianpur 1975 / India zone III,Lambert Conic Conformal (1SP),metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),2743195.5,19,914398.5,80,0.99878641
-24382,Kalianpur 1880 / India zone IIb,Lambert Conic Conformal (1SP),Indian yard,4243,Kalianpur 1880,Everest (1830 Definition),3000000,26,1000000,90,0.99878641
-24383,Kalianpur 1975 / India zone IV,Lambert Conic Conformal (1SP),metre,4146,Kalianpur 1975,Everest 1830 (1975 Definition),2743195.5,12,914398.5,80,0.99878641
-24500,Kertau 1968 / Singapore Grid,Cassini-Soldner,metre,4245,Kertau 1968,Everest 1830 Modified,30000,1.1715528,30000,103.5110808,
-24547,Kertau 1968 / UTM zone 47N,Transverse Mercator,metre,4245,Kertau 1968,Everest 1830 Modified,500000,0,0,99,0.9996
-24548,Kertau 1968 / UTM zone 48N,Transverse Mercator,metre,4245,Kertau 1968,Everest 1830 Modified,500000,0,0,105,0.9996
-24600,KOC Lambert,Lambert Conic Conformal (1SP),metre,4246,Kuwait Oil Company,Clarke 1880 (RGS),1500000,32.3,1166200,45,0.998786408
-24718,La Canoa / UTM zone 18N,Transverse Mercator,metre,4247,La Canoa,International 1924,500000,0,0,-75,0.9996
-24719,La Canoa / UTM zone 19N,Transverse Mercator,metre,4247,La Canoa,International 1924,500000,0,0,-69,0.9996
-24720,La Canoa / UTM zone 20N,Transverse Mercator,metre,4247,La Canoa,International 1924,500000,0,0,-63,0.9996
-24817,PSAD56 / UTM zone 17N,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,0,-81,0.9996
-24818,PSAD56 / UTM zone 18N,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,0,-75,0.9996
-24819,PSAD56 / UTM zone 19N,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,0,-69,0.9996
-24820,PSAD56 / UTM zone 20N,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,0,-63,0.9996
-24821,PSAD56 / UTM zone 21N,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,0,-57,0.9996
-24877,PSAD56 / UTM zone 17S,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,10000000,-81,0.9996
-24878,PSAD56 / UTM zone 18S,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,10000000,-75,0.9996
-24879,PSAD56 / UTM zone 19S,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,10000000,-69,0.9996
-24880,PSAD56 / UTM zone 20S,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,10000000,-63,0.9996
-24881,PSAD56 / UTM zone 21S,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,10000000,-57,0.9996
-24882,PSAD56 / UTM zone 22S,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,500000,0,10000000,-51,0.9996
-24891,PSAD56 / Peru west zone,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,222000,-6,1426834.743,-80.3,0.99983008
-24892,PSAD56 / Peru central zone,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,720000,-9.3,1039979.159,-76,0.99932994
-24893,PSAD56 / Peru east zone,Transverse Mercator,metre,4248,Provisional South American Datum 1956,International 1924,1324000,-9.3,1040084.558,-70.3,0.99952992
-25000,Leigon / Ghana Metre Grid,Transverse Mercator,metre,4250,Leigon,Clarke 1880 (RGS),274319.51,4.4,0,-1,0.99975
-25231,Lome / UTM zone 31N,Transverse Mercator,metre,4252,Lome,Clarke 1880 (IGN),500000,0,0,3,0.9996
-25391,Luzon 1911 / Philippines zone I,Transverse Mercator,metre,4253,Luzon 1911,Clarke 1866,500000,0,0,117,0.99995
-25392,Luzon 1911 / Philippines zone II,Transverse Mercator,metre,4253,Luzon 1911,Clarke 1866,500000,0,0,119,0.99995
-25393,Luzon 1911 / Philippines zone III,Transverse Mercator,metre,4253,Luzon 1911,Clarke 1866,500000,0,0,121,0.99995
-25394,Luzon 1911 / Philippines zone IV,Transverse Mercator,metre,4253,Luzon 1911,Clarke 1866,500000,0,0,123,0.99995
-25395,Luzon 1911 / Philippines zone V,Transverse Mercator,metre,4253,Luzon 1911,Clarke 1866,500000,0,0,125,0.99995
-25828,ETRS89 / UTM zone 28N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,-15,0.9996
-25829,ETRS89 / UTM zone 29N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,-9,0.9996
-25830,ETRS89 / UTM zone 30N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,-3,0.9996
-25831,ETRS89 / UTM zone 31N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,3,0.9996
-25832,ETRS89 / UTM zone 32N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,9,0.9996
-25833,ETRS89 / UTM zone 33N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,15,0.9996
-25834,ETRS89 / UTM zone 34N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,21,0.9996
-25835,ETRS89 / UTM zone 35N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,27,0.9996
-25836,ETRS89 / UTM zone 36N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,33,0.9996
-25837,ETRS89 / UTM zone 37N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,39,0.9996
-25838,ETRS89 / UTM zone 38N,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,45,0.9996
-25884,ETRS89 / TM Baltic93,Transverse Mercator,metre,4258,European Terrestrial Reference System 1989,GRS 1980,500000,0,0,24,0.9996
-25932,Malongo 1987 / UTM zone 32S,Transverse Mercator,metre,4259,Malongo 1987,International 1924,500000,0,10000000,9,0.9996
-26191,Merchich / Nord Maroc,Lambert Conic Conformal (1SP),metre,4261,Merchich,Clarke 1880 (IGN),500000,37,300000,-6,0.999625769
-26192,Merchich / Sud Maroc,Lambert Conic Conformal (1SP),metre,4261,Merchich,Clarke 1880 (IGN),500000,33,300000,-6,0.999615596
-26194,Merchich / Sahara Nord,Lambert Conic Conformal (1SP),metre,4261,Merchich,Clarke 1880 (IGN),1200000,29,400000,-6,0.999616304
-26195,Merchich / Sahara Sud,Lambert Conic Conformal (1SP),metre,4261,Merchich,Clarke 1880 (IGN),1500000,25,400000,-6,0.999616437
-26237,Massawa / UTM zone 37N,Transverse Mercator,metre,4262,Massawa,Bessel 1841,500000,0,0,39,0.9996
-26331,Minna / UTM zone 31N,Transverse Mercator,metre,4263,Minna,Clarke 1880 (RGS),500000,0,0,3,0.9996
-26332,Minna / UTM zone 32N,Transverse Mercator,metre,4263,Minna,Clarke 1880 (RGS),500000,0,0,9,0.9996
-26391,Minna / Nigeria West Belt,Transverse Mercator,metre,4263,Minna,Clarke 1880 (RGS),230738.26,4,0,4.3,0.99975
-26392,Minna / Nigeria Mid Belt,Transverse Mercator,metre,4263,Minna,Clarke 1880 (RGS),670553.98,4,0,8.3,0.99975
-26393,Minna / Nigeria East Belt,Transverse Mercator,metre,4263,Minna,Clarke 1880 (RGS),1110369.7,4,0,12.3,0.99975
-26632,M'poraloko / UTM zone 32N,Transverse Mercator,metre,4266,M'poraloko,Clarke 1880 (IGN),500000,0,0,9,0.9996
-26692,M'poraloko / UTM zone 32S,Transverse Mercator,metre,4266,M'poraloko,Clarke 1880 (IGN),500000,0,10000000,9,0.9996
-26701,NAD27 / UTM zone 1N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-177,0.9996
-26702,NAD27 / UTM zone 2N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-171,0.9996
-26703,NAD27 / UTM zone 3N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-165,0.9996
-26704,NAD27 / UTM zone 4N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-159,0.9996
-26705,NAD27 / UTM zone 5N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-153,0.9996
-26706,NAD27 / UTM zone 6N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-147,0.9996
-26707,NAD27 / UTM zone 7N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-141,0.9996
-26708,NAD27 / UTM zone 8N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-135,0.9996
-26709,NAD27 / UTM zone 9N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-129,0.9996
-26710,NAD27 / UTM zone 10N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-123,0.9996
-26711,NAD27 / UTM zone 11N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-117,0.9996
-26712,NAD27 / UTM zone 12N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-111,0.9996,,,,,,,
-26713,NAD27 / UTM zone 13N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-105,0.9996,,,,,,,
-26714,NAD27 / UTM zone 14N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-99,0.9996,,,,,,,
-26715,NAD27 / UTM zone 15N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-93,0.9996,0,0,0,0,0,0,
-26716,NAD27 / UTM zone 16N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-87,0.9996,0,0,0,0,0,0,
-26717,NAD27 / UTM zone 17N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-81,0.9996,0,0,0,0,0,0,
-26718,NAD27 / UTM zone 18N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-75,0.9996,0,0,0,0,0,0,
-26719,NAD27 / UTM zone 19N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-69,0.9996,0,0,0,0,0,0,
-26720,NAD27 / UTM zone 20N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-63,0.9996,0,0,0,0,0,0,
-26721,NAD27 / UTM zone 21N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-57,0.9996,0,0,0,0,0,0,
-26722,NAD27 / UTM zone 22N,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,500000,0,0,-51,0.9996,0,0,0,0,0,0,
-26729,NAD27 / Alabama East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,30.3,0,-85.5,0.99996,0,0,0,0,0,0,
-26730,NAD27 / Alabama West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,30,0,-87.3,0.999933333,0,0,0,0,0,0,
-26731,NAD27 / Alaska zone 1,Hotine Oblique Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,16404166.67,0,-16404166.67,0,0,323.0748369,57,0,323.0748369,0.9999,0,-133.4
-26732,NAD27 / Alaska zone 2,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,54,0,-142,0.9999,0,0,0,0,0,0,
-26733,NAD27 / Alaska zone 3,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,54,0,-146,0.9999,0,0,0,0,0,0,
-26734,NAD27 / Alaska zone 4,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,54,0,-150,0.9999,0,0,0,0,0,0,,,,,,,,,,
-26735,NAD27 / Alaska zone 5,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,54,0,-154,0.9999,0,0,0,0,0,0,,,,,,,,,,
-26736,NAD27 / Alaska zone 6,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,54,0,-158,0.9999,0,0,0,0,0,0,,,,,,,,,,
-26737,NAD27 / Alaska zone 7,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,700000,54,0,-162,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26738,NAD27 / Alaska zone 8,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,54,0,-166,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26739,NAD27 / Alaska zone 9,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,600000,54,0,-170,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26740,NAD27 / Alaska zone 10,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51.5,51,-176,53.5,0,3000000
-26741,NAD27 / California zone I,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.2,-122,41.4,0,2000000
-26742,NAD27 / California zone II,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.2,37.4,-122,39.5,0,2000000
-26743,NAD27 / California zone III,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.04,36.3,-120.3,38.26,0,2000000
-26744,NAD27 / California zone IV,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,35.2,-119,37.15,0,2000000
-26745,NAD27 / California zone V,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.02,33.3,-118,35.28,0,2000000
-26746,NAD27 / California zone VI,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.47,32.1,-116.15,33.53,0,2000000
-26748,NAD27 / Arizona East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,31,0,-110.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26749,NAD27 / Arizona Central,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,31,0,-111.55,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26750,NAD27 / Arizona West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,31,0,-113.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26751,NAD27 / Arkansas North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.56,34.2,-92,36.14,0,2000000
-26752,NAD27 / Arkansas South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.18,32.4,-92,34.46,0,2000000
-26753,NAD27 / Colorado North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.47,39.2,-105.3,39.43,0,2000000
-26754,NAD27 / Colorado Central,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.27,37.5,-105.3,39.45,0,2000000
-26755,NAD27 / Colorado South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.14,36.4,-105.3,38.26,0,2000000
-26756,NAD27 / Connecticut,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.12,40.5,-72.45,41.52,0,600000
-26757,NAD27 / Delaware,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,38,0,-75.25,0.999995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26758,NAD27 / Florida East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,24.2,0,-81,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26759,NAD27 / Florida West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,24.2,0,-82,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26760,NAD27 / Florida North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.35,29,-84.3,30.45,0,2000000
-26766,NAD27 / Georgia East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,30,0,-82.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26767,NAD27 / Georgia West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,30,0,-84.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26768,NAD27 / Idaho East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,41.4,0,-112.1,0.999947368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26769,NAD27 / Idaho Central,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,41.4,0,-114,0.999947368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26770,NAD27 / Idaho West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,41.4,0,-115.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26771,NAD27 / Illinois East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,36.4,0,-88.2,0.999975,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26772,NAD27 / Illinois West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,36.4,0,-90.1,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26773,NAD27 / Indiana East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,37.3,0,-85.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26774,NAD27 / Indiana West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,37.3,0,-87.05,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26775,NAD27 / Iowa North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.04,41.3,-93.3,43.16,0,2000000
-26776,NAD27 / Iowa South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.37,40,-93.3,41.47,0,2000000
-26777,NAD27 / Kansas North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.43,38.2,-98,39.47,0,2000000
-26778,NAD27 / Kansas South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.16,36.4,-98.3,38.34,0,2000000
-26779,NAD27 / Kentucky North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.58,37.3,-84.15,37.58,0,2000000
-26780,NAD27 / Kentucky South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.56,36.2,-85.45,36.44,0,2000000
-26781,NAD27 / Louisiana North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.4,30.4,-92.3,31.1,0,2000000
-26782,NAD27 / Louisiana South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30.42,28.4,-91.2,29.18,0,2000000
-26783,NAD27 / Maine East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,43.5,0,-68.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26784,NAD27 / Maine West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,42.5,0,-70.1,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26785,NAD27 / Maryland,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.27,37.5,-77,38.18,0,800000
-26786,NAD27 / Massachusetts Mainland,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.41,41,-71.3,41.43,0,600000
-26787,NAD27 / Massachusetts Island,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.29,41,-70.3,41.17,0,200000
-26791,NAD27 / Minnesota North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48.38,46.3,-93.06,47.02,0,2000000
-26792,NAD27 / Minnesota Central,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.03,45,-94.15,45.37,0,2000000
-26793,NAD27 / Minnesota South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.13,43,-94,43.47,0,2000000
-26794,NAD27 / Mississippi East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,29.4,0,-88.5,0.99996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26795,NAD27 / Mississippi West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,30.3,0,-90.2,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26796,NAD27 / Missouri East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,35.5,0,-90.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26797,NAD27 / Missouri Central,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,35.5,0,-92.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26798,NAD27 / Missouri West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,36.1,0,-94.3,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26799,NAD27 / California zone VII,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.52,34.08,-118.2,34.25,4160926.74,4186692.58
-26801,NAD Michigan / Michigan East,Transverse Mercator,US survey foot,4268,NAD Michigan,Clarke 1866 Michigan,500000,41.3,0,-83.4,0.999942857,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26802,NAD Michigan / Michigan Old Central,Transverse Mercator,US survey foot,4268,NAD Michigan,Clarke 1866 Michigan,500000,41.3,0,-85.45,0.999909091,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26803,NAD Michigan / Michigan West,Transverse Mercator,US survey foot,4268,NAD Michigan,Clarke 1866 Michigan,500000,41.3,0,-88.45,0.999909091,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26811,NAD Michigan / Michigan North,Lambert Conic Conformal (2SP),US survey foot,4268,NAD Michigan,Clarke 1866 Michigan,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.05,44.47,-87,45.29,0,2000000
-26812,NAD Michigan / Michigan Central,Lambert Conic Conformal (2SP),US survey foot,4268,NAD Michigan,Clarke 1866 Michigan,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.42,43.19,-84.2,44.11,0,2000000
-26813,NAD Michigan / Michigan South,Lambert Conic Conformal (2SP),US survey foot,4268,NAD Michigan,Clarke 1866 Michigan,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43.4,41.3,-84.2,42.06,0,2000000
-26847,NAD83 / Maine East (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,984250,43.4,0,-68.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26848,NAD83 / Maine West (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,2952750,42.5,0,-70.1,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26849,NAD83 / Minnesota North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.02,46.3,-93.06,48.38,328083.3333,2624666.667
-26850,NAD83 / Minnesota Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.37,45,-94.15,47.03,328083.3333,2624666.667
-26851,NAD83 / Minnesota South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43.47,43,-94,45.13,328083.3333,2624666.667
-26852,NAD83 / Nebraska (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.5,-100,43,0,1640416.667
-26853,NAD83 / West Virginia North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39,38.3,-79.3,40.15,0,1968500
-26854,NAD83 / West Virginia South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.29,37,-81,38.53,0,1968500
-26855,NAD83(HARN) / Maine East (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,984250,43.4,0,-68.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26856,NAD83(HARN) / Maine West (ftUS),Transverse Mercator,US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,2952750,42.5,0,-70.1,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26857,NAD83(HARN) / Minnesota North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.02,46.3,-93.06,48.38,328083.3333,2624666.667
-26858,NAD83(HARN) / Minnesota Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.37,45,-94.15,47.03,328083.3333,2624666.667
-26859,NAD83(HARN) / Minnesota South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43.47,43,-94,45.13,328083.3333,2624666.667
-26860,NAD83(HARN) / Nebraska (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.5,-100,43,0,1640416.667
-26861,NAD83(HARN) / West Virginia North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39,38.3,-79.3,40.15,0,1968500
-26862,NAD83(HARN) / West Virginia South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4152,NAD83 (High Accuracy Regional Network),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.29,37,-81,38.53,0,1968500
-26863,NAD83(NSRS2007) / Maine East (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,984250,43.4,0,-68.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26864,NAD83(NSRS2007) / Maine West (ftUS),Transverse Mercator,US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,2952750,42.5,0,-70.1,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26865,NAD83(NSRS2007) / Minnesota North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.02,46.3,-93.06,48.38,328083.3333,2624666.667
-26866,NAD83(NSRS2007) / Minnesota Central (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.37,45,-94.15,47.03,328083.3333,2624666.667
-26867,NAD83(NSRS2007) / Minnesota South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43.47,43,-94,45.13,328083.3333,2624666.667
-26868,NAD83(NSRS2007) / Nebraska (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.5,-100,43,0,1640416.667
-26869,NAD83(NSRS2007) / West Virginia North (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39,38.3,-79.3,40.15,0,1968500
-26870,NAD83(NSRS2007) / West Virginia South (ftUS),Lambert Conic Conformal (2SP),US survey foot,4269,NAD83 (National Spatial Reference System 2007),GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.29,37,-81,38.53,0,1968500
-26891,NAD83(CSRS) / MTM zone 11,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-82.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26892,NAD83(CSRS) / MTM zone 12,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-81,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26893,NAD83(CSRS) / MTM zone 13,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-84,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26894,NAD83(CSRS) / MTM zone 14,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-87,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26895,NAD83(CSRS) / MTM zone 15,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-90,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26896,NAD83(CSRS) / MTM zone 16,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-93,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26897,NAD83(CSRS) / MTM zone 17,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-96,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26898,NAD83(CSRS) / MTM zone 1,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-53,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26899,NAD83(CSRS) / MTM zone 2,Transverse Mercator,metre,4617,NAD83 Canadian Spatial Reference System,GRS 1980,304800,0,0,-56,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26901,NAD83 / UTM zone 1N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-177,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-26902,NAD83 / UTM zone 2N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-171,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-26903,NAD83 / UTM zone 3N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-165,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-26904,NAD83 / UTM zone 4N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-159,0.9996,,,,,,,,,,,,,,,
-26905,NAD83 / UTM zone 5N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-153,0.9996,,,,,,,,,,,,,,,
-26906,NAD83 / UTM zone 6N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-147,0.9996,,,,,,,,,,,,,,,
-26907,NAD83 / UTM zone 7N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-141,0.9996,,,,,,,,,,,,,,,
-26908,NAD83 / UTM zone 8N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-135,0.9996,,,,,,,,,,,,,,,
-26909,NAD83 / UTM zone 9N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-129,0.9996,,,,,,,,,,,,,,,
-26910,NAD83 / UTM zone 10N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-123,0.9996,,,,,,,,,,,,,,,
-26911,NAD83 / UTM zone 11N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-117,0.9996,,,,,,,,,,,,,,,
-26912,NAD83 / UTM zone 12N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-111,0.9996,,,,,,,,,,,,,,,
-26913,NAD83 / UTM zone 13N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-105,0.9996,,,,,,,,,,,,,,,
-26914,NAD83 / UTM zone 14N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-99,0.9996,,,,,,,,,,,,,,,
-26915,NAD83 / UTM zone 15N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-93,0.9996,,,,,,,,,,,,,,,
-26916,NAD83 / UTM zone 16N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-87,0.9996,,,,,,,,,,,,,,,
-26917,NAD83 / UTM zone 17N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-81,0.9996,,,,,,,,,,,,,,,
-26918,NAD83 / UTM zone 18N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-75,0.9996,,,,,,,,,,,,,,,
-26919,NAD83 / UTM zone 19N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-69,0.9996,,,,,,,,,,,,,,,
-26920,NAD83 / UTM zone 20N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-26921,NAD83 / UTM zone 21N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-57,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-26922,NAD83 / UTM zone 22N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-26923,NAD83 / UTM zone 23N,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,0,0,-45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-26929,NAD83 / Alabama East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,200000,30.3,0,-85.5,0.99996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-26930,NAD83 / Alabama West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,600000,30,0,-87.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-26931,NAD83 / Alaska zone 1,Hotine Oblique Mercator,metre,4269,North American Datum 1983,GRS 1980,5000000,0,-5000000,0,0,323.0748369,57,0,323.0748369,0.9999,0,-133.4,0,0,0,0,0,0,0,0
-26932,NAD83 / Alaska zone 2,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,54,0,-142,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-26933,NAD83 / Alaska zone 3,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,54,0,-146,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-26934,NAD83 / Alaska zone 4,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,54,0,-150,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-26935,NAD83 / Alaska zone 5,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,54,0,-154,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-26936,NAD83 / Alaska zone 6,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,54,0,-158,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-26937,NAD83 / Alaska zone 7,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,54,0,-162,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-26938,NAD83 / Alaska zone 8,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,54,0,-166,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26939,NAD83 / Alaska zone 9,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,54,0,-170,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26940,NAD83 / Alaska zone 10,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51.5,51,-176,53.5,0,1000000
-26941,NAD83 / California zone 1,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.2,-122,41.4,500000,2000000
-26942,NAD83 / California zone 2,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.2,37.4,-122,39.5,500000,2000000
-26943,NAD83 / California zone 3,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.04,36.3,-120.3,38.26,500000,2000000
-26944,NAD83 / California zone 4,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,35.2,-119,37.15,500000,2000000
-26945,NAD83 / California zone 5,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.02,33.3,-118,35.28,500000,2000000
-26946,NAD83 / California zone 6,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.47,32.1,-116.15,33.53,500000,2000000
-26948,NAD83 / Arizona East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,213360,31,0,-110.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26949,NAD83 / Arizona Central,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,213360,31,0,-111.55,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26950,NAD83 / Arizona West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,213360,31,0,-113.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26951,NAD83 / Arkansas North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.56,34.2,-92,36.14,0,400000
-26952,NAD83 / Arkansas South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.18,32.4,-92,34.46,400000,400000
-26953,NAD83 / Colorado North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.43,39.2,-105.3,40.47,304800.6096,914401.8289
-26954,NAD83 / Colorado Central,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.27,37.5,-105.3,39.45,304800.6096,914401.8289
-26955,NAD83 / Colorado South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.14,36.4,-105.3,38.26,304800.6096,914401.8289
-26956,NAD83 / Connecticut,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.12,40.5,-72.45,41.52,152400.3048,304800.6096
-26957,NAD83 / Delaware,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,200000,38,0,-75.25,0.999995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26958,NAD83 / Florida East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,200000,24.2,0,-81,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26959,NAD83 / Florida West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,200000,24.2,0,-82,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26960,NAD83 / Florida North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.35,29,-84.3,30.45,0,600000
-26961,NAD83 / Hawaii zone 1,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,18.5,0,-155.3,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26962,NAD83 / Hawaii zone 2,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,20.2,0,-156.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26963,NAD83 / Hawaii zone 3,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,21.1,0,-158,0.99999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26964,NAD83 / Hawaii zone 4,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,21.5,0,-159.3,0.99999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26965,NAD83 / Hawaii zone 5,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,21.4,0,-160.1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26966,NAD83 / Georgia East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,200000,30,0,-82.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26967,NAD83 / Georgia West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,700000,30,0,-84.1,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26968,NAD83 / Idaho East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,200000,41.4,0,-112.1,0.999947368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26969,NAD83 / Idaho Central,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,41.4,0,-114,0.999947368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26970,NAD83 / Idaho West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,800000,41.4,0,-115.45,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26971,NAD83 / Illinois East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,300000,36.4,0,-88.2,0.999975,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26972,NAD83 / Illinois West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,700000,36.4,0,-90.1,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26973,NAD83 / Indiana East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,100000,37.3,250000,-85.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26974,NAD83 / Indiana West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,900000,37.3,250000,-87.05,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26975,NAD83 / Iowa North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.04,41.3,-93.3,43.16,1000000,1500000
-26976,NAD83 / Iowa South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.37,40,-93.3,41.47,0,500000
-26977,NAD83 / Kansas North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.43,38.2,-98,39.47,0,400000
-26978,NAD83 / Kansas South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.16,36.4,-98.3,38.34,400000,400000
-26980,NAD83 / Kentucky South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.44,36.2,-85.45,37.56,500000,500000
-26981,NAD83 / Louisiana North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.1,30.3,-92.3,32.4,0,1000000
-26982,NAD83 / Louisiana South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29.18,28.3,-91.2,30.42,0,1000000
-26983,NAD83 / Maine East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,300000,43.4,0,-68.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26984,NAD83 / Maine West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,900000,42.5,0,-70.1,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26985,NAD83 / Maryland,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.18,37.4,-77,39.27,0,400000
-26986,NAD83 / Massachusetts Mainland,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.43,41,-71.3,42.41,750000,200000
-26987,NAD83 / Massachusetts Island,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.17,41,-70.3,41.29,0,500000
-26988,NAD83 / Michigan North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.29,44.47,-87,47.05,0,8000000
-26989,NAD83 / Michigan Central,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.11,43.19,-84.22,45.42,0,6000000
-26990,NAD83 / Michigan South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.06,41.3,-84.22,43.4,0,4000000
-26991,NAD83 / Minnesota North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.02,46.3,-93.06,48.38,100000,800000
-26992,NAD83 / Minnesota Central,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.37,45,-94.15,47.03,100000,800000
-26993,NAD83 / Minnesota South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43.47,43,-94,45.13,100000,800000
-26994,NAD83 / Mississippi East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,300000,29.3,0,-88.5,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26995,NAD83 / Mississippi West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,700000,29.3,0,-90.2,0.99995,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26996,NAD83 / Missouri East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,250000,35.5,0,-90.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26997,NAD83 / Missouri Central,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,35.5,0,-92.3,0.999933333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-26998,NAD83 / Missouri West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,850000,36.1,0,-94.3,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-27037,Nahrwan 1967 / UTM zone 37N,Transverse Mercator,metre,4270,Nahrwan 1967,Clarke 1880 (RGS),500000,0,0,39,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-27038,Nahrwan 1967 / UTM zone 38N,Transverse Mercator,metre,4270,Nahrwan 1967,Clarke 1880 (RGS),500000,0,0,45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-27039,Nahrwan 1967 / UTM zone 39N,Transverse Mercator,metre,4270,Nahrwan 1967,Clarke 1880 (RGS),500000,0,0,51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-27040,Nahrwan 1967 / UTM zone 40N,Transverse Mercator,metre,4270,Nahrwan 1967,Clarke 1880 (RGS),500000,0,0,57,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-27120,Naparima 1972 / UTM zone 20N,Transverse Mercator,metre,4271,Naparima 1972,International 1924,500000,0,0,-63,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-27200,NZGD49 / New Zealand Map Grid,New Zealand Map Grid,metre,4272,New Zealand Geodetic Datum 1949,International 1924,2510000,-41,6023150,173,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-27205,NZGD49 / Mount Eden Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-36.5247515,700000,174.4551622,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-27206,NZGD49 / Bay of Plenty Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-37.45404993,700000,176.275831,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-27207,NZGD49 / Poverty Bay Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-38.372893,700000,177.5308291,1,,,,,,,,,,,,,,,
-27208,NZGD49 / Hawkes Bay Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-39.39033455,700000,176.402525,1,,,,,,,,,,,,,,,
-27209,NZGD49 / Taranaki Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-39.08087299,700000,174.1340842,1,,,,,,,,,,,,,,,
-27210,NZGD49 / Tuhirangi Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-39.30448934,700000,175.3824133,1,,,,,,,,,,,,,,,
-27211,NZGD49 / Wanganui Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-40.14310097,700000,175.2917159,1,,,,,,,,,,,,,,,
-27212,NZGD49 / Wairarapa Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-40.55319175,700000,175.3850459,1,,,,,,,,,,,,,,,
-27213,NZGD49 / Wellington Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-41.18047507,700000,174.4635843,1,,,,,,,,,,,,,,,
-27214,NZGD49 / Collingwood Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-40.42531326,700000,172.4019367,1,,,,,,,,,,,,,,,
-27215,NZGD49 / Nelson Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-41.1628361,700000,173.1757541,1,,,,,,,,,,,,,,,
-27216,NZGD49 / Karamea Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-41.17236815,700000,172.0632502,1,,,,,,,,,,,,,,,
-27217,NZGD49 / Buller Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-41.48388903,700000,171.3452536,1,,,,,,,,,,,,,,,
-27218,NZGD49 / Grey Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-42.20012994,700000,171.3259177,1,,,,,,,,,,,,,,,
-27219,NZGD49 / Amuri Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-42.41208197,700000,173.003648,1,,,,,,,,,,,,,,,
-27220,NZGD49 / Marlborough Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-41.3240152,700000,173.4807467,1
-27221,NZGD49 / Hokitika Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-42.53107605,700000,170.5847977,1
-27222,NZGD49 / Okarito Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-43.06364613,700000,170.1539333,1
-27223,NZGD49 / Jacksons Bay Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-43.58400904,700000,168.3622561,1
-27224,NZGD49 / Mount Pleasant Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-43.35262953,700000,172.4337897,1
-27225,NZGD49 / Gawler Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-43.44553616,700000,171.2138695,1
-27226,NZGD49 / Timaru Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-44.24079933,700000,171.0326103,1
-27227,NZGD49 / Lindis Peak Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-44.44069647,700000,169.2803918,1
-27228,NZGD49 / Mount Nicholas Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-45.07584493,700000,168.2355108,1
-27229,NZGD49 / Mount York Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-45.33494142,700000,167.4419902,1
-27230,NZGD49 / Observation Point Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-45.48583078,700000,170.3742943,1
-27231,NZGD49 / North Taieri Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300000,-45.51414481,700000,170.1657321,0.99996
-27232,NZGD49 / Bluff Circuit,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,300002.66,-46.36000346,699999.58,168.2034339,1
-27258,NZGD49 / UTM zone 58S,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,500000,0,10000000,165,0.9996
-27259,NZGD49 / UTM zone 59S,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,500000,0,10000000,171,0.9996
-27260,NZGD49 / UTM zone 60S,Transverse Mercator,metre,4272,New Zealand Geodetic Datum 1949,International 1924,500000,0,10000000,177,0.9996
-27291,NZGD49 / North Island Grid,Transverse Mercator,British yard (Sears 1922),4272,New Zealand Geodetic Datum 1949,International 1924,300000,-39,400000,175.3,1
-27292,NZGD49 / South Island Grid,Transverse Mercator,British yard (Sears 1922),4272,New Zealand Geodetic Datum 1949,International 1924,500000,-44,500000,171.3,1
-27391,NGO 1948 (Oslo) / NGO zone I,Transverse Mercator,metre,4273,NGO 1948 (Oslo),Bessel Modified,0,58,0,-4.4,1
-27392,NGO 1948 (Oslo) / NGO zone II,Transverse Mercator,metre,4273,NGO 1948 (Oslo),Bessel Modified,0,58,0,-2.2,1
-27393,NGO 1948 (Oslo) / NGO zone III,Transverse Mercator,metre,4273,NGO 1948 (Oslo),Bessel Modified,0,58,0,0,1
-27394,NGO 1948 (Oslo) / NGO zone IV,Transverse Mercator,metre,4273,NGO 1948 (Oslo),Bessel Modified,0,58,0,2.3,1
-27395,NGO 1948 (Oslo) / NGO zone V,Transverse Mercator,metre,4273,NGO 1948 (Oslo),Bessel Modified,0,58,0,6.1,1
-27396,NGO 1948 (Oslo) / NGO zone VI,Transverse Mercator,metre,4273,NGO 1948 (Oslo),Bessel Modified,0,58,0,10.1,1
-27397,NGO 1948 (Oslo) / NGO zone VII,Transverse Mercator,metre,4273,NGO 1948 (Oslo),Bessel Modified,0,58,0,14.1,1
-27398,NGO 1948 (Oslo) / NGO zone VIII,Transverse Mercator,metre,4273,NGO 1948 (Oslo),Bessel Modified,0,58,0,18.2,1
-27429,Datum 73 / UTM zone 29N,Transverse Mercator,metre,4274,Datum 73,International 1924,500000,0,0,-9,0.9996
-27493,Datum 73 / Modified Portuguese Grid,Transverse Mercator,metre,4274,Datum 73,International 1924,180.598,39.4,-86.99,-8.0754862,1
-27500,ATF (Paris) / Nord de Guerre,Lambert Conic Conformal (1SP),metre,4901,Ancienne Triangulation Francaise (Paris),Plessis 1817,500000,55,300000,6,0.99950908
-27561,NTF (Paris) / Lambert Nord France,Lambert Conic Conformal (1SP),metre,4807,Nouvelle Triangulation Francaise (Paris),Clarke 1880 (IGN),600000,55,200000,0,0.999877341
-27562,NTF (Paris) / Lambert Centre France,Lambert Conic Conformal (1SP),metre,4807,Nouvelle Triangulation Francaise (Paris),Clarke 1880 (IGN),600000,52,200000,0,0.99987742
-27563,NTF (Paris) / Lambert Sud France,Lambert Conic Conformal (1SP),metre,4807,Nouvelle Triangulation Francaise (Paris),Clarke 1880 (IGN),600000,49,200000,0,0.999877499
-27564,NTF (Paris) / Lambert Corse,Lambert Conic Conformal (1SP),metre,4807,Nouvelle Triangulation Francaise (Paris),Clarke 1880 (IGN),234.358,46.85,185861.369,0,0.99994471
-27571,NTF (Paris) / Lambert zone I,Lambert Conic Conformal (1SP),metre,4807,Nouvelle Triangulation Francaise (Paris),Clarke 1880 (IGN),600000,55,1200000,0,0.999877341
-27572,NTF (Paris) / Lambert zone II,Lambert Conic Conformal (1SP),metre,4807,Nouvelle Triangulation Francaise (Paris),Clarke 1880 (IGN),600000,52,2200000,0,0.99987742
-27573,NTF (Paris) / Lambert zone III,Lambert Conic Conformal (1SP),metre,4807,Nouvelle Triangulation Francaise (Paris),Clarke 1880 (IGN),600000,49,3200000,0,0.999877499
-27574,NTF (Paris) / Lambert zone IV,Lambert Conic Conformal (1SP),metre,4807,Nouvelle Triangulation Francaise (Paris),Clarke 1880 (IGN),234.358,46.85,4185861.369,0,0.99994471
-27700,OSGB 1936 / British National Grid,Transverse Mercator,metre,4277,OSGB 1936,Airy 1830,400000,49,-100000,-2,0.999601272
-28191,Palestine 1923 / Palestine Grid,Cassini-Soldner,metre,4281,Palestine 1923,Clarke 1880 (Benoit),170251.555,31.4402749,126867.909,35.124349,
-28192,Palestine 1923 / Palestine Belt,Transverse Mercator,metre,4281,Palestine 1923,Clarke 1880 (Benoit),170251.555,31.4402749,1126867.909,35.124349,1
-28193,Palestine 1923 / Israeli CS Grid,Cassini-Soldner,metre,4281,Palestine 1923,Clarke 1880 (Benoit),170251.555,31.4402749,1126867.909,35.124349,
-28232,Pointe Noire / UTM zone 32S,Transverse Mercator,metre,4282,Congo 1960 Pointe Noire,Clarke 1880 (IGN),500000,0,10000000,9,0.9996
-28348,GDA94 / MGA zone 48,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,105,0.9996
-28349,GDA94 / MGA zone 49,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,111,0.9996
-28350,GDA94 / MGA zone 50,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,117,0.9996
-28351,GDA94 / MGA zone 51,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,123,0.9996
-28352,GDA94 / MGA zone 52,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,129,0.9996
-28353,GDA94 / MGA zone 53,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,135,0.9996
-28354,GDA94 / MGA zone 54,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,141,0.9996
-28355,GDA94 / MGA zone 55,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,147,0.9996
-28356,GDA94 / MGA zone 56,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,153,0.9996
-28357,GDA94 / MGA zone 57,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,159,0.9996
-28358,GDA94 / MGA zone 58,Transverse Mercator,metre,4283,Geocentric Datum of Australia 1994,GRS 1980,500000,0,10000000,165,0.9996
-28404,Pulkovo 1942 / Gauss-Kruger zone 4,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,4500000,0,0,21,1
-28405,Pulkovo 1942 / Gauss-Kruger zone 5,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,5500000,0,0,27,1
-28406,Pulkovo 1942 / Gauss-Kruger zone 6,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,6500000,0,0,33,1
-28407,Pulkovo 1942 / Gauss-Kruger zone 7,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,7500000,0,0,39,1
-28408,Pulkovo 1942 / Gauss-Kruger zone 8,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,8500000,0,0,45,1
-28409,Pulkovo 1942 / Gauss-Kruger zone 9,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,9500000,0,0,51,1
-28410,Pulkovo 1942 / Gauss-Kruger zone 10,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,10500000,0,0,57,1
-28411,Pulkovo 1942 / Gauss-Kruger zone 11,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,11500000,0,0,63,1
-28412,Pulkovo 1942 / Gauss-Kruger zone 12,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,12500000,0,0,69,1
-28413,Pulkovo 1942 / Gauss-Kruger zone 13,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,13500000,0,0,75,1
-28414,Pulkovo 1942 / Gauss-Kruger zone 14,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,14500000,0,0,81,1
-28415,Pulkovo 1942 / Gauss-Kruger zone 15,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,15500000,0,0,87,1
-28416,Pulkovo 1942 / Gauss-Kruger zone 16,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,16500000,0,0,93,1
-28417,Pulkovo 1942 / Gauss-Kruger zone 17,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,17500000,0,0,99,1
-28418,Pulkovo 1942 / Gauss-Kruger zone 18,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,18500000,0,0,105,1
-28419,Pulkovo 1942 / Gauss-Kruger zone 19,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,19500000,0,0,111,1
-28420,Pulkovo 1942 / Gauss-Kruger zone 20,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,20500000,0,0,117,1
-28421,Pulkovo 1942 / Gauss-Kruger zone 21,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,21500000,0,0,123,1
-28422,Pulkovo 1942 / Gauss-Kruger zone 22,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,22500000,0,0,129,1
-28423,Pulkovo 1942 / Gauss-Kruger zone 23,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,23500000,0,0,135,1
-28424,Pulkovo 1942 / Gauss-Kruger zone 24,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,24500000,0,0,141,1
-28425,Pulkovo 1942 / Gauss-Kruger zone 25,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,25500000,0,0,147,1
-28426,Pulkovo 1942 / Gauss-Kruger zone 26,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,26500000,0,0,153,1
-28427,Pulkovo 1942 / Gauss-Kruger zone 27,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,27500000,0,0,159,1
-28428,Pulkovo 1942 / Gauss-Kruger zone 28,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,28500000,0,0,165,1
-28429,Pulkovo 1942 / Gauss-Kruger zone 29,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,29500000,0,0,171,1
-28430,Pulkovo 1942 / Gauss-Kruger zone 30,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,30500000,0,0,177,1
-28431,Pulkovo 1942 / Gauss-Kruger zone 31,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,31500000,0,0,-177,1
-28432,Pulkovo 1942 / Gauss-Kruger zone 32,Transverse Mercator,metre,4284,Pulkovo 1942,Krassowsky 1940,32500000,0,0,-171,1
-28600,Qatar 1974 / Qatar National Grid,Transverse Mercator,metre,4285,Qatar 1974,International 1924,200000,24.27,300000,51.13,0.99999
-28991,Amersfoort / RD Old,Oblique Stereographic,metre,4289,Amersfoort,Bessel 1841,0,52.0922178,0,5.23155,0.9999079
-28992,Amersfoort / RD New,Oblique Stereographic,metre,4289,Amersfoort,Bessel 1841,155000,52.0922178,463000,5.23155,0.9999079
-29101,SAD69 / Brazil Polyconic,American Polyconic,metre,4291,South American Datum 1969,GRS 1967 Modified,5000000,0,10000000,-54,
-29168,SAD69 / UTM zone 18N,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,0,-75,0.9996
-29169,SAD69 / UTM zone 19N,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,0,-69,0.9996
-29170,SAD69 / UTM zone 20N,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,0,-63,0.9996
-29171,SAD69 / UTM zone 21N,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,0,-57,0.9996
-29172,SAD69 / UTM zone 22N,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,0,-51,0.9996
-29187,SAD69 / UTM zone 17S,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,10000000,-81,0.9996
-29188,SAD69 / UTM zone 18S,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,10000000,-75,0.9996
-29189,SAD69 / UTM zone 19S,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,10000000,-69,0.9996
-29190,SAD69 / UTM zone 20S,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,10000000,-63,0.9996
-29191,SAD69 / UTM zone 21S,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,10000000,-57,0.9996
-29192,SAD69 / UTM zone 22S,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,10000000,-51,0.9996,,,,,,,
-29193,SAD69 / UTM zone 23S,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,10000000,-45,0.9996,,,,,,,
-29194,SAD69 / UTM zone 24S,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,10000000,-39,0.9996,,,,,,,
-29195,SAD69 / UTM zone 25S,Transverse Mercator,metre,4291,South American Datum 1969,GRS 1967 Modified,500000,0,10000000,-33,0.9996,0,0,0,0,0,0,
-29220,Sapper Hill 1943 / UTM zone 20S,Transverse Mercator,metre,4292,Sapper Hill 1943,International 1924,500000,0,10000000,-63,0.9996,0,0,0,0,0,0,
-29221,Sapper Hill 1943 / UTM zone 21S,Transverse Mercator,metre,4292,Sapper Hill 1943,International 1924,500000,0,10000000,-57,0.9996,0,0,0,0,0,0,
-29333,Schwarzeck / UTM zone 33S,Transverse Mercator,metre,4293,Schwarzeck,Bessel Namibia (GLM),500000,0,10000000,15,0.9996,0,0,0,0,0,0,
-29371,Schwarzeck / Lo22/11,Transverse Mercator (South Orientated),German legal metre,4293,Schwarzeck,Bessel Namibia (GLM),0,-22,0,11,1,0,0,0,0,0,0,
-29373,Schwarzeck / Lo22/13,Transverse Mercator (South Orientated),German legal metre,4293,Schwarzeck,Bessel Namibia (GLM),0,-22,0,13,1,0,0,0,0,0,0,
-29375,Schwarzeck / Lo22/15,Transverse Mercator (South Orientated),German legal metre,4293,Schwarzeck,Bessel Namibia (GLM),0,-22,0,15,1,0,0,0,0,0,0,
-29377,Schwarzeck / Lo22/17,Transverse Mercator (South Orientated),German legal metre,4293,Schwarzeck,Bessel Namibia (GLM),0,-22,0,17,1,0,0,0,0,0,0,
-29379,Schwarzeck / Lo22/19,Transverse Mercator (South Orientated),German legal metre,4293,Schwarzeck,Bessel Namibia (GLM),0,-22,0,19,1,0,0,0,0,0,0,
-29381,Schwarzeck / Lo22/21,Transverse Mercator (South Orientated),German legal metre,4293,Schwarzeck,Bessel Namibia (GLM),0,-22,0,21,1,0,0,0,0,0,0,
-29383,Schwarzeck / Lo22/23,Transverse Mercator (South Orientated),German legal metre,4293,Schwarzeck,Bessel Namibia (GLM),0,-22,0,23,1,0,0,0,0,0,0,
-29385,Schwarzeck / Lo22/25,Transverse Mercator (South Orientated),German legal metre,4293,Schwarzeck,Bessel Namibia (GLM),0,-22,0,25,1,0,0,0,0,0,0,
-29701,Tananarive (Paris) / Laborde Grid,Laborde Madagascar,metre,4810,Tananarive 1925 (Paris),International 1924,400000,0,800000,0,0,21,-21,0,0,0.9995,0,49
-29702,Tananarive (Paris) / Laborde Grid approximation,Oblique Mercator,metre,4810,Tananarive 1925 (Paris),International 1924,0,0,0,0,0,21,-21,800000,21,0.9995,400000,49
-29738,Tananarive / UTM zone 38S,Transverse Mercator,metre,4297,Tananarive 1925,International 1924,500000,0,10000000,45,0.9996,0,0,0,0,0,0,
-29739,Tananarive / UTM zone 39S,Transverse Mercator,metre,4297,Tananarive 1925,International 1924,500000,0,10000000,51,0.9996,0,0,0,0,0,0,
-29849,Timbalai 1948 / UTM zone 49N,Transverse Mercator,metre,4298,Timbalai 1948,Everest 1830 (1967 Definition),500000,0,0,111,0.9996,0,0,0,0,0,0,
-29850,Timbalai 1948 / UTM zone 50N,Transverse Mercator,metre,4298,Timbalai 1948,Everest 1830 (1967 Definition),500000,0,0,117,0.9996,0,0,0,0,0,0,
-29871,Timbalai 1948 / RSO Borneo (ch),Oblique Mercator,British chain (Sears 1922),4298,Timbalai 1948,Everest 1830 (1967 Definition),0,0,0,0,0,53.18569537,4,22014.3572,53.07483685,0.99984,29352.4763,115
-29872,Timbalai 1948 / RSO Borneo (ft),Oblique Mercator,British foot (Sears 1922),4298,Timbalai 1948,Everest 1830 (1967 Definition),0,0,0,0,0,53.18569537,4,1452947.58,53.07483685,0.99984,1937263.44,115
-29873,Timbalai 1948 / RSO Borneo (m),Oblique Mercator,metre,4298,Timbalai 1948,Everest 1830 (1967 Definition),0,0,0,0,0,53.18569537,4,442857.65,53.07483685,0.99984,590476.87,115
-29901,OSNI 1952 / Irish National Grid,Transverse Mercator,metre,4188,OSNI 1952,Airy 1830,200000,53.3,250000,-8,1,0,0,0,0,0,0,
-29902,TM65 / Irish Grid,Transverse Mercator,metre,4299,TM65,Airy Modified 1849,200000,53.3,250000,-8,1.000035,0,0,0,0,0,0,
-29903,TM75 / Irish Grid,Transverse Mercator,metre,4300,Geodetic Datum of 1965,Airy Modified 1849,200000,53.3,250000,-8,1.000035,0,0,0,0,0,0,
-30161,Tokyo / Japan Plane Rectangular CS I,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,33,0,129.3,0.9999,0,0,0,0,0,0,
-30162,Tokyo / Japan Plane Rectangular CS II,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,33,0,131,0.9999,0,0,0,0,0,0,
-30163,Tokyo / Japan Plane Rectangular CS III,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,36,0,132.1,0.9999,0,0,0,0,0,0,
-30164,Tokyo / Japan Plane Rectangular CS IV,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,33,0,133.3,0.9999,0,0,0,0,0,0,
-30165,Tokyo / Japan Plane Rectangular CS V,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,36,0,134.2,0.9999,0,0,0,0,0,0,
-30166,Tokyo / Japan Plane Rectangular CS VI,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,36,0,136,0.9999,0,0,0,0,0,0
-30167,Tokyo / Japan Plane Rectangular CS VII,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,36,0,137.1,0.9999,0,0,0,0,0,0
-30168,Tokyo / Japan Plane Rectangular CS VIII,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,36,0,138.3,0.9999,0,0,0,0,0,0
-30169,Tokyo / Japan Plane Rectangular CS IX,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,36,0,139.5,0.9999,,,,,,
-30170,Tokyo / Japan Plane Rectangular CS X,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,40,0,140.5,0.9999,,,,,,
-30171,Tokyo / Japan Plane Rectangular CS XI,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,44,0,140.15,0.9999,,,,,,
-30172,Tokyo / Japan Plane Rectangular CS XII,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,44,0,142.15,0.9999,,,,,,
-30173,Tokyo / Japan Plane Rectangular CS XIII,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,44,0,144.15,0.9999,,,,,,
-30174,Tokyo / Japan Plane Rectangular CS XIV,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,26,0,142,0.9999,,,,,,
-30175,Tokyo / Japan Plane Rectangular CS XV,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,26,0,127.3,0.9999,,,,,,
-30176,Tokyo / Japan Plane Rectangular CS XVI,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,26,0,124,0.9999,,,,,,
-30177,Tokyo / Japan Plane Rectangular CS XVII,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,26,0,131,0.9999,,,,,,
-30178,Tokyo / Japan Plane Rectangular CS XVIII,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,20,0,136,0.9999,,,,,,
-30179,Tokyo / Japan Plane Rectangular CS XIX,Transverse Mercator,metre,4301,Tokyo,Bessel 1841,0,26,0,154,0.9999,,,,,,
-30200,Trinidad 1903 / Trinidad Grid,Cassini-Soldner,Clarke's link,4302,Trinidad 1903,Clarke 1858,430000,10.263,325000,-61.2,,,,,,,
-30339,TC(1948) / UTM zone 39N,Transverse Mercator,metre,4303,Trucial Coast 1948,Helmert 1906,500000,0,0,51,0.9996,,,,,,
-30340,TC(1948) / UTM zone 40N,Transverse Mercator,metre,4303,Trucial Coast 1948,Helmert 1906,500000,0,0,57,0.9996
-30491,Voirol 1875 / Nord Algerie (ancienne),Lambert Conic Conformal (1SP),metre,4304,Voirol 1875,Clarke 1880 (IGN),500000,40,300000,3,0.999625544
-30492,Voirol 1875 / Sud Algerie (ancienne),Lambert Conic Conformal (1SP),metre,4304,Voirol 1875,Clarke 1880 (IGN),500000,37,300000,3,0.999625769
-30493,Voirol 1879 / Nord Algerie (ancienne),Lambert Conic Conformal (1SP),metre,4671,Voirol 1879,Clarke 1880 (IGN),500000,40,300000,3,0.999625544
-30494,Voirol 1879 / Sud Algerie (ancienne),Lambert Conic Conformal (1SP),metre,4671,Voirol 1879,Clarke 1880 (IGN),500000,37,300000,3,0.999625769
-30729,Nord Sahara 1959 / UTM zone 29N,Transverse Mercator,metre,4307,Nord Sahara 1959,Clarke 1880 (RGS),500000,0,0,-9,0.9996
-30730,Nord Sahara 1959 / UTM zone 30N,Transverse Mercator,metre,4307,Nord Sahara 1959,Clarke 1880 (RGS),500000,0,0,-3,0.9996
-30731,Nord Sahara 1959 / UTM zone 31N,Transverse Mercator,metre,4307,Nord Sahara 1959,Clarke 1880 (RGS),500000,0,0,3,0.9996
-30732,Nord Sahara 1959 / UTM zone 32N,Transverse Mercator,metre,4307,Nord Sahara 1959,Clarke 1880 (RGS),500000,0,0,9,0.9996
-30791,Nord Sahara 1959 / Voirol Unifie Nord,Lambert Conic Conformal (1SP),metre,4307,Nord Sahara 1959,Clarke 1880 (RGS),500135,40,300090,3,0.999625544
-30792,Nord Sahara 1959 / Voirol Unifie Sud,Lambert Conic Conformal (1SP),metre,4307,Nord Sahara 1959,Clarke 1880 (RGS),500135,37,300090,3,0.999625769
-31028,Yoff / UTM zone 28N,Transverse Mercator,metre,4310,Yoff,Clarke 1880 (IGN),500000,0,0,-15,0.9996
-31121,Zanderij / UTM zone 21N,Transverse Mercator,metre,4311,Zanderij,International 1924,500000,0,0,-57,0.9996
-31154,Zanderij / TM 54 NW,Transverse Mercator,metre,4311,Zanderij,International 1924,500000,0,0,-54,0.9996
-31170,Zanderij / Suriname Old TM,Transverse Mercator,metre,4311,Zanderij,International 1924,500000,0,0,-55.41,0.9996
-31171,Zanderij / Suriname TM,Transverse Mercator,metre,4311,Zanderij,International 1924,500000,0,0,-55.41,0.9999
-31251,MGI (Ferro) / Austria GK West Zone,Transverse Mercator,metre,4805,Militar-Geographische Institut (Ferro),Bessel 1841,0,0,-5000000,28,1,,,,,,,,,,,,,,,,
-31252,MGI (Ferro) / Austria GK Central Zone,Transverse Mercator,metre,4805,Militar-Geographische Institut (Ferro),Bessel 1841,0,0,-5000000,31,1,,,,,,,,,,,,,,,,
-31253,MGI (Ferro) / Austria GK East Zone,Transverse Mercator,metre,4805,Militar-Geographische Institut (Ferro),Bessel 1841,0,0,-5000000,34,1,,,,,,,,,,,,,,,,
-31254,MGI / Austria GK West,Transverse Mercator,metre,4312,Militar-Geographische Institut,Bessel 1841,0,0,-5000000,10.2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31255,MGI / Austria GK Central,Transverse Mercator,metre,4312,Militar-Geographische Institut,Bessel 1841,0,0,-5000000,13.2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31256,MGI / Austria GK East,Transverse Mercator,metre,4312,Militar-Geographische Institut,Bessel 1841,0,0,-5000000,16.2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31257,MGI / Austria GK M28,Transverse Mercator,metre,4312,Militar-Geographische Institut,Bessel 1841,150000,0,-5000000,10.2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31258,MGI / Austria GK M31,Transverse Mercator,metre,4312,Militar-Geographische Institut,Bessel 1841,450000,0,-5000000,13.2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31259,MGI / Austria GK M34,Transverse Mercator,metre,4312,Militar-Geographische Institut,Bessel 1841,750000,0,-5000000,16.2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31281,MGI (Ferro) / Austria West Zone,Transverse Mercator,metre,4805,Militar-Geographische Institut (Ferro),Bessel 1841,0,0,0,28,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31282,MGI (Ferro) / Austria Central Zone,Transverse Mercator,metre,4805,Militar-Geographische Institut (Ferro),Bessel 1841,0,0,0,31,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31283,MGI (Ferro) / Austria East Zone,Transverse Mercator,metre,4805,Militar-Geographische Institut (Ferro),Bessel 1841,0,0,0,34,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31284,MGI / Austria M28,Transverse Mercator,metre,4312,Militar-Geographische Institut,Bessel 1841,150000,0,0,10.2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31285,MGI / Austria M31,Transverse Mercator,metre,4312,Militar-Geographische Institut,Bessel 1841,450000,0,0,13.2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31286,MGI / Austria M34,Transverse Mercator,metre,4312,Militar-Geographische Institut,Bessel 1841,750000,0,0,16.2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31287,MGI / Austria Lambert,Lambert Conic Conformal (2SP),metre,4312,Militar-Geographische Institut,Bessel 1841,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,47.3,13.2,49,400000,400000
-31288,MGI (Ferro) / M28,Transverse Mercator,metre,4805,Militar-Geographische Institut (Ferro),Bessel 1841,150000,0,0,28,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31289,MGI (Ferro) / M31,Transverse Mercator,metre,4805,Militar-Geographische Institut (Ferro),Bessel 1841,450000,0,0,31,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31290,MGI (Ferro) / M34,Transverse Mercator,metre,4805,Militar-Geographische Institut (Ferro),Bessel 1841,750000,0,0,34,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31300,Belge 1972 / Belge Lambert 72,Lambert Conic Conformal (2SP Belgium),metre,4313,Reseau National Belge 1972,International 1924,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51.1,90,4.2124983,49.5,5400088.438,150000.0126
-31370,Belge 1972 / Belgian Lambert 72,Lambert Conic Conformal (2SP),metre,4313,Reseau National Belge 1972,International 1924,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49.5000002,90,4.2202952,51.1000002,5400088.438,150000.013
-31466,DHDN / 3-degree Gauss-Kruger zone 2,Transverse Mercator,metre,4314,Deutsches Hauptdreiecksnetz,Bessel 1841,2500000,0,0,6,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31467,DHDN / 3-degree Gauss-Kruger zone 3,Transverse Mercator,metre,4314,Deutsches Hauptdreiecksnetz,Bessel 1841,3500000,0,0,9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31468,DHDN / 3-degree Gauss-Kruger zone 4,Transverse Mercator,metre,4314,Deutsches Hauptdreiecksnetz,Bessel 1841,4500000,0,0,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31469,DHDN / 3-degree Gauss-Kruger zone 5,Transverse Mercator,metre,4314,Deutsches Hauptdreiecksnetz,Bessel 1841,5500000,0,0,15,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31528,Conakry 1905 / UTM zone 28N,Transverse Mercator,metre,4315,Conakry 1905,Clarke 1880 (IGN),500000,0,0,-15,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31529,Conakry 1905 / UTM zone 29N,Transverse Mercator,metre,4315,Conakry 1905,Clarke 1880 (IGN),500000,0,0,-9,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31600,Dealul Piscului 1930 / Stereo 33,Oblique Stereographic,metre,4316,Dealul Piscului 1930,International 1924,500000,45.54,500000,25.23328772,0.9996667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31838,NGN / UTM zone 38N,Transverse Mercator,metre,4318,National Geodetic Network,WGS 84,500000,0,0,45,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31839,NGN / UTM zone 39N,Transverse Mercator,metre,4318,National Geodetic Network,WGS 84,500000,0,0,51,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31901,KUDAMS / KTM,Transverse Mercator,metre,4319,Kuwait Utility,GRS 1980,500000,0,0,48,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31965,SIRGAS 2000 / UTM zone 11N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-117,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-31966,SIRGAS 2000 / UTM zone 12N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-111,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-31967,SIRGAS 2000 / UTM zone 13N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-105,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-31968,SIRGAS 2000 / UTM zone 14N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-99,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-31969,SIRGAS 2000 / UTM zone 15N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-93,0.9996,,,,,,,,,,,,,,,
-31970,SIRGAS 2000 / UTM zone 16N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-87,0.9996,,,,,,,,,,,,,,,
-31971,SIRGAS 2000 / UTM zone 17N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-81,0.9996,,,,,,,,,,,,,,,
-31972,SIRGAS 2000 / UTM zone 18N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-75,0.9996,,,,,,,,,,,,,,,
-31973,SIRGAS 2000 / UTM zone 19N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-69,0.9996,,,,,,,,,,,,,,,
-31974,SIRGAS 2000 / UTM zone 20N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-63,0.9996,,,,,,,,,,,,,,,
-31975,SIRGAS 2000 / UTM zone 21N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-57,0.9996,,,,,,,,,,,,,,,
-31976,SIRGAS 2000 / UTM zone 22N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,0,-51,0.9996,,,,,,,,,,,,,,,
-31977,SIRGAS 2000 / UTM zone 17S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,10000000,-81,0.9996,,,,,,,,,,,,,,,
-31978,SIRGAS 2000 / UTM zone 18S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,10000000,-75,0.9996,,,,,,,,,,,,,,,
-31979,SIRGAS 2000 / UTM zone 19S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,10000000,-69,0.9996,,,,,,,,,,,,,,,
-31980,SIRGAS 2000 / UTM zone 20S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,10000000,-63,0.9996,,,,,,,,,,,,,,,
-31981,SIRGAS 2000 / UTM zone 21S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,10000000,-57,0.9996,,,,,,,,,,,,,,,
-31982,SIRGAS 2000 / UTM zone 22S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,10000000,-51,0.9996
-31983,SIRGAS 2000 / UTM zone 23S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,10000000,-45,0.9996
-31984,SIRGAS 2000 / UTM zone 24S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,10000000,-39,0.9996
-31985,SIRGAS 2000 / UTM zone 25S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 2000,GRS 1980,500000,0,10000000,-33,0.9996
-31986,SIRGAS 1995 / UTM zone 17N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,0,-81,0.9996
-31987,SIRGAS 1995 / UTM zone 18N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,0,-75,0.9996
-31988,SIRGAS 1995 / UTM zone 19N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,0,-69,0.9996
-31989,SIRGAS 1995 / UTM zone 20N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,0,-63,0.9996
-31990,SIRGAS 1995 / UTM zone 21N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,0,-57,0.9996
-31991,SIRGAS 1995 / UTM zone 22N,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,0,-51,0.9996
-31992,SIRGAS 1995 / UTM zone 17S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,10000000,-81,0.9996
-31993,SIRGAS 1995 / UTM zone 18S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,10000000,-75,0.9996
-31994,SIRGAS 1995 / UTM zone 19S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,10000000,-69,0.9996
-31995,SIRGAS 1995 / UTM zone 20S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,10000000,-63,0.9996
-31996,SIRGAS 1995 / UTM zone 21S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,10000000,-57,0.9996
-31997,SIRGAS 1995 / UTM zone 22S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,10000000,-51,0.9996
-31998,SIRGAS 1995 / UTM zone 23S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,10000000,-45,0.9996,,,,,,,,,,,,,,,,
-31999,SIRGAS 1995 / UTM zone 24S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,10000000,-39,0.9996,,,,,,,,,,,,,,,,
-32000,SIRGAS 1995 / UTM zone 25S,Transverse Mercator,metre,4170,Sistema de Referencia Geocentrico para America del Sur 1995,GRS 1980,500000,0,10000000,-33,0.9996,,,,,,,,,,,,,,,,
-32001,NAD27 / Montana North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.51,47,-109.3,48.43,0,2000000
-32002,NAD27 / Montana Central,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46.27,45.5,-109.3,47.53,0,2000000
-32003,NAD27 / Montana South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.52,44,-109.3,46.24,0,2000000
-32005,NAD27 / Nebraska North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.49,41.2,-100,41.51,0,2000000
-32006,NAD27 / Nebraska South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.43,39.4,-99.3,40.17,0,2000000
-32007,NAD27 / Nevada East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,34.45,0,-115.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32008,NAD27 / Nevada Central,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,34.45,0,-116.4,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32009,NAD27 / Nevada West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,34.45,0,-118.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32010,NAD27 / New Hampshire,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,42.3,0,-71.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32011,NAD27 / New Jersey,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,2000000,38.5,0,-74.4,0.999975,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32012,NAD27 / New Mexico East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,31,0,-104.2,0.999909091,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32013,NAD27 / New Mexico Central,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,31,0,-106.15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32014,NAD27 / New Mexico West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,31,0,-107.5,0.999916667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32015,NAD27 / New York East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,40,0,-74.2,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32016,NAD27 / New York Central,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,40,0,-76.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32017,NAD27 / New York West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,40,0,-78.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32019,NAD27 / North Carolina,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.1,33.45,-79,34.2,0,2000000
-32020,NAD27 / North Dakota North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48.44,47,-100.3,47.26,0,2000000
-32021,NAD27 / North Dakota South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.29,45.4,-100.3,46.11,0,2000000
-32022,NAD27 / Ohio North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.42,39.4,-82.3,40.26,0,2000000
-32023,NAD27 / Ohio South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.02,38,-82.3,38.44,0,2000000
-32024,NAD27 / Oklahoma North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.46,35,-98,35.34,0,2000000
-32025,NAD27 / Oklahoma South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.14,33.2,-98,33.56,0,2000000
-32026,NAD27 / Oregon North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,43.4,-120.3,44.2,0,2000000
-32027,NAD27 / Oregon South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,41.4,-120.3,42.2,0,2000000
-32028,NAD27 / Pennsylvania North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.57,40.1,-77.45,40.53,0,2000000
-32030,NAD27 / Rhode Island,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,41.05,0,-71.3,0.9999938,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32031,NAD27 / South Carolina North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.58,33,-81,33.46,0,2000000
-32033,NAD27 / South Carolina South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.4,31.5,-81,32.2,0,2000000
-32034,NAD27 / South Dakota North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.41,43.5,-100,44.25,0,2000000
-32035,NAD27 / South Dakota South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.24,42.2,-100.2,42.5,0,2000000
-32037,NAD27 / Texas North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.11,34,-101.3,34.39,0,2000000
-32038,NAD27 / Texas North Central,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.58,31.4,-97.3,32.08,0,2000000
-32039,NAD27 / Texas Central,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31.53,29.4,-100.2,30.07,0,2000000
-32040,NAD27 / Texas South Central,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30.17,27.5,-99,28.23,0,2000000
-32041,NAD27 / Texas South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27.5,25.4,-98.3,26.1,0,2000000
-32042,NAD27 / Utah North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41.47,40.2,-111.3,40.43,0,2000000
-32043,NAD27 / Utah Central,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.39,38.2,-111.3,39.01,0,2000000
-32044,NAD27 / Utah South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.21,36.4,-111.3,37.13,0,2000000
-32045,NAD27 / Vermont,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,42.3,0,-72.3,0.999964286,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32046,NAD27 / Virginia North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.12,37.4,-78.3,38.02,0,2000000
-32047,NAD27 / Virginia South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.58,36.2,-78.3,36.46,0,2000000
-32048,NAD27 / Washington North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48.44,47,-120.5,47.3,0,2000000
-32049,NAD27 / Washington South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.2,45.2,-120.3,45.5,0,2000000
-32050,NAD27 / West Virginia North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.15,38.3,-79.3,39,0,2000000
-32051,NAD27 / West Virginia South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.53,37,-81,37.29,0,2000000
-32052,NAD27 / Wisconsin North,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46.46,45.1,-90,45.34,0,2000000
-32053,NAD27 / Wisconsin Central,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.3,43.5,-90,44.15,0,2000000
-32054,NAD27 / Wisconsin South,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.04,42,-90,42.44,0,2000000
-32055,NAD27 / Wyoming East,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,40.4,0,-105.1,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32056,NAD27 / Wyoming East Central,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,40.4,0,-107.2,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32057,NAD27 / Wyoming West Central,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,40.4,0,-108.45,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32058,NAD27 / Wyoming West,Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,500000,40.4,0,-110.05,0.999941177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32061,NAD27 / Guatemala Norte,Lambert Conic Conformal (1SP),metre,4267,North American Datum 1927,Clarke 1866,500000,16.49,292209.579,-90.2,0.99992226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32062,NAD27 / Guatemala Sur,Lambert Conic Conformal (1SP),metre,4267,North American Datum 1927,Clarke 1866,500000,14.54,325992.681,-90.2,0.99989906,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32064,NAD27 / BLM 14N (ftUS),Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,1640416.67,0,0,-99,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32065,NAD27 / BLM 15N (ftUS),Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,1640416.67,0,0,-93,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32066,NAD27 / BLM 16N (ftUS),Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,1640416.67,0,0,-87,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32067,NAD27 / BLM 17N (ftUS),Transverse Mercator,US survey foot,4267,North American Datum 1927,Clarke 1866,1640416.67,0,0,-81,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32081,NAD27 / MTM zone 1,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,304800,0,0,-53,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32082,NAD27 / MTM zone 2,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,304800,0,0,-56,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32083,NAD27 / MTM zone 3,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,304800,0,0,-58.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32084,NAD27 / MTM zone 4,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,304800,0,0,-61.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32085,NAD27 / MTM zone 5,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,304800,0,0,-64.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32086,NAD27 / MTM zone 6,Transverse Mercator,metre,4267,North American Datum 1927,Clarke 1866,304800,0,0,-67.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32098,NAD27 / Quebec Lambert,Lambert Conic Conformal (2SP),metre,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,44,-68.3,60,0,0
-32099,NAD27 / Louisiana Offshore,Lambert Conic Conformal (2SP),US survey foot,4267,North American Datum 1927,Clarke 1866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26.1,25.4,-91.2,27.5,0,2000000
-32100,NAD83 / Montana,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,44.15,-109.3,49,0,600000
-32104,NAD83 / Nebraska,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,39.5,-100,43,0,500000
-32107,NAD83 / Nevada East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,200000,34.45,8000000,-115.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32108,NAD83 / Nevada Central,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,34.45,6000000,-116.4,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32109,NAD83 / Nevada West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,800000,34.45,4000000,-118.35,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32110,NAD83 / New Hampshire,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,300000,42.3,0,-71.4,0.999966667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32111,NAD83 / New Jersey,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,150000,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32112,NAD83 / New Mexico East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,165000,31,0,-104.2,0.999909091,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32113,NAD83 / New Mexico Central,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,31,0,-106.15,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32114,NAD83 / New Mexico West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,830000,31,0,-107.5,0.999916667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32115,NAD83 / New York East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,150000,38.5,0,-74.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32116,NAD83 / New York Central,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,250000,40,0,-76.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32117,NAD83 / New York West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,350000,40,0,-78.35,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32118,NAD83 / New York Long Island,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.4,40.1,-74,41.02,0,300000
-32119,NAD83 / North Carolina,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.2,33.45,-79,36.1,0,609601.22
-32120,NAD83 / North Dakota North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.26,47,-100.3,48.44,0,600000
-32121,NAD83 / North Dakota South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46.11,45.4,-100.3,47.29,0,600000
-32122,NAD83 / Ohio North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.26,39.4,-82.3,41.42,0,600000
-32123,NAD83 / Ohio South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.44,38,-82.3,40.02,0,600000
-32124,NAD83 / Oklahoma North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.34,35,-98,36.46,0,600000
-32125,NAD83 / Oklahoma South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33.56,33.2,-98,35.14,0,600000
-32126,NAD83 / Oregon North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.2,43.4,-120.3,46,0,2500000
-32127,NAD83 / Oregon South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.2,41.4,-120.3,44,0,1500000
-32128,NAD83 / Pennsylvania North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.53,40.1,-77.45,41.57,0,600000
-32129,NAD83 / Pennsylvania South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.56,39.2,-77.45,40.58,0,600000
-32130,NAD83 / Rhode Island,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,100000,41.05,0,-71.3,0.99999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32133,NAD83 / South Carolina,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.3,31.5,-81,34.5,0,609600
-32134,NAD83 / South Dakota North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.25,43.5,-100,45.41,0,600000
-32135,NAD83 / South Dakota South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.5,42.2,-100.2,44.24,0,600000
-32136,NAD83 / Tennessee,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35.15,34.2,-86,36.25,0,600000
-32137,NAD83 / Texas North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34.39,34,-101.3,36.11,1000000,200000
-32138,NAD83 / Texas North Central,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32.08,31.4,-98.3,33.58,2000000,600000
-32139,NAD83 / Texas Central,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30.07,29.4,-100.2,31.53,3000000,700000
-32140,NAD83 / Texas South Central,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28.23,27.5,-99,30.17,4000000,600000
-32141,NAD83 / Texas South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26.1,25.4,-98.3,27.5,5000000,300000
-32142,NAD83 / Utah North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40.43,40.2,-111.3,41.47,1000000,500000
-32143,NAD83 / Utah Central,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39.01,38.2,-111.3,40.39,2000000,500000
-32144,NAD83 / Utah South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.13,36.4,-111.3,38.21,3000000,500000
-32145,NAD83 / Vermont,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,500000,42.3,0,-72.3,0.999964286,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32146,NAD83 / Virginia North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38.02,37.4,-78.3,39.12,2000000,3500000
-32147,NAD83 / Virginia South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36.46,36.2,-78.3,37.58,1000000,3500000
-32148,NAD83 / Washington North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47.3,47,-120.5,48.44,0,500000
-32149,NAD83 / Washington South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.5,45.2,-120.3,47.2,0,500000
-32150,NAD83 / West Virginia North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39,38.3,-79.3,40.15,0,600000
-32151,NAD83 / West Virginia South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37.29,37,-81,38.53,0,600000
-32152,NAD83 / Wisconsin North,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45.34,45.1,-90,46.46,0,600000
-32153,NAD83 / Wisconsin Central,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44.15,43.5,-90,45.3,0,600000
-32154,NAD83 / Wisconsin South,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42.44,42,-90,44.04,0,600000
-32155,NAD83 / Wyoming East,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,200000,40.3,0,-105.1,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32156,NAD83 / Wyoming East Central,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,400000,40.3,100000,-107.2,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32157,NAD83 / Wyoming West Central,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,600000,40.3,0,-108.45,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32158,NAD83 / Wyoming West,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,800000,40.3,100000,-110.05,0.9999375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32161,NAD83 / Puerto Rico & Virgin Is.,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18.02,17.5,-66.26,18.26,200000,200000
-32164,NAD83 / BLM 14N (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1640416.67,0,0,-99,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32165,NAD83 / BLM 15N (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1640416.67,0,0,-93,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32166,NAD83 / BLM 16N (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1640416.67,0,0,-87,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32167,NAD83 / BLM 17N (ftUS),Transverse Mercator,US survey foot,4269,North American Datum 1983,GRS 1980,1640416.67,0,0,-81,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32180,NAD83 / SCoPQ zone 2,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-55.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32181,NAD83 / MTM zone 1,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-53,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32182,NAD83 / MTM zone 2,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-56,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32183,NAD83 / MTM zone 3,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-58.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32184,NAD83 / MTM zone 4,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-61.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32185,NAD83 / MTM zone 5,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-64.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32186,NAD83 / MTM zone 6,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-67.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32187,NAD83 / MTM zone 7,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-70.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32188,NAD83 / MTM zone 8,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-73.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32189,NAD83 / MTM zone 9,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-76.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32190,NAD83 / MTM zone 10,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-79.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32191,NAD83 / MTM zone 11,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-82.3,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32192,NAD83 / MTM zone 12,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-81,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32193,NAD83 / MTM zone 13,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-84,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32194,NAD83 / MTM zone 14,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-87,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32195,NAD83 / MTM zone 15,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-90,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32196,NAD83 / MTM zone 16,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-93,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32197,NAD83 / MTM zone 17,Transverse Mercator,metre,4269,North American Datum 1983,GRS 1980,304800,0,0,-96,0.9999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32198,NAD83 / Quebec Lambert,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,44,-68.3,60,0,0
-32199,NAD83 / Louisiana Offshore,Lambert Conic Conformal (2SP),metre,4269,North American Datum 1983,GRS 1980,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26.1,25.3,-91.2,27.5,0,1000000
-32201,WGS 72 / UTM zone 1N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-177,0.9996,,,,,,,,,,,,,,,,
-32202,WGS 72 / UTM zone 2N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-171,0.9996,,,,,,,,,,,,,,,,
-32203,WGS 72 / UTM zone 3N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-165,0.9996,,,,,,,,,,,,,,,,
-32204,WGS 72 / UTM zone 4N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-159,0.9996,,,,,,,,,,,,,,,,
-32205,WGS 72 / UTM zone 5N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-153,0.9996,,,,,,,,,,,,,,,,
-32206,WGS 72 / UTM zone 6N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-147,0.9996,,,,,,,,,,,,,,,,
-32207,WGS 72 / UTM zone 7N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-141,0.9996,,,,,,,,,,,,,,,,
-32208,WGS 72 / UTM zone 8N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-135,0.9996,,,,,,,,,,,,,,,,
-32209,WGS 72 / UTM zone 9N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-129,0.9996,,,,,,,,,,,,,,,,
-32210,WGS 72 / UTM zone 10N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-123,0.9996,,,,,,,,,,,,,,,,
-32211,WGS 72 / UTM zone 11N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-117,0.9996,,,,,,,,,,,,,,,,
-32212,WGS 72 / UTM zone 12N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-111,0.9996,,,,,,,,,,,,,,,,
-32213,WGS 72 / UTM zone 13N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-105,0.9996,,,,,,,,,,,,,,,,
-32214,WGS 72 / UTM zone 14N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-99,0.9996
-32215,WGS 72 / UTM zone 15N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-93,0.9996
-32216,WGS 72 / UTM zone 16N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-87,0.9996
-32217,WGS 72 / UTM zone 17N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-81,0.9996
-32218,WGS 72 / UTM zone 18N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-75,0.9996
-32219,WGS 72 / UTM zone 19N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-69,0.9996
-32220,WGS 72 / UTM zone 20N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-63,0.9996
-32221,WGS 72 / UTM zone 21N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-57,0.9996
-32222,WGS 72 / UTM zone 22N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-51,0.9996
-32223,WGS 72 / UTM zone 23N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-45,0.9996
-32224,WGS 72 / UTM zone 24N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-39,0.9996
-32225,WGS 72 / UTM zone 25N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-33,0.9996
-32226,WGS 72 / UTM zone 26N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-27,0.9996
-32227,WGS 72 / UTM zone 27N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-21,0.9996
-32228,WGS 72 / UTM zone 28N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-15,0.9996
-32229,WGS 72 / UTM zone 29N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-9,0.9996
-32230,WGS 72 / UTM zone 30N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,-3,0.9996
-32231,WGS 72 / UTM zone 31N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,3,0.9996
-32232,WGS 72 / UTM zone 32N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,9,0.9996
-32233,WGS 72 / UTM zone 33N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,15,0.9996
-32234,WGS 72 / UTM zone 34N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,21,0.9996
-32235,WGS 72 / UTM zone 35N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,27,0.9996
-32236,WGS 72 / UTM zone 36N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,33,0.9996
-32237,WGS 72 / UTM zone 37N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,39,0.9996
-32238,WGS 72 / UTM zone 38N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,45,0.9996
-32239,WGS 72 / UTM zone 39N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,51,0.9996
-32240,WGS 72 / UTM zone 40N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,57,0.9996
-32241,WGS 72 / UTM zone 41N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,63,0.9996
-32242,WGS 72 / UTM zone 42N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,69,0.9996
-32243,WGS 72 / UTM zone 43N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,75,0.9996
-32244,WGS 72 / UTM zone 44N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,81,0.9996
-32245,WGS 72 / UTM zone 45N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,87,0.9996
-32246,WGS 72 / UTM zone 46N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,93,0.9996
-32247,WGS 72 / UTM zone 47N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,99,0.9996
-32248,WGS 72 / UTM zone 48N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,105,0.9996
-32249,WGS 72 / UTM zone 49N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,111,0.9996
-32250,WGS 72 / UTM zone 50N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,117,0.9996
-32251,WGS 72 / UTM zone 51N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,123,0.9996
-32252,WGS 72 / UTM zone 52N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,129,0.9996
-32253,WGS 72 / UTM zone 53N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,135,0.9996
-32254,WGS 72 / UTM zone 54N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,141,0.9996
-32255,WGS 72 / UTM zone 55N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,147,0.9996
-32256,WGS 72 / UTM zone 56N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,153,0.9996
-32257,WGS 72 / UTM zone 57N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,159,0.9996
-32258,WGS 72 / UTM zone 58N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,165,0.9996
-32259,WGS 72 / UTM zone 59N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,171,0.9996
-32260,WGS 72 / UTM zone 60N,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,0,177,0.9996
-32301,WGS 72 / UTM zone 1S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-177,0.9996
-32302,WGS 72 / UTM zone 2S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-171,0.9996
-32303,WGS 72 / UTM zone 3S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-165,0.9996
-32304,WGS 72 / UTM zone 4S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-159,0.9996
-32305,WGS 72 / UTM zone 5S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-153,0.9996
-32306,WGS 72 / UTM zone 6S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-147,0.9996
-32307,WGS 72 / UTM zone 7S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-141,0.9996
-32308,WGS 72 / UTM zone 8S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-135,0.9996
-32309,WGS 72 / UTM zone 9S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-129,0.9996
-32310,WGS 72 / UTM zone 10S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-123,0.9996
-32311,WGS 72 / UTM zone 11S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-117,0.9996
-32312,WGS 72 / UTM zone 12S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-111,0.9996
-32313,WGS 72 / UTM zone 13S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-105,0.9996
-32314,WGS 72 / UTM zone 14S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-99,0.9996
-32315,WGS 72 / UTM zone 15S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-93,0.9996
-32316,WGS 72 / UTM zone 16S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-87,0.9996
-32317,WGS 72 / UTM zone 17S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-81,0.9996
-32318,WGS 72 / UTM zone 18S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-75,0.9996
-32319,WGS 72 / UTM zone 19S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-69,0.9996
-32320,WGS 72 / UTM zone 20S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-63,0.9996
-32321,WGS 72 / UTM zone 21S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-57,0.9996
-32322,WGS 72 / UTM zone 22S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-51,0.9996
-32323,WGS 72 / UTM zone 23S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-45,0.9996
-32324,WGS 72 / UTM zone 24S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-39,0.9996
-32325,WGS 72 / UTM zone 25S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-33,0.9996
-32326,WGS 72 / UTM zone 26S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-27,0.9996
-32327,WGS 72 / UTM zone 27S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-21,0.9996
-32328,WGS 72 / UTM zone 28S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-15,0.9996
-32329,WGS 72 / UTM zone 29S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-9,0.9996
-32330,WGS 72 / UTM zone 30S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,-3,0.9996
-32331,WGS 72 / UTM zone 31S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,3,0.9996
-32332,WGS 72 / UTM zone 32S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,9,0.9996
-32333,WGS 72 / UTM zone 33S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,15,0.9996
-32334,WGS 72 / UTM zone 34S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,21,0.9996
-32335,WGS 72 / UTM zone 35S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,27,0.9996
-32336,WGS 72 / UTM zone 36S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,33,0.9996
-32337,WGS 72 / UTM zone 37S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,39,0.9996
-32338,WGS 72 / UTM zone 38S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,45,0.9996
-32339,WGS 72 / UTM zone 39S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,51,0.9996
-32340,WGS 72 / UTM zone 40S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,57,0.9996
-32341,WGS 72 / UTM zone 41S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,63,0.9996
-32342,WGS 72 / UTM zone 42S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,69,0.9996
-32343,WGS 72 / UTM zone 43S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,75,0.9996
-32344,WGS 72 / UTM zone 44S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,81,0.9996
-32345,WGS 72 / UTM zone 45S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,87,0.9996
-32346,WGS 72 / UTM zone 46S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,93,0.9996
-32347,WGS 72 / UTM zone 47S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,99,0.9996
-32348,WGS 72 / UTM zone 48S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,105,0.9996
-32349,WGS 72 / UTM zone 49S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,111,0.9996
-32350,WGS 72 / UTM zone 50S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,117,0.9996
-32351,WGS 72 / UTM zone 51S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,123,0.9996
-32352,WGS 72 / UTM zone 52S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,129,0.9996
-32353,WGS 72 / UTM zone 53S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,135,0.9996
-32354,WGS 72 / UTM zone 54S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,141,0.9996
-32355,WGS 72 / UTM zone 55S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,147,0.9996
-32356,WGS 72 / UTM zone 56S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,153,0.9996
-32357,WGS 72 / UTM zone 57S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,159,0.9996
-32358,WGS 72 / UTM zone 58S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,165,0.9996
-32359,WGS 72 / UTM zone 59S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,171,0.9996
-32360,WGS 72 / UTM zone 60S,Transverse Mercator,metre,4322,World Geodetic System 1972,WGS 72,500000,0,10000000,177,0.9996
-32401,WGS 72BE / UTM zone 1N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-177,0.9996
-32402,WGS 72BE / UTM zone 2N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-171,0.9996
-32403,WGS 72BE / UTM zone 3N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-165,0.9996
-32404,WGS 72BE / UTM zone 4N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-159,0.9996
-32405,WGS 72BE / UTM zone 5N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-153,0.9996
-32406,WGS 72BE / UTM zone 6N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-147,0.9996
-32407,WGS 72BE / UTM zone 7N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-141,0.9996
-32408,WGS 72BE / UTM zone 8N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-135,0.9996
-32409,WGS 72BE / UTM zone 9N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-129,0.9996
-32410,WGS 72BE / UTM zone 10N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-123,0.9996
-32411,WGS 72BE / UTM zone 11N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-117,0.9996
-32412,WGS 72BE / UTM zone 12N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-111,0.9996
-32413,WGS 72BE / UTM zone 13N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-105,0.9996
-32414,WGS 72BE / UTM zone 14N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-99,0.9996
-32415,WGS 72BE / UTM zone 15N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-93,0.9996
-32416,WGS 72BE / UTM zone 16N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-87,0.9996
-32417,WGS 72BE / UTM zone 17N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-81,0.9996
-32418,WGS 72BE / UTM zone 18N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-75,0.9996
-32419,WGS 72BE / UTM zone 19N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-69,0.9996
-32420,WGS 72BE / UTM zone 20N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-63,0.9996
-32421,WGS 72BE / UTM zone 21N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-57,0.9996
-32422,WGS 72BE / UTM zone 22N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-51,0.9996
-32423,WGS 72BE / UTM zone 23N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-45,0.9996
-32424,WGS 72BE / UTM zone 24N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-39,0.9996
-32425,WGS 72BE / UTM zone 25N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-33,0.9996
-32426,WGS 72BE / UTM zone 26N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-27,0.9996
-32427,WGS 72BE / UTM zone 27N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-21,0.9996
-32428,WGS 72BE / UTM zone 28N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-15,0.9996
-32429,WGS 72BE / UTM zone 29N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-9,0.9996
-32430,WGS 72BE / UTM zone 30N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,-3,0.9996
-32431,WGS 72BE / UTM zone 31N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,3,0.9996
-32432,WGS 72BE / UTM zone 32N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,9,0.9996
-32433,WGS 72BE / UTM zone 33N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,15,0.9996
-32434,WGS 72BE / UTM zone 34N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,21,0.9996
-32435,WGS 72BE / UTM zone 35N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,27,0.9996
-32436,WGS 72BE / UTM zone 36N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,33,0.9996
-32437,WGS 72BE / UTM zone 37N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,39,0.9996
-32438,WGS 72BE / UTM zone 38N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,45,0.9996
-32439,WGS 72BE / UTM zone 39N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,51,0.9996
-32440,WGS 72BE / UTM zone 40N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,57,0.9996
-32441,WGS 72BE / UTM zone 41N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,63,0.9996
-32442,WGS 72BE / UTM zone 42N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,69,0.9996
-32443,WGS 72BE / UTM zone 43N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,75,0.9996
-32444,WGS 72BE / UTM zone 44N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,81,0.9996
-32445,WGS 72BE / UTM zone 45N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,87,0.9996
-32446,WGS 72BE / UTM zone 46N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,93,0.9996
-32447,WGS 72BE / UTM zone 47N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,99,0.9996
-32448,WGS 72BE / UTM zone 48N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,105,0.9996
-32449,WGS 72BE / UTM zone 49N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,111,0.9996
-32450,WGS 72BE / UTM zone 50N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,117,0.9996
-32451,WGS 72BE / UTM zone 51N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,123,0.9996
-32452,WGS 72BE / UTM zone 52N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,129,0.9996
-32453,WGS 72BE / UTM zone 53N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,135,0.9996
-32454,WGS 72BE / UTM zone 54N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,141,0.9996
-32455,WGS 72BE / UTM zone 55N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,147,0.9996
-32456,WGS 72BE / UTM zone 56N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,153,0.9996
-32457,WGS 72BE / UTM zone 57N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,159,0.9996
-32458,WGS 72BE / UTM zone 58N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,165,0.9996
-32459,WGS 72BE / UTM zone 59N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,171,0.9996
-32460,WGS 72BE / UTM zone 60N,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,0,177,0.9996
-32501,WGS 72BE / UTM zone 1S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-177,0.9996
-32502,WGS 72BE / UTM zone 2S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-171,0.9996
-32503,WGS 72BE / UTM zone 3S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-165,0.9996
-32504,WGS 72BE / UTM zone 4S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-159,0.9996
-32505,WGS 72BE / UTM zone 5S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-153,0.9996
-32506,WGS 72BE / UTM zone 6S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-147,0.9996
-32507,WGS 72BE / UTM zone 7S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-141,0.9996
-32508,WGS 72BE / UTM zone 8S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-135,0.9996
-32509,WGS 72BE / UTM zone 9S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-129,0.9996
-32510,WGS 72BE / UTM zone 10S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-123,0.9996
-32511,WGS 72BE / UTM zone 11S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-117,0.9996
-32512,WGS 72BE / UTM zone 12S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-111,0.9996
-32513,WGS 72BE / UTM zone 13S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-105,0.9996
-32514,WGS 72BE / UTM zone 14S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-99,0.9996
-32515,WGS 72BE / UTM zone 15S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-93,0.9996
-32516,WGS 72BE / UTM zone 16S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-87,0.9996
-32517,WGS 72BE / UTM zone 17S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-81,0.9996
-32518,WGS 72BE / UTM zone 18S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-75,0.9996
-32519,WGS 72BE / UTM zone 19S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-69,0.9996
-32520,WGS 72BE / UTM zone 20S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-63,0.9996
-32521,WGS 72BE / UTM zone 21S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-57,0.9996
-32522,WGS 72BE / UTM zone 22S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-51,0.9996
-32523,WGS 72BE / UTM zone 23S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-45,0.9996
-32524,WGS 72BE / UTM zone 24S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-39,0.9996
-32525,WGS 72BE / UTM zone 25S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-33,0.9996
-32526,WGS 72BE / UTM zone 26S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-27,0.9996
-32527,WGS 72BE / UTM zone 27S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-21,0.9996
-32528,WGS 72BE / UTM zone 28S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-15,0.9996
-32529,WGS 72BE / UTM zone 29S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-9,0.9996
-32530,WGS 72BE / UTM zone 30S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,-3,0.9996
-32531,WGS 72BE / UTM zone 31S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,3,0.9996
-32532,WGS 72BE / UTM zone 32S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,9,0.9996
-32533,WGS 72BE / UTM zone 33S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,15,0.9996
-32534,WGS 72BE / UTM zone 34S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,21,0.9996
-32535,WGS 72BE / UTM zone 35S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,27,0.9996
-32536,WGS 72BE / UTM zone 36S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,33,0.9996
-32537,WGS 72BE / UTM zone 37S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,39,0.9996
-32538,WGS 72BE / UTM zone 38S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,45,0.9996
-32539,WGS 72BE / UTM zone 39S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,51,0.9996
-32540,WGS 72BE / UTM zone 40S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,57,0.9996
-32541,WGS 72BE / UTM zone 41S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,63,0.9996
-32542,WGS 72BE / UTM zone 42S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,69,0.9996
-32543,WGS 72BE / UTM zone 43S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,75,0.9996
-32544,WGS 72BE / UTM zone 44S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,81,0.9996
-32545,WGS 72BE / UTM zone 45S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,87,0.9996
-32546,WGS 72BE / UTM zone 46S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,93,0.9996
-32547,WGS 72BE / UTM zone 47S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,99,0.9996
-32548,WGS 72BE / UTM zone 48S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,105,0.9996
-32549,WGS 72BE / UTM zone 49S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,111,0.9996
-32550,WGS 72BE / UTM zone 50S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,117,0.9996
-32551,WGS 72BE / UTM zone 51S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,123,0.9996
-32552,WGS 72BE / UTM zone 52S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,129,0.9996
-32553,WGS 72BE / UTM zone 53S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,135,0.9996
-32554,WGS 72BE / UTM zone 54S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,141,0.9996
-32555,WGS 72BE / UTM zone 55S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,147,0.9996
-32556,WGS 72BE / UTM zone 56S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,153,0.9996
-32557,WGS 72BE / UTM zone 57S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,159,0.9996
-32558,WGS 72BE / UTM zone 58S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,165,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,,
-32559,WGS 72BE / UTM zone 59S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,171,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,,
-32560,WGS 72BE / UTM zone 60S,Transverse Mercator,metre,4324,WGS 72 Transit Broadcast Ephemeris,WGS 72,500000,0,10000000,177,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,,
-32600,WGS 84 / UTM grid system (northern hemisphere),Transverse Mercator Zoned Grid System,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,0,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-180,6
-32601,WGS 84 / UTM zone 1N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-177,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32602,WGS 84 / UTM zone 2N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-171,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32603,WGS 84 / UTM zone 3N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-165,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32604,WGS 84 / UTM zone 4N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-159,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32605,WGS 84 / UTM zone 5N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-153,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32606,WGS 84 / UTM zone 6N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-147,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32607,WGS 84 / UTM zone 7N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-141,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32608,WGS 84 / UTM zone 8N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-135,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32609,WGS 84 / UTM zone 9N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-129,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32610,WGS 84 / UTM zone 10N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-123,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32611,WGS 84 / UTM zone 11N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-117,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32612,WGS 84 / UTM zone 12N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-111,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32613,WGS 84 / UTM zone 13N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-105,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32614,WGS 84 / UTM zone 14N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-99,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32615,WGS 84 / UTM zone 15N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-93,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32616,WGS 84 / UTM zone 16N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-87,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32617,WGS 84 / UTM zone 17N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-81,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32618,WGS 84 / UTM zone 18N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-75,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32619,WGS 84 / UTM zone 19N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-69,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32620,WGS 84 / UTM zone 20N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-63,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32621,WGS 84 / UTM zone 21N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-57,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32622,WGS 84 / UTM zone 22N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-51,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32623,WGS 84 / UTM zone 23N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-45,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32624,WGS 84 / UTM zone 24N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-39,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32625,WGS 84 / UTM zone 25N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-33,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32626,WGS 84 / UTM zone 26N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-27,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32627,WGS 84 / UTM zone 27N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-21,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32628,WGS 84 / UTM zone 28N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-15,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32629,WGS 84 / UTM zone 29N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-9,0.9996
-32630,WGS 84 / UTM zone 30N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,-3,0.9996
-32631,WGS 84 / UTM zone 31N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,3,0.9996
-32632,WGS 84 / UTM zone 32N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,9,0.9996
-32633,WGS 84 / UTM zone 33N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,15,0.9996
-32634,WGS 84 / UTM zone 34N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,21,0.9996
-32635,WGS 84 / UTM zone 35N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,27,0.9996
-32636,WGS 84 / UTM zone 36N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,33,0.9996
-32637,WGS 84 / UTM zone 37N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,39,0.9996
-32638,WGS 84 / UTM zone 38N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,45,0.9996
-32639,WGS 84 / UTM zone 39N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,51,0.9996
-32640,WGS 84 / UTM zone 40N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,57,0.9996
-32641,WGS 84 / UTM zone 41N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,63,0.9996
-32642,WGS 84 / UTM zone 42N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,69,0.9996
-32643,WGS 84 / UTM zone 43N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,75,0.9996
-32644,WGS 84 / UTM zone 44N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,81,0.9996
-32645,WGS 84 / UTM zone 45N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,87,0.9996
-32646,WGS 84 / UTM zone 46N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,93,0.9996
-32647,WGS 84 / UTM zone 47N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,99,0.9996
-32648,WGS 84 / UTM zone 48N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,105,0.9996
-32649,WGS 84 / UTM zone 49N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,111,0.9996
-32650,WGS 84 / UTM zone 50N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,117,0.9996
-32651,WGS 84 / UTM zone 51N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,123,0.9996
-32652,WGS 84 / UTM zone 52N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,129,0.9996
-32653,WGS 84 / UTM zone 53N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,135,0.9996
-32654,WGS 84 / UTM zone 54N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,141,0.9996
-32655,WGS 84 / UTM zone 55N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,147,0.9996
-32656,WGS 84 / UTM zone 56N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,153,0.9996
-32657,WGS 84 / UTM zone 57N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,159,0.9996
-32658,WGS 84 / UTM zone 58N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,165,0.9996
-32659,WGS 84 / UTM zone 59N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,171,0.9996
-32660,WGS 84 / UTM zone 60N,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,0,177,0.9996
-32661,WGS 84 / UPS North,Polar Stereographic (variant A),metre,4326,World Geodetic System 1984,WGS 84,2000000,90,2000000,0,0.994,,,,,,,,,,,,,,,,,,,,,,,,,,
-32664,WGS 84 / BLM 14N (ftUS),Transverse Mercator,US survey foot,4326,World Geodetic System 1984,WGS 84,1640416.67,0,0,-99,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,,
-32665,WGS 84 / BLM 15N (ftUS),Transverse Mercator,US survey foot,4326,World Geodetic System 1984,WGS 84,1640416.67,0,0,-93,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,,
-32666,WGS 84 / BLM 16N (ftUS),Transverse Mercator,US survey foot,4326,World Geodetic System 1984,WGS 84,1640416.67,0,0,-87,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32667,WGS 84 / BLM 17N (ftUS),Transverse Mercator,US survey foot,4326,World Geodetic System 1984,WGS 84,1640416.67,0,0,-81,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32700,WGS 84 / UTM grid system (southern hemisphere),Transverse Mercator Zoned Grid System,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,0,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-180,6
-32701,WGS 84 / UTM zone 1S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-177,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32702,WGS 84 / UTM zone 2S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-171,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32703,WGS 84 / UTM zone 3S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-165,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32704,WGS 84 / UTM zone 4S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-159,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32705,WGS 84 / UTM zone 5S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-153,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32706,WGS 84 / UTM zone 6S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-147,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32707,WGS 84 / UTM zone 7S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-141,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32708,WGS 84 / UTM zone 8S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-135,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32709,WGS 84 / UTM zone 9S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-129,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32710,WGS 84 / UTM zone 10S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-123,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-32711,WGS 84 / UTM zone 11S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-117,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32712,WGS 84 / UTM zone 12S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-111,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32713,WGS 84 / UTM zone 13S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-105,0.9996,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-32714,WGS 84 / UTM zone 14S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-99,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32715,WGS 84 / UTM zone 15S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-93,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32716,WGS 84 / UTM zone 16S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-87,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32717,WGS 84 / UTM zone 17S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-81,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32718,WGS 84 / UTM zone 18S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-75,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32719,WGS 84 / UTM zone 19S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-69,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32720,WGS 84 / UTM zone 20S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-63,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32721,WGS 84 / UTM zone 21S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-57,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32722,WGS 84 / UTM zone 22S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-51,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32723,WGS 84 / UTM zone 23S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-45,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32724,WGS 84 / UTM zone 24S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-39,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32725,WGS 84 / UTM zone 25S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-33,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32726,WGS 84 / UTM zone 26S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-27,0.9996,,,,,,,,,,,,,,,,,,,,,,,,,
-32727,WGS 84 / UTM zone 27S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-21,0.9996
-32728,WGS 84 / UTM zone 28S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-15,0.9996
-32729,WGS 84 / UTM zone 29S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-9,0.9996
-32730,WGS 84 / UTM zone 30S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,-3,0.9996
-32731,WGS 84 / UTM zone 31S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,3,0.9996
-32732,WGS 84 / UTM zone 32S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,9,0.9996
-32733,WGS 84 / UTM zone 33S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,15,0.9996
-32734,WGS 84 / UTM zone 34S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,21,0.9996
-32735,WGS 84 / UTM zone 35S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,27,0.9996
-32736,WGS 84 / UTM zone 36S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,33,0.9996
-32737,WGS 84 / UTM zone 37S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,39,0.9996
-32738,WGS 84 / UTM zone 38S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,45,0.9996
-32739,WGS 84 / UTM zone 39S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,51,0.9996
-32740,WGS 84 / UTM zone 40S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,57,0.9996
-32741,WGS 84 / UTM zone 41S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,63,0.9996
-32742,WGS 84 / UTM zone 42S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,69,0.9996
-32743,WGS 84 / UTM zone 43S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,75,0.9996
-32744,WGS 84 / UTM zone 44S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,81,0.9996
-32745,WGS 84 / UTM zone 45S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,87,0.9996
-32746,WGS 84 / UTM zone 46S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,93,0.9996
-32747,WGS 84 / UTM zone 47S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,99,0.9996
-32748,WGS 84 / UTM zone 48S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,105,0.9996
-32749,WGS 84 / UTM zone 49S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,111,0.9996
-32750,WGS 84 / UTM zone 50S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,117,0.9996
-32751,WGS 84 / UTM zone 51S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,123,0.9996
-32752,WGS 84 / UTM zone 52S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,129,0.9996
-32753,WGS 84 / UTM zone 53S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,135,0.9996
-32754,WGS 84 / UTM zone 54S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,141,0.9996
-32755,WGS 84 / UTM zone 55S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,147,0.9996
-32756,WGS 84 / UTM zone 56S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,153,0.9996
-32757,WGS 84 / UTM zone 57S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,159,0.9996
-32758,WGS 84 / UTM zone 58S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,165,0.9996
-32759,WGS 84 / UTM zone 59S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,171,0.9996
-32760,WGS 84 / UTM zone 60S,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,177,0.9996
-32761,WGS 84 / UPS South,Polar Stereographic (variant A),metre,4326,World Geodetic System 1984,WGS 84,2000000,-90,2000000,0,0.994
-32766,WGS 84 / TM 36 SE,Transverse Mercator,metre,4326,World Geodetic System 1984,WGS 84,500000,0,10000000,36,0.9996
diff --git a/share/ossim/ossim_state_plane_readme.txt b/share/ossim/ossim_state_plane_readme.txt
deleted file mode 100644
index e173a0e..0000000
--- a/share/ossim/ossim_state_plane_readme.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-// $Id: ossim_state_plane_readme.txt 2644 2011-05-26 15:20:11Z oscar.kramer $
-
-This is a readme to document the state_plane.csv file keys.
-
-State Plane support can be picked up via ossimPreferences by adding the 
-key "state_plane_csv_file" to your preferences file.  Auto detection from 
-some common place is on the to do list.
-Example preference entry:
-state_plane_csv_file1: /usr/local/share/ossim/ossim_state_plane.csv
-state_plane_csv_file2: /usr/local/share/ossim/ossim_harn_state_plane.csv
-
-
-The state_plane.csv (comma separated value) file is used by the 
-ossimStatePlaneProjectionFactory to create projections from line entries
-contained in the csv file.  Each line entry should represent some Projection
-Coordinate System (PCS) for a given state plane projection.
-
-All values in a line must be comma separated.  It does not matter to our code
-whether or not the values are quoted or not.
-
-Example key line (first line):
-name,pcs_code,projection_code,param1,param2,param3,param4,false_easting,false_northing,linear_units,datum_code
-
-Example line with Lambert Conformal Conic projection (lcc):
-NAD27_Arkansas_North,26751,lcc,34 20 n,92 w,34 56 n,36 14 n,2000000,0,us_survey_feet,NAS-C
-
-Example line with Transverse Mercator Projection (tm):
-NAD27_Alabama_East,26729,tm,30 30 n,85 50 w,25000,0,500000,0,us_survey_feet,NAS-C
-
-Key/value: description
-
-1) name/NAD27_Alabama_East: The long name or human readable.
-
-2) pcs_code/26729:  PCS code for this projection.
-   See:  http://www.remotesensing.org/geotiff/spec/geotiff6.html#6.3.3
-
-3) projection_code/tm: This is the underlying projection of the PCS.  This
-   will either be the abbreviated tm or lcc, or the full ossim projection 
-   class name of ossimTransMercatorProjection or 
-   ossimLambertConformalConicProjection.
-
-4) param1/30 30 n: The origin of latitude.  String format = "dd mm h" where
-   dd = degrees, mm = minutes and h is the hemisphere either n or s.
-   (see note 1)
-
-5) param2/85 50 w,  The central meridian.  String format = "dd mm h" where
-   dd = degrees, mm = minutes and h is the hemisphere either n or s.
-   (see note 1)
-
-6) param3/25000: If Lambert this will be the 1st parallel(seen note 1),
-   If Transverse Mercator (this case) it will be the scale factor in the form
-   of "scale_factor = 1.0 - (1.0 / param3).
-   NOTE: For Transverse Mercator units = meters.
-
-7) param4/0: If Lambert this will be the 2st parallel(seen note 1),
-   If Transverse Mercator (this case) it will be 0.
-
-8) false_easting/500000: The false easting in linear_units which should be 
-   either meters or us_survey_feet.
-
-9) false_northing/0: The false northing in linear_units which should be 
-   either meters or us_survey_feet.
-
-10) linear_units/us_survey_feet: This can be either meters or us_survey_feet.
-
-11) datum_code/NAS-C  The ossim datum code corresponding to the PCS.  
-    Run the ossim application "datums" to see a list of valid codes.
-
-NOTES: 
-
-1) Internally this string is fed to an ossimDms class that is pretty good at interpreting strings representing degrees minutes seconds, but if you stick with the "dd mm h" format you can't go wrong.
-
-2) Key line must be present and have the valid keys or file will not be loaded.
-   This is case sensitive so your keys should be in lower case.
-
diff --git a/specs/gdal.spec b/specs/gdal.spec
deleted file mode 100644
index 0dac406..0000000
--- a/specs/gdal.spec
+++ /dev/null
@@ -1,75 +0,0 @@
-%define pref /usr
-%define ver 1.1.7
-%define ver2 1.1
-%define rel 4
-%define name gdal
-Summary: Gdal
-Name: gdal
-Version: %{ver}
-Release: %{rel}
-Copyright: GPL LGPL
-Group: Applications/Image
-Source: %{name}-%{ver}.tgz
-URL: http://www.remotesensing.org/gdal
-Distribution: na
-Vendor: Remotesensing 
-Packager: Garrett Potts <gpotts at imagelinks.com>
-BuildRoot: %{_tmppath}/%{name}-buildroot
-
-%description
-
-
-%package devel
-Summary: Geotiff libraries
-Group: Development/Libraries
-Requires: geotiff = %{ver}
-
-%description devel
-Headers for Geotiff
-
-%prep
-%setup
-rm -r `find . -name CVS -print`
-
-%build
-./configure \
-    --prefix=%{pref} \
-    --with-ogr
-make
-
-%install
-make \
-  version=%{version} \
-  prefix=$RPM_BUILD_ROOT%{pref} \
-  sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} \
-  docdir=$RPM_BUILD_ROOT%{_defaultdocdir} \
-  install
-
-%post
-/sbin/ldconfig
-
-%postun
-/sbin/ldconfig
-
-%preun devel
-
-%changelog
-
-%files
-%defattr(-,root,root)
-%{_libdir}/lib*.so*
-
-%dir %{_datadir}/gdal
-%{_datadir}/gdal/*
-
-%dir %{_bindir}
-%{_bindir}/*
-
-%files devel
-
-%defattr(-,root,root)
-%dir %{_includedir}
-%{_includedir}/*
-%dir %{_libdir}
-%{_libdir}/*.a
-
diff --git a/specs/geotiff.spec b/specs/geotiff.spec
deleted file mode 100644
index c844d1c..0000000
--- a/specs/geotiff.spec
+++ /dev/null
@@ -1,78 +0,0 @@
-%define pref /usr
-%define ver 1.1.5
-%define ver2 1.1
-%define rel 1
-%define name geotiff
-Summary: Geotiff
-Name: geotiff
-Version: %{ver}
-Release: %{rel}
-Copyright: GPL LGPL
-Group: Applications/Image
-Source: %{name}-%{ver}.tgz
-URL: http://www.remotesensing.org/geotiff/geotiff.html
-Distribution: na
-Vendor: Remotesensing 
-Packager: Garrett Potts <gpotts at imagelinks.com>
-BuildRoot: %{_tmppath}/%{name}-buildroot
-
-%description
-
-
-%package devel
-Summary: Geotiff libraries
-Group: Development/Libraries
-Requires: geotiff = %{ver}
-
-%description devel
-Headers for Geotiff
-
-%prep
-%setup
-rm -r `find . -name CVS -print`
-
-%build
-cd libgeotiff
-./configure \
-    --prefix=%{pref} \
-    --with-libtiff=/usr
-make
-
-%install
-cd libgeotiff
-make \
-  version=%{version} \
-  prefix=$RPM_BUILD_ROOT%{pref} \
-  sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} \
-  docdir=$RPM_BUILD_ROOT%{_defaultdocdir} \
-  install
-
-%post
-/sbin/ldconfig
-
-%postun
-/sbin/ldconfig
-
-%preun devel
-
-%changelog
-
-%files
-%defattr(-,root,root)
-#%doc %{_docdir}/%{name}-%{version}/
-#%config %{_sysconfdir}/%{name}
-%{_libdir}/lib*.so*
-
-%dir %{_bindir}
-%{_bindir}/*
-
-%files devel
-%defattr(-,root,root)
-%dir %{_includedir}
-%{_includedir}/*
-%dir %{_libdir}
-%{_libdir}/*.a
-
-%dir %{_datadir}/epsg_csv
-%{_datadir}/epsg_csv/*
-
diff --git a/specs/ossim-geoid.spec b/specs/ossim-geoid.spec
deleted file mode 100644
index c11c53b..0000000
--- a/specs/ossim-geoid.spec
+++ /dev/null
@@ -1,39 +0,0 @@
-%define pref /usr
-%define ver 1.0.0
-%define ver2 1.0
-%define rel 1
-%define name ossim-geoid
-# Preamble
-Summary: Geoid grid files for ossim
-Name: ossim-geoid
-Version: %{ver}
-Release: %{rel}
-Copyright: Free
-Group: Applications/Image
-Source: %{name}-%{ver}.tgz
-URL: http://www.ossim.org
-Distribution: na
-Vendor: imagelinks.com
-Packager: Garrett Potts <gpotts at remotesensing.org>
-BuildRoot: %{_tmppath}/%{name}-%{ver}-buildroot
-
-%description
-
-%prep
-%setup
-
-%build
-
-%install
-install -d $RPM_BUILD_ROOT%{pref}/share/ossim/geoid_data
-install -m 644 *.bin $RPM_BUILD_ROOT%{pref}/share/ossim/geoid_data
-install -m 644 *.grd $RPM_BUILD_ROOT%{pref}/share/ossim/geoid_data
-install -m 644 *.txt $RPM_BUILD_ROOT%{pref}/share/ossim/geoid_data
-
-%post
-
-%postun
-
-%files
-%defattr(-,root,root)
-%{pref}/share/ossim/geoid_data
diff --git a/src/.cvsignore b/src/.cvsignore
deleted file mode 100644
index 192e7be..0000000
--- a/src/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-ossimConfig.h
-
diff --git a/src/apps/.cvsignore b/src/apps/.cvsignore
deleted file mode 100644
index 9f2e6ea..0000000
--- a/src/apps/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-ossim-config
-ossim-config-inst
diff --git a/src/apps/makefile.inc b/src/apps/makefile.inc
deleted file mode 100644
index ec963a6..0000000
--- a/src/apps/makefile.inc
+++ /dev/null
@@ -1,42 +0,0 @@
-###
-# $Id: makefile.vc 7049 2004-12-03 14:45:36Z dburken $
-#
-#  Include file for making windows executables using nmake.
-###
-
-OSSIM_ROOT	= ..\..\..
-BIN_DIR     	= $(OSSIM_ROOT)\bin
-
-!INCLUDE $(OSSIM_ROOT)\nmake.opt
-
-###
-# Note: EMBED_MANIFEST variable is set in nmake.opt so make sure it is included
-# before this test.
-###
-!if "$(EMBED_MANIFEST)" == "1"
-!include ..\..\makefile.inc
-OSSIM_VC_MANIFEST_EMBED_EXE=$(_VC_MANIFEST_EMBED_EXE)
-OSSIM_VC_MANIFEST_CLEAN=$(_VC_MANIFEST_CLEAN)
-!else
-OSSIM_VC_MANIFEST_EMBED_EXE=
-OSSIM_VC_MANIFEST_CLEAN=
-!endif
-
-default:	$(PROGRAM).exe
-
-all:	default
-
-$(PROGRAM).exe:	$(PROGRAM).cpp
-	$(CC) $(APP_CFLAGS) $(PROGRAM).cpp $(OSSIM_LINK)
-	$(OSSIM_VC_MANIFEST_EMBED_EXE)
-
-clean:
-	$(RM) *.obj *.exe *.manifest *~
-	$(OSSIM_VC_MANIFEST_EMBED_EXE)
-
-install:	default
-	$(CP) *.exe $(BIN_DIR)
-
-!if "$(EMBED_MANIFEST)" == "1"
-!include ..\..\makefile.targ.inc
-!endif
diff --git a/src/apps/makefile.vc b/src/apps/makefile.vc
deleted file mode 100644
index b800a8c..0000000
--- a/src/apps/makefile.vc
+++ /dev/null
@@ -1,282 +0,0 @@
-###
-# $Id: makefile.vc 15844 2009-11-03 21:13:14Z dburken $
-#
-# Windows nmake make file.
-###
-
-default:
-	cd ossim-applanix2ogeom
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-band-merge
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-btoa
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-chgkwval
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-cmm
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-computeSrtmStats
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-correl
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-create-cg
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-create-histo
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-deg2dms
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-dms2deg
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-dump-ocg
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-extract-vertices
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-height
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-icp
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-igen
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-img2md
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-img2rr
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-info
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-modopt
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-mosaic
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-ogeom2ogeom
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-orthoigen
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-pixelflip
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-prune
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-rejout
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-senint
-	$(MAKE) /f makefile.vc
-	cd .. 
-	cd ossim-space-imaging
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-swapbytes
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd ossim-tfw2ogeom
-	$(MAKE) /f makefile.vc
-	cd ..
-
-install:
-	cd ossim-applanix2ogeom
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-band-merge
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-btoa
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-chgkwval
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-cmm
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-computeSrtmStats
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-correl
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-create-cg
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-create-histo
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-deg2dms
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-dms2deg
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-dump-ocg
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-extract-vertices
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-height
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-icp
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-igen
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-img2md
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-img2rr
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-info
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-modopt
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-mosaic
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-ogeom2ogeom
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-orthoigen
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-pixelflip
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-prune
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-rejout
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-senint
-	$(MAKE) /f makefile.vc install
-	cd .. 
-	cd ossim-space-imaging
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-swapbytes
-	$(MAKE) /f makefile.vc install
-	cd ..
-	cd ossim-tfw2ogeom
-	$(MAKE) /f makefile.vc install
-	cd ..
-
-
-clean:
-	cd ossim-applanix2ogeom
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-band-merge
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-btoa
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-chgkwval
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-cmm
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-computeSrtmStats
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-correl
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-create-cg
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-create-histo
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-deg2dms
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-dms2deg
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-dump-ocg
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-extract-vertices
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-height
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-icp
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-igen
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-img2md
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-img2rr
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-info
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-modopt
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-mosaic
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-ogeom2ogeom
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-orthoigen
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-pixelflip
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-prune
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-rejout
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-senint
-	$(MAKE) /f makefile.vc clean
-	cd .. 
-	cd ossim-space-imaging
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-swapbytes
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd ossim-tfw2ogeom
-	$(MAKE) /f makefile.vc clean
-	cd ..
diff --git a/src/apps/ossim-adrg-dump/.cvsignore b/src/apps/ossim-adrg-dump/.cvsignore
deleted file mode 100644
index 591974d..0000000
--- a/src/apps/ossim-adrg-dump/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-*.d
-adrg_header_dump
-*.exe
-*.o
-*.~*
diff --git a/src/apps/ossim-applanix2ogeom/ossim-applanix2ogeom.cpp b/src/apps/ossim-applanix2ogeom/ossim-applanix2ogeom.cpp
deleted file mode 100644
index 76bb856..0000000
--- a/src/apps/ossim-applanix2ogeom/ossim-applanix2ogeom.cpp
+++ /dev/null
@@ -1,322 +0,0 @@
-
-//----------------------------------------------------------------------------
-// Copyright (c) 2005, David Burken, all rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Applinix to ossim geometry.
-// 
-// Application to create an ossim geometry file from Applanix
-// support data files.
-//
-//----------------------------------------------------------------------------
-// $Id: applanix2ogeom.cpp 13025 2008-06-13 17:06:30Z sbortman $
-
-#include <iostream>
-#include <cstdlib>
-using namespace std;
-
-#include <ossim/init/ossimInit.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/support_data/ossimApplanixEOFile.h>
-#include <ossim/projection/ossimApplanixEcefModel.h>
-#include <ossim/projection/ossimApplanixUtmModel.h>
-
-
-static const ossimTrace traceDebug(ossimString("applanix2ogeom:debug"));
-
-bool processImage(ossimApplanixEOFile& eo,
-                  const ossimKeywordlist& kwl,
-                  const ossimString& id,
-                  const ossimFilename& outputDir);
-
-int main(int argc, char* argv[])
-{
-   static const char MODULE[] = "applanix2ogeom";
-
-   std::string tempString;
-   ossimArgumentParser::ossimParameter stringParam(tempString);
-   ossimArgumentParser argumentParser(&argc, argv);
-   bool outputDirOverrideFlag = false;
-   ossimInit::instance()->addOptions(argumentParser);
-   ossimInit::instance()->initialize(argumentParser);
-
-   argumentParser.getApplicationUsage()->setApplicationName(
-      argumentParser.getApplicationName());
-   
-   argumentParser.getApplicationUsage()->setDescription(
-      argumentParser.getApplicationName()+
-      " Creates ossim geometry file from Applannix support data.");
-   
-   argumentParser.getApplicationUsage()->setCommandLineUsage(
-      argumentParser.getApplicationName()+
-      " <camera_file> <exterior_orientation_file> <imageToProcess> <optional_output_directory>");
-
-   argumentParser.getApplicationUsage()->addUsageExplanation(
-      ossimApplicationUsage::OSSIM_COMMAND_LINE_OPTION,
-      std::string("camera_file"),
-      std::string("Serial number specific keyword list with camera parameters."));
-   
-   argumentParser.getApplicationUsage()->addUsageExplanation(
-      ossimApplicationUsage::OSSIM_COMMAND_LINE_OPTION,
-      std::string("exterior_orientation_file"),
-      std::string("Applanix exterior orientation file."));
-   
-   argumentParser.getApplicationUsage()->addUsageExplanation(
-      ossimApplicationUsage::OSSIM_COMMAND_LINE_OPTION,
-      std::string("imageToProcess"),
-      std::string("Image to create geometry for. If not present then all geometries are created"));
-   
-   argumentParser.getApplicationUsage()->addUsageExplanation(
-      ossimApplicationUsage::OSSIM_COMMAND_LINE_OPTION,
-      std::string("option_output_directory"),
-      std::string("Option directory to output geometry file(s) to.  If not set the imageToProcess directory will be used."));
-
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "-h or --help", "Shows help");
-   
-   //---
-   // Extract optional arguments.
-   //---
-   if(argumentParser.read("-h") || argumentParser.read("--help"))
-   {
-      argumentParser.getApplicationUsage()->write(std::cout);
-      exit(0);
-   }
-   
-   argumentParser.reportRemainingOptionsAsUnrecognized();
-   if (argumentParser.errors())
-   {
-      argumentParser.writeErrorMessages(std::cout);
-      exit(1);
-   }
-
-   // cout << "argc:  " << argumentParser.argc() << endl;
-   
-   if(argumentParser.argc() < 4)
-   {
-      argumentParser.getApplicationUsage()->write(std::cout);
-      exit(1);
-   }
-
-//    if(argumentParser.argc() == 4)
-//    {
-//       if(!ossimFilename(argumentParser.argv()[3]).isDir())
-//       {
-//          ossimNotify(ossimNotifyLevel_WARN) << "for the 3 argument option the last argument must be a directory" << std::endl;
-//          exit(0);
-//       }
-//    }
-   ossimFilename cameraFile     = argumentParser.argv()[1];
-   ossimFilename eoFile         = argumentParser.argv()[2];
-   ossimFilename imageToProcess;
-   ossimFilename outputDir;
-   ossim_uint32 maxIdx = argumentParser.argc();
-   if (argumentParser.argc() > 4)
-   {
-      outputDir = argumentParser.argv()[argumentParser.argc()-1];
-
-      if (outputDir.isDir() == false) // doesn't exist
-      {
-         --maxIdx;
-         if (outputDir.createDirectory() == false)
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << " ERROR:"
-               << "\nCould not create directory:  " << outputDir
-               << endl;
-            exit(1);
-         }
-      }
-      outputDirOverrideFlag = outputDir.exists();
-   }
-
-   
-   
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " DEBUG:"
-         << "\ncamera file:       " << cameraFile
-         << "\neo file:           " << eoFile
-         << endl;
-   }
-
-   
-   // Keyword list to pass to model loadState.
-   ossimKeywordlist kwl;
-   // Open up the exterior orientation file.
-   ossimApplanixEOFile eo;
-   if (eo.parseFile(eoFile) == false)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "Could not open:  " << eoFile << endl;
-      exit(1);
-   }
-   eo.indexRecordIds();
-
-   if(argc >4)
-   {
-      ossim_uint32 idx = 0;
-      for(idx = 3; idx < maxIdx; ++idx)
-      {
-         kwl.clear();
-         // Add the eo_file keyword to the keyword list.
-         kwl.add("eo_file", eoFile.c_str(), true);
-         
-         // Add the eo_file keyword to the keyword list.
-         kwl.add("camera_file", cameraFile.c_str(), true);
-         kwl.add("compute_gsd_flag", true, true);
-         
-         // See if the ID is in the eo file.
-         imageToProcess = argumentParser.argv()[idx];
-         ossimString id = imageToProcess.fileNoExtension();
-         ossimRefPtr<ossimApplanixEORecord> rec = eo.getRecordGivenId(id);
-         if (!rec)
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "applanix2ogeom ERROR:"
-               << "\nMatching id for imageToProcess not found in eo file!"
-               << "\nfile:  " << imageToProcess
-               << "\nid:    " << id
-               << "\nReturning..." << endl;
-            exit(1);
-         }
-         kwl.add("image_id", id, true);
-         if (!outputDirOverrideFlag)
-         {
-            outputDir = imageToProcess.path();
-         }
-         processImage(eo, kwl, id, outputDir);
-      }
-   }
-   else if(argc <=4)
-   {
-      outputDir = argumentParser.argv()[argumentParser.argc()-1];
-
-      if(!outputDir .isDir())
-      {
-         ossimFilename idFile = outputDir.file();
-         outputDir = outputDir.path();
-         idFile = idFile.setExtension("");
-         const ossimRefPtr<ossimApplanixEORecord> rec = eo.getRecordGivenId(idFile);
-         
-         if(rec.valid())
-         {
-            // Add the eo_file keyword to the keyword list.
-            kwl.add("eo_file", eoFile.c_str(), true);
-            kwl.add("eo_id", idFile.c_str(), true);
-            
-            // Add the eo_file keyword to the keyword list.
-            kwl.add("camera_file", cameraFile.c_str(), true);
-            kwl.add("compute_gsd_flag", true, true);
-            
-            processImage(eo, kwl, idFile, outputDir);
-         }
-      }
-      else
-      {
-         ossim_uint32 idx = 0;
-         ossim_uint32 nRecords = eo.getNumberOfRecords();
-         ossim_int32 idIdx = eo.getFieldIdx("ID");
-         if(idIdx >= 0)
-         {
-            for(idx = 0; idx < nRecords; ++idx)
-            {
-               const ossimRefPtr<ossimApplanixEORecord> rec = eo.getRecord(idx);
-               
-               if(rec.valid())
-               {
-                  ossimString id = (*rec)[idIdx];
-                  // Add the eo_file keyword to the keyword list.
-                  kwl.add("eo_file", eoFile.c_str(), true);
-                  kwl.add("eo_id", id.c_str(), true);
-                  
-                  // Add the eo_file keyword to the keyword list.
-                  kwl.add("camera_file", cameraFile.c_str(), true);
-                  kwl.add("compute_gsd_flag", true, true);
-                  
-                  processImage(eo, kwl, id, outputDir);
-               }
-            }
-         }
-         else
-         {
-            ossimNotify(ossimNotifyLevel_WARN) << "NO ID RECORD FOUND!!" << std::endl;
-            exit(0);
-         }
-      }
-   }
-   
-   
-   return 0;
-}
-
-bool processImage(ossimApplanixEOFile& eo,
-                  const ossimKeywordlist& kwl,
-                  const ossimString& id,
-                  const ossimFilename& outputDir)
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "applanix2ogeom:processImage DEBUG:"
-         << "\nkwl:\n"
-         << kwl
-         << endl;
-   }
-
-//   ossimRefPtr<ossimApplanixEcefModel> model = new ossimApplanixEcefModel;
-   ossimRefPtr<ossimProjection> model;
-
-   if(eo.isUtmFrame())
-   {
-      model = new ossimApplanixUtmModel;
-   }
-   else
-   {
-     model = new ossimApplanixEcefModel;
-   }
-   if (model->loadState(kwl) == false)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "applanix2ogeom:processImage ERROR:"
-         << "\nossimApplanixEcefModel::loadState failded for id:  "
-         << id
-         << endl;
-      return false;
-   }
-      
-   ossimFilename geomFile = id;
-   geomFile.setExtension(ossimString(".geom"));
-   if (outputDir != ossimFilename::NIL)
-   {
-      geomFile = outputDir.dirCat(geomFile);
-   }
-
-   ossimKeywordlist geomKwl;
-   model->saveState(geomKwl);
-
-   if (geomKwl.write(geomFile.c_str()) == false)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "applanix2ogeom:processImage ERROR:"
-         << "\nCould not write file:  " << geomFile << endl;
-      return false;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_NOTICE)
-         << "Wrote file:  " << geomFile << endl;
-   }
-   return true;
-}
diff --git a/src/apps/ossim-band-merge/ossim-band-merge.cpp b/src/apps/ossim-band-merge/ossim-band-merge.cpp
deleted file mode 100644
index 9a3533c..0000000
--- a/src/apps/ossim-band-merge/ossim-band-merge.cpp
+++ /dev/null
@@ -1,326 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2002 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Ken Melero
-//
-// Merges input images together into output image.  Images must be of
-// same scalar type and same number of bands.  If image width is different
-// output image will be expanded to the largest input image width.
-//
-//*******************************************************************
-//  $Id: band_merge.cpp 10695 2007-04-12 13:56:50Z gpotts $
-
-#include <ossim/imaging/ossimJpegWriter.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimImageTypeLut.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
-#include <ossim/imaging/ossimImageWriterFactory.h>
-#include <ossim/imaging/ossimImageFileWriter.h>
-#include <ossim/imaging/ossimScalarRemapper.h>
-#include <ossim/imaging/ossimBandMergeSource.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <iostream>
-#include <exception>
-static ossimTrace traceDebug("band_merge:main");
-
-static void usage();
-static void outputWriterTypes();
-
-int main(int argc, char* argv[])
-{
-   static const char MODULE[] = "band_merge:main";
-
-   std::string tempString;
-   ossimArgumentParser::ossimParameter stringParam(tempString);
-   ossimArgumentParser argumentParser(&argc, argv);
-   ossimInit::instance()->addOptions(argumentParser);
-   ossimInit::instance()->initialize(argumentParser);
- 
-   argumentParser.getApplicationUsage()->setApplicationName(argumentParser.getApplicationName());
-   argumentParser.getApplicationUsage()->setDescription(argumentParser.getApplicationName()+" merges band separate images to one image");
-   argumentParser.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
-   argumentParser.getApplicationUsage()->addCommandLineOption("-o or --create-overiew", "Creates and overview for the output image");
-   argumentParser.getApplicationUsage()->addCommandLineOption("-w or --tile-width", "Defines the tile width for the handlers that support tiled output");
-   
-   if (traceDebug()) CLOG << " Entered..." << std::endl;
-
-   if (argumentParser.read("-h") ||
-       argumentParser.read("--help")||(argumentParser.argc() < 2))
-   {
-      argumentParser.getApplicationUsage()->write(std::cout);
-      usage(); // for writer output types
-      exit(0);
-   }
-
-   // Keyword list to initialize image writers with.
-   ossimKeywordlist kwl;
-   const char* PREFIX = "imagewriter.";
-
-   ossim_uint32 tile_width = 32;
-   bool create_overview = false;
-
-   if (argumentParser.read("-o") || argumentParser.read("--crate-overview"))
-   {
-      create_overview = true;
-      std::cout << "\nOutput overview building enabled." << std::endl;
-   }
-
-   if (argumentParser.read("-w", stringParam) ||
-       argumentParser.read("-tile-width", stringParam))
-   {
-      tile_width = ossimString(tempString).toInt();
-      if ((tile_width % 16) != 0)
-      {
-         cerr << MODULE << " NOTICE:"
-              << "\nTile width must be a multiple of 16!"
-              << "\nDefaulting to 128"
-              << std::endl;
-         tile_width = 0;
-      }
-      std::cout << "Tile width set to:  " << tile_width << std::endl;
-   }
-   
-   argumentParser.reportRemainingOptionsAsUnrecognized();
-   
-   // Three required args:  output_type, input file, and output file.
-   if (argumentParser.errors())
-   {
-      argumentParser.writeErrorMessages(std::cout);
-      exit(0);
-   }
-   if (argumentParser.argc() == 1)
-   {
-      argumentParser.getApplicationUsage()->write(std::cout);
-      usage(); // for writer output types
-      exit(0);
-   }
-   
-   ossim_uint32 number_of_source_images = argumentParser.argc() - 3;
-
-   if (traceDebug())
-   {
-      CLOG << "DEBUG:"
-           << "\nargc:  " << argumentParser.argc()
-           << "\nnumber_of_source_images:  " << number_of_source_images
-           << "\ntile_width:  " << tile_width
-           << "\ncreate_overview:  " << (create_overview?"true":"false")
-           << std::endl;
-   }
-
-   ossimString output_type = argv[1];
-   output_type.downcase();
-   std::cout << "Output type:        " << output_type << std::endl;
-
-   // Create the vector of image handlers.
-   ossimConnectableObject::ConnectableObjectList ihs;
-   for(ossim_uint32 h = 0; h < number_of_source_images; ++h)
-   {
-      ossimFilename f = argv[h + 2];
-      std::cout << "Input_image[" << h << "]:     " << f << std::endl;
-      ihs.push_back(ossimImageHandlerRegistry::instance()->open(f));
-   }
-
-   // Get the output file.
-   ossimFilename output_file = argv[argumentParser.argc() - 1];
-   std::cout << "Output file:        " << output_file << std::endl;   
-
-   //---
-   // Set the output writer type and the image type.
-   //---
-   kwl.add(PREFIX, ossimKeywordNames::TYPE_KW, output_type.c_str());
-
-   ossimRefPtr<ossimBandMergeSource> bm = new ossimBandMergeSource(ihs);
-   ossimRefPtr<ossimImageFileWriter> fileWriter =
-      ossimImageWriterFactoryRegistry::instance()->createWriter(kwl, PREFIX);
-   if(!fileWriter)
-   {
-      bm->disconnect();
-      bm = 0;
-      ossimConnectableObject::ConnectableObjectList::iterator i = ihs.begin();
-      while (i != ihs.end())
-      {
-         (*i)->disconnect();
-         (*i) = 0;
-         ++i;
-      }
-      
-      cerr << "Error making an image writer..."
-           << "\nExiting application..." << std::endl;
-      exit(1);
-   }
-   
-   // Write out a geometry file for new image.
-   ossimKeywordlist bm_geom;
-   ossimRefPtr<ossimImageGeometry> geom = bm->getImageGeometry();
-   geom->saveState(bm_geom);
-   
-   ossimFilename geom_file = output_file;
-   geom_file.setExtension("geom");
-   bm_geom.write(geom_file);
-   
-   fileWriter->connectMyInputTo(0, bm.get());
-   
-   if (tile_width)
-   {
-      // Set the tile size...
-      fileWriter->setTileSize(ossimIpt(tile_width, tile_width));
-   }
-   
-   fileWriter->open(output_file);
-   
-   ossimStdOutProgress prog(2);
-   fileWriter->addListener(&prog);
-   
-   fileWriter->setAreaOfInterest(bm->getBoundingRect());
-
-   if( fileWriter->canCastTo("ossimTiffWriter") )
-   {
-//      ossimTiffWriter* twriter = PTR_CAST(ossimTiffWriter, fileWriter);
-      
-      if(fileWriter.valid())
-      {
-         try
-         {
-            fileWriter->execute();
-         }
-         catch(std::exception& e)
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "band_merge: ERROR exception caught:\n"
-               << e.what()
-               << std::endl;
-         }
-         catch (...)
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "band_merge: ERROR - Unknown exception caught!"
-               << std::endl;
-         }
-      }
-   }
-   else if(fileWriter->canCastTo("ossimJpegWriter"))
-   {
-      ossimRefPtr<ossimScalarRemapper> remapper = NULL;
-      
-      if(PTR_CAST(ossimJpegWriter, fileWriter.get()) &&
-         (bm->getOutputScalarType() != OSSIM_UCHAR))
-      {
-         remapper = new ossimScalarRemapper(bm.get(), OSSIM_UCHAR);
-         remapper->initialize();
-         fileWriter->connectMyInputTo(0, remapper.get());
-      }
-      fileWriter->initialize();
-      try
-      {
-         fileWriter->execute();
-      }
-      catch(std::exception& e)
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "band_merge: ERROR exception caught:\n"
-            << e.what()
-            << std::endl;
-      }
-      catch (...)
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "band_merge: ERROR - Unknown exception caught!"
-            << std::endl;
-      }
-   }
-   else
-   {
-      try
-      {
-         fileWriter->execute();
-      }
-      catch(std::exception& e)
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "band_merge: ERROR exception caught:\n"
-               << e.what()
-               << std::endl;
-         }
-      }
-      catch (...)
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "band_merge: ERROR - Unknown exception caught!"
-               << std::endl;
-         }
-      }
-   }
-   
-   if (create_overview == true)
-   {
-      fileWriter->writeOverviewFile();
-   }
-   fileWriter->disconnect();
-   fileWriter = 0;
-   bm = 0;
-   ossimConnectableObject::ConnectableObjectList::iterator it = ihs.begin();
-   while (it != ihs.end())
-   {
-      (*it)->disconnect();
-      (*it) = 0;
-      ++it;
-   }
-
-   exit(0);
-}
-
-void usage()
-{
-   std::cout
-      << "band_merge: Band Merge\n"
-      << "Usage:\n"
-      << "band_merge [-h][-o][-w tile_width] <output_type> <input_file1> "
-      << "<input_file2> ... <output_file>"
-      << "\n\nOptional argument list:"
-      << "\n -h  -- display Usage/Help"
-      << "\n -o  -- create an ossim overview file with output file"
-      << "\n -w  -- tile width (default = 32)"
-      << "\n"
-      << "\nNOTES:"
-      << "\n\"-w\" option only valid with tiff type."
-      << "\n\"Tile width must be a multiple of 32."
-      << "\nValid output writer types:"
-      << "\n";
-   
-   outputWriterTypes();
-}
-
-void outputWriterTypes()
-{
-   ossimImageTypeLut lut;
-
-   ossim_uint32 index = 0;
-   ossimString type = lut.getTableIndexString(index);
-   
-   while (type.size())
-   {
-      std::cout << "\t" << type << std::endl;
-      ++index;
-      type = lut.getTableIndexString(index);
-   }
-   std::cout << std::endl;
-}
diff --git a/src/apps/ossim-btoa/.cvsignore b/src/apps/ossim-btoa/.cvsignore
deleted file mode 100644
index c60938c..0000000
--- a/src/apps/ossim-btoa/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-btoa.o
-btoa
-btoa.d
diff --git a/src/apps/ossim-chgkwval/ossim-chgkwval.cpp b/src/apps/ossim-chgkwval/ossim-chgkwval.cpp
deleted file mode 100644
index 1465ab1..0000000
--- a/src/apps/ossim-chgkwval/ossim-chgkwval.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Ken Melero
-// 
-// Description: Changes the value of a keyword within a keyword list to
-//              value passed in by user.
-//
-//********************************************************************
-// $Id: chgkwval.cpp 13083 2008-06-25 19:45:41Z dburken $
-
-#include <iostream>
-#include <ossim/base/ossimKeywordlist.h>
-
-int main(int argc, char* argv[])
-{
-   if (argc != 4)
-   {
-      std::cout
-         << "Usage: chgkwval <keywordlist_file> <keyword> <value>\n"
-         << "Changes the keyword value within the keyword list to "
-         << "value specified.\n"
-         << "Example:   chgval band1.spec area.size \"pixels 7689 8031\"\n"
-         << "Changes the keyword value of area.size to pixels 7689 8031\n\n"
-         << "Note 1:  Use no colon \":\" after the keyword.\n"
-         << "Note 2:  If the keyword is present in the keyword list it will\n"
-         << "         be overwritten.\n"
-         << "Note 3:  If the keyword is not in the keyword list it will"
-         << " be added.\n"
-         << "Note 4:  Enclose value in double quotes if it is more than one"
-         << " string.\n"
-         << std::endl;
-      return 0;
-   }
-   
-   ossimKeywordlist kwl(argv[1]);
-   
-   if (kwl.getErrorStatus() != ossimErrorCodes::OSSIM_OK)
-   {
-      std::cerr << "Error opening keyword list:  " << argv[1] << std::endl;
-      return 1;
-   }
-   
-   // Change the value of keyword in the keyword list.
-   kwl.add(argv[2], argv[3], true);
-   
-   std::cout << "Changing " << argv[2] << " value in " << argv[1] << " to:  "
-             << argv[3] << std::endl;
-   
-   kwl.write(argv[1]);
-   
-   return 0;
-}
diff --git a/src/apps/ossim-chipper/ossim-chipper.cpp b/src/apps/ossim-chipper/ossim-chipper.cpp
deleted file mode 100644
index ff6a413..0000000
--- a/src/apps/ossim-chipper/ossim-chipper.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossim-dem.cpp
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Utility class definition for processing digital elevation models(dems).
-//
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimTimer.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/util/ossimChipperUtil.h>
-
-#include <cstdlib> /* for exit */
-#include <iomanip>
-#include <iostream>
-
-using namespace std;
-
-static ossimTrace traceDebug = ossimTrace("ossim-dem:debug");
-
-int main(int argc, char* argv[])
-{
-   // Start the timer.
-   ossimTimer::instance()->setStartTick();
-
-   //---
-   // Get the arg count so we can tell if an arg was consumed by
-   // ossimInit::instance()->initialize
-   //---
-   int originalArgCount = argc;
-   
-   ossimArgumentParser ap(&argc, argv);
-
-   // Initialize ossim stuff, factories, plugin, etc.
-   ossimInit::instance()->initialize(ap);
-
-   //---
-   // Avoid going on if a global option was consumed by ossimInit::initialize
-   // like -V or --version option and the arg count is down to 1.
-   //---
-   if ( ( ap.argc() > 1 ) || ( ap.argc() == originalArgCount ) )
-   {
-      // Make the generator.
-      ossimRefPtr<ossimChipperUtil> chipper = new ossimChipperUtil;
-
-      try
-      {      
-         //---
-         // NOTE: ossimChipperUtil::initialize handles the application usage which will
-         // false, to end things if certain options (e.g. "--help") are provided.
-         //
-         // ossimChipperUtil::initialize can throw an exception.
-         //---
-         bool continue_after_init = chipper->initialize(ap);
-         if (continue_after_init)
-         {      
-            // ossimChipperUtil::execute can throw an excepion.
-            chipper->execute();
-            
-            ossimNotify(ossimNotifyLevel_NOTICE)
-               << "elapsed time in seconds: "
-               << std::setiosflags(ios::fixed)
-               << std::setprecision(3)
-               << ossimTimer::instance()->time_s() << endl;
-         }
-      }
-      catch (const ossimException& e)
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
-         exit(1);
-      }
-      
-   } // End: if ( ( ap.argc() > 1 ) ...
-
-   exit(0);
-   
-} // End of main...
diff --git a/src/apps/ossim-cmm/ossim-cmm.cpp b/src/apps/ossim-cmm/ossim-cmm.cpp
deleted file mode 100644
index e10698d..0000000
--- a/src/apps/ossim-cmm/ossim-cmm.cpp
+++ /dev/null
@@ -1,457 +0,0 @@
-//**************************************************************************
-//
-// License:  See top level LICENSE.txt filel.
-//
-// Written by:   Garrett Potts
-// 
-// Description:  This program will force a recompute of Min/Max Pixel Values.
-//
-//**************************************************************************
-// $Id: cmm.cpp 14515 2009-05-15 15:12:28Z dburken $
-
-#include <vector>
-#include <fstream>
-#include <iostream>
-#include <iterator>
-
-using namespace std;
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageSourceFactory.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageSourceSequencer.h>
-
-static const ossimTrace traceDebug(ossimString("cmm:debug"));
-
-//**************************************************************************
-// usage()
-//**************************************************************************
-void usage()
-{
-   ossimNotify(ossimNotifyLevel_INFO)
-      << "\nNOTES:"
-      << "\n - Default output is to a \".omd\" file so if the image was"
-      << " \"foo.tif\" you\n   will get a \"foo.omd\"."
-      << "\n - If the .omd file exists already this will open it and add"
-      << "\n   or, overwrite the min, max keywords only."
-      << "\n - If the -p option is used no .omd file will be written."
-      << endl;
-   
-   return;
-}
-
-bool isInImageEntryList(const std::vector<ossim_uint32>& imageEntryList,
-                        ossim_uint32 entry)
-{
-   for(ossim_uint32 i=0; i<imageEntryList.size(); ++i)
-   {
-      if (imageEntryList[i] == entry)
-      {
-         return true;
-      }
-   }
-   return false;
-}
-
-//**************************************************************************
-// Main
-//**************************************************************************
-int main(int argc, char* argv[])
-{
-   //---
-   // Get the arg count so we can tell if an arg was consumed by
-   // ossimInit::instance()->initialize
-   //---
-   int originalArgCount = argc;  
-
-   ossimString tempString;
-   ossimArgumentParser::ossimParameter stringParam(tempString);
-   ossimArgumentParser argumentParser(&argc, argv);
-   ossimInit::instance()->addOptions(argumentParser);
-   ossimInit::instance()->initialize(argumentParser);
-
-   if ( (argumentParser.argc() == 1) && (originalArgCount > 1) )
-   {
-      exit(0); // ossimInit consumed all options.
-   }
-   
-   argumentParser.getApplicationUsage()->setApplicationName(argumentParser.getApplicationName());
-   
-   argumentParser.getApplicationUsage()->setDescription(argumentParser.getApplicationName()+" will force a recompute of Min/Max Pixel Values.");
-   
-   argumentParser.getApplicationUsage()->setCommandLineUsage(argumentParser.getApplicationName()+" <image_file>\nThis program will force a recompute of Min/Max Pixel Values.\n");
-   
-   argumentParser.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
-   
-   argumentParser.getApplicationUsage()->addCommandLineOption("-p","print values to standard output");
-   
-   argumentParser.getApplicationUsage()->addCommandLineOption("-e or --entry","Give the entry(zero based) to compute min / max for.\nNOTE: Option only valid with a single file.");
-
-   argumentParser.getApplicationUsage()->addCommandLineOption("-l or --list-entries","Lists the entries within the image and returns without doing anything else.");
-   argumentParser.getApplicationUsage()->addCommandLineOption("-o", "Write omd to file specified. If used on a multi-entry file, given \"foo.omd\" you will get: \"foo_e0.omd\"");
-   argumentParser.getApplicationUsage()->addCommandLineOption("--min","Hard coded min value for all bands");
-   argumentParser.getApplicationUsage()->addCommandLineOption("--max","Hard coded max value for all bands");
-   argumentParser.getApplicationUsage()->addCommandLineOption("--null","Hard coded null value for all bands");
-   
-   bool out_data = false;
-   bool listEntriesFlag = false;
-   double nullValue = ossim::nan();
-   double minValue  = ossim::nan();
-   double maxValue  = ossim::nan();
-   ossimFilename outputFile;
-   
-   std::vector<ossim_uint32> entryList;
-
-   if (argumentParser.read("-h") ||
-       argumentParser.read("--help")||(argumentParser.argc() < 2))
-   {
-      argumentParser.getApplicationUsage()->write(ossimNotify(ossimNotifyLevel_WARN));
-      usage();
-      exit(0);
-   }
-   if(argumentParser.read("--min", stringParam))
-   {
-      minValue = tempString.toDouble();
-   }
-   if(argumentParser.read("--max", stringParam))
-   {
-      maxValue = tempString.toDouble();
-   }
-   if(argumentParser.read("--null", stringParam))
-   {
-      nullValue = tempString.toDouble();
-   }
-   if(argumentParser.read("-p"))
-   {
-      out_data = true;
-   }
-   if(argumentParser.read("-l") || argumentParser.read("--list-entries"))
-   {
-      listEntriesFlag = true; 
-   }
-   if( argumentParser.read("-o", stringParam) )
-   {
-      outputFile = tempString.trim();
-   }
-   while(argumentParser.read("-e", stringParam) ||
-         argumentParser.read("--entry", stringParam))
-   {
-      ossim_uint32 entryNumber = ossimString(tempString).toUInt32();
-      
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG:"
-            << "\nentryNumber:  " << entryNumber
-            << endl;
-      }
-
-      entryList.push_back(entryNumber);
-   }
-   
-   argumentParser.reportRemainingOptionsAsUnrecognized();
-   if(argc == 1)
-   {
-      usage();
-      exit(1);
-   }
-   
-   // Default variables
-
-   ossim_uint32 fileCount = argc - 1;
-
-   // Check for -e option with multiple images.
-   if ( (fileCount > 1) && entryList.size() )
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "Entry option only valid with a single file!"
-         << endl;
-      exit(1);
-   }
-   
-   ossim_uint32 idx = 1;
-   for(idx = 1; idx <= fileCount; ++idx)
-   {
-      // Get the image file name.
-      ossimFilename img_file(argv[idx]);
-
-      ossimNotify(ossimNotifyLevel_INFO)
-         << "Processing image file:  " << img_file << endl;
-      
-      // Instantiate image to see if it is supported.
-      ossimRefPtr<ossimImageHandler> ih;
-      ih = ossimImageHandlerRegistry::instance()->open(img_file);      
-      
-      // Error checking.
-      if (!ih.valid())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "Unsupported image file:  " << img_file << endl;
-         continue; // Go to next file.
-      }
-      
-      // Error checking.
-      if (ih->getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "Error reading image:  " << img_file << endl;
-         continue; // Go to next file.
-      }
-
-      // Get the list of entries that this image has.
-      std::vector<ossim_uint32> imageEntryList;
-      ih->getEntryList(imageEntryList);
-
-      if (listEntriesFlag)
-      {
-         std::cout << "File " << img_file << " entries:\n";
-         std::copy(imageEntryList.begin(),
-                   imageEntryList.end(),
-                   std::ostream_iterator<ossim_uint32>(std::cout, " "));
-         std::cout << std::endl;
-         continue; // Go to next file.
-      }
-
-      //---
-      // If no entry (-e option) was given assume to do all entries.
-      //---
-      if(entryList.size() == 0)
-      {
-         for(ossim_uint32 imageEntryIdx = 0;
-             imageEntryIdx < imageEntryList.size();
-             ++imageEntryIdx)
-         {
-            entryList.push_back(imageEntryList[imageEntryIdx]);
-         }
-      }
-
-      for(ossim_uint32 entryIdx = 0; entryIdx < entryList.size(); ++entryIdx)
-      {
-         if(isInImageEntryList(imageEntryList, entryList[entryIdx]) == false)
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "Entry not found:  " << entryList[entryIdx] << endl;
-            
-            continue; // Go to next entry.
-         }
-
-         ossimNotify(ossimNotifyLevel_INFO)
-         << "Computing min/max for entry number:  " << entryList[entryIdx]
-         << endl;
-
-         // Select the entry.
-         ih->setCurrentEntry(entryList[entryIdx]);
-
-         // Build the .omd file name.
-         ossimFilename omd_file;
-         if (outputFile.size())
-         {
-            omd_file = outputFile;            
-         }
-         else
-         {
-            omd_file = img_file;
-         }
-
-         if(imageEntryList.size() > 1)
-         {
-            ossim_uint32 currentEntry = ih->getCurrentEntry();
-            omd_file.setExtension("");
-            omd_file += "_e";
-            omd_file += ossimString::toString(currentEntry);
-
-            //---
-            // Note:  Set extension was not used here deliberately to avoid
-            // messing
-            // up a MODIS file in hdf format with multiple '.'s in the file
-            // name.
-            //---
-            omd_file += ".omd";
-         }
-         else
-         {
-            omd_file.setExtension("omd");
-         }
-      
-         ossimRefPtr<ossimImageSourceSequencer> is =
-            new ossimImageSourceSequencer(ih.get());
-
-         //---
-         // Note: getImageTileWidth/Height will return zero if the image is not
-         // intenally tiles.
-         //---
-         ossimIpt tileWidthHeight(ih->getImageTileWidth(),
-                                  ih->getImageTileHeight());
-         
-         if (!tileWidthHeight.x)
-         {
-            // make the sequencer read entire strips from the image handler
-            // at a time.  This will speed up access time for strip images
-            //
-            tileWidthHeight.x = ih->getBoundingRect().width();
-         }
-         if(!tileWidthHeight.y)
-         {
-            tileWidthHeight.y = ih->getTileHeight();
-         }
-
-         if ( traceDebug() )
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "Sequencer tile size: " << tileWidthHeight << endl;
-         }
-         
-         is->setTileSize(tileWidthHeight);
-
-         //---
-         // Make arrays of doubles to hold the min/max values.
-         // Initialize mins to default maxes and maxes to default mins to be
-         // safe.
-         //---
-         ossim_uint32 i; // for numerous iterations...
-
-         const ossimScalarType ST = ih->getOutputScalarType();
-         
-         const double DEFAULT_MIN = ossim::defaultMin(ST);
-         const double DEFAULT_MAX = ossim::defaultMax(ST);
-         
-         const ossim_uint32 BANDS = ih->getNumberOfInputBands();
-
-         vector<double> tmin(BANDS);
-         vector<double> tmax(BANDS);
-         vector<double> tnull(BANDS);
-         for (i = 0; i < BANDS; ++i)
-         {
-            tmin[i] = DEFAULT_MAX;
-            tmax[i] = DEFAULT_MIN;
-
-            if ( !ossim::isnan(nullValue) )
-            {
-               // User passed in with --null option so set here.
-               tnull[i] = nullValue;
-            }
-            else
-            {
-               tnull[i] = ih->getNullPixelValue(i);
-            }
-         }
-         
-         // Scan the image and compute the min and max.
-         const double TOTAL_TILES = is->getNumberOfTiles();
-         double tile_count = 0.0;
-         ossimNotify(ossimNotifyLevel_INFO)
-            << setiosflags(ios::fixed) << setprecision(0);
-
-         if((ossim::isnan(minValue))||
-            (ossim::isnan(maxValue)))
-         {
-            ossimRefPtr<ossimImageData> id = is->getNextTile();
-            while(id.valid())
-            {
-               id->computeMinMaxPix(tmin, tmax);
-               id = is->getNextTile();
-               ++tile_count;
-               ossimNotify(ossimNotifyLevel_INFO)
-                  << "\r"  << setw(3)
-                  << (tile_count / TOTAL_TILES * 100.0) << "%"
-                  << flush;
-            }
-         }
-         if(!ossim::isnan(minValue))
-         {
-            std::fill(tmin.begin(), tmin.end(), minValue);
-         }
-         if(!ossim::isnan(maxValue))
-         {
-            std::fill(tmax.begin(), tmax.end(), maxValue);
-         }
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "\r100%\nFinished..." << endl;
-         
-         ossimKeywordlist okwl(omd_file);
-         
-         for(i = 0; i < BANDS; ++i)
-         {
-            //---
-            // Check to see if values got assigned.  If not flip to default and
-            // issue a warning.
-            //---
-            if (tmin[i] == DEFAULT_MAX)
-            {
-               tmin[i] = DEFAULT_MIN;
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << "cmm scan for min failed! Using default min."
-                  << std::endl;
-            }
-            if (tmax[i] == DEFAULT_MIN)
-            {
-               tmax[i] = DEFAULT_MAX;
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << "cmm scan for max failed! Using default max."
-                  << std::endl;
-            }
-            
-            ossimString band =
-               ossimString("band")+ossimString::toString(i+1)+".";
-
-            if (tmin[i] == DEFAULT_MAX)
-            {
-               tmin[i] = DEFAULT_MIN;
-            }
-            if (tmax[i] == DEFAULT_MIN)
-            {
-            }
-            
-            okwl.add(band + "min_value", tmin[i], true);
-            okwl.add(band + "max_value", tmax[i], true);
-            okwl.add(band + "null_value", tnull[i], true); 
-            
-            if(out_data)
-            {
-               ossimNotify(ossimNotifyLevel_INFO)
-                  << setiosflags(ios::fixed) << setprecision(16)
-                  << "band" << ossimString::toString(i+1) << ".min_value: "
-                  << tmin[i]
-                  << "\nband" << ossimString::toString(i+1) << ".max_value: "
-                  << tmax[i]
-                  << "\nband" << ossimString::toString(i+1) << ".null_value: "
-                  << tnull[i] << endl;
-            }
-         }  // End of band loop.
-
-         //----
-         // ESH 05/2009 -- Fix for ticket #591:
-         // Ingest command errors - when using the ew_ingest -r option
-         //
-         // Add missing info (number of bands, scalar type) to the .omd file
-         //---
-         okwl.add("number_bands",
-                  BANDS,
-                  true);
-         okwl.add("scalar_type",
-                  (ossimScalarTypeLut::instance()->getEntryString(ST)),
-                  true);
-
-         if(!out_data)
-         {
-            okwl.write(omd_file);
-            ossimNotify(ossimNotifyLevel_INFO)
-               << "wrote file:  " << omd_file << endl;
-         }
-         
-      } // End of loop through entries of a file.
-      
-   } // End of loop through file...
-
-   return 0;
-}
diff --git a/src/apps/ossim-create-cg/ossim-create-cg.cpp b/src/apps/ossim-create-cg/ossim-create-cg.cpp
deleted file mode 100644
index b778a2b..0000000
--- a/src/apps/ossim-create-cg/ossim-create-cg.cpp
+++ /dev/null
@@ -1,143 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author:  David Burken
-//
-// Description:
-//
-// Contains application definition "create_cg" app.
-//
-// It takes an image filename as input and creates a course grid model.
-//
-//*******************************************************************
-//  $Id$
-
-#include <ossim/ossimConfig.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/projection/ossimCoarseGridModel.h>
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-
-int main(int argc, char *argv[])
-{
-   //---
-   // Get the arg count so we can tell if an arg was consumed by
-   // ossimInit::instance()->initialize
-   //---
-   int originalArgCount = argc;
-   
-   ossimArgumentParser argumentParser(&argc, argv);
-   ossimInit::instance()->addOptions(argumentParser);
-   ossimInit::instance()->initialize(argumentParser);
-   
-   if ( (argumentParser.argc() == 1) && (originalArgCount > 1) )
-   {
-      exit(0); // ossimInit consumed all options.
-   }
-
-   ossimString appname = argumentParser.getApplicationName();
-   ossimApplicationUsage* appuse = argumentParser.getApplicationUsage();
-   appuse->setApplicationName(appname);
-   appuse->setDescription(appname+" Creates OSSIM coarse grid geometry from rigorous sensor model.");
-   appuse->setCommandLineUsage(appname+" [options] <image_file>");
-   
-   appuse->addCommandLineOption("-d or --support", 
-      "<geom_path> -- Specifies a supplementary directory path to contain the geom and associated "
-      "grid files. The default is to use the image directory.");
-
-   appuse->addCommandLineOption("-e", 
-      "<error> -- default is 0.1.  This is the maximum difference tolerated in pixels between the "
-      "rigorous model and the computed coarse grid. The smaller this value, the bigger the "
-      "resulting grid.");
-
-   appuse->addCommandLineOption("-s",
-      "<min_line_sample_spacing> -- Specifies the min line sample spacing for the coarse grid. "
-      "Helps in converging. Basically will stop splitting if number of pixels per grid cell gets "
-      "below this number.");
-
-   appuse->addCommandLineOption("-o", 
-      "<base_out_name> -- Specifies a new base output name for the geom and associated grid files. "
-      "The default is to use the base name of the image file with .geom and .ocg extensions. "
-      "If specified then the output is <base_out_name>.geom and <base_out_name>.ocg where the "
-      ".ocg contains the coarse grid data. THIS IS NOT COMMON AND MAY PREVENT OSSIM FROM "
-      "SUBSEQUENTLY LOCATING THE GEOMETRY FILE.");
-
-   appuse->addCommandLineOption("-h or --help", "Shows help");
-
-   if(argumentParser.read("-h") || argumentParser.read("--help") || (argc < 2))
-   {
-      appuse->write(std::cout);
-      exit(0);
-   }
-   
-   // The last argument is always the image filename:
-   ossimFilename image_file = argv[argc-1];
-   
-   double error = 0.1;
-   if(argumentParser.read("-e", error))
-   {
-      if (error < 0.0)
-         error = 0.1;
-   }
-
-   ossim_int32 minSpacing = 100;
-   if(argumentParser.read("-s", minSpacing))
-   {
-      if (minSpacing < 1)
-         minSpacing = 100;
-   }
-   
-   ossimFilename outputBaseName;
-   argumentParser.read("-o", outputBaseName.string());
-
-   ossimFilename outputPath;
-   argumentParser.read("-d", outputPath.string());
-   if (outputPath.empty())
-   {
-      argumentParser.read("--support", outputPath);
-      if (outputPath.empty())
-         outputPath = image_file.path();
-   }
-
-   // Establish image handler for access to rigorous model:
-   ossimRefPtr<ossimImageHandler> ih = ossimImageHandlerRegistry::instance()->open(image_file);
-   if (ih.valid())
-   {
-      // Instantiate the rigorous model:
-      ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
-      if(geom.valid() && geom->getProjection())
-      {
-         // Compute the coarse grid:
-         ossimRefPtr<ossimCoarseGridModel> cg = new ossimCoarseGridModel;
-         cg->setInterpolationError(error);
-         cg->setMinGridSpacing(minSpacing);
-         ossimNotify(ossimNotifyLevel_NOTICE)<<"\nComputing coarse grid..."<<endl;
-         cg->buildGrid(ih->getBoundingRect(), geom.get());
-
-         // If no basename was provided, use the defaults for geom file. PREFERRED:
-         if (outputBaseName.empty())
-            outputBaseName = ih->createDefaultGeometryFilename().file();
-
-         // Save the coarse grid to appropriate location:
-         ossimFilename filename (outputPath.dirCat(outputBaseName));
-         filename.expand();
-         ossimNotify(ossimNotifyLevel_NOTICE)<<"\nSaving OCG grid and geometry to <"
-            <<filename.path()<<">..."<<endl;
-         cg->saveCoarseGrid(filename); // this saves geom file as well
-      }
-   }
-
-   return 0;
-}
diff --git a/src/apps/ossim-create-histo/ossim-create-histo.cpp b/src/apps/ossim-create-histo/ossim-create-histo.cpp
deleted file mode 100644
index a96c8d5..0000000
--- a/src/apps/ossim-create-histo/ossim-create-histo.cpp
+++ /dev/null
@@ -1,299 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-//*******************************************************************
-//  $Id: create_histo.cpp 11743 2007-09-19 19:57:31Z gpotts $
-
-
-#include <ossim/ossimConfig.h>
-
-#include <iostream>
-#include <vector>
-#include <algorithm>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/base/ossimMultiResLevelHistogram.h>
-#include <ossim/base/ossimMultiBandHistogram.h>
-#include <ossim/base/ossimHistogram.h>
-#include <ossim/imaging/ossimHistogramWriter.h>
-#include <ossim/imaging/ossimImageHistogramSource.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/imaging/ossimImageSourceSequencer.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-
-
-void usage()
-{
-   cout << "examples:\n"
-	<< " create_histo foo.tif\n"
-	<< "            Will create a histogram for the input image and call\n"
-	<< "            it foo.his\n\n"
-        << " create_histo -i foo.tif -o foo.his\n"
-        << "            this will compute a histogram from the input foo.tif\n"
-        << "            and write it to foo.his\n\n"
-        << " create_histo -p foo2.his -o foo.his\n"
-        << "            will import the proprietary histogram file and output\n"
-        << "            an ossim histogram file to foo.his\n\n"
-        << "NOTE:  If no output is given it will default to output.his\n"
-        << "       unless the special case of a single input image is given\n"
-        << endl;
-}
-
-void importHistogram(const ossimString& importFile,
-                     const ossimString&   outputFile)
-{
-   ossimRefPtr<ossimMultiResLevelHistogram> histo      = new ossimMultiResLevelHistogram;
-
-   histo->importHistogram(importFile);
-   ossimKeywordlist kwl;
-   histo->saveState(kwl);
-   kwl.write(outputFile.c_str());
-}
-
-void computeHistogram(const ossimString& imageOption,
-                      const ossimString& outputOption,
-                      ossim_float64 minValueOverride,
-                      ossim_float64 maxValueOverride,
-                      ossim_int32 numberOfBinsOverride,
-                      ossim_int32 entryNumberOverride,
-                      bool fastMode,
-                      int maxResLevels=1)
-{
-   theStdOutProgress.setFlushStreamFlag(true);
-   ossimRefPtr<ossimImageHandler> handler = ossimImageHandlerRegistry::instance()->open(ossimFilename(imageOption));
-   if(handler.valid())
-   {
-      ossimFilename histogramFile;
-      std::vector<ossim_uint32> entryList;
-      handler->getEntryList(entryList);
-
-      if(entryNumberOverride >= 0)
-      {
-         std::vector<ossim_uint32>::iterator iter= std::find(entryList.begin(),
-                                                             entryList.end(),
-                                                             (ossim_uint32)entryNumberOverride);
-
-         if(iter != entryList.end())
-         {
-            entryList.clear();
-            entryList.push_back(entryNumberOverride);
-         }
-         else
-         {
-            ossimNotify(ossimNotifyLevel_WARN) << "Invalid entry number " << entryNumberOverride << " passed in.  Returning...." << std::endl;
-            return;
-         }
-      }
-      ossim_uint32 idx = 0;
-      for(idx = 0; idx < entryList.size(); ++idx)
-      {
-         ossimNotify(ossimNotifyLevel_NOTICE)<<"entry " << entryList[idx] << std::endl;
-         handler->setCurrentEntry(entryList[idx]);
-
-         // Check handler to see if it's filtering bands.
-         if ( handler->isBandSelector() )
-         { 
-            // Set output list to input.
-            handler->setOutputToInputBandList();
-         }
-         
-         ossimRefPtr<ossimProperty> histogramFilename = handler->getProperty("histogram_filename");
-         if(histogramFilename.valid())
-         {
-            if (outputOption == "")
-            {
-              histogramFile = ossimFilename(histogramFilename->valueToString());
-            }
-            else
-            {
-              histogramFile = outputOption;
-            }
-            
-            ossimRefPtr<ossimImageHistogramSource> histoSource = new ossimImageHistogramSource;
-            ossimRefPtr<ossimHistogramWriter> writer = new ossimHistogramWriter;
-            if(maxResLevels)
-            {
-               histoSource->setMaxNumberOfRLevels(maxResLevels);
-            }
-            else
-            {
-               histoSource->setMaxNumberOfRLevels(handler->getNumberOfDecimationLevels());
-            }
-            if(!ossim::isnan(minValueOverride))
-            {
-               histoSource->setMinValueOverride(minValueOverride);
-            }
-            if(!ossim::isnan(maxValueOverride))
-            {
-               histoSource->setMaxValueOverride(maxValueOverride);
-            }
-            if(numberOfBinsOverride > 0)
-            {
-               histoSource->setNumberOfBinsOverride(numberOfBinsOverride);
-            }
-            if (fastMode)
-            {
-               histoSource->setComputationMode(OSSIM_HISTO_MODE_FAST);
-            }
-            histoSource->connectMyInputTo(0, handler.get());
-            histoSource->enableSource();
-            writer->connectMyInputTo(0, histoSource.get());
-            
-            writer->setFilename(histogramFile);
-            writer->addListener(&theStdOutProgress);
-            writer->execute();
-            writer=0;
-         }
-      }
-   }
-}
-
-int main(int argc, char *argv[])
-{
-   ossimString tempString;
-   ossimArgumentParser::ossimParameter stringParam(tempString);
-   ossimArgumentParser argumentParser(&argc, argv);
-   ossimInit::instance()->addOptions(argumentParser);
-   ossimInit::instance()->initialize(argumentParser);
-   
-   argumentParser.getApplicationUsage()->setApplicationName(argumentParser.getApplicationName());
-   argumentParser.getApplicationUsage()->setDescription(argumentParser.getApplicationName()+" creates a histogram from image.");
-   
-   argumentParser.getApplicationUsage()->setCommandLineUsage(argumentParser.getApplicationName()+" <args>");
-   
-   argumentParser.getApplicationUsage()->addCommandLineOption("-h or --help", "Display this information");
-
-   argumentParser.getApplicationUsage()->addCommandLineOption("-p", "<histogram_file> Imports imagelinks proprietary histogram_file.");
-   
-   argumentParser.getApplicationUsage()->addCommandLineOption("-i", "<image_file> Creates a histogram from the image_file.");
-   
-   argumentParser.getApplicationUsage()->addCommandLineOption("-l", "<res_level> Output the specified number of res levels default is, set to 0 if you want all(not supported for import histogram -i option");
-   argumentParser.getApplicationUsage()->addCommandLineOption("--create-histogram-fast", "Computes a histogram in fast mode which samples partial tiles.");
-   
-   argumentParser.getApplicationUsage()->addCommandLineOption("-o", "<output_file> Output the histogram to the indicated file.");
-
-   argumentParser.getApplicationUsage()->addCommandLineOption("--min",  "Minimum value to use");
-   argumentParser.getApplicationUsage()->addCommandLineOption("--max",  "Maximum value to use");
-   argumentParser.getApplicationUsage()->addCommandLineOption("--bins", "Number of bins to use");
-   argumentParser.getApplicationUsage()->addCommandLineOption("--entry", "entry number to use");
-
-   argumentParser.getApplicationUsage()->addCommandLineOption("-f", "fast mode");
-   
-   ossimString importOption;
-   ossimString imageOption;
-   ossimString outputOption;
-   ossim_uint32 maxLevels = 1;
-   ossim_int32 entry = -1;
-   
-   ossim_float64 minValueOverride = ossim::nan();
-   ossim_float64 maxValueOverride = ossim::nan();
-   ossim_int32   numberOfBinsOverride = -1;
-
-   bool fastMode = false;
-   
-   if ( (argumentParser.read("-h")) || (argumentParser.read("--help")) )
-   {
-      argumentParser.getApplicationUsage()->write(std::cout);
-      usage();
-      exit(0);
-    }
-   
-   if (argumentParser.argc() == 2)
-   {
-      ossimFilename inputImage = argv[1];
-      imageOption = inputImage;
-      if(!inputImage.exists())
-      {
-         cerr << "Image does not exist " << inputImage << endl;
-         exit(1);
-      }
-      maxLevels = 1;
-   }
-   else
-   {
-      if(argumentParser.read("--min", stringParam))
-      {
-         minValueOverride = tempString.toDouble();
-      }
-      if(argumentParser.read("--max", stringParam))
-      {
-         maxValueOverride = tempString.toDouble();
-      }
-      if(argumentParser.read("--bins", stringParam))
-      {
-         numberOfBinsOverride = tempString.toInt32();
-      }
-      if(argumentParser.read("--bins", stringParam))
-      {
-         numberOfBinsOverride = tempString.toInt32();
-      }
-      if(argumentParser.read("--entry", stringParam))
-      {
-         entry = tempString.toInt32();
-      }
-
-      if(argumentParser.read("-o", stringParam))
-      {
-         outputOption = tempString;
-      }
-      
-      if ( argumentParser.read("-f") ||
-           argumentParser.read("--create-histogram-fast"))
-      {
-         fastMode = true;
-      }
-
-      if(argumentParser.read("-p", stringParam))
-      {
-         importOption = tempString;
-      }
-      if(argumentParser.read("-l", stringParam))
-      {
-         ossimString s = tempString;
-         maxLevels = s.toUInt32();
-      }
-   }
-
-   if((importOption != "") && (imageOption  != ""))
-   {
-      cout << "you can either import or create a histogram from an image but\n"
-           << "we can't do both" << endl;
-      exit(1);
-   }
-
-   if(importOption != "")
-   {
-      importHistogram(importOption, "");
-   }
-   else if(argc > 1)
-   {
-      ossim_uint32 idx = 1;
-      while(argv[idx])
-      {
-         ossimNotify(ossimNotifyLevel_NOTICE)
-            <<"file " << argv[idx] << std::endl;
-
-         computeHistogram(ossimString(argv[idx]), outputOption, minValueOverride, maxValueOverride, numberOfBinsOverride, entry, fastMode, maxLevels);
-         ++idx;
-      }
-   }
-   else
-   {
-      argumentParser.getApplicationUsage()->write(std::cout);
-      usage();
-   }
-
-   return 0;
-}
diff --git a/src/apps/ossim-deg2dms/ossim-deg2dms.cpp b/src/apps/ossim-deg2dms/ossim-deg2dms.cpp
deleted file mode 100644
index 866f922..0000000
--- a/src/apps/ossim-deg2dms/ossim-deg2dms.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Application to convert decimal degrees, to degrees, minutes,
-// seconds (DMS).
-//
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <cstdlib>
-#include <iostream>
-#include <iomanip>
-#include <cmath>
-#include <string>
-#include <sstream>
-
-using namespace std;
-
-void getDegrees(double& deg)
-{
-   std::string s;
-   cout << "Enter degrees:  " << flush;
-   cin >> s;
-   if ( (s == "q") || (s == "Q") )
-   {
-      exit(0);
-   }
-   else
-   {
-      istringstream is(s);
-      is >> deg;
-      if( is.fail() )
-      {
-         cerr << "Must enter a valid number between -180 and 180 for degrees."
-              << "  Exiting..." << endl;
-         exit(1);
-      }
-      else if ( (deg < -180.0) || (deg > 180.0) ) // Check the range.
-      {
-         cerr << "Degrees must be between -180 and 180.  Exiting..."
-              << endl;
-         exit(1);
-      }
-   }
-}
-   
-int main(int argc, char* argv[])
-{
-   enum
-   {
-      FOREVER=1
-   };
-
-   if (argc != 1)
-   {
-      cout << "Usage: " << argv[0]
-           << "\nThis application will convert decimal degrees to degrees, "
-           << "minutes, seconds.\nIt take no arguments, you will be prompted "
-           << "for the decimal degrees.\n" << endl;
-      return 0;
-   }
-   
-   cout << "\nEnter \"q\" to quit.\n\n";
-
-   double deg = 0.0;
-   double min = 0.0;
-   double sec = 0.0;
-   int degInt = 0;
-   int minInt = 0;
-
-   cout << setiosflags(ios::fixed) << setprecision(15);
-
-   while (FOREVER)
-   {
-      // Get the degrees.
-      getDegrees(deg);
-
-      // Compute the answer.
-      
-      bool isNegative = (deg < 0.0);
-
-      if (isNegative)
-      {
-         deg = fabs(deg);
-      }
-
-      degInt = static_cast<int>(deg);
-      
-      min = (deg - degInt) * 60.0;
-
-      minInt = static_cast<int>(min);
-      
-      sec = (min - minInt) * 60.0;
-
-      if (isNegative)
-      {
-         deg = -deg;
-      }
-      cout << deg << " = "
-           << (isNegative?"-":"") << degInt << " degrees, "
-           << minInt << " minutes, "
-           << sec << " seconds."
-           << endl;
-   }
-      
-   return 0;
-}
diff --git a/src/apps/ossim-dem/CMakeLists.txt b/src/apps/ossim-dem/CMakeLists.txt
deleted file mode 100644
index 4c21b76..0000000
--- a/src/apps/ossim-dem/CMakeLists.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-FILE(GLOB SOURCE_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
-OSSIM_SETUP_APPLICATION(ossim-dem INSTALL COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ${SOURCE_FILES})
diff --git a/src/apps/ossim-dem/ossim-dem.cpp b/src/apps/ossim-dem/ossim-dem.cpp
deleted file mode 100644
index ff6a413..0000000
--- a/src/apps/ossim-dem/ossim-dem.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossim-dem.cpp
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Utility class definition for processing digital elevation models(dems).
-//
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimTimer.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/util/ossimChipperUtil.h>
-
-#include <cstdlib> /* for exit */
-#include <iomanip>
-#include <iostream>
-
-using namespace std;
-
-static ossimTrace traceDebug = ossimTrace("ossim-dem:debug");
-
-int main(int argc, char* argv[])
-{
-   // Start the timer.
-   ossimTimer::instance()->setStartTick();
-
-   //---
-   // Get the arg count so we can tell if an arg was consumed by
-   // ossimInit::instance()->initialize
-   //---
-   int originalArgCount = argc;
-   
-   ossimArgumentParser ap(&argc, argv);
-
-   // Initialize ossim stuff, factories, plugin, etc.
-   ossimInit::instance()->initialize(ap);
-
-   //---
-   // Avoid going on if a global option was consumed by ossimInit::initialize
-   // like -V or --version option and the arg count is down to 1.
-   //---
-   if ( ( ap.argc() > 1 ) || ( ap.argc() == originalArgCount ) )
-   {
-      // Make the generator.
-      ossimRefPtr<ossimChipperUtil> chipper = new ossimChipperUtil;
-
-      try
-      {      
-         //---
-         // NOTE: ossimChipperUtil::initialize handles the application usage which will
-         // false, to end things if certain options (e.g. "--help") are provided.
-         //
-         // ossimChipperUtil::initialize can throw an exception.
-         //---
-         bool continue_after_init = chipper->initialize(ap);
-         if (continue_after_init)
-         {      
-            // ossimChipperUtil::execute can throw an excepion.
-            chipper->execute();
-            
-            ossimNotify(ossimNotifyLevel_NOTICE)
-               << "elapsed time in seconds: "
-               << std::setiosflags(ios::fixed)
-               << std::setprecision(3)
-               << ossimTimer::instance()->time_s() << endl;
-         }
-      }
-      catch (const ossimException& e)
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
-         exit(1);
-      }
-      
-   } // End: if ( ( ap.argc() > 1 ) ...
-
-   exit(0);
-   
-} // End of main...
diff --git a/src/apps/ossim-dms2deg/ossim-dms2deg.cpp b/src/apps/ossim-dms2deg/ossim-dms2deg.cpp
deleted file mode 100644
index f6f7b7f..0000000
--- a/src/apps/ossim-dms2deg/ossim-dms2deg.cpp
+++ /dev/null
@@ -1,166 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Application to convert degrees, minutes seconds (DMS) 
-// to decimal degrees.
-//
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <cstdlib>
-#include <iostream>
-#include <iomanip>
-#include <cmath>
-#include <string>
-#include <sstream>
-
-using namespace std;
-
-void getDegrees(double& deg)
-{
-   std::string s;
-   cout << "Enter degrees:  " << flush;
-   cin >> s;
-   if ( (s == "q") || (s == "Q") )
-   {
-      exit(0);
-   }
-   else
-   {
-      istringstream is(s);
-      is >> deg;
-      if( is.fail() )
-      {
-         cerr << "Must enter a valid number between -180 and 180 for degrees."
-              << "  Exiting..." << endl;
-         exit(1);
-      }
-      else if ( (deg < -180.0) || (deg > 180.0) ) // Check the range.
-      {
-         cerr << "Degrees must be between -180 and 180.  Exiting..."
-              << endl;
-         exit(1);
-      }
-   }
-}
-   
-void getMinutes(double& min)
-{
-   std::string s;
-   cout << "Enter minutes:  " << flush;
-   cin >> s;
-   if ( (s == "q") || (s == "Q") )
-   {
-      exit(0);
-   }
-   else
-   {
-      istringstream is(s);
-      is >> min;
-      if(is.fail())
-      {
-         cerr << "Must enter a valid number between 0 and 60 for minutes."
-              << "  Exiting..." << endl;
-         exit(1);
-      }
-      else if ( (min < 0.0) || (min > 60.0) ) // Check the range.
-      {
-         cerr << "Minutes must be between 0 and 60.  Exiting\n";
-         exit(1);
-      }
-   }
-}
-
-void getSeconds(double& sec)
-{
-   std::string s;
-   cout << "Enter seconds:  " << flush;
-   cin >> s;
-   if ( (s == "q") || (s == "Q") )
-   {
-      exit(0);
-   }
-   else
-   {
-      istringstream is(s);
-      is >> sec;
-      if( is.fail() )
-      {
-         cerr << "Must enter a valid number between 0 and 60 for seconds."
-              << "  Exiting..." << endl;
-         exit(1);
-      }
-      else if ( (sec < 0.0) || (sec > 60.0) ) // Check the range. 
-      {
-         cerr << "Seconds must be between 0 and 60.  Exiting\n";
-         exit(1);
-      }
-   }
-}
-
-int main(int argc, char* argv[])
-{
-   enum
-   {
-      FOREVER=1
-   };
-
-   if (argc != 1)
-   {
-      cout << "Usage: " << argv[0]
-           << "\nThis application will convert degrees, minutes, seconds to "
-           << "decimal degrees.\nIt take no arguments, you will be prompted "
-           << "for the degrees, minutes, seconds.\n" << endl;
-      return 0;
-   }
-
-   
-   cout << "\nEnter \"q\" to quit.\n\n";
-
-   double deg = 0.0;
-   double min = 0.0;
-   double sec = 0.0;
-
-   cout << setiosflags(ios::fixed) << setprecision(15);
-
-   while (FOREVER)
-   {
-      // Get the degrees.
-      getDegrees(deg);
-
-      // Get the minutes.
-      getMinutes(min);
-
-      // Get the the seconds.
-      getSeconds(sec);
-
-      // Compute the answer.
-      if (deg < 0.0)
-      {
-         double d = fabs(deg);
-         deg = -(d + min/60.0 + sec/3600.0);
-      }
-      else
-      {
-         deg = deg + min/60.0 + sec/3600.0;
-      }
-
-      if ( deg < -180.0 )
-      {
-         deg += 360.0;
-      }
-      else if ( deg > 180.0 )
-      {
-         deg -= 360.0;
-      }
-      cout << "Decimal degrees = " << deg << "\n" << endl;
-      
-   }
-      
-   return 0;
-}
diff --git a/src/apps/ossim-img2md/ossim-img2md.cpp b/src/apps/ossim-img2md/ossim-img2md.cpp
deleted file mode 100644
index d215710..0000000
--- a/src/apps/ossim-img2md/ossim-img2md.cpp
+++ /dev/null
@@ -1,159 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (c) 2005, David Burken, all rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:  Application to output metadata given meta data type,
-// source image, output file.  Additional keywords can be passed to writer
-// via the "-t" option which takes a keyword list.
-//
-//----------------------------------------------------------------------------
-// $Id: img2md.cpp 9111 2006-06-14 12:34:08Z gpotts $
-
-#include <iostream>
-#include <iterator>
-using namespace std;
-
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/imaging/ossimImageMetaDataWriterRegistry.h>
-#include <ossim/imaging/ossimMetadataFileWriter.h>
-
-static void outputWriterTypes();
-static void usage();
-
-int main(int argc, char* argv[])
-{
-   std::string tempString;
-   ossimArgumentParser::ossimParameter stringParam(tempString);
-   ossimArgumentParser argumentParser(&argc, argv);
-   ossimInit::instance()->addOptions(argumentParser);
-   ossimInit::instance()->initialize(argumentParser);
-   
-   argumentParser.getApplicationUsage()->setApplicationName(
-      argumentParser.getApplicationName());
-   
-   argumentParser.getApplicationUsage()->setDescription(
-      argumentParser.getApplicationName()+" outputs metadata for an image.");
-   
-   argumentParser.getApplicationUsage()->setCommandLineUsage(
-      argumentParser.getApplicationName()+" [options] <metadata_writer> <input_file> <output_file>");
-
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "-h or --help", "Shows help");
-
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "-t or --template", "Template to pass to meta data writer.");
-   
-   //---
-   // Extract optional arguments.
-   //---
-   ossimFilename templateFile = ossimFilename::NIL;
-        
-   if(argumentParser.read("-h") || argumentParser.read("--help"))
-   {
-      argumentParser.getApplicationUsage()->write(std::cout);
-      usage(); // For metadata writer types.
-      exit(0);
-   }
-   if( argumentParser.read("-t", stringParam) ||
-       argumentParser.read("--template", stringParam) )
-   {
-      templateFile = tempString.c_str();
-   }
-   
-   argumentParser.reportRemainingOptionsAsUnrecognized();
-   if (argumentParser.errors())
-   {
-      argumentParser.writeErrorMessages(std::cout);
-      exit(1);
-   }
-
-   if(argumentParser.argc() < 4)
-   {
-      argumentParser.getApplicationUsage()->write(std::cout);
-      usage(); // For metadata writer types.
-      exit(1);
-   }
-   
-   ossimString   metaDataWriterType = argumentParser.argv()[1];
-   ossimFilename imageFile          = argumentParser.argv()[2];
-   ossimFilename outputFile         = argumentParser.argv()[3];
-   
-   ossimRefPtr<ossimImageHandler> ih =
-      ossimImageHandlerRegistry::instance()->open(imageFile);
-   if (!ih)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "Could not open:  " << imageFile << endl; 
-   }
-
-   metaDataWriterType.downcase();
-   
-   ossimRefPtr<ossimMetadataFileWriter> mw =
-      ossimImageMetaDataWriterRegistry::instance()->createWriter(
-         metaDataWriterType);
-   if (!mw)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "Could not create meta data writer of type:  "
-         << metaDataWriterType << endl;
-      exit(1);
-   }
-
-   ossimKeywordlist kwl;
-   kwl.add(ossimKeywordNames::FILENAME_KW, outputFile.c_str());
-
-   if (templateFile != ossimFilename::NIL)
-   {
-      if (kwl.addFile(templateFile) == false)
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "Could not load template file:  "
-            << templateFile << endl;
-         exit(1);
-      }
-   }
-
-   mw->loadState(kwl);
-
-   mw->connectMyInputTo(ih.get());
-
-   if (mw->execute() == true)
-   {
-      ossimNotify(ossimNotifyLevel_NOTICE)
-         << "Wrote file:  " << outputFile.c_str() << endl;
-   }
-   
-   return 0;
-}
-
-void usage()
-{
-   cout << "\nNOTES:"
-        << "\nValid metadata writer types:"
-        << "\n";
-   outputWriterTypes();
-}
-
-void outputWriterTypes()
-{
-   std::vector<ossimString> metadatatypeList;
-   
-   ossimImageMetaDataWriterRegistry::instance()->getMetadatatypeList(
-      metadatatypeList);
-   
-   std::copy(metadatatypeList.begin(),
-             metadatatypeList.end(),
-             std::ostream_iterator<ossimString>(std::cout, "\t\n"));
-}
diff --git a/src/apps/ossim-info/.cvsignore b/src/apps/ossim-info/.cvsignore
deleted file mode 100644
index 3b31e93..0000000
--- a/src/apps/ossim-info/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-*.d
-*.o
-*.exe
-*.~*
-image_info
diff --git a/src/apps/ossim-info/ossim-info.cpp b/src/apps/ossim-info/ossim-info.cpp
deleted file mode 100644
index 88f92fc..0000000
--- a/src/apps/ossim-info/ossim-info.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossim-info.cpp 18619 2011-01-03 10:33:51Z dburken $
-
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/util/ossimInfo.h>
-
-#include <iostream>
-using namespace std;
-
-int main(int argc, char *argv[])
-{
-   //---
-   // Get the arg count so we can tell if an arg was consumed by
-   // ossimInit::instance()->initialize
-   //---
-   int originalArgCount = argc;
-
-   ossimArgumentParser ap(&argc, argv);
-
-   // Initialize ossim stuff, factories, plugin, etc.
-   ossimInit::instance()->initialize(ap);
-
-   //---
-   // Avoid going on if a global option was consumed by ossimInit::initialize
-   // like -V or --version option and the arg count is down to 1.
-   //---
-   if ( ( ap.argc() > 1 ) || ( ap.argc() == originalArgCount ) )
-   {
-      // Make the info object.
-      ossimRefPtr<ossimInfo> oi = new ossimInfo;
-
-      try
-      {
-         //---
-         // Initialize will take the options passed in and set things to output
-         // information for.
-         //
-         // ossimInfo::initialize can throw an exception.
-         //---
-         bool continue_after_init = oi->initialize(ap);
-
-         if ( continue_after_init )
-         {
-            // This will actually output the information.
-            oi->execute();
-         }
-      }
-      catch (const ossimException& e)
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
-         return 1;
-      }
-      
-   }  // End: if ( ( ap.argc() > 1 ) ...
-   
-   return 0;
-   
-} // End of main...
diff --git a/src/apps/ossim-orthoigen/ossim-orthoigen.cpp b/src/apps/ossim-orthoigen/ossim-orthoigen.cpp
deleted file mode 100644
index 02c907b..0000000
--- a/src/apps/ossim-orthoigen/ossim-orthoigen.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossim-orthoigen.cpp 3023 2011-11-02 15:02:27Z david.burken $
-
-#include <iostream>
-#include <cstdlib>
-#include <list>
-#include <fstream>
-#include <iterator>
-#include <iomanip>
-using namespace std;
-
-#include <ossim/parallel/ossimOrthoIgen.h>
-#include <ossim/parallel/ossimMpi.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimTimer.h>
-#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
-#include <sstream>
-
-static ossimTrace traceDebug("orthoigen:debug");
-
-//*************************************************************************************************
-// USAGE
-//*************************************************************************************************
-static void usage()
-{
-   ossimNotify(ossimNotifyLevel_NOTICE) <<
-      "Valid output writer types for \"-w\" or \"--writer\" option:\n\n" << ends;
-   ossimImageWriterFactoryRegistry::instance()->
-      printImageTypeList(ossimNotify(ossimNotifyLevel_NOTICE));
-}
-
-//*************************************************************************************************
-// FINALIZE -- Convenient location for placing debug breakpoint for catching program exit.
-//*************************************************************************************************
-void finalize(int code)
-{
-   exit (code);
-}
-
-//*************************************************************************************************
-// MAIN
-//*************************************************************************************************
-int main(int argc, char* argv[])
-{
-#if OSSIM_HAS_MPI
-   ossimMpi::instance()->initialize(&argc, &argv);
-   if (ossimMpi::instance()->getRank() == 0)
-   {
-      ossimNotify(ossimNotifyLevel_INFO)
-         << "MPI running with "
-         << ossimMpi::instance()->getNumberOfProcessors()
-         << " processors..." << std::endl;
-   }
-#endif
-
-   //---
-   // Start the timer.  Note ossimMpi::instance()->getRank() works with or without
-   // mpi being enabled.
-   //---
-   if (ossimMpi::instance()->getRank() == 0) ossimTimer::instance()->setStartTick();
-
-   enum
-   {
-      OK    = 0,
-      ERROR = 1
-   };
-
-   // Turn off the initial load of elevation.  This will be loaded if needed later.
-   ossimInit::instance()->setElevEnabledFlag(false);
-   
-   ossimRefPtr<ossimOrthoIgen> orthoIgen = new ossimOrthoIgen;
-   ossimArgumentParser argumentParser(&argc, argv);
-   ossimInit::instance()->addOptions(argumentParser);
-   ossimInit::instance()->initialize(argumentParser);
-   ossimApplicationUsage* u = argumentParser.getApplicationUsage();
-   u->setApplicationName(argumentParser.getApplicationName());
-   u->setCommandLineUsage(     
-      "\n\n"
-      "    ossim-orthoigen [options] \"<input_image1>[|switches]\" \"[<input_image2>[|switches]\" ...] <output_image>\n"
-      "\n"
-      "    ossim-orthoigen [options] <input_spec>.src <output_image>");
-
-   u->setDescription(
-      "Creates a product image given an input specification as described below. There are two ways\n"
-      "of specifying the input source list. Switches on explicit form are \n"
-      "\n"
-      "    <N>|<B1,B2,...>|<histo-op>|<ovr_path>. \n"
-      "\n"
-      "The <histo-op> presently can be either \"auto-minmax\" or \"std-stretch-N\" where N=1, 2 or 3.\n"
-      "The <input_spec>.src keyword list contains keyword entries in the form of \n"
-      "\n"
-      "    imageN.<keyword>: value\n"
-      "\n"
-      "Supported keywords are \"file\", \"entry\", \"rgb\", \"hist\", \"ovr\", with values \n"
-      "identical to those specified in the explicit switch form.\n");
-
-   orthoIgen->addArguments(argumentParser);
-   u->addCommandLineOption("-h or --help","Display this information");
-   u->addCommandLineOption(
-      "--enable-entry-decoding","A filename can be separated by a | and a number (NO space).  \n"
-      "Example: a.toc|0 will do entry 0 of a.toc file and on unix you might want to use a \\ since\n"
-      "the separator is a pipe sign. Example: ./a.toc\\|0 will do entry 0 of a.toc.");
-
-   if (argumentParser.read("-h") || argumentParser.read("--help") || (argumentParser.argc() == 1))
-   {
-      u->write(ossimNotify(ossimNotifyLevel_INFO));
-      usage();
-      ossimMpi::instance()->finalize();
-      ossimInit::instance()->finalize();
-      finalize(OK);
-   }
-   bool enableEntryDecoding = false;
-   if(argumentParser.read("--enable-entry-decoding"))
-   {
-      enableEntryDecoding = true;
-   }
-   
-   orthoIgen->initialize(argumentParser);
-   argumentParser.reportRemainingOptionsAsUnrecognized();
-   if (argumentParser.errors())
-   {
-      argumentParser.writeErrorMessages(ossimNotify(ossimNotifyLevel_WARN));
-      ossimMpi::instance()->finalize();
-      finalize(OK);
-   }
-   
-   orthoIgen->clearFilenameList();
-   orthoIgen->addFiles(argumentParser, enableEntryDecoding);
-
-   int status = OK;
-
-   try
-   {
-      orthoIgen->execute();
-   }
-   catch (const ossimException& e)
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
-      status = ERROR;
-   }
-   
-   if(ossimMpi::instance()->getRank() == 0)
-   {
-      ossimNotify(ossimNotifyLevel_NOTICE)
-         << std::setiosflags(ios::fixed)
-         << std::setprecision(3)
-         << "Time elapsed : " << ossimTimer::instance()->time_s() 
-         << std::endl;
-   }
-   
-   ossimMpi::instance()->finalize();
-   finalize(status); 
-}
diff --git a/src/apps/ossim-pixelflip/ossim-pixelflip.cpp b/src/apps/ossim-pixelflip/ossim-pixelflip.cpp
deleted file mode 100644
index a338e69..0000000
--- a/src/apps/ossim-pixelflip/ossim-pixelflip.cpp
+++ /dev/null
@@ -1,418 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-//*******************************************************************
-//  $Id: ossim-pixelflip.cpp 2644 2011-05-26 15:20:11Z oscar.kramer $
-
-
-#include <iostream>
-#include <sstream>
-#include <algorithm>
-#include <iterator>
-
-#include <ossim/ossimConfig.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimImageTypeLut.h>
-
-#include <ossim/imaging/ossimJpegWriter.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimPixelFlipper.h>
-#include <ossim/imaging/ossimRLevelFilter.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
-#include <ossim/imaging/ossimImageWriterFactory.h>
-#include <ossim/imaging/ossimImageFileWriter.h>
-#include <ossim/imaging/ossimScalarRemapper.h>
-#include <ossim/imaging/ossimBandSelector.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/parallel/ossimMpi.h>
-#include <ossim/parallel/ossimImageMpiMWriterSequenceConnection.h>
-#include <ossim/parallel/ossimImageMpiSWriterSequenceConnection.h>
-
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-
-#ifdef OSSIM_HAS_MPI
-#  if OSSIM_HAS_MPI
-#    include <mpi.h>
-#  endif
-#endif
-
-static ossimTrace traceDebug("pixelflip:main");
-static void usage();
-static void outputWriterTypes();
-int main(int argc, char* argv[])
-{
-   
-#ifdef OSSIM_HAS_MPI
-#  if OSSIM_HAS_MPI
-   ossimMpi::instance()->initialize(&argc, &argv);
-   if (ossimMpi::instance()->getRank() == 0)
-   {
-      ossimNotify(ossimNotifyLevel_INFO)
-         << "MPI running with "
-         << ossimMpi::instance()->getNumberOfProcessors()
-         << " processors..." << std::endl;
-   }
-#  endif
-#endif
-   
-   std::string tempString;
-   ossimArgumentParser::ossimParameter stringParam(tempString);
-   ossimArgumentParser argumentParser(&argc, argv);
-   ossimInit::instance()->addOptions(argumentParser);
-   ossimInit::instance()->initialize(argumentParser);
-   
-   argumentParser.getApplicationUsage()->setApplicationName(argumentParser.getApplicationName());
-   argumentParser.getApplicationUsage()->setDescription(argumentParser.getApplicationName()+" flips any null pixels to a valid pixel");
-   argumentParser.getApplicationUsage()->setCommandLineUsage(argumentParser.getApplicationName()+" [options] <output_type> <input_file> <output_file> <target_value> <replacement_value>");
-   argumentParser.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
-   argumentParser.getApplicationUsage()->addCommandLineOption("-o or --create-overview", "Creates and overview for the output image");
-   argumentParser.getApplicationUsage()->addCommandLineOption("-c or --clamp-value", "clamp values (any pixel with value larger than input will be clamped to input)");
-   argumentParser.getApplicationUsage()->addCommandLineOption("-m",  "Replacement mode (see notes below)");
-   argumentParser.getApplicationUsage()->addCommandLineOption("-w",  "output tile width(only valid with tiled output types).  Must be a multiply of 16");
-   
- 
-   static const char MODULE[] = "pixelflip:main";
-   if (traceDebug()) CLOG << " Entered..." << std::endl;
-   ossimInit::instance()->initialize(argc, argv);
-   // Keyword list to initialize image writers with.
-   ossimKeywordlist kwl;
-   const char* PREFIX = "imagewriter.";
-   bool create_overview = false;
-   ossim_int32 tile_width = 0;
-   double clamp_value = 0.0;
-   bool do_clamp = false;
-   ossimPixelFlipper::ReplacementMode replacement_mode =
-      ossimPixelFlipper::REPLACE_BAND_IF_TARGET;
-
-
-   if(argumentParser.read("-h") || argumentParser.read("--help")||(argumentParser.argc() == 1))
-   {
-      argumentParser.getApplicationUsage()->write(ossimNotify(ossimNotifyLevel_INFO));
-      usage();
-      exit(0);
-   }
-   while(argumentParser.read("-o") || argumentParser.read("--create-overview"))
-   {
-      create_overview = true;
-   }
-   while(argumentParser.read("-c", stringParam))
-   {
-      clamp_value = ossimString(tempString).toDouble();
-      do_clamp = true;
-   }
-   while(argumentParser.read("-m", stringParam))
-   {
-      ossimString mode = tempString;
-      mode.downcase();
-      if (mode == "replace_band_if_target")
-      {
-         replacement_mode = ossimPixelFlipper::REPLACE_BAND_IF_TARGET;
-      }
-      else if (mode == "replace_band_if_partial_target")
-      {
-         replacement_mode =
-            ossimPixelFlipper::REPLACE_BAND_IF_PARTIAL_TARGET;
-      }
-      else if (mode == "replace_all_bands_if_partial_target")
-      {
-         replacement_mode = ossimPixelFlipper::REPLACE_ALL_BANDS_IF_PARTIAL_TARGET;
-      }
-      else if (mode != "replace_all_targets")
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "Invalid mode:  "
-            << mode
-            << "\nMode remains:  replace_band_if_target"
-            << std::endl;
-      }
-   }
-   while(argumentParser.read("-w", stringParam))
-   {
-      tile_width = ossimString(tempString).toInt32();
-      if (tile_width % 16)
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << MODULE
-            << " NOTICE:"
-            << "\nTile width must be a multiple of 16!"
-            << "\nDefaulting to 128"
-            << std::endl;
-         tile_width = 0;
-      }
-   }
-
-   if(argumentParser.argc() != 6)
-   {
-      ossimMpi::instance()->finalize();
-      
-      exit(0);
-   }
-   //***
-   // Set the writer type and the image type.
-   //***
-   ossimString output_type = argumentParser.argv()[1];
-   output_type.downcase();
-   kwl.add(PREFIX, ossimKeywordNames::TYPE_KW, output_type.c_str());
-   // Get the input file.
-   ossimFilename input_file = argumentParser.argv()[2];
-   // Get the output file.
-   ossimFilename    output_file = argumentParser.argv()[3];
-   // Get the value to replace.
-   double target_value = ossimString(argumentParser.argv()[4]).toDouble();
-   // Get the replacement value.
-   double replacement_value = ossimString(argumentParser.argv()[5]).toDouble();
-   bool master = true;
-
-   if (ossimMpi::instance()->getRank() != 0)
-   {
-      master = false;
-   }
-   if (master)
-   {
-      ossimNotify(ossimNotifyLevel_INFO)
-         << "pixelflip settings:"
-         << "\noutput type:        " << output_type
-         << "\ninput file:         " << input_file
-         << "\noutput file:        " << output_file
-         << "\ntarget value:       " << target_value
-         << "\nreplacement value:  " << replacement_value
-         << std::endl;
-      if (tile_width)
-      {
-         ossimNotify(ossimNotifyLevel_INFO)
-            << "tile width:         " << tile_width << std::endl;
-      }
-      if (do_clamp)
-      {
-          ossimNotify(ossimNotifyLevel_INFO)
-             << "clamp value:        " << clamp_value << std::endl;
-      }
-   }
-   // Get an image handler for the input file.
-   ossimRefPtr<ossimImageHandler> ih
-      = ossimImageHandlerRegistry::instance()->open(ossimFilename(input_file));
-   if (!ih)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "Unsupported image file:  " << input_file
-         << "\nExiting application..." << std::endl;
-      ossimMpi::instance()->finalize();
-      exit(0);
-   }
-   // Initialize the
-   if (ih->getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "Error reading image:  " << input_file
-         << "Exiting application..." << std::endl;
-      ossimMpi::instance()->finalize();
-      exit(1);
-   }
-   ih->initialize();
-   if (traceDebug())
-   {
-      CLOG << "DEBUG:"
-           << "\nImage Handler:  " << ih->getLongName()
-           << std::endl;
-   }
-   // Capture the bounding rectangle of the image handler.
-   ossimIrect output_rect = ih->getBoundingRect(0);
-   // hook up the pixel flipper to the image handler.
-   ossimRefPtr<ossimPixelFlipper> pf = new ossimPixelFlipper();
-   pf->connectMyInputTo(ih.get());
-   pf->initialize();
-   // Setup the pixel flipper target/replacement values, and replace mode.
-   pf->setTargetValue(target_value);
-   pf->setReplacementValue(replacement_value);
-   pf->setReplacementMode(replacement_mode);
-   // Setup pixel flipper clamp value
-   if (do_clamp)
-   {
-      pf->setClampValue(clamp_value);
-   }
-   if (master)
-   {
-      ossimNotify(ossimNotifyLevel_INFO)
-         << "replacement mode:   " << pf->getReplacementModeString()
-         << std::endl;
-   }
-   ossimImageSourceSequencer* sequencer = NULL;
-
-#ifdef OSSIM_HAS_MPI
-#  if OSSIM_HAS_MPI
-   // only allocate the slave connection if
-   // the number of processors is larger than
-   // 1
-   //
-   if(ossimMpi::instance()->getNumberOfProcessors() > 1)
-   {
-      if(ossimMpi::instance()->getRank()!=0)
-      {
-         sequencer = new ossimImageMpiSWriterSequenceConnection(NULL, 4);
-      }
-      else
-      {
-         sequencer = new ossimImageMpiMWriterSequenceConnection();
-      }
-   }
-   else
-   {
-      sequencer = new ossimImageSourceSequencer();
-   }
-#  else
-   // we will just load a serial connection if MPI is not supported.
-   sequencer = new ossimImageSourceSequencer(NULL);
-#  endif
-#else
-   sequencer = new ossimImageSourceSequencer(NULL);
-#endif
-   
-   ossimRefPtr<ossimImageWriter> writer
-      = ossimImageWriterFactoryRegistry::instance()->createWriter(kwl, PREFIX);
-   ossimImageFileWriter* fileWriter = PTR_CAST(ossimImageFileWriter, writer.get());
-   if( fileWriter == NULL )
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "Error making an image writer..."
-         << "\nExiting application..." << std::endl;
-      ossimMpi::instance()->finalize();
-      exit(1);
-   }
-   // Change out the sequencer...
-   fileWriter->changeSequencer(sequencer);
-   // Hook up the pixel flipper to the file writer.
-   fileWriter->connectMyInputTo(0, pf.get());
-   if (tile_width)
-   {
-      // Set the tile size...
-      fileWriter->setTileSize(ossimIpt(tile_width, tile_width));
-   }
-   fileWriter->open(output_file);
-   // Add a listener to get percent complete.
-   ossimStdOutProgress prog(0, true);
-   fileWriter->addListener(&prog);
-   if (fileWriter->getErrorStatus() == ossimErrorCodes::OSSIM_OK)
-   {
-      fileWriter->initialize();
-      fileWriter->setAreaOfInterest(output_rect); // Set the output rectangle.
-
-#ifdef OSSIM_HAS_MPI
-#  if OSSIM_HAS_MPI
-      double start_time = 0.0;
-      if(ossimMpi::instance()->getRank() == 0)
-      {
-         start_time= MPI_Wtime();
-      }
-#  endif
-#endif
-
-      // Filter and write the file...
-      fileWriter->execute();
-
-#ifdef OSSIM_HAS_MPI
-#  if OSSIM_HAS_MPI
-      if(ossimMpi::instance()->getRank() == 0)
-      {
-         double stop_time = MPI_Wtime();
-         cout << "Elapsed time: " << (stop_time-start_time) << std::endl;
-      }
-#  endif
-#endif
-   }
-   else
-   {
-      cerr << "Error detected in the image writer..."
-           << "\nExiting application..." << std::endl;
-      exit(1);
-   }
-   if (create_overview == true)
-   {
-      fileWriter->writeOverviewFile();
-   }
-
-#ifdef OSSIM_HAS_MPI
-#  if OSSIM_HAS_MPI   
-   ossimMpi::instance()->finalize();
-#  endif
-#endif
-   
-   exit(0);
-}
-void usage()
-{
-   ossimNotify(ossimNotifyLevel_INFO)
-      << "\nNOTES:"
-      << "\n-m Replacement mode option explanation:"
-      << "\n   Valid modes (default=replace_all_targets) :"
-      << "\n     replace_partial_targets"
-      << "\n     replace_partial_targets_all_bands"
-      << "\n     replace_full_targets"
-      << "\n     replace_all_targets"
-      << " (default=all)"
-      << "\n"
-      << "\nIf mode is \"replace_all_targets\" (default):"
-      << "\nAny pixel with dn of target will be replaced."
-      << "\n"
-      << "\nIf mode is \"replace_partial_targets\":"
-      << "\nTarget will be replaced only at least one subpixel(band) does "
-      << "\nnot have the target."
-      << "\n"
-      << "\nIf mode is \"replace_partial_targets_all_bands\":"
-      << "\nTarget will be replaced only at least one subpixel(band) does "
-      << "\nnot have the target.  All bands will be replaced."
-      << "\nThis is a good Landsat7 edge fixer..."
-      << "\n"
-      << "\nIf mode is \"replace_full_targets\":"
-      << "\nTarget will be repaced only if all subpixels(bands) have the "
-      << "target."
-      << "\n"
-      << "\n Example:"
-      << "\n target      = 0"
-      << "\n replacement = 1"
-      << "\n Pixel at (0, 0) r=0, g=0,  b=0"
-      << "\n Pixel at (0, 1) r=0, g=30, b=21"
-      << "\n"
-      << "\n Mode is \"replace_all_targets\":"
-      << "\n Pixel at (0, 0) becomes  r=1, g=1,  b=1"
-      << "\n Pixel at (0, 1) becomes  r=1, g=30, b=21"
-      << "\n"
-      << "\n Mode is \"replace_partial_targets\":"
-      << "\n Pixel at (0, 0) remains  r=0, g=0,  b=0"
-      << "\n Pixel at (0, 1) becomes  r=1, g=30, b=21"
-      << "\n"
-      << "\n Mode is \"replace_partial_targets_all_bands\":"
-      << "\n Pixel at (0, 0) remains  r=0, g=0,  b=0"
-      << "\n Pixel at (0, 1) becomes  r=1, g=1, b=1"
-      << "\n"
-      << "\n Mode is \"replace_full_targets\":"
-      << "\n Pixel at (0, 0) becomes  r=1, g=1,  b=1"
-      << "\n Pixel at (0, 1) remains  r=0, g=30, b=21"
-      << "\n"
-      << "\nValid output writer types:"
-      << std::endl;
-   outputWriterTypes();
-}
-
-void outputWriterTypes()
-{
-   std::vector<ossimString> outputType;
-   
-   ossimImageWriterFactoryRegistry::instance()->getImageTypeList(outputType);
-   std::copy(outputType.begin(),
-             outputType.end(),
-             std::ostream_iterator<ossimString>(std::cout, "\t\n"));
-}
diff --git a/src/apps/ossim-preproc/ossim-preproc.cpp b/src/apps/ossim-preproc/ossim-preproc.cpp
deleted file mode 100644
index b695124..0000000
--- a/src/apps/ossim-preproc/ossim-preproc.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossim-info.cpp 18619 2011-01-03 10:33:51Z dburken $
-
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimTimer.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/util/ossimImageUtil.h>
-
-int main(int argc, char *argv[])
-{
-   // Return 0 on success, something else on error.
-   enum
-   {
-      OK    = 0,
-      ERROR = 1
-   };
-   
-   int result = OK;
-   
-   // Start the timer.
-   ossimTimer::instance()->setStartTick();
-
-   //---
-   // Get the arg count so we can tell if an arg was consumed by
-   // ossimInit::instance()->initialize
-   //---
-   int originalArgCount = argc;
-
-   ossimArgumentParser ap(&argc, argv);
-
-   // Initialize ossim stuff, factories, plugin, etc.
-   ossimInit::instance()->initialize(ap);
-
-   //---
-   // Avoid going on if a global option was consumed by ossimInit::initialize
-   // like -V or --version option and the arg count is down to 1.
-   //---
-   if ( ( ap.argc() > 1 ) || ( ap.argc() == originalArgCount ) )
-   {
-      // Make the info object.
-      ossimRefPtr<ossimImageUtil> oiu = new ossimImageUtil();
-      
-      try
-      {
-         //---
-         // Initialize will take the options passed in and set things to output
-         // information for.
-         //
-         // ossimInfo::initialize can throw an exception.
-         //---
-         bool continue_after_init = oiu->initialize(ap);
-         
-         if ( continue_after_init )
-         {
-            // Execute the operation(s).
-            result = oiu->execute();
-
-            ossimNotify(ossimNotifyLevel_NOTICE)
-               << "elapsed time in seconds: "
-               << std::setiosflags(ios::fixed)
-               << std::setprecision(3)
-               << ossimTimer::instance()->time_s() << endl;
-         }
-      }
-      catch (const ossimException& e)
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
-         result = ERROR;
-      }
-      
-   }  // End: if ( ( ap.argc() > 1 ) ...
-   
-   return result;
-   
-} // End of main...
diff --git a/src/apps/ossim-prune/ossim-prune.cpp b/src/apps/ossim-prune/ossim-prune.cpp
deleted file mode 100644
index 0d2585b..0000000
--- a/src/apps/ossim-prune/ossim-prune.cpp
+++ /dev/null
@@ -1,130 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Lucas
-//
-//*******************************************************************
-//  $Id: prune.cpp 10698 2007-04-12 13:59:43Z gpotts $
-
-
-#include <iostream>
-#include <stdlib.h>
-using namespace std;
-
-#include <ossim/ossimConfig.h>
-
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimErrorCodes.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/init/ossimInit.h>
-
-static ossimTrace traceDebug("prune:main");
-
-static void usage();
-
-int main(int argc, char* argv[])
-{
-   ossimInit::instance()->initialize(argc, argv);
-   
-   // One required arg:  input file
-   if (argc != 2)
-   {
-      usage();
-      exit(0);
-   }
-
-   const char* input_file = argv[1];
-
-   // Get an image handler for the input file.
-   ossimRefPtr<ossimImageHandler> ih
-      = ossimImageHandlerRegistry::instance()->open(ossimFilename(input_file));
-
-   if (!ih)
-   {
-      cout << "ERROR: Unsupported image file: " << input_file
-           << "\nExiting application." << endl;
-      exit(0);
-   }
-
-   // Initialize the 
-   if (ih->getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
-   {
-      cerr << "ERROR: Unable to read image file: " << input_file
-           << "\nExiting application." << endl; 
-      exit(1);
-   }
-
-   ih->initialize();
-
-   int lines   = ih->getNumberOfLines(0);
-   int samples = ih->getNumberOfSamples(0);
-   int tileHeight = ih->getTileHeight();
-   int tileWidth = ih->getTileWidth();
-   int tilesInLineDir = lines / tileHeight;
-   int tilesInSampDir = samples / tileWidth;
-
-   if(lines % tileHeight) ++tilesInLineDir;
-
-   if(samples % tileWidth) ++tilesInSampDir;
-
-   for(int i=0; i<tilesInLineDir; i++)
-   {
-      for(int j=0; j<tilesInSampDir; j++)
-      {
-         ossimIpt origin(j*tileWidth,i*tileHeight);
-         ossimRefPtr<ossimImageData> id=ih->getTile(origin);
-         if( id.valid() && (id->getDataObjectStatus() != OSSIM_EMPTY) )
-         {
-            cout << "RESULT: Image file has data: " << input_file << endl;
-            exit(0);
-         }
-      }
-   }
-
-   
-   ossimFilename f = input_file;
-
-   ossimFilename f2 = f.fileNoExtension();
-   f2 += ".readme.txt";
-   
-   f+= ".null";
-   
-   ossimFilename f3 = f.fileNoExtension();
-   f3 += ".readme.txt.null";
-
-   ossimString command="mv ";
-   command+= input_file;
-   command+= " ";
-   command+= f;
-   
-   cout << "Executing " << command << endl;
-
-   system(command.c_str());
-
-   command="mv ";
-   command+= f2;
-   command+= " ";
-   command+= f3;
-   
-   cout << "Executing " << command << endl;
-
-   system(command.c_str());
-   
-   exit(0);
-}
-   
-void usage()
-{
-   cout << "prune: Displays if image is null or not.\n"
-        << "Usage:\n"
-        << "ossim-prune <image_file>"
-        << "\n";
-   return;
-}
diff --git a/src/apps/ossim-src2src/ossim-src2src.cpp b/src/apps/ossim-src2src/ossim-src2src.cpp
deleted file mode 100644
index 1016312..0000000
--- a/src/apps/ossim-src2src/ossim-src2src.cpp
+++ /dev/null
@@ -1,522 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Mingjie Su
-//
-//*******************************************************************
-//  $Id: ossim-src2src.cpp 2644 2011-05-26 15:20:11Z oscar.kramer $
-
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <ossim/base/ossimContainerProperty.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimObjectFactoryRegistry.h>
-#include <ossim/base/ossimPreferences.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
-#include <ossim/imaging/ossimTilingPoly.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/plugin/ossimSharedPluginRegistry.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimMapProjectionInfo.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/projection/ossimEquDistCylProjection.h>
-#include <ossim/support_data/ossimInfoBase.h>
-#include <ossim/support_data/ossimInfoFactoryRegistry.h>
-#include <ossim/support_data/ossimSrcRecord.h>
-
-#include <iostream>
-#include <vector>
-using namespace std;
-
-
-//**************************************************************************
-// usage()
-//**************************************************************************
-void usage()
-{
-   ossimNotify(ossimNotifyLevel_INFO)
-      << " examples:\n\n"
-      << "    ossim-create-src --tiling-template ./mytemplate.template ./myfile.tif ./outdir\n"
-      << std::endl;;
-}
-
-//*****************************************************************************************
-// Centralized point to capture all program exits (aids in debugging -- please leave)
-//*****************************************************************************************
-void finalize(int exit_code)
-{
-   exit(exit_code);
-}
-
-void parseSrcFile(const ossimFilename& srcFile, vector<ossimSrcRecord>& srcRecordFiles, ossimString& prefix)
-{
-   if (!srcFile.isReadable())
-      return;
-
-   ossimKeywordlist src_kwl (srcFile);
-   unsigned int image_idx = 0;
-   ossimString lookup = src_kwl.find("dem0.file");
-   if (!lookup.empty())
-   {
-      prefix = "dem";
-   }
-
-   // Loop to read all image file entries:
-   while (true)
-   {
-      ossimSrcRecord srcRecord(src_kwl, image_idx++, prefix);
-      if (!srcRecord.valid()) 
-         break;
-
-      srcRecordFiles.push_back(srcRecord);
-   }
-}
-
-ossimRefPtr<ossimTilingPoly> getTiling(const ossimFilename& templateFile)
-{
-   ossimKeywordlist templateKwl;
-   if (!templateKwl.addFile(templateFile))
-   {
-      return 0;
-   }
-
-   ossimString prefix ("igen.tiling.");
-   while (1)
-   {
-      if (templateKwl.find(prefix.chars(), "tile_source"))
-      {
-         break;
-      }
-      else
-      {
-         return 0;
-      }
-
-      // If we got here, then no matches were found in the template. Try again but without a prefix:
-      if (prefix.empty())
-         break;
-      prefix.clear();
-   }
-
-   // Initialize the tiling object if enabled:
-   ossimRefPtr<ossimTilingPoly> tiling = new ossimTilingPoly;
-  
-   if (!tiling->loadState(templateKwl, prefix))
-   {
-      return 0;
-   }
-
-   return tiling;
-}
-
-ossimDrect getRect(ossimRefPtr<ossimMapProjection> mapProj, 
-   vector<ossimGpt> points)
-{
-   std::vector<ossimDpt> rectTmp;
-   rectTmp.resize(points.size());
-
-   for(std::vector<ossimGpt>::size_type index=0; index < points.size(); ++index)
-   {
-      mapProj->worldToLineSample(points[(int)index], rectTmp[(int)index]);
-   }
-
-   if (rectTmp.size() > 3)
-   {
-      ossimDrect rect2 = ossimDrect(rectTmp[0],
-         rectTmp[1],
-         rectTmp[2],
-         rectTmp[3]);
-
-      return rect2;
-   }
-   return ossimDrect();
-}
-
-//**************************************************************************
-// Main Application
-//**************************************************************************
-int main(int argc, char *argv[])
-{
-   std::string tempString1;
-   ossimArgumentParser::ossimParameter stringParam1(tempString1);
-   std::string tempString2;
-   ossimArgumentParser::ossimParameter stringParam2(tempString2);
-
-   ossimArgumentParser argumentParser(&argc, argv);
-   ossimInit::instance()->addOptions(argumentParser);
-   ossimInit::instance()->initialize(argumentParser);
-
-   ossimApplicationUsage* appuse = argumentParser.getApplicationUsage();
-   
-   appuse->setApplicationName(argumentParser.getApplicationName());
-
-   appuse->setDescription(argumentParser.getApplicationName()+
-      " generate src files for polygons.");
-
-   appuse->setCommandLineUsage(argumentParser.getApplicationName()+
-      "ossim-create-src [--tiling-template] <full path to template file>");
-                          
-   appuse->addCommandLineOption("--tiling-template", "Specify an external file that contains tiling information.");
-
-   ossimFilename templateFile = "";
-  
-   if(argumentParser.read("--tiling-template", stringParam1))
-   {
-      templateFile = ossimFilename(tempString1);
-   }
-
-   // End of arg parsing.
-   argumentParser.reportRemainingOptionsAsUnrecognized();
-   if ( argumentParser.errors() )
-   {
-      argumentParser.writeErrorMessages(ossimNotify(ossimNotifyLevel_NOTICE));
-      finalize(1);
-   }
-
-   if (argc == 1)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)<< "Must supply an input file or info option." << std::endl;
-      finalize(0);
-   }
-
-   ossim_uint32 idx = 0;
-   ossim_uint32 last_idx = argumentParser.argc()-1;
-   ossimFilename inputSrcFile = "";
-   ossimString prefixStr = "image";
-   vector<ossimSrcRecord> inputFiles;
-   while(argumentParser.argv()[idx] && (idx < last_idx))
-   {
-      ossimString file = argumentParser.argv()[idx];
-      if (file.contains(".src"))
-      {
-         // input file spec provided via src file. Need to parse it:
-         inputSrcFile = ossimFilename(file);
-         if (!inputSrcFile.exists() )
-         {
-            ossimNotify(ossimNotifyLevel_WARN) << "ossim-src2src: file does not exist:  " << inputSrcFile
-               << std::endl;
-            finalize(1);
-         }
-         parseSrcFile(inputSrcFile, inputFiles, prefixStr);
-      }
-      ++idx;
-   }
-
-   // The last filename left on the command line should be the product filename:
-   ossimFilename outputFileDir = argumentParser.argv()[last_idx];
-   if (!outputFileDir.isDir())
-   {
-      outputFileDir = outputFileDir.path();
-      if (!outputFileDir.exists() )
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << "ossim-src2src: output directory does not exist:  " << outputFileDir
-            << std::endl;
-         finalize(1);
-      }
-   }
-
-   if (!templateFile.exists())
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "ossim-src2src: template file does not exist::  " << templateFile
-         << std::endl;
-      finalize(1);
-   }
-
-   ossimRefPtr<ossimTilingPoly> polyTiling = getTiling(templateFile);
-   if (!polyTiling.valid())
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "ossim-src2src: error generating tiling:  " << templateFile
-         << std::endl;
-      finalize(1);
-   }
-
-   // Open up src file to get coordinate info from each file listed in src file.
-   ossim_float64 minLat = 90.0;
-   ossim_float64 maxLat = -90.0;
-   ossim_float64 minLon = 180.0;
-   ossim_float64 maxLon = -180.0;
-
-   ossimString tileName;
-   ossimIrect clipRect;
-   map<ossimString, ossimSrcRecord> infos;
-   ossimRefPtr<ossimMapProjection> mapProj = 0;
-
-   for (ossim_uint32 i = 0; i < inputFiles.size(); i++)
-   {
-      ossimFilename inputFile = inputFiles[i].getFilename();
-      vector<ossim_uint32> entryList;
-      ossimRefPtr<ossimImageHandler> ih = ossimImageHandlerRegistry::instance()->open(inputFile);
-      if (ih.valid() )
-      {
-         if(inputFiles[i].getEntryIndex() > -1 )
-         {
-            entryList.push_back(inputFiles[i].getEntryIndex());
-         }
-         else
-         {
-            ih->getEntryList(entryList);
-         }
-
-         for(ossim_uint32 entryIdx = 0; entryIdx < entryList.size(); ++entryIdx)
-         {
-            // Establish the image handler for this particular frame. This may be just
-            // the handler already opened in the case of single image per file:
-            ossimImageHandler* img_handler = 0;
-            if (entryList.size() == 1)
-            {
-               img_handler = ih.get();
-            }
-            else
-            {
-               img_handler = (ossimImageHandler*)ih->dup();
-            }
-
-            img_handler->setCurrentEntry(entryList[entryIdx]);
-
-            ossimDrect outputRect = img_handler->getBoundingRect();
-
-            ossimRefPtr<ossimImageGeometry> geom = img_handler->getImageGeometry();
-            if(geom.valid())
-            {
-               ossimGpt ulg;
-               ossimGpt llg;
-               ossimGpt lrg;
-               ossimGpt urg;
-
-               geom->localToWorld(outputRect.ul(), ulg);
-               geom->localToWorld(outputRect.ll(), llg);
-               geom->localToWorld(outputRect.lr(), lrg);
-               geom->localToWorld(outputRect.ur(), urg);
-
-               //find min and max lat, lon for whole src file
-               if (minLat > llg.lat)
-               {
-                  minLat = llg.lat;
-               }
-
-               if (minLon > llg.lon)
-               {
-                  minLon = llg.lon;
-               }
-
-               if (maxLat < urg.lat)
-               {
-                  maxLat = urg.lat;
-               }
-
-               if (maxLon < urg.lon)
-               {
-                  maxLon = urg.lon;
-               }
-
-               ossimString fileInfo = inputFile + "|" + ossimString::toString(entryIdx) + "|" + 
-                  ossimString::toString(ulg.lon) + "," + ossimString::toString(ulg.lat) + "," + 
-                  ossimString::toString(urg.lon) + "," + ossimString::toString(urg.lat) + "," + 
-                  ossimString::toString(lrg.lon) + "," + ossimString::toString(lrg.lat) + "," + 
-                  ossimString::toString(llg.lon) + "," + ossimString::toString(llg.lat);
-
-               infos[fileInfo] = inputFiles[i];
-
-               if (!mapProj.valid())
-               {
-                  ossimRefPtr<ossimProjection> proj = geom->getProjection();
-                  if (proj.valid())
-                  {
-                     mapProj = PTR_CAST(ossimMapProjection, proj->dup());
-                     if (!mapProj.valid()) //default it to ossimEquDistCylProjection
-                     {
-                        mapProj = new ossimEquDistCylProjection;
-                        mapProj->setMetersPerPixel(geom->getMetersPerPixel());
-                     }
-                  }
-               }
-            }
-            img_handler = 0;
-         }
-         ih = 0;
-      }
-      else
-      {
-         continue;
-      }
-   }
-   inputFiles.clear();
-
-   //get bounding rect for entire image
-   vector<ossimGpt> points;
-   if (points.size() == 0)
-   {
-      points.push_back(ossimGpt(maxLat, minLon));
-      points.push_back(ossimGpt(maxLat, maxLon));
-      points.push_back(ossimGpt(minLat, maxLon));
-      points.push_back(ossimGpt(minLat, minLon));
-   }
-
-   if(mapProj.valid())
-   {
-      ossimGpt tie(maxLat, minLon);
-      mapProj->setUlTiePoints(tie);
-      polyTiling->initialize(*(mapProj.get()), getRect(mapProj, points));
-   }
-
-   while(polyTiling->next(mapProj, clipRect, tileName))
-   {
-      ossimFilename outSrc = outputFileDir + "/" + ossimFilename(tileName).noExtension() + ".src";
-     
-      map<ossimString, ossimSrcRecord>::iterator it = infos.begin();
-      ossim_int32 index = 0;
-      map<ossim_int32, ossimSrcRecord> srcList;
-      while (it != infos.end())
-      {
-         ossimString fileInfo = it->first;
-         vector<ossimString> fileInfos = fileInfo.split("|");
-         ossim_int32 entryId = fileInfos[1].toInt();
-         vector<ossimString> latlonInfo = fileInfos[2].split(",");
-
-         double ulgLon = latlonInfo[0].toDouble();
-         double ulgLat = latlonInfo[1].toDouble();
-         double urgLon = latlonInfo[2].toDouble();
-         double urgLat = latlonInfo[3].toDouble();
-         double lrgLon = latlonInfo[4].toDouble();
-         double lrgLat = latlonInfo[5].toDouble();
-         double llgLon = latlonInfo[6].toDouble();
-         double llgLat = latlonInfo[7].toDouble();
-
-         points.clear();
-         points.push_back(ossimGpt(ulgLat, ulgLon));
-         points.push_back(ossimGpt(urgLat, urgLon));
-         points.push_back(ossimGpt(lrgLat, lrgLon));
-         points.push_back(ossimGpt(llgLat, llgLon));
-
-         //get bounding for each image listed in src file
-         ossimDrect rect = getRect(mapProj, points);
-
-         //check if the rect of image intersect with the rect of tile
-         if (rect.intersects(clipRect))
-         {
-            ossimSrcRecord srcRecord = it->second;
-            srcRecord.setEntryIndex(entryId);
-            srcList[index] = srcRecord;
-            index++;
-         }
-         it++;
-      }
-
-      //write image files which intersect with the tile to a new src file
-      if (srcList.size() > 0)
-      {
-         ofstream outputSrcFile(outSrc.c_str());
-         map<ossim_int32, ossimSrcRecord>::iterator srcIt = srcList.begin();
-         while (srcIt != srcList.end())
-         {
-            ossimString prefix = prefixStr + ossimString::toString(srcIt->first) + ".";
-
-            ossimFilename newSrcFile = srcIt->second.getFilename();
-            ossim_int32 entryId = srcIt->second.getEntryIndex();
-            ossimFilename supportDir = srcIt->second.getSupportDir();
-            ossimString hisOp = srcIt->second.getHistogramOp();
-            vector<ossim_uint32> bands = srcIt->second.getBands();
-            double weight = srcIt->second.getWeight();
-            ossimFilename overviewPath = srcIt->second.getOverviewPath();
-            ossimFilename hisPath = srcIt->second.getHistogramPath();
-            ossimFilename maskPath = srcIt->second.getMaskPath();
-
-            if (!newSrcFile.empty())
-            {
-               ossimString str = prefix + "file: " + newSrcFile;
-               outputSrcFile << str << "\n";
-            }
-
-            if (entryId > -1)
-            {
-               ossimString str = prefix + "entry: " + ossimString::toString(entryId);
-               outputSrcFile << str << "\n";
-            }
-
-            if (!supportDir.empty())
-            {
-               ossimString str = prefix + "support: " + supportDir;
-               outputSrcFile << str << "\n";
-            }
-
-            if (!hisOp.empty())
-            {
-               ossimString str = prefix + "hist-op: " + hisOp;
-               outputSrcFile << str << "\n";
-            }
-
-            if (bands.size())
-            {
-               ossimString str = "";
-               for (ossim_uint32 bandIndex = 0; bandIndex < bands.size(); bandIndex++)
-               {
-                  if (bandIndex == (bands.size()-1))
-                  {
-                     str = str + ossimString::toString(bands[bandIndex]+1);
-                  }
-                  else
-                  {
-                     str = str + ossimString::toString(bands[bandIndex]+1) + ",";
-                  }
-               }
-               str = prefix + "rgb: " + str;
-               outputSrcFile << str << "\n";
-            }
-
-            if (weight > 0)
-            {
-               ossimString str = prefix + "opacity: " + ossimString::toString(weight);
-               outputSrcFile << str << "\n";
-            }
-
-            if (!overviewPath.empty())
-            {
-               ossimString str = prefix + "ovr: " + overviewPath;
-               outputSrcFile << str << "\n";
-            }
-
-            if (!hisPath.empty())
-            {
-               ossimString str = prefix + "hist: " + hisPath;
-               outputSrcFile << str << "\n";
-            }
-
-            if (!maskPath.empty())
-            {
-               ossimString str = prefix + "mask: " + maskPath;
-               outputSrcFile << str << "\n";
-            }
-            outputSrcFile << "\n";
-            srcIt++;
-         }
-         outputSrcFile.close();
-         srcList.clear();
-      }
-   }
-
-   if (polyTiling.valid())
-   {
-      polyTiling = 0;
-   }
-   if (mapProj.valid())
-   {
-      mapProj = 0;
-   }
-   points.clear();
-   infos.clear();
-   
-   finalize(0);
-   return 0; // Never reached, but satisfies return type
-}
diff --git a/src/apps/ossim-ws-cmp/ossim-ws-cmp.cpp b/src/apps/ossim-ws-cmp/ossim-ws-cmp.cpp
deleted file mode 100644
index 15950a5..0000000
--- a/src/apps/ossim-ws-cmp/ossim-ws-cmp.cpp
+++ /dev/null
@@ -1,229 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  David Burken
-//
-// Description: Application to compare to workspaces.
-//
-// $Id: foo.cpp 14815 2009-07-01 14:59:11Z gpotts $
-//----------------------------------------------------------------------------
-
-#include <cstdlib> /* for system command */
-#include <ossim/base/ossimDirectory.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/init/ossimInit.h>
-#include <iostream>
-using namespace std;
-
-static bool trace = false; // Turn on to see more stuff...
-
-static void cmpDir(const ossimFilename& wsa,
-                   const ossimFilename& wsb,
-                   const ossimFilename& dir);
-
-static void cmpFile(const ossimFilename& wsa,
-                    const ossimFilename& wsb,
-                    const ossimFilename& file);
-
-static bool isIgnoredFile(const ossimFilename& file);
-
-static void usage()
-{
-   cout << "Usage:  ossim-ws-cmp <wsa> <wsb>\n"
-        << "Compares workspace a (wsa) to workspace b (wsb).\n"
-        << "NOTE: requires \"diff\" command."
-        << endl;
-}
-
-int main(int argc, char *argv[])
-{
-   if (argc != 3)
-   {
-      usage();
-      return 0;
-   }
-
-   ossimFilename wsa = argv[1];
-   ossimFilename wsb = argv[2];
-
-   if ( !wsa.isDir() )
-   {
-      cout << "<wsa> is NOT a directory: " << wsa << endl;
-      usage();
-      return 0;
-   }
-
-   if ( !wsb.isDir() )
-   {
-      cout << "<wsb> is NOT a directory: " << wsb << endl;
-      usage();
-      return 0;
-   }
-
-   cout << "wsa: " << wsa
-        << "\nwsb: " << wsb
-        << endl;
-
-   cmpDir(wsa, wsb, wsa);
-   
-   return 0;
-}
-
-void cmpDir(const ossimFilename& wsa,
-            const ossimFilename& wsb,
-            const ossimFilename& dir)
-{
-   ossimDirectory d;
-   if ( d.open(dir) )
-   {
-      ossimFilename f;
-      if (d.getFirst(f))
-      {
-         while ( f != "" )
-         {
-            // cout << f << endl;
-
-            if ( isIgnoredFile(f) == false )
-            {
-               if ( f.isDir() )
-               {
-                  cmpDir(wsa, wsb, f);
-               }
-               else
-               {
-                  cmpFile(wsa, wsb, f);
-               }
-            }
-            d.getNext(f);
-         }
-      }
-   }
-   else
-   {
-      cout << "Could not open: " << wsa << endl;
-   }
-}
-
-void cmpFile(const ossimFilename& wsa,
-             const ossimFilename& wsb,
-             const ossimFilename& file)
-{
-   ossimFilename bFile = file.substitute(wsa, wsb);
-
-   if ( !file.exists() )
-   {
-      cout << "notice: wsb file: " << bFile
-           << "\nnotice: wsa file does not exists: " << file
-           << "\nb -> a copy command:"
-           << "\ncp " << bFile << " " << file << "\n"
-           << endl;
-   }
-   if ( !bFile.exists() )
-   {
-      cout << "notice: wsa file: " << file
-           << "\nnotice: wsb file does not exists: " << bFile
-           << "\na -> b copy command:"
-           << "\ncp " << file << " " << bFile << "\n"
-           << endl;
-   }
-
-   if ( file.exists() && bFile.exists() )
-   {
-      std::string command = "diff -w --ignore-matching-lines=\\$Id ";
-      command += file.string();
-      command += " ";
-      command += bFile.string();
-      
-      int status = system( command.c_str() );
-      
-      if ( status != 0 )
-      {
-         cout << "notice files differ:"
-              << "\nwsa file: " << file
-              << "\nwsb file: " << bFile
-              << "\na -> b copy command:"
-              << "\ncp " << file << " " << bFile
-              << "\nb -> a copy command:"
-              << "\ncp " << bFile << " " << file << "\n"
-              << endl;
-      }
-   }
-}
-
-bool isIgnoredFile(const ossimFilename& file)
-{
-   bool status = false;
-
-   if (trace)
-   {
-      cout << "file: " << file << endl;
-   }
-   
-   if ( file.size() )
-   {
-      ossimFilename f = file.file();
-      ossimFilename e = file.ext();
-      
-      if ( ( f == ".moc" )                  ||
-           ( f == ".svn" )                  ||
-           ( f == "CMakeCache.txt" )        ||
-           ( f == "CMakeFiles" )            ||
-           ( f == "cmake_install.cmake" )   ||
-           ( f == "cmake_uninstall.cmake" ) ||
-           ( f == "CVS" )                   ||
-           ( f == "doc" )                   || 
-           ( f == ".cvsignore" )            ||
-           ( f == "bin" )                   ||
-           ( f == "build" )                 ||
-           ( f == "builds" )                ||
-           ( f == "configure")              ||
-           ( f == "config.log" )            ||
-           ( f == "config.status")          ||
-           ( f == "lib" )                   ||
-           ( f == "Makefile" )              ||
-           ( f == "Makefile.common" )       ||
-           ( f == "make.out" )              ||
-           ( f == "projects")               ||
-           ( f == "wxmac.icns")             ||
-           ( f == "xcode" )                 ||
-           ( e == "d" )                     || // dot d file
-           ( e == "o" )                     || // object file
-           ( e == "obj" )                   ||
-           ( e == "exe" )                   ||
-           ( e == "tmp" )
-           )
-      {
-         status = true;
-      }
-      else if ( file.contains("apps") || file.contains("test") )
-      {
-         if ( file.isDir() ) // Go into apps and test dir.
-         {
-            status = false;
-         }
-         else if ( (e != "h") && (e != "cpp") )
-         {
-            // Ignore binary files. Only diff headers and source files.
-            status = true;
-         }
-      }
-      if ( file[file.size()-1] == '~' )
-      {
-         status = true; // xemacs
-      }
-      
-   } // if ( file.size() )
-   else
-   {
-      status = true; // empty
-   }
-
-   if ( trace && (status == true) )
-   {
-      cout << "ignoring file: " << file << endl;
-   }
-   
-   return status;
-}
diff --git a/src/examples/data_types/directory/Makefile b/src/examples/data_types/directory/Makefile
deleted file mode 100644
index dc24d03..0000000
--- a/src/examples/data_types/directory/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-PROGRAM=directorytest
-
-include ../../../../makeprog.mak
diff --git a/src/examples/data_types/directory/directorytest.cpp b/src/examples/data_types/directory/directorytest.cpp
deleted file mode 100644
index 308b886..0000000
--- a/src/examples/data_types/directory/directorytest.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author:  Garrett Potts (gpotts at imagelinks.com)
-//
-// Description:
-//
-//*******************************************************************
-//  $Id: directorytest.cpp 9966 2006-11-29 02:01:07Z gpotts $
-#include <iostream>
-#include "base/data_types/ossimDirectoryTree.h"
-
-int main()
-{
-   // create a directory object
-   ossimDirectoryTree dirTree;
-
-   // open a directory
-   dirTree.open(".");
-
-   ossimFilename tempFile;
-
-   // initialize the enumeration over the current directory
-   // using the default directory flags.  It will return true
-   // if it was able to open the file and will return false it if was
-   // not able to open the file.
-   if(dirTree.getFirst(tempFile))
-   {
-      do
-      {
-         std::cout << tempFile << std::endl;
-      }while(dirTree.getNext(tempFile));
-   }
-}
diff --git a/src/examples/data_types/dms/Makefile b/src/examples/data_types/dms/Makefile
deleted file mode 100644
index eb79002..0000000
--- a/src/examples/data_types/dms/Makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-PROGRAM=dms_test
-include ../../../../makeprog.mak
diff --git a/src/examples/data_types/dms/dms_test.cpp b/src/examples/data_types/dms/dms_test.cpp
deleted file mode 100644
index 7fb64b5..0000000
--- a/src/examples/data_types/dms/dms_test.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  David Burken
-//
-// Description: Contains application for simple ossimDms class code examples.
-//
-// $Id: dms_test.cpp 12095 2007-11-30 16:06:06Z dburken $
-//----------------------------------------------------------------------------
-
-#include <ossim/base/ossimDms.h>
-#include <iostream>
-using namespace std;
-
-int main()   
-{
-   // Test default constructor.
-   ossimDms dms;
-   cout << "dms using default constuctor:"
-        << "\ndms.getDegrees():  " << dms.getDegrees()
-        << "\ndms.toString():    " << dms.toString()
-        << endl;
-   
-   const ossimString LAT_FORMAT = "dd@ mm' ss.ssss\" C";
-   const ossimString LON_FORMAT = "ddd@ mm' ss.ssss\" C";
-
-   ossimDms d(0.0);
-
-   ossimString dmsstr = "S30 20 20";
-   
-   if (d.setDegrees(dmsstr) == true)
-   {
-      cout << "dmsstr:          " << dmsstr
-           << "\nd.getDegrees():  " << d.getDegrees()
-           << "\nd.toString():    " << d.toString(LAT_FORMAT)
-           << endl;
-   }
-   else
-   {
-      cout << "setDegrees failed..." << endl;
-   }
-
-   dmsstr = " N30 20 20";
-
-   if (d.setDegrees(dmsstr))
-   {
-      cout << "dmsstr:          " << dmsstr
-           << "\nd.getDegrees():  " << d.getDegrees()
-           << "\nd.toString():    " << d.toString(LAT_FORMAT)
-           << endl;
-   }
-   else
-   {
-      cout << "setDegrees failed..." << endl;
-   }
-
-   dmsstr = "/some/one/punched/in/a/file/name...";
-
-   if (d.setDegrees(dmsstr))
-   {
-      cout << "dmsstr:          " << dmsstr
-           << "\nd.getDegrees():  " << d.getDegrees()
-           << "\nd.toString():    " << d.toString(LAT_FORMAT)
-           << endl;
-   }
-   else
-   {
-      cout << "setDegrees failed..." << endl;
-   }
-
-   dmsstr = "32 59 00 N";
-   d.setLatFlag(true);
-   if (d.setDegrees(dmsstr))
-   {
-      cout << "dmsstr:          " << dmsstr
-           << "\nd.getDegrees():  " << d.getDegrees()
-           << "\nd.toString():    " << d.toString(LAT_FORMAT)
-           << endl;
-   }
-   else
-   {
-      cout << "setDegrees failed..." << endl;
-   }
-
-   dmsstr = "085 00 00 E";
-   d.setLatFlag(false);
-   if (d.setDegrees(dmsstr))
-   {
-      cout << "dmsstr:          " << dmsstr
-           << "\nd.getDegrees():  " << d.getDegrees()
-           << "\nd.toString():    " << d.toString(LAT_FORMAT)
-           << endl;
-   }
-   else
-   {
-      cout << "setDegrees failed..." << endl;
-   }
-   return 0;
-}
diff --git a/src/examples/data_types/polygonarea/Makefile b/src/examples/data_types/polygonarea/Makefile
deleted file mode 100644
index c5e782c..0000000
--- a/src/examples/data_types/polygonarea/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-PROGRAM=polygonarea
-
-include ../../../../makeprog.mak
diff --git a/src/examples/data_types/polygonarea/polygonarea.cpp b/src/examples/data_types/polygonarea/polygonarea.cpp
deleted file mode 100644
index 5841189..0000000
--- a/src/examples/data_types/polygonarea/polygonarea.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-// $Id: polygonarea.cpp 8902 2006-03-20 21:16:32Z dburken $
-
-
-#include <vector>
-#include <iostream>
-using namespace std;
-
-#include "base/data_types/ossimPolyArea2d.h"
-#include "base/data_types/ossimDpt.h"
-#include "base/data_types/ossimKeywordlist.h"
-
-int main()
-{
-   ossimKeywordlist kwl;
-   vector<ossimDpt> v(4);
-   
-   v[0] = ossimDpt(0,0);
-   v[1] = ossimDpt(1000,0);
-   v[2] = ossimDpt(1000,1000);
-   v[3] = ossimDpt(0,1000);
-
-   vector<ossimDpt> v2(4);
-
-   v2[0] = ossimDpt(100,100);
-   v2[1] = ossimDpt(900,100);
-   v2[2] = ossimDpt(900,900);
-   v2[3] = ossimDpt(100,900);
-   
-   ossimPolyArea2d poly1(v);
-   
-   ossimPolyArea2d poly2(v2);
-
-   cout << "poly2" << endl;
-   cout << poly2 << endl;
-   
-   cout << "poly1" << endl;
-   cout << poly1 << endl;
-
-   
-   ossimDrect rect;
-   poly1.getBoundingRect(rect);
-   cout <<"Bounding rect:" << endl;
-   cout << rect << endl;
-
-   ossimPolyArea2d poly3 = (poly1 - poly2);
-   
-   poly3.saveState(kwl);
-   cout << kwl << endl;
-
-   ossimPolyArea2d poly4;
-
-   poly4.loadState(kwl);
-   cout << "poly4: " << endl;
-   cout << poly4 << endl;
-
-   cout << "pointwithin 200, 200: " << poly4.isPointWithin(200, 200) << endl;
-   cout << "pointwithin 50, 50:   " << poly4.isPointWithin(50, 50) << endl;
-
-   cout << poly4 << endl;
-
-   ossimPolyArea2d poly5 = poly1;
-
-   cout << "poly1-poly2" << endl;
-   cout << (poly1-poly2) << endl;
-   poly5 -= poly2;
-   cout << "poly5-=poly2 should be the same as poly1-poly2" << endl;
-   cout << poly5 << endl;
-   
-   cout << "poly1+poly2" << endl;
-   cout << (poly1+poly2) << endl;
-
-   poly5 = poly1;
-   poly5 += poly2;
-   cout << "poly5+=poly2 should be the same as poly1+poly2" << endl;
-   cout << poly5 << endl;
-   
-   cout << "poly1^poly2" << endl;
-   cout << (poly1^poly2) << endl;
-   poly5 = poly1;
-   poly5 ^= poly2;
-   cout << "poly5^=poly2 should be the same as poly1^poly2" << endl;
-   cout << poly5 << endl;
-   
-   cout << "poly1&poly2" << endl;
-   cout << (poly1&poly2) << endl;
-   poly5 = poly1;
-   poly5 &= poly2;
-   cout << "poly5&=poly2 should be the same as poly1&poly2" << endl;
-   cout << poly5 << endl;
-   
-   cout << "point within " << poly1.isPointWithin(10,1) <<endl;
-
-
-   //---
-   // This test put us in an infinite loop bugzilla #1117.  (drb 20060320)
-   //---
-   cout << "Starting infinite loop test bugzilla #1117..." << endl;
-   ossimPolyArea2d poly6( ossimDpt(3065, -25684),
-                          ossimDpt(3575, -25686),
-                          ossimDpt(3576, -25175),
-                          ossimDpt(3066, -25174) );
-   cout << "poly6:  " << poly6 << endl;
-   ossimPolyArea2d poly7( ossimDpt(3513, -25238),
-                          ossimDpt(3576, -25238),
-                          ossimDpt(3576, -25175),
-                          ossimDpt(3513, -25175));
-   cout << "poly7:  " << poly7 << endl;
-   ossimPolyArea2d poly8 = poly6 & poly7;
-   cout << "poly8:  " << poly8 << endl;
-   cout << "Ending infinite loop test bugzilla #1117..." << endl;
-
-   return 0;
-}
diff --git a/src/examples/elevation/dted_test/Makefile b/src/examples/elevation/dted_test/Makefile
deleted file mode 100644
index f05f703..0000000
--- a/src/examples/elevation/dted_test/Makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-PROGRAM=dtedHandlerTest
-include ../../../../makeprog.mak
diff --git a/src/examples/elevation/dted_test/dtedHandlerTest.cpp b/src/examples/elevation/dted_test/dtedHandlerTest.cpp
deleted file mode 100644
index dffcda6..0000000
--- a/src/examples/elevation/dted_test/dtedHandlerTest.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (C) 2005 David Burken, all rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Test application / example code of opening a dted handler
-// and using it.
-//
-// $Id: dtedHandlerTest.cpp 7202 2005-01-20 18:02:22Z dburken $
-//----------------------------------------------------------------------------
-
-#include <base/common/ossimConstants.h>  // ossim contants...
-#include <base/data_types/ossimGrect.h>
-#include <base/data_types/ossimGpt.h>
-#include <init/ossimInit.h>
-#include <elevation/formats/dted_cell/ossimDtedHandler.h>
-
-
-int main(int argc, char *argv[])
-{
-   ossimInit::instance()->initialize(argc, argv);
-
-   //---
-   // Note: You must tweak the next three variables...
-   // This is a 3601x3601 cell.
-   //---
-   ossimFilename dtedCell = "/work/drb/image_formats/dted/1arc/w092/n40.dt1";
-   double neLat = 41.0;
-   double neLon = -92.0;
-   
-   ossimDtedHandler* dh = new ossimDtedHandler(dtedCell);
-   double p00 = dh->getPostValue(ossimIpt(0, 3599));
-   double p01 = dh->getPostValue(ossimIpt(0, 3600));
-   double p10 = dh->getPostValue(ossimIpt(1, 3599));
-   double p11 = dh->getPostValue(ossimIpt(1, 3600));
-
-   double ps  = 1.0/3601.0; // post spacing
-   double hps = ps/2.0;     // half post spacing
-   
-   ossimGpt gp00( (neLat-ps),    neLon,      0.0 );
-   ossimGpt gp01(  neLat,        neLon,      0.0 );
-   ossimGpt gp10( (neLat-ps),   (neLon+ps),  0.0);
-   ossimGpt gp11(  neLat,       (neLon+ps),  0.0 );
-   ossimGpt gpMid( (neLat-hps), (neLon+hps), 0.0 );
-   
-   double hp00  =  dh->getHeightAboveMSL(gp00);   
-   double hp01  =  dh->getHeightAboveMSL(gp01);
-   double hp10  =  dh->getHeightAboveMSL(gp10);
-   double hp11  =  dh->getHeightAboveMSL(gp11);
-   double hpMid =  dh->getHeightAboveMSL(gpMid);
-
-   cout << "\ngp00:   " << gp00
-        << "\np00:    " << p00
-        << "\nhp00:   " << hp00
-      
-        << "\ngp01:   " << gp01
-        << "\np01:    " << p01
-        << "\nhp01:   " << hp01
-      
-        << "\ngp10:   " << gp10
-        << "\np10:    " << p10
-        << "\nhp10:   " << hp10
-
-        << "\ngp11:   " << gp11
-        << "\np11:    " << p11
-        << "\nhp11:   " << hp11
-
-        << "\ngpMid:  " << gpMid
-        << "\nhpMid:  " << hpMid
-
-        << endl;
-
-   delete dh;
-   
-   return 0;
-}
diff --git a/src/examples/elevation/srtm_test/Makefile b/src/examples/elevation/srtm_test/Makefile
deleted file mode 100644
index bf4c682..0000000
--- a/src/examples/elevation/srtm_test/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-###
-# $Id: Makefile 7327 2005-03-13 15:00:14Z dburken $
-###
-PROGRAM=srtmSupportDataTest
-include ../../../../makeprog.mak
diff --git a/src/examples/elevation/srtm_test/srtmSupportDataTest.cpp b/src/examples/elevation/srtm_test/srtmSupportDataTest.cpp
deleted file mode 100644
index 66a1187..0000000
--- a/src/examples/elevation/srtm_test/srtmSupportDataTest.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (C) 2005 David Burken, all rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Test application / example code for srtm support data class.
-// and using it.
-//
-// $Id: srtmSupportDataTest.cpp 7328 2005-03-13 21:54:09Z dburken $
-//----------------------------------------------------------------------------
-
-#include <iostream>
-using namespace std;
-
-#include <init/ossimInit.h>
-#include <support_data/srtm/ossimSrtmSupportData.h>
-#include <base/data_types/ossimKeywordlist.h>
-
-int main(int argc, char *argv[])
-{
-   ossimInit::instance()->initialize(argc, argv);
-
-   if (argc != 2)
-   {
-      cout << "usage:  " << argv[0] << " srtm_file" << endl;
-      return 0;
-   }
-
-   ossimSrtmSupportData sd;
-   if (sd.setFilename(ossimFilename(argv[1]), true))
-   {
-      cout << sd << endl;
-
-      ossimKeywordlist kwl;
-      sd.getImageGeometry(kwl);
-      cout << "geometry file:\n" << kwl << endl;
-   }
-   else
-   {
-      cout << "Could not open:  " << argv[1] << endl;
-   }
-   
-   return 0;
-}
diff --git a/src/examples/shared/image_filters/Makefile b/src/examples/shared/image_filters/Makefile
deleted file mode 100644
index 4f33122..0000000
--- a/src/examples/shared/image_filters/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-include /Users/Shared/Development/ossim/Makefile.common
-include ../../../../makelib.mak
-
-all: $(OBJS) ossimSharedRgbToGreyFilter.$(SO_VERSIONLESS_EXT)
-
-ossimSharedRgbToGreyFilter.$(SO_VERSIONLESS_EXT): $(OBJS)
-	$(CC) $(LD_SHARED) $(OBJS) $(OSSIM_APP_LINK) -o $@
diff --git a/src/examples/shared/image_filters/ossimSharedRgbToGreyFilter.cpp b/src/examples/shared/image_filters/ossimSharedRgbToGreyFilter.cpp
deleted file mode 100644
index 1d139ae..0000000
--- a/src/examples/shared/image_filters/ossimSharedRgbToGreyFilter.cpp
+++ /dev/null
@@ -1,334 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author: Garrett Potts (gpotts at imagelinks)
-// Description: A brief description of the contents of the file.
-//
-//*************************************************************************
-// $Id: ossimSharedRgbToGreyFilter.cpp 15323 2009-09-01 19:19:48Z gpotts $
-#include <base/common/ossimRefPtr.h>
-#include "ossimSharedRgbToGreyFilter.h"
-#include <imaging/ossimU8ImageData.h>
-#include <base/common/ossimConstants.h>
-#include <base/common/ossimCommon.h>
-#include <base/data_types/ossimKeywordlist.h>
-#include <base/common/ossimKeywordNames.h>
-#include <imaging/factory/ossimImageSourceFactoryBase.h>
-#include <imaging/factory/ossimImageSourceFactoryRegistry.h>
-#include <base/common/ossimRefPtr.h>
-
-RTTI_DEF1(ossimSharedRgbToGreyFilter, "ossimSharedRgbToGreyFilter", ossimImageSourceFilter)
-
-ossimSharedRgbToGreyFilter::ossimSharedRgbToGreyFilter(ossimObject* owner)
-   :ossimImageSourceFilter(owner),
-    theTile(NULL),
-    theC1(1.0/3.0),
-    theC2(1.0/3.0),
-    theC3(1.0/3.0)
-{
-}
-
-ossimSharedRgbToGreyFilter::ossimSharedRgbToGreyFilter(ossimImageSource* inputSource,
-                                           double c1,
-                                           double c2,
-                                           double c3)
-   : ossimImageSourceFilter(NULL, inputSource),
-     theTile(NULL),
-     theC1(c1),
-     theC2(c2),
-     theC3(c3)
-{
-}
-
-ossimSharedRgbToGreyFilter::ossimSharedRgbToGreyFilter(ossimObject* owner,
-                                           ossimImageSource* inputSource,
-                                           double c1,
-                                           double c2,
-                                           double c3)
-   : ossimImageSourceFilter(owner, inputSource),
-     theTile(NULL),
-     theC1(c1),
-     theC2(c2),
-     theC3(c3)
-{
-}
-
-ossimSharedRgbToGreyFilter::~ossimSharedRgbToGreyFilter()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimSharedRgbToGreyFilter::getTile(const ossimIrect& tileRect,
-                                                                ossim_uint32 resLevel)
-{
-   if(!isSourceEnabled())
-   {
-      return ossimImageSourceFilter::getTile(tileRect,
-                                             resLevel);
-   }
-   long w     = tileRect.width();
-   long h     = tileRect.height();
-
-   
-   if(!theTile.valid()) initialize();
-   if(!theTile.valid()) return 0;
-   
-   if(!theTile.valid()) return 0;
-   
-   ossimRefPtr<ossimImageData> data = 0;
-   if(theInputConnection)
-   {
-      data  = theInputConnection->getTile(tileRect, resLevel);
-   }
-   else
-   {
-      return 0;
-   }
-
-   if(!data.valid()) return 0;
-   if(data->getDataObjectStatus() == OSSIM_NULL ||
-      data->getDataObjectStatus() == OSSIM_EMPTY)
-   {
-      return 0;
-   }
-
-   theTile->setImageRectangle(tileRect);
-   theTile->makeBlank();
-   
-   theTile->setOrigin(tileRect.ul());
-   runUcharTransformation(data.get());
-   
-   return theTile;
-   
-}
-
-void ossimSharedRgbToGreyFilter::initialize()
-{
-   if(theInputConnection)
-   {
-      theTile = 0;
-      
-      theTile = new ossimU8ImageData(this,
-                                     1,
-                                     theInputConnection->getTileWidth(),
-                                     theInputConnection->getTileHeight());  
-      theTile->initialize();
-   }
-}
-
-ossimScalarType ossimSharedRgbToGreyFilter::getOutputScalarType() const
-{
-   if(!isSourceEnabled())
-   {
-      return ossimImageSourceFilter::getOutputScalarType();
-   }
-   
-   return OSSIM_UCHAR;
-}
-
-ossim_uint32 ossimSharedRgbToGreyFilter::getNumberOfOutputBands() const
-{
-   if(!isSourceEnabled())
-   {
-      return ossimImageSourceFilter::getNumberOfOutputBands();
-   }
-   return 1;
-}
-
-bool ossimSharedRgbToGreyFilter::saveState(ossimKeywordlist& kwl,
-                                     const char* prefix)const
-{
-   ossimImageSourceFilter::saveState(kwl, prefix);
-
-   kwl.add(prefix,
-           "c1",
-           theC1,
-           true);
-   kwl.add(prefix,
-           "c2",
-           theC2,
-           true);
-   kwl.add(prefix,
-           "c3",
-           theC3,
-           true);
-   
-   return true;
-}
-
-bool ossimSharedRgbToGreyFilter::loadState(const ossimKeywordlist& kwl,
-                                     const char* prefix)
-{
-   ossimImageSourceFilter::loadState(kwl, prefix);
-
-   const char* lookup = kwl.find(prefix, "c1");
-   if(lookup)
-   {
-      theC1 = ossimString(lookup).toDouble();
-   }
-   lookup = kwl.find(prefix, "c2");
-   if(lookup)
-   {
-      theC2 = ossimString(lookup).toDouble();
-   }
-   lookup = kwl.find(prefix, "c3");
-   if(lookup)
-   {
-      theC3 = ossimString(lookup).toDouble();
-   }
-   return true;
-}
-
-void ossimSharedRgbToGreyFilter::runUcharTransformation(ossimImageData* tile)
-{   
-   unsigned char* bandSrc[tile->getNumberOfBands()];
-   unsigned char* bandDest;
-   
-   if(tile->getNumberOfBands() == 1)
-   {
-      bandSrc[0]  = static_cast<unsigned char*>(tile->getBuf(0));
-      bandSrc[1]  = static_cast<unsigned char*>(tile->getBuf(0));
-      bandSrc[2]  = static_cast<unsigned char*>(tile->getBuf(0));
-   }
-   else if(tile->getNumberOfBands() == 2)
-   {
-      bandSrc[0]  = static_cast<unsigned char*>(tile->getBuf(0));
-      bandSrc[1]  = static_cast<unsigned char*>(tile->getBuf(1));
-      bandSrc[2]  = static_cast<unsigned char*>(tile->getBuf(1));      
-   }
-   else if(tile->getNumberOfBands() == 3)
-   {
-      bandSrc[0]  = static_cast<unsigned char*>(tile->getBuf(0));
-      bandSrc[1]  = static_cast<unsigned char*>(tile->getBuf(1));
-      bandSrc[2]  = static_cast<unsigned char*>(tile->getBuf(2));      
-   }
-   
-   bandDest = static_cast<unsigned char*>(theTile->getBuf());
-   
-   long offset;
-
-   long upperBound = tile->getWidth()*tile->getHeight();
-   for(offset = 0; offset < upperBound; ++offset)
-   {
-      long value;
-      
-      value = irint(theC1*(bandSrc[0][offset]) +
-                    theC2*(bandSrc[1][offset]) +
-                    theC3*(bandSrc[2][offset]));
-      
-      value = value<255?value:255;
-      value = value>0?value:0;
-
-      bandDest[offset] = value;
-   }
-
-   theTile->validate();
-}
-
-class ossimMyFactory : public ossimImageSourceFactoryBase
-{
-public:
-   ossimMyFactory()
-      {
-      }
-   virtual ~ossimMyFactory()
-      {
-         ossimImageSourceFactoryRegistry::instance()->unregisterFactory(instance());
-         
-      }
-   
-   static ossimMyFactory* instance();
-   virtual ossimImageSource* createImageSource(const ossimString& name)const;
-   virtual ossimImageSource* createImageSource(const ossimKeywordlist& kwl,
-                                               const char* prefix=0)const;
-   virtual void getTypeNameList(std::vector<ossimString>& typeList)const;
-protected:
-   static ossimMyFactory* theInstace;
-   
-TYPE_DATA
-};
-
-RTTI_DEF1(ossimMyFactory, "ossimMyFactory", ossimImageSourceFactoryBase);
-
-ossimRefPtr<ossimMyFactory> ossimMyFactory::theInstance=0;
-
-ossimMyFactory* ossimMyFactory::instance()
-{
-   if(!theInstance)
-   {
-      theinstace = new ossimMyFactory;
-   }
-
-   return theInstance;
-}
-
-ossimObject* ossimMyFactory::createObject(const ossimString& typeName)const
-{
-   if(typeName == STATIC_TYPE_NAME(ossimSharedRgbToGreyFilter))
-   {
-      return new ossimSharedRgbToGreyFilter;
-   }
-
-   return (ossimObject*)NULL;
-}
-
-ossimObject* ossimMyFactory::createObject(const ossimKeywordlist& kwl,
-                                          const char* prefix)const
-{
-   const char* type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
-   ossimObject* result = NULL;
-   if(type)
-   {
-      result = createObject(ossimString(type));
-      if(result)
-      {
-         result->loadState(kwl, prefix);
-      }
-   }
-
-   return result;
-}
-
-void ossimMyFactory::getTypeNameList(std::vector<ossimString>& typeList)const
-{
-   typeList.push_back(STATIC_TYPE_NAME(ossimSharedRgbToGreyFilter));
-}
-
-
-extern "C"
-{
-   ossimSharedObjectInfo myInfo;
-   ossimString theDescription;
-   std::vector<ossimString> theObjList;
-   const char* getDescription()
-   {
-      return theDescription.c_str();
-   }
-   int getNumberOfClassNames()
-   {
-      return (int)theObjList.size();
-   }
-   const char* getClassName(int idx)
-   {
-      if(idx < (int)theObjList.size())
-      {
-         return theObjList[idx].c_str();
-      }
-      return 0;
-   }
-   void ossimSharedLibraryInitialize(ossimSharedObjectInfo** info)
-   {
-      myInfo.getDescription        = getDescription;
-      myInfo.getNumberOfClassNames = getNumberOfClassNames;
-      myInfo.getClassName          = getClassName;
-      *info = &myInfo;
-      theDescription = ossimString("Shared library example\n\n")+ "RGB to grey filter\n\n";
-      theObjList.push_back("ossimSharedRgbToGreyFilter");
-      ossimImageSourceFactoryRegistry::instance()->registerFactory(ossimMyFactory::instance());
-   }
-   
-   void ossimSharedLibraryFinalize()
-   {
-      ossimImageSourceFactoryRegistry::instance()->unregisterFactory(ossimMyFactory::instance());
-   }
-}
diff --git a/src/examples/shared/image_filters/ossimSharedRgbToGreyFilter.h b/src/examples/shared/image_filters/ossimSharedRgbToGreyFilter.h
deleted file mode 100644
index b4702a0..0000000
--- a/src/examples/shared/image_filters/ossimSharedRgbToGreyFilter.h
+++ /dev/null
@@ -1,62 +0,0 @@
-#ifndef ossimSharedRgbToGreyFilter_HEADER
-#define ossimSharedRgbToGreyFilter_HEADER
-#include "plugin/ossimSharedObjectBridge.h"
-#include "base/data_types/ossimString.h"
-
-
-#include "imaging/tile_sources/ossimImageSourceFilter.h"
-
-class ossimSharedRgbToGreyFilter : public ossimImageSourceFilter
-{
-public:
-   ossimSharedRgbToGreyFilter(ossimObject* owner=NULL);
-   ossimSharedRgbToGreyFilter(ossimImageSource* inputSource,
-                        double c1 = 1.0/3.0,
-                        double c2 = 1.0/3.0,
-                        double c3 = 1.0/3.0);
-   ossimSharedRgbToGreyFilter(ossimObject* owner,
-                        ossimImageSource* inputSource,
-                        double c1 = 1.0/3.0,
-                        double c2 = 1.0/3.0,
-                        double c3 = 1.0/3.0);
-   virtual ~ossimSharedRgbToGreyFilter();
-   ossimString getShortName()const
-      {
-         return ossimString("grey");
-      }
-   
-   ossimString getLongName()const
-      {
-         return ossimString("rgb to grey scale filter");
-      }
-   
-   virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& tileRect, ossim_uint32 resLevel=0);
-   
-   virtual void initialize();
-   
-   virtual ossimScalarType getOutputScalarType() const;
-   
-   ossim_uint32 getNumberOfOutputBands() const;
- 
-   virtual bool saveState(ossimKeywordlist& kwl,
-                          const char* prefix=0)const;
-   
-   /*!
-    * Method to the load (recreate) the state of an object from a keyword
-    * list.  Return true if ok or false on error.
-    */
-   virtual bool loadState(const ossimKeywordlist& kwl,
-                          const char* prefix=0);
-
-protected:
-   ossimRefPtr<ossimImageData> theBlankTile;
-   ossimRefPtr<ossimImageData> theTile;
-   void runUcharTransformation(ossimImageData* tile);
-   double theC1;
-   double theC2;
-   double theC3;
-
-TYPE_DATA
-};
-
-#endif
diff --git a/src/examples/tutorial/Makefile b/src/examples/tutorial/Makefile
deleted file mode 100644
index e2b7c31..0000000
--- a/src/examples/tutorial/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-
-include ../../../Makefile.common
-include ../../../makelib.mak
-LIBRARY   =
-INCLUDES  = $(BASE_INCLUDES)
-SRCS=$(wildcard *.cc)
-OBJECTS=$(patsubst %.cc,%.o,$(SRCS)) 
-
-.cc:
-	$(CXX) $(LIBRARY) $<  $(LIBRARY) -o $@
-
-.cc.o:
-	$(CXX) $(INCLUDES) $< -c
-
-all: $(OBJECTS) image_open$(EXEEXT) image_copy$(EXEEXT) \
-	image_copy_b1$(EXEEXT) reproject$(EXEEXT) kwl$(EXEEXT) \
-	image_data$(EXEEXT) band_average$(EXEEXT)
-#\
-#	shared_band_average$(EXEEXT)
-
-image_open$(EXEEXT): image_open.o
-	$(CXX) $(INCLUDES) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(LDFLAGS_APP) image_open.o $(OSSIM_APP_LINK) -o $@
-
-image_copy$(EXEEXT): image_copy.o
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(LDFLAGS_APP) image_copy.o $(OSSIM_APP_LINK) -o $@
-
-image_copy_b1$(EXEEXT): image_copy_b1.o
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(LDFLAGS_APP) image_copy_b1.o $(OSSIM_APP_LINK) -o $@
-
-reproject$(EXEEXT): reproject.o
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(LDFLAGS_APP) reproject.o $(OSSIM_APP_LINK) -o $@
-
-kwl$(EXEEXT): kwl.o
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(LDFLAGS_APP) kwl.o $(OSSIM_APP_LINK) -o $@
-
-image_data$(EXEEXT): image_data.o
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(LDFLAGS_APP) image_data.o $(OSSIM_APP_LINK) -o $@
-
-band_average$(EXEEXT): band_average.o
-	$(CXX) $(CXXFLAGS) $(CDEBUGFLAGS) $(BASE_DEFINES) $(LDFLAGS_APP) band_average.o $(OSSIM_APP_LINK) -o $@
diff --git a/src/examples/vpf/Makefile b/src/examples/vpf/Makefile
deleted file mode 100644
index 61ce7e8..0000000
--- a/src/examples/vpf/Makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-PROGRAM=dump_table
-include ../../../makeprog.mak
diff --git a/src/examples/vpf/dump_table.cpp b/src/examples/vpf/dump_table.cpp
deleted file mode 100644
index 55a62b9..0000000
--- a/src/examples/vpf/dump_table.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author: Garrett Potts (gpotts at imagelinks.com)
-// Description: Does a table dump on any vpf table.
-//
-//********************************************************************
-// $Id: dump_table.cpp 9966 2006-11-29 02:01:07Z gpotts $
-#include <vec/vpf/ossimVpfTable.h>
-#include <base/common/ossimErrorCodes.h>
-
-void displayUsage()
-{
-   cout << "usage:\ndump_table <full path to table>" << endl;
-}
-
-int main(int argc, char *argv[])
-{
-   if(argc == 2)
-   {
-      ossimVpfTable table;
-   
-      if(table.openTable(argv[1]) == ossimErrorCodes::OSSIM_OK)
-      {
-         cout << table << endl;
-      }
-   }
-   else
-   {
-      displayUsage();
-   }
-}
diff --git a/src/makefile.inc b/src/makefile.inc
deleted file mode 100644
index 0e52348..0000000
--- a/src/makefile.inc
+++ /dev/null
@@ -1,71 +0,0 @@
-# $Id$
-# 
-# Include file for windows nmake for embedding manifest in dll's and 
-# executable (exe) files.
-#
-# makefile.inc -- Include this file into existing makefile at the very top.
-
-# _VC_MANIFEST_INC specifies whether build is incremental (1 - incremental).
-# _VC_MANIFEST_BASENAME specifies name of a temporary resource file.
-
-!if "$(DEBUG)" == "1"
-CPPFLAGS=$(CPPFLAGS) /MDd
-LFLAGS=$(LFLAGS) /INCREMENTAL
-_VC_MANIFEST_INC=1
-_VC_MANIFEST_BASENAME=__VC90.Debug
-
-!else
-CPPFLAGS=$(CPPFLAGS) /MD
-_VC_MANIFEST_INC=0
-_VC_MANIFEST_BASENAME=__VC90
-
-!endif
-
-####################################################
-# Specifying name of temporary resource file used only in incremental builds:
-
-!if "$(_VC_MANIFEST_INC)" == "1"
-_VC_MANIFEST_AUTO_RES=$(_VC_MANIFEST_BASENAME).auto.res
-!else
-_VC_MANIFEST_AUTO_RES=
-!endif
-
-####################################################
-# _VC_MANIFEST_EMBED_EXE - command to embed manifest in EXE:
-
-!if "$(_VC_MANIFEST_INC)" == "1"
-
-#MT_SPECIAL_RETURN=1090650113
-#MT_SPECIAL_SWITCH=-notify_resource_update
-MT_SPECIAL_RETURN=0
-MT_SPECIAL_SWITCH=
-_VC_MANIFEST_EMBED_EXE= \
-if exist $@.manifest mt.exe -manifest $@.manifest -out:$(_VC_MANIFEST_BASENAME).auto.manifest $(MT_SPECIAL_SWITCH) & \
-if "%ERRORLEVEL%" == "$(MT_SPECIAL_RETURN)" \
-rc /r $(_VC_MANIFEST_BASENAME).auto.rc & \
-link $** /out:$@ $(LFLAGS)
-
-!else
-
-_VC_MANIFEST_EMBED_EXE= \
-if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;1
-
-!endif
-
-####################################################
-# _VC_MANIFEST_CLEAN - command to clean resources files generated temporarily:
-
-!if "$(_VC_MANIFEST_INC)" == "1"
-
-_VC_MANIFEST_CLEAN=-del $(_VC_MANIFEST_BASENAME).auto.res \
-    $(_VC_MANIFEST_BASENAME).auto.rc \
-    $(_VC_MANIFEST_BASENAME).auto.manifest
-
-!else
-
-_VC_MANIFEST_CLEAN=
-
-!endif
-
-# End of makefile.inc 
-####################################################
diff --git a/src/makefile.targ.inc b/src/makefile.targ.inc
deleted file mode 100644
index 6d4beee..0000000
--- a/src/makefile.targ.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-# $Id$
-# 
-# Include file for windows nmake for embedding manifest in dll's and 
-# executable (exe) files.
-#
-# makefile.targ.inc - include this at the very bottom of the existing makefile
-
-####################################################
-# Commands to generate initial empty manifest file and the RC file
-# that references it, and for generating the .res file:
-
-$(_VC_MANIFEST_BASENAME).auto.res : $(_VC_MANIFEST_BASENAME).auto.rc
-
-$(_VC_MANIFEST_BASENAME).auto.rc : $(_VC_MANIFEST_BASENAME).auto.manifest
-    type <<$@
-#include <winuser.h>
-1RT_MANIFEST"$(_VC_MANIFEST_BASENAME).auto.manifest"
-<< KEEP
-
-$(_VC_MANIFEST_BASENAME).auto.manifest :
-    type <<$@
-<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
-<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
-</assembly>
-<< KEEP
-
-# end of makefile.targ.inc
diff --git a/src/makefile.vc b/src/makefile.vc
deleted file mode 100644
index 6422b41..0000000
--- a/src/makefile.vc
+++ /dev/null
@@ -1,29 +0,0 @@
-###
-# $Id: makefile.vc 9229 2006-07-05 21:08:52Z dburken $
-#
-# Windows nmake make file.
-###
-OSSIM_ROOT	=	..
-!INCLUDE $(OSSIM_ROOT)\nmake.opt
-
-default:
-	cd ossim
-	$(MAKE) /f makefile.vc
-	cd ..
-	cd apps
-	$(MAKE) /f makefile.vc
-	cd ..
-
-install:
-	cd apps
-	$(MAKE) /f makefile.vc install
-	cd ..
-
-clean:
-	cd ossim
-	$(MAKE) /f makefile.vc clean
-	cd ..
-	cd apps
-	$(MAKE) /f makefile.vc clean
-	cd ..
-
diff --git a/src/msvc/apps/ossim_applanix2ogeom/ossim_applanix2ogeom.vcproj b/src/msvc/apps/ossim_applanix2ogeom/ossim_applanix2ogeom.vcproj
deleted file mode 100644
index bd99737..0000000
--- a/src/msvc/apps/ossim_applanix2ogeom/ossim_applanix2ogeom.vcproj
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="ossim_applanix2ogeom"
-	ProjectGUID="{BC7009FE-6C3B-4D48-ADC7-A9A8BC2EB188}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAS_OPEN_THREADS=1;FREETYPE_SETTING=1;GEOTIFF_ENABLED;HAVE_CONFIG_H"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(SolutionDir)bin\ossim_applanix2ogeom.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/ossim_applanix2ogeom.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="NDEBUG;_WINDOWS;WIN32;_CONSOLE;"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="0"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(SolutionDir)bin\applanix2ogeom.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="FALSE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath="..\..\..\apps\applanix2ogeom\applanix2ogeom.cpp">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/src/msvc/apps/ossim_cmm/ossim_cmm.vcproj b/src/msvc/apps/ossim_cmm/ossim_cmm.vcproj
deleted file mode 100644
index 41d8db3..0000000
--- a/src/msvc/apps/ossim_cmm/ossim_cmm.vcproj
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="ossim_cmm"
-	ProjectGUID="{2BDA84EB-F0F1-422C-B47E-CF20D72B6267}"
-	RootNamespace="ossim_cmm"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(SolutionDir)bin\cmm.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/ossim_cmm.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="2"
-				RuntimeTypeInfo="TRUE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="0"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(SolutionDir)bin\cmm.exe"
-				LinkIncremental="1"
-				IgnoreAllDefaultLibraries="FALSE"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath="..\..\..\apps\cmm\cmm.cpp">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/src/msvc/apps/ossim_correl/ossim_correl.vcproj b/src/msvc/apps/ossim_correl/ossim_correl.vcproj
deleted file mode 100644
index c490d5f..0000000
--- a/src/msvc/apps/ossim_correl/ossim_correl.vcproj
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="ossim_correl"
-	ProjectGUID="{D36B2D8C-24DE-4E45-84A1-465EF5A8B5E1}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(SolutionDir)bin/correl.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/ossim_correl.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="0"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(SolutionDir)bin/correl.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="FALSE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath="..\..\..\apps\correl\correl.cpp">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/src/msvc/apps/ossim_createhisto/ossim_createhisto.vcproj b/src/msvc/apps/ossim_createhisto/ossim_createhisto.vcproj
deleted file mode 100644
index 26fea3c..0000000
--- a/src/msvc/apps/ossim_createhisto/ossim_createhisto.vcproj
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="ossim_createhisto"
-	ProjectGUID="{BF4B5324-1C37-4E88-A8FC-DE21E9303A5B}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAS_OPEN_THREADS=1;FREETYPE_SETTING=1;GEOTIFF_ENABLED;HAVE_CONFIG_H"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(SolutionDir)bin/create_histo.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/ossim_createhisto.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="NDEBUG;_WINDOWS;WIN32;_CONSOLE;"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="0"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(SolutionDir)bin/create_histo.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="FALSE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath="..\..\..\apps\create_histo\create_histo.cpp">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/src/msvc/apps/ossim_foo/ossim_foo.vcproj b/src/msvc/apps/ossim_foo/ossim_foo.vcproj
deleted file mode 100644
index 175a6aa..0000000
--- a/src/msvc/apps/ossim_foo/ossim_foo.vcproj
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="ossim_foo"
-	ProjectGUID="{9253FFF7-635C-48FD-99A0-1B38DB329983}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/ossim_foo.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/ossim_foo.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="4"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="0"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(SolutionDir)bin/foo.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="FALSE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath="..\..\..\apps\foo\foo.cpp">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/src/msvc/apps/ossim_icp/ossim_icp.vcproj b/src/msvc/apps/ossim_icp/ossim_icp.vcproj
deleted file mode 100644
index b30d388..0000000
--- a/src/msvc/apps/ossim_icp/ossim_icp.vcproj
+++ /dev/null
@@ -1,139 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="ossim_icp"
-	ProjectGUID="{2BDA84EB-F0F1-422C-B47E-CF20D72B6267}"
-	RootNamespace="ossim_icp"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				AdditionalUsingDirectories=""
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(SolutionDir)bin\icp.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/ossim_icp.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				AdditionalUsingDirectories=""
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="2"
-				RuntimeTypeInfo="TRUE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="0"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(SolutionDir)bin\icp.exe"
-				LinkIncremental="1"
-				IgnoreAllDefaultLibraries="FALSE"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath="..\..\..\apps\icp\icp.cpp">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/src/msvc/apps/ossim_igen/ossim_igen.vcproj b/src/msvc/apps/ossim_igen/ossim_igen.vcproj
deleted file mode 100644
index e81dc92..0000000
--- a/src/msvc/apps/ossim_igen/ossim_igen.vcproj
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="ossim_igen"
-	ProjectGUID="{EF13AAC9-34DB-4CE1-8F5C-3F866CBCBFC5}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(SolutionDir)bin\igen.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/ossim_igen.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="0"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(SolutionDir)bin\igen.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath="..\..\..\apps\igen\igen.cpp">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/src/msvc/apps/ossim_image_info/ossim_image_info.vcproj b/src/msvc/apps/ossim_image_info/ossim_image_info.vcproj
deleted file mode 100644
index 6fb5c0d..0000000
--- a/src/msvc/apps/ossim_image_info/ossim_image_info.vcproj
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="ossim_image_info"
-	ProjectGUID="{60DAF28B-6394-4D71-8850-D5271EF38B6C}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/ossim_image_info.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/ossim_image_info.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="0"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(SolutionDir)bin\image_info.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath="..\..\..\apps\image_info\image_info.cpp">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/src/msvc/apps/ossim_img2rr/ossim_img2rr.vcproj b/src/msvc/apps/ossim_img2rr/ossim_img2rr.vcproj
deleted file mode 100644
index 48105c8..0000000
--- a/src/msvc/apps/ossim_img2rr/ossim_img2rr.vcproj
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="ossim_img2rr"
-	ProjectGUID="{3FEB1182-C72B-4458-9BF7-EE4BEB114AC3}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;FREETYPE_SETTING=1;GEOTIFF_ENABLED;HAVE_CONFIG_H"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/img2rr.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/ossim_img2rr.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="0"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(SolutionDir)bin\img2rr.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath="..\..\..\apps\img2rr\img2rr.cpp">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/src/msvc/apps/ossim_ogeom2ogeom/ossim_ogeom2ogeom.vcproj b/src/msvc/apps/ossim_ogeom2ogeom/ossim_ogeom2ogeom.vcproj
deleted file mode 100644
index 19f6c3d..0000000
--- a/src/msvc/apps/ossim_ogeom2ogeom/ossim_ogeom2ogeom.vcproj
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="ossim_ogeom2ogeom"
-	ProjectGUID="{16FBB6C3-2CFB-4EE3-89D7-6483098A4F1E}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(SolutionDir)bin\ogeom2ogeom.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/ossim_ogeom2ogeom.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="0"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(SolutionDir)bin\ogeom2ogeom.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath="..\..\..\apps\ogeom2ogeom\ogeom2ogeom.cpp">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/src/msvc/apps/ossim_orthoigen/ossim_orthoigen.vcproj b/src/msvc/apps/ossim_orthoigen/ossim_orthoigen.vcproj
deleted file mode 100644
index 87a53c3..0000000
--- a/src/msvc/apps/ossim_orthoigen/ossim_orthoigen.vcproj
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="ossim_orthoigen"
-	ProjectGUID="{63DFABDA-D1E4-44F2-A903-F7F9D0EFBB02}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;FREETYPE_SETTING=1;GEOTIFF_ENABLED;HAVE_CONFIG_H"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/orthoigen.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/ossim_orthoigen.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="0"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(SolutionDir)bin\orthoigen.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath="..\..\..\apps\orthoigen\orthoigen.cpp">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/src/msvc/apps/ossim_rejout/ossim_rejout.vcproj b/src/msvc/apps/ossim_rejout/ossim_rejout.vcproj
deleted file mode 100644
index 4854bfd..0000000
--- a/src/msvc/apps/ossim_rejout/ossim_rejout.vcproj
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="ossim_rejout"
-	ProjectGUID="{D36B2D8C-24DE-4E45-84A1-465EF5A8B5E1}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(SolutionDir)bin/rejout.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/ossim_rejout.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\..\..\libtiff\libtiff\;..\..\..\..\..\3rdParty\include;..\..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="0"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(SolutionDir)bin/rejout.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="FALSE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath="..\..\..\apps\rejout\rejout.cpp">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/src/msvc/ossim.iss b/src/msvc/ossim.iss
deleted file mode 100644
index ef93ea7..0000000
--- a/src/msvc/ossim.iss
+++ /dev/null
@@ -1,21 +0,0 @@
-[Setup]
-AppName=imagelinker
-AppVerName=1.5.101
-DefaultDirName={pf}\ossim
-DefaultGroupName=ossim
-[Files]
-Source: C:\drb\ossim\bin\ossim.dll; DestDir: {app}; Flags: sharedfile replacesameversion
-Source: C:\drb\inno_setup\ossim\qt-mtnc321.dll; DestDir: {app}; Flags: sharedfile
-Source: C:\drb\inno_setup\ossim\msvcr71.dll; DestDir: {app}; Flags: sharedfile
-Source: C:\drb\inno_setup\ossim\msvcp71.dll; DestDir: {app}; Flags: sharedfile
-Source: C:\drb\ossim\bin\create_histo.exe; DestDir: {app}
-Source: C:\drb\ossim\bin\igen.exe; DestDir: {app}
-Source: C:\drb\ossim\bin\image_info.exe; DestDir: {app}
-Source: C:\drb\ossim\bin\icp.exe; DestDir: {app}
-Source: C:\drb\ossim\bin\imagelinker.exe; DestDir: {app}
-Source: C:\drb\ossim\bin\img2rr.exe; DestDir: {app}
-[Icons]
-Name: {group}\{cm:UninstallProgram, imagelinker}; Filename: {uninstallexe}
-Name: {group}\imagelinker; Filename: {app}\imagelinker.exe
-[_ISTool]
-UseAbsolutePaths=true
diff --git a/src/msvc/ossim_core_project/AssemblyInfo.cpp b/src/msvc/ossim_core_project/AssemblyInfo.cpp
deleted file mode 100644
index e550a32..0000000
--- a/src/msvc/ossim_core_project/AssemblyInfo.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-#include "stdafx.h"
-
-using namespace System::Reflection;
-using namespace System::Runtime::CompilerServices;
-
-//
-// General Information about an assembly is controlled through the following 
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-//
-[assembly:AssemblyTitleAttribute("")];
-[assembly:AssemblyDescriptionAttribute("")];
-[assembly:AssemblyConfigurationAttribute("")];
-[assembly:AssemblyCompanyAttribute("")];
-[assembly:AssemblyProductAttribute("")];
-[assembly:AssemblyCopyrightAttribute("")];
-[assembly:AssemblyTrademarkAttribute("")];
-[assembly:AssemblyCultureAttribute("")];		
-
-//
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-// You can specify all the value or you can default the Revision and Build Numbers 
-// by using the '*' as shown below:
-
-[assembly:AssemblyVersionAttribute("1.0.*")];
-
-//
-// In order to sign your assembly you must specify a key to use. Refer to the 
-// Microsoft .NET Framework documentation for more information on assembly signing.
-//
-// Use the attributes below to control which key is used for signing. 
-//
-// Notes: 
-//   (*) If no key is specified, the assembly is not signed.
-//   (*) KeyName refers to a key that has been installed in the Crypto Service
-//       Provider (CSP) on your machine. KeyFile refers to a file which contains
-//       a key.
-//   (*) If the KeyFile and the KeyName values are both specified, the 
-//       following processing occurs:
-//       (1) If the KeyName can be found in the CSP, that key is used.
-//       (2) If the KeyName does not exist and the KeyFile does exist, the key 
-//           in the KeyFile is installed into the CSP and used.
-//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
-//        When specifying the KeyFile, the location of the KeyFile should be
-//        relative to the project directory.
-//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
-//       documentation for more information on this.
-//
-[assembly:AssemblyDelaySignAttribute(false)];
-[assembly:AssemblyKeyFileAttribute("")];
-[assembly:AssemblyKeyNameAttribute("")];
-
diff --git a/src/msvc/ossim_core_project/ReadMe.txt b/src/msvc/ossim_core_project/ReadMe.txt
deleted file mode 100644
index 79ea467..0000000
--- a/src/msvc/ossim_core_project/ReadMe.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-========================================================================
-    DYNAMIC LINK LIBRARY : ossim_core_project Project Overview
-========================================================================
-
-AppWizard has created this ossim_core_project DLL for you.  
-
-This file contains a summary of what you will find in each of the files that
-make up your ossim_core_project application.
-
-ossim_core_project.vcproj
-    This is the main project file for VC++ projects generated using an Application Wizard. 
-    It contains information about the version of Visual C++ that generated the file, and 
-    information about the platforms, configurations, and project features selected with the
-    Application Wizard.
-
-ossim_core_project.cpp
-    This is the main DLL source file.
-
-ossim_core_project.h
-    This file contains a class declaration.
-
-AssemblyInfo.cpp
-	Contains custom attributes for modifying assembly metadata.
-
-/////////////////////////////////////////////////////////////////////////////
-Other notes:
-
-AppWizard uses "TODO:" to indicate parts of the source code you
-should add to or customize.
-
-/////////////////////////////////////////////////////////////////////////////
diff --git a/src/msvc/ossim_core_project/Stdafx.cpp b/src/msvc/ossim_core_project/Stdafx.cpp
deleted file mode 100644
index f0dd38a..0000000
--- a/src/msvc/ossim_core_project/Stdafx.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-// stdafx.cpp : source file that includes just the standard includes
-// ossim_core_project.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
-
-#include "stdafx.h"
diff --git a/src/msvc/ossim_core_project/Stdafx.h b/src/msvc/ossim_core_project/Stdafx.h
deleted file mode 100644
index 07ec3fb..0000000
--- a/src/msvc/ossim_core_project/Stdafx.h
+++ /dev/null
@@ -1,6 +0,0 @@
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently,
-// but are changed infrequently
-
-#pragma once
-
diff --git a/src/msvc/ossim_core_project/app.ico b/src/msvc/ossim_core_project/app.ico
deleted file mode 100644
index 3a5525f..0000000
Binary files a/src/msvc/ossim_core_project/app.ico and /dev/null differ
diff --git a/src/msvc/ossim_core_project/app.rc b/src/msvc/ossim_core_project/app.rc
deleted file mode 100644
index 6be44ad..0000000
--- a/src/msvc/ossim_core_project/app.rc
+++ /dev/null
@@ -1,52 +0,0 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon placed first or with lowest ID value becomes application icon
-
-LANGUAGE 9, 1
-#pragma code_page(1252)
-1           ICON         "app.ico"
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE  
-BEGIN
-    "resource.h\0"
-    "\0"
-END
-
-#endif    // APSTUDIO_INVOKED
-
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif    // not APSTUDIO_INVOKED
-
diff --git a/src/msvc/ossim_core_project/compiler_options.txt b/src/msvc/ossim_core_project/compiler_options.txt
deleted file mode 100644
index 9ca7bca..0000000
--- a/src/msvc/ossim_core_project/compiler_options.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-/D_FILE_OFFSET_BITS=64 /D_LARGE_FILES /DMPI_SETTING=0 /DHAS_OPEN_
-THREADS=0 /DGEOTIFF_ENABLED /DGDAL_SETTING=1 /DFREETYPE_SETTING=0 /DHAVE_CONFIG_H /I..\..\packages\gdal\gcore /I..\..\packages\gdal\port /I..\..\packages\gdal\ogr /I..\..\packages\gdal\ogr\ogrsf_frmts /I..\..\packages\gdal\ogr\ogrsf_frmts\shape -I..\..\packages\gdal\frmts\gtiff\libgeotiff /I..\..\packages\gdal\frmts\iso8211 /I..\..\packages\gdal\frmts\gtiff\libtiff /I..\..\packages\gdal\frmts\shapelib \I..\..\ossim_core \I..\..
diff --git a/src/msvc/ossim_core_project/makefile.vc b/src/msvc/ossim_core_project/makefile.vc
deleted file mode 100644
index 14f21c8..0000000
--- a/src/msvc/ossim_core_project/makefile.vc
+++ /dev/null
@@ -1,27 +0,0 @@
-GDAL_LIBS = 	gdal.lib \
-		cpl.lib \
-		ogr.lib \
-		ogr2ogr.lib \
-		ogrinfo.lib \
-		ogrsf_frmts.lib \
-		ogrsf_frmts_sup.lib \
-		libjpeg.lib
-
-# GDAL_LIBS2 = 	gdal_i.lib
-
-MR_SID_LIBS = /LIBPATH:C:\drb\mrsid\Win7_DSDK\lib MrSIDDecode_md.lib lt_xTrans_md.lib advapi32.lib user32.lib
-
-OBJ = *.obj
-
-LIB_DIR = ..\..\..\lib
-
-default:	$(OBJ)
-        link /OUT:"$(LIB_DIR)\ossim.dll" /NOLOGO /DLL /IMPLIB:"$(LIB_DIR)\ossim.lib"  $(OBJ) /LIBPATH:$(LIB_DIR) $(GDAL_LIBS) $(MR_SID_LIBS) odbc32.lib
-
-#        link /OUT:".\ossim.dll" /INCREMENTAL:NO /NOLOGO /DLL /IMPLIB:".\ossim.lib"  $(OBJ) $(GDAL_LIBS) odbc32.lib msvcrt.lib
-
-# $(GDAL_LIBS) kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib msvcrt.lib
-
-clean:
-	-del *.obj *.lib *.dll
-
diff --git a/src/msvc/ossim_core_project/ossim_core_project.cpp b/src/msvc/ossim_core_project/ossim_core_project.cpp
deleted file mode 100644
index c6c37cd..0000000
--- a/src/msvc/ossim_core_project/ossim_core_project.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-// This is the main DLL file.
-#include <windows.h>
-#include "stdafx.h"
-
-#include "ossim_core_project.h"
-
-extern "C"
-BOOL WINAPI DllMain(HINSTANCE hInstance,  /* handle to DLL module */
-                    DWORD     dwReason,   /* reason for calling function */
-		    LPVOID    lpReserved )/* reserved */
-{
-   /* Nothing to do here yet. */
-   return TRUE;
-}
-
diff --git a/src/msvc/ossim_core_project/ossim_core_project.h b/src/msvc/ossim_core_project/ossim_core_project.h
deleted file mode 100644
index 224e4d1..0000000
--- a/src/msvc/ossim_core_project/ossim_core_project.h
+++ /dev/null
@@ -1,7 +0,0 @@
-// ossim_core_project.h
-
-
-namespace ossim_core_project
-{
-
-}
diff --git a/src/msvc/ossim_core_project/ossim_core_project.sln b/src/msvc/ossim_core_project/ossim_core_project.sln
deleted file mode 100644
index 540eda7..0000000
--- a/src/msvc/ossim_core_project/ossim_core_project.sln
+++ /dev/null
@@ -1,39 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ossim_core_project", "ossim_core_project.vcproj", "{B63B8485-00DC-4D37-B116-50B62DA92FF8}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ossim_icp", "..\apps\ossim_icp\ossim_icp.vcproj", "{2BDA84EB-F0F1-422C-B47E-CF20D72B6267}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B63B8485-00DC-4D37-B116-50B62DA92FF8} = {B63B8485-00DC-4D37-B116-50B62DA92FF8}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ossim_igen", "..\apps\ossim_igen\ossim_igen.vcproj", "{EF13AAC9-34DB-4CE1-8F5C-3F866CBCBFC5}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B63B8485-00DC-4D37-B116-50B62DA92FF8} = {B63B8485-00DC-4D37-B116-50B62DA92FF8}
-	EndProjectSection
-EndProject
-Global
-	GlobalSection(SolutionConfiguration) = preSolution
-		Debug = Debug
-		Release = Release
-	EndGlobalSection
-	GlobalSection(ProjectConfiguration) = postSolution
-		{B63B8485-00DC-4D37-B116-50B62DA92FF8}.Debug.ActiveCfg = Debug|Win32
-		{B63B8485-00DC-4D37-B116-50B62DA92FF8}.Debug.Build.0 = Debug|Win32
-		{B63B8485-00DC-4D37-B116-50B62DA92FF8}.Release.ActiveCfg = Release|Win32
-		{B63B8485-00DC-4D37-B116-50B62DA92FF8}.Release.Build.0 = Release|Win32
-		{2BDA84EB-F0F1-422C-B47E-CF20D72B6267}.Debug.ActiveCfg = Debug|Win32
-		{2BDA84EB-F0F1-422C-B47E-CF20D72B6267}.Debug.Build.0 = Debug|Win32
-		{2BDA84EB-F0F1-422C-B47E-CF20D72B6267}.Release.ActiveCfg = Release|Win32
-		{2BDA84EB-F0F1-422C-B47E-CF20D72B6267}.Release.Build.0 = Release|Win32
-		{EF13AAC9-34DB-4CE1-8F5C-3F866CBCBFC5}.Debug.ActiveCfg = Debug|Win32
-		{EF13AAC9-34DB-4CE1-8F5C-3F866CBCBFC5}.Debug.Build.0 = Debug|Win32
-		{EF13AAC9-34DB-4CE1-8F5C-3F866CBCBFC5}.Release.ActiveCfg = Release|Win32
-		{EF13AAC9-34DB-4CE1-8F5C-3F866CBCBFC5}.Release.Build.0 = Release|Win32
-	EndGlobalSection
-	GlobalSection(ExtensibilityGlobals) = postSolution
-	EndGlobalSection
-	GlobalSection(ExtensibilityAddIns) = postSolution
-	EndGlobalSection
-EndGlobal
diff --git a/src/msvc/ossim_core_project/ossim_core_project.vcproj b/src/msvc/ossim_core_project/ossim_core_project.vcproj
deleted file mode 100644
index f94f9dd..0000000
--- a/src/msvc/ossim_core_project/ossim_core_project.vcproj
+++ /dev/null
@@ -1,4340 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="ossim_core_project"
-	ProjectGUID="{B63B8485-00DC-4D37-B116-50B62DA92FF8}"
-	RootNamespace="ossim_core_project"
-	Keyword="ManagedCProj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="2"
-			ManagedExtensions="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zl  /D_FILE_OFFSET_BITS=64 /D_LARGE_FILES /DMPI_SETTING=0 /DHAS_OPEN_THREADS=0 /DGEOTIFF_ENABLED /DGDAL_SETTING=1 /DFREETYPE_SETTING=0 /DHAVE_CONFIG_H /I..\..\..\..\3rdParty/include /I..\..  /I..\..\ossim_core /I..\..\packages\gdal\frmts\jpeg\libjpeg"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\..\libtiff\libtiff;..\..\..\..\3rdParty\include;..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="OSSIMMAKINGDLL;HAS_OPEN_THREADS=1;FREETYPE_SETTING=1;GEOTIFF_ENABLED;HAVE_CONFIG_H"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				WarningLevel="2"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="..\..\..\..\3rdParty\lib\libjpeg.lib ..\..\..\..\3rdParty\lib\geotiff.lib ..\..\..\..\3rdParty\lib\libtiff.lib ..\..\..\..\3rdParty\lib\zlib.lib ..\..\..\..\3rdParty\lib\freetype219.lib ..\..\..\..\OpenThreads\lib\win32\OpenThreadsWin32.lib"
-				OutputFile="$(SolutionDir)bin\ossimd.dll"
-				SuppressStartupBanner="TRUE"
-				IgnoreDefaultLibraryNames="libc.lib;libcd.lib"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				ImportLibrary="$(SolutionDir)lib\ossimd.lib"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="2"
-			ManagedExtensions="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zl /D_FILE_OFFSET_BITS=64 /D_LARGE_FILES /DMPI_SETTING=0 /DHAS_OPEN_THREADS=0 /DGEOTIFF_ENABLED /DGDAL_SETTING=1 /DFREETYPE_SETTING=0 /DHAVE_CONFIG_H /I..\..\packages\gdal\gcore /I..\..\packages\gdal\port /I..\..\packages\gdal\ogr /I..\..\packages\gdal\ogr\ogrsf_frmts /I..\..\packages\gdal\frmts\jpeg\libjpeg  /I..\..\packages\gdal\ogr\ogrsf_frmts\shape /I..\..\packages\gdal\frmts\gtiff\libgeotiff /I..\..\packages\gdal\frmts\iso8211 /I..\..\packages\gdal\frmts\gtif [...]
-
-"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libtiff\libtiff;..\..\..\..\3rdParty\include;..\..\..\..\OpenThreads\include\"
-				PreprocessorDefinitions="OSSIMMAKINGDLL;HAVE_CONFIG_H"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="2"
-				DebugInformationFormat="0"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="..\..\..\..\3rdParty\lib\libjpeg.lib ..\..\..\..\3rdParty\lib\geotiff.lib ..\..\..\..\3rdParty\lib\libtiff.lib ..\..\..\..\3rdParty\lib\zlib.lib ..\..\..\..\3rdParty\lib\freetype219.lib ..\..\..\..\OpenThreads\lib\win32\OpenThreadsWin32.lib"
-				OutputFile="$(SolutionDir)bin\ossim.dll"
-				LinkIncremental="0"
-				SuppressStartupBanner="TRUE"
-				IgnoreDefaultLibraryNames="libcd"
-				SubSystem="1"
-				ImportLibrary="$(SolutionDir)lib\ossim.lib"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-		<AssemblyReference
-			RelativePath="mscorlib.dll"/>
-		<AssemblyReference
-			RelativePath="System.dll"/>
-		<AssemblyReference
-			RelativePath="System.Data.dll"/>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cc;cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath="..\..\ossim\matrix\bandmat.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\bitarray.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\kbool\booleng.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\cholesky.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vec\dbfopen.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\distance.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\evalue.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\fft.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\kbool\graph.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\kbool\graphlst.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\hholder.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\jacobi.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\kbool\line.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\kbool\link.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\linklist.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\kbool\lpoint.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\myexcept.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\newfft.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\newmat1.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\newmat2.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\newmat3.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\newmat4.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\newmat5.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\newmat6.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\newmat7.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\newmat8.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\newmat9.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\newmatex.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\newmatnl.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\newmatrm.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\kbool\node.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossim2dLinearRegression.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossim2dTo2dTransform.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossim3x3ConvolutionFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimActiveEdgeTable.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimAdjMapModel.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimAdjustableParameterInfo.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimAdjustableParameterInterface.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimAdjustmentInfo.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimAdrData.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAdrgHeader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAdrgTileSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimAffineProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimAffineTransform.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimAigBounds.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimAigDataFileHeader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimAigHeader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimAigIndexFileHeader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimAigStatistics.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimAlbersProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAnnotationEllipseObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAnnotationFontObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAnnotationGdBitmapFont.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAnnotationLineObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAnnotationMultiEllipseObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAnnotationMultiLineObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAnnotationMultiPolyLineObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAnnotationMultiPolyObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAnnotationObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAnnotationObjectFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAnnotationPolyObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAnnotationSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAOD.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAppFixedTileCache.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimApplanixEcefModel.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimApplanixEOFile.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimApplanixUtmModel.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimApplicationUsage.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAppTileCache.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimArcInfoGridWriter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimArgumentParser.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAtbController.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAtbMatchPoint.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAtbPointSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAtCorrGridRemapper.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimAtCorrRemapper.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimAzimEquDistProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimBandAverageFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimBandClipFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimBandMergeSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimBandSelector.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimBaseObjectFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimBilinearProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimBilSplitter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimBlendMosaic.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimBngProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimBonneProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimBooleanProperty.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimBrightnessContrastSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimBrightnessMatch.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimBumpShadeTileSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimCacheTileSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimCadrgProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimCassiniProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimCastTileSourceFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimCcfHead.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimCcfTileSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimCibCadrgTileSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimClosestToCenterCombiner.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimCmyVector.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimCoarseGridModel.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimColorNormalizedFusion.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimColorProperty.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimCommon.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimConnectableContainer.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimConnectableContainerInterface.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimConnectableDisplayListener.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimConnectableObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimConnectableObjectListener.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimConnectionEvent.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimContainerEvent.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimContainerProperty.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimConvolutionFilter1D.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimConvolutionSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimCplUtil.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimCustomEditorWindow.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimCustomEditorWindowFactoryBase.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimCustomEditorWindowRegistry.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimCylEquAreaProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimDataObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimDate.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimDateProperty.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimDatum.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimDatumFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimDatumFactory.inc">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimDblGrid.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimDdffield.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimDdffielddefn.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimDdfmodule.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimDdfrecord.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimDdfsubfielddefn.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimDdfutils.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimDemGrid.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimDemHeader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimDemPoint.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimDemProfile.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimDemStats.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimDemUtil.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimDirectory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimDirectoryData.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimDirectoryTree.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimDiscrete3x3HatFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimDiscreteConvolutionKernel.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimDisplayEventListener.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimDisplayInterface.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimDisplayListEvent.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimDisplayRefreshEvent.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimDms.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimDoqq.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimDoqqTileSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimDoubleGridProperty.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimDpt.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimDpt3d.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimDrect.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimDtedAcc.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimDtedDsi.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimDtedElevationImageSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\elevation\ossimDtedFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\elevation\ossimDtedHandler.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimDtedHdr.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimDtedRecord.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimDtedTileSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimDtedUhl.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimDtedVol.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\plugin\ossimDynamicLibrary.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimEastingNorthingCutter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimEbcdicToAscii.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimEcefPoint.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimEcefRay.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimEckert4Projection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimEckert6Projection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimEdgeFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimElevationManagerEvent.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimElevationManagerEventListener.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\elevation\ossimElevationShapeIdx.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\elevation\ossimElevCellHandler.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\elevation\ossimElevCellHandlerFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimElevImageSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\elevation\ossimElevManager.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\elevation\ossimElevSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\elevation\ossimElevSourceFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimEllipsoid.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimEllipsoidFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimEndian.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimEnviHeader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimEnviHeaderFileWriter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimEnvironmentUtility.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimEquationCombiner.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimEquDistCylProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimEquTokenDefines.h">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimEquTokenizer.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimEquTokenizer.h">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimErrorCodes.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimErrorStatusInterface.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimERS.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimERSTileSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimEsriShapeFileCutter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimEsriShapeFileFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimEvent.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimFactoryBaseTemplate.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimFcsiModel.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimFeatherMosaic.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimFfL5.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimFfL7.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimFfRevb.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimFfRevc.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimFftFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimFgdcFileWriter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimFilename.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimFilenameProperty.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimFilterResampler.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimFilterTable.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimFixedTileCache.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\font\ossimFont.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\font\ossimFontFactoryRegistry.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimFontInformation.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimFontProperty.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimFpt.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimFpt3d.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\font\ossimFreeTypeFont.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\font\ossimFreeTypeFontFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimFusionCombiner.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGammaRemapper.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\font\ossimGdBitmapFont.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\elevation\ossimGeneralRasterElevFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\elevation\ossimGeneralRasterElevHandler.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGeneralRasterInfo.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGeneralRasterTileSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGeneralRasterWriter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGeoAnnotationBitmap.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGeoAnnotationEllipseObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGeoAnnotationFontObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGeoAnnotationGdBitmapFont.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGeoAnnotationLineObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGeoAnnotationMultiEllipseObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGeoAnnotationMultiPolyLineObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGeoAnnotationMultiPolyObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGeoAnnotationObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGeoAnnotationPolyLineObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGeoAnnotationPolyObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGeoAnnotationSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimGeocent.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGeographicAnnotationGrid.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimGeoid.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimGeoidEgm96.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimGeoidManager.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimGeoidNgs.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimGeoidNgsHeader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGeomFileWriter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGeoPolyCutter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimGeoPolygon.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimGeoref.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimGeoTiff.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimGeoTiffCoordTransformsLut.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimGeoTiffDatumLut.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimGnomonicProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimGpt.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimGrect.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGridRemapEngine.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGridRemapEngineFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimGridRemapSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimGzStream.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimHexString.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimHistogram.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimHistogramEqualization.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimHistogramMatchFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimHistogramRemapper.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimHistogramSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimHistogramThreshholdFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimHistogramWriter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimHistoMatchRemapper.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimHsiRemapper.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimHsiToRgbSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimHsiVector.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimHsvGridRemapEngine.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimHsvToRgbSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimHsvVector.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimId.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimIdManager.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\parallel\ossimIgen.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimIgenGenerator.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimIkonosMetaData.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimIkonosRpcModel.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimImageAoiListener.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageChain.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageCombiner.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageData.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageDataFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageDataHelper.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageDisplayWriter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageFileWriter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageGaussianFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimImageGeometryEvent.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimImageGeometryEventListener.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageHandler.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageHandlerFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageHandlerFactoryBase.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageHandlerRegistry.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageHistogramSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageMetaData.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageMetaDataWriterFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageMetaDataWriterFactoryBase.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageMetaDataWriterRegistry.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageMosaic.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\parallel\ossimImageMpiMWriterSequenceConnection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\parallel\ossimImageMpiSWriterSequenceConnection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageReconstructionFilterFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageReconstructionFilterRegistry.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageRenderer.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageShapeFileIndex.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageSharpenFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageSourceFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageSourceFactoryBase.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageSourceFactoryRegistry.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageSourceFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageSourceHistogramFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageSourceInterface.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageSourceSequencer.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageStatisticsSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageToPlaneNormalFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimImageTypeLut.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimImageViewAffineTransform.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimImageViewProjectionTransform.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimImageViewTransform.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimImageViewTransformFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageWriter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageWriterFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageWriterFactoryBase.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimImageWriterFactoryRegistry.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimIndexToRgbLutFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\init\ossimInit.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimIntensityAdjustmentFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimInterleaveTypeLut.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimIoStream.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimIpt.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimIrect.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimJpegTileSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimJpegWriter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimJpegYCbCrToRgbSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimJpegYCbCrVector.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimKeyword.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimKeywordlist.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimKeywordNames.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimLambertConformalConicProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimLandSatModel.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimLandsatTileSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimLandsatTopoCorrectionFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimLeastSquaresBilin.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimLensDistortion.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimLine.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimListener.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimListenerManager.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimLlxyProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimLocalCorrelationFusion.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimLookUpTable.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimLsrPoint.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimLsrRay.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimLsrSpace.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimLsrVector.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimMapCompositionSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimMapProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimMapProjectionFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimMapProjectionInfo.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimMapViewController.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimMaskFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimMatrix3x3.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimMatrix4x4.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimMatrixProperty.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimMaxMosaic.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimMeanMedianFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimMeanRadialLensDistortion.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimMercatorProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimMetadataFileWriter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimMgrs.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimMillerProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimMiscProjectionFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimMollweidProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimMonoGridRemapEngine.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimMouseEvent.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimMouseListener.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\parallel\ossimMpi.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimMultiBandHistogram.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimMultiBandHistogramTileSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimMultiResLevelHistogram.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimMutex.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimNadconGridDatum.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimNadconGridFile.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimNadconGridHeader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimNadconNarDatum.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimNadconNasDatum.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimNBandLutDataObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimNBandToIndexFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimNewZealandMapGridProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfBlockaTag.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfCommon.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfCompressionHeader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfDataExtensionSegment.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfDataExtensionSegmentV2_0.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfEmbeddedRpfDes.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfEmbeddedRpfHeader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfFile.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfFileHeader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfFileHeaderV2_0.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfFileHeaderV2_1.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfFileHeaderV2_X.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfGeoPositioningTag.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfIchipbTag.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfImageBand.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfImageBandV2_0.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfImageBandV2_1.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfImageHeader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfImageHeaderV2_0.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfImageHeaderV2_1.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfImageHeaderV2_X.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfImageLut.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfImageLutV2_0.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfImageLutV2_1.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfLabelHeader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfLabelHeaderV2_0.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfLocalCartographicTag.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfLocalGeographicTag.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimNitfMapModel.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfNameConversionTables.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfPiaimcTag.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimNitfProjectionFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfProjectionParameterTag.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfRegisteredTag.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfRegisteredTagFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfRpcATag.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfRpcBase.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfRpcBTag.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimNitfRpcModel.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfRpfTagFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfSensraTag.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfStdidcTag.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfSymbolHeader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfSymbolHeaderV2_0.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfTagFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfTagFactoryRegistry.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfTagInformation.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfTextHeader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfTextHeaderV2_0.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimNitfTileSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfUnknownTag.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfUse00aTag.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimNitfVqCompressionHeader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimNitfWriter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimNormalizedRemapTable.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimNormalizedU11RemapTable.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimNormalizedU16RemapTable.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimNormalizedU8RemapTable.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimNormRgbVector.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimNotify.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimNumericProperty.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimObjectDestructingEvent.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimObjectFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimObjectFactoryRegistry.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimObliqueMercatorProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimOptimizableProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimOrthoGraphicProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\parallel\ossimOrthoIgen.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimOrthoImageMosaic.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimOutputSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimPackedBits.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimPcsCodeProjectionFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimPixelFlipper.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\plugin\ossimPluginLibrary.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimPolarst.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimPolarStereoProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimPolyArea2d.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimPolyconicProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimPolyCutter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimPolygon.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimPolyLine.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimPolynomProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimPreferences.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimProcessInterface.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimProcessListener.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimProcessProgressEvent.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimProjectionFactoryBase.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimProjectionFactoryRegistry.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimProjectionViewControllerFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimProperty.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimPropertyInterface.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimPropertyInterfaceFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimPropertyInterfaceRegistry.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimQuadProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimQuadrilateralMap.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimQuadTreeWarp.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimQuickbirdNitfTileSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimQuickbirdRpcHeader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimQuickbirdRpcModel.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimQuickbirdTiffTileSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimQuickbirdTile.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimRadialDecentLensDistortion.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimRationalNumber.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimReadmeFileWriter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimRectangleCutFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimRectanglePartitioner.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimRectilinearDataObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimReferenced.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimRefreshEvent.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimRegExp.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimResampler.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimRgbGridRemapEngine.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimRgbImage.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimRgbLutDataObject.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimRgbToGreyFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimRgbToHsiSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimRgbToHsvSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimRgbToIndexFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimRgbToJpegYCbCrSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimRgbVector.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimRLevelFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimROIEvent.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimROIEventListener.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimRpcModel.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimRpcProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimRpcSolver.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfAttributeOffsetRecord.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfAttributes.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfAttributeSectionSubheader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfBoundaryRectRecord.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfBoundaryRectSectionSubheader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfBoundaryRectTable.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfColorConverterOffsetRecord.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfColorConverterSubsection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfColorConverterTable.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfColorGrayscaleOffsetRecord.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfColorGrayscaleSubheader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfColorGrayscaleTable.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfCompressionLookupOffsetRecord.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfCompressionSection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfCompressionSectionSubheader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfCoverageSection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfFrame.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfFrameEntry.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfFrameFileIndexRecord.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfFrameFileIndexSectionSubheader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfFrameFileIndexSubsection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfFrameFileReader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfHeader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfImageDescriptionSubheader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfImageDisplayParameterSubheader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfLocationSection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfMaskSubheader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfMaskSubsection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfPathnameRecord.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfToc.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimRpfTocEntry.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimRtti.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimS16ImageData.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimScalarRemapper.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimScalarTypeLut.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimScaleFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimSensorModel.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimSensorModelFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimSevenParamDatum.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimSFIMFusion.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vec\ossimShapeDatabase.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vec\ossimShapeFile.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\plugin\ossimSharedObjectBridge.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\plugin\ossimSharedPluginRegistry.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimSinusoid.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimSinusoidalProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimSpaceImagingGeom.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimSpaceObliqueMercatorProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimSpot5Model.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimSpotDimapSupportData.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimSrsProjectionFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\elevation\ossimSrtmFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimSrtmFilename.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\elevation\ossimSrtmHandler.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimSrtmSupportData.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimSrtmTileSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimStateChangedEvent.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimStatePlaneProjectionFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimStatePlaneProjectionInfo.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimStdOutProgress.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimStereographicProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimStreamBase.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimStreamFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimStreamFactoryRegistry.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimString.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimStringListProperty.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimStringProperty.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimSubImageTileSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimTableRemapper.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimTDpt.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimTempFilename.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimTextProperty.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimThreeParamDatum.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimTieGpt.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimTieGptSet.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimTiffOverviewBuilder.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimTiffProjectionFactory.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimTiffTileSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\support_data\ossimTiffWorld.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimTiffWriter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimTileCache.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimTiledImageHash.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimTileHash.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimTilePatch.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimTiling.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimTopographicCorrectionFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimTrace.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimTraceManager.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimTranmerc.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimTransCylEquAreaProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimTransMercatorProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimTrimFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimU11ImageData.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimU16ImageData.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimU8ImageData.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimUnitConversionTool.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimUnitTypeLut.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimUps.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimUpsProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimUpspt.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimUsgsDemTileSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimUsgsQuad.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimUtm.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimUtmProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimUtmpt.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimValueAssignImageSourceFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimVanDerGrintenProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimVectorRenderer.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimVertexExtractor.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimViewController.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimViewEvent.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimViewInterface.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimViewListener.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimVpfAnnotationCoverageInfo.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimVpfAnnotationFeatureInfo.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimVpfAnnotationLibraryInfo.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimVpfAnnotationSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vec\ossimVpfBoundingRecordTable.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vec\ossimVpfCoverage.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vec\ossimVpfDatabase.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vec\ossimVpfDatabaseHeader.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vec\ossimVpfDatabaseHeaderTableValidator.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vec\ossimVpfExtent.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vec\ossimVpfFeatureClass.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vec\ossimVpfFeatureClassSchema.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vec\ossimVpfLibrary.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vec\ossimVpfLibraryAttributeTableValidator.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vec\ossimVpfTable.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimVpfTileSource.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimVrect.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\projection\ossimWarpProjection.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimWatermarkFilter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimWgs72Datum.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimWgs84Datum.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\imaging\ossimWorldFileWriter.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimXmlAttribute.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimXmlDocument.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimXmlNode.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\base\ossimXmlString.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\polygrf.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\kbool\record.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\kbool\scanbeam.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\set.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vec\shpopen.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vec\shptree.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\solution.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\sort.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\submat.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\matrix\svd.cpp">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\vpfclip.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\vpfcntnt.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\vpfdict.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\vpfdisp.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\vpfdraw.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\vpfmisc.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\vpfnear.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\vpfprim.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\vpfptply.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\vpfquery.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\vpfread.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\vpfrelat.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\vpfselec.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\vpfspx.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\vpftable.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\vpftidx.c">
-			</File>
-			<File
-				RelativePath="..\..\ossim\vpfutil\vpfwrite.c">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-			<File
-				RelativePath="..\..\..\include\ossim\kbool\_dl_itr.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\kbool\_dl_itr.inc">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\kbool\_lnk_itr.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\kbool\_lnk_itr.inc">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\kbool\bool_globals.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\matrix\boolean.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\kbool\booleng.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\matrix\controlw.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\datum.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\FlexLexer.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\kbool\graph.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\kbool\graphlst.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\matrix\include.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\kbool\line.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\kbool\link.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\linklist.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\kbool\lpoint.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\machine.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\mapgraph.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\matrix\myexcept.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\matrix\newmat.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\matrix\newmatap.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\matrix\newmatio.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\matrix\newmatnl.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\matrix\newmatrc.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\matrix\newmatrm.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\kbool\node.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossim2dLinearRegression.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossim2dTo2dTransform.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossim3x3ConvolutionFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimActiveEdgeTable.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimAdjMapModel.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimAdjustableParameterInfo.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimAdjustableParameterInterface.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimAdjustmentInfo.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimAdrData.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAdrgHeader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAdrgTileSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimAffineProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimAffineTransform.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimAigBounds.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimAigDataFileHeader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimAigHeader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimAigIndexFileHeader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimAigStatistics.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimAlbersProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAnnotationEllipseObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAnnotationFontObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAnnotationGdBitmapFont.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAnnotationLineObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAnnotationMapGridSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAnnotationMultiEllipseObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAnnotationMultiLineObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAnnotationMultiPolyLineObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAnnotationMultiPolyObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAnnotationObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAnnotationObjectFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAnnotationPolyObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAnnotationSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAOD.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAppFixedTileCache.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimApplanixEcefModel.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimApplanixEOFile.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimApplanixUtmModel.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimApplicationUsage.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAppTileCache.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimArcInfoGridWriter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimArgumentParser.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAtbController.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAtbMatchPoint.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAtbPointSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAtCorrGridRemapper.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAtCorrKeywords.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimAtCorrRemapper.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimAxes.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimAzimEquDistProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimBandAverageFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimBandClipFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimBandMergeSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimBandSelector.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimBaseObjectFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimBilinearProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimBilSplitter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimBlendMosaic.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimBngProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimBonneProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimBooleanProperty.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimBrightnessContrastSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimBrightnessMatch.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimBumpShadeTileSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimCacheTileSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimCadrgProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimCassiniProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimCastTileSourceFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimCcfHead.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimCcfTileSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimCibCadrgTileSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimClosestToCenterCombiner.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimCmyVector.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimCoarseGridModel.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimColorNormalizedFusion.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimColorProperty.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimColumnVector3d.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimColumnVector4d.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimCommon.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimConnectableContainer.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimConnectableContainerInterface.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimConnectableDisplayListener.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimConnectableObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimConnectableObjectListener.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimConnectionEvent.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimConstants.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimContainerEvent.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimContainerProperty.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimConvolutionFilter1D.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimConvolutionSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimCplUtil.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimCustomEditorWindow.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimCustomEditorWindowFactoryBase.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimCustomEditorWindowRegistry.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimCylEquAreaProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimDataObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimDate.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimDateProperty.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimDatum.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimDatumFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimDblGrid.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimDemGrid.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimDemHeader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimDemPoint.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimDemProfile.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimDemStats.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimDemUtil.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimDirectory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimDirectoryData.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimDirectoryTree.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimDiscrete3x3HatFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimDiscreteConvolutionKernel.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimDiscreteNearestNeighbor.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimDisplayEventListener.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimDisplayInterface.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimDisplayListEvent.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimDisplayRefreshEvent.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimDms.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimDoqq.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimDoqqTileSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimDoubleGridProperty.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimDpt.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimDpt3d.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimDrect.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimDtedAcc.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimDtedDsi.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimDtedElevationImageSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\elevation\ossimDtedFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\elevation\ossimDtedHandler.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimDtedHdr.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimDtedRecord.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimDtedTileSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimDtedUhl.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimDtedVol.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\plugin\ossimDynamicLibrary.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimEastingNorthingCutter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimEbcdicToAscii.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimEcefPoint.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimEcefRay.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimEcefVector.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimEckert4Projection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimEckert6Projection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimEdgeFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimElevationManagerEvent.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimElevationManagerEventListener.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\elevation\ossimElevationShapeIdx.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\elevation\ossimElevCellHandler.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\elevation\ossimElevCellHandlerFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimElevImageSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\elevation\ossimElevLess.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\elevation\ossimElevManager.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\elevation\ossimElevSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\elevation\ossimElevSourceFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimEllipsoid.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimEllipsoidFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimEndian.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimEnviHeader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimEnviHeaderFileWriter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimEnvironmentUtility.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimEquationCombiner.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimEquDistCylProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimEquTokenDefines.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimEquTokenizer.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimErrorCodes.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimErrorContext.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimErrorStatusInterface.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimERS.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimERSTileSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimEsriShapeFileCutter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimEsriShapeFileFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimEvent.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimEventIds.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimFactoryBaseTemplate.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimFcsiModel.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimFeatherMosaic.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimFfL5.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimFfL7.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimFfRevb.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimFfRevc.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimFftFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimFgdcFileWriter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimFilename.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimFilenameProperty.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimFilterResampler.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimFilterTable.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimFixedTileCache.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\font\ossimFont.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\font\ossimFontFactoryBase.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\font\ossimFontFactoryRegistry.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimFontInformation.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimFontProperty.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimFpt.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimFpt3d.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\font\ossimFreeTypeFont.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\font\ossimFreeTypeFontFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimFusionCombiner.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGammaRemapper.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\font\ossimGdBitmapFont.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGdFont.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGdFontExterns.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\elevation\ossimGeneralRasterElevFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\elevation\ossimGeneralRasterElevHandler.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGeneralRasterInfo.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGeneralRasterTileSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGeneralRasterWriter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGeoAnnotationBitmap.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGeoAnnotationEllipseObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGeoAnnotationFontObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGeoAnnotationGdBitmapFont.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGeoAnnotationLineObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGeoAnnotationMultiEllipseObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGeoAnnotationMultiPolyLineObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGeoAnnotationMultiPolyObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGeoAnnotationObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGeoAnnotationPolyLineObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGeoAnnotationPolyObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGeoAnnotationSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimGeocent.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGeographicAnnotationGrid.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimGeoid.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimGeoidEgm96.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimGeoidManager.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimGeoidNgs.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimGeoidNgsHeader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGeomFileWriter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGeoPolyCutter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimGeoPolygon.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimGeoref.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimGeoTiff.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimGeoTiffCoordTransformsLut.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimGeoTiffDatumLut.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimGnomonicProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimGpt.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimGrect.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGridRemapEngine.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGridRemapEngineFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimGridRemapSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimGzStream.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimHexString.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimHistogram.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimHistogramEqualization.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimHistogramMatchFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimHistogramRemapper.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimHistogramSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimHistogramThreshholdFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimHistogramWriter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimHistoMatchRemapper.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimHsiRemapper.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimHsiToRgbSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimHsiVector.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimHsvGridRemapEngine.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimHsvToRgbSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimHsvVector.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimId.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimIdManager.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\parallel\ossimIgen.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimIgenGenerator.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimIkonosMetaData.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimIkonosRpcModel.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimImageAoiListener.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageChain.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageCombiner.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageData.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageDataFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageDataHelper.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageDisplayWriter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageFileWriter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageGaussianFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimImageGeometryEvent.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimImageGeometryEventListener.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageHandler.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageHandlerFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageHandlerFactoryBase.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageHandlerRegistry.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageHistogramSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageMetaData.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageMetaDataWriterFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageMetaDataWriterFactoryBase.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageMetaDataWriterRegistry.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageMosaic.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\parallel\ossimImageMpiMWriterSequenceConnection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\parallel\ossimImageMpiSWriterSequenceConnection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimImagePolygonEvent.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageReconstructionFilterFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageReconstructionFilterRegistry.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimImageRectangleEvent.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageRenderer.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageShapeFileIndex.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageSharpenFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageSourceFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageSourceFactoryBase.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageSourceFactoryRegistry.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageSourceFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageSourceHistogramFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageSourceInterface.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageSourceSequencer.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageStatisticsSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageToPlaneNormalFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimImageTypeLut.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimImageViewAffineTransform.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimImageViewProjectionTransform.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimImageViewTransform.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimImageViewTransformFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageWriter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageWriterFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageWriterFactoryBase.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimImageWriterFactoryRegistry.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimIndexToRgbLutFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\init\ossimInit.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimIntensityAdjustmentFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimInterleaveTypeLut.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimIoStream.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimIpt.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimIrect.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimIso8211.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimJpegTileSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimJpegWriter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimJpegYCbCrToRgbSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimJpegYCbCrVector.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimKeyword.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimKeywordlist.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimKeywordNames.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimLambertConformalConicProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimLandSatModel.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimLandsatTileSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimLandsatTopoCorrectionFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimLeastSquaresBilin.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimLensDistortion.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimLine.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimListener.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimListenerManager.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimLlxyProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimLocalCorrelationFusion.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimLookUpTable.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimLsrPoint.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimLsrRay.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimLsrSpace.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimLsrVector.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimMapCompositionSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimMapProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimMapProjectionFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimMapProjectionInfo.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimMapViewController.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimMaskFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimMatrix3x3.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimMatrix4x4.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimMatrixProperty.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimMaxMosaic.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimMeanMedianFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimMeanRadialLensDistortion.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimMercatorProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimMetadataFileWriter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimMgrs.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimMillerProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimMiscProjectionFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimMollweidProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimMonoGridRemapEngine.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimMouseEvent.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimMouseListener.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\parallel\ossimMpi.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimMultiBandHistogram.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimMultiBandHistogramTileSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimMultiResLevelHistogram.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimMutex.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimNadconGridDatum.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimNadconGridFile.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimNadconGridHeader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimNadconNarDatum.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimNadconNasDatum.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimNBandLutDataObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimNBandToIndexFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimNewZealandMapGridProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfBlockaTag.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfCommon.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfCompressionHeader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfDataExtensionSegment.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfDataExtensionSegmentV2_0.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfEmbeddedRpfDes.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfEmbeddedRpfHeader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfFile.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfFileHeader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfFileHeaderV2_0.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfFileHeaderV2_1.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfFileHeaderV2_X.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfGeoPositioningTag.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfIchipbTag.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfImageBand.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfImageBandV2_0.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfImageBandV2_1.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfImageHeader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfImageHeaderV2_0.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfImageHeaderV2_1.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfImageHeaderV2_X.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfImageLut.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfImageLutV2_0.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfImageLutV2_1.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfLabelHeader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfLabelHeaderV2_0.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfLocalCartographicTag.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfLocalGeographicTag.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimNitfMapModel.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfNameConversionTables.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfPiaimcTag.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimNitfProjectionFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfProjectionParameterTag.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfRegisteredTag.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfRegisteredTagFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfRpcATag.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfRpcBase.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfRpcBTag.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimNitfRpcModel.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfRpfTagFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfSensraTag.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfStdidcTag.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfSymbolHeader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfSymbolHeaderV2_0.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfTagFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfTagFactoryRegistry.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfTagInformation.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfTextHeader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfTextHeaderV2_0.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimNitfTileSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfUnknownTag.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfUse00aTag.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimNitfVqCompressionHeader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimNitfWriter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimNormalizedRemapTable.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimNormalizedU11RemapTable.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimNormalizedU16RemapTable.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimNormalizedU8RemapTable.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimNormRgbVector.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimNotify.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimNotifyContext.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimNumericProperty.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimObjectDestructingEvent.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimObjectEvents.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimObjectFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimObjectFactoryRegistry.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimObliqueMercatorProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimOptimizableProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimOrthoGraphicProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\parallel\ossimOrthoIgen.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimOrthoImageMosaic.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimOutputSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimPackedBits.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimPcsCodeProjectionFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimPixelFlipper.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\plugin\ossimPluginLibrary.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimPointHash.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimPolarst.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimPolarStereoProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimPolyArea2d.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimPolyconicProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimPolyCutter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimPolygon.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimPolyLine.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimPolynom.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimPolynomProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimPool.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimPoolObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimPreferences.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimProcessInterface.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimProcessListener.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimProcessProgressEvent.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimProjectionFactoryBase.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimProjectionFactoryRegistry.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimProjectionViewControllerFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimProperty.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimPropertyEvent.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimPropertyInterface.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimPropertyInterfaceFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimPropertyInterfaceRegistry.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimProtocolStream.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimQuadProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimQuadrilateralMap.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimQuadTreeWarp.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimQuickbirdNitfTileSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimQuickbirdRpcHeader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimQuickbirdRpcModel.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimQuickbirdTiffTileSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimQuickbirdTile.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimRadialDecentLensDistortion.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimRationalNumber.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimReadmeFileWriter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimRectangleCutFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimRectanglePartitioner.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimRectilinearDataObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimReferenced.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimRefPtr.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimRefreshEvent.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimRegExp.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimResampler.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimRgbGridRemapEngine.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimRgbImage.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimRgbLutDataObject.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimRgbToGreyFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimRgbToHsiSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimRgbToHsvSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimRgbToIndexFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimRgbToJpegYCbCrSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimRgbVector.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimRLevelFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimROIEvent.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimROIEventListener.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimRpcModel.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimRpcProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimRpcSolver.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfAttributeOffsetRecord.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfAttributes.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfAttributeSectionSubheader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfBoundaryRectRecord.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfBoundaryRectSectionSubheader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfBoundaryRectTable.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfColorConverterOffsetRecord.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfColorConverterSubsection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfColorConverterTable.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfColorGrayscaleOffsetRecord.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfColorGrayscaleSubheader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfColorGrayscaleTable.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfCompressionLookupOffsetRecord.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfCompressionSection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfCompressionSectionSubheader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfConstants.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfCoverageSection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfFrame.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfFrameEntry.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfFrameFileIndexRecord.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfFrameFileIndexSectionSubheader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfFrameFileIndexSubsection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfFrameFileReader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfHeader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfImageDescriptionSubheader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfImageDisplayParameterSubheader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfLocationSection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfMaskSubheader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfMaskSubsection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfPathnameRecord.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfToc.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimRpfTocEntry.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimRtti.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimS16ImageData.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimScalarRemapper.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimScalarTypeLut.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimScaleFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimScopedLock.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimSensorModel.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimSensorModelFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimSevenParamDatum.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimSFIMFusion.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vec\ossimShapeDatabase.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vec\ossimShapeFile.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\plugin\ossimSharedObjectBridge.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\plugin\ossimSharedPluginRegistry.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimSinusoid.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimSinusoidalProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimSpaceImagingGeom.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimSpaceObliqueMercatorProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimSpot5Model.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimSpotDimapSupportData.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimSrsProjectionFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\elevation\ossimSrtmFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimSrtmFilename.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\elevation\ossimSrtmHandler.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimSrtmSupportData.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimSrtmTileSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimStateChangedEvent.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimStatePlaneProjectionFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimStatePlaneProjectionInfo.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimStdOutProgress.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimStereographicProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimStreamBase.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimStreamFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimStreamFactoryBase.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimStreamFactoryRegistry.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimString.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimStringListProperty.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimStringProperty.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimSubImageTileSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimTableRemapper.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimTDpt.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimTempFilename.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimTextProperty.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimThreeParamDatum.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimTieGpt.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimTieGptSet.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimTiffOverviewBuilder.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimTiffProjectionFactory.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimTiffTileSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\support_data\ossimTiffWorld.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimTiffWriter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimTileCache.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimTiledImageHash.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimTileHash.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimTilePatch.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimTiling.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimTopographicCorrectionFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimTrace.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimTraceManager.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimTranmerc.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimTransCylEquAreaProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimTransMercatorProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimTrimFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimU11ImageData.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimU16ImageData.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimU8ImageData.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimUnitConversionTool.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimUnitTypeLut.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimUps.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimUpsProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimUpspt.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimUsgsDemTileSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimUsgsQuad.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimUtm.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimUtmProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimUtmpt.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimValueAssignImageSourceFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimVanDerGrintenProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimVectorRenderer.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimVertexExtractor.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimViewController.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimViewEvent.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimViewInterface.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimViewListener.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimVpfAnnotationCoverageInfo.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimVpfAnnotationFeatureInfo.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimVpfAnnotationLibraryInfo.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimVpfAnnotationSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vec\ossimVpfBoundingRecordTable.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vec\ossimVpfCoverage.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vec\ossimVpfDatabase.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vec\ossimVpfDatabaseHeader.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vec\ossimVpfDatabaseHeaderTableValidator.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vec\ossimVpfExtent.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vec\ossimVpfFeatureClass.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vec\ossimVpfFeatureClassSchema.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vec\ossimVpfLibrary.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vec\ossimVpfLibraryAttributeTableValidator.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vec\ossimVpfTable.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vec\ossimVpfTableValidator.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimVpfTileSource.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimVrect.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\projection\ossimWarpProjection.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimWatermarkFilter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimWgs72Datum.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimWgs84Datum.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\imaging\ossimWorldFileWriter.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimXmlAttribute.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimXmlDocument.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimXmlNode.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\base\ossimXmlString.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\polygrf.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\matrix\precisio.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\projectn.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\protomas.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\kbool\record.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\kbool\scanbeam.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\set.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vec\shapefil.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\matrix\solution.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\system.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\values.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\kbool\valuesvc.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vec\vpf.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\vpfdisp.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\vpfdraw.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\vpfinit.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\vpfio.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\vpfmisc.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\vpfprim.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\vpfrelat.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\vpfselec.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\vpftable.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\vpftidx.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\vpfview.h">
-			</File>
-			<File
-				RelativePath="..\..\..\include\ossim\vpfutil\xmemory.h">
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-			<File
-				RelativePath=".\app.ico">
-			</File>
-			<File
-				RelativePath=".\app.rc">
-			</File>
-		</Filter>
-		<File
-			RelativePath=".\ReadMe.txt">
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/src/ossim/.cvsignore b/src/ossim/.cvsignore
deleted file mode 100644
index 7761c4d..0000000
--- a/src/ossim/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-ossimConfig.h
diff --git a/src/ossim/CMakeLists.txt b/src/ossim/CMakeLists.txt
deleted file mode 100644
index abc0a96..0000000
--- a/src/ossim/CMakeLists.txt
+++ /dev/null
@@ -1,143 +0,0 @@
-SET(LIB_NAME ossim)
-
-########################################### BEGIN: GRAB SOURCE FILES ##########################################
-FILE(GLOB ossim_dll_main_SRCS RELATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/dll_main/*.cpp")
-FILE(GLOB ossim_SRCS  RELATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} 
-        "${CMAKE_CURRENT_SOURCE_DIR}/ossimConfig*.cpp" 
-        "${CMAKE_CURRENT_SOURCE_DIR}/ossimVer*.cpp" 
-        "${CMAKE_CURRENT_SOURCE_DIR}/init/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/init/*.c" 
-        "${CMAKE_CURRENT_SOURCE_DIR}/base/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/base/*.c" 
-        "${CMAKE_CURRENT_SOURCE_DIR}/elevation/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/elevation/*.c" 
-        "${CMAKE_CURRENT_SOURCE_DIR}/font/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/font/*.c" 
-        "${CMAKE_CURRENT_SOURCE_DIR}/imaging/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/imaging/*.c" 
-        "${CMAKE_CURRENT_SOURCE_DIR}/matrix/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/matrix/*.c" 
-        "${CMAKE_CURRENT_SOURCE_DIR}/parallel/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/parallel/*.c"
-        "${CMAKE_CURRENT_SOURCE_DIR}/projection/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/projection/*.c" 
-        "${CMAKE_CURRENT_SOURCE_DIR}/support_data/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/support_data/*.c" 
-        "${CMAKE_CURRENT_SOURCE_DIR}/util/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/util/*.c" 
-        "${CMAKE_CURRENT_SOURCE_DIR}/vec/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/vec/*.c" 
-        "${CMAKE_CURRENT_SOURCE_DIR}/video/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/video/*.c" 
-        "${CMAKE_CURRENT_SOURCE_DIR}/vpfutil/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/vpfutil/*.c" 
-        "${CMAKE_CURRENT_SOURCE_DIR}/plugin/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/plugin/*.c"
-        "${CMAKE_CURRENT_SOURCE_DIR}/kbool/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/kbool/*.c")
-
-IF(WIN32)
-	LIST(APPEND ossim_SRCS "${ossim_dll_main_SRCS}")
-ENDIF(WIN32)
-
-ADD_DEFINITIONS("-DOSSIMMAKINGDLL")
-############################### GRAB HEADERS #####################################
-FILE(GLOB ossim_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/*.h")
-FILE(GLOB ossim_base_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/base/*.h")
-FILE(GLOB ossim_elevation_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/elevation/*.h")
-FILE(GLOB ossim_font_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/font/*.h")
-FILE(GLOB ossim_imaging_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/imaging/*.h")
-FILE(GLOB ossim_init_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/init/*.h")
-FILE(GLOB ossim_kbool_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/kbool/*.h")
-FILE(GLOB ossim_matrix_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/matrix/*.h")
-FILE(GLOB ossim_parallel_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/parallel/*.h")
-FILE(GLOB ossim_plugin_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/plugin/*.h")
-FILE(GLOB ossim_projection_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/projection/*.h")
-FILE(GLOB ossim_support_data_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/support_data/*.h")
-FILE(GLOB ossim_util_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/util/*.h")
-FILE(GLOB ossim_vec_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/vec/*.h")
-FILE(GLOB ossim_video_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/video/*.h")
-FILE(GLOB ossim_vpfutil_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../include/ossim/vpfutil/*.h")
-
-MESSAGE( "${ossim_HDRS}" )
-SET(OSSIM_HEADER_FILES 
-	${ossim_HDRS}
- 	${ossim_base_HDRS} ${ossim_elevation_HDRS} ${ossim_font_HDRS}  ${ossim_imaging_HDRS} ${ossim_init_HDRS} ${ossim_kbool_HDRS} 
-	${ossim_matrix_HDRS} ${ossim_parallel_HDRS} ${ossim_plugin_HDRS} ${ossim_projection_HDRS} ${ossim_support_data_HDRS} ${ossim_util_HDRS} ${ossim_vec_HDRS} ${ossim_video_HDRS} ${ossim_vpfutil_HDRS} )
-
-
-################################## APPLE Framework support deep header mapping ###################################
-IF(APPLE)
-  FOREACH(f  ${ossim_HDRS} )
-      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers )
-  ENDFOREACH(f)
-  FOREACH(f  ${ossim_base_HDRS} )
-      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/base )
-  ENDFOREACH(f)
-  FOREACH(f  ${ossim_elevation_HDRS} )
-      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/elevation )
-  ENDFOREACH(f)
-  FOREACH(f  ${ossim_font_HDRS} )
-      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/font )
-  ENDFOREACH(f)
-  FOREACH(f  ${ossim_imaging_HDRS} )
-      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/imaging )
-  ENDFOREACH(f)
-  FOREACH(f  ${ossim_init_HDRS} )
-      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/init )
-  ENDFOREACH(f)
-  FOREACH(f  ${ossim_kbool_HDRS} )
-      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/kbool )
-  ENDFOREACH(f)
-  FOREACH(f  ${ossim_matrix_HDRS} )
-      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/matrix )
-  ENDFOREACH(f)
-  FOREACH(f  ${ossim_parallel_HDRS} )
-      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/parallel )
-  ENDFOREACH(f)
-  FOREACH(f  ${ossim_plugin_HDRS} )
-      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/plugin )
-  ENDFOREACH(f)
-  FOREACH(f  ${ossim_projection_HDRS} )
-      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/projection )
-  ENDFOREACH(f)
-  FOREACH(f  ${ossim_support_data_HDRS} )
-      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/support_data )
-  ENDFOREACH(f)
-  FOREACH(f  ${ossim_util_HDRS} )
-      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/util )
-  ENDFOREACH(f)
-  FOREACH(f  ${ossim_vec_HDRS} )
-      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/vec )
-  ENDFOREACH(f)
-  FOREACH(f  ${ossim_video_HDRS} )
-      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/video )
-  ENDFOREACH(f)
-
-  FOREACH(f  ${ossim_vpfutil_HDRS} )
-      SET_SOURCE_FILES_PROPERTIES( ${f} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/vpfutil )
-  ENDFOREACH(f)
-
-ENDIF(APPLE)
-
-#################################### SETUP the required link parameters using the Ossim macro ####################################
-OSSIM_LINK_LIBRARY(${LIB_NAME} 
-                   COMPONENT_NAME ossim 
-                   TYPE ${OSSIM_USER_DEFINED_DYNAMIC_OR_STATIC}
-                   LIBRARIES ${ossimDependentLibs}
-                   HEADERS "${OSSIM_HEADER_FILES}" 
-                   PUBLIC_HEADERS "${ossim_HDRS}"
-                   SOURCE_FILES "${ossim_SRCS}"
-                   INSTALL_LIB VERSION_SYMLINKS INSTALL_HEADERS)
-
-########################################################## If DO special case for ossim core needs to have the files mapped properly ################################ 
-IF(NOT OSSIM_BUILD_FRAMEWORKS OR NOT APPLE)
-   install(FILES ${ossim_HDRS} DESTINATION include/ossim COMPONENT ossim) 
-   install(FILES ${ossim_base_HDRS} DESTINATION include/ossim/base COMPONENT ossim) 
-   install(FILES ${ossim_elevation_HDRS} DESTINATION include/ossim/elevation COMPONENT ossim)
-   install(FILES ${ossim_font_HDRS} DESTINATION include/ossim/font COMPONENT ossim)
-   install(FILES ${ossim_imaging_HDRS} DESTINATION include/ossim/imaging COMPONENT ossim) 
-   install(FILES ${ossim_init_HDRS} DESTINATION include/ossim/init COMPONENT ossim) 
-   install(FILES ${ossim_kbool_HDRS} DESTINATION include/ossim/kbool COMPONENT ossim) 
-   install(FILES ${ossim_matrix_HDRS} DESTINATION include/ossim/matrix COMPONENT ossim) 
-   install(FILES ${ossim_parallel_HDRS} DESTINATION include/ossim/parallel COMPONENT ossim) 
-   install(FILES ${ossim_plugin_HDRS} DESTINATION include/ossim/plugin COMPONENT ossim) 
-   install(FILES ${ossim_projection_HDRS} DESTINATION include/ossim/projection COMPONENT ossim) 
-   install(FILES ${ossim_support_data_HDRS} DESTINATION include/ossim/support_data COMPONENT ossim) 
-   install(FILES ${ossim_util_HDRS} DESTINATION include/ossim/util COMPONENT ossim) 
-   install(FILES ${ossim_vec_HDRS} DESTINATION include/ossim/vec COMPONENT ossim) 
-   install(FILES ${ossim_video_HDRS} DESTINATION include/ossim/video COMPONENT ossim) 
-   install(FILES ${ossim_vpfutil_HDRS} DESTINATION include/ossim/vpfutil COMPONENT ossim) 
-ENDIF(NOT OSSIM_BUILD_FRAMEWORKS OR NOT APPLE)
-# ENDIF(NOT OSSIM_FRAMEWORK_GENERATION OR NOT APPLE)
-
-# ---
-# This is the old list of library for the link line.  Replaced with ${ossimDependentLibs}.  
-# Kept temporarily in case I broke something.  drb - 31 Aug. 2011
-# LIBRARIES ${JPEG_LIBRARIES} ${TIFF_LIBRARIES} ${GEOTIFF_LIBRARIES} ${OPENTHREADS_LIBRARIES} ${FREETYPE_LIBRARIES} ${MPI_LIBRARIES} ${ZLIB_LIBRARIES} ${DL_LIBRARY}
-# ---
diff --git a/src/ossim/base/.cvsignore b/src/ossim/base/.cvsignore
deleted file mode 100644
index 7d50165..0000000
--- a/src/ossim/base/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-*.~*
-*.o
-Makefile
-core.*
-*.d
-.libs
-*.lo
diff --git a/src/ossim/base/ossim2dTo2dTransform.cpp b/src/ossim/base/ossim2dTo2dTransform.cpp
deleted file mode 100644
index 68c9f02..0000000
--- a/src/ossim/base/ossim2dTo2dTransform.cpp
+++ /dev/null
@@ -1,280 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossim2dTo2dTransform.cpp 15766 2009-10-20 12:37:09Z gpotts $
-
-#include <cstdlib>
-#include <sstream>
-#include <ossim/base/ossim2dTo2dTransform.h>
-
-
-RTTI_DEF1(ossim2dTo2dTransform, "ossim2dTo2dTransform", ossimObject);
-
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimNotifyContext.h>
-
-// ### CREATE_COPY ###
-// Implementation of static factory method createCopy() requires includes here of ALL 2D-to-2D
-// transform types that need a deep copy capability:
-#include <ossim/base/ossimAffineTransform.h>
-#include <ossim/projection/ossimImageViewAffineTransform.h>
-#include <ossim/projection/ossimImageViewProjectionTransform.h>
-#include <ossim/projection/ossimMeanRadialLensDistortion.h>
-#include <ossim/base/ossimQuadTreeWarp.h>
-#include <ossim/projection/ossimRadialDecentLensDistortion.h>
-
-//***
-// Define Trace flags for use within this file:
-//***
-#include <ossim/base/ossimTrace.h>
-static ossimTrace traceExec  ("ossim2dTo2dTransform:exec");
-static ossimTrace traceDebug ("ossim2dTo2dTransform:debug");
-
-static const double DEFAULT_THRESHOLD      = 1000.0*DBL_EPSILON;
-static const int    DEFAULT_MAX_ITERATIONS = 10;
-
-//*****************************************************************************
-//  CONSTRUCTOR: 
-//*****************************************************************************
-ossim2dTo2dTransform::ossim2dTo2dTransform()
-   :
-      theConvergenceThreshold (DEFAULT_THRESHOLD),
-      theMaxIterations        (DEFAULT_MAX_ITERATIONS),
-      theDxDy(1.0, 1.0)
-{
-}
- 
-//*****************************************************************************
-//  METHOD: 
-//*****************************************************************************
-void ossim2dTo2dTransform::inverse(const ossimDpt& input,
-                                   ossimDpt&       output) const
-{
-   static const char MODULE[] = "ossim2dTo2dTransform::inverse";
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG: " << MODULE << ", entering...\n";
-   
-   //***
-   // Begin with guess. Forward transform is defined as trasforming left to
-   // right. We are therefore solving for left:
-   //***
-   ossimDpt left = getOrigin();
-   ossimDpt left_dx;
-   ossimDpt left_dy;
-   ossimDpt right;
-   ossimDpt right_dx;
-   ossimDpt right_dy;
-   ossimDpt dr_dx;
-   ossimDpt dr_dy;
-   ossimDpt r_diff;
-   ossimDpt l_diff;
-   double inverse_norm;
-   int iters=0;
-   //***
-   // Begin iterations:
-   //***
-   do
-   {
-      //***
-      // establish perturbed image points about the guessed point:
-      //***
-      left_dx.x = left.x + theDxDy.x;
-      left_dx.y = left.y;
-      left_dy.x = left.x;
-      left_dy.y = left.y + theDxDy.y;
-      
-      //***
-      // Compute numerical partials at current guessed point:
-      //***
-      forward(left,    right);
-      forward(left_dx, right_dx);
-      forward(left_dy, right_dy);
-
-      dr_dx.x = (right_dx.x - right.x)/theDxDy.x; //e
-      dr_dx.y = (right_dx.y - right.y)/theDxDy.y; //g
-      dr_dy.x = (right_dy.x - right.x)/theDxDy.x; //f
-      dr_dy.y = (right_dy.y - right.y)/theDxDy.y; //h
-
-      //***
-      // Test for convergence:
-      //***
-      r_diff = input - right;
-      
-      //***
-      // Compute linearized estimate of image point given gp delta:
-      //***
-      inverse_norm = dr_dy.x*dr_dx.y - dr_dx.x*dr_dy.y; // fg-eh
-
-      if (inverse_norm != 0)
-      {
-         l_diff.x = (-dr_dy.y*r_diff.x + dr_dy.x*r_diff.y)/inverse_norm;
-         l_diff.y = ( dr_dx.y*r_diff.x - dr_dx.x*r_diff.y)/inverse_norm;
-
-         left += l_diff;
-      }
-      else
-      {
-         l_diff.x = 0;
-         l_diff.y = 0;
-      }
-
-      iters++;
-      
-   } while (((fabs(l_diff.x) > theConvergenceThreshold) ||
-             (fabs(l_diff.y) > theConvergenceThreshold)) &&
-            (iters < theMaxIterations));
-
-   //***
-   // Note that this error mesage appears only if max count was reached while
-   // iterating. A linear (no iteration) solution would finish with iters =
-   // MAX_NUM_ITERATIONS + 1:
-   //***
-    if (iters == theMaxIterations)
-    {
-       ossimNotify(ossimNotifyLevel_WARN) << "WARNING: " << MODULE << ", exceeded max number of iterations computing inverse "
-                                          << "transform for point: " << input << "\n";
-    }
-
-   output = left;
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG: " << MODULE << ", returning...\n";
-   return;
-   
-}
-
-//*****************************************************************************
-//  METHOD: 
-//*****************************************************************************
-bool ossim2dTo2dTransform::saveState(ossimKeywordlist& kwl,
-                                     const char* prefix) const
-{
-   kwl.add(prefix,
-           ossimKeywordNames::CONVERGENCE_THRESHOLD_KW,
-           theConvergenceThreshold,
-           true);
-   kwl.add(prefix,
-           ossimKeywordNames::MAX_ITERATIONS_KW,
-           theMaxIterations,
-           true);
-   kwl.add(prefix,
-           "dxdy",
-           ossimString::toString(theDxDy.x) + " " +
-           ossimString::toString(theDxDy.y),
-           true);
-           
-   return ossimObject::saveState(kwl, prefix);
-}
-
-//*****************************************************************************
-//  METHOD: 
-//*****************************************************************************
-bool ossim2dTo2dTransform::loadState(const ossimKeywordlist& kwl,
-               const char* prefix)
-{
-  bool result = true;
-
-   const char* buf;
-
-   buf= kwl.find(prefix, ossimKeywordNames::CONVERGENCE_THRESHOLD_KW);
-
-   if (buf)
-   {
-      theConvergenceThreshold = atof(buf);
-   }
-   else
-   {
-      theConvergenceThreshold = .00000000000002;
-   }
-   
-   buf= kwl.find(prefix, ossimKeywordNames::MAX_ITERATIONS_KW);
-   if(buf)
-   {
-      theMaxIterations = atoi(buf);
-   }
-   else
-   {
-      theMaxIterations = 10;
-   }
-   const char* dxdy = kwl.find(prefix, "dxdy");
-   if(dxdy)
-   {
-      ossimString tempString(dxdy);
-      std::vector<ossimString> splitArray;
-      tempString = tempString.trim();
-      tempString.split(splitArray, " ");
-      if(splitArray.size()==2)
-      {
-         theDxDy.x = splitArray[0].toDouble();
-         theDxDy.y = splitArray[1].toDouble();
-      }
-   }
-   if(result)
-   {
-      ossimObject::loadState(kwl, prefix);
-   }
-   
-   return result;
-}
-   
-void ossim2dTo2dTransform::forward(ossimDpt&  modify_this) const 
-{
-   ossimDpt output;
-   forward(modify_this, output);
-   modify_this = output;
-}
-
-void ossim2dTo2dTransform::inverse(ossimDpt&  modify_this) const 
-{
-   ossimDpt output;
-   inverse(modify_this, output);
-   modify_this = output;
-}
-
-ossimDpt ossim2dTo2dTransform::getOrigin()const
-{
-   return ossimDpt(0,0);
-}
-
-void ossim2dTo2dTransform::setConvergenceThreshold(const double& new_threshold)
-{
-   theConvergenceThreshold = new_threshold;
-}
-
-void ossim2dTo2dTransform::setMaxIterations(int new_max_iters)
-{
-   theMaxIterations = new_max_iters;
-}
-
-void ossim2dTo2dTransform::setDxDy(const ossimDpt& dxdy)
-{
-   theDxDy.x = dxdy.x;
-   theDxDy.y = dxdy.y;
-}
-
-const ossim2dTo2dTransform& ossim2dTo2dTransform::operator=(const ossim2dTo2dTransform&  rhs )
-{
-   if (this != &rhs)
-   {
-      ossimObject::operator = (rhs);
-      
-      theConvergenceThreshold = rhs.theConvergenceThreshold;
-      theMaxIterations        = rhs.theMaxIterations;
-      theDxDy                 = rhs.theDxDy;
-   }
-   return *this;
-}
-
-std::ostream& ossim2dTo2dTransform::print(std::ostream& out) const
-{
-   out << "convergenceThreshold: " << theConvergenceThreshold << "\n"
-   << "maxIterations:        " << theMaxIterations << "\n"
-   << "dxdy:                 " << theDxDy << "\n";
-   return out;
-}
-
diff --git a/src/ossim/base/ossim2dTo2dTransformFactory.cpp b/src/ossim/base/ossim2dTo2dTransformFactory.cpp
deleted file mode 100644
index 1b78919..0000000
--- a/src/ossim/base/ossim2dTo2dTransformFactory.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-//**************************************************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description: Implementation of ossim2dTo2dTransformFactory.
-//
-//**************************************************************************************************
-// $Id$
-#include <ossim/base/ossim2dTo2dTransformFactory.h>
-#include <ossim/base/ossim2dBilinearTransform.h>
-#include <ossim/base/ossim2dTo2dShiftTransform.h>
-#include <ossim/base/ossim2dTo2dIdentityTransform.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimRefPtr.h>
-
-ossim2dTo2dTransformFactory* ossim2dTo2dTransformFactory::m_instance = 0;
-ossim2dTo2dTransformFactory* ossim2dTo2dTransformFactory::instance()
-{
-   if(!m_instance)
-   {
-      m_instance = new ossim2dTo2dTransformFactory();
-   }
-   return m_instance;
-}
-
-ossim2dTo2dTransform* ossim2dTo2dTransformFactory::createTransform(const ossimString& name)const
-{
-   ossim2dTo2dTransform* result = 0;
-   if(name == STATIC_TYPE_NAME(ossim2dBilinearTransform))
-   {
-      result = new ossim2dBilinearTransform();
-   }
-   else if(name == STATIC_TYPE_NAME(ossim2dTo2dShiftTransform))
-   {
-      result = new ossim2dTo2dShiftTransform();
-   }
-   else if(name == STATIC_TYPE_NAME(ossim2dTo2dIdentityTransform))
-   {
-      result = new ossim2dTo2dIdentityTransform();
-   }
-   
-   return result;
-}
-
-ossim2dTo2dTransform* ossim2dTo2dTransformFactory::createTransform(const ossimKeywordlist& kwl,
-                                                                   const char* prefix)const
-{
-   ossimString type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
-   ossimRefPtr<ossim2dTo2dTransform> result =  createTransform(type);
-   if(result.valid()&&!result->loadState(kwl, prefix))
-   {
-      result = 0;
-   }
-   
-   return result.release();
-}
-
-void ossim2dTo2dTransformFactory::getTypeNameList(std::vector<ossimString>& typeList)const
-{
-   typeList.push_back(STATIC_TYPE_NAME(ossim2dBilinearTransform));
-   typeList.push_back(STATIC_TYPE_NAME(ossim2dTo2dShiftTransform));
-   typeList.push_back(STATIC_TYPE_NAME(ossim2dTo2dIdentityTransform));
-}
diff --git a/src/ossim/base/ossim2dTo2dTransformRegistry.cpp b/src/ossim/base/ossim2dTo2dTransformRegistry.cpp
deleted file mode 100644
index 37f666b..0000000
--- a/src/ossim/base/ossim2dTo2dTransformRegistry.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//**************************************************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description: Implementation of ossim2dTo2dTransformRegistry.
-//
-//**************************************************************************************************
-// $Id$
-#include <ossim/base/ossim2dTo2dTransformRegistry.h>
-#include <ossim/base/ossim2dTo2dTransformFactory.h>
-#include <ossim/base/ossimObjectFactoryRegistry.h>
-ossim2dTo2dTransformRegistry* ossim2dTo2dTransformRegistry::m_instance = 0;
-RTTI_DEF1(ossim2dTo2dTransformRegistry, "ossim2dTo2dTransformRegistry", ossimObjectFactory);
-ossim2dTo2dTransformRegistry* ossim2dTo2dTransformRegistry::instance()
-{
-   if(!m_instance)
-   {
-      m_instance = new ossim2dTo2dTransformRegistry();
-      m_instance->registerFactory(ossim2dTo2dTransformFactory::instance());
-      ossimObjectFactoryRegistry::instance()->registerFactory(m_instance);
-   }
-   
-   return m_instance;
-}
diff --git a/src/ossim/base/ossimAdjustableParameterInterface.cpp b/src/ossim/base/ossimAdjustableParameterInterface.cpp
deleted file mode 100644
index 2482c46..0000000
--- a/src/ossim/base/ossimAdjustableParameterInterface.cpp
+++ /dev/null
@@ -1,750 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimAdjustableParameterInterface.cpp 20610 2012-02-27 12:19:25Z gpotts $
-#include <algorithm>
-#include <ossim/base/ossimAdjustableParameterInterface.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimUnitTypeLut.h>
-
-RTTI_DEF(ossimAdjustableParameterInterface, "ossimAdjustableParameterInterface");
-
-static const char* NUMBER_OF_ADJUSTMENTS_KW = "number_of_adjustments";
-static const char* NUMBER_OF_ADJUSTMENTS_OLD_KW = "number_of_adjustements";
-static const char* CURRENT_ADJUSTMENT_OLD_KW    = "current_adjustement";
-static const char* CURRENT_ADJUSTMENT_KW    = "current_adjustment";
-static const char* ADJUSTMENT_PREFIX        = "adjustment_";
-
-ossimAdjustableParameterInterface::ossimAdjustableParameterInterface()
-{
-   theCurrentAdjustment = 0;
-}
-
-ossimAdjustableParameterInterface::ossimAdjustableParameterInterface(const ossimAdjustableParameterInterface& rhs)
-   :theAdjustmentList(rhs.theAdjustmentList),
-    theCurrentAdjustment(rhs.theCurrentAdjustment)
-{
-}
-
-void ossimAdjustableParameterInterface::newAdjustment(ossim_uint32 numberOfParameters)
-{
-   theAdjustmentList.push_back(ossimAdjustmentInfo());
-   if(numberOfParameters > 0)
-   {
-      theAdjustmentList[theAdjustmentList.size()-1].setNumberOfAdjustableParameters(numberOfParameters);
-      theAdjustmentList[theAdjustmentList.size()-1].setDescription("Initial adjustment");
-   }
-
-   theCurrentAdjustment = (ossim_uint32)theAdjustmentList.size() - 1;
-
-}
-
-void ossimAdjustableParameterInterface::setAdjustmentDescription(const ossimString& description)
-{
-   if(!theAdjustmentList.size())
-   {
-      return;
-   }
-   theAdjustmentList[theCurrentAdjustment].setDescription(description);
-}
-
-ossimString ossimAdjustableParameterInterface::getAdjustmentDescription()const
-{
-   if(theAdjustmentList.size())
-   {
-      return theAdjustmentList[theCurrentAdjustment].getDescription();
-   }
-
-   return "";
-}
-
-void ossimAdjustableParameterInterface::setCurrentAdjustment(ossim_uint32 adjustmentIdx, bool notify)
-{
-   if(adjustmentIdx < theAdjustmentList.size())
-   {
-      theCurrentAdjustment = adjustmentIdx;
-      if(notify)
-      {
-         adjustableParametersChanged();
-      }
-   }
-}
-
-
-void ossimAdjustableParameterInterface::initAdjustableParameters()
-{
-}
-
-void ossimAdjustableParameterInterface::resetAdjustableParameters(bool notify)
-{
-    if(!theAdjustmentList.size())
-    {
-       return;
-    }
-    
-    ossim_uint32 saveCurrent = theCurrentAdjustment;
-    copyAdjustment();
-    initAdjustableParameters();
-    ossim_uint32 numberOfAdjustables = getNumberOfAdjustableParameters();
-    ossim_uint32 idx = 0;
-    
-    for(idx = 0; idx < numberOfAdjustables; ++idx)
-    {
-       theAdjustmentList[saveCurrent].getParameterList()[idx].setParameter(theAdjustmentList[theAdjustmentList.size()-1].getParameterList()[idx].getParameter());
-    }
-
-    setCurrentAdjustment(saveCurrent);
-
-    eraseAdjustment((ossim_uint32)theAdjustmentList.size()-1, false);
-    
-    if(notify)
-    {
-       adjustableParametersChanged();
-    }
-}
-
-void ossimAdjustableParameterInterface::copyAdjustment(ossim_uint32 idx, bool notify)
-{
-    if(!theAdjustmentList.size())
-    {
-       return;
-    }
-    if(idx < theAdjustmentList.size())
-    {
-       theAdjustmentList.push_back(theAdjustmentList[idx]);
-
-       if(idx == theCurrentAdjustment)
-       {
-          theCurrentAdjustment = (ossim_uint32)theAdjustmentList.size() - 1;
-       }
-       if(notify)
-       {
-          adjustableParametersChanged();
-       }
-    }
-    
-}
-
-void ossimAdjustableParameterInterface::copyAdjustment(bool notify)
-{
-   copyAdjustment(theCurrentAdjustment, notify);
-}
-
-void ossimAdjustableParameterInterface::keepAdjustment(ossim_uint32 idx,
-                                                       bool createCopy)
-{
-    if(!theAdjustmentList.size())
-    {
-       return;
-    }
-    if(idx < theAdjustmentList.size())
-    {
-       if(createCopy)
-       {
-          copyAdjustment(idx);
-       }
-       theAdjustmentList[theCurrentAdjustment].keep();
-    }
-}
-
-void ossimAdjustableParameterInterface::keepAdjustment(bool createCopy)
-{
-   keepAdjustment(theCurrentAdjustment, createCopy);
-}
-
-const ossimAdjustableParameterInterface& ossimAdjustableParameterInterface::operator = (const ossimAdjustableParameterInterface& rhs)
-{
-   theAdjustmentList    = rhs.theAdjustmentList;
-   theCurrentAdjustment = rhs.theCurrentAdjustment;
-
-   return *this;
-}
-
-void ossimAdjustableParameterInterface::removeAllAdjustments()
-{
-   theAdjustmentList.clear();
-   theCurrentAdjustment = 0;
-}
-
-ossim_uint32 ossimAdjustableParameterInterface::getNumberOfAdjustableParameters()const
-{
-   if(theAdjustmentList.size())
-   {
-      return theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters();
-   }
-
-   return 0;
-}
-
-void ossimAdjustableParameterInterface::eraseAdjustment(bool notify)
-{
-   eraseAdjustment(theCurrentAdjustment, notify);
-}
-
-void ossimAdjustableParameterInterface::eraseAdjustment(ossim_uint32 idx, bool notify)
-{
-   if(!theAdjustmentList.size())
-   {
-      return;
-   }
-   
-   if(theCurrentAdjustment == idx)
-   {
-      theAdjustmentList.erase(theAdjustmentList.begin() + theCurrentAdjustment);
-      if(theCurrentAdjustment >= theAdjustmentList.size())
-      {
-         if(theAdjustmentList.size() < 1)
-         {
-            theCurrentAdjustment = 0;
-         }
-         else
-         {
-            theCurrentAdjustment = (ossim_uint32)theAdjustmentList.size() - 1;
-         }
-         
-      }
-      
-      if(notify)
-      {
-         adjustableParametersChanged();
-      }
-   }
-   else if(idx < theAdjustmentList.size())
-   {
-      theAdjustmentList.erase(theAdjustmentList.begin() + idx);
-      if(theAdjustmentList.size() < 1)
-      {
-         theCurrentAdjustment = 0;
-      }
-      else
-      {
-         if(theCurrentAdjustment > idx)
-         {
-            --theCurrentAdjustment;
-            if(notify)
-            {
-               adjustableParametersChanged();
-            }
-         }
-      }
-      if(notify)
-      {
-         adjustableParametersChanged();
-      }
-   }
-}
-
-double ossimAdjustableParameterInterface::getAdjustableParameter(ossim_uint32 idx)const
-{
-   if(theAdjustmentList.size())
-   {
-      if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
-      {
-         return theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].getParameter();
-      }
-   }
-   
-   return 0.0;
-}
-
-void ossimAdjustableParameterInterface::setAdjustableParameter(ossim_uint32 idx, double value, double sigma, bool notify)
-{
-   if(!theAdjustmentList.size())
-   {
-      return;
-   }
-   if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
-   {
-      theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].setParameter(value);
-      theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].setSigma(sigma);
-      if(notify)
-      {
-         adjustableParametersChanged();
-      }
-   }
-   
-}
-
-void ossimAdjustableParameterInterface::setAdjustableParameter(ossim_uint32 idx, double value, bool notify)
-{
-   if(!theAdjustmentList.size())
-   {
-      return;
-   }
-   if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
-   {
-      theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].setParameter(value);
-
-      if(notify)
-      {
-         adjustableParametersChanged();
-      }
-   }
-}
-
-double ossimAdjustableParameterInterface::getParameterSigma(ossim_uint32 idx)const
-{
-   if(theAdjustmentList.size())
-   {
-      if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
-      {
-         return theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].getSigma();
-      }
-   }
-
-   return 0.0;
-}
-
-void ossimAdjustableParameterInterface::setParameterSigma(ossim_uint32 idx, double value, bool notify)
-{
-   if(!theAdjustmentList.size())
-   {
-      return;
-   }
-   if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
-   {
-      theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].setSigma(value);
-      if(notify)
-      {
-         adjustableParametersChanged();
-      }
-   }
-}
-
-ossimUnitType ossimAdjustableParameterInterface::getParameterUnit(ossim_uint32 idx)const
-{
-   if(theAdjustmentList.size())
-   {
-      if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
-      {
-         return theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].getUnit();
-      }
-   }
-
-   return OSSIM_UNIT_UNKNOWN;
-}
-
-void ossimAdjustableParameterInterface::setParameterUnit(ossim_uint32 idx, ossimUnitType unit)
-{
-   if(theAdjustmentList.size())
-   {
-      if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
-      {
-         theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].setUnit(unit);
-      }
-   }
-}
-
-void ossimAdjustableParameterInterface::setParameterUnit(ossim_uint32 idx, const ossimString& unit)
-{
-   if(theAdjustmentList.size())
-   {
-      if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
-      {
-         theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].setUnit((ossimUnitType)ossimUnitTypeLut::instance()->getEntryNumber(unit));
-      }
-   }
-}
-
-
-ossimString ossimAdjustableParameterInterface::getParameterDescription(ossim_uint32 idx)const
-{
-   if(theAdjustmentList.size())
-   {
-      if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
-      {
-         return theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].getDescription();
-      }
-   }
-
-   return ossimString("");
-}
-
-void ossimAdjustableParameterInterface::setParameterDescription(ossim_uint32 idx,
-                                                                const ossimString& description)
-{
-   if(!theAdjustmentList.size())
-   {
-      return;
-   }
-   if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
-   {
-      theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].setDescription(description);
-   }
-}
-
-void  ossimAdjustableParameterInterface::setParameterCenter(ossim_uint32 idx, double center, bool notify)
-{
-   if(!theAdjustmentList.size())
-   {
-      return;
-   }
-
-   if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
-   {
-     theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].setCenter(center);
-
-	 if(notify)
-	 {
-	   adjustableParametersChanged();
-	 }
-   }
-}
-
-double ossimAdjustableParameterInterface::getParameterCenter(ossim_uint32 idx)const
-{
-   if(!theAdjustmentList.size())
-   {
-      return 0.0;
-   }
-   if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
-   {
-      return theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].getCenter();
-   }
-
-   return 0.0;
-}
-
-double   ossimAdjustableParameterInterface::computeParameterOffset(ossim_uint32 idx)const
-{
-   if(!theAdjustmentList.size())
-   {
-      return 0.0;
-   }
-   if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
-   {
-      return theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].computeOffset();
-   }
-
-   return 0.0;
-}
-
-ossim_int32 ossimAdjustableParameterInterface::findParameterIdxGivenDescription(ossim_uint32 adjustmentIdx,
-                                                                                const ossimString& name)const
-{
-   ossim_int32 result = -1;
-   if(adjustmentIdx < getNumberOfAdjustments())
-   {
-      ossim_uint32 idx = 0;
-      ossim_uint32 n = theAdjustmentList[adjustmentIdx].getNumberOfAdjustableParameters();
-      bool found = false;
-      for(idx = 0; ((idx < n)&&(!found)); ++idx)
-      {
-         if(theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].getDescription() == name)
-         {
-            result = (ossim_int32) idx;
-         }
-      }
-   }
-   
-   return result;
-}
-
-ossim_int32 ossimAdjustableParameterInterface::findParameterIdxContainingDescription(ossim_uint32 adjustmentIdx,
-                                                                                     const ossimString& name)const
-{
-   ossim_int32 result = -1;
-   if(adjustmentIdx < getNumberOfAdjustments())
-   {
-      ossim_uint32 idx = 0;
-      ossim_uint32 n = theAdjustmentList[adjustmentIdx].getNumberOfAdjustableParameters();
-      bool found = false;
-      for(idx = 0; ((idx < n)&&(!found)); ++idx)
-      {
-         if(theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].getDescription().contains(name))
-         {
-            result = (ossim_int32) idx;
-         }
-      }
-   }
-
-   return result;
-}
-
-
-bool ossimAdjustableParameterInterface::isParameterLocked(ossim_uint32 idx)const
-{
-   if(!theAdjustmentList.size())
-   {
-      return false;
-   }
-   if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
-   {
-      return theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].getLockFlag();
-   }
-
-   return false;
-   
-}
-
-void ossimAdjustableParameterInterface::setParameterLockFlag(ossim_uint32 idxParam, bool flag)
-{
-   if(!theAdjustmentList.size())
-   {
-      return;
-   }
-   if(idxParam < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
-   {
-      theAdjustmentList[theCurrentAdjustment].getParameterList()[idxParam].setLockFlag(flag);
-   }
-}
-
-bool ossimAdjustableParameterInterface::getParameterLockFlag(ossim_uint32 idx)const
-{
-   if(!theAdjustmentList.size())
-   {
-      return false;
-   }
-   if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
-   {
-      return theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].getLockFlag();
-   }
-
-   return false;
-}
-
-void ossimAdjustableParameterInterface::lockAllParametersCurrentAdjustment()
-{
-   lockAllParameters(theCurrentAdjustment);
-}
-
-void ossimAdjustableParameterInterface::unlockAllParametersCurrentAdjustment()
-{
-   unlockAllParameters(theCurrentAdjustment);
-}
-
-void ossimAdjustableParameterInterface::lockAllParameters(ossim_uint32 idxAdjustment)
-{
-   if(idxAdjustment < getNumberOfAdjustments())
-   {
-      ossim_uint32 idx = 0;
-      ossim_uint32 n   = theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters();
-      
-      for(idx = 0; idx < n; ++idx)
-      {
-         theAdjustmentList[idxAdjustment].getParameterList()[idx].setLockFlag(true);
-      }
-   }
-}
-
-void ossimAdjustableParameterInterface::unlockAllParameters(ossim_uint32 idxAdjustment)
-{
-   if(idxAdjustment < getNumberOfAdjustments())
-   {
-      ossim_uint32 idx = 0;
-      ossim_uint32 n   = theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters();
-      
-      for(idx = 0; idx < n; ++idx)
-      {
-         theAdjustmentList[idxAdjustment].getParameterList()[idx].setLockFlag(false);
-      }
-   }
-}
-
-
-void ossimAdjustableParameterInterface::setParameterOffset(ossim_uint32 idx,
-                                                           ossim_float64 value,
-                                                           bool notify)
-{
-//    double center   = getParameterCenter(idx);
-//    double sigma    = getParameterSigma(idx);
-//    double minValue = center - sigma;
-//    double maxValue = center + sigma;
-//    double x = 0.0;
-   
-//    if(sigma != 0.0)
-//    {
-//       x = (value - center)/sigma;
-      
-//       value = center + x*sigma;
-      
-//       if(value < minValue)
-//       {
-//          x = -1;
-//       }
-//       else if(value >maxValue)
-//       {
-//          x = 1.0;
-//       }
-//       setAdjustableParameter(idx, x, false);
-//    }
-   
-   if(!theAdjustmentList.size())
-   {
-      return;
-   }
-   if(idx < theAdjustmentList[theCurrentAdjustment].getNumberOfAdjustableParameters())
-   {
-      theAdjustmentList[theCurrentAdjustment].getParameterList()[idx].setOffset(value);
-      if(notify)
-      {
-         adjustableParametersChanged();
-      }
-   }
-}
-
-void ossimAdjustableParameterInterface::resizeAdjustableParameterArray(ossim_uint32 numberOfParameters)
-{
-   if(!theAdjustmentList.size())
-   {
-      newAdjustment(numberOfParameters);
-      return;
-   }
-
-   theAdjustmentList[theCurrentAdjustment].setNumberOfAdjustableParameters(numberOfParameters);
-}
-
-void ossimAdjustableParameterInterface::setAdjustment(const ossimAdjustmentInfo& adj, bool notify)
-{
-   setAdjustment(theCurrentAdjustment, adj, notify);
-}
-
-void ossimAdjustableParameterInterface::setAdjustment(ossim_uint32 idx, const ossimAdjustmentInfo& adj, bool notify)
-{
-   if(idx < getNumberOfAdjustments())
-   {
-      theAdjustmentList[(int)idx] = adj;
-      if(notify)
-      {
-         adjustableParametersChanged();
-      }
-   }
-}
-
-
-void ossimAdjustableParameterInterface::addAdjustment(const ossimAdjustmentInfo& adj, bool notify)
-{
-   theAdjustmentList.push_back(adj);
-   if(notify)
-   {
-      adjustableParametersChanged();
-   }
-}
-
-void ossimAdjustableParameterInterface::getAdjustment(ossimAdjustmentInfo& adj)
-{
-   getAdjustment(theCurrentAdjustment,  adj);
-}
-
-void ossimAdjustableParameterInterface::getAdjustment(ossim_uint32 idx, ossimAdjustmentInfo& adj)
-{
-   adj.setNumberOfAdjustableParameters(0);
-
-   if(idx < getNumberOfAdjustments())
-   {
-      adj = theAdjustmentList[(int)idx];
-   }
-}
-
-ossim_uint32 ossimAdjustableParameterInterface::getNumberOfAdjustments()const
-{
-   return (ossim_uint32)theAdjustmentList.size();
-}
-
-ossim_uint32 ossimAdjustableParameterInterface::getCurrentAdjustmentIdx()const
-{
-   return theCurrentAdjustment;
-}
-
-void ossimAdjustableParameterInterface::setDirtyFlag(bool flag)
-{
-   if(theAdjustmentList.size() > 0)
-   {
-      theAdjustmentList[theCurrentAdjustment].setDirtyFlag(flag);
-   }
-}
-
-void ossimAdjustableParameterInterface::setAllDirtyFlag(bool flag)
-{
-   ossim_uint32 idx = 0;
-   
-   for(idx = 0; idx < theAdjustmentList.size(); ++idx)
-   {
-      theAdjustmentList[idx].setDirtyFlag(flag);
-   }
-}
-
-bool ossimAdjustableParameterInterface::hasDirtyAdjustments()const
-{
-   ossim_uint32 idx = 0;
-      
-   for(idx = 0; idx < theAdjustmentList.size(); ++idx)
-   {
-      if(theAdjustmentList[idx].isDirty())
-      {
-         return true;
-      }
-   }
-
-   return false;
-}
-
-bool ossimAdjustableParameterInterface::saveAdjustments(ossimKeywordlist& kwl,
-                                                        const ossimString& prefix)const
-{
-   kwl.add(prefix,
-           NUMBER_OF_ADJUSTMENTS_KW,
-           static_cast<ossim_uint32>(theAdjustmentList.size()),
-           true);
-   kwl.add(prefix,
-           CURRENT_ADJUSTMENT_KW,
-           (int)theCurrentAdjustment,
-           true);
-   
-   for(ossim_uint32 adjIdx = 0; adjIdx < theAdjustmentList.size(); ++adjIdx)
-   {
-      ossimString adjPrefix = prefix + (ossimString(ADJUSTMENT_PREFIX) + ossimString::toString(adjIdx)+".");
-
-      theAdjustmentList[adjIdx].saveState(kwl,
-                                          adjPrefix);
-   }
-
-   return true;
-}
-
-bool ossimAdjustableParameterInterface::loadAdjustments(const ossimKeywordlist& kwl,
-                                                        const ossimString& prefix)
-{
-   theAdjustmentList.clear();
-   theCurrentAdjustment = 0;
-   
-   const char* numberOfAdjustments = kwl.find(prefix, NUMBER_OF_ADJUSTMENTS_KW);
-   const char* currentAdjustment   = kwl.find(prefix, CURRENT_ADJUSTMENT_KW);
-
-   if(!numberOfAdjustments)
-   {
-      numberOfAdjustments = kwl.find(prefix, NUMBER_OF_ADJUSTMENTS_OLD_KW);
-   }
-   if(!currentAdjustment)
-   {
-      currentAdjustment = kwl.find(prefix, CURRENT_ADJUSTMENT_OLD_KW);
-   }
-   if(!numberOfAdjustments) return false;
-   
-   ossim_int32 maxdjustments = ossimString(numberOfAdjustments).toInt32();
-   
-   for(ossim_int32 adjIdx = 0; adjIdx <maxdjustments; ++adjIdx)
-   {
-      ossimAdjustmentInfo info;
-      ossimString adjPrefix = prefix + (ossimString(ADJUSTMENT_PREFIX) + ossimString::toString(adjIdx)+".");
-
-      if(!info.loadState(kwl, adjPrefix))
-      {
-         return false;
-      }
-      theAdjustmentList.push_back(info);
-   }
-
-   theCurrentAdjustment = ossimString(currentAdjustment).toUInt32();
-   
-   return true;
-}
-
-void ossimAdjustableParameterInterface::adjustableParametersChanged()
-{
-}
diff --git a/src/ossim/base/ossimAdjustmentExecutive.cpp b/src/ossim/base/ossimAdjustmentExecutive.cpp
deleted file mode 100644
index 7cd7670..0000000
--- a/src/ossim/base/ossimAdjustmentExecutive.cpp
+++ /dev/null
@@ -1,782 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  David Hicks
-//
-// Description: Executive class for adjustment operations..
-//
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/base/ossimAdjustmentExecutive.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimWLSBundleSolution.h>
-#include <ossim/base/ossimAdjSolutionAttributes.h>
-#include <iostream>
-
-static ossimTrace traceExec  ("ossimAdjustmentExecutive:exec");
-static ossimTrace traceDebug ("ossimAdjustmentExecutive:debug");
-
-
-
-//*****************************************************************************
-//  METHOD: ossimAdjustmentExecutive::ossimAdjustmentExecutive()
-//  
-//  Constructor.
-//  
-//*****************************************************************************
-ossimAdjustmentExecutive::ossimAdjustmentExecutive(std::ostream& report)
-   :
-      theExecValid(false),
-      theSol(0),
-      theSolAttributes(0),
-      theConvCriteria(5.0),
-      theMaxIter(7),      
-      theMaxIterExceeded(false),
-      theSolDiverged(false),
-      theSolConverged(false),
-      theNumObsInSet(0),
-      theNumImages(0),
-      theNumParams(0),
-      theNumMeasurements(0),
-      theRankN(0),
-      theMeasResiduals(),
-      theObjPartials(),
-      theParPartials(),
-      theXrms(0.0),
-      theYrms(0.0),
-      theXmean(0.0),
-      theYmean(0.0),
-      theSEUW(0),
-      theParInitialValues(0),
-      theParInitialStdDev(0),
-      theParDesc(0),
-      theObsInitialValues(0),
-      theObsInitialStdDev(0),
-      theRep(report)      
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "\nossimAdjustmentExecutive::ossimAdjustmentExecutive 1 DEBUG:" << std::endl;
-   }
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimAdjustmentExecutive::ossimAdjustmentExecutive()
-//  
-//  ossimObservationSet-based constructor.
-//  
-//*****************************************************************************
-ossimAdjustmentExecutive::
-ossimAdjustmentExecutive(ossimObservationSet& obsSet, std::ostream& report)
-   :
-      theExecValid(false),
-      theSol(0),
-      theSolAttributes(0),
-      theConvCriteria(5.0),
-      theMaxIter(7),      
-      theMaxIterExceeded(false),
-      theSolDiverged(false),
-      theSolConverged(false),
-      theNumObsInSet(0),
-      theNumImages(0),
-      theNumParams(0),
-      theNumMeasurements(0),
-      theRankN(0),
-      theMeasResiduals(),
-      theObjPartials(),
-      theParPartials(),
-      theXrms(0.0),
-      theYrms(0.0),
-      theXmean(0.0),
-      theYmean(0.0),
-      theSEUW(0),
-      theParInitialValues(0),
-      theParInitialStdDev(0),
-      theParDesc(0),
-      theObsInitialValues(0),
-      theObsInitialStdDev(0),
-      theRep(report)      
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "\nossimAdjustmentExecutive::ossimAdjustmentExecutive 2 DEBUG:" << std::endl;
-   }
-
-   theExecValid = initializeSolution(obsSet);
-}
-
-
-//*****************************************************************************
-//  DESTRUCTOR: ~ossimAdjustmentExecutive()
-//  
-//*****************************************************************************
-ossimAdjustmentExecutive::~ossimAdjustmentExecutive()
-{
-   delete theSolAttributes;
-   delete theSol;
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
-      << "DEBUG: ~ossimAdjustmentExecutive(): returning..." << std::endl;
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimAdjustmentExecutive::initializeSolution()
-//  
-//  Execute solution.
-//  
-//*****************************************************************************
-bool ossimAdjustmentExecutive::initializeSolution(ossimObservationSet& obsSet)
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "\nossimAdjustmentExecutive::initializeSolution DEBUG:" << std::endl; 
-   }
-   ossimString ts = timeStamp();
-
-   theObsSet = &obsSet;
-
-   // Initial report output
-   theRep << "\nossimAdjustmentExecutive Report     ";
-   theRep << ts;
-   theRep << "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
-   theRep << endl;
-   theObsSet->print(theRep);
-   theRep << endl;
-
-   theExecValid = false;
-
-   // Adjustment traits
-   theNumObsInSet     = theObsSet->numObs();
-   if (theNumObsInSet == 0)
-      return theExecValid;
-
-   theNumImages       = theObsSet->numImages();
-   theNumParams       = theObsSet->numAdjPar();
-   theNumMeasurements = theObsSet->numMeas();
-
-   theRankN = theNumParams + theNumObsInSet*3;
-
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         <<"\n theNumObsInSet     = "<<theNumObsInSet
-         <<"\n theNumImages       = "<<theNumImages
-         <<"\n theNumParams       = "<<theNumParams
-         <<"\n theNumMeasurements = "<<theNumMeasurements
-         <<"\n theRankN           = "<<theRankN
-         <<std::endl;
-   }
-
-
-   // Instantiate solution attributes
-   theSolAttributes = new ossimAdjSolutionAttributes
-      (theNumObsInSet, theNumImages, theNumMeasurements, theRankN);
-
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         <<"\n\nInitial Parameter Setup....";
-
-      for (int i=0; i<theNumImages; i++)
-      {
-         ossimAdjustableParameterInterface* iface =
-            theObsSet->getImageGeom(i)->getAdjustableParameterInterface();
-         int np = iface->getNumberOfAdjustableParameters();
-         for (int cp=0; cp<np; ++cp)
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               <<"\n "<<cp<<"  "<<iface->getParameterDescription(cp)
-               // <<"=  "<<iface->getAdjustableParameter(cp)
-               <<"=  "<<iface->getParameterCenter(cp)
-               <<", units= "<<iface->getParameterUnit(cp)
-               <<", sigma= "<<iface->getParameterSigma(cp);
-         }
-      }
-      ossimNotify(ossimNotifyLevel_DEBUG)<<std::endl;
-   }
-
-   // Save parameter initial values and variances
-   int start = 1;
-   theSolAttributes->theAdjParCov.ReSize(theNumParams,theNumParams);
-   for (int i=0; i<theNumImages; i++)
-   {
-      ossimAdjustableParameterInterface* iface =
-         theObsSet->getImageGeom(i)->getAdjustableParameterInterface();
-      int np = iface->getNumberOfAdjustableParameters();
-      NEWMAT::Matrix parCov(np,np);
-      parCov = 0.0;
-      for (int cp=0; cp<np; ++cp)
-      {
-         // Get the a priori value
-         // theParInitialValues.push_back(iface->getAdjustableParameter(cp));
-         theParInitialValues.push_back(iface->getParameterCenter(cp));
-         theImgs.push_back(i);
-
-         theParDesc.push_back(iface->getParameterDescription(cp));
-         double sig = iface->getParameterSigma(cp);
-         
-         // If parameter is locked, tighten down the sigma
-         // TODO: Eventually need better handling of this
-         if (iface->isParameterLocked(cp))
-            sig /= 1000;
-
-         theParInitialStdDev.push_back(sig);
-         parCov(cp+1,cp+1) = sig*sig;
-      }
-      theSolAttributes->
-         theAdjParCov.SubMatrix(start,start+np-1,start,start+np-1) = parCov;
-      start += np;
-   }
-
-   // Ensure initial estimates for observations
-   //   TODO: Currently uses mean of single-ray point drops; should
-   //         eventually use multi-ray intersection, which is only
-   //         available via the ossimSensorModelTuple class.
-   for (int obs=0; obs<theNumObsInSet; obs++)
-   {
-      // If ground position not set, initialize it
-      if (theObsSet->observ(obs)->hasNans())
-      {
-         double latMean = 0.0;
-         double lonMean = 0.0;
-         double hgtMean = 0.0;
-         ossimGpt gpt;
-         ossimDpt ipt;
-         for (ossim_uint32 meas=0; meas<theObsSet->observ(obs)->numMeas(); ++meas)
-         {
-            ipt = theObsSet->observ(obs)->getMeasurement(meas);
-            theObsSet->observ(obs)->getImageGeom(meas)->localToWorld(ipt, gpt);
-            latMean += gpt.latr();
-            lonMean += gpt.lonr();
-            hgtMean += gpt.height();
-         }
-         latMean /= theObsSet->observ(obs)->numMeas();
-         lonMean /= theObsSet->observ(obs)->numMeas();
-         hgtMean /= theObsSet->observ(obs)->numMeas();
-         theObsSet->observ(obs)->Gpt().latr(latMean);
-         theObsSet->observ(obs)->Gpt().lonr(lonMean);
-         theObsSet->observ(obs)->Gpt().height(hgtMean);
-      }
-   }
-
-
-   // Save observation intial values
-   for (int obs=0; obs<theNumObsInSet; obs++)
-   {
-      theObsInitialValues.push_back(theObsSet->observ(obs)->Gpt().latr());
-      theObsInitialValues.push_back(theObsSet->observ(obs)->Gpt().lonr());
-      theObsInitialValues.push_back(theObsSet->observ(obs)->Gpt().height());
-   }
-
-
-   // Load obj/image covariance data
-   int cMeas = 1;
-   theSolAttributes->theImagePtCov.ReSize(theNumMeasurements*2,2);
-   theSolAttributes->theObjectPtCov.ReSize(theNumObsInSet*3,3);
-
-   for (int obs=0; obs<theNumObsInSet; ++obs)
-   {
-      NEWMAT::Matrix ocov;
-      theObsSet->observ(obs)->getObsCov(ocov);
-      int idx = obs*3+1;
-      theSolAttributes->theObjectPtCov.Rows(idx,idx+2) = ocov;
-      for (int i=1; i<=3; ++i)
-         theObsInitialStdDev.push_back(sqrt(ocov(i,i)));
-      for (ossim_uint32 meas=0; meas<theObsSet->observ(obs)->numMeas(); ++meas)
-      {
-         NEWMAT::Matrix mcov;
-         theObsSet->observ(obs)->getMeasCov((int)meas, mcov);
-         int start = (cMeas-1)*2 + 1;
-         theSolAttributes->theImagePtCov.Rows(start,start+1) = mcov;
-         cMeas++;   
-      }
-   }
-
-
-   // Load obj/image xref map
-   for (int obs=0; obs<theNumObsInSet; ++obs)
-   {
-      for (ossim_uint32 meas=0; meas<theObsSet->observ(obs)->numMeas(); ++meas)
-      {
-         int img = theObsSet->imIndex(meas);
-         theSolAttributes->theObjImgXref.insert(pair<int, int>(obs, img));
-      }
-   }
-
-   // Load image/numpar xref map
-   for (int img=0; img<theNumImages; ++img)
-   {
-      int numpar = theObsSet->adjParCount(img);
-      theSolAttributes->theImgNumparXref.insert(pair<int, int>(img, numpar));
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         <<"\ntheObjImgXref multimap  Obs/Img ....\n";
-      for (ObjImgMapIter_t it =theSolAttributes->theObjImgXref.begin();
-                           it!=theSolAttributes->theObjImgXref.end(); ++it)
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            <<"  "<<it->first<<"    "<<it->second<<endl;
-      }
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         <<"\ntheImgNumparXref map  Img/Numpar ....\n";
-      for (ImgNumparMapIter_t it =theSolAttributes->theImgNumparXref.begin();
-                              it!=theSolAttributes->theImgNumparXref.end(); ++it)
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            <<"  "<<it->first<<"    "<<it->second<<endl;
-      }
-   }
-
- 
-   theRep << "\n Iteration 0...";
-
-   updateParameters();
-
-   // Perform initial (0th iteration) observation evaluation
-   theObsSet->evaluate(theMeasResiduals, theObjPartials, theParPartials);
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         <<"\n theObjPartials\n"
-         <<theObjPartials;
-   }
-
-   // Report residual summary
-   printResidualSummary(theRep);
-
-   // Residual statistics
-   computeResidualStatistics(theMeasResiduals);
-
-   // Load partials
-   theSolAttributes->theObjPartials = theObjPartials;
-   theSolAttributes->theParPartials = theParPartials;
-
-   // Load residuals
-   theSolAttributes->theMeasResiduals = theMeasResiduals;
-
-   // Initial standard error of unit weight
-   theSEUW.push_back(computeSEUW());
-
-   // Instantiate solution object
-   theSol = new ossimWLSBundleSolution();
-
-   theExecValid = true;
-
-   return theExecValid;
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimAdjustmentExecutive::runSolution()
-//  
-//  Execute solution.
-//  
-//*****************************************************************************
-bool ossimAdjustmentExecutive::runSolution()
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "\nossimAdjustmentExecutive::runSolution DEBUG:" << std::endl;
-   }
-
-
-   // Iterative loop
-   int iter = 0;
-
-   while (iter < theMaxIter &&
-          !theSolConverged &&
-          !theSolDiverged &&
-          theExecValid)
-   {
-      iter++;
-
-      theRep << "\n Iteration "<<iter<<"...";
-
-      // Execute solution
-      theExecValid = theSol->run(theSolAttributes);
-
-
-      if (theExecValid)
-      {
-         // Report corrections
-         printParameterCorrectionSummary(theRep);
-         printObservationCorrectionSummary(theRep);
-
-         // Update adjustable parameters
-         updateParameters();
-
-         // Update ground points
-         updateObservations();
-
-         // Perform observation evaluation
-         theObsSet->evaluate(theMeasResiduals, theObjPartials, theParPartials);
-
-         // Load partials
-         theSolAttributes->theObjPartials = theObjPartials;
-         theSolAttributes->theParPartials = theParPartials;
-
-         // Load residuals
-         theSolAttributes->theMeasResiduals = theMeasResiduals;
-
-         // Report residual summary
-         printResidualSummary(theRep);
-
-         // Residual statistics
-         computeResidualStatistics(theMeasResiduals);
-
-         // Compute SEUW for current iteration
-         theSEUW.push_back(computeSEUW());
-
-         // Check convergence
-         double percChange = 
-         fabs((theSEUW[iter]-theSEUW[iter-1])/theSEUW[iter-1])*100.0;
-
-         if ((percChange <= theConvCriteria) && iter>1)
-            theSolConverged = true;
-         else if (iter == theMaxIter)
-            theMaxIterExceeded = true;
-         else if (iter >= 3)
-         {
-            if (theSEUW[iter]   > theSEUW[iter-1] &&
-                theSEUW[iter-1] > theSEUW[iter-2] &&
-                theSEUW[iter-2] > theSEUW[iter-3])
-               theSolDiverged = true;
-         }
-         else
-            theSolConverged = false;
-      }
-   }
-
-   return theExecValid;
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimAdjustmentExecutive::updateParameters()
-//  
-//  Update adjustable parameters with current iteration corrections.
-//  
-//*****************************************************************************
-bool ossimAdjustmentExecutive::updateParameters()
-{
-   // Update local geometries
-   int currPar = 1;
-   for (int img=0; img<theNumImages; ++img)
-   {
-      ossimAdjustableParameterInterface* iface =
-         theObsSet->getImageGeom(img)->getAdjustableParameterInterface();
-
-      for (int par=0; par<theSolAttributes->theImgNumparXref[img]; ++par)
-      {
-         // double middle = iface->getAdjustableParameter(par);
-         // middle += theSolAttributes->theLastCorrections(currPar);
-         // iface->setAdjustableParameter(par, middle, true);
-
-         double middle = iface->getParameterCenter(par);
-         middle += theSolAttributes->theLastCorrections(currPar);
-         iface->setParameterCenter(par, middle, true);
-
-         currPar++;    
-      }
-   }
-
-   // Copy updated local geometries to observation geometries
-   for (int img=0; img<theNumImages; ++img)
-   {
-      for (int obs=0; obs<theNumObsInSet; ++obs)
-      {
-         for (ossim_uint32 imgInObs=0; imgInObs<theObsSet->observ(obs)->numImages(); ++imgInObs)
-         {
-            if (theObsSet->observ(obs)->imageFile(imgInObs) ==
-                theObsSet->imageFile(img))
-            {
-               theObsSet->observ(obs)->setImageGeom
-                  (imgInObs, theObsSet->getImageGeom(img));
-            }
-         }
-      }
-   }
-
-   return true;
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimAdjustmentExecutive::updateObservations()
-//  
-//  Update adjustable ground points with current iteration corrections.
-//  
-//*****************************************************************************
-bool ossimAdjustmentExecutive::updateObservations()
-{
-   int currPar = theNumParams + 1;
-   for (int obs=0; obs<theNumObsInSet; ++obs)
-   {
-      double lat = theObsSet->observ(obs)->Gpt().latr();
-      lat += theSolAttributes->theLastCorrections(currPar);
-      currPar++;    
-      double lon = theObsSet->observ(obs)->Gpt().lonr();
-      lon += theSolAttributes->theLastCorrections(currPar);
-      currPar++;    
-      double hgt = theObsSet->observ(obs)->Gpt().height();
-      hgt += theSolAttributes->theLastCorrections(currPar);
-      currPar++;    
-      theObsSet->observ(obs)->Gpt().latr(lat);
-      theObsSet->observ(obs)->Gpt().lonr(lon);
-      theObsSet->observ(obs)->Gpt().height(hgt);
-   }
-
-   return true;
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimAdjustmentExecutive::summarizeSolution()
-//  
-//  Execute solution.
-//  
-//*****************************************************************************
-void ossimAdjustmentExecutive::summarizeSolution() const
-{
-   theRep << "\nossimAdjustmentExecutive Summary..."<<std::endl;
-   theRep << " Valid Exec:         "<<(theExecValid?"true":"false")<<std::endl;
-   theRep << " Nbr Ground Pts:     "<<theNumObsInSet<<std::endl;
-   theRep << " Nbr Image Points:   "<<theNumMeasurements<<std::endl;
-   theRep << " Nbr Images:         "<<theNumImages<<std::endl;
-   theRep << " Nbr Parameters:     "<<theNumParams<<std::endl;
-   theRep << " -------------------------"<<std::endl;
-   theRep << " Solution Converged: "<<(theSolConverged?"true":"false")<<std::endl;
-   theRep << " Solution Diverged:  "<<(theSolDiverged?"true":"false")<<std::endl;
-   theRep << " Max Iter Exceeded:  "<<(theMaxIterExceeded?"true":"false")<<std::endl;
-   theRep << " Max Iterations:     "<<theMaxIter<<std::endl;
-   theRep << " Convergence Crit:   "<<theConvCriteria<<"%"<<std::endl;
-
-   // SEUW history
-   theRep << "\n SEUW Trace...";
-   theRep << "\n   Iter        SEUW";
-   for (ossim_uint32 iter=0; iter<theSEUW.size(); ++iter)
-      theRep << "\n"<<setw(7)<<iter<<setw(12)<<setprecision(3)<<theSEUW[iter];
-
-   ossimString ts = timeStamp();
-   theRep << "\n";
-   theRep << "\n" << ts;
-   theRep << "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
-   theRep << endl;
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimAdjustmentExecutive::computeResidualStatistics()
-//  
-//  Statistical evaluation.
-//  
-//*****************************************************************************
-bool ossimAdjustmentExecutive::computeResidualStatistics(NEWMAT::Matrix& res)
-{
-   theXmean = 0.0;
-   theYmean = 0.0;
-   theXrms  = 0.0;
-   theYrms  = 0.0;
-   for (int n=1; n<=res.Nrows();++n)
-   {
-      theXmean += res(n,1);
-      theYmean += res(n,2);
-      theXrms  += res(n,1)*res(n,1);
-      theYrms  += res(n,2)*res(n,2);
-   }
-
-   theXmean /= theNumMeasurements;
-   theYmean /= theNumMeasurements;
-   theXrms   = sqrt(theXrms/theNumMeasurements);
-   theYrms   = sqrt(theYrms/theNumMeasurements);
-
-   theRep<<"\n";
-   theRep<<" ______________Mean:";
-   theRep<<setprecision(1)<<setw(8)<<theXmean;
-   theRep<<setprecision(1)<<setw(8)<<theYmean;
-   theRep<<"    RMS:";
-   theRep<<setprecision(1)<<setw(8)<<theXrms;
-   theRep<<setprecision(1)<<setw(8)<<theYrms;
-   theRep<<endl;
-
-   return true;
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimAdjustmentExecutive::computeSEUW()
-//  
-//  Standard error of unit weight evaluation.
-//  
-//*****************************************************************************
-double ossimAdjustmentExecutive::computeSEUW()
-{
-   double vuw = 0.0;
-
-   // Observation contributions
-   int cMeas = 1;
-   for (int obs=0; obs<theNumObsInSet; ++obs)
-   {
-      NEWMAT::ColumnVector tc(3);
-      NEWMAT::Matrix cov(3,3);
-      int idx = theNumParams + 3*obs + 1;
-      tc  = theSolAttributes->theTotalCorrections.Rows(idx, idx+2);
-      idx -= theNumParams;
-      cov = theSolAttributes->theObjectPtCov.SubMatrix(idx,idx+2,1,3);
-      for (int i=1; i<=3; ++i)
-      {
-         vuw += tc(i)*tc(i)/cov(i,i);
-      }
-      for (ossim_uint32 meas=0; meas<theObsSet->observ(obs)->numMeas(); ++meas)
-      {
-         NEWMAT::RowVector res(2);
-         NEWMAT::Matrix cov(2,2);
-         res = theSolAttributes->theMeasResiduals.Row(cMeas);
-         int start = (cMeas-1)*2 + 1;
-         cov = theSolAttributes->theImagePtCov.SubMatrix(start,start+1,1,2);
-         for (int i=1; i<=2; ++i)
-         {
-            vuw += res(i)*res(i)/cov(i,i);
-         }
-         cMeas++;
-      }
-   }
-
-   // Parameter contributions
-   NEWMAT::ColumnVector tc(theNumParams);
-   tc = theSolAttributes->theTotalCorrections.Rows(1, theNumParams);
-   for (int par=0; par<theNumParams; ++par)
-   {
-      vuw += tc(par+1)*tc(par+1)/(theParInitialStdDev[par]*theParInitialStdDev[par]);
-   }
-
-   // DF
-   double df = theNumMeasurements*2 - theRankN;
-   if (df<=0.0)
-      df = 1.0;
-
-   // SEUW
-   double seuw = sqrt(vuw/df);
-
-   return seuw;
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimAdjustmentExecutive::printParameterCorrectionSummary()
-//  
-//  Print info.
-//  
-//*****************************************************************************
-std::ostream& ossimAdjustmentExecutive::
-printParameterCorrectionSummary(std::ostream& out) const
-{
-   out<<"\nParameter Corrections...";
-   out<<"\n  n im        parameter    a_priori  total_corr   last_corr initial_std    prop_std";
-   for (int pc=1; pc<=theNumParams; ++pc)
-   {
-      out<<"\n "<<setprecision(5)<<setw(2)<<pc;
-      out<<setw(3)<<theImgs[pc-1]+1;
-      out<<setw(17)<<theParDesc[pc-1];
-      out<<setw(12)<<theParInitialValues[pc-1];
-      out<<setw(12)<<theSolAttributes->theTotalCorrections(pc);
-      out<<setw(12)<<theSolAttributes->theLastCorrections(pc);
-      out<<setw(12)<<theParInitialStdDev[pc-1];
-      out<<setw(12)<<sqrt(theSolAttributes->theFullCovMatrix(pc,pc));
-   }
-   out<<endl;
-
-   return out;
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimAdjustmentExecutive::printObservationCorrectionSummary()
-//  
-//*****************************************************************************
-std::ostream& ossimAdjustmentExecutive::
-printObservationCorrectionSummary(std::ostream& out) const
-{
-   out<<"\nObservation Corrections...";
-   out<<"\n  n         observation    a_priori  total_corr   last_corr initial_std    prop_std";
-   for (int obs=0; obs<theNumObsInSet; ++obs)
-   {
-      out<<"\n "<<setprecision(5)<<setw(2)<<obs+1;
-      out<<" "<<setw(19)<<theObsSet->observ(obs)->ID();
-      double mPerRadp = theObsSet->observ(obs)->Gpt().metersPerDegree().y*DEG_PER_RAD;
-      double mPerRadl = theObsSet->observ(obs)->Gpt().metersPerDegree().x*DEG_PER_RAD;
-      // ossim_uint32 iobs = obs*3+1;
-
-      for (int k=0; k<3; ++k)
-      {
-         int idx = theNumParams + obs*3 + k + 1;
-         if (k<2)
-            out<<setw(12)<<theObsInitialValues[obs*3+k]*DEG_PER_RAD;
-         else
-            out<<setw(12)<<theObsInitialValues[obs*3+k];
-         double factor;
-         if (k==0)
-            factor = mPerRadp;
-         else if (k==1)
-            factor = mPerRadl;
-         else
-            factor = 1.0;
-         out<<setw(12)<<theSolAttributes->theTotalCorrections(idx)*factor;
-         out<<setw(12)<<theSolAttributes->theLastCorrections(idx)*factor;
-         out<<setw(12)<<theObsInitialStdDev[obs*3+k]*factor;
-         out<<setw(12)<<sqrt(theSolAttributes->theFullCovMatrix(idx,idx))*factor;
-         out<<endl<<"                       ";
-      }
-   }
-   out<<endl;
-
-   return out;
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimAdjustmentExecutive::printResidualSummary()
-//  
-//*****************************************************************************
-std::ostream& ossimAdjustmentExecutive::
-printResidualSummary(std::ostream& out) const
-{
-   out<<"\nMeasurement Residuals...";
-   out<<"\n observation   image    samp    line    initial_meas";
-   int j = 0;
-   for (int obs=0; obs<theNumObsInSet; obs++)
-   {
-      int numMeasPerObs = theObsSet->observ(obs)->numMeas();
-      for (int meas=0; meas<numMeasPerObs; ++meas)
-      {
-         int imIdx = theObsSet->imIndex(j);
-         ++j;
-         out<<"\n";
-         out<<setw(12)<<theObsSet->observ(obs)->ID();
-         out<<setw(8)<<imIdx+1;
-         out<<setprecision(1)<<setw(8)<<theMeasResiduals(j,1);
-         out<<setprecision(1)<<setw(8)<<theMeasResiduals(j,2);
-         out<<"    ";
-         theObsSet->observ(obs)->getMeasurement(meas).print(out,1);
-      }
-      out<<endl;
-   }
-
-   return out;
-}
diff --git a/src/ossim/base/ossimApplicationUsage.cpp b/src/ossim/base/ossimApplicationUsage.cpp
deleted file mode 100644
index 8f773df..0000000
--- a/src/ossim/base/ossimApplicationUsage.cpp
+++ /dev/null
@@ -1,216 +0,0 @@
-//-------------------------------------------------------------------------
-//
-// This code was taken from Open Scene Graph and incorporated from into
-// OSSIM.
-//
-//-------------------------------------------------------------------------
-// $Id: ossimApplicationUsage.cpp 19682 2011-05-31 14:21:20Z dburken $
-
-#include <iostream>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <ossim/base/ossimCommon.h>
-
-ossimApplicationUsage::ossimApplicationUsage(const ossimString& commandLineUsage):
-    theCommandLineUsage(commandLineUsage)
-{
-}
-
-ossimApplicationUsage* ossimApplicationUsage::instance()
-{
-    static ossimApplicationUsage theApplicationUsage;
-    return &theApplicationUsage;
-}
-void ossimApplicationUsage::setApplicationName(const ossimString& name)
-{
-   theApplicationName = name;
-}
-
-const ossimString& ossimApplicationUsage::getApplicationName() const
-{
-   return theApplicationName;
-}
-void ossimApplicationUsage::setDescription(const ossimString& desc)
-{
-   theDescription = desc;
-}
-
-const ossimString& ossimApplicationUsage::getDescription() const
-{
-   return theDescription;
-}
-
-void ossimApplicationUsage::addUsageExplanation(Type type,const ossimString& option,const ossimString& explanation)
-{
-    switch(type)
-    {
-        case(OSSIM_COMMAND_LINE_OPTION):
-            addCommandLineOption(option,explanation);
-            break;
-        case(OSSIM_ENVIRONMENTAL_VARIABLE):
-            addEnvironmentalVariable(option,explanation);
-            break;
-    }
-}
-void ossimApplicationUsage::setCommandLineUsage(const ossimString& explanation)
-{
-   theCommandLineUsage=explanation;
-}
-
-const ossimString& ossimApplicationUsage::getCommandLineUsage() const
-{
-   return theCommandLineUsage;
-}
-
-void ossimApplicationUsage::addCommandLineOption(const ossimString& option,const ossimString& explanation)
-{
-    theCommandLineOptions[option]=explanation;
-}
-
-const ossimApplicationUsage::UsageMap& ossimApplicationUsage::getCommandLineOptions() const
-{
-   return theCommandLineOptions;
-}
-
-void ossimApplicationUsage::addEnvironmentalVariable(const ossimString& option,const ossimString& explanation)
-{
-    theEnvironmentalVariables[option]=explanation;
-}
-const ossimApplicationUsage::UsageMap& ossimApplicationUsage::getEnvironmentalVariables() const
-{
-   return theEnvironmentalVariables;
-}
-
-void ossimApplicationUsage::getFormatedString(ossimString& str, const UsageMap& um,unsigned int widthOfOutput)
-{
-
-    unsigned int maxNumCharsInOptions = 0;
-    ossimApplicationUsage::UsageMap::const_iterator citr;
-    for(citr=um.begin();
-        citr!=um.end();
-        ++citr)
-    {
-        maxNumCharsInOptions = ossim::max(maxNumCharsInOptions,(unsigned int)citr->first.length());
-    }
-    
-    unsigned int fullWidth = widthOfOutput;
-    unsigned int optionPos = 2;
-    unsigned int explanationPos = 2+maxNumCharsInOptions+2;
-    unsigned int explanationWidth = fullWidth-explanationPos;
-
-    ossimString line;
-    
-    for(citr=um.begin();
-        citr!=um.end();
-        ++citr)
-    {
-        line.assign(fullWidth,' ');
-        line.replace(optionPos,citr->first.length(),citr->first);
-        
-        const ossimString& explanation = citr->second;
-        std::string::size_type pos = 0;
-        std::string::size_type offset = 0;
-        bool firstInLine = true;
-        while (pos<explanation.length())
-        {
-            if (firstInLine) offset = 0;
-                    
-            // skip any leading white space.
-            while (pos<explanation.length() && *(explanation.begin()+pos)==' ')
-            {
-                if (firstInLine) ++offset;
-                ++pos;
-            }
-            
-            firstInLine = false;
-        
-            std::string::size_type width = ossim::min((ossim_int64)(explanation.length()-pos),
-                                                      (ossim_int64)(explanationWidth-offset));
-            std::string::size_type slashn_pos = explanation.find('\n',pos);
-            
-            unsigned int extraSkip = 0;
-            bool concatinated = false;
-            if (slashn_pos!=std::string::npos)
-            {
-                if (slashn_pos<pos+width)
-                {
-                    width = slashn_pos-pos;
-                    ++extraSkip;
-                    firstInLine = true;
-                }
-                else if (slashn_pos==pos+width) 
-                {
-                    ++extraSkip;
-                    firstInLine = true;
-                }
-            }
-            
-            if (pos+width<explanation.length())
-            {
-                // now reduce width until we get a space or a return
-                // so that we ensure that whole words are printed.
-                while (width>0 && 
-                       *(explanation.begin()+(pos+width))!=' ' && 
-                       *(explanation.begin()+(pos+width))!='\n') --width;
-                       
-                if (width==0)
-                {
-                    // word must be longer than a whole line so will need
-                    // to concatinate it.
-                    width = explanationWidth-1;
-                    concatinated = true;
-                }
-            }
-
-            line.replace(explanationPos+offset,explanationWidth, explanation, pos, width);
-
-            if (concatinated) { str += line; str += "-\n"; }
-            else { str += line; str += "\n"; }
-            
-            // move to the next line of output.
-            line.assign(fullWidth,' ');
-            
-            pos += width+extraSkip;
-
-            
-        }
-                
-    }
-}
-
-void ossimApplicationUsage::write(std::ostream& output, const ossimApplicationUsage::UsageMap& um,unsigned int widthOfOutput)
-{
-    ossimString str;
-    getFormatedString(str, um, widthOfOutput);
-    output << str << std::endl;
-}
-
-void ossimApplicationUsage::write(std::ostream& output, unsigned int type, unsigned int widthOfOutput)
-{
-
-    output << "Usage: "<<getCommandLineUsage()<<std::endl;
-    if(theDescription.size()>0)
-    {
-       // TODO: take into account "widthOfOutput"
-       output << "\nDescription:\n" << theDescription.c_str() << "\n"
-              << std::endl;
-    }
-    
-    bool needspace = false;
-    if ((type&OSSIM_COMMAND_LINE_OPTION) && !getCommandLineOptions().empty())
-    {
-        if (needspace) output << std::endl;
-        output << "Options:"<<std::endl;
-        write(output,getCommandLineOptions(),widthOfOutput);
-        needspace = true;
-    }
-    
-    if ((type&OSSIM_ENVIRONMENTAL_VARIABLE) && !getEnvironmentalVariables().empty())
-    {
-        if (needspace) output << std::endl;
-        output << "Environmental Variables:"<<std::endl;
-        write(output,getEnvironmentalVariables(),widthOfOutput);
-        needspace = true;
-    }
-
-}
-
diff --git a/src/ossim/base/ossimArgumentParser.cpp b/src/ossim/base/ossimArgumentParser.cpp
deleted file mode 100644
index 9d08c7c..0000000
--- a/src/ossim/base/ossimArgumentParser.cpp
+++ /dev/null
@@ -1,497 +0,0 @@
-//-------------------------------------------------------------------------
-//
-// This code was taken from Open Scene Graph and incorporated from into
-// OSSIM.
-//
-//-------------------------------------------------------------------------
-// $Id: ossimArgumentParser.cpp 19900 2011-08-04 14:19:57Z dburken $
-
-#include <cstring>
-#include <set>
-#include <iostream>
-
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <ossim/base/ossimString.h>
-
-bool ossimArgumentParser::isOption(const char* str)
-{
-    return str && str[0]=='-';
-}
-
-bool ossimArgumentParser::isString(const char* str)
-{
-    if (!str) return false;
-
-    return true;
-//    return !isOption(str);
-}
-
-bool ossimArgumentParser::isNumber(const char* str)
-{
-   if (!str) return false;
-   
-   bool hadPlusMinus = false;
-    bool hadDecimalPlace = false;
-    bool hadExponent = false;
-    bool couldBeInt = true;
-    bool couldBeFloat = true;
-    int noZeroToNine = 0;
-
-    const char* ptr = str;
-
-    // check if could be a hex number.
-    if (std::strncmp(ptr,"0x",2)==0)
-    {
-        // skip over leading 0x, and then go through rest of string
-        // checking to make sure all values are 0...9 or a..f.
-        ptr+=2;
-        while (
-               *ptr!=0 &&
-               ((*ptr>='0' && *ptr<='9') ||
-                (*ptr>='a' && *ptr<='f') ||
-                (*ptr>='A' && *ptr<='F'))
-              )
-        {
-            ++ptr;
-        }
-
-        // got to end of string without failure, therefore must be a hex integer.
-        if (*ptr==0) return true;
-    }
-
-    ptr = str;
-
-    // check if a float or an int.
-    while (*ptr!=0 && couldBeFloat)
-    {
-       if (*ptr=='+' || *ptr=='-')
-       {
-          if (hadPlusMinus)
-          {
-             couldBeInt = false;
-             couldBeFloat = false;
-          }
-          else
-          {
-             hadPlusMinus = true;
-          }
-       }
-       else if (*ptr>='0' && *ptr<='9')
-       {
-          noZeroToNine++;
-       }
-       else if (*ptr=='.')
-       {
-          if (hadDecimalPlace)
-          {
-             couldBeInt = false;
-             couldBeFloat = false;
-          }
-          else
-          {
-             hadDecimalPlace = true;
-             couldBeInt = false;
-          }
-       }
-       else if (*ptr=='e' || *ptr=='E')
-       {
-          if (hadExponent || noZeroToNine==0)
-          {
-             couldBeInt = false;
-             couldBeFloat = false;
-          }
-          else
-          {
-             hadExponent = true;
-             couldBeInt = false;
-             hadDecimalPlace = false;
-             hadPlusMinus = false;
-             noZeroToNine=0;
-          }
-       }
-       else
-       {
-          couldBeInt = false;
-          couldBeFloat = false;
-       }
-       ++ptr;
-    }
-
-    if (couldBeInt && noZeroToNine>0) return true;
-    if (couldBeFloat && noZeroToNine>0) return true;
-
-    return false;
-
-}
-
-bool ossimArgumentParser::ossimParameter::valid(const char* str) const
-{
-    switch(theType)
-    {
-       case ossimParameter::OSSIM_FLOAT_PARAMETER:        return isNumber(str);
-       case ossimParameter::OSSIM_DOUBLE_PARAMETER:       return isNumber(str);
-       case ossimParameter::OSSIM_INT_PARAMETER:          return isNumber(str);
-       case ossimParameter::OSSIM_UNSIGNED_INT_PARAMETER: return isNumber(str);
-       case ossimParameter::OSSIM_STRING_PARAMETER:       return isString(str);
-    }
-    return false;
-}
-
-bool ossimArgumentParser::ossimParameter::assign(const char* str)
-{
-    if (valid(str))
-    {
-        switch(theType)
-        {
-           case ossimParameter::OSSIM_FLOAT_PARAMETER:        *theValue.theFloat = (float)ossimString(str).toDouble(); break;
-           case ossimParameter::OSSIM_DOUBLE_PARAMETER:       *theValue.theDouble = ossimString(str).toDouble(); break;
-           case ossimParameter::OSSIM_INT_PARAMETER:          *theValue.theInt = ossimString(str).toInt(); break;
-           case ossimParameter::OSSIM_UNSIGNED_INT_PARAMETER: *theValue.theUint = ossimString(str).toUInt32(); break;
-           case ossimParameter::OSSIM_STRING_PARAMETER:       *theValue.theString = str; break;
-        }
-        return true;
-    }
-    else
-    {
-        return false;
-    }
-}
-
-
-
-ossimArgumentParser::ossimArgumentParser(int* argc,char **argv):
-    theArgc(argc),
-    theArgv(argv),
-    theUsage(ossimApplicationUsage::instance())
-{
-}
-
-ossimArgumentParser::~ossimArgumentParser()
-{
-}
-
-void ossimArgumentParser::initialize(int* argc, const char **argv)
-{
-   if(argc > 0) delete (theArgv);
-   theArgc = argc;
-   theArgv = new char*[*argc];
-   for(int i=0;i<*argc;i++)
-   {
-      theArgv[i] = new char[strlen(argv[i])];
-      strcpy(theArgv[i], argv[i]);
-   }
-}
-
-std::string ossimArgumentParser::getApplicationName() const
-{
-    if (theArgc && *theArgc>0 ) return std::string(theArgv[0]);
-    return "";
-}
-
-
-bool ossimArgumentParser::isOption(int pos) const
-{
-    return pos<*theArgc && isOption(theArgv[pos]);
-}
-
-bool ossimArgumentParser::isString(int pos) const
-{
-    return pos < *theArgc && isString(theArgv[pos]);
-}
-
-bool ossimArgumentParser::isNumber(int pos) const
-{
-    return pos < *theArgc && isNumber(theArgv[pos]);
-}
-
-
-int ossimArgumentParser::find(const std::string& str) const
-{
-    for(int pos=1;pos<*theArgc;++pos)
-    {
-        if (str==theArgv[pos])
-        {
-            return pos;
-        }
-    }
-    return 0;
-}
-
-bool ossimArgumentParser::match(int pos, const std::string& str) const
-{
-    return pos<*theArgc && str==theArgv[pos];
-}
-
-
-bool ossimArgumentParser::containsOptions() const
-{
-   for(int pos=1;pos<*theArgc;++pos)
-   {
-      if (isOption(pos)) return true;
-   }
-   return false;
-}
-
-
-int ossimArgumentParser::numberOfParams(const std::string& str, ossimParameter param) const
-{
-   int pos=find(str);
-   if (pos<=0) 
-      return -1;
-
-   ++pos;
-   int num_params = 0;
-   while (param.valid(theArgv[pos+num_params]))
-      ++num_params;
-   return num_params;
-}
-
-
-void ossimArgumentParser::remove(int pos,int num)
-{
-    if (num==0) return;
-
-    for(;pos+num<*theArgc;++pos)
-    {
-        theArgv[pos]=theArgv[pos+num];
-    }
-    for(;pos<*theArgc;++pos)
-    {
-        theArgv[pos]=0;
-    }
-    *theArgc-=num;
-}
-
-bool ossimArgumentParser::read(const std::string& str)
-{
-    int pos=find(str);
-    if (pos<=0) return false;
-    remove(pos);
-    return true;
-}
-
-bool ossimArgumentParser::read(const std::string& str, ossimParameter value1)
-{
-    int pos=find(str);
-    if (pos<=0) return false;
-    if (!value1.valid(theArgv[pos+1]))
-    {
-        reportError("argument to `"+str+"` is missing");
-        return false;
-    }
-    value1.assign(theArgv[pos+1]);
-    remove(pos,2);
-    return true;
-}
-
-bool ossimArgumentParser::read(const std::string& str, ossimParameter value1, ossimParameter value2)
-{
-    int pos=find(str);
-    if (pos<=0) return false;
-    if (!value1.valid(theArgv[pos+1]) ||
-        !value2.valid(theArgv[pos+2]))
-    {
-        reportError("argument to `"+str+"` is missing");
-        return false;
-    }
-    value1.assign(theArgv[pos+1]);
-    value2.assign(theArgv[pos+2]);
-    remove(pos,3);
-    return true;
-}
-
-bool ossimArgumentParser::read(const std::string& str, ossimParameter value1, ossimParameter value2, ossimParameter value3)
-{
-    int pos=find(str);
-    if (pos<=0) return false;
-    if (!value1.valid(theArgv[pos+1]) ||
-        !value2.valid(theArgv[pos+2]) ||
-        !value2.valid(theArgv[pos+3]))
-    {
-        reportError("argument to `"+str+"` is missing");
-        return false;
-    }
-    value1.assign(theArgv[pos+1]);
-    value2.assign(theArgv[pos+2]);
-    value3.assign(theArgv[pos+3]);
-    remove(pos,4);
-    return true;
-}
-
-bool ossimArgumentParser::read(const std::string& str, ossimParameter value1, ossimParameter value2, ossimParameter value3, ossimParameter value4)
-{
-    int pos=find(str);
-    if (pos<=0) return false;
-    if (!value1.valid(theArgv[pos+1]) ||
-        !value2.valid(theArgv[pos+2]) ||
-        !value2.valid(theArgv[pos+3]) ||
-        !value3.valid(theArgv[pos+4]))
-    {
-        reportError("argument to `"+str+"` is missing");
-        return false;
-    }
-    value1.assign(theArgv[pos+1]);
-    value2.assign(theArgv[pos+2]);
-    value3.assign(theArgv[pos+3]);
-    value4.assign(theArgv[pos+4]);
-    remove(pos,5);
-    return true;
-}
-
-
-/** if the argument value at the posotion pos matches specified string, and subsequent
-  * parameters are also matched then set the paramter values and remove the from the list of arguments.*/
-bool ossimArgumentParser::read(int pos, const std::string& str)
-{
-    if (match(pos,str))
-    {
-        remove(pos,1);
-        return true;
-    }
-    else
-    {
-        return false;
-    }
-}
-
-bool ossimArgumentParser::read(int pos, const std::string& str, ossimParameter value1)
-{
-    if (match(pos,str) &&
-        value1.valid(theArgv[pos+1]))
-    {
-        value1.assign(theArgv[pos+1]);
-        remove(pos,2);
-        return true;
-    }
-    else
-    {
-        return false;
-    }
-}
-
-bool ossimArgumentParser::read(int pos, const std::string& str, ossimParameter value1, ossimParameter value2)
-{
-    if (match(pos,str) &&
-        value1.valid(theArgv[pos+1]) &&
-        value2.valid(theArgv[pos+2]))
-    {
-        value1.assign(theArgv[pos+1]);
-        value2.assign(theArgv[pos+2]);
-        remove(pos,3);
-        return true;
-    }
-    else
-    {
-        return false;
-    }
-}
-
-bool ossimArgumentParser::read(int pos, const std::string& str, ossimParameter value1, ossimParameter value2, ossimParameter value3)
-{
-    if (match(pos,str) &&
-        value1.valid(theArgv[pos+1]) &&
-        value2.valid(theArgv[pos+2]) &&
-        value3.valid(theArgv[pos+3]))
-    {
-        value1.assign(theArgv[pos+1]);
-        value2.assign(theArgv[pos+2]);
-        value3.assign(theArgv[pos+3]);
-        remove(pos,4);
-        return true;
-    }
-    else
-    {
-        return false;
-    }
-}
-
-bool ossimArgumentParser::read(int pos, const std::string& str, ossimParameter value1, ossimParameter value2, ossimParameter value3, ossimParameter value4)
-{
-    if (match(pos,str) &&
-        value1.valid(theArgv[pos+1]) &&
-        value2.valid(theArgv[pos+2]) &&
-        value3.valid(theArgv[pos+3]) &&
-        value4.valid(theArgv[pos+4]))
-    {
-        value1.assign(theArgv[pos+1]);
-        value2.assign(theArgv[pos+2]);
-        value3.assign(theArgv[pos+3]);
-        value4.assign(theArgv[pos+4]);
-        remove(pos,5);
-        return true;
-    }
-    else
-    {
-        return false;
-    }
-}
-
-
-
-bool ossimArgumentParser::errors(ossimErrorSeverity severity) const
-{
-    for(ossimErrorMessageMap::const_iterator itr=theErrorMessageMap.begin();
-        itr!=theErrorMessageMap.end();
-        ++itr)
-    {
-        if (itr->second>=severity) return true;
-    }
-    return false;
-}
-
-void ossimArgumentParser::reportError(const std::string& message, ossimErrorSeverity severity)
-{
-    theErrorMessageMap[message]=severity;
-}
-
-void ossimArgumentParser::reportRemainingOptionsAsUnrecognized(ossimErrorSeverity severity)
-{
-    std::set<std::string> options;
-    if (theUsage)
-    {
-        // parse the usage options to get all the option that the application can potential handle.
-        for(ossimApplicationUsage::UsageMap::const_iterator itr=theUsage->getCommandLineOptions().begin();
-            itr!=theUsage->getCommandLineOptions().end();
-            ++itr)
-        {
-            const std::string& option = itr->first;
-            std::string::size_type prevpos = 0, pos = 0;
-            while ((pos=option.find(' ',prevpos))!=std::string::npos)
-            {
-                if (option[prevpos]=='-')
-                {
-                    options.insert(std::string(option,prevpos,pos-prevpos));
-                }
-                prevpos=pos+1;
-            }
-            if (option[prevpos]=='-')
-            {
-
-                options.insert(std::string(option,prevpos,std::string::npos));
-            }
-        }
-
-    }
-
-    for(int pos=1;pos<argc();++pos)
-    {
-        // if an option and havn't been previous querried for report as unrecognized.
-        if (isOption(pos) && options.find(theArgv[pos])==options.end())
-        {
-            reportError(getApplicationName() +": unrecognized option "+theArgv[pos],severity);
-        }
-    }
-}
-void ossimArgumentParser::writeErrorMessages(std::ostream& output, ossimErrorSeverity severity)
-{
-    for(ossimErrorMessageMap::iterator itr=theErrorMessageMap.begin();
-        itr!=theErrorMessageMap.end();
-        ++itr)
-    {
-        if (itr->second>=severity)
-        {
-            output<< getApplicationName() << ": " << itr->first << std::endl;
-        }
-    }
-}
diff --git a/src/ossim/base/ossimBaseObjectFactory.cpp b/src/ossim/base/ossimBaseObjectFactory.cpp
deleted file mode 100644
index 3fb1c85..0000000
--- a/src/ossim/base/ossimBaseObjectFactory.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimBaseObjectFactory.cpp 19900 2011-08-04 14:19:57Z dburken $
-#include <ossim/base/ossimBaseObjectFactory.h>
-#include <ossim/base/ossimConnectableContainer.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimString.h>
-#include <vector>
-
-RTTI_DEF1(ossimBaseObjectFactory, "ossimBaseObjectFactory", ossimObjectFactory);
-
-ossimBaseObjectFactory* ossimBaseObjectFactory::theInstance = NULL;
-
-ossimBaseObjectFactory* ossimBaseObjectFactory::instance()
-{
-   if(!theInstance)
-   {
-      theInstance = new ossimBaseObjectFactory;
-   }
-
-   return theInstance;
-}
-
-ossimObject* ossimBaseObjectFactory::createObject(const ossimString& typeName)const
-{
-   if(typeName == STATIC_TYPE_NAME(ossimConnectableContainer))
-   {
-      return new ossimConnectableContainer;
-   }
-
-   return (ossimObject*)NULL;
-}
-
-ossimObject* ossimBaseObjectFactory::createObject(const ossimKeywordlist& kwl,
-                                                  const char* prefix)const
-{
-   const char* type = kwl.find(prefix,
-                               ossimKeywordNames::TYPE_KW);
-   ossimString copyPrefix = prefix;
-   if(type)
-   {
-      ossimObject* object = createObject(ossimString(type));
-      if(object)
-      {
-         object->loadState(kwl, copyPrefix.c_str());
-      }
-      return object;
-   }
-   return NULL;  
-}
-
-void ossimBaseObjectFactory::getTypeNameList(std::vector<ossimString>& typeList)const
-{
-   typeList.push_back(STATIC_TYPE_NAME(ossimConnectableContainer));
-}
diff --git a/src/ossim/base/ossimCommon.cpp b/src/ossim/base/ossimCommon.cpp
deleted file mode 100644
index 8ac8e18..0000000
--- a/src/ossim/base/ossimCommon.cpp
+++ /dev/null
@@ -1,1050 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: David Burken
-//
-// Description: Common file for global functions.
-//
-//*************************************************************************
-// $Id: ossimCommon.cpp 20610 2012-02-27 12:19:25Z gpotts $
-
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimPreferences.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimDpt3d.h>
-#include <ossim/matrix/newmat.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimGpt.h>
-#include <OpenThreads/Thread>
-#include <sstream>
-
-static ossimTrace traceDebug("ossimCommon:debug");
-
-// stores a floating point nan value
-const ossim::IntFloatBitCoercion ossim::nanValue(~ossim_int64(0));
-
-std::istream& ossim::skipws(std::istream& in)
-{
-   int c = in.peek();
-   while( !in.bad() && ossim::isWhiteSpace(c))
-   {
-      in.ignore();
-      c = in.peek();
-   }
-   
-   return in;
-}
-bool ossim::isWhiteSpace(int c)
-{
-   return ( (c == ' ') || (c == '\t') || (c == '\n')|| (c == '\r') ) ;
-}
-
-ossimByteOrder ossim::byteOrder()
-{
-   union
-   {
-      short s;
-      char  c[sizeof(short)];
-   } un;
-
-   un.s = 0x0102;
-   if (un.c[0] ==  2 && un.c[1] == 1)
-   {
-      return OSSIM_LITTLE_ENDIAN;
-   }
-   else
-   {
-      return OSSIM_BIG_ENDIAN;
-   }
-}
-
-double ossim::defaultMin(ossimScalarType scalarType)
-{
-   switch(scalarType)
-   {
-      case OSSIM_UINT8:
-      {
-	return OSSIM_DEFAULT_MIN_PIX_UINT8;
-      }
-      case OSSIM_SINT8:
-      {
-	return OSSIM_DEFAULT_MIN_PIX_SINT8;
-      }
-      case OSSIM_UINT16:
-      {
-         return OSSIM_DEFAULT_MIN_PIX_UINT16;
-      }
-      case OSSIM_SINT16:
-      {
-         return OSSIM_DEFAULT_MIN_PIX_SINT16;
-      }
-      case OSSIM_USHORT11:
-      {
-         return OSSIM_DEFAULT_MIN_PIX_UINT11;
-      }
-      case OSSIM_UINT32:
-      {
-         return OSSIM_DEFAULT_MIN_PIX_UINT32;
-      }
-      case OSSIM_SINT32:
-      {
-         return OSSIM_DEFAULT_MIN_PIX_SINT32;
-      }
-      case OSSIM_FLOAT32:
-      {
-         return OSSIM_DEFAULT_MIN_PIX_FLOAT;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         return OSSIM_DEFAULT_MIN_PIX_NORM_FLOAT;
-      }
-      case OSSIM_FLOAT64:
-      {
-         return OSSIM_DEFAULT_MIN_PIX_DOUBLE;
-      }
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         return OSSIM_DEFAULT_MIN_PIX_NORM_DOUBLE;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << __FILE__ << ":" << __LINE__
-               << "\nUnhandled scalar type:  " << scalarType << std::endl;
-         }
-         break;
-      }
-   }
-   return 0.0; // Should never happen...
-}
-
-double ossim::defaultMax(ossimScalarType scalarType)
-{
-   switch(scalarType)
-   {
-      case OSSIM_UINT8:
-      {
-         return OSSIM_DEFAULT_MAX_PIX_UINT8;
-      }
-      case OSSIM_SINT8:
-      {
-         return OSSIM_DEFAULT_MAX_PIX_SINT8;
-      }
-      case OSSIM_UINT16:
-      {
-	return OSSIM_DEFAULT_MAX_PIX_UINT16;
-      }
-      case OSSIM_SINT16:
-      {
-         return OSSIM_DEFAULT_MAX_PIX_SINT16;
-      }
-      case OSSIM_USHORT11:
-      {
-         return OSSIM_DEFAULT_MAX_PIX_UINT11;
-      }
-      case OSSIM_UINT32:
-      {
-	return OSSIM_DEFAULT_MAX_PIX_UINT32;
-      }
-      case OSSIM_SINT32:
-      {
-         return OSSIM_DEFAULT_MAX_PIX_SINT32;
-      }
-      case OSSIM_FLOAT32:
-      {
-         return OSSIM_DEFAULT_MAX_PIX_FLOAT;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         return OSSIM_DEFAULT_MAX_PIX_NORM_FLOAT;
-      }
-      case OSSIM_FLOAT64:
-      {
-         return OSSIM_DEFAULT_MAX_PIX_DOUBLE;
-      }
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         return OSSIM_DEFAULT_MAX_PIX_NORM_DOUBLE;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << __FILE__ << ":" << __LINE__
-               << "\nUnhandled scalar type:  " << scalarType << std::endl;
-         }
-         break;
-      }
-   }
-   return 0.0; // Should never happen...
-}
-
-double ossim::defaultNull(ossimScalarType scalarType)
-{
-   switch(scalarType)
-   {
-      case OSSIM_UINT8:
-      {
-         return OSSIM_DEFAULT_NULL_PIX_UINT8;
-      }
-      case OSSIM_SINT8:
-      {
-         return OSSIM_DEFAULT_NULL_PIX_SINT8;
-      }
-      case OSSIM_UINT16:
-      {
-         return OSSIM_DEFAULT_NULL_PIX_UINT16;
-      }
-      case OSSIM_SINT16:
-      {
-         return OSSIM_DEFAULT_NULL_PIX_SINT16;
-      }
-      case OSSIM_USHORT11:
-      {
-         return OSSIM_DEFAULT_NULL_PIX_UINT11;
-      }
-      case OSSIM_UINT32:
-      {
-         return OSSIM_DEFAULT_NULL_PIX_UINT32;
-      }
-      case OSSIM_SINT32:
-      {
-         return OSSIM_DEFAULT_NULL_PIX_SINT32;
-      }
-      case OSSIM_FLOAT32:
-      {
-         return OSSIM_DEFAULT_NULL_PIX_FLOAT;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         return OSSIM_DEFAULT_NULL_PIX_NORM_FLOAT;
-      }
-      case OSSIM_FLOAT64:
-      {
-         return OSSIM_DEFAULT_NULL_PIX_DOUBLE;
-      }
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         return OSSIM_DEFAULT_NULL_PIX_NORM_DOUBLE;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << __FILE__ << ":" << __LINE__
-               << "\nUnhandled scalar type:  " << scalarType << std::endl;
-         }
-         break;
-      }
-    }
-
-   return 0.0; // Should never happen...
-}
-
-ossim_uint32 ossim::scalarSizeInBytes(ossimScalarType scalarType)
-{
-   switch(scalarType)
-   {
-      case OSSIM_UINT8:
-      {
-         return sizeof(ossim_uint8);
-      }
-      case OSSIM_SINT8:
-      {
-         return sizeof(ossim_sint8);
-      }
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-      {
-         return sizeof(ossim_uint16);
-      }
-      case OSSIM_SINT16:
-      {
-         return sizeof(ossim_sint16);
-      }
-      case OSSIM_UINT32:
-      {
-         return sizeof(ossim_uint32);
-      }
-      case OSSIM_SINT32:
-      {
-         return sizeof(ossim_sint32);
-      }
-      case OSSIM_FLOAT32:
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         return sizeof(ossim_float32);
-      }
-      case OSSIM_FLOAT64:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         return sizeof(ossim_float64);
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << __FILE__ << ":" << __LINE__
-               << "\nUnhandled scalar type:  " << scalarType << std::endl;
-         }
-         break;
-      }
-  }
-  
-  return 1;
-}
-
-bool ossim::isSigned(ossimScalarType scalarType)
-{
-   bool result = false;
-   switch(scalarType)
-   {
-      case OSSIM_SINT8:
-      case OSSIM_SINT16:
-      case OSSIM_SINT32:
-      case OSSIM_FLOAT32:
-      case OSSIM_FLOAT64:
-      {
-         result = true;
-         break;
-      }
-      default:
-      {
-         break;
-      }
-  }
-  return result;
-}
-
-ossim_uint32 ossim::getActualBitsPerPixel(ossimScalarType scalarType)
-{
-   ossim_uint32 actualBitsPerPixel = 0;
-   switch(scalarType)
-   {
-      case OSSIM_UINT8:
-      case OSSIM_SINT8:
-      {
-         actualBitsPerPixel = 8;
-         break;
-      }
-      case OSSIM_USHORT11:
-      {
-         actualBitsPerPixel = 11;
-         break;
-      }
-      case OSSIM_UINT16:
-      case OSSIM_SINT16:
-      {
-         actualBitsPerPixel = 16;
-         break;
-      }
-      case OSSIM_UINT32:
-      case OSSIM_SINT32:
-      case OSSIM_FLOAT32:
-      case OSSIM_CINT16:
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         actualBitsPerPixel = 32;
-         break;
-      }
-      case OSSIM_FLOAT64:
-      case OSSIM_CFLOAT32:
-      case OSSIM_CINT32:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         actualBitsPerPixel = 64;
-         break;
-      }
-      case OSSIM_CFLOAT64:
-      {
-         actualBitsPerPixel = 128;
-         
-         break;
-      }
-      default:
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << __FILE__ << ":" << __LINE__
-               << "\nUnhandled scalar type:  " << scalarType << std::endl;
-         }
-         break;
-      }
-   }
-   return actualBitsPerPixel;
-}
-
-ossim_uint32 ossim::getBitsPerPixel(ossimScalarType scalarType)
-{
-   ossim_uint32 bitsPerPixel = 0;
-   switch(scalarType)
-   {
-      case OSSIM_UINT8:
-      case OSSIM_SINT8:
-      {
-         bitsPerPixel = 8;
-         break;
-      }
-      case OSSIM_USHORT11:
-      {
-         bitsPerPixel = 16;
-         break;
-      }
-      case OSSIM_UINT16:
-      case OSSIM_SINT16:
-      {
-         bitsPerPixel = 16;
-         break;
-      }
-      case OSSIM_UINT32:
-      case OSSIM_SINT32:
-      case OSSIM_FLOAT32:
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         bitsPerPixel = 32;
-         break;
-      }
-      case OSSIM_FLOAT64:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         bitsPerPixel = 64;
-         break;
-      }
-      default:
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << __FILE__ << ":" << __LINE__
-               << "\nUnhandled scalar type:  " << scalarType << std::endl;
-         }
-         break;
-      }
-   }
-   return bitsPerPixel;
-}
-
-void ossim::defaultTileSize(ossimIpt& tileSize)
-{
-   const char* tileSizeKw = ossimPreferences::instance()->
-      findPreference("tile_size");
-
-   if(tileSizeKw)
-   {
-      std::vector<ossimString> splitArray;
-      ossimString tempString(tileSizeKw);
-      tempString.split(splitArray, " ");
-      bool hasX = true;
-    if(splitArray.size() == 2)
-      {
-         tileSize.x = splitArray[0].toInt32();
-         tileSize.y = splitArray[1].toInt32();
-      }
-      else if(splitArray.size() == 1)
-      {
-         tileSize.x = splitArray[0].toInt32();
-         tileSize.y = splitArray[0].toInt32();
-      }
-      else
-      {
-         tileSize = ossimIpt(0,0);
-      }
-      if(tileSize.x < 1)
-      {
-         tileSize.x = OSSIM_DEFAULT_TILE_WIDTH;
-         hasX = false;
-      }
-      if(tileSize.y < 1)
-      {
-         if(!hasX)
-         {
-            tileSize.y = OSSIM_DEFAULT_TILE_HEIGHT;
-         }
-         else
-         {
-            tileSize.y = tileSize.x;
-         }
-      }
-   }
-   else
-   {
-      tileSize.x = OSSIM_DEFAULT_TILE_WIDTH;
-      tileSize.y = OSSIM_DEFAULT_TILE_HEIGHT;
-   }
-}
-
-std::string ossim::convertHtmlSpecialCharactersToNormalCharacter(const std::string& src)
-{
-   ossimString result = src;
-   std::string::size_type pos = 0;
-   pos = result.find("&");
-   
-   while(pos != std::string::npos)
-   {
-      std::string::size_type size = result.size();
-      std::string test1(&result[pos], ossim::min(6, (int)(size-pos)));
-      std::string test2(&result[pos], ossim::min(5, (int)(size-pos)));
-      std::string test3(&result[pos], ossim::min(4, (int)(size-pos)));
-      
-      if(test1 == "'")
-      {
-         result = result.substitute(test1, "'");
-      }
-      else if(test1 == """)
-      {
-         result = result.substitute(test1, "\"");
-      }
-      else if(test2 == "&")
-      {
-         result = result.substitute(test2, "&");
-      }
-      else if(test3 == ">")
-      {
-         result = result.substitute(test3, ">");
-      }
-      else if(test3 == "<")
-      {
-         result = result.substitute(test3, "<");
-      }
-      pos = result.find("&", pos+1);
-   }
-   
-   return result;
-}
-
-bool ossim::matrixToHpr( ossim_float64 hpr[3], const NEWMAT::Matrix& rotation )
-{
-    //implementation converted from plib's sg.cxx
-    //PLIB - A Suite of Portable Game Libraries
-    //Copyright (C) 1998,2002  Steve Baker
-    //For further information visit http://plib.sourceforge.net
-    
-   NEWMAT::Matrix mat(rotation);
-    
-   ossimDpt3d col1(rotation[0][0], rotation[1][0], rotation[2][0]);
-   double s = col1.length();
-   
-   hpr[0] = 0.0;
-   hpr[1] = 0.0;
-   hpr[2] = 0.0;
-
-   if ( s <= 0.00001 )
-   {
-      return true;
-   }
-   
-   
-   double oneOverS = 1.0f / s;
-   for( int i = 0; i < 3; i++ )
-      for( int j = 0; j < 3; j++ )
-         mat[i][j] = rotation[j][i] * oneOverS;
-   
-   
-   hpr[1] = ossim::asind(ossim::clamp(mat[1][2], -1.0, 1.0));
-   
-   double cp = ossim::cosd(hpr[1]);
-   
-   if ( cp > -0.00001 && cp < 0.00001 )
-   {
-      double cr = ossim::clamp(mat[0][1], -1.0, 1.0);
-      double sr = ossim::clamp(-mat[2][1], -1.0, 1.0);
-      
-      hpr[0] = 0.0f;
-      hpr[2] = ossim::atan2d(sr,cr);
-   }
-   else
-   {
-      cp = 1.0 / cp;
-      double sr = ossim::clamp((-mat[0][2] * cp), -1.0,1.0);
-      double cr = ossim::clamp((mat[2][2] * cp), -1.0, 1.0);
-      double sh = ossim::clamp((-mat[1][0] * cp), -1.0, 1.0);
-      double ch = ossim::clamp((mat[1][1] * cp), -1.0, 1.0);
-      
-      if ( (sh == 0.0f && ch == 0.0f) || (sr == 0.0f && cr == 0.0f) )
-      {
-         cr = ossim::clamp(mat[0][1], -1.0, 1.0);
-         sr = ossim::clamp(-mat[2][1], -1.0, 1.0);
-         
-         hpr[0] = 0.0f;
-      }
-      else
-      {
-         hpr[0] = ossim::atan2d(sh, ch);
-      }
-      
-      hpr[2] = ossim::atan2d(sr, cr);
-   }
-   
-   hpr[0] *= -1.0;
-   return true;
-}
-
-bool ossim::matrixToHpr( ossim_float64 hpr[3],
-                  const NEWMAT::Matrix& lsrMatrix,
-                  const NEWMAT::Matrix& rotationalMatrix)
-{
-    bool result = false;
-    NEWMAT::Matrix invertLsr(lsrMatrix.i());
-   
-    hpr[0] = 0.0;
-    hpr[1] = 0.0;
-    hpr[2] = 0.0;
-    result = matrixToHpr(hpr, invertLsr*rotationalMatrix);
-    if(std::abs(hpr[0]) < FLT_EPSILON)
-    {
-       hpr[0] = 0.0;
-    }
-    if(std::abs(hpr[1]) < FLT_EPSILON)
-    {
-       hpr[1] = 0.0;
-    }
-    if(std::abs(hpr[2]) < FLT_EPSILON)
-    {
-       hpr[2] = 0.0;
-    }
-    
-    return result;
-}
-
-
-void ossim::lexQuotedTokens(const std::string& str,
-                            ossim_uint32 start,
-                            const char* whitespace,
-                            const char* quotes,
-                            std::vector<std::string>& tokens,
-                            bool& unbalancedQuotes)
-{
-   ossimREQUIRE(whitespace != NULL);
-   ossimREQUIRE(quotes != NULL);
-   ossimREQUIRE(tokens != NULL);
-   
-   const char openQuote(quotes[0]), closeQuote(quotes[1]);
-   
-   tokens.clear();
-   unbalancedQuotes = false;
-   
-   int end=0;
-   while (start < str.length())
-   {
-      if (str[start] == openQuote)
-      {
-         int openBraceCount = 1;
-         
-         if (start+1 < str.length())
-         {
-            start++;
-            if (str[start] != closeQuote)
-            {
-               //               end = start+1;
-               end = start;
-               while (static_cast<ossim_uint32>(end) < str.length() &&
-                      openBraceCount > 0)
-               {
-                  if (str[end] == openQuote)
-                     openBraceCount++;
-                  else if (str[end] == closeQuote)
-                     openBraceCount--;
-                  end++;
-               }
-            }
-            else
-            {
-               openBraceCount = 0;
-               start++;
-               end = start+1;
-            }
-         }
-         if (openBraceCount == 0)
-         {
-            tokens.push_back(str.substr(start, end-1-start));
-         }
-         else
-         {
-            unbalancedQuotes = true;
-            end = (int)str.length();
-         }
-      }
-      else if (str[start] == closeQuote)
-      {
-         unbalancedQuotes = true;
-         end = (int)str.length();
-	 
-      }
-      else
-      {
-         end = (int)str.find_first_of(whitespace, start);
-         tokens.push_back(str.substr(start, end-start));
-      }
-      
-      start = (ossim_uint32)str.find_first_not_of(whitespace, end);
-   }
-}
-
-void ossim::toStringList(ossimString& resultStringOfPoints,
-                         const std::vector<ossimDpt>& pointList, 
-                         char separator)
-{
-   ossim_uint32 idx = 0;
-   for(;idx < pointList.size();++idx)
-   {
-      ossimString pt = pointList[idx].toString();
-      if(resultStringOfPoints.empty())
-      {
-         resultStringOfPoints = pt;
-      }
-      else
-      {
-         resultStringOfPoints += (separator + pt);
-      }
-   }
-}
-
-void ossim::toStringList(ossimString& resultStringOfPoints,
-                         const std::vector<ossimIpt>& pointList, 
-                         char separator)
-{
-   ossim_uint32 idx = 0;
-   for(;idx < pointList.size();++idx)
-   {
-      ossimString pt = pointList[idx].toString();
-      if(resultStringOfPoints.empty())
-      {
-         resultStringOfPoints = pt;
-      }
-      else
-      {
-         resultStringOfPoints += (separator + pt);
-      }
-   }
-}
-
-void ossim::toStringList(ossimString& resultStringOfPoints,
-                         const std::vector<ossimGpt>& pointList, 
-                         char separator)
-{
-   ossim_uint32 idx = 0;
-   for(;idx < pointList.size();++idx)
-   {
-      ossimString pt = pointList[idx].toString();
-      if(resultStringOfPoints.empty())
-      {
-         resultStringOfPoints = pt;
-      }
-      else
-      {
-         resultStringOfPoints += (separator + pt);
-      }
-   }
-}
-
-void ossim::toVector(std::vector<ossimDpt>& result,
-                     const ossimString& stringOfPoints)
-{
-   std::vector<ossimString> splitResult;
-  
-   // let grab each point string that is surrounded by ()
-   std::istringstream in(stringOfPoints.trim());
-   ossimString currentPoint = "";
-   ossimDpt tempPoint;
-   while(!in.bad()&&!in.eof())
-   {
-      skipws(in);
-      if(in.peek() == '(')
-      {
-         currentPoint += (char)in.get();
-         skipws(in);
-         if(in.peek() == '(') in.ignore();
-         
-         while(!in.bad()&&!in.eof()&&(in.peek() != ')'))
-         {
-            currentPoint += (char)in.get();
-         }
-         if(in.good())
-         {
-            currentPoint += (char)in.get();
-            tempPoint.toPoint(currentPoint);
-            result.push_back(tempPoint);
-         }
-         currentPoint = "";
-      }
-      else 
-      {
-         in.ignore();
-      }
-   }   
-}
-
-void ossim::toVector(std::vector<ossimIpt>& result,
-                     const ossimString& stringOfPoints)
-{
-   std::vector<ossimString> splitResult;
-   
-   // let grab each point string that is surrounded by ()
-   std::istringstream in(stringOfPoints.trim());
-   ossimString currentPoint = "";
-   ossimIpt tempPoint;
-   while(!in.bad()&&!in.eof())
-   {
-      skipws(in);
-      if(in.peek() == '(')
-      {
-         currentPoint += (char)in.get();
-         skipws(in);
-         if(in.peek() == '(') in.ignore();
-         
-         while(!in.bad()&&!in.eof()&&(in.peek() != ')'))
-         {
-            currentPoint += (char)in.get();
-         }
-         if(in.good())
-         {
-            currentPoint += (char)in.get();
-            tempPoint.toPoint(currentPoint);
-            result.push_back(tempPoint);
-         }
-         currentPoint = "";
-      }
-      else 
-      {
-         in.ignore();
-      }
-   }   
-}
-void ossim::toVector(std::vector<ossimGpt>& result,
-                     const ossimString& stringOfPoints)
-{
-   std::vector<ossimString> splitResult;
-   
-   // let grab each point string that is surrounded by ()
-   std::istringstream in(stringOfPoints.trim());
-   ossimString currentPoint = "";
-   ossimGpt tempPoint;
-   while(!in.bad()&&!in.eof())
-   {
-      skipws(in);
-      if(in.peek() == '(')
-      {
-         currentPoint += (char)in.get();
-         skipws(in);
-         if(in.peek() == '(') in.ignore();
-         
-         while(!in.bad()&&!in.eof()&&(in.peek() != ')'))
-         {
-            currentPoint += (char)in.get();
-         }
-         if(in.good())
-         {
-            currentPoint += (char)in.get();
-            tempPoint.toPoint(currentPoint);
-            result.push_back(tempPoint);
-         }
-         currentPoint = "";
-      }
-      else 
-      {
-         in.ignore();
-      }
-   }   
-}
-
-bool ossim::extractSimpleValues(std::vector<ossimString>& values,
-                                const ossimString& stringOfPoints)
-{
-   std::istringstream in(stringOfPoints);
-   ossim::skipws(in);
-   bool result = true;
-   if(stringOfPoints.empty()) return result;
-   char c = in.get();
-   ossimString value = "";
-   if(c == '(')
-   {
-      c = (char)in.get();
-      while((c!=')')&&
-            (c!= '\n')&&
-            (in.good()))
-      {
-         if(c!= ',')
-         {
-            value += ossimString(c);
-         }
-         else
-         {
-            values.push_back(value);
-            value = "";
-         }
-         c = in.get();
-      }
-   }
-   if(c!= ')')
-   {
-      result = false;
-   }
-   else
-   {
-      if(!value.empty())
-      {
-         values.push_back(value);
-      }
-   }
-   
-   return result;
-}
-
-bool ossim::toSimpleVector(std::vector<ossim_uint32>& result,
-                           const ossimString& stringOfPoints)
-{
-   std::vector<ossimString> extractedValues;
-   bool resultFlag = extractSimpleValues(extractedValues, stringOfPoints);
-   if(resultFlag)
-   {
-      ossim_uint32 idx = 0;
-      ossim_uint32 size = (ossim_uint32) extractedValues.size();
-      for(idx = 0; idx < size; ++idx)
-      {
-         result.push_back(extractedValues[idx].toUInt32());
-      }
-   }
-   return resultFlag;
-}
-
-template <>
-void ossim::toSimpleStringList(ossimString& result,
-                               const std::vector<ossim_uint8>& valuesList)
-
-{
-   std::ostringstream out;
-   
-   if(!valuesList.empty())
-   {
-      ossim_uint32 idx = 0;
-      ossim_uint32 size = (ossim_uint32)(valuesList.size()-1);
-      for(idx = 0; idx < size; ++idx)
-      {
-         out << ((ossim_uint32)valuesList[idx]) << ",";
-      }
-      out << static_cast<ossim_uint32>(valuesList[size]);
-   }
-   
-   result = "("+out.str()+")";
-}
-
-bool ossim::toSimpleVector(std::vector<ossim_int32>& result,
-                           const ossimString& stringOfPoints)
-{
-   std::vector<ossimString> extractedValues;
-   bool resultFlag = extractSimpleValues(extractedValues, stringOfPoints);
-   if(resultFlag)
-   {
-      ossim_uint32 idx = 0;
-      ossim_uint32 size = (ossim_int32) extractedValues.size();
-      for(idx = 0; idx < size; ++idx)
-      {
-         result.push_back(extractedValues[idx].toInt32());
-      }
-   }
-   return resultFlag;
-}
-
-bool ossim::toSimpleVector(std::vector<ossim_uint16>& result,
-                           const ossimString& stringOfPoints)
-{
-   std::vector<ossimString> extractedValues;
-   bool resultFlag = extractSimpleValues(extractedValues, stringOfPoints);
-   if(resultFlag)
-   {
-      ossim_uint32 idx = 0;
-      ossim_uint32 size = (ossim_int32) extractedValues.size();
-      for(idx = 0; idx < size; ++idx)
-      {
-         result.push_back(extractedValues[idx].toUInt32());
-      }
-   }
-   return resultFlag;
-}
-
-bool ossim::toSimpleVector(std::vector<ossim_int16>& result,
-                           const ossimString& stringOfPoints)
-{
-   std::vector<ossimString> extractedValues;
-   bool resultFlag = extractSimpleValues(extractedValues, stringOfPoints);
-   if(resultFlag)
-   {
-      ossim_uint32 idx = 0;
-      ossim_uint32 size = (ossim_uint32) extractedValues.size();
-      for(idx = 0; idx < size; ++idx)
-      {
-         result.push_back(extractedValues[idx].toInt32());
-      }
-   }
-   return resultFlag;
-}
-
-bool ossim::toSimpleVector(std::vector<ossim_uint8>& result,
-                    const ossimString& stringOfPoints)
-{
-   std::vector<ossimString> extractedValues;
-   bool resultFlag = extractSimpleValues(extractedValues, stringOfPoints);
-   if(resultFlag)
-   {
-      ossim_uint32 idx = 0;
-      ossim_uint32 size = (ossim_uint32) extractedValues.size();
-      for(idx = 0; idx < size; ++idx)
-      {
-         result.push_back(extractedValues[idx].toUInt8());
-      }
-   }
-   return resultFlag;
-}
-
-bool ossim::toSimpleVector(std::vector<ossim_int8>& result,
-                    const ossimString& stringOfPoints)
-{
-   std::vector<ossimString> extractedValues;
-   bool resultFlag = extractSimpleValues(extractedValues, stringOfPoints);
-   if(resultFlag)
-   {
-      ossim_uint32 idx = 0;
-      ossim_uint32 size = (ossim_uint32) extractedValues.size();
-      for(idx = 0; idx < size; ++idx)
-      {
-         result.push_back(extractedValues[idx].toUInt8());
-      }
-   }
-   return resultFlag;
-}
-
-ossim_uint32 ossim::getNumberOfThreads()
-{
-   ossim_uint32 result;
-   const char* str = ossimPreferences::instance()->findPreference("ossim_threads");
-   if ( str )
-   {
-      result = ossimString(str).toUInt32();
-   }
-   else
-   {
-      result = static_cast<ossim_uint32>( OpenThreads::GetNumberOfProcessors() );
-   }
-   if ( !result )
-   {
-      result = 1;
-   }
-   return result;
-}
diff --git a/src/ossim/base/ossimConnectableDisplayListener.cpp b/src/ossim/base/ossimConnectableDisplayListener.cpp
deleted file mode 100644
index 9804bd5..0000000
--- a/src/ossim/base/ossimConnectableDisplayListener.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-
-//----------------------------------------------------------------------------
-// Copyright (c) 2004, David Burken, all rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: 
-//
-//----------------------------------------------------------------------------
-// $Id: ossimConnectableDisplayListener.cpp 9094 2006-06-13 19:12:40Z dburken $
-
-#include <ossim/base/ossimConnectableDisplayListener.h>
-#include <ossim/base/ossimConnectableObject.h>
-#include <ossim/base/ossimObjectEvents.h>
-#include <ossim/base/ossimDisplayListEvent.h>
-#include <ossim/base/ossimDisplayRefreshEvent.h>
-
-#include <ossim/base/ossimNotifyContext.h>
-
-RTTI_DEF1(ossimConnectableDisplayListener,
-          "ossimConnectableDisplayListener",
-          ossimListener);
-
-ossimConnectableDisplayListener::ossimConnectableDisplayListener()
-   : ossimListener()
-{}
-
-void ossimConnectableDisplayListener::processEvent(ossimEvent& event)
-{
-   switch(event.getId())
-   {
-      case OSSIM_EVENT_OBJECT_DESTRUCTING_ID:
-      {
-         ossimObjectDestructingEvent* eventCast =
-            static_cast<ossimObjectDestructingEvent*>(&event);
-         objectDestructingEvent(*eventCast);
-         
-         break;
-      }
-      case OSSIM_EVENT_CONNECTION_CONNECT_ID:
-      case OSSIM_EVENT_CONNECTION_DISCONNECT_ID:
-      {
-         ossimConnectionEvent* eventCast =
-            static_cast<ossimConnectionEvent*>(&event);
-         
-         connectionEvent(*eventCast);
-         if(event.getId() == OSSIM_EVENT_CONNECTION_DISCONNECT_ID)
-         {
-            if(eventCast->isInputDirection())
-            {
-               disconnectInputEvent(*eventCast);
-            }
-            else if(eventCast->isOutputDirection())
-            {
-               disconnectOutputEvent(*eventCast);
-            }
-            else
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << "ossimConnectableDisplayListener::processEvent, Direction not set\n";
-            }
-         }
-         else
-         {
-            ossimConnectionEvent* eventCast = static_cast<ossimConnectionEvent*>(&event);
-            
-            if(eventCast->isInputDirection())
-            {
-               connectInputEvent(*eventCast);
-            }
-            else if(eventCast->isOutputDirection())
-            {
-               connectOutputEvent(*eventCast);
-            }
-            else
-            {
-               ossimNotify(ossimNotifyLevel_WARN) << "ossimConnectableDisplayListener::processEvent, Direction not set\n";
-            }
-         }
-         break;
-      }
-      case OSSIM_EVENT_PROPERTY_ID:
-      {
-         ossimPropertyEvent* eventCast = static_cast<ossimPropertyEvent*>(&event);
-         propertyEvent(*eventCast);
-         break;
-      }
-      case OSSIM_EVENT_ADD_OBJECT_ID:
-      {
-         ossimContainerEvent* eventCast = static_cast<ossimContainerEvent*>(&event);
-         addObjectEvent(*eventCast);
-         break;
-      }
-      case OSSIM_EVENT_REMOVE_OBJECT_ID:
-      {
-         ossimContainerEvent* eventCast = static_cast<ossimContainerEvent*>(&event);
-         removeObjectEvent(*eventCast);
-         break;
-      }
-      case OSSIM_EVENT_REFRESH_ID:
-      {
-         ossimRefreshEvent* eventCast = static_cast<ossimRefreshEvent*>(&event);
-         refreshEvent(*eventCast);
-         break;
-      }
-      case OSSIM_EVENT_DISPLAY_LIST_ID:
-      {
-         ossimDisplayListEvent* eventCast =
-            static_cast<ossimDisplayListEvent*>(&event);
-         displayListEvent(*eventCast);
-         break;
-      }
-      case OSSIM_EVENT_DISPLAY_REFRESH_ID:
-      {
-         ossimDisplayRefreshEvent* eventCast =
-            static_cast<ossimDisplayRefreshEvent*>(&event);
-         displayRefreshEvent(*eventCast);
-         break;
-      }
-      default:
-      {
-         ossimListener::processEvent(event);
-         break;
-      }
-   }
-}
-
-void ossimConnectableDisplayListener::objectDestructingEvent(
-   ossimObjectDestructingEvent& /*event*/)
-{
-}
-
-void ossimConnectableDisplayListener::connectionEvent(
-   ossimConnectionEvent& /* event */)
-{}
-
-void ossimConnectableDisplayListener::disconnectInputEvent(
-   ossimConnectionEvent& /* event */)
-{}
-
-void ossimConnectableDisplayListener::disconnectOutputEvent(
-   ossimConnectionEvent& /* event */)
-{}
-
-void ossimConnectableDisplayListener::connectInputEvent(
-   ossimConnectionEvent& /* event */)
-{}
-
-void ossimConnectableDisplayListener::connectOutputEvent(
-   ossimConnectionEvent& /* event */)
-{}
-
-void ossimConnectableDisplayListener::propertyEvent(
-   ossimPropertyEvent& /* event */)
-{}
-
-void ossimConnectableDisplayListener::displayListEvent(ossimDisplayListEvent&)
-{}
-
-void ossimConnectableDisplayListener::displayRefreshEvent(
-   ossimDisplayRefreshEvent&)
-{}
-
-void ossimConnectableDisplayListener::addObjectEvent(
-   ossimContainerEvent& /* event */)
-{}
-
-void ossimConnectableDisplayListener::removeObjectEvent(
-   ossimContainerEvent& /* event */)
-{}
-
-void ossimConnectableDisplayListener::refreshEvent(
-   ossimRefreshEvent& /* event */)
-{}
-
diff --git a/src/ossim/base/ossimConnectableObjectListener.cpp b/src/ossim/base/ossimConnectableObjectListener.cpp
deleted file mode 100644
index 4c213e9..0000000
--- a/src/ossim/base/ossimConnectableObjectListener.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimConnectableObjectListener.cpp 19961 2011-08-16 18:10:36Z gpotts $
-
-#include <ossim/base/ossimConnectableObjectListener.h>
-#include <ossim/base/ossimConnectableObject.h>
-#include <ossim/base/ossimObjectEvents.h>
-#include <ossim/base/ossimNotifyContext.h>
-
-RTTI_DEF1(ossimConnectableObjectListener,
-          "ossimConnectableObjectListener",
-          ossimListener);
-
-void ossimConnectableObjectListener::processEvent(ossimEvent& event)
-{
-   switch(event.getId())
-   {
-      case OSSIM_EVENT_OBJECT_DESTRUCTING_ID:
-      {
-         ossimObjectDestructingEvent* eventCast = dynamic_cast<ossimObjectDestructingEvent*>(&event);
-         if(eventCast) objectDestructingEvent(*eventCast);
-         
-         break;
-      }
-      case OSSIM_EVENT_CONNECTION_CONNECT_ID:
-      case OSSIM_EVENT_CONNECTION_DISCONNECT_ID:
-      {
-         ossimConnectionEvent* eventCast = dynamic_cast<ossimConnectionEvent*>(&event);
-         
-         if(eventCast)
-         {
-            connectionEvent(*eventCast);
-         
-            if(event.getId() == OSSIM_EVENT_CONNECTION_DISCONNECT_ID)
-            {
-               if(eventCast->isInputDirection())
-               {
-                  disconnectInputEvent(*eventCast);
-               }
-               else if(eventCast->isOutputDirection())
-               {
-                  disconnectOutputEvent(*eventCast);
-               }
-               else
-               {
-                  ossimNotify(ossimNotifyLevel_WARN) << "ossimConnectableObjectListener::processEvent, Direction not set\n";
-               }
-            }
-            else
-            {
-               if(eventCast->isInputDirection())
-               {
-                  connectInputEvent(*eventCast);
-               }
-               else if(eventCast->isOutputDirection())
-               {
-                  connectOutputEvent(*eventCast);
-               }
-               else
-               {
-                  ossimNotify(ossimNotifyLevel_WARN) << "ossimConnectableObjectListener::processEvent, Direction not set\n";
-               }
-            }
-         }
-         break;
-      }
-      case OSSIM_EVENT_PROPERTY_ID:
-      {
-         ossimPropertyEvent* eventCast = dynamic_cast<ossimPropertyEvent*>(&event);
-         if(eventCast) propertyEvent(*eventCast);
-         break;
-      }
-      case OSSIM_EVENT_ADD_OBJECT_ID:
-      {
-         ossimContainerEvent* eventCast = dynamic_cast<ossimContainerEvent*>(&event);
-         if(eventCast)
-         {
-            containerEvent(*eventCast);
-            addObjectEvent(*eventCast);
-         }
-         break;
-      }
-      case OSSIM_EVENT_REMOVE_OBJECT_ID:
-      {
-         ossimContainerEvent* eventCast = dynamic_cast<ossimContainerEvent*>(&event);
-         if(eventCast)
-         {
-            containerEvent(*eventCast);
-            removeObjectEvent(*eventCast);
-         }
-         break;
-      }
-      case OSSIM_EVENT_REFRESH_ID:
-      {
-         ossimRefreshEvent* eventCast = dynamic_cast<ossimRefreshEvent*>(&event);
-         if(eventCast) refreshEvent(*eventCast);
-         break;
-      }
-      default:
-      {
-         ossimListener::processEvent(event);
-         break;
-      }
-   }
-}
diff --git a/src/ossim/base/ossimContainerEvent.cpp b/src/ossim/base/ossimContainerEvent.cpp
deleted file mode 100644
index 9c440c7..0000000
--- a/src/ossim/base/ossimContainerEvent.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimContainerEvent.cpp 19965 2011-08-16 18:12:15Z gpotts $
-
-#include <ossim/base/ossimContainerEvent.h>
-
-RTTI_DEF1(ossimContainerEvent, "ossimContainerEvent", ossimEvent);
-
-ossimContainerEvent::ossimContainerEvent(ossimObject* obj,
-                                         long id)
-   :ossimEvent(obj, id)
-{
-}
-
-void ossimContainerEvent::setObjectList(ossimObject* obj)
-{
-   m_objectList.clear();
-   m_objectList.push_back(obj);
-}
-
-void ossimContainerEvent::setObjectList(ObjectList& objects)
-{
-   m_objectList = objects;
-}
diff --git a/src/ossim/base/ossimDataObject.cpp b/src/ossim/base/ossimDataObject.cpp
deleted file mode 100644
index b1b2e19..0000000
--- a/src/ossim/base/ossimDataObject.cpp
+++ /dev/null
@@ -1,190 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimDataObject.cpp 19931 2011-08-10 11:53:25Z gpotts $
-#include <ossim/base/ossimDataObject.h>
-#include <ossim/base/ossimSource.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-
-RTTI_DEF1(ossimDataObject, "ossimDataObject", ossimObject)
-   
-ossimDataObject::ossimDataObject(ossimSource* source,
-                                 ossimDataObjectStatus status)
-   :
-      theOwner(source),
-      theDataObjectStatus(status)
-{
-}
-
-ossimDataObject::ossimDataObject(const ossimDataObject& rhs)
-   : ossimObject(),
-     theOwner(0),
-     theDataObjectStatus(rhs.theDataObjectStatus)
-{
-}
-
-ossimDataObject::~ossimDataObject()
-{
-}
-
-void ossimDataObject::setOwner(ossimSource* aSource)
-{
-   theOwner = aSource;
-}
-
-ossimSource* ossimDataObject::getOwner()
-{
-   return theOwner;
-}
-
-const ossimSource* ossimDataObject::getOwner() const
-{
-   return theOwner;
-}
-
-void ossimDataObject::setDataObjectStatus(ossimDataObjectStatus status) const
-{
-   theDataObjectStatus = status;
-}
-
-ossimDataObjectStatus ossimDataObject::getDataObjectStatus()const
-{
-   return theDataObjectStatus;
-}
-
-ossimString ossimDataObject::getDataObjectStatusString() const
-{
-   ossimString s;
-   
-   switch (theDataObjectStatus)
-   {
-      case OSSIM_NULL:
-         s = "OSSIM_NULL";
-         break;
-
-      case OSSIM_EMPTY:
-         s = "OSSIM_EMPTY";
-         break;
-
-      case OSSIM_PARTIAL:
-         s = "OSSIM_PARTIAL";
-         break;
-
-      case OSSIM_FULL:
-         s = "OSSIM_FULL";
-         break;
-         
-      case OSSIM_STATUS_UNKNOWN:
-      default:
-         s = "OSSIM_STATUS_UNKNOWN";
-         break;
-   }
-   
-   return s;
-}
-
-ossim_uint32 ossimDataObject::getObjectSizeInBytes()const
-{
-   return sizeof(theOwner);
-}
-
-bool ossimDataObject::isInitialize()const
-{
-   return (getDataObjectStatus()!=OSSIM_NULL);
-}
-
-bool ossimDataObject::operator!=(const ossimDataObject& rhs) const
-{
-   return ( theOwner               != rhs.theOwner ||
-            theDataObjectStatus    != rhs.theDataObjectStatus );
-}
-
-bool ossimDataObject::operator==(const ossimDataObject& rhs) const
-{
-   return (theOwner            == rhs.theOwner &&
-           theDataObjectStatus == rhs.theDataObjectStatus);
-}
-
-void ossimDataObject::assign(const ossimDataObject* rhs)
-{
-   if(rhs != this)
-   {
-      theOwner               = rhs->theOwner;
-      theDataObjectStatus     = rhs->theDataObjectStatus;
-   }
-}
-
-const ossimDataObject* ossimDataObject::operator=(const ossimDataObject* rhs)
-{
-   assign(rhs);
-   return this;
-}
-
-const ossimDataObject& ossimDataObject::operator=(const ossimDataObject& rhs)
-{
-   if (this != &rhs)
-   {
-      theOwner            = rhs.theOwner;
-      theDataObjectStatus = rhs.theDataObjectStatus; 
-   }
-   return *this;
-}
-
-std::ostream& ossimDataObject::print(ostream& out) const
-{
-   out << "ossimDataObject::print:";
-   
-   if (theOwner)
-   {
-      out << "\ntheOwner->getClassName():  "
-          << theOwner->getClassName()<<endl;
-   }
-   else
-   {
-      out << "\ntheOwner is null"
-          <<endl;
-   }
-   out << "theDataObjectStatus: " << getDataObjectStatusString()
-       << endl;
-
-   return out;
-}
-
-bool ossimDataObject::saveState(ossimKeywordlist& kwl, const char* prefix)const
-{
-   kwl.add(prefix, "data_object_status", getDataObjectStatusString(), true);
-   return ossimObject::saveState(kwl, prefix);
-}
-
-bool ossimDataObject::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   ossimString data_object_status = kwl.find(prefix, "data_object_status");
-   if(!data_object_status.empty())
-   {
-      data_object_status = data_object_status.upcase();
-      if(data_object_status == "OSSIM_FULL")
-      {
-         theDataObjectStatus = OSSIM_FULL;
-      }
-      else if(data_object_status == "OSSIM_PARTIAL")
-      {
-         theDataObjectStatus = OSSIM_PARTIAL;
-      }
-      else if(data_object_status == "OSSIM_EMPTY")
-      {
-         theDataObjectStatus = OSSIM_EMPTY;
-      }
-      else if(data_object_status == "OSSIM_STATUS_UNKNOWN")
-      {
-         theDataObjectStatus = OSSIM_STATUS_UNKNOWN;
-      }
-   }
-   
-   return ossimObject::loadState(kwl, prefix);
-}                     
diff --git a/src/ossim/base/ossimDate.cpp b/src/ossim/base/ossimDate.cpp
deleted file mode 100644
index 783a60a..0000000
--- a/src/ossim/base/ossimDate.cpp
+++ /dev/null
@@ -1,1077 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimDate.cpp 18270 2010-10-17 16:11:54Z dburken $
-
-#include <ossim/base/ossimDate.h>
-#include <cctype> /* for isdigit */
-#include <iomanip>
-#include <sstream>
-#include <iostream>
-
-std::ostream& operator<< (std::ostream& out, const ossimDate& src)
-{
-   return src.print(out);
-}
-
-std::ostream& operator<< (std::ostream & os, ossimLocalTm const & t)
-{
-   return t.print(os);
-}
-
-int operator== (ossimLocalTm const & t1, ossimLocalTm const & t2)
-{
-   return int(t1.compare(t2) == 0);
-}
-
-int operator!= (ossimLocalTm const & t1, ossimLocalTm const & t2)
-{
-   return int(t1.compare(t2) != 0);
-}
-
-int operator<  (ossimLocalTm const & t1, ossimLocalTm const & t2)
-{
-   return int(t1.compare(t2) < 0);
-}
-
-int operator<= (ossimLocalTm const & t1, ossimLocalTm const & t2)
-{
-   return int(t1.compare(t2) <= 0);
-}
-
-int operator>  (ossimLocalTm const & t1, ossimLocalTm const & t2)
-{
-   return int(t1.compare(t2) > 0);
-}
-
-int operator>=  (ossimLocalTm const & t1, ossimLocalTm const & t2)
-{
-   return int(t1.compare(t2) >= 0);
-}
-
-char ossimLocalTm::timech = ':';
-char ossimLocalTm::datech = '/';
-
-int ossimLocalTm::datefmt = ossimLocalTm::ossimLocalTmFormatFull;
-int ossimLocalTm::timefmt = ossimLocalTm::ossimTimeFormatInternational;
-
-
-ossimLocalTm::ossimLocalTm (time_t t)
-   :theFractionalSecond(0.0)
-{
-    if (t == 0)
-        t = time(0);
-    *(tm *)this = *localtime(&t);
-}
-
-ossimLocalTm::ossimLocalTm (tm const & t)
-   :theFractionalSecond(0.0)
-{
-    *((tm *)this) = t;
-}
-
-ossimLocalTm& ossimLocalTm::operator= (tm const & t)
-{
-    *((tm *)this) = t;
-    return *this;
-}
-
-int ossimLocalTm::compare (ossimLocalTm const & t) const
-{
-    return compare ((time_t)t);
-}
-
-int ossimLocalTm::compare (time_t const tt) const
-{
-    time_t tx = (time_t)*this;
-    return (tx == tt) ? 0 : (tx > tt) ? 1 : -1;
-}
-
-ossimLocalTm::operator time_t (void) const
-{
-    return mktime ((tm *)this);
-}
-
-int ossimLocalTm::isValid (void) const
-{
-    static int maxd[] =
-    {
-        31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
-    };
-
-    return ((tm_year > 0) &&
-            (tm_mon >= 0) && (tm_mon < 12) &&
-            (tm_mday > 0) && (tm_mday <= maxd[tm_mon]) &&
-            (tm_wday < 7) && (tm_yday < 367) &&
-            (tm_sec < 60) && (tm_min < 60) && (tm_hour < 24));
-}
-void ossimLocalTm::now()
-{
-   time_t t = time(0);
-   *this = *localtime(&t);
-}
-
-void ossimLocalTm::dSfx (std::ostream & os, int fmt) const
-{
-    if (fmt & ossimLocalTmFormatSepChar)
-        os << datech;
-    if (fmt & ossimLocalTmFormatSepSpace)
-        os << ' ';
-}
-
-void ossimLocalTm::pYear (std::ostream & os, int fmt) const
-{
-    if (fmt & ossimLocalTmFormatYear)
-    {
-        int year = tm_year;
-        int dig;
-        if (fmt & ossimLocalTmFormatYearShort)
-        {
-            dig = 2;
-            year %= 100;
-        }
-        else
-        {
-            dig = 4;
-            if (year < 200)
-                year += 1900;
-        }
-        os << std::setw((fmt & ossimLocalTmFormatPadYear) ? dig : 0);
-        os << std::setfill((fmt & ossimLocalTmFormatZeroYear) ? '0' : ' ');
-        os << year;
-        if ((fmt & ossimLocalTmFormatYearFirst))
-        {
-            fmt &= (ossimLocalTmFormatSepChar|ossimLocalTmFormatSepSpace);
-            dSfx (os, fmt);
-        }
-    }
-}
-
-void ossimLocalTm::pMonth (std::ostream & os, int fmt) const
-{
-
-    static const char * _months[] =
-    {
-        "January", "February", "March", "April",
-        "May", "June", "July", "August", "September",
-        "October", "November", "December"
-    };
-
-    if (fmt & ossimLocalTmFormatMonth)
-    {
-        int mon = (tm_mon % 12);
-        if (fmt & ossimLocalTmFormatMonText)
-        {
-            char const * tmon = _months[mon];
-            if (!(fmt & ossimLocalTmFormatPadMon))
-                os << tmon;
-            else
-                for (int x = 0; x < 3; ++x)
-                    os << tmon[x];
-        }
-        else
-        {
-            ++mon;
-            os << std::setw((fmt & ossimLocalTmFormatPadMon) ? 2 : 0);
-            os << std::setfill((fmt & ossimLocalTmFormatZeroMon) ? '0' : ' ');
-            os << mon;
-        }
-        if (((fmt & ossimLocalTmFormatYear) && !(fmt & ossimLocalTmFormatYearFirst)) ||
-            ((fmt & ossimLocalTmFormatDay) && (fmt & ossimLocalTmFormatMonFirst)))
-        {
-            fmt &= (ossimLocalTmFormatSepChar|ossimLocalTmFormatSepSpace);
-            dSfx (os, fmt);
-        }
-    }
-}
-
-
-void ossimLocalTm::pDate (std::ostream & os, int fmt) const
-{
-    if (fmt & ossimLocalTmFormatDay)
-    {
-        int day = tm_mday;
-        os << std::setw((fmt & ossimLocalTmFormatPadDay) ? 2 : 0);
-        os << std::setfill((fmt & ossimLocalTmFormatZeroDay) ? '0' : ' ');
-        os << day;
-        if (!(fmt & ossimLocalTmFormatYearFirst) || !(fmt & ossimLocalTmFormatMonFirst))
-        {
-            fmt &= (ossimLocalTmFormatSepChar|ossimLocalTmFormatSepSpace);
-            dSfx (os, fmt);
-        }
-    }
-}
-
-std::ostream& ossimLocalTm::print(std::ostream & os,
-                                    int df,
-                                    int tf) const
-{
-    std::ostringstream pTmp;
-    printDate (pTmp, df);
-    pTmp << ' ';
-    printTime (pTmp, tf);
-
-    return os << pTmp.str();
-}
-
-
-
-std::ostream& ossimLocalTm::printDate (std::ostream & os, int fmt) const
-{
-    std::ostringstream pTmp;
-
-    static const char * _days[] =
-    {
-        "Sunday", "Monday", "Tuesday", "Wednesday",
-        "Thursday", "Friday", "Saturday"
-    };
-
-    if (fmt & ossimLocalTmFormatDayOfWeek)
-    {
-        int day = tm_wday % 7;
-        char const * p = _days[day];
-        if (fmt & ossimLocalTmFormatPadDay)
-            for (int x = 0; x < 3; ++x)
-                pTmp << p[x];
-        else
-        {
-            pTmp << p;
-            if (fmt & ossimLocalTmFormatDMY)
-                pTmp << ',';
-        }
-        if ((fmt & ossimLocalTmFormatDMY) && fmt & ossimLocalTmFormatSepSpace)
-            pTmp << ' ';
-    }
-    if (fmt & ossimLocalTmFormatYearFirst)
-        pYear (pTmp, fmt);
-    if (fmt & ossimLocalTmFormatMonFirst)
-        pMonth (pTmp, fmt);
-    pDate (pTmp, fmt);
-    if (!(fmt & ossimLocalTmFormatMonFirst))
-        pMonth (pTmp, fmt);
-    if (!(fmt & ossimLocalTmFormatYearFirst))
-        pYear (pTmp, fmt);
-
-    return os << pTmp.str();
-}
-
-std::ostream& ossimLocalTm::dump(std::ostream& os) const
-{
-   // Capture the original flags.
-   std::ios_base::fmtflags f = os.flags();
-
-   os << setiosflags(ios::fixed) << setprecision(8) << setiosflags(ios::left);
-
-   os << "fr_sec:   " << setw(12) << theFractionalSecond
-      << "fractional second\n"
-      << "tm_sec:   " << setw(12) << tm_sec
-      << "seconds [0-60] (1 leap second)\n"
-      << "tm_min:   " << setw(12) << tm_min   << "minutes [0-59]\n"
-      << "tm_hour:  " << setw(12) << tm_hour  << "hours [0-23]\n"
-      << "tm_mday:  " << setw(12) << tm_mday  << "day [1-31]\n"
-      << "tm_mon:   " << setw(12) << tm_mon   << "month [0-11]\n"
-      << "tm_year:  " << setw(12) << tm_year  << "year - 1900\n"
-      << "tm_wday:  " << setw(12) << tm_wday  << "day of week [0-6]\n"
-      << "tm_yday:  " << setw(12) << tm_yday  << "days in year[0-365]\n"
-      << "tm_isdst: " << setw(12) << tm_isdst << "DST.[-1/0/1]\n"
-      << std::endl;
-
-   // Reset flags.
-   os.setf(f);
-   
-   return os;
-}
-
-void ossimLocalTm::tSfx (std::ostream & os, int fmt, char ch) const
-{
-    if (fmt & ossimTimeFormatSepAbbrev)
-        os << ch;
-    if (fmt & ossimTimeFormatSepChar)
-        os << timech;
-    if (fmt & ossimTimeFormatSepSpace)
-        os << ' ';
-}
-
-void ossimLocalTm::pHour (std::ostream & os, int fmt) const
-{
-    if (fmt & ossimTimeFormatHour)
-    {
-        int hour = tm_hour;
-        if (!(fmt & ossimTimeFormat24hour))
-        {
-            if (hour > 12)
-                hour -= 12;
-            else if (!hour && (fmt & ossimTimeFormatAmPm))
-                hour += 12;
-        }
-        os << std::setw((fmt & ossimTimeFormatPadHour) ? 2 : 0);
-        os << std::setfill((fmt & ossimTimeFormatZeroHour) ? '0' : ' ');
-        os << hour;
-        if (!(fmt & ossimTimeFormatMins))
-            fmt &= ossimTimeFormatSepAbbrev;
-        tSfx (os, fmt, 'h');
-    }
-}
-
-void ossimLocalTm::pMins (std::ostream & os, int fmt) const
-{
-    if (fmt & ossimTimeFormatMins)
-    {
-        int min = tm_min;
-        int dig = 2;
-        if (!(fmt & ossimTimeFormatHour))
-        {
-            min += (tm_hour * 60);
-            dig += 2;
-        }
-        os << std::setw((fmt & ossimTimeFormatPadMins) ? dig : 0);
-        os << std::setfill((fmt & ossimTimeFormatZeroMins) ? '0' : ' ');
-        os << min;
-        if (!(fmt & ossimTimeFormatSecs))
-            fmt &= ossimTimeFormatSepAbbrev;
-        tSfx (os, fmt, 'm');
-    }
-}
-
-void ossimLocalTm::pSecs (std::ostream & os, int fmt) const
-{
-    if (fmt & ossimTimeFormatSecs)
-    {
-        int sec = tm_sec;
-        int dig = 2;
-        if (!(fmt & (ossimTimeFormatHour|ossimTimeFormatMins)))
-        {
-            sec += ((tm_hour * 60) + tm_min) + 60;
-            dig += 3;
-        }
-        os << std::setw((fmt & ossimTimeFormatPadSecs) ? dig : 0);
-        os << std::setfill((fmt & ossimTimeFormatZeroSecs) ? '0' : ' ');
-        os << sec;
-        if (fmt & ossimTimeFormatAmPm)
-            fmt &= ~ossimTimeFormatSepChar;
-        else
-            fmt &= (ossimTimeFormatSepAbbrev|ossimTimeFormatSepSpace);
-        tSfx (os, fmt, 's');
-    }
-}
-
-std::ostream &ossimLocalTm::printTime (std::ostream & os, int fmt) const
-{
-    std::ostringstream pTmp;
-    pHour (pTmp, fmt);
-    pMins (pTmp, fmt);
-    pSecs (pTmp, fmt);
-    if (fmt & ossimTimeFormatAmPm)
-    {
-        pTmp << (tm_hour > 11 ? "pm" : "am");
-    }
-
-    return os << pTmp.str();
-}
-
-
-int ossimLocalTm::getYear()const
-{
-   int result = tm_year;
-//   if (result < 200)
-   {
-      result += 1900;
-   }
-   return result;
-}
-
-int ossimLocalTm::getShortYear()const
-{
-   return (getYear()%100);
-}
-
-int ossimLocalTm::getMonth()const
-{
-   return ((tm_mon % 12)+1); 
-}
-
-int ossimLocalTm::getDay()const
-{
-   return tm_mday;
-}
-
-double ossimLocalTm::getJulian()const
-{
-   int J = getMonth();
-   int K = getDay();
-   int I = getYear();
-
-   return (K-32075+1461*(I+4800+(J-14)/12)/4+367*(J-2-(J-14)/12*12)
-           /12-3*((I+4900+(J-14)/12)/100)/4+
-           (getHour()/24.0)+
-           (getMin()/1440.0)+
-           ((getSec()+theFractionalSecond)/86400.0));
-}
-
-double ossimLocalTm::getModifiedJulian()const
-{
-   return getJulian() - 2400000.5;
-}
-
-ossimLocalTm& ossimLocalTm::setDay(int day)
-{
-   tm_mday = day;
-   
-   return *this;
-}
-
-ossimLocalTm& ossimLocalTm::setMonth(int month)
-{
-   tm_mon = month - 1;
-
-   return *this;
-}
-
-ossimLocalTm& ossimLocalTm::setYear(int year)
-{
-   if(year < 2099)
-   {
-      tm_year = year - 1900;
-   }
-   else
-   {
-      tm_year = year;
-   }
-
-   return *this;
-}
-
-ossimLocalTm& ossimLocalTm::setDateFromJulian(double jd)
-{
-   double fractional = jd - (long)jd;
-   long l;
-   long n;
-   long i;
-   long j;
-   long k;
-
-
-   l= (long)(jd+68569);
-   n= 4*l/146097;
-   l= l-(146097*n+3)/4;
-   i= 4000*(l+1)/1461001;
-   l= l-1461*i/4+31l;
-   j= 80*l/2447;
-   k= l-2447*j/80;
-   l= j/11;
-   j= j+2-12*l;
-   i= 100*(n-49)+i+l;
-   setDay(k);
-   setMonth(j);
-   setYear(i);
-
-   setFractionalDay(fractional);
-   
-   return *this;
-}
-
-ossimLocalTm& ossimLocalTm::setDateFromModifiedJulian(double mjd)
-{
-   setDateFromJulian(mjd + 2400000.5);
-
-   return *this;
-}
-
-void ossimLocalTm::setFractionalDay(double fractionalDay)
-{
-   int h, m, s;
-   double fractionalSecond;
-   extractHmsFromFractionalDay(fractionalDay, h, m, s, fractionalSecond);
-
-   setHour(h);
-   setMin(m);
-   setSec(s);
-   setFractionalSecond(fractionalSecond);
-}
-
-void ossimLocalTm::extractHmsFromFractionalDay(double fractionalDay,
-                                               int &h,
-                                               int &m,
-                                               int &s,
-                                               double& fractionalSecond)
-{
-   fractionalDay *=24;
-   h = (int)fractionalDay;
-   fractionalDay = fractionalDay-h;
-   fractionalDay*=60;
-   m = (int)fractionalDay;
-   fractionalDay = fractionalDay-m;
-   fractionalDay*=60;
-   s = (int)fractionalDay;
-   fractionalDay = fractionalDay-s;
-   fractionalSecond = fractionalDay;
-}
-
-int ossimLocalTm::getHour()const
-{
-   return tm_hour;
-}
-
-int ossimLocalTm::getMin()const
-{
-   return tm_min;
-}
-
-int ossimLocalTm::getSec()const
-{
-   return tm_sec;
-}
-
-double ossimLocalTm::getFractionalSecond()const
-{
-   return theFractionalSecond;
-}
-
-ossimLocalTm& ossimLocalTm::setHour(int h)
-{
-   tm_hour = h;
-
-   return *this;
-}
-
-ossimLocalTm& ossimLocalTm::setMin(int m)
-{
-   tm_min = m;
-
-   return *this;
-}
-
-ossimLocalTm& ossimLocalTm::setSec(int s)
-{
-   tm_sec = s;
-
-   return *this;
-}
-
-ossimLocalTm& ossimLocalTm::setFloatSec(double s)
-{
-   tm_sec = (int)s;
-   return setFractionalSecond(s-tm_sec);
-}
-
-ossimLocalTm& ossimLocalTm::setFractionalSecond(double fractionalSecond)
-{
-   theFractionalSecond = fractionalSecond;
-
-   return *this;
-}
-
-time_t ossimLocalTm::getTicks()const
-{
-   return getEpoc();
-}
-
-time_t ossimLocalTm::getEpoc()const
-{
-   std::tm temp = *this;
-
-   return mktime(&temp);
-}
-
-void ossimLocalTm::addSeconds(ossim_float64 n)
-{
-   // use julian to help in this addition.  Julian is in days
-   setDateFromJulian(getJulian() + (n/86400.0));
-}
-
-void ossimLocalTm::addMinutes(ossim_float64 n)
-{
-   setDateFromJulian(getJulian() + (n/1440.0));
-}
-
-void ossimLocalTm::addHours(ossim_float64 n)
-{
-   setDateFromJulian(getJulian() + (n/24.0));
-}
-
-void ossimLocalTm::addDays(ossim_float64 n)
-{
-   setDateFromJulian(getJulian() + n);
-}
-
-ossim_float64 ossimLocalTm::deltaInSeconds(const ossimLocalTm& d)const
-{
-   return (getJulian()-d.getJulian())*86400.0;
-}
-
-ossim_float64 ossimLocalTm::deltaInMinutes(const ossimLocalTm& d)const
-{
-   return (getJulian()-d.getJulian())*1440.0;
-}
-
-ossim_float64 ossimLocalTm::delatInHours(const ossimLocalTm& d)const
-{
-   return (getJulian()-d.getJulian())*24;
-}
-
-ossim_float64 ossimLocalTm::deltaInDays(const ossimLocalTm& d)const
-{
-   return (getJulian()-d.getJulian());
-}
-
-ossimLocalTm ossimLocalTm::convertToGmt()const
-{
-   struct tm gmt = *this;
-#if !defined(_MSC_VER) 
-   tzset();
-#else
-   _tzset();
-#endif
-
-#if ( defined(__APPLE__) || defined(__FreeBSD__)  || defined(__OpenBSD__) )
-   gmt.tm_sec -= tm_gmtoff; // Seconds east of UTC
-#else
-   gmt.tm_sec += timezone; // Seconds west of UTC
-   if ( tm_isdst )
-   {
-      gmt.tm_sec -= 3600; // Subtract an hour.
-   }
-#endif
-   
-   time_t t = mktime(&gmt);
-   ossimLocalTm result(*localtime(&t));
-   
-   return result;
-}
-
-void ossimLocalTm::setTimeNoAdjustmentGivenEpoc(time_t ticks)
-{
-   *this = *gmtime(&ticks);
-}
-
-void ossimLocalTm::setTimeGivenEpoc(time_t ticks)
-{
-   *this = *localtime(&ticks);
-}
-
-
-static bool readIntegerFromString(ossim_int32& result,
-                                 const std::string& input,
-                                 std::string::size_type& currentPos,
-                                 int digits)
-{
-   ossimString number;
-   while((digits>0)&&
-         (currentPos < input.size()))
-   {
-      if(isdigit(input[currentPos]))
-      {
-         number += input[currentPos];
-         ++currentPos;
-         --digits;
-      }
-      else
-      {
-         return false;
-      }
-   }
-   result = number.toInt32();
-   return (digits <= 0);
-}
-
-static bool readTimeZoneOffset(ossim_int32& result,
-                               const std::string& input,
-                               std::string::size_type& currentPos)
-{
-   bool returnValue = false;
-   result = 0;
-   if(input[currentPos] == '+'||
-      input[currentPos] == '-')
-   {
-      returnValue = true;
-      ossim_int32 signMult = ((input[0] == '+')?1:-1);
-      ossim_int32 zoneMin = 0;
-      ossim_int32 zoneHour = 0;
-      ++currentPos;
-      if(readIntegerFromString(zoneHour,
-                               input,
-                               currentPos,
-                               2))
-      {
-         if(!isdigit(input[currentPos]))
-         {
-            ++currentPos; // skip :
-         }
-         if(readIntegerFromString(zoneMin,
-                                  input,
-                                  currentPos,
-                                  2))
-         {
-            result = signMult*(zoneMin*60 + zoneHour*3600);
-         }
-      }
-   }
-   
-   return returnValue;
-}
-
-bool ossimLocalTm::setIso8601(const std::string& timeString, bool shiftToGmtOffsetZero)
-{
-   ossimDate now;
-   std::string::size_type pos = 0;
-   ossim_int32 year  = 0;
-   ossim_int32 month = 0;
-   ossim_int32 day   = 0;
-   ossim_int32 timeZoneOffset = 0;
-   
-   if(timeString[0] != 'T') // make sure it's not time only
-   {
-      // look for year
-      //
-      if(readIntegerFromString(year,
-                               timeString,
-                               pos,
-                               4))
-      {
-         // retrieved the year portion
-         // now check for separator not digit
-         //
-         
-         // we at least have a year
-         // now check for others
-         setYear(year);
-         if(!isdigit(timeString[pos]))
-         {
-            // skip separator
-            ++pos;
-         }
-         if(readIntegerFromString(month,
-                                  timeString,
-                                  pos,
-                                  2))
-         
-         {
-            setMonth(month);
-            if(!isdigit(timeString[pos]))
-            {
-               // skip separator
-               ++pos;
-            }
-            if(readIntegerFromString(day,
-                                     timeString,
-                                     pos,
-                                     2))
-            {
-               setDay(day);
-            }
-         }
-      }
-      else
-      {
-         return false;
-      }
-   }
-   else // set year month day to current
-   {
-      setYear(now.getYear());
-      setMonth(now.getMonth());
-      setDay(now.getDay());
-   }
-   // check to see if we need to read time portion
-   if(timeString[pos] == 'T')
-   {
-      ++pos; // skip T character
-      ossim_int32 hours=0, minutes=0;
-      
-      if(readIntegerFromString(hours,
-                               timeString,
-                               pos,
-                               2))
-      {
-         setHour(hours);
-         
-         // now check for separator
-         if(!std::isdigit(timeString[pos]))
-         {
-            ++pos; // skip separator if present
-         }
-         if(readIntegerFromString(minutes,
-                                  timeString,
-                                  pos,
-                                  2))
-         {
-            setMin(minutes);
-            // now check for time zone if only a hour minute time
-            //
-            if(timeString[pos] == 'Z')
-            {
-               // no adjustment needed
-            }
-            else if(!readTimeZoneOffset(timeZoneOffset,
-                                       timeString,
-                                       pos))
-            {
-               double fractionalSeconds = 0.0;
-               if(!std::isdigit(timeString[pos]))
-               {
-                  ++pos;
-               }
-               std::string::size_type endPos = timeString.find_first_not_of("0123456789.", pos);
-               if(endPos == std::string::npos)
-               {
-                  fractionalSeconds = ossimString(timeString.begin()+pos,
-                                                  timeString.end()).toDouble();
-               }
-               else
-               {
-                  fractionalSeconds = ossimString(timeString.begin()+pos,
-                                                  timeString.begin()+endPos).toDouble();
-               }
-               setFloatSec(fractionalSeconds);
-               pos = endPos;
-               if(pos == std::string::npos)
-               {
-                  // we will not be too strict so if at the end then just return we got enough
-                  return true;
-               }
-               if(timeString[pos] == 'Z')
-               {
-                  // no adjustment needed
-               }
-               else
-               {
-                  readTimeZoneOffset(timeZoneOffset,
-                                          timeString,
-                                     pos);
-               }
-            }
-         }
-      }
-      else
-      {
-         // need at least hours 
-         return false;
-      }
-   }
-   else if(std::isdigit(timeString[pos]))
-   {
-      ossim_int32 hours=0, minutes=0;
-      
-      if(readIntegerFromString(hours,
-                               timeString,
-                               pos,
-                               2))
-      {
-         setHour(hours);
-         
-         // now check for separator
-         if(!std::isdigit(timeString[pos]))
-         {
-            ++pos; // skip separator if present
-         }
-         if(readIntegerFromString(minutes,
-                                  timeString,
-                                  pos,
-                                  2))
-         {
-            setMin(minutes);
-            
-            if(!readTimeZoneOffset(timeZoneOffset,
-                                  timeString,
-                                  pos))
-            {
-               double fractionalSeconds = 0.0;
-               if(!std::isdigit(timeString[pos]))
-               {
-                  ++pos;
-               }
-               std::string::size_type endPos = timeString.find_first_not_of("0123456789.", pos);
-               if(endPos == std::string::npos)
-               {
-                  fractionalSeconds = ossimString(timeString.begin()+pos,
-                                                  timeString.end()).toDouble();
-               }
-               else
-               {
-                  fractionalSeconds = ossimString(timeString.begin()+pos,
-                                                  timeString.begin()+endPos).toDouble();
-               }
-               setFloatSec(fractionalSeconds);
-               pos = endPos;
-               if(pos == std::string::npos)
-               {
-                  // we will not be too strict so if at the end then just return we got enough
-                  return true;
-               }
-               if(timeString[pos] == 'Z')
-               {
-                  // no adjustment needed
-               }
-               else
-               {
-                  readTimeZoneOffset(timeZoneOffset,
-                                     timeString,
-                                     pos);
-               }
-            }
-         }
-      }  
-   }
-   else
-   {
-      // need at least hours 
-      return false;
-   }
-   
-   if(shiftToGmtOffsetZero && (timeZoneOffset!=0))
-   {
-      addSeconds(-timeZoneOffset);
-   }
-   return true;
-}
-
-ossimRefPtr<ossimXmlNode> ossimLocalTm::saveXml()const
-{
-   ossimRefPtr<ossimXmlNode> result = new ossimXmlNode;
-
-   result->setTag("ossimDate");
-   result->addAttribute("version", "1");
-   result->addChildNode("month", ossimString::toString(getMonth()));
-   result->addChildNode("day", ossimString::toString(getDay()));
-   result->addChildNode("year", ossimString::toString(getYear()));
-   result->addChildNode("hour", ossimString::toString(getHour()));
-   result->addChildNode("minutes", ossimString::toString(getMin()));
-   result->addChildNode("seconds", ossimString::toString(getSec()));
-   result->addChildNode("fractionalSecond", ossimString::toString(getFractionalSecond()));
-   
-   return result.get();
-}
-
-bool ossimLocalTm::loadXml(ossimRefPtr<ossimXmlNode> dateNode)
-{
-   bool result = true;
-   ossimRefPtr<ossimXmlNode> month = dateNode->findFirstNode("month");
-   ossimRefPtr<ossimXmlNode> day = dateNode->findFirstNode("day");
-   ossimRefPtr<ossimXmlNode> year = dateNode->findFirstNode("year");
-   ossimRefPtr<ossimXmlNode> hour = dateNode->findFirstNode("hour");
-   ossimRefPtr<ossimXmlNode> minutes = dateNode->findFirstNode("minutes");
-   ossimRefPtr<ossimXmlNode> seconds = dateNode->findFirstNode("seconds");
-   ossimRefPtr<ossimXmlNode> fractionalSecond = dateNode->findFirstNode("fractionalSecond");
-   ossimRefPtr<ossimXmlNode> julian = dateNode->findFirstNode("julian");
-   ossimRefPtr<ossimXmlNode> modifiedJulian = dateNode->findFirstNode("modifiedJulian");
-
-   if(month.valid()&&
-      day.valid()&&
-      year.valid()&&
-      hour.valid()&&
-      minutes.valid()&&
-      seconds.valid())
-   {
-      setMonth(month->getText().toInt32());
-      setDay(day->getText().toInt32());
-      setYear(year->getText().toInt32());
-      setHour(hour->getText().toInt32());
-      setMin(minutes->getText().toInt32());
-      setSec(seconds->getText().toInt32());
-      if(fractionalSecond.valid())
-      {
-         setFractionalSecond(fractionalSecond->getText().toDouble());
-      }
-      else
-      {
-         setFractionalSecond(0.0);
-      }
-   }
-   else if(modifiedJulian.valid())
-   {
-      setDateFromModifiedJulian(modifiedJulian->getText().toDouble());
-   }
-   else if(julian.valid())
-   {
-      setDateFromJulian(julian->getText().toDouble());
-   }
-   else
-   {
-      result = false;
-   }
-
-   return result;
-}
-
-ossimDate::ossimDate(int datefmt)
-   :ossimLocalTm(0), _fmt(datefmt)
-{}
-
-ossimDate::ossimDate (ossimLocalTm const & t,
-                      int dtfmt)
-   : ossimLocalTm (t), _fmt(dtfmt)
-{}
-
-ossimDate::ossimDate (time_t t, int dtfmt)
-   : ossimLocalTm (t), _fmt(dtfmt)
-{}
-
-ossimDate::ossimDate(int month,
-                     int day,
-                     int year,
-                     int dtfmt)
-   :ossimLocalTm (0), _fmt(dtfmt)
-{
-   setMonth(month);
-   setDay(day);
-   setYear(year);
-   setHour(0);
-   setMin(0);
-   setSec(0);
-   setFractionalSecond(0.0);
-}
-
-int ossimDate::fmt(int f)
-{
-   return _fmt = f;
-}
-
-int ossimDate::fmt(void) const
-{
-   return _fmt;
-}
-
-std::ostream& ossimDate::print (std::ostream & os) const
-{
-   return printDate (os, _fmt);
-}
-
-std::ostream& operator <<(std::ostream& out, const ossimTime& src)
-{
-   return src.print(out);
-}
-ossimTime::ossimTime(int tmfmt)
-      : ossimLocalTm(0), _fmt(tmfmt)
-{
-}
-ossimTime::ossimTime(ossimTime const & t,
-                      int tmfmt)
-      : ossimLocalTm (t), _fmt(tmfmt)
-{
-}
-
-ossimTime::ossimTime(time_t t, int tmfmt)
-      : ossimLocalTm (t), _fmt(tmfmt)
-{
-}
-      
-int ossimTime::fmt(int f)
-{
-   return _fmt = f;
-}
-
-int ossimTime::fmt(void) const
-{
-   return _fmt;
-}
-
-std::ostream& ossimTime::print (std::ostream & os) const
-{
-   return printTime(os, _fmt);
-}
diff --git a/src/ossim/base/ossimDateProperty.cpp b/src/ossim/base/ossimDateProperty.cpp
deleted file mode 100644
index ff6bd1d..0000000
--- a/src/ossim/base/ossimDateProperty.cpp
+++ /dev/null
@@ -1,146 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// LICENSE: LGPL see top level license.txt
-//
-// Author: Garrett Potts (gpotts at imagelinks.com)
-//
-//*************************************************************************
-// $Id: ossimDateProperty.cpp 9094 2006-06-13 19:12:40Z dburken $
-//
-
-#include <iostream>
-#include <iomanip>
-#include <sstream>
-#include <ossim/base/ossimDateProperty.h>
-
-
-RTTI_DEF1(ossimDateProperty, "ossimDateProperty", ossimProperty);
-
-ossimDateProperty::ossimDateProperty()
-      :ossimProperty("")
-{
-   setDate(ossimDate());
-}
-
-ossimDateProperty::ossimDateProperty(const ossimString& name,
-                                     const ossimString& value)
-      :ossimProperty(name)
-{
-   setValue(value);
-}
-
-ossimDateProperty::ossimDateProperty(const ossimString& name,
-                                     const ossimLocalTm& value)
-      :ossimProperty(name),
-       theValue(value)
-{
-}
-
-ossimDateProperty::ossimDateProperty(const ossimDateProperty& src)
-   :ossimProperty(src),
-    theValue(src.theValue)
-{
-}
-
-ossimObject* ossimDateProperty::dup()const
-{
-   return new ossimDateProperty(*this);
-}
-
-void ossimDateProperty::setDate(const ossimLocalTm& localTm)
-{
-   theValue = localTm;
-}
-
-const ossimLocalTm& ossimDateProperty::getDate()const
-{
-   return theValue;
-}
-
-bool ossimDateProperty::setValue(const ossimString& value)
-{
-   if(value.trim() == "")
-   {
-      theValue = ossimDate();
-      return true;
-   }
-   bool result = value.size() == 14;
-   
-   ossimString year;
-   ossimString month;
-   ossimString day;
-   ossimString hour;
-   ossimString min;
-   ossimString sec;
-
-   if(value.size() == 14)
-   {
-      year = ossimString(value.begin(),
-                         value.begin()+4);
-      month = ossimString(value.begin()+4,
-                          value.begin()+6);
-      day = ossimString(value.begin()+6,
-                        value.begin()+8);
-      hour = ossimString(value.begin()+8,
-                        value.begin()+10);
-      min = ossimString(value.begin()+10,
-                        value.begin()+12);
-      sec = ossimString(value.begin()+12,
-                        value.begin()+14);
-
-      theValue.setYear(year.toUInt32());
-      theValue.setMonth(month.toUInt32());
-      theValue.setDay(day.toUInt32());
-      theValue.setHour(hour.toUInt32());
-      theValue.setMin(min.toUInt32());
-      theValue.setSec(sec.toUInt32());
-   }
-
-   return result;
-}
-
-void ossimDateProperty::valueToString(ossimString& valueResult)const
-{
-    std::ostringstream out;
-
-   out << std::setw(4)
-       << std::setfill('0')
-       << theValue.getYear()
-       << std::setw(2)
-       << std::setfill('0')
-       << theValue.getMonth()
-       << std::setw(2)
-       << std::setfill('0')
-       << theValue.getDay()
-       << std::setw(2)
-       << std::setfill('0')
-       << theValue.getHour()
-       << std::setw(2)
-       << std::setfill('0')
-       << theValue.getMin()
-       << std::setw(2)
-       << std::setfill('0')
-       << theValue.getSec();
-   
-   valueResult =  out.str();
-  
-}
-
-const ossimProperty& ossimDateProperty::assign(const ossimProperty& rhs)
-{
-   ossimProperty::assign(rhs);
-
-   ossimDateProperty* rhsPtr = PTR_CAST(ossimDateProperty, &rhs);
-
-   if(rhsPtr)
-   {
-      theValue = rhsPtr->theValue;
-   }
-   else
-   {
-      setValue(rhs.valueToString());
-   }
-
-   return *this;
-}
diff --git a/src/ossim/base/ossimDatumFactory.cpp b/src/ossim/base/ossimDatumFactory.cpp
deleted file mode 100644
index 43c85c0..0000000
--- a/src/ossim/base/ossimDatumFactory.cpp
+++ /dev/null
@@ -1,359 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-// Description:
-//
-// This holds the class definition of DatumFactory.
-//*******************************************************************
-//  $Id: ossimDatumFactory.cpp 19682 2011-05-31 14:21:20Z dburken $
-
-#include <ossim/base/ossimDatumFactory.h>
-#include <ossim/base/ossimEllipsoidFactory.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimThreeParamDatum.h>
-#include <ossim/base/ossimSevenParamDatum.h>
-#include <ossim/base/ossimWgs84Datum.h>
-#include <ossim/base/ossimWgs72Datum.h>
-#include <ossim/base/ossimNadconNarDatum.h>
-#include <ossim/base/ossimNadconNasDatum.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimPreferences.h>
-#include "ossimDatumFactory.inc"
-
-#include <cstring> /* for strlen */
-#include <utility> /* for std::make_pair */
-
-ossimDatumFactory* ossimDatumFactory::theInstance = 0;
-
-static ossimString WGE = "WGE";
-static ossimString WGD = "WGD";
-
-ossimDatumFactory::~ossimDatumFactory()
-{
-   deleteAll();
-   theInstance = 0;
-}
-
-ossimDatumFactory* ossimDatumFactory::instance()
-{
-   if(!theInstance) 
-   {
-      theInstance = new ossimDatumFactory;
-
-      // datum depends on the creation of an ellipsoid factory
-      // so make sure an instance exists
-      ossimEllipsoidFactory::instance();
-      theInstance->initializeDefaults();
-      theInstance->theWgs84Datum = theInstance->create(WGE);
-      theInstance->theWgs72Datum = theInstance->create(WGD);
-   }  
-   return theInstance; 
-} 
-
-const ossimDatum* ossimDatumFactory::create(const ossimString &code)const
-{
-   if ( code.size() )
-   {
-      std::map<std::string, const ossimDatum*>::const_iterator datum = theDatumTable.find(code);
-      
-      if(datum != theDatumTable.end())
-      {
-         return (*datum).second;
-      }
-
-      if(code == "NAR") // User did not set "datum_grids" so map to NAR-C.
-      {
-         datum = theDatumTable.find("NAR-C");
-         if(datum != theDatumTable.end())
-         {
-            return (*datum).second;
-         }
-      }
-      else if(code == "NAS") // User did not set "datum_grids" so map to NAS-C."
-      {
-         datum = theDatumTable.find("NAS-C");
-         if(datum != theDatumTable.end())
-         {
-            return (*datum).second;
-         }
-      }
-   }
-   
-   return 0;
-}
-
-const ossimDatum* ossimDatumFactory::create(const ossimKeywordlist& kwl, const char *prefix) const
-{
-   ossimString alpha_code = kwl.find(prefix, ossimKeywordNames::DATUM_KW);
-   if(!alpha_code.empty())
-      return create(alpha_code);
-   return 0;
-}
-
-const ossimDatum* ossimDatumFactory::create(const ossimDatum* aDatum)const
-{
-   if (aDatum)
-      return create (aDatum->code());
-   else
-      return 0;
-}
-
-std::vector<ossimString> ossimDatumFactory::getList()const
-{
-   std::map<std::string, const ossimDatum*>::const_iterator datum = theDatumTable.begin();
-   std::vector<ossimString> result;
-
-   while(datum != theDatumTable.end())
-   {
-      result.push_back(ossimString((*datum).first) );
-      ++datum;
-   }
-   return result;
-}
-
-void ossimDatumFactory::getList(std::vector<ossimString>& list) const
-{
-   std::map<std::string, const ossimDatum*>::const_iterator datum =
-      theDatumTable.begin();
-
-   while(datum != theDatumTable.end())
-   {
-      list.push_back( ossimString((*datum).first) );
-      ++datum;
-   }
-}
-
-void ossimDatumFactory::deleteAll()
-{   
-   std::map<std::string, const ossimDatum*>::iterator datum;
-
-   datum = theDatumTable.begin();
-   while(datum != theDatumTable.end())
-   {
-      delete ((*datum).second);
-      ++datum;
-   }
-
-   theDatumTable.clear();
-
-}
-
-void ossimDatumFactory::initializeDefaults()
-{
-   //make the standards
-   theDatumTable.insert(std::make_pair(WGE.string(), new ossimWgs84Datum));
-   theDatumTable.insert(std::make_pair(WGD.string(), new ossimWgs72Datum));
-
-   ossim_uint32 idx = 0;     
-   while( std::strlen(threeParamDatum[idx].theCode) )
-   {
-      if( (threeParamDatum[idx].theCode != WGE) &&
-          (threeParamDatum[idx].theCode != WGD) )
-      {
-         theDatumTable.insert(std::make_pair(std::string(threeParamDatum[idx].theCode), 
-            new ossimThreeParamDatum(threeParamDatum[idx].theCode, 
-            threeParamDatum[idx].theName,
-            ossimEllipsoidFactory::instance()->create(ossimString(threeParamDatum[idx].theEllipsoidCode)),
-            threeParamDatum[idx].theSigmaX, 
-            threeParamDatum[idx].theSigmaY, 
-            threeParamDatum[idx].theSigmaZ, 
-            threeParamDatum[idx].theWestLongitude, 
-            threeParamDatum[idx].theEastLongitude, 
-            threeParamDatum[idx].theSouthLatitude, 
-            threeParamDatum[idx].theNorthLatitude, 
-            threeParamDatum[idx].theParam1, 
-            threeParamDatum[idx].theParam2, 
-            threeParamDatum[idx].theParam3)));
-      }
-
-      ++idx;
-   }
-   idx = 0;
-   while( std::strlen(sevenParamDatum[idx].theCode) )
-   {
-      theDatumTable.insert(std::make_pair(std::string(sevenParamDatum[idx].theCode), 
-         new ossimSevenParamDatum(sevenParamDatum[idx].theCode, 
-         sevenParamDatum[idx].theName,
-         ossimEllipsoidFactory::instance()->create(ossimString(sevenParamDatum[idx].theEllipsoidCode)),
-         sevenParamDatum[idx].theSigmaX, 
-         sevenParamDatum[idx].theSigmaY, 
-         sevenParamDatum[idx].theSigmaZ, 
-         sevenParamDatum[idx].theWestLongitude, 
-         sevenParamDatum[idx].theEastLongitude, 
-         sevenParamDatum[idx].theSouthLatitude, 
-         sevenParamDatum[idx].theNorthLatitude,
-         sevenParamDatum[idx].theParam1,
-         sevenParamDatum[idx].theParam2, 
-         sevenParamDatum[idx].theParam3,
-         sevenParamDatum[idx].theParam4, 
-         sevenParamDatum[idx].theParam5,
-         sevenParamDatum[idx].theParam6, 
-         sevenParamDatum[idx].theParam7)));
-      ++idx;
-   }
-
-   // Fetch the HARN grid filenames and add these datums to the table:
-   ossimFilename file = ossimPreferences::instance()->findPreference("datum_grids");
-
-   if(file != "")
-   {
-      if(!file.isDir())
-      {
-         file = file.path();
-      }
-
-      ossimFilename fileTest1 = file.dirCat("conus.las");
-      ossimFilename fileTest2 = file.dirCat("conus.los");
-
-      if (fileTest1.exists() && fileTest2.exists())
-      {
-         theDatumTable.insert(std::make_pair(std::string("NAS"), new ossimNadconNasDatum(file)));
-         theDatumTable.insert(std::make_pair(std::string("NAR"), new ossimNadconNarDatum(file)));
-      }
-   }
-}
-
-void ossimDatumFactory::writeCStructure(const ossimFilename& /*file*/)
-{
-#if 0
-   std::ofstream out(file.c_str());
-
-   if(!out) return;
-
-   out << "typedef struct ossimSevenParamDatumType" << std::endl
-      << "{" << std::endl
-      << "   ossimString theCode;\n"
-      << "   ossimString theName;\n"
-      << "   ossimString theEllipsoidCode;\n"
-      << "   ossim_float64 theSigmaX;\n"
-      << "   ossim_float64 theSigmaY;\n"
-      << "   ossim_float64 theSigmaZ;\n"
-      << "   ossim_float64 theWestLongitude;\n"
-      << "   ossim_float64 theEastLongitude;\n"
-      << "   ossim_float64 theSouthLatitude;\n"
-      << "   ossim_float64 theNorthLatitude;\n"
-      << "   ossim_float64 theParam1;\n"
-      << "   ossim_float64 theParam2;\n"
-      << "   ossim_float64 theParam3;\n"
-      << "   ossim_float64 theParam4;\n"
-      << "   ossim_float64 theParam5;\n"
-      << "   ossim_float64 theParam6;\n"
-      << "   ossim_float64 theParam7;\n"
-      << "};\n";
-
-   out << "typedef struct ossimThreeParamDatumType" << std::endl
-      << "{" << std::endl
-      << "   ossimString theCode;\n"
-      << "   ossimString theName;\n"
-      << "   ossimString theEllipsoidCode;\n"
-      << "   ossim_float64 theSigmaX;\n"
-      << "   ossim_float64 theSigmaY;\n"
-      << "   ossim_float64 theSigmaZ;\n"
-      << "   ossim_float64 theWestLongitude;\n"
-      << "   ossim_float64 theEastLongitude;\n"
-      << "   ossim_float64 theSouthLatitude;\n"
-      << "   ossim_float64 theNorthLatitude;\n"
-      << "   ossim_float64 theParam1;\n"
-      << "   ossim_float64 theParam2;\n"
-      << "   ossim_float64 theParam3;\n"
-      << "};\n";
-   out << "#define NUMBER_OF_SEVEN_PARAM_DATUMS " << 2 << std::endl;
-   if(out)
-   {
-      std::map<std::string, const ossimDatum*>::iterator datum;
-      out << "static ossimThreeParamDatumType threeParamDatum[] = {\n";
-      datum = theDatumTable.begin();
-      ossim_uint32 datumCount = 0;
-      while(datum != theDatumTable.end())
-      {
-         bool written = false;
-         if( ((*datum).first != "NAS") &&
-            ((*datum).first != "NAR")&&
-            ((*datum).first != "EUR-7")&&
-            ((*datum).first != "OGB-7"))
-         {
-            written = true;
-            const ossimDatum* d = (*datum).second;
-
-            out << "{\"" << d->code() << "\", "
-               << "\"" << d->name() << "\", "
-               << "\"" << d->ellipsoid()->code() << "\", "
-               << d->sigmaX() << ", "
-               << d->sigmaY() << ", "
-               << d->sigmaZ() << ", "
-               << d->westLongitude()*DEG_PER_RAD << ", "
-               << d->eastLongitude()*DEG_PER_RAD << ", "
-               << d->southLatitude()*DEG_PER_RAD << ", "
-               << d->northLatitude()*DEG_PER_RAD << ", "
-               << d->param1() << ", " 
-               << d->param2() << ", " 
-               << d->param3() << "}";
-            ++datumCount;
-         }
-         ++datum;
-         if(datum != theDatumTable.end()&&written)
-         {
-
-            out << "," << std::endl;
-         }
-         else if(datum == theDatumTable.end())
-         {
-            out << std::endl;
-         }
-      }
-      out << "};" << std::endl;
-
-      out << "#define NUMBER_OF_THREE_PARAM_DATUMS " << datumCount << std::endl;
-      out << "static ossimSevenParamDatumType sevenParamDatum[] = {\n";
-      const ossimDatum* d = create("EUR-7");
-      if(d)
-      {
-         out << "{\"" << d->code() << "\", "
-            << "\"" << d->name() << "\", "
-            << "\"" << d->ellipsoid()->code() << "\", "
-            << d->sigmaX() << ", "
-            << d->sigmaY() << ", "
-            << d->sigmaZ() << ", "
-            << d->westLongitude()*DEG_PER_RAD << ", "
-            << d->eastLongitude()*DEG_PER_RAD << ", "
-            << d->southLatitude()*DEG_PER_RAD << ", "
-            << d->northLatitude()*DEG_PER_RAD << ", "
-            << d->param1() << ", " 
-            << d->param2() << ", " 
-            << d->param3() << ", "
-            << d->param4() << ", "
-            << d->param5() << ", "
-            << d->param6() << ", "
-            << d->param7() << "},\n";
-      }
-      d = create("OGB-7");
-      if(d)
-      {
-         out << "{\"" << d->code() << "\", "
-            << "\"" << d->name() << "\", "
-            << "\"" << d->ellipsoid()->code() << "\", "
-            << d->sigmaX() << ", "
-            << d->sigmaY() << ", "
-            << d->sigmaZ() << ", "
-            << d->westLongitude()*DEG_PER_RAD << ", "
-            << d->eastLongitude()*DEG_PER_RAD << ", "
-            << d->southLatitude()*DEG_PER_RAD << ", "
-            << d->northLatitude()*DEG_PER_RAD << ", "
-            << d->param1() << ", " 
-            << d->param2() << ", " 
-            << d->param3() << ", "
-            << d->param4() << ", "
-            << d->param5() << ", "
-            << d->param6() << ", "
-            << d->param7() << "}\n";
-      }
-      out << "};" << std::endl;
-   }
-#endif
-}
-
diff --git a/src/ossim/base/ossimDatumFactory.inc b/src/ossim/base/ossimDatumFactory.inc
deleted file mode 100644
index 60babb1..0000000
--- a/src/ossim/base/ossimDatumFactory.inc
+++ /dev/null
@@ -1,287 +0,0 @@
-//*************************************************************************
-// LGPL
-// 
-// Author:  Garrett Potts
-//
-//**************************************************************************
-// $Id: ossimDatumFactory.inc 16414 2010-01-26 18:10:18Z gpotts $
-
-struct ossimSevenParamDatumType
-{
-   const char* theCode;
-   const char* theName;
-   const char* theEllipsoidCode;
-   ossim_float64 theSigmaX;
-   ossim_float64 theSigmaY;
-   ossim_float64 theSigmaZ;
-   ossim_float64 theWestLongitude;
-   ossim_float64 theEastLongitude;
-   ossim_float64 theSouthLatitude;
-   ossim_float64 theNorthLatitude;
-   ossim_float64 theParam1;
-   ossim_float64 theParam2;
-   ossim_float64 theParam3;
-   ossim_float64 theParam4;
-   ossim_float64 theParam5;
-   ossim_float64 theParam6;
-   ossim_float64 theParam7;
-};
-
-struct ossimThreeParamDatumType
-{
-public:
-   const char* theCode;
-   const char* theName;
-   const char* theEllipsoidCode;
-   ossim_float64 theSigmaX;
-   ossim_float64 theSigmaY;
-   ossim_float64 theSigmaZ;
-   ossim_float64 theWestLongitude;
-   ossim_float64 theEastLongitude;
-   ossim_float64 theSouthLatitude;
-   ossim_float64 theNorthLatitude;
-   ossim_float64 theParam1;
-   ossim_float64 theParam2;
-   ossim_float64 theParam3;
-};
-
-#define NUMBER_OF_SEVEN_PARAM_DATUMS 2
-#define NUMBER_OF_THREE_PARAM_DATUMS 226
-
-static ossimThreeParamDatumType threeParamDatum[] = {
-{"ADI-A", "ADINDAN, Ethiopia", "CD", 3, 3, 3, 26, 50, -3, 25, -165, -11, 206},
-{"ADI-B", "ADINDAN, Sudan", "CD", 3, 5, 3, 15, 45, -3, 31, -161, -14, 205},
-{"ADI-C", "ADINDAN, Mali", "CD", 25, 25, 25, -20, 11, 3, 31, -123, -20, 220},
-{"ADI-D", "ADINDAN, Senegal", "CD", 25, 25, 25, -24, -5, 5, 23, -128, -18, 224},
-{"ADI-E", "ADINDAN, Burkina Faso", "CD", 25, 25, 25, -5, 8, 4, 22, -118, -14, 218},
-{"ADI-F", "ADINDAN, Cameroon", "CD", 25, 25, 25, 3, 23, -4, 19, -134, -2, 210},
-{"ADI-M", "ADINDAN, Mean", "CD", 5, 5, 3, 15, 55, -5, 31, -166, -15, 204},
-{"AFG", "AFGOOYE, Somalia", "KA", 25, 25, 25, 35, 60, -8, 19, -43, -163, 45},
-{"AIA", "ANTIGUA ISLAND ASTRO 1943", "CD", 25, 25, 25, -65, -61, 16, 20, -270, 13, 62},
-{"AIN-A", "AIN EL ABD 1970, Bahrain", "IN", 25, 25, 25, 49, 53, 24, 28, -150, -250, -1},
-{"AIN-B", "AIN EL ABD 1970, Saudi Arabia", "IN", 10, 10, 10, 28, 62, 8, 38, -143, -236, 7},
-{"AMA", "AMERICAN SAMOA 1962", "CC", 25, 25, 25, -174, -165, -19, -9, -115, 118, 426},
-{"ANO", "ANNA 1 ASTRO 1965, Cocos Is.", "AN", 25, 25, 25, 94, 99, -14, -10, -491, -22, 435},
-{"ARF-A", "ARC 1950, Botswana", "CD", 3, 5, 3, 13, 36, -33, -13, -138, -105, -289},
-{"ARF-B", "ARC 1950, Lesotho", "CD", 3, 3, 8, 21, 35, -36, -23, -125, -108, -295},
-{"ARF-C", "ARC 1950, Malawi", "CD", 9, 24, 8, 26, 42, -21, -3, -161, -73, -317},
-{"ARF-D", "ARC 1950, Swaziland", "CD", 15, 15, 15, 25, 40, -33, -20, -134, -105, -295},
-{"ARF-E", "ARC 1950, Zaire", "CD", 25, 25, 25, 4, 38, -21, 10, -169, -19, -278},
-{"ARF-F", "ARC 1950, Zambia", "CD", 21, 21, 27, 15, 40, -24, -1, -147, -74, -283},
-{"ARF-G", "ARC 1950, Zimbabwe", "CD", 5, 8, 11, 19, 39, -29, -9, -142, -96, -293},
-{"ARF-H", "ARC 1950, Burundi", "CD", 20, 20, 20, 21, 37, -11, 4, -153, -5, -292},
-{"ARF-M", "ARC 1950, Mean", "CD", 20, 33, 20, 4, 42, -36, 10, -143, -90, -294},
-{"ARS-A", "ARC 1960, Kenya", "CD", 4, 3, 3, 28, 47, -11, 8, -157, -2, -299},
-{"ARS-B", "ARC 1960, Tanzania", "CD", 6, 9, 10, 23, 47, -18, 5, -175, -23, -303},
-{"ARS-M", "ARC 1960, Kenya & Tanzania", "CD", 20, 20, 20, 23, 47, -18, 8, -160, -6, -302},
-{"ASC", "ASCENSION ISLAND 1958", "IN", 25, 25, 25, -16, -13, -9, -6, -205, 107, 53},
-{"ASM", "MONTSERRAT ISLAND ASTRO 1958", "CD", 25, 25, 25, -64, -61, 15, 18, 174, 359, 365},
-{"ASQ", "ASTRO STATION 1952, Marcus Is.", "IN", 25, 25, 25, 152, 156, 22, 26, 124, -234, -25},
-{"ATF", "ASTRO BEACON E 1845, Iwo Jima", "IN", 25, 25, 25, 140, 144, 22, 26, 145, 75, -272},
-{"AUA", "AUSTRALIAN GEODETIC 1966", "AN", 3, 3, 3, 109, 161, -46, -4, -133, -48, 148},
-{"AUG", "AUSTRALIAN GEODETIC 1984", "AN", 2, 2, 2, 109, 161, -46, -4, -134, -48, 149},
-{"BAT", "DJAKARTA, INDONESIA", "BR", 3, 3, 3, 89, 146, -16, 11, -377, 681, -50},
-{"BER", "BERMUDA 1957, Bermuda Islands", "CC", 20, 20, 20, -66, -63, 31, 34, -73, 213, 296},
-{"BID", "BISSAU, Guinea-Bissau", "IN", 25, 25, 25, -23, -7, 5, 19, -173, 253, 27},
-{"BOO", "BOGOTA OBSERVATORY, Columbia", "IN", 6, 5, 6, -85, -61, -10, 16, 307, 304, -318},
-{"BUR", "BUKIT RIMPAH, Banka & Belitung", "BR", -1, -1, -1, 103, 110, -6, 0, -384, 664, -48},
-{"CAC", "CAPE CANAVERAL, Fla & Bahamas", "CC", 3, 3, 3, -94, -12, 15, 38, -2, 151, 181},
-{"CAI", "CAMPO INCHAUSPE 1969, Arg.", "IN", 5, 5, 5, -72, -51, -58, -27, -148, 136, 90},
-{"CAO", "CANTON ASTRO 1966, Phoenix Is.", "IN", 15, 15, 15, -180, -165, -13, 3, 298, -304, -375},
-{"CAP", "CAPE, South Africa", "CD", 3, 6, 6, 10, 40, -43, -15, -136, -108, -292},
-{"CAZ", "CAMP AREA ASTRO, Camp McMurdo", "IN", -1, -1, -1, 135, 180, -85, -70, -104, -129, 239},
-{"CCD", "S-JTSK, Czech Republic", "BR", 4, 2, 3, 6, 28, 43, 56, 589, 76, 480},
-{"CGE", "CARTHAGE, Tunisia", "CD", 6, 9, 8, 2, 18, 24, 43, -263, 6, 431},
-{"CHI", "CHATHAM ISLAND ASTRO 1971, NZ", "IN", 15, 15, 15, -180, -174, -46, -42, 175, -38, 113},
-{"CHU", "CHUA ASTRO, Paraguay", "IN", 6, 9, 5, -69, -49, -33, -14, -134, 229, -29},
-{"COA", "CORREGO ALEGRE, Brazil", "IN", 5, 3, 5, -80, -29, -39, -2, -206, 172, -6},
-{"DAL", "DABOLA, Guinea", "CD", 15, 15, 15, 12, 11, 1, 19, -83, 37, 124},
-{"DID", "DECEPTION ISLAND", "CD", 20, 20, 20, 58, 62, -65, -62, 260, 12, -147},
-{"DOB", "GUX 1 ASTRO, Guadalcanal Is.", "IN", 25, 25, 25, 158, 163, -12, -8, 252, -209, -751},
-{"EAS", "EASTER ISLAND 1967", "IN", 25, 25, 25, -111, -108, -29, -26, 211, 147, 111},
-{"ENW", "WAKE-ENIWETOK 1960", "HO", 3, 3, 3, 159, 175, 1, 16, 102, 52, -38},
-{"EST", "ESTONIA, 1937", "BR", 2, 3, 3, 16, 34, 52, 65, 374, 150, 588},
-{"EUR-A", "EUROPEAN 1950, Western Europe", "IN", 3, 3, 3, -15, 25, 30, 78, -87, -96, -120},
-{"EUR-B", "EUROPEAN 1950, Greece", "IN", 25, 25, 25, 14, 34, 30, 48, -84, -95, -130},
-{"EUR-C", "EUROPEAN 1950, Norway & Finland", "IN", 3, 5, 3, -2, 38, 52, 80, -87, -95, -120},
-{"EUR-D", "EUROPEAN 1950, Portugal & Spain", "IN", 5, 6, 3, -15, 10, 30, 49, -84, -107, -120},
-{"EUR-E", "EUROPEAN 1950, Cyprus", "IN", 15, 15, 15, 31, 36, 33, 37, -104, -101, -140},
-{"EUR-F", "EUROPEAN 1950, Egypt", "IN", 6, 8, 8, 19, 42, 16, 38, -130, -117, -151},
-{"EUR-G", "EUROPEAN 1950, England, Channel", "IN", 3, 3, 3, -10, 3, 48, 62, -86, -96, -120},
-{"EUR-H", "EUROPEAN 1950, Iran", "IN", 9, 12, 11, 37, 69, 19, 47, -117, -132, -164},
-{"EUR-I", "EUROPEAN 1950, Sardinia(Italy)", "IN", 25, 25, 25, 6, 12, 37, 43, -97, -103, -120},
-{"EUR-J", "EUROPEAN 1950, Sicily(Italy)", "IN", 20, 20, 20, 10, 17, 35, 40, -97, -88, -135},
-{"EUR-K", "EUROPEAN 1950, England, Ireland", "IN", 3, 3, 3, -12, 3, 48, 62, -86, -96, -120},
-{"EUR-L", "EUROPEAN 1950, Malta", "IN", 25, 25, 25, 12, 16, 34, 38, -107, -88, -149},
-{"EUR-M", "EUROPEAN 1950, Mean (3 Param)", "IN", 3, 8, 5, 5, 33, 30, 80, -87, -98, -121},
-{"EUR-S", "EUROPEAN 1950, Iraq, Israel", "IN", -1, -1, -1, 36, 57, -38, -4, -103, -106, -141},
-{"EUR-T", "EUROPEAN 1950, Tunisia", "IN", 25, 25, 25, 2, 18, 24, 43, -112, -77, -145},
-{"EUS", "EUROPEAN 1979", "IN", 3, 3, 3, -15, 24, 30, 80, -86, -98, -119},
-{"FAH", "OMAN", "CD", 3, 3, 9, 46, 65, 10, 32, -346, -1, 224},
-{"FLO", "OBSERVATORIO MET. 1939, Flores", "IN", 20, 20, 20, -33, -30, 38, 41, -425, -169, 81},
-{"FOT", "FORT THOMAS 1955, Leeward Is.", "CD", 25, 25, 25, -64, -61, 16, 19, -7, 215, 225},
-{"GAA", "GAN 1970, Rep. of Maldives", "IN", 25, 25, 25, 71, 75, -2, 9, -133, -321, 50},
-{"GEO", "GEODETIC DATUM 1949, NZ", "IN", 5, 3, 5, 165, 180, -48, -33, 84, -22, 209},
-{"GIZ", "DOS 1968, Gizo Island", "IN", 25, 25, 25, 155, 158, -10, -7, 230, -199, -752},
-{"GRA", "GRACIOSA BASE SW 1948, Azores", "IN", 3, 3, 3, -30, -26, 37, 41, -104, 167, -38},
-{"GSE", "GUNUNG SEGARA, Indonesia", "BR", -1, -1, -1, 106, 121, -6, 9, -403, 684, 41},
-{"GUA", "GUAM 1963", "CC", 3, 3, 3, 143, 146, 12, 15, -100, -248, 259},
-{"HEN", "HERAT NORTH, Afghanistan", "IN", -1, -1, -1, 55, 81, 23, 44, -333, -222, 114},
-{"HER", "HERMANNSKOGEL, old Yugoslavia", "BR", -1, -1, -1, 7, 29, 35, 52, 682, -203, 480},
-{"HIT", "PROVISIONAL SOUTH CHILEAN 1963", "IN", 25, 25, 25, -83, -60, -64, -25, 16, 196, 93},
-{"HJO", "HJORSEY 1955, Iceland", "IN", 3, 3, 6, -24, -11, 61, 69, -73, 46, -86},
-{"HKD", "HONG KONG 1963", "IN", 25, 25, 25, 112, 116, 21, 24, -156, -271, -189},
-{"HTN", "HU-TZU-SHAN, Taiwan", "IN", 15, 15, 15, 117, 124, 20, 28, -637, -549, -203},
-{"IBE", "BELLEVUE (IGN), Efate Is.", "IN", 20, 20, 20, 167, 171, -20, -16, -127, -769, 472},
-{"IDN", "INDONESIAN 1974", "ID", 25, 25, 25, 89, 146, -16, 11, -24, -15, 5},
-{"IND-B", "INDIAN, Bangladesh", "EA", 10, 8, 12, 80, 100, 15, 33, 282, 726, 254},
-{"IND-I", "INDIAN, India & Nepal", "EC", 12, 10, 15, 62, 105, 2, 44, 295, 736, 257},
-{"IND-P", "INDIAN, Pakistan", "EA", -1, -1, -1, 55, 81, 17, 44, 283, 682, 231},
-{"INF-A", "INDIAN 1954, Thailand", "EA", 15, 6, 12, 91, 111, 0, 27, 217, 823, 299},
-{"ING-A", "INDIAN 1960, Vietnam 16N", "EA", 25, 25, 25, 101, 115, 11, 23, 198, 881, 317},
-{"ING-B", "INDIAN 1960, Con Son Island", "EA", 25, 25, 25, 104, 109, 6, 11, 182, 915, 344},
-{"INH-A", "INDIAN 1975, Thailand", "EA", 12, 10, 12, 91, 111, 0, 27, 209, 818, 290},
-{"INH-A1", "INDIAN 1975, Thailand", "EA", 3, 2, 3, 91, 111, 0, 27, 210, 814, 289},
-{"IRL", "IRELAND 1965", "AM", 3, 3, 3, -12, -4, 50, 57, 506, -122, 611},
-{"ISG", "ISTS 061 ASTRO 1968, S Georgia", "IN", 25, 25, 25, -38, -34, -56, -52, -794, 119, -298},
-{"IST", "ISTS 073 ASTRO 1969, Diego Garc", "IN", 25, 25, 25, 69, 75, -10, -4, 208, -435, -229},
-{"JOH", "JOHNSTON ISLAND 1961", "IN", 25, 25, 25, -76, -73, -46, -43, 189, -79, -202},
-{"KAN", "KANDAWALA, Sri Lanka", "EA", 20, 20, 20, 77, 85, 4, 12, -97, 787, 86},
-{"KEA", "KERTAU 1948, W Malaysia & Sing.", "EE", 10, 8, 6, 94, 112, -5, 12, -11, 851, 5},
-{"KEG", "KERGUELEN ISLAND 1949", "IN", 25, 25, 25, 139, 180, -81, -74, 145, -187, 103},
-{"KUS", "KUSAIE ASTRO 1951, Caroline Is.", "IN", 25, 25, 25, 134, 167, -1, 12, 647, 1777, -1124},
-{"LCF", "L.C. 5 ASTRO 1961, Cayman Brac", "CC", 25, 25, 25, -81, -78, 18, 21, 42, 124, 147},
-{"LEH", "LEIGON, Ghana", "CD", 2, 3, 2, -9, 7, -1, 17, -130, 29, 364},
-{"LIB", "LIBERIA 1964", "CD", 15, 15, 15, -17, -1, -1, 14, -90, 40, 88},
-{"LUZ-A", "LUZON, Phillipines", "CC", 8, 11, 9, 115, 128, 3, 23, -133, -77, -51},
-{"LUZ-B", "LUZON, Mindanao Island", "CC", 25, 25, 25, 120, 128, 4, 12, -133, -79, -72},
-{"MAS", "MASSAWA, Ethiopia", "BR", 25, 25, 25, 37, 53, 7, 25, 639, 405, 60},
-{"MER", "MERCHICH, Morocco", "CD", 5, 3, 3, -19, 5, 22, 42, 31, 146, 47},
-{"MID", "MIDWAY ASTRO 1961, Midway Is.", "IN", 25, 25, 25, -180, -169, 25, 30, 912, -58, 1227},
-{"MIK", "MAHE 1971, Mahe Is.", "CD", 25, 25, 25, 54, 57, -6, -3, 41, -220, -134},
-{"MIN-A", "MINNA, Cameroon", "CD", 25, 25, 25, 3, 23, -4, 19, -81, -84, 115},
-{"MIN-B", "MINNA, Nigeria", "CD", 3, 6, 5, -4, 20, -1, 21, -92, -93, 122},
-{"MOD", "ROME 1940, Sardinia", "IN", 25, 25, 25, 6, 12, 37, 43, -225, -65, 9},
-{"MPO", "M'PORALOKO, Gabon", "CD", 25, 25, 25, 3, 20, -10, 8, -74, -130, 42},
-{"MVS", "VITI LEVU 1916, Viti Levu Is.", "CD", 25, 25, 25, 176, 180, -20, -16, 51, 391, -36},
-{"NAH-A", "NAHRWAN, Masirah Island (Oman)", "CD", 25, 25, 25, 57, 60, 19, 22, -247, -148, 369},
-{"NAH-B", "NAHRWAN, United Arab Emirates", "CD", 25, 25, 25, 45, 62, 17, 32, -249, -156, 381},
-{"NAH-C", "NAHRWAN, Saudi Arabia", "CD", 25, 25, 20, 28, 62, 8, 38, -243, -192, 477},
-{"NAP", "NAPARIMA, Trinidad & Tobago", "IN", 15, 15, 15, -64, -59, 8, 13, -10, 375, 165},
-{"NAR-A", "NORTH AMERICAN 1983, Alaska", "RF", 2, 2, 2, -175, -135, 48, 78, 0, 0, 0},
-{"NAR-B", "NORTH AMERICAN 1983, Canada", "RF", 2, 2, 2, -150, -50, 36, 90, 0, 0, 0},
-{"NAR-C", "NORTH AMERICAN 1983, CONUS", "RF", 2, 2, 2, -135, -60, 15, 60, 0, 0, 0},
-{"NAR-D", "NORTH AMERICAN 1983, Mexico", "RF", 2, 2, 2, -122, -72, 11, 35, 0, 0, 0},
-{"NAR-E", "NORTH AMERICAN 1983, Aleutian", "RF", 5, 2, 5, -180, 180, 51, 74, -2, 0, 4},
-{"NAR-H", "NORTH AMERICAN 1983, Hawai'i", "RF", 2, 2, 2, -164, -153, 17, 24, 1, 1, -1},
-{"NAS-A", "NORTH AMERICAN 1927, Eastern US", "CC", 5, 5, 8, -102, -60, 18, 55, -9, 161, 179},
-{"NAS-B", "NORTH AMERICAN 1927, Western US", "CC", 5, 3, 3, -132, -87, 19, 55, -8, 159, 175},
-{"NAS-C", "NORTH AMERICAN 1927, CONUS", "CC", 5, 5, 6, -135, -60, 15, 60, -8, 160, 176},
-{"NAS-D", "NORTH AMERICAN 1927, Alaska", "CC", 5, 9, 5, -175, -130, 47, 78, -5, 135, 172},
-{"NAS-E", "NORTH AMERICAN 1927, Canada", "CC", 15, 11, 6, -150, -50, 36, 90, -10, 158, 187},
-{"NAS-F", "NORTH AMERICAN 1927, Alberta/BC", "CC", 8, 8, 6, -145, -105, 43, 65, -7, 162, 188},
-{"NAS-G", "NORTH AMERICAN 1927, E. Canada", "CC", 6, 6, 3, -85, -45, 38, 68, -22, 160, 190},
-{"NAS-H", "NORTH AMERICAN 1927, Man/Ont", "CC", 9, 5, 5, -108, -69, 36, 63, -9, 157, 184},
-{"NAS-I", "NORTH AMERICAN 1927, NW Terr.", "CC", 5, 5, 3, -144, -55, 43, 90, 4, 159, 188},
-{"NAS-J", "NORTH AMERICAN 1927, Yukon", "CC", 5, 8, 3, -147, -117, 53, 75, -7, 139, 181},
-{"NAS-L", "NORTH AMERICAN 1927, Mexico", "CC", 8, 6, 6, -122, -80, 10, 38, -12, 130, 190},
-{"NAS-N", "NORTH AMERICAN 1927, C. America", "CC", 8, 3, 5, -98, -77, 3, 25, 0, 125, 194},
-{"NAS-O", "NORTH AMERICAN 1927, Canal Zone", "CC", 20, 20, 20, -86, -74, 3, 15, 0, 125, 201},
-{"NAS-P", "NORTH AMERICAN 1927, Caribbean", "CC", 3, 9, 12, -87, -58, 8, 29, -3, 142, 183},
-{"NAS-Q", "NORTH AMERICAN 1927, Bahamas", "CC", 5, 3, 5, -83, -71, 19, 29, -4, 154, 178},
-{"NAS-R", "NORTH AMERICAN 1927, San Salv.", "CC", 25, 25, 25, -75, -74, 23, 26, 1, 140, 165},
-{"NAS-T", "NORTH AMERICAN 1927, Cuba", "CC", 25, 25, 25, -87, -72, 18, 25, -9, 152, 178},
-{"NAS-U", "NORTH AMERICAN 1927, Greenland", "CC", 25, 25, 25, 74, 56, 74, 81, 11, 114, 195},
-{"NAS-V", "NORTH AMERICAN 1927, Aleutian E", "CC", 6, 8, 10, -180, -161, 50, 58, -2, 152, 149},
-{"NAS-W", "NORTH AMERICAN 1927, Aleutian W", "CC", 10, 10, 10, 169, 180, 50, 58, 2, 204, 105},
-{"NSD", "NORTH SAHARA 1959, Algeria", "CD", 25, 25, 25, -15, 11, 13, 43, -186, -93, 310},
-{"NTF", "NOUVELLE TRIANGULATION DE LA FRANCE, FRANCE", "CE", 0, 0, 0, -6, 12, 41, 51, -168, -60, 320},
-{"OEG", "OLD EGYPTIAN 1907", "HE", 3, 6, 8, 19, 42, 16, 38, -130, 110, -13},
-{"OGB-A", "ORDNANCE GB 1936, England", "AA", 5, 5, 6, -12, 7, 44, 61, 371, -112, 434},
-{"OGB-B", "ORDNANCE GB 1936, Eng., Wales", "AA", 10, 10, 15, -12, 7, 44, 61, 371, -111, 434},
-{"OGB-C", "ORDNANCE GB 1936, Scotland", "AA", 10, 10, 10, -14, 4, 49, 66, 384, -111, 425},
-{"OGB-D", "ORDNANCE GB 1936, Wales", "AA", 20, 20, 20, -11, 3, 46, 59, 370, -108, 434},
-{"OGB-M", "ORDNANCE GB 1936, Mean (3 Para)", "AA", 10, 10, 15, -14, 7, 44, 66, 375, -111, 431},
-{"OHA-A", "OLD HAWAI'IAN (CC), Hawai'i", "CC", 25, 25, 25, -158, -153, 17, 22, 89, -279, -183},
-{"OHA-B", "OLD HAWAI'IAN (CC), Kauai", "CC", 20, 20, 20, -161, -158, 20, 24, 45, -290, -172},
-{"OHA-C", "OLD HAWAI'IAN (CC), Maui", "CC", 25, 25, 25, -158, -154, 19, 23, 65, -290, -190},
-{"OHA-D", "OLD HAWAI'IAN (CC), Oahu", "CC", 10, 6, 6, -160, -156, 20, 23, 58, -283, -182},
-{"OHA-M", "OLD HAWAI'IAN (CC), Mean", "CC", 25, 20, 20, -164, -153, 17, 24, 61, -285, -181},
-{"OHI-A", "OLD HAWAI'IAN (IN), Hawai'i", "IN", 25, 25, 25, -158, -153, 17, 22, 229, -222, -348},
-{"OHI-B", "OLD HAWAI'IAN (IN), Kauai", "IN", 20, 20, 20, -161, -158, 20, 24, 185, -233, -337},
-{"OHI-C", "OLD HAWAI'IAN (IN), Maui", "IN", 25, 25, 25, -158, -154, 19, 23, 205, -233, -355},
-{"OHI-D", "OLD HAWAI'IAN (IN), Oahu", "IN", 10, 6, 6, -160, -156, 20, 23, 198, -226, -347},
-{"OHI-M", "OLD HAWAI'IAN (IN), Mean", "IN", 25, 20, 20, -164, -153, 17, 24, 201, -228, -346},
-{"PHA", "AYABELLA LIGHTHOUSE, Bjibouti", "CD", 25, 25, 25, 36, 49, 5, 20, -79, -129, 145},
-{"PIT", "PITCAIRN ASTRO 1967", "IN", 25, 25, 25, -134, -119, -27, -21, 185, 165, 42},
-{"PLN", "PICO DE LAS NIEVES, Canary Is.", "IN", 25, 25, 25, -20, -12, 26, 31, -307, -92, 127},
-{"POS", "PORTO SANTO 1936, Madeira Is.", "IN", 25, 25, 25, -18, -15, 31, 35, -499, -249, 314},
-{"PRP-A", "PROV. S AMERICAN 1956, Bolivia", "IN", 5, 11, 14, -75, -51, -28, -4, -270, 188, -388},
-{"PRP-B", "PROV. S AMERICAN 1956, N Chile", "IN", 25, 25, 25, -83, -60, -45, -12, -270, 183, -390},
-{"PRP-C", "PROV. S AMERICAN 1956, S Chile", "IN", 20, 20, 20, -83, -60, -64, -20, -305, 243, -442},
-{"PRP-D", "PROV. S AMERICAN 1956, Colombia", "IN", 15, 15, 15, -85, -61, -10, 16, -282, 169, -371},
-{"PRP-E", "PROV. S AMERICAN 1956, Ecuador", "IN", 3, 5, 3, -85, -70, -11, 7, -278, 171, -367},
-{"PRP-F", "PROV. S AMERICAN 1956, Guyana", "IN", 6, 14, 5, -67, -51, -4, 14, -298, 159, -369},
-{"PRP-G", "PROV. S AMERICAN 1956, Peru", "IN", 6, 8, 12, -87, -63, -24, 5, -279, 175, -379},
-{"PRP-H", "PROV. S AMERICAN 1956, Venez", "IN", 9, 14, 15, -79, -54, -5, 18, -295, 173, -371},
-{"PRP-M", "PROV. S AMERICAN 1956, Mean", "IN", 17, 27, 27, -87, -51, -64, 18, -288, 175, -376},
-{"PTB", "POINT 58, Burkina Faso & Niger", "CD", 25, 25, 25, -15, 25, 0, 10, -106, -129, 165},
-{"PTN", "POINT NOIRE 1948", "CD", 25, 25, 25, 5, 25, -11, 10, -148, 51, -291},
-{"PUK", "PULKOVO 1942, Russia", "KA", -1, -1, -1, -180, 180, 36, 89, 28, -130, -95},
-{"PUR", "PUERTO RICO & Virgin Is.", "CC", 3, 3, 3, -69, -63, 16, 20, 11, 72, -101},
-{"QAT", "QATAR NATIONAL", "IN", 20, 20, 20, 45, 57, 19, 32, -128, -283, 22},
-{"QUO", "QORNOQ, South Greenland", "IN", 25, 25, 32, -77, -7, 57, 85, 164, 138, -189},
-{"REU", "REUNION, Mascarene Is.", "IN", 25, 25, 25, 47, 65, -27, -12, 94, -948, -1262},
-{"SAE", "SANTO (DOS) 1965", "IN", 22, 25, 25, 160, 169, -17, -13, 170, 42, 84},
-{"SAN-A", "SOUTH AMERICAN 1969, Argentina", "SA", 5, 5, 5, -76, -47, -62, -23, -62, -1, -37},
-{"SAN-B", "SOUTH AMERICAN 1969, Bolivia", "SA", 15, 15, 15, -75, -51, -28, -4, -61, 2, -48},
-{"SAN-C", "SOUTH AMERICAN 1969, Brazil", "SA", 3, 5, 5, -80, -29, -39, -2, -60, -2, -41},
-{"SAN-D", "SOUTH AMERICAN 1969, Chile", "SA", 15, 8, 11, -83, -60, -64, -12, -75, -1, -44},
-{"SAN-E", "SOUTH AMERICAN 1969, Colombia", "SA", 6, 6, 5, -85, -61, -10, 16, -44, 6, -36},
-{"SAN-F", "SOUTH AMERICAN 1969, Ecuador", "SA", 3, 3, 3, -85, -70, -11, 7, -48, 3, -44},
-{"SAN-G", "SOUTH AMERICAN 1969, Guyana", "SA", 9, 5, 5, -67, -51, -4, 14, -53, 3, -47},
-{"SAN-H", "SOUTH AMERICAN 1969, Paraguay", "SA", 15, 15, 15, -69, -49, -33, -14, -61, 2, -33},
-{"SAN-I", "SOUTH AMERICAN 1969, Peru", "SA", 5, 5, 5, -87, -63, -24, 5, -58, 0, -44},
-{"SAN-J", "SOUTH AMERICAN 1969, Baltra", "SA", 25, 25, 25, -92, -89, -2, 1, -47, 26, -42},
-{"SAN-K", "SOUTH AMERICAN 1969, Trinidad", "SA", 25, 25, 25, -68, -55, 4, 17, -45, 12, -33},
-{"SAN-L", "SOUTH AMERICAN 1969, Venezuela", "SA", 3, 6, 3, -79, -54, -5, 18, -45, 8, -33},
-{"SAN-M", "SOUTH AMERICAN 1969, Mean", "SA", 15, 6, 9, -90, -25, -65, -50, -57, 1, -41},
-{"SAO", "SAO BRAZ, Santa Maria Is.", "IN", 25, 25, 25, -27, -23, 35, 39, -203, 141, 53},
-{"SAP", "SAPPER HILL 1943, E Falkland Is", "IN", 1, 1, 1, -61, -56, -54, -50, -355, 21, 72},
-{"SCK", "SCHWARZECK, Namibia", "BN", 20, 20, 20, 5, 31, -35, -11, 616, 97, -251},
-{"SGM", "SELVAGEM GRADE 1938, Salvage Is", "IN", 25, 25, 25, -18, -14, 28, 32, -289, -124, 60},
-{"SHB", "ASTRO DOS 71/4, St. Helena Is.", "IN", 25, 25, 25, -7, -4, -18, -14, -320, 550, -494},
-{"SOA", "SOUTH ASIA, Singapore", "FA", 25, 25, 25, 102, 106, 0, 3, 7, -10, -26},
-{"SPK-A", "S-42 (PULKOVO 1942), Hungary", "KA", 2, 2, 2, 11, 29, 40, 54, 28, -121, -77},
-{"SPK-B", "S-42 (PULKOVO 1942), Poland", "KA", 4, 2, 4, 8, 30, 43, 60, 23, -124, -82},
-{"SPK-C", "S-42 (PK42) Former Czechoslov.", "KA", 3, 3, 2, 6, 28, 42, 57, 26, -121, -78},
-{"SPK-D", "S-42 (PULKOVO 1942), Latvia", "KA", 2, 2, 2, 15, 34, 50, 64, 24, -124, -82},
-{"SPK-E", "S-42 (PK 1942), Kazakhstan", "KA", 25, 25, 25, 41, 93, 35, 62, 15, -130, -84},
-{"SPK-F", "S-42 (PULKOVO 1942), Albania", "KA", 3, 3, 3, 14, 26, 34, 48, 24, -130, -92},
-{"SPK-G", "S-42 (PULKOVO 1942), Romania", "KA", 3, 5, 3, 15, 35, 38, 54, 28, -121, -77},
-{"SRL", "SIERRA LEONE 1960", "CD", 15, 15, 15, -19, -4, 1, 16, -88, 4, 101},
-{"TAN", "TANANARIVE OBSERVATORY 1925", "IN", -1, -1, -1, 40, 53, -34, -8, -189, -242, -91},
-{"TDC", "TRISTAN ASTRO 1968", "IN", 25, 25, 25, -14, -11, -39, -36, -632, 438, -609},
-{"TIL", "TIMBALAI 1948, Brunei & E Malay", "EA", 10, 10, 12, 101, 125, -5, 15, -679, 669, -48},
-{"TOY-A", "TOKYO, Japan", "BR", 8, 5, 8, 119, 156, 19, 51, -148, 507, 685},
-{"TOY-B", "TOKYO, South Korea", "BR", 8, 5, 8, 120, 139, 27, 45, -146, 507, 687},
-{"TOY-B1", "TOKYO, South Korea", "BR", 2, 2, 2, 120, 139, 27, 45, -147, 506, 687},
-{"TOY-C", "TOKYO, Okinawa", "BR", 20, 5, 20, 119, 134, 19, 31, -158, 507, 676},
-{"TOY-M", "TOKYO, Mean", "BR", 20, 5, 20, 120, 155, 23, 53, -148, 507, 685},
-{"TRN", "ASTRO TERN ISLAND (FRIG) 1961", "IN", 25, 25, 25, -166, -166, 22, 26, 114, -116, -333},
-{"VOI", "VOIROL 1874, Algeria", "CD", -1, -1, -1, -15, 11, 13, 43, -73, -247, 227},
-{"VOR", "VOIROL 1960, Algeria", "CD", 25, 25, 25, -15, 11, 13, 43, -123, -206, 219},
-{"WAK", "WAKE ISLAND ASTRO 1952", "IN", 25, 25, 25, -176, -171, 17, 21, 276, -57, 149},
-{"WGD", "World Geodetic System 1972", "WD", 0, 0, 0, -180.0, 180.0, -90, 90, 0, 0, 0},
-{"WGE", "World Geodetic System 1984", "WE", 0, 0, 0, -180.0, 180.0, -90, 90, 0, 0, 0},
-{"YAC", "YACARE, Uruguay", "IN", -1, -1, -1, -65, -47, -40, -25, -155, 171, 37},
-{"ZAN", "ZANDERIJ, Suriname", "IN", 5, 5, 8, -76, -47, -10, 20, -265, 120, -358},
-{"6055", "Popular Visualisation", "7059", 0, 0, 0, -180.0, 180.0, -85, 85, 0, 0, 0},
-{"", "", "", 0, 0, 0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0}
-};
-
-static ossimSevenParamDatumType sevenParamDatum[] = {
-{"EUR-7", "EUROPEAN 1950, Mean (7 Param)", "IN", 0, 0, 0, -180, 180, -90, 90, -102, -102, -129, 2.00228e-06, -8.92057e-07, 1.86653e-06, 2.4664e-06},
-{"OGB-7", "ORDNANCE GB 1936, Mean (7 Para)", "AA", 0, 0, 0, -180, 180, -90, 90, 446, -99, 544, -4.58149e-06, -1.26536e-06, -2.10894e-06, -2.08927e-05},
-{"", "", "", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
-};
diff --git a/src/ossim/base/ossimDatumFactoryRegistry.cpp b/src/ossim/base/ossimDatumFactoryRegistry.cpp
deleted file mode 100644
index fdffdaa..0000000
--- a/src/ossim/base/ossimDatumFactoryRegistry.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file
-//
-// Author:  David Burken
-//
-// Description: Class definition of Registry (singleton) for datum factories.
-//
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/base/ossimDatumFactoryRegistry.h>
-#include <ossim/base/ossimDatumFactory.h>
-#include <ossim/base/ossimEpsgDatumFactory.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimString.h>
-
-ossimDatumFactoryRegistry* ossimDatumFactoryRegistry::theInstance = 0;
-
-ossimDatumFactoryRegistry::~ossimDatumFactoryRegistry()
-{
-}
-
-ossimDatumFactoryRegistry* ossimDatumFactoryRegistry::instance()
-{
-   if (!theInstance)
-   {
-      theInstance =  new ossimDatumFactoryRegistry;
-   }
-   return theInstance;
-}
-
-void ossimDatumFactoryRegistry::registerFactory(
-   ossimDatumFactoryInterface* factory)
-{
-   if (factory)
-   {
-      theFactoryList.push_back(factory);
-   }
-}
-
-const ossimDatum* ossimDatumFactoryRegistry::create(
-   const ossimString &code)const
-{
-   const ossimDatum* result = 0;
-
-   std::vector<ossimDatumFactoryInterface*>::const_iterator i =
-      theFactoryList.begin();
-
-   while (i != theFactoryList.end())
-   {
-      result = (*i)->create(code);
-      if (result)
-      {
-         break;
-      }
-      ++i; // go to next factory
-   }
-   return result;
-}
-
-const ossimDatum* ossimDatumFactoryRegistry::create(const ossimKeywordlist& kwl, 
-                                                    const char *prefix)const
-{
-   const ossimDatum* result = 0;
-   std::vector<ossimDatumFactoryInterface*>::const_iterator i = theFactoryList.begin();
-
-   while (i != theFactoryList.end())
-   {
-      result = (*i)->create(kwl, prefix);
-      if (result)
-         return result;
-
-      ++i; // go to next factory
-   }
-   return result;
-}
-
-void ossimDatumFactoryRegistry::getList(std::vector<ossimString>& list) const
-{
-   std::vector<ossimDatumFactoryInterface*>::const_iterator i =
-      theFactoryList.begin();
-   while (i != theFactoryList.end())
-   {
-      (*i)->getList(list);
-      ++i;
-   }
-}
-
-ossimDatumFactoryRegistry::ossimDatumFactoryRegistry()
-   : theFactoryList()
-{
-   registerFactory(ossimDatumFactory::instance());
-   registerFactory(ossimEpsgDatumFactory::instance());
-}
diff --git a/src/ossim/base/ossimDblGrid.cpp b/src/ossim/base/ossimDblGrid.cpp
deleted file mode 100644
index 99ddbe1..0000000
--- a/src/ossim/base/ossimDblGrid.cpp
+++ /dev/null
@@ -1,1220 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// AUTHOR:  Oscar Kramer (okramer at imagelinks.com)
-//
-// DESCRIPTION:
-//   Contains implementation of class ossimDblGrid. This class maintains
-//   a regular grid of floating point (double) values. Access methods to the
-//   grid include interpolation between grid nodes. Capability is included
-//   to address the grid in an arbitrary, floating-point x, y coordinate
-//   system. 
-//
-//*****************************************************************************
-//  $Id: ossimDblGrid.cpp 20204 2011-11-04 15:12:28Z dburken $
-
-#include <cstring>
-#include <climits>
-#include <iostream>
-using namespace std;
-
-#include <ossim/base/ossimDblGrid.h>
-#include <ossim/base/ossimDrect.h>
-
-//***
-// Define Trace flags for use within this file:
-//***
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimNotifyContext.h>
-
-static ossimTrace traceExec  ("ossimDblGrid:exec");
-static ossimTrace traceDebug ("ossimDblGrid:debug");
-
-static const ossimString MAGIC_NUMBER ("OSSIM_DBL_GRID");
-static const int   MAX_LENGTH_DESCR = 80;
-
-/*!****************************************************************************
-*  DEFAULT CONSTRUCTOR: ossimDblGrid
-*  
-*****************************************************************************/
-ossimDblGrid::ossimDblGrid()
-:
-theGridData       (0),
-theSize           (0, 0),
-theOrigin         (0.0, 0.0),
-theSpacing        (0.0, 0.0),
-theMinValue       (OSSIM_DEFAULT_MIN_PIX_DOUBLE),
-theMaxValue       (OSSIM_DEFAULT_MAX_PIX_DOUBLE),
-theNullValue      (OSSIM_DEFAULT_NULL_PIX_DOUBLE),
-theMeanIsComputed (false),
-theExtrapIsEnabled (true),
-theDomainType     (CONTINUOUS)
-{ }
-
-
-/*!****************************************************************************
-*  COPY CONSTRUCTOR: ossimDblGrid
-*  
-*****************************************************************************/
-ossimDblGrid::ossimDblGrid(const ossimDblGrid&  source)
-:
-theGridData   (0),
-theMinValue   (OSSIM_DEFAULT_MIN_PIX_DOUBLE),
-theMaxValue   (OSSIM_DEFAULT_MAX_PIX_DOUBLE),
-theExtrapIsEnabled (true),
-theDomainType (CONTINUOUS)
-{
-   static const char MODULE[] = "ossimDblGrid Constructor";
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering...\n";
-
-   *this = source;
-   /*!
-   * Allocate mem for the grid, and initialize:
-   */
-   //    int buflen = theSize.x * theSize.y;
-   //    theGridData = new double [buflen];
-
-   //    for (int i=0; i<buflen; i++)
-   //       theGridData[i] = source.theGridData[i];
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";
-}
-
-/*!****************************************************************************
-*  CONSTRUCTOR: ossimDblGrid
-*  
-*****************************************************************************/
-ossimDblGrid::ossimDblGrid(const ossimIpt&  size, 
-                           const ossimDpt&  origin,
-                           const ossimDpt&  spacing,
-                           double           null_value)
-                           :
-theGridData   (0),
-theMinValue   (OSSIM_DEFAULT_MIN_PIX_DOUBLE),
-theMaxValue   (OSSIM_DEFAULT_MAX_PIX_DOUBLE),
-theExtrapIsEnabled (true),
-theDomainType (CONTINUOUS)
-{
-   static const char MODULE[] = "ossimDblGrid Constructor";
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering...\n";
-
-   initialize(size, origin, spacing, null_value);
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";
-}
-
-/*!****************************************************************************
-*  CONSTRUCTOR: ossimDblGrid
-*  
-*****************************************************************************/
-ossimDblGrid::ossimDblGrid(const ossimDrect&  rect, 
-                           const ossimDpt&    spacing,
-                           double             null_value)
-                           :
-theGridData   (0),
-theMinValue   (OSSIM_DEFAULT_MIN_PIX_DOUBLE),
-theMaxValue   (OSSIM_DEFAULT_MAX_PIX_DOUBLE),
-theExtrapIsEnabled (true),
-theDomainType (CONTINUOUS)
-{
-   static const char MODULE[] = "ossimDblGrid Constructor";
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering...\n";
-
-   ossimIpt size ((int) (rect.width()/spacing.x)  + 1,
-      (int) (rect.height()/spacing.y) + 1);
-
-   initialize(size, rect.ul(), spacing, null_value);
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_WARN) << MODULE << " returning...\n";
-}
-
-//*****************************************************************************
-//  DESTRUCTOR: ~ossimDblGrid()
-//  
-//*****************************************************************************
-ossimDblGrid::~ossimDblGrid()
-{
-   if(theGridData)
-   {
-      delete [] theGridData;
-      theGridData = NULL;
-   }
-}
-
-//*****************************************************************************
-//  METHOD: ossimDblGrid::initialize()
-//  
-//  Permits initialization after construction
-//  
-//*****************************************************************************
-void ossimDblGrid::initialize(const ossimIpt&  size, 
-                              const ossimDpt&  origin,
-                              const ossimDpt&  spacing,
-                              double           null_value)
-{
-   static const char MODULE[] = "ossimDblGrid::initialize()";
-   if (traceExec())  ossimNotify(ossimNotifyLevel_WARN) << MODULE << " entering...\n";
-
-   //***
-   // Delete any existing grid:
-   //***
-   if (theGridData)
-   {
-      delete [] theGridData;
-      theGridData = 0;
-   }
-
-   //***
-   // Initialize data members:
-   //***
-   theSize           = size;
-   theOrigin         = origin;
-   theSpacing        = spacing;
-   theNullValue      = null_value;
-   theMinValue       = OSSIM_DEFAULT_MIN_PIX_DOUBLE;
-   theMaxValue       = OSSIM_DEFAULT_MAX_PIX_DOUBLE;
-   theMeanIsComputed = false;
-
-   /*!
-   * Allocate mem for the grid, and initialize:
-   */
-   ossim_uint32 buflen = theSize.x * theSize.y;
-   if(buflen > 0)
-   {
-      theGridData = new double [buflen];
-
-      for (ossim_uint32 i=0; i<buflen; i++)
-         theGridData[i] = theNullValue;
-   }   
-   if (traceExec())  ossimNotify(ossimNotifyLevel_WARN) << MODULE << " returning...\n";
-
-   return;
-}
-
-//*****************************************************************************
-//  METHOD: ossimDblGrid::initialize()
-//  
-//  Permits initialization after construction
-//  
-//*****************************************************************************
-void ossimDblGrid::initialize(const ossimDrect&  uv_rect, 
-                              const ossimDpt&    spacing,
-                              double null_value)
-{
-   static const char MODULE[] = "ossimDblGrid::initialize()";
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering...\n";
-
-   ossimIpt size ((int) (uv_rect.width()/spacing.x)  + 1,
-      (int) (uv_rect.height()/spacing.y) + 1);
-
-   initialize(size, uv_rect.ul(), spacing, null_value);
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";
-   return;
-}
-
-//**************************************************************************************************
-void ossimDblGrid::deallocate()
-{
-   if(theGridData)
-   {
-      delete [] theGridData;
-      theGridData = 0;
-   }
-   theSize = ossimIpt(0,0); 
-}
-
-/*!****************************************************************************
-* METHOD: ossimDblGrid::setNode(x, y) NON-CONST
-*
-*  This method is used to assign the grid data values.
-*  
-*****************************************************************************/
-void ossimDblGrid::setNode (int x, int y, const double& input) 
-{
-   if(!theGridData) return;
-
-   // Insure the value passed in is allowed:
-   double value = input;
-   constrain(value);
-
-   if ((x>=0)&&(x<theSize.x)&&(y>=0)&&(y<theSize.y))
-   {
-      theGridData[index(x, y)] = value;
-
-      if (value != theNullValue)
-      {
-         if (value < theMinValue)
-            theMinValue = value;
-         if (value > theMaxValue)
-            theMaxValue = value;
-      }
-
-      theMeanIsComputed = false;
-   }
-
-   return;
-}
-
-/*!****************************************************************************
-* METHOD: ossimDblGrid::setNearestNode(uv)
-*
-* Sets the node nearest the U,V point specified to the value given. This is
-* different from setNode() in that the UV coordinate system is used to
-* address a node instead of an XY grid point.
-*  
-*****************************************************************************/
-void ossimDblGrid::setNearestNode (const ossimDpt& uv_point,
-                                   const double&   input) 
-{
-   if(!theGridData) return;
-   
-   // Insure the value passed in is allowed:
-   double value = input;
-   constrain(value);
-
-   //***
-   // Establish the grid indexes:
-   //***
-   int xi = ossim::round<int>((uv_point.u - theOrigin.u)/theSpacing.x);
-   int yi = ossim::round<int>((uv_point.v - theOrigin.v)/theSpacing.y);
-
-   if (xi < 0)
-      xi = 0;
-   if (xi >= theSize.x)
-      xi = theSize.x - 1;
-   if (yi < 0)
-      yi = 0;
-   if (yi >= theSize.y)
-      yi = theSize.y - 1;
-
-   setNode (xi, yi, value);
-
-   return;
-}
-
-/*!****************************************************************************
-* METHOD: ossimDblGrid::getNode(x, y) CONST
-*
-*  This method is used to return the grid data values.
-*  
-*****************************************************************************/
-double ossimDblGrid::getNode (int x, int y) const
-{
-   if(!theGridData) return theNullValue;
-   if ((x>=0)&&(x<theSize.x)&&(y>=0)&&(y<theSize.y))
-   {
-      ossim_uint32 i = index(x, y);
-      double val = theGridData[i];
-      return val;
-   }
-   return theNullValue;
-}
-
-/*!****************************************************************************
-* METHOD: ossimDblGrid::operator(double, double)
-*
-*  This method interpolates between grid points given a fractional location
-*  in UV (external) world space.
-*  
-*****************************************************************************/
-double ossimDblGrid::operator() (const double& u, const double& v) const
-{
-   if(!theGridData) return theNullValue;
-
-   double xi = (u - theOrigin.u)/theSpacing.x;
-   double yi = (v - theOrigin.v)/theSpacing.y;
-
-   if ((xi >= 0.0) && (xi <= (double)theSize.x-1) && (yi >= 0.0) && (yi <= (double)theSize.y-1))
-      return interpolate(xi, yi);
-
-   else if (theExtrapIsEnabled)
-      return extrapolate(xi, yi);
-
-   return theNullValue;
-}
-
-//*************************************************************************************************
-//! Interpolates given non-integral point x, y
-//*************************************************************************************************
-double ossimDblGrid::interpolate(double xi, double yi) const
-{
-   if(!theGridData) 
-      return theNullValue;
-
-   // Establish the grid cell origin indices:
-   int x0 = (int) xi;
-   int y0 = (int) yi;
-
-   // Compute bilinear interpolation weights:
-   double wx1 = xi - x0;
-   double wy1 = yi - y0;
-   double wx0 = 1.0 - wx1;
-   double wy0 = 1.0 - wy1;
-   double w00 = wx0 * wy0;
-   double w01 = wx0 * wy1;
-   double w10 = wx1 * wy0;
-   double w11 = wx1 * wy1;
-
-   // Establish grid indices for 4 surrounding points:
-   int index00  = theSize.x*y0 + x0;
-   int index10 = index00;
-   int index11 = index00;
-   int index01 = index00;
-
-   if (x0 < (theSize.x-1)) index10 = index00 + 1;
-   if (y0 < (theSize.y-1)) index01 = index00 + theSize.x;
-   if (y0 < (theSize.y-1)) index01 = index00 + theSize.x;
-   if (x0 < (theSize.x-1)) index11 = index01 + 1;
-
-   // Safety check:
-   int max_idx = theSize.x * theSize.y;
-   if ((index00 > max_idx) || (index10 > max_idx) || (index11 > max_idx) || (index01 > max_idx))
-      return ossim::nan();
-
-   // Extract the four data points:
-   double p00 = theGridData[index00];
-   double p01 = theGridData[index01];
-   double p10 = theGridData[index10];
-   double p11 = theGridData[index11];
-
-   // Consider the numerical domain to catch any wrap condition:
-   if (theDomainType >= WRAP_180)
-   {
-      double dp01_00 = p01 - p00;
-      double dp10_00 = p10 - p00;
-      double dp11_00 = p11 - p00;
-
-      if (dp01_00 > 180.0)
-         p01 -= 360.0;
-      else if (dp01_00 < -180.0)
-         p01 += 360.0;
-
-      if (dp10_00 > 180.0)
-         p10 -= 360.0;
-      else if (dp10_00 < -180.0)
-         p10 += 360.0;
-
-      if (dp11_00 > 180.0)
-         p11 -= 360.0;
-      else if (dp11_00 < -180.0)
-         p11 += 360.0;
-   }
-
-   // Perform interpolation:
-   double value = (p00*w00 + p01*w01 + p10*w10 + p11*w11) / (w00 + w01 + w10 + w11);
-   constrain(value);
-
-   return value;
-}
-
-//**************************************************************************************************
-//  METHOD: ossimDblGrid::extrapolate()
-//  
-//  Establishes bilinear extrapolation value for point outside of the grid. 
-//
-//**************************************************************************************************
-double ossimDblGrid::extrapolate(double x, double y) const
-{
-   if(!theGridData) 
-      return theNullValue;
-
-
-   // Decide which extra-grid region contains the input point:
-   double dx=0, dy=0, dR_dx=0, dR_dy=0, R0;
-   if (y < 0)
-   {
-      // The point is above the top edge of grid space:
-      dy = y;
-      if (x < 0)
-      {
-         // The point is in the top-left region. Use UL corner alone as reference, and compute first
-         // and second partials:
-         R0 = getNode(0, 0);
-         dx = x;
-         dR_dx = getNode(1, 0) - R0;
-         dR_dy = getNode(0, 1) - R0;
-      }
-      else if (x <= theSize.x-1)
-      {
-         // The point directly above the grid, use the dR_dy of the edge pixel:
-         R0 = interpolate(x, 0);
-         dR_dy = interpolate(x, 1.0) - R0;
-      }
-      else
-      {
-         // The point is in the top-right region:
-         R0 = getNode(theSize.x - 1, 0);
-         dx = x - theSize.x + 1;
-         dR_dx = R0 - getNode(theSize.x-2, 0);
-         dR_dy = getNode(theSize.x-1, 1) - R0;
-      }
-   }
-   else if (y <= theSize.y-1)
-   {
-      // The point is either to the left, the right, or inside of the grid:
-      if (x < 0)
-      {
-         // The point is directly to the left of the grid:
-         R0 = interpolate(0, y);
-         dx = x;
-         dR_dx = interpolate(1.0, y) - R0;
-      }
-      else if (x <= theSize.x-1)
-      {
-         // The point is inside the grid. This should never happen, but handle just in case:
-         return interpolate(x, y);
-      }
-      else 
-      {
-         // The point directly to the right of the grid:
-         R0 = interpolate((double)theSize.x-1, y);
-         dx = x - theSize.x + 1;
-         dR_dx = R0 - interpolate((double)theSize.x-2, y);
-      }
-   }
-   else
-   {
-      // The point is below the bottom edge of grid space:
-      dy = y - theSize.y + 1;
-      if (x < 0)
-      {
-         // The point is in the bottom-left region:
-         R0 = getNode(0, theSize.y-1);
-         dx = x;
-         dR_dx = getNode(1, theSize.y-1) - R0;
-         dR_dy = R0 - getNode(0, theSize.y-2);
-      }
-      else if (x < theSize.x-1)
-      {
-         // The point directly below the grid:
-         R0 = interpolate(x, (double)theSize.y-1);
-         dR_dy = R0 - interpolate(x, (double)theSize.y-2);
-      }
-      else
-      {
-         // The point is in the bottom-right region:
-         R0 = getNode(theSize.x - 1, theSize.y-1);
-         dx = x - theSize.x + 1;
-         dR_dx = R0 - getNode(theSize.x-2, theSize.y-1);
-         dR_dy = R0 - getNode(theSize.x-1, theSize.y-2);
-      }
-   }
-
-   // Consider the numerical domain and adjust potential wrap conditions in the differences:
-   if (theDomainType >= WRAP_180)
-   {
-      if (dR_dx > 180.0) dR_dx -= 360.0;
-      else if (dR_dx < -180.0) dR_dx += 360.0;
-
-      if (dR_dy > 180.0) dR_dy -= 360.0;
-      else if (dR_dy < -180.0) dR_dy += 360.0;
-   }
-
-   double R = R0 + dR_dx*dx + dR_dy*dy;
-   constrain(R);
-   return R;
-}
-
-//*****************************************************************************
-//  OPERATOR: =
-//  
-//*****************************************************************************
-const ossimDblGrid& ossimDblGrid::operator = (const ossimDblGrid& source)
-{
-   if(&source == this) return *this;
-
-   if (theGridData)
-   {
-      delete [] theGridData;
-      theGridData = 0;
-   }
-
-   //***
-   // Assign data members:
-   //***
-   theSize           = source.theSize;
-   theOrigin         = source.theOrigin;
-   theSpacing        = source.theSpacing;
-   theMinValue       = source.theMinValue;
-   theMaxValue       = source.theMaxValue;
-   theNullValue      = source.theNullValue;
-   theMeanValue      = source.theMeanValue;
-   theDeviation      = source.theDeviation;
-   theMeanIsComputed = source.theMeanIsComputed;
-   theDomainType     = source.theDomainType;
-   theExtrapIsEnabled = source.theExtrapIsEnabled;
-
-   //***
-   // Allocate mem for the grid, and initialize:
-   //***
-   int buflen = theSize.x * theSize.y;
-   if(buflen>0)
-   {
-      theGridData = new double [buflen];
-
-      for (int i=0; i<buflen; i++)
-      {
-         theGridData[i] = source.theGridData[i];
-      }
-   }
-
-   return *this;
-}
-
-
-/*!****************************************************************************
-* METHOD: ossimDblGrid::meanValue()
-*  
-*****************************************************************************/
-double  ossimDblGrid::meanValue()
-{
-   static const char MODULE[] = "ossimDblGrid::meanValue()";
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering...\n";
-
-   if (!theMeanIsComputed)
-   {
-      computeMean();
-   }
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";
-   return theMeanValue;
-}
-
-/*!****************************************************************************
-* METHOD: ossimDblGrid::meanStdDev()
-*  
-*****************************************************************************/
-double  ossimDblGrid::meanStdDev()
-{
-   static const char MODULE[] = "ossimDblGrid::meanStdDev()";
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering...\n";
-
-   if (!theMeanIsComputed)
-      computeMean();
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";;
-   return theDeviation;
-}
-
-/*!****************************************************************************
-* METHOD: ossimDblGrid::computeMean()
-*  
-*****************************************************************************/
-void ossimDblGrid::computeMean()
-{
-   static const char MODULE[] = "ossimDblGrid::meanStdDev()";
-   if(!theGridData) return;
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "entering...\n";
-
-   if (!theMeanIsComputed)
-   {
-      double accum = 0.0;
-      double num_samples = 0.0;
-
-      /*!
-      * Loop to compute mean:
-      */
-      for (int i=0; i<(theSize.x*theSize.y); i++)
-      {
-         if (theGridData[i] != theNullValue)
-         {
-            accum += theGridData[i];
-            num_samples += 1.0;
-         }
-      }
-      theMeanValue = accum/num_samples;
-
-      /*!
-      * Loop again to compute deviation:
-      */
-      accum = 0.0;
-      double diff;
-      for (int i=0; i<(theSize.x*theSize.y); i++)
-      {
-         if (theGridData[i] != theNullValue)
-         {
-            diff = theMeanValue - theGridData[i];
-            accum += diff*diff;
-         }
-      }
-      theDeviation = sqrt(accum/num_samples);
-
-      theMeanIsComputed = true;
-   }
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";
-   return;
-}
-
-/*!****************************************************************************
-* INLINE METHOD: ossimDblGrid::isInside(const ossimDpt& pt) const
-*****************************************************************************/
-bool ossimDblGrid::isInside(const double& u, const double& v) const
-{
-   double xi = (u - theOrigin.u)/theSpacing.x;
-   double yi = (v - theOrigin.v)/theSpacing.y;
-   return ((xi >= 0.0) && (xi <= ((double)theSize.x - 1.0)) &&
-      (yi >= 0.0) && (yi <= ((double)theSize.y - 1.0)));
-   //return ((xi >= 0.0) && (xi < ((double)theSize.x)) &&
-   //        (yi >= 0.0) && (yi < ((double)theSize.y)));
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimDblGrid::save()
-//  
-//  Saves the grid to the stream in compact ASCII format (not necessarily
-//  human readable).
-//  
-//*****************************************************************************
-bool ossimDblGrid::save(ostream& os, const char* descr) const
-{
-   static const char MODULE[] = "ossimDblGrid::save()";
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering...\n";
-
-   //***
-   // Preserve the stream's settings:
-   //***
-   ios::fmtflags new_options = ios::scientific|ios::dec;
-   //ios::streamsize new_precision = 12;
-   int new_precision = 12;
-
-   ios::fmtflags old_options = os.flags(new_options);
-   int old_precision = os.precision(new_precision);
-
-   //***
-   // Verify the description string is not too long:
-   //***
-   char descr_buf[81];
-   std::strncpy(descr_buf, descr, 80);
-   descr_buf[80] = '\0';
-
-   //***
-   // write magic number tag and the grid size X, Y, num params:
-   //***
-   os << MAGIC_NUMBER << " " << descr_buf << "\n"
-      << theSize.x << "  "
-      << theSize.y << "  "
-      << theOrigin.u << "  "
-      << theOrigin.v << "  "
-      << theSpacing.u << "  "
-      << theSpacing.v << "  "
-      << theNullValue << "\n";
-
-   if(theGridData)
-   {
-      //***
-      // Loop to write grid points:
-      //***
-      int max_index = theSize.x*theSize.y;
-      for (int i=0; i<max_index; i++)
-         os << theGridData[i] << "  ";
-   }
-   os << "\n";
-
-   //***
-   // Restore the stream's state:
-   //***
-   os.flags(old_options);
-   os.precision(old_precision);
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";
-   return true;
-}
-
-//*****************************************************************************
-//  METHOD: ossimDblGrid::load()
-//  
-//  Loads the grid from the stream in compact ASCII format (not necessarily
-//  human readable).
-//  
-//*****************************************************************************
-bool ossimDblGrid::load(istream& is)
-{
-   static const char MODULE[] = "ossimDblGrid::load()";
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering...\n";
-
-   char strbuf[128];
-
-   //***
-   // Read magic number tag to insure it is an ossimDblGrid record:
-   //***
-   is >> strbuf;
-   if (std::strncmp(strbuf, MAGIC_NUMBER.c_str(), MAGIC_NUMBER.length()))
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << MODULE << "Error reading OSSIM_DBL_GRID magic number from stream. "
-         << "Aborting...\n";
-      return false;
-   }
-   is.getline(strbuf, 128, '\n');
-   theSize           = ossimDpt(0,0);
-   theOrigin         = ossimDpt(0,0);
-   theSpacing        = ossimDpt(0,0);
-   theMinValue       = OSSIM_DEFAULT_MAX_PIX_DOUBLE;
-   theMaxValue       =  OSSIM_DEFAULT_MIN_PIX_DOUBLE;
-   theNullValue      = theNullValue;
-   theMeanIsComputed = false;
-
-
-   //***
-   // Read the grid size, origin, and spacing:
-   //***
-   ossimIpt size;
-   ossimDpt origin, spacing;
-   double null_value;
-   is >> size.x 
-      >> size.y 
-      >> origin.u 
-      >> origin.v 
-      >> spacing.u
-      >> spacing.v
-      >> null_value;
-
-   initialize(size, origin, spacing, null_value);
-
-   //***
-   // Loop to read grid points:
-   //***
-   int max_index = theSize.x*theSize.y;
-   for (int i=0; i<max_index; i++)
-   {
-      is >> theGridData[i];
-   }
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";
-
-   return true;
-}
-
-//*****************************************************************************
-//  PRIVATE FUNCTION: isBlocked()
-//  
-//  Used by interpolateNullValuedNodes. Returns true if the direction indicated
-//  by the vector (x, y) has been blocked from further sampling. This occurs if
-//  a sample has already been found in that general direction. The directions
-//  are discrete (16) evenly distributed about a "compass rose." Each index
-//  corresponds to one of the directions as illustrated here:
-//
-//                        15 0 1
-//                     14    |    2
-//                    13     |     3
-//                   12------+------4
-//                    11     |     5
-//                     10    |    6
-//                         9 8 7
-//
-//*****************************************************************************
-bool isBlocked(bool* blocked, int x, int y)
-{
-   if (y == 0)
-   {
-      if (x > 0) return blocked[4];
-      return blocked[12];
-   }
-
-   double r = x/y;
-   int c = 0;
-   int i;
-   if (x < 0.0) c = 8;
-
-   //***
-   // Test the tangent value instead of computing angle:
-   //***
-   if      (r >  5.02734) i = 12 + c;
-   else if (r >  1.49660) i = 13 + c;
-   else if (r >  0.66818) i = 14 + c;
-   else if (r >  0.19891) i = 15 + c;
-   else if (r > -0.19891) i =  0 + c;
-   else if (r > -0.66818) i =  1 + c;
-   else if (r > -1.49660) i =  2 + c;
-   else if (r > -5.02734) i =  3 + c;
-   else                   i =  4 + c;
-
-   if (i > 15) i -= 16;  // modulo 16
-
-   return blocked[i];
-}
-
-//*****************************************************************************
-//  PRIVATE FUNCTION: blockDirection()
-//  
-//  Used by interpolateNullValuedNodes. Blocks the resampler from exploring
-//  further in a general direction, specified by thevector (x, y). The blocking
-//  is requested when a sample is found. This prevents a sample that is shadowed
-//  by a closer sample from having influence.
-//
-//  See method isBlocked() above for a description of the compass rose indexing.
-//  
-//*****************************************************************************
-void blockDirection(bool* blocked, int x, int y)
-{
-   if (y == 0)
-   {
-      if (x > 0) blocked[4] = true;
-      else       blocked[12] = true;
-      return;
-   }
-
-   double r = x/y;
-   int c = 0;
-   int i;
-   if (x < 0.0) c = 8;
-
-   //***
-   // Test the tangent value instead of computing angle:
-   //***
-   if      (r >  5.02734) i = 12 + c;
-   else if (r >  1.49660) i = 13 + c;
-   else if (r >  0.66818) i = 14 + c;
-   else if (r >  0.19891) i = 15 + c;
-   else if (r > -0.19891) i =  0 + c;
-   else if (r > -0.66818) i =  1 + c;
-   else if (r > -1.49660) i =  2 + c;
-   else if (r > -5.02734) i =  3 + c;
-   else                   i =  4 + c;
-
-   if (i > 15) i -= 16;  // modulo 16
-   blocked[i] = true;
-
-   return;
-}
-
-//*****************************************************************************
-//   METHOD: ossimDblGrid::interpolateNullValuedNodes(decay_rate)
-//
-//   This method performs a resampling of the defined grid nodes in order to
-//   compute interpolated values for those uninitialized nodes. This is
-//   necessary when only a subset of nodes are available for initializing the
-//   grid.
-//
-//   The decay rate is a geometric (1/r) factor applied to the weights to
-//   amplify the rate at which a neighbor's influence diminishes. For a
-//   decay_rate = 1, the influence of a sample diminishes linearly with the
-//   distance.
-//  
-//*****************************************************************************
-void ossimDblGrid::interpolateNullValuedNodes(const double& decay_rate)
-{
-   static const char MODULE[] = "ossimDblGrid::interpolateNullValuedNodes()";
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering...\n";
-   if(!theGridData) return;
-
-   //***
-   // Allocate buffer to store resampled nodes:
-   //***
-   int      buf_size          = theSize.x*theSize.y;
-   double*  resampled_grid    = new double [buf_size];
-   double   min_weight_needed = 4.0/decay_rate;
-
-   int      start_x, start_y, end_x, end_y;
-   int      diameter;
-   double   sum_weights;
-   double   accumulator;
-   double   weight;
-   double   sample;
-   double   node_value;
-   bool     sample_found;
-   int      node_idx;
-   double   adj_delta;
-   int      dx, dy;
-   bool     blocked[16];
-
-   //***
-   // Loop over the entire grid to resample all NULL nodes:
-   //***
-   for (int y=0; y<theSize.y; y++)
-   {
-      for (int x=0; x<theSize.x; x++)
-      {
-         //***
-         // Only resample those nodes that contain NULL:
-         //***
-         node_idx = index(x, y);
-         node_value = theGridData[node_idx];
-         if (node_value != theNullValue)
-         {
-            //***
-            // This node had a value. Simply copy it into the resample_grid:
-            //***
-            resampled_grid[node_idx] = node_value;
-         }
-
-         else
-         {
-            //***
-            // Resampling is necessary. Initialize quantities used:
-            //***
-            start_x = x;
-            start_y = y;
-            diameter = 0;
-            sum_weights = 0;
-            accumulator = 0;
-            weight = 1.0;
-            sample_found = true;
-
-            for (int i=0; i<16; i++)
-               blocked[i] = false;
-
-            //***
-            // Loop collecting contributions from non-null neighbors. Begin with
-            // a small kernel size (diameter) and successively grow until a
-            // sufficient number of contributors is found:
-            //***
-            while ((sum_weights < min_weight_needed) && sample_found)
-            {
-               diameter += 2;
-               start_x -= 1;
-               start_y -= 1;
-               weight *= decay_rate;
-               sample_found = false;
-
-               //***
-               // Loop over each pixel in kernel and sum in it's contribution:
-               //***
-               end_y = start_y + diameter;
-               end_x = start_x + diameter;
-
-               for (int yn=start_y; yn<=end_y; yn++)
-               {
-                  if ((yn == start_y) || (yn == end_y))
-                  {
-                     //***
-                     // This is the top edge or bottom edge, need samples from
-                     // each x along kernel edge:
-                     //***
-                     for (int xn=start_x; xn<=end_x; xn++)
-                     {
-                        sample_found = sample_found || isInside(xn, yn);
-                        sample = getNode(xn, yn);
-                        if (sample != theNullValue)
-                        {
-                           dx = x - xn; dy = y - yn;
-                           if (!isBlocked(blocked, dx, dy))
-                           {
-                              adj_delta = weight*sqrt((double)(dx*dx + dy*dy));
-                              accumulator += sample/adj_delta;
-                              sum_weights += 1.0/adj_delta;
-                              blockDirection(blocked, dx, dy);
-                           }
-                        }
-                     }
-                  }
-                  else
-                  {
-                     //***
-                     // For the left/right edge of the kernel, need to sample
-                     // only the first (start_x) and last (end_x):
-                     //***
-                     sample_found = sample_found || isInside(start_x, yn);
-                     sample = getNode(start_x, yn);
-                     if (sample != theNullValue)
-                     {
-                        dx = x - start_x; dy = y - yn;
-                        if (!isBlocked(blocked, dx, dy))
-                        {
-                           adj_delta = weight*sqrt((double)(dx*dx + dy*dy));
-                           accumulator += sample/adj_delta;
-                           sum_weights += 1.0/adj_delta;
-                           blockDirection(blocked, dx, dy);
-                        }
-                     }
-
-                     sample_found = sample_found || isInside(end_x, yn);
-                     sample = getNode(end_x, yn);
-                     if (sample != theNullValue)
-                     {
-                        dx = x - end_x; dy = y - yn;
-                        if (!isBlocked(blocked, dx, dy))
-                        {
-                           adj_delta = weight*sqrt((double)(dx*dx + dy*dy));
-                           accumulator += sample/adj_delta;
-                           sum_weights += 1.0/adj_delta;
-                           blockDirection(blocked, dx, dy);
-                        }
-                     }
-                  } // end else
-               } // end for loop over all rows in kernel
-            } // end while loop inflating kernel size
-
-            //***
-            // Finished collecting sample contributions for this node. compute
-            // convolution and save in buffer:
-            //***
-            if (sum_weights != 0)
-               resampled_grid[node_idx] = accumulator/sum_weights;
-            else
-               resampled_grid[node_idx] = theNullValue;
-
-         } // end else (if input node is NULL)
-      } // end for loop over all columns in grid
-   } // end for loop over all lines in grid
-
-   //***
-   // Now copy the resampled grid back into the original buffer:
-   //***
-   for (node_idx=0; node_idx<buf_size; node_idx++)
-      theGridData[node_idx] = resampled_grid[node_idx];
-
-   delete [] resampled_grid;
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";
-   return;
-}
-
-//*****************************************************************************
-//  METHOD: ossimDblGrid::filter(size_x, size_y, kernel)
-//  
-//  Passes the grid data through a convolution filter given in the kernel array.
-//  The grid must not contain any NULL nodes as these are not scanned for.
-//  The kernel sizes should be odd numbers.
-//  
-//*****************************************************************************
-void ossimDblGrid::filter(int size_x, int size_y, double* kernel)
-{
-   static const char MODULE[] = "ossimDblGrid::filter()";
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << "entering...\n";
-   if(!theGridData) return;
-
-   int      rx      = (size_x - 1)/2;     // kernel radii
-   int      ry      = (size_y - 1)/2;     
-   int      start_x = rx;                 // indexes to start sampling grid
-   int      start_y = ry;
-   int      end_x   = theSize.x - rx;     // indexes to end buffer sampling
-   int      end_y   = theSize.y - ry;
-   int      knl_ctr = ry*size_x + rx;     // offset to center of kernel buffer
-   double   node_value, kernel_value;
-   int      resample_node_idx;
-   
-   // The resampled data is accumulated and stored in a temporary ossimDblGrid object so that we
-   // can take advantage of the extrapolation feature later in this method.
-   ossimIpt resample_grid_size(end_x-start_x, end_y-start_y);
-   ossimDpt resample_grid_origin(start_x, start_y);
-   ossimDpt resample_grid_spacing(1,1);
-   ossimDblGrid resample_grid(resample_grid_size, resample_grid_origin, resample_grid_spacing);
-   resample_grid.enableExtrapolation();
-   resample_grid.fill(0.0);
-
-   // Loop over the entire grid to resample all NULL nodes:
-   for (int y=start_y; y<end_y; y++)
-   {
-      for (int x=start_x; x<end_x; x++)
-      {
-         resample_node_idx = resample_grid.index(x-start_x, y-start_y);
-      
-         // Fetch samples for each kernel element, apply gain, then accumulate
-         // in output buffer:
-         for (int ky=-ry; ky<=ry; ky++)
-         {
-            for (int kx=-rx; kx<=rx; kx++)
-            {
-               node_value = theGridData[index(x+kx, y+ky)];
-               kernel_value = kernel[knl_ctr + ky*size_x + kx];
-               resample_grid.theGridData[resample_node_idx] += kernel_value*node_value;
-            }
-         }
-      }
-   }
-   
-   // Copy the resampled data to the original grid.
-   // Note: the grid margin has unfiltered data due to the kernel radius. Use the resample_grid's
-   // inherent extrapolator to fill in these unfiltered border nodes:
-   for (int y=0; y<theSize.y; y++)
-   {
-      for (int x=0; x<theSize.x; x++)
-      {
-         theGridData[index(x, y)] = resample_grid(x, y); // automatically extrapolates if necessary
-      }
-   }
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";
-   return;
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimDblGrid::fill
-//  
-//  Fills the current grid with constant value provided.
-//  
-//*****************************************************************************
-void ossimDblGrid::fill(double fill_value)
-{
-   if (!theGridData)
-   {
-      return;
-   }
-
-   int size = theSize.x * theSize.y;
-   for (int i=0; i<size; i++)
-      theGridData[i] = fill_value;
-
-   return;
-}
-
-//*************************************************************************************************
-// Constrains the value to the numerical domain specified in theDomainType.
-//*************************************************************************************************
-void ossimDblGrid::constrain(double& value) const
-{
-   if ((theDomainType == CONTINUOUS) || (value == theNullValue))
-      return;
-      
-   // Consider again the domain to verify the value is within allowable range:
-   if (theDomainType == WRAP_180) 
-   {
-      if (value <= -180.0)
-         value += 360.0;
-      else if (value > 180.0) 
-         value -= 360.0;
-   }
-   else if (theDomainType == WRAP_360)
-   {
-      if (value < 0.0) 
-         value += 360.0;
-      else if (value >= 360.0) 
-         value -= 360.0;
-   }
-   //else if (theDomainType == SAWTOOTH_90)
-   //{
-   //   // Any adjustment here corrupts the data value since it is clipped:
-   //   if (value < -90.0) 
-   //      value = -90.0;
-   //   else if (value > 90.0) 
-   //      value = 90.0;
-   //}
-}
-
-//*****************************************************************************
-//  FRIEND OPERATOR: ostream& << (ostream&) 
-//  
-//*****************************************************************************
-ostream& operator<<(ostream& os, const ossimDblGrid& grid) 
-{
-   os << "\nDump of ossimDblGrid at " << (void*) &grid
-      << "\n  theSize: "           << grid.theSize
-      << "\n  theOrigin: "         << grid.theOrigin
-      << "\n  theSpacing: "        << grid.theSpacing
-      << "\n  theMinValue: "       << grid.theMinValue
-      << "\n  theMaxValue: "       << grid.theMaxValue
-      << "\n  theNullValue: "      << grid.theNullValue
-      << "\n  theMeanValue: "      << grid.theMeanValue
-      << "\n  theDeviation: "      << grid.theDeviation
-      << "\n  theMeanIsComputed: " << grid.theMeanIsComputed
-      << "\n";
-
-   if(grid.theGridData)
-   {
-
-      for (int y=0; y<grid.theSize.y; y++)
-      {
-         for (int x=0; x<grid.theSize.x; x++)
-         {
-            os << "\n  node(" << x << ", " << y << "): " << grid.getNode(x,y);
-         }
-      }
-   }
-
-   return os;
-}
diff --git a/src/ossim/base/ossimDirectory.cpp b/src/ossim/base/ossimDirectory.cpp
deleted file mode 100644
index cc7a61b..0000000
--- a/src/ossim/base/ossimDirectory.cpp
+++ /dev/null
@@ -1,319 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-// 
-// Description: A brief description of the contents of the file.
-//
-//*************************************************************************
-// $Id: ossimDirectory.cpp 20229 2011-11-08 17:01:17Z oscarkramer $
-
-#include <cstring> /* for strncasecmp */
-#include <iostream>
-
-#if defined (_WIN32)
-#include <io.h>
-#include <direct.h>
-#else
-#include <ossim/base/ossimDirectoryData.h>
-#endif
-#ifdef __BORLANDC__
-# include <dir.h>
-#include <direct.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <io.h>
-#define _chdir chdir
-#endif
-
-#include <ossim/base/ossimDirectory.h>
-#include <ossim/base/ossimRegExp.h>
-
-//#include "wx/filefn.h"          // for wxMatchWild
-
-// #include <sys/types.h>
-
-// #include <dirent.h>
-
-// ----------------------------------------------------------------------------
-// ossimDirectory construction/destruction
-// ----------------------------------------------------------------------------
-
-#if defined (_WIN32)
-ossimDirectory::ossimDirectory()
-   :
-      theData(0),
-      theDirectoryName(),
-      theFlags(0)
-{}
-
-ossimDirectory::ossimDirectory(const ossimFilename &dirname)
-   :
-      theData(0),
-      theDirectoryName(dirname),
-      theFlags(0)
-{
-   open(dirname);
-}
-
-ossimDirectory::~ossimDirectory()
-{
-   if (theData != 0) _findclose( theData );
-}
-
-bool ossimDirectory::open(const ossimFilename &dirname)
-{
-   // close out currently open directory
-   if (theData != 0)
-   {
-      _findclose( theData );
-      theData = 0;
-   }
-   
-   // set new directory name
-   theDirectoryName = dirname;
-
-	return (dirname.isDir());
-   // cd to the new directory
-//   if (_chdir( theDirectoryName) == -1)
-//   {
-//      return false;
-//   }
-   
-//   return true;
-}
-
-bool ossimDirectory::getFirst(ossimFilename &filename, int flags)
-{
-   struct _finddata_t c_file;
-   ossimFilename temp;
-   //long theData1 = _findfirst( "*.*", &c_file );
-   ossimFilename dirName = theDirectoryName.dirCat("*");
-   if( (theData = _findfirst( dirName.c_str(), &c_file )) != 0L )
-   {
-      setFlags(flags);
-      
-      temp = theDirectoryName.dirCat(c_file.name);
-      
-	  
-      while (!fileMatched(temp))
-      {
-         // look for next file in the directory
-         if (_findnext( theData, &c_file ) == 0 )
-         {
-            temp = theDirectoryName.dirCat(c_file.name);
-         }
-         else
-         {
-            // no more file in the directory
-            filename.clear();
-            return false;
-         }
-      }
-   }
-
-   // set the filenane that matches
-   filename = temp.trim();
-
-   return (filename!="");
-}
-
-bool ossimDirectory::getNext(ossimFilename &filename) const
-{
-   struct _finddata_t c_file;
-   bool matches = false;
-   ossimFilename temp;
-
-   while (!matches )
-   {
-      // look for next file in the directory
-      if (_findnext( theData, &c_file ) == 0 )
-      {
-         temp = theDirectoryName.dirCat(c_file.name);
-         matches = fileMatched(temp);
-      }
-      else
-      {
-         // no more file in the directory
-         filename.clear();
-         return false;
-      }
-   }
-
-   // set the filenane that matches
-   if (matches)
-   {
-      filename = temp.trim();
-   }
-
-   return (matches&&(filename!=""));
-}
-
-bool ossimDirectory::fileMatched(ossimFilename &filename) const
-{
-   bool matches = false;
-
-   // Don't return "." and ".." unless asked for.
-   if ( (filename.file() == "..") || (filename.file() == ".")   )
-   {
-      if (theFlags & ossimDirectory::OSSIM_DIR_DOTDOT)
-      {
-         matches = true;
-      }
-   }
-   else if((filename.isDir()) && (theFlags & ossimDirectory::OSSIM_DIR_DIRS))
-   {
-      matches = true;
-   }
-   else if((filename.isFile()) && (theFlags & ossimDirectory::OSSIM_DIR_FILES))
-   {
-      matches = true;
-   }
-
-   return matches;
-}
-
-bool ossimDirectory::isOpened() const
-{
-   return theDirectoryName.isDir();
-    //return theData != 0;
-}
-
-#else
-
-ossimDirectory::ossimDirectory()
-   :
-      theData(NULL)
-{}
-
-ossimDirectory::ossimDirectory(const ossimFilename &dirname)
-{
-    theData = NULL;
-    open(dirname);
-}
-
-bool ossimDirectory::open(const ossimFilename &dirname)
-{
-    delete theData;
-    theData = new ossimDirectoryData(dirname);
-
-    if ( theData &&
-         (!theData->isOk()) )
-    {
-        delete theData;
-        theData = NULL;
-
-        return false;
-    }
-
-    return true;
-}
-
-ossimDirectory::~ossimDirectory()
-{
-    delete theData;
-}
-
-// ----------------------------------------------------------------------------
-// ossimDirectory enumerating
-// ----------------------------------------------------------------------------
-
-bool ossimDirectory::getFirst(ossimFilename &filename,
-                              int flags)
-{
-   if(theData && isOpened())
-   {
-      theData->rewind();
-
-      theData->setFlags(flags);
-
-      return getNext(filename);
-   }
-
-   return false;
-}
-
-bool ossimDirectory::getNext(ossimFilename &filename) const
-{
-   if(theData && isOpened())
-   {
-      return theData->read(filename);
-   }
-
-   return false;
-}
-
-bool ossimDirectory::isOpened() const
-{
-    return theData != NULL;
-}
-
-#endif
-
-void ossimDirectory::findAllFilesThatMatch(std::vector<ossimFilename>& result,
-					   const ossimString& regularExpressionPattern,
-					   int flags)
-{
-   ossimFilename filename;
-   ossimRegExp   regExpr;
-   regExpr.compile(regularExpressionPattern.c_str());
-   if(getFirst(filename, flags))
-   {
-      do
-      {
-         ossimString fileOnly = filename.file();
-         if(regExpr.find(fileOnly.c_str()))
-         {
-            result.push_back(filename);
-         }
-      }while(getNext(filename));
-   }
-}
-
-// ESH 07/2008, Trac #234: OSSIM is case sensitive 
-// when using worldfile templates during ingest
-bool ossimDirectory::findCaseInsensitiveEquivalents(
-   const ossimFilename &filename, 
-   std::vector<ossimFilename>& result,
-   bool bExcludeExactMatch )
-{
-   bool bSuccess = false;
-   ossimFilename candidate;
-   bool bFoundCandidate = getFirst( candidate );
-   int compareSize = static_cast<int>( filename.length() );
-   
-   while( bFoundCandidate == true )
-   {
-      // Do a case insensitive string compare
-#if defined (_WIN32)
-      bool bFoundEquivalent = _strnicmp( filename.c_str(), candidate.c_str(), 
-                                         compareSize ) == 0 ? true : false;
-#else
-      //bool bFoundEquivalent =  strnicmp( filename.c_str(), candidate.c_str(), // 
-      //                                         compareSize ) == 0 ? true : false;
-      bool bFoundEquivalent =  strncasecmp( filename.c_str(), candidate.c_str(), 
-                                            compareSize ) == 0 ? true : false;
-#endif
-      
-      if ( bFoundEquivalent == true )
-      {
-         bool bFoundExact = ( filename == candidate.c_str() ) ? true : false;
-         bool bShouldExclude = ( bFoundExact == true && 
-                                 bExcludeExactMatch == true ) ? true : false;
-         
-         if ( bShouldExclude == false )
-         {
-            bSuccess = true;
-            result.push_back( candidate );
-         }
-      }
-      
-      bFoundCandidate = getNext( candidate );
-   }
-   
-   return bSuccess;
-}
diff --git a/src/ossim/base/ossimDisplayInterface.cpp b/src/ossim/base/ossimDisplayInterface.cpp
deleted file mode 100644
index da31439..0000000
--- a/src/ossim/base/ossimDisplayInterface.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimDisplayInterface.cpp 9094 2006-06-13 19:12:40Z dburken $
-#include <ossim/base/ossimDisplayInterface.h>
-
-RTTI_DEF(ossimDisplayInterface, "ossimDisplayInterface");
-
-ossimDisplayInterface::ossimDisplayInterface()
-{
-}
-
-ossimDisplayInterface::~ossimDisplayInterface()
-{
-}
-
-ossimString ossimDisplayInterface::getTitle()const
-{
-   ossimString result;
-   
-   getTitle(result);
-   
-   return result;
-}
diff --git a/src/ossim/base/ossimDpt3d.cpp b/src/ossim/base/ossimDpt3d.cpp
deleted file mode 100644
index 4d1babe..0000000
--- a/src/ossim/base/ossimDpt3d.cpp
+++ /dev/null
@@ -1,190 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimDpt3d.cpp 15766 2009-10-20 12:37:09Z gpotts $
-
-#include <sstream>
-#include <ossim/base/ossimDpt3d.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimString.h>
-
-
-ossimDpt3d::ossimDpt3d(const ossimDpt &aPt)
-   :x(aPt.x),
-    y(aPt.y),
-    z(0)
-{
-   if(aPt.isNan())
-   {
-      makeNan();
-   }
-}
-
-ossimDpt3d::ossimDpt3d(const ossimIpt &aPt)
-   :x(aPt.x),
-    y(aPt.y),
-    z(0)
-{
-   if(aPt.isNan())
-   {
-      makeNan();
-   }
-}
-
-std::string ossimDpt3d::toString(ossim_uint32 precision) const
-{
-   std::ostringstream os;
-   os <<  setprecision(precision);
-   
-   os << "(";
-   if ( ossim::isnan(x) == false)
-   {
-      os << x;
-   }
-   else
-   {
-      os << "nan";
-   }
-   os << ",";
-   if ( ossim::isnan(y) == false )
-   {
-      os << y;
-   }
-   else
-   {
-      os << "nan";
-   }
-   os << ",";
-   if ( ossim::isnan(z) == false )
-   {
-      os << z;
-   }
-   else
-   {
-      os << "nan";
-   }
-   os << ")";
-   
-   return os.str();
-}
-
-void ossimDpt3d::toPoint(const std::string& s)
-{
-   // Nan out the column vector for starters.
-   x = ossim::nan();
-   y = ossim::nan();
-   z = ossim::nan();
-  
-   std::istringstream is(s);
-
-   // Check the stream.
-   if (!is) return;
-
-   //---
-   // Expected input format:
-   // ( 0.0000000, 0.0000000, 0.00000000 )
-   //   -----x---- -----y---- -----z----
-   //---
-   
-   const int SZ = 64; // Handle real big number...
-   ossimString os;
-   char buf[SZ];
-   char c = 0;
-
-   //---
-   // X SECTION:
-   //---
-   
-   // Grab data up to the first comma.
-   is.get(buf, SZ, ',');
-
-   if (!is) return;
-
-   // Copy to ossim string.
-   os = buf;
-   
-   // Get rid of the '(' if there is any.
-   std::string::size_type pos = os.find('(');
-   if (pos != std::string::npos)
-   {
-      os.erase(pos, 1);
-   }   
-   
-   if (os.contains("nan") == false)
-   {
-      x = os.toFloat64();
-   }
-   else
-   {
-      x = ossim::nan();
-   }
-
-   // Eat the comma that we stopped at.
-   while (c != ',')
-   {
-      is.get(c);
-      if (!is) break;
-   }
-   
-   //---
-   // Y SECTION:
-   //---
-   
-   // Grab the data up to the next ','
-   is.get(buf, SZ, ',');
-
-   if (!is) return;
-   
-   // Copy to ossim string.
-   os = buf;
-   
-   if (os.contains("nan") == false)
-   {
-      y = os.toFloat64();
-   }
-   else
-   {
-      y = ossim::nan();
-   }
-   
-   // Eat the comma that we stopped at.
-   c = 0;
-   while (c != ',')
-   {
-      is.get(c);
-      if (!is) break;
-   }
-
-   //---
-   // Z SECTION:
-   //---
-   
-   // Grab the data up to the ')'
-   is.get(buf, SZ, ')');
-   
-   if (!is) return;
-   
-   // Copy to ossim string.
-   os = buf;
-   
-   if (os.contains("nan") == false)
-   {
-      z = os.toFloat64();
-   }
-   else
-   {
-      z = ossim::nan();
-   }
-}
-
-std::ostream& operator<< (std::ostream& out, const ossimDpt3d &rhs)
-{
-   std::string s = rhs.toString(15);
-   out << s;
-   return out;
-}
diff --git a/src/ossim/base/ossimDrect.cpp b/src/ossim/base/ossimDrect.cpp
deleted file mode 100644
index 7131f6a..0000000
--- a/src/ossim/base/ossimDrect.cpp
+++ /dev/null
@@ -1,846 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Contains class definition for ossimDrect.
-//*******************************************************************
-//  $Id: ossimDrect.cpp 21560 2012-08-30 12:09:03Z gpotts $
-
-#include <iostream>
-#include <sstream>
-
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimPolygon.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-
-// XXX not replaced with std::max since the test is backward here
-//     and will give a different answer in the case of nan.
-#define d_MAX(a,b)      (((a)>(b)) ? a : b)
-
-static int
-clip_1d (double *x0, 
-	 double *y0, 
-	 double *x1, 
-	 double *y1, 
-	 double maxdim)
-{
-   double m;			/* gradient of line */
-   if (*x0 < 0)
-   {				/* start of line is left of window */
-      if (*x1 < 0)		/* as is the end, so the line never cuts the window */
-         return 0;
-      m = (*y1 - *y0) / (double) (*x1 - *x0);	/* calculate the slope of the line */
-      /* adjust x0 to be on the left boundary (ie to be zero), and y0 to match */
-      *y0 -= m * *x0;
-      *x0 = 0;
-      /* now, perhaps, adjust the far end of the line as well */
-      if (*x1 > maxdim)
-      {
-         *y1 += m * (maxdim - *x1);
-         *x1 = maxdim;
-      }
-      return 1;
-   }
-   if (*x0 > maxdim)
-   {				/* start of line is right of window -
-				   complement of above */
-      if (*x1 > maxdim)		/* as is the end, so the line misses the window */
-         return 0;
-      m = (*y1 - *y0) / (double) (*x1 - *x0);	/* calculate the slope of the line */
-      *y0 += m * (maxdim - *x0);	/* adjust so point is on the right
-					   boundary */
-      *x0 = maxdim;
-      /* now, perhaps, adjust the end of the line */
-      if (*x1 < 0)
-      {
-         *y1 -= m * *x1;
-         *x1 = 0;
-      }
-      return 1;
-   }
-   /* the final case - the start of the line is inside the window */
-   if (*x1 > maxdim)
-   {				/* other end is outside to the right */
-      m = (*y1 - *y0) / (double) (*x1 - *x0);	/* calculate the slope of the line */
-      *y1 += m * (maxdim - *x1);
-      *x1 = maxdim;
-      return 1;
-   }
-   if (*x1 < 0)
-   {				/* other end is outside to the left */
-      m = (*y1 - *y0) / (double) (*x1 - *x0);	/* calculate the slope of the line */
-      *y1 -= m * *x1;
-      *x1 = 0;
-      return 1;
-   }
-   /* only get here if both points are inside the window */
-   return 1;
-}
-
-//*******************************************************************
-// Public Constructor: ossimDrect
-//
-//*******************************************************************
-ossimDrect::ossimDrect(const ossimIrect& rect)
-   :
-      theUlCorner(rect.ul()),
-      theUrCorner(rect.ur()),
-      theLrCorner(rect.lr()),
-      theLlCorner(rect.ll()),
-      theOrientMode(rect.orientMode())
-{
-   if(rect.isNan())
-   {
-      makeNan();
-   }
-}
-
-
-//*****************************************************************************
-//  CONSTRUCTOR: ossimDrect(const vector<ossimDpt>& points)
-//  
-//*****************************************************************************
-ossimDrect::ossimDrect(const ossimPolygon& polygon,
-                       ossimCoordSysOrientMode mode)
-   :
-      theOrientMode (mode)
-{
-   std::vector<ossimDpt> vertices;
-   ossimDpt point;
-   int index = 0;
-   while (polygon.vertex(index, point))
-   {
-      vertices.push_back(point);
-      index++;
-   }
-
-   initBoundingRect(vertices);
-}
-
-//*****************************************************************************
-//  CONSTRUCTOR: ossimDrect(const vector<ossimDpt>& points)
-//  
-//*****************************************************************************
-ossimDrect::ossimDrect(const std::vector<ossimDpt>& points,
-                       ossimCoordSysOrientMode mode)
-   :
-      theOrientMode (mode)
-{
-  if(points.size())
-   {
-      unsigned long index;
-      double minx, miny;
-      double maxx, maxy;
-      
-      minx = points[0].x;
-      miny = points[0].y;
-      maxx = points[0].x;
-      maxy = points[0].y;
-            
-      // find the bounds
-      for(index = 1; index < points.size();index++)
-      {
-         
-         minx = std::min(minx, points[index].x);
-         miny = std::min(miny, points[index].y);
-         maxx = std::max(maxx, points[index].x);
-         maxy = std::max(maxy, points[index].y);
-         
-      }
-      if(theOrientMode == OSSIM_LEFT_HANDED)
-      {
-         *this = ossimDrect(minx, miny, maxx, maxy, mode);
-      }
-      else
-      {
-         *this = ossimDrect(minx,maxy, maxx, miny, mode);
-      }
-   }
-   else
-   {
-      makeNan();
-   }
-}
-ossimDrect::ossimDrect(const ossimDpt& p1,
-                       const ossimDpt& p2,
-                       const ossimDpt& p3,
-                       const ossimDpt& p4,
-                       ossimCoordSysOrientMode mode)
-: theOrientMode(mode)
-{
-   if(p1.hasNans()||p2.hasNans()||p3.hasNans()||p4.hasNans())
-   {
-      makeNan();
-   }
-   else
-   {
-      double minx, miny;
-      double maxx, maxy;
-      
-      minx = std::min( p1.x, std::min(p2.x, std::min(p3.x, p4.x)));
-      miny = std::min( p1.y, std::min(p2.y, std::min(p3.y, p4.y)));
-      maxx = std::max( p1.x, std::max(p2.x, std::max(p3.x, p4.x)));
-      maxy = std::max( p1.y, std::max(p2.y, std::max(p3.y, p4.y)));
-      
-      if(mode == OSSIM_LEFT_HANDED)
-      {
-         *this = ossimDrect(minx, miny, maxx, maxy, mode);
-      }
-      else
-      {            
-         *this = ossimDrect(minx,maxy, maxx, miny, mode);
-      }
-   }
-}
-
-
-//*******************************************************************
-//! Constructs an ossimDrect surrounding the specified point, and of specified size.
-//*******************************************************************
-ossimDrect::ossimDrect(const ossimDpt& center, 
-                       const double&   size_x, 
-                       const double&   size_y,
-                       ossimCoordSysOrientMode mode)
-: theOrientMode(mode)
-{
-   double dx = fabs(size_x);
-   double dy = fabs(size_y);
-
-   double minx = center.x - dx/2.0;
-   double maxx = minx + dx;
-
-   double miny = center.y - dy/2.0;
-   double maxy = miny + dy;
-
-   if(mode == OSSIM_LEFT_HANDED)
-      *this = ossimDrect(minx, miny, maxx, maxy, mode);
-   else
-      *this = ossimDrect(minx,maxy, maxx, miny, mode);
-}
-
-ossimDrect::~ossimDrect()
-{
-}
-
-void ossimDrect::initBoundingRect(const std::vector<ossimDpt>& points)
-{
-   unsigned long index;
-
-   // initialize everyone to the first point
-   if(points.size() > 0)
-   {
-      theUlCorner.x = points[0].x;
-      theUlCorner.y = points[0].y;
-      theLrCorner.x = theUlCorner.x;
-      theLrCorner.y = theUlCorner.y;
-   }
-   
-   // find the bounds
-   for(index = 1; index < points.size();index++)
-   {
-      // find left most
-      if(points[index].x < theUlCorner.x)
-         theUlCorner.x = points[index].x;
-
-      // find right most
-      else if(points[index].x > theLrCorner.x)
-         theLrCorner.x = points[index].x;
-
-      if (theOrientMode == OSSIM_LEFT_HANDED)
-      {
-         //find top most
-         if(points[index].y < theUlCorner.y)
-            theUlCorner.y = points[index].y;
-
-         // find bottom most
-         else if(points[index].y > theLrCorner.y)
-            theLrCorner.y = points[index].y;
-      }
-
-      else // right handed coord system
-      {
-         if(points[index].y > theUlCorner.y)
-            theUlCorner.y = points[index].y;
-
-         // find bottom most
-         else if(points[index].y < theLrCorner.y)
-            theLrCorner.y = points[index].y;
-      }
-   }
-
-   // now set the other points for the rect.
-   theUrCorner.x = theLrCorner.x;
-   theUrCorner.y = theUlCorner.y;
-   theLlCorner.x = theUlCorner.x;
-   theLlCorner.y = theLrCorner.y;
-}
-
-//*******************************************************************
-// Public Method:
-//*******************************************************************
-bool ossimDrect::intersects(const ossimDrect& rect) const
-{
-   if(rect.hasNans() || hasNans())
-   {
-      return false;
-   }
-   if (theOrientMode != rect.theOrientMode)
-      return false;
-   
-   ossim_float64  ulx = ossim::max(rect.ul().x,ul().x);
-   ossim_float64  lrx = ossim::min(rect.lr().x,lr().x);
-   ossim_float64  uly, lry;
-   bool rtn=false;
-   if (theOrientMode == OSSIM_LEFT_HANDED)
-   {
-      uly  = ossim::max(rect.ul().y,ul().y);
-      lry  = ossim::min(rect.lr().y,lr().y);
-      rtn = ((ulx <= lrx) && (uly <= lry));
-   }
-   else
-   {
-      uly  = ossim::max(rect.ll().y,ll().y);
-      lry  = ossim::min(rect.ur().y,ur().y);
-      rtn = ((ulx <= lrx) && (uly <= lry));
-   }
-      
-   return (rtn);
-}
-
-//*******************************************************************
-// Public Method: ossimDrect::completely_within
-//*******************************************************************
-bool ossimDrect::completely_within(const ossimDrect& rect) const
-{
-   if(hasNans() || rect.hasNans())
-   {
-      return false;
-   }
-   if (theOrientMode != rect.theOrientMode)
-      return false;
-   
-   /*  --------------
-       |     1      |
-       | ---------- |
-       | |        | |
-       | |        | |
-       | |   2    | |
-       | |        | |
-       | |        | |
-       | ---------- |
-       |            |
-       --------------  */
-
-   bool rtn = true;
-   
-   if (theUlCorner.x < rect.ul().x)
-      rtn = false;
-   
-   else if (theLrCorner.x > rect.lr().x)
-      rtn = false;
-   
-   else if (theOrientMode == OSSIM_LEFT_HANDED)
-   {
-      if (theUlCorner.y < rect.ul().y)
-         rtn = false;
-   
-      else if (theLrCorner.y > rect.lr().y)
-         rtn = false;
-   }
-   
-   else
-   {
-      if (theUlCorner.y > rect.ul().y)
-         rtn = false;
-   
-      else if (theLrCorner.y < rect.lr().y)
-         rtn = false;
-   }
-
-   return rtn;
-}
-
-//*******************************************************************
-// Public Method: ossimDrect::stretchOut
-//*******************************************************************
-void ossimDrect::stretchOut()
-{
-   set_ulx(floor(theUlCorner.x));
-   set_lrx(ceil(theLrCorner.x));
-
-   if (theOrientMode == OSSIM_LEFT_HANDED)
-   {
-      set_uly(floor(theUlCorner.y));
-      set_lry(ceil(theLrCorner.y));
-   }
-   else
-   {
-      set_uly(ceil(theUlCorner.y));
-      set_lry(floor(theLrCorner.y));
-   }
-}
-
-void ossimDrect::stretchToTileBoundary(const ossimDpt& widthHeight)
-{
-   ossimDpt ul;
-   ossimDpt lr;
-   ossim_int32 evenDivision=0;
-
-   if(theOrientMode == OSSIM_LEFT_HANDED)
-   {
-      ul.x = theUlCorner.x;
-      if( fmod(theUlCorner.x, widthHeight.x) != 0)
-      {
-         ul.x = ((long)(ul.x / widthHeight.x))*widthHeight.x;
-         if(ul.x > theUlCorner.x)
-         {
-            ul.x -= widthHeight.x;
-         }
-      }
-      ul.y = theUlCorner.y;
-      if( fmod(theUlCorner.y, widthHeight.y) != 0)
-      {
-         ul.y = ((long)(ul.y / widthHeight.y))*widthHeight.y;
-         if(ul.y > theUlCorner.y)
-         {
-            ul.y -= widthHeight.y;
-         }
-      }
-      
-      evenDivision = fmod(theLrCorner.x, widthHeight.x) == 0;
-      lr.x = theLrCorner.x;
-      if(!evenDivision)
-      {
-         lr.x = ((long)((lr.x)/widthHeight.x)) * widthHeight.x;
-         if(lr.x < theLrCorner.x)
-         {
-            lr.x += widthHeight.x;
-         }
-      }
-
-      evenDivision = fmod(theLrCorner.y, widthHeight.y) == 0;
-      lr.y = theLrCorner.y;
-      if(!evenDivision)
-      {
-         lr.y = ((long)(lr.y/widthHeight.y)) * widthHeight.y;
-         if(lr.y < theLrCorner.y)
-         {
-            lr.y += widthHeight.y;
-         }
-      }
-   }
-   else
-   {
-      ul.x = theUlCorner.x;
-      ul.y = theUlCorner.y;
-      if( !ossim::almostEqual(fmod(theUlCorner.x, widthHeight.x), 0.0))
-      {
-         ul.x = ((long)(ul.x/ widthHeight.x))*widthHeight.x;
-         if(ul.x > theUlCorner.x)
-         {
-            ul.x -= widthHeight.x;
-         }
-      }
-      if( !ossim::almostEqual((double)fmod(theUlCorner.y, widthHeight.y), 0.0) )
-      {
-         ul.y = ((long)(ul.y / widthHeight.y))*widthHeight.y;
-         if(ul.y < theUlCorner.y)
-         {
-            ul.y += widthHeight.y;
-         }
-      }
-      
-      evenDivision = ossim::almostEqual( fmod(theLrCorner.x, widthHeight.x), 0.0);
-      lr.x = theLrCorner.x;
-      if(!evenDivision)
-      {
-         lr.x = ((long)(lr.x/widthHeight.x)) * widthHeight.x;
-         if(lr.x < theLrCorner.x)
-         {
-            lr.x += widthHeight.x;
-         }
-      }
-
-      evenDivision = ossim::almostEqual(fmod(theLrCorner.y, widthHeight.y), 0.0);
-      lr.y = theLrCorner.y;
-      if(!evenDivision)
-      {
-         lr.y = ((long)(lr.y/widthHeight.y)) * widthHeight.y;
-
-         if(lr.y > theLrCorner.y)
-         {
-            lr.y -= widthHeight.y;
-         }
-      }
-  }
-
-   *this = ossimDrect(ul, lr, theOrientMode);
-}
-
-const ossimDrect& ossimDrect::expand(const ossimDpt& padding)
-{
-   theUlCorner.x -= padding.x;
-   theUrCorner.x += padding.x;
-   theLrCorner.x += padding.x;
-   theLlCorner.x -= padding.x;
-   if(theOrientMode == OSSIM_LEFT_HANDED)
-   {
-      theUlCorner.y -= padding.y;
-      theUrCorner.y -= padding.y;
-      theLrCorner.y += padding.y;
-      theLlCorner.y += padding.y;
-   }
-   else
-   {
-      theUlCorner.y += padding.y;
-      theUrCorner.y += padding.y;
-      theLrCorner.y -= padding.y;
-      theLlCorner.y -= padding.y;
-   }
-   
-   return *this;
-}
-ossimString ossimDrect::toString()const
-{
-   ossimString result="(";
-   
-   if(theOrientMode == OSSIM_LEFT_HANDED)
-   {
-      ossimDpt origin = ul();
-      result += (ossimString::toString(origin.x) + ",");
-      result += (ossimString::toString(origin.y) + ",");
-      result += (ossimString::toString(width()) + ",");
-      result += (ossimString::toString(height()) + ",");
-      result += "LH";
-   }
-   else 
-   {
-      ossimDpt origin = ll();
-      result += (ossimString::toString(origin.x) + ",");
-      result += (ossimString::toString(origin.y) + ",");
-      result += (ossimString::toString(width()) + ",");
-      result += (ossimString::toString(height()) + ",");
-      result += "RH";
-   }
-   
-   result += ")";
-   return result;
-}
-
-bool ossimDrect::toRect(const ossimString& rectString)
-{
-   bool result = false;
-   
-   
-   std::istringstream in(rectString);
-   ossim::skipws(in);
-   char charString[2];
-   charString[1] = '\0';
-   ossimString interior;
-   if(in.peek() == '(')
-   {
-      in.ignore();
-      while((in.peek() != ')')&&
-            (in.peek() != '\n') &&
-            in.good())
-      {
-         charString[0] = in.get();
-         interior += charString;
-      }
-      if(in.peek() == ')')
-      {
-         result = true;
-      }
-   }
-   if(result)
-   {
-      std::vector<ossimString> splitArray;
-      interior.split(splitArray, ",");
-      
-      // assume left handed
-      if(splitArray.size() >= 4)
-      {
-         ossim_float64 x = splitArray[0].toDouble();
-         ossim_float64 y = splitArray[1].toDouble();
-         ossim_float64 w = splitArray[2].toDouble();
-         ossim_float64 h = splitArray[3].toDouble();
-         ossimString orientation = "lh";
-         if(splitArray.size() == 5)
-         {
-            orientation = splitArray[4].downcase();
-         }
-         if(orientation == "lh")
-         {
-            // origin upper left
-            *this = ossimDrect(x,y,x + (w-1), y+h-1, OSSIM_LEFT_HANDED);
-         }
-         else 
-         {
-            // origin lower left so construct and make an upper left
-            *this = ossimDrect(x,y+(h-1),x + (w-1), y, OSSIM_RIGHT_HANDED);
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      
-   }
-   return result;
-}
-
-bool ossimDrect::saveState(ossimKeywordlist& kwl,
-                           const char* prefix)const
-{
-   kwl.add(prefix,
-           ossimKeywordNames::TYPE_KW,
-           "ossimDrect",
-           true);
-
-   kwl.add(prefix, "rect", toString());
-
-   return true;
-}
-
-bool ossimDrect::loadState(const ossimKeywordlist& kwl,
-                           const char* prefix)
-{
-  const char* rect = kwl.find(prefix, "rect");
-  makeNan();
-
-  if(rect)
-  {
-      toRect(rect);
-  }
-   
-   return true;
-}
-
-//*******************************************************************
-// Public Method: ossimDrect::print
-//*******************************************************************
-void ossimDrect::print(std::ostream& os) const
-{
-   os << toString();
-}
-
-//*******************************************************************
-// friend function: operator<<
-//*******************************************************************
-std::ostream& operator<<(std::ostream& os, const ossimDrect& rect)
-{
-   rect.print(os);
-
-   return os;
-}
-
-//*******************************************************************
-// Public Method: ossimDrect::clip
-//*******************************************************************
-bool ossimDrect::clip(ossimDpt &p1, ossimDpt &p2)const
-{
-   if(p1.isNan() || p2.isNan())
-   {
-      return false;
-   }
-   ossimDpt shift(-theUlCorner.x,
-		  -theUlCorner.y);
-
-   ossimDpt tempShiftP1 = p1+shift;
-   ossimDpt tempShiftP2 = p2+shift;
-   double maxW = width()-1;
-   double maxH = height()-1;
-   if (clip_1d (&tempShiftP1.x, &tempShiftP1.y, 
-                &tempShiftP2.x, &tempShiftP2.y, 
-                maxW) == 0)
-   {
-      return false;
-   }
-   if(clip_1d (&tempShiftP1.y, 
-               &tempShiftP1.x, 
-               &tempShiftP2.y, 
-               &tempShiftP2.x, maxH) == 0)
-   {
-      return false;
-   }
-   p1 = tempShiftP1-shift;
-   p2 = tempShiftP2-shift;
-   return true;
-}
-
-//*******************************************************************
-// Public Method: ossimDrect::getCode
-//*******************************************************************
-long ossimDrect::getCode(const ossimDpt& aPoint,
-                         const ossimDrect& clipRect)
-{
-   long result=NONE; // initialize to inside rect
-   
-   if( (aPoint.x > clipRect.lr().x) )
-      result |= RIGHT;
-   else if( (aPoint.x < clipRect.ul().x) )
-      result |= LEFT;
-
-   if (clipRect.theOrientMode == OSSIM_LEFT_HANDED)
-   {
-      if( (aPoint.y < clipRect.ul().y) )
-         result |= TOP;
-      else if( (aPoint.y > clipRect.lr().y) )
-         result |= BOTTOM;
-   }
-   else
-   {
-      if( (aPoint.y > clipRect.ul().y) )
-         result |= TOP;
-      else if( (aPoint.y < clipRect.lr().y) )
-         result |= BOTTOM;
-   }
-      
-   return result;
-}
-
-
-void ossimDrect::splitToQuad(ossimDrect& ulRect,
-                             ossimDrect& urRect,
-                             ossimDrect& lrRect,
-                             ossimDrect& llRect)
-{
-   ossimDpt ulPt  = this->ul();
-   ossimDpt urPt  = this->ur();
-   ossimDpt lrPt  = this->lr();
-   ossimDpt llPt  = this->ll();
-   ossimIpt midPt = this->midPoint();
-   
-   ulRect = ossimDrect(ulPt.x,
-                       ulPt.y,
-                       midPt.x,
-                       midPt.y,
-                       theOrientMode);
-   
-   urRect = ossimDrect(midPt.x,
-                       ulPt.y,
-                       urPt.x,
-                       midPt.y,
-                       theOrientMode);
-   
-   if(theOrientMode  == OSSIM_LEFT_HANDED)
-   {
-      lrRect = ossimDrect(midPt.x,
-                          midPt.y,
-                          lrPt.x,
-                          theOrientMode);
-      llRect = ossimDrect(ulPt.x,
-                          midPt.y,
-                          midPt.x,
-                          llPt.y,
-                          theOrientMode);
-   }
-   else
-   {       
-      lrRect = ossimDrect(midPt.x,
-                          midPt.y,
-                          lrPt.x,
-                          theOrientMode);
-      llRect = ossimDrect(ulPt.x,
-                          midPt.y,
-                          midPt.x,
-                          llPt.y,
-                          theOrientMode);       
-   }
-   
-}
-
-//*******************************************************************
-// Public Method: ossimDrect::clipToRect
-//*******************************************************************
-ossimDrect ossimDrect::clipToRect(const ossimDrect& rect)const
-{
-   ossimDrect result;
-   result.makeNan();
-   if(rect.hasNans() || hasNans())
-   {
-
-      return result;
-   }
-   
-   if (theOrientMode != rect.theOrientMode)
-      return (*this);
-
-   double x0 = ossim::max(rect.ul().x, ul().x);
-   double x1 = ossim::min(rect.lr().x, lr().x);
-   double y0, y1;
-
-   if (theOrientMode == OSSIM_LEFT_HANDED)
-   {
-      y0 = ossim::max(rect.ll().y, ll().y);
-      y1 = ossim::min(rect.ur().y, ur().y);
-
-      if( (x1 < x0) || (y1 < y0) )
-         return result;
-      else
-         result = ossimDrect(x0, y0, x1, y1, theOrientMode);
-   }
-   else
-   {
-      y0 = ossim::max(rect.ll().y,ll().y);
-      y1 = ossim::min(rect.ur().y,ur().y);
-      if((x0 <= x1) && (y0 <= y1))
-      {
-         result = ossimDrect(x0, y1, x1, y0, theOrientMode);
-      }
-   }
-   return result;
-}
-
-const ossimDrect& ossimDrect::operator=(const ossimIrect& rect)
-{
-   if(rect.isNan())
-   {
-      makeNan();
-   }
-   else
-   {
-      theUlCorner   = rect.ul();
-      theUrCorner   = rect.ur();
-      theLrCorner   = rect.lr();
-      theLlCorner   = rect.ll();
-      theOrientMode = rect.orientMode();
-   }
-   
-   return *this;
-}
-
-//*************************************************************************************************
-// Finds the point on the rect boundary that is closest to the arg_point. Closest is defined as
-// the minimum perpendicular distance.
-//*************************************************************************************************
-ossimDpt ossimDrect::findClosestEdgePointTo(const ossimDpt& arg_point) const
-{
-   double dXleft  = theUlCorner.x - arg_point.x;
-   double dXright = theLrCorner.x - arg_point.x;
-   double dYupper = theUlCorner.y - arg_point.y;
-   double dYlower = theLrCorner.y - arg_point.y;
-
-   ossimDpt edge_point (theLrCorner);
-
-   if (dXleft*dXright < 0.0)
-      edge_point.x = arg_point.x;
-   else if (fabs(dXleft) < fabs(dXright))
-      edge_point.x = theUlCorner.x;
-
-   if (dYupper*dYlower < 0.0)
-      edge_point.y = arg_point.y;
-   else if (fabs(dYupper) < fabs(dYlower))
-      edge_point.y = theUlCorner.y;
-
-   return edge_point;
-}
-
diff --git a/src/ossim/base/ossimDuration.cpp b/src/ossim/base/ossimDuration.cpp
deleted file mode 100644
index bb434cd..0000000
--- a/src/ossim/base/ossimDuration.cpp
+++ /dev/null
@@ -1,269 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id$
-#include <ossim/base/ossimDuration.h>
-#include <ossim/base/ossimCommon.h>
-#include <sstream>
-#include <cctype>
-ossimDuration::ossimDuration(const ossimString& iso8601Duration)
-:theSign(1),
-theYears(0),
-theMonths(0),
-theWeeks(0),
-theDays(0),
-theHours(0),
-theMinutes(0),
-theSeconds(0)
-{
-   if(!iso8601Duration.empty())
-   {
-      setByIso8601DurationString(iso8601Duration);
-   }
-}
-
-void ossimDuration::clearFields()
-{
-   theSign = 1; 
-   theYears = 0;
-   theMonths = 0;
-   theWeeks = 0;
-   theDays = 0;
-   theHours = 0;
-   theMinutes = 0;
-   theSeconds = 0; 
-}
-
-static bool isWhiteSpace(int c)
-{
-   return ((c==' ') ||
-           (c=='\n')||
-           (c=='\r')||
-           (c=='\t'));
-}
-
-bool ossimDuration::readIso8601Encoding(std::istream& in)
-{
-   clearFields();
-   
-   if(in.peek()=='-')
-   {
-      theSign = -1;
-      in.ignore();
-   }
-   if(in.peek()!='P')
-   {
-      return false;
-   }
-   // skip the period indicater
-   in.ignore();
-   
-   // now we start parsing the date portion and the time portion
-   ossimString value;
-   bool doneFlag     = false;
-   bool badParseFlag = false;
-   bool doingTimeFlag = false;
-   while(!doneFlag)
-   {
-      int c = in.peek();
-      if(!in)
-      {
-         doneFlag = true;
-      }
-      else
-      {
-         if(isWhiteSpace(c))
-         {
-            doneFlag = true; // parse til blank character is met
-         }
-         else if(isalpha(c))
-         {
-            // we are done with current value 
-            //
-            // check to see if was a Time seaprator of value
-            // 'T'
-            if(c == 'T')
-            {
-               // then it was a time separator so do nothing
-               value = ""; // go ahead and null it out for now
-               doingTimeFlag = true; // now in time parsing portion
-            }
-            else
-            {
-               if(doingTimeFlag)
-               {
-                  // check time values
-                  if(c == 'H')
-                  {
-                     theHours = value.toUInt64();
-                  }
-                  else if(c == 'M')
-                  {
-                     theMinutes = value.toUInt64();
-                  }
-                  else if(c == 'S')
-                  {
-                     theSeconds = value.toFloat64();
-                  }
-                  else
-                  {
-                     doneFlag = true;
-                     badParseFlag = true;
-                  }
-                  value = ""; // reset the value
-               }
-               else // check date characters instead
-               {
-                  if(c == 'Y')
-                  {
-                     theYears = value.toUInt64();
-                  }
-                  else if(c == 'M')
-                  {
-                     theMonths = value.toUInt64();
-                  }
-                  else if(c == 'W')
-                  {
-                     theWeeks = value.toUInt64();
-                  }
-                  else if(c == 'D')
-                  {
-                     theDays = value.toUInt64();
-                  }
-                  else
-                  {
-                     doneFlag = true;
-                     badParseFlag = true;
-                  }
-                  value = ""; // reset the value
-               }
-            }
-         }
-         else if(isdigit(c)||(c=='.'))// not an alphabetic character so add it to the value string
-         {
-            value += static_cast<char>(c);
-         }
-         else
-         {
-            doneFlag = true;
-            badParseFlag = true;
-         }
-      }
-      if(!doneFlag)
-      {
-         in.ignore();
-      }
-   }
-   
-   return badParseFlag;
-}
-
-bool ossimDuration::setByIso8601DurationString(const ossimString& iso8601Duration)
-{
-   if(iso8601Duration.empty())
-   {
-      clearFields();
-      return true;
-   }
-   std::istringstream in(iso8601Duration);
-   return readIso8601Encoding(in);
-}
-
-void ossimDuration::toIso8601DurationString(ossimString& result)
-{
-   result = "";
-   bool hasDatePeriod = ((theYears!=0)||
-                         (theMonths!=0)||
-                         (theWeeks!=0)||
-                         (theDays!=0));
-   bool hasTimePeriod = ((theHours!=0)||
-                         (theMinutes!=0)||
-                         (!ossim::almostEqual(theSeconds, 0.0, .00000000001)));
-   // if no time or date period present then return empty
-   if(!(hasDatePeriod || hasTimePeriod))
-   {
-      return;
-   }
-   if(theSign < 0)
-   {
-      result += "-";
-   }
-   result += "P";
-   if(hasDatePeriod)
-   {
-      if(theYears > 0)
-      {
-         result+=ossimString::toString(theYears);
-         result+="Y";
-      }
-      if(theMonths>0)
-      {
-         result+=ossimString::toString(theMonths);
-         result+="M";
-      }
-      if(theWeeks>0)
-      {
-         result+=ossimString::toString(theWeeks);
-         result+="W";
-      }
-      if(theDays>0)
-      {
-         result+=ossimString::toString(theDays);
-         result+="D";
-      }
-   }
-   if(hasTimePeriod)
-   {
-      result+="T";
-      if(theHours>0)
-      {
-         result+=ossimString::toString(theHours);
-         result+="H";
-      }
-      if(theMinutes>0)
-      {
-         result+=ossimString::toString(theMinutes);
-         result+="M";
-      }
-      if(theSeconds>0)
-      {
-         result+=ossimString::toString(theSeconds, 15);
-         result+="S";
-      }
-   }
-}
-
-ossim_float64 ossimDuration::toSeconds()const
-{
-   ossim_float64 result = theSeconds;
-   
-   if(theMinutes > 0)
-   {
-      result += theMinutes*60.0;
-   }
-   if(theHours > 0)
-   {
-      result += theHours*3600.0;
-   }
-   if(theDays > 0)
-   {
-      result += theDays*86400.0;
-   }
-   if(theWeeks > 0)
-   {
-      result += theWeeks*604800;
-   }
-   if(theSign < 0)
-   {
-      result *= -1.0;
-   }
-   return result;
-}
-
-
diff --git a/src/ossim/base/ossimEllipsoid.cpp b/src/ossim/base/ossimEllipsoid.cpp
deleted file mode 100644
index 20e8647..0000000
--- a/src/ossim/base/ossimEllipsoid.cpp
+++ /dev/null
@@ -1,661 +0,0 @@
-///*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// DESCRIPTION:
-//   Contains implementation of class ossimEllipsoid. The implementation is
-//   actually for an OBLATE SPHEROID (x.radius = y.radius) as Earth is
-//   considered.
-//
-// SOFTWARE HISTORY:
-//>
-//   06Aug2001  Garrett Potts, Oscar Kramer
-//              Initial coding.
-//<
-//*****************************************************************************
-//  $Id: ossimEllipsoid.cpp 21164 2012-06-24 20:17:58Z dhicks $
-
-#include <ossim/base/ossimEllipsoid.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimEllipsoidFactory.h>
-#include <ossim/base/ossimEcefRay.h>
-#include <ossim/base/ossimEcefPoint.h>
-#include <ossim/base/ossimEcefVector.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimMatrix4x4.h>
-
-//***
-// Define Trace flags for use within this file:
-//***
-#include <ossim/base/ossimTrace.h>
-static ossimTrace traceExec  ("ossimEllipsoid:exec");
-static ossimTrace traceDebug ("ossimEllipsoid:debug");
-
-
-//*****************************************************************************
-//  CONSTRUCTOR: ossimEllipsoid #1 (COPY)
-//  
-//*****************************************************************************
-ossimEllipsoid::ossimEllipsoid(const ossimEllipsoid &ellipsoid)
-   :
-      theName(ellipsoid.theName),
-      theCode(ellipsoid.theCode),
-      theEpsgCode(ellipsoid.theEpsgCode),
-      theA(ellipsoid.theA),
-      theB(ellipsoid.theB),
-      theFlattening(ellipsoid.theFlattening),
-      theA_squared(ellipsoid.theA_squared),
-      theB_squared(ellipsoid.theB_squared),
-      theEccentricitySquared(ellipsoid.theEccentricitySquared)
-{
-   if ( theEpsgCode == 0 )
-   {
-      theEpsgCode = ossimEllipsoidFactory::instance()->findEpsgCode(theCode);
-   }
-}
-
-//*****************************************************************************
-//  CONSTRUCTOR: ossimEllipsoid #2
-//  
-//*****************************************************************************
-ossimEllipsoid::ossimEllipsoid(const ossimString &name,
-                               const ossimString &code,
-                               const double &a,
-                               const double &b,
-                               ossim_uint32 epsg_code)
-   :
-      theName(name),
-      theCode(code),
-      theEpsgCode(epsg_code),
-      theA(a),
-      theB(b),
-      theA_squared(a*a),
-      theB_squared(b*b)
-{
-   if (theEpsgCode == 0)
-   theEpsgCode = ossimEllipsoidFactory::instance()->findEpsgCode(theCode);
-
-   computeFlattening();   
-   theEccentricitySquared = 2*theFlattening - theFlattening*theFlattening;
-}
-
-ossimEllipsoid::ossimEllipsoid()
-{
-   const ossimEllipsoid* ellipse = ossimEllipsoidFactory::instance()->wgs84();
-   
-   *this = *ellipse;
-}
-
-//*****************************************************************************
-//  CONSTRUCTOR: ossimEllipsoid #3
-//  
-//*****************************************************************************
-ossimEllipsoid::ossimEllipsoid(const double &a,
-                               const double &b)
-   :
-      theName(""), // initialize to empty
-      theCode(""),
-      theEpsgCode(0),
-      theA(a),
-      theB(b),
-      theA_squared(a*a),
-      theB_squared(b*b)
-{
-   // First check if this is just WGS84:
-   const ossimEllipsoid* wgs84 = ossimEllipsoidFactory::instance()->wgs84();
-   if ((theA == wgs84->theA) && (theB == wgs84->theB))
-   {
-      *this = *wgs84;
-   }
-   else
-   {
-      computeFlattening();
-      theEccentricitySquared = 2*theFlattening - theFlattening*theFlattening;
-   }
-}
-
-//*****************************************************************************
-//  METHOD: ossimEllipsoid::nearestIntersection
-//  
-//*****************************************************************************
-bool ossimEllipsoid::nearestIntersection(const ossimEcefRay &ray,
-                                         ossimEcefPoint& rtnPt) const
-{
-   return nearestIntersection(ray, 0.0, rtnPt);
-}
-
-//*****************************************************************************
-//  METHOD: ossimEllipsoid::nearestIntersection
-//  
-//   geographic objects that are derive this class will asssume that
-//   the reference datum is wgs84 and that the ray origin is a
-//   geocentric coordinate relative to the wgs84 datum.  Will return
-//   true if the object was intersected and false otherwise.
-//  
-//   The nearest intersection will use the ray sphere intersection
-//   found in most ray tracers.  We will take a Ray defined by the
-//   parametric equation:
-//  
-//     x = x0 + dxt
-//     y = y0 + dyt
-//     z = z0 + dzt
-//  
-//   and intersect this with the equation of a spheroid:
-//  
-//     x^2/theXRadius^2 + y^2/theYRadius^2 + z^2/theZRadius^2 = 1
-//  
-//  
-//   the intersection is achived by substituting the parametric line
-//   into the equation of the sphereroid.  By doing this you should
-//   get a quadratic in t and the equation should look like this:
-//  
-//    a*t^2 + b*t + c = 0
-//  
-//      let a = dx^2/theXRadius^2 + dy^2/theYRadius^2 + dz^2/theZRadius^2
-//      let b = 2*(x0*dx/theXRadius^2 +y0*dy/theYRadius^2 + z0*dz/theZRadius^2
-//      let c = x0^2/theXRadius^2 + y0^2/theYRadius^2 + z0^2/theZRadius^2 - 1
-//  
-//  
-//    Now solve the quadratic (-b +- sqrt(b^2 - 4ac) ) / 2a
-//  
-//    After solving for t, the parameter is applied to the ray to determine
-//    the 3D point position in X,Y,Z, passed back in rtnPt. The boolean
-//    "true" is returned if an intersection was found.
-//
-//*****************************************************************************
-bool ossimEllipsoid::nearestIntersection(const ossimEcefRay& ray,
-                                         const double&       offset,
-                                         ossimEcefPoint&     rtnPt) const
-{
-   static const char MODULE[] = "ossimEllipsoid::nearestIntersection";
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG: " << MODULE << ", entering...\n";
-
-   
-   double A_squared = (theA + offset)*(theA + offset);
-   double B_squared = (theB + offset)*(theB + offset);
-
-//    double adjustedOffset = offset/theA;
-//    double bOverA = theB/theA;
-//    double A_squared = (1.0+adjustedOffset)*(1.0+adjustedOffset);
-//    double B_squared = ((bOverA+adjustedOffset)*(bOverA+adjustedOffset));//(theB + offset)*(theB + offset);
-   
-   //***
-   // get the origin and direction of ray:
-   //***
-   ossimEcefPoint  start = ray.origin();   
-   ossimEcefVector direction = ray.direction();
-//    start = ossimEcefPoint(start.x()/theA,
-//                           start.y()/theA,
-//                           start.z()/theA);
-   //***
-   // Solve the coefficents of the quadratic formula
-   //***
-   double a = ((direction.x() * direction.x())/A_squared) +
-              ((direction.y() * direction.y())/A_squared) +
-              ((direction.z() * direction.z())/B_squared);
-
-   double b = 2.0*( ((start.x()*direction.x())/A_squared) +
-                    ((start.y()*direction.y())/A_squared) +
-                    ((start.z()*direction.z())/B_squared) );
-
-   double c = ((start.x()*start.x())/A_squared) +
-              ((start.y()*start.y())/A_squared) +
-              ((start.z()*start.z())/B_squared) - 1.0;
-   
-   //***
-   // solve the quadratic
-   //***
-   double root = b*b - 4*a*c;
-   double t;
-   if(root < 0.0)
-   {
-      return false;
-   }
-   else
-   {
-      double squareRoot = sqrt(root);
-      double t1 = (-b + squareRoot ) / (2.0*a);
-      double t2 = (-b - squareRoot ) / (2.0*a);
-
-      //***
-      // sort t1 and t2 and take the nearest intersection if they
-      // are in front of the ray.
-      //***
-      if(t2 < t1)
-      {
-         double temp = t1;
-         t1 = t2;
-         t2 = temp;
-      }     
-
-       if(t1 > 0.0)
-          t = t1;
-       else
-          t = t2;
-//      t = t1;
-   }
-
-   //***
-   // Now apply solved t to ray to extrapolate correct distance to intersection
-   //***
-//    bool rtnval = false;
-//    if (t >= 0)
-//    {
-//       rtnval = true;
-//       rtnPt  = ray.extend(t); 
-// //       rtnPt  = ray.extend(t*theA); 
-//    }
-      
-   bool rtnval = true;
-   rtnPt  = ray.extend(t); 
-
-   return rtnval; 
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimEllipsoid::evaluate(ossimColumnVector3d)
-//  
-//  Returns neg number if inside, 0 if on, and pos number if outside of
-//  ellipsoid.
-//  
-//*****************************************************************************
-double ossimEllipsoid::evaluate(const ossimEcefPoint &location)const
-{
-   //***
-   // get the axis
-   //***
-   return (((location.x() * location.x())/theA_squared) +
-           ((location.y() * location.y())/theA_squared) +
-           ((location.z() * location.z())/theB_squared) - 1.0);   
-}
- 
-//*****************************************************************************
-//  METHOD: ossimEllipsoid::gradient()  version A
-//  
-//  Returns vector normal to the ellipsoid at point specified.
-//  
-//*****************************************************************************
-void ossimEllipsoid::gradient(const ossimEcefPoint& location,
-                              ossimEcefVector&      result) const
-{
-   result.x() = (2.0*location.x())/theA_squared;
-   result.y() = (2.0*location.y())/theA_squared;
-   result.z() = (2.0*location.z())/theB_squared;
-}
-
-//*****************************************************************************
-//  METHOD: ossimEllipsoid::gradient()  version B
-//  
-//  Returns vector normal to the ellipsoid at point specified.
-//  
-//*****************************************************************************
-ossimEcefVector
-ossimEllipsoid::gradient(const ossimEcefPoint &location)const
-{
-   ossimEcefVector result;
-   gradient(location, result);
-   return result;
-}
-   
-   
-bool ossimEllipsoid::loadState(const ossimKeywordlist& kwl,
-                               const char* prefix)
-{
-   const char* lookup = kwl.find(prefix, ossimKeywordNames::ELLIPSE_CODE_KW);
-   bool foundCode = false;
-   if(lookup)
-   {
-      const ossimEllipsoid* ellipse = ossimEllipsoidFactory::instance()->create(ossimString(lookup));
-
-      if(ellipse)
-      {
-         foundCode = true;
-         *this = *ellipse;
-      }
-   }
-
-   lookup = kwl.find(prefix, ossimKeywordNames::ELLIPSE_EPSG_CODE_KW);
-   if (lookup)
-   {
-      theEpsgCode = ossimString(lookup).toUInt32();
-   }
-
-   if(!foundCode)
-   {     
-      const char* majorAxis = kwl.find(prefix,
-                                       ossimKeywordNames::MAJOR_AXIS_KW);
-      const char* minorAxis = kwl.find(prefix,
-                                       ossimKeywordNames::MAJOR_AXIS_KW);
-
-      theName = "";
-      theCode = "";
-      if(majorAxis && minorAxis)
-      {
-         theA = ossimString(majorAxis).toDouble();
-         theB = ossimString(minorAxis).toDouble();
-
-         computeFlattening();
-         theA_squared = theA*theA;
-         theB_squared = theB*theB;
-      }
-      else
-      {
-         const ossimEllipsoid* ellipse = ossimEllipsoidFactory::instance()->wgs84();
-         
-         *this = *ellipse;
-      }      
-   }
-
-   return true;
-}
-
-bool ossimEllipsoid::saveState(ossimKeywordlist& kwl,
-                               const char* prefix)const
-{
-   if(theCode != "")
-   {
-      kwl.add(prefix,
-              ossimKeywordNames::ELLIPSE_CODE_KW,
-              theCode.c_str(),
-              true);
-
-      kwl.add(prefix,
-              ossimKeywordNames::ELLIPSE_NAME_KW,
-              theName.c_str(),
-              true);
-   }
-   if (theEpsgCode)
-   {
-      kwl.add(prefix, ossimKeywordNames::ELLIPSE_EPSG_CODE_KW, theEpsgCode, true);
-   }
-
-   kwl.add(prefix,
-           ossimKeywordNames::MAJOR_AXIS_KW,
-           theA,
-           true);
-   
-   kwl.add(prefix,
-           ossimKeywordNames::MINOR_AXIS_KW,
-           theB,
-           true);
-
-   return true;
-}
-
- 
-//*****************************************************************************
-//  METHOD: ossimEllipsoid::prinRadiiOfCurv()
-//  
-//  Computes the meridional radius and prime vertical at given point.
-//  
-//*****************************************************************************
-void ossimEllipsoid::prinRadiiOfCurv(const ossimEcefPoint& location,
-                                           double& merRadius,
-                                           double& primeVert) const
-{
-   double lat, lon, hgt;
-   XYZToLatLonHeight(location.x(), location.y(), location.z(), lat, lon, hgt);
-   
-   double sinPhi = sin(lat*RAD_PER_DEG);
-   double phiFac = 1.0 - theEccentricitySquared*sinPhi*sinPhi;
-   primeVert = theA / sqrt(phiFac);
-   merRadius = theA*(1.0-theEccentricitySquared) / sqrt(phiFac*phiFac*phiFac);
-}
-
- 
-//*****************************************************************************
-//  METHOD: ossimEllipsoid::jacobianWrtEcef()
-//  
-//  Forms Jacobian of partials of geodetic WRT ECF at given point.
-//           -                           -
-//           | pLat/pX  pLat/pY  pLat/pZ |
-//    jMat = | pLon/pX  pLon/pY  pLon/pZ |
-//           | pHgt/pX  pHgt/pY  pHgt/pZ |
-//           -                           -
-//  
-//*****************************************************************************
-void ossimEllipsoid::jacobianWrtEcef(const ossimEcefPoint& location,
-                                           NEWMAT::Matrix& jMat) const
-{
-   double primeVert;
-   double merRadius;
-   double lat, lon, hgt;
-   
-   XYZToLatLonHeight(location.x(), location.y(), location.z(), lat, lon, hgt);
-   prinRadiiOfCurv(location, merRadius, primeVert);
-   
-   double sinPhi = sin(lat*RAD_PER_DEG);
-   double cosPhi = cos(lat*RAD_PER_DEG);
-   double sinLam = sin(lon*RAD_PER_DEG);
-   double cosLam = cos(lon*RAD_PER_DEG);
-   double N_plus_h = primeVert + hgt;
-   double M_plus_h = merRadius + hgt;
-   
-   jMat(1,1) = -sinPhi * cosLam / M_plus_h;
-   jMat(2,1) = -sinLam / (cosPhi * N_plus_h);
-   jMat(3,1) = cosPhi * cosLam;
-   jMat(1,2) = -sinPhi * sinLam / M_plus_h;
-   jMat(2,2) =  cosLam / (cosPhi * N_plus_h);
-   jMat(3,2) = cosPhi * sinLam;
-   jMat(1,3) = cosPhi / M_plus_h;
-   jMat(2,3) = 0.0;
-   jMat(3,3) = sinPhi;
-}
-
- 
-//*****************************************************************************
-//  METHOD: ossimEllipsoid::jacobianWrtGeo()
-//  
-//  Forms Jacobian of partials of ECF WRT geodetic at given point.
-//           -                           -
-//           | pX/pLat  pX/pLon  pX/pHgt |
-//    jMat = | pY/pLat  pY/pLon  pY/pHgt |
-//           | pZ/pLat  pZ/pLon  pZ/pHgt |
-//           -                           -
-//  
-//*****************************************************************************
-void ossimEllipsoid::jacobianWrtGeo(const ossimEcefPoint& location,
-                                          NEWMAT::Matrix& jMat) const
-{
-   double primeVert;
-   double merRadius;
-   double lat, lon, hgt;
-   
-   XYZToLatLonHeight(location.x(), location.y(), location.z(), lat, lon, hgt);
-   prinRadiiOfCurv(location, merRadius, primeVert);
-   
-   double sinPhi = sin(lat*RAD_PER_DEG);
-   double cosPhi = cos(lat*RAD_PER_DEG);
-   double sinLam = sin(lon*RAD_PER_DEG);
-   double cosLam = cos(lon*RAD_PER_DEG);
-   double N_plus_h = primeVert + hgt;
-   double M_plus_h = merRadius + hgt;
-   
-   jMat(1,1) = -M_plus_h * sinPhi * cosLam;
-   jMat(2,1) = -M_plus_h * sinPhi * sinLam;
-   jMat(3,1) =  M_plus_h * cosPhi;
-   jMat(1,2) = -N_plus_h * cosPhi * sinLam;
-   jMat(2,2) =  N_plus_h * cosPhi * cosLam;
-   jMat(3,2) = 0.0;
-   jMat(1,3) = cosPhi * cosLam;
-   jMat(2,3) = cosPhi * sinLam;
-   jMat(3,3) = sinPhi;
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimEllipsoid::geodeticRadius()
-//  
-//  Computes the "geodetic" radius for a given latitude in degrees
-//  
-//*****************************************************************************
-double ossimEllipsoid::geodeticRadius(const double& lat) const
-{
-   double cos_lat = ossim::cosd(lat);
-   double sin_lat = ossim::sind(lat);
-   double cos2_lat = cos_lat*cos_lat;
-   double sin2_lat = sin_lat*sin_lat;
-   double a2_cos = theA_squared*cos_lat;
-   double b2_sin = theB_squared*sin_lat;
-   
-   return sqrt( ( (a2_cos*a2_cos) + (b2_sin*b2_sin) )/ (theA_squared*cos2_lat + theB_squared*sin2_lat));
-}
-
-//*************************************************************************************************
-//  Computes the "geodetic" radius of curvature of the ellipsoid in the east-west (x) and
-//  north-south (y) directions for a given latitude in DEGREES.
-//  Taken from http://en.wikipedia.org/wiki/Earth_radius
-//*************************************************************************************************
-void ossimEllipsoid::geodeticRadii(const double& lat, ossimDpt& radii) const
-{
-   double cos_lat = ossim::cosd(lat);
-   double sin_lat = ossim::sind(lat);
-   double cos2_lat = cos_lat*cos_lat;
-   double sin2_lat = sin_lat*sin_lat;
-   double H = theA_squared*cos2_lat + theB_squared*sin2_lat;
-   double H3 = H*H*H;
-
-   radii.x = theA_squared/sqrt(H);
-   radii.y = theA_squared*theB_squared/sqrt(H3);
-}
-
-void ossimEllipsoid::latLonHeightToXYZ(double lat, double lon, double height,
-                                       double &x, double &y, double &z)const
-{
-    double sin_latitude = ossim::sind(lat);
-    double cos_latitude = ossim::cosd(lat);
-    double N = theA / sqrt( 1.0 - theEccentricitySquared*sin_latitude*sin_latitude);
-    x = (N+height)*cos_latitude*ossim::cosd(lon);
-    y = (N+height)*cos_latitude*ossim::sind(lon);
-    z = (N*(1-theEccentricitySquared)+height)*sin_latitude;
-}
-
-void ossimEllipsoid::XYZToLatLonHeight(double x, double y, double z,
-                                       double& lat, double& lon, double& height)const
-{
-   double d = sqrt(x*x + y*y);
-
-   double phi2 = z / ((1 - theEccentricitySquared) * d);
-   double p = 1.0;
-   double phi1 = 0.0;
-   double N1 = 0.0;
-   double height1 = 0.0;
-   int iterIdx = 0;
-   const int MAX_ITER = 10;
-   if (fabs(phi2) > 1e-16 )
-   {
-      while ( (p > 1e-17) && (iterIdx < MAX_ITER))
-      {
-         phi1 = phi2;
-         N1 = theA / sqrt(1.0 - (theEccentricitySquared * pow(sin(phi1), 2.0)));
-         height1 = (d / cos(phi1) - N1);
-         phi2 = atan((z / d) * (1.0 + (theEccentricitySquared * N1 * sin(phi1)) / z));
-         p = fabs(phi2 - phi1);
-         ++iterIdx;
-         /* printf("phi: %e   phi2: %e   p: %e  \n", phi1, phi2, p); */
-      }                                                                                           
-   }                                                                                                   
-   else
-   {                                                                                              
-      phi1 = phi2;                                                                                
-      N1 = theA / sqrt(1.0 - (theEccentricitySquared * pow(sin(phi1), 2.0)));                    
-      height1 = (d / cos(phi1)) - N1;                                                             
-   }                                                                                                   
-
-   /* *Latitude = phi2 * 180/PI; */
-   /* *Longitude = atan2(Y, X) * 180/PI; */
-   lat = phi2*DEG_PER_RAD; 
-   lon = atan2(y, x)*DEG_PER_RAD;                                                                
-   height = height1; 
-
-#if 0
-    double p = sqrt(x*x + y*y);
-    double theta = atan(z*theA/ (p*theB));
-    double eDashSquared = (theA*theA - theB*theB)/
-                          (theB*theB);
-
-    double sin_theta = sin(theta);
-    double cos_theta = cos(theta);
-
-    lat = atan( (z + eDashSquared*theB*sin_theta*sin_theta*sin_theta) /
-                     (p - theEccentricitySquared*theA*cos_theta*cos_theta*cos_theta) );
-    lon = atan2(y,x);
-
-    double sin_latitude = sin(lat);
-    double N = theA / sqrt( 1.0 - theEccentricitySquared*sin_latitude*sin_latitude);
-
-    height = p/cos(lat) - N;
-    lat*=DEG_PER_RAD;
-    lon*=DEG_PER_RAD;
-#endif
-}
-
-void ossimEllipsoid::computeLocalToWorldTransformFromXYZ(double x, double y, double z,
-                                                         ossimMatrix4x4& localToWorld)const
-{
-   localToWorld = ossimMatrix4x4::createIdentity();
-   NEWMAT::Matrix& m = localToWorld.getData();
-
-   // put in the translation
-   m[0][3] = x;
-   m[1][3] = y;
-   m[2][3] = z;
-   
-
-
-    // normalize X,Y,Z
-    double inverse_length = 1.0/sqrt(x*x + y*y + z*z);
-    
-    x *= inverse_length;
-    y *= inverse_length;
-    z *= inverse_length;
-
-    double length_XY = sqrt(x*x + y*y);
-    double inverse_length_XY = 1.0/length_XY;
-
-    // Vx = |(-Y,X,0)|
-    m[0][0] = -y*inverse_length_XY;
-    m[1][0] = x*inverse_length_XY;
-    m[2][0] = 0.0;
-
-    // Vy = /(-Z*X/(sqrt(X*X+Y*Y), -Z*Y/(sqrt(X*X+Y*Y),sqrt(X*X+Y*Y))| 
-    double Vy_x = -z*x*inverse_length_XY;
-    double Vy_y = -z*y*inverse_length_XY;
-    double Vy_z = length_XY;
-    inverse_length = 1.0/sqrt(Vy_x*Vy_x + Vy_y*Vy_y + Vy_z*Vy_z);            
-    m[0][1] = Vy_x*inverse_length;
-    m[1][1] = Vy_y*inverse_length;
-    m[2][1] = Vy_z*inverse_length;
-
-    // Vz = (X,Y,Z)
-    m[0][2] = x;
-    m[1][2] = y;
-    m[2][2] = z;
-   
-}
-
-ossim_uint32 ossimEllipsoid::getEpsgCode() const
-{
-   if (!theCode.empty() && (theEpsgCode == 0))
-      theEpsgCode = ossimEllipsoidFactory::instance()->findEpsgCode(theCode);
-   return theEpsgCode;
-}
-
-const ossimEllipsoid& ossimEllipsoid::operator=(const ossimEllipsoid& copy_me)
-{
-   if (this != &copy_me)
-   {
-      theName = copy_me.theName;
-      theCode = copy_me.theCode;
-      theEpsgCode = copy_me.theEpsgCode;
-      theA = copy_me.theA;  
-      theB = copy_me.theB;  
-      theFlattening = copy_me.theFlattening;
-      theA_squared = copy_me.theA_squared;
-      theB_squared = copy_me.theB_squared;
-      theEccentricitySquared = copy_me.theEccentricitySquared;
-   }
-   return *this;
-}
diff --git a/src/ossim/base/ossimEllipsoidFactory.cpp b/src/ossim/base/ossimEllipsoidFactory.cpp
deleted file mode 100644
index 8db95b3..0000000
--- a/src/ossim/base/ossimEllipsoidFactory.cpp
+++ /dev/null
@@ -1,230 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-// 
-//*******************************************************************
-//  $Id: ossimEllipsoidFactory.cpp 19682 2011-05-31 14:21:20Z dburken $
-
-#include <ossim/base/ossimEllipsoidFactory.h>
-#include <ossim/base/ossimEllipsoid.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimString.h>
-
-ossimEllipsoidFactory* ossimEllipsoidFactory::theInstance = 0;
-
-ossimEllipsoidFactory* ossimEllipsoidFactory::instance()
-{
-   if(!theInstance)
-   {
-      theInstance = new ossimEllipsoidFactory;
-      theInstance->initializeTable();
-   }
- 
-   return theInstance; 
-} 
-
-ossimEllipsoidFactory::ossimEllipsoidFactory()
-{
-}
-
-ossimEllipsoidFactory::~ossimEllipsoidFactory()
-{
-   deleteAll();
-   theInstance = 0;
-}
-
-const ossimEllipsoid* ossimEllipsoidFactory::create(const ossimString &code)const
-{
-   // Can be 2-letter code or EPSG integer code for ellipsoids (7000-series). Make sure it is alpha:
-   if ( code.empty() )
-      return 0;
-
-   const ossimEllipsoid* ellipsoid = 0;
-   ossimString alphaCode = code;
-
-   // Check if the code passed in was actually numeric EPSG (vs. two char alpha code):
-      ossim_uint32 epsg_code = code.toUInt32();
-      if (epsg_code)
-      {
-         // EPSG was specified, fetch the equivalent alpha code from the map:
-         EpsgTableType::const_iterator iter = theEpsgTable.find(epsg_code);
-         if (iter != theEpsgTable.end())
-            alphaCode = (*iter).second;
-         }
-
-      // Established two-letter code. Now fetch the ellipsoid instance:
-      TableType::const_iterator iter = theEllipsoidTable.find(alphaCode);
-      if(iter != theEllipsoidTable.end())
-         ellipsoid = iter->second;
-      else
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << "ossimEllipsoidFactory::create WARNING:"
-            << "\nDid not create ellipsoid for code: " << code << std::endl;
-      }
-   
-   return ellipsoid;
-}
-
-void ossimEllipsoidFactory::initializeTable()
-{
-   // Do nothing if tables were already initialized:
-   if (!theEllipsoidTable.empty())
-      return;
-
-   // This table bridges between EPSG 7000-series codes to two-letter code:
-   theEpsgTable.insert(std::make_pair(7001, std::string("AA")));   
-   theEpsgTable.insert(std::make_pair(7002, std::string("AM")));
-   theEpsgTable.insert(std::make_pair(7003, std::string("AN")));
-   theEpsgTable.insert(std::make_pair(7004, std::string("BR")));
-   theEpsgTable.insert(std::make_pair(7006, std::string("BN")));
-   theEpsgTable.insert(std::make_pair(7008, std::string("CC")));
-   theEpsgTable.insert(std::make_pair(7012, std::string("CD")));
-   theEpsgTable.insert(std::make_pair(7011, std::string("CE")));
-   theEpsgTable.insert(std::make_pair(7015, std::string("EA")));
-   theEpsgTable.insert(std::make_pair(7016, std::string("EB")));
-   theEpsgTable.insert(std::make_pair(7044, std::string("EC")));
-   theEpsgTable.insert(std::make_pair(7056, std::string("ED")));
-   theEpsgTable.insert(std::make_pair(7018, std::string("EE")));
-   theEpsgTable.insert(std::make_pair(7019, std::string("RF")));
-   theEpsgTable.insert(std::make_pair(7020, std::string("HE")));
-   theEpsgTable.insert(std::make_pair(7053, std::string("HO")));
-   theEpsgTable.insert(std::make_pair(7021, std::string("ID")));
-   theEpsgTable.insert(std::make_pair(7022, std::string("IN")));
-   theEpsgTable.insert(std::make_pair(7024, std::string("KA")));
-   theEpsgTable.insert(std::make_pair(7003, std::string("SA"))); // Same as "AN"
-   theEpsgTable.insert(std::make_pair(7043, std::string("WD")));
-   theEpsgTable.insert(std::make_pair(7030, std::string("WE")));
-   theEpsgTable.insert(std::make_pair(7059, std::string("PV")));
-
-      theEllipsoidTable.insert(std::make_pair(std::string("AA"),
-      new ossimEllipsoid(std::string("Airy"), std::string("AA"), 
-      6377563.396, 6356256.9090, 7001)));   
-      theEllipsoidTable.insert(std::make_pair(std::string("AM"),
-      new ossimEllipsoid(std::string("Modified Airy"), std::string("AM"), 
-      6377340.189, 6356034.448, 7002)));
-      theEllipsoidTable.insert(std::make_pair(std::string("AN"),
-      new ossimEllipsoid(std::string("Australian National"), std::string("AN"), 
-      6378160.000, 6356774.7190, 7003)));
-      theEllipsoidTable.insert(std::make_pair(std::string("BR"),
-      new ossimEllipsoid(std::string("Bessel 1841"), std::string("BR"), 
-      6377397.155, 6356078.9630, 7004)));
-      theEllipsoidTable.insert(std::make_pair(std::string("BN"),
-      new ossimEllipsoid(std::string("Bessel 1841(Namibia)"), std::string("BN"), 
-      6377483.865, 6356165.3830, 7006)));
-      theEllipsoidTable.insert(std::make_pair(std::string("CC"),
-      new ossimEllipsoid(std::string("Clarke 1866"), std::string("CC"), 
-      6378206.400, 6356583.8000, 7008)));
-      theEllipsoidTable.insert(std::make_pair(std::string("CD"),
-      new ossimEllipsoid(std::string("Clarke 1880"), std::string("CD"), 
-      6378249.145, 6356514.8700, 7012)));
-      theEllipsoidTable.insert(std::make_pair(std::string("CE"),
-      new ossimEllipsoid(std::string("Clarke 1880 (IGN)EPSG 7011"), std::string("CE"), 
-      6378249.200, 6356515.0000, 7011)));
-      theEllipsoidTable.insert(std::make_pair(std::string("EA"),
-      new ossimEllipsoid(std::string("Everest"), std::string("EA"), 
-      6377276.345, 6356075.4130, 7015)));
-      theEllipsoidTable.insert(std::make_pair(std::string("EB"),
-      new ossimEllipsoid(std::string("Everest (E. Malasia, Brunei)"), std::string("EB"), 
-      6377298.556, 6356097.55, 7016)));
-      theEllipsoidTable.insert(std::make_pair(std::string("EC"),
-      new ossimEllipsoid(std::string("Everest 1956 (India)"), std::string("EC"), 
-      6377301.243, 6356100.228, 7044)));
-      theEllipsoidTable.insert(std::make_pair(std::string("ED"),
-      new ossimEllipsoid(std::string("Everest 1969 (West Malasia)"), std::string("ED"), 
-      6377295.664, 6356094.668, 7056)));
-      theEllipsoidTable.insert(std::make_pair(std::string("EE"),
-      new ossimEllipsoid(std::string("Everest 1948(W.Mals. & Sing.)"), std::string("EE"), 
-      6377304.063, 6356103.039, 7018)));
-      theEllipsoidTable.insert(std::make_pair(std::string("EF"),
-      new ossimEllipsoid(std::string("Everest (Pakistan)"), std::string("EF"), 
-      6377309.613, 6356109.571)));
-      theEllipsoidTable.insert(std::make_pair(std::string("FA"),
-      new ossimEllipsoid(std::string("Mod. Fischer 1960(South Asia)"), std::string("FA"), 
-      6378155.0, 6356773.32)));
-      theEllipsoidTable.insert(std::make_pair(std::string("RF"),
-      new ossimEllipsoid(std::string("GRS 80"), std::string("RF"), 
-      6378137.0, 6356752.3141, 7019)));
-      theEllipsoidTable.insert(std::make_pair(std::string("HE"),
-      new ossimEllipsoid(std::string("Helmert 1906"), std::string("HE"), 
-      6378200.0, 6356818.17, 7020)));
-      theEllipsoidTable.insert(std::make_pair(std::string("HO"),
-      new ossimEllipsoid(std::string("Hough"), std::string("HO"), 
-      6378270.0, 6356794.3430, 7053)));
-      theEllipsoidTable.insert(std::make_pair(std::string("ID"),
-      new ossimEllipsoid(std::string("Indonesian 1974"), std::string("ID"), 
-      6378160.0, 6356774.504, 7021)));
-      theEllipsoidTable.insert(std::make_pair(std::string("IN"),
-      new ossimEllipsoid(std::string("International 1924"), std::string("IN"), 
-      6378388.0, 6356911.946, 7022)));
-      theEllipsoidTable.insert(std::make_pair(std::string("KA"),
-      new ossimEllipsoid(std::string("Krassovsky"), std::string("KA"), 
-      6378245.0, 6356863.0190, 7024)));
-      theEllipsoidTable.insert(std::make_pair(std::string("SA"),
-      new ossimEllipsoid(std::string("South American 1969"),std::string("SA"), 
-      6378160.0, 6356774.719, 7003)));
-      theEllipsoidTable.insert(std::make_pair(std::string("WD"),
-      new ossimEllipsoid(std::string("WGS 72"), std::string("WD"), 
-      6378135.000, 6356750.5200, 7043)));
-      theEllipsoidTable.insert(std::make_pair(std::string("WE"),
-      new ossimEllipsoid(std::string("WGS 84"), std::string("WE"), 
-      6378137.000, 6356752.3142, 7030)));
-      theEllipsoidTable.insert(std::make_pair(std::string("PV"),
-      new ossimEllipsoid(std::string("Popular Visualization Sphere"), std::string("7059"), 
-      6378137.000, 6378137.000, 7059)));
-
-   theWgs84Ellipsoid = new ossimEllipsoid(std::string("WGS 84"), std::string("WE"), 
-      6378137.000, 6356752.3142, 7030);
-   theWgs72Ellipsoid = new ossimEllipsoid(std::string("WGS 72"), std::string("WD"), 
-      6378135.000, 6356750.5200, 7043);
-}
-
-void ossimEllipsoidFactory::deleteAll()
-{
-   TableType::const_iterator ellipsoid = theEllipsoidTable.begin();
-   
-   while(ellipsoid != theEllipsoidTable.end())
-   {
-      delete (*ellipsoid).second;
-      ++ellipsoid;
-   }
-
-   theEllipsoidTable.clear();
-   theEpsgTable.clear();
-
-   if (theWgs84Ellipsoid)
-   {
-      delete theWgs84Ellipsoid;
-      theWgs84Ellipsoid = 0;
-   }
-   if (theWgs72Ellipsoid)
-   {
-      delete theWgs72Ellipsoid;
-      theWgs72Ellipsoid = 0;
-   }
-}
-
-//*************************************************************************************************
-// Given an alpha code (for example "WE" for WGS84), returns the corresponding EPSG code or 0
-// if not found.
-//*************************************************************************************************
-ossim_uint32 ossimEllipsoidFactory::findEpsgCode(const ossimString& alpha_code) const
-{
-   ossim_uint32 epsg_code = 0;
-   if (alpha_code.empty())
-      return 0;
-
-   EpsgTableType::const_iterator iter = theEpsgTable.begin();
-   while ((iter != theEpsgTable.end()) && (epsg_code == 0))
-   {
-      if (iter->second == alpha_code.string())
-      {
-         epsg_code = iter->first;
-      }
-      iter++;
-   }
-   return epsg_code;
-}
diff --git a/src/ossim/base/ossimEpsgDatumFactory.cpp b/src/ossim/base/ossimEpsgDatumFactory.cpp
deleted file mode 100644
index 60f0baf..0000000
--- a/src/ossim/base/ossimEpsgDatumFactory.cpp
+++ /dev/null
@@ -1,235 +0,0 @@
-//*************************************************************************************************
-// 
-//                          OSSIM -- Open Source Software Image Map
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Oscar Kramer
-//
-// Description: Factory for creating datums from EPSG datum codes (a.k.a. GCS codes)
-// 
-//*************************************************************************************************
-//  $Id$
-
-#include <ossim/base/ossimEpsgDatumFactory.h>
-#include <ossim/base/ossimEllipsoidFactory.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-
-ossimEpsgDatumFactory* ossimEpsgDatumFactory::m_instance = 0;
-
-//*************************************************************************************************
-//! Singleton implementation.
-//*************************************************************************************************
-ossimEpsgDatumFactory* ossimEpsgDatumFactory::instance()
-{
-   if(!m_instance) 
-      m_instance = new ossimEpsgDatumFactory;
-   return m_instance; 
-} 
-
-//*************************************************************************************************
-// Hidden constructor part of singleton implementation.
-// Intializes the map from EPSG numeric to OSSIM/Geotrans alpha codes
-// Datums marked questionable because of ambiguities in the name. Need to check the actual 
-// datum definition to make sure these are correct. (most are fairly obscure)
-//*************************************************************************************************
-ossimEpsgDatumFactory::ossimEpsgDatumFactory()
-{
-   m_epsgToAlphaMap.insert(std::make_pair(6135, std::string("OHI-M"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6139, std::string("PUR"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6152, std::string("NAR"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6154, std::string("EUR-M"))); // QUESTIONABLE  
-   m_epsgToAlphaMap.insert(std::make_pair(6155, std::string("DAL"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6156, std::string("CCD"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6158, std::string("NAP"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6165, std::string("BID"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6169, std::string("AMA"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6175, std::string("SRL")));   // QUESTIONABLE 
-   m_epsgToAlphaMap.insert(std::make_pair(6201, std::string("ADI-M"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6202, std::string("AUA"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6203, std::string("AUG"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6204, std::string("AIN-A"))); // QUESTIONABLE 
-   m_epsgToAlphaMap.insert(std::make_pair(6205, std::string("AFG"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6209, std::string("ARF-M"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6210, std::string("ARS-M"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6216, std::string("BER"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6218, std::string("BOO")));   // QUESTIONABLE 
-   m_epsgToAlphaMap.insert(std::make_pair(6219, std::string("BUR"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6221, std::string("CAI"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6222, std::string("CAP"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6223, std::string("CGE"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6224, std::string("CHU"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6236, std::string("HTN"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6238, std::string("IDN"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6239, std::string("INF-A"))); // QUESTIONABLE 
-   m_epsgToAlphaMap.insert(std::make_pair(6240, std::string("INH-A"))); // QUESTIONABLE 
-   m_epsgToAlphaMap.insert(std::make_pair(6244, std::string("KAN"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6245, std::string("KEA"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6248, std::string("PRP-M"))); // QUESTIONABLE 
-   m_epsgToAlphaMap.insert(std::make_pair(6250, std::string("LEH"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6251, std::string("LIB"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6253, std::string("LUZ-A"))); // QUESTIONABLE 
-   m_epsgToAlphaMap.insert(std::make_pair(6255, std::string("HEN"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6256, std::string("MIK"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6261, std::string("MER"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6262, std::string("MAS"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6263, std::string("MIN-A"))); // QUESTIONABLE 
-   m_epsgToAlphaMap.insert(std::make_pair(6266, std::string("MPO"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6267, std::string("NAS-C"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6269, std::string("NAR-C"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6270, std::string("NAH-C"))); // QUESTIONABLE
-   m_epsgToAlphaMap.insert(std::make_pair(6282, std::string("PTN"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6284, std::string("PUK"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6285, std::string("QAT")));   // QUESTIONABLE
-   m_epsgToAlphaMap.insert(std::make_pair(6287, std::string("QUO"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6292, std::string("SAP"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6293, std::string("SCK"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6297, std::string("TAN"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6298, std::string("TIL"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6301, std::string("TOY-M"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6304, std::string("VOI")));   // QUESTIONABLE 
-   m_epsgToAlphaMap.insert(std::make_pair(6307, std::string("NSD"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6309, std::string("YAC"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6311, std::string("ZAN"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6322, std::string("WGD"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6326, std::string("WGE"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6601, std::string("AIA"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6604, std::string("ASM"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6611, std::string("HKD")));   // QUESTIONABLE
-   m_epsgToAlphaMap.insert(std::make_pair(6613, std::string("GSE"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6615, std::string("POS"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6616, std::string("SGM"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6618, std::string("SAN-M"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6658, std::string("HJO"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6668, std::string("EUS"))); 
-   m_epsgToAlphaMap.insert(std::make_pair(6807, std::string("NTF"))); 
-} 
-
-//*************************************************************************************************
-//! Destructor
-//*************************************************************************************************
-ossimEpsgDatumFactory::~ossimEpsgDatumFactory()
-{
-   m_instance = 0;
-}
-
-//*************************************************************************************************
-//! Creates given an EPSG spec in the form "EPSG:<datum_code>".
-//*************************************************************************************************
-const ossimDatum* ossimEpsgDatumFactory::create(const ossimString &epsg_spec) const
-{
-   if ( epsg_spec.size() )
-   {
-      ossim_uint32 code;
-      ossimString group; // assume we are working with EPSG codes
-      if (epsg_spec.contains(":"))
-      {
-         group = epsg_spec.before(":");
-         code = epsg_spec.after(":").toUInt32();
-      }
-      else
-      {
-         group = "EPSG"; // No group spec provided, assuming EPSG:
-         code = epsg_spec.toUInt32();
-      }
-      if ((group != "EPSG") || (code == 0))
-         return 0;
-
-      return create(code);
-   }
-   return 0;
-}
-
-//*************************************************************************************************
-//! Creates a datum instance given a KWL and prefix
-//*************************************************************************************************
-const ossimDatum* 
-ossimEpsgDatumFactory::create(const ossimKeywordlist& kwl, const char *prefix) const
-{
-   ossimString lookup = kwl.find(prefix, ossimKeywordNames::DATUM_KW);
-   if(!lookup.empty())
-      return create(lookup);
-   return 0;
-
-}
-//*************************************************************************************************
-//! Creates given an EPSG spec in the form "EPSG:<datum_code>".
-//*************************************************************************************************
-const ossimDatum* ossimEpsgDatumFactory::create(ossim_uint32 datum_code) const
-{
-   // Geographic coordinate system codes (4XXX) are sometimes used in place of their corresponding
-   // datum code (6XXX). Check for this possibility and transpose the code if so:
-   if ((datum_code >= 4135) && (datum_code <= 4807))
-      datum_code += 2000;
-
-   // Find the datum code in the map in order to determine the corresponding OSSIM/Geotrans alpha
-   // code. Then use the datum factory to create the datum.
-   ossimString alphaCode = findAlphaCode(datum_code);
-   if (!alphaCode.empty())
-      return ossimDatumFactory::instance()->create(alphaCode);
-
-   return 0;
-}
-
-//*************************************************************************************************
-//! Returns list of all datums supported, in the form of "EPSG:<code>, <datum_name>".
-//*************************************************************************************************
-void ossimEpsgDatumFactory::getList(std::vector<ossimString>& list) const
-{
-   ossimDatumFactory* df = ossimDatumFactory::instance();
-   const ossimDatum* datum;
-   std::map<ossim_uint32, std::string>::const_iterator iter = m_epsgToAlphaMap.begin();
-
-   // Loop over all handled datum codes and instantiate the corresponding datum in order to
-   // get the corresponding OSSIM/Geotrans name. Eventually the datum info (including its name as
-   // it appears in the EPSG database) will be read directly from the Db without using
-   // ossimDatumFactory.
-   while(iter != m_epsgToAlphaMap.end())
-   {
-      datum = df->create(iter->second);
-      if (datum)
-      {
-         ossimString entry ("EPSG:");
-         entry += ossimString::toString(iter->first);
-         entry += ",";
-         entry += datum->name();
-         list.push_back(entry);
-      }
-      ++iter;
-   }
-}
-
-//*************************************************************************************************
-//! Specific to this factory only. Given an alpha-code, returns equivalent EPSG datum code or
-//! 0 if not found.
-//*************************************************************************************************
-ossim_uint32 ossimEpsgDatumFactory::findEpsgCode(const ossimString& alpha_code) const
-{
-   std::map<ossim_uint32, std::string>::const_iterator iter = m_epsgToAlphaMap.begin();
-   while (iter != m_epsgToAlphaMap.end())
-   {
-      if (iter->second == alpha_code.string())
-         return iter->first;
-      ++iter;
-   }
-   return 0;
-}
-
-//*************************************************************************************************
-//! Specific to this factory only. Given an EPSG, returns equivalent alpha-code datum code or
-//! empty string if not found.
-//*************************************************************************************************
-ossimString ossimEpsgDatumFactory::findAlphaCode(ossim_uint32 epsg_code) const
-{
-   ossimString result("");
-   std::map<ossim_uint32, std::string>::const_iterator iter = m_epsgToAlphaMap.find(epsg_code);
-   if (iter != m_epsgToAlphaMap.end())
-   {
-      result = iter->second;
-   }
-   return result;
-}
diff --git a/src/ossim/base/ossimEquTokenizer.cpp b/src/ossim/base/ossimEquTokenizer.cpp
deleted file mode 100644
index a7a0d2b..0000000
--- a/src/ossim/base/ossimEquTokenizer.cpp
+++ /dev/null
@@ -1,1796 +0,0 @@
-//#define yyFlexLexer ossimEquTokenizerFlexLexer
-//#define yywrap ossimEquTokenizerwrap
-#include <ossim/base/ossimEquTokenizer.h>
-/* A lexical scanner generated by flex */
-
-/* Scanner skeleton version:
- * $Header$
- */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-
-
-
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
-#endif
-
-
-#ifdef __cplusplus
-
-#include <cstdio> /* for EOF */
-#include <cstdlib>
-#include <iostream>
-#include <fstream>
-using namespace std;
-
-/* Use prototypes in function declarations. */
-#define YY_USE_PROTOS
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else	/* ! __cplusplus */
-
-#if __STDC__
-
-#define YY_USE_PROTOS
-#define YY_USE_CONST
-
-#endif	/* __STDC__ */
-#endif	/* ! __cplusplus */
-
-#ifdef __TURBOC__
- #pragma warn -rch
- #pragma warn -use
-#include <io.h>
-#include <stdlib.h>
-#define YY_USE_CONST
-#define YY_USE_PROTOS
-#endif
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-
-#ifdef YY_USE_PROTOS
-#define YY_PROTO(proto) proto
-#else
-#define YY_PROTO(proto) ()
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index.  If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition.  This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN yy_start = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state.  The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START ((yy_start - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#define YY_BUF_SIZE 16384
-
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-
-extern int yyleng;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-/* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator).  This
- * avoids problems with code like:
- *
- * 	if ( condition_holds )
- *		yyless( 5 );
- *	else
- *		do_something_else();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the yyless() call.
- */
-
-/* Return all but the first 'n' matched characters back to the input stream. */
-
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-		*yy_cp = yy_hold_char; \
-		YY_RESTORE_YY_MORE_OFFSET \
-		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
-		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
-		} \
-	while ( 0 )
-
-#define unput(c) yyunput( c, yytext_ptr )
-
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-typedef unsigned int yy_size_t;
-
-
-struct yy_buffer_state
-	{
-	istream* yy_input_file;
-
-	char *yy_ch_buf;		/* input buffer */
-	char *yy_buf_pos;		/* current position in input buffer */
-
-	/* Size of input buffer in bytes, not including room for EOB
-	 * characters.
-	 */
-	yy_size_t yy_buf_size;
-
-	/* Number of characters read into yy_ch_buf, not including EOB
-	 * characters.
-	 */
-	int yy_n_chars;
-
-	/* Whether we "own" the buffer - i.e., we know we created it,
-	 * and can realloc() it to grow it, and should free() it to
-	 * delete it.
-	 */
-	int yy_is_our_buffer;
-
-	/* Whether this is an "interactive" input source; if so, and
-	 * if we're using stdio for input, then we want to use getc()
-	 * instead of fread(), to make sure we stop fetching input after
-	 * each newline.
-	 */
-	int yy_is_interactive;
-
-	/* Whether we're considered to be at the beginning of a line.
-	 * If so, '^' rules will be active on the next match, otherwise
-	 * not.
-	 */
-	int yy_at_bol;
-
-	/* Whether to try to fill the input buffer when we reach the
-	 * end of it.
-	 */
-	int yy_fill_buffer;
-
-	int yy_buffer_status;
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
-	/* When an EOF's been seen but there's still some text to process
-	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
-	 * shouldn't try reading from the input source any more.  We might
-	 * still have a bunch of tokens to match, though, because of
-	 * possible backing-up.
-	 *
-	 * When we actually see the EOF, we change the status to "new"
-	 * (via yyrestart()), so that the user can continue scanning by
-	 * just pointing yyin at a new input file.
-	 */
-#define YY_BUFFER_EOF_PENDING 2
-	};
-
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- */
-#define YY_CURRENT_BUFFER yy_current_buffer
-
-
-
-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
-static void yy_flex_free YY_PROTO(( void * ));
-
-#define yy_new_buffer yy_create_buffer
-
-#define yy_set_interactive(is_interactive) \
-	{ \
-	if ( ! yy_current_buffer ) \
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
-	yy_current_buffer->yy_is_interactive = is_interactive; \
-	}
-
-#define yy_set_bol(at_bol) \
-	{ \
-	if ( ! yy_current_buffer ) \
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
-	yy_current_buffer->yy_at_bol = at_bol; \
-	}
-
-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-
-typedef unsigned char YY_CHAR;
-#define yytext_ptr yytext
-#define YY_INTERACTIVE
-
-//#include <ossim/base/ossimFlexLexer.h>
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
-	yytext_ptr = yy_bp; \
-	yyleng = (int) (yy_cp - yy_bp); \
-	yy_hold_char = *yy_cp; \
-	*yy_cp = '\0'; \
-	yy_c_buf_p = yy_cp;
-
-#define YY_NUM_RULES 52
-#define YY_END_OF_BUFFER 53
-static yyconst short int yy_accept[119] =
-    {   0,
-        0,    0,   53,   52,    1,   11,    7,   14,   15,    5,
-        9,    3,   10,   52,    4,    2,   49,   52,   47,   52,
-       12,   13,   16,   52,   52,   52,   52,   52,   52,   52,
-       52,   52,   52,    6,    8,    1,    2,    2,    2,    0,
-       50,   51,   46,   48,   19,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,   18,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    2,   35,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,   27,   22,   20,   38,
-       37,    0,   23,    0,   31,   17,    0,    2,   29,   25,
-        0,   33,   42,    0,    0,   44,   39,   28,    0,    0,
-
-       24,   36,   32,   30,   26,    0,   34,   41,   45,   21,
-       40,    0,    0,    0,    0,    0,   43,    0
-    } ;
-
-static yyconst int yy_ec[256] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    2,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    2,    1,    1,    1,    1,    3,    4,    1,    5,
-        6,    7,    8,    9,   10,   11,   12,   13,   14,   15,
-       15,   15,   15,   15,   15,   15,   15,    1,    1,   16,
-       17,   18,    1,    1,    1,    1,    1,    1,   19,    1,
-        1,    1,   20,    1,    1,    1,    1,    1,    1,   21,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-       22,    1,   23,   24,   25,    1,   26,   27,   28,   29,
-
-       30,   31,   32,   33,   34,    1,    1,   35,   36,   37,
-       38,   39,   40,   41,   42,   43,   44,   45,    1,   46,
-        1,    1,    1,   47,    1,   48,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1
-    } ;
-
-static yyconst int yy_meta[49] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1
-    } ;
-
-static yyconst short int yy_base[119] =
-    {   0,
-        0,    0,  170,  171,  167,  171,  171,  171,  171,  171,
-      171,  171,  171,   36,  171,   41,   40,  151,  150,  146,
-      171,  171,  171,   34,   33,   28,  119,  127,  125,   38,
-       40,  136,  123,  171,  171,  158,   68,   71,   78,   92,
-      171,  171,  171,  171,  171,  117,  120,   33,  131,  119,
-      111,   44,   57,  115,  171,  121,  106,  114,  116,  112,
-      107,  110,  105,  101,  104,  107,  171,  103,  107,  109,
-      105,  112,   99,  103,   99,   92,  107,  171,  121,  171,
-      171,  103,  104,   89,  102,  171,  110,  113,  101,  100,
-       81,   83,  171,   69,   65,  171,  171,  171,   90,   53,
-
-      171,  171,  171,  171,  171,   58,  171,  171,  171,  171,
-      171,   63,   52,   43,   28,   24,  171,  171
-    } ;
-
-static yyconst short int yy_def[119] =
-    {   0,
-      118,    1,  118,  118,  118,  118,  118,  118,  118,  118,
-      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
-      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
-      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
-      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
-      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
-      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
-      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
-      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
-      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
-
-      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
-      118,  118,  118,  118,  118,  118,  118,    0
-    } ;
-
-static yyconst short int yy_nxt[220] =
-    {   0,
-        4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
-       14,   15,   16,   16,   16,   17,   18,   19,    4,    4,
-       20,   21,   22,   23,    4,   24,   25,   26,    4,   27,
-        4,    4,    4,   28,   29,   30,    4,    4,    4,    4,
-        4,   31,   32,    4,    4,   33,   34,   35,   37,   37,
-       37,   38,  117,   39,   39,   39,   41,   42,   50,   40,
-       46,   47,   52,   57,  116,   53,   69,   51,  115,   74,
-       40,   58,   59,   60,   70,   48,   49,   75,  114,   61,
-       37,   37,   37,   37,   37,   37,   64,  113,   38,   40,
-       39,   39,   39,   76,  112,  111,   40,   64,   77,   65,
-
-       40,   65,  110,  109,   66,   66,   66,   40,   87,  108,
-       87,  107,  106,   88,   88,   88,   66,   66,   66,   66,
-       66,   66,   88,   88,   88,   88,   88,   88,  105,  104,
-      103,  102,  101,  100,   99,   98,   97,   96,   95,   94,
-       93,   92,   91,   90,   89,   86,   85,   84,   83,   82,
-       81,   80,   79,   78,   73,   72,   71,   68,   67,   36,
-       63,   62,   56,   55,   54,   45,   44,   43,   36,  118,
-        3,  118,  118,  118,  118,  118,  118,  118,  118,  118,
-      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
-      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
-
-      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
-      118,  118,  118,  118,  118,  118,  118,  118,  118
-    } ;
-
-static yyconst short int yy_chk[220] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,   14,   14,
-       14,   16,  116,   16,   16,   16,   17,   17,   25,   16,
-       24,   24,   26,   30,  115,   26,   48,   25,  114,   52,
-       16,   30,   31,   31,   48,   24,   24,   52,  113,   31,
-       37,   37,   37,   38,   38,   38,   37,  112,   39,   38,
-       39,   39,   39,   53,  106,  100,   39,   37,   53,   40,
-
-       38,   40,   99,   95,   40,   40,   40,   39,   64,   94,
-       64,   92,   91,   64,   64,   64,   65,   65,   65,   66,
-       66,   66,   87,   87,   87,   88,   88,   88,   90,   89,
-       85,   84,   83,   82,   79,   77,   76,   75,   74,   73,
-       72,   71,   70,   69,   68,   63,   62,   61,   60,   59,
-       58,   57,   56,   54,   51,   50,   49,   47,   46,   36,
-       33,   32,   29,   28,   27,   20,   19,   18,    5,    3,
-      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
-      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
-      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
-
-      118,  118,  118,  118,  118,  118,  118,  118,  118,  118,
-      118,  118,  118,  118,  118,  118,  118,  118,  118
-    } ;
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-//#line 1 "ossimEquTokenizer.l"
-#define INITIAL 0
-//#line 2 "ossimEquTokenizer.l"
-#include <ossim/base/ossimEquTokenDefines.h>
-//#line 413 "lex.ossimEquTokenizer.cc"
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
-#else
-extern int yywrap YY_PROTO(( void ));
-#endif
-#endif
-
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
-#endif
-
-#ifndef YY_NO_INPUT
-#endif
-
-#if YY_STACK_USED
-static int yy_start_stack_ptr = 0;
-static int yy_start_stack_depth = 0;
-static int *yy_start_stack = 0;
-#ifndef YY_NO_PUSH_STATE
-static void yy_push_state YY_PROTO(( int new_state ));
-#endif
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state YY_PROTO(( void ));
-#endif
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state YY_PROTO(( void ));
-#endif
-
-#else
-#define YY_NO_PUSH_STATE 1
-#define YY_NO_POP_STATE 1
-#define YY_NO_TOP_STATE 1
-#endif
-
-#ifdef YY_MALLOC_DECL
-YY_MALLOC_DECL
-#else
-#if __STDC__
-#ifndef __cplusplus
-#include <stdlib.h>
-#endif
-#else
-/* Just try to get by without declaring the routines.  This will fail
- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- * or sizeof(void*) != sizeof(int).
- */
-#endif
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-
-#ifndef ECHO
-#define ECHO LexerOutput( yytext, yyleng )
-#endif
-
-/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
-	if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
-		YY_FATAL_ERROR( "input in flex scanner failed" );
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) LexerError( msg )
-#endif
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL int yyFlexLexer::yylex()
-#endif
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
-	YY_USER_ACTION
-
-YY_DECL
-	{
-	register yy_state_type yy_current_state;
-	register char *yy_cp = NULL, *yy_bp = NULL;
-	register int yy_act;
-
-//#line 15 "ossimEquTokenizer.l"
-
-
-//#line 543 "lex.ossimEquTokenizer.cc"
-
-	if ( yy_init )
-		{
-		yy_init = 0;
-
-#ifdef YY_USER_INIT
-		YY_USER_INIT;
-#endif
-
-		if ( ! yy_start )
-			yy_start = 1;	/* first start state */
-
-		if ( ! yyin )
-			yyin = &cin;
-
-		if ( ! yyout )
-			yyout = &cout;
-
-		if ( ! yy_current_buffer )
-			yy_current_buffer =
-				yy_create_buffer( yyin, YY_BUF_SIZE );
-
-		yy_load_buffer_state();
-		}
-
-	while ( 1 )		/* loops until end-of-file is reached */
-		{
-		yy_cp = yy_c_buf_p;
-
-		/* Support of yytext. */
-		*yy_cp = yy_hold_char;
-
-		/* yy_bp points to the position in yy_ch_buf of the start of
-		 * the current run.
-		 */
-		yy_bp = yy_cp;
-
-		yy_current_state = yy_start;
-yy_match:
-		do
-			{
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
-			if ( yy_accept[yy_current_state] )
-				{
-				yy_last_accepting_state = yy_current_state;
-				yy_last_accepting_cpos = yy_cp;
-				}
-			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-				{
-				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 119 )
-					yy_c = yy_meta[(unsigned int) yy_c];
-				}
-			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-			++yy_cp;
-			}
-		while ( yy_base[yy_current_state] != 171 );
-
-yy_find_action:
-		yy_act = yy_accept[yy_current_state];
-		if ( yy_act == 0 )
-			{ /* have to back up */
-			yy_cp = yy_last_accepting_cpos;
-			yy_current_state = yy_last_accepting_state;
-			yy_act = yy_accept[yy_current_state];
-			}
-
-		YY_DO_BEFORE_ACTION;
-
-
-do_action:	/* This label is used only to access EOF actions. */
-
-
-		switch ( yy_act )
-	{ /* beginning of action switch */
-			case 0: /* must back up */
-			/* undo the effects of YY_DO_BEFORE_ACTION */
-			*yy_cp = yy_hold_char;
-			yy_cp = yy_last_accepting_cpos;
-			yy_current_state = yy_last_accepting_state;
-			goto yy_find_action;
-
-case 1:
-YY_RULE_SETUP
-//#line 17 "ossimEquTokenizer.l"
-/* skip blanks and tabs */
-	YY_BREAK
-case 2:
-YY_RULE_SETUP
-//#line 19 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_CONSTANT;
-           }
-	YY_BREAK
-case 3:
-YY_RULE_SETUP
-//#line 22 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_COMMA;
-           }
-	YY_BREAK
-case 4:
-YY_RULE_SETUP
-//#line 25 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_DIV;
-           }
-	YY_BREAK
-case 5:
-YY_RULE_SETUP
-//#line 29 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_MULT;
-           }
-	YY_BREAK
-case 6:
-YY_RULE_SETUP
-#line 33 "ossimEquTokenizer.l"
-{ 
-               return OSSIM_EQU_TOKEN_OR_BAR;
-           }
-	YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 37 "ossimEquTokenizer.l"
-{ 
-               return OSSIM_EQU_TOKEN_AMPERSAND;
-           }
-	YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 40 "ossimEquTokenizer.l"
-{ 
-               return OSSIM_EQU_TOKEN_TILDE;
-           }
-	YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 44 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_PLUS;
-           }
-	YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 47 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_MINUS;
-           }
-	YY_BREAK
-case 11:
-YY_RULE_SETUP
-#line 50 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_MOD;
-           }
-	YY_BREAK
-case 12:
-YY_RULE_SETUP
-#line 53 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_LEFT_ARRAY_BRACKET;
-           }
-	YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 56 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_RIGHT_ARRAY_BRACKET;
-           }
-	YY_BREAK
-case 14:
-YY_RULE_SETUP
-#line 59 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_LEFT_PAREN;
-        }
-	YY_BREAK
-case 15:
-YY_RULE_SETUP
-#line 62 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_RIGHT_PAREN;
-           }
-	YY_BREAK
-case 16:
-YY_RULE_SETUP
-#line 65 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_POWER;
-           }
-	YY_BREAK
-case 17:
-YY_RULE_SETUP
-#line 68 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_XOR;
-        }
-	YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 72 "ossimEquTokenizer.l"
-{
-             return OSSIM_EQU_TOKEN_IMAGE_VARIABLE;
-        }
-	YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 75 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_PI;
-           }
-	YY_BREAK
-case 20:
-YY_RULE_SETUP
-#line 78 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_LOG;
-           }
-	YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 81 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_LOG10;
-           }
-	YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 84 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_EXP;
-           } 
-	YY_BREAK
-case 23:
-YY_RULE_SETUP
-#line 87 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_SIN;
-           }
-	YY_BREAK
-case 24:
-YY_RULE_SETUP
-#line 90 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_SIND;
-           }
-	YY_BREAK
-case 25:
-YY_RULE_SETUP
-#line 93 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_ASIN;
-           }
-	YY_BREAK
-case 26:
-YY_RULE_SETUP
-#line 96 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_ASIND;
-           }
-	YY_BREAK
-case 27:
-YY_RULE_SETUP
-#line 99 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_COS;
-           }
-	YY_BREAK
-case 28:
-YY_RULE_SETUP
-#line 102 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_COSD;
-           }
-	YY_BREAK
-case 29:
-YY_RULE_SETUP
-#line 105 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_ACOS;
-           }
-	YY_BREAK
-case 30:
-YY_RULE_SETUP
-#line 108 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_ACOSD;
-           }
-	YY_BREAK
-case 31:
-YY_RULE_SETUP
-#line 111 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_TAN;
-           }
-	YY_BREAK
-case 32:
-YY_RULE_SETUP
-#line 114 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_TAND;
-           }
-	YY_BREAK
-case 33:
-YY_RULE_SETUP
-#line 117 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_ATAN;
-           }
-	YY_BREAK
-case 34:
-YY_RULE_SETUP
-#line 120 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_ATAND;
-           }
-	YY_BREAK
-case 35:
-YY_RULE_SETUP
-#line 123 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_ABS;
-           }
-	YY_BREAK
-case 36:
-YY_RULE_SETUP
-#line 126 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_SQRT;
-           }
-	YY_BREAK
-case 37:
-YY_RULE_SETUP
-#line 129 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_MIN;
-           }
-	YY_BREAK
-case 38:
-YY_RULE_SETUP
-#line 132 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_MAX;
-           }
-	YY_BREAK
-case 39:
-YY_RULE_SETUP
-#line 135 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_CONV;
-           }
-	YY_BREAK
-case 40:
-YY_RULE_SETUP
-#line 138 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_SHIFT;
-           }
-	YY_BREAK
-case 41:
-YY_RULE_SETUP
-#line 141 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_BLURR;
-           }
-	YY_BREAK
-case 42:
-YY_RULE_SETUP
-#line 144 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_BAND;
-           }
-	YY_BREAK
-case 43:
-YY_RULE_SETUP
-#line 147 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_ASSIGN_BAND;
-              }
-	YY_BREAK
-case 44:
-YY_RULE_SETUP
-#line 150 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_CLIP;
-        }
-	YY_BREAK
-case 45:
-YY_RULE_SETUP
-#line 153 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_CLAMP;
-        }
-	YY_BREAK
-case 46:
-YY_RULE_SETUP
-#line 156 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_BEQUAL;
-}
-	YY_BREAK
-case 47:
-YY_RULE_SETUP
-#line 159 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_BGREATER;
-}
-	YY_BREAK
-case 48:
-YY_RULE_SETUP
-#line 162 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_BGREATEROREQUAL;
-}
-	YY_BREAK
-case 49:
-YY_RULE_SETUP
-#line 165 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_BLESS;
-}
-	YY_BREAK
-case 50:
-YY_RULE_SETUP
-#line 168 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_BLESSOREQUAL;
-}
-	YY_BREAK
-case 51:
-YY_RULE_SETUP
-#line 171 "ossimEquTokenizer.l"
-{
-               return OSSIM_EQU_TOKEN_BDIFFERENT;
-}
-	YY_BREAK
-case 52:
-YY_RULE_SETUP
-#line 175 "ossimEquTokenizer.l"
-ECHO;
-	YY_BREAK
-#line 986 "lex.ossimEquTokenizer.cc"
-case YY_STATE_EOF(INITIAL):
-	yyterminate();
-
-	case YY_END_OF_BUFFER:
-		{
-		/* Amount of text matched not including the EOB char. */
-		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
-
-		/* Undo the effects of YY_DO_BEFORE_ACTION. */
-		*yy_cp = yy_hold_char;
-		YY_RESTORE_YY_MORE_OFFSET
-
-		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
-			{
-			/* We're scanning a new file or input source.  It's
-			 * possible that this happened because the user
-			 * just pointed yyin at a new source and called
-			 * yylex().  If so, then we have to assure
-			 * consistency between yy_current_buffer and our
-			 * globals.  Here is the right place to do so, because
-			 * this is the first action (other than possibly a
-			 * back-up) that will match for the new input source.
-			 */
-			yy_n_chars = yy_current_buffer->yy_n_chars;
-			yy_current_buffer->yy_input_file = yyin;
-			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
-			}
-
-		/* Note that here we test for yy_c_buf_p "<=" to the position
-		 * of the first EOB in the buffer, since yy_c_buf_p will
-		 * already have been incremented past the NUL character
-		 * (since all states make transitions on EOB to the
-		 * end-of-buffer state).  Contrast this with the test
-		 * in input().
-		 */
-		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
-			{ /* This was really a NUL. */
-			yy_state_type yy_next_state;
-
-			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
-
-			yy_current_state = yy_get_previous_state();
-
-			/* Okay, we're now positioned to make the NUL
-			 * transition.  We couldn't have
-			 * yy_get_previous_state() go ahead and do it
-			 * for us because it doesn't know how to deal
-			 * with the possibility of jamming (and we don't
-			 * want to build jamming into it because then it
-			 * will run more slowly).
-			 */
-
-			yy_next_state = yy_try_NUL_trans( yy_current_state );
-
-			yy_bp = yytext_ptr + YY_MORE_ADJ;
-
-			if ( yy_next_state )
-				{
-				/* Consume the NUL. */
-				yy_cp = ++yy_c_buf_p;
-				yy_current_state = yy_next_state;
-				goto yy_match;
-				}
-
-			else
-				{
-				yy_cp = yy_c_buf_p;
-				goto yy_find_action;
-				}
-			}
-
-		else switch ( yy_get_next_buffer() )
-			{
-			case EOB_ACT_END_OF_FILE:
-				{
-				yy_did_buffer_switch_on_eof = 0;
-
-				if ( yywrap() )
-					{
-					/* Note: because we've taken care in
-					 * yy_get_next_buffer() to have set up
-					 * yytext, we can now set up
-					 * yy_c_buf_p so that if some total
-					 * hoser (like flex itself) wants to
-					 * call the scanner after we return the
-					 * YY_NULL, it'll still work - another
-					 * YY_NULL will get returned.
-					 */
-					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
-
-					yy_act = YY_STATE_EOF(YY_START);
-					goto do_action;
-					}
-
-				else
-					{
-					if ( ! yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-					}
-				break;
-				}
-
-			case EOB_ACT_CONTINUE_SCAN:
-				yy_c_buf_p =
-					yytext_ptr + yy_amount_of_matched_text;
-
-				yy_current_state = yy_get_previous_state();
-
-				yy_cp = yy_c_buf_p;
-				yy_bp = yytext_ptr + YY_MORE_ADJ;
-				goto yy_match;
-
-			case EOB_ACT_LAST_MATCH:
-				yy_c_buf_p =
-				&yy_current_buffer->yy_ch_buf[yy_n_chars];
-
-				yy_current_state = yy_get_previous_state();
-
-				yy_cp = yy_c_buf_p;
-				yy_bp = yytext_ptr + YY_MORE_ADJ;
-				goto yy_find_action;
-			}
-		break;
-		}
-
-	default:
-		YY_FATAL_ERROR(
-			"fatal flex scanner internal error--no action found" );
-	} /* end of action switch */
-		} /* end of scanning one token */
-	} /* end of yylex */
-
-yyFlexLexer::yyFlexLexer( istream* arg_yyin, ostream* arg_yyout )
-	{
-	yyin = arg_yyin;
-	yyout = arg_yyout;
-	yy_c_buf_p = 0;
-	yy_init = 1;
-	yy_start = 0;
-	yy_flex_debug = 0;
-	yylineno = 1;	// this will only get updated if %option yylineno
-
-	yy_did_buffer_switch_on_eof = 0;
-
-	yy_looking_for_trail_begin = 0;
-	yy_more_flag = 0;
-	yy_more_len = 0;
-	yy_more_offset = yy_prev_more_offset = 0;
-
-	yy_start_stack_ptr = yy_start_stack_depth = 0;
-	yy_start_stack = 0;
-
-	yy_current_buffer = 0;
-
-#ifdef YY_USES_REJECT
-	yy_state_buf = new yy_state_type[YY_BUF_SIZE + 2];
-#else
-	yy_state_buf = 0;
-#endif
-	}
-
-yyFlexLexer::~yyFlexLexer()
-	{
-	delete yy_state_buf;
-	yy_delete_buffer( yy_current_buffer );
-	}
-
-void yyFlexLexer::switch_streams( istream* new_in, ostream* new_out )
-	{
-	if ( new_in )
-		{
-		yy_delete_buffer( yy_current_buffer );
-		yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) );
-		}
-
-	if ( new_out )
-		yyout = new_out;
-	}
-
-#ifdef YY_INTERACTIVE
-int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )
-#else
-int yyFlexLexer::LexerInput( char* buf, int max_size )
-#endif
-	{
-	if ( yyin->eof() || yyin->fail() )
-		return 0;
-
-#ifdef YY_INTERACTIVE
-	yyin->get( buf[0] );
-
-	if ( yyin->eof() )
-		return 0;
-
-	if ( yyin->bad() )
-		return -1;
-
-	return 1;
-
-#else
-	(void) yyin->read( buf, max_size );
-
-	if ( yyin->bad() )
-		return -1;
-	else
-		return yyin->gcount();
-#endif
-	}
-
-void yyFlexLexer::LexerOutput( const char* buf, int size )
-	{
-	(void) yyout->write( buf, size );
-	}
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- *	EOB_ACT_LAST_MATCH -
- *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- *	EOB_ACT_END_OF_FILE - end of file
- */
-
-int yyFlexLexer::yy_get_next_buffer()
-	{
-	register char *dest = yy_current_buffer->yy_ch_buf;
-	register char *source = yytext_ptr;
-	register int number_to_move, i;
-	int ret_val;
-
-	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
-		YY_FATAL_ERROR(
-		"fatal flex scanner internal error--end of buffer missed" );
-
-	if ( yy_current_buffer->yy_fill_buffer == 0 )
-		{ /* Don't try to fill the buffer, so this is an EOF. */
-		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
-			{
-			/* We matched a single character, the EOB, so
-			 * treat this as a final EOF.
-			 */
-			return EOB_ACT_END_OF_FILE;
-			}
-
-		else
-			{
-			/* We matched some text prior to the EOB, first
-			 * process it.
-			 */
-			return EOB_ACT_LAST_MATCH;
-			}
-		}
-
-	/* Try to read more data. */
-
-	/* First move last chars to start of buffer. */
-	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
-
-	for ( i = 0; i < number_to_move; ++i )
-		*(dest++) = *(source++);
-
-	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
-		/* don't do the read, it's not guaranteed to return an EOF,
-		 * just force an EOF
-		 */
-		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
-
-	else
-		{
-		int num_to_read =
-			yy_current_buffer->yy_buf_size - number_to_move - 1;
-
-		while ( num_to_read <= 0 )
-			{ /* Not enough room in the buffer - grow it. */
-#ifdef YY_USES_REJECT
-			YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-#else
-
-			/* just a shorter name for the current buffer */
-			YY_BUFFER_STATE b = yy_current_buffer;
-
-			int yy_c_buf_p_offset =
-				(int) (yy_c_buf_p - b->yy_ch_buf);
-
-			if ( b->yy_is_our_buffer )
-				{
-				int new_size = b->yy_buf_size * 2;
-
-				if ( new_size <= 0 )
-					b->yy_buf_size += b->yy_buf_size / 8;
-				else
-					b->yy_buf_size *= 2;
-
-				b->yy_ch_buf = (char *)
-					/* Include room in for 2 EOB chars. */
-					yy_flex_realloc( (void *) b->yy_ch_buf,
-							 b->yy_buf_size + 2 );
-				}
-			else
-				/* Can't grow it, we don't own it. */
-				b->yy_ch_buf = 0;
-
-			if ( ! b->yy_ch_buf )
-				YY_FATAL_ERROR(
-				"fatal error - scanner input buffer overflow" );
-
-			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
-
-			num_to_read = yy_current_buffer->yy_buf_size -
-						number_to_move - 1;
-#endif
-			}
-
-		if ( num_to_read > YY_READ_BUF_SIZE )
-			num_to_read = YY_READ_BUF_SIZE;
-
-		/* Read in more data. */
-		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
-			yy_n_chars, num_to_read );
-
-		yy_current_buffer->yy_n_chars = yy_n_chars;
-		}
-
-	if ( yy_n_chars == 0 )
-		{
-		if ( number_to_move == YY_MORE_ADJ )
-			{
-			ret_val = EOB_ACT_END_OF_FILE;
-			yyrestart( yyin );
-			}
-
-		else
-			{
-			ret_val = EOB_ACT_LAST_MATCH;
-			yy_current_buffer->yy_buffer_status =
-				YY_BUFFER_EOF_PENDING;
-			}
-		}
-
-	else
-		ret_val = EOB_ACT_CONTINUE_SCAN;
-
-	yy_n_chars += number_to_move;
-	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
-	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
-
-	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
-
-	return ret_val;
-	}
-
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-yy_state_type yyFlexLexer::yy_get_previous_state()
-	{
-	register yy_state_type yy_current_state;
-	register char *yy_cp;
-
-	yy_current_state = yy_start;
-
-	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
-		{
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
-		if ( yy_accept[yy_current_state] )
-			{
-			yy_last_accepting_state = yy_current_state;
-			yy_last_accepting_cpos = yy_cp;
-			}
-		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-			{
-			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 119 )
-				yy_c = yy_meta[(unsigned int) yy_c];
-			}
-		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-		}
-
-	return yy_current_state;
-	}
-
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- *	next_state = yy_try_NUL_trans( current_state );
- */
-
-yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
-	{
-	register int yy_is_jam;
-	register char *yy_cp = yy_c_buf_p;
-
-	register YY_CHAR yy_c = 1;
-	if ( yy_accept[yy_current_state] )
-		{
-		yy_last_accepting_state = yy_current_state;
-		yy_last_accepting_cpos = yy_cp;
-		}
-	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-		{
-		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 119 )
-			yy_c = yy_meta[(unsigned int) yy_c];
-		}
-	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 118);
-
-	return yy_is_jam ? 0 : yy_current_state;
-	}
-
-
-void yyFlexLexer::yyunput( int c, register char* yy_bp )
-	{
-	register char *yy_cp = yy_c_buf_p;
-
-	/* undo effects of setting up yytext */
-	*yy_cp = yy_hold_char;
-
-	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
-		{ /* need to shift things up to make room */
-		/* +2 for EOB chars. */
-		register int number_to_move = yy_n_chars + 2;
-		register char *dest = &yy_current_buffer->yy_ch_buf[
-					yy_current_buffer->yy_buf_size + 2];
-		register char *source =
-				&yy_current_buffer->yy_ch_buf[number_to_move];
-
-		while ( source > yy_current_buffer->yy_ch_buf )
-			*--dest = *--source;
-
-		yy_cp += (int) (dest - source);
-		yy_bp += (int) (dest - source);
-		yy_current_buffer->yy_n_chars =
-			yy_n_chars = yy_current_buffer->yy_buf_size;
-
-		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
-			YY_FATAL_ERROR( "flex scanner push-back overflow" );
-		}
-
-	*--yy_cp = (char) c;
-
-
-	yytext_ptr = yy_bp;
-	yy_hold_char = *yy_cp;
-	yy_c_buf_p = yy_cp;
-	}
-
-
-int yyFlexLexer::yyinput()
-	{
-	int c;
-
-	*yy_c_buf_p = yy_hold_char;
-
-	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
-		{
-		/* yy_c_buf_p now points to the character we want to return.
-		 * If this occurs *before* the EOB characters, then it's a
-		 * valid NUL; if not, then we've hit the end of the buffer.
-		 */
-		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
-			/* This was really a NUL. */
-			*yy_c_buf_p = '\0';
-
-		else
-			{ /* need more input */
-			int offset = yy_c_buf_p - yytext_ptr;
-			++yy_c_buf_p;
-
-			switch ( yy_get_next_buffer() )
-				{
-				case EOB_ACT_LAST_MATCH:
-					/* This happens because yy_g_n_b()
-					 * sees that we've accumulated a
-					 * token and flags that we need to
-					 * try matching the token before
-					 * proceeding.  But for input(),
-					 * there's no matching to consider.
-					 * So convert the EOB_ACT_LAST_MATCH
-					 * to EOB_ACT_END_OF_FILE.
-					 */
-
-					/* Reset buffer status. */
-					yyrestart( yyin );
-
-					/* fall through */
-
-				case EOB_ACT_END_OF_FILE:
-					{
-					if ( yywrap() )
-						return EOF;
-
-					if ( ! yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-#ifdef __cplusplus
-					return yyinput();
-#else
-					return input();
-#endif
-					}
-
-				case EOB_ACT_CONTINUE_SCAN:
-					yy_c_buf_p = yytext_ptr + offset;
-					break;
-				}
-			}
-		}
-
-	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
-	*yy_c_buf_p = '\0';	/* preserve yytext */
-	yy_hold_char = *++yy_c_buf_p;
-
-
-	return c;
-	}
-
-void yyFlexLexer::yyrestart( istream* input_file )
-	{
-	if ( ! yy_current_buffer )
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
-
-	yy_init_buffer( yy_current_buffer, input_file );
-	yy_load_buffer_state();
-	}
-
-
-void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
-	{
-	if ( yy_current_buffer == new_buffer )
-		return;
-
-	if ( yy_current_buffer )
-		{
-		/* Flush out information for old buffer. */
-		*yy_c_buf_p = yy_hold_char;
-		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
-		yy_current_buffer->yy_n_chars = yy_n_chars;
-		}
-
-	yy_current_buffer = new_buffer;
-	yy_load_buffer_state();
-
-	/* We don't actually know whether we did this switch during
-	 * EOF (yywrap()) processing, but the only time this flag
-	 * is looked at is after yywrap() is called, so it's safe
-	 * to go ahead and always set it.
-	 */
-	yy_did_buffer_switch_on_eof = 1;
-	}
-
-
-void yyFlexLexer::yy_load_buffer_state()
-	{
-	yy_n_chars = yy_current_buffer->yy_n_chars;
-	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
-	yyin = yy_current_buffer->yy_input_file;
-	yy_hold_char = *yy_c_buf_p;
-	}
-
-
-YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( istream* file, int size )
-	{
-	YY_BUFFER_STATE b;
-
-	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_buf_size = size;
-
-	/* yy_ch_buf has to be 2 characters longer than the size given because
-	 * we need to put in 2 end-of-buffer characters.
-	 */
-	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
-	if ( ! b->yy_ch_buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_is_our_buffer = 1;
-
-	yy_init_buffer( b, file );
-
-	return b;
-	}
-
-
-void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
-	{
-	if ( ! b )
-		return;
-
-	if ( b == yy_current_buffer )
-		yy_current_buffer = (YY_BUFFER_STATE) 0;
-
-	if ( b->yy_is_our_buffer )
-		yy_flex_free( (void *) b->yy_ch_buf );
-
-	yy_flex_free( (void *) b );
-	}
-
-
-void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, istream* file )
-
-	{
-	yy_flush_buffer( b );
-
-	b->yy_input_file = file;
-	b->yy_fill_buffer = 1;
-
-	b->yy_is_interactive = 0;
-	}
-
-
-void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
-	{
-	if ( ! b )
-		return;
-
-	b->yy_n_chars = 0;
-
-	/* We always need two end-of-buffer characters.  The first causes
-	 * a transition to the end-of-buffer state.  The second causes
-	 * a jam in that state.
-	 */
-	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
-	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
-	b->yy_buf_pos = &b->yy_ch_buf[0];
-
-	b->yy_at_bol = 1;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	if ( b == yy_current_buffer )
-		yy_load_buffer_state();
-	}
-
-
-#ifndef YY_NO_SCAN_BUFFER
-#endif
-
-
-#ifndef YY_NO_SCAN_STRING
-#endif
-
-
-#ifndef YY_NO_SCAN_BYTES
-#endif
-
-
-#ifndef YY_NO_PUSH_STATE
-void yyFlexLexer::yy_push_state( int new_state )
-	{
-	if ( yy_start_stack_ptr >= yy_start_stack_depth )
-		{
-		yy_size_t new_size;
-
-		yy_start_stack_depth += YY_START_STACK_INCR;
-		new_size = yy_start_stack_depth * sizeof( int );
-
-		if ( ! yy_start_stack )
-			yy_start_stack = (int *) yy_flex_alloc( new_size );
-
-		else
-			yy_start_stack = (int *) yy_flex_realloc(
-					(void *) yy_start_stack, new_size );
-
-		if ( ! yy_start_stack )
-			YY_FATAL_ERROR(
-			"out of memory expanding start-condition stack" );
-		}
-
-	yy_start_stack[yy_start_stack_ptr++] = YY_START;
-
-	BEGIN(new_state);
-	}
-#endif
-
-
-#ifndef YY_NO_POP_STATE
-void yyFlexLexer::yy_pop_state()
-	{
-	if ( --yy_start_stack_ptr < 0 )
-		YY_FATAL_ERROR( "start-condition stack underflow" );
-
-	BEGIN(yy_start_stack[yy_start_stack_ptr]);
-	}
-#endif
-
-
-#ifndef YY_NO_TOP_STATE
-int yyFlexLexer::yy_top_state()
-	{
-	return yy_start_stack[yy_start_stack_ptr - 1];
-	}
-#endif
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-
-void yyFlexLexer::LexerError( yyconst char msg[] )
-	{
-	cerr << msg << '\n';
-	exit( YY_EXIT_FAILURE );
-	}
-
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-		yytext[yyleng] = yy_hold_char; \
-		yy_c_buf_p = yytext + n; \
-		yy_hold_char = *yy_c_buf_p; \
-		*yy_c_buf_p = '\0'; \
-		yyleng = n; \
-		} \
-	while ( 0 )
-
-
-/* Internal utility routines. */
-
-#ifndef yytext_ptr
-#ifdef YY_USE_PROTOS
-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
-#else
-static void yy_flex_strncpy( s1, s2, n )
-char *s1;
-yyconst char *s2;
-int n;
-#endif
-	{
-	register int i;
-	for ( i = 0; i < n; ++i )
-		s1[i] = s2[i];
-	}
-#endif
-
-#ifdef YY_NEED_STRLEN
-#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
-#else
-static int yy_flex_strlen( s )
-yyconst char *s;
-#endif
-	{
-	register int n;
-	for ( n = 0; s[n]; ++n )
-		;
-
-	return n;
-	}
-#endif
-
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_alloc( yy_size_t size )
-#else
-static void *yy_flex_alloc( size )
-yy_size_t size;
-#endif
-	{
-	return (void *) malloc( size );
-	}
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_realloc( void *ptr, yy_size_t size )
-#else
-static void *yy_flex_realloc( ptr, size )
-void *ptr;
-yy_size_t size;
-#endif
-	{
-	/* The cast to (char *) in the following accommodates both
-	 * implementations that use char* generic pointers, and those
-	 * that use void* generic pointers.  It works with the latter
-	 * because both ANSI C and C++ allow castless assignment from
-	 * any pointer type to void*, and deal with argument conversions
-	 * as though doing an assignment.
-	 */
-	return (void *) realloc( (char *) ptr, size );
-	}
-
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
-	{
-	free( ptr );
-	}
-
-#if YY_MAIN
-int main()
-	{
-	yylex();
-	return 0;
-	}
-#endif
-#line 175 "ossimEquTokenizer.l"
-
-int yywrap()
-{
-   return 1;
-}
diff --git a/src/ossim/base/ossimFilename.cpp b/src/ossim/base/ossimFilename.cpp
deleted file mode 100644
index bc2ec39..0000000
--- a/src/ossim/base/ossimFilename.cpp
+++ /dev/null
@@ -1,1337 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Description: This class provides manipulation of filenames.
-//
-//*************************************************************************
-// $Id: ossimFilename.cpp 20192 2011-10-25 17:27:25Z dburken $
-
-#include <ossim/ossimConfig.h>  /* to pick up platform defines */
-
-#include <iostream>
-#include <fstream>
-using namespace std;
-
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-#include <cerrno>
-#include <ossim/base/ossimDirectory.h>
-#include <ossim/base/ossimDate.h>
-#include <ossim/base/ossimEnvironmentUtility.h>
-
-#if defined(_WIN32)
-#  include <io.h>
-#  include <direct.h>
-#  include <sys/utime.h>
-#  include <windows.h>
-#else
-#  include <sys/types.h>
-#  include <utime.h>
-#  include <sys/stat.h>
-#  include <unistd.h>
-#  include <dirent.h>
-#  include <fcntl.h>
-#endif
-
-#include <sys/stat.h>
-
-#ifdef __BORLANDC__
-#  include <dir.h>
-#  include <direct.h>
-#  include <stdlib.h>
-#  include <io.h>
-#endif
-
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimRegExp.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimNotifyContext.h>
-
-#if defined(_WIN32)
-const char ossimFilename::thePathSeparator = '\\';
-#else
-const char ossimFilename::thePathSeparator = '/';
-#endif
-
-
-/**
- * This was taken from Wx widgets for performing touch and access date stamps.
- */ 
-#if defined(_WIN32)
-typedef WIN32_FIND_DATA FIND_STRUCT;
-typedef HANDLE FIND_DATA;
-typedef DWORD FIND_ATTR;
-
-class ossimFileHandle
-{
-public:
-   enum OpenMode
-   {
-      Read,
-      Write
-   };
-   
-   ossimFileHandle(const ossimString& filename, OpenMode mode)
-   {
-      m_hFile = ::CreateFile(
-         filename.c_str(),              // name
-         mode == Read ? GENERIC_READ    // access mask
-         : GENERIC_WRITE,
-         FILE_SHARE_READ |              // sharing mode
-         FILE_SHARE_WRITE,              // (allow everything)
-         NULL,                          // no secutity attr
-         OPEN_EXISTING,                 // creation disposition
-         0,                             // no flags
-         NULL                           // no template file
-         );
-      
-      if ( m_hFile == INVALID_HANDLE_VALUE )
-      {
-//             wxLogSysError(_("Failed to open '%s' for %s"),
-//                           filename.c_str(),
-//                           mode == Read ? _("reading") : _("writing"));
-      }
-   }
-   
-   ~ossimFileHandle()
-   {
-      if ( m_hFile != INVALID_HANDLE_VALUE )
-      {
-         if ( !::CloseHandle(m_hFile) )
-         {
-//                 wxLogSysError(_("Failed to close file handle"));
-         }
-      }
-   }
-   
-   // return true only if the file could be opened successfully
-   bool isOk() const { return m_hFile != INVALID_HANDLE_VALUE; }
-   
-   // get the handle
-   operator HANDLE() const { return m_hFile; }
-   
-private:
-   HANDLE m_hFile;
-};
-
-static void convertOssimToFileTime(FILETIME *ft, const ossimDate& dt)
-{
-   SYSTEMTIME st;
-   st.wDay = dt.getDay();
-   st.wMonth = (WORD)(dt.getMonth());
-   st.wYear = (WORD)dt.getYear();
-   st.wHour = dt.getHour();
-   st.wMinute = dt.getMin();
-   st.wSecond = dt.getSec();
-//     st.wMilliseconds = dt.GetMillisecond();
-
-   FILETIME ftLocal;
-   if ( !::SystemTimeToFileTime(&st, &ftLocal) )
-   {
-//         wxLogLastError(_T("SystemTimeToFileTime"));
-   }
-
-   if ( !::LocalFileTimeToFileTime(&ftLocal, ft) )
-   {
-//         wxLogLastError(_T("LocalFileTimeToFileTime"));
-   }
-}
-
-static void convertFileTimeToOssim(ossimLocalTm &dt, const FILETIME &ft)
-{
-   FILETIME ftcopy = ft;
-   FILETIME ftLocal;
-   if ( !::FileTimeToLocalFileTime(&ftcopy, &ftLocal) )
-   {
-//         wxLogLastError(_T("FileTimeToLocalFileTime"));
-   }
-
-   SYSTEMTIME st;
-   if ( !::FileTimeToSystemTime(&ftLocal, &st) )
-   {
-//         wxLogLastError(_T("FileTimeToSystemTime"));
-   }
-
-   dt.setDay(st.wDay);
-   dt.setMonth(st.wMonth);
-   dt.setYear(st.wYear);
-   dt.setHour(st.wHour);
-   dt.setMin(st.wMinute);
-   dt.setSec(st.wSecond);
-    
-//     dt->Set(st.wDay, wxDateTime::Month(st.wMonth - 1), st.wYear,
-//             st.wHour, st.wMinute, st.wSecond, st.wMilliseconds);
-}
-
-static inline bool IsFindDataOk(FIND_DATA fd)
-{
-   return fd != INVALID_HANDLE_VALUE;
-}
-
-static inline FIND_DATA FindFirst(const ossimString& spec,
-                                  FIND_STRUCT *finddata)
-{
-   return ::FindFirstFile(spec.c_str(), finddata);
-}
-
-static bool ossimGetDirectoryTimes(const ossimString& dirname,
-                                   FILETIME *ftAccess,
-                                   FILETIME *ftCreate,
-                                   FILETIME *ftMod)
-{
-
-   FIND_STRUCT fs;
-   FIND_DATA fd = FindFirst(dirname, &fs);
-   if ( !IsFindDataOk(fd) )
-   {
-      return false;
-   }
-
-   *ftAccess = fs.ftLastAccessTime;
-   *ftCreate = fs.ftCreationTime;
-   *ftMod = fs.ftLastWriteTime;
-
-   FindClose(fd);
-
-   return true;
-}
-#endif
-
-const ossimFilename ossimFilename::NIL=("");
-
-ossimFilename::ossimFilename()
-   : ossimString()
-{}
-
-ossimFilename::ossimFilename(const ossimFilename& src)
-   : ossimString(src)
-{
-}
-
-ossimFilename::ossimFilename(const ossimString& src)
-   : ossimString(src)
-{
-   if ( m_str.size() )
-   {
-      convertToNative();
-   }
-}
-
-ossimFilename::ossimFilename(const std::string& src)
-   : ossimString(src)
-{
-   if ( m_str.size() )
-   {
-      convertToNative();
-   }
-}
-
-ossimFilename::ossimFilename(const char* src)
-   : ossimString(src)
-{
-   if ( m_str.size() )
-   {
-      convertToNative();
-   }
-}
-
-template <class Iter> ossimFilename::ossimFilename(Iter s, Iter e)
-   : ossimString(s, e)
-{
-   if ( m_str.size() )
-   {
-      convertToNative();
-   }
-}
-
-bool ossimFilename::operator == (const ossimFilename& rhs)const
-{
-   return ossimString::operator==(rhs);
-}
-
-bool ossimFilename::operator == (const ossimString& rhs)const
-{
-   return ossimString::operator==(rhs);
-}
-
-bool ossimFilename::operator == (const char* rhs)const
-{
-   return ossimString::operator ==(rhs);
-}
-
-void ossimFilename::convertBackToForwardSlashes()
-{
-   std::string::iterator currentChar = this->begin();
-
-   while(currentChar != this->end())
-   {
-      if(*currentChar == '\\')
-      {
-         *currentChar = '/';
-      }
-      ++currentChar;
-   }
-}
-
-void ossimFilename::convertForwardToBackSlashes()
-{
-   std::string::iterator currentChar = this->begin();
-
-   while(currentChar != this->end())
-   {
-      if(*currentChar == '/')
-      {
-         *currentChar = '\\';
-      }
-      ++currentChar;
-   }
-}
-
-bool ossimFilename::setTimes(ossimLocalTm* accessTime,
-                             ossimLocalTm* modTime,
-#if defined(_WIN32)                             
-                             ossimLocalTm* createTime)const
-#else
-                             ossimLocalTm* /* createTime */ )const
-#endif
-{
-#if defined(_WIN32)
-   if(isDir())
-   {
-      // need to implement this later
-      return false;
-   }
-   else
-   {
-      ossimFileHandle fh(this->expand(), ossimFileHandle::Write);
-      if(fh.isOk())
-      {
-         FILETIME ftAccess, ftCreate, ftWrite;
-         
-         if ( createTime )
-         {
-            convertOssimToFileTime(&ftCreate, *createTime);
-         }
-         if ( accessTime )
-         {
-            convertOssimToFileTime(&ftAccess, *accessTime);
-         }
-         if ( modTime )
-         {
-            convertOssimToFileTime(&ftWrite, *modTime);
-         }
-         if ( ::SetFileTime(fh,
-                            createTime ? &ftCreate : NULL,
-                            accessTime ? &ftAccess : NULL,
-                            modTime ? &ftWrite : NULL) )
-         {
-            return true;
-         }
-      }
-   }
-#else
-   if ( !accessTime && !modTime )
-   {
-      // can't modify the creation time anyhow, don't try
-      return true;
-   }
-   utimbuf utm;
-   utm.actime = accessTime ? accessTime->getTicks() : modTime->getTicks();
-   utm.modtime = modTime ? modTime->getTicks() : accessTime->getTicks();
-   if ( utime(expand().c_str(), &utm) == 0 )
-   {
-      return true;
-   }
-    
-#endif
-
-   return false;
-}
-
-bool ossimFilename::getTimes(ossimLocalTm *accessTime,
-                             ossimLocalTm *modTime,
-                             ossimLocalTm *createTime) const
-{
-   if(!expand().exists()) return false;
-   
-#if defined(_WIN32)
-   // we must use different methods for the files and directories under
-   // Windows as CreateFile(GENERIC_READ) doesn't work for the directories and
-   // CreateFile(FILE_FLAG_BACKUP_SEMANTICS) works -- but only under NT and
-   // not 9x
-   bool ok;
-   FILETIME ftAccess, ftCreate, ftWrite;
-   if ( isDir() )
-   {
-      ok = ossimGetDirectoryTimes(expand().c_str(),
-                                  &ftAccess, &ftCreate, &ftWrite);
-      ok = false;
-   }
-   else // file
-   {
-      ossimFileHandle fh(expand().c_str(), ossimFileHandle::Read);
-      if ( fh.isOk() )
-      {
-         ok = ::GetFileTime(fh,
-                            createTime ? &ftCreate : NULL,
-                            accessTime ? &ftAccess : NULL,
-                            modTime ? &ftWrite : NULL) != 0;
-      }
-      else
-      {
-         ok = false;
-      }
-   }
-
-   if ( ok )
-   {
-      if ( createTime )
-      {
-         convertFileTimeToOssim(*createTime, ftCreate);
-      }
-      if ( accessTime )
-      {
-         convertFileTimeToOssim(*accessTime, ftAccess);
-      }
-      if ( modTime )
-      {
-         convertFileTimeToOssim(*modTime, ftWrite);
-      }
-        
-      return true;
-   }
-#else
-   struct stat sbuf;
-   stat(c_str(), &sbuf);
-   if ( stat( expand().c_str(), &sbuf) == 0 )
-   {
-      if ( accessTime )
-      {
-         *accessTime = ossimLocalTm(sbuf.st_atime);
-      }
-      if ( modTime )
-      {
-         *modTime = ossimLocalTm(sbuf.st_mtime);
-      }
-      if ( createTime )
-      {
-         *createTime = ossimLocalTm(sbuf.st_ctime);
-      }
-      return true;
-   }
-#endif // platforms
-
-
-   return false;
-}
-
-bool ossimFilename::touch()const
-{
-#if defined( _WIN32 )
-   ossimDate now;
-
-   return setTimes(&now, &now, 0);
-   
-#else
-   if ( utime(expand().c_str(), NULL) == 0 )
-   {
-      return true;
-   }
-   
-   return false;
-#endif   
-}
-
-ossimFilename ossimFilename::expand() const
-{
-   //---
-   // Note:  ossimEnvironmentUtility::getCurrentWorkingDir() is returning
-   // a blank string on windows with vs9.  This was resulting in seg faults
-   // in this method so added checks were added for size of returned result.
-   // (drb  20100113)
-   //---
-   ossimFilename result = "";
-   if ( size() )
-   {
-      result = *this;
-      
-      if ( needsExpansion() )
-      {
-
-//#if defined(_WIN32)
-//         result.convertBackToForwardSlashes();
-//#endif
-
-         bool addCwd = false;
-         
-         if ( (size() > 1) && (*(begin()) == '~') && (*(begin()+1) == thePathSeparator) )
-         {
-            ossimFilename homeDir =
-               ossimEnvironmentUtility::instance()->getUserDir();
-            
-            ossimFilename s( (result.begin()+2) , result.end());
-            result = homeDir.dirCat(s);
-         }
-         else if( (size() > 1) &&
-                  (*(begin()) == '.') && (*(begin()+1) == thePathSeparator) )
-         {
-            // dot slash i.e. ./foo
-            addCwd = true;
-         }
-         else if ( (size() > 2)  && (*(begin()) == '.')
-                   && (*(begin()+1) == '.') && (*(begin()+2) == thePathSeparator) )
-         {
-            // ../foo
-            addCwd = true;
-         }
-         else if (result == ".")
-         {
-            result = ossimEnvironmentUtility::instance()->
-               getCurrentWorkingDir();
-         }
-
-         if (addCwd)
-         {
-            ossimFilename cwd = ossimEnvironmentUtility::instance()->
-               getCurrentWorkingDir();
-            result = cwd.dirCat(result);
-         }
-         else if ( result.isRelative() )
-         {
-            if ( result.size() && ((*(result.begin())) != '$') )
-            {
-               ossimFilename cwd = ossimEnvironmentUtility::instance()->
-                  getCurrentWorkingDir();
-               result = cwd.dirCat(result);
-            }
-         }
-               
-         // Check result to see if we're finished.
-         if ( result.needsExpansion() )
-         {
-            // now expand any environment variable substitutions
-            
-            ossimFilename finalResult;
-            const char* tempPtr = result.c_str();
-            ossim_int32 startIdx = -1;
-            ossim_int32 resultSize = (ossim_uint32)result.size();
-            ossim_int32 scanIdx = 0;
-            while(scanIdx < resultSize)
-            {
-               // look for start of substitution pattern
-               if(tempPtr[scanIdx] == '$')
-               {
-                  if(tempPtr[scanIdx+1] == '(')
-                  {
-                     scanIdx +=2;
-                     startIdx = scanIdx;
-                  }
-               }
-               // look for an end pattern and apply if we found a start pattern
-               else if(tempPtr[scanIdx] == ')')
-               {
-                  if(startIdx != -1)
-                  {
-                     ossimFilename value(
-                        ossimEnvironmentUtility::instance()->
-                        getEnvironmentVariable(ossimString(tempPtr+startIdx,
-                                                           tempPtr+scanIdx)));
-#if defined(_WIN32) // do windows style replacment
-                     //                    value.convertBackToForwardSlashes();
-#endif
-                     finalResult += value;
-                     // reset start idx indicator to not set so we are ready for next pattern
-                     //
-                     startIdx = -1;
-                  }
-                  else // if no start then tack on the )
-                  {
-                     finalResult += tempPtr[scanIdx];
-                  }
-                  ++scanIdx;
-               }
-               else if(startIdx == -1)
-               {
-                  finalResult += tempPtr[scanIdx];
-                  ++scanIdx;
-               }
-               else
-               {
-                  ++scanIdx;
-               }
-            }
-#if defined(_WIN32)
-
-#else        
-            finalResult.gsub("//", "/", true);
-#endif       
-            result = finalResult;
-         
-         } // matches:  if ( result.needsExpansion() )
-
-#if defined(_WIN32)
-         //        result.convertForwardToBackSlashes();
-#endif        
-
-      } // matches: if ( needsExpansion() )
-
-      //---
-      // If we had a size before "expand()" and now we don't something went
-      // wrong...
-      //---
-      if (!result.size())
-      {
-         result = *this;
-      }
-      
-   } // matches: if ( size() )
-   
-   return result;
-}
-
-bool ossimFilename::exists() const
-{
-   bool result = false;
-#if defined(_WIN32)
-   result = (_access(c_str(), ossimFilename::OSSIM_EXIST) == 0);
-#else
-   result = ((access(c_str(), ossimFilename::OSSIM_EXIST)) == 0);
-#endif
-   return result;
-}
-
-bool ossimFilename::isFile() const
-{
-#if defined(_WIN32)
-
-   struct _stat sbuf;
-   if ( _stat(c_str(), &sbuf ) == -1)
-      return false;
-   return (_S_IFMT & sbuf.st_mode ? true : false);
-#else
-   struct stat sbuf;
-
-   stat(c_str(), &sbuf);
-   return ((sbuf.st_mode & S_IFMT) == S_IFREG);
-#endif
-}
-
-bool ossimFilename::isDir() const
-{
-   if ( empty() )
-   {
-      return false;
-   }
-   
-   ossimFilename temp = c_str();
-   const char& lastChar = temp[temp.size()-1];
-   if ( lastChar == '/' || lastChar == '\\' )
-   {
-      temp = temp.beforePos(temp.size() - 1);
-   }
-	
-#if defined(_WIN32)
-
-   struct _stat sbuf;
-   if ( _stat(temp.c_str(), &sbuf ) == -1)
-      return false;
-   return (_S_IFDIR & sbuf.st_mode ? true : false);
-#else
-   struct stat sbuf;
-   if (stat(temp.c_str(), &sbuf) == -1)
-      return false;
-   return (S_ISDIR(sbuf.st_mode));
-#endif
-}
-
-bool ossimFilename::isReadable() const
-{
-#if defined(_WIN32)
-   
-   struct _stat sbuf;
-   if ( _stat(c_str(), &sbuf ) == -1)
-      return false;
-   return (_S_IREAD & sbuf.st_mode ? true : false);
-#else
-   return (access(c_str(), ossimFilename::OSSIM_READ) == 0);
-#endif
-}
-
-bool ossimFilename::isWriteable() const
-{
-#if defined(_WIN32)
-
-   struct _stat sbuf;
-   if ( _stat(c_str(), &sbuf ) == -1)
-      return false;
-   return (_S_IWRITE & sbuf.st_mode ? true : false);
-#else
-   return (access(c_str(), ossimFilename::OSSIM_WRITE) == 0);
-#endif
-}
-
-bool ossimFilename::isExecutable() const
-{
-#if defined(_WIN32)
-
-   struct _stat sbuf;
-   if ( _stat(c_str(), &sbuf ) == -1)
-      return false;
-   return (_S_IEXEC & sbuf.st_mode ? true : false);
-#else
-   return (access(c_str(), ossimFilename::OSSIM_EXE) == 0);
-#endif
-}
-
-ossimString ossimFilename::ext() const
-{
-   ossimFilename file = *this;
-   std::string::size_type pos = file.m_str.rfind('.');
-   if (pos == std::string::npos)
-   {
-      return ossimFilename::NIL;
-   }
-
-   return ossimFilename(file.m_str.substr(pos+1));
-}
-
-ossimFilename ossimFilename::file() const
-{
-   ossimFilename file = *this;
-
-   //file.convertBackToForwardSlashes();
-
-   std::string::size_type pos = file.m_str.rfind(thePathSeparator);
-   if (pos == std::string::npos)
-      return *this;
-   else
-      return ossimFilename(file.m_str.substr(pos+1));
-}
-
-ossimFilename ossimFilename::path() const
-{
-   ossimFilename file = *this;
-   //file.convertBackToForwardSlashes();
-
-   // finds the last occurrence of the given string; in this case '/';
-   std::string::size_type pos = file.m_str.rfind(thePathSeparator);
-
-   if (pos == 0)
-      return ossimFilename(ossimFilename(thePathSeparator));
-   if (pos == std::string::npos)
-   {
-      // We got to the end of the file and did not find a path separator.
-      return ossimFilename::NIL;
-   }
-
-   return ossimFilename(file.m_str.substr(0, pos));
-}
-
-ossimFilename ossimFilename::drive()const
-{
-   ossimFilename tempFile(*this);
-   ossimFilename result;
-
-   tempFile.convertForwardToBackSlashes();
-
-   ossimRegExp regEx("^([a-z|A-Z])+:");
-
-   if(regEx.find(tempFile.c_str()))
-   {
-      result = ossimFilename(ossimString(this->begin() + regEx.start(),
-                                         this->begin() + regEx.end()));
-   }
-   else
-   {
-      result = "";
-   }
-
-   return result;
-}
-
-ossimFilename ossimFilename::fileNoExtension()const
-{
-   ossimFilename f = *this;
-   //f.convertBackToForwardSlashes();
-
-   std::string::size_type dot_pos   = f.m_str.rfind('.');
-   std::string::size_type slash_pos = f.m_str.rfind(thePathSeparator);
-
-   if(dot_pos == std::string::npos)
-   {
-      if(slash_pos == std::string::npos)
-      {
-         return *this;
-      }
-      else
-      {
-         return ossimFilename(this->begin()+slash_pos+1,
-                              this->end());
-      }
-   }
-   else if(slash_pos == std::string::npos)
-   {
-      return ossimFilename(this->begin(), this->begin()+dot_pos);
-   }
-   else if(slash_pos < dot_pos)
-   {
-      return ossimFilename(this->begin()+slash_pos+1,
-                           this->begin() + dot_pos);
-   }
-
-   return ossimFilename(this->begin()+slash_pos+1,
-                        this->end());
-
-}
-ossimFilename ossimFilename::noExtension()const
-{
-   ossimString drivePart;
-   ossimString pathPart;
-   ossimString filePart;
-   ossimString extPart;
-
-   split(drivePart, pathPart, filePart, extPart);
-
-   extPart.clear();
-
-   ossimFilename result;
-   
-   result.merge(drivePart, pathPart, filePart, extPart);
-   
-   return result;
-}
-
-ossimFilename& ossimFilename::setExtension(const ossimString& e)
-{
-   ossimString newExtPart = e;
-
-   //---
-   // If e has a dot "." in the front of it strip it off...
-   //---
-   if ( (e.begin() != e.end()) && ((*(e.begin())) == '.') )
-   {
-      newExtPart = ossimString(e.begin() + 1, e.end());
-   }
-
-   ossimString drivePart;
-   ossimString pathPart;
-   ossimString filePart;
-   ossimString extPart;
-
-   split(drivePart,
-         pathPart,
-         filePart,
-         extPart);
-
-   merge(drivePart,
-         pathPart,
-         filePart,
-         newExtPart);
-
-   return *this;
-}
-
-ossimFilename& ossimFilename::setDrive(const ossimString& d)
-{
-   ossimString drivePart;
-   ossimString pathPart;
-   ossimString filePart;
-   ossimString extPart;
-
-   split(drivePart,
-         pathPart,
-         filePart,
-         extPart);
-
-   merge(d,
-         pathPart,
-         filePart,
-         extPart);
-
-   return *this;
-}
-
-ossimFilename& ossimFilename::setPath(const ossimString& p)
-{
-   ossimString drivePart;
-   ossimString pathPart;
-   ossimString filePart;
-   ossimString extPart;
-
-   split(drivePart,
-         pathPart,
-         filePart,
-         extPart);
-
-   merge(drivePart,
-         p,
-         filePart,
-         extPart);
-
-   return *this;
-}
-
-ossimFilename& ossimFilename::setFile(const ossimString& f)
-{
-   ossimString drivePart;
-   ossimString pathPart;
-   ossimString filePart;
-   ossimString extPart;
-
-   split(drivePart,
-         pathPart,
-         filePart,
-         extPart);
-
-   merge(drivePart,
-         pathPart,
-         f,
-         extPart);
-
-   return *this;
-}
-
-
-void ossimFilename::split(ossimString& drivePart,
-                          ossimString& pathPart,
-                          ossimString& filePart,
-                          ossimString& extPart)const
-{
-   drivePart = drive();
-   pathPart  = path();
-   if(drivePart != "")
-   {
-      pathPart = pathPart.substitute(drivePart, "");
-   }
-   filePart  = fileNoExtension();
-   extPart   = ext();
-}
-
-void ossimFilename::merge(const ossimString& drivePart,
-                          const ossimString& pathPart,
-                          const ossimString& filePart,
-                          const ossimString& extPart)
-{
-   ossimFilename result = drivePart;
-
-   if(pathPart != "")
-   {
-      result = result.dirCat(ossimFilename(pathPart));
-   }
-
-   if(filePart!="")
-   {
-      result = result.dirCat(ossimFilename(filePart));
-   }
-
-   if(extPart != "")
-   {
-      result += ".";
-      result += extPart;
-   }
-
-   *this = result;
-}
-
-ossimFilename ossimFilename::dirCat(const ossimFilename& file) const
-{
-   // If this string is empty simply return the input file.
-   if (empty()) return file;
-   if (file.empty()) return *this;
-
-   ossimFilename dir      = *this;
-   ossimFilename tempFile = file;
-      
-   // Check the end and see if it already has a "/".
-   string::const_iterator i = dir.end();
-
-   --i; // decrement past the trailing null.
-
-   if ( (*i) != thePathSeparator)
-   {
-      dir += ossimString(thePathSeparator);
-   }
-
-   // check for dot slash or just slash: ./foo or /foo   
-   std::string::iterator iter = tempFile.begin();
-   if (iter != tempFile.end())
-   {
-      if ((*iter) == thePathSeparator)
-      {
-         ++iter; // skip slash
-      }
-      else if (tempFile.size() > 1)
-      {
-         if ( ((*iter) == '.') &&  ( *(iter + 1) == thePathSeparator) )
-         {
-            iter = iter + 2; // skip dot slash
-         }
-      }
-   }   
-
-   dir += std::string(iter, tempFile.end());
-
-   return dir;
-}
-
-ossim_int64 ossimFilename::fileSize() const
-{
-   struct stat sbuf;
-
-#ifndef __BORLANDC__
-   if (stat(c_str(), &sbuf) == 0)
-   {
-      return (ossim_int64)sbuf.st_size;
-   }
-   else
-   {
-      ifstream in(c_str());
-      if(in)
-      {
-         in.seekg(SEEK_END);
-         return (ossim_int64)in.tellg();
-      }
-   }
-#else
-   ifstream in(c_str());
-   if(in)
-   {
-      in.seekg(SEEK_END);
-      return (ossim_int64)in.tellg();
-   }
-#endif
-   return 0;
-}
-
-bool ossimFilename::createDirectory( bool recurseFlag,
-                                     int perm ) const
-{
-   if(exists()) return true;
-
-   if ( empty() ) return false;
-
-   if(recurseFlag)
-   {
-      ossimString tempString = this->expand().c_str();
-
-      vector<ossimString> result;
-      tempString.split(result,thePathSeparator);
-
-      if(result.size())
-      {
-         ossimString current = result[0];
-
-// Reconstruct UNC paths under Windows.
-#if defined(_WIN32)
-         bool bGotUNC = false;
-         if ( current.length() == 0 && tempString.length() > 2 )
-         {
-            const char* fstr = tempString.c_str();
-            const char fstar0 = fstr[0];
-            const char fstar1 = fstr[1];
-            if ( fstar0=='\\' && fstar1=='\\' )
-            {
-               bGotUNC = true;
-               current = thePathSeparator;
-            }
-         }
-#endif
-
-         for(ossim_uint32 i = 1; i < result.size(); ++i)
-         {
-            current += (thePathSeparator+result[i]);
-
-#if defined(_WIN32)
-            if ( bGotUNC == true && i==1 )
-            {
-               // The root of the UNC path is assumed to exist.
-               continue;
-            }
-#endif
-            
-            if(current != thePathSeparator)
-            {
-               if(!ossimFilename(current).exists())
-               {
-#if defined(__BORLANDC__)
-                  if ( _mkdir(current.c_str()) != 0 )
-#elif defined(_WIN32)
-                  if ( _mkdir(current.c_str()) != 0 )
-#else
-                  if ( mkdir(current.c_str(), perm) != 0 )
-#endif
-                  {
-                     return false;
-                  }
-               }
-            }
-         }
-      }
-   }
-   else
-   {
-#if defined (__BORLANDC__)
-      if ( _mkdir(c_str()) != 0 )
-#elif defined(_WIN32)
-      if ( _mkdir(c_str()) != 0 )
-#else
-      if ( mkdir(c_str(), perm) != 0 )
-#endif
-      {
-         return false;
-      }
-      else
-      {
-         return true;
-      }
-   }
-   return true;
-}
-
-bool ossimFilename::remove(const ossimFilename& pathname)
-{
-   bool result = true;
-
-#if defined(__VISUALC__)  || defined(__BORLANDC__) || defined(__WATCOMC__) || \
-   defined(__GNUWIN32__) || defined(_MSC_VER)
-
-   // Note: not sure if these work on all of the above flavors. drb - 14 Sep. 2011.
-   if(pathname.isDir())
-   {
-      // Note this only removes empty directories.
-      result = ( RemoveDirectory( pathname.c_str() ) != 0 );
-   }
-   else
-   {
-      result = ( DeleteFile( pathname.c_str() ) != 0 );
-   }
-#else /* Unix flavor from unistd.h. */
-   if(pathname.isDir())
-   {
-      result = ( rmdir( pathname.c_str() ) == 0 );
-   }
-   else
-   {
-      result = ( unlink( pathname.c_str() ) == 0 );
-   }
-#endif
-
-   return result;
-}
-
-bool ossimFilename::wildcardRemove(const ossimFilename& pathname)
-{
-   std::vector<ossimFilename> fileListToRemove;
-   ossimFilename tempPathname = pathname;
-   
-   if(!tempPathname.isDir())
-   {
-      ossimFilename file = tempPathname.file();
-      ossimFilename path = tempPathname.path();
-      if(path == "")
-      {
-         path = ".";
-      }
-      ossimDirectory dir;
-      if(dir.open(path))
-      {
-         dir.findAllFilesThatMatch(fileListToRemove,
-                                   file.c_str());
-      }
-      else
-      {
-      }
-   }
-   else
-   {
-      fileListToRemove.push_back(ossimFilename(pathname));
-   }
-   ossim_uint32 idx = 0;
-   bool result = true;
-   for(idx = 0; idx < fileListToRemove.size(); ++idx)
-   {
-#if defined(__VISUALC__)  || defined(__BORLANDC__) || defined(__WATCOMC__) || \
-   defined(__GNUWIN32__) || defined(_MSC_VER)
-      
-      if(remove(fileListToRemove[idx].c_str()) != 0)
-      {
-         result = false;
-      }
-#else
-      if (unlink(fileListToRemove[idx]) == -1)
-      {
-         result = false;
-      }
-#endif /* HAVE_UNISTD_H */
-   }
-   return result;
-}
-
-bool ossimFilename::rename(const ossimFilename& destFile, bool overwriteDestinationFlag)const
-{
-   if(!overwriteDestinationFlag)
-   {
-      if(destFile.exists())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "WARNING: "
-            << "ossimFilename::rename WARNING:"
-            << "\nDestination File Exists: " << destFile << std::endl;
-         return false;
-      }
-   }
-   else if(destFile.exists())
-   {
-      destFile.remove();
-   }
-   ::rename(this->c_str(), destFile.c_str());
-   
-   return true;
-}
-   
-bool ossimFilename::remove()const
-{
-   return ossimFilename::remove(*this);
-}
-
-bool ossimFilename::wildcardRemove()const
-{
-   return ossimFilename::wildcardRemove(*this);
-}
-
-bool ossimFilename::copyFileTo(const ossimFilename& outputFile) const
-{
-   bool result = false;
-   
-   std::ifstream is(this->c_str(), std::ios::in|std::ios::binary);
-   if ( is.good() )
-   {
-      ossimFilename f = outputFile;
-      if ( f.isDir() )
-      {
-         f = f.dirCat( this->file() );
-      }
-
-      if ( f != *this )
-      {
-         std::ofstream os( f.c_str(), std::ios::out|std::ios::binary );
-         if ( os.good() )
-         {
-            // Copy the file:
-            char c;
-            while(is.get(c))
-            {
-               os.put(c);
-            }
-            
-            if ( is.eof() &&  !os.fail())
-            {
-               result = true;
-            }
-            else
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << "WARNING: "
-                  << "ossimFilename::copyFileTo WARNING:"
-                  << "\nError detected writing from file "
-                  << this->c_str() << " to file " << f.c_str() << std::endl;
-            }
-         }
-         else
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "WARNING: "
-               << "ossimFilename::copyFileTo WARNING:"
-               << "\nCannot open: " << f.c_str() << std::endl;
-         }
-      } //  if ( f != *this )
-      else
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "WARNING: "
-            << "ossimFilename::copyFileTo WARNING:"
-            << "\nFiles the same!" << std::endl;
-      }
-      
-   } // if ( is.good() )
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "WARNING: "
-         << "ossimFilename::copyFileTo WARNING:"
-         << "\nCannot open: " << this->c_str() << std::endl;
-   }
-   
-   return result;
-}
-
-//---
-// We will only return false if we are absolutely sure absolutely sure we
-// are not relative. No pun intended:)
-//---
-bool ossimFilename::isRelative() const
-{
-   bool result = true;
-   if (size())
-   {
-      //---
-      // Look for unix "/"...
-      // ESH: Look for Windows "\" (with prepending escape character \)
-      //---
-      if ( (*(begin()) == '/') || (*(begin()) == '\\') )
-      {
-         result = false;
-      }
-      else
-      {
-         // Look for windows drive
-         ossimRegExp regEx("^([a-z|A-Z])+:");
-         if ( regEx.find(c_str()) == true)
-         {
-            result = false;
-         }
-      }
-   }
-   return result;
-}
-
-bool ossimFilename::needsExpansion() const
-{
-   bool result = false;
-   if ( size() )
-   {
-      result = isRelative();
-      if (result == false)
-      {
-         // Check for '$'
-         std::string::size_type pos = m_str.find('$', 0);
-         {
-            if (pos != std::string::npos)
-            {
-               // found '$'
-               result = true;
-            }
-         }
-      }    
-   }
-   return result;
-}
-
-char ossimFilename::getPathSeparator() const
-{
-   return thePathSeparator;
-}
-
-void ossimFilename::convertToNative()
-{
-#if defined(_WIN32)
-   convertForwardToBackSlashes();
-#else
-   convertBackToForwardSlashes();
-#endif
-	
-}
diff --git a/src/ossim/base/ossimGeoPolygon.cpp b/src/ossim/base/ossimGeoPolygon.cpp
deleted file mode 100644
index db3a7d1..0000000
--- a/src/ossim/base/ossimGeoPolygon.cpp
+++ /dev/null
@@ -1,334 +0,0 @@
-//*****************************************************************************
-// FILE: ossimPolygon.h
-//
-// License:  See top level LICENSE.txt file.
-//
-// AUTHOR: Garrett Potts
-//
-//*****************************************************************************
-//  $Id: ossimGeoPolygon.cpp 17815 2010-08-03 13:23:14Z dburken $
-
-#include <ostream>
-#include <sstream>
-#include <algorithm>
-#include <ossim/base/ossimGeoPolygon.h>
-#include <ossim/base/ossimDatumFactoryRegistry.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-
-static const char* NUMBER_VERTICES_KW = "number_vertices";
-
-std::ostream& operator <<(std::ostream& out, const ossimGeoPolygon& poly)
-{
-   if(poly.size())
-   {
-      if(poly.size() >1)
-      {
-         for(ossim_uint32 i = 0; i <  poly.size()-1; ++i)
-         {
-            out << "P" << i << ": " << poly[i] << std::endl;
-         }
-         out << "P"  << (poly.size()-1)
-             << ": " << poly[poly.size()-1] << std::endl;
-      }
-      else
-      {
-         out << "P0: " << poly[0] << std::endl;
-      }
-   }
-
-   return out;
-}
-
-bool ossimGeoPolygon::hasNans()const
-{
-   int upper = (int)theVertexList.size();
-   int i = 0;
-
-   for(i = 0; i < upper; ++i)
-   {
-      if(theVertexList[i].hasNans())
-      {
-         return true;
-      }
-   }
-
-   return false;
-}
-
-bool ossimGeoPolygon::vertex(int index, ossimGpt& v) const 
-{
-   if((index >= (int)theVertexList.size()) ||
-      (index < 0))
-   {
-      return false;
-   }
-
-   v = theVertexList[index];
-   theCurrentVertex = index;
-
-   return true;
-}
-
-bool ossimGeoPolygon::nextVertex(ossimDpt& v) const 
-{
-   ++theCurrentVertex;
-   if(theCurrentVertex >= (ossim_int32)theVertexList.size())
-   {
-      return false;
-   }
-   v = theVertexList[theCurrentVertex];
-   
-   return true;
-}
-
-void ossimGeoPolygon::stretchOut(ossimGeoPolygon& newPolygon,
-                                 double displacement)
-{
-   newPolygon.resize(size());
-   if(size() >= 3)
-   {
-      const ossimDatum* datum = theVertexList[0].datum();
-      checkOrdering();
-      double signMult = 1.0;
-      if(theOrderingType == OSSIM_COUNTERCLOCKWISE_ORDER)
-      {
-         signMult = -1.0;
-      }
-      
-      ossimDpt prev, current, next;
-
-      ossim_uint32 prevI;
-      ossim_uint32 currentI;
-      ossim_uint32 nextI;
-      ossim_uint32 i = 0;
-      ossim_uint32 upper = size();
-
-      bool equalEndsFlag = false;
-      if(theVertexList[0] == theVertexList[theVertexList.size()-1])
-      {
-         equalEndsFlag = true;
-         prevI    = 0;
-         currentI = 1;
-         nextI    = 2;
-         i = 1;
-         --upper;
-      }
-      else
-      {
-         equalEndsFlag = false;
-         prevI    = size()-1;
-         currentI = 0;
-         nextI    = 1;
-      }
-      for(; i < upper;++i)
-      {
-         prev    = theVertexList[prevI];
-         current = theVertexList[currentI];
-         next    = theVertexList[nextI];
-
-         ossimDpt averageNormal;
-         
-         ossimDpt diffPrev = current - prev;
-         ossimDpt diffNext = next - current;
-
-         diffPrev = diffPrev*(1.0/diffPrev.length());
-         diffNext = diffNext*(1.0/diffNext.length());
-
-         ossimDpt diffPrevNormal(-diffPrev.y,
-                                 diffPrev.x);
-         ossimDpt diffNextNormal(-diffNext.y,
-                                 diffNext.x);
-         
-         averageNormal     = (diffPrevNormal + diffNextNormal);
-         averageNormal     = averageNormal*(signMult*(1.0/averageNormal.length()));
-         ossimDpt newPoint = ossimDpt( theVertexList[i].lond(),
-                                       theVertexList[i].latd()) +
-                             averageNormal*displacement;
-         newPolygon[i].latd(newPoint.lat);
-         newPolygon[i].lond(newPoint.lon);
-         newPolygon[i].height(theVertexList[i].height());
-         newPolygon[i].datum(datum);
-         
-         ++prevI;
-         ++currentI;
-         ++nextI;
-
-         prevI%=size();
-         nextI%=size();
-      }
-      if(equalEndsFlag)
-      {
-         
-         prev    = theVertexList[theVertexList.size()-2];
-         current = theVertexList[0];
-         next    = theVertexList[1];
-         
-         ossimDpt averageNormal;
-         
-         ossimDpt diffPrev = current - prev;
-         ossimDpt diffNext = next - current;
-
-         diffPrev = diffPrev*(1.0/diffPrev.length());
-         diffNext = diffNext*(1.0/diffNext.length());
-
-         ossimDpt diffPrevNormal(-diffPrev.y,
-                                 diffPrev.x);
-         ossimDpt diffNextNormal(-diffNext.y,
-                                 diffNext.x);
-         
-         averageNormal     = (diffPrevNormal + diffNextNormal);
-         averageNormal     = averageNormal*(signMult*(1.0/averageNormal.length()));
-         ossimDpt newPoint = ossimDpt( theVertexList[i].lond(),
-                                       theVertexList[i].latd()) +
-                             averageNormal*displacement;
-         newPolygon[0].latd(newPoint.lat);
-         newPolygon[0].lond(newPoint.lon);
-         newPolygon[0].height(theVertexList[i].height());
-         newPolygon[0].datum(datum);
-         
-         newPolygon[(int)theVertexList.size()-1] = newPolygon[0];
-      }
-   }
-}
-
-
-double ossimGeoPolygon::area()const
-{
-   double area = 0;
-   ossim_uint32 i=0;
-   ossim_uint32 j=0;
-   ossim_uint32 size = (ossim_uint32)theVertexList.size();
-   
-   for (i=0;i<size;i++)
-   {
-      j = (i + 1) % size;
-      area += theVertexList[i].lon * theVertexList[j].lat;
-      area -= theVertexList[i].lat * theVertexList[j].lon;
-   }
-
-   area /= 2;
-
-   return area;
-}
-
-void ossimGeoPolygon::reverseOrder()
-{
-   std::reverse(theVertexList.begin(), theVertexList.end());
-   
-   if(theOrderingType == OSSIM_COUNTERCLOCKWISE_ORDER)
-   {
-      theOrderingType = OSSIM_CLOCKWISE_ORDER;
-   }
-   else if(theOrderingType == OSSIM_CLOCKWISE_ORDER)
-   {
-      theOrderingType =  OSSIM_COUNTERCLOCKWISE_ORDER;
-   }
-   
-}
-
-void ossimGeoPolygon::checkOrdering()const
-{
-   if(theOrderingType == OSSIM_VERTEX_ORDER_UNKNOWN)
-   {
-      double areaValue = area();
-      if(areaValue > 0)
-      {
-         theOrderingType = OSSIM_COUNTERCLOCKWISE_ORDER;
-      }
-      else if(areaValue <= 0)
-      {
-         theOrderingType = OSSIM_CLOCKWISE_ORDER;
-      }
-   }
-}
-
-ossimGpt ossimGeoPolygon::computeCentroid()const
-{
-   if(!size())
-   {
-      return ossimGpt();
-   }
-   ossimDpt average(0.0,0.0);
-   double height=0.0;
-   for(ossim_uint32 i = 0; i < size(); ++i)
-   {
-      average += ossimDpt(theVertexList[i]);
-      height  += theVertexList[i].height();
-   }
-
-   
-   average.x /= size();
-   average.y /= size();
-   height    /= size();
-
-   return ossimGpt(average.y, average.x, height, theVertexList[0].datum());
-}
-
-bool ossimGeoPolygon::saveState(ossimKeywordlist& kwl,
-                                const char* prefix)const
-{
-   int i = 0;
-
-   kwl.add(prefix,
-           ossimKeywordNames::TYPE_KW,
-           "ossimGeoPolygon",
-           true);
-   kwl.add(prefix,
-           NUMBER_VERTICES_KW,
-           static_cast<ossim_uint32>(theVertexList.size()),
-           true);
-   if(theVertexList.size())
-   {
-      kwl.add(prefix,
-              ossimKeywordNames::DATUM_KW,
-              theVertexList[0].datum()->code(),
-              true);
-   }
-   else
-   {
-      kwl.add(prefix,
-              ossimKeywordNames::DATUM_KW,
-              "WGE",
-              true);
-   }
-   
-   for(i = 0; i < (int)theVertexList.size();++i)
-   {
-      ossimString vert = "v"+ossimString::toString(i);
-      ossimString value = (ossimString::toString(theVertexList[i].latd()) + " " +
-                           ossimString::toString(theVertexList[i].lond())  + " " +
-                           ( theVertexList[i].isHgtNan()?ossimString("nan"):ossimString::toString(theVertexList[i].height())));
-      kwl.add(prefix,
-              vert.c_str(),
-              value.c_str(),
-              true);
-   }
-
-   return true;
-}
-
-bool ossimGeoPolygon::loadState(const ossimKeywordlist& kwl,
-                                const char* prefix)
-{
-   const char* number_vertices = kwl.find(prefix, NUMBER_VERTICES_KW);
-   ossimString datumStr = kwl.find(prefix, ossimKeywordNames::DATUM_KW);
-   const ossimDatum* datum = ossimDatumFactoryRegistry::instance()->create(datumStr);
-   
-   theVertexList.clear();
-   int i = 0;
-   int vertexCount = ossimString(number_vertices).toLong();
-   ossimString lat, lon, height;
-   for(i = 0; i < vertexCount; ++i)
-   {
-      ossimString v = kwl.find(prefix, (ossimString("v")+ossimString::toString(i)).c_str());
-      ossimString latString, lonString, heightString;
-      v = v.trim();
-      std::istringstream in(v);
-      in>>lat>>lon>>height;
-      theVertexList.push_back(ossimGpt(lat.toDouble(), lon.toDouble(), height.toDouble(), datum));
-   }
-
-   return true;
-}
diff --git a/src/ossim/base/ossimGeoTiffDatumLut.cpp b/src/ossim/base/ossimGeoTiffDatumLut.cpp
deleted file mode 100644
index 9afba5d..0000000
--- a/src/ossim/base/ossimGeoTiffDatumLut.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Contains class definition for ossimGeoTiffDatumLut.
-//*******************************************************************
-//  $Id: ossimGeoTiffDatumLut.cpp 16472 2010-02-01 19:52:27Z gpotts $
-
-#include <ossim/base/ossimGeoTiffDatumLut.h>
-#include <ossim/base/ossimString.h>
-
-static const int TABLE_SIZE = 24;
-
-//*******************************************************************
-// Public Constructor:
-//*******************************************************************
-ossimGeoTiffDatumLut::ossimGeoTiffDatumLut()
-   :
-      ossimLookUpTable(TABLE_SIZE)
-{
-   //***
-   // Complete initialization of data member "theTable".
-   // Note:  Scalar types defined in constants.h file.
-   //***
-   theTable[0].theKey    = GCS_Adindan;
-   theTable[0].theValue  = "ADI-M";
-   
-   theTable[1].theKey    = GCS_Arc_1950;
-   theTable[1].theValue  = "ARF-M";
-   
-   theTable[2].theKey    = GCS_Arc_1960;
-   theTable[2].theValue  = "ARS-M";
-   
-   theTable[3].theKey    = GCS_ED50;
-   theTable[3].theValue  = "EUR-M";
-   
-   theTable[4].theKey    = GCS_NAD27;
-   theTable[4].theValue  = "NAS-C";
-   
-   theTable[5].theKey    = GCS_NAD83;
-   theTable[5].theValue  = "NAR-C";
-   
-   theTable[6].theKey    = GCS_OSGB_1936;
-   theTable[6].theValue  = "OGB-M";
-   
-   theTable[7].theKey    = GCS_WGS_72;
-   theTable[7].theValue  = "WGD";
-   
-   theTable[8].theKey    = GCS_WGS_84;
-   theTable[8].theValue  = "WGE";
-   
-   theTable[9].theKey    = GCS_Tokyo;
-   theTable[9].theValue  = "TOY-M";
-   
-   theTable[10].theKey   = DatumE_WGS84;
-   theTable[10].theValue = "WGE";
-   
-   theTable[11].theKey   = Datum_Adindan;
-   theTable[11].theValue = "ADI-M";
-   
-   theTable[12].theKey   = Datum_Arc_1950;
-   theTable[12].theValue = "ARF-M";
-   
-   theTable[13].theKey   = Datum_Arc_1960;
-   theTable[13].theValue = "ARS-M";
-   
-   theTable[14].theKey   = Datum_European_Datum_1950;
-   theTable[14].theValue = "EUR-M";
-   
-   theTable[15].theKey   = Datum_North_American_Datum_1927;
-   theTable[15].theValue = "NAS-C";
-   
-   theTable[16].theKey   = Datum_North_American_Datum_1983;
-   theTable[16].theValue = "NAR-C";
-   
-   theTable[17].theKey   = Datum_OSGB_1936;
-   theTable[17].theValue = "OGB-M";
-   
-   theTable[18].theKey   = Datum_Tokyo;
-   theTable[18].theValue = "TOY-M";
-   
-   theTable[19].theKey   = Datum_WGS72;
-   theTable[19].theValue = "WGD";
-   
-   theTable[20].theKey   = Datum_WGS84;
-   theTable[20].theValue = "WGE";
-
-   theTable[21].theKey   = Datum_NAD83_HARN;
-   theTable[21].theValue = "NAR";
-
-   theTable[22].theKey   = GCS_NAD83_HARN;
-   theTable[22].theValue = "NAR";
-
-   //---
-   // Note:  This code implies a Clark 1866 ellipse with no datum.
-   // NAS-C used as work around for poor tag setting out of Erdas Imagine.
-   //---
-   theTable[23].theKey   = GCS_Clark_1866;
-   theTable[23].theValue = "NAS-C";
-   theTable[23].theKey   = 3785;
-   theTable[23].theValue = "6055";
-   theTable[23].theKey   = 900913;
-   theTable[23].theValue = "6055";
-}
-
-ossimGeoTiffDatumLut::~ossimGeoTiffDatumLut()
-{
-}
-
-ossimKeyword ossimGeoTiffDatumLut::getKeyword() const
-{
-   return ossimKeyword("geotiff_datum_code", "");
-}
diff --git a/src/ossim/base/ossimGeoidEgm96.cpp b/src/ossim/base/ossimGeoidEgm96.cpp
deleted file mode 100644
index 66138a8..0000000
--- a/src/ossim/base/ossimGeoidEgm96.cpp
+++ /dev/null
@@ -1,315 +0,0 @@
-//*******************************************************************
-// License:  See top level LICENSE.txt file.
-//
-// Author:  David Burken
-//
-//*******************************************************************
-//  $Id: ossimGeoidEgm96.cpp 11513 2007-08-06 11:40:18Z gpotts $
-
-#include <ossim/base/ossimGeoidEgm96.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h> /* for ossim::nan() */
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimDatumFactory.h>
-#include <fstream>
-
-static ossimTrace traceDebug ("ossimGeoidEgm96:debug");
-
-
-#define NumbGeoidCols 1441   /* 360 degrees of longitude at 15 minute spacing */
-#define NumbGeoidRows  721   /* 180 degrees of latitude  at 15 minute spacing */
-#define NumbHeaderItems 6    /* min, max lat, min, max long, lat, long spacing*/
-#define ScaleFactor     4    /* 4 grid cells per degree at 15 minute spacing  */
-#define NumbGeoidElevs NumbGeoidCols * NumbGeoidRows
-// #define PI              3.14159265358979323e0
-
-
-RTTI_DEF1(ossimGeoidEgm96, "ossimGeoidEgm96", ossimGeoid)
-
-ossimGeoidEgm96::ossimGeoidEgm96()
-   :theGeoidHeightBufferPtr(0)
-{
-}
-
-ossimGeoidEgm96::ossimGeoidEgm96(const ossimFilename& grid_file,
-                                 ossimByteOrder byteOrder)
-   :theGeoidHeightBufferPtr(0)
-{
-   open(grid_file, byteOrder);
-   if (getErrorStatus() != ossimErrorCodes::OSSIM_OK)
-   {
-      theGeoidHeightBuffer.clear();
-   }
-}
-
-ossimGeoidEgm96::~ossimGeoidEgm96()
-{
-}
-
-ossimString ossimGeoidEgm96::getShortName()const
-{
-   return "geoid1996";
-}
-
-bool ossimGeoidEgm96::open(const ossimFilename& grid_file,
-                           ossimByteOrder byteOrder)
-{
-   static const char MODULE[] = "ossimGeoidEgm96::open";
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " Entered...\n";
-   }
-
-   if(theGeoidHeightBuffer.size() != NumbGeoidElevs)
-   {
-      theGeoidHeightBuffer.resize(NumbGeoidElevs);
-      theGeoidHeightBufferPtr = &theGeoidHeightBuffer.front();
-   }
-   
-   // int   ItemsRead = 0;
-   long  ElevationsRead = 0;
-   // long  ItemsDiscarded = 0;
-   long  num = 0;
-
-   ossimFilename grid = grid_file;
-   if (grid_file.isDir())
-   {
-      grid = grid_file.dirCat("egm96.grd");
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " Grid file:" << grid << "\n";
-   }
-   
-   // Open the File READONLY, or Return Error Condition:
-   std::ifstream gridHeightFile(grid.c_str(), std::ios::in|std::ios::binary);
-//   FILE* GeoidHeightFile;
-
-   if ( gridHeightFile.fail())
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << MODULE << " could not open file "
-                                            << grid.c_str() << "\n";
-      }
-      setErrorStatus();
-      return false;
-   }
-  
-   // Skip the Header Line:
-   ossimEndian oe;
-   bool swap_bytes = (ossim::byteOrder() != byteOrder) ? true : false;
-   while ( (num < NumbHeaderItems)&&(!gridHeightFile.fail()))
-   {      
-      float f;
-      gridHeightFile.read( (char*)(&f), 4);
-      if (swap_bytes) oe.swap(f);
-      theGeoidHeightBuffer[num] = f;
-      ++num;
-   }
-   // Determine if header read properly, or NOT:
-   if ((!ossim::almostEqual(theGeoidHeightBuffer[0], (float)-90.0)) ||
-       (!ossim::almostEqual(theGeoidHeightBuffer[1], (float)90.0)) ||
-       (!ossim::almostEqual(theGeoidHeightBuffer[2], (float)0.0)) ||
-       (!ossim::almostEqual(theGeoidHeightBuffer[3],(float)360.0))||
-       (!ossim::almostEqual(theGeoidHeightBuffer[4],(float)(1.0 / ScaleFactor ))) ||
-       (!ossim::almostEqual(theGeoidHeightBuffer[5],(float)( 1.0 / ScaleFactor ))) ||
-       gridHeightFile.fail())
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << MODULE << " bad header file "
-                                            << grid.c_str() << "\n";
-      }
-      setErrorStatus();
-      return false;
-  }
-
-   // Extract elements from the file:
-   num = 0;
-   while ( (num < NumbGeoidElevs)&&(!gridHeightFile.fail()) )
-   {
-//       if (feof( GeoidHeightFile )) break;
-//       if (ferror( GeoidHeightFile )) break;
-      
-      float f;
-      gridHeightFile.read( (char*)(&f), 4);
-      if (swap_bytes) oe.swap(f);
-      theGeoidHeightBuffer[num] = f;
-      ++ElevationsRead;
-      ++num;
-   }
-
-//    fclose(GeoidHeightFile);
-   
-   // Determine if all elevations of file read properly, or NOT:
-   if (ElevationsRead != NumbGeoidElevs)
-   {
-      setErrorStatus();
-      ossimSetError("ossimGeoidEgm96::open",
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "Bad grid file...%s", grid.c_str());
-     return false;
-  }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "Opened geoid grid:  " << grid.c_str() << std::endl;
-   }
-   
-   return true;
-}
-
-double ossimGeoidEgm96::offsetFromEllipsoid(const ossimGpt& gpt) const
-{
-   double offset = ossim::nan();
-   ossimGpt savedGpt = gpt;
-   if(ossimDatumFactory::instance()->wgs84())
-   {
-      savedGpt.changeDatum(ossimDatumFactory::instance()->wgs84());
-   }
-   
-   if (!theGeoidHeightBufferPtr)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-            << "ossimGeoidEgm96::offsetFromEllipsoid, "
-            << "Object not initialized!\n";
-      }
-
-      return offset;
-   }
-   
-   long    Index;
-   double DeltaX, DeltaY;
-   double ElevationSE, ElevationSW, ElevationNE, ElevationNW;
-   double LatitudeDD, LongitudeDD;
-   double OffsetX, OffsetY;
-   double PostX, PostY;
-   double UpperY, LowerY;
-
-   LatitudeDD  = savedGpt.latd();
-   
-   // Check for wrap.
-   if (LatitudeDD < -90.0)
-   {
-      LatitudeDD = -180.0 - LatitudeDD;
-   }
-   else if (LatitudeDD > 90.0)
-   {
-      LatitudeDD = 180.0 - LatitudeDD;
-   }
-
-   if ( (LatitudeDD < -90.0) || LatitudeDD > 90.0)
-   {
-      if(traceDebug())
-      {
-         // Latitude out of range
-         ossimNotify(ossimNotifyLevel_FATAL)
-            << "FATAL: " << "ossimGeoidEgm96::offsetFromEllipsoid, "
-            << "Point out of range:  " << savedGpt << "\n";
-      }
-      return offset;
-   }
-   
-   LongitudeDD = savedGpt.lond();
-
-   // Check for wrap.
-   if (LongitudeDD < -180)
-   {
-      LongitudeDD = LongitudeDD + 360.0;
-   }
-   else if (LongitudeDD > 180.0)
-   {
-      LongitudeDD = LongitudeDD - 360.0;
-   }
-
-   if ( (LongitudeDD < -180.0) || (LongitudeDD > 180.0) )
-   {
-      // Longitude out of range
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-            << "FATAL: " << "ossimGeoidEgm96::offsetFromEllipsoid, "
-            << "Point out of range:  " << savedGpt << "\n";
-      }
-      return offset;
-   }
-   
-   // Compute X and Y Offsets into Geoid Height Array:
-   
-   if (LongitudeDD < 0.0)
-   {
-      OffsetX = ( LongitudeDD + 360.0 ) * ScaleFactor;
-   }
-   else
-   {
-      OffsetX = LongitudeDD * ScaleFactor;
-   }
-   OffsetY = ( 90.0 - LatitudeDD ) * ScaleFactor;
-   
-   //***
-        // Find Four Nearest Geoid Height Cells for specified Latitude,
-        // Longitude;  Assumes that (0,0) of Geoid Height Array is at
-        // Northwest corner:
-        //***
-             PostX = floor( OffsetX );
-   if ((PostX + 1) == NumbGeoidCols)
-      PostX--;
-   PostY = floor( OffsetY );
-   if ((PostY + 1) == NumbGeoidRows)
-      PostY--;
-   
-   Index = (long)(PostY * NumbGeoidCols + PostX);
-   ElevationNW = theGeoidHeightBufferPtr[ Index ];
-   ElevationNE = theGeoidHeightBufferPtr[ Index+ 1 ];
-   
-   Index = (long)((PostY + 1) * NumbGeoidCols + PostX);
-   ElevationSW = theGeoidHeightBufferPtr[ Index ];
-   ElevationSE = theGeoidHeightBufferPtr[ Index + 1 ];
-   
-   //Perform Bi-Linear Interpolation to compute Height above Ellipsoid:
-   DeltaX = OffsetX - PostX;
-   DeltaY = OffsetY - PostY;
-   
-   UpperY = ElevationNW + DeltaX * ( ElevationNE - ElevationNW );
-   LowerY = ElevationSW + DeltaX * ( ElevationSE - ElevationSW );
-   
-   offset = UpperY + DeltaY * ( LowerY - UpperY );
-   
-   return offset;
-}
-
-double ossimGeoidEgm96::geoidToEllipsoidHeight(double lat,
-                                               double lon,
-                                               double geoidHeight) const
-{
-   ossimGpt gpt(lat, lon);
-   double height = offsetFromEllipsoid(gpt);
-   if (!ossim::isnan(height))
-   {
-      height += geoidHeight;
-   }
-   return height;
-}
-
-double ossimGeoidEgm96::ellipsoidToGeoidHeight(double lat,
-                                               double lon,
-                                               double ellipsoidHeight) const
-{
-   ossimGpt gpt(lat, lon);
-   double height = offsetFromEllipsoid(gpt);
-   if (!ossim::isnan(height))
-   {
-      return (ellipsoidHeight - height);
-   }
-   return height; // nan
-}
diff --git a/src/ossim/base/ossimGeoidManager.cpp b/src/ossim/base/ossimGeoidManager.cpp
deleted file mode 100644
index 0f12804..0000000
--- a/src/ossim/base/ossimGeoidManager.cpp
+++ /dev/null
@@ -1,294 +0,0 @@
-//*****************************************************************************
-// FILE: ossimGeoidManager.cpp
-//
-// License:  See top level LICENSE.txt file.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Contains implementation of class ossimGeoidManager
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimGeoidManager.cpp 20096 2011-09-14 16:44:20Z dburken $
-
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimGeoidManager.h>
-#include <ossim/base/ossimEnvironmentUtility.h>
-
-RTTI_DEF1(ossimGeoidManager, "ossimGeoidManager", ossimGeoid);
-
-#include <ossim/base/ossimGeoidNgs.h>
-#include <ossim/base/ossimGeoidEgm96.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeyword.h>
-#include <ossim/base/ossimNotifyContext.h>
-//***
-// Define Trace flags for use within this file:
-//***
-#include <ossim/base/ossimTrace.h>
-static ossimTrace traceExec  ("ossimGeoidManager:exec");
-static ossimTrace traceDebug ("ossimGeoidManager:debug");
-
-ossimGeoidManager* ossimGeoidManager::theInstance = 0;
-
-//*****************************************************************************
-//  CONSTRUCTOR: ossimGeoidManager
-//  
-//*****************************************************************************
-ossimGeoidManager::ossimGeoidManager()
-{
-   theInstance = this;
-   theIdentityGeoid = new ossimIdentityGeoid();
-}
-
-//*****************************************************************************
-//  DESTRUCTOR: ~ossimGeoidManager
-//  
-//*****************************************************************************
-ossimGeoidManager::~ossimGeoidManager()
-{
-//    vector<ossimGeoid*>::iterator g = theGeoidList.begin();
-//    while (g != theGeoidList.end())
-//    {
-//       delete *g;
-//       ++g;
-//    }
-   theGeoidList.clear();
-}
-
-//*****************************************************************************
-//  METHOD: ossimGeoidManager::instance()
-//  
-//*****************************************************************************
-ossimGeoidManager* ossimGeoidManager::instance()
-{
-   if (!theInstance)
-   {
-      theInstance = new ossimGeoidManager();
-   }
-   
-   return theInstance;
-}
-
-//*****************************************************************************
-//  METHOD: ossimElevManager::addGeoidSource
-//  
-//*****************************************************************************
-void ossimGeoidManager::addGeoid(ossimRefPtr<ossimGeoid> geoid, bool toFrontFlag)
-{
-   if(!toFrontFlag)
-   {
-      theGeoidList.push_back(geoid);
-   }
-   else
-   {
-      theGeoidList.insert(theGeoidList.begin(), geoid);
-   }
-}
-
-bool ossimGeoidManager::saveState(ossimKeywordlist& /* kwl */,
-                                  const char* /* prefix */ ) const
-{
-   return true;
-}
-
-//*****************************************************************************
-//  METHOD: ossimGeoidManager::loadState()
-//  
-//*****************************************************************************
-bool ossimGeoidManager::loadState(const ossimKeywordlist& kwl,
-                                  const char* prefix)
-{
-   static const char MODULE[] = "ossimGeoidManager::loadState()";
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
-      << "DEBUG: " << MODULE << ", entering...\n";
-
-   
-   // Look for the ngs geoid directories
-   const char* lookup = kwl.find(prefix, "geoid_99_directory");
-   ossimByteOrder geoidNgsByteOrder = OSSIM_LITTLE_ENDIAN;
-   const char* byteOrder = kwl.find(prefix, "geoid_99_directory.byte_order");
-   if (!lookup)
-   {
-      lookup = kwl.find(prefix, "geoid_ngs_directory");
-      byteOrder = kwl.find(prefix, "geoid_ngs_directory.byte_order");
-   }
-   if(byteOrder)
-   {
-      if(ossimString(byteOrder).contains("little"))
-      {
-         geoidNgsByteOrder = OSSIM_LITTLE_ENDIAN;
-      }
-      else
-      {
-         geoidNgsByteOrder = OSSIM_BIG_ENDIAN;
-      }
-   }
-   if(lookup)
-   {
-      ossimFilename f = lookup;
-      if (f.isDir())
-      {
-         ossimRefPtr<ossimGeoid> geoid = new ossimGeoidNgs(f, geoidNgsByteOrder);
-
-         if (geoid->getErrorStatus() == ossimErrorCodes::OSSIM_OK)
-         {
-            if (traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG)
-                  << "DEBUG: " << MODULE
-                  << "\nAdded geoid dir:  " << f.c_str() << "\n";
-            }
-
-            addGeoid(geoid.get());
-         }
-         else
-         {
-            geoid = 0;
-         }
-      }
-   }
-
-   ossimFilename geoidGrid1996 = ossimEnvironmentUtility::instance()->getUserOssimSupportDir();
-   geoidGrid1996 = geoidGrid1996.dirCat("geoids");
-   geoidGrid1996 = geoidGrid1996.dirCat("geoid1996");
-   geoidGrid1996 = geoidGrid1996.dirCat("egm96.grd");
-
-   if(!geoidGrid1996.exists())
-   {
-      geoidGrid1996 = ossimEnvironmentUtility::instance()->getInstalledOssimSupportDir();
-      geoidGrid1996 = geoidGrid1996.dirCat("geoids");
-      geoidGrid1996 = geoidGrid1996.dirCat("geoid1996");
-      geoidGrid1996 = geoidGrid1996.dirCat("egm96.grd");
-   }
-
-   if( geoidGrid1996.exists() )
-   {
-      ossimRefPtr<ossimGeoid> geoid = new ossimGeoidEgm96(geoidGrid1996);
-      if (geoid->getErrorStatus() == ossimErrorCodes::OSSIM_OK)
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "DEBUG: " << MODULE
-               << "\nAdded geoid egm 96:  " << geoidGrid1996.c_str()
-               << "\n";
-         }
-         addGeoid(geoid.get());
-      }
-      else
-      {
-         geoid = 0;
-      }
-   }
-   else
-   {
-      // Look for the geoid Earth Gravity Model (EGM) 96 directory.
-      lookup = kwl.find(prefix, "geoid_egm_96_grid");
-      if (lookup)
-      {
-         ossimFilename f = lookup;
-         if (f.isDir() || f.isFile())
-         {
-            ossimRefPtr<ossimGeoid> geoid = new ossimGeoidEgm96(f);
-            
-            if (geoid->getErrorStatus() == ossimErrorCodes::OSSIM_OK)
-            {
-               if (traceDebug())
-               {
-                  ossimNotify(ossimNotifyLevel_DEBUG)
-                     << "DEBUG: " << MODULE
-                     << "\nAdded geoid egm 96:  " << f.c_str()
-                     << "\n";
-               }
-               
-               addGeoid(geoid.get());
-            }
-            else
-            {
-               geoid = 0;
-            }
-         }
-      }
-   }
-   if (traceExec())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-      << "DEBUG: " << MODULE << ", returning...\n";
-   }
-   
-   return true;
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimGeoidManager::open()
-//  
-//*****************************************************************************
-bool ossimGeoidManager::open(const ossimFilename& dir, ossimByteOrder byteOrder)
-{
-   std::vector<ossimRefPtr<ossimGeoid> >::iterator g = theGeoidList.begin();
-   bool status = true;
-   while (g != theGeoidList.end())
-   {
-      status &= (*g)->open(dir, byteOrder);
-      ++g;
-   }
-
-   return status;
-}
-
-//*****************************************************************************
-//  METHOD: ossimGeoidManager::open()
-//  
-//*****************************************************************************
-double ossimGeoidManager::offsetFromEllipsoid(const ossimGpt& gpt) const
-{
-   double offset = ossim::nan();
-   std::vector<ossimRefPtr<ossimGeoid> >::const_iterator geoid =
-      theGeoidList.begin();
-   
-   while ( ossim::isnan(offset) && (geoid != theGeoidList.end()))
-   {
-      offset = ((*geoid))->offsetFromEllipsoid(gpt);
-      ++geoid;
-   }
-   
-   return offset;
-}
-
-ossimGeoid* ossimGeoidManager::findGeoidByShortName(const ossimString& shortName, bool caseSensitive)
-{
-   ossim_uint32 idx=0;
-   ossimString testString = shortName;
-   if(shortName == "identity")
-   {
-      return theIdentityGeoid.get();
-   }
-   if(!caseSensitive)
-   {
-      testString  = testString.downcase();
-   }
-   for(idx = 0; idx < theGeoidList.size(); ++idx)
-   {
-      if(!caseSensitive)
-      {
-         if(theGeoidList[idx]->getShortName().downcase() == testString)
-         {
-            return theGeoidList[idx].get();
-         }
-      }
-      else
-      {
-         if(theGeoidList[idx]->getShortName() == testString)
-         {
-            return theGeoidList[idx].get();
-         }
-      }
-   }
-   return 0;
-}
diff --git a/src/ossim/base/ossimGeoidNgs.cpp b/src/ossim/base/ossimGeoidNgs.cpp
deleted file mode 100644
index 0d7a2bb..0000000
--- a/src/ossim/base/ossimGeoidNgs.cpp
+++ /dev/null
@@ -1,274 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimGeoidNgs.cpp 17195 2010-04-23 17:32:18Z dburken $
-#include <ossim/base/ossimGeoidNgs.h>
-
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimDatumFactory.h>
-
-
-#include <stdlib.h>  /* standard C general utility library */
-#include <iostream>
-#include <fstream>
-using namespace std;
-
-RTTI_DEF1(ossimGeoidNgs, "ossimGeoidNgs", ossimGeoid)
-
-static ossimTrace traceDebug ("ossimGeoidNgs:debug");
-
-ossimGeoidNgs::ossimGeoidNgs()
-   :theShortName("")
-{
-}
-
-ossimGeoidNgs::ossimGeoidNgs(const ossimFilename& dir,
-                             ossimByteOrder /* byteOrder */)
-{
-   open(dir);
-}
-
-
-bool ossimGeoidNgs::open(const ossimFilename& dir,
-                         ossimByteOrder byteOrder)
-{
-   if (!dir.isDir())
-   {
-      return false;
-   }
-
-   if(dir.isDir())
-   {
-      ossimGeoidNgsHeader h;
-
-      if(dir.dirCat("g2003u01.bin").exists())
-      {
-         theShortName = "geoid2003";
-         addFile(dir.dirCat("g2003u01.bin"), byteOrder);
-      }
-      if(dir.dirCat("g2003u02.bin").exists())
-      {
-         theShortName = "geoid2003";
-         addFile(dir.dirCat("g2003u02.bin"), byteOrder);
-      }
-      if(dir.dirCat("g2003u03.bin").exists())
-      {
-         theShortName = "geoid2003";
-         addFile(dir.dirCat("g2003u03.bin"), byteOrder);
-      }
-      if(dir.dirCat("g2003u04.bin").exists())
-      {
-         theShortName = "geoid2003";
-         addFile(dir.dirCat("g2003u04.bin"), byteOrder);
-      }
-      if(dir.dirCat("g2003u05.bin").exists())
-      {
-         theShortName = "geoid2003";
-         addFile(dir.dirCat("g2003u05.bin"), byteOrder);
-      }
-      if(dir.dirCat("g2003u06.bin").exists())
-      {
-         theShortName = "geoid2003";
-         addFile(dir.dirCat("g2003u06.bin"), byteOrder);
-      }
-
-      if(dir.dirCat("g1999u01.bin").exists())
-      {
-         theShortName = "geoid1999";
-         addFile(dir.dirCat("g1999u01.bin"), byteOrder);
-      }
-      if(dir.dirCat("g1999u02.bin").exists())
-      {
-         theShortName = "geoid1999";
-         addFile(dir.dirCat("g1999u02.bin"), byteOrder);
-      }
-      if(dir.dirCat("g1999u03.bin").exists())
-      {
-         theShortName = "geoid1999";
-         addFile(dir.dirCat("g1999u03.bin"), byteOrder);
-      }
-      if(dir.dirCat("g1999u04.bin").exists())
-      {
-         theShortName = "geoid1999";
-         addFile(dir.dirCat("g1999u04.bin"), byteOrder);
-      }
-      if(dir.dirCat("g1999u05.bin").exists())
-      {
-         theShortName = "geoid1999";
-         addFile(dir.dirCat("g1999u05.bin"), byteOrder);
-      }
-      if(dir.dirCat("g1999u06.bin").exists())
-      {
-         theShortName = "geoid1999";
-         addFile(dir.dirCat("g1999u06.bin"), byteOrder);
-      }
-      if(dir.dirCat("g1999u07.bin").exists())
-      {
-         theShortName = "geoid1999";
-         addFile(dir.dirCat("g1999u07.bin"), byteOrder);
-      }
-      if(dir.dirCat("g1999u08.bin").exists())
-      {
-         theShortName = "geoid1999";
-         addFile(dir.dirCat("g1999u08.bin"), byteOrder);
-      }
-      if(dir.dirCat("g1999a01.bin").exists())
-      {
-         theShortName = "geoid1999";
-         addFile(dir.dirCat("g1999a01.bin"), byteOrder);
-      }
-      if(dir.dirCat("g1999a02.bin").exists())
-      {
-         theShortName = "geoid1999";
-         addFile(dir.dirCat("g1999a02.bin"), byteOrder);
-      }
-      if(dir.dirCat("g1999a03.bin").exists())
-      {
-         theShortName = "geoid1999";
-         addFile(dir.dirCat("g1999a03.bin"), byteOrder);
-      }
-      if(dir.dirCat("g1999a04.bin").exists())
-      {
-         theShortName = "geoid1999";
-         addFile(dir.dirCat("g1999a04.bin"), byteOrder);
-      }
-      if(dir.dirCat("g1999h01.bin"))
-      {
-         theShortName = "geoid1999";
-         addFile(dir.dirCat("g1999h01.bin"), byteOrder);
-      }
-      if(dir.dirCat("g1999p01.bin").exists())
-      {
-         theShortName = "geoid1999";
-         addFile(dir.dirCat("g1999p01.bin"), byteOrder);
-      }
-   }
-   else
-   {
-      addFile(dir, byteOrder);
-   }
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "Opened geoid grids from:  " << dir.c_str() << endl;
-   }
-   
-   return true;
-}
-
-ossimGeoidNgs::~ossimGeoidNgs()
-{
-}
-
-
-bool ossimGeoidNgs::addFile(const ossimFilename& file, ossimByteOrder byteOrder)
-{
-   bool result = false;
-   if(file.exists())
-   {
-      ossim_uint32 idx = 0;
-      for(idx = 0; idx < theGridVector.size();++idx)
-      {
-         if(file == theGridVector[idx].filename())
-         {
-            result = true;
-            return result;
-         }
-      }
-      ossimGeoidNgsHeader h;
-      result = h.initialize(file, byteOrder);
-      if(result)
-      {
-         theGridVector.push_back(h);
-      }
-   }
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimGeoidNgs::addFile: Adding file = " << file << std::endl;
-   }
-   return result;
-}
-
-double ossimGeoidNgs::offsetFromEllipsoid(const ossimGpt& gpt) const
-{
-   ossimGpt savedGpt = gpt;
-   if(ossimDatumFactory::instance()->wgs84())
-   {
-      savedGpt.changeDatum(ossimDatumFactory::instance()->wgs84());
-   }
-   double lat = savedGpt.latd();
-   double lon = savedGpt.lond();
-   fixLatLon(lat, lon);
-   
-   return deltaHeight(lat, lon); 
-}
-
-double ossimGeoidNgs::geoidToEllipsoidHeight(double lat,
-                                             double lon,
-                                             double geoidHeight) const
-{
-
-   fixLatLon(lat, lon);
-   double delta = deltaHeight(lat, lon);
-   if (!ossim::isnan(delta))
-   {
-      return (geoidHeight + delta);
-   }
-   return delta; // nan
-}
-
-double ossimGeoidNgs::ellipsoidToGeoidHeight(double lat,
-                                      double lon,
-                                      double ellipsoidHeight) const
-{
-
-   fixLatLon(lat, lon);
-   double delta = deltaHeight(lat, lon);
-   if (!ossim::isnan(delta))
-   {
-      return (ellipsoidHeight - delta);
-   }
-   return delta; // nan
-}
-
-void ossimGeoidNgs::fixLatLon(double &lat, double &lon) const
-{
-   if(lat < 0)
-   {
-      lat += 180;
-   }
-   if(lon < 0)
-   {
-      lon += 360;
-   }
-}
-
-double ossimGeoidNgs::deltaHeight(double lat, double lon)const
-{
-   ossim_uint32 idx = 0;
-   for(idx = 0; idx < theGridVector.size();++idx)
-   {
-      if( theGridVector[idx].pointWithin(lat, lon) )
-      {
-         return theGridVector[idx].getHeightDelta(lat,
-                                                  lon);
-      }
-   }
-   return ossim::nan();
-}
-
-ossimString ossimGeoidNgs::getShortName()const
-{
-   return theShortName;
-}
diff --git a/src/ossim/base/ossimGrect.cpp b/src/ossim/base/ossimGrect.cpp
deleted file mode 100644
index 0567b78..0000000
--- a/src/ossim/base/ossimGrect.cpp
+++ /dev/null
@@ -1,234 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// Description:
-//
-//*************************************************************************
-// $Id: ossimGrect.cpp 14390 2009-04-22 22:36:02Z gpotts $
-
-#include <ossim/base/ossimGrect.h>
-using namespace std;
-
-ostream& operator<<(ostream& os, const ossimGrect& rect)
-{
-   return os << rect.theUlCorner << ", " << rect.theLrCorner << endl;
-}
-
-ossimGrect::ossimGrect(vector<ossimGpt>& points)
-{
-   unsigned long index;
-   
-   // initialize everyone to the first point
-   if(points.size() > 0)
-   {
-      theUlCorner = points[0];
-      theLrCorner = theUlCorner;
-   }
-   
-   // find the bounds
-   for(index = 1; index < points.size(); index++)
-   {
-      // find left most
-      if(theUlCorner.lond() > points[index].lond())
-      {
-         theUlCorner.lond(points[index].lond());
-      } // find right most
-      else if(theLrCorner.lond() < points[index].lond())
-      {
-         theLrCorner.lond(points[index].lond());
-      }
-      //find top most
-      if(points[index].latd() > theUlCorner.latd())
-      {
-         theUlCorner.latd(points[index].latd());
-      }// find bottom most
-      else if(points[index].latd() < theLrCorner.latd())
-      {
-         theLrCorner.latd(points[index].latd());
-      }
-   }
-   
-   theUrCorner = ossimGpt(theUlCorner.latd(),
-                          theLrCorner.lond(),
-                          0,
-                          theUlCorner.datum());
-   theLlCorner = ossimGpt(theLrCorner.latd(),
-                          theUlCorner.lond(),
-                          0,
-                          theLrCorner.datum());
-}
-
-ossimGrect::ossimGrect(const ossimGpt& p1,
-                       const ossimGpt& p2,
-                       const ossimGpt& p3,
-                       const ossimGpt& p4)
-{
-   unsigned long index;
-   std::vector<ossimGpt> points(4);
-   points[0] = p1;
-   points[1] = p2;
-   points[2] = p3;
-   points[3] = p4;
-   // initialize everyone to the first point
-   if(points.size() > 0)
-   {
-      theUlCorner = points[0];
-      theLrCorner = theUlCorner;
-   }
-   
-   // find the bounds
-   for(index = 1; index < points.size(); index++)
-   {
-      // find left most
-      if(theUlCorner.lond() > points[index].lond())
-      {
-         theUlCorner.lond(points[index].lond());
-      } // find right most
-      else if(theLrCorner.lond() < points[index].lond())
-      {
-         theLrCorner.lond(points[index].lond());
-      }
-      //find top most
-      if(points[index].latd() > theUlCorner.latd())
-      {
-         theUlCorner.latd(points[index].latd());
-      }// find bottom most
-      else if(points[index].latd() < theLrCorner.latd())
-      {
-         theLrCorner.latd(points[index].latd());
-      }
-   }
-   theUrCorner = ossimGpt(theUlCorner.latd(),
-                          theLrCorner.lond(),
-                          0,
-                          theUlCorner.datum());
-   theLlCorner = ossimGpt(theLrCorner.latd(),
-                          theUlCorner.lond(),
-                          0,
-                          theLrCorner.datum());
-}
-
-ossimGrect ossimGrect::stretchToEvenBoundary(double latSpacingInDegrees,
-                                             double lonSpacingInDegrees)const
-{
-   double ulLat = ((long)ceil(theUlCorner.latd()/latSpacingInDegrees))*
-                  latSpacingInDegrees;
-   double ulLon = ((long)floor(theUlCorner.lond()/lonSpacingInDegrees))*
-                  lonSpacingInDegrees;
-   double lrLat = ((long)floor(theLrCorner.latd()/latSpacingInDegrees))*
-                  latSpacingInDegrees;
-   double lrLon = ((long)ceil(theLrCorner.lond()/lonSpacingInDegrees))*
-                  lonSpacingInDegrees;
-   
-   return ossimGrect(ulLat, ulLon, lrLat, lrLon);
-}
-
-void ossimGrect::computeEvenTiles(std::vector<ossimGrect>& result,
-                                  double latSpacingInDegrees,
-                                  double lonSpacingInDegrees,
-                                  bool clipToGeographicBounds)const
-{
-   ossimGrect clipRect = ossimGrect(90, -180, -90, 180);
-   result.clear();
-   ossimGrect temp = stretchToEvenBoundary(latSpacingInDegrees,
-                                           lonSpacingInDegrees);
-
-   ossimGpt point = temp.ul();
-   
-   while(temp.pointWithin(point))
-   {
-      while(temp.pointWithin(point))
-      {
-         ossimGrect rect(point.latd(),
-                         point.lond(),
-                         point.latd()-latSpacingInDegrees,
-                         point.lond()+lonSpacingInDegrees);
-
-         rect.theUlCorner.datum( theUlCorner.datum());
-         rect.theLlCorner.datum( theUlCorner.datum());
-         rect.theLrCorner.datum( theUlCorner.datum());
-         rect.theUrCorner.datum( theUlCorner.datum());
-         if(clipToGeographicBounds)
-         {
-            rect = rect.clipToRect(clipRect);
-         }
-         result.push_back(rect);
-
-         point.lond(point.lond()+lonSpacingInDegrees);
-      }
-      point.lond(temp.ul().lond());
-      point.latd(point.latd()-latSpacingInDegrees);
-   }
-}
-
-//*******************************************************************
-// Public Method: ossimGrect::completely_within
-//*******************************************************************
-bool ossimGrect::completely_within(const ossimGrect& rect) const
-{
-   if(rect.isLonLatNan() || isLonLatNan())
-   {
-      return false;
-   }
-   
-   /*  --------------
-       |     1      |
-       | ---------- |
-       | |        | |
-       | |        | |
-       | |   2    | |
-       | |        | |
-       | |        | |
-       | ---------- |
-       |            |
-       --------------  */
-
-   bool rtn = true;
-   
-   if (theUlCorner.lon < rect.ul().lon)
-   {
-      rtn = false;
-   }
-   else if (theLrCorner.lon > rect.lr().lon)
-   {
-      rtn = false;
-   }
-   else if (theUlCorner.lat < rect.ul().lat)
-   {
-      rtn = false;
-   }
-   else if (theLrCorner.lat > rect.lr().lat)
-   {
-      rtn = false;
-   }
-
-   return rtn;
-}
-
-//*******************************************************************
-// Public Method: ossimGrect::intersects
-//*******************************************************************
-bool ossimGrect::intersects(const ossimGrect& rect) const
-{
-		
-   if(rect.isLonLatNan() || isLonLatNan())
-   {
-      return false;
-   }
-   
-   ossim_float64  ulx = ossim::max(rect.ul().lon, ul().lon);
-   ossim_float64  lrx = ossim::min(rect.lr().lon, lr().lon);
-   ossim_float64  uly, lry;
-   bool rtn;
-   
-   uly  = ossim::min(rect.ul().lat, ul().lat);
-   lry  = ossim::max(rect.lr().lat, lr().lat);
-   rtn = ((ulx <= lrx) && (uly >= lry));
-   
-      return (rtn);
-}
diff --git a/src/ossim/base/ossimHistogram.cpp b/src/ossim/base/ossimHistogram.cpp
deleted file mode 100644
index d5dd07b..0000000
--- a/src/ossim/base/ossimHistogram.cpp
+++ /dev/null
@@ -1,1586 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author: Ken Melero (kmelero at imagelinks.com)
-//         Orginally developed by:
-//                   Copyright (c) 1997 TargetJr Consortium
-//               GE Corporate Research and Development (GE CRD)
-//                             1 Research Circle
-//                            Niskayuna, NY 12309
-//         Adapted from:  IUE v4.1.2
-// Description: 
-//      A ossimHistogram contains an array of "buckets", which represent finite
-// segments of some value axis, along with a corresponding array of
-// frequency counts for each of these buckets.
-//
-//********************************************************************
-// $Id: ossimHistogram.cpp 22124 2013-01-27 16:03:52Z dburken $
-
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimHistogram.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimThinPlateSpline.h>
-#include <ossim/base/ossimDpt.h>
-#include <cmath>
-#include <cstdio>
-#include <fstream>
-#include <iostream>
-#include <sstream>
-using namespace std;
-
-
-
-// nonstandard versions that use operator>, so they behave differently
-// than std:::min/max and ossim::min/max.  kept here for now for that
-// reason.
-#ifndef MAX
-#  define MAX(x,y) ((x)>(y)?(x):(y))
-#  define MIN(x,y) ((x)>(y)?(y):(x))
-#endif
-
-
-static const int MEAN_FLAG = 1, SD_FLAG = 2;
-RTTI_DEF1(ossimHistogram, "ossimHistogram", ossimObject);
-ossimHistogram::ossimHistogram()
-   :
-   stats_consistent(MEAN_FLAG | SD_FLAG),
-   vals(new float [1]),
-   counts(new float [1]),
-   num(0),
-   delta(0.0),
-   vmin(0),
-   vmax(0),
-   mean(0.0),
-   standard_dev(0.0)
-{
-   vals[0] = 0.0;
-   counts[0] = 0.0;
-}
-
-ossimHistogram::ossimHistogram(int xres, float val1, float val2)
-   :
-   stats_consistent(MEAN_FLAG | SD_FLAG),
-   vals(new float [xres]),
-   counts(new float [xres]),
-   num(xres),
-   delta(0.0),
-   vmin(0),
-   vmax(0),
-   mean(0.0),
-   standard_dev(0.0)
-{
-   vmax = MAX(val1, val2);
-   vmin = MIN(val1, val2);
-   delta = (vmax - vmin + 1) / xres;
-   mean = (float)((vmax + vmin)/2.0);
-   standard_dev = (float)((vmax - vmin)/(2.0*sqrt(3.0)));
-   int i = 0;
-
-   if (vals == NULL || counts == NULL)
-   {
-      fprintf(stderr, "Histogram : Ran out of memory for arrays.\n");
-      vals = NULL;
-      counts = NULL;
-      num = 0;
-      vmin = 0;
-      vmax = 0;
-      delta = 0.0;
-   }
-   else
-   {
-      for(i = 0; i < xres; i++)
-      {
-         vals[i] = vmin + delta * (float)(i + 0.5);
-         counts[i] = 0.0;
-      }
-   }
-}
-
-ossimHistogram::ossimHistogram(float* uvals, float* ucounts, int xres)
-   :
-   stats_consistent(MEAN_FLAG | SD_FLAG),
-   vals(uvals),
-   counts(ucounts),
-   num(xres),
-   delta(0.0),
-   vmin(0),
-   vmax(0),
-   mean(0.0),
-   standard_dev(0.0)
-{
-   if ( ( xres >= 2 ) && uvals && ucounts )
-   {
-      delta = vals[1] - vals[0]; // Changed this from delta = 1.0
-      //  vmax = GetMaxVal();
-      //  vmin = GetMinVal(); JAF version
-      vmin = uvals[0] - .5f*delta;
-      vmax = uvals[num-1] + .5f*delta;
-      mean = GetMean();
-      standard_dev = GetStandardDev();
-   }   
-}
-//-----------------------------------------------------------
-// -- Copy constructor
-ossimHistogram::ossimHistogram(const ossimHistogram& his)
-{
-
-   int i = 0;
-   num = his.GetRes();
-
-   vals = new float[num];
-   const float* his_vals = his.GetVals();
-
-   counts = new float[num];
-   const float* his_counts = his.GetCounts();
-
-   if (vals == NULL || counts == NULL)
-   {
-      fprintf(stderr, "Histogram : Ran out of memory for arrays.\n");
-      vals = NULL;
-      counts = NULL;
-      num = 0;
-      vmin = 0;
-      vmax = 0;
-      delta = 0.0;
-      stats_consistent = 0;
-      return;
-   }
-
-   mean = his.GetMean();
-   standard_dev = his.GetStandardDev();
-
-   for(i=0; i<num; i++)
-   {
-      vals[i] = his_vals[i];
-      counts[i] = his_counts[i];
-   }
-   vmax = his.GetMaxVal();
-   vmin = his.GetMinVal();
-   delta = his.GetBucketSize();
-
-   stats_consistent = 0;
-   stats_consistent |= (MEAN_FLAG | SD_FLAG);
-}
-
-
-//---------------------------------------
-// -- Resample a histogram
-
-ossimHistogram::ossimHistogram(const ossimHistogram* his, float width)
-{
-
-   stats_consistent =0;
-
-// Attributes of original histogram
-
-   float del = his->GetBucketSize();
-   int max_index = his->GetRes() - 1;
-   float minvalue = his->GetVals()[0] - del*.5f;
-   float maxvalue = his->GetVals()[max_index] + del*.5f;
-
-
-// Intialize a new histogram
-   if(width == del) num = his->GetRes();
-   else if(!(width == 0.0))
-      num = (int)ceil((maxvalue - minvalue)/width);
-   else
-      num = 1; // This shouldn't happen anyway.
-
-   vals = new float [num];
-   counts = new float [num];
-   delta = width;
-   float mean_val = (maxvalue + minvalue)/2.0f;
-   float half_range = (num * delta)/2.0f;
-   vmax =  mean_val + half_range;
-   vmin =  mean_val - half_range;
-   int i = 0;
-
-   if (vals == NULL || counts == NULL)
-   {
-      fprintf(stderr,
-              "Histogram : Ran out of memory for arrays.\n");
-      vals = NULL;
-      counts = NULL;
-      num = 0;
-      vmin = 0;
-      vmax = 0;
-      delta = 0.0;
-      mean = 0.0;
-      standard_dev = 0.0;
-      stats_consistent |= (MEAN_FLAG | SD_FLAG);
-      return;
-       
-   }
-   
-   else
-   {
-      for(i = 0; i < num; i++)
-      {
-         vals[i] = vmin + delta * (i + 0.5f);
-         counts[i] = 0.0;
-      }
-   }
-
-
-// Cases:
-
-
-   if(width == del)    // Then just copy his
-   {
-      const float* his_counts = his->GetCounts();
-      for(i=0; i<num; i++)
-         counts[i] = his_counts[i];
-      mean = GetMean();
-      standard_dev = GetStandardDev();
-      stats_consistent |= (MEAN_FLAG | SD_FLAG);
-      return;
-   }
-
-
-   if(del > width)     // Then interpolate his counts.
-   {
-
-// Boundary conditions:
-//    Start
-      float his_start = minvalue + .5f*del;
-      float start = vmin + .5f*delta;
-      float c0 = his->GetCount(his_start);
-      float c1 = his->GetCount(his_start + del);
-      float s0 = (c1 - c0)/del;
-
-      for(float x = start; x <= (his_start + del + delta);)
-      {
-         float interp = s0 * (x - his_start) + c0;
-         if(interp < 0) interp = 0; //Can be negative
-         SetCount(x,interp);
-         x += width;
-      }
-//    End
-      float his_end = maxvalue - .5f*del;
-      float end = vmax - .5f*delta;
-      float cn = his->GetCount(his_end);
-      float cn_1 = his->GetCount(his_end - del);
-      float sn = (cn_1 - cn)/del;
-
-      for(float y = end; y >= (his_end - del + delta);)
-      {
-         float interp = sn * (his_end - y) + cn;
-         if(interp < 0) interp = 0; //Can be negative
-         SetCount(y, interp);
-         y -= delta;
-      }
-// Interior Loop
-
-      for(float z = his_start + del; z <= (his_end - del);)
-      {
-         float ci = his->GetCount(z);
-         float ci_1 = his->GetCount(z-del);
-         float cip1 = his->GetCount(z+del);
-         float deriv = (cip1 - ci_1)/(2.0f*del);
-         float second_drv =
-            ((cip1 + ci_1)/2.0f - ci)/(del*del);
-         int fine_x_index = GetIndex(z);
-         if (fine_x_index < 0)
-         {
-            if (z<vmin) fine_x_index = 0;
-            else fine_x_index = num-1;
-         }
-         float fine_x = vals[fine_x_index];
-         for(float xfine = fine_x; xfine < z + del;)
-         {
-            float interp = ci + deriv*(xfine -z) +
-               second_drv*(xfine - z)*(xfine - z);
-
-            if(interp < 0) interp = 0; //Can be negative
-            SetCount(xfine, interp);
-            xfine += width;
-         }
-         z += del;
-      }
-   }
-
-
-   if(del < width)    //Just accumulate samples from his into larger bins
-   {
-      if( del != 0.0){
-         float his_start = minvalue + .5f*del;
-         float his_end = maxvalue - .5f*del;
-         for(float x = his_start; x <= his_end;)
-         {
-            SetCount(x, (GetCount(x) + his->GetCount(x)));
-            x += del;
-         }
-      }
-   }
-   mean = GetMean();
-   standard_dev = GetStandardDev();
-   stats_consistent =0;
-   stats_consistent |= (MEAN_FLAG | SD_FLAG);
-}
-
-void ossimHistogram::create(int xres, float val1, float val2)
-{
-   // clear all the data
-   deleteAll();
-
-   // now set it up and initialize;
-   xres = xres >0? xres:1;
-   
-   vals   = new float [xres];
-   counts = new float [xres];
-   num = xres;
-   vmax = MAX(val1, val2);
-   vmin = MIN(val1, val2);
-
-   delta = (vmax - vmin) / xres;
-   mean = (float)((vmax + vmin)/2.0);
-   standard_dev = (float)((vmax - vmin)/(2.0*sqrt(3.0)));
-   stats_consistent = 0;
-   stats_consistent |= (MEAN_FLAG | SD_FLAG);
-   int i = 0;
-   if (vals == NULL || counts == NULL)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "Histogram : Ran out of memory for arrays.\n";
-      vals = NULL;
-      counts = NULL;
-      num = 0;
-      vmin = 0;
-      vmax = 0;
-      delta = 0.0;
-   }
-   else
-   {
-      for(i = 0; i < xres; i++)
-      {
-         vals[i] = vmin + delta * (float)(i + 0.5);
-         counts[i] = 0.0;
-      }
-   }   
-}
-ossimHistogram* ossimHistogram::fillInteriorEmptyBins(int type)const
-{
-   ossimHistogram* result = new ossimHistogram(*this);
-   if(num < 1) return 0;
-   switch(type)
-   {
-      case HISTOGRAM_FILL_THIN_PLATE:
-      case HISTOGRAM_FILL_DEFAULT:
-      {
-         ossimThinPlateSpline spline(1);
-         double pvars[1];
-         float* new_counts = result->GetCounts();
-         ossim_int32 idxLeft = 0;
-         ossim_int32 idxRight = num-1;
-         while((idxLeft < num) && (new_counts[idxLeft]  == 0.0))++idxLeft;
-         while((idxRight > -1) && (new_counts[idxRight] == 0.0))--idxRight;
-         
-         if(idxLeft < idxRight)
-         {
-            ossim_int32 idx = idxLeft;
-            while(idx <= idxRight)
-            {
-               if(new_counts[idx]!=0.0)
-               {
-                  pvars[0] = new_counts[idx];
-                  spline.addPoint(idx, 0, pvars);
-               }
-               ++idx;
-            }
-            if(spline.solve())
-            {
-               idx = idxLeft;
-               while(idx <= idxRight)
-               {
-                  if(spline.getPoint(idx, 0, pvars))
-                  {
-                     new_counts[idx] = pvars[0];
-                  }
-                  ++idx;
-               }
-            }
-         }
-         
-         break;
-      }
-   }
-   
-   return result;
-}
-//--------------------------------------------------
-// -- Transform the value axis of a histogram by a
-//    translation, transl, and a scale factor, scale.
-//    The new histogram has the same resolution as his.
-
-ossimHistogram* ossimHistogram::Scale(float scale_factor)
-{
-
-// Extract attributes of self
-
-//    float lowvalue = vals[0];
-   float highvalue = vals[num-1];
-
-// Construct a new histogram
-
-   ossimHistogram* scaled_his = new ossimHistogram(this, delta);
-   float* new_counts = scaled_his->GetCounts();
-   int i = 0;
-   for(i=0; i < num; i++)  // Initialize
-      new_counts[i] = 0.0;
-
-// Compute scaled values
-// We assume that the new histogram is to be scaled down from his
-
-   float scale = scale_factor;
-   if(scale_factor > 1.0) scale = 1.0;
-
-   for(float x = highvalue; x > vmin;)
-   {
-      float trans_x = (x-vmin)*scale + vmin; // Scaled x.
-      int index = GetIndex(trans_x);
-      if (index < 0)
-      {
-         if (trans_x<vmin) index = 0;
-         else index = num-1;
-      }
-      float fraction = (trans_x - vals[index])/delta;
-      float abs_fraction = (float)fabs(fraction);
-      int x_index = GetIndex(x);
-      if (x_index < 0)
-      {
-         if (x<vmin) x_index = 0;
-         else x_index = num-1;
-      }
-
-// Distribute the counts in proportion
-
-      new_counts[index] += (1.0f - abs_fraction)*counts[x_index];
-      if(fraction > 0)
-         if(index < (num-1))
-            new_counts[index + 1] +=
-               abs_fraction*counts[x_index];
-         else
-            new_counts[index] +=
-               abs_fraction*counts[x_index];
-      else
-         if(index > 0)
-            new_counts[index - 1] +=
-               abs_fraction*counts[x_index];
-         else
-            new_counts[index] +=
-               abs_fraction*counts[x_index];
-      x -= delta;
-   }
-
-// Compute new Histogram attributes
-
-   mean = scaled_his->GetMean();
-   standard_dev = scaled_his->GetStandardDev();
-   return scaled_his;
-}
-
-//---------------------------------------------------------------------
-// -- Assuming that "this" is a histogram of population density,
-//    construct a new histogram which is the cumulative distribution.
-//    Each bin, xi, in his is assumed to represent a density, i.e.,
-//            {x | (xi - .5*delta) < x <= (xi + .5*delta)}
-//    Each bin, xi, in the result represents a cumulative distribution, i.e.,
-//            {x | x <= (xi + .5*delta)}
-ossimHistogram* ossimHistogram::CumulativeGreaterThanEqual()const
-{
-   ossimHistogram* cum_his = new ossimHistogram(*this);
-   const float* density_counts = this->GetCounts();
-   int res = this->GetRes();
-
-   // Intitialize cumulative counts
-   float* cum_counts = cum_his->GetCounts();
-   int i = 0;
-   for(i=0; i < res; i++)
-      cum_counts[i] = 0;
-  
-   cum_counts[res-1] = density_counts[res-1];
-   for(i = res-2; i>=0; --i)
-   {
-      cum_counts[i] += (density_counts[i] + cum_counts[i+1]);
-   }
-
-   return cum_his;
-}
-
-ossimHistogram* ossimHistogram::CumulativeLessThanEqual()const
-{
-   ossimHistogram* cum_his = new ossimHistogram(*this);
-   const float* density_counts = this->GetCounts();
-   int res = this->GetRes();
-
-   // Intitialize cumulative counts
-   float* cum_counts = cum_his->GetCounts();
-   int i = 0;
-   for(i=0; i < res; i++)
-      cum_counts[i] = 0;
-
-   cum_counts[0] = density_counts[0];
-   for(i = 1; i < res; i++)
-   {
-      cum_counts[i] += (density_counts[i] + cum_counts[i-1]);
-   }
-  
-   return cum_his;
-}
-
-//Provides the correct values for histogram counts when the bin index 
-//extends outside the valid range of the counts array.  This function
-//permits easy array access logic for the NonMaximumSuppression algorithm.
-//The cyclic flag indicates that the counts array index is circular, i.e,
-//cnts[0] equivalent to cnts[n_bins-1]
-inline float GetExtendedCount(int bin, int n_bins, float* cnts, bool cyclic)
-{
-   int nbm = n_bins-1;
-   if(!cyclic)
-   {
-      if(bin < 0)
-         return cnts[0];
-      if(bin >= n_bins)
-         return cnts[nbm];
-   }
-   else
-   {
-      if(bin<0)
-         return cnts[nbm+bin];
-      if(bin >= n_bins)
-         return cnts[bin-n_bins];
-   }
-   return cnts[bin];
-}
-//Prune any sequences of more than one maxium value
-//That is, it is possible to have a "flat" top peak with an arbitarily
-//long sequence of equal, but maximum values. The cyclic flag indictates
-//that the sequence wraps around, i.e. cnts[0] equivalent to cnts[nbins-1]
-inline void RemoveFlatPeaks(int nbins, float* cnts, bool cyclic)
-{
-   int nbm = nbins-1;
-
-   //Here we define a small state machine - parsing for runs of peaks
-   //init is the state corresponding to an initial run (starting at i ==0)
-   bool init=GetExtendedCount(0, nbins, cnts, cyclic);
-   int init_end =0;
-
-   //start is the state corresponding to any other run of peaks
-   bool start=false;  
-   int start_index=0; 
-   int i = 0;
-
-   //The scan of the state machine
-   for(i = 0; i < nbins; i++)
-   {
-      float v = GetExtendedCount(i, nbins, cnts, cyclic);
-
-      //State init: a string of non-zeroes at the begining.
-      if(init&&v!=0)
-         continue;
-
-      if(init&&v==0)
-      {
-         init_end = i;
-         init = false;
-         continue;
-      }
-
-      //State !init&&!start: a string of "0s"
-      if(!start&&v==0)
-         continue;
-
-      //State !init&&start: the first non-zero value
-      if(!start&&v!=0)
-      {
-         start_index = i;
-         start = true;
-         continue;
-      }
-      //State ending flat peak: encountered a subsequent zero after starting
-      if(start&&v==0)
-      {
-         int peak_location = (start_index+i-1)/2;//The middle of the run
-         int k = 0;
-         for(k = start_index; k<=(i-1); k++)
-	    if(k!=peak_location)
-               cnts[k] = 0;
-         start = false;
-      }
-   }
-   //Now handle the boundary conditions
-   //The non-cyclic case
-   if(!cyclic)
-   {
-      if(init_end!=0)  //Was there an initial run of peaks?
-      {
-         int init_location = (init_end-1)/2;
-         int k = 0;
-         for(k = 0; k<init_end; k++)
-	    if(k!=init_location)
-               cnts[k] = 0;
-      }
-      if(start)       // Did we reach the end of the array in a run of pks?
-      {
-         int end_location = (start_index + nbm)/2;
-         int k = 0;
-         for(k = start_index; k<nbins; k++)
-	    if(k!=end_location)
-               cnts[k] = 0;
-      }
-   }
-   else  //The cyclic case
-   {
-      if(init_end!=0)  //Is there a run which crosses the cyclic cut?
-      {
-         if(start)    
-         { //Yes, so define the peak location accordingly
-	    int peak_location = (start_index + init_end - nbm -1)/2;
-	    int k;
-	    if(peak_location < 0) //Is the peak to the left of the cut?
-            {// Yes, to the left
-               peak_location += nbm; 
-               for( k = 0; k< init_end; k++)
-		  cnts[k]=0;
-               for( k= start_index; k <nbins; k++)
-		  if(k!=peak_location)
-                     cnts[k] = 0;
-            }
-	    else   
-            {//No, on the right.
-               for( k = start_index; k< nbins; k++)
-		  cnts[k]=0;
-               for( k= 0; k < init_end; k++)
-		  if(k!=peak_location)
-                     cnts[k] = 0;
-            }
-         }
-         else  
-         {//There wasn't a final run so just clean up the initial run
-	    int init_location = (init_end-1)/2;
-	    int k = 0;
-	    for(k = start_index; k<init_end; k++)
-               if(k!=init_location)
-                  cnts[k] = 0;
-         }
-      }
-   }
-}
-
-//----------------------------------------------------------
-// -- Suppress values in the Histogram which are not locally 
-//    a maxium. The neighborhood for computing the local maximum
-//    is [radius X radius], e.g. for radius =1 the neighborhood
-//    is [-X-], for radius = 2, the neighborhood is [--X--], etc.
-//    If the cyclic flag is true then the index space is assumed to
-//    be equivalent to a circle. That is, elements "0" and (n_buckets-1)
-//    are in correspondence.
-ossimHistogram* ossimHistogram::NonMaximumSupress(int radius, bool cyclic)
-{
-   if((2*radius +1)> num/2)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)<<"ossimHistogram::NonMaximumSupress the radius is too large \n";
-      return NULL;
-   }
-   //Get the counts array of "this"
-   ossimHistogram* h_new = new ossimHistogram(*this);
-   int n_buckets = h_new->GetRes();
-   float* counts_old = this->GetCounts();
-
-   //Make a new Histogram for the suppressed version
-   float* counts_new = h_new->GetCounts();
-   int i;
-   for( i =0; i < n_buckets; i++)
-      counts_new[i] = 0;
-  
-   //Find local maxima
-   for( i = 0; i<  n_buckets; i++)
-   {
-      //find the maxium value in the current kernel
-      float max_count = counts_old[i];
-      int k = 0;
-      for(k = -radius; k <= radius ;k++)
-      {
-         int index = i+k;
-         float c = GetExtendedCount(index, n_buckets, counts_old, cyclic);
-         if( c > max_count)
-	    max_count = c;
-      }
-      //Is position i a local maxium?
-      if(max_count == counts_old[i])
-         counts_new[i] = max_count;//Yes. So set the counts to the max value
-   }
-   RemoveFlatPeaks(n_buckets, counts_new, cyclic);
-   return h_new;
-}
-//----------------------------------------------------------
-// -- Compute the mean of the histogram population
-float ossimHistogram::GetMean()const
-{
-   float xsum = 0.0;
-
-   if(MEAN_FLAG&stats_consistent)
-      return mean;
-   else
-   {
-      if( this->GetBucketSize() > 0.0){
-         for(float x=this->GetMinVal(); x<= this->GetMaxVal(); x +=this->GetBucketSize())
-            xsum += x*GetCount(x);
-      }
-
-      float area = ComputeArea(vmin, vmax);
-      if(area <= 0.0)
-      {
-         //	      fprintf(stderr, "Histogram : Area <= 0.0\n");
-         return 0.0;
-      }
-      else
-      {
-         stats_consistent |=1;
-         mean = xsum/area;
-         return mean;
-      }
-   }
-}
-
-
-
-float ossimHistogram::GetStandardDev()const
-{
-   float sum = 0.0;
-
-   if(SD_FLAG&stats_consistent)
-      return standard_dev;
-   else
-   {
-      float xm = this -> GetMean(); // Force an Update of Mean
-
-      if( this->GetBucketSize() > 0.0){
-         for(float x=this->GetMinVal();
-             x<= this->GetMaxVal();
-             x +=this->GetBucketSize())
-
-            sum += (x-xm)*(x-xm)*GetCount(x);
-      }
-
-      float area = ComputeArea(vmin, vmax);
-      if(area <= 0.0)
-      {
-         //	      fprintf(stderr, "Histogram : Area <= 0.0\n");
-         return 0.0;
-      }
-      else
-      {
-         stats_consistent |= 2;
-         standard_dev = (float)sqrt(sum/area);
-         return standard_dev;
-      }
-   }
-}
-
-int ossimHistogram::GetIndex(float pixelval)const
-{
-   if ((pixelval > vmax) || (pixelval < vmin)||(num==0))
-   {
-      return -1;
-   }
-//   ossim_float32 d = vmax-vmin;
-   int bandIdx = (ossim_int32)((pixelval-vmin)/delta);
-   return bandIdx<GetRes()?bandIdx:-1;
-//    if(bandIdx == num)
-//    {
-//       return num-1;
-//    }
-//    else if(bandIdx < num)
-//    {
-//       return bandIdx;
-//    }
-//    return -1;
-#if 0
-   if ((pixelval > vmax) || (pixelval < vmin))
-      return -1;
-
-   int idx = 0;
-   int i = 0;
-
-   for(i = 0; i < num; i++)
-   {
-      // RWMC: This is very dangerous - might get an intermediate
-      // value which is between vals[i]+0.5*delta and
-      // vals[i+1]-0.5*delta, which would then return index of 0.
-      // Changed to check range one-sided, which is safe because of
-      // previous check on range.
-      //       if ((pixelval > (vals[i] - 0.5 * delta)) &&
-      //           (pixelval <= (vals[i] + 0.5 * delta)))
-      if (pixelval <= (vals[i] + 0.5 * delta))
-      {
-         idx = i;
-         break;
-      }
-   }
-
-   return idx;
-#endif
-}
-
-
-int ossimHistogram::GetValIndex(float pixelval)const
-{
-   if ((pixelval > vmax) || (pixelval < vmin))
-      return -1;
-
-   int idx = 0;
-   int i = 0;
-
-   for(i = 0; i < num; i++)
-   {
-      if ((pixelval > (vals[i] - 0.5 * delta)) &&
-          (pixelval <= (vals[i] + 0.5 * delta)))
-      {
-         idx = i;
-         break;
-      }
-   }
-
-   return idx;
-}
-
-
-
-float ossimHistogram::GetCount(float pixelval)const
-{
-   int index = GetIndex(pixelval);
-
-   if (index < 0)
-      return -1;
-   else
-      return counts[index];
-}
-
-
-
-float ossimHistogram::GetMinVal()const
-{
-   register int i=0;
-
-   while (i<num-1 && !counts[i])
-      i++;
-
-   return vals[i];
-}
-
-
-
-
-float ossimHistogram::GetMaxVal()const
-{
-   register int i=num-1;
-
-   while (i>0 && !counts[i])
-      i--;
-
-   if (i < 0)
-      return 0.0;
-
-   return vals[i];
-}
-
-
-float ossimHistogram::GetMaxCount()const
-{
-   register int i=0;
-   float max;
-   max = 0.0;
-   for (i=0; i < num; i++)
-      if (counts[i] > max)
-         max = counts[i];
-   return max;
-}
-
-
-
-
-float ossimHistogram::SetCount(float pixelval, float count)
-{
-   stats_consistent = 0;
-
-   int index = GetIndex(pixelval);
-
-   if (index < 0)
-      return -1;
-   else
-   {
-      counts[index] = count;
-      return count;
-   }
-}
-
-
-void ossimHistogram::UpCount(float pixelval)
-{
-
-   stats_consistent = 0;
-   int idx = GetIndex(pixelval);
-   if (idx >= 0)  // Originally (index > 0)
-   {
-      counts[idx] += 1.0;
-   }
-}
-
-float ossimHistogram::ComputeArea(float low, float high)const
-{
-   float maxval = GetMaxVal();
-   float minval = GetMinVal();
-
-   if (low < minval) low = minval;
-   if (high > maxval) high = maxval;
-
-   if (low <= high)
-   {
-      int indexlow, indexhigh;
-      indexlow = (int) GetIndex(low);
-      if (indexlow < 0)
-      {
-         if (low<vmin) indexlow = 0;
-         else indexlow = num-1;
-      }
-      indexhigh = (int) GetIndex(high);
-      if (indexhigh < 0)
-      {
-         if (high<vmin) indexhigh = 0;
-         else indexhigh = num-1;
-      }
-      register int i=indexlow;
-      float sum = 0.0;
-
-      while (i<=indexhigh)
-      {
-         sum+= counts[i];
-         i++;
-      }
-      return sum;
-   }
-   else
-   {
-      //      fprintf(stderr, "Histogram : Range for ComputeArea is out of bounds.\n");
-      return 0.0;
-   }
-}
-//----------------------------------------------------------------------
-// --Compute the total area under the histogram
-//
-float ossimHistogram::ComputeArea()const
-{
-   float vmin = this->GetMinVal();
-   float vmax = this->GetMaxVal();
-   if(vmin>vmax)
-   {
-      float temp = vmin;
-      vmin = vmax;
-      vmax = temp;
-   }
-   return this->ComputeArea(vmin, vmax);
-}
-
-float ossimHistogram::getLowFractionFromValue(float val) const
-{
-   
-   float min = floor(GetMinVal());
-   float max = ceil(GetMaxVal());
-   if (val < min || val > max)
-   {
-      return ossim::nan();
-   }
-
-   int total_buckets = GetRes();
-   int cutoff_bucket = GetValIndex(val);
-   float partial_sum = 0.0;
-   float total_sum   = 0.0;
-   
-   for(int i = 0; i < total_buckets; ++i)
-   {
-      total_sum += counts[i];
-      if (i <= cutoff_bucket)
-      {
-         partial_sum += counts[i];
-      }
-   }
-
-   return (partial_sum/total_sum);
-}
-
-float ossimHistogram::getHighFractionFromValue(float val) const
-{
-   float min = floor(GetMinVal());
-   float max = ceil(GetMaxVal());
-   if (val < min || val > max)
-   {
-      return ossim::nan();
-   }
-
-   int total_buckets = GetRes();
-   int cutoff_bucket = GetValIndex(val);
-   float partial_sum = 0.0;
-   float total_sum   = 0.0;
-   
-   for(int i = (total_buckets-1); i >= 0; --i)
-   {
-      total_sum += counts[i];
-      if (i >= cutoff_bucket)
-      {
-         partial_sum += counts[i];
-      }
-   }
-
-   return (partial_sum/total_sum);
-}
-
-//----------------------------------------------------------------------
-//  -- Finds the lower bound value which elminates a given fraction of
-//     histogram area.
-//
-float ossimHistogram::LowClipVal(float clip_fraction)const
-{
-   if(clip_fraction<0) clip_fraction=0.0;
-   if(clip_fraction>1.0) clip_fraction=1.0;
-   float area = this->ComputeArea();
-   if(area==0.0) return this->GetMinVal();
-   if(clip_fraction==0.0) return this->GetMinVal();
-   if(clip_fraction==1.0) return this->GetMaxVal();
-   float clip_area = area*clip_fraction;
-   const float* COUNTS = this->GetCounts();
-   const float* VALS = this->GetVals();
-   int res = this->GetRes();
-   float sum = 0;
-   int i=0;
-   for(; i<res; i++)
-   {
-      sum+=COUNTS[i];
-      if(sum>=clip_area)
-         break;
-   }
-   return VALS[i];
-}
-
-//----------------------------------------------------------------------
-//  -- Finds the lower bound value which elminates a given fraction of
-//     histogram area.
-//
-float ossimHistogram::HighClipVal(float clip_fraction)const
-{
-   if(clip_fraction<0) clip_fraction=0.0;
-   if(clip_fraction>1.0) clip_fraction=1.0;
-   float area = this->ComputeArea();
-   if(area==0.0) return this->GetMaxVal();
-   if(clip_fraction==0.0) return this->GetMaxVal();
-   if(clip_fraction==1.0) return this->GetMinVal();
-   float clip_area = area*clip_fraction;
-   const float* COUNTS = this->GetCounts();
-   const float* VALS = this->GetVals();
-   int res = this->GetRes();
-   float sum = 0;
-   int i = (res-1);
-   for(; i>=0; i--)
-   {
-      sum+=COUNTS[i];
-      if(sum>=clip_area)
-         break;
-   }
-   return VALS[i];
-}
-
-//--------------------------------------------------------------------------
-// -- Prints histogram counts onto cout
-void ossimHistogram::Print()const
-{
-   ostream& out = ossimNotify(ossimNotifyLevel_INFO);
-   const float* VALS = this->GetVals();
-   const float* COUNTS = this->GetCounts();
-   int res = this->GetRes();
-   int width = 0;
-   int i = 0;
-   for(i =0; i < res; i++)
-   {
-      if(width++ > 5)
-      {
-         width = 0;
-         out << "\n";
-      }
-      out << VALS[i] << " "
-          << COUNTS[i] << " | " ;
-   }
-   out << "\n MaxVal " << this->GetMaxVal() << "\n";
-   out << " MinVal " << this->GetMinVal() << "\n";
-   out << " BucketSize " << this->GetBucketSize() << "\n";
-   out << " Resolution " << this->GetRes() << "\n";
-   out << " Area "
-       << this->ComputeArea(this->GetMinVal(),this->GetMaxVal()) << "\n";
-   out << "------------------------------------------------\n\n";
-}
-
-//---------------------------------------------------------------------------
-// --- dumps histogram  values  to file.
-
-void ossimHistogram::Dump(char *dumpfile)const
-{
-   FILE *dumpfp = fopen(dumpfile, "w");
-
-   if (!dumpfp)
-   {
-      fprintf(stderr, "Error opening histogram data file.\n");
-      return;
-   }
-   int i = 0;
-
-   for(i = 0; i < num; i++)
-      fprintf(dumpfp, "%f %f\n", vals[i], counts[i]);
-  
-   fclose(dumpfp);
-   return;
-}
-
-//---------------------------------------------------------------------------
-// -- Writes histogram in format suitable for plotting tools like Gnuplot.
-
-int ossimHistogram::WritePlot(const char *fname)const
-{
-   FILE *fp = fopen(fname, "w");
-
-   if (!fp)
-   {
-      fprintf(stderr, "Error opening histogram plot file.\n");
-      return 0;
-   }
-
-   int stat_res = this->GetRes();
-
-   float * x = new float[2*stat_res];
-   float * y = new float[2*stat_res];
-
-   const float * temp_x = this->GetVals();
-   const float * temp_y = this->GetCounts();
-   float     delt = this->GetBucketSize();
-
-   for (register int i=0; i < stat_res ;i++)
-   {
-      x[2*i] = temp_x[i] - 0.5f * delt;
-      x[2*i+1] = temp_x[i] + 0.5f * delt;
-      y[2*i] = temp_y[i];
-      y[2*i+1] = temp_y[i];
-   }
-
-
-   for(register int j = 0; j < 2*stat_res; j++)
-      fprintf(fp, "%f %f\n", x[j], y[j]);
-
-   delete [] x;
-   delete [] y;
-
-   fclose(fp);
-   return 1;
-}
-
-void ossimHistogram::deleteAll()
-{
-   if (vals)
-   {
-      delete []vals;
-      vals = NULL;
-   }
-   if (counts)
-   {
-      delete []counts;
-      counts = NULL;
-   }  
-}
-
-ossimHistogram::~ossimHistogram()
-{
-   deleteAll();
-}
-
-
-bool ossimHistogram::importHistogram(istream& in)
-{
-   ossimProprietaryHeaderInformation header;
-   bool binsCreated = false;
-   
-   if(header.parseStream(in))
-   {
-      long numberOfBins = header.getNumberOfBins();
-      
-      if(numberOfBins)
-      {
-         create(numberOfBins, 0, numberOfBins - 1);
-         binsCreated = true;
-
-         if(binsCreated)
-         {
-            ossimString buffer;
-            ossimString binNumber;
-            ossimString count;
-
-            while(in.good() &&
-                  !in.eof() &&
-                  *binNumber.c_str() != '.')
-            {
-               
-               getline(in, buffer);
-
-               istringstream s(buffer);
-
-               s >> binNumber >> count;
-               if(*binNumber.c_str() != (char)'.')
-               {
-                  SetCount((float)binNumber.toDouble(),
-                           (float)count.toDouble());
-               }
-            }
-         }
-      }
-      else
-      {
-         return false;
-      }
-   }  
-   return true;
-}
-
-bool ossimHistogram::importHistogram(const ossimFilename& inputFile)
-{
-   if(inputFile.exists())
-   {
-      ifstream input(inputFile.c_str());
-
-      return importHistogram(input);
-   }
-
-   return false;  
-}
-
-
-bool ossimHistogram::ossimProprietaryHeaderInformation::parseStream(istream& in)
-{
-   ossimString inputLine;
-   
-   getline(in, inputLine);  
-   if(inputLine.find("File Type") != string::npos)
-   {
-      std::string::size_type index = inputLine.find(":");
-      if(index != std::string::npos)
-      {
-         theFileType = inputLine.substr(index+1);
-         theFileType = theFileType.trim();
-      }
-      else
-      {
-         return false;
-      }
-
-   }
-   else
-   {
-      return false;
-   }
-
-   getline(in, inputLine);  
-   if(inputLine.find("Version") != string::npos)
-   {
-      std::string::size_type index = inputLine.find(":");
-      if(index != std::string::npos)
-      {
-         theVersion = inputLine.substr(index+1);
-         theVersion = theVersion.trim();
-      }
-      else
-      {
-         return false;
-      }
-   }
-   else
-   {
-      return false;
-   }
-
-   getline(in, inputLine);  
-   if(inputLine.find("Mapper Type") != string::npos)
-   {
-      std::string::size_type index = inputLine.find(":");
-      if(index != std::string::npos)
-      {
-         theMapperType = inputLine.substr(index+1);
-         theMapperType = theMapperType.trim();
-      }
-      else
-      {
-         return false;
-      }
-   }
-   else
-   {
-      return false;
-   }
-
-   getline(in, inputLine);  
-   if(inputLine.find("Number of Bins") != string::npos)
-   {
-      std::string::size_type index = inputLine.find(":");
-      if(index != std::string::npos)
-      {
-         theNumberOfBins = inputLine.substr(index+1);
-         theNumberOfBins = theNumberOfBins.trim();
-      }
-      else
-      {
-         return false;
-      }
-   }
-   else
-   {
-      return false;
-   }
-   
-   return true;   
-}
-
-bool ossimHistogram::saveState(ossimKeywordlist& kwl,
-                               const char* prefix)const
-{
-   kwl.add(prefix,
-           "type",
-           "ossimHistogram",
-           true);
-   kwl.add(prefix,
-           "number_of_bins",
-           num,
-           true);
-   kwl.add(prefix,
-           "min_value",
-           vmin,
-           true);
-   kwl.add(prefix,
-           "max_value",
-           vmax,
-           true);
-   
-
-
-   ossimString binArrayList = "(";
-   bool firstValue = true;
-
-   for(ossim_int32 index = 0; index < num; ++index)
-   {
-      if(fabs(counts[index]) > FLT_EPSILON)
-      {
-
-         if(!firstValue)
-         {
-            binArrayList += ",";
-         }
-         else
-         {
-            firstValue = false;
-         }
-         binArrayList += "("+ossimString::toString(index)+","+ossimString::toString(counts[index])+")";
-     }
-   }
-
-   binArrayList += ")";
-
-   kwl.add(prefix, "bins", binArrayList, true);
-#if 0
-   ossimString binValue = "";
-   for(ossim_int32 index = 0; index < num; ++index)
-   {
-      if(fabs(counts[index]) > FLT_EPSILON)
-      {
-         //     binValue = prefix;
-         binValue = "bin";
-         binValue += ossimString::toString(index);
-         
-         kwl.add(prefix,
-                 binValue.c_str(),
-                 counts[index],
-                 true);
-      }
-   }
-#endif   
-   return true;
-}
-
-bool ossimHistogram::loadState(const ossimKeywordlist& kwl,
-                               const char* prefix)
-{
-   const char* number_of_bins = kwl.find(prefix, "number_of_bins");
-
-   if(number_of_bins)
-   {
-      ossim_uint32 bins = ossimString(number_of_bins).toUInt32();
-
-      if(bins > 0)
-      {
-         // setup some defaults
-         float minValue = 0;
-         float maxValue = bins - 1;
-
-         // see if there is a range set for the data
-         const char* min_value = kwl.find(prefix, "min_value");
-         const char* max_value = kwl.find(prefix, "max_value");
-
-         if(min_value)
-         {
-            minValue = (ossim_float32)ossimString(min_value).toDouble();
-         }
-         if(max_value)
-         {
-            maxValue = (ossim_float32)ossimString(max_value).toDouble();
-         }
-
-         create((int)bins, minValue, maxValue);
-         float* countsPtr = GetCounts();
-         memset(countsPtr, '\0', bins*sizeof(float));
-         // this is new style histogram creation
-         //
-         ossimString binsString = kwl.find(prefix, "bins");
-         if(!binsString.empty())
-         {
-            std::vector<ossimDpt> result;
-            ossim::toVector(result, binsString);
-            if(!result.empty())
-            {
-               ossim_uint32 idx = 0;
-               for(idx = 0; idx < result.size();++idx)
-               {
-                  ossim_uint32 binIdx = static_cast<ossim_uint32>(result[idx].x);
-                  if(binIdx < bins)
-                  {
-                     countsPtr[binIdx] = result[idx].y;
-                  }
-               }
-            }
-         }
-         else
-         {
-            ossimKeywordlist binsKwl;
-            ossim_uint32 offset = (ossim_uint32)(ossimString(prefix)+"bin").size();
-            ossimString regExpression =  ossimString("^(") + ossimString(prefix) + "bin[0-9]+)";
-            kwl.extractKeysThatMatch(binsKwl,regExpression);
-            const ossimKeywordlist::KeywordMap& kwlMap = binsKwl.getMap();
-            ossimKeywordlist::KeywordMap::const_iterator iter = kwlMap.begin();
-            while(iter != kwlMap.end())
-            {
-               ossimString numberStr(iter->first.begin() + offset,
-                                     iter->first.end());
-               countsPtr[numberStr.toUInt32()] = ossimString(iter->second).toDouble();
-               ++iter;
-            }
-         }
-         
-         return true;
-#if 0
-         // create the bins
-         ossimString binNumber = "";
-         ossimString regExpression =  ossimString("^(") + ossimString(prefix) + "bin[0-9]+)";
-         vector<ossimString> keys = kwl.getSubstringKeyList( regExpression );
-         ossim_uint32 numberOfBins = (ossim_uint32)keys.size();
-         ossim_uint32 offset = (ossim_uint32)(ossimString(prefix)+"bin").size();
-
-         std::vector<ossim_uint32> theNumberList(numberOfBins);
-         ossim_uint32 idx = 0;
-         for(idx = 0; idx < theNumberList.size();++idx)
-         {
-            ossimString numberStr(keys[idx].begin() + offset,
-                                  keys[idx].end());
-            theNumberList[idx] = numberStr.toUInt32();
-
-         }
-         
-         float* countsPtr = GetCounts();
-         memset(countsPtr, '\0', bins*sizeof(float));
-         for(idx = 0; idx < numberOfBins;++idx)
-         {
-            const char* binCount = kwl.find(prefix, ossimString("bin") + ossimString::toString(theNumberList[idx]));
-            countsPtr[theNumberList[idx]] = (float)ossimString(binCount).toDouble();
-         }
-#endif
-      }
-   }
-   return true;
-}
-
-bool ossimHistogram::loadState(const ossimRefPtr<ossimXmlNode> xmlNode)
-{
-   ossimRefPtr<ossimXmlNode> binValues =  xmlNode->findFirstNode("binValues");
-   ossimRefPtr<ossimXmlNode> minValueNode  =  xmlNode->findFirstNode("minValue");
-   ossimRefPtr<ossimXmlNode> maxValueNode  =  xmlNode->findFirstNode("maxValue");
-
-   if(binValues.valid())
-   {
-      ossim_uint32 count = 0;
-      float minValue = 0.0;
-      float maxValue = 0.0;
-      std::vector<float> floatValues;
-      std::istringstream in(binValues->getText());
-      ossimString vString;
-      while(!in.fail())
-      {
-         in>>vString;
-         if(!in.fail())
-         {
-            floatValues.push_back(vString.toFloat32());
-         }
-      }
-      count = (ossim_uint32)floatValues.size();
-     
-      if(count)
-      {
-         minValue = 0;
-         maxValue = count - 1;
-
-         if(minValueNode.valid())
-         {
-            minValue = minValueNode->getText().toFloat32();
-         }
-         if(maxValueNode.valid())
-         {
-            maxValue = maxValueNode->getText().toFloat32();
-         }
-
-         create(count, minValue, maxValue);
-         float* countsPtr = GetCounts();
-         ossim_uint32 idx = 0;
-         for(idx = 0; idx < count; ++idx)
-         {
-            countsPtr[idx] = floatValues[idx];
-         }
-         return true;
-      }
-   }
-
-   return false;
-}
-
-bool ossimHistogram::saveState(ossimRefPtr<ossimXmlNode> xmlNode)const
-{
-   ossimRefPtr<ossimXmlNode> binValues = new ossimXmlNode;
-   xmlNode->setTag("ossimHistogram");
-   xmlNode->addChildNode("minValue", ossimString::toString(vmin));
-   xmlNode->addChildNode("maxValue", ossimString::toString(vmax));
-   xmlNode->addChildNode("standardDeviation", ossimString::toString(standard_dev));
-   xmlNode->addChildNode("mean", ossimString::toString(mean));
-   binValues->setTag("binValues");
-   std::ostringstream out;
-
-   ossim_int32 idx = 0;
-   if(num > 0)
-   {
-      for(idx = 0; idx < num;++idx)
-      {
-         out << ossimString::toString(counts[idx], 8) << " ";
-      }
-      binValues->setText(out.str());
-   }
-   xmlNode->addChildNode(binValues.get());
-   
-   return true;
-}
diff --git a/src/ossim/base/ossimHistogramSource.cpp b/src/ossim/base/ossimHistogramSource.cpp
deleted file mode 100644
index d41879e..0000000
--- a/src/ossim/base/ossimHistogramSource.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimHistogramSource.cpp 11721 2007-09-13 13:19:34Z gpotts $
-
-#include <ossim/base/ossimHistogramSource.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimMultiResLevelHistogram.h>
-
-RTTI_DEF1(ossimHistogramSource, "ossimHistogramSource", ossimSource);
-
-
-ossimHistogramSource::ossimHistogramSource(ossimObject* owner,
-                                           ossim_uint32 numberOfInputs,
-                                           ossim_uint32 numberOfOutputs,
-                                           bool inputListFixedFlag,
-                                           bool outputListFixedFlag)
-   : ossimSource(owner,
-                 numberOfInputs,
-                 numberOfOutputs,
-                 inputListFixedFlag,
-                 outputListFixedFlag),
-     theHistogram(0),
-     theFilename()
-{
-}
-
-ossimHistogramSource::~ossimHistogramSource()
-{
-}
-
-ossimRefPtr<ossimMultiResLevelHistogram> ossimHistogramSource::getHistogram()
-{
-   return theHistogram;
-}
-
-bool ossimHistogramSource::loadState(const ossimKeywordlist& kwl,
-				     const char* prefix)
-{   
-   theHistogram = 0;
-   const char* externalFile = kwl.find(prefix,
-                                       ossimKeywordNames::FILENAME_KW);
-
-   theHistogram = new ossimMultiResLevelHistogram;
-   if(externalFile)
-   {
-      if(!theHistogram->importHistogram(ossimFilename(externalFile)))
-      {
-         theHistogram = 0;
-         theFilename = "";
-      }
-      theFilename = externalFile;
-   }
-   else
-   {
-      ossimString newPrefix = ossimString(prefix) + "histogram.";
-      if(!theHistogram->loadState(kwl, newPrefix))
-      {
-         theHistogram = 0;
-      }
-   }
-   
-   return ossimSource::loadState(kwl, prefix);
-}
-
-bool ossimHistogramSource::saveState(ossimKeywordlist& kwl,
-				     const char* prefix)const
-{
-   if(theHistogram.valid())
-   {
-      if(!theFilename.empty())      {
-         ossimKeywordlist kwl2;
-         
-         if(theHistogram->saveState(kwl2))
-         {
-            kwl2.write(theFilename.c_str());
-            kwl.add(prefix,
-                    ossimKeywordNames::FILENAME_KW,
-                    theFilename.c_str(),
-                    true);
-         }
-      }
-      else
-      {
-         ossimString newPrefix = ossimString(prefix) + "histogram.";
-         theHistogram->saveState(kwl, newPrefix);
-      }
-   }
-   
-   return ossimSource::saveState(kwl, prefix);
-}
-
-// Hidden from use.
-ossimHistogramSource::ossimHistogramSource(const ossimHistogramSource&)
-   :
-   theHistogram(0),
-   theFilename()
-{
-}
diff --git a/src/ossim/base/ossimIoStream.cpp b/src/ossim/base/ossimIoStream.cpp
deleted file mode 100644
index fea9056..0000000
--- a/src/ossim/base/ossimIoStream.cpp
+++ /dev/null
@@ -1,396 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-// Description:
-// 
-// Class definitiaons for:
-// 
-// ossimIStream
-// ossimOStream
-// ossimIOStream
-// ossimIOMemoryStream
-// ossimIMemoryStream
-// ossimOMemoryStream
-// ossimIOFStream
-// ossimIFStream
-// ossimOFStream
-//
-//*******************************************************************
-//  $Id: ossimIoStream.cpp 11206 2007-06-13 13:11:35Z gpotts $
-#include <ossim/base/ossimIoStream.h>
-
-ossimIStream::ossimIStream()
-   : ossimStreamBase(),
-#ifdef _MSC_VER
-   std::istream((std::_Uninitialized)0)
-#else
-   std::istream()
-#endif
-{}
-
-ossimIStream::ossimIStream(std::streambuf* sb)
-   : ossimStreamBase(),
-     std::istream(sb)
-{}
-
-ossimIStream::~ossimIStream()
-{}
-
-ossimOStream::ossimOStream()
-   : ossimStreamBase(),
-#ifdef _MSC_VER
-   std::ostream((std::_Uninitialized)0)
-#else
-   std::ostream()
-#endif
-{}
-
-ossimOStream::ossimOStream(std::streambuf* sb)
-   : ossimStreamBase(),
-     std::ostream(sb)
-{}
-
-ossimOStream::~ossimOStream()
-{}
-
-ossimIOStream::ossimIOStream()
-   : ossimStreamBase(),
-#ifdef _MSC_VER
-   std::iostream((std::_Uninitialized)0)
-#else
-   std::iostream()
-#endif
-{}
-
-ossimIOStream::~ossimIOStream()
-{}
-
-ossimIOMemoryStream::ossimIOMemoryStream()
-   : ossimIOStream(),
-     theBuf(std::ios::in|std::ios::out)
-{
-   ossimIOStream::init(&theBuf);
-}
-
-ossimIOMemoryStream::~ossimIOMemoryStream()
-{
-}
-
-bool ossimIOMemoryStream::is_open()const
-{
-   return true;
-}
-
-void ossimIOMemoryStream::open(const char* /* protocolString */,
-                               int /* openMode */)
-{
-}
-
-ossimString ossimIOMemoryStream::str()
-{
-   return theBuf.str();
-}
-
-void ossimIOMemoryStream::close()
-{}
-
-ossim_uint64 ossimIOMemoryStream::size()const
-{
-   ossimIOMemoryStream*  thisPtr = const_cast<ossimIOMemoryStream*>(this);
-   std::streampos pos = thisPtr->tellg();
-   thisPtr->seekg(0, std::ios::end);
-   std::streampos endPos = thisPtr->tellg();
-   thisPtr->seekg(pos, std::ios::beg);
-   
-   return (ossim_uint64)(endPos);
-}
-
-ossimIMemoryStream::ossimIMemoryStream(const ossimString& inputBuf)
-   
-   : ossimIStream(),
-     theBuf(inputBuf.c_str(), std::ios::in)
-{
-   ossimIStream::init(&theBuf);
-}
-
-ossimIMemoryStream::~ossimIMemoryStream()
-{
-}
-
-bool ossimIMemoryStream::is_open()const
-{
-   return true;
-}
-
-ossim_uint64 ossimIMemoryStream::size()const
-{
-   ossimIMemoryStream*  thisPtr = const_cast<ossimIMemoryStream*>(this);
-   std::streampos pos = thisPtr->tellg();
-   thisPtr->seekg(0, std::ios::end);
-   std::streampos endPos = thisPtr->tellg();
-   thisPtr->seekg(pos, std::ios::beg);
-   return (ossim_uint64)(endPos);
-}
-
-void ossimIMemoryStream::open(const char* /* protocolString */,
-                              int /* openMode */ )
-{
-}
-
-void ossimIMemoryStream::close()
-{}
-
-ossimString ossimIMemoryStream::str()
-{
-   return theBuf.str();
-}
-
-ossimOMemoryStream::ossimOMemoryStream()
-   : ossimOStream(),
-     theBuf(std::ios::out)
-{
-   ossimOStream::init(&theBuf);
-}
-
-ossimOMemoryStream::~ossimOMemoryStream()
-{
-}
-
-bool ossimOMemoryStream::is_open()const
-{
-   return true;
-}
-
-ossim_uint64 ossimOMemoryStream::size()const
-{
-   ossimOMemoryStream*  thisPtr = const_cast<ossimOMemoryStream*>(this);
-   std::streampos pos = thisPtr->tellp();
-   thisPtr->seekp(0, std::ios::end);
-   std::streampos endPos = thisPtr->tellp();
-   thisPtr->seekp(pos, std::ios::beg);
-   return (ossim_uint64)(endPos);
-}
-
-void ossimOMemoryStream::open(const char* /* protocolString */,
-                              int /* openMode */ )
-{
-}
-
-void ossimOMemoryStream::close()
-{}
-
-ossimString ossimOMemoryStream::str()
-{
-   return theBuf.str();
-}
-
-ossimIOFStream::ossimIOFStream()
-   : ossimStreamBase(),
-     std::fstream()
-{
-}
-
-ossimIOFStream::ossimIOFStream(const char* name,
-                               std::ios_base::openmode mode)
-   : ossimStreamBase(),
-     std::fstream(name, mode)
-{
-}
-
-ossimIOFStream::~ossimIOFStream()
-{
-}
-
-ossimIFStream::ossimIFStream()
-   : ossimStreamBase(),
-     std::ifstream()
-{
-}
-ossimIFStream::ossimIFStream(const char* file, std::ios_base::openmode mode)
-   : ossimStreamBase(),
-     std::ifstream(file, mode)
-{
-}
-
-ossimIFStream::~ossimIFStream()
-{
-}
-
-ossimOFStream::ossimOFStream()
-   : ossimStreamBase(),
-     std::ofstream()
-{
-}
-
-ossimOFStream::ossimOFStream(const char* name, std::ios_base::openmode mode)
-   : ossimStreamBase(),
-     std::ofstream(name, mode)
-{
-}
-
-ossimOFStream::~ossimOFStream()
-{
-}
-
-void operator >> (ossimIStream& in,ossimOStream& out)
-{
-   char buf[1024];
-   bool done = false;
-
-   while(!done&&!in.fail())
-   {
-      in.read(buf, 1024);
-      if(in.gcount() < 1024)
-      {
-         done = true;
-      }
-      if(in.gcount() > 0)
-      {
-         out.write(buf, in.gcount());
-      }
-   }
-}
-
-ossimIOStream& operator >> (ossimIStream& in,ossimIOStream& out)
-{
-   char buf[1024];
-   bool done = false;
-
-   while(!done&&!in.fail())
-   {
-      in.read(buf, 1024);
-      if(in.gcount() < 1024)
-      {
-         done = true;
-      }
-      if(in.gcount() > 0)
-      {
-         out.write(buf, in.gcount());
-      }
-   }
-   
-   return out;
-}
-
-void operator >> (ossimIOStream& in,ossimOStream& out)
-{
-   char buf[1024];
-   bool done = false;
-
-   while(!done&&!in.fail())
-   {
-      in.read(buf, 1024);
-      if(in.gcount() < 1024)
-      {
-         done = true;
-      }
-      if(in.gcount() > 0)
-      {
-         out.write(buf, in.gcount());
-      }
-   }
-}
-
-ossimIOStream& operator >> (ossimIOStream& in,ossimIOStream& out)
-{
-   char buf[1024];
-   bool done = false;
-
-   while(!done&&!in.fail())
-   {
-      in.read(buf, 1024);
-      if(in.gcount() < 1024)
-      {
-         done = true;
-      }
-      if(in.gcount() > 0)
-      {
-         out.write(buf, in.gcount());
-      }
-   }
-
-   return out;
-}
-
-void operator << (ossimOStream& out, ossimIStream& in)
-{
-   char buf[1024];
-   bool done = false;
-
-   while(!done&&!in.fail())
-   {
-      in.read(buf, 1024);
-      if(in.gcount() < 1024)
-      {
-         done = true;
-      }
-      if(in.gcount() > 0)
-      {
-         out.write(buf, in.gcount());
-      }
-   }
-}
-
-void operator << (ossimOStream& out, ossimIOStream& in)
-{
-   char buf[1024];
-   bool done = false;
-
-   while(!done&&!in.fail())
-   {
-      in.read(buf, 1024);
-      if(in.gcount() < 1024)
-      {
-         done = true;
-      }
-      if(in.gcount() > 0)
-      {
-         out.write(buf, in.gcount());
-      }
-   }
-}
-
-ossimIOStream& operator << (ossimIOStream& out, ossimIStream& in)
-{
-   char buf[1024];
-   bool done = false;
-
-   while(!done&&!in.fail())
-   {
-      in.read(buf, 1024);
-      if(in.gcount() < 1024)
-      {
-         done = true;
-      }
-      if(in.gcount() > 0)
-      {
-         out.write(buf, in.gcount());
-      }
-   }
-
-   return out;
-}
-
-ossimIOStream& operator << (ossimIOStream& out, ossimIOStream& in)
-{
-   char buf[1024];
-   bool done = false;
-
-   while(!done&&!in.fail())
-   {
-      in.read(buf, 1024);
-      if(in.gcount() < 1024)
-      {
-         done = true;
-      }
-      if(in.gcount() > 0)
-      {
-         out.write(buf, in.gcount());
-      }
-   }
-
-   return out;
-}
diff --git a/src/ossim/base/ossimKeywordNames.cpp b/src/ossim/base/ossimKeywordNames.cpp
deleted file mode 100644
index e8459db..0000000
--- a/src/ossim/base/ossimKeywordNames.cpp
+++ /dev/null
@@ -1,198 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  See top level LICENSE.txt file
-//
-// Author: Ken Melero (kmelero at remotesensing.org)
-// 
-// Description: Common file for global Keywords.
-//
-//*************************************************************************
-// $Id: ossimKeywordNames.cpp 19180 2011-03-22 17:36:33Z oscarkramer $
-
-#include <ossim/base/ossimKeywordNames.h>
-
-const char* ossimKeywordNames::AZIMUTH_ANGLE_KW = "azimuth_angle";
-const char* ossimKeywordNames::BAND_KW = "band";
-const char* ossimKeywordNames::BANDS_KW = "bands";
-const char* ossimKeywordNames::BORDER_SIZE_KW = "border_size";
-const char* ossimKeywordNames::BRUSH_COLOR_KW = "brush_color";
-const char* ossimKeywordNames::BYTE_ORDER_KW = "byte_order";
-const char* ossimKeywordNames::CE90_ABSOLUTE_KW = "ce90_absolute";
-const char* ossimKeywordNames::CE90_RELATIVE_KW = "ce90_relative";
-const char* ossimKeywordNames::CENTRAL_MERIDIAN_KW = "central_meridian";
-const char* ossimKeywordNames::CENTRAL_POINT1_LAT_KW = "central_point1_lat";
-const char* ossimKeywordNames::CENTRAL_POINT1_LON_KW = "central_point1_lon";
-const char* ossimKeywordNames::CENTRAL_POINT2_LAT_KW = "central_point2_lat";
-const char* ossimKeywordNames::CENTRAL_POINT2_LON_KW = "central_point2_lon";
-const char* ossimKeywordNames::CENTER_PIXEL_X_KW = "center_pixel_x";
-const char* ossimKeywordNames::CENTER_PIXEL_Y_KW = "center_pixel_y";
-const char* ossimKeywordNames::COMPRESS_KW = "compress";
-const char* ossimKeywordNames::COMPRESSION_QUALITY_KW = "compression_quality";
-const char* ossimKeywordNames::COMPRESSION_TYPE_KW = "compression_type";
-const char* ossimKeywordNames::CONVERGENCE_THRESHOLD_KW = "convergence_threshold";
-const char* ossimKeywordNames::CREATE_EXTERNAL_GEOMETRY_KW = "create_external_geometry";
-const char* ossimKeywordNames::CREATE_IMAGE_KW = "create_image";
-const char* ossimKeywordNames::CREATE_HISTOGRAM_KW = "create_histogram";
-const char* ossimKeywordNames::CREATE_OVERVIEW_KW = "create_overview";
-const char* ossimKeywordNames::DATA_FILE_KW = "data_file";
-const char* ossimKeywordNames::DATE_KW = "date";
-const char* ossimKeywordNames::DATE_YEAR_KW = "year";
-const char* ossimKeywordNames::DATE_MONTH_KW = "month";
-const char* ossimKeywordNames::DATE_DAY_KW = "day";
-const char* ossimKeywordNames::DATE_HOUR_KW = "hour";
-const char* ossimKeywordNames::DATE_MIN_KW = "min";
-const char* ossimKeywordNames::DATE_SEC_KW = "sec";
-const char* ossimKeywordNames::DATE_FRACT_SEC_KW = "fract_sec";
-const char* ossimKeywordNames::DATUM_KW = "datum";
-const char* ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT = "decimal_degrees_per_pixel_lat";
-const char* ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON = "decimal_degrees_per_pixel_lon";
-const char* ossimKeywordNames::DESCRIPTION_KW = "description";
-const char* ossimKeywordNames::ELEVATION_ANGLE_KW = "elevation_angle";
-const char* ossimKeywordNames::ELEVATION_CELL_KW = "elevation_cell";
-const char* ossimKeywordNames::ELEVATION_SOURCE_KW = "elevation_source";
-const char* ossimKeywordNames::ELEVATION_LOOKUP_FLAG_KW = "elevation_lookup_flag";
-const char* ossimKeywordNames::ELLIPSE_CODE_KW = "ellipse_code";
-const char* ossimKeywordNames::ELLIPSE_EPSG_CODE_KW = "ellipse_epsg_code";
-const char* ossimKeywordNames::ELLIPSE_NAME_KW = "ellipse_name";
-const char* ossimKeywordNames::ENABLED_KW = "enabled";
-const char* ossimKeywordNames::ENABLE_CACHE_KW = "enable_cache";
-const char* ossimKeywordNames::EXTRACT_VERTICES_KW = "extract_vertices";  
-const char* ossimKeywordNames::ENTRY_KW = "entry";
-const char* ossimKeywordNames::FALSE_EASTING_NORTHING_KW = "false_easting_northing";
-const char* ossimKeywordNames::FALSE_EASTING_NORTHING_UNITS_KW = "false_easting_northing_units";
-const char* ossimKeywordNames::FALSE_EASTING_KW = "false_easting";
-const char* ossimKeywordNames::FALSE_NORTHING_KW = "false_northing";
-const char* ossimKeywordNames::FEATURE_NAME_KW = "feature_name";
-const char* ossimKeywordNames::FILENAME_KW = "filename";
-const char* ossimKeywordNames::FILEPATH_KW = "filepath";
-const char* ossimKeywordNames::FILL_FLAG_KW = "fill_flag";
-const char* ossimKeywordNames::FRAME_INDEX_KW = "frame_index";
-const char* ossimKeywordNames::GCS_CODE_KW = "gcs_code";
-const char* ossimKeywordNames::GEOM_FILE_KW = "geom_file";
-const char* ossimKeywordNames::HEMISPHERE_KW = "hemisphere";
-const char* ossimKeywordNames::HORIZONTAL_SIZE_KW = "horizontal_size";
-const char* ossimKeywordNames::ID_KW ="id";
-const char* ossimKeywordNames::IMAGE_CE90_KW  = "estimated_image_ce90";
-const char* ossimKeywordNames::IMAGE_FILE_KW = "image_file";
-const char* ossimKeywordNames::IMAGE_ID_KW = "image_id";
-const char* ossimKeywordNames::IMAGE_MODEL_TRANSFORM_MATRIX_KW = "image_model_transform_matrix";
-const char* ossimKeywordNames::IMAGE_MODEL_TRANSFORM_UNIT_KW = "image_model_transform_unit";
-const char* ossimKeywordNames::IMAGE_PATH_KW = "image_path";
-const char* ossimKeywordNames::IMAGE_TYPE_KW = "image_type";
-const char* ossimKeywordNames::IMAGE_DATE_KW = "image_date";
-const char* ossimKeywordNames::IMAGE_FILE_SIZE_KW = "image_file_size";
-const char* ossimKeywordNames::INPUT_RR_LEVEL_KW = "input_rr_level";
-const char* ossimKeywordNames::INTERLEAVE_TYPE_KW = "interleave_type";
-const char* ossimKeywordNames::JULIAN_DAY_KW = "julian_day";
-const char* ossimKeywordNames::LAT_INCREMENT_KW = "lat_increment";
-const char* ossimKeywordNames::LL_LAT_KW = "ll_lat";
-const char* ossimKeywordNames::LL_LON_KW = "ll_lon";
-const char* ossimKeywordNames::LR_LAT_KW = "lr_lat";
-const char* ossimKeywordNames::LR_LON_KW = "lr_lon";
-const char* ossimKeywordNames::LL_X_KW = "ll_x";
-const char* ossimKeywordNames::LL_Y_KW = "ll_y";
-const char* ossimKeywordNames::LR_X_KW = "lr_x";
-const char* ossimKeywordNames::LR_Y_KW = "lr_y";
-const char* ossimKeywordNames::LON_INCREMENT_KW = "lon_increment";
-const char* ossimKeywordNames::MAJOR_AXIS_KW = "major_axis";
-const char* ossimKeywordNames::MAX_VALUE_KW = "max_value";
-const char* ossimKeywordNames::MAX_ITERATIONS_KW = "max_iterations";
-const char* ossimKeywordNames::MAX_QUADTREE_LEVELS_KW = "max_quadtree_levels";
-const char* ossimKeywordNames::METADATA_TYPE_KW = "metadata_type";
-const char* ossimKeywordNames::METERS_PER_PIXEL_X_KW = "meters_per_pixel_x";
-const char* ossimKeywordNames::METERS_PER_PIXEL_Y_KW = "meters_per_pixel_y";
-const char* ossimKeywordNames::MINOR_AXIS_KW = "minor_axis";
-const char* ossimKeywordNames::MIN_VALUE_KW = "min_value";
-const char* ossimKeywordNames::NULL_VALUE_KW = "null_value";
-const char* ossimKeywordNames::NUMBER_BANDS_KW = "number_bands";
-const char* ossimKeywordNames::NUMBER_ENTRIES_KW = "number_entries";
-const char* ossimKeywordNames::NUMBER_INPUT_BANDS_KW = "number_input_bands";
-const char* ossimKeywordNames::NUMBER_INPUTS_KW = "number_inputs";
-const char* ossimKeywordNames::NUMBER_OUTPUTS_KW = "number_outputs";
-const char* ossimKeywordNames::NUMBER_OUTPUT_BANDS_KW = "number_output_bands";
-const char* ossimKeywordNames::NUMBER_LINES_KW = "number_lines";
-const char* ossimKeywordNames::NUMBER_REDUCED_RES_SETS_KW = "number_reduced_res_sets";
-const char* ossimKeywordNames::NUMBER_SAMPLES_KW = "number_samples";
-const char* ossimKeywordNames::ORIGIN_X_KW = "origin_x";
-const char* ossimKeywordNames::ORIGIN_Y_KW = "origin_y";
-const char* ossimKeywordNames::ORIGIN_LATITUDE_KW = "origin_latitude";
-const char* ossimKeywordNames::OUTPUT_FILE_KW = "output_file";
-const char* ossimKeywordNames::OUTPUT_FILE_PREFIX_KW = "output_file_prefix";
-const char* ossimKeywordNames::OUTPUT_FILE_EXTENSION_KW = "output_file_extension";
-const char* ossimKeywordNames::OUTPUT_TILE_SIZE_KW = "output_tile_size";
-const char* ossimKeywordNames::OVERVIEW_COMPRESSION_QUALITY_KW = "overview_compression_quality";
-const char* ossimKeywordNames::OVERVIEW_COMPRESSION_TYPE_KW = "overview_compression_type";
-const char* ossimKeywordNames::OVERVIEW_FILE_KW  = "overview_file";
-const char* ossimKeywordNames::OVERVIEW_STOP_DIMENSION_KW = "overview_stop_dimension";
-const char* ossimKeywordNames::PCS_CODE_KW = "pcs_code";
-const char* ossimKeywordNames::PEN_COLOR_KW = "pen_color";
-const char* ossimKeywordNames::PHOTOMETRIC_KW    = "photometric";
-const char* ossimKeywordNames::PIXEL_SCALE_XY_KW = "pixel_scale_xy";
-// const char* ossimKeywordNames::PIXEL_SCALE_Y_KW = "pixel_scale_y";
-const char* ossimKeywordNames::PIXEL_SCALE_UNITS_KW = "pixel_scale_units";
-
-const char* ossimKeywordNames::PIXEL_TYPE_KW  = "pixel_type";
-const char* ossimKeywordNames::PLANAR_CONFIG_KW  = "planar_config";
-const char* ossimKeywordNames::POINT_WIDTH_HEIGHT_KW = "point_width_height";
-const char* ossimKeywordNames::PROJECTION_KW     = "projection";
-const char* ossimKeywordNames::QUALITY_KW        = "quality";
-const char* ossimKeywordNames::QUERY_KW = "query";
-const char* ossimKeywordNames::RADIOMETRY_KW = "radiometry";
-const char* ossimKeywordNames::REDUCED_RES_LEVEL_KW = "reduced_res_level";
-const char* ossimKeywordNames::REF_GPT_LAT_KW  = "ref_point_lat";
-const char* ossimKeywordNames::REF_GPT_LON_KW  = "ref_point_lon";
-const char* ossimKeywordNames::REF_GPT_HGT_KW  = "ref_point_hgt";
-const char* ossimKeywordNames::REF_IPT_LINE_KW = "ref_point_line";
-const char* ossimKeywordNames::REF_IPT_SAMP_KW = "ref_point_samp";
-const char* ossimKeywordNames::ROTATION_KW = "rotation";
-const char* ossimKeywordNames::SCALE_PER_PIXEL_X_KW = "scale_per_pixel_x";
-const char* ossimKeywordNames::SCALE_PER_PIXEL_Y_KW = "scale_per_pixel_y";
-const char* ossimKeywordNames::SCALAR_TYPE_KW    = "scalar_type";
-const char* ossimKeywordNames::SCALE_FACTOR_KW   = "scale_factor";
-const char* ossimKeywordNames::SCALE_FACTOR_X_KW = "scale_factor_x";
-const char* ossimKeywordNames::SCALE_FACTOR_Y_KW = "scale_factor_y";
-const char* ossimKeywordNames::SCALE_X_KW = "scale_x";
-const char* ossimKeywordNames::SCALE_Y_KW = "scale_y";
-const char* ossimKeywordNames::SENSOR_ID_KW = "sensor";
-const char* ossimKeywordNames::SRS_NAME_KW = "srs_name";
-const char* ossimKeywordNames::STD_PARALLEL_1_KW = "std_parallel_1";
-const char* ossimKeywordNames::STD_PARALLEL_2_KW = "std_parallel_2";
-const char* ossimKeywordNames::THICKNESS_KW = "thickness";
-const char* ossimKeywordNames::TIE_POINT_EASTING_KW = "tie_point_easting";  // ????
-const char* ossimKeywordNames::TIE_POINT_NORTHING_KW = "tie_point_northing";  // ????
-const char* ossimKeywordNames::TIE_POINT_XY_KW = "tie_point_xy";  // ????
-// const char* ossimKeywordNames::TIE_POINT_Y_KW = "tie_point_y";  // ????
-const char* ossimKeywordNames::TIE_POINT_UNITS_KW = "tie_point_units";
-const char* ossimKeywordNames::TIE_POINT_LAT_KW = "tie_point_lat";
-const char* ossimKeywordNames::TIE_POINT_LON_KW = "tie_point_lon";
-const char* ossimKeywordNames::TILE_SIZE_X_KW = "tile_size_x";
-const char* ossimKeywordNames::TILE_SIZE_Y_KW = "tile_size_y";
-const char* ossimKeywordNames::TILE_SOURCE_KW = "tile_source";
-const char* ossimKeywordNames::TILE_TYPE_KW = "tile_type";
-const char* ossimKeywordNames::TRANSLATION_X_KW = "translation_x";
-const char* ossimKeywordNames::TRANSLATION_Y_KW = "translation_y";
-const char* ossimKeywordNames::TYPE_KW = "type";
-const char* ossimKeywordNames::UL_LAT_KW = "ul_lat";
-const char* ossimKeywordNames::UL_LON_KW = "ul_lon";
-const char* ossimKeywordNames::UNITS_KW = "units";
-const char* ossimKeywordNames::UR_LAT_KW = "ur_lat";
-const char* ossimKeywordNames::UR_LON_KW = "ur_lon";
-const char* ossimKeywordNames::UL_X_KW = "ul_x";
-const char* ossimKeywordNames::UL_Y_KW = "ul_y";
-const char* ossimKeywordNames::UR_X_KW = "ur_x";
-const char* ossimKeywordNames::UR_Y_KW = "ur_y";
-const char* ossimKeywordNames::VALID_VERTICES_KW = "valid_vertices_file";
-const char* ossimKeywordNames::VERTICAL_SIZE_KW = "vertical_size";
-const char* ossimKeywordNames::ZONE_KW = "zone";
-
-ossimKeywordNames::ossimKeywordNames()
-{}
-
-ossimKeywordNames::ossimKeywordNames(const ossimKeywordNames& /* rhs */)
-{}
-
-const ossimKeywordNames& ossimKeywordNames::operator=(const ossimKeywordNames& /* rhs */)
-{
-   return *this;
-}
diff --git a/src/ossim/base/ossimKeywordlist.cpp b/src/ossim/base/ossimKeywordlist.cpp
deleted file mode 100644
index 1515bc3..0000000
--- a/src/ossim/base/ossimKeywordlist.cpp
+++ /dev/null
@@ -1,1376 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Description: This class provides capabilities for keywordlists.
-//
-//********************************************************************
-// $Id: ossimKeywordlist.cpp 22366 2013-08-09 12:13:24Z gpotts $
-
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimDirectory.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimRegExp.h>
-#include <ossim/base/ossimTrace.h>
-
-#include <algorithm>
-#include <fstream>
-#include <list>
-#include <sstream>
-#include <utility>
-
-static ossimTrace traceDebug("ossimKeywordlist:debug");
-static const ossim_int32 MAX_LINE_LENGTH = 256;
-static const char NULL_KEY_NOTICE[]
-= "ossimKeywordlist Notice:  Null key passed to method.";
-
-
-#ifdef OSSIM_ID_ENABLED
-static const bool TRACE = false;
-static const char OSSIM_ID[] = "$Id: ossimKeywordlist.cpp 22366 2013-08-09 12:13:24Z gpotts $";
-#endif
-
-const std::string ossimKeywordlist::NULL_KW = "";
-
-ossimKeywordlist::ossimKeywordlist(const ossimKeywordlist& src)
-:m_map(src.m_map),
-m_delimiter(src.m_delimiter),
-m_preserveKeyValues(src.m_preserveKeyValues),
-m_expandEnvVars(src.m_expandEnvVars)
-{
-}
-
-ossimKeywordlist::ossimKeywordlist(char delimiter, 
-                                   bool expandEnvVars)
-:
-m_map(),
-m_delimiter(delimiter),
-m_preserveKeyValues(true),
-m_expandEnvVars(expandEnvVars)
-{
-#ifdef OSSIM_ID_ENABLED
-   if (TRACE) ossimNotify(ossimNotifyLevel_DEBUG) << OSSIM_ID << std::endl;
-#endif
-}
-
-ossimKeywordlist::ossimKeywordlist(const char* file,
-                                   char        delimiter,
-                                   bool        ignoreBinaryChars,
-                                   bool        expandEnvVars)
-:
-m_map(),
-m_delimiter(delimiter),
-m_preserveKeyValues(true),
-//m_lineContinuationCharacter('\\'),
-m_expandEnvVars(expandEnvVars)
-{
-   ossimFilename in_file(file);
-   
-   if (!parseFile(in_file, ignoreBinaryChars))
-   {
-      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-   }
-}
-
-ossimKeywordlist::ossimKeywordlist(const ossimFilename& file,
-                                   char                 delimiter,
-                                   bool                 ignoreBinaryChars,
-                                   bool                 expandEnvVars)
-:
-m_map(),
-m_delimiter(delimiter),
-m_preserveKeyValues(true),
-m_expandEnvVars(expandEnvVars)
-
-{
-   if (!parseFile(file, ignoreBinaryChars))
-   {
-      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-   }
-}
-
-ossimKeywordlist::~ossimKeywordlist()
-{
-   m_map.clear();
-}
-
-void ossimKeywordlist::setExpandEnvVarsFlag( bool flag )
-{
-   m_expandEnvVars = flag;
-}
-
-bool ossimKeywordlist::getExpandEnvVarsFlag( void ) const
-{
-   return m_expandEnvVars;
-}
-
-bool ossimKeywordlist::addFile(const char* file)
-{
-   ossimFilename in_file(file);
-   
-   return parseFile(in_file);
-}
-
-bool ossimKeywordlist::addFile(const ossimFilename& file)
-{
-   return parseFile(file);
-}
-
-void ossimKeywordlist::addList(const ossimKeywordlist &src, bool overwrite)
-{
-   KeywordMap::const_iterator i = src.m_map.begin();
-   
-   while (i != src.m_map.end())
-   {
-      addPair( (*i).first, (*i).second, overwrite );
-      i++;
-   }
-}
-
-void ossimKeywordlist::add(const ossimKeywordlist& kwl,
-                           const char* prefix,
-                           bool stripPrefix)
-{
-   std::map<std::string, std::string>::const_iterator iter = kwl.m_map.begin();
-   
-   ossimRegExp regExp;
-   
-   // Check for null prefix.
-   std::string tmpPrefix;
-   if (prefix) tmpPrefix = prefix;
-   
-   regExp.compile(("^("+tmpPrefix+")").c_str());
-   
-   while(iter != kwl.m_map.end())
-   {
-      ossimString newKey;
-      
-      if(regExp.find( (*iter).first.c_str()))
-      {
-         newKey = (*iter).first;
-         if(stripPrefix && prefix)
-         {
-            newKey = newKey.substitute(prefix, "");
-            
-         }
-         
-         addPair(newKey.string(), (*iter).second, true);
-      }
-      ++iter;
-   }
-}
-
-void ossimKeywordlist::add(const char* prefix,
-                           const ossimKeywordlist& kwl,
-                           bool overwrite)
-{
-   std::string p = prefix ? prefix : "";
-   std::map<std::string, std::string>::const_iterator iter = kwl.m_map.begin();
-   while(iter != kwl.m_map.end())
-   {
-      std::string k( p + (*iter).first );
-      addPair( k, (*iter).second, overwrite );
-      ++iter;
-   }
-}
-
-void ossimKeywordlist::addPair(const std::string& key,
-                               const std::string& value,
-                               bool               overwrite)
-{
-   if ( key.size() )
-   {
-      ossimString v = value;
-      if ( m_expandEnvVars == true )
-      {
-         v = v.expandEnvironmentVariable();
-      }
-      
-      KeywordMap::iterator i = getMapEntry(key);
-      
-      if (i == m_map.end())
-      {
-         m_map.insert(std::make_pair(key, v.string()));
-      }
-      else if (overwrite)
-      {
-         (*i).second = v.string();
-      }
-   }
-}
-
-void ossimKeywordlist::addPair(const std::string& prefix,
-                               const std::string& key,
-                               const std::string& value,
-                               bool               overwrite)
-{
-   std::string k(prefix + key);
-   addPair(k, value, overwrite);
-}
-
-void ossimKeywordlist::add(const char* key,
-                           const char* value,
-                           bool        overwrite)
-{
-   if ( key )
-   {
-      std::string k(key);
-      std::string v(value?value:"");
-      addPair(k, v, overwrite);
-   }
-}
-
-void ossimKeywordlist::add(const char* prefix,
-                           const char* key,
-                           const char* value,
-                           bool        overwrite)
-{
-   if ( key )
-   {
-      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
-      std::string v(value ? value : "");
-      addPair(k, v, overwrite);
-   }
-}
-
-void ossimKeywordlist::add(const char* key,
-                           char        value,
-                           bool        overwrite)
-{
-   if ( key )
-   {
-      std::string k(key);
-      std::string v(1, value);
-      addPair(k, v, overwrite);
-   }
-}
-
-void ossimKeywordlist::add(const char* prefix,
-                           const char* key,
-                           char        value,
-                           bool        overwrite)
-{
-   if ( key )
-   {
-      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
-      std::string v(1, value);
-      addPair(k, v, overwrite);
-   }
-}
-
-void ossimKeywordlist::add(const char* key,
-                           ossim_int16 value,
-                           bool overwrite)
-{
-   if ( key )
-   {
-      std::string k(key);
-      std::string v = ossimString::toString(value).string();
-      addPair(k, v, overwrite);
-   }
-}
-
-void ossimKeywordlist::add(const char* prefix,
-                           const char* key,
-                           ossim_int16 value,
-                           bool overwrite)
-{
-   if ( key )
-   {
-      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
-      std::string v = ossimString::toString(value).string();
-      addPair(k, v, overwrite);
-   }
-}
-
-void ossimKeywordlist::add(const char* key,
-                           ossim_uint16 value,
-                           bool overwrite)
-{
-   if ( key )
-   {
-      std::string k(key);
-      std::string v = ossimString::toString(value).string();
-      addPair(k, v, overwrite);
-   }
-}
-
-void ossimKeywordlist::add(const char* prefix,
-                           const char* key,
-                           ossim_uint16 value,
-                           bool overwrite)
-{
-   if ( key )
-   {
-      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
-      std::string v = ossimString::toString(value).string();
-      addPair(k, v, overwrite);
-   }
-}
-
-void ossimKeywordlist::add(const char* key,
-                           ossim_int32 value,
-                           bool overwrite)
-{
-   if ( key )
-   {
-      std::string k(key);
-      std::string v = ossimString::toString(value).string();
-      addPair(k, v, overwrite);
-   }
-}
-
-void ossimKeywordlist::add(const char*  prefix,
-                           const char*  key,
-                           ossim_int32 value,
-                           bool overwrite)
-{
-   if ( key )
-   {
-      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
-      std::string v = ossimString::toString(value).string();
-      addPair(k, v, overwrite);
-   }
-}
-
-void ossimKeywordlist::add(const char* key,
-                           ossim_uint32 value,
-                           bool overwrite)
-{
-   if ( key )
-   {
-      std::string k(key);
-      std::string v = ossimString::toString(value).string();
-      addPair(k, v, overwrite);
-   }
-}
-
-void ossimKeywordlist::add(const char*  prefix,
-                           const char*  key,
-                           ossim_uint32 value,
-                           bool overwrite)
-{
-   if ( key )
-   {
-      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
-      std::string v = ossimString::toString(value).string();
-      addPair(k, v, overwrite);
-   }
-}
-
-void ossimKeywordlist::add(const char* key,
-                           ossim_int64 value,
-                           bool overwrite)
-{
-   if ( key )
-   {
-      std::string k(key);
-      std::string v = ossimString::toString(value).string();
-      addPair(k, v, overwrite);
-   }
-}
-
-void ossimKeywordlist::add(const char*  prefix,
-                           const char*  key,
-                           ossim_int64 value,
-                           bool overwrite)
-{
-   if ( key )
-   {
-      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
-      std::string v = ossimString::toString(value).string();
-      addPair(k, v, overwrite);
-   }
-}
-
-void ossimKeywordlist::add(const char* key,
-                           ossim_uint64 value,
-                           bool overwrite)
-{
-   if ( key )
-   {
-      std::string k(key);
-      std::string v = ossimString::toString(value).string();
-      addPair(k, v, overwrite);
-   }
-}
-
-void ossimKeywordlist::add(const char*  prefix,
-                           const char*  key,
-                           ossim_uint64 value,
-                           bool overwrite)
-{
-   if ( key )
-   {
-      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
-      std::string v = ossimString::toString(value).string();
-      addPair(k, v, overwrite);
-   }
-}
-
-void ossimKeywordlist::add(const char* key,
-                           ossim_float32 value,
-                           bool overwrite,
-                           int precision)
-{
-   if ( key )
-   {
-      std::string k(key);
-      std::string v = ossimString::toString(value, precision).string();
-      addPair(k, v, overwrite);
-   }
-}
-
-void ossimKeywordlist::add(const char* prefix,
-                           const char* key,
-                           ossim_float32 value,
-                           bool overwrite,
-                           int precision)
-{
-   if ( key )
-   {
-      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
-      std::string v = ossimString::toString(value, precision).string();
-      addPair(k, v, overwrite);
-   }
-}
-
-void ossimKeywordlist::add(const char* key,
-                           ossim_float64 value,
-                           bool overwrite,
-                           int precision)
-{
-   if ( key )
-   {
-      std::string k(key);
-      std::string v = ossimString::toString(value, precision).string();
-      addPair(k, v, overwrite);
-   }
-}
-
-void ossimKeywordlist::add(const char* prefix,
-                           const char* key,
-                           ossim_float64 value,
-                           bool overwrite,
-                           int precision)
-{
-   if ( key )
-   {
-      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
-      std::string v = ossimString::toString(value, precision).string();
-      addPair(k, v, overwrite);
-   }
-}
-
-bool ossimKeywordlist::write(const char* file, 
-                             const char* comment) const
-{
-   std::ofstream filename(file);
-   if (!filename)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-      <<"ossimKeywordlist::write, Error opening file:  "
-      << file << std::endl;
-      return false;
-   }
-   
-   if ( comment != 0 )
-   {
-      ossimString commentStr("// ");
-      commentStr += comment;
-      
-      // Write out the input comment to the first line.
-      filename << commentStr.c_str() << std::endl;
-   }
-   
-   writeToStream(filename);
-   
-   filename.close();
-   
-   return true;
-}
-
-ossimString ossimKeywordlist::toString()const
-{
-   std::ostringstream out;
-   writeToStream(out);
-   
-#if 0
-   KeywordMap::const_iterator i;
-   ossimString result;
-   
-   for(i = m_map.begin(); i != m_map.end(); i++)
-   {
-      result += (*i).first;
-      result += delimiter_str().c_str();
-      result += " ";
-      result += (*i).second;
-      result += '\n';
-   }
-#endif
-   return ossimString(out.str());
-}
-
-void ossimKeywordlist::toString(ossimString& result)const
-{
-   std::ostringstream out;
-   writeToStream(out);
-   
-   result = out.str();
-#if 0
-   KeywordMap::const_iterator i;
-   
-   for(i = m_map.begin(); i != m_map.end(); i++)
-   {
-      result += (*i).first;
-      result += delimiter_str().c_str();
-      result += " ";
-      result += (*i).second;
-      result += '\n';
-   }
-#endif
-}
-
-void ossimKeywordlist::writeToStream(std::ostream& out) const
-{
-   KeywordMap::const_iterator i;
-   ossimString value;
-   ossimRegExp reg("\n|\r| $|^ ");
-   for(i = m_map.begin(); i != m_map.end(); ++i)
-   {
-      value = (*i).second;
-      if(!value.empty())
-      {
-         if(reg.find(value))
-         {
-            value = "\"\"\"" + value + "\"\"\"";
-         }
-      }
-      //      value = value.substitute('\n', "\\\n", true);
-      out << (*i).first  << delimiter_str().c_str() << "  "
-      << value << std::endl;
-   }
-}
-
-bool ossimKeywordlist::hasKey( const std::string& key ) const
-{
-   bool result = false;
-   KeywordMap::const_iterator i = m_map.find(key);
-   if (i != m_map.end())
-   {
-      result = true;
-   }
-   return result;
-}
-
-const std::string& ossimKeywordlist::findKey(const std::string& key) const
-{
-   // std::string result;
-   KeywordMap::const_iterator i = m_map.find(key);
-   if (i != m_map.end())
-   {
-      // result = (*i).second;
-      return (*i).second;
-   }
-   return ossimKeywordlist::NULL_KW;
-}
-
-const std::string& ossimKeywordlist::findKey(const std::string& prefix,
-                                             const std::string& key) const
-{
-   std::string k = prefix+key;
-   return findKey(k);
-}
-
-const char* ossimKeywordlist::find(const char* key) const
-{
-   const char* result = 0;
-   if (key)
-   {
-      std::string k = key;
-      KeywordMap::const_iterator i = m_map.find( k );
-      if (i != m_map.end())
-      {
-         result = (*i).second.c_str();
-      }
-   }
-   return result;
-}
-
-const char* ossimKeywordlist::find(const char* prefix,
-                                   const char* key) const
-{
-   const char* result = 0;
-   if (key)
-   {
-      std::string k;
-      if (prefix) k = prefix;
-      k += key;
-      KeywordMap::const_iterator i = m_map.find( k );
-      if (i != m_map.end())
-      {
-         result = (*i).second.c_str();
-      }
-   }
-   return result;
-}
-
-void ossimKeywordlist::remove(const char * key)
-{
-   ossimString k = key?key:"";
-   
-   KeywordMap::iterator i = m_map.find(k);
-   
-   if(i != m_map.end())
-   {
-      m_map.erase(i);
-   }
-}
-
-void ossimKeywordlist::remove(const char* prefix, const char * key)
-{
-   if (key)
-   {
-      ossimString k;
-      if (prefix) k = prefix;
-      k += key;
-      
-      KeywordMap::iterator i = m_map.find(k);
-      
-      if(i != m_map.end())
-      {
-         m_map.erase(i);
-      }
-   }
-}
-
-ossim_uint32 ossimKeywordlist::numberOf(const char* str) const
-{
-   ossim_uint32 count = 0;
-   
-   if (str)
-   {
-      KeywordMap::const_iterator i = m_map.begin();
-      
-      while (i != m_map.end())
-      {
-         if ( ossimString((*i).first).contains(str) )
-         {
-            ++count;
-         }
-         ++i;
-      }
-   }
-   
-   return count;
-}
-
-ossim_uint32 ossimKeywordlist::numberOf(const char* prefix,
-                                        const char* key) const
-{
-   if ( key ) // Must have key, sometimes no prefix.
-   {
-      std::string k(prefix ? (std::string(prefix)+std::string(key)) : key);
-      return numberOf(k.c_str());
-   }
-   return 0;
-}
-
-void ossimKeywordlist::clear()
-{
-   m_map.clear();
-}
-
-ossimKeywordlist::KeywordMap::iterator
-ossimKeywordlist::getMapEntry(const char* key)
-{
-   if (key)
-   {
-      std::string k = key;
-      return m_map.find(k);
-   }
-   else
-   {
-      return m_map.end();
-   }
-}
-
-ossimKeywordlist::KeywordMap::iterator
-ossimKeywordlist::getMapEntry(const std::string& key)
-{
-   return m_map.find(key);
-}
-
-ossimKeywordlist::KeywordMap::iterator
-ossimKeywordlist::getMapEntry(const ossimString& key)
-{
-   return m_map.find(key.string());
-}
-
-
-//*******************************************************************
-// Private Method:
-//*******************************************************************
-bool ossimKeywordlist::parseFile(const ossimFilename& file,
-                                 bool ignoreBinaryChars)
-{
-   if(!file.exists()) return false;
-   bool result = false;
-   std::ifstream is;
-   is.open(file.c_str(), std::ios::in | std::ios::binary);
-   
-   if(!is.fail())
-   {
-      result = parseStream(is, ignoreBinaryChars);
-   }
-   
-   is.close();
-   
-   return result;
-}
-
-bool ossimKeywordlist::parseStream(std::istream& is, bool /* ignoreBinaryChars */)
-{
-   return parseStream(is);
-}
-
-bool ossimKeywordlist::parseString(const std::string& inString)
-{
-   std::istringstream in(inString);
-   
-   return parseStream(in);
-}
-
-bool ossimKeywordlist::isValidKeywordlistCharacter(ossim_uint8 c)const
-{
-   if((c>=0x20&&c<=0x7e))
-   {
-      return true;
-   }
-   switch(c)
-   {
-      case '\n':
-      case '\r':
-      case '\t':
-         return true;
-   }
-   return false;
-}
-
-void ossimKeywordlist::skipWhitespace(std::istream& in)const
-{
-   int c = in.peek();
-   while( !in.fail() &&
-         ( (c == ' ') || (c == '\t') || (c == '\n') || (c == '\r') ) )
-   {
-      in.ignore(1);
-      c = in.peek();
-   }
-}
-
-ossimKeywordlist::KeywordlistParseState ossimKeywordlist::readComments(ossimString& sequence, std::istream& in)const
-{
-   KeywordlistParseState result = KeywordlistParseState_FAIL;
-   char c = (char)in.peek();
-   if(c == '/')
-   {
-      sequence += (char)in.get();
-      c = in.peek();
-      if(c == '/')
-      {
-         result = KeywordlistParseState_OK;
-         sequence += c;
-         while(!in.bad()&&!in.eof())
-         {
-            c = (char)in.get();
-            if(!isValidKeywordlistCharacter(c))
-            {
-               result = KeywordlistParseState_BAD_STREAM;
-               break;
-            }
-            if((c == '\n')||
-               (c == '\r'))
-            {
-               break;
-            }
-            sequence += c;
-         }
-      }
-   }
-   return result;
-}
-
-ossimKeywordlist::KeywordlistParseState ossimKeywordlist::readKey(ossimString& sequence, std::istream& in)const
-{
-   KeywordlistParseState result = KeywordlistParseState_FAIL;
-   if(!sequence.empty())
-   {
-      if(*(sequence.begin()+(sequence.size()-1)) == m_delimiter)
-      {
-         sequence = ossimString(sequence.begin(), sequence.begin() + (sequence.size()-1));
-         return KeywordlistParseState_OK;
-      }
-   }
-   // not a comment so read til key delimeter
-   while(!in.eof() && in.good())
-   {
-      ossim_uint8 c = in.get();
-      if( isValidKeywordlistCharacter(c) )
-      {
-         if ( (c == '\n') || (c == '\r') ) 
-         {
-            // Hit end of line with no delimiter.
-            if ( in.peek() == EOF )
-            {
-               //---
-               // Allowing on last line only.
-               // Note the empty key will trigger parseStream to return true.
-               //---
-               sequence.clear();
-               result = KeywordlistParseState_OK;
-               break;
-            }
-            else // Line with no delimiter.
-            {
-               // mal formed input stream for keyword list specification
-               result = KeywordlistParseState_BAD_STREAM;
-               break;
-            }
-         }
-         else if(c != m_delimiter)
-         {
-            sequence += (char)c;
-         }
-         else // at m_delimiter
-         {
-            result = KeywordlistParseState_OK;
-            sequence = sequence.trim();
-            break;
-         }
-      }
-      else 
-      {
-         // mal formed input stream for keyword list specification
-         result = KeywordlistParseState_BAD_STREAM;
-         break;
-      }
-   }
-   // we never found a delimeter so we are mal formed
-   if(!sequence.empty()&&(result!=KeywordlistParseState_OK))
-   {
-      result = KeywordlistParseState_BAD_STREAM;
-   }
-   return result;
-}
-
-ossimKeywordlist::KeywordlistParseState ossimKeywordlist::readValue(ossimString& sequence, std::istream& in)const
-{
-   KeywordlistParseState result = KeywordlistParseState_OK;
-   
-   ossim_int32 quoteCount = 0; // mark as not set
-   
-   // make sure we check for a blank value
-   while(!in.eof()&&!in.bad())
-   {
-      if(in.peek() == ' '||
-         in.peek() == '\t')
-      {
-         in.ignore();
-      }
-      else if(in.peek() == '\n' ||
-              in.peek() == '\r')
-      {
-         in.ignore();
-         return result;
-      }
-      else 
-      {
-         break;
-      }
-   }
-   // The ifstream object will end in '�' (character 255 or -1) if the end-of-file indicator 
-   // will not be set(e.g \n). In this case, end-of-file conditions would never be detected. 
-   // add EOF (which is actually the integer -1 or 255) check here.
-   // Reference link http://www.cplusplus.com/forum/general/33821/
-   while(!in.eof()&&!in.bad()&&in.peek()!=EOF)
-   {
-      ossim_uint8 c = in.get();
-      if(isValidKeywordlistCharacter(c))
-      {
-         if(((c == '\n'||c=='\r') && !quoteCount) || in.eof())
-         {
-            break;
-         }
-         sequence += (char)c;
-         if(sequence.size() >2)
-         {
-            if(quoteCount < 1)
-            {
-               // if quoted
-               if(ossimString(sequence.begin(), sequence.begin()+3) == "\"\"\"")
-               {
-                  ++quoteCount;
-               }
-            }
-            else // check for ending quotes 
-            {
-               if(ossimString(sequence.begin() + sequence.size()-3, sequence.end()) == "\"\"\"")
-               {
-                  ++quoteCount;
-               }
-            }
-         }
-         if(quoteCount > 1)
-         {
-            sequence = ossimString(sequence.begin()+3, sequence.begin()+(sequence.size()-3));
-            break;
-         }
-      }
-      else 
-      {
-         result = KeywordlistParseState_BAD_STREAM;
-         break;
-      }
-   }
-   return result;
-}
-
-ossimKeywordlist::KeywordlistParseState ossimKeywordlist::readKeyAndValuePair(ossimString& key, ossimString& value, std::istream& in)const
-{
-   ossimKeywordlist::KeywordlistParseState keyState   = readKey(key, in);
-   if(keyState & KeywordlistParseState_BAD_STREAM) return keyState;
-   ossimKeywordlist::KeywordlistParseState valueState = readValue(value, in);
-   return static_cast<ossimKeywordlist::KeywordlistParseState>( (static_cast<int>(keyState) |
-                                                                 static_cast<int>(valueState)) );
-}
-
-bool ossimKeywordlist::parseStream(std::istream& is)
-{
-   if (!is) // Check stream state.
-   {
-      return false;
-   }
-   ossimString key;
-   ossimString value;
-   ossimString sequence;
-   KeywordlistParseState state = KeywordlistParseState_OK;
-   while(!is.eof() && !is.bad())
-   {
-      skipWhitespace(is);
-      if(is.eof() || is.bad()) return true; // we skipped to end so valid keyword list
-      state = readComments(sequence, is);
-      if(state & KeywordlistParseState_BAD_STREAM) return false;
-      // if we failed a comment parse then try key value parse.
-      if(state == KeywordlistParseState_FAIL)
-      {
-         key = sequence; // just in case there is a 1 token look ahead residual for a single slash test.
-         ossimKeywordlist::KeywordlistParseState testKeyValueState = readKeyAndValuePair(key, value, is);
-         if(testKeyValueState == KeywordlistParseState_OK)
-         {
-            key = key.trim();
-            if(key.empty())
-            {
-               return true;
-            }
-            if ( m_expandEnvVars == true )
-            {
-               ossimString result = value.expandEnvironmentVariable();
-               m_map.insert(std::make_pair(key.string(), result.string()));
-            }
-            else
-            {
-               m_map.insert(std::make_pair(key.string(), value.string()));
-            }
-         }
-         else if(testKeyValueState & KeywordlistParseState_BAD_STREAM)
-         {
-            return false;
-         }
-#if 0
-         // Commented out to allow an invalid line in keyword list without
-         // erroring out, effectively skipping bad line. drb - 01 Sep. 2001
-         else
-         {
-            return false;
-         }
-#endif
-      }
-      else if(state & KeywordlistParseState_BAD_STREAM)
-      {
-         return false;
-      }
-      sequence = key = value = "";
-   }   
-   
-   return true;
-}
-
-std::vector<ossimString> ossimKeywordlist::findAllKeysThatContains(const ossimString &searchString)const
-{
-   KeywordMap::const_iterator i;
-   std::vector<ossimString> result;
-   
-   for(i = m_map.begin(); i != m_map.end(); ++i)
-   {
-      if( ossimString((*i).first).contains(searchString))
-      {
-         result.push_back((*i).first);
-      }
-   }
-   
-   return result;
-}
-
-std::vector<ossimString> ossimKeywordlist::findAllKeysThatMatch(const ossimString &regularExpression)const
-{
-   KeywordMap::const_iterator i;
-   std::vector<ossimString> result;
-   ossimRegExp regExp;
-   
-   regExp.compile(regularExpression.c_str());
-   
-   for(i = m_map.begin(); i != m_map.end(); ++i)
-   {
-      if(regExp.find( (*i).first.c_str()))
-      {
-         result.push_back((*i).first);
-      }
-   }
-   
-   return result;
-}
-
-void ossimKeywordlist::extractKeysThatMatch(ossimKeywordlist& kwl,
-                                            const ossimString &regularExpression)const
-{
-   KeywordMap::const_iterator i;
-   std::vector<ossimString> result;
-   ossimRegExp regExp;
-   
-   regExp.compile(regularExpression.c_str());
-   
-   for(i = m_map.begin(); i != m_map.end(); ++i)
-   {
-      if(regExp.find( (*i).first.c_str()))
-      {
-         kwl.addPair((*i).first, (*i).second);
-      }
-   }
-}
-
-void ossimKeywordlist::removeKeysThatMatch(const ossimString &regularExpression)
-{
-   KeywordMap::const_iterator i;
-   std::vector<ossimString> result;
-   ossimRegExp regExp;
-   
-   regExp.compile(regularExpression.c_str());
-   
-   for(i = m_map.begin(); i != m_map.end(); ++i)
-   {
-      if(regExp.find( (*i).first.c_str()))
-      {
-         result.push_back((*i).first);
-      }
-   }
-   for(ossim_uint32 i2 = 0; i2 < result.size(); ++i2)
-   {
-      remove(result[i2]);
-   }
-}
-
-std::vector<ossimString> ossimKeywordlist::getSubstringKeyList(const ossimString& regularExpression)const
-{
-   std::vector<ossimString> result;
-   getSubstringKeyList(result, regularExpression);
-   return result;
-}
-
-void ossimKeywordlist::getSubstringKeyList(std::vector<ossimString>& result,
-                                           const ossimString& regularExpression)const
-{
-   KeywordMap::const_iterator i;
-   ossimRegExp regExp;
-   
-   regExp.compile(regularExpression.c_str());
-   
-   for(i = m_map.begin(); i != m_map.end(); ++i)
-   {
-      if(regExp.find( (*i).first.c_str()))
-      {
-         ossimString value = ossimString((*i).first.begin()+regExp.start(),
-                                         (*i).first.begin()+regExp.start()+regExp.end());
-         
-         if(std::find(result.begin(), result.end(), value) == result.end())
-         {
-            result.push_back(value);
-         }
-      }
-   }
-}
-
-ossim_uint32 ossimKeywordlist::getNumberOfSubstringKeys(const ossimString& regularExpression)const
-{
-   KeywordMap::const_iterator i;
-   std::list<ossimString> currentList;
-   ossim_uint32 result = 0;
-   ossimRegExp regExp;
-   
-   regExp.compile(regularExpression.c_str());
-   
-   for(i = m_map.begin(); i != m_map.end(); ++i)
-   {
-      if(regExp.find( (*i).first.c_str()))
-      {
-         ossimString value = ossimString((*i).first.begin()+regExp.start(),
-                                         (*i).first.begin()+regExp.start()+regExp.end());
-         
-         // make sure we have not already marked it as
-         // found
-         if(std::find(currentList.begin(),
-                      currentList.end(),
-                      value) == currentList.end())
-         {
-            currentList.push_back(value);
-            ++result;
-         }
-      }
-   }
-   
-   return result;
-}
-
-void ossimKeywordlist::addPrefixToAll(const ossimString& prefix)
-{
-   ossimKeywordlist tempKwl = *this;
-   
-   clear();
-   
-   KeywordMap::const_iterator values = tempKwl.m_map.begin();
-   
-   while(values != tempKwl.m_map.end())
-   {
-      std::string newKey = prefix.string() + (*values).first;
-      addPair(newKey, (*values).second, true);
-      ++values;
-   }
-}
-
-void ossimKeywordlist::addPrefixToKeysThatMatch(const ossimString& prefix,
-                                                const ossimString& regularExpression)
-{
-   ossimKeywordlist tempKwl = *this;
-   
-   clear();
-   
-   KeywordMap::const_iterator values = tempKwl.m_map.begin();
-   ossimRegExp regExp;
-   
-   regExp.compile(regularExpression.c_str());
-   
-   while(values != tempKwl.m_map.end())
-   {
-      std::string newKey = prefix.string()+(*values).first;
-      if(regExp.find( (*values).first.c_str()))
-      {
-         
-         addPair(newKey, (*values).second, true);
-      }
-      else
-      {
-         addPair((*values).first, (*values).second, true);
-      }
-      ++values;
-   }
-}
-
-void ossimKeywordlist::stripPrefixFromAll(const ossimString& regularExpression)
-{
-   ossimKeywordlist tempKwl = *this;
-   
-   clear();
-   
-   KeywordMap::const_iterator values = tempKwl.m_map.begin();
-   ossimRegExp regExp;
-   
-   regExp.compile(regularExpression.c_str());
-   
-   while(values != tempKwl.m_map.end())
-   {
-      std::string newKey = (*values).first;
-      if(regExp.find( (*values).first.c_str()))
-      {
-         newKey.erase(newKey.begin()+regExp.start(),
-                      newKey.begin()+regExp.start()+regExp.end());
-         
-         addPair(newKey, (*values).second, true);
-      }
-      else
-      {
-         addPair(newKey, (*values).second, true);
-      }
-      ++values;
-   }
-}
-
-ossim_uint32 ossimKeywordlist::getSize()const
-{
-   return (ossim_uint32)m_map.size();
-}
-
-const ossimKeywordlist::KeywordMap& ossimKeywordlist::getMap()const
-{
-   return m_map;
-}
-
-ossimKeywordlist::KeywordMap& ossimKeywordlist::getMap()
-{
-   return m_map;
-}
-
-void ossimKeywordlist::change_delimiter(char del)
-{
-   m_delimiter = del;
-}
-
-ossimString ossimKeywordlist::delimiter_str() const
-{
-   char tmp[2];
-   tmp[0] = m_delimiter;
-   tmp[1] = '\0';
-   return ossimString(tmp);
-}
-
-//*******************************************************************
-// Public Method:
-//*******************************************************************
-std::ostream& ossimKeywordlist::print(std::ostream& os) const
-{
-   writeToStream(os);
-#if 0
-   KeywordMap::const_iterator i;
-   
-   for(i = m_map.begin(); i != m_map.end(); ++i)
-   {
-      os << (*i).first << delimiter_str().c_str() << "  "
-      << (*i).second << std::endl;
-   }
-#endif
-   return os;
-}
-
-//*******************************************************************
-// friend function:
-//*******************************************************************
-OSSIMDLLEXPORT std::ostream& operator<<(std::ostream& os,
-                                        const ossimKeywordlist& kwl)
-{
-   kwl.print(os);
-   
-   return os;
-}
-
-
-bool ossimKeywordlist::operator ==(ossimKeywordlist& kwl)const
-{
-   if(this==&kwl) return true;
-   std::map<std::string, std::string>::const_iterator iter = m_map.begin();
-   
-   while(iter != m_map.end())
-   {
-      const char* value = kwl.find((*iter).first.c_str());
-      
-      if(ossimString(value) != (*iter).second)
-      {
-         return false;
-      }
-      ++iter;
-   }
-   
-   return true;
-}
-
-ossimKeywordlist&  ossimKeywordlist::downcaseKeywords()
-{
-   KeywordMap tempMap;
-   KeywordMap::iterator iter = m_map.begin();
-   
-   while(iter != m_map.end())
-   {
-      ossimString k(iter->first);
-      tempMap.insert(std::make_pair(k.downcase().string(), iter->second));
-      ++iter;
-   }
-   m_map = tempMap;
-   
-   return *this;
-}
-
-ossimKeywordlist& ossimKeywordlist::upcaseKeywords()
-{
-   KeywordMap tempMap;
-   KeywordMap::iterator iter = m_map.begin();
-   
-   while(iter != m_map.end())
-   {
-      ossimString k(iter->first);
-      tempMap.insert(std::make_pair(k.upcase().string(), iter->second));
-      ++iter;
-   }
-   m_map = tempMap;
-   
-   return *this;
-}
-
-ossimKeywordlist& ossimKeywordlist::trimAllValues(const ossimString& valueToTrim)
-{
-   KeywordMap::iterator iter = m_map.begin();
-   
-   while(iter != m_map.end())
-   {
-      iter->second = ossimString(iter->second).trim(valueToTrim).string();
-      ++iter;
-   }
-   
-   return *this;
-}
-
-ossimKeywordlist ossimKeywordlist::trimAllValues(const ossimString& valueToTrim)const
-{
-   ossimKeywordlist result(*this);
-   result.trimAllValues(valueToTrim);
-   return result;
-}
-
-
-//*************************************************************************************************
-//! [OLK, Aug/2008]
-//! Sets the boolean destination arg depending on value associated with keyword for values = 
-//! (yes|no|true|false|1|0). Returns TRUE if keyword found, otherwise false. Also returns false
-//! if none of the above permitted values are specified (rtn_val left unchanged in this case).
-//*************************************************************************************************
-bool ossimKeywordlist::getBoolKeywordValue(bool& rtn_val, 
-                                           const char* keyword, 
-                                           const char* prefix) const
-{
-   bool found = true;
-   const char* val_str = find(prefix, keyword);
-   if (val_str) 
-   {
-      found = true;
-      ossimString yesno (val_str);
-      yesno.upcase();
-      if ((yesno == "YES") || (yesno == "TRUE") || (yesno == "1"))
-         rtn_val = true;
-      else if ((yesno == "NO") || (yesno == "FALSE") || (yesno == "0"))
-         rtn_val = false;
-      else
-         found = false;
-   }
-   else
-      found = false;
-   
-   return found;
-}
-
diff --git a/src/ossim/base/ossimListener.cpp b/src/ossim/base/ossimListener.cpp
deleted file mode 100644
index 2059aa4..0000000
--- a/src/ossim/base/ossimListener.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author:  Garrett Potts 
-//
-//*******************************************************************
-//  $Id: ossimListener.cpp 9094 2006-06-13 19:12:40Z dburken $
-#include <ossim/base/ossimListener.h>
-
-RTTI_DEF(ossimListener, "ossimListener");
-
-ossimListener::ossimListener()
-  :theListenerEnableFlag(true)
-{}
-
-ossimListener::~ossimListener()
-{
-}
-
-void ossimListener::processEvent(ossimEvent& /* event */)
-{
-}
-
-void ossimListener::enableListener()
-{
-  theListenerEnableFlag = true;
-}
-
-void ossimListener::disableListener()
-{
-  theListenerEnableFlag = false;
-}
-
-void ossimListener::setListenerEnableFlag(bool flag)
-{
-  theListenerEnableFlag = flag;
-}
-
-bool ossimListener::isListenerEnabled()const
-{
-  return theListenerEnableFlag;
-}
-
-bool ossimListener::getListenerEnableFlag()const
-{
-  return theListenerEnableFlag;
-}
diff --git a/src/ossim/base/ossimNormRgbVector.cpp b/src/ossim/base/ossimNormRgbVector.cpp
deleted file mode 100644
index 30a8086..0000000
--- a/src/ossim/base/ossimNormRgbVector.cpp
+++ /dev/null
@@ -1,183 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2005 Garrett Potts
-//
-// License: LGPL
-// Author: Garrett Potts 
-// Description:
-//
-//*************************************************************************
-// $Id: ossimNormRgbVector.cpp 9094 2006-06-13 19:12:40Z dburken $
-#include <ossim/base/ossimNormRgbVector.h>
-#include <ossim/base/ossimRgbVector.h>
-#include <ossim/base/ossimJpegYCbCrVector.h>
-#include <ossim/base/ossimHsiVector.h>
-#include <ossim/base/ossimHsvVector.h>
-#include <ossim/base/ossimCmyVector.h>
-#include <ossim/base/ossimCommon.h>
-#include <math.h>
-
-ossimNormRgbVector::ossimNormRgbVector(const ossimRgbVector& rgb)
-{
-   theBuf[0] = rgb.getR()/255.0;
-   theBuf[1] = rgb.getG()/255.0;
-   theBuf[2] = rgb.getB()/255.0;
-}
-
-ossimNormRgbVector::ossimNormRgbVector(const ossimJpegYCbCrVector& YCbCr)
-{
-   (*this) = YCbCr;
-   
-}
-
-ossimNormRgbVector::ossimNormRgbVector(const ossimHsiVector& hsi)
-{
-   (*this)=hsi;
-}
-
-ossimNormRgbVector::ossimNormRgbVector(const ossimHsvVector& hsv)
-{
-   (*this) = hsv;
-}
-
-ossimNormRgbVector::ossimNormRgbVector(const ossimCmyVector& cmy)
-{
-   theBuf[0] = 255 - cmy.getC();
-   theBuf[1] = 255 - cmy.getM();
-   theBuf[2] = 255 - cmy.getY();
-}
-
-const ossimNormRgbVector& ossimNormRgbVector::operator =(const ossimHsvVector& hsv)
-{
-   // H is given on [0, 6] or UNDEFINED. S and V are given on [0, 1]. 
-   // RGB are each returned on [0, 1]. 
-   float h = hsv.getH(), // unnormalize it
-         s = hsv.getS(),
-         v = hsv.getV();
-   float m, n, f; 
-   int i; 
-   if(h == ossimHsvVector::OSSIM_HSV_UNDEFINED)
-   {
-      theBuf[0] = clamp(v);
-      theBuf[1] = clamp(v);
-      theBuf[2] = clamp(v);
-   }
-   else
-   {
-      h*=6.0; // unnormalize h
-      i = (int)floor(h); 
-      f = h - i; 
-      if(!(i & 1)) f = 1 - f; // if i is even 
-      m = v * (1 - s); 
-      n = v * (1 - s * f); 
-      switch (i)
-      { 
-      case 6: 
-      case 0:
-      {
-         theBuf[0] = clamp(v);
-         theBuf[1] = clamp(n);
-         theBuf[2] = clamp(m);
-         break;
-      }
-      case 1:
-      {
-         theBuf[0] = clamp(n);
-         theBuf[1] = clamp(v);
-         theBuf[2] = clamp(m);
-         break;
-      }
-      case 2:
-      {
-         theBuf[0] = clamp(m);
-         theBuf[1] = clamp(v);
-         theBuf[2] = clamp(n);
-         break;
-      }
-      case 3: 
-      {
-         theBuf[0] = clamp(m);
-         theBuf[1] = clamp(n);
-         theBuf[2] = clamp(v);
-         break;
-      }
-      case 4:
-      {
-         theBuf[0] = clamp(n);
-         theBuf[1] = clamp(m);
-         theBuf[2] = clamp(v);
-         break;
-      }
-      case 5: 
-      {
-         theBuf[0] = clamp(v);
-         theBuf[1] = clamp(m);
-         theBuf[2] = clamp(n);
-         break;
-      }
-      }
-   }
-   return *this;
-}
-
-const ossimNormRgbVector& ossimNormRgbVector::operator =(const ossimJpegYCbCrVector& YCbCr)
-{
-   theBuf[0] = clamp((YCbCr.getY() +
-                      1.402 * (YCbCr.getCr()-128.0))/255.0);
-   theBuf[1] = clamp((YCbCr.getY() -
-                      0.34414 *(YCbCr.getCb()-128.0) -
-                      0.71414*(YCbCr.getCr()-128.0))/255.0);
-   theBuf[2] = clamp((YCbCr.getY() +
-                      1.772 * ( YCbCr.getCb()-128.0))/255.0);
-
-   return *this;
-}
-
-const ossimNormRgbVector& ossimNormRgbVector::operator =(const ossimHsiVector& hsi)
-{
-   ossim_float32 h = hsi.getH();
-   ossim_float32 s = hsi.getS();
-   ossim_float32 i = hsi.getI();
-
-   ossim_float32 r=0;
-   ossim_float32 g=0;
-   ossim_float32 b=0;
-   
-   if(h <= 120.0)
-   {
-      b = i*(1-s);
-
-      r = i*(1 + s*cos(RAD_PER_DEG*h)/cos((60-h)*RAD_PER_DEG));
-      g = 3*i - (r+b);
-   }
-    else if(h <= 240.0)
-    {
-       h-=120;
-
-       r = i*(1-s);
-       g = i*(1 + s*cos(RAD_PER_DEG*h)/cos((60-h)*RAD_PER_DEG));
-       b = 3*i - (r+g);
-    }
-    else if(h <= 360.0)
-    {
-       h-=240;
-
-       g = i*(1-s);
-       b = i*(1 + s*cos(RAD_PER_DEG*h)/cos((60-h)*RAD_PER_DEG));
-       r = 3*i - (g+b);      
-    }
-   
-   theBuf[0] = clamp(r);
-   theBuf[1] = clamp(g);
-   theBuf[2] = clamp(b);
-   
-   return *this;
-}
-
-const ossimNormRgbVector& ossimNormRgbVector::operator =(const ossimCmyVector& cmy)
-{
-   theBuf[0] = (255 - cmy.getC())/255.0;
-   theBuf[1] = (255 - cmy.getM())/255.0;
-   theBuf[2] = (255 - cmy.getY())/255.0;
-
-   return *this;
-}
diff --git a/src/ossim/base/ossimNotify.cpp b/src/ossim/base/ossimNotify.cpp
deleted file mode 100644
index 9bcc2f5..0000000
--- a/src/ossim/base/ossimNotify.cpp
+++ /dev/null
@@ -1,421 +0,0 @@
-//*******************************************************************
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-// Contains class definition for ossimNotify.
-//*******************************************************************
-//  $Id: ossimNotify.cpp 22149 2013-02-11 21:36:10Z dburken $
-
-#include <iostream>
-#include <cstdio>
-#include <cstdarg>
-#include <stack>
-#include <cstddef>
-
-#include <ossim/base/ossimNotify.h>
-#include <OpenThreads/Mutex>
-#include <OpenThreads/ScopedLock>
-
-static std::ostream* theOssimFatalStream  = &std::cerr;
-static std::ostream* theOssimWarnStream   = &std::cerr;
-static std::ostream* theOssimInfoStream   = &std::cout;
-static std::ostream* theOssimNoticeStream = &std::cout;
-static std::ostream* theOssimDebugStream  = &std::cout;
-static std::ostream* theOssimAlwaysStream = &std::cout;
-
-static OpenThreads::Mutex theMutex;
-static ossimNotifyFlags theNotifyFlags     = ossimNotifyFlags_ALL;
-std::stack<ossimNotifyFlags> theNotifyFlagsStack;
-
-template <class charT, class traits = std::char_traits<charT> >
-class ossimNullBufferStream : public std::basic_streambuf<charT, traits>
-{
-public:
-   ossimNullBufferStream(){};
-
-
-protected:
-
-   std::streamsize xsputn(const charT * /* pChar */, std::streamsize /* n */)
-      {
-         return 0;
-      }
-
-private:
-   ossimNullBufferStream(const ossimNullBufferStream&);
-   ossimNullBufferStream& operator=(const ossimNullBufferStream&);
-};
-
-template <class charT, class traits = std::char_traits<charT> >
-class ossimLogFileBufferStream : public std::basic_streambuf<charT, traits>
-{
-public:
-   ossimLogFileBufferStream(){};
-
-   void setLogFilename(const ossimFilename& file)
-      {
-         theLogFilename = file;
-      }
-   ossimFilename getLogFilename()const
-      {
-         return theLogFilename;
-      }
-
-protected:
-   ossimFilename theLogFilename;
-   virtual int overflow(int c)
-      {
-         if(!traits::eq_int_type(c, traits::eof()))
-         {
-            tempString = tempString + ossimString(c);
-         }
-
-         return c;
-      }
-
-   virtual std::streamsize xsputn(const charT * pChar, std::streamsize n)
-      {
-         tempString = tempString + ossimString(pChar, pChar + n);
-
-         return n;
-      }
-
-   virtual int sync()
-      {
-         if(theLogFilename != "")
-         {
-            std::ofstream outFile(theLogFilename.c_str(),
-                                  std::ios::app|std::ios::out);
-            if(outFile)
-            {
-               outFile.write(tempString.c_str(), (std::streamsize)tempString.length());
-            }
-            
-            tempString = "";
-         }
-         return 0;
-      }
-
-private:
-   ossimString tempString;
-
-   ossimLogFileBufferStream(const ossimLogFileBufferStream&);
-   ossimLogFileBufferStream& operator=(const ossimLogFileBufferStream&);
-};
-
-
-class ossimNullStream : public std::ostream
-{
-public:
-   ossimNullStream() : std::ostream(&nullBufferStream){}
-   virtual ~ossimNullStream()
-      {
-         nullBufferStream.pubsync();
-      }
-
-private:
-   ossimNullBufferStream<char> nullBufferStream;
-   // Copy & assignment are undefined in iostreams
-   ossimNullStream(const ossimNullStream&);
-   ossimNullStream & operator=(const ossimNullStream&);
-};
-
-class ossimLogFileStream : public std::ostream
-{
-public:
-   ossimLogFileStream() : std::ostream(&theLogFileBufferStream){}
-   virtual ~ossimLogFileStream()
-      {
-         theLogFileBufferStream.pubsync();
-      }
-   void setLogFilename(const ossimFilename& filename)
-      {
-         theLogFileBufferStream.setLogFilename(filename);
-      }
-   ossimFilename getLogFilename()const
-      {
-         return theLogFileBufferStream.getLogFilename();
-      }
-
-private:
-   ossimLogFileBufferStream<char> theLogFileBufferStream;
-   // Copy & assignment are undefined in iostreams
-   ossimLogFileStream(const ossimLogFileStream&);
-   ossimLogFileStream & operator=(const ossimLogFileStream&);
-};
-
-static ossimNullStream    theOssimNullStream;
-static ossimLogFileStream theLogFileStream;
-
-void ossimSetDefaultNotifyHandlers()
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   theOssimFatalStream  = &std::cerr;
-   theOssimWarnStream   = &std::cout;
-   theOssimInfoStream   = &std::cout;
-   theOssimNoticeStream = &std::cout;
-   theOssimDebugStream  = &std::cout;
-   theOssimAlwaysStream = &std::cout;
-}
-
-void ossimSetNotifyStream(std::ostream* outputStream,
-                          ossimNotifyFlags whichLevelsToRedirect)
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   if(whichLevelsToRedirect&ossimNotifyFlags_FATAL)
-   {
-      theOssimFatalStream = outputStream;
-   }
-   if(whichLevelsToRedirect&ossimNotifyFlags_WARN)
-   {
-      theOssimWarnStream = outputStream;
-   }
-   if(whichLevelsToRedirect&ossimNotifyFlags_INFO)
-   {
-      theOssimInfoStream = outputStream;
-   }
-   if(whichLevelsToRedirect&ossimNotifyFlags_NOTICE)
-   {
-      theOssimNoticeStream = outputStream;
-   }
-   if(whichLevelsToRedirect&ossimNotifyFlags_DEBUG)
-   {
-      theOssimDebugStream = outputStream;
-   }
-}
-
-std::ostream* ossimGetNotifyStream(ossimNotifyLevel whichLevel)
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   std::ostream* notifyStream = &theOssimNullStream;
-
-   switch(whichLevel)
-   {
-      case ossimNotifyLevel_ALWAYS:
-      {
-         notifyStream = theOssimAlwaysStream;
-         break;
-      }
-      case ossimNotifyLevel_FATAL:
-      {
-         notifyStream = theOssimFatalStream;
-         break;
-      }
-      case ossimNotifyLevel_WARN:
-      {
-         notifyStream = theOssimWarnStream;
-         break;
-      }
-      case ossimNotifyLevel_INFO:
-      {
-         notifyStream = theOssimInfoStream;
-         break;
-      }
-      case ossimNotifyLevel_NOTICE:
-      {
-         notifyStream = theOssimNoticeStream;
-         break;
-      }
-      case ossimNotifyLevel_DEBUG:
-      {
-         notifyStream = theOssimDebugStream;
-         break;
-      }
-   }
-   return notifyStream;
-}
-
-OSSIMDLLEXPORT std::ostream& ossimNotify(ossimNotifyLevel level)
-{
-   if(ossimIsReportingEnabled())
-   {
-      theMutex.lock();
-      if(theLogFileStream.getLogFilename() != "")
-      {
-         theMutex.unlock();
-         return theLogFileStream;
-      }
-      else
-      {
-         bool reportMessageFlag = false;
-         switch(level)
-         {
-            case ossimNotifyLevel_ALWAYS:
-            {
-               reportMessageFlag = true;
-               break;
-            }
-            case ossimNotifyLevel_FATAL:
-            {
-               if(theNotifyFlags&ossimNotifyFlags_FATAL)
-               {
-                  reportMessageFlag = true;
-               }
-               break;
-            }
-            case ossimNotifyLevel_WARN:
-            {
-               if(theNotifyFlags&ossimNotifyFlags_WARN)
-               {
-                  reportMessageFlag = true;
-               }
-               break;
-            }
-            case ossimNotifyLevel_INFO:
-            {
-               if(theNotifyFlags&ossimNotifyFlags_INFO)
-               {
-                  reportMessageFlag = true;
-               }
-               break;
-            }
-            case ossimNotifyLevel_NOTICE:
-            {
-               if(theNotifyFlags&ossimNotifyFlags_NOTICE)
-               {
-                  reportMessageFlag = true;
-               }
-               break;
-            }
-            case ossimNotifyLevel_DEBUG:
-            {
-               if(theNotifyFlags&ossimNotifyFlags_DEBUG)
-               {
-                  reportMessageFlag = true;
-               }
-               break;
-            }
-         }
-         if(reportMessageFlag)
-         {
-            theMutex.unlock();
-            return *ossimGetNotifyStream(level);
-         }
-      }
-
-      theMutex.unlock();
-      
-   } // matches: if(ossimIsReportingEnabled())
-
-   return theOssimNullStream;
-}
-
-void ossimSetLogFilename(const ossimFilename& filename)
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   theLogFileStream.setLogFilename(filename);
-}
-
-/*
-const char* ossimGetLogFilename()
-{
-   return theLogFileStream.getLogFilename().c_str();
-}
-*/
-
-void ossimGetLogFilename(ossimFilename& logFile)
-{
-   logFile = theLogFileStream.getLogFilename();
-}
-
-ossimString ossimErrorV(const char *fmt, va_list args )
-{
-   char temp[2024];
-   if(fmt)
-   {
-      vsprintf(temp, fmt, args);
-   }
-   else
-   {
-      sprintf(temp,"%s", "");
-   }
-
-   return temp;
-}
-
-void ossimEnableNotify(ossimNotifyFlags flags)
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   theNotifyFlags = (ossimNotifyFlags)(theNotifyFlags | flags);
-}
-
-void ossimDisableNotify(ossimNotifyFlags flags)
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   theNotifyFlags = (ossimNotifyFlags)((ossimNotifyFlags_ALL^flags)&
-                                       theNotifyFlags);
-}
-
-void ossimSetNotifyFlag(ossimNotifyFlags notifyFlags)
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   theNotifyFlags = notifyFlags;
-}
-
-void ossimPushNotifyFlags()
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   theNotifyFlagsStack.push(theNotifyFlags);
-}
-
-void ossimPopNotifyFlags()
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   if(theNotifyFlagsStack.empty())
-   {
-      return;
-   }
-   theNotifyFlags = theNotifyFlagsStack.top();
-   theNotifyFlagsStack.pop();
-}
-
-ossimNotifyFlags ossimGetNotifyFlags()
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   return theNotifyFlags;
-}
-
-
-
-bool ossimIsReportingEnabled()
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   return  (theNotifyFlags != ossimNotifyFlags_NONE);
-}
-
-
-void ossimNotify(ossimString msg,
-                 ossimNotifyLevel notifyLevel)
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   ossimNotify(notifyLevel) << msg << "\n";
-}
-
-void ossimSetError( const char* /* className */,
-                    ossim_int32 /* error */,
-                    const char *fmtString, ...)
-{
-   // NOTE: This code has an infinite loop in it!!! (drb)
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   va_list args;
-   
-   va_start(args, fmtString);
-   ossimString result = ossimErrorV(fmtString, args );
-   va_end(args);
-   ossimNotify(ossimNotifyLevel_WARN) << result << "\n";
-}
-
-void ossimSetInfo( const char* /* className */,
-                   const char *fmtString, ...)
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   va_list args;
-
-   va_start(args, fmtString);
-   ossimString result = ossimErrorV(fmtString, args );
-   va_end(args);
-   ossimNotify(ossimNotifyLevel_WARN) << result << "\n";
-}
diff --git a/src/ossim/base/ossimObject.cpp b/src/ossim/base/ossimObject.cpp
deleted file mode 100644
index 60843e6..0000000
--- a/src/ossim/base/ossimObject.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimObject.cpp 20070 2011-09-07 18:48:35Z dburken $
-#include <ossim/base/ossimObject.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimObjectFactoryRegistry.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimConnectableObject.h>
-#include <ossim/base/ossimVisitor.h>
-
-RTTI_DEF(ossimObject, "ossimObject")
-
-ossimObject::ossimObject()
-{}
-
-ossimObject::~ossimObject()
-{
-}
-   
-ossimObject* ossimObject::dup()const
-{
-   ossimObject* result = NULL;
-   ossimKeywordlist kwl;
-
-   saveState(kwl);
-   
-   result = ossimObjectFactoryRegistry::instance()->createObject(kwl);
-
-   if(!result)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "dup() not implemented for object = "
-         << getClassName() << ". Please implement!\n";
-   }
-   
-   return result;
-}
-
-ossimString ossimObject::getShortName()const
-{
-   return getClassName();
-}
-
-ossimString ossimObject::getLongName()const
-{
-   return getClassName();
-}
-
-ossimString ossimObject::getDescription()const
-{
-   return getLongName();
-}
-
-
-ossimString ossimObject::getClassName()const
-{
-   return TYPE_NAME(this);
-}
-
-RTTItypeid ossimObject::getType()const
-{
-   return TYPE_INFO(this);
-}
-
-bool ossimObject::canCastTo(ossimObject* obj)const
-{
-   if(obj)
-   {
-      return obj->getType().can_cast(this->getType());
-   }
-   
-   return false;
-}
-
-bool ossimObject::canCastTo(const ossimString& parentClassName)const
-{
-   return (getType().find_baseclass(parentClassName.c_str()) !=
-           getType().null_type());
-}
-
-bool ossimObject::canCastTo(const RTTItypeid& id)const
-{
-   return id.can_cast(this->getType());
-}
-
-bool ossimObject::saveState(ossimKeywordlist& kwl,
-                            const char* prefix)const
-{
-   kwl.add(prefix,
-           ossimKeywordNames::TYPE_KW,
-           getClassName(),
-           true);
-
-   return true;
-}
-
-bool ossimObject::isEqualTo(const ossimObject& obj, ossimCompareType /* compareType */)const
-{
-   return (getClassName() == obj.getClassName());
-}
-
-void ossimObject::accept(ossimVisitor& visitor)
-{
-   if(!visitor.stopTraversal()&&!visitor.hasVisited(this))
-   {
-      visitor.visit(this);
-   }
-}
-
-bool ossimObject::loadState(const ossimKeywordlist&, const char*)
-{
-   return true;
-}
-
-std::ostream& ossimObject::print(std::ostream& out) const
-{
-   return out;
-}
-
-std::ostream& operator<<(std::ostream& out, const ossimObject& obj)
-{
-   return obj.print(out);
-}
diff --git a/src/ossim/base/ossimObjectFactoryRegistry.cpp b/src/ossim/base/ossimObjectFactoryRegistry.cpp
deleted file mode 100644
index 19612e2..0000000
--- a/src/ossim/base/ossimObjectFactoryRegistry.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimObjectFactoryRegistry.cpp 15766 2009-10-20 12:37:09Z gpotts $
-
-#include <ossim/base/ossimObjectFactoryRegistry.h>
-
-RTTI_DEF1(ossimObjectFactoryRegistry, "ossimObjectFactoryRegistry", ossimObject);
-#include <ossim/base/ossimObjectFactoryRegistry.h>
-#include <ossim/base/ossimObjectFactory.h>
-#include <ossim/base/ossimBaseObjectFactory.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimRefPtr.h>
-using namespace std;
-
-
-ossimObjectFactoryRegistry::ossimObjectFactoryRegistry()
-{
-}
-
-ossimObjectFactoryRegistry::~ossimObjectFactoryRegistry()
-{
-}
-
-ossimObjectFactoryRegistry* ossimObjectFactoryRegistry::instance()
-{
-   static ossimObjectFactoryRegistry sharedInstance;
-   
-   return &sharedInstance;
-}
-
-#if 0
-bool ossimObjectFactoryRegistry::addFactory(ossimObjectFactory* factory)
-{
-   return registerFactory(factory);
-}
-
-bool ossimObjectFactoryRegistry::registerFactory(ossimObjectFactory* factory)
-{
-   if(factory)
-   {
-      if(!findFactory(factory))
-      {
-         theFactoryList.push_back(factory);
-         return true;
-      }
-      else
-      {
-         return true;
-      }
-   }
-   
-   return false;
-}
-
-void ossimObjectFactoryRegistry::unregisterFactory(ossimObjectFactory* factory)
-{
-   vector<ossimObjectFactory*>::iterator iter = theFactoryList.begin();
-
-   while(iter != theFactoryList.end())
-   {
-      if( (*iter) == factory)
-      {
-         theFactoryList.erase(iter);
-         return;
-      }
-      ++iter;
-   }
-}
-
-ossimObject* ossimObjectFactoryRegistry::createObject(const ossimString& name)const
-{
-   ossimObject* result = NULL;
-   unsigned long index = 0;
-   
-   while((index < theFactoryList.size()) &&(!result))
-   {
-      result = theFactoryList[index]->createObject(name);
-      ++index;
-   }
-   return result;
-}
-
-ossimObject* ossimObjectFactoryRegistry::createObject(const ossimKeywordlist& kwl,
-                                                      const char* prefix)const
-{
-   ossimObject* result = NULL;
-   unsigned long index = 0;
-
-   while((index < theFactoryList.size()) &&(!result))
-   {
-      result = theFactoryList[index]->createObject(kwl,
-                                                   prefix);
-      ++index;
-   }
-
-   return result;
-}
-
-void ossimObjectFactoryRegistry::getTypeNameList(std::vector<ossimString>& typeList)const
-{
-   vector<ossimString> result;
-   vector<ossimObjectFactory*>::const_iterator iter = theFactoryList.begin();
-
-   while(iter != theFactoryList.end())
-   {
-      result.clear();
-      (*iter)->getTypeNameList(result);
-
-      typeList.insert(typeList.end(),
-                      result.begin(),
-                      result.end());
-      ++iter;
-   }
-}
-
-ossimObjectFactory* ossimObjectFactoryRegistry::findFactory(ossimObjectFactory* factory)const
-{
-   vector<ossimObjectFactory*>::const_iterator iter = theFactoryList.begin();
-
-   while(iter != theFactoryList.end())
-   {
-      if( (*iter) == factory)
-      {
-         return factory;
-      }
-      ++iter;
-   }
-
-   return NULL;
-}
-#endif
-
-void ossimObjectFactoryRegistry::getTypeNameList(std::vector<ossimString>& typeList,
-                                                 const ossimString& baseType)const
-{
-   vector<ossimString> allTypeList;
-
-   getTypeNameList(allTypeList);
-
-   if(baseType == "")
-   {
-      typeList.insert(typeList.end(),
-                      allTypeList.begin(),
-                      allTypeList.end());
-   }
-   else
-   {
-      int i = 0;
-      ossimRefPtr<ossimObject> obj;
-      for(i = 0; i < (int)allTypeList.size(); ++i)
-      {
-         obj = createObject(allTypeList[i]);
-         if(obj.valid())
-         {
-            if(obj->canCastTo(baseType))
-            {
-               typeList.push_back(allTypeList[i]);
-            }
-         }
-      }
-   }
-}
-
-
-void* ossimObjectFactoryRegistryGetInstance()
-{
-  return ossimObjectFactoryRegistry::instance();
-}
diff --git a/src/ossim/base/ossimObservationSet.cpp b/src/ossim/base/ossimObservationSet.cpp
deleted file mode 100644
index c83bba0..0000000
--- a/src/ossim/base/ossimObservationSet.cpp
+++ /dev/null
@@ -1,228 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  David Hicks
-//
-// Description: Storage class for observations.
-//----------------------------------------------------------------------------
-#include <iostream>
-#include <iomanip>
-
-#include <ossim/base/ossimObservationSet.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-
-static ossimTrace traceExec  ("ossimObservationSet:exec");
-static ossimTrace traceDebug ("ossimObservationSet:debug");
-
-
-
-ossimObservationSet::ossimObservationSet() :
-theNumAdjPar(0),
-theNumMeas(0),
-theNumPartials(0)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
-      << "DEBUG: ossimObservationSet(): returning..." << std::endl;
-}
-
-
-ossimObservationSet::~ossimObservationSet()
-{
-   for (ossim_uint32 i=0; i<theImageHandlers.size(); ++i)
-      theImageHandlers[i] = 0;
-   // for (int i=0; i<theObs.size(); ++i)
-   //    theObs[i] = 0;
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
-      << "DEBUG: ~ossimObservationSet(): returning..." << std::endl;
-}
-
-
-bool 
-ossimObservationSet::addObservation(ossimRefPtr<ossimPointObservation> obs)
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         <<"\n ossimObservationSet::addObservation: "<<obs->ID()<<endl;
-   }
-
-   theObs.push_back(obs);
-   theNumMeas += obs->numMeas();
-
-
-   // Update image list
-   for (ossim_uint32 i=0; i<obs->numImages(); ++i)
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)<<"  i="<<i<<endl;
-      }
-
-      bool found = false;
-
-      // Check for image already in list
-      for (ossim_uint32 j=0; j<theImageFiles.size(); ++j)
-      {
-         if (theImageFiles[j] == obs->imageFile(i))
-         {
-            found = true;
-            theImageIndex.push_back(j);
-            int nAdjPar = obs->numPars(i);
-            theNumPartials += nAdjPar;
-         }
-      }
-
-      // If not found yet, add to image list
-      if (!found)
-      {
-         theImageFiles.push_back(obs->imageFile(i));
-
-         // Geometry
-         ossimRefPtr<ossimImageHandler> ih;
-         ih = ossimImageHandlerRegistry::instance()->open(obs->imageFile(i));        
-         theImageHandlers.push_back(ih);
-
-         theImageIndex.push_back(theImageHandlers.size()-1);
-
-         // Handle ossimAdjustableParameterInterface
-         ossimAdjustableParameterInterface* adjParIface = 
-            obs->getImageGeom(i)->getAdjustableParameterInterface();
-         if (!adjParIface)
-         {
-            return false;
-         }
-         else
-         {
-            if (traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG)<<"  Found new image... "<<i<<endl;
-            }
-            int nAdjPar = adjParIface->getNumberOfAdjustableParameters();
-            theNumAdjPar   += nAdjPar;
-            theNumPartials += nAdjPar;
-            theNumAdjParams.push_back(nAdjPar);
-         }
-      }
-   }
-   
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)<<"    theNumAdjPar   = "<<theNumAdjPar<<endl;
-      ossimNotify(ossimNotifyLevel_DEBUG)<<"    theNumPartials = "<<theNumPartials<<endl;
-   }
-
-   return true;
-}
-
-
-ossimImageGeometry* ossimObservationSet::getImageGeom(const int index)
-{
-   return theImageHandlers[index]->getImageGeometry().get();
-}
-
-
-void ossimObservationSet::setImageGeom(const int index, ossimImageGeometry* geom)
-{
-   theImageHandlers[index]->setImageGeometry(geom);
-}
-
-
-bool ossimObservationSet::evaluate(NEWMAT::Matrix& measResiduals,
-                                   NEWMAT::Matrix& objPartials,
-                                   NEWMAT::Matrix& parPartials)
-{
-
-   // Dimension output matrices
-   measResiduals = NEWMAT::Matrix(numMeas(), 2);
-   objPartials   = NEWMAT::Matrix(numMeas()*3, 2);
-   parPartials   = NEWMAT::Matrix(theNumPartials, 2);
-
-   int img = 1;
-   int cParIndex = 1;
-   int cObjIndex = 1;
-   for (ossim_uint32 cObs=0; cObs<numObs(); ++cObs)
-   {
-      int numMeasPerObs = theObs[cObs]->numMeas();
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)<<"\n cObs= "<<cObs;
-      }
-
-      for (int cImg=0; cImg<numMeasPerObs; ++cImg)
-      {
-         NEWMAT::Matrix cResid(1, 2);
-         theObs[cObs]->getResiduals(cImg, cResid);
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               <<"\n   cImg, img, cObjIndex, cParIndex, cResid: "
-               <<cImg<<" "<<img<<" "<<cObjIndex<<" "<<cParIndex<<" "<<cResid;
-         }
-         measResiduals.Row(img) = cResid;
-         img++;
-
-         NEWMAT::Matrix cObjPar(3, 2);
-         theObs[cObs]->getObjSpacePartials(cImg, cObjPar);
-         objPartials.SubMatrix(cObjIndex,cObjIndex+2,1,2) << cObjPar;
-         cObjIndex += 3;
-
-         int numPar = theObs[cObs]->numPars(cImg);
-         NEWMAT::Matrix cParamPar(numPar, 2);
-         theObs[cObs]->getParameterPartials(cImg, cParamPar);
-         parPartials.SubMatrix(cParIndex,cParIndex+numPar-1,1,2) << cParamPar;
-         cParIndex += numPar;
-      }
-   }
-
-   return true;
-}
-
-
-std::ostream& ossimObservationSet::print(std::ostream& os) const
-{
-   int idx = 0;
-
-   os<<"\nImages:\n";
-   ossim_uint32 spaces = 0;
-   for (ossim_uint32 i=0; i<numImages(); ++i)
-   {
-      if (theImageFiles[i].size() > spaces)
-         spaces = theImageFiles[i].size();
-   }
-   for (ossim_uint32 i=0; i<numImages(); ++i)
-   {
-      int nAdj = theNumAdjParams[i];
-      os << " "<<i+1<<": " << setw(spaces) << theImageFiles[i] << "   nPar: "<< setw(2) << nAdj <<endl;
-   }
-
-   os<<"\nObservations:";
-   for (ossim_uint32 cObs=0; cObs<numObs(); ++cObs)
-   {
-      os << "\n " << theObs[cObs]->ID();
-      if (ossim::isnan(theObs[cObs]->getScore()) == false)
-      {
-         os << std::setiosflags(std::ios::fixed) << std::setprecision(2);
-         os << "\t" << theObs[cObs]->getScore();
-      }
-      else
-      {
-         os << "\t" << "nan";
-      }
-      os << "\t";
-      theObs[cObs]->getGroundPoint().print(os);
-
-      int numMeasPerObs = theObs[cObs]->numMeas();
-      for (int cImg=0; cImg<numMeasPerObs; ++cImg)
-      {
-         os << "\n\t\t" << theImageIndex[idx]+1;
-         os << "\t";
-         theObs[cObs]->getMeasurement(cImg).print(os,1);
-         idx++;
-      }
-   }
-   return os;
-}
diff --git a/src/ossim/base/ossimPolyArea2d.cpp b/src/ossim/base/ossimPolyArea2d.cpp
deleted file mode 100644
index 7af6e2c..0000000
--- a/src/ossim/base/ossimPolyArea2d.cpp
+++ /dev/null
@@ -1,1622 +0,0 @@
-//---
-// License:  See top level LICENSE.txt file.
-//
-// $Id: ossimPolyArea2d.cpp 17195 2010-04-23 17:32:18Z dburken $
-//---
-#include <ossim/base/ossimPolyArea2d.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/kbool/booleng.h>
-#include <ossim/kbool/graphlst.h>
-#include <ossim/kbool/_dl_itr.h>
-#include <ossim/base/ossimString.h>
-
-std::ostream& operator <<(std::ostream& out, const ossimPolyArea2d& rhs)
-{
-   if(rhs.isEmpty()) return out;
-   if(!rhs.theEngine->StartPolygonGet()) return out;
-   ossim_uint32 pointCount = 0;
-   while ( rhs.theEngine->nextPolygon() )
-   {
-      kbEdgeType edgeType = rhs.theEngine->GetPolygonPointEdgeType();
-      if(edgeType != KB_FALSE_EDGE)
-      {
-         if(edgeType == KB_OUTSIDE_EDGE)
-         {
-            std::cout << "POLYGON\n";
-         }
-         else
-         {
-            std::cout << "HOLE \n";
-         }
-         pointCount = 0;
-         while ( rhs.theEngine->PolygonHasMorePoints() )
-         {
-            std::cout << "( " << rhs.theEngine->GetPolygonXPoint() << ", "
-                      << rhs.theEngine->GetPolygonYPoint() << " )" << std::endl;
-            ++pointCount;
-         }
-
-         if(!pointCount)
-         {
-            std::cout << "<EMPTY>" << std::endl;
-         }
-      }
-   }
-   
-   return out;
-}
-
-ossimPolyArea2d::ossimPolyArea2d(const ossimPolyArea2d& rhs)
-   :theEngine(0)
-   
-{
-   if(rhs.theEngine)
-   {
-      theEngine = new Bool_Engine(*rhs.theEngine);
-   }
-   else
-   {
-      clearEngine();
-   }
-}
-ossimPolyArea2d::ossimPolyArea2d(const ossimDpt& p1,
-                                 const ossimDpt& p2,
-                                 const ossimDpt& p3,
-                                 const ossimDpt& p4)
-   :theEngine(0)
-{
-   ossimPolygon temp(p1,p2,p3,p4);
-   *this = temp;
-}
-ossimPolyArea2d::~ossimPolyArea2d()
-{
-   if(theEngine)
-   {
-      delete theEngine;
-      theEngine = 0;
-   }
-}
-
-const ossimPolyArea2d& ossimPolyArea2d::operator =(const ossimPolyArea2d& rhs)
-{
-   if(this == &rhs)
-   {
-      return *this;
-   }
-   if(rhs.theEngine)
-   {
-      if(theEngine)
-      {
-         delete theEngine;
-         theEngine = new Bool_Engine(*rhs.theEngine);
-      }
-   }
-   else
-   {
-      clearEngine();
-   }
-
-   return *this;
-}
-
-
-const ossimPolyArea2d& ossimPolyArea2d::operator =(const ossimPolygon& polygon)
-{
-   clearEngine();
-   if(polygon.getNumberOfVertices() < 1)
-   {
-      return *this;
-   }
-   return (*this) = polygon.getVertexList();
-}
-
-const ossimPolyArea2d& ossimPolyArea2d::operator =(const ossimIrect& rect)
-{
-//    clearEngine();
-
-//    theEngine->StartPolygonAdd(GROUP_A);
-
-   std::vector<ossimIpt> polygon;
-   polygon.push_back(rect.ul());
-   polygon.push_back(rect.ur());
-   polygon.push_back(rect.lr());
-   polygon.push_back(rect.ll());
-
-   return (*this = polygon);
-//    return *this;
-}
-
-const ossimPolyArea2d& ossimPolyArea2d::operator =(const ossimDrect& rect)
-{
-   std::vector<ossimIpt> polygon;
-   polygon.push_back(rect.ul());
-   polygon.push_back(rect.ur());
-   polygon.push_back(rect.lr());
-   polygon.push_back(rect.ll());
-
-   return (*this = polygon);
-}
-
-const ossimPolyArea2d& ossimPolyArea2d::operator =(const vector<ossimDpt>& polygon)
-{
-   clearEngine();
-   if(polygon.size() <1)
-   {
-      return *this;
-   }
-   ossimPolygon polygonTemp(polygon);
-   polygonTemp.checkOrdering();
-   if(polygonTemp.getOrdering() == OSSIM_COUNTERCLOCKWISE_ORDER)
-   {
-      polygonTemp.reverseOrder();
-   }
-   ossim_uint32 idx = 0;
-   ossim_uint32 maxIdx = polygonTemp.getNumberOfVertices();
-
-   theEngine->StartPolygonAdd(GROUP_A);
-   for(idx = 0; idx < maxIdx; ++idx)
-   {
-      theEngine->AddPoint(polygonTemp[idx].x,
-                          polygonTemp[idx].y);
-   }
-   theEngine->EndPolygonAdd();
-   
-   return *this;
-}
-
-const ossimPolyArea2d& ossimPolyArea2d::operator =(const vector<ossimGpt>& polygon)
-{
-   ossim_uint32 idx = 0;
-   ossim_uint32 maxIdx = (ossim_uint32)polygon.size();
-   clearEngine();
-   
-   theEngine->StartPolygonAdd(GROUP_A);
-   for(idx = 0; idx < maxIdx; ++idx)
-   {
-      theEngine->AddPoint(polygon[idx].lond(),
-                          polygon[idx].latd());
-   }
-   theEngine->EndPolygonAdd();
-   
-   return *this;
-}
-
-const ossimPolyArea2d& ossimPolyArea2d::operator =(const vector<ossimIpt>& polygon)
-{
-   ossimPolygon polygonTemp(polygon);
-   polygonTemp.checkOrdering();
-   if(polygonTemp.getOrdering() == OSSIM_COUNTERCLOCKWISE_ORDER)
-   {
-      polygonTemp.reverseOrder();
-   }
-   ossim_uint32 idx = 0;
-   ossim_uint32 maxIdx = polygonTemp.getNumberOfVertices();
-   clearEngine();
-
-   theEngine->StartPolygonAdd(GROUP_A);
-   for(idx = 0; idx < maxIdx; ++idx)
-   {
-      theEngine->AddPoint(polygonTemp[idx].x,
-                          polygonTemp[idx].y);
-   }
-   theEngine->EndPolygonAdd();
-
-   return *this;
-}
-
-
-ossimPolyArea2d ossimPolyArea2d::operator &(const ossimPolyArea2d& rhs)const
-{
-   if(isEmpty()||rhs.isEmpty())
-   {
-      return ossimPolyArea2d();
-   }
-   ossimPolyArea2d result(*this);
-   performOperation(result, rhs, BOOL_AND);
-   return result;
-}
-
-ossimPolyArea2d ossimPolyArea2d::operator +(const ossimPolyArea2d& rhs)const
-{
-   ossimPolyArea2d result(*this);
-   if(isEmpty())
-   {
-      return rhs;
-   }
-   if(rhs.isEmpty())
-   {
-      return result;
-   }
-   performOperation(result, rhs, BOOL_OR);
-   return result;
-}
-
-ossimPolyArea2d ossimPolyArea2d::operator ^(const ossimPolyArea2d& rhs)const
-{
-   if(isEmpty()) return rhs;
-   ossimPolyArea2d result(*this);
-   if(rhs.isEmpty()) return result;
-   performOperation(result, rhs, BOOL_EXOR);
-   return result;
-}
-
-ossimPolyArea2d ossimPolyArea2d::operator -(const ossimPolyArea2d& rhs)const
-{
-   ossimPolyArea2d result(*this);
-   if(rhs.isEmpty())
-   {
-      return result;
-   }
-   if(isEmpty())
-   {
-      return ossimPolyArea2d();
-   }
-   performOperation(result, rhs, BOOL_A_SUB_B);
-   return result;
-}
-
-const ossimPolyArea2d& ossimPolyArea2d::operator &=(const ossimPolyArea2d& rhs)
-{
-   if(isEmpty()||rhs.isEmpty())
-   {
-      clearPolygons();
-      return *this;
-   }
-   performOperation(rhs, BOOL_AND);
-   return *this;
-}
-
-const ossimPolyArea2d& ossimPolyArea2d::operator ^=(const ossimPolyArea2d& rhs)
-{
-   if(&rhs==this)
-   {
-      clearPolygons();
-      return *this;
-   }
-   if(isEmpty())
-   {
-      *this = rhs;
-   }
-   if(rhs.isEmpty())
-   {
-      return *this;
-   }
-   performOperation(rhs, BOOL_EXOR);
-   return *this;
-}
-
-const ossimPolyArea2d& ossimPolyArea2d::operator +=(const ossimPolyArea2d& rhs)
-{
-   if(isEmpty())
-   {
-      *this = rhs;
-      return *this;
-   }
-   if(rhs.isEmpty())
-   {
-      return *this;
-   }
-   performOperation(rhs, BOOL_OR);
-   return *this;
-}
-
-const ossimPolyArea2d& ossimPolyArea2d::operator -=(const ossimPolyArea2d& rhs)
-{
-   if(this == &rhs)
-   {
-      clearPolygons();
-      return *this;
-   }
-   if(isEmpty())
-   {
-      return *this;
-   }
-   if(rhs.isEmpty())
-   {
-      return *this;
-   }
-   performOperation(rhs, BOOL_A_SUB_B);
-   return *this;
-}
-
-void ossimPolyArea2d::add(const ossimPolyArea2d& rhs)
-{
-   if(!rhs.theEngine->StartPolygonGet())
-   {
-      return;
-   }
-
-   while ( rhs.theEngine->nextPolygon() )
-   {
-      theEngine->StartPolygonAdd(GROUP_A);
-      
-      while ( rhs.theEngine->PolygonHasMorePoints() )
-      {
-         theEngine->AddPoint(rhs.theEngine->GetPolygonXPoint(),
-                             rhs.theEngine->GetPolygonYPoint());
-      }
-      theEngine->EndPolygonAdd();
-   }
-}
-
-void ossimPolyArea2d::clearPolygons()
-{
-   clearEngine();
-}
-
-void ossimPolyArea2d::performOperation(ossimPolyArea2d& result,
-                                       const ossimPolyArea2d& rhs,
-                                       BOOL_OP operation)const
-{
-   rhs.theEngine->StartPolygonGet();
-   while ( rhs.theEngine->nextPolygon() )
-   {
-      result.theEngine->StartPolygonAdd(GROUP_B);
-      while ( rhs.theEngine->PolygonHasMorePoints() )
-      {
-         result.theEngine->AddPoint(rhs.theEngine->GetPolygonXPoint(),
-                                    rhs.theEngine->GetPolygonYPoint());
-      }
-      result.theEngine->EndPolygonAdd();
-   }
-   result.theEngine->Do_Operation(operation);
-}
-
-void  ossimPolyArea2d::performOperation(const ossimPolyArea2d& rhs,
-                                        BOOL_OP operation)
-{
-   rhs.theEngine->StartPolygonGet();
-   while ( rhs.theEngine->nextPolygon() )
-   {
-      theEngine->StartPolygonAdd(GROUP_B);
-      while ( rhs.theEngine->PolygonHasMorePoints() )
-      {
-         theEngine->AddPoint(rhs.theEngine->GetPolygonXPoint(),
-                                    rhs.theEngine->GetPolygonYPoint());
-      }
-      theEngine->EndPolygonAdd();
-   }
-   theEngine->Do_Operation(operation);
-}
-
-void ossimPolyArea2d::clearEngine()
-{
-   if(theEngine)
-   {
-      delete theEngine;
-   }
-   theEngine = new Bool_Engine();
-   armBoolEng();
-}
-
-
-void ossimPolyArea2d::armBoolEng()
-{
-    // set some global vals to arm the boolean engine
-    double DGRID = 1000000000;  // round coordinate X or Y value in calculations to this
-    double MARGE = 0.000000001;   // snap with in this range points to lines in the intersection routines
-                          // should always be > DGRID  a  MARGE >= 10*DGRID is oke
-                          // this is also used to remove small segments and to decide when
-                          // two segments are in line.
-    double CORRECTIONFACTOR = 500.0;  // correct the polygons by this number
-    double CORRECTIONABER   = 1.0;    // the accuracy for the rounded shapes used in correction
-    double ROUNDFACTOR      = 1.5;    // when will we round the correction shape to a circle
-    double SMOOTHABER       = 10.0;   // accuracy when smoothing a polygon
-    double MAXLINEMERGE     = 1000.0; // leave as is, segments of this length in smoothen
- 
-
-    // DGRID is only meant to make fractional parts of input data which 
-    // are doubles, part of the integers used in vertexes within the boolean algorithm.
-    // Within the algorithm all input data is multiplied with DGRID
-    
-    // space for extra intersection inside the boolean algorithms
-    // only change this if there are problems
-    int GRID = 1;
-
-    theEngine->SetMarge( MARGE );
-    theEngine->SetGrid( GRID );
-    theEngine->SetDGrid( DGRID );
-    theEngine->SetCorrectionFactor( CORRECTIONFACTOR );
-    theEngine->SetCorrectionAber( CORRECTIONABER );
-    theEngine->SetSmoothAber( SMOOTHABER );
-    theEngine->SetMaxlinemerge( MAXLINEMERGE );
-    theEngine->SetRoundfactor( ROUNDFACTOR );
-    theEngine->SetLinkHoles(false);
-    theEngine->SetOrientationEntryMode(true);
-}
-
-bool ossimPolyArea2d::getVisiblePolygons(vector<ossimPolygon>& polyList)const
-{
-   bool foundPolygons = false;
-   if(isEmpty()) return false;
-   
-   theEngine->StartPolygonGet();
-   while ( theEngine->nextPolygon() )
-   {
-      kbEdgeType edgeType = theEngine->GetPolygonPointEdgeType();
-      if(edgeType == KB_OUTSIDE_EDGE)
-      {
-         polyList.push_back(ossimPolygon());
-         ossimPolygon& polygon = polyList[polyList.size()-1];
-         while ( theEngine->PolygonHasMorePoints() )
-         {
-            if(polygon.getNumberOfVertices())
-            {
-               ossimDpt pt(theEngine->GetPolygonXPoint(),
-                           theEngine->GetPolygonYPoint());
-               if(pt!=polygon[0])
-               {
-                  polygon.addPoint(pt);
-                  foundPolygons = true;
-               }
-            }
-            else
-            {
-               polygon.addPoint(theEngine->GetPolygonXPoint(),
-                                theEngine->GetPolygonYPoint());
-               foundPolygons = true;
-            }
-         }
-      }
-   }
-
-   return foundPolygons;
-}
-
-bool ossimPolyArea2d::getPolygonHoles(vector<ossimPolygon>& polyList, bool includeFalsePolygons)const
-{
-   bool foundPolygons = false;
-   if(isEmpty()) return false;
-   
-   theEngine->StartPolygonGet();
-   while ( theEngine->nextPolygon() )
-   {
-      kbEdgeType edgeType = theEngine->GetPolygonPointEdgeType();
-      if((edgeType == KB_INSIDE_EDGE)||
-         ( (edgeType == KB_FALSE_EDGE)&&includeFalsePolygons))
-      {
-         foundPolygons = true;
-         polyList.push_back(ossimPolygon());
-         ossimPolygon& polygon = polyList[polyList.size()-1];
-         while ( theEngine->PolygonHasMorePoints() )
-         {
-            polygon.addPoint(theEngine->GetPolygonXPoint(),
-                             theEngine->GetPolygonYPoint());
-         }
-      }
-   }
-
-   return foundPolygons;
-}
-
-bool ossimPolyArea2d::isEmpty()const
-{
-   if(!theEngine) return true;
-   if(!theEngine->graphlist()) return true;
-   
-   return theEngine->graphlist()->empty();
-}
-
-bool ossimPolyArea2d::isPointWithin(const ossimDpt& point, double epsilonBall)const
-{
-   return isPointWithin(point.x, point.y, epsilonBall);
-}
-
-bool ossimPolyArea2d::isPointWithin(double x, double y,double epsilonBall)const
-{
-   if(epsilonBall < theEngine->GetMarge())
-   {
-      epsilonBall = theEngine->GetMarge()*10;
-   }
-   return !((*this)&ossimDrect(x,
-                               y,
-                               x + epsilonBall,
-                               y + epsilonBall)).isEmpty();
-}
-
-void ossimPolyArea2d::getBoundingRect(ossimDrect& rect)
-{
-   rect.makeNan();
-   bool firstPointFlag = false;
-   double minX = 0.0;
-   double minY = 0.0;
-   double maxX = 0.0;
-   double maxY = 0.0;
-   if(!isEmpty())
-   {
-      theEngine->StartPolygonGet();
-      while ( theEngine->nextPolygon() )
-      {
-         kbEdgeType edgeType = theEngine->GetPolygonPointEdgeType();
-         if((edgeType != KB_FALSE_EDGE)&&
-            (edgeType != KB_INSIDE_EDGE))
-         {
-            while ( theEngine->PolygonHasMorePoints() )
-            {
-               double x = theEngine->GetPolygonXPoint();
-               double y = theEngine->GetPolygonYPoint();
-
-               if(!firstPointFlag)
-               {
-                  minX = x;
-                  minY = y;
-                  maxX = x;
-                  maxY = y;
-                  firstPointFlag = true;
-               }
-               else
-               {
-                  minX = ossim::min(x, minX);
-                  maxX = ossim::max(x, maxX);
-                  minY = ossim::min(y, minY);
-                  maxY = ossim::max(y, maxY);
-               }
-            }
-         }
-      }
-   }
-
-   if(firstPointFlag)
-   {
-      rect = ossimDrect(minX, minY, maxX, maxY);
-   }
-}
-
-bool ossimPolyArea2d::saveState(ossimKeywordlist& kwl,
-                                   const char* prefix)const
-{
-   kwl.add(prefix,
-           ossimKeywordNames::TYPE_KW,
-           "ossimPolyArea2d",
-           true);
-   ossim_uint32 polygonCount = 0;
-   theEngine->StartPolygonGet();
-   while (theEngine->nextPolygon() )
-   {
-      kbEdgeType edgeType = theEngine->GetPolygonPointEdgeType();
-      if(edgeType != KB_FALSE_EDGE)
-      {
-         ossimString newPolygonPrefix = ossimString(prefix)+"polygon" + ossimString::toString(polygonCount) + ".";
-         ossimString pointPrefix = newPolygonPrefix + "point";
-         ossim_uint32 pointCount = 0;
-         while ( theEngine->PolygonHasMorePoints() )
-         {
-            kwl.add(pointPrefix + ossimString::toString(pointCount),
-                    ossimDpt(theEngine->GetPolygonXPoint(),
-                             theEngine->GetPolygonYPoint()).toString(),
-                    true);
-            ++pointCount;
-         }
-         kwl.add(newPolygonPrefix,
-                 "num_points",
-                 pointCount,
-                 true);
-         
-         ++polygonCount;
-      }
-   }
-   
-   kwl.add(prefix,
-           "num_polygons",
-           polygonCount,
-           true);
-   
-   return true;
-}
-
-bool ossimPolyArea2d::loadState(const ossimKeywordlist& kwl,
-                                   const char* prefix)
-{
-   clearEngine();
-
-   const char* numPolygons = kwl.find("num_polygons");
-   if(!numPolygons)
-   {
-      return false;
-   }
-
-   ossim_uint32 maxSearch      = 1000;
-   ossim_uint32 numberOfPolygonsFound = 0;
-   ossim_uint32 polyIdx               = 0;
-   ossim_uint32 lastPolyIdx           = 0;
-   ossim_uint32 maxPolygons           = ossimString(numPolygons).toUInt32();
-   
-   while((numberOfPolygonsFound < maxPolygons)&&
-         ((polyIdx - lastPolyIdx) < maxSearch))
-   {
-      ossimString newPolygonPrefix = ossimString(prefix)+"polygon" + ossimString::toString(polyIdx) + ".";
-      const char* num_points = kwl.find(newPolygonPrefix,
-                                        "num_points");
-
-      theEngine->StartPolygonAdd(GROUP_A);
-      if(num_points)
-      {
-         ossim_int32 maxPoints = ossimString(num_points).toInt32();
-         ossim_uint32 pointIdx = 0;
-         ossim_uint32 lastPointIdx = 0;
-         ossim_uint32 numberOfPointsFound = 0;
-         if(maxPoints < 0) maxPoints = 0;
-
-         while((numberOfPointsFound < (ossim_uint32)maxPoints)&&
-               ((pointIdx - lastPointIdx) < maxSearch))
-         {
-            ossimString pointPrefix = newPolygonPrefix + "point" + ossimString::toString(pointIdx);
-            const char* point = kwl.find(pointPrefix);
-
-            if(point)
-            {
-               ossimDpt dpt;
-
-               dpt.toPoint(point);
-               theEngine->AddPoint(dpt.x,
-                                   dpt.y);
-               ++numberOfPointsFound;
-               lastPointIdx = pointIdx;
-            }
-            ++pointIdx;
-         }
-         ++numberOfPolygonsFound;
-         lastPolyIdx = polyIdx;
-      }
-      theEngine->EndPolygonAdd();
-      
-      ++polyIdx;
-   }
-         
-   return true;
-}
-
-
-#if 0
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimPolyArea2d.cpp 17195 2010-04-23 17:32:18Z dburken $
-#include <list>
-#include <sstream>
-using namespace std;
-
-#include <ossim/base/ossimPolyArea2d.h>
-#include <ossim/base/ossimKeywordNames.h>
-
-ostream& operator<<(ostream& out, const ossimPolyArea2d& data)
-{
-   if(!data.thePolygon)
-   {
-      return out;
-   }
-   int cnt;
-   PLINE *cntr;
-   POLYAREA * curpa;
-   
-   cnt = 0, curpa = data.thePolygon; 
-   do
-   {
-      cnt++;
-   } while ( (curpa = curpa->f) != data.thePolygon);
-   
-   curpa = data.thePolygon; 
-   do
-   {
-      for ( cntr = curpa->contours, cnt = 0; cntr != NULL; cntr = cntr->next, cnt++ )
-      {}
-      out << cnt << endl;
-      
-      for ( cntr = curpa->contours; cntr != NULL; cntr = cntr->next )
-      {
-         VNODE *cur;
-         
-         out << cntr->Count << endl;
-         cur = &cntr->head;
-         do
-         {
-            out << cur->point[0] << " " <<  cur->point[1] << endl;
-         } while ( ( cur = cur->next ) != &cntr->head );
-      }     
-   }while ( (curpa = curpa->f) != data.thePolygon);
-   
-   return out;
-}
-
-
-
-ossimPolyArea2d::ossimPolyArea2d()
-   :thePolygon(NULL)
-{  
-}
-
-ossimPolyArea2d::ossimPolyArea2d(POLYAREA* polygon,
-                               bool    copyPolygonFlag)
-   :thePolygon(NULL)
-{
-   if(copyPolygonFlag)
-   {
-      poly_Copy0(&thePolygon, polygon);
-   }
-   else
-   {
-      thePolygon = polygon;
-   }
-}
-
-ossimPolyArea2d::ossimPolyArea2d(const ossimPolyArea2d& rhs)
-   :thePolygon(NULL)
-{
-   poly_Copy0(&thePolygon, rhs.thePolygon);
-}
-
-ossimPolyArea2d::ossimPolyArea2d(const vector<ossimDpt>& polygon)
-   :thePolygon(NULL)
-{
-   if(polygon.size() > 0)
-   {
-      PLINE  *poly = NULL;
-      Vector v;
-      v[0] = polygon[0].x;
-      v[1] = polygon[0].y;
-      v[2] = 0;
-      poly = poly_NewContour(v);
-      for(long index = 1; index < (long)polygon.size(); ++index)
-      {
-
-         v[0] = polygon[index].x;
-         v[1] = polygon[index].y;
-         v[2] = 0.0;
-         
-         poly_InclVertex(poly->head.prev,
-                         poly_CreateNode(v));
-         
-      }
-      poly_PreContour(poly, TRUE);
-      
-      if ( (poly->Flags & PLF_ORIENT) != PLF_DIR)
-      {
-         poly_InvContour(poly);
-      }
-      thePolygon = poly_Create();
-      poly_InclContour(thePolygon, poly);
-//       if(!poly_Valid(thePolygon))
-//       {
-//          if(thePolygon)
-//          {
-//             poly_Free(&thePolygon);
-//             thePolygon = NULL;
-//          }
-//       }
-   }   
-}
-
-ossimPolyArea2d::ossimPolyArea2d(const vector<ossimGpt>& polygon)
-   :thePolygon(NULL)
-{
-   if(polygon.size() > 0)
-   {
-      PLINE  *poly = NULL;
-      Vector v;
-      v[0] = polygon[0].lon;
-      v[1] = polygon[0].lat;
-      v[2] = 0;
-      poly = poly_NewContour(v);
-      for(long index = 1; index < (long)polygon.size(); ++index)
-      {
-
-         v[0] = polygon[index].lon;
-         v[1] = polygon[index].lat;
-         v[2] = 0.0;
-         
-         poly_InclVertex(poly->head.prev,
-                         poly_CreateNode(v));
-         
-      }
-      poly_PreContour(poly, TRUE);
-      
-      if ( (poly->Flags & PLF_ORIENT) != PLF_DIR)
-      {
-         poly_InvContour(poly);
-      }
-      thePolygon = poly_Create();
-      poly_InclContour(thePolygon, poly);
-//       if(!poly_Valid(thePolygon))
-//       {
-//          if(thePolygon)
-//          {
-//             poly_Free(&thePolygon);
-//             thePolygon = NULL;
-//          }
-//       }
-   }   
-}
-
-ossimPolyArea2d::ossimPolyArea2d(const ossimDpt& p1,
-                                 const ossimDpt& p2,
-                                 const ossimDpt& p3,
-                                 const ossimDpt& p4)
-   :thePolygon(NULL)
-{
-   PLINE  *poly = NULL;
-   Vector v;
-   v[0] = p1.x;
-   v[1] = p1.y;
-   v[2] = 0;
-   poly = poly_NewContour(v);
-   poly_InclVertex(poly->head.prev,
-                   poly_CreateNode(v));
-   v[0] = p2.x;
-   v[1] = p2.y;
-   v[2] = 0;
-   poly_InclVertex(poly->head.prev,
-                   poly_CreateNode(v));
-   v[0] = p3.x;
-   v[1] = p3.y;
-   v[2] = 0;
-   poly_InclVertex(poly->head.prev,
-                   poly_CreateNode(v));
-   v[0] = p4.x;
-   v[1] = p4.y;
-   v[2] = 0;
-   poly_InclVertex(poly->head.prev,
-                   poly_CreateNode(v));
-   
-   poly_PreContour(poly, TRUE);
-   
-   if ( (poly->Flags & PLF_ORIENT) != PLF_DIR)
-   {
-      poly_InvContour(poly);
-   }
-   thePolygon = poly_Create();
-   poly_InclContour(thePolygon, poly);
-//    if(!poly_Valid(thePolygon))
-//    {
-//       if(thePolygon)
-//       {
-//          poly_Free(&thePolygon);
-//          thePolygon = NULL;
-//       }
-//    }   
-}
-
-
-ossimPolyArea2d::ossimPolyArea2d(ossimDpt* polygon,
-                               long number)
-   :thePolygon(NULL)
-{
-   if(number > 0)
-   {
-      PLINE  *poly = NULL;
-      Vector v;
-      v[0] = polygon[0].x;
-      v[1] = polygon[0].y;
-      v[2] = 0;
-      poly = poly_NewContour(v);
-      for(long index = 1; index < number; ++index)
-      {
-
-         v[0] = polygon[index].x;
-         v[1] = polygon[index].y;
-         v[2] = 0.0;
-         
-         poly_InclVertex(poly->head.prev,
-                         poly_CreateNode(v));
-         
-      }
-      poly_PreContour(poly, TRUE);
-      
-      if ( (poly->Flags & PLF_ORIENT) != PLF_DIR)
-      {
-         poly_InvContour(poly);
-      }
-      thePolygon = poly_Create();
-      poly_InclContour(thePolygon, poly);
-//       if(!poly_Valid(thePolygon))
-//       {
-//          poly_Free(&thePolygon);
-//          thePolygon = NULL;
-//       }
-   }
-}
-
-ossimPolyArea2d::ossimPolyArea2d(const ossimPolygon& polygon)
-   :thePolygon(NULL)
-{
-   if(polygon.getVertexCount() > 0)
-   {
-      PLINE  *poly = NULL;
-      Vector v;
-      v[0] = polygon[0].x;
-      v[1] = polygon[0].y;
-      v[2] = 0;
-      poly = poly_NewContour(v);
-      for(long index = 1; index < (long)polygon.getVertexCount(); ++index)
-      {
-
-         v[0] = polygon[index].x;
-         v[1] = polygon[index].y;
-         v[2] = 0.0;
-         
-         poly_InclVertex(poly->head.prev,
-                         poly_CreateNode(v));
-         
-      }
-      poly_PreContour(poly, TRUE);
-      
-      // make sure that its clockwise
-      if ( (poly->Flags & PLF_ORIENT) != PLF_DIR)
-      {
-         poly_InvContour(poly);
-      }
-      thePolygon = poly_Create();
-      poly_InclContour(thePolygon, poly);
-      if(!poly_Valid(thePolygon))
-      {
-//         if(thePolygon)
-//         {
-//            poly_Free(&thePolygon);
-//            thePolygon = NULL;
-//         }
-      }
-   }   
-}
-
-ossimPolyArea2d::~ossimPolyArea2d()
-{
-   if(thePolygon)
-   {
-      poly_Free(&thePolygon);
-      thePolygon = NULL;
-   }
-}
-const ossimPolyArea2d& ossimPolyArea2d::operator *=(const ossimDpt& scale)
-{
-   if(!thePolygon) return *this;
-   
-   PLINE *cntr     = (PLINE*)NULL;
-   POLYAREA *curpa = (POLYAREA*)NULL;
-   
-   curpa           = thePolygon;
-
-   do{
-      for ( cntr = curpa->contours; cntr != NULL; cntr = cntr->next )
-      {
-         VNODE *cur = &cntr->head;
-         double xmin, ymin;
-         double xmax, ymax;
-         xmin = xmax = cur->point[0];
-         ymin = ymax = cur->point[1];
-         do
-         {
-            cur->point[0] *= scale.x;
-            cur->point[1] *= scale.y;
-            xmin = std::min(cur->point[0], xmin);
-            xmax = std::max(cur->point[0], xmax);
-            ymin = std::min(cur->point[1], ymin);
-            ymax = std::max(cur->point[1], ymax);
-         } while ( ( cur = cur->next ) != &cntr->head );
-      }
-   }
-   while( (curpa = curpa->f) != thePolygon);
-   
-   return *this;
-}
-
-ossimPolyArea2d ossimPolyArea2d::operator *(const ossimDpt& scale)const
-{
-   if(!thePolygon) return *this;
-
-   ossimPolyArea2d result(*this);
-   PLINE *cntr     = (PLINE*)NULL;
-   POLYAREA *curpa = (POLYAREA*)NULL;
-   
-   curpa           = result.thePolygon;
-
-   do{
-      for ( cntr = curpa->contours; cntr != NULL; cntr = cntr->next )
-      {
-         VNODE *cur = &cntr->head;
-         double xmin, ymin;
-         double xmax, ymax;
-         xmin = xmax = cur->point[0];
-         ymin = ymax = cur->point[1];
-         
-         do
-         {
-            cur->point[0] *= scale.x;
-            cur->point[1] *= scale.y;
-            xmin = std::min(cur->point[0], xmin);
-            xmax = std::max(cur->point[0], xmax);
-            ymin = std::min(cur->point[1], ymin);
-            ymax = std::max(cur->point[1], ymax);
-         } while ( ( cur = cur->next ) != &cntr->head );
-
-         cntr->xmin = xmin;
-         cntr->ymin = ymin;
-         cntr->xmax = xmax;
-         cntr->ymax = ymax;
-      }
-   }
-   while( (curpa = curpa->f) != result.thePolygon);
-   
-   return result;
-}
-
-const ossimPolyArea2d& ossimPolyArea2d::operator *=(double scale)
-{
-   return ((*this)*=ossimDpt(scale, scale));
-}
-
-ossimPolyArea2d ossimPolyArea2d::operator *(double scale)const
-{
-   return ((*this)*ossimDpt(scale, scale));
-}
-
-/*!
- * Assignment operator.  Allows you to assign
- * or copy one polygon to another.
- */
-const ossimPolyArea2d& ossimPolyArea2d::operator =(const ossimPolyArea2d& rhs)
-{
-   if(this != &rhs)
-   {
-      if(thePolygon)
-      {
-         poly_Free(&thePolygon);
-         thePolygon = NULL;
-      }
-      if(rhs.thePolygon)
-      {
-         poly_Copy0(&thePolygon, rhs.thePolygon);
-      }
-   }
-
-   return *this;
-}
-
-const ossimPolyArea2d& ossimPolyArea2d::operator =(const ossimIrect& rect)
-{
-   if(thePolygon)
-   {
-      poly_Free(&thePolygon);
-      thePolygon = NULL;
-   }
-   
-   PLINE  *poly = NULL;
-   Vector v;
-   v[0] = rect.ul().x;
-   v[1] = rect.ul().y;
-   v[2] = 0;
-   poly = poly_NewContour(v);
-   poly_InclVertex(poly->head.prev,
-                   poly_CreateNode(v));
-   v[0] = rect.ur().x;
-   v[1] = rect.ur().y;
-   v[2] = 0;
-   poly_InclVertex(poly->head.prev,
-                   poly_CreateNode(v));
-   v[0] = rect.lr().x;
-   v[1] = rect.lr().y;
-   v[2] = 0;
-   poly_InclVertex(poly->head.prev,
-                   poly_CreateNode(v));
-   v[0] = rect.ll().x;
-   v[1] = rect.ll().y;
-   v[2] = 0;
-   poly_InclVertex(poly->head.prev,
-                   poly_CreateNode(v));
-   
-   poly_PreContour(poly, TRUE);
-   
-   if ( (poly->Flags & PLF_ORIENT) != PLF_DIR)
-   {
-      poly_InvContour(poly);
-   }
-   thePolygon = poly_Create();
-   poly_InclContour(thePolygon, poly);
-//    if(!poly_Valid(thePolygon))
-//    {
-//       if(thePolygon)
-//       {
-//          poly_Free(&thePolygon);
-//          thePolygon = NULL;
-//       }
-//    }
-
-   return *this;
-}
-
-const ossimPolyArea2d& ossimPolyArea2d::operator =(const ossimDrect& rect)
-{
-   if(thePolygon)
-   {
-      poly_Free(&thePolygon);
-      thePolygon = NULL;
-   }
-   
-   PLINE  *poly = NULL;
-   Vector v;
-   v[0] = rect.ul().x;
-   v[1] = rect.ul().y;
-   v[2] = 0;
-   poly = poly_NewContour(v);
-   poly_InclVertex(poly->head.prev,
-                   poly_CreateNode(v));
-   v[0] = rect.ur().x;
-   v[1] = rect.ur().y;
-   v[2] = 0;
-   poly_InclVertex(poly->head.prev,
-                   poly_CreateNode(v));
-   v[0] = rect.lr().x;
-   v[1] = rect.lr().y;
-   v[2] = 0;
-   poly_InclVertex(poly->head.prev,
-                   poly_CreateNode(v));
-   v[0] = rect.ll().x;
-   v[1] = rect.ll().y;
-   v[2] = 0;
-   poly_InclVertex(poly->head.prev,
-                   poly_CreateNode(v));
-   
-   poly_PreContour(poly, TRUE);
-   
-   if ( (poly->Flags & PLF_ORIENT) != PLF_DIR)
-   {
-      poly_InvContour(poly);
-   }
-   thePolygon = poly_Create();
-   poly_InclContour(thePolygon, poly);
-//    if(!poly_Valid(thePolygon))
-//    {
-//       if(thePolygon)
-//       {
-//          poly_Free(&thePolygon);
-//          thePolygon = NULL;
-//       }
-//    }
-   
-   return *this;
-}
-
-ossimPolyArea2d ossimPolyArea2d::operator -(const ossimPolyArea2d& rhs)const
-{
-   if(this == &rhs)
-   {
-      return ossimPolyArea2d();
-   }
-   POLYAREA* result=NULL;
-
-   if (poly_Boolean(this->thePolygon,
-                    rhs.thePolygon,
-                    &result,
-                    PBO_SUB) == err_ok) 
-   {
-      return ossimPolyArea2d(result, false);
-   }
-
-   // if there were errors then we will just return an
-   // empty polygon.
-   //
-   return ossimPolyArea2d();
-}
-
-ossimPolyArea2d& ossimPolyArea2d::operator -=(const ossimPolyArea2d& rhs)
-{
-   if(this == &rhs)
-   {
-      poly_Free(&thePolygon);
-      thePolygon = NULL;
-   }
-   else
-   {
-      POLYAREA* result=NULL;
-      
-      if (poly_Boolean(this->thePolygon,
-                       rhs.thePolygon,
-                       &result,
-                       PBO_SUB) == err_ok) 
-      {
-         poly_Free(&thePolygon);
-         thePolygon = result;
-      }
-      else
-      {
-         // errors so make it empty
-         poly_Free(&thePolygon);
-         thePolygon = NULL;
-      }
-   }
-
-   return *this;
-}
-
-ossimPolyArea2d ossimPolyArea2d::operator +(const ossimPolyArea2d& rhs)const
-{
-   if(this == &rhs)
-   {
-      return *this;
-   }
-   POLYAREA* result=NULL;
-
-   if (poly_Boolean(this->thePolygon,
-                    rhs.thePolygon,
-                    &result,
-                    PBO_UNITE) == err_ok) 
-   {
-      return ossimPolyArea2d(result, false);
-   }
-
-   // if there were errors then we will just return an
-   // empty polygon.
-   //
-   return ossimPolyArea2d();
-}
-
-ossimPolyArea2d& ossimPolyArea2d::operator +=(const ossimPolyArea2d& rhs)
-{
-   if(this == &rhs)
-   {
-      poly_Free(&thePolygon);
-      thePolygon = NULL;
-   }
-   else
-   {
-      POLYAREA* result=NULL;
-      if (poly_Boolean(this->thePolygon,
-                       rhs.thePolygon,
-                       &result,
-                       PBO_UNITE) == err_ok) 
-      {
-         poly_Free(&thePolygon);
-         thePolygon = result;
-      }
-      else
-      {
-         // errors so make it empty
-         poly_Free(&thePolygon);
-         thePolygon = NULL;
-      }
-   }
-
-   return *this;
-}
-
-ossimPolyArea2d ossimPolyArea2d::operator &(const ossimPolyArea2d& rhs)const
-{
-   if(this == &rhs)
-   {
-      return ossimPolyArea2d(*this);
-   }
-   if(thePolygon&&rhs.thePolygon)
-   {
-      POLYAREA* result=NULL;
-      
-      if (poly_Boolean(this->thePolygon,
-                       rhs.thePolygon,
-                       &result,
-                       PBO_ISECT) == err_ok) 
-      {
-         return ossimPolyArea2d(result, false);
-      }
-   }
-   
-   // if there were errors then we will just return an
-   // empty polygon.
-   //
-   return ossimPolyArea2d();
-}
-
-ossimPolyArea2d& ossimPolyArea2d::operator &=(const ossimPolyArea2d& rhs)
-{
-   if(this != &rhs)
-   {
-      POLYAREA* result=NULL;
-      if (poly_Boolean(this->thePolygon,
-                       rhs.thePolygon,
-                       &result,
-                       PBO_ISECT) == err_ok) 
-      {
-         poly_Free(&thePolygon);
-         thePolygon = result;
-      }
-      else
-      {
-         // errors so make it empty
-         poly_Free(&thePolygon);
-         thePolygon = NULL;
-      }
-   }
-
-   return *this;
-}
-
-ossimPolyArea2d ossimPolyArea2d::operator ^(const ossimPolyArea2d& rhs)const
-{
-   if(this != &rhs)
-   {
-      POLYAREA* result=NULL;
-      
-      if (poly_Boolean(this->thePolygon,
-                       rhs.thePolygon,
-                       &result,
-                       PBO_XOR) == err_ok) 
-      {
-         return ossimPolyArea2d(result, false);
-      }
-      
-   }
-   
-   return ossimPolyArea2d();
-}
-
-ossimPolyArea2d& ossimPolyArea2d::operator ^=(const ossimPolyArea2d& rhs)
-{
-   if(this == &rhs)
-   {
-      poly_Free(&thePolygon);
-      thePolygon = NULL;
-   }
-   else
-   {
-      POLYAREA* result=NULL;
-      if (poly_Boolean(this->thePolygon,
-                       rhs.thePolygon,
-                       &result,
-                       PBO_XOR) == err_ok) 
-      {
-         poly_Free(&thePolygon);
-         thePolygon = result;
-      }
-      else
-      {
-         // errors so make it empty
-         poly_Free(&thePolygon);
-         thePolygon = NULL;
-      }
-   }
-   
-   return *this;
-}
-
-bool ossimPolyArea2d::isPointWithin(const ossimDpt& point)const
-{
-   if(!thePolygon)
-   {
-      return false;
-   }
-   Vector v;
-   v[0] = point.x;
-   v[1] = point.y;
-   v[2] = 0;
-   
-   return (poly_CheckInside(thePolygon, v)==TRUE);
-  
-}
-
-bool ossimPolyArea2d::isPointWithin(double x, double y)const
-{
-   if(!thePolygon)
-   {
-      return false;
-   }
-   Vector v;
-   v[0] = x;
-   v[1] = y;
-   v[2] = 0;
-   
-   return (poly_CheckInside(thePolygon, v)==TRUE);
-}
-
-void ossimPolyArea2d::getBoundingRect(ossimDrect& rect)
-{
-   if(thePolygon)
-   {
-      PLINE*    cntr  = NULL;
-      POLYAREA* curpa = NULL;
-      
-      curpa = thePolygon;
-      rect = ossimDrect(curpa->contours->xmin,
-                        curpa->contours->ymin,
-                        curpa->contours->xmax,
-                        curpa->contours->ymax);
-      do
-      {        
-         for ( cntr = curpa->contours->next; cntr != NULL; cntr = cntr->next )
-         {
-            ossimDrect rect2 = ossimDrect(curpa->contours->xmin,
-                                          curpa->contours->ymin,
-                                          curpa->contours->xmax,
-                                          curpa->contours->ymax);
-            if(rect2.width() != 1 &&
-               rect2.height() != 1)
-            {
-               rect = rect.combine(rect2);
-            }
-         }     
-      }while ( (curpa = curpa->f) != thePolygon);
-   }
-   else
-   {
-      rect = ossimDrect(0,0,0,0);
-   }
-}
-
-bool ossimPolyArea2d::saveState(ossimKeywordlist& kwl,
-                               const char* prefix)const
-{
-   kwl.add(prefix,
-           ossimKeywordNames::TYPE_KW,
-           "ossimPolyArea2d",
-           true);
-           
-   if(!thePolygon)
-   {
-      return true;
-   }
-   int cnt;
-   PLINE *cntr;
-   POLYAREA * curpa;
-   
-   cnt = 0, curpa = thePolygon; 
-   do
-   {
-      cnt++;
-   } while ( (curpa = curpa->f) != thePolygon);
-   
-   curpa = thePolygon; 
-   do
-   {
-      cnt = 1;
-      for ( cntr = curpa->contours; cntr != NULL; cntr = cntr->next )
-      {
-         VNODE *cur;
-         ossimString newPrefix = prefix;
-         newPrefix+="contour";
-         newPrefix += ossimString::toString(cnt);
-         newPrefix += ".";
-         kwl.add(newPrefix.c_str(),
-                 "flags",
-                 (int)cntr->Flags,
-                 true);
-         
-         cur = &cntr->head;
-         int pointCount = 1;
-         do
-         {
-            ossimString pointString = "point";
-            pointString += ossimString::toString(pointCount);
-            ossimString points;
-            points = ossimString::toString(cur->point[0]);
-            points += " ";
-            points += ossimString::toString(cur->point[1]);
-            kwl.add(newPrefix.c_str(),
-                    pointString,
-                    points.c_str(),
-                    true);
-            ++pointCount;
-         } while ( ( cur = cur->next ) != &cntr->head );
-         ++cnt;
-      }     
-   }while ( (curpa = curpa->f) != thePolygon);
-   
-   return true;
-}
-
-bool ossimPolyArea2d::loadState(const ossimKeywordlist& kwl,
-                                const char* prefix)
-{
-   
-   vector<ossimString> contourList = kwl.getSubstringKeyList(ossimString(prefix) + "contour[0-9]+\\.");
-   if(thePolygon)
-   {
-      poly_Free(&thePolygon);
-      thePolygon = NULL;
-   }
-   if(contourList.size() > 0)
-   {
-      thePolygon = poly_Create();
-      vector<ossimString>::iterator currentContour = contourList.begin();
-      
-      Vector v;
-      PLINE  *poly = NULL;
-      ossim_uint32 currentContourIndex = 0;
-      while(currentContour != contourList.end())
-      {
-         ossimString copyPrefix = *currentContour;
-         ossim_int32 contourFlags = 0;
-         
-         const char* lookupFlags = kwl.find((*currentContour).c_str(),
-                                             "flags");
-         if(lookupFlags)
-         {
-            contourFlags = ossimString(lookupFlags).toInt32();
-         }
-         ossim_uint32 numberOfPoints = kwl.getNumberOfSubstringKeys(copyPrefix + "point[0-9]");
-         ossim_uint32 numberOfMatches = 0;
-         ossim_uint32 currentPoint = 0;
-         while(numberOfMatches < numberOfPoints)
-         {
-            ossimString x,y;
-            ossimString pointString = "point";
-            pointString += ossimString::toString(currentPoint);
-            const char* pointLookup = kwl.find((*currentContour).c_str(),
-                                               pointString);
-            if(pointLookup)
-            {
-               istringstream s(pointLookup);
-
-               s >> x >> y;
-               v[0] = x.toDouble();
-               v[1] = y.toDouble();
-               v[2] = 0;
-               // initialize the poly if we are on the
-               // first match point else we just add it.
-               if(!numberOfMatches)
-               {
-                  poly = poly_NewContour(v);
-               }
-               else
-               {
-                  poly_InclVertex(poly->head.prev,
-                                  poly_CreateNode(v));
-               }
-               
-               ++numberOfMatches;
-            }
-            ++currentPoint;
-         }
-         poly->Flags = contourFlags;
-         poly_PreContour(poly, TRUE);
-         if ( (poly->Flags & PLF_ORIENT) !=
-              (currentContourIndex ? PLF_INV : PLF_DIR) )
-         {
-            poly_InvContour(poly);
-         }
-         if(!poly_InclContour(thePolygon, poly))
-         {
-            poly_DelContour(&poly);
-         }
-         poly = NULL;
-         ++currentContour;
-         ++currentContourIndex;
-      }
-   }
-   return true;
-}
-
-bool ossimPolyArea2d::getAllVisiblePolygons(vector<ossimPolygon>& polyList)const
-{
-   if(!thePolygon) return false;
-   if(!poly_Valid(thePolygon))
-   {
-      return false;
-   }
-   polyList.clear();
-   POLYAREA* curpa = thePolygon;
-   PLINE*    cntr;
-   int index = 0;
-   do
-   {
-      for ( cntr = curpa->contours; cntr != NULL; cntr = cntr->next )
-      {
-         if(cntr->Flags & PLF_DIR)
-         {
-            polyList.push_back(ossimPolygon());
-            VNODE* cur = &cntr->head;
-            do
-            {   
-               polyList[index].addPoint(cur->point[0],
-                                        cur->point[1]);
-               
-            } while ( ( cur = cur->next ) != &cntr->head );
-            ++index;
-         }
-      }
-   }while ( (curpa = curpa->f) != thePolygon);
-
-   return (polyList.size()>0);
-}
-#endif
diff --git a/src/ossim/base/ossimPolyLine.cpp b/src/ossim/base/ossimPolyLine.cpp
deleted file mode 100644
index 1c8fdbb..0000000
--- a/src/ossim/base/ossimPolyLine.cpp
+++ /dev/null
@@ -1,565 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// AUTHOR: Garrett Potts (gpotts at imagelinks.com)
-//
-//*****************************************************************************
-//  $Id: ossimPolyLine.cpp 15927 2009-11-16 17:30:08Z dburken $
-//
-#include <ossim/base/ossimPolyLine.h>
-#include <ossim/base/ossimCommon.h>
-#include <algorithm>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimLine.h>
-#include <ossim/base/ossimPolygon.h>
-#include <sstream>
-#include <iterator>
-using namespace std;
-
-static const char* NUMBER_VERTICES_KW = "number_vertices";
-
-ossimPolyLine::ossimPolyLine(const vector<ossimIpt>& polyLine)
-   :theVertexList(polyLine.size()),
-    theAttributeList(),
-    theCurrentVertex(0)
-{
-   // Assign std::vector<ossimIpt> list to std::vector<ossimDpt> theVertexList.
-   for (std::vector<ossimIpt>::size_type i = 0; i < polyLine.size(); ++i)
-   {
-      theVertexList[i] = polyLine[i];
-   }
-}
-
-ossimPolyLine::ossimPolyLine(const vector<ossimDpt>& polyLine)
-   :theCurrentVertex(0)
-{
-   theVertexList = polyLine;
-}
-
-//*****************************************************************************
-//  CONSTRUCTOR: ossimPolyLine(int numVertices, const ossimDpt* vertex_array)
-//  
-//*****************************************************************************
-ossimPolyLine::ossimPolyLine(int numVertices, const ossimDpt* v)
-   : theCurrentVertex(0)
-{
-   theVertexList.insert(theVertexList.begin(),
-                        v, v+numVertices);
-}
-
-//*****************************************************************************
-//  COPY CONSTRUCTOR: ossimPolyLine(ossimPolyLine)
-//  
-//*****************************************************************************
-ossimPolyLine::ossimPolyLine(const ossimPolyLine& polyLine)
-   :theCurrentVertex(0)
-{
-   *this = polyLine;
-}
-
-ossimPolyLine::ossimPolyLine(ossimDpt v1,
-                             ossimDpt v2,
-                             ossimDpt v3,
-                             ossimDpt v4)
-   : theVertexList(4),
-     theCurrentVertex(0)
-{
-   theVertexList[0] = v1;
-   theVertexList[1] = v2;
-   theVertexList[2] = v3;
-   theVertexList[3] = v4;
-}
-
-ossimPolyLine::ossimPolyLine(const ossimIrect& rect)
-   : theVertexList(4),
-     theCurrentVertex(0)
-{
-   theVertexList[0] = rect.ul();
-   theVertexList[1] = rect.ur();
-   theVertexList[2] = rect.lr();
-   theVertexList[3] = rect.ll();
-}
-
-ossimPolyLine::ossimPolyLine(const ossimDrect& rect)
-   : theVertexList(4),
-     theCurrentVertex(0)
-{
-   theVertexList[0] = rect.ul();
-   theVertexList[1] = rect.ur();
-   theVertexList[2] = rect.lr();
-   theVertexList[3] = rect.ll();
-}
-
-ossimPolyLine::ossimPolyLine(const ossimPolygon& polygon)
-   :theVertexList(polygon.getNumberOfVertices()+1),
-    theCurrentVertex(0)
-{
-   ossim_uint32 n = polygon.getNumberOfVertices();
-   
-   if(n)
-   {
-      for(ossim_uint32 i = 0; i < n; ++i)
-      {
-         theVertexList[i] = polygon[i];
-      }
-
-      theVertexList[n] = polygon[n-1];
-   }
-   else
-   {
-      theVertexList.clear();
-   }
-}
-
-//*****************************************************************************
-//  DESTRUCTOR: ~ossimPolyLine
-//  
-//*****************************************************************************
-ossimPolyLine::~ossimPolyLine()
-{
-}
-
-void ossimPolyLine::roundToIntegerBounds(bool compress)
-{
-  int i = 0;
-  for(i = 0; i < (int)theVertexList.size(); ++i)
-    {
-      theVertexList[i] = ossimIpt(theVertexList[i]);
-    }
-  if(compress&&theVertexList.size())
-    {
-      vector<ossimDpt> polyLine;
-      
-      polyLine.push_back(theVertexList[0]);
-      ossimDpt testPt = theVertexList[0];
-      for(i=1; i < (int)theVertexList.size(); ++i)
-	{
-	  if(testPt!=theVertexList[i])
-	    {
-	      testPt = theVertexList[i];
-	      polyLine.push_back(testPt);
-	    }
-	}
-      theVertexList    = polyLine;
-      theCurrentVertex = 0;
-    }
-}
-
-bool ossimPolyLine::hasNans()const
-{
-   int upper = (int)theVertexList.size();
-   int i = 0;
-
-   for(i = 0; i < upper; ++i)
-   {
-      if(theVertexList[i].hasNans())
-      {
-         return true;
-      }
-   }
-
-   return false;
-}
-
-void ossimPolyLine::getIntegerBounds(ossim_int32& minX,
-                                     ossim_int32& minY,
-                                     ossim_int32& maxX,
-                                     ossim_int32& maxY)const
-{
-   ossim_int32 npoly = (ossim_int32)theVertexList.size();
-   int i = 0;
-   
-   if(npoly)
-   {
-      minX = (ossim_int32)floor(theVertexList[0].x);
-      maxX = (ossim_int32)ceil(theVertexList[0].x);
-      minY = (ossim_int32)floor(theVertexList[0].y);
-      maxY = (ossim_int32)ceil(theVertexList[0].y);
-      
-      for(i =1; i < npoly; ++i)
-      {
-         minX = std::min((ossim_int32)floor(theVertexList[i].x),
-                         (ossim_int32)minX);
-         maxX = std::max((ossim_int32)ceil(theVertexList[i].x),
-                         (ossim_int32)maxX);
-         minY = std::min((ossim_int32)floor(theVertexList[i].y),
-                         (ossim_int32)minY);
-         maxY = std::max((ossim_int32)ceil(theVertexList[i].y),
-                         (ossim_int32)maxY);
-      }
-   }
-   else
-   {
-      minX = OSSIM_INT_NAN;
-      minY = OSSIM_INT_NAN;
-      maxX = OSSIM_INT_NAN;
-      maxY = OSSIM_INT_NAN;
-   }
-}
-
-void ossimPolyLine::getBounds(double& minX,
-                              double& minY,
-                              double& maxX,
-                              double& maxY)const
-{
-   ossim_int32 npoly = (ossim_int32)theVertexList.size();
-   
-   if(npoly)
-   {
-      int i = 0;
-      minX = theVertexList[0].x;
-      maxX = theVertexList[0].x;
-      minY = theVertexList[0].y;
-      maxY = theVertexList[0].y;
-      
-      for(i =1; i < npoly; ++i)
-      {
-         minX = std::min(theVertexList[i].x, minX);
-         maxX = std::max(theVertexList[i].x, maxX);
-         minY = std::min(theVertexList[i].y, minY);
-         maxY = std::max(theVertexList[i].y, maxY);
-      }
-   }
-   else
-   {
-      minX = ossim::nan();
-      minY = ossim::nan();
-      maxX = ossim::nan();
-      maxY = ossim::nan();
-   }
-}
-
-bool ossimPolyLine::isWithin(const ossimDrect& rect)const
-{
-   if(theVertexList.size() == 1)
-   {
-      return rect.pointWithin(theVertexList[0]);
-   }
-   else if(theVertexList.size() > 1)
-   {
-      for(ossim_uint32 i = 0; i < (theVertexList.size() - 1); ++i)
-      {
-         ossimDpt p1 = theVertexList[i];
-         ossimDpt p2 = theVertexList[i+1];
-         
-         if(rect.clip(p1, p2))
-         {
-            return true;
-         }
-      }
-   }
-
-   return false;
-}
-
-
-bool ossimPolyLine::clipToRect(vector<ossimPolyLine>& result,
-                              const ossimDrect& rect)const
-{
-   result.clear();
-   
-   if(theVertexList.size() <1) return false;
-
-   ossimPolyLine currentPoly;
-
-   if(theVertexList.size() == 1)
-   {
-      rect.pointWithin(theVertexList[0]);
-      currentPoly.addPoint(theVertexList[0]);
-      result.push_back(currentPoly);
-   }
-   else
-   {
-      ossimDpt pt1 = theVertexList[0];
-      ossimDpt pt2 = theVertexList[1];
-      ossim_uint32 i = 1;
-      
-      while(i < theVertexList.size())
-      {
-         
-         bool p1Inside = rect.pointWithin(pt1);
-         bool p2Inside = rect.pointWithin(pt2);
-
-         if(p1Inside&&p2Inside) // both inside so save the first
-         {
-            currentPoly.addPoint(pt1);
-            pt1 = pt2;            
-         }
-         // going from inside to outside
-         else if(p1Inside&&
-                 !p2Inside)
-         {
-            currentPoly.addPoint(pt1);
-            ossimDpt save = pt2;
-            if(rect.clip(pt1, pt2))
-            {
-               currentPoly.addPoint(pt2);
-               result.push_back(currentPoly);
-
-               currentPoly.clear();
-            }
-            pt2  = save;
-            pt1  = save;
-         }// going outside to the inside
-         else if(!p1Inside&&
-                 p2Inside)
-         {            
-            if(rect.clip(pt1, pt2))
-            {
-               currentPoly.addPoint(pt1);
-            }
-            pt1 = pt2;
-           
-         }
-         else // both outside must do a clip to see if crosses rect
-         {
-            ossimDpt p1 = pt1;
-            ossimDpt p2 = pt2;
-
-            if(rect.clip(p1, p2))
-            {
-               currentPoly.addPoint(p1);
-               currentPoly.addPoint(p2);
-            }
-            pt1 = pt2;
-         }
-         ++i;
-         
-         if(i < theVertexList.size())
-         {
-            pt2 = theVertexList[i];
-         }            
-      }
-      if(rect.pointWithin(pt2))
-      {
-         currentPoly.addPoint(pt2);
-      }
-   }
-
-   if(currentPoly.getNumberOfVertices() > 0)
-   {
-      result.push_back(currentPoly);
-   }
-   
-   return (result.size()>0);
-}   
-
-bool ossimPolyLine::isPointWithin(const ossimDpt& point) const
-{
-   if(theVertexList.size() == 1)
-   {
-      return (point == theVertexList[0]);
-   }
-   else
-   {
-      for(ossim_uint32 i = 1; i < theVertexList.size(); ++i)
-      {
-         if(ossimLine(theVertexList[i-1],
-                      theVertexList[i]).isPointWithin(point))
-         {
-            return true;
-         }
-      }
-   }
-   
-   return false;
-}
-
-bool ossimPolyLine::vertex(int index, ossimDpt& tbd_vertex) const 
-{
-   if((index >= (int)theVertexList.size()) ||
-      (index < 0))
-   {
-      return false;
-   }
-
-   tbd_vertex = theVertexList[index];
-   theCurrentVertex = index;
-
-   return true;
-}
-
-bool ossimPolyLine::nextVertex(ossimDpt& tbd_vertex) const 
-{
-   ++theCurrentVertex;
-   if(theCurrentVertex >= (ossim_int32)theVertexList.size())
-   {
-      return false;
-   }
-   tbd_vertex = theVertexList[theCurrentVertex];
-   
-   return true;
-}
-
-
-const ossimPolyLine&  ossimPolyLine::operator=(const ossimPolygon& polygon)
-{
-   theCurrentVertex = 0;
-   ossim_uint32 n = polygon.getNumberOfVertices();
-   
-   if(n)
-   {
-      theVertexList.resize(n+1);
-      
-      for(ossim_uint32 i = 0; i < n; ++i)
-      {
-         theVertexList[i] = polygon[i];
-      }
-      
-      theVertexList[n] = polygon[n-1];
-   }
-   else
-   {
-      theVertexList.clear();
-   }
-
-   return *this;
-}
-
-const ossimPolyLine&  ossimPolyLine::operator=(const ossimPolyLine& polyLine)
-{
-   theVertexList    = polyLine.theVertexList;
-   theCurrentVertex = polyLine.theCurrentVertex;
-   theAttributeList = polyLine.theAttributeList;
-   
-   return *this;
-}
-
-const ossimPolyLine& ossimPolyLine::operator= (const vector<ossimDpt>& vertexList)
-{
-   theVertexList    = vertexList;
-   theCurrentVertex = 0;
-   
-   return *this;
-}
-
-const ossimPolyLine& ossimPolyLine::operator= (const vector<ossimIpt>& vertexList)
-{
-   theVertexList.resize(vertexList.size());
-
-   // Assign std::vector<ossimIpt> list to std::vector<ossimDpt> theVertexList.
-   for (std::vector<ossimIpt>::size_type i = 0; i < vertexList.size(); ++i)
-   {
-      theVertexList[i] = vertexList[i];
-   }
-   
-   theCurrentVertex = 0;
-   
-   return *this;
-}
-
-//*****************************************************************************
-//  METHOD: operator==()
-//  
-//*****************************************************************************
-bool ossimPolyLine::operator==(const ossimPolyLine& polyLine) const
-{
-   if( (theVertexList.size() != polyLine.theVertexList.size()))
-   {
-      return false;
-   }
-   if(!theVertexList.size() && polyLine.theVertexList.size())
-   {
-      return true;
-   }
-
-   return (theVertexList == polyLine.theVertexList);
-}
-
-const ossimPolyLine& ossimPolyLine::operator *=(const ossimDpt& scale)
-{
-   ossim_uint32 upper = (ossim_uint32)theVertexList.size();
-   ossim_uint32 i = 0;
-   
-   for(i = 0; i < upper; ++i)
-   {
-      theVertexList[i].x*=scale.x;
-      theVertexList[i].y*=scale.y;
-   }
-   
-   return *this;
-}
-
-ossimPolyLine ossimPolyLine::operator *(const ossimDpt& scale)const
-{
-   ossimPolyLine result(*this);
-
-   ossim_uint32 i = 0;
-   ossim_uint32 upper = (ossim_uint32)theVertexList.size();
-   for(i = 0; i < upper; ++i)
-   {
-      result.theVertexList[i].x*=scale.x;
-      result.theVertexList[i].y*=scale.y;
-   }
-
-   return result;
-}
-
-
-void ossimPolyLine::reverseOrder()
-{
-   std::reverse(theVertexList.begin(), theVertexList.end());   
-}
-
-//*****************************************************************************
-//  METHOD: ossimPolyLine::print(ostream)
-//  
-//*****************************************************************************
-void ossimPolyLine::print(ostream& os) const
-{
-   copy(theVertexList.begin(),
-        theVertexList.end(),
-        ostream_iterator<ossimDpt>(os, "\n"));
-}
-
-bool ossimPolyLine::saveState(ossimKeywordlist& kwl,
-                             const char* prefix)const
-{
-   int i = 0;
-   kwl.add(prefix,
-           ossimKeywordNames::TYPE_KW,
-           "ossimPolyLine",
-           true);
-   kwl.add(prefix,
-           NUMBER_VERTICES_KW,
-           (int)theVertexList.size(),
-           true);
-   for(i = 0; i < (int)theVertexList.size();++i)
-   {
-      ossimString vert = "v"+ossimString::toString(i);;
-      ossimString value = (ossimString::toString(theVertexList[i].x) + " " +
-                           ossimString::toString(theVertexList[i].y) );
-      kwl.add(prefix,
-              vert.c_str(),
-              value.c_str(),
-              true);
-   }
-   ossimString order = "";
-   
-   return true;
-}
-   
-bool ossimPolyLine::loadState(const ossimKeywordlist& kwl,
-                             const char* prefix)
-{
-   const char* number_vertices = kwl.find(prefix, NUMBER_VERTICES_KW);
-   int i = 0;
-
-   theVertexList.clear();
-   int vertexCount = ossimString(number_vertices).toLong();
-   ossimString x = "0.0";
-   ossimString y = "0.0";
-   for(i = 0; i < vertexCount; ++i)
-   {
-      ossimString v = kwl.find(prefix, (ossimString("v")+ossimString::toString(i)).c_str());
-      v = v.trim();
-
-      istringstream vStream(v);
-      vStream >> x >> y;
-      theVertexList.push_back(ossimDpt(x.toDouble(),y.toDouble()));
-   }
-
-   return true;
-}
diff --git a/src/ossim/base/ossimPolygon.cpp b/src/ossim/base/ossimPolygon.cpp
deleted file mode 100644
index 630e0f7..0000000
--- a/src/ossim/base/ossimPolygon.cpp
+++ /dev/null
@@ -1,1266 +0,0 @@
-//*****************************************************************************
-// FILE: ossimPolygon.cpp
-//
-// License:  LGPL
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Contains implementation of class 
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimPolygon.cpp 19682 2011-05-31 14:21:20Z dburken $
-
-#include <ossim/base/ossimPolygon.h>
-#include <ossim/base/ossimLine.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimPolyArea2d.h>
-#include <ossim/base/ossimString.h>
-#include <algorithm>
-#include <iterator>
-#include <sstream>
-#include <iterator>
-
-static const char* NUMBER_VERTICES_KW = "number_vertices";
-static const char* VERTEX_ORDER_KW    = "order";
-
-static const int RECT_LEFT_EDGE   = 0;
-static const int RECT_TOP_EDGE    = 1;
-static const int RECT_RIGHT_EDGE  = 2;
-static const int RECT_BOTTOM_EDGE = 3;
-
-ossimPolygon::ossimPolygon()
-   : theOrderingType(OSSIM_VERTEX_ORDER_UNKNOWN),
-    theVertexList(),
-    theCurrentVertex(0)
-   
-{}
-
-ossimPolygon::ossimPolygon(const vector<ossimIpt>& polygon)
-   :theOrderingType(OSSIM_VERTEX_ORDER_UNKNOWN),
-   theVertexList(polygon.size()),
-   theCurrentVertex(0)
-   
-{
-   // Assign std::vector<ossimIpt> list to std::vector<ossimDpt> theVertexList.
-   for (std::vector<ossimIpt>::size_type i = 0; i < polygon.size(); ++i)
-   {
-      theVertexList[i] = polygon[i];
-   }
-}
-
-ossimPolygon::ossimPolygon(const vector<ossimDpt>& polygon)
-   :theOrderingType(OSSIM_VERTEX_ORDER_UNKNOWN),
-   theVertexList(polygon),
-    theCurrentVertex(0)
-{
-}
-
-//*****************************************************************************
-//  CONSTRUCTOR: ossimPolygon(int numVertices, const ossimDpt* vertex_array)
-//  
-//*****************************************************************************
-ossimPolygon::ossimPolygon(int numVertices, const ossimDpt* v)
-   : theOrderingType(OSSIM_VERTEX_ORDER_UNKNOWN),
-     theCurrentVertex(0)
-     
-{
-   theVertexList.insert(theVertexList.begin(),
-                        v, v+numVertices);
-}
-
-//*****************************************************************************
-//  COPY CONSTRUCTOR: ossimPolygon(ossimPolygon)
-//  
-//*****************************************************************************
-ossimPolygon::ossimPolygon(const ossimPolygon& polygon)
-   :theCurrentVertex(0)
-{
-   *this = polygon;
-}
-
-//*****************************************************************************
-//  CONSTRUCTOR: ossimPolygon(p1, p2, p3, p4)
-//  
-//  Provided for convenience. Does not imply the polygon is limited to four
-//  vertices
-//  
-//*****************************************************************************
-ossimPolygon::ossimPolygon(ossimDpt v1,
-                           ossimDpt v2,
-                           ossimDpt v3,
-                           ossimDpt v4)
-   : theOrderingType(OSSIM_VERTEX_ORDER_UNKNOWN),
-     theVertexList(4),
-     theCurrentVertex(0)
-     
-{
-   theVertexList[0] = v1;
-   theVertexList[1] = v2;
-   theVertexList[2] = v3;
-   theVertexList[3] = v4;
-}
-
-ossimPolygon::ossimPolygon(const ossimIrect& rect)
-: theOrderingType(OSSIM_CLOCKWISE_ORDER),
-  theVertexList(4),
-  theCurrentVertex(0)
-{
-   theVertexList[0] = rect.ul();
-   theVertexList[1] = rect.ur();
-   theVertexList[2] = rect.lr();
-   theVertexList[3] = rect.ll();
-}
-
-ossimPolygon::ossimPolygon(const ossimDrect& rect)
-: theOrderingType(OSSIM_CLOCKWISE_ORDER),
-theVertexList(4),
-theCurrentVertex(0)
-{
-   theVertexList[0] = rect.ul();
-   theVertexList[1] = rect.ur();
-   theVertexList[2] = rect.lr();
-   theVertexList[3] = rect.ll();
-}
-
-
-//*****************************************************************************
-//  DESTRUCTOR: ~ossimPolygon
-//  
-//*****************************************************************************
-ossimPolygon::~ossimPolygon()
-{
-}
-
-
-//*************************************************************************************************
-//! Returns polygon area. Negative indicates CW ordering of vertices (in right-handed coordinates
-//*************************************************************************************************
-double ossimPolygon::area()const
-{
-   double area = 0;
-   ossim_uint32 i=0;
-   ossim_uint32 j=0;
-   ossim_uint32 size = (ossim_uint32)theVertexList.size();
-   
-   for (i=0;i<size;i++)
-   {
-      j = (i + 1) % (int)size;
-      area += theVertexList[i].x * theVertexList[j].y;
-      area -= theVertexList[i].y * theVertexList[j].x;
-   }
-
-   area /= 2;
-
-   return area;
-}
-
-void ossimPolygon::roundToIntegerBounds(bool compress)
-{
-   int i = 0;
-   for(i = 0; i < (int)theVertexList.size(); ++i)
-   {
-      theVertexList[i] = ossimIpt(theVertexList[i]);
-   }
-
-  if(compress&&theVertexList.size())
-   {
-      vector<ossimDpt> polyLine;
-      
-      polyLine.push_back(theVertexList[0]);
-      ossimDpt testPt = theVertexList[0];
-      for(i=1; i < (int)theVertexList.size(); ++i)
-      {
-         if(testPt!=theVertexList[i])
-         {
-            testPt = theVertexList[i];
-            polyLine.push_back(testPt);
-         }
-      }
-      if(polyLine.size() == 1)
-      {
-         polyLine.push_back(polyLine[0]);
-      }
-      
-      if(theVertexList.size() == 1)
-      {
-         polyLine.push_back(testPt);
-      }
-      theVertexList    = polyLine;
-      theCurrentVertex = 0;
-   }
-}
-
-ossimDpt ossimPolygon::midPoint()const
-{
-   int upper = (int)theVertexList.size();
-   ossimDpt result(0.0, 0.0);
-   int i = 0;
-
-   if(!upper)
-   {
-      result.makeNan();
-   }
-   else
-   {
-      for(i = 0; i < upper; ++i)
-      {
-         result.x+=theVertexList[i].x;
-         result.y+=theVertexList[i].y;
-      }
-      result.x/=(double)upper;
-      result.y/=(double)upper;
-   }
-   
-   return result;
-}
-
-bool ossimPolygon::hasNans()const
-{
-   int upper = (int)theVertexList.size();
-   int i = 0;
-
-   for(i = 0; i < upper; ++i)
-   {
-      if(theVertexList[i].hasNans())
-      {
-         return true;
-      }
-   }
-
-   return false;
-}
-
-void ossimPolygon::getIntegerBounds(ossim_int32& minX,
-   ossim_int32& minY,
-   ossim_int32& maxX,
-   ossim_int32& maxY)const
-{
-   ossim_int32 npoly = (ossim_int32)theVertexList.size();
-   int i = 0;
-
-   if(npoly)
-   {
-      minX = (ossim_int32)floor(theVertexList[0].x);
-      maxX = (ossim_int32)ceil(theVertexList[0].x);
-      minY = (ossim_int32)floor(theVertexList[0].y);
-      maxY = (ossim_int32)ceil(theVertexList[0].y);
-
-      for(i =1; i < npoly; ++i)
-      {
-         minX = std::min((ossim_int32)floor(theVertexList[i].x),
-            (ossim_int32)minX);
-         maxX = std::max((ossim_int32)ceil(theVertexList[i].x),
-            (ossim_int32)maxX);
-         minY = std::min((ossim_int32)floor(theVertexList[i].y),
-            (ossim_int32)minY);
-         maxY = std::max((ossim_int32)ceil(theVertexList[i].y),
-            (ossim_int32)maxY);
-      }
-   }
-   else
-   {
-      minX = OSSIM_INT_NAN;
-      minY = OSSIM_INT_NAN;
-      maxX = OSSIM_INT_NAN;
-      maxY = OSSIM_INT_NAN;
-   }
-}
-
-void ossimPolygon::getFloatBounds(ossim_float64& minX,
-                                  ossim_float64& minY,
-                                  ossim_float64& maxX,
-                                  ossim_float64& maxY) const
-{
-   ossim_int32 npoly = (ossim_int32)theVertexList.size();
-   int i = 0;
-
-   if(npoly)
-   {
-      minX = floor(theVertexList[0].x);
-      maxX = ceil(theVertexList[0].x);
-      minY = floor(theVertexList[0].y);
-      maxY = ceil(theVertexList[0].y);
-
-      for(i =1; i < npoly; ++i)
-      {
-         minX = std::min<double>(floor(theVertexList[i].x), minX);
-         maxX = std::max<double>(ceil(theVertexList[i].x),  maxX);
-         minY = std::min<double>(floor(theVertexList[i].y), minY);
-         maxY = std::max<double>(ceil(theVertexList[i].y),  maxY);
-      }
-   }
-   else
-   {
-      minX = ossim::nan();
-      minY = ossim::nan();
-      maxX = ossim::nan();
-      maxY = ossim::nan();
-   }
-}
-
-bool ossimPolygon::clipToRect(vector<ossimPolygon>& result,
-                              const ossimDrect& rect)const
-{
-   result.clear();
-   ossimPolyArea2d p1(*this);
-   ossimPolyArea2d p2(rect.ul(), rect.ur(), rect.lr(), rect.ll());
-   
-   p1&=p2;
-
-   p1.getVisiblePolygons(result);
-
-   return (result.size() > 0);
-}   
-
-//*****************************************************************************
-//  METHOD: ossimPolygon::clipLineSegment(p1, p2)
-//  
-//  Implements Cyrus-Beck clipping algorithm as described in:
-//  http://www.daimi.au.dk/~mbl/cgcourse/wiki/cyrus-beck_line-clipping_.html
-//
-//  Clips the line segment defined by the two endpoints provided. The
-//  endpoints are modified as needed to represent the clipped line. Returns
-//  true if intersection present.
-//  
-//*****************************************************************************
-bool ossimPolygon::clipLineSegment(ossimDpt& P, ossimDpt& Q) const
-{
-   ossimDpt PQ (Q - P);
-   double tE = 0.0;
-   double tL = 1.0;
-   ossimLine edge, edgeE, edgeL;
-   bool intersected=false;
-   double num, denom, t;
-   ossim_uint32 npol = (ossim_uint32)theVertexList.size();
-
-   checkOrdering();
-   //***
-   // clip the segment against each edge of the polygon
-   //***
-   ossim_uint32 i = 0;
-   ossim_uint32 j = 0;
-   for(i = 0, j = 1; i < npol;)
-   {
-      edge = ossimLine(theVertexList[i],
-                       theVertexList[j]);
-      
-      ossimDpt normal = edge.normal();
-
-      // Fix from CChuah at observera.com for counter clockwise polygons. (drb)
-      if (theOrderingType == OSSIM_COUNTERCLOCKWISE_ORDER)
-      {
-         normal.x = -normal.x;
-         normal.y = -normal.y;
-      }
-      
-      denom = normal.x*PQ.x + normal.y*PQ.y;
-      
-      num = normal.x*(edge.theP1.x - P.x) + normal.y*(edge.theP1.y - P.y);
-      
-      if (denom < 0)
-      {
-         //***
-         // Appears to be entering:
-         //***
-         t = num / denom;
-         if (t > tE)
-         {
-            tE = t; //+ FLT_EPSILON;
-            edgeE = edge;
-         }
-      }
-      else if (denom > 0)
-      {
-         //***
-         // Appears to be leaving:
-         //***
-         t = num / denom;
-         if (t < tL)
-         {
-            tL = t;// - FLT_EPSILON;
-            edgeL = edge;
-         }
-      }
-
-      ++i;
-      ++j;
-      j%=npol;
-   } 
-   
-   //***
-   // Compute clipped end points:
-   //***
-   if(tL >= tE)
-   {
-       Q.x = P.x + tL*PQ.x;
-       Q.y = P.y + tL*PQ.y;
-       P.x += tE*PQ.x;
-       P.y += tE*PQ.y;
-       intersected = true;
-   }
-   
-   return intersected;
-}
-
-/**
-* METHOD: isRectWithin()
-* Returns true if all the corner points of the given rect fit within.
-*/
-bool ossimPolygon::isRectWithin(const ossimIrect &rect) const 
-{
-    if(isPointWithin(rect.ul()) &&
-       isPointWithin(rect.ur()) &&
-       isPointWithin(rect.ll()) &&
-       isPointWithin(rect.lr())) {
-       	return true;
-    }
-    return false;
-}
-/**
-* METHOD: isPolyWithin()
-* Returns true if all the vertices of the given polygon fit within.
-*/
-bool ossimPolygon::isPolyWithin(const ossimPolygon &poly) const 
-{
-   bool ret=false;
-   int numvertex=poly.getNumberOfVertices();
-   if(getNumberOfVertices()>1 && numvertex) {
-      ret=true;
-      for(int v=0;v<numvertex;v++) {
-         if(!isPointWithin(poly[v])) {
-            ret=false;
-            break;
-         }
-      }
-   }
-   return ret;
-}
-
-//*****************************************************************************
-//  METHOD: ossimPolygon::pointWithin(const ossimDpt& point)
-//  
-//  Returns TRUE if point is inside polygon.
-//  
-//*****************************************************************************
-bool ossimPolygon::isPointWithin(const ossimDpt& point) const
-{
-
-   int i, j, c = 0;
-   int npol = (int)theVertexList.size();
-
-   for (i = 0, j = npol-1; i < npol; j = i++)
-   {
-      if ((((theVertexList[i].y <= point.y) && (point.y < theVertexList[j].y)) ||
-           ((theVertexList[j].y <= point.y) && (point.y < theVertexList[i].y))) &&
-          (point.x < (theVertexList[j].x - theVertexList[i].x) * (point.y - theVertexList[i].y) /
-           (theVertexList[j].y - theVertexList[i].y) + theVertexList[i].x))
-      {
-         c = !c;
-      }
-   }
-
-   if(!c) // check if on if not within
-   {
-      for (i = 0, j = npol-1; i < npol; j = i++)
-      {
-         if(ossimLine(theVertexList[i], theVertexList[j]).isPointWithin(point))
-         {
-            return true;
-         }
-      }
-   }
-
-   return (c!=0);
-}
-
-//*****************************************************************************
-//  METHOD: ossimPolygon::vertex(int)
-//  
-//  Returns the ossimDpt vertex given the index. Also initializes the current
-//  edge (theCurrentEdge) to the edge corresponding to the index.
-//  
-//*****************************************************************************
-bool ossimPolygon::vertex(int index, ossimDpt& tbd_vertex) const 
-{
-   if((index >= (int)theVertexList.size()) ||
-      (index < 0))
-   {
-      return false;
-   }
-
-   tbd_vertex = theVertexList[index];
-   theCurrentVertex = index;
-
-   return true;
-}
-
-//*****************************************************************************
-//  METHOD: ossimPolygon::nextVertex()
-//  
-//  Assigns the ossimDpt tbd_vertex following the current vertex. The current
-//  vertex is initialized with a call to vertex(int), or after the last
-//  vertex is reached (initialized to theFirstEdge. Returns false if no vertex
-//  defined.
-//
-//*****************************************************************************
-bool ossimPolygon::nextVertex(ossimDpt& tbd_vertex) const 
-{
-   ++theCurrentVertex;
-   if(theCurrentVertex >= (ossim_int32)theVertexList.size())
-   {
-      return false;
-   }
-   tbd_vertex = theVertexList[theCurrentVertex];
-   
-   return true;
-}
-
-//*****************************************************************************
-//  METHOD: operator=()
-//  
-//*****************************************************************************
-const ossimPolygon& ossimPolygon::operator= (const ossimIrect& rect)
-{
-   theCurrentVertex = 0;
-   theVertexList.resize(4);
-   theVertexList[0] = rect.ul();
-   theVertexList[1] = rect.ur();
-   theVertexList[2] = rect.lr();
-   theVertexList[3] = rect.ll();
-
-   return *this;
-}
-
-const ossimPolygon& ossimPolygon::operator= (const ossimDrect& rect)
-{
-   theCurrentVertex = 0;
-   theVertexList.resize(4);
-   theVertexList[0] = rect.ul();
-   theVertexList[1] = rect.ur();
-   theVertexList[2] = rect.lr();
-   theVertexList[3] = rect.ll();
-
-   return *this;
-}
-
-const ossimPolygon&  ossimPolygon::operator=(const ossimPolygon& polygon)
-{
-   theVertexList    = polygon.theVertexList;
-   theCurrentVertex = polygon.theCurrentVertex;
-   theOrderingType  = polygon.theOrderingType;
-   
-   return *this;
-}
-
-const ossimPolygon& ossimPolygon::operator= (const vector<ossimDpt>& vertexList)
-{
-   theVertexList    = vertexList;
-   theCurrentVertex = 0;
-   theOrderingType = OSSIM_VERTEX_ORDER_UNKNOWN;
-   
-   return *this;
-}
-
-const ossimPolygon& ossimPolygon::operator=(const vector<ossimIpt>& vertexList)
-{
-   theVertexList.resize(vertexList.size());
-   
-   // Assign std::vector<ossimIpt> list to std::vector<ossimDpt> theVertexList.
-   for (std::vector<ossimIpt>::size_type i = 0; i < vertexList.size(); ++i)
-   {
-      theVertexList[i] = vertexList[i];
-   }
-   
-   theCurrentVertex = 0;
-   theOrderingType = OSSIM_VERTEX_ORDER_UNKNOWN;
-   
-   return *this;
-}
-
-//*****************************************************************************
-//  METHOD: operator==()
-//  
-//*****************************************************************************
-bool ossimPolygon::operator==(const ossimPolygon& polygon) const
-{
-   if( (theVertexList.size() != polygon.theVertexList.size()))
-   {
-      return false;
-   }
-   if(!theVertexList.size() && polygon.theVertexList.size())
-   {
-      return true;
-   }
-
-   return (theVertexList == polygon.theVertexList);
-}
-
-const ossimPolygon& ossimPolygon::operator *=(const ossimDpt& scale)
-{
-   ossim_uint32 upper = (ossim_uint32)theVertexList.size();
-   ossim_uint32 i = 0;
-   for(i = 0; i < upper; ++i)
-   {
-      theVertexList[i].x*=scale.x;
-      theVertexList[i].y*=scale.y;
-   }
-   
-   return *this;
-}
-
-ossimPolygon ossimPolygon::operator *(const ossimDpt& scale)const
-{
-   ossimPolygon result(*this);
-
-   ossim_uint32 upper = (ossim_uint32)theVertexList.size();
-   ossim_uint32 i = 0;
-   for(i = 0; i < upper; ++i)
-   {
-      result.theVertexList[i].x*=scale.x;
-      result.theVertexList[i].y*=scale.y;
-   }
-
-   return result;
-}
-
-
-void ossimPolygon::reverseOrder()
-{
-   std::reverse(theVertexList.begin(), theVertexList.end());
-   
-   if(theOrderingType == OSSIM_COUNTERCLOCKWISE_ORDER)
-   {
-      theOrderingType = OSSIM_CLOCKWISE_ORDER;
-   }
-   else if(theOrderingType == OSSIM_CLOCKWISE_ORDER)
-   {
-      theOrderingType =  OSSIM_COUNTERCLOCKWISE_ORDER;
-   }
-   
-}
-
-//*****************************************************************************
-//  METHOD: ossimPolygon::print(ostream)
-//  
-//*****************************************************************************
-void ossimPolygon::print(ostream& os) const
-{
-   copy(theVertexList.begin(),
-        theVertexList.end(),
-        ostream_iterator<ossimDpt>(os, "\n"));
-}
-
-
-ossimVertexOrdering ossimPolygon::checkOrdering()const
-{
-   if(theOrderingType == OSSIM_VERTEX_ORDER_UNKNOWN)
-   {
-      double areaValue = area();
-      if(areaValue > 0)
-      {
-         theOrderingType = OSSIM_COUNTERCLOCKWISE_ORDER;
-      }
-      else if(areaValue <= 0)
-      {
-         theOrderingType = OSSIM_CLOCKWISE_ORDER;
-      }
-   }
-
-   return theOrderingType;
-}
-
-void ossimPolygon::intersectEdge(ossimDpt& result,
-                                 const ossimLine& segment,
-                                 const ossimDrect& rect,
-                                 int edge)
-{
-   ossimLine edgeLine;
-   switch(edge)
-   {
-   case RECT_LEFT_EDGE:
-   {
-      edgeLine.theP1 = rect.ll();
-      edgeLine.theP2 = rect.ul();
-      break;
-   }
-   case RECT_TOP_EDGE:
-   {
-      edgeLine.theP1 = rect.ul();
-      edgeLine.theP2 = rect.ur();
-      break;
-   }
-   case RECT_RIGHT_EDGE:
-   {
-      edgeLine.theP1 = rect.ur();
-      edgeLine.theP2 = rect.lr();
-      break;
-   }
-   case RECT_BOTTOM_EDGE:
-   {
-      edgeLine.theP1 = rect.lr();
-      edgeLine.theP2 = rect.ll();
-      break;
-   }
-   }
-   
-   result = segment.intersectInfinite(edgeLine);
-}
-
-bool ossimPolygon::isInsideEdge(const ossimDpt& pt,
-                                const ossimDrect& rect,
-                                int edge)const
-{
-   switch(edge)
-   {
-   case RECT_LEFT_EDGE:
-   {
-      return (pt.x>rect.ul().x);
-      break;
-   }
-   case RECT_TOP_EDGE:
-   {
-      if(rect.orientMode() == OSSIM_LEFT_HANDED)
-      {
-         return (pt.y > rect.ul().y);
-      }
-      else
-      {
-         return (pt.y < rect.ul().y);
-      }
-      break;
-   }
-   case RECT_RIGHT_EDGE:
-   {
-      return (pt.x<rect.lr().x);
-      
-      break;
-   }
-   case RECT_BOTTOM_EDGE:
-   {
-      if(rect.orientMode() == OSSIM_LEFT_HANDED)
-      {
-         return (pt.y < rect.lr().y);
-      }
-      else
-      {
-         return (pt.y > rect.lr().y);
-      }
-      break;
-   }
-   }
-   return false;
-}
-
-
-bool ossimPolygon::saveState(ossimKeywordlist& kwl,
-                             const char* prefix)const
-{
-   kwl.add(prefix,
-           ossimKeywordNames::TYPE_KW,
-           "ossimPolygon",
-           true);
-   kwl.add(prefix,
-           NUMBER_VERTICES_KW,
-           static_cast<ossim_uint32>(theVertexList.size()),
-           true);
-   int i = 0;
-   for(i = 0; i < (int)theVertexList.size();++i)
-   {
-      ossimString vert = "v"+ossimString::toString(i);;
-      ossimString value = (ossimString::toString(theVertexList[i].x) + " " +
-                           ossimString::toString(theVertexList[i].y) );
-      kwl.add(prefix,
-              vert.c_str(),
-              value.c_str(),
-              true);
-   }
-   ossimString order = "";
-   
-   switch(theOrderingType)
-   {
-   case OSSIM_VERTEX_ORDER_UNKNOWN:
-   {
-      order = "unknown";
-      break;
-   }
-   case OSSIM_CLOCKWISE_ORDER:
-   {
-      order = "clockwise";
-      break;
-   }
-   case OSSIM_COUNTERCLOCKWISE_ORDER:
-   {
-      order = "counter_clockwise";
-      break;
-   }
-   }
-   kwl.add(prefix,
-           VERTEX_ORDER_KW,
-           order,
-           true);
-
-   return true;
-}
-   
-bool ossimPolygon::loadState(const ossimKeywordlist& kwl,
-                             const char* prefix)
-{
-   ossimString order = kwl.find(prefix, VERTEX_ORDER_KW);
-   const char* number_vertices = kwl.find(prefix, NUMBER_VERTICES_KW);
-   ossimString x,y;
-   if(order=="unknown")
-   {
-      theOrderingType = OSSIM_VERTEX_ORDER_UNKNOWN;
-   }
-   else if(order =="clockwise")
-   {
-      theOrderingType = OSSIM_CLOCKWISE_ORDER;
-   }
-   else if(order =="counter_clockwise")
-   {
-      theOrderingType = OSSIM_COUNTERCLOCKWISE_ORDER;
-   }
-
-   theVertexList.clear();
-   int vertexCount = ossimString(number_vertices).toLong();
-   int i = 0;
-   for(i = 0; i < vertexCount; ++i)
-   {
-      ossimString v = kwl.find(prefix, (ossimString("v")+ossimString::toString(i)).c_str());
-      v = v.trim();
-
-      istringstream vStream(v.string());
-      vStream >> x.string() >> y.string();
-      theVertexList.push_back(ossimDpt(x.toDouble(),y.toDouble()));
-   }
-
-   return true;
-}
-
-void ossimPolygon::getMinimumBoundingRect(ossimPolygon& minRect) const
-{
-   static const double MIN_STEP = (0.5)*M_PI/180.0;
-   double angle_step = M_PI/8.0;  // initial rotation step size for min area search = 22.5 deg
-   double theta;
-   double best_theta = M_PI/4.0;  // Initial guess is 45 deg orientation
-   double center_theta;
-   double cos_theta, sin_theta;
-   ossimPolygon rotatedPolygon(*this);
-   ossimDpt xlatedVertex;
-   ossimDpt rotatedVertex(0.0, 0.0);
-   double min_x, min_y, max_x, max_y;
-   double area;
-   double min_area = 1.0/DBL_EPSILON;
-   rotatedPolygon.theVertexList[0] = ossimDpt(0, 0);  // first vertex always at origin
-   bool first_time = true;
-   ossimDrect best_rect;
-   static const bool TESTING = false;
-
-   //***
-   // Loop to converge on best orientation angle for bounding polygon:
-   //***
-   while (angle_step > MIN_STEP)
-   {
-      //***
-      // Try four different rotations evenly centered about the current best guess:
-      //***
-      center_theta = best_theta;
-      for (int i=0; i<5; i++)
-      {
-         //***
-         // Check for i=2 (center angle) since already computed quantities for this in last iteration
-         // unless this is first time through:
-         //***
-         if ((i != 2) || (first_time)) 
-         {
-            theta = center_theta + (i - 2.0)*angle_step;
-            cos_theta = cos(theta);
-            sin_theta = sin(theta);
-            min_x = rotatedPolygon.theVertexList[0].x;
-            min_y = rotatedPolygon.theVertexList[0].y;
-            max_x = min_x;
-            max_y = min_y;
-
-            //***
-            // Translate polygon to origin and rotate all vertices by current theta:
-            //***
-            for (unsigned int vertex=1; vertex < theVertexList.size(); vertex++)
-            {
-               xlatedVertex.x = theVertexList[vertex].x - theVertexList[0].x;
-               xlatedVertex.y = theVertexList[vertex].y - theVertexList[0].y;
-               rotatedVertex.x = cos_theta*xlatedVertex.x + sin_theta*xlatedVertex.y;
-               rotatedVertex.y = cos_theta*xlatedVertex.y - sin_theta*xlatedVertex.x;
-               rotatedPolygon.theVertexList[vertex] = rotatedVertex;
-
-               //***
-               // Latch max and mins of bounding rect:
-               //***
-               if (min_x > rotatedVertex.x) min_x = rotatedVertex.x;
-               if (min_y > rotatedVertex.y) min_y = rotatedVertex.y;
-               if (max_x < rotatedVertex.x) max_x = rotatedVertex.x;
-               if (max_y < rotatedVertex.y) max_y = rotatedVertex.y;
-            }
-
-            if (TESTING)
-            {
-               ossimDpt v1 (cos_theta*min_x - sin_theta*max_y + theVertexList[0].x,
-                            cos_theta*max_y + sin_theta*min_x + theVertexList[0].y);
-               ossimDpt v2 (cos_theta*max_x - sin_theta*max_y + theVertexList[0].x,
-                            cos_theta*max_y + sin_theta*max_x + theVertexList[0].y);
-               ossimDpt v3 (cos_theta*max_x - sin_theta*min_y + theVertexList[0].x,
-                            cos_theta*min_y + sin_theta*max_x + theVertexList[0].y);
-               ossimDpt v4 (cos_theta*min_x - sin_theta*min_y + theVertexList[0].x,
-                            cos_theta*min_y + sin_theta*min_x + theVertexList[0].y);
-               cout << v1.x << "\t" << v1.y << endl;
-               cout << v2.x << "\t" << v2.y << endl;
-               cout << v3.x << "\t" << v3.y << endl;
-               cout << v4.x << "\t" << v4.y << endl << endl;
-            }
-
-            //***
-            // Establish bounding rect and area about rotated polygon:
-            //***
-            area = (max_x - min_x) * (max_y - min_y);
-            if (area < min_area)
-            {
-               best_theta = theta;
-               min_area = area;
-               best_rect = ossimDrect(min_x, max_y, max_x, min_y, OSSIM_RIGHT_HANDED);
-            }
-         } // end if (i != 2 || first_time)
-      }  // end for-loop over surrounding rotations
-
-      //***
-      // Adjust step size by half to repeat process:
-      //***
-      angle_step /= 2.0;
-      first_time = false;
-
-   } // end while loop for convergence
-
-   //***
-   // best_theta now contains optimum rotation of bounding rect. Need to apply reverse
-   // rotation and translation of best_rect:
-   //***
-   cos_theta = cos(best_theta);
-   sin_theta = sin(best_theta);
-   ossimDpt v1 (cos_theta*best_rect.ul().x - sin_theta*best_rect.ul().y + theVertexList[0].x,
-                cos_theta*best_rect.ul().y + sin_theta*best_rect.ul().x + theVertexList[0].y);
-   ossimDpt v2 (cos_theta*best_rect.ur().x - sin_theta*best_rect.ur().y + theVertexList[0].x,
-                cos_theta*best_rect.ur().y + sin_theta*best_rect.ur().x + theVertexList[0].y);
-   ossimDpt v3 (cos_theta*best_rect.lr().x - sin_theta*best_rect.lr().y + theVertexList[0].x,
-                cos_theta*best_rect.lr().y + sin_theta*best_rect.lr().x + theVertexList[0].y);
-   ossimDpt v4 (cos_theta*best_rect.ll().x - sin_theta*best_rect.ll().y + theVertexList[0].x,
-                cos_theta*best_rect.ll().y + sin_theta*best_rect.ll().x + theVertexList[0].y);
-    
-   if (TESTING)
-   {
-      cout << v1.x << "\t" << v1.y << endl;
-      cout << v2.x << "\t" << v2.y << endl;
-      cout << v3.x << "\t" << v3.y << endl;
-      cout << v4.x << "\t" << v4.y << endl << endl;
-   }
-
-   //***
-   // Assign return value rect:
-   //***
-   minRect.clear();
-   minRect.addPoint(v1);
-   minRect.addPoint(v2);
-   minRect.addPoint(v3);
-   minRect.addPoint(v4);
-
-   // Make sure we are always returning a positive clockwise area.
-   minRect.checkOrdering();
-   if(minRect.getOrdering()==OSSIM_COUNTERCLOCKWISE_ORDER)
-      minRect.reverseOrder();
-   return;
-}
-
-/**
-* METHOD: remove() 
-* Removes the vertex from the polygon.
-*/
-void ossimPolygon::removeVertex(int vertex)
-{
-   int numvertices=getNumberOfVertices();
-   if(vertex>numvertices) {
-      return;
-   } else {
-      vector<ossimDpt>::iterator it;
-      int v=0;
-      for(it=theVertexList.begin();it!=theVertexList.end();it++) {
-         if(v++==vertex) {
-            theVertexList.erase(it);
-            break;
-         }
-      }
-   }
-}
-
-/**
-* METHOD: removeSmallestContributingVertex() 
-* Removes the vertex that contributes the smallest area to the polygon.
-*/
-void ossimPolygon::removeSmallestContributingVertex()
-{
-   unsigned int numvertices=getNumberOfVertices();
-   if (!numvertices)
-      return;
-
-   int smallest_vertex=-1,n1,n2;
-   double smallest_area=1.0/DBL_EPSILON;
-   ossimPolygon tmp;
-
-   for(unsigned int v=0;v<numvertices;v++) {
-      tmp.clear();
-      if(v==0) {
-         n1=numvertices-1;
-         n2=1;
-      } else if(v==numvertices-1) {
-         n1=numvertices-2;
-         n2=0;
-      } else {
-         n1=v-1;
-         n2=v+1;
-      }
-
-      tmp.addPoint(theVertexList[n1]);
-      tmp.addPoint(theVertexList[v]);
-      tmp.addPoint(theVertexList[n2]);
-
-      if(fabs(tmp.area())<smallest_area) {
-         smallest_area=fabs(tmp.area());
-         smallest_vertex=v;
-      }
-   }
-   removeVertex(smallest_vertex);
-}
-
-
-ossimDpt& ossimPolygon::operator[](int index)
-{
-   return theVertexList[index];
-}
-
-const ossimDpt& ossimPolygon::operator[](int index)const
-{
-   return theVertexList[index];
-}
-
-ossim_uint32 ossimPolygon::getVertexCount()const
-{
-   return getNumberOfVertices();
-}
-
-ossim_uint32 ossimPolygon::getNumberOfVertices()const
-{
-   return (ossim_uint32)theVertexList.size();
-}
-
-void ossimPolygon::getBoundingRect(ossimIrect& rect)const
-{
-   ossim_int32 minX;
-   ossim_int32 minY;
-   ossim_int32 maxX;
-   ossim_int32 maxY;
-   getIntegerBounds(minX, minY, maxX, maxY);
-   rect = ossimIrect(minX, minY, maxX, maxY);
-}
-
-void ossimPolygon::getBoundingRect(ossimDrect& rect)const
-{
-   ossim_float64 minX;
-   ossim_float64 minY;
-   ossim_float64 maxX;
-   ossim_float64 maxY;
-   getFloatBounds(minX, minY, maxX, maxY);
-   rect = ossimDrect(minX, minY, maxX, maxY);
-}
-
-void ossimPolygon::clear()
-{
-   theVertexList.clear();
-   theOrderingType = OSSIM_VERTEX_ORDER_UNKNOWN;
-}
-
-void ossimPolygon::addPoint(const ossimDpt& pt)
-{
-   theVertexList.push_back(pt);
-   theOrderingType = OSSIM_VERTEX_ORDER_UNKNOWN;
-}
-
-void ossimPolygon::addPoint(double x, double y)
-{
-   theVertexList.push_back(ossimDpt(x, y));
-   theOrderingType = OSSIM_VERTEX_ORDER_UNKNOWN;
-}
-
-const vector<ossimDpt>& ossimPolygon::getVertexList()const
-{
-   return theVertexList;
-}
-
- bool ossimPolygon::pointWithin(const ossimDpt& point) const
-{
-   return isPointWithin(point);
-}
-
-const ossimPolygon& ossimPolygon::operator *=(double scale)
-{
-   return ((*this)*=ossimDpt(scale, scale));
-}
-
-ossimPolygon ossimPolygon::operator *(double scale)const
-{
-   return ((*this)*ossimDpt(scale, scale));
-}
-
-void ossimPolygon::resize(ossim_uint32 newSize)
-{
-   theVertexList.resize(newSize);
-   theOrderingType  = OSSIM_VERTEX_ORDER_UNKNOWN;
-   theCurrentVertex = 0;
-}
-
-ossimVertexOrdering ossimPolygon::getOrdering()const
-{
-   return theOrderingType;
-}
-
-bool ossimPolygon::operator!=(const ossimPolygon& compare_this) const
-{
-   return !(*this == compare_this);
-}
-
-ostream& operator<<(ostream& os, const ossimPolygon& polygon)
-{
-   polygon.print(os);
-   return os;
-}
-
-/**
-* METHOD: getCentroid() 
-* Assigns the ossimDpt centroid the polygon.
-* Warning: centroid is not guaranteed to be inside the polygon!
-*/
-void ossimPolygon::getCentroid(ossimDpt &centroid) const
-{
-   int numpts = (int)theVertexList.size();
-   unsigned int next;
-   double area=0,parea;
-
-   centroid=ossimDpt(0,0);
-   for(int i=0;i<numpts;i++) {
-      if(i<numpts-1) {
-         next=i+1;
-      } else {
-         next=0;
-      }
-      parea=theVertexList[i].x*theVertexList[next].y-theVertexList[next].x*theVertexList[i].y;
-      area+=parea;
-      centroid.x+=(theVertexList[i].x+theVertexList[next].x)*parea;
-      centroid.y+=(theVertexList[i].y+theVertexList[next].y)*parea;
-   }
-   area=area/2.0;
-   centroid=centroid/(area*6.0);
-}
-
-/**
-* METHOD: fitCircleInsideVertex() 
-* Assigns destPt the point that fits a circle of given radius inside the polygon vertex.
-* Warning: destPt is not guaranteed to be inside the polygon!
-* (you may not be able to fit a circle of the given radius inside the polygon)
-*/
-void ossimPolygon::fitCircleInsideVertex(ossimDpt &destPt, unsigned int vertex, double radius) const
-{
-   ossim_uint32 num_vertices=(int)theVertexList.size(),n1,n2;
-   ossimDpt side1,side2,bisection,currpt;
-   double length_out,side1_side2_cross;
-   bool concave=true;
-
-   // don't be doing that dude.
-   if(num_vertices<3 || vertex>=num_vertices) {
-      destPt=ossimDpt(0,0);
-      return;
-   }
- 
-   if(vertex==0) {
-      n1=num_vertices-1;
-      n2=vertex+1;
-   } else if(vertex==num_vertices-1) {
-      n1=num_vertices-2;
-      n2=0;
-   } else {
-      n1=vertex-1;
-      n2=vertex+1;
-   }
-
-   currpt=theVertexList[vertex];
-   // get the side vectors
-   side1=theVertexList[n1]-currpt;
-   side2=theVertexList[n2]-currpt;
-
-   // normalize the sides
-   side1 = side1/side1.length();
-   side2 = side2/side2.length();
-
-   side1_side2_cross=side1.x*side2.y-side2.x*side1.y;
-
-   checkOrdering();
-   if(getOrdering()==OSSIM_COUNTERCLOCKWISE_ORDER) {
-      if(side1_side2_cross<0)
-         concave=false;
-   } else { //clockwise
-      if(side1_side2_cross>0)
-         concave=false;
-   }
-
-   bisection = side1+side2;
-   bisection = bisection/bisection.length();
-
-   if(concave) {
-      bisection=bisection*-1.0;
-      length_out=radius;
-   } else {
-      double cos_theta=(side1.x*bisection.x+side1.y*bisection.y);
-      length_out=radius/sqrt(1-cos_theta*cos_theta);
-   }
-   destPt=ossimDpt(currpt+bisection*length_out);
-   return;
-}
-
-
-/**
-//! Shrinks this polygon by radius. Effectively, circles of given radius are placed inside 
-//! the vertices just tangent to the polygon edges (via fitCircleInsideVertex()). The new
-//! polygon's vertices will be the center of these circles. Return true if success. 
-*/
-bool ossimPolygon::shrink(ossimPolygon &dest, double inset) const 
-{
-   int numpts = (int) theVertexList.size();
-   ossimDpt pt;
-   
-   //don't let people shrink themselves, that isn't going to work
-   if(&dest==this) return false;
-
-   dest.clear();
-   for(int i=0;i<numpts;i++) {
-      fitCircleInsideVertex(pt,i,inset);
-      dest.addPoint(pt);
-   }
-   if(isPolyWithin(dest)) {
-      return true;
-   } else {
-      //return an empty polygon
-      dest=ossimPolygon();
-      return false;
-   }
-}
-
-
-
diff --git a/src/ossim/base/ossimProcessInterface.cpp b/src/ossim/base/ossimProcessInterface.cpp
deleted file mode 100644
index a342f2b..0000000
--- a/src/ossim/base/ossimProcessInterface.cpp
+++ /dev/null
@@ -1,144 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimProcessInterface.cpp 9094 2006-06-13 19:12:40Z dburken $
-
-#include <ostream>
-
-#include <ossim/base/ossimProcessInterface.h>
-#include <ossim/base/ossimListenerManager.h>
-
-RTTI_DEF(ossimProcessInterface, "ossimProcessInterface");
-
-ossimProcessInterface::ossimProcessInterface()
-   :thePercentComplete(0.0),
-    theProcessStatus(PROCESS_STATUS_NOT_EXECUTING),
-    theMessage(""),
-    theEventFlag(true)
-{
-}
-
-ossimProcessInterface::~ossimProcessInterface()
-{
-}
-
-void ossimProcessInterface::abort()
-{
-   if(theProcessStatus == PROCESS_STATUS_EXECUTING)
-   {
-      setProcessStatus(PROCESS_STATUS_ABORT_REQUEST);
-   }
-}
-
-bool ossimProcessInterface::needsAborting() const
-{
-   return ( isAborted()|| isAbortRequested() );
-}
-
-bool ossimProcessInterface::isAbortRequested()const
-{
-   return (theProcessStatus == PROCESS_STATUS_ABORT_REQUEST);
-}
-
-bool ossimProcessInterface::isAborted()const
-{
-   return (theProcessStatus==PROCESS_STATUS_ABORTED);
-}
-
-bool ossimProcessInterface::isExecuting()const
-{
-   return ((theProcessStatus==PROCESS_STATUS_EXECUTING)||
-           (theProcessStatus==PROCESS_STATUS_ABORT_REQUEST));
-}
-
-ossimProcessInterface::ossimProcessStatus ossimProcessInterface::getProcessStatus()const
-{
-   return theProcessStatus;
-}
-
-void ossimProcessInterface::setProcessStatus(ossimProcessStatus processStatus)
-{
-   theProcessStatus = processStatus;
-}
-
-double ossimProcessInterface::getPercentComplete()const
-{
-   return thePercentComplete;
-}
-
-void ossimProcessInterface::setPercentComplete(double percentComplete)
-{
-   thePercentComplete = percentComplete;
-
-   ossimListenerManager* manager = getManager();
-   if(theEventFlag&&manager)
-   {
-      ossimProcessProgressEvent event(getObject(),
-                                      thePercentComplete,
-                                      theMessage,
-                                      false);
-      manager->fireEvent(event);
-   }
-}
-
-ossimListenerManager* ossimProcessInterface::getManager()
-{
-   return PTR_CAST(ossimListenerManager, getObject());
-}
-
-void ossimProcessInterface::enableEvents()
-{
-   theEventFlag = true;
-}
-   
-void ossimProcessInterface::disableEvents()
-{
-   theEventFlag = false;
-}
-
-void ossimProcessInterface::setCurrentMessage(const ossimString& message)
-{
-   theMessage = message;
-
-   ossimListenerManager* manager = getManager();
-   if(theEventFlag&&manager)
-   {
-      ossimProcessProgressEvent event(getObject(),
-                                      thePercentComplete,
-                                      theMessage,
-                                      true);
-      manager->fireEvent(event);
-   }   
-}
-
-std::ostream& ossimProcessInterface::print(std::ostream& out) const
-{
-   out << "process status: ";
-   if(theProcessStatus == PROCESS_STATUS_EXECUTING)
-   {
-      out << "executing" << std::endl;
-   }
-   else if(theProcessStatus == PROCESS_STATUS_ABORTED)
-   {
-      out << "aborted" << std::endl;
-   }
-   else if(theProcessStatus == PROCESS_STATUS_NOT_EXECUTING)
-   {
-      out << "not executing" << std::endl;
-   }
-   out << "percent_complete: " << thePercentComplete;
-   
-   return out;
-}
-
-std::ostream& operator<<(std::ostream& out, const ossimProcessInterface& data)
-{
-   return data.print(out);
-}
diff --git a/src/ossim/base/ossimProcessListener.cpp b/src/ossim/base/ossimProcessListener.cpp
deleted file mode 100644
index 622ba64..0000000
--- a/src/ossim/base/ossimProcessListener.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-// $Id: ossimProcessListener.cpp 9094 2006-06-13 19:12:40Z dburken $
-//----------------------------------------------------------------------------
-
-#include <ossim/base/ossimProcessListener.h>
-#include <ossim/base/ossimProcessProgressEvent.h>
-
-RTTI_DEF1(ossimProcessListener, "ossimProcessListener", ossimListener);
-
-ossimProcessListener::ossimProcessListener()
-   : ossimListener()
-{}
-
-ossimProcessListener::~ossimProcessListener()
-{}
-
-void ossimProcessListener::processEvent(ossimEvent& event)
-{
-   switch(event.getId())
-   {
-   case OSSIM_EVENT_PROCESS_PROGRESS_ID:
-   {
-      ossimProcessProgressEvent* eventCast = static_cast<ossimProcessProgressEvent*>(&event);
-      processProgressEvent(*eventCast);
-      break;
-   }
-   default:
-   {
-      ossimListener::processEvent(event);
-      break;
-   }
-   }
-}
-
-void ossimProcessListener::processProgressEvent(ossimProcessProgressEvent& /* event */ )
-{}
diff --git a/src/ossim/base/ossimProcessProgressEvent.cpp b/src/ossim/base/ossimProcessProgressEvent.cpp
deleted file mode 100644
index f0438c4..0000000
--- a/src/ossim/base/ossimProcessProgressEvent.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-// Description: Event for process progress.
-//
-// $Id: ossimProcessProgressEvent.cpp 9094 2006-06-13 19:12:40Z dburken $
-//----------------------------------------------------------------------------
-#include <ossim/base/ossimProcessProgressEvent.h>
-
-RTTI_DEF1(ossimProcessProgressEvent, "ossimProcessProgressEvent", ossimEvent);
-
-ossimProcessProgressEvent::ossimProcessProgressEvent(ossimObject* owner,
-                                                     double percentComplete,
-                                                     const ossimString message,
-                                                     bool outputMessageFlag)
-   :
-      ossimEvent(owner, OSSIM_EVENT_PROCESS_PROGRESS_ID),
-      thePercentComplete(percentComplete),
-      theMessage(message),
-      theOutputMessageFlag(outputMessageFlag)
-{
-}
-
-ossimObject* ossimProcessProgressEvent::dup()const
-{
-   return new ossimProcessProgressEvent(*this);
-}
-
-double ossimProcessProgressEvent::getPercentComplete()const
-{
-   return thePercentComplete;
-}
-   
-ossimString ossimProcessProgressEvent::getMessage()const
-{
-   return theMessage;
-}
-
-void ossimProcessProgressEvent::getMessage(ossimString& message)const
-{
-   message = theMessage;
-}
-   
-void ossimProcessProgressEvent::setPercentComplete(double percentComplete)
-{
-   thePercentComplete = percentComplete;
-}
-
-void ossimProcessProgressEvent::setMessage(const ossimString& message)
-{
-   theMessage = message;
-}
-
-void ossimProcessProgressEvent::setOutputMessageFlag(bool flag)
-{
-   theOutputMessageFlag = flag;
-}
-
-bool ossimProcessProgressEvent::getOutputMessageFlag() const
-{
-   return theOutputMessageFlag;
-}
diff --git a/src/ossim/base/ossimQuadTreeWarp.cpp b/src/ossim/base/ossimQuadTreeWarp.cpp
deleted file mode 100644
index 7c89e11..0000000
--- a/src/ossim/base/ossimQuadTreeWarp.cpp
+++ /dev/null
@@ -1,1648 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimQuadTreeWarp.cpp 9094 2006-06-13 19:12:40Z dburken $
-
-#include <ossim/base/ossimQuadTreeWarp.h>
-#include <algorithm>
-#include <stack>
-#include <iostream>
-
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimNotifyContext.h>
-
-static ossimTrace traceExec  ("ossimQuadTreeWarp:exec");
-static ossimTrace traceDebug ("ossimQuadTreeWarp:debug");
-
-RTTI_DEF1(ossimQuadTreeWarp, "ossimQuadTreeWarp", ossim2dTo2dTransform);
-
-ossimQuadTreeWarpVertex::ossimQuadTreeWarpVertex(
-   const ossimDpt& position, const ossimDpt& delta)
-   :thePosition(position),
-    theDelta(delta),
-    theLockedFlag(false)
-{
-}
-
-ossimQuadTreeWarpVertex::~ossimQuadTreeWarpVertex()
-{
-   for(ossim_uint32 i = 0;i< theSharedNodeList.size();++i)
-   {
-      theSharedNodeList[i]->removeVertex(this);
-   }
-                  
-}
-
-void ossimQuadTreeWarpVertex::setPosition(const ossimDpt& position)
-{
-   thePosition = position;
-}
-
-void ossimQuadTreeWarpVertex::setDelta(const ossimDpt& delta)
-{
-   theDelta    = delta;
-}
-
-const ossimDpt& ossimQuadTreeWarpVertex::getDelta()const
-{
-   return theDelta;
-}
-
-const ossimDpt& ossimQuadTreeWarpVertex::getPosition()const
-{
-   return thePosition;
-}
-
-void ossimQuadTreeWarpVertex::addSharedNode(ossimQuadTreeWarpNode* node)
-{
-   if(node)
-   {
-      theSharedNodeList.push_back(node);
-   }
-}
-
-void ossimQuadTreeWarpVertex::removeNode(ossimQuadTreeWarpNode* node)
-{
-   std::vector<ossimQuadTreeWarpNode*>::iterator iter = theSharedNodeList.begin();
-   bool found = false;
-   ossimQuadTreeWarpNode* removedNode = NULL;
-   while((iter != theSharedNodeList.end())&&!found)
-   {
-      if(*iter == node)
-      {
-         removedNode = *iter;
-         iter = theSharedNodeList.erase(iter);
-         found = true;
-      }
-      else
-      {
-         ++iter;
-      }
-   }
-
-   if(removedNode)
-   {
-      removedNode->removeVertex(this);
-   }
-}
-
-bool ossimQuadTreeWarpVertex::isShared()const
-{
-   return (theSharedNodeList.size() > 0);
-}
-
-bool ossimQuadTreeWarpVertex::saveState(ossimKeywordlist& kwl,
-                                      const char* prefix)const
-{
-   kwl.add(prefix,
-           "x",
-           thePosition.x,
-           true);
-   kwl.add(prefix,
-           "y",
-           thePosition.y,
-           true);
-   kwl.add(prefix,
-           "dx",
-           theDelta.x,
-           true);
-   kwl.add(prefix,
-           "dy",
-           theDelta.y,
-           true);
-   kwl.add(prefix,
-           "lock_flag",
-           (int)theLockedFlag,
-           true);
-   
-   return true;
-}
-
-bool ossimQuadTreeWarpVertex::loadState(const ossimKeywordlist& kwl,
-                                        const char* prefix)
-{
-   const char* x = kwl.find(prefix,
-                            "x");
-   const char* y = kwl.find(prefix,
-                            "y");
-   const char* dx = kwl.find(prefix,
-                             "dx");
-   const char* dy = kwl.find(prefix,
-                             "dy");
-   const char* lockedFlag = kwl.find(prefix,
-                                     "lock_flag");
-   if(x&&y&&dx&&dy&&lockedFlag)
-   {
-      thePosition.x = ossimString(x).toDouble();
-      thePosition.y = ossimString(y).toDouble();
-      theDelta.x    = ossimString(dx).toDouble();
-      theDelta.y    = ossimString(dy).toDouble();
-      theLockedFlag = ossimString(lockedFlag).toBool();
-      
-      return true;
-   }
-   
-   return false;
-}
-
-ossimQuadTreeWarpNode::ossimQuadTreeWarpNode()
-   :
-   theUlVertex(NULL),
-   theUrVertex(NULL),
-   theLrVertex(NULL),
-   theLlVertex(NULL),
-   theParent(NULL)
-{
-   theBoundingRect.makeNan();
-}
-
-ossimQuadTreeWarpNode::ossimQuadTreeWarpNode(
-   const ossimDrect& bounds,
-   ossimQuadTreeWarpNode* parent,
-   ossimQuadTreeWarpVertex* ulVertex,
-   ossimQuadTreeWarpVertex* urVertex,
-   ossimQuadTreeWarpVertex* lrVertex,
-   ossimQuadTreeWarpVertex* llVertex)
-   :
-   theBoundingRect(bounds),
-   theUlVertex(ulVertex),
-   theUrVertex(urVertex),
-   theLrVertex(lrVertex),
-   theLlVertex(llVertex),
-   theParent(parent)
-{
-}
-
-ossimQuadTreeWarpNode::~ossimQuadTreeWarpNode()
-{
-   removeVertices();
-
-   theUlVertex = NULL;
-   theUrVertex = NULL;
-   theLrVertex = NULL;
-   theLlVertex = NULL;
-   
-}
-
-bool ossimQuadTreeWarpNode::hasValidVertices()const
-{
-   return (theUlVertex&&theUrVertex&&theLrVertex&&theLlVertex);
-}
-
-void ossimQuadTreeWarpNode::removeVertex(ossimQuadTreeWarpVertex* v)
-{
-   if(!v) return;
-   
-   if(theUlVertex == v)
-   {
-      theUlVertex = NULL;
-      v->removeNode(this);
-   }
-   if(theUrVertex == v)
-   {
-      theUrVertex = NULL;
-      v->removeNode(this);
-   }
-   if(theLrVertex == v)
-   {
-      theLrVertex = NULL;
-      v->removeNode(this);
-   }
-   if(theLlVertex == v)
-   {
-      theLlVertex = NULL;
-      v->removeNode(this);
-   }
-}
-void ossimQuadTreeWarpNode::removeVertices()
-{
-   removeVertex(theUlVertex);
-   removeVertex(theUrVertex);
-   removeVertex(theLrVertex);
-   removeVertex(theLlVertex);
-}
-
-bool ossimQuadTreeWarpNode::isLeaf()const
-{
-   return (theChildren.size() == 0);
-}
-
-void ossimQuadTreeWarpNode::clear()
-{
-   theBoundingRect.makeNan();
-   theChildren.clear();
-   theParent = NULL;
-   removeVertex(theUlVertex);
-   removeVertex(theUrVertex);
-   removeVertex(theLrVertex);
-   removeVertex(theLlVertex);
-}
-
-void ossimQuadTreeWarpNode::removeChild(ossimQuadTreeWarpNode* node)
-{
-   std::vector<ossimQuadTreeWarpNode*>::iterator iter =  theChildren.begin();
-
-   while(iter != theChildren.end())
-   {
-      if(*iter == node)
-      {
-         theChildren.erase(iter);
-         return;
-      }
-      ++iter;
-   }
-}
-
-bool ossimQuadTreeWarpNode::saveState(ossimKeywordlist& kwl,
-                                      const char* prefix)const
-{
-   kwl.add(prefix,
-           ossimKeywordNames::UL_X_KW,
-           theBoundingRect.ul().x,
-           true);
-   kwl.add(prefix,
-           ossimKeywordNames::UL_Y_KW,
-           theBoundingRect.ul().y,
-           true);
-   kwl.add(prefix,
-           ossimKeywordNames::LR_X_KW,
-           theBoundingRect.lr().x,
-           true);
-   kwl.add(prefix,
-           ossimKeywordNames::LR_Y_KW,
-           theBoundingRect.lr().y,
-           true);
-   
-   return true;
-}
-
-bool ossimQuadTreeWarpNode::loadState(const ossimKeywordlist& kwl,
-                                      const char* prefix)
-{
-   const char* ul_x = kwl.find(prefix, ossimKeywordNames::UL_X_KW);
-   const char* ul_y = kwl.find(prefix, ossimKeywordNames::UL_Y_KW);
-   const char* lr_x = kwl.find(prefix, ossimKeywordNames::LR_X_KW);
-   const char* lr_y = kwl.find(prefix, ossimKeywordNames::LR_Y_KW);
-
-   if(ul_x&&ul_y&&lr_x&&lr_y)
-   {
-      theBoundingRect = ossimDrect(ossimString(ul_x).toDouble(),
-                                   ossimString(ul_y).toDouble(),
-                                   ossimString(lr_x).toDouble(),
-                                   ossimString(lr_y).toDouble());
-      return true;
-   }
-   
-   return false;
-}
-
-
-ossimQuadTreeWarp::ossimQuadTreeWarp()
-   :theTree(NULL)
-{
-}
-
-ossimQuadTreeWarp::ossimQuadTreeWarp(const ossimDrect& boundingRect,
-                                     const ossimDpt& ulShift,
-                                     const ossimDpt& urShift,
-                                     const ossimDpt& lrShift,
-                                     const ossimDpt& llShift)
-   :theTree(NULL)
-{
-   create(boundingRect, ulShift, urShift, lrShift, llShift);
-}
-
-ossimQuadTreeWarp::ossimQuadTreeWarp(const ossimQuadTreeWarp& rhs)
-   :ossim2dTo2dTransform(),
-    theWarpEnabledFlag(true),
-    theTree(NULL)
-{
-   ossimKeywordlist kwl;
-   
-   rhs.saveState(kwl);
-   
-   loadState(kwl);
-}
-
-ossimObject* ossimQuadTreeWarp::dup()const
-{
-   return new ossimQuadTreeWarp(*this);
-}
-
-ossimQuadTreeWarp::~ossimQuadTreeWarp()
-{
-   clear();
-}
-   
-ossimDpt ossimQuadTreeWarp::getOrigin()const
-{
-   if(!isEmpty())
-   {
-      if(!theTree->theBoundingRect.hasNans())
-      {
-         return theTree->theBoundingRect.midPoint();
-      }
-      
-   }
-   
-   return ossimDpt(0,0);
-}
-
-void ossimQuadTreeWarp::create(const ossimDrect& boundingRect,
-                               const ossimDpt& ulShift,
-                               const ossimDpt& urShift,
-                               const ossimDpt& lrShift,
-                               const ossimDpt& llShift)
-{
-   clear();
-
-   theTree = new ossimQuadTreeWarpNode(boundingRect);
-
-   ossimQuadTreeWarpVertex* ul = new ossimQuadTreeWarpVertex(boundingRect.ul(),
-                                                             ulShift);
-   ossimQuadTreeWarpVertex* ur = new ossimQuadTreeWarpVertex(boundingRect.ur(),
-                                                             urShift);
-   ossimQuadTreeWarpVertex* lr = new ossimQuadTreeWarpVertex(boundingRect.lr(),
-                                                             lrShift);
-   ossimQuadTreeWarpVertex* ll = new ossimQuadTreeWarpVertex(boundingRect.ll(),
-                                                             llShift);
-   ul->addSharedNode(theTree);
-   ur->addSharedNode(theTree);
-   lr->addSharedNode(theTree);
-   ll->addSharedNode(theTree);
-
-   theVertexList.push_back(ul);
-   theVertexList.push_back(ur);
-   theVertexList.push_back(lr);
-   theVertexList.push_back(ll);
-   
-   theTree->theUlVertex = ul;
-   theTree->theUrVertex = ur;
-   theTree->theLrVertex = lr;
-   theTree->theLlVertex = ll;
-   
-}
-
-void ossimQuadTreeWarp::printVertices(std::ostream& out)const
-{
-   for(ossim_uint32 i = 0; i < theVertexList.size();++i)
-   {
-      out << *theVertexList[i] << "\n";
-   }
-}
-
-ossimQuadTreeWarpNode* ossimQuadTreeWarp::getRoot()
-{
-   return theTree;
-}
-
-const ossimQuadTreeWarpNode* ossimQuadTreeWarp::getRoot()const
-{
-   return theTree;
-}
-
-bool ossimQuadTreeWarp::isEmpty()const
-{
-   return (theTree==NULL);
-}
-
-std::ostream& ossimQuadTreeWarp::print(std::ostream& out) const
-{
-   if(!isEmpty())
-   {
-      out << "___________VERTEX LIST____________________\n";
-      printVertices(out);
-      out << "___________TREE LIST____________________\n";
-      
-      recursivePrint(out, theTree);
-   }
-   else
-   {
-      out << "<empty tree>\n";
-   }
-   return out;
-}
-
-ossimQuadTreeWarpVertex* ossimQuadTreeWarp::findClosestVertex(ossimDpt& position)
-{
-   if(position.hasNans()) return (ossimQuadTreeWarpVertex*)NULL;
-      
-   double dist = 1.0/DBL_EPSILON;
-   ossimQuadTreeWarpVertex* result = (ossimQuadTreeWarpVertex*)NULL;
-   for(ossim_uint32 i = 0; i < theVertexList.size(); ++i)
-   {
-      double d = (position-theVertexList[i]->thePosition).length();
-      if( d < dist)
-      {
-         result = theVertexList[i];
-         dist = d;
-      }
-   }
-
-   return result;
-//    ossimQuadTreeWarpNode* node = findNode(position);
-
-//    if(node&&node->hasValidVertices())
-//    {
-//       double ulDist = (position-node->theUlVertex->thePosition).length();
-//       double urDist = (position-node->theUrVertex->thePosition).length();
-//       double lrDist = (position-node->theLrVertex->thePosition).length();
-//       double llDist = (position-node->theLlVertex->thePosition).length();
-
-//       double minDist = std::min(ulDist, std::min(urDist, std::min(lrDist, llDist)));
-
-//       if(minDist == ulDist)
-//       {
-//          return node->theUlVertex;
-//       }
-//       else if(minDist == urDist)
-//       {
-//          return node->theUrVertex;
-//       }
-//       else if(minDist == lrDist)
-//       {
-//          return node->theLrVertex;
-//       }
-//       else if(minDist == llDist)
-//       {
-//          return node->theLlVertex;
-//       }
-//    }
-
-//    return ((ossimQuadTreeWarpVertex*)NULL);
-}
-
-
-ossimQuadTreeWarpVertex* ossimQuadTreeWarp::findVertex(const ossimDpt& position)
-{
-   ossim_uint32 i = 0;
-   ossimQuadTreeWarpVertex* result = (ossimQuadTreeWarpVertex*)NULL;
-   ossimQuadTreeWarpNode*   currentNode = theTree;
-   
-   if((currentNode)&&
-      (currentNode->theBoundingRect.pointWithin(position)))
-   {
-      while((currentNode)&&
-            (!currentNode->isLeaf()))
-      {
-         for(i = 0; i < currentNode->theChildren.size(); ++i)
-         {
-            if(currentNode->theChildren[i]->theBoundingRect.pointWithin(position))
-            {
-               currentNode = currentNode->theChildren[i];
-               break;
-            }
-         }
-      }
-
-      if(currentNode&&currentNode->hasValidVertices())
-      {
-         if(currentNode->theUlVertex->thePosition == position)
-         {
-            result = currentNode->theUlVertex;
-         }
-         else if(currentNode->theUrVertex->thePosition == position)
-         {
-            result = currentNode->theUrVertex;            
-         }
-         else if(currentNode->theLrVertex->thePosition == position)
-         {
-            result = currentNode->theLrVertex;
-         }
-         else if(currentNode->theLlVertex->thePosition == position)
-         {
-            result = currentNode->theLlVertex;
-         }
-      }
-               
-   }
-
-   return result;   
-}
-
-ossimQuadTreeWarpVertex* ossimQuadTreeWarp::getVertex(const ossimDpt& position)
-{
-   std::vector<ossimQuadTreeWarpVertex*>::iterator iter = theVertexList.begin();
-
-   while(iter != theVertexList.end())
-   {
-      if(position == (*iter)->getPosition())
-      {
-         return (*iter);
-      }
-      ++iter;
-   }
-   
-   return (ossimQuadTreeWarpVertex*)NULL;
-}
-
-void ossimQuadTreeWarp::clear()
-{
-   if(theTree)
-   {     
-      recursiveDelete(theTree);
-      theTree = NULL;
-   }
-
-   for(ossim_uint32 i = 0; i < theVertexList.size(); ++i)
-   {
-      delete theVertexList[i];
-   }
-   
-   theVertexList.clear();
-}
-
-void ossimQuadTreeWarp::forward(const ossimDpt& pt,
-                                ossimDpt& result)const
-{
-   if(theWarpEnabledFlag)
-   {
-      ossimDpt shift;
-      
-      getShift(shift,
-               pt);
-      
-      result = pt + shift;
-   }
-   else
-   {
-      result = pt;
-   }
-}
-
-void ossimQuadTreeWarp::forward(ossimDpt& pt)const
-{
-   if(theWarpEnabledFlag)
-   {
-      ossimDpt shift;
-      
-      getShift(shift,
-               pt);
-      
-      pt += shift;
-   }
-}
-
-void ossimQuadTreeWarp::getShift(ossimDpt& result,
-                                 const ossimDpt& pt)const
-{
-   getShift(result,
-            findNode(pt),
-            pt);
-}
-
-void ossimQuadTreeWarp::split(const ossimDpt& point,
-                              double splitHoriCoefficient,
-                              double splitVertCoefficient)
-{
-   ossimQuadTreeWarpNode* node = findNode(point);
-
-   if(node)
-   {
-      if(splitHoriCoefficient == 0.0)
-      {
-         splitHoriCoefficient = (point.x - node->theBoundingRect.ul().x)/
-                                node->theBoundingRect.width();
-      }
-      if(splitVertCoefficient == 0.0)
-      {
-         splitVertCoefficient = (point.y - node->theBoundingRect.ul().y)/
-                                node->theBoundingRect.height();
-      }
-      split(node,
-            splitHoriCoefficient,
-            splitVertCoefficient);
-   }
-}
-
-
-void ossimQuadTreeWarp::split(ossimQuadTreeWarpNode* node,
-                              double splitHoriCoefficient,
-                              double splitVertCoefficient)
-{
-   if(!node) return;
-
-   splitHoriCoefficient = splitHoriCoefficient>1?1:splitHoriCoefficient;
-   splitHoriCoefficient = splitHoriCoefficient<0?0:splitHoriCoefficient;
-   splitVertCoefficient = splitVertCoefficient>1?1:splitVertCoefficient;
-   splitVertCoefficient = splitVertCoefficient<0?0:splitVertCoefficient;
-
-   if( ((splitHoriCoefficient == 0)&&(splitVertCoefficient == 0)) ||
-       ((splitHoriCoefficient == 1)&&(splitVertCoefficient == 1)))
-   {
-      return;
-   }
-
-   if(node->isLeaf())
-   {
-      if(node->theBoundingRect.hasNans())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)  << "WARNING: " << "ossimQuadTreeWarp::split, Node has nans for the rect and can't split\n";
-      }
-      else
-      {
-         ossimDpt ul = node->theBoundingRect.ul();
-         ossimDpt ur = node->theBoundingRect.ur();
-         ossimDpt lr = node->theBoundingRect.lr();
-         ossimDpt ll = node->theBoundingRect.lr();
-         
-         
-         double xmid = ul.x + (ur.x - ul.x)*splitHoriCoefficient;
-         double ymid = ul.y + (ll.y - ul.y)*splitVertCoefficient;
-         
-         ossimDpt left(ul.x, ymid);
-         
-         ossimDpt right(ur.x,
-                        ymid);
-         
-         ossimDpt top(xmid,
-                      ul.y);
-         
-         ossimDpt bottom(xmid,
-                         lr.y);
-
-
-         ossimDrect ulRect(ul.x,
-                           ul.y,
-                           xmid,
-                           ymid);
-         
-         ossimDrect urRect(top.x,
-                           top.y,
-                           right.x,
-                           right.y);
-         
-         ossimDrect lrRect(xmid,
-                           ymid,
-                           lr.x,
-                           lr.y);
-         
-         ossimDrect llRect(left.x,
-                           left.y,
-                           bottom.x,
-                           bottom.y);
-         
-         ossimQuadTreeWarpNode* ulNode=(ossimQuadTreeWarpNode*)NULL;
-         ossimQuadTreeWarpNode* urNode=(ossimQuadTreeWarpNode*)NULL;
-         ossimQuadTreeWarpNode* lrNode=(ossimQuadTreeWarpNode*)NULL;
-         ossimQuadTreeWarpNode* llNode=(ossimQuadTreeWarpNode*)NULL;
-
-         getNewQuads(node,
-                     ulRect,
-                     urRect,
-                     lrRect,
-                     llRect,
-                     ulNode,
-                     urNode,
-                     lrNode,
-                     llNode);
-
-         if(ulNode&&urNode&&lrNode&&llNode)
-         {
-            node->theChildren.push_back(ulNode);
-            node->theChildren.push_back(urNode);
-            node->theChildren.push_back(lrNode);
-            node->theChildren.push_back(llNode);            
-            
-            // it's no longer a leaf so remove the vertices
-            // from the list
-            node->removeVertex(node->theUlVertex);
-            node->removeVertex(node->theUrVertex);
-            node->removeVertex(node->theLrVertex);
-            node->removeVertex(node->theLlVertex);
-         }         
-      }
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "WARNING: " << "ossimQuadTreeWarp::split, can only split leaf nodes\n";
-   }
-   
-   updateAllVericeLockFlags();
-}
-
-void ossimQuadTreeWarp::getNewQuads(ossimQuadTreeWarpNode* parent,
-                                    const ossimDrect& ul,
-                                    const ossimDrect& ur,
-                                    const ossimDrect& lr,
-                                    const ossimDrect& ll,
-                                    ossimQuadTreeWarpNode*& ulNode,
-                                    ossimQuadTreeWarpNode*& urNode,
-                                    ossimQuadTreeWarpNode*& lrNode,
-                                    ossimQuadTreeWarpNode*& llNode)
-{
-   ossimDpt midShift;
-   getShift(midShift,
-            parent,
-            ul.lr());
-   
-   ossimQuadTreeWarpVertex* midV = new ossimQuadTreeWarpVertex(ul.lr(),
-                                                               midShift);
-
-   ulNode = new ossimQuadTreeWarpNode(ul,
-                                      parent);
-   urNode = new ossimQuadTreeWarpNode(ur,
-                                      parent);
-   lrNode = new ossimQuadTreeWarpNode(lr,
-                                      parent);
-   llNode = new ossimQuadTreeWarpNode(ll,
-                                      parent);
-
-   midV->addSharedNode(ulNode);
-   midV->addSharedNode(urNode);
-   midV->addSharedNode(lrNode);
-   midV->addSharedNode(llNode);
-   
-   // get the shared vertices first.  We will add ourself
-   // to the pointer list. when we construct
-   // the quad nodes.  Note the mid point will be shared
-   // by all quads and will be marked as adjustable
-   //
-   ossimQuadTreeWarpVertex* ulSharedV = getVertex(ul.ul());
-   ossimQuadTreeWarpVertex* urSharedV = getVertex(ur.ur());
-   ossimQuadTreeWarpVertex* lrSharedV = getVertex(lr.lr());
-   ossimQuadTreeWarpVertex* llSharedV = getVertex(ll.ll());
-   
-   if(!ulSharedV||
-      !urSharedV||
-      !lrSharedV||
-      !llSharedV)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL: " << "ossimQuadTreeWarp::split, can't locating shared vertices.  This Shouldn't happen!!!\n";
-      return;
-   }
-
-   // we know that the midpoint is new and is shared by all quads
-   // so we have 2 more to check
-   ossimQuadTreeWarpVertex* topSharedV    = getVertex(ul.ur());
-   ossimQuadTreeWarpVertex* bottomSharedV = getVertex(lr.ll());
-
-   ossimQuadTreeWarpVertex* leftSharedV   = getVertex(ul.ll());
-   ossimQuadTreeWarpVertex* rightSharedV  = getVertex(ur.lr());
-   
-   ossimDpt tempShift;
-   
-   if(!topSharedV)
-   {
-      getShift(tempShift, parent, ul.ur());
-      topSharedV = new ossimQuadTreeWarpVertex(ul.ur(),
-                                               tempShift);
-      theVertexList.push_back(topSharedV);
-   }
-   if(!bottomSharedV)
-   {
-      getShift(tempShift, parent, ll.lr());
-      bottomSharedV = new ossimQuadTreeWarpVertex(ll.lr(),
-                                                  tempShift);
-      
-      theVertexList.push_back(bottomSharedV);
-   }
-   if(!leftSharedV)
-   {
-      getShift(tempShift, parent, ul.ll());
-      leftSharedV = new ossimQuadTreeWarpVertex(ul.ll(),
-                                               tempShift);
-      theVertexList.push_back(leftSharedV);
-   }
-   if(!rightSharedV)
-   {
-      getShift(tempShift, parent, ur.lr());
-      rightSharedV = new ossimQuadTreeWarpVertex(ur.lr(),
-                                               tempShift);
-      theVertexList.push_back(rightSharedV);
-   }
-   theVertexList.push_back(midV);
-
-   topSharedV->addSharedNode(ulNode);
-   topSharedV->addSharedNode(urNode);
-   
-   bottomSharedV->addSharedNode(llNode);
-   bottomSharedV->addSharedNode(lrNode);
-   leftSharedV->addSharedNode(ulNode);
-   leftSharedV->addSharedNode(llNode);
-   rightSharedV->addSharedNode(urNode);
-   rightSharedV->addSharedNode(lrNode);
-
-   ulSharedV->addSharedNode(ulNode); 
-   urSharedV->addSharedNode(urNode);
-   lrSharedV->addSharedNode(lrNode);
-   llSharedV->addSharedNode(llNode);
-  
-   ulNode->theUlVertex = ulSharedV;
-   ulNode->theUrVertex = topSharedV;
-   ulNode->theLrVertex = midV;
-   ulNode->theLlVertex = leftSharedV;
-
-   urNode->theUlVertex = topSharedV;
-   urNode->theUrVertex = urSharedV;
-   urNode->theLrVertex = rightSharedV;
-   urNode->theLlVertex = midV;
-
-   lrNode->theUlVertex = midV;
-   lrNode->theUrVertex = rightSharedV;
-   lrNode->theLrVertex = lrSharedV;
-   lrNode->theLlVertex = bottomSharedV;
-
-   llNode->theUlVertex = leftSharedV;
-   llNode->theUrVertex = midV;
-   llNode->theLrVertex = bottomSharedV;
-   llNode->theLlVertex = llSharedV;   
-}
-
-void ossimQuadTreeWarp::getShift(ossimDpt& result,
-                                 const ossimQuadTreeWarpNode* node,
-                                 const ossimDpt& pt)const
-{
-   result.x = 0.0;
-   result.y = 0.0;
-
-   if(!node)
-   {
-      return;
-   }
-   if(!node->isLeaf())
-   {
-      return;
-   }
-
-   if(node->hasValidVertices())
-   {
-      ossimDpt ulShift = node->theUlVertex->getDelta();
-      ossimDpt urShift = node->theUrVertex->getDelta();
-      ossimDpt lrShift = node->theLrVertex->getDelta();
-      ossimDpt llShift = node->theLlVertex->getDelta();
-
-      ossimDpt ul = node->theBoundingRect.ul();
-      ossimDpt ur = node->theBoundingRect.ur();
-      ossimDpt ll = node->theBoundingRect.ll();
-      
-      double horizontalPercent = fabs((pt.x-ul.x))/
-                                 (ur.x-ul.x);
-      
-      double verticalPercent   = fabs((pt.y - ul.y))/
-                                 (ll.y-ul.y);
-
-      ossimDpt upper = ulShift + (urShift - ulShift)*horizontalPercent;
-      ossimDpt lower = llShift + (lrShift - llShift)*horizontalPercent;
-      
-      result = upper + (lower - upper)*verticalPercent;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "WARNING: ossimQuadTreeWarp::getShift, " << "Node does not have valid vertices in ossimQuadTreeWarp::getShift\n";
-   }
-}
-
-void ossimQuadTreeWarp::pruneTree(ossimQuadTreeWarpNode* node)
-{
-   if(node&&
-      !node->isLeaf())
-   {
-      ossimQuadTreeWarpVertex* ulV = getVertex(node->theBoundingRect.ul());
-      ossimQuadTreeWarpVertex* urV = getVertex(node->theBoundingRect.ur());
-      ossimQuadTreeWarpVertex* lrV = getVertex(node->theBoundingRect.lr());
-      ossimQuadTreeWarpVertex* llV = getVertex(node->theBoundingRect.ll());
-      
-      recursivePruneTree(node);
-
-      if(ulV&&urV&&lrV&&llV)
-      {
-         node->theUlVertex = ulV;
-         node->theUrVertex = urV;
-         node->theLrVertex = lrV;
-         node->theLlVertex = llV;
-
-         ulV->addSharedNode(node);
-         urV->addSharedNode(node);
-         lrV->addSharedNode(node);
-         llV->addSharedNode(node);
-      }
-      else
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << "WARNING: ossimQuadTreeWarp::pruneTree, invlaid vertex find\n";
-      }
-      pruneSharedVertices();
-      updateAllVericeLockFlags();
-   }
-}
-
-void ossimQuadTreeWarp::recursivePruneTree(ossimQuadTreeWarpNode* node)
-{
-   if(!node||node->isLeaf()) return;
-   
-   for(ossim_uint32 i = 0; i < node->theChildren.size(); ++i)
-   {
-      recursivePruneTree(node->theChildren[i]);
-      delete node->theChildren[i];
-      node->theChildren[i] = NULL;
-   }
-   node->theChildren.clear();
-}
-
-
-ossimQuadTreeWarpNode* ossimQuadTreeWarp::findNode(const ossimDpt& pt)
-{
-   if((!pt.hasNans())&&(!isEmpty()))
-   {
-      if(theTree->theBoundingRect.pointWithin(pt))
-      {
-         return findNode(theTree,
-                         pt);
-      }
-   }
-   
-   return (ossimQuadTreeWarpNode*)NULL;
-}
-
-ossimDpt ossimQuadTreeWarp::getShift(const ossimDpt& pt)const
-{
-   ossimDpt result;
-   
-   getShift(result, pt);
-   
-   return result;
-}
-
-const ossimQuadTreeWarpNode* ossimQuadTreeWarp::findNode(const ossimDpt& pt)const
-{
-   if((!pt.hasNans())&&(!isEmpty()))
-   {
-      if(theTree->theBoundingRect.pointWithin(pt))
-      {
-         return findNode(theTree,
-                         pt);
-      }
-   }
-   
-   return (const ossimQuadTreeWarpNode*)NULL;
-}
-
-ossimQuadTreeWarpNode* ossimQuadTreeWarp::findNode(ossimQuadTreeWarpNode* node,
-                                                   const ossimDpt& pt)
-{
-   ossimQuadTreeWarpNode* result = (ossimQuadTreeWarpNode*)NULL;
-   
-   if(!node)
-   {
-      return result;
-   }
-   if(node->isLeaf())
-   {
-      result = node;
-   }
-   else
-   {
-      bool found = false;
-      for(ossim_uint32 i = 0; (i < node->theChildren.size())&&(!found); ++i)
-      {
-         if(node->theChildren[i]->theBoundingRect.pointWithin(pt))
-         {
-            result = findNode(node->theChildren[i],
-                              pt);
-            found = true;
-         }
-      }
-   }
-
-   return result;
-}
-
-void ossimQuadTreeWarp::findAllNodes(std::vector<ossimQuadTreeWarpNode*>& result,
-                                     const ossimDpt& pt)
-{
-   if((!pt.hasNans())&&(!isEmpty()))
-   {
-      if(theTree->theBoundingRect.pointWithin(pt))
-      {
-         findAllNodes(result,
-                      theTree,
-                      pt);
-      }
-   }
-   
-}
-
-void ossimQuadTreeWarp::findAllNodes(std::vector<const ossimQuadTreeWarpNode*>& result,
-                                     const ossimDpt& pt)const
-{
-   if(!pt.hasNans()&&(!isEmpty()))
-   {
-      if(theTree->theBoundingRect.pointWithin(pt))
-      {
-         findAllNodes(result,
-                      theTree,
-                      pt);
-      }
-   }
-   
-}
-
-const ossimQuadTreeWarpNode* ossimQuadTreeWarp::findNode(const ossimQuadTreeWarpNode* node,
-                                                         const ossimDpt& pt)const
-{
-   const ossimQuadTreeWarpNode* result = (const ossimQuadTreeWarpNode*)NULL;
-   
-   if(!node)
-   {
-      return result;
-   }
-   if(node->isLeaf())
-   {
-      result = node;
-   }
-   else
-   {
-      bool found = false;
-      for(ossim_uint32 i = 0; (i < node->theChildren.size())&&(!found); ++i)
-      {
-         if(node->theChildren[i]->theBoundingRect.pointWithin(pt))
-         {
-            result = findNode(node->theChildren[i],
-                              pt);
-            found = true;
-         }
-      }
-   }
-
-   return result;
-}
-
-void ossimQuadTreeWarp::findAllNodes(std::vector<ossimQuadTreeWarpNode*>& result,
-                                     ossimQuadTreeWarpNode* node,
-                                     const ossimDpt& pt)
-{   
-   if(node->isLeaf())
-   {
-      result.push_back(node);
-   }
-   else
-   {
-      for(ossim_uint32 i = 0;
-          i < node->theChildren.size();
-          ++i)
-      {
-         if(node->theChildren[i]->theBoundingRect.pointWithin(pt))
-         {
-            findAllNodes(result,
-                         node->theChildren[i],
-                         pt);
-         }
-      }
-   }
-}
-
-void ossimQuadTreeWarp::findAllNodes(std::vector<const ossimQuadTreeWarpNode*>& result,
-                                     ossimQuadTreeWarpNode* node,
-                                     const ossimDpt& pt)const
-{   
-   if(!node) return;
-   if(node->isLeaf())
-   {
-      result.push_back(node);
-   }
-   else
-   {
-      for(ossim_uint32 i = 0;
-          i < node->theChildren.size();
-          ++i)
-      {
-         if(node->theChildren[i]->theBoundingRect.pointWithin(pt))
-         {
-            findAllNodes(result,
-                         node->theChildren[i],
-                         pt);
-         }
-      }
-   }
-}
-void ossimQuadTreeWarp::pruneSharedVertices()
-{
-   std::vector<ossimQuadTreeWarpVertex*>::iterator iter = theVertexList.begin();
-
-   while(iter != theVertexList.end())
-   {
-      if( !(*iter)->isShared())
-      {
-         delete (*iter);
-         iter = theVertexList.erase(iter);
-      }
-      else
-      {
-         ++iter;
-      }
-   }
-}
-
-void ossimQuadTreeWarp::removeSharedVertex(ossimQuadTreeWarpVertex* v)
-{
-   std::vector<ossimQuadTreeWarpVertex*>::iterator iter = std::find(theVertexList.begin(),
-                                                                    theVertexList.end(),
-                                                                    v);
-   if(iter != theVertexList.end())
-   {
-      delete (*iter);
-      iter = theVertexList.erase(iter);
-   }
-}
-
-
-void ossimQuadTreeWarp::recursivePrint(std::ostream& out,
-                                       ossimQuadTreeWarpNode* node)const
-{
-   if(node)
-   {
-      out << (*node) << "\n";
-   }
-
-   if(!node->isLeaf())
-   {
-      for(ossim_uint32 i =0; i < node->theChildren.size();++i)
-      {
-         recursivePrint(out, node->theChildren[i]);
-      }
-   }
-}
-
-void ossimQuadTreeWarp::recursiveDelete(ossimQuadTreeWarpNode* node)
-{
-   if(node->isLeaf())
-   {
-      delete node;
-   }
-   else
-   {
-      for(ossim_uint32 i = 0; i < node->theChildren.size(); ++ i)
-      {
-         recursiveDelete(node->theChildren[i]);
-      }
-      
-      delete node;
-   }
-}
- 
-bool ossimQuadTreeWarp::isOnEdge(ossimQuadTreeWarpNode* node,
-                                 const ossimDpt& point)const
-{
-   if(!node) return false;
-
-   if(node->theBoundingRect.pointWithin(point))
-   {
-      double minx, maxx;
-      double miny, maxy;
-      node->theBoundingRect.getBounds(minx, miny, maxx, maxy);
-
-      return ( (point.x == minx) ||
-               (point.x == miny) ||
-               (point.y == miny) ||
-               (point.y == maxy) );
-   }
-
-   return false;
-}
-
-bool ossimQuadTreeWarp::isOnPoint(ossimQuadTreeWarpNode* node,
-                                 const ossimDpt& point)const
-{
-   if(!node) return false;
-
-   return ( (point == node->theBoundingRect.ul())||
-            (point == node->theBoundingRect.ur())||
-            (point == node->theBoundingRect.lr())||
-            (point == node->theBoundingRect.ll()) );
-}
-
-void ossimQuadTreeWarp::updateLockFlag(ossimQuadTreeWarpVertex* v)
-{
-   std::vector<ossimQuadTreeWarpNode*> nodeList;
-   
-   findAllNodes(nodeList,
-                v->getPosition());
-
-   if(nodeList.size() != v->theSharedNodeList.size())
-   {
-      if(isOnEdge(theTree, v->getPosition()))
-      {
-         v->theLockedFlag = false;
-      }
-      else
-      {
-         v->theLockedFlag = true;
-      }
-   }
-   else
-   {
-      v->theLockedFlag = false;
-   }
-
-   // if the original was not locked
-   // then we need to make sure we change the delta
-   // along the locked edge so to produce no artifacts
-   //
-   if(v->theLockedFlag)
-   {
-      updateDelta(v);
-   }
-}
-
-void ossimQuadTreeWarp::updateDelta(ossimQuadTreeWarpVertex* v)
-{
-   ossimQuadTreeWarpVertex* top    = NULL;
-   ossimQuadTreeWarpVertex* bottom = NULL;
-   ossimQuadTreeWarpVertex* left   = NULL;
-   ossimQuadTreeWarpVertex* right  = NULL;
-
-   std::vector<ossimQuadTreeWarpVertex*>::iterator iter = theVertexList.begin();
-   
-   while(iter != theVertexList.end())
-   {
-      ossimQuadTreeWarpVertex* testV = (*iter);
-
-      // test along the vertical
-      if( (testV->thePosition.x == v->thePosition.x)&&
-          (testV->thePosition.y != v->thePosition.y)&&
-          (!testV->theLockedFlag))
-      {
-         if(testV->thePosition.y >  v->thePosition.y)
-         {
-            if(bottom)
-            {
-               if(bottom->thePosition.y > testV->thePosition.y)
-               {
-                  bottom = testV;
-               }
-            }
-            else
-            {
-               bottom = testV;
-            }
-         }
-         else
-         {
-            if(top)
-            {
-               if(top->thePosition.y < testV->thePosition.y)
-               {
-                  top = testV;
-               }
-            }
-            else
-            {
-               top = testV;
-            }            
-         }
-      }
-
-      if( (testV->thePosition.y == v->thePosition.y)&&
-          (testV->thePosition.x != v->thePosition.x)&&
-          (!testV->theLockedFlag))
-      {
-         if(testV->thePosition.x >  v->thePosition.x)
-         {
-            if(right)
-            {
-               if(right->thePosition.x > testV->thePosition.x)
-               {
-                  right = testV;
-               }
-            }
-            else
-            {
-               right = testV;
-            }
-         }
-         else
-         {
-            if(left)
-            {
-               if(left->thePosition.x < testV->thePosition.x)
-               {
-                  left = testV;
-               }
-            }
-            else
-            {
-               left = testV;
-            }            
-         }
-      }
-      
-      ++iter;
-   }
-   ossimDpt topBottomDelta;
-   ossimDpt leftRightDelta;
-
-   topBottomDelta.makeNan();
-   leftRightDelta.makeNan();
-   
-   if(top&&bottom)
-   {
-      double t = (v->thePosition.y - top->thePosition.y)/
-                 (bottom->thePosition.y - top->thePosition.y);
-      
-      topBottomDelta = top->theDelta + (bottom->theDelta-top->theDelta)*t;
-      v->theDelta = topBottomDelta;
-      
-   }
-   if(left&&right)
-   {
-      double t = (v->thePosition.x - left->thePosition.x)/
-                 (right->thePosition.x - left->thePosition.x);
-      
-      leftRightDelta = left->theDelta + (right->theDelta-left->theDelta)*t;
-      v->theDelta = leftRightDelta;
-   }
-
-   if(top&&bottom&&left&&right)
-   {
-      v->theDelta = (topBottomDelta+leftRightDelta)*.5;
-   }
-}
-   
-void ossimQuadTreeWarp::updateAllVericeLockFlags()
-{
-   std::vector<ossimQuadTreeWarpVertex*>::iterator iter = theVertexList.begin();
-
-   while(iter != theVertexList.end())
-   {
-      if(*iter)
-      {
-         updateLockFlag(*iter);
-      }
-      
-      ++iter;
-   }
-}
-
-const std::vector<ossimQuadTreeWarpVertex*>& ossimQuadTreeWarp::getVertices()const
-{
-   return theVertexList;
-}
-
-void ossimQuadTreeWarp::setWarpEnabledFlag(bool flag)
-{
-   theWarpEnabledFlag = flag;
-}
-
-void ossimQuadTreeWarp::setToIdentity()
-{
-   for(ossim_uint32 i = 0; i < theVertexList.size(); ++i)
-   {
-      theVertexList[i]->theDelta = ossimDpt(0,0);
-   }
-}
-
-bool ossimQuadTreeWarp::saveState(ossimKeywordlist& kwl,
-                                  const char* prefix)const
-{
-   for(ossim_uint32 i = 0; i < theVertexList.size(); ++i)
-   {
-      ossimString newPrefix = ossimString(prefix)+ "v" + ossimString::toString(i) +".";
-
-      theVertexList[i]->saveState(kwl, newPrefix.c_str());
-   }
-
-   recursiveSave(theTree, kwl, prefix);
-   
-   return ossim2dTo2dTransform::saveState(kwl, prefix);   
-}
-
-bool ossimQuadTreeWarp::loadState(const ossimKeywordlist& kwl,
-                                  const char* prefix)
-{
-   clear();
-   ossimString newPrefix = ossimString(prefix);
-
-   // load the vertices first
-   //
-   ossimString regExpression =  ossimString("^(") + newPrefix + "v[0-9]+\\.)";
-
-   ossim_uint32 result = kwl.getNumberOfSubstringKeys(regExpression);
-   
-   ossim_uint32 numberOfMatches = 0;
-   ossim_uint32 count = 0;
-   while(numberOfMatches < result)
-   {
-      ossimString newPrefix = ossimString(prefix)+ossimString("v") + ossimString::toString(count) +".";
-      
-      ossimQuadTreeWarpVertex* vert = new ossimQuadTreeWarpVertex;
-      
-      if(!vert->loadState(kwl, newPrefix.c_str()))
-      {
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL: "<< " ossimQuadTreeWarp::loadState, invalid load on vertex\n";
-         delete vert;
-         clear();
-         
-         return false;
-      }
-      else
-      {
-         ++numberOfMatches;
-         theVertexList.push_back(vert);
-      }
-      
-      ++count;
-   }
-
-   theTree = new ossimQuadTreeWarpNode;
-
-   if(!theTree->loadState(kwl, prefix))
-   {
-      clear();
-      return false;
-   }
-   if(!recursiveLoad(theTree, kwl, prefix))
-   {
-      clear();
-      return false;
-   }
-   
-   if(!ossim2dTo2dTransform::loadState(kwl, prefix))
-   {
-      clear();
-      return false;
-   }
-
-   return true;
-}
-
-bool ossimQuadTreeWarp::recursiveSave(ossimQuadTreeWarpNode* node,
-                                      ossimKeywordlist& kwl,
-                                      const char* prefix)const
-{
-   if(!node) return false;
-   
-   if(!node->saveState(kwl,
-                      prefix))
-   {
-      return false;
-   }
-   
-   if(node->isLeaf())
-   {
-      return true;
-   }
-   else
-   {
-     for(ossim_uint32 i = 0; i < node->theChildren.size(); ++ i)
-       {
-	 ossimString newPrefix = ossimString(prefix) + ossimString::toString(i) + ".";
-      
-	 if(!recursiveSave(node->theChildren[i],
-                           kwl,
-                           newPrefix.c_str()))
-         {
-            return false;
-         }
-       }
-   }
-
-   return true;
-}
-
-bool ossimQuadTreeWarp::recursiveLoad(ossimQuadTreeWarpNode* node,
-                                      const ossimKeywordlist& kwl,
-                                      const char* prefix)
-{
-   if(!node) return false;
-   ossimString copyPrefix = prefix;
-   
-   ossimQuadTreeWarpNode* ul = new ossimQuadTreeWarpNode;
-   ossimQuadTreeWarpNode* ur = new ossimQuadTreeWarpNode;
-   ossimQuadTreeWarpNode* lr = new ossimQuadTreeWarpNode;
-   ossimQuadTreeWarpNode* ll = new ossimQuadTreeWarpNode;
-   
-   ossimString ulPre = copyPrefix + "0.";
-   ossimString urPre = copyPrefix + "1.";
-   ossimString lrPre = copyPrefix + "2.";
-   ossimString llPre = copyPrefix + "3.";
-
-   if(ul->loadState(kwl,
-                    ulPre.c_str()))
-   {
-      ul->theParent = node;
-      node->theChildren.push_back(ul);
-      recursiveLoad(ul,
-                    kwl,
-                    ulPre.c_str());
-   }
-   else
-   {
-      delete ul;
-      ul = NULL;
-   }
-   
-   if(ur->loadState(kwl,
-                    urPre.c_str()))
-   {
-      ur->theParent = node;
-      node->theChildren.push_back(ur);
-      recursiveLoad(ur,
-                    kwl,
-                    urPre.c_str());
-   }
-   else
-   {
-      delete ur;
-      ur = NULL;
-   }
-
-   if(lr->loadState(kwl,
-                    lrPre.c_str()))
-   {
-      lr->theParent = node;
-      node->theChildren.push_back(lr);
-      recursiveLoad(lr,
-                    kwl,
-                    lrPre.c_str());
-   }
-   else
-   {
-      delete lr;
-      lr = NULL;
-   }
-
-   if(ll->loadState(kwl,
-                    llPre.c_str()))
-   {
-      ll->theParent = node;
-      node->theChildren.push_back(ll);
-      recursiveLoad(ll,
-                    kwl,
-                    llPre.c_str());
-   }
-   else
-   {
-      delete ll;
-      ll = NULL;
-   }
-
-   if(node->isLeaf())
-   {
-      node->theUlVertex = getVertex(node->theBoundingRect.ul());
-      node->theUrVertex = getVertex(node->theBoundingRect.ur());
-      node->theLrVertex = getVertex(node->theBoundingRect.lr());
-      node->theLlVertex = getVertex(node->theBoundingRect.ll());
-
-      if(node->hasValidVertices())
-      {
-         node->theUlVertex->addSharedNode(node);
-         node->theUrVertex->addSharedNode(node);
-         node->theLrVertex->addSharedNode(node);
-         node->theLlVertex->addSharedNode(node);
-      }
-      else
-      {
-         return false;
-      }
-   }
-   
-   return true;
-}
-
-std::ostream& operator<<(std::ostream& out, const ossimQuadTreeWarpVertex& rhs)
-{
-   out << "Position:     " << rhs.thePosition
-       << "\nDelta:        " << rhs.theDelta
-       << "\nLocked flag:  " << rhs.theLockedFlag
-       << "\nShared nodes: " << rhs.theSharedNodeList.size() << std::endl;
-   
-   return out;
-}
-
-std::ostream& operator <<(std::ostream& out,
-                          const ossimQuadTreeWarpNode& rhs)
-{
-   out << "Bounding rect: " << rhs.theBoundingRect << std::endl;
-   
-   if(rhs.theUlVertex)
-   {
-      out << "ulVertex:\n" << *rhs.theUlVertex<< std::endl;
-   }
-   if(rhs.theUrVertex)
-   {
-      out << "urVertex:\n" << *rhs.theUrVertex<< std::endl;
-   }
-   if(rhs.theLrVertex)
-   {
-      out << "lrVertex:\n" << *rhs.theLrVertex<< std::endl;
-   }
-   if(rhs.theLlVertex)
-   {
-      out << "llVertex:\n" << *rhs.theLlVertex;
-   }
-   
-   return out;
-}
-
-std::ostream& operator<<(std::ostream& out, const ossimQuadTreeWarp& rhs)
-{
-   rhs.print(out);
-   
-   return out;
-}
-
diff --git a/src/ossim/base/ossimRectanglePartitioner.cpp b/src/ossim/base/ossimRectanglePartitioner.cpp
deleted file mode 100644
index 6d168fe..0000000
--- a/src/ossim/base/ossimRectanglePartitioner.cpp
+++ /dev/null
@@ -1,248 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (C) 2004 David Burken, all rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-// Utility class to partition up a rectangle.
-//
-// $Id: ossimRectanglePartitioner.cpp 9094 2006-06-13 19:12:40Z dburken $
-//----------------------------------------------------------------------------
-
-#include <ossim/base/ossimRectanglePartitioner.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimTrace.h>
-using namespace std;
-
-static ossimTrace traceDebug("ossimRectanglePartitioner:degug");
-
-ossimRectanglePartitioner::ossimRectanglePartitioner()
-{
-}
-
-ossimRectanglePartitioner::~ossimRectanglePartitioner()
-{
-}
-
-void ossimRectanglePartitioner::binaryPartition(
-   const ossimIrect& inputRectangle,
-   vector<ossimIrect>& result,
-   ossim_uint64 maxSizeInBytes,
-   ossim_uint32 bands,
-   ossim_uint32 bytesPerPixel,
-   ossim_uint32 internalOverlapPixels) const
-{
-   // Clear the result rect for starters.
-   result.clear();
-
-   // Some sanity checks.
-   if (maxSizeInBytes == 0)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "Waning:  0 passed for max size in bytes.  Returning..."
-         << endl;
-      return;
-   }
-   if (bands == 0)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "Waning:  0 passed for number of bands.  Returning..."
-         << endl;
-      return;
-   }
-   if (bytesPerPixel == 0)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "Waning:  0 passed for bytes per pixel.  Returning..."
-         << endl;
-      return;
-   }
-   if (inputRectangle.hasNans())
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "Waning:  Input rectangle has nans in it!  Returning..."
-         << endl;
-      return;
-   }
-   if ( (maxSizeInBytes / (bands*bytesPerPixel)) < 4)
-   {
-      // Come on now you have to have at least four pixels.
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "Waning:  Max size in bytes too small.  Returning..."
-         << endl;
-      return;
-   }
-   // End of sanity checks...
-
-   // Check the size... We could already be there.
-   if (getSize(inputRectangle, bands, bytesPerPixel) <= maxSizeInBytes)
-   {
-      result.push_back(inputRectangle);
-
-      if (traceDebug())
-      {
-         trace(inputRectangle, result, maxSizeInBytes, bands, bytesPerPixel);
-      }
-      
-      return;
-   }   
-
-   // OK, find the rectangle size that gets that will fit the max size.
-   ossimIrect tileRect = inputRectangle;
-   
-   splitUntilLessThanMax(tileRect,
-                         maxSizeInBytes,
-                         bands,
-                         bytesPerPixel,
-                         internalOverlapPixels);
-
-   ossim_int32 input_width  = static_cast<ossim_int32>(inputRectangle.width());
-   ossim_int32 input_height = static_cast<ossim_int32>(inputRectangle.height());
-
-   ossim_int32 tile_width   = static_cast<ossim_int32>(tileRect.width());
-   ossim_int32 tile_height  = static_cast<ossim_int32>(tileRect.height());
-
-   ossim_int32 tiles_wide   = (input_width % tile_width) ?
-      ( (input_width/tile_width)+1) : (input_width/tile_width);
-   ossim_int32 tiles_high   = (input_height % tile_height) ?
-      ( (input_height/tile_height)+1) : (input_height/tile_height);
-
-   ossim_int32 y_start = inputRectangle.ul().y;
-   ossim_int32 y_stop  = y_start + tile_height - 1 + internalOverlapPixels;
-
-   for (ossim_int32 y = 0; y < tiles_high; ++y)
-   {
-      // Clip to bottom if needed.
-      if (y_stop > inputRectangle.lr().y)
-      {
-         y_stop = inputRectangle.lr().y;
-      }
-      
-      ossim_int32 x_start = inputRectangle.ul().x;
-      ossim_int32 x_stop  = x_start + tile_width - 1 + internalOverlapPixels;
-      
-      for (ossim_int32 x = 0; x < tiles_wide; ++x)
-      {
-         // Clip to right edge is needed.
-         if (x_stop > inputRectangle.lr().x)
-         {
-            x_stop = inputRectangle.lr().x;
-         }
-
-         ossimIrect r(x_start, y_start, x_stop, y_stop);
-
-         // Add it to the result.
-         result.push_back(r);
-         
-         if( 0 == x )
-         {
-            x_start += tile_width - internalOverlapPixels;
-         }
-         else
-         {
-            x_start += tile_width;
-         }
-         x_stop  += tile_width;
-         
-      } // End of tiles_wide loop.
-      
-      if( 0 == y )
-      {
-         y_start += tile_height - internalOverlapPixels;
-      }
-      else
-      {
-         y_start += tile_height;
-      }
-      y_stop  += tile_height;
-      
-   } // End of tiles_high loop.
-   
-   if (traceDebug())
-   {
-      trace(inputRectangle, result, maxSizeInBytes, bands, bytesPerPixel);
-   }
-}
-
-void ossimRectanglePartitioner::splitUntilLessThanMax(
-   ossimIrect& rect,
-   ossim_uint64 maxSizeInBytes,
-   ossim_uint32 bands,
-   ossim_uint32 bytesPerPixel,
-   ossim_uint32 internalOverlapPixels) const
-{
-   do
-   {
-      splitRect(rect);
-
-   } while ( getSize(rect,
-                     bands,
-                     bytesPerPixel,
-                     internalOverlapPixels) > maxSizeInBytes );
-}
-
-void ossimRectanglePartitioner::splitRect(ossimIrect& rect) const
-{
-   ossim_int32 width  = static_cast<ossim_int32>(rect.width());
-   ossim_int32 height = static_cast<ossim_int32>(rect.height());
-   ossim_int32 new_width;
-   ossim_int32 new_height;
-   
-   if (height > width)
-   {
-      new_width  = width;
-      new_height = (height % 2) ? ( (height/2) + 1 ) : (height/2);
-   }
-   else
-   {
-      new_width  = (width % 2) ? ( (width/2) + 1) : (width/2);
-      new_height = height;
-   }
-   
-   rect = ossimIrect(0, 0, new_width-1, new_height-1);
-}
-
-ossim_uint64 ossimRectanglePartitioner::getSize(
-   const ossimIrect& rect,
-   ossim_uint32 bands,
-   ossim_uint32 bytesPerPixel,
-   ossim_uint32 internalOverlapPixels) const
-{
-   return( ( rect.width()  + 2 * internalOverlapPixels ) *
-           ( rect.height() + 2 * internalOverlapPixels ) *
-           bands * bytesPerPixel );
-}
-
-void ossimRectanglePartitioner::trace(const ossimIrect& r,
-                                      const std::vector<ossimIrect>& v,
-                                      ossim_uint64 maxSizeInBytes,
-                                      ossim_uint32 bands,
-                                      ossim_uint32 bytesPerPixel) const
-{
-   ossimNotify(ossimNotifyLevel_DEBUG)
-      << "ossimRectanglePartitioner DEBUG:"
-      << "\nInput rectangle:            " << r
-      << "\nInput rectangle byte size:  " << getSize(r, bands, bytesPerPixel)
-      << "\nTile max size in bytes:     " << maxSizeInBytes
-      << "\nbands:                      " << bands
-      << "\nbytesPerPixel:              " << bytesPerPixel
-      << "\nNumber of output tiles:     " << v.size()
-      << "\nTiled rectangles:\n";
-
-   int index = 0;
-   vector<ossimIrect>::const_iterator i = v.begin();
-   while(i != v.end())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "tile[" << index << "]:  " << *i
-         << "\nsize in bytes:  " << getSize(*i, bands, bytesPerPixel)
-         << endl;
-      ++i;
-      ++index;
-   }
-}
diff --git a/src/ossim/base/ossimRectilinearDataObject.cpp b/src/ossim/base/ossimRectilinearDataObject.cpp
deleted file mode 100644
index 4be74da..0000000
--- a/src/ossim/base/ossimRectilinearDataObject.cpp
+++ /dev/null
@@ -1,293 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// Contributor: David A. Horner (DAH) - http://dave.thehorners.com
-//
-//*************************************************************************
-// $Id: ossimRectilinearDataObject.cpp 20045 2011-09-06 15:03:11Z oscarkramer $
-
-#include <ossim/base/ossimRectilinearDataObject.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-#include <ossim/base/ossimKeywordlist.h>
-
-RTTI_DEF1(ossimRectilinearDataObject, "ossimRectilinearDataObject", ossimDataObject);
-
-ossimRectilinearDataObject::ossimRectilinearDataObject()
-   : ossimDataObject(),
-     m_numberOfDataComponents(0),
-     m_scalarType(),
-     m_dataBuffer(),
-     m_spatialExtents()
-{
-}
-
-ossimRectilinearDataObject::ossimRectilinearDataObject(
-   const ossimRectilinearDataObject& rhs)
-   : ossimDataObject(rhs),
-     m_numberOfDataComponents(rhs.m_numberOfDataComponents),
-     m_scalarType(rhs.m_scalarType),
-     m_dataBuffer(rhs.m_dataBuffer),
-     m_spatialExtents(rhs.m_spatialExtents)
-{
-}
-
-ossimRectilinearDataObject::ossimRectilinearDataObject(
-   ossim_uint32 numberOfSpatialComponents,
-   ossimSource* owner,
-   ossim_uint32 numberOfDataComponents,
-   ossimScalarType   scalarType,
-   ossimDataObjectStatus /* status */)
-   :ossimDataObject(owner, OSSIM_NULL),
-    m_numberOfDataComponents(numberOfDataComponents),
-    m_scalarType(scalarType),
-    m_dataBuffer(0),
-    m_spatialExtents(numberOfSpatialComponents)
-{
-}
-
-ossimRectilinearDataObject::ossimRectilinearDataObject(
-   ossimSource* owner,
-   ossim_uint32 numberOfDataComponents,
-   ossim_uint32 length,
-   ossimScalarType   scalarType,
-   ossimDataObjectStatus /* status */ )
-   :ossimDataObject(owner, OSSIM_NULL),
-    m_numberOfDataComponents(numberOfDataComponents),
-    m_scalarType(scalarType),
-    m_dataBuffer(0),
-    m_spatialExtents(1)
-{
-   m_spatialExtents[0] = length;
-}
-
-ossimRectilinearDataObject::ossimRectilinearDataObject(
-   ossimSource* owner,
-   ossim_uint32 numberOfDataComponents,
-   ossim_uint32 width,
-   ossim_uint32 height,
-   ossimScalarType   scalarType,
-   ossimDataObjectStatus /* status */)
-   :ossimDataObject(owner, OSSIM_NULL),
-    m_numberOfDataComponents(numberOfDataComponents),
-    m_scalarType(scalarType),
-    m_dataBuffer(0),
-    m_spatialExtents(2)
-{
-   m_spatialExtents[0] = width;
-   m_spatialExtents[1] = height;
-}
-
-ossimRectilinearDataObject::ossimRectilinearDataObject(
-   ossimSource* owner,
-   ossim_uint32 numberOfDataComponents,
-   ossim_uint32 width,
-   ossim_uint32 height,
-   ossim_uint32 depth,
-   ossimScalarType   scalarType,
-   ossimDataObjectStatus /* status */)
-   :ossimDataObject(owner, OSSIM_NULL),
-    m_numberOfDataComponents(numberOfDataComponents),
-    m_scalarType(scalarType),
-    m_dataBuffer(0),
-    m_spatialExtents(3)
-{
-   m_spatialExtents[0] = width;
-   m_spatialExtents[1] = height;
-   m_spatialExtents[2] = depth;
-}
-
-ossimRectilinearDataObject::~ossimRectilinearDataObject()
-{
-}
-
-ossim_uint32 ossimRectilinearDataObject::computeSpatialProduct()const
-{
-   ossim_uint32 spatialProduct = 0;
-   for(ossim_uint32 index = 0; index < m_spatialExtents.size(); ++index)
-   {
-      spatialProduct *= m_spatialExtents[index];
-   }
-   return spatialProduct;
-}
-
-void ossimRectilinearDataObject::setNumberOfDataComponents(ossim_uint32 n)
-{
-   m_numberOfDataComponents = n;
-}
-
-void ossimRectilinearDataObject::setSpatialExtents(ossim_uint32* extents,
-                                                   ossim_uint32 size)
-{
-   if (extents)
-   {
-      m_spatialExtents.resize(size);
-      for(ossim_uint32 i =0; i < size; ++i)
-      {
-         m_spatialExtents[i] = extents[i];
-      }
-   }
-}
-
-void ossimRectilinearDataObject::setScalarType(ossimScalarType type)
-{
-   m_scalarType = type;
-}
-
-ossim_uint32 ossimRectilinearDataObject::getNumberOfDataComponents() const
-{
-   return m_numberOfDataComponents;
-}
-
-ossim_uint32 ossimRectilinearDataObject::getNumberOfSpatialComponents() const
-{
-   return (ossim_uint32)m_spatialExtents.size();
-}
-
-const ossim_uint32* ossimRectilinearDataObject::getSpatialExtents()const
-{
-   return &(m_spatialExtents.front());
-}
-
-ossimScalarType ossimRectilinearDataObject::getScalarType() const
-{
-   return m_scalarType;
-}
-
-ossim_uint32 ossimRectilinearDataObject::getScalarSizeInBytes() const
-{
-   return ossim::scalarSizeInBytes(getScalarType());
-}
-
-void* ossimRectilinearDataObject::getBuf()
-{
-   if (m_dataBuffer.size() > 0)
-   {
-      return static_cast<void*>(&m_dataBuffer.front());
-   }
-   return NULL;
-}
-
-const void* ossimRectilinearDataObject::getBuf()const
-{
-   if (m_dataBuffer.size() > 0)
-   {
-      return static_cast<const void*>(&m_dataBuffer.front());
-   }
-   return NULL;
-}
-
-void ossimRectilinearDataObject::assign(const ossimRectilinearDataObject* data)
-{
-   if(data)
-   {
-      if (this != data)
-      {
-         ossimDataObject::assign(data);
-         
-         m_numberOfDataComponents    = data->m_numberOfDataComponents;
-         m_scalarType                = data->m_scalarType;
-         m_dataBuffer                = data->m_dataBuffer;
-         m_spatialExtents            = data->m_spatialExtents;
-      }
-   }
-}
-
-void ossimRectilinearDataObject::initialize()
-{
-   if (m_dataBuffer.size() != getDataSizeInBytes())
-   {
-      m_dataBuffer.resize(getDataSizeInBytes());
-      setDataObjectStatus(OSSIM_STATUS_UNKNOWN);
-   }
-}
-
-ossim_uint32 ossimRectilinearDataObject::getDataSizeInBytes()const
-{
-   return (ossim_uint32)(getScalarSizeInBytes()*
-                         computeSpatialProduct()*
-                         m_numberOfDataComponents);
-}
-
-std::ostream& ossimRectilinearDataObject::print(std::ostream& out) const
-{
-   out << "ossimRectilinearDataObject::print:"
-       << "\nm_numberOfDataComponents:     " << m_numberOfDataComponents
-       << "\ntheNumberOfSpatialComponents:  " << m_spatialExtents.size()
-       << "\nm_scalarType:                 "
-       << (ossimScalarTypeLut::instance()->getEntryString(m_scalarType))
-       << endl;
-   
-   return ossimDataObject::print(out);
-}
-
-const ossimRectilinearDataObject& ossimRectilinearDataObject::operator=(
-   const ossimRectilinearDataObject& rhs)
-{
-   if (this != &rhs)
-   {
-      // ossimDataObject initialization:
-      ossimDataObject::operator=(rhs);
-
-      // ossimRectilinearDataObject (this) initialization:
-      m_numberOfDataComponents    = rhs.m_numberOfDataComponents;
-      m_scalarType                = rhs.m_scalarType;
-      m_dataBuffer                = rhs.m_dataBuffer;
-      m_spatialExtents            = rhs.m_spatialExtents;
-   }
-   return *this;
-}
-
-bool ossimRectilinearDataObject::saveState(ossimKeywordlist& kwl, const char* prefix)const
-{
-   ossimString byteEncoded;
-   ossim::toSimpleStringList(byteEncoded, m_dataBuffer);
-   kwl.add(prefix, "data_buffer", byteEncoded, true);
-   ossim::toSimpleStringList(byteEncoded, m_spatialExtents);
-   kwl.add(prefix, "spatial_extents", byteEncoded, true);
-   kwl.add(prefix, ossimKeywordNames::SCALAR_TYPE_KW, ossimScalarTypeLut::instance()->getEntryString(m_scalarType));
-   
-   return ossimDataObject::saveState(kwl, prefix);
-}
-
-bool ossimRectilinearDataObject::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   if(!ossimDataObject::loadState(kwl, prefix)) return false;
-   
-   const char* spatial_extents = kwl.find(prefix, "spatial_extents");
-   const char* data_buffer = kwl.find(prefix, "data_buffer");
-   const char* scalar_type = kwl.find(prefix, ossimKeywordNames::SCALAR_TYPE_KW);
-   m_spatialExtents.clear();
-   m_dataBuffer.clear();
-                                 
-   if(spatial_extents)
-   {
-      if(!ossim::toSimpleVector(m_spatialExtents, ossimString(spatial_extents)))
-      {
-         return false;
-      }
-   }
-   if(data_buffer)
-   {
-      if(!ossim::toSimpleVector(m_dataBuffer, ossimString(kwl.find(prefix, "data_buffer"))))
-      {
-         return false;
-      }
-   }
-   if(scalar_type)
-   {
-      ossimScalarTypeLut::instance()->getScalarTypeFromString(scalar_type);
-   }
-   else 
-   {
-      m_scalarType = OSSIM_SCALAR_UNKNOWN;
-   }
-
-   m_numberOfDataComponents = (ossim_uint32) m_spatialExtents.size();
-   
-   return true;
-   
-}                     
diff --git a/src/ossim/base/ossimRegExp.cpp b/src/ossim/base/ossimRegExp.cpp
deleted file mode 100644
index 127be6e..0000000
--- a/src/ossim/base/ossimRegExp.cpp
+++ /dev/null
@@ -1,1285 +0,0 @@
- 
-//
-// Copyright (C) 1991 Texas Instruments Incorporated.
-//
-// Permission is granted to any individual or institution to use, copy, modify,
-// and distribute this software, provided that this complete copyright and
-// permission notice is maintained, intact, in all copies and supporting
-// documentation.
-//
-// Texas Instruments Incorporated provides this software "as is" without
-// express or implied warranty.
-//
-//
-// Created: MNF 06/13/89  Initial Design and Implementation
-// Updated: LGO 08/09/89  Inherit from Generic
-// Updated: MBN 09/07/89  Added conditional exception handling
-// Updated: MBN 12/15/89  Sprinkled "const" qualifiers all over the place!
-// Updated: DLS 03/22/91  New lite version
-//
-// This  is the header file  for the regular  expression class.   An object of
-// this class contains a regular expression,  in  a special "compiled" format.
-// This  compiled format consists  of  several slots   all kept as the objects
-// private data.  The  RegExp class  provides a convenient  way  to  represent
-// regular  expressions.  It makes it easy   to search  for  the  same regular
-// expression in many different strings without having to  compile a string to
-// regular expression format more than necessary.
-//
-// A regular  expression allows a programmer to  specify complex patterns that
-// can be searched for  and  matched against the  character string of a String
-// object.  In  its  simplest case, a   regular expression  is a  sequence  of
-// characters with which you can search for exact character matches.  However,
-// many times you may not know the exact sequence you want to find, or you may
-// only want to find a match at the beginning or end of  a String.  The RegExp
-// object  allows specification of  such patterns by  utilizing the  following
-// regular  expression  meta-characters   (note   that  more  one  of    these
-// meta-characters  can  be used in a single  regular  expression in  order to
-// create complex search patterns):
-//
-//         ^    Match at beginning of line
-//         $    Match at end of line
-//         .    Match any single character
-//         [ ]  Match any one character inside the brackets
-//         [^ ] Match any character NOT inside the brackets
-//         -    Match any character in range on either side of dash
-//         *    Match preceding pattern zero or more times
-//         +    Match preceding pattern one or more times
-//         ?    Match preceding pattern zero or once only
-//         ()   Save a matched expression and use it in a further match.
-//
-// There are three constructors for RegExp.  One  just creates an empty RegExp
-// object.  Another creates a RegExp object  and initializes it with a regular
-// expression  that is given  in  the form of a   char*.   The  third  takes a
-// reference  to  a RegExp  object    as an  argument    and creates an object
-// initialized with the information from the given RegExp object.
-//
-// The  find  member function  finds   the  first  occurence   of  the regualr
-// expression of that object in the string given to find as an argument.  Find
-// returns a boolean, and  if true,  mutates  the private  data appropriately.
-// Find sets pointers to the beginning and end of  the thing last  found, they
-// are pointers into the actual string  that was searched.   The start and end
-// member functions return indicies  into the searched string that  correspond
-// to the beginning   and  end pointers  respectively.   The    compile member
-// function takes a char* and puts the  compiled version of the char* argument
-// into the object's private data fields.  The == and  != operators only check
-// the  to see  if   the compiled  regular  expression   is the same, and  the
-// deep_equal functions also checks  to see if the  start and end pointers are
-// the same.  The is_valid  function returns false if  program is set to NULL,
-// (i.e. there is no valid compiled exression).  The set_invalid function sets
-// the  program to NULL  (Warning: this deletes the compiled  expression). The
-// following examples may help clarify regular expression usage:
-//
-//   *  The regular expression  "^hello" matches  a "hello"  only at  the
-//      beginning of a  line.  It would match "hello  there" but not "hi,
-//      hello there".
-//
-//   *  The regular expression "long$" matches a  "long"  only at the end
-//      of a line. It would match "so long\0", but not "long ago".
-//
-//   *  The regular expression "t..t..g"  will match anything that  has a
-//      "t" then any two characters, another "t", any  two characters and
-//      then a "g".   It will match  "testing", or "test again" but would
-//      not match "toasting"
-//
-//   *  The regular  expression "[1-9ab]" matches any  number one through
-//      nine, and the characters  "a" and  "b".  It would match "hello 1"
-//      or "begin", but would not match "no-match".
-//
-//   *  The  regular expression "[^1-9ab]"  matches any character that is
-//      not a number one  through nine, or  an "a" or "b".   It would NOT
-//      match "hello 1" or "begin", but would match "no-match".
-//
-//   *  The regular expression "br* " matches  something that begins with
-//      a "b", is followed by zero or more "r"s, and ends in a space.  It
-//      would match "brrrrr ", and "b ", but would not match "brrh ".
-//
-//   *  The regular expression "br+ " matches something  that begins with
-//      a "b", is followed by one or more "r"s, and ends in  a space.  It
-//      would match "brrrrr ",  and  "br ", but would not  match "b  " or
-//      "brrh ".
-//
-//   *  The regular expression "br? " matches  something that begins with
-//      a "b", is followed by zero or one "r"s, and ends in  a space.  It
-//      would  match  "br ", and "b  ", but would not match  "brrrr "  or
-//      "brrh ".
-//
-//   *  The regular expression "(..p)b" matches  something ending with pb
-//      and beginning with whatever the two characters before the first p
-//      encounterd in the line were.  It would find  "repb" in "rep drepa
-//      qrepb".  The regular expression "(..p)a"  would find "repa qrepb"
-//      in "rep drepa qrepb"
-//
-//   *  The regular expression "d(..p)" matches something ending  with p,
-//      beginning with d, and having  two characters  in between that are
-//      the same as the two characters before  the first p  encounterd in
-//      the line.  It would match "drepa qrepb" in "rep drepa qrepb".
-//
-
-#include <cstring>
-#include <cstdio>
-#include <ossim/base/ossimRegExp.h>
-#include <iostream>
-// ossimRegExp -- Copies the given regular expression.
-
-ossimRegExp::ossimRegExp (const ossimRegExp& rxp) {
-   if(!rxp.program)
-   {
-      program = 0;
-      progsize = 0;
-   }
-   else 
-   {
-      int ind; 
-      this->progsize = rxp.progsize;		// Copy regular expression size
-      this->program = new char[this->progsize];	// Allocate storage
-      for(ind=this->progsize; ind-- != 0;)		// Copy regular expresion
-         this->program[ind] = rxp.program[ind];
-      this->startp[0] = rxp.startp[0];		// Copy pointers into last
-      this->endp[0] = rxp.endp[0];			// Successful "find" operation
-      this->regmust = rxp.regmust;			// Copy field
-      if (rxp.regmust != NULL) {
-         char* dum = rxp.program;
-         ind = 0;
-         while (dum != rxp.regmust) {
-            ++dum;
-            ++ind;
-         }
-         this->regmust = this->program + ind;
-      }
-      this->regstart = rxp.regstart;		// Copy starting index
-      this->reganch = rxp.reganch;			// Copy remaining private data
-      this->regmlen = rxp.regmlen;			// Copy remaining private data
-   }
-}
-
-
-// operator== -- Returns true if two regular expressions have the same
-// compiled program for pattern matching.
-
-bool ossimRegExp::operator== (const ossimRegExp& rxp) const {
-  if (this != &rxp) {				// Same address?
-    ossim_uint32 ind = this->progsize;		// Get regular expression size
-    if (ind != rxp.progsize)			// If different size regexp
-      return false;				// Return failure
-    while(ind-- != 0)				// Else while still characters
-      if(this->program[ind] != rxp.program[ind]) // If regexp are different    
-	return false;				 // Return failure             
-  }
-  return true;					// Else same, return success  
-}
-
-
-// deep_equal -- Returns true if have the same compiled regular expressions
-// and the same start and end pointers.
-
-bool ossimRegExp::deep_equal (const ossimRegExp& rxp) const {
-  ossim_uint32 ind = this->progsize;		// Get regular expression size
-  if (ind != rxp.progsize)			// If different size regexp
-    return false;				// Return failure
-  while(ind-- != 0)		 		// Else while still characters
-    if(this->program[ind] != rxp.program[ind])	// If regexp are different    
-      return false;				// Return failure             
-  return (this->startp[0] == rxp.startp[0] && 	// Else if same start/end ptrs,
-	  this->endp[0] == rxp.endp[0]);	// Return true
-}   
-
-// The remaining code in this file is derived from the  regular expression code
-// whose  copyright statement appears  below.  It has been  changed to work
-// with the class concepts of C++ and COOL.
-
-/*
- * compile and find 
- *
- *	Copyright (c) 1986 by University of Toronto.
- *	Written by Henry Spencer.  Not derived from licensed software.
- *
- *	Permission is granted to anyone to use this software for any
- *	purpose on any computer system, and to redistribute it freely,
- *	subject to the following restrictions:
- *
- *	1. The author is not responsible for the consequences of use of
- *		this software, no matter how awful, even if they arise
- *		from defects in it.
- *
- *	2. The origin of this software must not be misrepresented, either
- *		by explicit claim or by omission.
- *
- *	3. Altered versions must be plainly marked as such, and must not
- *		be misrepresented as being the original software.
- *
- * Beware that some of this code is subtly aware of the way operator
- * precedence is structured in regular expressions.  Serious changes in
- * regular-expression syntax might require a total rethink.
- */
-
-/*
- * The "internal use only" fields in regexp.h are present to pass info from
- * compile to execute that permits the execute phase to run lots faster on
- * simple cases.  They are:
- *
- * regstart	char that must begin a match; '\0' if none obvious
- * reganch	is the match anchored (at beginning-of-line only)?
- * regmust	string (pointer into program) that match must include, or NULL
- * regmlen	length of regmust string
- *
- * Regstart and reganch permit very fast decisions on suitable starting points
- * for a match, cutting down the work a lot.  Regmust permits fast rejection
- * of lines that cannot possibly match.  The regmust tests are costly enough
- * that compile() supplies a regmust only if the r.e. contains something
- * potentially expensive (at present, the only such thing detected is * or +
- * at the start of the r.e., which can involve a lot of backup).  Regmlen is
- * supplied because the test in find() needs it and compile() is computing
- * it anyway.
- */
-
-/*
- * Structure for regexp "program".  This is essentially a linear encoding
- * of a nondeterministic finite-state machine (aka syntax charts or
- * "railroad normal form" in parsing technology).  Each node is an opcode
- * plus a "next" pointer, possibly plus an operand.  "Next" pointers of
- * all nodes except BRANCH implement concatenation; a "next" pointer with
- * a BRANCH on both ends of it is connecting two alternatives.  (Here we
- * have one of the subtle syntax dependencies:  an individual BRANCH (as
- * opposed to a collection of them) is never concatenated with anything
- * because of operator precedence.)  The operand of some types of node is
- * a literal string; for others, it is a node leading into a sub-FSM.  In
- * particular, the operand of a BRANCH node is the first node of the branch.
- * (NB this is *not* a tree structure:  the tail of the branch connects
- * to the thing following the set of BRANCHes.)  The opcodes are:
- */
-
-// definition	number	opnd?	meaning
-#define	END	0		// no	End of program.
-#define	BOL	1		// no	Match "" at beginning of line.
-#define	EOL	2		// no	Match "" at end of line.
-#define	ANY	3		// no	Match any one character.
-#define	ANYOF	4		// str	Match any character in this string.
-#define	ANYBUT	5		// str	Match any character not in this
-				// string.
-#define	BRANCH	6		// node	Match this alternative, or the
-				// next...
-#define	BACK	7		// no	Match "", "next" ptr points backward.
-#define	EXACTLY	8		// str	Match this string.
-#define	NOTHING	9		// no	Match empty string.
-#define	STAR	10		// node	Match this (simple) thing 0 or more
-				// times.
-#define	PLUS	11		// node	Match this (simple) thing 1 or more
-				// times.
-#define	OPEN	20		// no	Mark this point in input as start of
-				// #n.
-// OPEN+1 is number 1, etc.
-#define	CLOSE	30		// no	Analogous to OPEN.
-
-/*
- * Opcode notes:
- *
- * BRANCH	The set of branches constituting a single choice are hooked
- *		together with their "next" pointers, since precedence prevents
- *		anything being concatenated to any individual branch.  The
- *		"next" pointer of the last BRANCH in a choice points to the
- *		thing following the whole choice.  This is also where the
- *		final "next" pointer of each individual branch points; each
- *		branch starts with the operand node of a BRANCH node.
- *
- * BACK		Normal "next" pointers all implicitly point forward; BACK
- *		exists to make loop structures possible.
- *
- * STAR,PLUS	'?', and complex '*' and '+', are implemented as circular
- *		BRANCH structures using BACK.  Simple cases (one character
- *		per match) are implemented with STAR and PLUS for speed
- *		and to minimize recursive plunges.
- *
- * OPEN,CLOSE	...are numbered at compile time.
- */
-
-/*
- * A node is one char of opcode followed by two chars of "next" pointer.
- * "Next" pointers are stored as two 8-bit pieces, high order first.  The
- * value is a positive offset from the opcode of the node containing it.
- * An operand, if any, simply follows the node.  (Note that much of the
- * code generation knows about this implicit relationship.)
- *
- * Using two bytes for the "next" pointer is vast overkill for most things,
- * but allows patterns to get big without disasters.
- */
-
-#define	OP(p)		(*(p))
-#define	NEXT(p)		(((*((p)+1)&0377)<<8) + (*((p)+2)&0377))
-#define	OPERAND(p)	((p) + 3)
-
-const unsigned char MAGIC = 0234;
-/*
- * Utility definitions.
- */
-
-#define	UCHARAT(p)	((const unsigned char*)(p))[0]
-
-
-#define	FAIL(m)	{ regerror(m); return(NULL); }
-#define	ISMULT(c)	((c) == '*' || (c) == '+' || (c) == '?')
-#define	META	"^$.[()|?+*\\"
-
-
-/*
- * Flags to be passed up and down.
- */
-#define	HASWIDTH	01	// Known never to match null string.
-#define	SIMPLE		02	// Simple enough to be STAR/PLUS operand.
-#define	SPSTART		04	// Starts with * or +.
-#define	WORST		0	// Worst case.
-
-
-
-/////////////////////////////////////////////////////////////////////////
-//
-//  COMPILE AND ASSOCIATED FUNCTIONS
-//
-/////////////////////////////////////////////////////////////////////////
-
-
-/*
- * Global work variables for compile().
- */
-// static const char* regparse;	// Input-scan pointer.
-// static       int   regnpar;	// () count.
-// static       char  regdummy;
-// static       char* regcode;	// Code-emit pointer; &regdummy = don't.
-// static       long  regsize;	// Code size.
-
-/*
- * Forward declarations for compile()'s friends.
- */
-// #ifndef static
-// #define	static	static
-// #endif
-// static       char* reg (int, int*);
-// static       char* regbranch (int*);
-// static       char* regpiece (int*);
-// static       char* regatom (int*);
-// static       char* regnode (char);
-// static const char* regnext (register const char*);
-// static       char* regnext (register char*);
-// static void        regc (unsigned char);
-// static void        reginsert (char, char*);
-// static void        regtail (char*, const char*);
-// static void        regoptail (char*, const char*);
-
-// #ifdef STRCSPN
-// static int strcspn ();
-// #endif
-
-
-
-/*
- * We can't allocate space until we know how big the compiled form will be,
- * but we can't compile it (and thus know how big it is) until we've got a
- * place to put the code.  So we cheat:  we compile it twice, once with code
- * generation turned off and size counting turned on, and once "for real".
- * This also means that we don't allocate space until we are sure that the
- * thing really will compile successfully, and we never have to move the
- * code and thus invalidate pointers into it.  (Note that it has to be in
- * one piece because free() must be able to free it all.)
- *
- * Beware that the optimization-preparation code in here knows about some
- * of the structure of the compiled regexp.
- */
-
-
-// compile -- compile a regular expression into internal code
-// for later pattern matching.
-
-void ossimRegExp::compile (const char* exp) {
-    register const char* scan;
-    register const char* longest;
-    register unsigned long len;
-             int         flags;
-
-    if (exp == NULL) {
-      //RAISE Error, SYM(ossimRegExp), SYM(No_Expr),
-      printf ("ossimRegExp::compile(): No expression supplied.\n");
-      return;
-    }
-
-    // First pass: determine size, legality.
-    regparse = exp;
-    regnpar = 1;
-    regsize = 0L;
-    regcode = ®dummy;
-    regc(MAGIC);
-    if(!reg(0, &flags))
-      {
-	printf ("ossimRegExp::compile(): Error in compile.\n");
-	return;
-      }
-    this->startp[0] = this->endp[0] = this->searchstring = NULL;
-
-    // Small enough for pointer-storage convention? 
-    if (regsize >= 32767L) {	// Probably could be 65535L. 
-      //RAISE Error, SYM(ossimRegExp), SYM(Expr_Too_Big),
-      printf ("ossimRegExp::compile(): Expression too big.\n");
-      return;
-    }
-
-    // Allocate space. 
-//#ifndef WIN32
-    if (this->program != NULL) delete [] this->program;  
-//#endif
-    this->program = new char[regsize];
-    this->progsize = (int) regsize;
-
-    if (this->program == NULL) {
-      //RAISE Error, SYM(ossimRegExp), SYM(Out_Of_Memory),
-      printf ("ossimRegExp::compile(): Out of memory.\n"); 
-      return;
-    }
-
-    // Second pass: emit code.
-    regparse = exp;
-    regnpar = 1;
-    regcode = this->program;
-    regc(MAGIC);
-    reg(0, &flags);
-
-    // Dig out information for optimizations.
-    this->regstart = '\0';		// Worst-case defaults.
-    this->reganch = 0;
-    this->regmust = NULL;
-    this->regmlen = 0;
-    scan = this->program + 1;	// First BRANCH.
-    if (OP(regnext(scan)) == END) {	// Only one top-level choice.
-	scan = OPERAND(scan);
-
-	// Starting-point info.
-	if (OP(scan) == EXACTLY)
-	    this->regstart = *OPERAND(scan);
-	else if (OP(scan) == BOL)
-	    this->reganch++;
-
-	 //
-	 // If there's something expensive in the r.e., find the longest
-	 // literal string that must appear and make it the regmust.  Resolve
-	 // ties in favor of later strings, since the regstart check works
-	 // with the beginning of the r.e. and avoiding duplication
-	 // strengthens checking.  Not a strong reason, but sufficient in the
-	 // absence of others. 
-	 //
-	if (flags & SPSTART) {
-	    longest = NULL;
-	    len = 0;
-	    for (; scan != NULL; scan = regnext(scan))
-		if (OP(scan) == EXACTLY && strlen(OPERAND(scan)) >= len) {
-		    longest = OPERAND(scan);
-		    len = (unsigned long)strlen(OPERAND(scan));
-		}
-	    this->regmust = longest;
-	    this->regmlen = len;
-	}
-    }
-}
-
-
-/*
- - reg - regular expression, i.e. main body or parenthesized thing
- *
- * Caller must absorb opening parenthesis.
- *
- * Combining parenthesis handling with the base level of regular expression
- * is a trifle forced, but the need to tie the tails of the branches to what
- * follows makes it hard to avoid.
- */
-char* ossimRegExp::reg (int paren, int *flagp) {
-    register char* ret;
-    register char* br;
-    register char* ender;
-    register int   parno =0;
-             int   flags;
-
-    *flagp = HASWIDTH;		// Tentatively.
-
-    // Make an OPEN node, if parenthesized.
-    if (paren) {
-	if (regnpar >= NSUBEXP) {
-	  //RAISE Error, SYM(ossimRegExp), SYM(Too_Many_Parens),
-	  printf ("ossimRegExp::compile(): Too many parentheses.\n");
-	  return 0;
-        }
-	parno = regnpar;
-	regnpar++;
-	ret = regnode(OPEN + parno);
-    }
-    else
-	ret = NULL;
-
-    // Pick up the branches, linking them together.
-    br = regbranch(&flags);
-    if (br == NULL)
-	return (NULL);
-    if (ret != NULL)
-	regtail(ret, br);	// OPEN -> first.
-    else
-	ret = br;
-    if (!(flags & HASWIDTH))
-	*flagp &= ~HASWIDTH;
-    *flagp |= flags & SPSTART;
-    while (*regparse == '|') {
-	regparse++;
-	br = regbranch(&flags);
-	if (br == NULL)
-	    return (NULL);
-	regtail(ret, br);	// BRANCH -> BRANCH.
-	if (!(flags & HASWIDTH))
-	    *flagp &= ~HASWIDTH;
-	*flagp |= flags & SPSTART;
-      }
-
-    // Make a closing node, and hook it on the end.
-    ender = regnode((paren) ? CLOSE + parno : END);
-    regtail(ret, ender);
-
-    // Hook the tails of the branches to the closing node.
-    for (br = ret; br != NULL; br = regnext(br))
-	regoptail(br, ender);
-
-    // Check for proper termination.
-    if (paren && *regparse++ != ')') {
-        //RAISE Error, SYM(ossimRegExp), SYM(Unmatched_Parens),
-        printf ("ossimRegExp::compile(): Unmatched parentheses.\n");
-	return 0;
-    }
-    else if (!paren && *regparse != '\0') {
-        if (*regparse == ')') {
-            //RAISE Error, SYM(ossimRegExp), SYM(Unmatched_Parens),
-            printf ("ossimRegExp::compile(): Unmatched parentheses.\n");
-	    return 0;
-	}
-	else {
-	    //RAISE Error, SYM(ossimRegExp), SYM(Internal_Error),
-	    printf ("ossimRegExp::compile(): Internal error.\n");
-	    return 0;
-        }
-	// NOTREACHED
-    }
-    return (ret);
-}
-
-
-/*
- - regbranch - one alternative of an | operator
- *
- * Implements the concatenation operator.
- */
-char* ossimRegExp::regbranch (int *flagp) {
-    register char* ret;
-    register char* chain;
-    register char* latest;
-    int                  flags;
-
-    *flagp = WORST;		// Tentatively.
-
-    ret = regnode(BRANCH);
-    chain = NULL;
-    while (*regparse != '\0' && *regparse != '|' && *regparse != ')') {
-	latest = regpiece(&flags);
-	if (latest == NULL)
-	    return (NULL);
-	*flagp |= flags & HASWIDTH;
-	if (chain == NULL)	// First piece.
-	    *flagp |= flags & SPSTART;
-	else
-	    regtail(chain, latest);
-	chain = latest;
-    }
-    if (chain == NULL)		// Loop ran zero times.
-	regnode(NOTHING);
-
-    return (ret);
-}
-
-
-/*
- - regpiece - something followed by possible [*+?]
- *
- * Note that the branching code sequences used for ? and the general cases
- * of * and + are somewhat optimized:  they use the same NOTHING node as
- * both the endmarker for their branch list and the body of the last branch.
- * It might seem that this node could be dispensed with entirely, but the
- * endmarker role is not redundant.
- */
-char* ossimRegExp::regpiece (int *flagp) {
-    register char* ret;
-    register char  op;
-    register char* next;
-    int            flags;
-
-    ret = regatom(&flags);
-    if (ret == NULL)
-	return (NULL);
-
-    op = *regparse;
-    if (!ISMULT(op)) {
-	*flagp = flags;
-	return (ret);
-    }
-
-    if (!(flags & HASWIDTH) && op != '?') {
-        //RAISE Error, SYM(ossimRegExp), SYM(Empty_Operand),
-        printf ("ossimRegExp::compile() : *+ operand could be empty.\n");
-	return 0;
-    }
-    *flagp = (op != '+') ? (WORST | SPSTART) : (WORST | HASWIDTH);
-
-    if (op == '*' && (flags & SIMPLE))
-	reginsert(STAR, ret);
-    else if (op == '*') {
-	// Emit x* as (x&|), where & means "self".
-	reginsert(BRANCH, ret);	// Either x
-	regoptail(ret, regnode(BACK));	// and loop
-	regoptail(ret, ret);	// back
-	regtail(ret, regnode(BRANCH));	// or
-	regtail(ret, regnode(NOTHING));	// null.
-    }
-    else if (op == '+' && (flags & SIMPLE))
-	reginsert(PLUS, ret);
-    else if (op == '+') {
-	// Emit x+ as x(&|), where & means "self".
-	next = regnode(BRANCH);	// Either
-	regtail(ret, next);
-	regtail(regnode(BACK), ret);	// loop back
-	regtail(next, regnode(BRANCH));	// or
-	regtail(ret, regnode(NOTHING));	// null.
-    }
-    else if (op == '?') {
-	// Emit x? as (x|)
-	reginsert(BRANCH, ret);	// Either x
-	regtail(ret, regnode(BRANCH));	// or
-	next = regnode(NOTHING);// null.
-	regtail(ret, next);
-	regoptail(ret, next);
-    }
-    regparse++;
-    if (ISMULT(*regparse)) {
-        //RAISE Error, SYM(ossimRegExp), SYM(Nested_Operand),
-        printf ("ossimRegExp::compile(): Nested *?+.\n");
-	return 0;
-    }
-    return (ret);
-}
-
-
-/*
- - regatom - the lowest level
- *
- * Optimization:  gobbles an entire sequence of ordinary characters so that
- * it can turn them into a single node, which is smaller to store and
- * faster to run.  Backslashed characters are exceptions, each becoming a
- * separate node; the code is simpler that way and it's not worth fixing.
- */
-char* ossimRegExp::regatom (int *flagp) {
-    register char* ret;
-             int   flags;
-
-    *flagp = WORST;		// Tentatively.
-
-    switch (*regparse++) {
-	case '^':
-	    ret = regnode(BOL);
-	    break;
-	case '$':
-	    ret = regnode(EOL);
-	    break;
-	case '.':
-	    ret = regnode(ANY);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case '[':{
-		register int    rxpclass;
-		register int    rxpclassend;
-
-		if (*regparse == '^') {	// Complement of range.
-		    ret = regnode(ANYBUT);
-		    regparse++;
-		}
-		else
-		    ret = regnode(ANYOF);
-		if (*regparse == ']' || *regparse == '-')
-		    regc(*regparse++);
-		while (*regparse != '\0' && *regparse != ']') {
-		    if (*regparse == '-') {
-			regparse++;
-			if (*regparse == ']' || *regparse == '\0')
-			    regc('-');
-			else {
-			    rxpclass = UCHARAT(regparse - 2) + 1;
-			    rxpclassend = UCHARAT(regparse);
-			    if (rxpclass > rxpclassend + 1) {
-			       //RAISE Error, SYM(ossimRegExp), SYM(Invalid_Range),
-			       printf ("ossimRegExp::compile(): Invalid range in [].\n");
-			       return 0;
-                            }
-			    for (; rxpclass <= rxpclassend; rxpclass++)
-				regc(rxpclass);
-			    regparse++;
-			}
-		    }
-		    else
-			regc(*regparse++);
-		}
-		regc('\0');
-		if (*regparse != ']') {
-                    //RAISE Error, SYM(ossimRegExp), SYM(Unmatched_Bracket),
-                    printf ("ossimRegExp::compile(): Unmatched [].\n");
-		    return 0;
-	        }
-		regparse++;
-		*flagp |= HASWIDTH | SIMPLE;
-	    }
-	    break;
-	case '(':
-	    ret = reg(1, &flags);
-	    if (ret == NULL)
-		return (NULL);
-	    *flagp |= flags & (HASWIDTH | SPSTART);
-	    break;
-	case '\0':
-	case '|':
-	case ')':
-	    //RAISE Error, SYM(ossimRegExp), SYM(Internal_Error),
-            printf ("ossimRegExp::compile(): Internal error.\n"); // Never here
-	    return 0;
-	case '?':
-	case '+':
-	case '*':
-	    //RAISE Error, SYM(ossimRegExp), SYM(No_Operand),
-            printf ("ossimRegExp::compile(): ?+* follows nothing.\n");
-	    return 0;
-	case '\\':
-	    if (*regparse == '\0') {
-	        //RAISE Error, SYM(ossimRegExp), SYM(Trailing_Backslash),
-                printf ("ossimRegExp::compile(): Trailing backslash.\n");
-		return 0;
-            }
-	    ret = regnode(EXACTLY);
-	    regc(*regparse++);
-	    regc('\0');
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	default:{
-		register int    len;
-		register char   ender;
-
-		regparse--;
-		len = (int)strcspn(regparse, META);
-		if (len <= 0) {
-		    //RAISE Error, SYM(ossimRegExp), SYM(Internal_Error),
-                    printf ("ossimRegExp::compile(): Internal error.\n");
-		    return 0;
-                }
-		ender = *(regparse + len);
-		if (len > 1 && ISMULT(ender))
-		    len--;	// Back off clear of ?+* operand.
-		*flagp |= HASWIDTH;
-		if (len == 1)
-		    *flagp |= SIMPLE;
-		ret = regnode(EXACTLY);
-		while (len > 0) {
-		    regc(*regparse++);
-		    len--;
-		}
-		regc('\0');
-	    }
-	    break;
-    }
-    return (ret);
-}
-
-
-/*
- - regnode - emit a node
-   Location.
- */
-char* ossimRegExp::regnode (char op) {
-    register char* ret;
-    register char* ptr;
-
-    ret = regcode;
-    if (ret == &regdummy) {
-	regsize += 3;
-	return (ret);
-    }
-
-    ptr = ret;
-    *ptr++ = op;
-    *ptr++ = '\0';		// Null "next" pointer.
-    *ptr++ = '\0';
-    regcode = ptr;
-
-    return (ret);
-}
-
-
-/*
- - regc - emit (if appropriate) a byte of code
- */
-void ossimRegExp::regc (unsigned char b) {
-    if (regcode != &regdummy)
-	*regcode++ = b;
-    else
-	regsize++;
-}
-
-
-/*
- - reginsert - insert an operator in front of already-emitted operand
- *
- * Means relocating the operand.
- */
-void ossimRegExp::reginsert (char op, char* opnd) {
-    register char* src;
-    register char* dst;
-    register char* place;
-
-    if (regcode == &regdummy) {
-	regsize += 3;
-	return;
-    }
-
-    src = regcode;
-    regcode += 3;
-    dst = regcode;
-    while (src > opnd)
-	*--dst = *--src;
-
-    place = opnd;		// Op node, where operand used to be.
-    *place++ = op;
-    *place++ = '\0';
-    *place++ = '\0';
-}
-
-
-/*
- - regtail - set the next-pointer at the end of a node chain
- */
-void ossimRegExp::regtail (char* p, const char* val) {
-    register char* scan;
-    register char* temp;
-    register int   offset;
-
-    if (p == &regdummy)
-	return;
-
-    // Find last node.
-    scan = p;
-    for (;;) {
-	temp = regnext(scan);
-	if (temp == NULL)
-	    break;
-	scan = temp;
-    }
-
-    if (OP(scan) == BACK)
-	offset = (const char*)scan - val;
-    else
-	offset = val - scan;
-    *(scan + 1) = (offset >> 8) & 0377;
-    *(scan + 2) = offset & 0377;
-}
-
-
-/*
- - regoptail - regtail on operand of first argument; nop if operandless
- */
-void ossimRegExp::regoptail (char* p, const char* val) {
-    // "Operandless" and "op != BRANCH" are synonymous in practice.
-    if (p == NULL || p == &regdummy || OP(p) != BRANCH)
-	return;
-    regtail(OPERAND(p), val);
-}
-
-
-
-////////////////////////////////////////////////////////////////////////
-// 
-//  find and friends
-// 
-////////////////////////////////////////////////////////////////////////
-
-
-/*
- * Global work variables for find().
- */
-// static const char*  reginput;	// String-input pointer.
-// static const char*  regbol;	// Beginning of input, for ^ check.
-// static const char* *regstartp;	// Pointer to startp array.
-// static const char* *regendp;	// Ditto for endp.
-
-/*
- * Forwards.
- */
-// static int regtry (const char*, const char* *,
-// 		   const char* *, const char*);
-// static int regmatch (const char*);
-// static int regrepeat (const char*);
-
-// #ifdef DEBUG
-// int          regnarrate = 0;
-// void         regdump ();
-// static char* regprop ();
-// #endif
-
-
-
-// find -- Matches the regular expression to the given string.
-// Returns true if found, and sets start and end indexes accordingly.
-
-bool ossimRegExp::find (const char* string) {
-    register const char* s;
-
-	if(!string) return false;
-    this->searchstring = string;
-
-     // Check validity of program.
-    if (!this->program || UCHARAT(this->program) != MAGIC) {
-        //RAISE Error, SYM(ossimRegExp), SYM(Internal_Error),
-        printf ("ossimRegExp::find(): Compiled regular expression corrupted.\n");
-        return 0;
-    }
-    
-    // If there is a "must appear" string, look for it.
-    if (this->regmust != NULL) {
-	s = string;
-	while ((s = strchr(s, this->regmust[0])) != NULL) {
-	    if (strncmp(s, this->regmust, this->regmlen) == 0)
-		break;		// Found it.
-	    s++;
-	}
-	if (s == NULL)		// Not present.
-	    return (0);
-    }
-     
-    // Mark beginning of line for ^ .
-    regbol = string;
-
-    // Simplest case:  anchored match need be tried only once.
-    if (this->reganch)
-	return (regtry(string, this->startp, this->endp, this->program));
-    
-    // Messy cases:  unanchored match.
-    s = string;
-    if (this->regstart != '\0')
-	// We know what char it must start with.
-	while ((s = strchr(s, this->regstart)) != NULL) {
-	    if (regtry(s, this->startp, this->endp, this->program))
-		return (1);
-	    s++;
-	  
-	}
-    else
-	// We don't -- general case.
-	do {
-	    if (regtry(s, this->startp, this->endp, this->program))
-		return (1);
-	} while (*s++ != '\0');
-    
-    // Failure.
-    return (0);
-}
-
-
-/*
- - regtry - try match at specific point
-   0 failure, 1 success
- */
-int ossimRegExp::regtry (const char* string, const char* *start,
-		   const char* *end, const char* prog) {
-    register       int    i;
-    register const char* *sp1;
-    register const char* *ep;
-
-    reginput = string;
-    regstartp = start;
-    regendp = end;
-
-    sp1 = start;
-    ep = end;
-    for (i = NSUBEXP; i > 0; i--) {
-	*sp1++ = NULL;
-	*ep++ = NULL;
-    }
-    if (regmatch(prog + 1)) {
-	start[0] = string;
-	end[0] = reginput;
-	return (1);
-    }
-    else
-	return (0);
-}
-
-
-/*
- - regmatch - main matching routine
- *
- * Conceptually the strategy is simple:  check to see whether the current
- * node matches, call self recursively to see whether the rest matches,
- * and then act accordingly.  In practice we make some effort to avoid
- * recursion, in particular by going through "ordinary" nodes (that don't
- * need to know whether the rest of the match failed) by a loop instead of
- * by recursion.
- * 0 failure, 1 success
- */
-int ossimRegExp::regmatch (const char* prog) {
-    register const char* scan;	// Current node.
-             const char* next;	// Next node.
-
-    scan = prog;
-
-    while (scan != NULL) {
-
-	next = regnext(scan);
-
-	switch (OP(scan)) {
-	    case BOL:
-		if (reginput != regbol)
-		    return (0);
-		break;
-	    case EOL:
-		if (*reginput != '\0')
-		    return (0);
-		break;
-	    case ANY:
-		if (*reginput == '\0')
-		    return (0);
-		reginput++;
-		break;
-	    case EXACTLY:{
-		    register int         len;
-		    register const char* opnd;
-
-		    opnd = OPERAND(scan);
-		    // Inline the first character, for speed.
-		    if (*opnd != *reginput)
-			return (0);
-		    len = (int)strlen(opnd);
-		    if (len > 1 && strncmp(opnd, reginput, len) != 0)
-			return (0);
-		    reginput += len;
-		}
-		break;
-	    case ANYOF:
-		if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) == NULL)
-		    return (0);
-		reginput++;
-		break;
-	    case ANYBUT:
-		if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) != NULL)
-		    return (0);
-		reginput++;
-		break;
-	    case NOTHING:
-		break;
-	    case BACK:
-		break;
-	    case OPEN + 1:
-	    case OPEN + 2:
-	    case OPEN + 3:
-	    case OPEN + 4:
-	    case OPEN + 5:
-	    case OPEN + 6:
-	    case OPEN + 7:
-	    case OPEN + 8:
-	    case OPEN + 9:{
-		    register       int    no;
-		    register const char* save;
-
-		    no = OP(scan) - OPEN;
-		    save = reginput;
-
-		    if (regmatch(next)) {
-
-			//
-			// Don't set startp if some later invocation of the
-			// same parentheses already has. 
-			//
-			if (regstartp[no] == NULL)
-			    regstartp[no] = save;
-			return (1);
-		    }
-		    else
-			return (0);
-		}
-//		break;
-	    case CLOSE + 1:
-	    case CLOSE + 2:
-	    case CLOSE + 3:
-	    case CLOSE + 4:
-	    case CLOSE + 5:
-	    case CLOSE + 6:
-	    case CLOSE + 7:
-	    case CLOSE + 8:
-	    case CLOSE + 9:{
-		    register       int    no;
-		    register const char* save;
-
-		    no = OP(scan) - CLOSE;
-		    save = reginput;
-
-		    if (regmatch(next)) {
-
-			//
-			// Don't set endp if some later invocation of the
-			// same parentheses already has. 
-			//
-			if (regendp[no] == NULL)
-			    regendp[no] = save;
-			return (1);
-		    }
-		    else
-			return (0);
-		}
-//		break;
-	    case BRANCH:{
-	      
-	      register const char* save;
-
-		    if (OP(next) != BRANCH)	// No choice.
-			next = OPERAND(scan);	// Avoid recursion.
-		    else {
-			do {
-			    save = reginput;
-			    if (regmatch(OPERAND(scan)))
-				return (1);
-			    reginput = save;
-			    scan = regnext(scan);
-			} while (scan != NULL && OP(scan) == BRANCH);
-			return (0);
-			// NOTREACHED
-		    }
-		}
-		break;
-	    case STAR:
-	    case PLUS:{
-	      register char   nextch;
-		    register int        no;
-		    register const char* save;
-		    register int        min_no;
-
-		    //
-		    // Lookahead to avoid useless match attempts when we know
-		    // what character comes next. 
-		    //
-		    nextch = '\0';
-		    if (OP(next) == EXACTLY)
-			nextch = *OPERAND(next);
-		    min_no = (OP(scan) == STAR) ? 0 : 1;
-		    save = reginput;
-		    no = regrepeat(OPERAND(scan));
-		    while (no >= min_no) {
-			// If it could work, try it.
-			if (nextch == '\0' || *reginput == nextch)
-			    if (regmatch(next))
-				return (1);
-			// Couldn't or didn't -- back up.
-			no--;
-			reginput = save + no;
-		    }
-		    return (0);
-		}
-//		break;
-	    case END:
- 		return (1);	// Success!
-
-	    default:
-	        //RAISE Error, SYM(ossimRegExp), SYM(Internal_Error),
-                printf ("ossimRegExp::find(): Internal error -- memory corrupted.\n");
-		return 0;
-	}
-	scan = next;
-    }
-
-    // 
-    //  We get here only if there's trouble -- normally "case END" is the
-    //  terminating point. 
-    // 
-    //RAISE Error, SYM(ossimRegExp), SYM(Internal_Error),
-    printf ("ossimRegExp::find(): Internal error -- corrupted pointers.\n");
-    return (0);
-}
-
-
-/*
- - regrepeat - repeatedly match something simple, report how many
- */
-int ossimRegExp::regrepeat (const char* p) {
-    register       int   count = 0;
-    register const char* scan;
-    register const char* opnd;
-
-    scan = reginput;
-    opnd = OPERAND(p);
-    switch (OP(p)) {
-	case ANY:
-	    count = (int)strlen(scan);
-	    scan += count;
-	    break;
-	case EXACTLY:
-	    while (*opnd == *scan) {
-		count++;
-		scan++;
-	    }
-	    break;
-	case ANYOF:
-	    while (*scan != '\0' && strchr(opnd, *scan) != NULL) {
-		count++;
-		scan++;
-	    }
-	    break;
-	case ANYBUT:
-	    while (*scan != '\0' && strchr(opnd, *scan) == NULL) {
-		count++;
-		scan++;
-	    }
-	    break;
-	default:		// Oh dear.  Called inappropriately.
-	    //RAISE Error, SYM(ossimRegExp), SYM(Internal_Error),
-	    printf ("ossimRegExp::find(): Internal error.\n");
-	    return 0;
-    }
-    reginput = scan;
-    return (count);
-}
-
-
-/*
- - regnext - dig the "next" pointer out of a node
- */
-const char* ossimRegExp::regnext (register const char* p) {
-    register int offset;
-
-    if (p == &regdummy)
-	return (NULL);
-
-    offset = NEXT(p);
-    if (offset == 0)
-	return (NULL);
-
-    if (OP(p) == BACK)
-	return (p - offset);
-    else
-	return (p + offset);
-}
-
-
-char* ossimRegExp::regnext (register char* p) {
-    register int offset;
-
-    if (p == &regdummy)
-	return (NULL);
-
-    offset = NEXT(p);
-    if (offset == 0)
-	return (NULL);
-
-    if (OP(p) == BACK)
-	return (p - offset);
-    else
-	return (p + offset);
-}
diff --git a/src/ossim/base/ossimRgbLutDataObject.cpp b/src/ossim/base/ossimRgbLutDataObject.cpp
deleted file mode 100644
index 82df655..0000000
--- a/src/ossim/base/ossimRgbLutDataObject.cpp
+++ /dev/null
@@ -1,279 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimRgbLutDataObject.cpp 13710 2008-10-14 16:27:57Z gpotts $
-#include <ossim/base/ossimRgbLutDataObject.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimColumnVector3d.h>
-#include <ossim/base/ossimNotifyContext.h>
-
-#include <sstream>
-using namespace std;
-
-RTTI_DEF1(ossimRgbLutDataObject, "ossimRgbLutDataObject", ossimObject);
-
-ostream& operator <<(ostream& out,
-                     const ossimRgbLutDataObject& lut)
-{
-   for(ossim_uint32 index = 0; index < lut.theNumberOfEntries; ++index)
-   {
-      out << "entry" << index << " " << lut[index] << endl;
-   }
-
-   return out;
-}
-
-ossimRgbLutDataObject::ossimRgbLutDataObject(unsigned long numberOfEntries)
-   :
-      theLut(NULL),
-      theNumberOfEntries(numberOfEntries)
-{
-   if(theNumberOfEntries > 0)
-   {
-      // allocate 256 entries for the data object;
-      theLut = new ossimRgbVector[theNumberOfEntries];
-   }
-      
-}
-
-ossimRgbLutDataObject::ossimRgbLutDataObject(const ossimRgbLutDataObject& lut)
-   :
-      theLut(NULL),
-      theNumberOfEntries(0)
-{
-   theNumberOfEntries = lut.theNumberOfEntries;
-   if(theNumberOfEntries > 0)
-   {
-      theLut = new ossimRgbVector[theNumberOfEntries];
-      for(ossim_uint32 index = 0; index < theNumberOfEntries; ++index)
-      {
-         theLut[index] = lut.theLut[index];
-      }
-   }
-}
-
-ossimRgbLutDataObject::~ossimRgbLutDataObject()
-{
-   if(theLut)
-   {
-      delete [] theLut;
-      theLut = NULL;
-   }
-   theNumberOfEntries = 0;
-}
-
-int ossimRgbLutDataObject::findIndex(ossim_uint8 r, ossim_uint8 g, ossim_uint8 b)
-{
-   ossim_uint32 distance = 0x7FFFFFFF; // max 4 byte signed
-   ossim_int32 result   = 0;
-
-   if(theNumberOfEntries > 0)
-   {
-      for(ossim_uint32 i = 0; i < theNumberOfEntries; ++i)
-      {
-         ossim_uint32 rDelta = r - theLut[i].getR();
-         ossim_uint32 gDelta = g - theLut[i].getG();
-         ossim_uint32 bDelta = b - theLut[i].getB();
-
-         ossim_uint32 deltaSumSquare = (rDelta*rDelta +
-                                        gDelta*gDelta +
-                                        bDelta*bDelta);
-         if(deltaSumSquare == 0)
-         {
-            return static_cast<int>(i);
-         }
-         else if( deltaSumSquare < distance)
-         {
-            result = static_cast<int>(i);
-            distance = deltaSumSquare;
-         }
-      }
-   }
-
-   return result;
-}
-
-ossimRgbLutDataObject ossimRgbLutDataObject::rotate(long numberOfElements)const
-{
-   if(numberOfElements < 0)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL: Negative rotation is not supported yet in ossimRgbLutDataObject::rotate" << endl;
-      return *this;
-   }
-   ossimRgbLutDataObject lut;
-   for(ossim_uint32 index = 0; index < theNumberOfEntries; ++index)
-   {
-      int adjustedDestinationIndex = (index+numberOfElements)%theNumberOfEntries;
-      lut[adjustedDestinationIndex] = theLut[index] ;
-   }
-
-   return lut;
-}
-
-ossimRgbLutDataObject& ossimRgbLutDataObject::rotate(long numberOfElements)
-{
-   if(numberOfElements < 0)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL: Negative rotation is not supported yet in ossimRgbLutDataObject::rotate" << endl;
-      return *this;
-   }
-   const ossimRgbLutDataObject* temp = this;
-
-   *this = temp->rotate(numberOfElements);
-
-   return *this;
-}
-
-const ossimRgbLutDataObject& ossimRgbLutDataObject::operator =(const ossimRgbLutDataObject& lut)
-{
-   if(theNumberOfEntries != lut.theNumberOfEntries)
-   {
-      delete [] theLut;
-      theLut = NULL;
-   }
-
-   theNumberOfEntries = lut.theNumberOfEntries;
-   if(!theLut&&(theNumberOfEntries > 0))
-   {
-      theLut = new ossimRgbVector[theNumberOfEntries];
-   }
-   for(unsigned long index = 0; index < theNumberOfEntries; ++index)
-   {
-      theLut[index] = lut.theLut[index];
-   }
-
-   return *this;
-}
-
-bool ossimRgbLutDataObject::operator ==(const ossimRgbLutDataObject& lut)const
-{
-   if(theNumberOfEntries != lut.theNumberOfEntries)
-   {
-      return false;
-   }
-   for(unsigned long index = 0; index < theNumberOfEntries; ++index)
-   {
-      if(theLut[index] != lut.theLut[index])
-      {
-         return false;
-      }
-   }
-   return true;
-}
-
-bool ossimRgbLutDataObject::saveState(ossimKeywordlist& kwl, const char* prefix)const
-{
-   kwl.add(prefix,
-           "type",
-           getClassName(),
-           true);
-   kwl.add(prefix,
-           "number_of_entries",
-           ossimString::toString(theNumberOfEntries).c_str(),
-           true);
-   for(ossim_uint32 index = 0; index < theNumberOfEntries; ++index)
-   {
-      ossimString newPrefix = "entry";
-      newPrefix += ossimString::toString(index);
-      ostringstream ostr;
-      ostr << (int)(theLut[index].getR())
-           << " " << (int)(theLut[index].getG())
-           << " " << (int)(theLut[index].getB());
-      kwl.add(prefix,
-              newPrefix,
-              ostr.str().c_str(),
-              true);
-   }
-
-   return true;
-}
-
-bool ossimRgbLutDataObject::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   const char* lutFile = kwl.find(prefix, "lut_file");
-   ossimKeywordlist fileLut;
-   ossimKeywordlist* tempKwl = (const_cast<ossimKeywordlist*>(&kwl));
-   ossimString tempPrefix = prefix;
-
-   // this should have been used instead of lut_file.  We will still look
-   // for lut_file for backward compatibility.
-   //
-   if(!lutFile)
-   {
-      lutFile = kwl.find(prefix, "filename");
-   }
-   // check to see if we should open an external file
-   // if so point the fileLut to the one that we use
-   if(lutFile)
-   {
-      ossimFilename filename(lutFile);
-      if(filename.exists())
-      {
-         fileLut.addFile(filename.c_str());
-         tempKwl = &fileLut;
-         tempPrefix = "";
-      }
-   }
- 
-   const char* numberOfEntries = tempKwl->find(tempPrefix, "number_of_entries");
-   if(!numberOfEntries)
-   {
-      numberOfEntries = tempKwl->find(tempPrefix, "number_entries");
-   }
-   if(!numberOfEntries) return false;
-   theNumberOfEntries = ossimString(numberOfEntries).toULong();
-
-   delete [] theLut;
-   theLut = new ossimRgbVector[theNumberOfEntries];
-
-   if(tempKwl->find(tempPrefix, "entry0"))
-   {
-      for(ossim_uint32 index = 0; index < theNumberOfEntries; ++index)
-      {
-         ossimString newPrefix = "entry";
-         newPrefix += ossimString::toString(index);
-         ossimString v = tempKwl->find(tempPrefix, newPrefix.c_str());
-         istringstream istr(v);
-
-         ossimString r, g, b;
-         istr >> r >> g >> b;
-         theLut[index].setR((unsigned char)r.toInt32());
-         theLut[index].setG((unsigned char)g.toInt32());
-         theLut[index].setB((unsigned char)b.toInt32());
-      }
-   }
-   else
-   {
-      for(ossim_uint32 index = 0; index < theNumberOfEntries; ++index)
-      {
-         ossimString newPrefix = "entry";
-         newPrefix += ossimString::toString(index);
-         
-         const char* r = tempKwl->find(tempPrefix, (newPrefix+".r").c_str());
-         const char* g = tempKwl->find(tempPrefix, (newPrefix+".g").c_str());
-         const char* b = tempKwl->find(tempPrefix, (newPrefix+".b").c_str());
-         
-         if(r)
-         {
-            theLut[index].setR((unsigned char)ossimString(r).toLong());
-         }
-         if(g)
-         {
-            theLut[index].setG((unsigned char)ossimString(g).toLong());
-         }
-         if(b)
-         {
-            theLut[index].setB((unsigned char)ossimString(b).toLong());
-         }
-      }
-   }
-   return true;
-}
diff --git a/src/ossim/base/ossimRtti.cpp b/src/ossim/base/ossimRtti.cpp
deleted file mode 100644
index 5a7f14d..0000000
--- a/src/ossim/base/ossimRtti.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-
-#include <iostream>
-#include <cstring>
-#include <cstdlib>
-using namespace std;
-
-#include <ossim/base/ossimRtti.h>
-
-static const RTTITypeinfo* RTTI_base_null_type[] = { 0 };
-
-const RTTITypeinfo* RTTIdyntypeid::a[] = { 0 };
-
-const RTTITypeinfo RTTITypeinfo::null_type = RTTITypeinfo("NULL", RTTI_base_null_type,0,0);
-
-void RTTITypeinfo::add_subtype(const RTTITypeinfo* t)		//Adds t as last RTTITypeinfo in the
-{									//'subtypes' list. For this, the
-   const RTTITypeinfo** ptr = new const RTTITypeinfo*[ns+1];		//list is realloc'd with one extra entry.
-   int i; for(i=0;i<ns;i++) ptr[i] = subtypes[i];
-   ptr[i] = t;
-   ns++;
-   delete[] subtypes;
-   subtypes = ptr;
-}
-
-void RTTITypeinfo::del_subtype(const RTTITypeinfo* t) 		//Searches for t in the subtypes list
-{									//of this and removes it, if found.
-   int i; for(i=0;i<ns && subtypes[i]!=t;i++);
-   if (i<ns)
-     for(;i<ns-1;i++) subtypes[i] = subtypes[i+1];
-}
-
-RTTITypeinfo::RTTITypeinfo(const char* name,
-                           const RTTITypeinfo* bb[],
-                           void* (*f1)(int,void*),
-                           void* (*f2)())
-{
-  n       = strdup(name);
-  b = bb; //ns = 0; subtypes = 0;		//Create default RTTITypeinfo
-  cast    = f1;								//Attach casting func
-  new_obj = f2;								//Attach creation func
-  int i = 0;
-  for(i=0;b[i];i++)							//Add this as subtype to all its basetypes
-     ((RTTITypeinfo**)b)[i]->add_subtype(this);				//REMARK: Harmless const castaway
-}
-
-const char* RTTITypeinfo::getname() const
-{
-  return n;
-}
-
-
-RTTITypeinfo::~RTTITypeinfo()
-{
-   if(n)
-   {
-      free(n);
-      n = NULL;
-   }
-  int i = 0;
-   for(i=0;b[i];i++)
-   {
-      //Del this subtype from all its basetypes
-      ((RTTITypeinfo**)b)[i]->del_subtype(this); //REMARK: Harmless const castaway
-   }
-}
-
-int RTTITypeinfo::has_base(const RTTITypeinfo* p) const
-{
-  int i = 0;
-   for(i=0;b[i];i++)							//for all bases of this...
-      if (p->same(b[i]) || b[i]->has_base(p)) return 1;				//match found, return 1 or no match, search deeper
-   return 0;									//no match at all, return 0
-}
-
-void* RTTITypeinfo::create(const RTTITypeinfo* bt, const char* c) const	//Tries to create an obj of type-name
-{										//given by char*. Searches for this type in the
-   void* p = 0; int i;								//type-DAG rooted by this, creates it and returns
-										//it as cast to 'bt', where bt is either this or a
-										//direct base of this.
-   if (!strcmp(c,n))								//Want to create an obj of this type ?
-      p = (new_obj)? new_obj() : 0;						//Yes, do it if this type is instantiable.
-   else										//No, try with subclasses...
-      for(i=0;i<ns && !((p=subtypes[i]->create(this,c)));i++);			//Succeeded creating on ith subclass branch ?
-   if (!p) return 0;								//Couldn't create it in any way, abort.
-   if (bt==this) i = -1;							//Must cast to this's own type (i==-1)
-   else for(i=0;b[i] && b[i]!=bt;i++);						//Search to which base of this we should cast
-									        //Found: cast to ith base of this
-   return cast(i,p);								//Cast to ith base of to this, return as void*
-}
-
-RTTItypeid RTTItypeid::find_baseclass(const char* name)const
-{
-   if(strcmp(name, getname())==0)
-   {
-      return *this;
-   }
-   else if(num_baseclasses() == 0)
-   {
-      if(strcmp(name, getname()) == 0)
-      {
-         return *this;
-      }
-      return null_type();
-   }
-   else
-   {
-      int index = 0;
-
-      while(index < num_baseclasses())
-      {
-         RTTItypeid typeId = baseclass(index);
-         if(typeId == *this)
-         {
-	   return *this;//null_type();
-         }
-         if(strcmp(name, typeId.getname()) == 0)
-         {
-            return *this;
-         }
-         ++index;
-      }
-      index = 0;
-      while(index < num_baseclasses())
-      {
-         RTTItypeid typeId = baseclass(index);
-         if(typeId.find_baseclass(name) == typeId.null_type())
-         {
-            ++index;
-         }
-         else
-         {
-            return typeId;
-         }
-      }
-   }
-   return null_type();
-}
diff --git a/src/ossim/base/ossimSource.cpp b/src/ossim/base/ossimSource.cpp
deleted file mode 100644
index 14b8cf9..0000000
--- a/src/ossim/base/ossimSource.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimSource.cpp 17195 2010-04-23 17:32:18Z dburken $
-#include <ossim/base/ossimSource.h>
-#include <ossim/base/ossimDataObject.h>
-#include <ossim/base/ossimIdManager.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimBooleanProperty.h>
-
-RTTI_DEF2(ossimSource, "ossimSource",
-          ossimConnectableObject, ossimErrorStatusInterface)
-
-
-ossimSource::ossimSource(ossimObject* owner)
-   :
-      ossimConnectableObject(owner),
-      theEnableFlag(true),
-      theInitializedFlag(false)
-{
-}
-
-ossimSource::ossimSource(const ossimSource &rhs)
-   :
-      ossimConnectableObject(rhs),
-      theEnableFlag(rhs.theEnableFlag),
-      theInitializedFlag(rhs.theInitializedFlag)
-{
-}
-
-ossimSource::ossimSource(ossimObject* owner,
-                         ossim_uint32 inputListSize,
-                         ossim_uint32 outputListSize,
-                         bool inputListIsFixedFlag,
-                         bool outputListIsFixedFlag)
-   :
-      ossimConnectableObject(owner, inputListSize, outputListSize,
-                             inputListIsFixedFlag, outputListIsFixedFlag),
-      theEnableFlag(true),
-      theInitializedFlag(false)
-{}
-
-ossimSource::~ossimSource()   
-{
-}
-
-bool ossimSource::saveState(ossimKeywordlist& kwl,
-                            const char* prefix)const
-{
-   kwl.add(prefix,
-           ossimKeywordNames::ENABLED_KW,
-           (int)theEnableFlag,
-           true);
-
-   return ossimConnectableObject::saveState(kwl, prefix);
-}
-
-bool ossimSource::loadState(const ossimKeywordlist& kwl,
-                            const char* prefix)
-{
-   const char* lookup = kwl.find(prefix,
-                                 ossimKeywordNames::ENABLED_KW);
-   if(lookup)
-   {
-      theEnableFlag = ossimString(lookup).toBool();
-   }
-
-   return ossimConnectableObject::loadState(kwl, prefix);
-}
-
-bool ossimSource::isSourceEnabled()const
-{
-   return theEnableFlag;
-}
-
-void ossimSource::enableSource()
-{
-   setEnableFlag(true);
-}
-
-void ossimSource::disableSource()
-{
-   setEnableFlag(false);
-}
-
-bool ossimSource::getEnableFlag() const
-{
-   return theEnableFlag;
-}
-
-void ossimSource::setEnableFlag(bool flag)
-{
-   theEnableFlag = flag;
-}
-
-bool ossimSource::isInitialized() const
-{
-   return theInitializedFlag;
-}
-
-void ossimSource::setInitializedFlag(bool flag)
-{
-   theInitializedFlag = flag;
-}
-
-void ossimSource::initialize()
-{
-}
-
-void ossimSource::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property.valid()) return;
-
-   ossimString name = property->getName();
-   name = name.downcase();
-   
-   if(name == ossimKeywordNames::ENABLED_KW)
-   {
-      ossimString value;
-      
-      property->valueToString(value);
-      setEnableFlag(value.toBool());
-   }
-   else
-   {
-      ossimConnectableObject::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimSource::getProperty(const ossimString& name)const
-{
-   if( (name == "Enabled") || (name == ossimKeywordNames::ENABLED_KW) )
-   {
-      return new ossimBooleanProperty(ossimKeywordNames::ENABLED_KW,theEnableFlag);
-   }
-   return ossimConnectableObject::getProperty(name);
-}
-
-void ossimSource::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimConnectableObject::getPropertyNames(propertyNames);
-   
-   propertyNames.push_back(ossimKeywordNames::ENABLED_KW);
-}
-
-const ossimSource& ossimSource::operator=(const ossimSource& /* rhs */)
-{
-   return *this;
-}
-
-std::ostream& ossimSource::print(std::ostream& out) const
-{
-   out << "ossimSource::print:\n"
-      << "theEnableFlag:       " << theEnableFlag
-      << "\ntheInitializedFlag:  " << theInitializedFlag
-      << endl;
-
-   return ossimErrorStatusInterface::print(out);
-}
diff --git a/src/ossim/base/ossimStdOutProgress.cpp b/src/ossim/base/ossimStdOutProgress.cpp
deleted file mode 100644
index b3508c6..0000000
--- a/src/ossim/base/ossimStdOutProgress.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimStdOutProgress.cpp 9094 2006-06-13 19:12:40Z dburken $
-
-#include <iomanip>
-#include <ossim/base/ossimStdOutProgress.h>
-
-RTTI_DEF1(ossimStdOutProgress, "ossimStdOutProgress", ossimProcessListener);
-
-ossimStdOutProgress theStdOutProgress;
-
-ossimStdOutProgress::ossimStdOutProgress(ossim_uint32 precision,
-                                         bool flushStream)
-   :
-      ossimProcessListener(),
-      thePrecision(precision),
-      theFlushStreamFlag(flushStream)
-{
-}
-
-void ossimStdOutProgress::processProgressEvent(ossimProcessProgressEvent& event)
-{
-   if (event.getOutputMessageFlag())
-   {
-      ossimString s;
-      event.getMessage(s);
-      if (!s.empty())
-      {
-		  ossimNotify(ossimNotifyLevel_NOTICE) << s.c_str() << std::endl;
-      }
-      return; // Don't output percentage on a message update.
-   }
-
-   
-   double p = event.getPercentComplete();
-   ossimNotify(ossimNotifyLevel_NOTICE)
-	   << std::setiosflags(std::ios::fixed)
-      << std::setprecision(thePrecision)
-      << p << "%\r";
-   
-   if(theFlushStreamFlag)
-   {
-      (p != 100.0) ?
-         ossimNotify(ossimNotifyLevel_NOTICE).flush() :
-         ossimNotify(ossimNotifyLevel_NOTICE) << "\n";
-   }
-}
-
-void ossimStdOutProgress::setFlushStreamFlag(bool flag)
-{
-   theFlushStreamFlag = flag;
-}
-
diff --git a/src/ossim/base/ossimStreamFactory.cpp b/src/ossim/base/ossimStreamFactory.cpp
deleted file mode 100644
index 7988f38..0000000
--- a/src/ossim/base/ossimStreamFactory.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2005 Garrett Potts
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//
-//*******************************************************************
-//  $Id: ossimStreamFactory.cpp 18652 2011-01-10 13:30:31Z dburken $
-//
-#include <ossim/base/ossimStreamFactory.h>
-#include <fstream>
-#include <ossim/ossimConfig.h>
-#include <ossim/base/ossimFilename.h>
-#if OSSIM_HAS_LIBZ
-#include <ossim/base/ossimGzStream.h>
-#endif
-
-
-ossimStreamFactory* ossimStreamFactory::theInstance = 0;
-
-ossimStreamFactory::ossimStreamFactory()
-   : ossimStreamFactoryBase()
-{
-}
-
-ossimStreamFactory::~ossimStreamFactory()
-{
-}
-
-ossimStreamFactory* ossimStreamFactory::instance()
-{
-   if(!theInstance)
-   {
-      theInstance = new ossimStreamFactory;
-   }
-
-   return theInstance;
-}
-
-ossimRefPtr<ossimIFStream> ossimStreamFactory::createNewIFStream(
-   const ossimFilename& file,
-   std::ios_base::openmode openMode) const
-{
-   ossimRefPtr<ossimIFStream> result = 0;
-   
-#if OSSIM_HAS_LIBZ
-   ossimFilename copyFile = file;
-
-   if(!copyFile.exists())
-   {
-      ossimString ext = copyFile.ext();
-      copyFile.setExtension("gz");
-      if(!copyFile.exists())
-      {
-         copyFile.setExtension(ext);
-         copyFile += ".gz";
-
-         if(!copyFile.exists())
-         {
-            return result;
-         }
-      }
-   }
-   
-   std::ifstream in(copyFile.c_str(), std::ios::in|std::ios::binary);
-
-   if(!in) return result;
-
-   unsigned char buf[2];
-
-   in.read((char*)buf, 2);
-   in.close();
-   // check for gzip magic number
-   //
-   if((buf[0] == 0x1F) &&
-      (buf[1] == 0x8B))
-   {
-      result = new ossimIgzStream(copyFile.c_str(), openMode);
-   }
-#endif
-   return result;
-}
-
-ossimStreamFactory::ossimStreamFactory(const ossimStreamFactory&)
-   : ossimStreamFactoryBase()
-{}
-
-
-
diff --git a/src/ossim/base/ossimStreamFactoryRegistry.cpp b/src/ossim/base/ossimStreamFactoryRegistry.cpp
deleted file mode 100644
index 3ab1126..0000000
--- a/src/ossim/base/ossimStreamFactoryRegistry.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimStreamFactoryRegistry.cpp 11177 2007-06-07 19:47:04Z dburken $
-//
-#include <ossim/base/ossimStreamFactoryRegistry.h>
-#include <ossim/base/ossimStreamFactory.h>
-#include <ossim/base/ossimIoStream.h>
-#include <ossim/base/ossimFilename.h>
-
-#include <fstream>
-#include <algorithm>
-
-ossimStreamFactoryRegistry* ossimStreamFactoryRegistry::theInstance = 0;
-
-ossimStreamFactoryRegistry::ossimStreamFactoryRegistry()
-{
-}
-
-ossimStreamFactoryRegistry::~ossimStreamFactoryRegistry()
-{
-}
-
-ossimStreamFactoryRegistry* ossimStreamFactoryRegistry::instance()
-{
-   if(!theInstance)
-   {
-      theInstance = new ossimStreamFactoryRegistry();
-      theInstance->registerFactory(ossimStreamFactory::instance());
-   }
-
-   return theInstance;
-}
-
-ossimRefPtr<ossimIFStream>
-ossimStreamFactoryRegistry::createNewIFStream(
-   const ossimFilename& file,
-   std::ios_base::openmode openMode) const
-{
-   ossim_uint32 idx = 0;
-   ossimRefPtr<ossimIFStream> result = 0;
-   for(idx = 0; ((idx < theFactoryList.size())&&(!result)); ++idx)
-   {
-      result = theFactoryList[idx]->createNewIFStream(file, openMode);
-   }
-
-   if(!result)
-   {
-      result = new ossimIFStream(file.c_str(),
-                                 openMode);
-//       result = new std::ifstream(file.c_str(),
-//                                  openMode);
-   }
-   
-   return result;
-}
-
-
-void ossimStreamFactoryRegistry::registerFactory(ossimStreamFactoryBase* factory)
-{
-   std::vector<ossimStreamFactoryBase*>::iterator iter = std::find(theFactoryList.begin(),
-                                                                  theFactoryList.end(),
-                                                                  factory);
-   if(iter == theFactoryList.end())
-   {
-      theFactoryList.push_back(factory);
-   }
-}
-
-ossimStreamFactoryRegistry::ossimStreamFactoryRegistry(const ossimStreamFactoryRegistry&)
-{}
diff --git a/src/ossim/base/ossimString.cpp b/src/ossim/base/ossimString.cpp
deleted file mode 100644
index 5ea9986..0000000
--- a/src/ossim/base/ossimString.cpp
+++ /dev/null
@@ -1,1087 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: This class extends the stl's string class.
-// 
-//********************************************************************
-// $Id: ossimString.cpp 22160 2013-02-25 12:09:35Z gpotts $
-
-#include <cctype> /* for toupper */
-#include <cstdlib> /* for getenv() */
-#include <stack> 
-#include <iostream>
-#include <iomanip>
-#include <sstream>
-#include <stdlib.h>
-#include <algorithm>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimRegExp.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimHexString.h>
-
-static ossimTrace traceDebug("ossimString:debug");
-
-#ifdef OSSIM_ID_ENABLED
-static char OSSIM_ID[] = "$Id: ossimString.cpp 22160 2013-02-25 12:09:35Z gpotts $";
-#endif
-
-ossimString ossimString::upcase(const ossimString& aString)
-{
-   std::string s = aString.string();
-   
-   std::string::iterator eachCharacter = s.begin();
-   while(eachCharacter != s.end())
-   {
-      *eachCharacter = toupper(*eachCharacter);
-      eachCharacter++;
-   }
-
-   return s;
-}
-
-ossimString ossimString::downcase(const ossimString& aString)
-{
-   std::string s = aString.m_str;
-
-   std::string::iterator eachCharacter = s.begin();
-   while(eachCharacter != s.end())
-   {
-      *eachCharacter = tolower(*eachCharacter);
-      ++eachCharacter;
-   }
-
-   return ossimString(s);
-}
-
-ossimString& ossimString::upcase()
-{
-   std::string::iterator eachCharacter = m_str.begin();
-   while(eachCharacter != m_str.end())
-   {
-      *eachCharacter = toupper(*eachCharacter);
-      ++eachCharacter;
-   }
-
-   return *this;
-}
-
-ossimString ossimString::upcase()const
-{
-   ossimString result(*this);
-   result.upcase();
-   return result;
-}
-
-ossimString& ossimString::downcase()
-{
-   std::string::iterator eachCharacter = m_str.begin();
-   while(eachCharacter != m_str.end())
-   {
-      *eachCharacter = tolower(*eachCharacter);
-      ++eachCharacter;
-   }
-   
-   return *this;
-}
-
-ossimString ossimString::downcase()const
-{
-   ossimString result(*this);
-   result.downcase();
-   return result;
-}
-
-char* ossimString::stringDup()const
-{
-   char *result = 0;
-
-   if(length() == 0)
-   {
-      result = new char[1];
-      result[0] = '\0';
-   }
-   else
-   {  
-      ossim_uint32 index = 0;
-      ossim_uint32 len = (ossim_uint32)m_str.length();
-      result = new char[len+1];
-      const char* sourceString = m_str.c_str();
-
-      while(index < len) 
-      {
-         result[index] = sourceString[index];
-         ++index;
-      }
-      result[len] = '\0';
-   }
-   return result;
-}
-
-ossimString ossimString::stripLeading(const ossimString &value, char characterToStrip)
-{
-   std::string s;
-   ossimString::const_iterator stringIter = value.m_str.begin();
-   
-   while((*stringIter == characterToStrip)&&(stringIter!=value.m_str.end()))
-   {
-      ++stringIter;
-   }
-
-   while(stringIter != value.m_str.end())
-   {
-      s += *stringIter;
-      ++stringIter;
-   }
-   
-   return ossimString(s);
-}
-
-ossimString ossimString::substitute(const ossimString &searchKey,
-                                    const ossimString &replacementValue,
-                                    bool replaceAll)const
-{
-   std::string result = m_str;
-
-   size_type pos = result.find(searchKey.m_str);
-   
-   if (pos == std::string::npos) return result;  // Search key not found.
-   
-   if(replaceAll)
-   {
-      while(pos != std::string::npos)
-      {
-         result.replace(pos, searchKey.m_str.size(), replacementValue.m_str.c_str());
-         pos = result.find(searchKey.m_str, pos+replacementValue.m_str.size());
-      }
-   }
-   else  // Replace only the first instance.
-   {
-      result.replace(pos, searchKey.m_str.size(), replacementValue.m_str.c_str());
-   }
-
-   return ossimString(result);
-}
-
-ossimString& ossimString::gsub(const ossimString &searchKey,
-                               const ossimString &replacementValue,
-                               bool replaceAll)
-{
-   size_type pos = m_str.find(searchKey.m_str);
-   
-   if (pos == std::string::npos) return *this;  // Search key not found.
-   
-   if(replaceAll)
-   {
-      while(pos < m_str.size())
-      {
-         m_str.replace(pos, searchKey.m_str.size(), replacementValue.m_str.c_str());
-         pos = find(searchKey.m_str, pos+replacementValue.m_str.size());
-      }
-   }
-   else  // Replace only the first instance.
-   {
-      m_str.replace(pos, searchKey.m_str.size(), replacementValue.m_str.c_str());
-   }
-
-   return *this;
-}
-
-ossimString  ossimString::trim(const ossimString& valueToTrim) const
-{
-   ossimString tempString(*this);
-   
-   return tempString.trim(valueToTrim);
-}
-
-ossimString& ossimString::trim(const ossimString& valueToTrim)
-{
-   if(m_str.size() == 0) return *this;
-   if(valueToTrim.empty()) return *this;
-   iterator startPos = (*this).begin();
-   iterator endPos   = (*this).begin() + ((*this).size()-1);
-
-   while( ( startPos != (*this).end() ) &&
-          (std::find(valueToTrim.begin(),
-                     valueToTrim.end(),
-                     *startPos)!=valueToTrim.end()) ) ++startPos;
-
-   if(startPos == (*this).end())
-   {
-      *this = "";
-      return *this;
-   }
-   
-   while( (endPos!=startPos)&& (std::find(valueToTrim.begin(),
-                                          valueToTrim.end(),
-                                          *endPos)!=valueToTrim.end())) --endPos;
-
-   *this = ossimString(startPos, endPos+1);
-
-   return *this;
-}
-
-ossimString ossimString::beforePos(std::string::size_type pos)const
-{
-   ossimString result = *this;
-
-   if(pos < length())
-   {
-      result.erase(pos, std::string::npos);
-   }
-
-   return result;
-}
-
-ossimString ossimString::afterPos(std::string::size_type pos)const
-{
-   ossimString result = *this;
-
-   if(pos < length())
-   {
-      result.erase(0, pos+1);
-   }
-   else
-   {
-      return "";
-   }
-
-   return result;
-   
-}
-
-std::vector<ossimString> ossimString::explode(const ossimString& delimeter) const
-{
-   ossimString exp_str = *this;
-   std::vector<ossimString> result;
-   char* tokenPtr;
-
-   tokenPtr = strtok((char*)exp_str.c_str(), (char*)delimeter.c_str());
-
-   while(tokenPtr != NULL)
-   {
-      result.push_back(tokenPtr);
-      tokenPtr = strtok(NULL, delimeter.c_str());
-   }
-
-   return result;
-}
-
-ossimString ossimString::expandEnvironmentVariable() const
-{
-   ossimString result(*this);
-   std::stack<ossim_uint32> startChars;
-   ossimRegExp regExpStart("\\$\\(");
-
-   if(regExpStart.find(result.c_str()))
-   {
-      startChars.push(regExpStart.start());
-      while(!startChars.empty())
-      {
-         ossim_uint32 offset = startChars.top() + 2; // skip over the $(
-         
-         // We will replace like a stack by looking at the right most $(
-         //
-         if(regExpStart.find(result.c_str()+offset))
-         {
-            // maintain absolute offset to the original string
-            startChars.push(regExpStart.start()+offset);
-         }
-         else 
-         {
-            // now look for a closing ) for the stating $(
-            ossimRegExp regExpEnd("\\)");
-            if(regExpEnd.find(result.c_str()+startChars.top()))
-            {
-               ossimString envVarStr(result.begin()+startChars.top()+2,
-                                     result.begin()+startChars.top()+regExpEnd.start());
-               const char* lookup = getenv( envVarStr.c_str() );
-               if ( lookup )
-               {
-                  result.replace(result.begin()+startChars.top(),
-                                 result.begin()+startChars.top()+regExpEnd.start()+1,
-                                 ossimString(lookup));
-               }
-               else 
-               {
-                  if(traceDebug())
-                  {
-                     ossimNotify(ossimNotifyLevel_WARN)
-                     << "In member function ossimString::expandEnvironmentVariable() "
-                     << "\n\tERROR: Environment variable("
-                     << envVarStr.c_str()
-                     << ") not found!"
-                     << std::endl;
-                  }
-                  result.replace(result.begin()+startChars.top(),
-                                 result.begin()+startChars.top()+regExpEnd.start()+1,
-                                 "");
-               }
-            }
-            startChars.pop();
-         }
-      }
-   }
-   
-   
-   return result;
-}
-
-//---
-// Regular expression pattern utilities
-//---
-
-ossimString ossimString::beforeRegExp(const char *regularExpressionPattern) const
-{   
-   ossimRegExp anExpression;
-   
-   anExpression.compile(regularExpressionPattern);
-
-   if(anExpression.find(c_str()))
-   {
-      if (anExpression.start() > 0)
-      {
-         return substr(0, anExpression.start());
-      }
-   }
-   
-   return ossimString("");
-}
-
-ossimString ossimString::fromRegExp(const char *regularExpressionPattern) const
-{   
-   ossimRegExp anExpression;
-   
-   anExpression.compile(regularExpressionPattern);
-
-   if(anExpression.find(c_str()))
-   {
-      if (anExpression.start() < size())
-      {
-         return substr(anExpression.start(), (size()-anExpression.start()));
-      }
-   }
-   
-   return ossimString("");
-}
-
-ossimString ossimString::afterRegExp(const char *regularExpressionPattern) const
-{   
-   ossimRegExp anExpression;
-   
-   anExpression.compile(regularExpressionPattern);
-
-   if(anExpression.find(c_str()))
-   {
-      if (anExpression.end() < size())
-      {
-         return substr(anExpression.end(), (size()-anExpression.end()));
-      }
-   }
-   
-   return ossimString("");
-}
-
-ossimString ossimString::match(const char *regularExpressionPattern) const
-{   
-   ossimRegExp anExpression;
-   
-   anExpression.compile(regularExpressionPattern);
-
-   if((anExpression.find(this->c_str())) &&
-      (anExpression.start() !=anExpression.end()))
-   {
-      return this->substr(anExpression.start(),
-                          anExpression.end() - anExpression.start() );
-   }
-
-   
-   return ossimString("");
-}
-
-ossimString ossimString::replaceAllThatMatch(const char *regularExpressionPattern,
-                                             const char *value) const
-{
-   ossimString result = *this;
-   ossimRegExp anExpression;
-   std::string::size_type offset     = 0;
-   std::string::size_type valueLength = ossimString(value).length();
-   anExpression.compile(regularExpressionPattern);
-   if(!anExpression.is_valid())
-   {
-      return *this;
-   }
-   while(anExpression.find(result.c_str()+offset))
-   {
-      if(anExpression.start() < anExpression.end())
-      {
-         result.replace(anExpression.start() + offset,
-                        anExpression.end()-anExpression.start(),
-                        value);
-         offset += anExpression.start() + valueLength;
-      }
-      else
-      {
-         break;
-      }
-   }
-
-   return result;
-}
-
-ossimString ossimString::replaceStrThatMatch(const char *regularExpressionPattern,
-                                             const char *value) const
-{
-   ossimString result = *this;
-   ossimRegExp anExpression;
-   anExpression.compile(regularExpressionPattern);
-   if(!anExpression.is_valid())
-   {
-      return *this;
-   }
-   if(anExpression.find(result.c_str()))
-   {
-      if(anExpression.start() < anExpression.end())
-      {
-         result.replace(anExpression.start(),
-                        anExpression.end()-anExpression.start(),
-                        value);
-      }
-   }
-
-   return result;
-}
-
-bool ossimString::toBool()const
-{
-   ossimString s = c_str();
-   if (s.empty())
-   {
-      return false;
-   }
-   
-   s = s.downcase();
-   if ( (s == "true") ||
-        (s == "yes")  ||
-        (s == "y")    ||
-        (s == "1") )
-   {
-      return true;
-   }
-   else if ( (s == "false") ||
-             (s == "no")    ||
-             (s == "n")     ||
-             (s == "0") )
-   {
-      return false;
-      
-   }
-   else if (toInt32())
-   {
-      return true;
-   }
-
-   return false;
-}
-
-bool ossimString::toBool(const ossimString& aString)
-{
-   // Check for true or false, yes or no, y or n, and 1 or 0...
-   ossimString s = aString;
-   if (s.empty())
-   {
-      return false;
-   }
-   s.downcase();
-   if ( (s == "true") ||
-        (s == "yes")  ||
-        (s == "y")    ||
-        (s == "1") )
-   {
-      return true;
-   }
-   else if ( (s == "false") ||
-             (s == "no")    ||
-             (s == "n")     ||
-             (s == "0") )
-   {
-      return false;
-      
-   }
-   else if (aString.toInt32())
-   {
-      return true;
-   }
-
-   return false;
-}
-
-ossim_uint8 ossimString::toUInt8()const
-{
-   // Note the std::istringstream::operator>> does not work with unsigned 8 bit.
-   ossim_uint16 i = 0;
-   if (!empty())
-   {
-      std::istringstream is(m_str);
-      is >> i;
-      if(is.fail())
-      {
-        i = 0;
-      }
-   }
-   return static_cast<ossim_uint8>(i);
-}
-
-ossim_uint8 ossimString::toUInt8(const ossimString& aString)
-{
-   return aString.toUInt8();
-}
-
-int ossimString::toInt()const
-{
-   int i = 0;
-   if (!empty())
-   {
-      std::istringstream is(m_str);
-      is >> i;
-      if(is.fail())
-      {
-         i = 0;
-      }
-   }
-   return i;
-}
-
-int ossimString::toInt(const ossimString& aString)
-{
-   return aString.toInt();
-}
-
-ossim_int16 ossimString::toInt16()const
-{
-   ossim_int16 i = 0;
-   if (!empty())
-   {
-      std::istringstream is(m_str);
-      is >> i;
-      if(is.fail())
-      {
-         i = 0;
-      }
-   }
-   return i;
-}
-
-ossim_int16 ossimString::toInt16(const ossimString& aString)
-{
-   return aString.toInt16();
-}
-
-ossim_uint16 ossimString::toUInt16()const
-{
-   ossim_uint16 i = 0;
-   if (!empty())
-   {
-      std::istringstream is(m_str);
-      is >> i;
-      if(is.fail())
-      {
-         i = 0;
-      }
-   }
-   return i;
-}
-
-ossim_uint16 ossimString::toUInt16(const ossimString& aString)
-{
-   return aString.toUInt16();
-}
-
-ossim_int32 ossimString::toInt32()const
-{
-   ossim_int32 i = 0;
-   if (!empty())
-   {
-      std::istringstream is(m_str);
-      is >> i;
-      if(is.fail())
-      {
-         i = 0;
-      }
-   }
-   return i;
-}
-
-ossim_int32 ossimString::toInt32(const ossimString& aString)
-{
-   return aString.toInt32();
-}
-
-ossim_uint32 ossimString::toUInt32()const
-{
-   ossim_uint32 i = 0;
-   if (!empty())
-   {
-      std::istringstream is(m_str);
-      is >> i;
-      if(is.fail())
-      {
-         i = 0;
-      }
-   }
-   return i;
-}
-
-ossim_uint32 ossimString::toUInt32(const ossimString& aString)
-{
-   return aString.toUInt32();
-}
-
-ossim_int64 ossimString::toInt64()const
-{
-   ossim_int64 i = 0;
-   if (!empty())
-   {
-      std::istringstream is(m_str);
-      is >> i;
-      if(is.fail())
-      {
-         i = 0;
-      }
-   }
-   return i;
-}
-
-ossim_int64 ossimString::toInt64(const ossimString& aString)
-{
-   return aString.toInt64();
-}
-
-ossim_uint64 ossimString::toUInt64()const
-{
-   ossim_uint64 i = 0;
-   if (!empty())
-   {
-      std::istringstream is(m_str);
-      is >> i;
-      if(is.fail())
-      {
-         i = 0;
-      }
-   }
-   return i;
-}
-
-ossim_uint64 ossimString::toUInt64(const ossimString& aString)
-{
-   return aString.toUInt64();
-}
-
-long ossimString::toLong()const
-{
-  long i = 0;
-   if (!empty())
-   {
-      std::istringstream is(m_str);
-      is >> i;
-      if(is.fail())
-      {
-         i = 0;
-      }
-   }
-   return i;
-}
-
-long ossimString::toLong(const ossimString& aString)
-{
-   return aString.toLong();
-}
-
-unsigned long  ossimString::toULong()const
-{
-   unsigned long i = 0;
-   if (!empty())
-   {
-      std::istringstream is(m_str);
-      is >> i;
-      if(is.fail())
-      {
-         i = 0;
-      }
-   }
-   return i;
-}
-
-unsigned long ossimString::toULong(const ossimString& aString)
-{
-   return aString.toULong();
-}
-
-ossim_float32 ossimString::toFloat32()const
-{
-   if(contains("nan"))
-   {
-      return ossim::nan();
-   }
-   ossim_float32 d = 0.0;
-   // this part is core dumping under mingw in ossimPlanet.
-   // There is a possibility that this isn't a thread safe implementation
-   // in mingw stl.  Let's resort back to atof for now
-
-#if 0
-   d = (ossim_float32)atof(c_str());
-#endif
-#if 1
-   if (!empty())
-   {
-      std::istringstream is(c_str());
-      is >> d;
-      if(is.fail())
-      {
-         d = 0.0;
-      }
-   }
-#endif
-   return d;
-}
-
-ossim_float32 ossimString::toFloat32(const ossimString& aString)
-{
-   return aString.toFloat32();
-}
-
-ossim_float64 ossimString::toFloat64()const
-{
-   if(contains("nan"))
-   {
-      return ossim::nan();
-   }
-   ossim_float64 d = 0.0;
-   // this part is core dumping under mingw in ossimPlanet.
-   // There is a possibility that this isn't a thread safe implementation
-   // in mingw stl.  Let's resort back to atof for now
-
-#if 0
-   d = (ossim_float64)atof(c_str());
-#endif
-#if 1
-   if (!empty())
-   {
-      std::istringstream is(c_str());
-      is >> d;
-      if(is.fail())
-      {
-         d = 0.0;
-      }
-   }
-#endif
-   return d;
-}
-
-ossim_float64 ossimString::toFloat64(const ossimString& aString)
-{
-   return aString.toFloat64();
-}
-
-double ossimString::toDouble()const
-{
-   if(contains("nan"))
-   {
-      return ossim::nan();
-   }
-   double d = 0.0;
-
-   // this part is core dumping under mingw in ossimPlanet.
-   // There is a possibility that this isn't a thread safe implementation
-   // in mingw stl.  Let's resort back to atof for now
-
-   if (!empty())
-   {
-#if 0
-      d = atof(c_str());
-#endif
-#if 1
-      if(!empty())
-      {
-         std::istringstream is(c_str());
-         is >> d;
-         if(is.fail())
-         {
-            d = 0.0;
-         }
-      }
-#endif
-   }
-   return d;
-}
-
-double ossimString::toDouble(const ossimString& aString)
-{
-   return aString.toDouble();
-}
-
-ossimString ossimString::toString(bool aValue)
-{
-   std::ostringstream s;
-   s << aValue;
-   ossimString result(s.str());
-   return result;
-}
-
-ossimString ossimString::toString(ossim_int16 aValue)
-{
-   std::ostringstream s;
-   s << aValue;
-   ossimString result(s.str());
-   return result;
-}
-
-ossimString ossimString::toString(ossim_uint16 aValue)
-{
-   std::ostringstream s;
-   s << aValue;
-   ossimString result(s.str());
-   return result;
-}
-
-ossimString ossimString::toString(ossim_int32 aValue)
-{
-   std::ostringstream s;
-   s << aValue;
-   ossimString result(s.str());
-   return result;
-}
-
-ossimString ossimString::toString(ossim_uint32 aValue)
-{
-   std::ostringstream s;
-   s << aValue;
-   ossimString result(s.str());
-   return result;
-}
-
-ossimString ossimString::toString(ossim_int64 aValue)
-{
-   std::ostringstream s;
-   s << aValue;
-   ossimString result(s.str());
-   return result;
-}
-
-ossimString ossimString::toString(ossim_uint64 aValue)
-{
-   std::ostringstream s;
-   s << aValue;
-   ossimString result(s.str());
-   return result;
-}
-
-ossimString ossimString::toString(ossim_float32 aValue,
-                                  ossim_int32 precision,
-                                  bool fixed)
-{
-   if ( ossim::isnan(aValue) )
-   {
-      return ossimString("nan");
-   }
-
-   std::ostringstream s;
-   s << std::setprecision(precision);
-   
-   if (fixed)
-   {
-      s << std::setiosflags(std::ios::fixed); 
-   }
-   
-   s << aValue;
-   
-   return ossimString(s.str());
-}
-
-ossimString ossimString::toString(ossim_float64 aValue,
-                                  ossim_int32 precision,
-                                  bool fixed)
-{
-   if ( ossim::isnan(aValue) )
-   {
-      return ossimString("nan");
-   }
-   
-   std::ostringstream s;
-   s << std::setprecision(precision);
-   
-   if (fixed)
-   {
-      s << std::setiosflags(std::ios::fixed); 
-   }
-   
-   s << aValue;
-   
-   return ossimString(s.str());
-}
-
-ossimString ossimString::before(const ossimString& str,
-                                std::string::size_type pos)const
-{
-   if(*this == "") return ossimString();
-
-   size_type last = find(str.c_str(), pos);
-   if(last >= std::string::npos) return *this;
-   
-   return ossimString( substr(0, last) );
-}
-
-ossimString ossimString::after(const ossimString& str,
-                               std::string::size_type pos)const
-{
-   size_type last = find(str.c_str(), pos);
-   if (last >= std::string::npos) return ossimString();
-   
-   return ossimString( substr(last+str.length()) );
-}
-
-//*************************************************************************************************
-// Splits this string into a vector of strings (fields) using the delimiter list specified.
-// If a delimiter is encountered at the beginning or the end of this, or two delimiters are 
-// contiguous, a blank field is inserted in the vector, unless skipBlankFields is true.
-//*************************************************************************************************
-void ossimString::split(std::vector<ossimString>& result,
-                        const ossimString& separatorList,
-                        bool skipBlankFields)const
-{
-	if(this->empty()) return;
-   
-   std::string::const_iterator iterStart = m_str.begin();
-   std::string::const_iterator iterCurrent = m_str.begin();
-   
-   while(iterCurrent != m_str.end())
-   {
-      if(std::find(separatorList.m_str.begin(), separatorList.m_str.end(), *iterCurrent) != separatorList.m_str.end())
-      {
-         if(iterStart == iterCurrent)
-         {
-            if(!skipBlankFields)
-            {
-               result.push_back(ossimString());
-            }
-         }
-         else 
-         {
-            result.push_back(ossimString(iterStart, iterCurrent));
-         }
-
-         ++iterCurrent;
-         iterStart = iterCurrent;
-      }
-      else 
-      {
-         ++iterCurrent;
-      }
-   }
-   if(iterStart!=iterCurrent)
-   {
-      result.push_back(ossimString(iterStart, iterCurrent));
-   }
-   
-#if 0   
-//   result = split(separatorList);
-   ossimString copyString = *this;
-
-   char* s = strtok(const_cast<char*>(copyString.c_str()),
-                    separatorList.c_str());
-
-   for(std::string::size_type i = 0; i < separatorList.size(); ++ i)
-   {
-      if (((*(this->begin())) == separatorList.c_str()[i]) && !skipBlankFields)
-         result.push_back("");
-   }
-   while(s)
-   {
-      result.push_back(ossimString(s));
-      if ((*s != 0) || !skipBlankFields)
-         s = strtok(NULL, separatorList.c_str());
-   }
-   for(std::string::size_type i = 0; i < separatorList.size(); ++ i)
-   {
-      if (((*(this->end()-1)) == separatorList.c_str()[i]) && !skipBlankFields)
-         result.push_back("");
-   }
-#endif
-}
-
-std::vector<ossimString> ossimString:: split(const ossimString& separatorList,
-                                             bool skipBlankFields)const
-{
-   std::vector<ossimString> result;
-
-   split(result, separatorList, skipBlankFields);
-   
-   return result;
-}
-
-const ossimString& ossimString::join(const std::vector<ossimString>& stringList,
-                                     const ossimString& separator)
-{
-   *this = "";
-   if(stringList.size())
-   {
-      for(long i = 0; i < ((long)stringList.size()-1); ++i)
-      {
-         *this += stringList[i];
-         *this += separator;
-      }
-      *this += stringList[stringList.size()-1];
-   }
-
-   return *this;
-}
-
-ossimString ossimString::urlEncode()const
-{
-   ossimString::const_iterator iter = begin();
-   ossimString result;
-   while(iter != end())
-   {
-      ossim_uint8 c = *iter;
-      
-      if(c > 47 && c < 58)
-      {
-         result += c;
-      }
-      else if(c > 64 && c < 91)
-      {
-         result += c;
-      }
-      else if(c > 96 && c < 123)
-      {
-         result+=c;
-      }
-      else if (c == 32)
-      {
-         result+="+";
-      }
-      else
-      {
-         result += ("%" + ossimHexString(c));
-      }
-      
-      ++iter;
-   }
-
-  return result;
-   
-}
-
-ossimString ossimString::getOssimId() const
-{
-#ifdef OSSIM_ID_ENABLED
-   return ossimString(OSSIM_ID);
-#endif
-   return ossimString("");
-}
-
diff --git a/src/ossim/base/ossimStringProperty.cpp b/src/ossim/base/ossimStringProperty.cpp
deleted file mode 100644
index 32d6f75..0000000
--- a/src/ossim/base/ossimStringProperty.cpp
+++ /dev/null
@@ -1,127 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// LICENSE: LGPL see top level license.txt
-// 
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimStringProperty.cpp 9094 2006-06-13 19:12:40Z dburken $
-#include <ossim/base/ossimStringProperty.h>
-#include <algorithm>
-RTTI_DEF1(ossimStringProperty, "ossimStringProperty", ossimProperty);
-
-ossimStringProperty::ossimStringProperty(const ossimString& name,
-                                         const ossimString& value,
-                                         bool editableFlag,
-                                         const std::vector<ossimString>& constraintList)
-   :ossimProperty(name),
-    theValue(value),
-    theEditableFlag(editableFlag),
-    theConstraints(constraintList)
-{
-}
-
-ossimStringProperty::ossimStringProperty(const ossimStringProperty& rhs)
-   :ossimProperty(rhs),
-    theValue(rhs.theValue),
-    theEditableFlag(rhs.theEditableFlag),
-    theConstraints(rhs.theConstraints)
-{
-}
-
-ossimObject* ossimStringProperty::dup()const
-{
-   return new ossimStringProperty(*this);
-}
-
-const ossimProperty& ossimStringProperty::assign(const ossimProperty& rhs)
-{
-   ossimProperty::assign(rhs);
-   
-   ossimStringProperty* rhsPtr = PTR_CAST(ossimStringProperty,
-					  &rhs);
-   
-   theValue        = rhs.valueToString();
-   
-   if(rhsPtr)
-     {
-       theEditableFlag = rhsPtr->theEditableFlag;
-       theConstraints  = rhsPtr->theConstraints;
-     }
-   
-   return *this;
-}
-
-
-void ossimStringProperty::setEditableFlag(bool flag)
-{
-   theEditableFlag = flag;
-}
-
-bool ossimStringProperty::getEditableFlag()const
-{
-   return theEditableFlag;
-}
-
-bool ossimStringProperty::isEditable()const
-{
-   return (getEditableFlag() == true);
-}
-
-
-void ossimStringProperty::clearConstraints()
-{
-   theConstraints.clear();
-}
-
-void ossimStringProperty::setConstraints(const std::vector<ossimString>& constraintList)
-{
-   theConstraints = constraintList;
-}
-
-void ossimStringProperty::addConstraint(const ossimString& value)
-{
-   theConstraints.push_back(value);
-}
-
-const std::vector<ossimString>& ossimStringProperty::getConstraints()const
-{
-   return theConstraints;
-}
-
-bool ossimStringProperty::hasConstraints()const
-{
-   return (theConstraints.size() > 0);
-}
-
-bool ossimStringProperty::setValue(const ossimString& value)
-{
-   bool result = true;
-   
-   if(theConstraints.size() > 0)
-   {
-      if(std::find(theConstraints.begin(),
-                   theConstraints.end(),
-                   value)
-                    != theConstraints.end())
-      {
-         theValue = value;
-      }
-      else
-      {
-         result = false;
-      }
-   }
-   else
-   {
-      theValue = value;
-   }
-
-   return result;
-}
-
-void ossimStringProperty::valueToString(ossimString& valueResult)const
-{
-   valueResult = theValue;
-}
diff --git a/src/ossim/base/ossimTempFilename.cpp b/src/ossim/base/ossimTempFilename.cpp
deleted file mode 100644
index 96b1b1c..0000000
--- a/src/ossim/base/ossimTempFilename.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// Description: This is a tmeporary filename class it will create a temporary
-//              file and will also delete it upon destruction
-//
-//*************************************************************************
-// $Id: ossimTempFilename.cpp 15524 2009-09-30 01:02:26Z dburken $
-#include <stdlib.h>
-#include <fstream>
-#include <ossim/base/ossimTempFilename.h>
-#include <ossim/base/ossimEnvironmentUtility.h>
-#include <time.h>
-
-ossimTempFilename::ossimTempFilename(const ossimString& tempDir,
-                                     const ossimString& prefix,
-                                     const ossimString& extension,
-                                     bool autodelete,
-                                     bool useWildcardDelete)
-   :theTempDir(tempDir),
-    thePrefix(prefix),
-    theExtension(extension),
-    theAutoDeleteFlag(autodelete),
-    theWildCardDeleteFlag(useWildcardDelete)
-{
-}
-
-ossimTempFilename::~ossimTempFilename()
-{
-   if(*((ossimFilename*)this) != "")
-   {
-      
-      if(theAutoDeleteFlag)
-      {
-         if(theWildCardDeleteFlag)
-         {
-            wildcardRemove(*this + ".*");
-         }
-         else
-         {
-            remove();
-         }
-      }
-   }
-}
-
-void  ossimTempFilename::generateRandomFile()
-{
-   generate(false);
-}
-
-void ossimTempFilename::generateRandomDir()
-{
-   generate(true);
-}
-
-void ossimTempFilename::generate(bool createAsDirectoryFlag)
-{
-   srand(time(0));
-   ossimString tempDirCopy = theTempDir;
-
-   if(tempDirCopy == "")
-   {
-      tempDirCopy = ossimEnvironmentUtility::instance()->getEnvironmentVariable("TEMP");
-      if(tempDirCopy=="")
-      {
-         tempDirCopy  = ossimEnvironmentUtility::instance()->getEnvironmentVariable("TMP");
-      }
-      if(tempDirCopy == "")
-      {
-         if(ossimFilename("/tmp").exists())
-         {
-            tempDirCopy = "/tmp";
-         }
-      }
-   }
-
-   int count = 0;
-   int randNumber1 = rand();
-   ossimFilename prefixDir = ossimFilename(tempDirCopy);
-   ossimFilename result = prefixDir.dirCat(thePrefix+
-                                           ossimString::toString(randNumber1));
-   
-   while((count < RAND_MAX)&&result.exists())
-   {
-      randNumber1 = rand();
-      result = prefixDir.dirCat(thePrefix+
-                                ossimString::toString(randNumber1));
-      
-      ++count;
-   }
-
-   if(theExtension != "")
-   {
-      result = result.setExtension(theExtension);
-   }
-   *((ossimFilename*)this) = result;
-   if(result != "")
-   {
-      if(createAsDirectoryFlag)
-      {
-         createDirectory();
-      }
-      else
-      {
-         std::ofstream out(result.c_str());
-         out.close();
-      }
-   }
-}
diff --git a/src/ossim/base/ossimTileHash.cpp b/src/ossim/base/ossimTileHash.cpp
deleted file mode 100644
index 2679d4d..0000000
--- a/src/ossim/base/ossimTileHash.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken Copied from TiledImageHash.
-//
-// Description: Hashing function for tiled rectangles.  WIll hash a
-//              dpt or a to a single index value.
-//
-// NOTE:  This works with rectangles that are positive in the line up
-//        (y) direction.
-//              
-//*******************************************************************
-//  $Id: ossimTileHash.cpp 9094 2006-06-13 19:12:40Z dburken $
-
-#include <cfloat> // for FLT_EPSILON
-
-#include <ossim/base/ossimTileHash.h>
-
-ossimTileHash::ossimTileHash(const ossimDrect& imageRect,
-                             double tileWidth,
-                             double tileHeight)
-   :
-      ossimPointHash(),
-      theImageRect(imageRect)
-{
-   // make sure that the width of the tile is not larger than
-   // the width of the image rectangle.
-   if(theImageRect.width() <= tileWidth)
-   {
-      theTileWidth = theImageRect.width();
-      theNumberOfHorizTiles = 1;
-   }
-   else
-   {
-      theTileWidth          = tileWidth;
-      double tempDiv        = theImageRect.width()/theTileWidth;
-      double overFlow       = tempDiv  - static_cast<long>(tempDiv);
-      theNumberOfHorizTiles = static_cast<long>(tempDiv);
-      
-      if(fabs(overFlow) > FLT_EPSILON) // if the extent went beyond a tile
-      {
-         theNumberOfHorizTiles ++;      // we must say it has another tile
-      }
-   }
-
-   // make sure the height of the tile is not larger than the
-   // height of the image rectangle.
-   if(theImageRect.height() <= tileHeight)
-   {
-      theTileHeight = theImageRect.height();
-      theNumberOfVertTiles = 1;
-   }
-   else
-   {
-      theTileHeight         = tileHeight;
-      double tempDiv        = theImageRect.height()/theTileHeight;
-      double overFlow       = tempDiv  - static_cast<long>(tempDiv);
-      theNumberOfVertTiles = static_cast<long>(tempDiv);
-
-      if(fabs(overFlow) > FLT_EPSILON) // if the extent went beyond a tile
-      {
-         theNumberOfVertTiles ++;      // we must say it has another tile
-      }
-   }
-}
-
-ossimTileHash::~ossimTileHash()
-{
-}
-
-long ossimTileHash::operator()(const ossimFpt& aPoint)
-{
-   if ( (aPoint.x >= theImageRect.ul().x) &&
-        (aPoint.x <= theImageRect.lr().x) &&
-        (aPoint.y <= theImageRect.ul().y) &&
-        (aPoint.y >= theImageRect.lr().y) )
-   {
-      // how far is the point horizontally  from the upper left corner
-      double deltaWidth  = aPoint.x - theImageRect.ul().x;
-
-      // how far is the point vertically from the upper left point
-      double deltaHeight = theImageRect.ul().y - aPoint.y;
-
-      // solve the horizontal and vertical index numbers
-      long indexWidth  = static_cast<long>(deltaWidth  / theTileWidth);
-      long indexHeight = static_cast<long>(deltaHeight / theTileHeight);
-
-      // Map to a linear array.
-      // Just like you would index a 2-D array in memory
-      return static_cast<long>(theNumberOfHorizTiles*indexHeight + indexWidth);
-   }
-
-   return -1;
-}
-
-long ossimTileHash::operator()(const ossimDpt& aPoint)
-{
-   if ( (aPoint.x >= theImageRect.ul().x) &&
-        (aPoint.x <= theImageRect.lr().x) &&
-        (aPoint.y <= theImageRect.ul().y) &&
-        (aPoint.y >= theImageRect.lr().y) )
-   {
-      // how far is the point horizontally  from the upper left corner
-      double deltaWidth  = aPoint.x - theImageRect.ul().x;
-
-      // how far is the point vertically from the upper left point
-      double deltaHeight = theImageRect.ul().y - aPoint.y;
-
-      // solve the horizontal and vertical index numbers
-      long indexWidth  = static_cast<long>(deltaWidth  / theTileWidth);
-      long indexHeight = static_cast<long>(deltaHeight / theTileHeight);
-
-      // Map to a linear array.
-      // Just like you would index a 2-D array in memory
-      return static_cast<long>(theNumberOfHorizTiles*indexHeight + indexWidth);
-   }
-
-   return -1;
-}
diff --git a/src/ossim/base/ossimTiledImageHash.cpp b/src/ossim/base/ossimTiledImageHash.cpp
deleted file mode 100644
index 3bba06b..0000000
--- a/src/ossim/base/ossimTiledImageHash.cpp
+++ /dev/null
@@ -1,140 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-// Description: Hashing function for tiled rectangles.  WIll hash a
-//              dpt to a single index value.
-//              
-//*******************************************************************
-//  $Id: ossimTiledImageHash.cpp 9094 2006-06-13 19:12:40Z dburken $
-
-#include <cfloat> // for FLT_EPSILON
-
-#include <ossim/base/ossimTiledImageHash.h>
-
-
-ossimTiledImageHash::ossimTiledImageHash(const ossimDrect &imageRect,
-                                         double tileWidth,
-                                         double tileHeight)
-   :ossimPointHash(),
-    theImageRect(imageRect)
-{
-   // make sure that the width of the tile is not larger than
-   // the width of the image rectangle.
-   if(theImageRect.width() < tileWidth)
-   {
-      theTileWidth = theImageRect.width();
-      theNumberOfHorizTiles = 1;
-   }
-   else
-   {
-      theTileWidth          = tileWidth;
-      double tempDiv        = theImageRect.width()/theTileWidth;
-      double overFlow       = tempDiv  - static_cast<long>(tempDiv);
-      theNumberOfHorizTiles = static_cast<long>(tempDiv);
-      
-      if(fabs(overFlow) >= FLT_EPSILON) // if the extent went beyond a tile
-      {
-         theNumberOfHorizTiles ++;      // we must say it has another tile
-      }
-   }
-
-   // make sure the height of the tile is not larger than the
-   // height of the image rectangle.
-   if(theImageRect.height() < tileHeight)
-   {
-      theTileHeight = theImageRect.height();
-      theNumberOfVertTiles = 1;
-   }
-   else
-   {
-      theTileHeight         = tileHeight;
-      double tempDiv        = theImageRect.height()/theTileHeight;
-      double overFlow       = tempDiv  - static_cast<long>(tempDiv);
-      theNumberOfVertTiles = static_cast<long>(tempDiv);
-
-      if(fabs(overFlow) >= FLT_EPSILON) // if the extent went beyond a tile
-      {
-         theNumberOfVertTiles ++;      // we must say it has another tile
-      }
-   }
-
-}
-
-ossimTiledImageHash::~ossimTiledImageHash()
-{
-}
-
-long ossimTiledImageHash::operator()(const ossimDpt &aPoint)
-{
-   if(aPoint.x >= theImageRect.ul().x && aPoint.y >= theImageRect.ul().y)
-   {
-      // how far is the point horizontally  from the upper left corner
-      double deltaWidth  = aPoint.x - theImageRect.ul().x;
-
-      // how far is the point vertically from the upper left point
-      double deltaHeight = aPoint.y - theImageRect.ul().y;
-
-      // if deltas are negative then we are outside the
-      // bounds
-      if((deltaWidth < 0) || (deltaHeight < 0)) 
-      {
-         return -1;
-      }
-
-      // check if outside the rectangle
-      if( (deltaWidth > theNumberOfHorizTiles*theTileWidth)||
-          (deltaHeight > theNumberOfVertTiles*theTileHeight))
-      {
-         return -1;
-      }
-      // solve the horizontal and vertical index numbers
-      long indexWidth  = static_cast<long>(deltaWidth  / theTileWidth);
-      long indexHeight = static_cast<long>(deltaHeight / theTileHeight);
-
-      // map to a linear array.  Just like you would index a 2-D array in memory
-      return static_cast<long>(theNumberOfHorizTiles*indexHeight + indexWidth);
-   }
-
-   return -1;
-}
-
-long ossimTiledImageHash::operator()(const ossimFpt &aPoint)
-{
-   if(aPoint.x >= theImageRect.ul().x && aPoint.y >= theImageRect.ul().y)
-   {
-      // how far is the point horizontally  from the upper left corner
-      double deltaWidth  = aPoint.x - theImageRect.ul().x;
-
-      // how far is the point vertically from the upper left point
-      double deltaHeight = aPoint.y - theImageRect.ul().y;
-
-      // if deltas are negative then we are outside the
-      // bounds
-      if((deltaWidth < 0) || (deltaHeight < 0)) 
-      {
-         return -1;
-      }
-
-      // check if outside the rectangle
-      if( (deltaWidth > theNumberOfHorizTiles*theTileWidth)||
-          (deltaHeight > theNumberOfVertTiles*theTileHeight))
-      {
-         return -1;
-      }
-      // solve the horizontal and vertical index numbers
-      long indexWidth  = static_cast<long>(deltaWidth  / theTileWidth);
-      long indexHeight = static_cast<long>(deltaHeight / theTileHeight);
-
-      // map to a linear array.  Just like you would index a 2-D array in memory
-      return static_cast<long>(theNumberOfHorizTiles*indexHeight + indexWidth);
-   }
-
-   return -1;
-}
-
diff --git a/src/ossim/base/ossimTrace.cpp b/src/ossim/base/ossimTrace.cpp
deleted file mode 100644
index 23e1f38..0000000
--- a/src/ossim/base/ossimTrace.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-//*****************************************************************************
-// FILE: ossimTrace.cc
-//
-// Copyright (C) 2001 ImageLinks, Inc.
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// DESCRIPTION:
-//   Contains implementation of class ossimTrace
-//
-// SOFTWARE HISTORY:
-//>
-//   24Apr2001  Oscar Kramer
-//              Initial coding.
-//<
-//*****************************************************************************
-// $Id: ossimTrace.cpp 9094 2006-06-13 19:12:40Z dburken $
-
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimTraceManager.h>
-#include <ossim/base/ossimCommon.h>
-//*****************************************************************************
-//  CONSTRUCTOR: ossimTrace
-//  
-//*****************************************************************************
-ossimTrace::ossimTrace(const ossimString& trace_name)
-   :
-      theTraceName   (trace_name),
-      theEnabledFlag (false)
-{
-   ossimTraceManager::instance()->addTrace(this);
-}
-
-ossimTrace::~ossimTrace()
-{
-   ossimTraceManager::instance()->removeTrace(this);
-}
-
diff --git a/src/ossim/base/ossimTraceManager.cpp b/src/ossim/base/ossimTraceManager.cpp
deleted file mode 100644
index 3d46a63..0000000
--- a/src/ossim/base/ossimTraceManager.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-//*****************************************************************************
-// Copyright (C) 2005 Garrett Potts, all rights reserved.
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-// 
-// DESCRIPTION:
-//   Contains declaration of class ossimTraceManager.
-//
-//*****************************************************************************
-// $Id: ossimTraceManager.cpp 9094 2006-06-13 19:12:40Z dburken $
-
-#include <algorithm>
-
-#include <ossim/base/ossimTraceManager.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimRegExp.h>
-
-ossimTraceManager* ossimTraceManager::theInstance = 0;
-
-ossimTraceManager::ossimTraceManager()
-{
-   theInstance = this;
-}
-
-ossimTraceManager* ossimTraceManager::instance()
-{
-   if(!theInstance)
-   {
-      theInstance = new ossimTraceManager;
-   }
-   
-   return theInstance;
-}
-
-void ossimTraceManager::setTracePattern(const ossimString& pattern)
-{
-   thePattern = pattern;
-   setTraceFlags(true);
-}
-
-void ossimTraceManager::addTrace(ossimTrace* traceObj)
-{
-   if(!traceObj)
-   {
-      return;
-   }
-   
-   std::vector<ossimTrace*>::iterator iter = std::find(theTraceList.begin(),
-                                                       theTraceList.end(),
-                                                       traceObj);
-   if(iter == theTraceList.end())
-   {
-      theTraceList.push_back(traceObj);
-
-      if(thePattern.size())
-      {
-         ossimRegExp rxp;
-         rxp.compile(thePattern.c_str());
-         if(rxp.find(traceObj->getTraceName().c_str()))
-         {
-            // Found a match so set the flag and increment the counter.
-            traceObj->setTraceFlag(true);
-         }
-         else
-         {
-            traceObj->setTraceFlag(false);
-         }
-      }
-      else
-      {
-         traceObj->setTraceFlag(false);
-      } 
-   }
-}
-
-void ossimTraceManager::removeTrace(ossimTrace* traceObj)
-{
-   std::vector<ossimTrace*>::iterator iter = std::find(theTraceList.begin(),
-                                                       theTraceList.end(),
-                                                       traceObj);
-
-   if(iter !=  theTraceList.end())
-   {
-      theTraceList.erase(iter);
-   }
-}
-
-void ossimTraceManager::setTraceFlags(bool flag)
-{
-   ossimRegExp rxp;
-   rxp.compile(thePattern.c_str());
-   
-   for(ossim_uint32 idx = 0; idx < theTraceList.size(); ++idx)
-   {
-      if (rxp.find(theTraceList[idx]->getTraceName().c_str()))
-      {
-         // Found a match so set the flag and increment the counter.
-         theTraceList[idx]->setTraceFlag(flag);
-      }
-   }
-}
diff --git a/src/ossim/base/ossimUnitConversionTool.cpp b/src/ossim/base/ossimUnitConversionTool.cpp
deleted file mode 100644
index c4c04b1..0000000
--- a/src/ossim/base/ossimUnitConversionTool.cpp
+++ /dev/null
@@ -1,435 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimUnitConversionTool.cpp 17503 2010-06-02 11:18:49Z dburken $
-
-#include <iostream>
-#include <iomanip>
-#include <ossim/base/ossimUnitConversionTool.h>
-#include <ossim/base/ossimGpt.h>
-
-std::ostream& operator<<(std::ostream& out,
-                         const ossimUnitConversionTool& data)
-{
-   out << std::setprecision(15) << std::setiosflags(std::ios::fixed)
-       << "Meters:           " << data.getMeters()
-       << "\nFeet:             " << data.getFeet()
-       << "\nU.S. Survey Feet: " << data.getUsSurveyFeet()
-       << "\nNautical miles:   " << data.getNauticalMiles()
-       << "\nDegrees:          " << data.getDegrees()
-       << "\nMinutes:          " << data.getMinutes()
-       << "\nSeconds:          " << data.getSeconds() << std::endl;
-   
-   return out;
-}
-
-ossimUnitConversionTool::ossimUnitConversionTool(double value,
-                                                 ossimUnitType unitType)
-   : theValue(value),
-     theUnitType(unitType),
-     theOrigin()
-{
-}
-
-ossimUnitConversionTool::ossimUnitConversionTool(const ossimGpt& origin,
-                                                 double value,
-                                                 ossimUnitType unitType)
-   : theValue(value),
-     theUnitType(unitType),
-     theOrigin(origin)
-{
-}
-
-void ossimUnitConversionTool::setOrigin(const ossimGpt& gpt)
-{
-   theOrigin = gpt;
-}
-
-ossimGpt ossimUnitConversionTool::getOrigin()const
-{
-   return theOrigin;
-}
-
-void ossimUnitConversionTool::getOrigin(ossimGpt& result)const
-{
-   result = theOrigin;
-}
-
-void ossimUnitConversionTool::setValue(double value,
-                                       ossimUnitType unitType)
-{
-   theValue    = value;
-   theUnitType = unitType;
-}
-
-double ossimUnitConversionTool::getValue(ossimUnitType unitType) const
-{
-   switch(unitType)
-   {
-      case OSSIM_METERS:
-      {
-         return getMeters();
-      }
-      case OSSIM_RADIANS:
-      {
-         return getRadians();
-      }
-      case OSSIM_DEGREES:
-      {
-         return getDegrees();
-      }
-      case OSSIM_US_SURVEY_FEET:
-      {
-         return getUsSurveyFeet();
-      }
-      case OSSIM_FEET:
-      {
-         return getFeet();
-      }
-      case OSSIM_SECONDS:
-      {
-         return getSeconds();
-      }
-      case OSSIM_MINUTES:
-      {
-         return getMinutes();
-      }
-      case OSSIM_NAUTICAL_MILES:
-      {
-         return getNauticalMiles();
-      }
-      case OSSIM_MILES:
-      {
-         return getMiles();
-      }
-      case OSSIM_MICRONS:
-      {
-         return getMicrons();
-      }
-      case OSSIM_CENTIMETERS:
-      {
-         return getCentimeters();
-      }
-      case OSSIM_MILLIMETERS:
-      {
-         return getMillimeters();
-      }
-      case OSSIM_YARDS:
-      {
-         return getYards();
-      }
-      case OSSIM_INCHES:
-      {
-         return getInches();
-      }
-      case OSSIM_KILOMETERS:
-      {
-         return getKilometers();
-      }
-      default:
-         break;
-   }
-
-   return ossim::nan();
-}
-
-void ossimUnitConversionTool::setMeters(double value)
-{
-   setValue(value, OSSIM_METERS);
-}
-
-void ossimUnitConversionTool::setRadians(double value)
-{
-   setValue(value, OSSIM_RADIANS);
-}
-
-void ossimUnitConversionTool::setDegrees(double value)
-{
-   setValue(value, OSSIM_DEGREES);
-}
-
-void ossimUnitConversionTool::setMinutes(double value)
-{
-   setValue(value, OSSIM_MINUTES);
-}
-
-void ossimUnitConversionTool::setSeconds(double value)
-{
-   setValue(value, OSSIM_SECONDS);
-}
-
-void ossimUnitConversionTool::setUsSurveyFeet(double value)
-{
-   setValue(value, OSSIM_US_SURVEY_FEET);
-}
-
-void ossimUnitConversionTool::setFeet(double value)
-{
-   setValue(value, OSSIM_FEET);
-}
-
-void ossimUnitConversionTool::setNauticalMiles(double value)
-{
-   setValue(value, OSSIM_NAUTICAL_MILES);
-}
-
-void ossimUnitConversionTool::setMiles(double value)
-{
-   setValue(value, OSSIM_MILES);
-}
-
-void ossimUnitConversionTool::setMillimeters(double value)
-{
-   setValue(value, OSSIM_MILLIMETERS);
-}
-
-void ossimUnitConversionTool::setMicrons(double value)
-{
-   setValue(value, OSSIM_MICRONS);
-}
-
-void ossimUnitConversionTool::setCentimeters(double value)
-{
-   setValue(value, OSSIM_CENTIMETERS);
-}
-
-void ossimUnitConversionTool::setYards(double value)
-{
-   setValue(value, OSSIM_YARDS);
-}
-
-void ossimUnitConversionTool::setInches(double value)
-{
-   setValue(value, OSSIM_INCHES);
-}
-
-void ossimUnitConversionTool::setKilometers(double value)
-{
-   setValue(value, OSSIM_KILOMETERS);
-}
-
-double ossimUnitConversionTool::getMeters()const
-{
-   if(theUnitType == OSSIM_METERS)
-   {
-      return theValue;
-   }
-   
-   return computeMeters();
-}
-
-double ossimUnitConversionTool::getRadians()const
-{
-   if(theUnitType == OSSIM_RADIANS)
-   {
-      return theValue;
-   }
-   return getDegrees()*RAD_PER_DEG;
-}
-
-double ossimUnitConversionTool::getDegrees()const
-{
-   switch (theUnitType)
-   {
-      case OSSIM_DEGREES:
-      {
-         return theValue;
-      }
-      case OSSIM_MINUTES:
-      {
-         return (theValue / 60.0);
-      }
-      case OSSIM_SECONDS:
-      {
-         return (theValue / 3600.0);
-      }
-      case OSSIM_RADIANS:
-      {
-         return (theValue * DEG_PER_RAD);
-      }
-      default:
-         break;
-   }
-   
-   ossimDpt pt = theOrigin.metersPerDegree();
-   return (computeMeters() /((pt.x+pt.y)*.5));
-}
-
-double ossimUnitConversionTool::getMinutes()const
-{
-   if(theUnitType == OSSIM_MINUTES)
-   {
-      return theValue;
-   }
-   return (getDegrees()*60.0);
-}
-
-double ossimUnitConversionTool::getSeconds()const
-{
-   if(theUnitType == OSSIM_SECONDS)
-   {
-      return theValue;
-   }
-   return (getDegrees()*3600.0);
-}
-
-double ossimUnitConversionTool::getUsSurveyFeet()const
-{
-   if(theUnitType == OSSIM_US_SURVEY_FEET)
-   {
-      return theValue;
-   }
-   return (computeMeters()/US_METERS_PER_FT);
-}
-
-double ossimUnitConversionTool::getFeet()const
-{
-   if(theUnitType == OSSIM_FEET)
-   {
-      return theValue;
-   }
-   return (computeMeters()*FT_PER_MTRS);
-}
-
-double ossimUnitConversionTool::getNauticalMiles()const
-{
-   if(theUnitType == OSSIM_NAUTICAL_MILES)
-   {
-      return theValue;
-   }
-   
-   return (computeMeters()/(theOrigin.metersPerDegree().y/60.0));
-}
-
-double ossimUnitConversionTool::getMiles()const
-{
-   if(theUnitType == OSSIM_MILES)
-   {
-      return theValue;
-   }
-   return ((computeMeters()*FT_PER_MTRS)/FT_PER_MILE);
-}
-
-double ossimUnitConversionTool::getMillimeters()const
-{
-   if(theUnitType == OSSIM_MILLIMETERS)
-   {
-      return theValue;
-   }
-   return ((computeMeters()*1e3));
-}
-
-double ossimUnitConversionTool::getMicrons()const
-{
-   if(theUnitType == OSSIM_MICRONS)
-   {
-      return theValue;
-   }
-   return ((computeMeters()*1e6));
-}
-
-double ossimUnitConversionTool::getCentimeters()const
-{
-   if(theUnitType == OSSIM_KILOMETERS)
-   {
-      return theValue;
-   }
-
-   return ((computeMeters()*1e2));   
-}
-
-double ossimUnitConversionTool::getYards()const
-{
-   if(theUnitType == OSSIM_INCHES)
-   {
-      return theValue;
-   }
-
-   return ((computeMeters()/0.914));   
-}
-
-double ossimUnitConversionTool::getInches()const
-{
-   if(theUnitType == OSSIM_INCHES)
-   {
-      return theValue;
-   }
-
-   return ((getFeet()*12.0));   
-}
-
-double ossimUnitConversionTool::getKilometers()const
-{
-   if(theUnitType == OSSIM_KILOMETERS)
-   {
-      return theValue;
-   }
-   return ((computeMeters()*1e-3));
-}
-
-double ossimUnitConversionTool::computeMeters()const
-{
-   switch(theUnitType)
-   {
-      case OSSIM_METERS:
-      {
-         return theValue;
-         break;
-      }
-      case OSSIM_RADIANS:
-      {
-         ossimDpt pt = theOrigin.metersPerDegree();
-         return (theValue*DEG_PER_RAD)*((pt.x+pt.y)*.5);
-      }
-      case OSSIM_DEGREES:
-      {
-         ossimDpt pt = theOrigin.metersPerDegree();
-         return theValue*((pt.x+pt.y)*.5);
-      }
-      case OSSIM_US_SURVEY_FEET:
-      {
-         return  US_METERS_PER_FT*theValue;
-      }
-      case OSSIM_FEET:
-      {
-         return MTRS_PER_FT*theValue;
-      }
-      case OSSIM_SECONDS:
-      {
-         ossimDpt pt = theOrigin.metersPerDegree();
-         return (theValue/3600.0)*((pt.x+pt.y)*.5);
-      }
-      case OSSIM_MINUTES:
-      {
-         ossimDpt pt = theOrigin.metersPerDegree();
-         return (theValue/60.0)*((pt.x+pt.y)*.5);
-      }
-      case OSSIM_NAUTICAL_MILES:
-      {
-         return (theOrigin.metersPerDegree().y/60.0)*theValue;
-      }
-      case OSSIM_MILES:
-      {
-         return MTRS_PER_FT*FT_PER_MILE*theValue;
-      }
-      case OSSIM_MILLIMETERS:
-      {
-         return (theValue/(1e3));
-      }
-      case OSSIM_MICRONS:
-      {
-         return (theValue/(1e6));
-      }
-      default:
-         break;
-   }
-
-   return ossim::nan();
-}
diff --git a/src/ossim/base/ossimUnitTypeLut.cpp b/src/ossim/base/ossimUnitTypeLut.cpp
deleted file mode 100644
index 36c7d5d..0000000
--- a/src/ossim/base/ossimUnitTypeLut.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimUnitTypeLut.cpp 10378 2007-01-26 14:27:21Z gpotts $
-
-#include <ossim/base/ossimUnitTypeLut.h>
-
-ossimUnitTypeLut* ossimUnitTypeLut::theInstance = NULL;
-
-static const int TABLE_SIZE = 17;
-
-ossimUnitTypeLut* ossimUnitTypeLut::instance()
-{
-   if (!theInstance)
-   {
-      theInstance = new ossimUnitTypeLut;
-   }
-   return theInstance;
-}
-
-ossimUnitTypeLut::ossimUnitTypeLut()
-  :ossimLookUpTable(TABLE_SIZE)
-{
-   theTable[0].theKey    = OSSIM_UNIT_UNKNOWN;
-   theTable[0].theValue  = "unknown";
-   theTable[1].theKey    = OSSIM_METERS;
-   theTable[1].theValue  = "meters";
-   theTable[2].theKey    = OSSIM_FEET;
-   theTable[2].theValue  = "feet";
-   theTable[3].theKey    = OSSIM_US_SURVEY_FEET;
-   theTable[3].theValue  = "us_survey_feet";
-   theTable[4].theKey    = OSSIM_DEGREES;
-   theTable[4].theValue  = "degrees";
-   theTable[5].theKey    = OSSIM_RADIANS;
-   theTable[5].theValue  = "radians";
-   theTable[6].theKey    = OSSIM_NAUTICAL_MILES;
-   theTable[6].theValue  = "nautical_miles";
-   theTable[7].theKey    = OSSIM_SECONDS;
-   theTable[7].theValue  = "seconds";
-   theTable[8].theKey    = OSSIM_MINUTES;
-   theTable[8].theValue  = "minutes";
-   theTable[9].theKey    = OSSIM_PIXEL;
-   theTable[9].theValue  = "pixel";
-   theTable[10].theKey   = OSSIM_MILES;
-   theTable[10].theValue = "miles";
-   theTable[11].theKey   = OSSIM_MILLIMETERS;
-   theTable[11].theValue = "millimeters";
-   theTable[12].theKey   = OSSIM_MICRONS;
-   theTable[12].theValue = "microns";
-   theTable[13].theKey   = OSSIM_CENTIMETERS;
-   theTable[13].theValue = "centimeters";
-   theTable[14].theKey   = OSSIM_YARDS;
-   theTable[14].theValue = "yards";
-   theTable[15].theKey   = OSSIM_INCHES;
-   theTable[15].theValue = "inches";
-   theTable[16].theKey   = OSSIM_KILOMETERS;
-   theTable[16].theValue = "kilometers";
-}
-
-ossimUnitTypeLut::~ossimUnitTypeLut()
-{
-}
-ossim_int32 ossimUnitTypeLut::getEntryNumber(const char* entry_string,
-                                             bool case_insensitive) const
-{
-   ossim_int32 result
-      = ossimLookUpTable::getEntryNumber(entry_string, case_insensitive);
-   if(result < 0)
-   {
-      return (ossim_int32)OSSIM_UNIT_UNKNOWN;
-   }
-   
-   return result;
-}
-
-ossim_int32 ossimUnitTypeLut::getEntryNumber(const ossimKeywordlist& kwl,
-                                             const char* prefix,
-                                             bool case_insensitive) const
-{
-   ossim_int32 result =
-      ossimLookUpTable::getEntryNumber(kwl, prefix, case_insensitive);
-   if(result < 0)
-   {
-      return (ossim_int32)OSSIM_UNIT_UNKNOWN;
-   }
-   return result;
-}
-
-ossimKeyword ossimUnitTypeLut::getKeyword() const
-{
-   return ossimKeyword(ossimKeywordNames::UNITS_KW, "");
-}
diff --git a/src/ossim/base/ossimVisitor.cpp b/src/ossim/base/ossimVisitor.cpp
deleted file mode 100644
index e113fac..0000000
--- a/src/ossim/base/ossimVisitor.cpp
+++ /dev/null
@@ -1,379 +0,0 @@
-// $Id: ossimVisitor.cpp 22158 2013-02-20 12:29:10Z gpotts $
-
-#include <ossim/base/ossimVisitor.h>
-#include <ossim/base/ossimConnectableObject.h>
-#include <ossim/base/ossimPropertyEvent.h>
-#include <ossim/base/ossimViewInterface.h>
-
-
-ossimVisitor::ossimVisitor(int visitorType)
-:m_visitorType(static_cast<VisitorType>(visitorType)),
-m_stopTraversalFlag(false)
-{
-   
-}
-
-ossimVisitor::ossimVisitor(const ossimVisitor& src)
-:m_visitorType(src.m_visitorType),
-m_markNode(src.m_markNode),
-m_stopTraversalFlag(src.m_stopTraversalFlag)
-{
-}
-
-ossimVisitor::VisitorType ossimVisitor::getVisitorType()const
-{
-   return m_visitorType;
-}
-
-void  ossimVisitor::setVisitorType(int vType, bool on)
-{
-   if(on)
-   {
-      m_visitorType = (VisitorType)((vType|m_visitorType)&VISIT_ALL);
-   }
-   else 
-   {
-      m_visitorType = (VisitorType)(((~vType) & m_visitorType)&VISIT_ALL);
-   }
-}
-
-void ossimVisitor::turnOffVisitorType(int vType)
-{
-   setVisitorType(vType, false);
-}
-
-void ossimVisitor::reset()
-{
-   m_markNode.clear();
-   m_stopTraversalFlag = false;
-}
-
-void ossimVisitor::visit(ossimObject* obj)
-{
-   m_markNode.insert(obj);
-}
-
-void ossimVisitor::visit(ossimConnectableObject* obj)
-{
-   visit(static_cast<ossimObject*>(obj));
-}
-
-bool ossimVisitor::hasVisited(ossimObject* obj)const
-{
-   return m_markNode.find(obj) != m_markNode.end(); 
-}
-
-bool ossimVisitor::stopTraversal()const
-{
-   return m_stopTraversalFlag;
-}
-
-
-ossimIdVisitor::ossimIdVisitor()
-   :
-   ossimVisitor(ossimVisitor::VISIT_INPUTS|ossimVisitor::VISIT_CHILDREN),
-   m_object(0),
-   m_id(0)
-{
-}
-
-ossimIdVisitor::ossimIdVisitor(int visitorType)
-   :
-   ossimVisitor(visitorType),
-   m_object(0),
-   m_id(0)
-{
-}
-
-ossimIdVisitor::ossimIdVisitor(const ossimId& id, int visitorType)
-   :
-   ossimVisitor(visitorType),
-   m_object(0),
-   m_id(id)
-{
-}
-
-ossimIdVisitor::ossimIdVisitor(const ossimIdVisitor& src)
-   :
-   ossimVisitor(src),
-   m_object(src.m_object),
-   m_id(src.m_id)
-{
-}
-
-ossimRefPtr<ossimVisitor> ossimIdVisitor::dup()const
-{
-   return new ossimIdVisitor(*this);
-}
-
-void ossimIdVisitor::visit(ossimConnectableObject* obj)
-{
-   if ( !hasVisited(obj) )
-   {
-      if(obj->getId() == m_id)
-      {
-         m_object = obj;
-         m_stopTraversalFlag = true;
-      }
-      ossimVisitor::visit(obj);
-   }
-}
-
-void ossimIdVisitor::reset()
-{
-   ossimVisitor::reset();
-   m_object = 0;
-}
-
-ossimConnectableObject* ossimIdVisitor::getObject()
-{
-   return m_object;
-}
-
-const ossimConnectableObject* ossimIdVisitor::getObject()const
-{
-   return m_object;
-}
-
-void ossimIdVisitor::setId(const ossimId& id)
-{
-   m_id = id;
-}
-
-const ossimId& ossimIdVisitor::getId()const
-{
-   return m_id;
-}
-
-ossimCollectionVisitor::ossimCollectionVisitor(int visitorType)
-:ossimVisitor(visitorType)
-{
-}
-
-ossimCollectionVisitor::ossimCollectionVisitor(const ossimCollectionVisitor& src)
-:m_collection(src.m_collection)
-{
-}
-
-ossimCollectionVisitor::ListRef& ossimCollectionVisitor::getObjects()
-{
-   return m_collection;
-}
-
-const ossimCollectionVisitor::ListRef& ossimCollectionVisitor::getObjects()const
-{
-   return m_collection;
-}
-
-ossimObject* ossimCollectionVisitor::getObject(ossim_uint32 idx)
-{
-   if(idx < m_collection.size())
-   {
-      return m_collection[idx].get();
-   }
-   return 0;
-}
-
-const ossimObject* ossimCollectionVisitor::getObject(ossim_uint32 idx)const
-{
-   if(idx < m_collection.size())
-   {
-      return m_collection[idx].get();
-   }
-   return 0;
-}
-
-void ossimCollectionVisitor::reset()
-{
-   ossimVisitor::reset();
-   m_collection.clear();
-}
-
-ossimTypeNameVisitor::ossimTypeNameVisitor(int visitorType)
-   :ossimCollectionVisitor(visitorType),
-    m_typeName(),
-    m_firstOfTypeFlag(false)
-{
-}
-
-ossimTypeNameVisitor::ossimTypeNameVisitor(const ossimString& typeName,
-                                           bool firstOfTypeFlag,
-                                           int visitorType)
-   :
-   ossimCollectionVisitor(visitorType),
-   m_typeName(typeName),
-   m_firstOfTypeFlag(firstOfTypeFlag)
-{
-}
-
-ossimTypeNameVisitor::ossimTypeNameVisitor(const ossimTypeNameVisitor& src)
-:m_typeName(src.m_typeName),
- m_firstOfTypeFlag(src.m_firstOfTypeFlag)
-{
-}
-
-ossimRefPtr<ossimVisitor> ossimTypeNameVisitor::dup()const
-{
-   return new ossimTypeNameVisitor(*this);
-}
-
-void ossimTypeNameVisitor::visit(ossimObject* obj)
-{
-   if(!hasVisited(obj))
-   {
-      ossimCollectionVisitor::visit(obj);
-      if(obj&&obj->canCastTo(m_typeName))
-      {
-         m_collection.push_back(obj);
-         if(m_firstOfTypeFlag) m_stopTraversalFlag = true;
-      }
-  }
-}
-
-void ossimTypeNameVisitor::setTypeName(const ossimString& typeName)
-{
-   m_typeName = typeName;
-}
-
-const ossimString& ossimTypeNameVisitor::getTypeName()const
-{
-   return m_typeName;
-}
-
-void ossimTypeNameVisitor::setFirstOfTypeFlag(bool flag)
-{
-   m_firstOfTypeFlag = flag;
-}
-
-bool ossimTypeNameVisitor::getFirstOfTypeFlag() const
-{
-   return m_firstOfTypeFlag;
-}
-
-ossimTypeIdVisitor::ossimTypeIdVisitor(int visitorType)
-:ossimCollectionVisitor(visitorType)
-{
-}
-
-ossimTypeIdVisitor::ossimTypeIdVisitor(const RTTItypeid& typeId, bool firstOfTypeFlag, int visitorType)
-:ossimCollectionVisitor(visitorType),
-m_typeId(typeId),
-m_firstOfTypeFlag(firstOfTypeFlag)
-{
-}
-
-ossimTypeIdVisitor::ossimTypeIdVisitor(const ossimTypeIdVisitor& src)
-:m_typeId(src.m_typeId),
-m_firstOfTypeFlag(src.m_firstOfTypeFlag)
-{
-}
-
-ossimRefPtr<ossimVisitor> ossimTypeIdVisitor::dup()const
-{
-   return new ossimTypeIdVisitor(*this);
-}
-
-void ossimTypeIdVisitor::setTypeId(const RTTItypeid& typeId)
-{
-   m_typeId = typeId;
-}
-
-const RTTItypeid& ossimTypeIdVisitor::getTypeId()const
-{
-   return m_typeId;
-}
-
-void ossimTypeIdVisitor::visit(ossimObject* obj)
-{
-   if(!hasVisited(obj))
-   {
-      ossimCollectionVisitor::visit(obj);
-      if(obj&&obj->canCastTo(m_typeId))
-      {
-         m_collection.push_back(obj);
-         if(m_firstOfTypeFlag) m_stopTraversalFlag = true;
-      }
-   }
-}
-
-ossimEventVisitor::ossimEventVisitor(ossimEvent* evt, int visitorType)
-:ossimVisitor(visitorType),
-m_event(evt)
-{
-}
-ossimEventVisitor::ossimEventVisitor(const ossimEventVisitor& src)
-:ossimVisitor(src),
-m_event(src.m_event)
-{
-}
-
-ossimRefPtr<ossimVisitor> ossimEventVisitor::dup()const
-{
-   return new ossimEventVisitor(*this);
-}
-
-void ossimEventVisitor::visit(ossimObject* obj)
-{
-   if(!hasVisited(obj))
-   {
-      ossimListenerManager* manager = dynamic_cast<ossimListenerManager*> (obj);
-      if(manager)
-      {
-         manager->fireEvent(*m_event);
-         ossimVisitor::visit(obj);
-      }
-   }
-}
-
-ossimViewInterfaceVisitor::ossimViewInterfaceVisitor(ossimObject* view, int visitorType)
-   :
-   ossimVisitor(visitorType),
-   m_view(view)
-{
-}
-
-ossimViewInterfaceVisitor::ossimViewInterfaceVisitor(const ossimViewInterfaceVisitor& src)
-   :
-   ossimVisitor(src),
-   m_view(src.m_view)
-{
-}
-
-ossimRefPtr<ossimVisitor> ossimViewInterfaceVisitor::dup()const
-{
-   return new ossimViewInterfaceVisitor(*this);
-}
-
-ossimObject* ossimViewInterfaceVisitor::getView()
-{
-   return m_view.get();
-}
-
-const ossimObject* ossimViewInterfaceVisitor::getView()const
-{
-   return m_view.get();
-}
-
-void ossimViewInterfaceVisitor::visit(ossimObject* obj)
-{
-   if( !hasVisited(obj) )
-   {
-      if ( m_view.get() )
-      {
-         ossimViewInterface* vi = dynamic_cast<ossimViewInterface*>(obj);
-         if ( vi )
-         {
-            // Set the view:
-            vi->setView( m_view.get() );
-
-            // Send property event for outputs connected to us.
-            ossimRefPtr<ossimEvent> propEvent = new ossimPropertyEvent(obj);
-            ossimEventVisitor ev( propEvent.get(), VISIT_OUTPUTS );
-            obj->accept(ev);
-         }
-      }
-      
-      // This will put the obj in the m_markNode for hasVisited method.
-      ossimVisitor::visit(obj);
-   }
-}
diff --git a/src/ossim/base/ossimVrect.cpp b/src/ossim/base/ossimVrect.cpp
deleted file mode 100644
index 4117123..0000000
--- a/src/ossim/base/ossimVrect.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-// Contains class declaration for vrect.
-// Container class for four double points representing a rectangle
-// where y is up
-// 
-//*******************************************************************
-//  $Id: ossimVrect.cpp 9094 2006-06-13 19:12:40Z dburken $
-
-#include <ossim/base/ossimVrect.h>
-
-//*******************************************************************
-// Public Method:
-//*******************************************************************
-void ossimVrect::print(std::ostream& os) const
-{
-   os << theUlCorner << theLrCorner;
-}
-
-//*******************************************************************
-// friend function:
-//*******************************************************************
-std::ostream& operator<<(std::ostream& os, const ossimVrect& rect)
-{
-   rect.print(os);
-
-   return os;
-}
-
-ossimVrect::~ossimVrect()
-{
-}
diff --git a/src/ossim/base/ossimWgs72Datum.cpp b/src/ossim/base/ossimWgs72Datum.cpp
deleted file mode 100644
index baa0b6f..0000000
--- a/src/ossim/base/ossimWgs72Datum.cpp
+++ /dev/null
@@ -1,207 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author: Garrett Potts (gpotts at imagelinks.com)
-//
-// Description:
-//
-// Wgs72Datum.  Special hardcoded datum.  It will create a static
-// instance of a Wgs72Ellipsoid and set the initial defaults for
-// that are specific to a Wgs72Datum
-//*******************************************************************
-//  $Id: ossimWgs72Datum.cpp 20096 2011-09-14 16:44:20Z dburken $
-
-#include <iostream>
-using namespace std;
-#include <ossim/base/ossimWgs72Datum.h>
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimDatumFactory.h>
-#include <ossim/base/ossimEllipsoidFactory.h>
-#include <ossim/base/ossimEllipsoid.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimNotifyContext.h>
-
-/***************************************************************************/
-/*
- *                               DEFINES FROM GEOTRANS
- */
-
-RTTI_DEF1(ossimWgs72Datum, "ossimWgs72Datum", ossimThreeParamDatum);
-ossimWgs72Datum::ossimWgs72Datum()
-   :ossimThreeParamDatum("WGD",
-                         "World Geodetic System 1972",
-                         ossimEllipsoidFactory::instance()->wgs72(),
-                         0.0,
-                         0.0,
-                         0.0,
-                         -M_PI/2.0,
-                         M_PI/2.0,
-                         -M_PI,
-                         M_PI,
-                         0.0,
-                         0.0,
-                         0.0)
-{
-   if(!ellipsoid())
-   {
-      //ERROR
-   }
-}
-
-ossimGpt ossimWgs72Datum::shift(const ossimGpt &aPt)const
-{
-   const ossimDatum *aDatum = aPt.datum();
-   
-   if( (ellipsoid()->getA()== aPt.datum()->ellipsoid()->getA())&&
-       (ellipsoid()->getB()== aPt.datum()->ellipsoid()->getB()))
-   {
-      return ossimGpt(aPt.latd(), aPt.lond(), aPt.height(), this);
-   }
-   
-   if(aDatum)
-   {  
-      return shiftFromWgs84(aDatum->shiftToWgs84(aPt));
-   }
-
-   return aPt;
-}
-
-ossimGpt ossimWgs72Datum::shiftToWgs84(const ossimGpt &aPt)const
-{
-/* Begin Geodetic_Shift_WGS72_To_WGS84 */
-  /*
-   *  This function shifts a geodetic coordinate (latitude, longitude in radians
-   *  and height in meters) relative to WGS72 to a geodetic coordinate 
-   *  (latitude, longitude in radians and height in meters) relative to WGS84.
-   *
-   *  WGS72_Lat : Latitude in radians relative to WGS72     (input)
-   *  WGS72_Lon : Longitude in radians relative to WGS72    (input)
-   *  WGS72_Hgt : Height in meters relative to WGS72        (input)
-   *  WGS84_Lat : Latitude in radians relative to WGS84     (output)
-   *  WGS84_Lon : Longitude in radians relative to WGS84    (output)
-   *  WGS84_Hgt : Height in meters  relative to WGS84       (output)
-   */
-   double Delta_Lat;
-   double Delta_Lon;
-   double Delta_Hgt;
-   double WGS84_a;       /* Semi-major axis of WGS84 ellipsoid               */
-   double WGS84_f;       /* Flattening of WGS84 ellipsoid                    */
-   double WGS72_a;       /* Semi-major axis of WGS72 ellipsoid               */
-   double WGS72_f;       /* Flattening of WGS72 ellipsoid                    */
-   double da;            /* WGS84_a - WGS72_a                                */
-   double df;            /* WGS84_f - WGS72_f                                */
-   double Q;
-   double sin_Lat;
-   double sin2_Lat;
-   
-   const ossimDatum *wgs84 = ossimDatumFactory::instance()->wgs84();
-   const ossimDatum *wgs72 = ossimDatumFactory::instance()->wgs72();
-   const ossimEllipsoid *wgs84Ellipsoid = ossimEllipsoidFactory::instance()->wgs84();
-   const ossimEllipsoid *wgs72Ellipsoid = ossimEllipsoidFactory::instance()->wgs72();
-
-   if(!wgs84 || !wgs72 || !wgs72Ellipsoid || !wgs84Ellipsoid)
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "ossimWgs72Datum::shiftToWgs84, NULL pointer found and no shift will be performed\n";
-      return (aPt);
-   }
-   
-   WGS84_a = wgs84Ellipsoid->a();
-   WGS84_f = wgs84Ellipsoid->flattening();
-   WGS72_a = wgs72Ellipsoid->a();
-   WGS72_f = wgs72Ellipsoid->flattening();
-   da = WGS84_a - WGS72_a;
-   df = WGS84_f - WGS72_f;
-   Q = M_PI /  648000;
-   sin_Lat = sin(aPt.latr());
-   sin2_Lat = sin_Lat * sin_Lat;
-   
-   Delta_Lat = (4.5 * cos(aPt.latr())) / (WGS72_a*Q) + (df * sin(2*aPt.latr())) / Q;
-   Delta_Lat /= SEC_PER_RAD;
-   Delta_Lon = 0.554 / SEC_PER_RAD;
-   Delta_Hgt = 4.5 * sin_Lat + WGS72_a * df * sin2_Lat - da + 1.4;
-
-   if(aPt.isHgtNan())
-   {
-      return ossimGpt(aPt.latd() + Delta_Lat*DEG_PER_RAD,
-                      aPt.lond() + Delta_Lon*DEG_PER_RAD,
-                      Delta_Hgt,
-                      wgs84);
-   }
-   return ossimGpt(aPt.latd() + Delta_Lat*DEG_PER_RAD,
-                   aPt.lond() + Delta_Lon*DEG_PER_RAD,
-                   aPt.height() + Delta_Hgt,
-                   wgs84);
-   /* End Geodetic_Shift_WGS72_To_WGS84 */
-}
-
-ossimGpt ossimWgs72Datum::shiftFromWgs84(const ossimGpt &aPt)const
-{
- /* Begin Geodetic_Shift_WGS84_To_WGS72 */
-  /*
-   *  This function shifts a geodetic coordinate (latitude, longitude in radians
-   *  and height in meters) relative to WGS84 to a geodetic coordinate 
-   *  (latitude, longitude in radians and height in meters) relative to WGS72.
-   *
-   *  WGS84_Lat : Latitude in radians relative to WGS84     (input)
-   *  WGS84_Lon : Longitude in radians relative to WGS84    (input)
-   *  WGS84_Hgt : Height in meters  relative to WGS84       (input)
-   *  WGS72_Lat : Latitude in radians relative to WGS72     (output)
-   *  WGS72_Lon : Longitude in radians relative to WGS72    (output)
-   *  WGS72_Hgt : Height in meters relative to WGS72        (output)
-   */
-   double Delta_Lat;
-   double Delta_Lon;
-   double Delta_Hgt;
-   double WGS84_a;       /* Semi-major axis of WGS84 ellipsoid               */
-   double WGS84_f;       /* Flattening of WGS84 ellipsoid                    */
-   double WGS72_a;       /* Semi-major axis of WGS72 ellipsoid               */
-   double WGS72_f;       /* Flattening of WGS72 ellipsoid                    */
-   double da;            /* WGS72_a - WGS84_a                                */
-   double df;            /* WGS72_f - WGS84_f                                */
-   double Q;
-   double sin_Lat;
-   double sin2_Lat;
-   const ossimDatum *wgs84 = ossimDatumFactory::instance()->wgs84();
-   const ossimDatum *wgs72 = ossimDatumFactory::instance()->wgs72();
-   const ossimEllipsoid *wgs84Ellipsoid = ossimEllipsoidFactory::instance()->wgs84();
-   const ossimEllipsoid *wgs72Ellipsoid = ossimEllipsoidFactory::instance()->wgs72();
-   
-   if(!wgs84 || !wgs72 || !wgs72Ellipsoid || !wgs84Ellipsoid)
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "ossimWgs72Datum::shiftFromWgs84, NULL pointer found and no shift will be performed\n";
-      
-      return (aPt);
-   }
-   
-   WGS84_a = wgs84Ellipsoid->a();
-   WGS84_f = wgs84Ellipsoid->flattening();
-   WGS72_a = wgs72Ellipsoid->a();
-   WGS72_f = wgs72Ellipsoid->flattening();
-   
-   da = WGS72_a - WGS84_a;
-   df = WGS72_f - WGS84_f;
-   Q = M_PI / 648000;
-   sin_Lat = sin(aPt.latr());
-   sin2_Lat = sin_Lat * sin_Lat;
-
-   Delta_Lat = (-4.5 * cos(aPt.latr())) / (WGS84_a*Q)
-               + (df * sin(2*aPt.latr())) / Q;
-   Delta_Lat /= SEC_PER_RAD;
-   Delta_Lon = -0.554 / SEC_PER_RAD;
-   Delta_Hgt = -4.5 * sin_Lat + WGS84_a * df * sin2_Lat - da - 1.4;
-
-   if(aPt.isHgtNan())
-   {
-      
-      return ossimGpt(aPt.latd() + Delta_Lat*DEG_PER_RAD,
-                      aPt.lond() + Delta_Lon*DEG_PER_RAD,
-                      Delta_Hgt,
-                      this);
-   }
-   return ossimGpt(aPt.latd() + Delta_Lat*DEG_PER_RAD,
-                   aPt.lond() + Delta_Lon*DEG_PER_RAD,
-                   aPt.height() + Delta_Hgt,
-                   this);
-}
diff --git a/src/ossim/base/ossimWgs84Datum.cpp b/src/ossim/base/ossimWgs84Datum.cpp
deleted file mode 100644
index b564268..0000000
--- a/src/ossim/base/ossimWgs84Datum.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author: Garrett Potts (gpotts at imagelinks.com)
-//
-// Description:
-//
-// Wgs84Datum.  Special hardcoded datum.  It will create a static
-// instance of a Wgs84Ellipsoid and set the initial defaults for
-// that are specific to a Wgs84Datum
-//*******************************************************************
-//  $Id: ossimWgs84Datum.cpp 19795 2011-06-30 15:04:48Z gpotts $
-
-#include <ossim/base/ossimWgs84Datum.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimEllipsoidFactory.h>
-#include <ossim/base/ossimEllipsoid.h>
-
-
-RTTI_DEF1(ossimWgs84Datum, "ossimWgs84Datum", ossimThreeParamDatum);
-
-ossimWgs84Datum::ossimWgs84Datum()
-   :ossimThreeParamDatum("WGE",
-                         "World Geodetic System 1984",
-                         ossimEllipsoidFactory::instance()->wgs84(),
-                         0.0, 0.0, 0.0,
-                         -M_PI/2.0, M_PI/2.0, -M_PI, M_PI,
-                         0.0, 0.0, 0.0)
-{
-   if(!ellipsoid())
-   {
-      //ERROR
-   }
-}
-
-
-ossimGpt ossimWgs84Datum::shift(const ossimGpt &aPt)const
-{
-   const ossimDatum *aDatum = aPt.datum();
-   
-    if( aPt.datum()->code() == code())
-    {
-       return ossimGpt(aPt.latd(), aPt.lond(), aPt.height(), this);
-    }
-   
-    if(aDatum)
-    {
-       return aDatum->shiftToWgs84(aPt);
-    }
-
-   return aPt;      
-}
-
-ossimGpt ossimWgs84Datum::shiftToWgs84(const ossimGpt &aPt)const
-{
-   return ossimGpt(aPt.latd(),
-                   aPt.lond(),
-                   aPt.height(),
-                   ossimDatumFactory::instance()->wgs84());
-}
-
-ossimGpt ossimWgs84Datum::shiftFromWgs84(const ossimGpt &aPt)const
-{
-   return aPt;
-}
diff --git a/src/ossim/base/ossimXmlAttribute.cpp b/src/ossim/base/ossimXmlAttribute.cpp
deleted file mode 100644
index 62c1742..0000000
--- a/src/ossim/base/ossimXmlAttribute.cpp
+++ /dev/null
@@ -1,241 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2001 ImageLinks Inc.  All rights reserved.
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author:  Oscar Kramer (ossim port by D. Burken)
-//
-// Description:  
-//
-// Contains definition of class ossimXmlAttribute.
-// 
-//*****************************************************************************
-// $Id: ossimXmlAttribute.cpp 19682 2011-05-31 14:21:20Z dburken $
-
-#include <iostream>
-#include <sstream>
-
-#include <ossim/base/ossimXmlAttribute.h>
-#include <ossim/base/ossimNotifyContext.h>
-
-RTTI_DEF2(ossimXmlAttribute, "ossimXmlAttribute", ossimObject, ossimErrorStatusInterface)
-
-static std::istream& xmlskipws(std::istream& in)
-{
-   int c = in.peek();
-   while((!in.fail())&&
-         ((c == ' ') ||
-          (c == '\t') ||
-          (c == '\n')||
-          (c == '\r')))
-   {
-      in.ignore(1);
-      c = in.peek();
-   }
-   
-   return in;
-}
-
-ossimXmlAttribute::ossimXmlAttribute(ossimString& spec)
-{
-   std::stringstream in(spec);
-
-   read(in);
-}
-
-ossimXmlAttribute::ossimXmlAttribute(const ossimXmlAttribute& src)
-   :theName(src.theName),
-    theValue(src.theValue)
-{
-}
-
-bool ossimXmlAttribute::read(std::istream& in)
-{
-   xmlskipws(in);
-   if(in.fail()) return false;
-   if(readName(in))
-   {
-      xmlskipws(in);
-      if((in.peek() != '=')||
-         (in.fail()))
-      {
-         setErrorStatus();
-         return false;
-      }
-      in.ignore(1);
-      if(readValue(in))
-      {
-         return true;
-      }
-      else
-      {
-         setErrorStatus();
-         return false;
-      }
-   }
-   return false;
-   
-#if 0   
-   //
-   // Pull out name:
-   //
-   theName = spec.before('=');
-   theName = theName.trim();
-   if (theName.empty())
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "ossimXmlAttribute::ossimXmlAttribute \n"
-                                           << "Bad attribute format encountered near:\n\""<< spec<<"\"\n"
-                                           << "Parsing aborted...\n";
-      setErrorStatus();
-      
-      return;
-   }
-   spec = spec.after('=');
-
-   //***
-   // Read value:
-   //***
-   char quote_char = spec[0];
-   spec = spec.after(quote_char);  // after first quote
-   theValue = spec.before(quote_char); // before second quote
-
-   //
-   // Reposition attribute specification to the start of next attribute or end
-   // of tag:
-   //
-   spec = spec.after(quote_char);  // after second quote
-   ossimString next_entry ("-?[+0-9A-Za-z<>]+");
-   spec = spec.fromRegExp(next_entry.c_str());
-#endif
-}
-
-ossimXmlAttribute::~ossimXmlAttribute()
-{
-}
-
-ossimXmlAttribute::ossimXmlAttribute()
-{
-}
-
-ossimXmlAttribute::ossimXmlAttribute(const ossimString& name,
-                                     const ossimString& value)
-{
-   setNameValue(name, value);
-}
-
-const ossimString& ossimXmlAttribute::getName()  const
-{
-   return theName;
-}
-
-const ossimString& ossimXmlAttribute::getValue() const
-{
-   return theValue;
-}
-
-void ossimXmlAttribute::setNameValue(const ossimString& name,
-                                     const ossimString& value)
-{
-   theName  = name;
-   theValue = value;
-}
-
-void ossimXmlAttribute::setName(const ossimString& name)
-{
-   theName = name;
-}
-
-void ossimXmlAttribute::setValue(const ossimString& value)
-{
-   theValue = value;
-}
-
-std::ostream& operator << (std::ostream& os, const ossimXmlAttribute* xml_attr) 
-{
-   os << " " << xml_attr->theName << "=\"" << xml_attr->theValue << "\"";
-
-   return os;
-}
-
-
-bool ossimXmlAttribute::readName(std::istream& in)
-{
-   xmlskipws(in);
-   theName = "";
-   char c = in.peek();
-   while((c != ' ')&&
-         (c != '\n')&&
-	 (c != '\r')&&
-         (c != '\t')&&
-         (c != '=')&&
-         (c != '<')&&
-         (c != '/')&&
-         (c != '>')&&
-         (!in.fail()))
-   {
-      theName += (char)in.get();
-      c = in.peek();
-   }
-
-   return ((!in.fail())&&
-           (theName != ""));
-}
-
-bool ossimXmlAttribute::readValue(std::istream& in)
-{
-   xmlskipws(in);
-   if(in.fail()) return false;
-   theValue = "";
-   char c = in.peek();
-   bool done = false;
-	char startQuote = '\0';
-   if((c == '\'')||
-      (c == '"'))
-   {
-		startQuote = c;
-      theValue += in.get();
-      while(!done&&!in.fail())
-      {
-         c = in.peek();
-         if(c==startQuote)
-         {
-            theValue += c;
-            done = true;
-            in.ignore(1);
-            
-         }
-         else if(c == '\n')
-         {
-            done = true;
-         }
-         else
-         {
-            theValue += in.get();
-         }
-      }
-   }
-
-   if(theValue != "")
-   {
-      std::string::iterator startIter = theValue.begin();
-      std::string::iterator endIter   = theValue.end();
-      --endIter;
-      if(*startIter == startQuote)
-      {
-         ++startIter;
-      }
-      else
-      {
-         return false;
-         setErrorStatus();
-      }
-      if(*endIter != startQuote)
-      {
-         return false;
-         setErrorStatus();
-      }
-      theValue = ossimString(startIter, endIter);
-   }
-   return ((!in.bad())&&
-           (theValue !=""));
-}
diff --git a/src/ossim/base/ossimXmlDocument.cpp b/src/ossim/base/ossimXmlDocument.cpp
deleted file mode 100644
index d66a033..0000000
--- a/src/ossim/base/ossimXmlDocument.cpp
+++ /dev/null
@@ -1,435 +0,0 @@
-//*******************************************************************
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Oscar Kramer (ossim port by D. Burken)
-//
-// Description:  
-//
-// Contains definition of class ossimXmlDocument. This class provides read-only
-// parsing and accessing of an XML document file.
-//*****************************************************************************
-// $Id: ossimXmlDocument.cpp 21579 2012-08-31 14:24:11Z dburken $
-
-
-#include <ossim/base/ossimXmlDocument.h>
-#include <ossim/base/ossimXmlAttribute.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimRegExp.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <stack>
-#include <iostream>
-#include <fstream>
-
-
-// Static trace for debugging
-#include <ossim/base/ossimTrace.h>
-static ossimTrace traceDebug("ossimXmlDocument:debug");
-
-static std::istream& xmlskipws(std::istream& in)
-{
-   int c = in.peek();
-   while((!in.fail())&&
-         (( (c == ' ') || (c == '\t') || (c == '\n')|| (c == '\r') || (c<0x20) || (c>=0x7f) )))//|| (c<0x20) || (c >=0x2f) )))
-   {
-      in.ignore(1);
-      c = in.peek();
-   }
-   
-   return in;
-}
-
-static const int BUFFER_MAX_LEN = 1000;
-static const ossimString XPATH_DELIM ("/");
-
-RTTI_DEF1(ossimXmlDocument, "ossimXmlDocument", ossimObject)
-ossimXmlDocument::ossimXmlDocument(const ossimFilename& xmlFileName)
-   :
-   theRootNode  (0),
-   theXmlHeader("<?xml version='1.0'?>"),
-   theStrictCheckFlag(false)
-{
-
-   if(xmlFileName != "")
-   {
-      openFile(xmlFileName);
-   }
-}
-ossimXmlDocument::ossimXmlDocument(const ossimXmlDocument& src)
-:ossimObject(src),
-theRootNode(src.theRootNode.valid()?(ossimXmlNode*)src.theRootNode->dup():(ossimXmlNode*)0),
-theXmlHeader(src.theXmlHeader),
-theFilename(src.theFilename),
-theStrictCheckFlag(src.theStrictCheckFlag)
-{
-   
-}
-
-ossimXmlDocument::~ossimXmlDocument()
-{
-}
-
-bool ossimXmlDocument::write(const ossimFilename& file)
-{
-   std::ofstream out(file.c_str());
-
-   if(out)
-   {
-      out << *this << std::endl;
-   }
-   else
-   {
-      return false;
-   }
-
-   return true;
-}
-
-bool ossimXmlDocument::openFile(const ossimFilename& filename)
-{
-   
-   theFilename = filename;
-
-   if(theFilename == "")
-   {
-      return false;
-   }
-
-   //
-   // Open XML File:
-   // Note: Opening text document binary to overcome an apparent windows bug.
-   //
-   ifstream xml_stream (filename.c_str(), ios::binary);
-   if (!xml_stream)
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG: ossimXmlDocument::ossimXmlDocument\n"
-            << "encountered opening file <" << filename << "> for "
-            << "reading. Aborting..." << endl;
-      }
-      return false;
-   }
-
-   return read(xml_stream);
-}
-
-bool ossimXmlDocument::read(std::istream& in)
-{
-//   char buffer[BUFFER_MAX_LEN];
-//   streampos file_pos;
-//   bool readingHeader = true;
-   bool startTagCharacterFound = false;
-   char c = in.peek();
-
-
-   // initially we will do our own skipping to make sure we ar not binary
-   //
-   while(!in.bad()&&
-         (c != '<')&&
-         (c >= 0x20)&&(c <= 0x7e))
-   {
-      in.ignore(1);
-      c = in.peek();
-   }
-
-   if (in.bad()||
-       (c!='<'))
-   {
-      setErrorStatus();
-      return false;
-   }
-   startTagCharacterFound = true;
-
-   if(readHeader(in))
-   {
-      if(theXmlHeader=="")
-      {
-         if(startTagCharacterFound)
-         {
-            theXmlHeader = "<?xml version='1.0'?>";
-         }
-         else
-         {
-            setErrorStatus();
-            return false;
-         }
-      }
-   }
-   if((!theXmlHeader.contains("xml version"))&&
-      (!startTagCharacterFound)&&theStrictCheckFlag)
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "FATAL: ossimXmlDocument::ossimXmlDocument"
-            << "encountered parsing XML file <" << theFilename
-            << ">. The file does not appear to be XML v1.0. \n"
-            << "Header = \n" << theXmlHeader <<"\n"
-            << endl;
-      }
-      setErrorStatus();
-      return false;
-   }
-   theRootNode = new ossimXmlNode(in, 0);
-   setErrorStatus(theRootNode->getErrorStatus());
-   return (getErrorStatus()==ossimErrorCodes::OSSIM_OK);
-}
-
-void ossimXmlDocument::findNodes(const ossimString& arg_xpath,
-                            vector<ossimRefPtr<ossimXmlNode> >& result) const
-{
-   //
-   // First verify the root node exists:
-   //
-   if (!theRootNode.valid())
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "WARNING: ossimXmlDocument::findNodes,\n"
-            << "No root node has been instantiated. Returning null "
-            << "node list..." << endl;
-      }
-      return;
-   }
-
-   //
-   // Make a copy to manipulate:
-   //
-   ossimString xpath (arg_xpath);
-   if (xpath.empty())
-      return;
-   
-   //
-   // Check if absolute path:
-   //
-   if (xpath[static_cast<std::string::size_type>(0)] !=
-       XPATH_DELIM[static_cast<std::string::size_type>(0)])
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "WARNING: ossimXmlDocument::findNodes\n"
-            << "Only absolute XPaths are supported. Returning null "
-            << "node list..." << endl;
-      }
-      return;
-   }
-
-   //
-   // Check that root tag matches path root:
-   //
-   ossimString rel_xpath (xpath.after(XPATH_DELIM));
-   ossimString root_tag (rel_xpath);
-   if (root_tag.contains(XPATH_DELIM))
-       root_tag = rel_xpath.before(XPATH_DELIM);
-   
-   if (root_tag != theRootNode->getTag())
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "WARNING: ossimXmlDocument::findNodes\n"
-            << "XPath's root node <"<<root_tag<<"> does not match the "
-            << "stored root node's tag <" << theRootNode->getTag() << ">. "
-            << "Returning null node list..." << endl;
-      }
-      return;
-   }
-
-   //
-   // If the root node was the requested node, return it alone:
-   //
-   rel_xpath = rel_xpath.after(XPATH_DELIM);
-   if (rel_xpath.empty())
-   {
-      result.push_back(theRootNode);
-      return;
-   }
-   
-   //
-   // Pass the node request on to the root node with the relative path:
-   //
-   theRootNode->findChildNodes(rel_xpath, result);
-}
-
-ostream& operator << (ostream& os, const ossimXmlDocument& xml_doc) 
-{
-   os << xml_doc.theXmlHeader << endl;
-   if (xml_doc.theRootNode.valid())
-   {
-      os << (xml_doc.theRootNode.get()) << endl;
-   }
-//    else
-//       os << "-- no root node assigned -- " << endl;
-   
-   return os;
-}
-
-void ossimXmlDocument::initRoot(ossimRefPtr<ossimXmlNode> node)
-{
-   theRootNode = node;
-}
-
-ossimRefPtr<ossimXmlNode> ossimXmlDocument::getRoot()
-{
-   return theRootNode;
-}
-
-const ossimRefPtr<ossimXmlNode> ossimXmlDocument::getRoot()const
-{
-   return theRootNode;
-}
-
-ossimRefPtr<ossimXmlNode> ossimXmlDocument::removeRoot()
-{
-   ossimRefPtr<ossimXmlNode> root = theRootNode;
-
-   theRootNode = 0;
-
-   return root;
-}
-
-
-void ossimXmlDocument::fromKwl(const ossimKeywordlist& kwlToConvert)
-{
-
-   ossimKeywordlist kwl = kwlToConvert;
-   theRootNode = 0;
-   theRootNode = new ossimXmlNode;
-
-   
-   ossimString prefix = "";
-   ossimKeywordlist::KeywordMap& map              = kwl.getMap();
-   ossimKeywordlist::KeywordMap::iterator mapIter = map.begin();
-
-   while(mapIter != map.end())
-   {
-      ossimString key = mapIter->first;
-      key = key.substitute(".", "/", true);
-      theRootNode->addNode(key, mapIter->second);
-      ++mapIter;
-   }
-
-   // now collapse all keywordlist styles to the XML style
-   //
-   std::stack<ossimRefPtr<ossimXmlNode> > tempStack;
-   tempStack.push(theRootNode);
-   while(!tempStack.empty())
-   {
-      
-      ossimRefPtr<ossimXmlNode> node = tempStack.top();
-      tempStack.pop();
-      vector<ossimRefPtr<ossimXmlNode> >& childNodes = node->getChildNodes();
-      ossim_uint32 idx = 0;
-      for(idx = 0; idx < childNodes.size(); ++idx)
-      {
-         tempStack.push(childNodes[idx]);
-      }
-      if(node->getChildNodes().size() > 0)
-      {
-         if(node->getTag()!="")
-         {
-            node->addAttribute("name", node->getTag());
-         }
-         node->setTag("object");
-      }
-      
-      if(node->getTag() == "type")
-      {
-         if(node->getParentNode())
-         {
-            node->getParentNode()->removeChild("type");
-            node->getParentNode()->addAttribute("type", node->getText());
-         }
-      }
-      else if(node->getChildNodes().size() < 1)
-      {
-         if(node->getTag()!="")
-         {
-            node->addAttribute("name", node->getTag());
-         }
-         if(!node->getText().contains("\n"))
-         {
-            if(node->getText()!="")
-            {
-               node->addAttribute("value", node->getText());
-               node->setText("");
-            }
-         }
-         node->setTag("property");
-      }
-   }
-}
-
-void ossimXmlDocument::toKwl(ossimKeywordlist& kwl ,
-                             const ossimString& prefix)const
-{
-   if(theRootNode.valid())
-   {
-      theRootNode->toKwl(kwl, prefix);
-   }
-//    const std::vector<ossimRefPtr<ossimXmlNode> >& children = theRootNode->getChildNodes();
-   
-//    ossim_uint32 idx = 0;
-   
-//    for(idx = 0; idx < children.size(); ++idx)
-//    {
-//       children[idx]->toKwl(kwl, prefix);
-//    }
-}
-
-bool ossimXmlDocument::readHeader(std::istream& in)
-{
-   char c;
-   in>>xmlskipws;
-
-   while(in.peek() == '<')
-   {
-      std::stack<char> theLessThanStack;
-      theLessThanStack.push('<');
-      in.ignore(1);
-      c = in.peek();
-      // we will for now skip things like !DOCTYPE and any other things in the header of the document that start with <? or <!
-      if((c == '?')||
-         (c == '!'))
-      {
-         theXmlHeader += "<";
-         theXmlHeader += (char)in.get();
-         
-         while(!theLessThanStack.empty()&&
-               (!in.bad()))
-         {
-            if(in.peek() == '<')
-            {
-               theLessThanStack.push('<');
-            }
-            else if(in.peek() == '>')
-            {
-               theLessThanStack.pop();
-            }
-            theXmlHeader += (char)in.get();
-         }
-         if(!in.bad())
-         {
-            if(in.peek()=='\n'||
-               in.peek()=='\r')
-            {
-               theXmlHeader += (char)in.get();
-            }
-         }
-//          if(!in.bad())
-//          {
-//             theXmlHeader += (char)in.get();
-//          }
-         in>>xmlskipws;
-      }
-   }
-
-   return (!in.bad());
-}
diff --git a/src/ossim/base/ossimXmlString.cpp b/src/ossim/base/ossimXmlString.cpp
deleted file mode 100644
index 7e5ee9b..0000000
--- a/src/ossim/base/ossimXmlString.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author: Ken Melero (kmelero at remotesensing.org)
-// Description: This class provides manipulation of filenames.
-//
-//*************************************************************************
-// $Id: ossimXmlString.cpp 22328 2013-07-25 17:17:52Z gpotts $
-#include <ossim/base/ossimXmlString.h>
-
-bool ossimXmlString::containsSpecialXmlCharacters(const ossimString& value)
-{
-   for(ossimString::const_iterator it = value.begin();
-      it != value.end();++it)
-   {
-      switch(*it)
-      {
-         case '&':
-         case '<':
-         case '>':
-         case '"':
-         case '\'':
-         {
-            return true;
-         }
-         default:
-         {
-            break;
-         }
-      }
-
-   }
-   return false;
-}
-
-const ossimXmlString& ossimXmlString::assign(const ossimString& s)
-{
-   ossimString result = s;
-   
-   std::string::size_type pos = 0;
-
-   pos = result.find("&");
-   // do ampersand first
-   //
-   while(pos != std::string::npos)
-   {
-      ossimString s1(result.begin() + pos,
-                     result.begin()+pos+5);
-      ossimString s2(result.begin() + pos,
-                     result.begin()+pos+4);
-      ossimString s3(result.begin() + pos,
-                     result.begin()+pos+3);
-      
-      if((s2 != "&amp")&&
-         (s1 != "&quot")&&
-         (s3 != "&gt")&&
-         (s3 != "&lt")&&
-         (s1 != "&apos"))
-      {
-         result.replace(pos, 1, "&amp");
-      }
-      
-      pos = result.find("&", pos+4);
-   }
-
-   result = result.substitute("\"",
-                              "&quot",
-                              true);
-   result = result.substitute("<",
-                              "&lt",
-                              true);
-   result = result.substitute(">",
-                              "&gt",
-                              true);
-   result = result.substitute("'",
-                              "&apos",
-                              true);
-                     
-   *((ossimString*)this) = result;
-
-   return *this;
-}
-
-ossimString ossimXmlString::wrapCDataIfNeeded(const ossimString& input)
-{
-   if(containsSpecialXmlCharacters(input))
-   {
-      return wrapCData(input);
-   }
-
-   return input;
-}
-ossimString ossimXmlString::wrapCData(const ossimString& input)
-{
-   return "<![CDATA[" + input + "]]>";
-}
-
diff --git a/src/ossim/elevation/.cvsignore b/src/ossim/elevation/.cvsignore
deleted file mode 100644
index a438335..0000000
--- a/src/ossim/elevation/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.d
diff --git a/src/ossim/elevation/ossimDtedElevationDatabase.cpp b/src/ossim/elevation/ossimDtedElevationDatabase.cpp
deleted file mode 100644
index dd3e549..0000000
--- a/src/ossim/elevation/ossimDtedElevationDatabase.cpp
+++ /dev/null
@@ -1,244 +0,0 @@
-#include <ossim/elevation/ossimDtedElevationDatabase.h>
-#include <ossim/base/ossimGeoidManager.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimDirectory.h>
-#include <ossim/base/ossimTrace.h>
-#include <sstream>
-#include <iomanip>
-#include <cstdlib> /* for abs(int) */
-
-static ossimTrace traceDebug("ossimDtedElevationDatabase:debug");
-RTTI_DEF1(ossimDtedElevationDatabase, "ossimDtedElevationDatabase", ossimElevationCellDatabase);
-
-double ossimDtedElevationDatabase::getHeightAboveMSL(const ossimGpt& gpt)
-{
-   if(!isSourceEnabled()) return ossim::nan();
-   m_mutex.lock();
-   if(m_lastHandler.valid())
-   {
-      if(m_lastHandler->pointHasCoverage(gpt))
-      {
-         double result = m_lastHandler->getHeightAboveMSL(gpt);
-         m_mutex.unlock();
-         
-         return result;
-      }
-   }
-   m_lastHandler = getOrCreateCellHandler(gpt);
-   
-   if(m_lastHandler.valid())
-   {
-      double result = m_lastHandler->getHeightAboveMSL(gpt);
-      m_mutex.unlock();
-     return result; // still need to shift
-   }
-   m_mutex.unlock();
-   return ossim::nan();
-}
-
-double ossimDtedElevationDatabase::getHeightAboveEllipsoid(const ossimGpt& gpt)
-{
-   double h = getHeightAboveMSL(gpt);
-   if(h != ossim::nan())
-   {
-      double offset = getOffsetFromEllipsoid(gpt);
-      
-      h += offset;
-   }
-   
-   return h;
-}
-bool ossimDtedElevationDatabase::open(const ossimString& connectionString)
-{
-   bool result = false;
-   ossimFilename file = ossimFilename(connectionString);
-   
-   result = openDtedDirectory(file);
-
-   return result;
-}
-
-bool ossimDtedElevationDatabase::openDtedDirectory(const ossimFilename& dir)
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimDtedElevationDatabase::open entered ...\n";
-   }
-   bool result = dir.isDir();
-   if(result)
-   {
-      ossim_uint32 count = 0;
-      ossim_uint32 maxCount = 10;
-      ossimDirectory od;
-      result = od.open(dir);
-      if(result)
-      {
-         result = false;
-         ossimFilename f;
-         // Get the first directory.
-         od.getFirst(f, ossimDirectory::OSSIM_DIR_DIRS);
-         
-         do
-         {
-            ++count;
-            // Must be a directory.
-            if (f.isDir())
-            {
-               // Discard any full path.
-               ossimFilename fileOnly = f.file();
-               
-               // Downcase it.
-              fileOnly.downcase();
-               // Must start with 'e' or 'w'.
-               bool foundCell = ( ((fileOnly.c_str()[0] == 'e') || ( fileOnly.c_str()[0] == 'w')) &&
-                         (fileOnly.size() == 4));
-               if(foundCell)
-               {
-                  ossim_uint32 maxCount2 = 10;
-                  ossim_uint32 count2 = 0;
-                  ossimDirectory d2;
-                  if(d2.open(f))
-                  {
-                     d2.getFirst(f, ossimDirectory::OSSIM_DIR_FILES);
-                     do
-                     {
-                        ossimRefPtr<ossimDtedHandler> dtedHandler = new ossimDtedHandler();
-                        if(dtedHandler->open(f, false))
-                        {
-                           if(traceDebug())
-                           {
-                              ossimNotify(ossimNotifyLevel_DEBUG) << "ossimDtedElevationDatabase::open: Found dted file " << f << "\n";
-                           }
-                           result = true;
-                           m_extension = "."+f.ext();
-                           m_connectionString = dir;
-                           m_meanSpacing = dtedHandler->getMeanSpacingMeters();
-                       }
-                        dtedHandler->close();
-                        dtedHandler = 0;
-                        ++count2;
-                     }while(!result&&d2.getNext(f)&&(count2 < maxCount2));
-                  }
-               }
-            }
-         }while(!result&&(od.getNext(f))&&(count < maxCount));
-      }
-   }
-   
-   if(result)
-   {
-      if(!m_geoid.valid())
-      {
-         m_geoid = ossimGeoidManager::instance()->findGeoidByShortName("geoid1996", false);
-      }
-      
-      if(!m_geoid.valid()&&traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << "ossimDtedElevationDatabase::open: Unable to load goeid grid 1996 for DTED database\n";
-      }
-   }
-   
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimDtedElevationDatabase::open leaving ...\n";
-   }
-   return result;
-}
-
-bool ossimDtedElevationDatabase::getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const
-{
-   bool result = false;
-   
-   m_mutex.lock();
-   ossimDtedElevationDatabase* thisPtr = const_cast<ossimDtedElevationDatabase*>(this);
-   ossimRefPtr<ossimElevCellHandler> tempHandler = thisPtr->getOrCreateCellHandler(gpt);
-   m_mutex.unlock();
-
-   if(tempHandler.valid())
-   {
-      result = tempHandler->getAccuracyInfo(info, gpt);
-   }
-  return result;
-}
-
-void ossimDtedElevationDatabase::createRelativePath(ossimFilename& file, const ossimGpt& gpt)const
-{
-   ossimFilename lon, lat;
-   int ilon = static_cast<int>(floor(gpt.lond()));
-   
-   if (ilon < 0)
-   {
-      lon = "w";
-   }
-   else
-   {
-      lon = "e";
-   }
-   
-   ilon = abs(ilon);
-   std::ostringstream  s1;
-   s1 << std::setfill('0') << std::setw(3)<< ilon;
-   
-   lon += s1.str().c_str();//ossimString::toString(ilon);
-   
-   int ilat =  static_cast<int>(floor(gpt.latd()));
-   if (ilat < 0)
-   {
-      lat += "s";
-   }
-   else
-   {
-      lat += "n";
-   }
-   
-   ilat = abs(ilat);
-   std::ostringstream  s2;
-   
-   s2<< std::setfill('0') << std::setw(2)<< ilat;
-   
-   lat += s2.str().c_str();
-   
-   file = lon.dirCat(lat+m_extension);
-}
-ossimRefPtr<ossimElevCellHandler> ossimDtedElevationDatabase::createCell(const ossimGpt& gpt)
-{
-  ossimRefPtr<ossimElevCellHandler> result = 0;
-  ossimFilename f;
-  createFullPath(f, gpt);
-  if(f.exists())
-  {
-     ossimRefPtr<ossimDtedHandler> h = new ossimDtedHandler(f, m_memoryMapCellsFlag);
-     if (!(h->getErrorStatus()))
-     {
-        result = h.get();
-     }
-  }
-
-  return result;
-}
-
-bool ossimDtedElevationDatabase::loadState(const ossimKeywordlist& kwl, const char* prefix )
-{
-   bool result = ossimElevationDatabase::loadState(kwl, prefix);
-   if(result)
-   {
-      if(!m_connectionString.empty()&&ossimFilename(m_connectionString).exists())
-      {
-         result = open(m_connectionString);
-      }
-      else
-      {
-         // can't open the connection because it does not exists or empty
-         result = false;
-      }
-   }
-   
-   return result;
-}
-
-bool ossimDtedElevationDatabase::saveState(ossimKeywordlist& kwl, const char* prefix)const
-{
-   bool result = ossimElevationDatabase::saveState(kwl, prefix);
-   
-   return result;
-}
diff --git a/src/ossim/elevation/ossimElevCellHandler.cpp b/src/ossim/elevation/ossimElevCellHandler.cpp
deleted file mode 100644
index 3095947..0000000
--- a/src/ossim/elevation/ossimElevCellHandler.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-//*****************************************************************************
-// FILE: ossimElevCellHandler.cc
-//
-// License:  See top level LICENSE.txt file.
-//
-// DESCRIPTION:
-//   Contains implementation of class ossimElevCellHandler. This is the base
-//   class for all DEM file readers including DTED. Each file shall have its
-//   corresponding ossimElevCellHandler. When more than one file is accessed,
-//   an ossimElevCombiner is used which owns multiple instances of this class.
-//
-// SOFTWARE HISTORY:
-//>
-//   19Apr2001  Oscar Kramer
-//              Initial coding.
-//<
-//*****************************************************************************
-// $Id: ossimElevCellHandler.cpp 21214 2012-07-03 16:20:11Z dburken $
-
-#include <ossim/elevation/ossimElevCellHandler.h>
-#include <ossim/base/ossimKeyword.h>
-#include <ossim/base/ossimGpt.h>
-
-RTTI_DEF1(ossimElevCellHandler, "ossimElevCellHandler" , ossimElevSource)
-
-//***
-// Define Trace flags for use within this file:
-//***
-#include <ossim/base/ossimTrace.h>
-static ossimTrace traceExec  ("ossimElevCellHandler:exec");
-static ossimTrace traceDebug ("ossimElevCellHandler:debug");
-
-static const ossimKeyword DEM_FILENAME_KW ("dem_filename",
-                                           "Name of DEM file to load.");
-static const ossimIpt ZERO_SIZE_IPT (0, 0);
-
-ossimElevCellHandler::ossimElevCellHandler ()
-   : ossimElevSource(),
-     theFilename(),
-     theMeanSpacing(0.0),
-     theAbsLE90(0.0),
-     theAbsCE90(0.0)
-{
-}
-
-ossimElevCellHandler::ossimElevCellHandler (const ossimElevCellHandler& src)
-   : ossimElevSource(src),
-     theFilename    (src.theFilename),
-     theMeanSpacing (src.theMeanSpacing),
-     theAbsLE90     (src.theAbsLE90),
-     theAbsCE90     (src.theAbsCE90)
-{
-}
-
-ossimElevCellHandler::ossimElevCellHandler(const char* filename)
-   : ossimElevSource(),
-     theFilename(filename),
-     theMeanSpacing(0.0),
-     theAbsLE90(0.0),
-     theAbsCE90(0.0)
-{}
-
-ossimElevCellHandler::~ossimElevCellHandler()
-{}
-
-const ossimElevCellHandler& ossimElevCellHandler::operator=(
-   const ossimElevCellHandler& rhs)
-{
-   if (this != &rhs)
-   {
-      theFilename     = rhs.theFilename;
-      theMeanSpacing  = rhs.theMeanSpacing;
-      theAbsLE90      = rhs.theAbsLE90;
-      theAbsCE90      = rhs.theAbsCE90;
-      
-      ossimElevSource::operator=( *(const ossimElevSource*)&rhs);
-   }
-   
-   return *this;
-}
-
-
-ossimFilename ossimElevCellHandler::getFilename() const
-{
-   return theFilename;
-}
-
-double ossimElevCellHandler::getMeanSpacingMeters() const
-{
-   return theMeanSpacing;
-}
-
-bool ossimElevCellHandler::getAccuracyInfo(ossimElevationAccuracyInfo& info,
-                                           const ossimGpt& /* gpt*/ ) const
-{
-  info.m_confidenceLevel = .9;
-  info.m_absoluteLE = theAbsLE90;
-  info.m_absoluteCE = theAbsCE90;
-
-  return info.hasValidAbsoluteError();
-}
-
-bool ossimElevCellHandler::canConnectMyInputTo(
-   ossim_int32 /* inputIndex */,
-   const ossimConnectableObject* /* object */) const
-{         
-   return false;
-}
-
diff --git a/src/ossim/elevation/ossimElevCellHandlerFactory.cpp b/src/ossim/elevation/ossimElevCellHandlerFactory.cpp
deleted file mode 100644
index 50a1bc0..0000000
--- a/src/ossim/elevation/ossimElevCellHandlerFactory.cpp
+++ /dev/null
@@ -1,130 +0,0 @@
-//*****************************************************************************
-// FILE: ossimElevCellHandlerFactory.cc
-//
-// Copyright (C) 2001 ImageLinks, Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// DESCRIPTION:
-//   Contains implementation of class ossimElevCellHandlerFactory. This is
-//   a "super-factory" owning a list of subfactories for each particular DEM
-//   format class.
-//
-//   NOT CURRENTLY UTILIZED -- USE DTED MANAGER
-//
-// LIMITATIONS:
-//   The intention of this factory is to produce individual instances of
-//   elevation cell handlers. Presently this is not supported since DTED is
-//   the only elevation source being handled. DTED is loaded via the
-//   ossimDtedManager class as a DB interface, and not by accessing individual
-//   DTED handlers.
-//
-// SOFTWARE HISTORY:
-//>
-//   01Aug2001  Oscar Kramer (okramer at imagelinks.com)
-//              Initial coding.
-//<
-//*****************************************************************************
-//  $Id: ossimElevCellHandlerFactory.cpp 14800 2009-06-30 08:58:55Z dburken $
-
-#include <ossim/elevation/ossimElevCellHandlerFactory.h>
-#include <ossim/base/ossimString.h>
-
-ossimElevCellHandlerFactory* ossimElevCellHandlerFactory::theInstance = 0;
-
-//*****************************************************************************
-//  STATIC METHOD: instance()
-//  
-//*****************************************************************************
-ossimElevCellHandlerFactory* ossimElevCellHandlerFactory::instance()
-{
-   if(!theInstance)
-      theInstance = new ossimElevCellHandlerFactory;
- 
-   return (ossimElevCellHandlerFactory*) theInstance; 
-} 
-
-//*****************************************************************************
-//  PROTECTED DEFAULT CONSTRUCTOR: ossimElevCellHandlerFactory
-//  
-//*****************************************************************************
-ossimElevCellHandlerFactory::ossimElevCellHandlerFactory()
-{
-   //***
-   // Add default sub factories to this factory's registry list:
-   // NOTE: DTED handlers are managed by their own ossimDtedManager so should
-   // never be created individually via a factory. This will be the typical
-   // pattern for all but custom DEM files.
-   //***
-//   registerFactory(ossimUsgsDemCellFactory::instance());
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimElevCellHandlerFactory::create(kwl, prefix)
-//  
-//*****************************************************************************
-ossimElevCellHandler*
-ossimElevCellHandlerFactory::create(const ossimKeywordlist &keywordList,
-                                    const char *prefix) const
-{
-   std::list<ossimFactoryBase<ossimElevCellHandler>*>::const_iterator
-      elevCellFactory;
-
-   ossimElevCellHandler* product = 0;
-   
-   elevCellFactory = theRegistry.begin();
-   while((elevCellFactory != theRegistry.end()) && (!product))
-   {
-      product = (*elevCellFactory)->create(keywordList, prefix);
-      elevCellFactory++;
-   }
-
-   return product;
-}
-
-//*****************************************************************************
-//  METHOD: ossimElevCellHandlerFactory::create(proj_name)
-//  
-//*****************************************************************************
-ossimElevCellHandler*
-ossimElevCellHandlerFactory::create(const ossimString &name) const 
-{
-   std::list<ossimFactoryBase<ossimElevCellHandler>*>::const_iterator
-      elevCellFactory;
-
-   ossimElevCellHandler* product = 0;
-   
-   elevCellFactory = theRegistry.begin();
-   while((elevCellFactory != theRegistry.end()) && (!product))
-   {
-      product = (*elevCellFactory)->create(name);
-      elevCellFactory++;
-   }
-
-   return product;
-}
-
-//*****************************************************************************
-//  METHOD: ossimElevCellHandlerFactory::getList()
-//  
-//*****************************************************************************
-std::list<ossimString> ossimElevCellHandlerFactory::getList() const 
-{
-   std::list<ossimString> rtn_list;
-   std::list<ossimString> sub_list;
-   std::list<ossimFactoryBase<ossimElevCellHandler>*>::const_iterator factory_iter;
-
-   factory_iter = theRegistry.begin();
-   while(factory_iter != theRegistry.end())
-   {
-      sub_list = (*factory_iter)->getList();
-      rtn_list.merge(sub_list);
-      factory_iter++;
-   }
-
-   return rtn_list;
-}
-
diff --git a/src/ossim/elevation/ossimElevManager.cpp b/src/ossim/elevation/ossimElevManager.cpp
deleted file mode 100644
index d7e604e..0000000
--- a/src/ossim/elevation/ossimElevManager.cpp
+++ /dev/null
@@ -1,365 +0,0 @@
-//**************************************************************************
-// FILE: ossimElevManager.cpp
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// DESCRIPTION:
-//   Contains implementation of class ossimElevManager. This object 
-//   provides a single interface for accessing multiple elevation
-//   sources. This object owns one or more elevation sources in an ordered
-//   list. When queried for an elevation at a particular point, it searches
-//   the available sources for the best result, instantiating new sources if
-//   necessary.
-//
-// SOFTWARE HISTORY:
-//>
-//   23Apr2001  Oscar Kramer
-//              Initial coding.
-//<
-//**************************************************************************
-// $Id: ossimElevManager.cpp 21970 2012-12-05 18:19:32Z okramer $
-
-#include <algorithm>
-#include <ossim/elevation/ossimElevManager.h>
-#include <ossim/base/ossimEnvironmentUtility.h>
-#include <ossim/elevation/ossimElevationDatabase.h>
-#include <ossim/base/ossimDirectory.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimGeoidManager.h>
-#include <ossim/elevation/ossimElevationDatabaseRegistry.h>
-#include <ossim/base/ossimKeywordNames.h>
-
-ossimElevManager* ossimElevManager::m_instance = 0;
-static ossimTrace traceDebug("ossimElevManager:debug");
-
-void ossimElevManager::ConnectionStringVisitor::visit(ossimObject* obj)
-{
-   if(!hasVisited(obj))
-   {
-      ossimElevationDatabase* databsase = dynamic_cast<ossimElevationDatabase*>(obj);
-      if(databsase)
-      {
-         if(m_connectionString == databsase->getConnectionString())
-         {
-            m_database = databsase;
-            m_stopTraversalFlag = true;
-         }
-      }
-   }
-}
-
-
-ossimElevManager* ossimElevManager::instance()
-{
-   if (!m_instance)
-   {
-      m_instance = new ossimElevManager();
-      m_instance->loadStandardElevationPaths();
-   }
-   
-   return m_instance;
-}
-ossimElevManager::ossimElevManager()
-   :ossimElevSource(),
-    m_elevationDatabaseList(0),
-    m_defaultHeightAboveEllipsoid(ossim::nan()),
-    m_elevationOffset(ossim::nan()),
-    m_useGeoidIfNullFlag(false),
-    m_mutex()
-{
-   m_instance = this;
-}
-
-ossimElevManager::~ossimElevManager()
-{
-}
-
-double ossimElevManager::getHeightAboveEllipsoid(const ossimGpt& gpt)
-{
-   if (!isSourceEnabled())
-      return ossim::nan();
-
-   double result = ossim::nan();
-   for (ossim_uint32 idx = 0; (idx < m_elevationDatabaseList.size()) && ossim::isnan(result); ++idx)
-   {
-      result = m_elevationDatabaseList[idx]->getHeightAboveEllipsoid(gpt);
-   }
-
-   if (ossim::isnan(result))
-   {
-      // No elevation value was returned from the database, so try next best alternatives depending
-      // on ossim_preferences settings. Priority goes to default ellipsoid height if available:
-      if (!ossim::isnan(m_defaultHeightAboveEllipsoid))
-      {
-         result = m_defaultHeightAboveEllipsoid;
-      }
-      else if (m_useGeoidIfNullFlag)
-      {
-         result = ossimGeoidManager::instance()->offsetFromEllipsoid(gpt);
-      }
-   }
-
-   // Next, ossim_preferences may have indicated an elevation offset to use (top of trees, error
-   // bias, etc):
-   if (!ossim::isnan(m_elevationOffset) && !ossim::isnan(result))
-      result += m_elevationOffset;
-
-   return result;
-}
-
-double ossimElevManager::getHeightAboveMSL(const ossimGpt& gpt)
-{
-   if (!isSourceEnabled())
-      return ossim::nan();
-
-   double result = ossim::nan();
-   for (ossim_uint32 idx = 0; (idx < m_elevationDatabaseList.size()) && ossim::isnan(result); ++idx)
-   {
-      result = m_elevationDatabaseList[idx]->getHeightAboveMSL(gpt);
-   }
-
-   if (ossim::isnan(result) && m_useGeoidIfNullFlag)
-   {
-      // No elevation value was returned from the database, so try next best alternatives depending
-      // on ossim_preferences settings. First default to height at MSL itself:
-      result = 0.0; // MSL
-      if (!ossim::isnan(m_defaultHeightAboveEllipsoid))
-      {
-         // Use the default height above ellipsoid corrected for best guess of MSL above ellipsoid
-         // (i.e., the geoid):
-         double dh = ossimGeoidManager::instance()->offsetFromEllipsoid(gpt);
-         if (!ossim::isnan(dh))
-            result = m_defaultHeightAboveEllipsoid - dh;
-      }
-   }
-
-   // ossim_preferences may have indicated an elevation offset to use (top of trees, error bias, etc)
-   if (!ossim::isnan(result) && (!ossim::isnan(m_elevationOffset)))
-      result += m_elevationOffset;
-
-   return result;
-}
-
-void ossimElevManager::loadStandardElevationPaths()
-{
-   ossimFilename userDir    = ossimEnvironmentUtility::instance()->getUserOssimSupportDir();
-   ossimFilename installDir = ossimEnvironmentUtility::instance()->getInstalledOssimSupportDir();
-   
-   userDir = userDir.dirCat("elevation");
-   installDir = installDir.dirCat("elevation");
-   
-   loadElevationPath(userDir);
-   loadElevationPath(installDir);
-   
-   ossimString paths = ossimEnvironmentUtility::instance()->getEnvironmentVariable("OSSIM_ELEVATION_PATH");
-   std::vector<ossimString> pathArray;
-   ossimString pathSeparator = ":";
-#if defined(WIN32) && !defined(CYGWIN)
-   pathSeparator = ";";
-#endif
-   
-   if(!paths.empty())
-   {
-      paths.split(pathArray, pathSeparator);
-      if(!pathArray.empty())
-      {
-         ossim_uint32 idx = 0;
-         for(idx = 0; idx < pathArray.size(); ++idx)
-         {
-            ossimFilename file(pathArray[idx]);
-            
-            if(file.exists())
-            {
-               loadElevationPath(file);
-            }
-         }
-      }
-   }
-}
-
-bool ossimElevManager::loadElevationPath(const ossimFilename& path)
-{
-  bool result = false;
-   ossimElevationDatabase* database = ossimElevationDatabaseRegistry::instance()->open(path);
-   
-   if(!database&&path.isDir())
-   {
-      ossimDirectory dir;
-      
-      if(dir.open(path))
-      {
-         ossimFilename file;
-         dir.getFirst(file, ossimDirectory::OSSIM_DIR_DIRS);
-         do
-         {
-            database = ossimElevationDatabaseRegistry::instance()->open(file);
-            if(database)
-            {
-               result = true;
-               addDatabase(database);
-            }
-         }while(dir.getNext(file));
-      }
-   }
-   else if(database)
-   {
-      result = true;
-      addDatabase(database);
-   }
-   
-   return result;
-}
-
-void ossimElevManager::getOpenCellList(std::vector<ossimFilename>& list) const
-{
-   for(ossim_uint32 idx = 0; idx < m_elevationDatabaseList.size(); ++idx)
-   {
-      m_elevationDatabaseList[idx]->getOpenCellList(list);
-   }
-}
-
-void ossimElevManager::clear()
-{
-   //OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_mutex);
-
-  m_elevationDatabaseList.clear();
-
-}
-
-void ossimElevManager::accept(ossimVisitor& visitor)
-{
-   for(ossim_uint32 idx = 0; ((idx < m_elevationDatabaseList.size())&&!visitor.stopTraversal()); ++idx)
-   {
-      m_elevationDatabaseList[idx]->accept(visitor);
-   }
-}
-
-bool ossimElevManager::getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const
-{
-   for(ossim_uint32 idx = 0;(idx < m_elevationDatabaseList.size()); ++idx)
-   {
-      if(m_elevationDatabaseList[idx]->getAccuracyInfo(info, gpt))
-      {
-         return true;
-      }
-   }
-
-   return false;
-}
-
-bool ossimElevManager::saveState(ossimKeywordlist& kwl,
-                                 const char* prefix) const
-{
-   return ossimElevSource::saveState(kwl, prefix);
-}
-
-/**
- * Method to the load (recreate) the state of an object from a keyword
- * list.  Return true if ok or false on error.
- */
-bool ossimElevManager::loadState(const ossimKeywordlist& kwl,
-                                 const char* prefix)
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-      << "DEBUG ossimElevManager::loadState: Entered..."
-      << std::endl;
-   }
-   if(!ossimElevSource::loadState(kwl, prefix))
-   {
-      return false;
-   }
-   ossimString copyPrefix(prefix);
-   ossimString elevationOffset = kwl.find(copyPrefix, "elevation_offset");
-   ossimString defaultHeightAboveEllipsoid = kwl.find(copyPrefix, "default_height_above_ellipsoid");
-   ossimString useGeoidIfNull = kwl.find(copyPrefix, "use_geoid_if_null");
-
-   if(!elevationOffset.empty())
-   {
-      m_elevationOffset = elevationOffset.toDouble();
-   }
-   if(!defaultHeightAboveEllipsoid.empty())
-   {
-      m_defaultHeightAboveEllipsoid = defaultHeightAboveEllipsoid.toDouble();
-   }
-   if(!useGeoidIfNull.empty())
-   {
-      m_useGeoidIfNullFlag = useGeoidIfNull.toBool();
-   }
-   ossimString regExpression =  ossimString("^(") + copyPrefix + "elevation_source[0-9]+.)";
-   vector<ossimString> keys =
-   kwl.getSubstringKeyList( regExpression );
-   long numberOfSources = (long)keys.size();
-   ossim_uint32 offset = (ossim_uint32)(copyPrefix+"elevation_source").size();
-   ossim_uint32 idx = 0;
-   std::vector<int> theNumberList(numberOfSources);
-   for(idx = 0; idx < theNumberList.size();++idx)
-   {
-      ossimString numberStr(keys[idx].begin() + offset,
-                            keys[idx].end());
-      theNumberList[idx] = numberStr.toInt();
-   }
-   std::sort(theNumberList.begin(), theNumberList.end());
-   
-   for(idx=0;idx < theNumberList.size();++idx)
-   {
-      ossimString newPrefix = copyPrefix;
-      newPrefix += ossimString("elevation_source");
-      newPrefix += ossimString::toString(theNumberList[idx]);
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimElevManager::loadState:"
-         << "\nLooking for key:  " << newPrefix
-         << std::endl;
-      }
-      // first check if new way is supported
-      //
-      ossimRefPtr<ossimElevationDatabase> database = ossimElevationDatabaseRegistry::instance()->createDatabase(kwl, newPrefix+".");
-      if(database.valid())
-      {
-        if (traceDebug())
-        {
-           ossimNotify(ossimNotifyLevel_DEBUG)
-           << "DEBUG ossimElevManager::loadState:"
-           << "\nadding elevation database:  "
-           << database->getClassName()
-           << ": " << database->getConnectionString()
-           << std::endl;
-        }  
-        addDatabase(database.get());
-      }
-      else
-      {
-         // if not new elevation load verify the old way by
-         // looking at the filename
-         //
-         ossimString fileKey = newPrefix;
-         fileKey += ".";
-         fileKey += ossimKeywordNames::FILENAME_KW;
-         ossimString lookup = kwl.find(prefix, fileKey.c_str());
-         if (!lookup.empty())
-         {
-            loadElevationPath(ossimFilename(lookup));
-         } // end if lookup
-      }
-   } // end for loop
-   return true;
-}
-
-void ossimElevManager::addDatabase(ossimElevationDatabase* database)
-{
-   if(!database) return;
-   ossimRefPtr<ossimElevationDatabase> tempDb = database;
-  // OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_mutex);
-   if(std::find(m_elevationDatabaseList.begin(), 
-                m_elevationDatabaseList.end(),
-                database) == m_elevationDatabaseList.end())
-   {
-      m_elevationDatabaseList.push_back(database);
-   }
-}
-
diff --git a/src/ossim/elevation/ossimElevSource.cpp b/src/ossim/elevation/ossimElevSource.cpp
deleted file mode 100644
index 875ff9b..0000000
--- a/src/ossim/elevation/ossimElevSource.cpp
+++ /dev/null
@@ -1,279 +0,0 @@
-//*****************************************************************************
-// FILE: ossimElevSource.cc
-//
-// License:  See top level LICENSE.txt file.
-//
-// DESCRIPTION:
-//   Contains implementation of class ossimElevSource. This is the base class
-//   for all sources of elevation data. it maintains a single common static
-//   instance of the geoid for use by all instances of objects derived from
-//   this one. 
-//
-// SOFTWARE HISTORY:
-//>
-//   18Apr2001  Oscar Kramer
-//              Initial coding.
-//<
-//*****************************************************************************
-// $Id: ossimElevSource.cpp 21380 2012-07-25 13:18:31Z gpotts $
-
-#include <ossim/elevation/ossimElevSource.h>
-#include <ossim/base/ossimPreferences.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimEcefRay.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimEllipsoid.h>
-#include <ossim/base/ossimNotifyContext.h>
-
-RTTI_DEF1(ossimElevSource, "ossimElevSource" , ossimSource)
-
-//***
-// Define Trace flags for use within this file:
-//***
-#include <ossim/base/ossimTrace.h>
-static ossimTrace traceExec  ("ossimElevSource:exec");
-static ossimTrace traceDebug ("ossimElevSource:debug");
-
-
-static const char ENABLE_STATS_KW[] = "elevation.compute_statistics.enabled";
-
-ossimElevSource::ossimElevSource()
-   :
-      theMinHeightAboveMSL (0.0),
-      theMaxHeightAboveMSL (0.0),
-      theNullHeightValue   (ossim::nan()),
-      theSeaLevelValue     (OSSIM_DEFAULT_MEAN_SEA_LEVEL),
-      theGroundRect(),
-      theComputeStatsFlag(false)
-   
-{
-   if (traceExec())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimElevSource::ossimElevSource: entering..."
-         << std::endl;
-   }
-   
-   // User can turn on off with a keyword.
-   const char* lookup =
-      ossimPreferences::instance()->findPreference(ENABLE_STATS_KW);
-   if (lookup)
-   {
-     theComputeStatsFlag = ossimString(lookup).toBool();
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG:"
-         << "\ntheComputeStatsFlag:  "
-         << (theComputeStatsFlag?"true":"false")
-         << endl;
-   }
-
-
-   if (traceExec())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimElevSource::ossimElevSource: returning..."
-         << std::endl;
-   }
-}
-
-ossimElevSource::ossimElevSource(const ossimElevSource& src)
-   :ossimSource(src),
-    theMinHeightAboveMSL(src.theMinHeightAboveMSL),
-    theMaxHeightAboveMSL(src.theMaxHeightAboveMSL),
-    theNullHeightValue(src.theNullHeightValue),
-    theSeaLevelValue(src.theSeaLevelValue),
-    theGroundRect(src.theGroundRect),
-    theComputeStatsFlag(src.theComputeStatsFlag)
-{
-}
-
-ossimElevSource::~ossimElevSource()
-{}
-
-const ossimElevSource& ossimElevSource::operator = (const ossimElevSource& src)
-{
-   if (this != &src)
-   {
-      theMinHeightAboveMSL = src.theMinHeightAboveMSL;
-      theMaxHeightAboveMSL = src.theMaxHeightAboveMSL;
-      theNullHeightValue   = src.theNullHeightValue;
-      theSeaLevelValue     = src.theSeaLevelValue;
-      theGroundRect        = src.theGroundRect;
-      theComputeStatsFlag  = src.theComputeStatsFlag;
-      
-      ossimSource::operator=(src);
-   }
-   return *this;
-}
-
-double ossimElevSource::getHeightAboveEllipsoid(const ossimGpt& /* argGpt */)
-{
-   ossimNotify(ossimNotifyLevel_FATAL)
-      << "FATAL ossimElevSource::getHeightAboveEllipsoid Not implemented..."
-      << std::endl;
-   return theNullHeightValue;
-}
-
-//*****************************************************************************
-//  METHOD: intersectRay()
-//  
-//  Service method for intersecting a ray with the elevation surface to
-//  arrive at a ground point. The ray is expected to originate ABOVE the
-//  surface and pointing down.
-//
-//  NOTE: the gpt argument is expected to be initialized with the desired
-//  datum, including ellipsoid, for the proper intersection point to be
-//  computed.
-//
-//  LIMITATION: This release supports only single valued solutions, i.e., it
-//  is possible a ray passing through one side of a mountain and out the other
-//  will return an intersection with the far side. Eventually, a more robust
-//  algorithm will be employed.
-//
-//*****************************************************************************
-bool ossimElevSource::intersectRay(const ossimEcefRay& ray, ossimGpt& gpt, double defaultElevValue)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimElevSource::intersectRay: entering..." << std::endl;
-
-   static const double CONVERGENCE_THRESHOLD = 0.001; // meters
-   static const int    MAX_NUM_ITERATIONS    = 50;
-   
-   double          h_ellips; // height above ellipsoid
-   bool            intersected;
-   ossimEcefPoint  prev_intersect_pt (ray.origin());
-   ossimEcefPoint  new_intersect_pt;
-   double          distance;
-   bool            done = false;
-   int             iteration_count = 0;
-
-   if(ray.hasNans()) 
-   {
-      gpt.makeNan();
-      return false;
-   }
-   //***
-   // Set the initial guess for horizontal intersect position as the ray's
-   // origin, and establish the datum and ellipsoid:
-   //***
-   const ossimDatum*     datum     = gpt.datum();
-   const ossimEllipsoid* ellipsoid = datum->ellipsoid();
-//    double lat, lon, h;
-
-//    ellipsoid->XYZToLatLonHeight(ray.origin().x(),
-//                                 ray.origin().y(),
-//                                 ray.origin().z(),
-//                                 lat, lon, h);
-//    ossimGpt nadirGpt(lat, lon, h);
-
-//    std::cout << "nadir pt = " << nadirGpt << std::endl;
-   
-   gpt = ossimGpt(prev_intersect_pt, datum);
-
-   //
-   // Loop to iterate on ray intersection with variable elevation surface:
-   //
-   do
-   {
-      //
-      // Intersect ray with ellipsoid inflated by h_ellips:
-      //
-      h_ellips = getHeightAboveEllipsoid(gpt);
-      if ( ossim::isnan(h_ellips) ) h_ellips = defaultElevValue;
-      
-      intersected = ellipsoid->nearestIntersection(ray,
-                                                   h_ellips,
-                                                   new_intersect_pt);
-      if (!intersected)
-      {
-         //
-         // No intersection (looking over the horizon), so set ground point
-         // to NaNs:
-         //
-         gpt.makeNan();
-         done = true;
-      }
-      else
-      {
-         //
-         // Assign the ground point to the latest iteration's intersection
-         // point:
-         //
-         gpt = ossimGpt(new_intersect_pt, datum);
-         
-         //
-         // Determine if convergence achieved:
-         //
-         distance = (new_intersect_pt - prev_intersect_pt).magnitude();
-         if (distance < CONVERGENCE_THRESHOLD)
-            done = true;
-         else
-         {
-            prev_intersect_pt = new_intersect_pt;
-         }
-      }
-
-      iteration_count++;
-
-   } while ((!done) && (iteration_count < MAX_NUM_ITERATIONS));
-
-   if (iteration_count == MAX_NUM_ITERATIONS)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimElevSource::intersectRay: Max number of iterations reached solving for ground "
-                                            << "point. Result is probably inaccurate." << std::endl;
-      }
-   }
-   
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimElevSource::intersectRay: returning..." << std::endl;
-   return intersected;
-}
-
-double ossimElevSource::getMinHeightAboveMSL() const
-{
-   return theMinHeightAboveMSL;
-}
-
-double ossimElevSource::getMaxHeightAboveMSL() const
-{
-   return theMaxHeightAboveMSL;
-}
-
-double ossimElevSource::getNullHeightValue() const
-{
-   return theNullHeightValue;
-}
-
-double ossimElevSource::getSeaLevelValue() const
-{
-   return theSeaLevelValue;
-}
-
-const ossimGrect& ossimElevSource::getBoundingGndRect() const
-{
-   return theGroundRect;
-}
-
-bool ossimElevSource::canConnectMyInputTo(ossim_int32 /* inputIndex */,
-                                          const ossimConnectableObject* /* object */)const
-{
-   return false;
-}
-
-void ossimElevSource::initialize()
-{}
-
-
-bool ossimElevSource::getComputeStatisticsFlag() const
-{
-   return theComputeStatsFlag;
-}
-
-void ossimElevSource::setComputeStatisticsFlag(bool flag)
-{
-   theComputeStatsFlag = flag;
-}
diff --git a/src/ossim/elevation/ossimElevSourceFactory.cpp b/src/ossim/elevation/ossimElevSourceFactory.cpp
deleted file mode 100644
index 62d7369..0000000
--- a/src/ossim/elevation/ossimElevSourceFactory.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-//----------------------------------------------------------------------------
-// FILE: ossimElevSourceFactory.cc
-//
-// Copyright (C) 2002 ImageLinks, Inc.
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Class definition for ossimElevSourceFactory.
-//
-// This is the base class interface for elevation source factories.  Contains
-// pure virtual methods that all elevation source factories must implement.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimElevSourceFactory.cpp 9094 2006-06-13 19:12:40Z dburken $
-
-#include <ossim/elevation/ossimElevSourceFactory.h>
-
-RTTI_DEF1(ossimElevSourceFactory, "ossimElevSourceFactory" , ossimObject)
-
-ossimElevSourceFactory::ossimElevSourceFactory()
-   : theDirectory(ossimFilename::NIL)
-{
-}
-
-ossimElevSourceFactory::~ossimElevSourceFactory()
-{
-}
-
-ossimFilename ossimElevSourceFactory::getDirectory() const
-{
-   return theDirectory;
-}
-
-void ossimElevSourceFactory::setDirectory(const ossimFilename& directory)
-{
-   theDirectory = directory;
-}
diff --git a/src/ossim/elevation/ossimElevationDatabase.cpp b/src/ossim/elevation/ossimElevationDatabase.cpp
deleted file mode 100644
index 46c9f79..0000000
--- a/src/ossim/elevation/ossimElevationDatabase.cpp
+++ /dev/null
@@ -1,169 +0,0 @@
-#include <ossim/elevation/ossimElevationDatabase.h>
-
-RTTI_DEF1(ossimElevationDatabase, "ossimElevationDatabase", ossimObject);
-RTTI_DEF1(ossimElevationCellDatabase, "ossimElevationCellDatabase", ossimElevationDatabase);
-
-const ossimElevationDatabase& ossimElevationDatabase::operator=(const ossimElevationDatabase& rhs)
-{
-   if ( this != &rhs )
-   {
-      ossimElevSource::operator=(rhs);
-      m_connectionString = rhs.m_connectionString;
-      m_geoid            = rhs.m_geoid;
-      m_meanSpacing      = rhs.m_meanSpacing;
-   }
-   return *this;
-}
-
-double ossimElevationDatabase::getOffsetFromEllipsoid(const ossimGpt& gpt)const
-{
-   double result = 0.0;
-   if(m_geoid.valid())
-   {
-      result = m_geoid->offsetFromEllipsoid(gpt);
-   }
-   else 
-   {
-      result = ossimGeoidManager::instance()->offsetFromEllipsoid(gpt);
-   }
-   
-   if(ossim::isnan(result))
-   {
-      result = 0.0;
-   }
-   
-   return result;
-}
-
-bool ossimElevationDatabase::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   m_connectionString = kwl.find(prefix, "connection_string");
-   ossimString minOpenCells = kwl.find(prefix, "min_open_cells");
-   ossimString maxOpenCells = kwl.find(prefix, "max_open_cells");
-   ossimString geoidType    = kwl.find(prefix, "geoid.type");
-   if(m_connectionString.empty())
-   {
-      // try backward compatability to a filename
-      //
-      m_connectionString = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
-   }
-   if(!geoidType.empty())
-   {
-      m_geoid = ossimGeoidManager::instance()->findGeoidByShortName(geoidType);
-   }
-   return ossimObject::loadState(kwl, prefix);
-}
-
-bool ossimElevationDatabase::saveState(ossimKeywordlist& kwl, const char* prefix)const
-{
-   kwl.add(prefix, "connection_string", m_connectionString, true);
-   
-   if(m_geoid.valid())
-   {
-      kwl.add(prefix, "geoid.type", m_geoid->getShortName(), true);
-   }
-   
-   return ossimObject::saveState(kwl, prefix);
-}
-
-const ossimElevationCellDatabase& ossimElevationCellDatabase::operator=(
-   const ossimElevationCellDatabase& rhs)
-{
-   if ( this != &rhs )
-   {
-      ossimElevationDatabase::operator=(rhs);
-      m_minOpenCells       = rhs.m_minOpenCells;
-      m_maxOpenCells       = rhs.m_maxOpenCells;
-      m_cacheMap           = rhs.m_cacheMap;
-      m_memoryMapCellsFlag = rhs.m_memoryMapCellsFlag;
-   }
-   return *this;
-}
-
-void ossimElevationCellDatabase::getOpenCellList(std::vector<ossimFilename>& list) const
-{
-   CellMap::const_iterator iter = m_cacheMap.begin();
-
-   while(iter!=m_cacheMap.end())
-   {
-      list.push_back(iter->second->m_handler->getFilename());
-      ++iter;
-   }
-
-}
-
-ossimRefPtr<ossimElevCellHandler> ossimElevationCellDatabase::getOrCreateCellHandler(const ossimGpt& gpt)
-{
-  ossimRefPtr<ossimElevCellHandler> result = 0;
-  ossim_uint64 id = createId(gpt);
-  
-  {
-    OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_cacheMapMutex);
-    CellMap::iterator iter = m_cacheMap.find(id);
-    if(iter != m_cacheMap.end())
-    {
-      iter->second->updateTimestamp();
-      result = iter->second->m_handler.get();
-      
-      return result.get();
-    }
-  }
-  
-  result = createCell(gpt);
-  
-  {
-    OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_cacheMapMutex);
-    if(result.valid())
-    {
-      m_cacheMap.insert(std::make_pair(id, new CellInfo(id, result.get())));
-
-      // Check the map size and purge cells if needed.
-      if(m_cacheMap.size() > m_maxOpenCells)
-      {
-         flushCacheToMinOpenCells();
-      }
-    }
-  }
-
-  return result;
-}
-
-bool ossimElevationCellDatabase::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   ossimString minOpenCells = kwl.find(prefix, "min_open_cells");
-   ossimString maxOpenCells = kwl.find(prefix, "max_open_cells");
-   ossimString geoidType    = kwl.find(prefix, "geoid.type");
-   if(!minOpenCells.empty()&&
-      !maxOpenCells.empty())
-   {
-      m_minOpenCells = minOpenCells.toUInt32();
-      m_maxOpenCells = maxOpenCells.toUInt32();
-      if(m_maxOpenCells < m_minOpenCells)
-      {
-         std::swap(m_minOpenCells, m_maxOpenCells);
-      }
-   }
-   ossimString memoryMapCellsFlag = kwl.find(prefix, "memory_map_cells");
-   if(!memoryMapCellsFlag.empty())
-   {
-      m_memoryMapCellsFlag  = memoryMapCellsFlag.toBool();
-   }
-   return ossimElevationDatabase::loadState(kwl, prefix);
-}
-
-bool ossimElevationCellDatabase::saveState(ossimKeywordlist& kwl, const char* prefix)const
-{
-   kwl.add(prefix, "memory_map_cells", m_memoryMapCellsFlag, true);
-   kwl.add(prefix, "min_open_cells", m_minOpenCells, true);
-   kwl.add(prefix, "max_open_cells", m_maxOpenCells, true);
-
-   if(m_geoid.valid())
-   {
-      kwl.add(prefix, "geoid.type", m_geoid->getShortName(), true);
-   }
-
-   return ossimElevationDatabase::saveState(kwl, prefix);
-}
-
-
-
diff --git a/src/ossim/elevation/ossimElevationDatabaseFactory.cpp b/src/ossim/elevation/ossimElevationDatabaseFactory.cpp
deleted file mode 100644
index da031cc..0000000
--- a/src/ossim/elevation/ossimElevationDatabaseFactory.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-#include <ossim/elevation/ossimElevationDatabaseFactory.h>
-#include <ossim/elevation/ossimDtedElevationDatabase.h>
-#include <ossim/elevation/ossimSrtmElevationDatabase.h>
-#include <ossim/elevation/ossimGeneralRasterElevationDatabase.h>
-#include <ossim/elevation/ossimImageElevationDatabase.h>
-#include <ossim/base/ossimKeywordNames.h>
-
-ossimElevationDatabaseFactory* ossimElevationDatabaseFactory::m_instance = 0;
-ossimElevationDatabaseFactory* ossimElevationDatabaseFactory::instance()
-{
-   if(!m_instance)
-   {
-      m_instance = new ossimElevationDatabaseFactory();
-   }
-   
-   return m_instance;
-}
-
-ossimElevationDatabase* ossimElevationDatabaseFactory::createDatabase(const ossimString& typeName)const
-{
-   if((typeName == STATIC_TYPE_NAME(ossimDtedElevationDatabase)) ||
-      (typeName == "dted")||
-      (typeName == "dted_directory"))
-      
-   {
-      return new ossimDtedElevationDatabase();
-   }
-   else if((typeName == STATIC_TYPE_NAME(ossimSrtmElevationDatabase)) ||
-           (typeName == "srtm")||
-           (typeName == "srtm_directory"))
-      
-   {
-      return new ossimSrtmElevationDatabase();
-   }
-   else if((typeName == STATIC_TYPE_NAME(ossimGeneralRasterElevationDatabase)) ||
-           (typeName == "general_raster")||
-           (typeName == "general_raster_directory"))
-      
-   {
-      return new ossimGeneralRasterElevationDatabase();
-   }
-   else if( (typeName == "ossimImageElevationDatabase") ||
-            (typeName == "image")||
-            (typeName == "image_directory"))
-      
-   {
-      return new ossimImageElevationDatabase();
-   }
-   
-   return 0;
-}
-
-ossimElevationDatabase* ossimElevationDatabaseFactory::createDatabase(const ossimKeywordlist& kwl,
-                                                                      const char* prefix)const
-{
-   ossimRefPtr<ossimElevationDatabase> result = 0;
-   ossimString type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
-   if(!type.empty())
-   {
-      result = createDatabase(type);
-      if(result.valid())
-      {
-         if(!result->loadState(kwl, prefix))
-         {
-            result = 0;
-         }
-      }
-   }
-   
-   return result.release();
-}
-
-ossimElevationDatabase* ossimElevationDatabaseFactory::open(const ossimString& connectionString)const
-{
-   ossimRefPtr<ossimElevationDatabase> result = new ossimDtedElevationDatabase();
-   if(!result->open(connectionString))
-   {
-      result = new ossimSrtmElevationDatabase;
-      if(!result->open(connectionString))
-      {
-         result = new ossimGeneralRasterElevationDatabase;
-         if(!result->open(connectionString))
-         {
-            result = 0;
-         }
-         
-#if 0         
-         //---
-         // Commented out as the ossimImageElevationDatabase can load any type and the
-         // elevation manager is passing in elevation. This stops it opening your entire
-         // elevation directory if you happen to start you application where there is an
-         // elevation directory in there. Note you can still explicitly declare a
-         // "image_directory in your preferences.  drb - 20110509
-         //---
-         if(!result->open(connectionString))
-         {
-            result = new ossimImageElevationDatabase;
-            if(!result->open(connectionString))
-            {
-               result = 0;
-            }
-         }
-#endif
-      }
-   }
-   return result.release();
-}
-
-void ossimElevationDatabaseFactory::getTypeNameList(std::vector<ossimString>& typeList)const
-{
-   typeList.push_back(STATIC_TYPE_NAME(ossimDtedElevationDatabase));
-   typeList.push_back(STATIC_TYPE_NAME(ossimSrtmElevationDatabase));
-   typeList.push_back(STATIC_TYPE_NAME(ossimGeneralRasterElevationDatabase));
-   typeList.push_back(STATIC_TYPE_NAME(ossimImageElevationDatabase));
-}
diff --git a/src/ossim/elevation/ossimElevationDatabaseRegistry.cpp b/src/ossim/elevation/ossimElevationDatabaseRegistry.cpp
deleted file mode 100644
index 3581cb1..0000000
--- a/src/ossim/elevation/ossimElevationDatabaseRegistry.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-#include <ossim/elevation/ossimElevationDatabaseRegistry.h>
-#include <ossim/elevation/ossimElevationDatabaseFactory.h>
-
-ossimElevationDatabaseRegistry* ossimElevationDatabaseRegistry::m_instance = 0;
-ossimElevationDatabaseRegistry* ossimElevationDatabaseRegistry::instance()
-{
-   if(!m_instance)
-   {
-      m_instance = new ossimElevationDatabaseRegistry;
-      
-      m_instance->registerFactory(ossimElevationDatabaseFactory::instance());
-   }
-   
-   return m_instance;
-}
-
-ossimElevationDatabase* ossimElevationDatabaseRegistry::createDatabase(const ossimString& typeName)const
-{
-   ossimElevationDatabase* result = 0;
-   ossim_uint32 idx = 0;
-   for(;((idx < m_factoryList.size())&&!result); ++idx)
-   {
-      result = m_factoryList[idx]->createDatabase(typeName);
-   }
-   
-   return result;
-   
-}
-ossimElevationDatabase* ossimElevationDatabaseRegistry::createDatabase(const ossimKeywordlist& kwl,
-                                                                       const char* prefix)const
-{
-   ossimElevationDatabase* result = 0;
-   ossim_uint32 idx = 0;
-   for(;((idx < m_factoryList.size())&&!result); ++idx)
-   {
-      result = m_factoryList[idx]->createDatabase(kwl, prefix);
-   }
-   
-   return result;
-}
-
-ossimElevationDatabase* ossimElevationDatabaseRegistry::open(const ossimString& connectionString)
-{
-   ossimElevationDatabase* result = 0;
-   ossim_uint32 idx = 0;
-   for(;((idx < m_factoryList.size())&&!result); ++idx)
-   {
-      result = m_factoryList[idx]->open(connectionString);
-   }
-   
-   return result;
-}
-
diff --git a/src/ossim/elevation/ossimGeneralRasterElevHandler.cpp b/src/ossim/elevation/ossimGeneralRasterElevHandler.cpp
deleted file mode 100644
index 7ad8867..0000000
--- a/src/ossim/elevation/ossimGeneralRasterElevHandler.cpp
+++ /dev/null
@@ -1,737 +0,0 @@
-#include <ossim/elevation/ossimGeneralRasterElevHandler.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimStreamFactoryRegistry.h>
-#include <ossim/base/ossimDirectory.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimUnitTypeLut.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimImageViewTransform.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimGpt.h>
-#include <OpenThreads/ScopedLock>
-
-RTTI_DEF1(ossimGeneralRasterElevHandler, "ossimGeneralRasterElevHandler", ossimElevCellHandler);
-
-ossimGeneralRasterElevHandler::ossimGeneralRasterElevHandler(const ossimFilename& file)
-   :ossimElevCellHandler(file.c_str()),
-    m_streamOpen(false)
-{
-   if(!open(file))
-   {
-      setErrorStatus();
-   }
-}
-
-ossimGeneralRasterElevHandler::ossimGeneralRasterElevHandler(const ossimGeneralRasterElevHandler& src)
-   :ossimElevCellHandler(src),
-    theGeneralRasterInfo(src.theGeneralRasterInfo),
-    m_streamOpen(false), // ????
-    m_memoryMap(src.m_memoryMap)
-{
-}
-
-ossimGeneralRasterElevHandler::ossimGeneralRasterElevHandler(const ossimGeneralRasterElevHandler::GeneralRasterInfo& generalRasterInfo)
-   : m_streamOpen(false)
-{
-
-   close();
-   theGeneralRasterInfo = generalRasterInfo;
-   if(!open(theGeneralRasterInfo.theFilename))
-   {
-      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-   }
-}
-
-ossimObject* ossimGeneralRasterElevHandler::dup()const
-{
-   return new ossimGeneralRasterElevHandler(*this);
-}
-
-const ossimGeneralRasterElevHandler& ossimGeneralRasterElevHandler::operator=(const ossimGeneralRasterElevHandler& src)
-{
-   ossimElevCellHandler::operator=(*(const ossimElevCellHandler*)&src);
-
-   return *this;
-}
-
-ossimGeneralRasterElevHandler::~ossimGeneralRasterElevHandler()
-{
-}
-
-double ossimGeneralRasterElevHandler::getHeightAboveMSL(const ossimGpt& gpt)
-{
-   ossim_float64 result = theGeneralRasterInfo.theNullHeightValue;
-
-   if(m_memoryMap.empty())
-   {
-      switch(theGeneralRasterInfo.theScalarType)
-      {
-         case OSSIM_SINT8:
-         {
-            result = getHeightAboveMSLFileTemplate((ossim_sint8)0,
-                                                   theGeneralRasterInfo,
-                                                   gpt);
-            break;
-         }
-         case OSSIM_UINT8:
-         {
-            result = getHeightAboveMSLFileTemplate((ossim_uint8)0,
-                                                   theGeneralRasterInfo,
-                                                   gpt);
-            break;
-         }
-         case OSSIM_SINT16:
-         {
-            result = getHeightAboveMSLFileTemplate((ossim_sint16)0,
-                                                   theGeneralRasterInfo,
-                                                   gpt);
-            break;
-         }
-         case OSSIM_UINT16:
-         {
-            result = getHeightAboveMSLFileTemplate((ossim_uint16)0,
-                                                   theGeneralRasterInfo,
-                                                   gpt);
-            break;
-         }
-         case OSSIM_SINT32:
-         {
-            result = getHeightAboveMSLFileTemplate((ossim_sint32)0,
-                                                   theGeneralRasterInfo,
-                                                   gpt);
-            break;
-         }
-         case OSSIM_UINT32:
-         {
-            result = getHeightAboveMSLFileTemplate((ossim_uint32)0,
-                                                   theGeneralRasterInfo,
-                                                   gpt);
-            break;
-         }
-         case OSSIM_FLOAT32:
-         {
-            result =  getHeightAboveMSLFileTemplate((ossim_float32)0,
-                                                    theGeneralRasterInfo,
-                                                    gpt);
-            break;
-         }
-         case OSSIM_FLOAT64:
-         {
-            result = getHeightAboveMSLFileTemplate((ossim_float64)0,
-                                                   theGeneralRasterInfo,
-                                                   gpt);
-            break;
-         }
-         default:
-         {
-            break;
-         }
-      }
-   }
-   else
-   {
-      switch(theGeneralRasterInfo.theScalarType)
-      {
-         case OSSIM_SINT8:
-         {
-            result = getHeightAboveMSLMemoryTemplate((ossim_sint8)0,
-                                                   theGeneralRasterInfo,
-                                                   gpt);
-            break;
-         }
-         case OSSIM_UINT8:
-         {
-            result = getHeightAboveMSLMemoryTemplate((ossim_uint8)0,
-                                                   theGeneralRasterInfo,
-                                                   gpt);
-            break;
-         }
-         case OSSIM_SINT16:
-         {
-            result = getHeightAboveMSLMemoryTemplate((ossim_sint16)0,
-                                                   theGeneralRasterInfo,
-                                                   gpt);
-            break;
-         }
-         case OSSIM_UINT16:
-         {
-            result = getHeightAboveMSLMemoryTemplate((ossim_uint16)0,
-                                                   theGeneralRasterInfo,
-                                                   gpt);
-            break;
-         }
-         case OSSIM_SINT32:
-         {
-            result = getHeightAboveMSLMemoryTemplate((ossim_sint32)0,
-                                                   theGeneralRasterInfo,
-                                                   gpt);
-            break;
-         }
-         case OSSIM_UINT32:
-         {
-            result = getHeightAboveMSLMemoryTemplate((ossim_uint32)0,
-                                                   theGeneralRasterInfo,
-                                                   gpt);
-            break;
-         }
-         case OSSIM_FLOAT32:
-         {
-            result =  getHeightAboveMSLMemoryTemplate((ossim_float32)0,
-                                                    theGeneralRasterInfo,
-                                                    gpt);
-            break;
-         }
-         case OSSIM_FLOAT64:
-         {
-            result = getHeightAboveMSLMemoryTemplate((ossim_float64)0,
-                                                   theGeneralRasterInfo,
-                                                   gpt);
-            break;
-         }
-         default:
-         {
-            break;
-         }
-      }
-      
-   }
-
-   return result;
-}
-
-ossimIpt ossimGeneralRasterElevHandler::getSizeOfElevCell() const
-{
-   return ossimIpt(theGeneralRasterInfo.theWidth, theGeneralRasterInfo.theHeight);
-}
-   
-double ossimGeneralRasterElevHandler::getPostValue(const ossimIpt& /* gridPt */) const
-{
-   ossimNotify(ossimNotifyLevel_WARN)
-      << "ossimGeneralRasterElevHandler::getPostValue(const ossimIpt& gridPt):  NEED TO IMPLEMENT TO NEW INTERFACE\n";
-   return ossim::nan();
-}
-
-bool ossimGeneralRasterElevHandler::isOpen()const
-{
-   if(!m_memoryMap.empty()) return true;
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_inputStreamMutex);
-
-   //---
-   // Change to use flag as is_open is non-const on some old compilers.
-   return m_streamOpen;
-   // return (m_inputStream.is_open());
-}
-
-bool ossimGeneralRasterElevHandler::open(const ossimFilename& file, bool memoryMapFlag)
-{
-   close();
-   if(!setFilename(file)) return false;
-   m_inputStream.clear();
-   m_inputStream.open(theGeneralRasterInfo.theFilename.c_str(), ios::in | ios::binary);
-
-   if(memoryMapFlag)
-   {
-      if(!m_inputStream.bad())
-      {
-         m_memoryMap.resize(theGeneralRasterInfo.theFilename.fileSize());
-         if(!m_memoryMap.empty())
-         {
-           m_inputStream.read((char*)(&m_memoryMap.front()), (streamsize)m_memoryMap.size());
-         }
-      }
-      m_inputStream.close();
-   }
-
-   // Capture the stream state for non-const is_open on old compiler.
-   m_streamOpen = m_inputStream.is_open();
-   
-   return m_streamOpen;
-}
-
-/**
- * Closes the stream to the file.
- */
-void ossimGeneralRasterElevHandler::close()
-{
-   m_inputStream.close();
-   m_memoryMap.clear();
-   m_streamOpen = false;
-}
-
-bool ossimGeneralRasterElevHandler::setFilename(const ossimFilename& file)
-{
-   if(file.trim() == "")
-   {
-      return false;
-   }
-   theFilename = file;
-   ossimFilename hdrFile  = file;
-   ossimFilename geomFile = file;
-   theGeneralRasterInfo.theFilename = file;
-   theGeneralRasterInfo.theWidth = 0;
-   theGeneralRasterInfo.theHeight = 0;
-   theNullHeightValue = ossim::nan();
-   hdrFile = hdrFile.setExtension("omd");
-   geomFile = geomFile.setExtension("geom");
-
-   if(!hdrFile.exists()||
-      !geomFile.exists())
-   {
-      return false;
-   }
-   ossimKeywordlist kwl(hdrFile);
-   if (kwl.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
-   {
-      return false;
-   }
-   
-   kwl.add(ossimKeywordNames::FILENAME_KW, file.c_str(), true);
-   ossimGeneralRasterInfo generalInfo;
-   
-   if(!generalInfo.loadState(kwl))
-   {
-      return false;
-   }
-   if(generalInfo.numberOfBands() != 1)
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "ossimGeneralRasterElevHandler::initializeInfo WARNING:The number of bands are not specified in the header file" << std::endl;
-      return false;
-   }
-
-   kwl.clear();
-   if(kwl.addFile(geomFile))
-   {
-      theGeneralRasterInfo.theNullHeightValue = generalInfo.getImageMetaData().getNullPix(0);
-      theGeneralRasterInfo.theImageRect       = generalInfo.imageRect();
-      theGeneralRasterInfo.theUl              = theGeneralRasterInfo.theImageRect.ul();
-      theGeneralRasterInfo.theLr              = theGeneralRasterInfo.theImageRect.lr();
-      theGeneralRasterInfo.theWidth           = theGeneralRasterInfo.theImageRect.width();
-      theGeneralRasterInfo.theHeight          = theGeneralRasterInfo.theImageRect.height();
-      theGeneralRasterInfo.theImageRect       = generalInfo.imageRect();
-      theGeneralRasterInfo.theByteOrder       = generalInfo.getImageDataByteOrder();
-      theGeneralRasterInfo.theScalarType      = generalInfo.getImageMetaData().getScalarType();
-      theGeneralRasterInfo.theBytesPerRawLine = generalInfo.bytesPerRawLine();
-
-      //add  by simbla
-
-      // ---
-      // Try to determine if there is a prefix like "image0." or not.
-      // ---
-      std::string prefix = "";
-      if ( kwl.find("image0.type") )
-      {
-         prefix = "image0.";
-      }
-      
-      theGeneralRasterInfo.theGeometry = new ossimImageGeometry;
-      if(!theGeneralRasterInfo.theGeometry->loadState( kwl, prefix.c_str() ))
-      {
-         theGeneralRasterInfo.theGeometry = 0;
-      }
-      
-      if(!theGeneralRasterInfo.theGeometry.valid())
-      {
-         return false;
-      }
-      ossimGpt defaultDatum;
-      ossimGpt ulGpt;
-      ossimGpt urGpt;
-      ossimGpt lrGpt;
-      ossimGpt llGpt;
-      theGeneralRasterInfo.theDatum = defaultDatum.datum();
-      theGeneralRasterInfo.theGeometry->localToWorld(theGeneralRasterInfo.theImageRect.ul(), ulGpt);
-      theGeneralRasterInfo.theGeometry->localToWorld(theGeneralRasterInfo.theImageRect.ur(), urGpt);
-      theGeneralRasterInfo.theGeometry->localToWorld(theGeneralRasterInfo.theImageRect.lr(), lrGpt);
-      theGeneralRasterInfo.theGeometry->localToWorld(theGeneralRasterInfo.theImageRect.ll(), llGpt);
-      
-      ulGpt.changeDatum(theGeneralRasterInfo.theDatum);
-      urGpt.changeDatum(theGeneralRasterInfo.theDatum);
-      lrGpt.changeDatum(theGeneralRasterInfo.theDatum);
-      llGpt.changeDatum(theGeneralRasterInfo.theDatum);
-      theMeanSpacing = theGeneralRasterInfo.theGeometry->getMetersPerPixel().y;
-      theGroundRect = ossimGrect(ulGpt, urGpt, lrGpt, llGpt);
-      theGeneralRasterInfo.theWgs84GroundRect = ossimDrect(ulGpt, urGpt, lrGpt, llGpt, OSSIM_RIGHT_HANDED);
-      theNullHeightValue = theGeneralRasterInfo.theNullHeightValue;
-   }
-   else
-   {
-      return false;
-   }
-   
-   return true;
-}
-
-#if 0
-void ossimGeneralRasterElevHandler::initializeList(const ossimFilename& file)
-{
-   close();
-   theFilename = file;
-   theBoundingRectInfoList.clear();
-   if(theFilename.exists())
-   {
-      if(theFilename.isDir())
-      {
-         ossimDirectory dir(theFilename);
-
-         ossimFilename file;
-         ossim_uint32 maxCount = 10;
-         ossim_uint32 count = 0;
-         bool foundOne = false;
-         if(dir.getFirst(file))
-         {
-            do
-            {
-               ++count;
-               ossimString ext = file.ext();
-               ext = ext.downcase();
-               if(ext == "ras")
-               {
-                  ossimGeneralRasterElevHandler::BoundingRectInfo info;
-                  if(initializeInfo(info, file))
-                  {
-                     foundOne = true;
-                     addInfo(info);
-                  }
-               }
-            } while(dir.getNext(file) &&
-                   (!foundOne &&
-                    (count < maxCount)));
-         }
-#if 0
-         std::vector<ossimFilename> result;
-         
-         dir.findAllFilesThatMatch(result,
-                                   ".*\\.ras");
-      
-         if(result.size())
-         {
-            ossimGeneralRasterElevHandler::BoundingRectInfo info;
-            ossim_uint32 idx = 0;
-            for(idx = 0; idx < result.size(); ++idx)
-            {
-               if(initializeInfo(info, ossimFilename(result[idx])))
-               {
-                  addInfo(info);
-               }
-            }
-         }
-#endif
-         if(theBoundingRectInfoList.size()>0)
-         {
-            theNullHeightValue = theBoundingRectInfoList[0].theNullHeightValue;
-         }
-      }
-      else
-      {
-         ossimGeneralRasterElevHandler::BoundingRectInfo info;
-         if(initializeInfo(info, theFilename))
-         {
-            addInfo(info);
-         }
-      }
-   }
-}
-#endif
-template <class T>
-double ossimGeneralRasterElevHandler::getHeightAboveMSLFileTemplate(
-   T /* dummy */,
-   const ossimGeneralRasterElevHandler::GeneralRasterInfo& info,
-   const ossimGpt& gpt)
-{
-   ossimEndian endian;
-   
-   ossimGpt shiftedPoint = gpt;
-   shiftedPoint.changeDatum(info.theDatum);
-   if(!info.theWgs84GroundRect.pointWithin(shiftedPoint))
-   {
-      return ossim::nan();
-   }
-   
-   ossimDpt pt;
-   info.theGeometry->worldToLocal(shiftedPoint,pt);
-   double xi = pt.x;
-   double yi = pt.y;
-   
-   xi -= info.theUl.x;
-   yi -= info.theUl.y;
-   
-   //modifed by simbla  2008 7.17
-   //double xi = (shiftedPoint.lond() - info.theUlGpt.lond())/info.thePostSpacing.x;
-   //double yi = (info.theUlGpt.latd() -
-   //             shiftedPoint.latd())/info.thePostSpacing.y;
-   
-   
-   ossim_sint64 x0 = static_cast<ossim_sint64>(xi);
-   ossim_sint64 y0 = static_cast<ossim_sint64>(yi);
-   
-   double xt0 = xi - x0;
-   double yt0 = yi - y0;
-   double xt1 = 1-xt0;
-   double yt1 = 1-yt0;
-   
-   double w00 = xt1*yt1;
-   double w01 = xt0*yt1;
-   double w10 = xt1*yt0;
-   double w11 = xt0*yt0;
-   
-   
-   if ( xi < 0 || yi < 0 ||
-       x0 > (info.theWidth  - 1.0) ||
-       y0 > (info.theHeight  - 1.0) )
-   {
-      return ossim::nan();
-   }
-   
-   if(x0 == (info.theWidth  - 1.0))
-   {
-      --x0;
-   }
-   if(y0 == (info.theHeight  - 1.0))
-   {
-      --y0;
-   }
-   T p[4];
-   
-   ossim_uint64 bytesPerLine  = info.theBytesPerRawLine;
-   
-   std::streampos offset = y0*bytesPerLine + x0*sizeof(T);
-   
-   {
-      OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_inputStreamMutex);
-      if(m_inputStream.fail())
-      {
-         m_inputStream.clear();
-      }
-      m_inputStream.seekg(offset, ios::beg);
-      m_inputStream.read((char*)p, sizeof(T));
-      
-      // Get the second post.
-      m_inputStream.read((char*)(p+1), sizeof(T));
-      
-      //   offset += (bytesPerLine-2*sizeof(T));
-      
-      m_inputStream.ignore(bytesPerLine-2*sizeof(T));
-      // Get the third post.
-      m_inputStream.read((char*)(p+2), sizeof(T));
-      
-      // Get the fourth post.
-      m_inputStream.read((char*)(p+3), sizeof(T));
-      
-      if(m_inputStream.fail())
-      {
-         m_inputStream.clear();
-         return ossim::nan();
-      }
-   }
-   if(endian.getSystemEndianType() != info.theByteOrder)
-   {
-      endian.swap((T*)p, (ossim_uint32)4);
-   }
-   double p00 = p[0];
-   double p01 = p[1];
-   double p10 = p[2];
-   double p11 = p[3];
-   
-   if (p00 == info.theNullHeightValue)
-      w00 = 0.0;
-   if (p01 == info.theNullHeightValue)
-      w01 = 0.0;
-   if (p10 == info.theNullHeightValue)
-      w10 = 0.0;
-   if (p11 == info.theNullHeightValue)
-      w11 = 0.0;
-   
-#if 0 /* Serious debug only... */
-   cout << "\np00:  " << p00
-   << "\np01:  " << p01
-   << "\np10:  " << p10
-   << "\np11:  " << p11
-   << "\nw00:  " << w00
-   << "\nw01:  " << w01
-   << "\nw10:  " << w10
-   << "\nw11:  " << w11
-   << endl;
-#endif
-   
-   double sum_weights = w00 + w01 + w10 + w11;
-   
-   if (sum_weights)
-   {
-      return (p00*w00 + p01*w01 + p10*w10 + p11*w11) / sum_weights;
-   }
-   
-   return ossim::nan();
-}
-
-template <class T>
-double ossimGeneralRasterElevHandler::getHeightAboveMSLMemoryTemplate(
-   T /* dummy */,
-   const ossimGeneralRasterElevHandler::GeneralRasterInfo& info,
-   const ossimGpt& gpt)
-{
-   ossimEndian endian;
-   
-   ossimGpt shiftedPoint = gpt;
-   shiftedPoint.changeDatum(info.theDatum);
-   if(!info.theWgs84GroundRect.pointWithin(shiftedPoint))
-   {
-      return ossim::nan();
-   }
-   
-   ossimDpt pt;
-   info.theGeometry->worldToLocal(shiftedPoint,pt);
-   double xi = pt.x;
-   double yi = pt.y;
-   
-   xi -= info.theUl.x;
-   yi -= info.theUl.y;
-   
-   //modifed by simbla  2008 7.17
-   //double xi = (shiftedPoint.lond() - info.theUlGpt.lond())/info.thePostSpacing.x;
-   //double yi = (info.theUlGpt.latd() -
-   //             shiftedPoint.latd())/info.thePostSpacing.y;
-   
-   
-   ossim_sint64 x0 = static_cast<ossim_sint64>(xi);
-   ossim_sint64 y0 = static_cast<ossim_sint64>(yi);
-   
-   double xt0 = xi - x0;
-   double yt0 = yi - y0;
-   double xt1 = 1-xt0;
-   double yt1 = 1-yt0;
-   
-   double w00 = xt1*yt1;
-   double w01 = xt0*yt1;
-   double w10 = xt1*yt0;
-   double w11 = xt0*yt0;
-   if ( xi < 0 || yi < 0 ||
-       x0 > (info.theWidth  - 1.0) ||
-       y0 > (info.theHeight  - 1.0) )
-   {
-      return ossim::nan();
-   }
-   
-   if(x0 == (info.theWidth  - 1.0))
-   {
-      --x0;
-   }
-   if(y0 == (info.theHeight  - 1.0))
-   {
-      --y0;
-   }
-   ossim_uint64 bytesPerLine  = info.theBytesPerRawLine;
-   
-   ossim_uint64 offset = y0*bytesPerLine + x0*sizeof(T);
-   ossim_uint64 offset2 = offset+bytesPerLine;
-   
-   T v00 = *(reinterpret_cast<T*> (&m_memoryMap[offset]));
-   T v01 = *(reinterpret_cast<T*> (&m_memoryMap[offset + sizeof(T)]));
-   T v10 = *(reinterpret_cast<T*> (&m_memoryMap[offset2]));
-   T v11 = *(reinterpret_cast<T*> (&m_memoryMap[offset2 + sizeof(T)]));
-   if(endian.getSystemEndianType() != info.theByteOrder)
-   {
-      endian.swap(v00);
-      endian.swap(v01);
-      endian.swap(v10);
-      endian.swap(v11);
-   }
-   double p00 = v00;
-   double p01 = v01;
-   double p10 = v10;
-   double p11 = v11;
-   
-   if (p00 == info.theNullHeightValue)
-      w00 = 0.0;
-   if (p01 == info.theNullHeightValue)
-      w01 = 0.0;
-   if (p10 == info.theNullHeightValue)
-      w10 = 0.0;
-   if (p11 == info.theNullHeightValue)
-      w11 = 0.0;
-   
-#if 0 /* Serious debug only... */
-   cout << "\np00:  " << p00
-   << "\np01:  " << p01
-   << "\np10:  " << p10
-   << "\np11:  " << p11
-   << "\nw00:  " << w00
-   << "\nw01:  " << w01
-   << "\nw10:  " << w10
-   << "\nw11:  " << w11
-   << endl;
-#endif
-   
-   double sum_weights = w00 + w01 + w10 + w11;
-   
-   if (sum_weights)
-   {
-      return (p00*w00 + p01*w01 + p10*w10 + p11*w11) / sum_weights;
-   }
-   
-   return ossim::nan();
-}
-#if 0
-void ossimGeneralRasterElevHandler::addInfo(const ossimGeneralRasterElevHandler::BoundingRectInfo& info)
-{
-   if(theBoundingRectInfoList.empty())
-   {
-      theBoundingRectInfoList.push_back(info);
-      theNullHeightValue = info.theNullHeightValue;
-      theBoundingRect = info.theBounds;
-   }
-   else
-   {
-      BoundingRectListType::iterator iter = theBoundingRectInfoList.begin();
-      bool found = false;
-//       if(theNullHeightValue ==  info.theNullHeightValue)
-//       {
-      while((iter!=theBoundingRectInfoList.end())&&
-            (!found))
-      {
-         if(info.thePostSpacing.length() <= iter->thePostSpacing.length())
-         {
-            theBoundingRectInfoList.insert(iter, info);
-            theBoundingRect = theBoundingRect.combine(info.theBounds);
-            found = true;
-         }
-         else
-         {
-            ++iter;
-         }
-      }
-      if(!found)
-      {
-         theBoundingRectInfoList.push_back(info);
-      }
-   }
-}
-#endif
-ossimDrect ossimGeneralRasterElevHandler::getBoundingRect()const
-{
-   return theGeneralRasterInfo.theWgs84GroundRect;
-}
-
-bool ossimGeneralRasterElevHandler::pointHasCoverage(const ossimGpt& gpt) const
-{
-   ossimDpt pt = gpt;
-
-   return theGeneralRasterInfo.theWgs84GroundRect.pointWithin(pt);
-//    BoundingRectListType::const_iterator i = theBoundingRectInfoList.begin();
-//    while (i != theBoundingRectInfoList.end())
-//    {
-//       if ((*i).theBounds.pointWithin(pt))
-//       {
-//          return true;
-//       }
-//       ++i;
-//    }
-//    return false;
-}
-const ossimGeneralRasterElevHandler::GeneralRasterInfo& ossimGeneralRasterElevHandler::generalRasterInfo()const
-{
-   return theGeneralRasterInfo;
-}
diff --git a/src/ossim/elevation/ossimGeneralRasterElevationDatabase.cpp b/src/ossim/elevation/ossimGeneralRasterElevationDatabase.cpp
deleted file mode 100644
index 2b6bd79..0000000
--- a/src/ossim/elevation/ossimGeneralRasterElevationDatabase.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
-#include <ossim/elevation/ossimGeneralRasterElevationDatabase.h>
-#include <ossim/base/ossimGeoidManager.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimDirectory.h>
-#include <sstream>
-#include <iomanip>
-
-RTTI_DEF1(ossimGeneralRasterElevationDatabase, "ossimGeneralRasterElevationDatabase", ossimElevationCellDatabase);
-
-double ossimGeneralRasterElevationDatabase::getHeightAboveMSL(const ossimGpt& gpt)
-{
-   if(!isSourceEnabled()) return ossim::nan();
-   ossimRefPtr<ossimElevCellHandler> handler = getOrCreateCellHandler(gpt);
-
-   if(handler.valid())
-   {
-      return handler->getHeightAboveMSL(gpt); // still need to shift
-   }
-   return ossim::nan();
-}
-double ossimGeneralRasterElevationDatabase::getHeightAboveEllipsoid(const ossimGpt& gpt)
-{
-   double h = getHeightAboveMSL(gpt);
-   if(h != ossim::nan())
-   {
-      h += getOffsetFromEllipsoid(gpt);
-   }
-   
-   return h;
-}
-bool ossimGeneralRasterElevationDatabase::open(const ossimString& connectionString)
-{
-   bool result = false;
-   ossimFilename file = ossimFilename(connectionString);
-   m_connectionString = connectionString;
-   result = openGeneralRasterDirectory(file);
-   
-   return result;
-}
-
-bool ossimGeneralRasterElevationDatabase::openGeneralRasterDirectory(const ossimFilename& dir)
-{
-   m_cellHandler = new ossimGeneralRasterElevHandler;
-   bool foundOne = false;
-   
-   if(dir.exists())
-   {
-      if(dir.isDir())
-      {
-         ossimDirectory d(dir);
-         
-         ossimFilename file;
-         ossim_uint32 maxCount = 10; // search at least the first 10 files to see if there are any here
-         ossim_uint32 count = 0;
-         if(d.getFirst(file))
-         {
-            do
-            {
-               ++count;
-               ossimString ext = file.ext();
-               ext = ext.downcase();
-               if(ext == "ras")
-               {
-                  if(m_cellHandler->open(file, m_memoryMapCellsFlag))
-                  {
-                     m_meanSpacing = m_cellHandler->getMeanSpacingMeters();
-                     foundOne = true;
-                  }
-               }
-            } while(d.getNext(file) &&
-                    (foundOne ||
-                     (!foundOne && (count < maxCount))));
-         }
-      }
-   }  
-   
-   if(!foundOne)
-   {
-      m_cellHandler = 0;
-   }
-   
-   return m_cellHandler.valid();
-}
-
-bool ossimGeneralRasterElevationDatabase::pointHasCoverage(const ossimGpt& gpt) const
-{
-   bool result = false;
-   
-   if(m_cellHandler.valid())
-   {
-      result = m_cellHandler->pointHasCoverage(gpt);
-   }
-   
-   return result;
-}
-
-void ossimGeneralRasterElevationDatabase::createRelativePath(
-   ossimFilename& /* file */, const ossimGpt& /* gpt */)const
-{
-}
-
-ossimRefPtr<ossimElevCellHandler> ossimGeneralRasterElevationDatabase::createHandler(const ossimGpt&  gpt )
-{
-   if(pointHasCoverage(gpt))
-   {
-      return m_cellHandler.get();
-   }
-   return 0;
-}
-
-ossimRefPtr<ossimElevCellHandler> ossimGeneralRasterElevationDatabase::createCell(const ossimGpt& gpt)
-{
-   if(pointHasCoverage(gpt))
-   {
-      return m_cellHandler.get();
-   }
-   return 0;
-}
-
-
-bool ossimGeneralRasterElevationDatabase::loadState(const ossimKeywordlist& kwl, const char* prefix )
-{
-   bool result = ossimElevationDatabase::loadState(kwl, prefix);
-   if(result)
-   {
-      if(!m_connectionString.empty()&&ossimFilename(m_connectionString).exists())
-      {
-         result = open(m_connectionString);
-      }
-      else
-      {
-         // can't open the connection because it does not exists or empty
-         result = false;
-      }
-   }
-   
-   return result;
-}
-
-bool ossimGeneralRasterElevationDatabase::saveState(ossimKeywordlist& kwl, const char* prefix)const
-{
-   bool result = ossimElevationDatabase::saveState(kwl, prefix);
-   
-   return result;
-}
-
-
diff --git a/src/ossim/elevation/ossimImageElevationDatabase.cpp b/src/ossim/elevation/ossimImageElevationDatabase.cpp
deleted file mode 100644
index f4160ac..0000000
--- a/src/ossim/elevation/ossimImageElevationDatabase.cpp
+++ /dev/null
@@ -1,449 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossimImageElevationDatabase.cpp
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:  See class desciption in header file.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/elevation/ossimImageElevationDatabase.h>
-#include <ossim/base/ossimCallback1.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/elevation/ossimImageElevationHandler.h>
-#include <ossim/util/ossimFileWalker.h>
-#include <cmath>
-
-static ossimTrace traceDebug(ossimString("ossimImageElevationDatabase:debug"));
-
-RTTI_DEF1(ossimImageElevationDatabase, "ossimImageElevationDatabase", ossimElevationDatabase);
-
-//---
-// Call back class to register with ossimFileWalker for call to
-// ossimImageElevationDatabase::processFile
-//
-// Placed here as it is unique to this class.
-//---
-class ProcessFileCB: public ossimCallback1<const ossimFilename&>
-{
-public:
-   ProcessFileCB(
-      ossimImageElevationDatabase* obj,
-      void (ossimImageElevationDatabase::*func)(const ossimFilename&))
-      :
-      m_obj(obj),
-      m_func(func)
-   {}
-      
-   virtual void operator()(const ossimFilename& file) const
-   {
-      (m_obj->*m_func)(file);
-   }
-
-private:
-   ossimImageElevationDatabase* m_obj;
-   void (ossimImageElevationDatabase::*m_func)(const ossimFilename& file);
-};
-
-ossimImageElevationDatabase::ossimImageElevationDatabase()
-   :
-   ossimElevationCellDatabase(),
-   m_entryMap(),
-   m_lastMapKey(0),
-   m_lastAccessedId(0)
-{
-}
-
-// Protected destructor as this is derived from ossimRefenced.
-ossimImageElevationDatabase::~ossimImageElevationDatabase()
-{
-}
-
-bool ossimImageElevationDatabase::open(const ossimString& connectionString)
-{
-   // return false; // tmp drb...
-   
-   static const char M[] = "ossimImageElevationDatabase::open";
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << M << " entered...\n"
-         << "\nConnection string: " << connectionString << "\n";
-   }                   
-   
-   bool result = false;
-
-   close();
-
-   if ( connectionString.size() )
-   {
-      m_connectionString = connectionString.c_str();
-
-      loadFileMap();
-
-      if ( m_entryMap.size() )
-      {
-         result = true;
-      }
-      else
-      {
-         m_connectionString.clear();
-      }
-   }
-   
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " result=" << (result?"true\n":"false\n");
-   }
-
-   return result;
-}
-
-void ossimImageElevationDatabase::close()
-{
-   m_meanSpacing = 0.0;
-   m_geoid = 0;
-   m_connectionString.clear();
-}
-
-double ossimImageElevationDatabase::getHeightAboveMSL(const ossimGpt& gpt)
-{
-   if(isSourceEnabled())
-   {
-      ossimRefPtr<ossimElevCellHandler> handler = getOrCreateCellHandler(gpt);
-      if(handler.valid())
-      {
-         return handler->getHeightAboveMSL(gpt); // still need to shift
-      }
-   }
-   return ossim::nan();
-}
-
-double ossimImageElevationDatabase::getHeightAboveEllipsoid(const ossimGpt& gpt)
-{
-   double h = getHeightAboveMSL(gpt);
-   if(h != ossim::nan())
-   {
-      h += getOffsetFromEllipsoid(gpt);
-   }
-   return h;
-}
-
-ossimRefPtr<ossimElevCellHandler> ossimImageElevationDatabase::createCell(
-   const ossimGpt& gpt)
-{
-   ossimRefPtr<ossimElevCellHandler> result = 0;
-   
-   std::map<ossim_uint64, ossimImageElevationFileEntry>::iterator i = m_entryMap.begin();
-   while ( i != m_entryMap.end() )
-   {
-      if ( (*i).second.m_loadedFlag == false )
-      {
-         // not loaded
-         ossimRefPtr<ossimImageElevationHandler> h = new ossimImageElevationHandler();
-
-         if ( (*i).second.m_rect.isLonLatNan() )
-         {
-            if ( h->open( (*i).second.m_file ) )
-            {
-               // First time opened.  Capture the rectangle. for next time.
-               (*i).second.m_rect = h->getBoundingGndRect();
-            }
-            else
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << "ossimImageElevationDatabase::createCell WARN:\nCould not open: "
-                  << (*i).second.m_file << "\nRemoving file from map!" << std::endl;
-
-               // Get a copy of the iterator to delet.
-               std::map<ossim_uint64, ossimImageElevationFileEntry>::iterator badIter = i;
-               
-               ++i; // Go to next image.
-
-               // Must put lock around erase.
-               m_cacheMapMutex.lock();
-               m_entryMap.erase(badIter);
-               m_cacheMapMutex.unlock();
-               
-               continue; // Skip the rest of this loop.
-            }
-         }
-
-         // Check the North up bounding rectangle for intersect.
-         if ( (*i).second.m_rect.pointWithin(gpt) )
-         {
-            if ( h->isOpen() == false )
-            {
-               h->open( (*i).second.m_file );
-            }
-
-            if ( h->isOpen() )
-            {
-               //---
-               // Check point coverage again as image may not be geographic and pointHasCoverage
-               // has a check on worldToLocal point.
-               //---
-               if (  h->pointHasCoverage(gpt) )
-               {
-                  m_lastAccessedId = (*i).first;
-                  (*i).second.m_loadedFlag = true;
-                  result = h.get();
-                  break;
-               }
-               else
-               {
-                  h = 0;
-               }
-            }
-         }
-         else
-         {
-            h = 0;
-         }
-      }
-
-      ++i;
-   }
-   
-   return result;
-}
-
-ossimRefPtr<ossimElevCellHandler> ossimImageElevationDatabase::getOrCreateCellHandler(
-   const ossimGpt& gpt)
-{
-   ossimRefPtr<ossimElevCellHandler> result = 0;
-   
-   // Note: Must do mutex lock / unlock around any cach map access.
-   m_cacheMapMutex.lock();
-
-   if ( m_cacheMap.size() )
-   {
-      //---
-      // Look in existing map for handler.
-      //
-      // Note: Cannot key off of id from gpt as cells can be any arbituary dimensions.
-      //---
-
-      CellMap::iterator lastAccessedCellIter = m_cacheMap.find(m_lastAccessedId);
-      CellMap::iterator iter = lastAccessedCellIter;
-        
-      // Check from last accessed to end.
-      while ( iter != m_cacheMap.end() )
-      {
-         if ( iter->second->m_handler->pointHasCoverage(gpt) )
-         {
-            result = iter->second->m_handler.get();
-            break;
-         }
-         ++iter;
-      }
-     
-      if ( result.valid() == false )
-      {
-         iter = m_cacheMap.begin();
-              
-         // Beginning to last accessed.
-         while ( iter != lastAccessedCellIter)
-         {
-            if ( iter->second->m_handler->pointHasCoverage(gpt) )
-            {
-               result = iter->second->m_handler.get();
-               break;
-            }
-            ++iter;
-         }
-      }
-
-      if ( result.valid() )
-      {
-         m_lastAccessedId  = iter->second->m_id;
-         iter->second->updateTimestamp();
-      }
-   }
-   m_cacheMapMutex.unlock();
-  
-   if ( result.valid() == false )
-   {
-      // Not in m_cacheMap.  Create a new cell for point if we have coverage.
-      result = createCell(gpt);
-
-      if(result.valid())
-      {
-         OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_cacheMapMutex);
-
-         //---
-         // Add the cell to map.
-         // NOTE: ossimImageElevationDatabase::createCell sets m_lastAccessedId to that of
-         // the entries map key.
-         //---
-         m_cacheMap.insert(std::make_pair(m_lastAccessedId,
-                                          new CellInfo(m_lastAccessedId, result.get())));
-
-         ++m_lastMapKey;
-
-         // Check the map size and purge cells if needed.
-         if(m_cacheMap.size() > m_maxOpenCells)
-         {
-            flushCacheToMinOpenCells();
-         }
-      }
-   }
-
-   return result;
-}
-
-bool ossimImageElevationDatabase::pointHasCoverage(const ossimGpt& gpt) const
-{
-   //---
-   // NOTE:
-   //
-   // The bounding rect is the North up rectangle.  So if the underlying image projection is not
-   // a geographic projection and there is a rotation this could return false positives.  Inside
-   // the ossimImageElevationDatabase::createCell there is a call to
-   // ossimImageElevationHandler::pointHasCoverage which does a real check from the
-   // ossimImageGeometry of the image.
-   //---
-   bool result = false;
-   std::map<ossim_uint64, ossimImageElevationFileEntry>::const_iterator i = m_entryMap.begin();
-   while ( i != m_entryMap.end() )
-   {
-      if ( (*i).second.m_rect.pointWithin(gpt) )
-      {
-         result = true;
-         break;
-      }
-      ++i;
-   }
-   return result;
-}
-
-
-bool ossimImageElevationDatabase::getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const
-{
-   if(pointHasCoverage(gpt))
-   {
-     info.m_surfaceName = "Image Elevation";
-   }
-
-   return false;
-}
-
-bool ossimImageElevationDatabase::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   static const char M[] = "ossimImageElevationDatabase::loadState";
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << M << " entered..." << "\nkwl:\n" << kwl << "\n";
-   }     
-   bool result = false;
-   const char* lookup = kwl.find(prefix, "type");
-   if ( lookup )
-   {
-      std::string type = lookup;
-      if ( ( type == "image_directory" ) || ( type == "ossimImageElevationDatabase" ) )
-      {
-         result = ossimElevationDatabase::loadState(kwl, prefix);
-
-         if ( result )
-         {
-            loadFileMap();
-         }
-      }
-   }
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " result=" << (result?"true\n":"false\n");
-   }
-
-   return result;
-}
-
-bool ossimImageElevationDatabase::saveState(ossimKeywordlist& kwl, const char* prefix) const
-{
-   return ossimElevationDatabase::saveState(kwl, prefix);
-}
-
-void ossimImageElevationDatabase::processFile(const ossimFilename& file)
-{
-   static const char M[] = "ossimImageElevationDatabase::processFile";
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << M << " entered...\n" << "file: " << file << "\n";
-   }
-
-   // Add the file.
-   m_entryMap.insert( std::make_pair(m_lastMapKey++, ossimImageElevationFileEntry(file)) );
-
-   if(traceDebug())
-   {
-      // Since ossimFileWalker is threaded output the file so we know which job exited.
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << "\nfile: " << file << "\nexited...\n";
-   } 
-}
-
-void ossimImageElevationDatabase::loadFileMap()
-{
-   if ( m_connectionString.size() )
-   {
-      // Create a file walker which will find files we can load from the connection string.
-      ossimFileWalker* fw = new ossimFileWalker();
-      fw->initializeDefaultFilterList();
-      ossimCallback1<const ossimFilename&>* cb =
-         new ProcessFileCB(this, &ossimImageElevationDatabase::processFile);
-      fw->registerProcessFileCallback(cb);
-      
-      ossimFilename f = m_connectionString;
-
-      // ossimFileWalker::walk will in turn call back to processFile method for each file it finds.
-      fw->walk(f); 
-      
-      delete fw;
-      fw = 0;
-      delete cb;
-      cb = 0;
-   }
-}
-
-// Hidden from use:
-ossimImageElevationDatabase::ossimImageElevationDatabase(
-   const ossimImageElevationDatabase& /* copy_this */)
-{
-}
-
-// Hidden from use:
-const ossimImageElevationDatabase& ossimImageElevationDatabase::operator=(
-   const ossimImageElevationDatabase& /* rhs */)
-{
-   return *this;
-}
-
-// Private container class:
-ossimImageElevationDatabase::ossimImageElevationFileEntry::ossimImageElevationFileEntry()
-   : m_file(),
-     m_rect(),
-     m_loadedFlag(false)
-{
-   m_rect.makeNan();
-}
-
-// Private container class:
-ossimImageElevationDatabase::ossimImageElevationFileEntry::ossimImageElevationFileEntry(
-   const ossimFilename& file)
-   : m_file(file),
-     m_rect(),
-     m_loadedFlag(false)
-{
-   m_rect.makeNan();
-}
-
diff --git a/src/ossim/elevation/ossimImageElevationHandler.cpp b/src/ossim/elevation/ossimImageElevationHandler.cpp
deleted file mode 100644
index d9483bc..0000000
--- a/src/ossim/elevation/ossimImageElevationHandler.cpp
+++ /dev/null
@@ -1,246 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossimImageElevationHandler.cpp
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:  See class desciption in header file.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/elevation/ossimImageElevationHandler.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-
-#include <iostream> // tmp drb
-using namespace std;
-
-#include <cmath>
-
-RTTI_DEF1(ossimImageElevationHandler, "ossimImageElevationHandler" , ossimElevCellHandler)
-
-// Define Trace flags for use within this file:
-static ossimTrace traceDebug ("ossimImageElevationHandler:debug");
-
-ossimImageElevationHandler::ossimImageElevationHandler()
-   :
-   ossimElevCellHandler(),
-   m_ih(0),
-   m_geom(0),
-   m_rect()
-{
-}
-
-bool ossimImageElevationHandler::open(const ossimFilename& file)
-{
-   static const char M[] = "ossimImageElevationHandler::open";
-   
-   bool result = false;
-
-   if ( isOpen() ) close();
-   
-   if ( file.size() )
-   {
-      //---
-      // NOTE: The false passed to open is flag to NOT open overviews. If code is ever changed
-      // to go between reduced resolution levels this should be changed.
-      //---
-      m_ih = ossimImageHandlerRegistry::instance()->open(file, true, false);
-      if ( m_ih.valid() )
-      {
-         m_geom = m_ih->getImageGeometry();
-         if ( m_geom.valid() )
-         {
-            result = true;
-
-            //---
-            // Image rect stored as a drect for ossimImageElevationHandler::pointHasCoverage
-            // method.
-            //---
-            m_rect = ossimDrect(0.0, 0.0,
-                                m_ih->getNumberOfSamples()-1, m_ih->getNumberOfLines()-1);
-
-            // Initialize base class stuff.
-            theFilename = file;
-
-            theMeanSpacing = (m_geom->getMetersPerPixel().x + m_geom->getMetersPerPixel().y) / 2.0;
-
-            // Set the ossimElevSource::theGroundRect
-            std::vector<ossimGpt> corner(4);
-            if ( m_geom->getCornerGpts(corner[0], corner[1], corner[2], corner[3]) )
-            {
-               ossimGpt ulGpt(corner[0]);
-               ossimGpt lrGpt(corner[0]);
-               for ( ossim_uint32 i = 1; i < 4; ++i )
-               {
-                  if ( corner[i].lon < ulGpt.lon ) ulGpt.lon = corner[i].lon;
-                  if ( corner[i].lat > ulGpt.lat ) ulGpt.lat = corner[i].lat;
-                  if ( corner[i].lon > lrGpt.lon ) lrGpt.lon = corner[i].lon;
-                  if ( corner[i].lat < lrGpt.lat ) lrGpt.lat = corner[i].lat;
-               }
-               theGroundRect = ossimGrect(ulGpt, lrGpt);
-            }
-            else
-            {
-               theGroundRect.makeNan();
-            }
-         }
-         // theAbsLE90 ???
-         // theAbsCE90 ???
-      }
-   }
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << M << " DEBUG:"
-         << "\nmean spacing(meters): " << theMeanSpacing
-         << "\nunding rect: " << theGroundRect
-         << "\nreturn status: " << (result?"true\n":"false\n");
-   }
-         
-   return result;
-}
-
-
-ossimImageElevationHandler::~ossimImageElevationHandler()
-{
-   close();
-}
-
-double ossimImageElevationHandler::getHeightAboveMSL(const ossimGpt& gpt)
-{
-   double height = ossim::nan();
-
-   // Get the image point for the world point.
-   ossimDpt dpt;
-   m_geom->worldToLocal(gpt, dpt);
-
-   if ( m_rect.pointWithin(dpt) )
-   {
-      // Cast it to an int which will shift to nearest upper left post.
-      ossim_int32 x0 = static_cast<ossim_int32>(dpt.x);
-      ossim_int32 y0 = static_cast<ossim_int32>(dpt.y);
-      
-      // Right edge check.
-      if(x0 == static_cast<ossim_int32>(m_rect.lr().x))
-      {
-         --x0;
-      }
-      
-      // Bottom edge check.
-      if(y0 == static_cast<ossim_int32>(m_rect.lr().y))
-      {
-         --y0;
-      }
-   
-      ossimRefPtr<ossimImageData> data = m_ih->getTile( ossimIrect(x0, y0, x0+1, y0+1), 0 );
-      if ( data.valid() )
-      {
-         ossimIrect dataRect = data->getImageRectangle();
-
-         double v00 = data->getPix( ossimIpt(x0,   y0)   );
-         double v01 = data->getPix( ossimIpt(x0+1, y0)   );
-         double v10 = data->getPix( ossimIpt(x0,   y0+1) );
-         double v11 = data->getPix( ossimIpt(x0+1, y0+1) );
-         
-         double p00 = v00;
-         double p01 = v01;
-         double p10 = v10;
-         double p11 = v11;
-         
-         double xt0 = dpt.x - x0;
-         double yt0 = dpt.y - y0;
-         double xt1 = 1-xt0;
-         double yt1 = 1-yt0;
-         
-         double w00 = xt1*yt1;
-         double w01 = xt0*yt1;
-         double w10 = xt1*yt0;
-         double w11 = xt0*yt0;
-         
-         // Test for null posts and set the corresponding weights to 0:
-         const double NP = data->getNullPix(0);
-         
-         if (p00 == NP)
-            w00 = 0.0;
-         if (p01 == NP)
-            w01 = 0.0;
-         if (p10 == NP)
-            w10 = 0.0;
-         if (p11 == NP)
-            w11 = 0.0;
-         
-#if 0 /* Serious debug only... */
-         cout << "\np00:  " << p00
-              << "\np01:  " << p01
-              << "\np10:  " << p10
-              << "\np11:  " << p11
-              << "\nw00:  " << w00
-              << "\nw01:  " << w01
-              << "\nw10:  " << w10
-              << "\nw11:  " << w11
-              << endl;
-#endif
-         
-         double sum_weights = w00 + w01 + w10 + w11;
-         
-         if (sum_weights)
-         {
-            height = (p00*w00 + p01*w01 + p10*w10 + p11*w11) / sum_weights;
-         }
-         
-      } // if ( data.valid() )
-      
-   } // if ( m_rect.pointWithin(dpt) )
-   
-   return height;
-}
-
-ossimIpt ossimImageElevationHandler::getSizeOfElevCell() const
-{
-   ossimIpt sz(0,0);
-   if ( m_ih.valid() )
-   {
-      sz.x = static_cast<ossim_int32>(m_ih->getNumberOfSamples(0));
-      sz.y = static_cast<ossim_int32>(m_ih->getNumberOfLines(0));
-   }
-   return sz;
-}
-
-double ossimImageElevationHandler::getPostValue(const ossimIpt& gridPt ) const
-{
-   double height = ossim::nan();
-   if ( m_rect.pointWithin(ossimDpt(gridPt)) )
-   {
-      ossimRefPtr<ossimImageHandler> ih = const_cast<ossimImageHandler*>(m_ih.get());
-      ossimRefPtr<ossimImageData> data =
-         ih->getTile( ossimIrect(gridPt.x, gridPt.y, gridPt.x+1, gridPt.y+1), 0 );
-      if ( data.valid() )
-      {
-         height = data->getPix(0, 0);
-      }
-   }
-   return height;
-}
-
-// Hidden from use...
-ossimImageElevationHandler::ossimImageElevationHandler(const ossimImageElevationHandler& /* obj */)
-{
-}
-
-// Hidden from use...
-const ossimImageElevationHandler&
-ossimImageElevationHandler::operator=(const ossimImageElevationHandler& /* rhs */)
-{
-   return *this;
-}
diff --git a/src/ossim/elevation/ossimSrtmElevationDatabase.cpp b/src/ossim/elevation/ossimSrtmElevationDatabase.cpp
deleted file mode 100644
index 489dd74..0000000
--- a/src/ossim/elevation/ossimSrtmElevationDatabase.cpp
+++ /dev/null
@@ -1,242 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/elevation/ossimSrtmElevationDatabase.h>
-#include <ossim/base/ossimGeoidManager.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimDirectory.h>
-#include <ossim/base/ossimTrace.h>
-#include <sstream>
-#include <iomanip>
-#include <cstdlib> /* for abs(int) */
-
-static ossimTrace traceDebug("ossimSrtmElevationDatabase:debug");
-
-RTTI_DEF1(ossimSrtmElevationDatabase, "ossimSrtmElevationDatabase", ossimElevationCellDatabase);
-
-double ossimSrtmElevationDatabase::getHeightAboveMSL(const ossimGpt& gpt)
-{
-   if(isSourceEnabled())
-   {
-      ossimRefPtr<ossimElevCellHandler> handler = getOrCreateCellHandler(gpt);
-      if(handler.valid())
-      {
-         return handler->getHeightAboveMSL(gpt); // still need to shift
-      }
-   }
-   return ossim::nan();
-}
-
-double ossimSrtmElevationDatabase::getHeightAboveEllipsoid(const ossimGpt& gpt)
-{
-   double h = getHeightAboveMSL(gpt);
-   if(h != ossim::nan())
-   {
-      h += getOffsetFromEllipsoid(gpt);
-   }
-   
-   return h;
-}
-bool ossimSrtmElevationDatabase::open(const ossimString& connectionString)
-{
-   bool result = false;
-   ossimFilename file = ossimFilename(connectionString);
-   m_connectionString = connectionString;
-   result = openSrtmDirectory(file);
-   
-   return result;
-}
-
-bool ossimSrtmElevationDatabase::getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const
-{
-   bool result = false;
-   info.makeNan();
-
-   if(pointHasCoverage(gpt))
-   {
-      result = true;
-      if(m_meanSpacing > 100.0)
-      {
-         // 30 arc second
-         info.m_absoluteCE  = 20.0;
-         info.m_absoluteLE = 16.0;
-         info.m_surfaceName = "SRTM30";
-
-      }
-      else if (m_meanSpacing > 40.0)
-      {
-        // SRTM 3 arc
-         info.m_absoluteCE  = 20.0;
-         info.m_absoluteLE = 16.0;
-         info.m_surfaceName = "SRTM3";
-      }
-      else
-      {
-          // SRTM 1 arc
-         info.m_absoluteCE = 20.0;
-         info.m_absoluteLE = 10.0;
-         info.m_surfaceName = "SRTM1";
-       }
-   }
-
-   return result;
-}
-
-bool ossimSrtmElevationDatabase::openSrtmDirectory(const ossimFilename& dir)
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimSrtmElevationDatabase::open: Entered....\n";
-   }
-   if(!m_geoid.valid())
-   {
-      m_geoid = ossimGeoidManager::instance()->findGeoidByShortName("geoid1996", false);
-   }
-   
-   //---
-   // Sample format:
-   //            dir
-   //         |          |
-   //    N35W121.hgt N35W121.hgt
-   //---
-   ossim_uint32 count = 0;
-   ossim_uint32 maxCount = 25;
-   if (!dir.isDir())
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << "ossimSrtmElevationDatabase::open: Not a directory, leaving ... " << dir << "\n";
-      }
-      return false;
-   }
-   
-   ossimDirectory od(dir);
-   if (od.isOpened() == false)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << "ossimSrtmElevationDatabase::open: Unable to open directory " << dir << ", Leaving ... \n";
-      }
-      return false;
-   }
-   
-   ossimFilename f;
-   //ossimSrtmSupportData sd;
-   ossimRefPtr<ossimSrtmHandler> handler = new ossimSrtmHandler;
-   if(od.getFirst(f, ossimDirectory::OSSIM_DIR_FILES))
-   {
-      do
-      {
-         ++count;
-         if(handler->open(f))
-         {
-            m_meanSpacing = handler->getMeanSpacingMeters();
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG) << "ossimSrtmElevationDatabase::open: Found file " << f << "\n";
-               if(!m_geoid.valid())
-               {
-                  ossimNotify(ossimNotifyLevel_DEBUG) << "ossimSrtmElevationDatabase::open: Unable to load goeid grid 1996 for SRTM database\n";
-               }
-            }
-            return true;
-         }
-      }while((od.getNext(f)) &&(count < maxCount));
-   }
-   
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimSrtmElevationDatabase::open: Leaving ... \n";
-   }
-   return false;
-}
-
-void ossimSrtmElevationDatabase::createRelativePath(ossimFilename& file, const ossimGpt& gpt)const
-{
-   int ilat =  static_cast<int>(floor(gpt.latd()));
-   if (ilat < 0)
-   {
-      file = "S";
-   }
-   else
-   {
-      file = "N";
-   }
-   
-   ilat = abs(ilat);
-   std::ostringstream  os1;
-   
-   os1 << std::setfill('0') << std::setw(2) <<ilat;
-   
-   file += os1.str().c_str();
-   
-   int ilon = static_cast<int>(floor(gpt.lond()));
-   
-   if (ilon < 0)
-   {
-      file += "W";
-   }
-   else
-   {
-      file += "E";
-   }
-   
-   ilon = abs(ilon);
-   std::ostringstream  os2;
-   os2 << std::setfill('0') << std::setw(3) << ilon;
-   
-   file += os2.str().c_str();
-   file.setExtension("hgt");
-}
-
-bool ossimSrtmElevationDatabase::loadState(const ossimKeywordlist& kwl, const char* prefix )
-{
-   bool result = ossimElevationDatabase::loadState(kwl, prefix);
-   if(result)
-   {
-      if(!m_connectionString.empty()&&ossimFilename(m_connectionString).exists())
-      {
-         result = open(m_connectionString);
-      }
-      else
-      {
-         // can't open the connection because it does not exists or empty
-         result = false;
-      }
-   }
-   
-   return result;
-}
-
-bool ossimSrtmElevationDatabase::saveState(ossimKeywordlist& kwl, const char* prefix)const
-{
-   bool result = ossimElevationDatabase::saveState(kwl, prefix);
-   
-   return result;
-}
-
-ossimRefPtr<ossimElevCellHandler>
-ossimSrtmElevationDatabase::createCell(const ossimGpt& gpt)
-{
-
-  ossimRefPtr<ossimElevCellHandler> result = 0;
-  ossimFilename f;
-  createFullPath(f, gpt);
-
-  if(f.exists())
-  {
-     ossimRefPtr<ossimSrtmHandler> h = new ossimSrtmHandler();
-     if (h->open(f, m_memoryMapCellsFlag))
-     {
-        result = h.get();
-     }
-  }
-
-  return result;
-}
diff --git a/src/ossim/elevation/ossimSrtmHandler.cpp b/src/ossim/elevation/ossimSrtmHandler.cpp
deleted file mode 100644
index fb3d888..0000000
--- a/src/ossim/elevation/ossimSrtmHandler.cpp
+++ /dev/null
@@ -1,516 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  David Burken
-//
-// Description:
-// 
-// Shuttle Radar Topography Mission (SRTM) elevation source.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimSrtmHandler.cpp 19444 2011-04-25 18:20:59Z dburken $
-
-#include <ossim/elevation/ossimSrtmHandler.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimStreamFactoryRegistry.h>
-
-RTTI_DEF1(ossimSrtmHandler, "ossimSrtmHandler" , ossimElevCellHandler)
-
-//***
-// Define Trace flags for use within this file:
-//***
-#include <ossim/base/ossimTrace.h>
-static ossimTrace traceDebug ("ossimSrtmElevSource:debug");
-
-ossimSrtmHandler::ossimSrtmHandler()
-   :
-      ossimElevCellHandler(),
-      m_streamOpen(false),
-      m_numberOfLines(0),
-      m_numberOfSamples(0),
-      m_srtmRecordSizeInBytes(0),
-      m_latSpacing(0.0),
-      m_lonSpacing(0.0),
-      m_nwCornerPost(),
-      m_swapper(0)
-{
-}
-
-ossimSrtmHandler::~ossimSrtmHandler()
-{
-   if (m_swapper)
-   {
-      delete m_swapper;
-      m_swapper = 0;
-   }
-   close();
-}
-
-double ossimSrtmHandler::getHeightAboveMSL(const ossimGpt& gpt)
-{
-   if(!isOpen()) return ossim::nan();
-   if(!m_memoryMap.empty())
-   {
-      switch(m_scalarType)
-      {
-         case OSSIM_SINT16:
-         {
-            return getHeightAboveMSLMemoryTemplate((ossim_sint16)0, gpt);
-         }
-         case OSSIM_FLOAT32:
-         {
-            return getHeightAboveMSLMemoryTemplate((ossim_float32)0, gpt);
-         }
-         default:
-         {
-            break;
-         }
-      }
-   }
-   else
-   {
-      switch(m_scalarType)
-      {
-         case OSSIM_SINT16:
-         {
-            return getHeightAboveMSLFileTemplate((ossim_sint16)0, gpt);
-         }
-         case OSSIM_FLOAT32:
-         {
-            return getHeightAboveMSLFileTemplate((ossim_float32)0, gpt);
-         }
-         default:
-         {
-            break;
-         }
-      }
-   }
-
-   return ossim::nan();
-}
-
-template <class T>
-double ossimSrtmHandler::getHeightAboveMSLFileTemplate(T /* dummy */, const ossimGpt& gpt)
-{
-   // Establish the grid indexes:
-   double xi = (gpt.lon - m_nwCornerPost.lon) / m_lonSpacing;
-   double yi = (m_nwCornerPost.lat - gpt.lat) / m_latSpacing;
-
-   int x0 = static_cast<int>(xi);
-   int y0 = static_cast<int>(yi);
-
-   if(x0 == (m_numberOfSamples-1))
-   {
-      --x0; // Move over one post.
-   }
-   
-   // Check for top edge.
-   //    if (gpt.lat == theGroundRect.ul().lat)
-   if(y0 == (m_numberOfLines-1))
-   {
-      --y0; // Move down one post.
-   }
-
-
-   // Do some error checking.
-   if ( xi < 0.0 || yi < 0.0 ||
-        x0 > (m_numberOfSamples  - 2.0) ||
-        y0 > (m_numberOfLines    - 2.0) )
-   {
-      return ossim::nan();
-   }
-
-   T p[4];
-   
-   double p00;
-   double p01;
-   double p10;
-   double p11;
-
-   //---
-   // Grab the four points from the srtm cell needed.
-   //---
-   std::streampos offset = y0 * m_srtmRecordSizeInBytes + x0 * sizeof(T);
-
-   {
-      OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_fileStrMutex);
-
-      // lets a seek cur
-      // 
-      // Put the file pointer at the start of the first elevation post.
-      m_fileStr.seekg(offset, std::ios::beg);
-      // Get the first post.
-      m_fileStr.read((char*)p, sizeof(T));
-      
-      // Get the second post.
-      m_fileStr.read((char*)(p+1), sizeof(T));
-      
-      // Move over to the next column.
-      offset += m_srtmRecordSizeInBytes;
-      
-      m_fileStr.seekg(offset, std::ios::beg);
-      
-      // Get the third post.
-      m_fileStr.read((char*)(p+2), sizeof(T));
-      
-      // Get the fourth post.
-      m_fileStr.read((char*)(p+3), sizeof(T));
-      
-      if(m_fileStr.fail())
-      {
-         return ossim::nan();
-      }
-   }
-   if (m_swapper)
-   {
-      m_swapper->swap((T*)p, 4);
-   }
-
-   p00 = p[0];
-   p01 = p[1];
-   p10 = p[2];
-   p11 = p[3];
-   
-   // Perform bilinear interpolation:
-
-   double xt0 = xi - x0;
-   double yt0 = yi - y0;
-   double xt1 = 1-xt0;
-   double yt1 = 1-yt0;
-
-   double w00 = xt1*yt1;
-   double w01 = xt0*yt1;
-   double w10 = xt1*yt0;
-   double w11 = xt0*yt0;
-
-   //***
-   // Test for null posts and set the corresponding weights to 0:
-   //***
-   if (p00 == theNullHeightValue)
-      w00 = 0.0;
-   if (p01 == theNullHeightValue)
-      w01 = 0.0;
-   if (p10 == theNullHeightValue)
-      w10 = 0.0;
-   if (p11 == theNullHeightValue)
-      w11 = 0.0;
-
-#if 0 /* Serious debug only... */
-   cout << "\np00:  " << p00
-        << "\np01:  " << p01
-        << "\np10:  " << p10
-        << "\np11:  " << p11
-        << "\nw00:  " << w00
-        << "\nw01:  " << w01
-        << "\nw10:  " << w10
-        << "\nw11:  " << w11
-        << endl;
-#endif
-
-   double sum_weights = w00 + w01 + w10 + w11;
-
-   if (sum_weights)
-   {
-      return (p00*w00 + p01*w01 + p10*w10 + p11*w11) / sum_weights;
-   }
-
-   return ossim::nan();
-}
-
-
-template <class T>
-double ossimSrtmHandler::getHeightAboveMSLMemoryTemplate(T /* dummy */,
-                                                         const ossimGpt& gpt)
-{
-   // Establish the grid indexes:
-   double xi = (gpt.lon - m_nwCornerPost.lon) / m_lonSpacing;
-   double yi = (m_nwCornerPost.lat - gpt.lat) / m_latSpacing;
-   
-   int x0 = static_cast<int>(xi);
-   int y0 = static_cast<int>(yi);
-   
-   if(x0 == (m_numberOfSamples-1))
-   {
-      --x0; // Move over one post.
-   }
-   
-   // Check for top edge.
-   //    if (gpt.lat == theGroundRect.ul().lat)
-   if(y0 == (m_numberOfLines-1))
-   {
-      --y0; // Move down one post.
-   }
-#if 0
-   // Check for right edge.
-   if (ossim::almostEqual(gpt.lon,theGroundRect.lr().lon))
-   {
-      --x0; // Move over one post to the left.
-   }
-   
-   // Check for bottom edge.
-   if (ossim::almostEqual(gpt.lat,theGroundRect.lr().lat))
-   {
-      --y0; // Move up one post.
-   }
-#endif
-   // Do some error checking.
-   if ( xi < 0.0 || yi < 0.0 ||
-       x0 > (m_numberOfSamples  - 2.0) ||
-       y0 > (m_numberOfLines    - 2.0) )
-   {
-      //       std::cout << "ossimSrtmHandler::getHeightAboveMSLTemplate: leaving 1" << std::endl;
-      return ossim::nan();
-   }
-
-   // Grab the four points from the srtm cell needed.
-   ossim_uint64 offset = y0 * m_srtmRecordSizeInBytes + x0 * sizeof(T);
-   ossim_uint64 offset2 =offset+m_srtmRecordSizeInBytes;
-   T v00 = *(reinterpret_cast<T*> (&m_memoryMap[offset]));
-   T v01 = *(reinterpret_cast<T*> (&m_memoryMap[offset + sizeof(T)]));
-   T v10 = *(reinterpret_cast<T*> (&m_memoryMap[offset2]));
-   T v11 = *(reinterpret_cast<T*> (&m_memoryMap[offset2 + sizeof(T)]));
-   if (m_swapper)
-   {
-      m_swapper->swap(v00);
-      m_swapper->swap(v01);
-      m_swapper->swap(v10);
-      m_swapper->swap(v11);
-   }
-   double p00 = v00;
-   double p01 = v01;
-   double p10 = v10;
-   double p11 = v11;
-   
-   double xt0 = xi - x0;
-   double yt0 = yi - y0;
-   double xt1 = 1-xt0;
-   double yt1 = 1-yt0;
-   
-   double w00 = xt1*yt1;
-   double w01 = xt0*yt1;
-   double w10 = xt1*yt0;
-   double w11 = xt0*yt0;
-   
-   //***
-   // Test for null posts and set the corresponding weights to 0:
-   //***
-   if (p00 == theNullHeightValue)
-      w00 = 0.0;
-   if (p01 == theNullHeightValue)
-      w01 = 0.0;
-   if (p10 == theNullHeightValue)
-      w10 = 0.0;
-   if (p11 == theNullHeightValue)
-      w11 = 0.0;
-   
-#if 0 /* Serious debug only... */
-   cout << "\np00:  " << p00
-   << "\np01:  " << p01
-   << "\np10:  " << p10
-   << "\np11:  " << p11
-   << "\nw00:  " << w00
-   << "\nw01:  " << w01
-   << "\nw10:  " << w10
-   << "\nw11:  " << w11
-   << endl;
-#endif
-   
-   double sum_weights = w00 + w01 + w10 + w11;
-   
-   if (sum_weights)
-   {
-      return (p00*w00 + p01*w01 + p10*w10 + p11*w11) / sum_weights;
-   }
-   
-   return ossim::nan();
-}
-
-double ossimSrtmHandler::getPostValue(const ossimIpt& /* gridPt */) const
-{
-   ossimNotify(ossimNotifyLevel_WARN)
-      << "ossimSrtmHandler::getPostValue(const ossimIpt& gridPt):  NEED TO IMPLEMENT TO NEW INTERFACE\n";
-   
-   return theNullHeightValue;
-#if 0
-   static const char MODULE[] = "ossimSrtmHandler::getPostValue";
-   
-   if(!theFileStr.valid()) return ossim::nan();
-   
-   // Do some error checking.
-   if ( gridPt.x < 0.0 || gridPt.y < 0.0 ||
-        gridPt.x > (theNumberOfSamples  - 1) ||
-        gridPt.y > (theNumberOfLines - 1) )
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "WARNING " << MODULE << ": No intersection..." << std::endl;
-      }
-      return ossim::nan();
-   }
-
-   if (!isOpen())
-   {
-      return ossim::nan();
-   }
-
-   std::streampos offset = gridPt.y * theSrtmRecordSizeInBytes + gridPt.x * 2;
-
-   // Put the file pointer at the start of the first elevation post.
-   m_fileStr.seekg(offset, std::ios::beg);
-
-   ossim_sint16 p;
-
-   // Get the post.
-   m_fileStr.read((char*)&p, 2);
-   if (theSwapper)
-   {
-      theSwapper->swap(p);
-   }
-   return p;
-#endif
-}
-
-ossimIpt ossimSrtmHandler::getSizeOfElevCell() const
-{
-   return ossimIpt(m_numberOfSamples, m_numberOfLines);
-}
-
-const ossimSrtmHandler&
-ossimSrtmHandler::operator=(const ossimSrtmHandler& rhs)
-{
-   m_supportData = rhs.m_supportData;
-   m_streamOpen = rhs.m_streamOpen,
-   m_numberOfLines = rhs.m_numberOfLines;
-   m_numberOfSamples = rhs.m_numberOfSamples;
-   m_srtmRecordSizeInBytes = rhs.m_srtmRecordSizeInBytes;
-   m_latSpacing = rhs.m_latSpacing;
-   m_lonSpacing = rhs.m_lonSpacing;
-   m_nwCornerPost = rhs.m_nwCornerPost;
-   m_swapper = rhs.m_swapper?new ossimEndian:0;
-   m_scalarType = rhs.m_scalarType;
-   m_memoryMap = rhs.m_memoryMap;
-   
-   ossimElevCellHandler::operator = (rhs);
-   return *this;
-}
-
-ossimSrtmHandler::ossimSrtmHandler(const ossimSrtmHandler& src)
-:ossimElevCellHandler(src),
-m_supportData(src.m_supportData),
-m_streamOpen(src.m_streamOpen),
-m_numberOfLines(src.m_numberOfLines),
-m_numberOfSamples(src.m_numberOfSamples),
-m_srtmRecordSizeInBytes(src.m_srtmRecordSizeInBytes),
-m_latSpacing(src.m_latSpacing),
-m_lonSpacing(src.m_lonSpacing),
-m_nwCornerPost(src.m_nwCornerPost),
-m_swapper(src.m_swapper?new ossimEndian:0),
-m_scalarType(src.m_scalarType),
-m_memoryMap(src.m_memoryMap)
-{
-   if(m_memoryMap.empty()&&src.isOpen())
-   {
-      m_fileStr.open(src.getFilename().c_str(),
-                     std::ios::binary|std::ios::in);
-   }
-}
-
-bool ossimSrtmHandler::isOpen()const
-{
-   if(!m_memoryMap.empty()) return true;
-   
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m_fileStrMutex);
-   return m_streamOpen;
-   // return (m_fileStr.is_open());
-}
-
-
-bool ossimSrtmHandler::open(const ossimFilename& file, bool memoryMapFlag)
-{
-   theFilename = file;
-   clearErrorStatus();
-   if (!m_supportData.setFilename(file, false) )
-   {
-      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-      return false;
-   }
-   if(m_swapper) {delete m_swapper;m_swapper=0;}
-   m_scalarType = m_supportData.getScalarType();
-   // SRTM is stored in big endian.
-   if ( ossim::byteOrder() == OSSIM_LITTLE_ENDIAN)
-   {
-      m_swapper = new ossimEndian();
-   }
-   m_streamOpen = false;
-   m_numberOfLines         = m_supportData.getNumberOfLines();
-   m_numberOfSamples       = m_supportData.getNumberOfSamples();
-   m_srtmRecordSizeInBytes = m_numberOfSamples * ossim::scalarSizeInBytes(m_scalarType);
-   m_latSpacing            = m_supportData.getLatitudeSpacing();
-   m_lonSpacing            = m_supportData.getLongitudeSpacing();
-   m_nwCornerPost.lon      = m_supportData.getSouthwestLongitude();
-   m_nwCornerPost.lat      = m_supportData.getSouthwestLatitude()+1.0;
-   m_scalarType            = m_supportData.getScalarType();
-   theGroundRect = ossimGrect(ossimGpt(m_nwCornerPost.lat,
-                                       m_nwCornerPost.lon,
-                                       0.0),
-                              ossimGpt(m_nwCornerPost.lat-1.0,
-                                       m_nwCornerPost.lon+1.0,
-                                       0.0));
-   theMeanSpacing = (m_latSpacing*ossimGpt().metersPerDegree().y);
-   
-   // Set the base class null height value.
-   theNullHeightValue = -32768.0;
-
-   m_fileStr.clear();
-   m_fileStr.open(theFilename.c_str(), std::ios::in | std::ios::binary);
-   if(!m_fileStr)
-   {
-      return false;
-   }
-   
-   if(memoryMapFlag)
-   {
-      m_memoryMap.resize(theFilename.fileSize());
-      m_fileStr.read((char*)&m_memoryMap.front(), (streamsize)m_memoryMap.size());
-      m_fileStr.close();
-   }
-   m_streamOpen = true;
-   // Capture the stream state for non-const is_open on old compiler.
-   
-   return m_streamOpen;
-#if 0
-   // theMinHeightAboveMSL;
-   // theMaxHeightAboveMSL;
-   if(theFileStr.valid())
-   {
-      if(!m_fileStr.fail())
-      {
-         return true;
-      }
-   }
-   theFileStr = 0;
-
-   
-   theFileStr = ossimStreamFactoryRegistry::instance()->createNewIFStream(theFilename,
-                                                                          std::ios::in | std::ios::binary);   
-
-   if(theFileStr.valid())
-   {
-      return (!m_fileStr.fail());
-   }
-   return false;
-#endif
-}
-
-void ossimSrtmHandler::close()
-{
-   m_fileStr.close();
-   m_memoryMap.clear();
-   m_streamOpen = false;
-}
diff --git a/src/ossim/elevation/ossimTiledElevationDatabase.cpp b/src/ossim/elevation/ossimTiledElevationDatabase.cpp
deleted file mode 100644
index 7a9000a..0000000
--- a/src/ossim/elevation/ossimTiledElevationDatabase.cpp
+++ /dev/null
@@ -1,683 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossimTiledElevationDatabase.cpp
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: See class desciption in header file.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/elevation/ossimTiledElevationDatabase.h>
-
-#include <ossim/base/ossimCallback1.h>
-#include <ossim/base/ossimDblGrid.h>
-#include <ossim/base/ossimDirectory.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/imaging/ossimOrthoImageMosaic.h>
-#include <ossim/imaging/ossimSingleImageChain.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/util/ossimFileWalker.h>
-
-#include <cmath>
-
-static ossimTrace traceDebug(ossimString("ossimTiledElevationDatabase:debug"));
-
-RTTI_DEF1(ossimTiledElevationDatabase, "ossimTiledElevationDatabase", ossimElevationDatabase);
-
-//---
-// Call back class to register with ossimFileWalker for call to
-// ossimTiledElevationDatabase::processFile
-//
-// Placed here as it is unique to this class.
-//---
-class ProcessFileCB: public ossimCallback1<const ossimFilename&>
-{
-public:
-   ProcessFileCB(
-      ossimTiledElevationDatabase* obj,
-      void (ossimTiledElevationDatabase::*func)(const ossimFilename&))
-      :
-      m_obj(obj),
-      m_func(func)
-   {}
-      
-   virtual void operator()(const ossimFilename& file) const
-   {
-      (m_obj->*m_func)(file);
-   }
-
-private:
-   ossimTiledElevationDatabase* m_obj;
-   void (ossimTiledElevationDatabase::*m_func)(const ossimFilename& file);
-};
-
-ossimTiledElevationDatabase::ossimTiledElevationDatabase()
-   :
-   ossimElevationDatabase(),
-   m_entries(0),
-   m_grid(0),
-   m_referenceProj(0),
-   m_requestedRect(),
-   m_entryListRect(),
-   m_fileWalker(0)
-{
-   m_requestedRect.makeNan();
-   m_entryListRect.makeNan();
-
-   //---
-   // Use the ossimElevSource::theGroundRect to hold the mapped rect expanded to even post
-   // boundaries.
-   //---
-   theGroundRect.makeNan();
-}
-
-// Protected destructor as this is derived from ossimRefenced.
-ossimTiledElevationDatabase::~ossimTiledElevationDatabase()
-{
-   m_referenceProj = 0;   
-   m_entries.clear();
-   if ( m_grid )
-   {
-      delete m_grid;
-      m_grid = 0;
-   }
-}
-
-bool ossimTiledElevationDatabase::open(const ossimString& connectionString)
-{
-   return false; // tmp drb...
-   
-   static const char M[] = "ossimTiledElevationDatabase::open";
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << M << " entered...\n"
-         << "\nConnection string: " << connectionString << "\n";
-   }                   
-   
-   bool result = false;
-
-   close();
-
-   if ( connectionString.size() )
-   {
-      m_connectionString = connectionString.c_str();
-      result = true;
-   }
-
-   if ( m_entries.size() ) result = true;
-   
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " result=" << (result?"true\n":"false\n");
-   }
-
-   return result;
-}
-
-void ossimTiledElevationDatabase::close()
-{
-   m_entryListRect.makeNan();
-   m_requestedRect.makeNan();
-   theGroundRect.makeNan();
-   m_referenceProj = 0;
-   m_entries.clear();
-   if ( m_grid )
-   {
-      delete m_grid;
-      m_grid = 0;
-   }
-   m_meanSpacing = 0.0;
-   m_geoid = 0;
-   m_connectionString.clear();
-}
-
-void ossimTiledElevationDatabase::mapRegion(const ossimGrect& region)
-{
-   static const char M[] = "ossimTiledElevationDatabase::mapRegion";
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << M << " entered...\n" << "region: " << region << "\n";
-   }
-   
-   if ( m_connectionString.size() )
-   {
-      // Put these outside the try block so we can delete if exception thrown.
-      ossimCallback1<const ossimFilename&>* cb = 0;
-
-      // Wrap in try catch block as excptions can be thrown under the hood.
-      try
-      {
-         m_requestedRect = region;
-         
-         ossimFilename f = m_connectionString;
-         if ( f.exists() )
-         {
-            // Walk the directory
-            m_fileWalker = new ossimFileWalker();
-            m_fileWalker->initializeDefaultFilterList();
-
-            m_fileWalker->setNumberOfThreads( ossim::getNumberOfThreads() );
-
-            // Must set this so we can stop recursion on directory based images.
-            m_fileWalker->setWaitOnDirFlag( true );
-            
-            cb = new ProcessFileCB(this, &ossimTiledElevationDatabase::processFile);
-            m_fileWalker->registerProcessFileCallback(cb);
-            m_fileWalker->walk(f);
-
-            mapRegion();
-         }
-         else
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << M << " ERROR: Connection string does not exists: "
-               << m_connectionString.c_str()  << endl;
-         }
-      }
-      catch (const ossimException& e)
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "Caught exception: " << e.what() << endl;
-         m_entries.clear();
-      }
-
-      // cleanup:
-      if ( m_fileWalker )
-      {
-         delete m_fileWalker;
-         m_fileWalker = 0;
-      }
-      if ( cb )
-      {
-         delete cb;
-         cb = 0;
-      }
-   }
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
-   }
-}
-
-void ossimTiledElevationDatabase::processFile(const ossimFilename& file)
-{
-   static const char M[] = "ossimTiledElevationDatabase::processFile";
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << M << " entered...\n" << "file: " << file << "\n";
-   }
-
-   ossimRefPtr<ossimSingleImageChain> sic = new ossimSingleImageChain();
-   if ( sic->open(file, false) ) // False for do not open overviews.
-   {
-      if ( isDirectoryBasedImage( sic->getImageHandler() ) )
-      {
-         // Tell the walker not to recurse this directory.
-         m_fileWalker->setRecurseFlag(false);
-      }
-     
-      ossimRefPtr<ossimImageHandler> ih = sic->getImageHandler();
-      if ( ih.valid() && (m_requestedRect.isLonLatNan() == false) )
-      {
-         ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
-         if ( geom.valid() == false )
-         {
-            std::string errMsg = M;
-            errMsg += " ERROR:\nNo image geometry for image: ";
-            errMsg += ih->getFilename().string();
-            throw ossimException(errMsg);
-         }
-         
-         ossimRefPtr<ossimProjection> proj = geom->getProjection();
-         if ( proj.valid() == false )
-         {
-            std::string errMsg = M;
-            errMsg += " ERROR:\nNo image projection for image: ";
-            errMsg += ih->getFilename().string();
-            throw ossimException(errMsg);
-         }
-         
-         // Get the bounding rect:
-         ossimGrect boundingRect;
-         getBoundingRect(geom, boundingRect);
-         
-         if ( boundingRect.isLonLatNan() )
-         {
-            std::string errMsg = M;
-            errMsg += " ERROR:\nBounding rect has nans for image: ";
-            errMsg += ih->getFilename().string();
-            throw ossimException(errMsg); 
-         }
-         
-         if ( boundingRect.intersects(m_requestedRect) )
-         {
-            bool addEntryToList = false;
-            
-            if ( m_entries.size() == 0 ) // First time through.
-            {
-               addEntryToList = true;
-               m_entryListRect = boundingRect;
-               m_referenceProj = proj;
-               m_meanSpacing = (geom->getMetersPerPixel().x + geom->getMetersPerPixel().y) / 2.0;
-            }
-            else 
-            {
-               addEntryToList = isCompatible( ih.get(), geom.get(), proj.get() );
-               if ( addEntryToList )
-               {
-                  // Expand the rectangle.
-                  m_entryListRect.combine(boundingRect);
-               }
-            }
-            
-            if ( addEntryToList )
-            {
-               // If we're keeping it add a cache to the chain.
-               sic->addCache();
-               
-               //---
-               // Create the entry and give to addEntry which checks for duplicates in case
-               // mapRegion was called consecutively.
-               //---
-               ossimTiledElevationEntry entry(boundingRect, sic);
-               addEntry(entry);
-
-               // Once the requested rect is filled abort the file walk.
-               if ( m_requestedRect.completely_within( m_entryListRect ) )
-               {
-                  m_fileWalker->setAbortFlag(true);
-               }
-            }
-         }
-      }
-      else
-      {
-         std::string errMsg = M;
-         errMsg += " ERROR:\nNo image geometry for image: ";
-         errMsg += ih->getFilename().string();
-         throw ossimException(errMsg);
-      }
-   }
-
-   if(traceDebug())
-   {
-      // Since ossimFileWalker is threaded output the file so we know which job exited.
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << "\nfile: " << file << "\nexited...\n";
-   }   
-}
-
-void ossimTiledElevationDatabase::addEntry(const ossimTiledElevationEntry& entry)
-{
-   bool result = true;
-   std::vector<ossimTiledElevationEntry>::const_iterator i = m_entries.begin();
-   while ( i != m_entries.end() )
-   {
-      if ( (*i).m_sic->getFilename() == entry.m_sic->getFilename() )
-      {
-         result = false; // In list already.
-         break;
-      }
-      ++i;
-   }
-   if ( result )
-   {
-      m_entries.push_back(entry); // Add to list.
-   }
-}
-
-void ossimTiledElevationDatabase::initializeReferenceProjection()
-{
-   if ( m_entries.size() )
-   {
-      ossimRefPtr<ossimImageHandler> ih = m_entries[0].m_sic->getImageHandler();
-      if ( ih.valid() )
-      {
-         ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
-         if ( geom.valid() )
-         {
-            m_referenceProj = geom->getProjection();
-         }
-         // else throw exception ??? (drb)
-      }
-   }
-}
-
-double ossimTiledElevationDatabase::getHeightAboveMSL(const ossimGpt& gpt)
-{
-   if ( m_grid )
-   {
-      return (*m_grid)(gpt.lon, gpt.lat);
-   }
-   return ossim::nan();
-}
-
-double ossimTiledElevationDatabase::getHeightAboveEllipsoid(const ossimGpt& gpt)
-{
-   double h = getHeightAboveMSL(gpt);
-   if(h != ossim::nan())
-   {
-      h += getOffsetFromEllipsoid(gpt);
-   }
-   return h;
-}
- 
-bool ossimTiledElevationDatabase::pointHasCoverage(const ossimGpt& gpt) const
-{
-   if ( theGroundRect.isLonLatNan() == false)
-   {
-      return theGroundRect.pointWithin(gpt);
-   }
-   return false;
-}
-
-bool ossimTiledElevationDatabase::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   static const char M[] = "ossimTiledElevationDatabase::loadState";
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << M << " entered..." << "\nkwl:\n" << kwl << "\n";
-   }     
-   bool result = false;
-   const char* lookup = kwl.find(prefix, "type");
-   if ( lookup )
-   {
-      std::string type = lookup;
-      if ( ( type == "image_directory" ) || ( type == "ossimTiledElevationDatabase" ) )
-      {
-         result = ossimElevationDatabase::loadState(kwl, prefix);
-      }
-   }
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " result=" << (result?"true\n":"false\n");
-   }
-
-   return result;
-}
-
-bool ossimTiledElevationDatabase::saveState(ossimKeywordlist& kwl, const char* prefix) const
-{
-   return ossimElevationDatabase::saveState(kwl, prefix);
-}
-
-// Private method:
-bool ossimTiledElevationDatabase::isDirectoryBasedImage(ossimRefPtr<ossimImageHandler> ih)
-{
-   bool result = false;
-   if ( ih.valid() )
-   {
-      // Get the image handler name.
-      ossimString imageHandlerName = ih->getClassName();
-      if ( (imageHandlerName == "ossimAdrgTileSource") ||
-           (imageHandlerName == "ossimCibCadrgTileSource") )  
-      {
-         result = true;
-      }
-   }
-   return result;
-}
-
-bool ossimTiledElevationDatabase::isCompatible(ossimImageHandler* ih,
-                                               ossimImageGeometry* geom,
-                                               ossimProjection* proj) const
-{
-   //---
-   // Check for match of the following against the first entry:
-   // bands
-   // projection
-   // scalar type
-   // scale
-   //---
-   bool result = false;
-
-   if ( m_entries.size() && ih && geom && proj )
-   {
-      ossimRefPtr<ossimImageHandler> entry0_ih = m_entries[0].m_sic->getImageHandler();
-      
-      // Check scalar type and bands.
-      if ( (entry0_ih->getOutputScalarType() == ih->getOutputScalarType()) &&
-           (entry0_ih->getNumberOfOutputBands() == ih->getNumberOfOutputBands()) )
-      {
-         // Check the scale.
-         ossimRefPtr<const ossimMapProjection> mapProj =
-            dynamic_cast<const ossimMapProjection*>(proj);
-         if ( mapProj.valid() )
-         {
-            ossimRefPtr<const ossimMapProjection> refMapProj =
-               dynamic_cast<const ossimMapProjection*>(m_referenceProj.get());
-            
-            if ( mapProj->isGeographic() )
-            {
-               if ( refMapProj->getDecimalDegreesPerPixel() ==
-                    mapProj->getDecimalDegreesPerPixel() )
-               {
-                  result = true;
-               }
-               else if ( refMapProj->getMetersPerPixel() ==
-                         mapProj->getMetersPerPixel() )
-               {
-                  result = true;
-               }
-            }
-         }
-         else // sensor model
-         {
-            if ( proj->getMetersPerPixel() == m_referenceProj->getMetersPerPixel() )
-            {
-               result = true;
-            }
-         }
-      }
-   }
-   
-   return result;
-}
-
-void ossimTiledElevationDatabase::getBoundingRect(
-   ossimRefPtr<ossimImageGeometry> geom, ossimGrect& boundingRect) const
-{
-   if ( geom.valid() )
-   {
-      std::vector<ossimGpt> corner(4);
-      if ( geom->getCornerGpts(corner[0], corner[1], corner[2], corner[3]) )
-      {
-         ossimGpt ulGpt(corner[0]);
-         ossimGpt lrGpt(corner[0]);
-         for ( ossim_uint32 i = 1; i < 4; ++i )
-         {
-            if ( corner[i].lon < ulGpt.lon ) ulGpt.lon = corner[i].lon;
-            if ( corner[i].lat > ulGpt.lat ) ulGpt.lat = corner[i].lat;
-            if ( corner[i].lon > lrGpt.lon ) lrGpt.lon = corner[i].lon;
-            if ( corner[i].lat < lrGpt.lat ) lrGpt.lat = corner[i].lat;
-         }
-         boundingRect = ossimGrect(ulGpt, lrGpt);
-      }
-      else
-      {
-         boundingRect.makeNan();
-      }
-   }
-}
-void ossimTiledElevationDatabase::mapRegion()
-{
-   static const char M[] = "ossimTiledElevationDatabase::mapRegion";
-   
-   if ( m_entries.size() && ( m_requestedRect.isLonLatNan() == false ) )
-   {
-      ossimRefPtr<ossimOrthoImageMosaic> mosaic = new ossimOrthoImageMosaic();
-      std::vector<ossimTiledElevationEntry>::iterator i = m_entries.begin();
-      while ( i != m_entries.end() )
-      {
-         mosaic->connectMyInputTo( (*i).m_sic.get() );
-         ++i;
-      }
-
-      // Compute the requested rectangle in view space.
-      ossimRefPtr<ossimImageGeometry> geom = mosaic->getImageGeometry();
-      if ( geom.valid() )
-      {
-         ossimDpt ulDpt;
-         ossimDpt lrDpt;
-         geom->worldToLocal(m_requestedRect.ul(), ulDpt);
-         geom->worldToLocal(m_requestedRect.lr(), lrDpt);
-
-         // Expand out to fall on even view coordinates.
-         ulDpt.x = std::floor(ulDpt.x);
-         ulDpt.y = std::floor(ulDpt.y);
-         lrDpt.x = std::ceil(lrDpt.x);
-         lrDpt.y = std::floor(lrDpt.y);
-
-         // Get new(expanded) corners in ground space.
-         ossimGpt ulGpt;
-         ossimGpt lrGpt;
-         geom->localToWorld(ulDpt, ulGpt);
-         geom->localToWorld(lrDpt, lrGpt);
-         theGroundRect = ossimGrect(ulGpt, lrGpt);
-            
-         // Expanded requested rect in view space.
-         ossimIpt ulIpt = ulDpt;
-         ossimIpt lrIpt = lrDpt;
-         const ossimIrect VIEW_RECT(ulIpt, lrIpt);
-
-         // Get the data.
-         ossimRefPtr<ossimImageData> data = mosaic->getTile(VIEW_RECT, 0);
-         if ( data.valid() )
-         {
-            // Initialize the grid:
-            const ossimIpt SIZE( data->getWidth(), data->getHeight() );
-            const ossimDpt ORIGIN(ulGpt.lon, lrGpt.lat); // SouthWest corner
-            const ossimDpt SPACING( (lrGpt.lon-ulGpt.lon)/(SIZE.x-1),
-                                    (ulGpt.lat-lrGpt.lat)/(SIZE.y-1) );
-            if ( !m_grid ) m_grid = new ossimDblGrid();
-            m_grid->initialize(SIZE, ORIGIN, SPACING, ossim::nan());
-
-            if ( traceDebug() )
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG)
-                  << M
-                  << "\nrequested view rect: " << VIEW_RECT
-                  << "\nexpanded ground rect: " << theGroundRect
-                  << "\norigin:  " << ORIGIN
-                  << "\nsize:    " << SIZE
-                  << "\nspacing: " << SPACING << std::endl;
-            }
-
-            // Fill the grid:
-            switch( data->getScalarType() )
-            {
-               case OSSIM_SINT16:
-               {
-                  fillGrid(ossim_sint16(0), data);
-                  break;
-               }
-               case OSSIM_SINT32:
-               {
-                  fillGrid(ossim_sint32(0), data);
-                  break;
-               }
-               case OSSIM_FLOAT32:
-               {
-                  fillGrid(ossim_float32(0), data);
-                  break;
-               }
-               case OSSIM_FLOAT64:
-               {
-                  fillGrid(ossim_float64(0), data);
-                  break;
-               }
-               case OSSIM_UINT8:
-               case OSSIM_SINT8:
-               case OSSIM_USHORT11:
-               case OSSIM_UINT16:
-               case OSSIM_UINT32:
-               case OSSIM_NORMALIZED_DOUBLE:
-               case OSSIM_NORMALIZED_FLOAT:
-               case OSSIM_SCALAR_UNKNOWN:
-               default:
-               {
-                  std::string errMsg = M;
-                  errMsg += " ERROR:\nUnhandled scalar type: ";
-                  errMsg += data->getScalarTypeAsString().string();
-                  throw ossimException(errMsg);
-               }
-            }
-            
-         } // if ( data.valid() )
-
-      } // if ( geom.valid() )
-
-   } // if ( m_entries.size() && ...
-}
-
-template <class T> void ossimTiledElevationDatabase::fillGrid(T /* dummyTemplate */,
-                                                              ossimRefPtr<ossimImageData> data)
-{
-   if ( data.valid() )
-   {
-      // Copy to grid reversing the lines as the ossimDblGrid's origin is the SW corner.
-      const ossim_float64 NP  = data->getNullPix(0);
-      const T* buf = static_cast<T*>(data->getBuf(0));
-      if ( buf )
-      {
-         const ossimIpt SIZE( data->getWidth(), data->getHeight() );
-         ossim_int32 bufIdx = (SIZE.y-1) * data->getWidth();
-         ossim_int32 grdY = 0;
-         for (ossim_int32 y = SIZE.y-1; y >= 0; --y)
-         {
-            for (ossim_int32 x = 0; x < SIZE.x; ++ x)
-            {
-               ossim_float64 v = static_cast<ossim_float64>(buf[bufIdx+x]);
-               m_grid->setNode(x, grdY, (v!=NP?v:ossim::nan()) );
-            }
-            bufIdx -= data->getWidth();
-            ++grdY;
-         }
-      }
-   }
-}
-
-// Hidden from use...
-ossimTiledElevationDatabase::ossimTiledElevationDatabase(
-   const ossimTiledElevationDatabase& /* copy_this */)
-{
-}
-
-// Hidden from ues...
-const ossimTiledElevationDatabase& ossimTiledElevationDatabase::operator=(
-   const ossimTiledElevationDatabase& /* rhs */)
-{
-   return *this;
-}
-
-// Private container class:
-ossimTiledElevationDatabase::ossimTiledElevationEntry::ossimTiledElevationEntry()
-   : m_rect(),
-     m_sic(0)
-{}
-                                                   
-ossimTiledElevationDatabase::ossimTiledElevationEntry::ossimTiledElevationEntry(
-   const ossimGrect& rect, ossimRefPtr<ossimSingleImageChain> sic )
-   : m_rect(rect),
-     m_sic(sic)
-{}
-
diff --git a/src/ossim/font/.cvsignore b/src/ossim/font/.cvsignore
deleted file mode 100644
index a438335..0000000
--- a/src/ossim/font/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.d
diff --git a/src/ossim/imaging/.cvsignore b/src/ossim/imaging/.cvsignore
deleted file mode 100644
index a438335..0000000
--- a/src/ossim/imaging/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.d
diff --git a/src/ossim/imaging/ossim3x3ConvolutionFilter.cpp b/src/ossim/imaging/ossim3x3ConvolutionFilter.cpp
deleted file mode 100644
index dab388e..0000000
--- a/src/ossim/imaging/ossim3x3ConvolutionFilter.cpp
+++ /dev/null
@@ -1,633 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossim3x3ConvolutionFilter.cpp 12956 2008-06-02 01:38:50Z dburken $
-
-#include <cstdlib>
-#include <ossim/imaging/ossim3x3ConvolutionFilter.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/base/ossimMatrixProperty.h>
-
-RTTI_DEF1(ossim3x3ConvolutionFilter, "ossim3x3ConvolutionFilter", ossimImageSourceFilter);
-
-ossim3x3ConvolutionFilter::ossim3x3ConvolutionFilter(ossimObject* owner)
-   :ossimImageSourceFilter(owner),
-    theTile(NULL),
-    theNullPixValue(0),
-    theMinPixValue(0),
-    theMaxPixValue(0)
-{
-   theKernel[0][0] = 0.0; theKernel[0][1] = 0.0; theKernel[0][2] = 0.0;
-   theKernel[1][0] = 0.0; theKernel[1][1] = 1.0; theKernel[1][2] = 0.0;
-   theKernel[2][0] = 0.0; theKernel[2][1] = 0.0; theKernel[2][2] = 0.0;
-   
-}
-
-ossim3x3ConvolutionFilter::~ossim3x3ConvolutionFilter()
-{
-}
-
-ossimRefPtr<ossimImageData> ossim3x3ConvolutionFilter::getTile(
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   if(!theInputConnection)
-   {
-      return theTile;
-   }
-
-   if(!isSourceEnabled())
-   {
-      return theInputConnection->getTile(tileRect, resLevel);
-   }
-
-   //---
-   // We have a 3x3 matrix so stretch the rect out to cover
-   // the required pixels.  We only need 1 pixel to the left
-   // and right of the center pixel.
-   //---
-   ossimIrect newRect(ossimIpt(tileRect.ul().x - 1,
-                               tileRect.ul().y - 1),
-                      ossimIpt(tileRect.lr().x + 1,
-                               tileRect.lr().y + 1));
-   
-   ossimRefPtr<ossimImageData> data = theInputConnection->getTile(newRect,
-                                                                  resLevel);
-
-   if(!data.valid() || !data->getBuf())
-   {
-      return data;
-   }
-
-    // First time through or after an initialize()...
-   if (!theTile.valid())
-   {
-      allocate();
-      if (!theTile.valid()) // Should never happen!
-      {
-         return data;
-      }
-   }
-
-   // First time through, after an initialize() or a setKernel()...
-   if (!theNullPixValue.size())
-   {
-      computeNullMinMax();
-      if (!theNullPixValue.size()) // Should never happen!
-      {
-         return data;
-      }
-   }
-
-   theTile->setImageRectangle(tileRect);
-   theTile->makeBlank();
-   
-   switch(data->getScalarType())
-   {
-      case OSSIM_UCHAR:
-      {
-         if(data->getDataObjectStatus() == OSSIM_FULL)
-         {
-            convolveFull(static_cast<ossim_uint8>(0), data, theTile);
-         }
-         else
-         {
-            convolvePartial(static_cast<ossim_uint8>(0), data, theTile);
-         }
-         break;
-      }
-      case OSSIM_FLOAT: 
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         if(data->getDataObjectStatus() == OSSIM_FULL)
-         {
-            convolveFull(static_cast<float>(0), data, theTile);
-         }
-         else
-         {
-            convolvePartial(static_cast<float>(0), data, theTile);
-         }
-         break;
-      }
-      case OSSIM_USHORT16:
-      case OSSIM_USHORT11:
-      {
-         if(data->getDataObjectStatus() == OSSIM_FULL)
-         {
-            convolveFull(static_cast<ossim_uint16>(0), data, theTile);
-         }
-         else
-         {
-            convolvePartial(static_cast<ossim_uint16>(0), data, theTile);
-         }
-         break;
-      }
-      case OSSIM_SSHORT16:
-      {
-         if(data->getDataObjectStatus() == OSSIM_FULL)
-         {
-            convolveFull(static_cast<ossim_sint16>(0), data, theTile);
-         }
-         else
-         {
-            convolvePartial(static_cast<ossim_sint16>(0), data, theTile);
-         }
-         break;
-      }
-      case OSSIM_DOUBLE:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         if(data->getDataObjectStatus() == OSSIM_FULL)
-         {
-            convolveFull(static_cast<double>(0), data, theTile);
-      }
-      else
-      {
-         convolvePartial(static_cast<double>(0), data, theTile);
-      }
-         break;
-      }
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossim3x3ConvolutionFilter::getTile WARNING:\n"
-            << "Scalar type = " << theTile->getScalarType()
-            << " Not supported by ossim3x3ConvolutionFilter" << endl;
-         break;
-      }
-   }
-   theTile->validate();
-   
-   return theTile;
-}
-
-
-template<class T> void ossim3x3ConvolutionFilter::convolvePartial(
-   T,
-   ossimRefPtr<ossimImageData> inputData,
-   ossimRefPtr<ossimImageData> outputData)
-{
-   // let's set up some temporary variables so we don't
-   // have to call the functions in loops.  Iknow that compilers
-   // typically optimize this out but if we are in debug mode 
-   // with no optimization it will still run fast
-   //
-   double sum = 0.0;
-   ossim_int32 inputW          = (ossim_int32)inputData->getWidth();
-   ossim_int32 outputW         = (ossim_int32)outputData->getWidth();
-   ossim_int32 outputH         = (ossim_int32)outputData->getHeight();
-   ossim_int32 numberOfBands   = (ossim_int32)inputData->getNumberOfBands();
-   ossimIpt outputOrigin  = outputData->getOrigin();
-   ossimIpt inputOrigin   = inputData->getOrigin();
-   
-   ossim_int32 startInputOffset = std::abs(outputOrigin.y - inputOrigin.y)*
-      inputW + std::abs(outputOrigin.x - inputOrigin.x);
-   ossim_int32 ulKernelStart    = -inputW - 1;
-   ossim_int32 leftKernelStart  = -1;
-   ossim_int32 llKernelStart    = inputW  - 1;
-   
-   T* ulKernelStartBuf    = NULL;
-   T* leftKernelStartBuf  = NULL;
-   T* llKernelStartBuf    = NULL;
-   
-   for(ossim_int32 band = 0; band < numberOfBands; ++band)
-   {
-      T* inputBuf  = static_cast<T*>(inputData->getBuf(band))+startInputOffset;
-      T* outputBuf = static_cast<T*>(outputData->getBuf(band));
-      T maxPix     = static_cast<T>(getMaxPixelValue(band));
-      T minPix     = static_cast<T>(getMinPixelValue(band));      
-      T nullPix    = static_cast<T>(inputData->getNullPix(band));
-      T oNullPix   = static_cast<T>(getNullPixelValue(band));
-      
-      if(inputBuf&&outputBuf)
-      {
-         for(ossim_int32 row = 0; row < outputW; ++row)
-         {
-            ossim_int32 rowOffset    = inputW*row;
-            ulKernelStartBuf   = inputBuf + (rowOffset + ulKernelStart);
-            leftKernelStartBuf = inputBuf + (rowOffset + leftKernelStart);
-            llKernelStartBuf   = inputBuf + (rowOffset + llKernelStart);
-            for(ossim_int32 col = 0; col < outputH; ++col)
-            {
-
-               if((ulKernelStartBuf[0]   != nullPix)&&
-                  (ulKernelStartBuf[1]   != nullPix)&&
-                  (ulKernelStartBuf[2]   != nullPix)&&
-                  (leftKernelStartBuf[0] != nullPix)&&
-                  (leftKernelStartBuf[1] != nullPix)&&
-                  (leftKernelStartBuf[2] != nullPix)&&
-                  (llKernelStartBuf[0]   != nullPix)&&
-                  (llKernelStartBuf[1]   != nullPix)&&
-                  (llKernelStartBuf[2]   != nullPix))
-               {
-                  sum = theKernel[0][0]*(double)ulKernelStartBuf[0] +
-                        theKernel[0][1]*(double)ulKernelStartBuf[1] +
-                        theKernel[0][2]*(double)ulKernelStartBuf[2] +
-                        theKernel[1][0]*(double)leftKernelStartBuf[0] +
-                        theKernel[1][1]*(double)leftKernelStartBuf[1] +
-                        theKernel[1][2]*(double)leftKernelStartBuf[2] +
-                        theKernel[2][0]*(double)llKernelStartBuf[0] +
-                        theKernel[2][1]*(double)llKernelStartBuf[1] +
-                        theKernel[2][2]*(double)llKernelStartBuf[2];
-                  
-                  if(sum > maxPix)
-                  {
-                     *outputBuf = maxPix;
-                  }
-                  else if(sum < minPix)
-                  {
-                     *outputBuf = minPix;
-                  }
-                  else
-                  {
-                     *outputBuf = static_cast<T>(sum);
-                  }
-               }
-               else {
-                  *outputBuf = oNullPix;
-               }
-               //
-               // Need to implement the convolution here
-               //
-               
-               ++ulKernelStartBuf;
-               ++leftKernelStartBuf;
-               ++llKernelStartBuf;
-               ++outputBuf;
-            }
-         }
-      }
-   }
-}
-
-template<class T> void ossim3x3ConvolutionFilter::convolveFull(
-   T,
-   ossimRefPtr<ossimImageData> inputData,
-   ossimRefPtr<ossimImageData> outputData)
-{
-   // let's set up some temporary variables so we don't
-   // have to call the functions in loops.  Iknow that compilers
-   // typically optimize this out but if we are in debug mode 
-   // with no optimization it will still run fast
-   //
-   double sum = 0.0;
-   ossim_int32 inputW = static_cast<ossim_int32>(inputData->getWidth());
-   ossim_uint32 outputW       = outputData->getWidth();
-   ossim_uint32 outputH       = outputData->getHeight();
-   ossim_uint32 numberOfBands = inputData->getNumberOfBands();
-   ossimIpt outputOrigin = outputData->getOrigin();
-   ossimIpt inputOrigin  = inputData->getOrigin();
-   
-   ossim_int32 startInputOffset = std::abs(outputOrigin.y - inputOrigin.y)*
-      inputW + std::abs(outputOrigin.x - inputOrigin.x);
-   ossim_int32 ulKernelStart    = -inputW - 1;
-   ossim_int32 leftKernelStart  = -1;
-   ossim_int32 llKernelStart    = inputW  - 1;
-   
-   T* ulKernelStartBuf   = NULL;
-   T* leftKernelStartBuf = NULL;
-   T* llKernelStartBuf   = NULL;
-   
-   for(ossim_uint32 band = 0; band < numberOfBands; ++band)
-   {
-      T* inputBuf  = static_cast<T*>(inputData->getBuf(band))+startInputOffset;
-      T* outputBuf = static_cast<T*>(outputData->getBuf(band));
-      T maxPix     = static_cast<T>(getMaxPixelValue(band));
-      T minPix     = static_cast<T>(getMinPixelValue(band));
-      
-      if(inputBuf&&outputBuf)
-      {
-         for(ossim_uint32 row = 0; row < outputW; ++row)
-         {
-            ossim_int32 rowOffset    = inputW*row;
-            ulKernelStartBuf   = inputBuf + (rowOffset + ulKernelStart);
-            leftKernelStartBuf = inputBuf + (rowOffset + leftKernelStart);
-            llKernelStartBuf   = inputBuf + (rowOffset + llKernelStart);
-            for(ossim_uint32 col = 0; col < outputH; ++col)
-            {
-               sum = theKernel[0][0]*(double)ulKernelStartBuf[0] +
-                     theKernel[0][1]*(double)ulKernelStartBuf[1] +
-                     theKernel[0][2]*(double)ulKernelStartBuf[2] +
-                     theKernel[1][0]*(double)leftKernelStartBuf[0] +
-                     theKernel[1][1]*(double)leftKernelStartBuf[1] +
-                     theKernel[1][2]*(double)leftKernelStartBuf[2] +
-                     theKernel[2][0]*(double)llKernelStartBuf[0] +
-                     theKernel[2][1]*(double)llKernelStartBuf[1] +
-                     theKernel[2][2]*(double)llKernelStartBuf[2];
-               
-               if(sum > maxPix)
-               {
-                  *outputBuf = maxPix;
-               }
-               else if(sum < minPix)
-               {
-                  *outputBuf = minPix;
-               }
-               else
-               {
-                  *outputBuf = static_cast<T>(sum);
-               }
-               //
-               // Need to implement the convolution here.
-               //
-
-               
-               ++ulKernelStartBuf;
-               ++leftKernelStartBuf;
-               ++llKernelStartBuf;
-               ++outputBuf;
-            }
-         }
-      }
-   }
-}
-
-void ossim3x3ConvolutionFilter::initialize()
-{
-   //---
-   // NOTE:
-   // Since initialize get called often sequentially we will wipe things slick
-   // but not reallocate to avoid multiple delete/allocates.
-   //
-   // On the first getTile call things will be reallocated/computed.
-   //---
-   theTile = NULL;
-   clearNullMinMax();
-}
-
-void ossim3x3ConvolutionFilter::allocate()
-{   
-   if(theInputConnection)
-   {
-      ossimImageDataFactory* idf = ossimImageDataFactory::instance();
-      
-      theTile = idf->create(this,
-                            this);
-      
-      theTile->initialize();
-   }
-}
-
-void ossim3x3ConvolutionFilter::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property) return;
-   if(property->getName() == "Kernel")
-   {
-      ossimMatrixProperty* matrixProperty = PTR_CAST(ossimMatrixProperty,
-                                                     property.get());
-      if(matrixProperty)
-      {
-         theKernel[0][0] = (*matrixProperty)(0,0);
-         theKernel[1][0] = (*matrixProperty)(1,0);
-         theKernel[2][0] = (*matrixProperty)(2,0);
-         theKernel[0][1] = (*matrixProperty)(0,1);
-         theKernel[1][1] = (*matrixProperty)(1,1);
-         theKernel[2][1] = (*matrixProperty)(2,1);
-         theKernel[0][2] = (*matrixProperty)(0,2);
-         theKernel[1][2] = (*matrixProperty)(1,2);
-         theKernel[2][2] = (*matrixProperty)(2,2);
-
-      }
-      else
-      {
-         ossimImageSourceFilter::setProperty(property);
-      }
-   }
-   else
-   {
-      ossimImageSourceFilter::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossim3x3ConvolutionFilter::getProperty(const ossimString& name)const
-{
-   if(name == "Kernel")
-   {
-      ossimMatrixProperty* property = new ossimMatrixProperty(name);
-      property->resize(3,3);
-      (*property)(0,0) = theKernel[0][0];
-      (*property)(1,0) = theKernel[1][0];
-      (*property)(2,0) = theKernel[2][0];
-      (*property)(0,1) = theKernel[0][1];
-      (*property)(1,1) = theKernel[1][1];
-      (*property)(2,1) = theKernel[2][1];
-      (*property)(0,2) = theKernel[0][2];
-      (*property)(1,2) = theKernel[1][2];
-      (*property)(2,2) = theKernel[2][2];
-      property->setCacheRefreshBit();
-
-      return property;
-   }
-   return ossimImageSourceFilter::getProperty(name);
-}
-
-void ossim3x3ConvolutionFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageSourceFilter::getPropertyNames(propertyNames);
-   propertyNames.push_back("Kernel");
-}
-
-bool ossim3x3ConvolutionFilter::saveState(ossimKeywordlist& kwl,
-                                          const char* prefix)const
-{   
-   kwl.add(prefix,
-           "rows",
-           3,
-           true);
-   
-   kwl.add(prefix,
-           "cols",
-           3,
-           true);
-   
-   for(ossim_int32 row = 0; row < 3; ++row)
-   {
-      for(ossim_int32 col =0; col < 3; ++col)
-      {
-         ossimString newPrefix = "m" +
-                                 ossimString::toString(row+1) + "_" +
-                                 ossimString::toString(col+1);
-         kwl.add(prefix,
-                 newPrefix,
-                 theKernel[row][col],
-                 true);          
-      }
-   }
-
-   
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
-
-
-bool ossim3x3ConvolutionFilter::loadState(const ossimKeywordlist& kwl,
-                                          const char* prefix)
-{
-   ossimString newPrefix = prefix;
-   newPrefix += ossimString("m");
-   
-   for(ossim_int32 r = 0; r < 3; r++)
-   {
-      for(ossim_int32 c = 0; c < 3; c++)
-      {
-         theKernel[r][c] = 0.0;
-         
-         ossimString value = ossimString::toString(r+1);
-         value += "_";
-         value += ossimString::toString(c+1);
-         
-         const char* v = kwl.find(newPrefix.c_str(),
-                                  value.c_str());
-         if(v)
-         {
-            theKernel[r][c] = ossimString(v).toDouble();
-         }
-      }
-   }
-   
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
-
-void ossim3x3ConvolutionFilter::getKernel(double kernel[3][3])
-{
-   kernel[0][0] = theKernel[0][0];
-   kernel[0][1] = theKernel[0][1];
-   kernel[0][2] = theKernel[0][2];
-   kernel[1][0] = theKernel[1][0];
-   kernel[1][1] = theKernel[1][1];
-   kernel[1][2] = theKernel[1][2];
-   kernel[2][0] = theKernel[2][0];
-   kernel[2][1] = theKernel[2][1];
-   kernel[2][2] = theKernel[2][2];
-}
-
-void ossim3x3ConvolutionFilter::setKernel(double kernel[3][3])
-{
-   theKernel[0][0] = kernel[0][0];
-   theKernel[0][1] = kernel[0][1];
-   theKernel[0][2] = kernel[0][2];
-   theKernel[1][0] = kernel[1][0];
-   theKernel[1][1] = kernel[1][1];
-   theKernel[1][2] = kernel[1][2];
-   theKernel[2][0] = kernel[2][0];
-   theKernel[2][1] = kernel[2][1];
-   theKernel[2][2] = kernel[2][2];
-
-   // Will be recomputed first getTile call.
-   clearNullMinMax();
-}
-
-double ossim3x3ConvolutionFilter::getNullPixelValue(ossim_uint32 band)const
-{
-   if( isSourceEnabled() && (band < theNullPixValue.size()) )
-   {
-      return theNullPixValue[band];
-   }
-
-   return ossim::defaultNull(getOutputScalarType());
-}
-
-double ossim3x3ConvolutionFilter::getMinPixelValue(ossim_uint32 band)const
-{
-   if( isSourceEnabled() && (band < theMinPixValue.size()) )
-   {
-      return theMinPixValue[band];
-   }
-   
-   return ossimImageSource::getMinPixelValue(band);
-}
-
-double ossim3x3ConvolutionFilter::getMaxPixelValue(ossim_uint32 band)const
-{
-   if( isSourceEnabled() && (band < theMaxPixValue.size()) )
-   {
-      return theMaxPixValue[band];
-   }
-
-   return ossimImageSource::getMaxPixelValue(band);
-}
-
-void ossim3x3ConvolutionFilter::clearNullMinMax()
-{
-   theNullPixValue.clear();
-   theMinPixValue.clear();
-   theMaxPixValue.clear();
-}
-
-void ossim3x3ConvolutionFilter::computeNullMinMax()
-{
-   const ossim_uint32 BANDS = getNumberOfOutputBands();
-
-   theNullPixValue.resize(BANDS);
-   theMinPixValue.resize(BANDS);
-   theMaxPixValue.resize(BANDS);
-
-   ossim_float64 defaultNull = ossim::defaultNull(getOutputScalarType());
-   ossim_float64 defaultMin = ossim::defaultMin(getOutputScalarType());
-   ossim_float64 defaultMax = ossim::defaultMax(getOutputScalarType());
-  
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      if(theInputConnection)
-      {
-         ossim_float64 inputNull = theInputConnection->getNullPixelValue(band);
-         ossim_float64 inputMin  = theInputConnection->getMinPixelValue(band);
-         ossim_float64 inputMax  = theInputConnection->getMaxPixelValue(band);
-         ossim_float64 tempMin   = 0.0;
-         ossim_float64 tempMax   = 0.0;
-         ossim_float64 k         = 0.0;
-         for(int i=0;i<3;++i)
-         {
-            for(int j=0;j<3;++j)
-            {
-               k=theKernel[i][j];
-               tempMin += (k<0.0) ? k*inputMax : k*inputMin;
-               tempMax += (k>0.0) ? k*inputMax : k*inputMin;
-            }
-         }
-
-         if((inputNull < getMinPixelValue(band)) ||
-            (inputNull > getMaxPixelValue(band)))
-         {
-            theNullPixValue[band] = inputNull;
-         }
-         else
-         {
-            theNullPixValue[band] = defaultNull;
-         }
-
-         if((tempMin >= defaultMin) && (tempMin <= defaultMax))
-         {
-            theMinPixValue[band] = tempMin;
-         }
-         else
-         {
-            theMinPixValue[band] = defaultMin;
-         }
-
-         if((tempMax >= defaultMin) && (tempMax <= defaultMax))
-         {
-            theMaxPixValue[band] = tempMax;
-         }
-         else
-         {
-            theMaxPixValue[band] = defaultMax;
-         }
-         
-      }
-      else // No input connection...
-      {
-         theNullPixValue[band] = defaultNull;
-         theMinPixValue[band]  = defaultMin;
-         theMaxPixValue[band]  = defaultMax;
-      }
-      
-   } // End of band loop.
-}
diff --git a/src/ossim/imaging/ossimAOD.cpp b/src/ossim/imaging/ossimAOD.cpp
deleted file mode 100644
index 3d9d781..0000000
--- a/src/ossim/imaging/ossimAOD.cpp
+++ /dev/null
@@ -1,237 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2002 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Kathy Minear
-//
-// Description:
-// 
-// Class to compute Aerosol Optical Depth (AOD) for with atmospheric
-// correction.
-// 
-//
-//*************************************************************************
-// $Id: ossimAOD.cpp 17206 2010-04-25 23:20:40Z dburken $
-
-#include <math.h>
-#include <ossim/imaging/ossimAOD.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/imaging/ossimU8ImageData.h>
-
-
-RTTI_DEF1(ossimAOD, "ossimAOD", ossimImageSourceFilter)
-
-static ossimTrace traceDebug("ossimAOD:debug");
-
-ossimAOD::ossimAOD(ossimObject* owner)
-   :
-      ossimImageSourceFilter  (owner),  // base class
-      theTile                 (NULL)
-{
-   //***
-   // Set the base class "theEnableFlag" to off since no adjustments have been
-   // made yet.
-   //***
-   disableSource();
-
-   // Construction not complete.
-}
-
-ossimAOD::ossimAOD(ossimImageSource* inputSource)
-   :
-      ossimImageSourceFilter  (NULL, inputSource),  // base class
-      theTile                 (NULL)
-{
-   //***
-   // Set the base class "theEnableFlag" to off since no adjustments have been
-   // made yet.
-   //***
-   disableSource();
-
-   if (inputSource == NULL)
-   {
-      setErrorStatus();
-      cerr << "ossimAOD::ossimAOD ERROR:"
-           << "\nNull input source passed to constructor!" << endl;
-      return;
-   }
-
-   initialize();
-}
-
-
-ossimAOD::ossimAOD(ossimObject* owner,
-                                         ossimImageSource* inputSource)
-   :
-      ossimImageSourceFilter  (owner, inputSource),  // base class     
-      theTile                 (NULL)
-{
-   //***
-   // Set the base class "theEnableFlag" to off since no adjustments have been
-   // made yet.
-   //***
-   disableSource();
-
-   if (inputSource == NULL)
-   {
-      setErrorStatus();
-      cerr << "ossimAOD::ossimAOD ERROR:"
-           << "\nNull input source passed to constructor!" << endl;
-      return;
-   }
-
-   initialize();
-}
-
-ossimAOD::~ossimAOD()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimAOD::getTile(const ossimIrect& tile_rect,
-                                              ossim_uint32 resLevel)
-{
-   if (!theInputConnection)
-   {
-      return ossimRefPtr<ossimImageData>();
-   }
-      
-   // Fetch tile from pointer from the input source.
-   ossimRefPtr<ossimImageData> inputTile = theInputConnection->getTile(tile_rect,
-                                                                       resLevel);
-
-
-   if (!inputTile.valid())  // Just in case...
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimAOD::getTile ERROR:"
-         << "\nReceived null pointer to tile from input source!"
-         << "\nReturning blank tile."
-         << endl;
-      return inputTile;
-   }
-
-   ossimDataObjectStatus tile_status = inputTile->getDataObjectStatus();
-
-   if ( !theEnableFlag ||
-        (tile_status == OSSIM_NULL) ||
-        (tile_status == OSSIM_EMPTY) )
-   {
-      return inputTile;
-   }
-   
-   if (!theTile.valid())
-   {
-      allocate();
-      if (!theTile.valid())
-      {
-         return inputTile;
-      }
-   }
-
-   ossim_uint32 w     = tile_rect.width();
-   ossim_uint32 h     = tile_rect.height();
-   ossim_uint32 tw    = theTile->getWidth();
-   ossim_uint32 th    = theTile->getHeight();
-   // ossim_uint32 bands = theTile->getNumberOfBands();
-
-   // Set the origin of the output tile.
-   theTile->setOrigin(tile_rect.ul());
-
-   if(w*h != tw*th)
-   {
-      theTile->setWidthHeight(w, h);
-      theTile->initialize();
-   }
-   return theTile;
-}
-
-void ossimAOD::initialize()
-{
-   ossimImageSourceFilter::initialize();
-}
-
-void ossimAOD::allocate()
-{
-   if(theInputConnection)
-   {
-      theTile = ossimImageDataFactory::instance()->create(this,
-                                                          theInputConnection);
-      theTile->initialize();
-      setInitializedFlag(true);
-      clearErrorStatus();
-   }
-   else
-   {
-      setInitializedFlag(false);
-      setErrorStatus();
-      cerr << "ossimAOD::initialize ERROR:"
-           << "\nCannot call method when input connection is NULL!"
-           << endl;
-   };
-
-   verifyEnabled();
-}
-
-bool ossimAOD::loadState(const ossimKeywordlist& /* kwl */, const char* /* prefix */)
-{
-   static const char MODULE[] = "ossimAOD::loadState()";
-
-   if (traceDebug())  CLOG << "entering..." << endl;
-
-   if (!theTile)
-   {
-      cerr << MODULE << " ERROR:"
-           << "Not initialized..." << endl;
-      return false;
-   }
-
-   if (traceDebug())
-   {
-      CLOG << "DEBUG:"
-           << *this
-           << "\nreturning..."
-           << endl;
-   }
-   
-   return true;
-}
-
-
-void ossimAOD::verifyEnabled()
-{
-   // Check all the pointers...
-   if ( !theInputConnection    || !theTile )
-   {
-      disableSource();
-      return;
-   }
-
-   enableSource();
-}
-
-ostream& ossimAOD::print(ostream& os) const
-{
-   os << "ossimAOD:"
-      << "\ntheEnableFlag:  " << (theEnableFlag?"enabled":"disabled")
-      << endl;
-
-   return os;
-}
-
-ostream& operator<<(ostream& os, const ossimAOD& hr)
-{
-   return hr.print(os);
-}
-
-void ossimAOD::writeTemplate(ostream& /* os */)
-{
-}
-
-ossimString ossimAOD::getShortName() const
-{
-   return ossimString("Aerosol Optical Depth");
-}
diff --git a/src/ossim/imaging/ossimAnnotationLineObject.cpp b/src/ossim/imaging/ossimAnnotationLineObject.cpp
deleted file mode 100644
index 466fabc..0000000
--- a/src/ossim/imaging/ossimAnnotationLineObject.cpp
+++ /dev/null
@@ -1,184 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimAnnotationLineObject.cpp 13964 2009-01-14 16:30:07Z gpotts $
-
-#include <ossim/imaging/ossimAnnotationLineObject.h>
-#include <ossim/imaging/ossimRgbImage.h>
-
-RTTI_DEF1(ossimAnnotationLineObject,
-          "ossimAnnotationLineObject",
-          ossimAnnotationObject)
-
-ossimAnnotationLineObject::ossimAnnotationLineObject()
-   :ossimAnnotationObject(),
-    theStart(0,0),
-    theEnd(0,0),
-    theBoundingRect(0,0,0,0)
-{
-}
-
-ossimAnnotationLineObject::ossimAnnotationLineObject(const ossimIpt& start,
-                                                     const ossimIpt& end,
-                                                     unsigned char r,
-                                                     unsigned char g,
-                                                     unsigned char b,
-                                                     long thickness)
-   :ossimAnnotationObject(r, g, b, thickness),
-    theStart(start),
-    theEnd(end)
-{
-   computeBoundingRect();
-}
-
-ossimAnnotationLineObject::ossimAnnotationLineObject(long x1,
-                                                     long y1,
-                                                     long x2,
-                                                     long y2,
-                                                     unsigned char r,
-                                                     unsigned char g,
-                                                     unsigned char b,
-                                                     long thickness)
-   :ossimAnnotationObject(r, g, b, thickness),
-    theStart(x1, y1),
-    theEnd(x2, y2)
-{
-   computeBoundingRect();
-}
-
-ossimAnnotationLineObject::ossimAnnotationLineObject(const ossimAnnotationLineObject& rhs)
-      :ossimAnnotationObject(rhs),
-       theStart(rhs.theStart),
-       theEnd(rhs.theEnd),
-       theBoundingRect(rhs.theBoundingRect)
-{
-}
-
-ossimObject* ossimAnnotationLineObject::dup()const
-{
-   return new ossimAnnotationLineObject(*this);
-}
-
-void ossimAnnotationLineObject::applyScale(double x, double y)
-{
-   theStart.x = ossim::round<int>(theStart.x*x);
-   theStart.y = ossim::round<int>(theStart.y*y);
-   theEnd.x   = ossim::round<int>(theEnd.x*x);
-   theEnd.y   = ossim::round<int>(theEnd.y*y);
-   computeBoundingRect();
-}
-
-ossimAnnotationObject* ossimAnnotationLineObject::getNewClippedObject(const ossimDrect& rect)const
-{
-   ossimAnnotationLineObject* result = (ossimAnnotationLineObject*)NULL;
-   ossimDpt start = theStart;
-   ossimDpt end   = theEnd;
-   
-   if(rect.clip(start, end))
-   {
-      result = (ossimAnnotationLineObject*)dup();
-      result->setLine(start, end);
-   }
-   
-   return result;
-}
-
-bool ossimAnnotationLineObject::intersects(const ossimDrect& rect)const
-{
-   ossimDpt start = theStart;
-   ossimDpt end   = theEnd;
-   
-   return rect.clip(start, end);
-}
-
-void ossimAnnotationLineObject::draw(ossimRgbImage& anImage)const
-{
-   if(anImage.getImageData().valid())
-   {
-      anImage.setDrawColor(theRed, theGreen, theBlue);
-      anImage.setThickness(theThickness);
-      ossimDrect imageRect = anImage.getImageData()->getImageRectangle();
-      ossimDpt start = theStart;
-      ossimDpt end   = theEnd;
-      
-      if(anImage.getImageData().valid())
-      {
-         // we need to extend it by a couple of pixels since
-         // if a pixel lies on the edge and then another pixel is just off
-         // the edge we will get a stair step and so for several pixels
-         // the line might be inside the image rectangle but the clip
-         // algorithm will only draw 1 pixel since it thinks the first
-         // point is inside and the second point is outside and will
-         // execute the clip algorithm keeping only the first
-         // point.
-         ossimDrect clipRect(imageRect.ul().x - 10,
-                             imageRect.ul().y - 10,
-                             imageRect.lr().x + 10,
-                             imageRect.lr().y + 10);
-         // now we can draw.
-         if(clipRect.clip(start, end))
-         {
-            anImage.drawLine(ossimIpt((int)start.x,
-                                      (int)start.y),
-                             ossimIpt((int)end.x,
-                                      (int)end.y));
-         }
-      }
-   }
-}
-
-std::ostream& ossimAnnotationLineObject::print(std::ostream& out)const
-{
-   out << "line_start:    " << theStart << endl
-       << "line_end:      " << theEnd   << endl
-       << "bounding_rect: " << theBoundingRect << endl;
-   return out;
-}
-
-void ossimAnnotationLineObject::getBoundingRect(ossimDrect& rect)const
-{
-   rect = theBoundingRect;
-}
-
-void ossimAnnotationLineObject::computeBoundingRect()
-{
-   vector<ossimDpt> pts(2);
-      
-   pts[0] = theStart;
-   pts[1] = theEnd;
-
-   theBoundingRect = ossimDrect(pts);
-}
-
-void ossimAnnotationLineObject::setLine(const ossimDpt& start,
-                                        const ossimDpt& end)
-{
-   theStart = start;
-   theEnd   = end;
-   computeBoundingRect();
-}
-void ossimAnnotationLineObject::getLine(ossimDpt& start, ossimDpt& end)
-{
-   start = theStart;
-   end   = theEnd;
-}
-
-bool ossimAnnotationLineObject::isPointWithin(const ossimDpt& point)const
-{
-  if(theBoundingRect.pointWithin(point))
-  {
-    // we will use the implicit form of a line to determine if the point is
-    // on the line.  For now we will just return true if it is within the 
-    // bounding rect.
-    return true;
-  }
-
-  return false;
-}
diff --git a/src/ossim/imaging/ossimAnnotationMultiLineObject.cpp b/src/ossim/imaging/ossimAnnotationMultiLineObject.cpp
deleted file mode 100644
index 174a199..0000000
--- a/src/ossim/imaging/ossimAnnotationMultiLineObject.cpp
+++ /dev/null
@@ -1,191 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimAnnotationMultiLineObject.cpp 9094 2006-06-13 19:12:40Z dburken $
-#include <ossim/imaging/ossimAnnotationMultiLineObject.h>
-
-RTTI_DEF1(ossimAnnotationMultiLineObject,
-          "ossimAnnotationMultiLineObject",
-          ossimAnnotationObject);
-
-void ossimAnnotationMultiLineObject::draw(ossimRgbImage& anImage)const
-{
-   if(anImage.getImageData().valid())
-   {
-      anImage.setDrawColor(theRed, theGreen, theBlue);
-      anImage.setThickness(theThickness);
-      ossimDrect imageRect = anImage.getImageData()->getImageRectangle();
-
-      
-      
-      if(theBoundingRect.intersects(imageRect))
-      {
-         // we need to extend it by a couple of pixels since
-         // if a pixel lies on the edge and then another pixel is just off
-         // the edge we will get a stair step and so for several pixels
-         // the line might be inside the image rectangle but the clip
-         // algorithm will only draw 1 pixel since it thinks the first
-         // point is inside and the second point is outside and will
-         // execute the clip algorithm keeping only the first
-         // point.
-         ossimDrect clipRect(imageRect.ul().x - 10,
-                             imageRect.ul().y - 10,
-                             imageRect.lr().x + 10,
-                             imageRect.lr().y + 10);
-         
-         for(ossim_uint32 i = 0; i < thePolyLineList.size(); ++i)
-         {
-            const vector<ossimDpt>& vList = thePolyLineList[i].getVertexList();
-            
-            if(vList.size() == 1)
-            {
-               anImage.drawLine(ossimIpt(vList[0]),
-                                ossimIpt(vList[0]));
-            }
-            else
-            {
-               for(ossim_uint32 i2 = 0; i2 < (vList.size()-1); ++i2)
-               {
-                  ossimDpt start = vList[i2];
-                  ossimDpt end   = vList[i2+1];
-                  // now we can draw.
-                  if(clipRect.clip(start, end))
-                  {
-                     anImage.drawLine(ossimIpt((int)start.x,
-                                               (int)start.y),
-                                      ossimIpt((int)end.x,
-                                               (int)end.y));
-                  }
-               }
-            }
-         }
-      }
-   }
-}
-
-bool ossimAnnotationMultiLineObject::intersects(const ossimDrect& rect)const
-{
-
-   for(ossim_uint32 i = 0; i < thePolyLineList.size(); ++i)
-   {
-      if(thePolyLineList[i].isWithin(rect))
-      {
-         return true;
-      }
-   }
-   return false;
-}
-
-
-void ossimAnnotationMultiLineObject::applyScale(double x,
-                                                double y)
-{
-   for(ossim_uint32 i=0; i < thePolyLineList.size(); ++i)
-   {
-      vector<ossimDpt>& vList = thePolyLineList[i].getVertexList();
-      
-      for(ossim_uint32 i2 = 0; i2 < vList.size(); ++i2)
-      {
-         vList[i].x *= x;
-         vList[i].y *= y;
-         vList[i].x *= x;
-         vList[i].y *= y;
-      }
-   }
-   theBoundingRect *= ossimDpt(x, y);
-}
-
-ossimAnnotationObject* ossimAnnotationMultiLineObject::getNewClippedObject(const ossimDrect& rect)const
-{
-   ossimAnnotationMultiLineObject* result = (ossimAnnotationMultiLineObject*)NULL;
-
-   if(intersects(rect))
-   {
-      vector<ossimPolyLine> lineList;
-      vector<ossimPolyLine> tempResult;
-      
-      ossimDrect clipRect(rect.ul().x - 10,
-                          rect.ul().y - 10,
-                          rect.lr().x + 10,
-                          rect.lr().y + 10);
-
-      for(ossim_uint32 i =0; i< thePolyLineList.size();++i)
-      {
-         if(thePolyLineList[i].clipToRect(tempResult, clipRect))
-         {
-            lineList.insert(lineList.end(),
-                            tempResult.begin(),
-                            tempResult.end());
-         }
-      }
-      
-      if(lineList.size() > 0)
-      {
-         result = new ossimAnnotationMultiLineObject(lineList,
-                                                     theRed,
-                                                     theGreen,
-                                                     theBlue,
-                                                     theThickness);
-      }
-   }
-   
-   return result;
-}
-
-bool ossimAnnotationMultiLineObject::isPointWithin(const ossimDpt& imagePoint)const
-{
-   for(ossim_uint32 i=0; i < thePolyLineList.size(); ++i)
-   {
-      if(thePolyLineList[i].isPointWithin(imagePoint))
-      {
-         return true;
-      }
-      
-   }
-
-   return false;
-}
-
-void ossimAnnotationMultiLineObject::computeBoundingRect()
-{
-   theBoundingRect.makeNan();
-   
-   if(thePolyLineList.size() == 1)
-   {
-      theBoundingRect = thePolyLineList[0].getBoundingRect();
-   }
-   else if(thePolyLineList.size() > 1)
-   {
-      for(ossim_uint32 i = 0; i < thePolyLineList.size(); ++i)
-      {
-         ossimDrect rect = thePolyLineList[i].getBoundingRect();
-         if(theBoundingRect.hasNans())
-         {
-            theBoundingRect = rect;
-         }
-         else if(!rect.hasNans())
-         {
-            theBoundingRect = theBoundingRect.combine(rect);
-         }
-      }
-   }
-}
-
-std::ostream& ossimAnnotationMultiLineObject::print(std::ostream& out)const
-{
-   ossimAnnotationObject::print(out);
-
-   for(ossim_uint32 i = 0; i < thePolyLineList.size();++i)
-   {
-      out << thePolyLineList[i] << endl
-          <<"______________________________________"<<endl;
-   }
-   return out;
-}
diff --git a/src/ossim/imaging/ossimAppFixedTileCache.cpp b/src/ossim/imaging/ossimAppFixedTileCache.cpp
deleted file mode 100644
index 6423b2f..0000000
--- a/src/ossim/imaging/ossimAppFixedTileCache.cpp
+++ /dev/null
@@ -1,430 +0,0 @@
-//******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: This file contains the Application cache algorithm
-//
-//***********************************
-// $Id: ossimAppFixedTileCache.cpp 20127 2011-10-12 11:27:10Z gpotts $
-#include <algorithm>
-#include <sstream>
-#include <ossim/imaging/ossimAppFixedTileCache.h>
-#include <ossim/imaging/ossimFixedTileCache.h>
-#include <ossim/base/ossimPreferences.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimTrace.h>
-#include <OpenThreads/ScopedLock>
-
-ossimAppFixedTileCache* ossimAppFixedTileCache::theInstance = 0;
-ossimAppFixedTileCache::ossimAppFixedCacheId ossimAppFixedTileCache::theUniqueAppIdCounter = 0;
-const ossim_uint32 ossimAppFixedTileCache::DEFAULT_SIZE = 1024*1024*80;
-
-static const ossimTrace traceDebug("ossimAppFixedTileCache:debug");
-std::ostream& operator <<(std::ostream& out, const ossimAppFixedTileCache& rhs)
-{
-   std::map<ossimAppFixedTileCache::ossimAppFixedCacheId, ossimFixedTileCache*>::const_iterator iter = rhs.theAppCacheMap.begin();
-
-   if(iter == rhs.theAppCacheMap.end())
-   {
-      ossimNotify(ossimNotifyLevel_NOTICE)
-         << "***** APP CACHE EMPTY *****" << endl;
-   }
-   else
-   {
-      while(iter != rhs.theAppCacheMap.end())
-      {
-         out << "Cache id = "<< (*iter).first << " size = " << (*iter).second->getCacheSize() << endl;
-         ++iter;
-      }
-   }
-
-   return out;
-}
-
-
-ossimAppFixedTileCache::ossimAppFixedTileCache()
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimAppFixedTileCache::ossimAppFixedTileCache() DEBUG: entered ..." << std::endl;
-   }
-   theInstance = this;
-   theTileSize = ossimIpt(64, 64);
-   theCurrentCacheSize = 0;
-
-   // ossim::defaultTileSize(theTileSize);
-   
-   ossim_uint32 cacheSize = ossimString(ossimPreferences::instance()->findPreference("cache_size")).toUInt32()*(1024*1024);
-   const char* tileSize = ossimPreferences::instance()->findPreference("tile_size");
-   if(tileSize)
-   {
-      ossimString tempString(tileSize);
-      std::vector<ossimString> splitString;
-      tempString = tempString.trim();
-      tempString.split(splitString, " ");
-      if(splitString.size() > 1)
-      {
-         theTileSize.x = splitString[0].toInt32();
-         theTileSize.y = splitString[1].toInt32();
-      }
-      else 
-      {
-         theTileSize = ossimIpt(64,64);
-      }
-         
-    }
-   if(cacheSize)
-   {
-      setMaxCacheSize(cacheSize);
-   }
-   else
-   {
-      setMaxCacheSize(DEFAULT_SIZE);
-   }
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG: cache tile size = " << theTileSize << std::endl
-         << "Cache size = " << cacheSize << " bytes" << std::endl;
-   }
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimAppFixedTileCache::ossimAppFixedTileCache() DEBUG: leaving ..." << std::endl;
-   }
-}
-
-ossimAppFixedTileCache::~ossimAppFixedTileCache()
-{
-   deleteAll();
-}
-
-ossimAppFixedTileCache *ossimAppFixedTileCache::instance(ossim_uint32  maxSize)
-{
-   if(!theInstance)
-   {
-      theInstance = new ossimAppFixedTileCache;
-      if(maxSize)
-	{
-	  theInstance->setMaxCacheSize(maxSize);
-	}
-   }
-   return theInstance;
-}
-
-void ossimAppFixedTileCache::setMaxCacheSize(ossim_uint32 cacheSize)
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   theMaxGlobalCacheSize = cacheSize;
-   theMaxCacheSize = cacheSize;
-   //   theMaxCacheSize      = (ossim_uint32)(theMaxGlobalCacheSize*.2);
-}
-
-void ossimAppFixedTileCache::flush()
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   std::map<ossimAppFixedCacheId, ossimFixedTileCache*>::iterator currentIter = theAppCacheMap.begin();
-   
-   while(currentIter != theAppCacheMap.end())
-   {
-      (*currentIter).second->flush();
-      ++currentIter;
-   }
-   theCurrentCacheSize = 0;
-}
-
-void ossimAppFixedTileCache::flush(ossimAppFixedCacheId cacheId)
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   ossimFixedTileCache* cache = getCache(cacheId);
-   {
-      if(cache)
-      {
-         theCurrentCacheSize -= cache->getCacheSize();
-         cache->flush();
-      }
-   }
-}
-
-void ossimAppFixedTileCache::deleteCache(ossimAppFixedCacheId cacheId)
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   ossimRefPtr<ossimFixedTileCache> cache = getCache(cacheId);
-   {
-      std::map<ossimAppFixedCacheId, ossimFixedTileCache*>::iterator iter = theAppCacheMap.find(cacheId);
-      
-      if(cache.valid())
-      {
-         theAppCacheMap.erase(iter);
-         theCurrentCacheSize -= cache->getCacheSize();
-      }
-      cache = 0;
-   }
-}
-
-ossimAppFixedTileCache::ossimAppFixedCacheId ossimAppFixedTileCache::newTileCache(const ossimIrect& tileBoundaryRect,
-                                                                                  const ossimIpt& tileSize)
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   ossimAppFixedCacheId result = -1; 
-   ossimFixedTileCache* newCache = new ossimFixedTileCache;
-   if(tileSize.x == 0 ||
-      tileSize.y == 0)
-   {
-      // newCache->setRect(tileBoundaryRect, theTileSize);
-      newCache->setRect(tileBoundaryRect,
-                        newCache->getTileSize());
-   }
-   else
-   {
-      newCache->setRect(tileBoundaryRect, tileSize);
-   }
-   result = theUniqueAppIdCounter;
-   theAppCacheMap.insert(std::make_pair(result, newCache));
-   ++theUniqueAppIdCounter;
-   
-   return result;
-}
-
-ossimAppFixedTileCache::ossimAppFixedCacheId ossimAppFixedTileCache::newTileCache()
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   ossimAppFixedCacheId result = -1;
-   ossimFixedTileCache* newCache = new ossimFixedTileCache;
-   
-   {
-      result = theUniqueAppIdCounter;
-      theAppCacheMap.insert(std::make_pair(result, newCache));
-      ++theUniqueAppIdCounter;
-   }
-   
-   return result;
-   
-}
-
-void ossimAppFixedTileCache::setRect(ossimAppFixedCacheId cacheId,
-                                     const ossimIrect& boundaryTileRect)
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   ossimFixedTileCache* cache = getCache(cacheId);
-   if(cache)
-   {
-      
-      ossim_uint32 cacheSize = cache->getCacheSize();
-      // cache->setRect(boundaryTileRect, theTileSize);
-      cache->setRect(boundaryTileRect,
-                     cache->getTileSize());      
-      theCurrentCacheSize += (cache->getCacheSize() - cacheSize);
-   }
-}
-
-void ossimAppFixedTileCache::setTileSize(ossimAppFixedCacheId cacheId,
-                                         const ossimIpt& tileSize)
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   ossimFixedTileCache* cache = getCache(cacheId);
-   if(cache)
-   {
-      ossim_uint32 cacheSize = cache->getCacheSize();
-      cache->setRect(cache->getTileBoundaryRect(), tileSize);
-      theCurrentCacheSize += (cache->getCacheSize() - cacheSize);
-      theTileSize = cache->getTileSize();
-   }
-}
-
-ossimRefPtr<ossimImageData> ossimAppFixedTileCache::getTile(
-   ossimAppFixedCacheId cacheId,
-   const ossimIpt& origin)
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   ossimRefPtr<ossimImageData> result = 0;
-   ossimFixedTileCache* cache = getCache(cacheId);
-   if(cache)
-   {
-      result = cache->getTile(origin);
-   }
-
-   return result;
-}
-
-
-ossimRefPtr<ossimImageData> ossimAppFixedTileCache::addTile(
-                                                            ossimAppFixedCacheId cacheId,
-                                                            ossimRefPtr<ossimImageData> data,
-                                                            bool duplicateData)
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   ossimRefPtr<ossimImageData> result = 0;
-   ossimFixedTileCache *aCache = this->getCache(cacheId);
-   if(!aCache)
-   {         
-      return result;
-   }
-   ossim_uint32 dataSize = data->getDataSizeInBytes();
-
-   if( (theCurrentCacheSize+dataSize) > theMaxGlobalCacheSize)
-   {
-      shrinkGlobalCacheSize((ossim_int32)(theMaxGlobalCacheSize*0.1));
-   }
-
-   ossim_uint32 cacheSize = 0;
-   {
-      cacheSize = aCache->getCacheSize();
-   }
-   if(cacheSize > theMaxCacheSize)
-   {
-//       shrinkCacheSize(aCache,
-//                       (ossim_int32)(aCache->getCacheSize()*.1));
-      shrinkCacheSize(aCache,
-                      (ossim_int32)(1024*1024));
-   }
-   {
-      cacheSize = aCache->getCacheSize();
-      result    = aCache->addTile(data, duplicateData);
-   
-      theCurrentCacheSize += (aCache->getCacheSize() - cacheSize);
-   }
-   
-   return result;
-}
-
-void ossimAppFixedTileCache::deleteAll()
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   theCurrentCacheSize = 0;
-   theAppCacheMap.clear();
-}
-
-ossimRefPtr<ossimImageData> ossimAppFixedTileCache::removeTile(
-   ossimAppFixedCacheId cacheId,
-   const ossimIpt& origin)
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   ossimRefPtr<ossimImageData> result = 0;
-   
-   ossimFixedTileCache* cache = getCache(cacheId);
-   if(cache)
-   {
-      ossim_uint32 cacheSize = cache->getCacheSize();
-      result = cache->removeTile(origin);
-      theCurrentCacheSize += (cache->getCacheSize() - cacheSize);
-   }
-
-   return result;
-}
-
-void ossimAppFixedTileCache::deleteTile(ossimAppFixedCacheId cacheId,
-                                        const ossimIpt& origin)
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   ossimFixedTileCache* cache = getCache(cacheId);
-   if(cache)
-   {
-      ossim_uint32 cacheSize = cache->getCacheSize();
-      cache->deleteTile(origin);
-      theCurrentCacheSize += (cache->getCacheSize() - cacheSize);
-   }
-}
-
-ossimFixedTileCache* ossimAppFixedTileCache::getCache(
-   ossimAppFixedCacheId cacheId)
-{   
-   std::map<ossimAppFixedCacheId, ossimFixedTileCache*>::const_iterator
-      currentIter = theAppCacheMap.find(cacheId);
-   ossimFixedTileCache* result = 0;
-   
-   if(currentIter != theAppCacheMap.end())
-   {
-      result = (*currentIter).second;
-   }
-
-   return result;
-}
-
-void ossimAppFixedTileCache::shrinkGlobalCacheSize(ossim_int32 byteCount)
-{
-   if(static_cast<ossim_uint32>(byteCount) >= theCurrentCacheSize)
-   {
-      flush();
-   }
-   else
-   {
-      while(byteCount > 0)
-      {
-         std::map<ossimAppFixedCacheId, ossimFixedTileCache*>::iterator iter = theAppCacheMap.begin();
-         while( (iter != theAppCacheMap.end())&&(byteCount>0))
-         {
-            ossimFixedTileCache* cache = getCache((*iter).first);
-            if(cache)
-            {
-               ossim_uint32 before = cache->getCacheSize();
-               cache->deleteTile();
-               ossim_uint32 after = cache->getCacheSize();
-               ossim_uint32 delta = (before - after);
-               byteCount -= delta;
-               theCurrentCacheSize -= (delta);
-            }
-            ++iter;
-         }
-      }
-   }
-}
-
-void ossimAppFixedTileCache::shrinkCacheSize(ossimAppFixedCacheId id,
-                                             ossim_int32 byteCount)
-{
-   ossimFixedTileCache* cache = getCache(id);
-
-   if(cache)
-   {
-      shrinkCacheSize(cache, byteCount);
-   }
-}
-
-void ossimAppFixedTileCache::shrinkCacheSize(ossimFixedTileCache* cache,
-                                             ossim_int32 byteCount)
-{
-   if(cache)
-   {
-      ossim_int32 cacheSize = cache->getCacheSize();
-      if(cacheSize <= byteCount)
-      {
-         cache->flush();
-      }
-      else
-      {
-         while(byteCount > 0)
-         {
-            ossim_uint32 before = cache->getCacheSize();
-            cache->deleteTile();
-            ossim_uint32 after = cache->getCacheSize();
-            ossim_uint32 delta = std::abs((int)(before - after));
-            if(delta)
-            {
-               byteCount -= delta;
-               theCurrentCacheSize -= (delta);
-            }
-            else
-            {
-               byteCount = 0;
-            }
-         }
-      }
-   }
-}
-
-const ossimIpt& ossimAppFixedTileCache::getTileSize(ossimAppFixedCacheId cacheId)
-{
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(theMutex);
-   ossimFixedTileCache* cache = getCache(cacheId);
-   if(cache)
-   {
-      return cache->getTileSize();
-   }
-   return theTileSize;
-}
diff --git a/src/ossim/imaging/ossimAppTileCache.cpp b/src/ossim/imaging/ossimAppTileCache.cpp
deleted file mode 100644
index 163da1c..0000000
--- a/src/ossim/imaging/ossimAppTileCache.cpp
+++ /dev/null
@@ -1,302 +0,0 @@
-//******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-// Description: This file contains the Application cache algorithm
-//
-//***********************************
-// $Id: ossimAppTileCache.cpp 15766 2009-10-20 12:37:09Z gpotts $
-
-#include <ossim/imaging/ossimAppTileCache.h>
-#include <ossim/imaging/ossimTileCache.h>
-#include <ossim/base/ossimDataObject.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimPreferences.h>
-
-ossimAppTileCache* ossimAppTileCache::theInstance = 0;
-
-// we will need to grab this from the preferences
-const ossim_uint32 ossimAppTileCache::DEFAULT_SIZE          = 80*1024*1024;
-const ossim_uint32 ossimAppTileCache::DEFAULT_BUCKET_SIZE          = 293;
-ossimAppTileCache::ossimAppCacheId ossimAppTileCache::theUniqueAppIdCounter = 1;
-
-ossimAppTileCache *ossimAppTileCache::instance(ossim_uint32  maxSize)
-{
-   if(!theInstance)
-   {
-      if(maxSize < 1)
-      {
-         ossimString cacheSize = ossimPreferences::instance()->findPreference("cache_size");
-         if(cacheSize!="")
-         {
-            maxSize = cacheSize.toUInt32()*1024*1024;
-         }
-         else
-         {
-            maxSize = DEFAULT_SIZE;
-         }
-         ossimNotify(ossimNotifyLevel_NOTICE)
-            << "Setting SIZE----------------------- " << maxSize << std::endl;
-      }
-      theInstance = new ossimAppTileCache(maxSize);
-   }
-
-   return theInstance;
-}
-
-ossimAppTileCache::~ossimAppTileCache()
-{
-   deleteAll();
-}
-
-ossimAppTileCache::ossimAppCacheId ossimAppTileCache::newTileCache(ossim_uint32 bucketSize)
-{
-   ossimTileCache *aCache = 0;
-   ossimAppCacheId result = 0;
-
-   aCache = new ossimTileCache(bucketSize);
-
-   if(aCache)
-   {
-      theAppCache.insert(make_pair(theUniqueAppIdCounter, aCache));
-      result = theUniqueAppIdCounter;
-      ++theUniqueAppIdCounter;
-   }
-
-   return result;
-}
-
-/*!
- * Will retrieve a tile from the cache.
- */
-ossimDataObject *ossimAppTileCache::get(ossimAppCacheId id,
-                                        const ossimDpt3d &origin,
-                                        ossim_uint32 resLevel)
-{
-   ossimDataObject* result = 0;
-   if(id>0)
-   {
-      ossimTileCache *aCache = this->get(id);
-      if(aCache)
-      {
-         result = aCache->get(origin,
-                              resLevel);
-         if(result)
-         {
-            adjustQueue(id, origin, resLevel);
-         }
-      }
-   }
-
-   return result;
-}
-
-ossimRefPtr<ossimDataObject> ossimAppTileCache::removeTile(ossimAppCacheId id,
-                                              const ossimDpt3d &origin,
-                                              unsigned long resLevel)
-{
-   ossimRefPtr<ossimDataObject> result = 0;
-   if(id>0)
-   {
-      ossimTileCache *aCache = this->get(id);
-      if(aCache)
-      {
-         // remove from cache
-         result = aCache->remove(origin,
-                                 resLevel);
-         // adjust the byte count
-         if(result.valid())
-         {
-            theCurrentCacheSize -= result->getDataSizeInBytes();
-         }
-         removeTileFromQueue(id, origin, resLevel);
-      }
-   }
-
-   return result;
-}
-
-ossimRefPtr<ossimDataObject> ossimAppTileCache::insert(ossimAppCacheId appId,
-                                                       const ossimDpt3d &origin,
-                                                       const ossimDataObject* data,
-                                                       ossim_uint32 resLevel)
-{
-   static const char MODULE[] = "ossimAppTileCache::insert";
-   ossimDataObject *result = 0;
-
-   // find the cache and if it's not there then return NULL
-   ossimTileCache *aCache = this->get(appId);
-   if(!aCache)
-   {         
-      return result;
-   }
-   
-   ossimRefPtr<ossimDataObject> tileToInsert = 0;
-   long dataSize = data->getDataSizeInBytes();
-   
-   if( (theCurrentCacheSize+dataSize) > theMaxCacheSize)
-   {
-      do
-      {
-         ossimRefPtr<ossimDataObject> tile = removeTile();
-      }while((theCurrentCacheSize+dataSize) > theMaxCacheSize);
-   }
-
-   if(data)
-   {
-      tileToInsert = (ossimDataObject*)data->dup();
-
-      result = aCache->insert(origin,
-                              tileToInsert.get(),
-                              resLevel);
-      if(!result)
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << MODULE << " ERROR: can't insert and should not happen"
-            << endl;
-
-         tileToInsert = 0;
-      }
-      else
-      {
-         theCurrentCacheSize += dataSize;
-         theUsedQueue.push_back(ossimAppCacheTileInfo(appId,
-                                                 origin,
-                                                 resLevel));
-      }
-   }
-
-   return result;
-}
-
-
-ossimTileCache* ossimAppTileCache::get(ossimAppCacheId id)
-{
-   ossimTileCache *result=0;
-   
-   AppIdIterator anIterator = theAppCache.find(id);
-   
-   if(anIterator != theAppCache.end())
-   {
-      result = (*anIterator).second;
-   }
-
-   return result;
-}
-
-void ossimAppTileCache::deleteCache(ossimAppCacheId appId)
-{
-   // first delete the cache
-   AppIdIterator anIterator = theAppCache.find(appId);
-   if(anIterator != theAppCache.end())
-   {
-      ossimTileCache *aCache = (*anIterator).second;
-      theCurrentCacheSize -= aCache->sizeInBytes();
-
-      delete aCache;
-
-      theAppCache.erase(anIterator);      
-   }
-   // now delete all occurences of the appCacheId in the queue
-   // used for LRU algorithm.
-   deleteAppCacheFromQueue(appId);
-}
-
-void ossimAppTileCache::deleteAll()
-{
-   AppIdIterator iter = theAppCache.begin();
-
-   while(iter != theAppCache.end())
-   {
-      delete (*iter).second;
-      ++iter;
-   }
-   
-   theAppCache.clear();
-}
-
-void ossimAppTileCache::removeTileFromQueue(ossimAppCacheId appId,
-                                       const ossimDpt3d &origin,
-                                       ossim_uint32 resLevel)
-{
-   list<ossimAppCacheTileInfo>::iterator anIterator;
-
-   anIterator = theUsedQueue.begin();
-   while(anIterator != theUsedQueue.end())
-   {
-      if( ((*anIterator).theAppCacheId == appId) &&
-          ((*anIterator).theOrigin     == origin)&&
-          ((*anIterator).theResLevel   == resLevel))
-      {
-         theUsedQueue.erase(anIterator);
-         return;
-      }
-      else
-      {
-         ++anIterator;
-      }
-   }
-}
-
-void ossimAppTileCache::deleteAppCacheFromQueue(ossimAppCacheId appId)
-{
-   list<ossimAppCacheTileInfo>::iterator anIterator;
-
-   anIterator = theUsedQueue.begin();
-   while(anIterator != theUsedQueue.end())
-   {
-      if( (*anIterator).theAppCacheId == appId)
-      {
-         anIterator = theUsedQueue.erase(anIterator);
-      }
-      else
-      {
-         ++anIterator;
-      }
-   }
-}
-
-ossimRefPtr<ossimDataObject> ossimAppTileCache::removeTile()
-{
-   ossimRefPtr<ossimDataObject> result;
-   if(!theUsedQueue.empty())
-   {
-      ossimAppCacheTileInfo &info = *(theUsedQueue.begin());
-
-      ossimTileCache *aCache = get(info.theAppCacheId);
-      if(aCache)
-      {
-         result            = aCache->remove(info.theOrigin,
-                                            info.theResLevel);
-         theCurrentCacheSize -= result->getDataSizeInBytes();
-      }
-      theUsedQueue.erase(theUsedQueue.begin());
-   }
-
-   return result;
-}
-
-void ossimAppTileCache::adjustQueue(ossimAppCacheId id,
-                                    const ossimDpt3d &origin,
-                                    ossim_uint32 resLevel)
-{
-   list<ossimAppCacheTileInfo>::iterator anIterator = theUsedQueue.begin();
-   ossimAppCacheTileInfo info(id, origin, resLevel);
-   
-   while(anIterator != theUsedQueue.end())
-   {
-     
-      if((*anIterator) == info)
-      {
-         theUsedQueue.erase(anIterator);
-         theUsedQueue.push_back(info);
-         return;
-      }
-      ++anIterator;
-   }              
-}
diff --git a/src/ossim/imaging/ossimArcInfoGridWriter.cpp b/src/ossim/imaging/ossimArcInfoGridWriter.cpp
deleted file mode 100644
index 59d8449..0000000
--- a/src/ossim/imaging/ossimArcInfoGridWriter.cpp
+++ /dev/null
@@ -1,370 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimArcInfoGridWriter.cpp 16081 2009-12-10 20:56:36Z eshirschorn $
-
-#include <cstring>
-#include <cstdio>
-#include <fstream>
-#include <iostream>
-
-#include <ossim/imaging/ossimArcInfoGridWriter.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/imaging/ossimCastTileSourceFilter.h>
-
-#include <ossim/support_data/ossimAigStatistics.h>
-#include <ossim/support_data/ossimAigHeader.h>
-#include <ossim/support_data/ossimAigBounds.h>
-#include <ossim/support_data/ossimAigIndexFileHeader.h>
-#include <ossim/support_data/ossimAigDataFileHeader.h>
-
-#include <ossim/imaging/ossimCastTileSourceFilter.h>
-
-static const ossimTrace traceDebug("ossimArcInfoGridWriter:debug");
-
-RTTI_DEF1(ossimArcInfoGridWriter,
-          "ossimArcInfoGridWriter",
-          ossimImageFileWriter);
-
-//*******************************************************************
-// Constructor:
-//*******************************************************************
-ossimArcInfoGridWriter::ossimArcInfoGridWriter()
-   : ossimImageFileWriter(),
-     theOutputTileSize(256, 4)
-{
-}
-
-ossimArcInfoGridWriter::ossimArcInfoGridWriter(ossimImageSource* inputSource,
-                                 const ossimFilename& filename)
-   :ossimImageFileWriter(filename, inputSource)
-{
-}
-
-//*******************************************************************
-// Destructor
-//*******************************************************************
-ossimArcInfoGridWriter::~ossimArcInfoGridWriter()
-{
-   close();
-}
-
-bool ossimArcInfoGridWriter::writeFile()
-{
-   const char* MODULE = "ossimArcInfoGridWriter::writeFile";
-   if(!theInputConnection)
-   {
-      return false;
-   }
-   
-   ossimRefPtr<ossimCastTileSourceFilter> filter = new ossimCastTileSourceFilter;
-   filter->setOutputScalarType(OSSIM_FLOAT);
-   filter->connectMyInputTo(theInputConnection.get());
-   filter->initialize();
-   
-   open();
-
-   // make sure we have a region of interest
-   if(theAreaOfInterest.hasNans())
-   {
-      theInputConnection->initialize();
-      theAreaOfInterest = theInputConnection->getAreaOfInterest();
-   }
-   else
-   {
-      theInputConnection->setAreaOfInterest(theAreaOfInterest);
-   }
-   
-   if(theAreaOfInterest.hasNans()) return false;   
-   
-   theInputConnection->setTileSize(theOutputTileSize);
-   theInputConnection->setToStartOfSequence();
-   
-   bool result = writeBinaryAigHeader()&&
-                 writeBinaryAigBounds()&&
-                 writeBinaryAigStats();
-   if(result)
-   {
-      ossimFilename indexFile=ossimFilename(theFilename+"/"+"w001001x.adf");
-      ossimFilename dataFile=ossimFilename(theFilename+"/"+"w001001.adf");
-      
-      std::ofstream indexFileStream(indexFile.c_str(),
-                               ios::out|ios::binary);
-      std::ofstream dataFileStream(dataFile.c_str(),
-                              ios::out|ios::binary);
-      ossimEndian endian;
-
-      if(indexFileStream&&dataFileStream)
-      {
-         ossimAigIndexFileHeader aigIndexHeader;
-         ossimAigDataFileHeader  aigDataFileHeader;
-         
-         ossimRefPtr<ossimImageData> currentTile =
-            theInputConnection->getNextTile();
-         long tileNumber = 0;
-         long totalNumberOfTiles = theInputConnection->getNumberOfTiles();
-         ossim_int32 tileOffsetShorts = 0;
-         ossim_int32 tileSizeShorts   = 0;
-
-         ossimNotify(ossimNotifyLevel_NOTICE)
-            << "Tile height  = " << theInputConnection->getTileHeight()
-            << std::endl
-            << "Tile width   = " << theInputConnection->getTileWidth()
-            << std::endl;
-         ossim_int32 tileSizeInShorts = 2*(theInputConnection->getTileHeight()*
-                                           theInputConnection->getTileWidth());
-         // Note: this is in shorts
-         //
-         aigIndexHeader.theFileSize += (4*totalNumberOfTiles);
-
-         // Note this is in shorts
-         //
-         
-         aigDataFileHeader.theFileSize = 50+
-                                         (tileSizeInShorts*totalNumberOfTiles) +
-                                         totalNumberOfTiles;
-         aigDataFileHeader.theTileSize = tileSizeInShorts;
-         
-         aigIndexHeader.writeStream(indexFileStream);
-         aigDataFileHeader.writeStream(dataFileStream);
-
-         if(traceDebug())
-         {
-            CLOG << "AIG INDEX HEADER = \n" << aigIndexHeader << std::endl;
-            CLOG << "AIG DATA FILE HEADER\n"
-                 << "file size = " << aigDataFileHeader.theFileSize
-                 << std::endl;
-         }
-         
-         while(currentTile.valid())
-         {
-            currentTile = filter->applyCast(currentTile);
-            
-            if(!currentTile->getBuf())
-            {
-               currentTile->initialize();
-            }
-
-            tileOffsetShorts = dataFileStream.tellp()/2;
-            tileSizeShorts   = 2*currentTile->getHeight()*currentTile->getWidth();
-            ossim_int16 tileSizeShorts16 = 2*currentTile->getHeight()*currentTile->getWidth();
-            if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
-            {
-               endian.swap(tileOffsetShorts);
-               endian.swap(tileSizeShorts);
-               endian.swap(tileSizeShorts16);
-               endian.swap((ossim_float32*)currentTile->getBuf(),
-                           currentTile->getWidth()*
-                           currentTile->getHeight());
-            }
-            
-            indexFileStream.write((char*)(&tileOffsetShorts), 4);
-            indexFileStream.write((char*)(&tileSizeShorts), 4);
-            dataFileStream.write((char*)(&tileSizeShorts16),
-                                 2);
-            dataFileStream.write((char*)(currentTile->getBuf()),
-                                 currentTile->getWidth()*currentTile->getHeight()*4);
-            
-            currentTile = theInputConnection->getNextTile();
-            ++tileNumber;
-         }
-      }
-   }
-   
-   close();
-   filter = 0;
-   return result;
-}
-
-bool ossimArcInfoGridWriter::saveState(ossimKeywordlist& kwl,
-                                const char* prefix)const
-{
-   return ossimImageFileWriter::saveState(kwl, prefix);
-}
-
-bool ossimArcInfoGridWriter::loadState(const ossimKeywordlist& kwl,
-                                const char* prefix)
-{
-   
-   return ossimImageFileWriter::loadState(kwl, prefix);
-}
-
-bool ossimArcInfoGridWriter::isOpen()const
-{
-   return (theFilename.isDir() && theFilename.exists());
-}
-
-bool ossimArcInfoGridWriter::open()
-{
-   if(theFilename.isDir()&&
-      theFilename.exists())
-   {
-      return true;
-   }
-   else
-   {
-      theFilename = theFilename.path();
-      if(theFilename.isDir()&&
-         theFilename.exists())
-      {
-         return true;
-      }
-      else
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimArcInfoGridWriter::open(): Directory "
-            << theFilename << " doesn't exist" << std::endl;
-      }
-      
-   }
-   return false;   
-}
-
-void ossimArcInfoGridWriter::close()
-{
-}
-
-
-bool ossimArcInfoGridWriter::writeBinaryAigHeader()
-{
-   const char* MODULE = "ossimArcInfoGridWriter::writeBinaryAigHeader";
-   ossimAigHeader aigHeader;
-
-   ossimFilename file=ossimFilename(theFilename+"/"+"hdr.adf");
-
-   if(isOpen())
-   {
-      switch(theInputConnection->getOutputScalarType())
-      {
-         case OSSIM_UCHAR:
-         case OSSIM_SSHORT16:
-         case OSSIM_USHORT11:
-         case OSSIM_USHORT16:
-//      {
-//         aigHeader.setIntCoverage();
-//         break;
-//      }
-         case OSSIM_DOUBLE:
-         case OSSIM_FLOAT:
-         case OSSIM_NORMALIZED_FLOAT:
-         case OSSIM_NORMALIZED_DOUBLE:
-         {
-            aigHeader.setFloatCoverage();
-            break;
-         }
-         default:
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimArcInfoGridWriter::writeBinaryAigHeader: "
-               << "unkown scalar type" << std::endl;
-         }
-      }
-      
-      // need to set pixel size
-      //
-
-      // code goes here
-      
-      // now setting number of tiles per row
-      aigHeader.theNumberOfTilesPerRow    = theInputConnection->getNumberOfTilesHorizontal();
-      aigHeader.theNumberOfTilesPerColumn = theInputConnection->getNumberOfTilesVertical();
-      aigHeader.theWidthOfTileInPixels    = theInputConnection->getTileWidth();
-      aigHeader.theHeightOfTileInPixels   = theInputConnection->getTileHeight();
-      
-      std::ofstream out;
-      out.open(file.c_str(), ios::out|ios::binary);
-
-      if(out)
-      {
-         if(traceDebug())
-         {
-            CLOG << "AIG_HEADER = \n" << aigHeader << std::endl;
-         }
-         return aigHeader.writeStream(out);
-      }
-   }
-   
-   return false;
-}
-
-bool ossimArcInfoGridWriter::writeBinaryAigBounds()
-{
-   const char* MODULE = "ossimArcInfoGridWriter::writeBinaryAigBounds";
-   ossimAigBounds aigBounds;
-   
-
-   // setup bounds
-   ossimIrect bounds = theInputConnection->getBoundingRect();
-   if(!bounds.hasNans())
-   {
-      aigBounds.ll_x = -.5;
-      aigBounds.ll_y = -.5;
-      aigBounds.ur_x = bounds.width()-.5;
-      aigBounds.ur_y = bounds.height()-.5;
-      
-      //
-      ossimFilename file=ossimFilename(theFilename+"/"+"dblbnd.adf");
-      
-      if(isOpen())
-      {
-         std::ofstream out;
-         out.open(file.c_str(), ios::out|ios::binary);
-         
-         if(out)
-         {
-            if(traceDebug())
-            {
-               CLOG << "AIG BOUNDS =\n" <<aigBounds << std::endl;
-            }
-            return aigBounds.writeStream(out);
-         }
-      }
-   }
-   
-   return false;
-}
-
-bool ossimArcInfoGridWriter::writeBinaryAigStats()
-{
-   ossimAigStatistics aigStats;
-
-
-   // setup bounds
-   aigStats.theMin  = theInputConnection->getMinPixelValue();
-   aigStats.theMax  = theInputConnection->getMaxPixelValue();
-   aigStats.theMean = (aigStats.theMax-aigStats.theMin)/2.0;
-
-   //
-   ossimFilename file=ossimFilename(theFilename+"/"+"sta.adf");
-
-   if(isOpen())
-   {
-      std::ofstream out;
-      out.open(file.c_str(), ios::out|ios::binary);
-      
-      if(out)
-      {
-         return aigStats.writeStream(out);
-      }
-   }
-
-   return false;
-}
-
-ossimString ossimArcInfoGridWriter::getExtension() const
-{
-   return ossimString("aig");
-}
diff --git a/src/ossim/imaging/ossimAtCorrRemapper.cpp b/src/ossim/imaging/ossimAtCorrRemapper.cpp
deleted file mode 100644
index ff11f62..0000000
--- a/src/ossim/imaging/ossimAtCorrRemapper.cpp
+++ /dev/null
@@ -1,730 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2002 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Kathy Minear
-//
-// Description:
-// Takes in DNs for any number of bands
-// Converts DNs to Radiance at the satellite values Lsat
-// Converts Lsat to Surface Reflectance values
-//
-//*************************************************************************
-// $Id: ossimAtCorrRemapper.cpp 17206 2010-04-25 23:20:40Z dburken $
-
-#include <cstdlib>
-#include <cmath>
-
-#include <ossim/imaging/ossimAtCorrRemapper.h>
-#include <ossim/imaging/ossimAtCorrKeywords.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-
-
-RTTI_DEF1(ossimAtCorrRemapper, "ossimAtCorrRemapper", ossimImageSourceFilter);
-
-static ossimTrace traceDebug("ossimAtCorrRemapper:debug");
-
-ossimAtCorrRemapper::ossimAtCorrRemapper(ossimObject* owner,
-                                         ossimImageSource* inputSource,
-                                         const ossimString& sensorType)
-      :
-      ossimImageSourceFilter  (owner, inputSource),  // base class     
-      theTile                 (NULL),
-      theSurfaceReflectance   (NULL),
-      theUseInterpolationFlag(false),
-      theMinPixelValue        (0),  
-      theMaxPixelValue        (0),
-      theXaArray              (0),
-      theXbArray              (0),
-      theXcArray              (0),
-      theBiasArray            (0),
-      theGainArray            (0),
-      theCalCoefArray         (0),
-      theBandWidthArray       (0),
-      theSensorType(sensorType)
-{
-   //***
-   // Set the base class "theEnableFlag" to off since no adjustments have been
-   // made yet.
-   //***
-   disableSource();
-
-   initialize();
-}
-
-ossimAtCorrRemapper::~ossimAtCorrRemapper()
-{
-   if (theSurfaceReflectance)
-   {
-      delete [] theSurfaceReflectance;
-      theSurfaceReflectance = NULL;
-   }
-}
-
-ossimRefPtr<ossimImageData> ossimAtCorrRemapper::getTile(
-   const ossimIrect& tile_rect,
-   ossim_uint32 resLevel)
-{
-#if 0
-   if (traceDebug())
-   {
-      cout << "ossimAtCorrRemapper::getTile DEBUG:"
-           << "\ntile_rect:  " << tile_rect << endl;
-   }
-#endif
-   
-   if (!isInitialized()||!theInputConnection)
-   {
-       cerr << "ossimAtCorrRemapper::getTile ERROR:"
-            << "\nNot initialized!"
-            << endl;
-       return ossimRefPtr<ossimImageData>();
-   }
-
-   if(!theTile.valid())
-   {
-      initialize();
-      if(!theTile)
-      {
-         return ossimRefPtr<ossimImageData>();
-      }
-   }
-   
-   // Fetch tile from pointer from the input source.
-   ossimRefPtr<ossimImageData> inputTile = theInputConnection->getTile(tile_rect,
-                                                                       resLevel);
-
-   if (!inputTile.valid())  // Just in case...
-   {
-      return ossimRefPtr<ossimImageData>();
-   }
-
-   // Check for remap bypass or empty / null input tile.
-   ossimDataObjectStatus tile_status = inputTile->getDataObjectStatus();
-   if (!theEnableFlag || tile_status == OSSIM_NULL ||
-       tile_status == OSSIM_EMPTY)
-   {
-      return inputTile;
-   }
-
-   ossim_uint32 w     = tile_rect.width();
-   ossim_uint32 h     = tile_rect.height();
-   ossim_uint32 tw    = theTile->getWidth();
-   ossim_uint32 th    = theTile->getHeight();
-   ossim_uint32 bands = theTile->getNumberOfBands();
-
-   // Set the origin of the output tile.
-   theTile->setOrigin(tile_rect.ul());
-
-   if(w*h != tw*th)
-   {
-      theTile->setWidthHeight(w, h);
-      theTile->initialize();
-      if(theSurfaceReflectance)
-      {
-         delete [] theSurfaceReflectance;
-         theSurfaceReflectance = NULL;
-      }
-   }
-   
-   if(!theSurfaceReflectance)
-   {
-      ossim_uint32 size  = tw*th*bands;
-#if 0
-      if (traceDebug())
-      {
-         cout << "ossimAtCorrRemapper::getTile DEBUG:"
-              << "\ntile_rect:    " << tile_rect
-              << "\ntile width:   " << tw
-              << "\ntile height:  " << th
-              << "\nbands:        " << bands
-              << "\nBuffer size:  " << size << endl;
-      }
-#endif
-      
-      theSurfaceReflectance = new double[size];
-   }
-
-   ossim_uint32 buffer_index = 0;
-   ossimIpt ul = tile_rect.ul();
-   ossimIpt lr = tile_rect.lr();
-   const double MP = theTile->getMinNormalizedPix(); // Minimum normalized pix.
-   double a, b, c;
-   buffer_index = 0;
-
-   cout << setprecision(6);
-   for (ossim_uint32 band=0; band < bands; ++band)
-   {
-      for(ossim_sint32 idxy = ul.y; idxy <= lr.y; ++idxy)
-      {
-         for(ossim_sint32 idxx = ul.x; idxx <= lr.x; ++idxx)
-         {
-            double p = inputTile->getPix(buffer_index);
-            
-            if (p>0.0)
-            {
-               if(!theUseInterpolationFlag)
-               {
-                  a = theXaArray[band];
-                  b = theXbArray[band];
-                  c = theXcArray[band];
-               }
-               else
-               {
-                  interpolate(ossimDpt(idxx, idxy),
-                              band,
-                              a,
-                              b,
-                              c);
-               }
-               if(theSensorType == "ls7ms")
-               {
-                  double radiance_at_satellite
-                     = (theGainArray[band] * p) + theBiasArray[band];
-                  
-                  double y =  (radiance_at_satellite * a) -  b;
-                  
-                  p = (y / (1.0 + (c * y)) );
-               }
-               else if(theSensorType == "qbms")
-               {
-                  double radiance_at_satellite
-                     = theCalCoefArray[band] * p / theBandWidthArray[band];
-                  
-                  double y =  (radiance_at_satellite * a) - b;
-                  
-                  p = (y / (1.0 + (c * y)) );
-               }
-               else if(theSensorType == "ikms")
-               {
-                  
-                 
-                  double radiance_at_satellite
-                     =   p  /((theCalCoefArray[band]/1.0)/ theBandWidthArray[band]);
-                  double y =  (radiance_at_satellite * a) -  b;
-    
-                  p = (y / (1.0 + (c * y)) );
-     
-               }  
-                   
-               // Note that "p" should now be normalized between 0.0 and 1.0;
-               
-               // ***
-               // Since it wasn't null to start with clip / clamp between minimum
-               // normalized pixel and one(max).
-               // ***
-               p =  ( p > MP ? ( p < 1.0 ? p : 1.0) : MP );
-               
-               // Scan the new tile and set the min / max.
-               if (p < theMinPixelValue[band])
-               {
-                  theMinPixelValue[band] = p;
-               }
-               else if (p > theMaxPixelValue[band])
-               {
-                  theMaxPixelValue[band] = p;
-               }
-               
-               theSurfaceReflectance[buffer_index] = p;
-            }
-            else
-            {
-               theSurfaceReflectance[buffer_index] = 0.0;  // pixel was null...
-            }
-            
-            ++buffer_index;
-            
-         }  // End of sample loop...
-         
-      } // End of line loop...
-      
-   } // End of band loop...
-
-   // Copy the buffer to the output tile at the same time unnormalizing it.
-   theTile->copyNormalizedBufferToTile(theSurfaceReflectance);
-   
-   // Validate the output to set the tile status.
-   theTile->validate();
-   
-   return theTile;
-}
-
-void ossimAtCorrRemapper::initialize()
-{
-   if(theInputConnection)
-   {
-      theTile = ossimImageDataFactory::instance()->create(this,
-                                                          theInputConnection);
-      theTile->initialize();
-
-      if(theSurfaceReflectance)
-      {
-         delete []theSurfaceReflectance;
-         theSurfaceReflectance = NULL;
-      }
-      
-      ossim_uint32 tw    = theTile->getWidth();
-      ossim_uint32 th    = theTile->getHeight();
-      ossim_uint32 bands = theTile->getNumberOfBands();
-      ossim_uint32 size  = tw*th*bands;
-      if (traceDebug())
-      {
-         cout << "ossimAtCorrRemapper::initialize DEBUG:"
-              << "\ntile width:   " << tw
-              << "\ntile height:  " << th
-              << "\nbands:        " << bands
-              << "\nBuffer size:  " << size << endl;
-      }
-      
-      theSurfaceReflectance = new double[size];
-
-      setInitializedFlag(true);
-      clearErrorStatus();
-   }
-   else
-   {
-      setInitializedFlag(false);
-      setErrorStatus();
-   };
-
-   verifyEnabled();
-
-   if (traceDebug())
-   {
-      cout << "ossimAtCorrRemapper::initialize DEBUG:"
-           << *this
-           << endl;
-   }
-
-}
-
-bool ossimAtCorrRemapper::loadState(const ossimKeywordlist& kwl,
-                                    const char* prefix)
-{
-   static const char MODULE[] = "ossimAtCorrRemapper::loadState()";
-
-   if (traceDebug())  CLOG << "entering..." << endl;
-
-   if (!theTile || !theSurfaceReflectance)
-   {
-      cerr << MODULE << " ERROR:"
-           << "Not initialized..." << endl;
-      return false;
-   }
-
-   ossim_uint32 bands = theTile->getNumberOfBands();
-
-   // Clear out the old values.
-   theMinPixelValue.clear();
-   theMaxPixelValue.clear();   
-   theXaArray.clear();
-   theXbArray.clear();
-   theXcArray.clear();
-   theBiasArray.clear();
-   theGainArray.clear();
-   theCalCoefArray.clear();
-   theBandWidthArray.clear();
- 
-   
-   // Now resize them.
-
-   // Start with arbitrary big number.
-   theMinPixelValue.resize(bands, 1.0);
-
-   // Start with arbitrary small number.
-   theMaxPixelValue.resize(bands, 0.0);
-
-   
-   theXaArray.resize(bands, 1.0);
-   theXbArray.resize(bands, 1.0);
-   theXcArray.resize(bands, 1.0);
-   
-   theBiasArray.resize(bands, 0.0);
-   theGainArray.resize(bands, 1.0);
-   theCalCoefArray.resize(bands);
-   theBandWidthArray.resize(bands);
-   
-   for(ossim_uint32 band = 0; band < bands; ++band)
-   {
-      const char* lookup = NULL;
-      ossimString band_string = ".band";
-      band_string += ossimString::toString(band+1);
-      
-      ossimString kw = AT_CORR_XA_KW;
-      kw += band_string;
-      lookup = kwl.find(prefix, kw.c_str());
-      if (lookup)
-      {
-         theXaArray[band] = atof(lookup);
-      }
-      else
-      {
-         if (traceDebug())
-         {
-            CLOG << "DEBUG:"
-                 << "\nlookup failed for keyword:  " << kw.c_str() << endl;
-         }
-      }
-      
-      kw = AT_CORR_XB_KW;
-      kw += band_string;
-      lookup = kwl.find(prefix, kw.c_str());
-      if (lookup)
-      {
-         theXbArray[band] = atof(lookup);
-      }
-      else
-      {
-         if (traceDebug())
-         {
-            CLOG << "DEBUG:"
-                 << "\nlookup failed for keyword:  " << kw.c_str()
-                 << endl;
-         }
-      }
-      
-      kw = AT_CORR_XC_KW;
-      kw += band_string;
-      lookup = kwl.find(prefix, kw.c_str());
-      if (lookup)
-      {
-         theXcArray[band] = atof(lookup);
-      }
-      else
-      {
-         if (traceDebug())
-         {
-            CLOG << "DEBUG:"
-                 << "\nlookup failed for keyword:  " << kw.c_str()
-                 << endl;
-         }
-      }
-      
-      if(theSensorType == "ls7ms")
-      {
-         kw = AT_CORR_BIAS_KW;
-         kw += band_string;
-         lookup = kwl.find(prefix, kw.c_str());
-         if (lookup)
-         {
-            theBiasArray[band] = atof(lookup);
-         }
-         else
-         {
-            if (traceDebug())
-            {
-               CLOG << "DEBUG:"
-                    << "\nlookup failed for keyword:  " << kw.c_str()
-                    << endl;
-            }
-         }
-         
-         kw = AT_CORR_GAIN_KW;
-         kw += band_string;
-         lookup = kwl.find(prefix, kw.c_str());
-         if (lookup)
-         {
-            theGainArray[band] = atof(lookup);
-         }
-         else
-         {
-            if (traceDebug())
-            {
-               CLOG << "DEBUG:"
-                    << "\nlookup failed for keyword:  " << kw.c_str()
-                    << endl;
-            }
-         }
-      }
-      
-      if(theSensorType == "qbms")
-      {
-         kw = AT_CORR_CALCOEF_KW;
-         kw += band_string;
-         lookup = kwl.find(prefix, kw.c_str());
-         if (lookup)
-         {
-            theCalCoefArray[band] = atof(lookup);
-         }
-         else
-         {
-            if (traceDebug())
-            {
-               CLOG << "DEBUG:"
-                    << "\nlookup failed for keyword:  " << kw.c_str()
-                    << endl;
-            }
-         }
-         
-         kw = AT_CORR_BANDWIDTH_KW;
-         kw += band_string;
-         lookup = kwl.find(prefix, kw.c_str());
-         if (lookup)
-         {
-            theBandWidthArray[band] = atof(lookup);
-         }
-         else
-         {
-            if (traceDebug())
-            {
-               CLOG << "DEBUG:"
-                    << "\nlookup failed for keyword:  " << kw.c_str()
-                    << endl;
-            }
-         }
-      }
-      if(theSensorType == "ikms")
-      {
-         kw = AT_CORR_CALCOEF_KW;
-         kw += band_string;
-         lookup = kwl.find(prefix, kw.c_str());
-         if (lookup)
-         {
-            theCalCoefArray[band] = atof(lookup);
-         }
-         else
-         {
-            if (traceDebug())
-            {
-               CLOG << "DEBUG:"
-                    << "\nlookup failed for keyword:  " << kw.c_str()
-                    << endl;
-            }
-         }
-         
-         kw = AT_CORR_BANDWIDTH_KW;
-         kw += band_string;
-         lookup = kwl.find(prefix, kw.c_str());
-         if (lookup)
-         {
-            theBandWidthArray[band] = atof(lookup);
-         }
-         else
-         {
-            if (traceDebug())
-            {
-               CLOG << "DEBUG:"
-                    << "\nlookup failed for keyword:  " << kw.c_str()
-                    << endl;
-            }
-         }
-      }
-   }
-   
-   verifyEnabled();
-
-   if (theEnableFlag)
-   {
-      //***
-      // Call the base class to pick up the enable flag.  Note that this
-      // can override the state set from verifyEnabled() method.
-      //***
-      ossimString pref;
-      if (prefix) pref += prefix;
-      pref += "atmospheric_correction.";
-
-   }
-   
-   if (traceDebug())
-   {
-      CLOG << "DEBUG:"
-           << *this
-           << "returning..."
-           << endl;
-   }
-   
-   return true;
-}
-
-void ossimAtCorrRemapper::verifyEnabled()
-{
-   // Check all the pointers...
-   if ( !theInputConnection    || !theTile ||
-        !theSurfaceReflectance )
-   {
-      disableSource();
-      return;
-   }
-
-   ossim_uint32 bands = theTile->getNumberOfBands();
-   if ( (theMinPixelValue.size() != bands) ||
-        (theMaxPixelValue.size() != bands) ||
-        (theXaArray.size()       != bands) ||
-        (theXbArray.size()       != bands) ||
-        (theXcArray.size()       != bands) ||
-        (theBiasArray.size()     != bands) ||
-        (theGainArray.size()     != bands) ||
-        (theCalCoefArray.size()  != bands) ||
-        (theBandWidthArray.size()!= bands))
-   {
-      disableSource(); 
-      return;
-   }
-
-   enableSource();
-}
-
-ossimString ossimAtCorrRemapper::getShortName() const
-{
-   return ossimString("Atmospheric Correction Remapper");
-}
-
-vector<double> ossimAtCorrRemapper::getNormMinPixelValues() const
-{
-   return theMinPixelValue;
-}
-
-vector<double> ossimAtCorrRemapper::getNormMaxPixelValues() const
-{
-   return theMaxPixelValue;
-}
-
-void ossimAtCorrRemapper::getNormMinPixelValues(vector<double>& v) const
-{
-   v = theMinPixelValue;
-}
-
-void ossimAtCorrRemapper::getNormMaxPixelValues(vector<double>& v) const
-{
-   v = theMaxPixelValue;
-}
-
-const ossimString& ossimAtCorrRemapper::getSensorType() const
-{
-   return theSensorType;
-}
-
-void ossimAtCorrRemapper::setSensorType(const ossimString& sensorType)
-{
-   theSensorType = sensorType;
-}
-
-void ossimAtCorrRemapper::interpolate(const ossimDpt& /* pt */,
-                                      int band,
-                                      double& a,
-                                      double& b,
-                                      double& c)const
-{
-   a = theXaArray[band];
-   b = theXbArray[band];
-   c = theXcArray[band];
-}
-
-ostream& ossimAtCorrRemapper::print(ostream& os) const
-{
-   os << "ossimAtCorrRemapper:"
-      << "\ntheEnableFlag:  " << (theEnableFlag?"enabled":"disabled")
-      << endl;
-
-   os << setprecision(15) << setiosflags(ios::fixed);
-
-   ossim_uint32 band = 1;
-   vector<double>::const_iterator i = theMinPixelValue.begin();
-   while (i != theMinPixelValue.end())
-   {
-      os << "band[" << band << "] min:  " << (*i) << endl;
-      ++i;
-      ++band;
-   }
-
-   band = 1;
-   i = theMaxPixelValue.begin();
-   while (i != theMaxPixelValue.end())
-   {
-      os << "band[" << band << "] max:  " << (*i) << endl;
-      ++i;
-      ++band;
-   }
-
-   band = 1;
-   i = theXaArray.begin();
-   while (i != theXaArray.end())
-   {
-      os << "band[" << band << "] xa:  " << (*i) << endl;
-      ++i;
-      ++band;
-   }
-
-   band = 1;
-   i = theXbArray.begin();
-   while (i != theXbArray.end())
-   {
-      os << "band[" << band << "] xb:  " << (*i) << endl;
-      ++i;
-      ++band;
-   }
-
-   band = 1;
-   i = theXcArray.begin();
-   while (i != theXcArray.end())
-   {
-      os << "band[" << band << "] xc:  " << (*i) << endl;
-      ++i;
-      ++band;
-   }
-
-   if(theSensorType == "ls7ms")
-   {
-      band = 1;
-      i = theBiasArray.begin();
-      while (i != theBiasArray.end())
-      {
-         os << "band[" << band << "] bias:  " << (*i) << endl;
-         ++i;
-         ++band;
-      }
-      
-      band = 1;
-      i = theGainArray.begin();
-      while (i != theGainArray.end())
-      {
-         os << "band[" << band << "] gain:  " << (*i) << endl;
-         ++i;
-         ++band;
-      }
-   }
-   if(theSensorType == "qbms")
-   {
-      band = 1;
-      i = theCalCoefArray.begin();
-      while (i != theCalCoefArray.end())
-      {
-         os << "band[" << band << "] calcoef:  " << (*i) << endl;
-         ++i;
-         ++band;
-      }
-
-      band = 1;
-      i = theBandWidthArray.begin();
-      while (i != theBandWidthArray.end())
-      {
-         os << "band[" << band << "] bandwidth:  " << (*i) << endl;
-         ++i;
-         ++band;
-      }
-   }
-   if(theSensorType == "ikms")
-   {
-      band = 1;
-      i = theCalCoefArray.begin();
-      while (i != theCalCoefArray.end())
-      {
-         os << "band[" << band << "] calcoef:  " << (*i) << endl;
-         ++i;
-         ++band;
-      }
-
-   }
-   return os;
-}
-
-ostream& operator<<(ostream& os, const ossimAtCorrRemapper& hr)
-{
-   return hr.print(os);
-}
-
-
diff --git a/src/ossim/imaging/ossimBandAverageFilter.cpp b/src/ossim/imaging/ossimBandAverageFilter.cpp
deleted file mode 100644
index 1a89789..0000000
--- a/src/ossim/imaging/ossimBandAverageFilter.cpp
+++ /dev/null
@@ -1,394 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimBandAverageFilter.cpp 17206 2010-04-25 23:20:40Z dburken $
-#include <ossim/imaging/ossimBandAverageFilter.h>
-
-// used for constructing and an ossimImageData object
-#include <ossim/imaging/ossimImageDataFactory.h>
-
-// used for error reporting and for general info reporting such as warnings
-#include <ossim/base/ossimErrorContext.h>
-
-#include <sstream>
-#include <iterator>
-
-static const char* WEIGHTS_KW = "weights";
-
-RTTI_DEF1(ossimBandAverageFilter,
-          "ossimBandAverageFilter",
-          ossimImageSourceFilter);
-
-ossimBandAverageFilter::ossimBandAverageFilter()
-   :ossimImageSourceFilter(),
-    theTile(NULL)
-{
-}
-
-ossimBandAverageFilter::ossimBandAverageFilter(ossimImageSource* input,
-                                               const std::vector<double>& weights)
-   :ossimImageSourceFilter(input),
-    theTile(NULL),
-    theWeights(weights)
-{
-}
-
-ossimBandAverageFilter::~ossimBandAverageFilter()
-{
-}
-
-ossim_uint32 ossimBandAverageFilter::getNumberOfOutputBands()const
-{
-   if(isSourceEnabled())
-   {
-      return 1;
-   }
-   
-   return ossimImageSourceFilter::getNumberOfOutputBands();
-}
-
-ossimRefPtr<ossimImageData> ossimBandAverageFilter::getTile(const ossimIrect& rect, ossim_uint32 resLevel)
-{
-   // first we will check to see if we have an input connection
-   //
-   if(!theInputConnection)
-   {
-      // this will probably be null since we aren't initialized.
-      // we really need to creae a default blank tile in OSSIM that is returned
-      return theTile;
-   }
-
-   ossimRefPtr<ossimImageData> inputData =
-      theInputConnection->getTile(rect, resLevel);
-
-   if(!inputData.valid())
-   {
-      return inputData;
-   }
-   
-   // If we are disabled or if the data object is empty or NULL or
-   // not enough bands we don't need to run our algorithm so return the input
-   // tile.
-   if(!isSourceEnabled() ||
-      (inputData->getDataObjectStatus() == OSSIM_NULL)||
-      (inputData->getDataObjectStatus() == OSSIM_EMPTY)||
-      (inputData->getNumberOfBands() < 2))
-   {
-      return inputData;
-   }
-
-   // check to see if we are initialized
-   if(!theTile.valid())
-   {
-      initialize();
-   }
-   
-   theTile->setImageRectangle(rect);
-
-   // now lets set up the template method to operate in native type and run
-   // the algorithm
-   //
-   switch(inputData->getScalarType())
-   {
-   case OSSIM_UCHAR:
-   {
-      averageInput((ossim_uint8)0, // setup template variable
-                   inputData);
-      break;
-   }
-   case OSSIM_USHORT11:
-   case OSSIM_USHORT16:
-   {
-      averageInput((ossim_uint16)0, // setup template variable
-                   inputData);
-      break;
-   }
-   case OSSIM_SSHORT16:
-   {
-      averageInput((ossim_sint16)0, // setup template variable
-                   inputData);
-      break;
-   }
-   case OSSIM_NORMALIZED_FLOAT:
-   case OSSIM_FLOAT:
-   {
-      averageInput((float)0, // setup template variable
-                   inputData);
-      break;
-   }
-   case OSSIM_NORMALIZED_DOUBLE:
-   case OSSIM_DOUBLE:
-   {
-      averageInput((double)0, // setup template variable
-                   inputData);
-      break;
-   }
-   default:
-   {
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "Unsupported scalar type in file %d at line %d",
-                    __FILE__,
-                    __LINE__);
-
-      
-      theTile->makeBlank();
-      break;
-   }
-   }
-   
-   theTile->validate();
-
-   
-   return theTile;
-}
-
-
-
-void ossimBandAverageFilter::initialize()
-{
-   ossimImageSourceFilter::initialize();
-   
-   // theInputConnection is defined in ossimImageSourceFilter
-   // It is automatically set when an input is connected to this
-   // object
-   if(theInputConnection)
-   {
-      theTile = ossimImageDataFactory::instance()->create(this, this);
-
-      // now initialize the tile
-      theTile->initialize();
-      checkWeights();
-   }
-}
-
-double ossimBandAverageFilter::getNullPixelValue(ossim_uint32 band)const
-{
-   if(!isSourceEnabled())
-   {
-      return ossimImageSourceFilter::getNullPixelValue(band);
-   }
-   // lets use the first band's null value as our null
-   return ossimImageSourceFilter::getMinPixelValue(0);
-}
-
-double ossimBandAverageFilter::getMinPixelValue(ossim_uint32 band)const
-{
-   if(!isSourceEnabled()||!theInputConnection)
-   {
-      return ossimImageSourceFilter::getMinPixelValue(band);
-   }
-
-   // loop through each band and find the min pix value
-   ossim_uint32 bandIndex = 0;
-   ossim_uint32 inputBands = theInputConnection->getNumberOfOutputBands();
-   double minValue = ossim::defaultMax(OSSIM_DOUBLE);
-   for(bandIndex = 0; bandIndex < inputBands; ++bandIndex)
-   {
-      double minPix = theInputConnection->getMinPixelValue(bandIndex);
-
-      if(minPix < minValue)
-      {
-         minValue = minPix;
-      }
-   }
-
-   return minValue;
-}
-
-double ossimBandAverageFilter::getMaxPixelValue(ossim_uint32 band)const
-{
-   if(!isSourceEnabled())
-   {
-      return ossimImageSourceFilter::getMaxPixelValue(band);
-   }
-   
-   // loop through each band and find the max pix value
-   ossim_uint32 bandIndex = 0;
-   ossim_uint32 inputBands = theInputConnection->getNumberOfOutputBands();
-   double maxValue = ossim::defaultMin(OSSIM_DOUBLE);
-   for(bandIndex = 0; bandIndex < inputBands; ++bandIndex)
-   {
-      double maxPix = theInputConnection->getMaxPixelValue(bandIndex);
-
-      if(maxPix > maxValue)
-      {
-         maxValue = maxPix;
-      }
-   }
-   
-   return maxValue;
-}
-
-void ossimBandAverageFilter::checkWeights()
-{
-   // we have not been initialzed yet
-   //
-   if(!theTile)
-   {
-      return;
-   }
-
-   // Check to see if the weights array is the same size as the input
-   // list.  If not then resize it and populate them with the same weight
-   // value.  It does not matter if they sum to one since we will perform
-   // a weighted average in the execution of the algorithm
-   //
-   if(theWeights.size() != theInputConnection->getNumberOfOutputBands())
-   {
-      theWeights.resize(theInputConnection->getNumberOfOutputBands());  
-
-      std::fill(theWeights.begin(), theWeights.end(), 1);
-   }
-}
-
-
-template<class T> void ossimBandAverageFilter::averageInput(
-   T /* dummyVariable */, // used only for template type, value ignored
-   ossimRefPtr<ossimImageData> inputDataObject)
-{
-   // since we have already checked the input for empty or
-   // null we will now execute the algorithm.  We will make
-   //
-   // 
-   std::vector<T*> inputBands(inputDataObject->getNumberOfBands());
-   std::vector<double> nullValues(inputDataObject->getNumberOfBands());
-   ossim_uint32 i = 0;
-
-   // for efficiency we will copy the band pointers and
-   // null values so we don't have extra function calls
-   // on a per band basis
-   //
-   for(i = 0; i < inputDataObject->getNumberOfBands(); ++i)
-   {
-      inputBands[i] = static_cast<T*>(inputDataObject->getBuf(i));
-      nullValues[i] = inputDataObject->getNullPix(i);
-   }
-
-   // store the output buffer pointer
-   T* outputBuf = static_cast<T*>(theTile->getBuf(0));
-
-   // setup index values and boundary values
-   ossim_uint32 upperBound = theTile->getWidth()*theTile->getHeight();
-   ossim_uint32 bandIndex = 0;
-   ossim_uint32 numberOfBands = inputDataObject->getNumberOfBands();
-   double outputNullPix = theTile->getNullPix(0);
-   
-   for(i = 0; i < upperBound; ++i)
-   {
-      double value=0.0;
-      double sumWeights=0.0;
-
-      // loop over each band only using the valid pixel data
-      // in the weighted average.
-      //
-      for(bandIndex = 0; bandIndex < numberOfBands; ++bandIndex)
-      {
-         // if valid then muliply the value by the weight and add it to
-         // current pixel value
-         if(*inputBands[bandIndex] != nullValues[bandIndex])
-         {
-            value += theWeights[bandIndex]*((double)*inputBands[bandIndex]);
-            sumWeights += theWeights[bandIndex];
-         }
-         // increment to the next pixel for the next time around
-         ++inputBands[bandIndex];
-      }
-
-      // check to see if we had any valid data.  If we did the weight
-      // should be greater than 0
-      if(sumWeights != 0.0)
-      {
-         value /= sumWeights;
-      }
-      else
-      {
-         // else we set the pixel to the output null value
-         value = outputNullPix;
-      }
-      // store the result in the outputBuffer.
-      *outputBuf = static_cast<T>(value);
-
-      // advance the output buffer to the next pixel value
-      ++outputBuf;
-   }
-}
-
-
-bool ossimBandAverageFilter::loadState(const ossimKeywordlist& kwl,
-                                       const char* prefix)
-{
-   // get the value of the stored keyword
-   ossimString weightString = kwl.find(prefix, WEIGHTS_KW);
-   weightString = weightString.trim();
-   
-
-   theWeights.clear();
-   if(weightString != "")
-   {
-      // split the string list into an array of strings
-      std::vector<ossimString> weightList = weightString.split(" ");
-
-      // resize the weights to the size of the weight list
-      //
-      theWeights.resize(weightList.size());
-      ossim_uint32 i = 0;
-
-      // now store the weights to the array
-      for(i = 0; i < theWeights.size(); ++i)
-      {
-         theWeights[i] = weightList[i].toDouble();
-      }
-   }
-
-   // call base class to continue the load state
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
-
-bool ossimBandAverageFilter::saveState(ossimKeywordlist& kwl,
-                                       const char* prefix)const
-{
-   std::stringstream out;
-
-   // copy the weights  to a memory stream separated by space
-   std::copy(theWeights.begin(),
-             theWeights.end(),
-             ostream_iterator<double>(out, " "));
-
-   ossimString weightString = out.str();
-   weightString = weightString.trim();
-
-   
-   kwl.add(prefix, // prefix to help uniquely id or attributes
-           WEIGHTS_KW, // the keyword to identity our attribute
-           weightString.c_str(),     // the value 
-           true); // overwrite if already in the keywordlist
-   
-   // call base classes save to allow us to pass the information up
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
-
-double ossimBandAverageFilter::getWeight(ossim_uint32 band)const
-{
-   if(band < theWeights.size())
-   {
-      return theWeights[band];
-   }
-   
-   return 0.0;
-}
-
-void ossimBandAverageFilter::setWeight(ossim_uint32 band, double weight)
-{
-   if(band < theWeights.size())
-   {
-      theWeights[band] = fabs(weight);
-   }
-}
diff --git a/src/ossim/imaging/ossimBandClipFilter.cpp b/src/ossim/imaging/ossimBandClipFilter.cpp
deleted file mode 100644
index 8ab31e0..0000000
--- a/src/ossim/imaging/ossimBandClipFilter.cpp
+++ /dev/null
@@ -1,698 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimBandClipFilter.cpp 21631 2012-09-06 18:10:55Z dburken $
-
-#include <ossim/imaging/ossimBandClipFilter.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/imaging/ossimImageData.h>
-
-RTTI_DEF1(ossimBandClipFilter, "ossimBandClipFilter", ossimImageSourceFilter);
-
-ossimBandClipFilter::ossimBandClipFilter()
-   :ossimImageSourceFilter(),
-    theClipType(ossimBandClipType_NONE),
-    theTile(NULL)
-{
-   theTile = new ossimImageData(this, // I am the owner,
-                                OSSIM_NORMALIZED_FLOAT,
-                                1);
-   theTile->initialize();
-}
-
-ossimBandClipFilter::ossimBandClipFilter(ossimImageSource* inputSource,
-                                           const vector<double>& minPix,
-                                           const vector<double>& maxPix,
-                                           ossimBandClipType clipType)
-   :ossimImageSourceFilter(inputSource),
-    theClipType(clipType),
-    theTile(NULL)
-{
-   theTile = new ossimImageData(this, // I am the owner,
-                                OSSIM_NORMALIZED_FLOAT,
-                                1);
-   theTile->initialize();
-   setMinMaxPix(minPix, maxPix);
-}
-
-ossimBandClipFilter::ossimBandClipFilter(ossimImageSource* inputSource,
-                                         double minPix,
-                                         double maxPix,
-                                         ossimBandClipType clipType)
-   :ossimImageSourceFilter(inputSource),
-    theClipType(clipType),
-    theTile(NULL)
-{
-   theTile = new ossimImageData(this, // I am the owner,
-                                OSSIM_NORMALIZED_FLOAT,
-                                1);
-   theTile->initialize();
-   
-   theMinPix.push_back(minPix);
-   theMaxPix.push_back(maxPix);
-}
-
-ossimBandClipFilter::~ossimBandClipFilter()
-{
-}
-
-void ossimBandClipFilter::setClipType(ossimBandClipType clipType)
-{
-   theClipType = clipType;
-}
-
-ossimBandClipFilter::ossimBandClipType ossimBandClipFilter::getClipType()const
-{
-   return theClipType;
-}
-
-ossim_uint32 ossimBandClipFilter::getNumberOfValues()const
-{
-   // We make sure that all arrays have the same number
-   // of elements so we can use the size of any of them.
-   return (ossim_uint32)theMinPix.size();
-}
-
-void ossimBandClipFilter::setNumberOfValues(ossim_uint32 size)
-{
-
-   // lets do a non destructive set.  That way we can
-   // grow or shrink the list without destroying
-   // the original values.
-   //
-   if(!size)
-   {
-      theMinPix.clear();
-      theMaxPix.clear();
-      theMedian.clear();
-      return;
-   }
-
-   
-   vector<double> tempMin    = theMinPix;
-   vector<double> tempMax    = theMaxPix;
-   
-   theMinPix.resize(size);
-   theMaxPix.resize(size);
-   theMedian.resize(size);
-    
-   ossim_uint32 upperBound = (ossim_uint32)min(theMinPix.size(), tempMin.size());
-   ossim_uint32 index = 0;
-
-   for(index = 0; index < upperBound; ++index)
-   {
-      theMinPix[index] = tempMin[index];
-      theMaxPix[index] = tempMax[index];
-      
-      theMinPix[index] = theMinPix[index]>1?1:theMinPix[index];
-      theMinPix[index] = theMinPix[index]<0?0:theMinPix[index];
-      theMaxPix[index] = theMaxPix[index]>1?1:theMaxPix[index];
-      theMaxPix[index] = theMaxPix[index]<0?0:theMaxPix[index];
-      
-      theMedian[index] = (theMaxPix[index] + theMinPix[index])/2.0;
-   }
-   
-   for(;index < theMinPix.size();++index)
-   {
-      theMinPix[index] = OSSIM_DEFAULT_MIN_PIX_NORM_FLOAT;
-      theMaxPix[index] = OSSIM_DEFAULT_MAX_PIX_NORM_FLOAT;
-      theMedian[index] = (theMaxPix[index] + theMinPix[index])/2.0;
-            
-      theMedian[index] = (theMaxPix[index] + theMinPix[index])/2.0;
-   }
-}
-
-void ossimBandClipFilter::setMinMaxPix(const vector<double>& minPix,
-                                       const vector<double>& maxPix)
-{
-   theMinPix = minPix;
-   theMaxPix = maxPix;
-
-   setNumberOfValues((ossim_uint32)max(theMinPix.size(), theMaxPix.size()));
-}
-
-const std::vector<double>& ossimBandClipFilter::getMinPixList()const
-{
-   return theMinPix;
-}
-
-const std::vector<double> ossimBandClipFilter::getMaxPixList()const
-{
-   return theMaxPix;
-}
-
-double ossimBandClipFilter::getMinPix(ossim_uint32 index)const
-{
-   return index<theMinPix.size()?theMinPix[index]:0;
-}
-
-double ossimBandClipFilter::getMaxPix(ossim_uint32 index)const
-{
-   return index<theMaxPix.size()?theMaxPix[index]:0;
-}
-
-ossimRefPtr<ossimImageData> ossimBandClipFilter::getTile(
-   const ossimIrect& rect,
-   ossim_uint32 resLevel)
-{
-   if(!theInputConnection)
-   {
-      return NULL;
-   }
-   
-   ossimRefPtr<ossimImageData> data =
-      theInputConnection->getTile(rect, resLevel);
-   if(!data.get())
-   {
-      return data;
-   }
-   ossimDataObjectStatus status = data->getDataObjectStatus();
-   if((status != OSSIM_NULL) &&
-      (status != OSSIM_EMPTY))
-   {
-      ossim_uint32 dw = data->getWidth();
-      ossim_uint32 dh = data->getHeight();
-      ossim_uint32 db = data->getNumberOfBands();
-
-      ossim_uint32 tw = theTile->getWidth();
-      ossim_uint32 th = theTile->getHeight();
-      ossim_uint32 tb = theTile->getNumberOfBands();
-
-      if(((tw*th)!=(dw*dh))||
-         (tb != db))
-      {
-         theTile = new ossimImageData(this,
-                                      OSSIM_NORMALIZED_FLOAT,
-                                      db,
-                                      dw,
-                                      dh);
-         theTile->initialize();
-      }
-
-      if(getNumberOfValues() != theTile->getNumberOfBands())
-      {
-         // Should this go on??? (drb)
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimBandClipFilter::getTile\n"
-            << "getNumberOfValues() != theTile->getNumberOfBands"
-            << endl;
-      }
-      
-      data->copyTileToNormalizedBuffer(static_cast<float*>(theTile->getBuf()));
-      theTile->setDataObjectStatus(data->getDataObjectStatus());
-      
-      switch(theClipType)
-      {
-         case ossimBandClipType_CLIP:
-         {
-            runClip();
-            break;
-         }
-         case ossimBandClipType_CLAMP:
-         {
-            runClamp();
-            break;
-         }
-         case ossimBandClipType_LINEAR_STRETCH:
-         {
-            runLinearStretch();
-            break;
-         }
-         case ossimBandClipType_MEDIAN_STRETCH:
-         {
-            runMedianStretch();
-            break;
-         }
-         default:
-            break;
-      }
-      data->copyNormalizedBufferToTile(static_cast<float*>(theTile->getBuf()));
-   }
-   
-   return data;
-}
-
-void ossimBandClipFilter::runClip()
-{
-   ossim_uint32 offset = 0;
-   ossim_uint32 upperBound = theTile->getWidth()*theTile->getHeight();
-   for(ossim_uint32 band =0; band < theTile->getNumberOfBands(); ++band)
-   {
-      float *buf     = static_cast<float*>(theTile->getBuf(band));
-      float  minPix  = theMinPix[band];
-      float  maxPix  = theMaxPix[band];
-      float  nullPix = theTile->getNullPix(band);
-      
-      if(buf)
-      {
-         for(offset = 0; offset < upperBound; ++offset)
-         {
-            if((*buf < minPix)||
-               (*buf > maxPix))
-            {
-               *buf = nullPix;
-            }
-            ++buf;
-         }
-      }
-   }
-   theTile->validate();
-}
-
-void ossimBandClipFilter::runClamp()
-{
-   ossim_uint32 offset = 0;
-   ossim_uint32 upperBound = theTile->getWidth()*theTile->getHeight();
-   for(ossim_uint32 band =0; band < theTile->getNumberOfBands(); ++band)
-   {
-      float *buf     = static_cast<float*>(theTile->getBuf(band));
-      float  minPix  = theMinPix[band];
-      float  maxPix  = theMaxPix[band];
-      float  nullPix = theTile->getNullPix(band);
-      
-      if(buf)
-      {
-         if(theTile->getDataObjectStatus() == OSSIM_PARTIAL)
-         {
-            for(offset = 0; offset < upperBound; ++offset)
-            {
-               if(*buf != nullPix)
-               {
-                  if(*buf < minPix)
-                  {
-                     *buf = minPix;
-                  }
-                  else if(*buf > maxPix)
-                  {
-                     *buf = maxPix;
-                  }
-               }
-               ++buf;
-            }
-         }
-         else
-         {
-            for(offset = 0; offset < upperBound; ++offset)
-            {
-               if(*buf < minPix)
-               {
-                  *buf = minPix;
-               }
-               else if(*buf > maxPix)
-               {
-                  *buf = maxPix;
-               }
-               ++buf;
-            }
-         }
-      }
-   }
-}
-
-void ossimBandClipFilter::runLinearStretch()
-{   
-   ossim_uint32 bands = (ossim_uint32)min(theTile->getNumberOfBands(), (ossim_uint32)theMinPix.size());
-   ossim_uint32 w     = theTile->getWidth();
-   ossim_uint32 h     = theTile->getHeight();
-   ossim_uint32 upperBound = w*h;
-   const double* minPixArray = theTile->getMinPix();
-   const double* maxPixArray = theTile->getMaxPix();
-      
-   float* *bandArray = new float*[bands];
-   ossim_uint32 band = 0;
-   for(band = 0; band < bands; ++band)
-   {
-      bandArray[band] = static_cast<float*>(theTile->getBuf(band));
-   }
-   
-   if(theTile->getDataObjectStatus() == OSSIM_PARTIAL)
-   {
-      for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-      {
-         if(!theTile->isNull(offset))
-         {
-            for(band = 0; band < bands; ++band)
-            {
-               double delta = theMaxPix[band] - theMinPix[band];
-               double t     = (bandArray[band][offset] - theMinPix[band])/delta;
-               if(t < 0)
-               {
-                 bandArray[band][offset] = minPixArray[band];
-               }
-               else if(t > 1)
-               {
-                 bandArray[band][offset] = maxPixArray[band];
-               }
-               else
-               {
-                  bandArray[band][offset] = t;
-               }
-            }
-         }
-      }
-   }
-   else if(theTile->getDataObjectStatus() == OSSIM_FULL)
-   {
-      for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-         {
-            for(band = 0; band < bands; ++band)
-            {
-               double delta = theMaxPix[band] - theMinPix[band];
-               double t     = (bandArray[band][offset] - theMinPix[band])/delta;
-               
-              if(t < 0)
-              {
-                 bandArray[band][offset] = minPixArray[band];
-              }
-              else if(t > 1)
-              {
-                 bandArray[band][offset] = maxPixArray[band];
-              }
-              else
-              {
-                 bandArray[band][offset] = t;
-              }
-            }
-         }
-   }
-   delete [] bandArray;
-   
-}
-
-void ossimBandClipFilter::runMedianStretch()
-{
-   ossim_uint32 bands = theTile->getNumberOfBands();
-   float* *bandArray = new float*[bands];
-   ossim_uint32 band = 0;
-
-   for(band = 0; band < bands; ++band)
-   {
-      bandArray[band] = static_cast<float*>(theTile->getBuf(band));
-   }
-   ossim_uint32 upperBound = theTile->getWidth()*theTile->getHeight();
-   
-   if(theTile->getDataObjectStatus() == OSSIM_PARTIAL)
-   {
-      for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-      {
-         if(!theTile->isNull(offset))
-         {
-            for(band = 0; band < bands; ++band)
-            {
-               double side = (theMedian[band] - (double)bandArray[band][offset]);
-               
-               if(side > 0) // on the left
-               {
-                  double delta = fabs(theMedian[band] - theMinPix[band]);
-                  double t     = ((double)bandArray[band][offset] - theMinPix[band])/delta;
-                  if(t < 0)
-                  {
-                     bandArray[band][offset] = OSSIM_DEFAULT_MIN_PIX_NORM_FLOAT;
-                  }
-                  else if(t > 1)
-                  {
-                     bandArray[band][offset] = theMedian[band];
-                  }
-                  else
-                  {
-                     bandArray[band][offset] = theMedian[band]*t;
-                  }
-               }
-               else // on the right
-               {
-                  double delta = theMaxPix[band] - theMedian[band];
-                  double t = ((double)bandArray[band][offset] - theMedian[band])/delta;
-                  
-                  if(t < 0)
-                  {
-                     bandArray[band][offset] = theMedian[band];
-                  }
-                  else if(t > 1)
-                  {
-                     bandArray[band][offset] = OSSIM_DEFAULT_MAX_PIX_NORM_FLOAT;
-                  }
-                  else
-                  {
-                     bandArray[band][offset] = theMedian[band]+delta*t;
-                  }
-               }
-            }
-         }
-      }
-   }
-   else if(theTile->getDataObjectStatus() == OSSIM_FULL)
-   {
-      for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-      {
-         for(band = 0; band < bands; ++band)
-         {
-            double side = (theMedian[band] - (double)bandArray[band][offset]);
-            
-            if(side > 0) // on the left
-            {
-               double delta = fabs(theMedian[band] - theMinPix[band]);
-               double t     = ((double)bandArray[band][offset] - theMinPix[band])/delta;
-               if(t < 0)
-               {
-                  bandArray[band][offset] = OSSIM_DEFAULT_MIN_PIX_NORM_FLOAT;
-               }
-               else if(t > 1)
-               {
-                  bandArray[band][offset] = theMedian[band];
-               }
-               else
-               {
-                  bandArray[band][offset] = theMedian[band]*t;
-               }
-            }
-            else // on the right
-            {
-               double delta = theMaxPix[band] - theMedian[band];
-               double t = ((double)bandArray[band][offset] - theMedian[band])/delta;
-               
-               if(t < 0)
-               {
-                  bandArray[band][offset] = theMedian[band];
-               }
-               else if(t > 1)
-               {
-                  bandArray[band][offset] = OSSIM_DEFAULT_MAX_PIX_NORM_FLOAT;
-               }
-               else
-               {
-                  bandArray[band][offset] = theMedian[band]+delta*t;
-               }
-            }
-         }
-      }
-   }
-
-   delete [] bandArray;
-}   
-
-void ossimBandClipFilter::initialize()
-{
-   ossimImageSourceFilter::initialize();
-   
-   if(theInputConnection)
-   {
-      ossim_uint32 bands = theInputConnection->getNumberOfOutputBands();
-
-      if(bands)
-      {
-         if(theMinPix.size() != bands)
-         {
-            setNumberOfValues(bands);
-         }
-      }
-   }
-}
-
-bool ossimBandClipFilter::loadState(const ossimKeywordlist& kwl,
-                                    const char* prefix)
-{
-   bool result = ossimImageSourceFilter::loadState(kwl, prefix);
-
-   if(result)
-   {
-      ossimString minRegExpression    = ossimString("^(") +
-                                        ossimString(prefix) +
-                                        "min[0-9]+)";
-      ossimString maxRegExpression    = ossimString("^(") +
-                                        ossimString(prefix) +
-                                        "max[0-9]+)";
-      ossimString medianRegExpression = ossimString("^(") +
-                                        ossimString(prefix) +
-                                        "median[0-9]+)";
-      
-      ossim_uint32 numberOfMins    = kwl.getNumberOfSubstringKeys(minRegExpression);
-      ossim_uint32 numberOfMaxs    = kwl.getNumberOfSubstringKeys(maxRegExpression);
-      ossim_uint32 numberOfMedians = kwl.getNumberOfSubstringKeys(medianRegExpression);
-      theMinPix.clear();
-      theMaxPix.clear();
-      theMedian.clear();
-
-      if(numberOfMins != numberOfMaxs)
-      {
-         ossim_int32 temp = (ossim_int32)min(numberOfMins, numberOfMaxs);
-         numberOfMins = temp;
-         numberOfMaxs = temp;
-      }
-      if(numberOfMins> 0)
-      {
-         ossimString prefixMin    = ossimString(prefix) + "min";
-         ossimString prefixMax    = ossimString(prefix) + "max";
-         ossimString prefixMedian = ossimString(prefix) + "median";
-         
-         ossim_uint32 numberOfMatches = 0;
-         ossim_uint32 index = 0;
-         const char* value=(const char*)NULL;
-         
-         while(numberOfMatches < numberOfMins)
-         {
-            value = kwl.find(prefixMin.c_str(),
-                             ossimString::toString(index).c_str());
-            if(value)
-            {
-               theMinPix.push_back(ossimString(value).toDouble());
-               ++numberOfMatches;
-            }
-            ++index;
-         }
-         index = 0;
-         numberOfMatches = 0;
-         while(numberOfMatches < numberOfMaxs)
-         {
-            value = kwl.find(prefixMax.c_str(),
-                             ossimString::toString(index).c_str());
-            if(value)
-            {
-               theMaxPix.push_back(ossimString(value).toDouble());
-               ++numberOfMatches;
-            }
-            ++index;
-         }
-         if(numberOfMedians != numberOfMins)
-         {
-            for(index = 0; index <  theMaxPix.size(); ++index)
-            {
-               theMedian.push_back((theMinPix[index]+theMaxPix[index])/2.0);
-            }
-         }
-         else
-         {
-            index = 0;
-            numberOfMatches = 0;
-            while(numberOfMatches < numberOfMedians)
-            {
-               value = kwl.find(prefixMedian.c_str(),
-                                ossimString::toString(index).c_str());
-               if(value)
-               {
-                  theMedian.push_back(ossimString(value).toDouble());
-                  ++numberOfMatches;
-               }
-               ++index;
-            }
-         }
-      }
-   }
-   const char* clip_type = kwl.find(prefix, "clip_type");
-   if(clip_type)
-   {
-     ossimString clipType = clip_type;
-      clipType = clipType.upcase().trim();
-
-      if(clipType == "NONE")
-      {
-         theClipType = ossimBandClipType_NONE;
-      }
-      else if(clipType == "CLIP")
-      {
-         theClipType = ossimBandClipType_CLIP;
-      }
-      else if(clipType == "LINEAR_STRETCH")
-      {
-         theClipType = ossimBandClipType_LINEAR_STRETCH;
-      }
-      else if(clipType == "MEDIAN_STRETCH")
-      {
-         theClipType = ossimBandClipType_MEDIAN_STRETCH;
-      }
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_NOTICE)
-         << "ossimBandClipFilter::loadState NOTICE:\n"
-         << "Clip type not given defaulting to NONE" << endl;
-      theClipType = ossimBandClipType_NONE;
-   }
-
-   return result;
-}
-
-bool ossimBandClipFilter::saveState(ossimKeywordlist& kwl,
-                                    const char* prefix)const
-{
-   ossimString minPrefix    = ossimString("min");
-   ossimString maxPrefix    = ossimString("max");
-   ossimString medianPrefix = ossimString("median");
-
-   for(ossim_uint32 index = 1; index <= getNumberOfValues(); ++index)
-   {
-      ossimString value = (minPrefix+ossimString::toString(index));
-      kwl.add(prefix,
-              value.c_str(),
-              theMinPix[index-1],
-              true);
-      value = (maxPrefix+ossimString::toString(index));
-      kwl.add(prefix,
-              value.c_str(),
-              theMaxPix[index-1],
-              true);
-      value = (medianPrefix+ossimString::toString(index));
-      kwl.add(prefix,
-              value.c_str(),
-              theMedian[index-1],
-              true);
-   }
-   ossimString clipType;
-   switch(theClipType)
-   {
-      case ossimBandClipType_NONE:
-      {
-         clipType = "NONE";
-         break;
-      }
-      case ossimBandClipType_CLIP:
-      {
-         clipType = "CLIP";
-         break;
-      }
-      case ossimBandClipType_LINEAR_STRETCH:
-      {
-         clipType = "LINEAR_STRETCH";
-         break;
-      }
-      case ossimBandClipType_MEDIAN_STRETCH:
-      {
-         clipType = "MEDIAN_STRETCH";
-         break;
-      }
-      default:
-         break;
-   }
-   kwl.add(prefix,
-           "clip_type",
-           clipType.c_str(),
-           true);
-   
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
diff --git a/src/ossim/imaging/ossimBandMergeSource.cpp b/src/ossim/imaging/ossimBandMergeSource.cpp
deleted file mode 100644
index d726f09..0000000
--- a/src/ossim/imaging/ossimBandMergeSource.cpp
+++ /dev/null
@@ -1,275 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimBandMergeSource.cpp 15766 2009-10-20 12:37:09Z gpotts $
-#include <ossim/imaging/ossimBandMergeSource.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/base/ossimIrect.h>
-
-RTTI_DEF1(ossimBandMergeSource, "ossimBandMergeSource", ossimImageCombiner)
-
-ossimBandMergeSource::ossimBandMergeSource()
-   :ossimImageCombiner(),
-    theNumberOfOutputBands(0),
-    theTile(NULL)
-{
-}
-
-ossimBandMergeSource::ossimBandMergeSource(ossimConnectableObject::ConnectableObjectList& inputSources)
-   :ossimImageCombiner(inputSources),
-    theNumberOfOutputBands(0),
-    theTile(NULL)
-{
-   initialize();
-}
-
-ossimBandMergeSource::~ossimBandMergeSource()
-{
-   theNumberOfOutputBands = 0;
-}
-
-ossimRefPtr<ossimImageData> ossimBandMergeSource::getTile(const ossimIrect& tileRect,
-                                              ossim_uint32 resLevel)
-{
-   ossim_uint32 layerIdx = 0;
-   if( ( getNumberOfInputs() == 1) || !isSourceEnabled() )
-   {
-      return getNextTile(layerIdx, 0, tileRect, resLevel);
-   }
-
-   // test if initialized
-   if(!theTile.get())
-   {
-      allocate();
-   }
-   
-   if(!theTile.get())
-   {
-      return getNextTile(layerIdx, 0, tileRect, resLevel);
-   }
-   
-   long w     = tileRect.width();
-   long h     = tileRect.height();
-   long tileW = theTile->getWidth();
-   long tileH = theTile->getHeight();
-   if((w != tileW)||
-      (h != tileH))
-   {
-      theTile->setWidth(w);
-      theTile->setHeight(h);
-      if((w*h)!=(tileW*tileH))
-      {
-         theTile->initialize();
-      }
-      else
-      {
-         theTile->makeBlank();
-      }
-   }
-   else
-   {
-      theTile->makeBlank();
-   }
-   theTile->setOrigin(tileRect.ul());
-   ossim_uint32 currentBand = 0;
-   ossim_uint32 maxBands = theTile->getNumberOfBands();
-   ossim_uint32 inputIdx = 0;
-   for(inputIdx = 0; inputIdx < getNumberOfInputs(); ++inputIdx)
-   {
-      ossimImageSource* input = PTR_CAST(ossimImageSource,
-                                                  getInput(inputIdx));
-      ossimRefPtr<ossimImageData> currentTile = 0;
-
-      if(input)
-      {
-         currentTile = input->getTile(tileRect, resLevel);
-      }
-      else
-      {
-         currentTile = 0;
-      }
-      ossim_uint32 maxInputBands = 0;
-
-      if(!currentTile.get())
-      {
-         maxInputBands = 1;
-      }
-      else if(currentTile->getNumberOfBands() == 0)
-      {
-         maxInputBands = 1;
-      }
-      else
-      {
-         maxInputBands = currentTile->getNumberOfBands();
-      }
-      for(ossim_uint32 band = 0;
-          ( (band < maxInputBands) &&
-            (currentBand < maxBands));
-          ++band)
-      {
-         // clear the band with the actual NULL
-         theTile->fill(currentBand, theTile->getNullPix(band));
-
-         if(currentTile.valid())
-         {
-            if((currentTile->getDataObjectStatus() != OSSIM_NULL) &&
-               (currentTile->getDataObjectStatus() != OSSIM_EMPTY))
-            {
-               memmove(theTile->getBuf(currentBand),
-                       currentTile->getBuf(band),
-                       currentTile->getSizePerBandInBytes());
-            }
-         }
-         ++currentBand;
-      }
-   }
-   theTile->validate();
-
-   return theTile;
-}
-
-double ossimBandMergeSource::getNullPixelValue(ossim_uint32 band)const
-{
-   ossim_uint32 currentBandCount = 0;
-   ossim_uint32 idx              = 0;
-
-   ossim_uint32 maxBands = getNumberOfOutputBands();
-   if(!maxBands) return 0.0;
-   
-   while((currentBandCount < maxBands)&&
-	 (idx < getNumberOfInputs()))
-   {
-      ossimImageSource* temp = PTR_CAST(ossimImageSource, getInput(idx));
-      if(temp)
-      {
-	ossim_uint32 previousCount = currentBandCount;
-	currentBandCount += temp->getNumberOfOutputBands();
-
-         if(band < currentBandCount)
-         {
-            return temp->getNullPixelValue(band - previousCount);
-         }
-      }
-      ++idx;
-   }
-   
-   return ossim::nan();
-}
-
-double ossimBandMergeSource::getMinPixelValue(ossim_uint32 band)const
-{
-   ossim_uint32 currentBandCount = 0;
-   ossim_uint32 idx              = 0;
-
-   ossim_uint32 maxBands = getNumberOfOutputBands();
-   if(!maxBands) return 0.0;
-   
-   while((currentBandCount < maxBands)&&
-	 (idx < getNumberOfInputs()))
-   {
-      ossimImageSource* temp = PTR_CAST(ossimImageSource, getInput(idx));
-      if(temp)
-      {
-	ossim_uint32 previousCount = currentBandCount;
-	currentBandCount += temp->getNumberOfOutputBands();
-
-         if(band < currentBandCount)
-         {
-            return temp->getMinPixelValue(band - previousCount); 
-         }
-      }
-      ++idx;
-   }
-   
-   return 0.0;
-}
-
-double ossimBandMergeSource::getMaxPixelValue(ossim_uint32 band)const
-{
-   ossim_uint32 currentBandCount = 0;
-   ossim_uint32 idx              = 0;
-
-   ossim_uint32 maxBands = getNumberOfOutputBands();
-   if(!maxBands) return 0.0;
-   
-   while((currentBandCount < maxBands)&&
-	 (idx < getNumberOfInputs()))
-   {
-      ossimImageSource* temp = PTR_CAST(ossimImageSource, getInput(idx));
-      if(temp)
-      {
-	ossim_uint32 previousCount = currentBandCount;
-	currentBandCount += temp->getNumberOfOutputBands();
-
-         if(band < currentBandCount)
-         {
-            return temp->getMaxPixelValue(band - previousCount);
-         }
-      }
-      ++idx;
-   }
-   
-   return ossim::nan();
-}
-
-void ossimBandMergeSource::initialize()
-{
-   ossimImageCombiner::initialize();
-
-   if(theTile.get())
-   {
-      theTile = NULL;
-   }
-   
-   theNumberOfOutputBands = computeNumberOfInputBands();
-}
-
-void ossimBandMergeSource::allocate()
-{
-   if(theNumberOfOutputBands)
-   {
-      theTile = ossimImageDataFactory::instance()->create(this,
-                                                          this);
-      theTile->initialize();
-   }
-}
-
-ossim_uint32 ossimBandMergeSource::computeNumberOfInputBands()const
-{
-   ossim_uint32 result = 0;
-   ossim_uint32 size   = getNumberOfInputs();
-   for(ossim_uint32 index = 0; index < size; ++index)
-   {
-      ossimImageSource* temp = PTR_CAST(ossimImageSource, getInput(index));
-      if(temp)
-      {
-         if(temp->getNumberOfOutputBands() == 0)
-         {
-            ++result;
-         }
-         else
-         {
-            result += temp->getNumberOfOutputBands();
-         }
-      }
-   }
-   return result;
-}
-
-ossim_uint32 ossimBandMergeSource::getNumberOfOutputBands() const
-{
-   if(!theNumberOfOutputBands)
-   {
-      return computeNumberOfInputBands();
-   }
-   
-   return theNumberOfOutputBands;
-}
diff --git a/src/ossim/imaging/ossimBandSelector.cpp b/src/ossim/imaging/ossimBandSelector.cpp
deleted file mode 100644
index 386e5f2..0000000
--- a/src/ossim/imaging/ossimBandSelector.cpp
+++ /dev/null
@@ -1,639 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  See top level LICENSE.txt.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-// Contains class declaration for ossimBandSelector.
-// 
-//*******************************************************************
-//  $Id: ossimBandSelector.cpp 22230 2013-04-12 16:34:05Z dburken $
-
-#include <ossim/imaging/ossimBandSelector.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimVisitor.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <iostream>
-#include <algorithm>
-
-static ossimTrace traceDebug("ossimBandSelector:debug");
-
-RTTI_DEF1(ossimBandSelector,"ossimBandSelector", ossimImageSourceFilter)
-
-ossimBandSelector::ossimBandSelector()
-   :
-      ossimImageSourceFilter(),
-      theTile(0),
-      theOutputBandList(0),
-      theWithinRangeFlag(ossimBandSelectorWithinRangeFlagState_NOT_SET),
-      thePassThroughFlag(false)
-
-{
-//   theEnableFlag = false; // Start off disabled.
-   theEnableFlag = true; 
-}
-
-ossimBandSelector::~ossimBandSelector()
-{
-   theTile = 0;
-}
-
-ossimRefPtr<ossimImageData> ossimBandSelector::getTile(
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   if (!theInputConnection)
-   {
-      return ossimRefPtr<ossimImageData>();
-   }
-
-   // Get the tile from the source.
-   ossimRefPtr<ossimImageData> t = theInputConnection->getTile(tileRect, resLevel);
-
-   if (!isSourceEnabled())
-   {
-      return t;  // This tile source bypassed, return the input tile source.
-   }
-
-//   if (theOrderedCorrectlyFlag)
-//   {
-//      return t; // Input band order same as output band order.
-//   }
-
-   if(!theTile.valid()) // First time through, might not be initialized...
-   {
-      allocate();
-      if (!theTile.valid())
-      {
-         // Should never happen...
-         return t; // initialize failed.
-      }
-   }
-
-   theTile->setImageRectangle(tileRect);
-   if(theWithinRangeFlag == ossimBandSelectorWithinRangeFlagState_NOT_SET)
-   {
-      theWithinRangeFlag = ((outputBandsWithinInputRange() == true) ?
-                            ossimBandSelectorWithinRangeFlagState_IN_RANGE:
-                            ossimBandSelectorWithinRangeFlagState_OUT_OF_RANGE);
-   }
-   if(theWithinRangeFlag == ossimBandSelectorWithinRangeFlagState_OUT_OF_RANGE)
-   {
-      theTile->makeBlank();
-      return theTile;
-   }
-
-   if ( !t.valid() ||
-        (t->getDataObjectStatus() == OSSIM_EMPTY) ||
-        (t->getDataObjectStatus() == OSSIM_NULL))
-   {
-      //---
-      // Since we're enabled, we must return our tile not "t" so the
-      // correct number of bands goes through the chain.
-      //---
-      theTile->makeBlank();
-      return theTile;
-   }
-
-   // Copy selected bands to our tile.
-   for (ossim_uint32 i=0; i<theOutputBandList.size(); i++)
-   {
-      theTile->assignBand(t.get(), theOutputBandList[i], i);
-   }
-   
-   theTile->validate();
-
-   return theTile;
-}
-
-void ossimBandSelector::setOutputBandList( const vector<ossim_uint32>& outputBandList )
-{
-   if (outputBandList.size())
-   {
-      theOutputBandList = outputBandList;  // Assign the new list.
-
-      bool setBands = false;
-      ossimRefPtr<ossimImageHandler> ih = getBandSelectableImageHandler();
-      if ( ih.valid() )
-      {
-         // Our input is a single image chain that can do band selection.
-         if ( ih->setOutputBandList( outputBandList ) )
-         {
-            thePassThroughFlag = true;
-            setBands = true;
-            theTile = 0; // Don't need.
-         }
-      }
-
-      if ( setBands == false )
-      {
-         if ( theTile.valid() && ( theTile->getNumberOfBands() != outputBandList.size() ) )
-         {
-            theTile = 0;       // Force an allocate call next getTile.
-         }
-         theWithinRangeFlag = ossimBandSelectorWithinRangeFlagState_NOT_SET;
-         checkPassThrough();
-         //theOrderedCorrectlyFlag = isOrderedCorrectly();
-      }
-   }
-}
-
-ossim_uint32 ossimBandSelector::getNumberOfOutputBands() const
-{
-   ossim_uint32 bands;
-   
-   if(isSourceEnabled())
-   {
-      bands = static_cast<ossim_uint32>(theOutputBandList.size());
-   }
-   else
-   {
-      //---
-      // Note:
-      // This returns theInputConnection->getNumberOfOutputBands() which is our
-      // input.  Calling ossimBandSelector::getNumberOfInputBands() will produce
-      // an error if we are bypassed due to a band selectable image handler.
-      //---
-      bands = ossimImageSourceFilter::getNumberOfInputBands();
-   }
-
-   return bands;
-}
-
-ossim_uint32 ossimBandSelector::getNumberOfInputBands() const
-{
-   ossim_uint32 bands;
-
-   // See if we have a single image chain with band selectable image handler.
-   ossimRefPtr<ossimImageHandler> ih = getBandSelectableImageHandler();
-   if ( ih.valid() )
-   {
-      bands = ih->getNumberOfInputBands();
-   }
-   else
-   {
-      bands = ossimImageSourceFilter::getNumberOfInputBands();
-   }
-   
-   return bands;
-}
-
-void ossimBandSelector::initialize()
-{
-   // Base class will recapture "theInputConnection".
-   ossimImageSourceFilter::initialize();
-   
-   theWithinRangeFlag =  ossimBandSelectorWithinRangeFlagState_NOT_SET;
-
-   if(theInputConnection)
-   {
-      if ( !theOutputBandList.size() ) 
-      {
-         // First time through set the output band list to input.
-         theInputConnection->getOutputBandList(theOutputBandList);
-      }
-
-      // See if we have a single image chain with band selectable image handler.
-      ossimRefPtr<ossimImageHandler> ih = getBandSelectableImageHandler();
-      if ( ih.valid() )
-      {
-         if ( theOutputBandList.size() )
-         {
-            ih->setOutputBandList( theOutputBandList );
-         }
-         thePassThroughFlag = true;
-      }
-      else
-      {
-         checkPassThrough();
-      }
-      
-      if ( isSourceEnabled() )
-      {
-         // theOrderedCorrectlyFlag = isOrderedCorrectly();
-         
-         if ( theTile.valid() )
-         {
-            //---
-            // Check for:
-            // - ordered correctly
-            // - band change
-            // - scalar change
-            //---
-            if( ( theTile->getNumberOfBands() != theOutputBandList.size() ) ||
-                ( theTile->getScalarType() !=
-                  theInputConnection->getOutputScalarType() ) )
-            {
-               theTile = 0; // Don't need it.
-            }
-         }
-      }
-   }
-   else // No input connection.
-   {
-      thePassThroughFlag = true;
-   }
-
-   if ( !isSourceEnabled() )
-   {
-      theTile = 0;
-   }
-}
-
-void ossimBandSelector::allocate()
-{
-   //initialize(); // Update the connection.
-   //theOrderedCorrectlyFlag = isOrderedCorrectly();
-   theTile = ossimImageDataFactory::instance()->create(this, this);
-   theTile->initialize();
-}
-
-bool ossimBandSelector::isSourceEnabled()const
-{
-   bool result = ossimImageSourceFilter::isSourceEnabled();
-   if(result)
-   {
-      // if I am not marked to pass information on through then enable me
-      result = !thePassThroughFlag;
-   }
-   
-   return result;
-}
-
-double ossimBandSelector::getMinPixelValue(ossim_uint32 band)const
-{
-   if(theInputConnection)
-   {
-      if (isSourceEnabled())
-      {
-         if(band < theOutputBandList.size())
-         {
-            return theInputConnection->
-               getMinPixelValue(theOutputBandList[band]);
-         }
-         else
-         {
-            return theInputConnection->getMinPixelValue(band);
-         }
-      }
-      else
-      {
-         return theInputConnection->getMinPixelValue(band);
-      }
-   }
-   return 0;
-}
-
-double ossimBandSelector::getNullPixelValue(ossim_uint32 band)const
-{
-   if(theInputConnection)
-   {
-      if (isSourceEnabled())
-      {
-         if(band < theOutputBandList.size())
-         {
-            return theInputConnection->
-               getNullPixelValue(theOutputBandList[band]);
-         }
-         else
-         {
-            return theInputConnection->getNullPixelValue(band);
-         }
-      }
-      else
-      {
-         return theInputConnection->getNullPixelValue(band);
-      }
-   }
-   
-   return 0;
-}
-
-double ossimBandSelector::getMaxPixelValue(ossim_uint32 band)const
-{
-   if(theInputConnection)
-   {
-      if (isSourceEnabled())
-      {
-         if(band < theOutputBandList.size())
-         {
-            return theInputConnection->
-               getMaxPixelValue(theOutputBandList[band]);
-         }
-         else
-         {
-            return theInputConnection->getMaxPixelValue(band);
-         }
-      }
-      else
-      {
-        return theInputConnection->getMaxPixelValue(band);
-      }
-   }
-   return 1.0/DBL_EPSILON;
-}
-
-bool ossimBandSelector::saveState(ossimKeywordlist& kwl,
-                                  const char* prefix)const
-{
-   ossimString temp;
-
-   kwl.add(prefix,
-           ossimKeywordNames::NUMBER_OUTPUT_BANDS_KW,
-           static_cast<int>(theOutputBandList.size()),
-           true);
-   
-   ossimString bandsString;
-   ossim::toSimpleStringList(bandsString,
-                             theOutputBandList);
-   kwl.add(prefix,
-           ossimKeywordNames::BANDS_KW,
-           bandsString,
-           true);
-/*   
-   for(ossim_uint32 counter = 0; counter < theOutputBandList.size();counter++)
-   {
-      temp  = ossimKeywordNames::BAND_KW;
-      temp += ossimString::toString(counter+1);
-      
-      kwl.add(prefix,
-              temp.c_str(),
-              ossimString::toString(theOutputBandList[counter]+1).c_str());
-   }
-*/   
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
-
-bool ossimBandSelector::loadState(const ossimKeywordlist& kwl,
-                                  const char* prefix)
-{
-   ossimImageSourceFilter::loadState(kwl, prefix);
-
-   theOutputBandList.clear();
-   
-   ossimString copyPrefix = prefix;
-   
-   ossimString bands = kwl.find(prefix, ossimKeywordNames::BANDS_KW);
-   if(!bands.empty())
-   {
-      ossim::toSimpleVector(theOutputBandList, bands);
-   }
-   else
-   {
-      ossimString regExpression =  ossimString("^(") + copyPrefix + "band[0-9]+)";
-      
-      vector<ossimString> keys = kwl.getSubstringKeyList( regExpression );
-      long numberOfBands = (long)keys.size();
-      ossim_uint32 offset = (ossim_uint32)(copyPrefix+"band").size();
-      std::vector<int>::size_type idx = 0;
-      std::vector<int> numberList(numberOfBands);
-      for(idx = 0; idx < keys.size();++idx)
-      {
-         ossimString numberStr(keys[idx].begin() + offset,
-                               keys[idx].end());
-         numberList[idx] = numberStr.toInt();
-      }
-      std::sort(numberList.begin(), numberList.end());
-      for(idx=0;idx < numberList.size();++idx)
-      {
-         const char* bandValue =
-         kwl.find(copyPrefix,
-                  ("band"+ossimString::toString(numberList[idx])).c_str());
-         theOutputBandList.push_back( ossimString(bandValue).toLong()-1);
-      }
-   }
-
-   initialize();
-   
-   return true;
-}
-
-void ossimBandSelector::checkPassThrough()
-{
-   thePassThroughFlag = ((theInputConnection == 0)||!outputBandsWithinInputRange());
-   
-   // check if marked with improper bands
-   if(thePassThroughFlag) return;
-   
-   if(theInputConnection)
-   {
-      std::vector<ossim_uint32> inputList;
-      theInputConnection->getOutputBandList(inputList);
-
-      if ( inputList.size() == theOutputBandList.size() )
-      {
-         const std::vector<ossim_uint32>::size_type SIZE =
-            theOutputBandList.size();
-      
-         std::vector<ossim_uint32>::size_type i = 0;
-         while (i < SIZE)
-         {
-            if ( inputList[i] != theOutputBandList[i] )
-            {
-               break;
-            }
-            ++i;
-         }
-         if (i == SIZE)
-         {
-            thePassThroughFlag = true;
-         }
-      }
-   }
-   else
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimBandSelector::isOrderedCorrectly() ERROR:"
-         << "Method called prior to initialization!\n";
-      }
-   }
-
-}
-
-bool ossimBandSelector::outputBandsWithinInputRange() const
-{
-   bool result = false;
-   
-   if(theInputConnection)
-   {
-      result = true;
-      const ossim_uint32 HIGHEST_BAND = getNumberOfInputBands() - 1;
-      const ossim_uint32 OUTPUT_BANDS = (ossim_uint32)theOutputBandList.size();
-      for (ossim_uint32 i=0; i<OUTPUT_BANDS; ++i)
-      {
-         if (theOutputBandList[i] > HIGHEST_BAND)
-         {
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimBandSelector::outputBandsWithinInputRange() ERROR:"
-               << "Output band greater than highest input band. "
-               << theOutputBandList[i] << " > " << HIGHEST_BAND << "."
-               << std::endl;
-            }
-            result = false;
-            break;
-         }
-      }
-   }
-   else
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimBandSelector::outputBandsWithinInputRange() ERROR:"
-         << "Method called prior to initialization!" << std::endl;
-      }
-   }
-   return result;
-}
-
-void ossimBandSelector::getOutputBandList(std::vector<ossim_uint32>& bandList) const
-{
-   if ( isSourceEnabled()&&theOutputBandList.size() )
-   {
-      bandList = theOutputBandList;
-   }
-   else if (theInputConnection)
-   {
-      theInputConnection->getOutputBandList(bandList);
-   }
-   else
-   {
-      bandList.clear();
-   }
-}
-
-ossimString ossimBandSelector::getLongName()const
-{
-   return ossimString("Band Selector, maps an input band to the output band.");
-}
-
-ossimString ossimBandSelector::getShortName()const
-{
-   return ossimString("Band Selector");
-}
-
-void ossimBandSelector::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property) return;
-
-   if(property->getName() == "bandSelection")
-   {
-     ossimString str = property->valueToString();
-     std::vector<ossimString> str_vec;
-     std::vector<ossim_uint32> int_vec;
-     
-     str.split( str_vec, " " );
-     
-     for ( ossim_uint32 i = 0; i < str_vec.size(); ++i )
-     {
-        if(!str_vec[i].empty())
-        {
-           int_vec.push_back( str_vec[i].toUInt32() );
-        }
-     }
-     setOutputBandList( int_vec );
-   }
-   else if(property->getName() == "bands")
-   {
-      std::vector<ossim_uint32> selection;
-      if(ossim::toSimpleVector(selection, property->valueToString()))
-      {
-         theOutputBandList = selection;
-      }
-   }
-   else
-   {
-      ossimImageSourceFilter::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimBandSelector::getProperty(const ossimString& name)const
-{
-   if(name == "bandSelection")
-   {
-      std::vector<ossim_uint32> bands;
-	  
-	  getOutputBandList( bands );
-	  	  
-      std::vector<ossimString> bandNames;
-
-      for(ossim_uint32 i = 0; i < bands.size(); i++)
-      {
-         bandNames.push_back( ossimString::toString( bands[i] ) );
-      }
-	  
-	  ossimString str;
-	  
-	  str.join( bandNames, " " );
-	  
-      ossimStringProperty* stringProp = new ossimStringProperty(name, str);
-									
-      stringProp->clearChangeType();
-      stringProp->setReadOnlyFlag(false);
-      stringProp->setCacheRefreshBit();
-      
-      return stringProp;
-   }
-   else if(name == "bands")
-   {
-      ossimString bandsString;
-      ossim::toSimpleStringList(bandsString,
-                                theOutputBandList);
-      ossimStringProperty* stringProp = new ossimStringProperty(name, bandsString);
-      
-      stringProp->clearChangeType();
-      stringProp->setReadOnlyFlag(false);
-      stringProp->setCacheRefreshBit();
-      
-      return stringProp;
-   }
-   return ossimImageSourceFilter::getProperty(name);
-}
-
-void ossimBandSelector::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageSourceFilter::getPropertyNames(propertyNames);
-   propertyNames.push_back("bands");
-}
-
-ossimRefPtr<ossimImageHandler> ossimBandSelector::getBandSelectableImageHandler() const
-{
-   ossimRefPtr<ossimImageHandler> ih = 0;
-
-   if ( theInputConnection )
-   {
-      ossimTypeNameVisitor visitor(ossimString("ossimImageHandler"),
-                                   true,
-                                   ossimVisitor::VISIT_CHILDREN|ossimVisitor::VISIT_INPUTS);
-      
-      theInputConnection->accept(visitor);
-
-      // If there are multiple image handlers, e.g. a mosaic do not uses.
-      if ( visitor.getObjects().size() == 1 )
-      {
-         ih = visitor.getObjectAs<ossimImageHandler>( 0 );
-         if ( ih.valid() )
-         {
-            if ( ih->isBandSelector() == false )
-            {
-               ih = 0;
-            }
-         }
-      }
-      
-   } // Matches: if ( theInputConnection )
-   return ih;
-   
-} // End: ossimBandSelector::getBandSelectableImageHandler()
diff --git a/src/ossim/imaging/ossimBandSeparateHandler.cpp b/src/ossim/imaging/ossimBandSeparateHandler.cpp
deleted file mode 100644
index 6d4c5be..0000000
--- a/src/ossim/imaging/ossimBandSeparateHandler.cpp
+++ /dev/null
@@ -1,283 +0,0 @@
-//*************************************************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Oscar Kramer
-//
-// Description:
-// 
-// Image handler used when the multi-band image has each band represented by a different disk file.
-// This is the case for some Ikonos imagery. 
-//
-//*************************************************************************************************
-//  $Id: ossimBandSeparateHandler.cpp 2644 2011-05-26 15:20:11Z oscar.kramer $
-
-#include <ossim/imaging/ossimBandSeparateHandler.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <algorithm>
-
-RTTI_DEF1(ossimBandSeparateHandler, "ossimBandSeparateHandler", ossimImageHandler)
-
-//*************************************************************************************************
-//!  Constructor (default):
-//*************************************************************************************************
-ossimBandSeparateHandler::ossimBandSeparateHandler()
-{ }
-
-//*************************************************************************************************
-//! Destructor:
-//*************************************************************************************************
-ossimBandSeparateHandler::~ossimBandSeparateHandler()
-{
-   close();
-}
-
-//*************************************************************************************************
-// Opens multiple band-files based on info in metadata file.
-//*************************************************************************************************
-bool ossimBandSeparateHandler::open()
-{
-   if (isOpen())
-      close();
-
-   // Fetch the list of band filenames:
-   vector<ossimFilename> file_names;
-   getBandFileNames(file_names);
-
-   // There should be a list of filenames populated:
-   if (file_names.size() == 0)
-      return false;
-
-   m_mergeSource = new ossimBandMergeSource;
-   ossimRefPtr<ossimImageHandler> handler = 0;
-   for (ossim_uint32 band=0; band<file_names.size(); ++band)
-   {
-      // Open input band file:
-      handler = ossimImageHandlerRegistry::instance()->open(file_names[band], true, false);
-      if (!handler.valid())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)<<"ossimBandSeparateHandler::open() -- "
-            "Expected to find band file at <"<<file_names[band]<<"> but could not open file."
-            " Image not opened."<<endl;
-         close();
-         return false;
-      }
-
-      // Add this band file to the merge source:
-      m_bandFiles.push_back(handler);
-      m_mergeSource->connectMyInputTo(band, handler.get());
-   }
-
-   completeOpen();
-   return true;
-}
-
-//*************************************************************************************************
-//! Deletes the overview and clears the valid image vertices.  Derived
-//! classes should implement.
-//*************************************************************************************************
-void ossimBandSeparateHandler::close()
-{
-   vector<ossimRefPtr<ossimImageHandler> >::iterator iter = m_bandFiles.begin();
-   while (iter != m_bandFiles.end())
-   {
-      (*iter)->close();
-      *iter = 0;
-      ++iter;
-   }
-   m_bandFiles.clear();
-   m_mergeSource = 0;
-}
-
-//*************************************************************************************************
-//! Derived classes must implement this method to be concrete.
-//! @return true if open, false if not.
-//*************************************************************************************************
-bool ossimBandSeparateHandler::isOpen()const
-{
-   if (m_bandFiles.size() > 0)
-      return true;
-
-   return false;
-}
-
-//*************************************************************************************************
-//! Fills the requested tile by pulling pixels from multiple file tiles as needed.
-//*************************************************************************************************
-ossimRefPtr<ossimImageData> ossimBandSeparateHandler::getTile(const ossimIrect& tile_rect, 
-                                                              ossim_uint32 resLevel)
-{
-   // First verify that there are band-files available:
-   if ((m_bandFiles.size() == 0) || !m_mergeSource.valid())
-      return ossimRefPtr<ossimImageData>();
-
-   // Check if res level represents data in the overview:
-   if (theOverview.valid() && (resLevel > 0))
-      return theOverview->getTile(tile_rect, resLevel);
-
-   // Just pass getTile call on to contained bandMergeSource:
-   return m_mergeSource->getTile(tile_rect, resLevel);
-}
-
-//*************************************************************************************************
-//! @param resLevel Reduced resolution level to return lines of.
-//! Default = 0
-//! @return The number of lines for specified reduced resolution level.
-//*************************************************************************************************
-ossim_uint32 ossimBandSeparateHandler::getNumberOfLines(ossim_uint32 resLevel) const
-{
-   if ((m_bandFiles.size() == 0))
-      return 0;
-
-   // Using simple decimation by powers of 2:
-   ossim_uint32 numlines = m_bandFiles[0]->getNumberOfLines() >> resLevel;
-   return numlines;
-}
-
-//*************************************************************************************************
-//! @param resLevel Reduced resolution level to return samples of.
-//! Default = 0
-//! @return The number of samples for specified reduced resolution level.
-//*************************************************************************************************
-ossim_uint32 ossimBandSeparateHandler::getNumberOfSamples(ossim_uint32 resLevel) const
-{
-   if ((m_bandFiles.size() == 0))
-      return 0;
-
-   // Using simple decimation by powers of 2:
-   ossim_uint32 numsamps = m_bandFiles[0]->getNumberOfSamples() >> resLevel;
-   return numsamps;
-}
-
-//*************************************************************************************************
-//! Method to save the state of an object to a keyword list.
-//! Return true if ok or false on error.
-//*************************************************************************************************
-bool ossimBandSeparateHandler::saveState(ossimKeywordlist& kwl, const char* prefix) const
-{
-   return ossimImageHandler::saveState(kwl, prefix);
-}
-
-//*************************************************************************************************
-//! Method to the load (recreate) the state of an object from a keyword
-//! list.  Return true if ok or false on error.
-//*************************************************************************************************
-bool ossimBandSeparateHandler::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   if (!ossimImageHandler::loadState(kwl, prefix))
-      return false;
-
-   return open();
-}
-
-//*************************************************************************************************
-// Returns the number of bands of the first tile since all tiles need to have the same pixel type.
-//*************************************************************************************************
-ossim_uint32 ossimBandSeparateHandler::getNumberOfInputBands() const
-{
-   return (ossim_uint32) m_bandFiles.size();
-}
-
-//*************************************************************************************************
-//! Returns scalar type of first tile (should be the same for all tiles)
-//*************************************************************************************************
-ossimScalarType ossimBandSeparateHandler::getOutputScalarType() const
-{
-   if ((m_bandFiles.size() == 0) || (!m_bandFiles[0].valid()))
-      return OSSIM_SCALAR_UNKNOWN;
-
-   return m_bandFiles[0]->getOutputScalarType();
-}
-
-//*************************************************************************************************
-//! Overrides base connection method to connect output of merge source.
-// Returns TRUE if connection possible
-//*************************************************************************************************
-bool ossimBandSeparateHandler::canConnectMyOutputTo(ossim_int32 index, 
-                                                    const ossimConnectableObject* obj)
-{
-   if (!m_mergeSource.valid())
-      return false;
-
-   return m_mergeSource->canConnectMyOutputTo(index, obj);
-}
-
-//*************************************************************************************************
-//! Fetches the list of band file names from the header file. The header file name is contained
-//! in ossimImageHandler::theImageFile.
-//! NOTE TO PROGRAMMER: This class is presently tailored to the Ikonos metadata file specifying
-//! the individual band files. If other "metadata" formats are to be supported, then this class
-//! should be derived from. This method would therefore be pure virtual in this base-class and only 
-//! this method would need to be implemented in the derived classes.
-//*************************************************************************************************
-void ossimBandSeparateHandler::getBandFileNames(vector<ossimFilename>& file_names)
-{
-   file_names.clear();
-
-   // Ikonos expects metadata file with text extension:
-   if (theImageFile.ext() != "txt")
-      return;
-
-   // Attempt to open the metadata file:
-   ifstream is (theImageFile.chars());
-   if (is.fail())
-   {
-      ossimNotify(ossimNotifyLevel_WARN)<<"ossimBandSeparateHandler::open() -- "
-         "Cannot open text file at <"<<theImageFile<<">. Image not opened."<<endl;
-      return;
-   }
-
-   vector<ossimString> fname_list;
-   const ossimString separator (" ");
-   char line_buf[4096];
-   while (!is.eof())
-   {
-      is.getline(line_buf, 4096);
-      ossimString line_str (line_buf);
-
-      // Look for mention of multiple band files. It must indicate "separate files". This comes 
-      // before the list of band files:
-      if (line_str.contains("Multispectral Files:"))
-      {
-         if (!line_str.contains("Separate Files"))
-            return;
-      }
-
-      // Look for list of band files:
-      if (line_str.contains("Tile File Name:"))
-      {
-         ossimString file_list_str = line_str.after(":");
-         file_list_str.split(fname_list, separator, true);
-         break;
-      }
-   }
-   is.close();
-
-   // Set the path of individual band files to match metadata file path:
-   ossimFilename pathName (theImageFile.path());
-   for (size_t i=0; i<fname_list.size(); ++i)
-   {
-      ossimFilename fname (fname_list[i]);
-      fname.setPath(pathName);
-      file_names.push_back(fname);
-   }
-}
-
-//*************************************************************************************************
-//! Returns the geometry of the first band.
-//*************************************************************************************************
-ossimRefPtr<ossimImageGeometry> ossimBandSeparateHandler::getImageGeometry()
-{
-   if ((m_bandFiles.size() == 0) || (!m_bandFiles[0].valid()))
-      return 0;
-
-   return m_bandFiles[0]->getImageGeometry();
-}
diff --git a/src/ossim/imaging/ossimBitMaskTileSource.cpp b/src/ossim/imaging/ossimBitMaskTileSource.cpp
deleted file mode 100644
index d2ba39b..0000000
--- a/src/ossim/imaging/ossimBitMaskTileSource.cpp
+++ /dev/null
@@ -1,385 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Oscar Kramer
-//
-// Description:
-//
-// Contains class definition for ossimBitMaskTileSource.
-//*******************************************************************
-//  $Id: ossimBitMaskTileSource.cpp 2644 2011-05-26 15:20:11Z oscar.kramer $
-
-#include <ossim/imaging/ossimBitMaskTileSource.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimErrorContext.h>
-#include <ossim/base/ossimInterleaveTypeLut.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/imaging/ossimBitMaskWriter.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <cmath>
-
-RTTI_DEF1_INST(ossimBitMaskTileSource, "ossimBitMaskTileSource", ossimImageHandler);
-
-//*******************************************************************
-// Public Constructor:
-//*******************************************************************
-ossimBitMaskTileSource::ossimBitMaskTileSource()
-   :
-   ossimImageHandler(),
-   m_tile(NULL)
-{
-}
-
-//*************************************************************************************************
-// Destructor must free the buffers for each res level
-//*************************************************************************************************
-ossimBitMaskTileSource::~ossimBitMaskTileSource()
-{
-   close();
-}
-
-//*************************************************************************************************
-// Reset
-//*************************************************************************************************
-void ossimBitMaskTileSource::close()
-{
-   ossimImageHandler::close();  // base class
-
-   // Wipe the mask buffers:
-   vector<ossim_uint8*>::iterator iter = m_buffers.begin();
-   while (iter != m_buffers.end())
-   {
-      delete [] (*iter);
-      iter++;
-   }
-   m_buffers.clear();
-   m_bufferSizes.clear();
-   m_tile = NULL;
-}
-
-//*************************************************************************************************
-// Opens an OSSIM Bit Mask raster file. This is a custom formatted file with header info
-//**************************************************************************************************
-bool ossimBitMaskTileSource::open()
-{
-   static const char MODULE[] = "ossimBitMaskTileSource::open()";
-
-   if (!isSupportedExtension())
-   {
-      close();
-      return false;
-   }
-
-   close();
-
-   // Open the mask file and verify magic number, read header info as well and verify good values:
-   std::ifstream fileStream(theImageFile.chars(), ios::in|ios::binary);
-   if (!fileStream.good())
-      return false;
-   ossimString magic_number;
-   int num_res_levels = 0;
-   char space;
-   fileStream >> magic_number;
-   if (magic_number == ossimBitMaskWriter::MASK_FILE_MAGIC_NUMBER)
-   {
-      // This is a next-generation mask file with header:
-      fileStream >> theStartingResLevel >> num_res_levels;
-      for (int r=0; r<num_res_levels; r++)
-      {
-         ossimIpt buffer_size;
-         fileStream >> buffer_size.x >> buffer_size.y;
-         m_bufferSizes.push_back(buffer_size);
-      }
-      fileStream >> space;
-   }
-   else
-   {
-      // This is the old headerless "Ming mask" format. Need to query the source image for image size.
-      // This format implies a starting res level of 1:
-      if (!m_handler.valid())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-            << MODULE << " ERROR:\nInput file <"<<theImageFile<<"> has no header information and "
-            "no valid source image has been provided. Cannot process mask" << std::endl;
-         fileStream.close();
-         close();
-         return false;
-      }
-      theStartingResLevel = 1;
-      num_res_levels = m_handler->getNumberOfDecimationLevels() - 1;
-      fileStream.seekg(0);
-
-      // Need to compute buffer sizes since they are not available in the mask header:
-      ossimIpt image_size = m_handler->getBoundingRect(1).size();
-      ossimIpt buffer_size ((image_size.x+7)/8, image_size.y);
-      for (int r=0; r<num_res_levels; r++)
-      {
-          m_bufferSizes.push_back(buffer_size);
-          buffer_size.x = (buffer_size.x+1)/2;
-          buffer_size.y = (buffer_size.y+1)/2;
-      }
-   }
-
-   if (m_bufferSizes.empty())
-   {
-      ossimNotify(ossimNotifyLevel_FATAL)
-         << MODULE << " ERROR:\nInput file <"<<theImageFile<<"> is not recognized or has invalid "
-         "header information." << std::endl;
-      fileStream.close();
-      close();
-      return false;
-   }
-
-   // Good to go, Need to now establish sizes for and offsets to each res level:
-   for (int r=0; r<num_res_levels; ++r)
-   {
-      // Allocate buffer for this res level:
-      ossim_uint32 size = m_bufferSizes[r].x * m_bufferSizes[r].y; 
-      ossim_uint8* buffer = new ossim_uint8[size];
-      m_buffers.push_back((ossim_uint8*) buffer);
-
-      // Read from disk:
-      fileStream.read((char*)buffer, size);
-      if (fileStream.fail())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-            << MODULE << " ERROR:"
-            << "\nError encountered reading mask file <" << theImageFile << ">"<<std::endl;
-         fileStream.close();
-         close();
-         return false;
-      }
-   }
-
-   fileStream.close();
-
-   // Allocate the mask tile. This will be 8-bits per pixel (i.e., decompressed):
-   m_tile = ossimImageDataFactory::instance()->create(this, this);
-   m_tile->initialize();
-
-   // Computes decimation factors for additional reduced res sets:
-   establishDecimationFactors();
-
-   return true;
-}
-
-//**************************************************************************************************
-// "Open" here means only that the mask buffers are valid and ready for access
-//**************************************************************************************************
-bool ossimBitMaskTileSource::isOpen() const
-{
-   return ((m_buffers.size() != 0) || (m_maskWriter.valid()));
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-bool ossimBitMaskTileSource::isSupportedExtension()
-{
-   ossimString ext = theImageFile.ext();
-   if (ext == "mask")
-      return true;
-
-   return false;
-}
-
-//*************************************************************************************************
-// Unpacks the mask data into a destination tile
-//*************************************************************************************************
-ossimRefPtr<ossimImageData> ossimBitMaskTileSource::getTile(const ossimIrect& tile_rect, 
-                                                            ossim_uint32 resLevel)
-{
-   static const ossim_uint8 MASK_BITS[] = {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01};
-
-   // Allocate the mask tile. This will be 8-bits per pixel (i.e., decompressed):
-   if (!m_tile.valid())
-   {
-      m_tile = ossimImageDataFactory::instance()->create(this, this);
-      m_tile->initialize();
-   }
-
-   // Initial screening:
-   if (!(isOpen() && isSourceEnabled() && isValidRLevel(resLevel)))
-      return NULL;
-
-   // Check if requested rect falls inside valid mask area:
-   if (!getImageRectangle(resLevel).intersects(tile_rect))
-      return NULL;
-
-   // Check if tile size matches requested size:
-   if ((m_tile->getWidth() != tile_rect.width()) || (m_tile->getHeight() != tile_rect.height()))
-   {
-      m_tile->setWidthHeight(tile_rect.width(), tile_rect.height());
-      m_tile->initialize();
-   }
-   m_tile->setImageRectangle(tile_rect);
-
-   // Start with blank tile if rect partially intersects defined mask area:
-   ossimIrect image_rect (getImageRectangle(resLevel));
-   if (!tile_rect.completely_within(image_rect))
-      m_tile->makeBlank();
-   
-   //##### START DEBUG CODE #########################
-   // This else if identifies unassigned mask pixels being returned by this method incorrectly.
-   // See ossimMaskFilter::executeMaskFilterSelection() (OLK 2/11)
-   //m_tile->fill(128.0);//###
-   //##### END DEBUG CODE #########################
-
-   ossimIpt image_size (image_rect.size());
-   ossim_uint32 num_mask_cols = (image_size.x+7)/8; 
-   ossim_uint8* tilebuf = (ossim_uint8*) m_tile->getBuf(0);
-   ossim_uint32 tile_index = 0, mask_index = 0, start_bit=0;
-   ossimIpt ul (tile_rect.ul());
-   ossimIpt lr (tile_rect.lr());
-
-   // Decide if we use our own mask buffer (read from file) or borrow tha active mask writer's
-   // buffer:
-   ossim_uint8* maskbuf;
-   if (m_maskWriter.valid())
-      maskbuf = m_maskWriter->m_buffers[resLevel-theStartingResLevel];
-   else
-      maskbuf = m_buffers[resLevel-theStartingResLevel];
-
-   // Nested loop to fill tile:
-   for (int y=ul.y; (y<=lr.y)&&(y<image_size.y); y++)
-   {
-      mask_index = y*num_mask_cols + ul.x/8;
-      start_bit = ul.x % 8; // may not start on even mask byte boundary
-      for (int x=ul.x; x<=lr.x;)
-      {
-         if (x < image_size.x)
-         {
-            // fetch mask pixel and isolate bit of interest:
-            for (ossim_uint32 mask_bit=start_bit; mask_bit<8; ++mask_bit)
-            {
-               if (maskbuf[mask_index] & MASK_BITS[mask_bit])
-                  tilebuf[tile_index++] = 255;
-               else
-                  tilebuf[tile_index++] = 0;
-
-               // Advance the pixel column and check for end of image rect:
-               ++x;
-               if ((x >= image_size.x) || (x>lr.x))
-                  break;
-            }
-
-            ++mask_index; // advance the mask buffer index 1 after processing 8 tile samples
-            start_bit = 0;
-         }
-         else
-         {
-            // Tile buffer extends beyond valid mask rect, so assume it is masked (0):
-            tilebuf[tile_index++] = 0;
-            ++x;
-         }
-      }
-   }
-   
-   m_tile->validate();
-   return m_tile;
-}
-
-//*******************************************************************
-// Argument res_Level is relative to the full image
-//*******************************************************************
-bool ossimBitMaskTileSource::isValidRLevel(ossim_uint32 res_Level) const
-{
-   ossim_uint32 num_rlevels;
-   if (m_maskWriter.valid())
-      num_rlevels = (ossim_uint32) m_maskWriter->m_buffers.size();
-   else
-      num_rlevels = (ossim_uint32) m_buffers.size();
-
-   return ((res_Level >= theStartingResLevel) && 
-           ((res_Level-theStartingResLevel) < num_rlevels));
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-ossim_uint32 ossimBitMaskTileSource::getNumberOfLines(ossim_uint32 res_Level) const
-{
-   if (!isValidRLevel(res_Level))
-      return 0;
-
-   if (m_maskWriter.valid())
-      return m_maskWriter->m_bufferSizes[res_Level-theStartingResLevel].y;
-
-   return m_bufferSizes[res_Level-theStartingResLevel].y;
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-ossim_uint32 ossimBitMaskTileSource::getNumberOfSamples(ossim_uint32 res_Level) const
-{
-   if (!isValidRLevel(res_Level))
-      return 0;
-
-   ossim_uint32 n = 0;
-   if (m_maskWriter.valid())
-      n = m_maskWriter->m_bufferSizes[res_Level-theStartingResLevel].x;
-   else
-      n = m_bufferSizes[res_Level-theStartingResLevel].x;
-
-   return n*8; // 8 pixels represented in one mask byte entry
-}
-
-ossimRefPtr<ossimImageGeometry> ossimBitMaskTileSource::getImageGeometry()
-{
-   return 0;
-}
-
-//*******************************************************************
-//! Overrides base class implementation.
-//*******************************************************************
-ossim_uint32 ossimBitMaskTileSource::getNumberOfDecimationLevels() const
-{
-   return (ossim_uint32) theDecimationFactors.size();
-}
-
-//*******************************************************************
-//! Overrides base class implementation.
-//*******************************************************************
-void ossimBitMaskTileSource::establishDecimationFactors()
-{
-   theDecimationFactors.clear();
-   ossim_uint32 num_res_levels = (ossim_uint32) m_buffers.size();
-   ossimDpt decimation(1, 1);
-   for (ossim_uint32 r=0; r<num_res_levels; r++)
-   {
-      theDecimationFactors.push_back(decimation);
-      decimation = decimation/2.0;
-   }
-}
-
-//*************************************************************************************************
-//! This class can be used during overview generation, in which case there will be a simultaneous
-//! mask writing. Instead of accessing a mask file (which may not yet exist), the mask buffer
-//! of the writer will be accessed directly instead of our own buffer.
-//*************************************************************************************************
-void ossimBitMaskTileSource::setAssociatedMaskWriter(ossimBitMaskWriter* maskWriter)
-{ 
-   m_maskWriter = maskWriter; 
-   if (m_maskWriter.valid())
-      theStartingResLevel = m_maskWriter->m_startingResLevel;
-}
-
-//*************************************************************************************************
-//! For backward compatibility with older mask format ("Ming Mask"), provide for associating
-//! the mask with an image handler:
-//*************************************************************************************************
-void ossimBitMaskTileSource::setAssociatedImageHandler(ossimImageHandler* handler)
-{
-   m_handler = handler;
-}
-
diff --git a/src/ossim/imaging/ossimBitMaskWriter.cpp b/src/ossim/imaging/ossimBitMaskWriter.cpp
deleted file mode 100644
index 31283b2..0000000
--- a/src/ossim/imaging/ossimBitMaskWriter.cpp
+++ /dev/null
@@ -1,481 +0,0 @@
-//*************************************************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Oscar Kramer
-//
-// Description: Contains implementation of class for computing a mask from an input image.
-//   The mask is stored in a compressed format where one byte represents 8 bit-masks for masking
-//   8 image pixels. 
-//*************************************************************************************************
-//  $Id: ossimBitMaskWriter.cpp 3081 2011-12-22 16:34:12Z oscar.kramer $
-
-#include <ossim/imaging/ossimBitMaskWriter.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimVisitor.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageHandler.h>
-
-const char* ossimBitMaskWriter::MASK_FILE_MAGIC_NUMBER = "OSSIM_BIT_MASK";
-const char* ossimBitMaskWriter::BM_STARTING_RLEVEL_KW = "starting_rlevel";
-
-//*************************************************************************************************
-// Constructor accepts handler to the source imagery being used to compute the mask.
-//*************************************************************************************************
-ossimBitMaskWriter::ossimBitMaskWriter()
-   :
-   m_flipper(0),
-   m_startingResLevel(0)
-{
-}
-
-//*************************************************************************************************
-// Destructor
-//*************************************************************************************************
-ossimBitMaskWriter::~ossimBitMaskWriter()
-{
-   // Make sure the mask file was written out before disappearing:
-   if (isOpen())
-      close();
-}
-
-//*************************************************************************************************
-// Returns true if buffers allocated:
-//*************************************************************************************************
-bool ossimBitMaskWriter::isOpen() const
-{
-   return (m_buffers.size() != 0);
-}
-
-//*************************************************************************************************
-// Returns true if buffers allocated:
-//*************************************************************************************************
-bool ossimBitMaskWriter::open()
-{
-   // Nothing to do yet. Eventually want to open the output stream here and write the buffer after
-   // each R-level is completed, so we don't need to keep vector of buffers in memory.
-   return true; 
-}
-
-//*************************************************************************************************
-// Reset
-//*************************************************************************************************
-void ossimBitMaskWriter::reset()
-{
-   // Wipe the mask buffers:
-   vector<ossim_uint8*>::iterator iter = m_buffers.begin();
-   while (iter != m_buffers.end())
-   {
-      delete [] (*iter);
-      iter++;
-   }
-   m_buffers.clear();
-   m_bufferSizes.clear();
-}
-
-//*************************************************************************************************
-//! Sets the NULL pixel value to consider when computing mask:
-//*************************************************************************************************
-void ossimBitMaskWriter::setBogusPixel(double pixel_value)
-{
-   if (!m_flipper.valid())
-      initializeFlipper();
-
-   m_flipper->setTargetValue(pixel_value);
-}
-
-//*************************************************************************************************
-//! Sets the range of pixels (inclusive) to be regarded as NULL pixels when computing mask
-//*************************************************************************************************
-void ossimBitMaskWriter::setBogusPixelRange(double min, double max)
-{
-   if (!m_flipper.valid())
-      initializeFlipper();
-
-   m_flipper->setTargetRange(min, max);
-}
-
-//*************************************************************************************************
-// Given a source's tile, derives the alpha mask and saves it in buffer for later writing to disk.
-//*************************************************************************************************
-void ossimBitMaskWriter::generateMask(ossimRefPtr<ossimImageData> tile, ossim_uint32 rLevel)
-{
-   static const ossim_uint8 MASK_BITS_0[] = {0x7F, 0xBF, 0xDF, 0xEF, 0xF7, 0xFB, 0xFD, 0xFE};
-   static const ossim_uint8 MASK_BITS_1[] = {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01};
-
-   // We don't start doing anything until starting res or higher requested:
-   ossim_uint32 mask_rlevel = rLevel - m_startingResLevel;
-   if (!tile.valid())
-      return;
-
-   // We should have had this done by now, but just in case:
-   if (!m_flipper.valid())
-      initializeFlipper();
-
-   // The flipper is used to identify null pixels since it has more sophisticated filtering 
-   // than available from the tile object:
-   switch (tile->getScalarType())
-   {
-   case OSSIM_UCHAR:
-      m_flipper->flipPixels(ossim_uint8(0), tile.get(), rLevel);
-      break;
-   case OSSIM_UINT16:
-   case OSSIM_USHORT11:
-      m_flipper->flipPixels(ossim_uint16(0), tile.get(), rLevel);
-      break;
-   case OSSIM_SSHORT16:
-      m_flipper->flipPixels(ossim_sint16(0), tile.get(), rLevel);
-      break;
-   case OSSIM_UINT32:
-      m_flipper->flipPixels(ossim_uint32(0), tile.get(), rLevel);
-      break;
-   case OSSIM_SINT32:
-      m_flipper->flipPixels(ossim_sint32(0), tile.get(), rLevel);
-      break;
-   case OSSIM_FLOAT32:
-   case OSSIM_NORMALIZED_FLOAT:
-      m_flipper->flipPixels(float(0), tile.get(), rLevel);
-      break;
-   case OSSIM_NORMALIZED_DOUBLE:
-   case OSSIM_FLOAT64:
-      m_flipper->flipPixels(ossim_float64(0), tile.get(), rLevel);
-      break;
-   case OSSIM_SCALAR_UNKNOWN:
-   default:
-      ossimNotify(ossimNotifyLevel_WARN) << "ossimBitMaskWriter::generateMask()-- "
-         "Unsupported scalar type!" << endl;
-      break;
-   }
-
-   ossimIpt image_size = computeImageSize(rLevel, tile.get());
-   ossim_uint32 num_mask_cols = (image_size.x+7)/8; // size of mask buffer after compression
-   ossim_uint32 num_mask_rows = image_size.y;
-   ossim_uint8* maskbuf = 0;
-
-   // Check if mask buffer for this R-level has already been allocated:
-   if (m_buffers.size() <= mask_rlevel)
-   {
-      ossim_uint32 size_of_maskbuf = num_mask_rows * num_mask_cols;
-      maskbuf = new ossim_uint8[size_of_maskbuf];
-      memset(maskbuf, 0, size_of_maskbuf);
-      m_buffers.push_back(maskbuf);
-      m_bufferSizes.push_back(ossimIpt(num_mask_cols, num_mask_rows));
-   }
-   else
-      maskbuf = m_buffers[mask_rlevel];
-
-   ossim_uint32 mask_index=0, tile_index=0, start_bit=0;
-   ossimIrect tile_rect (tile->getImageRectangle());
-   ossimIpt ul (tile_rect.ul());
-   ossimIpt lr (tile_rect.lr());
-
-   // Scan each pixel in the source tile and decide on mask value:
-   for (int y=ul.y; (y<=lr.y)&&(y<image_size.y); y++)
-   {
-      mask_index = y*num_mask_cols + ul.x/8;
-      start_bit = ul.x % 8; // may not start on even mask byte boundary
-
-      for (int x=ul.x; (x<=lr.x); /* incremented in bit loop below */ )         
-      {
-         if ( x < image_size.x )
-         {
-            // Process 8 samples and pack resultant mask into one byte:
-            maskbuf[mask_index] = 0;
-            for (ossim_uint32 mask_bit=start_bit; mask_bit<8; ++mask_bit)
-            {
-               // Decide whether to mask depending on pixel flipper outputting a NULL pixel. 
-               // if (tile->isNull(tile_index++))
-               if (tile->isNull(tile_index++))                  
-                  maskbuf[mask_index] &=  MASK_BITS_0[mask_bit];
-               else
-                  maskbuf[mask_index] |= MASK_BITS_1[mask_bit];
-               
-               // Advance the pixel column and check for end of image rect:
-               ++x;
-               if ((x >= image_size.x) || (x > lr.x))
-                  break;
-            }
-            ++mask_index; // advance the mask buffer index 1 after processing 8 tile samples
-            start_bit = 0;
-         }
-         else
-         {
-            ++x;
-            
-            ++tile_index;
-         }
-      }
-   } // Finished looping over all pixels in input tile
-
-   return;
-}
-
-//*************************************************************************************************
-//! Writes the mask file to path specified. Returns TRUE if successful.
-//*************************************************************************************************
-void ossimBitMaskWriter::close()
-{
-   static const char* MODULE = "ossimBitMaskWriter::writeMask()";
-   static const ossimString MASK_EXTENSION ("mask");
-
-   // Open the output file. Use default name if none provided.
-   if (theOutputName.empty()) // Couldn't figure out the name
-   {
-      ossimNotify(ossimNotifyLevel_WARN)<<MODULE<<" -- Error encountered trying to create mask file" 
-         " for writing because output file name was never initialized.";
-      return;
-   }
-
-   ofstream maskFileStream (theOutputName.chars(), ios::out|ios::binary);
-   if (!maskFileStream.is_open())
-   {
-      ossimNotify(ossimNotifyLevel_WARN)<<MODULE<<" -- Error encountered trying to create mask file" 
-         "<"<<theOutputName<<"> for writing. Cannot write mask.";
-      return;
-   }
-
-   // Write the header info:
-   ossim_uint32 num_rlevels = (ossim_uint32) m_buffers.size();
-   maskFileStream << MASK_FILE_MAGIC_NUMBER <<" "<< m_startingResLevel <<" "<< num_rlevels<<" ";
-   for (ossim_uint32 r=0; r<num_rlevels; r++)
-      maskFileStream << m_bufferSizes[r].x <<" "<< m_bufferSizes[r].y <<" "; 
-   maskFileStream << ends;
-
-   // Loop over each res level and write buffers to disk:
-   for (ossim_uint32 rlevel = 0; rlevel<num_rlevels; ++rlevel)
-   {
-      ossim_uint32 bufsize = m_bufferSizes[rlevel].x * m_bufferSizes[rlevel].y;
-      maskFileStream.write((char*)(m_buffers[rlevel]), bufsize);
-   }
-
-   maskFileStream.close();
-   reset();
-
-   return;
-}
-
-//*************************************************************************************************
-//! Constructor accepts keywordlist with all info necessary to compute a mask. The caller will
-//! still need to call writeMask().
-//*************************************************************************************************
-bool ossimBitMaskWriter::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   // static const char* MODULE = "ossimBitMaskWriter::writeMask(kwl)";
-
-   initializeFlipper();
-
-   // Fetch optional output filename:
-   theOutputName = kwl.find(prefix, ossimKeywordNames::OUTPUT_FILE_KW);
-
-   // Initialize the pixel flipper. This filter is used to identify pixels targeted for masking by
-   // remapping them to the null pixel:
-   m_flipper->loadState(kwl, prefix);
-
-   // Read Starting res level:
-   m_startingResLevel = 0;
-   ossimString kw_value = kwl.find(prefix, BM_STARTING_RLEVEL_KW);
-   if (!kw_value.empty())
-      m_startingResLevel = kw_value.toUInt32();
-
-   return true;
-}
-
-//*************************************************************************************************
-// 
-//*************************************************************************************************
-void ossimBitMaskWriter::initializeFlipper()
-{
-   if (!m_flipper.valid())
-   {
-      m_flipper = new ossimPixelFlipper();
-      m_flipper->setReplacementMode(ossimPixelFlipper::REPLACE_ONLY_FULL_TARGETS);
-      m_flipper->setTargetValue(0);
-      m_flipper->setReplacementValue(0);
-   }
-
-   // This method gets called when an input connection is made as well as other times, so keep an
-   // eye out for valid input connection:
-   if (theInputObjectList.size() != 0)
-   {
-      m_flipper->connectMyInputTo(theInputObjectList[0].get());
-   }
-}
-
-//*************************************************************************************************
-// 
-//*************************************************************************************************
-bool ossimBitMaskWriter::canConnectMyInputTo(ossim_int32 /*myInputIndex*/, 
-                                             const ossimConnectableObject* object) const
-{
-   const ossimImageSource* ois = dynamic_cast<const ossimImageSource*>(object);
-   return (ois != NULL);
-}
-
-//*************************************************************************************************
-// 
-//*************************************************************************************************
-ossim_int32 ossimBitMaskWriter::connectMyInputTo (ossimConnectableObject *inputObject, 
-                                                  bool makeOutputConnection, 
-                                                  bool createEventFlag)
-{
-   ossimImageSource* input_source = dynamic_cast<ossimImageSource*>(inputObject);
-   if (input_source == NULL)
-      return -1;
-
-   // Base class takes care of connection with this object:
-   ossimConnectableObject::connectMyInputTo(input_source, makeOutputConnection, createEventFlag);
-
-   // This input should be an image handler, but may need to search the objects inputs in case
-   // it is chained:
-   ossimImageHandler* handler = dynamic_cast<ossimImageHandler*>(input_source);
-   if (handler == NULL)
-   {
-      // Need to search:
-      ossimTypeNameVisitor visitor(ossimString("ossimImageHandler"),
-                                   true,
-                                   ossimVisitor::VISIT_CHILDREN|ossimVisitor::VISIT_INPUTS);
-      
-      input_source->accept(visitor);
-      ossimRefPtr<ossimObject> obj = visitor.getObject();
-      if ( obj.valid() )
-      {
-         handler = dynamic_cast<ossimImageHandler*>( obj.get() );
-      }
-   }
-
-   // Should have a handler:
-   if (!handler)
-   { 
-      disconnectAllInputs();
-      return -1;
-   }
-
-   // A handler has been identified. Need the filename:
-   ossimFilename imageFile =  handler->getFilename();
-   if (imageFile.contains("ovr.tmp"))
-   {
-      // The handler is actually an overview, need some massaging to work since the overview may
-      // not have an R0 entry and R1 rect must be requested instead:
-      m_imageSize = handler->getBoundingRect(1).size() * 2; 
-      imageFile = imageFile.noExtension();
-   }
-   else
-   {
-      // This is normal image handler so it is OK to request R0 rect:
-      m_imageSize = handler->getBoundingRect(0).size(); 
-   }
-   if (theOutputName.empty())
-      theOutputName = imageFile.setExtension("mask");
-
-   // Check if the pixel flipper was initialized:
-   if (m_flipper.valid())
-      m_flipper->connectMyInputTo(input_source);
-   else
-      initializeFlipper();
-
-   return 0;
-}
-
-//*************************************************************************************************
-//! Since overviews may not yet exist when the mask is being written, we must compute the
-//! size of the mask buffer based on the original R0 image size.
-//*************************************************************************************************
-ossimIpt ossimBitMaskWriter::computeImageSize(ossim_uint32 rlevel, ossimImageData* tile) const
-{
-   if (rlevel == 0)
-      return m_imageSize;
-
-   ossimIpt isize (m_imageSize);
-   for (ossim_uint32 r=1; r<=rlevel; r++)
-   {
-      isize.x = (isize.x + 1) / 2;
-      isize.y = (isize.y + 1) / 2;
-   }
-
-   // Adjust size n X direction to even mask boundary:
-   ossimIpt tile_size (tile->getWidth(), tile->getHeight());
-   isize.x = ((int)(isize.x+7)/8) * 8;
-
-   return isize;
-}
-
-//*************************************************************************************************
-// For imagery that already has overviews built, but with artifact edge pixels (such as JP2-
-// compressed data), it is preferred to build the mask overviews directly from the R0 mask.
-// This method will build the specified number of R-levels (including R0) from the last defined
-// mask buffer. Returns TRUE if successful.
-// disk.
-//*************************************************************************************************
-bool ossimBitMaskWriter::buildOverviews(ossim_uint32 total_num_rlevels)
-{
-   // First establish the remaining number of R-levels to generate, and the last valid R-level
-   // currently in memory:
-   if (m_buffers.size() == 0)
-      return false;
-   if (m_buffers.size() == total_num_rlevels)
-      return true; // nothing to do
-   ossim_uint32 ref_rlevel = m_startingResLevel + (ossim_uint32) m_buffers.size() - 1;
-   ossim_uint32 ovr_rlevel = ref_rlevel + 1;
-
-   ossimIpt ref_size (m_bufferSizes[ref_rlevel-m_startingResLevel]);
-   ossim_uint8 *ref_buf = m_buffers[ref_rlevel-m_startingResLevel];
-   ossim_uint32 ref_index = 0, ovr_index = 0;
-   ossim_uint8 *ovr_buf = 0;
-   ossim_uint32 size_of_refbuf = ref_size.x * ref_size.y;
-
-   // Loop over all remaining res levels:
-   while (ovr_rlevel != total_num_rlevels)
-   {
-      // Allocate the buffer at this R-level:
-      ossimIpt ovr_size ((ref_size.x+1)/2, (ref_size.y+1)/2);
-      ossim_uint32 size_of_ovrbuf = ovr_size.x * ovr_size.y;
-      if (size_of_ovrbuf == 0)
-         return false;
-      ovr_buf = new ossim_uint8[size_of_ovrbuf];
-      memset(ovr_buf, 0, size_of_ovrbuf);
-      m_buffers.push_back(ovr_buf);
-      m_bufferSizes.push_back(ovr_size);
-
-      // Loop over each output overview pixel, considering the underlying rlevel (equivalent to
-      // nearest-neighbor resampling for overview at 2X decimation):
-      for (int y=0; y<ovr_size.y; y++)
-      {
-         ref_index = 2*y*ref_size.x;
-         ovr_index = y*ovr_size.x;
-
-         for (int x=0; x<ovr_size.x; x++)
-         {
-            ossim_uint8 a = 0;
-            ossim_uint8 b = 0;
-            if (ref_index < size_of_refbuf)
-            {
-               a = ref_buf[ref_index++];
-               if ((x < (ovr_size.x-1)) || !(ref_size.x & 1))
-                  b = ref_buf[ref_index++];
-            }
-            ovr_buf[ovr_index++] = ( (a & 0x80)       |
-                                    ((a & 0x20) << 1) |
-                                    ((a & 0x08) << 2) |
-                                    ((a & 0x02) << 3) |
-                                    ((b & 0x80) >> 4) |
-                                    ((b & 0x20) >> 3) |
-                                    ((b & 0x08) >> 2) |
-                                    ((b & 0x02) >> 1));
-
-         }
-      }
-
-      // Advance to next rlevel:
-      ref_buf = ovr_buf;
-      ref_size = ovr_size;
-      size_of_refbuf = size_of_ovrbuf;
-      ++ovr_rlevel;
-   }
-
-   return true;
-}
-
diff --git a/src/ossim/imaging/ossimBrightnessMatch.cpp b/src/ossim/imaging/ossimBrightnessMatch.cpp
deleted file mode 100644
index 3a0874c..0000000
--- a/src/ossim/imaging/ossimBrightnessMatch.cpp
+++ /dev/null
@@ -1,247 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: A brief description of the contents of the file.
-//
-//*************************************************************************
-// $Id: ossimBrightnessMatch.cpp 11955 2007-10-31 16:10:22Z gpotts $
-
-#include <ossim/imaging/ossimBrightnessMatch.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimNormRgbVector.h>
-#include <ossim/base/ossimHsiVector.h>
-#include <ossim/base/ossimContainerProperty.h>
-#include <ossim/base/ossimNumericProperty.h>
-
-RTTI_DEF1(ossimBrightnessMatch,
-          "ossimBrightnessMatch",
-          ossimImageSourceFilter)
-   
-ossimBrightnessMatch::ossimBrightnessMatch()
-   :ossimImageSourceFilter(),
-    theTargetBrightness(0.5),
-    theInputBrightness(0.5)
-{
-   theInputBrightness = ossim::nan();
-   theBrightnessContrastSource = new ossimBrightnessContrastSource;
-}
-
-
-ossimBrightnessMatch::~ossimBrightnessMatch()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimBrightnessMatch::getTile(
-   const ossimIrect& tileRect, ossim_uint32 resLevel)
-{
-   if(!isSourceEnabled())
-   {
-      return ossimImageSourceFilter::getTile(tileRect, resLevel);
-   }
-   if(theInputConnection)
-   {
-      if(ossim::isnan(theInputBrightness))
-      {
-         computeInputBrightness();
-      }
-      return theBrightnessContrastSource->getTile(tileRect, resLevel);
-   }
-   return 0;
-}
-
-void ossimBrightnessMatch::initialize()
-{
-   theBrightnessContrastSource->connectMyInputTo(0, getInput());
-   theNormTile = 0;
-}
-
-void ossimBrightnessMatch::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property)
-   {
-      return;
-   }
-   ossimString name = property->getName();
-   if(name == "input_brightness")
-   {
-      theInputBrightness = property->valueToString().toDouble();
-      theBrightnessContrastSource->setBrightness(theTargetBrightness-theInputBrightness);
-   }
-   else if(name == "target_brightness")
-   {
-      theTargetBrightness = property->valueToString().toDouble();
-      theBrightnessContrastSource->setBrightness(theTargetBrightness-theInputBrightness);
-   }
-   else
-   {
-      ossimImageSourceFilter::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimBrightnessMatch::getProperty(const ossimString& name)const
-{
-   if(name == "target_brightness")
-   {
-      ossimNumericProperty* numeric = new ossimNumericProperty(name,
-                                                               ossimString::toString(theTargetBrightness),
-                                                               0.0, 1.0);
-      numeric->setNumericType(ossimNumericProperty::ossimNumericPropertyType_FLOAT64);
-      numeric->setCacheRefreshBit();
-      return numeric;
-   }
-   else if(name == "input_brightness")
-   {
-      ossimNumericProperty* numeric = new ossimNumericProperty(name,
-                                                               ossimString::toString(theInputBrightness),
-                                                               0.0, 1.0);
-      numeric->setNumericType(ossimNumericProperty::ossimNumericPropertyType_FLOAT64);
-      numeric->setCacheRefreshBit();
-      return numeric;
-   }
-
-    return ossimImageSourceFilter::getProperty(name);
-}
-
-void ossimBrightnessMatch::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageSourceFilter::getPropertyNames(propertyNames);
-   
-   propertyNames.push_back("input_brightness");
-   propertyNames.push_back("target_brightness");
-}
-
-
-bool ossimBrightnessMatch::loadState(const ossimKeywordlist& kwl,
-                                              const char* prefix)
-{
-   const char* input_brightness = kwl.find(prefix, "input_brightness");
-   const char* target_brightness = kwl.find(prefix, "target_brightness");
-
-   if(input_brightness)
-   {
-      theInputBrightness = ossimString(input_brightness).toDouble();
-   }
-   if(target_brightness)
-   {
-      theTargetBrightness = ossimString(target_brightness).toDouble();
-   }
-   
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
-
-bool ossimBrightnessMatch::saveState(ossimKeywordlist& kwl,
-                                              const char* prefix)const
-{
-   kwl.add(prefix,
-           "input_brightness",
-           theInputBrightness,
-           true);
-   kwl.add(prefix,
-           "target_brightness",
-           theTargetBrightness,
-            true);
-
-   return ossimImageSourceFilter::saveState(kwl, prefix);   
-}
-
-
-void ossimBrightnessMatch::computeInputBrightness()
-{
-   if(theInputConnection)
-   {
-      ossimIrect inputRect = getBoundingRect();
-      ossim_uint32 rlevel = 0;
-      ossim_uint32 nlevels = getNumberOfDecimationLevels();
-      if(nlevels>1)
-      {
-         while((ossim::max(inputRect.width(), inputRect.height()) > 2048)&&
-               (rlevel < nlevels))
-         {
-            ++rlevel;
-            inputRect = getBoundingRect(rlevel);
-         }
-      }
-      ossimIpt centerPt = inputRect.midPoint();
-      centerPt.x -= 1024;
-      centerPt.y -= 1024;
-      ossimIrect reqRect(centerPt.x,
-                         centerPt.y,
-                         centerPt.x + 2047,
-                         centerPt.x + 2047);
-      reqRect = reqRect.clipToRect(inputRect);
-      ossimRefPtr<ossimImageData> inputTile = theInputConnection->getTile(reqRect, rlevel);
-
-      if(inputTile.valid())
-      {
-         theNormTile = new ossimImageData(0,
-                                          OSSIM_FLOAT32,
-                                          inputTile->getNumberOfBands());
-         theNormTile->initialize();
-         theNormTile->setImageRectangle(reqRect);
-         inputTile->copyTileToNormalizedBuffer((ossim_float32*)theNormTile->getBuf());
-         theNormTile->setDataObjectStatus(inputTile->getDataObjectStatus());
-         ossim_uint32 maxIdx = theNormTile->getWidth()*theNormTile->getHeight();
-         ossim_float32* bands[3];
-         double averageI = 0.0;
-         double count = 0.0;
-         ossim_uint32 offset = 0;
-         
-         bands[0] = (ossim_float32*)theNormTile->getBuf();
-         if(theNormTile->getNumberOfBands()>2)
-         {
-            bands[1] = (ossim_float32*)theNormTile->getBuf(1);
-            bands[2] = (ossim_float32*)theNormTile->getBuf(2);
-         }
-         else
-         {
-            bands[1] = bands[0];
-            bands[2] = bands[0];
-         }
-         ossimHsiVector hsi;
-         if(theNormTile->getDataObjectStatus() == OSSIM_FULL)
-         {
-            count = maxIdx;
-            
-            for(offset = 0; offset < maxIdx; ++offset)
-            {
-               hsi = ossimNormRgbVector(bands[0][offset], bands[1][offset], bands[2][offset]);
-               
-               averageI += hsi.getI();
-            }
-         }
-         else
-         {
-            for(offset = 0; offset < maxIdx; ++offset)
-            {
-               if((bands[0][offset] != 0.0)&&
-                  (bands[1][offset] != 0.0)&&
-                  (bands[2][offset] != 0.0))
-               {
-                  hsi = ossimNormRgbVector(bands[0][offset], bands[1][offset], bands[2][offset]);
-                  averageI += hsi.getI();
-                  
-                  ++count;
-               }
-            }
-         }
-         theInputBrightness = averageI / count;
-         theBrightnessContrastSource->setBrightness(theTargetBrightness-theInputBrightness);
-      }
-      else
-      {
-         theInputBrightness = .5;
-      }
-   }
-   theNormTile = 0;
-}
diff --git a/src/ossim/imaging/ossimBumpShadeTileSource.cpp b/src/ossim/imaging/ossimBumpShadeTileSource.cpp
deleted file mode 100644
index 15debc1..0000000
--- a/src/ossim/imaging/ossimBumpShadeTileSource.cpp
+++ /dev/null
@@ -1,523 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimBumpShadeTileSource.cpp 20198 2011-11-03 13:23:40Z dburken $
-
-#include <ossim/imaging/ossimBumpShadeTileSource.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimTilePatch.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/base/ossimColumnVector3d.h>
-#include <ossim/base/ossimNumericProperty.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimKeyword.h>
-#include <ossim/base/ossimMatrix3x3.h>
-#include <ossim/base/ossimRgbVector.h>
-
-static const char COLOR_RED_KW[]   = "color_red";
-static const char COLOR_GREEN_KW[] = "color_green";
-static const char COLOR_BLUE_KW[]  = "color_blue";
-
-RTTI_DEF1(ossimBumpShadeTileSource,
-          "ossimBumpShadeTileSource",
-          ossimImageCombiner);
-
-
-ossimBumpShadeTileSource::ossimBumpShadeTileSource()
-   :ossimImageCombiner(0, 2, 0, true, false),
-    m_tile(0),
-    m_lightSourceElevationAngle(45.0),
-    m_lightSourceAzimuthAngle(45.0),
-    m_lightDirection(3),
-    m_r(255),
-    m_g(255),
-    m_b(255)
-{
-   initialize();
-}
-
-ossimBumpShadeTileSource::~ossimBumpShadeTileSource()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimBumpShadeTileSource::getTile(
-   const  ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   if(!getInput(0)) return 0;
-
-   if(!m_tile.get())
-   {
-      allocate();
-   }
-   if(!m_tile.valid())
-   {
-      return m_tile;
-   }
-   ossimImageSource* normalSource =
-      PTR_CAST(ossimImageSource, getInput(0));
-   ossimImageSource* colorSource =
-      PTR_CAST(ossimImageSource, getInput(1));
-   
-   if(!m_tile.get())
-   {
-      return ossimRefPtr<ossimImageData>();
-   }
-
-   m_tile->setImageRectangle(tileRect);
- 
-   ossimRefPtr<ossimImageData> inputTile = 0;
-
-   if(isSourceEnabled())
-   {
-      m_tile->makeBlank();
-      
-      if(colorSource)
-      {
-         
-         inputTile = colorSource->getTile(tileRect, resLevel);
-      }
-      ossimRefPtr<ossimImageData> normalData = normalSource->getTile(tileRect, resLevel);
-      if(!normalData)
-      {
-         return ossimRefPtr<ossimImageData>();
-      }
-      if ( (normalData->getDataObjectStatus() == OSSIM_NULL) ||
-           (normalData->getDataObjectStatus() == OSSIM_EMPTY)||
-           (normalData->getNumberOfBands() != 3)||
-           (normalData->getScalarType() != OSSIM_DOUBLE))
-      {
-         return ossimRefPtr<ossimImageData>();
-      }
-      ossim_float64* normalBuf[3];
-      normalBuf[0] = static_cast<ossim_float64*>(normalData->getBuf(0));
-      normalBuf[1] = static_cast<ossim_float64*>(normalData->getBuf(1));
-      normalBuf[2] = static_cast<ossim_float64*>(normalData->getBuf(2));
-      ossim_float64 normalNp = normalData->getNullPix(0);
-      // if we have some color data then use it for the bump
-      // else we will default to a grey scale bump shade
-      //
-      if(inputTile.get() &&
-         (inputTile->getDataObjectStatus() != OSSIM_EMPTY) &&
-         (inputTile->getDataObjectStatus() != OSSIM_NULL))
-         
-      {
-         switch(inputTile->getScalarType())
-         {
-            case OSSIM_UCHAR:
-            {
-               ossim_uint8* resultBuf[3];
-               ossim_uint8* colorBuf[3];
-               resultBuf[0] = static_cast<ossim_uint8*>(m_tile->getBuf(0));
-               resultBuf[1] = static_cast<ossim_uint8*>(m_tile->getBuf(1));
-               resultBuf[2] = static_cast<ossim_uint8*>(m_tile->getBuf(2));
-               colorBuf[0]  = static_cast<ossim_uint8*>(inputTile->getBuf(0));
-               if(inputTile->getBuf(1))
-               {
-                  colorBuf[1] = static_cast<ossim_uint8*>(inputTile->getBuf(1));
-               }
-               else
-               {
-                  colorBuf[1] = colorBuf[0];
-               }
-               if(inputTile->getBuf(2))
-               {
-                  colorBuf[2] = static_cast<ossim_uint8*>(inputTile->getBuf(2));
-               }
-               else
-               {
-                  colorBuf[2] = colorBuf[0];
-               }
-            
-               long h = m_tile->getHeight();
-               long w = m_tile->getWidth();
-               for(long y = 0; y < h; ++y)
-               {
-                  for(long x = 0; x < w; ++x)
-                  {
-                     if((*normalBuf[0] != normalNp) &&
-                        (*normalBuf[1] != normalNp) &&
-                        (*normalBuf[2] != normalNp) )
-                     {
-                        if((*colorBuf[0])||(*colorBuf[1])||(*colorBuf[2]))
-                        {
-                           computeColor(*resultBuf[0],
-                                        *resultBuf[1],
-                                        *resultBuf[2],
-                                        *normalBuf[0],
-                                        *normalBuf[1],
-                                        *normalBuf[2],
-                                        *colorBuf[0],
-                                        *colorBuf[1],
-                                        *colorBuf[2]);
-                        }
-                        else 
-                        {
-                           computeColor(*resultBuf[0],
-                                        *resultBuf[1],
-                                        *resultBuf[2],
-                                        *normalBuf[0],
-                                        *normalBuf[1],
-                                        *normalBuf[2],
-                                        m_r,
-                                        m_g,
-                                        m_b);
-                        }
-                     }
-                     else
-                     {
-                        *resultBuf[0] = *colorBuf[0];
-                        *resultBuf[1] = *colorBuf[1];
-                        *resultBuf[2] = *colorBuf[2];
-                     }
-                     resultBuf[0]++;
-                     resultBuf[1]++;
-                     resultBuf[2]++;
-                     colorBuf[0]++;
-                     colorBuf[1]++;
-                     colorBuf[2]++;
-                     normalBuf[0]++;
-                     normalBuf[1]++;
-                     normalBuf[2]++;
-                  }
-               }
-               break;
-            }
-            default:
-            {
-               ossimNotify(ossimNotifyLevel_NOTICE)
-                  << "ossimBumpShadeTileSource::getTile NOTICE:\n"
-                  << "only 8-bit unsigned char is supported." << endl;
-            }
-         }
-      }
-      else
-      {
-         ossim_uint8* resultBuf[3];
-         resultBuf[0] = static_cast<ossim_uint8*>(m_tile->getBuf(0));
-         resultBuf[1] = static_cast<ossim_uint8*>(m_tile->getBuf(1));
-         resultBuf[2] = static_cast<ossim_uint8*>(m_tile->getBuf(2));
-         long h = m_tile->getHeight();
-         long w = m_tile->getWidth();
-         for(long y = 0; y < h; ++y)
-         {
-            for(long x = 0; x < w; ++x)
-            {
-               if((*normalBuf[0] != normalNp) &&
-                  (*normalBuf[1] != normalNp) &&
-                  (*normalBuf[2] != normalNp) )
-               {
-                     computeColor(*resultBuf[0],
-                                  *resultBuf[1],
-                                  *resultBuf[2],
-                                  *normalBuf[0],
-                                  *normalBuf[1],
-                                  *normalBuf[2],
-                                  m_r,
-                                  m_g,
-                                  m_b);
-               }
-               else
-               {
-                  *resultBuf[0] = 0;
-                  *resultBuf[1] = 0;
-                  *resultBuf[2] = 0;
-               }
-               resultBuf[0]++;
-               resultBuf[1]++;
-               resultBuf[2]++;
-               normalBuf[0]++;
-               normalBuf[1]++;
-               normalBuf[2]++;
-            }
-         }
-      }      
-   }
-   m_tile->validate();
-   return m_tile;
-}
-
-void ossimBumpShadeTileSource::computeColor(ossim_uint8& r,
-                                            ossim_uint8& g,
-                                            ossim_uint8& b,
-                                            ossim_float64 normalX,
-                                            ossim_float64 normalY,
-                                            ossim_float64 normalZ,
-                                            ossim_uint8 dr,
-                                            ossim_uint8 dg,
-                                            ossim_uint8 db)const
-{
-   double c = /*fabs*/(normalX*m_lightDirection[0] +
-                   normalY*m_lightDirection[1] +
-                   normalZ*m_lightDirection[2]);
-   
-   r = ossimRgbVector::clamp(ossim::round<int>(c*dr), 1, 255);
-   g = ossimRgbVector::clamp(ossim::round<int>(c*dg), 1, 255);
-   b = ossimRgbVector::clamp(ossim::round<int>(c*db), 1, 255);
-}
-
-void ossimBumpShadeTileSource::initialize()
-{
-   ossimImageCombiner::initialize();
-
-   ossimImageSource* normalSource = dynamic_cast<ossimImageSource*>( getInput(0) );
-   if ( normalSource )
-   {
-      normalSource->initialize();
-   }
-   
-   ossimImageSource* colorSource = dynamic_cast<ossimImageSource*>( getInput(1) );
-   if ( colorSource )
-   {
-      colorSource->initialize();
-   }
-   
-   m_tile = 0;
-   
-   computeLightDirection();
-}
-
-void ossimBumpShadeTileSource::allocate()
-{
-   m_tile = ossimImageDataFactory::instance()->create(this, this);
-   m_tile->initialize();
-}
-
-void ossimBumpShadeTileSource::computeLightDirection()
-{
-   NEWMAT::Matrix m = ossimMatrix3x3::createRotationMatrix(m_lightSourceElevationAngle,
-                                                           0.0,
-                                                           -m_lightSourceAzimuthAngle); // make positive rotation clockwise for azimuth
-   NEWMAT::ColumnVector v(3);
-   v[0] = 0;
-   v[1] = 1;
-   v[2] = 0;
-   v = m*v;
-   // reflect Z.  We need the Z pointing up from the surface and not into it.
-   //
-   ossimColumnVector3d d(v[0], v[1], -v[2]);
-   d = d.unit();
-   m_lightDirection[0] = d[0];
-   m_lightDirection[1] = d[1];
-   m_lightDirection[2] = d[2];
-}
-
-bool ossimBumpShadeTileSource::loadState(const ossimKeywordlist& kwl,
-                                         const char* prefix)
-{
-   const char* elevationAngle = kwl.find(prefix, ossimKeywordNames::ELEVATION_ANGLE_KW);
-   const char* azimuthAngle   = kwl.find(prefix, ossimKeywordNames::AZIMUTH_ANGLE_KW);
-   
-   
-   if(elevationAngle)
-   {
-      m_lightSourceElevationAngle = ossimString(elevationAngle).toDouble();
-   }
-
-   if(azimuthAngle)
-   {
-      m_lightSourceAzimuthAngle = ossimString(azimuthAngle).toDouble();
-   }
-
-   const char* lookup = kwl.find(prefix, COLOR_RED_KW);
-   if (lookup)
-   {
-      m_r = ossimString(lookup).toUInt8();
-   }
-   
-   lookup = kwl.find(prefix, COLOR_GREEN_KW);
-   if (lookup)
-   {
-      m_g = ossimString(lookup).toUInt8();
-   }
-   
-   lookup = kwl.find(prefix, COLOR_BLUE_KW);
-   if (lookup)
-   {
-      m_b = ossimString(lookup).toUInt8();
-   }
-    
-
-   computeLightDirection();
-
-   bool result = ossimImageSource::loadState(kwl, prefix);
-
-   theInputListIsFixedFlag  = true;
-   theOutputListIsFixedFlag = false;
-   if(!getNumberOfInputs()) setNumberOfInputs(2);
-   
-   return result;
-}
-
-bool ossimBumpShadeTileSource::saveState(ossimKeywordlist& kwl,
-                                         const char* prefix)const
-{
-   kwl.add(prefix,
-           ossimKeywordNames::ELEVATION_ANGLE_KW,
-           m_lightSourceElevationAngle,
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::AZIMUTH_ANGLE_KW,
-           m_lightSourceAzimuthAngle,
-           true);
-
-   kwl.add(prefix, COLOR_RED_KW,   m_r, true);
-   kwl.add(prefix, COLOR_GREEN_KW, m_g, true);
-   kwl.add(prefix, COLOR_BLUE_KW,  m_b, true);
-   
-   return ossimImageSource::saveState(kwl, prefix);
-}
-
-ossimString ossimBumpShadeTileSource::getShortName()const
-{
-   return ossimString("bump shader");
-}
-
-ossimString ossimBumpShadeTileSource::getLongName()const
-{
-   return ossimString("Blinn's bump map filter");
-}
-
-ossim_uint32 ossimBumpShadeTileSource::getNumberOfOutputBands() const
-{
-   return 3;
-}
-
-ossimScalarType ossimBumpShadeTileSource::getOutputScalarType() const
-{
-   return OSSIM_UCHAR;
-}
-
-double ossimBumpShadeTileSource::getNullPixelValue()const
-{
-   return 0.0;
-}
-
-double ossimBumpShadeTileSource::getMinPixelValue(ossim_uint32 /* band */)const
-{
-   return 1.0;
-}
-
-double ossimBumpShadeTileSource::getMaxPixelValue(ossim_uint32 /* band */)const
-{
-   return 255.0;
-}
-
-double ossimBumpShadeTileSource::getAzimuthAngle()const
-{
-   return m_lightSourceAzimuthAngle;
-}
-
-double ossimBumpShadeTileSource::getElevationAngle()const
-{
-   return m_lightSourceElevationAngle;
-}
-
-void ossimBumpShadeTileSource::setAzimuthAngle(double angle)
-{
-   m_lightSourceAzimuthAngle = angle;
-}
-
-void ossimBumpShadeTileSource::setElevationAngle(double angle)
-{
-   m_lightSourceElevationAngle = angle;
-}
-
-bool ossimBumpShadeTileSource::canConnectMyInputTo(ossim_int32 inputIndex,
-                                                   const ossimConnectableObject* object)const
-{
-   return (object&&
-           ( (inputIndex>=0) && inputIndex < 2)&&
-           PTR_CAST(ossimImageSource, object));
-   
-}
-
-void ossimBumpShadeTileSource::connectInputEvent(ossimConnectionEvent& /* event */)
-{
-   initialize();
-}
-
-void ossimBumpShadeTileSource::disconnectInputEvent(ossimConnectionEvent& /* event */)
-{
-   initialize();
-}
-
-void ossimBumpShadeTileSource::propertyEvent(ossimPropertyEvent& /* event */)
-{
-   initialize();
-}
-
-void ossimBumpShadeTileSource::refreshEvent(ossimRefreshEvent& /* event */)
-{
-   initialize();
-}
-
-void ossimBumpShadeTileSource::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   ossimString name = property->getName();
-   if(name == "lightSourceElevationAngle")
-   {
-      m_lightSourceElevationAngle = property->valueToString().toDouble();
-   }
-   else if(name == "lightSourceAzimuthAngle")
-   {
-      m_lightSourceAzimuthAngle = property->valueToString().toDouble();
-   }
-   else
-   {
-      ossimImageCombiner::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimBumpShadeTileSource::getProperty(const ossimString& name)const
-{
-   if(name == "lightSourceElevationAngle")
-   {
-      ossimProperty* prop = new ossimNumericProperty(name, ossimString::toString(m_lightSourceElevationAngle), 0.0, 90.0);
-      prop->setCacheRefreshBit();
-      return prop;
-   }
-   else if(name == "lightSourceAzimuthAngle")
-   {
-      ossimProperty* prop = new ossimNumericProperty(name, ossimString::toString(m_lightSourceAzimuthAngle), 0, 360);
-      prop->setCacheRefreshBit();
-      return prop;
-   }
-   
-   return ossimImageCombiner::getProperty(name);
-}
-
-void ossimBumpShadeTileSource::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageCombiner::getPropertyNames(propertyNames);
-   propertyNames.push_back("lightSourceElevationAngle");
-   propertyNames.push_back("lightSourceAzimuthAngle");
-}
-
-void ossimBumpShadeTileSource::setRgbColorSource(ossim_uint8 r,
-                                                 ossim_uint8 g,
-                                                 ossim_uint8 b)
-{
-   m_r = r;
-   m_g = g;
-   m_b = b;
-}
-
-void ossimBumpShadeTileSource::getRgbColorSource(ossim_uint8& r,
-                                                 ossim_uint8& g,
-                                                 ossim_uint8& b) const
-{
-   r = m_r;
-   g = m_g;
-   b = m_b;
-}
diff --git a/src/ossim/imaging/ossimCastTileSourceFilter.cpp b/src/ossim/imaging/ossimCastTileSourceFilter.cpp
deleted file mode 100644
index ac5ee94..0000000
--- a/src/ossim/imaging/ossimCastTileSourceFilter.cpp
+++ /dev/null
@@ -1,688 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimCastTileSourceFilter.cpp 17195 2010-04-23 17:32:18Z dburken $
-#include <ossim/imaging/ossimCastTileSourceFilter.h>
-#include <ossim/imaging/ossimU8ImageData.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-#include <ossim/base/ossimStringProperty.h>
-
-RTTI_DEF1( ossimCastTileSourceFilter,
-           "ossimCastTileSourceFilter",
-           ossimImageSourceFilter );
-
-ossimCastTileSourceFilter::ossimCastTileSourceFilter(ossimImageSource* input,
-						     ossimScalarType scalarType)
-   :ossimImageSourceFilter(NULL,input),
-    theTile(NULL),
-    theOutputScalarType(scalarType)
-{
-}
-
-ossimCastTileSourceFilter::~ossimCastTileSourceFilter()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimCastTileSourceFilter::getTile(
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   ossimRefPtr<ossimImageData> inputTile;
-   
-   if(theInputConnection)
-   {
-      inputTile = theInputConnection->getTile(tileRect, resLevel);
-   }
-   return applyCast(inputTile);
-}
-
-ossimScalarType ossimCastTileSourceFilter::getOutputScalarType() const
-{
-   if(isSourceEnabled())
-   {
-      return theOutputScalarType;
-   }
-   else if(theInputConnection)
-   {
-      return theInputConnection->getOutputScalarType();
-   }
-
-   return OSSIM_SCALAR_UNKNOWN;
-}
-
-double ossimCastTileSourceFilter::getNullPixelValue(ossim_uint32 band)const
-{
-   if(!isSourceEnabled())
-   {
-      if(theInputConnection)
-      {
-         return theInputConnection->getNullPixelValue(band);
-      }
-   }
-   return ossim::defaultNull(getOutputScalarType());
-}
-
-double ossimCastTileSourceFilter::getMinPixelValue(ossim_uint32 band)const
-{
-   if(!isSourceEnabled())
-   {
-      if(theInputConnection)
-      {
-         return theInputConnection->getMinPixelValue(band);
-      }
-   }
-
-   if(theInputConnection)
-   {
-      double tempMin    = theInputConnection->getMinPixelValue(band);
-      
-      double defaultMin = ossim::defaultMin(theOutputScalarType);
-      double defaultMax = ossim::defaultMax(theOutputScalarType);
-
-      if((tempMin >= defaultMin) && (tempMin <= defaultMax))
-      {
-         defaultMin = tempMin;
-      }
-
-      return defaultMin;
-   }
-   
-   return ossimImageSource::getMinPixelValue(band);
-}
-
-double ossimCastTileSourceFilter::getMaxPixelValue(ossim_uint32 band)const
-{
-   if(!isSourceEnabled())
-   {
-      if(theInputConnection)
-      {
-         return theInputConnection->getMaxPixelValue(band);
-      }
-   }
-   if(theInputConnection)
-   {
-      double tempMax    = theInputConnection->getMaxPixelValue(band);
-      
-      double defaultMax = ossim::defaultMax(theOutputScalarType);
-      double defaultMin = ossim::defaultMin(theOutputScalarType);
-
-      if((tempMax >= defaultMin) && (tempMax <= defaultMax))
-      {
-         defaultMax = tempMax;
-      }
-
-      return defaultMax;
-   }
-   return ossimImageSource::getMaxPixelValue(band);
-}
-
-ossimRefPtr<ossimImageData> ossimCastTileSourceFilter::applyCast(
-   ossimRefPtr<ossimImageData> inputTile)
-{
-   if(!inputTile.valid())
-   {
-      return inputTile;
-   }
-   
-   if(!theTile.valid() ||
-      (theTile->getNumberOfBands() != inputTile->getNumberOfBands()))
-   {
-      allocate(inputTile);
-   }
-   else
-   {
-      ossim_int32 tw =inputTile->getWidth(); 
-      ossim_int32 th =inputTile->getHeight(); 
-      ossim_int32 w = theTile->getWidth();
-      ossim_int32 h = theTile->getHeight();
-      theTile->setWidthHeight(tw, th);
-      
-      if((w*h != tw*th))
-      {
-         theTile->initialize();
-      }
-      else
-      {
-         theTile->makeBlank();
-      }
-      theTile->setOrigin(inputTile->getOrigin());
-   }
-   
-   if( (inputTile->getDataObjectStatus()==OSSIM_EMPTY) ||
-       (inputTile->getDataObjectStatus()==OSSIM_NULL))
-   {
-      return theTile;
-   }
-   
-   switch(inputTile->getScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         ossim_uint8** bands = new ossim_uint8*[inputTile->getNumberOfBands()];
-         
-         for(ossim_uint32 band = 0;
-             band < inputTile->getNumberOfBands();
-             ++band)
-         {
-            bands[band] = static_cast<ossim_uint8*>(inputTile->getBuf(band));
-         }
-         castInputToOutput(bands,
-                           inputTile->getNullPix(),
-                           inputTile->getDataObjectStatus()==OSSIM_PARTIAL);
-         delete [] bands;
-         break;
-      }
-      case OSSIM_SINT8:
-      {
-         ossim_sint8** bands = new ossim_sint8*[inputTile->getNumberOfBands()];
-         
-         for(ossim_uint32 band = 0;
-             band < inputTile->getNumberOfBands();
-             ++band)
-         {
-            bands[band] = static_cast<ossim_sint8*>(inputTile->getBuf(band));
-         }
-         castInputToOutput(bands,
-                           inputTile->getNullPix(),
-                           inputTile->getDataObjectStatus()==OSSIM_PARTIAL);
-         delete [] bands;
-         break;
-      }
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-      {
-         ossim_uint16** bands =
-            new ossim_uint16*[inputTile->getNumberOfBands()];
-         
-         for(ossim_uint32 band = 0;
-             band < inputTile->getNumberOfBands();
-             ++band)
-         {
-            bands[band] = static_cast<ossim_uint16*>(inputTile->getBuf(band));
-         }
-         castInputToOutput(bands,
-                           inputTile->getNullPix(),
-                           inputTile->getDataObjectStatus()==OSSIM_PARTIAL);
-         delete [] bands;
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         ossim_sint16** bands =
-            new ossim_sint16*[inputTile->getNumberOfBands()];
-         
-         for(ossim_uint32 band = 0;
-             band < inputTile->getNumberOfBands();
-             ++band)
-         {
-            bands[band] = static_cast<ossim_sint16*>(inputTile->getBuf(band));
-         }
-         castInputToOutput(bands,
-                           inputTile->getNullPix(),
-                           inputTile->getDataObjectStatus()==OSSIM_PARTIAL);
-         delete [] bands;
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-         ossim_sint32** bands =
-            new ossim_sint32*[inputTile->getNumberOfBands()];
-         
-         for(ossim_uint32 band = 0;
-             band < inputTile->getNumberOfBands();
-             ++band)
-         {
-            bands[band] = static_cast<ossim_sint32*>(inputTile->getBuf(band));
-         }
-         castInputToOutput(bands,
-                           inputTile->getNullPix(),
-                           inputTile->getDataObjectStatus()==OSSIM_PARTIAL);
-         delete [] bands;
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         ossim_uint32** bands =
-            new ossim_uint32*[inputTile->getNumberOfBands()];
-         
-         for(ossim_uint32 band = 0;
-             band < inputTile->getNumberOfBands();
-             ++band)
-         {
-            bands[band] = static_cast<ossim_uint32*>(inputTile->getBuf(band));
-         }
-         castInputToOutput(bands,
-                           inputTile->getNullPix(),
-                           inputTile->getDataObjectStatus()==OSSIM_PARTIAL);
-         delete [] bands;
-         break;
-      }
-      case OSSIM_FLOAT32: 
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         float** bands = new float*[inputTile->getNumberOfBands()];
-         
-         for(ossim_uint32 band = 0;
-             band < inputTile->getNumberOfBands();
-             ++band)
-         {
-            bands[band] = static_cast<float*>(inputTile->getBuf(band));
-         }
-         castInputToOutput(bands,
-                           inputTile->getNullPix(),
-                           inputTile->getDataObjectStatus()==OSSIM_PARTIAL);
-         delete [] bands;
-         break;
-      }
-      case OSSIM_FLOAT64:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         double** bands = new double*[inputTile->getNumberOfBands()];
-         
-         for(ossim_uint32 band = 0;
-             band < inputTile->getNumberOfBands();
-             ++band)
-         {
-            bands[band] = static_cast<double*>(inputTile->getBuf(band));
-         }
-         castInputToOutput(bands,
-                           inputTile->getNullPix(),
-                           inputTile->getDataObjectStatus()==OSSIM_PARTIAL);
-         delete [] bands;
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         break;
-      }
-   }
-
-//   theTile->setDataObjectStatus(inputTile->getDataObjectStatus());
-   theTile->validate();
-   return theTile;
-}
-
-void ossimCastTileSourceFilter::setOutputScalarType(ossimScalarType scalarType)
-{
-   ossimScalarType old_type = theOutputScalarType;
-   theOutputScalarType = scalarType;
-
-   if ( (theOutputScalarType != old_type))
-   {
-      // must reinitialize...
-      theTile = NULL;
-      initialize();
-   }
-}
-
-void ossimCastTileSourceFilter::setOutputScalarType(ossimString scalarType)
-{
-   int scalar =
-      ossimScalarTypeLut::instance()->getEntryNumber(scalarType.c_str());
-   
-   if (scalar != ossimLookUpTable::NOT_FOUND)
-   {
-      setOutputScalarType(static_cast<ossimScalarType>(scalar));
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimCastTileSourceFilter::setOutputScalarType WARN:"
-         << "\nUnknown scalar type:  " << scalarType.c_str() << endl;
-   }
-}
-
-ossimString ossimCastTileSourceFilter::getOutputScalarTypeString()const
-{
-   return ossimScalarTypeLut::instance()->getEntryString(theOutputScalarType);
-}
-
-void ossimCastTileSourceFilter::initialize()
-{
-   ossimImageSourceFilter::initialize();
-
-   if (theOutputScalarType == OSSIM_SCALAR_UNKNOWN)
-   {
-      // default to OSSIM_UCHAR
-      theOutputScalarType = OSSIM_UCHAR;
-   }
-}
-
-bool ossimCastTileSourceFilter::saveState(ossimKeywordlist& kwl,
-                                          const char* prefix) const
-{
-   ossimImageSourceFilter::saveState(kwl, prefix);
-
-   kwl.add(prefix,
-           ossimKeywordNames::SCALAR_TYPE_KW,
-           ossimScalarTypeLut::instance()->getEntryString(theOutputScalarType),
-           true);
-
-   return true;
-}
-
-bool ossimCastTileSourceFilter::loadState(const ossimKeywordlist& kwl,
-                                          const char* prefix)
-{
-   ossimImageSourceFilter::loadState(kwl, prefix);
-
-   if (kwl.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimScalarRemapper::loadState WARN:\n"
-         << " ERROR detected in keyword list!  State not loaded."
-         << endl;
-      return false;
-   }
-
-   int scalar = ossimScalarTypeLut::instance()->getEntryNumber(kwl, prefix);
-
-   if (scalar != ossimLookUpTable::NOT_FOUND)
-   {
-      theOutputScalarType = static_cast<ossimScalarType>(scalar);
-   }
-
-   return true;
-}
-
-template<class inType>
-void ossimCastTileSourceFilter::castInputToOutput(inType **inBuffer,
-                                                  const double  *nullPix,
-                                                  bool   inPartialFlag)
-{
-   switch(theTile->getScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         ossim_uint8** bands = new ossim_uint8*[theTile->getNumberOfBands()];
-
-         for(ossim_uint32 band = 0; band < theTile->getNumberOfBands(); ++band)
-         {
-            bands[band] = static_cast<ossim_uint8*>(theTile->getBuf(band));
-         }
-      
-         castInputToOutput(inBuffer,
-                           nullPix,
-                           inPartialFlag,
-                           bands,
-                           theTile->getNullPix(),
-                           theTile->getNumberOfBands());
-         delete [] bands;
-         break;
-      }
-      case OSSIM_SINT8:
-      {
-         ossim_sint8** bands = new ossim_sint8*[theTile->getNumberOfBands()];
-
-         for(ossim_uint32 band = 0; band < theTile->getNumberOfBands(); ++band)
-         {
-            bands[band] = static_cast<ossim_sint8*>(theTile->getBuf(band));
-         }
-      
-         castInputToOutput(inBuffer,
-                           nullPix,
-                           inPartialFlag,
-                           bands,
-                           theTile->getNullPix(),
-                           theTile->getNumberOfBands());
-         delete [] bands;
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         ossim_sint16** bands = new ossim_sint16*[theTile->getNumberOfBands()];
-
-         for(ossim_uint32 band = 0; band < theTile->getNumberOfBands(); ++band)
-         {
-            bands[band] = static_cast<ossim_sint16*>(theTile->getBuf(band));
-         }
-      
-         castInputToOutput(inBuffer,
-                           nullPix,
-                           inPartialFlag,
-                           bands,
-                           theTile->getNullPix(),
-                           theTile->getNumberOfBands());
-         delete [] bands;
-         break;
-      }
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-      {
-         ossim_uint16** bands = new ossim_uint16*[theTile->getNumberOfBands()];
-
-         for(ossim_uint32 band = 0; band < theTile->getNumberOfBands(); ++band)
-         {
-            bands[band] = static_cast<ossim_uint16*>(theTile->getBuf(band));
-         }
-      
-         castInputToOutput(inBuffer,
-                           nullPix,
-                           inPartialFlag,
-                           bands,
-                           theTile->getNullPix(),
-                           theTile->getNumberOfBands());
-         delete [] bands;
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         ossim_uint32** bands = new ossim_uint32*[theTile->getNumberOfBands()];
-
-         for(ossim_uint32 band = 0; band < theTile->getNumberOfBands(); ++band)
-         {
-            bands[band] = static_cast<ossim_uint32*>(theTile->getBuf(band));
-         }
-      
-         castInputToOutput(inBuffer,
-                           nullPix,
-                           inPartialFlag,
-                           bands,
-                           theTile->getNullPix(),
-                           theTile->getNumberOfBands());
-         delete [] bands;
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-         ossim_sint32** bands = new ossim_sint32*[theTile->getNumberOfBands()];
-
-         for(ossim_uint32 band = 0; band < theTile->getNumberOfBands(); ++band)
-         {
-            bands[band] = static_cast<ossim_sint32*>(theTile->getBuf(band));
-         }
-      
-         castInputToOutput(inBuffer,
-                           nullPix,
-                           inPartialFlag,
-                           bands,
-                           theTile->getNullPix(),
-                           theTile->getNumberOfBands());
-         delete [] bands;
-         break;
-      }
-      
-      case OSSIM_FLOAT32: 
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         float** bands = new float*[theTile->getNumberOfBands()];
-
-         for(ossim_uint32 band = 0; band < theTile->getNumberOfBands(); ++band)
-         {
-            bands[band] = static_cast<float*>(theTile->getBuf(band));
-         }
-      
-         castInputToOutput(inBuffer,
-                           nullPix,
-                           inPartialFlag,
-                           bands,
-                           theTile->getNullPix(),
-                           theTile->getNumberOfBands());
-         delete [] bands;
-         break;
-      }
-      case OSSIM_FLOAT64:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         double** bands = new double*[theTile->getNumberOfBands()];
-
-         for(ossim_uint32 band = 0; band < theTile->getNumberOfBands(); ++band)
-         {
-            bands[band] = static_cast<double*>(theTile->getBuf(band));
-         }
-      
-         castInputToOutput(inBuffer,
-                           nullPix,
-                           inPartialFlag,
-                           bands,
-                           theTile->getNullPix(),
-                           theTile->getNumberOfBands());
-         delete [] bands;
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimCastTileSourceFilter::castInputToOutput WARN:\n"
-            << "Scalar not set in ossimCastTileSourceFilter" << endl;
-         break;
-      }
-   }
-}
-
-template<class inType, class outType>
-void ossimCastTileSourceFilter::castInputToOutput(inType *inBuffer[],
-                                                  const double  *nullInPix,
-                                                  bool   inPartialFlag,
-                                                  outType *outBuffer[],
-                                                  const double  *nullOutPix,
-                                                  ossim_uint32   numberOfBands)
-{
-   ossim_uint32 size = theTile->getWidth()*theTile->getHeight();
-   if(!inPartialFlag)
-   {
-      for(ossim_uint32 band = 0; band < numberOfBands; ++band)
-      {
-         outType outMin = static_cast<outType>(theTile->getMinPix(band));
-         outType outMax = static_cast<outType>(theTile->getMaxPix(band));
-         
-         for(ossim_uint32 offset = 0; offset < size; ++offset)
-         {
-            double temp = inBuffer[band][offset];
-            if(temp < outMin) temp = outMin;
-            if(temp > outMax) temp = outMax;
-            outBuffer[band][offset] = static_cast<outType>(temp);
-         }
-      }
-   }
-   else
-   {
-      for(ossim_uint32 band = 0; band < numberOfBands; ++band)
-      {
-         inType np      = static_cast<inType>(nullInPix[band]);
-	     outType outNp  = static_cast<outType>(nullOutPix[band]);
-         outType outMin = static_cast<outType>(theTile->getMinPix(band));
-         outType outMax = static_cast<outType>(theTile->getMaxPix(band));
-         
-         for(ossim_uint32 offset = 0; offset < size; ++offset)
-         {
-            if(inBuffer[band][offset] != np)
-            {
-               double temp = inBuffer[band][offset];
-               if(temp < outMin) temp = outMin;
-               if(temp > outMax) temp = outMax;
-               outBuffer[band][offset] = static_cast<outType>(temp);
-            }
-	    else
-	    {
-		outBuffer[band][offset] = static_cast<outType>(outNp);
-		
-	    }
-         }
-      }
-   }
-}
-
-void ossimCastTileSourceFilter::allocate(const ossimRefPtr<ossimImageData> inputTile)
-{
-   theTile = ossimImageDataFactory::instance()->create(
-      this,
-      getOutputScalarType(),
-      inputTile->getNumberOfBands(),
-      inputTile->getWidth(),
-      inputTile->getHeight());
-   theTile->initialize();
-   theTile->setOrigin(inputTile->getOrigin());
-}
-
-void ossimCastTileSourceFilter::propertyEvent(ossimPropertyEvent& /* event */)
-{
-}
-
-void ossimCastTileSourceFilter::refreshEvent(ossimRefreshEvent& /* event */)
-{
-}
-
-void ossimCastTileSourceFilter::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(property->getName() == ossimKeywordNames::SCALAR_TYPE_KW)
-   {
-      int scalar = ossimScalarTypeLut::instance()->getEntryNumber(property->valueToString());
-      
-      if (scalar != ossimLookUpTable::NOT_FOUND)
-      {
-         setOutputScalarType(static_cast<ossimScalarType>(scalar));
-      }
-   }
-   else
-   {
-      ossimImageSourceFilter::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimCastTileSourceFilter::getProperty(const ossimString& name)const
-{
-   ossimRefPtr<ossimProperty> resultProperty;
-   if(name == ossimKeywordNames::SCALAR_TYPE_KW)
-   {
-      ossimStringProperty* stringProperty = new ossimStringProperty(name,
-                                                                    ossimScalarTypeLut::instance()->getEntryString(theOutputScalarType),
-                                                                    false);
-
-      stringProperty->addConstraint(ossimScalarTypeLut::instance()->getEntryString(OSSIM_UINT8));
-      stringProperty->addConstraint(ossimScalarTypeLut::instance()->getEntryString(OSSIM_SINT8));
-      stringProperty->addConstraint(ossimScalarTypeLut::instance()->getEntryString(OSSIM_UINT16));
-      stringProperty->addConstraint(ossimScalarTypeLut::instance()->getEntryString(OSSIM_SINT16));
-      stringProperty->addConstraint(ossimScalarTypeLut::instance()->getEntryString(OSSIM_UINT32));
-      stringProperty->addConstraint(ossimScalarTypeLut::instance()->getEntryString(OSSIM_SINT32));
-      stringProperty->addConstraint(ossimScalarTypeLut::instance()->getEntryString(OSSIM_FLOAT32));
-      stringProperty->addConstraint(ossimScalarTypeLut::instance()->getEntryString(OSSIM_FLOAT64));
-
-      stringProperty->setCacheRefreshBit();
-      resultProperty = stringProperty;
-   }
-   else
-   {
-      resultProperty = ossimImageSourceFilter::getProperty(name);
-   }
-   return resultProperty;
-}
-
-void ossimCastTileSourceFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageSourceFilter::getPropertyNames(propertyNames);
-   
-   propertyNames.push_back(ossimKeywordNames::SCALAR_TYPE_KW);
-}
-   
diff --git a/src/ossim/imaging/ossimCcfTileSource.cpp b/src/ossim/imaging/ossimCcfTileSource.cpp
deleted file mode 100644
index 04fcf92..0000000
--- a/src/ossim/imaging/ossimCcfTileSource.cpp
+++ /dev/null
@@ -1,901 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Contains class definition for ossimCcfTileSource.
-//*******************************************************************
-//  $Id: ossimCcfTileSource.cpp 17195 2010-04-23 17:32:18Z dburken $
-
-#include <algorithm>
-#include <ossim/imaging/ossimCcfTileSource.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimContainerProperty.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimDirectory.h>
-#include <ossim/base/ossimInterleaveTypeLut.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-
-using namespace std;
-
-RTTI_DEF1(ossimCcfTileSource, "ossimCcfTileSource", ossimImageHandler);
-
-//***
-// Define Trace flags for use within this file:
-//***
-
-static ossimTrace traceExec  ("ossimCcfTileSource:exec");
-static ossimTrace traceDebug ("ossimCcfTileSource:debug");
-
-// For interleave type enum to string conversions.
-static const ossimInterleaveTypeLut ILUT;
-
-ossimCcfTileSource::ossimCcfTileSource()
-   :
-      ossimImageHandler(),
-      theCcfHead(),
-      theTile(NULL),
-      theChipBuffer(NULL),
-      theFileStr(NULL),
-      theOutputBandList(1),
-      theByteOrder(ossim::byteOrder())
-{}
-
-ossimCcfTileSource::~ossimCcfTileSource()
-{
-  close();
-}
-
-ossimRefPtr<ossimImageData> ossimCcfTileSource::getTile(
-   const  ossimIrect& rect, ossim_uint32 resLevel)
-{
-   if (theTile.valid())
-   {
-      // Image rectangle must be set prior to calling getTile.
-      theTile->setImageRectangle(rect);
-      
-      if ( getTile( theTile.get(), resLevel ) == false )
-      {
-         if (theTile->getDataObjectStatus() != OSSIM_NULL)
-         {
-            theTile->makeBlank();
-         }
-      }
-   }
-
-   return theTile;
-}
-
-bool ossimCcfTileSource::getTile(ossimImageData* result,
-                                 ossim_uint32 resLevel)
-{
-   bool status = false;
-
-   //---
-   // Not open, this tile source bypassed, or invalid res level,
-   // return a blank tile.
-   //---
-   if( isOpen() && isSourceEnabled() && isValidRLevel(resLevel) &&
-       result && (result->getNumberOfBands() == getNumberOfOutputBands()) )
-   {
-      result->ref();  // Increment ref count.
-
-      //---
-      // Check for overview tile.  Some overviews can contain r0 so always
-      // call even if resLevel is 0.  Method returns true on success, false
-      // on error.
-      //---
-      status = getOverviewTile(resLevel, result);
-      
-      if (!status) // Did not get an overview tile.
-      {
-         status = true;
-         
-         ossimIrect tile_rect = result->getImageRectangle();
-         
-         ossimIrect image_rect = theCcfHead.imageRect(resLevel);
-   
-         //---
-         // See if any point of the requested tile is in the image.
-         //---
-         if ( tile_rect.intersects(image_rect) )
-         {
-            ossimIrect clip_rect = tile_rect.clipToRect(image_rect);
-            
-            if ( !tile_rect.completely_within(clip_rect) )
-            {
-               // Start with a blank tile.
-               result->makeBlank();
-            }
-            
-            // Load the tile buffer with data from the ccf.
-            status = fillBuffer(tile_rect,
-                                clip_rect,
-                                image_rect,
-                                resLevel,
-                                result);
-            if (status)
-            {
-               result->validate();
-            }
-         }
-      }
-      
-      result->unref();  // Decrement ref count.
-   }
-
-   return status;
-}
-
-//*******************************************************************
-// Private Method:
-//*******************************************************************
-bool ossimCcfTileSource::fillBuffer(const ossimIrect& tile_rect,
-                                    const ossimIrect& clip_rect,
-                                    const ossimIrect& image_rect,
-                                    ossim_uint32 reduced_res_level,
-                                    ossimImageData* tile)
-{
-   bool status = false;
-   
-   //***
-   // Determine the pixel type and make the appropriate tiles.
-   //***
-   switch (theCcfHead.pixelType())
-   {
-      case OSSIM_UCHAR:
-         status = fillUcharBuffer(tile_rect,
-                                  clip_rect,
-                                  image_rect,
-                                  reduced_res_level,
-                                  tile);
-         break;
-      case OSSIM_USHORT11:
-      case OSSIM_USHORT16:
-         status = fillUshortBuffer(tile_rect,
-                                   clip_rect,
-                                   image_rect,
-                                   reduced_res_level,
-                                   tile);
-         break;
-      default:
-         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimCcfTileSource fillBuffer ERROR:"
-            << "\nUnsupported pixel type!"
-            << "\nBuffer not filled.  Returning error." << endl;
-         break;
-   }
-
-   return status;
-}
-
-//*******************************************************************
-// Private Method:
-//*******************************************************************
-bool ossimCcfTileSource::fillUcharBuffer(const ossimIrect& tile_rect,
-                                         const ossimIrect& clip_rect,
-                                         const ossimIrect& /* image_rect */,
-                                         ossim_uint32 reduced_res_level,
-                                         ossimImageData* tile)
-{
-   if(!isOpen()) return false;
-      
-   const ossim_uint32 TILE_SIZE_PER_BAND     = tile->getSizePerBand();
-   const ossim_uint32 CHIP_SIZE_PER_BAND     = theCcfHead.chipSizePerBand();
-   const ossim_uint32 SAMPLES_PER_CHIP       = theCcfHead.samplesPerChip();
-   const ossim_uint32 LINES_PER_CHIP         = theCcfHead.linesPerChip();
-   const ossim_uint32 BYTES_PER_CHUNK        = theCcfHead.bytesPerChunk();
-   const ossim_uint32 BYTES_PER_CHIP         = theCcfHead.bytesPerChip();
-   const ossim_uint32 CHIPS_IN_SAMPLE_DIR    = theCcfHead.sampleChipsPerChunk();
-   const ossim_uint32 CHIPS_IN_LINE_DIR      = theCcfHead.lineChipsPerChunk();
-   const ossim_uint32 NUMBER_OF_INPUT_BANDS  = theCcfHead.numberOfBands();
-   const ossim_uint32 CHUNKS_IN_SAMPLE_DIR   = theCcfHead.chunksInSampleDir(reduced_res_level);
-   const ossim_uint32 CHUNK_SIDE_SIZE        = SAMPLES_PER_CHIP *
-                                        CHIPS_IN_SAMPLE_DIR;
-   const ossim_uint32 CHIP_OFFSET_TO_END     = SAMPLES_PER_CHIP - 1;
-
-   //***
-   // Shift the upper left corner of the "clip_rect" to the an even chunk
-   // boundry.
-   //***
-   ossimIpt chunkOrigin = clip_rect.ul();
-   adjustToStartOfChunk(chunkOrigin);
-
-   //***
-   // Calculate the number of chunks needed in the line/sample directions.
-   //***
-   ossim_uint32 size_in_x
-      = static_cast<ossim_uint32>(clip_rect.lr().x - chunkOrigin.x + 1);
-   ossim_uint32 size_in_y
-      = static_cast<ossim_uint32>(clip_rect.lr().y - chunkOrigin.y + 1);
-   ossim_uint32 w = (CHIPS_IN_SAMPLE_DIR*SAMPLES_PER_CHIP);
-   ossim_uint32 h = (CHIPS_IN_LINE_DIR*LINES_PER_CHIP);
-   ossim_uint32 chunks_in_x_dir = size_in_x / w  + (size_in_x % w  ? 1 : 0);
-   ossim_uint32 chunks_in_y_dir = size_in_y / h + (size_in_y % h ? 1 : 0);
-   
-   
-   //***
-   // Get the start of data for the "reduced_res_level" passed in.
-   //***
-   streampos startOfData = theCcfHead.startOfData(reduced_res_level);
-   ossimIpt ulChunkPt = chunkOrigin;
-
-   // Chunk loop in line direction.
-   for (ossim_uint32 y=0; y<chunks_in_y_dir; ++y)
-   {
-      ulChunkPt.x = chunkOrigin.x;
-
-      // Chunk loop in sample direction.
-      for (ossim_uint32 x=0; x<chunks_in_x_dir; ++x)
-      {
-         //***
-         // Sequence through the chips in the chunk.
-         // Grab the ccf data and stuff the tile buffer.
-         //***
-         ossimIpt chip_pt = ulChunkPt;
-
-         // Chip loop in line direction.
-         for (ossim_uint32 y_chip=0; y_chip<CHIPS_IN_LINE_DIR; ++y_chip) 
-         {
-            chip_pt.x = ulChunkPt.x;  // Reset x back to front of chunk.
-
-            // Chip loop in sample direction.
-            for (ossim_uint32 x_chip=0; x_chip<CHIPS_IN_SAMPLE_DIR; ++x_chip)
-            {
-               ossimIrect chip_rect(chip_pt.x,
-                               chip_pt.y,
-                               chip_pt.x + CHIP_OFFSET_TO_END,
-                               chip_pt.y + CHIP_OFFSET_TO_END);
-               
-               if (chip_rect.intersects(clip_rect))
-               {
-                  //***
-                  // Some point in the chip intersect the tile so grab the
-                  // data.
-                  //***
-
-                  //***
-                  // Get the seek position for the chunk.
-                  //***
-                  streampos tmp_offset
-                     = ( ulChunkPt.y / CHUNK_SIDE_SIZE * BYTES_PER_CHUNK *
-                         CHUNKS_IN_SAMPLE_DIR ) +
-                     ( ulChunkPt.x / CHUNK_SIDE_SIZE * BYTES_PER_CHUNK );
-
-                  streampos seek_position = startOfData + tmp_offset;
-
-                  // Now move it to the chip.
-                  tmp_offset
-                     = ( y_chip *  BYTES_PER_CHIP * CHIPS_IN_SAMPLE_DIR ) +
-                     (x_chip * BYTES_PER_CHIP);
-
-                  seek_position += tmp_offset;
-
-                  // Seek to the chip
-                  theFileStr->seekg(seek_position, ios::beg);
-
-                  //***
-                  // Read the chip from the ccf file into the chip buffer.
-                  // This will get all the bands.  Bands are interleaved by
-                  // chip.
-                  //***
-                  if (!theFileStr->read((char*)theChipBuffer, BYTES_PER_CHIP))
-                  {
-                     theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-                     cerr << "ossimCcfTileSource fillUchBuffer READ ERROR!"
-                          << "\nReturning from method." << endl;
-                     return false;
-                  }
-                  
-                  ossimIrect chip_clip_rect = clip_rect.clipToRect(chip_rect);
-
-                  //***
-                  // Band loop in sample direction.  Bands are interleaved by
-                  // chip.
-                  //***
-                  for (ossim_uint32 band=0; band<NUMBER_OF_INPUT_BANDS; ++band)
-                  {
-                     //***
-                     // Get a pointer positioned at the first valid pixel in
-                     // the chip.
-                     //***
-                     ossim_uint8* s
-                        = theChipBuffer +
-                        band * CHIP_SIZE_PER_BAND + 
-                        (chip_clip_rect.ul().y - chip_rect.ul().y) *
-                        SAMPLES_PER_CHIP + chip_clip_rect.ul().x -
-                        chip_rect.ul().x;
-                                
-                     //***
-                     // Get a pointer positioned at the first valid pixel in
-                     // the tile.
-                     //***
-                     ossim_uint8* d
-                        = (ossim_uint8*)tile->getBuf() +
-                        band * TILE_SIZE_PER_BAND +
-                        (chip_clip_rect.ul().y - tile_rect.ul().y) *
-                        tile->getWidth() + chip_clip_rect.ul().x -
-                        tile_rect.ul().x;      
-
-                     // Line loop through a chip.
-                     for (ossim_int32 chip_line = chip_clip_rect.ul().y;
-                          chip_line <= chip_clip_rect.lr().y;
-                          chip_line++)
-                     {
-                        // Sample loop through a chip.
-                        ossim_uint32 i=0;
-                        for (ossim_int32 chip_sample = chip_clip_rect.ul().x;
-                             chip_sample <= chip_clip_rect.lr().x;
-                             chip_sample++)
-                        {
-                           d[i] = s[i];
-                           i++;
-                        }
-
-                        // Increment the pointers by one line.
-                        s += SAMPLES_PER_CHIP;
-                        d += tile->getWidth();
-                     }
-                     
-                  } // End of band loop.
-                  
-               } // End of if (chip_rect.intersects(clip_rect))
-               
-               chip_pt.x += SAMPLES_PER_CHIP;
-               
-            } // End of chip loop in the sample direction.
-
-           chip_pt.y += LINES_PER_CHIP; 
-            
-         } // End of chip loop in the line direction.
-         
-         ulChunkPt.x += CHUNK_SIDE_SIZE;
-         
-      }  // End of chunk loop in the sample direction.
-
-      ulChunkPt.y += CHUNK_SIDE_SIZE;
-      
-   }  // End of chunk loop in the line direction.
-
-   return true;
-}
-
-//*******************************************************************
-// Private Method:
-//*******************************************************************
-bool ossimCcfTileSource::fillUshortBuffer(const ossimIrect& tile_rect,
-                                          const ossimIrect& clip_rect,
-                                          const ossimIrect& /* image_rect */,
-                                          ossim_uint32 reduced_res_level,
-                                          ossimImageData* tile)
-{
-   const ossim_uint32 TILE_SIZE_PER_BAND     = tile->getSizePerBand();
-   const ossim_uint32 CHIP_SIZE_PER_BAND     = theCcfHead.chipSizePerBand();
-   const ossim_uint32 SAMPLES_PER_CHIP       = theCcfHead.samplesPerChip();
-   const ossim_uint32 LINES_PER_CHIP         = theCcfHead.linesPerChip();
-   const ossim_uint32 BYTES_PER_CHUNK        = theCcfHead.bytesPerChunk();
-   const ossim_uint32 BYTES_PER_CHIP         = theCcfHead.bytesPerChip();
-   const ossim_uint32 CHIPS_IN_SAMPLE_DIR    = theCcfHead.sampleChipsPerChunk();
-   const ossim_uint32 CHIPS_IN_LINE_DIR      = theCcfHead.lineChipsPerChunk();
-   const ossim_uint32 NUMBER_OF_INPUT_BANDS  = theCcfHead.numberOfBands();
-   const ossim_uint32 CHUNKS_IN_SAMPLE_DIR   = theCcfHead.
-                                        chunksInSampleDir(reduced_res_level);
-   const ossim_uint32 CHUNK_SIDE_SIZE        = SAMPLES_PER_CHIP *
-                                        CHIPS_IN_SAMPLE_DIR;
-   const ossim_uint32 CHIP_OFFSET_TO_END     = SAMPLES_PER_CHIP - 1;
-   
-   //***
-   // Shift the upper left corner of the "clip_rect" to the an even chunk
-   // boundry.
-   //***
-   ossimIpt chunkOrigin = clip_rect.ul();
-   adjustToStartOfChunk(chunkOrigin);
-
-   //***
-   // Calculate the number of chunks needed in the line/sample directions.
-   //***
-   
-   ossim_uint32 size_in_x = clip_rect.lr().x - chunkOrigin.x + 1;
-   ossim_uint32 size_in_y = clip_rect.lr().y - chunkOrigin.y + 1;
-   ossim_uint32 w = (CHIPS_IN_SAMPLE_DIR*SAMPLES_PER_CHIP);
-   ossim_uint32 h = (CHIPS_IN_LINE_DIR*LINES_PER_CHIP);
-   ossim_uint32 chunks_in_x_dir = size_in_x / w  + (size_in_x % w  ? 1 : 0);
-   ossim_uint32 chunks_in_y_dir = size_in_y / h + (size_in_y % h ? 1 : 0);
-   //***
-   // Get the start of data for the "reduced_res_level" passed in.
-   //***
-   streampos startOfData = theCcfHead.startOfData(reduced_res_level);
-   ossimIpt ulChunkPt = chunkOrigin;
-
-   // Chunk loop in line direction.
-   for (ossim_uint32 y=0; y<chunks_in_y_dir; ++y)
-   {
-      ulChunkPt.x = chunkOrigin.x;
-
-      // Chunk loop in sample direction.
-      for (ossim_uint32 x=0; x<chunks_in_x_dir; ++x)
-      {
-         //***
-         // Sequence through the chips in the chunk.
-         // Grab the ccf data and stuff the tile buffer.
-         //***
-         ossimIpt chip_pt = ulChunkPt;
-
-         // Chip loop in line direction.
-         for (ossim_uint32 y_chip=0; y_chip<CHIPS_IN_LINE_DIR; ++y_chip) 
-         {
-            chip_pt.x = ulChunkPt.x;  // Reset x back to front of chunk.
-
-            // Chip loop in sample direction.
-            for (ossim_uint32 x_chip=0; x_chip<CHIPS_IN_SAMPLE_DIR; ++x_chip)
-            {
-               ossimIrect chip_rect(chip_pt.x,
-                               chip_pt.y,
-                               chip_pt.x + CHIP_OFFSET_TO_END,
-                               chip_pt.y + CHIP_OFFSET_TO_END);
-               
-               if (chip_rect.intersects(clip_rect))
-               {
-                  //***
-                  // Some point in the chip intersect the tile so grab the
-                  // data.
-                  //***
-
-                  //***
-                  // Get the seek position for the chunk.
-                  //***
-                  streampos tmp_offset
-                     = ( ulChunkPt.y / CHUNK_SIDE_SIZE * BYTES_PER_CHUNK *
-                         CHUNKS_IN_SAMPLE_DIR ) +
-                     ( ulChunkPt.x / CHUNK_SIDE_SIZE * BYTES_PER_CHUNK );
-
-                  streampos seek_position = startOfData + tmp_offset;
-
-                  // Now move it to the chip.
-                  tmp_offset
-                     = ( y_chip *  BYTES_PER_CHIP * CHIPS_IN_SAMPLE_DIR ) +
-                     (x_chip * BYTES_PER_CHIP);
-
-                  seek_position += tmp_offset;
-
-                  // Seek to the chip
-                  theFileStr->seekg(seek_position, ios::beg);
-
-                  //***
-                  // Read the chip from the ccf file into the chip buffer.
-                  // This will get all the bands.  Bands are interleaved by
-                  // chip.
-                  //***
-                  if (!theFileStr->read((char*)theChipBuffer, BYTES_PER_CHIP))
-                  {
-                     theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-                     cerr << "ossimCcfTileSource fillUshortBuffer READ ERROR!"
-                          << "Returning from method." << endl;
-                     return false;
-                  }
-                  
-                  ossimIrect chip_clip_rect = clip_rect.clipToRect(chip_rect);
-
-                  //***
-                  // Band loop in sample direction.  Bands are interleaved by
-                  // chip.
-                  //***
-                  for (ossim_uint32 band=0; band<NUMBER_OF_INPUT_BANDS; band++)
-                  {
-                     //***
-                     // Get a pointer positioned at the first valid pixel in
-                     // the chip.
-                     //***
-                     ossim_uint16* s
-                        = (ossim_uint16*)theChipBuffer +
-                        band * CHIP_SIZE_PER_BAND + 
-                        (chip_clip_rect.ul().y - chip_rect.ul().y) *
-                        SAMPLES_PER_CHIP + chip_clip_rect.ul().x -
-                        chip_rect.ul().x;       
-                     
-                     //***
-                     // Get a pointer positioned at the first valid pixel in
-                     // the tile.
-                     //***
-                     ossim_uint16* d
-                        = (ossim_uint16*)tile->getBuf() +
-                        band * TILE_SIZE_PER_BAND +
-                        (chip_clip_rect.ul().y - tile_rect.ul().y) *
-                        tile->getWidth() + chip_clip_rect.ul().x -
-                        tile_rect.ul().x;
-                     
-                     // Line loop through a chip.
-                     for (ossim_int32 chip_line = chip_clip_rect.ul().y;
-                          chip_line <= chip_clip_rect.lr().y;
-                          ++chip_line)
-                     {
-                        // Sample loop through a chip.
-                        ossim_uint32 i=0;
-                        for (ossim_int32 chip_sample = chip_clip_rect.ul().x;
-                             chip_sample <= chip_clip_rect.lr().x;
-                             ++chip_sample)
-                        {
-                           if (theByteOrder == OSSIM_LITTLE_ENDIAN)
-                           {
-                              //***
-                              // CCF data alway stored in big endian byte
-                              // order so swap the bytes.
-                              //***
-                              d[i] = (s[i] << 8) | (s[i] >> 8);
-                           }
-                           else
-                           {
-                              d[i] = s[i];
-                           }
-                           
-                           ++i;
-                        }
-
-                        // Increment the pointers by one line.
-                        s += SAMPLES_PER_CHIP;
-                        d += tile->getWidth();
-                     }
-                     
-                  } // End of band loop.
-                  
-               } // End of if (chip_rect.intersects(clip_rect))
-               
-               chip_pt.x += SAMPLES_PER_CHIP;
-               
-            } // End of chip loop in the sample direction.
-
-           chip_pt.y += LINES_PER_CHIP; 
-            
-         } // End of chip loop in the line direction.
-         
-         ulChunkPt.x += CHUNK_SIDE_SIZE;
-         
-      }  // End of chunk loop in the sample direction.
-
-      ulChunkPt.y += CHUNK_SIDE_SIZE;
-      
-   }  // End of chunk loop in the line direction.
-
-   return true;
-}
-   
-            
-//*******************************************************************
-// Public Method:
-//*******************************************************************
-ossimIrect
-ossimCcfTileSource::getImageRectangle(ossim_uint32 reduced_res_level) const
-{
-   return theCcfHead.imageRect(reduced_res_level);
-}
-
-//*******************************************************************
-// Public Method:
-//*******************************************************************
-bool ossimCcfTileSource::setOutputBandList(const vector<ossim_uint32>& outputBandList)
-{
-   static const char MODULE[] = "ossimCcfTileSource::setOutputBandList";
-   if (traceExec())  CLOG << "entering..." << endl;
-   
-   if (outputBandList.size() != theOutputBandList.size())
-   {
-      //***
-      // Verify that each individual band does not bust the range of input
-      // bands.
-      //***
-      for (ossim_uint32 i=0; i<outputBandList.size(); i++)
-      {
-         if (outputBandList[i] > (getNumberOfInputBands() - 1))
-         {
-            setErrorStatus();
-
-            cerr << MODULE << " ERROR:"
-                 << "\nOutput band number in list is greater than the "
-                 << "number of bands in the image source!"
-                 << "\noutputBandList[" << i << "]:  "
-                 << "\nHighest availabe band:  "
-                 << (getNumberOfInputBands() - 1)
-                 << "\nError status has been set!  Returning..."
-                 << endl;
-            return false;            
-         }
-      }
-
-      // Remove the old tiles and reallocate with the new size.
-      theTile = NULL;
-   }
-
-   theOutputBandList = outputBandList;  // Assign the new list.
-
-   if (traceExec())  CLOG << "returning..." << endl;
-   return true;
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-bool ossimCcfTileSource::saveState(ossimKeywordlist& kwl,
-                                   const char* prefix) const
-{
-   // Currently nothing to do here.
-   return ossimImageHandler::saveState(kwl, prefix);
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-bool ossimCcfTileSource::loadState(const ossimKeywordlist& kwl,
-                                   const char* prefix)
-{
-   if (ossimImageHandler::loadState(kwl, prefix))
-   {
-      if (open())
-      {
-         return true;
-      }
-   }
-
-   return false;
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-bool ossimCcfTileSource::open()
-{
-   static const char MODULE[] = "ossimCcfTileSource::open";
-   if (traceExec())  CLOG << "entering..." << endl;
-
-   if(isOpen())
-   {
-      close();
-   }
-   
-   if (traceDebug())
-   {
-      CLOG << "DEBUG -- "
-           << "\n\t theImageFile: " << theImageFile << endl;
-   }
-   
-   if (theCcfHead.parseCcfHeader(theImageFile.c_str()) == false)
-   {
-      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-      if (traceExec())  CLOG << "returning with error..." << endl;
-      return false;
-   }
-
-   if (traceDebug())
-   {
-      CLOG << "DEBUG -- "
-           << "\n\t theImageFile: " << theImageFile
-           << "\n\t theCcfHead: " << theCcfHead
-           << endl;
-   }
-
-   theFileStr = new std::ifstream;
-   // Open up the file for reading.
-   theFileStr->open(theImageFile.c_str(), ios::in | ios::binary);
-   
-   if (!(*theFileStr))
-   {
-      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-      
-      cerr << MODULE << " ERROR!"
-           << "\nCould not open file:  " << theImageFile.c_str()
-           << "\nReturning..." << endl;
-      if (traceExec())  CLOG << "returning with error..." << endl;
-
-      delete theFileStr;
-      theFileStr = NULL;
-      return false;
-   }
-
-   theTile = ossimImageDataFactory::instance()->create(this, this);
-   theTile->initialize();
-     
-   theChipBuffer  = new ossim_uint8[theCcfHead.bytesPerChip()];
-   
-   // Initialize the output band list.
-   if (getNumberOfInputBands() > theOutputBandList.size())
-   {
-      theOutputBandList.resize(getNumberOfInputBands());
-   }
-   
-   for (ossim_uint32 i=0; i<getNumberOfInputBands(); ++i)
-   {
-      theOutputBandList[i] = i; // One to one for initial setup.
-   }
-   
-   completeOpen();
-   
-   if (traceDebug() && theTile.valid())
-   {
-      CLOG << "DEBUG:"
-           << "\ntheTile:\n" << *theTile << endl;
-   }
-
-   if (traceExec())  CLOG << "returning..." << endl;
-   return true;
-}
-
-void ossimCcfTileSource::close()
-{
-   theTile = NULL;
-   if (theChipBuffer)
-   {
-      delete [] theChipBuffer;
-      theChipBuffer = NULL;
-   }
-   if(theFileStr)
-   {
-      theFileStr->close();
-      theFileStr->clear();
-      delete theFileStr;
-      theFileStr = NULL;
-   }
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-ossimScalarType ossimCcfTileSource::getOutputScalarType() const
-{
-   return theCcfHead.pixelType();
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-ossim_uint32 ossimCcfTileSource::getTileWidth() const
-{
-   return ( theTile.valid() ? theTile->getWidth() : 0 );
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-ossim_uint32 ossimCcfTileSource::getTileHeight() const
-{
-   return ( theTile.valid() ? theTile->getHeight() : 0 );
-}
-
-ossim_uint32 ossimCcfTileSource::getImageTileWidth() const
-{
-   return 32;
-}
-
-ossim_uint32 ossimCcfTileSource::getImageTileHeight() const
-{
-   return 32;
-}
-
-void ossimCcfTileSource::initVerticesFromHeader()
-{
-   theValidImageVertices.clear();
-   
-   const vector<ossimIpt>& validImageVertices
-      = theCcfHead.getValidImageVertices();
-   
-   ossim_uint32 upper = (ossim_uint32)validImageVertices.size();
-   if(!upper) return;
-   for(ossim_uint32 index = 0; index < upper; ++index)
-   {
-      theValidImageVertices.push_back(validImageVertices[index]);
-   }
-
-   if (traceDebug())
-   {
-      cout << "ossimCcfTileSource::initVerticesFromHeader DEBUG:"
-           << "\nValid image vertices:"
-           << endl;
-      for (ossim_uint32 i=0; i<upper; ++i)
-      {
-         cout << "\npoint[" << i << "]:  " << theValidImageVertices[i];
-      }
-      cout << endl;
-   }
-}
-
-bool ossimCcfTileSource::isEcgGeom(const ossimFilename& filename)const
-{
-   ossimFilename file = filename;
-   file.setExtension("geom");
-   
-   if(file.exists())
-   {
-      char bytes[3];
-      ifstream in(file.c_str());
-      
-      in.read((char*)bytes, 3);
-      ossimString testEcg(bytes,
-                          bytes + 3);
-      testEcg = testEcg.downcase();
-      if(in&&(testEcg == "ecg"))
-      {
-         return true;
-      }
-   }
-   return false;
-}
-
-ossimString ossimCcfTileSource::getShortName()const
-{
-   return ossimString("ccf");
-}
-
-ossimString ossimCcfTileSource::getLongName()const
-{
-   return ossimString("ccf reader");
-}
-
-ossim_uint32 ossimCcfTileSource::getNumberOfInputBands() const
-{
-   return theCcfHead.numberOfBands();
-}
-
-ossim_uint32 ossimCcfTileSource::getNumberOfOutputBands()const
-{
-   return getNumberOfInputBands();
-}
-
-ossim_uint32 ossimCcfTileSource::getNumberOfLines(ossim_uint32 reduced_res_level) const
-{
-   return theCcfHead.numberOfLines(reduced_res_level);
-}
-
-ossim_uint32 ossimCcfTileSource::getNumberOfSamples(ossim_uint32 reduced_res_level) const
-{
-   return theCcfHead.numberOfSamples(reduced_res_level);
-}
-
-ossim_uint32 ossimCcfTileSource::getNumberOfDecimationLevels() const
-{
-   return theCcfHead.numberOfReducedResSets();
-}
-
-bool ossimCcfTileSource::isOpen()const
-{
-   return (theFileStr != NULL);
-}
-
-ossimRefPtr<ossimProperty> ossimCcfTileSource::getProperty(const ossimString& name)const
-{
-	if(name == "file_type")
-	{
-		
-		return new ossimStringProperty(name, "CCF");
-	}
-	return ossimImageHandler::getProperty(name);
-}
-
-void ossimCcfTileSource::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-	ossimImageHandler::getPropertyNames(propertyNames);
-	propertyNames.push_back("file_type");
-}
-
-void ossimCcfTileSource::adjustToStartOfChunk(ossimIpt& pt) const
-{
-   pt.x &= 0xffffff00;
-   pt.y &= 0xffffff00;
-}
-
-void ossimCcfTileSource::adjustToStartOfChip(ossimIpt& pt) const
-{
-   pt.x &= 0xffffffe0;
-   pt.y &= 0xffffffe0;
-}
diff --git a/src/ossim/imaging/ossimCibCadrgTileSource.cpp b/src/ossim/imaging/ossimCibCadrgTileSource.cpp
deleted file mode 100644
index 7762b79..0000000
--- a/src/ossim/imaging/ossimCibCadrgTileSource.cpp
+++ /dev/null
@@ -1,1328 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//********************************************************************
-// $Id: ossimCibCadrgTileSource.cpp 19900 2011-08-04 14:19:57Z dburken $
-#include <algorithm>
-
-#include <ossim/imaging/ossimCibCadrgTileSource.h>
-
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/base/ossimNBandLutDataObject.h>
-#include <ossim/imaging/ossimHistogramWriter.h>
-#include <ossim/imaging/ossimImageHistogramSource.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimContainerProperty.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimEllipsoid.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/support_data/ossimRpfFrame.h>
-#include <ossim/support_data/ossimRpfHeader.h>
-#include <ossim/support_data/ossimRpfToc.h>
-#include <ossim/support_data/ossimRpfTocEntry.h>
-#include <ossim/support_data/ossimRpfCompressionSection.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/projection/ossimEquDistCylProjection.h>
-#include <ossim/projection/ossimCylEquAreaProjection.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimTrace.h>
-
-static ossimTrace traceDebug = ossimTrace("ossimCibCadrgTileSource:debug");
-
-#ifdef OSSIM_ID_ENABLED
-static const char OSSIM_ID[] = "$Id: ossimCibCadrgTileSource.cpp 19900 2011-08-04 14:19:57Z dburken $";
-#endif
-
-RTTI_DEF1(ossimCibCadrgTileSource, "ossimCibCadrgTileSource", ossimImageHandler)
-
-const ossim_uint32 ossimCibCadrgTileSource::CIBCADRG_FRAME_WIDTH  = 1536;
-const ossim_uint32 ossimCibCadrgTileSource::CIBCADRG_FRAME_HEIGHT = 1536;
-
-ossimCibCadrgTileSource::ossimCibCadrgTileSource()
-   :ossimImageHandler(),
-    theCompressedBuffer(0),
-    theUncompressedBuffer(0),
-    theNumberOfLines(0),
-    theNumberOfSamples(0),
-    theTile(0),
-    theTableOfContents(0),
-    theEntryToRender(0),
-    theEntryNumberToRender(1),
-    theTileSize(128, 128),
-    theProductType(OSSIM_PRODUCT_TYPE_UNKNOWN),
-    theSkipEmptyCheck(false)
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimCibCadrgTileSource::ossimCibCadrgTileSource entered...\n";
-#ifdef OSSIM_ID_ENABLED
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "OSSIM_ID:  " << OSSIM_ID << "\n";
-#endif      
-   }
-   theWorkFrame = new ossimRpfFrame;
-   
-   // a CADRG and CIBis a 64*64*12 bit buffer and must divide by 8 to
-   // convert to bytes
-   theCompressedBuffer   = new ossim_uint8[(64*64*12)/8];
-
-   // whether CIB or CADRG we will alocate the buffer
-   // to the larger of the 2 (CADRG is 3 bands)
-   theUncompressedBuffer = new ossim_uint8[256*256*3];
-                           
-}
-
-ossimCibCadrgTileSource::~ossimCibCadrgTileSource()
-{
-   if(theCompressedBuffer)
-   {
-      delete [] theCompressedBuffer;
-      theCompressedBuffer = 0;
-   }
-   if(theUncompressedBuffer)
-   {
-      delete [] theUncompressedBuffer;
-      theUncompressedBuffer = 0;
-   }
-   if(theWorkFrame)
-   {
-      delete theWorkFrame;
-      theWorkFrame = 0;
-   }
-   close();
-}
-
-ossimString ossimCibCadrgTileSource::getShortName()const
-{
-   return ossimString("CIB/CADRG");
-}
-
-ossimString ossimCibCadrgTileSource::getLongName()const
-{
-   return ossimString("CIB/CADRG reader");
-}
-
-
-void ossimCibCadrgTileSource::close()
-{
-   deleteAll();
-   ossimImageHandler::close();
-}
-
-bool ossimCibCadrgTileSource::isOpen()const
-{
-   return (theTableOfContents!=0);
-}
-
-bool ossimCibCadrgTileSource::open()
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimCibCadrgTileSource::open(): Entered....."
-         << "\ntheImageFile: " << theImageFile << std::endl;
-   }
-
-   bool result = false;
-   
-   if(isOpen())
-   {
-      close();
-   }
-
-   theTableOfContents = new ossimRpfToc;
-   
-   if(theTableOfContents)
-   {      
-      if(theTableOfContents->parseFile(theImageFile) == ossimErrorCodes::OSSIM_OK)
-      {
-         if(theTableOfContents->getNumberOfEntries() > 0)
-         {
-            vector<ossimString> scaleList = getProductScaleList();
-            if(scaleList.size() > 0)
-            {
-               std::vector<ossim_uint32> entryList;
-               getEntryList(entryList);
-               if(entryList.size() > 0)
-               {
-                  setCurrentEntry(entryList[0]);
-                  
-                  if(theEntryToRender)
-                  {
-                     // a CADRG is 1536x1536 per frame.
-                     theNumberOfLines   = theEntryToRender->getNumberOfLines();
-                     theNumberOfSamples = theEntryToRender->getNumberOfSamples();
-                  }
-
-                  if(theEntryToRender->getProductType().trim().upcase() == "CADRG")
-                  {
-                     theProductType = OSSIM_PRODUCT_TYPE_CADRG;
-                     result = true;
-                  }
-                  else if(theEntryToRender->getProductType().trim().upcase() == "CIB")
-                  {
-                     theProductType = OSSIM_PRODUCT_TYPE_CIB;
-                     result = true;
-                  }
-                  if ( result )
-                  {
-                     // This initializes tiles and buffers.
-                     allocateForProduct();
-                  }
-               }
-            }
-         }
-      }
-   }
-
-   if(!result)
-   {
-      theImageFile.clear();
-      close();
-   }
-
-#if 0 /* 20100414 - drb */
-   else
-   {
-      //---
-      // Adjust image rect so not to go over the -180 to 180 and -90 to 90
-      // bounds.
-      //---
-      // Note this did not do any boundary checking and was in conflict with setTocEntryToRender
-      // method calculation of lines and samps.
-      // setActualImageRect();
-
-      std::ifstream in(theImageFile.c_str(), std::ios::in|std::ios::binary);
-      if(in.good()&&theTableOfContents->getRpfHeader())
-      {
-      }
-      completeOpen();
-
-      theTile = ossimImageDataFactory::instance()->create(this, this);
-      theTile->initialize();
-   }
-#endif
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimCibCadrgTileSource::open(): Leaving at line " << __LINE__
-         << " result=" << (result?"true":"false") << std::endl;
-   }
-
-   return result;
-}
-
-void ossimCibCadrgTileSource::setSkipEmptyCheck( bool bSkipEmptyCheck )
-{
-   theSkipEmptyCheck = bSkipEmptyCheck;
-}
-
-ossimRefPtr<ossimImageData> ossimCibCadrgTileSource::getTile(
-   const  ossimIrect& rect, ossim_uint32 resLevel)
-{
-   if (theTile.valid())
-   {
-      // Image rectangle must be set prior to calling getTile.
-      theTile->setImageRectangle(rect);
-      
-      if ( getTile( theTile.get(), resLevel ) == false )
-      {
-         if (theTile->getDataObjectStatus() != OSSIM_NULL)
-         {
-            theTile->makeBlank();
-         }
-      }
-   }
-   
-   return theTile;
-}
-
-bool ossimCibCadrgTileSource::getTile(ossimImageData* result,
-                                      ossim_uint32 resLevel)
-{
-   bool status = false;
-
-   //---
-   // Not open, this tile source bypassed, or invalid res level,
-   // return a blank tile.
-   //---
-   if( isOpen() && isSourceEnabled() && isValidRLevel(resLevel) &&
-       result && (result->getNumberOfBands() == getNumberOfOutputBands()) &&
-       (theProductType != OSSIM_PRODUCT_TYPE_UNKNOWN) )
-   {
-      if ( resLevel > 0 )
-      {
-         //---
-         // Check for overview tile.  Some overviews can contain r0 so always
-         // call even if resLevel is 0 (if overview is not virtual).  Method 
-         // returns true on success, false on error.
-         //---
-         status = getOverviewTile(resLevel, result);
-      }
-
-      if (!status) // Did not get an overview tile.
-      {
-         status = true;
-
-         ossimIrect rect = result->getImageRectangle();
-
-         ossimIrect imageRect = getImageRectangle();
-
-         if ( rect.intersects(imageRect) )
-         {
-            //---
-            // Start with a blank tile in case there is not total coverage
-            // for rect.
-            //---
-            result->makeBlank();
-   
-            vector<ossimFrameEntryData> frames = getIntersectingEntries(rect);
-            if(frames.size() > 0)
-            {
-               //---
-               // Now lets render each frame.  Note we will have to find
-               // subframes
-               // that intersect the rectangle of interest for each frame.
-               //---
-               fillTile(rect, frames, result);
-               
-               // Revalidate tile status.
-               result->validate();
-            }
-         }
-         else
-         {
-            result->makeBlank();
-         }
-      }
-   }
-   
-   return status;
-}
-
-ossim_uint32 ossimCibCadrgTileSource::getNumberOfInputBands()const
-{
-   switch(theProductType)
-   {
-      case  OSSIM_PRODUCT_TYPE_UNKNOWN:
-      {
-         return 0;
-      }
-      case OSSIM_PRODUCT_TYPE_CIB:
-      {
-         return 1;
-      }
-      case OSSIM_PRODUCT_TYPE_CADRG:
-      {
-         return 3;
-      }
-   }
-   
-   return 0;
-}
-
-ossim_uint32 ossimCibCadrgTileSource::getNumberOfOutputBands()const
-{
-   switch(theProductType)
-   {
-      case  OSSIM_PRODUCT_TYPE_UNKNOWN:
-      {
-         return 0;
-      }
-      case OSSIM_PRODUCT_TYPE_CIB:
-      {
-         return 1;
-      }
-      case OSSIM_PRODUCT_TYPE_CADRG:
-      {
-         return 3;
-      }
-   }
-   
-   return 0;
-}
-
-ossim_uint32 ossimCibCadrgTileSource::getNumberOfLines(ossim_uint32 reduced_res_level) const
-{
-   if (reduced_res_level == 0)
-   {
-      return theNumberOfLines;
-   }
-   else if (theOverview.valid())
-   {
-      return theOverview->getNumberOfLines(reduced_res_level);
-   }
-
-   return 0;
-}
-
-ossim_uint32 ossimCibCadrgTileSource::getNumberOfSamples(ossim_uint32 reduced_res_level) const
-{
-   if (reduced_res_level == 0)
-   {
-      return theNumberOfSamples;
-   }
-   else if (theOverview.valid())
-   {
-      return theOverview->getNumberOfSamples(reduced_res_level);
-   }
-
-   return 0;
-}
-
-ossimIrect ossimCibCadrgTileSource::getImageRectangle(ossim_uint32 reduced_res_level) const
-{
-   return ossimIrect(0,                         // upper left x
-                     0,                         // upper left y
-                     getNumberOfSamples(reduced_res_level) - 1,  // lower right x
-                     getNumberOfLines(reduced_res_level)   - 1); // lower right y                     
-}
-   
-ossimRefPtr<ossimImageGeometry> ossimCibCadrgTileSource::getImageGeometry()
-{
-   if ( !theGeometry )
-   {
-      // Check for external geom:
-      theGeometry = getExternalImageGeometry();
-      
-      if ( !theGeometry && theEntryToRender )
-      {
-         theGeometry = theEntryToRender->getImageGeometry();
-      }
-
-      // Set image things the geometry object should know about.
-      initImageParameters( theGeometry.get() );
-   }
-
-   return theGeometry;
-}
-   
-ossimScalarType ossimCibCadrgTileSource::getOutputScalarType() const
-{
-   return OSSIM_UCHAR;
-}
-
-ossim_uint32 ossimCibCadrgTileSource::getTileWidth() const
-{
-   return theTileSize.x;
-}
-   
-ossim_uint32 ossimCibCadrgTileSource::getTileHeight() const
-{
-   return theTileSize.y;
-}
-
-ossim_uint32 ossimCibCadrgTileSource::getCurrentEntry()const
-{
-   return (ossim_uint32)theEntryNumberToRender;
-}
-
-bool ossimCibCadrgTileSource::setCurrentEntry(ossim_uint32 entryIdx)
-{
-   bool result = false;
-
-   theDecimationFactors.clear();
-   
-   // Clear the geometry.
-   theGeometry = 0;
-   
-   // Must clear or openOverview will use last entries.
-   theOverviewFile.clear();
-   
-   if(setEntryToRender(entryIdx))
-   {
-      completeOpen();
-      result = true;
-   }
-
-   return result;
-}
-
-void ossimCibCadrgTileSource::getEntryList(std::vector<ossim_uint32>& entryList)const
-{
-   std::vector<ossimString> scaleList = getProductScaleList();
-   ossim_uint32 scaleIdx = 0;
-   ossim_uint32 entryIdx = 0;
-   for(scaleIdx = 0; scaleIdx < scaleList.size(); ++scaleIdx)
-   {
-      std::vector<ossim_int32> eList = getProductEntryList(scaleList[scaleIdx]);
-      
-      for(entryIdx = 0; entryIdx < eList.size(); ++entryIdx)
-      {
-         entryList.push_back(eList[entryIdx]);
-      }
-   }
-
-}
-
-bool ossimCibCadrgTileSource::setEntryToRender(ossim_uint32 index)
-{
-   if(isOpen())
-   {
-      const ossimRpfTocEntry *temp = theTableOfContents->getTocEntry(index);
-
-      if(temp)
-      {
-         if(!(temp->getBoundaryInformation().getCoverage().isGeographicRectNull()))
-         {
-            setTocEntryToRender(temp);
-            theEntryNumberToRender = index;
-            if(theEntryToRender)
-            {
-               if(theEntryToRender->getProductType().trim().upcase() == "CADRG")
-               {
-                  theProductType = OSSIM_PRODUCT_TYPE_CADRG;
-               }
-               else if(theEntryToRender->getProductType().trim().upcase() == "CIB")
-               {
-                  theProductType = OSSIM_PRODUCT_TYPE_CIB;
-               }
-               else
-               {
-                  theProductType = OSSIM_PRODUCT_TYPE_UNKNOWN;
-               }
-            }
-            
-            populateLut();
-            
-            return true;
-         }
-      }
-   }
-   
-   return false;
-}
-
-void ossimCibCadrgTileSource::setTocEntryToRender(const ossimRpfTocEntry* entry)
-{
-   if(isOpen()&&entry)
-   {
-      theEntryToRender = entry;
-      theNumberOfLines   = theEntryToRender->getNumberOfLines();
-      theNumberOfSamples = theEntryToRender->getNumberOfSamples();
-      theEntryNumberToRender = theTableOfContents->getTocEntryIndex(entry);
-   }
-}
-
-ossim_int32 ossimCibCadrgTileSource::getCurrentEntryIndex()const
-{
-   return theEntryNumberToRender;
-}
-
-const ossimRpfTocEntry* ossimCibCadrgTileSource::getCurrentTocEntry()const
-{
-   return theEntryToRender;
-}
-
-const ossimRpfToc*  ossimCibCadrgTileSource::getToc()const
-{
-   return theTableOfContents;
-}
-
-bool ossimCibCadrgTileSource::isValidRLevel(ossim_uint32 reduced_res_level) const
-{
-   if (reduced_res_level == 0)
-   {
-      return true;
-   }
-   else if (theOverview.valid())
-   {
-      return theOverview->isValidRLevel(reduced_res_level);
-   }
-   else
-   {
-      return false;
-   }
-}
-
-vector<ossimString> ossimCibCadrgTileSource::getProductScaleList()const
-{
-   vector<ossimString> result;
-   
-   if(isOpen())
-   {
-      ossim_int32 upperBound = theTableOfContents->getNumberOfEntries();
-
-      for(ossim_int32 index = 0; index < upperBound; ++index)
-      {
-         const ossimRpfTocEntry* entry = theTableOfContents->getTocEntry(index);
-         ossimString scale = entry->getBoundaryInformation().getScale();
-
-         scale = scale.trim().upcase();
-         if(scale!="")
-         {
-            // CIB will have product scales like 5M or 10M
-            // and CADRG's will have product scales like
-            // 1:50K and 1:250K ...
-            // So if these patterns exist then add it to
-            // the product list.
-            if( ( std::find(scale.begin(), scale.end(), ':') != scale.end() )
-                ||
-                (scale[scale.size()-1]=='M'))
-            {
-               // only add it if it doesn't already exist
-               // on the list.
-               if(find(result.begin(), result.end(), scale) == result.end())
-               {
-                  result.push_back(scale);
-               }
-            }
-         }
-      }
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimCibCadrgTileSource::getProductScaleList DEBUG:"
-         << endl;
-
-      std::vector<ossimString>::const_iterator i = result.begin();
-      ossim_uint32 index = 0;
-      while (i != result.end())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "scale[" << index << "]:  " << (*i) << endl;
-         ++index;
-         ++i;
-      }
-   }
-   
-   return result;
-}
-
-vector<ossim_int32> ossimCibCadrgTileSource::getProductEntryList(const ossimString& productScale)const
-{
-   vector<ossim_int32> result;
-   
-   if(isOpen())
-   {
-      ossim_int32 upperBound = theTableOfContents->getNumberOfEntries();
-
-      for(ossim_int32 index = 0; index < upperBound; ++index)
-      {
-         const ossimRpfTocEntry* entry = theTableOfContents->getTocEntry(index);
-
-         if(entry)
-         {
-            // If the "skip empty check" is true, we don't check to see if the
-            // actual frame images exist. Otherwise the check is carried out,
-            // which is the default situation.
-            bool bIsEmpty = (theSkipEmptyCheck==false) ? entry->isEmpty() : false;
-
-            // if the entry is not empty then add it to the list.
-            if( bIsEmpty == false )
-            {
-               ossimString scale = entry->getBoundaryInformation().getScale();
-               scale = scale.trim().upcase();
-               if(scale==productScale)
-               {
-                  result.push_back(index);
-               }
-            }
-         }
-      }
-   }
-   
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimCibCadrgTileSource::getProductEntryList DEBUG:"
-         << endl;
-
-      std::vector<ossim_int32>::const_iterator i = result.begin();
-      ossim_uint32 index = 0;
-      while (i != result.end())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "scale[" << index << "]:  " << (*i) << endl;
-         ++index;
-         ++i;
-      }
-   }
-   
-   return result;
-   
-}
-
-vector<ossimCibCadrgTileSource::ossimFrameEntryData> ossimCibCadrgTileSource::getIntersectingEntries(const ossimIrect& rect)
-{
-   vector<ossimFrameEntryData> result;
-
-   // make sure we have the Toc entry to render
-   if(!isOpen()) return result;
-   
-   ossimIrect imageRect = getImageRectangle();
-   if(rect.intersects(imageRect))
-   {
-      ossimIrect clipRect  = rect.clipToRect(imageRect);
-      ossimIrect frameRect(clipRect.ul().x/CIBCADRG_FRAME_WIDTH,
-                           clipRect.ul().y/CIBCADRG_FRAME_HEIGHT,
-                           clipRect.lr().x/CIBCADRG_FRAME_WIDTH,
-                           clipRect.lr().y/CIBCADRG_FRAME_HEIGHT);
-
-      ossimRpfFrameEntry tempEntry;
-
-      
-     for(ossim_int32 row = frameRect.ul().y; row <= frameRect.lr().y; ++row)
-      {
-         for(ossim_int32 col = frameRect.ul().x; col <= frameRect.lr().x; ++col)
-         {
-            if(theEntryToRender->getEntry((theEntryToRender->getNumberOfFramesVertical()-1) - row,
-                                          col,
-                                          tempEntry))
-            {
-               if(tempEntry.exists())
-               {
-                   result.push_back(ossimFrameEntryData(row,
-                                                        col,
-                                                        row*CIBCADRG_FRAME_HEIGHT,
-                                                        col*CIBCADRG_FRAME_WIDTH,
-                                                        tempEntry));
-               }
-            }
-         }
-      }
-   }
-   
-   return result;
-}
-
-void ossimCibCadrgTileSource::fillTile(
-   const ossimIrect& tileRect,
-   const vector<ossimFrameEntryData>& framesInvolved,
-   ossimImageData* tile)
-{
-   ossim_uint32 idx = 0;
-   for(idx = 0;
-       idx < framesInvolved.size();
-       ++idx)
-   {
-
-      if(theWorkFrame->parseFile(framesInvolved[idx].theFrameEntry.getFullPath())
-         == ossimErrorCodes::OSSIM_OK)
-      {
-         // we will fill a subtile.  We pass in which frame it is and the position of the frame.
-         // the actual pixel will be 1536*row and 1536 *col.
-         if(theProductType == OSSIM_PRODUCT_TYPE_CIB)
-         {
-            fillSubTileCib(*theWorkFrame,
-                           tileRect,
-                           framesInvolved[idx],
-                           tile);
-         }
-         else
-         {
-            fillSubTileCadrg(*theWorkFrame,
-                             tileRect,
-                             framesInvolved[idx],
-                             tile);
-         }
-      }
-   }
-}
-
-void ossimCibCadrgTileSource::fillSubTileCadrg(
-   const ossimRpfFrame&  aFrame,
-   const ossimIrect& tileRect,
-   const ossimFrameEntryData& frameEntryData,
-   ossimImageData* tile)
-{
-   // first let's grab the absolute position of the frame rectangle in pixel space
-   ossimIrect frameRect(frameEntryData.thePixelCol,
-                        frameEntryData.thePixelRow,
-                        frameEntryData.thePixelCol + CIBCADRG_FRAME_WIDTH  - 1,
-                        frameEntryData.thePixelRow + CIBCADRG_FRAME_HEIGHT - 1);
-
-   
-   // now clip it to the tile
-   ossimIrect clipRect = tileRect.clipToRect(frameRect);
-   
-   const ossimRpfCompressionSection* compressionSection = aFrame.getCompressionSection();
-   
-   if(!compressionSection)
-   {
-      return;
-   }
-
-   const vector<ossimRpfColorGrayscaleTable>& colorTable =
-      aFrame.getColorGrayscaleTable();
-
-   // ESH 03/2009 -- Partial fix for ticket #646.
-   // Crash fix on reading RPFs: Make sure the colorTable vector 
-   // has entries before trying to make use of them. 
-   int numTables = (int)colorTable.size();
-   if ( numTables <= 0 )
-   {
-      return;
-   }
-
-   ossim_uint8 *tempRows[3];
-   
-   tempRows[0] = theUncompressedBuffer;
-   tempRows[1] = (theUncompressedBuffer + 256*256);
-   tempRows[2] = (tempRows[1] + 256*256);
-   
-   // find the shift to 0,0
-   ossimIpt tempDelta(clipRect.ul().x - frameEntryData.thePixelCol,
-                      clipRect.ul().y - frameEntryData.thePixelRow);
-   
-   
-   // In order to compute the subframe we will need the corner offsets of
-   // the upper left of the frame and the upper left of the clip rect.  The
-   // clip rect should be completely within the frame.  This just translates the value
-   // to make the upper left of the frame be 0,0.
-   //
-   ossimIrect offsetRect(tempDelta.x,
-                         tempDelta.y,
-                         tempDelta.x + clipRect.width()-1,
-                         tempDelta.y + clipRect.height()-1);
-   
-   // each subframe is 64x64.  We will actually use 256x256 since
-   // we will be uncompressing them.  Note CADRG is a 256x256 tile
-   // compressed to 64x64x12 bit data
-   //
-    ossimIrect subFrameRect(offsetRect.ul().x/256,
-                            offsetRect.ul().y/256,
-                            (offsetRect.lr().x)/256,
-                            (offsetRect.lr().y)/256);
-   
-   ossim_uint32 readPtr  = 0;
-
-   ossim_int32 row = 0;
-   ossim_int32 col = 0;
-   ossim_uint32 i = 0;
-   ossim_uint32 j = 0;
-   ossim_int32 upperY = subFrameRect.lr().y;
-   ossim_int32 upperX = subFrameRect.lr().x;
-   ossim_int32 lowerY = subFrameRect.ul().y;
-   ossim_int32 lowerX = subFrameRect.ul().x; 
-   for(row = lowerY; row <= upperY; ++row)
-   {
-      for(col = lowerX; col <= upperX; ++col)
-      {
-         readPtr = 0;
-         if(aFrame.fillSubFrameBuffer(theCompressedBuffer, 0, row, col))
-         {
-            for (i = 0; i < 256; i += 4)
-            {
-               for (j = 0; j < 256; j += 8)
-               {
-                  ossim_uint16 firstByte  = theCompressedBuffer[readPtr++] & 0xff;
-                  ossim_uint16 secondByte = theCompressedBuffer[readPtr++] & 0xff;
-                  ossim_uint16 thirdByte  = theCompressedBuffer[readPtr++] & 0xff;
-                  
-                  //because dealing with half-bytes is hard, we
-                  //uncompress two 4x4 tiles at the same time. (a
-                  //4x4 tile compressed is 12 bits )
-                  // this little code was grabbed from openmap software.
-                  
-                  /* Get first 12-bit value as index into VQ table */
-                  // I think we need to swap
-                  ossim_uint16 val1 = (firstByte << 4) | (secondByte >> 4);
-                  
-                  /* Get second 12-bit value as index into VQ table*/
-                  ossim_uint16 val2 = ((secondByte & 0x000F) << 8) | thirdByte;
-                  
-                  for (ossim_uint32 t = 0; t < 4; ++t)
-                  {
-                     for (ossim_uint32 e = 0; e < 4; ++e)
-                     {
-                        ossim_uint16 tableVal1 = compressionSection->getTable()[t].theData[val1*4 + e] & 0xff;
-                        ossim_uint16 tableVal2 = compressionSection->getTable()[t].theData[val2*4 + e] & 0xff;
-
-                        ossim_uint32 pixindex = ((i+t)*256) +
-                                                 (j + e);
-                        const ossim_uint8* color1 = colorTable[0].getStartOfData(tableVal1);
-                        const ossim_uint8* color2 = colorTable[0].getStartOfData(tableVal2);
-                        
-                        
-                        tempRows[0][pixindex] = color1[0];
-                        tempRows[1][pixindex] = color1[1];
-                        tempRows[2][pixindex] = color1[2];
-                        
-                        tempRows[0][pixindex+4] = color2[0];
-                        tempRows[1][pixindex+4] = color2[1];
-                        tempRows[2][pixindex+4] = color2[2];
-                     } //for e
-                  } //for t
-               }  /* for j */
-            } //for i
-         }
-         else
-         {
-            memset(theUncompressedBuffer, 0, 256*256*3);
-         }
-         ossim_int32 tempCol = col*256;
-         ossim_int32 tempRow = row*256;
-         ossimIrect subRectToFill(frameRect.ul().x + tempCol,
-                                  frameRect.ul().y + tempRow,
-                                  frameRect.ul().x + tempCol + 255,
-                                  frameRect.ul().y + tempRow + 255);
-         tile->loadTile(theUncompressedBuffer,
-                        subRectToFill,
-                        OSSIM_BSQ);
-      }
-   }
-}
-
-void ossimCibCadrgTileSource::fillSubTileCib(
-   const ossimRpfFrame&  aFrame,
-   const ossimIrect& tileRect,
-   const ossimFrameEntryData& frameEntryData,
-   ossimImageData* tile)
-{
-   // first let's grab the absolute position of the frame rectangle in pixel
-   // space
-   ossimIrect frameRect(frameEntryData.thePixelCol,
-                        frameEntryData.thePixelRow,
-                        frameEntryData.thePixelCol + CIBCADRG_FRAME_WIDTH  - 1,
-                        frameEntryData.thePixelRow + CIBCADRG_FRAME_HEIGHT - 1);
-
-   
-   // now clip it to the tile
-   ossimIrect clipRect = tileRect.clipToRect(frameRect);
-
-   const ossimRpfCompressionSection* compressionSection = aFrame.getCompressionSection();
-   
-   if(!compressionSection)
-   {
-      return;
-   }
-
-   const vector<ossimRpfColorGrayscaleTable>& colorTable =
-      aFrame.getColorGrayscaleTable();
-
-   // ESH 03/2009 -- Partial fix for ticket #646.
-   // Crash fix on reading RPFs: Make sure the colorTable vector 
-   // has entries before trying to make use of them. 
-   int numTables = (int)colorTable.size();
-   if ( numTables <= 0 )
-   {
-      return;
-   }
-
-   // check to see if it does overlap.  If it doesn't then the width and height
-   // will be a single point
-   {
-      ossim_uint8 *tempRow;
-
-      tempRow = theUncompressedBuffer;
-      
-      // find the shift to 0,0
-      ossimIpt tempDelta(clipRect.ul().x - frameEntryData.thePixelCol,
-                         clipRect.ul().y - frameEntryData.thePixelRow);
-      
-      // In order to compute the subframe we will need the corner offsets of
-      // the upper left of the frame and the upper left of the clip rect.  The
-      // clip rect should be completely within the frame.  This just translates the value
-      // to make the upper left of the frame be 0,0.
-      //
-      ossimIrect offsetRect(tempDelta.x,
-                            tempDelta.y,
-                            tempDelta.x + clipRect.width()-1,
-                            tempDelta.y + clipRect.height()-1);
-
-      // each subframe is 64x64.  We will actually use 256x256 since
-      // we will be uncompressing them.  Note CADRG is a 256x256 tile
-      // compressed to 64x64x12 bit data
-      //
-      ossimIrect subFrameRect(offsetRect.ul().x/256,
-                              offsetRect.ul().y/256,
-                              (offsetRect.lr().x)/256,
-                              (offsetRect.lr().y)/256);
-
-      ossim_int32 row = 0;
-      ossim_int32 col = 0;
-      ossim_uint32 i = 0;
-      ossim_uint32 j = 0;
-      ossim_uint32 readPtr = 0;
-      for(row = subFrameRect.ul().y; row <= subFrameRect.lr().y; ++row)
-      {
-         for(col = subFrameRect.ul().x; col <= subFrameRect.lr().x; ++col)
-         {
-            readPtr = 0;
-            if(aFrame.fillSubFrameBuffer(theCompressedBuffer, 0, row, col))
-            {
-               for (i = 0; i < 256; i += 4)
-               {
-                  for (j = 0; j < 256; j += 8)
-                  {
-                     ossim_uint16 firstByte  = theCompressedBuffer[readPtr++] & 0xff;
-                     ossim_uint16 secondByte = theCompressedBuffer[readPtr++] & 0xff;
-                     ossim_uint16 thirdByte  = theCompressedBuffer[readPtr++] & 0xff;
-                     
-                     //because dealing with half-bytes is hard, we
-                     //uncompress two 4x4 tiles at the same time. (a
-                     //4x4 tile compressed is 12 bits )
-                     // this little code was grabbed from openmap software.
-                     
-                     /* Get first 12-bit value as index into VQ table */
-                     // I think we need to swap
-                     ossim_uint16 val1 = (firstByte << 4) | (secondByte >> 4);
-                     
-                     /* Get second 12-bit value as index into VQ table*/
-                     ossim_uint16 val2 = ((secondByte & 0x000F) << 8) | thirdByte;
-
-                     for (ossim_uint32 t = 0; t < 4; ++t)
-                     {
-                        for (ossim_uint32 e = 0; e < 4; ++e)
-                        {
-                           ossim_uint16 tableVal1 = compressionSection->getTable()[t].theData[val1*4 + e] & 0xff;
-                           ossim_uint16 tableVal2 = compressionSection->getTable()[t].theData[val2*4 + e] & 0xff;
-
-                           ossim_uint32 pixindex = ((i+t)*256) + (j + e);
-                           const ossim_uint8* color1 = colorTable[0].getStartOfData(tableVal1);
-                           const ossim_uint8* color2 = colorTable[0].getStartOfData(tableVal2);
-
-                           
-                           tempRow[pixindex]      = color1[0];
-                           tempRow[pixindex + 4]  = color2[0];
-                        } //for e
-                     } //for t
-                  }  /* for j */
-               } //for i
-            }
-            else
-            {
-               memset(theUncompressedBuffer, 0, 256*256);
-            }
-            ossim_int32 tCol = col*256;
-            ossim_int32 tRow = row*256;
-            ossimIrect subRectToFill(frameRect.ul().x + tCol,
-                                     frameRect.ul().y + tRow,
-                                     frameRect.ul().x + tCol + 255,
-                                     frameRect.ul().y + tRow + 255);
-            tile->loadTile(theUncompressedBuffer,
-                           subRectToFill,
-                           OSSIM_BSQ);
-         }
-      }
-   }  
-}
-
-void ossimCibCadrgTileSource::allocateForProduct()
-{
-   if(theProductType ==  OSSIM_PRODUCT_TYPE_UNKNOWN)
-   {
-      return;
-   }
-   if(theUncompressedBuffer)
-   {
-      delete [] theUncompressedBuffer;
-      theUncompressedBuffer = 0;
-   }
-   if(theCompressedBuffer)
-   {
-      delete [] theCompressedBuffer;
-      theCompressedBuffer = 0;
-   }
-   
-   // a CADRG and CIBis a 64*64*12 bit buffer and must divide by 8 to
-   // convert to bytes
-   theCompressedBuffer   = new ossim_uint8[(64*64*12)/8];
-   if(theProductType == OSSIM_PRODUCT_TYPE_CIB)
-   {
-      theUncompressedBuffer = new ossim_uint8[256*256];
-   }
-   else
-   {
-      theUncompressedBuffer = new ossim_uint8[256*256*3];
-   }
-   
-   theTile = ossimImageDataFactory::instance()->create(this, this);
-   theTile->initialize();
-}
-
-const ossimRpfTocEntry* ossimCibCadrgTileSource::findFirstFrame()
-{
-   vector<ossimString> products = getProductScaleList();
-   vector<ossim_int32> indexProducts;
-
-   if(products.size() > 0)
-   {
-      indexProducts = getProductEntryList(products[0]);
-
-      if(indexProducts.size()>0)
-      {
-         theEntryNumberToRender = indexProducts[0];
-         
-         return theTableOfContents->getTocEntry(indexProducts[0]);
-      }
-   }
-   
-   return 0;
-}
-
-
-void ossimCibCadrgTileSource::deleteAll()
-{
-   theOverview = 0;
-   if(theTableOfContents)
-   {
-      delete theTableOfContents;
-      theTableOfContents = 0;
-   }
-}
-
-bool ossimCibCadrgTileSource::saveState(ossimKeywordlist& kwl,
-                                     const char* prefix)const
-{
-   bool result = ossimImageHandler::saveState(kwl, prefix);
-
-   kwl.add(prefix, 
-	   "entry",
-	   theEntryNumberToRender,
-	   true);
-
-   return result;
-}
-   
-bool ossimCibCadrgTileSource::loadState(const ossimKeywordlist& kwl,
-                                        const char* prefix)
-{
-   const char* MODULE = "ossimCibCadrgTileSource::loadState";
-
-   if(traceDebug())
-   {
-      CLOG << "Entering..." << endl;
-   }
-   bool result = ossimImageHandler::loadState(kwl, prefix);
-
-   if(!result)
-   {
-	   if(traceDebug())
-	   {
-          CLOG << "Leaving..." << endl;
-       }
-      return false;
-   }
-   const char* lookup = 0;
-   lookup = kwl.find(ossimString(prefix), "entry");
-   ossim_int32 entry = ossimString(lookup).toInt32();
-
-   // if an entry is specified then
-   // call the open with an entry number
-   if(lookup)
-   {
-      if(traceDebug())
-      {
-         CLOG << "Leaving..." << endl;
-      }
-      result = ossimImageHandler::open(theImageFile);
-      setCurrentEntry(entry);
-      return result;
-   }
-
-   result = ossimImageHandler::open(theImageFile);
-   
-   return result;
-}
-
-ossim_uint32 ossimCibCadrgTileSource::getImageTileWidth() const
-{
-   return 256;
-}
-
-ossim_uint32 ossimCibCadrgTileSource::getImageTileHeight() const
-{
-   return 256;
-}
-
-bool ossimCibCadrgTileSource::isCib() const
-{
-   return (theProductType==OSSIM_PRODUCT_TYPE_CIB);
-}
-
-bool ossimCibCadrgTileSource::isCadrg() const
-{
-   return (theProductType==OSSIM_PRODUCT_TYPE_CADRG);
-}
-
-ossimString ossimCibCadrgTileSource::getProductScale() const
-{
-   ossimString result;
-   
-   const ossimRpfTocEntry* entry =
-      theTableOfContents->getTocEntry(theEntryNumberToRender);
-
-   if (entry)
-   {
-      result = entry->getBoundaryInformation().getScale();
-   }
-
-   return result;
-}
-
-ossimString ossimCibCadrgTileSource::getSecurityClassification()const
-{
-   ossimString result;
-   
-   const ossimRpfHeader* header =
-      theTableOfContents->getRpfHeader();
-
-   if (header)
-   {
-      result = header->getSecurityClassification();
-   }
-
-   return result;
-}
-
-ossimRefPtr<ossimProperty> ossimCibCadrgTileSource::getProperty(const ossimString& name)const
-{
-   if(name == "file_type")
-   {
-      if(theProductType == OSSIM_PRODUCT_TYPE_CIB)
-      {
-         return new ossimStringProperty("file_type", "CIB");
-      }
-      else if(theProductType == OSSIM_PRODUCT_TYPE_CADRG)
-      {
-         return new ossimStringProperty("file_type", "CADRG");
-      }
-      return 0;
-   }
-   return ossimImageHandler::getProperty(name);
-}
-
-void ossimCibCadrgTileSource::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageHandler::getPropertyNames(propertyNames);
-   propertyNames.push_back("file_type");
-   const ossimRpfHeader* header =
-      theTableOfContents->getRpfHeader();
-   
-   if(header)
-   {
-      std::ifstream in(theImageFile.c_str(), std::ios::in|std::ios::binary);
-      
-   }
-}
-
-void ossimCibCadrgTileSource::populateLut()
-{
-   theLut = 0;
-   if(theEntryToRender)
-   {
-      ossim_uint32 w = theEntryToRender->getNumberOfFramesHorizontal();
-      ossim_uint32 h = theEntryToRender->getNumberOfFramesVertical();
-      ossim_uint32 wi, hi;
-      bool found = false;
-      ossimRpfFrameEntry tempEntry;
-      ossimRpfFrame aFrame;
-      for(wi = 0; ((wi < w)&&(!found)); ++wi)
-      {
-         for(hi = 0; ((hi < h)&&(!found)); ++hi)
-         {
-            theEntryToRender->getEntry(hi,
-                                       wi,
-                                       tempEntry);
-            if(tempEntry.getFullPath().exists())
-            {
-               found = true;
-            }
-         }
-      }
-      if(aFrame.parseFile(tempEntry.getFullPath())
-         == ossimErrorCodes::OSSIM_OK)
-      {
-         const vector<ossimRpfColorGrayscaleTable>& colorTable =
-            aFrame.getColorGrayscaleTable();
-
-         // ESH 03/2009 -- Partial fix for ticket #646.
-         // Crash fix on reading RPFs: Make sure the colorTable vector 
-         // has entries before trying to make use of them. 
-         int numTables = (int)colorTable.size();
-
-         ossim_uint32 numElements = (numTables > 0) ? colorTable[0].getNumberOfElements() : 0;
-         if(numElements > 0)
-         {
-            if((theProductType == OSSIM_PRODUCT_TYPE_CIB)||
-               (theProductType == OSSIM_PRODUCT_TYPE_CADRG))
-            {
-               theLut = new ossimNBandLutDataObject(numElements,
-                                                    3,
-                                                    OSSIM_UINT8);
-            }
-            else
-            {
-               theLut = 0;
-               return;
-            }
-            ossim_uint32 idx = 0;
-
-            for(idx = 0; idx < numElements;++idx)
-            {
-               const ossim_uint8* startOfData = colorTable[0].getStartOfData(idx);
-               switch(theProductType)
-               {
-                  case OSSIM_PRODUCT_TYPE_CIB:
-                  {
-                     (*theLut)[idx][0] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[0]);
-                     (*theLut)[idx][1] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[0]);
-                     (*theLut)[idx][2] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[0]);
-                     break;
-                  }
-                  case OSSIM_PRODUCT_TYPE_CADRG:
-                  {
-                     (*theLut)[idx][0] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[0]);
-                     (*theLut)[idx][1] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[1]);
-                     (*theLut)[idx][2] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[2]);
-                     break;
-                  }
-                  default:
-                  {
-                     break;
-                  }
-               }
-            }
-         }
-      }
-   }
-}
-
-void ossimCibCadrgTileSource::updatePropertiesToFirstValidFrame()
-{
-   if(theEntryToRender)
-   {
-      ossim_uint32 w = theEntryToRender->getNumberOfFramesHorizontal();
-      ossim_uint32 h = theEntryToRender->getNumberOfFramesVertical();
-      ossim_uint32 wi, hi;
-      bool found = false;
-      ossimRpfFrameEntry tempEntry;
-      ossimRpfFrame aFrame;
-      for(wi = 0; ((wi < w)&&(!found)); ++wi)
-      {
-         for(hi = 0; ((hi < h)&&(!found)); ++hi)
-         {
-            theEntryToRender->getEntry(hi,
-                                       wi,
-                                       tempEntry);
-            if(tempEntry.getFullPath().exists())
-            {
-               found = true;
-            }
-         }
-      }
-      if(found)
-      {
-         if(aFrame.parseFile(tempEntry.getFullPath()) == ossimErrorCodes::OSSIM_OK)
-         {
-            
-         }
-      }	
-   }
-}
diff --git a/src/ossim/imaging/ossimClosestToCenterCombiner.cpp b/src/ossim/imaging/ossimClosestToCenterCombiner.cpp
deleted file mode 100644
index 0f31f7b..0000000
--- a/src/ossim/imaging/ossimClosestToCenterCombiner.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2005 Garrett Potts. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimClosestToCenterCombiner.cpp 11955 2007-10-31 16:10:22Z gpotts $
-#include <ossim/imaging/ossimClosestToCenterCombiner.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-
-RTTI_DEF1(ossimClosestToCenterCombiner, "ossimClosestToCenterCombiner", ossimImageMosaic);
-
-ossimClosestToCenterCombiner::ossimClosestToCenterCombiner()
-   :ossimImageMosaic()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimClosestToCenterCombiner::getTile(const ossimIrect& rect,
-                                                                  ossim_uint32 resLevel)
-{
-   ossim_uint32 layerIdx = 0;
-   if(!isSourceEnabled())
-   {
-      return ossimImageMosaic::getTile(rect, resLevel);
-   }
-   if(!theTile.valid())
-   {
-      allocate();
-      if(!theTile.valid())
-      {
-         return 0;
-      }
-   }
-   theTile->setImageRectangle(rect);
-   theTile->makeBlank();
-   std::vector<ossimClosestToCenterCombinerInfo > normTileList;
-   ossimRefPtr<ossimImageData> currentTile = getNextNormTile(layerIdx, 0, rect);
-   while(currentTile.valid())
-   {
-      normTileList.push_back(ossimClosestToCenterCombinerInfo((ossimImageData*)currentTile->dup(),
-                                                              layerIdx));
-      currentTile = getNextNormTile(layerIdx, rect, resLevel);
-   }
-
-   
-   if(normTileList.size() == 1)
-   {
-      theTile->copyNormalizedBufferToTile((ossim_float32*)normTileList[0].theTile->getBuf());
-   }
-   else if(normTileList.size() > 1)
-   {
-      ossimRefPtr<ossimImageData> copyTile    = ossimImageDataFactory::instance()->create(0,
-                                                                                          OSSIM_NORMALIZED_FLOAT);
-      copyTile->setImageRectangleAndBands(rect,
-                                          getNumberOfOutputBands());
-      copyTile->initialize();
-                                                                                          
-      ossim_int32 idx   = 0;
-      ossim_uint32 w     = rect.width();
-      ossim_uint32 h     = rect.height();
-      ossim_uint32 idxW  = 0;
-      ossim_uint32 idxH  = 0;
-      ossimIpt origin    = rect.ul();
-      ossimIpt ulPt      = rect.ul();
-      ossim_uint32 band  = 0;
-      ossim_uint32 bands = copyTile->getNumberOfBands();
-      ossim_uint32 srcBandIdx = 0;
-      std::vector<ossim_float32*> bandList(bands);
-
-      for(band = 0; band < bands; ++band)
-      {
-         bandList[band] = (ossim_float32*)copyTile->getBuf(band);
-      }
-      ossim_uint32 offset   = 0;
-      origin.y = ulPt.y;
-      for(idxH = 0; idxH < h; ++idxH)
-      {
-         origin.x = ulPt.x;
-         for(idxW = 0; idxW < w;++idxW)
-         {
-            idx = findIdx(normTileList, origin, offset);
-
-            if(idx >=0)
-            {
-               for(band = 0; band < bands; ++band)
-               {
-                  srcBandIdx = ossim::min(normTileList[idx].theTile->getNumberOfBands(), band);
-                  
-                  bandList[band][offset] = *(((ossim_float32*)normTileList[idx].theTile->getBuf(srcBandIdx))+offset);
-               }
-            }
-            ++offset;
-            ++origin.x;
-         }
-         ++origin.y;
-      }
-      theTile->copyNormalizedBufferToTile((ossim_float32*)copyTile->getBuf());
-   }
-
-   theTile->validate();
-   
-   return theTile;
-
-}
-
-ossim_int32 ossimClosestToCenterCombiner::findIdx(const std::vector<ossimClosestToCenterCombinerInfo >& normTileList,
-                                                  const ossimIpt& pt, ossim_uint32 offset)const
-{
-   ossim_float32 distance = 1000000;
-   ossim_int32 returnIdx = -1;
-   ossim_float32 tempDistance;
-   ossim_int32 idx = 0;
-   ossim_int32 maxIdx = (ossim_int32)normTileList.size();
-   ossimIpt midPt;
-   ossimIrect rect;
-   for(idx = 0; idx < maxIdx; ++ idx)
-   {
-      rect = theFullResBounds[ normTileList[idx].theIndex ];
-      midPt = rect.midPoint();
-      
-      tempDistance = (pt-midPt).length();
-      if(tempDistance < distance)
-      {
-         if(normTileList[idx].theTile->getDataObjectStatus() == OSSIM_FULL)
-         {
-            distance = tempDistance;
-            returnIdx = idx;
-         }
-         else if(!normTileList[idx].theTile->isNull(offset))
-         {
-            distance = tempDistance;
-            returnIdx = idx;
-         }
-      }
-   }
-
-   return returnIdx;
-}
diff --git a/src/ossim/imaging/ossimColorNormalizedFusion.cpp b/src/ossim/imaging/ossimColorNormalizedFusion.cpp
deleted file mode 100644
index a8c5184..0000000
--- a/src/ossim/imaging/ossimColorNormalizedFusion.cpp
+++ /dev/null
@@ -1,145 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: Color normalized fusion
-//
-//*************************************************************************
-// $Id: ossimColorNormalizedFusion.cpp 21631 2012-09-06 18:10:55Z dburken $
-
-#include <ossim/imaging/ossimColorNormalizedFusion.h>
-#include <ossim/base/ossimErrorCodes.h>
-#include <ossim/base/ossimErrorContext.h>
-#include <ossim/imaging/ossimImageData.h>
-
-RTTI_DEF1(ossimColorNormalizedFusion,
-          "ossimColorNormalizedFusion",
-          ossimFusionCombiner);
-
-ossimColorNormalizedFusion::ossimColorNormalizedFusion()
-   : ossimFusionCombiner()
-{
-}
-
-ossimColorNormalizedFusion::ossimColorNormalizedFusion(ossimObject* owner)
-   : ossimFusionCombiner(owner)
-{
-}
-
-ossimColorNormalizedFusion::~ossimColorNormalizedFusion()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimColorNormalizedFusion::getTile(
-   const ossimIrect& rect,
-   ossim_uint32 resLevel)
-{
-   ossimRefPtr<ossimImageData> inputTile = getNormTile(rect, resLevel);
-
-   if(!inputTile.valid())
-   {
-      return NULL;
-   }
-   if(!theInputConnection||!theIntensityConnection)
-   {
-      return NULL;
-   }
-   
-   if((inputTile->getDataObjectStatus() == OSSIM_NULL)||
-      (inputTile->getDataObjectStatus() == OSSIM_EMPTY))
-   {
-      return NULL;
-   }
-
-   if(theTile.valid())
-   {
-      theTile->setImageRectangleAndBands(rect, inputTile->getNumberOfBands());
-   }
-
-   
-   ossim_float32* redBuff = (ossim_float32*)inputTile->getBuf(0);
-   ossim_float32* grnBuff = (ossim_float32*)inputTile->getBuf(1);
-   ossim_float32* bluBuff = (ossim_float32*)inputTile->getBuf(2);
-
-   if(!redBuff||!grnBuff||!bluBuff)
-   {
-      return 0;
-   }
-   ossimRefPtr<ossimImageData> inputIntensity = getNormIntensity(rect, resLevel);
-
-   if((!inputIntensity.valid()) ||
-      (!inputIntensity->getBuf()) ||
-      (inputIntensity->getDataObjectStatus() == OSSIM_EMPTY))
-   {
-      return 0;
-   }
-   
-   ossim_float32* mono_buff = (ossim_float32*)inputIntensity->getBuf(0);
-
-   // Since NULL_PIX_VALUE is only used for Pix8 comparisons cast it now.
-   const float NULL_PIX_VALUE = (ossim_float32)inputIntensity->getNullPix(0);
-   const float MIN_PIX_VALUE = (ossim_float32)inputIntensity->getMinPix(0);
-   const float MAX_PIX_VALUE = (ossim_float32)inputIntensity->getMaxPix(0);
-
-   float  rgb_sum;
-   float  r_wt; // Weight of red to rgb_sum.
-   float  g_wt; // Weight of green to rgb_sum.
-   float  b_wt; // Weight of blue to rgb_sum.
-   float  iVal;
-   float  redVal;
-   float  greenVal;
-   float  blueVal;
-
-   int size = theTile->getWidth()*theTile->getHeight();
-   
-   for (int i = 0; i < size;  i++)
-   {
-      //***
-      // If no intensity source, or, no rgb source make output pixels null.
-      //***
-      if ( (mono_buff[i] == NULL_PIX_VALUE) ||
-           (redBuff[i]   == NULL_PIX_VALUE &&
-            grnBuff[i]   == NULL_PIX_VALUE &&
-            bluBuff[i]   == NULL_PIX_VALUE) )
-           
-      {
-         redBuff[i] = NULL_PIX_VALUE;
-         grnBuff[i] = NULL_PIX_VALUE;
-         bluBuff[i] = NULL_PIX_VALUE;
-      }
-      else
-      {
-         redVal    = redBuff[i];
-         greenVal  = grnBuff[i];
-         blueVal   = bluBuff[i];
-         rgb_sum   = redVal + greenVal + blueVal + 3;
-	 r_wt      = 3 * (redVal + 1)   / rgb_sum;
-	 g_wt      = 3 * (greenVal + 1) / rgb_sum;
-	 b_wt      = 3 * (blueVal + 1)  / rgb_sum;
-         iVal      = mono_buff[i] + 1;
-	 
-	 redVal    = r_wt * iVal - 1;
-         greenVal  = g_wt * iVal - 1;
-	 blueVal   = b_wt * iVal - 1;
-
-         // Clip to max pixel value of radiometry.
-         if (redVal   > MAX_PIX_VALUE) redVal   = MAX_PIX_VALUE;
-         if (greenVal > MAX_PIX_VALUE) greenVal = MAX_PIX_VALUE;
-         if (blueVal  > MAX_PIX_VALUE) blueVal  = MAX_PIX_VALUE;
-
-         // Assign chip value, clamp to min pixel value of radiometry if zero.
-         redBuff[i] = (float)(redVal>0.0 ? redVal : MIN_PIX_VALUE);
-         grnBuff[i] = (float)(greenVal>0.0 ? greenVal : MIN_PIX_VALUE);
-         bluBuff[i] = (float)(blueVal>0.0 ? blueVal : MIN_PIX_VALUE);
-      }
-   } // End of loop through pixels in chip.
-   theTile->copyNormalizedBufferToTile((float*)inputTile->getBuf());
-   theTile->validate();
-
-   return theTile;
-}
diff --git a/src/ossim/imaging/ossimConvolutionFilter1D.cpp b/src/ossim/imaging/ossimConvolutionFilter1D.cpp
deleted file mode 100644
index 0f38bea..0000000
--- a/src/ossim/imaging/ossimConvolutionFilter1D.cpp
+++ /dev/null
@@ -1,668 +0,0 @@
-//*******************************************************************
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//*************************************************************************
-// $Id: ossimConvolutionFilter1D.cpp 15833 2009-10-29 01:41:53Z eshirschorn $
-
-
-#include <ossim/imaging/ossimConvolutionFilter1D.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/base/ossimMatrixProperty.h>
-#include <ossim/base/ossimBooleanProperty.h>
-#include <ossim/base/ossimNumericProperty.h>
-
-RTTI_DEF1(ossimConvolutionFilter1D, "ossimConvolutionFilter1D", ossimImageSourceFilter);
-
-#define PROPNAME_KERNELSIZE "KernelSize"
-#define PROPNAME_KERNEL "Kernel"
-#define PROPNAME_ISHZ   "Horizontal"
-#define PROPNAME_CENTEROFFSET "CenterOffset"
-#define PROPNAME_STRICTNODATA "StrictNoData"
-
-ossimConvolutionFilter1D::ossimConvolutionFilter1D(ossimObject* owner)
-   :ossimImageSourceFilter(owner),
-    theCenterOffset(0),
-    theTile(NULL),
-    theIsHz(true),
-    theStrictNoData(true),
-    theNullPixValue(0),
-    theMinPixValue(0),
-    theMaxPixValue(0)
-{
-   //sets up an identity convolution
-   theKernel.push_back(1.0);
-}
-
-ossimConvolutionFilter1D::~ossimConvolutionFilter1D()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimConvolutionFilter1D::getTile(
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   if(!theInputConnection)
-   {
-      return theTile;
-   }
-
-   if(!isSourceEnabled())
-   {
-      return theInputConnection->getTile(tileRect, resLevel);
-   }
-
-   //---
-   // We have a 1xn or nx1 matrix, + a center offset
-   // so stretch the input rect out to cover the required pixels
-   //---
-   ossimIrect  newRect;
-   ossim_uint32 kl = (ossim_uint32)theKernel.size(); //kernel length
-   if (theIsHz)
-   {
-      //horizontal kernel (row kernel)
-      newRect = ossimIrect(ossimIpt(tileRect.ul().x - theCenterOffset,
-                                    tileRect.ul().y),
-                           ossimIpt(tileRect.lr().x - theCenterOffset + kl -1,
-                                    tileRect.lr().y));
-   } else {
-      //vertical kernel
-      newRect = ossimIrect(ossimIpt(tileRect.ul().x,
-                                    tileRect.ul().y - theCenterOffset),
-                           ossimIpt(tileRect.lr().x,
-                                    tileRect.lr().y - theCenterOffset + kl -1));
-   }
-   ossimRefPtr<ossimImageData> data = theInputConnection->getTile(newRect,
-                                                                  resLevel);
-
-   if(!data.valid() || !data->getBuf())
-   {
-      return data;
-   }
-
-    // First time through or after an initialize()...
-   if (!theTile.valid())
-   {
-      allocate();
-      if (!theTile.valid()) // Should never happen!
-      {
-         return data;
-      }
-   }
-
-   // First time through, after an initialize() or a setKernel()...
-   if (!theNullPixValue.size())
-   {
-      computeNullMinMax();
-      if (!theNullPixValue.size()) // Should never happen!
-      {
-         return data;
-      }
-   }
-
-   theTile->setImageRectangle(tileRect);
-   theTile->makeBlank();
-   
-   switch(data->getScalarType())
-   {
-      case OSSIM_UCHAR:
-      {
-         if(data->getDataObjectStatus() == OSSIM_FULL)
-         {
-            convolveFull(static_cast<ossim_uint8>(0), data, theTile);
-         }
-         else
-         {
-            convolvePartial(static_cast<ossim_uint8>(0), data, theTile);
-         }
-         break;
-      }
-      case OSSIM_FLOAT: 
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         if(data->getDataObjectStatus() == OSSIM_FULL)
-         {
-            convolveFull(static_cast<float>(0), data, theTile);
-         }
-         else
-         {
-            convolvePartial(static_cast<float>(0), data, theTile);
-         }
-         break;
-      }
-      case OSSIM_USHORT16:
-      case OSSIM_USHORT11:
-      {
-         if(data->getDataObjectStatus() == OSSIM_FULL)
-         {
-            convolveFull(static_cast<ossim_uint16>(0), data, theTile);
-         }
-         else
-         {
-            convolvePartial(static_cast<ossim_uint16>(0), data, theTile);
-         }
-         break;
-      }
-      case OSSIM_SSHORT16:
-      {
-         if(data->getDataObjectStatus() == OSSIM_FULL)
-         {
-            convolveFull(static_cast<ossim_sint16>(0), data, theTile);
-         }
-         else
-         {
-            convolvePartial(static_cast<ossim_sint16>(0), data, theTile);
-         }
-         break;
-      }
-      case OSSIM_DOUBLE:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         if(data->getDataObjectStatus() == OSSIM_FULL)
-         {
-            convolveFull(static_cast<double>(0), data, theTile);
-      }
-      else
-      {
-         convolvePartial(static_cast<double>(0), data, theTile);
-      }
-         break;
-      }
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimConvolutionFilter1D::getTile WARNING:\n"
-            << "Scalar type = " << theTile->getScalarType()
-            << " Not supported by ossimConvolutionFilter1D" << endl;
-         break;
-      }
-   }
-   theTile->validate();
-   
-   return theTile;
-}
-
-
-template<class T> void ossimConvolutionFilter1D::convolvePartial(
-   T,
-   ossimRefPtr<ossimImageData> inputData,
-   ossimRefPtr<ossimImageData> outputData)
-{
-   // there may be NULL pixels in the input
-   ossim_int32 inputW = static_cast<ossim_int32>(inputData->getWidth());
-   ossim_uint32 outputW       = outputData->getWidth();
-   ossim_uint32 outputH       = outputData->getHeight();
-   ossim_uint32 numberOfBands = inputData->getNumberOfBands();
-   
-   ossim_uint32 klength=(ossim_uint32)theKernel.size(),k;
-   ossim_int32 incrK = theIsHz ? 1 : inputW; //kernel increment in input : one col or one row
-   ossim_int32 iRow  = inputW - outputW; //jump to go to next row
-
-   double sum=0.0;
-   T* iKP; //kernel covered input pointer
-
-   ossim_int32 iCo = incrK*theCenterOffset; //center  pixel offset within the input buffer
-
-   for(ossim_uint32 band = 0; band < numberOfBands; ++band)
-   {
-      T* inputBuf  = static_cast<T*>(inputData->getBuf(band));
-      T* outputBuf = static_cast<T*>(outputData->getBuf(band));
-      T maxPix     = static_cast<T>(getMaxPixelValue(band));
-      T minPix     = static_cast<T>(getMinPixelValue(band));
-      T nullPix    = static_cast<T>(inputData->getNullPix(band));
-      T oNullPix   = static_cast<T>(getNullPixelValue(band));
-      
-      if(inputBuf&&outputBuf)
-      {
-         for(ossim_uint32 row = 0; row < outputH; ++row)
-         {
-            for(ossim_uint32 col = 0; col < outputW; ++col)
-            {
-               //center pixel may not be NULL
-               if (inputBuf[iCo] != nullPix)
-               {
-                  iKP = inputBuf; 
-                  sum = 0.0;
-                  for(k=0;k<klength;++k)
-                  {
-                     if (*iKP != nullPix) //just sum on non-NULL pixels (potential normailzation issue)
-                     {
-                        sum += theKernel[k] * (double)(*iKP);                   
-                     } else if (theStrictNoData)
-                     {
-                        break;
-                     }                     
-                     iKP += incrK;
-                  }
-                  if (k==klength)
-                  {
-                     if(sum > maxPix)
-                     {
-                        *outputBuf = maxPix;
-                     }
-                     else if(sum < minPix)
-                     {
-                        *outputBuf = minPix;
-                     }
-                     else
-                     {
-                        *outputBuf = static_cast<T>(sum);
-                     }
-                  } else {
-                     //theStrictNoData
-                     *outputBuf = oNullPix;
-                  }
-               } else {
-                  *outputBuf = oNullPix;
-               }
-               // move curent center position
-               inputBuf  += 1;
-               outputBuf += 1;
-            }
-            //move current center position
-            inputBuf  += iRow;
-            //outputBuf += 0;
-         }
-      }
-   }
-    
-   
-}
-
-template<class T> void ossimConvolutionFilter1D::convolveFull(
-   T,
-   ossimRefPtr<ossimImageData> inputData,
-   ossimRefPtr<ossimImageData> outputData)
-{
-   //inputData must be displaced according to the Kernel size and theCenterOffset +isHz
-   ossim_int32 inputW = static_cast<ossim_int32>(inputData->getWidth());
-   ossim_uint32 outputW       = outputData->getWidth();
-   ossim_uint32 outputH       = outputData->getHeight();
-   ossim_uint32 numberOfBands = inputData->getNumberOfBands();
-   
-   ossim_uint32 klength=(ossim_uint32)theKernel.size(), k;
-   ossim_int32 incrK = theIsHz ? 1 : inputW; //kernel increment in input : one col or one row
-   ossim_int32 iRow  = inputW - outputW; //jump to go to next row
-
-   double sum=0.0;
-   T* iKP; //kernel covered input pointer
-
-   for(ossim_uint32 band = 0; band < numberOfBands; ++band)
-   {
-      T* inputBuf  = static_cast<T*>(inputData->getBuf(band));
-      T* outputBuf = static_cast<T*>(outputData->getBuf(band));
-      T maxPix     = static_cast<T>(getMaxPixelValue(band));
-      T minPix     = static_cast<T>(getMinPixelValue(band));
-      
-      if(inputBuf&&outputBuf)
-      {
-         for(ossim_uint32 row = 0; row < outputH; ++row)
-         {
-            for(ossim_uint32 col = 0; col < outputW; ++col)
-            {
-               sum = 0.0;
-               iKP = inputBuf;
-               for(k=0;k<klength;++k)
-               {
-                  sum += theKernel[k] * (double)(*iKP);
-                  iKP += incrK;
-               }
-               
-               if(sum > maxPix)
-               {
-                  *outputBuf = maxPix;
-               }
-               else if(sum < minPix)
-               {
-                  *outputBuf = minPix;
-               }
-               else
-               {
-                  *outputBuf = static_cast<T>(sum);
-               }
-               // move curent center position
-               inputBuf  += 1;
-               outputBuf += 1;
-            }
-            //move current center position
-            inputBuf  += iRow;
-            //outputBuf += 0;
-         }
-      }
-   }
-}
-
-void ossimConvolutionFilter1D::initialize()
-{
-   //---
-   // NOTE:
-   // Since initialize get called often sequentially we will wipe things slick
-   // but not reallocate to avoid multiple delete/allocates.
-   //
-   // On the first getTile call things will be reallocated/computed.
-   //---
-   theTile = NULL;
-   clearNullMinMax();
-}
-
-void ossimConvolutionFilter1D::allocate()
-{   
-   if(theInputConnection)
-   {
-      ossimImageDataFactory* idf = ossimImageDataFactory::instance();
-      
-      theTile = idf->create(this,
-                            this);
-      
-      theTile->initialize();
-   }
-}
-
-void ossimConvolutionFilter1D::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property) return;
-
-   if(property->getName() == PROPNAME_KERNEL)
-   {
-      ossimMatrixProperty* matrixProperty = PTR_CAST(ossimMatrixProperty,
-                                                     property.get());
-      if(matrixProperty)
-      {
-         ossim_uint32 nc=matrixProperty->getNumberOfCols();
-         theKernel.resize(nc);
-         for(ossim_uint32 i=0;i<nc;++i)
-         {
-             theKernel[i] = (*matrixProperty)(0,i);
-         }
-         clearNullMinMax();
-      }
-      else
-      {
-         ossimImageSourceFilter::setProperty(property);
-      }
-   } else if (property->getName() == PROPNAME_ISHZ)  {
-      ossimBooleanProperty* booleanProperty = PTR_CAST(ossimBooleanProperty,
-                                                     property.get());
-      if(booleanProperty)
-      {
-         theIsHz = booleanProperty->getBoolean();
-      }
-   } else if (property->getName() == PROPNAME_STRICTNODATA)  {
-      ossimBooleanProperty* booleanProperty = PTR_CAST(ossimBooleanProperty,
-                                                     property.get());
-      if(booleanProperty)
-      {
-         theStrictNoData = booleanProperty->getBoolean();
-      }
-   } else if (property->getName() == PROPNAME_CENTEROFFSET)  {
-      ossimNumericProperty* numProperty = PTR_CAST(ossimNumericProperty,
-                                                     property.get());
-      if(numProperty)
-      {
-         theCenterOffset = numProperty->asInt32();
-      }
-   } else if (property->getName() == PROPNAME_KERNELSIZE)  {
-      ossimNumericProperty* numProperty = PTR_CAST(ossimNumericProperty,
-                                                     property.get());
-      if(numProperty)
-      {
-         theKernel.resize(numProperty->asUInt32());
-         clearNullMinMax();
-      }
-   } else {
-      ossimImageSourceFilter::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimConvolutionFilter1D::getProperty(const ossimString& name)const
-{
-   if(name == PROPNAME_KERNEL)
-   {
-      ossimMatrixProperty* property = new ossimMatrixProperty(name);
-      property->resize(1,(int)theKernel.size());
-      for(ossim_uint32 i=0;i<theKernel.size();++i)
-      {
-        (*property)(0,i) = theKernel[i];
-      }
-      property->setCacheRefreshBit();
-      return property;
-   } else if (name==PROPNAME_ISHZ) {
-      ossimBooleanProperty* property = new ossimBooleanProperty(name,theIsHz);
-      property->setCacheRefreshBit();
-      return property;
-   } else if (name==PROPNAME_STRICTNODATA) {
-      ossimBooleanProperty* property = new ossimBooleanProperty(name,theStrictNoData);
-      property->setCacheRefreshBit();
-      return property;
-   } else if (name==PROPNAME_CENTEROFFSET) {
-      ossimNumericProperty* property = new ossimNumericProperty(name,ossimString::toString(theCenterOffset));
-      property->setNumericType(ossimNumericProperty::ossimNumericPropertyType_INT); //restrict to int type
-      property->setCacheRefreshBit();
-      return property;
-   } else if (name == PROPNAME_KERNELSIZE) {
-      ossimNumericProperty* property = new ossimNumericProperty(name,ossimString::toString((ossim_uint32)theKernel.size()),1.0,100.0);
-      property->setNumericType(ossimNumericProperty::ossimNumericPropertyType_INT); //restrict to int type
-      property->setCacheRefreshBit();
-      return property;
-   }
-   return ossimImageSourceFilter::getProperty(name);
-}
-
-void ossimConvolutionFilter1D::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageSourceFilter::getPropertyNames(propertyNames);
-   propertyNames.push_back(PROPNAME_KERNELSIZE);
-   propertyNames.push_back(PROPNAME_KERNEL);
-   propertyNames.push_back(PROPNAME_CENTEROFFSET);
-   propertyNames.push_back(PROPNAME_ISHZ);
-   propertyNames.push_back(PROPNAME_STRICTNODATA);
-}
-
-bool ossimConvolutionFilter1D::saveState(ossimKeywordlist& kwl,
-                                         const char* prefix)const
-{   
-   kwl.add(prefix,
-           PROPNAME_KERNELSIZE,
-           static_cast<ossim_uint32>(theKernel.size()),
-           true);
-   kwl.add(prefix,
-          PROPNAME_CENTEROFFSET,
-           theCenterOffset,
-           true);
-   kwl.add(prefix,
-          PROPNAME_ISHZ,
-           theIsHz?"true":"false", //use string instead of boolean
-           true);
-   kwl.add(prefix,
-          PROPNAME_STRICTNODATA,
-           theStrictNoData?"true":"false", //use string instead of boolean
-           true);
-
-   for(ossim_uint32 row = 0; row < theKernel.size(); ++row)
-   {
-         ossimString newPrefix = "k" + ossimString::toString(row);
-         kwl.add(prefix,
-                 newPrefix,
-                 theKernel[row],
-                 true);          
-   }
-   
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
-
-
-bool ossimConvolutionFilter1D::loadState(const ossimKeywordlist& kwl,
-                                          const char* prefix)
-{
-   //find kernel size
-   ossim_uint32 iks=0;
-   const char* ks = kwl.find(prefix, PROPNAME_KERNELSIZE);
-   if(ks)
-   {
-      iks = ossimString(ks).toUInt32();
-      if (iks<1)
-      {
-         cerr<<"ossimConvolutionFilter1D : warning bad "<< PROPNAME_KERNELSIZE <<" in state"<<endl;
-         iks=0;
-      }
-   } else {
-      iks=0;
-      cerr<<"ossimConvolutionFilter1D : warning no "<< PROPNAME_KERNELSIZE <<" in state"<<endl;
-   }
-
-   //load other props
-   const char* co = kwl.find(prefix, PROPNAME_CENTEROFFSET);
-   if(co)
-   {      
-      setCenterOffset(ossimString(co).toUInt32());
-   } else {
-      cerr<<"ossimConvolutionFilter1D : warning no "<< PROPNAME_CENTEROFFSET<<" in state"<<endl;
-   }
-   const char* ih = kwl.find(prefix, PROPNAME_ISHZ);
-   if(ih)
-   {      
-      setIsHorizontal(ossimString(ih).toBool());
-   } else {
-      cerr<<"ossimConvolutionFilter1D : warning no "<<PROPNAME_ISHZ<<" in state"<<endl;
-   }
-   const char* sn = kwl.find(prefix, PROPNAME_STRICTNODATA);
-   if(sn)
-   {      
-      setStrictNoData(ossimString(sn).toBool());
-   } else {
-      cerr<<"ossimConvolutionFilter1D : warning no "<<PROPNAME_STRICTNODATA<<" in state"<<endl;
-   }
-   //load kernel values
-   ossimString newPrefix = prefix;
-   newPrefix += ossimString("k");
-   theKernel.resize(iks);
-   for(ossim_uint32 r=0; r<iks; ++r)
-   {      
-      ossimString value = ossimString::toString(r);
-      
-      const char* v = kwl.find(newPrefix.c_str(),
-                               value.c_str());
-      if(v)
-      {
-         theKernel[r] = ossimString(v).toDouble();
-      } else {
-         cerr<<"ossimConvolutionFilter1D : warning no value for "<<newPrefix<<" in state"<<endl;
-         theKernel[r] = 0.0;
-      }
-   }
-   clearNullMinMax();
-   
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
-
-void ossimConvolutionFilter1D::setKernel(const std::vector<ossim_float64>& aKernel)
-{
-   theKernel = aKernel;
-   // Will be recomputed first getTile call.
-   clearNullMinMax();
-}
-
-double ossimConvolutionFilter1D::getNullPixelValue(ossim_uint32 band)const
-{
-   if( isSourceEnabled() && (band < theNullPixValue.size()) )
-   {
-      return theNullPixValue[band];
-   }
-
-   return ossim::defaultNull(getOutputScalarType());
-}
-
-double ossimConvolutionFilter1D::getMinPixelValue(ossim_uint32 band)const
-{
-   if( isSourceEnabled() && (band < theMinPixValue.size()) )
-   {
-      return theMinPixValue[band];
-   }
-   
-   return ossimImageSource::getMinPixelValue(band);
-}
-
-double ossimConvolutionFilter1D::getMaxPixelValue(ossim_uint32 band)const
-{
-   if( isSourceEnabled() && (band < theMaxPixValue.size()) )
-   {
-      return theMaxPixValue[band];
-   }
-
-   return ossimImageSource::getMaxPixelValue(band);
-}
-
-void ossimConvolutionFilter1D::clearNullMinMax()
-{
-   theNullPixValue.clear();
-   theMinPixValue.clear();
-   theMaxPixValue.clear();
-}
-
-void ossimConvolutionFilter1D::computeNullMinMax()
-{
-   const ossim_uint32 BANDS = getNumberOfOutputBands();
-
-   theNullPixValue.resize(BANDS);
-   theMinPixValue.resize(BANDS);
-   theMaxPixValue.resize(BANDS);
-
-   ossim_float64 defaultNull = ossim::defaultNull(getOutputScalarType());
-   ossim_float64 defaultMin = ossim::defaultMin(getOutputScalarType());
-   ossim_float64 defaultMax = ossim::defaultMax(getOutputScalarType());
-  
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      if(theInputConnection)
-      {
-         ossim_float64 inputNull = theInputConnection->getNullPixelValue(band);
-         ossim_float64 inputMin  = theInputConnection->getMinPixelValue(band);
-         ossim_float64 inputMax  = theInputConnection->getMaxPixelValue(band);
-         ossim_float64 tempMin   = 0.0;
-         ossim_float64 tempMax   = 0.0;
-         ossim_float64 k         = 0.0;
-         for(ossim_uint32 i=0;i<theKernel.size();++i)
-         {          
-               k=theKernel[i];
-               tempMin += (k<0.0) ? k*inputMax : k*inputMin;
-               tempMax += (k>0.0) ? k*inputMax : k*inputMin;          
-         }
-         
-         if((tempMin >= defaultMin) && (tempMin <= defaultMax))
-         {
-            theMinPixValue[band] = tempMin;
-         }
-         else
-         {
-            theMinPixValue[band] = defaultMin;
-         }
-
-         if((tempMax >= defaultMin) && (tempMax <= defaultMax))
-         {
-            theMaxPixValue[band] = tempMax;
-         }
-         else
-         {
-            theMaxPixValue[band] = defaultMax;
-         }
-         if((inputNull < theMinPixValue[band]) ||
-            (inputNull > theMaxPixValue[band]))
-         {
-            theNullPixValue[band] = inputNull;
-         }
-         else
-         {
-            theNullPixValue[band] = defaultNull;
-         }
-         
-      }
-      else // No input connection...
-      {
-         theNullPixValue[band] = defaultNull;
-         theMinPixValue[band]  = defaultMin;
-         theMaxPixValue[band]  = defaultMax;
-      }
-      
-   } // End of band loop.
-}
diff --git a/src/ossim/imaging/ossimConvolutionSource.cpp b/src/ossim/imaging/ossimConvolutionSource.cpp
deleted file mode 100644
index 722f826..0000000
--- a/src/ossim/imaging/ossimConvolutionSource.cpp
+++ /dev/null
@@ -1,526 +0,0 @@
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimConvolutionSource.cpp 18602 2010-12-28 05:49:36Z gpotts $
-
-#include <ossim/imaging/ossimConvolutionSource.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimDiscreteConvolutionKernel.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeyword.h>
-
-static const ossimKeyword NUMBER_OF_MATRICES = ossimKeyword("number_of_matrices", "");
-static const ossimKeyword NUMBER_OF_ROWS = ossimKeyword("rows", "");
-static const ossimKeyword NUMBER_OF_COLS = ossimKeyword("cols", "");
-
-RTTI_DEF1(ossimConvolutionSource, "ossimConvolutionSource", ossimImageSourceFilter);
-
-ossimConvolutionSource::ossimConvolutionSource()
-   : ossimImageSourceFilter(),
-     theTile(NULL)
-{
-}
-
-ossimConvolutionSource::ossimConvolutionSource(ossimImageSource* inputSource,
-                                               const NEWMAT::Matrix& convolutionMatrix)
-   : ossimImageSourceFilter(inputSource),
-     theTile(NULL)
-{
-   theConvolutionKernelList.push_back(new ossimDiscreteConvolutionKernel(convolutionMatrix));
-   setKernelInformation();
-   initialize();
-}
-
-ossimConvolutionSource::ossimConvolutionSource(ossimImageSource* inputSource,
-                                               const vector<NEWMAT::Matrix>& convolutionList)
-   : ossimImageSourceFilter(inputSource),
-     theTile(NULL)
-{
-   setConvolutionList(convolutionList);
-}
-
-ossimConvolutionSource::~ossimConvolutionSource()
-{
-   deleteConvolutionList();
-}
-
-void ossimConvolutionSource::setConvolution(const double* kernel,
-                                            int nrows,
-                                            int ncols,
-                                            bool doWeightedAverage)
-{
-   NEWMAT::Matrix m(nrows, ncols);
-   const double* tempPtr = kernel;
-   for(int row = 0; row < nrows; ++row)
-   {
-      for(int col = 0; col < ncols; ++col)
-      {
-         m[row][col] =*tempPtr;
-         ++tempPtr;
-      }
-   }
-   
-   setConvolution(m, doWeightedAverage);
-}
-
-void ossimConvolutionSource::setConvolutionList(const vector<NEWMAT::Matrix>& convolutionList,
-                                                bool doWeightedAverage)
-{
-   deleteConvolutionList();
-   ossim_uint32 idx;
-   for(idx = 0; idx < convolutionList.size(); ++idx)
-   {
-      theConvolutionKernelList.push_back(new ossimDiscreteConvolutionKernel(convolutionList[idx],
-                                                                            doWeightedAverage));
-   }
-
-   setKernelInformation();
-}
-
-ossimRefPtr<ossimImageData> ossimConvolutionSource::getTile(
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   if(!theInputConnection) return ossimRefPtr<ossimImageData>();
-
-   if((!isSourceEnabled())||
-      (theConvolutionKernelList.size() < 1))
-   {
-      return theInputConnection->getTile(tileRect, resLevel);
-   }
-   
-   if(!theTile.valid())
-   {
-      allocate();
-      if(!theTile.valid())  // Throw exception???
-      {
-         return theInputConnection->getTile(tileRect, resLevel);
-      }
-   }
-   
-   ossim_uint32 w  = tileRect.width();
-   ossim_uint32 h  = tileRect.height();
-   ossim_uint32 tw = theTile->getWidth();
-   ossim_uint32 th = theTile->getHeight();
-   theTile->setWidth(w);
-   theTile->setHeight(h);
-   if((w*h)!=(tw*th))
-   {
-      theTile->initialize();
-      theTile->makeBlank();
-   }
-   else
-   {
-      theTile->makeBlank();
-   }
-   theTile->setOrigin(tileRect.ul());
-   long offsetX = (theMaxKernelWidth)/2;
-   long offsetY = (theMaxKernelHeight)/2;
-   ossimIrect requestRect(tileRect.ul().x - offsetX,
-                          tileRect.ul().y - offsetY,
-                          tileRect.lr().x + offsetX,
-                          tileRect.lr().y + offsetY);
-   
-   ossimRefPtr<ossimImageData> input = theInputConnection->getTile(requestRect,
-                                                                   resLevel);
-
-   if(!input.valid() ||
-      (input->getDataObjectStatus() == OSSIM_NULL)||
-      (input->getDataObjectStatus() == OSSIM_EMPTY))
-   {
-      return input;
-   }
-   switch(theTile->getScalarType())
-   {
-   case OSSIM_UCHAR:
-   {
-      if(theConvolutionKernelList.size() == 1)
-      {
-         convolve(static_cast<ossim_uint8>(0),
-                  input,
-                  theConvolutionKernelList[0]);
-      }
-      else
-      {
-         ossim_uint32 upperBound = (ossim_uint32)theConvolutionKernelList.size();
-         ossim_uint32 idx;
-         for(idx = 0; idx < upperBound; ++idx)
-         {
-            convolve(static_cast<ossim_uint8>(0),
-                     input,
-                     theConvolutionKernelList[idx]);
-            input->loadTile(theTile.get());
-         }
-      }
-      break;
-   }
-   case OSSIM_USHORT16:
-   case OSSIM_USHORT11:
-   {
-      if(theConvolutionKernelList.size() == 1)
-      {
-         convolve(static_cast<ossim_uint16>(0),
-                  input,
-                  theConvolutionKernelList[0]);
-      }
-      else
-      {
-         ossim_uint32 upperBound = (ossim_uint32)theConvolutionKernelList.size();
-         ossim_uint32 idx;
-         for(idx = 0; idx < upperBound; ++idx)
-         {
-            convolve(static_cast<ossim_uint16>(0),
-                     input,
-                     theConvolutionKernelList[idx]);
-            input->loadTile(theTile.get());
-         }
-      }
-      break;
-   }
-   case OSSIM_SSHORT16:
-   {
-      if(theConvolutionKernelList.size() == 1)
-      {
-         convolve(static_cast<ossim_sint16>(0),
-                  input,
-                  theConvolutionKernelList[0]);
-      }
-      else
-      {
-         ossim_uint32 upperBound = (ossim_uint32)theConvolutionKernelList.size();
-         ossim_uint32 idx;
-         for(idx = 0; idx < upperBound; ++idx)
-         {
-            convolve(static_cast<ossim_sint16>(0),
-                     input,
-                     theConvolutionKernelList[idx]);
-            input->loadTile(theTile.get());
-         }
-      }
-      break;
-   }
-   case OSSIM_FLOAT:
-   case OSSIM_NORMALIZED_FLOAT:
-   {
-      if(theConvolutionKernelList.size() == 1)
-      {
-         convolve(static_cast<float>(0),
-                  input,
-                  theConvolutionKernelList[0]);
-      }
-      else
-      {
-         ossim_uint32 upperBound = (ossim_uint32)theConvolutionKernelList.size();
-         ossim_uint32 idx;
-         for(idx = 0; idx < upperBound; ++idx)
-         {
-            convolve(static_cast<float>(0),
-                     input,
-                     theConvolutionKernelList[idx]);
-            input->loadTile(theTile.get());
-         }
-      }
-      break;
-   }
-   case OSSIM_DOUBLE:
-   case OSSIM_NORMALIZED_DOUBLE:
-   {
-      if(theConvolutionKernelList.size() == 1)
-      {
-         convolve(static_cast<double>(0),
-                  input,
-                  theConvolutionKernelList[0]);
-      }
-      else
-      {
-         ossim_uint32 upperBound = (ossim_uint32)theConvolutionKernelList.size();
-         ossim_uint32 idx;
-         for(idx = 0; idx < upperBound; ++idx)
-         {
-            convolve(static_cast<double>(0),
-                     input,
-                     theConvolutionKernelList[idx]);
-            input->loadTile(theTile.get());
-         }
-      }
-      break;
-   }
-   default:
-   {
-      theTile->loadTile(input.get());
-   }
-   }
-   theTile->validate();
-   return theTile;
-}
-   
-template <class T>
-void ossimConvolutionSource::convolve(T /* dummyVariable */,
-                                      ossimRefPtr<ossimImageData> inputTile,
-                                      ossimDiscreteConvolutionKernel* kernel)
-{
-   ossimIpt startOrigin   = theTile->getOrigin();
-
-   // Make sure that the patch is not empty or NULL
-   //
-   ossimIpt startDelta(startOrigin.x - inputTile->getOrigin().x,
-                       startOrigin.y - inputTile->getOrigin().y);
-
-   ossimDataObjectStatus status = inputTile->getDataObjectStatus();
-   // let's setup some variables that we will need to do the
-   // convolution algorithm.
-   //
-   ossimIrect patchRect   = inputTile->getImageRectangle();
-   long tileHeight        = theTile->getHeight();
-   long tileWidth         = theTile->getWidth();
-   long outputBands       = theTile->getNumberOfBands();
-   long convolutionWidth  = kernel->getWidth();
-   long convolutionHeight = kernel->getHeight();
-   long convolutionOffsetX= convolutionWidth/2;
-   long convolutionOffsetY= convolutionHeight/2;
-   long patchWidth        = patchRect.width();
-   long convolutionTopLeftOffset = 0;
-   long convolutionCenterOffset  = 0;
-   
-   long outputOffset          = 0;
-   T np = 0;
-   
-   const double minPix  = ossim::defaultMin(getOutputScalarType());
-   const double maxPix  = ossim::defaultMax(getOutputScalarType());
-//   const double* maxPix  = inputTile->getMaxPix();
-   const double* nullPix = inputTile->getNullPix();
-   double convolveResult = 0;
-   
-   if(status == OSSIM_PARTIAL) // must check for NULLS
-   {
-      for(long y = 0; y <tileHeight; y++)
-      {
-         convolutionCenterOffset  = patchWidth*(startDelta.y + y) + startDelta.x;
-         convolutionTopLeftOffset = patchWidth*(startDelta.y + y - convolutionOffsetY) + startDelta.x-convolutionOffsetX;
-         
-         for(long x =0; x < tileWidth; x++)
-         {
-            if(!inputTile->isNull(convolutionCenterOffset))
-            {
-               for(long b = 0; b < outputBands; ++b)
-               {
-                  T* buf    = (T*)(inputTile->getBuf(b)) + convolutionTopLeftOffset;
-                  T* outBuf = (T*)(theTile->getBuf(b));
-                  kernel->convolveSubImage(buf,
-                                           patchWidth,
-                                           convolveResult,
-                                           (T)nullPix[b]);
-
-                  convolveResult = convolveResult < minPix? minPix:convolveResult;
-                  convolveResult = convolveResult > maxPix? maxPix:convolveResult;
-                  
-                  outBuf[outputOffset] = (T)convolveResult;
-               }
-            }
-            else
-            {
-               theTile->setNull(outputOffset);
-               
-            }
-            ++convolutionCenterOffset;
-            ++convolutionTopLeftOffset;
-            ++outputOffset;
-         }
-      }
-   }
-   else  // do not need to check for nulls here.
-   {
-      for(long b = 0; b < outputBands; ++b)
-      {                  
-         double convolveResult = 0;
-         const T* buf = (const T*)inputTile->getBuf(b);
-         T* outBuf    = (T*)(theTile->getBuf(b));
-         np =(T)nullPix[b];
-         outputOffset = 0;
-         
-         for(long y = 0; y <tileHeight; y++)
-         {
-            convolutionTopLeftOffset = patchWidth*(startDelta.y + y - convolutionOffsetY) + startDelta.x-convolutionOffsetX;
-            
-            for(long x =0; x < tileWidth; x++)
-            {
-               kernel->convolveSubImage(&buf[convolutionTopLeftOffset],
-                                        patchWidth,
-                                        convolveResult,
-                                        np);
-// NOT SURE IF I WANT TO CLAMP IN A CONVOLUTION SOURCE  
-// seems better to clamp to a scalar range instead of an input min max
-               convolveResult = convolveResult < minPix? (T)minPix:convolveResult;
-               convolveResult = convolveResult > maxPix?(T)maxPix:convolveResult;
-               outBuf[outputOffset] = (T)convolveResult;
-               ++outputOffset;
-               ++convolutionTopLeftOffset;
-            }
-         }
-      }
-   }
-}
-
-void ossimConvolutionSource::initialize()
-{
-   ossimImageSourceFilter::initialize();
-   theTile = NULL;
-}
-
-void ossimConvolutionSource::allocate()
-{
-   if(theInputConnection)
-   {
-      theTile = ossimImageDataFactory::instance()->create(this,
-                                                          theInputConnection);
-      theTile->initialize();
-   }
-}
-
-bool ossimConvolutionSource::saveState(ossimKeywordlist& kwl,
-                                       const char* prefix)const
-{
-   ossim_uint32 numberOfMatrices = 0;
-   for(ossim_uint32 m = 0; m < theConvolutionKernelList.size();++m)
-   {
-      if(theConvolutionKernelList[m])
-      {
-         ++numberOfMatrices;
-         const NEWMAT::Matrix& kernel = theConvolutionKernelList[m]->getKernel();
-         ossimString mPrefix = "m" +
-                               ossimString::toString(numberOfMatrices) +
-                               ".";
-         kwl.add(prefix,
-                 (mPrefix + "rows").c_str(),
-                 kernel.Nrows(),
-                 true);
-         
-         kwl.add(prefix,
-                 (mPrefix + "cols").c_str(),
-                 kernel.Ncols(),
-                 true);
-         
-         for(ossim_int32 row = 0; row < kernel.Nrows(); ++row)
-         {
-            for(ossim_int32 col =0; col < kernel.Ncols(); ++col)
-            {
-               ossimString newPrefix = mPrefix +
-                                       ossimString::toString(row+1) + "_" +
-                                       ossimString::toString(col+1);
-               kwl.add(prefix,
-                       newPrefix,
-                       kernel[row][col],
-                       true);          
-            }
-         }
-      }
-   }
-
-   
-   kwl.add(prefix,
-           NUMBER_OF_MATRICES,
-           numberOfMatrices,
-           true);
-      
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
-
-
-bool ossimConvolutionSource::loadState(const ossimKeywordlist& kwl,
-                                       const char* prefix)
-{
-   deleteConvolutionList();
-
-   const char* numberOfMatrices = kwl.find(prefix, NUMBER_OF_MATRICES);
-
-   ossim_int32 matrixCount = ossimString(numberOfMatrices).toLong();
-   ossim_int32 numberOfMatches = 0;
-   ossim_int32 index = 0;
-   while(numberOfMatches < matrixCount)
-   {
-      ossimString newPrefix = prefix;
-      newPrefix += ossimString("m");
-      newPrefix += ossimString::toString(index);
-      newPrefix += ossimString(".");
-
-      const char* rows = kwl.find((newPrefix+NUMBER_OF_ROWS.key()).c_str());
-      const char* cols = kwl.find((newPrefix+NUMBER_OF_COLS.key()).c_str());
-
-      if(rows&&cols)
-      {
-         ++numberOfMatches;
-         ossim_int32 numberOfRows = ossimString(rows).toLong();
-         ossim_int32 numberOfCols = ossimString(cols).toLong();
-         NEWMAT::Matrix convolutionMatrix(numberOfRows, numberOfCols);
-         
-         
-         for(ossim_int32 r = 1; r <= numberOfRows; r++)
-         {
-            for(ossim_int32 c = 1; c <= numberOfCols; c++)
-            {
-               convolutionMatrix[r-1][c-1] = 0.0;
-               
-               ossimString value = ossimString::toString(r);
-               value += "_";
-               value += ossimString::toString(c);
-
-               const char* v = kwl.find(newPrefix.c_str(),
-                                        value.c_str());
-               if(v)
-               {
-                  convolutionMatrix[r-1][c-1] = ossimString(v).toDouble();
-               }
-            }
-         }
-         theConvolutionKernelList.push_back(new ossimDiscreteConvolutionKernel(convolutionMatrix));
-      }
-      ++index;
-   }
-   setKernelInformation();
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
-
-void ossimConvolutionSource::setKernelInformation()
-{
-   ossim_uint32 index;
-   
-   if(theConvolutionKernelList.size() > 0)
-   {
-      theMaxKernelWidth  = theConvolutionKernelList[0]->getWidth();
-      theMaxKernelHeight = theConvolutionKernelList[0]->getHeight();
-      
-      for(index = 1; index < theConvolutionKernelList.size(); ++index)
-      {
-         ossim_int32 w = theConvolutionKernelList[index]->getWidth();
-         ossim_int32 h = theConvolutionKernelList[index]->getHeight();
-         theMaxKernelWidth  = theMaxKernelWidth < w?w:theMaxKernelWidth;
-         theMaxKernelHeight = theMaxKernelHeight < h?h:theMaxKernelHeight;
-      }
-   }
-}
-
-void ossimConvolutionSource::deleteConvolutionList()
-{
-   for(ossim_int32 index = 0; index < (ossim_int32)theConvolutionKernelList.size(); ++index)
-   {
-      delete theConvolutionKernelList[index];
-   }
-
-   theConvolutionKernelList.clear();
-}
-
-void ossimConvolutionSource::setConvolution(const NEWMAT::Matrix& convolutionMatrix, bool doWeightedAverage)
-{
-   std::vector<NEWMAT::Matrix> m;
-   
-   m.push_back(convolutionMatrix);
-   
-   setConvolutionList(m, doWeightedAverage);
-}
diff --git a/src/ossim/imaging/ossimDdffielddefn.cpp b/src/ossim/imaging/ossimDdffielddefn.cpp
deleted file mode 100644
index 18d96f7..0000000
--- a/src/ossim/imaging/ossimDdffielddefn.cpp
+++ /dev/null
@@ -1,866 +0,0 @@
-/******************************************************************************
- * Copied from "gdal" project. See licence below.
- *
- * Project:  ISO 8211 Access
- * Purpose:  Implements the DDFFieldDefn class.
- * Author:   Frank Warmerdam, warmerdam at pobox.com
- *
- ******************************************************************************
- * Copyright (c) 1999, Frank Warmerdam
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- ******************************************************************************
- * $Id: ossimDdffielddefn.cpp 15833 2009-10-29 01:41:53Z eshirschorn $
- */
-
-#include <cstring>
-#include <ossim/imaging/ossimIso8211.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimCplUtil.h>
-#include <ossim/base/ossimTrace.h>
-#include <ctype.h>
-
-// Static trace for debugging
-static ossimTrace traceDebug("ossimDDFFieldDefn:debug");
-
-
-/************************************************************************/
-/*                            DDFFieldDefn()                            */
-/************************************************************************/
-
-ossimDDFFieldDefn::ossimDDFFieldDefn()
-
-{
-    poModule = NULL;
-    pszTag = NULL;
-    _fieldName = NULL;
-    _arrayDescr = NULL;
-    _formatControls = NULL;
-    nSubfieldCount = 0;
-    papoSubfields = NULL;
-    bRepeatingSubfields = false;
-    nFixedWidth = 0;
-}
-
-/************************************************************************/
-/*                           ~DDFFieldDefn()                            */
-/************************************************************************/
-
-ossimDDFFieldDefn::~ossimDDFFieldDefn()
-
-{
-    int   i;
-
-    free( pszTag );
-    free( _fieldName );
-    free( _arrayDescr );
-    free( _formatControls );
-
-    for( i = 0; i < nSubfieldCount; i++ )
-        delete papoSubfields[i];
-    free( papoSubfields );
-}
-
-/************************************************************************/
-/*                            AddSubfield()                             */
-/************************************************************************/
-
-void ossimDDFFieldDefn::AddSubfield( const char *pszName, 
-                                const char *pszFormat )
-
-{
-    ossimDDFSubfieldDefn *poSFDefn = new ossimDDFSubfieldDefn;
-
-    poSFDefn->SetName( pszName );
-    poSFDefn->SetFormat( pszFormat );
-    AddSubfield( poSFDefn );
-}
-
-/************************************************************************/
-/*                            AddSubfield()                             */
-/************************************************************************/
-
-void ossimDDFFieldDefn::AddSubfield( ossimDDFSubfieldDefn *poNewSFDefn,
-                                int bDontAddToFormat )
-
-{
-    nSubfieldCount++;
-    papoSubfields = (ossimDDFSubfieldDefn ** )
-        realloc( papoSubfields, sizeof(void*) * nSubfieldCount );
-    papoSubfields[nSubfieldCount-1] = poNewSFDefn;
-    
-    if( bDontAddToFormat )
-        return;
-
-/* -------------------------------------------------------------------- */
-/*      Add this format to the format list.  We don't bother            */
-/*      aggregating formats here.                                       */
-/* -------------------------------------------------------------------- */
-    if( _formatControls == NULL || strlen(_formatControls) == 0 )
-    {
-        free( _formatControls );
-        _formatControls = strdup( "()" );
-    }
-    
-    int nOldLen = (int)strlen(_formatControls);
-    
-    char *pszNewFormatControls = (char *) 
-        malloc(nOldLen+3+strlen(poNewSFDefn->GetFormat()));
-    
-    strcpy( pszNewFormatControls, _formatControls );
-    pszNewFormatControls[nOldLen-1] = '\0';
-    if( pszNewFormatControls[nOldLen-2] != '(' )
-        strcat( pszNewFormatControls, "," );
-    
-    strcat( pszNewFormatControls, poNewSFDefn->GetFormat() );
-    strcat( pszNewFormatControls, ")" );
-    
-    free( _formatControls );
-    _formatControls = pszNewFormatControls;
-
-/* -------------------------------------------------------------------- */
-/*      Add the subfield name to the list.                              */
-/* -------------------------------------------------------------------- */
-    if( _arrayDescr == NULL )
-        _arrayDescr = strdup("");
-
-    _arrayDescr = (char *) 
-        realloc(_arrayDescr, 
-                   strlen(_arrayDescr)+strlen(poNewSFDefn->GetName())+2);
-    if( strlen(_arrayDescr) > 0 )
-        strcat( _arrayDescr, "!" );
-    strcat( _arrayDescr, poNewSFDefn->GetName() );
-}
-
-/************************************************************************/
-/*                               Create()                               */
-/*                                                                      */
-/*      Initialize a new field defn from application input, instead     */
-/*      of from an existing file.                                       */
-/************************************************************************/
-
-int ossimDDFFieldDefn::Create( const char *pszTag, const char *pszFieldName, 
-                          const char *pszDescription, 
-                          DDF_data_struct_code eDataStructCode,
-                          DDF_data_type_code   eDataTypeCode,
-                          const char *pszFormat )
-
-{
-   // assert( this->pszTag == NULL );
-   poModule = NULL;
-   this->pszTag = strdup( pszTag );
-   _fieldName = strdup( pszFieldName );
-   _arrayDescr = strdup( pszDescription );
-   _formatControls = strdup( "" );
-   
-   _data_struct_code = eDataStructCode;
-   _data_type_code = eDataTypeCode;
-   
-   if( pszFormat != NULL )
-      _formatControls = strdup( pszFormat );
-   
-   if( pszDescription != NULL && *pszDescription == '*' )
-      bRepeatingSubfields = true;
-   
-   return true;
-}
-
-/************************************************************************/
-/*                          GenerateDDREntry()                          */
-/************************************************************************/
-
-int ossimDDFFieldDefn::GenerateDDREntry( char **ppachData, 
-                                    int *pnLength )
-
-{
-    *pnLength = 9 + (int)strlen(_fieldName) + 1 
-        + (int)strlen(_arrayDescr) + 1
-        + (int)strlen(_formatControls) + 1;
-
-    if( strlen(_formatControls) == 0 )
-        *pnLength -= 1;
-
-    if( ppachData == NULL )
-        return true;
-
-    *ppachData = (char *) malloc( *pnLength+1 );
-    
-    if( _data_struct_code == dsc_elementary )
-        (*ppachData)[0] = '0';
-    else if( _data_struct_code == dsc_vector )
-        (*ppachData)[0] = '1';
-    else if( _data_struct_code == dsc_array )
-        (*ppachData)[0] = '2';
-    else if( _data_struct_code == dsc_concatenated )
-        (*ppachData)[0] = '3';
-    
-    if( _data_type_code == dtc_char_string )
-        (*ppachData)[1] = '0';
-    else if( _data_type_code == dtc_implicit_point )
-        (*ppachData)[1] = '1';
-    else if( _data_type_code == dtc_explicit_point )
-        (*ppachData)[1] = '2';
-    else if( _data_type_code == dtc_explicit_point_scaled )
-        (*ppachData)[1] = '3';
-    else if( _data_type_code == dtc_char_bit_string )
-        (*ppachData)[1] = '4';
-    else if( _data_type_code == dtc_bit_string )
-        (*ppachData)[1] = '5';
-    else if( _data_type_code == dtc_mixed_data_type )
-        (*ppachData)[1] = '6';
-
-    (*ppachData)[2] = '0';
-    (*ppachData)[3] = '0';
-    (*ppachData)[4] = ';';
-    (*ppachData)[5] = '&';
-    (*ppachData)[6] = ' ';
-    (*ppachData)[7] = ' ';
-    (*ppachData)[8] = ' ';
-    sprintf( *ppachData + 9, "%s%c%s", 
-             _fieldName, OSSIM_DDF_UNIT_TERMINATOR, _arrayDescr );
-
-    if( strlen(_formatControls) > 0 )
-        sprintf( *ppachData + strlen(*ppachData), "%c%s",
-                 OSSIM_DDF_UNIT_TERMINATOR, _formatControls );
-    sprintf( *ppachData + strlen(*ppachData), "%c", OSSIM_DDF_FIELD_TERMINATOR );
-
-    return true;
-}
-
-/************************************************************************/
-/*                             Initialize()                             */
-/*                                                                      */
-/*      Initialize the field definition from the information in the     */
-/*      DDR record.  This is called by DDFModule::Open().               */
-/************************************************************************/
-
-int ossimDDFFieldDefn::Initialize( ossimDDFModule * poModuleIn,
-                              const char * pszTagIn, 
-                              int nFieldEntrySize,
-                              const char * pachFieldArea )
-
-{
-    int         iFDOffset = poModuleIn->GetFieldControlLength();
-    int         nCharsConsumed;
-
-    poModule = poModuleIn;
-    
-    pszTag = strdup( pszTagIn );
-
-/* -------------------------------------------------------------------- */
-/*      Set the data struct and type codes.                             */
-/* -------------------------------------------------------------------- */
-    switch( pachFieldArea[0] )
-    {
-      case '0':
-        _data_struct_code = dsc_elementary;
-        break;
-
-      case '1':
-        _data_struct_code = dsc_vector;
-        break;
-
-      case '2':
-        _data_struct_code = dsc_array;
-        break;
-
-      case '3':
-        _data_struct_code = dsc_concatenated;
-        break;
-
-      default:
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "Unrecognised data_struct_code value %c.\n"
-               << "Field %s initialization incorrect.\n"
-               << pachFieldArea[0]
-               << pszTag
-               << std::endl;
-         }
-        _data_struct_code = dsc_elementary;
-    }
-
-    switch( pachFieldArea[1] )
-    {
-      case '0':
-        _data_type_code = dtc_char_string;
-        break;
-        
-      case '1':
-        _data_type_code = dtc_implicit_point;
-        break;
-        
-      case '2':
-        _data_type_code = dtc_explicit_point;
-        break;
-        
-      case '3':
-        _data_type_code = dtc_explicit_point_scaled;
-        break;
-        
-      case '4':
-        _data_type_code = dtc_char_bit_string;
-        break;
-        
-      case '5':
-        _data_type_code = dtc_bit_string;
-        break;
-        
-      case '6':
-        _data_type_code = dtc_mixed_data_type;
-        break;
-
-      default:
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "Unrecognised data_type_code value %c.\n"
-               << "Field %s initialization incorrect.\n"
-               << pachFieldArea[1] << pszTag << std::endl;
-         }
-        _data_type_code = dtc_char_string;
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      Capture the field name, description (sub field names), and      */
-/*      format statements.                                              */
-/* -------------------------------------------------------------------- */
-
-    _fieldName =
-        ossimDDFFetchVariable( pachFieldArea + iFDOffset,
-                          nFieldEntrySize - iFDOffset,
-                          OSSIM_DDF_UNIT_TERMINATOR,
-                          OSSIM_DDF_FIELD_TERMINATOR,
-                          &nCharsConsumed );
-    iFDOffset += nCharsConsumed;
-    
-    _arrayDescr =
-        ossimDDFFetchVariable( pachFieldArea + iFDOffset,
-                               nFieldEntrySize - iFDOffset,
-                               OSSIM_DDF_UNIT_TERMINATOR,
-                               OSSIM_DDF_FIELD_TERMINATOR, 
-                               &nCharsConsumed );
-    iFDOffset += nCharsConsumed;
-    
-    _formatControls =
-        ossimDDFFetchVariable( pachFieldArea + iFDOffset,
-                               nFieldEntrySize - iFDOffset,
-                               OSSIM_DDF_UNIT_TERMINATOR,
-                               OSSIM_DDF_FIELD_TERMINATOR, 
-                               &nCharsConsumed );
-    
-/* -------------------------------------------------------------------- */
-/*      Parse the subfield info.                                        */
-/* -------------------------------------------------------------------- */
-    if( _data_struct_code != dsc_elementary )
-    {
-        if( !BuildSubfields() )
-            return false;
-
-        if( !ApplyFormats() )
-            return false;
-    }
-    
-    return true;
-}
-
-/************************************************************************/
-/*                                Dump()                                */
-/************************************************************************/
-
-/**
- * Write out field definition info to debugging file.
- *
- * A variety of information about this field definition, and all it's
- * subfields is written to the give debugging file handle.
- *
- * @param fp The standard io file handle to write to.  ie. stderr
- */
-
-void ossimDDFFieldDefn::Dump( FILE * fp )
-
-{
-    const char  *pszValue = "";
-    
-    fprintf( fp, "  DDFFieldDefn:\n" );
-    fprintf( fp, "      Tag = `%s'\n", pszTag );
-    fprintf( fp, "      _fieldName = `%s'\n", _fieldName );
-    fprintf( fp, "      _arrayDescr = `%s'\n", _arrayDescr );
-    fprintf( fp, "      _formatControls = `%s'\n", _formatControls );
-
-    switch( _data_struct_code )
-    {
-      case dsc_elementary:
-        pszValue = "elementary";
-        break;
-        
-      case dsc_vector:
-        pszValue = "vector";
-        break;
-        
-      case dsc_array:
-        pszValue = "array";
-        break;
-        
-      case dsc_concatenated:
-        pszValue = "concatenated";
-        break;
-        
-      default:
-         // assert( false );
-        pszValue = "(unknown)";
-    }
-
-    fprintf( fp, "      _data_struct_code = %s\n", pszValue );
-
-    switch( _data_type_code )
-    {
-      case dtc_char_string:
-        pszValue = "char_string";
-        break;
-        
-      case dtc_implicit_point:
-        pszValue = "implicit_point";
-        break;
-        
-      case dtc_explicit_point:
-        pszValue = "explicit_point";
-        break;
-        
-      case dtc_explicit_point_scaled:
-        pszValue = "explicit_point_scaled";
-        break;
-        
-      case dtc_char_bit_string:
-        pszValue = "char_bit_string";
-        break;
-        
-      case dtc_bit_string:
-        pszValue = "bit_string";
-        break;
-        
-      case dtc_mixed_data_type:
-        pszValue = "mixed_data_type";
-        break;
-
-      default:
-         // assert( false );
-        pszValue = "(unknown)";
-        break;
-    }
-    
-    fprintf( fp, "      _data_type_code = %s\n", pszValue );
-
-    for( int i = 0; i < nSubfieldCount; i++ )
-        papoSubfields[i]->Dump( fp );
-}
-
-/************************************************************************/
-/*                           BuildSubfields()                           */
-/*                                                                      */
-/*      Based on the _arrayDescr build a set of subfields.              */
-/************************************************************************/
-
-int ossimDDFFieldDefn::BuildSubfields()
-
-{
-    char        **papszSubfieldNames;
-    const char  *pszSublist = _arrayDescr;
-
-    if( pszSublist[0] == '*' )
-    {
-        bRepeatingSubfields = true;
-        pszSublist++;
-    }
-
-    papszSubfieldNames = ossimCSLTokenizeStringComplex( pszSublist, "!",
-                                                   false, false );
-
-    int nSFCount = ossimCSLCount( papszSubfieldNames );
-    for( int iSF = 0; iSF < nSFCount; iSF++ )
-    {
-        ossimDDFSubfieldDefn *poSFDefn = new ossimDDFSubfieldDefn;
-        
-        poSFDefn->SetName( papszSubfieldNames[iSF] );
-        AddSubfield( poSFDefn, true );
-    }
-
-    ossimCSLDestroy( papszSubfieldNames );
-
-    return true;
-}
-
-/************************************************************************/
-/*                          ExtractSubstring()                          */
-/*                                                                      */
-/*      Extract a substring terminated by a comma (or end of            */
-/*      string).  Commas in brackets are ignored as terminated with     */
-/*      bracket nesting understood gracefully.  If the returned         */
-/*      string would being and end with a bracket then strip off the    */
-/*      brackets.                                                       */
-/*                                                                      */
-/*      Given a string like "(A,3(B,C),D),X,Y)" return "A,3(B,C),D".    */
-/*      Give a string like "3A,2C" return "3A".                         */
-/************************************************************************/
-
-char *ossimDDFFieldDefn::ExtractSubstring( const char * pszSrc )
-
-{
-    int         nBracket=0, i;
-    char        *pszReturn;
-
-    for( i = 0;
-         pszSrc[i] != '\0' && (nBracket > 0 || pszSrc[i] != ',');
-         i++ )
-    {
-        if( pszSrc[i] == '(' )
-            nBracket++;
-        else if( pszSrc[i] == ')' )
-            nBracket--;
-    }
-
-    if( pszSrc[0] == '(' )
-    {
-        pszReturn = strdup( pszSrc + 1 );
-        pszReturn[i-2] = '\0';
-    }
-    else
-    {
-        pszReturn = strdup( pszSrc  );
-        pszReturn[i] = '\0';
-    }
-
-    return pszReturn;
-}
-
-/************************************************************************/
-/*                            ExpandFormat()                            */
-/************************************************************************/
-
-char *ossimDDFFieldDefn::ExpandFormat( const char * pszSrc )
-
-{
-    int         nDestMax = 32;
-    char       *pszDest = (char *) malloc(nDestMax+1);
-    int         iSrc, iDst;
-    int         nRepeat = 0;
-
-    iSrc = 0;
-    iDst = 0;
-    pszDest[0] = '\0';
-
-    while( pszSrc[iSrc] != '\0' )
-    {
-        /* This is presumably an extra level of brackets around some
-           binary stuff related to rescaning which we don't care to do
-           (see 6.4.3.3 of the standard.  We just strip off the extra
-           layer of brackets */
-        if( (iSrc == 0 || pszSrc[iSrc-1] == ',') && pszSrc[iSrc] == '(' )
-        {
-            char       *pszContents = ExtractSubstring( pszSrc+iSrc );
-            char       *pszExpandedContents = ExpandFormat( pszContents );
-
-            if( (int) (strlen(pszExpandedContents) + strlen(pszDest) + 1)
-                > nDestMax )
-            {
-                nDestMax = 2 * ((int)strlen(pszExpandedContents) + (int)strlen(pszDest));
-                pszDest = (char *) realloc(pszDest,nDestMax+1);
-            }
-
-            strcat( pszDest, pszExpandedContents );
-            iDst = (int)strlen(pszDest);
-            
-            iSrc = iSrc + (int)strlen(pszContents) + 2;
-
-            free( pszContents );
-            free( pszExpandedContents );
-        }
-
-        /* this is a repeated subclause */
-        else if( (iSrc == 0 || pszSrc[iSrc-1] == ',')
-                 && isdigit(pszSrc[iSrc]) )
-        {
-            const char *pszNext;
-            nRepeat = atoi(pszSrc+iSrc);
-            
-            // skip over repeat count.
-            for( pszNext = pszSrc+iSrc; isdigit(*pszNext); pszNext++ )
-                iSrc++;
-
-            char       *pszContents = ExtractSubstring( pszNext );
-            char       *pszExpandedContents = ExpandFormat( pszContents );
-                
-            for( int i = 0; i < nRepeat; i++ )
-            {
-                if( (int) (strlen(pszExpandedContents) + strlen(pszDest) + 1)
-                    > nDestMax )
-                {
-                    nDestMax = 
-                        2 * ((int)strlen(pszExpandedContents) + (int)strlen(pszDest));
-                    pszDest = (char *) realloc(pszDest,nDestMax+1);
-                }
-
-                strcat( pszDest, pszExpandedContents );
-                if( i < nRepeat-1 )
-                    strcat( pszDest, "," );
-            }
-
-            iDst = (int)strlen(pszDest);
-            
-            if( pszNext[0] == '(' )
-                iSrc = iSrc + (int)strlen(pszContents) + 2;
-            else
-                iSrc = iSrc + (int)strlen(pszContents);
-
-            free( pszContents );
-            free( pszExpandedContents );
-        }
-        else
-        {
-            if( iDst+1 >= nDestMax )
-            {
-                nDestMax = 2 * iDst;
-                pszDest = (char *) realloc(pszDest,nDestMax);
-            }
-
-            pszDest[iDst++] = pszSrc[iSrc++];
-            pszDest[iDst] = '\0';
-        }
-    }
-
-    return pszDest;
-}
-                                 
-/************************************************************************/
-/*                            ApplyFormats()                            */
-/*                                                                      */
-/*      This method parses the format string partially, and then        */
-/*      applies a subfield format string to each subfield object.       */
-/*      It in turn does final parsing of the subfield formats.          */
-/************************************************************************/
-
-int ossimDDFFieldDefn::ApplyFormats()
-
-{
-    char        *pszFormatList;
-    char        **papszFormatItems;
-    
-/* -------------------------------------------------------------------- */
-/*      Verify that the format string is contained within brackets.     */
-/* -------------------------------------------------------------------- */
-    if( strlen(_formatControls) < 2
-        || _formatControls[0] != '('
-        || _formatControls[strlen(_formatControls)-1] != ')' )
-    {
-       ossimNotify(ossimNotifyLevel_WARN)
-          << "Format controls for `%s' field missing brackets:%s\n"
-          << pszTag << _formatControls << std::endl;
-        
-        return false;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Duplicate the string, and strip off the brackets.               */
-/* -------------------------------------------------------------------- */
-
-    pszFormatList = ExpandFormat( _formatControls );
-
-/* -------------------------------------------------------------------- */
-/*      Tokenize based on commas.                                       */
-/* -------------------------------------------------------------------- */
-    papszFormatItems =
-        ossimCSLTokenizeStringComplex(pszFormatList, ",", false, false );
-
-    free( pszFormatList );
-
-/* -------------------------------------------------------------------- */
-/*      Apply the format items to subfields.                            */
-/* -------------------------------------------------------------------- */
-    int iFormatItem;
-    
-    for( iFormatItem = 0;
-         papszFormatItems[iFormatItem] != NULL;
-         iFormatItem++ )
-    {
-        const char      *pszPastPrefix;
-
-        pszPastPrefix = papszFormatItems[iFormatItem];
-        while( *pszPastPrefix >= '0' && *pszPastPrefix <= '9' )
-            pszPastPrefix++;
-
-        ///////////////////////////////////////////////////////////////
-        // Did we get too many formats for the subfields created
-        // by names?  This may be legal by the 8211 specification, but
-        // isn't encountered in any formats we care about so we just
-        // blow.
-        
-        if( iFormatItem >= nSubfieldCount )
-        {
-           ossimNotify(ossimNotifyLevel_WARN)
-              << "Got more formats than subfields for field `%s'.\n"
-              << pszTag << std::endl;
-            break;
-        }
-        
-        if( !papoSubfields[iFormatItem]->SetFormat(pszPastPrefix) )
-            return false;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Verify that we got enough formats, cleanup and return.          */
-/* -------------------------------------------------------------------- */
-    ossimCSLDestroy( papszFormatItems );
-
-    if( iFormatItem < nSubfieldCount )
-    {
-       ossimNotify(ossimNotifyLevel_DEBUG)
-          << "Got less formats than subfields for field `%s',\n"
-          << pszTag << std::endl;
-        return false;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      If all the fields are fixed width, then we are fixed width      */
-/*      too.  This is important for repeating fields.                   */
-/* -------------------------------------------------------------------- */
-    nFixedWidth = 0;
-    for( int i = 0; i < nSubfieldCount; i++ )
-    {
-        if( papoSubfields[i]->GetWidth() == 0 )
-        {
-            nFixedWidth = 0;
-            break;
-        }
-        else
-            nFixedWidth += papoSubfields[i]->GetWidth();
-    }
-
-    return true;
-}
-
-/************************************************************************/
-/*                          FindSubfieldDefn()                          */
-/************************************************************************/
-
-/**
- * Find a subfield definition by it's mnemonic tag.  
- *
- * @param pszMnemonic The name of the field.
- *
- * @return The subfield pointer, or NULL if there isn't any such subfield.
- */
- 
-
-ossimDDFSubfieldDefn *ossimDDFFieldDefn::FindSubfieldDefn( const char * pszMnemonic )
-
-{
-    for( int i = 0; i < nSubfieldCount; i++ )
-    {
-       ossimString s = papoSubfields[i]->GetName();
-       if( s == pszMnemonic )
-            return papoSubfields[i];
-    }
-
-    return NULL;
-}
-
-/************************************************************************/
-/*                            GetSubfield()                             */
-/*                                                                      */
-/*      Fetch a subfield by it's index.                                 */
-/************************************************************************/
-
-/**
- * Fetch a subfield by index.
- *
- * @param i The index subfield index. (Between 0 and GetSubfieldCount()-1)
- *
- * @return The subfield pointer, or NULL if the index is out of range.
- */
-
-ossimDDFSubfieldDefn *ossimDDFFieldDefn::GetSubfield( int i )
-
-{
-    if( i < 0 || i >= nSubfieldCount )
-    {
-       // assert( false );
-       return NULL;
-    }
-             
-    return papoSubfields[i];
-}
-
-/************************************************************************/
-/*                          GetDefaultValue()                           */
-/************************************************************************/
-
-/**
- * Return default data for field instance.
- */
-
-char *ossimDDFFieldDefn::GetDefaultValue( int *pnSize )
-
-{                                                                       
-/* -------------------------------------------------------------------- */
-/*      Loop once collecting the sum of the subfield lengths.           */
-/* -------------------------------------------------------------------- */
-    int iSubfield;
-    int nTotalSize = 0;
-
-    for( iSubfield = 0; iSubfield < nSubfieldCount; iSubfield++ )
-    {
-        int nSubfieldSize;
-
-        if( !papoSubfields[iSubfield]->GetDefaultValue( NULL, 0, 
-                                                        &nSubfieldSize ) )
-            return NULL;
-        nTotalSize += nSubfieldSize;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Allocate buffer.                                                */
-/* -------------------------------------------------------------------- */
-    char *pachData = (char *) malloc( nTotalSize );
-
-    if( pnSize != NULL )
-        *pnSize = nTotalSize;
-
-/* -------------------------------------------------------------------- */
-/*      Loop again, collecting actual default values.                   */
-/* -------------------------------------------------------------------- */
-    int nOffset = 0;
-    for( iSubfield = 0; iSubfield < nSubfieldCount; iSubfield++ )
-    {
-        int nSubfieldSize;
-
-        if( !papoSubfields[iSubfield]->GetDefaultValue( 
-                pachData + nOffset, nTotalSize - nOffset, &nSubfieldSize ) )
-        {
-           // assert( false );
-           return NULL;
-        }
-
-        nOffset += nSubfieldSize;
-    }
-
-    // assert( nOffset == nTotalSize );
-
-    return pachData;
-}
diff --git a/src/ossim/imaging/ossimDdfsubfielddefn.cpp b/src/ossim/imaging/ossimDdfsubfielddefn.cpp
deleted file mode 100644
index 0576d5a..0000000
--- a/src/ossim/imaging/ossimDdfsubfielddefn.cpp
+++ /dev/null
@@ -1,997 +0,0 @@
-/******************************************************************************
- * Copied from "gdal" project. See licence below.
- *
- * Project:  ISO 8211 Access
- * Purpose:  Implements the DDFSubfieldDefn class.
- * Author:   Frank Warmerdam, warmerda at home.com
- *
- ******************************************************************************
- * Copyright (c) 1999, Frank Warmerdam
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- ******************************************************************************
- * $Id: ossimDdfsubfielddefn.cpp 15833 2009-10-29 01:41:53Z eshirschorn $
- */
-
-#include <cstring>
-#include <ossim/imaging/ossimIso8211.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimCommon.h>
-
-/************************************************************************/
-/*                          DDFSubfieldDefn()                           */
-/************************************************************************/
-
-ossimDDFSubfieldDefn::ossimDDFSubfieldDefn()
-
-{
-    pszName = NULL;
-    
-    bIsVariable = true;
-    nFormatWidth = 0;
-    chFormatDelimeter = OSSIM_DDF_UNIT_TERMINATOR;
-    eBinaryFormat = NotBinary;
-    eType = DDFString;
-    
-    pszFormatString = strdup("");
-
-    nMaxBufChars = 0;
-    pachBuffer = NULL;
-}
-
-/************************************************************************/
-/*                          ~DDFSubfieldDefn()                          */
-/************************************************************************/
-
-ossimDDFSubfieldDefn::~ossimDDFSubfieldDefn()
-
-{
-    free( pszName );
-    free( pszFormatString );
-    free( pachBuffer );
-}
-
-/************************************************************************/
-/*                              SetName()                               */
-/************************************************************************/
-
-void ossimDDFSubfieldDefn::SetName( const char * pszNewName )
-
-{
-    int         i;
-    
-    free( pszName );
-
-    pszName = strdup( pszNewName );
-
-    for( i = (int)strlen(pszName)-1; i > 0 && pszName[i] == ' '; i-- )
-        pszName[i] = '\0';
-}
-
-/************************************************************************/
-/*                             SetFormat()                              */
-/*                                                                      */
-/*      While interpreting the format string we don't support:          */
-/*                                                                      */
-/*       o Passing an explicit terminator for variable length field.    */
-/*       o 'X' for unused data ... this should really be filtered       */
-/*         out by DDFFieldDefn::ApplyFormats(), but isn't.              */
-/*       o 'B' bitstrings that aren't a multiple of eight.              */
-/************************************************************************/
-
-int ossimDDFSubfieldDefn::SetFormat( const char * pszFormat )
-
-{
-    free( pszFormatString );
-    pszFormatString = strdup( pszFormat );
-
-/* -------------------------------------------------------------------- */
-/*      These values will likely be used.                               */
-/* -------------------------------------------------------------------- */
-    if( pszFormatString[1] == '(' )
-    {
-        nFormatWidth = atoi(pszFormatString+2);
-        bIsVariable = nFormatWidth == 0;
-    }
-    else
-        bIsVariable = true;
-    
-/* -------------------------------------------------------------------- */
-/*      Interpret the format string.                                    */
-/* -------------------------------------------------------------------- */
-    switch( pszFormatString[0] )
-    {
-      case 'A':
-      case 'C':         // It isn't clear to me how this is different than 'A'
-        eType = DDFString;
-        break;
-
-      case 'R':
-        eType = DDFFloat;
-        break;
-        
-      case 'I':
-      case 'S':
-        eType = DDFInt;
-        break;
-
-      case 'B':
-      case 'b':
-        // Is the width expressed in bits? (is it a bitstring)
-        bIsVariable = false;
-        if( pszFormatString[1] == '(' )
-        {
-           // CPLAssert( atoi(pszFormatString+2) % 8 == 0 );
-            
-            nFormatWidth = atoi(pszFormatString+2) / 8;
-            eBinaryFormat = SInt; // good default, works for SDTS.
-
-            if( nFormatWidth < 5 )
-                eType = DDFInt;
-            else
-                eType = DDFBinaryString;
-        }
-        
-        // or do we have a binary type indicator? (is it binary)
-        else
-        {
-            eBinaryFormat = (DDFBinaryFormat) (pszFormatString[1] - '0');
-            nFormatWidth = atoi(pszFormatString+2);
-
-            if( eBinaryFormat == SInt || eBinaryFormat == UInt )
-                eType = DDFInt;
-            else
-                eType = DDFFloat;
-        }
-        break;
-
-      case 'X':
-        // 'X' is extra space, and shouldn't be directly assigned to a
-        // subfield ... I haven't encountered it in use yet though.
-        ossimNotify(ossimNotifyLevel_WARN)
-           << "Format type of `%c' not supported.\n"
-           << pszFormatString[0] << std::endl;
-        
-        // CPLAssert( false );
-        return false;
-        
-      default:
-        ossimNotify(ossimNotifyLevel_WARN)
-           << "Format type of `%c' not recognised.\n"
-           << pszFormatString[0] << std::endl;
-        
-        // CPLAssert( false );
-        return false;
-    }
-    
-    return true;
-}
-
-/************************************************************************/
-/*                                Dump()                                */
-/************************************************************************/
-
-/**
- * Write out subfield definition info to debugging file.
- *
- * A variety of information about this field definition is written to the
- * give debugging file handle.
- *
- * @param fp The standard io file handle to write to.  ie. stderr
- */
-
-void ossimDDFSubfieldDefn::Dump( FILE * fp )
-
-{
-    fprintf( fp, "    DDFSubfieldDefn:\n" );
-    fprintf( fp, "        Label = `%s'\n", pszName );
-    fprintf( fp, "        FormatString = `%s'\n", pszFormatString );
-}
-
-/************************************************************************/
-/*                           GetDataLength()                            */
-/*                                                                      */
-/*      This method will scan for the end of a variable field.          */
-/************************************************************************/
-
-/**
- * Scan for the end of variable length data.  Given a pointer to the data
- * for this subfield (from within a DDFRecord) this method will return the
- * number of bytes which are data for this subfield.  The number of bytes
- * consumed as part of this field can also be fetched.  This number may
- * be one longer than the length if there is a terminator character
- * used.<p>
- *
- * This method is mainly for internal use, or for applications which
- * want the raw binary data to interpret themselves.  Otherwise use one
- * of ExtractStringData(), ExtractIntData() or ExtractFloatData().
- *
- * @param pachSourceData The pointer to the raw data for this field.  This
- * may have come from DDFRecord::GetData(), taking into account skip factors
- * over previous subfields data.
- * @param nMaxBytes The maximum number of bytes that are accessable after
- * pachSourceData.
- * @param pnConsumedBytes Pointer to an integer into which the number of
- * bytes consumed by this field should be written.  May be NULL to ignore.
- *
- * @return The number of bytes at pachSourceData which are actual data for
- * this record (not including unit, or field terminator).  
- */
-
-int ossimDDFSubfieldDefn::GetDataLength( const char * pachSourceData,
-                                    int nMaxBytes, int * pnConsumedBytes )
-
-{
-    if( !bIsVariable )
-    {
-        if( nFormatWidth > nMaxBytes )
-        {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "Only %d bytes available for subfield %s with\n"
-               << "format string %s ... returning shortened data."
-               << nMaxBytes << pszName << pszFormatString << std::endl;
-
-            if( pnConsumedBytes != NULL )
-                *pnConsumedBytes = nMaxBytes;
-
-            return nMaxBytes;
-        }
-        else
-        {
-            if( pnConsumedBytes != NULL )
-                *pnConsumedBytes = nFormatWidth;
-
-            return nFormatWidth;
-        }
-    }
-    else
-    {
-        int     nLength = 0;
-        int     bCheckFieldTerminator = true;
-
-        /* We only check for the field terminator because of some buggy 
-         * datasets with missing format terminators.  However, we have found
-         * the field terminator is a legal character within the fields of
-         * some extended datasets (such as JP34NC94.000).  So we don't check
-         * for the field terminator if the field appears to be multi-byte
-         * which we established by the first character being out of the 
-         * ASCII printable range (32-127). 
-         */
-
-        if( pachSourceData[0] < 32 || pachSourceData[0] >= 127 )
-            bCheckFieldTerminator = false;
-        
-        while( nLength < nMaxBytes
-               && pachSourceData[nLength] != chFormatDelimeter )
-        {
-            if( bCheckFieldTerminator 
-                && pachSourceData[nLength] == OSSIM_DDF_FIELD_TERMINATOR )
-                break;
-
-            nLength++;
-        }
-
-        if( pnConsumedBytes != NULL )
-        {
-            if( nMaxBytes == 0 )
-                *pnConsumedBytes = nLength;
-            else
-                *pnConsumedBytes = nLength+1;
-        }
-        
-        return nLength;
-    }
-}
-
-/************************************************************************/
-/*                         ExtractStringData()                          */
-/************************************************************************/
-
-/**
- * Extract a zero terminated string containing the data for this subfield.
- * Given a pointer to the data
- * for this subfield (from within a DDFRecord) this method will return the
- * data for this subfield.  The number of bytes
- * consumed as part of this field can also be fetched.  This number may
- * be one longer than the string length if there is a terminator character
- * used.<p>
- *
- * This function will return the raw binary data of a subfield for
- * types other than DDFString, including data past zero chars.  This is
- * the standard way of extracting DDFBinaryString subfields for instance.<p>
- *
- * @param pachSourceData The pointer to the raw data for this field.  This
- * may have come from DDFRecord::GetData(), taking into account skip factors
- * over previous subfields data.
- * @param nMaxBytes The maximum number of bytes that are accessable after
- * pachSourceData.
- * @param pnConsumedBytes Pointer to an integer into which the number of
- * bytes consumed by this field should be written.  May be NULL to ignore.
- * This is used as a skip factor to increment pachSourceData to point to the
- * next subfields data.
- *
- * @return A pointer to a buffer containing the data for this field.  The
- * returned pointer is to an internal buffer which is invalidated on the
- * next ExtractStringData() call on this DDFSubfieldDefn().  It should not
- * be freed by the application.
- *
- * @see ExtractIntData(), ExtractFloatData()
- */
-
-const char *
-ossimDDFSubfieldDefn::ExtractStringData( const char * pachSourceData,
-                                    int nMaxBytes, int * pnConsumedBytes )
-
-{
-    int         nLength = GetDataLength( pachSourceData, nMaxBytes,
-                                         pnConsumedBytes );
-
-/* -------------------------------------------------------------------- */
-/*      Do we need to grow the buffer.                                  */
-/* -------------------------------------------------------------------- */
-    if( nMaxBufChars < nLength+1 )
-    {
-        free( pachBuffer );
-        
-        nMaxBufChars = nLength+1;
-        pachBuffer = (char *) malloc(nMaxBufChars);
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Copy the data to the buffer.  We use memcpy() so that it        */
-/*      will work for binary data.                                      */
-/* -------------------------------------------------------------------- */
-    memcpy( pachBuffer, pachSourceData, nLength );
-    pachBuffer[nLength] = '\0';
-
-    return pachBuffer;
-}
-
-/************************************************************************/
-/*                          ExtractFloatData()                          */
-/************************************************************************/
-
-/**
- * Extract a subfield value as a float.  Given a pointer to the data
- * for this subfield (from within a DDFRecord) this method will return the
- * floating point data for this subfield.  The number of bytes
- * consumed as part of this field can also be fetched.  This method may be
- * called for any type of subfield, and will return zero if the subfield is
- * not numeric.
- *
- * @param pachSourceData The pointer to the raw data for this field.  This
- * may have come from DDFRecord::GetData(), taking into account skip factors
- * over previous subfields data.
- * @param nMaxBytes The maximum number of bytes that are accessable after
- * pachSourceData.
- * @param pnConsumedBytes Pointer to an integer into which the number of
- * bytes consumed by this field should be written.  May be NULL to ignore.
- * This is used as a skip factor to increment pachSourceData to point to the
- * next subfields data.
- *
- * @return The subfield's numeric value (or zero if it isn't numeric).
- *
- * @see ExtractIntData(), ExtractStringData()
- */
-
-double
-ossimDDFSubfieldDefn::ExtractFloatData( const char * pachSourceData,
-                                   int nMaxBytes, int * pnConsumedBytes )
-
-{
-    switch( pszFormatString[0] )
-    {
-      case 'A':
-      case 'I':
-      case 'R':
-      case 'S':
-      case 'C':
-        return atof(ExtractStringData(pachSourceData, nMaxBytes,
-                                      pnConsumedBytes));
-
-      case 'B':
-      case 'b':
-      {
-          unsigned char   abyData[8];
-
-          // CPLAssert( nFormatWidth <= nMaxBytes );
-          if( pnConsumedBytes != NULL )
-              *pnConsumedBytes = nFormatWidth;
-
-          // Byte swap the data if it isn't in machine native format.
-          // In any event we copy it into our buffer to ensure it is
-          // word aligned.
-#ifdef CPL_LSB
-          if( pszFormatString[0] == 'B' )
-#else            
-              if( pszFormatString[0] == 'b' )
-#endif            
-              {
-                  for( int i = 0; i < nFormatWidth; i++ )
-                      abyData[nFormatWidth-i-1] = pachSourceData[i];
-              }
-              else
-              {
-                  memcpy( abyData, pachSourceData, nFormatWidth );
-              }
-
-          // Interpret the bytes of data.
-          switch( eBinaryFormat )
-          {
-             case UInt:
-                if( nFormatWidth == 1 )
-                {
-                   return( abyData[0] );
-                }
-                else if( nFormatWidth == 2 )
-                {
-                   ossim_uint16* ptr = (ossim_uint16*) abyData;
-                   return *ptr;
-                }
-                else if( nFormatWidth == 4 )
-                {
-                   ossim_uint32* ptr = (ossim_uint32*) abyData;
-                   return *ptr;
-                }
-                else
-                {
-                   // CPLAssert( false );
-                   return 0.0;
-                }
-                
-             case SInt:
-                if( nFormatWidth == 1 )
-                {
-                   signed char* ptr = (signed char*) abyData;
-                   return *ptr;
-                }
-                else if( nFormatWidth == 2 )
-                {
-                   ossim_int16* ptr = (ossim_int16*) abyData;
-                   return *ptr;
-                }
-                else if( nFormatWidth == 4 )
-                {
-                   ossim_int32* ptr = (ossim_int32*) abyData;
-                   return *ptr;
-                }
-                else
-                {
-                   // CPLAssert( false );
-                   return 0.0;
-                }
-            
-             case FloatReal:
-                if( nFormatWidth == 4 )
-                {
-                   float* ptr = (float*) abyData;
-                   return *ptr;
-                }
-                else if( nFormatWidth == 8 )
-                {
-                   double* ptr = (double*) abyData;
-                   return *ptr;
-                }
-                else
-                {
-                   // CPLAssert( false );
-                   return 0.0;
-                }
-                
-             case NotBinary:            
-             case FPReal:
-             case FloatComplex:
-                // CPLAssert( false );
-                return 0.0;
-          }
-          break;
-          // end of 'b'/'B' case.
-      }
-
-      default:
-        // CPLAssert( false );
-        return 0.0;
-    }
-
-    // CPLAssert( false );
-    return 0.0;
-}
-
-/************************************************************************/
-/*                           ExtractIntData()                           */
-/************************************************************************/
-
-/**
- * Extract a subfield value as an integer.  Given a pointer to the data
- * for this subfield (from within a DDFRecord) this method will return the
- * int data for this subfield.  The number of bytes
- * consumed as part of this field can also be fetched.  This method may be
- * called for any type of subfield, and will return zero if the subfield is
- * not numeric.
- *
- * @param pachSourceData The pointer to the raw data for this field.  This
- * may have come from DDFRecord::GetData(), taking into account skip factors
- * over previous subfields data.
- * @param nMaxBytes The maximum number of bytes that are accessable after
- * pachSourceData.
- * @param pnConsumedBytes Pointer to an integer into which the number of
- * bytes consumed by this field should be written.  May be NULL to ignore.
- * This is used as a skip factor to increment pachSourceData to point to the
- * next subfields data.
- *
- * @return The subfield's numeric value (or zero if it isn't numeric).
- *
- * @see ExtractFloatData(), ExtractStringData()
- */
-
-int
-ossimDDFSubfieldDefn::ExtractIntData( const char * pachSourceData,
-                                 int nMaxBytes, int * pnConsumedBytes )
-
-{
-    switch( pszFormatString[0] )
-    {
-      case 'A':
-      case 'I':
-      case 'R':
-      case 'S':
-      case 'C':
-        return atoi(ExtractStringData(pachSourceData, nMaxBytes,
-                                      pnConsumedBytes));
-
-      case 'B':
-      case 'b':
-      {
-          unsigned char   abyData[8];
-
-          if( nFormatWidth > nMaxBytes )
-          {
-              ossimNotify(ossimNotifyLevel_WARN)
-                 << "Attempt to extract int subfield %s with format %s\n"
-                 << "failed as only %d bytes available.  Using zero."
-                 << pszName << pszFormatString << nMaxBytes << std::endl;
-              return 0;
-          }
-
-          if( pnConsumedBytes != NULL )
-              *pnConsumedBytes = nFormatWidth;
-
-          // Byte swap the data if it isn't in machine native format.
-          // In any event we copy it into our buffer to ensure it is
-          // word aligned.
-#ifdef CPL_LSB
-          if( pszFormatString[0] == 'B' )
-#else            
-              if( pszFormatString[0] == 'b' )
-#endif            
-              {
-                  for( int i = 0; i < nFormatWidth; i++ )
-                      abyData[nFormatWidth-i-1] = pachSourceData[i];
-              }
-              else
-              {
-                  memcpy( abyData, pachSourceData, nFormatWidth );
-              }
-
-          // Interpret the bytes of data.
-          switch( eBinaryFormat )
-          {
-            case UInt:
-              if( nFormatWidth == 4 )
-              {
-                 ossim_uint32* ptr = (ossim_uint32*) abyData;
-                 return *ptr;
-              }
-              else if( nFormatWidth == 1 )
-              {
-                 return( abyData[0] );
-              }
-              else if( nFormatWidth == 2 )
-              {
-                 ossim_uint16* ptr = (ossim_uint16*)abyData;
-                 return *ptr;
-              }
-              else
-              {
-                 // CPLAssert( false );
-                 return 0;
-              }
-              
-             case SInt:
-                if( nFormatWidth == 4 )
-                {
-                   ossim_int32* ptr = (ossim_int32 *) abyData;
-                   return *ptr;
-                }
-                else if( nFormatWidth == 1 )
-                {
-                   signed char* ptr = (signed char *) abyData;
-                   return *ptr;
-                }
-                else if( nFormatWidth == 2 )
-                {
-                   ossim_int16* ptr = (ossim_int16 *) abyData;
-                   return *ptr;
-                }
-                else
-                {
-                   // CPLAssert( false );
-                   return 0;
-                }
-                
-             case FloatReal:
-                if( nFormatWidth == 4 )
-                {
-                   float* ptr = (float *) abyData;
-                   return (int) *ptr;
-                }
-                else if( nFormatWidth == 8 )
-                {
-                   double* ptr = (double *) abyData;
-                   return (int) *ptr;
-                }
-                else
-                {
-                   // CPLAssert( false );
-                   return 0;
-                }
-
-             case NotBinary:            
-             case FPReal:
-             case FloatComplex:
-                // CPLAssert( false );
-                return 0;
-          }
-          break;
-          // end of 'b'/'B' case.
-      }
-      
-       default:
-          // CPLAssert( false );
-          return 0;
-    }
-    
-    // CPLAssert( false );
-    return 0;
-}
-
-/************************************************************************/
-/*                              DumpData()                              */
-/*                                                                      */
-/*      Dump the instance data for this subfield from a data            */
-/*      record.  This fits into the output dump stream of a DDFField.   */
-/************************************************************************/
-
-/**
- * Dump subfield value to debugging file.
- *
- * @param pachData Pointer to data for this subfield.
- * @param nMaxBytes Maximum number of bytes available in pachData.
- * @param fp File to write report to.
- */
-
-void ossimDDFSubfieldDefn::DumpData( const char * pachData, int nMaxBytes,
-                                FILE * fp )
-
-{
-    if( eType == DDFFloat )
-        fprintf( fp, "      Subfield `%s' = %f\n",
-                 pszName,
-                 ExtractFloatData( pachData, nMaxBytes, NULL ) );
-    else if( eType == DDFInt )
-        fprintf( fp, "      Subfield `%s' = %d\n",
-                 pszName,
-                 ExtractIntData( pachData, nMaxBytes, NULL ) );
-    else if( eType == DDFBinaryString )
-    {
-        int     nBytes, i;
-        ossim_uint8   *pabyBString = (ossim_uint8 *) ExtractStringData( pachData, nMaxBytes, &nBytes );
-
-        fprintf( fp, "      Subfield `%s' = 0x", pszName );
-        for( i = 0; i < std::min(nBytes,24); i++ )
-            fprintf( fp, "%02X", pabyBString[i] );
-
-        if( nBytes > 24 )
-            fprintf( fp, "%s", "..." );
-
-        fprintf( fp, "\n" );
-    }
-    else
-        fprintf( fp, "      Subfield `%s' = `%s'\n",
-                 pszName,
-                 ExtractStringData( pachData, nMaxBytes, NULL ) );
-}
-
-/************************************************************************/
-/*                          GetDefaultValue()                           */
-/************************************************************************/
-
-/**
- * Get default data. 
- *
- * Returns the default subfield data contents for this subfield definition.
- * For variable length numbers this will normally be "0<unit-terminator>". 
- * For variable length strings it will be "<unit-terminator>".  For fixed
- * length numbers it is zero filled.  For fixed length strings it is space
- * filled.  For binary numbers it is binary zero filled. 
- *
- * @param pachData the buffer into which the returned default will be placed.
- * May be NULL if just querying default size.
- * @param nBytesAvailable the size of pachData in bytes. 
- * @param pnBytesUsed will receive the size of the subfield default data in
- * bytes.
- *
- * @return true on success or false on failure or if the passed buffer is too
- * small to hold the default.
- */
-
-int ossimDDFSubfieldDefn::GetDefaultValue( char *pachData, int nBytesAvailable, 
-                                      int *pnBytesUsed )
-
-{
-    int nDefaultSize;
-
-    if( !bIsVariable )
-        nDefaultSize = nFormatWidth;
-    else
-        nDefaultSize = 1;
-
-    if( pnBytesUsed != NULL )
-        *pnBytesUsed = nDefaultSize;
-
-    if( pachData == NULL )
-        return true;
-
-    if( nBytesAvailable < nDefaultSize )
-        return false;
-
-    if( bIsVariable )
-    {
-        pachData[0] = OSSIM_DDF_UNIT_TERMINATOR;
-    }
-    else
-    {
-        if( GetBinaryFormat() == NotBinary )
-        {
-            if( GetType() == DDFInt || GetType() == DDFFloat )
-                memset( pachData, '0', nDefaultSize );
-            else
-                memset( pachData, ' ', nDefaultSize );
-        }
-        else
-            memset( pachData, 0, nDefaultSize );
-    }
-
-    return true;
-}
-
-/************************************************************************/
-/*                         FormatStringValue()                          */
-/************************************************************************/
-
-/**
- * Format string subfield value.
- *
- * Returns a buffer with the passed in string value reformatted in a way
- * suitable for storage in a DDFField for this subfield.  
- */
-
-int ossimDDFSubfieldDefn::FormatStringValue( char *pachData, int nBytesAvailable, 
-                                        int *pnBytesUsed, 
-                                        const char *pszValue,
-                                        int nValueLength )
-
-{
-    int nSize;
-
-    if( nValueLength == -1 )
-        nValueLength = (int)strlen(pszValue);
-
-    if( bIsVariable )
-    {
-        nSize = nValueLength + 1;
-    }
-    else
-    {                                                                  
-        nSize = nFormatWidth;
-    }
-
-    if( pnBytesUsed != NULL )
-        *pnBytesUsed = nSize;
-
-    if( pachData == NULL )
-        return true;
-
-    if( nBytesAvailable < nSize )
-        return false;
-
-    if( bIsVariable )
-    {
-        strncpy( pachData, pszValue, nSize-1 );
-        pachData[nSize-1] = OSSIM_DDF_UNIT_TERMINATOR;
-    }
-    else
-    {
-        if( GetBinaryFormat() == NotBinary )
-        {
-            memset( pachData, ' ', nSize );
-            memcpy( pachData, pszValue, std::min(nValueLength,nSize) );
-        }
-        else
-        {
-            memset( pachData, 0, nSize );
-            memcpy( pachData, pszValue, std::min(nValueLength,nSize) );
-        }
-    }
-
-    return true;
-}
-
-/************************************************************************/
-/*                           FormatIntValue()                           */
-/************************************************************************/
-
-/**
- * Format int subfield value.
- *
- * Returns a buffer with the passed in int value reformatted in a way
- * suitable for storage in a DDFField for this subfield.  
- */
-
-int ossimDDFSubfieldDefn::FormatIntValue( char *pachData, int nBytesAvailable, 
-                                     int *pnBytesUsed, int nNewValue )
-
-{
-    int nSize;
-    char szWork[30];
-
-    sprintf( szWork, "%d", nNewValue );
-
-    if( bIsVariable )
-    {
-        nSize = (int)strlen(szWork) + 1;
-    }
-    else
-    {                                                                  
-        nSize = nFormatWidth;
-
-        if( GetBinaryFormat() == NotBinary && (int) strlen(szWork) > nSize )
-            return false;
-    }
-
-    if( pnBytesUsed != NULL )
-        *pnBytesUsed = nSize;
-
-    if( pachData == NULL )
-        return true;
-
-    if( nBytesAvailable < nSize )
-        return false;
-
-    if( bIsVariable )
-    {
-        strncpy( pachData, szWork, nSize-1 );
-        pachData[nSize-1] = OSSIM_DDF_UNIT_TERMINATOR;
-    }
-    else
-    {
-        ossim_uint32 nMask = 0xff;
-        int i;
-
-        switch( GetBinaryFormat() )
-        {
-          case NotBinary:
-            memset( pachData, '0', nSize );
-            strncpy( pachData + nSize - strlen(szWork), szWork,
-                     strlen(szWork) );
-            break;
-
-          case UInt:
-          case SInt:
-            for( i = 0; i < nFormatWidth; i++ )
-            {
-                int iOut;
-
-                // big endian required?
-                if( pszFormatString[0] == 'B' )
-                    iOut = nFormatWidth - i - 1;
-                else
-                    iOut = i;
-
-                pachData[iOut] = (nNewValue & nMask) >> (i*8);
-                nMask *= 256;
-            }
-            break;
-
-          case FloatReal:
-            // CPLAssert( false );
-            break;
-
-          default:
-            // CPLAssert( false );
-            break;
-        }
-    }
-
-    return true;
-}
-
-/************************************************************************/
-/*                          FormatFloatValue()                          */
-/************************************************************************/
-
-/**
- * Format float subfield value.
- *
- * Returns a buffer with the passed in float value reformatted in a way
- * suitable for storage in a DDFField for this subfield.  
- */
-
-int ossimDDFSubfieldDefn::FormatFloatValue( char *pachData, int nBytesAvailable, 
-                                       int *pnBytesUsed, double dfNewValue )
-
-{
-    int nSize;
-    char szWork[120];
-
-    sprintf( szWork, "%.16g", dfNewValue );
-
-    if( bIsVariable )
-    {
-        nSize = (int)strlen(szWork) + 1;
-    }
-    else
-    {
-        nSize = nFormatWidth;
-
-        if( GetBinaryFormat() == NotBinary && (int) strlen(szWork) > nSize )
-            return false;
-    }
-
-    if( pnBytesUsed != NULL )
-        *pnBytesUsed = nSize;
-
-    if( pachData == NULL )
-        return true;
-
-    if( nBytesAvailable < nSize )
-        return false;
-
-    if( bIsVariable )
-    {
-        strncpy( pachData, szWork, nSize-1 );
-        pachData[nSize-1] = OSSIM_DDF_UNIT_TERMINATOR;
-    }
-    else
-    {
-        if( GetBinaryFormat() == NotBinary )
-        {
-            memset( pachData, '0', nSize );
-            strncpy( pachData + nSize - strlen(szWork), szWork,
-                     strlen(szWork) );
-        }
-        else
-        {
-            // CPLAssert( false );
-            /* implement me */
-        }
-    }
-
-    return true;
-}
diff --git a/src/ossim/imaging/ossimDespeckleFilter.cpp b/src/ossim/imaging/ossimDespeckleFilter.cpp
deleted file mode 100644
index 35993a3..0000000
--- a/src/ossim/imaging/ossimDespeckleFilter.cpp
+++ /dev/null
@@ -1,236 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Oscar Kramer
-//
-//*******************************************************************
-//  $Id: ossimDespeckleFilter.cpp 2644 2011-05-26 15:20:11Z oscar.kramer $
-
-#include <ossim/imaging/ossimDespeckleFilter.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeyword.h>
-#include <ossim/base/ossimNumericProperty.h>
-
-static const ossimKeyword FILTER_RADIUS_KW = ossimKeyword("filter_radius", "");
-
-RTTI_DEF1(ossimDespeckleFilter, "ossimDespeckleFilter", ossimImageSourceFilter);
-
-ossimDespeckleFilter::ossimDespeckleFilter()
-   : ossimImageSourceFilter(),
-     theTile(NULL),
-     theFilterRadius(1)
-{
-}
-
-ossimDespeckleFilter::ossimDespeckleFilter(ossimImageSource* inputSource, ossim_uint32 filter_radius)
-   : ossimImageSourceFilter(inputSource),
-     theTile(NULL),
-     theFilterRadius(filter_radius)
-{
-   initialize();
-}
-
-ossimDespeckleFilter::~ossimDespeckleFilter()
-{
-   theTile = 0;
-}
-
-ossimRefPtr<ossimImageData> 
-ossimDespeckleFilter::getTile(const ossimIrect& tileRect,ossim_uint32 resLevel)
-{
-   if (!theInputConnection) 
-      return NULL;
-
-   if (!isSourceEnabled())
-      return theInputConnection->getTile(tileRect, resLevel);
-   
-   if (!theTile.valid())
-   {
-      allocate();
-      if (!theTile.valid())  // Throw exception???
-         return theInputConnection->getTile(tileRect, resLevel);
-   }
-   
-   // Fetch input tile with kernel margins:
-   ossimIrect requestRect(tileRect.ul().x - theFilterRadius,
-                          tileRect.ul().y - theFilterRadius,
-                          tileRect.lr().x + theFilterRadius,
-                          tileRect.lr().y + theFilterRadius);
-   ossimRefPtr<ossimImageData> inputTile = theInputConnection->getTile(requestRect, resLevel);
-   if (!inputTile.valid())
-      return NULL;
-
-   ossim_uint32 w  = tileRect.width();
-   ossim_uint32 h  = tileRect.height();
-   ossim_uint32 tw = theTile->getWidth();
-   ossim_uint32 th = theTile->getHeight();
-   theTile->setWidth(w);
-   theTile->setHeight(h);
-   if((w*h)!=(tw*th))
-      theTile->initialize();
-      
-   theTile->makeBlank();
-   theTile->setOrigin(tileRect.ul());
-   
-   ossimDataObjectStatus status = inputTile->getDataObjectStatus();
-   if ((status == OSSIM_NULL) || (status == OSSIM_EMPTY))
-      return inputTile;
-
-   switch(inputTile->getScalarType())
-   {
-   case OSSIM_UCHAR:
-      despeckle(static_cast<ossim_uint8>(0), inputTile);
-      break;
-   
-   case OSSIM_USHORT16:
-   case OSSIM_USHORT11:
-      despeckle(static_cast<ossim_uint16>(0), inputTile);
-      break;
-
-   case OSSIM_SSHORT16:
-      despeckle(static_cast<ossim_sint16>(0), inputTile);
-      break;
-
-   case OSSIM_FLOAT:
-   case OSSIM_NORMALIZED_FLOAT:
-      despeckle(static_cast<float>(0), inputTile);
-      break;
-
-   case OSSIM_DOUBLE:
-   case OSSIM_NORMALIZED_DOUBLE:
-      despeckle(static_cast<double>(0), inputTile);
-      break;
-
-   default:
-      theTile->loadTile(inputTile.get());
-   }
-   
-   theTile->validate();
-   return theTile;
-}
-   
-template <class T>
-void ossimDespeckleFilter::despeckle(T /* dummyVariable */, ossimRefPtr<ossimImageData> inputTile)
-{
-   ossimIpt inUL  (inputTile->getImageRectangle().ul());
-   ossimIpt inLR  (inputTile->getImageRectangle().lr());
-   ossimIpt outUL (theTile->getImageRectangle().ul());
-   ossimIpt outLR (theTile->getImageRectangle().lr());
-   long inWidth   = inputTile->getWidth();
-   long outWidth  = theTile->getWidth();
-   long num_bands = theTile->getNumberOfBands();
-   
-      // Loop over all bands first:
-   for(long b = 0; b < num_bands; ++b)
-   {                  
-      const T* inbuf = (const T*) inputTile->getBuf(b);
-      T* outBuf = (T*) theTile->getBuf(b);
-      T null_pixel = (T) inputTile->getNullPix(b);
-
-      for (long y=outUL.y; y<=outLR.y; y++)
-      {
-         for (long x=outUL.x; x<=outLR.x; x++)
-         {
-            bool found_valid = false;
-            long idx = (y - inUL.y)*inWidth + x - inUL.x; // index to input buffer
-            long odx = (y-outUL.y)*outWidth + x - outUL.x;// index to output buffer
-          
-            T pixel = inbuf[idx];
-            if (pixel != null_pixel)
-            {
-               // Inside loop over input "kernel" pixels centered at x, y:
-               for (long iy=-theFilterRadius; (iy<=theFilterRadius) && !found_valid; iy++)
-               {
-                  // Compute row number in image space and skip this row if outside input tile:
-                  long row = y + iy;
-                  if ((row < inUL.y) || (row > inLR.y))
-                     continue;
-
-                  for (long ix=-theFilterRadius; (ix<=theFilterRadius) && !found_valid; ix++)
-                  {
-                     // Compute column number in image space and skip this col if outside input tile:
-                     long col = x + ix;
-                     if ((col < inUL.x) || (col > inLR.x))
-                        continue;
-
-                     // Compute offset into input buffer for the neighbor pixel. If we aren't at the 
-                     // kernel center, consider if valid neighbor was found:
-                     idx = (row - inUL.y)*inWidth + col - inUL.x;
-                     if ( ((iy != 0) || (ix != 0)) && (inbuf[idx] != null_pixel) )
-                        found_valid = true;
-                  }
-               }
-            }
-
-            // Finished scanning neighborhood. Save output to tile buffer:
-            if (found_valid)
-               outBuf[odx] = pixel;
-            else
-               outBuf[odx] = null_pixel;
-         }
-      }
-   }
-}
-
-void ossimDespeckleFilter::initialize()
-{
-   ossimImageSourceFilter::initialize();
-   theTile = NULL;
-}
-
-void ossimDespeckleFilter::allocate()
-{
-   if(theInputConnection)
-   {
-      theTile = ossimImageDataFactory::instance()->create(this, theInputConnection);
-      theTile->initialize();
-   }
-}
-
-bool ossimDespeckleFilter::saveState(ossimKeywordlist& kwl, const char* prefix) const
-{
-   kwl.add(prefix, FILTER_RADIUS_KW, theFilterRadius, true);
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
-
-
-bool ossimDespeckleFilter::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   const char* lookup = kwl.find(prefix, FILTER_RADIUS_KW);
-   if (lookup)
-      theFilterRadius = ossimString(lookup).toInt32();
-
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
-
-void ossimDespeckleFilter::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   ossimString name = property->getName();
-   if(name == "Filter Radius")
-      theFilterRadius = property->valueToString().toInt32();
-   else
-      ossimImageSourceFilter::setProperty(property);
-}
-
-ossimRefPtr<ossimProperty> ossimDespeckleFilter::getProperty(const ossimString& name)const
-{
-   if(name == "Filter Radius")
-   {
-      ossimProperty* prop = new ossimNumericProperty(name, ossimString::toString(theFilterRadius), 1, 16.0);
-      prop->setCacheRefreshBit();
-      return prop;
-   }
-   return ossimImageSourceFilter::getProperty(name);
-}
-
-void ossimDespeckleFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageSourceFilter::getPropertyNames(propertyNames);
-   propertyNames.push_back("Filter Radius");
-}
-
diff --git a/src/ossim/imaging/ossimDoqqTileSource.cpp b/src/ossim/imaging/ossimDoqqTileSource.cpp
deleted file mode 100644
index 542233b..0000000
--- a/src/ossim/imaging/ossimDoqqTileSource.cpp
+++ /dev/null
@@ -1,260 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimDoqqTileSource.cpp 21631 2012-09-06 18:10:55Z dburken $
-#include <ossim/imaging/ossimDoqqTileSource.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimContainerProperty.h>
-#include <ossim/imaging/ossimGeneralRasterInfo.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/support_data/ossimDoqq.h>
-
-RTTI_DEF1(ossimDoqqTileSource,
-          "ossimDoqqTileSource",
-          ossimGeneralRasterTileSource);
-
-ossimDoqqTileSource::ossimDoqqTileSource()
-   :theHeaderInformation(0)
-{
-}
-
-ossimDoqqTileSource::~ossimDoqqTileSource()
-{
-   theHeaderInformation = 0;
-}
-
-bool ossimDoqqTileSource::open(const ossimFilename& filename)
-{
-   bool result = false;
-   
-   theHeaderInformation = new ossimDoqq(filename);
-   if(theHeaderInformation->errorStatus() == ossimDoqq::OSSIM_ERROR)
-   {
-      theHeaderInformation = 0;
-      
-      return result;
-   }
-   else
-   {
-     // Set the Acquisition Date
-     theAcqDate = theHeaderInformation->theAcqYear;
-     theAcqDate += "-";
-     theAcqDate += theHeaderInformation->theAcqMonth;
-     theAcqDate += "-";
-     theAcqDate += theHeaderInformation->theAcqDay;
-
-     vector<ossimFilename> f;
-     f.push_back(filename);
-     ossimGeneralRasterInfo genRasterInfo(f,
-					  OSSIM_UCHAR,
-					  OSSIM_BIP,
-					  theHeaderInformation->theRgb,
-					  theHeaderInformation->theLine,
-					  theHeaderInformation->theSample,
-					  theHeaderInformation->theHeaderSize,
-					  ossimGeneralRasterInfo::NONE,
-					  0);
-     
-     result = ossimGeneralRasterTileSource::open(genRasterInfo);
-   }
-
-   return result;
-} 
-
-//**************************************************************************************************
-//! Returns the image geometry object associated with this tile source or NULL if non defined.
-//! The geometry contains full-to-local image transform as well as projection (image-to-world)
-//**************************************************************************************************
-ossimRefPtr<ossimImageGeometry> ossimDoqqTileSource::getImageGeometry()
-{
-   if (theGeometry.valid()) return theGeometry;
-   
-   if(theHeaderInformation.valid())
-   {
-      ossimKeywordlist kwl;
-      const char* prefix = 0; // legacy
-
-      ossimString proj  = theHeaderInformation->theProjection.trim().upcase();
-      ossimString datum = theHeaderInformation->theDatum.trim().upcase();
-
-      if(proj == ossimString("UTM") || proj == ossimString("1"))
-      {
-         kwl.add(prefix,
-                 ossimKeywordNames::TYPE_KW,
-                 "ossimUtmProjection",
-                 true);
-         kwl.add(prefix,
-                 ossimKeywordNames::ZONE_KW,
-                 theHeaderInformation->theUtmZone,
-                 true);
-      }
-      else
-      {
-         return ossimRefPtr<ossimImageGeometry>();
-      }
-
-      if(datum == ossimString("NAR") || datum == ossimString("4"))
-      {
-         kwl.add(prefix,
-                 ossimKeywordNames::DATUM_KW,
-                 "NAR-C", // North American Conus 1983
-                 true);
-      }
-      else if(datum == ossimString("NAS") || datum == ossimString("1"))
-      {
-         kwl.add(prefix,
-                 ossimKeywordNames::DATUM_KW,
-                 "NAS-C", // North American Conus 1927
-                 true);
-      }
-      else if(datum == ossimString("2"))
-      {
-         kwl.add(prefix,
-                 ossimKeywordNames::DATUM_KW,
-                 "WGD", // WGS 72
-                 true);
-      }
-      else if(datum == ossimString("3"))
-      {
-         kwl.add(prefix,
-                 ossimKeywordNames::DATUM_KW,
-                 "WGE", // WGS 84
-                 true);
-      }
-      else
-      {
-         return ossimRefPtr<ossimImageGeometry>();
-      }
-
-      kwl.add(prefix,
-              ossimKeywordNames::METERS_PER_PIXEL_X_KW,
-              theHeaderInformation->theGsd.x,
-              true);
-
-      kwl.add(prefix,
-              ossimKeywordNames::METERS_PER_PIXEL_Y_KW,
-              theHeaderInformation->theGsd.y,
-              true);
-      kwl.add(prefix,
-              ossimKeywordNames::TIE_POINT_EASTING_KW,
-//            theHeaderInformation->theUE + (theHeaderInformation->theGsd/2.0),
-	      theHeaderInformation->theEasting,
-              true);
-
-      kwl.add(prefix,
-              ossimKeywordNames::TIE_POINT_NORTHING_KW,
-//            theHeaderInformation->theUN - (theHeaderInformation->theGsd/2.0),
-	      theHeaderInformation->theNorthing,
-              true);
-
-      // Capture this for next time.
-      theGeometry = new ossimImageGeometry;
-      theGeometry->loadState(kwl, prefix);
-
-      // Set image things the geometry object should know about.
-      initImageParameters( theGeometry.get() );
-      
-      return theGeometry;
-   }
-   return ossimRefPtr<ossimImageGeometry>();
-}
-
-ossimRefPtr<ossimProperty> ossimDoqqTileSource::getProperty(const ossimString& name)const
-{
-	if(name == "acquisition_date")
-	{
-		if(theHeaderInformation.valid())
-		{
-			std::stringstream out;
-			out << std::setw(4) << std::setfill(' ') << theHeaderInformation->theAcqYear.c_str()
-			<< std::setw(2) << setfill('0') << theHeaderInformation->theAcqMonth.c_str()
-			<< std::setw(2) << setfill('0') << theHeaderInformation->theAcqDay.c_str();
-			return new ossimStringProperty("acquisition_date", out.str());
-		}
-		return 0;
-	}
-	else if(name == "file_type")
-	{
-		return new ossimStringProperty("file_type", "DOQQ");
-	}
-	return ossimImageHandler::getProperty(name);
-}
-
-void ossimDoqqTileSource::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-	ossimImageHandler::getPropertyNames(propertyNames);
-	propertyNames.push_back("acquisition_date");
-	propertyNames.push_back("file_type");
-	
-}
-
-bool ossimDoqqTileSource::loadState(const ossimKeywordlist& kwl,
-                                    const char* prefix)
-{
-   const char* lookup = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
-   if(!ossimImageHandler::loadState(kwl, prefix))
-   {
-      return false;
-   }
-
-   if(lookup)
-   {
-      theHeaderInformation = new ossimDoqq(ossimFilename(lookup));
-      if(theHeaderInformation->errorStatus() != ossimDoqq::OSSIM_OK)
-      {
-         theHeaderInformation = 0;
-         return false;
-      }
-      else
-      {
-         ossimFilename filename(lookup);
-         vector<ossimFilename> f;
-         f.push_back(filename);
-         ossimGeneralRasterInfo genRasterInfo(f,
-                                              OSSIM_UCHAR,
-                                              OSSIM_BIP,
-                                              theHeaderInformation->theRgb,
-                                              theHeaderInformation->theLine,
-                                              theHeaderInformation->theSample,
-                                              theHeaderInformation->theHeaderSize,
-                                              ossimGeneralRasterInfo::NONE,
-                                              0);
-         return open(genRasterInfo);
-      }
-   }
-   else
-   {
-      return false;
-   }
-   
-   return true;
-}
-
-ossimString ossimDoqqTileSource::getShortName()const
-{
-   return ossimString("doqq");
-}
-
-ossimString ossimDoqqTileSource::getLongName()const
-{
-   return ossimString("doqq handler");
-}
-
-bool ossimDoqqTileSource::open(const ossimGeneralRasterInfo& info)
-{
-   return ossimGeneralRasterTileSource::open(info);
-}
-
-ossimString ossimDoqqTileSource::acqdate() const
-{
-   return theAcqDate;
-}
diff --git a/src/ossim/imaging/ossimDtedTileSource.cpp b/src/ossim/imaging/ossimDtedTileSource.cpp
deleted file mode 100644
index d6bc7fa..0000000
--- a/src/ossim/imaging/ossimDtedTileSource.cpp
+++ /dev/null
@@ -1,682 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Contains class declaration for ossimDtedTileSource.
-//
-//********************************************************************
-// $Id: ossimDtedTileSource.cpp 21631 2012-09-06 18:10:55Z dburken $
-
-#include <ossim/imaging/ossimDtedTileSource.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimEllipsoid.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimEquDistCylProjection.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimTiffTileSource.h>
-#include <ossim/support_data/ossimDtedInfo.h>
-#include <cstdlib>
-#include <iostream>
-using namespace std;
-
-RTTI_DEF1(ossimDtedTileSource, "ossimDtedTileSource", ossimImageHandler)
-
-// Static trace for debugging
-static ossimTrace traceDebug("ossimDtedTileSource:debug");
-
-
-ossimDtedTileSource::ossimDtedTileSource()
-   :
-      ossimImageHandler(),
-      theTile(NULL),
-      theFileStr(),
-      theTileWidth(0),
-      theTileHeight(0),
-      theNumberOfLines(0),
-      theNumberOfSamps(0),
-      theOffsetToFirstDataRecord(0),
-      theDataRecordSize(0),
-      theMinHeight(0),
-      theMaxHeight(0),
-      thePostSpacing(0.0, 0.0),
-      theSwapBytesFlag(false)
-{
-   if (ossim::byteOrder() == OSSIM_LITTLE_ENDIAN)
-   {
-      theSwapBytesFlag = true;
-   }
-
-   // Set the tile size to the default.
-   ossimIpt defaultTileSize;
-   ossim::defaultTileSize(defaultTileSize);
-   theTileWidth  = static_cast<ossim_uint32>(defaultTileSize.x);
-   theTileHeight = static_cast<ossim_uint32>(defaultTileSize.y);
-   
-   // Construction not complete.  Users should call "open" method.
-}
-
-ossimDtedTileSource::~ossimDtedTileSource()
-{
-   close();
-}
-
-ossimString ossimDtedTileSource::getShortName()const
-{
-   return ossimString("dted");
-}
-
-ossimString ossimDtedTileSource::getLongName()const
-{
-   return ossimString("dted reader");
-}
-
-ossimRefPtr<ossimImageData> ossimDtedTileSource::getTile(
-   const  ossimIrect& tile_rect, ossim_uint32 resLevel)
-{
-   if (!theTile.valid())
-   {
-      allocate(); // First getTile call or after changeTileSize.
-      if (!theTile.valid())
-      {
-         return ossimRefPtr<ossimImageData>(); // Throw exception???
-      }
-   }
-
-   // Image rectangle must be set prior to calling getTile.
-   theTile->setImageRectangle(tile_rect);
-   
-   if ( getTile( theTile.get(), resLevel ) == false )
-   {
-      if (theTile->getDataObjectStatus() != OSSIM_NULL)
-      {
-         theTile->makeBlank();
-      }
-   }
-
-   return theTile;
-}
-
-bool ossimDtedTileSource::getTile(ossimImageData* result,
-                                  ossim_uint32 resLevel)
-{
-   bool status = false;
-   
-   //---
-   // Not open, this tile source bypassed, or invalid res level,
-   // return a blank tile.
-   //---
-   if( isOpen() && isSourceEnabled() && isValidRLevel(resLevel) &&
-       result && (result->getNumberOfBands() == getNumberOfOutputBands()) )
-   {
-      result->ref(); // Increment ref count.
-
-      //---
-      // Check for overview tile.  Some overviews can contain r0 so always
-      // call even if resLevel is 0.  Method returns true on success, false
-      // on error.
-      //---
-      status = getOverviewTile(resLevel, result);
-
-      if ( !status )  // Did not get an overview tile.
-      {  
-         ossimIrect image_rect = getImageRectangle(resLevel);
-
-         ossimIrect tile_rect = result->getImageRectangle();
-         
-         //---
-         // See if any point of the requested tile is in the image.
-         //---
-         if ( tile_rect.intersects(image_rect) )
-         {
-            ossimIrect clip_rect = tile_rect.clipToRect(image_rect);
-            
-            if ( !tile_rect.completely_within(clip_rect) )
-            {
-               // Start with a blank tile.
-               result->makeBlank();
-            }
-
-            // Load the tile buffer with data from the dted cell.
-            status = fillBuffer(tile_rect, clip_rect, result);
-            
-         } // End of if ( tile_rect.intersects(image_rect) )
-      }
-
-       result->unref(); // Decrement ref count.
-   }
-   
-   return status;
-}
-
-//*******************************************************************
-// Private Method:
-//*******************************************************************
-bool ossimDtedTileSource::fillBuffer(const ossimIrect& tile_rect,
-                                     const ossimIrect& clip_rect,
-                                     ossimImageData* tile)
-{
-   //***
-   // NOTE:
-   // Elevation posts are organized positive line up.
-   // The "tile_rect" and "clip_rect" is organized positive line down.
-   //***
-
-   const ossim_int32 TILE_WIDTH = tile->getWidth();
-   
-   //***
-   // Position the file pointer to the first record needed.
-   // Posts are organized positive line up so we're going to start at
-   // the lower left side of the cell so all reads are going forward in
-   // the file.
-   //***
-   ossim_int32 seek_position = theOffsetToFirstDataRecord +
-                         (clip_rect.ul().x * theDataRecordSize);
-   seek_position += DATA_RECORD_OFFSET_TO_POST +
-                    (theNumberOfLines - 1 - clip_rect.lr().y) * 2;
-   
-   //***
-   // Get a pointer positioned at the first valid pixel in
-   // the tile.  Tiles are organized positive line down.
-   //***
-   ossim_sint16* d = static_cast<ossim_sint16*>(tile->getBuf());
-   
-   // Loop in the longitude or sample direction.
-   for (ossim_int32 samp = clip_rect.ul().x; samp <= clip_rect.lr().x; samp++)
-   {
-      ossim_int32 d_offset = (clip_rect.lr().y - tile_rect.ul().y) *
-                       TILE_WIDTH +
-                       (samp - tile_rect.ul().x);
-
-      theFileStr.seekg(seek_position, ios::beg); // Seek to the first post.
-
-      for (ossim_int32 line = clip_rect.lr().y; line >= clip_rect.ul().y; line--)
-      {
-         // Grab all the post needed from the column.
-         ossim_uint16 temp;
-         ossim_sint16 s;
-         theFileStr.read((char*)&temp, POST_SIZE);
-         s = convertSignedMagnitude(temp);
-         d[d_offset] = s;
-         d_offset -= TILE_WIDTH;
-      }
-      seek_position += theDataRecordSize;
-   }
-
-   tile->validate();
-   
-   return true;
-}
-
-ossim_uint32 ossimDtedTileSource::getNumberOfOutputBands()const
-{
-   return getNumberOfInputBands();
-}
-
-ossimIrect
-ossimDtedTileSource::getImageRectangle(ossim_uint32 reduced_res_level) const
-{
-   return ossimIrect(0,
-                     0,
-                     getNumberOfSamples(reduced_res_level) - 1,
-                     getNumberOfLines(reduced_res_level)   - 1);
-}
-
-bool ossimDtedTileSource::isOpen()const
-{
-   return theFileStr.is_open();
-}
-
-void ossimDtedTileSource::close()
-{
-   theFileStr.close();
-}
-
-bool ossimDtedTileSource::open()
-{
-   static const char MODULE[] = "ossimDtedTileSource::open";
-
-   if (traceDebug())
-   {
-      CLOG << "DEBUG:"
-           << "\nAttempting to parse file:  " << theImageFile.c_str()
-           << endl;
-   }
-   
-   if (!theImageFile.exists()) // See if file exists.
-   {
-      if (traceDebug())
-      {
-         CLOG << "DEBUG:"
-              << "\nFile " << theImageFile.c_str() << " does not exist!"
-              << endl;
-      }
-      return false;
-   }
-
-   // Open up the file for reading.
-   theFileStr.open(theImageFile.c_str(), ios::in | ios::binary);
-   if (!theFileStr)
-   {
-      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-      
-	  if(traceDebug())
-	  {
-		  ossimNotify(ossimNotifyLevel_WARN) << MODULE << " ERROR!"
-											 << "\nCould not open file:  " << theImageFile.c_str()
-											 << "\nReturning..." << endl;
-		  CLOG << "returning with error..." << endl;
-	  }
-      return false;
-   }
-                                   
-   if(!theFileStr)
-   {
-      if (traceDebug())
-      {
-         CLOG << "DEBUG:"
-              << "\nCannot open:  " << theImageFile.c_str()
-              << endl;
-      }
-      theFileStr.close();
-      return false;
-   }
-   m_vol.parse(theFileStr);
-   m_hdr.parse(theFileStr);
-   m_uhl.parse(theFileStr);
-   m_dsi.parse(theFileStr);
-   m_acc.parse(theFileStr);
-   
-   //***
-   // Check for errors.  Must have uhl, dsi and acc records.  vol and hdr
-   // are for magnetic tape only; hence, may or may not be there.
-   //***
-   if (m_uhl.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR ||
-       m_dsi.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR ||
-       m_acc.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
-   {
-      if (traceDebug())
-      {
-         CLOG << "DEBUG:"
-              << "\nError parsing file:  " << theImageFile.c_str()
-              << "\nPossibly not a dted file.\n";
-      }
-      
-      theFileStr.close();
-      return false;
-   }
-
-   // Get the cell specific info needed for later.
-   theNumberOfLines = m_uhl.numLatPoints();
-   theNumberOfSamps = m_uhl.numLonLines();
-   thePostSpacing.x = m_uhl.lonInterval();
-   thePostSpacing.y = m_uhl.latInterval();
-   theOffsetToFirstDataRecord = m_acc.stopOffset();
-   theDataRecordSize = DATA_RECORD_OFFSET_TO_POST +
-                       (theNumberOfLines * sizeof(ossim_sint16)) +
-                       DATA_RECORD_CHECKSUM_SIZE;
-
-   //---
-   // Note:
-   // Complete open calls loadMetaData which we have overriden to check for
-   // dot omd or dot statistics file.  If not there it will call
-   // gatherStatistics which will scan the file for min/max values.
-   //---
-   completeOpen();
-
-   if (traceDebug())
-   {
-      CLOG << "DEBUG:"
-           << "\nNull pix:  " << getNullPixelValue(0)
-           << "\nMin  pix:  " << getMinPixelValue(0)
-           << "\nMax  pix:  " << getMaxPixelValue(0)
-           << "\ntheNumberOfLines:  " << theNumberOfLines
-           << "\ntheNumberOfSamps:  " << theNumberOfSamps
-           << "\ntheOffsetToFirstDataRecord:  " << theOffsetToFirstDataRecord
-           << "\ntheDataRecordSize:  " << theDataRecordSize << "\n";
-   }
-
-   return true;
-}
-
-void ossimDtedTileSource::allocate()
-{
-   //---
-   // Set up the tiles.  Note the blank tile will not get initialized to save
-   // memory.  This includes setting the min and max pixel value gathered
-   // from the statistics.
-   //---
-   theTile = ossimImageDataFactory::instance()->create(this, this);
-   if(theTile.valid())
-   {
-      theTile->initialize();
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG:"
-         << "\ntheTile:\n" << *theTile << "\n";
-   }
-}
-
-bool ossimDtedTileSource::saveState(ossimKeywordlist& kwl,
-                                    const char* prefix) const
-{
-   // Currently nothing to do here.
-   return ossimImageHandler::saveState(kwl, prefix);
-}
-
-bool ossimDtedTileSource::loadState(const ossimKeywordlist& kwl,
-                                    const char* prefix)
-{
-   if (ossimImageHandler::loadState(kwl, prefix))
-   {
-      if (ossimImageHandler::open(theImageFile))
-      {
-         return true;
-      }
-   }
-
-   return false;
-}
-
-//**************************************************************************************************
-// Returns the image geometry object associated with this tile source or NULL if not defined.
-// The geometry contains full-to-local image transform as well as projection (image-to-world)
-//**************************************************************************************************
-ossimRefPtr<ossimImageGeometry> ossimDtedTileSource::getImageGeometry()
-{
-   if ( theGeometry.valid() )
-      return theGeometry;
-
-   // Compute the projection tie point (UL corner of dted cell). The UHL supplies the SW (LL) corner
-   // coordinates, so need to compute the UL lat from the cell spacing:
-   const ossimDatum* datum = ossimDatumFactory::instance()->wgs84();
-   ossim_float64 ul_lat = m_uhl.latOrigin() + (m_uhl.latInterval() * (m_uhl.numLatPoints()-1.0));
-   ossim_float64 ul_lon = m_uhl.lonOrigin();
-   ossimGpt tie(ul_lat, ul_lon, 0.0, datum);
-
-   //---
-   // This code is backed out as it affects the corner.
-   // E.g.: image0.ur_lon:  -88.999999999995
-   // Should be -89.0
-   // Used ossimImageGeometry::::getMetersPerPixel for a center of the image gsd. (drb)
-   // 
-   // We also need to define an origin for the projection as the center of the cell for proper GSD
-   // calculation (OLK 01/11: Used to set origin at 0,0 causing incorrect meters GSD to be
-   // computed)
-   // ossim_float64 mid_lat = m_uhl.latOrigin() + (m_uhl.latInterval()*m_uhl.numLatPoints()/2.0);
-   // ossim_float64 mid_lon = m_uhl.lonOrigin() + (m_uhl.lonInterval()*m_uhl.numLonLines()/2.0);
-   // ossimGpt origin (mid_lat, mid_lon, 0.0, datum);
-   //---
-   ossimGpt origin (0.0, 0.0, 0.0, datum);
-
-   // Make an Equidistant Cylindrical projection.
-   ossimRefPtr<ossimEquDistCylProjection> eq =
-      new ossimEquDistCylProjection(*(datum->ellipsoid()));
-      
-      // Set the scale:
-   eq->setOrigin(origin);
-   eq->setUlTiePoints(tie);
-   ossimDpt gsd(m_uhl.lonInterval(), m_uhl.latInterval());
-   eq->setDecimalDegreesPerPixel(gsd);
-
-   // Give it to the geometry object.
-   ossimRefPtr<ossimProjection> proj = eq.get();
-   
-   // Make the geometry:
-   theGeometry = new ossimImageGeometry;
-   
-   // Set the projection.
-   theGeometry->setProjection( proj.get() );
-
-   // Set image things the geometry object should know about.
-   initImageParameters( theGeometry.get() );
-   
-   return theGeometry;
-}
-
-ossimScalarType ossimDtedTileSource::getOutputScalarType() const
-{
-   return OSSIM_SSHORT16;  // Always signed 16 bit.
-}
-
-ossim_uint32 ossimDtedTileSource::getTileWidth() const
-{
-   return theTileWidth;
-}
-
-ossim_uint32 ossimDtedTileSource::getTileHeight() const
-{
-   return theTileHeight;
-}
-
-ossim_uint32 ossimDtedTileSource::getNumberOfLines(ossim_uint32 reduced_res_level) const
-{
-   if (reduced_res_level == 0)
-   {
-      return theNumberOfLines;
-   }
-   else if (theOverview.valid())
-   {
-      return theOverview->getNumberOfLines(reduced_res_level);
-   }
-
-   return 0;
-}
-
-ossim_uint32 ossimDtedTileSource::getNumberOfSamples(ossim_uint32 reduced_res_level) const
-{
-   if (reduced_res_level == 0)
-   {
-      return theNumberOfSamps;
-   }
-   else if (theOverview.valid())
-   {
-      return theOverview->getNumberOfSamples(reduced_res_level);
-   }
-
-   return 0;
-}
-
-void ossimDtedTileSource::loadMetaData()
-{
-   ossimKeywordlist kwl;
-   const char* min_str = 0;
-   const char* max_str = 0;
-   
-   ossimFilename f = theImageFile.fileNoExtension();
-
-   // Check for omd file.
-   f.setExtension("omd");
-   if ( f.exists() )
-   {
-      kwl.addFile(f);
-      min_str = kwl.find("band1.min_value");
-      max_str = kwl.find("band1.max_value");
-   }
-
-   if ( !min_str || !max_str )
-   {
-      f.setExtension("statistics");
-      if ( f.exists() )
-      {
-         kwl.addFile(f);
-         min_str = kwl.find(ossimKeywordNames::MIN_VALUE_KW);
-         max_str = kwl.find(ossimKeywordNames::MAX_VALUE_KW);
-      }
-   }
-
-   if ( min_str || max_str )
-   {
-      theMinHeight = atoi(min_str);
-      theMaxHeight = atoi(max_str);
-   } 
-   else
-   {
-      gatherStatistics(false);
-   }
-}
-
-void ossimDtedTileSource::gatherStatistics(bool writeStatsFile)
-{
-   // Scan the cell and gather the statistics...
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimDtedTileSource::gatherStatistics() scanning for min/max"
-         << "\nThis may take a while...\n";
-   }
-   
-   // Start off with the min and max pegged.
-   theMinHeight =  32767;
-   theMaxHeight = -32767;
-   
-   // Put the file pointer at the start of the first elevation post.
-   theFileStr.seekg(theOffsetToFirstDataRecord, ios::beg);
-   
-   //---
-   // Loop through all records and scan for lowest min and highest max.
-   // Each record contains a row of latitude points for a given longitude.
-   // There are eight bytes in front of the post and four checksum bytes at
-   // the end so ignore them.
-   //---
-   for (ossim_uint32 i=0; i<theNumberOfSamps; i++)  // longitude direction
-   {
-      theFileStr.seekg(DATA_RECORD_OFFSET_TO_POST, ios::cur);
-      
-      for (ossim_uint32 j=0; j<theNumberOfLines; j++) // latitude direction
-      {
-         ossim_uint16 temp;
-         ossim_sint16 s;
-         theFileStr.read((char*)&temp, POST_SIZE);
-         s = convertSignedMagnitude(temp);
-         if (s < theMinHeight && s != NULL_PIXEL) theMinHeight = s;
-         if (s > theMaxHeight) theMaxHeight = s;
-      }
-      
-      theFileStr.seekg(DATA_RECORD_CHECKSUM_SIZE, ios::cur);
-   }
-   
-   if ( writeStatsFile )
-   {
-      // Add the stats to the keyword list.
-      ossimKeywordlist kwl;
-      kwl.add(ossimKeywordNames::MIN_VALUE_KW, theMinHeight);
-      kwl.add(ossimKeywordNames::MAX_VALUE_KW, theMaxHeight);
-      
-      // Write out the statistics file.
-      ossimFilename f = theImageFile.fileNoExtension();
-      f.setExtension("statistics");
-      kwl.write( f.c_str() );
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimDtedTileSource::gatherStatistics DEBUG:"
-         << "\ntheMinHeight:  " << theMinHeight
-         << "\ntheMaxHeight:  " << theMaxHeight
-         << "\n";
-   }
-}
-
-ossim_uint32 ossimDtedTileSource::getImageTileWidth() const
-{
-   return 0;
-}
-
-ossim_uint32 ossimDtedTileSource::getImageTileHeight() const
-{
-   return 0;
-}
-
-ossim_uint32 ossimDtedTileSource::getNumberOfInputBands() const
-{
-   return 1;
-}
-
-double ossimDtedTileSource::getNullPixelValue(ossim_uint32 /* band */)const
-{
-   if(theMetaData.getNumberOfBands())
-   {
-      return theMetaData.getNullPix(0);
-   }
-   return -32767.0;
-}
-double ossimDtedTileSource::getMinPixelValue(ossim_uint32 band)const
-{
-   if(theMetaData.getNumberOfBands())
-   {
-      return theMetaData.getMinPix(band);
-   }
-   return theMinHeight;
-}
-
- double ossimDtedTileSource::getMaxPixelValue(ossim_uint32 band)const
-{
-   if(theMetaData.getNumberOfBands())
-   {
-      return theMetaData.getMaxPix(band);
-   }
-   return theMaxHeight;
-}
-
-void ossimDtedTileSource::getPostSpacing(ossimDpt& postSpacing) const
-{
-   postSpacing.x = thePostSpacing.x;
-   postSpacing.y = thePostSpacing.y;
-}
-
-ossimRefPtr<ossimProperty> ossimDtedTileSource::getProperty(
-   const ossimString& name)const
-{
-   // look in base class.
-   ossimRefPtr<ossimProperty> result = ossimImageHandler::getProperty(name);
-
-   if (result.valid() == false)
-   {
-      ossimDtedInfo info;
-      if (info.open(theImageFile))
-      {
-         result = info.getProperty(name);
-      }
-   }
-
-   return result;
-}
-
-void ossimDtedTileSource::getPropertyNames(
-   std::vector<ossimString>& propertyNames) const
-{
-   ossimImageHandler::getPropertyNames(propertyNames);
-
-   ossimDtedInfo info;
-   if (info.open(theImageFile))
-   {
-      info.getPropertyNames(propertyNames);
-   }
-}
-
-const ossimDtedTileSource& ossimDtedTileSource::operator=(const  ossimDtedTileSource& rhs)
-{
-   return rhs;
-} 
-
-ossimDtedTileSource::ossimDtedTileSource(const ossimDtedTileSource&)
-{
-}
-
diff --git a/src/ossim/imaging/ossimERSTileSource.cpp b/src/ossim/imaging/ossimERSTileSource.cpp
deleted file mode 100644
index b022ac9..0000000
--- a/src/ossim/imaging/ossimERSTileSource.cpp
+++ /dev/null
@@ -1,219 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Chong-Ket Chuah
-//
-// Description:
-//
-// Implementation for the class "ossimERSTileSource".  ossimERSTileSource
-// is used for reading ER Mapper raster file format.  The format consists
-// of a raster file with no extension and a header file with the same name 
-// as the raster file but with an .ers extension.
-//
-//*******************************************************************
-//  $Id: ossimERSTileSource.cpp 21512 2012-08-22 11:53:57Z dburken $
-
-#include <ossim/imaging/ossimERSTileSource.h>
-#include <ossim/support_data/ossimERS.h>
-
-#include <ossim/base/ossimDirectory.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/imaging/ossimImageGeometryRegistry.h>
-
-RTTI_DEF1(ossimERSTileSource, "ossimERSTileSource", ossimGeneralRasterTileSource);
-
-//*******************************************************************
-// Public Constructor:
-//*******************************************************************
-ossimERSTileSource::ossimERSTileSource()
-   :  ossimGeneralRasterTileSource(),
-      theHdr(NULL)
-{
-}
-
-//*******************************************************************
-// Public Constructor:
-//*******************************************************************
-ossimERSTileSource::ossimERSTileSource(const ossimKeywordlist& kwl,
-                                               const char* prefix)
-   :  ossimGeneralRasterTileSource(),
-      theHdr(NULL)
-{
-   if (loadState(kwl, prefix) == false)
-   {
-      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-   }
-}
-
-//*******************************************************************
-// Destructor:
-//*******************************************************************
-ossimERSTileSource::~ossimERSTileSource()
-{
-   if (theHdr)
-   {
-      delete theHdr;
-      theHdr = NULL;
-   }
-}
-
-bool ossimERSTileSource::open(const ossimFilename& fileName)
-{
-   // Open and parse the header file
-   theHdr = new ossimERS(fileName);
-   
-//   theHdr->dump(cout);
-   
-   if(theHdr->errorStatus() == ossimErrorCodes::OSSIM_ERROR)
-   {
-      delete theHdr;
-      theHdr = NULL;
-      return false;
-   }
-   else
-   {
-      vector<ossimFilename> f;
-	  ossimFilename fne;
-	  ossimFilename fpath = fileName.path();
-	  if (fpath.empty())
-		fne = fileName.fileNoExtension();
-	  else
-		fne = fpath+"/"+fileName.fileNoExtension();
-      f.push_back(fne);
-      ossimGeneralRasterInfo genRasterInfo(f,
-                                           theHdr->theCelltype,
-                                           OSSIM_BIL,
-                                           theHdr->theBands,
-                                           theHdr->theLine,
-                                           theHdr->theSample,
-                                           0,
-                                           ossimGeneralRasterInfo::NONE,
-                                           0);
-      if(theHdr->theHasNullCells)
-      {
-         ossim_uint32 i = 0;
-         ossim_uint32 bands = static_cast<ossim_uint32>(theHdr->theBands);
-         for(i = 0; i < bands; ++i)
-         {
-            genRasterInfo.getImageMetaData().setNullPix(i, theHdr->theNullCell);
-         }
-      }
-      ossimFilename metadataFile = fne;
-      metadataFile = metadataFile + ".omd";
-
-      if(metadataFile.exists())
-      {
-         ossimKeywordlist kwl;
-      
-         kwl.addFile(metadataFile.c_str());
-      
-         theMetaData.loadState(kwl);
-         ossim_uint32 i = 0;
-         ossim_uint32 bands = static_cast<ossim_uint32>(theHdr->theBands);
-         for(i = 0; i < bands; ++i)
-         {
-            if(theMetaData.getMinValuesValidFlag())
-            {
-               genRasterInfo.getImageMetaData().setMinPix(i, theMetaData.getMinPix(i));
-            }
-            if(theMetaData.getMaxValuesValidFlag())
-            {
-               genRasterInfo.getImageMetaData().setMaxPix(i, theMetaData.getMaxPix(i));
-            }
-            if(theMetaData.getNullValuesValidFlag())
-            {
-               genRasterInfo.getImageMetaData().setNullPix(i, theMetaData.getNullPix(i));
-            }
-         }
-      }
-      ossimNotify(ossimNotifyLevel_INFO)
-         << "general raster info is\n";
-      genRasterInfo.print(ossimNotify(ossimNotifyLevel_INFO));
-      ossimGeneralRasterTileSource::open(genRasterInfo);
-   }
-	   
-   return true;
-}
-   
-
-ossimRefPtr<ossimImageGeometry> ossimERSTileSource::getImageGeometry()
-{
-   if ( !theGeometry )
-   {
-      // Check for external geom:
-      theGeometry = getExternalImageGeometry();
-      
-      if ( !theGeometry )
-      {
-         
-         theGeometry = new ossimImageGeometry;
-
-         if(theHdr)
-         {
-            ossimKeywordlist kwl;
-            if ( theHdr->toOssimProjectionGeom(kwl) )
-            {
-               theGeometry->loadState(kwl);  
-            }
-         }
-
-         // At this point it is assured theGeometry is set.
-         
-         //---
-         // WARNING:
-         // Must create/set the geometry at this point or the next call to
-         // ossimImageGeometryRegistry::extendGeometry will put us in an infinite loop
-         // as it does a recursive call back to ossimImageHandler::getImageGeometry().
-         //---         
-         
-         // Check for set projection.
-         if ( !theGeometry->getProjection() )
-         {
-            // Try factories for projection.
-            ossimImageGeometryRegistry::instance()->extendGeometry(this);
-         }
-      }
-
-      // Set image things the geometry object should know about.
-      initImageParameters( theGeometry.get() );
-   }
-   return theGeometry;
-}
-
-bool ossimERSTileSource::loadState(const ossimKeywordlist& kwl,
-                                       const char* prefix)
-{
-   const char* lookup = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
-
-   if (lookup)
-   {
-      ossimFilename fileName = lookup;
-
-      bool result =  open(fileName);
-      ossimImageSource::loadState(kwl, prefix);
-      return result;
-   }
-      
-   return ossimGeneralRasterTileSource::loadState(kwl, prefix);
-}
-
-ossimString ossimERSTileSource::getShortName() const
-{
-   return ossimString("ERS");
-}
-
-ossimString ossimERSTileSource::getLongName() const
-{
-   return ossimString("ER Mapper Raster");
-}
-
-ossimString  ossimERSTileSource::className() const
-{
-   return ossimString("ossimERSTileSource");
-}
-
diff --git a/src/ossim/imaging/ossimEastingNorthingCutter.cpp b/src/ossim/imaging/ossimEastingNorthingCutter.cpp
deleted file mode 100644
index d9f6630..0000000
--- a/src/ossim/imaging/ossimEastingNorthingCutter.cpp
+++ /dev/null
@@ -1,202 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-// $Id: ossimEastingNorthingCutter.cpp 15766 2009-10-20 12:37:09Z gpotts $
-//----------------------------------------------------------------------------
-
-#include <sstream>
-#include <ossim/imaging/ossimEastingNorthingCutter.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimTrace.h>
-
-RTTI_DEF2(ossimEastingNorthingCutter, "ossimEastingNorthingCutter", ossimRectangleCutFilter, ossimViewInterface);
-
-static ossimTrace traceDebug(ossimString("ossimEastingNorthingCutter:debug"));
-
-
-ossimEastingNorthingCutter::ossimEastingNorthingCutter(ossimObject* owner,
-                                                       ossimImageSource* inputSource)
-   :ossimRectangleCutFilter(owner,
-                            inputSource),
-    ossimViewInterface(0),
-    theViewProjection(0)
-{
-   theUlEastingNorthing.makeNan();
-   theLrEastingNorthing.makeNan();
-   theCutType = OSSIM_RECTANGLE_NULL_OUTSIDE;
-}
-
-ossimEastingNorthingCutter::ossimEastingNorthingCutter(ossimImageSource* inputSource)
-   :ossimRectangleCutFilter(inputSource),
-    ossimViewInterface(0),
-    theViewProjection(0)
-{
-   theUlEastingNorthing.makeNan();
-   theLrEastingNorthing.makeNan();
-   theCutType = OSSIM_RECTANGLE_NULL_OUTSIDE;
-}
-
-ossimEastingNorthingCutter::~ossimEastingNorthingCutter()
-{
-}
-
-void ossimEastingNorthingCutter::setEastingNorthingRectangle(const ossimDpt& ul,
-                                                             const ossimDpt& lr)
-{
-   theUlEastingNorthing = ul;
-   theLrEastingNorthing = lr;
-
-   transformVertices();
-}
-
-ossimDpt ossimEastingNorthingCutter::getUlEastingNorthing()const
-{
-   return theUlEastingNorthing;
-}
-
-ossimDpt ossimEastingNorthingCutter::getLrEastingNorthing()const
-{
-   return theLrEastingNorthing;
-}
-
-
-void ossimEastingNorthingCutter::initialize()
-{
-   ossimRectangleCutFilter::initialize();
-   transformVertices();
-}
-
-bool ossimEastingNorthingCutter::saveState(ossimKeywordlist& kwl,
-                                           const char* prefix)const
-{
-   kwl.add(prefix,
-           "ul_en",
-           ossimString::toString(theUlEastingNorthing.x) + " " +
-           ossimString::toString(theUlEastingNorthing.y),
-           true);
-   kwl.add(prefix,
-           "lr_en",
-           ossimString::toString(theLrEastingNorthing.x) + " " +
-           ossimString::toString(theLrEastingNorthing.y),
-           true);
-
-   return ossimRectangleCutFilter::saveState(kwl, prefix);
-}
-
-bool ossimEastingNorthingCutter::loadState(const ossimKeywordlist& kwl,
-                                           const char* prefix)
-{
-   const char *ul = kwl.find(prefix,
-                             "ul_en");
-   const char *lr = kwl.find(prefix,
-                             "lr_en");
-
-   theUlEastingNorthing.makeNan();
-   theLrEastingNorthing.makeNan();
-   
-   if(ul)
-   {
-      istringstream in(ul);
-      ossimString x;
-      ossimString y;
-      
-      in >> x >> y;
-      
-      theUlEastingNorthing.x = x.toDouble();
-      theUlEastingNorthing.y = y.toDouble();
-      
-   }
-   
-   if(lr)
-   {
-      istringstream in(lr);
-      ossimString x;
-      ossimString y;
-      
-      in >> x >> y;
-      
-      theLrEastingNorthing.x = x.toDouble();
-      theLrEastingNorthing.y = y.toDouble();
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimEastingNorthingCutter::loadState DEBUG:"
-         << "\ntheUlEastingNorthing:  " << theUlEastingNorthing
-         << "\ntheLrEastingNorthing:  " << theLrEastingNorthing
-         << endl;
-   }
-
-   return ossimRectangleCutFilter::loadState(kwl, prefix);
-}
-
-bool ossimEastingNorthingCutter::setView(ossimObject* baseObject)
-{
-   ossimProjection* tempProj = PTR_CAST(ossimProjection,
-                                        baseObject);
-   if(!tempProj)
-   {
-      return false;
-   }
-   
-
-   theViewProjection = tempProj;
-
-   transformVertices();
-
-   return true;
-}
-
-ossimObject* ossimEastingNorthingCutter::getView()
-{
-   return theViewProjection.get();
-}
-
-const ossimObject* ossimEastingNorthingCutter::getView()const
-{
-   return theViewProjection.get();
-}
-
-void ossimEastingNorthingCutter::transformVertices()
-{
-   theRectangle.makeNan();
-
-   if(theUlEastingNorthing.hasNans()||
-      theLrEastingNorthing.hasNans()||
-      (!theViewProjection))
-   {
-      return;
-   }
-
-   ossimMapProjection* mapProj = PTR_CAST(ossimMapProjection,
-                                          theViewProjection.get());
-   ossimDpt ul;
-   ossimDpt lr;
-   ossimDpt easting;
-   ossimDpt northing;
-   if(mapProj)
-   {
-      mapProj->eastingNorthingToLineSample(theUlEastingNorthing, ul);
-      mapProj->eastingNorthingToLineSample(theLrEastingNorthing, lr);
-
-      ossimDrect drect(ul.x, ul.y, lr.x, lr.y);
-
-      theRectangle = drect;
-
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimEastingNorthingCutter::transformVertices DEBUG:"
-            << "original drect:  " << drect
-            << "\ntheRectangle:  " << theRectangle
-            << endl;
-      }
-   }
-}
diff --git a/src/ossim/imaging/ossimEdgeFilter.cpp b/src/ossim/imaging/ossimEdgeFilter.cpp
deleted file mode 100644
index 89c6936..0000000
--- a/src/ossim/imaging/ossimEdgeFilter.cpp
+++ /dev/null
@@ -1,649 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimEdgeFilter.cpp 19956 2011-08-16 00:36:25Z gpotts $
-#include <ossim/imaging/ossimEdgeFilter.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/base/ossimStringProperty.h>
-
-RTTI_DEF1(ossimEdgeFilter, "ossimEdgeFilter", ossimImageSourceFilter);
-
-#define PROP_EDGE_FILTER "Edge type"
-
-ossimEdgeFilter::ossimEdgeFilter(ossimObject* owner)
-   :ossimImageSourceFilter(owner),
-    theTile(NULL),
-    theFilterType("Sobel")
-{
-}
-
-ossimEdgeFilter::ossimEdgeFilter(ossimImageSource* inputSource)
-   :ossimImageSourceFilter(inputSource),
-    theTile(NULL),
-    theFilterType("Sobel")
-{
-}
-
-ossimEdgeFilter::ossimEdgeFilter(ossimObject* owner,
-                                   ossimImageSource* inputSource)
-   :ossimImageSourceFilter(owner, inputSource),
-    theTile(NULL),
-    theFilterType("Sobel")
-{
-}
-
-ossimRefPtr<ossimImageData> ossimEdgeFilter::getTile(const ossimIrect& rect,
-                                                     ossim_uint32 resLevel)
-{
-   if(!isSourceEnabled())
-   {
-      return ossimImageSourceFilter::getTile(rect, resLevel);
-   }
-
-   // expand the rect out to cver the 3x3 horizontal and vertical
-   // kernel.
-   //
-   ossimIrect requestRect = rect;
-
-   adjustRequestRect(requestRect);
-   
-   ossimRefPtr<ossimImageData> inputData =
-      ossimImageSourceFilter::getTile(requestRect, resLevel);
-
-   if(!inputData.valid() || (!inputData->getBuf()))
-   {
-      return inputData;
-   }
-
-   if(!theTile.valid()) initialize();
-   if(!theTile.valid()) return theTile;
-      
-   theTile->setImageRectangleAndBands(rect, inputData->getNumberOfBands());
-   
-   switch(theTile->getScalarType())
-   {
-   case OSSIM_UCHAR:
-   {
-      runFilter((ossim_uint8)0,
-                inputData);
-      break;
-   }
-   case OSSIM_FLOAT:
-   case OSSIM_NORMALIZED_FLOAT:
-   {
-      runFilter((ossim_float32)0,
-                inputData);
-      break;
-   }
-   case OSSIM_USHORT16:
-   case OSSIM_USHORT11:
-   {
-      runFilter((ossim_uint16)0,
-                inputData);
-      break;
-   }
-   case OSSIM_SSHORT16:
-   {
-      runFilter((ossim_sint16)0,
-                inputData);
-      break;
-   }
-   case OSSIM_DOUBLE:
-   case OSSIM_NORMALIZED_DOUBLE:
-   {
-      runFilter((ossim_float64)0,
-                inputData);
-      break;
-   }
-   default:
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "ossimEdgeFilter::getTile WARN: Scalar type = " << theTile->getScalarType()
-                                         << " Not supported by ossimEdgeFilter" << std::endl;
-      break;
-   }
-   }
-
-   return theTile;
-}
-
-void ossimEdgeFilter::initialize()
-{
-   ossimImageSourceFilter::initialize();
-
-   theTile = NULL;
-
-   if(!isSourceEnabled())
-   {
-      return;
-   }
-   
-   theTile = ossimImageDataFactory::instance()->create(this, this);
-   if(theTile.valid())
-   {
-      theTile->initialize();
-   }
-
-}
-
-
-void ossimEdgeFilter::getFilterTypeNames(
-   std::vector<ossimString>& filterNames)const
-{
-   filterNames.push_back("Laplacian");
-   filterNames.push_back("Prewitt");
-   filterNames.push_back("Roberts");
-   filterNames.push_back("Sobel");
-   filterNames.push_back("LocalMax8");
-}
-
-ossimString ossimEdgeFilter::getFilterType()const
-{
-   return theFilterType;
-}
-
-void ossimEdgeFilter::setFilterType(const ossimString& filterType)
-{
-   ossimString tempFilterType = filterType;
-   tempFilterType = tempFilterType.downcase();
-   
-   if(tempFilterType.contains("sob"))
-   {
-      theFilterType = "Sobel";
-   }
-   else if(tempFilterType.contains("lap"))
-   {
-      theFilterType = "Laplacian";
-   }
-   else if(tempFilterType.contains("prew"))
-   {
-      theFilterType = "Prewitt";
-   }
-   else if(tempFilterType.contains("rob"))
-   {
-      theFilterType = "Roberts";
-   }
-   else if(tempFilterType.contains("localmax"))
-   {
-      theFilterType = "LocalMax8";
-   }
-   else
-   {
-      theFilterType = "Sobel";
-   }
-}
-
-void ossimEdgeFilter::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property) return;
-   
-   if(property->getName() == PROP_EDGE_FILTER)
-   {
-      theFilterType = property->valueToString();
-   }
-   else 
-   {
-      ossimImageSourceFilter::setProperty(property.get());
-   }
-
-}
-
-ossimRefPtr<ossimProperty> ossimEdgeFilter::getProperty(const ossimString& name)const
-{
-   if(name == PROP_EDGE_FILTER)
-   {
-      std::vector<ossimString> filterNames;
-      
-      getFilterTypeNames(filterNames);
-      ossimStringProperty* stringProp = new ossimStringProperty(PROP_EDGE_FILTER,
-								theFilterType,
-								false,
-								filterNames);
-      stringProp->clearChangeType();
-      stringProp->setReadOnlyFlag(false);
-      stringProp->setCacheRefreshBit();
-
-      return stringProp;
-   }
-
-   return ossimImageSourceFilter::getProperty(name);
-}
-
-void ossimEdgeFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageSourceFilter::getPropertyNames(propertyNames);
-   
-   propertyNames.push_back(PROP_EDGE_FILTER);
-}
-
-
-void ossimEdgeFilter::adjustRequestRect(ossimIrect& requestRect)const
-{
-   ossimString filterType = theFilterType;
-   filterType = filterType.downcase();
-   ossimIrect rect = requestRect;
-   if(filterType.contains("sob")||
-      filterType.contains("lap")||
-      filterType.contains("pre")||
-      filterType.contains("localmax"))
-   {
-      requestRect = ossimIrect(rect.ul().x - 1,
-                               rect.ul().y - 1,
-                               rect.lr().x + 1,
-                               rect.lr().y + 1);
-   }
-   else if(filterType.contains("rob"))
-   {
-      requestRect = ossimIrect(rect.ul().x,
-                               rect.ul().y,
-                               rect.lr().x + 1,
-                               rect.lr().y + 1);
-   }
-   else
-   {
-      requestRect = ossimIrect(rect.ul().x - 1,
-                               rect.ul().y - 1,
-                               rect.lr().x + 1,
-                               rect.lr().y + 1);
-   }
-}
-
-template <class T>
-void ossimEdgeFilter::runFilter(T dummyVariable,
-                                ossimRefPtr<ossimImageData> inputData)
-{
-   ossimString filterType = theFilterType;
-   filterType = filterType.downcase();
-   
-   if(filterType.contains("sobel"))
-   {
-      runSobelFilter(dummyVariable, inputData);
-   }
-   else if(filterType.contains("lap"))
-   {
-      runLaplacianFilter(dummyVariable, inputData);
-   }
-   else if(filterType.contains("pre"))
-   {
-      runPrewittFilter(dummyVariable, inputData);
-   }
-   else if(filterType.contains("rob"))
-   {
-      runRobertsFilter(dummyVariable, inputData);
-   }
-   else if(filterType.contains("localmax"))
-   {
-      runLocalMax8Filter(dummyVariable, inputData);
-   }
-   else 
-   {
-      theTile->makeBlank();
-   }
-}
-
-template <class T>
-void ossimEdgeFilter::runSobelFilter(T /* dummyVariable */,
-                                     ossimRefPtr<ossimImageData> inputData)
-{
-   ossim_uint32 bandIdx = 0;
-   ossim_uint32 numberOfBands = inputData->getNumberOfBands();
-   double horizontalValue = 0.0;
-   double verticalValue = 0.0;
-   double value = 0.0;
-   // ossim_uint32 valueIdx = 0;
-   ossim_uint32 x = 0;
-   ossim_uint32 y = 0;
-   ossim_uint32 width  = theTile->getWidth();
-   ossim_uint32 height = theTile->getHeight();
-   ossim_int32 rowIncrement  = inputData->getWidth();
-   ossim_int32 rowIncrement2 = 2*inputData->getWidth();
-   
-   for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
-   {
-      T* inputBuf  = static_cast<T*>(inputData->getBuf(bandIdx));
-      T* outputBuf = static_cast<T*>(theTile->getBuf(bandIdx));
-      T np         = static_cast<T>(theTile->getNullPix(bandIdx));
-      T minP       = static_cast<T>(theTile->getMinPix(bandIdx));
-      T maxP       = static_cast<T>(theTile->getMaxPix(bandIdx));
-
-      if(inputBuf&&outputBuf)
-      {
-         for(y = 0; y < height; ++y)
-         {
-            for(x = 0; x < width; ++x)
-            {
-               if( (*(inputBuf + rowIncrement + 1) != np))
-               {
-                  horizontalValue = ((double)inputBuf[0] - (double)inputBuf[rowIncrement2]) +
-                                    ((double)(inputBuf[1]*2.0) - (double)( inputBuf[rowIncrement2+1]*2.0)) +
-                                    ((double)(inputBuf[2]) - (double)(inputBuf[rowIncrement2+2]));
-
-                   verticalValue   = ((double)(inputBuf[2]) + (double)inputBuf[rowIncrement+2]*2.0 + (double)inputBuf[rowIncrement2+2]) -
-                                     (double)(inputBuf[0] + 2.0*(double)inputBuf[rowIncrement] + (double)inputBuf[rowIncrement2]);
-                  
-                  value = sqrt(horizontalValue*horizontalValue +  verticalValue*verticalValue);
-
-                  if((value == np) ||
-                     (value < minP))
-                  {
-                     *outputBuf = (static_cast<T>(minP));
-                  }
-                  else if(value > maxP)
-                  {
-                     *outputBuf = (static_cast<T>(maxP));
-                  }
-                  else
-                  {
-                     *outputBuf = (static_cast<T>(value));
-                  }
-                  
-               }
-               else
-               {
-                  *outputBuf = np;
-               }
-               ++outputBuf;
-               ++inputBuf;
-            }
-            inputBuf+=2;
-         }
-      }
-   }
-   theTile->validate();
-}
-
-template <class T>
-void ossimEdgeFilter::runPrewittFilter(T /* dummyVariable */,
-                                       ossimRefPtr<ossimImageData> inputData)
-{
-   ossim_uint32 bandIdx = 0;
-   ossim_uint32 numberOfBands = inputData->getNumberOfBands();
-   double horizontalValue = 0.0;
-   double verticalValue = 0.0;
-   double value = 0.0;
-   // ossim_uint32 valueIdx = 0;
-   ossim_uint32 x = 0;
-   ossim_uint32 y = 0;
-   ossim_uint32 width  = theTile->getWidth();
-   ossim_uint32 height = theTile->getHeight();
-   ossim_int32 rowIncrement  = inputData->getWidth();
-   ossim_int32 rowIncrement2 = 2*inputData->getWidth();
-   
-   for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
-   {
-      T* inputBuf  = static_cast<T*>(inputData->getBuf(bandIdx));
-      T* outputBuf = static_cast<T*>(theTile->getBuf(bandIdx));
-      T np         = static_cast<T>(theTile->getNullPix(bandIdx));
-      T minP       = static_cast<T>(theTile->getMinPix(bandIdx));
-      T maxP       = static_cast<T>(theTile->getMaxPix(bandIdx));
-
-      if(inputBuf&&outputBuf)
-      {
-         for(y = 0; y < height; ++y)
-         {
-            for(x = 0; x < width; ++x)
-            {
-               if( (*(inputBuf + rowIncrement + 1) != np))
-               {
-                  horizontalValue = ((double)inputBuf[0] - (double)inputBuf[rowIncrement2]) +
-                                    ((double)(inputBuf[1]) - (double)( inputBuf[rowIncrement2+1])) +
-                                    ((double)(inputBuf[2]) - (double)(inputBuf[rowIncrement2+2]));
-
-                   verticalValue   = ((double)(inputBuf[2]) + (double)inputBuf[rowIncrement+2] + (double)inputBuf[rowIncrement2+2]) -
-                                     ((double)inputBuf[0] + (double)inputBuf[rowIncrement] + (double)inputBuf[rowIncrement2]);
-                  
-                  value = sqrt(horizontalValue*horizontalValue +  verticalValue*verticalValue);
-
-                  if((value == np) ||
-                     (value < minP))
-                  {
-                     *outputBuf = (static_cast<T>(minP));
-                  }
-                  else if(value > maxP)
-                  {
-                     *outputBuf = (static_cast<T>(maxP));
-                  }
-                  else
-                  {
-                     *outputBuf = (static_cast<T>(value));
-                  }
-                  
-               }
-               else
-               {
-                  *outputBuf = np;
-               }
-               ++outputBuf;
-               ++inputBuf;
-            }
-            inputBuf+=2;
-         }
-      }
-   }
-   theTile->validate();
-}
-
-template <class T>
-void ossimEdgeFilter::runRobertsFilter(T /* dummyVariable */,
-                                       ossimRefPtr<ossimImageData> inputData)
-{
-   ossim_uint32 bandIdx = 0;
-   ossim_uint32 numberOfBands = inputData->getNumberOfBands();
-   double v1 = 0.0;
-   double v2 = 0.0;
-   double value = 0.0;
-   // ossim_uint32 valueIdx = 0;
-   ossim_uint32 x = 0;
-   ossim_uint32 y = 0;
-   ossim_uint32 width  = theTile->getWidth();
-   ossim_uint32 height = theTile->getHeight();
-   ossim_int32 rowIncrement  = inputData->getWidth();
-   
-   for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
-   {
-      T* inputBuf  = static_cast<T*>(inputData->getBuf(bandIdx));
-      T* outputBuf = static_cast<T*>(theTile->getBuf(bandIdx));
-      T np         = static_cast<T>(theTile->getNullPix(bandIdx));
-      T minP       = static_cast<T>(theTile->getMinPix(bandIdx));
-      T maxP       = static_cast<T>(theTile->getMaxPix(bandIdx));
-
-      if(inputBuf&&outputBuf)
-      {
-         for(y = 0; y < height; ++y)
-         {
-            for(x = 0; x < width; ++x)
-            {
-               if( (*inputBuf) != np)
-               {
-                  v1 = (double)inputBuf[0] - (double)(inputBuf[rowIncrement+1]);
-
-                  v2   = (double)inputBuf[1] - (double)inputBuf[rowIncrement];
-                  
-                  value = sqrt(v1*v1 +  v2*v2);
-
-                  if((value == np) ||
-                     (value < minP))
-                  {
-                     *outputBuf = (static_cast<T>(minP));
-                  }
-                  else if(value > maxP)
-                  {
-                     *outputBuf = (static_cast<T>(maxP));
-                  }
-                  else
-                  {
-                     *outputBuf = (static_cast<T>(value));
-                  }
-                  
-               }
-               else
-               {
-                  *outputBuf = np;
-               }
-               ++outputBuf;
-               ++inputBuf;
-            }
-            ++inputBuf;
-         }
-      }
-   }
-   theTile->validate();
-}
-
-template <class T>
-void ossimEdgeFilter::runLaplacianFilter(T /* dummyVariable */,
-                                         ossimRefPtr<ossimImageData> inputData)
-{
-   ossim_uint32 bandIdx = 0;
-   ossim_uint32 numberOfBands = inputData->getNumberOfBands();
-   // double horizontalValue = 0.0;
-   // double verticalValue = 0.0;
-   double value = 0.0;
-   // ossim_uint32 valueIdx = 0;
-   ossim_uint32 x = 0;
-   ossim_uint32 y = 0;
-   ossim_uint32 width  = theTile->getWidth();
-   ossim_uint32 height = theTile->getHeight();
-   ossim_int32 rowIncrement  = inputData->getWidth();
-   ossim_int32 rowIncrement2 = 2*inputData->getWidth();
-   
-   for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
-   {
-      T* inputBuf  = static_cast<T*>(inputData->getBuf(bandIdx));
-      T* outputBuf = static_cast<T*>(theTile->getBuf(bandIdx));
-      T np         = static_cast<T>(theTile->getNullPix(bandIdx));
-      T minP       = static_cast<T>(theTile->getMinPix(bandIdx));
-      T maxP       = static_cast<T>(theTile->getMaxPix(bandIdx));
-
-      if(inputBuf&&outputBuf)
-      {
-         for(y = 0; y < height; ++y)
-         {
-            for(x = 0; x < width; ++x)
-            {
-               if( (*(inputBuf + rowIncrement + 1) != np))
-               {
-                  
-                  value = fabs(((double)inputBuf[rowIncrement + 1]*4.0) -
-                               ((double)inputBuf[1] + (double)inputBuf[rowIncrement] + (double)inputBuf[rowIncrement + 2] + (double)inputBuf[rowIncrement2+1]));
-
-                  if((value == np) ||
-                     (value < minP))
-                  {
-                     *outputBuf = (static_cast<T>(minP));
-                  }
-                  else if(value > maxP)
-                  {
-                     *outputBuf = (static_cast<T>(maxP));
-                  }
-                  else
-                  {
-                     *outputBuf = (static_cast<T>(value));
-                  }
-                  
-               }
-               else
-               {
-                  *outputBuf = np;
-               }
-               ++outputBuf;
-               ++inputBuf;
-            }
-            inputBuf+=2;
-         }
-      }
-   }
-   theTile->validate();
-}
-
-template <class T>
-void ossimEdgeFilter::runLocalMax8Filter(T /* dummyVariable */,
-                                         ossimRefPtr<ossimImageData> inputData)
-{
-   ossim_uint32 bandIdx = 0;
-   ossim_uint32 numberOfBands = inputData->getNumberOfBands();
-  
-   ossim_uint32 x = 0;
-   ossim_uint32 y = 0;
-   ossim_uint32 width  = theTile->getWidth();
-   ossim_uint32 height = theTile->getHeight();
-   ossim_int32 rowIncrement  = inputData->getWidth();
-   ossim_int32 rowIncrement2 = 2*inputData->getWidth(); 
-         
-   for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
-   {
-      //inputBuf has a 1 pixel edge compared to outputBuf
-      T* inputBuf  = static_cast<T*>(inputData->getBuf(bandIdx));
-      T* outputBuf = static_cast<T*>(theTile->getBuf(bandIdx));
-      T np         = static_cast<T>(inputData->getNullPix(bandIdx)); //changed to input Null            
-
-      if(inputBuf&&outputBuf)
-      {
-         //one pass: maybe faster if changed to two passes
-         T* outB;
-         T* inB;
-         
-      	outB = outputBuf;         
-         inB  = inputBuf;         
-         for(y = 0; y < height; ++y)
-         {
-            for(x = 0; x < width; ++x)
-            {
-               if (inB[1+rowIncrement] != np)
-               {
-                  *outB = max<T>(
-                           max<T>(
-                            max<T>(inB[0],inB[1]),
-                            max<T>(inB[2],inB[rowIncrement])),
-                           max<T>(
-                            max<T>(inB[rowIncrement+2],inB[rowIncrement2]),
-                            max<T>(inB[rowIncrement2+1],inB[rowIncrement2+2])
-                            ));
-               }
-               else
-               {
-                  *outB = np;
-               }
-               ++outB;
-               ++inB;
-            }
-            inB+=2; //go to next line, jump due to edge
-         }       
-      }      
-   }
-   theTile->validate();
-}
-
-bool ossimEdgeFilter::saveState(ossimKeywordlist& kwl,
-                                          const char* prefix)const
-{   
-   kwl.add(prefix,
-           PROP_EDGE_FILTER,
-           getFilterType(),
-           true);
-   
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
-
-
-bool ossimEdgeFilter::loadState(const ossimKeywordlist& kwl,
-                                          const char* prefix)
-{
-   const char* value = kwl.find(prefix,
-                                PROP_EDGE_FILTER );
-   if(value)
-   {
-      setFilterType(ossimString(value));
-   } else {
-      ossimNotify(ossimNotifyLevel_WARN) << "ossimEdgeFilter::loadState WARN: no filter type found" << std::endl;
-   }
-         
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
diff --git a/src/ossim/imaging/ossimElevImageSource.cpp b/src/ossim/imaging/ossimElevImageSource.cpp
deleted file mode 100644
index 2be5c1a..0000000
--- a/src/ossim/imaging/ossimElevImageSource.cpp
+++ /dev/null
@@ -1,821 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2002 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:  Class provides an elevation image source from the elevation
-// manager.
-// 
-//*******************************************************************
-//  $Id: ossimElevImageSource.cpp 21631 2012-09-06 18:10:55Z dburken $
-
-#include <ossim/imaging/ossimElevImageSource.h>
-#include <ossim/elevation/ossimElevManager.h>
-#include <ossim/projection/ossimLlxyProjection.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ctime>
-
-RTTI_DEF1(ossimElevImageSource, "ossimElevImageSource", ossimImageSource)
-
-// Static trace for debugging
-static ossimTrace traceDebug("ossimElevImage:debug");
-   
-ossimElevImageSource::ossimElevImageSource()
-   :
-      ossimImageSource(NULL,
-                       0,
-                       0,
-                       true,
-                       false),// output list is not fixed
-      theElevManager(NULL),
-      theTile(NULL),
-      theTiePoint(),
-      theLatSpacing(0.0),
-      theLonSpacing(0.0),
-      theNumberOfLines(0),
-      theNumberOfSamps(0)
-{}
-
-ossimElevImageSource::ossimElevImageSource(ossimObject* owner)
-   :
-      ossimImageSource(owner,
-                       0,
-                       0,
-                       true,
-                       false),// output list is not fixed
-      theElevManager(NULL),
-      theTile(NULL),
-      theTiePoint(),
-      theLatSpacing(0.0),
-      theLonSpacing(0.0),
-      theNumberOfLines(0),
-      theNumberOfSamps(0)
-{}
-
-ossimElevImageSource::ossimElevImageSource(ossimObject* owner,
-                                           const ossimGpt& tie,
-                                           double latSpacing,
-                                           double lonSpacing,
-                                           ossim_uint32 numberLines,
-                                           ossim_uint32 numberSamples)
-   :
-      ossimImageSource(owner,
-                       0,
-                       0,
-                       true,
-                       false),// output list is not fixed
-      theElevManager(NULL),
-      theTile(NULL),
-      theTiePoint(tie),
-      theLatSpacing(latSpacing),
-      theLonSpacing(lonSpacing),
-      theNumberOfLines(numberLines),
-      theNumberOfSamps(numberSamples)
-{
-   initialize();
-}
-
-ossimElevImageSource::ossimElevImageSource(ossimObject* owner,
-                                           const ossimKeywordlist& kwl,
-                                           const char* prefix)
-   :
-      ossimImageSource(owner,
-                       0,
-                       0,
-                       true,
-                       false),
-      theElevManager(NULL),
-      theTile(NULL),
-      theTiePoint(),
-      theLatSpacing(0),
-      theLonSpacing(0),
-      theNumberOfLines(0),
-      theNumberOfSamps(0)
-{
-   if (loadState(kwl, prefix) == false)
-   {
-      setErrorStatus();
-   }
-}
-
-ossimElevImageSource::~ossimElevImageSource()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimElevImageSource::getTile(
-   const  ossimIrect& tile_rect,
-   ossim_uint32 resLevel)
-{
-   if (!theTile.get())
-   {
-      return theTile;
-   }
-   
-   // First make sure our tile is the right size.
-   ossim_int32 w = tile_rect.width();
-   ossim_int32 h = tile_rect.height();
-   ossim_int32 tileW = theTile->getWidth();
-   ossim_int32 tileH = theTile->getHeight();
-   if( (w != tileW) || (h != tileH) )
-   {
-      theTile->setWidth(w);
-      theTile->setHeight(h);
-      if((w*h)!=(tileW*tileH))
-      {
-         theTile->initialize();
-
-         //***
-         // Initialize can reset the min max to defaults if the min happens
-         // to be "0" so reset it just in case.
-         // NOTE:  We need to fix initialize!
-         //***
-         theTile->setMinPix(theElevManager->getMinHeightAboveMSL(), 0);
-         theTile->setMaxPix(theElevManager->getMaxHeightAboveMSL(), 0);
-      }
-   }
-
-   // Set the origin.
-   theTile->setOrigin(tile_rect.ul());
-      
-   
-   if(!isSourceEnabled())
-   {
-      // This tile source bypassed.
-      theTile->makeBlank();
-      return theTile;
-   }
-
-   //***
-   // No overview support yet...
-   //***
-   if (resLevel)
-   {
-      // NOTE:  Need to add overview support.
-      cerr << "ossimElevImageSource::getTile ERROR:\nOverviews not supported!"
-           << endl;
-      theTile->makeBlank();
-      return theTile;
-   }
-
-   ossimIrect image_rect = getImageRectangle(0);
-
-   if ( !tile_rect.intersects(image_rect) )
-   {
-      // No point in the tile falls within the set boundaries of this source.
-      theTile->makeBlank();
-      return theTile;
-   }
-
-   // Ok fill the tile with the data from the post...
-   ossimIrect clip_rect = tile_rect.clipToRect(image_rect);
-
-   if ( !tile_rect.completely_within(clip_rect) )
-   {
-      // Start with a blank tile since it won't be filled all the way.
-      theTile->makeBlank();
-   }
-
-
-   // Move the buffer pointer to the first valid pixel.
-   ossim_uint32 tile_width = theTile->getWidth();
-   
-   ossim_int32 start_offset = (clip_rect.lr().y - tile_rect.ul().y) * tile_width +
-      clip_rect.ul().x - tile_rect.ul().x;
-
-   //***
-   // Since most elevation formats have posts organized positive line up,
-   // start at the lower left side of the cell so all reads are going
-   // forward in the file.
-   //***
-   double start_lat = theTiePoint.latd() - theLatSpacing *
-      (clip_rect.lr().y - image_rect.ul().y);
-   if (start_lat < -90.0)
-   {
-      start_lat = -(start_lat + 180.0);  // Wrapped around the south poll.
-   }
-
-   double lon = theTiePoint.lond() + theLonSpacing *
-      (clip_rect.ul().x  - image_rect.ul().x);
-   if (lon > 180.0)
-   {
-      lon -= 360.0; // Went across the central meridian.
-   }
-
-   // Copy the data.
-   ossim_uint32 clipHeight = clip_rect.height();
-   ossim_uint32 clipWidth  = clip_rect.width();
-
-   // Get a pointer to the tile buffer.
-   ossim_float32* buf = static_cast<ossim_float32*>(theTile->getBuf());
-
-   for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
-   {
-      double lat = start_lat;
-      ossim_int32 offset = start_offset;
-      for (ossim_uint32 line = 0; line < clipHeight; ++line)
-      {
-         ossimGpt gpt(lat, lon);
-         buf[offset+sample] = theElevManager->getHeightAboveMSL(gpt);
-         
-         lat += theLatSpacing;
-         if (lat > 90) lat = 180.0 - lat;
-
-         offset -= tile_width;
-      }
-      
-      lon += theLonSpacing;
-      if (lon > 180.0) lon = lon - 360.0; // Went across the central meridian.
-   }
-   
-#if 0   
-   for (ossim_uint32 line = 0; line < clipHeight; ++line)
-   {
-      double lon = start_lon;
-      for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
-      {
-         ossimGpt gpt(lat, lon);
-         buf[sample] = theElevManager->getHeightAboveMSL(gpt);
-         lon += theLonSpacing;
-         if (start_lon > 180.0)
-         {
-            start_lon -= 360.0; // Went across the central meridian.
-         }
-      }
-
-      buf += tile_width;
-      lat -= theLatSpacing;
-      if (lat < -90.0) lat = -(lat + 180.0);// Wrapped around the south poll.
-   }
-#endif
-   
-   theTile->validate();
-   return theTile;
-}
-
-bool ossimElevImageSource::saveState(ossimKeywordlist& kwl,
-                                  const char* prefix) const
-{
-   static const char MODULE[] = "ossimElevImageSource::saveState";
-
-   if (kwl.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
-   {
-      cerr << MODULE
-           << " ERROR detected in keyword list!  State not saved."
-           << endl;
-      return false;
-   }
-
-   // Save the state of the base class.
-   ossimImageSource::saveState(kwl, prefix);
-
-   // Save the tie point.
-   kwl.add(prefix,
-           ossimKeywordNames::TIE_POINT_LAT_KW,
-           theTiePoint.latd(),
-           true);
-   kwl.add(prefix,
-           ossimKeywordNames::TIE_POINT_LON_KW,
-           theTiePoint.lond(),
-           true);
-
-   // Save the post spacing.
-   kwl.add(prefix,
-           ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT,
-           theLatSpacing,
-           true);
-   kwl.add(prefix,
-           ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON,
-           theLonSpacing,
-           true);
-
-   // Save the image size
-   kwl.add(prefix,
-           ossimKeywordNames::NUMBER_LINES_KW,
-           theNumberOfLines,
-           true);
-   kwl.add(prefix,
-           ossimKeywordNames::NUMBER_SAMPLES_KW,
-           theNumberOfSamps,
-           true);
-
-   // Save the min / max pixel values.
-   kwl.add(prefix,
-           ossimKeywordNames::MIN_VALUE_KW,
-           getMinPixelValue(0),
-           true);
-   kwl.add(prefix,
-           ossimKeywordNames::MAX_VALUE_KW,
-           getMaxPixelValue(0),
-           true);
-
-   return true;
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-bool ossimElevImageSource::loadState(const ossimKeywordlist& kwl,
-                                     const char* prefix)
-{
-   static const char MODULE[] = "ossimElevImageSource::loadState";
-
-   if (kwl.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
-   {
-      cerr << MODULE
-           << " ERROR detected in keyword list!  State not load."
-           << endl;
-      return false;
-   }
-
-   // Base class...
-   ossimImageSource::loadState(kwl, prefix);
-   
-   const char* lookup;
-
-   // Get the tie point.
-   lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_LAT_KW);
-   if (lookup)
-   {
-      theTiePoint.latd(ossimString(lookup).toDouble());
-   }
-   else
-   {
-      if (traceDebug())
-      {
-         CLOG << "DEBUG:"
-              << "\nRequired keyword not found:  "
-              << ossimKeywordNames::TIE_POINT_LAT_KW
-              << "\nReturning false"
-              << endl;
-      }
-
-      return false;
-   }
-   
-   lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_LON_KW);
-   if (lookup)
-   {
-      theTiePoint.lond(ossimString(lookup).toDouble());
-   }
-   else
-   {
-      if (traceDebug())
-      {
-         CLOG << "DEBUG:"
-              << "\nRequired keyword not found:  "
-              << ossimKeywordNames::TIE_POINT_LON_KW
-              << "\nReturning false"
-              << endl;
-      }
-
-      return false;
-   }
-
-   // Get the post spacing.
-   lookup = kwl.find(prefix, ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT);
-   if (lookup)
-   {
-      theLatSpacing = ossimString(lookup).toDouble();
-   }
-   else
-   {
-      if (traceDebug())
-      {
-         CLOG << "DEBUG:"
-              << "\nRequired keyword not found:  "
-              << ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT
-              << "\nReturning false"
-              << endl;
-      }
-
-      return false;
-   }
-
-   lookup = kwl.find(prefix, ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON);
-   if (lookup)
-   {
-      theLonSpacing = ossimString(lookup).toDouble();
-   }
-   else
-   {
-      if (traceDebug())
-      {
-         CLOG << "DEBUG:"
-              << "\nRequired keyword not found:  "
-              << ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON
-              << "\nReturning false"
-              << endl;
-      }
-
-      return false;
-   }
-
-   // Get the image size.
-   lookup = kwl.find(prefix, ossimKeywordNames::NUMBER_LINES_KW);
-   if (lookup)
-   {
-      theNumberOfLines = ossimString(lookup).toULong();
-   }
-   else
-   {
-      if (traceDebug())
-      {
-         CLOG << "DEBUG:"
-              << "\nRequired keyword not found:  "
-              << ossimKeywordNames::NUMBER_LINES_KW
-              << "\nReturning false"
-              << endl;
-      }
-
-      return false;
-   }
-
-   lookup = kwl.find(prefix, ossimKeywordNames::NUMBER_SAMPLES_KW);
-   if (lookup)
-   {
-      theNumberOfSamps = ossimString(lookup).toULong();
-   }
-   else
-   {
-      if (traceDebug())
-      {
-         CLOG << "DEBUG:"
-              << "\nRequired keyword not found:  "
-              << ossimKeywordNames::NUMBER_SAMPLES_KW
-              << "\nReturning false"
-              << endl;
-      }
-
-      return false;
-   }
-
-   initialize();
-
-   //***
-   // See if the min / max keyword was set and reset it.
-   // Note this must be done after initialize since it sets the min / max from
-   // the elevation manager.
-   //***
-   lookup = kwl.find(prefix, ossimKeywordNames::MIN_VALUE_KW);
-   if (lookup)
-   {
-      setMinPixelValue(ossimString(lookup).toDouble());
-   }
-   lookup = kwl.find(prefix, ossimKeywordNames::MAX_VALUE_KW);
-   if (lookup)
-   {
-      setMaxPixelValue(ossimString(lookup).toDouble());
-   }
-
-   if (getErrorStatus() != ossimErrorCodes::OSSIM_OK)
-   {
-      return false;
-   }
-
-   //***
-   // Reset the base class to have a fixed input list of "0" size.
-   // Note:  To not do this will result in a core dump destroying objects
-   // connected to this output.
-   //***
-   theInputObjectList.clear();
-   theInputListIsFixedFlag = true;
-   theOutputListIsFixedFlag = false;
-  
-   return true;
-}
-
-void ossimElevImageSource::initialize()
-{
-   static const char MODULE[] = "ossimElevImageSource::initialize";
-   
-   if (traceDebug()) CLOG << " Entered..." << endl;
-   
-   //***
-   // First see if the manager pointer has been captured.
-   //***
-   if (!theElevManager) theElevManager = ossimElevManager::instance();
-
-   if (!theElevManager)
-   {
-      setErrorStatus();
-      cerr << MODULE << "ERROR:\nNULL elevation manager pointer!"
-           << "\nObject not initialized!" << endl;
-      return;
-   }
-
-   // Basic sanity checks.
-   if (!theLatSpacing || !theLonSpacing ||
-       !theNumberOfLines || !theNumberOfSamps)
-   {
-      setErrorStatus();
-      cerr << MODULE << "ERROR:"
-           << "\nMust set latitude/longitude spacing and number of line and"
-           << " samples."
-           << "Object not initialized!" << endl;
-      return;
-      
-   }
-
-   // Check the ground point.
-   if ( theTiePoint.latd() > 90.0  || theTiePoint.latd() < -90.0  ||
-        theTiePoint.lond() > 180.0 || theTiePoint.lond() < -180.0 )
-   {
-      setErrorStatus();
-      cerr << MODULE << "ERROR:\nBogus tie point."
-           << "\nObject not initialized!" << endl;
-      return;
-   }
-
-   if (traceDebug())
-   {
-      CLOG << "DEBUG:"
-           << "\nTie point:  " << theTiePoint
-           << "\nLatitude spacing:  " << theLatSpacing
-           << "\nLongitude spacing:  " << theLonSpacing
-           << "\nLines:              " << theNumberOfLines
-           << "\nSamples:            " << theNumberOfSamps
-           << endl;
-   }
-   
-   //***
-   // Since this will return float data we need to set the min / max values
-   // of the data so that anybody who remaps it to eight bit will do it
-   // properly.  So scan the entire image rectangle using the manager.
-   // This will do two things, force the elevation manager to load all the
-   // cells, and at the same time the min / max elevation value will be set.
-   // NOTE:
-   // ??? Should the elevation manager clear the list of sources prior to
-   // the code segment so that the min / max is only from the cells we
-   // need!
-   //***
-
-   cout << "Initializing elevation manager..." << endl;
-
-#if 0
-   // Loop in the longitude or sample direction.
-   time_t start_t = time(NULL);
-   double lon = theTiePoint.lond();
-   for (ossim_uint32 samp = 0; samp < theNumberOfSamps; ++samp)
-   {
-      double lat = theTiePoint.latd() - theLatSpacing * (theNumberOfLines - 1);
-      if (lat < -90.0) lat = -(lat + 180.0); // Wrapped around the south poll.
-      
-      for (ossim_uint32 line = 0; line < theNumberOfLines; ++line)
-      {
-         ossimGpt gpt(lat, lon);
-         theElevManager->getHeightAboveMSL(gpt);
-
-         lat += theLatSpacing;
-         if (lat > 90) lat = 180 - lat; // Went across poll.
-      }
-      
-      lon += theLonSpacing;
-      if (lon > 180.0) lon -= 360.0; // Went across the central meridian.
-   }
-   time_t stop_t = time(NULL);
-   cout << "Finished loop two..." << endl;
-   cout << "Elapsed time for loop two:  " << (stop_t - start_t) << endl;
-#endif
-   
-   theTile = new ossimImageData(this,
-                                OSSIM_FLOAT);
-   theTile->initialize();
-
-   // Set the min / max for any normalization down the chain...
-   theTile->setMinPix(theElevManager->getMinHeightAboveMSL(), 0);
-   theTile->setMaxPix(theElevManager->getMaxHeightAboveMSL(), 0);
-
-   if (traceDebug())
-   {
-      CLOG << "DEBUG:"
-           << "\nMin pix:            " << theTile->getMinPix(0)
-           << "\nMax pix:            " << theTile->getMaxPix(0)
-           << endl;
-   }
-}
-
-ossimIrect ossimElevImageSource::getImageRectangle(ossim_uint32 reduced_res_level) const
-{
-   ossimIrect result(0, 0, theNumberOfSamps-1, theNumberOfLines-1);
-   
-   if (reduced_res_level != 0)
-   {
-      cerr << "ossimElevImageSource::getImageRectangle ERROR:"
-           << "\nOnly R0 is supported." << endl;
-   }
-
-   return result;
-}
-
-bool ossimElevImageSource::getImageGeometry(ossimKeywordlist& kwl,
-                                            const char* prefix)
-{
-   // Save off the image dimensions.
-   kwl.add(prefix,
-           ossimKeywordNames::NUMBER_LINES_KW,
-           theNumberOfLines,
-           true);
-   kwl.add(prefix,
-           ossimKeywordNames::NUMBER_SAMPLES_KW,
-           theNumberOfLines,
-           true);
-
-   // Save off the projection info (tie and post spacing).
-   ossimLlxyProjection proj(theTiePoint, theLatSpacing, theLonSpacing);
-   return proj.saveState(kwl, prefix);
-}
-
-void ossimElevImageSource::getDecimationFactor(ossim_uint32 resLevel, ossimDpt& result) const
-{
-   if (resLevel)
-   {
-      cerr << "ossimElevImageSource::getDecimationFactor ERROR:"
-           << "\nReduced res sets currently not supported!"
-           << endl;
-   }
-
-   result.line = 1.0;
-   result.samp = 1.0;
-}
-
-void ossimElevImageSource::getDecimationFactors(vector<ossimDpt>& decimations) const
-{
-   ossimDpt pt(1.0, 1.0);
-   decimations.clear();
-   decimations.push_back(pt);
-}
-
-ossim_uint32 ossimElevImageSource::getNumberOfDecimationLevels()const
-{
-   return 1;
-}
-
-ossim_uint32 ossimElevImageSource::getNumberOfInputBands() const
-{
-   return 1;
-}
-
-ossimScalarType ossimElevImageSource::getOutputScalarType() const
-{
-   return OSSIM_FLOAT;
-}
-
-ossim_uint32 ossimElevImageSource::getTileWidth() const
-{
-   if (theTile.get()) return theTile->getWidth();
-
-   return 0;
-}
-
-ossim_uint32 ossimElevImageSource::getTileHeight() const
-{
-   if (theTile.get()) return theTile->getHeight();
-
-   return 0;
-}
-
-void ossimElevImageSource::changeTileSize(const ossimIpt& size)
-{
-   if (traceDebug())
-   {
-      cout << "ossimElevImageSource::changeTileSize DEBUG:"
-           << "\nx size:  " << size.x
-           << "\ny size:  " << size.y
-           << endl;
-   }
-
-   if (!theTile)
-   {
-      cerr << "ossimElevImageSource::changeTileSize ERROR:"
-           << "\nObject not initialized!  Returning..." << endl;
-      return;
-   }
-
-   theTile = new ossimImageData(this,
-                                OSSIM_FLOAT,
-                                1,
-                                size.x,
-                                size.y);
-   theTile->initialize();
-   
-   // Set the min / max for any normalization down the chain...
-   theTile->setMinPix(theElevManager->getMinHeightAboveMSL(), 0);
-   theTile->setMaxPix(theElevManager->getMaxHeightAboveMSL(), 0);
-}
-
-ossim_uint32 ossimElevImageSource::getNumberOfLines(ossim_uint32 reduced_res_level) const
-{
-   if (reduced_res_level)
-   {
-      cerr << "ossimElevImageSource::getNumberOfLines ERROR:"
-           << "\nReduced res sets currently not supported!"
-           << endl;
-      return 0;
-   }
-
-   return theNumberOfLines;
-}
-
-ossim_uint32 ossimElevImageSource::getNumberOfSamples(ossim_uint32 reduced_res_level) const
-{
-   if (reduced_res_level)
-   {
-      cerr << "ossimElevImageSource::getNumberOfSamples ERROR:"
-           << "\nReduced res sets currently not supported!"
-           << endl;
-      return 0;
-   }
-
-   return theNumberOfSamps;
-}
-
-double ossimElevImageSource::getMinPixelValue(ossim_uint32 band) const
-{
-   if (band)
-   {
-      cerr << "ossimElevImageSource::getMinPixelValue ERROR:"
-           << "\nReduced res sets currently not supported!"
-           << endl;
-      return 0.0;
-   }
-
-   if (theTile.get())
-   {
-      return theTile->getMinPix(0);
-   }
-   else if (theElevManager)
-   {
-      return theElevManager->getMinHeightAboveMSL();
-   }
-
-   return 0.0;
-}
-
-double ossimElevImageSource::getMaxPixelValue(ossim_uint32 band) const
-{
-   if (band)
-   {
-      cerr << "ossimElevImageSource::getMaxPixelValue ERROR:"
-           << "\nReduced res sets currently not supported!"
-           << endl;
-      return 0.0;
-   }
-
-   if (theTile.get())
-   {
-      return theTile->getMaxPix(0);
-   }
-   else if (theElevManager)
-   {
-      return theElevManager->getMaxHeightAboveMSL();
-   }
-
-   return 0.0;
-}
-
-void ossimElevImageSource::setMinPixelValue(ossim_float64 min_pix)
-{
-   if (theTile.get()) 
-   {
-      theTile->setMinPix(min_pix, 0);
-      if (traceDebug())
-      {
-         cout << "ossimElevImageSource::setMinPixelValue DEBUG:"
-              << "\nMin pixel value:  " << min_pix
-              << endl;
-      }
-   }
-   else
-   {
-      cerr << "ossimElevImageSource::setMinPixelValue ERROR:"
-           << "\nObject not initialized!"
-           << endl;
-   }
-}
-
-void ossimElevImageSource::setMaxPixelValue(ossim_float64 max_pix)
-{
-   if (theTile.get()) 
-   {
-      theTile->setMaxPix(max_pix, 0);
-      if (traceDebug())
-      {
-         cout << "ossimElevImageSource::setMaxPixelValue DEBUG:"
-              << "\nMax pixel value:  " << max_pix
-              << endl;
-      }
-   }
-   else
-   {
-      cerr << "ossimElevImageSource::setMinPixelValue ERROR:"
-           << "\nObject not initialized!"
-           << endl;
-   }
-}      
diff --git a/src/ossim/imaging/ossimEnviHeaderFileWriter.cpp b/src/ossim/imaging/ossimEnviHeaderFileWriter.cpp
deleted file mode 100644
index 90f6207..0000000
--- a/src/ossim/imaging/ossimEnviHeaderFileWriter.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (c) 2005, David Burken, all rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-// 
-// Class definition for ossimEnviHeaderFileWriter.  Meta data class for
-// writing an ENVI (The Environment for Visualizing Images) header file.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimEnviHeaderFileWriter.cpp 21631 2012-09-06 18:10:55Z dburken $
-
-#include <ossim/imaging/ossimEnviHeaderFileWriter.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimMapProjectionInfo.h>
-
-
-RTTI_DEF1(ossimEnviHeaderFileWriter,
-          "ossimEnviHeaderFileWriter",
-          ossimMetadataFileWriter)
-
-ossimEnviHeaderFileWriter::ossimEnviHeaderFileWriter()
-   :
-   ossimMetadataFileWriter(),
-   theHdr()
-{
-}
-
-ossimEnviHeaderFileWriter::~ossimEnviHeaderFileWriter()
-{
-}
-
-bool ossimEnviHeaderFileWriter::loadState(const ossimKeywordlist& kwl,
-                                          const char* prefix)
-{
-   bool result = false;
-   
-   if (ossimMetadataFileWriter::loadState(kwl, prefix))
-   {
-      result = theHdr.loadState(kwl, prefix);
-   }
-   
-   return result;
-}
-
-bool writeFile()
-{
-   bool result = true;
-
-   return result;
-}
-
-bool ossimEnviHeaderFileWriter::writeFile()
-{
-   theHdr.setLines(theAreaOfInterest.height());
-   theHdr.setSamples(theAreaOfInterest.width());
-   theHdr.setBands(theInputConnection->getNumberOfOutputBands());
-   
-   // Get the geometry from the input.
-   // Get the geometry from the input.
-   ossimMapProjection* mapProj = 0;
-   ossimRefPtr<ossimImageGeometry> inputGeom = theInputConnection->getImageGeometry();
-   if ( inputGeom.valid() ) mapProj = PTR_CAST(ossimMapProjection, inputGeom->getProjection());
-   if (mapProj)
-   {
-      // Create the projection info.
-      ossimRefPtr<ossimMapProjectionInfo> projectionInfo
-         = new ossimMapProjectionInfo(mapProj, theAreaOfInterest);
-
-      // Set the tie points in the keyword list.
-      ossimKeywordlist kwl;
-      projectionInfo->getGeom(kwl);
-
-      // Pass it on to envi header to set the map info string from geometry.
-      theHdr.setMapInfo(kwl);
-   }
-
-   return theHdr.writeFile(theFilename);
-}
-
-void ossimEnviHeaderFileWriter::getMetadatatypeList(
-   std::vector<ossimString>& metadatatypeList) const
-{
-   metadatatypeList.push_back(ossimString("envi_header")); 
-}
-
-bool ossimEnviHeaderFileWriter::hasMetadataType(
-   const ossimString& metadataType)const
-{
-   return (metadataType == "envi_header");
-}
diff --git a/src/ossim/imaging/ossimEquationCombiner.cpp b/src/ossim/imaging/ossimEquationCombiner.cpp
deleted file mode 100644
index 61f1326..0000000
--- a/src/ossim/imaging/ossimEquationCombiner.cpp
+++ /dev/null
@@ -1,3558 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimEquationCombiner.cpp 15766 2009-10-20 12:37:09Z gpotts $
-
-#include <cstdlib>
-#include <sstream>
-using namespace std;
-
-#include <ossim/imaging/ossimEquationCombiner.h>
-#include <ossim/imaging/ossimCastTileSourceFilter.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/imaging/ossimConvolutionSource.h>
-#include <ossim/imaging/ossimSubImageTileSource.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/matrix/newmatio.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-#include <ossim/base/ossimNotifyContext.h>
-
-RTTI_DEF1(ossimEquationCombiner, "ossimEquationCombiner", ossimImageCombiner);
-
-static const char* EQUATION_KW = "equation";
-
-
-class ossimBinaryOpAdd : public ossimEquationCombiner::ossimBinaryOp
-{
-public:
-   virtual double apply(double v1, double v2)const
-      {
-         return v1 + v2;
-      }
-};
-
-class ossimBinaryOpAnd : public ossimEquationCombiner::ossimBinaryOp
-{
-public:
-   virtual double apply(double v1, double v2)const
-      {
-         return (double)(((ossim_uint32)v1) & ((ossim_uint32)v2));
-      }
-};
-
-class ossimBinaryOpOr : public ossimEquationCombiner::ossimBinaryOp
-{
-public:
-   virtual double apply(double v1, double v2)const
-      {
-         return (double)(((ossim_uint32)v1) | ((ossim_uint32)v2));
-      }
-};
-
-class ossimBinaryOpXor : public ossimEquationCombiner::ossimBinaryOp
-{
-public:
-   virtual double apply(double v1, double v2)const
-      {
-         return (double)(((ossim_uint32)v1) ^ ((ossim_uint32)v2));
-      }
-};
-
-class ossimBinaryOpSub : public ossimEquationCombiner::ossimBinaryOp
-{
-public:
-   virtual double apply(double v1, double v2)const
-      {
-         return v1 - v2;
-      }
-};
-
-class ossimBinaryOpMax : public ossimEquationCombiner::ossimBinaryOp
-{
-public:
-   virtual double apply(double v1, double v2)const
-      {
-         return std::max(v1, v2);
-      }
-};
-
-class ossimBinaryOpMin : public ossimEquationCombiner::ossimBinaryOp
-{
-public:
-   virtual double apply(double v1, double v2)const
-      {
-         return std::min(v1, v2);
-      }
-};
-
-class ossimBinaryOpMul : public ossimEquationCombiner::ossimBinaryOp
-{
-public:
-   virtual double apply(double v1, double v2)const
-      {
-         return v1 * v2;
-      }
-};
-
-class ossimBinaryOpDiv : public ossimEquationCombiner::ossimBinaryOp
-{
-public:
-   virtual double apply(double v1, double v2)const
-      {
-         if(fabs(v2)>FLT_EPSILON)
-            return v1 / v2;
-         
-         return 1.0/FLT_EPSILON;
-      }
-};
-
-class ossimBinaryOpMod : public ossimEquationCombiner::ossimBinaryOp
-{
-public:
-   virtual double apply(double v1, double v2)const
-      {
-         if(fabs(v2)>FLT_EPSILON)
-            return fmod(v1,v2);
-         
-         return 1.0/FLT_EPSILON;
-      }
-};
-
-class ossimBinaryOpPow : public ossimEquationCombiner::ossimBinaryOp
-{
-public:
-   virtual double apply(double v1, double v2)const
-      {
-         return pow(v1, v2);
-      }
-};
-// boolean operators
-class ossimBinaryOpEqual : public ossimEquationCombiner::ossimBinaryOp
-{
-public:
-   virtual double apply(double v1, double v2)const
-      {
-         return (v1==v2)?1.0:0.0;
-      }
-};
-class ossimBinaryOpGreater : public ossimEquationCombiner::ossimBinaryOp
-{
-public:
-   virtual double apply(double v1, double v2)const
-      {
-         return (v1>v2)?1.0:0.0;
-      }
-};
-class ossimBinaryOpGreaterOrEqual : public ossimEquationCombiner::ossimBinaryOp
-{
-public:
-   virtual double apply(double v1, double v2)const
-      {
-         return (v1>=v2)?1.0:0.0;
-      }
-};
-class ossimBinaryOpLess : public ossimEquationCombiner::ossimBinaryOp
-{
-public:
-   virtual double apply(double v1, double v2)const
-      {
-         return (v1<v2)?1.0:0.0;
-      }
-};
-class ossimBinaryOpLessOrEqual : public ossimEquationCombiner::ossimBinaryOp
-{
-public:
-   virtual double apply(double v1, double v2)const
-      {
-         return (v1<=v2)?1.0:0.0;
-      }
-};
-class ossimBinaryOpDifferent : public ossimEquationCombiner::ossimBinaryOp
-{
-public:
-   virtual double apply(double v1, double v2)const
-      {
-         return (v1!=v2)?1.0:0.0;
-      }
-};
-class ossimUnaryOpNot : public ossimEquationCombiner::ossimUnaryOp
-{
-public:
-   virtual double apply(double v)const
-      {
-         return 1-v;
-      }
-};
-
-class ossimUnaryOpAbs : public ossimEquationCombiner::ossimUnaryOp
-{
-public:
-   virtual double apply(double v)const
-      {
-         return fabs(v);
-      }
-};
-
-class ossimUnaryOpOnesComplement : public ossimEquationCombiner::ossimUnaryOp
-{
-public:
-   virtual double apply(double v)const
-      {
-         return (double)((ossim_uint8)~((ossim_uint8)v));
-      }
-};
-
-class ossimUnaryOpLog : public ossimEquationCombiner::ossimUnaryOp
-{
-public:
-   virtual double apply(double v)const
-      {
-         return log(v);
-      }
-};
-
-class ossimUnaryOpLog10 : public ossimEquationCombiner::ossimUnaryOp
-{
-public:
-   virtual double apply(double v)const
-      {
-         return log10(v);
-      }
-};
-
-class ossimUnaryOpNeg : public ossimEquationCombiner::ossimUnaryOp
-{
-public:
-   virtual double apply(double v)const
-      {
-         return -v;
-      }
-};
-
-class ossimUnaryOpSqrt : public ossimEquationCombiner::ossimUnaryOp
-{
-public:
-   virtual double apply(double v)const
-      {
-         if(v >= 0)
-         {
-            return sqrt(v);
-         }
-         
-         return -1;
-      }
-};
-
-class ossimUnaryOpExp : public ossimEquationCombiner::ossimUnaryOp
-{
-public:
-   virtual double apply(double v)const
-      {
-         return exp(v);
-      }
-};
-
-class ossimUnaryOpSin : public ossimEquationCombiner::ossimUnaryOp
-{
-public:
-   virtual double apply(double v)const
-      {
-         return sin(v);
-      }
-};
-
-class ossimUnaryOpSind : public ossimEquationCombiner::ossimUnaryOp
-{
-public:
-   virtual double apply(double v)const
-      {
-         return sin(v*M_PI/180.0);
-      }
-};
-
-class ossimUnaryOpASin : public ossimEquationCombiner::ossimUnaryOp
-{
-public:
-   virtual double apply(double v)const
-      {
-         if(v > 1) v = 1;
-         if(v < -1) v = -1;
-         return asin(v);
-      }
-};
-
-class ossimUnaryOpASind : public ossimEquationCombiner::ossimUnaryOp
-{
-public:
-   virtual double apply(double v)const
-      {
-         if(v > 1) v = 1;
-         if(v < -1) v = -1;
-         return (180/M_PI)*asin(v);
-      }
-};
-
-class ossimUnaryOpACos : public ossimEquationCombiner::ossimUnaryOp
-{
-public:
-   virtual double apply(double v)const
-      {
-         if(v > 1) v = 1;
-         if(v < -1) v = -1;
-         return acos(v);
-      }
-};
-
-class ossimUnaryOpACosd : public ossimEquationCombiner::ossimUnaryOp
-{
-public:
-   virtual double apply(double v)const
-      {
-         if(v > 1) v = 1;
-         if(v < -1) v = -1;
-         return (180/M_PI)*acos(v);
-      }
-};
-
-class ossimUnaryOpCos : public ossimEquationCombiner::ossimUnaryOp
-{
-public:
-   virtual double apply(double v)const
-      {
-         return cos(v);
-      }
-};
-
-class ossimUnaryOpCosd : public ossimEquationCombiner::ossimUnaryOp
-{
-public:
-   virtual double apply(double v)const
-      {
-         return cos(v*M_PI/180.0);
-      }
-};
-
-class ossimUnaryOpTan : public ossimEquationCombiner::ossimUnaryOp
-{
-public:
-   virtual double apply(double v)const
-      {
-         return tan(v);
-      }
-};
-
-class ossimUnaryOpTand : public ossimEquationCombiner::ossimUnaryOp
-{
-public:
-   virtual double apply(double v)const
-      {
-         return tan(v*M_PI/180.0);
-      }
-};
-
-class ossimUnaryOpATan : public ossimEquationCombiner::ossimUnaryOp
-{
-public:
-   virtual double apply(double v)const
-      {
-         return atan(v);
-      }
-};
-
-class ossimUnaryOpATand : public ossimEquationCombiner::ossimUnaryOp
-{
-public:
-   virtual double apply(double v)const
-      {
-         return (180/M_PI)*atan(v);
-      }
-};
-
-
-ossimEquationCombiner::ossimEquationCombiner()
-   :ossimImageCombiner(),
-    theOutputScalarType(OSSIM_FLOAT64),
-    theEquation(""),
-    theLexer(NULL),
-    theTile(NULL),
-    theCastFilter(NULL),
-    theCastOutputFilter(NULL)
-{
-   theLexer      = new ossimEquTokenizer;
-   theCastFilter = new ossimCastTileSourceFilter;
-   theCastFilter->setOutputScalarType(OSSIM_FLOAT64);
-}
-
-ossimEquationCombiner::~ossimEquationCombiner()
-{
-   if(theLexer)
-   {
-      delete theLexer;
-      theLexer = NULL;
-   }
-
-   if(theCastFilter.valid())
-   {
-      theCastFilter->disconnect();
-      theCastFilter = 0;
-   }
-
-   if(theCastOutputFilter.valid())
-   {
-      theCastOutputFilter->disconnect();
-      theCastOutputFilter = 0;
-   }
-   // make sure they are cleared
-   clearStacks();
-}
-
-double ossimEquationCombiner::getNullPixelValue(ossim_uint32 band)const
-{
-   
-   if(theEquation == "")
-   {
-      if(getInput())
-      {
-         ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput());
-         if(inter)
-         {
-            return inter->getNullPixelValue(band);
-         }
-      }
-   }
-   return ossim::defaultNull(getOutputScalarType());
-}   
-
-double ossimEquationCombiner::getMinPixelValue(ossim_uint32 band)const
-{
-   if(theEquation == "")
-   {
-      if(getInput())
-      {
-         ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput());
-         if(inter)
-         {
-            return inter->getMinPixelValue(band);
-         }
-      }
-   }
-   return ossim::defaultMin(getOutputScalarType());
-}
-
-double ossimEquationCombiner::getMaxPixelValue(ossim_uint32 band)const
-{
-   if(theEquation == "")
-   {
-      if(getInput())
-      {
-         ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput());
-         if(inter)
-         {
-            return inter->getMaxPixelValue(band);
-         }
-      }
-   }
-   return ossim::defaultMax(getOutputScalarType());         
-}
-
-ossimScalarType ossimEquationCombiner::getOutputScalarType() const
-{
-
-   if(theEquation == "")
-   {
-      if(getInput())
-      {
-         ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput());
-         if(inter)
-         {
-            return inter->getOutputScalarType();
-         }
-      }
-   }
-   
-   return theOutputScalarType;
-}
-
-
-ossimRefPtr<ossimImageData> ossimEquationCombiner::getTile(
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   if(!theTile)
-   {
-      initialize();
-   }
-   long w = tileRect.width();
-   long h = tileRect.height();
-   long tw = theTile->getWidth();
-   long th = theTile->getHeight();
-   
-   if(theEquation != "")
-   {
-      theTile->setImageRectangle(tileRect);
-      
-      if(w*h != tw*th)
-      {
-         theTile->initialize();
-      }
-      else
-      {
-         theTile->makeBlank();
-      }
-      theCurrentResLevel = resLevel;
-      
-      ossimRefPtr<ossimImageData> outputTile =  parseEquation();
-
-      if(theCastOutputFilter.valid())
-      {
-         outputTile = theCastOutputFilter->applyCast(outputTile);
-      }
-      
-      return outputTile;
-   }
-   else
-   {
-      if(getInput())
-      {
-         ossimImageSource* inter =
-            PTR_CAST(ossimImageSource, getInput());
-         if(inter)
-         {
-            return inter->getTile(tileRect, resLevel);
-         }
-      }
-   }
-
-   return ossimRefPtr<ossimImageData>();
-}
-
-void ossimEquationCombiner::setOutputScalarType(ossimScalarType scalarType)
-{
-   if(theOutputScalarType != scalarType)
-   {
-      theOutputScalarType = scalarType;
-
-      if(theOutputScalarType == OSSIM_SCALAR_UNKNOWN)
-      {
-         theOutputScalarType = OSSIM_FLOAT64;
-      }
-      if(theCastOutputFilter.valid())
-      {
-         theCastOutputFilter = 0;
-      }
-
-      if(theOutputScalarType != OSSIM_FLOAT64)
-      {
-         theCastOutputFilter = new ossimCastTileSourceFilter;
-         theCastOutputFilter->setOutputScalarType(theOutputScalarType);
-         theCastOutputFilter->connectMyInputTo(0, this);
-         theCastOutputFilter->initialize();
-      }
-   }
-}
-
-void ossimEquationCombiner::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property) return;
-   
-   if(property->getName() == "Equation")
-   {
-      theEquation = property->valueToString();
-   }
-   else if(property->getName() == "Output scalar type")
-   {
-      setOutputScalarType(ossimScalarTypeLut::instance()->
-                          getScalarTypeFromString(property->valueToString()));
-   }
-   else
-   {
-      ossimImageCombiner::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimEquationCombiner::getProperty(const ossimString& name)const
-{
-   if(name == "Equation")
-   {
-      ossimStringProperty* stringProp = new ossimStringProperty("Equation",
-								theEquation,
-								false);
-      stringProp->clearChangeType();
-      stringProp->setReadOnlyFlag(false);
-      stringProp->setCacheRefreshBit();
-      
-      return stringProp;
-   }
-   else if(name == "Output scalar type")
-   {
-      ossimScalarTypeLut* sl = ossimScalarTypeLut::instance();
-      
-      std::vector<ossimString> scalarNames;
-
-      ossim_int32 tableSize = (ossim_int32)sl->getTableSize();
-      ossim_int32 idx;
-
-      for(idx = 0; idx < tableSize; ++idx)
-      {
-         scalarNames.push_back(sl->getEntryString(idx));
-      }
-      ossimStringProperty* stringProp = new ossimStringProperty("Output scalar type",
-								sl->getEntryString((ossim_int32)theOutputScalarType),
-								false,
-								scalarNames);
-      stringProp->clearChangeType();
-      stringProp->setReadOnlyFlag(false);
-      stringProp->setCacheRefreshBit();
-      
-      return stringProp;
-      
-   }
-
-   return ossimImageCombiner::getProperty(name);
-}
-
-void ossimEquationCombiner::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageCombiner::getPropertyNames(propertyNames);
-   propertyNames.push_back("Equation");
-   propertyNames.push_back("Output scalar type");
-}
-
-
-void ossimEquationCombiner::initialize()
-{
-   ossimImageCombiner::initialize();
-
-   theTile = ossimImageDataFactory::instance()->create(this, OSSIM_FLOAT64, getNumberOfOutputBands(), getTileWidth(), getTileHeight());
-   theTile->initialize();
-   if(theCastOutputFilter.valid())
-   {
-      theCastOutputFilter->initialize();
-   }
-}
-
-void ossimEquationCombiner::assignValue()
-{
-   if(!theValueStack.empty())
-   {
-      if(theValueStack.top().type == OSSIM_EQU_IMAGE_DATA_TYPE)
-      {
-         ossimImageData* topData = theValueStack.top().d.imageDataValue;
-         ossim_uint32 minBands = std::min(theTile->getNumberOfBands(),
-                                    topData->getNumberOfBands());
-         ossim_uint32 maxBands = theTile->getNumberOfBands();
-         ossim_uint32 band   = 0;
-         ossim_uint32 offset = 0;
-         ossim_uint32 size = theTile->getWidth()*theTile->getHeight();
-
-         if(topData->getDataObjectStatus() == OSSIM_PARTIAL)
-         {
-            for(band = 0; band < minBands; ++band)
-            {
-               double* inBuf  = (double*)topData->getBuf(band);
-               double* outBuf = (double*)theTile->getBuf(band);
-               double np      = topData->getNullPix(band);
-               if(outBuf && inBuf)
-               {
-                  for(offset = 0; offset < size; ++offset)
-                  {
-                     if(*inBuf != np)
-                     {
-                        *outBuf = *inBuf;
-                     }
-                     ++outBuf;
-                     ++inBuf;
-                  }
-               }
-            }
-            for(;band < maxBands; ++band)
-            {
-               double* inBuf  = (double*)topData->getBuf(minBands-1);
-               double* outBuf = (double*)theTile->getBuf(band);
-               double np      = topData->getNullPix(band);
-               
-               if(outBuf && inBuf)
-               {
-                  for(offset = 0; offset < size; ++offset)
-                  {
-                     if(*inBuf != np)
-                     {
-                        *outBuf = *inBuf;
-                     }
-                     ++outBuf;
-                     ++inBuf;
-                  }
-               }
-            }
-
-         }
-         else if(topData->getDataObjectStatus() == OSSIM_FULL)
-         {
-            for(band = 0; band < minBands; ++band)
-            {
-               double* inBuf  = (double*)theValueStack.top().d.imageDataValue->getBuf(band);
-               double* outBuf = (double*)theTile->getBuf(band);
-               if(outBuf && inBuf)
-               {
-                  for(offset = 0; offset < size; ++offset)
-                  {
-                     *outBuf = *inBuf;
-                     ++outBuf;
-                     ++inBuf;
-                  }
-               }
-            }
-            for(;band < maxBands; ++band)
-            {
-               double* inBuf  = (double*)theValueStack.top().d.imageDataValue->getBuf(minBands-1);
-               double* outBuf = (double*)theTile->getBuf(band);
-               
-               if(outBuf && inBuf)
-               {
-                  for(offset = 0; offset < size; ++offset)
-                  {
-                     *outBuf = *inBuf;
-                     ++outBuf;
-                     ++inBuf;
-                  }
-               }
-            }
-         }
-         
-         // Delete the object indirectly through an ossimRefPtr.
-         ossimRefPtr<ossimImageData> id = theValueStack.top().d.imageDataValue;
-         id = NULL;
-      }
-      else
-      {
-         double* buf  = static_cast<double*>(theTile->getBuf());
-         ossim_uint32 size = theTile->getSize();
-         double value = (double)theValueStack.top().d.doubleValue;
-         
-         for(ossim_uint32 offset = 0; offset < size; ++offset)
-         {
-            *buf = value;
-            ++buf;
-         }
-      }
-      
-      theValueStack.pop();
-   }
-}
-
-void ossimEquationCombiner::clearStacks()
-{
-
-   while(!theValueStack.empty())
-   {
-      if(theValueStack.top().type == OSSIM_EQU_IMAGE_DATA_TYPE)
-      {
-         // Delete the object indirectly through an ossimRefPtr.
-         ossimRefPtr<ossimImageData> id = theValueStack.top().d.imageDataValue;
-         id = NULL;
-      }
-
-      theValueStack.pop();
-   }
-}
-
-void ossimEquationCombiner::clearArgList(vector<ossimEquValue>& argList)
-{
-   for(ossim_uint32 i = 0; i < argList.size(); ++i)
-   {
-      if(argList[i].type == OSSIM_EQU_IMAGE_DATA_TYPE)
-      {
-         if(argList[i].d.imageDataValue)
-         {
-            // Delete the object indirectly through an ossimRefPtr.
-            ossimRefPtr<ossimImageData> id = argList[i].d.imageDataValue;
-            id = NULL;
-            argList[i].d.imageDataValue = (ossimImageData*)NULL;
-         }
-      }
-   }
-   argList.clear();
-}
-
-void ossimEquationCombiner::deleteArgList(vector<ossimEquValue>& args)
-{
-   int i = 0;
-
-   for(i = 0; i < (int)args.size(); ++i)
-   {
-      if(args[i].type == OSSIM_EQU_IMAGE_DATA_TYPE)
-      {
-         if(args[i].d.imageDataValue)
-         {
-            // Delete the object indirectly through an ossimRefPtr.
-            ossimRefPtr<ossimImageData> id = args[i].d.imageDataValue;
-            id = NULL;
-            args[i].d.imageDataValue = NULL;
-         }
-      }
-   }
-   
-   args.clear();
-}
-
-bool ossimEquationCombiner::parseArgList(vector<ossimEquValue>& args,
-                                         bool popValueStack)
-{
-   bool result = true;
-   
-   if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
-   {
-      theCurrentId = theLexer->yylex();
-      do
-      {
-         if(parseExpression())
-         {
-            if(!theValueStack.empty())
-            {
-               args.push_back(theValueStack.top());
-               if(popValueStack)
-               {
-                  theValueStack.pop();
-               }
-            }
-            else
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << "The expression at  arg " << (args.size()+1)
-                  << " is empty" << endl;
-               
-               result = false;
-            }
-         }
-         else
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               <<"Unable to parse expression" << endl;
-            result = false;
-         }
-         
-         if(theCurrentId == OSSIM_EQU_TOKEN_COMMA)
-         {
-            theCurrentId = theLexer->yylex();
-         }
-         else if(theCurrentId != OSSIM_EQU_TOKEN_RIGHT_PAREN)
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               <<"Missing comma in argument list" << endl;
-            result = false;
-         }
-         
-      }while(result&&(theCurrentId != OSSIM_EQU_TOKEN_RIGHT_PAREN));
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "Starting left parenthesis missing from arg list" << endl;
-      result = false;
-   }
-   
-   if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
-   {
-      theCurrentId = theLexer->yylex(); // skip past right parenthesis
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         <<"No matching right parenthesis for arg list" << endl;
-      result = false;
-   }
-
-   if(!result && popValueStack)
-   {
-      clearArgList(args);
-   }
-   return result;
-}
-
-bool ossimEquationCombiner::parseAssignBand()
-{
-   bool result = true;
-   
-   vector<ossimEquValue> argList;
-
-   if(parseArgList(argList))
-   {
-      if((argList.size() == 3) ||
-         (argList.size() == 4))
-      {
-         ossimEquValue v3 = argList[2];
-         ossimEquValue v2 = argList[1];
-         ossimEquValue v1 = argList[0];
-         
-         if(argList.size() == 3)
-         {
-            if((v1.type == OSSIM_EQU_IMAGE_DATA_TYPE) &&
-               (v2.type == OSSIM_EQU_DOUBLE_TYPE))
-            {
-               ossimImageData *data = (ossimImageData*)v1.d.imageDataValue->dup();
-               ossimEquValue v;
-               
-               if(v3.type == OSSIM_EQU_IMAGE_DATA_TYPE)
-               {
-                  if(data->getBuf()&&
-                     v3.d.imageDataValue->getBuf())
-                  {
-                     if((ossim_uint32)(v2.d.doubleValue) < data->getNumberOfBands())
-                     {
-                        data->assignBand(v3.d.imageDataValue,
-                                         0,
-                                         (ossim_uint32)v2.d.doubleValue);
-                        
-                     }
-                  }
-               }
-               else
-               {
-                  if(data->getBuf()&&
-                     (ossim_uint32)v2.d.doubleValue < data->getNumberOfBands())
-                  {  
-                     ossim_uint32 upper = data->getWidth()*data->getHeight();
-                     double* buf = (double*)data->getBuf((ossim_uint32)v2.d.doubleValue);
-                     double value = v3.d.doubleValue;
-                     if(buf)
-                     {
-                        for(ossim_uint32 i = 0; i < upper; ++i)
-                        {
-                           *buf = value;
-                           ++buf;
-                        }  
-                     }
-                     else
-                     {
-                        result = false;
-                     }
-                  }
-               }
-               if(result)
-               {
-                  data->validate();
-                  v.type = OSSIM_EQU_IMAGE_DATA_TYPE;
-                  v.d.imageDataValue = data;
-                  theValueStack.push(v);
-               }
-            }
-            else
-            {
-               result = false;
-            }
-         }
-         else 
-         {
-            ossimEquValue v4 = argList[3];
-            if((v1.type == OSSIM_EQU_IMAGE_DATA_TYPE) &&
-               (v2.type == OSSIM_EQU_DOUBLE_TYPE)&&
-               (v3.type == OSSIM_EQU_IMAGE_DATA_TYPE)&&
-               (v4.type == OSSIM_EQU_DOUBLE_TYPE))
-            {
-               ossimImageData *data = (ossimImageData*)v1.d.imageDataValue->dup();
-               ossimEquValue v;
-               v.type = OSSIM_EQU_IMAGE_DATA_TYPE;
-               v.d.imageDataValue = data;
-               if(data->getBuf()&&v3.d.imageDataValue->getBuf())
-               {
-                  
-                  ossim_uint32 index1 = (ossim_uint32)v4.d.doubleValue;
-                  ossim_uint32 index2 = (ossim_uint32)v2.d.doubleValue;
-                  
-                  if((index1 > data->getNumberOfBands()) ||
-                     (index1 > v3.d.imageDataValue->getNumberOfBands()))
-                  {
-                     result = false;
-                  }
-                  else
-                  {     
-                     data->assignBand(v3.d.imageDataValue,
-                                      index1,
-                                      index2);
-                     data->validate();
-                  }
-                  
-               }
-               
-               theValueStack.push(v);
-            }
-         }
-      }
-      else
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "Invalid number of arguments to assign_band" << endl;
-         result = false;
-      }
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "unable to parse arguments for assign band" << endl;
-      result = false;
-   }
-
-   clearArgList(argList);
-
-   return result;
-}
-
-bool ossimEquationCombiner::parseStdFuncs()
-{
-   bool result = true;
-
-   switch(theCurrentId)
-   {
-   case OSSIM_EQU_TOKEN_ASSIGN_BAND:
-   {
-      theCurrentId = theLexer->yylex();
-      if(!parseAssignBand())
-      {
-         result = false;
-      }
-      
-      break;
-   }
-   case OSSIM_EQU_TOKEN_CONV:
-   {
-      theCurrentId = theLexer->yylex();
-      vector<ossimEquValue> args;
-      if(parseArgList(args))
-      {
-         ossimImageData* resultImage = (ossimImageData*)NULL;
-         if(applyConvolution(resultImage,
-                              args))
-         {
-            if(resultImage)
-            {
-               ossimEquValue v;
-               v.type = OSSIM_EQU_IMAGE_DATA_TYPE;
-               v.d.imageDataValue = resultImage;
-               
-               theValueStack.push(v);
-            }
-            else
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << "function conv error: resulting image is NULL" << endl;
-               result = false;
-            }
-         }
-         else
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "Unable to apply convolution" << endl;
-            result = false;
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      
-      break;
-   }
-   case OSSIM_EQU_TOKEN_CLAMP:
-   {
-      theCurrentId = theLexer->yylex();
-      vector<ossimEquValue> args;
-      if(parseArgList(args))
-      {
-         ossimImageData* resultImage = (ossimImageData*)NULL;
-         if(applyClamp(resultImage,
-                       args))
-         {
-            if(resultImage)
-            {
-               ossimEquValue v;
-               v.type = OSSIM_EQU_IMAGE_DATA_TYPE;
-               v.d.imageDataValue = resultImage;
-               
-               theValueStack.push(v);
-            }
-            else
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << "function clamp error: resulting image is NULL" << endl;
-               result = false;
-            }
-            
-         }
-         else
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "Unable to apply clamp" << endl;
-            result = false;
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      
-      break;
-   }
-   case OSSIM_EQU_TOKEN_BAND:
-   {
-    // need to parse the following rule for blurr function
-      //
-      // band(image data, number)
-      theCurrentId = theLexer->yylex();
-
-
-      vector<ossimEquValue> argList;
-
-      if(parseArgList(argList))
-      {
-         if(argList.size() == 2)
-         {
-            ossimEquValue v1 = argList[0];
-            ossimEquValue v2 = argList[1];
-            ossimImageData* tempData = NULL;
-            ossim_uint32 bandNumber           = 0;
-            if(v1.type == OSSIM_EQU_IMAGE_DATA_TYPE)
-            {
-               tempData = v1.d.imageDataValue;
-            }
-            else
-            {
-               result = false;
-            }
-            if(v2.type == OSSIM_EQU_DOUBLE_TYPE)
-            {
-               bandNumber = (ossim_uint32)(v2.d.doubleValue);
-            }
-            else
-            {
-               result = false;
-            }
-            if(bandNumber > tempData->getNumberOfBands())
-            {
-               result = false;
-            }
-            if(result)
-            {
-               ossimImageData* data = new ossimImageData(this,
-                                                         OSSIM_FLOAT64,
-                                                         1);
-               data->setWidthHeight(tempData->getWidth(),
-                                    tempData->getHeight());
-               data->setOrigin(tempData->getOrigin());
-               data->setNullPix(tempData->getNullPix(bandNumber),
-                                0);
-               data->setMinPix(tempData->getMinPix(bandNumber),
-                               0);
-               data->setMaxPix(tempData->getMaxPix(bandNumber),
-                               0);
-               data->initialize();
-               
-               if((tempData->getBuf())&&
-                  (bandNumber < tempData->getNumberOfBands()))
-               {
-                  data->assignBand(tempData,
-                                   bandNumber,
-                                   0);                           
-                  data->validate();
-               }
-               ossimEquValue v;
-               v.type = OSSIM_EQU_IMAGE_DATA_TYPE;
-               v.d.imageDataValue = data;
-               theValueStack.push(v);
-            }
-            
-            if(tempData)
-            {
-               // Delete the object indirectly through an ossimRefPtr.
-               ossimRefPtr<ossimImageData> id = tempData;
-               tempData = NULL;
-            }
-         }
-         else
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "Invalid number of args in function band" << endl;
-            
-            result = false;
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      
-      break;
-   }
-   case OSSIM_EQU_TOKEN_BLURR:
-   {
-      theCurrentId = theLexer->yylex();
-      vector<ossimEquValue> args;
-      if(parseArgList(args))
-      {
-         ossimImageData* resultImage = (ossimImageData*)NULL;
-         if(applyBlurr(resultImage,
-                       args))
-         {
-            if(resultImage)
-            {
-               ossimEquValue v;
-               v.type = OSSIM_EQU_IMAGE_DATA_TYPE;
-               v.d.imageDataValue = resultImage;
-               
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-         }
-         else
-         {
-            result = false;
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      
-      break;
-   }
-   case OSSIM_EQU_TOKEN_SHIFT:
-   {
-      theCurrentId = theLexer->yylex();
-      vector<ossimEquValue> args;
-      if(parseArgList(args))
-      {
-         ossimImageData* resultImage = (ossimImageData*)NULL;
-         if(applyShift(resultImage,
-                       args))
-         {
-            if(resultImage)
-            {
-               ossimEquValue v;
-               v.type = OSSIM_EQU_IMAGE_DATA_TYPE;
-               v.d.imageDataValue = resultImage;
-               
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-         }
-         else
-         {
-            result = false;
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      
-      break;
-   }
-   case OSSIM_EQU_TOKEN_MAX:
-   case OSSIM_EQU_TOKEN_MIN:
-   {
-      ossimBinaryOp* op = NULL;
-      if(theCurrentId == OSSIM_EQU_TOKEN_MIN) op = new ossimBinaryOpMin;
-      else op = new ossimBinaryOpMax;
-      
-      int argCount = 0;
-      theCurrentId = theLexer->yylex();
-      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
-      {
-         theCurrentId = theLexer->yylex();
-         bool done = false;
-         while(!done)
-         {
-            if(parseExpression())
-            {
-               
-               ++argCount;
-               if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
-               {
-                  theCurrentId = theLexer->yylex();
-                  
-                  done = true;
-               }
-               else if(theCurrentId == OSSIM_EQU_TOKEN_COMMA)
-               {
-                  theCurrentId = theLexer->yylex();
-               }
-               else
-               {
-                  result = false;
-                  done = true;
-               }
-            }
-            else
-            {
-               done = true;
-               result = false;
-            }
-         }
-         if((argCount > 1)&&result)
-         {
-            result = true;
-            
-            ossimEquValue v;
-            ossimEquValue v1;
-            ossimEquValue v2;
-
-            v2 = theValueStack.top();
-            theValueStack.pop();
-            v1 = theValueStack.top();
-            theValueStack.pop();
-            argCount -=2;
-
-            do
-            {
-               if(applyOp(*op,
-                          v,
-                          v1,
-                          v2))
-               {
-                  theValueStack.push(v);
-               }
-               else
-               {
-                  result = false;
-                  argCount = 0;
-                  
-               }
-               --argCount;
-               
-               if((argCount>0)&&result)
-               {
-                  v2 = theValueStack.top();
-                  theValueStack.pop();
-                  v1 = theValueStack.top();
-                  theValueStack.pop();
-               }
-               
-            }while((argCount > 0)&&(result));
-         }
-         else
-         {
-            result = false;
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      if(op)
-      {
-         delete op;
-         op = NULL;
-      }
-      break;
-   }
-   case OSSIM_EQU_TOKEN_ABS:
-   {
-      theCurrentId = theLexer->yylex();
-      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
-      {
-         theCurrentId = theLexer->yylex();
-         result = parseExpression();
-         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
-         {
-            if(theValueStack.size() > 0)
-            {
-               theCurrentId = theLexer->yylex();
-               ossimEquValue v;
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-               
-               applyOp(ossimUnaryOpAbs(),
-                       v,
-                       v1);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      break;
-   }
-   case OSSIM_EQU_TOKEN_SIN:
-   {
-      theCurrentId = theLexer->yylex();
-      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
-      {
-         theCurrentId = theLexer->yylex();
-         result = parseExpression();
-         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
-         {
-            if(theValueStack.size() > 0)
-            {
-               theCurrentId = theLexer->yylex();
-               ossimEquValue v;
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-               
-               applyOp(ossimUnaryOpSin(),
-                       v,
-                       v1);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      break;
-   }
-   case OSSIM_EQU_TOKEN_SIND:
-   {
-      theCurrentId = theLexer->yylex();
-      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
-      {
-         theCurrentId = theLexer->yylex();
-         result = parseExpression();
-         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
-         {
-            if(theValueStack.size() > 0)
-            {
-               theCurrentId = theLexer->yylex();
-               ossimEquValue v;
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-               
-               applyOp(ossimUnaryOpSind(),
-                       v,
-                       v1);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      break;
-   }
-   case OSSIM_EQU_TOKEN_ASIN:
-   {
-      theCurrentId = theLexer->yylex();
-      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
-      {
-         theCurrentId = theLexer->yylex();
-         result = parseExpression();
-         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
-         {
-            if(theValueStack.size() > 0)
-            {
-               theCurrentId = theLexer->yylex();
-               ossimEquValue v;
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-               
-               applyOp(ossimUnaryOpASin(),
-                       v,
-                       v1);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      break;
-   }
-   case OSSIM_EQU_TOKEN_ASIND:
-   {
-      theCurrentId = theLexer->yylex();
-      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
-      {
-         theCurrentId = theLexer->yylex();
-         result = parseExpression();
-         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
-         {
-            if(theValueStack.size() > 0)
-            {
-               theCurrentId = theLexer->yylex();
-               ossimEquValue v;
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-               
-               applyOp(ossimUnaryOpASind(),
-                       v,
-                       v1);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      break;
-   }
-   case OSSIM_EQU_TOKEN_COS:
-   {
-      theCurrentId = theLexer->yylex();
-      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
-      {
-         theCurrentId = theLexer->yylex();
-         result = parseExpression();
-         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
-         {
-            if(theValueStack.size() > 0)
-            {
-               theCurrentId = theLexer->yylex();
-               ossimEquValue v;
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-               
-               applyOp(ossimUnaryOpCos(),
-                       v,
-                       v1);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      break;
-   }
-   case OSSIM_EQU_TOKEN_COSD:
-   {
-      theCurrentId = theLexer->yylex();
-      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
-      {
-         theCurrentId = theLexer->yylex();
-         result = parseExpression();
-         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
-         {
-            if(theValueStack.size() > 0)
-            {
-               theCurrentId = theLexer->yylex();
-               ossimEquValue v;
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-               
-               applyOp(ossimUnaryOpCosd(),
-                       v,
-                       v1);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      break;
-   }
-   case OSSIM_EQU_TOKEN_ACOS:
-   {
-      theCurrentId = theLexer->yylex();
-      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
-      {
-         theCurrentId = theLexer->yylex();
-         result = parseExpression();
-         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
-         {
-            if(theValueStack.size() > 0)
-            {
-               theCurrentId = theLexer->yylex();
-               ossimEquValue v;
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-               
-               applyOp(ossimUnaryOpACos(),
-                       v,
-                       v1);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      break;
-   }
-   case OSSIM_EQU_TOKEN_ACOSD:
-   {
-      theCurrentId = theLexer->yylex();
-      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
-      {
-         theCurrentId = theLexer->yylex();
-         result = parseExpression();
-         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
-         {
-            if(theValueStack.size() > 0)
-            {
-               theCurrentId = theLexer->yylex();
-               ossimEquValue v;
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-               
-               applyOp(ossimUnaryOpACosd(),
-                       v,
-                       v1);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      break;
-   }
-   case OSSIM_EQU_TOKEN_TAN:
-   {
-      theCurrentId = theLexer->yylex();
-      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
-      {
-         theCurrentId = theLexer->yylex();
-         result = parseExpression();
-         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
-         {
-            if(theValueStack.size() > 0)
-            {
-               theCurrentId = theLexer->yylex();
-               ossimEquValue v;
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-               
-               applyOp(ossimUnaryOpTan(),
-                       v,
-                       v1);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      break;
-   }
-   case OSSIM_EQU_TOKEN_TAND:
-   {
-      theCurrentId = theLexer->yylex();
-      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
-      {
-         theCurrentId = theLexer->yylex();
-         result = parseExpression();
-         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
-         {
-            if(theValueStack.size() > 0)
-            {
-               theCurrentId = theLexer->yylex();
-               ossimEquValue v;
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-               
-               applyOp(ossimUnaryOpTand(),
-                       v,
-                       v1);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      break;
-   }
-   case OSSIM_EQU_TOKEN_ATAN:
-   {
-      theCurrentId = theLexer->yylex();
-      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
-      {
-         theCurrentId = theLexer->yylex();
-         result = parseExpression();
-         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
-         {
-            if(theValueStack.size() > 0)
-            {
-               theCurrentId = theLexer->yylex();
-               ossimEquValue v;
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-               
-               applyOp(ossimUnaryOpATan(),
-                       v,
-                       v1);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      break;
-   }
-   case OSSIM_EQU_TOKEN_ATAND:
-   {
-      theCurrentId = theLexer->yylex();
-      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
-      {
-         theCurrentId = theLexer->yylex();
-         result = parseExpression();
-         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
-         {
-            if(theValueStack.size() > 0)
-            {
-               theCurrentId = theLexer->yylex();
-               ossimEquValue v;
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-               
-               applyOp(ossimUnaryOpATand(),
-                       v,
-                       v1);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      break;
-   }
-   case OSSIM_EQU_TOKEN_LOG:
-   {
-      theCurrentId = theLexer->yylex();
-      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
-      {
-         theCurrentId = theLexer->yylex();
-         result = parseExpression();
-         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
-         {
-            if(theValueStack.size() > 0)
-            {
-               theCurrentId = theLexer->yylex();
-               ossimEquValue v;
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-               
-               applyOp(ossimUnaryOpLog(),
-                       v,
-                       v1);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      break;
-   }
-   case OSSIM_EQU_TOKEN_LOG10:
-   {
-      theCurrentId = theLexer->yylex();
-      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
-      {
-         theCurrentId = theLexer->yylex();
-         result = parseExpression();
-         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
-         {
-            if(theValueStack.size() > 0)
-            {
-               theCurrentId = theLexer->yylex();
-               ossimEquValue v;
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-               
-               applyOp(ossimUnaryOpLog10(),
-                       v,
-                       v1);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      break;
-   }
-   case OSSIM_EQU_TOKEN_SQRT:
-   {
-      theCurrentId = theLexer->yylex();
-      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
-      {
-         theCurrentId = theLexer->yylex();
-         result = parseExpression();
-         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
-         {
-            if(theValueStack.size() > 0)
-            {
-               theCurrentId = theLexer->yylex();
-               ossimEquValue v;
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-               
-               applyOp(ossimUnaryOpSqrt(),
-                       v,
-                       v1);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      break;
-   }
-   case OSSIM_EQU_TOKEN_EXP:
-   {
-      theCurrentId = theLexer->yylex();
-      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_PAREN)
-      {
-         theCurrentId = theLexer->yylex();
-         result = parseExpression();
-         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
-         {
-            if(theValueStack.size() > 0)
-            {
-               theCurrentId = theLexer->yylex();
-               ossimEquValue v;
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-               
-               applyOp(ossimUnaryOpExp(),
-                       v,
-                       v1);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      break;
-   }
-   default:
-   {
-      result = false;
-   }
-   }
-
-   return result;
-}
-
-bool ossimEquationCombiner::parseUnaryFactor()
-{
-   bool result = false;
-
-   
-   if(theCurrentId == OSSIM_EQU_TOKEN_MINUS)
-   {
-      theCurrentId = theLexer->yylex();
-
-      if(parseFactor())
-      {
-         if(theValueStack.size() > 0)
-         {
-            ossimEquValue v;
-            ossimEquValue v1 = theValueStack.top();
-            theValueStack.pop();
-            
-            applyOp(ossimUnaryOpNeg(),
-                    v,
-                    v1);
-            
-            theValueStack.push(v);
-         }
-         else
-         {
-            result = false;
-         }
-
-         result = true;
-      }
-      else
-      {
-         result = false;
-      }
-   }
-   else if(theCurrentId == OSSIM_EQU_TOKEN_TILDE)
-   {
-      theCurrentId = theLexer->yylex();
-
-      if(parseFactor())
-      {
-         if(theValueStack.size() > 0)
-         {
-            ossimEquValue v;
-            ossimEquValue v1 = theValueStack.top();
-            theValueStack.pop();
-            
-            applyOp(ossimUnaryOpOnesComplement(),
-                    v,
-                    v1);
-            
-            theValueStack.push(v);
-         }
-         else
-         {
-            result = false;
-         }
-
-         result = true;
-      }
-      else
-      {
-         result = false;
-      }
-   }
-   return result;
-}
-
-bool ossimEquationCombiner::parseFactor()
-{
-   bool result = false;
-
-   switch(theCurrentId)
-   {
-   case OSSIM_EQU_TOKEN_CONSTANT:
-   {
-      ossimEquValue v;
-
-      v.type = OSSIM_EQU_DOUBLE_TYPE;
-      v.d.doubleValue = atof(theLexer->YYText());
-      theValueStack.push(v);
-      
-      theCurrentId = theLexer->yylex();
-      
-      result =  true;
-      break;
-   }
-   case OSSIM_EQU_TOKEN_PI:
-   {
-      ossimEquValue v;
-
-      v.type = OSSIM_EQU_DOUBLE_TYPE;
-      v.d.doubleValue = M_PI;
-      theValueStack.push(v);
-      
-      theCurrentId = theLexer->yylex();
-      
-      result =  true;
-      break;      
-   }
-   case OSSIM_EQU_TOKEN_IMAGE_VARIABLE:
-   {
-      theCurrentId = theLexer->yylex();
-      if(theCurrentId == OSSIM_EQU_TOKEN_LEFT_ARRAY_BRACKET)
-      {
-         theCurrentId = theLexer->yylex();
-         if(parseExpression())
-         {
-            if(!theValueStack.empty())
-            {
-               if(theValueStack.top().type == OSSIM_EQU_DOUBLE_TYPE)
-               {
-                  if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_ARRAY_BRACKET)
-                  {
-                     theCurrentId = theLexer->yylex();
-                     ossim_uint32 index = (ossim_uint32)theValueStack.top().d.doubleValue;
-                     theValueStack.pop();
-                     ossimRefPtr<ossimImageData> data = getNewImageData(index);
-                     result = true;
-                     if(data.valid())
-                     {
-                        ossimEquValue v;
-                        v.type = OSSIM_EQU_IMAGE_DATA_TYPE;
-                        v.d.imageDataValue = data.release();
-                        theValueStack.push(v);
-
-                     }
-                     else
-                     {
-                        ossimNotify(ossimNotifyLevel_WARN)
-                           <<"Data is NULL for array operation" << endl;
-                     }
-                     result = true;
-                  }
-                  else
-                  {
-                     ossimNotify(ossimNotifyLevel_WARN)
-                        << "Mismatched Right array bracket" << endl;
-                  }
-               }
-               else
-               {
-                  ossimNotify(ossimNotifyLevel_WARN)
-                     << "Expression between array brackets is not a number"
-                     << endl;
-               }
-            }
-            else
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << "no expression within array brackets" << endl;
-            }
-         }
-         else
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "Unabel to parse expression"<<endl;
-         }
-      }
-      else
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            <<"Need left array brackets to access an input source"<<endl;
-      }
-      
-      break;
-   }
-   case OSSIM_EQU_TOKEN_LEFT_PAREN:
-   {
-      theCurrentId = theLexer->yylex();
-      if(parseExpression())
-      {
-         if(theCurrentId == OSSIM_EQU_TOKEN_RIGHT_PAREN)
-         {
-            result       =  true;
-            theCurrentId = theLexer->yylex();
-         }
-         else
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "Right parenthesis missing" << endl;
-            result = false;
-         }
-      }
-      else
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "Unable to parse expression within parenthesis" << endl;
-         result = false;
-      }
-      
-      break;
-   }
-   }
-   if(!result) result = parseUnaryFactor();
-   
-   if(!result) result = parseStdFuncs();
-   
-   return result;
-}
-
-bool ossimEquationCombiner::parseRestOfTerm()
-{
-   //---
-   // Parse the following rule:
-   // RestOfTerm: * Factor RestOfTerm | / Factor RestOfTerm |
-   // ^ Factor RestOfTerm
-   //---
-   bool result = true;
-   
-   switch(theCurrentId)
-   {
-      case OSSIM_EQU_TOKEN_MULT:
-      {
-         theCurrentId = theLexer->yylex();
-         if(parseFactor())
-         {
-            if(theValueStack.size() > 1)
-            {
-               ossimEquValue v;
-            
-               ossimEquValue v2 = theValueStack.top();
-               theValueStack.pop();
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-            
-               applyOp(ossimBinaryOpMul(),
-                       v,
-                       v1,
-                       v2);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << "Multiplication requires two arguments" << endl;
-               result = false;
-            }
-            if(result)
-            {
-               result = parseRestOfTerm();
-            }
-         }
-         else
-         {
-            result = false;
-         }
-         break;
-      }
-      case OSSIM_EQU_TOKEN_DIV:
-      {
-         theCurrentId = theLexer->yylex();
-         if(parseFactor())
-         {
-            if(theValueStack.size() > 1)
-            {
-               ossimEquValue v;
-            
-               ossimEquValue v2 = theValueStack.top();
-               theValueStack.pop();
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-            
-               applyOp(ossimBinaryOpDiv(),
-                       v,
-                       v1,
-                       v2);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-            if(result)
-            {
-               result = parseRestOfTerm();
-            }
-         }
-         else
-         {
-            result = false;
-         }
-
-         break;
-      }
-      case OSSIM_EQU_TOKEN_XOR:
-      {
-         theCurrentId = theLexer->yylex();
-         if(parseFactor())
-         {
-            if(theValueStack.size() > 1)
-            {
-               ossimEquValue v;
-            
-               ossimEquValue v2 = theValueStack.top();
-               theValueStack.pop();
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-            
-               applyOp(ossimBinaryOpXor(),
-                       v,
-                       v1,
-                       v2);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-            if(result)
-            {
-               result = parseRestOfTerm();
-            }
-         }
-         else
-         {
-            result = false;
-         }
-
-         break;
-      }
-      case OSSIM_EQU_TOKEN_AMPERSAND:
-      {
-         theCurrentId = theLexer->yylex();
-         if(parseFactor())
-         {
-            if(theValueStack.size() > 1)
-            {
-               ossimEquValue v;
-            
-               ossimEquValue v2 = theValueStack.top();
-               theValueStack.pop();
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-            
-               applyOp(ossimBinaryOpAnd(),
-                       v,
-                       v1,
-                       v2);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-            if(result)
-            {
-               result = parseRestOfTerm();
-            }
-         }
-         else
-         {
-            result = false;
-         }
-
-         break;
-      }
-      case OSSIM_EQU_TOKEN_OR_BAR:
-      {
-         theCurrentId = theLexer->yylex();
-         if(parseFactor())
-         {
-            if(theValueStack.size() > 1)
-            {
-               ossimEquValue v;
-            
-               ossimEquValue v2 = theValueStack.top();
-               theValueStack.pop();
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-            
-               applyOp(ossimBinaryOpOr(),
-                       v,
-                       v1,
-                       v2);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-            if(result)
-            {
-               result = parseRestOfTerm();
-            }
-         }
-         else
-         {
-            result = false;
-         }
-
-         break;
-      }
-      case OSSIM_EQU_TOKEN_MOD:
-      {
-         theCurrentId = theLexer->yylex();
-         if(parseFactor())
-         {
-            if(theValueStack.size() > 1)
-            {
-               ossimEquValue v;
-            
-               ossimEquValue v2 = theValueStack.top();
-               theValueStack.pop();
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-            
-               applyOp(ossimBinaryOpMod(),
-                       v,
-                       v1,
-                       v2);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-            if(result)
-            {
-               result = parseRestOfTerm();
-            }
-         }
-         else
-         {
-            result = false;
-         }
-
-         break;
-      }
-      case OSSIM_EQU_TOKEN_POWER:
-      {
-         theCurrentId = theLexer->yylex();
-         if(parseFactor())
-         {
-            if(theValueStack.size() > 1)
-            {
-               ossimEquValue v;
-            
-               ossimEquValue v2 = theValueStack.top();
-               theValueStack.pop();
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-            
-               applyOp(ossimBinaryOpPow(),
-                       v,
-                       v1,
-                       v2);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-            if(result)
-            {
-               result = parseRestOfTerm();
-            }
-         }
-         else
-         {
-            result = false;
-         }
-         break;
-      }
-      case OSSIM_EQU_TOKEN_BEQUAL:
-      {
-         theCurrentId = theLexer->yylex();
-         if(parseFactor())
-         {
-            if(theValueStack.size() > 1)
-            {
-               ossimEquValue v;
-            
-               ossimEquValue v2 = theValueStack.top();
-               theValueStack.pop();
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-            
-               applyOp(ossimBinaryOpEqual(),
-                       v,
-                       v1,
-                       v2);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-            if(result)
-            {
-               result = parseRestOfTerm();
-            }
-         }
-         else
-         {
-            result = false;
-         }
-
-         break;
-      }
-      case OSSIM_EQU_TOKEN_BGREATER:
-      {
-         theCurrentId = theLexer->yylex();
-         if(parseFactor())
-         {
-            if(theValueStack.size() > 1)
-            {
-               ossimEquValue v;
-            
-               ossimEquValue v2 = theValueStack.top();
-               theValueStack.pop();
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-            
-               applyOp(ossimBinaryOpGreater(),
-                       v,
-                       v1,
-                       v2);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-            if(result)
-            {
-               result = parseRestOfTerm();
-            }
-         }
-         else
-         {
-            result = false;
-         }
-
-         break;
-      }
-      case OSSIM_EQU_TOKEN_BGREATEROREQUAL:
-      {
-         theCurrentId = theLexer->yylex();
-         if(parseFactor())
-         {
-            if(theValueStack.size() > 1)
-            {
-               ossimEquValue v;
-            
-               ossimEquValue v2 = theValueStack.top();
-               theValueStack.pop();
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-            
-               applyOp(ossimBinaryOpGreaterOrEqual(),
-                       v,
-                       v1,
-                       v2);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-            if(result)
-            {
-               result = parseRestOfTerm();
-            }
-         }
-         else
-         {
-            result = false;
-         }
-
-         break;
-      }
-      case OSSIM_EQU_TOKEN_BLESS:
-      {
-         theCurrentId = theLexer->yylex();
-         if(parseFactor())
-         {
-            if(theValueStack.size() > 1)
-            {
-               ossimEquValue v;
-            
-               ossimEquValue v2 = theValueStack.top();
-               theValueStack.pop();
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-            
-               applyOp(ossimBinaryOpLess(),
-                       v,
-                       v1,
-                       v2);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-            if(result)
-            {
-               result = parseRestOfTerm();
-            }
-         }
-         else
-         {
-            result = false;
-         }
-
-         break;
-      }
-      case OSSIM_EQU_TOKEN_BLESSOREQUAL:
-      {
-         theCurrentId = theLexer->yylex();
-         if(parseFactor())
-         {
-            if(theValueStack.size() > 1)
-            {
-               ossimEquValue v;
-            
-               ossimEquValue v2 = theValueStack.top();
-               theValueStack.pop();
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-            
-               applyOp(ossimBinaryOpLessOrEqual(),
-                       v,
-                       v1,
-                       v2);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-            if(result)
-            {
-               result = parseRestOfTerm();
-            }
-         }
-         else
-         {
-            result = false;
-         }
-
-         break;
-      }
-      case OSSIM_EQU_TOKEN_BDIFFERENT:
-      {
-         theCurrentId = theLexer->yylex();
-         if(parseFactor())
-         {
-            if(theValueStack.size() > 1)
-            {
-               ossimEquValue v;
-            
-               ossimEquValue v2 = theValueStack.top();
-               theValueStack.pop();
-               ossimEquValue v1 = theValueStack.top();
-               theValueStack.pop();
-            
-               applyOp(ossimBinaryOpDifferent(),
-                       v,
-                       v1,
-                       v2);
-            
-               theValueStack.push(v);
-            }
-            else
-            {
-               result = false;
-            }
-            if(result)
-            {
-               result = parseRestOfTerm();
-            }
-         }
-         else
-         {
-            result = false;
-         }
-
-         break;
-      }
-
-   }
-   
-   return result;
-}
-
-bool ossimEquationCombiner::parseTerm()
-{
-   // parse the following rule:
-   //
-   // Term : Factor RestOfTerm
-   
-   bool result = false;
-
-   result = parseFactor();
-   
-   if(result)
-   {
-      result = parseRestOfTerm();
-   }
-   
-   return result;
-}
-
-bool ossimEquationCombiner::parseRestOfExp()
-{
-   // parse the following rule:
-   // RestOfExpression : + Term RestOfExpression | - Term RestOfExpression | epsilon
-   //
-   bool result = true;
-   
-   if(theCurrentId == OSSIM_EQU_TOKEN_PLUS)
-   {
-      theCurrentId = theLexer->yylex();
-      if(parseTerm())
-      {
-
-         if(theValueStack.size() > 1)
-         {
-            ossimEquValue v;
-            
-            ossimEquValue v2 = theValueStack.top();
-            theValueStack.pop();
-            ossimEquValue v1 = theValueStack.top();
-            theValueStack.pop();
-            
-            
-            applyOp(ossimBinaryOpAdd(),
-                    v,
-                    v1,
-                    v2);              
-            
-            theValueStack.push(v);
-         }
-         else
-         {
-            result = false;
-         }
-         if(result)
-         {
-            result = parseRestOfExp();
-         }
-      }
-      else
-      {
-        result =  false;
-      }
-   }
-   else if(theCurrentId == OSSIM_EQU_TOKEN_MINUS)
-   {
-      theCurrentId = theLexer->yylex();
-      if(parseTerm())
-      {
-         if(theValueStack.size() > 1)
-         {
-            ossimEquValue v;
-            
-            ossimEquValue v2 = theValueStack.top();
-            theValueStack.pop();
-            ossimEquValue v1 = theValueStack.top();
-            theValueStack.pop();
-            
-            applyOp(ossimBinaryOpSub(),
-                    v,
-                    v1,
-                    v2);
-            
-            theValueStack.push(v);
-         }
-         else
-         {
-            result = false;
-         }
-         if(result)
-         {
-            result = parseRestOfExp();
-         }
-      }
-      else
-      {
-         result =  false;
-      }
-   }
-   
-   return result;
-}
-
-ossimRefPtr<ossimImageData> ossimEquationCombiner::getImageData(ossim_uint32 index)
-{
-   ossimRefPtr<ossimImageData> result;
-   ossimConnectableObject* obj = getInput(index);
-   
-   if(obj)
-   {
-      theCastFilter->connectMyInputTo(0, obj);
-      result= (theCastFilter->getTile(theTile->getImageRectangle(),
-                                      theCurrentResLevel));
-      
-      if(result.valid())
-      {
-         result->setMinPix(theTile->getMinPix(), theTile->getNumberOfBands());
-         result->setMaxPix(theTile->getMaxPix(), theTile->getNumberOfBands());
-      }
-   }
-
-   return result;
-}
-
-ossimRefPtr<ossimImageData> ossimEquationCombiner::getNewImageData(
-   ossim_uint32 index)
-{
-   ossimRefPtr<ossimImageData> result = getImageData(index);
-
-   if(result.valid())
-   {
-      if(result->getBuf())
-      {
-         result = (ossimImageData*)result->dup();
-      }
-   }
-
-   return result;
-}
-
-bool ossimEquationCombiner::parseExpression()
-{
-   // parse the following rule:
-   // expression : Term ResOfExpression
-   //
-   
-   bool result = false;
-   
-   if(parseTerm())
-   {
-      result =  parseRestOfExp();
-   }
-
-   return result;
-}
-
-ossimRefPtr<ossimImageData> ossimEquationCombiner::parseEquation()
-{
-   ostringstream s;
-
-   s << theEquation;
-
-   istringstream inS(s.str());
-   theLexer->switch_streams(&inS, &ossimNotify(ossimNotifyLevel_WARN));
-
-   theCurrentId = theLexer->yylex();
-
-   while(theCurrentId)
-   {
-      if(!parseExpression())
-      {
-         break;
-      }
-   }
-
-   if(!theValueStack.empty())
-   {
-      assignValue();
-      theTile->validate();
-      clearStacks();
-   }
-   
-   return theTile;
-}    
-
-bool ossimEquationCombiner::applyClamp(ossimImageData* &result,
-                                       const vector<ossimEquValue>& argList)
-{
-   if(result)
-   {
-      // Delete the object indirectly through an ossimRefPtr.
-      ossimRefPtr<ossimImageData> id = result;
-      id = NULL;
-      result = (ossimImageData*) NULL;
-   }
-   if(argList.size() <3)
-   {
-      return false;
-   }
-
-   if(argList[0].type == OSSIM_EQU_DOUBLE_TYPE)
-   {
-      return false;
-   }
-   else if( (argList[1].type == OSSIM_EQU_DOUBLE_TYPE)&&
-            (argList[2].type == OSSIM_EQU_DOUBLE_TYPE))
-   {
-      result = argList[0].d.imageDataValue;
-      
-      if(argList[0].d.imageDataValue)
-      {
-         ossimDataObjectStatus status = result->getDataObjectStatus();
-         if((status != OSSIM_NULL) &&
-            (status != OSSIM_EMPTY))
-         {
-            double minValue = argList[1].d.doubleValue;
-            double maxValue = argList[2].d.doubleValue;
-            
-            if(minValue > maxValue)
-            {
-               std::swap(minValue, maxValue);
-            }
-            
-            int band   = 0;
-            int offset = 0;
-            
-            int upperBoundBand   = result->getNumberOfBands();
-            int offsetUpperBound = result->getWidth()*result->getHeight();
-
-            if(status == OSSIM_PARTIAL)
-            {
-               for(band = 0; band < upperBoundBand; ++band)
-               {
-                  double np = static_cast<double>(result->getNullPix(band));
-                  double *buf = static_cast<double*>(result->getBuf(band));
-                  for(offset = 0; offset < offsetUpperBound; ++ offset)
-                  {
-                     if( *buf != np )
-                     {
-                        if( (*buf) < minValue) *buf = minValue;
-                        else if( (*buf) >maxValue) *buf = maxValue;
-                     }
-                     ++buf;
-                  }
-               }
-            }
-            else
-            {
-               for(band = 0; band < upperBoundBand; ++band)
-               {
-                  double *buf = static_cast<double*>(result->getBuf(band));
-                  for(offset = 0; offset < offsetUpperBound; ++ offset)
-                  {
-                     if( (*buf) < minValue) *buf = minValue;
-                     else if( (*buf) >maxValue) *buf = maxValue;
-                     ++buf;
-                  }
-               }
-            }
-         }
-      }
-         
-      return true;
-   }
-   return false;
-}
-
-bool ossimEquationCombiner::applyConvolution(ossimImageData* &result,
-                                             const vector<ossimEquValue>& argList)
-{
-   if(result)
-   {
-      // Delete the object indirectly through an ossimRefPtr.
-      ossimRefPtr<ossimImageData> id = result;
-      id = NULL;
-      result = (ossimImageData*) NULL;
-   }
-   if(argList.size() <4) return false;
-   
-   for(ossim_uint32 i = 0; i < argList.size(); ++i)
-   {
-      if(argList[i].type != OSSIM_EQU_DOUBLE_TYPE)
-      {
-         return false;
-      }
-   }
-
-   ossim_uint32 index = (ossim_uint32)argList[0].d.doubleValue;
-   int rows = (int)argList[1].d.doubleValue;
-   int cols = (int)argList[2].d.doubleValue;
-   
-   if((rows*cols) != (int)(argList.size()-3))
-   {
-      return false;
-   }
-   
-   NEWMAT::Matrix m(rows,cols);
-
-    int count = 3;
-    for(int r = 0; r< rows;++r)
-    {
-       for(int c=0;c<cols;++c)
-       {
-          m[r][c] = argList[count].d.doubleValue;
-          ++count;
-       }
-    }
-   ossimConnectableObject* obj = getInput(index);
-   if(obj)
-   {
-      ossimRefPtr<ossimConvolutionSource> conv = new ossimConvolutionSource(NULL, m);
-
-      conv->connectMyInputTo(0, obj);
-      theCastFilter->connectMyInputTo(0, conv.get());
-      
-      ossimRefPtr<ossimImageData> tempData =
-         theCastFilter->getTile(theTile->getImageRectangle(),
-                                theCurrentResLevel);
-      if(tempData.valid())
-      {
-         result = (ossimImageData*)tempData->dup();
-      }
-      else
-      {
-         result = (ossimImageData*)theTile->dup();
-      }
-      conv->disconnect();
-      conv = 0;
-   }
-   if(result)
-   {
-      return true;
-   }
-
-   return false;
-}
-
-bool ossimEquationCombiner::applyBlurr(ossimImageData* &result,
-                                       const vector<ossimEquValue>& argList)
-{
-   if(result)
-   {
-      // Delete the object indirectly through an ossimRefPtr.
-      ossimRefPtr<ossimImageData> id = result;
-      id = NULL;
-      result = (ossimImageData*) NULL;
-   }
-   if(argList.size() !=3) return false;
-   
-   for(ossim_uint32 i = 0; i < argList.size(); ++i)
-   {
-      if(argList[i].type != OSSIM_EQU_DOUBLE_TYPE)
-      {
-         return false;
-      }
-   }
-
-   ossim_uint32 index = (ossim_uint32)argList[0].d.doubleValue;
-   int rows = (int)argList[1].d.doubleValue;
-   int cols = (int)argList[2].d.doubleValue;
-   
-   NEWMAT::Matrix m(rows, cols);
-
-   m = 1.0/(rows*cols);
-
-   ossimConnectableObject* obj = getInput(index);
-   if(obj)
-   {
-      ossimRefPtr<ossimConvolutionSource> conv = new ossimConvolutionSource(NULL,
-                                                                m);
-
-      conv->connectMyInputTo(0, obj);
-      theCastFilter->connectMyInputTo(0, conv.get());
-      theCastFilter->initialize();
-
-      ossimRefPtr<ossimImageData> tempData =
-         theCastFilter->getTile(theTile->getImageRectangle(),
-                                theCurrentResLevel);
-      if(tempData.valid())
-      {
-         result = (ossimImageData*)tempData->dup();
-      }
-      conv->disconnect();
-      conv = 0;
-   }
-
-   if(result)
-   {
-      return true;
-   }
-
-   return false;
-}
-
-bool ossimEquationCombiner::applyShift(ossimImageData* &result,
-                                       const vector<ossimEquValue>& argList)
-{
-   if(result)
-   {
-      // Delete the object indirectly through an ossimRefPtr.
-      ossimRefPtr<ossimImageData> id = result;
-      id = NULL;
-      result = (ossimImageData*) NULL;
-   }
-   if(argList.size() !=3) return false;
-   
-   for(ossim_uint32 i = 0; i < argList.size(); ++i)
-   {
-      if(argList[i].type != OSSIM_EQU_DOUBLE_TYPE)
-      {
-         return false;
-      }
-   }
-
-   ossim_uint32 index = (ossim_uint32)argList[0].d.doubleValue;
-   int x = (int)argList[1].d.doubleValue;
-   int y = (int)argList[2].d.doubleValue;
-
-   ossimConnectableObject* obj = getInput(index);
-   if(obj)
-   {
-      ossimRefPtr<ossimSubImageTileSource> shiftSource =
-         new ossimSubImageTileSource(NULL, ossimIpt(x, y));
-
-      shiftSource->connectMyInputTo(0, obj);
-      theCastFilter->connectMyInputTo(0, shiftSource.get());
-
-       ossimRefPtr<ossimImageData> tempData =
-          theCastFilter->getTile(theTile->getImageRectangle(),
-                                 theCurrentResLevel);
-       if(tempData.valid())
-       {
-          result = (ossimImageData*)tempData->dup();
-       }
-      shiftSource->disconnect();
-      shiftSource = 0;
-   }
-
-   if(result)
-   {
-      return true;
-   }
-
-   return false;
-}
-
-bool ossimEquationCombiner::applyOp(const ossimBinaryOp& op,
-                                    ossimEquValue& result,
-                                    ossimEquValue& v1,
-                                    ossimEquValue& v2)
-{
-   bool returnValue = true;
-   
-   if(v1.type == OSSIM_EQU_DOUBLE_TYPE)
-   {
-      if(v2.type == OSSIM_EQU_DOUBLE_TYPE)
-      {
-         result.type = OSSIM_EQU_DOUBLE_TYPE;
-         result.d.doubleValue = op.apply(v1.d.doubleValue, v2.d.doubleValue);
-      }
-      else if(v2.type == OSSIM_EQU_IMAGE_DATA_TYPE)
-      {
-         returnValue = applyOp(op,
-                               v1.d.doubleValue,
-                               v2.d.imageDataValue);
-         
-         result.type = OSSIM_EQU_IMAGE_DATA_TYPE;
-         result.d.imageDataValue = v2.d.imageDataValue;
-      }
-      else
-      {
-         returnValue = false;
-      }
-   }
-   else if(v1.type == OSSIM_EQU_IMAGE_DATA_TYPE)
-   {
-      if(v2.type == OSSIM_EQU_DOUBLE_TYPE)
-      {
-         
-         returnValue = applyOp(op,
-                               v1.d.imageDataValue,
-                               v2.d.doubleValue);
-         
-         result.type = OSSIM_EQU_IMAGE_DATA_TYPE;
-         result.d.imageDataValue = v1.d.imageDataValue;
-         returnValue = true;
-      }
-      else if(v2.type == OSSIM_EQU_IMAGE_DATA_TYPE)
-      {
-         returnValue = applyOp(op,
-                               v1.d.imageDataValue,
-                               v2.d.imageDataValue);
-         result.type = OSSIM_EQU_IMAGE_DATA_TYPE;
-         result.d.imageDataValue = v1.d.imageDataValue;
-
-         // Delete the object indirectly through an ossimRefPtr.
-         ossimRefPtr<ossimImageData> id = v2.d.imageDataValue;
-         id = NULL;
-         v2.d.imageDataValue = (ossimImageData*)NULL;
-         returnValue = true;
-      }
-      else
-      {
-         returnValue = false;
-      }
-   }
-   else
-   {
-      returnValue = false;
-   }
-   
-   return returnValue;
-}
-
-bool ossimEquationCombiner::applyOp(const ossimBinaryOp& op,
-                                    ossimImageData* v1,
-                                    double          v2)
-{   
-   double* buf = static_cast<double*>(v1->getBuf());
-   if(!buf) return true;
-   ossimDataObjectStatus status = v1->getDataObjectStatus();
-
-   if(status == OSSIM_EMPTY || status == OSSIM_NULL)
-   {
-      return true;
-   }
-
-   if(status == OSSIM_FULL )
-   {
-      ossim_uint32 size = v1->getSize();
-      double value = (static_cast<double>(v2));
-     
-      for(ossim_uint32 i = 0; i < size; ++i)
-      {
-         *buf = (double)op.apply(*buf, value);
-         ++buf;
-      }
-   }
-   else
-   {
-      ossim_uint32 sizePerBand = v1->getSizePerBand();
-      ossim_uint32 numberOfBands = v1->getNumberOfBands();
-
-      if(numberOfBands)
-      {
-         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
-         {
-            double* buf = static_cast<double*>(v1->getBuf(band));
-
-            if(buf)
-            {
-               double  np  = static_cast<double>(v1->getNullPix()[band]);
-               
-               for(ossim_uint32 offset = 0; offset < sizePerBand;++offset)
-               {
-                  if(*buf != np)
-                  {
-                     *buf = (double)op.apply(*buf, v2);
-                  }
-                  ++buf;
-               }
-            }
-         }
-      }
-   }
-   return true;
-}
-
-bool ossimEquationCombiner::applyOp(const ossimBinaryOp& op,
-                                    double          v1,
-                                    ossimImageData* v2)
-{   
-   double* buf = static_cast<double*>(v2->getBuf());
-   if(!buf) return true;
-   ossimDataObjectStatus status = v2->getDataObjectStatus();
-
-   if(status == OSSIM_EMPTY || status == OSSIM_NULL)
-   {
-      return true;
-   }
-
-   if(status == OSSIM_FULL )
-   {
-      ossim_uint32 size = v2->getSize();
-      double value = (static_cast<double>(v1));
-     
-      for(ossim_uint32 i = 0; i < size; ++i)
-      {
-         *buf = (double)op.apply(value, *buf);
-         ++buf;
-      }
-   }
-   else
-   {
-      ossim_uint32 sizePerBand = v2->getSizePerBand();
-      ossim_uint32 numberOfBands = v2->getNumberOfBands();
-
-      if(numberOfBands)
-      {
-         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
-         {
-            double* buf = static_cast<double*>(v2->getBuf(band));
-
-            if(buf)
-            {
-               double  np  = static_cast<double>(v2->getNullPix()[band]);
-               
-               for(ossim_uint32 offset = 0; offset < sizePerBand; ++offset)
-               {
-                  if(*buf != np)
-                  {
-                     *buf = (double)op.apply((double)v1, *buf);
-                  }
-                  ++buf;
-               }
-            }
-         }
-      }
-   }
-   
-   return true;
-}
-
-bool ossimEquationCombiner::applyOp(const ossimBinaryOp& op,
-                                    ossimImageData* v1,
-                                    ossimImageData* v2)
-{
-   ossim_uint32 minNumberOfBands = std::min(v1->getNumberOfBands(), v2->getNumberOfBands());
-   ossim_uint32 maxNumberOfBands = std::max(v1->getNumberOfBands(), v2->getNumberOfBands());
-   
-   ossim_uint32 size = v1->getWidth()*v1->getHeight();
-   ossimDataObjectStatus status1 = v1->getDataObjectStatus();
-   ossimDataObjectStatus status2 = v2->getDataObjectStatus();
-
-   double** bandV1   = new double*[maxNumberOfBands];
-   double** bandV2   = new double*[maxNumberOfBands];
-   double* bandV1Np  = new double[maxNumberOfBands];
-   double* bandV2Np  = new double[maxNumberOfBands];
-   ossim_uint32 band = 0;
-   for(band = 0; band < minNumberOfBands; ++band)
-   {
-      bandV1[band]   = (double*)v1->getBuf(band);
-      bandV2[band]   = (double*)v2->getBuf(band);
-      bandV1Np[band] = (double)v1->getNullPix(band);
-      bandV2Np[band] = (double)v2->getNullPix(band);
-   }
-   if(v1->getNumberOfBands() < v2->getNumberOfBands())
-   {
-      for(band = 0; band < maxNumberOfBands; ++band)
-      {
-         bandV1[band]   = (double*)v1->getBuf(minNumberOfBands-1);
-         bandV2[band]   = (double*)v2->getBuf(band);
-         bandV1Np[band] = (double)v1->getNullPix(minNumberOfBands-1);
-         bandV2Np[band] = (double)v2->getNullPix(band);
-      }
-   }
-   else if(v2->getNumberOfBands() < v1->getNumberOfBands())
-   {
-      for(band = 0; band < maxNumberOfBands; ++band)
-      {
-         bandV1[band]   = (double*)v1->getBuf(band);
-         bandV2[band]   = (double*)v2->getBuf(minNumberOfBands-1);
-         bandV1Np[band] = (double)v1->getNullPix(band);
-         bandV2Np[band] = (double)v2->getNullPix(minNumberOfBands-1);
-      }
-   }
-
-   if(status1 == OSSIM_EMPTY)
-   {
-      if(status2 == OSSIM_FULL)
-      {
-         for(band = 0; band < maxNumberOfBands; ++band)
-         {
-            double* buf1 = bandV1[band];
-            double* buf2 = bandV2[band];
-            
-            for(ossim_uint32 i = 0; i < size; ++i)
-            {
-               *buf1 = *buf2;
-               ++buf1;
-               ++buf2;
-            }
-         }
-      }
-      else if(status2 == OSSIM_PARTIAL)
-      {
-         for(band = 0; band < maxNumberOfBands; ++band)
-         {
-            double* buf1 = bandV1[band];
-            double* buf2 = bandV2[band];
-            double  nullPix2 = bandV2Np[band];
-            for(ossim_uint32 i = 0; i < size; ++i)
-            {
-               if(*buf2 != nullPix2)
-               {
-                  *buf1 = *buf2;
-               }
-               ++buf1;
-               ++buf2;
-            }
-         }
-      }
-      v1->setDataObjectStatus(status2);
-   }
-   else if((status1 == OSSIM_FULL)&&
-           (status2 == OSSIM_FULL))
-   { 
-      for(band = 0; band < maxNumberOfBands; ++band)
-      {
-         double* buf1 = bandV1[band];
-         double* buf2 = bandV2[band];
-         
-         for(ossim_uint32 i = 0; i < size; ++i)
-         {
-            *buf1 = op.apply(*buf1, *buf2);
-            ++buf1;
-            ++buf2;
-         }
-      }
-   }
-   else if((status1 == OSSIM_FULL)&&
-           (status2 == OSSIM_PARTIAL))
-   {
-      for(band = 0; band < maxNumberOfBands; ++band)
-      {
-         double* buf1 = bandV1[band];
-         double* buf2 = bandV2[band];
-         double  nullPix2 = bandV2Np[band];
-         for(ossim_uint32 i = 0; i < size; ++i)
-         {
-            if(*buf2 != nullPix2)
-            {
-               *buf1 = op.apply(*buf1, *buf2);
-            }
-               
-            ++buf1;
-            ++buf2;
-         }
-      }
-   }
-   else if((status1 == OSSIM_PARTIAL)&&
-           (status2 == OSSIM_FULL))
-   {
-      for(band = 0; band < maxNumberOfBands; ++band)
-      {
-         double* buf1 = bandV1[band];
-         double* buf2 = bandV2[band];
-         double  nullPix1 = bandV1Np[band];
-         for(ossim_uint32 i = 0; i < size; ++i)
-         {
-            if(*buf1 != nullPix1)
-            {
-               *buf1 = op.apply(*buf1, *buf2);
-            }
-               
-            ++buf1;
-            ++buf2;
-         }
-      }
-   }
-   else if((status1 == OSSIM_PARTIAL)&&
-           (status2 == OSSIM_PARTIAL))
-   {
-      for(band = 0; band < maxNumberOfBands; ++band)
-      {
-         double* buf1 = bandV1[band];
-         double* buf2 = bandV2[band];
-         double  nullPix1 = bandV1Np[band];
-         double  nullPix2 = bandV2Np[band];
-         for(ossim_uint32 i = 0; i < size; ++i)
-         {
-            if((*buf1 != nullPix1)&&
-               (*buf2 != nullPix2))
-            {
-               *buf1 = op.apply(*buf1, *buf2);
-            }
-               
-            ++buf1;
-            ++buf2;
-         }
-      }
-   }
-
-   delete [] bandV1;
-   delete [] bandV2;
-   delete [] bandV1Np;
-   delete [] bandV2Np;
-   
-   return true;
-}
-
-
-bool ossimEquationCombiner::applyOp(const ossimUnaryOp& op,
-                                    ossimEquValue& result,
-                                    ossimEquValue& v)
-{
-   bool returnValue = true;
-   
-   if(v.type == OSSIM_EQU_DOUBLE_TYPE)
-   {
-      result.type = OSSIM_EQU_DOUBLE_TYPE;
-      result.d.doubleValue = op.apply(v.d.doubleValue);
-   }
-   else if(v.type == OSSIM_EQU_IMAGE_DATA_TYPE)
-   {
-      returnValue = applyOp(op,
-                            v.d.imageDataValue);
-      result.type = OSSIM_EQU_IMAGE_DATA_TYPE;
-      result.d.imageDataValue = v.d.imageDataValue;
-      returnValue = true;
-   }
-   else
-   {
-      returnValue = false;
-   }
-   
-   return returnValue;
-}
-
-bool ossimEquationCombiner::applyOp(const ossimUnaryOp& op,
-                                    ossimImageData* v)
-{   
-   double* buf = static_cast<double*>(v->getBuf());
-   if(!buf) return true;
-   ossimDataObjectStatus status = v->getDataObjectStatus();
-
-   if(status == OSSIM_EMPTY || status == OSSIM_NULL)
-   {
-      return true;
-   }
-
-   if(status == OSSIM_FULL )
-   {
-      ossim_uint32 size = v->getSize();
-     
-      for(ossim_uint32 i = 0; i < size; ++i)
-      {
-         *buf = (double)op.apply(*buf);
-         ++buf;
-      }
-   }
-   else
-   {
-      ossim_uint32 sizePerBand   = v->getSizePerBand();
-      ossim_uint32 numberOfBands = v->getNumberOfBands();
-
-      if(numberOfBands)
-      {
-         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
-         {
-            double* buf = static_cast<double*>(v->getBuf(band));
-
-            if(buf)
-            {
-               double  np  = static_cast<double>(v->getNullPix()[band]);
-               
-               for(ossim_uint32 offset = 0; offset < sizePerBand;++offset)
-               {
-                  if(*buf != np)
-                  {
-                     *buf = (double)op.apply(*buf);
-                  }
-                  ++buf;
-               }
-            }
-         }
-      }
-   }
-   
-   return true;
-}
-
-bool ossimEquationCombiner::saveState(ossimKeywordlist& kwl,
-                                      const char* prefix)const
-{
-   ossimString outputScalarType =
-      ossimScalarTypeLut::instance()->getEntryString(theOutputScalarType);
-   
-   kwl.add(prefix,
-           EQUATION_KW,
-           theEquation.c_str(),
-           true);
-
-   kwl.add(prefix,
-           "output_scalar_type",
-           outputScalarType.c_str(),
-           true);
-   
-   return ossimImageCombiner::saveState(kwl,
-                                        prefix);
-}
-
-bool ossimEquationCombiner::loadState(const ossimKeywordlist& kwl,
-                                      const char* prefix)
-{
-   const char* equ    = kwl.find(prefix, EQUATION_KW);
-   const char* scalar = kwl.find(prefix, "output_scalar_type");
-   
-   bool result = ossimImageCombiner::loadState(kwl,
-                                               prefix);
-   
-   if(equ)
-   {
-      theEquation = equ;
-   }
-
-   if(scalar)
-   {      
-      setOutputScalarType(ossimScalarTypeLut::instance()->
-                          getScalarTypeFromString(scalar));
-   }
-
-   return result;
-}
-
diff --git a/src/ossim/imaging/ossimFeatherMosaic.cpp b/src/ossim/imaging/ossimFeatherMosaic.cpp
deleted file mode 100644
index f48f0f3..0000000
--- a/src/ossim/imaging/ossimFeatherMosaic.cpp
+++ /dev/null
@@ -1,475 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimFeatherMosaic.cpp 15766 2009-10-20 12:37:09Z gpotts $
-
-#include <ossim/imaging/ossimFeatherMosaic.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimLine.h>
-#include <ossim/base/ossimTrace.h>
-
-static ossimTrace traceDebug("ossimFeatherMosaic:debug");
-
-RTTI_DEF1(ossimFeatherMosaic, "ossimFeatherMosaic", ossimImageMosaic);
-
-ossimFeatherMosaic::ossimFeatherMosaic()
-   :ossimImageMosaic(),
-    theInputFeatherInformation(NULL),
-    theAlphaSum(NULL),
-    theResult(NULL),
-    theFeatherInfoSize(0)
-{
-}
-
-ossimFeatherMosaic::ossimFeatherMosaic(ossimConnectableObject::ConnectableObjectList& inputSources)
-   :ossimImageMosaic(inputSources),
-    theInputFeatherInformation(NULL),
-    theAlphaSum(NULL),
-    theResult(NULL),
-    theFeatherInfoSize(0)
-{
-   initialize();
-}
-
-ossimFeatherMosaic::~ossimFeatherMosaic()
-{
-   if(theInputFeatherInformation)
-   {
-      delete [] theInputFeatherInformation;
-      theInputFeatherInformation = NULL;
-   }
-   theFeatherInfoSize = 0;
-}
-
-ossimRefPtr<ossimImageData> ossimFeatherMosaic::getTile(const ossimIrect& tileRect,
-                                            ossim_uint32 resLevel)
-{
-   long w = tileRect.width();
-   long h = tileRect.height();
-   ossimIpt origin = tileRect.ul();
-   
-   if(!isSourceEnabled())
-   {
-      return ossimImageMosaic::getTile(tileRect, resLevel);
-   }
-   if(!theTile||!theAlphaSum||!theResult||!theInputFeatherInformation)
-   {
-      initialize();
-
-      if(!theTile||!theAlphaSum||!theResult||!theInputFeatherInformation)
-      {
-         return ossimImageMosaic::getTile(tileRect, resLevel);
-      }
-   }
-   ossim_uint32 size = getNumberOfInputs();
-   theAlphaSum->setImageRectangle(tileRect);
-   theResult->setImageRectangle(tileRect);
-   
-   if(size == 0)
-   {
-      return ossimRefPtr<ossimImageData>();
-   }
-
-   if(size == 1)
-   {
-      return ossimImageMosaic::getTile(tileRect, resLevel);
-   }
-
-   long tileW = theTile->getWidth();
-   long tileH = theTile->getHeight();
-   if((w != tileW)||
-      (h != tileH))
-   {
-      theTile->setWidth(w);
-      theTile->setHeight(h);
-      if((w*h)!=(tileW*tileH))
-      {
-         theTile->initialize();
-      }
-   }
-   theTile->setOrigin(origin);
-   theTile->makeBlank();
-      
-   switch(theTile->getScalarType())
-   {
-      case OSSIM_UCHAR:
-      {
-         return combine(static_cast<ossim_uint8>(0),
-                        tileRect, resLevel);
-      }
-      case OSSIM_USHORT16:
-      case OSSIM_USHORT11:
-      {
-         return combine(static_cast<ossim_uint16>(0),
-                        tileRect, resLevel);
-      }
-      case OSSIM_SSHORT16:
-      {
-         return combine(static_cast<ossim_sint16>(0),
-                        tileRect, resLevel);
-      }
-      case OSSIM_DOUBLE:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         return combine(static_cast<double>(0),
-                        tileRect, resLevel);
-      }
-      case OSSIM_FLOAT:
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         return combine(static_cast<float>(0),
-                        tileRect, resLevel);
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimFeatherMosaic::getTile: error, unknown scalar type!!!"
-            << std::endl;
-      }
-   }
-   return ossimRefPtr<ossimImageData>();
-}
-
-
-template <class T> ossimRefPtr<ossimImageData> ossimFeatherMosaic::combine(
-   T,
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   ossimRefPtr<ossimImageData> currentImageData;
-   ossim_uint32 band;
-   long upperBound = theTile->getWidth()*theTile->getHeight();
-   long offset = 0;
-   long row    = 0;
-   long col    = 0;
-   long numberOfTilesProcessed = 0;
-   float *sumBand       = static_cast<float*>(theAlphaSum->getBuf());
-   float         *bandRes = NULL;
-   ossimIpt point;
-   
-   theAlphaSum->fill(0.0);
-   theResult->fill(0.0);
-   
-   T** srcBands  = new T*[theLargestNumberOfInputBands];
-   T** destBands = new T*[theLargestNumberOfInputBands];
-   ossim_uint32 layerIdx = 0;
-   currentImageData  = getNextTile(layerIdx,
-                                   0,
-                                   tileRect,
-                                   resLevel);
-   if(!currentImageData.valid())
-   {
-      delete [] srcBands;
-      delete [] destBands;
-      return currentImageData;
-   }
-   ossim_uint32 minNumberOfBands = currentImageData->getNumberOfBands();
-   for(band = 0; band < minNumberOfBands; ++band)
-   {
-      srcBands[band]  = static_cast<T*>(currentImageData->getBuf(band));
-      destBands[band] = static_cast<T*>(theTile->getBuf(band));
-   }
-   // if the src is smaller than the destination in number
-   // of bands we will just duplicate the last band.
-   for(;band < theLargestNumberOfInputBands; ++band)
-   {
-      srcBands[band]  = srcBands[minNumberOfBands - 1];
-      destBands[band] = static_cast<T*>(theTile->getBuf(band));
-   }
-
-   // most of the time we will not overlap so let's
-   // copy the first tile into destination and check later.
-   //
-   for(band = 0; band < theTile->getNumberOfBands();++band)
-   {
-      T* destBand = destBands[band];
-      T* srcBand  = srcBands[band];
-      if(destBand&&srcBand)
-      {
-         for(offset = 0; offset < upperBound;++offset)
-         {
-            *destBand = *srcBand;
-            ++srcBand; ++destBand;
-         }
-      }
-   }
-   theTile->setDataObjectStatus(currentImageData->getDataObjectStatus());
-
-   while(currentImageData.valid())
-   {
-      ossimDataObjectStatus currentStatus     = currentImageData->getDataObjectStatus();
-      point = currentImageData->getOrigin();
-      long h = (long)currentImageData->getHeight();
-      long w = (long)currentImageData->getWidth();
-      if( (currentStatus != OSSIM_EMPTY) &&
-          (currentStatus != OSSIM_NULL))
-      {
-         ++numberOfTilesProcessed;
-         offset = 0;
-         minNumberOfBands = currentImageData->getNumberOfBands();
-         for(band = 0; band < minNumberOfBands; ++band)
-         {
-            srcBands[band]  = static_cast<T*>(currentImageData->getBuf(band));
-         }
-         // if the src is smaller than the destination in number
-         // of bands we will just duplicate the last band.
-         for(;band < theLargestNumberOfInputBands; ++band)
-         {
-            srcBands[band]  = srcBands[minNumberOfBands - 1];
-         }
-          if(currentStatus == OSSIM_PARTIAL)
-          {
-            for(row = 0; row < h; ++row)
-            {
-               for(col = 0; col < w; ++col)
-               {
-                  if(!currentImageData->isNull(offset))
-                  {
-                     double weight = computeWeight(layerIdx,
-                                                   ossimDpt(point.x+col,
-                                                            point.y+row));
-                     
-                     for(band = 0; band < theLargestNumberOfInputBands; ++band)
-                     {
-                        bandRes = static_cast<float*>(theResult->getBuf(band));
-                        bandRes[offset] += (srcBands[band][offset]*weight);
-                     }
-                     sumBand[offset] += weight;
-                  }
-                  ++offset;
-               }
-            }
-         }
-         else
-         {
-            offset = 0;
-            
-            for(row = 0; row < h; ++row)
-            {
-               for(col = 0; col < w; ++col)
-               {
-                     double weight = computeWeight(layerIdx,
-                                                   ossimDpt(point.x+col,
-                                                            point.y+row));
-                     
-                     for(band = 0; band < theLargestNumberOfInputBands; ++band)
-                     {
-                        bandRes     = static_cast<float*>(theResult->getBuf(band));
-                        
-                        bandRes[offset] += (srcBands[band][offset]*weight);
-                     }
-                     sumBand[offset] += weight;
-                     ++offset;
-               }
-            }
-         }
-      }
-      currentImageData = getNextTile(layerIdx, tileRect, resLevel);
-   }
-   upperBound = theTile->getWidth()*theTile->getHeight();
-
-   if(numberOfTilesProcessed > 1)
-   {
-      const double* minPix = theTile->getMinPix();
-      const double* maxPix = theTile->getMaxPix();
-      const double* nullPix= theTile->getNullPix();
-      for(offset = 0; offset < upperBound;++offset)
-      {
-         for(band = 0; band < theTile->getNumberOfBands();++band)
-         {
-            T* destBand      = static_cast<T*>(theTile->getBuf(band));
-            float* weightedBand = static_cast<float*>(theResult->getBuf(band));
-
-            // this should be ok to test 0.0 instead of
-            // FLT_EPSILON range for 0 since we set it.
-            if(sumBand[offset] != 0.0)
-            {            
-               weightedBand[offset] = (weightedBand[offset])/sumBand[offset];
-               if(weightedBand[offset]<minPix[band])
-               {
-                  weightedBand[offset] = minPix[band];   
-               }
-               else if(weightedBand[offset] > maxPix[band])
-               {
-                  weightedBand[offset] = maxPix[band];                   
-               }
-            }
-            else
-            {
-               weightedBand[offset] = nullPix[band];
-            }
-            destBand[offset] = static_cast<T>(weightedBand[offset]);
-         }
-      }
-      theTile->validate();
-   }
-
-   delete [] srcBands;
-   delete [] destBands;
-
-   return theTile;
-}
-
-double ossimFeatherMosaic::computeWeight(long index,
-                                         const ossimDpt& point)const
-{
-   ossimFeatherInputInformation& info = theInputFeatherInformation[index];
-   double result = 0.0;
-   ossimDpt delta = point-info.theCenter;
-   
-   double length1 = fabs(delta.x*info.theAxis1.x + delta.y*info.theAxis1.y)/info.theAxis1Length;
-   double length2 = fabs(delta.x*info.theAxis2.x + delta.y*info.theAxis2.y)/info.theAxis2Length;
-
-   if(length1 > length2)
-   {
-      result = (1.0 - length1);
-   }
-   else
-   {
-      result = (1.0 - length2);
-   }
-   if(result < 0) result = 0;
-   
-   return result;
-}
-
-void ossimFeatherMosaic::initialize()
-{
-   ossimImageMosaic::initialize();
-
-   allocate();
-   if(theTile.valid())
-   {
-      theAlphaSum = new ossimImageData(this,
-                                       OSSIM_FLOAT,
-                                       1,
-                                       theTile->getWidth(),
-                                       theTile->getHeight());
-      theResult = new ossimImageData(this,
-                                     OSSIM_FLOAT,
-                                     theLargestNumberOfInputBands,
-                                     theTile->getWidth(),
-                                     theTile->getHeight());
-      theAlphaSum->initialize();
-      theResult->initialize();
-   }
-   std::vector<ossimIpt> validVertices;
-   if(!getNumberOfInputs()) return;
-
-   if(theInputFeatherInformation)
-   {
-      delete [] theInputFeatherInformation;
-      theInputFeatherInformation = NULL;
-   }
-   theFeatherInfoSize = getNumberOfInputs();
-   theInputFeatherInformation = new ossimFeatherInputInformation[theFeatherInfoSize];
-   for(long index = 0; index < theFeatherInfoSize; ++ index)
-   {
-      validVertices.clear();
-      ossimImageSource* temp = PTR_CAST(ossimImageSource, getInput(index));
-      if(temp)
-      {
-         temp->getValidImageVertices(validVertices, OSSIM_CLOCKWISE_ORDER);
-         theInputFeatherInformation[index].setVertexList(validVertices);
-      }
-   }
-}
-
-
-ossimFeatherMosaic::ossimFeatherInputInformation::ossimFeatherInputInformation(const std::vector<ossimIpt>& validVertices)
-{
-   setVertexList(validVertices);
-}
-
-
-void ossimFeatherMosaic::ossimFeatherInputInformation::setVertexList(const std::vector<ossimIpt>& validVertices)
-{
-   const char* MODULE = "ossimFeatherMosaic::ossimFeatherInputInformation::setVertexList()";
-   
-   theValidVertices = validVertices;
-
-   theCenter       = ossimDpt(0,0);
-   theAxis1        = ossimDpt(1, 0);
-   theAxis2        = ossimDpt(0, 1);
-   theAxis1Length  = 1;
-   theAxis2Length  = 1;
-
-   double xSum=0.0, ySum=0.0;
-   ossim_uint32 upperBound = (ossim_uint32)validVertices.size();
-   if(upperBound)
-   {
-      for(ossim_uint32 index = 0; index < upperBound; ++index)
-      {
-         xSum += validVertices[index].x;
-         ySum += validVertices[index].y;
-      }
-
-      theCenter.x = xSum/upperBound;
-      theCenter.y = ySum/upperBound;
-
-      // for now we just want a quick implementation of something
-      // and we know that we have 4 vertices for the bounding valid
-      // vertices.
-      //
-      if(upperBound == 4)
-      {
-         ossimDpt edgeDirection1 = validVertices[1] - validVertices[0];
-         ossimDpt edgeDirection2 = validVertices[2] - validVertices[1];
-
-         theAxis1 = ossimDpt(-edgeDirection1.y, edgeDirection1.x);
-         
-         theAxis2 = ossimDpt(-edgeDirection2.y, edgeDirection2.x);
-
-         theAxis1 = theAxis1/theAxis1.length();
-         theAxis2 = theAxis2/theAxis2.length();
-
-         ossimLine line1(theCenter,
-                         theCenter + theAxis1*2);
-         ossimLine line2(validVertices[1],
-                         validVertices[0]);
-         ossimLine line3(theCenter,
-                         theCenter + theAxis2*2);
-         ossimLine line4(validVertices[2],
-                         validVertices[1]);
-         
-         ossimDpt intersectionPoint1 = line1.intersectInfinite(line2);
-         ossimDpt intersectionPoint2 = line3.intersectInfinite(line4);
-
-         
-         theAxis1Length = ossim::round<int>((theCenter-intersectionPoint1).length());
-         theAxis2Length = ossim::round<int>((theCenter-intersectionPoint2).length());
-
-          if(traceDebug())
-          {
-             CLOG << "theAxis1Length:       " << theAxis1Length << endl
-                  << "theAxis2Length:       " << theAxis2Length << endl
-                  << "center:               " << theCenter      << endl;
-          }
-      }
-   }
-}
-
-ostream& operator<<(ostream& out,
-                    const ossimFeatherMosaic::ossimFeatherInputInformation& data)
-{
-   out << "center: " << data.theCenter << endl
-       << "axis1:  " << data.theAxis1  << endl
-       << "axis2:  " << data.theAxis2  << endl
-       << "axis1_length: " << data.theAxis1Length << endl
-       << "axis2_length: " << data.theAxis2Length << endl
-       << "valid vertices: " << endl;
-   std::copy(data.theValidVertices.begin(),
-             data.theValidVertices.end(),
-             std::ostream_iterator<ossimDpt>(out, "\n"));
-   return out;
-}
diff --git a/src/ossim/imaging/ossimFftFilter.cpp b/src/ossim/imaging/ossimFftFilter.cpp
deleted file mode 100644
index 8d61123..0000000
--- a/src/ossim/imaging/ossimFftFilter.cpp
+++ /dev/null
@@ -1,472 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimFftFilter.cpp 17206 2010-04-25 23:20:40Z dburken $
-
-#include <ossim/imaging/ossimFftFilter.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/matrix/newmat.h>
-#include <ossim/matrix/newmatap.h>
-#include <ossim/imaging/ossimScalarRemapper.h>
-#include <ossim/base/ossimStringProperty.h>
-
-RTTI_DEF1(ossimFftFilter, "ossimFftFilter", ossimImageSourceFilter);
-
-ossimFftFilter::ossimFftFilter(ossimObject* owner)
-   :ossimImageSourceFilter(owner),
-    theTile(0),
-    theDirectionType(ossimFftFilterDirectionType_FORWARD),
-    theScalarRemapper(new ossimScalarRemapper())
-{
-   theScalarRemapper->setOutputScalarType(OSSIM_DOUBLE);
-}
-
-ossimFftFilter::ossimFftFilter(ossimImageSource* inputSource)
-   :ossimImageSourceFilter(inputSource),
-    theTile(0),
-    theDirectionType(ossimFftFilterDirectionType_FORWARD),
-    theScalarRemapper(new ossimScalarRemapper())
-{
-   theScalarRemapper->setOutputScalarType(OSSIM_DOUBLE);
-}
-
-ossimFftFilter::ossimFftFilter(ossimObject* owner,
-                               ossimImageSource* inputSource)
-   :ossimImageSourceFilter(owner, inputSource),
-    theTile(0),
-    theDirectionType(ossimFftFilterDirectionType_FORWARD),
-    theScalarRemapper(new ossimScalarRemapper())
-{
-   theScalarRemapper->setOutputScalarType(OSSIM_DOUBLE);
-}
-
-ossimFftFilter::~ossimFftFilter()
-{
-   if(theScalarRemapper.valid())
-   {
-      theScalarRemapper->disconnect();
-      theScalarRemapper = 0;
-   }
-}
-
-ossimRefPtr<ossimImageData> ossimFftFilter::getTile(const ossimIrect& rect,
-                                                    ossim_uint32 resLevel)
-{
-   if(!isSourceEnabled())
-   {
-      return ossimImageSourceFilter::getTile(rect, resLevel);
-   }
-   
-   ossimIrect tempRequest = rect;
-
-   ossim_uint32 w = rect.width();
-   ossim_uint32 h = rect.height();
-   
-   if(w & 1)
-   {
-      ++w;
-   }
-   if(h&1)
-   {
-      ++h;
-   }
-
-   tempRequest = ossimIrect(rect.ul().x,
-                            rect.ul().y,
-                            rect.ul().x + (w-1),
-                            rect.ul().y + (h-1));
-   
-   ossimRefPtr<ossimImageData> input;
-   input  = theScalarRemapper->getTile(tempRequest, resLevel);
-
-   if(!input.valid()) return input;
-   
-   if(!theTile.valid()) initialize();
-   if(!theTile.valid()) return theTile;
-   
-   theTile->setImageRectangle(rect);
-   ossimRefPtr<ossimImageData> tempTile = theTile;
-   
-   if(!input->getBuf())
-   {
-      return theTile;
-   }
-
-   if(rect != tempRequest)
-   {
-      tempTile = (ossimImageData*)theTile->dup();
-      tempTile->setImageRectangle(tempRequest);
-   }
-
-   runFft((ossim_float64)0, input, tempTile);
-          
-   if(tempTile != theTile)
-   {
-      theTile->loadTile(tempTile.get());
-   }
-   
-   theTile->validate();
-
-   return theTile;
-}
-
-void ossimFftFilter::initialize()
-{
-   ossimImageSourceFilter::initialize();
-
-   theTile = ossimImageDataFactory::instance()->create(this, this);
-   
-   if(theTile.valid())
-   {
-      theTile->initialize();
-   }
-   if(theDirectionType == ossimFftFilterDirectionType_FORWARD)
-   {
-      theScalarRemapper->setOutputScalarType(OSSIM_NORMALIZED_DOUBLE);
-   }
-   else
-   {
-      theScalarRemapper->setOutputScalarType(OSSIM_DOUBLE);
-   }
-   theScalarRemapper->connectMyInputTo(0, getInput());
-}
-
-ossimScalarType ossimFftFilter::getOutputScalarType() const
-{
-   if(!isSourceEnabled())
-   {
-      return ossimImageSourceFilter::getOutputScalarType();
-   }
-   
-   if(theDirectionType == ossimFftFilterDirectionType_FORWARD)
-   {
-      return OSSIM_DOUBLE;
-   }
-   
-   return OSSIM_NORMALIZED_DOUBLE;
-}
-
-double ossimFftFilter::getNullPixelValue(ossim_uint32 band)const
-{
-   if(!isSourceEnabled())
-   {
-      return ossimImageSourceFilter::getNullPixelValue(band);
-   }
-   if(theDirectionType == ossimFftFilterDirectionType_FORWARD)
-   {
-      return ossim::nan();
-   }
-
-   // it will invert to a normalized float output
-   return 0.0;
-}
-
-double ossimFftFilter::getMinPixelValue(ossim_uint32 band)const
-{
-   if(!isSourceEnabled())
-   {
-      return ossimImageSourceFilter::getMinPixelValue(band);
-   }
-   if(theDirectionType == ossimFftFilterDirectionType_FORWARD)
-   {
-      return OSSIM_DEFAULT_MIN_PIX_DOUBLE;
-   }
-   return OSSIM_DEFAULT_MIN_PIX_NORM_DOUBLE;
-}
-
-double ossimFftFilter::getMaxPixelValue(ossim_uint32 band)const
-{
-   if(!isSourceEnabled())
-   {
-      return ossimImageSourceFilter::getMaxPixelValue(band);
-   }
-   if(theDirectionType == ossimFftFilterDirectionType_FORWARD)
-   {
-      return OSSIM_DEFAULT_MAX_PIX_DOUBLE;
-   }
-   return OSSIM_DEFAULT_MAX_PIX_NORM_DOUBLE;
-}
-
-ossim_uint32 ossimFftFilter::getNumberOfOutputBands() const
-{
-   if(!isSourceEnabled())
-   {
-      return ossimImageSourceFilter::getNumberOfOutputBands();
-   }
-   ossim_uint32 bands = ossimImageSourceFilter::getNumberOfOutputBands();
-   
-   if(theDirectionType == ossimFftFilterDirectionType_FORWARD)
-   {
-      bands *=2;
-   }
-   else 
-   {
-      bands /=2;
-   }
-
-   return bands;
-}
-
-void ossimFftFilter::setForward()
-{
-   theDirectionType = ossimFftFilterDirectionType_FORWARD;
-}
-
-void ossimFftFilter::setInverse()
-{
-   theDirectionType = ossimFftFilterDirectionType_INVERSE;
-}
-
-ossimString ossimFftFilter::getDirectionTypeAsString()const
-{
-   if(theDirectionType == ossimFftFilterDirectionType_FORWARD)
-   {
-      return "Forward";
-   }
-
-   return "Inverse";
-}
-
-void ossimFftFilter::setDirectionType(const ossimString& directionType)
-{
-   ossimString tempDirectionType = directionType;
-   tempDirectionType = tempDirectionType.downcase();
-   
-   if(tempDirectionType.contains("forward"))
-   {
-      setDirectionType(ossimFftFilterDirectionType_FORWARD);
-   }
-   else
-   {
-      setDirectionType(ossimFftFilterDirectionType_INVERSE);
-   }
-}
-
-void ossimFftFilter::setDirectionType(ossimFftFilterDirectionType directionType)
-{
-   theDirectionType = directionType;
-   if(theTile.valid())
-   {
-      theTile = NULL;
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimFftFilter::getProperty(const ossimString& name)const
-{
-   if(name == "FFT Direction")
-   {
-      std::vector<ossimString> filterNames;
-      filterNames.push_back("Forward");
-      filterNames.push_back("Inverse");
-      ossimStringProperty* stringProp = new ossimStringProperty("FFT Direction",
-								getDirectionTypeAsString(),
-								false,
-								filterNames);
-      stringProp->setCacheRefreshBit();
-
-      return stringProp;
-   }
-
-   return ossimImageSourceFilter::getProperty(name);
-}
-
-void ossimFftFilter::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property) return;
-   
-   if(property->getName() == "FFT Direction")
-   {
-      if(theTile.valid())
-      {
-         theTile = NULL;
-      }
-      setDirectionType(property->valueToString());
-   }
-   else
-   {
-      ossimImageSourceFilter::setProperty(property);
-   }
-}
-
-void ossimFftFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageSourceFilter::getPropertyNames(propertyNames);
-   propertyNames.push_back("FFT Direction");
-}
-
-
-template <class T>
-void ossimFftFilter::runFft(T /* dummy */,
-                            ossimRefPtr<ossimImageData>& input,
-                            ossimRefPtr<ossimImageData>& output)
-{
-   // T*             inputBand  = 0;
-
-   NEWMAT::Matrix* realIn = new NEWMAT::Matrix(input->getHeight(),
-                                               input->getWidth());
-   NEWMAT::Matrix* imgIn = new NEWMAT::Matrix(input->getHeight(),
-                                              input->getWidth());
-   NEWMAT::Matrix* realOut = new NEWMAT::Matrix(input->getHeight(),
-                                                input->getWidth());
-   NEWMAT::Matrix* imgOut = new NEWMAT::Matrix(input->getHeight(),
-                                               input->getWidth());
-   ossim_uint32 bandIdx = 0;
-   ossim_uint32 w = input->getWidth();
-   ossim_uint32 h = input->getHeight();
-   ossim_uint32 x = 0;
-   ossim_uint32 y = 0;
-   if(theDirectionType == ossimFftFilterDirectionType_FORWARD)
-   {
-      ossim_uint32 bands = input->getNumberOfBands();
-      for(bandIdx = 0; bandIdx < bands; ++bandIdx)
-      {
-         ossim_float64* bandReal = 0;
-         ossim_float64* bandImg  = 0;
-         fillMatrixForward((T*)input->getBuf(bandIdx),
-                           (T)input->getNullPix(bandIdx),
-                           *realIn,
-                           *imgIn);
-         NEWMAT::FFT2(*realIn, *imgIn, *realOut, *imgOut);
-         bandReal = (ossim_float64*)output->getBuf(2*bandIdx);
-         bandImg  = (ossim_float64*)output->getBuf(2*bandIdx + 1);
-         if(bandReal&&bandImg)
-         {
-            for(y = 0; y < h; ++y)
-            {
-               for(x = 0; x < w; ++x)
-               {
-                  *bandReal = (ossim_float64)((*realOut)[y][x]);
-                  *bandImg  = (ossim_float64)((*imgOut)[y][x]);
-                  ++bandReal;
-                  ++bandImg;
-               }
-            }
-         }
-      }
-   }
-   else
-   {
-      ossim_float64* bandReal = 0;
-      ossim_uint32 bands = input->getNumberOfBands();
-      for(bandIdx = 0; bandIdx < bands; bandIdx+=2)
-      {
-         bandReal = (ossim_float64*)output->getBuf(bandIdx/2);
-         if(input->getBuf(bandIdx)&&
-            input->getBuf(bandIdx+1))
-         {
-            fillMatrixInverse((T*)input->getBuf(bandIdx),
-                              (T*)input->getBuf(bandIdx+1),
-                              *realIn,
-                              *imgIn);
-            NEWMAT::FFT2I(*realIn, *imgIn, *realOut, *imgOut);
-            for(y = 0; y < h; ++y)
-            {
-               for(x = 0; x < w; ++x)
-               {
-                  *bandReal = (ossim_float64)((*realOut)[y][x]);
-                  if(*bandReal > 1.0)
-                  {
-                     *bandReal = 1.0;
-               }
-                  if(*bandReal < 0.0)
-                  {
-                     *bandReal = 0.0;
-                  }
-                  ++bandReal;
-               }
-            }
-         }
-      }
-   }
-   
-   delete realIn;
-   delete imgIn;
-   delete realOut;
-   delete imgOut;
-}
-
-template <class T>
-void ossimFftFilter::fillMatrixForward(T *realPart,
-                                       T nullPix,
-                                       NEWMAT::Matrix& real,
-                                       NEWMAT::Matrix& img)const
-{
-   ossim_uint32 w = real.Ncols();
-   ossim_uint32 h = real.Nrows();
-   ossim_uint32 yIdx = 0;
-   ossim_uint32 xIdx = 0;
-   
-   for(yIdx = 0; yIdx < h; ++yIdx)
-   {
-      for(xIdx = 0; xIdx < w; ++xIdx)
-      {
-         if((double)(*realPart) != nullPix)
-         {
-            real[yIdx][xIdx] = (double)(*realPart);
-         }
-         else
-         {
-            real[yIdx][xIdx] = 0.0;
-         }
-         
-         img[yIdx][xIdx]  = 0.0;
-         
-         ++realPart;
-      }
-   }
-}
-
-template <class T>
-void ossimFftFilter::fillMatrixInverse(T *realPart,
-                                       T *imgPart,
-                                       NEWMAT::Matrix& real,
-                                       NEWMAT::Matrix& img)const
-{
-   ossim_uint32 w = real.Ncols();
-   ossim_uint32 h = real.Nrows();
-   ossim_uint32 yIdx = 0;
-   ossim_uint32 xIdx = 0;
-   
-   for(yIdx = 0; yIdx < h; ++yIdx)
-   {
-      for(xIdx = 0; xIdx < w; ++xIdx)
-      {
-         real[yIdx][xIdx] = (double)(*realPart);
-         img[yIdx][xIdx]  = (double)(*imgPart);
-         
-         ++realPart;
-         ++imgPart;
-      }
-   }
-}
-
-
-bool ossimFftFilter::loadState(const ossimKeywordlist& kwl,
-                               const char* prefix)
-{
-   const char* direction = kwl.find(prefix, "fft_direction");
-   if(direction)
-   {
-      setDirectionType(ossimString(direction));
-   }
-   
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
-
-bool ossimFftFilter::saveState(ossimKeywordlist& kwl,
-                               const char* prefix)const
-{
-   kwl.add(prefix,
-           "fft_direction",
-           getDirectionTypeAsString(),
-           true);
-   
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
diff --git a/src/ossim/imaging/ossimFgdcFileWriter.cpp b/src/ossim/imaging/ossimFgdcFileWriter.cpp
deleted file mode 100644
index db68c03..0000000
--- a/src/ossim/imaging/ossimFgdcFileWriter.cpp
+++ /dev/null
@@ -1,955 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (c) 2005, David Burken, all rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Class to write out meta data in a Federal Geographic Data
-// Committe (FGDC) format.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimFgdcFileWriter.cpp 21631 2012-09-06 18:10:55Z dburken $
-
-
-#include <ossim/imaging/ossimFgdcFileWriter.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimXmlNode.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimMapProjectionInfo.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <fstream>
-using namespace std;
-
-RTTI_DEF1(ossimFgdcFileWriter, "ossimFgdcFileWriter", ossimMetadataFileWriter)
-
-static ossimTrace traceDebug("ossimFgdcFileWriter:debug");
-
-   
-ossimFgdcFileWriter::ossimFgdcFileWriter()
-   :
-   theIndentionLevel(0),
-   theTabString("\t"),
-   theTemplate(),
-   theSourceImageFilename()
-{
-}
-
-ossimFgdcFileWriter::~ossimFgdcFileWriter()
-{
-}
-
-bool ossimFgdcFileWriter::writeFile()
-{
-   if(theFilename == ossimFilename::NIL)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimFgdcFileWriter::writeFile no filename set!" << endl;
-      return false;
-   }
-   
-   if( !theInputConnection )
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimFgdcFileWriter::writeFile no input connection!" << endl;
-      return false;
-   }
-
-   ofstream os(theFilename.c_str());
-   if (!os)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimFgdcFileWriter::writeFile no input connection!" << endl;
-      return false;
-   }
-
-   // Get the geometry from the input.
-   ossimMapProjection* mapProj = 0;
-   ossimRefPtr<ossimImageGeometry> inputGeom = theInputConnection->getImageGeometry();
-   if ( inputGeom.valid() ) mapProj = PTR_CAST(ossimMapProjection, inputGeom->getProjection());
-   if (!mapProj)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimFgdcFileWriter::writeFile Not map projected."
-         << endl;
-      return false;
-   }
-
-   ossimMapProjectionInfo mpi(mapProj, theInputConnection->getBoundingRect());
-
-   os << "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n"
-      << "<?xml-stylesheet type=\"text/xsl\" href=\"/common/fgdc_classic.xsl\" ?>\n";
-   openTag(os, ossimString("metadata"),  true);
-   openTag(os, ossimString("idinfo"),    true);
-   openTag(os, ossimString("citation"),  true);
-   openTag(os, ossimString("citeinfo"),  true);
-   
-   openTag(os, ossimString("origin"),    false);
-   os << find(ossimString("/metadata/idinfo/citation/citeinfo/origin"));
-   closeTag(os, ossimString("origin"),   false);
-   
-   openTag(os, ossimString("pubdate"),    false);
-   os << find(ossimString("/metadata/idinfo/citation/citeinfo/pubdate"));
-   closeTag(os, ossimString("pubdate"),   false);
-
-   openTag(os, ossimString("title"),    false);
-   // os << find(ossimString("/metadata/idinfo/citation/citeinfo/title"));
-   os << theSourceImageFilename.c_str();
-   closeTag(os, ossimString("title"),   false);
-
-   openTag(os, ossimString("edition"),    false);
-   os << find(ossimString("/metadata/idinfo/citation/citeinfo/edition"));
-   closeTag(os, ossimString("edition"),   false);
-
-   openTag(os, ossimString("geoform"),    false);
-   os << find(ossimString("/metadata/idinfo/citation/citeinfo/geoform"));
-   closeTag(os, ossimString("geoform"),   false);
-
-   openTag(os, ossimString("serinfo"),  true);
-   openTag(os, ossimString("sername"),    false);
-   os << find(ossimString("/metadata/idinfo/citation/citeinfo/serinfo/sername"));
-   closeTag(os, ossimString("sername"),   false);
-
-   openTag(os, ossimString("issue"),    false);
-   os << theSourceImageFilename.c_str();
-   closeTag(os, ossimString("issue"),   false);
-
-   closeTag(os, ossimString("serinfo"),  true);
-
-   openTag(os, ossimString("pubinfo"),  true);
-
-   openTag(os, ossimString("pubplace"),    false);
-   os << find(ossimString("/metadata/idinfo/citation/citeinfo/pubinfo/pubplace"));
-   closeTag(os, ossimString("pubplace"),   false);
-
-   openTag(os, ossimString("publish"),    false);
-   os << find(ossimString("/metadata/idinfo/citation/citeinfo/pubinfo/publish"));
-   closeTag(os, ossimString("publish"),   false);
-
-   closeTag(os, ossimString("pubinfo"),  true);
-   closeTag(os, ossimString("citeinfo"),  true);
-   closeTag(os, ossimString("citation"),  true);
-
-   openTag(os, ossimString("descript"),  true);
-
-   openTag(os, ossimString("abstract"),    false);
-   os << find(ossimString("/metadata/idinfo/descript/abstract"));
-   closeTag(os, ossimString("abstract"),   false);
-
-   openTag(os, ossimString("purpose"),    false);
-   os << find(ossimString("/metadata/idinfo/descript/purpose"));
-   closeTag(os, ossimString("purpose"),   false);
-
-   openTag(os, ossimString("supplinf"),    false);
-   os << find(ossimString("/metadata/idinfo/descript/supplinf"));
-   closeTag(os, ossimString("supplinf"),   false);
-
-   closeTag(os, ossimString("descript"),  true);
-
-   openTag(os, ossimString("timeperd"),  true);
-   openTag(os, ossimString("timeinfo"),  true);
-   openTag(os, ossimString("sngdate"),  true);
-
-   openTag(os, ossimString("caldate"),    false);
-   os << find(ossimString("/metadata/idinfo/timeperd/timeinfo/sngdate/caldate"));
-   closeTag(os, ossimString("caldate"),   false);
-   
-   closeTag(os, ossimString("sngdate"),  true);
-   closeTag(os, ossimString("timeinfo"),  true);
-
-   
-   openTag(os, ossimString("current"),    false);
-   os << find(ossimString("/metadata/idinfo/timeperd/current"));
-   closeTag(os, ossimString("current"),   false);
-
-   closeTag(os, ossimString("timeperd"),  true);
-
-   openTag(os, ossimString("status"),  true);
-
-   openTag(os, ossimString("progress"),    false);
-   os << find(ossimString("/metadata/idinfo/status/progress"));
-   closeTag(os, ossimString("progress"),   false);
-
-   openTag(os, ossimString("update"),    false);
-   os << find(ossimString("/metadata/idinfo/status/update"));
-   closeTag(os, ossimString("update"),   false);
-
-   closeTag(os, ossimString("status"),  true);
-
-   openTag(os, ossimString("spdom"),  true);
-   openTag(os, ossimString("bounding"),  true);
-
-   if (mapProj->isGeographic())
-   {
-      openTag(os, ossimString("westbc"),    false);
-      os << ossimString::toString(mpi.ulGroundPt().lon);
-      closeTag(os, ossimString("westbc"),   false);
-      
-      openTag(os, ossimString("eastbc"),    false);
-      os << ossimString::toString(mpi.lrGroundPt().lon);
-      closeTag(os, ossimString("eastbc"),   false);
-      
-      openTag(os, ossimString("northbc"),    false);
-      os << ossimString::toString(mpi.ulGroundPt().lat);
-      closeTag(os, ossimString("northbc"),   false);
-      
-      openTag(os, ossimString("southbc"),    false);
-      os << ossimString::toString(mpi.lrGroundPt().lat);
-      closeTag(os, ossimString("southbc"),   false);
-   }
-   else
-   {
-      openTag(os, ossimString("westbc"),    false);
-      os << ossimString::toString(mpi.ulEastingNorthingPt().x);
-      closeTag(os, ossimString("westbc"),   false);
-      
-      openTag(os, ossimString("eastbc"),    false);
-      os << ossimString::toString(mpi.lrEastingNorthingPt().x);
-      closeTag(os, ossimString("eastbc"),   false);
-      
-      openTag(os, ossimString("northbc"),    false);
-      os << ossimString::toString(mpi.ulEastingNorthingPt().y);
-      closeTag(os, ossimString("northbc"),   false);
-      
-      openTag(os, ossimString("southbc"),    false);
-      os << ossimString::toString(mpi.ulEastingNorthingPt().y);
-      closeTag(os, ossimString("southbc"),   false);
-   }
-   
-   closeTag(os, ossimString("bounding"),  true);
-   closeTag(os, ossimString("spdom"),    true);
-
-   openTag(os, ossimString("keywords"), true);
-
-   openTag(os, ossimString("theme"), true);
-
-   openTag(os, ossimString("themekt"), false);
-   os << find(ossimString("/metadata/idinfo/keywords/theme/themekt"));
-   closeTag(os, ossimString("themekt"), false);
-
-   openTag(os, ossimString("themekey"), false);
-   os << find(ossimString("/metadata/idinfo/keywords/theme/themekey"));
-   closeTag(os, ossimString("themekey"), false);
-   
-   closeTag(os, ossimString("theme"), true);
-
-   closeTag(os, ossimString("keywords"), true);
-
-   openTag(os, ossimString("accconst"), false);
-   os << find(ossimString("/metadata/idinfo/accconst"));
-   closeTag(os, ossimString("accconst"), false);
-
-   openTag(os, ossimString("useconst"), false);
-   os << find(ossimString("/metadata/idinfo/useconst"));
-   closeTag(os, ossimString("useconst"), false);
-
-   openTag(os, ossimString("ptcontac"), true);
-   
-   openTag(os, ossimString("cntinfo"), true);
-   
-   openTag(os, ossimString("cntperp"), true);
-   openTag(os, ossimString("cntper"), false);
-   os << find(ossimString("/metadata/idinfo/ptcontac/cntinfo/cntperp/cntper"));
-   closeTag(os, ossimString("cntper"), false);
-   closeTag(os, ossimString("cntperp"), true);
-
-   openTag(os, ossimString("cntaddr"), true);
-
-   openTag(os, ossimString("addrtype"), false);
-   os << find(ossimString("/metadata/idinfo/ptcontac/cntinfo/cntaddr/addrtype"));
-   closeTag(os, ossimString("addrtype"), false);
-
-   openTag(os, ossimString("address"), false);
-   os << find(ossimString("/metadata/idinfo/ptcontac/cntinfo/cntaddr/address"));
-   closeTag(os, ossimString("address"), false);
-
-   openTag(os, ossimString("city"), false);
-   os << find(ossimString("/metadata/idinfo/ptcontac/cntinfo/cntaddr/city"));
-   closeTag(os, ossimString("city"), false);
-
-   openTag(os, ossimString("state"), false);
-   os << find(ossimString("/metadata/idinfo/ptcontac/cntinfo/cntaddr/state"));
-   closeTag(os, ossimString("state"), false);
-
-   openTag(os, ossimString("postal"), false);
-   os << find(ossimString("/metadata/idinfo/ptcontac/cntinfo/cntaddr/postal"));
-   closeTag(os, ossimString("postal"), false);
-
-   openTag(os, ossimString("country"), false);
-   os << find(ossimString("/metadata/idinfo/ptcontac/cntinfo/cntaddr/country"));
-   closeTag(os, ossimString("country"), false);
-
-   closeTag(os, ossimString("cntaddr"), true);
-
-   openTag(os, ossimString("cntvoice"), false);
-   os << find(ossimString("/metadata/idinfo/ptcontac/cntinfo/cntvoice"));
-   closeTag(os, ossimString("cntvoice"), false);
-  
-   openTag(os, ossimString("cntfax"), false);
-
-   os << find(ossimString("/metadata/idinfo/ptcontac/cntinfo/cntfax"));
-   closeTag(os, ossimString("cntfax"), false);
-  
-   openTag(os, ossimString("cntemail"), false);
-   os << find(ossimString("/metadata/idinfo/ptcontac/cntinfo/cntemail"));
-   closeTag(os, ossimString("cntemail"), false);
-   
-   closeTag(os, ossimString("cntinfo"), true);
-   closeTag(os, ossimString("ptcontac"), true);
-
-   openTag(os, ossimString("secinfo"), true);
-
-   openTag(os, ossimString("secclass"), false);
-   os << find(ossimString("/metadata/idinfo/secinfo/secclass"));
-   closeTag(os, ossimString("secclass"), false);
-
-   openTag(os, ossimString("secsys"), false);
-   os << find(ossimString("/metadata/idinfo/secinfo/secsys"));
-   closeTag(os, ossimString("secsys"), false);
-
-   openTag(os, ossimString("sechandl"), false);
-   os << find(ossimString("/metadata/idinfo/secinfo/sechandl"));
-   closeTag(os, ossimString("sechandl"), false);
-
-   closeTag(os, ossimString("secinfo"), true);
-   closeTag(os, ossimString("idinfo"), true);
-   
-   openTag(os, ossimString("distinfo"), true);
-   openTag(os, ossimString("distrib"), true);
-   openTag(os, ossimString("cntinfo"), true);
-   openTag(os, ossimString("cntperp"), true);
-   openTag(os, ossimString("cntper"), false);
-   os << find(ossimString("/metadata/distinfo/distrib/cntinfo/cntperp/cntper"));
-
-   closeTag(os, ossimString("cntper"), false);
-   closeTag(os, ossimString("cntperp"), true);
-
-   openTag(os, ossimString("cntaddr"), true);
-
-   openTag(os, ossimString("addrtype"), false);
-   os << find(ossimString("/metadata/distinfo/distrib/cntinfo/cntaddr/addrtype"));
-   closeTag(os, ossimString("addrtype"), false);
-
-   openTag(os, ossimString("address"), false);
-   os << find(ossimString("/metadata/distinfo/distrib/cntinfo/cntaddr/address"));
-   closeTag(os, ossimString("address"), false);
-
-   openTag(os, ossimString("city"), false);
-   os << find(ossimString("/metadata/distinfo/distrib/cntinfo/cntaddr/city"));
-   closeTag(os, ossimString("city"), false);
-
-   openTag(os, ossimString("state"), false);
-   os << find(ossimString("/metadata/distinfo/distrib/cntinfo/cntaddr/state"));
-   closeTag(os, ossimString("state"), false);
-
-   openTag(os, ossimString("postal"), false);
-   os << find(ossimString("/metadata/distinfo/distrib/cntinfo/cntaddr/postal"));
-   closeTag(os, ossimString("postal"), false);
-
-   openTag(os, ossimString("country"), false);
-   os << find(ossimString("/metadata/distinfo/distrib/cntinfo/cntaddr/country"));
-   closeTag(os, ossimString("country"), false);
-
-   closeTag(os, ossimString("cntaddr"), true);
-
-   openTag(os, ossimString("cntvoice"), false);
-   os << find(ossimString("/metadata/distinfo/distrib/cntinfo/cntvoice"));
-   closeTag(os, ossimString("cntvoice"), false);
-  
-   openTag(os, ossimString("cntfax"), false);
-   os << find(ossimString("/metadata/distinfo/distrib/cntinfo/cntfax"));
-   closeTag(os, ossimString("cntfax"), false);
-  
-   openTag(os, ossimString("cntemail"), false);
-   os << find(ossimString("/metadata/distinfo/distrib/cntinfo/cntemail"));
-   closeTag(os, ossimString("cntemail"), false);
-   
-   closeTag(os, ossimString("cntinfo"), true);
-   closeTag(os, ossimString("distrib"), true);
-
-   openTag(os, ossimString("resdesc"), false);
-   os << find(ossimString("/metadata/distinfo/resdesc"));
-   closeTag(os, ossimString("resdesc"), false);
-
-   openTag(os, ossimString("distliab"), false);
-   os << find(ossimString("/metadata/distinfo/distliab"));
-   closeTag(os, ossimString("distliab"), false);
-
-   openTag(os, ossimString("stdorder"), true);
-   openTag(os, ossimString("digform"), true);
-   openTag(os, ossimString("digtinfo"), true);
-   
-   openTag(os, ossimString("formname"), false);
-   os << find(ossimString("/metadata/distinfo/stdorder/digform/digtinfo/formname"));
-   closeTag(os, ossimString("formname"), false);
-
-   closeTag(os, ossimString("digtinfo"), true);
-
-   openTag(os, ossimString("digtopt"), true);
-   openTag(os, ossimString("onlinopt"), true);   
-   openTag(os, ossimString("computer"), true);
-   openTag(os, ossimString("networka"), true);
-
-   openTag(os, ossimString("networkr"), false);
-   os << find(ossimString("/metadata/distinfo/stdorder/digform/digtopt/onlinopt/computer/networka/networkr"));
-   closeTag(os, ossimString("networkr"), false);
-
-   closeTag(os, ossimString("networka"), true);
-   closeTag(os, ossimString("computer"), true);
-   closeTag(os, ossimString("onlinopt"), true);
-   closeTag(os, ossimString("digtopt"), true);
-   closeTag(os, ossimString("digform"), true);
-
-   openTag(os, ossimString("fees"), false);
-   os << find(ossimString("/metadata/distinfo/stdorder/fees"));
-   closeTag(os, ossimString("fees"), false);
-
-   closeTag(os, ossimString("stdorder"), true);
-   closeTag(os, ossimString("distinfo"), true);
-
-   openTag(os, ossimString("metainfo"), true);
-
-   openTag(os, ossimString("metd"), false);
-   os << find(ossimString("/metadata/metainfo/metd"));
-   closeTag(os, ossimString("metd"), false);
-
-   openTag(os, ossimString("metc"), true);
-   openTag(os, ossimString("cntinfo"), true);
-   openTag(os, ossimString("cntperp"), true);
-   
-   openTag(os, ossimString("cntper"), false);
-   os << find(ossimString("/metadata/metainfo/metc/cntinfo/cntperp/cntper"));
-   closeTag(os, ossimString("cntper"), false);
-
-   closeTag(os, ossimString("cntperp"), true);
-   
-   openTag(os, ossimString("cntaddr"), true);
-
-   openTag(os, ossimString("addrtype"), false);
-   os << find(ossimString("/metadata/metainfo/metc/cntinfo/cntaddr/addrtype"));
-   closeTag(os, ossimString("addrtype"), false);
-
-   openTag(os, ossimString("address"), false);
-   os << find(ossimString("/metadata/metainfo/metc/cntinfo/cntaddr/address"));
-   closeTag(os, ossimString("address"), false);
-
-   openTag(os, ossimString("city"), false);
-   os << find(ossimString("/metadata/metainfo/metc/cntinfo/cntaddr/city"));
-   closeTag(os, ossimString("city"), false);
-
-   openTag(os, ossimString("state"), false);
-   os << find(ossimString("/metadata/metainfo/metc/cntinfo/cntaddr/state"));
-   closeTag(os, ossimString("state"), false);
-
-   openTag(os, ossimString("postal"), false);
-   os << find(ossimString("/metadata/metainfo/metc/cntinfo/cntaddr/postal"));
-   closeTag(os, ossimString("postal"), false);
-
-   openTag(os, ossimString("country"), false);
-   os << find(ossimString("/metadata/metainfo/metc/cntinfo/cntaddr/country"));
-   closeTag(os, ossimString("country"), false);
-
-   closeTag(os, ossimString("cntaddr"), true);
-
-   openTag(os, ossimString("cntvoice"), false);
-   os << find(ossimString("/metadata/metainfo/metc/cntinfo/cntvoice"));
-   closeTag(os, ossimString("cntvoice"), false);
-  
-   openTag(os, ossimString("cntfax"), false);
-   os << find(ossimString("/metadata/metainfo/metc/cntinfo/cntfax"));
-   closeTag(os, ossimString("cntfax"), false);
-  
-   openTag(os, ossimString("cntemail"), false);
-   os << find(ossimString("/metadata/metainfo/metc/cntinfo/cntemail"));
-   closeTag(os, ossimString("cntemail"), false);
-   
-   closeTag(os, ossimString("cntinfo"), true);
-   closeTag(os, ossimString("metc"), true);
-
-   openTag(os, ossimString("metstdn"), false);
-   os << find(ossimString("/metadata/metainfo/metstdn"));
-   closeTag(os, ossimString("metstdn"), false);
-
-   openTag(os, ossimString("metstdv"), false);
-   os << find(ossimString("/metadata/metainfo/metstdv"));
-   closeTag(os, ossimString("metstdv"), false);
-
-   closeTag(os, ossimString("metainfo"), true);
-   closeTag(os, ossimString("metadata"), true);
-
-   os.close();
-
-   return true;
-}
-
-bool ossimFgdcFileWriter::writeTemplate(const ossimFilename& file) const
-{
-   ofstream os(file.c_str());
-   if (!os)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimFgdcFileWriter::writeTemplate Could not open: " << file
-         << endl;
-      return false;
-   }
-
-   os << "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n"
-      << "<?xml-stylesheet type=\"text/xsl\" href=\"/common/fgdc_classic.xsl\" ?>\n";
-   openTag(os, ossimString("metadata"),  true);
-   openTag(os, ossimString("idinfo"),    true);
-   openTag(os, ossimString("citation"),  true);
-   openTag(os, ossimString("citeinfo"),  true);
-   
-   openTag(os, ossimString("origin"),    false);
-   closeTag(os, ossimString("origin"),   false);
-   
-   openTag(os, ossimString("pubdate"),    false);
-   closeTag(os, ossimString("pubdate"),   false);
-
-   openTag(os, ossimString("title"),    false);
-   closeTag(os, ossimString("title"),   false);
-
-   openTag(os, ossimString("edition"),    false);
-   closeTag(os, ossimString("edition"),   false);
-
-   openTag(os, ossimString("geoform"),    false);
-   closeTag(os, ossimString("geoform"),   false);
-
-   openTag(os, ossimString("serinfo"),  true);
-   openTag(os, ossimString("sername"),    false);
-
-   closeTag(os, ossimString("sername"),   false);
-
-   openTag(os, ossimString("issue"),    false);
-   closeTag(os, ossimString("issue"),   false);
-
-   closeTag(os, ossimString("serinfo"),  true);
-
-   openTag(os, ossimString("pubinfo"),  true);
-
-   openTag(os, ossimString("pubplace"),    false);
-
-   closeTag(os, ossimString("pubplace"),   false);
-
-   openTag(os, ossimString("publish"),    false);
-   closeTag(os, ossimString("publish"),   false);
-
-   closeTag(os, ossimString("pubinfo"),  true);
-   closeTag(os, ossimString("citeinfo"),  true);
-   closeTag(os, ossimString("citation"),  true);
-
-   openTag(os, ossimString("descript"),  true);
-
-   openTag(os, ossimString("abstract"),    false);
-   closeTag(os, ossimString("abstract"),   false);
-
-   openTag(os, ossimString("purpose"),    false);
-   closeTag(os, ossimString("purpose"),   false);
-
-   openTag(os, ossimString("supplinf"),    false);
-   closeTag(os, ossimString("supplinf"),   false);
-
-   closeTag(os, ossimString("descript"),  true);
-
-   openTag(os, ossimString("timeperd"),  true);
-   openTag(os, ossimString("timeinfo"),  true);
-   openTag(os, ossimString("sngdate"),  true);
-
-   openTag(os, ossimString("caldate"),    false);
-   closeTag(os, ossimString("caldate"),   false);
-   
-   closeTag(os, ossimString("sngdate"),  true);
-   closeTag(os, ossimString("timeinfo"),  true);
-
-   
-   openTag(os, ossimString("current"),    false);
-   closeTag(os, ossimString("current"),   false);
-
-   closeTag(os, ossimString("timeperd"),  true);
-
-   openTag(os, ossimString("status"),  true);
-
-   openTag(os, ossimString("progress"),    false);
-   closeTag(os, ossimString("progress"),   false);
-
-   openTag(os, ossimString("update"),    false);
-   closeTag(os, ossimString("update"),   false);
-
-   closeTag(os, ossimString("status"),  true);
-
-   openTag(os, ossimString("spdom"),  true);
-   openTag(os, ossimString("bounding"),  true);
-
-   openTag(os, ossimString("westbc"),    false);
-   closeTag(os, ossimString("westbc"),   false);
-   openTag(os, ossimString("eastbc"),    false);
-
-   closeTag(os, ossimString("eastbc"),   false);
-   openTag(os, ossimString("northbc"),    false);
-
-   closeTag(os, ossimString("northbc"),   false);
-   openTag(os, ossimString("southbc"),    false);
-
-   closeTag(os, ossimString("southbc"),   false);
-
-   closeTag(os, ossimString("bounding"),  true);
-   closeTag(os, ossimString("spdom"),    true);
-
-   openTag(os, ossimString("keywords"), true);
-
-   openTag(os, ossimString("theme"), true);
-
-   openTag(os, ossimString("themekt"), false);
-   closeTag(os, ossimString("themekt"), false);
-
-   openTag(os, ossimString("themekey"), false);
-   closeTag(os, ossimString("themekey"), false);
-   
-   closeTag(os, ossimString("theme"), true);
-
-   closeTag(os, ossimString("keywords"), true);
-
-   openTag(os, ossimString("accconst"), false);
-   closeTag(os, ossimString("accconst"), false);
-
-   openTag(os, ossimString("useconst"), false);
-   closeTag(os, ossimString("useconst"), false);
-
-   openTag(os, ossimString("ptcontac"), true);
-   
-   openTag(os, ossimString("cntinfo"), true);
-   
-   openTag(os, ossimString("cntperp"), true);
-   openTag(os, ossimString("cntper"), false);
-   closeTag(os, ossimString("cntper"), false);
-   closeTag(os, ossimString("cntperp"), true);
-
-   openTag(os, ossimString("cntaddr"), true);
-
-   openTag(os, ossimString("addrtype"), false);
-   closeTag(os, ossimString("addrtype"), false);
-
-   openTag(os, ossimString("address"), false);
-   closeTag(os, ossimString("address"), false);
-
-   openTag(os, ossimString("city"), false);
-   closeTag(os, ossimString("city"), false);
-
-   openTag(os, ossimString("state"), false);
-   closeTag(os, ossimString("state"), false);
-
-   openTag(os, ossimString("postal"), false);
-   closeTag(os, ossimString("postal"), false);
-
-   openTag(os, ossimString("country"), false);
-   closeTag(os, ossimString("country"), false);
-
-   closeTag(os, ossimString("cntaddr"), true);
-
-   openTag(os, ossimString("cntvoice"), false);
-   closeTag(os, ossimString("cntvoice"), false);
-  
-   openTag(os, ossimString("cntfax"), false);
-   closeTag(os, ossimString("cntfax"), false);
-  
-   openTag(os, ossimString("cntemail"), false);
-   closeTag(os, ossimString("cntemail"), false);
-   
-   closeTag(os, ossimString("cntinfo"), true);
-   
-   closeTag(os, ossimString("ptcontac"), true);
-
-   openTag(os, ossimString("secinfo"), true);
-   openTag(os, ossimString("secclass"), false);
-   closeTag(os, ossimString("secclass"), false);
-   openTag(os, ossimString("secsys"), false);
-   closeTag(os, ossimString("secsys"), false);
-   openTag(os, ossimString("sechandl"), false);
-   closeTag(os, ossimString("sechandl"), false);
-   closeTag(os, ossimString("secinfo"), true);
-
-   closeTag(os, ossimString("idinfo"), true);
-
-   openTag(os, ossimString("distinfo"), true);
-   openTag(os, ossimString("distrib"), true);
-   openTag(os, ossimString("cntinfo"), true);
-   openTag(os, ossimString("cntperp"), true);
-   openTag(os, ossimString("cntper"), false);
-   closeTag(os, ossimString("cntper"), false);
-   closeTag(os, ossimString("cntperp"), true);
-
-   openTag(os, ossimString("cntaddr"), true);
-
-   openTag(os, ossimString("addrtype"), false);
-   closeTag(os, ossimString("addrtype"), false);
-
-   openTag(os, ossimString("address"), false);
-   closeTag(os, ossimString("address"), false);
-
-   openTag(os, ossimString("city"), false);
-   closeTag(os, ossimString("city"), false);
-
-   openTag(os, ossimString("state"), false);
-   closeTag(os, ossimString("state"), false);
-
-   openTag(os, ossimString("postal"), false);
-   closeTag(os, ossimString("postal"), false);
-
-   openTag(os, ossimString("country"), false);
-   closeTag(os, ossimString("country"), false);
-
-   closeTag(os, ossimString("cntaddr"), true);
-
-   openTag(os, ossimString("cntvoice"), false);
-   closeTag(os, ossimString("cntvoice"), false);
-  
-   openTag(os, ossimString("cntfax"), false);
-   closeTag(os, ossimString("cntfax"), false);
-  
-   openTag(os, ossimString("cntemail"), false);
-   closeTag(os, ossimString("cntemail"), false);
-   
-   closeTag(os, ossimString("cntinfo"), true);
-   closeTag(os, ossimString("distrib"), true);
-
-   openTag(os, ossimString("resdesc"), false);
-   closeTag(os, ossimString("resdesc"), false);
-
-   openTag(os, ossimString("distliab"), false);
-   closeTag(os, ossimString("distliab"), false);
-
-   openTag(os, ossimString("stdorder"), true);
-   openTag(os, ossimString("digform"), true);
-   openTag(os, ossimString("digtinfo"), true);
-   
-   openTag(os, ossimString("formname"), false);
-   closeTag(os, ossimString("formname"), false);
-
-   closeTag(os, ossimString("digtinfo"), true);
-
-   openTag(os, ossimString("digtopt"), true);
-   openTag(os, ossimString("onlinopt"), true);   
-   openTag(os, ossimString("computer"), true);
-   openTag(os, ossimString("networka"), true);
-
-   openTag(os, ossimString("networkr"), false);
-   closeTag(os, ossimString("networkr"), false);
-
-   closeTag(os, ossimString("networka"), true);
-   closeTag(os, ossimString("computer"), true);
-   closeTag(os, ossimString("onlinopt"), true);
-   closeTag(os, ossimString("digtopt"), true);
-   closeTag(os, ossimString("digform"), true);
-
-   openTag(os, ossimString("fees"), false);
-   closeTag(os, ossimString("fees"), false);
-
-   closeTag(os, ossimString("stdorder"), true);
-   closeTag(os, ossimString("distinfo"), true);
-
-   openTag(os, ossimString("metainfo"), true);
-
-   openTag(os, ossimString("metd"), false);
-   closeTag(os, ossimString("metd"), false);
-
-   openTag(os, ossimString("metc"), true);
-   openTag(os, ossimString("cntinfo"), true);
-   openTag(os, ossimString("cntperp"), true);
-   
-   openTag(os, ossimString("cntper"), false);
-   closeTag(os, ossimString("cntper"), false);
-
-   closeTag(os, ossimString("cntperp"), true);
-   
-   openTag(os, ossimString("cntaddr"), true);
-
-   openTag(os, ossimString("addrtype"), false);
-   closeTag(os, ossimString("addrtype"), false);
-
-   openTag(os, ossimString("address"), false);
-   closeTag(os, ossimString("address"), false);
-
-   openTag(os, ossimString("city"), false);
-   closeTag(os, ossimString("city"), false);
-
-   openTag(os, ossimString("state"), false);
-   closeTag(os, ossimString("state"), false);
-
-   openTag(os, ossimString("postal"), false);
-   closeTag(os, ossimString("postal"), false);
-
-   openTag(os, ossimString("country"), false);
-   closeTag(os, ossimString("country"), false);
-
-   closeTag(os, ossimString("cntaddr"), true);
-
-   openTag(os, ossimString("cntvoice"), false);
-   closeTag(os, ossimString("cntvoice"), false);
-  
-   openTag(os, ossimString("cntfax"), false);
-   closeTag(os, ossimString("cntfax"), false);
-  
-   openTag(os, ossimString("cntemail"), false);
-   closeTag(os, ossimString("cntemail"), false);
-   
-   closeTag(os, ossimString("cntinfo"), true);
-   closeTag(os, ossimString("metc"), true);
-
-   openTag(os, ossimString("metstdn"), false);
-   closeTag(os, ossimString("metstdn"), false);
-
-   openTag(os, ossimString("metstdv"), false);
-   closeTag(os, ossimString("metstdv"), false);
-
-   closeTag(os, ossimString("metainfo"), true);
-   closeTag(os, ossimString("metadata"), true);
-
-   os.close();
-
-	if(traceDebug())
-	{
-		ossimNotify(ossimNotifyLevel_NOTICE)
-      << "Wrote file:  " << file.c_str() << endl;
-	}
-   
-   return true;
-}
-   
-bool ossimFgdcFileWriter::loadState (const ossimKeywordlist& kwl,
-                                     const char* prefix)
-{
-   const char* lookup = kwl.find(prefix, "template");
-   if (lookup)
-   {
-      setTemplate(ossimFilename(lookup));
-   }
-   lookup = kwl.find(prefix, "source_image_filename");
-   if (lookup)
-   {
-      theSourceImageFilename = lookup;
-   }
-   lookup = kwl.find(prefix, "tab_string");
-   if (lookup)
-   {
-      theTabString = lookup;
-   }
-   lookup = kwl.find(prefix, "fgdc_template_doc");
-   if (lookup)
-   {
-      setTemplate(ossimFilename(lookup));
-   }
-   
-   return ossimMetadataFileWriter::loadState(kwl, prefix);
-}
-
-ossim_uint32 ossimFgdcFileWriter::getIndentionLevel() const
-{
-   return theIndentionLevel;
-}
-
-void ossimFgdcFileWriter::setIndentionLevel(ossim_uint32 level)
-{
-   theIndentionLevel = level;
-}
-
-ossimString ossimFgdcFileWriter::getTabString() const
-{
-   return theTabString;
-}
-
-void ossimFgdcFileWriter::setTabString(const ossimString& tabString)
-{
-   theTabString = tabString;
-}
-
-void ossimFgdcFileWriter::openTag(std::ostream& os,
-                                  const ossimString& tag,
-                                  bool newLine) const
-{
-   if ( theIndentionLevel && theTabString.size() )
-   {
-      ossimString tab;
-      for (ossim_uint32 i = 0; i < theIndentionLevel; ++i)
-      {
-         tab += theTabString;
-      }
-
-      os << tab.c_str();
-   }
-   
-   os << "<" << tag.c_str() << ">";
-
-   if (newLine)
-   {
-      os << "\n";
-      ++theIndentionLevel;
-   }
-}
-
-void ossimFgdcFileWriter::closeTag(std::ostream& os,
-                                   const ossimString& tag,
-                                   bool decrementLevel) const
-{
-   if ( decrementLevel && (theIndentionLevel > 1) && theTabString.size() )
-   {
-      ossimString tab;
-      for (ossim_uint32 i = 0; i < theIndentionLevel-1; ++i)
-      {
-         tab += theTabString;
-      }
-
-      os << tab.c_str();
-   }
-   
-   os << "</" << tag.c_str() << ">\n";
-
-   if (theIndentionLevel && decrementLevel)
-   {
-      --theIndentionLevel;
-   }
-}
-
-void ossimFgdcFileWriter::setTemplate(const ossimFilename& xmlTemplateFile)
-{
-   theTemplate.openFile(xmlTemplateFile);
-}
-
-ossimString ossimFgdcFileWriter::find(const ossimString& xpath) const
-{
-   ossimString result;
-
-   if (theTemplate.getErrorStatus())
-   {
-      return result;
-   }
-   
-   vector< ossimRefPtr<ossimXmlNode> > xml_nodes;
-   theTemplate.findNodes(xpath, xml_nodes);
-
-   if (xml_nodes.size())
-   {
-      if (xml_nodes[0].valid())
-      {
-         result = xml_nodes[0]->getText();
-      }
-   }
-   return result;
-}
-
-void ossimFgdcFileWriter::getMetadatatypeList(
-   std::vector<ossimString>& metadatatypeList) const
-{
-   metadatatypeList.push_back(ossimString("ossim_fgdc")); 
-}
-
-bool ossimFgdcFileWriter::hasMetadataType(
-   const ossimString& metadataType)const
-{
-   return (metadataType == "ossim_fgdc");
-}
diff --git a/src/ossim/imaging/ossimFilter.cpp b/src/ossim/imaging/ossimFilter.cpp
deleted file mode 100644
index 29d9917..0000000
--- a/src/ossim/imaging/ossimFilter.cpp
+++ /dev/null
@@ -1,333 +0,0 @@
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%                                                                             %
-%                                                                             %
-%                                                                             %
-%                        ZZZZZ   OOO    OOO   M   M                           %
-%                           ZZ  O   O  O   O  MM MM                           %
-%                         ZZZ   O   O  O   O  M M M                           %
-%                        ZZ     O   O  O   O  M   M                           %
-%                        ZZZZZ   OOO    OOO   M   M                           %
-%                                                                             %
-%                                                                             %
-%                      ImageMagick Image Zoom Methods                         %
-%                                                                             %
-%                                                                             %
-%                              Software Design                                %
-%                                John Cristy                                  %
-%                                 July 1992                                   %
-%                                                                             %
-%                                                                             %
-%  Copyright (C) 2000 ImageMagick Studio, a non-profit organization dedicated %
-%  to making software imaging solutions freely available.                     %
-%                                                                             %
-%  Permission is hereby granted, free of charge, to any person obtaining a    %
-%  copy of this software and associated documentation files ("ImageMagick"),  %
-%  to deal in ImageMagick without restriction, including without limitation   %
-%  the rights to use, copy, modify, merge, publish, distribute, sublicense,   %
-%  and/or sell copies of ImageMagick, and to permit persons to whom the       %
-%  ImageMagick is furnished to do so, subject to the following conditions:    %
-%                                                                             %
-%  The above copyright notice and this permission notice shall be included in %
-%  all copies or substantial portions of ImageMagick.                         %
-%                                                                             %
-%  The software is provided "as is", without warranty of any kind, express or %
-%  implied, including but not limited to the warranties of merchantability,   %
-%  fitness for a particular purpose and noninfringement.  In no event shall   %
-%  ImageMagick Studio be liable for any claim, damages or other liability,    %
-%  whether in an action of contract, tort or otherwise, arising from, out of  %
-%  or in connection with ImageMagick or the use or other dealings in          %
-%  ImageMagick.                                                               %
-%                                                                             %
-%  Except as contained in this notice, the name of the ImageMagick Studio     %
-%  shall not be used in advertising or otherwise to promote the sale, use or  %
-%  other dealings in ImageMagick without prior written authorization from the %
-%  ImageMagick Studio.                                                        %
-%                                                                             %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-%
-%
-*/
-#include <ossim/base/ossimConstants.h>
-#include <ossim/imaging/ossimFilter.h>
-#include <ossim/matrix/newmat.h>
-#include <iostream>
-
-
-RTTI_DEF(ossimFilter, "ossimFilter");
-RTTI_DEF1(ossimBoxFilter, "ossimBoxFilter",ossimFilter);
-RTTI_DEF1(ossimSincFilter, "ossimSincFilter",ossimFilter);
-RTTI_DEF1(ossimBellFilter, "ossimBellFilter",ossimFilter);
-RTTI_DEF1(ossimNearestNeighborFilter, "ossimNearestNeighborFilter",ossimFilter);
-RTTI_DEF1(ossimBesselFilter, "ossimBesselFilter",ossimFilter);
-RTTI_DEF1(ossimBesselOrderOneFilter, "ossimBesselOrderOneFilter",ossimFilter);
-RTTI_DEF1(ossimBlackmanFilter, "ossimBlackmanFilter",ossimFilter);
-RTTI_DEF1(ossimBlackmanSincFilter, "ossimBlackmanSincFilter",ossimFilter);
-RTTI_DEF1(ossimBlackmanBesselFilter, "ossimBlackmanBesselFilter",ossimFilter);
-RTTI_DEF1(ossimCatromFilter, "ossimCatromFilter",ossimFilter);
-RTTI_DEF1(ossimCubicFilter, "ossimCubicFilter",ossimFilter);
-RTTI_DEF1(ossimBSplineFilter, "ossimBSplineFilter",ossimFilter);
-RTTI_DEF1(ossimGaussianFilter, "ossimGaussianFilter",ossimFilter);
-RTTI_DEF1(ossimHanningFilter, "ossimHanningFilter",ossimFilter);
-RTTI_DEF1(ossimHammingFilter, "ossimHammingFilter",ossimFilter);
-RTTI_DEF1(ossimHermiteFilter, "ossimHermiteFilter",ossimFilter);
-RTTI_DEF1(ossimLanczosFilter, "ossimLanczosFilter",ossimFilter);
-RTTI_DEF1(ossimMitchellFilter, "ossimMitchellFilter",ossimFilter);
-RTTI_DEF1(ossimQuadraticFilter, "ossimQuadraticFilter",ossimFilter);
-RTTI_DEF1(ossimTriangleFilter, "ossimTriangleFilter",ossimFilter);
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%                                                                             %
-%                                                                             %
-%                                                                             %
-+   B e s s e l O r d e r O n e                                               %
-%                                                                             %
-%                                                                             %
-%                                                                             %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-%  Method BesselOrderOne computes the Bessel function of x of the first kind
-%  of order 0:
-%
-%    Reduce x to |x| since j1(x)= -j1(-x), and for x in (0,8]
-%
-%       j1(x) = x*j1(x);
-%
-%    For x in (8,inf)
-%
-%       j1(x) = sqrt(2/(pi*x))*(p1(x)*cos(x1)-q1(x)*sin(x1))
-%
-%    where x1 = x-3*pi/4. Compute sin(x1) and cos(x1) as follow:
-%
-%       cos(x1) =  cos(x)cos(3pi/4)+sin(x)sin(3pi/4)
-%               =  1/sqrt(2) * (sin(x) - cos(x))
-%       sin(x1) =  sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
-%               = -1/sqrt(2) * (sin(x) + cos(x))
-%
-%  The format of the BesselOrderOne method is:
-%
-%      double BesselOrderOne(double x)
-%
-%  A description of each parameter follows:
-%
-%    o value: Method BesselOrderOne returns the Bessel function of x of the
-%      first kind of orders 1.
-%
-%    o x: double value.
-%
-%
-*/
-
-static double J1(double x)
-{
-  double
-    p,
-    q;
-
-  register int
-    i;
-
-  static const double
-    Pone[] =
-    {
-       0.581199354001606143928050809e+21,
-      -0.6672106568924916298020941484e+20,
-       0.2316433580634002297931815435e+19,
-      -0.3588817569910106050743641413e+17,
-       0.2908795263834775409737601689e+15,
-      -0.1322983480332126453125473247e+13,
-       0.3413234182301700539091292655e+10,
-      -0.4695753530642995859767162166e+7,
-       0.270112271089232341485679099e+4
-    },
-    Qone[] =
-    {
-      0.11623987080032122878585294e+22,
-      0.1185770712190320999837113348e+20,
-      0.6092061398917521746105196863e+17,
-      0.2081661221307607351240184229e+15,
-      0.5243710262167649715406728642e+12,
-      0.1013863514358673989967045588e+10,
-      0.1501793594998585505921097578e+7,
-      0.1606931573481487801970916749e+4,
-      0.1e+1
-    };
-
-  p=Pone[8];
-  q=Qone[8];
-  for (i=7; i >= 0; i--)
-  {
-    p=p*x*x+Pone[i];
-    q=q*x*x+Qone[i];
-  }
-  return(p/q);
-}
-
-static double P1(double x)
-{
-  double
-    p,
-    q;
-
-  register int
-    i;
-
-  static const double
-    Pone[] =
-    {
-      0.352246649133679798341724373e+5,
-      0.62758845247161281269005675e+5,
-      0.313539631109159574238669888e+5,
-      0.49854832060594338434500455e+4,
-      0.2111529182853962382105718e+3,
-      0.12571716929145341558495e+1
-    },
-    Qone[] =
-    {
-      0.352246649133679798068390431e+5,
-      0.626943469593560511888833731e+5,
-      0.312404063819041039923015703e+5,
-      0.4930396490181088979386097e+4,
-      0.2030775189134759322293574e+3,
-      0.1e+1
-    };
-
-  p=Pone[5];
-  q=Qone[5];
-  for (i=4; i >= 0; i--)
-  {
-    p=p*(8.0/x)*(8.0/x)+Pone[i];
-    q=q*(8.0/x)*(8.0/x)+Qone[i];
-  }
-  return(p/q);
-}
-
-static double Q1(double x)
-{
-   double
-      p,
-      q;
-   
-   register int
-      i;
-   
-   static const double
-      Pone[] =
-   {
-      0.3511751914303552822533318e+3,
-      0.7210391804904475039280863e+3,
-      0.4259873011654442389886993e+3,
-      0.831898957673850827325226e+2,
-      0.45681716295512267064405e+1,
-      0.3532840052740123642735e-1
-   },
-      Qone[] =
-      {
-         0.74917374171809127714519505e+4,
-         0.154141773392650970499848051e+5,
-         0.91522317015169922705904727e+4,
-         0.18111867005523513506724158e+4,
-         0.1038187585462133728776636e+3,
-         0.1e+1
-      };
-      
-      p=Pone[5];
-      q=Qone[5];
-      for (i=4; i >= 0; i--)
-      {
-         p=p*(8.0/x)*(8.0/x)+Pone[i];
-         q=q*(8.0/x)*(8.0/x)+Qone[i];
-      }
-      return(p/q);
-}
-
-double ossimBesselOrderOneFilter::filter(double x, double /* support */)const
-{
-   double
-      p,
-      q;
-   
-   if (x == 0.0)
-      return(0.0);
-   p=x;
-   if (x < 0.0)
-      x=(-x);
-   if (x < 8.0)
-      return(p*J1(x));
-   q=sqrt(2.0/(M_PI*x))*(P1(x)*(1.0/sqrt(2.0)*(sin(x)-cos(x)))-8.0/x*Q1(x)*
-                         (-1.0/sqrt(2.0)*(sin(x)+cos(x))));
-   if (p < 0.0)
-      q=(-q);
-   return(q);
-
-}
-
-void ossimFilter::createMatrix(NEWMAT::Matrix& m,
-                               long width,
-                               double middle,
-                               double scale)const
-{
-   NEWMAT::ColumnVector colVec(width);
-   NEWMAT::RowVector    rowVec(width);
-
-   double t = 0.0;
-   double val = 0.0;
-   if(width == 1)
-   {
-      t = 0;
-      val = filter(t, getSupport());
-      colVec[0] = val;
-      rowVec[0] = val;
-   }
-   else
-   {
-      for(long index = 0; index < width; index++)
-      {
-         t = (double)index/(double)(width-1);
-         t = middle + (t - .5)*scale;
-         val = filter(t, getSupport());
-         colVec[index] = val;
-         rowVec[index] = val;
-      }
-   }
-
-   // do the outer product to construct the
-   // filter matrix
-   m = colVec * rowVec;
-}
-
-
-NEWMAT::Matrix *ossimFilter::newMatrix(long width,
-                                       double middle,
-                                       double scale)const
-{
-   NEWMAT::Matrix *result = new NEWMAT::Matrix(width, width);
-
-   createMatrix(*result,
-                width,
-                middle,
-                scale);
-
-   return result;
-}
-
-NEWMAT::RowVector *ossimFilter::newVector(long width,
-                                          double middle,
-                                          double scale)const
-{
-   NEWMAT::RowVector *result = new NEWMAT::RowVector(width);
-
-
-   double t = 0.0;
-   double val = 0.0;
-   for(long index = 0; index < width; index++)
-   {
-      t = (double)index/(double)(width-1);
-      t = middle + (t- .5)*scale;
-      val = filter(t, getSupport());
-      (*result)[index] = val;
-   }
-
-   return result;
-}
diff --git a/src/ossim/imaging/ossimFilterResampler.cpp b/src/ossim/imaging/ossimFilterResampler.cpp
deleted file mode 100644
index 37d54c8..0000000
--- a/src/ossim/imaging/ossimFilterResampler.cpp
+++ /dev/null
@@ -1,937 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-
-// Contributor:
-//         David A. Horner (DAH) http://dave.thehorners.com
-//
-//*************************************************************************
-// $Id: ossimFilterResampler.cpp 20326 2011-12-07 13:48:18Z dburken $
-
-#include <ossim/imaging/ossimFilterResampler.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimPreferences.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/imaging/ossimFilterTable.h>
-ossimFilterResampler::ossimFilterResampler()
-   :theMinifyFilter(new ossimNearestNeighborFilter()),
-    theMagnifyFilter(new ossimNearestNeighborFilter()),
-    theMinifyFilterType(ossimFilterResampler_NEAREST_NEIGHBOR),
-    theMagnifyFilterType(ossimFilterResampler_NEAREST_NEIGHBOR),
-    theScaleFactor(1.0, 1.0),
-    theInverseScaleFactor(1.0, 1.0),
-    theBlurFactor(1.0)
-{
-   setScaleFactor(ossimDpt(1.0, 1.0));
-   loadState(ossimPreferences::instance()->preferencesKWL(),"resampler.");
-
-}
-
-ossimFilterResampler::~ossimFilterResampler()
-{
-   if(theMinifyFilter)
-   {
-      delete theMinifyFilter;
-      theMinifyFilter = NULL;
-   }
-   if(theMagnifyFilter)
-   {
-      delete theMagnifyFilter;
-      theMagnifyFilter = NULL;
-   }
-}
-
-
-void ossimFilterResampler::resample(const ossimRefPtr<ossimImageData>& input,
-				    ossimRefPtr<ossimImageData>& output,
-				    const ossimDpt& ul,
-				    const ossimDpt& ur,
-				    const ossimDpt& deltaUl,
-				    const ossimDpt& deltaUr,
-				    const ossimDpt& length)
-{
-   resample(input,
-            output,
-            output->getImageRectangle(),
-            ul,
-            ur,
-            deltaUl,
-            deltaUr,
-            length);
-}
-
-void ossimFilterResampler::resample(const ossimRefPtr<ossimImageData>& input,
-				    ossimRefPtr<ossimImageData>& output,
-				    const ossimIrect& outputSubRect,
-				    const ossimDpt& ul,
-				    const ossimDpt& ur,
-				    const ossimDpt& deltaUl,
-				    const ossimDpt& deltaUr,
-				    const ossimDpt& length)
-{
-   if(!input.valid()   ||
-      !output.valid()  ||
-      !input->getBuf() ||
-      !output->getBuf())
-   {
-      return;
-   }
-   
-   ossimScalarType scalarType = input->getScalarType();
-   switch(scalarType)
-   {
-      case OSSIM_UINT8:
-      {
-         resampleBilinearTile(ossim_uint8(0), // dummy template variable
-			      input,
-			      output,
-			      outputSubRect,
-			      ul,
-			      ur,
-			      deltaUl,
-			      deltaUr,
-			      length);
-         break;
-      }
-      case OSSIM_SINT8:
-      {
-         resampleBilinearTile(ossim_sint8(0), // dummy template variable
-			      input,
-			      output,
-			      outputSubRect,
-			      ul,
-			      ur,
-			      deltaUl,
-			      deltaUr,
-			      length);
-         break;
-      }
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-      {
-	 resampleBilinearTile(ossim_uint16(0), // dummy template variable
-			      input,
-			      output,
-			      outputSubRect,
-			      ul,
-			      ur,
-			      deltaUl,
-			      deltaUr,
-			      length);
-	 break;
-      }
-      case OSSIM_SINT16:
-      {
-	 resampleBilinearTile(ossim_sint16(0), // dummy template variable
-			      input,
-			      output,
-			      outputSubRect,
-			      ul,
-			      ur,
-			      deltaUl,
-			      deltaUr,
-			      length);
-	 break;
-      }      
-      case OSSIM_UINT32:
-      {
-	 resampleBilinearTile(ossim_uint32(0), // dummy template variable
-			      input,
-			      output,
-			      outputSubRect,
-			      ul,
-			      ur,
-			      deltaUl,
-			      deltaUr,
-			      length);
-	 break;
-      }      
-      case OSSIM_SINT32:
-      {
-	 resampleBilinearTile(ossim_sint32(0), // dummy template variable
-			      input,
-			      output,
-			      outputSubRect,
-			      ul,
-			      ur,
-			      deltaUl,
-			      deltaUr,
-			      length);
-	 break;
-      }      
-      case OSSIM_FLOAT32:
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-	 resampleBilinearTile(ossim_float32(0.0), // dummy template variable
-			      input,
-			      output,
-			      outputSubRect,
-			      ul,
-               ur,
-			      deltaUl,
-			      deltaUr,
-			      length);
-	 break;
-      }
-      case OSSIM_FLOAT64:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-	 resampleBilinearTile(ossim_float64(0.0), // dummy template variable
-			      input,
-			      output,
-			      outputSubRect,
-			      ul,
-			      ur,
-			      deltaUl,
-			      deltaUr,
-			      length);
-         break;
-      }
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimFilterResampler::resample error: unknown scalar type:  "
-            << scalarType << endl;
-      }
-   }
-}
-
-
-ossimFilter* ossimFilterResampler::createNewFilter(
-   ossimFilterResamplerType filterType,
-   ossimFilterResamplerType& result)
-{
-   switch(filterType)
-   {
-      case ossimFilterResampler_NEAREST_NEIGHBOR:
-      {
-         return new ossimNearestNeighborFilter();
-      }
-      case ossimFilterResampler_BOX:
-      {
-         return new ossimBoxFilter();
-      }
-      case ossimFilterResampler_GAUSSIAN:
-      {
-         return new ossimGaussianFilter();
-      }
-      case ossimFilterResampler_CUBIC:
-      {
-         return new ossimCubicFilter();
-      }
-      case ossimFilterResampler_HANNING:
-      {
-         return new ossimHanningFilter();
-      }
-      case ossimFilterResampler_HAMMING:
-      {
-         return new ossimHammingFilter();
-      }
-      case ossimFilterResampler_LANCZOS:
-      {
-         return new ossimLanczosFilter();
-      }
-      case ossimFilterResampler_CATROM:
-      {
-         return new ossimCatromFilter();
-      }
-      case ossimFilterResampler_MITCHELL:
-      {
-         return new ossimMitchellFilter();
-      }
-      case ossimFilterResampler_BLACKMAN:
-      {
-         return new ossimBlackmanFilter();
-      }
-      case ossimFilterResampler_BLACKMAN_SINC:
-      {
-         return new ossimBlackmanSincFilter();
-      }
-      case ossimFilterResampler_BLACKMAN_BESSEL:
-      {
-         return new ossimBlackmanBesselFilter();
-      }
-      case ossimFilterResampler_QUADRATIC:
-      {
-         return new ossimQuadraticFilter();
-      }
-      case ossimFilterResampler_TRIANGLE:
-      {
-         return new ossimTriangleFilter();
-      }
-      case ossimFilterResampler_HERMITE:
-      {
-         return new ossimHermiteFilter();
-      }
-      case ossimFilterResampler_BELL:
-      {
-         return new ossimGaussianFilter();
-      }
-      case ossimFilterResampler_BSPLINE:
-      {
-         return new ossimBSplineFilter();
-      }
-   }
-
-   result = ossimFilterResampler_NEAREST_NEIGHBOR;
-   return new ossimNearestNeighborFilter();
-}
-
-void ossimFilterResampler::setScaleFactor(const ossimDpt& scale)
-{
-   theScaleFactor = scale;
-   if(fabs(theScaleFactor.x) <= FLT_EPSILON)
-   {
-      theScaleFactor.x = 1.0;
-   }
-   if(fabs(theScaleFactor.y) <= FLT_EPSILON)
-   {
-      theScaleFactor.y = 1.0;
-   }
-
-   theInverseScaleFactor.x = 1.0/theScaleFactor.x;
-   theInverseScaleFactor.y = 1.0/theScaleFactor.y;
-}
-
-template <class T> void ossimFilterResampler::resampleBilinearTile(
-   T /* dummy */,
-   const ossimRefPtr<ossimImageData>& input,
-   ossimRefPtr<ossimImageData>& output,
-   const ossimIrect& outputSubRect,
-   const ossimDpt& inputUl,
-   const ossimDpt& inputUr,
-   const ossimDpt& deltaUl,
-   const ossimDpt& deltaUr,
-   const ossimDpt& outLength)
-{
-#if 0 /* Please leave for debug. */
-   std::cout << "INPUT  = \n" << *input << std::endl
-             << "OUTPUT = \n" << *output << std::endl
-             << "inputUL= " << inputUl << std::endl
-             << "inputUR= " << inputUr << std::endl
-             << "deltaUL= " << deltaUl << std::endl
-             << "deltaUr= " << deltaUr << std::endl
-             << "outlength= " << outLength << std::endl;
-#endif
-   
-   ossim_uint32  band, centerOffset;
-   ossim_float64 tmpFlt64, stepSizeWidth;
-
-   if(outLength.x>1) {
-      stepSizeWidth  = 1.0/(outLength.x-1.0);
-   } else {
-      stepSizeWidth   = 1.0;
-   }
-
-   // INPUT INFORMATION
-   ossim_uint32       inWidth      = input->getWidth();
-   ossim_uint32       inBandSize   = input->getSizePerBand();  // fix for out-of-bounds check OLK 06/2005
-   ossim_uint32       BANDS        = input->getNumberOfBands();
-   ossimIrect         inputRect    = input->getImageRectangle();
-
-   // OUTPUT INFORMATION
-   const ossim_float64* NULL_PIX      = output->getNullPix(); 
-   const ossim_float64* MIN_PIX       = output->getMinPix(); 
-   const ossim_float64* MAX_PIX       = output->getMaxPix(); 
-   ossimIrect           outputRect    = output->getImageRectangle();
-   ossim_uint32         resultRectH   = outputSubRect.height();
-   ossim_uint32         resultRectW   = outputSubRect.width();
-   ossim_uint32         outputRectW   = outputRect.width();
-
-   // calculate the offset into the data so we can refer to it at 0 index.
-   ossim_uint32 resultOffset=(outputSubRect.ul().y - outputRect.ul().y)*outputRectW +
-                             (outputSubRect.ul().x - outputRect.ul().x);
-
-   // make a local copy of the band pointers (at resultOffset)
-   ossim_float64 *densityvals=new ossim_float64[BANDS];
-   ossim_float64 *pixelvals=new ossim_float64[BANDS];
-   const T* *inputBuf  = new const T*[BANDS];
-   T* *resultBuf = new T*[BANDS];
-   if(!pixelvals||!inputBuf||!resultBuf)
-   {
-      return;
-   }
-   
-   for(band = 0; band < BANDS; ++band)
-   {
-      inputBuf[band] = static_cast<const T*>(input->getBuf(band));
-      resultBuf[band] = static_cast<T*>(output->getBuf(band))+resultOffset;
-   }
-
-   // FILTER INFORMAION
-   ossim_uint32 xkernel_width  = theFilterTable.getWidth();;
-   ossim_uint32 ykernel_height = theFilterTable.getHeight();
-   double xkernel_half_width   = theFilterTable.getXSupport();
-   double ykernel_half_height  = theFilterTable.getYSupport();
-
-   double initialx  = inputUl.x-inputRect.ul().x;
-   double initialy  = inputUl.y-inputRect.ul().y;
-   double terminalx = inputUr.x-inputRect.ul().x;
-   double terminaly = inputUr.y-inputRect.ul().y;
-   double pointx,pointy,deltaX,deltaY;
-   ossim_int32 starty,startx; 
-
-   if(xkernel_width==0 || ykernel_height==0)
-   {
-      // USING NEAREST NEIGHBOR
-      for(ossim_uint32 resultY = 0; resultY < resultRectH; ++resultY)
-      {
-//          deltaX = (terminalx-initialx) * stepSizeWidth;
-//          deltaY = (terminaly-initialy) * stepSizeHeight;
-         // this should be stepsize width for both since we are traversing horizontal
-         deltaX = (terminalx-initialx) * stepSizeWidth;
-         deltaY = (terminaly-initialy) * stepSizeWidth;
-         pointx = initialx;
-         pointy = initialy;
-         for(ossim_uint32 resultX = 0; resultX < resultRectW; ++resultX)
-         {
-            // just sample center in input space.
-            centerOffset = ossim::round<int>(pointy)*inWidth + ossim::round<int>(pointx);
-            for(band=0;band<BANDS;++band)
-            {
-               resultBuf[band][resultX] = inputBuf[band][centerOffset];
-            }
-            pointy += deltaY;
-            pointx += deltaX;
-         } // End of loop in x direction.
-         
-         // increment pointers to where we are now.
-         for(band=0;band<BANDS;++band)
-         {
-            resultBuf[band] += outputRectW;
-         }
-         initialx += deltaUl.x;
-         initialy += deltaUl.y;
-         terminalx  += deltaUr.x;
-         terminaly  += deltaUr.y;
-      } // End of loop in y direction.
-      
-   }
-   else
-   {
-      // USING A KERNEL
-      const double* kernel;
-      ossim_uint32 iy,ix,sourceIndex,nullCount;
-      for(ossim_uint32 resultY = 0; resultY < resultRectH; ++resultY)
-      {
-         deltaX = (terminalx-initialx) * stepSizeWidth;
-         deltaY = (terminaly-initialy) * stepSizeWidth;
-         pointx = initialx;
-         pointy = initialy;
-         for(ossim_uint32 resultX = 0; resultX < resultRectW; ++resultX)
-         {
-            starty  = ossim::round<int>(pointy - ykernel_half_height + .5);
-            startx  = ossim::round<int>(pointx - xkernel_half_width + .5);
-            centerOffset = ossim::round<int>(pointy)*inWidth + ossim::round<int>(pointx);
-            sourceIndex = starty*inWidth+startx;
-
-            // look at center pixel, make sure they aren't all null.
-            nullCount=0;
-            if(centerOffset<inBandSize)
-            {
-               for (band=0;band<BANDS;++band)
-               {
-                  if(inputBuf[band][centerOffset]==static_cast<T>(NULL_PIX[band]))
-                  {
-                     ++nullCount;
-                  }
-               }
-               // the center of the kernel is outside the input space, just set null.
-            }
-            else
-            {
-               nullCount=BANDS;
-            }
-
-            // make sure we have non-null data and we fit within the inputBuf.
-            if ( nullCount==BANDS || (sourceIndex>=inBandSize))
-            {
-               // we don't need to continue, just assign null!
-               for (band=0;band<BANDS;++band)
-               {
-                  resultBuf[band][resultX] = static_cast<T>(NULL_PIX[band]);
-               }
-            }
-            else
-            {  
-               kernel = theFilterTable.getClosestWeights(pointx,pointy);
-               if(kernel)
-               {
-                  // reset the pixel/density sums for each band to zero.
-                  memset(densityvals,'\0',sizeof(ossim_float64)*BANDS);
-                  memset(pixelvals,'\0',sizeof(ossim_float64)*BANDS);
-
-                  // apply kernel to input space.
-                  for (iy=0;((iy<ykernel_height)&&(sourceIndex<inBandSize));++iy)
-                  {
-                     for (ix = 0;((ix<xkernel_width)&&(sourceIndex<inBandSize));++ix)
-                     {
-                        tmpFlt64=*kernel; // pixel weight;
-                        for(band=0;band<BANDS;++band)
-                        {
-                           if(inputBuf[band][sourceIndex]!=NULL_PIX[band])
-                           {
-                              densityvals[band] += tmpFlt64;
-                              pixelvals[band] += (inputBuf[band][sourceIndex]*tmpFlt64);
-                           }
-                        }
-                        ++sourceIndex;
-                        ++kernel;
-                        if(sourceIndex>=inBandSize)
-                        {
-                           break;
-                        }
-                     }
-                     sourceIndex+=(inWidth-xkernel_width);
-                  }
-
-                  // actually assign the value to the output
-                  for (band = 0; band < BANDS; ++band)
-                  {
-                     if(densityvals[band]<=FLT_EPSILON)
-                     {
-                        //---
-                        // Setting tempFlt64 to pixelvals[band] causing 0's where -32768
-                        // should be when null check was skipped above.
-                        // tmpFlt64 = pixelvals[band];
-                        //---
-                        tmpFlt64 = NULL_PIX[band];
-                     }
-                     else
-                     {
-                        // normalize
-                        tmpFlt64 = pixelvals[band]/densityvals[band];
-                     }
-                     
-                     // clamp
-                     tmpFlt64 = (tmpFlt64>=MIN_PIX[band]?(tmpFlt64<MAX_PIX[band]?tmpFlt64:MAX_PIX[band]):MIN_PIX[band]); 
-                     // set resultant pixel value.
-                     resultBuf[band][resultX] = static_cast<T>(tmpFlt64);
-                  }
-
-                  // we didn't get a filter kernel, just set NULL in this disaster.
-               }
-               else
-               {
-                  for (band=0;band<BANDS;++band)
-                  {
-                     resultBuf[band][resultX] = static_cast<T>(NULL_PIX[band]);
-                  }
-               }                  
-            }
-            pointy += deltaY;
-            pointx += deltaX;
-         } // End of loop in x direction.
-
-         // increment pointers to where we are now.
-         for(band=0;band<BANDS;++band)
-         {
-            resultBuf[band] += outputRectW;
-         }
-         initialx += deltaUl.x;
-         initialy += deltaUl.y;
-         terminalx  += deltaUr.x;
-         terminaly  += deltaUr.y;
-      } // End of loop in y direction.
-   } // USING A KERNEL END
-
-   delete [] densityvals;
-   delete [] pixelvals;
-   delete [] resultBuf;
-   delete [] inputBuf;
-}
-
-ossimString ossimFilterResampler::getFilterTypeAsString(ossimFilterResamplerType type)const
-{
-   switch(type)
-   {
-      case ossimFilterResampler_NEAREST_NEIGHBOR:
-      {
-         return "nearest neighbor";
-      }
-      case ossimFilterResampler_BOX:
-      {
-         return "box";
-      }
-      case ossimFilterResampler_GAUSSIAN:
-      {
-         return "gaussian";
-      }
-      case ossimFilterResampler_CUBIC:
-      {
-         return "cubic";
-      }
-      case ossimFilterResampler_HANNING:
-      {
-         return "hanning";
-      }
-      case ossimFilterResampler_HAMMING:
-      {
-         return "hamming";
-      }
-      case ossimFilterResampler_LANCZOS:
-      {
-         return "lanczos";
-      }
-      case ossimFilterResampler_MITCHELL:
-      {
-         return "mitchell";
-      }
-      case ossimFilterResampler_CATROM:
-      {
-         return "catrom";
-      }
-      case ossimFilterResampler_BLACKMAN:
-      {
-         return "blackman";
-      }
-      case ossimFilterResampler_BLACKMAN_SINC:
-      {
-         return "sinc";
-      }
-      case ossimFilterResampler_BLACKMAN_BESSEL:
-      {
-         return "bessel";
-      }
-      case ossimFilterResampler_QUADRATIC:
-      {
-         return "quadratic";
-      }
-      case ossimFilterResampler_TRIANGLE:
-      {
-         return "bilinear";
-      }
-      case ossimFilterResampler_HERMITE:
-      {
-         return "hermite";
-      }
-      case ossimFilterResampler_BELL:
-      {
-         return "gaussian";
-      }
-      case ossimFilterResampler_BSPLINE:
-      {
-         return "bspline";
-      }
-   }
-
-   return "nearest neighbor";
-}
-
-void ossimFilterResampler::getFilterTypes(std::vector<ossimString>& filterTypes)const
-{
-  filterTypes.push_back("nearest neighbor");
-  filterTypes.push_back("bilinear");
-  filterTypes.push_back("cubic");
-//  filterTypes.push_back("bell");
-  filterTypes.push_back("bessel");
-  filterTypes.push_back("blackman");
-  filterTypes.push_back("box");
-  filterTypes.push_back("bspline");
-  filterTypes.push_back("catrom");
-  filterTypes.push_back("gaussian");
-  filterTypes.push_back("hanning");
-  filterTypes.push_back("hamming");
-  filterTypes.push_back("hermite");
-  filterTypes.push_back("lanczos");
-  filterTypes.push_back("mitchell");
-  filterTypes.push_back("quadratic");
-  filterTypes.push_back("sinc");
-}
-
-
-ossimFilterResampler::ossimFilterResamplerType ossimFilterResampler::getFilterType(const ossimString& type)const
-{
-   ossimString typeUpper = type;
-   typeUpper = typeUpper.upcase();
-
-   if(typeUpper.contains("BOX"))
-   {
-      return ossimFilterResampler_BOX;
-   }
-   else if(typeUpper.contains("NEAREST"))
-   {
-      return ossimFilterResampler_NEAREST_NEIGHBOR;
-   }
-   else if(typeUpper.contains("GAUSSIAN"))
-   {
-      return ossimFilterResampler_GAUSSIAN;
-   }
-   else if(typeUpper.contains("HANNING"))
-   {
-      return ossimFilterResampler_HANNING;
-   }
-   else if(typeUpper.contains("HAMMING"))
-   {
-      return ossimFilterResampler_HAMMING;
-   }
-   else if(typeUpper.contains("LANCZOS"))
-   {
-      return ossimFilterResampler_LANCZOS;
-   }
-   else if(typeUpper.contains("MITCHELL"))
-   {
-      return ossimFilterResampler_MITCHELL;
-   }
-   else if(typeUpper.contains("CATROM"))
-   {
-      return ossimFilterResampler_CATROM;
-   }
-   else if(typeUpper.contains("CUBIC"))
-   {
-      return ossimFilterResampler_CUBIC;
-   }
-   else if(typeUpper.contains("BESSEL"))
-   {
-      return ossimFilterResampler_BLACKMAN_BESSEL;
-   }
-   else if(typeUpper.contains("SINC"))
-   {
-      return ossimFilterResampler_BLACKMAN_SINC;
-   }
-   else if(typeUpper.contains("BLACKMAN"))
-   {
-      return ossimFilterResampler_BLACKMAN;
-   }
-   else if(typeUpper.contains("QUADRATIC"))
-   {
-      return ossimFilterResampler_QUADRATIC;
-   }
-   else if(typeUpper.contains("TRIANGLE"))
-   {
-      return ossimFilterResampler_TRIANGLE;
-   }
-   else if(typeUpper.contains("BILINEAR"))
-   {
-      return ossimFilterResampler_TRIANGLE;
-   }
-   else if(typeUpper.contains("HERMITE"))
-   {
-      return ossimFilterResampler_HERMITE;
-   }
-//    else if(typeUpper.contains("BELL"))
-//    {
-//       return ossimFilterResampler_BELL;
-//    }
-   else if(typeUpper.contains("BSPLINE"))
-   {
-      return ossimFilterResampler_BSPLINE;
-   }
-   
-   return ossimFilterResampler_NEAREST_NEIGHBOR;
-}
-
-void ossimFilterResampler::getKernelSupport(double& x, double& y)const
-{
-   const ossimFilter* horizontalFilter = getHorizontalFilter();
-   const ossimFilter* verticalFilter   = getVerticalFilter();
-
-   if(!horizontalFilter)
-   {
-      x = 0.0;
-   }
-   else
-   {
-//       x = theBlurFactor*ossim::max(1.0/theScaleFactor.x, 1.0)*
-//           horizontalFilter->getSupport();
-      x = horizontalFilter->getSupport();
-   }
-
-   if(!verticalFilter)
-   {
-      y = 0.0;
-   }
-   else
-   {
-//       y = theBlurFactor*ossim::max(1.0/theScaleFactor.y, 1.0)*
-//           verticalFilter->getSupport();
-      y = verticalFilter->getSupport();
-   }
-}
-
-const ossimFilter* ossimFilterResampler::getHorizontalFilter()const
-{
-   if(theScaleFactor.x < 1)
-   {
-      return theMinifyFilter;
-   }
-
-   return theMagnifyFilter;
-}
-
-const ossimFilter* ossimFilterResampler::getVerticalFilter()const
-{
-   if(theScaleFactor.y < 1)
-   {
-      return theMinifyFilter;
-   }
-
-   return theMagnifyFilter;
-}
-
-void ossimFilterResampler::setFilterType(const ossimString& type)
-{
-   setFilterType(type, type);
-}
-
-void ossimFilterResampler::setFilterType(ossimFilterResamplerType filterType)
-{
-   setFilterType(filterType, filterType);
-}
-void ossimFilterResampler::setFilterType(const ossimString& minifyType,
-                                         const ossimString& magnifyType)
-{
-   setFilterType(getFilterType(minifyType),
-                 getFilterType(magnifyType));
-}
-
-void ossimFilterResampler::setMinifyFilterType(const ossimString& minifyType)
-{
-   setMinifyFilterType(getFilterType(minifyType));
-}
-
-void ossimFilterResampler::setMagnifyFilterType(const ossimString& magnifyType)
-{
-   setMagnifyFilterType(getFilterType(magnifyType));
-}
-
-void ossimFilterResampler::setMinifyFilterType(ossimFilterResamplerType filterType)
-{
-   setFilterType(filterType,
-                 theMagnifyFilterType);
-}
-
-void ossimFilterResampler::setMagnifyFilterType(ossimFilterResamplerType filterType)
-{
-   setFilterType(theMinifyFilterType,filterType);
-}
-
-ossimString ossimFilterResampler::getMinifyFilterTypeAsString()const
-{
-   return getFilterTypeAsString(theMinifyFilterType);
-}
-
-ossimString ossimFilterResampler::getMagnifyFilterTypeAsString()const
-{
-   return getFilterTypeAsString(theMagnifyFilterType);
-}
-
-void ossimFilterResampler::setFilterType(
-   ossimFilterResamplerType minifyFilterType,
-   ossimFilterResamplerType magnifyFilterType)
-{
-   if(theMinifyFilter)
-   {
-      delete theMinifyFilter;
-      theMinifyFilter = NULL;
-   }
-   if(theMagnifyFilter)
-   {
-      delete theMagnifyFilter;
-      theMagnifyFilter = NULL;
-   }
-   
-   theMinifyFilterType  = minifyFilterType;
-   theMagnifyFilterType = magnifyFilterType;
-   
-   theMinifyFilter  = createNewFilter(minifyFilterType, theMinifyFilterType);
-   theMagnifyFilter = createNewFilter(magnifyFilterType, theMagnifyFilterType);
-   computeTable();
-}
-
-ossim_float64 ossimFilterResampler::getBlurFactor()const
-{
-   return theBlurFactor;
-}
-
-void ossimFilterResampler::setBlurFactor(ossim_float64 blur)
-{
-   theBlurFactor = blur;
-}
-
-bool ossimFilterResampler::saveState(ossimKeywordlist& kwl,
-                                     const char* prefix)const
-{
-   kwl.add(prefix,
-           ossimKeywordNames::SCALE_X_KW,
-           theScaleFactor.x,
-           true);
-   kwl.add(prefix,
-           ossimKeywordNames::SCALE_Y_KW,
-           theScaleFactor.y,
-           true);
-   kwl.add(prefix,
-           "minify_type",
-           getFilterTypeAsString(theMinifyFilterType),
-           true);
-   kwl.add(prefix,
-           "magnify_type",
-           getFilterTypeAsString(theMagnifyFilterType),
-           true);
-
-   return true;
-}
-
-bool ossimFilterResampler::loadState(const ossimKeywordlist& kwl,
-                                     const char* prefix)
-{
-   const char* lookup = 0;
-
-   lookup = kwl.find(prefix, ossimKeywordNames::SCALE_X_KW);
-   if (lookup)
-   {
-      theScaleFactor.x = ossimString(lookup).toDouble();
-   }
-
-   lookup = kwl.find(prefix, ossimKeywordNames::SCALE_Y_KW);
-   if (lookup)
-   {
-      theScaleFactor.y = ossimString(lookup).toDouble();
-   }
-
-   ossimString minify;
-   lookup = kwl.find(prefix, "minify_type");
-   if (lookup)
-   {
-      minify = lookup;
-   }
-
-   ossimString magnify;
-   lookup = kwl.find(prefix, "magnify_type");
-   if (lookup)
-   {
-      magnify = lookup;
-   }
-
-   if(fabs(theScaleFactor.x) <= FLT_EPSILON)
-   {
-      theScaleFactor.x = 1.0;
-   }
-   if(fabs(theScaleFactor.y) <= FLT_EPSILON)
-   {
-      theScaleFactor.y = 1.0;
-   }
-
-   theInverseScaleFactor.x = 1.0/theScaleFactor.x;
-   theInverseScaleFactor.y = 1.0/theScaleFactor.y;
-   
-   setFilterType(getFilterType(minify),
-                 getFilterType(magnify));
-
-   return true;
-}
-
-void ossimFilterResampler::computeTable()
-{
-  theFilterTable.buildTable(32, *theMagnifyFilter);
-}
-
diff --git a/src/ossim/imaging/ossimFilterTable.cpp b/src/ossim/imaging/ossimFilterTable.cpp
deleted file mode 100644
index ea63bd9..0000000
--- a/src/ossim/imaging/ossimFilterTable.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimFilterTable.cpp 9094 2006-06-13 19:12:40Z dburken $
-#include <iostream>
-#include <ossim/imaging/ossimFilterTable.h>
-#include <ossim/imaging/ossimFilter.h>
-
-ossimFilterTable::ossimFilterTable()
-   :theWeights(0),
-    theWidth(0),
-    theHeight(0),
-    theWidthHeight(0),
-    theXSupport(0),
-    theYSupport(0),
-    theFilterSteps(0)
-{
-   
-}
-
-ossimFilterTable::~ossimFilterTable()
-{
-   if(theWeights)
-   {
-      delete [] theWeights;
-      theWeights = 0;
-   }
-}
-
-void ossimFilterTable::buildTable(ossim_uint32  filterSteps,
-                                  const ossimFilter& filter)
-{
-   buildTable(filterSteps, filter, filter);
-}
-
-void ossimFilterTable::buildTable(ossim_uint32  filterSteps,
-                                  const ossimFilter& xFilter,
-                                  const ossimFilter& yFilter)
-{
-   ossim_int32 subpixelSample=0;
-   ossim_int32 subpixelLine=0;
-   double dx   = 0.0;
-   double dy   = 0.0;
-   double kernelH   = 0.0;
-   double kernelV   = 0.0;
-   double x = 0;
-   double y = 0;
-
-   double xsupport = ceil(xFilter.getSupport());
-   double ysupport = ceil(yFilter.getSupport());
-   double left    = 0;
-   double right   = 0;
-   double top     = 0;
-   double bottom  = 0;
-
-   theXSupport = (ossim_uint32)xsupport;
-   theYSupport = (ossim_uint32)ysupport;
-   theFilterSteps = filterSteps;
-   theWidth  = (2*theXSupport);
-   theHeight = (2*theYSupport);
-   theWidthHeight = theWidth*theHeight;
-   
-   allocateWeights();
-   left   = -(xsupport-1);
-   right  = xsupport;
-   top    = -(ysupport-1);
-   bottom = ysupport;
-   ossim_uint32 idx = 0;
-      
-   for (subpixelLine = 0; subpixelLine < (int)filterSteps; 
-        subpixelLine++)
-   {
-     
-     // Calculate subpixel sample step.
-     // ---------------------------------- 
-     dy = subpixelLine / (double)(filterSteps);
-     for (subpixelSample = 0; subpixelSample < (int)filterSteps; 
-	  subpixelSample++)
-       {
-      
-	 // Calculate subpixel sample step.
-	 // ---------------------------------- 
-	 dx = subpixelSample / (double)(filterSteps);
-	 
-	 for (kernelV=top; kernelV<=bottom;
-	      kernelV++)
-	   {
-	     y = kernelV - dy;
-	     double tempWeight = yFilter.filter(y, yFilter.getSupport());
-	     for(kernelH=left; kernelH<=right;++kernelH)
-	       {
-		 x = kernelH - dx;
-         
-		 // Get the weight for the current pixel.
-		 //   ----------------------------------------
-		 theWeights[idx] = tempWeight*xFilter.filter(x, xFilter.getSupport());
-		 ++idx;
-	       }
-	   }
-       }
-   }
-}
-
-ossim_uint32 ossimFilterTable::getWidthByHeight()const
-{
-   return theWidthHeight;
-}
-
-ossim_uint32 ossimFilterTable::getXSupport()const
-{
-   return theXSupport;
-}
-
-ossim_uint32 ossimFilterTable::getYSupport()const
-{
-   return theYSupport;
-}
-
-ossim_uint32 ossimFilterTable::getWidth()const
-{
-   return theWidth;
-}
-
-ossim_uint32 ossimFilterTable::getHeight()const
-{
-   return theHeight;
-}
-
-void ossimFilterTable::allocateWeights()
-{
-   if(theWeights)
-   {
-      delete [] theWeights;
-      theWeights = 0;
-   }
-
-   ossim_uint32 size = (theWidthHeight*(theFilterSteps*theFilterSteps));
-
-   if(size)
-   {
-      theWeights = new double[size];
-   }
-}
diff --git a/src/ossim/imaging/ossimGammaRemapper.cpp b/src/ossim/imaging/ossimGammaRemapper.cpp
deleted file mode 100644
index 5fe987d..0000000
--- a/src/ossim/imaging/ossimGammaRemapper.cpp
+++ /dev/null
@@ -1,434 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2002 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Kathy Minear
-//
-// Description: Takes in DNs for any number of bands
-// Converts DNs to Radiance at the satellite values Lsat
-// Converts Lsat to Surface Reflectance values
-//
-//*************************************************************************
-// $Id: ossimGammaRemapper.cpp 12980 2008-06-04 00:50:33Z dburken $
-
-#include <cstdlib>
-#include <cmath>
-
-#include <ossim/imaging/ossimGammaRemapper.h>
-#include <ossim/imaging/ossimAtCorrKeywords.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimMultiBandHistogram.h>
-#include <ossim/base/ossimHistogram.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-
-
-RTTI_DEF1(ossimGammaRemapper, "ossimGammaRemapper", ossimImageSourceFilter)
-
-static const double DEFAULT_GAMMA = 1.0;
-
-
-static ossimTrace traceDebug("ossimGammaRemapper:debug");
-
-ossimGammaRemapper::ossimGammaRemapper(ossimObject* owner)
-   :
-      ossimImageSourceFilter  (owner),  // base class
-      theTile                 (NULL),
-      theBuffer               (NULL), 
-      theMinPixelValue        (0),
-      theMaxPixelValue        (0),
-      theGamma                (0),
-      theUserDisabledFlag     (false)
-{
-   //***
-   // Set the base class "theEnableFlag" to off since no adjustments have been
-   // made yet.
-   //***
-   disableSource();
-
-   // Construction not complete.
-}
-
-
-ossimGammaRemapper::ossimGammaRemapper(ossimImageSource* inputSource)
-   :
-      ossimImageSourceFilter  (NULL, inputSource),  // base class
-      theTile                 (NULL),
-      theBuffer               (NULL),
-      theMinPixelValue        (0),
-      theMaxPixelValue        (0),
-      theGamma                (0),
-      theUserDisabledFlag     (false)
-{
-   //***
-   // Set the base class "theEnableFlag" to off since no adjustments have been
-   // made yet.
-   //***
-   disableSource();
-
-   if (inputSource == NULL)
-   {
-      setErrorStatus();
-      cerr << "ossimGammaRemapper::ossimGammaRemapper ERROR:"
-           << "\nNull input source passed to constructor!" << endl;
-      return;
-   }
-
-   initialize();
-}
-
-
-ossimGammaRemapper::ossimGammaRemapper(ossimObject* owner,
-                                         ossimImageSource* inputSource)
-   :
-      ossimImageSourceFilter  (owner, inputSource),  // base class     
-      theTile                 (NULL),
-      theBuffer               (NULL),
-      theMinPixelValue        (0),
-      theMaxPixelValue        (0),
-      theGamma                (0)
-{
-   //***
-   // Set the base class "theEnableFlag" to off since no adjustments have been
-   // made yet.
-   //***
-   disableSource();
-
-   if (inputSource == NULL)
-   {
-      setErrorStatus();
-      cerr << "ossimGammaRemapper::ossimGammaRemapper ERROR:"
-           << "\nNull input source passed to constructor!" << endl;
-      return;
-   }
-
-   initialize();
-}
-
-ossimGammaRemapper::~ossimGammaRemapper()
-{
-   if (theBuffer)
-   {
-      delete [] theBuffer;
-      theBuffer = NULL;
-   }
-}
-
-ossimRefPtr<ossimImageData> ossimGammaRemapper::getTile(const ossimIrect& tile_rect,
-                                            ossim_uint32 resLevel)
-{
-   if (!isInitialized())
-   {
-      cerr << "ossimGammaRemapper::getTile ERROR:"
-           << "\nNot initialized!"
-           << endl;
-      return ossimRefPtr<ossimImageData>();
-   }
-      
-   // Fetch tile from pointer from the input source.
-   ossimRefPtr<ossimImageData> inputTile = theInputConnection->getTile(
-      tile_rect, resLevel);
-
-   if (!inputTile.valid())  // Just in case...
-   {
-      cerr << "ossimGammaRemapper::getTile ERROR:"
-           << "\nReceived null pointer to tile from input source!"
-           << "\nReturning blank tile."
-           << endl;
-      theTile->makeBlank();
-      return theTile;
-   }
-
-   // Get its status.
-   ossimDataObjectStatus tile_status = inputTile->getDataObjectStatus();
-   
-   //---
-   // Check for remap bypass:
-   //---
-   if (!theEnableFlag || tile_status == OSSIM_NULL ||!theTile.valid() ||
-       tile_status == OSSIM_EMPTY)
-   {
-      return inputTile;
-   }
-
-   ossim_uint32 w     = tile_rect.width();
-   ossim_uint32 h     = tile_rect.height();
-   ossim_uint32 tw    = theTile->getWidth();
-   ossim_uint32 th    = theTile->getHeight();
-   ossim_uint32 bands = theTile->getNumberOfBands();
-
-   // Set the origin of the output tile.
-   theTile->setOrigin(tile_rect.ul());
-
-   if(w*h != tw*th)
-   {
-      theTile->setWidthHeight(w, h);
-      theTile->initialize();
-      if(theBuffer)
-      {
-         delete [] theBuffer;
-         theBuffer = NULL;
-      }
-   }   
-   
-   if(!theBuffer)
-   {
-      theBuffer = new double[w*h*bands];
-   }
-   
-   // Copy the source tile into the buffer at the same time normalizing it.
-   inputTile->copyTileToNormalizedBuffer(theBuffer);
-   
-   // for each band, get the radiance value
-
-   ossim_uint32 buffer_index = 0;
-   const double MP = theTile->getMinNormalizedPix(); // Minimum normalized pix.
-   const ossim_uint32 PPTB = theTile->getSizePerBand();  // Pixels Per Tile Band
-
-   for (ossim_uint32 band=0; band<bands; ++band)
-   {
-      for (ossim_uint32 i=0; i<PPTB; ++i)
-      {
-         double p = theBuffer[buffer_index]; // input pixel
-         // double p = getPix(buffer_index);
-
-         if (p)
-         {
-            // cout<<"p before:  "<<p<<endl;
-            // Stretch it...
-            p = (p - theMinPixelValue[band]) /
-               (theMaxPixelValue[band] -
-                theMinPixelValue[band]);
-            
-            p = pow(p, theGamma[band]);
-           
-            
-            //***
-            // Since it wasn't null to start with clip / clamp between minimum
-            // normalized pixel and one(max).
-            //*** 
-            p =  ( p > MP ? ( p < 1.0 ? p : 1.0) : MP );  
-
-            theBuffer[buffer_index] = p;
-         }
-         else
-         {
-            theBuffer[buffer_index] = 0.0;
-         }
-         
-         ++buffer_index;
-      }
-   }
-   
-   // Copy the buffer to the output tile at the same time unnormalizing it.
-   theTile->copyNormalizedBufferToTile(theBuffer);
-   
-   // Set the status to that of the input tile.
-   theTile->setDataObjectStatus(tile_status);
-
-   return theTile;
-}
-
-void ossimGammaRemapper::initialize()
-{
-   if(theInputConnection)
-   {
-      theTile = ossimImageDataFactory::instance()->create(this,
-                                                          theInputConnection);
-      theTile->initialize();
-
-      if(theBuffer)
-      {
-         delete []theBuffer;
-         theBuffer = NULL;
-      }
-      
-      ossim_uint32 tw    = theTile->getWidth();
-      ossim_uint32 th    = theTile->getHeight();
-      ossim_uint32 bands = theTile->getNumberOfBands();
-      
-      theBuffer = new double[tw*th*bands];
-      memset(theBuffer, '\0', tw*th*bands);
-
-      setInitializedFlag(true);
-      clearErrorStatus();
-   }
-   else
-   {
-      setInitializedFlag(false);
-      setErrorStatus();
-      cerr << "ossimGammaRemapper::initialize ERROR:"
-           << "\nCannot call method when input connection is NULL!"
-           << endl;
-   };
-
-   verifyEnabled();
-}
-
-void ossimGammaRemapper::setMinMaxPixelValues(const vector<double>& v_min,
-                                              const vector<double>& v_max)
-{
-   theMinPixelValue = v_min;
-   theMaxPixelValue = v_max;
-   verifyEnabled();
-}
-
-void ossimGammaRemapper::verifyEnabled()
-{
-   // Check all the pointers...
-   if ( !theInputConnection || !theTile || !theBuffer )
-   {
-      disableSource();
-      return;
-   }
-
-   ossim_uint32 bands = theTile->getNumberOfBands();
-   if ( (theMinPixelValue.size() != bands) ||
-        (theMaxPixelValue.size() != bands) )
-   {
-      disableSource(); 
-      return;
-   }
-
-   if (theUserDisabledFlag == false)
-   {
-      enableSource();
-   }
-
-   if (traceDebug())
-   {
-      cout << *this << endl;
-   }
-}
-
-bool ossimGammaRemapper::loadState(const ossimKeywordlist& kwl,
-                                   const char* prefix)
-{
-   //***
-   // Call the base class to pick up the enable flag.  Note that the
-   // verifyEnabled flag can override this.
-   //***
-   ossimString pref;
-   if (prefix) pref += prefix;
-   pref += "gamma_remapper.";
-
-   if (!theTile)
-   {
-      cerr << "ossimGammaRemapper::loadState:  ERROR"
-           << "Not initialized yet!" << endl;
-      return false;
-   }
-
-   //---
-   // NOTE:
-   // base class seems to call initialize which in turn errors if you don't
-   // have a connection yet, so check for the enable keyword here...
-   // ossimSource::loadState(kwl, pref.c_str());
-   //---
-   cout << "pref:  " << pref
-        << "kw:  " << ossimKeywordNames::ENABLED_KW    << endl;
-   
-   const char* lookup = kwl.find(pref, ossimKeywordNames::ENABLED_KW);
-   if(lookup)
-   {
-      theEnableFlag = ossimString(lookup).toBool();
-      if (theEnableFlag == false)
-      {
-         // User want filter disabled...
-         theUserDisabledFlag = true;
-      }
-   }
-
-   ossim_uint32 bands = theTile->getNumberOfBands();
-
-   theGamma.clear();
-   theGamma.resize(bands, 1.0);
-
-   for(ossim_uint32 band = 0; band < bands; ++band)
-   {
-      ossimString band_string = ".band";
-      band_string += ossimString::toString(band+1);  // Start at one.
-
-      ossimString kw = GAMMA_REMAPPER_GAMMA_KW;
-      kw += band_string;
-      lookup = kwl.find(prefix, kw.c_str());
-      if (lookup)
-      {
-         theGamma[band] = atof(lookup);
-      }
-      else
-      {
-         cout << "MODULE NOTICE:"
-              << "\nlookup failed for keyword:  " << kw.c_str()
-              << "\nGamma set to " << DEFAULT_GAMMA << " for band:  "
-              << (band+1) << endl;
-         theGamma[band] = DEFAULT_GAMMA;
-      }
-   }
-
-   if (traceDebug())
-   {
-      cout << "ossimGammaRemapper DEBUG:"
-           << *this
-           << endl;
-   }
-   
-   return true;
-}
-
-ostream& ossimGammaRemapper::print(ostream& os) const
-{
-   os << setprecision(15) << setiosflags(ios::fixed)
-      << "ossimGammaRemapper:"
-      << "\ntheEnableFlag:  " << (theEnableFlag?"enabled":"disabled")
-      << endl;
-
-   ossim_uint32 band = 1;
-   vector<double>::const_iterator i = theMinPixelValue.begin();
-   while (i != theMinPixelValue.end())
-   {
-      os << "band[" << band << "] min:  " << (*i) << endl;
-      ++i;
-      ++band;
-   }
-
-   band = 1;
-   i = theMaxPixelValue.begin();
-   while (i != theMaxPixelValue.end())
-   {
-      os << "band[" << band << "] max:  " << (*i) << endl;
-      ++i;
-      ++band;
-   }
-   
-   band = 1;
-   i = theGamma.begin();
-   while (i != theGamma.end())
-   {
-      os << "band[" << band << "] gamma:  " << (*i) << endl;
-      ++i;
-      ++band;
-   }
-
-   return os;
-}
-
-void ossimGammaRemapper::enableSource()
-{
-   // Clear the flag...
-   theUserDisabledFlag = false;
-   ossimSource::enableSource();
-}
-
-ossimString ossimGammaRemapper::getShortName() const
-{
-   return ossimString("Gamma Remapper");
-}
-
-ostream& operator<<(ostream& os, const ossimGammaRemapper& hr)
-{
-   return hr.print(os);
-}
diff --git a/src/ossim/imaging/ossimGeneralRasterInfo.cpp b/src/ossim/imaging/ossimGeneralRasterInfo.cpp
deleted file mode 100644
index 63ee8a0..0000000
--- a/src/ossim/imaging/ossimGeneralRasterInfo.cpp
+++ /dev/null
@@ -1,1295 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-// Contains class definition for ossimGeneralRasterInfo
-//*******************************************************************
-// $Id: ossimGeneralRasterInfo.cpp 21745 2012-09-16 15:21:53Z dburken $
-
-#include <ossim/imaging/ossimGeneralRasterInfo.h>
-#include <ossim/base/ossimInterleaveTypeLut.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/imaging/ossimImageMetaData.h>
-#include <ossim/support_data/ossimEnviHeader.h>
-#include <ossim/support_data/ossimFgdcXmlDoc.h>
-
-#include <iostream>
-#include <iomanip>
-
-static const ossimKeyword
-NUMBER_LINES("number_lines",
-             "Number of lines in the raster image.");
-
-static const ossimKeyword
-NUMBER_SAMPLES("number_samples",
-               "Number of samples in the raster image.");
-
-static const ossimKeyword
-VALID_START_LINE("valid_start_line",
-                 "First valid line of raster image(zero based).");
-
-static const ossimKeyword
-VALID_STOP_LINE("valid_stop_line",
-                "Last valid line of raster image(zero based).");
-
-static const ossimKeyword
-VALID_START_SAMPLE("valid_start_sample",
-                   "First valid sample of raster image(zero based).");
-
-static const ossimKeyword
-VALID_STOP_SAMPLE("valid_stop_sample",
-                  "Last valid sample of raster image(zero based).");
-
-static const ossimKeyword
-SUB_IMAGE_OFFSET_LINE(
-   "sub_image_offset_line",
-   "Pixel line offset of sub-image in the full-image pixel space.");
-
-static const ossimKeyword
-SUB_IMAGE_OFFSET_SAMP(
-   "sub_image_offset_samp",
-   "Pixel sample offset of sub-image in the full-image pixel space."); 
-
-static const ossimKeyword
-HEADER_SIZE("header_size",
-            "Header size in bytes.");
-
-static const ossimKeyword
-SET_NULLS("set_fill_to_nulls_mode",
-          "0 = do nothing to pixels,\n1 = all zeroes to min values,\
-\n2 = zeroes to null on edges only.");
-
-static const ossimKeyword
-PIXELS_TO_CHOP("pixels_to_chop",
-               "Ammount of pixels to chop from edge.");
-
-static const ossimInterleaveTypeLut INTERLEAVE_TYPE_LUT;
-
-static ossimTrace traceDebug("ossimGeneralRasterInfo:debug");
-
-ossimGeneralRasterInfo::ossimGeneralRasterInfo()
-   :
-   theMetaData(),
-   theImageFileList(),
-   theInterleaveType(OSSIM_BIL),
-   theRawImageRect(),
-   theValidImageRect(),
-   theImageRect(),
-   theSubImageOffset(0,0),
-   theHeaderSize(0),
-   theSetNullsMode(NONE),
-   thePixelsToChop(0),
-   theImageDataByteOrder(OSSIM_LITTLE_ENDIAN)
-{
-   theRawImageRect.makeNan();
-   theValidImageRect.makeNan();
-   theImageRect.makeNan();
-}
-
-ossimGeneralRasterInfo::ossimGeneralRasterInfo(const std::vector<ossimFilename>& imageFileList,
-                                               ossimScalarType     pixelType,
-                                               ossimInterleaveType il_type,
-                                               ossim_int32         numberOfBands,
-                                               ossim_int32         lines,
-                                               ossim_int32         samples,
-                                               ossim_int32         headerSize,
-                                               ossimFillMode       nullsMode,
-                                               ossim_int32         pixelsToChop)
-   :
-   theMetaData(pixelType, numberOfBands),
-   theImageFileList(imageFileList),
-   theInterleaveType(il_type),
-   theRawImageRect(0,0,0,0),
-   theValidImageRect(0,0,0,0),
-   theImageRect(0,0,0,0),
-   theSubImageOffset(0,0),
-   theHeaderSize(headerSize),
-   theSetNullsMode(nullsMode),
-   thePixelsToChop(pixelsToChop),
-   theImageDataByteOrder(OSSIM_LITTLE_ENDIAN)
-{
-   theRawImageRect.set_lry(lines - 1);
-   theRawImageRect.set_lrx(samples - 1);
-   theValidImageRect = theRawImageRect;
-   theImageRect = theRawImageRect;
-}
-
-ossimGeneralRasterInfo::ossimGeneralRasterInfo(const ossimKeywordlist& kwl,
-                     const char* prefix)
-   :
-   theImageFileList(),
-   theInterleaveType(OSSIM_BIL),
-   theRawImageRect(0,0,0,0),
-   theValidImageRect(0,0,0,0),
-   theImageRect(0,0,0,0),
-   theSubImageOffset(0,0),
-   theHeaderSize(0),
-   theSetNullsMode(NONE),
-   thePixelsToChop(0),
-   theImageDataByteOrder(OSSIM_LITTLE_ENDIAN)
-{
-   theRawImageRect.makeNan();
-   theValidImageRect.makeNan();
-   theImageRect.makeNan();
-   
-   loadState(kwl, prefix);
-}
-
-ossimGeneralRasterInfo::ossimGeneralRasterInfo( const ossimGeneralRasterInfo& obj )
-   :
-   theMetaData           ( obj.theMetaData ),
-   theImageFileList      ( obj.theImageFileList ),
-   theInterleaveType     ( obj.theInterleaveType ),
-   theRawImageRect       ( obj.theRawImageRect ),
-   theValidImageRect     ( obj.theValidImageRect ),
-   theImageRect          ( obj.theImageRect ),
-   theSubImageOffset     ( obj.theSubImageOffset ),
-   theHeaderSize         ( obj.theHeaderSize ),
-   theSetNullsMode       ( obj.theSetNullsMode ),
-   thePixelsToChop       ( obj.thePixelsToChop ),
-   theImageDataByteOrder ( obj.theImageDataByteOrder )
-{
-}
-
-const ossimGeneralRasterInfo& ossimGeneralRasterInfo::operator=(
-   const ossimGeneralRasterInfo& rhs )
-{
-   if ( this != &rhs )
-   {
-      theMetaData           = rhs.theMetaData;
-      theImageFileList      = rhs.theImageFileList;
-      theInterleaveType     = rhs.theInterleaveType;
-      theRawImageRect       = rhs.theRawImageRect;
-      theValidImageRect     = rhs.theValidImageRect;
-      theImageRect          = rhs.theImageRect;
-      theSubImageOffset     = rhs.theSubImageOffset;
-      theHeaderSize         = rhs.theHeaderSize;
-      theSetNullsMode       = rhs.theSetNullsMode;
-      thePixelsToChop       = rhs.thePixelsToChop;
-      theImageDataByteOrder = rhs.theImageDataByteOrder;
-   }
-   return *this;
-}
-
-ossimGeneralRasterInfo::~ossimGeneralRasterInfo()
-{
-}
-
-void ossimGeneralRasterInfo::clear()
-{
-   theMetaData.clear();
-   theImageFileList.clear();
-   theInterleaveType = OSSIM_BIL;
-   theRawImageRect.makeNan();
-   theValidImageRect.makeNan();
-   theImageRect.makeNan();
-   theSubImageOffset.x = 0;
-   theSubImageOffset.y = 0;
-   theHeaderSize = 0;
-   theSetNullsMode = NONE;
-   thePixelsToChop = 0;
-   theImageDataByteOrder = OSSIM_LITTLE_ENDIAN;
-}
-
-const ossimIrect& ossimGeneralRasterInfo::imageRect() const
-{
-   return theImageRect;
-}
-
-const ossimIrect& ossimGeneralRasterInfo::validImageRect() const
-{
-   return theValidImageRect;
-}
-
-const ossimIrect& ossimGeneralRasterInfo::rawImageRect() const
-{
-   return theRawImageRect;
-}
-
-const ossimIpt& ossimGeneralRasterInfo::subImageOffset() const
-{
-   return theSubImageOffset;
-}
-
-ossim_int32 ossimGeneralRasterInfo::headerSize() const
-{
-   return theHeaderSize;
-}
-
-ossim_uint32 ossimGeneralRasterInfo::fillToNullsMode() const
-{
-   return theSetNullsMode;
-}
-  
-std::ostream& ossimGeneralRasterInfo::print(std::ostream& out) const
-{
-   //---
-   // This will print in a keyword format that can be read by the constructor.
-   // that takes a keyword list.
-   //---
-   ossimKeywordlist kwl;
-   saveState( kwl, 0 );
-   out << kwl << std::endl;
-   return out;
-}
-
-void ossimGeneralRasterInfo::setFillToNullsMode(ossim_uint32 mode)
-{
-   static const char MODULE[] = "ossimGeneralRasterInfo::setFillToNullMode";
-   if(mode < 3)
-   {
-      theSetNullsMode = (ossimFillMode)mode;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE << " ERROR:"
-         << "\nmode out of bounds(0 - 2):  " << mode << std::endl
-         << "\nmode has not been changed." << std::endl;
-   }
-}
-
-ossim_int32 ossimGeneralRasterInfo::pixelsToChop() const
-{
-   return thePixelsToChop;
-} 
-
-ossimInterleaveType ossimGeneralRasterInfo::interleaveType() const
-{
-   return theInterleaveType;
-}
-
-const std::vector<ossimFilename>& ossimGeneralRasterInfo::getImageFileList() const
-{
-   return theImageFileList;
-}
-
-void ossimGeneralRasterInfo::setImageFileList(const std::vector<ossimFilename>& list)
-{
-   theImageFileList = list;
-}
-
-void ossimGeneralRasterInfo::setImageFile(const ossimFilename& file)
-{
-   theImageFileList.clear();
-   theImageFileList.push_back( file );
-}   
-
-void ossimGeneralRasterInfo::setImageDataByteOrder(ossimByteOrder byteOrder)
-{
-   theImageDataByteOrder = byteOrder;
-}
-
-void ossimGeneralRasterInfo::setHeaderSize(ossim_int32 headerSize)
-{
-   theHeaderSize = headerSize;
-}
-
-void ossimGeneralRasterInfo::setInterleaveType(ossimInterleaveType il_type)
-{
-   theInterleaveType = il_type;
-}
-
-void ossimGeneralRasterInfo::setImageRect(const ossimIrect& imageRect)
-{
-   theImageRect = imageRect;
-}
-
-void ossimGeneralRasterInfo::setValidImageRect(const ossimIrect &imageRect)
-{
-   theValidImageRect = imageRect;
-}
-
-void ossimGeneralRasterInfo::setRawImageRect(const ossimIrect &imageRect)
-{
-   theRawImageRect = imageRect;
-}
-
-void ossimGeneralRasterInfo::setSubImageOffset(const ossimIpt& d)
-{
-   theSubImageOffset = d;
-}
-
-ossimByteOrder ossimGeneralRasterInfo::getImageDataByteOrder() const
-{
-   return theImageDataByteOrder;
-}  
-
-bool ossimGeneralRasterInfo::saveState(ossimKeywordlist& kwl,
-                                       const char* prefix) const
-{
-   for (ossim_uint32 i=0; i<theImageFileList.size(); ++i)
-   {
-      ossimString kw = ossimKeywordNames::FILENAME_KW;
-      kw += ossimString::toString(i+1);
-      kwl.add(prefix, theImageFileList[i].c_str());
-   }
-
-   theMetaData.saveState(kwl, prefix);
-
-   kwl.add(prefix,
-           NUMBER_LINES,
-           ossimString::toString( rawLines() ), true);
-   kwl.add(prefix,
-           NUMBER_SAMPLES,
-           ossimString::toString( rawSamples() ),
-           true);
-   kwl.add(prefix,
-           HEADER_SIZE,
-           ossimString::toString(theHeaderSize),
-           true);
-   kwl.add(prefix,
-           SUB_IMAGE_OFFSET_LINE,
-           theSubImageOffset.line,
-           true);
-   kwl.add(prefix,
-           SUB_IMAGE_OFFSET_SAMP,
-           theSubImageOffset.samp,
-           true);
-   kwl.add(prefix,
-           VALID_START_LINE,
-           theValidImageRect.ul().y,
-           true);
-   kwl.add(prefix,
-           VALID_STOP_LINE,
-           theValidImageRect.lr().y,
-           true);
-   kwl.add(prefix,
-           VALID_START_SAMPLE,
-           theValidImageRect.ul().x,
-           true);
-   kwl.add(prefix,
-           VALID_STOP_SAMPLE,
-           theValidImageRect.ur().x,
-           true);
-   kwl.add(prefix,
-           ossimKeywordNames::INTERLEAVE_TYPE_KW,
-           INTERLEAVE_TYPE_LUT.getEntryString(theInterleaveType),
-           true);
-
-   kwl.add(prefix,
-           PIXELS_TO_CHOP,
-           thePixelsToChop,
-           true);
-
-   kwl.add(prefix,
-           SET_NULLS,
-           theSetNullsMode,
-           true);
-
-
-   if (bytesPerPixel() > 1)
-   {
-      kwl.add(prefix,
-              ossimKeywordNames::BYTE_ORDER_KW,
-              (theImageDataByteOrder == OSSIM_LITTLE_ENDIAN ? "little_endian" :
-               "big_endian"),
-              true);
-   }
-
-   return true;
-}
-
-bool ossimGeneralRasterInfo::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   static const char MODULE[] = "ossimGeneralRasterInfo::loadState";
-   if ( traceDebug() )
-   {
-      CLOG << "DEBUG: entered..."
-           << "\nprefix:  " << (prefix ? prefix : "")
-           << "\nInput keyword list:\n"
-           << kwl
-           << std::endl;
-   }   
-
-   bool result = false;
-
-   //---
-   // Look for required and option keyword.  Break from loop if required
-   // keyword is not found.
-   //---
-   while( 1 )
-   {
-      // Check for errors in the ossimKeywordlist.
-      if(kwl.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << MODULE << " ERROR:\n"
-            << "Detected an error in the keywordlist:  " << kwl
-            << std::endl;
-         break;
-      }
-
-      std::string key;
-      ossimString value; // Use for keyword list lookups.
-      ossim_int32 lines = 0;
-      ossim_int32 samples = 0;
-
-      // Lines (required):
-      key = NUMBER_LINES;
-      value.string() = kwl.findKey( key );  // Required to have this.
-      if ( value.size() )
-      {
-         lines = value.toInt32();
-         if ( !lines )
-         {
-            if (traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << " ERROR:\n"
-                  << "Required number of lines is 0!" << std::endl;
-            }
-            break;
-         } 
-      }
-      else
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << " ERROR:\n"
-               << "Required keyword not found:  " << key << std::endl;
-         }
-         break;
-      }
-
-      // Samples (required):
-      key = NUMBER_SAMPLES;
-      value.string() = kwl.findKey( key );  // Required to have this.
-      if ( value.size() )
-      {
-         samples = value.toInt32();
-         if ( !samples )
-         {
-            if (traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << " ERROR:\n"
-                  << "Required number of samples is 0!" << std::endl;
-            }
-            break;
-         }          
-      }
-      else
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << " ERROR:\n"
-               << "Required keyword not found:  " << key << std::endl;
-         }
-         break;
-      }
-      
-      // Bands ossimImageMetaData::loadState checks for required bands:
-      if(!theMetaData.loadState(kwl, prefix))
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << " Error loading meta data!\n" << std::endl;
-         }
-         break;
-      }
-
-      // If we get here assign the rectangles:
-      theRawImageRect   = ossimIrect( 0, 0, samples - 1, lines - 1 );
-      theValidImageRect = theRawImageRect;
-      theImageRect      = theRawImageRect;
-
-      int tmp = INTERLEAVE_TYPE_LUT.getEntryNumber(kwl);
-      if (tmp == ossimLookUpTable::NOT_FOUND)
-      {
-         theInterleaveType = OSSIM_BIL;
-      }
-      else
-      {
-         theInterleaveType = static_cast<ossimInterleaveType>(tmp);
-      }
-      
-      // Get the image files.
-      if (theInterleaveType != OSSIM_BSQ_MULTI_FILE)
-      {
-         // Look for "filename" first, then deprecated "image_file".
-         key = ossimKeywordNames::FILENAME_KW;
-         value.string() = kwl.findKey( key );
-         if ( value.empty() )
-         {
-            // deprecated keyword...
-            key = ossimKeywordNames::IMAGE_FILE_KW;
-            value.string() = kwl.findKey( key );
-         }
-         
-         if ( value.size() )
-         {
-            //---
-            // omd (ossim metadata) files can have just the base filename, e.g. image.ras,
-            // in which case open will fail if not in the image dir.  So only put it in
-            // the list if it doesn't exits.
-            //---
-            ossimFilename f = value;
-            if ( f.exists() )
-            {
-               theImageFileList.clear();
-               theImageFileList.push_back(ossimFilename(value));
-            }
-         }
-
-         if ( theImageFileList.empty() )
-         {
-            if (traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << "ERROR:\n"
-                  << "Required keyword not found:  "
-                  << ossimKeywordNames::FILENAME_KW << std::endl;
-            }
-            break;
-         }
-      }
-      else
-      {
-         // multiple file names.
-         ossim_int32 count = 0;
-         
-         // look for image file key word with no number.
-         // Required to have this.
-         key = ossimKeywordNames::FILENAME_KW;
-         value.string() = kwl.findKey( key );
-         if ( value.empty() )
-         {
-            // deprecated keyword...
-            key = ossimKeywordNames::IMAGE_FILE_KW;
-            value.string() = kwl.findKey( key );
-         }
-         
-         if ( value.size() )
-         {
-            theImageFileList.push_back(ossimFilename(value));
-            ++count;
-         }
-         
-         ossim_int32 i = 0;
-         while ( (count < numberOfBands()) && (i < 1000) )
-         {
-            key = ossimKeywordNames::FILENAME_KW;
-            key += ossimString::toString(i).string();
-            value.string() = kwl.findKey( key );
-            if ( value.empty() )
-            {
-               // Lookup for deprecated keyword.
-               key = ossimKeywordNames::IMAGE_FILE_KW;
-               key += ossimString::toString(i).string();
-               value.string() = kwl.findKey( key );
-            }
-            
-            if ( value.size() )
-            {
-               theImageFileList.push_back(ossimFilename(value));
-               ++count;
-            }
-            ++i;
-         }
-         
-         if (count != numberOfBands())  // Error, count should equal bands!
-         {
-            if (traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << " ERROR:\n"
-                  << "Required keyword not found:  "
-                  << ossimKeywordNames::FILENAME_KW
-                  << "\nInterleave type is multi file; however,"
-                  << " not enough were pick up!"  << std::endl;
-            }
-            break;
-         }
-      }
-
-      key = VALID_START_LINE;
-      value.string() = kwl.findKey( key ); // Default is zero.
-      if ( value.size() )
-      {
-         theValidImageRect.set_uly( value.toInt32() );
-      }
-
-      key = VALID_STOP_LINE;
-      value.string() = kwl.findKey( key ); // Default is last line.
-      if ( value.size() )
-      {
-         theValidImageRect.set_lry( value.toInt32() );
-      }
-      
-      if (theValidImageRect.lr().y < theValidImageRect.ul().y)
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << " ERROR:"
-            << "\nValid stop line < start line."
-            << "\nValid start line:  " << theValidImageRect.ul().y
-            << "\nValid stop line:   " << theValidImageRect.lr().y
-            << "\nError status has been set.  Returning." << std::endl;
-         break;
-      }
-
-      key = VALID_START_SAMPLE;
-      value.string() = kwl.findKey( key ); // Default is zero.
-      if ( value.size() )
-      {
-         theValidImageRect.set_ulx( value.toInt32() );
-      }
-
-      key = VALID_STOP_SAMPLE;
-      value.string() = kwl.findKey( key ); // Default is last sample.
-      if ( value.size() ) 
-      {
-         theValidImageRect.set_lrx( value.toInt32() );
-      }
-      
-      if (theValidImageRect.lr().x < theValidImageRect.ul().x)
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << " ERROR:"
-            << "\nValid stop samp < start samp."
-            << "\nValid start samp:  " << theValidImageRect.ul().x
-            << "\nValid stop samp:   " << theValidImageRect.lr().x
-            << "\nError status has been set.  Returning." << std::endl;
-         break;
-      }
-      
-      theImageRect.set_lry(theValidImageRect.lr().y -
-                           theValidImageRect.ul().y);
-      theImageRect.set_lrx(theValidImageRect.lr().x -
-                           theValidImageRect.ul().x);
-      
-      key = SUB_IMAGE_OFFSET_LINE;
-      value.string() = kwl.findKey( key ); // Default is zero.
-      if ( value.size() )
-      {
-         theSubImageOffset.line = value.toInt32();
-      }
-
-      key = SUB_IMAGE_OFFSET_SAMP;
-      value.string() = kwl.findKey( key ); // Default is zero.
-      if ( value.size() )
-      {
-         theSubImageOffset.samp = atoi(value);
-      }
-
-      key = HEADER_SIZE;
-      value.string() = kwl.findKey( key ); // Default is zero.
-      if ( value.size() )
-      {
-         theHeaderSize = value.toInt32();
-      }
-
-      key = SET_NULLS;
-      value.string() = kwl.findKey( key ); // Default is 2.
-      if ( value.size() )
-      {
-         int tmp;
-         tmp = atoi(value);
-         if ((tmp < 3) && (tmp > -1))
-         {
-            theSetNullsMode = (ossimFillMode)tmp;
-         }
-         else
-         {
-            theSetNullsMode = ZEROES_TO_NULL_EDGES_ONLY;  // 2
-            ossimNotify(ossimNotifyLevel_WARN)
-               << " WARNING:"
-               << "\nset_fill_to_nulls_mode value out of range."
-               << "\nDefaulted to 2" << std::endl;
-         }
-      }
-
-      key = PIXELS_TO_CHOP;
-      value.string() = kwl.findKey( key ); // Default is zero.
-      if ( value.size() )
-      {
-         thePixelsToChop = value.toInt32();
-      }
-      
-      if (bytesPerPixel() > 1)
-      {
-         // get the byte order of the data.
-         key = ossimKeywordNames::BYTE_ORDER_KW;
-         value.string() = kwl.findKey( key );
-         if ( value.size() )
-         {
-            ossimString s(value);
-            if (s.trim() != "")  // Check for empty string.
-            {
-               s.downcase();
-               if (s.contains("big"))
-               {
-                  theImageDataByteOrder = OSSIM_BIG_ENDIAN;
-               }
-               else if(s.contains("little"))
-               {
-                  theImageDataByteOrder = OSSIM_LITTLE_ENDIAN;
-               }
-            }
-         }
-      }
-
-      // End of while forever loop.
-      result = true;
-      break;
-
-   } // Matches: while (1)
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE  << " Exit status: " << (result?"true":"false") << std::endl;
-   }      
-   
-   return result;
-   
-} // End: bool ossimGeneralRasterInfo::loadState
-
-bool ossimGeneralRasterInfo::open( const ossimFilename& imageFile )
-{
-   static const char MODULE[] = "ossimGeneralRasterInfo::open";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " entered..." << "\nimageFile: " << imageFile << std::endl;
-   }
-
-   bool result = false;
-
-   // Wipe any previous state slick.
-   clear();
-
-   ossimFilename copyFile = imageFile;
-   if ( !imageFile.exists() )
-   {
-      copyFile = imageFile.expand();
-   }
-
-   // Look for the headrer of omd file as they are written out by img2rr.
-   ossimFilename hdr = copyFile;
-   hdr.setExtension("hdr"); // image.hdr
-   if ( !hdr.exists() )
-   {
-      hdr = imageFile;
-      hdr.string() += ".hdr"; // image.ras.hdr
-      if ( ! hdr.exists() )
-      {
-         hdr = imageFile;
-         hdr.setExtension("xml"); // image.xml
-      }
-   }
-
-   if ( hdr.exists() )
-   {
-      if ( traceDebug() )
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << "header file: " << hdr << std::endl;
-      }
-      
-      ossimString ext = hdr.ext().downcase();
-      
-      if ( ext == "hdr" )
-      {
-         if ( ossimEnviHeader::isEnviHeader( hdr ) )
-         {
-            result = initializeFromEnviHdr( hdr );
-         }
-         else
-         {
-            result = initializeFromHdr( imageFile, hdr );
-         }
-
-         if ( !result )
-         {
-            // Could be an ossim meta data file:
-            ossimKeywordlist kwl( hdr );
-            result = loadState( kwl, 0 );
-         }
-      }
-      else if ( ext == "xml" )
-      {
-         result = initializeFromXml( imageFile, hdr );
-      }
-   }
-   
-   //---
-   // Set the file name.  Needed for ossimGeneralRasterTileSource::open.
-   // Note set here above loadState call to stop loadState from returning
-   // false if no image file found.
-   //---
-   if ( theImageFileList.empty() )
-   {
-      setImageFile( imageFile );
-   }
-   
-   ossimFilename omd = imageFile;
-   omd.setExtension("omd"); // image.omd
-   if ( !omd.exists() )
-   {
-      omd.setExtension("kwl"); // image.kwl
-   }
-
-   if ( omd.exists() )
-   {
-      if ( traceDebug() )
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << "omd file: " << omd << std::endl;
-      }
-
-      ossimKeywordlist kwl( omd );
-
-      if ( result && theMetaData.getNumberOfBands() )
-      {
-         //---
-         // Just update the band info in case it has min/max values from
-         // a compute min/max scan.
-         //---
-         theMetaData.updateMetaData( kwl, std::string("") );
-      }
-      else
-      {
-         // We're not initialized yet so do a loadState:
-         result = loadState( kwl, 0 );
-      }
-   }
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE  << " Exit status: " << (result?"true":"false") << std::endl;
-   }
-   
-   return result;
-}
-
-bool ossimGeneralRasterInfo::initializeFromHdr( const ossimFilename& imageFile,
-                                                const ossimFilename& headerFile )
-{
-   bool result = false;
-
-   ossimKeywordlist kwl;
-   char delimeter = ' ';
-   kwl.change_delimiter(delimeter);
-
-   if ( kwl.addFile(headerFile) )
-   {
-      kwl.downcaseKeywords();
-      ossimString value;
-   
-      while( 1 ) 
-      {
-         //---
-         // Go through the data members in order.
-         // If a required item is not found break from loop.
-         //--
-         theMetaData.clear();
-
-         // scalar ( default ) - adjusted below :
-         theMetaData.setScalarType( OSSIM_UINT8 );
-
-         // Image file name:
-         theImageFileList.clear();
-         theImageFileList.push_back( imageFile );
-         
-         // interleave ( not required - default=BIL)
-         theInterleaveType = OSSIM_BIL;
-         value.string() = kwl.findKey( std::string("layout") );
-         if ( value.size() )
-         {
-            ossimInterleaveTypeLut lut;
-            ossim_int32 intrlv = lut.getEntryNumber( value.string().c_str(), true );
-            if ( intrlv != ossimLookUpTable::NOT_FOUND )
-            {
-               theInterleaveType = static_cast<ossimInterleaveType>(intrlv);
-            }
-         }
-
-         // bands ( required ):
-         ossim_uint32 bands = 0;
-         value.string() = kwl.findKey( std::string("nbands") );
-         if ( value.size() )
-         {
-            bands = value.toUInt32();
-         }
-         if ( !bands )
-         {
-            break;
-         }
-         theMetaData.setNumberOfBands( bands );
-
-         // lines ( required ):
-         ossim_int32 lines = 0;
-         value.string() = kwl.findKey( std::string("nrows") );
-         if ( value.size() )
-         {
-            lines = value.toInt32();
-         }
-         if ( !lines )
-         {
-            break;
-         }
-         
-         // samples ( required ):
-         ossim_int32 samples = 0;
-         value.string() = kwl.findKey( std::string("ncols") );
-         if ( value.size() )
-         {
-            samples = value.toInt32();
-         }
-         if ( !samples )
-         {
-            break;
-         }
-
-         // nodata or null value ( not required )
-         value.string() = kwl.findKey( std::string("nodata") );
-         if ( value.empty() )
-         {
-            value.string() = kwl.findKey( std::string("nodata_value") );
-         }
-         if ( value.size() )
-         {
-            ossim_float64 nullValue = value.toUInt32();
-            for ( ossim_uint32 band = 0; band < theMetaData.getNumberOfBands(); ++band )
-            {
-               theMetaData.setNullPix( band, nullValue );
-            }
-            theMetaData.setNullValuesValid(true);
-         }
-
-         // Set the rectangles:
-         theRawImageRect   = ossimIrect( 0, 0, samples - 1, lines - 1 );
-         theValidImageRect = theRawImageRect;
-         theImageRect      = theRawImageRect;         
-
-         // sample start ( not required ):
-         theSubImageOffset.x = 0;
-
-         // line start ( not required ):
-         theSubImageOffset.y = 0;
-
-         // header offset ( not required ):
-         theHeaderSize = 0;
-
-         // null mode:
-         theSetNullsMode = ossimGeneralRasterInfo::NONE;
-
-         // pixels to chop:
-         thePixelsToChop = 0; 
-
-         // Byte order, ( not required - defaulted to system if not found.
-         theImageDataByteOrder = ossim::byteOrder();
-         value.string() = kwl.findKey( std::string("byteorder") );
-         if ( value.size() )
-         {
-            ossim_uint32 i = value.toUInt32();
-            if ( i == 0 )
-            {
-               theImageDataByteOrder = OSSIM_LITTLE_ENDIAN;
-            }
-            else
-            {
-               theImageDataByteOrder = OSSIM_BIG_ENDIAN;
-            }
-         }
-
-         // Pixel type used for scalar below:
-         std::string pixelType = "N"; // not defined
-         value.string() = kwl.findKey( std::string("pixeltype") );
-         if ( value.size() )
-         {
-            pixelType = value.string();
-         }
-         
-         ossim_int32 nbits = -1;
-         value.string() = kwl.findKey( std::string("nbits") );
-         if ( value.size() )
-         {
-            nbits = value.toInt32();
-         }
-         else
-         {
-            nbits = getBitsPerPixel( imageFile );
-         }
-
-         switch( nbits )
-         {
-            case 8:
-            {
-               theMetaData.setScalarType( OSSIM_UINT8 );
-               break;
-            }
-            case 16:
-            {
-               if (pixelType == "S")
-               {
-                  theMetaData.setScalarType( OSSIM_SINT16 );
-               }
-               else
-               {
-                  theMetaData.setScalarType( OSSIM_UINT16 );
-               }
-               break;
-            }
-            case 32:
-            {
-               if( pixelType == "S")
-               {
-                  theMetaData.setScalarType( OSSIM_SINT32 );
-               }
-               else if( pixelType == "F")
-               {
-                  theMetaData.setScalarType( OSSIM_FLOAT32 );
-               }
-               else
-               {
-                  theMetaData.setScalarType( OSSIM_UINT32 );
-               }
-               break;
-            }
-            default:
-            {
-               if( (nbits < 8) && (nbits >= 1 ) )
-               {
-                  theMetaData.setScalarType( OSSIM_UINT8 );
-               }
-               break;
-            }
-         }
-
-         result = true;
-         break; // Trailing break to get out.
-      }
-   }
-
-   return result;
-   
-} // End: ossimGeneralRasterInfo::initializeFromHdr
-
-
-bool ossimGeneralRasterInfo::initializeFromEnviHdr( const ossimFilename& headerFile )
-{
-   bool result = false;
-   ossimEnviHeader hdr;
-   if( hdr.open( headerFile ) )
-   {
-      result = initializeFromEnviHdr( hdr );
-   }
-   return result;
-}
-
-bool ossimGeneralRasterInfo::initializeFromEnviHdr( const ossimEnviHeader& enviHdr )
-{
-   bool result = false;
-
-   while( 1 ) 
-   {
-      //---
-      // Go through the data members in order.
-      // If a required item is not found break from loop.
-      //--
-      theMetaData.clear();
-      
-      // scalar ( required ) :
-      if( enviHdr.getOssimScalarType() != OSSIM_SCALAR_UNKNOWN )
-      {
-         theMetaData.setScalarType( enviHdr.getOssimScalarType() );
-      }
-      else
-      {
-         break;
-      }
-      
-      theImageFileList.clear();
-      
-      // interleave ( required ):
-      theInterleaveType = enviHdr.getOssimInterleaveType();
-      if ( theInterleaveType == OSSIM_INTERLEAVE_UNKNOWN )
-      {
-         break;
-      }
-      
-      // bands ( required ):
-      if ( !enviHdr.getBands() )
-      {
-         break;
-      }
-      theMetaData.setNumberOfBands( enviHdr.getBands() );
-      
-      // lines ( required ):
-      ossim_uint32 lines = enviHdr.getLines();
-      if ( !lines )
-      {
-         break;
-      }
-      
-      // samples ( required ):
-      ossim_uint32 samples = enviHdr.getSamples();
-      if ( !samples )
-      {
-         break;
-      }
-      
-      // Set the rectangles:
-      theRawImageRect   = ossimIrect( 0, 0, samples - 1, lines - 1 );
-      theValidImageRect = theRawImageRect;
-      theImageRect      = theRawImageRect;         
-
-      // sample start ( not required ):
-      theSubImageOffset.x = enviHdr.getXStart();
-      
-      // line start ( not required ):
-      theSubImageOffset.y = enviHdr.getYStart();
-      
-      // header offset ( not required ):
-      theHeaderSize = enviHdr.getHeaderOffset();
-      
-      // null mode:
-      theSetNullsMode = ossimGeneralRasterInfo::NONE;
-      
-      // pixels to chop:
-      thePixelsToChop = 0; 
-      
-      // Byte order, this will be system if not found.
-      theImageDataByteOrder = enviHdr.getByteOrder();
-      
-      result = true;
-      break; // Trailing break to get out.
-   }
-   return result;
-   
-} // End: ossimGeneralRasterInfo::initializeFromEnviHdr( const ossimEnviHeader& )
-
-bool ossimGeneralRasterInfo::initializeFromXml( const ossimFilename& imageFile,
-                                                const ossimFilename& headerFile )
-{
-   bool result = false;
-
-   ossimFgdcXmlDoc file;
-   if (file.open( headerFile ))
-   {
-      while( 1 ) 
-      {
-         //---
-         // Go through the data members in order.
-         // If a required item is not found break from loop.
-         //--
-         theMetaData.clear();
-
-         // scalar ( default ) - adjusted below :
-         theMetaData.setScalarType( OSSIM_UINT8 );
-
-         // Image file name:
-         theImageFileList.clear();
-         theImageFileList.push_back( imageFile );
-
-         // interleave ( defaulted ):
-         theInterleaveType = OSSIM_BIL;
-
-         // bands ( required ):
-         if ( !file.getNumberOfBands() )
-         {
-            break;
-         }
-         theMetaData.setNumberOfBands( file.getNumberOfBands() );
-         
-         ossimIpt size;
-         if ( file.getImageSize(size) ) // Lines, samples not image file size.
-         {
-            // lines, samples ( required ):
-            if ( !size.x || !size.y )
-            {
-               break;
-            }
-         }
-         else
-         {
-            break;
-         }
-
-         // Set the rectangles:
-         theRawImageRect   = ossimIrect( 0, 0, size.x - 1, size.y - 1 );
-         theValidImageRect = theRawImageRect;
-         theImageRect      = theRawImageRect;         
-
-         // sample start ( not required ):
-         theSubImageOffset.x = 0;
-
-         // line start ( not required ):
-         theSubImageOffset.y = 0;
-
-         // header offset ( not required ):
-         theHeaderSize = 0;
-
-         // null mode:
-         theSetNullsMode = ossimGeneralRasterInfo::NONE;
-
-         // pixels to chop:
-         thePixelsToChop = 0; 
-
-         // Byte order *** need this ***, defaulting to system for now:
-         theImageDataByteOrder = ossim::byteOrder();
-
-         // Adjust scalar if needed, note defaulted to 8 bit above:
-         ossimString eainfo;
-         file.getPath("/metadata/eainfo/detailed/enttyp/enttypd", eainfo);
-         ossim_int32 numBits = 0;
-         ossim_int64 fileSize = imageFile.fileSize(); // Image file size.
-         ossim_int32 numBytes = fileSize / size.x / size.y / numberOfBands();
-         if( numBytes > 0 && numBytes != 3 )
-         {
-            numBits = numBytes*8;
-         }
-         if( numBits == 16 )
-         {
-            theMetaData.setScalarType( OSSIM_UINT16 );
-         }
-         else if( numBits == 32 )
-         {
-            if(eainfo.contains("float"))
-            {
-               theMetaData.setScalarType( OSSIM_FLOAT32 );
-            }
-            else
-            {
-               theMetaData.setScalarType( OSSIM_UINT32 );
-            }
-         }
-
-         result = true;
-         break; // Trailing break to get out.
-      }
-   }
-
-   return result;
-   
-} // End: ossimGeneralRasterInfo::initializeFromXml
-
-ossim_int32 ossimGeneralRasterInfo::getBitsPerPixel( const ossimFilename& imageFile ) const
-{
-   // Note currently does not consider header size.
-   ossim_int32 result = 0;
-   
-   ossim_int64 fileSize = imageFile.size();
-   ossimIpt rectSize = theRawImageRect.size();
-   if ( fileSize && rectSize.x && rectSize.y && numberOfBands() )
-   {
-      result = ( fileSize / rectSize.x / rectSize.y / numberOfBands() ) * 8;
-   }
-   return result;
-}
-
diff --git a/src/ossim/imaging/ossimGeneralRasterTileSource.cpp b/src/ossim/imaging/ossimGeneralRasterTileSource.cpp
deleted file mode 100644
index d1eb1e7..0000000
--- a/src/ossim/imaging/ossimGeneralRasterTileSource.cpp
+++ /dev/null
@@ -1,1600 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Contains class definition for ossimGeneralRasterTileSource.
-//*******************************************************************
-//  $Id: ossimGeneralRasterTileSource.cpp 22366 2013-08-09 12:13:24Z gpotts $
-
-#include <ossim/imaging/ossimGeneralRasterTileSource.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimErrorContext.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimInterleaveTypeLut.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-#include <ossim/base/ossimStreamFactoryRegistry.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/imaging/ossimImageGeometryRegistry.h>
-#include <ossim/projection/ossimMapProjectionFactory.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/support_data/ossimFgdcXmlDoc.h>
-
-RTTI_DEF1_INST(ossimGeneralRasterTileSource,
-               "ossimGeneralRasterTileSource",
-               ossimImageHandler)
-
-static ossimTrace traceDebug("ossimGeneralRasterTileSource:debug");
-
-// For interleave type enum to string conversions.
-static const ossimInterleaveTypeLut ILUT;
-
-//*******************************************************************
-// Public Constructor:
-//*******************************************************************
-ossimGeneralRasterTileSource::ossimGeneralRasterTileSource()
-   :
-      ossimImageHandler(),
-      m_tile(0),
-      m_buffer(0),
-      m_lineBuffer(0),
-      m_bufferInterleave(OSSIM_BIL),
-      m_fileStrList(0),
-      m_rasterInfo(),
-      m_bufferRect(0, 0, 0, 0),
-      m_swapBytesFlag(false),
-      m_bufferSizeInPixels(0),
-      m_outputBandList(0)
-{}
-
-ossimGeneralRasterTileSource::~ossimGeneralRasterTileSource()
-{
-   close();
-}
-
-ossimRefPtr<ossimImageData> ossimGeneralRasterTileSource::getTile(
-   const ossimIrect& tile_rect, ossim_uint32 resLevel)
-{
-   if ( m_tile.valid() == false )
-   {
-      allocateTile(); // First time through...
-   }
-   
-   if (m_tile.valid())
-   {
-      // Image rectangle must be set prior to calling getTile.
-      m_tile->setImageRectangle(tile_rect);
-      
-      if ( getTile( m_tile.get(), resLevel ) == false )
-      {
-         if (m_tile->getDataObjectStatus() != OSSIM_NULL)
-         {
-            m_tile->makeBlank();
-         }
-      }
-   }
-   
-   return m_tile;
-}
-
-bool ossimGeneralRasterTileSource::getTile(ossimImageData* result,
-                                           ossim_uint32 resLevel)
-{
-   bool status = false;
-   
-   //---
-   // Not open, this tile source bypassed, or invalid res level,
-   // return a blank tile.
-   //---
-   if( isOpen() && isSourceEnabled() && isValidRLevel(resLevel)  &&
-       result && (result->getNumberOfBands() == getNumberOfOutputBands()) )
-   {
-      //---
-      // Check for overview tile.  Some overviews can contain r0 so always
-      // call even if resLevel is 0.  Method returns true on success, false
-      // on error.
-      //---
-      status = getOverviewTile(resLevel, result);
-      if (status)
-      {
-         if(getOutputScalarType() == OSSIM_USHORT11)
-         {
-            //---
-            // Temp fix:
-            // The overview handler could return a tile of OSSIM_UINT16 if
-            // the max sample value was not set to 2047.
-            //---
-            result->setScalarType(OSSIM_USHORT11);
-         }
-      }
-      
-      if (!status) // Did not get an overview tile.
-      {
-         status = true;
-         
-         //---
-         // Subtract any sub image offset to get the zero based image space
-         // rectangle.
-         //---
-         ossimIrect tile_rect = result->getImageRectangle();
-         
-         // This should be the zero base image rectangle for this res level.
-         ossimIrect image_rect = getImageRectangle(resLevel);
-         
-         //---
-         // See if any point of the requested tile is in the image.
-         //---
-         if ( tile_rect.intersects(image_rect) )
-         {
-            // Make the tile rectangle zero base.
-            result->setImageRectangle(tile_rect);
-
-            // Initialize the tile if needed as we're going to stuff it.
-            if (result->getDataObjectStatus() == OSSIM_NULL)
-            {
-               result->initialize();
-            }
-
-            ossimIrect clip_rect = tile_rect.clipToRect(image_rect);
-
-            if ( ! tile_rect.completely_within(m_bufferRect) )
-            {
-               // A new buffer must be loaded.
-               if ( !tile_rect.completely_within(clip_rect) )
-               {
-                  //---
-                  // Start with a blank tile since the whole tile buffer will
-                  // not be
-                  // filled.
-                  //---
-                  result->makeBlank();
-               }
-
-               // Reallocate the buffer if needed.
-               if ( m_bufferSizeInPixels != result->getSize() )
-               {
-                  allocateBuffer( result );
-               }
-
-               ossimIpt size(static_cast<ossim_int32>(result->getWidth()),
-                             static_cast<ossim_int32>(result->getHeight()));
-
-               if( !fillBuffer(clip_rect.ul(), size) )
-               {
-                  ossimNotify(ossimNotifyLevel_WARN)
-                     << "Error from fill buffer..."
-                     << std::endl;
-                  //---
-                  // Error in filling buffer.
-                  //---
-                  setErrorStatus();
-                  status = false;
-               }
-            }
-            
-            result->loadTile(m_buffer,
-                             m_bufferRect,
-                             clip_rect,
-                             m_bufferInterleave);
-            result->validate();
-
-            // Set the rectangle back.
-            result->setImageRectangle(tile_rect);
-            
-         }
-         else // No intersection.
-         {
-            result->makeBlank();
-         }
-      }
-   }
-   return status;
-}
-
-bool ossimGeneralRasterTileSource::fillBuffer(const ossimIpt& origin, const ossimIpt& size)
-{
-
-   static const char MODULE[] = "ossimGeneralRasterTileSource::fillBuffer";
-
-   // Note:  InterleaveType enumerations in "constants.h" file.
-   bool status = false;
-   switch ( m_rasterInfo.interleaveType() )
-   {
-      case OSSIM_BIP:
-      {
-         status = fillBIP(origin, size);
-         break;
-      }
-      case OSSIM_BIL:
-      {
-         status = fillBIL(origin, size);
-         break;
-      }
-      case OSSIM_BSQ:
-      {
-         status = fillBSQ(origin, size);
-         break;
-      }
-      case OSSIM_BSQ_MULTI_FILE:
-      {
-         status = fillBsqMultiFile(origin, size);
-         break;
-      }
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << MODULE << " ERROR:\n"
-            << " Unsupported interleave type:  "
-            << ILUT.getEntryString(m_rasterInfo.interleaveType())
-            << std::endl;
-      }
-   }
-   
-   if (status && m_swapBytesFlag)
-   {
-      ossimEndian oe;
-      oe.swap(m_rasterInfo.getImageMetaData().getScalarType(),
-              m_buffer,
-              m_bufferSizeInPixels);
-   }
-
-   return status;
-}
-
-bool ossimGeneralRasterTileSource::fillBIP(const ossimIpt& origin, const ossimIpt& size )
-{
-   static const char MODULE[] = "ossimGeneralRasterTileSource::fillBIP ";
-
-   m_bufferRect.set_ul(origin);
-   m_bufferRect.set_lry(min( (origin.y + size.y -1),
-                              m_rasterInfo.imageRect().lr().y));
-   m_bufferRect.set_lrx(min( (origin.x + size.x -1),
-                              m_rasterInfo.imageRect().lr().x));
-
-   const ossim_int32 WIDTH                  = static_cast<ossim_int32>( m_bufferRect.width() ); 
-   const ossim_int32 HEIGHT                 = static_cast<ossim_int32>( m_bufferRect.height() ); 
-   const ossim_int32 INPUT_BANDS            = m_rasterInfo.numberOfBands();
-   const ossim_int32 OUTPUT_BANDS           = static_cast<ossim_int32>( m_outputBandList.size() );
-   const ossim_int32 BYTES_PER_PIXEL        = m_rasterInfo.bytesPerPixel();
-   const ossim_int32 INPUT_BYTES_PER_SAMPLE = BYTES_PER_PIXEL * INPUT_BANDS;
-   const ossim_int32 OUTPUT_BYTES_PER_SAMPLE = BYTES_PER_PIXEL * OUTPUT_BANDS;
-   
-   // Seek position.
-   std::streamoff rasterOffset = m_rasterInfo.offsetToFirstValidSample() +
-        origin.y * m_rasterInfo.bytesPerRawLine() +
-        origin.x * INPUT_BYTES_PER_SAMPLE;
-
-    // Input line buffer, all bands.
-   std::streamsize inputLineBufferWidth = WIDTH * INPUT_BYTES_PER_SAMPLE;
-  
-   // Output buffer width:
-   std::streamsize outputLineBufferWidth = WIDTH * OUTPUT_BYTES_PER_SAMPLE;
-
-#if 0 /* Please keep for debug. (drb) */
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "\nDEBUG:"
-         << "\norigin:                 " << origin
-         << "\nSeek position:          " << rasterOffset
-         << "\ninputLineBufferWidth:   " << inputLineBufferWidth
-         << "\noutputLineBufferWidth:  " << outputLineBufferWidth
-         << "\nINPUT_BANDS:            " << INPUT_BANDS
-         << "\nOUTPUT_BANDS:           " << OUTPUT_BANDS
-         << std::endl;
-#endif
-   
-   ossim_int32 bufferOffset = 0;   
-   
-   // Line loop:
-   ossim_int32 currentLine = 0;
-   while ( currentLine < HEIGHT )
-   {
-      // Seek to line.
-      m_fileStrList[0]->seekg(rasterOffset, ios::beg);
-      if (!(*m_fileStrList[0]))
-      {
-         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-         ossimNotify(ossimNotifyLevel_WARN)
-            << MODULE << " ERROR:\n"
-            << " Seek error!  Returning with error..." << std::endl;
-         return false;
-      }
-
-      // Read image data from line for all bands into line buffer.   
-      m_fileStrList[0]->read( (char*)m_lineBuffer, inputLineBufferWidth );
-      if ( m_fileStrList[0]->gcount() != inputLineBufferWidth ) 
-      {
-         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-         ossimNotify(ossimNotifyLevel_WARN)
-            << MODULE << "\nERROR:  Reading image line." << std::endl;
-         return false;
-      }
-      
-      // Sample loop:
-      for ( ossim_int32 sample = 0; sample < WIDTH; ++sample )
-      {
-         // Band loop:
-         for ( ossim_int32 band = 0; band < OUTPUT_BANDS; ++band )
-         {
-            ossim_int32 selectedBand = static_cast<ossim_int32>(m_outputBandList[band]);
-            memcpy( (void*)(m_buffer + bufferOffset +
-                            sample * OUTPUT_BYTES_PER_SAMPLE +
-                            band * BYTES_PER_PIXEL),
-                    (void*)(m_lineBuffer +
-                            sample * INPUT_BYTES_PER_SAMPLE + 
-                            selectedBand * BYTES_PER_PIXEL),
-                    BYTES_PER_PIXEL );
-         }
-      }
-               
-      ++currentLine;
-      bufferOffset += outputLineBufferWidth;
-      rasterOffset += m_rasterInfo.bytesPerRawLine();
-   }
-   
-   return true;
-   
-} // End: bool ossimGeneralRasterTileSource::fillBipBandSelect(...
-
-bool ossimGeneralRasterTileSource::fillBIL(const ossimIpt& origin,
-                                           const ossimIpt& size)
-{
-   static const char MODULE[] = "ossimGeneralRasterTileSource::fillBIL";
-   
-   //***
-   // This will fill a buffer the full width of valid samples * tileHeight().
-   //***
-   m_bufferRect.set_ul(origin);
-   m_bufferRect.set_lry(min((origin.y + size.y - 1),
-                             m_rasterInfo.imageRect().lr().y));
-   m_bufferRect.set_lrx(min((origin.x + size.x - 1),
-                             m_rasterInfo.imageRect().lr().x));
-   
-   ossim_sint64 currentLine = origin.y;
-
-   // Bytes in one line all bands.
-   const std::streamoff LINE_OFFSET =
-      m_rasterInfo.bytesPerRawLine() * m_rasterInfo.numberOfBands();
-
-   // Start seek position.
-   std::streamoff offset = ( m_rasterInfo.offsetToFirstValidSample() +
-                             currentLine * LINE_OFFSET +
-                             origin.x * m_rasterInfo.bytesPerPixel() );
-
-   //---
-   // Loop through and process lines. 
-   //---
-   ossim_int32 linesProcessed = 0;
-   std::streamsize buffer_width = m_bufferRect.width() * m_rasterInfo.bytesPerPixel();
-   ossim_uint8* buf = m_buffer;
-
-#if 0 /* Please leave for debug.  (drb) */
-   ossimNotify(ossimNotifyLevel_DEBUG)
-      << "\nDEBUG:"
-      << "\norigin:                 " << origin
-      << "\nSeek position:          " << offset
-      << "\nStarting line number:   " << currentLine
-      << "\nbuffer_width:           " << buffer_width << std::endl;
-#endif
-
-   // Line loop:
-   while ((currentLine <= static_cast<ossim_sint64>(m_rasterInfo.imageRect().lr().y)) &&
-          linesProcessed < size.y)
-   {
-      // Band loop:
-      std::vector<ossim_uint32>::const_iterator i = m_outputBandList.begin();
-      while ( i != m_outputBandList.end() )
-      {
-         ossim_int64 band = static_cast<ossim_sint64>( (*i) );
-         const std::streamoff bandOffset = band * m_rasterInfo.bytesPerRawLine();
-         
-         // Seek to line.
-         m_fileStrList[0]->seekg(offset + bandOffset, ios::beg);
-         if (!m_fileStrList[0])
-         {
-            theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << " ERROR:\n"
-               << " Seek error!  Returning with error..." << std::endl;
-            return false;
-         }
-         
-         // Read the line of image data.   
-         m_fileStrList[0]->read( (char*)buf, buffer_width );
-
-         if ( m_fileStrList[0]->gcount() != buffer_width ) 
-         {
-            theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << "\nERROR:  Reading image line."
-               << "\ncurrentLine:  " << currentLine << std::endl;
-            return false;
-         }
-         
-         buf += buffer_width;
-         ++i;
-
-      } // End of band loop.
-      
-      ++linesProcessed;
-      ++currentLine;
-      offset += LINE_OFFSET;
-      
-   } // End: line loop
-   
-   return true;
-}
-   
-//*******************************************************************
-// Private Method:
-//*******************************************************************
-bool ossimGeneralRasterTileSource::fillBSQ(const ossimIpt& origin,
-                                           const ossimIpt& size)
-{
-   static const char MODULE[] = "ossimGeneralRasterTileSource::fillBSQ";
-
-   // This will fill a buffer the full width of valid samples * tileHeight().
-
-   m_bufferRect.set_ul(origin);
-   
-   m_bufferRect.set_lry(min((origin.y + size.y -1),
-                             m_rasterInfo.imageRect().lr().y));
-   m_bufferRect.set_lrx(min((origin.x + size.x - 1),
-                             m_rasterInfo.imageRect().lr().x));
-   
-   // Start seek position.
-   std::streamoff startSeekPosition
-      = m_rasterInfo.offsetToFirstValidSample() +
-        origin.y * m_rasterInfo.bytesPerRawLine() +
-        origin.x * m_rasterInfo.bytesPerPixel();
-
-   std::streamsize buffer_width = m_bufferRect.width() * m_rasterInfo.bytesPerPixel();
-   
-   ossim_uint8* buf = (ossim_uint8*)m_buffer;
-
-   std::streamoff bandOffset
-      = m_rasterInfo.bytesPerRawLine() * m_rasterInfo.rawLines();
-
-#if 0 /* Please leave for debug. (drb) */
-   ossimNotify(ossimNotifyLevel_DEBUG)
-      << "\nDEBUG:"
-      << "\norigin:                 " << origin
-      << "\nSeek position:          " << startSeekPosition
-      << "\nStarting line number:   " << origin.y
-      << "\nbuffer_width:           " << buffer_width
-      << "\nbytesPerRawLine():      "
-      << m_rasterInfo.bytesPerRawLine()
-      << "\nm_rasterInfo.offsetToFirstValidSample():  "
-      << m_rasterInfo.offsetToFirstValidSample()
-      << "\nbandOffset: " << bandOffset << std::endl;
-#endif
-
-   ossim_int32 num_bands = m_rasterInfo.numberOfBands();
-   ossim_int32 height    = size.y;
-
-   // Band loop:
-   for (ossim_int32 band = 0; band < num_bands; ++band)
-   {
-      ossim_sint64 currentLine    = origin.y;
-      ossim_sint64 linesProcessed = 0;
-
-      std::streamoff offset = startSeekPosition + (band * bandOffset);
-
-      // Line loop:
-      while (currentLine <= m_rasterInfo.imageRect().lr().y &&
-             linesProcessed < height)
-      {
-         // Seek to line.
-         m_fileStrList[0]->seekg(offset, ios::beg);
-         if (!m_fileStrList[0])
-         {
-            theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << " ERROR:\n"
-               << " Seek error!  Returning with error..." << std::endl;
-            return false;
-         }
-         
-         // Read the line of image data.   
-         m_fileStrList[0]->read( (char*)buf, buffer_width );
-         if ( m_fileStrList[0]->gcount() != buffer_width ) 
-         {
-            theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << "\nERROR:  Reading image line."
-               << "\ncurrentLine:  " << currentLine << std::endl;
-            return false;
-         }
-
-         // Increment everybody accordingly.
-         buf += buffer_width;
-         offset += m_rasterInfo.bytesPerRawLine();
-         ++linesProcessed;
-         ++currentLine;
-
-      } // End of line loop.
-
-   } // End of band loop.
-   
-   return true;
-}
-
-//*******************************************************************
-// Private Method:
-//*******************************************************************
-bool ossimGeneralRasterTileSource::fillBsqMultiFile(const ossimIpt& origin, const ossimIpt& size)
-{
-   static const char MODULE[] = "ossimGeneralRasterTileSource::fillBsqMultiFile";
-
-   if (traceDebug()) CLOG << " Entered..." << std::endl;
-   
-
-   // This will fill a buffer the full width of valid samples * tileHeight().
-   m_bufferRect.set_ul(origin);
-   
-   m_bufferRect.set_lry(min((origin.y + size.y -1),
-                             m_rasterInfo.imageRect().lr().y));
-   m_bufferRect.set_lrx(min((origin.x + size.x - 1),
-                             m_rasterInfo.imageRect().lr().x));
-   
-   //---
-   // Start seek position.
-   //---
-   std::streamoff startSeekPosition = m_rasterInfo.offsetToFirstValidSample() +
-      origin.y * m_rasterInfo.bytesPerRawLine() +
-      origin.x * m_rasterInfo.bytesPerPixel();
-   
-   //---
-   // Loop through and process lines. 
-   //---
-   std::streamsize buffer_width = m_bufferRect.width() * m_rasterInfo.bytesPerPixel();
-   
-   ossim_uint8* buf = (ossim_uint8*)m_buffer;
-
-#if 0
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "\nDEBUG:"
-         << "\norigin:                 " << origin
-         << "\nSeek position:          " << startSeekPosition
-         << "\nStarting line number:   " << origin.y
-         << "\nbuffer_width:           " << buffer_width
-         << "\nbuffer_rect:            " << m_bufferRect
-         << "\nbytesPerRawLine():      "
-         << m_rasterInfo.bytesPerRawLine()
-         << "\nm_rasterInfo.offsetToFirstValidSample():  "
-         << m_rasterInfo.offsetToFirstValidSample() << std::endl;
-   }
-#endif
-
-   // ossim_int32 num_bands = m_rasterInfo.numberOfBands();
-   std::vector<ossim_uint32>::const_iterator bandIter = m_outputBandList.begin();
-   while ( bandIter != m_outputBandList.end() )
-   {
-      ossim_int32 currentLine    = origin.y;
-      ossim_int32 linesProcessed = 0;
-      ossim_int64 offset         = startSeekPosition;
-      
-      while (currentLine <= m_rasterInfo.imageRect().lr().y && linesProcessed < size.y)
-      {
-         //---
-         // Seek to line.
-         //---
-         m_fileStrList[ *bandIter ]->seekg(offset, ios::beg);
-
-         if ( !m_fileStrList[ *bandIter ] )
-         {
-            theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << " ERROR:\n"
-               << " Seek error!  Returning with error..." << std::endl;
-            return false;
-         }
-         
-         //---
-         // Read the line of image data.   
-         //---
-         m_fileStrList[ *bandIter ]->read((char*)buf, buffer_width);
-         
-         if ( m_fileStrList[ *bandIter ]->gcount() != buffer_width) 
-         {
-            theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << "\nERROR:  Reading image line."
-               << "\ncurrentLine:  " << currentLine << std::endl;
-            return false;
-         }
-
-         // Increment everybody accordingly.
-         buf += buffer_width;
-         offset += m_rasterInfo.bytesPerRawLine();
-         ++linesProcessed;
-         ++currentLine;
-         
-      } // End of line loop.
-
-      ++bandIter; // Next band...
-
-   } // End: while ( bandIter ! = m_outputBandList.end() )
-   
-   return true;
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-bool ossimGeneralRasterTileSource::saveState(ossimKeywordlist& kwl,
-                                             const char* prefix) const
-{   
-   // Our stuff:
-   m_rasterInfo.saveState(kwl, prefix);
-
-   // Base class:
-   bool result = ossimImageHandler::saveState(kwl, prefix);
-   
-   if ( result && isBandSelector() && m_outputBandList.size() )
-   {
-      if ( isIdentityBandList( m_outputBandList ) == false )
-      {
-         // If we're not identity output the bands.
-         ossimString bandsString;
-         ossim::toSimpleStringList(bandsString, m_outputBandList);
-         kwl.add(prefix,
-                 ossimKeywordNames::BANDS_KW,
-                 bandsString,
-                 true);
-      }
-   }
-   
-   return result;
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-bool ossimGeneralRasterTileSource::loadState(const ossimKeywordlist& kwl,
-                                             const char* prefix)
-{
-   bool result = false;
-   m_outputBandList.clear();
-
-   if ( ossimImageHandler::loadState(kwl, prefix) )
-   {  
-      // Set the band list if key is present.
-      std::string pfx = ( prefix ? prefix : "" );
-      std::string key = ossimKeywordNames::BANDS_KW;
-      ossimString value;
-      value.string() = kwl.findKey( pfx, key );
-      if ( value.size() )
-      {
-         ossim::toSimpleVector( m_outputBandList, value );
-      }
-      result = open();
-   }
-   return result;
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-ossimScalarType ossimGeneralRasterTileSource::getOutputScalarType() const
-{
-   return m_rasterInfo.getImageMetaData().getScalarType();
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-ossim_uint32 ossimGeneralRasterTileSource::getTileWidth() const
-{
-   ossim_uint32 result = 0;
-   if ( m_tile.valid() )
-   {
-      m_tile->getWidth();
-   }
-   else
-   {
-      ossimIpt tileSize;
-      ossim::defaultTileSize(tileSize);
-      result = tileSize.x;
-   }
-   return result;
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-ossim_uint32 ossimGeneralRasterTileSource::getTileHeight() const
-{
-   ossim_uint32 result = 0;
-   if ( m_tile.valid() )
-   {
-      m_tile->getHeight();
-   }
-   else
-   {
-      ossimIpt tileSize;
-      ossim::defaultTileSize(tileSize);
-      result = tileSize.y;
-   }
-   return result;
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-bool
-ossimGeneralRasterTileSource::isValidRLevel(ossim_uint32 reduced_res_level) const
-{
-   static const char MODULE[] = "ossimGeneralRasterTileSource::isValidRLevel";
-   
-   if (reduced_res_level == 0)
-   {
-      return true;
-   }
-   else if (theOverview.valid())
-   {
-      return theOverview->isValidRLevel(reduced_res_level);
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE
-         << " Invalid reduced_res_level:  " << reduced_res_level
-         << "\nHighest available:  " << (getNumberOfDecimationLevels() - 1)
-         << std::endl;
-      return false;
-   }
-}
-
-
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-ossim_uint32
-ossimGeneralRasterTileSource::getNumberOfLines(ossim_uint32 reduced_res_level) const
-{
-   if (reduced_res_level == 0)
-   {
-      return m_rasterInfo.validLines();
-   }
-   else if (theOverview.valid())
-   {
-      return theOverview->getNumberOfLines(reduced_res_level);
-   }
-
-   return 0;
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-ossim_uint32 ossimGeneralRasterTileSource::getNumberOfSamples(
-   ossim_uint32 reduced_res_level) const
-{
-   if (reduced_res_level == 0)
-   {
-      return m_rasterInfo.validSamples();
-   }
-   else if (theOverview.valid())
-   {
-      return theOverview->getNumberOfSamples(reduced_res_level);
-   }
-
-   return 0;
-}
-
-double ossimGeneralRasterTileSource::getNullPixelValue(ossim_uint32 band) const
-{
-   return m_rasterInfo.getImageMetaData().getNullPix(band);
-}
-
-double ossimGeneralRasterTileSource::getMinPixelValue(ossim_uint32 band)const
-{
-   return m_rasterInfo.getImageMetaData().getMinPix(band);
-}
-
-double ossimGeneralRasterTileSource::getMaxPixelValue(ossim_uint32 band)const
-{
-   return m_rasterInfo.getImageMetaData().getMaxPix(band);
-}
-
-bool ossimGeneralRasterTileSource::open()
-{
-   static const char MODULE[] = "ossimGeneralRasterTileSource::open";
-
-   if (traceDebug()) CLOG << " Entered..." << std::endl;
-   
-   bool result = false;
-   
-   if(isOpen())
-   {
-      close();
-   }
-   
-   //---
-   // Find the header file:
-   //
-   // We need lines, samples, bands, scalar and interleave at a minimum:
-   // 
-   // A general raster image requires a keyword list to get essential image
-   // information or meta data as its sometimes called.  The meta data file
-   // can have four types of extensions: ".omd", ".hdr", ".kwl" and xml.
-   // Look for them in that order.
-   // Note that the ".omd" extension is for "Ossim Meta Data" and was made
-   // up to avoid conflicting with other software packages ".hdr" files.
-   //---
-   if ( m_rasterInfo.open( theImageFile ) )
-   {
-      theMetaData = m_rasterInfo.getImageMetaData();
-      
-      result = initializeHandler();
-      if ( result )
-      {
-         completeOpen();
-
-         if ( isBandSelector() && m_outputBandList.size() && ( isIdentityBandList( m_outputBandList ) == false ) )
-         {
-            // This does range checking and will pass to overview if open.
-            setOutputBandList( m_outputBandList );
-         }
-      }
-   }
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " Exit status: " << (result?"true":"false") << std::endl;
-   }
-   return result;
-}
-                                             
-bool ossimGeneralRasterTileSource::open( const ossimGeneralRasterInfo& info )
-{
-   if( isOpen() )
-   {
-      close();
-   }
-   
-   m_rasterInfo = info;
-   
-   if( initializeHandler() )
-   {
-      completeOpen();  
-
-       if ( isBandSelector() && m_outputBandList.size() && ( isIdentityBandList( m_outputBandList ) == false ) )
-       { 
-          // This does range checking and will pass to overview if open.
-          setOutputBandList( m_outputBandList );
-       }
-   }
-   else
-   {
-      return false;
-   }
-   
-   return true;
-}
-
-bool ossimGeneralRasterTileSource::initializeHandler()
-{
-   //---
-   // This private method assumes that "m_rasterInfo" object has been
-   // initialized.  Note that "close() should have already been called if
-   // there was an open file prior to this.
-   //---
-   std::vector<ossimFilename> aList = m_rasterInfo.getImageFileList();
-
-   for (ossim_uint32 i=0; i<aList.size(); ++i)
-   {
-      ossimFilename f = aList[i];
-      
-      // open it...
-      ossimRefPtr<ossimIFStream> is = ossimStreamFactoryRegistry::instance()->
-         createNewIFStream(f, std::ios::in|std::ios::binary);
-
-      // check the stream...
-      if(is.valid())
-      {
-         // Check the file stream.
-         if ( is->fail() )
-         {
-            theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimGeneralRasterTileSource::open" << " ERROR:\n"
-               << "Cannot open:  " << f.c_str() << std::endl;
-            is = 0;
-            return false;
-         }
-      }
-
-      // Check the file size (removed).
-
-      m_fileStrList.push_back(is); // Add it to the list...
-   }
-
-   if ((aList.size()==1) && theImageFile.empty())
-   {
-      theImageFile = aList[0];
-   }
-
-   // Set the buffer interleave type.
-   m_bufferInterleave = m_rasterInfo.interleaveType();
-   if (m_bufferInterleave == OSSIM_BSQ_MULTI_FILE)
-   {
-      m_bufferInterleave = OSSIM_BSQ;
-   }
-
-   if ( m_outputBandList.empty() )
-   {
-      // Set starting output band list to identity.
-      ossimImageSource::getOutputBandList( m_outputBandList );
-   }
-
-   //---
-   // Get the byte order of the image data and host machine.  If different,
-   // set the swap bytes flag...
-   //---
-   if (m_rasterInfo.getImageDataByteOrder() != ossim::byteOrder())
-   {
-      m_swapBytesFlag = true;
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimGeneralRasterTileSource::initializeHandler()" << " DEBUG:"
-         << "\nScalar type:  "
-         << ossimScalarTypeLut::instance()->
-         getEntryString(m_rasterInfo.getImageMetaData().getScalarType())
-         << "\nByte swapping is "
-         << (m_swapBytesFlag?"enabled.":"not enabled.")
-         // << "\nm_bufferSizeInPixels:  " << m_bufferSizeInPixels
-         // << "\nbuffer size:  " << buffer_size
-         << "\nRasterInfo:\n";
-      m_rasterInfo.print(ossimNotify(ossimNotifyLevel_DEBUG));
-   }
-   
-   return true;
-}
-
-bool ossimGeneralRasterTileSource::isOpen() const
-{
-   bool result = false;
-   if (m_fileStrList.size() > 0)
-   {
-      if(m_fileStrList[0].valid())
-      {
-         result = !(m_fileStrList[0]->fail());
-      }
-   }
-   return result;
-}
-
-void ossimGeneralRasterTileSource::close()
-{
-   ossimImageHandler::close();  // base class
-
-   m_tile = 0; // Not a leak, ref ptr.
-   
-   if ( m_buffer )
-   {
-      delete [] m_buffer;
-      m_buffer = 0;
-      m_bufferSizeInPixels = 0; // Must zero out for check in getTile method.
-   }
-
-   if ( m_lineBuffer )
-   {
-      delete [] m_lineBuffer;
-      m_lineBuffer = 0;
-   }
-
-   std::vector<ossimRefPtr<ossimIFStream> >::iterator is = m_fileStrList.begin();
-   while (is != m_fileStrList.end())
-   {
-      (*is)->close();
-      // delete (*is);
-      // (*is) = 0;
-      ++is;
-   }
-   m_fileStrList.clear();
-}
-
-ossim_uint32 ossimGeneralRasterTileSource::getImageTileWidth() const
-{
-   return 0;
-}
-
-ossim_uint32 ossimGeneralRasterTileSource::getImageTileHeight() const
-{
-   return 0;
-}
-
-ossimString ossimGeneralRasterTileSource::getShortName()const
-{
-   return ossimString("ossim_raster");
-}
-
-ossimString ossimGeneralRasterTileSource::getLongName()const
-{
-   return ossimString("general raster reader");
-}
-
-ossim_uint32 ossimGeneralRasterTileSource::getNumberOfInputBands() const
-{
-   return m_rasterInfo.getImageMetaData().getNumberOfBands();
-}
-
-ossim_uint32 ossimGeneralRasterTileSource::getNumberOfOutputBands() const
-{
-   ossim_uint32 result = 0;
-   if ( isBandSelector() && m_outputBandList.size() )
-   {
-      result = m_outputBandList.size();
-   }
-   else
-   {
-      result = m_rasterInfo.getImageMetaData().getNumberOfBands();
-   }  
-   return result;
-}
-
-ossimKeywordlist ossimGeneralRasterTileSource::getHdrInfo(ossimFilename hdrFile)
-{
-   ossimKeywordlist kwl;
-   char delimeter = ' ';
-   kwl.change_delimiter(delimeter);
-   kwl.addFile(hdrFile);
-   kwl.downcaseKeywords();
-
-   ossimKeywordlist geoKwl;
-   ossim_uint32 lines = 0;
-   ossim_uint32 samples = 0;
-   ossim_float32 noData = -9999;
-   ossimString scalarType = "ossim_uint8";
-   ossim_int32 numBands = 1;
-   // ossim_int32 skipBytes = 0;
-   ossim_int32 numBits = -1; 
-   ossimString chPixelType = "N"; // not defined
-   ossimString interleaveType = "BIL";
-   ossimString byteOrder;
-   bool noDataFound = false;
-
-   const char* lookup = kwl.find("ncols");
-   if (lookup)
-   {
-      samples = ossimString(lookup).toUInt32();
-      geoKwl.add(ossimKeywordNames::NUMBER_SAMPLES_KW, samples);
-   }
-
-   lookup = kwl.find("nrows");
-   if (lookup)
-   {
-      lines = ossimString(lookup).toUInt32();
-      geoKwl.add(ossimKeywordNames::NUMBER_LINES_KW, lines);
-   }
-
-   // lookup = kwl.find("skipbytes");
-   // if (lookup)
-   // {
-   //    skipBytes = ossimString(lookup).toInt();
-   // }
-
-   lookup = kwl.find("nbands");
-   if (lookup)
-   {
-      numBands = ossimString(lookup).toInt();
-   }
-
-   lookup = kwl.find("nodata");
-   if (lookup)
-   {
-      noData = ossimString(lookup).toFloat32();
-      noDataFound = true;
-   }
-   lookup = kwl.find("nodata_value");
-   if (lookup)
-   {
-      noData = ossimString(lookup).toFloat32();
-      noDataFound = true;
-   }
-
-   lookup = kwl.find("nbits");
-   if (lookup)
-   {
-      numBits = ossimString(lookup).toInt();
-   }
-
-   lookup = kwl.find("pixeltype");
-   if (lookup)
-   {
-      chPixelType = ossimString(lookup);
-   }
-
-   lookup = kwl.find("layout");
-   if (lookup)
-   {
-      interleaveType = ossimString(lookup);
-   }
-
-   lookup = kwl.find("byteorder");
-   if (lookup)
-   {
-      byteOrder = ossimString(lookup);
-   }
-
-   if (numBits == -1)
-   {
-      FILE* fp;
-      ossim_int64 size = 0;
-      fp = fopen(theImageFile.c_str(), "r");
-      if (fp != 0)
-      {
-         fseek(fp, 0, SEEK_END);
-         size = ftell(fp);
-      }
-      fclose(fp);
-
-      if (lines > 0 && samples > 0)
-      {
-         ossim_int32 numBytes = size/samples/lines/numBands;
-         if( numBytes > 0 && numBytes != 3 )
-         {
-            numBits = numBytes*8;
-
-            if( numBytes == 4 )
-            {
-               chPixelType = "F";
-            }
-         }
-      }
-   }
-
-   if( numBits == 16 )
-   {
-      if (chPixelType == "S")
-      {
-         scalarType = "ossim_sint16";
-      }
-      else
-      {
-         scalarType = "ossim_uint16"; // default
-      }
-   }
-   else if( numBits == 32 )
-   {
-      if( chPixelType == "S")
-      {
-         scalarType = "ossim_sint32";
-      }
-      else if( chPixelType == "F")
-      {
-         scalarType = "ossim_float32";
-      }
-      else
-      {
-         scalarType = "ossim_uint32"; // default 
-      }
-   }
-   else if( numBits == 8 )
-   {
-      scalarType = "ossim_uint8";
-      numBits = 8;
-   }
-   else if( numBits < 8 && numBits >= 1 )
-   {
-      scalarType = "ossim_uint8";
-   }
-   else if(numBits == -1)
-   {
-      if( chPixelType == "F")
-      {
-         scalarType = "ossim_float32";
-         numBits = 32;
-      }
-      else
-      {
-         scalarType = "ossim_uint8";
-         numBits = 8;
-      }
-   }
-
-   if (noDataFound)
-   {
-      for (ossim_int32 i = 0; i < numBands; i++)
-      {
-         ossimString prefix = "band" + ossimString::toString(i+1) + ": ";
-         geoKwl.add(prefix, ossimKeywordNames::NULL_VALUE_KW, noData);
-      }
-   }
-
-   geoKwl.add(ossimKeywordNames::NUMBER_BANDS_KW, numBands);
-   geoKwl.add(ossimKeywordNames::SCALAR_TYPE_KW, scalarType);
-   geoKwl.add(ossimKeywordNames::INTERLEAVE_TYPE_KW, interleaveType);
-
-   return geoKwl;
-}
-
-ossimKeywordlist ossimGeneralRasterTileSource::getXmlInfo(ossimFilename xmlFile)
-{
-   ossimKeywordlist kwl;
-   ossimFgdcXmlDoc file;
-   if (file.open(xmlFile))
-   {
-
-      ossimString scalarType = "ossim_uint8";
-      ossim_int32 numBits = -1; 
-      ossimString interleaveType = "BIL";
-
-      ossimIpt size;
-      ossim_int32 samples = 0;
-      ossim_int32 lines = 0;
-      if (file.getImageSize(size))
-      {
-         samples = size.x;
-         lines = size.y;
-      }
-      if (samples > 0)
-      {
-         kwl.add(ossimKeywordNames::NUMBER_SAMPLES_KW, samples);
-      }
-      if (lines > 0)
-      {
-         kwl.add(ossimKeywordNames::NUMBER_LINES_KW, lines);
-      }
-
-      ossim_int32 bands = file.getNumberOfBands();
-      if (bands > 0)
-      {
-         kwl.add(ossimKeywordNames::NUMBER_BANDS_KW, bands);
-      }
-      else
-      {
-         if (samples > 0 && lines > 0)//if there is no bands info but samples and lines info, default number of bands to 1
-         {
-            bands = 1;
-            kwl.add(ossimKeywordNames::NUMBER_BANDS_KW, bands);
-         }
-      }
-
-      ossimString eainfo;
-      file.getPath("/metadata/eainfo/detailed/enttyp/enttypd", eainfo);
-
-      if (numBits == -1)
-      {
-         if ( (lines > 0) && (samples > 0) && (bands > 0) )
-         {
-            ossim_int64 size = theImageFile.fileSize();            
-            ossim_int32 numBytes = size/samples/lines/bands;
-            if( numBytes > 0 && numBytes != 3 )
-            {
-               numBits = numBytes*8;
-            }
-         }
-      }
-
-      if( numBits == 16 )
-      {
-         scalarType = "ossim_uint16"; // default
-      }
-      else if( numBits == 32 )
-      {
-         if(eainfo.contains("float"))
-         {
-            scalarType = "ossim_float32";
-         }
-         else
-         {
-            scalarType = "ossim_uint32"; // default 
-         }
-      }
-      else if( numBits == 8 )
-      {
-         scalarType = "ossim_uint8";
-         numBits = 8;
-      }
-      else if( numBits < 8 && numBits >= 1 )
-      {
-         scalarType = "ossim_uint8";
-      }
-
-      kwl.add(ossimKeywordNames::SCALAR_TYPE_KW, scalarType);
-      kwl.add(ossimKeywordNames::INTERLEAVE_TYPE_KW, interleaveType);
-   }
-   return kwl;
-}
-
-ossimRefPtr<ossimImageGeometry> ossimGeneralRasterTileSource::getImageGeometry()
-{
-   if ( !theGeometry.valid() )
-   {
-      // Check for external geom:
-      theGeometry = getExternalImageGeometry();
-
-      if ( !theGeometry.valid() )
-      {
-         theGeometry = new ossimImageGeometry();
-         
-         ossimString ext = theImageFile.ext();
-         ossimFilename hdrFile = theImageFile;
-         ossimFilename xmlFile = theImageFile;
-         hdrFile = hdrFile.setExtension("hdr");
-         xmlFile = xmlFile.setExtension("xml");
-         if (hdrFile.exists())
-         {
-            ossimKeywordlist geoKwl;
-            ossimKeywordlist kwl(hdrFile, ' ');
-            kwl.downcaseKeywords();
-            
-            ossim_uint32 lines = 0;
-            ossim_uint32 samples = 0;
-            ossim_float32 ll_lon = 0.0;
-            ossim_float32 ll_lat = 0.0;
-            ossim_float32 xCellSize = 1.0;
-            ossim_float32 yCellSize = 1.0;
-            
-            const char* lookup = kwl.find("ncols");
-            if (lookup)
-            {
-               samples = ossimString(lookup).toUInt32();
-               geoKwl.add(ossimKeywordNames::NUMBER_SAMPLES_KW, samples);
-            }
-            
-            lookup = kwl.find("nrows");
-            if (lookup)
-            {
-               lines = ossimString(lookup).toUInt32();
-               geoKwl.add(ossimKeywordNames::NUMBER_LINES_KW, lines);
-            }
-            
-            lookup = kwl.find("cellsize");
-            if (lookup)
-            {
-               xCellSize = ossimString(lookup).toFloat32();
-               yCellSize = xCellSize;
-               geoKwl.add(ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT, yCellSize);
-               geoKwl.add(ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON, xCellSize);
-            }
-            
-            lookup = kwl.find("xdim");
-            if (lookup)
-            {
-               xCellSize = ossimString(lookup).toFloat32();
-               geoKwl.add(ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON, xCellSize);
-            }
-            
-            lookup = kwl.find("ydim");
-            if (lookup)
-            {
-               yCellSize = ossimString(lookup).toFloat32();
-               geoKwl.add(ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT, yCellSize);
-            }
-            
-            lookup = kwl.find("xllcenter");
-            if (lookup)
-            {
-               ossim_float32 centerX = ossimString(lookup).toFloat32();
-               ll_lon = centerX + xCellSize * 0.5;
-               geoKwl.add(ossimKeywordNames::TIE_POINT_LON_KW, ll_lon);
-            }
-            
-            lookup = kwl.find("yllcenter");
-            if (lookup)
-            {
-               ossim_float32 centerY = ossimString(lookup).toFloat32();
-               ll_lat = (centerY + (lines - 1) * yCellSize) + yCellSize * 0.5;
-               geoKwl.add(ossimKeywordNames::TIE_POINT_LAT_KW, ll_lat);
-            }
-            
-            lookup = kwl.find("xllcorner");
-            if (lookup)
-            {
-               ll_lon = ossimString(lookup).toFloat32();
-               geoKwl.add(ossimKeywordNames::TIE_POINT_LON_KW, ll_lon);
-            }
-            
-            lookup = kwl.find("yllcorner");
-            if (lookup)
-            {
-               ossim_uint32 centerY = ossimString(lookup).toFloat32();
-               ll_lat = centerY + lines * yCellSize;
-               geoKwl.add(ossimKeywordNames::TIE_POINT_LAT_KW, ll_lat);
-            }
-            
-            lookup = kwl.find("ulxmap");
-            if (lookup)
-            {
-               ll_lon = ossimString(lookup).toFloat32();
-               geoKwl.add(ossimKeywordNames::TIE_POINT_LON_KW, ll_lon);
-            }
-            
-            lookup = kwl.find("ulymap");
-            if (lookup)
-            {
-               ossim_uint32 centerY = ossimString(lookup).toFloat32();
-               ll_lat = centerY + lines * yCellSize;
-               geoKwl.add(ossimKeywordNames::TIE_POINT_LAT_KW, ll_lat);
-            }
-            
-            kwl.add(ossimKeywordNames::ORIGIN_LATITUDE_KW, ll_lat);
-            
-            geoKwl.add(ossimKeywordNames::TYPE_KW, "ossimEquDistCylProjection");
-            
-            geoKwl.add(ossimKeywordNames::DATUM_KW, ossimDatumFactory::instance()->wgs84()->
-                       code());
-            
-            ossimRefPtr<ossimProjection> proj = ossimMapProjectionFactory::instance()->
-               createProjection(geoKwl);
-
-            if ( proj.valid() )
-            {
-               theGeometry->setProjection(proj.get());
-            }
-         }
-         else if (xmlFile.exists())
-         {
-            ossimFgdcXmlDoc file;
-            if ( file.open(xmlFile) )
-            {
-               ossimRefPtr<ossimProjection> proj = file.getProjection();
-               if ( !proj.valid() )
-               {
-                  proj = file.getGridCoordSysProjection();
-               }
-               if ( proj.valid() )
-               {
-                  theGeometry->setProjection(proj.get());
-               }
-            }
-            
-         } // xml file exist...
-
-      } // Matches second if ( !theGeometry.valid() )
-
-      //---
-      // WARNING:
-      // Must have theGeometry at this point or the next call to
-      // ossimImageGeometryRegistry::extendGeometry will put us in an infinite loop
-      // as it does a recursive call back to ossimImageHandler::getImageGeometry().
-      //---         
-      
-      // Check for set projection.
-      if ( !theGeometry->getProjection() )
-      {
-         // Try factories for projection.
-         ossimImageGeometryRegistry::instance()->extendGeometry(this);
-      }
-
-      // Set image things the geometry object should know about.
-      initImageParameters( theGeometry.get() );
-      
-   } // Matches first if ( !theGeometry.valid() )
-
-   return theGeometry;
-}
-
-bool ossimGeneralRasterTileSource::isBandSelector() const
-{
-   bool result = false;
-   if ( ( m_rasterInfo.interleaveType() == OSSIM_BSQ_MULTI_FILE ) ||
-        ( m_rasterInfo.interleaveType() == OSSIM_BIP ) ||
-        ( m_rasterInfo.interleaveType() == OSSIM_BIL ) )
-   {
-      result = true;
-   }
-
-   if ( result && theOverview.valid() )
-   {
-      result = theOverview->isBandSelector();
-   }   
-   return result;
-}
-
-bool ossimGeneralRasterTileSource::setOutputBandList(const std::vector<ossim_uint32>& band_list)
-{
-   bool result = false;
-   if ( isBandSelector() )
-   {
-      // Making a copy as passed in list could be our m_outputBandList.
-      std::vector<ossim_uint32> inputList = band_list;
-      result = ossimImageHandler::setOutputBandList( inputList, m_outputBandList );
-      if ( result && m_tile.valid() )
-      {
-         if ( m_tile->getNumberOfBands() != m_outputBandList.size() )
-         {
-            m_tile = 0; // Force a reinitialize on next getTile.
-         }
-      }
-   }
-   return result;
-}
-
-void ossimGeneralRasterTileSource::getOutputBandList(std::vector<ossim_uint32>& bandList) const
-{
-   bandList = m_outputBandList;
-}
-
-void ossimGeneralRasterTileSource::allocateTile()
-{
-   m_tile = 0;
-   ossim_uint32 bands = 0;
-   if ( m_outputBandList.empty() )
-   {
-      bands = m_rasterInfo.numberOfBands();
-   }
-   else
-   {
-      bands = m_outputBandList.size();
-   }
-   
-   if ( bands )
-   {
-      m_tile = ossimImageDataFactory::instance()->create(
-         this, m_rasterInfo.getImageMetaData().getScalarType(), bands );
-      
-      if ( m_tile.valid() )
-      {
-         // These values can be overridden by loadState...
-         for(ossim_uint32 band = 0; band < bands; ++ band)
-         {
-            m_tile->setNullPix(m_rasterInfo.getImageMetaData().getNullPix(band), band);
-            m_tile->setMinPix(m_rasterInfo.getImageMetaData().getMinPix(band), band);
-            m_tile->setMaxPix(m_rasterInfo.getImageMetaData().getMaxPix(band), band);
-         }
-         m_tile->initialize(); // This does a makeBlank().
-      }
-   }
-}
-
-void ossimGeneralRasterTileSource::allocateBuffer( const ossimImageData* tile )
-{
-   if( m_buffer )
-   {
-      delete [] m_buffer;
-      m_buffer = 0;
-      m_bufferSizeInPixels = 0; // Must zero out for check in getTile method.
-   }
-   if ( m_lineBuffer )
-   {
-      delete [] m_lineBuffer;
-      m_lineBuffer = 0;
-   }
-   
-   if ( tile )
-   {
-      // Store the size of the buffer in pixels for swapping bytes.
-      m_bufferSizeInPixels = tile->getSize();
-      if ( m_bufferSizeInPixels )
-      {
-         // Initialize buffer. This is bytes, not pixels.
-         m_buffer = new ossim_uint8[ tile->getSizeInBytes() ];
-         
-         // Zero out the buffer rect.
-         m_bufferRect = ossimIrect(0, 0, 0, 0);
-      }
-
-      if ( m_rasterInfo.interleaveType() == OSSIM_BIP )
-      {
-         // Big enough to hold a whole line all bands.
-         ossim_uint32 widthInBytes =
-            tile->getWidth() * m_rasterInfo.getImageMetaData().getNumberOfBands() *
-            m_rasterInfo.getImageMetaData().getBytesPerPixel();
-         
-         m_lineBuffer = new ossim_uint8[ widthInBytes ];
-      }
-   }
-}
diff --git a/src/ossim/imaging/ossimGeoAnnotationBitmap.cpp b/src/ossim/imaging/ossimGeoAnnotationBitmap.cpp
deleted file mode 100644
index 4930a4d..0000000
--- a/src/ossim/imaging/ossimGeoAnnotationBitmap.cpp
+++ /dev/null
@@ -1,204 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimGeoAnnotationBitmap.cpp 17195 2010-04-23 17:32:18Z dburken $
-
-#include <ossim/imaging/ossimGeoAnnotationBitmap.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/projection/ossimImageProjectionModel.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimIrect.h>
-
-RTTI_DEF1(ossimGeoAnnotationBitmap,
-          "ossimGeoAnnotationBitmap",
-          ossimGeoAnnotationObject)
-   
-ossimGeoAnnotationBitmap::ossimGeoAnnotationBitmap(
-   const ossimGpt& center,
-   ossimRefPtr<ossimImageData> imageData,
-   unsigned char r,
-   unsigned char g,
-   unsigned char b)
-   :ossimGeoAnnotationObject(r, g, b),
-    theCenterPoint(center),
-    theProjectedPoint(0,0),
-    theImageData(NULL)
-{
-   if(imageData.valid() &&
-      (imageData->getScalarType()==OSSIM_UCHAR))
-   {
-      theImageData = imageData;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimGeoAnnotationBitmap::ossimGeoAnnotationBitmap\n"
-         << "Invalid image data passed to ossimGeoAnnotationBitmap "
-         << "constructor" << endl;
-   }
-}
-
-ossimGeoAnnotationBitmap::ossimGeoAnnotationBitmap(
-   const ossimGeoAnnotationBitmap& rhs)
-   :
-   ossimGeoAnnotationObject(rhs),
-   theCenterPoint(theCenterPoint),
-   theProjectedPoint(theProjectedPoint),
-   theImageData(rhs.theImageData)
-{
-}
-
-ossimGeoAnnotationBitmap::~ossimGeoAnnotationBitmap()
-{
-}
-
-ossimObject* ossimGeoAnnotationBitmap::dup()const
-{
-   return new ossimGeoAnnotationBitmap(*this);
-}
-
-bool ossimGeoAnnotationBitmap::intersects(const ossimDrect& rect) const
-{
-   if(theImageData.valid())
-   {
-      return theImageData->getImageRectangle().intersects(rect);
-   }
-   
-   return false;
-}
-
-ossimGeoAnnotationBitmap* ossimGeoAnnotationBitmap::getNewClippedObject(
-   const ossimDrect& /* rect */)const
-{
-   ossimGeoAnnotationBitmap* result = (ossimGeoAnnotationBitmap*)dup();
-   
-   ossimNotify(ossimNotifyLevel_WARN)
-      << "ossimGeoAnnotationBitmap::getNewClippedObject WRNING: "
-      << "not implemented" << std::endl;
-   
-   return result;
-}
-
-void ossimGeoAnnotationBitmap::applyScale(double /* x */, double /* y */)
-{
-     ossimNotify(ossimNotifyLevel_WARN)
-      << "ossimGeoAnnotationBitmap::applyScale WRNING: not implemented"
-      << std::endl; 
-}
-
-
-std::ostream& ossimGeoAnnotationBitmap::print(std::ostream& out)const
-{
-   out << "center:    " << theCenterPoint << endl;
-   return out;
-}
-
-void ossimGeoAnnotationBitmap::draw(ossimRgbImage& anImage)const
-{
-   ossimRefPtr<ossimImageData> destination = anImage.getImageData();
-
-   if(!destination)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimGeoAnnotationBitmap::draw\n"
-         << "ERROR: can't draw annotation bitmap to NULL buffer" << endl;
-      
-      return;
-   }
-   ossimIrect destinationRect = destination->getImageRectangle();
-   ossimIrect srcRect         = theImageData->getImageRectangle();
-   if(!srcRect.intersects(destinationRect))
-   {
-      return;
-   }
-   ossimIrect clipRect        = srcRect.clipToRect(destinationRect);
-   
-   long clipHeight = (long)clipRect.height();
-   long clipWidth  = (long)clipRect.width();
-
-
-   if(clipRect.width() != 1.0 &&
-      clipRect.height() != 1.0)
-   {         
-      long destinationOffset   = (long)(((clipRect.ul().y - destinationRect.ul().y)* destinationRect.width()) +
-                                        (clipRect.ul().x - destinationRect.ul().x));
-      long srcOffset   = (long)(((clipRect.ul().y - srcRect.ul().y)*srcRect.width()) +
-                         (clipRect.ul().x - srcRect.ul().x));
-      long destinationIndex = destinationOffset;
-      long srcIndex         = srcOffset;
-      long num_bands        = destination->getNumberOfBands();
-      ossim_int32 s_width = (ossim_int32)srcRect.width();
-      ossim_int32 d_width = (ossim_int32)destinationRect.width();
-      
-      num_bands = num_bands > 3? 3:num_bands;
-      
-      const ossim_uint8* imageDataBuf = static_cast<const ossim_uint8*>(theImageData->getBuf());
-      unsigned char colorArray[3];
-      colorArray[0] = theRed;
-      colorArray[1] = theGreen;
-      colorArray[2] = theBlue;
-      for (long band=0; band<num_bands; ++band)
-      {
-         ossim_uint8* destinationBand = static_cast<ossim_uint8*>(destination->getBuf(band));
-         destinationIndex       = destinationOffset;
-         srcIndex               = srcOffset;
-         for(long line = 0; line < clipHeight; ++line)
-         {
-            for(long col = 0; col < clipWidth; ++col)
-            {
-               if(imageDataBuf[srcIndex + col])
-               {
-                  destinationBand[destinationIndex + col] = colorArray[band];
-               }
-            }
-            srcIndex += s_width;
-            destinationIndex += d_width;
-         }
-      } 
-   }
-}
-
-void ossimGeoAnnotationBitmap::getBoundingRect(ossimDrect& rect)const
-{
-   rect = ossimDrect(0,0,0,0);
-
-   if(theImageData.valid())
-   {
-      rect = theImageData->getImageRectangle();
-   }
-}
-
-void ossimGeoAnnotationBitmap::transform(ossimImageGeometry* projection)
-{
-   if(projection)
-   {
-      projection->worldToLocal(theCenterPoint, theProjectedPoint);
-      theProjectedPoint = ossimIpt(theProjectedPoint);
-      if(theImageData.valid())
-      {
-         ossimDpt origin(theProjectedPoint.x - theImageData->getWidth()/2.0,
-                         theProjectedPoint.y - theImageData->getHeight()/2.0);
-         
-         theImageData->setOrigin(origin);
-      }
-   }
-}
-
-void ossimGeoAnnotationBitmap::setImageData(
-   ossimRefPtr<ossimImageData>& imageData)
-{
-   theImageData = imageData;
-}
-
-void ossimGeoAnnotationBitmap::computeBoundingRect()
-{
-   // nothing to be done since we don't support
-   // rotated bitmaps yet.
-}
diff --git a/src/ossim/imaging/ossimGeoAnnotationMultiEllipseObject.cpp b/src/ossim/imaging/ossimGeoAnnotationMultiEllipseObject.cpp
deleted file mode 100644
index a7816e4..0000000
--- a/src/ossim/imaging/ossimGeoAnnotationMultiEllipseObject.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimGeoAnnotationMultiEllipseObject.cpp 17195 2010-04-23 17:32:18Z dburken $
-
-#include <ossim/imaging/ossimGeoAnnotationMultiEllipseObject.h>
-#include <ossim/imaging/ossimAnnotationMultiEllipseObject.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/projection/ossimImageProjectionModel.h>
-#include <ossim/base/ossimException.h>
-
-ossimGeoAnnotationMultiEllipseObject::ossimGeoAnnotationMultiEllipseObject()
-   :ossimGeoAnnotationObject(),
-    theProjectedObject(new ossimAnnotationMultiEllipseObject()),
-    theWidthHeight(1,1),
-    theFillFlag(false)
-{
-   theProjectedObject->setFillFlag(false);
-}
-
-ossimGeoAnnotationMultiEllipseObject::ossimGeoAnnotationMultiEllipseObject(const std::vector<ossimGpt>& pointList,
-                                                                           const ossimDpt& widthHeight,
-                                                                           bool enableFill,
-                                                                           unsigned char r,
-                                                                           unsigned char g,
-                                                                           unsigned char b,
-                                                                           long thickness)
-   :ossimGeoAnnotationObject(r, g, b, thickness),
-    theProjectedObject(new ossimAnnotationMultiEllipseObject(widthHeight,enableFill, r, g, b, thickness )),
-    thePointList(pointList),
-    theWidthHeight(widthHeight),
-    theFillFlag(enableFill)
-{
-   
-}
-
-ossimGeoAnnotationMultiEllipseObject::ossimGeoAnnotationMultiEllipseObject(const ossimDpt& widthHeight,
-                                                                           bool enableFill,
-                                                                           unsigned char r,
-                                                                           unsigned char g,
-                                                                           unsigned char b,
-                                                                           long thickness)
-   :ossimGeoAnnotationObject(r, g, b,thickness),
-    theProjectedObject(new ossimAnnotationMultiEllipseObject(widthHeight,enableFill, r, g, b, thickness )),
-    theWidthHeight(widthHeight),
-    theFillFlag(enableFill)
-{
-}
-
-ossimGeoAnnotationMultiEllipseObject::ossimGeoAnnotationMultiEllipseObject(const ossimGeoAnnotationMultiEllipseObject& rhs)
-   :ossimGeoAnnotationObject(rhs),
-    theProjectedObject((ossimAnnotationMultiEllipseObject*)rhs.theProjectedObject->dup()),
-    thePointList(rhs.thePointList),
-    theWidthHeight(rhs.theWidthHeight),
-    theFillFlag(rhs.theFillFlag)
-{
-}
-   
-void ossimGeoAnnotationMultiEllipseObject::transform(
-   ossimImageGeometry* projection)
-{
-   const std::vector<ossimGpt>::size_type BOUNDS = thePointList.size();
-   theProjectedObject->resize((ossim_uint32)BOUNDS);
-   for(std::vector<ossimGpt>::size_type i = 0; i < BOUNDS; ++i)
-   {
-      projection->worldToLocal(thePointList[(int)i], (*theProjectedObject)[(int)i]);
-      
-   }
-   computeBoundingRect();
-}
-
-void ossimGeoAnnotationMultiEllipseObject::setFillFlag(bool fillFlag)
-{
-   theProjectedObject->setFillFlag(fillFlag);
-   theFillFlag = fillFlag;
-}
-
-void ossimGeoAnnotationMultiEllipseObject::setColor(unsigned char r,
-                                                    unsigned char g,
-                                                    unsigned char b)
-{
-   ossimAnnotationObject::setColor(r,g,b);
-   if(theProjectedObject)
-   {
-      theProjectedObject->setColor(r,g,b);
-   }
-}
-
-void ossimGeoAnnotationMultiEllipseObject::setThickness(ossim_uint8 thickness)
-{
-   ossimAnnotationObject::setThickness(thickness);
-   if(theProjectedObject)
-   {
-      theProjectedObject->setThickness(thickness);
-   }
-}
-
-
-void ossimGeoAnnotationMultiEllipseObject::applyScale(double /* x */,
-                                                      double /* y */)
-{
-   ossimNotify(ossimNotifyLevel_NOTICE)
-      << "ossimGeoAnnotationMultiEllipseObject::applyScale NOT IMPLEMENTED"
-      << endl;
-}
-
-void ossimGeoAnnotationMultiEllipseObject::draw(ossimRgbImage& anImage)const
-{
-   theProjectedObject->draw(anImage); 
-}
-
-bool ossimGeoAnnotationMultiEllipseObject::intersects(const ossimDrect& rect)const
-{
-   return theProjectedObject->intersects(rect);
-}
-
-void ossimGeoAnnotationMultiEllipseObject::setWidthHeight(const ossimDpt& widthHeight)
-{
-   theWidthHeight = widthHeight;
-   theProjectedObject->setWidthHeight(widthHeight);
-}
-
-std::ostream& ossimGeoAnnotationMultiEllipseObject::print(std::ostream& out)const
-{
-   theProjectedObject->print(out);
-   return out;
-}
-
-void ossimGeoAnnotationMultiEllipseObject::getBoundingRect(ossimDrect& rect)const
-{
-   theProjectedObject->getBoundingRect(rect);
-}
-
-void ossimGeoAnnotationMultiEllipseObject::computeBoundingRect()
-{
-   theProjectedObject->computeBoundingRect();
-}
-
-ossimObject* ossimGeoAnnotationMultiEllipseObject::dup()const
-{
-   return new ossimGeoAnnotationMultiEllipseObject(*this);
-}
-
-ossimAnnotationObject* ossimGeoAnnotationMultiEllipseObject::getNewClippedObject(
-   const ossimDrect& /* rect */)const
-{
-   ossimNotify(ossimNotifyLevel_NOTICE)
-      << "ossimGeoAnnotationMultiEllipseObject::getNewClippedObject "
-      << "NOT IMPLEMENTED" << endl;
-   return (ossimAnnotationObject*)dup();
-}
-
-void ossimGeoAnnotationMultiEllipseObject::addPoint(const ossimGpt& point)
-{
-   thePointList.push_back(point);
-}
-
-void ossimGeoAnnotationMultiEllipseObject::setPoint(int i,
-                                                    const ossimGpt& point)
-{
-   thePointList[i] = point;
-}
-
-void ossimGeoAnnotationMultiEllipseObject::resize(ossim_uint32 newSize)
-{
-   if(newSize)
-   {
-      thePointList.resize(newSize);
-   }
-}
diff --git a/src/ossim/imaging/ossimGeoPolyCutter.cpp b/src/ossim/imaging/ossimGeoPolyCutter.cpp
deleted file mode 100644
index c772e80..0000000
--- a/src/ossim/imaging/ossimGeoPolyCutter.cpp
+++ /dev/null
@@ -1,322 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author: Garrett Potts (gpotts at imagelinks.com)
-//
-//*************************************************************************
-// $Id: ossimGeoPolyCutter.cpp 21631 2012-09-06 18:10:55Z dburken $
-
-#include <ossim/imaging/ossimGeoPolyCutter.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <algorithm>
-
-static const char* NUMBER_POLYGONS_KW = "number_polygons";
-
-RTTI_DEF2(ossimGeoPolyCutter, "ossimGeoPolyCutter", ossimPolyCutter, ossimViewInterface)
-
-ossimGeoPolyCutter::ossimGeoPolyCutter()
-   : ossimPolyCutter(),
-     ossimViewInterface(NULL)
-{
-   ossimViewInterface::theObject = this;
-   theGeoPolygonList.push_back(ossimGeoPolygon());
-}
-
-ossimGeoPolyCutter::~ossimGeoPolyCutter()
-{
-}
-
-bool ossimGeoPolyCutter::saveState(ossimKeywordlist& kwl,
-                                const char* prefix)const
-{
-    ossimString newPrefix = prefix;
-
-    for(int i = 0; i < (int)thePolygonList.size();++i)
-    {
-       newPrefix = ossimString(prefix) + "geo_polygon" + ossimString::toString(i)+".";
-
-       theGeoPolygonList[i].saveState(kwl, newPrefix.c_str());
-    }
-    kwl.add(prefix,
-            NUMBER_POLYGONS_KW,
-            static_cast<ossim_uint32>(theGeoPolygonList.size()),
-            true);
-   
-    ossimString fillType = "null_inside";
-    if(theCutType == OSSIM_POLY_NULL_OUTSIDE)
-    {
-       fillType = "null_outside";
-    }
-    kwl.add(prefix,
-            "cut_type",
-            fillType.c_str(),
-            true);   
-
-    if(theViewProjection.valid())
-    {
-       ossimString viewPrefix = prefix;
-       viewPrefix += "view.";
-
-       theViewProjection->saveState(kwl, viewPrefix.c_str());
-    }
-  
-   return ossimImageSourceFilter::saveState(kwl, prefix);;
-}
-
-bool ossimGeoPolyCutter::loadState(const ossimKeywordlist& kwl,
-                                const char* prefix)
-{
-   ossimString copyPrefix(prefix);
-   ossimString polygons =  ossimString("^(") + copyPrefix + "geo_polygon[0-9]+.)";
-   vector<ossimString> keys =
-      kwl.getSubstringKeyList( polygons );
-   int offset = (int)(copyPrefix+"geo_polygon").size();
-   
-   std::vector<int> numberList(keys.size());
-   for(int idx = 0; idx < (int)numberList.size();++idx)
-   {
-      ossimString numberStr(keys[idx].begin() + offset,
-                            keys[idx].end());
-      numberList[idx] = numberStr.toInt();
-   }
-   std::sort(numberList.begin(), numberList.end());
-   
-   ossimString newPrefix;
-   thePolygonList.clear();
-   for(int i = 0; i < (int)numberList.size();++i)
-   {
-      theGeoPolygonList.push_back(ossimGeoPolygon());
-      newPrefix = copyPrefix+"geo_polygon"+ossimString::toString(numberList[i])+".";
-      theGeoPolygonList[i].loadState(kwl, newPrefix.c_str());
-   }
-   
-   const char* lookup = kwl.find(prefix,
-                                 "cut_type");
-   if(lookup)
-   {
-      theCutType = OSSIM_POLY_NULL_INSIDE;
-      ossimString test = lookup;
-      if(test == "null_outside")
-      {
-         theCutType = OSSIM_POLY_NULL_OUTSIDE;
-      }
-   }
-   else
-   {
-      theCutType = OSSIM_POLY_NULL_OUTSIDE;
-   }
-
-   ossimString viewPrefix = prefix;
-   viewPrefix += "view.";
-   theViewProjection = new ossimImageGeometry();
-   if(theViewProjection->loadState(kwl,
-                                viewPrefix))
-   {
-      transformVertices();
-   }
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
-
-
-void ossimGeoPolyCutter::setPolygon(const vector<ossimDpt>& polygon,
-                                 ossim_uint32 index)
-{
-   if(theViewProjection.valid())
-   {
-      ossimPolyCutter::setPolygon(polygon);
-      invertPolygon(index);
-   }
-}
-
-void ossimGeoPolyCutter::setPolygon(const vector<ossimIpt>& polygon,
-                                 ossim_uint32 index)
-{
-   if(theViewProjection.valid())
-   {
-      ossimPolyCutter::setPolygon(polygon);
-      invertPolygon(index);
-   }
-}
-
-void ossimGeoPolyCutter::setPolygon(const vector<ossimGpt>& polygon,
-                                    ossim_uint32 i)
-{
-   if(i < theGeoPolygonList.size())
-   {
-      theGeoPolygonList[i] = polygon;
-
-      transformVertices(i);
-   }
-}
-
-void ossimGeoPolyCutter::setPolygon(const ossimGeoPolygon& polygon,
-                                    ossim_uint32 i)
-{
-   if(i < theGeoPolygonList.size())
-   {
-      theGeoPolygonList[i] = polygon.getVertexList();
-
-      transformVertices(i);
-   }
-}
-
-
-void ossimGeoPolyCutter::addPolygon(const vector<ossimGpt>& polygon)
-{
-   theGeoPolygonList.push_back(polygon);
-   thePolygonList.push_back(ossimPolygon());
-
-   if(theViewProjection.valid())
-   {
-      transformVertices(((int)theGeoPolygonList.size())-1);
-   }
-}
-
-void ossimGeoPolyCutter::addPolygon(const vector<ossimIpt>& polygon)
-{
-   if(theViewProjection.valid())
-   {
-      ossimPolyCutter::addPolygon(polygon);
-      theGeoPolygonList.push_back(ossimGeoPolygon());
-      invertPolygon((int)thePolygonList.size()-1);
-   }
-}
-
-void ossimGeoPolyCutter::addPolygon(const vector<ossimDpt>& polygon)
-{
-   if(theViewProjection.valid())
-   {
-      ossimPolyCutter::addPolygon(polygon);
-      theGeoPolygonList.push_back(ossimGeoPolygon());
-      invertPolygon((int)thePolygonList.size()-1);
-   }
-}
-
-void ossimGeoPolyCutter::addPolygon(const ossimPolygon& polygon)
-{
-   if(theViewProjection.valid())
-   {
-      ossimPolyCutter::addPolygon(polygon);
-      theGeoPolygonList.push_back(ossimGeoPolygon());
-      invertPolygon((int)thePolygonList.size()-1);
-   }
-}
-
-void ossimGeoPolyCutter::addPolygon(const ossimGeoPolygon& polygon)
-{
-   ossimPolyCutter::addPolygon(ossimPolygon());
-   theGeoPolygonList.push_back(polygon);
-   
-   if(theViewProjection.valid())
-   {
-      transformVertices(((int)theGeoPolygonList.size())-1);
-   }
-}
-
-void ossimGeoPolyCutter::invertPolygon(int polygonNumber)
-{
-   if(!theViewProjection) return;
-   
-   
-   ossimPolygon& poly      = thePolygonList[polygonNumber];
-   ossimGeoPolygon& gpoly  = theGeoPolygonList[polygonNumber];
-   
-   gpoly.clear();
-   gpoly.resize(poly.getVertexCount());
-   int j = 0;
-   for(j = 0; j < (int)poly.getVertexCount(); ++j)
-   {
-      theViewProjection->localToWorld(poly[j], gpoly[j]);
-   }
-}
-
-bool ossimGeoPolyCutter::setView(ossimObject* baseObject)
-{
-   
-   ossimProjection* proj = dynamic_cast<ossimProjection*>(baseObject);
-   if(proj)
-   {
-      theViewProjection = new ossimImageGeometry(0, proj);
-      transformVertices();
-   }
-   else 
-   {
-      theViewProjection = dynamic_cast<ossimImageGeometry*>(baseObject);
-   }
-
-   return theViewProjection.valid();
-}
-
-ossimObject* ossimGeoPolyCutter::getView()
-{
-   return theViewProjection.get();
-}
-
-const ossimObject* ossimGeoPolyCutter::getView()const
-{
-   return theViewProjection.get();
-}
-
-void ossimGeoPolyCutter::transformVertices()
-{
-   if(!theViewProjection) return;
-   
-   if(theGeoPolygonList.size())
-   {
-      if(theGeoPolygonList.size() != thePolygonList.size())
-      {
-         thePolygonList.resize(theGeoPolygonList.size());
-      }
-      int i = 0;
-      int j = 0;
-      for(i = 0; i < (int)theGeoPolygonList.size(); ++i)
-      {
-         ossimGeoPolygon& gpoly = theGeoPolygonList[i];
-         ossimPolygon&    poly  = thePolygonList[i];
-         int nvert = (int)gpoly.size();
-         if((int)poly.getVertexCount() != nvert)
-         {
-            poly.resize(nvert);
-         }
-         for(j = 0; j < nvert; ++j)
-         {
-//	   ossimDpt error;
-            theViewProjection->worldToLocal(gpoly[j], poly[j]);
-//	    theViewProjection->getRoundTripError(ossimIpt(poly[j]), error);
-//	    poly[j] = poly[j] + error;
-            poly[j] = ossimDpt(ossim::round<int>(poly[j].x),
-                               ossim::round<int>(poly[j].y));
-         }
-      }
-      computeBoundingRect();
-   }
-}
-
-void ossimGeoPolyCutter::transformVertices(int i)
-{
-   if(!theViewProjection) return;
-   
-   ossimGeoPolygon& gpoly = theGeoPolygonList[i];
-   ossimPolygon&    poly  = thePolygonList[i];
-   int nvert = (int)gpoly.size();
-   if((int)poly.getVertexCount() != nvert)
-   {
-      poly.resize(nvert);
-   }
-   int j = 0;
-   for(j = 0; j < nvert; ++j)
-   {
-//     ossimDpt error;
-     theViewProjection->worldToLocal(gpoly[j], poly[j]);
-//     theViewProjection->getRoundTripError(poly[j], error);
-//     poly[j] = poly[j] + error;
-     poly[j] = ossimDpt(ossim::round<int>(poly[j].x),
-			ossim::round<int>(poly[j].y));
-   }
-   
-   computeBoundingRect();
-}
diff --git a/src/ossim/imaging/ossimGridRemapEngineFactory.cpp b/src/ossim/imaging/ossimGridRemapEngineFactory.cpp
deleted file mode 100644
index c725a8d..0000000
--- a/src/ossim/imaging/ossimGridRemapEngineFactory.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-//*****************************************************************************
-// FILE: ossimGridRemapEngineFactory.cc
-//
-// Copyright (C) 2001 ImageLinks, Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Contains implementation of class ossimGridRemapEngineFactory
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimGridRemapEngineFactory.cpp 9094 2006-06-13 19:12:40Z dburken $
-
-#include <ossim/imaging/ossimGridRemapEngineFactory.h>
-#include <ossim/imaging/ossimHsvGridRemapEngine.h>
-#include <ossim/imaging/ossimRgbGridRemapEngine.h>
-#include <ossim/imaging/ossimMonoGridRemapEngine.h>
-
-//*****************************************************************************
-//  STATIC METHOD: ossimGridRemapEngineFactory::create()
-//  
-//*****************************************************************************
-ossimGridRemapEngine* ossimGridRemapEngineFactory::create(const char* s)
-{
-   if (!s)
-      return 0;
-   
-   if (strcmp(s, "ossimHsvGridRemapEngine") == 0)
-      return new ossimHsvGridRemapEngine;
-
-   else  if (strcmp(s, "ossimRgbGridRemapEngine") == 0)
-      return new ossimRgbGridRemapEngine;
-
-   else  if (strcmp(s, "ossimMonoGridRemapEngine") == 0)
-      return new ossimMonoGridRemapEngine;
-
-   return 0;
-}
-
diff --git a/src/ossim/imaging/ossimHistoMatchRemapper.cpp b/src/ossim/imaging/ossimHistoMatchRemapper.cpp
deleted file mode 100644
index 2a4448f..0000000
--- a/src/ossim/imaging/ossimHistoMatchRemapper.cpp
+++ /dev/null
@@ -1,349 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimHistoMatchRemapper.cpp 15833 2009-10-29 01:41:53Z eshirschorn $
-#include <ossim/imaging/ossimHistoMatchRemapper.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimKeywordlist.h>
-
-ossimHistoMatchRemapper::ossimHistoMatchRemapper()
-   : ossimImageSourceFilter()
-{
-   theBlankTile = NULL;
-}
-
-ossimHistoMatchRemapper::ossimHistoMatchRemapper(ossimImageSource* inputSource,
-                                                 const vector<double>& targetMeanPerBand,
-                                                 const vector<double>& targetSigmaPerBand,
-                                                 const vector<double>& inputMeanPerBand,
-                                                 const vector<double>& inputSigmaPerBand)
-   : ossimImageSourceFilter(inputSource),
-     theTargetMeanPerBand(targetMeanPerBand),
-     theTargetSigmaPerBand(targetSigmaPerBand),
-     theInputMeanPerBand(inputMeanPerBand),
-     theInputSigmaPerBand(inputSigmaPerBand)
-{
-   theBlankTile = NULL;
-}
-
-
-ossimHistoMatchRemapper::~ossimHistoMatchRemapper()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimHistoMatchRemapper::getTile(
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   ossimRefPtr<ossimImageData> tile;
-   if(theInputConnection)
-   {
-      tile = theInputConnection->getTile(tileRect, resLevel);
-   }
-   if(!tile.valid())
-   {
-      return NULL;
-   }
-   if((tile.valid() &&
-       ((tile->getDataObjectStatus()==OSSIM_NULL) ||
-        (tile->getDataObjectStatus()==OSSIM_EMPTY))))
-      
-   {
-      return tile;
-   }
-
-   theBlankTile->setOrigin(tileRect.ul());
-   ossim_uint32 numberOfBands = (ossim_uint32)theInputMeanPerBand.size();
-
-   numberOfBands = numberOfBands>tile->getNumberOfBands()?tile->getNumberOfBands():numberOfBands;
-   double result = 0;
-   if(isSourceEnabled())
-   {
-      long offsetBound = (long)(tile->getWidth()*tile->getHeight());
-      if(tile->getScalarType() == OSSIM_UCHAR)
-      {
-         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
-         {
-            unsigned char* buf = static_cast<unsigned char*>(tile->getBuf(band));
-            for(long offset=0; offset < offsetBound;++offset)
-            {
-               // if the input has no deviation we will just
-               // do a shift to the target mean
-               if(fabs(theInputSigmaPerBand[band]) < FLT_EPSILON)
-               {
-                  result = transLean(buf[offset],
-                                     theInputMeanPerBand[band],
-                                     theTargetMeanPerBand[band],
-                                     0,
-                                     255);
-               }
-               else
-               {
-                  result = transLeanStretch(buf[offset],
-                                            theInputMeanPerBand[band],
-                                            theInputSigmaPerBand[band],
-                                            theTargetMeanPerBand[band],
-                                            theTargetSigmaPerBand[band],
-                                            0,
-                                            255);
-               }
-               result = ((result>255)?255:result);
-               result = ((result<0)?0:result);
-               
-               buf[offset] = (unsigned char)result;
-            }
-         }
-      }
-   }
-
-   return tile;
-}
-
-void ossimHistoMatchRemapper::initialize()
-{
-   if(!theInputConnection)
-   {
-      return;
-   }
-   theBlankTile = new ossimImageData(this,
-                                     theInputConnection->getOutputScalarType(),
-                                     theInputConnection->getNumberOfOutputBands());
-}
-
-const vector<double>& ossimHistoMatchRemapper::getInputMeanValues()const
-{
-   return theInputMeanPerBand;
-}
-
-const vector<double>& ossimHistoMatchRemapper::getInputSigmaValues()const
-{
-   return theInputSigmaPerBand;
-}
-
-const vector<double>& ossimHistoMatchRemapper::getTargetMeanValues()const
-{
-   return theTargetMeanPerBand;
-}
-
-const vector<double>& ossimHistoMatchRemapper::getTargetSigmaValues()const
-{
-   return theTargetSigmaPerBand;
-}
-
-void ossimHistoMatchRemapper::setInputMeanValues(const vector<double>& newValues)
-{
-   theInputMeanPerBand = newValues;
-}
-
-void ossimHistoMatchRemapper::setInputSigmaValues(const vector<double>& newValues)
-{
-   theInputSigmaPerBand = newValues;
-}
-
-void ossimHistoMatchRemapper::setTargetMeanValues(const vector<double>& newValues)
-{
-   theTargetMeanPerBand = newValues;
-}
-
-void ossimHistoMatchRemapper::setTargetSigmaValues(const vector<double>& newValues)
-{
-   theTargetSigmaPerBand = newValues;
-}
-
-double  ossimHistoMatchRemapper::transLean   // returns vOut
-(
-   double vIn         //!< input value to be transformed
-   , double vBias       //!< bias value to be removed
-   , double vTarget     //!< value that will replace bias
-   , double vMin        //!< minimum valid value of vIn (inclusive)
-   , double vMax        //!< maximum valid value of vIn (inclusive)
-)
-{
-   // max change
-   const double vDelta = vTarget - vBias;
-   double weight=0.0;
-   
-   // weight max change dependend on proximity to end points
-   if (vIn <= vBias)
-   {
-      weight = fabs((vIn - vMin) / (vBias - vMin));
-   }
-   else
-   {
-      weight = fabs((vMax - vIn) / (vMax - vBias));
-   }
-   return  (vIn + (vDelta * weight));
-};
-
-double  ossimHistoMatchRemapper::transLeanStretch   // returns vOut
-        (
-          double vIn              //!< input value to be transformed
-        , double vBias            //!< bias value to be removed
-        , double vBiasStretch     //!< dispersion (+/-) about vBias
-        , double vTarget          //!< value that will replace bias
-        , double vTargetStretch   //!< dispersion (+/-) about vTarget
-        , double vMin             //!< minimum valid value of vIn (inclusive)
-        , double vMax             //!< maximum valid value of vIn (inclusive)
-        )
-{
-
-        // line segment end points
-        const double x1 = vMin;
-        const double x2 = vBias - vBiasStretch;
-        const double x3 = vBias + vBiasStretch;
-        const double x4 = vMax;
-        const double y1 = 0.0;
-        const double y2 = (vTarget + vTargetStretch) - (vBias + vBiasStretch);
-        const double y3 = (vTarget - vTargetStretch) - (vBias - vBiasStretch);
-        const double y4 = 0.0;
-
-
-        // perform appropriate linear lookup operation based on input value
-        double vOut = vIn;
-        if (vIn <= x2)
-        {
-                vOut = (vIn - x1) * (y2-y1)/(x2-x1) + y1 + vIn;
-        }
-        else
-        if (vIn <= x3)
-        {
-                vOut = (vIn - x2) * (y3-y2)/(x3-x2) + y2 + vIn;
-        }
-        else
-        {
-                vOut = (vIn - x3) * (y4-y3)/(x4-x3) + y3 + vIn;
-        }
-        
-        return vOut;
-}
-
-bool ossimHistoMatchRemapper::loadState(const ossimKeywordlist& kwl,
-                                        const char* prefix)
-{
-   theTargetMeanPerBand.clear();
-   theTargetSigmaPerBand.clear();
-   theInputMeanPerBand.clear();
-   theInputSigmaPerBand.clear();
-   ossim_uint32 result = kwl.getNumberOfSubstringKeys(ossimString(prefix) + "target_mean[0-9]");
-   ossim_uint32 numberOfMatches=0;
-   ossim_uint32 index=0;
-
-   // load target mean
-   while(numberOfMatches < result)
-   {
-      ossimString key = prefix;
-      key += ossimString("target_mean");
-      key += ossimString::toString(index);
-      const char* lookup = kwl.find(key.c_str());
-      if(lookup)
-      {
-         theTargetMeanPerBand.push_back(ossimString(lookup).toDouble());
-         ++numberOfMatches;
-      }
-      ++index;
-   }
-   numberOfMatches = 0;
-   index = 0;
-   result = kwl.getNumberOfSubstringKeys(ossimString(prefix) + "target_sigma[0-9]");
-   // load target sigma
-   while(numberOfMatches < result)
-   {
-      ossimString key = prefix;
-      key += ossimString("target_sigma");
-      key += ossimString::toString(index);
-      const char* lookup = kwl.find(key.c_str());
-      if(lookup)
-      {
-         theTargetSigmaPerBand.push_back(ossimString(lookup).toDouble());
-         ++numberOfMatches;
-      }
-      ++index;
-   }
-
-   numberOfMatches = 0;
-   index = 0;
-   result = kwl.getNumberOfSubstringKeys(ossimString(prefix) + "input_mean[0-9]");
-   // load input mean
-   while(numberOfMatches < result)
-   {
-      ossimString key = prefix;
-      key += ossimString("input_mean");
-      key += ossimString::toString(index);
-      const char* lookup = kwl.find(key.c_str());
-      if(lookup)
-      {
-         theInputMeanPerBand.push_back(ossimString(lookup).toDouble());
-         ++numberOfMatches;
-      }
-      ++index;
-   }
-   
-   numberOfMatches = 0;
-   index = 0;
-   result = kwl.getNumberOfSubstringKeys(ossimString(prefix) + "input_sigma[0-9]");
-   // load input sigma
-   while(numberOfMatches < result)
-   {
-      ossimString key = prefix;
-      key += ossimString("input_sigma");
-      key += ossimString::toString(index);
-      const char* lookup = kwl.find(key.c_str());
-      if(lookup)
-      {
-         theInputSigmaPerBand.push_back(ossimString(lookup).toDouble());
-         ++numberOfMatches;
-      }
-      ++index;
-   }
-   
-   return true;
-}
-
-bool ossimHistoMatchRemapper::saveState(ossimKeywordlist& kwl,
-                                        const char* prefix)
-{
-   ossim_uint32 index = 1;
-   for(index=1;index <= theTargetMeanPerBand.size();++index)
-   {
-      ossimString key = ossimString("target_mean") + ossimString::toString(index);
-      kwl.add(prefix,
-              key.c_str(),
-              theTargetMeanPerBand[index-1],
-              true);
-   }
-   for(index=1;index <= theTargetSigmaPerBand.size();++index)
-   {
-      ossimString key = ossimString("target_sigma") + ossimString::toString(index);
-      kwl.add(prefix,
-              key.c_str(),
-              theTargetSigmaPerBand[index-1],
-              true);
-   }
-   for(index=1;index <= theInputMeanPerBand.size();++index)
-   {
-      ossimString key = ossimString("input_mean") + ossimString::toString(index);
-      kwl.add(prefix,
-              key.c_str(),
-              theInputMeanPerBand[index-1],
-              true);
-   }
-   for(index=1;index <= theInputSigmaPerBand.size();++index)
-   {
-      ossimString key = ossimString("input_sigma") + ossimString::toString(index);
-      kwl.add(prefix,
-              key.c_str(),
-              theInputSigmaPerBand[index-1],
-              true);
-   }
-   return true;  
-}
-                       
diff --git a/src/ossim/imaging/ossimHistogramEqualization.cpp b/src/ossim/imaging/ossimHistogramEqualization.cpp
deleted file mode 100644
index 8586d21..0000000
--- a/src/ossim/imaging/ossimHistogramEqualization.cpp
+++ /dev/null
@@ -1,538 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimHistogramEqualization.cpp 14110 2009-03-14 15:46:40Z dburken $
-#include <ossim/imaging/ossimHistogramEqualization.h>
-#include <ossim/base/ossimMultiResLevelHistogram.h>
-#include <ossim/base/ossimMultiBandHistogram.h>
-#include <ossim/base/ossimHistogram.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimKeyword.h>
-
-RTTI_DEF1(ossimHistogramEqualization, "ossimHistogramEqualization", ossimImageSourceHistogramFilter)
-   
-static const ossimKeyword HISTOGRAM_INVERSE_FLAG_KW("inverse_flag",
-                                                    "specifies whether the inverse should be done for the getTile");
-
-static ossimTrace traceDebug("ossimHistogramEqualization:debug");
-
-ossimHistogramEqualization::ossimHistogramEqualization()
-   : ossimImageSourceHistogramFilter(),
-     theTile(NULL),
-     theAccumulationHistogram(NULL),
-     theInverseFlag(false)
-{
-}
-
-ossimHistogramEqualization::ossimHistogramEqualization(ossimImageSource* inputSource,
-                                                       ossimRefPtr<ossimMultiResLevelHistogram> histogram)
-   : ossimImageSourceHistogramFilter(inputSource, histogram),
-     theTile(0),
-     theAccumulationHistogram(0),
-     theInverseFlag(false)
-{
-   if(getHistogram().valid())
-   {
-      theAccumulationHistogram = getHistogram()->createAccumulationLessThanEqual();
-      initializeLuts();
-   }
-}
-
-ossimHistogramEqualization::ossimHistogramEqualization(ossimImageSource* inputSource,
-                                                       ossimRefPtr<ossimMultiResLevelHistogram> histogram,
-                                                       bool inverseFlag)
-   : ossimImageSourceHistogramFilter(inputSource, histogram),
-     theTile(NULL),
-     theAccumulationHistogram(0),
-     theInverseFlag(inverseFlag)
-{
-   if(getHistogram().valid())
-   {
-      theAccumulationHistogram = getHistogram()->createAccumulationLessThanEqual();
-      initializeLuts();
-   }
-}
-
-ossimHistogramEqualization::~ossimHistogramEqualization()
-{
-   deleteLuts();
-}
-
-ossimRefPtr<ossimImageData> ossimHistogramEqualization::getTile(
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   if(!theInputConnection)
-   {
-      return NULL;
-   }
-   
-   ossimRefPtr<ossimImageData> inputTile = theInputConnection->getTile(tileRect,
-                                                                       resLevel);
-
-   if(!inputTile.valid()) return inputTile;
-   
-   if (!isSourceEnabled())
-   {
-      return inputTile;
-   }
-   
-   if(!theTile.valid())
-   {
-      allocate(); // First time through...
-   }
-   
-   // if (!theTile) throw exception!
-   
-   // Set the origin, resize if needed of the output tile.
-   theTile->setImageRectangleAndBands(inputTile->getImageRectangle(),
-				      inputTile->getNumberOfBands());
-   
-   if( !inputTile.valid() ||
-       inputTile->getDataObjectStatus() == OSSIM_NULL ||
-       inputTile->getDataObjectStatus() == OSSIM_EMPTY )
-   {
-      return theTile;
-   }
-
-   if(!theAccumulationHistogram)
-   {
-      computeAccumulationHistogram();
-   }
-   if(theForwardLut.size() == 0 ||
-      theInverseLut.size() == 0)
-   {
-      initializeLuts();
-   }
-   if((theForwardLut.size() == 0) ||
-      (theInverseLut.size() == 0))
-   {
-      return inputTile;
-   }
-   
-   switch(inputTile->getScalarType())
-   {
-      case OSSIM_UCHAR:
-      {
-         return runEqualizationAlgorithm(static_cast<ossim_uint8>(0),
-                                         inputTile);
-      }
-      case OSSIM_USHORT11:
-      case OSSIM_UINT16:
-      {
-         return runEqualizationAlgorithm(static_cast<ossim_uint16>(0),
-                                         inputTile);
-      }
-      case OSSIM_SINT16:
-      {
-         return runEqualizationAlgorithm(static_cast<ossim_sint16>(0),
-                                         inputTile);
-      }
-      case OSSIM_UINT32:
-      {
-         return runEqualizationAlgorithm(static_cast<ossim_uint32>(0),
-                                         inputTile);
-      }
-      case OSSIM_SINT32:
-      {
-         return runEqualizationAlgorithm(static_cast<ossim_sint32>(0),
-                                         inputTile);
-      }
-      case OSSIM_FLOAT32:
-      {
-         return runEqualizationAlgorithm(static_cast<ossim_float32>(0),
-                                         inputTile);
-      }
-      case OSSIM_FLOAT64:
-      {
-         return runEqualizationAlgorithm(static_cast<ossim_float64>(0),
-                                         inputTile);
-      }
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimHistogramEqualization::getTile WARNING: Unsupported scalar type."
-            << endl;
-         break;
-      }
-   }
-   
-   return inputTile;
-}
-
-void ossimHistogramEqualization::setHistogram(ossimRefPtr<ossimMultiResLevelHistogram> histogram)
-{
-   ossimImageSourceHistogramFilter::setHistogram(histogram);
-   computeAccumulationHistogram();
-   initializeLuts();
-}
-
-bool ossimHistogramEqualization::saveState(ossimKeywordlist& kwl,
-                                           const char* prefix)const
-{
-   bool result = ossimImageSourceHistogramFilter::saveState(kwl, prefix);
-
-   kwl.add(prefix,
-           HISTOGRAM_INVERSE_FLAG_KW,
-           theInverseFlag,
-           true);
-   
-   return result;
-}
-
-bool ossimHistogramEqualization::loadState(const ossimKeywordlist& kwl,
-                                           const char* prefix)
-{
-   static const char MODULE[] = "ossimHistogramEqualization::loadState";
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << " Entered..."
-         << "\nprefix:  " << prefix << endl;
-   }
-
-   const char* lookup = kwl.find(prefix,
-                                 HISTOGRAM_INVERSE_FLAG_KW);
-   if(lookup)
-   {
-      theInverseFlag = ossimString(lookup).toBool();
-   }
-   if(ossimImageSourceHistogramFilter::loadState(kwl, prefix))
-   {
-//      computeAccumulationHistogram();
-//      initializeLuts();
-   }
-   else
-   {
-      return false;
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:" << MODULE;
-      this->print(ossimNotify(ossimNotifyLevel_DEBUG));
-      ossimNotify(ossimNotifyLevel_DEBUG) << "\nExited..." << endl;
-   }
-   
-   return true;
-}
-
-void ossimHistogramEqualization::computeAccumulationHistogram()
-{
-   if(getHistogram().valid())
-   {
-      theAccumulationHistogram = getHistogram()->createAccumulationLessThanEqual();
-   }
-}
-
-template <class T>
-ossimRefPtr<ossimImageData> ossimHistogramEqualization::runEqualizationAlgorithm(T, ossimRefPtr<ossimImageData> tile)
-{
-   
-   if(!theAccumulationHistogram ||
-      !getHistogram())
-   {
-      return tile;
-   }
-
-   // for now we will always pull from res 0 information
-   ossimRefPtr<ossimMultiBandHistogram> histo = getHistogram()->getMultiBandHistogram(0);
-
-   if(histo.valid())
-   {
-      ossim_uint32 maxBands = ( (histo->getNumberOfBands() >
-                                 tile->getNumberOfBands())?
-                                tile->getNumberOfBands():
-                                histo->getNumberOfBands());
-      
-      long offsetUpperBound = tile->getHeight()*tile->getWidth();
-
-      for(ossim_uint32 band = 0; band < maxBands; ++band)
-      {
-         ossimRefPtr<ossimHistogram> bandHisto = histo->getHistogram(band);
-         T* buf = static_cast<T*>(tile->getBuf(band));
-         double *histoLut = band<theForwardLut.size()?theForwardLut[band]:NULL;
-         ossim_uint32 actualBand = theBandList[band];
-         if(bandHisto.valid())
-         {
-            if(buf&&histoLut&&(actualBand <  histo->getNumberOfBands()))
-            {
-               if(theInverseFlag)
-               {
-                  histoLut = theInverseLut[actualBand];
-               }
-               if(histoLut)
-               {
-                  if(tile->getDataObjectStatus() == OSSIM_FULL)
-                  {
-                     T minPix = (T)tile->getMinPix(actualBand);
-                     T maxPix = (T)tile->getMaxPix(actualBand);
-                     for(long offset = 0; offset < offsetUpperBound; ++offset)
-                     {
-                        ossim_int32 idx = bandHisto->GetIndex(buf[offset]);
-                           
-                        if(idx>=0)
-                        {
-                           T value = (T)(histoLut[idx]);
-
-                           //---
-                           // Assign clamping to min max.
-                           // 
-                           // ESH 03/2009 -- Clamping to within min-max fixed
-                           //--- 
-                           buf[offset] = value < minPix ? minPix :
-                              (value > maxPix ? maxPix : value);
-                        }
-                     }
-                  }
-                  else
-                  {
-                     T minPix  = (T)tile->getMinPix(actualBand);
-                     T maxPix  = (T)tile->getMaxPix(actualBand);
-                     T nullPix = (T)tile->getNullPix(actualBand);
-                     for(long offset = 0; offset < offsetUpperBound; ++offset)
-                     {
-                        ossim_int32 idx = bandHisto->GetIndex(buf[offset]);
-                        
-                        if((buf[offset]!=nullPix)&&(idx>=0))
-                        {
-                           T value = (T)(histoLut[idx]);
-
-                           //---
-                           // Assign clamping to min max.
-                           // 
-                           // ESH 03/2009 -- Clamping to within min-max fixed
-                           //--- 
-                           buf[offset] = value < minPix ? minPix :
-                              (value > maxPix ? maxPix : value);
-                        }
-                        else
-                        {
-                           buf[offset] = nullPix;
-                        }
-                     }
-                  }
-               }
-            }
-         }
-      }
-      
-      tile->validate();
-   }
-   
-   return tile;
-}
-
-void ossimHistogramEqualization::initialize()
-{
-   // Base class will recapture "theInputConnection".
-   ossimImageSourceHistogramFilter::initialize();
-   if(theTile.valid())
-   {
-      theTile = NULL;
-   }
-}
-
-void ossimHistogramEqualization::allocate()
-{
-   theBandList.clear();
-   
-   if(theTile.valid())
-   {
-      theTile = NULL;
-   }
-   
-   if(theInputConnection)
-   {
-      theInputConnection->getOutputBandList(theBandList);
-      theTile = ossimImageDataFactory::instance()->create(this, this);
-      if(theTile.valid())
-      {
-         theTile->initialize();
-      }
-   }
-}
-
-void ossimHistogramEqualization::initializeLuts()
-{
-   if(theForwardLut.size() != 0 ||
-      theInverseLut.size() != 0)
-   {
-      deleteLuts();
-   }
-   if(!theAccumulationHistogram||!getHistogram())
-   {
-      return;
-   }
-   ossimRefPtr<ossimMultiBandHistogram> accumHisto = theAccumulationHistogram->getMultiBandHistogram(0);
-   ossimRefPtr<ossimMultiBandHistogram> histogram  = getHistogram()->getMultiBandHistogram(0);
-   ossimKeywordlist kwl;
-   theAccumulationHistogram->saveState(kwl);
-
-   if(accumHisto.valid()&&histogram.valid())
-   {
-      long maxBands = accumHisto->getNumberOfBands();
-      
-      for(long band = 0; band < maxBands; ++band)
-      {
-         // first we grab pointers to the histogram and the accumulation
-         // histogram
-         ossimRefPtr<ossimHistogram> h  = accumHisto->getHistogram(band);
-         ossimRefPtr<ossimHistogram> h2 = histogram->getHistogram(band);
-
-         if(h.valid()&&h2.valid())
-         {
-            // lets get the number of indices.
-            ossim_uint32 numberOfIndices = (ossim_uint32)h2->GetRes();
-            vector<double> countForInverse(numberOfIndices);
-            
-            theForwardLut.push_back(new double[numberOfIndices]);
-            theInverseLut.push_back(new double[numberOfIndices]);
-            
-            // let's grab the counts array
-            const float* histoCounts = h->GetCounts();
-
-//         double maxIntensity      = h2->GetMaxVal();
-            double maxIntensity      = h2->GetRangeMax();
-            double maxCount          = h->GetMaxCount();
-            
-            // now pre compute the transforms
-            double *forwardLut = theForwardLut[band];
-            double *inverseLut = theInverseLut[band];
-            
-//         double minIntensity  = h2->GetMinVal();
-            double minIntensity  = h2->GetRangeMin();
-            double delta = maxIntensity-minIntensity;
-            ossim_uint32 idx = 0;
-            
-            // clear out the inverse
-            //
-            for(idx = 0; idx < numberOfIndices; ++ idx)
-            {
-               inverseLut[idx] = ossim::nan();
-            }
-            for(idx = 0; idx < numberOfIndices; ++ idx)
-            {
-               forwardLut[idx]   = minIntensity + (histoCounts[idx]/maxCount)*delta;
-               
-               ossim_int32 inverseIdx = h2->GetIndex(forwardLut[idx]);
-               if(inverseIdx >= 0)
-               {
-                  inverseLut[inverseIdx]   = minIntensity + delta*(idx/(ossim_float32)numberOfIndices);
-               }
-            }
-            
-            // now solve the inverse lut
-            //
-            ossim_uint32 idxStart = 0;
-            ossim_uint32 idxEnd = 0;
-            
-            while((ossim::isnan(inverseLut[idxEnd]))&&(idxEnd <numberOfIndices)){ ++idxEnd;}
-            if((idxStart!=idxEnd)&&(idxEnd<numberOfIndices))
-            {
-               std::fill(inverseLut,
-                         inverseLut+idxEnd,
-                         inverseLut[idxEnd]);
-            }
-            idxStart = numberOfIndices-1;
-            while((ossim::isnan(inverseLut[idxStart]))&&(idxStart > 0)){ --idxStart;}
-            if(idxStart !=0)
-            {
-               std::fill(inverseLut+idxStart,
-                         inverseLut+numberOfIndices,
-                         inverseLut[idxStart]);
-            }
-            
-            idxStart = 0;
-            idxEnd   = 0;
-            ossim_float32 valueStart = 0.0;
-            ossim_float32 valueEnd = 0.0;
-            
-            while(idxStart < numberOfIndices)
-            {
-               idxEnd = idxStart;
-               if(ossim::isnan(inverseLut[idxStart]))
-               {
-                  while(ossim::isnan(inverseLut[idxEnd])&&(idxEnd < (numberOfIndices-1))) ++idxEnd;
-                  double length = (idxEnd-idxStart)+1;
-                  valueEnd = inverseLut[idxEnd];
-                  double deltaVal = (valueEnd-valueStart);
-                  ossim_uint32 tempIdx = idxStart;
-                  ossim_float32 count = 1.0;
-                  double t = 0.0;
-                  while(tempIdx < idxEnd)
-                  {
-                     t = (count/length);
-                     t = t>1.0?1.0:t;
-                     inverseLut[tempIdx] = valueStart + deltaVal*t;
-                     ++count;
-                     ++tempIdx;
-                  }
-                  idxStart = idxEnd;
-                  valueStart = valueEnd;
-               }
-               else
-               {
-                  valueStart = inverseLut[idxStart];
-                  ++idxStart;
-               }
-            }
-         }
-      }
-   }
-}
-
-bool ossimHistogramEqualization::setHistogram(const ossimFilename& filename)
-{
-   return ossimImageSourceHistogramFilter::setHistogram(filename);
-}
-
-bool ossimHistogramEqualization::getInverseFlag()const
-{
-   return theInverseFlag;
-}
-
-void ossimHistogramEqualization::setInverseFlag(bool inverseFlag)
-{
-   theInverseFlag = inverseFlag;
-}
-
-void ossimHistogramEqualization::deleteLuts()
-{
-   long band = 0;
-   
-   for(band = 0; band < (long)theForwardLut.size(); ++band)
-   {
-      delete [] theForwardLut[band];
-   }
-   theForwardLut.clear();
-   
-   for(band = 0; band < (long)theInverseLut.size(); ++band)
-   {
-      delete [] theInverseLut[band];      
-   }
-   
-   theInverseLut.clear();
-}
-
-const ossimFilename& ossimImageSourceHistogramFilter::getHistogramFilename() const
-{
-   return theFilename;
-}
-
-std::ostream& ossimHistogramEqualization::print(std::ostream& out) const
-{
-   // Base class...
-   return ossimImageSourceHistogramFilter::print(out);
-}
diff --git a/src/ossim/imaging/ossimHistogramRemapper.cpp b/src/ossim/imaging/ossimHistogramRemapper.cpp
deleted file mode 100644
index cc4fe86..0000000
--- a/src/ossim/imaging/ossimHistogramRemapper.cpp
+++ /dev/null
@@ -1,1926 +0,0 @@
-//*******************************************************************
-// 
-// See top level LICENSE.txt file.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Histogram remapper class declaration.  Derived from ossimTableRemapper.
-//
-// Remaps a tile based on mode and histogram clip points.
-//
-//*************************************************************************
-// $Id: ossimHistogramRemapper.cpp 22187 2013-03-07 20:29:00Z dburken $
-
-#include <ossim/imaging/ossimHistogramRemapper.h>
-#include <ossim/base/ossimMultiResLevelHistogram.h>
-#include <ossim/base/ossimMultiBandHistogram.h>
-#include <ossim/base/ossimHistogram.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimHistogramSource.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <cstdlib>
-#include <iomanip>
-
-RTTI_DEF1(ossimHistogramRemapper, "ossimHistogramRemapper", ossimTableRemapper)
-
-static ossimTrace traceDebug("ossimHistogramRemapper:debug");
-
-static const char* STRETCH_MODE[] = { "linear_one_piece",
-                                      "linear_1std_from_mean",
-                                      "linear_2std_from_mean",
-                                      "linear_3std_from_mean",
-                                      "linear_auto_min_max",
-                                      "stretch_unknown" };
-
-static const char NORMALIZED_LOW_CLIP_POINT_KW[] = "normalized_low_clip_point";
-static const char NORMALIZED_HIGH_CLIP_POINT_KW[]="normalized_high_clip_point";
-static const char MID_POINT_KW[] = "mid_point";
-static const char MIN_OUTPUT_VALUE_KW[] = "min_output_value";
-static const char MAX_OUTPUT_VALUE_KW[] = "max_output_value";
-static const char STRETCH_MODE_KW[] = "stretch_mode";
-static const char HISTOGRAM_FILENAME_KW[] = "histogram_filename";
-
-#ifdef OSSIM_ID_ENABLED
-static const char OSSIM_ID[] = "$Id: ossimHistogramRemapper.cpp 22187 2013-03-07 20:29:00Z dburken $";
-#endif
-
-ossimHistogramRemapper::ossimHistogramRemapper()
-   :
-   ossimTableRemapper(),  // base class
-   theStretchMode(ossimHistogramRemapper::LINEAR_ONE_PIECE),
-   theDirtyFlag(false),
-   theHistogram(0),
-   theNormalizedLowClipPoint(),
-   theNormalizedHighClipPoint(),
-   theMidPoint(),
-   theMinOutputValue(),
-   theMaxOutputValue(),
-   theBandList(),
-   theBypassFlag(true),
-   theResetBandIndicesFlag(false)
-{
-   setNumberOfInputs(2);
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimHistogramRemapper::ossimHistogramRemapper entered...\n";
-#ifdef OSSIM_ID_ENABLED
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "OSSIM_ID:  " << OSSIM_ID << "\n";
-#endif      
-   }
-}
-
-ossimHistogramRemapper::~ossimHistogramRemapper()
-{
-}
-
-void ossimHistogramRemapper::initialize()
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimHistogramRemapper::initialize entered..." << endl;
-   }
-	
-
-   theResetBandIndicesFlag=(dynamic_cast<const ossimHistogramSource*>(getInput(1))!=0);
-   //---
-   // Call the base class initialize.
-   // Note:  This will reset "theInputConnection" if it changed...
-   //---
-   ossimTableRemapper::initialize();
-	
-   // Check the band list to see if it's changes.
-   vector<ossim_uint32> bandList;
-   getOutputBandList(bandList);
-   ossim_uint32 idx = 0;
-   // bool emptyOutput = theBandList.empty();
-
-   if(theResetBandIndicesFlag)
-   {
-      for(idx = 0; idx < bandList.size();++idx)
-      {
-         bandList[idx] = idx;
-      }
-   }
-   if (theBandList.size() != 0 && bandList.size())
-   {
-      if (theBandList.size() != bandList.size())
-      {
-         // Somethings changed.  Set everthing back.
-         initializeClips();
-         setNullCount();
-         theTable.clear();
-         theDirtyFlag = true;
-      }
-      else
-      {
-         // Sizes same check the order.
-         for(ossim_uint32 band = 0; band < theBandList.size(); ++band)
-         {
-            if (theBandList[band] != bandList[band])
-            {
-               //initializeClips();
-               //setNullCount();
-               theDirtyFlag = true;
-               break;
-            }            
-         }
-      }
-   }
-   else
-   {
-      initializeMinMaxOutput();
-   }
-
-   // Update the band list with the latest.
-   theBandList = bandList;
-	
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimHistogramRemapper::initialize exited..." << endl;
-   }
-   verifyEnabled();
-
-}
-
-void ossimHistogramRemapper::reset()
-{
-   // We could delete theTable to free up memory???
-   setStretchMode(LINEAR_ONE_PIECE, false);
-   initializeClips();
-   verifyEnabled();
-}
-
-void
-ossimHistogramRemapper::setHistogram(ossimRefPtr<ossimMultiResLevelHistogram> histogram)
-{
-   theHistogram = histogram;
-   setNullCount();
-	
-   // Note: initializeClips before setNullCount since it relies on clips.
-   initializeClips();
-   theTable.clear();
-   theDirtyFlag = true;
-}
-
-bool ossimHistogramRemapper::openHistogram(const ossimFilename& histogram_file)
-{
-   ossimRefPtr<ossimMultiResLevelHistogram> h = new ossimMultiResLevelHistogram();
-   if (h->importHistogram(histogram_file))
-   {
-      setHistogram(h);
-      return true;
-   }
-	
-   // Import failed if here!
-   return false;
-}
-
-ossimRefPtr<ossimImageData> ossimHistogramRemapper::getTile(
-   const ossimIrect& tile_rect,
-   ossim_uint32 resLevel)
-{
-   
-#if 0 /* Please leave for serious debug. (drb) */
-   cout << "\ntheEnableFlag: " << theEnableFlag
-        << "\ntheBypassFlag: " << theBypassFlag
-        << "\ntheDirtyFlag:  " << theDirtyFlag
-        << endl;
-#endif
-   ossimRefPtr<ossimImageData> result = 0;
-
-   makeClean();
-   
-   if (!theBypassFlag||!theEnableFlag) // Not bypassed...
-   {
-      // Base handles the rest...
-      result = ossimTableRemapper::getTile(tile_rect, resLevel);
-   }
-   else if (theInputConnection)
-   {
-      // Fetch tile from pointer from the input source.
-      result = theInputConnection->getTile(tile_rect, resLevel);
-   }
-
-   return result;
-}
-
-void ossimHistogramRemapper::setLowNormalizedClipPoint(const ossim_float64& clip)
-{
-   const ossim_uint32 BANDS = getNumberOfInputBands();
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      setLowNormalizedClipPoint(clip, band);
-   }
-}
-
-void ossimHistogramRemapper::makeClean()
-{
-   if (theEnableFlag && theDirtyFlag) // Enabled and dirty.
-   {
-      // Always rebuild table if dirty.
-      buildTable();
-      
-      // Check for internal bypass.
-      verifyEnabled();
-
-      // Always clear the dirty flag.
-      theDirtyFlag = false;
-   }
-}
-
-void ossimHistogramRemapper::setLowNormalizedClipPoint(const ossim_float64& clip,
-                                                  ossim_uint32 zero_based_band)
-{
-   const ossim_uint32 BANDS = getNumberOfInputBands();
-	
-   if (zero_based_band >= BANDS)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHistogramRemapper::setLowNormalizedClipPoint ERROR:"
-         << "\nband " << zero_based_band << " is out of range!"
-         << "\nhighest band:  " << (BANDS-1) << endl;
-   }
-	
-   if (theNormalizedLowClipPoint.size() != BANDS)
-   {
-      initializeClips();
-   }
-	
-   if ( clip != theNormalizedLowClipPoint[zero_based_band] &&
-        clip < theNormalizedHighClipPoint[zero_based_band] )
-   {
-      theDirtyFlag = true;
-      theNormalizedLowClipPoint[zero_based_band] = clip;
-   }
-}
-
-void
-ossimHistogramRemapper::setHighNormalizedClipPoint(const ossim_float64& clip)
-{
-   const ossim_uint32 BANDS = getNumberOfInputBands();
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      setHighNormalizedClipPoint(clip, band);
-   }
-}
-
-void ossimHistogramRemapper::setHighNormalizedClipPoint(
-   const ossim_float64& clip, ossim_uint32 zero_based_band)
-{
-   const ossim_uint32 BANDS = getNumberOfInputBands();
-	
-   if (zero_based_band >= BANDS)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHistogramRemapper::setHighNormalizedClipPoint ERROR:"
-         << "\nband " << zero_based_band << " is out of range!"
-         << "\nhighest band:  " << (BANDS-1) << endl;
-   }
-	
-   if (theNormalizedHighClipPoint.size() != BANDS)
-   {
-      initializeClips();
-   }
-	
-   if ( clip != theNormalizedHighClipPoint[zero_based_band] &&
-        clip > theNormalizedLowClipPoint[zero_based_band] )
-   {
-      theDirtyFlag = true;
-      theNormalizedHighClipPoint[zero_based_band] = clip;
-   }
-}
-
-void ossimHistogramRemapper::setLowClipPoint(const ossim_float64& clip)
-{
-   const ossim_uint32 BANDS = getNumberOfInputBands();
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      setLowClipPoint(clip, band);
-   }
-}
-
-void ossimHistogramRemapper::setLowClipPoint(const ossim_float64& clip,
-                                             ossim_uint32 zero_based_band)
-{
-   // allow the call to getHistogram to happen this way we can calculate a histogram if 
-   // a histosource is connected to this object
-   //
-   //   if (!theHistogram) return;
-	
-   ossimRefPtr<ossimHistogram> h = getHistogram(zero_based_band);
-   if (h.valid())
-   {
-      ossim_float64 d = h->getLowFractionFromValue(clip);
-      if (ossim::isnan(d) == false)
-      {
-         setLowNormalizedClipPoint(d, zero_based_band);
-      }
-   }
-}
-
-void ossimHistogramRemapper::setHighClipPoint(const ossim_float64& clip)
-{
-   const ossim_uint32 BANDS = getNumberOfInputBands();
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      setHighClipPoint(clip, band);
-   }
-}
-
-void ossimHistogramRemapper::setHighClipPoint(const ossim_float64& clip,
-                                              ossim_uint32 zero_based_band)
-{
-   // allow the call to getHistogram to happen this way we can calculate a histogram if 
-   // a histosource is connected to this object
-   //
-   //   if (!theHistogram) return;
-	
-   ossimRefPtr<ossimHistogram> h = getHistogram(zero_based_band);
-   if (h.valid())
-   {
-      ossim_float64 d = h->getHighFractionFromValue(clip);
-      if (ossim::isnan(d) == false)
-      {
-         d = 1.0-d;
-         setHighNormalizedClipPoint(d, zero_based_band);
-      }
-   }
-}
-
-void ossimHistogramRemapper::setMidPoint(const ossim_float64& value)
-{
-   const ossim_uint32 BANDS = getNumberOfInputBands();
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      setMidPoint(value, band);
-   }
-}
-
-void ossimHistogramRemapper::setMidPoint(const ossim_float64& value,
-                                         ossim_uint32 zero_based_band)
-{
-   const ossim_uint32 BANDS = getNumberOfInputBands();
-	
-   if (zero_based_band >= BANDS)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHistogramRemapper::setMidPoint ERROR:"
-         << "\nband " << zero_based_band << " is out of range!"
-         << "\nhighest band:  " << (BANDS-1) << endl;
-   }
-	
-   if (theMidPoint.size() != BANDS)
-   {
-      initializeClips();
-   }
-	
-   if (theMidPoint[zero_based_band] != value)
-   {
-      theDirtyFlag = true;
-      theMidPoint[zero_based_band] = value;
-   }
-}
-
-void ossimHistogramRemapper::setMinOutputValue(const ossim_float64& value)
-{
-   const ossim_uint32 BANDS = getNumberOfInputBands();
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      setMinOutputValue(value, band);
-   }
-}
-
-void ossimHistogramRemapper::setMinOutputValue(const ossim_float64& value,
-                                               ossim_uint32 zero_based_band)
-{
-   if (theInputConnection)
-   {
-      const ossim_uint32 BANDS = getNumberOfInputBands();
-      
-      if (zero_based_band >= BANDS)
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimHistogramRemapper::setMinOutputValue ERROR:"
-            << "\nband " << zero_based_band << " is out of range!"
-            << "\nhighest band:  " << (BANDS-1) << endl;
-      }
-      
-      if (theMinOutputValue.size() != BANDS)
-      {
-         initializeClips();
-      }
-      
-      if ( value != theMinOutputValue[zero_based_band] &&
-           value >= theInputConnection->getMinPixelValue(zero_based_band) &&
-           value < theMaxOutputValue[zero_based_band] )
-      {
-         theDirtyFlag = true;
-         theMinOutputValue[zero_based_band] = value;
-      }
-   }
-}
-
-void ossimHistogramRemapper::setMaxOutputValue(const ossim_float64& value)
-{
-   const ossim_uint32 BANDS = getNumberOfInputBands();
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      setMaxOutputValue(value, band);
-   }
-}
-
-void ossimHistogramRemapper::setMaxOutputValue(const ossim_float64& value,
-                                               ossim_uint32 zero_based_band)
-{
-   if (theInputConnection)
-   {
-      const ossim_uint32 BANDS = getNumberOfInputBands();
-      
-      if (zero_based_band >= BANDS)
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimHistogramRemapper::setMidPoint ERROR:"
-            << "\nband " << zero_based_band << " is out of range!"
-            << "\nhighest band:  " << (BANDS-1) << endl;
-      }
-      
-      if (theMaxOutputValue.size() != BANDS)
-      {
-         initializeClips();
-      }
-      
-      if ( value != theMaxOutputValue[zero_based_band] &&
-           value <= theInputConnection->getMaxPixelValue(zero_based_band) &&
-           value >  theMinOutputValue[zero_based_band] )
-      {
-         theDirtyFlag = true;
-         theMaxOutputValue[zero_based_band] = value;
-      }
-   }
-}
-
-ossim_float64 ossimHistogramRemapper::getLowNormalizedClipPoint(ossim_uint32 zero_based_band) const
-{
-   if (theNormalizedLowClipPoint.size() == 0 ||
-       zero_based_band >= getNumberOfInputBands())
-   {
-      return ossim::nan();
-   }
-   
-   if (zero_based_band >= theNormalizedLowClipPoint.size())
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHistogramRemapper::getLowNormalizedClipPoint ERROR:"
-         << "\nband " << zero_based_band << " is out of range!"
-         << "\nhighest band:  " << (theNormalizedLowClipPoint.size()-1)
-         << endl;
-      return ossim::nan();
-   }
-	
-   return theNormalizedLowClipPoint[zero_based_band];
-}
-
-ossim_float64 ossimHistogramRemapper::getLowNormalizedClipPoint() const
-{
-   if (theNormalizedLowClipPoint.size() == 0)
-   {
-      return ossim::nan();
-   }
-   
-   ossim_float64 d = 0.0;
-   const ossim_uint32 BANDS = (ossim_uint32)theNormalizedLowClipPoint.size();
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      d += getLowNormalizedClipPoint(band);
-   }
-   
-   return (d / BANDS);
-}
-
-ossim_float64 ossimHistogramRemapper::getHighNormalizedClipPoint(ossim_uint32 zero_based_band) const
-{
-   if (theNormalizedHighClipPoint.size() == 0 ||
-       zero_based_band >= getNumberOfInputBands())
-   {
-      return ossim::nan();
-   }
-   
-   if (zero_based_band >= theNormalizedHighClipPoint.size())
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHistogramRemapper::getHighNormalizedClipPoint ERROR:"
-         << "\nband " << zero_based_band << " is out of range!"
-         << "\nhighest band:  " << (theNormalizedHighClipPoint.size()-1)
-         << endl;
-      return ossim::nan();
-   }
-	
-   return theNormalizedHighClipPoint[zero_based_band];
-}
-
-ossim_float64 ossimHistogramRemapper::getHighNormalizedClipPoint() const
-{
-   if (theNormalizedHighClipPoint.size() == 0)
-   {
-      return ossim::nan();
-   }
-   
-   ossim_float64 d = 0.0;
-   const ossim_uint32 BANDS = (ossim_uint32)theNormalizedHighClipPoint.size();
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      d += getHighNormalizedClipPoint(band);
-   }
-   
-   return (d / BANDS);
-}
-
-ossim_float64 ossimHistogramRemapper::getLowClipPoint(ossim_uint32 zero_based_band) const
-{
-   if(zero_based_band >= getNumberOfInputBands() ||
-      !theHistogram || zero_based_band >= theNormalizedLowClipPoint.size())
-   {
-      return ossim::nan();
-   }
-	
-   if (theNormalizedLowClipPoint[zero_based_band] == 0.0)
-   {
-      return getMinPixelValue(zero_based_band);
-   }   
-	
-   ossimRefPtr<ossimHistogram> h = getHistogram(zero_based_band);
-   if (h.valid())
-   {
-      ossim_float64 d =
-         h->LowClipVal(theNormalizedLowClipPoint[zero_based_band]);
-		
-      return floor(d);
-   }
-	
-   return ossim::nan();
-}
-
-ossim_float64 ossimHistogramRemapper::getLowClipPoint() const
-{
-   if (theNormalizedLowClipPoint.size() == 0 || !theHistogram)
-   {
-      return ossim::nan();
-   }
-   
-   ossim_float64 d = 0.0;
-   const ossim_uint32 BANDS = getNumberOfInputBands();
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      d += getLowClipPoint(band);
-   }
-   
-   return (d / BANDS);
-}
-
-ossim_float64 ossimHistogramRemapper::getHighClipPoint(ossim_uint32 zero_based_band) const
-{
-   if(zero_based_band >= getNumberOfInputBands() ||
-      !theHistogram || zero_based_band >= theNormalizedHighClipPoint.size())
-   {
-      return ossim::nan();
-   }
-	
-   if (theNormalizedHighClipPoint[zero_based_band] == 1.0)
-   {
-      return getMaxPixelValue(zero_based_band);
-   }
-	
-   ossimRefPtr<ossimHistogram> h = getHistogram(zero_based_band);
-   if (h.valid())
-   {
-      ossim_float64 d =
-         h->HighClipVal(1.0-theNormalizedHighClipPoint[zero_based_band]);
-      return ceil(d);
-   }
-   
-   return ossim::nan();
-}
-
-ossim_float64 ossimHistogramRemapper::getHighClipPoint() const
-{
-   if (theNormalizedHighClipPoint.size() == 0 || !theHistogram)
-   {
-      return ossim::nan();
-   }
-   
-   ossim_float64 d = 0.0;
-   const ossim_uint32 BANDS = getNumberOfInputBands();
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      d += getHighClipPoint(band);
-   }
-   
-   return (d / BANDS);
-}
-
-ossim_float64 ossimHistogramRemapper::getMidPoint(ossim_uint32 zero_based_band) const
-{
-   if (theMidPoint.size() == 0 ||
-       zero_based_band >= getNumberOfInputBands())
-   {
-      return ossim::nan();
-   }
-   
-   if (zero_based_band >= theMidPoint.size())
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHistogramRemapper::getMidPoint ERROR:"
-         << "\nband " << zero_based_band << " is out of range!"
-         << "\nhighest band:  " << (theMidPoint.size()-1)
-         << endl;
-      return ossim::nan();
-   }
-	
-   return theMidPoint[zero_based_band];
-}
-
-ossim_float64 ossimHistogramRemapper::getMidPoint() const
-{
-   if (theMidPoint.size() == 0)
-   {
-      return ossim::nan();
-   }
-   
-   ossim_float64 d = 0.0;
-   const ossim_uint32 BANDS = (ossim_uint32)theMidPoint.size();
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      d += getMidPoint(band);
-   }
-   
-   return (d / BANDS);
-}
-
-ossim_float64 ossimHistogramRemapper::getMinOutputValue(ossim_uint32 zero_based_band) const
-{
-   if (theMinOutputValue.size() == 0 ||
-       zero_based_band >= getNumberOfInputBands())
-   {
-      return ossim::nan();
-   }
-   
-   if (zero_based_band >= theMinOutputValue.size())
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHistogramRemapper::getMinOutputValue ERROR:"
-         << "\nband " << zero_based_band << " is out of range!"
-         << "\nhighest band:  " << (theMinOutputValue.size()-1)
-         << endl;
-      return ossim::nan();
-   }
-	
-   return theMinOutputValue[zero_based_band];
-}
-
-ossim_float64 ossimHistogramRemapper::getMinOutputValue() const
-{
-   if (theMinOutputValue.size() == 0)
-   {
-      return ossim::nan();
-   }
-   
-   ossim_float64 d = 0.0;
-   const ossim_uint32 BANDS = (ossim_uint32)theMinOutputValue.size();
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      d += getMinOutputValue(band);
-   }
-   
-   return (d / BANDS);
-}
-
-ossim_float64 ossimHistogramRemapper::getMaxOutputValue(ossim_uint32 zero_based_band) const
-{
-   if (theMaxOutputValue.size() == 0 ||
-       zero_based_band >= getNumberOfInputBands())
-   {
-      return ossim::nan();
-   }
-   
-   if (zero_based_band >= theMaxOutputValue.size())
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHistogramRemapper::getMaxOutputValue ERROR:"
-         << "\nband " << zero_based_band << " is out of range!"
-         << "\nhighest band:  " << (theMaxOutputValue.size()-1)
-         << endl;
-      return ossim::nan();
-   }
-	
-   return theMaxOutputValue[zero_based_band];
-}
-
-ossim_float64 ossimHistogramRemapper::getMaxOutputValue() const
-{
-   if (theMaxOutputValue.size() == 0)
-   {
-      return ossim::nan();
-   }
-   
-   ossim_float64 d = 0.0;
-   const ossim_uint32 BANDS = (ossim_uint32)theMaxOutputValue.size();
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      d += getMaxOutputValue(band);
-   }
-   
-   return (d / BANDS); 
-}
-
-bool ossimHistogramRemapper::loadState(const ossimKeywordlist& kwl,
-                                       const char* prefix)
-{
-   static const char MODULE[] = "ossimHistogramRemapper::loadState";
-   if (traceDebug())
-   {
-      CLOG << " Entered..."
-           << "\nprefix:  " << prefix << endl;
-   }
-   // Load the base class states...
-   bool status = ossimTableRemapper::loadState(kwl, prefix);
-   if (status)
-   {
-      const char* lookup = 0;
-      ossimString keyword;
-      
-      lookup = kwl.find(prefix, HISTOGRAM_FILENAME_KW);
-      if (lookup)
-      {
-         if ( !openHistogram(ossimFilename(lookup)) )
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimHistogramRemapper::loadState ERROR!"
-               << "\nCould not open file:  " << lookup
-               << "\nReturning..." << endl;
-            return false;
-         }
-      }
-     
-      //---
-      // Get the band specific keywords.
-      // NOTES:
-      // -  This loadState assumes the all keywords will have the same number
-      //    of bands.
-      // -  The set methods cannot be used here as there may not be a connection
-      //    yet that they need.
-      //---
-      ossim_uint32 bands = 0;
-      lookup = kwl.find(prefix, ossimKeywordNames::NUMBER_BANDS_KW);
-      if (lookup)
-      {
-         bands = ossimString::toUInt32(lookup);
-      }
-      else  // For backwards compatibility.
-      {
-         // Use the low clip to find number of bands...
-         keyword = NORMALIZED_LOW_CLIP_POINT_KW;
-         bands = kwl.numberOf(prefix, keyword);
-      }
-      //if(!bands&&theHistogram.valid())
-     // {
-     //    bands = theHistogram->getNumberOfBands();
-     // }
-
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimHistogramRemapper::loadState DEBUG:"
-            << "\nBands:  " << bands
-            << endl;
-      }
-      if (bands)
-      {
-         // Start with fresh clips.
-         initializeClips(bands);
-        for (ossim_uint32 band = 0; band < bands; ++band)
-         {
-            // Get the low clip.
-            keyword = NORMALIZED_LOW_CLIP_POINT_KW;
-            keyword += ".";
-            keyword += ossimKeywordNames::BAND_KW;
-            keyword += ossimString::toString(band+1);
-            lookup = kwl.find(prefix, keyword);
-            if(lookup)
-            {
-               theNormalizedLowClipPoint[band] = atof(lookup);
-            }
-            
-            // Get the high clip.
-            keyword = NORMALIZED_HIGH_CLIP_POINT_KW;
-            keyword += ".";
-            keyword += ossimKeywordNames::BAND_KW;
-            keyword += ossimString::toString(band+1);
-            lookup = kwl.find(prefix, keyword);
-            if(lookup)
-            {
-               theNormalizedHighClipPoint[band] = atof(lookup);
-            }
-            
-            // Get the mid point.
-            keyword = MID_POINT_KW;
-            keyword += ".";
-            keyword += ossimKeywordNames::BAND_KW;
-            keyword += ossimString::toString(band+1);
-            lookup = kwl.find(prefix, keyword);
-            if(lookup)
-            {
-               theMidPoint[band] = atof(lookup);
-            }
-            
-            // Get the min output value.
-            keyword = MIN_OUTPUT_VALUE_KW;
-            keyword += ".";
-            keyword += ossimKeywordNames::BAND_KW;
-            keyword += ossimString::toString(band+1);
-            lookup = kwl.find(prefix, keyword);
-            if(lookup)
-            {
-               theMinOutputValue[band] = atof(lookup);
-            }
-            
-            // Get the max output value.
-            keyword = MAX_OUTPUT_VALUE_KW;
-            keyword += ".";
-            keyword += ossimKeywordNames::BAND_KW;
-            keyword += ossimString::toString(band+1);
-            lookup = kwl.find(prefix, keyword);
-            if(lookup)
-            {
-               theMaxOutputValue[band] = atof(lookup);
-            }      
-         }
-     }
-     
-      lookup = kwl.find(prefix, STRETCH_MODE_KW);
-      if (lookup)
-      {
-         ossimString s = lookup;
-         s.downcase();
-         if (s == STRETCH_MODE[ossimHistogramRemapper::LINEAR_ONE_PIECE])
-         {
-            theStretchMode = ossimHistogramRemapper::LINEAR_ONE_PIECE;
-         }
-         else if (s == STRETCH_MODE[ossimHistogramRemapper::LINEAR_1STD_FROM_MEAN])
-         {
-            theStretchMode = ossimHistogramRemapper::LINEAR_1STD_FROM_MEAN;
-         }
-         else if (s == STRETCH_MODE[ossimHistogramRemapper::LINEAR_2STD_FROM_MEAN])
-         {
-            theStretchMode = ossimHistogramRemapper::LINEAR_2STD_FROM_MEAN;
-         }
-         else if (s == STRETCH_MODE[ossimHistogramRemapper::LINEAR_3STD_FROM_MEAN])
-         {
-            theStretchMode = ossimHistogramRemapper::LINEAR_3STD_FROM_MEAN;
-         }
-         else if (s == STRETCH_MODE[ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX])
-         {
-            theStretchMode = ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX;
-         }
-         else
-         {
-            theStretchMode = ossimHistogramRemapper::STRETCH_UNKNOWN;
-         }
-      }
-
-      // Always set the dirty flag.
-      theDirtyFlag = true;
-   }
-   verifyEnabled();
-
-   if (traceDebug())
-   {
-      CLOG << "ossimHistogramRemapper::loadState DEBUG:"
-           << *this
-           << "\nExited..." << endl;
-   }
-   return status;
-}
-
-bool ossimHistogramRemapper::saveState(ossimKeywordlist& kwl,
-                                       const char* prefix) const
-{
-   if (theHistogram.valid())
-   {
-      kwl.add(prefix,
-              HISTOGRAM_FILENAME_KW,
-              theHistogram->getHistogramFile().c_str(),
-              true);
-   }
-   kwl.add(prefix,
-           STRETCH_MODE_KW,
-           getStretchModeString().c_str(),
-           true);
-	
-   const ossim_uint32 BANDS = (ossim_uint32)theNormalizedLowClipPoint.size();
-   
-   kwl.add(prefix,
-           ossimKeywordNames::NUMBER_BANDS_KW,
-           BANDS,
-           true);
-	
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      ossimString keyword;
-		
-      // Save the low clip.
-      keyword = NORMALIZED_LOW_CLIP_POINT_KW;
-      keyword += ".";
-      keyword += ossimKeywordNames::BAND_KW;
-      keyword += ossimString::toString(band+1);
-      kwl.add(prefix,
-              keyword,
-              theNormalizedLowClipPoint[band],
-              true);
-		
-      // Save the high clip.
-      keyword = NORMALIZED_HIGH_CLIP_POINT_KW;
-      keyword += ".";
-      keyword += ossimKeywordNames::BAND_KW;
-      keyword += ossimString::toString(band+1);
-      kwl.add(prefix,
-              keyword,
-              theNormalizedHighClipPoint[band],
-              true);
-		
-      // Save the mid point.
-      keyword = MID_POINT_KW;
-      keyword += ".";
-      keyword += ossimKeywordNames::BAND_KW;
-      keyword += ossimString::toString(band+1);
-      kwl.add(prefix,
-              keyword,
-              theMidPoint[band],
-              true);
-		
-      // Save the min output value.
-
-      keyword = MIN_OUTPUT_VALUE_KW;
-      keyword += ".";
-      keyword += ossimKeywordNames::BAND_KW;
-      keyword += ossimString::toString(band+1);
-      kwl.add(prefix,
-              keyword,
-              theMinOutputValue[band],
-              true);
-		
-      // Save the max output value.
-      keyword = MAX_OUTPUT_VALUE_KW;
-      keyword += ".";
-      keyword += ossimKeywordNames::BAND_KW;
-      keyword += ossimString::toString(band+1);
-
-      kwl.add(prefix,
-              keyword,
-              theMaxOutputValue[band],
-              true);
-   }
-
-   return ossimTableRemapper::saveState(kwl, prefix);
-}
-
-void ossimHistogramRemapper::setStretchMode(StretchMode mode,
-                                            bool rebuildTable)
-{
-   if (theStretchMode != mode)
-   {
-      theStretchMode = mode;
-
-      if (rebuildTable)
-      {
-         buildTable();
-
-         // Check for internal bypass.
-         verifyEnabled();
-
-         // Clear the dirty flag.
-         theDirtyFlag = false;
-      }
-      else
-      {
-         theDirtyFlag = true;
-      }
-   }
-}
-
-void ossimHistogramRemapper::setStretchModeAsString(const ossimString& mode,
-                                                    bool rebuildTable)
-{
-   if( mode == "linear_one_piece")
-   {
-      setStretchMode(LINEAR_ONE_PIECE, rebuildTable);
-   }
-   else if(mode == "linear_1std_from_mean")
-   {
-      setStretchMode(LINEAR_1STD_FROM_MEAN, rebuildTable);
-   }
-   else if(mode == "linear_2std_from_mean")
-   {
-      setStretchMode(LINEAR_2STD_FROM_MEAN, rebuildTable);
-   }
-   else if(mode == "linear_3std_from_mean")
-   {
-      setStretchMode(LINEAR_3STD_FROM_MEAN, rebuildTable);
-   }
-   else if(mode == "linear_auto_min_max")
-   {
-      setStretchMode(LINEAR_AUTO_MIN_MAX, rebuildTable);
-   }
-   else
-   {
-      setStretchMode(STRETCH_UNKNOWN, false);
-   }   
-}
-
-void ossimHistogramRemapper::buildTable()
-{
-   setupTable();
-   switch(theStretchMode)
-   {
-      case ossimHistogramRemapper::LINEAR_ONE_PIECE:
-      {
-         buildLinearTable();
-         break;
-      }
-      case ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX:
-      {
-         buildAutoLinearMinMaxTable();
-         break;
-      }
-      case ossimHistogramRemapper::LINEAR_1STD_FROM_MEAN:
-      case ossimHistogramRemapper::LINEAR_2STD_FROM_MEAN:
-      case ossimHistogramRemapper::LINEAR_3STD_FROM_MEAN:
-         buildLinearTableStdFromMean();
-         break;
-         
-      default:
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimHistogramRemapper::buildTable ERROR!"
-               << "\nUnknown stretch type!" << endl;
-         }
-         break;
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimHistogramRemapper::buildTable DEBUG:\n" << endl;
-      print(ossimNotify(ossimNotifyLevel_DEBUG));
-   }
-}
-
-void ossimHistogramRemapper::buildLinearTable()
-{
-   switch (getOutputScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         buildLinearTable(ossim_uint8(0));
-         break;
-      }
-			
-      case OSSIM_USHORT11:
-      case OSSIM_UINT16:
-      {
-         buildLinearTable(ossim_uint16(0));
-         break;
-      }
-			
-      case OSSIM_SINT16:
-      {
-         buildLinearTable(ossim_sint16(0));
-         break;
-      }
-
-      case OSSIM_UINT32:
-      {
-         buildLinearTable(ossim_uint32(0));
-         break;
-      }
-			
-      case OSSIM_SINT32:
-      {
-         buildLinearTable(ossim_sint32(0));
-         break;
-      }
-			
-      case OSSIM_NORMALIZED_FLOAT:      
-      case OSSIM_FLOAT:
-      {
-         buildLinearTable(ossim_float32(0));
-         break;
-      }
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_DOUBLE:
-      {
-         buildLinearTable(ossim_float64(0));
-         break;
-      }
-			
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         if(traceDebug())
-         {
-            // Shouldn't hit this.
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimHistogramRemapper::buildLinearTable OSSIM_SCALAR_UNKNOWN!" << endl;
-         }
-         break;
-      }
-			
-   } // End of "switch (theTableType)"
-}
-
-void ossimHistogramRemapper::buildAutoLinearMinMaxTable()
-{
-   switch (getOutputScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         buildAutoLinearMinMaxTableTemplate(ossim_uint8(0));
-         break;
-      }
-			
-      case OSSIM_USHORT11:
-      case OSSIM_UINT16:
-      {
-         buildAutoLinearMinMaxTableTemplate(ossim_uint16(0));
-         break;
-      }
-			
-      case OSSIM_SINT16:
-      {
-         buildAutoLinearMinMaxTableTemplate(ossim_sint16(0));
-         break;
-      }
-			
-      case OSSIM_NORMALIZED_FLOAT:      
-      case OSSIM_FLOAT:
-      {
-         buildAutoLinearMinMaxTableTemplate(ossim_float32(0));
-         break;
-      }
-			
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_DOUBLE:
-      {
-         buildAutoLinearMinMaxTableTemplate(ossim_float64(0));
-         break;
-      }
-			
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         if(traceDebug())
-         {
-         // Shouldn't hit this.
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimTableRemapper::buildTable OSSIM_SCALAR_UNKNOWN!"
-               << endl;
-         }
-         break;
-      }
-			
-   } // End of "switch (theTableType)"
-}
-
-template <class T> void ossimHistogramRemapper::buildLinearTable(T /* dummy */)
-{
-   // This builds a native table.
-   theTableType = ossimTableRemapper::NATIVE;
-   
-   const ossim_uint32 BANDS = getNumberOfInputBands();
-
-   // Sanity check.
-   if (theNormalizedLowClipPoint.size() != BANDS || !getHistogram(0).valid())
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimHistogramRemapper::buildTable ERROR!"
-            << " Line:  " << __LINE__ << endl;
-      }
-      return;
-   }
-   
-   T* table = reinterpret_cast<T*>(&theTable.front());
-   ossim_uint32 index = 0;
-   
-   // Finally, build the table...
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      ossimRefPtr<ossimHistogram> h  = getHistogram(band);
-      if (h.get())
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "ossimHistogramRemapper::buildLinearTable DEBUG:"
-               << "\nband:  " << band
-               << "\nmean:  " << h->GetMean()
-               << "\nstddev:  " << h->GetStandardDev()
-               << endl;
-         }
-      }
-      else
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimHistogramRemapper::buildTable ERROR!"
-            << " Line:  " << __LINE__ << endl;
-         }
-         return; 
-      }
-		//std::cout << "MIN OUTPUT ==== " << theMinOutputValue[band] << std::endl;
-      const T NULL_PIX = static_cast<T>(getNullPixelValue(band));
-      const T MIN_PIX  = static_cast<T>(theMinOutputValue[band]);
-      const T MAX_PIX  = static_cast<T>(theMaxOutputValue[band]);
-
-      ossim_float64 min_clip_value =
-         h->LowClipVal(theNormalizedLowClipPoint[band]);
-      ossim_float64 max_clip_value =
-         h->HighClipVal(1.0-theNormalizedHighClipPoint[band]);
-      min_clip_value = floor(min_clip_value);
-      max_clip_value = ceil(max_clip_value);
-      ossim_float64 gain = (MAX_PIX-MIN_PIX+1)/(max_clip_value-min_clip_value);
-      
-      table[index] = NULL_PIX;
-      ++index;
-
-      for (ossim_uint32 pix = 1; pix < theTableBinCount; ++pix)
-      {
-         ossim_float64 p = pix;
-         if (p <= min_clip_value)
-         {
-            p = MIN_PIX;
-         }
-         else if (p >= max_clip_value)
-         {
-            p = MAX_PIX;
-         }
-         else
-         {
-            p = ((p - min_clip_value) * gain) + MIN_PIX - 1.0;
-         }
-
-         if(p == NULL_PIX)
-         {
-            p = MIN_PIX;
-         }
-         table[index] = static_cast<T>(p+0.5);
-			
-         ++index;
-      }
-   } // End of band loop.
-
-   // Clear the dirty flag so the table's not rebuilt on the next getTile.
-   theDirtyFlag = false;
-}
-
-template <class T> void ossimHistogramRemapper::buildAutoLinearMinMaxTableTemplate(T /* dummy */)
-{
-   const ossim_uint32 BANDS = getNumberOfInputBands();
-
-   // Sanity check.
-   if (theNormalizedLowClipPoint.size() != BANDS || !getHistogram(0).valid())
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimHistogramRemapper::buildAutoLinearMinMaxTableTemplate ERROR!"
-            << " Line:  " << __LINE__ << endl;
-      }
-      return;
-   }
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      ossimRefPtr<ossimHistogram> h      = getHistogram(band);
-      T nullPix = static_cast<T>(getNullPixelValue(band));
-      if(h.valid())
-      {
-         ossim_uint32 n     = h->GetRes();
-         ossim_float64 low  = h->GetMinVal();
-         ossim_float64 high = h->GetMaxVal();
-
- // std::cout << "LOW ========= " << low << std::endl;
-  //std::cout << "HIGH ========= " << high << std::endl;
-
-         double percentChange = .006;
-         if(n > 0)
-         {
-            double newCount       = 0.0;
-            double nextPercentage = 0.0;
-            double percentage = 0.0;
-            int idx = 0;
-            float * counts = h->GetCounts();
-            double count   = h->ComputeArea();
-				
-            for(idx = 0; idx < (ossim_int32)(n-1); ++idx)
-            {
-               if(nullPix != idx)
-               {
-                  newCount += counts[idx];
-               }
-               percentage = newCount / count;
-               nextPercentage =
-                  (newCount + counts[idx+1]) / count;
-//               if (std::fabs(percentage - 0.006) <
-//                   std::fabs(nextPercentage - 0.006))
-                  if (std::fabs(percentage - percentChange) <
-                      std::fabs(nextPercentage - percentChange))
-               {
-                  low = idx+1;
-                  break;
-               }
-               
-            }
-            newCount = 0.0;
-            for (idx = n-1; idx > 0; idx--)
-            {
-               newCount += counts[idx];
-               percentage = newCount / count;
-               nextPercentage =
-                  (newCount + counts[idx-1]) / count;
-               if (std::fabs(percentage - percentChange) <
-                   std::fabs(nextPercentage - percentChange))
-               {
-                  high=idx-1;
-                  break;
-               }
-            }
-            if(low > high)
-            {
-               low = 0;
-               high = n - 1;
-            }
-            //theMinOutputValue[band] = 1;
-            //theMaxOutputValue[band] = 65535;
-
-            //std::cout << "LOW ===== " << low << std::endl;
-            //std::cout << "HIGH ===== " << high << std::endl;
-            setLowClipPoint(low, band);
-            setHighClipPoint(high, band);
-         }
-      }
-   }
-   
-   buildLinearTable();
-}
-
-void ossimHistogramRemapper::buildLinearTableStdFromMean()
-{
-   const ossim_uint32 BANDS = getNumberOfInputBands();
-	
-   // Sanity check.
-   if (theNormalizedLowClipPoint.size() != BANDS || !getHistogram(0).valid())
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimHistogramRemapper::buildTable ERROR!"
-            << " Line:  " << __LINE__ << endl;
-      }
-      return;
-   }
-   
-   ossim_float64 multiplier = 1.0;
-   if (theStretchMode == LINEAR_2STD_FROM_MEAN)
-   {
-      multiplier =  2.0;
-   }
-   else if (theStretchMode == LINEAR_3STD_FROM_MEAN)
-   {
-      multiplier =  3.0;
-   }
-	
-   // Finally, build the table...
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      ossimRefPtr<ossimHistogram> h      = getHistogram(band);
-      ossim_float64 mean = 0.0;
-      ossim_float64 stdDev = 0.0;
-      if(h.valid())
-      {
-         mean     = h->GetMean();
-         stdDev   = h->GetStandardDev();
-      }
-      ossim_float64 lowClip  = mean - (stdDev * multiplier);
-      ossim_float64 highClip = mean + (stdDev * multiplier);
-		
-      // Clamp to min/max.
-      if (lowClip < theMinOutputValue[band])
-      {
-         lowClip = theMinOutputValue[band];
-      }
-      if (highClip > theMaxOutputValue[band])
-      {
-         highClip = theMaxOutputValue[band];
-      }
-      
-      setLowClipPoint(lowClip, band);
-      setMidPoint(mean, band);
-      setHighClipPoint(highClip, band);
-      
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimHistogramRemapper::buildLinearStdFromMean DEBUG:"
-            << "\nband:       " << band
-            << "\nmean:       " << mean
-            << "\nstddev:     " << stdDev
-            << "\nlow clip:   " << lowClip
-            << "\nhigh clip:  " << highClip
-            << endl;
-      }
-   }
-   
-   buildLinearTable();
-}
-
-void ossimHistogramRemapper::initializeClips()
-{
-   initializeClips(getNumberOfInputBands());
-}
-
-void ossimHistogramRemapper::initializeClips(ossim_uint32 bands)
-{
-   //---
-   // NOTE: This method deoes not set theDirtyFlag by design.
-   //---
-   if (bands)
-   {
-      theNormalizedLowClipPoint.resize(bands);
-      theNormalizedHighClipPoint.resize(bands);
-      theMidPoint.resize(bands);
-      theMinOutputValue.resize(bands);
-      theMaxOutputValue.resize(bands);
-      
-      for (ossim_uint32 band = 0; band < bands; ++band)
-      {
-         theNormalizedLowClipPoint[band]  = 0.0;
-         theNormalizedHighClipPoint[band] = 1.0;
-         theMidPoint[band] = 0.0;
-         
-         // Must have an output scalar type for getMin/Max call.
-         if (theOutputScalarType != OSSIM_SCALAR_UNKNOWN)
-         {
-            theMinOutputValue[band] = ossim::defaultMin(theOutputScalarType);//getMinPixelValue(band);
-            theMaxOutputValue[band] = ossim::defaultMax(theOutputScalarType);//getMaxPixelValue(band);
-         }
-         else
-         {
-            theMinOutputValue[band] = 0.0;
-            theMaxOutputValue[band] = 0.0;
-         }
-      }
-   }
-}
-
-void ossimHistogramRemapper::initializeMinMaxOutput()
-{
-   ossim_uint32 nBands = getNumberOfInputBands();
-   theMinOutputValue.resize(nBands);
-   theMaxOutputValue.resize(nBands);
-   for (ossim_uint32 band = 0; band < nBands; ++band)
-   {
-         // Must have an output scalar type for getMin/Max call.
-         if (theOutputScalarType != OSSIM_SCALAR_UNKNOWN)
-         {
-            theMinOutputValue[band] = ossim::defaultMin(theOutputScalarType);//getMinPixelValue(band);
-            theMaxOutputValue[band] = ossim::defaultMax(theOutputScalarType);//getMaxPixelValue(band);
-         }
-         else
-         {
-            theMinOutputValue[band] = 0.0;
-            theMaxOutputValue[band] = 0.0;
-         }
-  }
-
-}
-
-void ossimHistogramRemapper::setNullCount()
-{
-   // This will set the null bucket for all res zero bands to zero!
-   if (getHistogram(0).valid())
-   {
-      const ossim_uint32 BANDS = theHistogram->getNumberOfBands();
-      for (ossim_uint32 band = 0; band < BANDS; ++band)
-      {
-         ossimRefPtr<ossimHistogram> h = theHistogram->getHistogram(band);
-         if (h.valid())
-         {
-            h->SetCount(0, 0);
-         }
-      }
-   }
-}
-
-ossimHistogramRemapper::StretchMode ossimHistogramRemapper::getStretchMode() const
-{
-   return theStretchMode;
-}
-
-ossimString ossimHistogramRemapper::getStretchModeString() const
-{
-   return ossimString(STRETCH_MODE[theStretchMode]);
-}
-
-ossim_uint32 ossimHistogramRemapper::getNumberOfStretchModes() const
-{
-   return ossimHistogramRemapper::STRETCH_UNKNOWN; // last index
-}
-
-ossimString
-ossimHistogramRemapper::getStretchModeString(ossim_uint32 index) const
-{
-   if (index < ossimHistogramRemapper::STRETCH_UNKNOWN)
-   {
-      return ossimString(STRETCH_MODE[index]);
-   }
-	
-   return ossimString(STRETCH_MODE[ossimHistogramRemapper::STRETCH_UNKNOWN]);
-   
-}
-
-ostream& ossimHistogramRemapper::print(ostream& os) const
-{
-   os << setiosflags(ios::fixed) << setprecision(15)
-      << "\nossimHistogramRemapper::print:"
-      << "\ntheStretchMode:         " << getStretchModeString().c_str()
-      << "\ntheDirtyFlag:           " << (theDirtyFlag?"true":"false")
-      << "\ntheBypassFlag:          " << (theBypassFlag?"true":"false")
-      
-      << "\ntheHistogram:           " << (theHistogram.valid()?"initialized":"null")
-      << "\ntheTableSizeInBytes:    " << theTable.size()
-      << endl;
-	
-   const ossim_uint32 BANDS = (ossim_uint32)theNormalizedLowClipPoint.size();
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      os << "\ntheNormalizedLowClipPoint[" << band << "]:   "
-         << theNormalizedLowClipPoint[band]
-         << "\ntheNormalizedHighClipPoint[" << band << "]:  "
-         << theNormalizedHighClipPoint[band]
-         << "\ntheMidPoint[" << band << "]:                 "
-         << theMidPoint[band]
-         << "\ntheMinOutputValue[" << band << "]:           "
-         << theMinOutputValue[band]
-         << "\ntheMaxOutputValue[" << band << "]:           "
-         << theMaxOutputValue[band]
-         << endl;
-   }
-	
-   for (ossim_uint32 i = 0; i < theBandList.size(); ++i)
-   {
-      os << "theBandList[" << i << "]:  " << theBandList[i] << endl;
-   }
-
-   // Note: To set table call ossimTableRemapper::print or turn trace on
-   // for "ossimTableRemapper:debug"
-   
-   return os;
-}
-
-void ossimHistogramRemapper::setupTable()
-{
-   const ossim_uint32 BANDS = getNumberOfInputBands();
-   
-   if (theNormalizedLowClipPoint.size() == 0)
-   {
-      initializeClips(BANDS);
-   }
-   
-   ossim_uint32 values_per_band = 0;
-   ossim_uint32 bytes_per_pixel = 0;
-   
-   switch (theOutputScalarType)
-   {
-      case OSSIM_UINT8:
-         values_per_band = 256;  // 2 ^ 8
-         bytes_per_pixel = 1;
-         theTableType = ossimTableRemapper::NATIVE;
-         break;
-         
-      case OSSIM_USHORT11:
-         values_per_band = 2048; // 2 ^ 11
-         bytes_per_pixel = 2;
-         theTableType = ossimTableRemapper::NATIVE;
-         break;
-         
-      case OSSIM_UINT16:
-      case OSSIM_SINT16:
-         values_per_band = 65536; // 2 ^ 16
-         bytes_per_pixel = 2;
-         theTableType = ossimTableRemapper::NATIVE;
-         break;
-         
-      case OSSIM_UINT32:
-      case OSSIM_SINT32:
-         values_per_band = 65536; // 2 ^ 16
-         bytes_per_pixel = 4;
-         theTableType = ossimTableRemapper::NATIVE;
-         break;
-			
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT:
-         bytes_per_pixel = 4;
-         break;
-			
-      case OSSIM_NORMALIZED_DOUBLE:         
-      case OSSIM_DOUBLE:
-         bytes_per_pixel = 8;
-         theTableType = ossimTableRemapper::NORMALIZED;
-         break;
-         
-      default:
-         break;
-   }
-	
-   if ( theOutputScalarType == OSSIM_FLOAT ||
-        theOutputScalarType == OSSIM_DOUBLE ||
-        theOutputScalarType == OSSIM_NORMALIZED_FLOAT ||
-        theOutputScalarType == OSSIM_NORMALIZED_DOUBLE )
-   {
-      for (ossim_uint32 band = 0; band < BANDS; ++band)
-      {
-         ossimRefPtr<ossimHistogram> h  = getHistogram(band);
-			
-         if (h.valid())
-         {
-            if (h->GetRes() > static_cast<ossim_int32>(values_per_band))
-            {
-               values_per_band = h->GetRes();
-            }
-         }
-      }
-   }      
-   
-   theTableBinCount  = values_per_band;
-   theTableBandCount = BANDS;
-   // Check the size of the table prior to deletion and making a new one.
-   ossim_uint32 size_in_bytes = values_per_band * BANDS * bytes_per_pixel;
-   if(theTable.empty() || (theTable.size() != size_in_bytes))
-   {
-      theTable.resize(size_in_bytes);
-   }
-
-   ossimImageSource* input = dynamic_cast<ossimImageSource*>(getInput());
-   double minPix = ossim::defaultMin(getOutputScalarType());
-   double maxPix = ossim::defaultMax(getOutputScalarType());
-   
-   if(input)
-   {
-      //---
-      // Last check for NaNs in key data members and set to some default if so.
-      // This could occur if someone stripped a keyword list down to a minimal
-      // set of keywords.
-      //---
-      for (ossim_uint32 band = 0; band < BANDS; ++band)
-      {
-         minPix = input->getMinPixelValue(band);
-         maxPix = input->getMaxPixelValue(band);
-         if ( ossim::isnan(theMinOutputValue[band]) )
-         {
-            theMinOutputValue[band] = minPix;
-         }
-         if ( ossim::isnan(theMaxOutputValue[band]) )
-         {
-            theMaxOutputValue[band] = maxPix;
-         }
-      }   
-   }
-   else
-   {
-      //---
-      // Last check for NaNs in key data members and set to some default if so.
-      // This could occur if someone stripped a keyword list down to a minimal
-      // set of keywords.
-      //---
-      for (ossim_uint32 band = 0; band < BANDS; ++band)
-      {
-         if ( ossim::isnan(theMinOutputValue[band]) )
-         {
-            theMinOutputValue[band] = minPix;
-         }
-         if ( ossim::isnan(theMaxOutputValue[band]) )
-         {
-            theMaxOutputValue[band] = maxPix;
-         }
-      }   
-   }
-}
-
-void ossimHistogramRemapper::verifyEnabled()
-{
-   //---
-   // Since this filter can be constructed with no input connection do not
-   // output and error, simply return.
-   //---	
-      setBypassFlag(true);
-   //if (theInputConnection)
-   {
-
-#if 1     
-      // Start off bypassed.
-
-      if (theStretchMode != STRETCH_UNKNOWN)
-      {
-         if(theHistogram.valid())
-         {
-            setBypassFlag(false);
-         }
-/*         
-         const ossim_uint32 BANDS =
-            (ossim_uint32)theNormalizedLowClipPoint.size();
-         for (ossim_uint32 band = 0; band < BANDS; ++band)
-         {
-            //const double MIN = ossimTableRemapper::getMinPixelValue(band);
-            //const double MAX = ossimTableRemapper::getMaxPixelValue(band);
-            if ( theNormalizedLowClipPoint[band]  != 0.0   ||
-                 theNormalizedHighClipPoint[band] != 1.0 )
-                // theMinOutputValue[band] != MIN ||
-                 //theMaxOutputValue[band] != MAX )
-            {
-               // Need to turn filter on.
-               setBypassFlag(false);
-               break;
-            }
-         }
-         */
-      }
-#endif
-   }
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimHistogramRemapper::verifyEnabled theBypassFlag: "
-         << (theBypassFlag ? "true" : "false") << endl;
-   }
-}
-
-ossimRefPtr<ossimMultiResLevelHistogram> ossimHistogramRemapper::getHistogram()
-{
-   return ossimRefPtr<ossimMultiResLevelHistogram>(theHistogram.get());
-}
-
-ossimRefPtr<const ossimMultiResLevelHistogram> ossimHistogramRemapper::getHistogram()const
-{
-   return ossimRefPtr<const ossimMultiResLevelHistogram>(theHistogram.get());
-}
-
-ossimRefPtr<ossimHistogram>
-ossimHistogramRemapper::getHistogram(ossim_uint32 zero_based_band,
-                                     ossim_uint32 res_level) const
-{
-   ossim_uint32 histogram_band = getHistogramBand(zero_based_band);
-   
-   if(!theHistogram.valid())
-   {
-      const ossimHistogramSource* source = dynamic_cast<const ossimHistogramSource*>(getInput(1));
-      if(source)
-      {
-         theHistogram = const_cast<ossimHistogramSource*>(source)->getHistogram();
-      }      
-   }
-   
-   if (theHistogram.valid())
-   {
-      if (histogram_band < theHistogram->getNumberOfBands())
-      {
-         return theHistogram->getHistogram(histogram_band, res_level);
-      }
-   }
-	
-   return 0;
-}
-
-ossimFilename ossimHistogramRemapper::getHistogramFile() const
-{
-   if (theHistogram.valid())
-   {
-      return theHistogram->getHistogramFile();
-   }
-	
-   return ossimFilename::NIL;
-}
-
-ossim_uint32
-ossimHistogramRemapper::getHistogramBand(ossim_uint32 input_band) const
-{
-   if(theResetBandIndicesFlag) return input_band;
-   vector<ossim_uint32> bandList;
-   getOutputBandList(bandList);
-   
-   const ossim_uint32 BANDS = (ossim_uint32)bandList.size();
-	
-   if (BANDS == 0)
-   {
-      return 0;
-   }
-	
-   return bandList[input_band];
-}
-
-ossimString ossimHistogramRemapper::getLongName()const
-{
-   return ossimString("Histogram Remapper, filter with controls for histogram stretching.");
-}
-
-ossimString ossimHistogramRemapper::getShortName()const
-{
-   return ossimString("Histogram Remapper");
-}
-
-ostream& operator<<(ostream& os, const ossimHistogramRemapper& hr)
-{
-   return hr.print(os);
-}
-
-
-// Private to disallow use...
-ossimHistogramRemapper::ossimHistogramRemapper(const ossimHistogramRemapper&)
-{
-}
-
-// Private to disallow use...
-ossimHistogramRemapper& ossimHistogramRemapper::operator=(const ossimHistogramRemapper&)
-{
-   return *this;
-}
-
-void ossimHistogramRemapper::setBypassFlag(bool flag)
-{
-   if (theBypassFlag != flag)
-   {
-      //---
-      // If switching from bypassed to enabled set
-      // the dirty flag.  We don't care about going the other way.
-      //---
-      if ( theBypassFlag && !flag )
-      {
-         theDirtyFlag = true;
-      }
-      theBypassFlag = flag;
-   }
-}
-
-double ossimHistogramRemapper::getMinPixelValue(ossim_uint32 band)const
-{
-   double result = ossimTableRemapper::getMinPixelValue(band);
-   if(theEnableFlag&&!theBypassFlag &&(band < theMinOutputValue.size()))
-   {
-      result = theMinOutputValue[band];
-   }
-  // if(theOutputScalarType != OSSIM_SCALAR_UNKNOWN)
-  // {
-  //    return ossim::defaultMin(theOutputScalarType);
-  // }
-
-   return result;
-}
-
-double ossimHistogramRemapper::getMaxPixelValue(ossim_uint32 band)const
-{
-   double result = ossimTableRemapper::getMaxPixelValue(band);
-
-   if(theEnableFlag&&!theBypassFlag &&(band < theMaxOutputValue.size()))
-   {
-      result = theMaxOutputValue[band];
-   }
-   //if(theOutputScalarType != OSSIM_SCALAR_UNKNOWN)
-  // {
-  //    result = ossim::defaultMax(theOutputScalarType);
-  // }
-
-   return result;
-}
-
-bool ossimHistogramRemapper::canConnectMyInputTo(ossim_int32 inputIndex,
-                                                 const ossimConnectableObject* object)const
-{
-   // we will alloe the histogram source only to be connected to input slot 2 and
-   // the first slot will be reserved for the ossimImageSource.
-   //
-   bool result = false;
-   if(inputIndex == 0) result = dynamic_cast<const ossimImageSource*>(object)!=0;
-   if(inputIndex == 1) result = dynamic_cast<const ossimHistogramSource*>(object)!=0;
-   
-   return result;
-}
-
diff --git a/src/ossim/imaging/ossimHistogramThreshholdFilter.cpp b/src/ossim/imaging/ossimHistogramThreshholdFilter.cpp
deleted file mode 100644
index 2f6c3ef..0000000
--- a/src/ossim/imaging/ossimHistogramThreshholdFilter.cpp
+++ /dev/null
@@ -1,260 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimHistogramThreshholdFilter.cpp 17195 2010-04-23 17:32:18Z dburken $
-#include <ossim/imaging/ossimHistogramThreshholdFilter.h>
-#include <ossim/base/ossimMultiResLevelHistogram.h>
-#include <ossim/base/ossimMultiBandHistogram.h>
-#include <ossim/base/ossimHistogram.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeyword.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/base/ossimErrorContext.h>
-
-static const ossimKeyword MIN_VALUE_PERCENT_KW("min_percent",
-                                               "min percentage clip");
-
-static const ossimKeyword MAX_VALUE_PERCENT_KW("max_percent",
-                                               "max percentage value");
-
-
-RTTI_DEF1(ossimHistogramThreshholdFilter, "ossimHistogramThreshholdFilter", ossimImageSourceHistogramFilter)
-   
-ossimHistogramThreshholdFilter::ossimHistogramThreshholdFilter()
-   : ossimImageSourceHistogramFilter(),
-     theMinValuePercent(0.0),
-     theMaxValuePercent(0.0)
-{
-}
-
-ossimHistogramThreshholdFilter::ossimHistogramThreshholdFilter(double minValuePercent,
-                                                               double maxValuePercent,
-                                                               ossimImageSource* inputSource,
-                                                               ossimMultiResLevelHistogram* histogram)
-   : ossimImageSourceHistogramFilter(inputSource, histogram),
-     theMinValuePercent(minValuePercent),
-     theMaxValuePercent(maxValuePercent)
-{
-}
-
-ossimHistogramThreshholdFilter::~ossimHistogramThreshholdFilter()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimHistogramThreshholdFilter::getTile(
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   if(!theInputConnection) return NULL;
-   
-   ossimRefPtr<ossimImageData> inputTile =
-      theInputConnection->getTile(tileRect, resLevel);
-
-   if(!isSourceEnabled())
-   {
-      return inputTile;
-   }
-   if(inputTile.valid()  &&
-      inputTile->getBuf() &&
-      (inputTile->getDataObjectStatus()!=OSSIM_EMPTY))
-   {
-      switch(inputTile->getScalarType())
-      {
-         case OSSIM_UCHAR:
-         {
-            return runThreshholdStretchAlgorithm((ossim_uint8)0,
-                                                 inputTile);
-         }
-         case OSSIM_USHORT16:
-         case OSSIM_USHORT11:
-         {
-            return runThreshholdStretchAlgorithm((ossim_uint16)0,
-                                                 inputTile);
-         }
-         case OSSIM_SSHORT16:
-         {
-            return runThreshholdStretchAlgorithm(static_cast<ossim_sint16>(0),
-                                                 inputTile);
-         }
-         case OSSIM_DOUBLE:
-         case OSSIM_NORMALIZED_DOUBLE:
-         {
-            return runThreshholdStretchAlgorithm(static_cast<double>(0),
-                                                 inputTile);
-         }
-         case OSSIM_FLOAT:
-         case OSSIM_NORMALIZED_FLOAT:
-         {
-            return runThreshholdStretchAlgorithm(static_cast<float>(0),
-                                                 inputTile);
-         }
-         case OSSIM_SCALAR_UNKNOWN:
-         default:
-         {
-            ossimSetError("ossimHistogramThreshholdFilter",
-                          ossimErrorCodes::OSSIM_ERROR,
-                          "Unknown scalar type");
-            break;
-         }
-      }
-   }
-
-   return inputTile;
-}
-
-
-bool ossimHistogramThreshholdFilter::loadState(const ossimKeywordlist& kwl,
-                                           const char* prefix)
-{
-   if(ossimImageSourceHistogramFilter::loadState(kwl, prefix))
-   {
-      const char* minPercent = kwl.find(prefix, MIN_VALUE_PERCENT_KW);
-      const char* maxPercent = kwl.find(prefix, MAX_VALUE_PERCENT_KW);
-
-      if(minPercent)
-      {
-         theMinValuePercent = ossimString(minPercent).toDouble();
-      }
-      else
-      {
-         theMinValuePercent = 0.0;
-      }
-      if(maxPercent)
-      {
-         theMaxValuePercent = ossimString(maxPercent).toDouble();
-      }
-      else
-      {
-         theMaxValuePercent = 0.0;
-      }
-   }
-   else
-   {
-      return false;
-   }
-
-   return true;
-}
-
-bool ossimHistogramThreshholdFilter::saveState(ossimKeywordlist& kwl,
-                                           const char* prefix)const
-{
-   if(ossimImageSourceHistogramFilter::saveState(kwl, prefix))
-   {
-      kwl.add(prefix,
-              MIN_VALUE_PERCENT_KW,
-              theMinValuePercent,
-              true);
-      kwl.add(prefix,
-              MAX_VALUE_PERCENT_KW,
-              theMaxValuePercent,
-              true);
-   }
-   else
-   {
-      return false;
-   }
-
-   return true;
-}
-
-void ossimHistogramThreshholdFilter::initialize()
-{
-   ossimImageSourceHistogramFilter::initialize();
-}
-
-template <class T>
-ossimRefPtr<ossimImageData> ossimHistogramThreshholdFilter::runThreshholdStretchAlgorithm(
-   T /* dummyVariable */,
-   ossimRefPtr<ossimImageData>& tile)
-{
-   if(!getHistogram())
-   {
-      return tile;
-   }
-   
-   ossimRefPtr<ossimMultiBandHistogram> histo    = getHistogram()->getMultiBandHistogram(0);
-   if(histo.valid())
-   {
-      ossim_uint32 maxBands = ( (histo->getNumberOfBands() >
-                                 tile->getNumberOfBands())?
-                                tile->getNumberOfBands():
-                                histo->getNumberOfBands());
-      
-      long offsetUpperBound = tile->getHeight()*tile->getWidth();
-
-      for(ossim_uint32 band = 0; band < maxBands; ++band)
-      {
-         ossimRefPtr<ossimHistogram> h  = histo->getHistogram(band);
-         T* buf   = static_cast<T*>(tile->getBuf(band));
-         
-         if(h.valid()&&buf)
-         {
-            T np     = static_cast<T>(tile->getNullPix(band));
-            T minPix = static_cast<T>(tile->getMinPix(band));
-            T maxPix = static_cast<T>(tile->getMaxPix(band));
-            double range  = (maxPix - minPix);
-            double maxClip = (h->HighClipVal(theMaxValuePercent/100.0)/(double)h->GetRes());
-            double minClip = (h->LowClipVal(theMinValuePercent/100.0)/(double)h->GetRes());
-            ossim_float64 normPix;
-            double delta   = fabs(maxClip - minClip);
-            if(delta > 0.0)
-            {
-               for(long offset = 0; offset < offsetUpperBound; ++offset)
-               {
-                  if(buf[offset] != np)
-                  {
-                     normPix = ((double)buf[offset]-minPix)/range;
-                     if(normPix <= minClip)
-                     {
-                        buf[offset] = minPix;
-                     }
-                     else if(normPix >= maxClip)
-                     {
-                        buf[offset] = maxPix;
-                     }
-                     else 
-                     {
-                        double t = (normPix - minClip)/delta;
-                        T value = static_cast<T>(minPix + range*t);
-                        buf[offset] = value;
-                     }
-                  }
-               }
-            }
-         }
-      }
-
-      tile->validate();
-   }
-   
-   return tile;
-}
-
-void ossimHistogramThreshholdFilter::setMinValuePercent(double minValue)
-{
-   theMinValuePercent = minValue;
-}
-
-void ossimHistogramThreshholdFilter::setMaxValuePercent(double maxValue)
-{
-   theMaxValuePercent = maxValue;
-}
-
-double ossimHistogramThreshholdFilter::getMinValuePercent()const
-{
-   return theMinValuePercent;
-}
-
-double ossimHistogramThreshholdFilter::getMaxValuePercent()const
-{
-   return theMaxValuePercent;
-}
diff --git a/src/ossim/imaging/ossimHistogramWriter.cpp b/src/ossim/imaging/ossimHistogramWriter.cpp
deleted file mode 100644
index 28e6490..0000000
--- a/src/ossim/imaging/ossimHistogramWriter.cpp
+++ /dev/null
@@ -1,309 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimHistogramWriter.cpp 20118 2011-10-05 13:50:55Z dburken $
-#include <ossim/base/ossimProcessListener.h>
-#include <ossim/imaging/ossimHistogramWriter.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/imaging/ossimImageSourceSequencer.h>
-#include <ossim/base/ossimMultiResLevelHistogram.h>
-#include <ossim/base/ossimMultiBandHistogram.h>
-#include <ossim/imaging/ossimImageHistogramSource.h>
-#include <ossim/base/ossimTrace.h>
-
-static ossimTrace traceDebug("ossimHistogramWriter:debug");
-class ossimHistogramWriterProcessListener : public ossimProcessListener
-{
-public:
-   ossimHistogramWriterProcessListener(ossimConnectableObject* passon)
-      :thePassonTo(passon)
-      {
-      }
-   virtual void processProgressEvent(ossimProcessProgressEvent& event)
-      {
-         if(thePassonTo)
-         {
-            event.setObject(thePassonTo);
-            thePassonTo->fireEvent(event);
-         }
-      }
-
-   ossimConnectableObject* thePassonTo;  
-   
-};
-
-RTTI_DEF3(ossimHistogramWriter,
-          "ossimHistogramWriter",
-          ossimOutputSource,
-          ossimProcessInterface,
-          ossimConnectableObjectListener);
-
-ossimHistogramWriter::ossimHistogramWriter(ossimImageSource* inputSource,
-                                           ossimObject* owner)
-   : ossimOutputSource(owner,
-                       1,
-                       0,
-                       true,
-                       false),
-     theAreaOfInterest(),
-     theFilename(),
-     theFileStream(0),
-     theProcessListener(0),
-     theHistogramSource(0)
-{
-   theProcessListener = new ossimHistogramWriterProcessListener(this);
-   
-   theAreaOfInterest.makeNan();
-   connectMyInputTo(0, inputSource);
-}
-
-ossimHistogramWriter::~ossimHistogramWriter()
-{
-   if(isOpen())
-   {
-      close();
-   }
-   if(theProcessListener)
-   {
-      delete theProcessListener;
-      theProcessListener = 0;
-   }
-
-   // This does not need to be deleted here.  Simply stored for abort.
-   if (theHistogramSource)
-   {
-      theHistogramSource = 0;
-   }
-}
-
-void ossimHistogramWriter::setAreaOfInterest(const ossimIrect& rect)
-{
-   theAreaOfInterest = rect;
-}
-
-ossimObject* ossimHistogramWriter::getObject()
-{
-   return this;
-}
-
-bool ossimHistogramWriter::isOpen()const
-{
-   return (theFileStream != 0);
-}
-
-bool ossimHistogramWriter::open()
-{
-   if(isOpen())
-   {
-      close();
-   }
-   
-   theFileStream = new std::ofstream(theFilename.c_str());
-   
-   return theFileStream->good();
-}
-
-bool ossimHistogramWriter::open(const ossimFilename& filename)
-{
-   return ossimOutputSource::open(filename);
-}
-
-void ossimHistogramWriter::close()
-{
-   delete theFileStream;
-   theFileStream = 0;
-}
-
-void ossimHistogramWriter::setOutputName(const ossimString& outputName)
-{
-   ossimOutputSource::setOutputName(outputName);
-   setFilename(outputName);
-}
-
-void ossimHistogramWriter::setFilename(const ossimFilename& filename)
-{
-   theFilename = filename;
-}
-   
-bool ossimHistogramWriter::canConnectMyInputTo(
-   ossim_int32 inputIndex, const ossimConnectableObject* object)const
-{
-   return (object&&(inputIndex == 0)&& 
-           (PTR_CAST(ossimHistogramSource, object)||
-            PTR_CAST(ossimImageSource, object)));
-}
-
-const ossimObject* ossimHistogramWriter::getObject()const
-{
-   return this;
-}
-
-void ossimHistogramWriter::processProgressEvent(
-   ossimProcessProgressEvent& event)
-{
-   // we will raise the event if its coming from our
-   // input.  This means that we are connected to a
-   // ossimHistogramSource.
-   //
-   if(event.getObject() != this)
-   {
-      ossimProcessInterface::setCurrentMessage(event.getMessage());
-      setPercentComplete(event.getPercentComplete());
-   }
-}
-
-void ossimHistogramWriter::connectInputEvent(
-   ossimConnectionEvent& event)
-{
-   if(event.getObject() == this)
-   {
-      if(event.getOldObject())
-      {
-         event.getOldObject()->removeListener((ossimProcessListener*)this);
-      }
-      if(getInput(0)&&
-         PTR_CAST(ossimHistogramSource, getInput(0)))
-      {
-         getInput(0)->addListener( (ossimProcessListener*)this);
-      }
-   }
-}
-
-void ossimHistogramWriter::disconnectInputEvent(
-   ossimConnectionEvent& event)
-{
-   if(event.getOldObject()&&
-      PTR_CAST(ossimHistogramSource, getInput(0)))
-   {
-      event.getOldObject()->removeListener((ossimProcessListener*)this);
-   }
-}
-
-bool ossimHistogramWriter::saveState(ossimKeywordlist& kwl,
-                                     const char* prefix)const
-{
-   bool result = ossimOutputSource::saveState(kwl, prefix);
-
-
-   return result;
-}
-
-bool ossimHistogramWriter::loadState(const ossimKeywordlist& kwl,
-                                     const char* prefix)
-{
-   bool result = ossimOutputSource::loadState(kwl, prefix);
-
-   if(result)
-   {
-      if(!getNumberOfInputs())
-      {
-         setNumberOfInputs(1);
-      }
-   }
-
-   return result;
-}
-
-bool ossimHistogramWriter::execute()
-{
-   writeHistogram();
-   
-   return true;
-}
-
-void ossimHistogramWriter::writeHistogram()
-{
-   if(!getInput(0))
-   {
-      cerr << "ossimHistogramWriter::writeHistogram is not connected" << endl;
-      return;
-   }
-   ossimHistogramSource* histoSource = PTR_CAST(ossimHistogramSource, getInput(0));
-   bool deleteHistoSource = false;
-   if(!histoSource)
-   {
-      histoSource = new ossimImageHistogramSource;
-      histoSource->connectMyInputTo(0, getInput(0));
-      histoSource->enableSource();
-      deleteHistoSource = true;
-
-      //---
-      // Capture the pointer for abort call.  Note a ossimHistogramSource has
-      // no abort so the abort will only work through the
-      // ossimImageHistogramSource pointer.
-      //---
-      theHistogramSource = (ossimImageHistogramSource*)histoSource;
-   }
-
-   // Capture the pointer for abort call.
-   theHistogramSource = histoSource;
-   
-   histoSource->addListener( theProcessListener);
-   
-   ossimRefPtr<ossimMultiResLevelHistogram> histo = histoSource->getHistogram();
-
-   // Don't write histogram if abort flag was set...
-   if(histo.valid() && !isAborted() )
-   {
-      ossimKeywordlist kwl;
-      histo->saveState(kwl);
-      if(!isOpen())
-      {
-         open();
-         if(!isOpen())
-         {
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_WARN) << "unable to open file " << theFilename << endl;
-            }
-         }
-      }
-      if( isOpen() )
-      {
-         kwl.writeToStream(*theFileStream);
-      }
-   }
-   histoSource->removeListener(theProcessListener);
-   
-   if(deleteHistoSource)
-   {
-      delete histoSource;
-      histoSource = 0;
-   }
-   theHistogramSource = 0;
-   
-   close();
-}
-
-void ossimHistogramWriter::abort()
-{
-   //---
-   // Call base abort. This sets the status to PROCESS_STATUS_ABORT_REQUEST so the processor
-   // knows to abort.
-   //---
-   ossimProcessInterface::abort();
-
-   // Propagate to histo source.
-   if (theHistogramSource)
-   {
-      ossimImageHistogramSource* histoSource =
-         PTR_CAST(ossimImageHistogramSource, theHistogramSource);
-      if (histoSource)
-      {
-         histoSource->abort();
-      }
-   }
-
-   //---
-   // Now set status to "ABORTED" so ossimProcessInterface::isAborted returns true so the
-   // writeHistogram method doesn't write the file if the process was aborted.
-   //---
-   setProcessStatus(PROCESS_STATUS_ABORTED);
-}
diff --git a/src/ossim/imaging/ossimHsiRemapper.cpp b/src/ossim/imaging/ossimHsiRemapper.cpp
deleted file mode 100644
index eea773c..0000000
--- a/src/ossim/imaging/ossimHsiRemapper.cpp
+++ /dev/null
@@ -1,3192 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2002 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Remapper to adjust hue, saturation and intensity.
-//
-//*************************************************************************
-// $Id: ossimHsiRemapper.cpp 19714 2011-06-03 17:23:45Z gpotts $
-
-#include <cstdlib>
-#include <ossim/imaging/ossimHsiRemapper.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimNormRgbVector.h>
-#include <ossim/base/ossimHsiVector.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/base/ossimNumericProperty.h>
-
-RTTI_DEF1(ossimHsiRemapper, "ossimHsiRemapper", ossimImageSourceFilter)
-
-static ossimTrace traceDebug("ossimHsiRemapper:debug");
-
-//***
-// State keywords:
-//***
-static const char MASTER_HUE_OFFSET_KW[] = "hsi_master_hue_offset";
-static const char MASTER_SATURATION_OFFSET_KW[] = "hsi_master_saturation_offset";
-static const char MASTER_INTENSITY_OFFSET_KW[] = "hsi_master_intensity_offset";
-static const char MASTER_INTENSITY_LOW_CLIP_KW[] = "hsi_master_intensity_low_clip";
-static const char MASTER_INTENSITY_HIGH_CLIP_KW[] = "hsi_master_intensity_high_clip";
-
-static const char RED_HUE_OFFSET_KW[] = "hsi_red_hue_offset";
-static const char RED_HUE_LOW_RANGE_KW[] = "hsi_red_hue_low_range";
-static const char RED_HUE_HIGH_RANGE_KW[] = "hsi_red_hue_high_range";
-static const char RED_HUE_BLEND_RANGE_KW[] = "hsi_red_hue_blend_range";
-static const char RED_SATURATION_OFFSET_KW[] = "hsi_red_saturation_offset";
-static const char RED_INTENSITY_OFFSET_KW[] = "hsi_red_intensity_offset";
-
-static const char YELLOW_HUE_OFFSET_KW[] = "hsi_yellow_hue_offset";
-static const char YELLOW_HUE_LOW_RANGE_KW[] = "hsi_yellow_hue_low_range";
-static const char YELLOW_HUE_HIGH_RANGE_KW[] = "hsi_yellow_hue_high_range";
-static const char YELLOW_HUE_BLEND_RANGE_KW[] = "hsi_yellow_hue_blend_range";
-static const char YELLOW_SATURATION_OFFSET_KW[] = "hsi_yellow_saturation_offset";
-static const char YELLOW_INTENSITY_OFFSET_KW[] = "hsi_yellow_intensity_offset";
-
-static const char GREEN_HUE_OFFSET_KW[] = "hsi_green_hue_offset";
-static const char GREEN_HUE_LOW_RANGE_KW[] = "hsi_green_hue_low_range";
-static const char GREEN_HUE_HIGH_RANGE_KW[] = "hsi_green_hue_high_range";
-static const char GREEN_HUE_BLEND_RANGE_KW[] = "hsi_green_hue_blend_range";
-static const char GREEN_SATURATION_OFFSET_KW[] = "hsi_green_saturation_offset";
-static const char GREEN_INTENSITY_OFFSET_KW[] = "hsi_green_intensity_offset";
-
-static const char CYAN_HUE_OFFSET_KW[] = "hsi_cyan_hue_offset";
-static const char CYAN_HUE_LOW_RANGE_KW[] = "hsi_cyan_hue_low_range";
-static const char CYAN_HUE_HIGH_RANGE_KW[] = "hsi_cyan_hue_high_range";
-static const char CYAN_HUE_BLEND_RANGE_KW[] = "hsi_cyan_hue_blend_range";
-static const char CYAN_SATURATION_OFFSET_KW[] = "hsi_cyan_saturation_offset";
-static const char CYAN_INTENSITY_OFFSET_KW[] = "hsi_cyan_intensity_offset";
-
-static const char BLUE_HUE_OFFSET_KW[] = "hsi_blue_hue_offset";
-static const char BLUE_HUE_LOW_RANGE_KW[] = "hsi_blue_hue_low_range";
-static const char BLUE_HUE_HIGH_RANGE_KW[] = "hsi_blue_hue_high_range";
-static const char BLUE_HUE_BLEND_RANGE_KW[] = "hsi_blue_hue_blend_range";
-static const char BLUE_SATURATION_OFFSET_KW[] = "hsi_blue_saturation_offset";
-static const char BLUE_INTENSITY_OFFSET_KW[] = "hsi_blue_intensity_offset";
-
-static const char MAGENTA_HUE_OFFSET_KW[] = "hsi_magenta_hue_offset";
-static const char MAGENTA_HUE_LOW_RANGE_KW[] = "hsi_magenta_hue_low_range";
-static const char MAGENTA_HUE_HIGH_RANGE_KW[] = "hsi_magenta_hue_high_range";
-static const char MAGENTA_HUE_BLEND_RANGE_KW[] = "hsi_magenta_hue_blend_range";
-static const char MAGENTA_SATURATION_OFFSET_KW[] = "hsi_magenta_saturation_offset";
-static const char MAGENTA_INTENSITY_OFFSET_KW[] = "hsi_magenta_intensity_offset";
-
-static const char WHITE_OBJECT_CLIP_KW[] = "hsi_white_object_clip";
-
-static const double DEFAULT_BLEND = 15.0;
-static const double MAX_BLEND     = 30.0;
-
-ossimHsiRemapper::ossimHsiRemapper()
-   :
-      ossimImageSourceFilter      (),  // base class
-      
-      theTile                     (NULL),
-      theBuffer                   (NULL),
-      theNormalizedMinPix         (0.0),
-
-      theMasterHueOffset          (0.0),
-      theMasterSaturationOffset   (0.0),
-      theMasterIntensityOffset    (0.0),
-      theMasterIntensityLowClip   (0.0),
-      theMasterIntensityHighClip  (1.0),
-      
-      theRedHueOffset             (0.0),
-      theRedHueLowRange           (-30.0),
-      theRedHueHighRange          (30.0),
-      theRedHueBlendRange         (DEFAULT_BLEND),
-      theRedSaturationOffset      (0.0),
-      theRedIntensityOffset       (0.0),
-      
-      theYellowHueOffset          (0.0),
-      theYellowHueLowRange        (30.0),
-      theYellowHueHighRange       (90.0),
-      theYellowHueBlendRange      (DEFAULT_BLEND),
-      theYellowSaturationOffset   (0.0),
-      theYellowIntensityOffset    (0.0),
-      
-      theGreenHueOffset           (0.0),
-      theGreenHueLowRange         (90.0),
-      theGreenHueHighRange        (150.0),
-      theGreenHueBlendRange       (DEFAULT_BLEND),
-      theGreenSaturationOffset    (0.0),
-      theGreenIntensityOffset     (0.0),
-      
-      theCyanHueOffset            (0.0),
-      theCyanHueLowRange          (150.0),
-      theCyanHueHighRange         (210.0),
-      theCyanHueBlendRange        (DEFAULT_BLEND),
-      theCyanSaturationOffset     (0.0),
-      theCyanIntensityOffset      (0.0),
-      
-      theBlueHueOffset            (0.0),
-      theBlueHueLowRange          (210.0),
-      theBlueHueHighRange         (270.0),
-      theBlueHueBlendRange        (DEFAULT_BLEND),
-      theBlueSaturationOffset     (0.0),
-      theBlueIntensityOffset      (0.0),
-      
-      theMagentaHueOffset         (0.0),
-      theMagentaHueLowRange       (270.0),
-      theMagentaHueHighRange      (330.0),
-      theMagentaHueBlendRange     (DEFAULT_BLEND),
-      theMagentaSaturationOffset  (0.0),
-      theMagentaIntensityOffset   (0.0),
-
-      theWhiteObjectClip          (1.0)
-{
-   //***
-   // Set the base class "theEnableFlag" to off since no adjustments have been
-   // made yet.
-   //***
-   //disableSource();
-   theValidFlag = false;
-   // Construction not complete.
-}
-
-ossimHsiRemapper::~ossimHsiRemapper()
-{
-   theTile = NULL;
-   if (theBuffer)
-   {
-      delete [] theBuffer;
-      theBuffer = NULL;
-   }
-}
-
-ossimRefPtr<ossimImageData> ossimHsiRemapper::getTile(
-   const ossimIrect& tile_rect,
-   ossim_uint32 resLevel)
-{
-   if(!theInputConnection)
-   {
-      return ossimRefPtr<ossimImageData>();
-   }
-
-   // Fetch tile from pointer from the input source.
-   ossimRefPtr<ossimImageData> inputTile = theInputConnection->getTile(
-      tile_rect, resLevel);
-
-   // Check for remap bypass or a null tile return from input:
-   if (!isSourceEnabled() || !inputTile||!theValidFlag)
-   {
-      return inputTile;
-   }
-
-   // Check for first time through or size change.
-   if ( !theTile.valid() ||  
-        tile_rect.height() != theTile->getHeight() ||
-        tile_rect.width()  != theTile->getWidth() )
-   {
-      allocate(tile_rect);
-   }
-
-   //---
-   // Set the image rectangle of the tile.
-   // Note that this will resize the tiles buffers if 
-   theTile->setImageRectangle(tile_rect);
-
-   // Get its status.
-   ossimDataObjectStatus tile_status = inputTile->getDataObjectStatus();
-   if ( (tile_status == OSSIM_NULL) || (tile_status == OSSIM_EMPTY) )
-   {
-      theTile->makeBlank();
-      return theTile;
-   }
-
-   double* rgbBuf[3];
-   const ossim_uint32 PPT = theTile->getSizePerBand();  // Pixels Per Tile
-
-   rgbBuf[0] = theBuffer;
-   rgbBuf[1] = &(theBuffer[PPT]);
-   rgbBuf[2] = &(rgbBuf[1][PPT]);
-   
-   switch(inputTile->getNumberOfBands())
-   {
-      case 1:
-      case 2:
-      {
-         // Copy the first band only.
-         inputTile->copyTileBandToNormalizedBuffer(0, rgbBuf[0]);
-         memcpy(rgbBuf[1], rgbBuf[0], PPT*sizeof(double));
-         memcpy(rgbBuf[2], rgbBuf[0], PPT*sizeof(double));
-	 break;
-      }
-      case 3:
-      {
-         inputTile->copyTileToNormalizedBuffer(theBuffer);
-         break;
-      }
-      default:
-      {
-         inputTile->copyTileBandToNormalizedBuffer(0, rgbBuf[0]);
-         inputTile->copyTileBandToNormalizedBuffer(1, rgbBuf[1]);
-         inputTile->copyTileBandToNormalizedBuffer(2, rgbBuf[2]);
-	 break;
-      }
-   }   
-
-   ossimNormRgbVector rgb;
-   ossimHsiVector     hsi;
-   double r = 0.0;
-   double g = 0.0;
-   double b = 0.0;
-   double h = 0.0;
-   double s = 0.0;
-   double i = 0.0;
-   ossim_uint32 idx;
-   // Convert the rgb value to hsi and adjust values.
-   for (idx=0; idx<PPT; ++idx)
-   {
-      r = rgbBuf[0][idx];
-      g = rgbBuf[1][idx];
-      b = rgbBuf[2][idx];
-      
-      rgb = ossimNormRgbVector(r,g,b);
-      hsi = rgb;
-
-      h   = hsi.getH();
-      s   = hsi.getS();
-      i   = hsi.getI();
-      
-      if(i > FLT_EPSILON)
-      {
-         double h_offset = theMasterHueOffset;
-         double s_offset = theMasterSaturationOffset;
-         double i_offset = theMasterIntensityOffset;
-
-         //***
-         // Note:  For the purpose of checking to see if in the red range,
-         //        make the hue negative if it's >= 315.0 and < 360.0.
-         //        The red low and high ranges are stored in the same manner.
-         //***
-         double red_hue  = h;
-         if (red_hue  >= 315.0 && red_hue  < 360.0) red_hue  = red_hue - 360.0;
-                          
-         if ( red_hue >= theRedHueLowRange && red_hue <= theRedHueHighRange)
-         {
-            // Adjust the reds.
-            
-            double bf = 1.0; // blend factor
-            if ( red_hue < (theRedHueLowRange + theRedHueBlendRange) )
-            {
-               bf = (red_hue - theRedHueLowRange) / theRedHueBlendRange;
-            }
-            else if ( red_hue > (theRedHueHighRange - theRedHueBlendRange) )
-            {
-               bf = (theRedHueHighRange - red_hue) / theRedHueBlendRange;
-            }
-            
-            h_offset += (theRedHueOffset        * bf);
-            s_offset += (theRedSaturationOffset * bf);
-            i_offset += (theRedIntensityOffset  * bf);
-         }
-            
-         if (h >= theYellowHueLowRange && h <= theYellowHueHighRange) 
-         {
-            // Adjust the yellows.
-            
-            double bf = 1.0; // blend factor
-            if ( h < (theYellowHueLowRange + theYellowHueBlendRange) )
-            {
-               bf = (h - theYellowHueLowRange) / theYellowHueBlendRange;
-            }
-            else if ( h > (theYellowHueHighRange - theYellowHueBlendRange) )
-            {
-               bf = (theYellowHueHighRange - h) / theYellowHueBlendRange;
-            }
-            
-            h_offset += (theYellowHueOffset        * bf);
-            s_offset += (theYellowSaturationOffset * bf);
-            i_offset += (theYellowIntensityOffset  * bf);
-         }
-         
-         if (h >= theGreenHueLowRange && h <= theGreenHueHighRange) 
-         {
-            // Adjust the greens. 
-
-            double bf = 1.0; // blend factor
-            if ( h < (theGreenHueLowRange + theGreenHueBlendRange) )
-            {
-               bf = (h - theGreenHueLowRange) / theGreenHueBlendRange;
-            }
-            else if ( h > (theGreenHueHighRange - theGreenHueBlendRange) )
-            {
-               bf = (theGreenHueHighRange - h) / theGreenHueBlendRange;
-            }
-            
-            h_offset += (theGreenHueOffset        * bf);
-            s_offset += (theGreenSaturationOffset * bf);
-            i_offset += (theGreenIntensityOffset  * bf);
-         }
-
-         if (h >= theCyanHueLowRange && h <= theCyanHueHighRange) 
-         {
-            // Adjust the cyans.
-            
-            double bf = 1.0; // blend factor
-            if ( h < (theCyanHueLowRange + theCyanHueBlendRange) )
-            {
-               bf = (h - theCyanHueLowRange) / theCyanHueBlendRange;
-            }
-            else if ( h > (theCyanHueHighRange - theCyanHueBlendRange) )
-            {
-               bf = (theCyanHueHighRange - h) / theCyanHueBlendRange;
-            }
-            
-            h_offset += (theCyanHueOffset        * bf);
-            s_offset += (theCyanSaturationOffset * bf);
-            i_offset += (theCyanIntensityOffset  * bf);
-         }
-
-         if (h >= theBlueHueLowRange && h <= theBlueHueHighRange) 
-         {
-            // Adjust the blues.
-            
-            double bf = 1.0; // blend factor
-            if ( h < (theBlueHueLowRange + theBlueHueBlendRange) )
-            {
-               bf = (h - theBlueHueLowRange) / theBlueHueBlendRange;
-            }
-            else if ( h > (theBlueHueHighRange - theBlueHueBlendRange) )
-            {
-               bf = (theBlueHueHighRange - h) / theBlueHueBlendRange;
-            }
-            
-            h_offset += (theBlueHueOffset        * bf);
-            s_offset += (theBlueSaturationOffset * bf);
-            i_offset += (theBlueIntensityOffset  * bf);
-         }
-
-         if (h >= theMagentaHueLowRange && h <= theMagentaHueHighRange) 
-         {
-            // Adjust the magentas.
-            
-            double bf = 1.0; // blend factor
-            if ( h < (theMagentaHueLowRange + theMagentaHueBlendRange) )
-            {
-               bf = (h - theMagentaHueLowRange) / theMagentaHueBlendRange;
-            }
-            else if ( h > (theMagentaHueHighRange - theMagentaHueBlendRange) )
-            {
-               bf = (theMagentaHueHighRange - h) / theMagentaHueBlendRange;
-            }
-            
-            h_offset += (theMagentaHueOffset        * bf);
-            s_offset += (theMagentaSaturationOffset * bf);
-            i_offset += (theMagentaIntensityOffset  * bf);
-         }
-         
-         // Apply the hue offset.
-         h += h_offset;
-
-         // Make sure the hue is between 0 and 360...
-         if (h < 0.0) h += 360.0;
-         else if (h >= 360) h -= 360.0;
-
-         // Apply the saturation offset clamping/clipping to 0.0/1.0.
-         s += s_offset;
-         s = (s > 0.0 ? (s < 1.0 ? s : 1.0) : 0.0);
-         
-         // Apply the intensity offset clamping/clipping to 0.0/1.0.
-         i += i_offset;
-         i = (i > 0.0 ? (i < 1.0 ? i : 1.0) : 0.0);
-
-         // Stretch the intensity channel.
-//          i = (i - theMasterIntensityLowClip) *
-//              ( 1.0 / (theMasterIntensityHighClip -
-//                       theMasterIntensityLowClip) );
-         i = (i - theMasterIntensityLowClip)/(theMasterIntensityHighClip -
-                                              theMasterIntensityLowClip);
-         
-         hsi.setH(h);
-         hsi.setS(s);
-         hsi.setI(i);
-
-         rgb = hsi;
-         
-         r = rgb.getR();
-         g = rgb.getG();
-         b = rgb.getB();
-         if ( (theWhiteObjectClip < 1.0) &&
-              (r > theWhiteObjectClip)   &&
-              (g > theWhiteObjectClip)   &&
-              (b > theWhiteObjectClip) )
-         {
-            r = theWhiteObjectClip;
-            g = theWhiteObjectClip;
-            b = theWhiteObjectClip;
-         }
-         // Do min/max range check and assign back to buffer.
-         rgbBuf[0][idx] = r > theNormalizedMinPix ? (r < 1.0 ? r : 1.0) :
-            theNormalizedMinPix;
-         rgbBuf[1][idx] = g > theNormalizedMinPix ? (g < 1.0 ? g : 1.0) :
-            theNormalizedMinPix;
-         rgbBuf[2][idx] = b > theNormalizedMinPix ? (b < 1.0 ? b : 1.0) :
-            theNormalizedMinPix;
-      } // End of "if(i > FLT_EPSILON)"
-      else
-      {
-         rgbBuf[0][idx] = 0.0;
-         rgbBuf[1][idx] = 0.0;
-         rgbBuf[2][idx] = 0.0;
-      }
-         
-   }  // End of loop through pixels in a tile.
-   // Copy the buffer to the output tile.
-   theTile->copyNormalizedBufferToTile(theBuffer);
-   
-   // Update the tile status.
-   theTile->validate();
-
-   return theTile;
-}
-
-void ossimHsiRemapper::initialize()
-{
-   ossimImageSourceFilter::initialize();
-   if (theTile.valid())
-   {
-      theTile = NULL;
-      if(theBuffer)
-      {
-         delete []theBuffer;
-         theBuffer = NULL;
-      }
-   }
-}
-
-void ossimHsiRemapper::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property.valid()) return;
-   ossimString name = property->getName();
-   if(name == MASTER_HUE_OFFSET_KW)
-   {
-      setMasterHueOffset(property->valueToString().toDouble());
-   }
-   else if(name == MASTER_SATURATION_OFFSET_KW)
-   {
-      setMasterSaturationOffset(property->valueToString().toDouble());
-   }
-   else if(name == MASTER_INTENSITY_OFFSET_KW)
-   {
-      setMasterIntensityOffset(property->valueToString().toDouble());
-   }
-   else if(name == MASTER_INTENSITY_LOW_CLIP_KW)
-   {
-      setMasterIntensityLowClip(property->valueToString().toDouble());
-   }
-   else if(name == MASTER_INTENSITY_HIGH_CLIP_KW)
-   {
-      setMasterIntensityHighClip(property->valueToString().toDouble());
-   }
-   else if(name == RED_HUE_OFFSET_KW)
-   {
-      setRedHueOffset(property->valueToString().toDouble());
-   }
-   else if(name == RED_HUE_LOW_RANGE_KW)
-   {
-      setRedHueLowRange(property->valueToString().toDouble());
-   }
-   else if(name == RED_HUE_HIGH_RANGE_KW)
-   {
-      setRedHueHighRange(property->valueToString().toDouble());
-   }
-   else if(name == RED_HUE_BLEND_RANGE_KW)
-   {
-      setRedHueBlendRange(property->valueToString().toDouble());
-   }
-   else if(name == RED_SATURATION_OFFSET_KW)
-   {
-      setRedSaturationOffset(property->valueToString().toDouble());
-   }
-   else if(name == RED_INTENSITY_OFFSET_KW)
-   {
-      setRedIntensityOffset(property->valueToString().toDouble());
-  }
-   else if(name == YELLOW_HUE_OFFSET_KW)
-   {
-      setYellowHueOffset(property->valueToString().toDouble());
-   }
-   else if(name == YELLOW_HUE_LOW_RANGE_KW)
-   {
-      setYellowHueLowRange(property->valueToString().toDouble());
-   }
-   else if(name == YELLOW_HUE_HIGH_RANGE_KW)
-   {
-      setYellowHueHighRange(property->valueToString().toDouble());
-   }
-   else if(name == YELLOW_HUE_BLEND_RANGE_KW)
-   {
-      setYellowHueBlendRange(property->valueToString().toDouble());
-   }
-   else if(name == YELLOW_SATURATION_OFFSET_KW)
-   {
-      setYellowSaturationOffset(property->valueToString().toDouble());
-   }
-   else if(name == YELLOW_INTENSITY_OFFSET_KW)
-   {
-      setYellowIntensityOffset(property->valueToString().toDouble());
-   }
-   else if(name == GREEN_HUE_OFFSET_KW)
-   {
-      setGreenHueOffset(property->valueToString().toDouble());
-   }
-   else if(name == GREEN_HUE_LOW_RANGE_KW)
-   {
-      setGreenHueLowRange(property->valueToString().toDouble());
-   }
-   else if(name == GREEN_HUE_HIGH_RANGE_KW)
-   {
-      setGreenHueHighRange(property->valueToString().toDouble());
-   }
-   else if(name == GREEN_HUE_BLEND_RANGE_KW)
-   {
-      setGreenHueBlendRange(property->valueToString().toDouble());
-   }
-   else if(name == GREEN_SATURATION_OFFSET_KW)
-   {
-      setGreenSaturationOffset(property->valueToString().toDouble());
-   }
-   else if(name == GREEN_INTENSITY_OFFSET_KW)
-   {
-      setGreenIntensityOffset(property->valueToString().toDouble());
-   }
-   else if(name == CYAN_HUE_OFFSET_KW)
-   {
-      setCyanHueOffset(property->valueToString().toDouble());
-   }
-   else if(name == CYAN_HUE_LOW_RANGE_KW)
-   {
-      setCyanHueLowRange(property->valueToString().toDouble());
-   }
-   else if(name == CYAN_HUE_HIGH_RANGE_KW)
-   {
-      setCyanHueHighRange(property->valueToString().toDouble());
-   }
-   else if(name == CYAN_HUE_BLEND_RANGE_KW)
-   {
-      setCyanHueBlendRange(property->valueToString().toDouble());
-   }
-   else if(name == CYAN_SATURATION_OFFSET_KW)
-   {
-      setCyanSaturationOffset(property->valueToString().toDouble());
-   }
-   else if(name == CYAN_INTENSITY_OFFSET_KW)
-   {
-      setCyanIntensityOffset(property->valueToString().toDouble());
-   }
-   else if(name == BLUE_HUE_OFFSET_KW)
-   {
-      setBlueHueOffset(property->valueToString().toDouble());
-   }
-   else if(name == BLUE_HUE_LOW_RANGE_KW)
-   {
-      setBlueHueLowRange(property->valueToString().toDouble());
-   }
-   else if(name == BLUE_HUE_HIGH_RANGE_KW)
-   {
-      setBlueHueHighRange(property->valueToString().toDouble());
-   }
-   else if(name == BLUE_HUE_BLEND_RANGE_KW)
-   {
-      setBlueHueBlendRange(property->valueToString().toDouble());
-   }
-   else if(name == BLUE_SATURATION_OFFSET_KW)
-   {
-      setBlueSaturationOffset(property->valueToString().toDouble());
-   }
-   else if(name == BLUE_INTENSITY_OFFSET_KW)
-   {
-      setBlueIntensityOffset(property->valueToString().toDouble());
-   }
-   else if(name == MAGENTA_HUE_OFFSET_KW)
-   {
-      setMagentaHueOffset(property->valueToString().toDouble());
-   }
-   else if(name == MAGENTA_HUE_LOW_RANGE_KW)
-   {
-      setMagentaHueLowRange(property->valueToString().toDouble());
-   }
-   else if(name == MAGENTA_HUE_HIGH_RANGE_KW)
-   {
-      setMagentaHueHighRange(property->valueToString().toDouble());
-   }
-   else if(name == MAGENTA_HUE_BLEND_RANGE_KW)
-   {
-      setMagentaHueBlendRange(property->valueToString().toDouble());
-   }
-   else if(name == MAGENTA_SATURATION_OFFSET_KW)
-   {
-      setMagentaSaturationOffset(property->valueToString().toDouble());
-   }
-   else if(name == MAGENTA_INTENSITY_OFFSET_KW)
-   {
-      setMagentaIntensityOffset(property->valueToString().toDouble());
-   }
-   else if(name == WHITE_OBJECT_CLIP_KW)
-   {
-      setWhiteObjectClip(property->valueToString().toDouble());
-   }
-   else
-   {
-      ossimImageSourceFilter::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimHsiRemapper::getProperty(const ossimString& name)const
-{
-   ossimRefPtr<ossimProperty> result;
-   if(name == MASTER_HUE_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theMasterHueOffset), -180, 180);
-      result->setCacheRefreshBit();
-   }
-   else if(name == MASTER_SATURATION_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theMasterSaturationOffset), -1, 1);
-      result->setCacheRefreshBit();
-  }
-   else if(name == MASTER_INTENSITY_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theMasterIntensityOffset), -1, 1);
-      result->setCacheRefreshBit();
-   }
-   else if(name == MASTER_INTENSITY_LOW_CLIP_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theMasterIntensityLowClip), 0, 1);
-      result->setCacheRefreshBit();
-   }
-   else if(name == MASTER_INTENSITY_HIGH_CLIP_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theMasterIntensityHighClip), 0, 1);
-      result->setCacheRefreshBit();
-   }
-   else if(name == RED_HUE_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theRedHueOffset), -180, 180);
-      result->setCacheRefreshBit();
-   }
-   else if(name == RED_HUE_LOW_RANGE_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theRedHueLowRange), -30, 30);
-      result->setCacheRefreshBit();
-   }
-   else if(name == RED_HUE_HIGH_RANGE_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theRedHueHighRange), -30, 30);
-      result->setCacheRefreshBit();
-   }
-   else if(name == RED_HUE_BLEND_RANGE_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theRedHueBlendRange), 0, 30);
-      result->setCacheRefreshBit();
-   }
-   else if(name == RED_SATURATION_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theRedSaturationOffset), -1, 1);
-      result->setCacheRefreshBit();
-   }
-   else if(name == RED_INTENSITY_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theRedIntensityOffset), -1, 1);
-      result->setCacheRefreshBit();
-   }
-   else if(name == YELLOW_HUE_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theYellowHueOffset), -180, 180);
-      result->setCacheRefreshBit();
-   }
-   else if(name == YELLOW_HUE_LOW_RANGE_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theYellowHueLowRange), 30, 90);
-      result->setCacheRefreshBit();
-   }
-   else if(name == YELLOW_HUE_HIGH_RANGE_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theYellowHueHighRange), 30, 90);
-      result->setCacheRefreshBit();
-   }
-   else if(name == YELLOW_HUE_BLEND_RANGE_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theYellowHueBlendRange), 0, 30);
-      result->setCacheRefreshBit();
-   }
-   else if(name == YELLOW_SATURATION_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theYellowSaturationOffset), -1, 1);
-      result->setCacheRefreshBit();
-   }
-   else if(name == YELLOW_INTENSITY_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theYellowIntensityOffset), -1, 1);
-      result->setCacheRefreshBit();
-   }
-   else if(name == GREEN_HUE_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theGreenHueOffset), -180, 180);
-      result->setCacheRefreshBit();
-   }
-   else if(name == GREEN_HUE_LOW_RANGE_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theGreenHueLowRange), 90, 150);
-      result->setCacheRefreshBit();
-   }
-   else if(name == GREEN_HUE_HIGH_RANGE_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theGreenHueHighRange), 90, 150);
-      result->setCacheRefreshBit();
-   }
-   else if(name == GREEN_HUE_BLEND_RANGE_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theGreenHueBlendRange), 0, 30);
-      result->setCacheRefreshBit();
-   }
-   else if(name == GREEN_SATURATION_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theGreenSaturationOffset), -1, 1);
-      result->setCacheRefreshBit();
-   }
-   else if(name == GREEN_INTENSITY_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theGreenIntensityOffset), -1, 1);
-      result->setCacheRefreshBit();
-   }
-   else if(name == CYAN_HUE_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theCyanHueOffset), -180, 180);
-      result->setCacheRefreshBit();
-   }
-   else if(name == CYAN_HUE_LOW_RANGE_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theCyanHueLowRange), 150, 210);
-      result->setCacheRefreshBit();
-   }
-   else if(name == CYAN_HUE_HIGH_RANGE_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theCyanHueHighRange), 150, 210);
-      result->setCacheRefreshBit();
-   }
-   else if(name == CYAN_HUE_BLEND_RANGE_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theCyanHueBlendRange), 0, 30);
-      result->setCacheRefreshBit();
-   }
-   else if(name == CYAN_SATURATION_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theCyanSaturationOffset), -1, 1);
-      result->setCacheRefreshBit();
-   }
-   else if(name == CYAN_INTENSITY_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theCyanIntensityOffset), -1, 1);
-      result->setCacheRefreshBit();
-   }
-   else if(name == BLUE_HUE_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theBlueHueOffset), -180, 180);
-      result->setCacheRefreshBit();
-   }
-   else if(name == BLUE_HUE_LOW_RANGE_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theBlueHueLowRange), 210, 270);
-      result->setCacheRefreshBit();
-   }
-   else if(name == BLUE_HUE_HIGH_RANGE_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theBlueHueHighRange), 210, 270);
-      result->setCacheRefreshBit();
-   }
-   else if(name == BLUE_HUE_BLEND_RANGE_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theBlueHueBlendRange), 0, 30);
-      result->setCacheRefreshBit();
-   }
-   else if(name == BLUE_SATURATION_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theBlueSaturationOffset), -1, 1);
-      result->setCacheRefreshBit();
-   }
-   else if(name == BLUE_INTENSITY_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theBlueIntensityOffset), -1, 1);
-      result->setCacheRefreshBit();
-   }
-   else if(name == MAGENTA_HUE_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theMagentaHueOffset), -180, 180);
-      result->setCacheRefreshBit();
-   }
-   else if(name == MAGENTA_HUE_LOW_RANGE_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theMagentaHueLowRange), 270, 330);
-      result->setCacheRefreshBit();
-   }
-   else if(name == MAGENTA_HUE_HIGH_RANGE_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theMagentaHueHighRange), 270, 330);
-      result->setCacheRefreshBit();
-   }
-   else if(name == MAGENTA_HUE_BLEND_RANGE_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theMagentaHueBlendRange), 0, 30);
-      result->setCacheRefreshBit();
-   }
-   else if(name == MAGENTA_SATURATION_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theMagentaSaturationOffset), -1, 1);
-      result->setCacheRefreshBit();
-   }
-   else if(name == MAGENTA_INTENSITY_OFFSET_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theMagentaIntensityOffset), -1, 1);
-      result->setCacheRefreshBit();
-   }
-   else if(name == WHITE_OBJECT_CLIP_KW)
-   {
-      result = new ossimNumericProperty(name, ossimString::toString(theWhiteObjectClip), 0.8, 1.0);
-      result->setCacheRefreshBit();
-   }
-   else
-   {
-     result = ossimImageSourceFilter::getProperty(name);
-   }
-   
-   return result;
-}
-
-void ossimHsiRemapper::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageSourceFilter::getPropertyNames(propertyNames);
-   propertyNames.push_back(MASTER_HUE_OFFSET_KW);
-   propertyNames.push_back(MASTER_SATURATION_OFFSET_KW);
-   propertyNames.push_back(MASTER_INTENSITY_OFFSET_KW);
-   propertyNames.push_back(MASTER_INTENSITY_LOW_CLIP_KW);
-   propertyNames.push_back(MASTER_INTENSITY_HIGH_CLIP_KW);
-   propertyNames.push_back(RED_HUE_OFFSET_KW);
-   propertyNames.push_back(RED_HUE_LOW_RANGE_KW);
-   propertyNames.push_back(RED_HUE_HIGH_RANGE_KW);
-   propertyNames.push_back(RED_HUE_BLEND_RANGE_KW);
-   propertyNames.push_back(RED_SATURATION_OFFSET_KW);
-   propertyNames.push_back(RED_INTENSITY_OFFSET_KW);
-   propertyNames.push_back(YELLOW_HUE_OFFSET_KW);
-   propertyNames.push_back(YELLOW_HUE_LOW_RANGE_KW);
-   propertyNames.push_back(YELLOW_HUE_HIGH_RANGE_KW);
-   propertyNames.push_back(YELLOW_HUE_BLEND_RANGE_KW);
-   propertyNames.push_back(YELLOW_SATURATION_OFFSET_KW);
-   propertyNames.push_back(YELLOW_INTENSITY_OFFSET_KW);
-   propertyNames.push_back(GREEN_HUE_OFFSET_KW);
-   propertyNames.push_back(GREEN_HUE_LOW_RANGE_KW);
-   propertyNames.push_back(GREEN_HUE_HIGH_RANGE_KW);
-   propertyNames.push_back(GREEN_HUE_BLEND_RANGE_KW);
-   propertyNames.push_back(GREEN_SATURATION_OFFSET_KW);
-   propertyNames.push_back(GREEN_INTENSITY_OFFSET_KW);
-   propertyNames.push_back(CYAN_HUE_OFFSET_KW);
-   propertyNames.push_back(CYAN_HUE_LOW_RANGE_KW);
-   propertyNames.push_back(CYAN_HUE_HIGH_RANGE_KW);
-   propertyNames.push_back(CYAN_HUE_BLEND_RANGE_KW);
-   propertyNames.push_back(CYAN_SATURATION_OFFSET_KW);
-   propertyNames.push_back(CYAN_INTENSITY_OFFSET_KW);
-   propertyNames.push_back(BLUE_HUE_OFFSET_KW);
-   propertyNames.push_back(BLUE_HUE_LOW_RANGE_KW);
-   propertyNames.push_back(BLUE_HUE_HIGH_RANGE_KW);
-   propertyNames.push_back(BLUE_HUE_BLEND_RANGE_KW);
-   propertyNames.push_back(BLUE_SATURATION_OFFSET_KW);
-   propertyNames.push_back(BLUE_INTENSITY_OFFSET_KW);
-   propertyNames.push_back(MAGENTA_HUE_OFFSET_KW);
-   propertyNames.push_back(MAGENTA_HUE_LOW_RANGE_KW);
-   propertyNames.push_back(MAGENTA_HUE_HIGH_RANGE_KW);
-   propertyNames.push_back(MAGENTA_HUE_BLEND_RANGE_KW);
-   propertyNames.push_back(MAGENTA_SATURATION_OFFSET_KW);
-   propertyNames.push_back(MAGENTA_INTENSITY_OFFSET_KW);
-   propertyNames.push_back(WHITE_OBJECT_CLIP_KW);
-}
-
-
-void ossimHsiRemapper::allocate(const ossimIrect& rect)
-{
-   
-   if(theInputConnection)
-   {
-      theTile = ossimImageDataFactory::instance()->create(this,this);
-      theTile->initialize();
-
-      ossim_uint32 width  = rect.width();
-      ossim_uint32 height = rect.height();
-      if(theBuffer)
-      {
-         delete [] theBuffer;
-         theBuffer = 0;
-      }
-      ossim_uint32 size = width * height * 3; // Buffer always 3 bands.
-      theBuffer = new double[size];
-      memset(theBuffer, '\0', sizeof(double) * size);
-      
-      // Get the minimum normalized pixel value.
-      theNormalizedMinPix = calculateMinNormValue();
-   }
-}
-
-bool ossimHsiRemapper::loadState(const ossimKeywordlist& kwl,
-                                 const char* prefix)
-{
-   static const char MODULE[] = "ossimHsiRemapper::loadState()";
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " entering..." << endl;
-   }
-
-   // Make a prefix.
-   ossimString tmpPrefix;
-   if (prefix) tmpPrefix += prefix;
-   
-   const char* lookupReturn;
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), MASTER_HUE_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setMasterHueOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), MASTER_SATURATION_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setMasterSaturationOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), MASTER_INTENSITY_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setMasterIntensityOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), MASTER_INTENSITY_LOW_CLIP_KW);
-   if(lookupReturn)
-   {
-      setMasterIntensityLowClip(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), MASTER_INTENSITY_HIGH_CLIP_KW);
-   if(lookupReturn)
-   {
-      setMasterIntensityHighClip(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), RED_HUE_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setRedHueOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), RED_HUE_LOW_RANGE_KW);
-   if(lookupReturn)
-   {
-      setRedHueLowRange(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), RED_HUE_HIGH_RANGE_KW);
-   if(lookupReturn)
-   {
-      setRedHueHighRange(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), RED_HUE_BLEND_RANGE_KW);
-   if(lookupReturn)
-   {
-      setRedHueBlendRange(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), RED_SATURATION_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setRedSaturationOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), RED_INTENSITY_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setRedIntensityOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), YELLOW_HUE_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setYellowHueOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), YELLOW_HUE_LOW_RANGE_KW);
-   if(lookupReturn)
-   {
-      setYellowHueLowRange(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), YELLOW_HUE_HIGH_RANGE_KW);
-   if(lookupReturn)
-   {
-      setYellowHueHighRange(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), YELLOW_HUE_BLEND_RANGE_KW);
-   if(lookupReturn)
-   {
-      setYellowHueBlendRange(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), YELLOW_SATURATION_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setYellowSaturationOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), YELLOW_INTENSITY_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setYellowIntensityOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), GREEN_HUE_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setGreenHueOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), GREEN_HUE_LOW_RANGE_KW);
-   if(lookupReturn)
-   {
-      setGreenHueLowRange(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), GREEN_HUE_HIGH_RANGE_KW);
-   if(lookupReturn)
-   {
-      setGreenHueHighRange(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), GREEN_HUE_BLEND_RANGE_KW);
-   if(lookupReturn)
-   {
-      setGreenHueBlendRange(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), GREEN_SATURATION_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setGreenSaturationOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), GREEN_INTENSITY_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setGreenIntensityOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), CYAN_HUE_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setCyanHueOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), CYAN_HUE_LOW_RANGE_KW);
-   if(lookupReturn)
-   {
-      setCyanHueLowRange(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), CYAN_HUE_HIGH_RANGE_KW);
-   if(lookupReturn)
-   {
-      setCyanHueHighRange(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), CYAN_HUE_BLEND_RANGE_KW);
-   if(lookupReturn)
-   {
-      setCyanHueBlendRange(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), CYAN_SATURATION_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setCyanSaturationOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), CYAN_INTENSITY_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setCyanIntensityOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), BLUE_HUE_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setBlueHueOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), BLUE_HUE_LOW_RANGE_KW);
-   if(lookupReturn)
-   {
-      setBlueHueLowRange(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), BLUE_HUE_HIGH_RANGE_KW);
-   if(lookupReturn)
-   {
-      setBlueHueHighRange(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), BLUE_HUE_BLEND_RANGE_KW);
-   if(lookupReturn)
-   {
-      setBlueHueBlendRange(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), BLUE_SATURATION_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setBlueSaturationOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), BLUE_INTENSITY_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setBlueIntensityOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), MAGENTA_HUE_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setMagentaHueOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), MAGENTA_HUE_LOW_RANGE_KW);
-   if(lookupReturn)
-   {
-      setMagentaHueLowRange(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), MAGENTA_HUE_HIGH_RANGE_KW);
-   if(lookupReturn)
-   {
-      setMagentaHueHighRange(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), MAGENTA_HUE_BLEND_RANGE_KW);
-   if(lookupReturn)
-   {
-      setMagentaHueBlendRange(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), MAGENTA_SATURATION_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setMagentaSaturationOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), MAGENTA_INTENSITY_OFFSET_KW);
-   if(lookupReturn)
-   {
-      setMagentaIntensityOffset(atof(lookupReturn));
-   }
-
-   lookupReturn = kwl.find(tmpPrefix.c_str(), WHITE_OBJECT_CLIP_KW);
-   if(lookupReturn)
-   {
-      setWhiteObjectClip(atof(lookupReturn));
-   }
-
-   //***
-   // Initialize the base class.  Do this last so that the enable/disable
-   // doesn't get overridden by the "set*" methods.
-   //***
-   ossimImageSourceFilter::loadState(kwl, tmpPrefix.c_str());
-   
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << ""
-         << *this
-         << "\nreturning..."
-         << endl;
-   }
-
-   return true;
-}
-
-bool ossimHsiRemapper::saveState(ossimKeywordlist& kwl,
-                                 const char* prefix) const
-{
-   static const char MODULE[] = "ossimHsiRemapper::saveStateTo()";
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << "entering..." << endl;
-   }
-
-   // Call the base class getStateFrom.
-   ossimImageSourceFilter::saveState(kwl, prefix);
-
-   kwl.add(prefix, MASTER_HUE_OFFSET_KW, theMasterHueOffset);
-
-   kwl.add(prefix, MASTER_SATURATION_OFFSET_KW, theMasterSaturationOffset);
-
-   kwl.add(prefix, MASTER_INTENSITY_OFFSET_KW, theMasterIntensityOffset);
-
-   kwl.add(prefix, MASTER_INTENSITY_LOW_CLIP_KW, theMasterIntensityLowClip);
-
-   kwl.add(prefix, MASTER_INTENSITY_HIGH_CLIP_KW, theMasterIntensityHighClip);
-
-   kwl.add(prefix, RED_HUE_OFFSET_KW, theRedHueOffset);
-
-   kwl.add(prefix, RED_HUE_LOW_RANGE_KW, theRedHueLowRange);
-
-   kwl.add(prefix, RED_HUE_HIGH_RANGE_KW, theRedHueHighRange);
-
-   kwl.add(prefix, RED_HUE_BLEND_RANGE_KW, theRedHueBlendRange);
-
-   kwl.add(prefix, RED_SATURATION_OFFSET_KW, theRedSaturationOffset);
-           
-   kwl.add(prefix, RED_INTENSITY_OFFSET_KW, theRedIntensityOffset);
-
-   kwl.add(prefix, YELLOW_HUE_OFFSET_KW, theYellowHueOffset);
-
-   kwl.add(prefix, YELLOW_HUE_LOW_RANGE_KW, theYellowHueLowRange);
-
-   kwl.add(prefix, YELLOW_HUE_HIGH_RANGE_KW, theYellowHueHighRange);
-           
-   kwl.add(prefix, YELLOW_HUE_BLEND_RANGE_KW, theYellowHueBlendRange);
-
-   kwl.add(prefix, YELLOW_SATURATION_OFFSET_KW, theYellowSaturationOffset);
-
-   kwl.add(prefix, YELLOW_INTENSITY_OFFSET_KW, theYellowIntensityOffset);
-
-   kwl.add(prefix, GREEN_HUE_OFFSET_KW, theGreenHueOffset);
-
-   kwl.add(prefix, GREEN_HUE_LOW_RANGE_KW, theGreenHueLowRange);
-
-   kwl.add(prefix, GREEN_HUE_HIGH_RANGE_KW, theGreenHueHighRange);
-
-   kwl.add(prefix, GREEN_HUE_BLEND_RANGE_KW, theGreenHueBlendRange);
-           
-   kwl.add(prefix, GREEN_SATURATION_OFFSET_KW, theGreenSaturationOffset);
-           
-   kwl.add(prefix, GREEN_INTENSITY_OFFSET_KW, theGreenIntensityOffset);
-
-   kwl.add(prefix, CYAN_HUE_OFFSET_KW, theCyanHueOffset);
-
-   kwl.add(prefix, CYAN_HUE_LOW_RANGE_KW, theCyanHueLowRange);
-
-   kwl.add(prefix, CYAN_HUE_HIGH_RANGE_KW, theCyanHueHighRange);
-           
-   kwl.add(prefix, CYAN_HUE_BLEND_RANGE_KW, theCyanHueBlendRange);
-           
-   kwl.add(prefix, CYAN_SATURATION_OFFSET_KW, theCyanSaturationOffset);
-           
-   kwl.add(prefix, CYAN_INTENSITY_OFFSET_KW, theCyanIntensityOffset);
-
-   kwl.add(prefix, BLUE_HUE_OFFSET_KW, theBlueHueOffset);
-
-   kwl.add(prefix, BLUE_HUE_LOW_RANGE_KW, theBlueHueLowRange);
-
-   kwl.add(prefix, BLUE_HUE_HIGH_RANGE_KW, theBlueHueHighRange);
-
-   kwl.add(prefix, BLUE_HUE_BLEND_RANGE_KW, theBlueHueBlendRange);
-
-   kwl.add(prefix, BLUE_SATURATION_OFFSET_KW, theBlueSaturationOffset);
-           
-   kwl.add(prefix, BLUE_INTENSITY_OFFSET_KW, theBlueIntensityOffset);
-           
-   kwl.add(prefix, MAGENTA_HUE_OFFSET_KW, theMagentaHueOffset);
-           
-   kwl.add(prefix, MAGENTA_HUE_LOW_RANGE_KW, theMagentaHueLowRange);
-           
-   kwl.add(prefix, MAGENTA_HUE_HIGH_RANGE_KW, theMagentaHueHighRange);
-           
-   kwl.add(prefix, MAGENTA_HUE_BLEND_RANGE_KW, theMagentaHueBlendRange);
-           
-   kwl.add(prefix, MAGENTA_SATURATION_OFFSET_KW, theMagentaSaturationOffset);
-
-   kwl.add(prefix, MAGENTA_INTENSITY_OFFSET_KW, theMagentaIntensityOffset);
-
-   kwl.add(prefix, WHITE_OBJECT_CLIP_KW, theWhiteObjectClip);
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << "returning..." << endl;
-   }
-
-   return true;
-}
-
-void ossimHsiRemapper::resetGroup(int color_group)
-{
-   switch (color_group)
-   {
-      case RED:
-         resetRed();
-         break;
-      case YELLOW:
-         resetYellow();
-         break;
-      case GREEN:
-         resetGreen();
-         break;
-      case CYAN:
-         resetCyan();
-         break;
-      case BLUE:
-         resetBlue();
-         break;
-      case MAGENTA:
-         resetMagenta();
-         break;
-      case ALL:
-         resetMaster();
-         break;
-      default:
-         ossimNotify(ossimNotifyLevel_NOTICE)
-            << "ossimHsiRemapper::setSaturationOffset NOTICE:  Range error!"
-            << endl;
-         break;
-   }
-   verifyEnabled();
-}
-
-void ossimHsiRemapper::resetAll()
-{
-   theMasterHueOffset          = 0.0;
-   theMasterSaturationOffset   = 0.0;
-   theMasterIntensityOffset    = 0.0;
-   theMasterIntensityLowClip   = 0.0;
-   theMasterIntensityHighClip  = 1.0;
-   
-   theRedHueOffset             = 0.0;
-   theRedHueLowRange           = -30.0;
-   theRedHueHighRange          = 30.0;
-   theRedHueBlendRange         = DEFAULT_BLEND;
-   theRedSaturationOffset      = 0.0;
-   theRedIntensityOffset       = 0.0;
-   
-   theYellowHueOffset          = 0.0;
-   theYellowHueLowRange        = 30.0;
-   theYellowHueHighRange       = 90.0;
-   theYellowHueBlendRange      = DEFAULT_BLEND;
-   theYellowSaturationOffset   = 0.0;
-   theYellowIntensityOffset    = 0.0;
-   
-   theGreenHueOffset           = 0.0;
-   theGreenHueLowRange         = 90.0;
-   theGreenHueHighRange        = 150.0;
-   theGreenHueBlendRange       = DEFAULT_BLEND;
-   theGreenSaturationOffset    = 0.0;
-   theGreenIntensityOffset     = 0.0;
-   
-   theCyanHueOffset            = 0.0;
-   theCyanHueLowRange          = 150.0;
-   theCyanHueHighRange         = 210.0;
-   theCyanHueBlendRange        = DEFAULT_BLEND;
-   theCyanSaturationOffset     = 0.0;
-   theCyanIntensityOffset      = 0.0;
-   
-   theBlueHueOffset            = 0.0;
-   theBlueHueLowRange          = 210.0;
-   theBlueHueHighRange         = 270.0;
-   theBlueHueBlendRange        = DEFAULT_BLEND;
-   theBlueSaturationOffset     = 0.0;
-   theBlueIntensityOffset      = 0.0;
-   
-   theMagentaHueOffset         = 0.0;
-   theMagentaHueLowRange       = 270.0;
-   theMagentaHueHighRange      = 330.0;
-   theMagentaHueBlendRange     = DEFAULT_BLEND;
-   theMagentaSaturationOffset  = 0.0;
-   theMagentaIntensityOffset   = 0.0;
-
-   theWhiteObjectClip          = 1.0;
-   theValidFlag = false;
-   //disableSource();
-}
-
-void ossimHsiRemapper::resetMaster()
-{
-   theMasterHueOffset          = 0.0;
-   theMasterSaturationOffset   = 0.0;
-   theMasterIntensityOffset    = 0.0;
-   theMasterIntensityLowClip   = 0.0;
-   theMasterIntensityHighClip  = 1.0;
-
-   verifyEnabled();
-}
-
-void ossimHsiRemapper::resetRed()
-{
-   theRedHueOffset             = 0.0;
-   theRedHueLowRange           = -30.0;
-   theRedHueHighRange          = 30.0;
-   theRedHueBlendRange         = DEFAULT_BLEND;
-   theRedSaturationOffset      = 0.0;
-   theRedIntensityOffset       = 0.0;
-
-   verifyEnabled();
-}
-
-void ossimHsiRemapper::resetYellow()
-{
-   theYellowHueOffset          = 0.0;
-   theYellowHueLowRange        = 30.0;
-   theYellowHueHighRange       = 90.0;
-   theYellowHueBlendRange      = DEFAULT_BLEND;
-   theYellowSaturationOffset   = 0.0;
-   theYellowIntensityOffset    = 0.0;
-
-   verifyEnabled();
-}
-
-void ossimHsiRemapper::resetGreen()
-{
-   theGreenHueOffset           = 0.0;
-   theGreenHueLowRange         = 90.0;
-   theGreenHueHighRange        = 150.0;
-   theGreenHueBlendRange       = DEFAULT_BLEND;
-   theGreenSaturationOffset    = 0.0;
-   theGreenIntensityOffset     = 0.0;
-
-   verifyEnabled();
-}
-
-void ossimHsiRemapper::resetCyan()
-{
-   theCyanHueOffset            = 0.0;
-   theCyanHueLowRange          = 150.0;
-   theCyanHueHighRange         = 210.0;
-   theCyanHueBlendRange        = DEFAULT_BLEND;
-   theCyanSaturationOffset     = 0.0;
-   theCyanIntensityOffset      = 0.0;
-
-   verifyEnabled();
-}
-
-void ossimHsiRemapper::resetBlue()
-{
-   theBlueHueOffset            = 0.0;
-   theBlueHueLowRange          = 210.0;
-   theBlueHueHighRange         = 270.0;
-   theBlueHueBlendRange        = DEFAULT_BLEND;
-   theBlueSaturationOffset     = 0.0;
-   theBlueIntensityOffset      = 0.0;
-
-   verifyEnabled();
-}
-
-void ossimHsiRemapper::resetMagenta()
-{
-   theMagentaHueOffset         = 0.0;
-   theMagentaHueLowRange       = 270.0;
-   theMagentaHueHighRange      = 330.0;
-   theMagentaHueBlendRange     = DEFAULT_BLEND;
-   theMagentaSaturationOffset  = 0.0;
-   theMagentaIntensityOffset   = 0.0;
-
-   verifyEnabled();
-}
-
-void ossimHsiRemapper::verifyEnabled()
-{
-   // Start off disabled...
-   //disableSource();
-   theValidFlag = false;
-   if (!theInputConnection)
-   {
-      //***
-      // Since this filter can be constructed with no input connection do not
-      // output and error, simply return.
-      //***
-      return;
-   }
-   
-   //***
-   // Add all the offsets and the low clips.
-   // If greater than zero enable getTile method.
-   //***
-   double d = theMasterHueOffset         +
-           theMasterSaturationOffset  +
-           theMasterIntensityOffset   +
-           theMasterIntensityLowClip  +
-           theRedHueOffset            +
-           theRedSaturationOffset     +
-           theRedIntensityOffset      +
-           theYellowHueOffset         +
-           theYellowSaturationOffset  +
-           theYellowIntensityOffset   +
-           theGreenHueOffset          +
-           theGreenSaturationOffset   +
-           theGreenIntensityOffset    +
-           theCyanHueOffset           +
-           theCyanSaturationOffset    +
-           theCyanIntensityOffset     +
-           theBlueHueOffset           +
-           theBlueSaturationOffset    +
-           theBlueIntensityOffset     +
-           theMagentaHueOffset        +
-           theMagentaSaturationOffset +
-           theMagentaIntensityOffset;
-   
-   if ( d != 0.0 ||
-        theMasterIntensityHighClip != 1.0 ||
-        theWhiteObjectClip != 1.0 )
-   {
-      theValidFlag = true;
-     // enableSource();
-   }
-}
-
-void ossimHsiRemapper::setMasterHueOffset(double offset)
-{
-   if (offset >= -180.0 && offset <= 180.0)
-   {
-      theMasterHueOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setMasterHueOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -180.0 and less than"
-         << "\nor equal to 180.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setMasterSaturationOffset(double offset)
-{
-   if (offset >= -1.0 && offset <= 1.0)
-   {
-      theMasterSaturationOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setMasterSaturationOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -1.0 and less than"
-         << "\nor equal to 1.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setMasterIntensityOffset(double offset)
-{
-   if (offset >= -1.0 && offset <= 1.0)
-   {
-      theMasterIntensityOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setMasterIntensityOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -1.0 and less than"
-         << "\nor equal to 1.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setMasterIntensityLowClip(double clip)
-{
-   if (clip >= 0.0 && clip < theMasterIntensityHighClip)
-   {
-      theMasterIntensityLowClip = clip;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setMasterIntensityClip range error:"
-         << "\nLow clip of " << clip << " is out of range!"
-         << "\nMust be equal to or greater than 0.0 and less than"
-         << "\nthe high clip of " << theMasterIntensityHighClip
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setMasterIntensityHighClip(double clip)
-{
-   if (clip <= 1.0 && clip > theMasterIntensityLowClip)
-   {
-      theMasterIntensityHighClip = clip;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setMasterIntensityHighClip range error:"
-         << "\nHigh clip of " << clip << " is out of range!"
-         << "\nMust be greater than low clip of "
-         << theMasterIntensityLowClip << " and less than 1.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setRedHueOffset(double offset)
-{
-   if (offset >= -180.0 && offset <= 180.0)
-   {
-      theRedHueOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setRedHueOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -180.0 and less than"
-         << "\nor equal to 180.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setRedHueLowRange(double range)
-{
-   //***
-   // Default red range: 330 - 30
-   // Allow 315 to 15 as long as it's less than the high range.
-   // Note:  Store the range as a negative if it's between 315 and 360.
-   //***
-   double r  = range;
-   double h  = theRedHueHighRange;
-
-   if (r >= 315.0 && r < 360.0) r = r - 360.0;
-   if (h >= 315.0 && h < 360.0) h = h - 360.0;
-
-   if (r >= -45.0 && r <= 15.0 && r < h)
-   {
-      theRedHueLowRange = r;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setRedHueLow range error:"
-         << "\nRange of " << range << " is out of range!"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setRedHueHighRange(double range)
-{
-   if (range == 360.0) range = 0.0;
-   
-   //***
-   // Default red range: 330 - 30
-   // Allow 345 to 45 as long as it's greater than the low range.
-   // Note:  Store the range as a negative if it's between 345 and 360.
-   //***
-
-   double r = range;
-   double l = theRedHueLowRange;
-
-   if (r >= 315.0 && r < 360.0) r = r - 360.0;
-   if (l >= 315.0 && l < 360.0) l = l - 360.0;
-
-   if (r >= -15.0 && r <= 45 && l < r)
-   {
-      theRedHueHighRange = r;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setRedHueHigh range error:"
-         << "\nRange of " << range << " is out of range!"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setRedHueBlendRange(double range)
-{
-   //***
-   // Allowable range: 0.0 to 30.0 as long as it's not greater than the
-   // half range.  If so snap it to half range.
-   //***
-   if ( range >= 0.0  &&
-        range <= MAX_BLEND )
-   {
-      double half_range = (theRedHueHighRange - theRedHueLowRange) / 2.0;
-
-      if (range <= half_range)
-      {
-         theRedHueBlendRange = range;
-      }
-      else
-      {
-         // Put it in the middle of the range.
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimHsiRemapper::setRedHueBlendRange range error:"
-            << "\nRange of " << range << " is greater than the full range"
-            << "\ndivided by 2!"
-            << endl;
-         
-         theRedHueBlendRange = half_range;
-      }
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setRedHueBlendRange range error:"
-         << "\nRange of " << range << " is out of range!"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setRedSaturationOffset(double offset)
-{
-   if (offset >= -1.0 && offset <= 1.0)
-   {
-      theRedSaturationOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setRedSaturationOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -1.0 and less than"
-         << "\nor equal to 1.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setRedIntensityOffset(double offset)
-{
-   if (offset >= -1.0 && offset <= 1.0)
-   {
-      theRedIntensityOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setRedIntensityOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -1.0 and less than"
-         << "\nor equal to 1.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setYellowHueOffset(double offset)
-{
-   if (offset >= -180.0 && offset <= 180.0)
-   {
-      theYellowHueOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setYellowHueOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -180.0 and less than"
-         << "\nor equal to 180.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setYellowHueLowRange(double range)
-{
-   //***
-   // Default yellow range: 30 - 90
-   // Allow 15 to 75 as long as it's less than the high range.
-   //***
-   if ( range >= 15.0 &&
-        range <= 75.0 &&
-        range < theYellowHueHighRange )
-   {
-      theYellowHueLowRange = range;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setYellowHueLowRange range error:"
-         << "\nRange of " << range << " is out of range!"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setYellowHueHighRange(double range)
-{
-   //***
-   // Default yellow range: 30 - 90
-   // Allow 45 to 105 as long as it's greater than the low range.
-   //***
-   if ( range >= 45.0  &&
-        range <= 105.0 &&
-        range > theYellowHueLowRange )
-   {
-      theYellowHueHighRange = range;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setYellowHueHighRange range error:"
-         << "\nRange of " << range << " is out of range!"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setYellowHueBlendRange(double range)
-{
-   //***
-   // Allowable range: 0.0 to 30.0 as long as it's not greater than the
-   // half range.  If so snap it to half range.
-   //***
-   if ( range >= 0.0  &&
-        range <= MAX_BLEND )
-   {
-      double half_range = (theYellowHueHighRange - theYellowHueLowRange) / 2.0;
-      
-      if (range <= half_range)
-      {
-         theYellowHueBlendRange = range;
-      }
-      else
-      {
-         // Put it in the middle of the range.
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimHsiRemapper::setYellowHueBlendRange range error:"
-            << "\nRange of " << range << " is greater than the full range"
-            << "\ndivided by 2!"
-            << endl;
-         
-         theYellowHueBlendRange = half_range;
-      } 
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setYellowHueBlendRange range error:"
-         << "\nRange of " << range << " is out of range!"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setYellowSaturationOffset(double offset)
-{
-   if (offset >= -1.0 && offset <= 1.0)
-   {
-      theYellowSaturationOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setYellowSaturationOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -1.0 and less than"
-         << "\nor equal to 1.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setYellowIntensityOffset(double offset)
-{
-   if (offset >= -1.0 && offset <= 1.0)
-   {
-      theYellowIntensityOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setYellowIntensityOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -1.0 and less than"
-         << "\nor equal to 1.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setGreenHueOffset(double offset)
-{
-   if (offset >= -180.0 && offset <= 180.0)
-   {
-      theGreenHueOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setGreenHueOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -180.0 and less than"
-         << "\nor equal to 180.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setGreenHueLowRange(double range)
-{
-   //***
-   // Default green range:  90 - 150
-   // Allow 75 to 135 as long as it's less than the high range.
-   //***
-
-   if ( range >= 75.0 &&
-        range <= 135.0 &&
-        range < theGreenHueHighRange )
-   {
-      theGreenHueLowRange = range;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setGreenHueLowRange range error:"
-         << "\nRange of " << range << " is out of range!"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setGreenHueHighRange(double range)
-{
-   //***
-   // Default green range:  90 - 150
-   // Allow 105 to 165 as long as it's greater than the low range.
-   //***
-
-   if ( range >= 105.0  &&
-        range <= 165.0 &&
-        range > theGreenHueLowRange )
-   {
-      theGreenHueHighRange = range;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setGreenHueHighRange range error:"
-         << "\nRange of " << range << " is out of range!"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setGreenHueBlendRange(double range)
-{
-   //***
-   // Allowable range: 0.0 to 30.0 as long as it's not greater than the
-   // half range.  If so snap it to half range.
-   //***
-   if ( range >= 0.0  &&
-        range <= MAX_BLEND )
-   {
-      double half_range = (theGreenHueHighRange - theGreenHueLowRange) / 2.0;
-
-      if (range <= half_range)
-      {
-         theGreenHueBlendRange = range;
-      }
-      else
-      {
-         // Put it in the middle of the range.
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimHsiRemapper::setGreenHueBlendRange range error:"
-            << "\nRange of " << range << " is greater than the full range"
-            << "\ndivided by 2!"
-            << endl;
-         
-         theGreenHueBlendRange = half_range;
-      }
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setGreenHueBlendRange range error:"
-         << "\nRange of " << range << " is out of range!"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setGreenSaturationOffset(double offset)
-{
-   if (offset >= -1.0 && offset <= 1.0)
-   {
-      theGreenSaturationOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setGreenSaturationOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -1.0 and less than"
-         << "\nor equal to 1.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setGreenIntensityOffset(double offset)
-{
-   if (offset >= -1.0 && offset <= 1.0)
-   {
-      theGreenIntensityOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setGreenIntensityOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -1.0 and less than"
-         << "\nor equal to 1.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setCyanHueOffset(double offset)
-{
-   if (offset >= -180.0 && offset <= 180.0)
-   {
-      theCyanHueOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setCyanHueOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -180.0 and less than"
-         << "\nor equal to 180.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setCyanHueLowRange(double range)
-{
-   //***
-   // Default cyan range: 150 - 210
-   // Allow 135 to 195 as long as it's less than the high range.
-   //***
-   
-   if ( range >= 135.0 &&
-        range <= 195.0 &&
-        range < theCyanHueHighRange )
-   {
-      theCyanHueLowRange = range;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setCyanHueLowRange range error:"
-         << "\nRange of " << range << " is out of range!"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setCyanHueHighRange(double range)
-{
-   //***
-   // Default cyan range: 150 - 210
-   // Allow 165 to 225 as long as it's greater than the low range.
-   //***
-   
-   if ( range >= 165.0 &&
-        range <= 225.0 &&
-        range > theCyanHueLowRange )
-   {
-      theCyanHueHighRange = range;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setCyanHueHighRange range error:"
-         << "\nRange of " << range << " is out of range!"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setCyanHueBlendRange(double range)
-{
-   //***
-   // Allowable range: 0.0 to 30.0 as long as it's not greater than the
-   // half range.  If so snap it to half range.
-   //***
-   if ( range >= 0.0  &&
-        range <= MAX_BLEND )
-   {
-      double half_range = (theCyanHueHighRange - theCyanHueLowRange) / 2.0;
-      
-      if (range <= half_range)
-      {
-         theCyanHueBlendRange = range;
-      }
-      else
-      {
-         // Put it in the middle of the range.
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimHsiRemapper::setCyanHueBlendRange range error:"
-            << "\nRange of " << range << " is greater than the full range"
-            << "\ndivided by 2!"
-            << endl;
-         
-         theCyanHueBlendRange = half_range;
-      } 
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setCyanHueBlendRange range error:"
-         << "\nRange of " << range << " is out of range!"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setCyanSaturationOffset(double offset)
-{
-   if (offset >= -1.0 && offset <= 1.0)
-   {
-      theCyanSaturationOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setCyanSaturationOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -1.0 and less than"
-         << "\nor equal to 1.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setCyanIntensityOffset(double offset)
-{
-   if (offset >= -1.0 && offset <= 1.0)
-   {
-      theCyanIntensityOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setCyanIntensityOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -1.0 and less than"
-         << "\nor equal to 1.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setBlueHueOffset(double offset)
-{
-   if (offset >= -180.0 && offset <= 180.0)
-   {
-      theBlueHueOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setBlueHueOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -180.0 and less than"
-         << "\nor equal to 180.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setBlueHueLowRange(double range)
-{
-   //***
-   // Default blue range: 210 - 270
-   // Allow 195 to 255 as long as it's less than the high range.
-   //***
-   if ( range >= 195.0 &&
-        range <= 255.0 &&
-        range < theBlueHueHighRange )
-   {
-      theBlueHueLowRange = range;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setBlueHueLowRange range error:"
-         << "\nRange of " << range << " is out of range!"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setBlueHueHighRange(double range)
-{
-   //***
-   // Default blue range: 210 - 270
-   // Allow 225 to 285 as long as it's greater than the low range.
-   //***
-   if ( range >= 225.0  &&
-        range <= 285.0 &&
-        range > theBlueHueLowRange )
-   {
-      theBlueHueHighRange = range;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setBlueHueHighRange range error:"
-         << "\nRange of " << range << " is out of range!"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setBlueHueBlendRange(double range)
-{
-   //***
-   // Allowable range: 0.0 to 30.0 as long as it's not greater than the
-   // half range.  If so snap it to half range.
-   //***
-   if ( range >= 0.0  &&
-        range <= MAX_BLEND )
-   {
-      double half_range = (theBlueHueHighRange - theBlueHueLowRange) / 2.0;
-
-      if (range <= half_range)
-      {
-         theBlueHueBlendRange = range;
-      }
-      else
-      {
-         // Put it in the middle of the range.
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimHsiRemapper::setBlueHueBlendRange range error:"
-            << "\nRange of " << range << " is greater than the full range"
-            << "\ndivided by 2!"
-            << endl;
-         
-         theBlueHueBlendRange = half_range;
-      }
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setBlueHueBlendRange range error:"
-         << "\nRange of " << range << " is out of range!"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setBlueSaturationOffset(double offset)
-{
-   if (offset >= -1.0 && offset <= 1.0)
-   {
-      theBlueSaturationOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setBlueSaturationOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -1.0 and less than"
-         << "\nor equal to 1.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setBlueIntensityOffset(double offset)
-{
-   if (offset >= -1.0 && offset <= 1.0)
-   {
-      theBlueIntensityOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setBlueIntensityOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -1.0 and less than"
-         << "\nor equal to 1.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setMagentaHueOffset(double offset)
-{
-   if (offset >= -180.0 && offset <= 180.0)
-   {
-      theMagentaHueOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setMagentaHueOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -180.0 and less than"
-         << "\nor equal to 180.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setMagentaHueLowRange(double range)
-{
-   //***
-   // Default magenta range:  270 - 330
-   // Allow 255 to 315 as long as it's less than the high range.
-   //***
-   if ( range >= 255.0 &&
-        range <= 315.0 &&
-        range < theMagentaHueHighRange )
-   {
-      theMagentaHueLowRange = range;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setMagentaHueLowRange range error:"
-         << "\nRange of " << range << " is out of range!"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setMagentaHueHighRange(double range)
-{
-   //***
-   // Default magenta range:  270 - 330
-   // Allow 285 to 345 as long as it's greater than the low range.
-   //***
-   if ( range >= 285.0  &&
-        range <= 345.0 &&
-        range > theMagentaHueLowRange )
-   {
-      theMagentaHueHighRange = range;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setMagentaHueHighRange range error:"
-         << "\nRange of " << range << " is out of range!"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setMagentaHueBlendRange(double range)
-{
-   //***
-   // Allowable range: 0.0 to 30.0 as long as it's not greater than the
-   // half range.  If so snap it to half range.
-   //***
-   if ( range >= 0.0  &&
-        range <= MAX_BLEND )
-   {
-      double half_range = (theMagentaHueHighRange-theMagentaHueLowRange)/2.0;
-
-      if (range <= half_range)
-      {
-         theMagentaHueBlendRange = range;
-      }
-      else
-      {
-         // Put it in the middle of the range.
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimHsiRemapper::setMagentaHueBlendRange range error:"
-            << "\nRange of " << range << " is greater than the full range"
-            << "\ndivided by 2!"
-            << endl;
-         
-         theMagentaHueBlendRange = half_range;
-      }
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setMagentaHueBlendRange range error:"
-         << "\nRange of " << range << " is out of range!"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setMagentaSaturationOffset(double offset)
-{
-   if (offset >= -1.0 && offset <= 1.0)
-   {
-      theMagentaSaturationOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setMagentaSaturationOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -1.0 and less than"
-         << "\nor equal to 1.0"
-         << endl;
-   }
-}
-
-void ossimHsiRemapper::setMagentaIntensityOffset(double offset)
-{
-   if (offset >= -1.0 && offset <= 1.0)
-   {
-      theMagentaIntensityOffset = offset;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimHsiRemapper::setMagentaIntensityOffset range error:"
-         << "\nOffset of " << offset << " is out of range!"
-         << "\nMust be equal to or greater than -1.0 and less than"
-         << "\nor equal to 1.0"
-         << endl;
-   }
-}
-
-double ossimHsiRemapper::calculateMinNormValue()
-{
-   static const char MODULE[] = "ossimHsiRemapper::calculateMinNormValue";
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " Entered..." << endl;
-   }
-   
-   if (!theTile)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE << " ERROR:"
-         << "\nClass not initialized!"
-         << endl;
-      return 0.0;
-   }
-
-   double min_pix = theTile->getMinPix(0);
-   double max_pix = theTile->getMaxPix(0);
-
-   for (ossim_uint32 band=1; band<theTile->getNumberOfBands(); ++band)
-   {
-      if (min_pix != theTile->getMinPix(band))
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << MODULE << " Warning:"
-            << "\nMixed minimum values for bands..."
-            << endl;
-      }
-      if (max_pix != theTile->getMaxPix(band))
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << " Warning:"
-              << "\nMixed maximum values for bands..."
-              << endl;
-      }
-   }
-
-   if (min_pix < 0.0)
-   {
-      //
-      // Assigning some arbituary number for float data.
-      // This should really come from the normalizer (ossimImageData) of
-      // the data.
-      //
-      return OSSIM_DEFAULT_MIN_PIX_NORM_DOUBLE;
-   }
-
-   return (min_pix / max_pix);
-}
-
-ossim_uint32 ossimHsiRemapper::getNumberOfOutputBands() const
-{
-   if (isSourceEnabled()&&theValidFlag) // Always rgb tile out...
-   {
-      return 3;
-   }
-
-   // Filter bypassed so getTile will return input tile.
-   return ossimImageSourceFilter::getNumberOfInputBands();
-}
-
-
-double ossimHsiRemapper::getMasterHueOffset () const
-{
-   return theMasterHueOffset;
-}
-
-double ossimHsiRemapper::getMasterSaturationOffset() const
-{
-   return theMasterSaturationOffset;
-}
-
-double ossimHsiRemapper::getMasterIntensityOffset() const
-{
-   return theMasterIntensityOffset;
-}
-
-double ossimHsiRemapper::getMasterIntensityLowClip() const
-{
-   return theMasterIntensityLowClip;
-}
-
-double ossimHsiRemapper::getMasterIntensityHighClip() const
-{
-   return theMasterIntensityHighClip;
-}
-
-double ossimHsiRemapper::getRedHueOffset() const
-{
-   return theRedHueOffset;
-}
-
-double ossimHsiRemapper::getRedHueLowRange() const
-{
-   return theRedHueLowRange;
-}
-
-double ossimHsiRemapper::getRedHueHighRange() const
-{
-   return theRedHueHighRange;
-}
-
-double ossimHsiRemapper::getRedHueBlendRange() const
-{
-   return theRedHueBlendRange;
-}
-
-double ossimHsiRemapper::getRedSaturationOffset() const
-{
-   return theRedSaturationOffset;
-}
-
-double ossimHsiRemapper::getRedIntensityOffset() const
-{
-   return theRedIntensityOffset;
-}
-
-double ossimHsiRemapper::getYellowHueOffset () const
-{
-   return theYellowHueOffset;
-}
-
-double ossimHsiRemapper::getYellowHueLowRange() const
-{
-   return theYellowHueLowRange;
-}
-
-double ossimHsiRemapper::getYellowHueHighRange() const
-{
-   return theYellowHueHighRange;
-}
-
-double ossimHsiRemapper::getYellowHueBlendRange() const
-{
-   return theYellowHueBlendRange;
-}
-
-double ossimHsiRemapper::getYellowSaturationOffset() const
-{
-   return theYellowSaturationOffset;
-}
-
-double ossimHsiRemapper::getYellowIntensityOffset() const
-{
-   return theYellowIntensityOffset;
-}
-
-double ossimHsiRemapper::getGreenHueOffset () const
-{
-   return theGreenHueOffset;
-}
-
-double ossimHsiRemapper::getGreenHueLowRange() const
-{
-   return theGreenHueLowRange;
-}
-
-double ossimHsiRemapper::getGreenHueHighRange() const
-{
-   return theGreenHueHighRange;
-}
-
-double ossimHsiRemapper::getGreenHueBlendRange() const
-{
-   return theGreenHueBlendRange;
-}
-
-double ossimHsiRemapper::getGreenSaturationOffset() const
-{
-   return theGreenSaturationOffset;
-}
-
-double ossimHsiRemapper::getGreenIntensityOffset() const
-{
-   return theGreenIntensityOffset;
-}
-
-double ossimHsiRemapper::getCyanHueOffset () const
-{
-   return theCyanHueOffset;
-}
-
-double ossimHsiRemapper::getCyanHueLowRange() const
-{
-   return theCyanHueLowRange;
-}
-
-double ossimHsiRemapper::getCyanHueHighRange() const
-{
-   return theCyanHueHighRange;
-}
-
-double ossimHsiRemapper::getCyanHueBlendRange() const
-{
-   return theCyanHueBlendRange;
-}
-
-double ossimHsiRemapper::getCyanSaturationOffset() const
-{
-   return theCyanSaturationOffset;
-}
-
-double ossimHsiRemapper::getCyanIntensityOffset() const
-{
-   return theCyanIntensityOffset;
-}
-
-double ossimHsiRemapper::getBlueHueOffset () const
-{
-   return theBlueHueOffset;
-}
-
-double ossimHsiRemapper::getBlueHueLowRange() const
-{
-   return theBlueHueLowRange;
-}
-
-double ossimHsiRemapper::getBlueHueHighRange() const
-{
-   return theBlueHueHighRange;
-}
-
-double ossimHsiRemapper::getBlueHueBlendRange() const
-{
-   return theBlueHueBlendRange;
-}
-
-double ossimHsiRemapper::getBlueSaturationOffset() const
-{
-   return theBlueSaturationOffset;
-}
-
-double ossimHsiRemapper::getBlueIntensityOffset() const
-{
-   return theBlueIntensityOffset;
-}
-
-double ossimHsiRemapper::getMagentaHueOffset () const
-{
-   return theMagentaHueOffset;
-}
-
-double ossimHsiRemapper::getMagentaHueLowRange() const
-{
-   return theMagentaHueLowRange;
-}
-
-double ossimHsiRemapper::getMagentaHueHighRange() const
-{
-   return theMagentaHueHighRange;
-}
-
-double ossimHsiRemapper::getMagentaHueBlendRange() const
-{
-   return theMagentaHueBlendRange;
-}
-
-double ossimHsiRemapper::getMagentaSaturationOffset() const
-{
-   return theMagentaSaturationOffset;
-}
-
-double ossimHsiRemapper::getMagentaIntensityOffset() const
-{
-   return theMagentaIntensityOffset;
-}
-
-void ossimHsiRemapper::setHueOffset(int color_group, double offset)
-{
-   switch (color_group)
-   {
-      case RED:
-         setRedHueOffset(offset);
-         break;
-      case YELLOW:
-         setYellowHueOffset(offset);
-         break;
-      case GREEN:
-         setGreenHueOffset(offset);
-         break;
-      case CYAN:
-         setCyanHueOffset(offset);
-         break;
-      case BLUE:
-         setBlueHueOffset(offset);
-         break;
-      case MAGENTA:
-         setMagentaHueOffset(offset);
-         break;
-      case ALL:
-         setMasterHueOffset(offset);
-         break;
-      default:
-         ossimNotify(ossimNotifyLevel_NOTICE)
-            << "ossimHsiRemapper::setHueOffset NOTICE:  Range error!" << endl;
-   }
-}
-
-void ossimHsiRemapper::setHueLowRange(int color_group, double range)
-{
-   switch (color_group)
-   {
-      case RED:
-         setRedHueLowRange(range);
-         break;
-      case YELLOW:
-         setYellowHueLowRange(range);
-         break;
-      case GREEN:
-         setGreenHueLowRange(range);
-         break;
-      case CYAN:
-         setCyanHueLowRange(range);
-         break;
-      case BLUE:
-         setBlueHueLowRange(range);
-         break;
-      case MAGENTA:
-         setMagentaHueLowRange(range);
-         break;
-      default:
-         ossimNotify(ossimNotifyLevel_NOTICE)
-            << "ossimHsiRemapper::setHueLowRange NOTICE:  Range error!"
-            << endl;
-   }
-}
-
-void ossimHsiRemapper::setHueHighRange(int color_group, double range)
-{
-   switch (color_group)
-   {
-      case RED:
-         setRedHueHighRange(range);
-         break;
-      case YELLOW:
-         setYellowHueHighRange(range);
-         break;
-      case GREEN:
-         setGreenHueHighRange(range);
-         break;
-      case CYAN:
-         setCyanHueHighRange(range);
-         break;
-      case BLUE:
-         setBlueHueHighRange(range);
-         break;
-      case MAGENTA:
-         setMagentaHueHighRange(range);
-         break;
-      default:
-         ossimNotify(ossimNotifyLevel_NOTICE)
-            << "ossimHsiRemapper::setHueHighRange NOTICE:  Range error!"
-            << endl;
-   }
-}
-
-void ossimHsiRemapper::setHueBlendRange(int color_group, double range)
-{
-   switch (color_group)
-   {
-      case RED:
-         setRedHueBlendRange(range);
-         break;
-      case YELLOW:
-         setYellowHueBlendRange(range);
-         break;
-      case GREEN:
-         setGreenHueBlendRange(range);
-         break;
-      case CYAN:
-         setCyanHueBlendRange(range);
-         break;
-      case BLUE:
-         setBlueHueBlendRange(range);
-         break;
-      case MAGENTA:
-         setMagentaHueBlendRange(range);
-         break;
-      default:
-         ossimNotify(ossimNotifyLevel_NOTICE)
-            << "ossimHsiRemapper::setHueBlendRange NOTICE:  Range error!"
-            << endl;
-   }
-}
-
-void ossimHsiRemapper::setSaturationOffset(int color_group, double offset)
-{
-   switch (color_group)
-   {
-      case RED:
-         setRedSaturationOffset(offset);
-         break;
-      case YELLOW:
-         setYellowSaturationOffset(offset);
-         break;
-      case GREEN:
-         setGreenSaturationOffset(offset);
-         break;
-      case CYAN:
-         setCyanSaturationOffset(offset);
-         break;
-      case BLUE:
-         setBlueSaturationOffset(offset);
-         break;
-      case MAGENTA:
-         setMagentaSaturationOffset(offset);
-         break;
-      case ALL:
-         setMasterSaturationOffset(offset);
-         break;
-      default:
-         ossimNotify(ossimNotifyLevel_NOTICE)
-            << "ossimHsiRemapper::setSaturationOffset NOTICE:  Range error!"
-            << endl;
-         break;
-   }
-}
-
-void ossimHsiRemapper::setIntensityOffset(int color_group, double offset)
-{
-   switch (color_group)
-   {
-      case RED:
-         setRedIntensityOffset(offset);
-         break;
-      case YELLOW:
-         setYellowIntensityOffset(offset);
-         break;
-      case GREEN:
-         setGreenIntensityOffset(offset);
-         break;
-      case CYAN:
-         setCyanIntensityOffset(offset);
-         break;
-      case BLUE:
-         setBlueIntensityOffset(offset);
-         break;
-      case MAGENTA:
-         setMagentaIntensityOffset(offset);
-         break;
-      case ALL:
-         setMasterIntensityOffset(offset);
-         break;
-      default:
-         ossimNotify(ossimNotifyLevel_NOTICE)
-            << "ossimHsiRemapper::setIntensityOffset NOTICE:  Range error!"
-            << endl;
-         break;
-   }
-}
-
-double ossimHsiRemapper::getHueOffset(int color_group) const
-{
-   switch (color_group)
-   {
-      case RED:
-         return getRedHueOffset();
-         break;
-      case YELLOW:
-         return getYellowHueOffset();
-         break;
-      case GREEN:
-         return getGreenHueOffset();
-         break;
-      case CYAN:
-         return getCyanHueOffset();
-         break;
-      case BLUE:
-         return getBlueHueOffset();
-         break;
-      case MAGENTA:
-         return getMagentaHueOffset();
-         break;
-      case ALL:
-         return getMasterHueOffset();
-         break;
-      default:
-         ossimNotify(ossimNotifyLevel_NOTICE)
-            << "ossimHsiRemapper::getHueOffset NOTICE:  Range error!"
-            << endl;
-         break;
-   }
-   return 0.0;
-}
-
-double ossimHsiRemapper::getHueLowRange(int color_group) const
-{
-   switch (color_group)
-   {
-      case RED:
-         return getRedHueLowRange();
-         break;
-      case YELLOW:
-         return getYellowHueLowRange();
-         break;
-      case GREEN:
-         return getGreenHueLowRange();
-         break;
-      case CYAN:
-         return getCyanHueLowRange();
-         break;
-      case BLUE:
-         return getBlueHueLowRange();
-         break;
-      case MAGENTA:
-         return getMagentaHueLowRange();
-         break;
-      default:
-         ossimNotify(ossimNotifyLevel_NOTICE)
-            << "ossimHsiRemapper::getHueLowRange NOTICE:  Range error!"
-            << endl;
-         break;
-   }
-   return 0.0;
-}
-
-double ossimHsiRemapper::getHueHighRange(int color_group) const
-{
-   switch (color_group)
-   {
-      case RED:
-         return getRedHueHighRange();
-         break;
-      case YELLOW:
-         return getYellowHueHighRange();
-         break;
-      case GREEN:
-         return getGreenHueHighRange();
-         break;
-      case CYAN:
-         return getCyanHueHighRange();
-         break;
-      case BLUE:
-         return getBlueHueHighRange();
-         break;
-      case MAGENTA:
-         return getMagentaHueHighRange();
-         break;
-      default:
-         ossimNotify(ossimNotifyLevel_NOTICE)
-            << "ossimHsiRemapper::getHueHighRange NOTICE:  Range error!"
-            << endl;
-         break;
-   }
-   return 0.0;
-}
-
-double ossimHsiRemapper::getHueBlendRange(int color_group) const
-{
-   switch (color_group)
-   {
-      case RED:
-         return getRedHueBlendRange();
-         break;
-      case YELLOW:
-         return getYellowHueBlendRange();
-         break;
-      case GREEN:
-         return getGreenHueBlendRange();
-         break;
-      case CYAN:
-         return getCyanHueBlendRange();
-         break;
-      case BLUE:
-         return getBlueHueBlendRange();
-         break;
-      case MAGENTA:
-         return getMagentaHueBlendRange();
-         break;
-      default:
-         ossimNotify(ossimNotifyLevel_NOTICE)
-            << "ossimHsiRemapper::getHueBlendRange NOTICE:  Range error!"
-            << endl;
-         break;
-   }
-   return 0.0;
-}
-
-double ossimHsiRemapper::getSaturationOffset(int color_group) const
-{
-   switch (color_group)
-   {
-      case RED:
-         return getRedSaturationOffset();
-         break;
-      case YELLOW:
-         return getYellowSaturationOffset();
-         break;
-      case GREEN:
-         return getGreenSaturationOffset();
-         break;
-      case CYAN:
-         return getCyanSaturationOffset();
-         break;
-      case BLUE:
-         return getBlueSaturationOffset();
-         break;
-      case MAGENTA:
-         return getMagentaSaturationOffset();
-         break;
-      case ALL:
-         return getMasterSaturationOffset();
-         break;
-      default:
-         ossimNotify(ossimNotifyLevel_NOTICE)
-            << "ossimHsiRemapper::getSaturationOffset NOTICE:  Range error!"
-            << endl;
-         break;
-   }
-   return 0.0;
-}
-
-double ossimHsiRemapper::getIntensityOffset(int color_group) const
-{
-   switch (color_group)
-   {
-      case RED:
-         return getRedIntensityOffset();
-         break;
-      case YELLOW:
-         return getYellowIntensityOffset();
-         break;
-      case GREEN:
-         return getGreenIntensityOffset();
-         break;
-      case CYAN:
-         return getCyanIntensityOffset();
-         break;
-      case BLUE:
-         return getBlueIntensityOffset();
-         break;
-      case MAGENTA:
-         return getMagentaIntensityOffset();
-         break;
-      case ALL:
-         return getMasterIntensityOffset();
-         break;
-      default:
-         ossimNotify(ossimNotifyLevel_NOTICE)
-            << "ossimHsiRemapper::getIntensityOffset NOTICE:  Range error!"
-            << endl;
-         break;
-   }
-   return 0.0;
-}
-
-void ossimHsiRemapper::setWhiteObjectClip(double clip)
-{
-   if ( (clip >= .8) && (clip <= 1.0) )
-   {
-      theWhiteObjectClip = clip;
-      verifyEnabled();
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "HsiRemapper::setWhiteObjectClip range error:"
-         << "\nClip of " << clip << " is out of range!"
-         << "\nMust be between .8 and 1.0"
-         << endl;
-   }
-}
-
-double ossimHsiRemapper::getWhiteObjectClip() const
-{
-   return theWhiteObjectClip;
-}
-
-void ossimHsiRemapper::resetWhiteObjectClip()
-{
-   theWhiteObjectClip = 1.0;
-   verifyEnabled();
-}
-
-ossimString ossimHsiRemapper::getLongName()const
-{
-   return ossimString("HSI Remapper, filter with controls for all HSI(Hue, Saturation, and Intensity) adjustments.");
-}
-
-ossimString ossimHsiRemapper::getShortName()const
-{
-   return ossimString("HSI Remapper");
-}
-
-ostream& ossimHsiRemapper::print(ostream& os) const
-{
-   os << setiosflags(ios::fixed) << setprecision(2)
-      << "\nossimHsiRemapper:"
-      << "\ntheEnableFlag:                " << theEnableFlag
-
-      << "\ntheMasterHueOffset:           " << theMasterHueOffset
-      << "\ntheMasterSaturationOffset:    " << theMasterSaturationOffset
-      << "\ntheMasterIntensityOffset:     " << theMasterIntensityOffset
-      << "\ntheMasterIntensityLowClip:    " << theMasterIntensityLowClip
-      << "\ntheMasterIntensityHighClip:   " << theMasterIntensityHighClip
-      
-      << "\ntheRedHueOffset:              " << theRedHueOffset
-      << "\ntheRedHueLowRange:            " << theRedHueLowRange
-      << "\ntheRedHueHighRange:           " << theRedHueHighRange
-      << "\ntheRedSaturationOffset:       " << theRedSaturationOffset
-      << "\ntheRedIntensityOffset:        " << theRedIntensityOffset
-      
-      << "\ntheYellowHueOffset:           " << theYellowHueOffset
-      << "\ntheYellowHueLowRange:         " << theYellowHueLowRange
-      << "\ntheYellowHueHighRange:        " << theYellowHueHighRange
-      << "\ntheYellowSaturationOffset:    " << theYellowSaturationOffset
-      << "\ntheYellowIntensityOffset:     " << theYellowIntensityOffset
-      
-      << "\ntheGreenHueOffset:            " << theGreenHueOffset
-      << "\ntheGreenHueLowRange:          " << theGreenHueLowRange
-      << "\ntheGreenHueHighRange:         " << theGreenHueHighRange
-      << "\ntheGreenSaturationOffset:     " << theGreenSaturationOffset
-      << "\ntheGreenIntensityOffset:      " << theGreenIntensityOffset
-      
-      << "\ntheCyanHueOffset:             " << theCyanHueOffset
-      << "\ntheCyanHueLowRange:           " << theCyanHueLowRange
-      << "\ntheCyanHueHighRange:          " << theCyanHueHighRange
-      << "\ntheCyanSaturationOffset:      " << theCyanSaturationOffset
-      << "\ntheCyanIntensityOffset:       " << theCyanIntensityOffset
-      
-      << "\ntheBlueHueOffset:             " << theBlueHueOffset
-      << "\ntheBlueHueLowRange:           " << theBlueHueLowRange
-      << "\ntheBlueHueHighRange:          " << theBlueHueHighRange
-      << "\ntheBlueSaturationOffset:      " << theBlueSaturationOffset
-      << "\ntheBlueIntensityOffset:       " << theBlueIntensityOffset
-      
-      << "\ntheMagentaHueOffset:          " << theMagentaHueOffset
-      << "\ntheMagentaHueLowRange:        " << theMagentaHueLowRange
-      << "\ntheMagentaHueHighRange:       " << theMagentaHueHighRange
-      << "\ntheMagentaSaturationOffset:   " << theMagentaSaturationOffset
-      << "\ntheMagentaIntensityOffset:    " << theMagentaIntensityOffset
-
-      << "\ntheWhiteObjectClip:           " << theWhiteObjectClip
-      << endl;
-   
-   return os;
-}
-
-ostream& operator<<(ostream& os, const ossimHsiRemapper& hr)
-{
-   return hr.print(os);
-}
diff --git a/src/ossim/imaging/ossimHsiToRgbSource.cpp b/src/ossim/imaging/ossimHsiToRgbSource.cpp
deleted file mode 100644
index 43a4e21..0000000
--- a/src/ossim/imaging/ossimHsiToRgbSource.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimHsiToRgbSource.cpp 17206 2010-04-25 23:20:40Z dburken $
-#include <ossim/imaging/ossimHsiToRgbSource.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimHsiVector.h>
-#include <ossim/base/ossimRgbVector.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-
-RTTI_DEF1(ossimHsiToRgbSource, "ossimHsiToRgbSource", ossimImageSourceFilter)
-
-ossimHsiToRgbSource::ossimHsiToRgbSource()
-   :ossimImageSourceFilter(),
-    theBlankTile(NULL),
-    theTile(NULL)
-{
-}
-
-ossimHsiToRgbSource::ossimHsiToRgbSource(ossimImageSource* inputSource)
-   : ossimImageSourceFilter(inputSource),
-    theBlankTile(NULL),
-    theTile(NULL)
-{
-}
-
-ossimHsiToRgbSource::~ossimHsiToRgbSource()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimHsiToRgbSource::getTile(
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   if(!theInputConnection)
-   {
-      return NULL;  // This filter requires an input.
-   }
-   
-   ossimRefPtr<ossimImageData> inputTile =
-      theInputConnection->getTile(tileRect, resLevel);   
-   if(!isSourceEnabled())
-   {
-      return inputTile;
-   }
-   
-   if(!theTile.valid())
-   {
-      allocate(); // First time through...
-   }
-   
-   if( !inputTile.valid() ||
-       inputTile->getDataObjectStatus() == OSSIM_NULL ||
-       inputTile->getDataObjectStatus() == OSSIM_EMPTY )
-   {
-      theBlankTile->setImageRectangle(tileRect);
-      return theBlankTile;
-   }
-
-   if((inputTile->getNumberOfBands()==3)&&
-      (inputTile->getScalarType()==OSSIM_NORMALIZED_FLOAT)&&
-      (inputTile->getDataObjectStatus()!=OSSIM_NULL))
-   {
-      // Set the origin, resize if needed of the output tile.
-      theTile->setImageRectangle(tileRect);
-      
-      ossim_uint8* outputBands[3];
-      float* inputBands[3];
-      outputBands[0] = static_cast<ossim_uint8*>(theTile->getBuf(0));
-      outputBands[1] = static_cast<ossim_uint8*>(theTile->getBuf(1));
-      outputBands[2] = static_cast<ossim_uint8*>(theTile->getBuf(2));
-      inputBands[0] = static_cast<float*>(inputTile->getBuf(0));
-      inputBands[1] = static_cast<float*>(inputTile->getBuf(1));
-      inputBands[2] = static_cast<float*>(inputTile->getBuf(2));
-      
-      long height = inputTile->getHeight();
-      long width  = inputTile->getWidth();
-      long offset = 0;
-      for(long row = 0; row < height; ++row)
-      {
-         for(long col = 0; col < width; ++col)
-         {
-            ossimHsiVector hsi(inputBands[0][offset],
-                               inputBands[1][offset],
-                               inputBands[2][offset]);
-            
-            ossimRgbVector rgb(hsi);
-            
-            
-            outputBands[0][offset] = rgb.getR();
-            outputBands[1][offset] = rgb.getG();
-            outputBands[2][offset] = rgb.getB();
-            
-            ++offset;
-         }
-      }
-   }
-   else
-   {
-      return inputTile;
-   }
-
-   theTile->validate();
-
-   return theTile;
-}
-
-void ossimHsiToRgbSource::initialize()
-{
-   ossimImageSourceFilter::initialize();
-}
-
-void ossimHsiToRgbSource::allocate()
-{
-   theBlankTile = ossimImageDataFactory::instance()->create(this, this);
-   theTile = (ossimImageData*)theBlankTile->dup();
-   theTile->initialize();
-}
-
-ossimScalarType ossimHsiToRgbSource::getOutputScalarType() const
-{
-   return OSSIM_UCHAR;
-}
-
-double ossimHsiToRgbSource::getNullPixelValue()const
-{
-   return 0.0;
-}
-
-double ossimHsiToRgbSource::getMinPixelValue(ossim_uint32 /* band */)const
-{
-   return OSSIM_DEFAULT_MIN_PIX_UCHAR;
-}
-
-double ossimHsiToRgbSource::getMaxPixelValue(ossim_uint32 /* band */)const
-{
-   return OSSIM_DEFAULT_MAX_PIX_UCHAR;
-}
diff --git a/src/ossim/imaging/ossimHsvGridRemapEngine.cpp b/src/ossim/imaging/ossimHsvGridRemapEngine.cpp
deleted file mode 100644
index ec73529..0000000
--- a/src/ossim/imaging/ossimHsvGridRemapEngine.cpp
+++ /dev/null
@@ -1,276 +0,0 @@
-//*****************************************************************************
-// FILE: ossimHsvGridRemapEngine.cc
-//
-// Copyright (C) 2001 ImageLinks, Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Contains implementation of class 
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimHsvGridRemapEngine.cpp 15833 2009-10-29 01:41:53Z eshirschorn $
-
-#include <ossim/imaging/ossimHsvGridRemapEngine.h>
-
-RTTI_DEF1(ossimHsvGridRemapEngine, "ossimHsvGridRemapEngine",
-          ossimGridRemapEngine);
-
-#include <ossim/imaging/ossimGridRemapSource.h>
-#include <ossim/imaging/ossimAtbPointSource.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimDblGrid.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/base/ossimRgbVector.h>
-#include <ossim/base/ossimHsvVector.h>
-
-//***
-// Define Trace flags for use within this file:
-//***
-#include <ossim/base/ossimTrace.h>
-static ossimTrace traceExec  ("ossimHsvGridRemapEngine:exec");
-static ossimTrace traceDebug ("ossimHsvGridRemapEngine:debug");
-
-//*****************************************************************************
-//  METHOD: ossimHsvGridRemapEngine::remapTile
-//  
-//*****************************************************************************
-ossimObject* ossimHsvGridRemapEngine::dup() const
-{
-   return new ossimHsvGridRemapEngine;
-}
-
-//*****************************************************************************
-//  METHOD: ossimHsvGridRemapEngine::remapTile
-//  
-//*****************************************************************************
-void ossimHsvGridRemapEngine::remapTile(const ossimDpt&       origin,
-                                        ossimGridRemapSource* remapper,
-                                        ossimRefPtr<ossimImageData>& tile)
-{
-   static const char MODULE[] = "ossimHsvGridRemapEngine::remapTile";
-   if (traceExec())  CLOG << "entering..." << endl;
-
-   //***
-   // Fetch tile size and NULL pixel value:
-   //***
-   int    width         = tile->getWidth();
-   int    height        = tile->getHeight();
-   int    offset        = 0;
-   
-   void* red_buf = tile->getBuf(0);
-   void* grn_buf = tile->getBuf(1);
-   void* blu_buf = tile->getBuf(2);
-
-   ossimDblGrid& gridH = *(remapper->getGrid(0));
-   ossimDblGrid& gridS = *(remapper->getGrid(1));
-   ossimDblGrid& gridV = *(remapper->getGrid(2));
-      
-   //---
-   // Remap according to pixel type:
-   //---
-   switch(tile->getScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         for (double line=origin.line; line<origin.line+height; line+=1.0)
-         {
-            for (double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
-            {
-               //---
-               // Fetch pixel from the input tile band buffers and convert
-               // to HSV:
-               //---
-               ossimRgbVector rgb_pixel (((ossim_uint8*)red_buf)[offset],
-                                         ((ossim_uint8*)grn_buf)[offset],
-                                         ((ossim_uint8*)blu_buf)[offset]);
-               ossimHsvVector hsv_pixel (rgb_pixel);
-               
-               //---
-               // Remap pixel HSV  with spatially variant bias value:
-               //---
-               hsv_pixel.setH(hsv_pixel.getH() + gridH(samp,line));
-               hsv_pixel.setS(hsv_pixel.getS() + gridS(samp,line));
-               hsv_pixel.setV(hsv_pixel.getV() + gridV(samp,line));
-               
-               //---
-               // Convert back to RGB and write to the tile:
-               //---
-               rgb_pixel = hsv_pixel;  // auto-clamped
-               ((ossim_uint8*)red_buf)[offset] = rgb_pixel.getR();
-               ((ossim_uint8*)grn_buf)[offset] = rgb_pixel.getG();
-               ((ossim_uint8*)blu_buf)[offset] = rgb_pixel.getB();
-               
-               offset++;
-            }
-         }
-         break;
-      }
-      
-      case OSSIM_USHORT11:
-         break;
-         
-      case OSSIM_UINT16:
-         break;
-         
-      case OSSIM_SINT16:
-         break;	
-
-      case OSSIM_FLOAT64:
-         break;	
-
-      case OSSIM_NORMALIZED_DOUBLE:
-         break;	
-
-      case OSSIM_FLOAT32:
-         break;	
-
-      case OSSIM_NORMALIZED_FLOAT:
-         break;	
-
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-         break;
-
-   }   // end switch statement
-
-   if (traceExec())  CLOG << "returning..." << endl;
-   return;
-};
-
-//*****************************************************************************
-//  METHOD: ossimHsvGridRemapEngine::assignRemapValues
-//
-//  This engine defines the target value as an HSV vector of doubles, computed
-//  as the mean of all contributor HSV values.
-//  
-//*****************************************************************************
-void ossimHsvGridRemapEngine::assignRemapValues (
-   vector<ossimAtbPointSource*>& sources_list)
-{
-   static const char MODULE[] = "ossimHsvGridRemapEngine::assignRemapValues";
-   if (traceExec())  CLOG << "entering..." << endl;
-
-   int i; // index to individual sources
-
-   //***
-   // Declare a 2D array that will contain all of the contributing sources'
-   // HSV mean values. Also declare the accumulator target vector.
-   //***
-   int num_contributors = (int)sources_list.size();
-   double** contributor_pixel = new double* [num_contributors];
-   for (i=0; i<num_contributors; i++)
-      contributor_pixel[i] = new double[3];
-   double target_pixel[3] = {0.0, 0.0, 0.0};
-
-   //***
-   // Now loop over each remaining contributor and sum in its contribution:
-   //***
-   vector<ossimAtbPointSource*>::iterator source;
-   i = 0;
-   for(source  = sources_list.begin();
-       source != sources_list.end();
-       source++)
-   {
-      (*source)->getSourceValue(contributor_pixel[i]);
-
-      target_pixel[0] += contributor_pixel[i][0]/(double)num_contributors;
-      target_pixel[1] += contributor_pixel[i][1]/(double)num_contributors;
-      target_pixel[2] += contributor_pixel[i][2]/(double)num_contributors;
-
-      i++;
-   }
-
-   //***
-   // The target pixel has been established. Now need to compute the actual
-   // remap quantities that will be written to the appropriate remap grids:
-   //***
-   i = 0;
-   for(source  = sources_list.begin();
-       source != sources_list.end();
-       source++)
-   {
-      computeRemapNode(*source, contributor_pixel[i], target_pixel);
-      i++;
-   }
-
-   //***
-   // Delete locally allocated memory:
-   //***
-   for (i=0; i<num_contributors; i++)
-      delete [] contributor_pixel[i];
-   delete [] contributor_pixel;
-   
-   if (traceExec())  CLOG << "returning..." << endl;
-   return;
-}
-
-//*****************************************************************************
-//  METHOD: ossimHsvGridRemapEngine::computeSourceValue
-//  
-//*****************************************************************************
-void ossimHsvGridRemapEngine::computeSourceValue(
-   ossimRefPtr<ossimImageData>& source, void* result)
-{
-   static const char MODULE[]="ossimHsvGridRemapEngine::computeSourceValue";
-   if (traceExec())  CLOG << "entering..." << endl;
-
-   //***
-   // This engine defines "value" as the HSV vector corresponding to the mean
-   // RGB pixel value of the source data:
-   //***
-   ossimRgbVector rgb_vector;
-   rgb_vector.setR((unsigned char) source->computeAverageBandValue(0));
-   rgb_vector.setG((unsigned char) source->computeAverageBandValue(1));
-   rgb_vector.setB((unsigned char) source->computeAverageBandValue(2));
-
-   //***
-   // Assign the HSV components to the result vector:
-   //***
-   ossimHsvVector hsv_vector (rgb_vector);
-   ((double*)result)[0] = (double) hsv_vector.getH();
-   ((double*)result)[1] = (double) hsv_vector.getS();
-   ((double*)result)[2] = (double) hsv_vector.getV();
-   
-   if (traceExec())  CLOG << "returning..." << endl;
-   return;
-}
-
-//*****************************************************************************
-//  METHOD: ossimHsvGridRemapEngine::computeRemapNode
-//
-//  This engine defines the remap value as the difference between the target
-//  HSV vector and the individual point source's value vector.
-//
-//*****************************************************************************
-void ossimHsvGridRemapEngine::computeRemapNode(ossimAtbPointSource* ps,
-                                              void* source_value,
-                                              void* target_value)
-{
-   static const char MODULE[] = "ossimHsvGridRemapEngine::computeRemapNode";
-   if (traceExec())  CLOG << "entering..." << endl;
-
-   //***
-   // Compute the remap grid node value specific to this HSV implementation:
-   //***
-   double node[3];
-   node[0] = ((double*)target_value)[0] - ((double*)source_value)[0];
-   node[1] = ((double*)target_value)[1] - ((double*)source_value)[1];
-   node[2] = ((double*)target_value)[2] - ((double*)source_value)[2];
-
-   //***
-   // Fetch a pointer to the remapper feeding this point source in order to
-   // pass it the node value:
-   //***
-   ossimGridRemapSource* remapper = ps->getRemapSource();
-   remapper->setGridNode(ps->getViewPoint(), node);
-                         
-   if (traceExec())  CLOG << "returning..." << endl;
-   return;
-}
-
diff --git a/src/ossim/imaging/ossimHsvToRgbSource.cpp b/src/ossim/imaging/ossimHsvToRgbSource.cpp
deleted file mode 100644
index f8b5f90..0000000
--- a/src/ossim/imaging/ossimHsvToRgbSource.cpp
+++ /dev/null
@@ -1,159 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimHsvToRgbSource.cpp 17195 2010-04-23 17:32:18Z dburken $
-#include <ossim/imaging/ossimHsvToRgbSource.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimHsvVector.h>
-#include <ossim/base/ossimRgbVector.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-
-RTTI_DEF1(ossimHsvToRgbSource, "ossimHsvToRgbSource", ossimImageSourceFilter)
-
-ossimHsvToRgbSource::ossimHsvToRgbSource()
-   :ossimImageSourceFilter(),
-    theBlankTile(NULL),
-    theTile(NULL)
-{
-}
-
-ossimHsvToRgbSource::ossimHsvToRgbSource(ossimImageSource* inputSource)
-   : ossimImageSourceFilter(inputSource),
-     theBlankTile(NULL),
-     theTile(NULL)
-{
-}
-
-ossimHsvToRgbSource::~ossimHsvToRgbSource()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimHsvToRgbSource::getTile(
-   const  ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   if(theInputConnection)
-   {
-      ossimRefPtr<ossimImageData> imageData =
-         theInputConnection->getTile(tileRect, resLevel);
-
-      if(!imageData.valid()) return theBlankTile;
-      
-      if(!isSourceEnabled())
-      {
-         return imageData;
-      }
-
-      if(!theTile.valid()) allocate();
-      if(!theTile.valid())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "Unable to initialize ossimHsvToRgbSource in getTile"
-            << std::endl;
-         return ossimRefPtr<ossimImageData>();
-      }
-      
-      long w  = tileRect.width();
-      long h  = tileRect.height();
-      long tw = theTile->getWidth();
-      long th = theTile->getHeight();
-      
-      theBlankTile->setOrigin(tileRect.ul());
-      theBlankTile->setWidthHeight(w, h);
-      theTile->setWidthHeight(w, h);
-      theTile->setOrigin(tileRect.ul());
-      if( (tw*th) != (w*h))
-      {
-         theTile->initialize();
-      }
-      else
-      {
-         theTile->makeBlank();
-      }
-      
-      if((imageData->getNumberOfBands()==3)&&
-         (imageData->getScalarType()==OSSIM_NORMALIZED_FLOAT)&&
-         (imageData->getDataObjectStatus()!=OSSIM_NULL))
-      {
-         ossim_uint8* outputBands[3];
-         float* inputBands[3];
-         outputBands[0] = static_cast<ossim_uint8*>(theTile->getBuf(0));
-         outputBands[1] = static_cast<ossim_uint8*>(theTile->getBuf(1));
-         outputBands[2] = static_cast<ossim_uint8*>(theTile->getBuf(2));
-         inputBands[0] = static_cast<float*>(imageData->getBuf(0));
-         inputBands[1] = static_cast<float*>(imageData->getBuf(1));
-         inputBands[2] = static_cast<float*>(imageData->getBuf(2));
-         
-         long height = imageData->getHeight();
-         long width  = imageData->getWidth();
-         long offset = 0;
-         for(long row = 0; row < height; ++row)
-         {
-            for(long col = 0; col < width; ++col)
-            {
-               ossimHsvVector hsv(inputBands[0][offset],
-                                  inputBands[1][offset],
-                                  inputBands[2][offset]);
-               
-               ossimRgbVector rgb(hsv);
-
-               outputBands[0][offset] = rgb.getR();
-               outputBands[1][offset] = rgb.getG();
-               outputBands[2][offset] = rgb.getB();
-
-               ++offset;
-            }
-         }
-      }
-      else
-      {
-         return imageData;
-      }
-      theTile->validate();
-      return theTile;
-   }
-   
-   return theBlankTile;
-}
-
-void ossimHsvToRgbSource::initialize()
-{
-   theBlankTile = NULL;
-   theTile      = NULL;
-}
-
-void ossimHsvToRgbSource::allocate()
-{
-   theBlankTile = ossimImageDataFactory::instance()->create(this, this);
-   theTile = (ossimImageData*)theBlankTile->dup();
-   theTile->initialize();
-}
-
-ossimScalarType ossimHsvToRgbSource::getOutputScalarType() const
-{
-   return OSSIM_UINT8;
-}
-
-double ossimHsvToRgbSource::getNullPixelValue()const
-{
-   return 0;
-}
-
-double ossimHsvToRgbSource::getMinPixelValue(ossim_uint32 /* band */)const
-{
-   return OSSIM_DEFAULT_MIN_PIX_UCHAR;
-}
-
-double ossimHsvToRgbSource::getMaxPixelValue(ossim_uint32 /* band */)const
-{
-   return OSSIM_DEFAULT_MAX_PIX_UCHAR;
-}  
diff --git a/src/ossim/imaging/ossimIgenGenerator.cpp b/src/ossim/imaging/ossimIgenGenerator.cpp
deleted file mode 100644
index 61da6b0..0000000
--- a/src/ossim/imaging/ossimIgenGenerator.cpp
+++ /dev/null
@@ -1,681 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimIgenGenerator.cpp 20206 2011-11-04 15:16:31Z dburken $
-#include <ossim/imaging/ossimIgenGenerator.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/imaging/ossimImageChain.h>
-#include <ossim/imaging/ossimGeoPolyCutter.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/base/ossimObjectFactoryRegistry.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimUsgsQuad.h>
-
-void ossimIgenGenerator::generateSpecList(bool outputToFileFlag)
-{
-   if(theTilingFlag&&
-      (theTileSpacingUnits!=OSSIM_UNIT_UNKNOWN)&&
-      (!theTileSpacing.hasNans()))
-   {
-      generateTiledSpecList(outputToFileFlag);
-   }
-   else
-   {
-      generateNoTiledSpecList(outputToFileFlag);
-   }
-   
-}
-
-void ossimIgenGenerator::getImageFilenamesFromSpecList(std::vector<ossimFilename>& filenameList)
-{
-   if(!theSpecList.size())
-   {
-      generateSpecList();
-   }
-   if(theSpecList.size())
-   {
-      filenameList.clear();
-      for(ossim_uint32 i = 0; i < theSpecList.size(); ++i)
-      {
-         const char* filename = theSpecList[i].find("object2.",  ossimKeywordNames::FILENAME_KW);
-
-         if(filename)
-         {
-            filenameList.push_back(ossimFilename(filename));
-         }
-         else
-         {
-            filenameList.clear();
-            return;
-         }
-      }
-   }
-   
-}
-
-ossimGrect ossimIgenGenerator::getBoundingGround()const
-{
-   return ossimGrect(theOutputGeoPolygon[0],
-                     theOutputGeoPolygon[1],
-                     theOutputGeoPolygon[2],
-                     theOutputGeoPolygon[3]);
-}
-
-void ossimIgenGenerator::executeSpecList()
-{
-}
-
-void ossimIgenGenerator::setInput(ossimConnectableObject* input)
-{
-   theSpecList.clear();
-   generateInputKwl(input);
-   ossimImageSource* inputInterface = PTR_CAST(ossimImageSource,
-                                                        input);
-   if(inputInterface)
-   {
-      theInputBoundingRect = inputInterface->getBoundingRect();
-   }
-}
-
-
-void ossimIgenGenerator::generateChainForMultiInput(ossimConnectableObject* connectable)
-{
-   std::stack<ossimConnectableObject*> aStack;
-
-   generateChainForMultiInputRecurse(aStack, connectable);
-
-   ossim_int32 objectIndex = 1;
-   while(!aStack.empty())
-   {
-      ossimConnectableObject* current = aStack.top();
-      aStack.pop();
-      ossimString prefix = ossimString("object") + ossimString::toString(objectIndex) + ".";
-
-      current->saveState(theInputKwl, prefix.c_str());
-
-      ++objectIndex;
-   }
-   theInputKwl.add("type",
-                   "ossimImageChain",
-                   true);
-   
-}
-
-void ossimIgenGenerator::generateChainForMultiInputRecurse(std::stack<ossimConnectableObject*>& aStack,
-                                                           ossimConnectableObject* connectable)
-{
-   
-
-   if(connectable)
-   {
-      aStack.push(connectable);
-      for(ossim_uint32 i = 0; i < connectable->getNumberOfInputs(); ++i)
-      {
-         generateChainForMultiInputRecurse(aStack,
-                                           connectable->getInput(i));
-      }
-   }   
-}
-
-
-ossimProjection* ossimIgenGenerator::createProductProjection()const
-{
-   return ossimProjectionFactoryRegistry::instance()->createProjection(theViewKwl);
-}
-
-ossimObject* ossimIgenGenerator::createOutput()const
-{
-   return ossimObjectFactoryRegistry::instance()->createObject(theOutputKwl);
-}
-
-ossimObject* ossimIgenGenerator::createInput()const
-{
-   return ossimObjectFactoryRegistry::instance()->createObject(theInputKwl);
-}
-
-void ossimIgenGenerator::generateInputKwl(ossimConnectableObject* connectable)
-{
-   theInputKwl.clear();
-   if(connectable)
-   {
-      // if it has at least one non null input
-      // then  we must build a chain and save it out
-      if(connectable->getInput())
-      {
-         generateChainForMultiInput(connectable);
-      }
-      else // it is a single input
-      {
-         connectable->saveState(theInputKwl);
-      }
-   }
-}
-
-void ossimIgenGenerator::generateOutputKwl(ossimConnectableObject* connectable)
-{
-   theOutputKwl.clear();
-   if(connectable)
-   {
-      connectable->saveState(theOutputKwl);
-   }
-}
-
-void ossimIgenGenerator::generateViewKwl(ossimObject* view)
-{
-   theViewKwl.clear();
-   if(view)
-   {
-      view->saveState(theViewKwl);
-   }
-}
-   
-void ossimIgenGenerator::setDefaultOutput()
-{
-   
-}
-
-void ossimIgenGenerator::generateTiledSpecList(bool outputToFileFlag)
-{
-   theSpecList.clear();
-   theSpecFileList.clear();
-   ossimDpt spacing = theTileSpacing;
-
-   switch(theTileSpacingUnits)
-   {
-      case OSSIM_MINUTES:
-      {
-         spacing.x /= 60;
-         spacing.y /= 60;
-         generateGeoTiledSpecList(spacing, outputToFileFlag);
-         break;
-      }
-      case OSSIM_SECONDS:
-      {
-         spacing.x /= 3600;
-         spacing.y /= 3600;
-         generateGeoTiledSpecList(spacing, outputToFileFlag);
-         break;
-      }
-      case OSSIM_DEGREES:
-      {
-         generateGeoTiledSpecList(spacing, outputToFileFlag);
-         break;
-      }
-      case OSSIM_PIXEL:
-      {
-         generatePixelTiledSpecList(outputToFileFlag);
-         break;
-      }
-      default:
-         break;
-   }
-}
-
-void ossimIgenGenerator::generatePixelTiledSpecList(bool outputToFileFlag)
-{
-   ossimRefPtr<ossimProjection> proj = createProductProjection();
-
-   if((!proj)||(theOutputGeoPolygon.size() != 4))
-   {
-      return;
-   }
-   
-   ossimIrect inputRect = getInputBoundingRect();
-   inputRect.stretchToTileBoundary(theTileSpacing);
-   ossimGeoPolygon tempPoly;
-   ossimObject* obj = createInput();
-   ossimImageChain* chain = PTR_CAST(ossimImageChain,
-                                     obj);
-   ossimGeoPolyCutter* cutter = new ossimGeoPolyCutter;
-   chain->add(cutter);
-   
-   ossimKeywordlist kwl;
-   ossimFilename outfile = theOutputKwl.find(ossimKeywordNames::FILENAME_KW);
-   
-   if(outfile == "")
-   {
-      cerr << "Valid filename not given, returning!" << endl;
-   }
-   
-   kwl.add("object2.", theOutputKwl, true);
-   kwl.add("product.projection.",theViewKwl, true);
-   addPixelType(kwl, "product.");   
-   ossimDpt p1;
-   ossimDpt p2;
-   ossimDpt p3;
-   ossimDpt p4;
-
-   
-   proj->worldToLineSample(theOutputGeoPolygon[0], p1);
-   proj->worldToLineSample(theOutputGeoPolygon[1], p2);
-   proj->worldToLineSample(theOutputGeoPolygon[2], p3);
-   proj->worldToLineSample(theOutputGeoPolygon[3], p4);
-
-   ossimIrect bounds(p1, p2, p3, p4);
-   if(inputRect.completely_within(bounds))
-   {
-      inputRect = bounds;
-   }
-
-   bounds.stretchToTileBoundary(theTileSpacing);
-   
-   ossim_sint32 i = 1;
-   for(ossim_sint32 ulY = bounds.ul().y; ulY < bounds.lr().y; ulY+=(ossim_sint32)theTileSpacing.y)
-   {
-      for(ossim_sint32 ulX = bounds.ul().x; ulX < bounds.lr().x; ulX+=(ossim_sint32)theTileSpacing.x)
-      {
-         ossimDrect rect(ulX,
-                         ulY,
-                         ulX + (theTileSpacing.x - 1),
-                         ulY + (theTileSpacing.y - 1));
-         ossimGpt gpt1;
-         ossimGpt gpt2;
-         ossimGpt gpt3;
-         ossimGpt gpt4;
-
-         proj->lineSampleToWorld(rect.ul(), gpt1);
-         proj->lineSampleToWorld(rect.ur(), gpt2);
-         proj->lineSampleToWorld(rect.lr(), gpt3);
-         proj->lineSampleToWorld(rect.ll(), gpt4);
-         
-         tempPoly.clear();
-         tempPoly.addPoint(gpt1);
-         tempPoly.addPoint(gpt2);
-         tempPoly.addPoint(gpt3);
-         tempPoly.addPoint(gpt4);
-         addPadding(tempPoly, tempPoly);
-         cutter->setPolygon(tempPoly);
-         chain->saveState(kwl, "object1.");
-         
-         ossimFilename specName(theSpecFileLocation);
-         specName = specName.dirCat(ossimFilename("igen" + ossimString::toString(i) + ".spec"));
-         ossimFilename tilename = outfile.path();
-         if(theTileNamingConvention == "id")
-         {
-            int tileId = getTileId(inputRect, ossimDpt(ulX+theTileSpacing.x/2, ulY+theTileSpacing.y/2), theTileSpacing);
-            tilename = tilename.dirCat(ossimFilename(outfile.fileNoExtension() + "_" +
-                                                     ossimString::toString(tileId)));
-            tilename.setExtension(outfile.ext());
-         }
-         
-         kwl.add("object2.",
-                 ossimKeywordNames::FILENAME_KW,
-                 tilename,
-                 true);
-         kwl.add("object2.input_connection1",
-                 kwl.find("object1.id"),
-                 true);
-         theSpecFileList.push_back(specName);
-         if(outputToFileFlag)
-         {
-            kwl.write(specName.c_str());
-         }
-         else
-         {
-            theSpecList.push_back(kwl);
-         }
-         i++;
-      }
-   }
-}
-
-void ossimIgenGenerator::generateGeoTiledSpecList(const ossimDpt& spacing, bool outputToFileFlag)
-{
-   ossimRefPtr<ossimProjection> proj = createProductProjection();
-   if((proj.valid())&&(theOutputGeoPolygon.size() == 4))
-   {
-      ossimDrect rect;
-
-      ossimIrect inputRect = getInputBoundingRect();
-      ossimGpt gpt1;
-      ossimGpt gpt2;
-      ossimGpt gpt3;
-      ossimGpt gpt4;
-      proj->lineSampleToWorld(inputRect.ul(), gpt1);
-      proj->lineSampleToWorld(inputRect.ur(), gpt2);
-      proj->lineSampleToWorld(inputRect.lr(), gpt3);
-      proj->lineSampleToWorld(inputRect.ll(), gpt4);
-
-      ossimDrect inputGroundRect(gpt1,
-                                 gpt2,
-                                 gpt3,
-                                 gpt4,
-                                 OSSIM_RIGHT_HANDED);
-      
-      rect = ossimDrect(theOutputGeoPolygon[0],
-                        theOutputGeoPolygon[1],
-                        theOutputGeoPolygon[2],
-                        theOutputGeoPolygon[3],
-                        OSSIM_RIGHT_HANDED);
-
-      rect.stretchToTileBoundary(spacing);
-      inputGroundRect.stretchToTileBoundary(spacing);
-      double ulLat = rect.ul().lat;
-      double ulLon = rect.ul().lon;
-      ossimGeoPolygon tempPoly;
-      ossimObject* obj = createInput();
-      ossimImageChain* chain = PTR_CAST(ossimImageChain,
-                                        obj);
-      ossimGeoPolyCutter* cutter = new ossimGeoPolyCutter;
-      chain->add(cutter);
-      
-      ossimKeywordlist kwl;
-      ossimFilename outfile = theOutputKwl.find(ossimKeywordNames::FILENAME_KW);
-
-      if(outfile == "")
-      {
-         cerr << "Valid filename not given, returning!" << endl;
-      }
-      
-      kwl.add("object2.", theOutputKwl, true);
-      kwl.add("object2.input_connection1",
-              kwl.find("object1.id"),
-              true);
-      kwl.add("product.projection.",theViewKwl, true);
-      addPixelType(kwl, "product.");   
-      int i = 1;
-      int row = 0;
-      int col = 0;
-      //      int tileId = 0;
-      while(ulLat > rect.ll().lat)
-      {
-         ulLon = rect.ul().lon;
-         col = 0;
-         while(ulLon < rect.ur().lon)
-         {
-            tempPoly.clear();
-            tempPoly.addPoint(ulLat, ulLon, ossim::nan(), theOutputGeoPolygon[0].datum());
-            tempPoly.addPoint(ulLat, ulLon+spacing.lon, ossim::nan(), theOutputGeoPolygon[0].datum());
-            tempPoly.addPoint(ulLat-spacing.lat, ulLon+spacing.lon, ossim::nan(), theOutputGeoPolygon[0].datum());
-            tempPoly.addPoint(ulLat-spacing.lat, ulLon, ossim::nan(), theOutputGeoPolygon[0].datum());
-            
-            addPadding(tempPoly, tempPoly);
-            cutter->setPolygon(tempPoly);
-            chain->saveState(kwl, "object1.");
-
-            ossimFilename specName(theSpecFileLocation);
-            specName = specName.dirCat(ossimFilename("igen" + ossimString::toString(i) + ".spec"));
-	    ossimFilename tilename = outfile.path();
-	    if(theTileNamingConvention == "id")
-	      {
-		int tileId = getTileId(inputGroundRect, ossimDpt(ulLon, ulLat), spacing);
-		tilename = tilename.dirCat(ossimFilename(outfile.fileNoExtension() + "_" +
-							 ossimString::toString(tileId)));
-		tilename.setExtension(outfile.ext());
-	      }
-	    else
-	      {
-                 ossimUsgsQuad quad(ossimGpt(ulLat - (spacing.x), ulLon+(spacing.x), 0.0));
-                 if(spacing.x == 7.5/60.0)
-                 {
-                    tilename = tilename.dirCat(ossimFilename(quad.quarterQuadName().downcase().trim()));
-                 }
-                 else
-                 {
-                    tilename = tilename.dirCat(ossimFilename(quad.quarterQuadSegName().downcase().trim()));
-                 }
-                 
-                 tilename.setExtension(outfile.ext());
-	      }
-
-	    kwl.add("object2.",
-		    ossimKeywordNames::FILENAME_KW,
-		    tilename,
-		    true);
-            kwl.add("object2.input_connection1",
-                    kwl.find("object1.id"),
-                    true);
-            theSpecFileList.push_back(specName);
-            if(outputToFileFlag)
-            {
-               kwl.write(specName.c_str());
-            }
-            else
-            {
-               theSpecList.push_back(kwl);
-            }
-            ulLon += spacing.lon;
-            ++i;
-            ++col;
-         }
-         ++row;
-         ulLat -= spacing.lat;
-      }
-
-   }   
-}
-
-
-void ossimIgenGenerator::generateNoTiledSpecList(bool outputToFileFlag)
-{
-   theSpecList.clear();
-   theSpecFileList.clear();
-   
-   if(theViewKwl.getSize()&&
-      theInputKwl.getSize()&&
-      theOutputKwl.getSize())
-   {
-      ossimKeywordlist kwl;
-      if(theOutputGeoPolygon.size())
-      {
-         ossimRefPtr<ossimObject> obj = createInput();
-         ossimRefPtr<ossimImageChain> chain = PTR_CAST(ossimImageChain,
-                                                       obj.get());
-         if(chain.valid())
-         {
-            ossimGeoPolyCutter* cutter = new ossimGeoPolyCutter;
-            
-            cutter->setPolygon(theOutputGeoPolygon);
-            
-            chain->add(cutter);
-            chain->saveState(kwl, "object1.");
-         }
-         else
-         {
-            kwl.add("object1.",theInputKwl, true);
-         }
-         obj = 0;
-      }
-      else
-      {
-         kwl.add("object1.",theInputKwl, true);
-      }
-      kwl.add("object2.", theOutputKwl, true);
-      kwl.add("object2.input_connection1",
-              kwl.find("object1.id"),
-              true);
-      kwl.add("product.projection.",theViewKwl, true);
-      addPixelType(kwl, "product.");   
-
-      ossimFilename specName(theSpecFileLocation +
-                             "/"+
-                             "igen1.spec");
-      
-      theSpecFileList.push_back(specName);
-      if(outputToFileFlag)
-      {
-         kwl.write(specName.c_str());
-      }
-      else
-      {
-         theSpecList.push_back(kwl);
-      }
-      
-      kwl.clear();
-   }
-}
-
-int ossimIgenGenerator::getTileId(const ossimDrect& rect,
-				  const ossimDpt& currentPt,
-				  const ossimDpt& spacing)const
-{
-   ossimDpt ul(rect.ul());
-   
-   double relY = fabs(ul.y - currentPt.y);
-   double relX = fabs(ul.x - currentPt.x);
-   
-   
-   ossim_int32 spacingY           = (ossim_int32)(relY/spacing.y);
-   ossim_int32 spacingX           = (ossim_int32)(relX/spacing.x);
-   ossim_int32 maxHorizontalTiles = (ossim_int32)( (rect.width()-1)/spacing.x);
-   
-   return spacingY*maxHorizontalTiles + spacingX;
-}
-
-
-ossimIrect ossimIgenGenerator::getInputBoundingRect()const
-{
-   ossimRefPtr<ossimObject> obj = createInput();
-   ossimImageSource* inter = PTR_CAST(ossimImageSource, obj.get());
-   ossimIrect result;
-
-   result.makeNan();
-   if(inter)
-   {
-      result = inter->getBoundingRect();
-   }
-   return result;
-}
-
-void ossimIgenGenerator::addPadding(ossimGeoPolygon& output,
-                                    const ossimGeoPolygon& input)const
-{
-   output = input;
-   switch(theTilePaddingUnits)
-   {
-      case OSSIM_PIXEL:
-      {
-         ossimRefPtr<ossimProjection> proj = createProductProjection();
-         if(proj.valid())
-         {
-            ossimDpt ul;
-            ossimDpt ur;
-            ossimDpt lr;
-            ossimDpt ll;
-
-            if(input.getOrdering() == OSSIM_CLOCKWISE_ORDER)
-            {
-               proj->worldToLineSample(input[0], ul);
-               proj->worldToLineSample(input[1], ur);
-               proj->worldToLineSample(input[2], lr);
-               proj->worldToLineSample(input[3], ll);
-            }
-            else
-            {
-               proj->worldToLineSample(input[0], ul);
-               proj->worldToLineSample(input[1], ll);
-               proj->worldToLineSample(input[2], lr);
-               proj->worldToLineSample(input[3], ur);
-            
-            }
-            
-            ul -= theTilePadding;
-            ur += ossimDpt(theTilePadding.x,
-                           -theTilePadding.y);
-            lr += theTilePadding;
-            ll += ossimDpt(-theTilePadding.x,
-                           theTilePadding.y);
-
-            proj->lineSampleToWorld(ul, output[0]);
-            proj->lineSampleToWorld(ur, output[1]);
-            proj->lineSampleToWorld(lr, output[2]);
-            proj->lineSampleToWorld(ll, output[3]);
-
-            output.setOrdering(OSSIM_CLOCKWISE_ORDER);
-         
-         }
-         break;
-      }
-      case OSSIM_DEGREES:
-      case OSSIM_MINUTES:
-      case OSSIM_SECONDS:
-      {
-         ossimGpt ul;
-         ossimGpt ur;
-         ossimGpt lr;
-         ossimGpt ll;
-         ossimDpt spacing = theTilePadding;
-
-         if(theTilePaddingUnits==OSSIM_MINUTES)
-         {
-            spacing.x /= 60;
-            spacing.y /= 60;
-         }
-         else if(theTilePaddingUnits==OSSIM_MINUTES)
-         {
-            spacing.x /= 3600;
-            spacing.y /= 3600;
-         }
-      
-         if(input.getOrdering() == OSSIM_CLOCKWISE_ORDER)
-         {
-            ul = input[0];
-            ur = input[1];
-            lr = input[2];
-            ll = input[3];
-         }
-         else
-         {
-            ul = input[0];
-            ll = input[1];
-            lr = input[2];
-            ur = input[3];
-         }
-         ul.lat += spacing.lat;
-         ul.lon -= spacing.lon;
-         ur.lat += spacing.lat;
-         ur.lon += spacing.lon;
-         lr.lat -= spacing.lat;
-         lr.lon += spacing.lon;
-         ll.lat -= spacing.lat;
-         ll.lon -= spacing.lon;
-
-         output[0] = ul;
-         output[1] = ur;
-         output[2] = lr;
-         output[3] = ll;
-         output.setOrdering(OSSIM_CLOCKWISE_ORDER);
-      
-         break;
-      }
-      case OSSIM_METERS:
-      {
-         break;
-      }
-      default:
-         break;
-   }
-}
-
-void ossimIgenGenerator::addPixelType(ossimKeywordlist& kwl, const char* prefix)
-{
-   if(thePixelType == OSSIM_PIXEL_IS_POINT)
-   {
-      kwl.add(prefix,
-              ossimKeywordNames::PIXEL_TYPE_KW,
-              "PIXEL_IS_POINT",
-              true);
-   }
-   else
-   {
-      kwl.add(prefix,
-              ossimKeywordNames::PIXEL_TYPE_KW,
-              "PIXEL_IS_AREA",
-              true);
-   }
-}
-
-void ossimIgenGenerator::setOutput(const ossimKeywordlist& kwl)
-{
-   theOutputKwl.clear();
-
-   theOutputKwl = kwl;
-}
diff --git a/src/ossim/imaging/ossimImageCacheBase.cpp b/src/ossim/imaging/ossimImageCacheBase.cpp
deleted file mode 100644
index bb25c55..0000000
--- a/src/ossim/imaging/ossimImageCacheBase.cpp
+++ /dev/null
@@ -1,661 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Mingjie Su
-//
-//********************************************************************
-// $Id: ossimImageCacheBase.cpp 2685 2011-06-07 16:24:41Z david.burken $
-#include <algorithm>
-using namespace std;
-
-#include <ossim/imaging/ossimImageCacheBase.h>
-
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/base/ossimNBandLutDataObject.h>
-#include <ossim/imaging/ossimHistogramWriter.h>
-#include <ossim/imaging/ossimImageHistogramSource.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimContainerProperty.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimEllipsoid.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/support_data/ossimRpfFrame.h>
-#include <ossim/support_data/ossimRpfToc.h>
-#include <ossim/support_data/ossimRpfTocEntry.h>
-#include <ossim/support_data/ossimRpfCompressionSection.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/projection/ossimEquDistCylProjection.h>
-#include <ossim/projection/ossimCylEquAreaProjection.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimPolygon.h>
-
-static ossimTrace traceDebug = ossimTrace("ossimImageCacheBase:debug");
-
-#ifdef OSSIM_ID_ENABLED
-static const char OSSIM_ID[] = "$Id: ossimImageCacheBase.cpp 2685 2011-06-07 16:24:41Z david.burken $";
-#endif
-
-RTTI_DEF1(ossimImageCacheBase, "ossimImageCacheBase", ossimImageHandler)
-
-ossimImageCacheBase::ossimImageCacheBase()
-   :
-   ossimImageHandler(),
-   m_actualImageRect(),
-   m_numberOfLines(0),
-   m_numberOfSamples(0),
-   m_numberOfBands(0),
-   m_fileNames(),
-   m_tileSize(128, 128),
-   m_workFrame(new ossimRpfFrame),
-   m_bBox_LL_Lon(0.0),
-   m_bBox_LL_Lat(0.0),
-   m_bBox_UR_Lon(0.0),
-   m_bBox_UR_Lat(0.0),
-   m_numOfFramesVertical(0),
-   m_numOfFramesHorizontal(0),
-   m_frame_width(0),
-   m_frame_height(0),
-   m_frameEntryArray()
-{
-  if (traceDebug())
-  {
-    ossimNotify(ossimNotifyLevel_DEBUG)
-      << "ossimImageCacheBase::ossimImageCacheBase entered...\n";
-#ifdef OSSIM_ID_ENABLED
-    ossimNotify(ossimNotifyLevel_DEBUG)
-      << "OSSIM_ID:  " << OSSIM_ID << "\n";
-#endif      
-  }
-
-  m_actualImageRect.makeNan();
-
-}
-
-ossimImageCacheBase::~ossimImageCacheBase()
-{
-  if(m_workFrame)
-  {
-    delete m_workFrame;
-    m_workFrame = 0;
-  }
-  close();
-}
-
-void ossimImageCacheBase::close()
-{
-  deleteAll();
-}
-
-bool ossimImageCacheBase::isOpen()const
-{
-  //return (theTableOfContents!=0);
-  ossimString ext = theImageFile.ext().downcase();
-
-  if(ext == "rpf")
-  {
-    return true;
-  }
-  else
-  {
-    return false;
-  }
-}
-
-bool ossimImageCacheBase::buildFrameEntryArray(ossimFilename imageFile, 
-                                               ossim_uint32 frameWidth, 
-                                               ossim_uint32 frameHeight)
-{
-   static const char MODULE[] = "ossimImageCacheBase::buildFrameEntryArray";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered..." << endl;
-   }
-
-   // use to check if tiles have overlap pixels
-   ossim_float64 avgLat = 0.0;
-   ossim_float64 avgLon = 0.0;
-
-   m_frame_width = frameWidth;
-   m_frame_height = frameHeight;
-
-   std::ifstream in((imageFile).c_str() );
-   
-   std::string line;
-   ossim_uint32 index = 0; // used throughout
-   while( in.good() )
-   {
-      // Read in a line.
-      std::getline(in, line);
-
-      ossimString tmpStr = ossimString(line);
-      if (!tmpStr.empty())
-      {
-         if (index == 0)
-         {
-            std::vector<ossimString> box_lat_lon;
-            tmpStr.split(box_lat_lon, "|");
-            
-            if (box_lat_lon.size() > 2)
-            {
-               std::vector<ossimString> ll;
-               std::vector<ossimString> ur;
-               
-               box_lat_lon[0].split(ll, ",");
-               box_lat_lon[1].split(ur, ",");
-               ossimString bandStr = box_lat_lon[2];
-               
-               m_bBox_LL_Lon = ll[0].toFloat64();
-               m_bBox_LL_Lat = ll[1].toFloat64();
-               m_bBox_UR_Lon = ur[0].toFloat64();
-               m_bBox_UR_Lat = ur[1].toFloat64();
-               
-               checkLongitude(m_bBox_LL_Lon, m_bBox_UR_Lon);
-               
-               m_numberOfBands = ossimString(bandStr).toInt32();
-            }
-            else
-            {
-               return false;
-            }
-         }
-         else if (index == 1)
-         {
-            m_fileNames.push_back(tmpStr);
-            std::vector<ossimString> frame_lat_lon = tmpStr.split("|");
-            if (frame_lat_lon.size() > 2)
-            {
-               ossimString ll_lon_lat = frame_lat_lon[1];
-               ossimString ur_lon_lat = frame_lat_lon[2];
-               ossim_float64 ll_lon = ossimString(ll_lon_lat.split(",")[0]).toDouble();
-               ossim_float64 ll_lat = ossimString(ll_lon_lat.split(",")[1]).toDouble();
-               ossim_float64 ur_lon = ossimString(ur_lon_lat.split(",")[0]).toDouble();
-               ossim_float64 ur_lat = ossimString(ur_lon_lat.split(",")[1]).toDouble();
-
-               checkLongitude(ll_lon, ur_lon);
-               
-               ossim_float64 bBox_lat_diff = std::fabs(m_bBox_UR_Lat - m_bBox_LL_Lat);
-               ossim_float64 bBox_lon_diff = std::fabs(m_bBox_UR_Lon - m_bBox_LL_Lon);
-               
-               ossim_float64 lat_diff = std::fabs(ur_lat - ll_lat);
-               ossim_float64 lon_diff = std::fabs(ur_lon - ll_lon);
-               
-               m_numOfFramesVertical   = static_cast<ossim_uint32>(bBox_lat_diff/lat_diff + 0.5);
-               m_numOfFramesHorizontal = static_cast<ossim_uint32>(bBox_lon_diff/lon_diff + 0.5);
-
-               avgLon = std::fabs(bBox_lon_diff/m_numOfFramesHorizontal);
-               avgLat = std::fabs(bBox_lat_diff/m_numOfFramesVertical);
-               
-               m_numberOfLines   = m_numOfFramesVertical*m_frame_height;
-               m_numberOfSamples = m_numOfFramesHorizontal*m_frame_width;
-
-               if ( traceDebug() )
-               {
-                  ossimNotify(ossimNotifyLevel_DEBUG)
-                     << "\nscene height in degrees: " << bBox_lat_diff
-                     << "\nscene width in degrees:  " << bBox_lon_diff
-                     << "\nframe height in degrees: " << lat_diff
-                     << "\nframe width in degrees:  " << lon_diff
-                     << "\nframes vertical:         " << m_numOfFramesVertical
-                     << "\nframes horizontal:       " << m_numOfFramesHorizontal
-                     << "\nlines:                   " << m_numberOfLines
-                     << "\nsamples:                 " << m_numberOfSamples << "\n";
-               }
-            }
-            else
-            {
-               return false;
-            }
-         }
-         else
-         {
-            m_fileNames.push_back(tmpStr);
-         }
-         
-      } // matches: if (!tmpStr.empty())
-      
-      ++index;
-      
-   } // matches: while( in.good() )
-   in.close();
-
-   m_frameEntryArray.resize(m_numOfFramesVertical);
-   for(index = 0; index < m_frameEntryArray.size(); ++index)
-   {
-      m_frameEntryArray[index].resize(m_numOfFramesHorizontal);
-   }
-
-   for(index = 0; index < m_fileNames.size(); ++index)
-   {
-      ossimString tmpStr = m_fileNames[index];
-      std::vector<ossimString> frameInfos = tmpStr.split("|");
-      if (frameInfos.size() > 1)
-      {
-         ossimString fileName = frameInfos[0];
-         ossimString ll_lon_lat = frameInfos[1];
-         ossimString ur_lon_lat = frameInfos[2];
-         double ll_lon = ossimString(ll_lon_lat.split(",")[0]).toDouble();
-         double ll_lat = ossimString(ll_lon_lat.split(",")[1]).toDouble();
-         double ur_lon = ossimString(ur_lon_lat.split(",")[0]).toDouble();
-         double ur_lat = ossimString(ur_lon_lat.split(",")[1]).toDouble();
-         
-         checkLongitude(ll_lon, ur_lon);
-         
-         ossim_float64 tmpColPostion = std::fabs(ll_lon - m_bBox_LL_Lon);
-         ossim_float64 tmpFrameLon = std::fabs(ur_lon - ll_lon);
-
-         if (std::fabs(tmpFrameLon - avgLon) > 0.002)
-         {
-            ossimNotify(ossimNotifyLevel_WARN) << fileName << " has overlap pixels with other image." << std::endl;
-            return false;
-         }
-         
-         ossim_float64 tmpRowPostion = std::fabs(m_bBox_UR_Lat - ur_lat);
-         ossim_float64 tmpFrameLat = std::fabs(ur_lat - ll_lat);
-
-         if (std::fabs(tmpFrameLat - avgLat) > 0.002)
-         {
-            ossimNotify(ossimNotifyLevel_WARN) << fileName << " has overlap pixels with other image." << std::endl;
-            return false;
-         }
-         
-         ossim_uint32 colNum = static_cast<ossim_uint32>(tmpColPostion/tmpFrameLon + 0.5);
-         ossim_uint32 rowNum = static_cast<ossim_uint32>(tmpRowPostion/tmpFrameLat + 0.5);
-         
-         if (colNum >= m_numOfFramesHorizontal)
-         {
-            colNum = m_numOfFramesHorizontal-1; // Clamp to last column.
-         }
-         
-         if (rowNum >= m_numOfFramesVertical)
-         {
-            rowNum = m_numOfFramesVertical-1; // Clamp to last row.
-         }
-
-         ossimRpfFrameEntry tempEntry;
-         tempEntry.setEntry(ossimFilename(""), fileName);
-         m_frameEntryArray[rowNum][colNum] = tempEntry;
-      }
-      else
-      {
-         return false;
-      }
-   }
-
-   return true;
-}
-
-void ossimImageCacheBase::checkLongitude(ossim_float64& leftLon,
-                                             const ossim_float64& rightLon) const
-{
-   //---
-   // Test for scene coordinates being 180 to 180 and adjust leftLon to -180
-   // if so.
-   //
-   // NOTE:
-   // Setting tolerance to 1/7200 about 15 meters.
-   // Not sure if this is too loose or not. (drb)
-   //---
-   const ossim_float64 TOLERANCE = 0.000138889; // 1/7200 about 15 meters.
-
-   if ( ossim::almostEqual(leftLon, 180.0, TOLERANCE) )
-   {
-      if ( ossim::almostEqual(rightLon, 180.0, TOLERANCE) )
-      {
-         leftLon = -180.0;
-      }
-   }
-}
-
-ossim_uint32 ossimImageCacheBase::getNumberOfInputBands()const
-{
-   return m_numberOfBands;
-}
-
-ossim_uint32 ossimImageCacheBase::getNumberOfOutputBands()const
-{
-  return m_numberOfBands;
-}
-
-ossim_uint32 ossimImageCacheBase::getNumberOfLines(ossim_uint32 reduced_res_level) const
-{
-   if (reduced_res_level == 0)
-   {
-      return m_numberOfLines;
-   }
-   else if (theOverview.valid())
-   {
-      return theOverview->getNumberOfLines(reduced_res_level);
-   }
-   
-   return 0;
-}
-
-ossim_uint32 ossimImageCacheBase::getNumberOfSamples(ossim_uint32 reduced_res_level) const
-{
-   if (reduced_res_level == 0)
-   {
-      return m_numberOfSamples;
-   }
-   else if (theOverview.valid())
-   {
-      return theOverview->getNumberOfSamples(reduced_res_level);
-   }
-   
-   return 0;
-}
-
-void ossimImageCacheBase::setActualImageRect()
-{
-   m_actualImageRect = ossimIrect(0,0,m_numberOfLines, m_numberOfSamples);
-}
-
-ossimIrect ossimImageCacheBase::getImageRectangle(ossim_uint32 reduced_res_level) const
-{
-   return ossimIrect(0,                         // upper left x
-                     0,                         // upper left y
-                     getNumberOfSamples(reduced_res_level) - 1,  // lower right x
-                     getNumberOfLines(reduced_res_level)   - 1); // lower right y                     
-}
-
-
-
-ossim_uint32 ossimImageCacheBase::getTileWidth() const
-{
-   return m_tileSize.x;
-}
-
-ossim_uint32 ossimImageCacheBase::getTileHeight() const
-{
-   return m_tileSize.y;
-}
-
-void ossimImageCacheBase::getEntryList(std::vector<ossim_uint32>& entryList)const
-{
-   entryList.push_back(0);
-}
-
-bool ossimImageCacheBase::isValidRLevel(ossim_uint32 reduced_res_level) const
-{
-   if (reduced_res_level == 0)
-   {
-      return true;
-   }
-   else if (theOverview.valid())
-   {
-      return theOverview->isValidRLevel(reduced_res_level);
-   }
-   else
-   {
-      return false;
-   }
-}
-
-vector<ossimImageCacheBase::ossimFrameEntryData> ossimImageCacheBase::getIntersectingEntries(const ossimIrect& rect)
-{
-   vector<ossimFrameEntryData> result;
-
-   // make sure we have the Toc entry to render
-   if(!isOpen()) return result;
-
-   ossimIrect imageRect = getImageRectangle();
-   if(rect.intersects(imageRect))
-   {
-      ossimIrect clipRect  = rect.clipToRect(imageRect);
-      ossimIrect frameRect(clipRect.ul().x/m_frame_width,
-                           clipRect.ul().y/m_frame_height,
-                           clipRect.lr().x/m_frame_width,
-                           clipRect.lr().y/m_frame_height);
-
-      for(ossim_int32 row = frameRect.ul().y; row <= frameRect.lr().y; ++row)
-      {
-         for(ossim_int32 col = frameRect.ul().x; col <= frameRect.lr().x; ++col)
-         {
-            ossimRpfFrameEntry tempEntry = m_frameEntryArray[row][col];
-            if(tempEntry.exists())
-            {
-               result.push_back(ossimFrameEntryData(row,
-                                                    col,
-                                                    row*m_frame_height,
-                                                    col*m_frame_width,
-                                                    tempEntry));
-            }
-         }
-      }
-   }
-
-   return result;
-}
-
-void ossimImageCacheBase::deleteAll()
-{
-   theOverview = 0;
-}
-
-bool ossimImageCacheBase::saveState(ossimKeywordlist& kwl,
-                                        const char* prefix)const
-{
-   bool result = ossimImageHandler::saveState(kwl, prefix);
-
-   return result;
-}
-
-bool ossimImageCacheBase::loadState(const ossimKeywordlist& kwl,
-                                        const char* prefix)
-{
-   const char* MODULE = "ossimImageCacheBase::loadState";
-
-   if(traceDebug())
-   {
-      CLOG << "Entering..." << endl;
-   }
-   bool result = ossimImageHandler::loadState(kwl, prefix);
-
-   if(!result)
-   {
-      if(traceDebug())
-      {
-         CLOG << "Leaving..." << endl;
-      }
-      return false;
-   }
-   const char* lookup = 0;
-   lookup = kwl.find(ossimString(prefix), "entry");
-   ossim_int32 entry = ossimString(lookup).toInt32();
-
-   // if an entry is specified then
-   // call the open with an entry number
-   if(lookup)
-   {
-      if(traceDebug())
-      {
-         CLOG << "Leaving..." << endl;
-      }
-      result = ossimImageHandler::open(theImageFile);
-      setCurrentEntry(entry);
-      return result;
-   }
-
-   result = ossimImageHandler::open(theImageFile);
-
-   return result;
-}
-
-ossim_uint32 ossimImageCacheBase::getImageTileWidth() const
-{
-   return 256;
-}
-
-ossim_uint32 ossimImageCacheBase::getImageTileHeight() const
-{
-   return 256;
-}
-
-void ossimImageCacheBase::establishDecimationFactors()
-{
-   theDecimationFactors.clear();
-   
-   // Just needed to set the first R level here, the base class can do the rest:
-   ossimImageHandler::establishDecimationFactors();
-}
-
-ossimRefPtr<ossimImageGeometry> ossimImageCacheBase::getImageGeometry()
-{
-   if (theGeometry.valid()) return theGeometry;
-
-   // datum
-   // WGS 84
-   ossimKeywordlist kwl;
-   const char* prefix = 0; // legacy
-   kwl.add(prefix,
-      ossimKeywordNames::DATUM_KW,
-      "WGE",
-      true);   
-
-   ossimGpt ul(m_bBox_UR_Lat,m_bBox_LL_Lon);
-   ossimGpt ll(m_bBox_LL_Lat,m_bBox_LL_Lon);
-   ossimGpt ur(m_bBox_UR_Lat,m_bBox_UR_Lon);
-   ossimGpt lr(m_bBox_LL_Lat,m_bBox_UR_Lon);
-
-   double latInterval = fabs(ul.latd() - lr.latd())/ getNumberOfLines();
-   double lonInterval = fabs(ul.lond() - ur.lond())/ getNumberOfSamples();
-
-   kwl.add(prefix,
-      ossimKeywordNames::UL_LAT_KW,
-      ul.latd(),//-(latInterval/2.0),
-      true);
-
-   kwl.add(prefix,
-      ossimKeywordNames::UL_LON_KW,
-      ul.lond(),//+(lonInterval/2.0),
-      true);
-
-   kwl.add(prefix,
-      ossimKeywordNames::LL_LAT_KW,
-      ll.latd(),//+(latInterval/2.0),
-      true);
-
-   kwl.add(prefix,
-      ossimKeywordNames::LL_LON_KW,
-      ll.lond(),//+(lonInterval/2.0),
-      true);
-
-   kwl.add(prefix,
-      ossimKeywordNames::LR_LAT_KW,
-      lr.latd(),//+(latInterval/2.0),
-      true);
-
-   kwl.add(prefix,
-      ossimKeywordNames::LR_LON_KW,
-      lr.lond(),//-(lonInterval/2.0),
-      true);
-
-   kwl.add(prefix,
-      ossimKeywordNames::UR_LAT_KW,
-      ur.latd(),//-(latInterval/2.0),
-      true);
-
-   kwl.add(prefix,
-      ossimKeywordNames::UR_LON_KW,
-      ur.lond(),//-(latInterval/2.0),
-      true);
-
-   kwl.add(prefix,
-      ossimKeywordNames::NUMBER_INPUT_BANDS_KW,
-      getNumberOfInputBands(),
-      true);
-
-   kwl.add(prefix,
-      ossimKeywordNames::NUMBER_OUTPUT_BANDS_KW,
-      getNumberOfOutputBands(),
-      true);
-
-   kwl.add(prefix,
-      ossimKeywordNames::NUMBER_LINES_KW,
-      getNumberOfLines(),
-      true);
-
-   kwl.add(prefix,
-      ossimKeywordNames::NUMBER_SAMPLES_KW,
-      getNumberOfSamples(),
-      true);
-
-
-   //---
-   // Make a projection to get the easting / northing of the tie point and
-   // the scale in meters.  This will only be used by the CIB.
-   //---
-   kwl.add(prefix,
-      ossimKeywordNames::DATUM_KW,
-      "WGE",
-      true);
-
-   ossimGpt origin((ul.latd()+lr.latd())*.5,
-      (ul.lond()+lr.lond())*.5,
-      0.0);
-
-   double deltaLatPerPixel = latInterval;
-   double deltaLonPerPixel = lonInterval;
-
-   ossimDpt tie;
-
-   tie.lat = ul.latd() - deltaLatPerPixel/2.0;
-   tie.lon = ul.lond() + deltaLonPerPixel/2.0;
-
-   kwl.add(prefix, 
-      ossimKeywordNames::TIE_POINT_XY_KW,
-      tie.toString(),
-      true);
-
-   kwl.add(prefix,
-      ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT,
-      deltaLatPerPixel,
-      true);
-
-   kwl.add(prefix,
-      ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON,
-      deltaLonPerPixel,
-      true);
-
-   kwl.add(prefix,
-      ossimKeywordNames::ORIGIN_LATITUDE_KW,
-      origin.latd(),
-      true);
-
-   kwl.add(prefix,
-      ossimKeywordNames::CENTRAL_MERIDIAN_KW,
-      origin.lond(),
-      true);
-
-   kwl.add(prefix,
-      ossimKeywordNames::TIE_POINT_LAT_KW,
-      ul.latd()-(deltaLatPerPixel/2.0),
-      true);
-
-   kwl.add(prefix,
-      ossimKeywordNames::TIE_POINT_LON_KW,
-      ul.lond()+(deltaLonPerPixel/2.0),
-      true);
-
-   kwl.add(prefix,
-      ossimKeywordNames::TYPE_KW,
-      "ossimEquDistCylProjection",
-      true);
-
-   // Capture this for next time.
-   theGeometry = new ossimImageGeometry;
-   theGeometry->loadState(kwl, prefix);
-
-   // Set image things the geometry object should know about.
-   initImageParameters( theGeometry.get() ); 
-
-   return theGeometry;
-}
-
diff --git a/src/ossim/imaging/ossimImageCacheTileSource.cpp b/src/ossim/imaging/ossimImageCacheTileSource.cpp
deleted file mode 100644
index 0449bef..0000000
--- a/src/ossim/imaging/ossimImageCacheTileSource.cpp
+++ /dev/null
@@ -1,437 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Mingjie Su   
-//
-//********************************************************************
-// $Id: ossimImageCacheTileSource.cpp 2644 2011-05-26 15:20:11Z oscar.kramer $
-#include <algorithm>
-using namespace std;
-
-#include <ossim/imaging/ossimImageCacheTileSource.h>
-
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/base/ossimNBandLutDataObject.h>
-#include <ossim/imaging/ossimHistogramWriter.h>
-#include <ossim/imaging/ossimImageHistogramSource.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimContainerProperty.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimEllipsoid.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/support_data/ossimRpfFrame.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimPolygon.h>
-
-static ossimTrace traceDebug = ossimTrace("ossimImageCacheTileSource:debug");
-
-#ifdef OSSIM_ID_ENABLED
-static const char OSSIM_ID[] = "$Id: ossimImageCacheTileSource.cpp 2644 2011-05-26 15:20:11Z oscar.kramer $";
-#endif
-
-RTTI_DEF1(ossimImageCacheTileSource, "ossimImageCacheTileSource", ossimImageCacheBase)
-
-ossimImageCacheTileSource::ossimImageCacheTileSource()
-   :
-   ossimImageCacheBase(),
-   m_tile(0),
-   m_imageHandler(0),
-   m_minPixelValue(ossim::nan()),
-   m_maxPixelValue(ossim::nan()),
-   m_nullPixelValue(ossim::nan())
-{
-}
-
-ossimImageCacheTileSource::~ossimImageCacheTileSource()
-{
-   if(m_imageHandler.valid())
-   {
-      m_imageHandler = 0;
-   }
-  close();
-}
-
-ossimString ossimImageCacheTileSource::getShortName()const
-{
-  return ossimString("ImageCache");
-}
-
-ossimString ossimImageCacheTileSource::getLongName()const
-{
-  return ossimString("ImageCache reader");
-}
-
-
-void ossimImageCacheTileSource::close()
-{
-  deleteAll();
-}
-
-bool ossimImageCacheTileSource::open()
-{
-  if(traceDebug())
-  {
-    ossimNotify(ossimNotifyLevel_DEBUG) << "ossimImageCacheTileSource::open(): Entered....." << std::endl;
-  }
-
-  ossimFilename imageFile = theImageFile;
-  bool result = true;
-
-  if(isOpen() == false)
-  {
-    close();
-    result = false;
-  }
-
-  if(result)
-  {
-    if (m_fileNames.size() == 0 && m_frameEntryArray.size() == 0)
-    {
-      if (buildFrameEntryArray(imageFile) == false)
-      {
-        return false;
-      }
-    }
-
-    //---
-    // Adjust image rect so not to go over the -180 to 180 and -90 to 90
-    // bounds.
-    //---
-    setActualImageRect();
-
-    // Set the base class image file name.
-    theImageFile = imageFile;
-    m_tile = ossimImageDataFactory::instance()->create(this, this);
-    m_tile->initialize();
-    completeOpen();
-  }
-
-  if(traceDebug())
-  {
-    ossimNotify(ossimNotifyLevel_DEBUG) << "ossimImageCacheTileSource::open(): Leaving at line" << __LINE__ << std::endl;
-  }
-
-  return result;
-}
-
-bool ossimImageCacheTileSource::buildFrameEntryArray(ossimFilename imageFile)
-{
-   static const char MODULE[] = "ossimImageCacheTileSource::buildFrameEntryArray";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered..." << endl;
-   }
-
-   std::ifstream in((imageFile).c_str() );
-   std::string line;
-   ossim_uint32 index = 0; // used throughout
-   ossim_uint32 frameWidth = 0;
-   ossim_uint32 frameHeight = 0;
-   while( in.good() )
-   {
-      // Read in a line.
-      std::getline(in, line);
-      ossimString tmpStr = ossimString(line);
-      if (index == 0)
-      {
-         std::vector<ossimString> box_lat_lon;
-         tmpStr.split(box_lat_lon, "|");
-         if (box_lat_lon.size() == 4)
-         {
-            std::vector<ossimString> pixelInfos = box_lat_lon[3].split(",");
-            if (pixelInfos.size() == 3)
-            {
-               m_minPixelValue = ossimString::toFloat64(pixelInfos[0]);
-               m_maxPixelValue = ossimString::toFloat64(pixelInfos[1]);
-               m_nullPixelValue = ossimString::toFloat64(pixelInfos[2]);
-            }
-         }
-      }
-      else if (index == 1)
-      {
-         std::vector<ossimString> frame_lat_lon = tmpStr.split("|");
-         ossimFilename firstFile = frame_lat_lon[0];
-         if(m_workFrame->parseFile(firstFile) == ossimErrorCodes::OSSIM_ERROR)
-         {
-            m_imageHandler = ossimImageHandlerRegistry::instance()->open(firstFile);
-            if (m_imageHandler.valid())
-            {
-               frameWidth = m_imageHandler->getBoundingRect().width();
-               frameHeight = m_imageHandler->getBoundingRect().height();
-               break;
-            }
-         }
-         else
-         {
-            return false;
-         }
-      }
-      ++index;
-   }
-   in.close();
-
-   return ossimImageCacheBase::buildFrameEntryArray(imageFile, frameWidth, frameHeight);
-}
-
-ossimRefPtr<ossimImageData> ossimImageCacheTileSource::getTile(
-  const  ossimIrect& rect, ossim_uint32 resLevel)
-{
-  if (m_tile.valid())
-  {
-    // Image rectangle must be set prior to calling getTile.
-    m_tile->setImageRectangle(rect);
-
-    if ( getTile( m_tile.get(), resLevel ) == false )
-    {
-      if (m_tile->getDataObjectStatus() != OSSIM_NULL)
-      {
-        m_tile->makeBlank();
-      }
-    }
-  }
-
-  return m_tile;
-}
-
-bool ossimImageCacheTileSource::getTile(ossimImageData* result,
-                                      ossim_uint32 resLevel)
-{
-   bool status = false;
-   
-   //---
-   // Not open, this tile source bypassed, or invalid res level,
-   // return a blank tile.
-   //---
-   if( isOpen() && isSourceEnabled() && isValidRLevel(resLevel) &&
-       result && (result->getNumberOfBands() == getNumberOfOutputBands()))
-   {
-      if ( resLevel > 0 )
-      {
-         status = getOverviewTile(resLevel, result);
-      }
-      
-      if (!status) // Did not get an overview tile.
-      {
-         status = true;
-         
-         ossimIrect rect = result->getImageRectangle();
-         
-         ossimIrect imageRect = getImageRectangle();
-         
-         if ( rect.intersects(imageRect) )
-         {
-            //---
-            // Start with a blank tile in case there is not total coverage
-            // for rect.
-            //---
-            result->makeBlank();
-            
-            vector<ossimFrameEntryData> frames = getIntersectingEntries(rect);
-            if(frames.size() > 0)
-            {
-               //---
-               // Now lets render each frame.  Note we will have to find
-               // subframes
-               // that intersect the rectangle of interest for each frame.
-               //---
-               fillTile(rect, frames, result);
-               
-               // Revalidate tile status.
-               result->validate();
-            }
-         }
-         else
-         {
-            result->makeBlank();
-         }
-      }
-   }
-   return status;
-}
-
-void ossimImageCacheTileSource::fillTile(
-   const ossimIrect& tileRect,
-   const vector<ossimFrameEntryData>& framesInvolved,
-   ossimImageData* tile)
-{
-   ossim_uint32 idx = 0;
-   for(idx = 0; idx < framesInvolved.size(); ++idx)
-   {
-      if (m_imageHandler.valid())
-      {
-         if (m_imageHandler->getFilename() != framesInvolved[idx].theFrameEntry.getFullPath())
-         {
-            m_imageHandler = 0;
-            m_imageHandler = ossimImageHandlerRegistry::instance()->open(framesInvolved[idx].theFrameEntry.getFullPath());
-         }
-      }
-      else
-      {
-         m_imageHandler = ossimImageHandlerRegistry::instance()->open(framesInvolved[idx].theFrameEntry.getFullPath());
-      }
-
-      if (m_imageHandler.valid())
-      {
-         if (m_imageHandler->isOpen() == false)
-         {
-            m_imageHandler->open(framesInvolved[idx].theFrameEntry.getFullPath());
-         }
-
-         ossimIrect frameRect(framesInvolved[idx].thePixelCol,
-            framesInvolved[idx].thePixelRow,
-            framesInvolved[idx].thePixelCol + m_frame_width  - 1,
-            framesInvolved[idx].thePixelRow + m_frame_height - 1);
-
-         ossimIrect clipRect = tileRect.clipToRect(frameRect);
-
-         ossimIpt tempDelta(clipRect.ul().x - framesInvolved[idx].thePixelCol,
-            clipRect.ul().y - framesInvolved[idx].thePixelRow);
-
-         ossimIrect offsetRect(tempDelta.x,
-            tempDelta.y,
-            tempDelta.x + clipRect.width()-1,
-            tempDelta.y + clipRect.height()-1);
-
-         //if the current image size is different from the default size, resample the image data
-         if ( ( m_imageHandler->getBoundingRect().width() != m_frame_width ) ||
-              ( m_imageHandler->getBoundingRect().height() != m_frame_height ) )
-         {
-
-            //calculate the ratio
-            ossim_float64 widthRatio = static_cast<ossim_float64>(m_imageHandler->getBoundingRect().width())/static_cast<ossim_float64>(m_frame_width);
-            ossim_float64 heightRatio = static_cast<ossim_float64>(m_imageHandler->getBoundingRect().height())/static_cast<ossim_float64>(m_frame_height);
-
-            //initialize the rect bounding for getting image data from image handler
-            ossimDpt ul(offsetRect.ul().x*widthRatio, offsetRect.ul().y*heightRatio);
-            ossimDpt lr(offsetRect.lr().x*widthRatio, offsetRect.lr().y*heightRatio);
-
-            //---
-            // Floor, ceil to avoid rect size of zero from ul, lr, delta being only fractional
-            // resulting in size of 0 if cast to an int or passed to ossim<int>::round().
-            //---
-            ossimIrect actualOffsetRect(static_cast<ossim_int32>(std::floor(ul.x)),
-                                        static_cast<ossim_int32>(std::floor(ul.y)),
-                                        static_cast<ossim_int32>(std::ceil(lr.x)),
-                                        static_cast<ossim_int32>(std::ceil(lr.y)));
-
-            //get accurate rect in case the actual rect is larger than the rect of image 
-            actualOffsetRect = actualOffsetRect.clipToRect(m_imageHandler->getBoundingRect());
-            
-            ossimRefPtr<ossimImageData> imageData = m_imageHandler->getTile(actualOffsetRect);
-            if (imageData.valid())
-            {
-               ossimFilterResampler* resampler = new ossimFilterResampler();
-               
-               double denominatorY = 1.0;
-               double denominatorX = 1.0;
-               if(clipRect.height() > 2) // Cannot be zero.
-               {
-                  denominatorY = clipRect.height()-1.0;
-               }
-               if(clipRect.width() > 2) // Cannot be zero.
-               {
-                  denominatorX = clipRect.width()-1.0;
-               }
-
-               //create a tile and set the rect size
-               ossimRefPtr<ossimImageData> tmpTile = (ossimImageData*)imageData->dup();
-               tmpTile->setImageRectangle(offsetRect);
-               tmpTile->makeBlank();
-
-               ossimDpt deltaUl(((actualOffsetRect.ll().x - actualOffsetRect.ul().x)/denominatorX),
-                                ((actualOffsetRect.ll().y - actualOffsetRect.ul().y)/denominatorY));
-               ossimDpt deltaUr(((actualOffsetRect.lr().x - actualOffsetRect.ur().x)/denominatorX),
-                                ((actualOffsetRect.lr().y - actualOffsetRect.ur().y)/denominatorY));
-               ossimDpt length(offsetRect.width(),offsetRect.height());
-               
-               //resample the image data
-               resampler->resample(imageData, 
-                                   tmpTile,
-                                   actualOffsetRect.ul(),
-                                   actualOffsetRect.ur(),
-                                   deltaUl,
-                                   deltaUr,
-                                   length);
-
-               tile->loadTile(tmpTile->getBuf(), clipRect, OSSIM_BSQ);
-
-               tmpTile = 0;
-               delete resampler;
-               resampler = 0;
-            }
-         }
-         else
-         {
-            ossimRefPtr<ossimImageData> imageData = m_imageHandler->getTile(offsetRect);
-            if (imageData.valid())
-            {
-               tile->loadTile(imageData->getBuf(), clipRect, OSSIM_BSQ);
-            }
-         }
-      }
-   }
-}
-
-ossimScalarType ossimImageCacheTileSource::getOutputScalarType() const
-{
-   if (m_imageHandler.valid())
-   {
-      return m_imageHandler->getOutputScalarType();
-   }
-   return OSSIM_UCHAR;
-}
-
-double ossimImageCacheTileSource::getMinPixelValue(ossim_uint32 band)const
-{
-   if (ossim::isnan(m_minPixelValue))
-   {
-      return ossimImageHandler::getMinPixelValue(band);
-   }
-   return m_minPixelValue;
-}
-
-double ossimImageCacheTileSource::getMaxPixelValue(ossim_uint32 band)const
-{
-   if (ossim::isnan(m_maxPixelValue))
-   {
-      return ossimImageHandler::getMaxPixelValue(band);
-   }
-   return m_maxPixelValue;
-}
-
-double ossimImageCacheTileSource::getNullPixelValue(ossim_uint32 band)const
-{
-   if (ossim::isnan(m_nullPixelValue))
-   {
-      return ossimImageHandler::getNullPixelValue(band);
-   }
-   return m_nullPixelValue;
-}
-
-ossim_uint32 ossimImageCacheTileSource::getNumberOfInputBands()const
-{
-   if (m_imageHandler.valid())
-   {
-      return m_imageHandler->getNumberOfInputBands();
-   }
-   return m_numberOfBands;
-}
-
-ossim_uint32 ossimImageCacheTileSource::getNumberOfOutputBands()const
-{
-   if (m_imageHandler.valid())
-   {
-      return m_imageHandler->getNumberOfInputBands();
-   }
-   return m_numberOfBands;
-}
diff --git a/src/ossim/imaging/ossimImageChain.cpp b/src/ossim/imaging/ossimImageChain.cpp
deleted file mode 100644
index 83552bb..0000000
--- a/src/ossim/imaging/ossimImageChain.cpp
+++ /dev/null
@@ -1,1833 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimImageChain.cpp 21850 2012-10-21 20:09:55Z dburken $
-
-#include <ossim/imaging/ossimImageChain.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimConnectableContainer.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimObjectFactoryRegistry.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimEventIds.h>
-#include <ossim/base/ossimObjectEvents.h>
-#include <ossim/base/ossimIdManager.h>
-#include <ossim/base/ossimVisitor.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <algorithm>
-#include <iostream>
-#include <iterator>
-
-static ossimTrace traceDebug("ossimImageChain");
-
-
-RTTI_DEF3(ossimImageChain, "ossimImageChain", ossimImageSource,
-          ossimConnectableObjectListener, ossimConnectableContainerInterface);
-
-void ossimImageChain::processEvent(ossimEvent& event)
-{
-   ossimConnectableObjectListener::processEvent(event);
-   ossimConnectableObject* obj = PTR_CAST(ossimConnectableObject, event.getCurrentObject());
-   
-   if((ossimConnectableObject*)getFirstSource() == obj)
-   {
-      if(event.isPropagatingToOutputs())
-      {
-         ossimConnectableObject::ConnectableObjectList& outputList = getOutputList();
-         ossim_uint32 idx = 0;
-         for(idx = 0; idx < outputList.size();++idx)
-         {
-            if(outputList[idx].valid())
-            {
-               outputList[idx]->fireEvent(event);
-               outputList[idx]->propagateEventToOutputs(event);
-            }
-         }
-      }
-   }
-}
-
-ossimImageChain::ossimImageChain()
-:ossimImageSource(0,
-                  0, // number of inputs
-                  0, // number of outputs
-                  false, // input's fixed
-                  false), // outputs are not fixed
-    ossimConnectableContainerInterface((ossimObject*)NULL),
-    theBlankTile(NULL),
-    theLoadStateFlag(false)
-{
-   ossimConnectableContainerInterface::theBaseObject = this;
-   //thePropagateEventFlag = false;
-   addListener((ossimConnectableObjectListener*)this);
-}
-
-ossimImageChain::~ossimImageChain()
-{
-   removeListener((ossimConnectableObjectListener*)this);
-   deleteList();
-}
-
-bool ossimImageChain::addFirst(ossimConnectableObject* obj)
-{
-   ossimConnectableObject* rightOfThisObj =
-      (ossimConnectableObject*)getFirstObject();
-
-   return insertRight(obj, rightOfThisObj);
-}
-
-bool ossimImageChain::addLast(ossimConnectableObject* obj)
-{
-   if(imageChainList().size() > 0)
-   {
-      ossimConnectableObject* lastSource = imageChainList()[ imageChainList().size() -1].get();
-//      if(dynamic_cast<ossimImageSource*>(obj)&&lastSource)
-      if(lastSource)
-      {
-//         obj->disconnect();
-         ossimConnectableObject::ConnectableObjectList tempIn = getInputList();
-         lastSource->disconnectAllInputs();
-         lastSource->connectMyInputTo(obj);
-         obj->changeOwner(this);
-         obj->connectInputList(tempIn);
-
-         tempIn = obj->getInputList();
-         theInputListIsFixedFlag = obj->getInputListIsFixedFlag();
-         setNumberOfInputs(obj->getNumberOfInputs());
-         imageChainList().push_back(obj);
-         
-         obj->addListener((ossimConnectableObjectListener*)this);
-         // Send an event to any listeners.
-         ossimContainerEvent event((ossimObject*)this,
-                                   OSSIM_EVENT_ADD_OBJECT_ID);
-         event.setObjectList(obj);
-         fireEvent(event);
-         return true;
-      }
-   }
-   else
-   {
-      return add(obj);
-   }
-
-   return false;;
-}
-
-ossimImageSource* ossimImageChain::getFirstSource()
-{
-   if(imageChainList().size()>0)
-   {
-      return dynamic_cast<ossimImageSource*>(imageChainList()[0].get());
-   }
-
-   return 0;
-}
-
-const ossimImageSource* ossimImageChain::getFirstSource() const
-{
-   if(imageChainList().size()>0)
-      return dynamic_cast<const ossimImageSource*>(imageChainList()[0].get());
-
-   return 0;
-}
-
-ossimObject* ossimImageChain::getFirstObject()
-{
-   if(imageChainList().size()>0)
-   {
-      return dynamic_cast<ossimImageSource*>(imageChainList()[0].get());
-   }
-
-   return 0;
-}
-
-ossimImageSource* ossimImageChain::getLastSource()
-{
-   if(imageChainList().size()>0)
-   {
-      return dynamic_cast<ossimImageSource*>((*(imageChainList().end()-1)).get());
-   }
-
-   return NULL;
-}
-
-const ossimImageSource* ossimImageChain::getLastSource() const
-{
-   if(imageChainList().size()>0)
-      return dynamic_cast<const ossimImageSource*>((*(imageChainList().end()-1)).get());
-
-   return NULL;
-}
-
-ossimObject* ossimImageChain::getLastObject()
-{
-   if(imageChainList().size()>0)
-   {
-      return dynamic_cast<ossimImageSource*>((*(imageChainList().end()-1)).get());
-   }
-
-   return 0;
-}
-
-ossimConnectableObject* ossimImageChain::findObject(const ossimId& id,
-                                                    bool /* recurse */)
-{
-   std::vector<ossimRefPtr<ossimConnectableObject> >::iterator current =  imageChainList().begin();
-   
-   while(current != imageChainList().end())
-   {
-      if((*current).get())
-      {
-         if(id == (*current)->getId())
-         {
-            return (*current).get();
-         }
-      }
-      
-      ++current;
-   }
-   
-   current =  imageChainList().begin();
-   
-   while(current != imageChainList().end())
-   {
-      ossimConnectableContainerInterface* child=PTR_CAST(ossimConnectableContainerInterface,
-                                                         (*current).get());
-      
-      if(child)
-      {
-         ossimConnectableObject* object = child->findObject(id, true);
-
-         if(object) return object;
-      }
-      ++current;
-   }
-   
-   return NULL;
-}
-
-ossimConnectableObject* ossimImageChain::findObject(const ossimConnectableObject* obj,
-                                                    bool /* recurse */)
-{
-   std::vector<ossimRefPtr<ossimConnectableObject> >::iterator current =  imageChainList().begin();
-   
-   while(current != imageChainList().end())
-   {
-      if((*current).valid())
-      {
-         if(obj == (*current).get())
-         {
-            return (*current).get();
-         }
-      }
-      
-      ++current;
-   }
-   
-   current =  imageChainList().begin();
-   
-   while(current != imageChainList().end())
-   {
-      ossimConnectableContainerInterface* child=PTR_CAST(ossimConnectableContainerInterface, (*current).get());
-      
-      if(child)
-      {
-         ossimConnectableObject* object = child->findObject(obj, true);
-
-         if(object) return object;
-      }
-      ++current;
-   }
-   
-   return 0;
-}
-
-ossimConnectableObject* ossimImageChain::findFirstObjectOfType(const RTTItypeid& typeInfo,
-                                                               bool recurse)
-{
-   vector<ossimRefPtr<ossimConnectableObject> >::iterator current =  imageChainList().begin();
-   
-   while(current != imageChainList().end())
-   {
-      if((*current).valid()&&
-         (*current)->canCastTo(typeInfo))
-      {
-         return (*current).get();
-      }
-      ++current;
-   }
-
-   if(recurse)
-   {
-      current =  imageChainList().begin();
-      while(current != imageChainList().end())
-      {
-         ossimConnectableContainerInterface* child=PTR_CAST(ossimConnectableContainerInterface, 
-                                                            (*current).get());
-         
-         if(child)
-         {
-            ossimConnectableObject* temp = child->findFirstObjectOfType(typeInfo, recurse);
-            if(temp)
-            {
-               return temp;
-            }
-         }
-         ++current;
-      }
-   }
-   
-   return (ossimConnectableObject*)NULL;   
-}
-
-ossimConnectableObject* ossimImageChain::findFirstObjectOfType(const ossimString& className,
-                                                               bool recurse)
-{
-   vector<ossimRefPtr<ossimConnectableObject> >::iterator current =  imageChainList().begin();
-   
-   while(current != imageChainList().end())
-   {
-      if((*current).valid()&&
-         (*current)->canCastTo(className) )
-      {
-         return (*current).get();
-      }
-      ++current;
-   }
-
-   if(recurse)
-   {
-      current =  imageChainList().begin();
-      while(current != imageChainList().end())
-      {
-         ossimConnectableContainerInterface* child=PTR_CAST(ossimConnectableContainerInterface, (*current).get());
-         
-         if(child)
-         {
-            ossimConnectableObject* temp = child->findFirstObjectOfType(className, recurse);
-            if(temp)
-            {
-               return temp;
-            }
-         }
-         ++current;
-      }
-   }
-   
-   return (ossimConnectableObject*)0;   
-}
-
-ossimConnectableObject::ConnectableObjectList ossimImageChain::findAllObjectsOfType(const RTTItypeid& typeInfo,
-                                                                           bool recurse)
-{
-   ossimConnectableObject::ConnectableObjectList result;
-   ossimConnectableObject::ConnectableObjectList::iterator current =  imageChainList().begin();
-   
-   while(current != imageChainList().end())
-   {
-      if((*current).valid()&&
-         (*current)->canCastTo(typeInfo))
-      {
-         ossimConnectableObject::ConnectableObjectList::iterator iter = std::find(result.begin(), 
-                                                                                      result.end(), 
-                                                                                      (*current).get());
-         if(iter == result.end())
-         {
-            result.push_back((*current).get());
-         }
-      }
-      ++current;
-   }
-
-   if(recurse)
-   {
-      current =  imageChainList().begin();
-      while(current != imageChainList().end())
-      {
-         ossimConnectableContainerInterface* child=PTR_CAST(ossimConnectableContainerInterface, (*current).get());
-         
-         if(child)
-         {
-            ossimConnectableObject::ConnectableObjectList temp;
-            temp = child->findAllObjectsOfType(typeInfo, recurse);
-            for(long index=0; index < (long)temp.size();++index)
-            {
-               ossimConnectableObject::ConnectableObjectList::iterator iter = std::find(result.begin(), result.end(), temp[index]);
-               if(iter == result.end())
-               {
-                  result.push_back(temp[index]);
-               }
-            }
-         }
-         ++current;
-      }
-   }
-   
-   return result;
-   
-}
-
-ossimConnectableObject::ConnectableObjectList ossimImageChain::findAllObjectsOfType(const ossimString& className,
-                                                                           bool recurse)
-{
-   ossimConnectableObject::ConnectableObjectList result;
-   ossimConnectableObject::ConnectableObjectList::iterator current =  imageChainList().begin();
-   
-   while(current != imageChainList().end())
-   {
-      if((*current).valid()&&
-         (*current)->canCastTo(className))
-      {
-         ossimConnectableObject::ConnectableObjectList::iterator iter = std::find(result.begin(), 
-                                                                         result.end(), 
-                                                                         (*current).get());
-         if(iter == result.end())
-         {
-            result.push_back((*current).get());
-         }
-      }
-      ++current;
-   }
-
-   if(recurse)
-   {
-      current =  imageChainList().begin();
-      while(current != imageChainList().end())
-      {
-         ossimConnectableContainerInterface* child=PTR_CAST(ossimConnectableContainerInterface, (*current).get());
-         
-         if(child)
-         {
-            ossimConnectableObject::ConnectableObjectList temp;
-            temp = child->findAllObjectsOfType(className, recurse);
-            for(long index=0; index < (long)temp.size();++index)
-            {
-               ossimConnectableObject::ConnectableObjectList::iterator iter = std::find(result.begin(), result.end(), temp[index]);
-               if(iter == result.end())
-               {
-                  result.push_back(temp[index]);
-               }
-            }
-         }
-         ++current;
-      }
-   }
-   
-   return result;
-   
-}
-
-void ossimImageChain::makeUniqueIds()
-{
-   setId(ossimIdManager::instance()->generateId());
-   for(long index = 0; index < (long)imageChainList().size(); ++index)
-   {
-      ossimConnectableContainerInterface* container = PTR_CAST(ossimConnectableContainerInterface,
-                                                               imageChainList()[index].get());
-      if(container)
-      {
-         container->makeUniqueIds();
-      }
-      else
-      {
-         if(imageChainList()[index].valid())
-         {
-            imageChainList()[index]->setId(ossimIdManager::instance()->generateId());
-         }
-      }
-   }
-}
-
-ossim_uint32 ossimImageChain::getNumberOfObjects(bool recurse)const
-{
-   ossim_uint32 result = (ossim_uint32)imageChainList().size();
-   
-   if(recurse)
-   {
-      for(ossim_uint32 i = 0; i < imageChainList().size(); ++i)
-      {
-         ossimConnectableContainerInterface* child=PTR_CAST(ossimConnectableContainerInterface, imageChainList()[i].get());
-         if(child)
-         {
-            result += child->getNumberOfObjects(true);
-         }
-      }
-   }
-   
-   return result;   
-}
-
-ossim_uint32 ossimImageChain::getNumberOfSources() const
-{
-   ossimNotify(ossimNotifyLevel_NOTICE)
-      << "ossimImageChain::getNumberOfSources is deprecated!"
-      << "\nUse: ossimImageChain::getNumberOfObjects(false)"
-      << std::endl;
-   return getNumberOfObjects(false);
-}
-
-bool ossimImageChain::addChild(ossimConnectableObject* object)
-{
-   return add(object);
-}
-
-bool ossimImageChain::removeChild(ossimConnectableObject* object)
-{
-   bool result = false;
-   vector<ossimRefPtr<ossimConnectableObject> >::iterator current =  std::find(imageChainList().begin(), imageChainList().end(), object);
-   
-   
-   if(current!=imageChainList().end())
-   {
-      result = true;
-      object->removeListener((ossimConnectableObjectListener*)this);
-      if(current == imageChainList().begin())
-      {
-         object->removeListener((ossimConnectableObjectListener*)this);
-      }
-      if(imageChainList().size() == 1)
-      {
-         object->changeOwner(0);
-         current = imageChainList().erase(current);
-      }
-      else 
-      {
-         ossimConnectableObject::ConnectableObjectList input  = object->getInputList();
-         ossimConnectableObject::ConnectableObjectList output = object->getOutputList();
-         object->changeOwner(0);// set the owner to 0
-         bool erasingBeginning = (current == imageChainList().begin());
-         // bool erasingEnd = (current+1) == imageChainList().end();
-         current = imageChainList().erase(current);
-         object->disconnect();
-         
-         if(!imageChainList().empty())
-         {
-            if(erasingBeginning) // the one that receives the first getTile
-            {
-               (*imageChainList().begin())->addListener(this);
-            }
-            
-            else if(current==imageChainList().end()) // one that receives the last getTIle
-            {
-               current = imageChainList().begin()+(imageChainList().size()-1);
-               (*current)->connectInputList(input);
-               theInputObjectList = (*current)->getInputList();
-               theInputListIsFixedFlag = (*current)->getInputListIsFixedFlag();
-            }
-            else
-            {
-               // prepare interior setup and removal and connect surrounding nodes
-               // take the  outputs of the node we are removing and connect them to the old inputs 
-               ossim_uint32 outIndex = 0;
-               for(outIndex = 0; outIndex < output.size();++outIndex)
-               {
-                  output[outIndex]->connectInputList(input);
-               }
-            }
-         }
-      }
-
-      // Send an event to any listeners.
-      ossimContainerEvent event((ossimObject*)this,
-                                OSSIM_EVENT_REMOVE_OBJECT_ID);
-      event.setObjectList(object);
-      fireEvent(event);
-   }
-   
-   return result;
-}
-
-ossimConnectableObject* ossimImageChain::removeChild(const ossimId& id)
-{
-   ossimIdVisitor visitor( id,
-                           (ossimVisitor::VISIT_CHILDREN|ossimVisitor::VISIT_INPUTS ) );
-   accept( visitor );
-   ossimConnectableObject* obj = visitor.getObject();
-   if ( obj )
-   {
-      removeChild(obj);
-   }
-   return obj;
-}
-
-void ossimImageChain::getChildren(vector<ossimConnectableObject*>& children,
-                                  bool immediateChildrenOnlyFlag)
-{
-   ossim_uint32 i = 0;
-   
-   vector<ossimConnectableObject*> temp;
-   for(i = 0; i < imageChainList().size();++i)
-   {
-      temp.push_back(imageChainList()[i].get());
-   }
-
-   for(i = 0; i < temp.size();++i)
-   {
-      ossimConnectableContainerInterface* interface = PTR_CAST(ossimConnectableContainerInterface,
-                                                               temp[i]);
-      if(immediateChildrenOnlyFlag)
-      {
-         children.push_back(temp[i]);
-      }
-      else if(!interface)
-      {
-         children.push_back(temp[i]);         
-      }
-   }
-   
-   if(!immediateChildrenOnlyFlag)
-   {
-      for(i = 0; i < temp.size();++i)
-      {
-         ossimConnectableContainerInterface* interface = PTR_CAST(ossimConnectableContainerInterface,
-                                                                  temp[i]);
-         if(interface)
-         {
-            interface->getChildren(children, false);
-         }
-      }
-   }
-}
-
-bool ossimImageChain::add(ossimConnectableObject* source)
-{
-   bool result = false;
-//   if(PTR_CAST(ossimImageSource, source))
-   {
-     source->changeOwner(this);
-     if(imageChainList().size() > 0)
-     {
-        source->disconnectAllOutputs();
-        theOutputListIsFixedFlag = source->getOutputListIsFixedFlag();
-        imageChainList()[0]->removeListener(this);
-        imageChainList().insert(imageChainList().begin(), source);
-        imageChainList()[0]->addListener(this);
-        source->addListener((ossimConnectableObjectListener*)this);
-        imageChainList()[0]->connectMyInputTo(imageChainList()[1].get());
-        result = true;
-     }
-     else
-     {
-        theInputListIsFixedFlag = false;
-        theOutputListIsFixedFlag = false;
-        
-        if(!theInputObjectList.empty())
-        {
-           source->connectInputList(getInputList());
-        }
-        theInputObjectList = source->getInputList();
-        theInputListIsFixedFlag = source->getInputListIsFixedFlag();
-     //   theOutputObjectList     = source->getOutputList();
-     //   theOutputListIsFixedFlag= source->getOutputListIsFixedFlag();
-        imageChainList().push_back(source);
-        source->addListener((ossimConnectableObjectListener*)this);
-        source->addListener(this);
-        result = true;
-     }
-   }
-
-   if (result && source)
-   {
-      ossimContainerEvent event(this, OSSIM_EVENT_ADD_OBJECT_ID);
-      event.setObjectList(source);
-      fireEvent(event);
-   }
-   
-   return result;
-}
-
-bool ossimImageChain::insertRight(ossimConnectableObject* newObj,
-                                  ossimConnectableObject* rightOfThisObj)
-{
-   if(!newObj&&!rightOfThisObj) return false;
-   if(!imageChainList().size())
-   {
-      return add(newObj);
-   }
-   std::vector<ossimRefPtr<ossimConnectableObject> >::iterator iter = std::find(imageChainList().begin(), imageChainList().end(), rightOfThisObj);
-   
-   if(iter!=imageChainList().end())
-   {
-      if(iter == imageChainList().begin())
-      {
-         return add(newObj);
-      }
-      else //if(PTR_CAST(ossimImageSource, newObj))
-      {
-         ossimConnectableObject::ConnectableObjectList outputList = rightOfThisObj->getOutputList();
-         rightOfThisObj->disconnectAllOutputs();
-
-         // Core dump fix.  Connect input prior to outputs. (drb)
-         newObj->connectMyInputTo(rightOfThisObj); 
-         newObj->connectOutputList(outputList);
-         newObj->changeOwner(this);
-         newObj->addListener((ossimConnectableObjectListener*)this);
-         imageChainList().insert(iter, newObj);
-         // Send event to any listeners.
-         ossimContainerEvent event(this, OSSIM_EVENT_ADD_OBJECT_ID);
-         event.setObjectList(newObj);
-         fireEvent(event);
-         return true;
-      }
-   }
-
-   return false;
-}
-
-bool ossimImageChain::insertRight(ossimConnectableObject* newObj,
-                                  const ossimId& id)
-{
-
-#if 1
-   ossimIdVisitor visitor( id, ossimVisitor::VISIT_CHILDREN );
-   accept( visitor );
-   ossimConnectableObject* obj = visitor.getObject();
-   if ( obj )
-   {
-      return insertRight(newObj, obj);
-   }
-   return false;
-#else
-   ossimConnectableObject* obj = findObject(id, false);
-   if(obj)
-   {
-      return insertRight(newObj, obj);
-   }
-
-   return false;
-#endif
-}
-
-bool ossimImageChain::insertLeft(ossimConnectableObject* newObj,
-                                 ossimConnectableObject* leftOfThisObj)
-{
-   if(!newObj&&!leftOfThisObj) return false;
-   if(!imageChainList().size())
-   {
-      return add(newObj);
-   }
-   std::vector<ossimRefPtr<ossimConnectableObject> >::iterator iter = std::find(imageChainList().begin(), imageChainList().end(), leftOfThisObj);
-   if(iter!=imageChainList().end())
-   {
-      if((iter+1)==imageChainList().end())
-      {
-         return addLast(newObj);
-      }
-      else
-      {
-         ossimConnectableObject::ConnectableObjectList inputList = leftOfThisObj->getInputList();
-         
-         newObj->connectInputList(inputList);
-         
-         leftOfThisObj->disconnectAllInputs();
-         leftOfThisObj->connectMyInputTo(newObj);
-         newObj->changeOwner(this);
-         newObj->addListener((ossimConnectableObjectListener*)this);
-         imageChainList().insert(iter+1, newObj);
-         // Send an event to any listeners.
-         ossimContainerEvent event(this, OSSIM_EVENT_ADD_OBJECT_ID);
-         event.setObjectList(newObj);
-         fireEvent(event);
-         return true;
-      }
-   }
-
-   return false;
-}
-
-bool ossimImageChain::insertLeft(ossimConnectableObject* newObj,
-                                 const ossimId& id)
-{
-#if 1
-   ossimIdVisitor visitor( id,
-                           ossimVisitor::VISIT_CHILDREN|ossimVisitor::VISIT_INPUTS);
-   accept( visitor );
-   ossimConnectableObject* obj = visitor.getObject();
-   if ( obj )
-   {
-      return insertLeft(newObj, obj);
-   }
-   return false;
-#else
-   ossimConnectableObject* obj = findObject(id, false);
-   if(obj)
-   {
-      return insertLeft(newObj, obj);
-   }
-   return false;
-#endif   
-}
-
-bool ossimImageChain::replace(ossimConnectableObject* newObj,
-                              ossimConnectableObject* oldObj)
-{
-   ossim_int32 idx = indexOf(oldObj);
-   if(idx >= 0)
-   {
-      ossimConnectableObject::ConnectableObjectList& inputList  = oldObj->getInputList();
-      ossimConnectableObject::ConnectableObjectList& outputList = oldObj->getOutputList();
-      oldObj->removeListener((ossimConnectableObjectListener*)this);
-      oldObj->removeListener(this);
-      oldObj->changeOwner(0);
-      imageChainList()[idx] = newObj;
-      newObj->connectInputList(inputList);
-      newObj->connectOutputList(outputList);
-      newObj->changeOwner(this);
-      newObj->addListener((ossimConnectableObjectListener*)this);
-      if(idx == 0)
-      {
-         newObj->addListener(this);
-      }
-   }
-   
-   return (idx >= 0);
-}
-
-ossimRefPtr<ossimImageData> ossimImageChain::getTile(
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   if((imageChainList().size() > 0)&&(isSourceEnabled()))
-   {
-      ossimImageSource* inputSource = PTR_CAST(ossimImageSource,
-                                             imageChainList()[0].get());
-      
-      if(inputSource)
-      {
-         // make sure we initialize in reverse order.
-         // some source may depend on the initialization of
-         // its inputs
-         return inputSource->getTile(tileRect, resLevel);
-      }  
-   }
-   else
-   {
-      if(getInput(0))
-      {
-         ossimImageSource* inputSource = PTR_CAST(ossimImageSource, getInput(0));
-         if(inputSource)
-         {
-            ossimRefPtr<ossimImageData> inputTile = inputSource->getTile(tileRect, resLevel);
-//            if(inputTile.valid())
-//            {
-//               std::cout << *(inputTile.get()) << std::endl;
-//            }
-            return inputTile.get();
-         }
-      }
-   }
-//   std::cout << "RETURNING A BLANK TILE!!!!" << std::endl;
-/*
-   if(theBlankTile.get())
-   {
-      theBlankTile->setImageRectangle(tileRect);
-   }
-   return theBlankTile;
- */
-   return 0;
-}
-
-ossim_uint32 ossimImageChain::getNumberOfInputBands() const
-{
-   if((imageChainList().size() > 0)&&(isSourceEnabled()))
-   {
-      ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                      imageChainList()[0].get());
-      if(interface)
-      {
-         return interface->getNumberOfOutputBands();
-      }
-   }
-   else
-   {
-      if(getInput(0))
-      {
-         ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                         getInput(0));
-         if(interface)
-         {
-            return interface->getNumberOfOutputBands();
-         }
-      }
-   }
-
-   return 0;
-}
-
-double ossimImageChain::getNullPixelValue(ossim_uint32 band)const
-{
-   if((imageChainList().size() > 0)&&(isSourceEnabled()))
-   {
-      ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                      imageChainList()[0].get());
-      if(interface)
-      {
-         return interface->getNullPixelValue(band);
-      }
-   }
-   else
-   {
-      if(getInput(0))
-      {
-         ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                         getInput(0));
-         if(interface)
-         {
-            return interface->getNullPixelValue(band);
-         }
-      }
-   }
-   
-   return ossim::defaultNull(getOutputScalarType());
-}
-
-double ossimImageChain::getMinPixelValue(ossim_uint32 band)const
-{
-   if((imageChainList().size() > 0)&&(isSourceEnabled()))
-   {
-      ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                      imageChainList()[0].get());
-      if(interface)
-      {
-         return interface->getMinPixelValue(band);
-      }
-   }
-   else
-   {
-      if(getInput(0))
-      {
-         ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                         getInput(0));
-         if(interface)
-         {
-            return interface->getMinPixelValue(band);
-         }
-      }
-   }
-
-   return ossim::defaultMin(getOutputScalarType());
-}
-
-double ossimImageChain::getMaxPixelValue(ossim_uint32 band)const
-{
-   if((imageChainList().size() > 0)&&(isSourceEnabled()))
-   {
-      ossimImageSource* inter = PTR_CAST(ossimImageSource,
-                                                  imageChainList()[0].get());
-      if(inter)
-      {
-         return inter->getMaxPixelValue(band);
-      }
-   }
-   else
-   {
-      if(getInput(0))
-      {
-         ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                         getInput(0));
-         if(interface)
-         {
-            return interface->getMaxPixelValue(band);
-         }
-      }
-   }
-
-   return ossim::defaultMax(getOutputScalarType());
-}
-
-void ossimImageChain::getOutputBandList(std::vector<ossim_uint32>& bandList) const
-{
-   if( (imageChainList().size() > 0) && isSourceEnabled() )
-   {
-      ossimRefPtr<const ossimImageSource> inter =
-         dynamic_cast<const ossimImageSource*>( imageChainList()[0].get() );
-      if( inter.valid() )
-      {
-         // cout << "cn: " << inter->getClassName() << endl;
-         inter->getOutputBandList(bandList);
-      }
-   }
-}
-   
-ossimScalarType ossimImageChain::getOutputScalarType() const
-{
-   if((imageChainList().size() > 0)&&(isSourceEnabled()))
-   {
-      ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                      imageChainList()[0].get());
-      if(interface)
-      {
-         return interface->getOutputScalarType();
-      }
-   }
-   else
-   {
-      if(getInput(0))
-      {
-         ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                         getInput(0));
-         if(interface)
-         {
-            return interface->getOutputScalarType();
-         }
-      }
-   }
-   
-   return OSSIM_SCALAR_UNKNOWN;
-}
-
-ossim_uint32 ossimImageChain::getTileWidth()const
-{
-   if((imageChainList().size() > 0)&&(isSourceEnabled()))
-   {
-         ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                         imageChainList()[0].get());
-         if(interface)
-         {
-            return interface->getTileWidth();;
-         }
-   }
-   else
-   {
-      if(getInput(0))
-      {
-         ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                         getInput(0));
-         if(interface)
-         {
-            return interface->getTileWidth();
-         }
-      }
-   }
-   
-   return 0;   
-}
-
-ossim_uint32 ossimImageChain::getTileHeight()const
-{
-   if((imageChainList().size() > 0)&&(isSourceEnabled()))
-   {
-         ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                         imageChainList()[0].get());
-         if(interface)
-         {
-            return interface->getTileHeight();
-         }
-   }
-   else
-   {
-      if(getInput(0))
-      {
-         ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                         getInput(0));
-         if(interface)
-         {
-            return interface->getTileHeight();
-         }
-      }
-   }
-   
-   return 0;   
-}
-   
-ossimIrect ossimImageChain::getBoundingRect(ossim_uint32 resLevel)const
-{
-   if((imageChainList().size() > 0)&&(isSourceEnabled()))
-   {
-
-      ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                      imageChainList()[0].get());
-
-      if(interface)
-      {
-         return interface->getBoundingRect(resLevel);
-      }
-   }
-   else
-   {
-      if(getInput(0))
-      {
-         ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                         getInput(0));
-         if(interface)
-         {
-            return interface->getBoundingRect();
-         }
-      }
-   }
-   ossimDrect rect;
-   rect.makeNan();
-   
-   return rect;
-   
-}
-
-void ossimImageChain::getValidImageVertices(vector<ossimIpt>& validVertices,
-                                            ossimVertexOrdering ordering,
-                                            ossim_uint32 resLevel)const
-{
-   if((imageChainList().size() > 0)&&(isSourceEnabled()))
-   {
-      ossimImageSource* interface =PTR_CAST(ossimImageSource,
-                                                     imageChainList()[0].get());
-
-      if(interface)
-      {
-         interface->getValidImageVertices(validVertices,
-                                          ordering,
-                                          resLevel);
-      }
-   }
-   else
-   {
-      if(getInput(0))
-      {
-         ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                         getInput(0));
-         if(interface)
-         {
-            interface->getValidImageVertices(validVertices,
-                                             ordering,
-                                             resLevel);
-         }
-      }
-   }
-}
-
-ossimRefPtr<ossimImageGeometry> ossimImageChain::getImageGeometry()
-{
-   if((imageChainList().size() > 0)&&(isSourceEnabled()))
-   {
-      ossimImageSource* interface = PTR_CAST(ossimImageSource, imageChainList()[0].get());
-      if( interface )
-      {
-         return interface->getImageGeometry();
-      }
-   }
-   else
-   {
-      if(getInput(0))
-      {
-         ossimImageSource* interface = PTR_CAST(ossimImageSource, getInput(0));
-         if(interface)
-         {
-            return interface->getImageGeometry();
-         }
-      }
-   }
-   return ossimRefPtr<ossimImageGeometry>();
-}
-
-void ossimImageChain::getDecimationFactor(ossim_uint32 resLevel,
-                                          ossimDpt& result) const
-{
-   if((imageChainList().size() > 0)&&(isSourceEnabled()))
-   {
-      ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                      imageChainList()[0].get());
-      if(interface)
-      {
-         interface->getDecimationFactor(resLevel,
-                                        result);
-         return;
-      }
-   }
-   else
-   {
-      if(getInput(0))
-      {
-         ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                         getInput(0));
-         if(interface)
-         {
-            interface->getDecimationFactor(resLevel, result);
-            return;
-         }
-      }
-   }
-
-   result.makeNan();
-}
-
-void ossimImageChain::getDecimationFactors(vector<ossimDpt>& decimations) const
-{
-   if((imageChainList().size() > 0)&&(isSourceEnabled()))
-   {
-      ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                      imageChainList()[0].get());
-      if(interface)
-      {
-         interface->getDecimationFactors(decimations);
-      }
-   }
-   else
-   {
-      if(getInput(0))
-      {
-         ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                         getInput(0));
-         if(interface)
-         {
-            interface->getDecimationFactors(decimations);
-            return;
-         }
-      }
-   }
-}
-
-ossim_uint32 ossimImageChain::getNumberOfDecimationLevels()const
-{
-   if((imageChainList().size() > 0)&&(isSourceEnabled()))
-   {
-      ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                      imageChainList()[0].get());
-
-      if(interface)
-      {
-         return interface->getNumberOfDecimationLevels();
-      }
-   }
-   else
-   {
-      if(getInput(0))
-      {
-         ossimImageSource* interface = PTR_CAST(ossimImageSource,
-                                                         getInput(0));
-         if(interface)
-         {
-            return interface->getNumberOfDecimationLevels();
-         }
-      }
-   }
-
-   return 1;
-}
-
-bool ossimImageChain::addAllSources(map<ossimId, vector<ossimId> >& idMapping,
-                                    const ossimKeywordlist& kwl,
-                                    const char* prefix)
-{
-   static const char* MODULE = "ossimImageChain::addAllSources";
-   ossimString copyPrefix = prefix;
-   bool result =  ossimImageSource::loadState(kwl, copyPrefix.c_str());
-
-   if(!result)
-   {
-      return result;
-   }
-   long index = 0;
-
-//   ossimSource* source = NULL;
-
-   vector<ossimId> inputConnectionIds;
-   ossimString regExpression =  ossimString("^(") + copyPrefix + "object[0-9]+.)";
-   vector<ossimString> keys =
-      kwl.getSubstringKeyList( regExpression );
-   long numberOfSources = (long)keys.size();//kwl.getNumberOfSubstringKeys(regExpression);
-
-   int offset = (int)(copyPrefix+"object").size();
-   int idx = 0;
-   std::vector<int> theNumberList(numberOfSources);
-   for(idx = 0; idx < (int)theNumberList.size();++idx)
-     {
-       ossimString numberStr(keys[idx].begin() + offset,
-			     keys[idx].end());
-       theNumberList[idx] = numberStr.toInt();
-     }
-   std::sort(theNumberList.begin(), theNumberList.end());
-   for(idx=0;idx < (int)theNumberList.size();++idx)
-   {
-      ossimString newPrefix = copyPrefix;
-      newPrefix += ossimString("object");
-      newPrefix += ossimString::toString(theNumberList[idx]);
-      newPrefix += ossimString(".");
-
-      if(traceDebug())
-      {
-         CLOG << "trying to create source with prefix: " << newPrefix
-              << std::endl;
-      }
-      ossimRefPtr<ossimObject> object = ossimObjectFactoryRegistry::instance()->createObject(kwl,
-                                                                                 newPrefix.c_str());
-      ossimConnectableObject* source = PTR_CAST(ossimConnectableObject, object.get());
-      
-      if(source)
-      {
-         // we did find a source so include it in the count
-         if(traceDebug())
-         {
-            CLOG << "Created source with prefix: " << newPrefix << std::endl;
-         }
-         //if(PTR_CAST(ossimImageSource, source))
-         {
-            ossimId id = source->getId();
-            inputConnectionIds.clear();
-            
-            findInputConnectionIds(inputConnectionIds,
-                                   kwl,
-                                   newPrefix);
-            if(inputConnectionIds.size() == 0)
-            {
-               // we will try to do a default connection
-               //
-               
-               if(imageChainList().size())
-               {
-                  if(traceDebug())
-                  {
-                     CLOG << "connecting " << source->getClassName() << " to "
-                          << imageChainList()[0]->getClassName() << std::endl;
-                  }
-                  source->connectMyInputTo(0, imageChainList()[0].get());
-               }
-            }
-            else
-            {
-               // we remember the connection id's so we can connect this later.
-               // this way we make sure all sources were actually
-               // allocated.
-               //
-               idMapping.insert(std::make_pair(id, inputConnectionIds));
-            }
-            add(source);
-         }
-      //   else
-      //   {
-            source = 0;
-      //   }
-      }
-      else
-      {
-         object = 0;
-         source = 0;
-      }
-      
-      ++index;
-   }
-   if(imageChainList().size())
-   {
-     ossimConnectableObject* obj = imageChainList()[(ossim_int32)imageChainList().size()-1].get();
-     if(obj)
-     {
-        setNumberOfInputs(obj->getNumberOfInputs());
-     }
-   }
-   
-   return result;
-}
-
-void ossimImageChain::findInputConnectionIds(vector<ossimId>& result,
-                                             const ossimKeywordlist& kwl,
-                                             const char* prefix)
-{
-   ossimString copyPrefix = prefix;
-   ossim_uint32 idx = 0;
-   
-   ossimString regExpression =  ossimString("^") + ossimString(prefix) + "input_connection[0-9]+";
-   vector<ossimString> keys =
-      kwl.getSubstringKeyList( regExpression );
-   
-   ossim_int32 offset = (ossim_int32)(copyPrefix+"input_connection").size();
-   ossim_uint32 numberOfKeys = (ossim_uint32)keys.size();
-   std::vector<int> theNumberList(numberOfKeys);
-   for(idx = 0; idx < theNumberList.size();++idx)
-   {
-      ossimString numberStr(keys[idx].begin() + offset,
-                            keys[idx].end());
-      theNumberList[idx] = numberStr.toInt();
-   }
-   std::sort(theNumberList.begin(), theNumberList.end());
-   copyPrefix += ossimString("input_connection");
-   for(idx=0;idx < theNumberList.size();++idx)
-   {
-      const char* lookup = kwl.find(copyPrefix,ossimString::toString(theNumberList[idx]));
-      if(lookup)
-      {
-         long id = ossimString(lookup).toLong();
-         result.push_back(ossimId(id));
-      }
-   }
-}
-                    
-
-bool ossimImageChain::connectAllSources(const map<ossimId, vector<ossimId> >& idMapping)
-{
-   // cout << "this->getId(): " << this->getId() << endl;
-   
-   if(idMapping.size())
-   {
-      map<ossimId, vector<ossimId> >::const_iterator iter = idMapping.begin();
-
-      
-      while(iter != idMapping.end())
-      {
-         // cout << "(*iter).first): " << (*iter).first << endl;
-#if 0
-         ossimConnectableObject* currentSource = findObject((*iter).first);
-#else
-         ossimIdVisitor visitor( (*iter).first,
-                                 (ossimVisitor::VISIT_CHILDREN ) );
-                                  // ossimVisitor::VISIT_INPUTS ) );
-         accept( visitor );
-         ossimConnectableObject* currentSource = visitor.getObject();
-#endif
-
-         if(currentSource)
-         {
-            // cout << "currentSource->getClassName: " << currentSource->getClassName() << endl;
-            long upperBound = (long)(*iter).second.size();
-            for(long index = 0; index < upperBound; ++index)
-            {
-               //cout << "(*iter).second[index]: " << (*iter).second[index] << endl;
-               
-               if((*iter).second[index].getId() > -1)
-               {
-#if 0
-                  ossimConnectableObject* inputSource =
-                      PTR_CAST(ossimConnectableObject, findObject((*iter).second[index]));
-#else
-                  visitor.reset();
-                  visitor.setId( (*iter).second[index] );
-                  accept( visitor );
-                  ossimConnectableObject* inputSource = visitor.getObject();
-#endif
-                  // cout << "inputSource is " << (inputSource?"good...":"null...") << endl;
-                  if ( inputSource )
-                  {
-                     // cout << "inputSource->getClassName(): " << inputSource->getClassName() << endl;
- 
-                     // Check for connection to self.
-                     if ( this != inputSource )
-                     {
-                        currentSource->connectMyInputTo(index, inputSource);
-                     }
-                     // else warning???
-                  }
-               }
-               else // -1 id
-               {
-                  currentSource->disconnectMyInput((ossim_int32)index);
-               }
-            }
-         }
-         else
-         {
-            cerr << "Could not find " << (*iter).first << " for source: ";
-            return false;
-         }
-         ++iter;
-      }
-   }
-
-   // abort();
-   return true;
-}
-
-bool ossimImageChain::saveState(ossimKeywordlist& kwl,
-                                const char* prefix)const
-{
-   bool result = true;
-   
-   result = ossimImageSource::saveState(kwl, prefix);
-
-   if(!result)
-   {
-      return result;
-   }
-   ossim_uint32 upper = (ossim_uint32)imageChainList().size();
-   ossim_uint32 counter = 1;
-
-   if (upper)
-   {
-      ossim_int32 idx = upper-1;
-      // start with the tail and go to the head fo the list.
-      for(;((idx >= 0)&&result);--idx, ++counter)
-      {
-         ossimString newPrefix = prefix;
-         
-         newPrefix += (ossimString("object") +
-                       ossimString::toString(counter) +
-                       ossimString("."));
-         result = imageChainList()[idx]->saveState(kwl, newPrefix.c_str());
-      }
-   }
-
-   return result;
-}
-
-bool ossimImageChain::loadState(const ossimKeywordlist& kwl,
-                                const char* prefix)
-{
-   static const char* MODULE = "ossimImageChain::loadState(kwl, prefix)";
-   deleteList();
-
-   ossimImageSource::loadState(kwl, prefix);
-   
-   
-   theLoadStateFlag = true;
-   bool result = true;
-   
-   map<ossimId, vector<ossimId> > idMapping;
-   result = addAllSources(idMapping, kwl, prefix);
-   if(!result)
-   {
-      CLOG << "problems adding sources" << std::endl;
-   }
-   result = connectAllSources(idMapping);
-   if(!result)
-   {
-      CLOG << "problems connecting sources" << std::endl;
-   }
-   
-   theLoadStateFlag = false;
-   return result;
-}
-
-
-void ossimImageChain::initialize()
-{
-   static const char* MODULE = "ossimImageChain::initialize()";
-   if (traceDebug()) CLOG << " Entered..." << std::endl;
-   
-   long upper = (ossim_uint32)imageChainList().size();
-   
-   for(long index = upper - 1; index >= 0; --index)
-   {
-      if(traceDebug())
-      {
-         CLOG << "initilizing source: "
-              << imageChainList()[index]->getClassName()
-              << std::endl;
-      }
-      if(imageChainList()[index].valid())
-      {
-         ossimSource* interface =
-            PTR_CAST(ossimSource, imageChainList()[index].get());
-
-         if(interface)
-         {
-            // make sure we initialize in reverse order.
-            // some source may depend on the initialization of
-            // its inputs
-            interface->initialize();
-         }
-      }
-   }
-   if (traceDebug()) CLOG << " Exited..." << std::endl;
-}
-
-void ossimImageChain::enableSource()
-{
-   ossim_int32 upper = static_cast<ossim_int32>(imageChainList().size());
-   ossim_int32 index = 0;
-   for(index = upper - 1; index >= 0; --index)
-   {
-      // make sure we initialize in reverse order.
-      // some source may depend on the initialization of
-      // its inputs
-     ossimSource* source = PTR_CAST(ossimSource, imageChainList()[index].get());
-     if(source)
-     {
-        source->enableSource();
-     }
-   }
-   
-   theEnableFlag = true;
-}
-
-void ossimImageChain::disableSource()
-{
-   long upper = (ossim_uint32)imageChainList().size();
-   
-   for(long index = upper - 1; index >= 0; --index)
-   {
-      // make sure we initialize in reverse order.
-      // some source may depend on the initialization of
-      // its inputs
-     ossimSource* source = PTR_CAST(ossimSource, imageChainList()[index].get());
-     if(source)
-     {
-        source->disableSource();
-     }
-   }
-   
-   theEnableFlag = false;
-}
-
-void ossimImageChain::prepareForRemoval(ossimConnectableObject* connectableObject)
-{
-   if(connectableObject)
-   {
-      connectableObject->removeListener((ossimConnectableObjectListener*)this);
-      connectableObject->changeOwner(0);
-      connectableObject->disconnect();   
-   }
-}
-
-bool ossimImageChain::deleteFirst()
-{
-   if (imageChainList().size() == 0) return false;
-
-   ossimContainerEvent event(this, OSSIM_EVENT_REMOVE_OBJECT_ID);
-   prepareForRemoval(imageChainList()[0].get());
-   // Clear any listeners, memory.
-   event.setObjectList(imageChainList()[0].get());
-   imageChainList()[0] = 0;
-   // Remove from the vector.
-   std::vector<ossimRefPtr<ossimConnectableObject> >::iterator i = imageChainList().begin();
-   imageChainList().erase(i);
-   fireEvent(event);
-   return true;
-}
-
-bool ossimImageChain::deleteLast()
-{
-   if (imageChainList().size() == 0) return false;
-
-   ossimContainerEvent event(this, OSSIM_EVENT_REMOVE_OBJECT_ID);
-  // Clear any listeners, memory.
-   ossim_uint32 idx = (ossim_uint32)imageChainList().size() - 1;
-   prepareForRemoval(imageChainList()[idx].get());
-   event.setObjectList(imageChainList()[idx].get());
-   imageChainList()[idx] = 0;
-   // Remove from the vector.
-   imageChainList().pop_back();
-   fireEvent(event);
-   return true; 
-}
-
-void ossimImageChain::deleteList()
-{
-   ossim_uint32 upper = (ossim_uint32) imageChainList().size();
-   ossim_uint32 idx = 0;
-   ossimContainerEvent event(this, OSSIM_EVENT_REMOVE_OBJECT_ID);
-   for(; idx < upper; ++idx)
-   {
-      if(imageChainList()[idx].valid())
-      {
-         event.getObjectList().push_back(imageChainList()[idx].get());
-         prepareForRemoval(imageChainList()[idx].get());
-         imageChainList()[idx] = 0;
-      }
-   }
-  
-   imageChainList().clear();
-   fireEvent(event);
-}
-
-
-void ossimImageChain::disconnectInputEvent(ossimConnectionEvent& event)
-{
-   if(imageChainList().size())
-   {
-      if(event.getObject()==this)
-      {
-         if(imageChainList()[imageChainList().size()-1].valid())
-         {
-            for(ossim_uint32 i = 0; i < event.getNumberOfOldObjects(); ++i)
-            {
-               imageChainList()[imageChainList().size()-1]->disconnectMyInput(event.getOldObject(i));
-            }
-         }
-      }
-   }
-}
-
-void ossimImageChain::disconnectOutputEvent(ossimConnectionEvent& /* event */)
-{
-}
-
-void ossimImageChain::connectInputEvent(ossimConnectionEvent& event)
-{
-   if(imageChainList().size())
-   {
-      if(event.getObject()==this)
-      {
-         if(imageChainList()[imageChainList().size()-1].valid())
-         {
-            for(ossim_uint32 i = 0; i < event.getNumberOfNewObjects(); ++i)
-            {
-               ossimConnectableObject* obj = event.getNewObject(i);
-               imageChainList()[imageChainList().size()-1]->connectMyInputTo(findInputIndex(obj),
-                                                                               obj,
-                                                                               false);
-            }
-         }
-      }
-      else if(event.getObject() == imageChainList()[0].get())
-      {
-         if(!theLoadStateFlag)
-         {
-//            theInputObjectList = imageChainList()[0]->getInputList();
-         }
-      }
-      initialize();
-   }
-}
-
-void ossimImageChain::connectOutputEvent(ossimConnectionEvent& /* event */)
-{
-} 
-
-// void ossimImageChain::propertyEvent(ossimPropertyEvent& event)
-// {
-//    if(imageChainList().size())
-//    {
-//       ossimConnectableObject* obj = PTR_CAST(ossimConnectableObject,
-//                                              event.getObject());
-      
-//       if(obj)
-//       {
-//          ossimImageSource* interface = findSource(obj->getId());
-         
-//          if(interface)
-//          {
-//             ossimConnectableObject* obj = PTR_CAST(ossimConnectableObject,
-//                                                    interface.getObject());
-//             if(obj)
-//             {
-               
-//             }
-//          }
-//       }
-//    }
-// }
-
-void ossimImageChain::objectDestructingEvent(ossimObjectDestructingEvent& event)
-{
-   if(!event.getObject()) return;
-
-   if(imageChainList().size()&&(event.getObject()!=this))
-   {
-      removeChild(PTR_CAST(ossimConnectableObject,
-                           event.getObject()));
-   }
-}
-void ossimImageChain::propagateEventToOutputs(ossimEvent& event)
-{
-   //if(thePropagateEventFlag) return;
-
-   //thePropagateEventFlag = true;
-   if(imageChainList().size())
-   {
-      if(imageChainList()[imageChainList().size()-1].valid())
-      {
-         imageChainList()[imageChainList().size()-1]->fireEvent(event);
-         imageChainList()[imageChainList().size()-1]->propagateEventToOutputs(event);
-      }
-   }
-   //ossimConnectableObject::propagateEventToOutputs(event);
-  // thePropagateEventFlag = false;
-}
-void ossimImageChain::propagateEventToInputs(ossimEvent& event)
-{
-//   if(thePropagateEventFlag) return;
-
-//   thePropagateEventFlag = true;
-   if(imageChainList().size())
-   {
-      if(imageChainList()[0].valid())
-      {
-         imageChainList()[0]->fireEvent(event);
-         imageChainList()[0]->propagateEventToInputs(event);
-      }
-   }
-//   thePropagateEventFlag = false;
-}
-
-ossimConnectableObject* ossimImageChain::operator[](ossim_uint32 index)
-{
-   return getConnectableObject(index);
-}
-
-ossimConnectableObject* ossimImageChain::getConnectableObject(
-   ossim_uint32 index)
-{
-   if(imageChainList().size() && (index < imageChainList().size()))
-   {
-      return imageChainList()[index].get();
-   }
-   
-   return 0; 
-}
-
-ossim_int32 ossimImageChain::indexOf(ossimConnectableObject* obj)const
-{
-   ossim_uint32 idx = 0;
-   
-   for(idx = 0; idx < imageChainList().size();++idx)
-   {
-      if(imageChainList()[idx] == obj)
-      {
-         return (ossim_int32)idx;
-      }
-   }
-   
-   return -1;
-}
-
-void ossimImageChain::accept(ossimVisitor& visitor)
-{
-   if(!visitor.hasVisited(this))
-   {
-      visitor.visit(this);
-      ossimVisitor::VisitorType currentType = visitor.getVisitorType();
-      //---
-      // Lets make sure inputs and outputs are turned off for we are traversing all children
-      // and we should not have to have that enabled.
-      //---
-      visitor.turnOffVisitorType(ossimVisitor::VISIT_INPUTS|ossimVisitor::VISIT_OUTPUTS);
-      if(visitor.getVisitorType() & ossimVisitor::VISIT_CHILDREN)
-      {
-         ConnectableObjectList::reverse_iterator current = imageChainList().rbegin();
-         while((current != imageChainList().rend())&&!visitor.stopTraversal())
-         {
-            ossimRefPtr<ossimConnectableObject> currentObject = (*current);
-            if(currentObject.get() && !visitor.hasVisited(currentObject.get())) currentObject->accept(visitor);
-            ++current;
-         }
-      }
-      visitor.setVisitorType(currentType);
-      ossimConnectableObject::accept(visitor);
-   }
-}
-
-//**************************************************************************************************
-// Inserts all of its children and inputs into the container provided. Since ossimImageChain is
-// itself a form of container, this method will consolidate this chain with the argument
-// container. Therefore this chain object will not be represented in the container (but its
-// children will be, with correct input and output connections to external objects).
-// Returns TRUE if successful.
-//**************************************************************************************************
-bool ossimImageChain::fillContainer(ossimConnectableContainer& container)
-{
-   // Grab the first source in the chain and let it fill the container with itself and inputs. This
-   // will traverse down the chain and will even pick up external sources that feed this chain:
-   ossimRefPtr<ossimConnectableObject> first_source = getFirstSource();
-   if (!first_source.valid())
-      return false;
-   first_source->fillContainer(container);
-
-   // Instead of adding ourselves, make sure my first source is properly connected to my output,
-   // thus obviating the need for this image chain (my chain items become part of 'container':
-   ConnectableObjectList& obj_list = getOutputList();
-   ossimRefPtr<ossimConnectableObject> output_connection = 0;
-   while (!obj_list.empty())
-   {
-      // Always pick off the beginning of the list since it is shrinking with each disconnect:
-      output_connection = obj_list[0];
-      disconnectMyOutput(output_connection.get(), true, false);
-      first_source->connectMyOutputTo(output_connection.get());
-   }
-   return true;
-}
diff --git a/src/ossim/imaging/ossimImageCombiner.cpp b/src/ossim/imaging/ossimImageCombiner.cpp
deleted file mode 100644
index acb8cdc..0000000
--- a/src/ossim/imaging/ossimImageCombiner.cpp
+++ /dev/null
@@ -1,633 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimImageCombiner.cpp 20382 2011-12-15 14:24:57Z dburken $
-#include <ossim/imaging/ossimImageCombiner.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/base/ossimTrace.h>
-
-using namespace std;
-
-RTTI_DEF2(ossimImageCombiner, "ossimImageCombiner", ossimImageSource, ossimConnectableObjectListener)
-static ossimTrace traceDebug ("ossimImageCombiner:debug");
-
-ossimImageCombiner::ossimImageCombiner()
-   :ossimImageSource(NULL,
-                     0,
-                     0,
-                     false,
-                     false),
-    theLargestNumberOfInputBands(0),
-    theInputToPassThrough(0),
-    theHasDifferentInputs(false),
-    theNormTile(NULL),
-    theCurrentIndex(0)
-{
-	theComputeFullResBoundsFlag = true;
-   // until something is set we will just set the blank tile
-   // to a 1 band unsigned char type
-   addListener((ossimConnectableObjectListener*)this);
-}
-ossimImageCombiner::ossimImageCombiner(ossimObject* owner,
-                                       int numberOfInputs,
-                                       int numberOfOutputs,
-                                       bool inputListIsFixedFlag,
-                                       bool outputListIsFixedFlag)
-   :ossimImageSource(owner,
-                     numberOfInputs,
-                     numberOfOutputs,
-                     inputListIsFixedFlag,
-                     outputListIsFixedFlag),
-    theLargestNumberOfInputBands(0),
-    theInputToPassThrough(0),
-    theHasDifferentInputs(false),
-    theNormTile(NULL),
-    theCurrentIndex(0)
-{
-   addListener((ossimConnectableObjectListener*)this);
-   theComputeFullResBoundsFlag = true;
-}
-
-ossimImageCombiner::ossimImageCombiner(ossimConnectableObject::ConnectableObjectList& inputSources)
-   :ossimImageSource(NULL,
-                     (ossim_uint32)inputSources.size(),
-                     0,
-                     false,
-                     false),
-                     theLargestNumberOfInputBands(0),
-                     theInputToPassThrough(0),
-                     theHasDifferentInputs(false),
-                     theNormTile(NULL),
-                     theCurrentIndex(0)
-{
-	theComputeFullResBoundsFlag = true;
-   for(ossim_uint32 index = 0; index < inputSources.size(); ++index)
-   {
-      connectMyInputTo(index, inputSources[index].get());
-   }
-   addListener((ossimConnectableObjectListener*)this);
-   initialize();
-}
-
-ossimImageCombiner::~ossimImageCombiner()
-{
-   removeListener((ossimConnectableObjectListener*)this);
-}
-
-ossimIrect ossimImageCombiner::getBoundingRect(ossim_uint32 resLevel)const
-{
-   static const char* MODULE = "ossimImageCombiner::getBoundingRect";
-   ossimIrect result;
-   if(theComputeFullResBoundsFlag)
-   {
-      precomputeBounds();
-   }
-   
-   double scale = 1.0/std::pow(2.0, (double)resLevel);
-   ossimDpt scalar(scale, scale);
-   result.makeNan();
-   
-   ossim_uint32 inputIndex = 0;
-   ossimImageSource* interface;
-   for(inputIndex = 0;inputIndex < getNumberOfInputs(); ++inputIndex)
-   {
-      interface = PTR_CAST(ossimImageSource, getInput(inputIndex));
-      if(interface)
-      {
-         ossimIrect rect  = theFullResBounds[inputIndex];
-         if(result.hasNans())
-         {
-            result = rect;
-         }
-         else if(!rect.hasNans())
-         {
-            if(traceDebug())
-            {
-               CLOG << "rect " << inputIndex << " = " << result << endl;
-            }
-            rect = rect*scale;
-            result = result.combine(rect);
-         }
-      }
-   }
-   if(traceDebug())
-   {
-      CLOG << "resulting bounding rect =  " << result << endl;
-   }
-   
-   return result;
-}
-
-ossim_uint32 ossimImageCombiner::getNumberOfInputBands() const
-{
-   return theLargestNumberOfInputBands;
-}
-
-ossimScalarType ossimImageCombiner::getOutputScalarType() const
-{
-   if(getInput(theInputToPassThrough))
-   {
-      ossimImageSource* temp = PTR_CAST(ossimImageSource, getInput(theInputToPassThrough));
-      if(temp)
-      {
-         return temp->getOutputScalarType();
-      }
-   }
-
-   return OSSIM_SCALAR_UNKNOWN;
-}
-
-ossim_uint32 ossimImageCombiner::getTileWidth()const
-{
-   if(getInput(theInputToPassThrough))
-   {
-      ossimImageSource* temp = PTR_CAST(ossimImageSource, getInput(theInputToPassThrough));
-      if(temp)
-      {
-         return temp->getTileWidth();
-      }     
-   }
-   
-   return 1;
-}
-
-ossim_uint32 ossimImageCombiner::getTileHeight()const
-{
-   if(getInput(theInputToPassThrough))
-   {
-      ossimImageSource* temp = PTR_CAST(ossimImageSource, getInput(theInputToPassThrough));
-      if(temp)
-      {
-         return temp->getTileHeight();
-      }     
-   }
-   
-   return 1;
-}
-
-double ossimImageCombiner::getNullPixelValue(ossim_uint32 band)const
-{
-   if(getInput(theInputToPassThrough))
-   {
-      ossimImageSource* temp = PTR_CAST(ossimImageSource, getInput(theInputToPassThrough));
-      if(temp)
-      {
-         ossim_uint32 bands = temp->getNumberOfOutputBands();
-         if(band < bands)
-         {
-            return temp->getNullPixelValue(band);
-         }
-         else
-         {
-            return temp->getNullPixelValue(bands-1);
-         }
-      }     
-   }
-   
-   return 0.0;
-}
-
-double ossimImageCombiner::getMinPixelValue(ossim_uint32 band)const
-{
-   const char* MODULE = "ossimImageCombiner::getMinPixelValue";
-
-   if(!getNumberOfInputs())
-   {
-      return ossim::nan();
-   }
-   double result = 1.0/DBL_EPSILON;
-   
-   for(ossim_uint32 index = 0; index < getNumberOfInputs();++index)
-   {
-      ossimImageSource* input = PTR_CAST(ossimImageSource, getInput(index));
-      if(input)
-      {
-         ossim_uint32 bands = input->getNumberOfOutputBands();
-         double temp = 0;
-         if(band < bands)
-         {
-            temp = input->getMinPixelValue(band);
-         }
-         else
-         {
-            temp = input->getMinPixelValue(0);
-         }
-         
-         if(temp < result)
-         {
-            result = temp;
-         }
-      }
-   }
-   if(traceDebug())
-   {
-      CLOG << "min pixel returned is = " << result;
-   }
-
-   return result;
-}
-
-double ossimImageCombiner::getMaxPixelValue(ossim_uint32 band)const
-{
-   const char* MODULE = "ossimImageCombiner::getMaxPixelValue";
-
-   if(!getNumberOfInputs())
-   {
-      return ossim::nan();
-   }
-   double result = -1.0/DBL_EPSILON;
-   
-   for(ossim_uint32 idx = 0; idx < getNumberOfInputs();++idx)
-   {
-      ossimImageSource* input = PTR_CAST(ossimImageSource, getInput(idx));
-      if(input)
-      {
-         ossim_uint32 bands = input->getNumberOfOutputBands();
-         double temp = 0;
-         if(band < bands)
-         {
-            temp = input->getMaxPixelValue(band);
-         }
-         else
-         {
-            temp = input->getMaxPixelValue(0);
-         }
-         if(temp > result)
-         {
-            result = temp;
-         }
-      }
-   }
-
-   if(traceDebug())
-   {
-      CLOG << "max pixel returned is = " << result;
-   }
-   
-   return result;
-}
-
-void ossimImageCombiner::initialize()
-{
-   
-   theLargestNumberOfInputBands = 0;
-   theComputeFullResBoundsFlag = true;
-
-   // now find the largest number of bands
-   //
-   ossim_uint32 size = getNumberOfInputs();
-   ossimScalarType scalarType = OSSIM_SCALAR_UNKNOWN;
-   ossim_uint32 scalarSizeInBytes = 0;
-   theInputToPassThrough = 0;
-   theHasDifferentInputs= false;
-   if(size > 0)
-   {
-      for(ossim_uint32 idx = 0; idx < size; ++idx)
-      {
-         ossimImageSource* temp = PTR_CAST(ossimImageSource, getInput(idx));
-         if(temp)
-         {
-            ossim_uint32 numberOfBands = temp->getNumberOfOutputBands();
-            if(numberOfBands > theLargestNumberOfInputBands)
-            {
-               theLargestNumberOfInputBands = numberOfBands;
-            }
-            ossimScalarType current = temp->getOutputScalarType();
-            if(current != scalarType)
-            {
-               if(scalarType == OSSIM_SCALAR_UNKNOWN)
-               {
-                  scalarType = current;
-                  scalarSizeInBytes = ossim::scalarSizeInBytes(scalarType);
-                  theInputToPassThrough = idx;
-               }
-               else
-               {
-                  theHasDifferentInputs = true;
-                  if(scalarSizeInBytes < ossim::scalarSizeInBytes(current))
-                  {
-                     scalarType        = current;
-                     scalarSizeInBytes = ossim::scalarSizeInBytes(current);
-                     theInputToPassThrough = idx;
-                  }
-               }
-            }
-         }
-      }
-   }
-}
-
-bool ossimImageCombiner::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   bool result = ossimImageSource::loadState(kwl, prefix);
-
-   return result;
-}
-
-void ossimImageCombiner::updateRects()
-{
-	theComputeFullResBoundsFlag = true;
-}
-
-// ossimRefPtr<ossimImageData> ossimImageCombiner::getNextTile(ossim_uint32& returnedIdx,
-//                                                             ossim_uint32 idx,
-//                                                             const ossimIpt& tileRect,
-//                                                             ossim_uint32 resLevel)
-// {
-//    theCurrentIndex  = idx;
-//    return getNextTile(returnedIdx, origin, resLevel);
-// }
-
-// ossimRefPtr<ossimImageData> ossimImageCombiner::getNextTile(ossim_uint32& returnedIdx,
-//                                                             ossim_uint32 idx,
-//                                                             const ossimIpt& origin,
-//                                                             ossim_uint32 resLevel)
-// {
-//    theCurrentIndex  = idx;
-//    return getNextTile(returnedIdx, origin, resLevel);
-// }
-
-ossimRefPtr<ossimImageData> ossimImageCombiner::getNextTile(ossim_uint32& returnedIdx,
-                                                            const ossim_uint32 startIdx,
-                                                            const ossimIrect& tileRect,
-                                                            ossim_uint32 resLevel)
-{
-   theCurrentIndex = startIdx;   
-   return getNextTile(returnedIdx, tileRect, resLevel);
-}
-
-// ossimRefPtr<ossimImageData> ossimImageCombiner::getNextTile(ossim_uint32& returnedIdx,
-//                                                             const ossimIpt& origin,
-//                                                             ossim_uint32 resLevel)
-// {
-//    ossim_int32 w = getTileWidth();
-//    ossim_int32 h = getTileHeight();
-   
-//    return getNextTile(returnedIndex,
-//                       ossimIrect(origin.x,
-//                                  origin.y,
-//                                  origin.x + w-1,
-//                                  origin.y + h-1),
-//                       resLevel);
-// }
-
-ossimRefPtr<ossimImageData> ossimImageCombiner::getNextTile(ossim_uint32& returnedIdx,
-                                                            const ossimIrect& tileRect,
-                                                            ossim_uint32 resLevel)
-{
-   ossim_uint32 size = getNumberOfInputs();
-   if ( theCurrentIndex >= size)
-   {
-      return 0;
-   }
-   
-   if(theComputeFullResBoundsFlag)
-   {
-      precomputeBounds();
-   }
-   
-   ossimImageSource* temp = 0;
-   ossimRefPtr<ossimImageData> result = 0;
-   ossimDataObjectStatus status = OSSIM_NULL;
-
-   double scale = 1.0/std::pow(2.0, (double)resLevel);
-   ossimDpt scalar(scale, scale);
-
-   while( (theCurrentIndex<size) && !result)
-   {
-      ossimIrect rect = theFullResBounds[theCurrentIndex];
-      if(!rect.hasNans())
-      {
-         rect = rect * scalar;
-         temp = PTR_CAST(ossimImageSource,
-                         getInput(theCurrentIndex));
-         
-         if(rect.intersects(tileRect)&&temp)
-         {
-            result = temp->getTile(tileRect, resLevel);
-            status = (result.valid() ?
-                      result->getDataObjectStatus():OSSIM_NULL);
-            if((status == OSSIM_NULL)||
-               (status == OSSIM_EMPTY))
-            {
-               result = 0;
-            }
-         }
-         else
-         {
-            status = OSSIM_NULL;
-            result = 0;
-         }
-      }
-      else
-      {
-         status = OSSIM_NULL;
-         result = NULL;
-      }
-      
-      // Go to next source.
-      ++theCurrentIndex;
-   }
-   returnedIdx = theCurrentIndex;
-   if(result.valid())
-   {
-      --returnedIdx;
-   }
-
-   return result;
-}
-
-
-// ossimRefPtr<ossimImageData> ossimImageCombiner::getNextNormTile(ossim_uint32& returnedIdx,
-//                                                                 ossim_uint32 index,
-//                                                                 const ossimIpt& origin,
-//                                                                 ossim_uint32 resLevel)
-// {
-//    theCurrentIndex = index;
-//    return getNextNormTile(returnedIdx, origin, resLevel);
-// }
-
-ossimRefPtr<ossimImageData> ossimImageCombiner::getNextNormTile(ossim_uint32& returnedIdx,
-                                                                const ossim_uint32 startIdx,
-                                                                const ossimIrect& tileRect,
-                                                                ossim_uint32 resLevel)
-{
-   theCurrentIndex = startIdx;
-   return getNextNormTile(returnedIdx, tileRect, resLevel);
-}
-
-// ossimRefPtr<ossimImageData> ossimImageCombiner::getNextNormTile(ossim_uint32& returnedIdx,
-//                                                                 const ossimIpt& origin,
-//                                                                 ossim_uint32 resLevel)
-// {
-//    ossim_int32 w = getTileWidth();
-//    ossim_int32 h = getTileHeight();
-   
-//    return getNextNormTile(returnedIdx,
-//                           ossimIrect(origin.x,
-//                                      origin.y,
-//                                      origin.x + w-1,
-//                                      origin.y + h-1),
-//                           resLevel);
-// }
-
-
-ossimRefPtr<ossimImageData> ossimImageCombiner::getNextNormTile(ossim_uint32& returnedIdx,
-                                                                const ossimIrect& tileRect,
-                                                                ossim_uint32 resLevel)
-{
-   ossim_uint32 size = getNumberOfInputs();
-
-   if(theCurrentIndex >= size)
-   {
-      return 0;
-   }
-   
-   if(!theNormTile)
-   {
-      theNormTile = new ossimImageData(this,
-                                       OSSIM_NORMALIZED_FLOAT);
-      theNormTile->initialize();
-   }
-
-   ossimRefPtr<ossimImageData> result = getNextTile(returnedIdx, tileRect, resLevel);
-
-   if(result.valid())
-   {
-      theNormTile->setImageRectangleAndBands(result->getImageRectangle(),
-                                             result->getNumberOfBands());
-      result->copyTileToNormalizedBuffer((float*)theNormTile->getBuf());
-
-      theNormTile->setDataObjectStatus(result->getDataObjectStatus());
-      result = theNormTile;
-   }
-   
-   return result;
-}
-
-ossim_uint32 ossimImageCombiner::getNumberOfOverlappingImages(const ossimIrect& rect,
-                                                              ossim_uint32 resLevel)const
-{
-   if(theComputeFullResBoundsFlag)
-   {
-      precomputeBounds();
-   }
-   double scale = 1.0/std::pow(2.0, (double)resLevel);
-   ossimDpt scalar(scale, scale);
-   ossim_uint32 result = 0;
-   ossim_uint32 maxIndex = getNumberOfInputs();
-   for(ossim_uint32 inputIndex = 0; inputIndex < maxIndex; ++inputIndex)
-   {
-      if(!theFullResBounds[inputIndex].hasNans())
-      {
-         ossimIrect boundingRect = theFullResBounds[inputIndex] * scalar;
-         if(rect.intersects(boundingRect))
-         {
-            ++result;
-         }
-      }
-   }
-   
-   return result;
-}
-
-void ossimImageCombiner::getOverlappingImages(std::vector<ossim_uint32>& result,
-					      const ossimIrect& rect,
-                                              ossim_uint32 resLevel)const
-{
-   if(theComputeFullResBoundsFlag)
-   {
-      precomputeBounds();
-   }
-   double scale = 1.0/std::pow(2.0, (double)resLevel);
-   ossimDpt scalar(scale, scale);
-   
-   ossim_uint32 inputIndex;
-   ossimIrect boundingRect;
-   for(inputIndex = 0; inputIndex < getNumberOfInputs(); ++inputIndex)
-   {
-      if(!theFullResBounds[inputIndex].hasNans())
-      {
-         boundingRect = theFullResBounds[inputIndex]*scalar;
-         if(rect.intersects(boundingRect))
-         {
-            result.push_back(inputIndex);
-         }
-      }
-   }
-}
-
-void ossimImageCombiner::connectInputEvent(ossimConnectionEvent& /* event */)
-{
-   initialize();
-}
-
-void ossimImageCombiner::disconnectInputEvent(ossimConnectionEvent& /* event */)
-{ 
-   initialize();
-}
-
-void ossimImageCombiner::propertyEvent(ossimPropertyEvent& /* event */)
-{
-   initialize();
-}
-
-void ossimImageCombiner::refreshEvent(ossimRefreshEvent& /* event */)
-{
-   initialize();
-}
-
-bool ossimImageCombiner::hasDifferentInputs()const
-{
-   return theHasDifferentInputs;
-}
-
-bool ossimImageCombiner::saveState(ossimKeywordlist& kwl,
-                                   const char* prefix) const
-{
-   return ossimImageSource::saveState(kwl, prefix);
-}
-
-bool ossimImageCombiner::canConnectMyInputTo(ossim_int32 /* inputIndex */,
-                                             const ossimConnectableObject* object)const
-{
-   return (object&& PTR_CAST(ossimImageSource, object));
-}
-
-void ossimImageCombiner::precomputeBounds()const
-{
-   
-   ossim_uint32 inputSize = getNumberOfInputs();
-
-   if(inputSize)
-   {
-      ossimImageSource* tempInterface=0;
-      if(theFullResBounds.size() != inputSize)
-      {
-         theFullResBounds.resize(inputSize);
-      }
-      for(ossim_uint32 inputIndex = 0; inputIndex < inputSize; ++inputIndex)
-      {
-         tempInterface = PTR_CAST(ossimImageSource, getInput(inputIndex));
-         if(tempInterface)
-         {
-            theFullResBounds[inputIndex] = tempInterface->getBoundingRect();
-         }
-         else
-         {
-            theFullResBounds[inputIndex].makeNan();
-         }
-      }
-      theComputeFullResBoundsFlag = false;
-   }
-   else
-   {
-      theFullResBounds.clear();
-   }
-}
diff --git a/src/ossim/imaging/ossimImageData.cpp b/src/ossim/imaging/ossimImageData.cpp
deleted file mode 100644
index 530846c..0000000
--- a/src/ossim/imaging/ossimImageData.cpp
+++ /dev/null
@@ -1,7001 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimImageData.cpp 22161 2013-02-25 12:10:04Z gpotts $
-
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/base/ossimSource.h>
-#include <ossim/base/ossimErrorContext.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimMultiBandHistogram.h>
-#include <ossim/base/ossimHistogram.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-
-#include <iterator>
-#include <ostream>
-
-
-RTTI_DEF1(ossimImageData, "ossimImageData", ossimRectilinearDataObject)
-
-ossimImageData::ossimImageData()
-   : ossimRectilinearDataObject(2,            // 2d
-                                0,         // owner
-                                1,            // bands
-                                OSSIM_UINT8), // scalar
-     m_nullPixelValue(0),
-     m_minPixelValue(0),
-     m_maxPixelValue(0),
-     m_alpha(0),
-     m_origin(0, 0),
-     m_indexedFlag(false)
-{
-   ossimIpt tileSize;
-   ossim::defaultTileSize(tileSize);
-   m_spatialExtents[0] = tileSize.x;
-   m_spatialExtents[1] = tileSize.y;
-   initializeDefaults();
-}
-
-ossimImageData::ossimImageData(ossimSource*    owner,
-                               ossimScalarType scalar,
-                               ossim_uint32    bands)
-   : ossimRectilinearDataObject(2,
-                                owner,
-                                bands,
-                                scalar),
-     m_nullPixelValue(0),
-     m_minPixelValue(0),
-     m_maxPixelValue(0),
-     m_alpha(0),
-     m_origin(0, 0),
-     m_indexedFlag(false)
-{
-   ossimIpt tileSize;
-   ossim::defaultTileSize(tileSize);
-   m_spatialExtents[0] = tileSize.x;
-   m_spatialExtents[1] = tileSize.y;
-   initializeDefaults();
-}
-
-ossimImageData::ossimImageData(ossimSource* owner,
-                               ossimScalarType scalar,
-                               ossim_uint32 bands,
-                               ossim_uint32 width,
-                               ossim_uint32 height)
-   : ossimRectilinearDataObject(owner,
-                               bands,
-                               width, // 2-D array
-                               height,
-                               scalar),
-     m_nullPixelValue(0),
-     m_minPixelValue(0),
-     m_maxPixelValue(0),
-     m_alpha(0),
-     m_origin(0, 0),
-     m_indexedFlag(false)
-{   
-   m_spatialExtents[0] = width;
-   m_spatialExtents[1] = height;
-   initializeDefaults();
-}
-
-ossimImageData::ossimImageData(const ossimImageData &rhs)
-   : ossimRectilinearDataObject(rhs),
-     m_nullPixelValue(rhs.m_nullPixelValue),
-     m_minPixelValue(rhs.m_minPixelValue),
-     m_maxPixelValue(rhs.m_maxPixelValue),
-     m_alpha(rhs.m_alpha),
-     m_origin(rhs.m_origin),
-     m_indexedFlag(rhs.m_indexedFlag)
-{
-}
-
-const ossimImageData& ossimImageData::operator=(const ossimImageData& rhs)
-{
-   if (this != &rhs)
-   {
-      // ossimRectilinearDataObject initialization:
-      ossimRectilinearDataObject::operator=(rhs);
-      
-      // ossimImageData (this) members:
-      m_nullPixelValue = rhs.m_nullPixelValue;
-      m_minPixelValue  = rhs.m_minPixelValue;
-      m_maxPixelValue  = rhs.m_maxPixelValue;
-      m_alpha          = rhs.m_alpha;
-      m_origin         = rhs.m_origin;
-      m_indexedFlag    = rhs.m_indexedFlag;
-   }
-   return *this;
-}
-
-ossimImageData::~ossimImageData()
-{
-}
-
-bool ossimImageData::isValidBand(ossim_uint32 band) const
-{
-   return (band<getNumberOfDataComponents());
-}
-
-ossim_uint32 ossimImageData::getSize() const
-{
-   return (getSizePerBand() * getNumberOfDataComponents());
-}
-
-ossim_uint32 ossimImageData::getSizePerBand() const
-{
-   return (getHeight() * getWidth());
-}
-
-ossim_uint32 ossimImageData::getSizeInBytes() const
-{
-   return (getSizePerBandInBytes() * getNumberOfDataComponents());
-}
-
-ossim_uint32 ossimImageData::getSizePerBandInBytes() const
-{
-   return (getHeight() * getWidth() * getScalarSizeInBytes());
-}
-
-const ossim_uint8* ossimImageData::getAlphaBuf() const
-{
-   if (m_alpha.size() > 0)
-   {
-      return &m_alpha.front();
-   }
-   return 0;
-}
-
-ossim_uint8* ossimImageData::getAlphaBuf()
-{
-   if (m_alpha.size() > 0)
-   {
-      return &m_alpha.front();
-   }
-   return 0;
-}
-
-const void* ossimImageData::getBuf() const
-{
-   if (m_dataBuffer.size() > 0)
-   {
-      return static_cast<const void*>(&m_dataBuffer.front());
-   }
-   return 0;
-}
-
-void* ossimImageData::getBuf()
-{
-   if (m_dataBuffer.size() > 0)
-   {
-      return static_cast<void*>(&m_dataBuffer.front());
-   }
-   return 0;
-}
-
-const void* ossimImageData::getBuf(ossim_uint32 band) const
-{
-   const ossim_uint8* b = static_cast<const ossim_uint8*>(getBuf());
-   
-   if (isValidBand(band) && b != 0)
-   {
-      b += (band * getSizePerBandInBytes());
-      return static_cast<const void*>(b);
-   }
-   return 0;
-}
-
-void* ossimImageData::getBuf(ossim_uint32 band)
-{
-   ossim_uint8* b = static_cast<ossim_uint8*>(getBuf());
-   
-   if (isValidBand(band) && b != 0)
-   {
-      b += (band * getSizePerBandInBytes());
-      return static_cast<void*>(b);
-   }
-   return 0;
-}
-
-const ossim_uint8* ossimImageData::getUcharBuf() const
-{
-   if (m_scalarType == OSSIM_UINT8)
-   {
-      return static_cast<const ossim_uint8*>(getBuf());
-   }
-   return 0;
-}
-
-const ossim_uint16* ossimImageData::getUshortBuf() const
-{
-   if (m_scalarType == OSSIM_UINT16 ||
-       m_scalarType == OSSIM_USHORT11)
-   {
-      return static_cast<const ossim_uint16*>(getBuf());
-   }
-   return 0;
-}
-
-const ossim_sint16* ossimImageData::getSshortBuf() const
-{
-   if (m_scalarType == OSSIM_SINT16)
-   {
-      return static_cast<const ossim_sint16*>(getBuf());
-   }
-   return 0;
-}
-
-const ossim_float32* ossimImageData::getFloatBuf() const
-{
-   if (m_scalarType == OSSIM_FLOAT32 ||
-       m_scalarType == OSSIM_NORMALIZED_FLOAT)
-   {
-      return static_cast<const ossim_float32*>(getBuf());
-   }
-   return 0;
-}
-
-const ossim_float64* ossimImageData::getDoubleBuf() const
-{
-   if (m_scalarType == OSSIM_FLOAT64 ||
-       m_scalarType == OSSIM_NORMALIZED_DOUBLE)
-   {
-      return static_cast<const ossim_float64*>(getBuf());
-   }
-   return 0;
-}
-
-ossim_uint8* ossimImageData::getUcharBuf() 
-{
-   if (m_scalarType == OSSIM_UINT8)
-   {
-      return static_cast<ossim_uint8*>(getBuf());
-   }
-   return 0;
-}
-
-ossim_uint16* ossimImageData::getUshortBuf() 
-{
-   if (m_scalarType == OSSIM_UINT16 ||
-       m_scalarType == OSSIM_USHORT11)
-   {
-      return static_cast<ossim_uint16*>(getBuf());
-   }
-   return 0;
-}
-
-ossim_sint16* ossimImageData::getSshortBuf() 
-{
-   if (m_scalarType == OSSIM_SINT16)
-   {
-      return static_cast<ossim_sint16*>(getBuf());
-   }
-   return 0;
-}
-
-ossim_float32* ossimImageData::getFloatBuf() 
-{
-   if (m_scalarType == OSSIM_FLOAT32 ||
-       m_scalarType == OSSIM_NORMALIZED_FLOAT)
-   {
-      return static_cast<ossim_float32*>(getBuf());
-   }
-   return 0;
-}
-
-ossim_float64* ossimImageData::getDoubleBuf() 
-{
-   if (m_scalarType == OSSIM_FLOAT64 ||
-       m_scalarType == OSSIM_NORMALIZED_DOUBLE)
-   {
-      return static_cast<ossim_float64*>(getBuf());
-   }
-   return 0;
-}
-
-const ossim_uint8* ossimImageData::getUcharBuf(ossim_uint32 band) const
-{
-   if (m_scalarType == OSSIM_UINT8)
-   {
-      return static_cast<const ossim_uint8*>(getBuf(band));
-   }
-   return 0;
-}
-
-const ossim_uint16* ossimImageData::getUshortBuf(ossim_uint32 band) const
-{
-   if (m_scalarType == OSSIM_UINT16 ||
-       m_scalarType == OSSIM_USHORT11)
-   {
-      return static_cast<const ossim_uint16*>(getBuf(band));
-   }
-   return 0;
-}
-
-const ossim_sint16* ossimImageData::getSshortBuf(ossim_uint32 band) const
-{
-   if (m_scalarType == OSSIM_SINT16)
-   {
-      return static_cast<const ossim_sint16*>(getBuf(band));
-   }
-   return 0;
-}
-
-const ossim_float32* ossimImageData::getFloatBuf(ossim_uint32 band) const
-{
-   if (m_scalarType == OSSIM_FLOAT32 ||
-       m_scalarType == OSSIM_NORMALIZED_FLOAT)
-   {
-      return static_cast<const ossim_float32*>(getBuf(band));
-   }
-   return 0;
-}
-
-const ossim_float64* ossimImageData::getDoubleBuf(ossim_uint32 band) const
-{
-   if (m_scalarType == OSSIM_FLOAT64 ||
-       m_scalarType == OSSIM_NORMALIZED_DOUBLE)
-   {
-      return static_cast<const ossim_float64*>(getBuf(band));
-   }
-   return 0;
-}
-
-ossim_uint8* ossimImageData::getUcharBuf(ossim_uint32 band) 
-{
-   if (m_scalarType == OSSIM_UINT8)
-   {
-      return static_cast<ossim_uint8*>(getBuf(band));
-   }
-   return 0;
-}
-
-ossim_uint16* ossimImageData::getUshortBuf(ossim_uint32 band) 
-{
-   if (m_scalarType == OSSIM_UINT16 ||
-       m_scalarType == OSSIM_USHORT11)
-   {
-      return static_cast<ossim_uint16*>(getBuf(band));
-   }
-   return 0;
-}
-
-ossim_sint16* ossimImageData::getSshortBuf(ossim_uint32 band) 
-{
-   if (m_scalarType == OSSIM_SINT16)
-   {
-      return static_cast<ossim_sint16*>(getBuf(band));
-   }
-   return 0;
-}
-
-ossim_float32* ossimImageData::getFloatBuf(ossim_uint32 band) 
-{
-   if (m_scalarType == OSSIM_FLOAT32 ||
-       m_scalarType == OSSIM_NORMALIZED_FLOAT)
-   {
-      return static_cast<ossim_float32*>(getBuf(band));
-   }
-   return 0;
-}
-
-ossim_float64* ossimImageData::getDoubleBuf(ossim_uint32 band) 
-{
-   if (m_scalarType == OSSIM_FLOAT64 ||
-       m_scalarType == OSSIM_NORMALIZED_DOUBLE)
-   {
-      return static_cast<ossim_float64*>(getBuf(band));
-   }
-   return 0;
-}
-
-void ossimImageData::getNormalizedFloat(ossim_uint32 offset,
-                                        ossim_uint32 bandNumber,
-                                        ossim_float32& result)const
-{
-   // Make sure that the types and width and height are good.
-   if( (getDataObjectStatus() != OSSIM_NULL) && (bandNumber < getNumberOfDataComponents()) )
-   {
-      ossim_float32 p = 0.0;
-
-      switch (getScalarType())
-      {
-         case OSSIM_UINT8:
-         {
-            const unsigned char* sourceBuf = getUcharBuf(bandNumber);
-            p = sourceBuf[offset];
-            break;
-         }
-         case OSSIM_SINT8:
-         {
-            const ossim_sint8* sourceBuf = static_cast<const ossim_sint8*>(getBuf(bandNumber));
-            p = sourceBuf[offset];
-            break;
-         }
-         case OSSIM_USHORT11:
-         case OSSIM_UINT16:
-         {
-            const ossim_uint16* sourceBuf = getUshortBuf(bandNumber);
-            p = sourceBuf[offset];
-            break;
-         }
-         case OSSIM_SINT16:
-         {
-            const ossim_sint16* sourceBuf = getSshortBuf(bandNumber);
-            p = sourceBuf[offset];
-            break;
-         }
-         case OSSIM_UINT32:
-         {
-            const ossim_uint32* sourceBuf =
-               static_cast<const ossim_uint32*>(getBuf(bandNumber));
-            p = sourceBuf[offset];
-            break;
-         }
-         case OSSIM_SINT32:
-         {
-            const ossim_sint32* sourceBuf = static_cast<const ossim_sint32*>(getBuf(bandNumber));
-            p = sourceBuf[offset];
-            break;
-         }
-         case OSSIM_NORMALIZED_FLOAT:
-         case OSSIM_FLOAT32:
-         {
-            const ossim_float32* sourceBuf = getFloatBuf(bandNumber);
-            p = sourceBuf[offset];
-            break;
-         }
-         case OSSIM_FLOAT64:
-         case OSSIM_NORMALIZED_DOUBLE:
-         {
-            const ossim_float64* sourceBuf = getDoubleBuf(bandNumber);
-            p = sourceBuf[offset];
-            break;
-         }
-         case OSSIM_SCALAR_UNKNOWN:
-         default:
-         {
-            // Shouldn't hit this.
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimImageData::setNormalizedFloat Unsupported scalar type!"
-               << std::endl;
-         }
-         
-      } // Matches: switch (getScalarType())
-
-      if ( p != m_nullPixelValue[bandNumber] )
-      {
-         const ossim_float32 DELTA = m_maxPixelValue[bandNumber] - m_minPixelValue[bandNumber] - 1;
-         const ossim_float32 OFFSET_TO_ONE = 1 - m_minPixelValue[bandNumber];
-         
-         result = ( p <= m_maxPixelValue[bandNumber] ) ?
-            ( ( p >= m_minPixelValue[bandNumber] ) ? ( p + OFFSET_TO_ONE ) / DELTA : 0.0 ) : 1.0;
-      }
-      else
-      {
-         result = 0.0;
-      }
-      
-   } // Matches: if( (getDataObjectStatus() ...
-   
-} // End: ossimImageData::getNormalizedFloat
-
-void ossimImageData::setNormalizedFloat(ossim_uint32 offset,
-                                        ossim_uint32 bandNumber,
-                                        ossim_float32 inputValue)
-{
-   // Make sure that the types and width and height are good.
-   if( (getDataObjectStatus() != OSSIM_NULL) && (bandNumber < getNumberOfDataComponents()) )
-   {
-
-      ossim_float32 p = 0.0;
-
-      if ( inputValue )
-      {
-         const ossim_float32 DELTA = m_maxPixelValue[bandNumber] - m_minPixelValue[bandNumber] - 1;
-         const ossim_float32 OFFSET_TO_MIN = m_minPixelValue[bandNumber] - 1;
-         p = inputValue * DELTA + OFFSET_TO_MIN + 0.5;
-         if ( p > m_maxPixelValue[bandNumber] )
-         {
-            p = m_maxPixelValue[bandNumber];
-         }
-      }
-      else
-      {
-         p = m_nullPixelValue[bandNumber];
-      }
-   
-      switch (getScalarType())
-      {
-         case OSSIM_UINT8:
-         {
-            unsigned char* sourceBuf = getUcharBuf(bandNumber);
-            sourceBuf[offset] = static_cast<ossim_uint8>( p );
-            break;
-         }
-         case OSSIM_SINT8:
-         {
-            ossim_sint8* sourceBuf = static_cast<ossim_sint8*>(getBuf(bandNumber));
-            sourceBuf[offset] = static_cast<ossim_sint8>( p );
-            break;
-         }
-         case OSSIM_USHORT11:
-         case OSSIM_UINT16:
-         {
-            ossim_uint16* sourceBuf = getUshortBuf(bandNumber);
-            sourceBuf[offset] = static_cast<ossim_uint16>( p );
-            break;
-         }
-         case OSSIM_SINT16:
-         {
-            ossim_sint16* sourceBuf = getSshortBuf(bandNumber);
-            sourceBuf[offset] = static_cast<ossim_sint16>( p );
-            break;
-         }
-         case OSSIM_UINT32:
-         {
-            ossim_uint32* sourceBuf = static_cast<ossim_uint32*>(getBuf(bandNumber));
-            sourceBuf[offset] = static_cast<ossim_uint32>( p );
-            break;
-         }
-         case OSSIM_SINT32:
-         {
-            ossim_sint32* sourceBuf = static_cast<ossim_sint32*>(getBuf(bandNumber));
-            sourceBuf[offset] = static_cast<ossim_sint32>( p );
-            break;
-         }
-         case OSSIM_NORMALIZED_FLOAT:
-         case OSSIM_FLOAT32:
-         {
-            ossim_float32* sourceBuf = getFloatBuf(bandNumber);
-            sourceBuf[offset] = p;
-            break;
-         }
-         case OSSIM_FLOAT64:
-         case OSSIM_NORMALIZED_DOUBLE:
-         {
-            ossim_float64* sourceBuf = getDoubleBuf(bandNumber);
-            sourceBuf[offset] = p;
-            break;
-         }
-         case OSSIM_SCALAR_UNKNOWN:
-         default:
-            // Shouldn't hit this.
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimImageData::setNormalizedFloat Unsupported scalar type!"
-               << std::endl;
-            
-      } // Matches: switch (getScalarType())
-
-   } // Matches: if( (getDataObjectStatus() ...
-   
-} // End: ossimImageData::setNormalizedFloat
-
-void ossimImageData::convertToNormalizedFloat(ossimImageData* result)const
-{
-   if(!result)
-   {
-      return;
-   }
-   // make sure that the types and width and height are
-   // good.
-   if( (result->getScalarType() != OSSIM_NORMALIZED_FLOAT) ||
-       (result->getNumberOfBands() != this->getNumberOfBands())||
-       (result->getWidth() != this->getWidth()) ||
-       (result->getHeight() != this->getHeight())||
-       (result->getDataObjectStatus() == OSSIM_NULL) ||
-       (getDataObjectStatus() == OSSIM_NULL))
-   {
-      return;
-   }
-
-   copyTileToNormalizedBuffer((ossim_float32*)result->getBuf());
-   result->setDataObjectStatus(getDataObjectStatus());
-}
-
-ossimRefPtr<ossimImageData> ossimImageData::newNormalizedFloat()const
-{
-   ossimRefPtr<ossimImageData> result =
-      new ossimImageData(0,
-                         OSSIM_NORMALIZED_FLOAT,
-                         this->getNumberOfBands(),
-                         this->getWidth(),
-                         this->getHeight());
-   
-   result->initialize();
-   
-   convertToNormalizedFloat(result.get());
-   
-   return result;
-}
-
-void ossimImageData::convertToNormalizedDouble(ossimImageData* result)const
-{
-   if(!result)
-   {
-      return;
-   }
-   // make sure that the types and width and height are
-   // good.
-   if( (result->getScalarType() != OSSIM_NORMALIZED_DOUBLE) ||
-       (result->getNumberOfBands() != this->getNumberOfBands())||
-       (result->getWidth() != this->getWidth()) ||
-       (result->getHeight() != this->getHeight())||
-       (result->getDataObjectStatus() == OSSIM_NULL) ||
-       (getDataObjectStatus() == OSSIM_NULL))
-   {
-      return;
-   }
-
-   copyTileToNormalizedBuffer((ossim_float64*)result->getBuf());
-   result->setDataObjectStatus(getDataObjectStatus());
-}
-
-ossimImageData* ossimImageData::newNormalizedDouble()const
-{
-   ossimImageData* result = new ossimImageData(0,
-                                               OSSIM_NORMALIZED_DOUBLE,
-                                               this->getNumberOfBands(),
-                                               this->getWidth(),
-                                               this->getHeight());
-   result->initialize();
-
-   convertToNormalizedDouble(result);
-   
-   return result;   
-}
-
-
-void ossimImageData::unnormalizeInput(ossimImageData* normalizedInput)
-{
-   if((normalizedInput->getScalarType() != OSSIM_NORMALIZED_FLOAT) &&
-      (normalizedInput->getScalarType() != OSSIM_NORMALIZED_DOUBLE) )
-   {
-      //ERROR
-      return;
-   }
-
-   if(normalizedInput->getScalarType() == OSSIM_NORMALIZED_DOUBLE)
-   {
-      copyNormalizedBufferToTile((ossim_float64*)normalizedInput->getBuf());
-   }
-   else
-   {
-      copyNormalizedBufferToTile((ossim_float32*)normalizedInput->getBuf());
-   }
-}
-
-ossim_float64 ossimImageData::computeMeanSquaredError(
-   ossim_float64 meanValue,
-   ossim_uint32 bandNumber) const
-{
-   ossim_float64 result = -1; // invalid MSE
-   
-   switch (getScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         result = computeMeanSquaredError(ossim_uint8(0),
-                                          meanValue,
-                                          bandNumber);
-         break;
-      }
-      case OSSIM_SINT8:
-      {
-         result = computeMeanSquaredError(ossim_sint8(0),
-                                          meanValue,
-                                          bandNumber);
-         break;
-      }
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-      {
-         result = computeMeanSquaredError(ossim_uint16(0),
-                                          meanValue,
-                                          bandNumber);
-         break;
-      }  
-      case OSSIM_SINT16:
-      {
-         result = computeMeanSquaredError(ossim_sint16(0),
-                                          meanValue,
-                                          bandNumber);
-         break;
-      }  
-      case OSSIM_UINT32:
-      {
-         result = computeMeanSquaredError(ossim_uint32(0),
-                                          meanValue,
-                                          bandNumber);
-         break;
-      }  
-      case OSSIM_SINT32:
-      {
-         result = computeMeanSquaredError(ossim_sint32(0),
-                                          meanValue,
-                                          bandNumber);
-         break;
-      }  
-      case OSSIM_FLOAT32:
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         result = computeMeanSquaredError(ossim_float32(0.0),
-                                          meanValue,
-                                          bandNumber);
-         break;
-      }  
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-      {
-         result = computeMeanSquaredError(ossim_float64(0.0),
-                                          meanValue,
-                                          bandNumber);
-         break;
-      }  
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         setDataObjectStatus(OSSIM_STATUS_UNKNOWN);
-         ossimSetError(getClassName(),
-                       ossimErrorCodes::OSSIM_ERROR,
-                       "ossimImageData::computeMeanSquaredError File %s line %d\n\
-Invalid scalar type:  %d",
-                       __FILE__,
-                       __LINE__,
-                       getScalarType());
-         break;
-      }
-   }
-
-   return result;
-}
-   
-template <class T> ossim_float64 ossimImageData::computeMeanSquaredError(
-   T, /* dummyTemplate */
-   ossim_float64 meanValue,
-   ossim_uint32 bandNumber) const
-{
-   ossim_float64  result               = -1.0; // invalid MSE
-
-   if ( (getDataObjectStatus() == OSSIM_NULL) ||
-        (getDataObjectStatus() == OSSIM_EMPTY) )
-   {
-      return result;
-   }
-   
-   ossim_uint32  index           = 0;
-   ossim_float64 delta           = 0.0;
-   ossim_uint32  validPixelCount = 0;
-
-   const T* BUFFER = static_cast<const T*>(getBuf(bandNumber));
-   if(BUFFER)
-   {
-      const ossim_uint32 BOUNDS = getSizePerBand();
-      for(index = 0; index < BOUNDS; ++index)
-      {
-         if(!isNull(index))
-         {
-            delta = BUFFER[index] - meanValue;
-            result += (delta*delta);
-            ++validPixelCount;
-         }
-      }
-      if(validPixelCount > 0)
-      {
-         result /= validPixelCount;
-      }
-   }
-
-   return result;
-}
-
-
-//******************************************************************
-//
-// NOTE: I was checking for null and not adding it to the histogram.
-//       this was messing up the equalization algorithms since the
-//       accumulation histogram did not represent the area of the
-//       image.  For now I will leave out the check for "is null" and
-//       add this to the count so that the total accumulation is the
-//       area of the image.
-//
-//******************************************************************
-void ossimImageData::populateHistogram(ossimRefPtr<ossimMultiBandHistogram> histo)
-{
-   ossim_uint32 numberOfBands = getNumberOfBands();
-
-   if( (getDataObjectStatus() == OSSIM_NULL) ||
-       (getDataObjectStatus() == OSSIM_EMPTY)||
-       (!histo))
-   {
-      return;
-   }
-   switch(getScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
-         {
-            ossimRefPtr<ossimHistogram> currentHisto = histo->getHistogram(band);
-            if(currentHisto.valid())
-            {
-               float* histoBins = currentHisto->GetCounts();
-               int binCount = currentHisto->GetRes();
-               ossim_uint8* buffer = (ossim_uint8*)getBuf(band);
-               ossim_uint32 upperBound = getWidth()*getHeight();
-               if ( binCount == 256 )
-               {
-                  for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-                  {
-                     ++histoBins[ buffer[offset] ];
-                  }
-               }
-               else
-               {
-                 for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-                  {
-                     currentHisto->UpCount((float)buffer[offset]);
-                  }
-               }
-            }
-         }
-         break;
-      }
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-      {
-         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
-         {
-            ossimRefPtr<ossimHistogram> currentHisto = histo->getHistogram(band);
-	 
-             ossim_uint16* buffer = (ossim_uint16*)getBuf(band);
-             if(currentHisto.valid())
-             {
-                ossim_uint32 upperBound = getWidth()*getHeight();
-                for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-                {
-                  currentHisto->UpCount((float)buffer[offset]);
-                }
-             }
-         }
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
-         {
-            ossimRefPtr<ossimHistogram> currentHisto = histo->getHistogram(band);
-            ossim_sint16* buffer = (ossim_sint16*)getBuf(band);
-            
-            if(currentHisto.valid())
-            {
-               ossim_uint32 upperBound = getWidth()*getHeight();
-               for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-               {
-                  currentHisto->UpCount((float)buffer[offset]);
-               }
-            }
-         }
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
-         {
-            ossimRefPtr<ossimHistogram> currentHisto = histo->getHistogram(band);
-            ossim_sint32* buffer = (ossim_sint32*)getBuf(band);
-            
-            if(currentHisto.valid())
-            {
-               ossim_uint32 upperBound = getWidth()*getHeight();
-               for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-               {
-                  currentHisto->UpCount((float)buffer[offset]);
-               }
-            }
-         }
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
-         {
-            ossimRefPtr<ossimHistogram> currentHisto = histo->getHistogram(band);
-            ossim_uint32* buffer = (ossim_uint32*)getBuf(band);
-            
-            if(currentHisto.valid())
-            {
-               ossim_uint32 upperBound = getWidth()*getHeight();
-               for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-               {
-                  currentHisto->UpCount((float)buffer[offset]);
-               }
-            }
-         }
-         break;
-      }
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-      {
-         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
-         {
-            ossimRefPtr<ossimHistogram> currentHisto = histo->getHistogram(band);
-            ossim_float64* buffer = (ossim_float64*)getBuf(band);
-            
-            if(currentHisto.valid())
-            {
-               ossim_uint32 upperBound = getWidth()*getHeight();
-               for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-               {
-                  currentHisto->UpCount((float)buffer[offset]);
-               }
-            }
-         }
-         break;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-      {
-         for(ossim_uint32 band = 0; band < numberOfBands; ++band)
-         {
-            ossimRefPtr<ossimHistogram> currentHisto = histo->getHistogram(band);
-            ossim_float32* buffer = (ossim_float32*)getBuf(band);
-            
-            if(currentHisto.valid())
-            {
-               ossim_uint32 upperBound = getWidth()*getHeight();
-               for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-               {
-                  currentHisto->UpCount((float)buffer[offset]);
-               }
-            }
-         }
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         //ERROR
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimImageData::populateHistogram\n"
-            << "Unknown scalar type." << std::endl;
-      }
-   }  // end of switch
-}
-
-ossim_float64 ossimImageData::computeAverageBandValue(ossim_uint32 bandNumber) const
-{
-   ossim_float64 result = 0.0;
-   
-   switch (getScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         result = computeAverageBandValue(ossim_uint8(0),
-                                          bandNumber);
-         break;
-      }  
-      case OSSIM_SINT8:
-      {
-         result = computeAverageBandValue(ossim_sint8(0),
-                                          bandNumber);
-         break;
-      }  
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-      {
-         result = computeAverageBandValue(ossim_uint16(0),
-                                          bandNumber);
-         break;
-      }  
-      case OSSIM_SINT16:
-      {
-         result = computeAverageBandValue(ossim_sint16(0),
-                                          bandNumber);
-         break;
-      }  
-      case OSSIM_UINT32:
-      {
-         result = computeAverageBandValue(ossim_uint32(0),
-                                          bandNumber);
-         break;
-      }  
-      case OSSIM_SINT32:
-      {
-         result = computeAverageBandValue(ossim_sint32(0),
-                                          bandNumber);
-         break;
-      }  
-      case OSSIM_FLOAT32:
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         result = computeAverageBandValue(ossim_float32(0.0),
-                                          bandNumber);
-         break;
-      }  
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-      {
-         result = computeAverageBandValue(ossim_float64(0.0),
-                                          bandNumber);
-         break;
-      }  
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         setDataObjectStatus(OSSIM_STATUS_UNKNOWN);
-         ossimSetError(getClassName(),
-                       ossimErrorCodes::OSSIM_ERROR,
-                       "ossimImageData::computeAverageBandValue File %s line %d\n\
-Invalid scalar type:  %d",
-                       __FILE__,
-                       __LINE__,
-                       getScalarType());
-         break;
-      }
-   }
-
-   return result;
-}
-
-template <class T> ossim_float64 ossimImageData::computeAverageBandValue(
-   T, /* dummy */
-   ossim_uint32 bandNumber) const
-{
-   ossim_float64  result = 0.0;
-
-   if ( (getDataObjectStatus() == OSSIM_NULL) ||
-        (getDataObjectStatus() == OSSIM_EMPTY) )
-   {
-      return result;
-   }
-   
-   ossim_uint32 index = 0;
-   ossim_uint32 validPixelCount = 0;
-
-   const T* BUFFER = static_cast<const T*>(getBuf(bandNumber));
-   if(BUFFER)
-   {
-      const ossim_uint32 BOUNDS = getSizePerBand();
-      for(index = 0; index < BOUNDS; ++index)
-      {
-         if(!isNull(index))
-         {
-            result += BUFFER[index];
-            ++validPixelCount;
-         }
-      }
-      if(validPixelCount > 0)
-      {
-         result /= validPixelCount;
-      }
-   }
-
-   return result;
-}
-
-ossimDataObjectStatus ossimImageData::validate() const
-{
-   switch (getScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         return validate(ossim_uint8(0));
-      }
-      case OSSIM_SINT8:
-      {
-         return validate(ossim_sint8(0));
-      }
-         
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-      {
-         return validate(ossim_uint16(0));
-      }  
-      case OSSIM_SINT16:
-      {
-         return validate(ossim_sint16(0));
-      }
-         
-      case OSSIM_UINT32:
-      {
-         return validate(ossim_uint32(0));
-      }  
-      case OSSIM_SINT32:
-      {
-         return validate(ossim_sint32(0));
-      }  
-      case OSSIM_FLOAT32:
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         return validate(ossim_float32(0.0));
-      }
-         
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-      {
-         return validate(ossim_float64(0.0));
-      }  
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         setDataObjectStatus(OSSIM_STATUS_UNKNOWN);
-         break;
-      }
-   }
-
-   return OSSIM_STATUS_UNKNOWN;
-}
-
-template <class T>
-ossimDataObjectStatus ossimImageData::validate(T /* dummyTemplate */ ) const
-{
-   if (m_dataBuffer.size() == 0)
-   {
-      setDataObjectStatus(OSSIM_NULL);
-      return OSSIM_NULL;
-   }
-
-   ossim_uint32       count           = 0;
-   const ossim_uint32 SIZE            = getSize();
-   const ossim_uint32 BOUNDS          = getSizePerBand();
-   const ossim_uint32 NUMBER_OF_BANDS = getNumberOfBands();
-   
-   for(ossim_uint32 band = 0; band < NUMBER_OF_BANDS; ++band)
-   {
-      const T NP = static_cast<T>(m_nullPixelValue[band]);
-      const T* p = static_cast<const T*>(getBuf(band));
-      
-      for (ossim_uint32 i = 0; i < BOUNDS; ++i)
-      {
-         // check if the band is null
-         if (p[i] != NP) ++count;         
-      }
-   }
-
-   if (!count)
-      setDataObjectStatus(OSSIM_EMPTY);
-   else if (count == SIZE)
-      setDataObjectStatus(OSSIM_FULL);
-   else
-      setDataObjectStatus(OSSIM_PARTIAL);
-
-   return getDataObjectStatus();
-}
-
-void ossimImageData::makeBlank()
-{
-   if ( (m_dataBuffer.size() == 0) || (getDataObjectStatus() == OSSIM_EMPTY) )
-   {
-      return; // nothing to do...
-   }
-
-   switch (getScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         makeBlank(ossim_uint8(0));
-         return;
-      }  
-      case OSSIM_SINT8:
-      {
-         makeBlank(ossim_sint8(0));
-         return;
-      }  
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-      {
-         makeBlank(ossim_uint16(0));
-         return;
-      }  
-      case OSSIM_SINT16:
-      {
-         makeBlank(ossim_sint16(0));
-         return;
-      }  
-      case OSSIM_UINT32:
-      {
-         makeBlank(ossim_uint32(0));
-         return;
-      }
-      case OSSIM_SINT32:
-      {
-         makeBlank(ossim_sint32(0));
-         return;
-      }  
-      case OSSIM_FLOAT32:
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         makeBlank(ossim_float32(0.0));
-         return;
-      }  
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-      {
-         makeBlank(ossim_float64(0.0));
-         return;
-      }  
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         setDataObjectStatus(OSSIM_STATUS_UNKNOWN);
-         ossimSetError(getClassName(),
-                       ossimErrorCodes::OSSIM_ERROR,
-                       "ossimImageData::makeBlank File %s line %d\n\
-Invalid scalar type:  %d",
-                       __FILE__,
-                       __LINE__,
-                       getScalarType());
-         break;
-      }
-   }
-}
-
-template <class T> void ossimImageData::makeBlank(T /* dummyTemplate */ )
-{
-   // Note: Empty buffer or already OSSIM_EMPTY checked in public method.
-   
-   const ossim_uint32 BANDS = getNumberOfBands();
-   const ossim_uint32 SPB   = getSizePerBand();
-   ossim_uint32 sizePerBandInBytes = getSizePerBandInBytes();
-   for(ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      const T NP = static_cast<T>(m_nullPixelValue[band]);
-      if(NP == 0.0)
-      {
-         // do an optimize byte fill
-         memset(getBuf(band), '\0', sizePerBandInBytes);
-      }
-      else
-      {
-         // slower assign call
-         T* p = static_cast<T*>(getBuf(band));
-         for (ossim_uint32 i = 0; i < SPB; ++i)
-         {
-            p[i] = NP;
-         }
-      }
-   }
-   
-   setDataObjectStatus(OSSIM_EMPTY);
-}
-
-void ossimImageData::initialize()
-{
-   // let the base class allocate a buffer
-   ossimRectilinearDataObject::initialize();
-   
-   if (m_dataBuffer.size() > 0)
-   {
-      makeBlank();  // Make blank will set the status.
-   }
-}
-
-// Write the tile out to disk with a general raster header file.
-bool ossimImageData::write(const ossimFilename& f) const
-{
-   bool result = false;
-
-   std::ofstream os;
-   os.open(f.c_str(), ios::out | ios::binary);
-   if (os.good())
-   {
-      // Write the tile out.
-      os.write(static_cast<const char*>(getBuf()),
-               static_cast<std::streamsize>(getSizeInBytes()));
-      
-      result = os.good();
-      if (result)
-      {
-         // Write a header file that we can use to read the tile.
-         os.close();
-         ossimFilename hdrFile = f;
-         hdrFile.setExtension("hdr");
-         os.open(hdrFile.c_str(), ios::out);
-         result = os.good();
-         if (result)
-         {
-            os << "filename: " << f.c_str()
-               << "\nimage_type:  general_raster_bsq"
-               << "\nindexed: " << m_indexedFlag               
-               << "\ninterleave_type:  bsq"
-               << "\norigin: " << m_origin
-               << "\nnumber_bands: " << ossimString::toString(getNumberOfBands())
-               << "\nnumber_lines: " << ossimString::toString(getHeight())
-               << "\nnumber_samples: " << ossimString::toString(getWidth())
-               << "\nscalar_type: "
-               << ossimScalarTypeLut::instance()->getEntryString(getScalarType())
-               << "\n";
-            for(ossim_uint32 band=0; band < getNumberOfBands(); ++band)
-            {
-               ossimString bs = "band";
-               bs += ossimString::toString(band+1); 
-               os << bs.c_str() << ".min_value: " << m_minPixelValue[band] << "\n"
-                  << bs.c_str() << ".max_value: " << m_maxPixelValue[band] << "\n"
-                  << bs.c_str() << ".null_value: " << m_nullPixelValue[band]
-                  << std::endl;
-            }
-         }
-      }
-   }
-   os.close();
-   
-   return result;
-}
-
-bool ossimImageData::isWithin(ossim_int32 x, ossim_int32 y)
-{
-   return ((x >= m_origin.x) &&
-           (x <  m_origin.x + static_cast<ossim_int32>(m_spatialExtents[0])) &&
-           (y >= m_origin.y) &&
-           (y <  m_origin.y + static_cast<ossim_int32>(m_spatialExtents[1])));
-           
-}
-
-void ossimImageData::setValue(ossim_int32 x, ossim_int32 y, ossim_float64 color)
-{
-   if(m_dataBuffer.size() > 0 && isWithin(x, y))
-   {
-      ossim_uint32 band=0;
-
-      //***
-      // Compute the offset into the buffer for (x,y).  This should always
-      // come out positive.
-      //***
-      ossim_uint32 ux = static_cast<ossim_uint32>(x - m_origin.x);
-      ossim_uint32 uy = static_cast<ossim_uint32>(y - m_origin.y);
-      
-      ossim_uint32 offset = uy * m_spatialExtents[0] + ux;
-      
-      switch (getScalarType())
-      {
-         case OSSIM_UINT8:
-         {
-            for(band = 0; band < m_numberOfDataComponents; band++)
-            {
-               unsigned char* buf = static_cast<unsigned char*>(getBuf(band))+
-                  offset;
-               *buf = (unsigned char)color;
-            }
-            break;
-         }
-         case OSSIM_SINT8:
-         {
-            for(band = 0; band < m_numberOfDataComponents; band++)
-            {
-               ossim_sint8* buf = static_cast<ossim_sint8*>(getBuf(band))+
-                  offset;
-               *buf = (ossim_sint8)color;
-            }
-            break;
-         }
-         case OSSIM_UINT16:
-         case OSSIM_USHORT11:
-         {
-            for(band = 0; band < m_numberOfDataComponents; band++)
-            {
-               ossim_uint16* buf = static_cast<ossim_uint16*>(getBuf(band))+
-                  offset;
-               *buf = (ossim_uint16)color;
-            }
-            break;
-         }
-         case OSSIM_SINT16:
-         {
-            for(band = 0; band < m_numberOfDataComponents; band++)
-            {
-               signed short* buf = static_cast<signed short*>(getBuf(band))+
-                  offset;
-               *buf = (signed short)color;
-            }
-            break;
-         }
-         case OSSIM_UINT32:
-         {
-            for(band = 0; band < m_numberOfDataComponents; band++)
-            {
-               ossim_uint32* buf = static_cast<ossim_uint32*>(getBuf(band))+
-                  offset;
-               *buf = (ossim_uint32)color;
-            }
-            break;
-         }
-         case OSSIM_SINT32:
-         {
-            for(band = 0; band < m_numberOfDataComponents; band++)
-            {
-               ossim_sint32* buf = static_cast<ossim_sint32*>(getBuf(band))+
-                  offset;
-               *buf = (ossim_sint32)color;
-            }
-            break;
-         }
-         case OSSIM_NORMALIZED_FLOAT:
-         case OSSIM_FLOAT32:
-         {
-            for(band = 0; band < m_numberOfDataComponents; band++)
-            {
-               ossim_float32* buf = static_cast<ossim_float32*>(getBuf(band))+offset;
-               *buf = (ossim_float32)color;
-            }
-            break;
-         }
-         case OSSIM_FLOAT64:
-         case OSSIM_NORMALIZED_DOUBLE:
-         {
-            for(band = 0; band < m_numberOfDataComponents; band++)
-            {
-               ossim_float64* buf = static_cast<ossim_float64*>(getBuf(band))+offset;
-               *buf = color;
-            }
-            break;
-         }
-         case OSSIM_SCALAR_UNKNOWN:
-         default:
-         {
-            //ERROR
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimImageData::setValue Unsupported scalar type!"
-               << std::endl;
-            
-         }
-         
-      } // End of:  switch (getScalarType())
-   }
-}
-
-void ossimImageData::initializeDefaults()
-{
-   initializeMinDefault();
-   initializeMaxDefault();
-   initializeNullDefault();
-}
-
-void ossimImageData::initializeMinDefault()
-{
-   if(!m_numberOfDataComponents)
-   {
-      return;
-   }
-
-   m_minPixelValue.resize(m_numberOfDataComponents);
-
-   ossim_float64 value = ossim::defaultMin( getScalarType() );
-   
-   for(ossim_uint32 band = 0; band < m_numberOfDataComponents; ++band)
-   {
-      m_minPixelValue[band]  = value;
-   }
-}
-
-void ossimImageData::initializeMaxDefault()
-{
-   if(!m_numberOfDataComponents)
-   {
-      return;
-   }
-
-   m_maxPixelValue.resize(m_numberOfDataComponents);
-
-   ossim_float64 value = ossim::defaultMax( getScalarType() );
-      
-   for(ossim_uint32 band = 0; band < m_numberOfDataComponents; ++band)
-   {
-      m_maxPixelValue[band]  = value;
-   }
-}
-
-void ossimImageData::initializeNullDefault()
-{
-   if(!m_numberOfDataComponents)
-   {
-      return;
-   }
-
-   m_nullPixelValue.resize(m_numberOfDataComponents);
-
-   ossim_float64 value = ossim::defaultNull( getScalarType() );
-   
-   for(ossim_uint32 band = 0; band < m_numberOfDataComponents; ++band)
-   {
-      m_nullPixelValue[band]  = value;
-   }
-}
-
-bool ossimImageData::isEqualTo(const ossimDataObject& rhs,
-                               bool deepTest)const
-{
-   ossimImageData* rhsPtr = PTR_CAST(ossimImageData, &rhs);
-   if(!(&rhs)||(!rhsPtr)) return false;
-   bool result = ( (m_scalarType         == rhsPtr->m_scalarType)&&
-                   (m_numberOfDataComponents == rhsPtr->m_numberOfDataComponents)&&
-                   (m_origin             == rhsPtr->m_origin)&&
-                   (getWidth()            == rhsPtr->getWidth())&&
-                   (getHeight()           == rhsPtr->getHeight()));
-
-   if(result)
-   {
-      bool test=true;
-      for(ossim_uint32 index = 0; index < m_numberOfDataComponents; ++index)
-      {
-         if(m_minPixelValue[index] != rhsPtr->m_minPixelValue[index])
-         {
-            test = false;
-            break;
-         }
-         if(m_maxPixelValue[index] != rhsPtr->m_maxPixelValue[index])
-         {
-            test = false;
-            break;
-         }
-         if(m_nullPixelValue[index] != rhsPtr->m_nullPixelValue[index])
-         {
-            test = false;
-            break;
-         }
-      }
-      result = test;
-   }
-   if(deepTest&&result)
-   {
-      if(getBuf() != 0 && rhsPtr->getBuf() != 0)
-      {
-         if(memcmp(getBuf(), rhsPtr->getBuf(), getSizeInBytes()) != 0)
-         {
-            result = false;
-         }
-      }
-      else if(getBuf() == 0 && rhsPtr->getBuf() == 0)
-      {
-         // nothing both are null so don't change the result.
-      }
-      else // one is null so not equal.
-      {
-         result = false;
-      }
-   }
-
-   return result;
-}
-
-ossimString ossimImageData::getScalarTypeAsString() const
-{
-   return ossimScalarTypeLut::instance()->getEntryString(getScalarType());
-}
-
-ossim_uint32 ossimImageData::getNumberOfBands() const
-{
-   return getNumberOfDataComponents();
-}
-
-ossim_float64 ossimImageData::getPix(const ossimIpt& position,
-                              ossim_uint32 band) const
-{
-   ossimIpt relative( position.x - m_origin.x,
-                      position.y - m_origin.y);
-   return getPix((m_spatialExtents[0])*relative.y + relative.x, band);
-}
-
-ossim_float64 ossimImageData::getPix(ossim_uint32 offset, ossim_uint32 band) const
-{
-   switch(m_scalarType)
-   {
-      case OSSIM_UINT8:
-      {
-         const ossim_uint8* buf = getUcharBuf(band);
-         if(buf)
-         {
-            return (ossim_float64)buf[offset];
-         }
-      }
-      case OSSIM_SINT8:
-      {
-         const ossim_sint8* buf = static_cast<const ossim_sint8*>(getBuf(band));
-         if(buf)
-         {
-            return (ossim_float64)buf[offset];
-         }
-      }
-      case OSSIM_USHORT11:
-      case OSSIM_UINT16:
-      {
-         const ossim_uint16* buf = getUshortBuf(band);
-         if(buf)
-         {
-            return (ossim_float64)buf[offset];
-         }
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         const ossim_sint16* buf = getSshortBuf(band);
-         if(buf)
-         {
-            return (ossim_float64)buf[offset];
-         }
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-         const ossim_sint32* buf = static_cast<const ossim_sint32*>(getBuf(band));
-         if(buf)
-         {
-            return (ossim_float64)buf[offset];
-         }
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         const ossim_uint32* buf = static_cast<const ossim_uint32*>(getBuf(band));
-         if(buf)
-         {
-            return (ossim_float64)buf[offset];
-         }
-         break;
-      }
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-      {
-         const ossim_float64* buf = getDoubleBuf(band);
-         if(buf)
-         {
-            return (ossim_float64)buf[offset];
-         }      
-         break;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-      {
-         const ossim_float32* buf = getFloatBuf(band);
-         if(buf)
-         {
-            return (ossim_float64)buf[offset];
-         }
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-         // Shouldn't hit this.
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimImageData::fill Unsupported scalar type!"
-            << std::endl;   
-   }
-
-   return 0.0;
-}
-
-void ossimImageData::fill(ossim_uint32 band, ossim_float64 value)
-{
-   void* s         = getBuf(band);
-
-   if (s == 0) return; // nothing to do...
-
-   ossim_uint32 size_in_pixels = getWidth()*getHeight();
-   
-   switch (getScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         ossim_uint8* p = getUcharBuf(band);
-         ossim_uint8 np = static_cast<ossim_uint8>(value);
-         for (ossim_uint32 i=0; i<size_in_pixels; i++) p[i] = np;
-         
-         break;
-      }
-      case OSSIM_SINT8:
-      {
-         ossim_sint8* p = static_cast<ossim_sint8*>(getBuf(band));
-         ossim_sint8 np = static_cast<ossim_sint8>(value);
-         for (ossim_uint32 i=0; i<size_in_pixels; i++) p[i] = np;
-         
-         break;
-      }
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-      {
-         ossim_uint16* p = getUshortBuf(band);
-         ossim_uint16 np = static_cast<ossim_uint16>(value);
-         for (ossim_uint32 i=0; i<size_in_pixels; i++) p[i] = np;
-         
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         ossim_sint16* p = getSshortBuf(band);
-         ossim_sint16 np = static_cast<ossim_sint16>(value);
-         for (ossim_uint32 i=0; i<size_in_pixels; i++) p[i] = np;
-         
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         ossim_uint32* p = static_cast<ossim_uint32*>(getBuf(band));
-         ossim_uint32 np = static_cast<ossim_uint32>(value);
-         for (ossim_uint32 i=0; i<size_in_pixels; i++) p[i] = np;
-         
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-         ossim_sint32* p = static_cast<ossim_sint32*>(getBuf(band));
-         ossim_sint32 np = static_cast<ossim_sint32>(value);
-         for (ossim_uint32 i=0; i<size_in_pixels; i++) p[i] = np;
-         
-         break;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-      {
-         ossim_float32* p = getFloatBuf(band);
-         ossim_float32 np = static_cast<ossim_float32>(value);
-         for (ossim_uint32 i=0; i<size_in_pixels; i++) p[i] = np;
-         
-         break;
-      }
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-      {
-         ossim_float64* p = getDoubleBuf(band);
-         ossim_float64 np = static_cast<ossim_float64>(value);
-         for (ossim_uint32 i=0; i<size_in_pixels; i++) p[i] = np;
-         
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-         ossimSetError(getClassName(),
-                       ossimErrorCodes::OSSIM_ERROR,
-                       "ossimImageData::makeBlank File %s line %d\n\
-Invalid scalar type:  %d",
-                       __FILE__,
-                       __LINE__,
-                       getScalarType());
-         return;
-   }
-   
-   setDataObjectStatus(OSSIM_EMPTY);
-   
-}
-
-void ossimImageData::fill(ossim_float64 value)
-{
-   ossim_uint32 valueNullCount= 0;
-   for(ossim_uint32 band=0; band < getNumberOfBands(); ++band)
-   {
-      if (value == m_nullPixelValue[band])
-      {
-         ++valueNullCount;
-      }
-      
-      fill(band, value);
-   }
-
-   if (valueNullCount==0)
-   {
-      setDataObjectStatus(OSSIM_FULL);
-   }
-   else if(valueNullCount==getNumberOfBands())
-   {
-      setDataObjectStatus(OSSIM_EMPTY);
-   }
-   else
-   {
-      setDataObjectStatus(OSSIM_PARTIAL);
-   }
-}
-
-bool ossimImageData::isNull(ossim_uint32 offset)const
-{
-   ossim_uint32 numberOfBands = getNumberOfBands();
-   ossim_uint32 band=0;
-   if(!getBuf())
-   {
-      return true;
-   }
-
-   switch(getScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         for(band = 0; band < numberOfBands; ++band)  
-         {
-            const ossim_uint8* buf = static_cast<const ossim_uint8*>(getBuf(band))+offset;
-            if((*buf) != (ossim_uint8)getNullPix(band))
-            {
-               return false;
-            }
-         }
-         break;
-      }
-      case OSSIM_SINT8:
-      {
-         for(band = 0; band < numberOfBands; ++band)  
-         {
-            const ossim_sint8* buf = static_cast<const ossim_sint8*>(getBuf(band))+offset;
-            if((*buf) != (ossim_uint8)getNullPix(band))
-            {
-               return false;
-            }
-         }
-         break;
-      }
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-      {
-         for(band = 0; band < numberOfBands; band++)
-         {
-            const ossim_uint16* buf = static_cast<const ossim_uint16*>(getBuf(band))+offset;
-            if((*buf) != (ossim_uint16)getNullPix(band))
-            {
-               return false;
-            }
-         }
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         for(band = 0; band < numberOfBands; band++)
-         {
-            const ossim_sint16* buf = static_cast<const ossim_sint16*>(getBuf(band))+offset;
-            if((*buf) != (ossim_sint16)getNullPix(band))
-            {
-               return false;
-            }
-         }
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         for(band = 0; band < numberOfBands; band++)
-         {
-            const ossim_uint32* buf = static_cast<const ossim_uint32*>(getBuf(band))+offset;
-            if((*buf) != (ossim_uint32)getNullPix(band))
-            {
-               return false;
-            }
-         }
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-         for(band = 0; band < numberOfBands; band++)
-         {
-            const ossim_sint32* buf = static_cast<const ossim_sint32*>(getBuf(band))+offset;
-            if((*buf) != (ossim_sint32)getNullPix(band))
-            {
-               return false;
-            }
-         }
-         break;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         for(band = 0; band < numberOfBands; band++)
-         {
-            const ossim_float32* buf = static_cast<const ossim_float32*>(getBuf(band))+offset;
-            if((*buf) != 0.0)
-            {
-               return false;
-            }
-         }
-         break;
-      }
-      case OSSIM_FLOAT32:
-      {
-         for(band = 0; band < numberOfBands; band++)
-         {
-            const ossim_float32* buf = static_cast<const ossim_float32*>(getBuf(band))+offset;
-            if((*buf) != (ossim_float32)getNullPix(band))
-            {
-               return false;
-            }
-         }
-         break;
-      }
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         for(band = 0; band < numberOfBands; band++)
-         {
-            const ossim_float64* buf = static_cast<const ossim_float64*>(getBuf(band))+offset;
-            if((*buf) != 0.0)
-            {
-               return false;
-            }
-         }
-         break;
-      }
-      case OSSIM_FLOAT64:
-      {
-         for(band = 0; band < numberOfBands; band++)
-         {
-            const ossim_float64* buf = static_cast<const ossim_float64*>(getBuf(band))+offset;
-            if((*buf) != getNullPix(band))
-            {
-               return false;
-            }
-         }
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         //ERROR
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimImageData::isNull Unsupported scalar type!"
-            << std::endl;
-      }
-   }
-   return true;
-}
-
-bool ossimImageData::isNull(ossim_uint32 offset, ossim_uint32 band)const
-{
-   switch(getScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         const ossim_uint8* buf =
-            static_cast<const ossim_uint8*>(getBuf(band))+offset;
-         
-         if((*buf) != (ossim_uint8)getNullPix(band))
-         {
-            return false;
-         }
-         break;
-      }
-      case OSSIM_SINT8:
-      {
-         const ossim_sint8* buf =
-            static_cast<const ossim_sint8*>(getBuf(band))+offset;
-         
-         if((*buf) != (ossim_sint8)getNullPix(band))
-         {
-            return false;
-         }
-         break;
-      }
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-      {
-         const ossim_uint16* buf =
-            static_cast<const ossim_uint16*>(getBuf(band))+offset;
-         if((*buf) != (ossim_uint16)getNullPix(band))
-         {
-            return false;
-         }
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         const ossim_sint16* buf =
-            static_cast<const ossim_sint16*>(getBuf(band))+offset;
-         if((*buf) != (ossim_sint16)getNullPix(band))
-         {
-            return false;
-         }
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         const ossim_uint32* buf =
-            static_cast<const ossim_uint32*>(getBuf(band))+offset;
-         if((*buf) != (ossim_uint32)getNullPix(band))
-         {
-            return false;
-         }
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-         const ossim_sint32* buf =
-            static_cast<const ossim_sint32*>(getBuf(band))+offset;
-         if((*buf) != (ossim_sint32)getNullPix(band))
-         {
-            return false;
-         }
-         break;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-      {
-         const ossim_float32* buf = static_cast<const ossim_float32*>(getBuf(band))+offset;
-         if((*buf) != (ossim_float32)getNullPix(band))
-         {
-            return false;
-         }
-         break;
-      }
-      case OSSIM_FLOAT64:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         const ossim_float64* buf = static_cast<const ossim_float64*>(getBuf(band))+offset;
-         if((*buf) != getNullPix(band))
-         {
-            return false;
-         }
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         //ERROR
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimImageData::isNull Unsupported scalar type!"
-            << std::endl;
-      }
-   }
-   return true;
-}
-
-bool ossimImageData::isNull(const ossimIpt& pt)const
-{
-   ossim_int32 xNew = (pt.x - m_origin.x);
-   ossim_int32 yNew = (pt.y - m_origin.y);
-   if(xNew < 0 || xNew >= static_cast<ossim_int32>(m_spatialExtents[0]) ||
-      yNew < 0 || yNew >= static_cast<ossim_int32>(m_spatialExtents[1]) )
-   {
-      return true;
-   }
-   ossim_uint32 offset = getWidth()*yNew + xNew;
-   
-   return isNull(offset);
-}
-
-bool ossimImageData::isNull(const ossimIpt& pt, ossim_uint32 band)const
-{
-   ossim_int32 xNew = (pt.x - m_origin.x);
-   ossim_int32 yNew = (pt.y - m_origin.y);
-   if(xNew < 0 || xNew >= static_cast<ossim_int32>(m_spatialExtents[0]) ||
-      yNew < 0 || yNew >= static_cast<ossim_int32>(m_spatialExtents[1]) )
-   {
-      return true;
-   }
-   ossim_uint32 offset = getWidth()*yNew + xNew;
-
-   return isNull(offset, band);
-}
-
-void ossimImageData::setNull(ossim_uint32 offset)
-{
-   ossim_uint32 numberOfBands = getNumberOfBands();
-   ossim_uint32 band=0;
-   switch(getScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         for(band = 0; band < numberOfBands; ++band)  
-         {
-            ossim_uint8* buf = static_cast<ossim_uint8*>(getBuf(band))+offset;
-            *buf       = (ossim_uint8)getNullPix(band);
-         }
-         break;
-      }
-      case OSSIM_SINT8:
-      {
-         for(band = 0; band < numberOfBands; ++band)  
-         {
-            ossim_sint8* buf = static_cast<ossim_sint8*>(getBuf(band))+offset;
-            *buf       = (ossim_sint8)getNullPix(band);
-         }
-         break;
-      }
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-      {
-         for(band = 0; band < numberOfBands; band++)
-         {
-            ossim_uint16* buf = static_cast<ossim_uint16*>(getBuf(band))+
-               offset;
-            *buf = (ossim_uint16)getNullPix(band);
-         }
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         for(band = 0; band < numberOfBands; band++)
-         {
-            ossim_sint16* buf = static_cast<ossim_sint16*>(getBuf(band))+
-               offset;
-            *buf = (ossim_sint16)getNullPix(band);
-         }
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         for(band = 0; band < numberOfBands; band++)
-         {
-            ossim_uint32* buf = static_cast<ossim_uint32*>(getBuf(band))+
-               offset;
-            *buf = (ossim_uint32)getNullPix(band);
-         }
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-         for(band = 0; band < numberOfBands; band++)
-         {
-            ossim_sint32* buf = static_cast<ossim_sint32*>(getBuf(band))+
-               offset;
-            *buf = (ossim_sint32)getNullPix(band);
-         }
-         break;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-      {
-         for(band = 0; band < numberOfBands; band++)
-         {
-            ossim_float32* buf = static_cast<ossim_float32*>(getBuf(band))+offset;
-            *buf = (ossim_float32)getNullPix(band);
-         }
-         break;
-      }
-      case OSSIM_FLOAT64:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         for(band = 0; band < numberOfBands; band++)
-         {
-            ossim_float64* buf = static_cast<ossim_float64*>(getBuf(band))+offset;
-            *buf = getNullPix(band);
-         }
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         //ERROR
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimImageData::isNull Unsupported scalar type!"
-            << std::endl;
-      }
-   }
-}
-
-void ossimImageData::setNull(ossim_uint32 offset, ossim_uint32 band)
-{
-   switch(getScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         ossim_uint8* buf = static_cast<ossim_uint8*>(getBuf(band))+offset;
-         *buf       = (ossim_uint8)getNullPix(band);
-         break;
-      }
-      case OSSIM_SINT8:
-      {
-         ossim_sint8* buf = static_cast<ossim_sint8*>(getBuf(band))+offset;
-         *buf       = (ossim_sint8)getNullPix(band);
-         break;
-      }
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-      {
-         ossim_uint16* buf = static_cast<ossim_uint16*>(getBuf(band))+offset;
-         *buf = (ossim_uint16)getNullPix(band);
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         ossim_sint16* buf = static_cast<ossim_sint16*>(getBuf(band))+offset;
-         *buf = (ossim_sint16)getNullPix(band);
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         ossim_uint32* buf = static_cast<ossim_uint32*>(getBuf(band))+offset;
-         *buf       = (ossim_uint32)getNullPix(band);
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-         ossim_sint32* buf = static_cast<ossim_sint32*>(getBuf(band))+offset;
-         *buf       = (ossim_sint32)getNullPix(band);
-         break;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-      {
-         ossim_float32* buf = static_cast<ossim_float32*>(getBuf(band))+offset;
-         *buf = (ossim_float32)getNullPix(band);
-         break;
-      }
-      case OSSIM_FLOAT64:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         ossim_float64* buf = static_cast<ossim_float64*>(getBuf(band))+offset;
-         *buf = getNullPix(band);
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         //ERROR
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimImageData::isNull Unsupported scalar type!"
-            << std::endl;
-      }
-   }
-}
-
-void ossimImageData::setNull(const ossimIpt& pt)
-{
-   ossim_int32 xNew = (pt.x - m_origin.x);
-   ossim_int32 yNew = (pt.y - m_origin.y);
-   
-   if(xNew < 0 || xNew >= (int)m_spatialExtents[0] ||
-      yNew < 0 || yNew >= (int)m_spatialExtents[1])
-   {
-      return;
-   }
-   ossim_uint32 offset = ((int)getWidth())*yNew + xNew;
-   
-   setNull(offset);
-}
-
-void ossimImageData::setNull(const ossimIpt& pt, ossim_uint32 band)
-{
-   ossim_int32 xNew = (pt.x - m_origin.x);
-   ossim_int32 yNew = (pt.y - m_origin.y);
-   
-   if(xNew < 0 || xNew >= (int)m_spatialExtents[0] ||
-      yNew < 0 || yNew >= (int)m_spatialExtents[1])
-   {
-      return;
-   }
-   ossim_uint32 offset = ((int)getWidth())*yNew + xNew;
-   
-   setNull(offset, band);
-}
-
-void ossimImageData::setNullPix(ossim_float64 null_pix)
-{
-   if(!m_numberOfDataComponents)
-   {
-      return;
-   }
-   m_nullPixelValue.resize(m_numberOfDataComponents);
-   for(ossim_uint32 band = 0; band < m_numberOfDataComponents; ++band)
-   {
-      m_nullPixelValue[band] = null_pix;
-   }
-}
-
-void ossimImageData::setNullPix(ossim_float64 null_pix, ossim_uint32 band)
-{
-   if( !m_numberOfDataComponents || (band >= m_numberOfDataComponents) )
-   {
-      return;
-   }
-   if (m_nullPixelValue.size() != m_numberOfDataComponents)
-   {
-      initializeNullDefault();
-   }
-   m_nullPixelValue[band] = null_pix;
-}
-
-void ossimImageData::setNullPix(const ossim_float64* nullPixArray,
-                                ossim_uint32 numberOfValues)
-{
-   if(!nullPixArray || !m_numberOfDataComponents)
-   {
-      return;
-   }
-
-   if (m_nullPixelValue.size() != m_numberOfDataComponents)
-   {
-      initializeNullDefault();
-   }
-   
-   for(ossim_uint32 band = 0;
-       (band < numberOfValues) && (band < m_numberOfDataComponents);
-       ++band)
-   {
-      m_nullPixelValue[band] = nullPixArray[band];
-   }
-}
-
-void ossimImageData::setMinPix(ossim_float64 min_pix)
-{
-   if(!m_numberOfDataComponents)
-   {
-      return;
-   }
-   m_minPixelValue.resize(m_numberOfDataComponents);
-   for(ossim_uint32 band = 0; band < m_minPixelValue.size(); ++band)
-   {
-      m_minPixelValue[band] = min_pix;
-   }
-}
-
-void ossimImageData::setMinPix(ossim_float64 min_pix, ossim_uint32 band)
-{
-   if( !m_numberOfDataComponents || (band >= m_numberOfDataComponents) )
-   {
-      return;
-   }
-   if (m_minPixelValue.size() != m_numberOfDataComponents)
-   {
-      initializeMinDefault();
-   }
-   m_minPixelValue[band] = min_pix;
-}
-
-void ossimImageData::setMinPix(const ossim_float64* minPixArray,
-                               ossim_uint32 numberOfValues)
-{
-   if( !minPixArray || !m_numberOfDataComponents )
-   {
-      return;
-   }
-
-   if (m_minPixelValue.size() != m_numberOfDataComponents)
-   {
-      initializeMinDefault();
-   }
-   
-   for(ossim_uint32 band = 0;
-       (band < numberOfValues) && (band < m_numberOfDataComponents);
-       ++band)
-   {
-      m_minPixelValue[band] = minPixArray[band];
-   }
-}
-
-void ossimImageData::setMaxPix(ossim_float64 max_pix)
-{
-   if(!m_numberOfDataComponents)
-   {
-      return;
-   }
-   m_maxPixelValue.resize(m_numberOfDataComponents);
-   for(ossim_uint32 band = 0; band < m_numberOfDataComponents; ++band)
-   {
-      m_maxPixelValue[band] = max_pix;
-   }
-}
-
-void ossimImageData::setMaxPix(ossim_float64 max_pix, ossim_uint32 band)
-{
-   if( !m_numberOfDataComponents || (band >= m_numberOfDataComponents) )
-   {
-      return;
-   }
-   if (m_maxPixelValue.size() != m_numberOfDataComponents)
-   {
-      initializeMaxDefault();
-   }
-   m_maxPixelValue[band] = max_pix;
-}
-
-void ossimImageData::setMaxPix(const ossim_float64* maxPixArray,
-                               ossim_uint32 /* numberOfValues */)
-{
-   if(!maxPixArray || !m_numberOfDataComponents )
-   {
-      return;
-   }
-
-   if (m_maxPixelValue.size() != m_numberOfDataComponents)
-   {
-      initializeMaxDefault();
-   }
-   
-   for(ossim_uint32 band = 0;
-       (band < m_numberOfDataComponents) &&
-          (band < m_numberOfDataComponents);
-       ++band)
-   {
-      m_maxPixelValue[band] = maxPixArray[band];
-   }
-}
-
-void ossimImageData::setNumberOfBands(ossim_uint32 bands,
-                                      bool reallocate)
-{
-   ossim_uint32 b  = getNumberOfBands();
-   if(bands && (b != bands))
-   {
-      setNumberOfDataComponents(bands);
-      if(reallocate)
-      {
-         ossimRectilinearDataObject::initialize();
-      }
-      
-      ossim_uint32 minBands = ossim::min(b, bands);
-
-
-      vector<ossim_float64> newNull(bands);
-      vector<ossim_float64> newMin(bands);
-      vector<ossim_float64> newMax(bands);
-
-      ossim_uint32 i = 0;
-      while (i < minBands)
-      {
-         newNull[i] = m_nullPixelValue[i];
-         newMin[i]  = m_minPixelValue[i];
-         newMax[i]  = m_maxPixelValue[i];
-         ++i;
-      }
-
-      if(b)
-      {
-        while (i < bands)
-        {
-           newNull[i] = m_nullPixelValue[b-1];
-           newMin[i]  = m_minPixelValue[b-1];
-           newMax[i]  = m_maxPixelValue[b-1];
-           ++i;
-        }
-      }
-      
-      m_nullPixelValue = newNull;
-      m_minPixelValue  = newMin;
-      m_maxPixelValue  = newMax;
-   }
-}
-
-void ossimImageData::setImageRectangleAndBands(const ossimIrect& rect,
-                                               ossim_uint32 numberOfBands)
-{
-   if(rect.hasNans())
-   {
-      return;
-   }
-   
-   ossim_uint32 bands   = getNumberOfBands();
-   ossim_uint32 w       = getWidth();
-   ossim_uint32 h       = getHeight();
-   ossim_uint32 nw      = rect.width();
-   ossim_uint32 nh      = rect.height();
-
-   setOrigin(rect.ul());
-   setWidthHeight(nw, nh);
-   setNumberOfBands(numberOfBands, false);
-   
-   // we will try to be non destructive on the resize of the number of bands
-   if( ( (w*h != nw*nh)  || ( bands != numberOfBands) ) &&
-       (theDataObjectStatus != OSSIM_NULL) )
-   {
-      initialize();
-   }
-}
-
-void ossimImageData::setImageRectangle(const ossimIrect& rect)
-{
-   if(rect.hasNans())
-   {
-      return;
-   }
-   
-   ossim_uint32 w  = getWidth();
-   ossim_uint32 h  = getHeight();
-   ossim_uint32 nw = rect.width();
-   ossim_uint32 nh = rect.height();
-
-   setOrigin(rect.ul());
-   setWidthHeight(nw, nh);
-
-   // we will try to be non destructive on the resize of the number of bands
-   if ( (w*h != nw*nh) && (theDataObjectStatus != OSSIM_NULL) )
-   {
-      initialize();
-   }
-}
-
-void ossimImageData::assign(const ossimDataObject* data)
-{
-   if(!data) return;
-   ossimImageData* d = PTR_CAST(ossimImageData, data);
-   if(d)
-   {
-      assign(d);
-   }
-}
-
-void ossimImageData::assign(const ossimImageData* data)
-{
-   ossimSource* tmp_owner = getOwner();
-   
-   ossimRectilinearDataObject::assign(data);
-
-   //***
-   // The data member "theSource" will be overwritten so capture it and then
-   // set it back.
-   //***
-   setOwner(tmp_owner);
-
-   if(this != data)
-   {
-      ossim_uint32 numberOfBands = getNumberOfBands();
-      if(!numberOfBands)
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimImageData::assign\n"
-            << "Number of components is 0, can't assign" << std::endl;
-         return;
-      }
-      m_origin = data->m_origin;
-
-      m_minPixelValue  = data->m_minPixelValue;
-      m_maxPixelValue  = data->m_maxPixelValue;
-      m_nullPixelValue = data->m_nullPixelValue;
-
-      if (m_minPixelValue.size() == 0 ||
-          m_maxPixelValue.size() == 0 ||
-          m_nullPixelValue.size() == 0)
-      {
-         initializeDefaults();
-      }
-   }
-}
-
-void ossimImageData::assignBand(const ossimImageData* data,
-                                ossim_uint32 source_band,
-                                ossim_uint32 output_band)
-{
-   //***
-   // This method requires this image data to be initialized to the same
-   // size as the source data being copied.
-   //***
-
-   // Some basic error checking...
-   if ( !data->isValidBand(source_band) )
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::assignBand ERROR:"
-         << "\nInvalid source band!" << std::endl;
-      return;
-   }
-   if ( !isValidBand(output_band) )
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::assignBand ERROR:"
-         << "\nInvalid output band!" << std::endl;
-      return;
-   }
-   if (data->getDataObjectStatus() == OSSIM_NULL)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::assignBand ERROR:"
-         << "\nSource data status is null!" << std::endl;
-      return;
-   }
-   if (getDataObjectStatus() == OSSIM_NULL)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::assignBand ERROR:"
-         << "\nThis status is null!" << std::endl;
-      return;
-   }
-   
-   //***
-   // Make sure this buffer is the same size; if not, return.
-   //***
-   ossim_uint32 source_size = data->getSizePerBandInBytes();
-      
-   if ( source_size != getSizePerBandInBytes() )
-   {
-      return;
-   }
-
-   // Get the pointers to the bands.
-   const void*  s = data->getBuf(source_band);
-   void*        d = getBuf(output_band);
-
-   // One last check.
-   if (s == 0 || d == 0)
-   {
-      return;
-   }
-
-   // Ok copy the image data...
-   memcpy(d, s, source_size);
-}
-
-void ossimImageData::loadBand(const void* src,
-                              const ossimIrect& src_rect,
-                              ossim_uint32 band)
-{
-   // Call the appropriate load method.
-   switch (getScalarType())
-   {
-      case OSSIM_UINT8:
-         loadBandTemplate(ossim_uint8(0), src, src_rect, band);
-         return;
-
-      case OSSIM_SINT8:
-         loadBandTemplate(ossim_sint8(0), src, src_rect, band);
-         return;
-         
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-         loadBandTemplate(ossim_uint16(0), src, src_rect, band);
-         return;
-         
-      case OSSIM_SINT16:
-         loadBandTemplate(ossim_sint16(0), src, src_rect, band);
-         return;
-         
-      case OSSIM_UINT32:
-         loadBandTemplate(ossim_uint32(0), src, src_rect, band);
-         return;
-
-      case OSSIM_SINT32:
-         loadBandTemplate(ossim_sint32(0), src, src_rect, band);
-         return;
-         
-      case OSSIM_FLOAT32:
-      case OSSIM_NORMALIZED_FLOAT:
-         loadBandTemplate(ossim_float32(0), src, src_rect, band);
-         return;
-      
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-         loadBandTemplate(ossim_float64(0), src, src_rect, band);
-         return;
-         
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-         ossimSetError(getClassName(),
-                       ossimErrorCodes::OSSIM_ERROR,
-                       "ossimImageData::loadBand\n\
-File %s line %d\nUnknown scalar type!",
-                       __FILE__,
-                       __LINE__);      
-         return;
-   }
-}
-
-void ossimImageData::loadBand(const void* src,
-                              const ossimIrect& src_rect,
-                              const ossimIrect& clip_rect,
-                              ossim_uint32 band)
-{
-   // Call the appropriate load method.
-   switch (getScalarType())
-   {
-      case OSSIM_UINT8:
-         loadBandTemplate(ossim_uint8(0), src, src_rect, clip_rect, band);
-         return;
-
-      case OSSIM_SINT8:
-         loadBandTemplate(ossim_sint8(0), src, src_rect, clip_rect, band);
-         return;
-         
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-         loadBandTemplate(ossim_uint16(0), src, src_rect, clip_rect, band);
-         return;
-         
-      case OSSIM_SINT16:
-         loadBandTemplate(ossim_sint16(0), src, src_rect, clip_rect, band);
-         return;
-         
-      case OSSIM_UINT32:
-         loadBandTemplate(ossim_uint32(0), src, src_rect, clip_rect, band);
-         return;
-
-      case OSSIM_SINT32:
-         loadBandTemplate(ossim_sint32(0), src, src_rect, clip_rect, band);
-         return;
-         
-      case OSSIM_FLOAT32:
-      case OSSIM_NORMALIZED_FLOAT:
-         loadBandTemplate(ossim_float32(0), src, src_rect, clip_rect, band);
-         return;
-         
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-         loadBandTemplate(ossim_float64(0), src, src_rect, clip_rect, band);
-         return;
-         
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-         ossimSetError(getClassName(),
-                       ossimErrorCodes::OSSIM_ERROR,
-                       "ossimImageData::loadBand\n\
-File %s line %d\nUnknown scalar type!",
-                       __FILE__,
-                       __LINE__);      
-         return;
-   }
-}
-
-template <class T> void ossimImageData::loadBandTemplate(T, // dummy template variable
-                                                         const void* src,
-                                                         const ossimIrect& src_rect,
-                                                         ossim_uint32 band)
-{
-   const ossimIrect img_rect = getImageRectangle();
-
-   // Get the clip rect.
-   const ossimIrect clip_rect = img_rect.clipToRect(src_rect);
-
-   
-   loadBandTemplate(T(0), src, src_rect, clip_rect, band);
-}
-
-template <class T> void ossimImageData::loadBandTemplate(T, // dummy template variable
-                                                         const void* src,
-                                                         const ossimIrect& src_rect,
-                                                         const ossimIrect& clip_rect,
-                                                         ossim_uint32 band)
-{
-   static const char  MODULE[] = "ossimImageData::loadBand";
-   
-   // Check the pointer.
-   if (!src)
-   {
-      // Set the error...
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "%s File %s line %d\nNULL pointer passed to method!",
-                    MODULE,
-                    __FILE__,
-                    __LINE__);
-      return;
-   }
-   
-   // Check the band.
-   if (!isValidBand(band))
-   {
-      // Set the error...
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "%s File %s line %d\nInvalid band:  %d",
-                    MODULE,
-                    __FILE__,
-                    __LINE__,
-                    band);
-      return;
-   }
-   
-   const ossimIrect img_rect = getImageRectangle();
-   
-   // Check for intersect.
-   if ( ! img_rect.intersects(src_rect) )
-   {
-      return; // Nothing to do here.
-   }
-
-   // Check the clip rect.
-   if (!clip_rect.completely_within(img_rect))
-   {
-      return;
-   }
-   
-   // Check the status and allocate memory if needed.
-   if (getDataObjectStatus() == OSSIM_NULL) initialize();
-
-   // Get the width of the buffers.
-   ossim_uint32 s_width = src_rect.width();
-   ossim_uint32 d_width = getWidth();
-   
-   const T* s = static_cast<const T*>(src);
-   T* d = static_cast<T*>(getBuf(band));
-
-   // Move the pointers to the first valid pixel.
-   s += (clip_rect.ul().y - src_rect.ul().y) * s_width +
-        clip_rect.ul().x - src_rect.ul().x;
-   
-   d += (clip_rect.ul().y - img_rect.ul().y) * d_width +
-        clip_rect.ul().x - img_rect.ul().x;
-   
-   // Copy the data.
-   ossim_uint32 clipHeight = clip_rect.height();
-   ossim_uint32 clipWidth  = clip_rect.width();
-  
-   for (ossim_uint32 line = 0; line < clipHeight; ++line)
-   {
-      for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
-      {
-         d[sample] = s[sample];
-      }
-
-      s += s_width;
-      d += d_width;
-   }
-}
-
-void ossimImageData::loadTile(const ossimImageData* src)
-{
-   if (!src)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::loadTile ERROR:"
-         << "Null tile passed to method!" << std::endl;
-      return;
-   }
-
-   if (!src->getBuf())
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::loadTile ERROR:"
-         << "Source tile buff is null!" << std::endl;
-      return;
-   }
-
-   if (!this->getBuf())
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::loadTile ERROR:"
-         << "This tile not initialized!" << std::endl;
-      return;
-   }
-
-   if (src->getNumberOfBands() != this->getNumberOfBands())
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::loadTile ERROR:"
-         << "Tiles do not have same number of bands!" << std::endl;
-      return;
-   }
-
-   //***
-   // Set the status of this tile to the status of the source tile.
-   // Do this in place of validate.
-   //***
-   setDataObjectStatus(src->getDataObjectStatus());
-   
-   if(getScalarType() == src->getScalarType())
-   {      
-      loadTile((void*)(src->getBuf()),
-               src->getImageRectangle(),
-               OSSIM_BSQ);
-      setNullPix(src->getNullPix(), src->getNumberOfBands());
-   }
-   else // do a slow generic normalize to unnormalize copy
-   {
-      // Check the pointer.
-      ossimIrect src_rect = src->getImageRectangle();
-      const ossimIrect img_rect = getImageRectangle();
-      
-      // Check for intersect.
-      if ( !img_rect.intersects(src_rect) )
-      {
-         return; // Nothing to do here.
-      }
-
-      // Get the clip rect.
-      const ossimIrect clip_rect = img_rect.clipToRect(src_rect);
-
-      // Check the status and allocate memory if needed.
-      if (getDataObjectStatus() == OSSIM_NULL) initialize();
-      
-      // Get the width of the buffers.
-      ossim_uint32 num_bands     = getNumberOfBands();
-      ossim_uint32 s_width       = src_rect.width();
-      ossim_uint32 d_width       = getWidth();
-            
-      ossim_uint32 band;
-      
-      ossim_uint32 sourceOffset = (clip_rect.ul().y - src_rect.ul().y) *
-         s_width + (clip_rect.ul().x - src_rect.ul().x);      
-      
-      ossim_uint32 destinationOffset = (clip_rect.ul().y - img_rect.ul().y) *
-         d_width + (clip_rect.ul().x - img_rect.ul().x);
-      
-      ossim_uint32 clipHeight = clip_rect.height();
-      ossim_uint32 clipWidth  = clip_rect.width();
-
-      // Copy the data.
-      for (band=0; band<num_bands; ++band)
-      {
-         ossim_uint32 sourceIndex      = sourceOffset;
-         ossim_uint32 destinationIndex = destinationOffset;
-         ossim_float32 tempResult      = 0.0;
-
-         for (ossim_uint32 line = 0; line < clipHeight; ++line)
-         {
-            for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
-            {
-               src->getNormalizedFloat(sourceIndex + sample,
-                                       band,
-                                       tempResult);
-               
-               this->setNormalizedFloat(destinationIndex + sample,
-                                        band,
-                                        tempResult);
-            }
-            sourceIndex      += s_width;
-            destinationIndex += d_width;
-         }
-      }
-   }
-}
-
-void ossimImageData::loadTile(const void* src,
-                              const ossimIrect& src_rect,
-                              ossimInterleaveType il_type)
-{
-   switch (il_type)
-   {
-   case OSSIM_BIP:
-      loadTileFromBip(src, src_rect);
-      return;
-   case OSSIM_BIL:
-      loadTileFromBil(src, src_rect);
-      return;
-   case OSSIM_BSQ:
-      loadTileFromBsq(src, src_rect);
-      return;
-   default:
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::loadTile ERROR:  unsupported interleave type!"
-         << std::endl;
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "ossimImageData::loadTile\n\
-File %s line %d\nUnknown interleave type!",
-                    __FILE__,
-                    __LINE__);      
-      return;
-   } // End of "switch (type)"
-}
-
-void ossimImageData::loadTile(const void* src,
-                              const ossimIrect& src_rect,
-                              const ossimIrect& clip_rect,
-                              ossimInterleaveType il_type)
-{
-   switch (il_type)
-   {
-   case OSSIM_BIP:
-      loadTileFromBip(src, src_rect, clip_rect);
-      return;
-   case OSSIM_BIL:
-      loadTileFromBil(src, src_rect, clip_rect);
-      return;
-   case OSSIM_BSQ:
-      loadTileFromBsq(src, src_rect, clip_rect);
-      return;
-   default:
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::loadTile ERROR:  unsupported interleave type!"
-         << std::endl;
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "ossimImageData::loadTile\n\
-File %s line %d\nUnknown interleave type!",
-                    __FILE__,
-                    __LINE__);      
-      return;
-   } // End of "switch (type)"
-}
-
-
-void ossimImageData::nullTileAlpha(const ossim_uint8* src,
-                                   const ossimIrect& src_rect,
-                                   bool multiplyAlphaFlag)
-{
-   const ossimIrect img_rect = getImageRectangle();
-   
-   // Get the clip rect.
-   const ossimIrect clip_rect = img_rect.clipToRect(src_rect);
-
-   nullTileAlpha(src, src_rect, clip_rect, multiplyAlphaFlag);
-}
-
-void ossimImageData::nullTileAlpha(const ossim_uint8* src,
-                                   const ossimIrect& src_rect,
-                                   const ossimIrect& clip_rect,
-                                   bool multiplyAlphaFlag)
-{
-   switch (getScalarType())
-   {
-      case OSSIM_UINT8:
-         nullTileAlphaTemplate(ossim_uint8(0), src, src_rect, clip_rect, multiplyAlphaFlag);
-         return;
-
-      case OSSIM_SINT8:
-         nullTileAlphaTemplate(ossim_sint8(0), src, src_rect, clip_rect, multiplyAlphaFlag);
-         return;
-         
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-         nullTileAlphaTemplate(ossim_uint16(0), src, src_rect, clip_rect, multiplyAlphaFlag);
-         return;
-         
-      case OSSIM_SINT16:
-         nullTileAlphaTemplate(ossim_sint16(0), src, src_rect, clip_rect, multiplyAlphaFlag);
-         return;
-         
-      case OSSIM_UINT32:
-         nullTileAlphaTemplate(ossim_uint32(0), src, src_rect, clip_rect, multiplyAlphaFlag);
-         return;
-
-      case OSSIM_SINT32:
-         nullTileAlphaTemplate(ossim_sint32(0), src, src_rect, clip_rect, multiplyAlphaFlag);
-         return;
-         
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-         nullTileAlphaTemplate(ossim_float32(0), src, src_rect, clip_rect, multiplyAlphaFlag);
-         return;
-         
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-         nullTileAlphaTemplate(ossim_float64(0), src, src_rect, clip_rect, multiplyAlphaFlag);
-         return;
-         
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-         ossimSetError(getClassName(),
-                       ossimErrorCodes::OSSIM_ERROR,
-                       "ossimImageData::nullTileAlpha\n\
-File %s line %d\nUnsupported scalar type for method!",
-                       __FILE__,
-                       __LINE__);      
-         return;
-   }
-   
-}
-
-void ossimImageData::loadTileFromBip(const void* src,
-                                     const ossimIrect& src_rect)
-{
-   switch (getScalarType())
-   {
-      case OSSIM_UINT8:
-         loadTileFromBipTemplate(ossim_uint8(0), src, src_rect);
-         return;
-
-      case OSSIM_SINT8:
-         loadTileFromBipTemplate(ossim_sint8(0), src, src_rect);
-         return;
-         
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-         loadTileFromBipTemplate(ossim_uint16(0), src, src_rect);
-         return;
-         
-      case OSSIM_SINT16:
-         loadTileFromBipTemplate(ossim_sint16(0), src, src_rect);
-         return;
-         
-      case OSSIM_UINT32:
-         loadTileFromBipTemplate(ossim_uint32(0), src, src_rect);
-         return;
-
-      case OSSIM_SINT32:
-         loadTileFromBipTemplate(ossim_sint32(0), src, src_rect);
-         return;
-         
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-         loadTileFromBipTemplate(ossim_float32(0), src, src_rect);
-         return;
-         
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-         loadTileFromBipTemplate(ossim_float64(0), src, src_rect);
-         return;
-         
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-         ossimSetError(getClassName(),
-                       ossimErrorCodes::OSSIM_ERROR,
-                       "ossimImageData::loadTileFromBip\n\
-File %s line %d\nUnsupported scalar type for method!",
-                       __FILE__,
-                       __LINE__);      
-         return;
-   }
-}
-
-void ossimImageData::loadTileFromBip(const void* src,
-                                     const ossimIrect& src_rect,
-                                     const ossimIrect& clip_rect)
-{
-   switch (getScalarType())
-   {
-      case OSSIM_UINT8:
-         loadTileFromBipTemplate(ossim_uint8(0), src, src_rect, clip_rect);
-         return;
-
-      case OSSIM_SINT8:
-         loadTileFromBipTemplate(ossim_sint8(0), src, src_rect, clip_rect);
-         return;
-
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-         loadTileFromBipTemplate(ossim_uint16(0), src, src_rect, clip_rect);
-         return;
-      
-      case OSSIM_SINT16:
-         loadTileFromBipTemplate(ossim_sint16(0), src, src_rect, clip_rect);
-         return;
-      
-      case OSSIM_UINT32:
-         loadTileFromBipTemplate(ossim_uint32(0), src, src_rect, clip_rect);
-         return;
-
-      case OSSIM_SINT32:
-         loadTileFromBipTemplate(ossim_sint32(0), src, src_rect, clip_rect);
-         return;
-      
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-         loadTileFromBipTemplate(ossim_float32(0), src, src_rect, clip_rect);
-         return;
-      
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-         loadTileFromBipTemplate(ossim_float64(0), src, src_rect, clip_rect);
-         return;
-
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-         ossimSetError(getClassName(),
-                       ossimErrorCodes::OSSIM_ERROR,
-                       "ossimImageData::loadTileFromBip\n\
-File %s line %d\nUnsupported scalar type for method!",
-                       __FILE__,
-                       __LINE__);      
-         return;
-   }
-}
-
-void ossimImageData::loadTileFromBil(const void* src,
-                                     const ossimIrect& src_rect)
-{
-   switch (getScalarType())
-   {
-      case OSSIM_UINT8:
-         loadTileFromBilTemplate(ossim_uint8(0), src, src_rect);
-         return;
-
-      case OSSIM_SINT8:
-         loadTileFromBilTemplate(ossim_sint8(0), src, src_rect);
-         return;
-
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-         loadTileFromBilTemplate(ossim_uint16(0), src, src_rect);
-         return;
-      
-      case OSSIM_SINT16:
-         loadTileFromBilTemplate(ossim_sint16(0), src, src_rect);
-         return;
-      
-      case OSSIM_UINT32:
-         loadTileFromBilTemplate(ossim_uint32(0), src, src_rect);
-         return;
-
-      case OSSIM_SINT32:
-         loadTileFromBilTemplate(ossim_sint32(0), src, src_rect);
-         return;
-      
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-         loadTileFromBilTemplate(ossim_float32(0), src, src_rect);
-         return;
-      
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-         loadTileFromBilTemplate(ossim_float64(0), src, src_rect);
-         return;
-
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-         ossimSetError(getClassName(),
-                       ossimErrorCodes::OSSIM_ERROR,
-                       "ossimImageData::loadTileFromBil\n\
-File %s line %d\nUnsupported scalar type for method!",
-                       __FILE__,
-                       __LINE__);      
-         return;
-   }
-}
-
-void ossimImageData::loadTileFromBil(const void* src,
-                                     const ossimIrect& src_rect,
-                                     const ossimIrect& clip_rect)
-{
-   switch (getScalarType())
-   {
-      case OSSIM_UINT8:
-         loadTileFromBilTemplate(ossim_uint8(0), src, src_rect, clip_rect);
-         return;
-
-      case OSSIM_SINT8:
-         loadTileFromBilTemplate(ossim_sint8(0), src, src_rect, clip_rect);
-         return;
-
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-         loadTileFromBilTemplate(ossim_uint16(0), src, src_rect, clip_rect);
-         return;
-      
-      case OSSIM_SINT16:
-         loadTileFromBilTemplate(ossim_sint16(0), src, src_rect, clip_rect);
-         return;
-      
-      case OSSIM_UINT32:
-         loadTileFromBilTemplate(ossim_uint32(0), src, src_rect, clip_rect);
-         return;
-
-      case OSSIM_SINT32:
-         loadTileFromBilTemplate(ossim_sint32(0), src, src_rect, clip_rect);
-         return;
-      
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-         loadTileFromBilTemplate(ossim_float32(0), src, src_rect, clip_rect);
-         return;
-      
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-         loadTileFromBilTemplate(ossim_float64(0), src, src_rect, clip_rect);
-         return;
-
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-         ossimSetError(getClassName(),
-                       ossimErrorCodes::OSSIM_ERROR,
-                       "ossimImageData::loadTileFromBil\n\
-File %s line %d\nUnsupported scalar type for method!",
-                       __FILE__,
-                       __LINE__);      
-         return;
-   }
-}
-
-void ossimImageData::loadTileFromBsq(const void* src,
-                                     const ossimIrect& src_rect)
-{
-   switch (getScalarType())
-   {
-      case OSSIM_UINT8:
-         loadTileFromBsqTemplate(ossim_uint8(0), src, src_rect);
-         return;
-
-      case OSSIM_SINT8:
-         loadTileFromBsqTemplate(ossim_sint8(0), src, src_rect);
-         return;
-
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-         loadTileFromBsqTemplate(ossim_uint16(0), src, src_rect);
-         return;
-      
-      case OSSIM_SINT16:
-         loadTileFromBsqTemplate(ossim_sint16(0), src, src_rect);
-         return;
-      
-      case OSSIM_UINT32:
-         loadTileFromBsqTemplate(ossim_uint32(0), src, src_rect);
-         return;
-
-      case OSSIM_SINT32:
-         loadTileFromBsqTemplate(ossim_sint32(0), src, src_rect);
-         return;
-      
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-         loadTileFromBsqTemplate(ossim_float32(0), src, src_rect);
-         return;
-      
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-         loadTileFromBsqTemplate(ossim_float64(0), src, src_rect);
-         return;
-      
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-         ossimSetError(getClassName(),
-                       ossimErrorCodes::OSSIM_ERROR,
-                       "ossimImageData::loadTileFromBsq\n\
-File %s line %d\nUnsupported scalar type for method!",
-                       __FILE__,
-                       __LINE__);      
-         return;
-   }
-}
-
-void ossimImageData::loadTileFromBsq(const void* src,
-                                     const ossimIrect& src_rect,
-                                     const ossimIrect& clip_rect)
-{
-   switch (getScalarType())
-   {
-      case OSSIM_UINT8:
-         loadTileFromBsqTemplate(ossim_uint8(0), src, src_rect, clip_rect);
-         return;
-
-      case OSSIM_SINT8:
-         loadTileFromBsqTemplate(ossim_sint8(0), src, src_rect, clip_rect);
-         return;
-         
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-         loadTileFromBsqTemplate(ossim_uint16(0), src, src_rect, clip_rect);
-         return;
-         
-      case OSSIM_SINT16:
-         loadTileFromBsqTemplate(ossim_sint16(0), src, src_rect, clip_rect);
-         return;
-         
-      case OSSIM_UINT32:
-         loadTileFromBsqTemplate(ossim_uint32(0), src, src_rect, clip_rect);
-         return;
-
-      case OSSIM_SINT32:
-         loadTileFromBsqTemplate(ossim_sint32(0), src, src_rect, clip_rect);
-         return;
-      
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-         loadTileFromBsqTemplate(ossim_float32(0), src, src_rect, clip_rect);
-         return;
-         
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-         loadTileFromBsqTemplate(ossim_float64(0), src, src_rect, clip_rect);
-         return;
-         
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-         ossimSetError(getClassName(),
-                       ossimErrorCodes::OSSIM_ERROR,
-                       "ossimImageData::loadTileFromBsq\n\
-File %s line %d\nUnsupported scalar type for method!",
-                       __FILE__,
-                       __LINE__);      
-         return;
-   }
-}
-
-void ossimImageData::computeMinMaxPix(vector<ossim_float64>& minBands,
-                                      vector<ossim_float64>& maxBands) const
-{
-   if ( (getDataObjectStatus() == OSSIM_NULL) || 
-        (getDataObjectStatus() == OSSIM_EMPTY) )
-   {
-      return;
-   }
-
-   switch(m_scalarType)
-   {
-      case OSSIM_UINT8:
-      {
-         computeMinMaxPix((ossim_uint8)0,
-                          minBands,
-                          maxBands);
-         break;
-      }
-      case OSSIM_SINT8:
-      {
-         computeMinMaxPix((ossim_sint8)0,
-                          minBands,
-                          maxBands);
-         break;
-         
-      }
-      case OSSIM_USHORT11:
-      case OSSIM_UINT16:
-      {
-         computeMinMaxPix((ossim_uint16)0,
-                          minBands,
-                          maxBands);
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         computeMinMaxPix((ossim_sint16)0,
-                          minBands,
-                          maxBands);
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         computeMinMaxPix((ossim_uint32)0,
-                          minBands,
-                          maxBands);
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-         computeMinMaxPix((ossim_sint32)0,
-                          minBands,
-                          maxBands);
-         break;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-      {
-         computeMinMaxPix((ossim_float32)0.0,
-                          minBands,
-                          maxBands);
-         break;
-      }
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-      {
-         computeMinMaxPix((ossim_float64)0.0,
-                          minBands,
-                          maxBands);
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         // Shouldn't hit this.
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimImageData::computeMinPix Unsupported scalar type!"
-            << std::endl;
-         break;
-      }
-   }
-}
-
-template <class T>
-void ossimImageData::computeMinMaxPix(T /* dummyValue */,
-                                      vector<ossim_float64>& minBands,
-                                      vector<ossim_float64>& maxBands) const
-{
-   const ossim_uint32 BANDS = getNumberOfBands();
-   const ossim_uint32 SPB   = getSizePerBand(); 
-   
-   if( minBands.size() != BANDS ||
-       maxBands.size() != BANDS )
-   {
-      minBands.resize(BANDS);
-      maxBands.resize(BANDS);
-      for (ossim_uint32 band = 0; band < BANDS; ++band)
-      {
-         // Set min to max and max to min for starters.
-         minBands[band] = getMaxPix(band);
-         maxBands[band] = getMinPix(band);
-      }
-   }
-   
-   for(ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      const T* bandBuffer = (const T*)getBuf(band);
-      if(bandBuffer)
-      {
-         const T NP   = static_cast<T>(getNullPix(band));
-         ossim_float64 currentMin = minBands[band];
-         ossim_float64 currentMax = maxBands[band];
-         for(ossim_uint32 offset = 0; offset < SPB; ++offset)
-         {
-            T p = bandBuffer[offset];
-            if(p != NP)
-            {
-               if(p < currentMin)
-               {
-                  currentMin = p;
-               }
-               else if(p > currentMax)
-               {
-                  currentMax = p;
-               }
-            }
-         }
-         minBands[band] = currentMin;
-         maxBands[band] = currentMax;
-      }
-   }
-}
-
-void ossimImageData::computeMinMaxNulPix(vector<ossim_float64>& minBands,
-                                         vector<ossim_float64>& maxBands,
-                                         vector<ossim_float64>& nulBands) const
-{
-   if ( getDataObjectStatus() == OSSIM_NULL )
-   {
-      return;
-   }
-   
-   switch(m_scalarType)
-   {
-      case OSSIM_UINT8:
-      {
-         computeMinMaxNulPix((ossim_uint8)0,
-                             minBands,
-                             maxBands,
-                             nulBands);
-         break;
-      }
-      case OSSIM_SINT8:
-      {
-         computeMinMaxNulPix((ossim_sint8)0,
-                             minBands,
-                             maxBands,
-                             nulBands);
-         break;  
-      }
-      case OSSIM_USHORT11:
-      case OSSIM_UINT16:
-      {
-         computeMinMaxNulPix((ossim_uint16)0,
-                             minBands,
-                             maxBands,
-                             nulBands);
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         computeMinMaxNulPix((ossim_sint16)0,
-                             minBands,
-                             maxBands,
-                             nulBands);
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         computeMinMaxNulPix((ossim_uint32)0,
-                             minBands,
-                             maxBands,
-                             nulBands);
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-         computeMinMaxNulPix((ossim_sint32)0,
-                             minBands,
-                             maxBands,
-                             nulBands);
-         break;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-      {
-         computeMinMaxNulPix((ossim_float32)0.0,
-                             minBands,
-                             maxBands,
-                             nulBands);
-         break;
-      }
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-      {
-         computeMinMaxNulPix((ossim_float64)0.0,
-                             minBands,
-                             maxBands,
-                             nulBands);
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         // Shouldn't hit this.
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimImageData::computeMinNulPix Unsupported scalar type!"
-            << std::endl;
-         break;
-      }
-   }
-}
-
-template <class T>
-void ossimImageData::computeMinMaxNulPix(T /* dummyValue */,
-                                         vector<ossim_float64>& minBands,
-                                         vector<ossim_float64>& maxBands,
-                                         vector<ossim_float64>& nulBands) const
-{
-   const ossim_uint32 BANDS = getNumberOfBands();
-   const ossim_uint32 SPB   = getSizePerBand(); 
-   T DEFAULT_NULL = static_cast<T>(ossim::defaultNull(getScalarType()));   
-
-   if( minBands.size() != BANDS ||
-       maxBands.size() != BANDS ||
-       nulBands.size() != BANDS )
-   {
-      // First time through.
-      minBands.resize(BANDS);
-      maxBands.resize(BANDS);
-      nulBands.resize(BANDS);
-      for (ossim_uint32 band = 0; band < BANDS; ++band)
-      {
-         // Set min to max and max to min for starters.
-         minBands[band] = getMaxPix(band);
-         maxBands[band] = getMinPix(band);
-         nulBands[band] = getMaxPix(band);
-      }
-   }
-   
-   for(ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      const T* bandBuffer = (const T*)getBuf(band);
-      if(bandBuffer)
-      {
-         ossim_float64 currentMin = minBands[band];
-         ossim_float64 currentMax = maxBands[band];
-         ossim_float64 currentNul = nulBands[band];
-         for(ossim_uint32 offset = 0; offset < SPB; ++offset)
-         {
-            T p = bandBuffer[offset];
-
-            //---
-            // Since we are scanning for nulls this is making an assumption that the default
-            // null is incorrect and should be ignored in this scan as it could have been
-            // introduced by a make blank on a partial tile so ignore it.
-            //---
-            if ( p != DEFAULT_NULL )
-            {
-               // Must do null first as min depends on null.
-               if ( p < currentNul )
-               {
-                  currentNul = p;
-               }
-               if( ( p < currentMin ) && ( p > currentNul ) )
-               {
-                  currentMin = p;
-               }
-               else if( p > currentMax )
-               {
-                  currentMax = p;
-               }
-            }
-         }
-         minBands[band] = currentMin;
-         maxBands[band] = currentMax;
-         nulBands[band] = currentNul;
-      }
-   }
-}
-
-template <class T>
-void ossimImageData::loadTileFromBipTemplate(T, // dummy template variable
-                                             const void* src,
-                                             const ossimIrect& src_rect)
-{
-   const ossimIrect img_rect = getImageRectangle();
-   
-   // Get the clip rect.
-   const ossimIrect clip_rect = img_rect.clipToRect(src_rect);
-
-   loadTileFromBipTemplate(T(0), src, src_rect, clip_rect);
-}
-
-template <class T>
-void ossimImageData::loadTileFromBipTemplate(T, // dummy template variable
-                                             const void* src,
-                                             const ossimIrect& src_rect,
-                                             const ossimIrect& clip_rect)
-{
-   static const char  MODULE[] = "ossimImageData::loadTileFromBip";
-   
-   // Check the pointer.
-   if (!src)
-   {
-      // Set the error...
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                     "%s File %s line %d\nNULL pointer passed to method!",
-                    MODULE,
-                    __FILE__,
-                    __LINE__);
-      return;
-   }
-   
-   const ossimIrect img_rect = getImageRectangle();
-   
-   // Check for intersect.
-   if ( ! img_rect.intersects(src_rect) )
-   {
-      return; // Nothing to do here.
-   }
-   
-   // Check the clip rect.
-   if (!clip_rect.completely_within(img_rect))
-   {
-      return;
-   }
-   
-   // Check the status and allocate memory if needed.
-   if (getDataObjectStatus() == OSSIM_NULL) initialize();
-
-   // Get the width of the buffers.
-   ossim_uint32 num_bands  = getNumberOfBands();
-   ossim_uint32 s_width    = (src_rect.width()) * num_bands;
-   ossim_uint32 d_width    = getWidth();
-   ossim_uint32 band       = 0;
-   const T* s        = static_cast<const T*>(src);
-   T** d             = new T*[num_bands];
-   
-   // Make destination pointers to each one.
-   for (band=0; band<num_bands; band++)
-   {
-      d[band] = static_cast<T*>(getBuf(band));
-      
-      // Move the pointers to the first valid pixel.
-      d[band] += (clip_rect.ul().y - img_rect.ul().y) * d_width +
-                 clip_rect.ul().x - img_rect.ul().x;
-   }
-   
-   // Move the source pointer to the first valid pixel.
-   s += (clip_rect.ul().y - src_rect.ul().y) * s_width +
-        (clip_rect.ul().x - src_rect.ul().x) * num_bands;
-   
-   // Copy the data.
-   ossim_uint32 clipHeight = clip_rect.height();
-   ossim_uint32 clipWidth  = clip_rect.width();
-   
-   for (ossim_uint32 line = 0; line < clipHeight; ++line)
-   {
-      ossim_uint32 j = 0;
-      for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
-      {
-         for (band=0; band<num_bands; band++)
-         {
-            d[band][sample] = s[j+band];
-         }
-         j += num_bands;
-      }
-      
-      s += s_width;
-      for (band=0; band<num_bands; band++)
-      {
-         d[band] += d_width;
-      }
-   }
-   
-   delete [] d;
-}
-   
-template <class T>
-void ossimImageData::loadTileFromBilTemplate(T, // dummy template variable
-                                             const void* src,
-                                             const ossimIrect& src_rect)
-{
-   const ossimIrect img_rect = getImageRectangle();
-   
-   // Get the clip rect.
-   const ossimIrect clip_rect = img_rect.clipToRect(src_rect);
-
-   loadTileFromBilTemplate(T(0), src, src_rect, clip_rect);
-}
-   
-template <class T>
-void ossimImageData::loadTileFromBilTemplate(T, // dummy template variable
-                                             const void* src,
-                                             const ossimIrect& src_rect,
-                                             const ossimIrect& clip_rect)
-{
-   static const char  MODULE[] = "ossimImageData::loadTileFromBil";
-   
-   // Check the pointer.
-   if (!src)
-   {
-      // Set the error...
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "%s File %s line %d\nNULL pointer passed to method!",
-                    MODULE,
-                    __FILE__,
-                    __LINE__);
-      return;
-   }
-   
-   const ossimIrect img_rect = getImageRectangle();
-   
-   // Check for intersect.
-   if ( ! img_rect.intersects(src_rect) )
-   {
-      return; // Nothing to do here.
-   }
-   
-   // Check the clip rect.
-   if (!clip_rect.completely_within(img_rect))
-   {
-      return;
-   }
-
-   // Check the status and allocate memory if needed.
-   if (getDataObjectStatus() == OSSIM_NULL) initialize();
-   
-   // Get the width of the buffers.
-   ossim_uint32 num_bands = getNumberOfBands();
-   ossim_uint32 s_width = (src_rect.lr().x - src_rect.ul().x + 1);
-   ossim_uint32 d_width = getWidth();
-   ossim_uint32 band = 0;
-   ossim_uint32 d_offset = (clip_rect.ul().y - img_rect.ul().y) * d_width +
-                     clip_rect.ul().x - img_rect.ul().x;
-   
-   const T* s = static_cast<const T*>(src);
-
-   // Get the number of bands and make destination pointers to each one.
-   T** d = new T*[num_bands];
-   
-   for (band=0; band<num_bands; band++)
-   {
-      d[band] = static_cast<T*>(getBuf(band));
-      
-      // Move the pointers to the first valid pixel.
-      d[band] += d_offset;
-   }
-   
-   // Move the source pointer to the first valid pixel.
-   s += (clip_rect.ul().y - src_rect.ul().y) * s_width * num_bands +
-        clip_rect.ul().x - src_rect.ul().x;
-   
-   // Copy the data.
-   ossim_uint32 clipHeight = clip_rect.height();
-   ossim_uint32 clipWidth  = clip_rect.width();
-
-   for (ossim_uint32 line = 0; line < clipHeight; ++line)
-   {
-      for (band = 0; band < num_bands; ++band)
-      {
-         for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
-         {
-            d[band][sample] = s[sample];
-         }
-         s       += s_width;
-         d[band] += d_width;
-      }
-   }
-
-   delete [] d;
-}
-   
-template <class T>
-void ossimImageData::loadTileFromBsqTemplate(T, // dummy template variable
-                                             const void* src,
-                                             const ossimIrect& src_rect)
-{
-   const ossimIrect img_rect = getImageRectangle();
-   
-   // Get the clip rect.
-   const ossimIrect clip_rect = img_rect.clipToRect(src_rect);
-
-   loadTileFromBsqTemplate(T(0), src, src_rect, clip_rect);
-}
-
-template <class T>
-void ossimImageData::loadTileFromBsqTemplate(T, // dummy template variable
-                                             const void* src,
-                                             const ossimIrect& src_rect,
-                                             const ossimIrect& clip_rect)
-{
-   static const char  MODULE[] = "ossimImageData::loadTileFromBsq";
-   
-   // Check the pointer.
-   if (!src)
-   {
-      // Set the error...
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "%s File %s line %d\nNULL pointer passed to method!",
-                    MODULE,
-                    __FILE__,
-                    __LINE__);
-      return;
-   }
-   
-   const ossimIrect img_rect = getImageRectangle();
-   
-   // Check for intersect.
-   if ( ! img_rect.intersects(src_rect) )
-   {
-      return; // Nothing to do here.
-   }
-
-   // Check the clip rect.
-   if (!clip_rect.completely_within(img_rect))
-   {
-      return;
-   }
-   
-   // Check the status and allocate memory if needed.
-   if (getDataObjectStatus() == OSSIM_NULL) initialize();
-   
-   // Get the width of the buffers.
-   ossim_uint32 num_bands = getNumberOfBands();
-   ossim_uint32 s_width = src_rect.width();
-   ossim_uint32 d_width = getWidth();
-   ossim_uint32 s_band_offset = s_width * src_rect.height();
-   
-   const T* s = static_cast<const T*>(src);
-   
-   ossim_uint32 band;
-   ossim_uint32 destinationOffset = (clip_rect.ul().y - img_rect.ul().y) * d_width +
-                              (clip_rect.ul().x - img_rect.ul().x);
-   ossim_uint32 destinationIndex = destinationOffset;
-   ossim_uint32 sourceOffset = (clip_rect.ul().y - src_rect.ul().y) * s_width +
-                         (clip_rect.ul().x - src_rect.ul().x);
-   ossim_uint32 sourceIndex = sourceOffset;
-   ossim_uint32 clipHeight = clip_rect.height();
-   ossim_uint32 clipWidth = clip_rect.width();
-
-   // Copy the data.
-   for (band=0; band<num_bands; band++)
-   {
-      T* destinationBand = static_cast<T*>(getBuf(band));
-      destinationIndex = destinationOffset;
-      sourceIndex = sourceOffset + s_band_offset*band;
-      
-      for (ossim_uint32 line = 0; line < clipHeight; ++line)
-      {
-         for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
-         {
-            destinationBand[destinationIndex + sample]
-               = s[sourceIndex+sample];
-         }
-         sourceIndex += s_width;
-         destinationIndex += d_width;
-      }
-   }
-}
-
-void ossimImageData::loadTileFrom1Band(const void* src,
-				       const ossimIrect& src_rect)
-{
-   ossim_uint32 bands = getNumberOfBands();
-   for(ossim_uint32 band = 0; band < bands; ++band)
-   {
-      loadBand(src, src_rect, band);
-   }
-}
-
-void ossimImageData::loadTileFrom1Band(const ossimImageData* src)
-{
-  if(!src) return;
-  loadTileFrom1Band((const void*)src->getBuf(),
-		    src->getImageRectangle());
-}
-
-void ossimImageData::loadShortBand(const void* src,
-                                   const ossimIrect& src_rect,
-                                   ossim_uint32 band,
-                                   bool swap_bytes)
-{
-   static const char  MODULE[] = "ossimImageData::loadShortBand";
-
-   // Check the pointer.
-   if (!src)
-   {
-      // Set the error...
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "%s File %s line %d\nNULL pointer passed to method!",
-                    MODULE,
-                    __FILE__,
-                    __LINE__);
-      return;
-   }
-
-   // Check the band.
-   if (!isValidBand(band))
-   {
-      // Set the error...
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "%s File %s line %d\nInvalid band:  %d",
-                    MODULE,
-                    __FILE__,
-                    __LINE__,
-                    band);
-      return;
-   }
-
-   const ossimIrect img_rect = getImageRectangle();
-   
-   // Check for intersect.
-   if ( ! img_rect.intersects(src_rect) )
-   {
-      return; // Nothing to do here.
-   }
-
-   // Get the clip rect.
-   const ossimIrect clip_rect = img_rect.clipToRect(src_rect);
-
-   // Check the status and allocate memory if needed.
-   if (getDataObjectStatus() == OSSIM_NULL) initialize();
-
-   // Get the width of the buffers.
-   ossim_uint32 s_width = src_rect.width();
-   ossim_uint32 d_width = getWidth();
-
-   const ossim_uint16* s = static_cast<const ossim_uint16*>(src);
-   ossim_uint16* d = getUshortBuf(band);
-
-   // Move the pointers to the first valid pixel.
-   s += (clip_rect.ul().y - src_rect.ul().y) * s_width +
-        clip_rect.ul().x - src_rect.ul().x;
-   
-   d += (clip_rect.ul().y - img_rect.ul().y) * d_width +
-        clip_rect.ul().x - img_rect.ul().x;
-   
-   // Copy the data.
-   for (ossim_int32 line=clip_rect.ul().y; line<=clip_rect.lr().y; line++)
-   {
-      ossim_uint32 i = 0;
-      for (ossim_int32 sample=clip_rect.ul().x; sample<=clip_rect.lr().x; sample++)
-      {
-         d[i] = (swap_bytes ? ( (s[i] << 8) | (s[i] >> 8) ) :
-                 s[i]);
-         ++i;
-      }
-
-      s += s_width;
-      d += d_width;
-   }
-
-   validate();
-}
-
-bool ossimImageData::isPointWithin(const ossimIpt& point)const
-{
-   return ((point.x >= m_origin.x)&&
-           (point.y >= m_origin.y)&&
-           ((point.x - m_origin.x)<static_cast<ossim_int32>(m_spatialExtents[0]))&&
-           ((point.y - m_origin.y)<static_cast<ossim_int32>(m_spatialExtents[1])));
-}
-
-bool ossimImageData::isPointWithin(ossim_int32 x, ossim_int32 y)const
-{
-   return ((x >= m_origin.x)&&
-           (y >= m_origin.y)&&
-           ((x - m_origin.x) < static_cast<ossim_int32>(m_spatialExtents[0]))&&
-           ((y - m_origin.y) < static_cast<ossim_int32>(m_spatialExtents[1])));
-}
-
-void ossimImageData::unloadTile(void* dest,
-                                const ossimIrect& dest_rect,
-                                ossimInterleaveType type) const
-{
-   unloadTile(dest, dest_rect, getImageRectangle(), type);
-}
-
-void ossimImageData::unloadTile(void* dest,
-                                const ossimIrect& dest_rect,
-                                const ossimIrect& clip_rect,
-                                ossimInterleaveType type) const
-{
-   switch (type)
-   {
-      case OSSIM_BIP:
-         unloadTileToBip(dest, dest_rect, clip_rect);
-         return;
-      case OSSIM_BIL:
-         unloadTileToBil(dest, dest_rect, clip_rect);
-         return;
-      case OSSIM_BSQ:
-         unloadTileToBsq(dest, dest_rect, clip_rect);
-         return;
-      default:
-         ossimSetError(getClassName(),
-                       ossimErrorCodes::OSSIM_ERROR,
-                       "ossimImageData::unloadTile\n\
-File %s line %d\nUnknown scalar type!",
-                       __FILE__,
-                       __LINE__);      
-         return;
-   }
-}
-
-void ossimImageData::unloadTileToBip(void* dest,
-                                     const ossimIrect& dest_rect,
-                                     const ossimIrect& clip_rect) const
-{
-   switch (getScalarType())
-   {
-      case OSSIM_UINT8:
-         unloadTileToBipTemplate(ossim_uint8(0), dest, dest_rect, clip_rect);
-         return;
-
-      case OSSIM_SINT8:
-         unloadTileToBipTemplate(ossim_sint8(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-         unloadTileToBipTemplate(ossim_uint16(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_SINT16:
-         unloadTileToBipTemplate(ossim_sint16(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_UINT32:
-         unloadTileToBipTemplate(ossim_uint32(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_SINT32:
-         unloadTileToBipTemplate(ossim_sint32(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-         unloadTileToBipTemplate(ossim_float32(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-         unloadTileToBipTemplate(ossim_float64(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-         ossimSetError(getClassName(),
-                       ossimErrorCodes::OSSIM_ERROR,
-                       "ossimImageData::unloadTileToBip\n\
-File %s line %d\nUnsupported scalar type for method!",
-                       __FILE__,
-                       __LINE__);      
-         return;
-   }
-}
-
-void ossimImageData::unloadTileToBipAlpha(void* dest,
-                                          const ossimIrect& dest_rect,
-                                          const ossimIrect& clip_rect) const
-{
-   switch (getScalarType())
-   {
-      case OSSIM_UINT8:
-         unloadTileToBipAlphaTemplate(ossim_uint8(0), dest, dest_rect, clip_rect);
-         return;
-
-      case OSSIM_SINT8:
-         unloadTileToBipAlphaTemplate(ossim_sint8(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-         unloadTileToBipAlphaTemplate(ossim_uint16(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_SINT16:
-         unloadTileToBipAlphaTemplate(ossim_sint16(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_UINT32:
-         unloadTileToBipAlphaTemplate(ossim_uint32(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_SINT32:
-         unloadTileToBipAlphaTemplate(ossim_sint32(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-         unloadTileToBipAlphaTemplate(ossim_float32(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-         unloadTileToBipAlphaTemplate(ossim_float64(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-         ossimSetError(getClassName(),
-                       ossimErrorCodes::OSSIM_ERROR,
-                       "ossimImageData::unloadTileToBipAlpha\n\
-File %s line %d\nUnsupported scalar type for method!",
-                       __FILE__,
-                       __LINE__);      
-         return;
-   }
-}
-
-void ossimImageData::unloadTileToBil(void* dest,
-                                     const ossimIrect& dest_rect,
-                                     const ossimIrect& clip_rect) const
-{
-   switch (getScalarType())
-   {
-      case OSSIM_UINT8:
-         unloadTileToBilTemplate(ossim_uint8(0), dest, dest_rect, clip_rect);
-         return;
-
-      case OSSIM_SINT8:
-         unloadTileToBilTemplate(ossim_sint8(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-         unloadTileToBilTemplate(ossim_uint16(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_SINT16:
-         unloadTileToBilTemplate(ossim_sint16(0), dest, dest_rect, clip_rect);
-         return;
-
-      case OSSIM_UINT32:
-         unloadTileToBilTemplate(ossim_uint32(0), dest, dest_rect, clip_rect);
-         return;
-
-      case OSSIM_SINT32:
-         unloadTileToBilTemplate(ossim_sint32(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-         unloadTileToBilTemplate(ossim_float32(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-         unloadTileToBilTemplate(ossim_float64(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-         ossimSetError(getClassName(),
-                       ossimErrorCodes::OSSIM_ERROR,
-                       "ossimImageData::unloadTileToBil\n\
-File %s line %d\nUnsupported scalar type for method!",
-                       __FILE__,
-                       __LINE__);      
-         return;
-   }
-}
-
-void ossimImageData::unloadTileToBsq(void* dest,
-                                     const ossimIrect& dest_rect,
-                                     const ossimIrect& clip_rect) const
-{
-   switch (getScalarType())
-   {
-      case OSSIM_UINT8:
-         unloadTileToBsqTemplate(ossim_uint8(0), dest, dest_rect, clip_rect);
-         return;
-
-      case OSSIM_SINT8:
-         unloadTileToBsqTemplate(ossim_sint8(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-         unloadTileToBsqTemplate(ossim_uint16(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_SINT16:
-         unloadTileToBsqTemplate(ossim_sint16(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_UINT32:
-         unloadTileToBsqTemplate(ossim_uint32(0), dest, dest_rect, clip_rect);
-         return;
-
-      case OSSIM_SINT32:
-         unloadTileToBsqTemplate(ossim_sint32(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-         unloadTileToBsqTemplate(ossim_float32(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-         unloadTileToBsqTemplate(ossim_float64(0), dest, dest_rect, clip_rect);
-         return;
-         
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-         ossimSetError(getClassName(),
-                       ossimErrorCodes::OSSIM_ERROR,
-                       "ossimImageData::unloadTileToBsq\n\
-File %s line %d\nUnsupported scalar type for method!",
-                       __FILE__,
-                       __LINE__);      
-         return;
-   }
-}
-
-void ossimImageData::unloadBand(void* dest,
-                                const ossimIrect& dest_rect,
-                                ossim_uint32 band) const
-{
-   unloadBand(dest, dest_rect, getImageRectangle(), band);
-}
-
-void ossimImageData::unloadBand(void* dest,
-                                const ossimIrect& dest_rect,
-                                const ossimIrect& clip_rect,
-                                ossim_uint32 band) const
-{
-   // Call the appropriate load method.
-   switch (getScalarType())
-   {
-      case OSSIM_UINT8:
-         unloadBandTemplate(ossim_uint8(0), dest, dest_rect, clip_rect, band);
-         return;
-
-      case OSSIM_SINT8:
-         unloadBandTemplate(ossim_sint8(0), dest, dest_rect, clip_rect, band);
-         return;
-         
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-         unloadBandTemplate(ossim_uint16(0), dest, dest_rect, clip_rect, band);
-         return;
-         
-      case OSSIM_SINT16:
-         unloadBandTemplate(ossim_sint16(0), dest, dest_rect, clip_rect, band);
-         return;
-         
-      case OSSIM_UINT32:
-         unloadBandTemplate(ossim_uint32(0), dest, dest_rect, clip_rect, band);
-         return;
-
-      case OSSIM_SINT32:
-         unloadBandTemplate(ossim_sint32(0), dest, dest_rect, clip_rect, band);
-         return;
-         
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-         unloadBandTemplate(ossim_float32(0), dest, dest_rect, clip_rect, band);
-         return;
-         
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-         unloadBandTemplate(ossim_float64(0), dest, dest_rect, clip_rect, band);
-         return;
-         
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-         ossimSetError(getClassName(),
-                       ossimErrorCodes::OSSIM_ERROR,
-                       "ossimImageData::unloadBand\n\
-File %s line %d\nUnsupported scalar type for method!",
-                       __FILE__,
-                       __LINE__);      
-         return;
-   }
-}
-
-void ossimImageData::unloadBand( void* dest,
-                                 ossim_uint32 src_band,
-                                 ossim_uint32 dest_band,
-                                 const ossimIrect& dest_rect,
-                                 ossimInterleaveType il_type,
-                                 OverwriteBandRule ow_type ) const
-{
-   unloadBand( dest, src_band, dest_band, dest_rect, getImageRectangle(), il_type, ow_type );
-}
-
-void ossimImageData::unloadBand( void* dest,
-                                 ossim_uint32 src_band,
-                                 ossim_uint32 dest_band,
-                                 const ossimIrect& dest_rect,
-                                 const ossimIrect& clip_rect,
-                                 ossimInterleaveType il_type,
-                                 OverwriteBandRule ow_type ) const
-{
-   static const char  MODULE[] = "ossimImageData::unloadBand";
-
-   if ( il_type == OSSIM_BSQ )
-   {
-      unloadBandToBsq( dest, src_band, dest_band, dest_rect, clip_rect, ow_type );
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE << " NOTICE:"
-         << "\nUnsupported interleave type:  " << il_type << "  Returning..."
-         << std::endl;
-   }
-}
-
-void ossimImageData::unloadBandToBsq( void* dest,
-                                      ossim_uint32 src_band,
-                                      ossim_uint32 dest_band,
-                                      const ossimIrect& dest_rect,
-                                      const ossimIrect& clip_rect,
-                                      OverwriteBandRule ow_type ) const
-{
-   switch (getScalarType())
-   {
-      case OSSIM_UINT8:
-         unloadBandToBsqTemplate(ossim_uint8(0), dest, src_band, dest_band, dest_rect, clip_rect, ow_type );
-         return;
-
-      case OSSIM_SINT8:
-         unloadBandToBsqTemplate(ossim_sint8(0), dest, src_band, dest_band, dest_rect, clip_rect, ow_type );
-         return;
-
-      case OSSIM_UINT16:
-      case OSSIM_USHORT11:
-         unloadBandToBsqTemplate(ossim_uint16(0), dest, src_band, dest_band, dest_rect, clip_rect, ow_type );
-         return;
-
-      case OSSIM_SINT16:
-         unloadBandToBsqTemplate(ossim_sint16(0), dest, src_band, dest_band, dest_rect, clip_rect, ow_type );
-         return;
-
-      case OSSIM_UINT32:
-         unloadBandToBsqTemplate(ossim_uint32(0), dest, src_band, dest_band, dest_rect, clip_rect, ow_type );
-         return;
-
-      case OSSIM_SINT32:
-         unloadBandToBsqTemplate(ossim_sint32(0), dest, src_band, dest_band, dest_rect, clip_rect, ow_type );
-         return;
-
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-         unloadBandToBsqTemplate(ossim_float32(0), dest, src_band, dest_band, dest_rect, clip_rect, ow_type );
-         return;
-
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-         unloadBandToBsqTemplate(ossim_float64(0), dest, src_band, dest_band, dest_rect, clip_rect, ow_type );
-         return;
-
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-         ossimSetError(getClassName(),
-            ossimErrorCodes::OSSIM_ERROR,
-            "ossimImageData::unloadBandToBsq\n\
-            File %s line %d\nUnsupported scalar type for method!",
-            __FILE__,
-            __LINE__);      
-         return;
-   }
-}
-
-template <class T>
-void ossimImageData::unloadBandTemplate(T, // dummy template variable
-                                        void* dest,
-                                        const ossimIrect& dest_rect,
-                                        const ossimIrect& clip_rect,
-                                        ossim_uint32 band) const
-{
-   static const char  MODULE[] = "ossimImageData::unloadBand";
-
-   // Check the pointers.
-   if (!dest)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE << " ERROR:"
-         << "\nNULL pointer passed to method!  Returning..." << std::endl;
-      return;
-   }
-
-   if (getDataObjectStatus() == OSSIM_NULL)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE << " ERROR:"
-         << "\nThis object is null! Returning..." << std::endl;
-      return;
-   }
-   
-   ossimIrect img_rect = getImageRectangle();
-   
-   // Clip the clip_rect to the tile rect.
-   ossimIrect output_clip_rect = clip_rect.clipToRect(img_rect);
-
-   // Clip it again to the destination rect.
-   output_clip_rect = dest_rect.clipToRect(output_clip_rect);
-   
-   // Check the output clip rect for intersection.
-   if (!output_clip_rect.intersects(img_rect))
-   {
-      return;
-   }
-   if ( !(output_clip_rect.intersects(dest_rect)) )
-   {
-      return;
-   }
-
-   // Check for valid band.
-   if (!isValidBand(band))
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE << " NOTICE:"
-         << "\nInvalid band:  " << band << "  Returning..."
-         << std::endl;
-      return;
-   }
-   
-   ossim_uint32 buf_width = dest_rect.lr().x - dest_rect.ul().x + 1;
-
-   // Get a pointer to the source band buffer.
-   const T* s = reinterpret_cast<const T*>(getBuf(band));
-
-   // Get the offset for each source band.
-   ossim_uint32 src_offset = (output_clip_rect.ul().y - img_rect.ul().y) *
-      getWidth() + output_clip_rect.ul().x - img_rect.ul().x;
-   
-   // Move the pointers to the start.
-   T* d = reinterpret_cast<T*>(dest);
-
-   ossim_uint32 dest_offset = (output_clip_rect.ul().y - dest_rect.ul().y) *
-      buf_width + output_clip_rect.ul().x - dest_rect.ul().x;
-
-   d += dest_offset;
-   s += src_offset;
-
-   for (ossim_int32 line=output_clip_rect.ul().y;
-        line<=output_clip_rect.lr().y; ++line)
-   {
-      ossim_uint32 i=0;
-      for (ossim_int32 samp=clip_rect.ul().x;
-           samp<=output_clip_rect.lr().x; ++samp)
-      {
-         d[i] = s[i];
-         ++i;
-      }
-      d += buf_width;
-      s += getWidth();
-   }
-}
-
-template <class T> void
-ossimImageData::unloadTileToBipTemplate(T, // dummy template variable
-                                        void* dest,
-                                        const ossimIrect& dest_rect,
-                                        const ossimIrect& clip_rect) const
-{
-   static const char  MODULE[] = "ossimImageData::unloadTileToBip";
-   
-   // Check the pointer.
-   if (!dest)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE << " ERROR:"
-         << "\nNULL pointer passed to method!  Returning..." << std::endl;
-      return;
-   }
-   
-   bool  dataIsNull = false;
-   if (getDataObjectStatus() == OSSIM_NULL)
-   {
-      dataIsNull = true;
-   }
-   
-   ossimIrect img_rect = getImageRectangle();
-   
-   // Clip the clip_rect to the tile rect.
-   ossimIrect output_clip_rect = clip_rect.clipToRect(img_rect);
-
-   // Clip it again to the destination rect.
-   output_clip_rect = dest_rect.clipToRect(output_clip_rect);
-   
-   // Check the output clip rect for intersection.
-   if (output_clip_rect.hasNans())
-   {
-      return;
-   }
-   if ( !(output_clip_rect.intersects(dest_rect)) )
-   {
-      return;
-   }
-   
-   ossim_int32 num_bands = getNumberOfBands();
-   
-   ossim_int32 buf_width = dest_rect.width() * num_bands;
-
-   if(!dataIsNull)
-   {
-      // Get the number of bands and grab a pointers to each one.
-      const T** s = new const T*[num_bands];
-      
-      ossim_int32 band;
-      ossim_int32 s_width = getWidth();
-      
-      for (band=0; band<num_bands; band++)
-      {
-         s[band] = reinterpret_cast<const T*>(getBuf(band));
-      }
-      
-      // Move the pointers to the start.
-      T* d = reinterpret_cast<T*>(dest);      
-      
-      d += (output_clip_rect.ul().y - dest_rect.ul().y) * buf_width +
-           (output_clip_rect.ul().x - dest_rect.ul().x) * num_bands;
-      
-      // Get the offset for each source band.
-      ossim_int32 src_offset = (output_clip_rect.ul().y - img_rect.ul().y) *
-         s_width + (output_clip_rect.ul().x - img_rect.ul().x);
-      
-      ossim_int32 output_clip_width  = output_clip_rect.width();
-      ossim_int32 output_clip_height = output_clip_rect.height();
-      
-      for (band=0; band<(ossim_int32)getNumberOfBands(); band++)
-      {
-         s[band] += src_offset;
-      }
-      
-      ossim_int32 j;
-      for (ossim_int32 line=0; line<output_clip_height; ++line)
-      {
-         j = 0;
-         for (ossim_int32 samp=0; samp<output_clip_width; ++samp, j+=num_bands)
-         {
-            for (band=0; band<num_bands; ++band)
-            {
-               d[j+band] = s[band][samp];
-            }
-         }
-         
-         // increment to next line...
-         d += buf_width;
-         for (band=0; band<num_bands; ++band)
-         {
-            s[band] += s_width;
-         }
-      
-      }
-      delete [] s;
-   }
-   else
-   {
-      ossim_int32 band = 0;
-      T* nulls = new T[num_bands];
-      for(band = 0; band < num_bands; ++band)
-      {
-         nulls[band] = static_cast<T>(m_nullPixelValue[band]);
-      }
-      // Move the pointers to the start.
-      T* d = reinterpret_cast<T*>(dest);
-      
-      d += (output_clip_rect.ul().y - dest_rect.ul().y) * buf_width +
-           (output_clip_rect.ul().x - dest_rect.ul().x) * num_bands;
-
-      for (ossim_int32 line=output_clip_rect.ul().y;
-           line<=output_clip_rect.lr().y; ++line)
-      {
-         ossim_int32 i=0;
-         ossim_int32 j=0;
-         for (ossim_int32 samp=output_clip_rect.ul().x;
-              samp<=output_clip_rect.lr().x; ++samp)
-         {
-            for (band=0; band<num_bands; ++band)
-            {
-               d[j+band] = nulls[band];
-            }
-            ++i;  // increment to next pixel...
-            j+= num_bands;
-         }
-         
-         // increment to next line...
-         d += buf_width;
-      }
-      delete [] nulls;
-      nulls = 0;
-   }
-}
-
-template <class T> void
-ossimImageData::unloadTileToBipAlphaTemplate(T, // dummy template variable
-                                             void* dest,
-                                             const ossimIrect& dest_rect,
-                                             const ossimIrect& clip_rect) const
-{
-   static const char  M[] = "ossimImageData::unloadTileToBipAlphaTemplate";
-
-   // Sanity checks:
-
-   // Are we null:
-   if (getDataObjectStatus() == OSSIM_NULL)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << M << " ERROR:"
-         << "\nAttempting to copy null tile!  Returning..." << std::endl;
-      return;
-   }
-   
-   // Check the pointer.
-   if (!dest)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << M << " ERROR:"
-         << "\nNULL pointer passed to method!  Returning..." << std::endl;
-      return;
-   }
-
-   if ( !hasAlpha() )
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << M << " ERROR:"
-         << "\nTile has no alpha!  Returning..." << std::endl;
-      return; 
-   }
-   
-   ossimIrect img_rect = getImageRectangle();
-   
-   // Clip the clip_rect to the tile rect.
-   ossimIrect output_clip_rect = clip_rect.clipToRect(img_rect);
-
-   // Clip it again to the destination rect.
-   output_clip_rect = dest_rect.clipToRect(output_clip_rect);
-   
-   // Check the output clip rect for intersection.
-   if (output_clip_rect.hasNans())
-   {
-      return;
-   }
-   if ( !(output_clip_rect.intersects(dest_rect)) )
-   {
-      return;
-   }
-   
-   const ossim_int32 NUM_DATA_BANDS = getNumberOfBands();
-   const ossim_int32 BANDS = NUM_DATA_BANDS + 1; // Has data plus alpha.
-   const ossim_float64 MAX_PIX = static_cast<T>(getMaxPix(0));
-   const ossim_float64 ALPHA_MAX_PIX = 255.00;
-   const ossim_int32 S_WIDTH = getWidth();
-   const ossim_int32 D_WIDTH = dest_rect.width() * BANDS;
-   const ossim_int32 OUTPUT_CLIP_WIDTH  = output_clip_rect.width();
-   const ossim_int32 OUTPUT_CLIP_HEIGHT = output_clip_rect.height();
-
-   bool uint8Flag = ( getScalarType() == OSSIM_UINT8 );
-   
-   // Get the offset for each source band relative to start of clip rect.
-   const ossim_int32 SRC_OFFSET = (output_clip_rect.ul().y - img_rect.ul().y) *
-      S_WIDTH + (output_clip_rect.ul().x - img_rect.ul().x);
-   
-   // Get pointers to each one band of image data.
-   std::vector<const T*> s(NUM_DATA_BANDS);
-   ossim_int32 band;
-   for (band = 0; band < NUM_DATA_BANDS; ++band)
-   {
-      s[band] = reinterpret_cast<const T*>(getBuf(band));
-
-      // Move to start of clip rect.
-      s[band] += SRC_OFFSET;
-   }
-
-   // Get pointer to the alpha channel:
-   const ossim_uint8* a = getAlphaBuf();
-
-   // Move to start of clip rect.
-   a += SRC_OFFSET;
-
-   // Pointer to the destination buffer.
-   T* d = reinterpret_cast<T*>(dest); 
-
-   // Move to start of clip rect.
-   d += (output_clip_rect.ul().y - dest_rect.ul().y) * D_WIDTH +
-      (output_clip_rect.ul().x - dest_rect.ul().x) * BANDS;
-   
-
-   // Loop to copy data:
-   for (ossim_int32 line = 0; line < OUTPUT_CLIP_HEIGHT; ++line)
-   {
-      ossim_int32 j = 0;
-      ossim_int32 alphaIdx = 0;
-      for (ossim_int32 samp = 0; samp < OUTPUT_CLIP_WIDTH; ++samp, j +=BANDS)
-      {
-         // Copy the pixels:
-         for (band = 0; band < NUM_DATA_BANDS; ++band)
-         {
-            d[j+band] = s[band][samp];
-         }
-         
-         // Copy alpha channel converting to scalar type.
-         if ( uint8Flag )
-         {
-            d[j+NUM_DATA_BANDS] = a[alphaIdx++];
-         }
-         else
-         {
-            d[j+NUM_DATA_BANDS] =
-               static_cast<T>( (a[alphaIdx++]/ALPHA_MAX_PIX) * MAX_PIX );
-         }
-      }
-      
-      // Increment pointers to next line...
-      d += D_WIDTH;
-      for (band = 0; band < NUM_DATA_BANDS; ++band)
-      {
-         s[band] += S_WIDTH;
-      }
-      a += S_WIDTH;
-   }
-}
-
-template <class T> void
-ossimImageData::unloadTileToBilTemplate(T,  // dummy template arg...
-                                        void* dest,
-                                        const ossimIrect& dest_rect,
-                                        const ossimIrect& clip_rect) const
-{
-  static const char  MODULE[] = "ossimImageData::unloadTileToBil";
-
-   // Check the pointers.
-   if (!dest)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE << " ERROR:"
-         << "\nNULL pointer passed to method!  Returning..." << std::endl;
-      return;
-   }
-   bool dataIsNull = false;
-   if (getDataObjectStatus() == OSSIM_NULL)
-   {
-      dataIsNull = true;
-   }
-
-   ossimIrect img_rect = getImageRectangle();
-   
-   // Clip the clip_rect to the tile rect.
-   ossimIrect output_clip_rect = clip_rect.clipToRect(img_rect);
-
-   // Clip it again to the destination rect.
-   output_clip_rect = dest_rect.clipToRect(output_clip_rect);
-   
-   // Check the output clip rect for intersection.
-   if (output_clip_rect.hasNans())
-   {
-      return;
-   }
-   if ( !(output_clip_rect.intersects(dest_rect)) )
-   {
-      return;
-   }
-
-   ossim_uint32 num_bands = getNumberOfBands();
-
-   ossim_uint32 buf_width = dest_rect.width();
-
-   if(!dataIsNull)
-   {
-      // Get the number of bands and grab a pointers to each one.
-      const T** s = new const T*[num_bands];
-      
-      ossim_uint32 band;
-      
-      for (band=0; band<num_bands; band++)
-      {
-         s[band] = reinterpret_cast<const T*>(getBuf(band));
-      }
-      
-      // Get the offset for each source band.
-      ossim_uint32 src_offset = (output_clip_rect.ul().y - img_rect.ul().y) *
-         getWidth() + (output_clip_rect.ul().x - img_rect.ul().x);
-      
-      // Move the pointers to the start.
-      T* d = reinterpret_cast<T*>(dest);
-
-      d += (output_clip_rect.ul().y - dest_rect.ul().y) *
-         buf_width * num_bands +
-         (output_clip_rect.ul().x-dest_rect.ul().x);
-      
-      for (band=0; band<num_bands; ++band)
-      {
-         s[band] += src_offset;
-      }
-      
-      for (ossim_int32 line=output_clip_rect.ul().y;
-           line<=output_clip_rect.lr().y; ++line)
-      {
-         for (band=0; band<num_bands; ++band)
-         {
-            ossim_uint32 i=0;
-            for (ossim_int32 samp=output_clip_rect.ul().x;
-                 samp<=output_clip_rect.lr().x; ++samp)
-            {
-               d[i] = s[band][i];
-               ++i;
-            }
-            d       += buf_width;
-            s[band] += getWidth();
-         }
-      }
-      // Free up memory allocated for pointers.
-      delete [] s;
-   }
-   else
-   {
-      ossim_uint32 band = 0;
-      T* nulls = new T[num_bands];
-      for(band = 0; band < num_bands; ++band)
-      {
-         nulls[band] = static_cast<T>(m_nullPixelValue[band]);
-      }
-      
-      // Move the pointers to the start.
-      T* d = reinterpret_cast<T*>(dest);
-
-      d += (output_clip_rect.ul().y - dest_rect.ul().y) *
-           buf_width * num_bands + (output_clip_rect.ul().x - dest_rect.ul().x);
-      
-      for (ossim_int32 line=output_clip_rect.ul().y;
-           line<=output_clip_rect.lr().y; ++line)
-      {
-         for (band=0; band<num_bands; ++band)
-         {
-            ossim_uint32 i=0;
-            for (ossim_int32 samp=output_clip_rect.ul().x;
-                 samp<=output_clip_rect.lr().x; ++samp)
-            {
-               d[i] = nulls[band];
-               ++i;
-            }
-            d += buf_width;
-         }
-      }
-      delete [] nulls;
-   }
-}
-
-template <class T> void ossimImageData::nullTileAlphaTemplate(
-   T,
-   const ossim_uint8* src,
-   const ossimIrect& src_rect,
-   const ossimIrect& clip_rect,
-   bool multiplyAlphaFlag)
-{
-   static const char  MODULE[] = "ossimImageData::nullTileAlphaTemplate";
-   
-   // Check the pointer.
-   if (!src)
-   {
-      // Set the error...
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "%s File %s line %d\nNULL pointer passed to method!",
-                    MODULE,
-                    __FILE__,
-                    __LINE__);
-      return;
-   }
-   
-   const ossimIrect img_rect = getImageRectangle();
-   
-   // Check for intersect.
-   if ( ! img_rect.intersects(src_rect) )
-   {
-      return; // Nothing to do here.
-   }
-
-   // Check the clip rect.
-   if (!clip_rect.completely_within(img_rect))
-   {
-      return;
-   }
-   
-   // Check the status and allocate memory if needed.
-   if (getDataObjectStatus() == OSSIM_NULL) initialize();
-   
-   // Get the width of the buffers.
-   ossim_uint32 num_bands = getNumberOfBands();
-   ossim_uint32 s_width = src_rect.width();
-   ossim_uint32 d_width = getWidth();
-   ossim_uint32 band;
-   ossim_uint32 destinationOffset = (clip_rect.ul().y - img_rect.ul().y) * d_width +
-                              (clip_rect.ul().x - img_rect.ul().x);
-   ossim_uint32 destinationIndex = destinationOffset;
-   ossim_uint32 sourceOffset = (clip_rect.ul().y - src_rect.ul().y) * s_width +
-                         (clip_rect.ul().x - src_rect.ul().x);
-   ossim_uint32 sourceIndex = sourceOffset;
-   ossim_uint32 clipHeight = clip_rect.height();
-   ossim_uint32 clipWidth = clip_rect.width();
-
-   if(!multiplyAlphaFlag)
-   {
-      // Copy the data.
-      for (band=0; band<num_bands; band++)
-      {
-         T* destinationBand = static_cast<T*>(getBuf(band));
-         destinationIndex = destinationOffset;
-         sourceIndex = sourceOffset;
-         T nullPix = (T)getNullPix(band);
-         T minPix = (T)getMinPix(band);
-         for (ossim_uint32 line = 0; line < clipHeight; ++line)
-         {
-            for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
-            {
-               if(src[sourceIndex+sample] == 0)
-               {
-                  destinationBand[destinationIndex + sample] = nullPix;
-               }
-               else if(destinationBand[destinationIndex + sample] == nullPix)
-               {
-                  destinationBand[destinationIndex + sample] = minPix;
-               }
-            }
-            sourceIndex += s_width;
-            destinationIndex += d_width;
-         }
-      }
-   }
-   else
-   {
-      ossim_float64 normalizer = 1.0/255.0;
-      // Copy the data.
-      for (band=0; band<num_bands; band++)
-      {
-         T* destinationBand = static_cast<T*>(getBuf(band));
-         destinationIndex = destinationOffset;
-         sourceIndex = sourceOffset;
-         T nullPix = (T)getNullPix(band);
-         T minPix = (T)getMinPix(band);
-         for (ossim_uint32 line = 0; line < clipHeight; ++line)
-         {
-            for (ossim_uint32 sample = 0; sample < clipWidth; ++sample)
-            {
-               if(src[sourceIndex+sample] != 255)
-               {
-                  if(src[sourceIndex+sample] != 0)
-                  {
-                     destinationBand[destinationIndex + sample] = (T)(destinationBand[destinationIndex + sample]*
-                                                                      (src[sourceIndex+sample]*normalizer));
-                     if(destinationBand[destinationIndex + sample] == nullPix)
-                     {
-                        destinationBand[destinationIndex + sample] = minPix;
-                     }
-                  }
-                  else
-                  {
-                     destinationBand[destinationIndex + sample] = nullPix;
-                  }
-               }
-               else if(destinationBand[destinationIndex + sample] == nullPix)
-               {
-                  destinationBand[destinationIndex + sample] = minPix;
-               }
-            }
-            sourceIndex += s_width;
-            destinationIndex += d_width;
-         }
-      }
-      
-   }
-}
-
-template <class T> void
-ossimImageData::unloadTileToBsqTemplate(T,  // dummy template arg...
-                                        void* dest,
-                                        const ossimIrect& dest_rect,
-                                        const ossimIrect& clip_rect) const
-{
-   static const char  MODULE[] = "ossimImageData::unloadTileToBsq";
-   
-   // Check the pointers.
-   if (!dest)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE << " ERROR:"
-         << "\nNULL pointer passed to method!  Returning..." << std::endl;
-      return;
-   }
-
-   bool dataIsNull = false;
-   if (getDataObjectStatus() == OSSIM_NULL)
-   {
-      dataIsNull = true;
-   }
-
-   ossimIrect img_rect = getImageRectangle();
-   
-   // Clip the clip_rect to the tile rect.
-   ossimIrect output_clip_rect = clip_rect.clipToRect(img_rect);
-
-   // Clip it again to the destination rect.
-   output_clip_rect = dest_rect.clipToRect(output_clip_rect);
-   
-   // Check the output clip rect for intersection.
-   if (output_clip_rect.hasNans())
-   {
-      return;
-   }
-   if ( !(output_clip_rect.intersects(dest_rect)) )
-   {
-      return;
-   }
-
-   ossim_uint32 num_bands = getNumberOfBands();
-   ossim_uint32 band      = 0;
-   if(!dataIsNull)
-   {
-      ossim_uint32 d_width       = dest_rect.lr().x - dest_rect.ul().x + 1;
-      ossim_uint32 d_band_offset = d_width * (dest_rect.lr().y-dest_rect.ul().y+1);
-      ossim_uint32 s_width       = getWidth();
-      ossim_uint32 s_offset      = (output_clip_rect.ul().y - img_rect.ul().y) *
-                                   s_width + (output_clip_rect.ul().x - img_rect.ul().x);
-
-      T* d        = static_cast<T*>(dest);
-      const T** s = new const T*[num_bands];
-
-      // Grab a pointers to each one.
-      for (band=0; band<num_bands; ++band)
-      {
-         s[band] = reinterpret_cast<const T*>(getBuf(band));
-
-         // Move to first valid pixel.
-         s[band] += s_offset;
-      }
-
-      // Move to first valid pixel.
-      d += (output_clip_rect.ul().y - dest_rect.ul().y) * d_width +
-           (output_clip_rect.ul().x - dest_rect.ul().x);
-
-      for (band=0; band<num_bands; ++band)
-      {
-         ossim_uint32 d_buf_offset = 0;
-
-         for (ossim_int32 line=output_clip_rect.ul().y;
-              line<=output_clip_rect.lr().y; ++line)
-         {
-            ossim_int32 i=0;
-            for (ossim_int32 samp=output_clip_rect.ul().x;
-                 samp<=output_clip_rect.lr().x; ++samp)
-            {
-               d[d_buf_offset+i] = s[band][i];
-               ++i;
-            }
-
-            d_buf_offset += d_width;
-            s[band]      += s_width;
-         }
-         d += d_band_offset;
-      }
-      
-      // Free up memory allocated for pointers.
-      delete [] s;
-   }
-   else
-   {
-      ossim_uint32 d_width       = dest_rect.lr().x - dest_rect.ul().x + 1;
-      ossim_uint32 d_band_offset = d_width * (dest_rect.lr().y-dest_rect.ul().y+1);
-      
-      ossim_uint8* d = static_cast<ossim_uint8*>(dest);
-            
-      // Move to first valid pixel.
-      d += (output_clip_rect.ul().y - dest_rect.ul().y) * d_width +
-           (output_clip_rect.ul().x - dest_rect.ul().x);
-      
-      for (band=0; band<num_bands; ++band)
-      {
-         ossim_uint8 np = static_cast<ossim_uint8>(m_nullPixelValue[band]);
-         ossim_uint32 d_buf_offset = 0;
-         
-         for (ossim_int32 line=output_clip_rect.ul().y;
-              line<=output_clip_rect.lr().y; ++line)
-         {
-            ossim_int32 i=0;
-            for (ossim_int32 samp=output_clip_rect.ul().x;
-                 samp<=output_clip_rect.lr().x; ++samp)
-            {
-               d[d_buf_offset+i] = np;
-               ++i;
-            }
-            
-            d_buf_offset += d_width;
-         }
-         d += d_band_offset;
-      }
-   }
-}
-
-template <class T> void
-ossimImageData::unloadBandToBsqTemplate(T,  // dummy template arg...
-                                        void* dest,
-                                        ossim_uint32 src_band,
-                                        ossim_uint32 dest_band,
-                                        const ossimIrect& dest_rect,
-                                        const ossimIrect& clip_rect,
-                                        OverwriteBandRule ow_type) const
-{
-   static const char  MODULE[] = "ossimImageData::unloadBandToBsq";
-
-   // Check the pointers.
-   if (!dest)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE << " ERROR:"
-         << "\nNULL pointer passed to method!  Returning..." << std::endl;
-      return;
-   }
-
-   bool dataIsNull = false;
-   if (getDataObjectStatus() == OSSIM_NULL)
-   {
-      dataIsNull = true;
-   }
-
-   ossimIrect img_rect = getImageRectangle();
-
-   // Clip the clip_rect to the tile rect.
-   ossimIrect output_clip_rect = clip_rect.clipToRect(img_rect);
-
-   // Clip it again to the destination rect.
-   output_clip_rect = dest_rect.clipToRect(output_clip_rect);
-
-   // Check the output clip rect for intersection.
-   if (output_clip_rect.hasNans())
-   {
-      return;
-   }
-   if ( !(output_clip_rect.intersects(dest_rect)) )
-   {
-      return;
-   }
-
-   ossim_uint32 num_bands = getNumberOfBands();
-   ossim_uint32 band      = 0;
-   if(!dataIsNull)
-   {
-      ossim_uint32 d_width       = dest_rect.lr().x - dest_rect.ul().x + 1;
-      ossim_uint32 d_band_offset = d_width * (dest_rect.lr().y-dest_rect.ul().y+1);
-      ossim_uint32 s_width  = getWidth();
-      ossim_uint32 s_offset = (output_clip_rect.ul().y - img_rect.ul().y) *
-         s_width + (output_clip_rect.ul().x - img_rect.ul().x);
-
-      T* d        = static_cast<T*>(dest);
-      const T** s = new const T*[num_bands];
-
-      // Grab a pointers to each one.
-      for (band=0; band<num_bands; ++band)
-      {
-         s[band] = reinterpret_cast<const T*>(getBuf(band));
-
-         // Move to first valid pixel.
-         s[band] += s_offset;
-      }
-
-      // Move to first valid pixel.
-      d += (output_clip_rect.ul().y - dest_rect.ul().y) * d_width +
-           (output_clip_rect.ul().x - dest_rect.ul().x);
-
-      ossim_uint32 d_dest_band_offset = dest_band * d_band_offset;
-      ossim_uint32 d_buf_offset = 0;
-
-      for (ossim_int32 line=output_clip_rect.ul().y;
-         line<=output_clip_rect.lr().y; ++line)
-      {
-         ossim_int32 i=0;
-         for (ossim_int32 samp=output_clip_rect.ul().x;
-            samp<=output_clip_rect.lr().x; ++samp)
-         {
-            ossim_uint32 d_pixel_offset = d_buf_offset+i;
-            ossim_uint32 d_dest_band_pixel_offset = d_pixel_offset + d_dest_band_offset;
-
-            switch( ow_type )
-            {
-               case COLOR_DISCREPANCY:
-               case COLOR_DISCREPANCY_OF_ANY_FROM_DEST:
-               {
-                  T d_dest_band = d[d_dest_band_pixel_offset];
-
-                  for ( band=0; band<num_bands && band!=dest_band; ++band )
-                  {
-                     T d_other_band = d[d_pixel_offset + (band * d_band_offset)];
-
-                     // test for color discrepancy
-                     if ( d_other_band != d_dest_band )
-                     {
-                        d[d_dest_band_pixel_offset] = s[src_band][i];
-                        break;
-                     }
-                  }
-               }
-               break;
-
-               case COLOR_DISCREPANCY_OF_ALL_FROM_DEST:
-               {
-                  T d_dest_band = d[d_dest_band_pixel_offset];
-
-                  bool bFoundSameValue = false;
-                  for ( band=0; band<num_bands && band!=dest_band; ++band )
-                  {
-                     T d_other_band = d[d_pixel_offset + (band * d_band_offset)];
-
-                     // test for color sameness
-                     if ( d_other_band == d_dest_band )
-                     {
-                        bFoundSameValue = true;
-                        break;
-                     }
-                  }
-                  if ( bFoundSameValue == false )
-                  {
-                     d[d_dest_band_pixel_offset] = s[src_band][i];
-                  }
-               }
-               break;
-
-               case COLOR_EQUALITY_OF_ANY_TO_SRC:
-               {
-                  T d_src_band = s[src_band][i];
-
-                  for ( band=0; band<num_bands && band!=dest_band; ++band )
-                  {
-                     T d_other_band = d[d_pixel_offset + (band * d_band_offset)];
-
-                     // test for color discrepancy
-                     if ( d_other_band == d_src_band )
-                     {
-                        d[d_dest_band_pixel_offset] = s[src_band][i];
-                        break;
-                     }
-                  }
-               }
-               break;
-
-               case COLOR_EQUALITY_OF_ALL_TO_SRC:
-               {
-                  T d_src_band = s[src_band][i];
-
-                  bool bFoundDifferentValue = false;
-                  for ( band=0; band<num_bands && band!=dest_band; ++band )
-                  {
-                     T d_other_band = d[d_pixel_offset + (band * d_band_offset)];
-
-                     // test for color discrepancy
-                     if ( d_other_band != d_src_band )
-                     {
-                        bFoundDifferentValue = true;
-                        break;
-                     }
-                  }
-                  if ( bFoundDifferentValue == false )
-                  {
-                     d[d_dest_band_pixel_offset] = s[src_band][i];
-                  }
-               }
-               break;
-
-               case NULL_RULE:
-               default:
-               {
-                  d[d_dest_band_pixel_offset] = s[src_band][i];
-               }
-               break;
-            }
-
-            ++i;
-         }
-
-         d_buf_offset += d_width;
-         s[src_band]  += s_width;
-      }
-
-      // Free up memory allocated for pointers.
-      delete [] s;
-   }
-   else
-   {
-      ossim_uint32 d_width       = dest_rect.lr().x - dest_rect.ul().x + 1;
-      ossim_uint32 d_band_offset = d_width * (dest_rect.lr().y-dest_rect.ul().y+1);
-
-      ossim_uint8* d = static_cast<ossim_uint8*>(dest);
-
-      // Move to first valid pixel.
-      d += (output_clip_rect.ul().y - dest_rect.ul().y) * d_width +
-         (output_clip_rect.ul().x - dest_rect.ul().x);
-
-      for (band=0; band<num_bands; ++band)
-      {
-         ossim_uint8 np = static_cast<ossim_uint8>(m_nullPixelValue[band]);
-         ossim_uint32 d_buf_offset = 0;
-
-         for (ossim_int32 line=output_clip_rect.ul().y;
-            line<=output_clip_rect.lr().y; ++line)
-         {
-            ossim_int32 i=0;
-            for (ossim_int32 samp=output_clip_rect.ul().x;
-               samp<=output_clip_rect.lr().x; ++samp)
-            {
-               d[d_buf_offset+i] = np;
-               ++i;
-            }
-
-            d_buf_offset += d_width;
-         }
-         d += d_band_offset;
-      }
-   }
-}
-
-ossimObject* ossimImageData::dup() const
-{
-   return new ossimImageData(*this);
-}
-
-void ossimImageData::copyTileToNormalizedBuffer(ossim_float64* buf)const
-{
-   if (!buf)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::copyTileToNormalizedBuffer ERROR:"
-         << "\nNull buffer passed to method!  Returning..." << std::endl;
-      return;
-   }
-
-   if (getDataObjectStatus() == OSSIM_NULL)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::copyTileToNormalizedBuffer ERROR:"
-         << "\nThis object is null! Returning..." << std::endl;
-      return;
-   }
-   
-   switch(getScalarType())
-   {
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         memmove(buf, getBuf(), getDataSizeInBytes());
-         break;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         ossim_uint32 upperBound = getWidth()*getHeight()*getNumberOfBands();
-         const ossim_float32* inputBuf = static_cast<const ossim_float32*>(getBuf());
-         for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-         {
-            buf[offset] = inputBuf[offset];
-         }
-         break;
-      }
-      case OSSIM_FLOAT32:
-      {
-         copyTileToNormalizedBuffer((ossim_float32)0, buf);
-         break;
-      }
-      case OSSIM_FLOAT64:
-      {
-         copyTileToNormalizedBuffer((ossim_float64)0, buf);
-         break;
-      }
-      case OSSIM_UINT8:
-      {
-         copyTileToNormalizedBuffer((ossim_uint8)0, buf);
-         break;
-      
-      }
-      case OSSIM_SINT8:
-      {
-         copyTileToNormalizedBuffer((ossim_sint8)0, buf);
-         break;
-      
-      }
-      case OSSIM_USHORT11:
-      case OSSIM_UINT16:
-      {
-         copyTileToNormalizedBuffer((ossim_uint16)0, buf);
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         copyTileToNormalizedBuffer((ossim_sint16)0, buf);
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         copyTileToNormalizedBuffer((ossim_uint32)0, buf);
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-         copyTileToNormalizedBuffer((ossim_sint32)0, buf);
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "NOTICE:  copyTileToNormalizedBuffer not implemented yet"
-            << std::endl;
-      }
-      
-   }  // End of "switch(getScalarType())"
-}
-
-template <class T>
-void ossimImageData::copyTileToNormalizedBuffer(T /* dummyTemplate */,
-                                                ossim_float64* buf) const
-{
-   const ossim_uint32 SIZE  = getSizePerBand();
-   const ossim_uint32 BANDS = getNumberOfBands();
-   
-   for(ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      const ossim_float64 MIN_PIX = getMinPix(band);
-      const ossim_float64 MAX_PIX = getMaxPix(band);
-      const ossim_float64 RANGE   = (MAX_PIX-MIN_PIX);
-      const ossim_float64 NP      = getNullPix(band);
-
-      const T* s = (T*)getBuf(band);  // source
-      ossim_float64* d = (ossim_float64*)(buf + (band*SIZE));  // destination
-      
-      for(ossim_uint32 offset = 0; offset < SIZE; ++offset)
-      {
-         ossim_float64 p = s[offset];
-         if(p != NP)
-         {
-            if( p == MIN_PIX)
-            {
-               d[offset] = OSSIM_DEFAULT_MIN_PIX_NORM_DOUBLE;
-            }
-            else
-            {
-               d[offset] = (p-MIN_PIX)/RANGE;
-            }
-         }
-         else
-         {
-            d[offset] = 0.0;
-         }
-      }
-   }   
-}
-
-template <class T>
-void ossimImageData::copyTileToNormalizedBuffer(T /* dummyTemplate */,
-                                                ossim_float32* buf) const
-{
-   const ossim_uint32 SIZE  = getSizePerBand();
-   const ossim_uint32 BANDS = getNumberOfBands();
-   
-   for(ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      const ossim_float64 MIN_PIX = getMinPix(band);
-      const ossim_float64 MAX_PIX = getMaxPix(band);
-      const ossim_float64 RANGE   = (MAX_PIX-MIN_PIX);
-      const ossim_float64 NP      = getNullPix(band);
-      
-      const T* s = (T*)getBuf(band);  // source
-      ossim_float32* d = (ossim_float32*)(buf + (band*SIZE));  // destination
-      
-      for(ossim_uint32 offset = 0; offset < SIZE; ++offset)
-      {
-         ossim_float64 p = s[offset];
-         if(p != NP)
-         {
-            if( p == MIN_PIX)
-            {
-               d[offset] = OSSIM_DEFAULT_MIN_PIX_NORM_FLOAT;
-            }
-            else
-            {
-               d[offset] = (p-MIN_PIX)/RANGE;
-            }
-         }
-         else
-         {
-            d[offset] = 0.0;
-         }
-      }
-   }   
-}
-
-template <class T>
-void ossimImageData::copyTileToNormalizedBuffer(T /* dummyTemplate */,
-                                                ossim_uint32 band,
-                                                ossim_float64* buf) const
-{
-   const ossim_uint32  SIZE    = getSizePerBand();
-   const ossim_float64 MIN_PIX = getMinPix(band);
-   const ossim_float64 MAX_PIX = getMaxPix(band);
-   const ossim_float64 RANGE   = (MAX_PIX-MIN_PIX);
-   const ossim_float64 NP      = getNullPix(band);
-   
-   const T* s = (T*)getBuf(band);  // source
-   ossim_float64* d = (ossim_float64*)(buf);  // destination
-   
-   for(ossim_uint32 offset = 0; offset < SIZE; ++offset)
-   {
-         ossim_float64 p = s[offset];
-         if(p != NP)
-         {
-            if( p == MIN_PIX)
-            {
-               d[offset] = OSSIM_DEFAULT_MIN_PIX_NORM_DOUBLE;
-            }
-            else
-            {
-               d[offset] = (p-MIN_PIX)/RANGE;
-            }
-         }
-         else
-         {
-            d[offset] = 0.0;
-         }
-   }   
-}
-
-template <class T>
-void ossimImageData::copyTileToNormalizedBuffer(T /* dummyTemplate */,
-                                                ossim_uint32 band,
-                                                ossim_float32* buf) const
-{
-   const ossim_uint32  SIZE    = getSizePerBand();
-   const ossim_float64 MIN_PIX = getMinPix(band);
-   const ossim_float64 MAX_PIX = getMaxPix(band);
-   const ossim_float64 RANGE   = (MAX_PIX-MIN_PIX);
-   const ossim_float64 NP      = getNullPix(band);
-   
-   const T* s = (T*)getBuf(band);  // source
-   ossim_float32* d     = (ossim_float32*)(buf);  // destination
-   
-   for(ossim_uint32 offset = 0; offset < SIZE; ++offset)
-   {
-      ossim_float64 p = s[offset];
-      if(p != NP)
-      {
-         if( p == MIN_PIX)
-         {
-            d[offset] = OSSIM_DEFAULT_MIN_PIX_NORM_FLOAT;
-         }
-         else
-         {
-            d[offset] = (p-MIN_PIX)/RANGE;
-         }
-      }
-      else
-      {
-         d[offset] = 0.0;
-      }
-   }   
-}
-
-template <class T>
-void ossimImageData::copyNormalizedBufferToTile(T /* dummyTemplate */,
-                                                ossim_float64* buf)
-{
-   const ossim_uint32 SIZE  = getSizePerBand();
-   const ossim_uint32 BANDS = getNumberOfBands();
-   
-   for(ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      const ossim_float64 MIN_PIX = getMinPix(band);
-      const ossim_float64 MAX_PIX = getMaxPix(band);
-      const ossim_float64 RANGE   = (MAX_PIX-MIN_PIX);
-      const T NP                  = (T)getNullPix(band);
-      
-      ossim_float64* s = buf + (band*SIZE); // source
-      T* d   = (T*)getBuf(band); // destination
-      
-      for(ossim_uint32 offset = 0; offset < SIZE; ++offset)
-      {
-         const ossim_float64 P = s[offset];
-         if(P != 0.0)
-         {
-            d[offset] = (T)(MIN_PIX + RANGE*P);
-         }
-         else
-         {
-            d[offset] = NP;
-         }
-      }
-   }
-}
-
-template <class T>
-void ossimImageData::copyNormalizedBufferToTile(T /* dummyTemplate */,
-                                                ossim_float32* buf)
-{
-   const ossim_uint32 SIZE  = getSizePerBand();
-   const ossim_uint32 BANDS = getNumberOfBands();
-   
-   for(ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      const ossim_float64 MIN_PIX = getMinPix(band);
-      const ossim_float64 MAX_PIX = getMaxPix(band);
-      const ossim_float64 RANGE   = (MAX_PIX-MIN_PIX);
-      const T             NP      = (T)getNullPix(band);
-      
-      ossim_float32* s = buf + (band*SIZE); // source
-      T* d   = (T*)getBuf(band); // destination
-      
-      for(ossim_uint32 offset = 0; offset < SIZE; ++offset)
-      {
-         const ossim_float64 P = s[offset];
-         if(P != 0.0)
-         {
-	   ossim_float64 test = MIN_PIX + RANGE*P;
-	   if(test > MAX_PIX) test = MAX_PIX;
-	   d[offset] = (T)test;
-         }
-         else
-         {
-            d[offset] = NP;
-         }
-      }
-   }
-}
-
-template <class T>
-void ossimImageData::copyNormalizedBufferToTile(T /* dummyTemplate */,
-                                                ossim_uint32 band,
-                                                ossim_float64* buf)
-{
-   const ossim_uint32  SIZE    = getSizePerBand();
-   const ossim_float64 MIN_PIX = getMinPix(band);
-   const ossim_float64 MAX_PIX = getMaxPix(band);
-   const ossim_float64 RANGE   = (MAX_PIX-MIN_PIX);
-   const T             NP      = (T)getNullPix(band);
-   
-   ossim_float64* s = buf; // source
-   T* d   = (T*)getBuf(band); // destination
-   
-   for(ossim_uint32 offset = 0; offset < SIZE; ++offset)
-   {
-      const ossim_float64 P = s[offset];
-      if(P != 0.0)
-      {
-	   ossim_float64 test = MIN_PIX + RANGE*P;
-	   if(test > MAX_PIX) test = MAX_PIX;
-	   d[offset] = (T)test;
-      }
-      else
-      {
-         d[offset] = NP;
-      }
-   }
-}
-
-template <class T>
-void ossimImageData::copyNormalizedBufferToTile(T /* dummyTemplate */,
-                                                ossim_uint32 band,
-                                                ossim_float32* buf)
-{
-   const ossim_uint32 SIZE     = getSizePerBand();
-   const ossim_float64 MIN_PIX = getMinPix(band);
-   const ossim_float64 MAX_PIX = getMaxPix(band);
-   const ossim_float64 RANGE   = (MAX_PIX-MIN_PIX);
-   const T NP                  = (T)getNullPix(band);
-   
-   ossim_float32* s = buf; // source
-   T* d   = (T*)getBuf(band); // destination
-   
-   for(ossim_uint32 offset = 0; offset < SIZE; ++offset)
-   {
-      const ossim_float64 P = s[offset];
-      if(P != 0.0)
-      {
-	   ossim_float64 test = MIN_PIX + RANGE*P;
-	   if(test > MAX_PIX) test = MAX_PIX;
-	   d[offset] = (T)test;
-      }
-      else
-      {
-         d[offset] = NP;
-      }
-   }
-}
-
-void ossimImageData::copyTileBandToNormalizedBuffer(ossim_uint32 band,
-                                                    ossim_float64* buf) const
-{
-   if (!buf)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::copyTileBandToNormalizedBuffer ERROR:"
-         << "\nNull buffer passed to method!  Returning..." << std::endl;
-      return;
-   }
-
-   if (getDataObjectStatus() == OSSIM_NULL)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::copyTileBandToNormalizedBuffer ERROR:"
-         << "\nThis object is null! Returning..." << std::endl;
-      return;
-   }
-   
-   if(!getBuf(band)) return;
-
-   switch(getScalarType())
-   {
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         memmove(buf, getBuf(band), getDataSizeInBytes());
-         break;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         ossim_uint32 upperBound = getWidth()*getHeight();
-         const ossim_float32* inputBuf = static_cast<const ossim_float32*>(getBuf(band));
-         for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-         {
-            buf[offset] = inputBuf[offset];
-         }
-         break;
-      }
-      case OSSIM_FLOAT32:
-      {
-         copyTileToNormalizedBuffer((ossim_float32)0, band, buf);
-         break;
-      }
-      case OSSIM_FLOAT64:
-      {
-         copyTileToNormalizedBuffer((ossim_float64)0, band, buf);
-         break;
-      }
-      case OSSIM_UINT8:
-      {
-         copyTileToNormalizedBuffer((ossim_uint8)0, band, buf);
-         break;
-      
-      }
-      case OSSIM_SINT8:
-      {
-         copyTileToNormalizedBuffer((ossim_sint8)0, band, buf);
-         break;
-      
-      }
-      case OSSIM_USHORT11:
-      case OSSIM_UINT16:
-      {
-         copyTileToNormalizedBuffer((ossim_uint16)0, band, buf);
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         copyTileToNormalizedBuffer((ossim_sint16)0, band, buf);
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         copyTileToNormalizedBuffer((ossim_uint32)0, band, buf);
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-         copyTileToNormalizedBuffer((ossim_sint32)0, band, buf);
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimImageData::copyTileBandToNormalizedBuffer ERROR:"
-            << " Unknown scalar type!"
-            << std::endl;
-      }
-      
-   }  // End of "switch(getScalarType())"
-   
-}
-
-void ossimImageData::copyTileToNormalizedBuffer(ossim_float32* buf)const
-{
-   
-   if (!buf)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::copyTileToNormalizedBuffer ERROR:"
-         << "\nNull buffer passed to method!  Returning..." << std::endl;
-      return;
-   }
-
-   if (getDataObjectStatus() == OSSIM_NULL)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::copyTileToNormalizedBuffer ERROR:"
-         << "\nThis object is null! Returning..." << std::endl;
-      return;
-   }
-
-   switch(getScalarType())
-   {
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         ossim_uint32 upperBound = getWidth()*getHeight()*getNumberOfBands();
-         const ossim_float32* inputBuf = static_cast<const ossim_float32*>(getBuf());
-         for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-         {
-            buf[offset] = inputBuf[offset];
-         }
-         break;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         memmove(buf, getBuf(), getDataSizeInBytes());
-         break;
-      }
-      case OSSIM_FLOAT32:
-      {
-         copyTileToNormalizedBuffer((ossim_float32)0, buf);
-         break;
-      }
-      case OSSIM_FLOAT64:
-      {
-         copyTileToNormalizedBuffer((ossim_float64)0, buf);
-         break;
-      }
-      case OSSIM_UINT8:
-      {
-         copyTileToNormalizedBuffer((ossim_uint8)0, buf);
-         break;
-      
-      }
-      case OSSIM_SINT8:
-      {
-         copyTileToNormalizedBuffer((ossim_sint8)0, buf);
-         break;
-      
-      }
-      case OSSIM_USHORT11:
-      case OSSIM_UINT16:
-      {
-         copyTileToNormalizedBuffer((ossim_uint16)0, buf);
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         copyTileToNormalizedBuffer((ossim_sint16)0, buf);
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         copyTileToNormalizedBuffer((ossim_uint32)0, buf);
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-         copyTileToNormalizedBuffer((ossim_sint32)0, buf);
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "NOTICE:  copyTileToNormalizedBuffer not implemented yet"
-            << std::endl;
-      }
-      
-   }  // End of "switch(getScalarType())"
-}
-
-void ossimImageData::copyTileBandToNormalizedBuffer(ossim_uint32 band,
-                                                    ossim_float32* buf)const
-{
-   if (!buf)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::copyTileBandToNormalizedBuffer ERROR:"
-         << "\nNull buffer passed to method!  Returning..." << std::endl;
-      return;
-   }
-
-   if (getDataObjectStatus() == OSSIM_NULL)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::copyTileBandToNormalizedBuffer ERROR:"
-         << "\nThis object is null! Returning..." << std::endl;
-      return;
-   }
-
-   switch(getScalarType())
-   {
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         ossim_uint32 upperBound = getWidth()*getHeight();
-         const ossim_float32* inputBuf = static_cast<const ossim_float32*>(getBuf(band));
-         for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-         {
-            buf[offset] = inputBuf[offset];
-         }
-         break;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         memmove(buf, getBuf(band), getSizePerBandInBytes());
-         break;
-      }
-      case OSSIM_FLOAT32:
-      {
-         copyTileToNormalizedBuffer((ossim_float32)0, band, buf);
-         break;
-      }
-      case OSSIM_FLOAT64:
-      {
-         copyTileToNormalizedBuffer((ossim_float64)0, band, buf);
-         break;
-      }
-      case OSSIM_UINT8:
-      {
-         copyTileToNormalizedBuffer((ossim_uint8)0, band, buf);
-         break;
-      
-      }
-      case OSSIM_SINT8:
-      {
-         copyTileToNormalizedBuffer((ossim_sint8)0, band, buf);
-         break;
-      
-      }
-      case OSSIM_USHORT11:
-      case OSSIM_UINT16:
-      {
-         copyTileToNormalizedBuffer((ossim_uint16)0, band, buf);
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         copyTileToNormalizedBuffer((ossim_sint16)0, band, buf);
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         copyTileToNormalizedBuffer((ossim_uint32)0, band, buf);
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-         copyTileToNormalizedBuffer((ossim_sint32)0, band, buf);
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimImageData::copyTileBandToNormalizedBuffer ERROR:"
-            << " Unknown scalar type"
-            << std::endl;
-      }
-
-   }  // End of "switch(getScalarType())"
-}
-
-
-void ossimImageData::copyNormalizedBufferToTile(ossim_float64* buf)
-{
-   if (!buf)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::copyNormalizedBufferToTile ERROR:"
-         << "\nNull buffer passed to method!  Returning..." << std::endl;
-      return;
-   }
-
-   if (getDataObjectStatus() == OSSIM_NULL)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::copyNormalizedBufferToTile ERROR:"
-         << "\nThis object is null! Returning..." << std::endl;
-      return;
-   }
-   
-   switch(getScalarType())
-   {
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         memmove(getBuf(), buf, getDataSizeInBytes());
-         break;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         ossim_uint32 upperBound = getWidth()*getHeight()*getNumberOfBands();
-         ossim_float32* inputBuf = static_cast<ossim_float32*>(getBuf());
-         for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-         {
-            inputBuf[offset] = static_cast<ossim_float32>(buf[offset]);
-         }
-         break;
-      }
-      case OSSIM_FLOAT32:
-      {
-         copyNormalizedBufferToTile((ossim_float32)0, buf);
-         break;
-      }
-      case OSSIM_FLOAT64:
-      {
-         copyNormalizedBufferToTile((ossim_float64)0, buf);
-         break;
-      }
-      case OSSIM_UINT8:
-      {
-         copyNormalizedBufferToTile((ossim_uint8)0, buf);
-         break;
-      
-      }
-      case OSSIM_SINT8:
-      {
-         copyNormalizedBufferToTile((ossim_sint8)0, buf);
-         break;
-      
-      }
-      case OSSIM_USHORT11:
-      case OSSIM_UINT16:
-      {
-         copyNormalizedBufferToTile((ossim_uint16)0, buf);
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         copyNormalizedBufferToTile((ossim_sint16)0, buf);
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         copyNormalizedBufferToTile((ossim_uint32)0, buf);
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-         copyNormalizedBufferToTile((ossim_sint32)0, buf);
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimImageData::copyNormalizedBufferToTile\n"
-            << "Unknown scalar type!" << std::endl;
-      }
-      
-   } // End of "switch(getScalarType())".
-}
-
-void ossimImageData::copyNormalizedBufferToTile(ossim_uint32 band,
-                                                ossim_float64* buf)
-{
-   if (!buf)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::copyNormalizedBufferToTile ERROR:"
-         << "\nNull buffer passed to method!  Returning..." << std::endl;
-      return;
-   }
-
-   if (getDataObjectStatus() == OSSIM_NULL)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::copyNormalizedBufferToTile ERROR:"
-         << "\nThis object is null! Returning..." << std::endl;
-      return;
-   }
-
-   if(band < getNumberOfBands())
-   {
-      switch(getScalarType())
-      {
-         case OSSIM_NORMALIZED_DOUBLE:
-         {
-            memmove(getBuf(band), buf, getSizePerBandInBytes());
-            break;
-         }
-         case OSSIM_NORMALIZED_FLOAT:
-         {
-            ossim_uint32 upperBound = getWidth()*getHeight();
-            ossim_float32* inputBuf = static_cast<ossim_float32*>(getBuf(band));
-            for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-            {
-               inputBuf[offset] = static_cast<ossim_float32>(buf[offset]);
-            }
-            break;
-         }
-         case OSSIM_FLOAT32:
-         {
-            copyNormalizedBufferToTile((ossim_float32)0, band, buf);
-            break;
-         }
-         case OSSIM_FLOAT64:
-         {
-            copyNormalizedBufferToTile((ossim_float64)0, band, buf);
-            break;
-         }
-         case OSSIM_UINT8:
-         {
-            copyNormalizedBufferToTile((ossim_uint8)0, band, buf);
-            break;
-         
-         }
-         case OSSIM_SINT8:
-         {
-            copyNormalizedBufferToTile((ossim_sint8)0, band, buf);
-            break;
-         
-         }
-         case OSSIM_USHORT11:
-         case OSSIM_UINT16:
-         {
-            copyNormalizedBufferToTile((ossim_uint16)0, band, buf);
-            break;
-         }
-         case OSSIM_SINT16:
-         {
-            copyNormalizedBufferToTile((ossim_sint16)0, band, buf);
-            break;
-         }
-         case OSSIM_UINT32:
-         {
-            copyNormalizedBufferToTile((ossim_uint32)0, band, buf);
-            break;
-         }
-         case OSSIM_SINT32:
-         {
-            copyNormalizedBufferToTile((ossim_sint32)0, band, buf);
-            break;
-         }
-         case OSSIM_SCALAR_UNKNOWN:
-         default:
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimImageData::copyNormalizedBufferToTile\n"
-               << "Unknown scalar type." << std::endl;
-         }
-         
-      } // End of "switch(getScalarType())".
-   }
-}
-
-void ossimImageData::copyNormalizedBufferToTile(ossim_float32* buf)
-{
-   if (!buf)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::copyNormalizedBufferToTile ERROR:"
-         << "\nNull buffer passed to method!  Returning..." << std::endl;
-      return;
-   }
-
-   if (getDataObjectStatus() == OSSIM_NULL)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::copyNormalizedBufferToTile ERROR:"
-         << "\nThis object is null! Returning..." << std::endl;
-      return;
-   }
-
-   switch(getScalarType())
-   {
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         ossim_uint32 upperBound = getWidth()*getHeight()*getNumberOfBands();
-         ossim_float64* inputBuf = static_cast<ossim_float64*>(getBuf());
-         for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-         {
-            inputBuf[offset] = buf[offset];
-         }
-         break;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         memmove(getBuf(), buf, getDataSizeInBytes());
-         break;
-      }
-      case OSSIM_FLOAT32:
-      {
-         copyNormalizedBufferToTile((ossim_float32)0, buf);
-         break;
-      }
-      case OSSIM_FLOAT64:
-      {
-         copyNormalizedBufferToTile((ossim_float64)0, buf);
-         break;
-      }
-      case OSSIM_UINT8:
-      {
-         copyNormalizedBufferToTile((ossim_uint8)0, buf);
-         break;
-         
-      }
-      case OSSIM_SINT8:
-      {
-         copyNormalizedBufferToTile((ossim_sint8)0, buf);
-         break;
-         
-      }
-      case OSSIM_USHORT11:
-      case OSSIM_UINT16:
-      {
-         copyNormalizedBufferToTile((ossim_uint16)0, buf);
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         copyNormalizedBufferToTile((ossim_sint16)0, buf);
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         copyNormalizedBufferToTile((ossim_uint32)0, buf);
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-         copyNormalizedBufferToTile((ossim_sint32)0, buf);
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimImageDatacopyNormalizedBufferToTile\n"
-            << "Unknown scalar type!" << std::endl;
-      }
-      
-   }  // End of "switch(getScalarType())".
-}
-
-void ossimImageData::copyNormalizedBufferToTile(ossim_uint32 band,
-                                                ossim_float32* buf)
-{
-   if (!buf)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::copyNormalizedBufferToTile ERROR:"
-         << "\nNull buffer passed to method!  Returning..." << std::endl;
-      return;
-   }
-
-   if (getDataObjectStatus() == OSSIM_NULL)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageData::copyNormalizedBufferToTile ERROR:"
-         << "\nThis object is null! Returning..." << std::endl;
-      return;
-   }
-
-   switch(getScalarType())
-   {
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         ossim_uint32 upperBound = getWidth()*getHeight();
-         ossim_float64* inputBuf = static_cast<ossim_float64*>(getBuf(band));
-         for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-         {
-            inputBuf[offset] = buf[offset];
-         }
-         break;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         memmove(getBuf(band), buf, getSizePerBandInBytes());
-         break;
-      }
-      case OSSIM_FLOAT32:
-      {
-         copyNormalizedBufferToTile((ossim_float32)0, band, buf);
-         break;
-      }
-      case OSSIM_FLOAT64:
-      {
-         copyNormalizedBufferToTile((ossim_float64)0, band, buf);
-         break;
-      }
-      case OSSIM_UINT8:
-      {
-         copyNormalizedBufferToTile((ossim_uint8)0, band, buf);
-         break;
-         
-      }
-      case OSSIM_SINT8:
-      {
-         copyNormalizedBufferToTile((ossim_sint8)0, band, buf);
-         break;
-         
-      }
-      case OSSIM_USHORT11:
-      case OSSIM_UINT16:
-      {
-         copyNormalizedBufferToTile((ossim_uint16)0, band, buf);
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         copyNormalizedBufferToTile((ossim_sint16)0, band, buf);
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         copyNormalizedBufferToTile((ossim_uint32)0, band, buf);
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-         copyNormalizedBufferToTile((ossim_sint32)0, band, buf);
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimImageData::copyNormalizedBufferToTile\n"
-            << "Unknown scalar type!" << std::endl;
-      }
-
-   }  // End of "switch(getScalarType())".
-}
-
-ossim_float64 ossimImageData::getMinNormalizedPix() const
-{
-   if (m_scalarType == OSSIM_NORMALIZED_DOUBLE ||
-       m_scalarType == OSSIM_NORMALIZED_FLOAT)
-   {
-      return m_minPixelValue[0];  // Already normalized.
-   }
-   return (1.0 / (m_maxPixelValue[0] - m_minPixelValue[0] + 1.0));
-}
-
-std::ostream& ossimImageData::print(std::ostream& out) const
-{
-   out << getClassName() << "::print:"
-       << "\nm_origin:  " << m_origin << "\n";
-   if(m_nullPixelValue.size())
-   {
-      out << "Null values: ";
-      
-      copy(m_nullPixelValue.begin(),
-           m_nullPixelValue.begin() + getNumberOfBands(),
-           std::ostream_iterator<ossim_float64>(out, " "));
-      out << "\n";
-   }
-   if(m_minPixelValue.size())
-   {
-      out << "Min values:  ";
-      
-      copy(m_minPixelValue.begin(),
-           m_minPixelValue.begin() + getNumberOfBands(),
-           std::ostream_iterator<ossim_float64>(out, " "));
-      out << "\n";
-   }
-   if(m_maxPixelValue.size())
-   {
-      out << "Max values:  ";
-      
-      copy(m_maxPixelValue.begin(),
-           m_maxPixelValue.begin() + getNumberOfBands(),
-           std::ostream_iterator<ossim_float64>(out, " "));
-      out << "\n";
-   }
-   out << "width:            " << getWidth()
-       << "\nheight:           " << getHeight()
-       << "\nimage rectangle:  " << getImageRectangle()
-       << "\nindexed:          " << m_indexedFlag
-       << std::endl;
-
-   return ossimRectilinearDataObject::print(out);
-}
-
-void ossimImageData::stretchMinMax()
-{
-   if ( (getDataObjectStatus() != OSSIM_NULL) &&
-        (getDataObjectStatus() != OSSIM_EMPTY) )
-   {
-      switch (getScalarType())
-      {
-         case OSSIM_UINT8:
-         {
-            stretchMinMax(ossim_uint8(0));
-            return;
-         }  
-         case OSSIM_SINT8:
-         {
-            stretchMinMax(ossim_sint8(0));
-            return;
-         }  
-         case OSSIM_UINT16:
-         case OSSIM_USHORT11:
-         {
-            stretchMinMax(ossim_uint16(0));
-            return;
-         }  
-         case OSSIM_SINT16:
-         {
-            stretchMinMax(ossim_sint16(0));
-            return;
-         }  
-         case OSSIM_UINT32:
-         {
-            stretchMinMax(ossim_uint32(0));
-            return;
-         }
-         case OSSIM_SINT32:
-         {
-            stretchMinMax(ossim_sint32(0));
-            return;
-         }  
-         case OSSIM_FLOAT32:
-         case OSSIM_NORMALIZED_FLOAT:
-         {
-            stretchMinMax(ossim_float32(0.0));
-            return;
-         }  
-         case OSSIM_NORMALIZED_DOUBLE:
-         case OSSIM_FLOAT64:
-         {
-            stretchMinMax(ossim_float64(0.0));
-            return;
-         }  
-         case OSSIM_SCALAR_UNKNOWN:
-         default:
-         {
-            setDataObjectStatus(OSSIM_STATUS_UNKNOWN);
-            ossimSetError(getClassName(),
-                          ossimErrorCodes::OSSIM_ERROR,
-                          "ossimImageData::stretchMinMax File %s line %d\n\
-Invalid scalar type:  %d",
-                          __FILE__,
-                          __LINE__,
-                          getScalarType());
-            break;
-         }
-      }
-   }
-}
-
-template <class T> void ossimImageData::stretchMinMax(T /* dummyTemplate */)
-{
-   const ossim_uint32 BANDS  = getNumberOfBands();
-   const ossim_uint32 SPB    = getSizePerBand();
-
-   // scalar min
-   const ossim_float64 S_MIN = ossim::defaultMin(getScalarType());
-
-   // scalar max
-   const ossim_float64 S_MAX = ossim::defaultMax(getScalarType());
-
-   // scalar null
-   const ossim_float64 S_NUL = ossim::defaultNull(getScalarType());
-
-   // scalar range
-   const ossim_float64 S_RNG = S_MAX-S_MIN+1.0;
-
-   for(ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      T* s = static_cast<T*>(getBuf(band));
-
-      if (s)
-      {
-         const ossim_float64 T_NUL = m_nullPixelValue[band]; // tile null
-         const ossim_float64 T_MIN = m_minPixelValue[band];  // tile min
-         const ossim_float64 T_MAX = m_maxPixelValue[band];  // tile max
-         const ossim_float64 T_RNG = (T_MAX-T_MIN)+1;           // tile range
-         const ossim_float64 SPP = S_RNG / T_RNG; // stretch per pixel
-         
-         for(ossim_uint32 i = 0; i < SPB; ++i)
-         {
-            ossim_float64 p = s[i];
-            if ( p == T_NUL )
-            {
-               p = S_NUL;
-            }
-            else if (p <= T_MIN)
-            {
-               p = S_MIN;
-            }
-            else if (p >= T_MAX)
-            {
-               p = S_MAX;
-            }
-            else
-            {
-               // Stretch...
-               p = (p - T_MIN + 1.0) * SPP + S_MIN - 1.0;
-            }
-            s[i] = ossim::round<T>(p);
-         }
-
-         // Set the min, max, null:
-         m_minPixelValue[band]  = S_MIN;
-         m_maxPixelValue[band]  = S_MAX;
-         m_nullPixelValue[band] = S_NUL;
-         
-      }
-   } 
-}
-
-void ossimImageData::computeAlphaChannel()
-{
-   if ( getDataObjectStatus() != OSSIM_NULL )
-   {
-      switch (getScalarType())
-      {
-         case OSSIM_UINT8:
-         {
-            computeAlphaChannel(ossim_uint8(0));
-            return;
-         }  
-         case OSSIM_SINT8:
-         {
-            computeAlphaChannel(ossim_sint8(0));
-            return;
-         }  
-         case OSSIM_UINT16:
-         case OSSIM_USHORT11:
-         {
-            computeAlphaChannel(ossim_uint16(0));
-            return;
-         }  
-         case OSSIM_SINT16:
-         {
-            computeAlphaChannel(ossim_sint16(0));
-            return;
-         }  
-         case OSSIM_UINT32:
-         {
-            computeAlphaChannel(ossim_uint32(0));
-            return;
-         }
-         case OSSIM_SINT32:
-         {
-            computeAlphaChannel(ossim_sint32(0));
-            return;
-         }  
-         case OSSIM_FLOAT32:
-         case OSSIM_NORMALIZED_FLOAT:
-         {
-            computeAlphaChannel(ossim_float32(0.0));
-            return;
-         }  
-         case OSSIM_NORMALIZED_DOUBLE:
-         case OSSIM_FLOAT64:
-         {
-            computeAlphaChannel(ossim_float64(0.0));
-            return;
-         }  
-         case OSSIM_SCALAR_UNKNOWN:
-         default:
-         {
-            setDataObjectStatus(OSSIM_STATUS_UNKNOWN);
-            ossimSetError(getClassName(),
-                          ossimErrorCodes::OSSIM_ERROR,
-                          "ossimImageData::computeAlphaChannel File %s line %d\n\
-Invalid scalar type:  %d",
-                          __FILE__,
-                          __LINE__,
-                          getScalarType());
-            break;
-         }
-      }
-   }
-}
-
-template <class T> void ossimImageData::computeAlphaChannel(T /* dummyTemplate */)
-{
-   const ossim_uint32 SPB = getSizePerBand();
-   const ossim_uint8  ANP = 0;   // Alpha Null Pixel
-   const ossim_uint8  AVP = 255; // Alpha Valid Pixel
-
-   // Allocate the alpha channel if not already.
-   if (m_alpha.size() != SPB)
-   {
-      m_alpha.resize(SPB);
-   }
-
-   if (getDataObjectStatus() == OSSIM_FULL)
-   {
-      memset( static_cast<void*>(&m_alpha.front()),
-              static_cast<int>(AVP),
-              static_cast<int>(SPB) );
-   }
-   else if (getDataObjectStatus() == OSSIM_EMPTY)
-   {
-      // Start with alpha being set to 0.  
-      memset( static_cast<void*>(&m_alpha.front()),
-              static_cast<int>(ANP),
-              static_cast<int>(SPB) );
-   }
-   else // Partial must check each pixel.
-   {
-      const ossim_uint32 BANDS = getNumberOfBands();
-
-      std::vector<T> null_pix(BANDS);
-      std::vector<const T*> buf(BANDS); // Pointer to pixel data.
-      ossim_uint32 band;
-      for(band = 0; band < BANDS; ++band)
-      {
-         buf[band] = static_cast<const T*>(getBuf(band));
-         null_pix[band] = static_cast<T>(m_nullPixelValue[band]);
-      }
-   
-      for(ossim_uint32 i = 0; i < SPB; ++i)
-      {
-         //---
-         // Start with alpha being set to 0.  If any band has a valid pixel set
-         // to 255 and break from band loop.
-         //---
-         m_alpha[i] = ANP;
-         for(band = 0; band < BANDS; ++band)
-         {
-            if (buf[band][i] != null_pix[band])
-            {
-               m_alpha[i] = AVP;
-               break;
-            }
-         }
-      }
-   }
-   
-}  //  End: template <class T> void ossimImageData::computeAlphaChannel
-
-ossim_uint32 ossimImageData::getWidth()const
-{
-   return m_spatialExtents[0];
-}
-
-ossim_uint32 ossimImageData::getHeight()const
-{
-   return m_spatialExtents[1];
-}
-
-void ossimImageData::getWidthHeight(ossim_uint32& w, ossim_uint32& h)
-{
-   w = m_spatialExtents[0];
-   h = m_spatialExtents[1];
-}
-
-void ossimImageData::setWidth(ossim_uint32 width)
-{
-   m_spatialExtents[0] = width;
-}
-
-void ossimImageData::setHeight(ossim_uint32 height)
-{
-   m_spatialExtents[1] = height;
-}
-
-void ossimImageData::setWidthHeight(ossim_uint32 w, ossim_uint32 h)
-{
-   m_spatialExtents[0] = w;
-   m_spatialExtents[1] = h;
-}
-
-void ossimImageData::setOrigin(const ossimIpt& origin)
-{
-   m_origin = origin;
-}
-
-ossim_uint32 ossimImageData::getDataSizeInBytes()const
-{
-   return getSizeInBytes();
-}
-
-void ossimImageData::copyLine(const void* src,
-                              ossim_int32 lineNumber,
-                              ossim_int32 lineStartSample,
-                              ossim_int32 lineStopSample,
-                              ossimInterleaveType lineInterleave)
-{
-   switch(m_scalarType)
-   {
-      case OSSIM_UINT8:
-      {
-         copyLineTemplate((ossim_uint8)0, src, lineNumber, lineStartSample,
-                          lineStopSample, lineInterleave);
-         break;
-      }
-      case OSSIM_SINT8:
-      {
-         copyLineTemplate((ossim_sint8)0, src, lineNumber, lineStartSample,
-                          lineStopSample, lineInterleave);
-         break;
-         
-      }
-      case OSSIM_USHORT11:
-      case OSSIM_UINT16:
-      {
-         copyLineTemplate((ossim_uint16)0, src, lineNumber, lineStartSample,
-                          lineStopSample, lineInterleave);
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         copyLineTemplate((ossim_sint16)0, src, lineNumber, lineStartSample,
-                          lineStopSample, lineInterleave);
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         copyLineTemplate((ossim_uint32)0, src, lineNumber, lineStartSample,
-                          lineStopSample, lineInterleave);
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-         copyLineTemplate((ossim_sint32)0, src, lineNumber, lineStartSample,
-                          lineStopSample, lineInterleave);
-         break;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT32:
-      {
-         copyLineTemplate((ossim_float32)0.0, src, lineNumber, lineStartSample,
-                          lineStopSample, lineInterleave);
-         break;
-      }
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-      {
-         copyLineTemplate((ossim_float64)0.0, src, lineNumber, lineStartSample,
-                          lineStopSample, lineInterleave);
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         // Shouldn't hit this.
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimImageData::copyLine Unsupported scalar type!"
-            << std::endl;
-         break;
-      }
-   }
-   
-} // End: void ossimImageData::copyLine
-
-template <class T>
-void ossimImageData::copyLineTemplate(T /* dummyTemplate */,
-                                      const void* src,
-                                      ossim_int32 lineNumber,
-                                      ossim_int32 lineStartSample,
-                                      ossim_int32 lineStopSample,
-                                      ossimInterleaveType lineInterleave)
-{
-   if (src)
-   {
-      const ossimIrect RECT = getImageRectangle();
-
-      // Check for intersect:
-      if ( ( lineNumber       >= RECT.ul().y)     &&
-           ( lineNumber       <= RECT.lr().y)     &&
-           ( lineStartSample  <  lineStopSample)  &&
-           ( lineStartSample  <= RECT.lr().x)     &&
-           ( lineStopSample   >= RECT.ul().x) )
-      {
-         const ossim_int32 BANDS = static_cast<ossim_int32>(m_numberOfDataComponents);
-         const ossim_int32 START_SAMP =
-            (lineStartSample > RECT.ul().x)?lineStartSample:RECT.ul().x;
-         const ossim_int32 STOP_SAMP  =
-            (lineStopSample  < RECT.lr().x)?lineStopSample:RECT.lr().x;
-         const ossim_int32 SAMPS = STOP_SAMP - START_SAMP + 1;
-
-         std::vector<T*> d(BANDS);
-
-         ossim_int32 band;
-         for (band = 0; band < BANDS; ++band)
-         {
-            d[band] = static_cast<T*>(getBuf(band));
-
-            // Position at start sample.
-            d[band] +=  (lineNumber - RECT.ul().y) * RECT.width() + (START_SAMP - RECT.ul().x);
-         }
-         
-         if (lineInterleave == OSSIM_BIP)
-         {
-            const T* S = static_cast<const T*>(src); // Source buffer:
-            
-            // Position at start sample.
-            S += (START_SAMP - lineStartSample) * BANDS;
-            
-            ossim_int32 srcOffset = 0;
-            for (ossim_int32 samp = 0; samp < SAMPS; ++samp)
-            {
-               for (band = 0; band < BANDS; ++band)
-               {
-                  d[band][samp] = S[srcOffset++];
-               }
-            }
-         }
-         else
-         {
-            const ossim_int32 W = lineStopSample - lineStartSample + 1;
-            std::vector<const T*> S(BANDS);
-            for (band = 0; band < BANDS; ++band)
-            {
-               S[band] = static_cast<const T*>(src) + (START_SAMP - lineStartSample);
-               if (band)
-               {
-                  S[band] += band * W; // Move to line.
-               }
-            }
-
-            for (band = 0; band < BANDS; ++band)
-            {
-               for (ossim_int32 samp = 0; samp < SAMPS; ++samp)
-               {
-                  d[band][samp] = S[band][samp];
-               }
-            }
-         }
-         
-      } // intersect check
-      
-   } // if (src)
-   
-} // End: template <class T> void ossimImageData::copyLineTemplate
-
-void ossimImageData::setIndexedFlag(bool flag)
-{
-   m_indexedFlag = flag;
-}
-
-bool ossimImageData::getIndexedFlag() const
-{
-   return m_indexedFlag;
-}
-
-bool ossimImageData::saveState(ossimKeywordlist& kwl, const char* prefix)const
-{
-   bool result = ossimRectilinearDataObject::saveState(kwl, prefix);
-   ossimString null_pixels;
-   ossimString min_pixels;
-   ossimString max_pixels;
-   ossim::toSimpleStringList(null_pixels, m_nullPixelValue);
-   ossim::toSimpleStringList(min_pixels, m_minPixelValue);
-   ossim::toSimpleStringList(max_pixels, m_maxPixelValue);
-   
-   kwl.add(prefix, "null_pixels", null_pixels, true);
-   kwl.add(prefix, "min_pixels", min_pixels, true);
-   kwl.add(prefix, "max_pixels", max_pixels, true);
-   
-   ossimString alpha;
-   ossim::toSimpleStringList(alpha, m_alpha);
-   kwl.add(prefix, "alpha", alpha, true);
-   kwl.add(prefix, "indexed", m_indexedFlag, true);
-   kwl.add(prefix, "origin", m_origin.toString(), true);
-   return result;
-   
-}
-
-bool ossimImageData::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   bool result = ossimRectilinearDataObject::loadState(kwl, prefix);
-   m_spatialExtents.resize(2);
-   if(result)
-   {
-      const char* null_pixels = kwl.find(prefix, "null_pixels");
-      const char* min_pixels = kwl.find(prefix, "min_pixels");
-      const char* max_pixels = kwl.find(prefix, "max_pixels");
-      const char* alpha = kwl.find(prefix, "alpha");
-      const char* origin = kwl.find(prefix, "origin");
-      const char* indexed = kwl.find(prefix, "indexed");
-      ossimString rectString = kwl.find(prefix, "rect");
-      const char* numberOfBands = kwl.find(prefix, "number_bands");
-      m_nullPixelValue.clear();
-      m_minPixelValue.clear();
-      m_maxPixelValue.clear();
-      m_alpha.clear();
-      if(null_pixels)
-      {
-         if(!ossim::toSimpleVector(m_nullPixelValue, ossimString(null_pixels)))
-         {
-            return false;
-         }
-      }
-      if(min_pixels)
-      {
-         if(!ossim::toSimpleVector(m_minPixelValue, ossimString(min_pixels)))
-         {
-            return false;
-         }
-      }
-      if(max_pixels)
-      {
-         if(!ossim::toSimpleVector(m_maxPixelValue, ossimString(max_pixels)))
-         {
-            return false;
-         }
-      }
-      if(alpha)
-      {
-         if(!ossim::toSimpleVector(m_alpha, ossimString(alpha)))
-         {
-            return false;
-         }
-      }
-      if(origin)
-      {
-         m_origin.toPoint(origin);
-      }
-      m_indexedFlag = false;
-      if(indexed)
-      {
-         m_indexedFlag = ossimString(indexed).toBool();
-      }
-      if(!rectString.empty())
-      {
-        ossimIrect rect;
-
-        if(rect.toRect(rectString))
-        {
-          setImageRectangle(rect);
-        }
-      }
-      if(numberOfBands)
-      {
-        ossim_uint32 nBands = ossimString(numberOfBands).toUInt32();
-        setNumberOfDataComponents(nBands);
-        if(m_nullPixelValue.empty()||
-          m_minPixelValue.empty()||
-          m_maxPixelValue.empty())
-          {
-            initializeDefaults();
-          }
-      }
-   }
-   
-   return result;
-}                     
diff --git a/src/ossim/imaging/ossimImageDataFactory.cpp b/src/ossim/imaging/ossimImageDataFactory.cpp
deleted file mode 100644
index 6e235e7..0000000
--- a/src/ossim/imaging/ossimImageDataFactory.cpp
+++ /dev/null
@@ -1,259 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// Contributor: David A. Horner (DAH) - http://dave.thehorners.com
-// 
-//*************************************************************************
-// $Id: ossimImageDataFactory.cpp 22135 2013-02-02 16:27:24Z dburken $
-
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/imaging/ossimU8ImageData.h>
-#include <ossim/imaging/ossimU11ImageData.h>
-#include <ossim/imaging/ossimU16ImageData.h>
-#include <ossim/imaging/ossimS16ImageData.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-
-// Static trace for debugging
-static ossimTrace traceDebug("ossimImageDataFactory:debug");
-
-ossimImageDataFactory* ossimImageDataFactory::theInstance = 0;
-OpenThreads::Mutex ossimImageDataFactory::theInstanceMutex;
-ossimImageDataFactory::ossimImageDataFactory() 
-{
-   theInstance = 0;
-}
-
-ossimImageDataFactory::~ossimImageDataFactory()
-{
-   if(theInstance)
-   {
-      //delete theInstance;
-      theInstance = 0;
-   }
-}
-
-ossimImageDataFactory* ossimImageDataFactory::instance()
-{
-   theInstanceMutex.lock();
-   if(!theInstance)
-   {
-      theInstance = new ossimImageDataFactory;
-   }
-   theInstanceMutex.unlock();
-   return theInstance;
-}
-
-ossimRefPtr<ossimImageData> ossimImageDataFactory::create(
-   ossimSource* owner,
-   ossimScalarType scalar,
-   ossim_uint32 bands)const
-{
-   ossimIpt tileSize;
-   ossim::defaultTileSize(tileSize);
-   ossim_uint32 width  = tileSize.x;
-   ossim_uint32 height = tileSize.y;
-   
-   // do some bounds checking and initialize to a default
-   bands  = (bands>0)?bands:1;
-   scalar = scalar != OSSIM_SCALAR_UNKNOWN?scalar:OSSIM_UINT8;
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimImageDataFactory::create DEBUG:"
-         << "\nCaller:  "
-         << (owner ? owner->getClassName().c_str() : "unknown")
-         << "\nbands:   " << bands
-         << "\nwidth:   " << width
-         << "\nheight:  " << height
-         << "\nScalar type:  "
-         << (ossimScalarTypeLut::instance()->getEntryString(scalar))
-         << std::endl;
-   }
-   
-   ossimRefPtr<ossimImageData> result = 0;
-   switch(scalar)
-   {
-      case OSSIM_UINT8:
-      {
-         result = new ossimU8ImageData(owner, bands, width, height);
-         break;
-      }
-      case OSSIM_USHORT11:
-      {
-         result = new ossimU11ImageData(owner, bands, width, height);
-         break;
-      }
-      case OSSIM_UINT16:
-      {
-         result = new ossimU16ImageData(owner, bands, width, height);
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         result = new ossimS16ImageData(owner, bands, width, height);
-         break;
-      }
-      default:
-      {
-         // create a generic image data implementation.
-         result = new ossimImageData(owner, scalar, bands, width, height);
-
-         // Set the scalar type for stretching.
-         ossimImageSource* inputSource = dynamic_cast<ossimImageSource*>(owner);
-         if( inputSource )
-         {
-            for(ossim_uint32 band = 0; band < bands; ++band)
-            {
-               result->setMinPix(inputSource->getMinPixelValue(band), band);
-               result->setMaxPix(inputSource->getMaxPixelValue(band), band);
-               result->setNullPix(inputSource->getNullPixelValue(band), band);
-            }
-         }
-         break;
-      }
-   }
-
-   return result;
-}
-
-ossimRefPtr<ossimImageData> ossimImageDataFactory::create(
-   ossimSource* owner,
-   ossimScalarType scalar,
-   ossim_uint32 bands,
-   ossim_uint32 width,
-   ossim_uint32 height)const
-{
-   ossimIpt tileSize;
-   ossim::defaultTileSize(tileSize);
-   // do some bounds checking and initialize to a default
-   bands  = bands  > 0?bands:1;
-   width  = width  > 0?width:tileSize.x;
-   height = height > 0?height:tileSize.y;
-   scalar = scalar != OSSIM_SCALAR_UNKNOWN?scalar:OSSIM_UINT8;
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimImageDataFactory::create DEBUG:"
-         << "\nCaller:  "
-         << (owner ? owner->getClassName().c_str() : "unknown")
-         << "\nbands:   " << bands
-         << "\nwidth:   " << width
-         << "\nheight:  " << height
-         << "\nScalar type:  "
-         << (ossimScalarTypeLut::instance()->getEntryString(scalar))
-         << std::endl;
-   }
-   
-   ossimRefPtr<ossimImageData> result = 0;
-   switch(scalar)
-   {
-      case OSSIM_UINT8:
-      {
-         result = new ossimU8ImageData(owner, bands, width, height);
-         break;
-      }
-      case OSSIM_USHORT11:
-      {
-         result = new ossimU11ImageData(owner, bands, width, height);
-         break;
-      }
-      case OSSIM_UINT16:
-      {
-         result = new ossimU16ImageData(owner, bands, width, height);
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         result = new ossimS16ImageData(owner, bands, width, height);
-         break;
-      }
-      default:
-      {
-         // create a generic image data implementation.
-         result = new ossimImageData(owner, scalar, bands, width, height);
-         break;
-      }
-   }
-
-   return result;
-}
-
-ossimRefPtr<ossimImageData> ossimImageDataFactory::create(
-   ossimSource* owner,
-   ossim_uint32 bands,
-   ossimImageSource* inputSource)const
-{
-   ossimRefPtr<ossimImageData> result = 0;
-
-   if(inputSource)
-   {
-      ossimScalarType scalar = inputSource->getOutputScalarType();
-      ossim_uint32 width  = inputSource->getTileWidth();
-      ossim_uint32 height = inputSource->getTileHeight();
-
-      result = create(owner, scalar, bands, width, height);
-      if ( result.valid() )
-      {
-         for(ossim_uint32 band = 0; band < bands; ++band)
-         {
-            result->setMinPix(inputSource->getMinPixelValue(band),   band);
-            result->setMaxPix(inputSource->getMaxPixelValue(band),   band);
-            result->setNullPix(inputSource->getNullPixelValue(band), band);
-         }
-      }
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageDataFactory::create ERROR:"
-         << "\nNULL input source!" << std::endl;
-   }
-   
-   return result;
-}
-
-
-ossimRefPtr<ossimImageData> ossimImageDataFactory::create(
-   ossimSource* owner,
-   ossimImageSource* inputSource)const
-{
-   ossimRefPtr<ossimImageData> result = 0;
-
-   if(inputSource)
-   {
-      ossimScalarType scalar = inputSource->getOutputScalarType();
-      ossim_uint32 bands  = inputSource->getNumberOfOutputBands();
-      ossim_uint32 width  = inputSource->getTileWidth();
-      ossim_uint32 height = inputSource->getTileHeight();
-
-      result = create(owner, scalar, bands, width, height);
-      if ( result.valid() )
-      {
-         for(ossim_uint32 band = 0; band < bands; ++band)
-         {
-            result->setMinPix(inputSource->getMinPixelValue(band),   band);
-            result->setMaxPix(inputSource->getMaxPixelValue(band),   band);
-            result->setNullPix(inputSource->getNullPixelValue(band), band);
-         }
-      }
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimImageDataFactory::create ERROR:"
-         << "\nNULL input source!" << std::endl;
-   }
-
-   return result;
-}
diff --git a/src/ossim/imaging/ossimImageDataHelper.cpp b/src/ossim/imaging/ossimImageDataHelper.cpp
deleted file mode 100644
index 1a15f4c..0000000
--- a/src/ossim/imaging/ossimImageDataHelper.cpp
+++ /dev/null
@@ -1,615 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimImageDataHelper.cpp 21184 2012-06-29 15:13:09Z dburken $
-#include <ossim/imaging/ossimImageDataHelper.h>
-#include <ossim/base/ossimPolyArea2d.h>
-#include <ossim/base/ossimLine.h>
-#include <vector>
-#include <algorithm>
-
-ossimImageDataHelper::ossimImageDataHelper(ossimImageData* imageData)
-{
-   setImageData(imageData);
-}
-
-
-void ossimImageDataHelper::setImageData(ossimImageData* imageData)
-{
-   theImageData = imageData;
-   if(theImageData)
-   {
-      theImageRectangle     = theImageData->getImageRectangle();
-      thePolyImageRectangle = theImageRectangle;
-//       thePolyImageRectangle = ossimPolyArea2d(theImageRectangle.ul(),
-//                                               theImageRectangle.ur(),
-//                                               theImageRectangle.lr(),
-//                                               theImageRectangle.ll());
-      theOrigin = theImageRectangle.ul();
-   }
-}
-
-void ossimImageDataHelper::copyInputToThis(const void* input,
-                                           const ossimPolygon& region,
-                                           bool clipPoly)
-{
-   if(!theImageData) return;
-   switch(theImageData->getScalarType())
-   {
-      case OSSIM_UCHAR:
-      {
-         copyInputToThis(reinterpret_cast<const ossim_uint8*>(input),
-                         region,
-                         clipPoly);
-         break;
-      }
-      case OSSIM_USHORT16:
-      case OSSIM_USHORT11:
-      {
-         copyInputToThis(reinterpret_cast<const ossim_uint16*>(input),
-                         region,
-                         clipPoly);
-         break;
-      }
-      case OSSIM_SSHORT16:
-      {
-         copyInputToThis(reinterpret_cast<const ossim_sint16*>(input),
-                         region,
-                         clipPoly);
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-          copyInputToThis(reinterpret_cast<const ossim_sint32*>(input),
-                          region,
-                          clipPoly);
-          break;
-      }
-      case OSSIM_FLOAT:
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         copyInputToThis(reinterpret_cast<const float*>(input),
-                         region,
-                         clipPoly);
-         break;
-      }
-      case OSSIM_DOUBLE:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         copyInputToThis(reinterpret_cast<const double*>(input),
-                         region,
-                         clipPoly);
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         break;
-      }
-   }   
-}
-
-void ossimImageDataHelper::fill(const ossimRgbVector& color,
-                                std::vector<ossimPolygon>& regionList,
-                                bool clipPoly)
-{
-   int i = 0;
-
-   for(i = 0; i < (int)regionList.size();++i)
-   {
-      fill(color,
-           regionList[i],
-           clipPoly);
-   }
-}
-
-
-void ossimImageDataHelper::fill(const double* values,
-                                std::vector<ossimPolygon>& regionList,
-                                bool clipPoly)
-{
-   int i = 0;
-
-   for(i = 0; i < (int)regionList.size();++i)
-   {
-      fill(values,
-           regionList[i],
-           clipPoly);
-   }
-}
-
-void ossimImageDataHelper::fill(const ossimRgbVector& color,
-                                const ossimPolygon& region,
-                                bool clipPoly)
-{
-   double colorArray[3];
-
-   colorArray[0] = color.getR();
-   colorArray[1] = color.getG();
-   colorArray[2] = color.getB();
-   switch(theImageData->getScalarType())
-   {
-      case OSSIM_UCHAR:
-      {
-         if(theImageData->getNumberOfBands() <= 3)
-         {
-            fill(static_cast<ossim_uint8>(0),
-                 (const double*)colorArray,
-                 region,
-                 clipPoly);
-            
-         }
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      case OSSIM_USHORT16:
-      case OSSIM_USHORT11:
-      case OSSIM_SSHORT16:
-      case OSSIM_FLOAT:
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_DOUBLE:
-      case OSSIM_NORMALIZED_DOUBLE:
-      default:
-      {
-         break;
-      }
-   }
-}
-
-void ossimImageDataHelper::fill(const ossimRgbVector& color,
-                                const ossimIrect& region,
-                                bool clipPoly)
-{
-   double colorArray[3];
-
-   colorArray[0] = color.getR();
-   colorArray[1] = color.getG();
-   colorArray[2] = color.getB();
-
-   switch(theImageData->getScalarType())
-   {
-      case OSSIM_UCHAR:
-      {
-         if(theImageData->getNumberOfBands() <= 3)
-         {
-            fill(static_cast<ossim_uint8>(0),
-                 colorArray,
-                 region,
-                 clipPoly);
-            
-         }
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      case OSSIM_USHORT16:
-      case OSSIM_USHORT11:
-      case OSSIM_SSHORT16:
-      case OSSIM_FLOAT:
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_DOUBLE:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         break;
-      }
-      default:
-         break;
-   }
-}
-
-void ossimImageDataHelper::fill(const double*  values,
-                                const ossimPolygon& region,
-                                bool clipPoly)
-{
-   switch(theImageData->getScalarType())
-   {
-      case OSSIM_UCHAR:
-      {
-         fill(static_cast<ossim_uint8>(0),
-              values,
-              region,
-              clipPoly);
-         break;
-      }
-      case OSSIM_USHORT16:
-      case OSSIM_USHORT11:
-      {
-         fill(static_cast<ossim_uint16>(0),
-              values,
-              region,
-              clipPoly);
-         break;
-      }
-      case OSSIM_SSHORT16:
-      {
-         fill(static_cast<ossim_sint16>(0),
-              values,
-              region,
-              clipPoly);
-         break;
-      }
-      case OSSIM_FLOAT:
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         fill(static_cast<float>(0),
-              values,
-              region,
-              clipPoly);
-         break;
-      }
-      case OSSIM_DOUBLE:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         fill(static_cast<double>(0),
-              values,
-              region,
-              clipPoly);
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         break;
-      }
-   }
-}
-
-void ossimImageDataHelper::fill(const double*  values,
-                                const ossimIrect& region,
-                                bool clipPoly)
-{
-   switch(theImageData->getScalarType())
-   {
-      case OSSIM_UCHAR:
-      {
-         fill(static_cast<ossim_uint8>(0),
-              values,
-              region,
-              clipPoly);
-         break;
-      }
-      case OSSIM_USHORT16:
-      case OSSIM_USHORT11:
-      {
-         fill(static_cast<ossim_uint16>(0),
-              values,
-              region,
-              clipPoly);
-         break;
-      }
-      case OSSIM_SSHORT16:
-      {
-         fill(static_cast<ossim_sint16>(0),
-              values,
-              region,
-              clipPoly);
-         break;
-      }
-      case OSSIM_FLOAT:
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         fill(static_cast<float>(0),
-              values,
-              region,
-              clipPoly);
-         break;
-      }
-      case OSSIM_DOUBLE:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         fill(static_cast<double>(0),
-              values,
-              region,
-              clipPoly);
-         break;
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         break;
-      }
-   }
-}
-
-
-
-template <class T>
-void ossimImageDataHelper::copyInputToThis(const T* inputBuf,
-                                           const ossimPolygon& region,
-                                           bool clipPoly)
-{
-   if(clipPoly)
-   {
-      ossimPolyArea2d polyArea(region);
-      ossimPolyArea2d clipArea = polyArea&thePolyImageRectangle;
-      
-      vector<ossimPolygon> clipList;
-//      clipArea.getAllVisiblePolygons(clipList);
-      clipArea.getVisiblePolygons(clipList);
-      int i = 0;
-            
-      for(i = 0; i < (int)clipList.size();++i)
-      {
-         copyInputToThis(inputBuf,
-                         clipList[i]);
-      }
-   }
-   else
-   {
-      copyInputToThis(inputBuf,
-                      region);
-   }
-}
-
-template <class T>
-void ossimImageDataHelper::copyInputToThis(const T* inputBuf,
-                                           const ossimPolygon& region)
-{ 
-   int n;
-   int i;
-   int y;
-   ossim_int32 miny, maxy, minx, maxx;
-   int x1, y1;
-   int x2, y2;
-   int ind1, ind2;
-   // int ints;
-   vector<int> polyInts;
-   T* buf = reinterpret_cast<T*>(theImageData->getBuf());
-   
-   ossim_int32 blockLength=theImageData->getWidth()*theImageData->getHeight();
-   ossim_int32 bandOffset = 0;
-   
-   region.getIntegerBounds(minx, miny, maxx, maxy);
-   ossim_int32 rowOffset = (miny-theOrigin.y)*theImageData->getWidth();
-   n = region.getVertexCount();
-   /* Fix in 1.3: count a vertex only once */
-   for (y = miny; (y <= maxy); y++)
-   {
-      polyInts.clear();
-      // ints = 0;
-      for (i = 0; (i < n); i++)
-      {
-         if (!i)
-         {
-            ind1 = n - 1;
-            ind2 = 0;
-         }
-         else
-         {
-            ind1 = i - 1;
-            ind2 = i;
-         }
-         y1 = ossim::round<int>(region[ind1].y);
-         y2 = ossim::round<int>(region[ind2].y);
-         if (y1 < y2)
-         {
-            x1 = ossim::round<int>(region[ind1].x);
-            x2 = ossim::round<int>(region[ind2].x);
-         }
-         else if (y1 > y2)
-         {
-            y2 = ossim::round<int>(region[ind1].y);
-            y1 = ossim::round<int>(region[ind2].y);
-            x2 = ossim::round<int>(region[ind1].x);
-            x1 = ossim::round<int>(region[ind2].x);
-         }
-         else
-         {
-            continue;
-         }
-         if ((y >= y1) && (y < y2))
-         {
-            polyInts.push_back((y - y1) * (x2 - x1) / (y2 - y1) + x1);
-         }
-         else if ((y == maxy) && (y > y1) && (y <= y2))
-         {
-            polyInts.push_back((y - y1) * (x2 - x1) / (y2 - y1) + x1);
-         }
-      }
-      std::sort(polyInts.begin(), polyInts.end());
-      
-      for (i = 0; (i < (int)polyInts.size()); i += 2)
-      {
-         ossim_int32 startX = polyInts[i]-theOrigin.x;
-         ossim_int32 endX   = polyInts[i+1]-theOrigin.x;
-         while(startX <= endX)
-         {
-            bandOffset = 0;
-	    int band;
-            for(band = 0; band < (ossim_int32)theImageData->getNumberOfBands();++band)
-            {
-               buf[rowOffset+bandOffset+startX] = (inputBuf[rowOffset+bandOffset+startX]);
-               bandOffset += blockLength;
-            }
-            ++startX;
-         }
-      }
-      rowOffset += theImageData->getWidth();
-   }
-}
-
-template <class T>
-void ossimImageDataHelper::fill(T dummyVariable,
-                                const double* values,
-                                const ossimPolygon& region,
-                                bool clipPoly)
-{
-   if(clipPoly)
-   {
-      ossimPolyArea2d polyArea(region);
-      ossimPolyArea2d clipArea = polyArea&thePolyImageRectangle;
-      
-      vector<ossimPolygon> clipList;
-//      clipArea.getAllVisiblePolygons(clipList);
-      clipArea.getVisiblePolygons(clipList);
-            
-      int i = 0;
-      for(i = 0; i < (int)clipList.size();++i)
-      {
-         fill(dummyVariable,
-              values,
-              clipList[i]);
-      }
-   }
-   else
-   {
-      fill(dummyVariable,
-           values,
-           region);
-   }
-}
-
-template <class T>
-void ossimImageDataHelper::fill(T dummyVariable,
-                                const double* values,
-                                const ossimIrect& region,
-                                bool clipPoly)
-{
-   if(clipPoly)
-   {
-      fill(dummyVariable,
-           values,
-           region.clipToRect(theImageData->getImageRectangle()));
-   }
-   else
-   {
-      fill(dummyVariable,
-           values,
-           region);
-   }
-}
-
-template <class T>
-void ossimImageDataHelper::fill(T /* dummyVariable */,
-                                const double* values,
-                                const ossimPolygon& region)
-{
-   int n;
-   int i;
-   int y;
-   ossim_int32 miny, maxy, minx, maxx;
-   int x1, y1;
-   int x2, y2;
-   int ind1, ind2;
-   // int ints;
-   vector<int> polyInts;
-   T* buf = reinterpret_cast<T*>(theImageData->getBuf());
-   
-   ossim_int32 blockLength=theImageData->getWidth()*theImageData->getHeight();
-   ossim_int32 bandOffset = 0;
-   
-   region.getIntegerBounds(minx, miny, maxx, maxy);
-   ossim_int32 rowOffset = (miny-theOrigin.y)*theImageData->getWidth();
-   n = region.getVertexCount();
-   /* Fix in 1.3: count a vertex only once */
-   for (y = miny; (y <= maxy); y++)
-   {
-      polyInts.clear();
-      // ints = 0;
-      for (i = 0; (i < n); i++)
-      {
-         if (!i)
-         {
-            ind1 = n - 1;
-            ind2 = 0;
-         }
-         else
-         {
-            ind1 = i - 1;
-            ind2 = i;
-         }
-         y1 = ossim::round<int>(region[ind1].y);
-         y2 = ossim::round<int>(region[ind2].y);
-         if (y1 < y2)
-         {
-            x1 = ossim::round<int>(region[ind1].x);
-            x2 = ossim::round<int>(region[ind2].x);
-         }
-            else if (y1 > y2)
-            {
-               y2 = ossim::round<int>(region[ind1].y);
-               y1 = ossim::round<int>(region[ind2].y);
-               x2 = ossim::round<int>(region[ind1].x);
-               x1 = ossim::round<int>(region[ind2].x);
-            }
-         else
-         {
-            continue;
-         }
-         if ((y >= y1) && (y < y2))
-         {
-            polyInts.push_back((y - y1) * (x2 - x1) / (y2 - y1) + x1);
-         }
-         else if ((y == maxy) && (y > y1) && (y <= y2))
-         {
-            polyInts.push_back((y - y1) * (x2 - x1) / (y2 - y1) + x1);
-         }
-      }
-      std::sort(polyInts.begin(), polyInts.end());
-      
-      for (i = 0; (i < (int)polyInts.size()); i += 2)
-      {
-         ossim_int32 startX = std::abs(polyInts[i]-theOrigin.x);
-         ossim_int32 endX   = std::abs(polyInts[i+1]-theOrigin.x);
-         while(startX <= endX)
-         {
-            bandOffset = 0;
-	    int band;
-            for(band = 0; band < (int)theImageData->getNumberOfBands();++band)
-            {
-               buf[rowOffset+bandOffset+startX] = (T)(values[band]);
-               bandOffset += blockLength;
-            }
-            ++startX;
-         }
-      }
-      rowOffset += theImageData->getWidth();
-   }
-}
-
-template <class T>
-void ossimImageDataHelper::fill(T /* dummyVariable */,
-                                const double* values,
-                                const ossimIrect& region)
-{
-   T* buf = reinterpret_cast<T*>(theImageData->getBuf());
-   
-   ossim_int32 blockLength=theImageData->getWidth()*theImageData->getHeight();
-   ossim_int32 bandOffset = 0;
-   ossim_int32 miny,maxy;
-   ossim_int32 minx, maxx;
-   ossim_int32 y = 0;
-   miny = region.ul().y-theOrigin.y;
-   maxy = region.lr().y-theOrigin.y;
-   minx = region.ul().x-theOrigin.x;
-   maxx = region.lr().x-theOrigin.x;
-   
-   ossim_int32 rowOffset = (miny)*theImageData->getWidth();
-   ossim_int32 startX = minx;
-   ossim_int32 endX   = maxx;
-   ossim_int32 bands  = (ossim_int32)theImageData->getNumberOfBands();
-
-   for (y = miny; (y <= maxy); ++y)
-   {
-      startX=minx;
-      while(startX <= endX)
-      {
-         bandOffset = 0;
-	 int band = 0;
-         for(band = 0; band < bands;++band)
-         {
-            buf[rowOffset+bandOffset+startX] = (T)(values[band]);
-            bandOffset += blockLength;
-         }
-         ++startX;
-      }
-      rowOffset += theImageData->getWidth();
-   }
-}
- 
diff --git a/src/ossim/imaging/ossimImageFileWriter.cpp b/src/ossim/imaging/ossimImageFileWriter.cpp
deleted file mode 100644
index 8eb31ce..0000000
--- a/src/ossim/imaging/ossimImageFileWriter.cpp
+++ /dev/null
@@ -1,1653 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Frank Warmerdam (warmerdam at pobox.com)
-//
-// Description:
-//
-// Contains class declaration for ossimImageFileWriter.
-//*******************************************************************
-//  $Id: ossimImageFileWriter.cpp 21963 2012-12-04 16:28:12Z dburken $
-
-
-#include <tiff.h> /* for tiff compression defines */
-
-#include <ossim/ossimConfig.h>
-#include <ossim/imaging/ossimImageFileWriter.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimMultiResLevelHistogram.h>
-#include <ossim/base/ossimMultiBandHistogram.h>
-#include <ossim/base/ossimHistogram.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimErrorContext.h>
-#include <ossim/base/ossimImageTypeLut.h>
-#include <ossim/base/ossimIoStream.h>
-#include <ossim/base/ossimUnitTypeLut.h>
-#include <ossim/imaging/ossimTiffOverviewBuilder.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimHistogramWriter.h>
-#include <ossim/imaging/ossimImageHistogramSource.h>
-#include <ossim/imaging/ossimMetadataFileWriter.h>
-#include <ossim/imaging/ossimGeomFileWriter.h>
-#include <ossim/imaging/ossimEnviHeaderFileWriter.h>
-#include <ossim/imaging/ossimERSFileWriter.h>
-#include <ossim/imaging/ossimFgdcFileWriter.h>
-#include <ossim/imaging/ossimReadmeFileWriter.h>
-#include <ossim/imaging/ossimScalarRemapper.h>
-#include <ossim/imaging/ossimWorldFileWriter.h>
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/base/ossimFilenameProperty.h>
-#include <ossim/base/ossimBooleanProperty.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimMapProjectionInfo.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-
-static ossimTrace traceDebug("ossimImageFileWriter:debug");
-static const ossimString AUTO_CREATE_DIRECTORY_KW("auto_create_directory");
-
-#if OSSIM_ID_ENABLED
-static const char OSSIM_ID[] = "$Id: ossimImageFileWriter.cpp 21963 2012-12-04 16:28:12Z dburken $";
-#endif
-
-RTTI_DEF3(ossimImageFileWriter,
-          "ossimImageFileWriter",
-          ossimImageWriter,
-          ossimProcessInterface,
-          ossimConnectableObjectListener)
-
-static const char SCALE_TO_EIGHT_BIT_KW[] = "scale_to_eight_bit";
-
-ossimImageFileWriter::ossimImageFileWriter(const ossimFilename& file,
-                                           ossimImageSource* inputSource,
-                                           ossimObject* owner)
-   : ossimImageWriter(owner,
-                      1,
-                      0,
-                      true,
-                      false),
-     ossimProcessInterface(),
-     ossimConnectableObjectListener(),
-     theViewController(NULL),
-     theProgressListener(NULL),
-     theFilename(file),
-     theOutputImageType(ossimImageTypeLut().getEntryString(OSSIM_IMAGE_TYPE_UNKNOWN)),
-     theWriteImageFlag(true),
-     theWriteOverviewFlag(false),
-     theWriteHistogramFlag(false),
-     theScaleToEightBitFlag(false),
-     theOverviewCompressType(COMPRESSION_NONE),
-     theOverviewJpegCompressQuality(75),
-     theWriteEnviHeaderFlag(false),
-     theWriteErsHeaderFlag(false),     
-     theWriteExternalGeometryFlag(false),
-     theWriteFgdcFlag(false),
-     theWriteJpegWorldFileFlag(false),
-     theWriteReadmeFlag(false),
-     theWriteTiffWorldFileFlag(false),
-     theWriteWorldFileFlag(false),
-     theAutoCreateDirectoryFlag(true),
-     theLinearUnits(OSSIM_UNIT_UNKNOWN),
-     thePixelType(OSSIM_PIXEL_IS_POINT)
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimImageFileWriter::ossimImageFileWriter entered..."
-         << std::endl;
-#ifdef OSSIM_ID_ENABLED
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "OSSIM_ID:  " << OSSIM_ID << std::endl;
-#endif
-   }
-
-   theInputConnection = new ossimImageSourceSequencer(inputSource);
-
-   // now map the sequencer to the same input
-   connectMyInputTo(0, inputSource);
-   initialize();
-
-   // make sure we listen to our input changes so we can change
-   // it for the sequencer as well.
-   ossimImageWriter::addListener((ossimConnectableObjectListener*)this);
-
-   theInputConnection->connectMyInputTo(0, inputSource, false);
-   theAreaOfInterest.makeNan();
-}
-
-ossimImageFileWriter::~ossimImageFileWriter()
-{
-   theInputConnection = 0;
-   theProgressListener = NULL;
-   removeListener((ossimConnectableObjectListener*)this);
-}
-
-void ossimImageFileWriter::initialize()
-{
-   if(theInputConnection.valid())
-   {
-      theInputConnection->initialize();
-
-      //---
-      // Area Of Interest(AOI):
-      // There are two AOIs to keep in sync.
-      // One owned by this base: ossimImageWriter::theAreaOfInterest
-      // One owned by the theInputConntion: ossimImageSourceSequencer::theAreaOfInterest
-      //---
-      if ( theAreaOfInterest.hasNans() == false )
-      {
-         //---
-         // ossimImageSourceSequencer::setAreaOfInterest does more than just set the
-         // variable, so only call if out of sync to avoid wasted cycles.
-         //--- 
-         if ( theAreaOfInterest != theInputConnection->getBoundingRect() )
-         {
-            theInputConnection->setAreaOfInterest( theAreaOfInterest );
-         }
-      }
-      else
-      {
-         // Set this AOI to bounding rect of input.
-         theAreaOfInterest = theInputConnection->getBoundingRect();
-      }
-   }
-}
-
-void ossimImageFileWriter::changeSequencer(ossimImageSourceSequencer* sequencer)
-{
-   if( sequencer )
-   {
-      theInputConnection = sequencer;
-      theInputConnection->connectMyInputTo(0, getInput(0));
-   }
-}
-
-bool ossimImageFileWriter::saveState(ossimKeywordlist& kwl,
-                                 const char* prefix)const
-{
-   kwl.add(prefix,
-           ossimKeywordNames::TYPE_KW,
-           TYPE_NAME(this),
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::FILENAME_KW,
-           theFilename.c_str(),
-           true);
-
-   kwl.add(prefix,
-           "create_envi_hdr",
-           (ossim_uint32)theWriteEnviHeaderFlag,
-           true);
-
-   kwl.add(prefix,
-           "create_ers_hdr",
-           (ossim_uint32)theWriteErsHeaderFlag,
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::CREATE_EXTERNAL_GEOMETRY_KW,
-           (ossim_uint32)theWriteExternalGeometryFlag,
-           true);
-
-   kwl.add(prefix,
-           "create_fgdc",
-           (ossim_uint32)theWriteFgdcFlag,
-           true);
-   
-   kwl.add(prefix,
-           "create_jpeg_world_file",
-           (ossim_uint32)theWriteJpegWorldFileFlag,
-           true);
-
-   kwl.add(prefix,
-           "create_readme",
-           (ossim_uint32)theWriteReadmeFlag,
-           true);
-   
-   kwl.add(prefix,
-           "create_tiff_world_file",
-           (ossim_uint32)theWriteTiffWorldFileFlag,
-           true);
-
-   kwl.add(prefix,
-           "create_world_file",
-           (ossim_uint32)theWriteWorldFileFlag,
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::CREATE_IMAGE_KW,
-           (ossim_uint32)theWriteImageFlag,
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::CREATE_OVERVIEW_KW,
-           (ossim_uint32)theWriteOverviewFlag,
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::CREATE_HISTOGRAM_KW,
-           (ossim_uint32)theWriteHistogramFlag,
-           true);
-
-   kwl.add(prefix,
-           SCALE_TO_EIGHT_BIT_KW,
-           (ossim_uint32)theScaleToEightBitFlag,
-           true);
-   kwl.add(prefix,
-           AUTO_CREATE_DIRECTORY_KW,
-           theAutoCreateDirectoryFlag,
-           true);
-   kwl.add(prefix,
-           ossimKeywordNames::OVERVIEW_COMPRESSION_TYPE_KW,
-           theOverviewCompressType,
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::OVERVIEW_COMPRESSION_QUALITY_KW,
-           theOverviewJpegCompressQuality,
-           true);
-
-   ossimImageTypeLut lut;
-   kwl.add(prefix,
-           ossimKeywordNames::IMAGE_TYPE_KW,
-           theOutputImageType,
-           true);
-
-   //---
-   // When "theLinearUnits" == "unknown" that is a key to the writer to just
-   // use whatever units makes sense for the projection.  Since "unknown"
-   // doesn't look good to the average user in a spec file, change to
-   // "default" if "unknown".  When read back in by the lookup table since
-   // "default" is not a valid "string" theLinearUnits will remain "unknown".
-   // Kind of a hack but it works:)  (drb)
-   //---
-   ossimString os = ossimUnitTypeLut::instance()->
-      getEntryString(theLinearUnits);
-   if (os == "unknown")
-   {
-      os = "default";  // Avoid saving as unknown for user readability.
-   }
-   kwl.add(prefix, "linear_units", os, true);
-
-   // Set the pixel type.
-   ossimString pixelType;
-   getPixelTypeString(pixelType);
-   kwl.add(prefix,
-           ossimKeywordNames::PIXEL_TYPE_KW,
-           pixelType.c_str(),
-           true);
-
-   return ossimSource::saveState(kwl, prefix);
-}
-
-bool ossimImageFileWriter::loadState(const ossimKeywordlist& kwl,
-                                     const char* prefix)
-{
-   // Load the state of the base class.
-   bool result = ossimSource::loadState(kwl, prefix);
-
-   // Get the filename...
-   const char* lookup = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
-   if(lookup)
-   {
-      ossimString filename = lookup;
-
-      lookup =  kwl.find(prefix, ossimKeywordNames::FILEPATH_KW);
-      if(lookup)
-      {
-         filename = ossimString(lookup) + filename;
-      }
-
-      setFilename(filename);
-   }
-
-   lookup = kwl.find(prefix, ossimKeywordNames::PIXEL_TYPE_KW);
-   if(lookup)
-   {
-      if(ossimString(lookup).downcase().contains("area"))
-      {
-         thePixelType = OSSIM_PIXEL_IS_AREA;
-      }
-      else
-      {
-         thePixelType = OSSIM_PIXEL_IS_POINT;
-      }
-   }
-
-   lookup = kwl.find(prefix, "linear_units");
-   if(lookup)
-   {
-      ossimUnitType units = (ossimUnitType)ossimUnitTypeLut::instance()->
-         getEntryNumber(lookup, true);
-      if ( (units == OSSIM_METERS) ||
-           (units == OSSIM_FEET)   ||
-           (units == OSSIM_US_SURVEY_FEET) )
-      {
-         theLinearUnits = units;
-      }
-   }
-
-   lookup = kwl.find(prefix, ossimKeywordNames::CREATE_EXTERNAL_GEOMETRY_KW);
-   if(lookup)
-   {
-      ossimString s = lookup;
-      theWriteExternalGeometryFlag = s.toBool();
-   }
-   
-   lookup = kwl.find(prefix, "create_envi_hdr");
-   if(lookup)
-   {
-      ossimString s = lookup;
-      theWriteEnviHeaderFlag = s.toBool();
-   }
-   
-   lookup = kwl.find(prefix, "create_ers_hdr");
-   if(lookup)
-   {
-      ossimString s = lookup;
-      theWriteErsHeaderFlag = s.toBool();
-   }
-
-   lookup = kwl.find(prefix, "create_fgdc");
-   if(lookup)
-   {
-      ossimString s = lookup;
-      theWriteFgdcFlag = s.toBool();
-   }
-   
-   lookup = kwl.find(prefix, "create_jpeg_world_file");
-   if(lookup)
-   {
-      ossimString s = lookup;
-      theWriteJpegWorldFileFlag = s.toBool();
-   }
-   
-   lookup = kwl.find(prefix, "create_readme");
-   if(lookup)
-   {
-      ossimString s = lookup;
-      theWriteReadmeFlag = s.toBool();
-   }
-   
-   lookup = kwl.find(prefix, "create_tiff_world_file");
-   if(lookup)
-   {
-      ossimString s = lookup;
-      theWriteTiffWorldFileFlag = s.toBool();
-   }
-
-   lookup = kwl.find(prefix, "create_world_file");
-   if(lookup)
-   {
-      ossimString s = lookup;
-      theWriteWorldFileFlag = s.toBool();
-   }
-
-   lookup = kwl.find(prefix, ossimKeywordNames::CREATE_IMAGE_KW);
-   if(lookup)
-   {
-      ossimString s = lookup;
-      theWriteImageFlag = s.toBool();
-   }
-
-   lookup = kwl.find(prefix, ossimKeywordNames::CREATE_OVERVIEW_KW);
-   if(lookup)
-   {
-      ossimString s = lookup;
-      theWriteOverviewFlag = s.toBool();
-   }
-
-   lookup = kwl.find(prefix, ossimKeywordNames::CREATE_HISTOGRAM_KW);
-   if(lookup)
-   {
-      ossimString s = lookup;
-      theWriteHistogramFlag = s.toBool();
-   }
-
-   lookup = kwl.find(prefix, SCALE_TO_EIGHT_BIT_KW);
-   if(lookup)
-   {
-      ossimString s = lookup;
-      theScaleToEightBitFlag = s.toBool();
-   }
-
-   lookup = kwl.find(prefix, AUTO_CREATE_DIRECTORY_KW);
-   if(lookup)
-   {
-      theAutoCreateDirectoryFlag = ossimString(lookup).toBool();
-   }
-   lookup = kwl.find(prefix, ossimKeywordNames::OVERVIEW_COMPRESSION_TYPE_KW);
-   if(lookup)
-   {
-      ossimString s = lookup;
-      theOverviewCompressType = static_cast<ossim_uint16>(s.toUInt32());
-   }
-
-   lookup = kwl.find(prefix, ossimKeywordNames::OVERVIEW_COMPRESSION_QUALITY_KW);
-   if(lookup)
-   {
-      ossimString s = lookup;
-      theOverviewJpegCompressQuality = s.toInt32();
-   }
-
-   const char* outputImageType = kwl.find(prefix, ossimKeywordNames::IMAGE_TYPE_KW);
-   if(outputImageType)
-   {
-      theOutputImageType = outputImageType;
-   }
-
-   if(theInputObjectList.size() != 2)
-   {
-      theInputObjectList.resize(2);
-      theInputListIsFixedFlag = true;
-   }
-
-   theOutputListIsFixedFlag = false;
-
-   return result;
-}
-
-bool ossimImageFileWriter::writeOverviewFile(ossim_uint16 tiff_compress_type,
-                                             ossim_int32 jpeg_compress_quality, 
-                                             bool includeR0) 
-{
-   if(theFilename == "") return false;
-
-   // Get an image handler for the source file.
-   ossimRefPtr<ossimImageHandler> ih
-      = ossimImageHandlerRegistry::instance()->open(theFilename);
-
-   if (ih.valid() == false)
-   {
-      // Set the error...
-      return false;
-   }
-
-   ossimRefPtr<ossimTiffOverviewBuilder> ob = new ossimTiffOverviewBuilder();
-   
-   if ( ob->setInputSource(ih.get()) )
-   {
-      // Give the listener to the overview builder if set.
-      if (theProgressListener)
-      {
-         ob->addListener(theProgressListener);
-      }
-      
-      // Build a new file name for the overview.
-      ossimFilename overview_file = theFilename;
-      overview_file.setExtension(ossimString("ovr"));
-      ob->setCompressionType(tiff_compress_type);
-      ob->setJpegCompressionQuality(jpeg_compress_quality);
-      ob->setOutputFile(overview_file);
-      ob->setCopyAllFlag(includeR0);
-      ob->execute();
-
-      // Remove the listener from the overview builder.
-      if (theProgressListener)
-      {
-         ob->removeListener(theProgressListener);
-      }
-   }
-
-   return true;
-}
-
-bool ossimImageFileWriter::writeEnviHeaderFile() 
-{
-   if( (theFilename == "") || !theInputConnection ||
-       theAreaOfInterest.hasNans())
-   {
-      return false;
-   }
-
-   // Make the file name.
-   ossimFilename outputFile = theFilename;
-   outputFile.setExtension(ossimString("hdr"));
-
-   // Make the writer.
-   ossimRefPtr<ossimMetadataFileWriter> writer =
-      new ossimEnviHeaderFileWriter();
-   
-   // Set things up.
-   writer->connectMyInputTo(0, theInputConnection.get());
-   writer->initialize();
-   writer->setFilename(outputFile);
-   writer->setPixelType(thePixelType);
-   writer->setAreaOfInterest(theAreaOfInterest);
-   
-   // Write it to disk.
-   return writer->execute();
-}
-
-bool ossimImageFileWriter::writeErsHeaderFile() 
-{
-   if( (theFilename == "") || !theInputConnection ||
-       theAreaOfInterest.hasNans())
-   {
-      return false;
-   }
-   
-   // Make the file name.
-   ossimFilename outputFile = theFilename;
-   outputFile.setExtension(ossimString("ers"));
-
-   // Make the writer.
-   ossimRefPtr<ossimMetadataFileWriter> writer =
-	   new ossimERSFileWriter();
-   
-   // Set things up.
-   writer->connectMyInputTo(0, theInputConnection.get());
-   writer->initialize();
-   writer->setFilename(outputFile);
-   writer->setPixelType(thePixelType);
-   writer->setAreaOfInterest(theAreaOfInterest);
-   
-   // Write it to disk.
-   return writer->execute();
-}
-
-bool ossimImageFileWriter::writeExternalGeometryFile() 
-{
-   if( (theFilename == "") || !theInputConnection ||
-       theAreaOfInterest.hasNans())
-   {
-      return false;
-   }
-
-   // Make the file name.
-   ossimFilename geomFile = theFilename;
-   geomFile.setExtension(ossimString("geom"));
-
-   // Make the writer.
-   ossimRefPtr<ossimMetadataFileWriter> writer = new ossimGeomFileWriter();
-
-   // Set things up.
-//   writer->connectMyInputTo(0, theInputConnection.get());
-   writer->connectMyInputTo(0, theInputConnection.get());
-   writer->setFilename(geomFile);
-   writer->initialize();
-   writer->setPixelType(thePixelType);
-   writer->setAreaOfInterest(theAreaOfInterest);
-
-   // Write it to disk.
-   return writer->execute();
-}
-
-bool ossimImageFileWriter::writeFgdcFile() 
-{
-   if( (theFilename == "") || !theInputConnection ||
-       theAreaOfInterest.hasNans())
-   {
-      return false;
-   }
-
-   // Make the file name.
-   ossimFilename outputFile = theFilename;
-   outputFile.setExtension(ossimString("xml"));
-
-   // Make the writer.
-   ossimRefPtr<ossimMetadataFileWriter> writer = new ossimFgdcFileWriter();
-   
-   // Set things up.
-   writer->connectMyInputTo(0, theInputConnection.get());
-   writer->initialize();
-   writer->setFilename(outputFile);
-   writer->setPixelType(thePixelType);
-   writer->setAreaOfInterest(theAreaOfInterest);
-   
-   // Write it to disk.
-   return writer->execute();
-}
-
-bool ossimImageFileWriter::writeJpegWorldFile() 
-{
-   if(theFilename == "")
-   {
-      return false;
-   }
-   
-   // Make the file name.
-   ossimFilename file = theFilename;
-   file.setExtension(ossimString("jpw")); // jpw???
-
-   return writeWorldFile(file);
-}
-
-bool ossimImageFileWriter::writeReadmeFile() 
-{
-   if( (theFilename == "") || !theInputConnection ||
-       theAreaOfInterest.hasNans())
-   {
-      return false;
-   }
-
-   // Make the file name.
-   ossimFilename outputFile = theFilename.noExtension();
-   
-   outputFile += "_readme.txt";
-
-   // Make the writer.
-   ossimRefPtr<ossimMetadataFileWriter> writer =
-      new ossimReadmeFileWriter();
-   
-   // Set things up.
-   writer->connectMyInputTo(0, theInputConnection.get());
-   writer->initialize();
-   writer->setFilename(outputFile);
-   writer->setPixelType(thePixelType);
-   writer->setAreaOfInterest(theAreaOfInterest);
-   
-   // Write it to disk.
-   return writer->execute();
-}
-
-bool ossimImageFileWriter::writeTiffWorldFile() 
-{
-   if(theFilename == "")
-   {
-      return false;
-   }
-   
-   // Make the file name.
-   ossimFilename file = theFilename;
-   file.setExtension(ossimString("tfw"));
-
-   return writeWorldFile(file);
-}
-
-bool ossimImageFileWriter::writeMetaDataFiles() 
-{
-   bool status = true;
-   
-   if(theWriteEnviHeaderFlag&&!needsAborting())
-   {
-      if(writeEnviHeaderFile() == false)
-      {
-         status = false;
-
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "Write of envi header file failed!" << endl;
-      }
-   }
-
-   if(theWriteErsHeaderFlag&&!needsAborting())
-   {
-      if(writeErsHeaderFile() == false)
-      {
-         status = false;
-
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "Write of ers header file failed!" << endl;
-      }
-   }
-
-   if (theWriteExternalGeometryFlag&&!needsAborting())
-   {
-      if( writeExternalGeometryFile() == false)
-      {
-         status = false;
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-            << "Write of geometry file failed!" << endl;
-         }
-      }
-   }
-   if(theWriteFgdcFlag&&!needsAborting())
-   {
-      if(writeFgdcFile() == false)
-      {
-         status = false;
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-            << "Write of fgdc file failed!" << endl;
-         }
-      }
-   }
-   if(theWriteJpegWorldFileFlag&&!needsAborting())
-   {
-      if(writeJpegWorldFile() == false)
-      {
-         status = false;
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-            << "Write of jpeg world file failed!" << endl;
-         }
-      }
-   }
-   if(theWriteReadmeFlag&&!needsAborting())
-   {
-      if(writeReadmeFile() == false)
-      {
-         status = false;
-         
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-            << "Write of readme file failed!" << endl;
-         }
-      }
-   }
-   if(theWriteTiffWorldFileFlag&&!needsAborting())
-   {
-      if(writeTiffWorldFile() == false)
-      {
-         status = false;
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-            << "Write of tiff world file failed!" << endl;
-         }
-      }
-   }
-
-   if(theWriteWorldFileFlag&&!needsAborting())
-   {
-      if(writeWorldFile() == false)
-      {
-         status = false;
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-            << "Write of world file failed!" << endl;
-         }
-      }
-   }
-   
-   if (theWriteHistogramFlag&&!needsAborting())
-   {
-      if (!writeHistogramFile())
-      {
-         status = false;
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-            << "Write of histogram file failed!" << endl;
-         }
-      }
-   }
-
-   return status;
-}
-
-bool ossimImageFileWriter::writeHistogramFile() 
-{
-   if(needsAborting()) return false;
-   if(theFilename == "") return false;
-
-   ossimFilename histogram_file = theFilename;
-   histogram_file.setExtension(ossimString("his"));
-
-   ossimRefPtr<ossimImageHandler> handler = ossimImageHandlerRegistry::instance()->
-      open(theFilename);
-
-   if (!handler)
-   {
-      return false;
-   }
-
-   ossimRefPtr<ossimImageHistogramSource> histoSource = new ossimImageHistogramSource;
-
-   ossimRefPtr<ossimHistogramWriter> writer = new ossimHistogramWriter;
-   histoSource->setMaxNumberOfRLevels(1); // Only compute for r0.
-   histoSource->connectMyInputTo(0, handler.get());
-   histoSource->enableSource();
-   writer->connectMyInputTo(0, histoSource.get());
-   writer->setFilename(histogram_file);
-   writer->addListener(&theStdOutProgress);
-   writer->execute();
-   writer->disconnect();
-   histoSource->disconnect();
-   handler->disconnect();
-   writer = 0; histoSource = 0; handler = 0;
-   return true;
-}
-
-void ossimImageFileWriter::disconnectInputEvent(ossimConnectionEvent& /* event */)
-{
-   if(!getInput(0))
-   {
-      theInputConnection->disconnectMyInput((ossim_int32)0, false);
-   }
-   theViewController = PTR_CAST(ossimViewController, getInput(1));
-
-   initialize();
-}
-
-void ossimImageFileWriter::connectInputEvent(ossimConnectionEvent& /* event */)
-{
-   theInputConnection->connectMyInputTo((ossim_int32)0,
-                                        getInput(0),
-                                        false);
-   theViewController = PTR_CAST(ossimViewController, getInput(1));
-   initialize();
-}
-
-void ossimImageFileWriter::propertyEvent(ossimPropertyEvent& /* event */)
-{
-   initialize();
-}
-
-void ossimImageFileWriter::setOutputImageType(const ossimString& type)
-{
-   theOutputImageType = type;
-}
-
-void ossimImageFileWriter::setOutputImageType(ossim_int32 type)
-{
-   ossimImageTypeLut lut;
-   theOutputImageType = lut.getEntryString(type);
-}
-
-ossimString ossimImageFileWriter::getOutputImageTypeString() const
-{
-   return theOutputImageType;
-
-}
-
-ossim_int32 ossimImageFileWriter::getOutputImageType() const
-{
-   ossimImageTypeLut lut;
-   return lut.getEntryNumber(theOutputImageType);
-}
-
-
-bool ossimImageFileWriter::getWriteImageFlag() const
-{
-   return theWriteImageFlag;
-}
-
-bool ossimImageFileWriter::getWriteHistogramFlag() const
-{
-   return theWriteHistogramFlag;
-}
-
-bool ossimImageFileWriter::getWriteOverviewFlag() const
-{
-   return theWriteOverviewFlag;
-}
-
-bool ossimImageFileWriter::getScaleToEightBitFlag() const
-{
-   return theScaleToEightBitFlag;
-}
-
-bool ossimImageFileWriter::getWriteEnviHeaderFlag() const
-{
-   return theWriteEnviHeaderFlag;
-}
-
-bool ossimImageFileWriter::getWriteErsHeaderFlag() const
-{
-   return theWriteErsHeaderFlag;
-}
-
-bool ossimImageFileWriter::getWriteExternalGeometryFlag() const
-{
-   return theWriteExternalGeometryFlag;
-}
-
-bool ossimImageFileWriter::getWriteFgdcFlag() const
-{
-   return theWriteFgdcFlag;
-}
-
-bool ossimImageFileWriter::getWriteJpegWorldFileFlag() const
-{
-   return theWriteJpegWorldFileFlag;
-}
-
-bool ossimImageFileWriter::getWriteReadmeFlag() const
-{
-   return theWriteReadmeFlag;
-}
-
-bool ossimImageFileWriter::getWriteTiffWorldFileFlag() const
-{
-   return theWriteTiffWorldFileFlag;
-}
-
-bool ossimImageFileWriter::getWriteWorldFileFlag() const
-{
-   return theWriteWorldFileFlag;
-}
-
-void ossimImageFileWriter::setWriteOverviewFlag(bool flag)
-{
-   theWriteOverviewFlag = flag;
-}
-
-void ossimImageFileWriter::setWriteImageFlag(bool flag)
-{
-   theWriteImageFlag = flag;
-}
-
-void ossimImageFileWriter::setWriteHistogramFlag(bool flag)
-{
-   theWriteHistogramFlag = flag;
-}
-
-void ossimImageFileWriter::setScaleToEightBitFlag(bool flag)
-{
-   theScaleToEightBitFlag = flag;
-}
-
-void ossimImageFileWriter::setWriteEnviHeaderFlag(bool flag)
-{
-   theWriteEnviHeaderFlag = flag;
-}
-
-void ossimImageFileWriter::setWriteErsHeaderFlag(bool flag)
-{
-   theWriteErsHeaderFlag = flag;
-}
-
-void ossimImageFileWriter::setWriteExternalGeometryFlag(bool flag)
-{
-   theWriteExternalGeometryFlag = flag;
-}
-
-void ossimImageFileWriter::setWriteFgdcFlag(bool flag)
-{
-   theWriteFgdcFlag = flag;
-}
-
-void ossimImageFileWriter::setWriteJpegWorldFile(bool flag)
-{
-   theWriteJpegWorldFileFlag  = flag;
-}
-
-void ossimImageFileWriter::setWriteReadme(bool flag)
-{
-   theWriteReadmeFlag = flag;
-}
-
-void ossimImageFileWriter::setWriteTiffWorldFile(bool flag)
-{
-   theWriteTiffWorldFileFlag  = flag;
-}
-
-void ossimImageFileWriter::setWriteWorldFile(bool flag)
-{
-   theWriteWorldFileFlag  = flag;
-}
-
-ossimObject* ossimImageFileWriter::getObject()
-{
-   return this;
-}
-
-const ossimObject* ossimImageFileWriter::getObject() const
-{
-   return this;
-}
-
-void ossimImageFileWriter::setAreaOfInterest(const ossimIrect& inputRect)
-{
-   // This sets "theAreaOfInterest".
-   ossimImageWriter::setAreaOfInterest(inputRect);
-   
-   if( theInputConnection.valid() )
-   {
-      //---
-      // ossimImageSourceSequencer::setAreaOfInterest does more than just set the
-      // variable, so only call if out of sync to avoid wasted cycles.
-      //--- 
-      if ( theAreaOfInterest != theInputConnection->getBoundingRect() )
-      {
-         // Set the sequencer area of interest.
-         theInputConnection->setAreaOfInterest(inputRect);
-      }
-   }
-}
-
-ossimImageSourceSequencer* ossimImageFileWriter::getSequencer()
-{
-   return theInputConnection.get();
-}
-
-bool ossimImageFileWriter::execute()
-{
-   static const char MODULE[] = "ossimImageFileWriter::execute";
-   
-   if (!theInputConnection) // Must have a sequencer...
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE << " DEBUG:\ntheInputConnection is NULL!" << endl;
-      }
-      return false;
-   }
-   
-   if (theFilename == "") // Must have a filename...
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE << " DEBUG:\ntheFilename is empty!" << endl;
-      }
-      return false;
-   }
-   
-   
-   // make sure we have a region of interest
-   if(theAreaOfInterest.hasNans())
-   {
-      theInputConnection->initialize();
-      theAreaOfInterest = theInputConnection->getAreaOfInterest();
-   }
-   else
-   {
-      theInputConnection->setAreaOfInterest(theAreaOfInterest);
-   }
-
-   if(theAreaOfInterest.hasNans()) // Must have an area of interest...
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE << " ERROR:  Area of interest has nans!"
-            << "Area of interest:  "
-            << theAreaOfInterest
-            << "\nReturning..." << endl;
-      }
-
-      return false;
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " DEBUG:\n"
-         << "Area of interest:  " << theAreaOfInterest << endl;
-   }
-   
-   ossimRefPtr<ossimImageSource> savedInput;
-   if (theScaleToEightBitFlag)
-   {
-      if(theInputConnection->getOutputScalarType() != OSSIM_UINT8)
-      {
-         savedInput = new ossimScalarRemapper;
-         
-         savedInput->connectMyInputTo(0, theInputConnection->getInput(0));
-         theInputConnection->connectMyInputTo(0, savedInput.get());
-         theInputConnection->initialize();
-      }
-   }
-
-   ossimFilename path = theFilename.path();
-   if(!path.exists())
-   {
-      path.createDirectory(true);
-   }
-   setProcessStatus(ossimProcessInterface::PROCESS_STATUS_EXECUTING);
-   //setPercentComplete(0.0); let writeFile set the precent complete
-   bool wroteFile = true;
-   bool result    = true;
-   if (theWriteImageFlag)
-   {
-      wroteFile = writeFile();
-   }
-  
-   /*
-   if(needsAborting())
-   {
-      setProcessStatus(ossimProcessInterface::PROCESS_STATUS_ABORTED);
-   }
-   else
-   {
-      setProcessStatus(ossimProcessInterface::PROCESS_STATUS_NOT_EXECUTING);
-   }
-   */
-   if (theWriteOverviewFlag&&!needsAborting())
-   {
-      // Writing overviews has been mpi'd so do on all processes.
-      if (!writeOverviewFile(theOverviewCompressType,
-                             theOverviewJpegCompressQuality))
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-            << "Write of overview file failed!" << endl;
-         }
-      }
-   }
-
-   if(!needsAborting())
-   {
-      // Do these only on the master process. Note left to right precedence!
-      if (getSequencer() && getSequencer()->isMaster())
-      {
-         if (wroteFile)
-         {
-            if (writeMetaDataFiles() == false)
-            {
-               if(traceDebug())
-               {
-                  ossimNotify(ossimNotifyLevel_WARN)
-                  << "Write of metadata file failed!" << endl;
-               }
-               result = false;
-            }
-         }
-         
-      } // End of "if (getSequencer() && getSequencer()->isMaster()))
-   }
-
-   if(savedInput.valid())
-   {
-      ossimConnectableObject* obj = theInputConnection->getInput(0);
-      if(obj)
-      {
-         theInputConnection->connectMyInputTo(0, obj->getInput(0));
-      }
-   }
-   if(!needsAborting())
-   {
-      setProcessStatus(ossimProcessInterface::PROCESS_STATUS_NOT_EXECUTING);
-   }
-   else 
-   {
-      setProcessStatus(ossimProcessInterface::PROCESS_STATUS_ABORTED);   
-   }
-
-   savedInput = 0;
-   return result;
-}
-
-bool ossimImageFileWriter::writeStream()
-{
-   //---
-   // Not implemented in this class. Derived classed should implement if
-   // they can write to a stream.
-   //--- 
-   return false;
-}
-
-ossimRefPtr<ossimOStream> ossimImageFileWriter::getOutputStream() const
-{
-   //---
-   // Not implemented in this class. Derived classed should implement if
-   // they can write to a stream.
-   //--- 
-   return ossimRefPtr<ossimOStream>();  
-}
-
-bool ossimImageFileWriter::setOutputStream(
-   ossimRefPtr<ossimOStream> /* stream */ )
-{
-   //---
-   // Not implemented in this class. Derived classed should implement if
-   // they can write to a stream.
-   //---
-   return false;
-}
-
-bool ossimImageFileWriter::setOutputStream(std::ostream& /* str */)
-{
-   //---
-   // Not implemented in this class. Derived classed should implement if
-   // they can write to a stream.
-   //---
-   return false;
-}
-
-
-void ossimImageFileWriter::setPercentComplete(double percentComplete)
-{
-   ossimProcessInterface::setPercentComplete(percentComplete);
-   ossimProcessProgressEvent event(this, percentComplete);
-   fireEvent(event);
-}
-
-void ossimImageFileWriter::setOutputName(const ossimString& outputName)
-{
-   ossimImageWriter::setOutputName(outputName);
-   setFilename(ossimFilename(outputName));
-}
-
-void ossimImageFileWriter::setFilename(const ossimFilename& file)
-{
-   theFilename = file;
-}
-
-const ossimFilename& ossimImageFileWriter::getFilename()const
-{
-   return theFilename;
-}
-
-bool ossimImageFileWriter::canConnectMyInputTo(ossim_int32 inputIndex,
-                                               const ossimConnectableObject* object)const
-{
-   return (object&&
-           ( (PTR_CAST(ossimImageSource, object)&&inputIndex == 0)||
-             (PTR_CAST(ossimViewController, object)&&inputIndex == 1)) );
-}
-
-ossim_uint16 ossimImageFileWriter::getOverviewCompressType() const
-{
-   return theOverviewCompressType;
-}
-
-ossim_int32  ossimImageFileWriter::getOverviewJpegCompressQuality() const
-{
-   return theOverviewJpegCompressQuality;
-}
-
-void ossimImageFileWriter::setOverviewCompressType(ossim_uint16 type)
-{
-   theOverviewCompressType = type;
-}
-
-void ossimImageFileWriter::setOverviewJpegCompressQuality(ossim_int32 quality)
-{
-   theOverviewJpegCompressQuality = quality;
-}
-
-void ossimImageFileWriter::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property) return;
-   
-   if(property->getName() == ossimKeywordNames::FILENAME_KW)
-   {
-      theFilename = property->valueToString();
-   }
-   else if (property->getName() == "create_envi_hdr")
-   {
-      theWriteEnviHeaderFlag = property->valueToString().toBool();
-   }
-   else if (property->getName() == "create_ers_hdr")
-   {
-      theWriteErsHeaderFlag = property->valueToString().toBool();
-   }
-   else if (property->getName() ==
-            ossimKeywordNames::CREATE_EXTERNAL_GEOMETRY_KW)
-   {
-      theWriteExternalGeometryFlag = property->valueToString().toBool();
-   }
-   else if (property->getName() == "create_fgdc")
-   {
-      theWriteFgdcFlag = property->valueToString().toBool();
-   }
-   else if (property->getName() == "create_jpeg_world_file")
-   {
-      theWriteJpegWorldFileFlag = property->valueToString().toBool();
-   }
-   else if (property->getName() == "create_readme")
-   {
-      theWriteReadmeFlag = property->valueToString().toBool();
-   }
-   else if (property->getName() == "create_tiff_world_file")
-   {
-      theWriteTiffWorldFileFlag = property->valueToString().toBool();
-   }
-   else if (property->getName() == "create_world_file")
-   {
-      theWriteWorldFileFlag = property->valueToString().toBool();
-   }
-   else if (property->getName() == ossimKeywordNames::CREATE_IMAGE_KW)
-   {
-      theWriteImageFlag = property->valueToString().toBool();
-   }
-   else if (property->getName() == ossimKeywordNames::CREATE_OVERVIEW_KW)
-   {
-      theWriteOverviewFlag = property->valueToString().toBool();
-   }
-   else if (property->getName() == ossimKeywordNames::CREATE_HISTOGRAM_KW)
-   {
-      theWriteHistogramFlag = property->valueToString().toBool();
-   }
-   else if (property->getName() == SCALE_TO_EIGHT_BIT_KW)
-   {
-      theScaleToEightBitFlag = property->valueToString().toBool();
-   }
-   else if(property->getName() == AUTO_CREATE_DIRECTORY_KW)
-   {
-      theAutoCreateDirectoryFlag = property->valueToString().toBool();
-   }
-   else if (property->getName() == "linear_units")
-   {
-      theLinearUnits = (ossimUnitType)
-         (ossimUnitTypeLut::instance()->
-          getEntryNumber(property->valueToString()));
-   }
-   else if(property->getName() == ossimKeywordNames::IMAGE_TYPE_KW)
-   {
-      setOutputImageType(property->valueToString());
-   }
-   else if(property->getName() == ossimKeywordNames::PIXEL_TYPE_KW)
-   {
-      ossimStringProperty* stringProperty = PTR_CAST(ossimStringProperty,
-                                                     property.get());
-      if (stringProperty)
-      {
-         ossimString s;
-         stringProperty->valueToString(s);
-         setPixelType(s);
-      }
-   }
-   else
-   {
-      ossimImageWriter::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimImageFileWriter::getProperty(const ossimString& name)const
-{
-   if(name == ossimKeywordNames::FILENAME_KW)
-   {
-      ossimFilenameProperty* filenameProp =
-         new ossimFilenameProperty(name, theFilename);
-
-      filenameProp->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_OUTPUT);
-
-      return filenameProp;
-   }
-   else if(name == ossimKeywordNames::IMAGE_TYPE_KW)
-   {
-      ossimStringProperty* prop =  new ossimStringProperty(name, theOutputImageType, false);
-      std::vector<ossimString> typeList;
-      getImageTypeList(typeList);
-      if(typeList.size() > 1)
-      {
-         prop->setReadOnlyFlag(false);
-         prop->setConstraints(typeList);
-         prop->setChangeType(ossimProperty::ossimPropertyChangeType_AFFECTS_OTHERS);
-      }
-      else
-      {
-         prop->setReadOnlyFlag(true);
-      }
-      return prop;
-   }
-   else if(name == AUTO_CREATE_DIRECTORY_KW)
-   {
-      return new ossimBooleanProperty(name, theAutoCreateDirectoryFlag);
-   }
-   else if (name == "create_envi_hdr")
-   {
-      return new ossimBooleanProperty(name, theWriteEnviHeaderFlag);
-   }
-   else if (name == "create_ers_hdr")
-   {
-      return new ossimBooleanProperty(name, theWriteErsHeaderFlag);
-   }
-   else if (name == ossimKeywordNames::CREATE_EXTERNAL_GEOMETRY_KW)
-   {
-      return new ossimBooleanProperty(name, theWriteExternalGeometryFlag);
-   }
-   else if (name == "create_fgdc")
-   {
-      return new ossimBooleanProperty(name, theWriteFgdcFlag);
-   }
-   else if (name == "create_jpeg_world_file")
-   {
-      return new ossimBooleanProperty(name, theWriteJpegWorldFileFlag);
-   }
-   else if (name == "create_readme")
-   {
-      return new ossimBooleanProperty(name, theWriteReadmeFlag);
-   }
-   else if (name == "create_tiff_world_file")
-   {
-      return new ossimBooleanProperty(name, theWriteTiffWorldFileFlag);
-   }
-   else if (name == "create_world_file")
-   {
-      return new ossimBooleanProperty(name, theWriteWorldFileFlag);
-   }
-   else if (name == ossimKeywordNames::CREATE_IMAGE_KW)
-   {
-      return new ossimBooleanProperty(name, theWriteImageFlag);
-   }
-   else if (name == ossimKeywordNames::CREATE_OVERVIEW_KW)
-   {
-      return new ossimBooleanProperty(name, theWriteOverviewFlag);
-   }
-   else if (name == ossimKeywordNames::CREATE_HISTOGRAM_KW)
-   {
-      return new ossimBooleanProperty(name, theWriteHistogramFlag);
-   }
-   else if (name == SCALE_TO_EIGHT_BIT_KW)
-   {
-      return new ossimBooleanProperty(name, theScaleToEightBitFlag);
-   }
-   else if (name == "linear_units")
-   {
-      // property value
-      ossimString value = ossimUnitTypeLut::instance()->
-         getEntryString(theLinearUnits);
-      
-      //---
-      // theLinearUnits is set to unknown as a default.  This keys the
-      // writer to use whatever makes sense for the given output.
-      // Since "unknown" is a bad name to present to users, we will
-      // use "default" if theLinearUnits is == "unknown".
-      //---
-      if (value == "unknown")
-      {
-         value = "default";
-      }
-      
-      // constraint list
-      vector<ossimString> constraintList;
-      constraintList.push_back(ossimString("default"));
-      constraintList.push_back(ossimString("meters"));
-      constraintList.push_back(ossimString("feet"));
-      constraintList.push_back(ossimString("us_survey_feet"));
-      
-      return new ossimStringProperty(name,
-                                     value,
-                                     false, // not editable
-                                     constraintList);
-   }
-   else if (name == ossimKeywordNames::PIXEL_TYPE_KW)
-   {
-      ossimString value;
-      getPixelTypeString(value);
-      ossimStringProperty* stringProp =
-         new ossimStringProperty(name,
-                                 value,
-                                 false); // editable flag
-      stringProp->addConstraint(ossimString("point"));
-      stringProp->addConstraint(ossimString("area"));
-      return stringProp;
-   }
-
-   return ossimImageWriter::getProperty(name);
-}
-
-void ossimImageFileWriter::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageWriter::getPropertyNames(propertyNames);
-
-   propertyNames.push_back(ossimString(ossimKeywordNames::FILENAME_KW));
-   propertyNames.push_back(ossimString("create_envi_hdr"));  
-   propertyNames.push_back(ossimString(ossimKeywordNames::CREATE_EXTERNAL_GEOMETRY_KW));
-   propertyNames.push_back(ossimString("create_fgdc"));
-   propertyNames.push_back(ossimString("create_jpeg_world_file"));
-   propertyNames.push_back(ossimString("create_readme"));
-   propertyNames.push_back(ossimString("create_tiff_world_file"));
-   propertyNames.push_back(ossimString("create_world_file"));   
-   propertyNames.push_back(ossimString(ossimKeywordNames::CREATE_IMAGE_KW));
-   propertyNames.push_back(ossimString(ossimKeywordNames::CREATE_OVERVIEW_KW));
-   propertyNames.push_back(ossimString(ossimKeywordNames::CREATE_HISTOGRAM_KW));
-   propertyNames.push_back(ossimString(AUTO_CREATE_DIRECTORY_KW));
-   propertyNames.push_back(ossimString(SCALE_TO_EIGHT_BIT_KW));
-   propertyNames.push_back(ossimString("linear_units"));
-   propertyNames.push_back(ossimString(ossimKeywordNames::PIXEL_TYPE_KW));
-   propertyNames.push_back(ossimString(ossimKeywordNames::IMAGE_TYPE_KW));
-
-}
-
-ossimString ossimImageFileWriter::getExtension() const
-{
-   // default unknown file extension
-   return ossimString("ext");
-}
-
-bool ossimImageFileWriter::getOutputHasInternalOverviews( void ) const
-{
-   // default value: don't assume internal overviews will
-   // be generated by image writers.
-   return false;
-}
-
-bool ossimImageFileWriter::hasImageType(const ossimString& imageType) const
-{
-   std::vector<ossimString> imageTypeList;
-   getImageTypeList(imageTypeList);
-
-   std::vector<ossimString>::const_iterator i = imageTypeList.begin();
-
-   while (i != imageTypeList.end())
-   {
-      if ( (*i) == imageType )
-      {
-         return true;
-      }
-      ++i;
-   }
-
-   return false; // not found...
-}
-
-bool ossimImageFileWriter::addListener(ossimListener* listener)
-{
-   theProgressListener = listener;
-   return ossimImageWriter::addListener(listener);
-}
-
-bool ossimImageFileWriter::removeListener(ossimListener* listener)
-{
-   if (listener == theProgressListener)
-   {
-      theProgressListener = NULL;
-   }
-   return ossimImageWriter::removeListener(listener);
-}
-
-void ossimImageFileWriter::setPixelType(ossimPixelType type)
-{
-   thePixelType = type;
-}
-
-void ossimImageFileWriter::setPixelType(const ossimString& type)
-{
-   ossimString s = type;
-   s.downcase();
-   if (s == "point")
-   {
-      setPixelType(OSSIM_PIXEL_IS_POINT);
-   }
-   else if (s == "area")
-   {
-      setPixelType(OSSIM_PIXEL_IS_AREA);
-   }
-}
-
-ossimPixelType ossimImageFileWriter::getPixelType() const
-{
-   return thePixelType;
-}
-
-void ossimImageFileWriter::getPixelTypeString(ossimString& type) const
-{
-   if (thePixelType == OSSIM_PIXEL_IS_POINT)
-   {
-      type = "point";
-   }
-   else
-   {
-      type = "area";
-   }
-}
-
-void ossimImageFileWriter::setTileSize(const ossimIpt& tileSize)
-{
-   if (theInputConnection.valid())
-   {
-      theInputConnection->setTileSize(tileSize);
-   }
-}
-
-bool ossimImageFileWriter::writeWorldFile() 
-{
-   bool result = false;
-   
-   if( theFilename.size() )
-   {
-      // Make the file name.
-      ossimFilename file = theFilename;
-      ossimString ext = file.ext().downcase();
-      
-      ossimString wfExt = ""; // World file extension.
-      
-      if ( ( ext == "tif" ) || ( ext == "tiff" ) )
-      {
-         wfExt = "tfw";
-      }
-      else if ( ( ext == "jpg" ) || ( ext == "jpeg" ) )
-      {
-         wfExt = "jpw";
-      }
-      else if ( ext == "png" )
-      {
-         wfExt = "pgw";
-      }
-      else if ( ext == "sid" )
-      {
-         wfExt = "sdw";
-      }
-      
-      if ( ext.size() )
-      {
-         file.setExtension(wfExt);
-         
-         result = writeWorldFile(file);
-      }
-      else
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "Could not derive world file extension for: " << theFilename << "\n"; 
-      }
-   }
-   
-   if ( !result )
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "Write of world file failed!\n";
-   }   
-   
-   return result;
-}
-
-bool ossimImageFileWriter::writeWorldFile(const ossimFilename& file) 
-{
-   if( !theInputConnection || theAreaOfInterest.hasNans())
-   {
-      return false;
-   }
-
-   // Make the writer.
-   ossimRefPtr<ossimWorldFileWriter> writer = new ossimWorldFileWriter();
-   
-   // Set things up.
-   writer->connectMyInputTo(0, theInputConnection.get());
-   writer->initialize();
-   writer->setFilename(file);
-   writer->setAreaOfInterest(theAreaOfInterest);
-   writer->setLinearUnits(theLinearUnits);
-   writer->setPixelType(thePixelType);
-   
-   // Write it to disk.
-   return writer->execute(); 
-}
diff --git a/src/ossim/imaging/ossimImageGaussianFilter.cpp b/src/ossim/imaging/ossimImageGaussianFilter.cpp
deleted file mode 100644
index dc5dca4..0000000
--- a/src/ossim/imaging/ossimImageGaussianFilter.cpp
+++ /dev/null
@@ -1,245 +0,0 @@
-//*******************************************************************
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// class ossimImageGaussianFilter : tile source
-//*******************************************************************
-// $Id: ossimImageGaussianFilter.cpp 21631 2012-09-06 18:10:55Z dburken $
-
-#include <ossim/imaging/ossimImageGaussianFilter.h>
-#include <ossim/base/ossimNumericProperty.h>
-#include <ossim/base/ossimBooleanProperty.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <cmath>
-
-RTTI_DEF1(ossimImageGaussianFilter, "ossimImageGaussianFilter", ossimImageSourceFilter);
-
-/** 
- * property names
- */
-static const char* PROPERTYNAME_GAUSSSTD     = "GaussStd";
-static const char* PROPERTYNAME_STRICTNODATA = "StrictNoData";
-
-ossimImageGaussianFilter::ossimImageGaussianFilter()
-   : ossimImageSourceFilter(),
-     theGaussStd(0.5),
-     theStrictNoData(true)
-{
-   // ingredients: 
-   // 2x  ConvolutionFilter1D
-   theHF=new ossimConvolutionFilter1D();
-   theVF=new ossimConvolutionFilter1D();
-
-   theHF->setIsHorizontal(true);
-   theVF->setIsHorizontal(false);
-   updateKernels();
-
-   theHF->setStrictNoData(theStrictNoData);
-   theVF->setStrictNoData(theStrictNoData);
-
-   //tie them up
-   theVF->connectMyInputTo(0,theHF.get());
-}
-
-ossimImageGaussianFilter::~ossimImageGaussianFilter()
-{
-   if(theHF.valid())
-   {
-      theHF->disconnect();
-      theHF = 0;
-   }
-   if(theVF.valid())
-   {
-      theVF->disconnect();
-      theVF = 0;
-   }
-}
-
-void ossimImageGaussianFilter::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property) return;
-
-   if (property->getName() == PROPERTYNAME_GAUSSSTD) {
-      ossimNumericProperty* sProperty = PTR_CAST(ossimNumericProperty,
-                                                     property.get());
-      if(sProperty)
-      {
-         setGaussStd(sProperty->asFloat64());
-      }
-   } else if (property->getName() == PROPERTYNAME_STRICTNODATA) {
-      ossimBooleanProperty* booleanProperty = PTR_CAST(ossimBooleanProperty,
-                                                     property.get());
-      if(booleanProperty)
-      {
-         setStrictNoData(booleanProperty->getBoolean());
-      }
-   } else {
-      ossimImageSourceFilter::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimImageGaussianFilter::getProperty(const ossimString& name)const
-{
-   if (name == PROPERTYNAME_GAUSSSTD) {
-      ossimNumericProperty* property = new ossimNumericProperty(name,ossimString::toString(getGaussStd()),1e-13,100.0);
-      property->setCacheRefreshBit();
-      return property;
-   } else if (name == PROPERTYNAME_STRICTNODATA) {
-      ossimBooleanProperty* property = new ossimBooleanProperty(name,isStrictNoData());
-      property->setCacheRefreshBit();
-      return property;
-   }
-   return ossimImageSourceFilter::getProperty(name);
-}
-
-void ossimImageGaussianFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageSourceFilter::getPropertyNames(propertyNames);
-   propertyNames.push_back(PROPERTYNAME_GAUSSSTD);
-   propertyNames.push_back(PROPERTYNAME_STRICTNODATA);
-}
-
-bool ossimImageGaussianFilter::saveState(ossimKeywordlist& kwl,
-                                          const char* prefix)const
-{   
-   kwl.add(prefix,
-           PROPERTYNAME_GAUSSSTD,
-           theGaussStd,
-           true);
-   kwl.add(prefix,
-           PROPERTYNAME_STRICTNODATA,
-           isStrictNoData()?"true":"false", //use string instead of boolean
-           true);
-   
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
-
-
-bool ossimImageGaussianFilter::loadState(const ossimKeywordlist& kwl,
-                                          const char* prefix)
-{
-   const char* gs = kwl.find(prefix, PROPERTYNAME_GAUSSSTD);
-   if(gs)
-   {      
-      setGaussStd(ossimString(gs).toDouble());
-   } else {
-      cerr<<"ossimImageGaussianFilter : warning no "<< PROPERTYNAME_GAUSSSTD<<" in loadState"<<endl;
-   }
-   const char* sn = kwl.find(prefix, PROPERTYNAME_STRICTNODATA);
-   if(sn)
-   {      
-      setStrictNoData(ossimString(sn).toBool());
-   } else {
-      cerr<<"ossimConvolutionFilter1D : warning no "<<PROPERTYNAME_STRICTNODATA<<" in state"<<endl;
-   }
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
-
-void ossimImageGaussianFilter::setGaussStd(const ossim_float64& v)
-{
-   theGaussStd = v;
-   updateKernels();
-}
-
-void ossimImageGaussianFilter::setStrictNoData(bool aStrict)
-{
-   theStrictNoData = aStrict;
-   theHF->setStrictNoData(aStrict);
-   theVF->setStrictNoData(aStrict);
-}
-
-void
-ossimImageGaussianFilter::initialize()
-{
-   ossimImageSourceFilter::initialize();
-   initializeProcesses();
-}
-
-ossimRefPtr<ossimImageData>
-ossimImageGaussianFilter::getTile(const ossimIrect &tileRect,ossim_uint32 resLevel)
-{
-    if(isSourceEnabled())
-    {
-       return theVF->getTile(tileRect, resLevel);
-    }
-    if(theInputConnection)
-    {
-       return theInputConnection->getTile(tileRect, resLevel);
-    }
-
-    return 0;
-}
-
-void
-ossimImageGaussianFilter::initializeProcesses()
-{
-   theHF->initialize();
-   theVF->initialize();
-}
-
-void
-ossimImageGaussianFilter::connectInputEvent(ossimConnectionEvent &event)
-{
-    ossimImageSourceFilter::connectInputEvent(event);
-    if(getInput())
-    {
-       theHF->connectMyInputTo(0, getInput());
-       initializeProcesses();
-    }
-    else
-    {
-       theHF->disconnectMyInput(0, false, false);
-       initializeProcesses();
-    }
-}
-
-void
-ossimImageGaussianFilter::disconnectInputEvent(ossimConnectionEvent &event)
-{
-    ossimImageSourceFilter::disconnectInputEvent(event);
-    if(getInput())
-    {
-       theHF->connectMyInputTo(0, getInput());
-       initializeProcesses();
-    }
-    else
-    {
-       theHF->disconnectMyInput(0, false, false);
-       initializeProcesses();
-    }
-}
-void
-ossimImageGaussianFilter::updateKernels()
-{
-   //update kernels based on GaussStd value :2.5 sigma on each side
-   // symetric kernel
-   static const ossim_float64 sigmaN = 2.5;
-   ossim_float64 sig22   = getGaussStd()*getGaussStd()*2.0;
-
-   ossim_uint32 halfw   = (ossim_uint32)(std::floor(getGaussStd() * sigmaN + 0.5));
-   ossim_uint32 supsize = 2*halfw + 1;
-
-   //fill with sym. gaussian (unnormalized)
-   vector<ossim_float64> newk(supsize);
-   ossim_float64 sum=1.0;
-   ossim_float64 v;
-   newk[halfw] = 1.0;
-   for(ossim_int32 i=(ossim_int32)halfw; i>0 ;--i) //reverse for summing
-   {
-      newk[halfw + i] = newk[halfw - i] = v = std::exp(-i*i/sig22);
-      sum += 2.0 * v;
-   }
-
-   //normalize
-   ossim_float64   invsum=1.0/sum;
-   for(ossim_uint32 i=0; i<supsize ;++i)
-   {
-      newk[i] *= invsum;
-   }
-
-   //send to 1d conv filters
-   theHF->setKernel(newk);
-   theVF->setKernel(newk);
-   theHF->setCenterOffset(halfw);
-   theVF->setCenterOffset(halfw);
-}
diff --git a/src/ossim/imaging/ossimImageGeometry.cpp b/src/ossim/imaging/ossimImageGeometry.cpp
deleted file mode 100644
index 6da0354..0000000
--- a/src/ossim/imaging/ossimImageGeometry.cpp
+++ /dev/null
@@ -1,1306 +0,0 @@
-//**************************************************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Oscar Kramer
-//
-// Description: Class implementation of ossimImageGeometry. See .h file for class documentation.
-//
-//**************************************************************************************************
-// $Id$
-
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossim2dTo2dTransformRegistry.h>
-#include <ossim/elevation/ossimElevManager.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/projection/ossimEquDistCylProjection.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <cmath>
-
-RTTI_DEF1(ossimImageGeometry, "ossimImageGeometry", ossimObject);
-
-//**************************************************************************************************
-// Default constructor defaults to unity transform with no projection  
-//**************************************************************************************************
-ossimImageGeometry::ossimImageGeometry()
-:   
-m_transform (0),
-m_projection(0),
-m_decimationFactors(0),
-m_imageSize(),
-m_targetRrds(0)
-{
-   m_imageSize.makeNan();
-}
-
-//**************************************************************************************************
-// Copy constructor -- performs a deep copy. This is needed when an imageSource in the chain
-// needs to modify the image geometry at that point in the chain. The image geometry to the left
-// of that imageSource must remain unchanged. This constructor permits that imageSource to 
-// maintain its own geometry based on the input geometry. All objects in the chain and to the right
-// would see this alternate geometry. See ossimScaleFilter for an example of this case.
-//**************************************************************************************************
-ossimImageGeometry::ossimImageGeometry(const ossimImageGeometry& copy_this)
-:
-ossimObject(copy_this),
-m_transform(copy_this.m_transform.valid()?(ossim2dTo2dTransform*)copy_this.m_transform->dup():((ossim2dTo2dTransform*)0)),
-m_projection(copy_this.m_projection.valid()?(ossimProjection*)copy_this.m_projection->dup():(ossimProjection*)0),
-m_decimationFactors(copy_this.m_decimationFactors),
-m_imageSize(copy_this.m_imageSize),
-m_targetRrds(copy_this.m_targetRrds)
-{
-}
-
-//**************************************************************************************************
-//! Constructs with projection and transform objects available for referencing. Either pointer
-//! can be NULL -- the associated mapping would be identity.
-//**************************************************************************************************
-ossimImageGeometry::ossimImageGeometry(ossim2dTo2dTransform* transform, ossimProjection* proj)
-:
-ossimObject(),
-m_transform(transform),
-m_projection(proj),
-m_decimationFactors(0),
-m_imageSize(),
-m_targetRrds(0)   
-{
-   m_imageSize.makeNan();
-}
-
-//**************************************************************************************************
-// Destructor is hidden. Only accessible via ossimRefPtr centrally managed
-//**************************************************************************************************
-ossimImageGeometry::~ossimImageGeometry()
-{
-   // Nothing to do
-}
-
-void ossimImageGeometry::rnToRn(const ossimDpt& inRnPt, ossim_uint32 inResolutionLevel,
-                                ossim_uint32 outResolutionLevel, ossimDpt& outRnPt) const
-{
-   if (inResolutionLevel != outResolutionLevel)
-   {
-      // Back out the decimation.
-      ossimDpt pt;
-      undecimatePoint(inRnPt, inResolutionLevel, pt);
-
-      // Decimate to new level.
-      decimatePoint(pt, outResolutionLevel, outRnPt);
-   }
-   else
-   {
-      outRnPt = inRnPt; // No transform required.
-   }
-}
-
-void ossimImageGeometry::rnToFull(const ossimDpt& rnPt,
-                                  ossim_uint32 resolutionLevel,
-                                  ossimDpt& fullPt) const
-{
-   // Back out the decimation.
-   ossimDpt localPt;
-   undecimatePoint(rnPt, resolutionLevel, localPt);
-
-   // Remove any shift/rotation.
-   if ( m_transform.valid() && !localPt.hasNans() )
-   {
-      m_transform->forward(localPt, fullPt);
-   }
-   else
-   {
-      fullPt = localPt; // No transform (shift/rotation)
-   }
-}
-
-void ossimImageGeometry::fullToRn(const ossimDpt& fullPt,
-                                  ossim_uint32 resolutionLevel,
-                                  ossimDpt& rnPt) const
-{
-   // Apply shift/rotation.
-   ossimDpt localPt;
-   if (m_transform.valid())
-   {
-      m_transform->inverse(fullPt, localPt);
-   }
-   else
-   {
-      localPt = fullPt; // No transform (shift/rotation)
-   }
-
-   // Apply the decimation.
-   decimatePoint(localPt, resolutionLevel, rnPt);
-}
-
-void ossimImageGeometry::rnToWorld(const ossimDpt& rnPt,
-                                   ossim_uint32 resolutionLevel,
-                                   ossimGpt& wpt) const
-{
-   ossimDpt localPt;
-   rnToRn(rnPt, resolutionLevel, m_targetRrds, localPt);
-   localToWorld(localPt, wpt);
-}
-
-void ossimImageGeometry::worldToRn(const ossimGpt& wpt,
-                                   ossim_uint32 resolutionLevel,
-                                   ossimDpt& rnPt) const
-{   
-   ossimDpt localPt;
-   worldToLocal(wpt, localPt);
-   rnToRn(localPt, m_targetRrds, resolutionLevel, rnPt);
-}
-
-//**************************************************************************************************
-//! Exposes the 3D projection from image to world coordinates. The caller should verify that
-//! a valid projection exists before calling this method. Returns TRUE if a valid ground point
-//! is available in the ground_pt argument. This method depends on the existence of elevation
-//! information. If no DEM is available, the results will be incorrect or inaccurate.
-//**************************************************************************************************
-bool ossimImageGeometry::localToWorld(const ossimDpt& local_pt, ossimGpt& world_pt) const
-{
-   //! Return a NAN point of no projection is defined:
-   if (!m_projection.valid())
-   {
-      world_pt.makeNan();
-      return false;
-   }
-
-   // First transform local pixel to full-image pixel:
-   ossimDpt full_image_pt;
-   rnToFull(local_pt, m_targetRrds, full_image_pt);
-
-   // Perform projection to world coordinates:
-   m_projection->lineSampleToWorld(full_image_pt, world_pt);
-
-    // Put longitude between -180 and +180 and latitude between -90 and +90 if not so. 
-    world_pt.wrap();
-    
-   return true;
-}
-
-//**************************************************************************************************
-//! Exposes the 3D projection from image to world coordinates given a constant height above 
-//! ellipsoid. The caller should verify that a valid projection exists before calling this
-//! method. Returns TRUE if a valid ground point is available in the ground_pt argument.
-//**************************************************************************************************
-bool ossimImageGeometry::localToWorld(const ossimDpt& local_pt, 
-                                      const double& h_ellipsoid, 
-                                      ossimGpt& world_pt) const
-{
-   //! Return a NAN point of no projection is defined:
-   if (!m_projection.valid())
-   {
-      world_pt.makeNan();
-      return false;
-   }
-
-   // First transform local pixel to full-image pixel:
-   ossimDpt full_image_pt;
-   rnToFull(local_pt, m_targetRrds, full_image_pt);
-
-   // Perform projection to world coordinates:
-   m_projection->lineSampleHeightToWorld(full_image_pt, h_ellipsoid, world_pt);
-
-   // Put longitude between -180 and +180 and latitude between -90 and +90 if not so. 
-   world_pt.wrap();
-    
-   return true;
-}
-
-//**************************************************************************************************
-//! Exposes the 3D world-to-local image coordinate reverse projection. The caller should verify 
-//! that a valid projection exists before calling this method. Returns TRUE if a valid image 
-//! point is available in the local_pt argument.
-//**************************************************************************************************
-bool ossimImageGeometry::worldToLocal(const ossimGpt& world_pt, ossimDpt& local_pt) const
-{
-   bool result = true;
-   
-   if ( m_projection.valid() )
-   {
-      const ossimEquDistCylProjection* eqProj =
-         dynamic_cast<const ossimEquDistCylProjection*>( m_projection.get() );
-      
-      ossimDpt full_image_pt;
-
-      if ( eqProj && (m_imageSize.hasNans() == false) )
-      {
-         // Call specialized method to handle wrapping...
-         eqProj->worldToLineSample( world_pt, m_imageSize, full_image_pt );
-      }
-      else if( isAffectedByElevation() )
-      {
-         ossimGpt copyPt( world_pt );
-         if(world_pt.isHgtNan())
-         {
-            copyPt.hgt = ossimElevManager::instance()->getHeightAboveEllipsoid(copyPt);
-         }     
-
-         // Perform projection from world coordinates to full-image space:
-         m_projection->worldToLineSample(copyPt, full_image_pt);
-      }
-      else
-      {
-         // Perform projection from world coordinates to full-image space:
-         m_projection->worldToLineSample(world_pt, full_image_pt);
-      }
-      
-      // Transform to local space:
-      fullToRn(full_image_pt, m_targetRrds, local_pt);
-   }
-   else // No projection set:
-   {
-      local_pt.makeNan();
-      result = false;  
-   }
-   
-   return result;
-   
-} // End: ossimImageGeometry::worldToLocal(const ossimGpt&, ossimDpt&)
-
-//**************************************************************************************************
-//! Sets the transform to be used for local-to-full-image coordinate transformation
-//**************************************************************************************************
-void ossimImageGeometry::setTransform(ossim2dTo2dTransform* transform) 
-{ 
-   m_transform = transform; 
-}
-
-//**************************************************************************************************
-//! Sets the projection to be used for local-to-world coordinate transformation
-//**************************************************************************************************
-void ossimImageGeometry::setProjection(ossimProjection* projection) 
-{ 
-   m_projection = projection; 
-}
-
-//**************************************************************************************************
-//! Returns TRUE if this geometry is sensitive to elevation
-//**************************************************************************************************
-bool ossimImageGeometry::isAffectedByElevation() const
-{
-    if (m_projection.valid())
-        return m_projection->isAffectedByElevation();
-    return false;
-}
-
-//*************************************************************************************************
-//! Returns  GSD in meters in x- and y-directions. This may not be the same as the member 
-//! projection's stated resolution since a transform may be involved.
-//*************************************************************************************************
-ossimDpt ossimImageGeometry::getMetersPerPixel() const
-{
-   ossimDpt gsd;
-   getMetersPerPixel(gsd);
-   return gsd;
-}
-
-//*************************************************************************************************
-//! Computes GSD in meters in x- and y-directions. This may not be the same as the member 
-//! projection's stated resolution since a transform may be involved.
-//*************************************************************************************************
-void ossimImageGeometry::getMetersPerPixel( ossimDpt& gsd ) const
-{
-   if (m_projection.valid() && !m_transform.valid())
-   {
-      // No transform present, so simply query the projection for GSD:
-      gsd = m_projection->getMetersPerPixel();
-   }
-   else if (m_projection.valid() && (m_imageSize.hasNans() == false))
-   {
-      // A transform is involved, so need to use localToWorld call below:
-      ossimDpt pL0 (m_imageSize/2);
-      ossimDpt pLx (pL0.x+1, pL0.y);
-      ossimDpt pLy (pL0.x, pL0.y+1);
-      ossimGpt g0, gx, gy;
-
-      localToWorld(pL0, g0);
-      localToWorld(pLx, g0.height(), gx);
-      localToWorld(pLy, g0.height(), gy);
-
-      // Compute horizontal distance for one pixel:
-      gsd.x = g0.distanceTo(gx);
-      gsd.y = g0.distanceTo(gy);
-   }
-   else
-   {
-      // This object is not fully initialized:
-      gsd.makeNan();
-   }
-}
-
-//*************************************************************************************************
-// Returns the resolution of this image in degrees/pixel. Note that this only
-// makes sense if there is a projection associated with the image. Returns NaNs if no 
-// projection defined.
-//*************************************************************************************************
-ossimDpt ossimImageGeometry::getDegreesPerPixel() const
-{
-   ossimDpt dpp;
-   getDegreesPerPixel(dpp);
-   return dpp;
-}
-
-//*************************************************************************************************
-// Computes the resolution of this image in degrees/pixel. Note that this only
-// makes sense if there is a projection associated with the image. Returns NaNs if no 
-// projection defined.
-//*************************************************************************************************
-void ossimImageGeometry::getDegreesPerPixel( ossimDpt& dpp ) const
-{
-   const ossimMapProjection *map_proj = dynamic_cast<const ossimMapProjection *>(m_projection.get());
-   if (map_proj && !m_transform.valid())
-   {
-      // No transform present, so simply query the projection for resolution:
-      dpp = map_proj->getDecimalDegreesPerPixel();
-   }
-   else if (m_projection.valid() && (m_imageSize.hasNans() == false))
-   {
-      // A transform is involved, so need to use localToWorld call below:
-      ossimDpt pL0 (m_imageSize/2);
-      ossimDpt pLx (pL0.x+1, pL0.y);
-      ossimDpt pLy (pL0.x, pL0.y+1);
-      ossimGpt g0, gx, gy;
-
-      localToWorld(pL0, g0);
-      localToWorld(pLx, g0.height(), gx);
-      localToWorld(pLy, g0.height(), gy);
-
-      // Compute horizontal distance for one pixel:
-      double dlatx = std::fabs(g0.lat - gx.lat);
-      double dlaty = std::fabs(g0.lat - gy.lat);
-      double dlonx = std::fabs(g0.lon - gx.lon);
-      double dlony = std::fabs(g0.lon - gy.lon);
-      dpp.lat = sqrt(dlatx*dlatx + dlaty*dlaty);
-      dpp.lon = sqrt(dlonx*dlonx + dlony*dlony);
-   }
-   else
-   {
-      // This object is not fully initialized:
-      dpp.makeNan();
-   }
-}
-
-//**************************************************************************************************
-//! Prints contents to output stream.
-//**************************************************************************************************
-std::ostream& ossimImageGeometry::print(std::ostream& out) const
-{
-   out << "type: ossimImageGeometry" << std::endl;
-   if(m_transform.valid())
-   {
-      out << "  m_transform: ";
-      m_transform->print(out);
-   }
-   else
-   {
-      out << "  No transform defined. Using identity transform.\n";
-   }
-   
-   if(m_projection.valid())
-   {
-      out << "  m_projection: ";
-      m_projection->print(out);
-   }
-   else
-   {
-      out << "  No projection defined. ";
-   }
-
-   for ( std::vector<ossimDpt>::size_type i = 0; i < m_decimationFactors.size(); ++i )
-   {
-      cout << "m_decimationFactors[" << i << "]: " << m_decimationFactors[i] << "\n";
-   }
-
-   out << "m_imageSize: " << m_imageSize
-       << "\nm_targetRrds: " << m_targetRrds << "\n";
-
-   return out;
-}
-
-//**************************************************************************************************
-//! Returns TRUE if argument geometry has exactly the same instances for transform and 
-//! m_projection. This may need to be expanded to permit different instances of same transforms
-//**************************************************************************************************
-bool ossimImageGeometry::operator==(const ossimImageGeometry& other) const
-{
-    return ((m_transform == other.m_transform) && (m_projection == other.m_projection) &&
-            (decimationFactor(0) == other.decimationFactor(0)) );
-}
-
-//**************************************************************************************************
-//! Returns the decimation factor from R0 for the resolution level specified. For r_index=0, the 
-//! decimation factor is by definition 1.0. For the non-discrete case, r_index=1 returns a 
-//! decimation of 0.5. If the vector of discrete decimation factors (m_decimationFactors) is 
-//! empty, the factor will be computed as f=1/2^n
-//**************************************************************************************************
-ossimDpt ossimImageGeometry::decimationFactor(ossim_uint32 r_index) const
-{
-   ossim_uint32 size = (ossim_uint32)m_decimationFactors.size();
-   if (size)
-   {
-      if (r_index < size)
-      {
-         return m_decimationFactors[r_index];
-      }
-      
-      // Return the last defined decimation if the index requested exceeds list size:
-      return m_decimationFactors[size-1];
-   }
-
-   // Compute the decimation factor:
-   ossim_float64 factor = 1.0/(ossim_float64)(1 << r_index);
-   
-   return ossimDpt(factor, factor);
-}
-
-void ossimImageGeometry::decimationFactor(ossim_uint32 r_index,
-                                          ossimDpt& result) const
-{
-   const ossim_uint32 SIZE = (ossim_uint32)m_decimationFactors.size();
-   if (SIZE)
-   {
-      if (r_index < SIZE)
-      {
-         result = m_decimationFactors[r_index];
-      }
-      else
-      {
-         //---
-         // Return the last defined decimation if the index requested
-         // exceeds list size:
-         //---
-         result = m_decimationFactors[SIZE-1];
-      }
-   }
-   else
-   {
-      // Compute the decimation factor:
-      ossim_float64 factor = 1.0/(ossim_float64)(1 << r_index);
-      result.x = factor;
-      result.y = factor;
-   }
-}
-
-void ossimImageGeometry::decimationFactors(
-   std::vector<ossimDpt>& decimations) const
-{
-   decimations = m_decimationFactors;
-}
-
-//*****************************************************************************
-//! Attempts to initialize a transform and a projection given the KWL.
-//! Returns TRUE if no error encountered.
-//*****************************************************************************
-bool ossimImageGeometry::loadState(const ossimKeywordlist& kwl,
-                                   const char* prefix)
-{
-   const char* lookup = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
-   if (lookup)
-   {
-      if ( ossimString(lookup) == STATIC_TYPE_NAME(ossimImageGeometry) )
-      {
-         ossimObject::loadState(kwl, prefix);
-
-         // m_transform
-         ossimString transformPrefix = ossimString(prefix) + "transform.";
-         ossimRefPtr<ossim2dTo2dTransform> transform = ossim2dTo2dTransformRegistry::instance()->
-            createNativeObjectFromRegistry(kwl, transformPrefix.c_str());
-         if( transform.valid() )
-         {
-            m_transform = transform;
-         }
-
-         // m_projection:
-         ossimString projectionPrefix = ossimString(prefix) + "projection.";
-         ossimRefPtr<ossimProjection> projection = ossimProjectionFactoryRegistry::instance()->
-            createProjection(kwl, projectionPrefix.c_str());
-         if( projection.valid() )
-         {
-            m_projection = projection;
-         }
-
-         // m_decimationFactors:
-         ossimString decimations = kwl.find(prefix, "decimations");
-         if( decimations.size() )
-         {
-            m_decimationFactors.clear();
-            ossim::toVector(m_decimationFactors, decimations);
-         }
-
-         // m_imageSize:
-         ossimString imageSize = kwl.find(prefix, "image_size");
-         if( imageSize.size() )
-         {
-            m_imageSize.toPoint(imageSize);
-         }
-
-         // m_targetRrds:
-         ossimString targetRrds = kwl.find(prefix, "target_rrds");
-         if ( targetRrds.size() )
-         {
-            m_targetRrds = ossimString(targetRrds).toUInt32();
-         }
-      }
-      else
-      {
-         // Now look for projection spec (for backwards compatibility):
-         ossimProjection* projection = ossimProjectionFactoryRegistry::instance()->
-            createProjection(kwl, prefix);
-         if (projection)
-         {
-            setProjection(projection);
-         }
-      }
-   }
-   else
-   {
-      //---
-      // Old geometry file with no type keyword:
-      //---
-      ossimProjection* projection = ossimProjectionFactoryRegistry::instance()->
-         createProjection(kwl, prefix);
-      if (projection)
-      {
-         setProjection(projection);
-      } 
-   }
-   
-   return true;
-}
-
-//**************************************************************************************************
-//! Saves the transform (if any) and projection (if any) states to the KWL.
-//**************************************************************************************************
-bool ossimImageGeometry::saveState(ossimKeywordlist& kwl, const char* prefix) const
-{
-   bool good_save = true;
-
-   // m_transform:
-   if (m_transform.valid())
-   {
-      ossimString transformPrefix = ossimString(prefix) + "transform.";
-      good_save = m_transform->saveState(kwl, transformPrefix.c_str());
-   }
-
-   // m_projection:
-   if (m_projection.valid())
-   {
-      ossimString projectionPrefix = ossimString(prefix) + "projection.";
-      good_save &= m_projection->saveState(kwl, projectionPrefix.c_str());
-   }
-
-   // m_gsd:
-   ossimDpt gsd;
-   getMetersPerPixel(gsd);
-   kwl.add(prefix, "gsd", gsd.toString(), true);
-
-   // m_decimationFactors:
-   if(m_decimationFactors.size())
-   {
-      ossimString resultPoints;
-      ossim::toStringList(resultPoints, m_decimationFactors);
-      kwl.add(prefix, "decimations", resultPoints, true);
-   }
-   else
-   {
-      kwl.add(prefix, "decimations", "", true);
-   }
-
-   // m_imageSize:
-   kwl.add(prefix, "image_size", m_imageSize.toString(), true);
-
-   // m_targetRrds;
-   kwl.add(prefix, "target_rrds", m_targetRrds, true);
-
-   // Base class:
-   good_save &= ossimObject::saveState(kwl, prefix);
-   
-   return good_save;
-}
-
-void ossimImageGeometry::setTargetRrds(ossim_uint32 rrds)
-{
-   m_targetRrds = rrds;
-}
-
-ossim_uint32 ossimImageGeometry::getTargetRrds() const
-{
-   return m_targetRrds;
-}
-
-//**************************************************************************************************
-//! Replaces any existing transform and projection with those in the copy_this object
-//**************************************************************************************************
-const ossimImageGeometry& ossimImageGeometry::operator=(const ossimImageGeometry& copy_this)
-{
-   if (this != &copy_this)
-   {
-      // Get deep copy of 2D transform if one exists:
-      if (copy_this.m_transform.valid())
-      {
-         m_transform = (ossim2dTo2dTransform*) copy_this.m_transform->dup();
-      }
-      
-      // Now establish a deep copy of the projection, if any:
-      if (copy_this.m_projection.valid())
-      {
-         m_projection = (ossimProjection*) copy_this.m_projection->dup();
-      }
-      
-      // the Gsd should already be solved from the source we are copying from
-      m_imageSize         = copy_this.m_imageSize;
-      m_decimationFactors = copy_this.m_decimationFactors;
-      m_targetRrds        = copy_this.m_targetRrds;
-   }
-   return *this;
-}
-
-//**************************************************************************************************
-//! Returns the ossimGpts for the four image corner points
-//**************************************************************************************************
-bool ossimImageGeometry::getCornerGpts(ossimGpt& gul, ossimGpt& gur, 
-                                       ossimGpt& glr, ossimGpt& gll) const
-{
-   ossimDpt iul (0,0);
-   ossimDpt iur (m_imageSize.x-1, 0);
-   ossimDpt ilr (m_imageSize.x-1, m_imageSize.y-1);
-   ossimDpt ill (0, m_imageSize.y-1);
-
-   bool status = true;
-
-   status &= localToWorld(iul, gul);
-   status &= localToWorld(iur, gur);
-   status &= localToWorld(ilr, glr);
-   status &= localToWorld(ill, gll);
-
-   return status;
-}
-
-void ossimImageGeometry::getTiePoint(ossimGpt& tie, bool edge) const
-{
-   if ( m_projection.valid() && (m_imageSize.hasNans() == false) )
-   {
-      // Use the easting/northing version of this method if underlying projection is meters:
-      const ossimMapProjection* map_proj = 
-         dynamic_cast<const ossimMapProjection*>(m_projection.get());
-      if (map_proj && !map_proj->isGeographic())
-      {
-         ossimDpt enTie;
-         getTiePoint(enTie, edge);
-         if (!enTie.hasNans())
-            tie = m_projection->inverse(enTie);
-         else
-            tie.makeNan();
-         return; // return here only because it bugs Dave
-      }
-
-      // Use projection to ground to establish UL extreme of image:
-      ossimDpt iul (0,0);
-      ossimDpt iur (m_imageSize.x-1, 0);
-      ossimDpt ilr (m_imageSize.x-1, m_imageSize.y-1);
-      ossimDpt ill (0, m_imageSize.y-1);
-      ossimDpt iRight(1, 0);
-      ossimDpt iDown(0, 1);
-      
-      ossimGpt gul;
-      ossimGpt gur; 
-      ossimGpt glr;
-      ossimGpt gll;
-      ossimGpt gRight;
-      ossimGpt gDown;
-      
-      localToWorld(iul, gul);
-      localToWorld(iur, gur);
-      localToWorld(ilr, glr);
-      localToWorld(ill, gll);
-      localToWorld(iRight, gRight);
-      localToWorld(iDown, gDown);
-      
-      // Determine the direction of the image:
-      if ( gul.lat > gDown.lat ) // oriented north up
-      {
-         if ( gul.lat >= gRight.lat ) // straight up or leaning right
-         {
-            tie.lat = gul.lat;
-            tie.lon = gll.lon;
-         }
-         else // leaning left
-         {
-            tie.lat = gur.lat;
-            tie.lon = gul.lon;
-         }
-      }
-      else // south or on side
-      {
-         if ( gRight.lat >= gul.lat ) // straight down or leaning right
-         {
-            tie.lat = glr.lat;
-            tie.lon = gur.lon;
-         }
-         else // leaning left
-         {
-            tie.lat = gll.lat;
-            tie.lon = glr.lon;
-         }   
-      }
-
-      if ( edge )
-      {
-         ossimDpt pt = m_projection->forward( tie );
-         ossimDpt half_pixel_shift = m_projection->getMetersPerPixel() * 0.5;
-         pt.y += half_pixel_shift.y;
-         pt.x -= half_pixel_shift.x;
-         tie = m_projection->inverse( pt );
-      }
-      
-   } // if ( (m_imageSize.hasNans() == false) && m_projection.valid() )
-   else
-   { 
-      tie.lat = ossim::nan();
-      tie.lon = ossim::nan();
-   }
-}
-
-//**************************************************************************************************
-// Assigns tie to the UL easting northing of the image. If edge is true, the E/N will be for the 
-// pixel-is-area representation
-//**************************************************************************************************
-void ossimImageGeometry::getTiePoint(ossimDpt& tie, bool edge) const
-{
-   if (!m_projection.valid() || m_imageSize.hasNans())
-   {
-      tie.makeNan();
-      return; // return here only because it bugs Dave
-   }
-
-   // Use the geographic version of this method if underlying projection is NOT map in meters:
-   const ossimMapProjection* map_proj = dynamic_cast<const ossimMapProjection*>(m_projection.get());
-   if (!map_proj || map_proj->isGeographic())
-   {
-      // Use the geographic version of this method to establish UL:
-      ossimGpt gTie;
-      gTie.hgt = 0.0;
-      getTiePoint(gTie, edge);
-      if (!gTie.hasNans())
-         tie = m_projection->forward( gTie );
-      else
-         tie.makeNan();
-      return; // return here only because it bugs Dave
-   }
-
-   // The underlying projection is a proper map projection in meters. Use easting northing 
-   // directly to avoid shifting the UL tiepoint because of skewed edge in geographic. Note:
-   // assume the image is North up:
-   ossimDpt iul (0,0);
-   ossimDpt ful;
-   rnToFull(iul, 0, ful);
-   map_proj->lineSampleToEastingNorthing(ful, tie);
-   if (edge && !tie.hasNans())
-   {
-      // Shift from pixel-is-point to pixel-is-area
-      ossimDpt half_pixel_shift = map_proj->getMetersPerPixel() * 0.5;
-      tie.y += half_pixel_shift.y;
-      tie.x -= half_pixel_shift.x;
-   }
-}
-
-//**************************************************************************************************
-void ossimImageGeometry::undecimatePoint(const ossimDpt& rnPt,
-                                         ossim_uint32 resolutionLevel,
-                                         ossimDpt& outPt) const
-{
-   // Back out the decimation.
-   ossimDpt decimation = decimationFactor(resolutionLevel);
-   
-   //---
-   // If no nans and one or both of the factors is not 1.0 decimation should
-   // be applied.
-   //---
-   if ( (decimation.x != 1.0) || (decimation.y != 1.0) ) 
-   {
-      if ( !decimation.hasNans() && !rnPt.hasNans() )
-      {
-         outPt.x = rnPt.x * (1.0/decimation.x);
-         outPt.y = rnPt.y * (1.0/decimation.y);
-      }
-      else
-      {
-         outPt.makeNan();
-      }
-   }
-   else
-   {
-      outPt = rnPt; // No decimation.
-   }
-}
-
-//**************************************************************************************************
-void ossimImageGeometry::decimatePoint(const ossimDpt& inPt,
-                                       ossim_uint32 resolutionLevel,
-                                       ossimDpt& rnPt) const
-{
-   
-   // Apply the decimation.
-   ossimDpt decimation = decimationFactor(resolutionLevel);
-
-   //---
-   // If no nans and one or both of the factors is not 1.0 decimation should
-   // be applied.
-   //---
-   if ( (decimation.x != 1.0) || (decimation.y != 1.0) ) 
-   {
-      if ( !decimation.hasNans() && !inPt.hasNans() )
-      {
-         rnPt.x = inPt.x * decimation.x;
-         rnPt.y = inPt.y * decimation.y;
-      }
-      else
-      {
-        rnPt.makeNan(); 
-      }
-   }
-   else
-   {
-      rnPt = inPt; // No decimation.
-   }
-}
-
-bool ossimImageGeometry::isEqualTo(const ossimObject& obj, ossimCompareType compareType)const
-{
-   bool result = ossimObject::isEqualTo(obj, compareType);
-   const ossimImageGeometry* rhs = dynamic_cast<const ossimImageGeometry*> (&obj);
-   if(rhs&&result) // we know the types are the same
-   {
-      result = ((m_decimationFactors.size() == rhs->m_decimationFactors.size())&&
-                m_imageSize.isEqualTo(rhs->m_imageSize)&& 
-                (m_targetRrds == rhs->m_targetRrds)); 
-      
-      if(result)
-      {
-         ossim_uint32 decimationIdx = 0;
-         for(decimationIdx = 0; result&&(decimationIdx < m_decimationFactors.size());++decimationIdx)
-         {
-            result = m_decimationFactors[decimationIdx].isEqualTo(rhs->m_decimationFactors[decimationIdx]);
-         }
-      }
-      
-      if(result && compareType==OSSIM_COMPARE_IMMEDIATE)
-      {
-         result = ((m_transform.get()  == rhs->m_transform.get())&& 
-                   (m_projection.get() == rhs->m_projection.get()));  //!< Maintains full_image-to-world_space transformation
-         
-      }
-      else
-      {
-         if(m_transform.valid()&&rhs->m_transform.valid())
-         {
-            result = m_transform->isEqualTo(*rhs->m_transform.get());
-         }
-         else if(reinterpret_cast<ossim_uint64>(m_transform.get()) | reinterpret_cast<ossim_uint64>(rhs->m_transform.get())) // one is null
-         {
-            result = false;
-         }
-         if(m_projection.valid()&&rhs->m_projection.valid())
-         {
-            result = m_projection->isEqualTo(*rhs->m_projection.get());
-         }
-         else if(reinterpret_cast<ossim_uint64>(m_projection.get()) | reinterpret_cast<ossim_uint64>(rhs->m_projection.get())) // one is null
-         {
-            result = false;
-         }
-         
-      }
-   }
-   return result;
-}
-
-void ossimImageGeometry::getBoundingRect(ossimIrect& bounding_rect) const
-{
-   if (m_imageSize.hasNans())
-   {
-      bounding_rect.makeNan();
-   }
-   else
-   {
-      bounding_rect.set_ulx(0);
-      bounding_rect.set_uly(0);
-      bounding_rect.set_lrx(m_imageSize.x-1);
-      bounding_rect.set_lry(m_imageSize.y-1);
-   }
-}
-
-void ossimImageGeometry::getBoundingRect(ossimDrect& bounding_rect) const
-{
-   if (m_imageSize.hasNans())
-   {
-      bounding_rect.makeNan();
-   }
-   else
-   {
-      bounding_rect.set_ulx(0);
-      bounding_rect.set_uly(0);
-      bounding_rect.set_lrx(m_imageSize.x-1);
-      bounding_rect.set_lry(m_imageSize.y-1);
-   }
-}
-
-void ossimImageGeometry::applyScale(const ossimDpt& scale, bool recenterTiePoint)
-{
-   if ((scale.x != 0.0) && (scale.y != 0.0))
-   {
-      ossimMapProjection* map_Proj = dynamic_cast<ossimMapProjection*>(m_projection.get());
-      if ( map_Proj )
-      {
-         m_imageSize.x = ossim::round<ossim_int32>(m_imageSize.x / scale.x);
-         m_imageSize.y = ossim::round<ossim_int32>(m_imageSize.y / scale.y);
-         map_Proj->applyScale(scale, recenterTiePoint);
-      }
-   }
-}
-
-ossimAdjustableParameterInterface* ossimImageGeometry::getAdjustableParameterInterface()
-{
-   return PTR_CAST(ossimAdjustableParameterInterface, getProjection());
-}
-
-const ossimAdjustableParameterInterface* ossimImageGeometry::getAdjustableParameterInterface()const
-{
-   return dynamic_cast<const ossimAdjustableParameterInterface*>(getProjection());
-
-}
-
-bool ossimImageGeometry::computeImageToGroundPartialsWRTAdjParam(ossimDpt& result,
-                                                                           const ossimGpt& gpt,
-                                                                           ossim_uint32 idx,
-                                                                           ossim_float64 paramDelta)
-{
-   double den = 0.5/paramDelta; // this is the same as dividing by 2*delta
-   
-   result = ossimDpt(0.0,0.0);
-   ossimAdjustableParameterInterface* adjustableParamInterface = getAdjustableParameterInterface();
-   
-   if(!adjustableParamInterface) return false;
-   if(idx >= adjustableParamInterface->getNumberOfAdjustableParameters()) return false;
-   
-   ossimDpt p1, p2;
-   // double middle = adjustableParamInterface->getAdjustableParameter(idx);
-   double middle = adjustableParamInterface->getParameterCenter(idx);
-   
-   //set parm to high value
-   // adjustableParamInterface->setAdjustableParameter(idx, middle + paramDelta, true);
-   adjustableParamInterface->setParameterCenter(idx, middle + paramDelta, true);
-   worldToLocal(gpt, p1);
-   
-   //set parm to low value and gte difference
-   // adjustableParamInterface->setAdjustableParameter(idx, middle - paramDelta, true);
-   adjustableParamInterface->setParameterCenter(idx, middle - paramDelta, true);
-   worldToLocal(gpt, p2);
-   
-   //get partial derivative
-   result = (p2-p1)*den;
-   
-   //reset param
-   // adjustableParamInterface->setAdjustableParameter(idx, middle, true);
-   adjustableParamInterface->setParameterCenter(idx, middle, true);
-   
-   return !result.hasNans();
-}
-                         
-bool ossimImageGeometry::computeImageToGroundPartialsWRTAdjParams(NEWMAT::Matrix& result, 
-                                                                            const ossimGpt& gpt,
-                                                                            ossim_float64 paramDelta)
-{
-   ossimAdjustableParameterInterface* adjustableParamInterface = getAdjustableParameterInterface();
-   
-   ossim_uint32 nAdjustables = adjustableParamInterface->getNumberOfAdjustableParameters();
-   
-   ossim_uint32 idx = 0;
-   
-   result = NEWMAT::Matrix(nAdjustables, 2);
-   for(;idx < nAdjustables; ++idx)
-   {
-      ossimDpt paramResResult;
-      computeImageToGroundPartialsWRTAdjParam(paramResResult,
-                                                        gpt,
-                                                        idx,
-                                                        paramDelta);
-      result[idx][0] = paramResResult.x;
-      result[idx][1] = paramResResult.y;
-   }
-   
-   return true;
-}
-
-bool ossimImageGeometry::computeImageToGroundPartialsWRTAdjParams(NEWMAT::Matrix& result,
-                                                                            const ossimGpt& gpt,
-                                                                            const DeltaParamList& deltas)
-{
-   
-   ossimAdjustableParameterInterface* adjustableParamInterface = getAdjustableParameterInterface();
-   
-   ossim_uint32 nAdjustables = adjustableParamInterface->getNumberOfAdjustableParameters();
-   
-   if(nAdjustables != deltas.size()) return false;
-   ossim_uint32 idx = 0;
-   
-   result = NEWMAT::Matrix(nAdjustables, 2);
-   for(;idx < nAdjustables; ++idx)
-   {
-      ossimDpt paramResResult;
-      computeImageToGroundPartialsWRTAdjParam(paramResResult,
-                                                        gpt,
-                                                        idx,
-                                                        deltas[idx]);
-      // ROWxCOL
-      result[idx][0] = paramResResult.x;
-      result[idx][1] = paramResResult.y;
-   }
-   
-   return true;
-}
-
-bool ossimImageGeometry::computeGroundToImagePartials(NEWMAT::Matrix& result,
-                                                      const ossimGpt& gpt,
-                                                      const ossimDpt3d& deltaLlh)
-{
-   if(!getProjection()) return false;
-   ossimDpt p1;
-   ossimDpt p2;
-   
-   ossimDpt deltaWithRespectToLon;
-   ossimDpt deltaWithRespectToLat;
-   ossimDpt deltaWithRespectToH;
-   ossim_float64 h = ossim::isnan(gpt.height())?0.0:gpt.height();
-
-   // do the change in lon first for the dx, dy
-   //
-   worldToLocal(ossimGpt(gpt.latd(), gpt.lond()+deltaLlh.x, h, gpt.datum()), p1);
-   worldToLocal(ossimGpt(gpt.latd(), gpt.lond()-deltaLlh.x, h, gpt.datum()), p2);
-   
-   double den = 0.5/deltaLlh.x; // this is the same as dividing by 2*delta
-   deltaWithRespectToLon = (p2-p1)*den;
-   
-    
-   // do the change in lat for the dx, dy
-   //
-   worldToLocal(ossimGpt(gpt.latd()+deltaLlh.y, gpt.lond(), h, gpt.datum()), p1);
-   worldToLocal(ossimGpt(gpt.latd()-deltaLlh.y, gpt.lond(), h, gpt.datum()), p2);
-   
-   den = 0.5/deltaLlh.y; // this is the same as dividing by 2*delta
-   deltaWithRespectToLat = (p2-p1)*den;
-
-   
-   // do the change in height first for the dx, dy
-   //
-   worldToLocal(ossimGpt(gpt.latd(), gpt.lond(), h+deltaLlh.z, gpt.datum()), p1);
-   worldToLocal(ossimGpt(gpt.latd(), gpt.lond(), h-deltaLlh.z, gpt.datum()), p2);
-   
-   den = 0.5/deltaLlh.z; // this is the same as dividing by 2*delta
-   deltaWithRespectToH = (p2-p1)*den;
-   
-   
-   result = NEWMAT::Matrix(3,2);
-   
-   // set the matrix
-   //
-   result[1][0] = deltaWithRespectToLon.x*DEG_PER_RAD; 
-   result[1][1] = deltaWithRespectToLon.y*DEG_PER_RAD; 
-   result[0][0] = deltaWithRespectToLat.x*DEG_PER_RAD; 
-   result[0][1] = deltaWithRespectToLat.y*DEG_PER_RAD; 
-   result[2][0] = deltaWithRespectToH.x; 
-   result[2][1] = deltaWithRespectToH.y; 
-   
-   
-   return true; 
-}
-
-bool ossimImageGeometry::computeGroundToImagePartials(NEWMAT::Matrix& result,
-                                                      const ossimGpt& gpt)
-{
-   ossimDpt mpp = getMetersPerPixel();
-   ossimGpt originPoint;
-   ossim_float64 len = mpp.length();
-   
-   if(len > FLT_EPSILON)
-   {
-      ossim_float64 delta = originPoint.metersPerDegree().length();
-   
-      delta = len/delta;
-      
-      return computeGroundToImagePartials(result, 
-                                          gpt, 
-                                          ossimDpt3d(delta,
-                                                     delta,
-                                                     len));
-   }
-   
-   return false;
-}
-
-ossim_float64 ossimImageGeometry::upIsUpAngle() const
-{
-   ossim_float64 result = ossim::nan();
-
-   if ( m_projection.valid() )
-   {
-      if ( m_projection->isAffectedByElevation() )
-      {
-         const int NUMBER_OF_SAMPLES = 9;
-         
-         // In meters.  This is about a height of a 6 to 7 story building.
-         const double ELEVATION_DISPLACEMENT = 20;
-         
-         ossimDrect bounds;
-         getBoundingRect( bounds );
-         
-         if( !bounds.hasNans() )
-         {
-            ossim_float64 widthPercent  = bounds.width()*.1;
-            ossim_float64 heightPercent = bounds.height()*.1;
-            
-            //---
-            // Sanity check to make sure that taking 10 percent out on the image
-            // gets us to at least 1 pixel away.
-            //---
-            if(widthPercent < 1.0) widthPercent = 1.0;
-            if(heightPercent < 1.0) heightPercent = 1.0;
-            
-            // set up some work variables to help calculate the average partial
-            //
-            std::vector<ossimDpt> ipts(NUMBER_OF_SAMPLES);
-            std::vector<ossimGpt> gpts(NUMBER_OF_SAMPLES);
-            std::vector<ossimDpt> iptsDisplacement(NUMBER_OF_SAMPLES);
-            std::vector<ossimDpt> partials(NUMBER_OF_SAMPLES);
-            ossimDpt averageDelta(0.0,0.0);
-            
-            ossimDpt centerIpt = bounds.midPoint();
-            
-            //---
-            // Lets take an average displacement about the center point (3x3 grid)
-            // we will go 10 percent out of the width and height of the image and
-            // look at the displacement at those points and average them we will
-            // use the average displacement to compute the up is up rotation.
-            //---
-            
-            // top row:
-
-            // 45 degree left quadrant
-            ipts[0] = centerIpt + ossimDpt(widthPercent, -heightPercent);
-            // 45 degree middle top 
-            ipts[1] = centerIpt + ossimDpt(0.0,heightPercent);
-            // 45 degree right quadrant
-            ipts[2] = centerIpt + ossimDpt( widthPercent, -heightPercent);
-            
-            // middle row
-            ipts[3] = centerIpt + ossimDpt(-widthPercent, 0.0); // left middle
-            ipts[4] = centerIpt;
-            ipts[5] = centerIpt + ossimDpt(widthPercent, 0.0);
-            
-            // bottom row
-            ipts[6] = centerIpt + ossimDpt(-widthPercent, heightPercent);
-            ipts[7] = centerIpt + ossimDpt(0.0, heightPercent);
-            ipts[8] = centerIpt + ossimDpt(widthPercent, heightPercent);
-            
-            ossim_uint32 idx = 0;
-            for(idx = 0; idx < ipts.size(); ++idx)
-            {
-               double h = 0.0;
-               localToWorld(ipts[idx], gpts[idx]);
-               h = gpts[idx].height();
-               if(ossim::isnan(h)) h = 0.0;
-               gpts[idx].height(h + ELEVATION_DISPLACEMENT);
-               worldToLocal(gpts[idx], iptsDisplacement[idx]);
-               averageDelta = averageDelta + (iptsDisplacement[idx] - ipts[idx]);
-            }
-            
-            ossim_float64 averageLength = averageDelta.length();
-            if(averageLength < 1) return false;
-            
-            if(!ossim::almostEqual((double)0.0, (double)averageLength))
-            {
-               averageDelta = averageDelta/averageLength;
-            }
-            
-            ossimDpt averageLocation =  (ossimDpt(averageDelta.x*bounds.width(), 
-                                                  averageDelta.y*bounds.height())+centerIpt) ;
-            ossimGpt averageLocationGpt;
-            ossimGpt centerGpt;
-            
-            localToWorld(averageLocation, averageLocationGpt);
-            localToWorld(ipts[0], centerGpt);
-            
-            ossimDpt deltaPt = averageLocation - centerIpt; 
-            ossimDpt deltaUnitPt = deltaPt;
-            double len = deltaPt.length();
-            if(len > FLT_EPSILON)
-            {
-               deltaUnitPt  = deltaUnitPt/len;
-            }
-            
-            // Image space model positive y is down.  Let's reflect to positve y up.
-            deltaUnitPt.y *= -1.0; // Reflect y to be right handed.
-            
-            result = ossim::atan2d(deltaUnitPt.x, deltaUnitPt.y);
-            
-            //---
-            // We are essentially simulating camera rotation so negate the rotation
-            // value.
-            //---
-            result *= -1;
-            
-            if(result < 0) result += 360.0;
-            
-         }  // Matches: if( bounds.hasNans() == false )
-      }
-      else
-      {
-         result = 0;
-      }
-      
-   } // Matches: if ( m_projection.valid() && m_projection->isAffectedByElevation() )
-
-   return result;
-   
-} // End: ossimImageGeometry::upIsUpAngle()
-
-ossim_float64 ossimImageGeometry::northUpAngle()const
-{
-   ossim_float64 result = ossim::nan();
-
-   if ( m_projection.valid() )
-   {
-      ossimDrect bounds;
-      getBoundingRect( bounds );
-      
-      if( !bounds.hasNans() )
-      {
-         ossimDpt centerIpt = bounds.midPoint();
-
-         ossimDpt midBottomIpt( centerIpt.x, bounds.lr().y );
-         ossimDpt midTopIpt( centerIpt.x, bounds.ul().y );
-
-         ossimGpt midBottomGpt;
-         ossimGpt midTopGpt;
-         
-         localToWorld( midBottomIpt, midBottomGpt );
-         localToWorld( midTopIpt, midTopGpt );
-
-         if ( !midBottomGpt.hasNans() && !midTopGpt.hasNans() )
-         {
-            result = midBottomGpt.azimuthTo( midTopGpt );
-
-            if(result < 0) result += 360.0;
-         }
-      }
-      
-   } // Matches: if ( m_projection.valid() )
-
-   return result;
-   
-} // End: ossimImageGeometry::northUpAngle()
diff --git a/src/ossim/imaging/ossimImageGeometryFactory.cpp b/src/ossim/imaging/ossimImageGeometryFactory.cpp
deleted file mode 100644
index d7351da..0000000
--- a/src/ossim/imaging/ossimImageGeometryFactory.cpp
+++ /dev/null
@@ -1,227 +0,0 @@
-//*****************************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description: Class implementation of ossimImageGeometryFactory.
-// See .h file for class documentation.
-//
-//*****************************************************************************
-// $Id$
-#include <ossim/imaging/ossimImageGeometryFactory.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossim2dTo2dShiftTransform.h>
-#include <ossim/imaging/ossimNitfTileSource.h>
-#include <ossim/imaging/ossimTiffTileSource.h>
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-#include <ossim/support_data/ossimNitfIchipbTag.h>
-#include <ossim/support_data/ossimNitfStdidcTag.h>
-#include <ossim/projection/ossimSensorModel.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/base/ossim2dTo2dTransformRegistry.h>
-
-ossimImageGeometryFactory* ossimImageGeometryFactory::m_instance = 0;
-
-ossimImageGeometryFactory::ossimImageGeometryFactory()
-{
-   m_instance = this;
-}
-
-ossimImageGeometryFactory* ossimImageGeometryFactory::instance()
-{
-   if(!m_instance)
-   {
-      m_instance = new ossimImageGeometryFactory();
-   }
-   
-   return m_instance;
-}
-
-ossimImageGeometry* ossimImageGeometryFactory::createGeometry(
-   const ossimString& typeName)const
-{
-   if(typeName == "ossimImageGeometry")
-   {
-      return new ossimImageGeometry();
-   }
-   
-   return 0;
-}
-
-ossimImageGeometry* ossimImageGeometryFactory::createGeometry(
-   const ossimKeywordlist& kwl, const char* prefix)const
-{
-   ossimRefPtr<ossimImageGeometry> result = 0;
-   ossimString type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
-   if(!type.empty())
-   {
-      result = createGeometry(type);
-      if(result.valid()&&!result->loadState(kwl, prefix))
-      {
-         result = 0;
-      }
-   }
-   
-   return result.release();
-}
-
-ossimImageGeometry* ossimImageGeometryFactory::createGeometry(
-   const ossimFilename& /* filename */, ossim_uint32 /* entryIdx */)const
-{
-   // currently don't support this option just yet by this factory
-   return 0;
-}
-
-bool ossimImageGeometryFactory::extendGeometry(ossimImageHandler* handler)const
-{
-   bool result = false;
-   if (handler)
-   {
-      bool add2D = true;
-      ossimRefPtr<ossimImageGeometry> geom = handler->getImageGeometry();
-      if(geom.valid())
-      {
-         if(!geom->getProjection())
-         {
-            geom->setProjection(createProjection(handler));
-            result = geom->hasProjection();
-         }
-         if(geom->getProjection())
-         {
-            if( !(dynamic_cast<ossimSensorModel*>(geom->getProjection())))
-            {
-               add2D = false;
-            }
-         }
-         if(!geom->getTransform()&&add2D)
-         {
-            geom->setTransform(createTransform(handler));
-            result |= geom->hasTransform();
-        }
-      }
-   }
-   return result;
-}
-
-void ossimImageGeometryFactory::getTypeNameList(
-   std::vector<ossimString>& typeList)const
-{
-   typeList.push_back("ossimImageGeometry");
-}
-
-ossim2dTo2dTransform* ossimImageGeometryFactory::createTransform(
-   ossimImageHandler* handler)const
-{
-   // Currently nothing to do...
-   
-   ossimRefPtr<ossim2dTo2dTransform> result = 0;
-   
-   ossimNitfTileSource* nitf = dynamic_cast<ossimNitfTileSource*> (handler);
-   
-   if(nitf)
-   {
-      result = createTransformFromNitf(nitf);
-   }
-   
-   return result.release();
-}
-
-ossimProjection* ossimImageGeometryFactory::createProjection(
-   ossimImageHandler* handler) const
-{
-   ossimRefPtr<ossimProjection> result =
-      ossimProjectionFactoryRegistry::instance()->createProjection(handler);
-
-   return result.release();
-}
-
-ossim2dTo2dTransform* ossimImageGeometryFactory::createTransformFromNitf(ossimNitfTileSource* nitf)const
-{
-   ossim2dTo2dTransform* result = 0;
-   
-   ossimRefPtr<ossimNitfImageHeader> hdr = nitf->getCurrentImageHeader();
-   if (!hdr)
-   {
-      return result;
-   }
-   
-   //---
-   // Test for the ichipb tag and set the sub image if needed.
-   // 
-   // NOTE # 1:
-   // 
-   // There are nitf writers that set the ichipb offsets and only have
-   // IGEOLO field present.  For these it has been determined
-   // (but still in question) that we should not apply the sub image offset.
-   //
-   // See trac # 1578
-   // http://trac.osgeo.org/ossim/ticket/1578
-   //
-   // NOTE # 2:
-   //
-   // Let the ICHIPB have precedence over the STDIDC tag as we could have a
-   // chip of a segment.
-   //---
-   ossimRefPtr<ossimNitfRegisteredTag> tag =
-   hdr->getTagData(ossimString("ICHIPB"));
-   if (tag.valid())
-   {
-      ossimNitfIchipbTag* ichipb = PTR_CAST(ossimNitfIchipbTag, tag.get());
-      if (ichipb)
-      {
-//         const ossimRefPtr<ossimNitfRegisteredTag> blocka =
-//         hdr->getTagData(ossimString("BLOCKA"));
-//         const ossimRefPtr<ossimNitfRegisteredTag> rpc00a =
-//         hdr->getTagData(ossimString("RPC00A"));              
-//         const ossimRefPtr<ossimNitfRegisteredTag> rpc00b =
-//         hdr->getTagData(ossimString("RPC00B"));
-         
-         //---
-         // If any of these tags are present we will use the sub image from
-         // the ichipb tag.
-         //---
-//         if ( blocka.get() || rpc00a.get() || rpc00b.get() )
-         
-         // ************************* THERE ARE PROBLEMS NOT SETTING THIS AT SITE.  GO AHEAD AND ALWAYS INIT THE SHIFT
-         {
-            result = ichipb->newTransform();
-         }
-      }
-   }
-   
-   if ( !result)
-   {
-      //---
-      // Look for the STDIDC tag for a sub image (segment) offset.
-      //
-      // See: STDI-002 Table 7.3 for documentation.
-      //---
-      tag = hdr->getTagData(ossimString("STDIDC"));
-      if (tag.valid() && (hdr->getIMode() == "B") )
-      {
-         ossimDpt shift;
-         ossimNitfStdidcTag* stdidc = PTR_CAST(ossimNitfStdidcTag, tag.get());
-         if (stdidc)
-         {
-            ossim_int32 startCol = stdidc->getStartColumn().toInt32();
-            ossim_int32 startRow = stdidc->getStartRow().toInt32();
-            if ( (startCol > 0) && (startRow > 0) )
-            {
-               
-               // field are one based; hence, the - 1.
-               shift.x = (startCol-1) * hdr->getNumberOfPixelsPerBlockHoriz();
-               shift.y = (startRow-1) * hdr->getNumberOfPixelsPerBlockVert();
-            }
-            if(shift.x > 0 ||
-               shift.y > 0)
-            {
-               result = new ossim2dTo2dShiftTransform(shift);
-            }
-         }
-      }
-   }
-   
-   return result;
-}
-
diff --git a/src/ossim/imaging/ossimImageGeometryRegistry.cpp b/src/ossim/imaging/ossimImageGeometryRegistry.cpp
deleted file mode 100644
index 19d8354..0000000
--- a/src/ossim/imaging/ossimImageGeometryRegistry.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-//**************************************************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description: Class implementation of ossimImageGeometryRegistry. See .h file for class documentation.
-//
-//**************************************************************************************************
-// $Id$
-#include <ossim/imaging/ossimImageGeometryRegistry.h>
-#include <ossim/imaging/ossimImageGeometryFactory.h>
-#include <ossim/base/ossimObjectFactoryRegistry.h>
-ossimImageGeometryRegistry* ossimImageGeometryRegistry::m_instance = 0;
-RTTI_DEF1(ossimImageGeometryRegistry, "ossimImageGeometryRegistry", ossimImageGeometryFactoryBase);
-ossimImageGeometryRegistry* ossimImageGeometryRegistry::instance()
-{
-   if(!m_instance)
-   {
-      m_instance = new ossimImageGeometryRegistry();
-      m_instance->registerFactory(ossimImageGeometryFactory::instance());
-      ossimObjectFactoryRegistry::instance()->registerFactory(m_instance);
-   }
-   
-   return m_instance;
-}
-
-bool ossimImageGeometryRegistry::extendGeometry(ossimImageHandler* handler)const
-{
-   bool result = false;
-   ossim_uint32 idx = 0;
-   for(;((idx < m_factoryList.size())&&!result); ++idx)
-   {
-      result = m_factoryList[idx]->extendGeometry(handler);
-   }
-   
-   return result;
-}
-
-ossimImageGeometry* ossimImageGeometryRegistry::createGeometry(const ossimString& typeName)const
-{
-   ossimRefPtr<ossimObject> obj = createObjectFromRegistry(typeName);
-   
-   ossimRefPtr<ossimImageGeometry> geomResult = dynamic_cast<ossimImageGeometry*>(obj.get());
-   
-   obj = 0;
-   
-   return geomResult.release();
-}
-
-ossimImageGeometry* ossimImageGeometryRegistry::createGeometry(const ossimKeywordlist& kwl,
-                                                               const char* prefix)const
-{
-   ossimRefPtr<ossimObject> obj = createObjectFromRegistry(kwl, prefix);
-   
-   ossimRefPtr<ossimImageGeometry> geomResult = dynamic_cast<ossimImageGeometry*>(obj.get());
-   
-   obj = 0;
-   
-   return geomResult.release();
-}
-
-ossimImageGeometry* ossimImageGeometryRegistry::createGeometry(const ossimFilename& filename,
-                                                                       ossim_uint32 entryIdx)const
-{
-   ossimImageGeometry* result = 0;
-   ossim_uint32 idx = 0;
-   for(;((idx < m_factoryList.size())&&!result); ++idx)
-   {
-      result = m_factoryList[idx]->createGeometry(filename, entryIdx);
-   }
-   
-   return result;
-}
diff --git a/src/ossim/imaging/ossimImageHandler.cpp b/src/ossim/imaging/ossimImageHandler.cpp
deleted file mode 100644
index 1321870..0000000
--- a/src/ossim/imaging/ossimImageHandler.cpp
+++ /dev/null
@@ -1,1693 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-// 
-// This class defines an abstract image handler which all loaders should
-// derive from.
-//
-//*******************************************************************
-//  $Id: ossimImageHandler.cpp 22228 2013-04-12 14:11:45Z dburken $
-
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/base/ossimBooleanProperty.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimContainerEvent.h>
-#include <ossim/base/ossimEventIds.h>
-#include <ossim/base/ossimFilenameProperty.h>
-#include <ossim/base/ossimNumericProperty.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimPolygon.h>
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-#include <ossim/imaging/ossimHistogramWriter.h>
-#include <ossim/imaging/ossimImageGeometryRegistry.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/imaging/ossimImageHistogramSource.h>
-#include <ossim/imaging/ossimTiffTileSource.h>
-#include <ossim/imaging/ossimTiffOverviewBuilder.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <algorithm>
-
-RTTI_DEF1(ossimImageHandler, "ossimImageHandler", ossimImageSource)
-
-// Static trace for debugging
-static ossimTrace traceDebug("ossimImageHandler:debug");
-
-// Property keywords.
-static const char HAS_LUT_KW[]                 = "has_lut";
-static const char OPEN_OVERVIEW_FLAG_KW[]      = "open_overview_flag";
-static const char START_RES_LEVEL_KW[]         = "start_res_level";
-static const char SUPPLEMENTARY_DIRECTORY_KW[] = "supplementary_directory";
-static const char VALID_VERTICES_FILE_KW[]     = "valid_vertices_file";
-
-#ifdef OSSIM_ID_ENABLED
-static const char OSSIM_ID[] = "$Id: ossimImageHandler.cpp 22228 2013-04-12 14:11:45Z dburken $";
-#endif
-
-// GARRETT! All of the decimation factors are scattered throughout. We want to fold that into 
-// the image geometry object. The code is ready in ossimImageGeometry for this (more or less), but
-// the ossimImageGeometry::m_decimationFactors is not being set nor referenced. Can you do this?
-// I'm a little foggy on how we want to incorporate R-level scaling into the geometry object.
-   
-ossimImageHandler::ossimImageHandler()
-:
-ossimImageSource(0, 0, 0, true, false /* output list is not fixed */ ),
-theImageFile(ossimFilename::NIL),
-theOverviewFile(ossimFilename::NIL),
-theSupplementaryDirectory(ossimFilename::NIL),
-theOverview(0),
-theValidImageVertices(0),
-theMetaData(),
-theGeometry(),
-theLut(0),
-theDecimationFactors(0),
-theImageID(""),
-theStartingResLevel(0),
-theOpenOverviewFlag(true),
-thePixelType(OSSIM_PIXEL_IS_POINT)
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimImageHandler::ossimImageHandler() DEBUG:" << std::endl;
-#ifdef OSSIM_ID_ENABLED
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "OSSIM_ID:  "
-         << OSSIM_ID
-         << std::endl;
-#endif      
-   }
-}
-
-ossimImageHandler::~ossimImageHandler()
-{
-   theOverview = 0;
-}
-
-void ossimImageHandler::initialize()
-{
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-bool ossimImageHandler::saveState(ossimKeywordlist& kwl,
-                                  const char* prefix) const
-{
-   static const char MODULE[] = "ossimImageHandler::saveState";
-
-   ossimImageSource::saveState(kwl, prefix);
-   if (kwl.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE
-         << " ERROR detected in keyword list!  State not saved."
-         << std::endl;
-      return false;
-   }
-
-   kwl.add(prefix, ossimKeywordNames::FILENAME_KW, theImageFile.c_str(), true);
-   kwl.add(prefix, HAS_LUT_KW, (theLut.valid()?"true":"false"), true);
-   kwl.add(prefix, ossimKeywordNames::IMAGE_ID_KW, theImageID, true);
-   kwl.add(prefix, ossimKeywordNames::OVERVIEW_FILE_KW, theOverviewFile.c_str(), true);
-   kwl.add(prefix, SUPPLEMENTARY_DIRECTORY_KW, theSupplementaryDirectory.c_str(), true);
-   kwl.add(prefix, START_RES_LEVEL_KW, theStartingResLevel, true);
-   kwl.add(prefix, OPEN_OVERVIEW_FLAG_KW, (theOpenOverviewFlag?"1":"0"), true);
-   kwl.add(prefix, ossimKeywordNames::PIXEL_TYPE_KW, (ossim_uint16) thePixelType, true);
-
-   return true;
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-bool ossimImageHandler::loadState(const ossimKeywordlist& kwl,
-                                  const char* prefix)
-{
-   static const char MODULE[] = "ossimImageHandler::loadState(kwl, prefix)";
-   theDecimationFactors.clear();
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " DEBUG: entered ..."
-         << std::endl;
-   }
-   
-   ossimImageSource::loadState(kwl, prefix);
-   
-   if (kwl.getErrorStatus() == ossimErrorCodes::OSSIM_ERROR)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE
-         << "WARNING: error detected in keyword list!  State not load."
-         << std::endl;
-      
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE << " DEBUG: "
-            << "leaving with error in kwl ..." << std::endl;
-      }
-      return false;
-   }
-   
-   const char* lookup = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
-   if (!lookup)
-   {
-      // Deprecated...
-      lookup = kwl.find(prefix, ossimKeywordNames::IMAGE_FILE_KW);
-   }
-   
-   if (lookup)
-   {
-      theImageFile = lookup;
-   }
-   
-   lookup = kwl.find(prefix, ossimKeywordNames::OVERVIEW_FILE_KW);
-   if(lookup)
-   {
-      theOverviewFile = ossimFilename(lookup);
-   }
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " DEBUG:\n"
-         << "filename = " << theImageFile << std::endl;
-   }
-   
-   // Check for an external geometry file to initialize our image geometry object:
-   lookup = kwl.find(prefix, ossimKeywordNames::GEOM_FILE_KW);
-   if (lookup)
-   {
-      ossimKeywordlist geomKwl;
-      if (geomKwl.addFile(lookup) == true)
-      {
-         theGeometry = new ossimImageGeometry;
-         theGeometry->loadState(geomKwl);
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << MODULE << " DEBUG:"
-               << "Loaded external geometry file:  "
-               << lookup
-               << "\n" << geomKwl << std::endl;
-         }
-      }
-   }
-   
-   // Check for an valid image vetices file.
-   lookup = kwl.find(prefix, VALID_VERTICES_FILE_KW);
-   if (lookup)
-   {
-      initVertices(lookup);
-   }
-
-   // Starting resolution level.
-   lookup = kwl.find(prefix, START_RES_LEVEL_KW);
-   if (lookup)
-   {
-      theStartingResLevel = ossimString(lookup).toUInt32();
-   }
-
-   // Open overview flag.
-   lookup = kwl.find(prefix, OPEN_OVERVIEW_FLAG_KW);
-   if (lookup)
-   {
-      setOpenOverviewFlag( ossimString(lookup).toBool() );
-   }
-
-   // The supplementary directory for finding the overview
-   lookup = kwl.find(prefix, SUPPLEMENTARY_DIRECTORY_KW);
-   if (lookup)
-   {
-      theSupplementaryDirectory = ossimFilename(lookup);
-   }
-
-   if(getNumberOfInputs())
-   {
-      theInputObjectList.clear();
-   }
-   theInputListIsFixedFlag = true;
-   
-   // Read image id if present:
-   theImageID = kwl.find(prefix, ossimKeywordNames::IMAGE_ID_KW);
-
-   lookup = kwl.find(prefix, ossimKeywordNames::PIXEL_TYPE_KW);
-   if (lookup)
-   {
-      thePixelType = (ossimPixelType) atoi(lookup);
-   }
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " DEBUG: Leaving Ok ..."
-         << std::endl;
-   }
-   return true;
-}
-
-bool ossimImageHandler::initVertices(const char* file)
-{
-   static const char MODULE[] = "ossimImageHandler::initVertices";
-
-   ossimFilename f = file;
-   if (!f.exists()) return false;
-
-   ossimKeywordlist kwl(file);
-   
-   if (kwl.getErrorStatus() != ossimErrorCodes::OSSIM_OK)
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimImageHandler::initVertices NOTICE:"
-            << "\nError reading valid vertice file:  " << file << std::endl;
-      }
-      return false;
-   }
-
-   // Clean out any old vertices...
-   theValidImageVertices.clear();
-
-   ossim_uint32 number_of_points = kwl.numberOf("point", "x");
-
-   for (ossim_uint32 i=0; i<number_of_points; ++i)
-   {
-      ossimIpt pt;
-      const char* lookup;
-      ossimString p = "point";
-      p += ossimString::toString(i);
-      
-      ossimString px = p + ".x";
-      lookup = kwl.find(px.c_str());
-      if (lookup)
-      {
-         pt.x = atoi(lookup);
-      }
-      else
-      {
-         if (traceDebug())
-         {
-            CLOG << " ERROR:"
-                 << "\nlookup failed for:  " << px.c_str()
-                 << "\nReturning..."
-                 << std::endl;
-         }
-         return false;
-      }
-         
-      ossimString py = p + ".y";
-      lookup = kwl.find(py.c_str());
-      if (lookup)
-      {
-         pt.y = atoi(lookup);
-      }
-      else
-      {
-         if (traceDebug())
-         {
-            CLOG << " ERROR:"
-                 << "\nLookup failed for:  " << py.c_str()
-                 << "\nReturning..."
-                 << std::endl;
-         }
-         return false;
-      }
-
-      theValidImageVertices.push_back(pt);
-   }
-
-   
-   if (traceDebug())
-   {
-      CLOG << " DEBUG:"
-           << "\nVertices file:  " << f
-           << "\nValid image vertices:"
-           << std::endl;
-      for (ossim_uint32 i=0; i<theValidImageVertices.size(); ++i)
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "\npoint[" << i << "]:  " << theValidImageVertices[i];
-      }
-      ossimNotify(ossimNotifyLevel_DEBUG) << std::endl;
-   }
-   
-   return true;
-}
-
-ossim_uint32 ossimImageHandler::getNumberOfDecimationLevels() const
-{
-   ossim_uint32 result = 1; // Add r0
-   if (theOverview.valid())
-   {
-      result += theOverview->getNumberOfDecimationLevels();
-   }
-   return result;
-}
-
-ossim_uint32 ossimImageHandler::getNumberOfReducedResSets() const
-{
-   return getNumberOfDecimationLevels();
-}
-
-ossimIrect ossimImageHandler::getImageRectangle(ossim_uint32 resLevel) const
-{
-   ossimIrect result;
-   
-   if( isOpen() && isValidRLevel(resLevel) )
-   {
-      ossim_int32 lines   = getNumberOfLines(resLevel);
-      ossim_int32 samples = getNumberOfSamples(resLevel);
-      if( !lines || !samples )
-      {
-         result.makeNan();
-      }
-      else
-      {
-         result = ossimIrect(0, 0, samples-1, lines-1);
-      }
-   }
-   else
-   {
-      result.makeNan();
-   }
-
-   return result;
-}
-
-ossimIrect ossimImageHandler::getBoundingRect(ossim_uint32 resLevel) const
-{
-   return getImageRectangle(resLevel);
-}
-
-
-void ossimImageHandler::getDecimationFactor(ossim_uint32 resLevel, ossimDpt& result) const
-{
-   if (resLevel < theDecimationFactors.size())
-      result = theDecimationFactors[resLevel];
-   else
-      result.makeNan();
-}
-
-void ossimImageHandler::getDecimationFactors(vector<ossimDpt>& decimations) const
-{
-   decimations = theDecimationFactors;
-}
-
-//*************************************************************************************************
-// Method determines the decimation factors at each resolution level. This
-// base class implementation computes the decimation by considering the ratios in image size
-// between resolution levels, with fuzzy logic for rounding ratios to the nearest power of 2
-// if possible. Derived classes need to override this method if the decimations are provided
-// as part of the image metadata. In some cases (cf. ossimNitfTileSource), the derived class can
-// set the first R-level (R0) decimation in the case that it is not unity, and then invoke this
-// base class implementation to compute remaining R-levels, respecting the R0 decimation previously
-// set by derived class.
-//*************************************************************************************************
-void ossimImageHandler::establishDecimationFactors() 
-{
-   double line_decimation, samp_decimation, decimation, ratio;
-   ossim_uint32 num_lines, num_samps;
-   
-   // The error margin here is effectively the percent error tolerated between ideal number of 
-   // pixels for given power-of-2 decimation, and the actual number of pixels found at this 
-   // decimation level. Typically, the last level will have fewer pixels than expected, hence the 
-   // need for this logic...
-   static const double ERROR_MARGIN = 1.1;  // 10% allowance
-
-   // NOTE -- Until the end of this method, all decimation values are actually inverse quantities,
-   // i.e., a decimation of 0.5 typical for rlevel 1 is represented here as 2. This facilitates the
-   // fuzzy logic for recognizing powers of 2 (as integers)
-
-   // Default implementation assumes R0 is not decimated. Check for R0 defined by derived class
-   // however, in case this is not the case:
-   ossimDpt decimation_r0 (1.0, 1.0);
-   if (theDecimationFactors.size() > 0)
-   {
-      decimation_r0.x = 1.0/theDecimationFactors[0].x; // note use of inverse decimation
-      decimation_r0.y = 1.0/theDecimationFactors[0].y; 
-   }
-   else
-      theDecimationFactors.push_back(decimation_r0);
-
-   // Variables used in loop below:
-   ossim_uint32 num_lines_r0 = getNumberOfLines(0);
-   ossim_uint32 num_samps_r0 = getNumberOfSamples(0);
-   ossim_uint32 power_of_2_decimation = (ossim_uint32) decimation_r0.x;
-
-   // Remaining res levels are computed as a ratio of image size at R0 to image size at Rn:
-   ossim_uint32 nRlevels = getNumberOfDecimationLevels();
-   for(ossim_uint32 res_level = 1; res_level < nRlevels; ++res_level)
-   {
-      num_lines = getNumberOfLines(res_level);
-      num_samps = getNumberOfSamples(res_level);
-      
-      if ((num_lines < 2) || (num_samps < 2)) 
-         break;
-
-      line_decimation = decimation_r0.y * num_lines_r0 / (double)num_lines;
-      samp_decimation = decimation_r0.x * num_samps_r0 / (double)num_samps;
-      decimation = line_decimation<samp_decimation ? line_decimation:samp_decimation;
-
-      // Check for possible error due to inexact ratios.
-      // Loop until reasonable effort was made to establish the corresponding power-of-2 decimation.
-      // If close match is found, the exact integer value is assigned:
-      do 
-      {
-         power_of_2_decimation *= 2;
-         ratio = (double)power_of_2_decimation / decimation;
-         if (ratio < 1.0)
-            ratio = 1.0/ratio;
-         if (ratio < ERROR_MARGIN)
-            decimation = (double) power_of_2_decimation;
-
-      } while ((double) power_of_2_decimation < decimation);
-
-      // Convert the computed decimation back to fractional form before saving in the factors list:
-      decimation = 1.0/decimation;
-      theDecimationFactors.push_back(ossimDpt(decimation, decimation));
-   }
-}
-
-
-bool ossimImageHandler::buildHistogram(int numberOfRLevels)
-{
-   if(isOpen())
-   {
-      ossimFilename file =
-         getFilenameWithThisExtension(ossimString(".his"));
-      
-      ossimRefPtr<ossimImageHistogramSource> histoSource = new ossimImageHistogramSource;
-      ossimRefPtr<ossimHistogramWriter> writer = new ossimHistogramWriter;
-      
-      if(numberOfRLevels)
-      {
-         histoSource->setMaxNumberOfRLevels(numberOfRLevels);
-      }
-      else
-      {
-         histoSource->setMaxNumberOfRLevels(getNumberOfDecimationLevels());
-      }
-      histoSource->connectMyInputTo(0, this);
-      histoSource->enableSource();
-      writer->connectMyInputTo(0, histoSource.get());
-      writer->setFilename(file);
-      writer->addListener(&theStdOutProgress);
-      writer->execute();
-      histoSource->disconnect();
-      writer->disconnect();
-      histoSource = 0;
-      writer = 0;
-   }
-   else
-   {
-      return false;
-   }
-   
-   return true;
-}
-
-bool ossimImageHandler::buildAllHistograms(int numberOfRLevels)
-{
-   ossim_uint32 currentEntry = getCurrentEntry();
-   std::vector<ossim_uint32> entryList;
-   getEntryList(entryList);
-   ossim_uint32 idx = 0;
-   for(idx = 0; idx < entryList.size(); ++idx)
-   {
-      setCurrentEntry(entryList[idx]);
-      if(!buildHistogram(numberOfRLevels))
-      {
-         setCurrentEntry(currentEntry);
-         return false;
-      }
-   }
-   
-   setCurrentEntry(currentEntry);
-   return true;
-}
-
-bool ossimImageHandler::buildOverview(ossimImageHandlerOverviewCompressionType compressionType,
-                                      ossim_uint32 quality,
-                                      ossimFilterResampler::ossimFilterResamplerType resampleType,
-                                      bool includeFullResFlag)
-{
-   ossimFilename file = getFilenameWithThisExtension(ossimString(".ovr"));
-
-   theOverviewFile = file;
-   if(buildOverview(file, compressionType, quality, resampleType, includeFullResFlag))
-   {
-      openOverview();
-   }
-
-   return true;
-}
-
-bool ossimImageHandler::buildAllOverviews(ossimImageHandlerOverviewCompressionType compressionType,
-                                          ossim_uint32 quality,
-                                          ossimFilterResampler::ossimFilterResamplerType resampleType,
-                                          bool includeFullResFlag)
-{
-   ossim_uint32 currentEntry = getCurrentEntry();
-   std::vector<ossim_uint32> entryList;
-   getEntryList(entryList);
-   ossim_uint32 idx = 0;
-   for(idx = 0; idx < entryList.size(); ++idx)
-   {
-      setCurrentEntry(entryList[idx]);
-      if(!buildOverview(compressionType, quality, resampleType, includeFullResFlag))
-      {
-         setCurrentEntry(currentEntry);
-         return false;
-      }
-   }
-   
-   setCurrentEntry(currentEntry);
-   return true;
-}
-
-
-bool ossimImageHandler::buildOverview(const ossimFilename& filename,
-                                      ossimImageHandlerOverviewCompressionType compressionType,
-                                      ossim_uint32 quality,
-                                      ossimFilterResampler::ossimFilterResamplerType resampleType,
-                                      bool includeFullResFlag)
-{
-   closeOverview();
-   if(!isOpen())
-   {
-      return false;
-   }
-
-   theOverviewFile = filename;
-   ossimTiffOverviewBuilder tiffBuilder;
-   if ( tiffBuilder.setInputSource(this) == false )
-   {
-      return false;
-   }
-   
-   ossim_uint16 cType = COMPRESSION_NONE;
-   switch(compressionType)
-   {
-      case OSSIM_OVERVIEW_COMPRESSION_NONE:
-      {
-         cType = COMPRESSION_NONE;
-         break;
-      }
-      case OSSIM_OVERVIEW_COMPRESSION_JPEG:
-      {
-         cType = COMPRESSION_JPEG;
-         break;
-      }
-      case OSSIM_OVERVIEW_COMPRESSION_LZW:
-      {
-         cType = COMPRESSION_LZW;
-         break;
-      }
-      case OSSIM_OVERVIEW_COMPRESSION_DEFLATE:
-      {
-
-         cType = COMPRESSION_DEFLATE;
-         break;
-      }
-      case OSSIM_OVERVIEW_COMPRESSION_PACKBITS:
-      {
-         cType = COMPRESSION_PACKBITS;
-         break;
-      }
-   }
-   tiffBuilder.setJpegCompressionQuality(quality);
-   tiffBuilder.setCompressionType(cType);
-   tiffBuilder.setResampleType(resampleType);
-   tiffBuilder.buildOverview(filename, includeFullResFlag);
-
-   return true;
-}
-
-//*****************************************************************************
-//! Returns the image geometry object associated with this tile source or
-//! NULL if non defined.
-//! The geometry contains full-to-local image transform as well as projection
-//! (image-to-world).
-//*****************************************************************************
-ossimRefPtr<ossimImageGeometry> ossimImageHandler::getImageGeometry()
-{
-   if ( !theGeometry )
-   {
-      //---
-      // Check factory for external geom:
-      //---
-      theGeometry = getExternalImageGeometry();
-
-      if ( !theGeometry )
-      {
-         //---
-         // WARNING:
-         // Must create/set the geometry at this point or the next call to
-         // ossimImageGeometryRegistry::extendGeometry will put us in an infinite loop
-         // as it does a recursive call back to ossimImageHandler::getImageGeometry().
-         //---
-         theGeometry = new ossimImageGeometry();
-
-         //---
-         // And finally allow factories to extend the internal geometry.
-         // This allows plugins for tagged formats with tags not know in the base
-         // to extend the internal geometry.
-         //
-         // Plugins can do handler->getImageGeometry() then modify/extend.
-         //---
-         if(!ossimImageGeometryRegistry::instance()->extendGeometry( this ))
-         {
-            //---
-            // Check for internal, for geotiff, nitf and so on as last resort for getting some
-            // kind of geometry loaded
-            //---
-            theGeometry = getInternalImageGeometry();
-         }
-      }
-
-      // Set image things the geometry object should know about.
-      initImageParameters( theGeometry.get() );
-   }
-   return theGeometry;
-}
-
-ossimRefPtr<ossimImageGeometry> ossimImageHandler::getExternalImageGeometry() const
-{
-   ossimRefPtr<ossimImageGeometry> geom = 0;
-
-   // No geometry object has been set up yet. Check for external geometry file.
-   // Try "foo.geom" if image is "foo.tif":
-   ossimFilename filename = getFilenameWithThisExtension(ossimString(".geom"), false);
-   if(!filename.exists())
-   {
-      // Try "foo_e0.tif" if image is "foo.tif" where "e0" is entry index.
-      filename = getFilenameWithThisExtension(ossimString(".geom"), true);
-   }
-   if(!filename.exists())
-   {
-      // Try supplementary data directory for remote geometry:
-      filename = getFilenameWithThisExtension(ossimString(".geom"), false);
-      filename = theSupplementaryDirectory.dirCat(filename.file());
-   }
-   if(!filename.exists())
-   {
-      // Try supplementary data directory for remote geometry with entry index:
-      filename = getFilenameWithThisExtension(ossimString(".geom"), true);
-      filename = theSupplementaryDirectory.dirCat(filename.file());
-   }
-
-   if(filename.exists())
-   {
-      // Open the geom file as a KWL and initialize our geometry object:
-      filename = filename.expand();
-      ossimKeywordlist geomKwl(filename);
-
-      // Try loadState with no prefix.
-      std::string prefix = "";
-      std::string key = ossimKeywordNames::TYPE_KW;
-      std::string value = geomKwl.findKey(prefix, key);
-
-      if ( value.empty() || (value != "ossimImageGeometry") )
-      {
-         // Try with "image0." type prefix.
-         prefix += std::string("image") + ossimString::toString(getCurrentEntry()).string() +
-            std::string(".");
-         value = geomKwl.findKey(prefix, key);
-         
-         if ( value.empty() || (value != "ossimImageGeometry") )
-         {
-            // Try with "image0.geometry." prefix.
-            prefix += std::string( "geometry." );
-            value = geomKwl.findKey(prefix, key);
-            
-            if ( value.empty() || (value != "ossimImageGeometry") )
-            {
-               // Try with "geometry." prefix.
-               prefix = std::string( "geometry." );
-               value = geomKwl.findKey(prefix, key);
-            }
-         }
-      }
-      
-      if ( value == "ossimImageGeometry" )
-      {
-         geom = new ossimImageGeometry;
-         if( !geom->loadState(geomKwl, prefix.c_str()) )
-         {
-            geom = 0;
-         }
-      }
-   }
-   
-   return geom;
-}
-
-ossimRefPtr<ossimImageGeometry> ossimImageHandler::getInternalImageGeometry() const
-{
-   // Default, derived classes should override.
-   ossimRefPtr<ossimImageGeometry> geom = new ossimImageGeometry();
-   return geom;
-}
-
-void ossimImageHandler::setImageGeometry( ossimImageGeometry* geom)
-{
-   theGeometry = geom;
-}
-
-void ossimImageHandler::saveImageGeometry() const
-{
-   ossimFilename geometryFile = getFilenameWithThisExtension(ossimString(".geom"));
-   saveImageGeometry(geometryFile);
-}
-
-void ossimImageHandler::saveImageGeometry(const ossimFilename& geometry_file) const
-{
-   if (theGeometry.valid())
-   {
-      ossimKeywordlist kwl;
-      theGeometry->saveState(kwl);
-      kwl.write(geometry_file.chars());
-   }
-}
-
-void ossimImageHandler::closeOverview()
-{
-   theOverview = 0;
-}
-
-const ossimImageHandler* ossimImageHandler::getOverview() const
-{
-   return theOverview.get();
-}
-
-bool ossimImageHandler::hasOverviews() const
-{
-   return (getNumberOfDecimationLevels() > 1);
-}
-
-bool ossimImageHandler::openOverview(const ossimFilename& overview_file)
-{
-   bool result = false;
-   
-   closeOverview();
-
-   if (overview_file != theImageFile) // Make sure we don't open ourselves.
-   {
-      //---
-      // Get the number of level before the call to opening the overview so
-      // the overview can be told what it's starting res level is.
-      //---
-      ossim_uint32 overviewStartingResLevel = getNumberOfDecimationLevels();
-
-
-      // Try to open:
-      theOverview = ossimImageHandlerRegistry::instance()->openOverview( overview_file );
-
-      if (theOverview.valid())
-      {
-         result = true;
-         
-         //---
-         // Set the owner in case the overview reader needs to get something
-         // from the it like min/max/null.
-         //---
-         theOverview->changeOwner(this);
-         
-         // Set the starting res level of the overview.
-         theOverview->setStartingResLevel(overviewStartingResLevel);
-         
-         // Capture the file name.
-         theOverviewFile = overview_file;
-
-         //---
-         // Some overview handlers cannot store what the null is.  Like dted
-         // null is -32767 not default -32768 so this allows passing this to the
-         // overview reader provided it overrides setMin/Max/NullPixel value
-         // methods. (drb)
-         //---
-         const ossim_uint32 BANDS = getNumberOfOutputBands();
-         for (ossim_uint32 band = 0; band < BANDS; ++band)
-         {
-            theOverview->setMinPixelValue(band, getMinPixelValue(band));
-            theOverview->setMaxPixelValue(band, getMaxPixelValue(band));
-            theOverview->setNullPixelValue(band, getNullPixelValue(band));
-         }
-
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "overview starting res level: " << overviewStartingResLevel
-               << "\noverview levels: "
-               << theOverview->getNumberOfDecimationLevels()
-               << "\nlevels: " << getNumberOfDecimationLevels()
-               << endl;
-         }
-         
-         //---
-         // This is not really a container event; however, using for now.
-         //---
-         ossimContainerEvent event(this,
-                                   OSSIM_EVENT_ADD_OBJECT_ID);
-         event.setObjectList(theOverview.get());
-         fireEvent(event);
-      }
-   }
-   
-   return result;
-}
-
-bool ossimImageHandler::openOverview()
-{
-   closeOverview();
-   
-   // 1) ESH 03/2009 -- Use the overview file set e.g. using a .spec file.
-   ossimFilename overviewFilename = getOverviewFile();
-   
-   if (overviewFilename.empty() || (overviewFilename.exists() == false) )
-   {
-      // 2) Generate the name from image name.
-      overviewFilename = createDefaultOverviewFilename();
-      
-      if (overviewFilename.empty() || (overviewFilename.exists() == false) )
-      {  
-         // 3) For backward compatibility check if single entry and _e0.ovr
-         overviewFilename = getFilenameWithThisExtension(ossimString(".ovr"), true);
-         if (overviewFilename.empty() || (overviewFilename.exists() == false) )
-         {
-            // 4) For overviews built with gdal look for foo.tif.ovr
-            overviewFilename = getFilename();
-            overviewFilename += ".ovr";
-         }
-      }
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "Looking for " << overviewFilename
-         << " overview file..." << std::endl;
-   }
-
-   bool status = false;
-   
-   if ( overviewFilename.exists() )
-   {
-      status = openOverview( overviewFilename );
-   }
-
-   if ( !status  && traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimImageHandler::openOverview NOTICE:"
-         << "\nCould not find an overview." << std::endl;
-   }
-
-   return status;
-}
-
-
-bool ossimImageHandler::writeValidImageVertices(const std::vector<ossimIpt>& vertices, const ossimFilename& file)
-{
-   ossimFilename tempFile = file;
-   if(tempFile == "")
-   {
-      tempFile = createDefaultValidVerticesFilename();
-   }
-   ossim_uint32 i = 0;
-   ossimKeywordlist tempKwl;
-   ossimPolygon poly(vertices);
-   
-   poly.checkOrdering();
-
-   // Capture the vertices.
-   theValidImageVertices = vertices;
-   
-   if(poly.getOrdering() == OSSIM_COUNTERCLOCKWISE_ORDER)
-   {
-      std::reverse(theValidImageVertices.begin(), theValidImageVertices.end());
-   }
-   
-   if(theValidImageVertices.size())
-   {
-      for(i = 0; i < theValidImageVertices.size(); ++i)
-      {
-         ossimString prefix = ossimString("point") + ossimString::toString(i) + ".";
-         tempKwl.add(prefix.c_str(),
-                     "x",
-                     theValidImageVertices[i].x,
-                     true);
-	 tempKwl.add(prefix.c_str(),
-                     "y",
-                     theValidImageVertices[i].y,
-                     true);
-      }
-      
-      tempKwl.write(tempFile.c_str());
-   }
-
-   if ( tempFile.exists() )
-   {
-      return true;
-   }
-
-   return false; // Write of file failed.
-}
-
-bool ossimImageHandler::openValidVertices(const ossimFilename& vertices_file)
-{
-   return initVertices(vertices_file);
-}
-
-bool ossimImageHandler::openValidVertices()
-{
-   ossimFilename vertices_file;
-   vertices_file = theImageFile.path();
-   vertices_file = vertices_file.dirCat(theImageFile.fileNoExtension());
-   if(getNumberOfEntries() > 1)
-   {
-      vertices_file += ossimString("_vertices") + "_e" + ossimString::toString(getCurrentEntry()) + ".kwl";
-   }
-   else
-   {
-      vertices_file += "_vertices.kwl";
-   }
-   
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "Looking for " << vertices_file
-         << " vertices file..." << std::endl;
-   }
-
-   return openValidVertices(vertices_file);
-}
-
-bool ossimImageHandler::open(const ossimFilename& imageFile)
-{
-   if(isOpen())
-   {
-      close();
-   }
-
-   setFilename(imageFile);
-   
-   return open();
-}
-
-bool ossimImageHandler::open(const ossimFilename& imageFile,
-                             ossim_uint32 entryIndex)
-{
-   if(isOpen())
-   {
-      close();
-   }
-   setFilename(imageFile);
-   
-   bool result = open();
-
-   if(result)
-   {
-      return setCurrentEntry(entryIndex);
-   }
-
-   return result;
-}
-
-bool ossimImageHandler::isValidRLevel(ossim_uint32 resLevel) const
-{
-   bool result = false;
-   
-   const ossim_uint32 LEVELS = getNumberOfDecimationLevels();
-   
-   if ( !theStartingResLevel) // Not an overview.
-   {
-      result = (resLevel < LEVELS);
-   }
-   else  // Used as overview.
-   {
-      if (resLevel >= theStartingResLevel)
-      {
-         //---
-         // Adjust the res level to be zero based for this overview before
-         // checking.
-         //---
-         result = ( (resLevel - theStartingResLevel) < LEVELS);
-      }
-   }
-   
-   return result;
-}
-
-void ossimImageHandler::getValidImageVertices(vector<ossimIpt>& validVertices,
-                                              ossimVertexOrdering ordering,
-                                              ossim_uint32 resLevel) const
-{
-   ossimDpt decimation;
-   getDecimationFactor(resLevel, decimation);
-   if(decimation.hasNans())
-   {
-      return;
-   }
-   if (theValidImageVertices.size() != 0)
-   {
-      validVertices.clear();
-      for (ossim_uint32 i=0; i<theValidImageVertices.size(); ++i)
-      {
-         ossimIpt pt(ossim::round<int>(theValidImageVertices[i].x*decimation.x),
-                     ossim::round<int>(theValidImageVertices[i].y*decimation.y));
-         validVertices.push_back(pt);
-      }
-
-      if(ordering == OSSIM_COUNTERCLOCKWISE_ORDER)
-      {
-         std::reverse(validVertices.begin()+1, validVertices.end());
-      }
-   }
-   else
-   {
-      // Call the base class method which will set to bounding rectangle.
-      ossimImageSource::getValidImageVertices(validVertices, ordering, resLevel);
-   }
-}
-
-void ossimImageHandler::close()
-{
-   theOverview = 0;
-   theGeometry = 0;
-   theValidImageVertices.clear();
-   theDecimationFactors.clear();
-}
-
-bool ossimImageHandler::isBandSelector() const
-{
-   return false;
-}
-
-bool ossimImageHandler::setOutputBandList(const std::vector<ossim_uint32>& /* band_list */)
-{
-   return false;
-}
-
-bool ossimImageHandler::setOutputToInputBandList()
-{
-   bool result = false;
-   if ( isBandSelector() )
-   {
-      std::vector<ossim_uint32> bandList;
-      ossimImageSource::getOutputBandList( bandList );
-      result = setOutputBandList( bandList );
-   }
-   return result;
-}
-
-bool ossimImageHandler::isIdentityBandList( const std::vector<ossim_uint32>& bandList ) const
-{
-   bool result = false;
-   const ossim_uint32 BANDS = bandList.size();
-   if ( BANDS )
-   {
-      std::vector<ossim_uint32> inputList;
-      ossimImageSource::getOutputBandList( inputList ); // This populates an identity band list.
-
-      if ( inputList.size() == BANDS )
-      {
-         ossim_uint32 band = 0;
-         while ( band < BANDS )
-         {
-            if ( inputList[band] != bandList[band] )
-            {
-               break;
-            }
-            ++band;
-         }
-         if ( band == BANDS )
-         {
-            result = true;
-         }
-      }
-   }
-   return result;
-}
-
-// Protected convenience method:
-bool ossimImageHandler::setOutputBandList(const std::vector<ossim_uint32>& inBandList,
-                                          std::vector<ossim_uint32>& outBandList)
-{
-   bool result = false;
-
-   const ossim_uint32 INPUT_BANDS  = getNumberOfInputBands();
-   const ossim_uint32 OUTPUT_BANDS = inBandList.size();
-
-   if ( INPUT_BANDS && OUTPUT_BANDS )
-   {
-      result = true;
-      outBandList.resize( OUTPUT_BANDS );
-      for ( ossim_uint32 band = 0; band < OUTPUT_BANDS; ++band )
-      {
-         if ( inBandList[band] < INPUT_BANDS )
-         {
-            outBandList[band] = inBandList[band];
-         }
-         else // Out of range...
-         {
-            result = false;
-            break;
-         }
-      }
-      if ( result && theOverview.valid() )
-      {
-         result = theOverview->setOutputBandList( inBandList );
-      }
-   }
-
-   if ( result == false )
-   {
-      ossimImageSource::getOutputBandList( outBandList ); // Set to identity.
-   }
-
-   return result;
-}
-
-bool ossimImageHandler::isImageTiled() const
-{
-   return (getImageTileWidth() && getImageTileHeight());
-}
-
-void ossimImageHandler::loadMetaData()
-{
-  theMetaData.clear();
-
-  ossimFilename filename = getFilenameWithThisExtension(ossimString(".omd"), false);
-  if ( filename.exists() == false )
-  {
-     filename = getFilenameWithThisExtension(ossimString(".omd"), true);
-  }
-  if(filename.exists())
-  {
-     ossimKeywordlist kwl;
-     
-     kwl.addFile(filename.c_str());
-     
-     theMetaData.loadState(kwl);
-  }
-  else
-  {
-     theMetaData.setScalarType(getOutputScalarType());
-  }
-}
-
-double ossimImageHandler::getMinPixelValue(ossim_uint32 band)const
-{
-   if(theMetaData.getNumberOfBands())
-   {
-      return theMetaData.getMinPix(band);
-   }
-   return ossim::defaultMin(getOutputScalarType());
-}
-
-double ossimImageHandler::getMaxPixelValue(ossim_uint32 band)const
-{
-   if(theMetaData.getNumberOfBands())
-   {
-      return theMetaData.getMaxPix(band);
-   }
-   return ossim::defaultMax(getOutputScalarType());
-}
-
-double ossimImageHandler::getNullPixelValue(ossim_uint32 band)const
-{
-   if(theMetaData.getNumberOfBands())
-   {
-      return theMetaData.getNullPix(band);
-   }
-   
-   return ossim::defaultNull(getOutputScalarType());
-}
-
-void ossimImageHandler::setMinPixelValue(ossim_uint32 band,
-                                         const ossim_float64& pix)
-{
-   theMetaData.setMinPix(band, pix);
-}
-
-void ossimImageHandler::setMaxPixelValue(ossim_uint32 band,
-                                         const ossim_float64& pix)
-{
-   theMetaData.setMaxPix(band, pix); 
-}
-
-void ossimImageHandler::setNullPixelValue(ossim_uint32 band,
-                                          const ossim_float64& pix)
-{
-   theMetaData.setNullPix(band, pix);  
-}
-
-ossim_uint32 ossimImageHandler::getCurrentEntry()const
-{
-   return 0;
-}
-
-bool ossimImageHandler::setCurrentEntry(ossim_uint32 /* entryIdx */)
-{
-   return true;
-}
-
-ossimFilename ossimImageHandler::getOverviewFile()const
-{
-   return theOverviewFile;
-}
-
-void ossimImageHandler::getEntryList(std::vector<ossim_uint32>& entryList)const
-{
-   entryList.push_back(0);
-}
-
-void ossimImageHandler::getEntryStringList(
-   std::vector<ossimString>& entryStringList) const
-{
-   std::vector<ossim_uint32> entryList;
-   getEntryList(entryList);
-
-   if (entryList.size())
-   {
-      entryStringList.resize(entryList.size());
-      for (ossim_uint32 i = 0; i < entryList.size(); ++i)
-      {
-         entryStringList[i] = ossimString::toString(entryList[i]);
-      }
-   }
-}
-
-bool ossimImageHandler::useEntryIndex() const
-{
-   bool result = false;
-   if ( isOpen() )
-   {
-      std::vector<ossim_uint32> entryList;
-      getEntryList(entryList);
-
-      if ( entryList.size() )
-      {
-         if ( (entryList.size() > 1) || (entryList[0] != 0) ) result = true;
-      }
-   }
-   return result;
-}
-
-ossim_uint32 ossimImageHandler::getNumberOfEntries()const
-{
-   std::vector<ossim_uint32> tempList;
-   getEntryList(tempList);
-   
-   return (ossim_uint32)tempList.size();
-}
-
-void ossimImageHandler::getEntryName( ossim_uint32 /* entryIdx */, std::string& name ) const
-{
-   //---
-   // This implementation does nothing. Interface for multi entry image readers that have
-   // named entries, e.g. HDF5 data.
-   //---
-   name.clear();
-}
-
-void ossimImageHandler::completeOpen()
-{
-   loadMetaData();
-   if ( theOpenOverviewFlag )
-   {
-      openOverview();
-   }
-   establishDecimationFactors();
-   openValidVertices();
-}
-
-bool ossimImageHandler::canConnectMyInputTo(ossim_int32 /* inputIndex */,
-                                            const ossimConnectableObject* /* object */)const
-{      
-   return false;
-}
-
-bool ossimImageHandler::hasMetaData()const
-{
-   return theMetaData.isValid();
-}
-
-void ossimImageHandler::setFilename(const ossimFilename& filename)
-{
-   theImageFile = filename;
-}
-
-const ossimFilename& ossimImageHandler::getFilename()const
-{
-   return theImageFile;
-}
-
-void ossimImageHandler::setSupplementaryDirectory(const ossimFilename& dir)
-{
-   if (dir.isDir())
-      theSupplementaryDirectory = dir;
-   else
-      theSupplementaryDirectory = dir.path();
-
-   // A change in supplementary directory presents an opportunity to find the OVR that could not be
-   // opened previously, as well as other support data items:
-   if (!theOverview.valid())
-   {
-      if (theDecimationFactors.size() > 0)
-      {
-        theDecimationFactors.clear();
-      }
-      completeOpen();
-   }
-}
-
-const ossimFilename& ossimImageHandler::getSupplementaryDirectory()const
-{
-   return theSupplementaryDirectory;
-}
-
-void ossimImageHandler::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if ( property.valid() )
-   {
-      if(property->getName() == ossimKeywordNames::ENTRY_KW)
-      {
-         setCurrentEntry(property->valueToString().toUInt32());
-      }
-      else if ( property->getName() == OPEN_OVERVIEW_FLAG_KW )
-      {
-         setOpenOverviewFlag( property->valueToString().toBool() );
-      }
-      else
-      {
-         ossimImageSource::setProperty(property);
-      }
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimImageHandler::getProperty(const ossimString& name)const
-{
-
-   if(name == ossimKeywordNames::ENTRY_KW)
-   {
-      std::vector<ossim_uint32> entryList;
-      getEntryList(entryList);
-      
-      ossimStringProperty* stringProperty = new ossimStringProperty(name,
-                                                                    ossimString::toString(getCurrentEntry()));
-      ossim_uint32 idx = 0;
-      for(idx = 0; idx < entryList.size(); ++idx)
-      {
-         stringProperty->addConstraint(ossimString::toString(entryList[idx]));
-      }
-      stringProperty->setFullRefreshBit();
-      stringProperty->setEditableFlag(false);
-
-      return stringProperty;
-   }
-   else if(name == ossimKeywordNames::NUMBER_SAMPLES_KW)
-   {
-      ossimNumericProperty* prop = new ossimNumericProperty(name, ossimString::toString(getNumberOfSamples()));
-      prop->setReadOnlyFlag(true);
-      
-      return prop;
-   }
-   else if(name == ossimKeywordNames::NUMBER_LINES_KW)
-   {
-      ossimNumericProperty* prop = new ossimNumericProperty(name, ossimString::toString(getNumberOfLines()));
-      prop->setReadOnlyFlag(true);
-      
-      return prop;
-   }
-   else if(name == ossimKeywordNames::NUMBER_BANDS_KW)
-   {
-      ossimNumericProperty* prop = new ossimNumericProperty(name, ossimString::toString(getNumberOfInputBands()));
-      prop->setReadOnlyFlag(true);
-      
-      return prop;
-   }
-   else if(name == ossimKeywordNames::NUMBER_REDUCED_RES_SETS_KW)
-   {
-      ossimNumericProperty* prop = new ossimNumericProperty(name, ossimString::toString(getNumberOfDecimationLevels()));
-      prop->setReadOnlyFlag(true);
-      
-      return prop;
-   }
-   else if(name == ossimKeywordNames::SCALAR_TYPE_KW)
-   {
-      ossimStringProperty* prop = new ossimStringProperty(name, ossimScalarTypeLut::instance()->getEntryString(getOutputScalarType()));
-      prop->setReadOnlyFlag(true);
-      
-      return prop;
-   }
-   else if(name == "histogram_filename")
-   {
-      ossimFilenameProperty* filenameProp =
-         new ossimFilenameProperty(name, createDefaultHistogramFilename());
-      
-      filenameProp->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_INPUT);
-      filenameProp->setCacheRefreshBit();
-      
-      return filenameProp;
-      
-   }
-   else if(name == "geometry_filename")
-   {
-      ossimFilenameProperty* filenameProp =
-         new ossimFilenameProperty(name, createDefaultGeometryFilename());
-      
-      filenameProp->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_INPUT);
-      filenameProp->setCacheRefreshBit();
-      
-      return filenameProp;
-      
-   }
-   else if(name == "valid_vertices_filename")
-   {
-      ossimFilenameProperty* filenameProp =
-         new ossimFilenameProperty(name, createDefaultValidVerticesFilename());
-      
-      filenameProp->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_INPUT);
-      filenameProp->setCacheRefreshBit();
-      
-      return filenameProp;
-   }
-   else if(name == "metadata_filename")
-   {
-      ossimFilenameProperty* filenameProp =
-         new ossimFilenameProperty(name, createDefaultMetadataFilename());
-      
-      filenameProp->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_INPUT);
-      filenameProp->setCacheRefreshBit();
-      
-      return filenameProp;
-   }
-   else if(name == "overview_filename")
-   {
-      ossimFilenameProperty* filenameProp =
-         new ossimFilenameProperty(name, createDefaultOverviewFilename());
-      
-      filenameProp->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_INPUT);
-      filenameProp->setCacheRefreshBit();
-      
-      return filenameProp;
-   }
-   else if(name == "filename")
-   {
-      ossimFilenameProperty* filenameProp =
-         new ossimFilenameProperty(name, getFilename());
-      
-      filenameProp->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_INPUT);
-      filenameProp->setFullRefreshBit();
-      
-      return filenameProp;
-   }
-   else if ( name == OPEN_OVERVIEW_FLAG_KW)
-   {
-      ossimRefPtr<ossimProperty> result =
-         new ossimBooleanProperty(ossimString(OPEN_OVERVIEW_FLAG_KW), theOpenOverviewFlag); 
-      return result;
-   }
-   
-   return ossimImageSource::getProperty(name);
-}
-
-void ossimImageHandler::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageSource::getPropertyNames(propertyNames);
-   propertyNames.push_back(ossimKeywordNames::ENTRY_KW);
-   propertyNames.push_back(ossimKeywordNames::NUMBER_SAMPLES_KW);
-   propertyNames.push_back(ossimKeywordNames::NUMBER_LINES_KW);
-   propertyNames.push_back(ossimKeywordNames::NUMBER_BANDS_KW);
-   propertyNames.push_back(ossimKeywordNames::NUMBER_REDUCED_RES_SETS_KW);
-   propertyNames.push_back(ossimKeywordNames::SCALAR_TYPE_KW);
-   propertyNames.push_back(OPEN_OVERVIEW_FLAG_KW);
-}
-
-ossimFilename ossimImageHandler::getFilenameWithThisExtension(
-   const ossimString& ext,
-   bool set_e0_prefix) const
-{
-   // Get the image file.
-   ossimFilename f = getFilename();
-
-   // If the supplementary directory is set, find the extension
-   // at that location instead of at the default.
-   if ( theSupplementaryDirectory.size() )
-   {
-      
-      ossimString drivePart;
-      ossimString pathPart;
-      ossimString filePart;
-      ossimString extPart;
-
-      f.split(drivePart,
-              pathPart,
-              filePart,
-              extPart);
-
-      ossimFilename newDrivePart = theSupplementaryDirectory.drive();
-      ossimFilename newPathPart  = theSupplementaryDirectory.after(newDrivePart);
-
-      f.merge( newDrivePart, newPathPart, filePart, extPart );
-   }
-
-   // Wipe out the extension.
-   f.setExtension("");
-
-   if (set_e0_prefix || (getNumberOfEntries() > 1))
-   {
-      f += "_e";
-      f += ossimString::toString(getCurrentEntry());
-   }
-   if (ext.size())
-   {
-      if (ext[static_cast<std::string::size_type>(0)] != '.')
-      {
-         f += ".";
-      }
-      f += ext;
-   }
-   return f;
-}
-
-bool ossimImageHandler::getOverviewTile(ossim_uint32 resLevel,
-                                        ossimImageData* result)
-{
-   bool status = false;
-   
-   if (theOverview.valid())
-   {
-      if (theOverview->isValidRLevel(resLevel) && result &&
-          (result->getNumberOfBands() == getNumberOfOutputBands()) )
-      {
-         status = theOverview->getTile(result, resLevel);
-      }
-   }
-   
-   return status;
-}
-
-ossimRefPtr<ossimNBandLutDataObject> ossimImageHandler::getLut()const
-{
-   return theLut;
-}
-
-bool ossimImageHandler::hasLut() const
-{
-   return theLut.valid();
-}
-
-ossimFilename ossimImageHandler::createDefaultOverviewFilename() const
-{
-   return getFilenameWithThisExtension("ovr");
-}
-   
-ossimFilename ossimImageHandler::createDefaultGeometryFilename() const
-{
-   return getFilenameWithThisExtension("geom");
-}
-
-ossimFilename ossimImageHandler::createDefaultMetadataFilename() const
-{
-   return getFilenameWithThisExtension("omd");
-}
-
-ossimFilename ossimImageHandler::createDefaultHistogramFilename() const
-{
-   return getFilenameWithThisExtension("his");
-}
-
-ossimFilename ossimImageHandler::createDefaultValidVerticesFilename() const
-{
-   ossimFilename result;
-   
-   result = theImageFile.path();
-   result = result.dirCat(theImageFile.fileNoExtension());
-   result += "_vertices";
-   if(getNumberOfEntries() > 1)
-   {
-      result += "_e";
-      result += ossimString::toString(getCurrentEntry());
-   }
-   result += ".kwl";
-   
-   return result;
-}
-
-ossim_uint32 ossimImageHandler::getStartingResLevel() const
-{
-   return theStartingResLevel;
-}
-
-void ossimImageHandler::setStartingResLevel(ossim_uint32 level)
-{
-   theStartingResLevel = level;
-}
-
-bool ossimImageHandler::getOpenOverviewFlag() const
-{
-   return theOpenOverviewFlag;
-}
-   
-void ossimImageHandler::setOpenOverviewFlag(bool flag)
-{
-   theOpenOverviewFlag = flag;
-
-   // If false close overview if open??? (drb)
-}
-
-void ossimImageHandler::initImageParameters(ossimImageGeometry* geom) const
-{
-   if ( geom )
-   {
-      // Set decimation levels
-      ossim_uint32 num_levels = getNumberOfDecimationLevels();
-      if ((num_levels > 0) && (num_levels != geom->getNumberOfDecimations()))
-      {
-         geom->setDiscreteDecimation(theDecimationFactors);
-      }
-
-      // Set image size.
-      if(geom->getImageSize().hasNans())
-      {
-         ossimIrect rect = getBoundingRect();
-         geom->setImageSize(ossimIpt(rect.width(), rect.height()));
-      } 
-   }
-}
diff --git a/src/ossim/imaging/ossimImageHandlerFactory.cpp b/src/ossim/imaging/ossimImageHandlerFactory.cpp
deleted file mode 100644
index c265bed..0000000
--- a/src/ossim/imaging/ossimImageHandlerFactory.cpp
+++ /dev/null
@@ -1,858 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimImageHandlerFactory.cpp 22230 2013-04-12 16:34:05Z dburken $
-
-#include <ossim/imaging/ossimImageHandlerFactory.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimRegExp.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/imaging/ossimAdrgTileSource.h>
-#include <ossim/imaging/ossimCcfTileSource.h>
-#include <ossim/imaging/ossimCibCadrgTileSource.h>
-#include <ossim/imaging/ossimDoqqTileSource.h>
-#include <ossim/imaging/ossimDtedTileSource.h>
-#include <ossim/imaging/ossimEnviTileSource.h>
-#include <ossim/imaging/ossimNitfTileSource.h>
-// #include <ossim/imaging/ossimPdfReader.h>
-#include <ossim/imaging/ossimQuickbirdNitfTileSource.h>
-#include <ossim/imaging/ossimSrtmTileSource.h>
-#include <ossim/imaging/ossimQuickbirdTiffTileSource.h>
-#include <ossim/imaging/ossimTiffTileSource.h>
-#include <ossim/imaging/ossimUsgsDemTileSource.h>
-#include <ossim/imaging/ossimLandsatTileSource.h>
-#include <ossim/imaging/ossimGeneralRasterTileSource.h>
-#include <ossim/imaging/ossimERSTileSource.h>
-#include <ossim/imaging/ossimVpfTileSource.h>
-#include <ossim/imaging/ossimJpegTileSource.h>
-#include <ossim/imaging/ossimRpfCacheTileSource.h>
-#include <ossim/imaging/ossimImageCacheTileSource.h>
-#include <ossim/imaging/ossimQbTileFilesHandler.h>
-#include <ossim/imaging/ossimBitMaskTileSource.h>
-#include <ossim/imaging/ossimBandSeparateHandler.h>
-#include <ossim/parallel/ossimImageHandlerMtAdaptor.h>
-
-
-static const ossimTrace traceDebug("ossimImageHandlerFactory:debug");
-
-RTTI_DEF1(ossimImageHandlerFactory, "ossimImageHandlerFactory", ossimImageHandlerFactoryBase);
-
-ossimImageHandlerFactory* ossimImageHandlerFactory::theInstance = 0;
-ossimImageHandlerFactory::~ossimImageHandlerFactory()
-{
-   theInstance = (ossimImageHandlerFactory*)0;
-}
-
-ossimImageHandlerFactory* ossimImageHandlerFactory::instance()
-{
-   if(!theInstance)
-   {
-      theInstance = new ossimImageHandlerFactory;
-
-      // let's turn off tiff error reporting
-      TIFFSetErrorHandler(0);
-      TIFFSetWarningHandler(0);
-   }
-
-   return theInstance;
-}
-
-ossimImageHandler* ossimImageHandlerFactory::open(const ossimFilename& fileName,
-                                                  bool openOverview) const
-{
-   static const char* M = "ossimImageHandlerFactory::open(filename) -- ";
-   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG) << M <<" Entering..." << std::endl;
-
-   ossimFilename copyFilename = fileName;
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "Attempting to open file: " << fileName.c_str()
-         << "\nopen overview flag: " << (openOverview?"true":"false") << "\n";
-   }
-
-   ossimRefPtr<ossimImageHandler> result = 0;
-   while (true)
-   {
-      // Check for empty file.
-      copyFilename.trim();
-      if (copyFilename.empty()) break;
-
-      // for all of our imagehandlers the filename must exist.
-      // if we have any imagehandlers that require an encoded string and is contrlled in this factory then
-      // we need to move this.
-      if (!copyFilename.exists())  break;
-
-      ossimString ext = copyFilename.ext().downcase();
-      if(ext == "gz")
-         copyFilename = copyFilename.setExtension("");
-
-      // Try opening from extension logic first (this is faster than instantiating each type).
-//      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying via extension...";
-//      result = openFromExtension(copyFilename);
-//      if (result.valid())  break;
-
-      //---
-      // If here do it the brute force way by going down the list of available
-      // readers...
-      //---
-      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying RPF Cache Image...\n";
-      result = new ossimRpfCacheTileSource;
-      result->setOpenOverviewFlag(openOverview);
-      if (result->open(copyFilename)) break;
-
-      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying RPF Image Cache Image...\n";
-      result = new ossimImageCacheTileSource;
-      result->setOpenOverviewFlag(openOverview);
-      if (result->open(copyFilename)) break;
-
-      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying JPEG...\n";
-      result = new ossimJpegTileSource;
-      result->setOpenOverviewFlag(openOverview);      
-      if (result->open(copyFilename)) break;
-
-      // this must be checked first before the TIFF handler
-      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying Quickbird TIFF...\n";
-      result = new ossimQuickbirdTiffTileSource;
-      result->setOpenOverviewFlag(openOverview);      
-      if (result->open(copyFilename)) break;
-
-      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying TIFF...\n";
-      result = new ossimTiffTileSource;
-      result->setOpenOverviewFlag(openOverview);      
-      if (result->open(copyFilename))  break;
-
-      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying CIB/CADRG...\n";
-      result = new ossimCibCadrgTileSource;
-      result->setOpenOverviewFlag(openOverview);      
-      if (result->open(copyFilename))  break;
-
-      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying DOQQ...\n";
-      result = new ossimDoqqTileSource;
-      result->setOpenOverviewFlag(openOverview);      
-      if (result->open(copyFilename))  break;
-
-      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying DTED...\n";
-      result = new ossimDtedTileSource;
-      result->setOpenOverviewFlag(openOverview);      
-      if (result->open(copyFilename))  break;
-
-      // this must be checked first before the NITF raw handler
-      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying Quickbird Nitf...\n";
-      result = new ossimQuickbirdNitfTileSource;
-      result->setOpenOverviewFlag(openOverview);      
-      if (result->open(copyFilename))  break;
-
-      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying NITF...\n";
-      result = new ossimNitfTileSource;
-      result->setOpenOverviewFlag(openOverview);      
-      if (result->open(copyFilename))  break;
-
-      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying USGS Dem...\n";
-      result = new ossimUsgsDemTileSource;
-      result->setOpenOverviewFlag(openOverview);      
-      if (result->open(copyFilename))  break;
-
-      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying Landsat...\n";
-      result = new ossimLandsatTileSource;
-      result->setOpenOverviewFlag(openOverview);      
-      if (result->open(copyFilename))  break;
-
-      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying VPF...\n";
-      result = new ossimVpfTileSource;
-      result->setOpenOverviewFlag(openOverview);      
-      if (result->open(copyFilename))  break;
-
-      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying ERS...\n";
-      result = new ossimERSTileSource;
-      result->setOpenOverviewFlag(openOverview);      
-      if (result->open(copyFilename))  break;
-
-      //---
-      // The srtm and general raser readers were picking up j2k overviews because the
-      // matching base file has an "omd" file that the raster reader can load
-      // so added extension check.  (drb - 20100709)
-      //---
-      if (copyFilename.ext() != "ovr")
-      {
-         // Note:  ENVI should be in front of general raster..
-         if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying ENVI...\n";
-         result = new ossimEnviTileSource;
-         result->setOpenOverviewFlag(openOverview);         
-         if (result->open(copyFilename))  break;
-
-         // Note:  SRTM should be in front of general raster..
-         if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying SRTM...\n";
-         result = new ossimSrtmTileSource;
-         result->setOpenOverviewFlag(openOverview);         
-         if (result->open(copyFilename))  break;
-
-         if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying General Raster...\n";
-         result = new ossimGeneralRasterTileSource; 
-         result->setOpenOverviewFlag(openOverview);        
-         if (result->open(copyFilename))  break;
-      }
-
-      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying ADRG...\n";
-      result = new ossimAdrgTileSource();
-      result->setOpenOverviewFlag(openOverview);      
-      if (result->open(copyFilename))  break;
-
-      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying ossimQbTileFilesHandler...\n";
-      result = new ossimQbTileFilesHandler();
-      result->setOpenOverviewFlag(openOverview);
-      if (result->open(copyFilename))  break;
-
-      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying Bit Mask...\n";
-      result = new ossimBitMaskTileSource();
-      result->setOpenOverviewFlag(openOverview);
-      if (result->open(copyFilename))  break;
-
-      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying band-separated files...\n";
-      result = new ossimBandSeparateHandler();
-      result->setOpenOverviewFlag(openOverview);      
-      if (result->open(copyFilename))  break;
-
-      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying CCF...\n";
-      result->setOpenOverviewFlag(openOverview);      
-      result = new ossimCcfTileSource();
-      if (result->open(copyFilename))  break;
-
-      result = 0;
-      break;
-   }
-
-   if (traceDebug())
-   {
-      if (result.valid())
-         ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "   SUCCESS" << std::endl;
-      else
-         ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "   Open FAILED" << std::endl;
-   }
-
-   return result.release();
-}
-
-ossimImageHandler* ossimImageHandlerFactory::open(const ossimKeywordlist& kwl,
-                                                  const char* prefix)const
-{
-   static const char* M = "ossimImageHandlerFactory::open(kwl,prefix) -- ";
-   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG) << M <<" entered..." << std::endl;
-
-   ossimRefPtr<ossimImageHandler> result = 0;
-   while (true)
-   {
-      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying adrg...\n";
-      result = new ossimAdrgTileSource();
-      if (result->loadState(kwl, prefix))  break;
-
-      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying ccf...\n";
-      result  = new ossimCcfTileSource();
-      if (result->loadState(kwl, prefix))  break;
-
-      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M << "trying CIB/CADRG...\n";
-      result  = new ossimCibCadrgTileSource();
-      if (result->loadState(kwl, prefix))  break;
-
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "trying RpfCache...\n";
-      result  = new ossimRpfCacheTileSource();
-      if (result->loadState(kwl, prefix))  break;
-
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "trying Rpf ImageCache...\n";
-      result  = new ossimImageCacheTileSource();
-      if (result->loadState(kwl, prefix))  break;
-
-      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M << "trying DOQQ...\n";
-      result  = new ossimDoqqTileSource();
-      if (result->loadState(kwl, prefix))  break;
-
-      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying DTED...\n";
-      result  = new ossimDtedTileSource();
-      if (result->loadState(kwl, prefix))  break;
-
-      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying jpeg...\n";
-      result  = new ossimJpegTileSource();
-      if (result->loadState(kwl, prefix))  break;
-
-      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying Quickbird NITF...\n";
-      result = new ossimQuickbirdNitfTileSource;
-      if (result->loadState(kwl, prefix))  break;
-
-      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M << "trying Nitf...\n";
-      result  = new ossimNitfTileSource();
-      if (result->loadState(kwl, prefix))  break;
-
-      // Must be before tiff...
-      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying Quickbird TIFF...\n";
-      result = new ossimQuickbirdTiffTileSource;
-      if (result->loadState(kwl, prefix))  break;
-
-      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying tiff...\n";
-      result  = new ossimTiffTileSource();
-      if (result->loadState(kwl, prefix))  break;
-
-      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying USGS Dem...\n";
-      result  = new ossimUsgsDemTileSource();
-      if (result->loadState(kwl, prefix))  break;
-
-      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying Landsat...\n";
-      result  = new ossimLandsatTileSource();
-      if (result->loadState(kwl, prefix))  break;
-
-      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying VPF...\n";
-      result = new ossimVpfTileSource;
-      if (result->loadState(kwl, prefix))  break;
-
-      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying ERS...\n";
-      result = new ossimERSTileSource;
-      if (result->loadState(kwl, prefix))  break;
-
-      // Note:  ENVI should be in front of general raster...
-      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying ENVI...\n"<< std::endl;
-      result  = new ossimEnviTileSource();
-      if (result->loadState(kwl, prefix))  break;
-
-      // Note:  SRTM should be in front of general raster...
-      if(traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << M<< "trying SRTM...\n"<< std::endl;
-      result  = new ossimSrtmTileSource();
-      if (result->loadState(kwl, prefix))  break;
-
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG) << M << "trying General Raster...\n"<< std::endl;
-      result  = new ossimGeneralRasterTileSource();
-      if (result->loadState(kwl, prefix))  break;
-
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"trying ossimQbTileFilesHandler...\n"<<std::endl;
-      result = new ossimQbTileFilesHandler;
-      if (result->loadState(kwl, prefix))  break;
-
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"trying ossimQbTileFilesHandler...\n"<<std::endl;
-      result = new ossimQbTileFilesHandler;
-      if (result->loadState(kwl, prefix))  break;
-
-      if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "Trying band-separated files...\n";
-      result = new ossimBandSeparateHandler();
-      if (result->loadState(kwl, prefix))  break;
-
-      result = 0;
-      break;
-   }
-
-   if (traceDebug())
-   {
-      if (result.valid())
-         ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "   SUCCESS" << std::endl;
-      else
-         ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "   Open FAILED" << std::endl;
-   }
-
-   return result.release();
-}
-
-ossimRefPtr<ossimImageHandler> ossimImageHandlerFactory::openOverview(
-   const ossimFilename& file ) const
-{
-   ossimRefPtr<ossimImageHandler> result = 0;
-   if ( file.size() )
-   {
-      result = new ossimTiffTileSource;
-      
-      result->setOpenOverviewFlag( false ); // Always false.
-
-      if ( result->open( file ) == false )
-      {
-         result = 0;
-      }
-   }
-   return result;
-}
-
-#if 0
-ossimImageHandler* ossimImageHandlerFactory::openFromExtension(const ossimFilename& fileName) const
-{
-   
-   static const char* M = "ossimImageHandlerFactory::openFromExtension() -- ";
-   if(traceDebug()) 
-      ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Attempting to open <"<<fileName<<">"<<std::endl;
-
-   ossimString ext = fileName.ext().downcase();
-   ossimRefPtr<ossimImageHandler> result = 0;
-   
-   
-   while (true)
-   {
-      // OVR can be combined with "tif" once we get rid of ossimQuickbirdTiffTileSource
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying OVR...\n";
-      if (ext == "ovr")
-      {
-         result = new ossimTiffTileSource;
-         if(result->open(fileName)) break;
-      }
-
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying TIF or TIFF...\n";
-      if ( (ext == "tif") || (ext == "tiff") )
-      {
-         // this must be checked first before the TIFF handler
-         result = new ossimQuickbirdTiffTileSource;
-         if(result->open(fileName)) break;
-         result = new ossimTiffTileSource;
-         if(result->open(fileName)) break;
-      }
-
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying NTF or NITF...\n";
-      if ( (ext == "ntf") || (ext == "nitf") )
-      {
-         // this must be checked first before the NITF raw handler
-         result = new ossimQuickbirdNitfTileSource;
-         if(result->open(fileName)) break;
-         result = new ossimNitfTileSource;
-         if(result->open(fileName)) break;
-      }
-
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying RPF...\n";
-      if ( (fileName == "rpf"))
-      {
-         result = new ossimRpfCacheTileSource;
-         if(result->open(fileName)) break;
-
-         result = new ossimImagefCacheTileSource;
-         if(result->open(fileName)) break;
-      }
-
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying TOC...\n";
-      if ( (fileName == "a.toc") || (ext == "toc"))
-      {
-         result = new ossimCibCadrgTileSource;
-         if(result->open(fileName)) break;
-      }
-
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying JPG or JPEG...\n";
-      if ( (ext == "jpg") || (ext == "jpeg") )
-      {
-         result = new ossimJpegTileSource;
-         if(result->open(fileName)) break;
-      }
-
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying DOQ or DOQQ...\n";
-      if ( (ext == "doq") || (ext == "doqq") )
-      {
-         result = new ossimDoqqTileSource;
-         if(result->open(fileName)) break;
-      }
-
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying DTn...\n";
-      if ( (ext == "dt2") || (ext == "dt1") || (ext == "dt3") ||
-         (ext == "dt4") || (ext == "dt5") || (ext == "dt0") )
-      {
-         result = new ossimDtedTileSource;
-         if(result->open(fileName)) break;
-      }
-
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying HGT...\n";
-      if (ext == "hgt")
-      {
-         result = new ossimSrtmTileSource;
-         if(result->open(fileName)) break;
-      }  
-
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying HRI,HSI\n";
-      if ( (ext == "hri") || (ext == "hsi") )
-      {
-         result = new ossimEnviTileSource;
-         if(result->open(fileName)) break;
-      }  
-
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying DEM...\n";
-      if (ext == "dem")
-      {
-         result = new ossimUsgsDemTileSource;
-         if(result->open(fileName)) break;
-      }
-
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying FST...\n";
-      if (ext == "fst")
-      {
-         result = new ossimLandsatTileSource;
-         if(result->open(fileName)) break;
-      }
-
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying RAS or RAW...\n";
-      if ( (ext == "ras") || (ext == "raw") )
-      {
-         result = new ossimGeneralRasterTileSource;
-         if(result->open(fileName)) break;
-      }
-
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying IMG...\n";
-      if (ext == "img")
-      {
-         result  = new ossimAdrgTileSource;
-         if(result->open(fileName)) break;
-      }
-
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying CCF...\n";
-      if (ext == "ccf")
-      {
-         result = new ossimCcfTileSource;
-         if(result->open(fileName)) break;
-      }
-
-      if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying TIL...\n";
-      if (ext == "til")
-      {
-         result = new ossimQbTileFilesHandler;
-         if(result->open(fileName)) break;
-      }
-
-      result = 0;
-      break;
-   }
-   if (traceDebug())
-   {
-      if (result.valid())
-         ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "   SUCCESS" << std::endl;
-      else
-         ossimNotify(ossimNotifyLevel_DEBUG)<<M<< "   Open FAILED" << std::endl;
-   }
-   return result.release();
-}
-#endif
-ossimObject* ossimImageHandlerFactory::createObject(const ossimString& typeName)const
-{
-   if(STATIC_TYPE_NAME(ossimAdrgTileSource) == typeName)
-   {
-      return new ossimAdrgTileSource();
-   }
-   if(STATIC_TYPE_NAME(ossimCcfTileSource) == typeName)
-   {
-      return new ossimCcfTileSource();
-   }
-   if(STATIC_TYPE_NAME(ossimCibCadrgTileSource) == typeName)
-   {
-      return new ossimCibCadrgTileSource();
-   }
-   if(STATIC_TYPE_NAME(ossimRpfCacheTileSource) == typeName)
-   {
-     return new ossimRpfCacheTileSource();
-   }
-   if(STATIC_TYPE_NAME(ossimImageCacheTileSource) == typeName)
-   {
-      return new ossimImageCacheTileSource();
-   }
-   if(STATIC_TYPE_NAME(ossimDoqqTileSource) == typeName)
-   {
-      return new ossimDoqqTileSource();
-   }
-   if(STATIC_TYPE_NAME(ossimDtedTileSource) == typeName)
-   {
-      return new ossimDtedTileSource();
-   }
-   if(STATIC_TYPE_NAME(ossimEnviTileSource) == typeName)
-   {
-      return new ossimEnviTileSource();
-   }
-   if(STATIC_TYPE_NAME(ossimJpegTileSource) == typeName)
-   {
-      return new ossimJpegTileSource();
-   }
-   if(STATIC_TYPE_NAME(ossimNitfTileSource) == typeName)
-   {
-      return new ossimNitfTileSource();
-   }
-   if(STATIC_TYPE_NAME(ossimTiffTileSource) == typeName)
-   {
-      return new ossimTiffTileSource();
-   }
-   if(STATIC_TYPE_NAME(ossimUsgsDemTileSource) == typeName)
-   {
-      return new ossimUsgsDemTileSource();
-   }
-   if(STATIC_TYPE_NAME(ossimLandsatTileSource) == typeName)
-   {
-      return new ossimLandsatTileSource();
-   }
-   if(STATIC_TYPE_NAME(ossimERSTileSource) == typeName)
-   {
-      return new ossimERSTileSource();
-   }
-   if(STATIC_TYPE_NAME(ossimSrtmTileSource) == typeName)
-   {
-      return new ossimSrtmTileSource();
-   }
-   if(STATIC_TYPE_NAME(ossimGeneralRasterTileSource) == typeName)
-   {
-      return new ossimGeneralRasterTileSource();
-   }
-   if(STATIC_TYPE_NAME(ossimQbTileFilesHandler) == typeName)
-   {
-      return new ossimQbTileFilesHandler();
-   }
-   if(STATIC_TYPE_NAME(ossimBitMaskTileSource) == typeName)
-   {
-      return new ossimBitMaskTileSource();
-   }
-   if(STATIC_TYPE_NAME(ossimBandSeparateHandler) == typeName)
-   {
-      return new ossimBandSeparateHandler();
-   }
-   if(STATIC_TYPE_NAME(ossimImageHandlerMtAdaptor) == typeName)
-   {
-      return new ossimImageHandlerMtAdaptor();
-   }
-   
-   return (ossimObject*)0;
-}
-
-void ossimImageHandlerFactory::getSupportedExtensions(ossimImageHandlerFactoryBase::UniqueStringList& extensionList)const
-{
-   extensionList.push_back("img");
-   extensionList.push_back("ccf"); 
-   extensionList.push_back("toc");
-   extensionList.push_back("tif");
-   extensionList.push_back("tiff");
-   extensionList.push_back("doq");
-   extensionList.push_back("doqq");
-   extensionList.push_back("dt0");
-   extensionList.push_back("dt1");
-   extensionList.push_back("dt2");
-   extensionList.push_back("dt3");
-   extensionList.push_back("jpg");
-   extensionList.push_back("jpeg");
-   extensionList.push_back("dem");
-   extensionList.push_back("fst");
-   extensionList.push_back("hdr");
-   extensionList.push_back("ras");
-   extensionList.push_back("hgt");
-   extensionList.push_back("nsf");
-   extensionList.push_back("nitf");
-   extensionList.push_back("ntf");
-   extensionList.push_back("til");
-   extensionList.push_back("mask");
-   extensionList.push_back("txt");
-}
-
-void ossimImageHandlerFactory::getImageHandlersBySuffix(ossimImageHandlerFactoryBase::ImageHandlerList& result, const ossimString& ext)const
-{
-   static const char* M = "ossimImageHandlerFactory::getImageHandlersBySuffix() -- ";
-   // OVR can be combined with "tif" once we get rid of ossimQuickbirdTiffTileSource
-   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Trying OVR...\n";
-   ossimString testExt = ext.downcase();
-   if (testExt == "ovr")
-   {
-      result.push_back(new ossimTiffTileSource);
-      return;
-   }
-   
-   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing TIF or TIFF...\n";
-   if ( (testExt == "tif") || (testExt == "tiff") )
-   {
-      // this must be checked first before the TIFF handler
-      result.push_back(new ossimQuickbirdTiffTileSource);
-      result.push_back(new ossimTiffTileSource);
-      return;
-   }
-   
-   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing NTF or NITF...\n";
-   if ( (testExt == "ntf") || (testExt == "nitf") )
-   {
-      // this must be checked first before the NITF raw handler
-      result.push_back(new ossimQuickbirdNitfTileSource);
-      result.push_back(new ossimNitfTileSource);
-      return;
-   }
-   
-   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing RPF...\n";
-   if ( (testExt == "rpf"))
-   {
-      result.push_back(new ossimRpfCacheTileSource);
-      result.push_back(new ossimImageCacheTileSource);
-      return;
-   }
-   
-   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing TOC...\n";
-   if ( testExt == "toc")
-   {
-      result.push_back(new ossimCibCadrgTileSource);
-      return;
-   }
-   
-   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing JPG or JPEG...\n";
-   if ( (testExt == "jpg") || (testExt == "jpeg") )
-   {
-      result.push_back(new ossimJpegTileSource);
-      return;
-   }
-   
-   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing DOQ or DOQQ...\n";
-   if ( (testExt == "doq") || (testExt == "doqq") )
-   {
-      result.push_back(new ossimDoqqTileSource);
-      return;
-   }
-   
-   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing DTn...\n";
-   ossimString regExpStr = "dt[0-9]";
-   ossimRegExp regExp(regExpStr);
-   if(regExp.find(testExt))
-   {
-      result.push_back(new ossimDtedTileSource);
-      return;
-   }
-   
-   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing HGT...\n";
-   if (testExt == "hgt")
-   {
-      result.push_back(new ossimSrtmTileSource);
-      return;
-   }  
-   
-   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing HRI,HSI...\n";
-   if ( (testExt == "hri") || (testExt == "hsi") )
-   {
-      result.push_back(new ossimEnviTileSource);
-      return;
-   }  
-   
-   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing DEM...\n";
-   if (testExt == "dem")
-   {
-      result.push_back(new ossimUsgsDemTileSource);
-      return;
-   }
-   
-   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing FST...\n";
-   if (testExt == "fst")
-   {
-      result.push_back(new ossimLandsatTileSource);
-      return;
-   }
-   
-   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing RAS or RAW or General Raster...\n";
-   if ( (testExt == "ras") || (testExt == "raw") || (testExt == "bil"))
-   {
-      result.push_back(new ossimGeneralRasterTileSource);
-      return;
-   }
-   
-   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing IMG...\n";
-   if (testExt == "img")
-   {
-      result.push_back(new ossimAdrgTileSource);
-      return;
-   }
-   
-   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing CCF...\n";
-   if (testExt == "ccf")
-   {
-      result.push_back(new ossimCcfTileSource);
-      return;
-   }
-   
-   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing TIL...\n";
-   if (testExt == "til")
-   {
-      result.push_back(new ossimQbTileFilesHandler);
-      return;
-   }
-
-   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing MASK...\n";
-   if (testExt == "mask")
-   {
-      result.push_back(new ossimBitMaskTileSource);
-      return;
-   }
-   
-   if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)<<M<<"Testing TXT...\n";
-   if (testExt == "txt")
-   {
-      result.push_back(new ossimBandSeparateHandler);
-      return;
-   }
-}
-
-void ossimImageHandlerFactory::getImageHandlersByMimeType(ossimImageHandlerFactoryBase::ImageHandlerList& result, const ossimString& mimeType)const
-{
-   ossimString test(mimeType.begin(), mimeType.begin()+6);
-   if(test == "image/")
-   {
-      ossimString mimeTypeTest(mimeType.begin() + 6, mimeType.end());
-      getImageHandlersBySuffix(result, mimeTypeTest);
-      if(mimeTypeTest == "dted")
-      {
-         result.push_back(new ossimDtedTileSource);
-      }
-   }
-}
-
-ossimObject* ossimImageHandlerFactory::createObject(const ossimKeywordlist& kwl,
-                                                    const char* prefix)const
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimImageHandlerFactory::createObject(kwl, prefix) DEBUG:"
-         << " entering ..." << std::endl;
-   }
-   ossimObject* result = (ossimObject*)0;
-   const char* type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
-
-   if(type)
-   {
-      if (ossimString(type).trim() == STATIC_TYPE_NAME(ossimImageHandler))
-      {
-         const char* lookup = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
-
-         if (lookup)
-         {
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG) << "BEBUG: filename " << lookup << std::endl;
-            }
-            // Call the open that takes a filename...
-            result = this->open(kwl, prefix);//ossimFilename(lookup));
-         }
-      }
-      else
-      {
-         result = createObject(ossimString(type));
-         if(result)
-         {
-            result->loadState(kwl, prefix);
-         }
-      }
-   }
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimImageHandlerFactory::createObject(kwl, prefix) DEBUG: returning result ..." << std::endl;
-   }
-   return result;
-}
-
-void ossimImageHandlerFactory::getTypeNameList(std::vector<ossimString>& typeList)const
-{
-   typeList.push_back(STATIC_TYPE_NAME(ossimAdrgTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimCcfTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimCibCadrgTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimEnviTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimRpfCacheTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimImageCacheTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimDoqqTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimDtedTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimJpegTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimNitfTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimTiffTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimUsgsDemTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimLandsatTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimERSTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimSrtmTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimGeneralRasterTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimQuickbirdNitfTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimQuickbirdTiffTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimQbTileFilesHandler));
-   typeList.push_back(STATIC_TYPE_NAME(ossimBitMaskTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimImageHandlerMtAdaptor));
-}
diff --git a/src/ossim/imaging/ossimImageHandlerFactoryBase.cpp b/src/ossim/imaging/ossimImageHandlerFactoryBase.cpp
deleted file mode 100644
index fb20788..0000000
--- a/src/ossim/imaging/ossimImageHandlerFactoryBase.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author:  Garrett Potts (gpotts at imagelinks.com)
-//
-//*******************************************************************
-//  $Id: ossimImageHandlerFactoryBase.cpp 22228 2013-04-12 14:11:45Z dburken $
-#include <ossim/imaging/ossimImageHandlerFactoryBase.h>
-
-RTTI_DEF1(ossimImageHandlerFactoryBase, "ossimImageHandlerFactoryBase", ossimObjectFactory);
-
-void ossimImageHandlerFactoryBase::getImageHandlersBySuffix(ImageHandlerList& /*result*/,
-                                                            const ossimString& /*ext*/)const
-{
-}
-
-void ossimImageHandlerFactoryBase::getImageHandlersByMimeType(ImageHandlerList& /*result*/,
-                                                              const ossimString& /*mimeType*/)const
-{
-}
-
-ossimRefPtr<ossimImageHandler> ossimImageHandlerFactoryBase::openOverview(
-   const ossimFilename& file ) const
-{
-   return ossimRefPtr<ossimImageHandler>(0);
-}
diff --git a/src/ossim/imaging/ossimImageHandlerRegistry.cpp b/src/ossim/imaging/ossimImageHandlerRegistry.cpp
deleted file mode 100644
index c1a15a8..0000000
--- a/src/ossim/imaging/ossimImageHandlerRegistry.cpp
+++ /dev/null
@@ -1,266 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-// 
-// Author:  Garrett Potts
-//
-// Description:
-//
-// Contains class definition for ImageHandlerRegistry.
-//
-//*******************************************************************
-//  $Id: ossimImageHandlerRegistry.cpp 22228 2013-04-12 14:11:45Z dburken $
-
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimObjectFactoryRegistry.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageHandlerFactory.h>
-#include <ossim/imaging/ossimImageHandlerFactoryBase.h>
-#include <algorithm>
-using namespace std;
-
-RTTI_DEF1(ossimImageHandlerRegistry, "ossimImageHandlerRegistry", ossimObjectFactory);
-
-//ossimImageHandlerRegistry* ossimImageHandlerRegistry::theInstance = 0;
-
-ossimImageHandlerRegistry::ossimImageHandlerRegistry()
-{
-   ossimObjectFactoryRegistry::instance()->registerFactory(this);
-   registerFactory(ossimImageHandlerFactory::instance());
-}
-
-ossimImageHandlerRegistry* ossimImageHandlerRegistry::instance()
-{
-   static ossimImageHandlerRegistry sharedInstance;
-   
-   return &sharedInstance;
-}
-
-ossimImageHandlerRegistry::~ossimImageHandlerRegistry()
-{
-   unregisterAllFactories();
-}
-
-
-ossimObject* ossimImageHandlerRegistry::createObject(const ossimKeywordlist& kwl,
-                                                     const char* prefix)const
-{
-   ossimObject* result = createObjectFromRegistry(kwl, prefix);
-   if(!result)
-   {
-      result = open(kwl, prefix);
-   }
-   return result;
-}
-
-ossimRefPtr<ossimImageHandler> ossimImageHandlerRegistry::openBySuffix(const ossimFilename& file,
-                                                                       bool openOverview)const
-{
-   std::vector<ossimRefPtr<ossimImageHandler> > handlers;
-   
-   getImageHandlersBySuffix(handlers, file.ext());
-   ossim_uint32 idx = 0;
-   ossim_uint32 size = (ossim_uint32) handlers.size();
-   
-   for(idx = 0; idx < size; ++idx)
-   {
-      handlers[idx]->setOpenOverviewFlag(openOverview);
-      if(handlers[idx]->open(file))
-      {
-         return handlers[idx];
-      }
-   }
-   
-   return ossimRefPtr<ossimImageHandler>(0);
-}
-
-void ossimImageHandlerRegistry::getImageHandlersBySuffix(ossimImageHandlerFactoryBase::ImageHandlerList& result,
-                                                         const ossimString& ext)const
-{
-   vector<ossimImageHandlerFactoryBase*>::const_iterator iter = m_factoryList.begin();
-   ossimImageHandlerFactoryBase::ImageHandlerList temp;
-   while(iter != m_factoryList.end())
-   {
-      temp.clear();
-      (*iter)->getImageHandlersBySuffix(temp, ext);
-      
-      if(!temp.empty())
-      {
-         
-         // now append to the end of the typeList.
-         result.insert(result.end(),
-                       temp.begin(),
-                       temp.end());
-      }
-      ++iter;
-   }
-}
-
-void ossimImageHandlerRegistry::getImageHandlersByMimeType(
-   ossimImageHandlerFactoryBase::ImageHandlerList& result, const ossimString& mimeType)const
-{
-   vector<ossimImageHandlerFactoryBase*>::const_iterator iter = m_factoryList.begin();
-   ossimImageHandlerFactoryBase::ImageHandlerList temp;
-   while(iter != m_factoryList.end())
-   {
-      temp.clear();
-      (*iter)->getImageHandlersByMimeType(temp, mimeType);
-      
-      if(!temp.empty())
-      {
-         
-         // now append to the end of the typeList.
-         result.insert(result.end(),
-                       temp.begin(),
-                       temp.end());
-      }
-      ++iter;
-   }
-}
-
-void ossimImageHandlerRegistry::getTypeNameList( std::vector<ossimString>& typeList ) const
-{
-   getAllTypeNamesFromRegistry(typeList);
-}
-
-void ossimImageHandlerRegistry::getSupportedExtensions(
-   ossimImageHandlerFactoryBase::UniqueStringList& extensionList)const
-{
-   vector<ossimString> result;
-   vector<ossimImageHandlerFactoryBase*>::const_iterator iter = m_factoryList.begin();
-
-   while(iter != m_factoryList.end())
-   {
-      (*iter)->getSupportedExtensions(extensionList);
-
-      ++iter;
-   }
-   
-}
-
-ossimImageHandler* ossimImageHandlerRegistry::open(const ossimFilename& fileName,
-                                                   bool trySuffixFirst,
-                                                   bool openOverview)const
-{
-   if(trySuffixFirst)
-   {
-      ossimRefPtr<ossimImageHandler> h = openBySuffix(fileName, openOverview);
-      if(h.valid())
-      {
-         return h.release();
-      }
-   }
-   
-   // now try magic number opens
-   //
-   ossimImageHandler*                   result = NULL;
-   vector<ossimImageHandlerFactoryBase*>::const_iterator factory;
-
-   factory = m_factoryList.begin();
-   while((factory != m_factoryList.end()) && !result)
-   {
-      result = (*factory)->open(fileName, openOverview);
-      ++factory;
-   }
-   
-   return result;
-}
-
-ossimImageHandler* ossimImageHandlerRegistry::open(const ossimKeywordlist& kwl,
-                                                   const char* prefix)const
-{
-   ossimImageHandler*                   result = NULL;
-   vector<ossimImageHandlerFactoryBase*>::const_iterator factory;
-   
-   factory = m_factoryList.begin();
-   while((factory != m_factoryList.end()) && !result)
-   {
-      result = (*factory)->open(kwl, prefix);
-      ++factory;
-   }
-   
-   return result;
-}
-
-ossimRefPtr<ossimImageHandler> ossimImageHandlerRegistry::openOverview(
-   const ossimFilename& file ) const
-{
-   ossimRefPtr<ossimImageHandler> result = 0;
-   vector<ossimImageHandlerFactoryBase*>::const_iterator factory = m_factoryList.begin();
-   while( factory != m_factoryList.end() )
-   {
-      result = (*factory)->openOverview( file );
-      if ( result.valid() )
-      {
-         break;
-      }
-      ++factory;
-   }  
-   return result;
-}
-
-ossimObject* ossimImageHandlerRegistry::createObject(const ossimString& typeName) const
-{
-   return createObjectFromRegistry(typeName);
-}
-
-std::ostream& ossimImageHandlerRegistry::printReaderProps(std::ostream& out) const
-{
-   // Loop through factories:
-   vector<ossimImageHandlerFactoryBase*>::const_iterator factory = m_factoryList.begin();
-   while( factory != m_factoryList.end() )
-   {
-      out << "factory: " << (*factory)->getClassName() << "\n";
-      
-      // Loop through factory image handlers:
-      std::vector<ossimString> readerList;
-      (*factory)->getTypeNameList(readerList);
-
-      std::vector<ossimString>::const_iterator i = readerList.begin();
-      while ( i != readerList.end() )
-      {
-         ossimRefPtr<ossimImageHandler> ih =
-            dynamic_cast<ossimImageHandler*>( (*factory)->createObject( (*i) ) );
-         if ( ih.valid() )
-         {
-            std::vector<ossimString> propertyList;
-            ih->getPropertyNames(propertyList);
-            out << "reader: " << ih->getClassName() << "\n";
-            
-            if ( propertyList.size() )
-            {
-               // Loop through image handler properties:
-               out << "properties:\n";
-               std::vector<ossimString>::const_iterator p = propertyList.begin();
-               while ( p != propertyList.end() )
-               {
-                  out << (*p) << "\n";
-                  ++p;
-               }
-            }
-         }
-         ++i;
-      }
-      ++factory;
-   }
-   out << std::endl;
-   return out;
-}
-
-ossimImageHandlerRegistry::ossimImageHandlerRegistry(const ossimImageHandlerRegistry& /* rhs */)
-   :  ossimObjectFactory()
-{}
-
-const ossimImageHandlerRegistry&
-ossimImageHandlerRegistry::operator=(const ossimImageHandlerRegistry& rhs)
-{ return rhs; }
-
-extern "C"
-{
-  void* ossimImageHandlerRegistryGetInstance()
-  {
-    return ossimImageHandlerRegistry::instance();
-  }
-}
diff --git a/src/ossim/imaging/ossimImageHistogramSource.cpp b/src/ossim/imaging/ossimImageHistogramSource.cpp
deleted file mode 100644
index 6bd879d..0000000
--- a/src/ossim/imaging/ossimImageHistogramSource.cpp
+++ /dev/null
@@ -1,518 +0,0 @@
-//*******************************************************************
-//
-// License:  See LICENSE.txt file in the top level directory.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimImageHistogramSource.cpp 21631 2012-09-06 18:10:55Z dburken $
-
-#include <ossim/imaging/ossimImageHistogramSource.h>
-#include <ossim/base/ossimMultiResLevelHistogram.h>
-#include <ossim/base/ossimMultiBandHistogram.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageSourceSequencer.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimTrace.h>
-
-static ossimTrace traceDebug("ossimImageHistogramSource:debug");
-
-  RTTI_DEF3(ossimImageHistogramSource, "ossimImageHistogramSource", ossimHistogramSource, ossimConnectableObjectListener, ossimProcessInterface);
-
-ossimImageHistogramSource::ossimImageHistogramSource(ossimObject* owner)
-   :ossimHistogramSource(owner,
-                         1,     // one input
-                         0,     // no outputs
-                         true,  // input list is fixed
-                         false),// output can still grow though
-    theHistogramRecomputeFlag(true),
-    theMaxNumberOfResLevels(1),
-    theComputationMode(OSSIM_HISTO_MODE_NORMAL),
-    theNumberOfTilesToUseInFastMode(100)
-{
-   theAreaOfInterest.makeNan();
-   addListener((ossimConnectableObjectListener*)this);
-	
-   theMinValueOverride     = ossim::nan();
-   theMaxValueOverride     = ossim::nan();
-   theNumberOfBinsOverride = -1;
-}
-
-ossimImageHistogramSource::~ossimImageHistogramSource()
-{
-   removeListener((ossimConnectableObjectListener*)this);
-}
-
-ossimObject* ossimImageHistogramSource::getObject()
-{
-   return this;
-}
-
-const ossimObject* ossimImageHistogramSource::getObject()const
-{
-   return this;
-}
-
-void ossimImageHistogramSource::setAreaOfInterest(const ossimIrect& rect)
-{
-   if(rect != theAreaOfInterest)
-   {
-      theHistogramRecomputeFlag = true;
-   }
-   theAreaOfInterest = rect;
-}
-
-ossimIrect ossimImageHistogramSource::getAreaOfInterest()const
-{
-   return theAreaOfInterest;
-}
-
-void ossimImageHistogramSource::getAreaOfInterest(ossimIrect& rect)const
-{
-   rect = theAreaOfInterest;
-}
-
-ossim_uint32 ossimImageHistogramSource::getMaxNumberOfRLevels()const
-{
-   return theMaxNumberOfResLevels;
-}
-
-void ossimImageHistogramSource::setMaxNumberOfRLevels(ossim_uint32 number)
-{
-   if(number != theMaxNumberOfResLevels)
-   {
-      theHistogramRecomputeFlag = true;
-   }
-   theMaxNumberOfResLevels = number;
-}
-
-ossimRefPtr<ossimMultiResLevelHistogram> ossimImageHistogramSource::getHistogram(const ossimIrect& rect)
-{
-   if((theAreaOfInterest != rect)||
-      (theAreaOfInterest.hasNans()))
-   {
-      theAreaOfInterest = rect;
-      theHistogramRecomputeFlag = true;
-   }
-	
-   return getHistogram();
-}
-
-bool ossimImageHistogramSource::execute()
-{
-   if(!isSourceEnabled())
-   {
-      return theHistogram.valid();
-   }
-   
-   setProcessStatus(ossimProcessInterface::PROCESS_STATUS_EXECUTING);
-   if(theHistogramRecomputeFlag)
-   {
-      if(theAreaOfInterest.hasNans())
-      {
-         ossimImageSource* interface = PTR_CAST(ossimImageSource, getInput(0));
-         if(interface)
-         {
-            theAreaOfInterest = interface->getBoundingRect();
-         }
-      }
-      switch(theComputationMode)
-      {
-         case OSSIM_HISTO_MODE_FAST:
-         {
-            computeFastModeHistogram();
-            break;
-         }
-         case OSSIM_HISTO_MODE_NORMAL:
-         default:
-         {
-            computeNormalModeHistogram();
-            break;
-         }
-      }
-   }
-   
-   if (needsAborting())
-   {
-      setProcessStatus(ossimProcessInterface::PROCESS_STATUS_ABORTED);
-      theHistogramRecomputeFlag = false;
-   }
-   else
-   {
-      setProcessStatus(ossimProcessInterface::PROCESS_STATUS_NOT_EXECUTING);
-   }
-   
-   return true;
-}
-
-bool ossimImageHistogramSource::canConnectMyInputTo(ossim_int32 myInputIndex,
-                                                    const ossimConnectableObject* object)const
-{
-   return ((myInputIndex==0)&&PTR_CAST(ossimImageSource,
-                                       object));
-}
-
-void ossimImageHistogramSource::setNumberOfBinsOverride(ossim_int32 numberOfBinsOverride)
-{
-   theNumberOfBinsOverride = numberOfBinsOverride;
-}
-
-void ossimImageHistogramSource::setMinValueOverride(ossim_float32 minValueOverride)
-{
-   theMinValueOverride = minValueOverride;
-}
-void ossimImageHistogramSource::setMaxValueOverride(ossim_float32 maxValueOverride)
-{
-   theMaxValueOverride = maxValueOverride;
-}
-
-ossimHistogramMode ossimImageHistogramSource::getComputationMode()const
-{
-   return theComputationMode;
-}
-
-void ossimImageHistogramSource::setComputationMode(ossimHistogramMode mode)
-{
-   theComputationMode = mode;
-}
-
-void ossimImageHistogramSource::propertyEvent(ossimPropertyEvent& /* event */)
-{
-   theHistogramRecomputeFlag = true;
-}
-
-void ossimImageHistogramSource::connectInputEvent(ossimConnectionEvent& /* event */)
-{
-   theHistogramRecomputeFlag = true;
-}
-
-ossimRefPtr<ossimMultiResLevelHistogram> ossimImageHistogramSource::getHistogram()
-{
-   execute();
-   return theHistogram;
-}
-
-void ossimImageHistogramSource::getBinInformation(ossim_uint32& numberOfBins,
-                                                  ossim_float64& minValue,
-                                                  ossim_float64& maxValue)const
-{
-   numberOfBins = 0;
-   minValue     = 0;
-   maxValue     = 0;
-	
-   ossimImageSource* input = PTR_CAST(ossimImageSource, getInput(0));
-   if(input)
-   {
-      switch(input->getOutputScalarType())
-      {
-         case OSSIM_UINT8:
-         {
-            minValue     = 0;
-            maxValue     = OSSIM_DEFAULT_MAX_PIX_UCHAR;
-            numberOfBins = 256;
-				
-            break;
-         }
-         case OSSIM_USHORT11:
-         {
-            minValue     = 0;
-            maxValue     = OSSIM_DEFAULT_MAX_PIX_UINT11;
-            numberOfBins = OSSIM_DEFAULT_MAX_PIX_UINT11 + 1;
-				
-            break;
-         }
-         case OSSIM_UINT16:
-         case OSSIM_UINT32:
-         {
-            minValue     = 0;
-            maxValue     = OSSIM_DEFAULT_MAX_PIX_UINT16;
-            numberOfBins = OSSIM_DEFAULT_MAX_PIX_UINT16 + 1;
-				
-            break;
-         }
-         case OSSIM_SINT16:
-         case OSSIM_SINT32:
-         case OSSIM_FLOAT32:
-         case OSSIM_FLOAT64:
-         {
-            minValue     = OSSIM_DEFAULT_MIN_PIX_SINT16;
-            maxValue     = OSSIM_DEFAULT_MAX_PIX_SINT16;
-            numberOfBins = (OSSIM_DEFAULT_MAX_PIX_SINT16-OSSIM_DEFAULT_MIN_PIX_SINT16) + 1;
-				
-            break;
-         }
-         case OSSIM_NORMALIZED_FLOAT:
-         case OSSIM_NORMALIZED_DOUBLE:
-         {
-            minValue     = 0;
-            maxValue     = 1.0;
-            numberOfBins = OSSIM_DEFAULT_MAX_PIX_UINT16+1;
-            break;
-         }
-         default:
-         {
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << "Unsupported scalar type in ossimImageHistogramSource::computeHistogram()" << endl;
-            }
-            return;
-         }
-      }
-   }
-	
-   if(ossim::isnan(theMinValueOverride) == false)
-   {
-      minValue = (float)theMinValueOverride;
-   }
-   if(ossim::isnan(theMaxValueOverride) == false)
-   {
-      maxValue = (float)theMaxValueOverride;
-   }
-   if(theNumberOfBinsOverride > 0)
-   {
-      numberOfBins = theNumberOfBinsOverride;
-   }
-}
-
-void ossimImageHistogramSource::computeNormalModeHistogram()
-{
-   // ref ptr, not a leak.
-   theHistogram = new ossimMultiResLevelHistogram;
-	
-   ossimImageSource* input = PTR_CAST(ossimImageSource, getInput(0));
-   if(!input)
-   {
-      setPercentComplete(100.0);
-      return;
-   }
-   
-   if(getInput(0))
-   {
-      // sum up all tiles needing processing.  We will use the sequncer.
-      //      ossim_uint32 numberOfResLevels = input->getNumberOfDecimationLevels();
-      ossim_uint32 index = 0;
-      double tileCount   = 0.0;
-      double totalTiles  = 0.0;
-      ossim_uint32 numberOfBands = input->getNumberOfOutputBands();
-      ossim_uint32 numberOfBins  = 0;
-      ossim_float64 minValue     = 0;
-      ossim_float64 maxValue     = 0;
-      getBinInformation(numberOfBins, minValue, maxValue);
-		
-      ossimRefPtr<ossimImageSourceSequencer> sequencer = new ossimImageSourceSequencer;
-      sequencer->connectMyInputTo(0, getInput(0));
-      sequencer->initialize();
-      
-      vector<ossimDpt> decimationFactors;
-      input->getDecimationFactors(decimationFactors);
-      if ( !decimationFactors.size() )
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimImageHistogramSource::computeNormalModeHistogram WARNING:"
-            << "\nNo decimation factors from input.  returning..." << std::endl;
-         return;
-      }
-      
-      ossim_uint32 resLevelsToCompute = ossim::min((ossim_uint32)theMaxNumberOfResLevels,
-                                                   (ossim_uint32)decimationFactors.size());
-         
-      if( decimationFactors.size() < theMaxNumberOfResLevels)
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << "Number Decimations is smaller than the request number of r-levels defaulting to the smallest of the 2 numbers" << endl;
-      }
-
-      theHistogram->create(resLevelsToCompute);
-      for(index = 0; index < resLevelsToCompute; ++index)
-      {
-         sequencer->setAreaOfInterest(theAreaOfInterest*decimationFactors[index]);
-         
-         totalTiles += sequencer->getNumberOfTiles();
-      }
-      
-      
-      if(numberOfBins > 0)
-      {
-         setPercentComplete(0.0);
-         for(index = 0;
-             (index < resLevelsToCompute);
-             ++index)
-         {
-            // Check for abort request.
-            if (needsAborting())
-            {
-               setPercentComplete(100);
-               break;
-            }
-            
-            //sequencer->setAreaOfInterest(input->getBoundingRect(index));
-            sequencer->setAreaOfInterest(theAreaOfInterest*decimationFactors[index]);
-            
-            sequencer->setToStartOfSequence();
-            theHistogram->getMultiBandHistogram(index)->create(numberOfBands,
-                                                               numberOfBins,
-                                                               minValue,
-                                                               maxValue);
-            
-            ossimRefPtr<ossimImageData> data = sequencer->getNextTile(index);
-            ++tileCount;
-            setPercentComplete((100.0*(tileCount/totalTiles)));
-            
-            ossim_uint32 resLevelTotalTiles = sequencer->getNumberOfTiles();
-            for (ossim_uint32 resLevelTileCount = 0;
-                 resLevelTileCount < resLevelTotalTiles;
-                 ++resLevelTileCount)
-            {
-               if(data.valid()&&data->getBuf()&&(data->getDataObjectStatus() != OSSIM_EMPTY))
-               {
-                  data->populateHistogram(theHistogram->getMultiBandHistogram(index));
-               }
-               
-               // Check for abort request.
-               if (needsAborting())
-               {
-                  setPercentComplete(100);
-                  break;
-               }
-               
-               
-               data = sequencer->getNextTile(index);
-               ++tileCount;
-               setPercentComplete((100.0*(tileCount/totalTiles)));
-            }
-         }
-      }
-      sequencer->disconnect();
-      sequencer = 0;
-   }
-}
-
-void ossimImageHistogramSource::computeFastModeHistogram()
-{
-   // We will only compute a full res histogram in fast mode.  and will only do a MAX of 100 tiles.
-   //
-   ossim_uint32 resLevelsToCompute = 1;
-	
-   // ref ptr, not a leak.
-   theHistogram = new ossimMultiResLevelHistogram;
-   theHistogram->create(resLevelsToCompute);
-   ossimImageSource* input = PTR_CAST(ossimImageSource, getInput(0));
-   if(!input)
-   {
-      setPercentComplete(100.0);
-      return;
-   }
-   // sum up all tiles needing processing.  We will use the sequencer.
-   //      ossim_uint32 numberOfResLevels = input->getNumberOfDecimationLevels();
-   double tileCount   = 0.0;
-   double totalTiles  = 0.0;
-   ossim_uint32 numberOfBands = input->getNumberOfOutputBands();
-   ossim_uint32 numberOfBins  = 0;
-   ossim_float64 minValue     = 0;
-   ossim_float64 maxValue     = 0;
-   getBinInformation(numberOfBins, minValue, maxValue);
-	
-   ossimIrect tileBoundary = theAreaOfInterest;
-   ossimIpt tileSize(ossim::max((ossim_uint32)input->getTileWidth(), (ossim_uint32)64),
-                     ossim::max((ossim_uint32)input->getTileHeight(), (ossim_uint32)64));
-	
-   tileBoundary.stretchToTileBoundary(tileSize);
-   ossim_uint32 tilesWide = (tileBoundary.width()/tileSize.x);
-   ossim_uint32 tilesHigh = (tileBoundary.height()/tileSize.y);
-   totalTiles = tilesWide*tilesHigh;
-   
-   if(totalTiles > theNumberOfTilesToUseInFastMode)
-   {
-      ossim_uint32 testTiles = (ossim_uint32) (std::sqrt((double)theNumberOfTilesToUseInFastMode)+.5);
-      tilesWide = testTiles>tilesWide?tilesWide:testTiles;
-      tilesHigh = testTiles>tilesHigh?tilesHigh:testTiles;
-   }
-   if(numberOfBins > 0)
-   {
-      ossimIpt origin = theAreaOfInterest.ul();
-		
-      ossim_uint32 widthWithExcess  = (ossim_uint32)(((ossim_float64)tileBoundary.width()/(tilesWide*tileSize.x))*tileSize.x);
-      ossim_uint32 heightWithExcess = ((ossim_uint32)((ossim_float64)tileBoundary.height()/(tilesHigh*tileSize.y))*tileSize.y);
-      theHistogram->getMultiBandHistogram(0)->create(numberOfBands,
-                                                     numberOfBins,
-                                                     minValue,
-                                                     maxValue);
-		
-      ossim_uint32 x = 0;
-      ossim_uint32 y = 0;
-      tileCount = 0;
-      totalTiles = tilesWide*tilesHigh;
-      for(y = 0; y < tilesHigh; ++y)
-      {
-         for(x = 0; x < tilesWide; ++x)
-         {
-            ossimIpt ul(origin.x + (x*widthWithExcess),
-                        origin.y + (y*heightWithExcess));
-            ossimIrect tileRect(ul.x, ul.y, ul.x + tileSize.x-1, ul.y + tileSize.y-1);
-            ossimRefPtr<ossimImageData> data = input->getTile(tileRect);
-				
-            if(data.valid()&&data->getBuf()&&(data->getDataObjectStatus() != OSSIM_EMPTY))
-            {
-               data->populateHistogram(theHistogram->getMultiBandHistogram(0));
-            }
-            ++tileCount;
-            setPercentComplete((100.0*(tileCount/totalTiles)));
-         }
-      }
-   }
-}
-
-bool ossimImageHistogramSource::loadState(const ossimKeywordlist& kwl,
-                                          const char* prefix)
-{
-   ossimHistogramSource::loadState(kwl, prefix);  
-   setNumberOfInputs(2);
-   ossimString rect = kwl.find(prefix, "rect");
-
-   if(!rect.empty())
-   {
-      loadState(kwl, prefix);
-   }
-   else 
-   {
-      ossimString newPrefix = ossimString(prefix) + "area_of_interest.";
-      theAreaOfInterest.loadState(kwl, newPrefix);
-   }
-   
-   ossimString mode = kwl.find(prefix, "mode");
-   mode = mode.downcase();
-   if(mode == "normal")
-   {
-      theComputationMode = OSSIM_HISTO_MODE_NORMAL;
-   }
-   else if(mode == "fast")
-   {
-      theComputationMode = OSSIM_HISTO_MODE_FAST;
-   }
-   if(getNumberOfInputs()!=1)
-   {
-      setNumberOfInputs(1);
-   }
-   
-   ossimString numberOfTiles = kwl.find(prefix, "number_of_tiles");
-   if(!numberOfTiles.empty())
-   {
-      theNumberOfTilesToUseInFastMode = numberOfTiles.toUInt32();
-   }
-   theInputListIsFixedFlag = true;
-   theOutputListIsFixedFlag = false;
-	
-   return true;
-}
-
-bool ossimImageHistogramSource::saveState(ossimKeywordlist& kwl,
-                                          const char* prefix)const
-{
-   bool result = ossimHistogramSource::saveState(kwl, prefix);
-   if(result)
-   {
-      ossimString newPrefix = ossimString(prefix) + "area_of_interest.";
-      theAreaOfInterest.saveState(kwl, newPrefix);
-   }
-   return result;
-}
diff --git a/src/ossim/imaging/ossimImageMetaDataWriterFactoryBase.cpp b/src/ossim/imaging/ossimImageMetaDataWriterFactoryBase.cpp
deleted file mode 100644
index cab67cd..0000000
--- a/src/ossim/imaging/ossimImageMetaDataWriterFactoryBase.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-//----------------------------------------------------------------------------
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//----------------------------------------------------------------------------
-// $Id: ossimImageMetaDataWriterFactoryBase.cpp 9094 2006-06-13 19:12:40Z dburken $
-
-#include <ossim/imaging/ossimImageMetaDataWriterFactoryBase.h>
-
-RTTI_DEF1(ossimImageMetaDataWriterFactoryBase,
-          "ossimImageMetaDataWriterFactoryBase",
-          ossimObjectFactory);
-
-ossimImageMetaDataWriterFactoryBase::ossimImageMetaDataWriterFactoryBase()
-{
-}
-
-ossimImageMetaDataWriterFactoryBase::ossimImageMetaDataWriterFactoryBase(
-   const ossimImageMetaDataWriterFactoryBase&)
-{
-}
-
-const ossimImageMetaDataWriterFactoryBase&
-ossimImageMetaDataWriterFactoryBase::operator=(
-   const ossimImageMetaDataWriterFactoryBase&)
-{
-   return *this;
-}
diff --git a/src/ossim/imaging/ossimImageMetaDataWriterRegistry.cpp b/src/ossim/imaging/ossimImageMetaDataWriterRegistry.cpp
deleted file mode 100644
index f064e2a..0000000
--- a/src/ossim/imaging/ossimImageMetaDataWriterRegistry.cpp
+++ /dev/null
@@ -1,171 +0,0 @@
-//----------------------------------------------------------------------------
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//----------------------------------------------------------------------------
-// $Id: ossimImageMetaDataWriterRegistry.cpp 17206 2010-04-25 23:20:40Z dburken $
-
-
-#include <ossim/imaging/ossimImageMetaDataWriterRegistry.h>
-#include <ossim/imaging/ossimImageMetaDataWriterFactory.h>
-#include <ossim/imaging/ossimMetadataFileWriter.h>
-#include <ossim/base/ossimObjectFactoryRegistry.h>
-#include <algorithm>
-
-//ossimImageMetaDataWriterRegistry*
-//ossimImageMetaDataWriterRegistry::theInstance= NULL;
-
-ossimImageMetaDataWriterRegistry::ossimImageMetaDataWriterRegistry()
-{
-   registerFactory(ossimImageMetaDataWriterFactory::instance());
-   ossimObjectFactoryRegistry::instance()->registerFactory(this);
-}
-
-ossimImageMetaDataWriterRegistry::~ossimImageMetaDataWriterRegistry()
-{
-   ossimObjectFactoryRegistry::instance()->unregisterFactory(this);
-}
-
-ossimImageMetaDataWriterRegistry* ossimImageMetaDataWriterRegistry::instance()
-{
-   static ossimImageMetaDataWriterRegistry sharedInstance;
-
-   return &sharedInstance;
-}
-
-void ossimImageMetaDataWriterRegistry::registerFactory(
-   ossimImageMetaDataWriterFactoryBase* factory)
-{
-   if(factory&&!findFactory(factory))
-   {
-      theFactoryList.push_back(factory);
-   }
-}
-
-void ossimImageMetaDataWriterRegistry::unregisterFactory(
-   ossimImageMetaDataWriterFactoryBase* factory)
-{
-   std::vector<ossimImageMetaDataWriterFactoryBase*>::iterator iter =
-      std::find(theFactoryList.begin(),
-                theFactoryList.end(),
-                factory);
-   if(iter != theFactoryList.end())
-   {
-      theFactoryList.erase(iter);
-   }
-}
-
-bool ossimImageMetaDataWriterRegistry::findFactory(
-   ossimImageMetaDataWriterFactoryBase* factory)const
-{
-   return (std::find(theFactoryList.begin(),
-                     theFactoryList.end(),
-                     factory)!=theFactoryList.end());
-}
-
-
-ossimObject* ossimImageMetaDataWriterRegistry::createObject(
-   const ossimString& typeName) const
-{
-   ossimObject* result = NULL;
-   std::vector<ossimImageMetaDataWriterFactoryBase*>::const_iterator factory;
-   
-   factory = theFactoryList.begin();
-   while((factory != theFactoryList.end()) && !result)
-   {
-      result = (*factory)->createObject(typeName);
-      ++factory;
-   }
-   
-   return result;
-}
-
-ossimObject* ossimImageMetaDataWriterRegistry::createObject(
-   const ossimKeywordlist& kwl,
-   const char* prefix) const
-{
-   ossimObject* result = NULL;
-   std::vector<ossimImageMetaDataWriterFactoryBase*>::const_iterator factory;
-
-   factory = theFactoryList.begin();
-   while((factory != theFactoryList.end()) && !result)
-   {
-     result = (*factory)->createObject(kwl, prefix);
-     ++factory;
-   }
-   return result;
-}
-
-ossimRefPtr<ossimMetadataFileWriter>
-ossimImageMetaDataWriterRegistry::createWriter(const ossimString& type) const
-{
-   ossimRefPtr<ossimMetadataFileWriter> result = NULL;
-   
-   std::vector<ossimImageMetaDataWriterFactoryBase*>::const_iterator factory;
-   factory = theFactoryList.begin();
-   while((factory != theFactoryList.end()) && !result)
-   {
-     result = (*factory)->createWriter(type);
-     ++factory;
-   }
-   return result;
-}
-
-void ossimImageMetaDataWriterRegistry::getTypeNameList(
-   std::vector<ossimString>& typeList) const
-{
-   std::vector<ossimString> result;
-   std::vector<ossimImageMetaDataWriterFactoryBase*>::const_iterator iter =
-      theFactoryList.begin();
-
-   while(iter != theFactoryList.end())
-   {
-      result.clear();
-      (*iter)->getTypeNameList(result);
-
-      // now append to the end of the typeList.
-      typeList.insert(typeList.end(),
-                      result.begin(),
-                      result.end());
-      ++iter;
-   }
-}
-
-void ossimImageMetaDataWriterRegistry::getMetadatatypeList(
-   std::vector<ossimString>& metadatatypeList) const
-{
-   //---
-   // Since this is the master registry for all meta data writer factories
-   // we will start with a cleared list.
-   //---
-   metadatatypeList.clear();
-   
-   std::vector<ossimImageMetaDataWriterFactoryBase*>::const_iterator iter =
-      theFactoryList.begin();
-   
-   while(iter != theFactoryList.end())
-   {
-      (*iter)->getMetadatatypeList(metadatatypeList);
-      ++iter;
-   } 
-}
-
-ossimImageMetaDataWriterRegistry::ossimImageMetaDataWriterRegistry(
-   const ossimImageMetaDataWriterRegistry& /* rhs */)
-{
-}
-
-const ossimImageMetaDataWriterRegistry&
-ossimImageMetaDataWriterRegistry::operator=(
-   const ossimImageMetaDataWriterRegistry& /* rhs */)
-{
-   return *this;
-}
-
-extern "C"
-{
-   void* ossimImageMetaDataWriterRegistryGetInstance()
-   {
-      return ossimImageMetaDataWriterRegistry::instance();
-   }
-}
diff --git a/src/ossim/imaging/ossimImageModel.cpp b/src/ossim/imaging/ossimImageModel.cpp
deleted file mode 100644
index 00e01ea..0000000
--- a/src/ossim/imaging/ossimImageModel.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-//-----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Class definition of ossimImageModel.
-//
-//-----------------------------------------------------------------------------
-// $Id$
-
-#include <string>
-
-#include <ossim/imaging/ossimImageModel.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/imaging/ossimImageHandler.h>
-
-RTTI_DEF1(ossimImageModel, "ossimImageModel", ossimObject);
-
-ossimImageModel::ossimImageModel()
-   : ossimObject(),
-     theSubImageOffset(),
-     theDecimationFactors(),
-     theLines(0),
-     theSamples(0),
-     theTargetRrds(0)
-{
-}
-
-ossimImageModel::~ossimImageModel()
-{
-}
-
-void ossimImageModel::initialize(const ossimImageHandler& ih)
-{
-   theSubImageOffset = ossimDpt();
-   theLines          = ih.getNumberOfLines(0);
-   theSamples        = ih.getNumberOfSamples(0);
-   ih.getDecimationFactors(theDecimationFactors);
-}
-
-void ossimImageModel::rnToR0(ossim_uint32 rrds,
-                             const ossimDpt& rnPt,
-                             ossimDpt& r0Pt) const
-{
-   if ( rrds < theDecimationFactors.size() )
-   {
-      r0Pt.x = rnPt.x / theDecimationFactors[rrds].x;
-      r0Pt.y = rnPt.y / theDecimationFactors[rrds].y;
-   }
-   else
-   {
-      std::string e = "ossimImageModel::rnToR0 rrds out of range!";
-      throw ossimException(e);
-   }
-}
-void ossimImageModel::rnToR0(const ossimDpt& rnPt, ossimDpt& r0Pt) const
-{
-   rnToR0(theTargetRrds, rnPt, r0Pt);
-}
-   
-void ossimImageModel::r0ToRn(ossim_uint32 rrds,
-                             const ossimDpt& r0Pt,
-                             ossimDpt& rnPt) const
-{
-   if ( rrds < theDecimationFactors.size() )
-   {
-      rnPt.x = r0Pt.x * theDecimationFactors[rrds].x;
-      rnPt.y = r0Pt.y * theDecimationFactors[rrds].y;
-   }
-   else
-   {
-      std::string e = "ossimImageModel::r0ToRn rrds out of range!";
-      throw ossimException(e);
-   }
-}
-
-void ossimImageModel::r0ToRn(const ossimDpt& r0Pt, ossimDpt& rnPt) const
-{
-   r0ToRn(theTargetRrds, r0Pt, rnPt);
-}
-
-void ossimImageModel::getSubImageOffset(ossim_uint32 rrds,
-                                        ossimDpt& offset) const
-{
-   if ( rrds < theDecimationFactors.size() )
-   {
-      offset.x = theSubImageOffset.x * theDecimationFactors[rrds].x;
-      offset.y = theSubImageOffset.y * theDecimationFactors[rrds].y;
-   }
-   else
-   {
-      std::string e = "ossimImageModel::getSubImageOffset rrds out of range!";
-      throw ossimException(e);
-   } 
-}
-
-void ossimImageModel::getImageRectangle(ossim_uint32 rrds,
-                                        ossimDrect& rect) const
-{
-   if ( rrds < theDecimationFactors.size() )
-   {
-      ossim_float64 lrX = theSamples * theDecimationFactors[rrds].x - 1.0;
-      ossim_float64 lrY = theLines   * theDecimationFactors[rrds].y - 1.0;
-      ossimDrect r(0.0, 0.0, lrX, lrY);
-      rect = r;
-   }
-   else
-   {
-      std::string e = "ossimImageModel::getImageRectangle rrds out of range!";
-      throw ossimException(e);
-   } 
-}
-
-void ossimImageModel::getBoundingRectangle(ossim_uint32 rrds,
-                                           ossimDrect& rect) const
-{
-   if ( rrds < theDecimationFactors.size() )
-   {
-      ossim_float64 urX = theSubImageOffset.x * theDecimationFactors[rrds].x;
-      ossim_float64 urY = theSubImageOffset.y * theDecimationFactors[rrds].y;
-      
-      ossim_float64 lrX = urX + theSamples*theDecimationFactors[rrds].x - 1.0;
-      ossim_float64 lrY = urY + theLines  *theDecimationFactors[rrds].y - 1.0;
-      ossimDrect r(0, 0, lrX, lrY);
-      rect = r;
-   }
-   else
-   {
-      std::string e =
-         "ossimImageModel::getBoundingRectangle rrds out of range!";
-      throw ossimException(e);
-   }  
-}
-ossim_uint32 ossimImageModel::getNumberOfDecimationLevels()const
-{
-   return (ossim_uint32)theDecimationFactors.size();
-}
-
-void ossimImageModel::setTargetRrds(ossim_uint32 rrds)
-{
-   theTargetRrds = rrds;
-}
-
-ossim_uint32 ossimImageModel::getTargetRrds() const
-{
-   return theTargetRrds;
-}
-
-   
-
diff --git a/src/ossim/imaging/ossimImageRenderer.cpp b/src/ossim/imaging/ossimImageRenderer.cpp
deleted file mode 100644
index fbed875..0000000
--- a/src/ossim/imaging/ossimImageRenderer.cpp
+++ /dev/null
@@ -1,1926 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimImageRenderer.cpp 20352 2011-12-12 17:24:52Z dburken $
-
-#include <ossim/imaging/ossimImageRenderer.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimDpt3d.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimProcessProgressEvent.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimConnectableContainerInterface.h>
-#include <ossim/base/ossimViewController.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimNumericProperty.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimDiscrete3x3HatFilter.h>
-#include <ossim/imaging/ossimDiscreteNearestNeighbor.h>
-#include <ossim/imaging/ossimFilterResampler.h>
-#include <ossim/projection/ossimImageViewProjectionTransform.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/projection/ossimImageViewTransformFactory.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimEquDistCylProjection.h>
-#include <iostream>
-using namespace std;
-
-#ifdef OSSIM_ID_ENABLED
-static const char OSSIM_ID[] = "$Id: ossimImageRenderer.cpp 20352 2011-12-12 17:24:52Z dburken $";
-#endif
-
-static ossimTrace traceDebug("ossimImageRenderer:debug");
-
-RTTI_DEF2(ossimImageRenderer, "ossimImageRenderer", ossimImageSourceFilter, ossimViewInterface);
-
-void ossimImageRenderer::ossimRendererSubRectInfo::splitView(ossimImageViewTransform* transform,
-                                                             ossimRendererSubRectInfo& ulRect,
-                                                             ossimRendererSubRectInfo& urRect,
-                                                             ossimRendererSubRectInfo& lrRect,
-                                                             ossimRendererSubRectInfo& llRect)const
-{
-#if 0
-   ossimNotify(ossimNotifyLevel_DEBUG)
-      << "ulRect = " << ulRect
-      << "\nurRect = " << urRect
-      << "\nlrRect = " << lrRect
-      << "\nllRect = " << llRect << endl;
-#endif
-   
-   ossimIrect vrect(m_Vul,
-                    m_Vur,
-                    m_Vlr,
-                    m_Vll);
-   
-   ossimIrect tempUlRect;
-   ossimIrect tempUrRect;
-   ossimIrect tempLrRect;
-   ossimIrect tempLlRect;
-   
-   if((vrect.width() == 1)&&
-      (vrect.height() == 1))
-   {
-      tempUlRect = vrect;
-      tempUrRect = vrect;
-      tempLrRect = vrect;
-      tempLlRect = vrect;
-   }
-   else
-   {
-      ossim_int32 w  = vrect.width();
-      ossim_int32 h  = vrect.height();
-      ossim_int32 w2 = w>>1;
-      ossim_int32 h2 = h>>1;
-      
-      if((w%2) == 0) // if even
-      {
-         if((h%2) == 0) // if even
-         {
-            tempUlRect = ossimIrect(m_Vul.x,
-                                    m_Vul.y,
-                                    m_Vul.x + (w2 - 1),
-                                    m_Vul.y + (h2 - 1));
-            
-            tempUrRect = ossimIrect(m_Vul.x + w2,
-                                    m_Vul.y,
-                                    m_Vul.x + w2 + (w2 - 1),
-                                    m_Vul.y + (h2 - 1));
-            
-            tempLrRect = ossimIrect(m_Vul.x + w2,
-                                    m_Vul.y + h2,
-                                    m_Vul.x + w2 + (w2 - 1),
-                                    m_Vul.y + h2 + (h2 - 1));
-            
-            tempLlRect = ossimIrect(m_Vul.x,
-                                    m_Vul.y + h2,
-                                    m_Vul.x + (w2 - 1),
-                                    m_Vul.y + h2 + (h2 - 1));
-         }
-         else // odd
-         {
-            tempUlRect = ossimIrect(m_Vul.x,
-                                    m_Vul.y,
-                                    m_Vul.x + (w2 - 1),
-                                    m_Vul.y + (h2));
-            
-            tempUrRect = ossimIrect(m_Vul.x + w2,
-                                    m_Vul.y,
-                                    m_Vul.x + w2 + (w2 - 1),
-                                    m_Vul.y + (h2));
-            
-            tempLrRect = ossimIrect(m_Vul.x + w2,
-                                    m_Vul.y + h2 + 1,
-                                    m_Vul.x + w2 + (w2 - 1),
-                                    m_Vul.y + h2 + (h2));
-            
-            tempLlRect = ossimIrect(m_Vul.x,
-                                    m_Vul.y + h2 + 1,
-                                    m_Vul.x + (w2 - 1),
-                                    m_Vul.y + h2 + (h2));
-         }
-      }
-      else // odd
-      {
-         if((h%2) == 0) // if even
-         {
-            tempUlRect = ossimIrect(m_Vul.x,
-                                    m_Vul.y,
-                                    m_Vul.x + (w2),
-                                    m_Vul.y + (h2 - 1));
-            
-            tempUrRect = ossimIrect(m_Vul.x + w2 + 1,
-                                    m_Vul.y,
-                                    m_Vul.x + w2 + (w2),
-                                    m_Vul.y + (h2 - 1));
-            
-            tempLrRect = ossimIrect(m_Vul.x + w2+1,
-                                    m_Vul.y + h2,
-                                    m_Vul.x + w2 + (w2),
-                                    m_Vul.y + h2 + (h2 - 1));
-            
-            tempLlRect = ossimIrect(m_Vul.x,
-                                    m_Vul.y + h2,
-                                    m_Vul.x + (w2),
-                                    m_Vul.y + h2 + (h2 - 1));
-            
-         }
-         else // odd
-         {
-            tempUlRect = ossimIrect(m_Vul.x,
-                                    m_Vul.y,
-                                    m_Vul.x + (w2),
-                                    m_Vul.y + (h2));
-            
-            tempUrRect = ossimIrect(m_Vul.x + w2+1,
-                                    m_Vul.y,
-                                    m_Vul.x + w2 + (w2),
-                                    m_Vul.y + (h2));
-            
-            tempLrRect = ossimIrect(m_Vul.x + w2+1,
-                                    m_Vul.y + h2+1,
-                                    m_Vul.x + w2 + (w2),
-                                    m_Vul.y + h2 + (h2));
-            
-            tempLlRect = ossimIrect(m_Vul.x,
-                                    m_Vul.y + h2+1,
-                                    m_Vul.x + (w2),
-                                    m_Vul.y + h2 + (h2));
-         }
-      }
-   }
-#if 0
-   ossimNotify(ossimNotifyLevel_DEBUG)
-      << "SPLIT++++++++++++++++++++++++++++++++++++++++++++" << endl
-      << "current = " << vrect << endl
-      << "ul      = " << tempUlRect << endl
-      << "ur      = " << tempUrRect << endl
-      << "lr      = " << tempLrRect << endl
-      << "ll      = " << tempLlRect << endl;
-#endif
-
-   ulRect.m_Vul = tempUlRect.ul();
-   ulRect.m_Vur = tempUlRect.ur();
-   ulRect.m_Vlr = tempUlRect.lr();
-   ulRect.m_Vll = tempUlRect.ll();
-   
-   urRect.m_Vul = tempUrRect.ul();
-   urRect.m_Vur = tempUrRect.ur();
-   urRect.m_Vlr = tempUrRect.lr();
-   urRect.m_Vll = tempUrRect.ll();
-   
-   lrRect.m_Vul = tempLrRect.ul();
-   lrRect.m_Vur = tempLrRect.ur();
-   lrRect.m_Vlr = tempLrRect.lr();
-   lrRect.m_Vll = tempLrRect.ll();
-
-   llRect.m_Vul = tempLlRect.ul();
-   llRect.m_Vur = tempLlRect.ur();
-   llRect.m_Vlr = tempLlRect.lr();
-   llRect.m_Vll = tempLlRect.ll();
-   
-   ulRect.transformViewToImage(transform);
-   urRect.transformViewToImage(transform);
-   lrRect.transformViewToImage(transform);
-   llRect.transformViewToImage(transform);
-}
-
-void ossimImageRenderer::ossimRendererSubRectInfo::transformImageToView(ossimImageViewTransform* transform)
-{
-   ossimDpt vul;
-   ossimDpt vur;
-   ossimDpt vlr;
-   ossimDpt vll;
-   transform->imageToView(m_Iul,
-                          vul);
-   transform->imageToView(m_Iur,
-                          vur);
-   transform->imageToView(m_Ilr,
-                          vlr);
-   transform->imageToView(m_Ill,
-                          vll);
-   
-   m_Vul = vul;
-   m_Vur = vur;
-   m_Vlr = vlr;
-   m_Vll = vll;
-   
-}
-
-void ossimImageRenderer::ossimRendererSubRectInfo::transformViewToImage(ossimImageViewTransform* transform)
-{
-   transform->viewToImage(m_Vul, m_Iul);
-   transform->viewToImage(m_Vur, m_Iur);
-   transform->viewToImage(m_Vlr, m_Ilr);
-   transform->viewToImage(m_Vll, m_Ill);
-
-   if(imageHasNans())
-   {
-      m_ViewToImageScale.makeNan();
-   }
-   else
-   {
-      m_ViewToImageScale = ossimDpt(1.0, 1.0);
-      
-      ossimDpt topDelta    = m_Iur - m_Iul;
-      ossimDpt rightDelta  = m_Ilr - m_Iur;
-      ossimDpt bottomDelta = m_Ill - m_Ilr;
-      ossimDpt leftDelta   = m_Iul - m_Ill;
-      
-      double topLen    = topDelta.length();
-      double bottomLen = bottomDelta.length();
-      double rightLen  = rightDelta.length();
-      double leftLen   = leftDelta.length();
-      
-      double averageHoriz = ((topLen)  + (bottomLen))*.5;
-      double averageVert  = ((leftLen) + (rightLen))*.5;
-      
-      ossimDpt deltaViewP1P2 = m_Vul - m_Vur;
-      ossimDpt deltaViewP1P3 = m_Vul - m_Vll;
-      
-      double lengthViewP1P2 = deltaViewP1P2.length();//+1;
-      double lengthViewP1P3 = deltaViewP1P3.length();//+1;
-
-      if(lengthViewP1P2 > FLT_EPSILON)
-      {
-         m_ViewToImageScale.x = averageHoriz/lengthViewP1P2;
-      }
-      else
-      {
-         m_ViewToImageScale.makeNan();
-      }
-      if(lengthViewP1P3 > FLT_EPSILON)
-      {
-         m_ViewToImageScale.y = averageVert/lengthViewP1P3;
-      }
-      else
-      {
-         m_ViewToImageScale.makeNan();
-      }
-
-      if(!m_ViewToImageScale.hasNans())
-      {
-         m_ImageToViewScale.x = 1.0/m_ViewToImageScale.x;
-         m_ImageToViewScale.y = 1.0/m_ViewToImageScale.y;
-      }
-      else
-      {
-         m_ImageToViewScale.makeNan();
-      }
-  }
-}
-
-void ossimImageRenderer::ossimRendererSubRectInfo::stretchImageOut(bool enableRound)
-{
-   ossimDpt topDelta    = m_Iur - m_Iul;
-   ossimDpt rightDelta  = m_Ilr - m_Iur;
-   ossimDpt bottomDelta = m_Ill - m_Ilr;
-   ossimDpt leftDelta   = m_Iul - m_Ill;
-
-   topDelta = topDelta*(1.0/topDelta.length());
-   rightDelta = rightDelta*(1.0/rightDelta.length());
-   bottomDelta = bottomDelta*(1.0/bottomDelta.length());
-   leftDelta = leftDelta*(1.0/leftDelta.length());
-
-   m_Iul = m_Iul + ((leftDelta - topDelta)*.5);
-   m_Iur = m_Iur + ((topDelta - rightDelta)*.5);
-   m_Ilr = m_Ilr + ((rightDelta - bottomDelta)*.5);
-   m_Ill = m_Ill + ((bottomDelta - leftDelta)*.5);
-
-   if(enableRound)
-   {
-      m_Iul = ossimIpt(ossim::round<int>(m_Iul.x),
-                        ossim::round<int>(m_Iul.y));
-      m_Iur = ossimIpt(ossim::round<int>(m_Iur.x),
-                        ossim::round<int>(m_Iur.y));
-      m_Ilr = ossimIpt(ossim::round<int>(m_Ilr.x),
-                        ossim::round<int>(m_Ilr.y));
-      m_Ill = ossimIpt(ossim::round<int>(m_Ill.x),
-                        ossim::round<int>(m_Ill.y));
-   }
-}
-
-bool ossimImageRenderer::ossimRendererSubRectInfo::isIdentity()const
-{
-//    ossimDpt deltaP1P2 = m_Iul - m_Iur;
-//    ossimDpt deltaP1P3 = m_Iul - m_Ill;
-   
-//    ossimDpt deltaViewP1P2 = m_Vul - m_Vur;
-//    ossimDpt deltaViewP1P3 = m_Vul - m_Vll;
-   
-//    bool horizontalSigns = ossimGetSign(deltaP1P2.x)==ossimGetSign(deltaViewP1P2.x);
-//    bool verticalSigns   = ossimGetSign(deltaP1P3.y)==ossimGetSign(deltaViewP1P3.y);
-
-//    // check first to see if any horizontal or vertical flipping
-//    //
-//    if(horizontalSigns && verticalSigns)
-//    {
-//       // check scales to see if they are 1
-//       if(fabs(1-m_ViewToImageScale.x) <= FLT_EPSILON &&
-//          fabs(1-m_ViewToImageScale.y) <= FLT_EPSILON)
-//       {
-//          return true;
-//       }
-//    }
-
-    double iulDelta = (m_Iul-m_Vul).length();
-    double iurDelta = (m_Iur-m_Vur).length();
-    double ilrDelta = (m_Ilr-m_Vlr).length();
-    double illDelta = (m_Ill-m_Vll).length();
-
-    return ((iulDelta <= FLT_EPSILON)&&
-            (iurDelta <= FLT_EPSILON)&&
-            (ilrDelta <= FLT_EPSILON)&&
-            (illDelta <= FLT_EPSILON));
-}
-
-bool ossimImageRenderer::ossimRendererSubRectInfo::canBilinearInterpolate(ossimImageViewTransform* transform,
-									  double error)const
-{
-   if(imageHasNans())
-   {
-      return false;
-   }
-  ossimDpt imageToViewScale = getAbsValueImageToViewScales();
-
-  double testScale = imageToViewScale.length();
-
-  // if there is a large shrink or expansion then just return true.
-  // You are probably not worried about error in bilinear interpolation
-  //
-  if((testScale > 500)||
-     (testScale < 1.0/500.0))
-  {
-     return true;
-  }
-  if(imageToViewScale.hasNans()) return false;
-  ossimDpt vUpper, vRight, vBottom, vLeft, vCenter;
-  ossimDpt iUpper, iRight, iBottom, iLeft, iCenter;
-
-  getViewMids(vUpper, vRight, vBottom, vLeft, vCenter);
-  getImageMids(iUpper, iRight, iBottom, iLeft, iCenter);
-
-  ossimDpt testCenter;
-
-  ossimDpt iFullRes(iCenter.x*imageToViewScale.x,
-		    iCenter.y*imageToViewScale.y);
-
-  transform->viewToImage(vCenter, testCenter);
-
-  if(testCenter.hasNans())
-  {
-     return false;
-  }
-  ossimDpt testFullRes(testCenter.x*imageToViewScale.x,
-		       testCenter.y*imageToViewScale.y);
-
-  double errorCheck1 = (testFullRes - iFullRes).length();
-
-  iFullRes = ossimDpt(iUpper.x*imageToViewScale.x,
-		      iUpper.y*imageToViewScale.y);
-
-  transform->viewToImage(vUpper, testCenter);
-  if(testCenter.hasNans())
-  {
-     return false;
-  }
-  testFullRes = ossimDpt(testCenter.x*imageToViewScale.x,
-			 testCenter.y*imageToViewScale.y);
-  double errorCheck2 = (testFullRes - iFullRes).length();
-
-  iFullRes = ossimDpt(iRight.x*imageToViewScale.x,
-		      iRight.y*imageToViewScale.y);
-
-  transform->viewToImage(vRight, testCenter);
-  if(testCenter.hasNans())
-  {
-     return false;
-  }
-  testFullRes = ossimDpt(testCenter.x*imageToViewScale.x,
-			 testCenter.y*imageToViewScale.y);
-  double errorCheck3 = (testFullRes - iFullRes).length();
-
-  iFullRes = ossimDpt(iBottom.x*imageToViewScale.x,
-		      iBottom.y*imageToViewScale.y);
-
-  transform->viewToImage(vBottom, testCenter);
-  if(testCenter.hasNans())
-  {
-     return false;
-  }
-  testFullRes = ossimDpt(testCenter.x*imageToViewScale.x,
-			 testCenter.y*imageToViewScale.y);
-  double errorCheck4 = (testFullRes - iFullRes).length();
-
-  iFullRes = ossimDpt(iLeft.x*imageToViewScale.x,
-		      iLeft.y*imageToViewScale.y);
-
-  transform->viewToImage(vLeft, testCenter);
-  testFullRes = ossimDpt(testCenter.x*imageToViewScale.x,
-			 testCenter.y*imageToViewScale.y);
-  double errorCheck5 = (testFullRes - iFullRes).length();
-
-
-  return ((errorCheck1 < error)&&
-	  (errorCheck2 < error)&&
-	  (errorCheck3 < error)&&
-	  (errorCheck4 < error)&&
-	  (errorCheck5 < error));
-	  
-}
-
-void ossimImageRenderer::ossimRendererSubRectInfo::getViewMids(ossimDpt& upperMid,
-				     ossimDpt& rightMid,
-				     ossimDpt& bottomMid,
-				     ossimDpt& leftMid,
-				     ossimDpt& center)const
-{
-  
-  upperMid  = (m_Vul + m_Vur)*.5;
-  rightMid  = (m_Vur + m_Vlr)*.5;
-  bottomMid = (m_Vlr + m_Vll)*.5;
-  leftMid   = (m_Vul + m_Vll)*.5;
-  center    = (m_Vul + m_Vur + m_Vlr + m_Vll)*.25;
-}
-
-void ossimImageRenderer::ossimRendererSubRectInfo::getImageMids(ossimDpt& upperMid,
-				      ossimDpt& rightMid,
-				      ossimDpt& bottomMid,
-				      ossimDpt& leftMid,
-				      ossimDpt& center)const
-{
-  if(imageHasNans())
-    {
-      upperMid.makeNan();
-      rightMid.makeNan();
-      bottomMid.makeNan();
-      leftMid.makeNan();
-      center.makeNan();
-    }
-  else
-    {
-      upperMid  = (m_Iul + m_Iur)*.5;
-      rightMid  = (m_Iur + m_Ilr)*.5;
-      bottomMid = (m_Ilr + m_Ill)*.5;
-      leftMid   = (m_Iul + m_Ill)*.5;
-      center    = (m_Iul + m_Iur + m_Ilr + m_Ill)*.25;
-    }
-}
-
-ossimDpt ossimImageRenderer::ossimRendererSubRectInfo::getParametricCenter(const ossimDpt& ul, const ossimDpt& ur, 
-									   const ossimDpt& lr, const ossimDpt& ll)const
-{
-  ossimDpt top    = ur - ul;
-  ossimDpt bottom = lr - ll;
-  
-  ossimDpt centerTop = ul + top * .5;
-  ossimDpt centerBottom = ll + bottom * .5;
-
-  return centerBottom + (centerBottom - centerTop)*.5;
-}
-
-ossimImageRenderer::ossimImageRenderer()
-:
-ossimImageSourceFilter(),
-ossimViewInterface(0),
-m_Resampler(0),
-m_BlankTile(0),
-m_Tile(0),
-m_TemporaryBuffer(0),
-m_StartingResLevel(0),
-m_ImageViewTransform(0),
-m_inputR0Rect(),
-m_viewRect(),
-m_rectsDirty(true),
-m_MaxRecursionLevel(5),
-m_AutoUpdateInputTransform(true),
-m_MaxLevelsToCompute(999999) // something large so it will always compute
-{
-    ossimViewInterface::theObject = this;
-    m_Resampler = new ossimFilterResampler();
-    m_ImageViewTransform = new ossimImageViewProjectionTransform;
-}
-
-ossimImageRenderer::ossimImageRenderer(ossimImageSource* inputSource,
-                                       ossimImageViewTransform* imageViewTrans)
-   : ossimImageSourceFilter(inputSource),
-     ossimViewInterface(0),
-     m_Resampler(0),
-     m_BlankTile(0),
-     m_Tile(0),
-     m_TemporaryBuffer(0),
-     m_StartingResLevel(0),
-     m_ImageViewTransform(imageViewTrans),
-     m_inputR0Rect(),
-     m_viewRect(),
-     m_rectsDirty(true),
-     m_MaxRecursionLevel(5),
-     m_AutoUpdateInputTransform(true),
-     m_MaxLevelsToCompute(999999) // something large so it will always compute
-{
-   ossimViewInterface::theObject = this;
-   m_Resampler = new ossimFilterResampler();
-   if(!m_ImageViewTransform.valid())
-   {
-      m_ImageViewTransform = new ossimImageViewProjectionTransform;
-   }
-}
-
-ossimImageRenderer::~ossimImageRenderer()
-{
-  m_ImageViewTransform = 0;
-
-   if(m_Resampler)
-   {
-      delete m_Resampler;
-      m_Resampler = 0;
-   }
-}
-
-ossimRefPtr<ossimImageData> ossimImageRenderer::getTile(
-   const  ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   static const char MODULE[] = "ossimImageRenderer::getTile";
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " Requesting view rect = "
-         << tileRect << endl;
-   }
-
-   // long w = tileRect.width();
-   // long h = tileRect.height();
-   // ossimIpt origin = tileRect.ul();
-   
-   if( !m_BlankTile.valid() || !m_Tile.valid() )
-   {
-      allocate();
-      if ( !m_BlankTile.valid() || !m_Tile.valid() )
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimImageRenderer::getTile tile allocation failure!\n"
-               << endl;
-         }
-         return ossimImageSourceFilter::getTile(tileRect, resLevel);
-      }
-   }
-
-   m_BlankTile->setImageRectangle(tileRect);
-   
-   if(!theInputConnection)
-   {
-      return m_BlankTile;
-   }
-   
-   if ( !isSourceEnabled()||(!m_ImageViewTransform.valid())||
-        (!m_ImageViewTransform->isValid()) )
-   {
-      // This tile source bypassed, return the input tile source.
-      return theInputConnection->getTile(tileRect, resLevel);  
-   }
-
-   if( m_rectsDirty )
-   {
-      initializeBoundingRects();
-
-      // We can't go on without these...
-      if ( m_rectsDirty )
-      {
-         return m_BlankTile;
-      }
-   }
-   
-   if(m_viewRect.width() < 4 && m_viewRect.height() < 4)
-   {
-      return m_BlankTile;
-   }
-
-   if( !theInputConnection || !m_viewRect.intersects(tileRect) )
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE << "No intersection, Returning...." << endl;
-      }
-      return m_BlankTile;
-   }
-   
-   if(!m_Tile)
-   {
-      return theInputConnection->getTile(tileRect, resLevel);
-   }
-
-   // long tw = m_Tile->getWidth();
-   // long th = m_Tile->getHeight();
-   
-   m_Tile->setImageRectangle(tileRect);
-   m_Tile->makeBlank();
- 
-#if 1
-   // expand a small patch just to alleviate errors in the size of the rect when resampling
-      ossimIrect viewRectClip = tileRect.clipToRect(ossimIrect(m_viewRect.ul() + ossimIpt(-8,-8),
-                                                               m_viewRect.lr() + ossimIpt(8,8)));
-  // ossimIrect viewRectClip = tileRect.clipToRect(m_viewRect);
-//   std::cout << "_____________________" << std::endl;
-//   std::cout << "viewRectClip = " <<  viewRectClip << std::endl;
-//   std::cout << "tileRect = " <<  tileRect << std::endl;
-//   std::cout << "m_viewRect = " <<  m_viewRect << std::endl;
-   ossimRendererSubRectInfo subRectInfo(viewRectClip.ul(),
-                                        viewRectClip.ur(),
-                                        viewRectClip.lr(),
-                                        viewRectClip.ll());
-#else
-   ossimRendererSubRectInfo subRectInfo(tileRect.ul(),
-                                        tileRect.ur(),
-                                        tileRect.lr(),
-                                        tileRect.ll());
-#endif
-
-   subRectInfo.transformViewToImage(m_ImageViewTransform.get());
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " image rect = " << subRectInfo.getImageRect() << std::endl;
-   }
-
-   // If the image rect is completely outside of the valid image, there is no need to resample:
-   // (OLK 11/18)
-   if (!m_inputR0Rect.intersects(subRectInfo.getImageRect()))
-   {
-      return m_Tile;
-   }
-   
-   recursiveResample(m_Tile, subRectInfo, 1);
-   
-   if(m_Tile.valid())
-   {
-      m_Tile->validate();
-   }
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << "Returning...." << endl;
-   }
-   return m_Tile;
-}
-
-void ossimImageRenderer::recursiveResample(ossimRefPtr<ossimImageData> outputData,
-                                           const ossimRendererSubRectInfo& rectInfo,
-                                           ossim_uint32 level)
-{
-   ossimIrect tempViewRect = rectInfo.getViewRect();
-   if(rectInfo.imageIsNan())
-   {
-      return;
-   } 
-   
-   if(tempViewRect.width() <2 &&
-      tempViewRect.height() <2)
-   {
-      if(!rectInfo.imageHasNans())
-      {
-         fillTile(outputData,
-                  rectInfo);
-      }
-      return;
-   }
-   const double error = 1;
-   if(rectInfo.canBilinearInterpolate(m_ImageViewTransform.get(), error))
-   {                                // then draw the tile
-      fillTile(outputData,
-	       rectInfo);
-      return;
-   }
-   else
-   {
-      // split into four subtiles
-      ossimRendererSubRectInfo ulRectInfo;
-      ossimRendererSubRectInfo urRectInfo;
-      ossimRendererSubRectInfo lrRectInfo;
-      ossimRendererSubRectInfo llRectInfo;
-      
-      rectInfo.splitView(m_ImageViewTransform.get(),
-			 ulRectInfo,
-			 urRectInfo,
-			 lrRectInfo,
-			 llRectInfo);   
-      
-      ossimDrect vrect = rectInfo.getViewRect();
-      
-#if 0
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "vrect  = " << vrect
-         << "\nwidth  = " << vrect.width()
-         << "\nheight = " << vrect.height()
-         << "\nlevel  = " << level << endl;
-#endif
-      bool scaleUlNeedsSplit = ((!ulRectInfo.canBilinearInterpolate(m_ImageViewTransform.get(), error))||
-				ulRectInfo.imageHasNans());
-      bool scaleUrNeedsSplit = ((!urRectInfo.canBilinearInterpolate(m_ImageViewTransform.get(), error))||
-				urRectInfo.imageHasNans());
-      bool scaleLrNeedsSplit = ((!lrRectInfo.canBilinearInterpolate(m_ImageViewTransform.get(), error))||
-				lrRectInfo.imageHasNans());
-      bool scaleLlNeedsSplit = ((!llRectInfo.canBilinearInterpolate(m_ImageViewTransform.get(), error))||
-				llRectInfo.imageHasNans());
-      
-      bool tooSmall = (vrect.width() < 4) && (vrect.height()<4);
-      //
-      if(!tooSmall)
-      {
-         if(scaleUlNeedsSplit||
-            scaleUrNeedsSplit||
-            scaleLrNeedsSplit||
-            scaleLlNeedsSplit)
-         {
-            if(scaleUlNeedsSplit)
-            {
-               recursiveResample(outputData,
-                                 ulRectInfo,
-                                 level + 1);
-            }
-            else
-            {
-               fillTile(outputData, ulRectInfo);
-            }
-            if(scaleUrNeedsSplit)
-            {
-               recursiveResample(outputData,
-                                 urRectInfo,
-                                 level + 1);
-            }
-            else
-            {
-               fillTile(outputData, urRectInfo);
-            }
-            
-            if(scaleLrNeedsSplit)
-            {
-               recursiveResample(outputData,
-                                 lrRectInfo,
-                                 level + 1);
-            }
-            else
-            {
-               fillTile(outputData, lrRectInfo);
-            }
-            
-            if(scaleLlNeedsSplit)
-            {
-               recursiveResample(outputData,
-                                 llRectInfo,
-                                 level + 1);
-            }
-            else
-            {
-               fillTile(outputData, llRectInfo);
-            }
-         }
-         else
-         {
-            fillTile(outputData,
-                     rectInfo);
-         }
-      }
-      else if(!rectInfo.imageHasNans())
-      {
-         fillTile(outputData,
-                  rectInfo);
-      }
-   }
-}
-
-#define RSET_SEARCH_THRESHHOLD 0.1
-
-void ossimImageRenderer::fillTile(ossimRefPtr<ossimImageData> outputData,
-                                  const ossimRendererSubRectInfo& rectInfo)
-{
-   if(!outputData.valid() || !outputData->getBuf() || rectInfo.imageHasNans())
-   {
-      return;
-   }
-   ossimDrect vrect = rectInfo.getViewRect();
-   
-   ossimDpt imageToViewScale = rectInfo.getAbsValueImageToViewScales();
-   
-   if(imageToViewScale.hasNans()) return;
-   
-   ossimDpt tile_size = ossimDpt(vrect.width(), vrect.height());
-   double kernelSupportX, kernelSupportY;
-   
-   double resLevelX = log( 1.0 / imageToViewScale.x )/ log( 2.0 );
-   double resLevelY = log( 1.0 / imageToViewScale.y )/ log( 2.0 );
-   double resLevel0 = resLevelX < resLevelY ? resLevelX : resLevelY;
-   long closestFitResLevel = (long)floor( resLevel0 );
-   
-   //double averageScale = (imageToViewScale.x + imageToViewScale.y) / 2.0;
-   //long closestFitResLevel = (long)floor( log( 1.0 / averageScale )/ log( 2.0 ) );
-   
-   ossim_uint32 resLevel = closestFitResLevel<0 ? 0:closestFitResLevel;
-   resLevel += m_StartingResLevel;
-
-   //---
-   // ESH 02/2009: If requested resLevel is too high, let's lower it to one
-   // that is ok.
-   //---
-#if 0
-   const ossim_uint32 NUM_LEVELS = theInputConnection->getNumberOfDecimationLevels();
-   if ( (NUM_LEVELS > 0) && (resLevel >=  NUM_LEVELS) )
-   {
-      resLevel = NUM_LEVELS - 1;
-   }
-#endif
-   //---
-   // ESH 11/2008: Check the rset at the calculated resLevel to see
-   // if it has the expected decimation factor. It it does, we can 
-   // use this rset and assume it is at resLevel.
-   //--- 
-   ossimDpt decimation;
-   decimation.makeNan(); // initialize to nan.
-   theInputConnection->getDecimationFactor(resLevel, decimation);
-   double requestScale = 1.0 / (1<<resLevel);
-   double closestScale = decimation.hasNans() ? requestScale : decimation.x;
-
-#if 0
-   double differenceTest = 0.0;
-   if (closestScale != 0.0)
-   {
-      differenceTest = (1.0/closestScale) - (1.0/requestScale);
-   }
-
-   //---
-   // ESH 11/2008: Add in threshold test so search only happens when 
-   //              necessary.
-   // We do an rset search if 1 of 2 conditions is met: either
-   //   1) the rset is really different in size from the requested size, or
-   //   2) they're similar in size, and the actual rset is smaller than 
-   //      the requested size.
-   //---
-   if ( (fabs(differenceTest) > RSET_SEARCH_THRESHHOLD) || 
-        ((fabs(differenceTest) < RSET_SEARCH_THRESHHOLD) &&
-         (differenceTest < 0.0) ) )
-   {
-      //---
-      // ESH 11/2008: We test for the best rset. We assume 
-      // that decimation level always decreases as resLevel increases, so 
-      // the search can end before testing all rsets.
-      //---
-      ossim_uint32 savedResLevel = resLevel;
-      closestScale = 1.0; // resLevel 0
-      resLevel = 0;
-      ossim_uint32 i;
-      for( i=1; i<NUM_LEVELS; ++i )
-      {
-         theInputConnection->getDecimationFactor(i, decimation);
-         if(decimation.hasNans() == false )
-         {
-            double testDiscrepancy = decimation.x - requestScale;
-            if ( testDiscrepancy < 0.0 ) // we're done
-            {
-               break;
-            }
-            else
-            {
-               closestScale = decimation.x;
-               resLevel = i;
-            }
-         }
-         else // use the default value
-         {
-            closestScale = requestScale;
-            resLevel = savedResLevel;
-            break;
-         }
-      }
-   }
-#endif
-   ossimDpt nul(rectInfo.m_Iul.x*closestScale,
-                rectInfo.m_Iul.y*closestScale);
-   ossimDpt nll(rectInfo.m_Ill.x*closestScale,
-                rectInfo.m_Ill.y*closestScale);
-   ossimDpt nlr(rectInfo.m_Ilr.x*closestScale,
-                rectInfo.m_Ilr.y*closestScale);
-   ossimDpt nur(rectInfo.m_Iur.x*closestScale,
-                rectInfo.m_Iur.y*closestScale);
-   
-   m_Resampler->getKernelSupport( kernelSupportX, kernelSupportY );
-   
-   ossimDrect boundingRect = ossimDrect( nul, nll, nlr, nur );
-   
-   boundingRect = ossimIrect((ossim_int32)floor(boundingRect.ul().x - (kernelSupportX)-.5),
-                             (ossim_int32)floor(boundingRect.ul().y - (kernelSupportY)-.5),
-                             (ossim_int32)ceil (boundingRect.lr().x + (kernelSupportX)+.5),
-                             (ossim_int32)ceil (boundingRect.lr().y + (kernelSupportY)+.5));
-   
-   ossimDrect requestRect = boundingRect;
-   
-   ossimRefPtr<ossimImageData> data = getTileAtResLevel(requestRect, resLevel);
-   
-   ossimDataObjectStatus status = OSSIM_NULL;
-   if( data.valid() )
-   {
-      status = data->getDataObjectStatus();
-   }
-   if( (status == OSSIM_NULL) || (status == OSSIM_EMPTY) )
-   {
-      return;
-   }
-   
-   ossimDrect inputRect = m_inputR0Rect;
-   inputRect = inputRect*ossimDpt(closestScale, closestScale);
-   m_Resampler->setBoundingInputRect(inputRect);
-   
-   double denominatorY = 1.0;
-   if(tile_size.y > 2)
-   {
-      denominatorY = tile_size.y-1.0;
-   }
-   
-   ossimDpt newScale( imageToViewScale.x / closestScale,
-                     imageToViewScale.y / closestScale );
-   m_Resampler->setScaleFactor(newScale);
-   
-   m_Resampler->resample(data,
-                         outputData,
-                         vrect,
-                         nul,
-                         nur,
-                         ossimDpt( ( (nll.x - nul.x)/denominatorY ),
-                                   ( (nll.y - nul.y)/denominatorY ) ),
-                         ossimDpt( ( (nlr.x - nur.x)/denominatorY ),
-                                   ( (nlr.y - nur.y)/denominatorY ) ),
-                         tile_size);
-   
-}
-
-long ossimImageRenderer::computeClosestResLevel(const std::vector<ossimDpt>& decimationFactors,
-                                                double scale)const
-{
-   long result = 0;
-   long upper  = (long)decimationFactors.size();
-   bool done   = false;
-   
-   if(upper > 1)
-   {
-      while((result < upper)&&!done)
-      {
-         if(scale < decimationFactors[result].x)
-         {
-            ++result;
-         }
-         else
-         {
-            done = true;
-         }
-      }
-      
-      // now use the higher res level and resample down
-      //
-      if(result)
-      {
-         --result;
-      }
-   }
-   return result;
-}
-
-ossimIrect ossimImageRenderer::getBoundingRect(ossim_uint32 resLevel)const
-{
-   //---
-   // 01 November 2011:
-   // Backed out expand code as the ossimImageViewProjectionTransform::getImageToViewBounds
-   // does not handle image on the edge of international date line. D. Burken
-   //---
-   
-   // The input bounding rect as returned here corresponds to "pixel-is-point", i.e., the center
-   // of the pixel area for the corners and not the edges which extend 1/2 pixel in all 
-   // directions. Because the view is probably a different GSD, first expand the input
-   // bounding rect to the edge before transforming to a view rect. Then shrink the view rect by
-   // 1/2 pixel to get it to the pixel center (OSSIM convention for bounding rect -- this may 
-   // need to be revisited in light of the need to match edges, not pixel centers, OLK 09/11).
-
-   // Code functionality moved to below method. (drb - 08 Nov. 2011)
-   
-   ossimIrect result;
-   getBoundingRect( result, resLevel );
-   return result;
-}
-
-void ossimImageRenderer::getBoundingRect(ossimIrect& rect, ossim_uint32 resLevel) const
-{
-   if ( isSourceEnabled() )
-   {
-      rect = m_viewRect;
-   }
-   else if ( theInputConnection )
-   {
-      rect = theInputConnection->getBoundingRect(resLevel);
-   }
-   else
-   {
-      rect.makeNan();
-   }
-
-#if 0 /* Please leave for debug. */
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimImageRenderer::getBoundingRect(rect, resLevel) debug:\nbounds  = "
-         << rect << "\n";
-   }
-#endif  
-}
-
-void ossimImageRenderer::initializeBoundingRects()
-{
-   m_rectsDirty = true;
-
-   // Get the input bounding rect:
-   if ( theInputConnection )
-   {
-      m_inputR0Rect = theInputConnection->getBoundingRect(0);
-   
-      if ( m_ImageViewTransform.valid() && !m_inputR0Rect.hasNans() )
-      {
-         // This will call ossim::round<int> on the dpt's.
-         m_viewRect = m_ImageViewTransform->getImageToViewBounds(m_inputR0Rect);
-         if ( m_viewRect.hasNans() == false )
-         {
-            // Clear the dirty flag:
-            m_rectsDirty = false;
-         }
-      }
-   }
-
-   if ( m_rectsDirty )
-   {
-      m_viewRect.makeNan();
-   }
-
-#if 0 /* Please leave for debug. */
-   ossimNotify(ossimNotifyLevel_DEBUG)
-      << "ossimImageRenderer::getBoundingRect(rect, resLevel) debug:\n"
-      << "\ninput rect: " << m_inputR0Rect
-      << "\nview rect:  " << m_viewRect << endl;
-#endif
-}
-
-void ossimImageRenderer::initialize()
-{
-   // Call the base class initialize.
-   // Note:  This will reset "theInputConnection" if it changed...
-   ossimImageSourceFilter::initialize();
-
-   deallocate();
-
-   m_rectsDirty = true;
-
-   // we will only do this if we are enabled for this could be expensive
-   if (m_ImageViewTransform.valid() && !m_ImageViewTransform->isValid() && isSourceEnabled())
-   {
-      checkIVT(); // This can initialize bounding rects and clear dirty flag.
-   }
-
-   if ( m_rectsDirty )
-   {
-      initializeBoundingRects();
-   }
-}
-
-void ossimImageRenderer::deallocate()
-{
-   m_Tile            = 0;
-   m_BlankTile       = 0;
-   m_TemporaryBuffer = 0;
-}
-
-void ossimImageRenderer::allocate()
-{
-   deallocate();
-
-   if(theInputConnection)
-   {
-      m_Tile = ossimImageDataFactory::instance()->create(this, this);
-      m_BlankTile  = ossimImageDataFactory::instance()->create(this, this);
-      
-      m_Tile->initialize();
-   }
-}
-
-bool ossimImageRenderer::saveState(ossimKeywordlist& kwl,
-                                   const char* prefix)const
-{
-   if(m_ImageViewTransform.valid())
-   {
-      ossimString newPrefix = ossimString(prefix) + ossimString("image_view_trans.");
-      
-      m_ImageViewTransform->saveState(kwl, newPrefix.c_str());
-   }
-   if(m_Resampler)
-   {
-      m_Resampler->saveState(kwl,
-                              (ossimString(prefix)+"resampler.").c_str());
-   }
-   kwl.add(prefix,
-           "max_levels_to_compute",
-           m_MaxLevelsToCompute);
-   
-   return ossimImageSource::saveState(kwl, prefix);
-}
-
-bool ossimImageRenderer::loadState(const ossimKeywordlist& kwl,
-                                   const char* prefix)
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimImageRenderer::loadState entered..." << endl;
-      
-#ifdef OSSIM_ID_ENABLED
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "OSSIM_ID:  " << OSSIM_ID << endl;
-#endif      
-   }
-   
-   ossimString newPrefix = ossimString(prefix) + ossimString("image_view_trans.");
-   bool result = ossimImageSourceFilter::loadState(kwl, prefix);
-   
-   if(m_Resampler)
-   {
-      m_Resampler->loadState(kwl,
-                              (ossimString(prefix)+"resampler.").c_str());
-   }
-   m_ImageViewTransform = 0;
-   m_ImageViewTransform = ossimImageViewTransformFactory::instance()->createTransform(kwl, newPrefix.c_str());
-   if(!m_ImageViewTransform)
-   {
-      m_ImageViewTransform = new ossimImageViewProjectionTransform;
-   }
-   const char* maxLevelsToCompute = kwl.find(prefix,
-                                             "max_levels_to_compute");
-   if(maxLevelsToCompute)
-   {
-      m_MaxLevelsToCompute = ossimString(maxLevelsToCompute).toUInt32();
-   }
-   
-   return result;
-}
-
-void ossimImageRenderer::setImageViewTransform(ossimImageViewTransform* ivt)
-{
-   m_ImageViewTransform = ivt;
-   
-   m_rectsDirty = true; // Want to recompute bounding rects.
-   
-   if ( m_ImageViewTransform.valid() && !m_ImageViewTransform->isValid() && isSourceEnabled() )
-   {
-      checkIVT(); // This can initialize bounding rects and clear dirty flag.
-   }
-   
-   if ( m_rectsDirty ) 
-   {
-      initializeBoundingRects();
-   }
-}
-
-bool ossimImageRenderer::setView(ossimObject* baseObject)
-{
-   bool new_view_set = false;
-   if(m_ImageViewTransform.valid())
-   {
-      new_view_set = m_ImageViewTransform->setView(baseObject);
-
-      // If view changes reset the bounding rects.
-      initializeBoundingRects();
-   }
-   return new_view_set;
-}
-
-ossimObject* ossimImageRenderer::getView()
-{
-   if(m_ImageViewTransform.valid())
-   {
-      return m_ImageViewTransform->getView();
-   }
-   return 0;
-}
-
-const ossimObject* ossimImageRenderer::getView()const
-{
-   if(m_ImageViewTransform.valid())
-   {
-      return m_ImageViewTransform->getView();
-   }
-   return 0;
-}
-
-void ossimImageRenderer::getValidImageVertices(vector<ossimIpt>& validVertices,
-                                               ossimVertexOrdering ordering,
-                                               ossim_uint32 resLevel)const
-{
-   if(theInputConnection&&m_ImageViewTransform.valid()&&m_ImageViewTransform->isValid())
-   {
-      theInputConnection->getValidImageVertices(validVertices, ordering, resLevel);
-      if(isSourceEnabled())
-      {
-         ossim_uint32 inputSize = (ossim_uint32)validVertices.size();
-         if(inputSize)
-         {
-            ossimDpt viewPt;
-            ossim_uint32 idx = 0;
-            // transform each point to the view
-            for(idx = 0; idx < inputSize; ++idx)
-            {
-               m_ImageViewTransform->imageToView(validVertices[idx], viewPt);
-               
-               // round it to the nearest pixel
-               //
-               validVertices[idx] = ossimIpt(viewPt);
-            }
-         }
-      }
-   }
-}
-
-//*************************************************************************************************
-// Returns the geometry associated with the image being served out of the renderer. This
-// corresponds to the view geometry defined in theIVT.
-//*************************************************************************************************
-ossimRefPtr<ossimImageGeometry> ossimImageRenderer::getImageGeometry()
-{
-   // Make sure the IVT was properly initialized
-   if (m_ImageViewTransform.valid() && !m_ImageViewTransform->isValid())
-      checkIVT();
-
-   ossimImageViewProjectionTransform* ivpt = PTR_CAST(ossimImageViewProjectionTransform, 
-                                                      m_ImageViewTransform.get());
-   if (ivpt)
-   {
-      // we need to return the right side since the geometry changed to a view geometry
-      return ivpt->getViewGeometry();
-   }
-
-   return ossimRefPtr<ossimImageGeometry>();
-}
-
-void ossimImageRenderer::connectInputEvent(ossimConnectionEvent& /* event */)
-{
-   theInputConnection = PTR_CAST(ossimImageSource, getInput(0));
-   if(!m_ImageViewTransform.valid())
-      m_ImageViewTransform  = new ossimImageViewProjectionTransform;
-   
-   checkIVT();
-   initialize();
-}
-
-void ossimImageRenderer::disconnectInputEvent(ossimConnectionEvent& /* event */)
-{
-   ossimImageViewProjectionTransform* ivpt = PTR_CAST(ossimImageViewProjectionTransform,
-                                                      m_ImageViewTransform.get());
-   if(ivpt)
-      ivpt->setImageGeometry(0);
-   
-   theInputConnection = 0;
-}
-
-void ossimImageRenderer::propertyEvent(ossimPropertyEvent& /* event */)
-{
-   checkIVT();
-   initialize();
-}
-
-void ossimImageRenderer::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   ossimString tempName = property->getName();
-   
-   if((tempName == "Filter type")||
-      (tempName == "filter_type"))
-   {
-      if(m_Resampler)
-      {
-         m_Resampler->setFilterType(property->valueToString());
-      }
-   }
-   //   else if(tempName == "Blur factor")
-   //     {
-   //       if(m_Resampler)
-   // 	{
-   // 	  m_Resampler->setBlurFactor(property->valueToString().toDouble());
-   // 	}
-   //     }
-   else
-   {
-      ossimImageSourceFilter::setProperty(property);
-   }
-}
-      
-ossimRefPtr<ossimProperty> ossimImageRenderer::getProperty(const ossimString& name)const
-{
-   ossimString tempName = name;
-   
-   if((tempName == "Filter type")||
-      (tempName == "filter_type"))
-   {
-      std::vector<ossimString> filterNames;
-      m_Resampler->getFilterTypes(filterNames);
-      
-      ossimStringProperty* stringProp = new ossimStringProperty("filter_type",
-								m_Resampler->getMinifyFilterTypeAsString(),
-								false,
-								filterNames);
-      stringProp->clearChangeType();
-      stringProp->setReadOnlyFlag(false);
-      stringProp->setCacheRefreshBit();
-      
-      return stringProp;
-   }
-//   else if(tempName == "Blur factor")
-//   {
-//      ossimNumericProperty* numericProperty = new ossimNumericProperty("Blur factor",
-//                                                                       ossimString::toString((double)m_Resampler->getBlurFactor()));
-   
-//      numericProperty->setConstraints(0.0, 50.0);
-//      numericProperty->setNumericType(ossimNumericProperty::ossimNumericPropertyType_FLOAT64);
-//      numericProperty->setCacheRefreshBit();
-   
-//      return numericProperty;
-//   }
-   
-   return ossimImageSourceFilter::getProperty(name);
-}
-
-void ossimImageRenderer::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-  ossimImageSourceFilter::getPropertyNames(propertyNames);
-
-  propertyNames.push_back("Filter type");
-//  propertyNames.push_back("Blur factor");
-}
-
-//*************************************************************************************************
-// Insures that a proper IVT is established.
-//*************************************************************************************************
-void ossimImageRenderer::checkIVT()
-{
-   if(!isSourceEnabled())
-      return;
-
-   // Check validity of the IVT:
-   if (m_ImageViewTransform->isValid())
-      return;
-
-   // Detected uninitialized IVT. We are only concerned with projection IVTs (IVPTs) so 
-   // make sure that's what we're working with:
-   ossimImageViewProjectionTransform* ivpt = 
-      PTR_CAST(ossimImageViewProjectionTransform, m_ImageViewTransform.get());
-   ossimImageSource* inputSrc = PTR_CAST(ossimImageSource, getInput(0));
-
-   if(!ivpt || !inputSrc) 
-      return; // nothing to do here yet.
-
-   // Fetch the input image geometry from the IVPT to see if one needs to be established:
-   ossimRefPtr<ossimImageGeometry> inputGeom = ivpt->getImageGeometry();
-   if ( !inputGeom )
-   {
-      // Ask the input source for a geometry:
-      inputGeom = inputSrc->getImageGeometry();
-      if ( !inputGeom )
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)<<"ossimImageRenderer::checkTransform() -- "
-            "No input image geometry could be established for this renderer."<<endl;
-         }
-         return;
-      }
-      ivpt->setImageGeometry( inputGeom.get() );
-      m_rectsDirty = true;
-   }
-
-   // Now check the output view geometry:
-   ossimRefPtr<ossimImageGeometry> outputGeom = ivpt->getViewGeometry();
-   if (!outputGeom)
-   {
-      ossimRefPtr<ossimImageGeometry> myOutGeom = new ossimImageGeometry;
-
-      //---
-      // If the input geometry sports a map projection instead of a 3D
-      // projector, use the same map projection for the view.
-      // 
-      // Note: Don't use map projections with model transforms as they don't
-      // allow for changing resolution.
-      //---
-      const ossimProjection*  inputProj = inputGeom->getProjection();
-      const ossimMapProjection* mapProj = PTR_CAST(ossimMapProjection, inputProj);
-      if (mapProj && !mapProj->hasModelTransform() )
-      {
-         ossimProjection* my_proj = PTR_CAST(ossimProjection, mapProj->dup());
-         myOutGeom->setProjection(my_proj);
-      }
-      else 
-      {
-         // The input geometry uses a 3D projection, so let's default here to a
-         // ossimEquDistCylProjection for the view:
-         ossimMapProjection* myMapProj = new ossimEquDistCylProjection;
-         ossimDpt meters = inputGeom->getMetersPerPixel();
-         double GSD = (meters.x + meters.y)/2.0;
-         meters.x = GSD;
-         meters.y = GSD;
-         if(inputProj)
-         {
-            //---
-            // Update the map projection.  Since ossimMapProjection::setOrigin calls
-            // ossimMapProjection::update we do that before setUlTiePoints as it in
-            // turn calls setUlEastingNorthing(forward(gpt)) which depends on the orgin.
-            //---
-            myMapProj->setOrigin(inputProj->origin());
-            myMapProj->setUlTiePoints( inputProj->origin() );
-
-         }
-         myMapProj->setMetersPerPixel(meters);
-         myOutGeom->setProjection(myMapProj);
-      }
-      
-      // Set up our IVT with the new output geometry:
-      ivpt->setViewGeometry(myOutGeom.get());
-
-      // Must reinitialize bounding rects before calling ossimImageGeometry::setImageSize().
-      initializeBoundingRects();
-
-      // Set the size on the ossimImageGeometry.
-      ossimIrect rect;
-      getBoundingRect(rect, 0);
-      myOutGeom->setImageSize( rect.size() );
-   }
-
-   if ( m_rectsDirty )
-   {
-      initializeBoundingRects();
-   }
-}
-
-void ossimImageRenderer::getDecimationFactor(ossim_uint32 resLevel,
-					     ossimDpt& result)const
-{
-   if(isSourceEnabled())
-   {
-      result = ossimDpt(1,1);
-   }
-   else
-   {
-      ossimImageSourceFilter::getDecimationFactor(resLevel,
-						  result);
-   }
-}
-
-void ossimImageRenderer::getDecimationFactors(vector<ossimDpt>& decimations)const
-{
-   if(isSourceEnabled())
-   {
-      decimations.push_back(ossimDpt(1,1));
-   }
-   else
-   {
-      ossimImageSourceFilter::getDecimationFactors(decimations);
-   }
-}
-
-ossim_uint32 ossimImageRenderer::getNumberOfDecimationLevels()const
-{
-   if(isSourceEnabled())
-   {
-      return 1;
-   }
-   
-   return ossimImageSourceFilter::getNumberOfDecimationLevels();
-}
-
-void ossimImageRenderer::stretchQuadOut(const ossimDpt& amount,
-                                        ossimDpt& ul,
-                                        ossimDpt& ur,
-                                        ossimDpt& lr,
-                                        ossimDpt& ll)
-{
-   ossimDpt upper  = ur - ul;
-   ossimDpt right  = lr - ur;
-   ossimDpt bottom = ll - lr;
-   ossimDpt left   = ul - ll;
-   
-   upper = (upper*(1.0 / upper.length()));
-   upper.x *= amount.x;
-   upper.y *= amount.y;
-   right = (right*(1.0 / right.length()));
-   right.x *= amount.x;
-   right.y *= amount.y;
-   bottom = (bottom*(1.0 / bottom.length()));
-   bottom.x *= amount.x;
-   bottom.y *= amount.y;
-   left = (left*(1.0 / left.length()));
-   left.x *= amount.x;
-   left.y *= amount.y;
-   
-   
-   ul = ul - upper + left;
-   ur = ur + upper - right;
-   lr = lr + left - bottom;
-   ll = ll - left + bottom;
-}
-
-ossimRefPtr<ossimImageData>  ossimImageRenderer::getTileAtResLevel(const ossimIrect& boundingRect,
-                                                       ossim_uint32 resLevel)
-{
-   if(!theInputConnection)
-   {
-      m_BlankTile->setImageRectangle(boundingRect);
-      
-      return m_BlankTile;
-   }
-   
-   ossim_uint32 levels = theInputConnection->getNumberOfDecimationLevels();
-   
-   // ossim_uint32 maxValue = (ossim_uint32)ossim::max((ossim_uint32)m_BoundingRect.width(),
-   //                                            (ossim_uint32)m_BoundingRect.height());
-   if(resLevel == 0)
-   {
-      return theInputConnection->getTile(boundingRect);
-   }
-   if(resLevel < levels)
-   {
-      if(theInputConnection)
-      {
-         return theInputConnection->getTile(boundingRect,
-                                            resLevel);
-      }
-      else
-      {
-         return m_BlankTile;
-      }
-   }
-   else if((resLevel - levels) < m_MaxLevelsToCompute)
-   {
-      // check to see how many decimations we must achiev for the
-      // request
-      //
-      int decimations = (resLevel - (levels-1));
-      ossimIpt tileSize(theInputConnection->getTileWidth(),
-                        theInputConnection->getTileHeight());
-      
-      ossim_int32 multiplier = (1 << decimations);
-      
-      ossim_int32 xIndex = 0;
-      ossim_int32 yIndex = 0;
-      
-      // adjust the tilesize so it at least will cover the multiplier
-      // We will probably come up with something better later but for now
-      // this will do.
-      if(multiplier > tileSize.x)
-      {
-         tileSize.x = multiplier;
-      }
-      if(multiplier > tileSize.y)
-      {
-         tileSize.y = multiplier;
-      }
-      
-      // set the rect that covers the requested RLevel to the valid RLevel. 
-      // the valid RLevel is what is available on the input side.
-      //
-      ossimIrect requestedRectAtValidRLevel = boundingRect;
-      requestedRectAtValidRLevel.stretchToTileBoundary(tileSize);
-      ossimIrect mappedRequestedRect = requestedRectAtValidRLevel;
-      requestedRectAtValidRLevel  = requestedRectAtValidRLevel*((double)multiplier);
-      
-      if(!m_TemporaryBuffer)
-      {
-         m_TemporaryBuffer = (ossimImageData*)m_BlankTile->dup();
-         m_TemporaryBuffer->setImageRectangle(mappedRequestedRect);
-         m_TemporaryBuffer->initialize();
-      }
-      else
-      {
-         m_TemporaryBuffer->setImageRectangle(mappedRequestedRect);
-         m_TemporaryBuffer->makeBlank();
-      }
-      
-     // ossim_uint32 totalCount   = ((requestedRectAtValidRLevel.lr().y-requestedRectAtValidRLevel.ul().y)*
-   //                                (requestedRectAtValidRLevel.lr().x-requestedRectAtValidRLevel.ul().x));
-      ossim_uint32 currentCount = 0;
-      ossimIrect boundingRect = theInputConnection->getBoundingRect(levels-1);
-      for(yIndex = requestedRectAtValidRLevel.ul().y;yIndex < requestedRectAtValidRLevel.lr().y; yIndex += tileSize.y)
-      {
-         for(xIndex = requestedRectAtValidRLevel.ul().x; xIndex < requestedRectAtValidRLevel.lr().x; xIndex+=tileSize.x)
-         {
-            ossimIrect request(xIndex,
-                               yIndex,
-                               xIndex + (tileSize.x-1),
-                               yIndex + (tileSize.y-1));
-            ossimRefPtr<ossimImageData> data = theInputConnection->getTile(request, levels-1);
-            
-            if(data.valid() && (data->getDataObjectStatus()!=OSSIM_EMPTY)&&
-               data->getBuf()&&
-               boundingRect.intersects(request))
-            {
-               switch(data->getScalarType())
-               {
-                  case OSSIM_UINT8:
-                  {
-                     resampleTileToDecimation((ossim_uint8)0,
-                                              m_TemporaryBuffer,
-                                              data,
-                                              multiplier);
-                     break;
-                  }
-                  case OSSIM_SINT16:
-                  {
-                     resampleTileToDecimation((ossim_sint16)0,
-                                              m_TemporaryBuffer,
-                                              data,
-                                              multiplier);
-                     break;
-                  }
-                  case OSSIM_UINT16:
-                  case OSSIM_USHORT11:
-                  {
-                     resampleTileToDecimation((ossim_uint16)0,
-                                              m_TemporaryBuffer,
-                                              data,
-                                              multiplier);
-                     break;
-                  }
-                  case OSSIM_FLOAT32:
-                  case OSSIM_NORMALIZED_FLOAT:
-                  {
-                     resampleTileToDecimation((ossim_float32)0,
-                                              m_TemporaryBuffer,
-                                              data,
-                                              multiplier);
-                     break;
-                  }
-                  case OSSIM_FLOAT64:
-                  case OSSIM_NORMALIZED_DOUBLE:
-                  {
-                     resampleTileToDecimation((ossim_float64)0,
-                                              m_TemporaryBuffer,
-                                              data,
-                                              multiplier);
-                     break;
-                  }
-                  case OSSIM_SCALAR_UNKNOWN:
-                  default:
-                  {
-                     break;
-                  }
-               }
-            }
-            ++currentCount;
-         }
-      }
-      m_TemporaryBuffer->validate();
-      return m_TemporaryBuffer;
-   }
-
-   return 0;
-}
-
-void ossimImageRenderer::setMaxLevelsToCompute(ossim_uint32 maxLevels)
-{
-   m_MaxLevelsToCompute = maxLevels;
-}
-
-ossim_uint32 ossimImageRenderer::getMaxLevelsToCompute()const
-{
-   return m_MaxLevelsToCompute;
-}
-
-template <class T>
-void ossimImageRenderer::resampleTileToDecimation(T /* dummyVariable */,
-						  ossimRefPtr<ossimImageData> result,
-						  ossimRefPtr<ossimImageData> tile,
-						  ossim_uint32 multiplier)
-{
-   if(tile->getDataObjectStatus() == OSSIM_EMPTY ||
-      !tile->getBuf())
-   {
-      return;
-   }
-   
-   ossim_int32 maxX     = (ossim_int32)tile->getWidth();
-   ossim_int32 maxY     = (ossim_int32)tile->getHeight();
-   ossim_int32 resultHeight = result->getHeight();
-   ossim_int32* offsetX = new ossim_int32[maxX];
-   ossim_int32* offsetY = new ossim_int32[maxY];
-   ossim_int32 i        = 0;
-   ossim_int32 resultWidth     = (ossim_int32)result->getWidth();
-   ossimIpt tileOrigin   = tile->getOrigin();
-   ossimIpt resultOrigin = result->getOrigin();
-   
-   // create a lookup table. that maps the tile to the result
-   for(i = 0; i < maxX; ++i)
-   {
-      offsetX[i] = (i+tileOrigin.x)/(ossim_int32)multiplier - resultOrigin.x;
-      if(offsetX[i] < 0 )
-      {
-         offsetX[i] = 0;
-      }
-      else if(offsetX[i] >= resultWidth)
-      {
-         offsetX[i] = resultWidth-1;
-      }
-   }
-   for(i = 0; i < maxY; ++i)
-   {
-      offsetY[i] = ( ((i+tileOrigin.y)/(ossim_int32)multiplier) - resultOrigin.y);
-      if(offsetY[i] < 0 )
-      {
-         offsetY[i] = 0;
-      }
-      else if(offsetY[i] >= resultHeight)
-      {
-         offsetY[i] = resultHeight-1;
-      }
-      offsetY[i] *= resultWidth;
-   }
-   
-   if(tile->getDataObjectStatus() == OSSIM_FULL)
-   {
-      ossim_int32 numberOfBands = (ossim_int32)std::min(result->getNumberOfBands(),
-                                                        tile->getNumberOfBands());
-      ossim_int32 band = 0;
-      for(band = 0; band < numberOfBands; ++band)
-      {
-         T* tileBuf   = static_cast<T*>(tile->getBuf(band));
-         T* resultBuf = static_cast<T*>(result->getBuf(band));
-         ossim_int32 dx = 0;
-         ossim_int32 dy = 0;
-         ossim_int32 boxAverageX = 0;
-         ossim_int32 boxAverageY = 0;
-         for(dy = 0; dy < maxY; dy+=multiplier)
-         {
-            for(dx = 0; dx < maxX; dx+=multiplier)
-            {
-               double sum = 0.0;
-               for(boxAverageY = 0; 
-                   ((boxAverageY < (ossim_int32)multiplier)&& 
-                    ((boxAverageY+dy)<maxY)); ++boxAverageY)
-               {
-                  for(boxAverageX = 0; 
-                      ((boxAverageX < (ossim_int32)multiplier)&& 
-                       ((boxAverageX+dx)<maxX)); ++boxAverageX)
-                  {
-                     sum += tileBuf[((boxAverageY+dy)*maxX + boxAverageX + dx)];
-                  }
-               }
-               sum /= (double)(multiplier*multiplier);
-               resultBuf[ offsetX[dx] + offsetY[dy] ] = (T)sum;
-            }
-         }
-      }
-   }
-   else
-   {
-      ossim_int32 numberOfBands = (ossim_int32)std::min(result->getNumberOfBands(),
-                                                        tile->getNumberOfBands());
-      ossim_int32 band = 0;
-      for(band = 0; band < numberOfBands; ++band)
-      {
-         T* tileBuf   = static_cast<T*>(tile->getBuf(band));
-         T* resultBuf = static_cast<T*>(result->getBuf(band));
-         T tileBufNp  = static_cast<T>(tile->getNullPix(band));
-         ossim_int32 dx = 0;
-         ossim_int32 dy = 0;
-         ossim_int32 boxAverageX = 0;
-         ossim_int32 boxAverageY = 0;
-         for(dy = 0; dy < maxY; dy+=multiplier)
-         {
-            for(dx = 0; dx < maxX; dx+=multiplier)
-            {
-               double sum = 0.0;
-               if(tileBuf[((dy+(multiplier>>1))*maxX + dx+(multiplier>>1))] != tileBufNp)
-               {
-                  ossim_uint32 nullCount = 0;
-                  for(boxAverageY = 0; 
-                      ((boxAverageY < (ossim_int32)multiplier)&& 
-                       ((boxAverageY+dy)<maxY)); ++boxAverageY)
-                  {
-                     for(boxAverageX = 0; 
-                         ((boxAverageX < (ossim_int32)multiplier)&& 
-                          ((boxAverageX+dx)<maxX)); ++boxAverageX)
-                     {
-                        T value = tileBuf[((boxAverageY+dy)*maxX + boxAverageX + dx)];
-                        if(value != tileBufNp)
-                        {
-                           sum += value;
-                        }
-                        else
-                        {
-                           ++nullCount;
-                        }
-                     }
-                  }
-                  ossim_uint32 area = multiplier*multiplier;
-                  sum /= (double)(area);
-                  if(nullCount!= area)
-                  {
-                     resultBuf[ offsetX[dx] + offsetY[dy] ] = (T)sum;
-                  }
-               }
-            }
-         }
-      }
-      
-   }
-   
-  delete [] offsetX;
-  delete [] offsetY;
-}
-
-ossimString ossimImageRenderer::getLongName() const
-{
-   return ossimString("Image Renderer");
-}
-
-ossimString ossimImageRenderer::getShortName() const
-{
-   return ossimString("Image Renderer"); 
-}
-
-void ossimImageRenderer::refreshEvent(ossimRefreshEvent& event)
-{
-   ossimImageSourceFilter::refreshEvent(event);
-   ossimImageSourceFilter::initialize(); // init connections
-   if((event.getObject()!=this)&&
-      (event.getRefreshType() & ossimRefreshEvent::REFRESH_GEOMETRY))
-   {
-      ossimRefPtr<ossimImageGeometry> inputGeom =
-         theInputConnection?theInputConnection->getImageGeometry():0;
-      if(inputGeom.valid())
-      {
-         ossimImageViewProjectionTransform* ivpt = PTR_CAST(ossimImageViewProjectionTransform, 
-                                                            m_ImageViewTransform.get());
-         if(ivpt)
-         {
-            ivpt->setImageGeometry(inputGeom.get());
-         }
-      }
-   }
-   initialize();
-}
-
-void ossimImageRenderer::enableSource()
-{
-   if ( isSourceEnabled() == false )
-   {
-      setEnableFlag( true );
-   }
-}
-
-void ossimImageRenderer::disableSource()
-{
-   if ( isSourceEnabled() )
-   {
-      setEnableFlag( false );
-   }
-}
-
-void ossimImageRenderer::setEnableFlag(bool flag)
-{
-   if ( getEnableFlag() != flag )
-   {
-      ossimImageSourceFilter::setEnableFlag( flag );
-      checkIVT();
-      initialize();
-   }
-}
diff --git a/src/ossim/imaging/ossimImageSharpenFilter.cpp b/src/ossim/imaging/ossimImageSharpenFilter.cpp
deleted file mode 100644
index 1ce4b9d..0000000
--- a/src/ossim/imaging/ossimImageSharpenFilter.cpp
+++ /dev/null
@@ -1,225 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimImageSharpenFilter.cpp 18021 2010-09-01 12:11:05Z gpotts $
-#include <cstdlib> /* for abs() */
-#include <ossim/imaging/ossimImageSharpenFilter.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/base/ossimNumericProperty.h>
-
-RTTI_DEF1(ossimImageSharpenFilter, "ossimImageSharpenFilter", ossimImageSourceFilter);
-
-static const char* KERNEL_WIDTH_KW = "kernel_width";
-static const char* KERNEL_SIGMA_KW = "kernel_sigma";
-
-ossimImageSharpenFilter::ossimImageSharpenFilter(ossimObject* owner)
-   :ossimImageSourceFilter(owner),
-   theWidth(3),
-   theSigma(.5)
-{
-   theConvolutionSource = new ossimConvolutionSource;
-}
-
-ossimImageSharpenFilter::~ossimImageSharpenFilter()
-{
-}
-
-void ossimImageSharpenFilter::setWidthAndSigma(ossim_uint32 w, ossim_float64 sigma)
-{
-   theWidth = w;
-   theWidth |= 1;
-   if(theWidth < 3) theWidth = 3;
-   theSigma = sigma;
-   buildConvolutionMatrix();
-}
-
-ossimRefPtr<ossimImageData> ossimImageSharpenFilter::getTile(
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   if(!theInputConnection)
-   {
-      return NULL;
-   }
-   if(!isSourceEnabled())
-   {
-      return theInputConnection->getTile(tileRect, resLevel);
-   }
-   return theConvolutionSource->getTile(tileRect, resLevel);   
-}
-
-void ossimImageSharpenFilter::initialize()
-{
-   ossimImageSourceFilter::initialize();
-   if(theConvolutionSource->getInput()!=getInput())
-   {
-      theConvolutionSource->disconnectAllInputs();
-      theConvolutionSource->connectMyInputTo(0, getInput());
-   }
-   buildConvolutionMatrix();   
-}
-
-void ossimImageSharpenFilter::buildConvolutionMatrix()
-{
-   std::vector<double> theKernel(theWidth*theWidth);
-   double* kernel = &theKernel.front();
-   //width = findWidth(sigma);
-   ossim_int32 i = 0 ;
-   ossim_int32 u = 0 ;
-   ossim_int32 v = 0 ;
-   double normalize = 0.0 ;
-   ossim_int32 w2 = theWidth>>1;
-   for (v = -w2; v <= w2; ++v)
-   {
-      for (u = -w2; u <= w2; ++u)
-      {
-         double value = laplacianOfGaussian(u, v, theSigma);
-         kernel[i] = value;
-         normalize += kernel[i] ;
-         ++i ;
-      }
-   }
-   if (fabs(normalize) <= 1e-6)
-   {
-      normalize = 1.0;
-   }
-   normalize=(1.0/normalize);
-   ossim_int32 size = static_cast<ossim_int32>(theWidth*theWidth);
-   for (i = 0; i < size; ++i)
-   {
-      kernel[i]=kernel[i]*normalize;
-   } 
-      
-#if 0
-   // print the kernel
-   for (i = 0; i < theWidth*theWidth; ++i)
-   {
-      if((i%theWidth)==0)
-      {
-         std::cout << std::endl;
-      }
-      std::cout << kernel[i] <<", ";
-   } 
-   std::cout << std::endl;
-#endif
-   theConvolutionSource->setConvolution(kernel, theWidth, theWidth, false);
-}
-
-void ossimImageSharpenFilter::connectInputEvent(ossimConnectionEvent &event)
-{
-   ossimImageSourceFilter::connectInputEvent(event);
-   theConvolutionSource->connectMyInputTo(0, getInput());
-   buildConvolutionMatrix();
-}
-
-void ossimImageSharpenFilter::disconnectInputEvent(ossimConnectionEvent &event)
-{
-   ossimImageSourceFilter::disconnectInputEvent(event);
-   theConvolutionSource->connectMyInputTo(0, getInput());
-}
-
-ossimString ossimImageSharpenFilter::getShortName() const
-{
-   return ossimString("Sharpen");
-}
-
-ossimString ossimImageSharpenFilter::getLongName() const
-{
-   return ossimString("Sharpens the input");
-}
-
-void ossimImageSharpenFilter::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   //std::cout << "ossimImageSharpenFilter::setProperty with name = " << property->getName() << std::endl;
-   if(!property) return;
-   if(property->getName() == KERNEL_WIDTH_KW)
-   {
-      theWidth = property->valueToString().toUInt32();
-      theWidth |=1;
-      if(theWidth < 3) theWidth = 3;
-      initialize();
-   }
-   else if(property->getName() == KERNEL_SIGMA_KW)
-   {
-      theSigma = property->valueToString().toDouble();
-      if(theSigma < .1) theSigma = .1;
-      initialize();
-   }
-   else
-   {
-      ossimImageSourceFilter::setProperty(property.get());
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimImageSharpenFilter::getProperty(const ossimString& name)const
-{
-   ossimRefPtr<ossimProperty> property = 0;
-   if(name == KERNEL_WIDTH_KW)
-   {
-      property = new ossimNumericProperty(name,
-                                          ossimString::toString(theWidth),
-                                          3.0,
-                                          64.0);
-      property->setCacheRefreshBit();
-      
-   }
-   else if(name == KERNEL_SIGMA_KW)
-   {
-      property = new ossimNumericProperty(name,
-                                          ossimString::toString(theSigma),
-                                          .1,
-                                          32);
-      property->setCacheRefreshBit();
-   }
-   else 
-   {
-      property = ossimImageSourceFilter::getProperty(name);
-   }
-   
-   return property.get();
-}
-
-void ossimImageSharpenFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageSourceFilter::getPropertyNames(propertyNames);
-   propertyNames.push_back(KERNEL_WIDTH_KW);
-   propertyNames.push_back(KERNEL_SIGMA_KW);
-}
-
-bool ossimImageSharpenFilter::loadState(const ossimKeywordlist& kwl,
-                                        const char* prefix)
-{
-   bool result = ossimImageSourceFilter::loadState(kwl, prefix);
-   ossimString kernelWidth = kwl.find(prefix, KERNEL_WIDTH_KW);
-   ossimString kernelSigma = kwl.find(prefix, KERNEL_SIGMA_KW);
-   kernelWidth = kernelWidth.trim();
-   kernelSigma = kernelSigma.trim();
-   if(!kernelWidth.empty())
-   {
-      theWidth = kernelWidth.toUInt32();
-      theWidth |= 1; // make it odd and check for size
-      if(theWidth < 3) theWidth = 3;
-   }
-   if(!kernelSigma.empty())
-   {
-      theSigma = kernelSigma.toFloat64();
-   }
-   buildConvolutionMatrix();
-   return result;
-}
-
-bool ossimImageSharpenFilter::saveState(ossimKeywordlist& kwl,
-                                        const char* prefix)const
-{
-   kwl.add(prefix, KERNEL_WIDTH_KW, theWidth, true);
-   kwl.add(prefix, KERNEL_SIGMA_KW, theSigma, true);
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
diff --git a/src/ossim/imaging/ossimImageSource.cpp b/src/ossim/imaging/ossimImageSource.cpp
deleted file mode 100644
index 9a4cc9d..0000000
--- a/src/ossim/imaging/ossimImageSource.cpp
+++ /dev/null
@@ -1,378 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimImageSource.cpp 21637 2012-09-06 21:17:57Z dburken $
-
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/base/ossimProperty.h>
-#include <ossim/base/ossimKeywordNames.h>
-
-RTTI_DEF1(ossimImageSource,
-          "ossimImageSource" ,
-          ossimSource)
-
-ossimImageSource::ossimImageSource(ossimObject* owner)
-   :ossimSource(owner, 0,0,false,false)
-{
-}
-
-ossimImageSource::ossimImageSource(ossimObject* owner,
-                                   ossim_uint32 inputListSize,
-                                   ossim_uint32 outputListSize,
-                                   bool inputListIsFixedFlag,
-                                   bool outputListIsFixedFlag)
-   :
-      ossimSource(owner, inputListSize, outputListSize,
-                  inputListIsFixedFlag, outputListIsFixedFlag)
-{
-}
-
-ossimImageSource::~ossimImageSource()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimImageSource::getTile(const ossimIpt& origin,
-                                                      ossim_uint32 resLevel)
-{
-   ossimIrect tileRect(origin.x,
-                       origin.y,
-                       origin.x + getTileWidth()  - 1,
-                       origin.y + getTileHeight() - 1);
-   
-   return getTile(tileRect, resLevel);
-}
-
-ossimRefPtr<ossimImageData> ossimImageSource::getTile(const ossimIrect& rect,
-                                                      ossim_uint32 resLevel)
-{
-   ossimImageSource* inter = PTR_CAST(ossimImageSource,
-                                      getInput(0));
-   if(inter)
-   {
-      return inter->getTile(rect, resLevel);
-   }
-   return NULL;
-}
-
-bool ossimImageSource::getTile(ossimImageData* result, ossim_uint32 resLevel)
-{
-   bool status = true;
-   
-   if (result)
-   {
-      result->ref();
-      
-      ossimIrect tileRect = result->getImageRectangle();
-      
-      ossimRefPtr<ossimImageData> id = getTile(tileRect, resLevel);
-      if (id.valid())
-      {
-         *result = *(id.get());
-      }
-      else
-      {
-         status = false;
-      }
-      result->unref();
-   }
-
-   return status;
-}
-
-void ossimImageSource::getDecimationFactor(ossim_uint32 resLevel,
-                                           ossimDpt& result)const
-{
-   ossimImageSource* inter = PTR_CAST(ossimImageSource,
-                                               getInput(0));
-   if(inter)
-   {
-      inter->getDecimationFactor(resLevel, result);
-   }
-}
-
-void ossimImageSource::getDecimationFactors(std::vector<ossimDpt>& decimations)const
-{
-   ossimImageSource* inter = PTR_CAST(ossimImageSource,
-                                               getInput(0));
-   if(inter)
-   {
-      inter->getDecimationFactors(decimations);
-   }
-}
-
-ossim_uint32 ossimImageSource::getNumberOfDecimationLevels() const
-{
-   ossimImageSource* inter = PTR_CAST(ossimImageSource,
-                                               getInput(0));
-   if(inter)
-   {
-      return inter->getNumberOfDecimationLevels();
-   }
-   return 0;
-}
-
-ossimScalarType ossimImageSource::getOutputScalarType() const
-{
-   ossimImageSource* inter = PTR_CAST(ossimImageSource,
-                                               getInput(0));
-   if(inter)
-   {
-      return inter->getOutputScalarType();
-   }
-   
-   return OSSIM_SCALAR_UNKNOWN;
-}
-
-ossim_uint32 ossimImageSource::getTileWidth()  const
-{
-   ossimImageSource* inter = PTR_CAST(ossimImageSource,
-                                               getInput(0));
-   if(inter)
-   {
-      return inter->getTileWidth();
-   }
-   ossimIpt tileSize;
-   ossim::defaultTileSize(tileSize);
-   
-   return tileSize.x;
-}
-
-ossim_uint32 ossimImageSource::getTileHeight() const
-{
-   ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput(0));
-   if(inter)
-   {
-      return inter->getTileHeight();
-   }
-   
-   ossimIpt tileSize;
-   ossim::defaultTileSize(tileSize);
-   
-   return tileSize.y;
-}
-
-ossimIrect ossimImageSource::getBoundingRect(ossim_uint32 resLevel)const
-{
-   ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput(0));
-   if(inter)
-   {
-      return inter->getBoundingRect(resLevel);
-   }
-   ossimIrect rect;
-   rect.makeNan();
-   return rect;
-}
-
-void ossimImageSource::getBoundingRect(ossimIrect& rect, ossim_uint32 resLevel) const
-{
-   rect = getBoundingRect( resLevel );
-}
-
-bool ossimImageSource::saveState(ossimKeywordlist& kwl,
-                                 const char* prefix)const
-{
-   return ossimSource::saveState(kwl, prefix);
-}
-
-bool ossimImageSource::loadState(const ossimKeywordlist& kwl,
-                                 const char* prefix)
-{
-   return ossimSource::loadState(kwl, prefix);
-}
-
-//*****************************************************************************
-//  METHOD: ossimImageSource::getValidImageVertices()
-//*****************************************************************************
-void ossimImageSource::getValidImageVertices(std::vector<ossimIpt>& validVertices,
-                                             ossimVertexOrdering ordering,
-                                             ossim_uint32 resLevel)const
-{
-  ossimImageSource* inter = PTR_CAST(ossimImageSource,
-					      getInput(0));
-  if(inter)
-    {
-      return inter->getValidImageVertices(validVertices,
-					  ordering,
-                                          resLevel);
-    }
-   ossimIrect boundingRect = getBoundingRect(resLevel);
-   validVertices.clear();
-   
-   if(ordering == OSSIM_CLOCKWISE_ORDER)
-   {
-      validVertices.push_back(boundingRect.ul());
-      validVertices.push_back(boundingRect.ur());
-      validVertices.push_back(boundingRect.lr());
-      validVertices.push_back(boundingRect.ll());
-   }
-   else
-   {
-      validVertices.push_back(boundingRect.ul());
-      validVertices.push_back(boundingRect.ll());
-      validVertices.push_back(boundingRect.lr());
-      validVertices.push_back(boundingRect.ur());
-   }
-}
-
-double ossimImageSource::getNullPixelValue(ossim_uint32 band)const
-{
-   ossimImageSource* inter = PTR_CAST(ossimImageSource,
-                                               getInput(0));
-   if(inter)
-   {
-      return inter->getNullPixelValue(band);
-   }
-   
-   return ossim::defaultNull(getOutputScalarType());
-}
-
-double ossimImageSource::getMinPixelValue(ossim_uint32 band)const
-{
-   ossimImageSource* inter = PTR_CAST(ossimImageSource,
-                                               getInput(0));
-   if(inter)
-   {
-      return inter->getMinPixelValue(band);
-   }
-   return ossim::defaultMin(getOutputScalarType());
-}
-
-double ossimImageSource::getMaxPixelValue(ossim_uint32 band)const
-{
-   ossimImageSource* inter = PTR_CAST(ossimImageSource,
-                                               getInput(0));
-   if(inter)
-   {
-      return inter->getMaxPixelValue(band);
-   }
-   
-   return ossim::defaultMax(getOutputScalarType());
-}
-
-//**************************************************************************************************
-// Default implementation returns the image geometry object associated with the first input source 
-// (if any) connected to this source, or NULL.
-//**************************************************************************************************
-ossimRefPtr<ossimImageGeometry> ossimImageSource::getImageGeometry()
-{
-   ossimRefPtr<ossimImageGeometry> result = 0;
-   if ( getInput(0) )
-   {
-      ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput(0));
-      if( inter )
-      {
-         result = inter->getImageGeometry();
-      }
-   }
-   return result;
-}
-
-//**************************************************************************************************
-//! Default implementation sets geometry of the first input to the geometry specified.
-//**************************************************************************************************
-void ossimImageSource::setImageGeometry(const ossimImageGeometry* geom)
-{
-   ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput(0));
-   if (inter)
-   {
-      inter->setImageGeometry(geom);
-   }
-}
-
-void ossimImageSource::saveImageGeometry() const
-{
-   ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput(0));
-   if (inter)
-   {
-      inter->saveImageGeometry();
-   }
-}
-
-void ossimImageSource::saveImageGeometry(const ossimFilename& geometry_file) const
-{
-   ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput(0));
-   if (inter)
-   {
-      inter->saveImageGeometry(geometry_file);
-   }
-}
-
-void ossimImageSource::getOutputBandList(std::vector<ossim_uint32>& bandList) const
-{
-   const ossim_uint32 INPUT_BANDS = getNumberOfInputBands();
-   if ( INPUT_BANDS )
-   {
-      bandList.resize( INPUT_BANDS );
-      for ( ossim_uint32 band = 0; band < INPUT_BANDS; ++band )
-      {
-         bandList[band] = band;
-      }
-   }
-   else
-   {
-      bandList.clear();
-   }
-}
-
-ossim_uint32 ossimImageSource::getNumberOfOutputBands() const
-{
-   return getNumberOfInputBands();
-}
-
-ossimRefPtr<ossimProperty> ossimImageSource::getProperty(const ossimString& name)const
-{
-   ossimRefPtr<ossimProperty> result = ossimSource::getProperty(name);
-
-   ossimString tempName = name;
-   if(result.valid())
-   {
-      if(tempName.downcase() == ossimKeywordNames::ENABLED_KW)
-      {
-         result->clearChangeType();
-         
-         // we will at least say its a radiometric change
-         //
-         result->setFullRefreshBit();
-      }
-   }
-
-   return result;
-}
-
-void ossimImageSource::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   ossimSource::setProperty(property);
-}
-
-void ossimImageSource::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimSource::getPropertyNames(propertyNames);
-}
-
-bool ossimImageSource::isIndexedData() const
-{
-   bool result = false;
-   ossimImageSource* inter = PTR_CAST(ossimImageSource, getInput(0));
-   if (inter)
-   {
-      result = inter->isIndexedData();
-   }
-   return result;
-}
-
-// Protected to hide from use...
-ossimImageSource::ossimImageSource (const ossimImageSource& /* rhs */)
-   :ossimSource() 
-{}
-
-// Protected to hide from use...
-const ossimImageSource& ossimImageSource::operator=(const ossimImageSource&)
-{
-   return *this;
-}
diff --git a/src/ossim/imaging/ossimImageSourceFactory.cpp b/src/ossim/imaging/ossimImageSourceFactory.cpp
deleted file mode 100644
index 438a095..0000000
--- a/src/ossim/imaging/ossimImageSourceFactory.cpp
+++ /dev/null
@@ -1,586 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: This is the image source factory.
-//              It will try to create image filters
-//              first then it will try the image writers
-//              and image handlers (image readers)
-//
-//*************************************************************************
-// $Id: ossimImageSourceFactory.cpp 19005 2011-03-03 15:56:58Z gpotts $
-
-#include <ossim/imaging/ossimImageSourceFactory.h>
-#include <ossim/imaging/ossimConvolutionFilter1D.h>
-#include <ossim/imaging/ossimImageGaussianFilter.h>
-#include <ossim/imaging/ossimImageRenderer.h>
-#include <ossim/imaging/ossimCacheTileSource.h>
-#include <ossim/imaging/ossimFeatherMosaic.h>
-#include <ossim/imaging/ossimHistogramRemapper.h>
-#include <ossim/imaging/ossimNullPixelFlip.h>
-#include <ossim/imaging/ossimImageMosaic.h>
-#include <ossim/imaging/ossimClosestToCenterCombiner.h>
-#include <ossim/imaging/ossimBlendMosaic.h>
-#include <ossim/imaging/ossimMaxMosaic.h>
-#include <ossim/imaging/ossimOrthoImageMosaic.h>
-#include <ossim/imaging/ossimColorNormalizedFusion.h>
-#include <ossim/imaging/ossimLocalCorrelationFusion.h>
-#include <ossim/imaging/ossimSFIMFusion.h>
-#include <ossim/imaging/ossimTopographicCorrectionFilter.h>
-#include <ossim/imaging/ossimBandSelector.h>
-#include <ossim/imaging/ossimNBandToIndexFilter.h>
-#include <ossim/imaging/ossimRgbToGreyFilter.h>
-#include <ossim/imaging/ossimRgbToJpegYCbCrSource.h>
-#include <ossim/imaging/ossimRgbToHsvSource.h>
-#include <ossim/imaging/ossimRgbToHsiSource.h>
-#include <ossim/imaging/ossimHsiToRgbSource.h>
-#include <ossim/imaging/ossimHsvToRgbSource.h>
-#include <ossim/imaging/ossimHsiRemapper.h>
-#include <ossim/imaging/ossimJpegYCbCrToRgbSource.h>
-#include <ossim/imaging/ossimPolyCutter.h>
-#include <ossim/imaging/ossimGeoPolyCutter.h>
-#include <ossim/imaging/ossimHistogramEqualization.h>
-#include <ossim/imaging/ossimHistogramMatchFilter.h>
-#include <ossim/imaging/ossimHistogramThreshholdFilter.h>
-#include <ossim/imaging/ossimConvolutionSource.h>
-#include <ossim/imaging/ossimSICDToDetectedImage.h>
-#include <ossim/imaging/ossimBrightnessContrastSource.h>
-#include <ossim/imaging/ossimBrightnessMatch.h>
-#include <ossim/imaging/ossimScalarRemapper.h>
-#include <ossim/imaging/ossimBandMergeSource.h>
-#include <ossim/imaging/ossimIndexToRgbLutFilter.h>
-#include <ossim/imaging/ossimBumpShadeTileSource.h>
-#include <ossim/imaging/ossimSubImageTileSource.h>
-#include <ossim/imaging/ossimRLevelFilter.h>
-#include <ossim/imaging/ossimBandClipFilter.h>
-#include <ossim/imaging/ossimValueAssignImageSourceFilter.h>
-#include <ossim/imaging/ossimImageSharpenFilter.h>
-#include <ossim/imaging/ossim3x3ConvolutionFilter.h>
-#include <ossim/imaging/ossimCastTileSourceFilter.h>
-#include <ossim/imaging/ossimEquationCombiner.h>
-#include <ossim/imaging/ossimImageGaussianFilter.h>
-#include <ossim/imaging/ossimMaskFilter.h>
-#include <ossim/imaging/ossimPixelFlipper.h>
-#include <ossim/imaging/ossimElevImageSource.h>
-#include <ossim/imaging/ossimLandsatTopoCorrectionFilter.h>
-#include <ossim/imaging/ossimGeoAnnotationSource.h>
-#include <ossim/imaging/ossimMapCompositionSource.h>
-#include <ossim/imaging/ossimScaleFilter.h>
-#include <ossim/imaging/ossimEastingNorthingCutter.h>
-#include <ossim/imaging/ossimEdgeFilter.h>
-#include <ossim/imaging/ossimFftFilter.h>
-#include <ossim/imaging/ossimWatermarkFilter.h>
-#include <ossim/imaging/ossimTrimFilter.h>
-#include <ossim/imaging/ossimTwoColorView.h>
-#include <ossim/imaging/ossimMemoryImageSource.h>
-
-#include <ossim/imaging/ossimGridRemapSource.h>
-
-// Not sure if we want to keep this here
-#include <ossim/imaging/ossimAtbController.h>
-
-#include <ossim/imaging/ossimImageChain.h>
-#include <ossim/imaging/ossimHistogramWriter.h>
-#include <ossim/imaging/ossimRectangleCutFilter.h>
-
-
-#include <ossim/base/ossimObjectFactoryRegistry.h>
-#include <ossim/imaging/ossimImageHistogramSource.h>
-
-#include <ossim/imaging/ossimMultiBandHistogramTileSource.h>
-
-#include <ossim/imaging/ossimBandAverageFilter.h>
-#include <ossim/imaging/ossimImageToPlaneNormalFilter.h>
-
-#include <ossim/imaging/ossimAtCorrGridRemapper.h>
-#include <ossim/imaging/ossimAtCorrRemapper.h>
-
-
-#include <ossim/base/ossimTrace.h>
-
-RTTI_DEF1(ossimImageSourceFactory, "ossimImageSourceFactory", ossimImageSourceFactoryBase);
-
-static ossimTrace traceDebug("ossimImageSourceFactory:debug");
-
-ossimImageSourceFactory* ossimImageSourceFactory::theInstance=NULL;
-
-ossimImageSourceFactory::~ossimImageSourceFactory()
-{
-   theInstance = NULL;
-   ossimObjectFactoryRegistry::instance()->unregisterFactory(this);
-}
-ossimImageSourceFactory* ossimImageSourceFactory::instance()
-{
-   if(!theInstance)
-   {
-      theInstance = new ossimImageSourceFactory;
-   }
-
-   return theInstance;
-}
-
-ossimObject* ossimImageSourceFactory::createObject(const ossimString& name)const
-{
-
-   // lets do the filters first
-   if( name == STATIC_TYPE_NAME(ossimBandSelector) ||
-       name == "ossimNativeBandSelectorTileSource" ) 
-   {
-      //---
-      // For backwards compatibility check old name:
-      // "ossimNativeBandSelectorTileSource"
-      //---
-      return new ossimBandSelector;
-   }
-   else if(name ==  STATIC_TYPE_NAME(ossimNullPixelFlip))
-   {
-      return new ossimNullPixelFlip;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimImageRenderer))
-   {
-      return new ossimImageRenderer;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimCacheTileSource))
-   {
-      return new ossimCacheTileSource;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimColorNormalizedFusion))
-   {
-      return new ossimColorNormalizedFusion;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimLocalCorrelationFusion))
-   {
-      return new ossimLocalCorrelationFusion;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimSFIMFusion))
-   {
-      return new ossimSFIMFusion;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimBlendMosaic))
-   {
-      return new ossimBlendMosaic;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimMaxMosaic))
-   {
-      return new ossimMaxMosaic;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimHistogramRemapper))
-   {
-      return new ossimHistogramRemapper;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimImageMosaic))
-   {
-      return new ossimImageMosaic;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimClosestToCenterCombiner))
-   {
-      return new ossimClosestToCenterCombiner;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimRgbToGreyFilter))
-   {
-      return new ossimRgbToGreyFilter;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimNBandToIndexFilter))
-   {
-      return new ossimNBandToIndexFilter;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimImageChain))
-   {
-      return new ossimImageChain;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimPolyCutter))
-   {
-      return new ossimPolyCutter;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimGeoPolyCutter))
-   {
-      return new ossimGeoPolyCutter;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimJpegYCbCrToRgbSource))
-   {
-      return new ossimJpegYCbCrToRgbSource;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimRgbToJpegYCbCrSource))
-   {
-      return new ossimRgbToJpegYCbCrSource;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimHsiToRgbSource))
-   {
-      return new ossimHsiToRgbSource;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimRgbToHsiSource))
-   {
-      return new ossimRgbToHsiSource;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimHsvToRgbSource))
-   {
-      return new ossimHsvToRgbSource;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimRgbToHsvSource))
-   {
-      return new ossimRgbToHsvSource;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimHistogramEqualization))
-   {
-      return new ossimHistogramEqualization;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimHistogramMatchFilter))
-   {
-      return new ossimHistogramMatchFilter;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimHistogramThreshholdFilter))
-   {
-      return new ossimHistogramThreshholdFilter;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimGeoAnnotationSource))
-   {
-      return new ossimGeoAnnotationSource;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimConvolutionSource))
-   {
-      return new ossimConvolutionSource;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimSICDToDetectedImage))
-   {
-	   return new ossimSICDToDetectedImage;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimBrightnessContrastSource))
-   {
-      return new ossimBrightnessContrastSource;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimBrightnessMatch))
-   {
-      return new ossimBrightnessMatch;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimScalarRemapper))
-   {
-      return new ossimScalarRemapper;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimBandMergeSource))
-   {
-      return new ossimBandMergeSource;
-   }  
-   else if(name == STATIC_TYPE_NAME(ossimFeatherMosaic))
-   {
-      return new ossimFeatherMosaic;
-   }  
-   else if(name == STATIC_TYPE_NAME(ossimGridRemapSource))
-   {
-      return new ossimGridRemapSource;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimEquationCombiner))
-   {
-      return new ossimEquationCombiner;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimConvolutionFilter1D))
-   {
-      return new ossimConvolutionFilter1D;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimImageGaussianFilter))
-   {
-      return new ossimImageGaussianFilter;
-   }
-   // Not sure if we want to keep this here
-   else if(name == STATIC_TYPE_NAME(ossimAtbController))
-   {
-      return new ossimAtbController;
-   }  
-   else if(name == STATIC_TYPE_NAME(ossimIndexToRgbLutFilter))
-   {
-      return new ossimIndexToRgbLutFilter;
-   }
-   else if(name ==  STATIC_TYPE_NAME(ossimBumpShadeTileSource))
-   {
-      return new ossimBumpShadeTileSource;
-   }
-   else if(name ==  STATIC_TYPE_NAME(ossimSubImageTileSource))
-   {
-      return new ossimSubImageTileSource;
-   }
-   else if(name ==  STATIC_TYPE_NAME(ossimRLevelFilter))
-   {
-      return new ossimRLevelFilter;
-   }
-   else if(name ==  STATIC_TYPE_NAME(ossimBandClipFilter))
-   {
-      return new ossimBandClipFilter;
-   }
-   else if(name ==  STATIC_TYPE_NAME(ossimHsiRemapper))
-   {
-      return new ossimHsiRemapper;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimHistogramWriter))
-   {
-      return new ossimHistogramWriter;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimImageHistogramSource))
-   {
-      return new ossimImageHistogramSource;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimRectangleCutFilter))
-   {
-      return new ossimRectangleCutFilter;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimCastTileSourceFilter))
-   {
-      return new ossimCastTileSourceFilter;
-   }
-   // all the image handlers
-   else if(name == STATIC_TYPE_NAME(ossimValueAssignImageSourceFilter))
-   {
-      return new ossimValueAssignImageSourceFilter;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimImageSharpenFilter))
-   {
-      return new ossimImageSharpenFilter;
-   }
-   else if(name == STATIC_TYPE_NAME(ossim3x3ConvolutionFilter))
-   {
-      return new ossim3x3ConvolutionFilter;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimOrthoImageMosaic))
-   {
-      return new ossimOrthoImageMosaic;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimMapCompositionSource))
-   {
-      return new ossimMapCompositionSource;
-   }
-   else if(name ==  STATIC_TYPE_NAME(ossimElevImageSource))
-   {
-      return new ossimElevImageSource;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimMaskFilter))
-   {
-      return new ossimMaskFilter;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimMultiBandHistogramTileSource))
-   {
-      return new ossimMultiBandHistogramTileSource;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimBandAverageFilter))
-   {
-      return new ossimBandAverageFilter;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimPixelFlipper))
-   {
-      return new ossimPixelFlipper();
-   }
-   else if(name == STATIC_TYPE_NAME(ossimScaleFilter))
-   {
-      return new ossimScaleFilter();
-   }
-   else if(name == STATIC_TYPE_NAME(ossimImageToPlaneNormalFilter))
-   {
-      return new ossimImageToPlaneNormalFilter();
-   }
-   else if(name == STATIC_TYPE_NAME(ossimTopographicCorrectionFilter))
-   {
-      return new ossimTopographicCorrectionFilter();
-   }
-   else if(name == STATIC_TYPE_NAME(ossimLandsatTopoCorrectionFilter))
-   {
-      return new ossimLandsatTopoCorrectionFilter();
-   }
-   else if(name == STATIC_TYPE_NAME(ossimAtCorrRemapper))
-   {
-      return new ossimAtCorrRemapper();
-   }
-   else if(name == STATIC_TYPE_NAME(ossimAtCorrGridRemapper))
-   {
-      return new ossimAtCorrGridRemapper();
-   }
-   else if(name == STATIC_TYPE_NAME(ossimEastingNorthingCutter))
-   {
-      return new ossimEastingNorthingCutter();
-   }
-   else if(name == STATIC_TYPE_NAME(ossimEdgeFilter))
-   {
-      return new ossimEdgeFilter();
-   }
-   else if(name == STATIC_TYPE_NAME(ossimFftFilter))
-   {
-      return new ossimFftFilter();
-   }
-   else if(name == STATIC_TYPE_NAME(ossimWatermarkFilter))
-   {
-      return new ossimWatermarkFilter();
-   }
-   else if(name == STATIC_TYPE_NAME(ossimImageGaussianFilter))
-   {
-      return new ossimImageGaussianFilter();
-   }
-   else if(name == STATIC_TYPE_NAME(ossimTrimFilter))
-   {
-      return new ossimTrimFilter();
-   }
-   else if(name == STATIC_TYPE_NAME(ossimTwoColorView))
-   {
-      return new ossimTwoColorView;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimImageHistogramSource))
-   {
-      return new ossimImageHistogramSource();
-   }
-   else if(name == STATIC_TYPE_NAME(ossimImageSourceFilter))
-   {
-      // this is just a pass through source
-      return new ossimImageSourceFilter;
-   }
-   else if(name == STATIC_TYPE_NAME(ossimMemoryImageSource))
-   {
-      // this is just a pass through source
-      return new ossimMemoryImageSource;
-   }
-   return NULL;
-}
-
-ossimObject* ossimImageSourceFactory::createObject(const ossimKeywordlist& kwl,
-                                                   const char* prefix)const
-{
-   static const char* MODULE = "ossimImageSourceFactory::createSource";
-   
-   ossimString copyPrefix;
-   if (prefix)
-   {
-      copyPrefix = prefix;
-   }
-   
-   ossimObject* result = NULL;
-   
-   if(traceDebug())
-   {
-      CLOG << "looking up type keyword for prefix = " << copyPrefix << endl;
-   }
-
-   const char* lookup = kwl.find(copyPrefix, "type");
-   if(lookup)
-   {
-      ossimString name = lookup;
-      result           = createObject(name);
-      
-      if(result)
-      {
-         if(traceDebug())
-         {
-            CLOG << "found source " << result->getClassName() << " now loading state" << endl;
-         }
-         result->loadState(kwl, copyPrefix.c_str());
-      }
-      else
-      {
-         if(traceDebug())
-         {
-            CLOG << "type not found " << lookup << endl;
-         }
-      }
-   }
-   else
-   {
-      if(traceDebug())
-      {
-         CLOG << "type keyword not found" << endl;
-      }
-   }
-   return result;
-}
-
-void ossimImageSourceFactory::getTypeNameList(std::vector<ossimString>& typeList)const
-{
-   typeList.push_back(STATIC_TYPE_NAME(ossimBandSelector));
-   typeList.push_back(STATIC_TYPE_NAME(ossimImageRenderer));
-   typeList.push_back(STATIC_TYPE_NAME(ossimCacheTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimBlendMosaic));
-   typeList.push_back(STATIC_TYPE_NAME(ossimMaxMosaic));   
-   typeList.push_back(STATIC_TYPE_NAME(ossimNullPixelFlip));
-   typeList.push_back(STATIC_TYPE_NAME(ossimColorNormalizedFusion));
-   typeList.push_back(STATIC_TYPE_NAME(ossimLocalCorrelationFusion));
-   typeList.push_back(STATIC_TYPE_NAME(ossimSFIMFusion));
-   typeList.push_back(STATIC_TYPE_NAME(ossimHistogramRemapper));
-   typeList.push_back(STATIC_TYPE_NAME(ossimImageMosaic));
-   typeList.push_back(STATIC_TYPE_NAME(ossimClosestToCenterCombiner));
-   typeList.push_back(STATIC_TYPE_NAME(ossimRgbToGreyFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimNBandToIndexFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimImageChain));
-   typeList.push_back(STATIC_TYPE_NAME(ossimPolyCutter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimGeoPolyCutter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimJpegYCbCrToRgbSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimRgbToJpegYCbCrSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimHsiToRgbSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimRgbToHsiSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimHsvToRgbSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimRgbToHsvSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimHistogramEqualization));
-   typeList.push_back(STATIC_TYPE_NAME(ossimHistogramMatchFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimHistogramThreshholdFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimGeoAnnotationSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimConvolutionSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimSICDToDetectedImage));
-   typeList.push_back(STATIC_TYPE_NAME(ossimBrightnessContrastSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimBrightnessMatch));
-   typeList.push_back(STATIC_TYPE_NAME(ossimScalarRemapper));
-   typeList.push_back(STATIC_TYPE_NAME(ossimBandMergeSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimFeatherMosaic));
-   typeList.push_back(STATIC_TYPE_NAME(ossimGridRemapSource));
-   // Not sure if we want to keep this here
-   typeList.push_back(STATIC_TYPE_NAME(ossimAtbController));
-   typeList.push_back(STATIC_TYPE_NAME(ossimIndexToRgbLutFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimBumpShadeTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimSubImageTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimRLevelFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimBandClipFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimHsiRemapper));
-   typeList.push_back(STATIC_TYPE_NAME(ossimHistogramWriter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimImageHistogramSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimRectangleCutFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimElevImageSource));
-   
-   typeList.push_back(STATIC_TYPE_NAME(ossimValueAssignImageSourceFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimImageSharpenFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossim3x3ConvolutionFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimOrthoImageMosaic));
-   typeList.push_back(STATIC_TYPE_NAME(ossimMapCompositionSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimCastTileSourceFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimEquationCombiner));
-   typeList.push_back(STATIC_TYPE_NAME(ossimConvolutionFilter1D));
-   typeList.push_back(STATIC_TYPE_NAME(ossimImageGaussianFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimMaskFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimMultiBandHistogramTileSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimBandAverageFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimPixelFlipper));
-   typeList.push_back(STATIC_TYPE_NAME(ossimScaleFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimImageToPlaneNormalFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimTopographicCorrectionFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimLandsatTopoCorrectionFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimAtCorrRemapper));
-   typeList.push_back(STATIC_TYPE_NAME(ossimAtCorrGridRemapper));
-   typeList.push_back(STATIC_TYPE_NAME(ossimEastingNorthingCutter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimEdgeFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimFftFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimWatermarkFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimImageGaussianFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimTrimFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimTwoColorView));
-   typeList.push_back(STATIC_TYPE_NAME(ossimImageHistogramSource));
-   typeList.push_back(STATIC_TYPE_NAME(ossimImageSourceFilter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimMemoryImageSource));
-}
-
-// Hide from use...
-ossimImageSourceFactory::ossimImageSourceFactory()
-   :ossimImageSourceFactoryBase()
-{}
-
-ossimImageSourceFactory::ossimImageSourceFactory(const ossimImageSourceFactory&)
-   :ossimImageSourceFactoryBase()
-{}
-
-const ossimImageSourceFactory& ossimImageSourceFactory::operator=(ossimImageSourceFactory&)
-{
-   return *this;
-}
diff --git a/src/ossim/imaging/ossimImageSourceFilter.cpp b/src/ossim/imaging/ossimImageSourceFilter.cpp
deleted file mode 100644
index b4ba37f..0000000
--- a/src/ossim/imaging/ossimImageSourceFilter.cpp
+++ /dev/null
@@ -1,215 +0,0 @@
-
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-//*******************************************************************
-//  $Id: ossimImageSourceFilter.cpp 18920 2011-02-18 20:06:11Z gpotts $
-
-#include <ossim/imaging/ossimImageSourceFilter.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimProperty.h>
- 
-static ossimTrace traceDebug("ossimImageSourceFilter:degug");
-
-RTTI_DEF2(ossimImageSourceFilter, "ossimImageSourceFilter", ossimImageSource, ossimConnectableObjectListener)
-
-ossimImageSourceFilter::ossimImageSourceFilter(ossimObject* owner)
-   : ossimImageSource(owner,
-                      1, // number of inputs
-                      0, // number of outputs
-                      true, // input's fixed
-                      false), // outputs ar not fixed
-     theInputConnection(NULL)
-{
-   addListener((ossimConnectableObjectListener*)this);
-}
-
-ossimImageSourceFilter::ossimImageSourceFilter(ossimImageSource* inputSource)
-   : ossimImageSource(NULL,
-                      1,
-                      0,
-                      true,
-                      false),
-     theInputConnection(inputSource)
-{
-   if(inputSource)
-   {
-     connectMyInputTo(0, inputSource);
-   }
-   addListener((ossimConnectableObjectListener*)this);
-}
-
-ossimImageSourceFilter::ossimImageSourceFilter(ossimObject* owner,
-                                               ossimImageSource* inputSource)
-   : ossimImageSource(owner,
-                      1,
-                      0,
-                      true,
-                      false),
-     theInputConnection(inputSource)
-{
-   if(inputSource)
-   {
-      theInputObjectList[0] = inputSource;
-      inputSource->connectMyOutputTo(this, false);
-   }
-   addListener((ossimConnectableObjectListener*)this);
-}
-
-
-ossimImageSourceFilter::~ossimImageSourceFilter()
-{
-   removeListener((ossimConnectableObjectListener*)this);
-   theInputConnection = NULL;
-}
-
-ossim_uint32 ossimImageSourceFilter::getNumberOfInputBands()const
-{
-   if(theInputConnection)
-   {
-      return theInputConnection->getNumberOfOutputBands();
-   }
-
-   return 0;
-}
-
-void ossimImageSourceFilter::initialize()
-{
-   theInputConnection = PTR_CAST(ossimImageSource, getInput(0));
-}
-
-bool ossimImageSourceFilter::loadState(const ossimKeywordlist& kwl,
-                                       const char* prefix)
-{
-   bool result = ossimImageSource::loadState(kwl, prefix);
-
-   // make sure we have 1 input.
-   //setNumberOfInputs(1);
-
-   // we will fix the input
-   //if(!theInputListIsFixedFlag)
-  // {
-  //    theInputListIsFixedFlag = true;
-  // }
-   
-   return result;
-}
-
-bool ossimImageSourceFilter::saveState(ossimKeywordlist& kwl,
-                                       const char* prefix)const
-{
-   return ossimImageSource::saveState(kwl, prefix);
-}
-
-
-bool ossimImageSourceFilter::canConnectMyInputTo(ossim_int32 inputIndex,
-						 const ossimConnectableObject* object)const
-{
-  
-  return ((PTR_CAST(ossimImageSource, object)||!object) && ( inputIndex == 0 ) );
-}
-
-void ossimImageSourceFilter::connectInputEvent(ossimConnectionEvent& /* event */)
-{
-  if(traceDebug())
-    {
-       ossimNotify(ossimNotifyLevel_DEBUG) << "ossimImageSourceFilter::connectInputEvent: ";
-
-       if(getInput())
-       {
-          ossimNotify(ossimNotifyLevel_DEBUG) << "to" <<  getInput()->getClassName() << std::endl;
-       }
-       else
-       {
-          ossimNotify(ossimNotifyLevel_DEBUG) << "to NULL" << std::endl;
-       }
-    }
-  theInputConnection = PTR_CAST(ossimImageSource, getInput(0));
-  initialize();
-  if(traceDebug())
-  {
-     if(theInputConnection)
-     {
-        ossimNotify(ossimNotifyLevel_DEBUG) << "theInputConnection was set to " << getInput()->getClassName() << std::endl;
-     }
-     else
-     {
-        ossimNotify(ossimNotifyLevel_DEBUG) << "theInputConnection was set to NULL" <<  std::endl;
-     }
-     ossimNotify(ossimNotifyLevel_DEBUG) << "Leaving ossimImageSourceFilter::connectInput" << std::endl;
-  }
-}
-void ossimImageSourceFilter::disconnectInputEvent(ossimConnectionEvent& /* event */)
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimImageSourceFilter::disconnectInputEvent" << std::endl;
-   }
-   theInputConnection = PTR_CAST(ossimImageSource, getInput(0));
-   initialize();
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "Leaving ossimImageSourceFilter::disconnectInput" << std::endl;
-   }
-}
-void ossimImageSourceFilter::propertyEvent(ossimPropertyEvent& /* event */)
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimImageSourceFilter::propertyEvent DEBUG: Entering..." << std::endl;
-   }
-   initialize();
-   
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimImageSourceFilter::propertyEvent DEBUG: Leaving..." << std::endl;
-   }
-}
-
-void ossimImageSourceFilter::refreshEvent(ossimRefreshEvent& /* event */)
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimImageSourceFilter::refreshEvent " << std::endl;
-   }
-   initialize();
-   
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimImageSourceFilter::refreshEvent " << std::endl;
-   }
-}
-
-void ossimImageSourceFilter::getOutputBandList(std::vector<ossim_uint32>& bandList) const
-{
-   if(theInputConnection)
-   {
-      return theInputConnection->getOutputBandList(bandList);
-   }
-
-   return ossimImageSource::getOutputBandList(bandList);
-}
-
-void ossimImageSourceFilter::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   ossimImageSource::setProperty(property);
-}
-
-ossimRefPtr<ossimProperty> ossimImageSourceFilter::getProperty(const ossimString& name)const
-{
-   return ossimImageSource::getProperty(name);
-   
-}
-
-void ossimImageSourceFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageSource::getPropertyNames(propertyNames);
-}
diff --git a/src/ossim/imaging/ossimImageSourceSequencer.cpp b/src/ossim/imaging/ossimImageSourceSequencer.cpp
deleted file mode 100644
index d18f9f1..0000000
--- a/src/ossim/imaging/ossimImageSourceSequencer.cpp
+++ /dev/null
@@ -1,403 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-//*******************************************************************
-//  $Id: ossimImageSourceSequencer.cpp 20302 2011-11-29 14:21:12Z dburken $
-#include <ossim/imaging/ossimImageSourceSequencer.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/imaging/ossimImageWriter.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-
-RTTI_DEF2(ossimImageSourceSequencer, "ossimImageSourceSequencer",
-          ossimImageSource, ossimConnectableObjectListener);
-
-static ossimTrace traceDebug("ossimImageSourceSequencer:debug");
-   
-ossimImageSourceSequencer::ossimImageSourceSequencer(ossimImageSource* inputSource,
-                                                     ossimObject* owner)
-:ossimImageSource(owner,
-                  1,
-                  1,
-                  true,
-                  false),
-    theBlankTile(NULL),
-    theAreaOfInterest(0,0,0,0),
-    theTileSize(OSSIM_DEFAULT_TILE_WIDTH, OSSIM_DEFAULT_TILE_HEIGHT),
-    theNumberOfTilesHorizontal(0),
-    theNumberOfTilesVertical(0),
-    theCurrentTileNumber(0)
-{
-   ossim::defaultTileSize(theTileSize);
-   theAreaOfInterest.makeNan();
-   theInputConnection    = inputSource;
-   if(inputSource)
-   {
-     connectMyInputTo(0, inputSource);
-     initialize(); // Derived class depends on this initialization to happen now. DO NOT MOVE.
-   }
-   addListener( (ossimConnectableObjectListener*)this);
-}
-
-ossimImageSourceSequencer::~ossimImageSourceSequencer()
-{
-   removeListener((ossimConnectableObjectListener*)this);
-}
-
-ossim_uint32 ossimImageSourceSequencer::getNumberOfTiles()const
-{
-   return (theNumberOfTilesHorizontal*theNumberOfTilesVertical);
-}
-
-
-ossim_uint32 ossimImageSourceSequencer::getNumberOfTilesHorizontal()const
-{
-   return theNumberOfTilesHorizontal;
-}
-
-ossim_uint32 ossimImageSourceSequencer::getNumberOfTilesVertical()const
-{
-   return theNumberOfTilesVertical;
-}
-
-ossimScalarType ossimImageSourceSequencer::getOutputScalarType() const
-{
-   if(theInputConnection)
-   {
-      return theInputConnection->getOutputScalarType();
-   }
-   
-   return OSSIM_SCALAR_UNKNOWN;
-}
-
-ossimIpt ossimImageSourceSequencer::getTileSize()const
-{
-   return theTileSize;
-}
-
-void ossimImageSourceSequencer::setTileSize(const ossimIpt& tileSize)
-{
-   theTileSize = tileSize;
-   updateTileDimensions();
-//   initialize();
-}
-
-void ossimImageSourceSequencer::setTileSize(int width, int height)
-{
-   setTileSize(ossimIpt(width, height));
-}
-
-void ossimImageSourceSequencer::updateTileDimensions()
-{
-   if(theAreaOfInterest.hasNans() ||
-      theTileSize.hasNans())
-   {
-      theNumberOfTilesHorizontal = 0;
-      theNumberOfTilesVertical   = 0;
-   }
-   else
-   {
-      ossim_int32 width  = theAreaOfInterest.width();
-      ossim_int32 height = theAreaOfInterest.height();
-
-      theNumberOfTilesHorizontal = static_cast<ossim_uint32>(ceil((double)width/(double)theTileSize.x));
-      theNumberOfTilesVertical   = static_cast<ossim_uint32>(ceil((double)height/(double)theTileSize.y));
-   }
-}
-
-void ossimImageSourceSequencer::initialize()
-{
-   theInputConnection = PTR_CAST(ossimImageSource, getInput(0));
-
-   if(theInputConnection)
-   {
-      if(theTileSize.hasNans())
-      {
-         theTileSize.x = theInputConnection->getTileWidth();
-         theTileSize.y = theInputConnection->getTileHeight();
-      }
-
-      ossimDrect rect = theInputConnection->getBoundingRect();
-      if(rect.hasNans())
-      {
-         theAreaOfInterest.makeNan();
-      }
-      else
-      {
-         rect.stretchOut();
-         setAreaOfInterest(rect);
-      }
-      updateTileDimensions();
-      
-      theBlankTile  = ossimImageDataFactory::instance()->create(this,
-                                                                this);
-      if(theBlankTile.valid())
-      {
-         theBlankTile->initialize();
-      }
-   }
-}
-
-bool ossimImageSourceSequencer::canConnectMyInputTo(ossim_int32 /* inputIndex */,
-						    const ossimConnectableObject* object)const
-{      
-  return (object&& PTR_CAST(ossimImageSource, object));
-}
-
-void ossimImageSourceSequencer::connectInputEvent(ossimConnectionEvent& /* event */)
-{
-  initialize();
-}
-
-void ossimImageSourceSequencer::disconnectInputEvent(ossimConnectionEvent& /* event */)
-{
-  theInputConnection = PTR_CAST(ossimImageSource, getInput(0));
-}
-
-ossimIrect ossimImageSourceSequencer::getBoundingRect(ossim_uint32 resLevel)const
-{
-   ossimDrect temp;
-   temp.makeNan();
-
-   if(!theInputConnection) return temp;
-   
-   if(theAreaOfInterest.hasNans())
-   {
-      return theInputConnection->getBoundingRect(resLevel);
-   }
-      
-   return theAreaOfInterest;
-}
-
-void ossimImageSourceSequencer::getDecimationFactor(ossim_uint32 resLevel,
-                                                    ossimDpt& result) const
-{
-   if(theInputConnection)
-   {
-      theInputConnection->getDecimationFactor(resLevel,
-                                              result);
-   }
-   result.makeNan();
-}
-
-void ossimImageSourceSequencer::getDecimationFactors(vector<ossimDpt>& decimations) const
-{
-   if(theInputConnection)
-   {
-      theInputConnection->getDecimationFactors(decimations);
-   }   
-}
-
-ossim_uint32 ossimImageSourceSequencer::getNumberOfDecimationLevels()const
-{
-   if(theInputConnection)
-   {
-      return theInputConnection->getNumberOfDecimationLevels();
-   }
-
-   return 0;
-}
-
-void ossimImageSourceSequencer::setAreaOfInterest(const ossimIrect& areaOfInterest)
-{
-   if(areaOfInterest.hasNans())
-   {
-      theAreaOfInterest.makeNan();
-      theNumberOfTilesHorizontal = 0;
-      theNumberOfTilesVertical   = 0;
-   }
-
-   // let's round it to the nearest pixel value before setting it.
-   theAreaOfInterest = areaOfInterest;
-   updateTileDimensions();
-}
-
-const ossimIrect& ossimImageSourceSequencer::getAreaOfInterest()const
-{
-   return theAreaOfInterest;
-}
-
-void ossimImageSourceSequencer::setToStartOfSequence()
-{
-   theCurrentTileNumber = 0;
-}
-
-ossimRefPtr<ossimImageData> ossimImageSourceSequencer::getTile(
-   const ossimIrect& rect, ossim_uint32 resLevel)
-{
-   if(theInputConnection)
-   {
-      ossimRefPtr<ossimImageData> tile =
-         theInputConnection->getTile(rect, resLevel);
-      if (tile.valid()&&tile->getBuf())
-      {
-         return tile;
-      }
-      else
-      {
-         // We should return a valid tile for the writers.
-         theBlankTile->setImageRectangle(rect);
-         return theBlankTile;
-      }
-   }
-
-   return 0;
-}
-
-ossimRefPtr<ossimImageData> ossimImageSourceSequencer::getNextTile( ossim_uint32 resLevel )
-{
-   ossimRefPtr<ossimImageData> result = 0;
-   if ( theInputConnection )
-   {
-      ossimIrect tileRect;
-      if ( getTileRect( theCurrentTileNumber, tileRect ) )
-      {
-         ++theCurrentTileNumber;
-         result = theInputConnection->getTile(tileRect, resLevel);
-         if( !result.valid() || !result->getBuf() )
-         {	 
-            theBlankTile->setImageRectangle(tileRect);
-            result = theBlankTile;
-         }
-      }
-   }
-   return result;
-}
-
-ossimRefPtr<ossimImageData> ossimImageSourceSequencer::getTile(
-   ossim_int32 id, ossim_uint32 resLevel)
-{
-   static const char* MODULE= "ossimImageSourceSequencer::getTile(id, resLevel)";
-   if(traceDebug())
-   {
-      CLOG << "entering.."<<endl;
-   }
-
-   ossimRefPtr<ossimImageData> result = 0;
-
-   if(theInputConnection)
-   {
-      // if we have no tiles try to initialize.
-      if(getNumberOfTiles() == 0)
-      {
-         initialize();
-      }
-
-      ossimIrect tileRect;
-      if ( getTileRect( id, tileRect ) )
-      {
-         result = theInputConnection->getTile(tileRect, resLevel);
-         if( !result.valid() || !result->getBuf() )
-         {	 
-            theBlankTile->setImageRectangle(tileRect);
-            result = theBlankTile;
-         }
-      }
-      else // getTileRect failed...
-      {
-         if(traceDebug())
-         {
-            CLOG << "was not able to get an origin for id = " << id << endl;
-         }
-      }
-   }
-   else // no connection...
-   {
-      if(traceDebug())
-      {
-         CLOG << "No input connection so returing NULL" << endl;
-      }
-   }
-   if(traceDebug())
-   {
-      CLOG << "leaving.."<<endl;
-   }
-   
-   return result;
-}
-
-bool ossimImageSourceSequencer::getTileOrigin(ossim_int32 id, ossimIpt& origin) const
-{
-   bool result = false;
-   if( id >= 0 )
-   {
-      if( (theNumberOfTilesHorizontal > 0) && (theCurrentTileNumber < getNumberOfTiles()) )
-      {
-         ossim_int32 y = id/static_cast<ossim_int32>(theNumberOfTilesHorizontal);
-         ossim_int32 x = id%static_cast<ossim_int32>(theNumberOfTilesHorizontal);
-         if((x < static_cast<ossim_int32>(theNumberOfTilesHorizontal)) &&
-            (y < static_cast<ossim_int32>(theNumberOfTilesVertical)))
-         {           
-            origin.x = theAreaOfInterest.ul().x + x*theTileSize.x;
-            origin.y = theAreaOfInterest.ul().y + y*theTileSize.y;
-            result = true;
-         }
-      }
-   }
-   return result;
-}
-
-bool ossimImageSourceSequencer::getTileRect(ossim_uint32 tile_id, ossimIrect& tileRect) const
-{
-   // Fetch tile origin for this tile:
-   ossimIpt origin;
-   bool result = getTileOrigin(tile_id, origin);
-   if ( result )
-   {
-      // Establish the tile rect of interest for this tile:
-      tileRect.set_ul (origin);
-      tileRect.set_lrx(origin.x + theTileSize.x - 1);
-      tileRect.set_lry(origin.y + theTileSize.y - 1);
-   }
-   return result;
-}
-
-double ossimImageSourceSequencer::getNullPixelValue(ossim_uint32 band)const
-{
-   if (theInputConnection)
-   {
-      return theInputConnection->getNullPixelValue(band);
-   }
-
-   return ossimImageSource::getNullPixelValue(band);
-}
-
-double ossimImageSourceSequencer::getMinPixelValue(ossim_uint32 band)const
-{
-   if (theInputConnection)
-   {
-      return theInputConnection->getMinPixelValue(band);
-   }
-   
-   return ossimImageSource::getMinPixelValue(band);  
-}
-
-double ossimImageSourceSequencer::getMaxPixelValue(ossim_uint32 band)const
-{
-   if (theInputConnection)
-   {
-      return theInputConnection->getMaxPixelValue(band);
-   }
-   
-   return ossimImageSource::getMaxPixelValue(band);  
-}
-
-ossim_uint32 ossimImageSourceSequencer::getNumberOfInputBands()const
-{
-   if(theInputConnection)
-   {
-      return theInputConnection->getNumberOfOutputBands();
-   }
-
-   return 0;
-}
diff --git a/src/ossim/imaging/ossimImageStatisticsSource.cpp b/src/ossim/imaging/ossimImageStatisticsSource.cpp
deleted file mode 100644
index 1e9c916..0000000
--- a/src/ossim/imaging/ossimImageStatisticsSource.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-#include <ossim/imaging/ossimImageStatisticsSource.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/imaging/ossimImageSourceSequencer.h>
-
-ossimImageStatisticsSource::ossimImageStatisticsSource()
-      :ossimSource(0,
-                   1,
-                   0,
-                   true,
-                   false)
-{
-}
-
-ossimImageStatisticsSource::~ossimImageStatisticsSource()
-{
-   
-}
-
-void ossimImageStatisticsSource::computeStatistics()
-{
-   ossimImageSource* anInterface = PTR_CAST(ossimImageSource,
-                                                     getInput());
-
-   if(anInterface&&isSourceEnabled())
-   {
-      clearStatistics();
-      ossimScalarType outputScalarType = anInterface->getOutputScalarType();
-
-      switch(outputScalarType)
-      {
-         case OSSIM_UCHAR:
-         {
-            computeStatisticsTemplate((ossim_uint8)0);
-            break;
-         }
-         case OSSIM_USHORT16:
-         case OSSIM_USHORT11:
-         {
-            computeStatisticsTemplate((ossim_uint16)0);
-            break;
-         }
-         case OSSIM_SSHORT16:
-         {
-            computeStatisticsTemplate((ossim_sint16)0);
-            break;
-         }
-         case OSSIM_DOUBLE:
-         case OSSIM_NORMALIZED_DOUBLE:
-         {
-            computeStatisticsTemplate((ossim_float64)0);
-            break;
-         }
-         case OSSIM_FLOAT:
-         case OSSIM_NORMALIZED_FLOAT:
-         {
-            computeStatisticsTemplate((ossim_float32)0);
-            break;
-         }
-		 default :
-		 {
-			 break;
-		 }
-      }
-   }
-}
-
-bool ossimImageStatisticsSource::canConnectMyInputTo(ossim_int32 inputIndex,
-                                                     const ossimConnectableObject* object)const
-{
-   return (PTR_CAST(ossimImageSource, object)&&(inputIndex < 1));
-}
-
-template <class T>
-void ossimImageStatisticsSource::computeStatisticsTemplate(T /* dummyVariable */)
-{
-   ossimRefPtr<ossimImageSourceSequencer> sequencer = new ossimImageSourceSequencer;
-
-   sequencer->connectMyInputTo(getInput());
-   sequencer->setToStartOfSequence();
-   ossim_uint32 bands = sequencer->getNumberOfOutputBands();
-
-   if(bands)
-   {
-      setStatsSize(bands);
-      ossimRefPtr<ossimImageData> dataObject;
-      
-      while( (dataObject=sequencer->getNextTile()).valid() )
-      {
-         ossim_uint32 bandIdx = 0;
-         bands = dataObject->getNumberOfBands();
-         ossimDataObjectStatus status = dataObject->getDataObjectStatus();
-         if((status != OSSIM_EMPTY)&&
-            (dataObject->getBuf()))
-         {
-            ossim_uint32 offsetMax = dataObject->getWidth()*dataObject->getHeight();
-            for(bandIdx = 0; bandIdx < bands; ++bandIdx)
-            {
-               ossim_float64 pixelCount = 0.0;
-               ossim_uint32 offset = 0;
-               T* dataPtr   = static_cast<T*>(dataObject->getBuf(bandIdx));
-               T nullPixel = static_cast<T>(dataObject->getNullPix(bandIdx)); 
-               for(offset = 0; offset < offsetMax; ++offset)
-               {
-                  if((*dataPtr) != nullPixel)
-                  {
-                     theMean[bandIdx] += *dataPtr;
-                     if((*dataPtr) < theMin[bandIdx])
-                     {
-                        theMin[bandIdx] = (*dataPtr);
-                     }
-                     if((*dataPtr) > theMax[bandIdx])
-                     {
-                        theMax[bandIdx] = (*dataPtr);
-                     }
-                     ++pixelCount;
-                  }
-                  ++dataPtr;
-               }
-               if(pixelCount > 0)
-               {
-                  theMean[bandIdx] /= pixelCount;
-               }
-            }
-         }
-      }
-   }
-   
-   sequencer->disconnect();
-   sequencer = 0;
-}
-
-const std::vector<ossim_float64>& ossimImageStatisticsSource::getMean()const
-{
-   return theMean;
-}
-
-const std::vector<ossim_float64>& ossimImageStatisticsSource::getMin()const
-{
-   return theMin;
-}
-
-const std::vector<ossim_float64>& ossimImageStatisticsSource::getMax()const
-{
-   return theMax;
-}
-
-void ossimImageStatisticsSource::clearStatistics()
-{
-   theMean.clear();
-   theMin.clear();
-   theMax.clear();
-}
-
-void ossimImageStatisticsSource::setStatsSize(ossim_uint32 size)
-{
-   theMean.resize(size);
-   theMin.resize(size);
-   theMax.resize(size);
-
-   std::fill(theMean.begin(),
-             theMean.end(),
-             (ossim_float64)0.0);
-   std::fill(theMin.begin(),
-             theMin.end(),
-             OSSIM_DEFAULT_MAX_PIX_DOUBLE);
-   std::fill(theMax.begin(),
-             theMax.end(),
-             (ossim_float64)OSSIM_DEFAULT_MIN_PIX_DOUBLE);
-}
diff --git a/src/ossim/imaging/ossimImageToPlaneNormalFilter.cpp b/src/ossim/imaging/ossimImageToPlaneNormalFilter.cpp
deleted file mode 100644
index 2e74e81..0000000
--- a/src/ossim/imaging/ossimImageToPlaneNormalFilter.cpp
+++ /dev/null
@@ -1,467 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimImageToPlaneNormalFilter.cpp 21631 2012-09-06 18:10:55Z dburken $
-#include <ossim/imaging/ossimImageToPlaneNormalFilter.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimNumericProperty.h>
-#include <ossim/base/ossimBooleanProperty.h>
-
-static const char* SMOOTHNESS_FACTOR_KW="smoothness_factor";
-
-RTTI_DEF1(ossimImageToPlaneNormalFilter, "ossimImageToPlaneNormalFilter", ossimImageSourceFilter);
-
-ossimImageToPlaneNormalFilter::ossimImageToPlaneNormalFilter()
-   :ossimImageSourceFilter(),
-    theTile(NULL),
-    theBlankTile(NULL),
-    theTrackScaleFlag(true),
-    theXScale(1.0),
-    theYScale(1.0),
-    theSmoothnessFactor(1.0)
-{
-}
-
-ossimImageToPlaneNormalFilter::ossimImageToPlaneNormalFilter(ossimImageSource* inputSource)
-   :ossimImageSourceFilter(inputSource),
-    theTile(NULL),
-    theBlankTile(NULL),
-    theTrackScaleFlag(true),
-    theXScale(1.0),
-    theYScale(1.0),
-    theSmoothnessFactor(1.0)
-{
-}
-
-ossimRefPtr<ossimImageData> ossimImageToPlaneNormalFilter::getTile(
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   if(!isSourceEnabled()||!theInputConnection)
-   {
-      return ossimImageSourceFilter::getTile(tileRect, resLevel);
-   }
-
-   if(!theTile.valid())
-   {
-      initialize();
-   }
-
-   if(!theTile.valid())
-   {
-      return ossimImageSourceFilter::getTile(tileRect, resLevel);
-   }
-
-   theTile->setImageRectangle(tileRect);
-
-   ossimIrect requestRect(tileRect.ul().x - 1,
-                          tileRect.ul().y - 1,
-                          tileRect.lr().x + 1,
-                          tileRect.lr().y + 1);
-
-   ossimRefPtr<ossimImageData> input =
-      theInputConnection->getTile(requestRect, resLevel);
-
-   if(!input||(input->getDataObjectStatus()==OSSIM_EMPTY)||!input->getBuf())
-   {
-      if(tileRect.completely_within(theInputBounds))
-      {
-         initializeTile();
-         theTile->validate();
-         return theTile.get();
-      }
-      theBlankTile->setImageRectangle(tileRect);
-      return theBlankTile;
-   }
-
-   double oldScaleX = theXScale;
-   double oldScaleY = theYScale;
-
-   if(resLevel > 0)
-   {
-      ossimDpt scaleFactor;
-      theInputConnection->getDecimationFactor(resLevel, scaleFactor);
-
-      if(!scaleFactor.hasNans())
-      {
-         theXScale *= scaleFactor.x;
-         theYScale *= scaleFactor.y;
-      }
-   }
-
-   computeNormals(input, theTile);
-
-   theXScale = oldScaleX;
-   theYScale = oldScaleY;
-
-   theTile->validate();
-
-   return theTile;
-}
-
-void ossimImageToPlaneNormalFilter::initializeTile()
-{
-   double* x = static_cast<double*>(theTile->getBuf(0));
-   double* y = static_cast<double*>(theTile->getBuf(1));
-   double* z = static_cast<double*>(theTile->getBuf(2));
-   
-   if(x) std::fill(x, x+theTile->getSizePerBand(), 0.0);
-   if(y) std::fill(y, y+theTile->getSizePerBand(), 0.0);
-   if(z) std::fill(z, z+theTile->getSizePerBand(), 1.0);
-}
-
-void ossimImageToPlaneNormalFilter::initialize()
-{
-   if(theInputConnection)
-   {
-      theInputConnection->initialize();
-      
-      theInputBounds = theInputConnection->getBoundingRect();
-      theTile      = ossimImageDataFactory::instance()->create(this, this);
-      theBlankTile = (ossimImageData*)(theTile->dup());
-      theTile->initialize();
-
-      if(theTrackScaleFlag)
-      {
-         ossimRefPtr<ossimImageGeometry> geom = theInputConnection->getImageGeometry();
-         if( geom.valid() )
-         {
-            ossimDpt pt = geom->getMetersPerPixel();
-            if(!pt.hasNans())
-            {
-               theXScale = 1.0/pt.x;
-               theYScale = 1.0/pt.y;
-            }
-         }
-      }
-   }
-}
-
-void ossimImageToPlaneNormalFilter::computeNormals(
-   ossimRefPtr<ossimImageData>& inputTile,
-   ossimRefPtr<ossimImageData>& outputTile)
-{
-   switch(inputTile->getScalarType())
-   {
-      case OSSIM_SSHORT16:
-      {
-         computeNormalsTemplate((ossim_sint16)0,
-                                inputTile,
-                                outputTile);
-         break;
-      }
-      case OSSIM_UCHAR:
-      {
-         computeNormalsTemplate((ossim_uint8)0,
-                                inputTile,
-                                outputTile);
-         break;
-      }
-      case OSSIM_USHORT11:
-      case OSSIM_USHORT16:
-      {
-         computeNormalsTemplate((ossim_uint16)0,
-                                inputTile,
-                                outputTile);
-         break;
-      }
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_DOUBLE:
-      {
-         computeNormalsTemplate((ossim_float64)0,
-                                inputTile,
-                                outputTile);
-         break;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT:
-      {
-         computeNormalsTemplate((ossim_float32)0,
-                                inputTile,
-                                outputTile);
-         break;
-      }
-      default:
-         break;
-   }
-}
-
-template <class T> void ossimImageToPlaneNormalFilter::computeNormalsTemplate(
-   T /* inputScalarTypeDummy */,
-   ossimRefPtr<ossimImageData>& inputTile,
-   ossimRefPtr<ossimImageData>& outputTile)
-{
-   T inputNull = (T)inputTile->getNullPix(0);
-   T* inbuf = (T*)inputTile->getBuf();
-
-   double* normX = (double*)outputTile->getBuf(0);
-   double* normY = (double*)outputTile->getBuf(1);
-   double* normZ = (double*)outputTile->getBuf(2);
-   ossim_int32 inbuf_width = inputTile->getWidth();
-   ossim_int32 normbuf_width = outputTile->getWidth();
-   ossim_int32 normbuf_height = outputTile->getHeight();
-   ossimColumnVector3d normal;
-
-   for (ossim_int32 y=0; y<normbuf_height; y++)
-   {
-      // Establish offsets into the image and output normals buffers given row:
-      ossim_uint32 n = y*normbuf_width;
-      ossim_uint32 i = (y+1)*inbuf_width + 1;
-      
-      // Loop to compute the gradient (normal) vector [dh/dx, dh/dy, 1]:
-      for (ossim_int32 x=0; x<normbuf_width; x++)
-      {
-         // Default in case of null inputs is a flat earth:
-         normal[0] = 0;
-         normal[1] = 0;
-         normal[2] = 1.0;
-
-         // Compute the x-direction differential:
-         if (inbuf[i+1] != inputNull)
-         {
-            if (inbuf[i-1] != inputNull)
-               normal[0] = theXScale*theSmoothnessFactor*(inbuf[i+1] - inbuf[i-1]) / 2.0;
-            else if (inbuf[i] != inputNull)
-               normal[0] = theXScale*theSmoothnessFactor*(inbuf[i+1] - inbuf[i]);
-         }
-         else if ((inbuf[i] != inputNull) && (inbuf[i-1] != inputNull))
-         {
-            normal[0] = theXScale*theSmoothnessFactor*(inbuf[i] - inbuf[i-1]);
-         }
-
-         // Compute the y-direction differential:
-         if (inbuf[i+inbuf_width] != inputNull)
-         {
-            if (inbuf[i-inbuf_width] != inputNull)
-               normal[1] = theYScale*theSmoothnessFactor*(inbuf[i+inbuf_width] - inbuf[i-inbuf_width]) / 2.0;
-            else if (inbuf[i] != inputNull)
-               normal[1] = theYScale*theSmoothnessFactor*(inbuf[i+inbuf_width] - inbuf[i]);
-         }
-         else if ((inbuf[i] != inputNull) && (inbuf[i-inbuf_width] != inputNull))
-         {
-            normal[1] = theYScale*theSmoothnessFactor*(inbuf[i] - inbuf[i-inbuf_width]);
-         }
-
-         // Stuff the normalized gradient vector into the output buffers:
-         normal = normal.unit();
-         normX[n] = normal[0];
-         normY[n] = normal[1];
-         normZ[n] = normal[2];
-         
-         ++n;
-         ++i;
-      }
-   }
-}
-
-bool ossimImageToPlaneNormalFilter::loadState(const ossimKeywordlist& kwl,
-                                              const char* prefix)
-{
-   ossimString scaleX     = kwl.find(prefix, ossimKeywordNames::SCALE_PER_PIXEL_X_KW);
-   ossimString scaleY     = kwl.find(prefix, ossimKeywordNames::SCALE_PER_PIXEL_Y_KW);
-   ossimString trackFlag  = kwl.find(prefix, "track_scale_flag");
-   ossimString smoothness = kwl.find(prefix, SMOOTHNESS_FACTOR_KW);
-
-   if(scaleX != "")
-   {
-      theXScale = scaleX.toDouble();
-   }
-   if(scaleY != "")
-   {
-      theYScale = scaleY.toDouble();
-   }
-   if(trackFlag != "")
-   {
-      theTrackScaleFlag = trackFlag.toBool();
-   }
-   if(smoothness!="")
-   {
-      theSmoothnessFactor = smoothness.toDouble();
-   }
-
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
-
-bool ossimImageToPlaneNormalFilter::saveState(ossimKeywordlist& kwl,
-                                              const char* prefix)const
-{
-   kwl.add(prefix,
-           ossimKeywordNames::SCALE_PER_PIXEL_X_KW,
-           theXScale,
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::SCALE_PER_PIXEL_Y_KW,
-           theXScale,
-           true);
-
-   kwl.add(prefix,
-           "track_scale_flag",
-           (ossim_uint32)theTrackScaleFlag,
-           true);
-
-   kwl.add(prefix,
-           SMOOTHNESS_FACTOR_KW,
-           theSmoothnessFactor,
-           true);
-
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
-
-double ossimImageToPlaneNormalFilter::getMinPixelValue(ossim_uint32 band)const
-{
-   if(!isSourceEnabled())
-   {
-      return ossimImageSourceFilter::getMinPixelValue(band);
-   }
-   return -1;
-}
-
-double ossimImageToPlaneNormalFilter::getMaxPixelValue(ossim_uint32 band)const
-{
-   if(!isSourceEnabled())
-   {
-      return ossimImageSourceFilter::getMaxPixelValue(band);
-   }
-   return 1.0;
-}
-
-ossimScalarType ossimImageToPlaneNormalFilter::getOutputScalarType() const
-{
-   if(isSourceEnabled())
-   {
-      return OSSIM_DOUBLE;
-   }
-   
-   return ossimImageSourceFilter::getOutputScalarType();
-}
-
-ossim_uint32 ossimImageToPlaneNormalFilter::getNumberOfOutputBands() const
-{
-   if(isSourceEnabled())
-   {
-      return 3;
-   }
-   return ossimImageSourceFilter::getNumberOfOutputBands();
-}
-
-void ossimImageToPlaneNormalFilter::setXScale(const double& scale)
-{
-   theXScale = scale;
-}
-
-double ossimImageToPlaneNormalFilter::getXScale()const
-{
-   return theXScale;
-}
-
-double ossimImageToPlaneNormalFilter::getYScale()const
-{
-   return theYScale;
-}
-
-void ossimImageToPlaneNormalFilter::setYScale(const double& scale)
-{
-   theYScale = scale;
-}
-
-void ossimImageToPlaneNormalFilter::setTrackScaleFlag(bool flag)
-{
-   theTrackScaleFlag = flag;
-}
-
-bool ossimImageToPlaneNormalFilter::getTrackScaleFlag()const
-{
-   return theTrackScaleFlag;
-}
-
-void ossimImageToPlaneNormalFilter::setSmoothnessFactor(double value)
-{
-   theSmoothnessFactor = value;
-}
-
-double ossimImageToPlaneNormalFilter::getSmoothnessFactor()const
-{
-   return theSmoothnessFactor;
-}
-
-void ossimImageToPlaneNormalFilter::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   ossimString name = property->getName();
-   if((name == "smoothnessFactor")||
-      (name == "gain"))
-   {
-      theSmoothnessFactor = property->valueToString().toDouble();
-      initialize();
-   }
-   else if(name == "xscale")
-   {
-      theXScale = property->valueToString().toDouble();
-      initialize();
-   }
-   else if(name == "yscale")
-   {
-      theYScale = property->valueToString().toDouble();
-      initialize();
-   }
-   else if(name == "autoTrackScaleFlag")
-   {
-      theTrackScaleFlag = property->valueToString().toDouble();
-      initialize();
-   }
-   else
-   {
-      ossimImageSourceFilter::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimImageToPlaneNormalFilter::getProperty(const ossimString& name)const
-{
-   if((name == "smoothnessFactor")||
-      (name == "gain"))
-   {
-      ossimNumericProperty* prop = new ossimNumericProperty("gain", ossimString::toString(theSmoothnessFactor), .0001, 40);
-      prop->setCacheRefreshBit();
-      return prop;
-   }
-   else if(name == "xscale")
-   {
-      ossimNumericProperty* prop = new ossimNumericProperty(name, ossimString::toString(theXScale), .0001, 50000);
-      prop->setCacheRefreshBit();
-      return prop;
-   }
-   else if(name == "yscale")
-   {
-      ossimNumericProperty* prop = new ossimNumericProperty(name, ossimString::toString(theYScale), .0001, 50000);
-      prop->setCacheRefreshBit();
-      return prop;
-   }
-   else if(name == "autoTrackScaleFlag")
-   {
-      ossimBooleanProperty* prop = new ossimBooleanProperty(name, theTrackScaleFlag);
-      prop->setCacheRefreshBit();
-      return prop;
-   }
-   
-   return ossimImageSourceFilter::getProperty(name);
-}
-
-void ossimImageToPlaneNormalFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageSourceFilter::getPropertyNames(propertyNames);
-   propertyNames.push_back("gain");
-   propertyNames.push_back("xscale");
-   propertyNames.push_back("yscale");
-   propertyNames.push_back("autoTrackScaleFlag");
-}
diff --git a/src/ossim/imaging/ossimImageWriterFactory.cpp b/src/ossim/imaging/ossimImageWriterFactory.cpp
deleted file mode 100644
index 6f491c6..0000000
--- a/src/ossim/imaging/ossimImageWriterFactory.cpp
+++ /dev/null
@@ -1,372 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-// $Id: ossimImageWriterFactory.cpp 22242 2013-04-20 02:16:06Z gpotts $
-
-#include <ossim/imaging/ossimImageWriterFactory.h>
-#include <ossim/base/ossimImageTypeLut.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/imaging/ossimGeneralRasterWriter.h>
-#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
-#include <ossim/imaging/ossimJpegWriter.h>
-#include <ossim/imaging/ossimNitfWriter.h>
-#include <ossim/imaging/ossimNitf20Writer.h>
-#include <ossim/imaging/ossimPdfWriter.h>
-#include <ossim/imaging/ossimTiffWriter.h>
-
-ossimImageWriterFactory* ossimImageWriterFactory::theInstance = (ossimImageWriterFactory*)NULL;
-
-
-ossimImageWriterFactory* ossimImageWriterFactory::instance()
-{
-   if(!theInstance)
-   {
-      theInstance = new ossimImageWriterFactory;
-      ossimImageWriterFactoryRegistry::instance()->registerFactory(theInstance);
-   }
-
-   return theInstance;
-}
-
-ossimImageWriterFactory::~ossimImageWriterFactory()
-{
-   theInstance = (ossimImageWriterFactory*)NULL;
-}
-
-ossimImageFileWriter *ossimImageWriterFactory::createWriterFromExtension(
-   const ossimString& fileExtension)const
-{
-   ossimImageFileWriter* result = 0;
-
-   ossimString ext = fileExtension;
-   ext.downcase();
-   
-   if( (ext == "tif")|| (ext == "tiff") )
-   {
-      result = new ossimTiffWriter;
-   }
-   else if( (ext == "jpg")|| (ext == "jpeg") )
-   {
-      result = new ossimJpegWriter;
-   }
-   else if( (ext == "ras") || (ext == "bsq") )
-   {
-      // Default is OSSIM_GENERAL_RASTER_BSQ
-      result = new ossimGeneralRasterWriter;
-   }
-   else if(ext == "bil")
-   {
-      result = new ossimGeneralRasterWriter;
-      result->setOutputImageType(OSSIM_GENERAL_RASTER_BIL);
-   }
-   else if(ext == "bip")
-   {
-      result = new ossimGeneralRasterWriter;
-      result->setOutputImageType(OSSIM_GENERAL_RASTER_BIP);
-   }
-   else if((ext == "ntf")||
-           (ext == "nitf"))
-   {
-      result = new ossimNitfWriter;
-   }
-   else if( ext == "pdf" )
-   {
-      result = new ossimPdfWriter;
-   }
-   
-   return result;
-}
-
-ossimImageFileWriter*
-ossimImageWriterFactory::createWriter(const ossimKeywordlist& kwl,
-                                      const char *prefix)const
-{
-   ossimString type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
-   ossimImageFileWriter* result = (ossimImageFileWriter*)NULL;
-   
-   if(type != "")
-   {
-      result = createWriter(type);
-      if (result)
-      {
-         if (result->hasImageType(type))
-         {
-            ossimKeywordlist kwl2(kwl);
-            kwl2.add(prefix,
-                     ossimKeywordNames::IMAGE_TYPE_KW,
-                     type,
-                     true);
-         
-            result->loadState(kwl2, prefix);
-         }
-         else
-         {
-            result->loadState(kwl, prefix);
-         }
-      }
-   }
-
-   return result;
-}
-
-ossimImageFileWriter*
-ossimImageWriterFactory::createWriter(const ossimString& typeName)const
-{
-   ossimString mimeType = typeName;
-   mimeType = mimeType.downcase();
-	
-   // Check for tiff writer.
-   ossimRefPtr<ossimImageFileWriter> writer = createFromMimeType(mimeType);
-	
-   if(writer.valid())
-   {
-      return writer.release();
-   }
- 
-   writer = new ossimTiffWriter;
-   
-   if (STATIC_TYPE_NAME(ossimTiffWriter) == typeName )
-   {
-      return writer.release();
-   }
-   else
-   {
-      // See if the type name is supported by the writer.
-      if ( writer->hasImageType(typeName) )
-      {
-         writer->setOutputImageType(typeName);
-         return writer.release();
-      }
-   }
-
-   // Check for jpeg writer.
-   writer = new ossimJpegWriter;
-   if ( writer->getClassName() == typeName )
-   {
-      return writer.release();
-   }
-   else
-   {
-      // See if the type name is supported by the writer.
-      if ( writer->hasImageType(typeName) )
-      {
-         writer->setOutputImageType(typeName);
-         return writer.release();
-      }
-   }
-	
-   // Check for general raster writer.
-   writer = new ossimGeneralRasterWriter;
-   if ( writer->getClassName() == typeName )
-   {
-      return writer.release();
-   }
-   else
-   {
-      // See if the type name is supported by the writer.
-      if ( writer->hasImageType(typeName) )
-      {
-         writer->setOutputImageType(typeName);
-         return writer.release();
-      }
-   }
-
-   // Check for nitf writer.
-   writer = new ossimNitfWriter;
-   if ( writer->getClassName() == typeName )
-   {
-      return writer.release();
-   }
-   else
-   {
-      // See if the type name is supported by the writer.
-      if ( writer->hasImageType(typeName) )
-      {
-         writer->setOutputImageType(typeName);
-         return writer.release();
-      }
-   }
-
-   // Check for nitf writer.
-   writer = new ossimNitf20Writer;
-   if ( writer->getClassName() == typeName )
-   {
-      return writer.release();
-   }
-   else
-   {
-      // See if the type name is supported by the writer.
-      if ( writer->hasImageType(typeName) )
-      {
-         writer->setOutputImageType(typeName);
-         return writer.release();
-      }
-   }
-
-   // Check for pdf writer.
-   writer = new ossimPdfWriter;
-   if ( writer->getClassName() == typeName )
-   {
-      return writer.release();
-   }
-   else
-   {
-      // See if the type name is supported by the writer.
-      if ( writer->hasImageType(typeName) )
-      {
-         writer->setOutputImageType(typeName);
-         return writer.release();
-      }
-   }
-   
-   writer = 0; // Not a nitf writer.   
-
-   return writer.release(); // Return a null writer.
-}
-
-ossimImageFileWriter* ossimImageWriterFactory::createFromMimeType(
-   const ossimString& mimeType)const
-{
-   if((mimeType == "image/jpeg")||
-      (mimeType == "image/jpg"))
-   {
-      ossimJpegWriter* writer = new ossimJpegWriter;
-      writer->setOutputImageType("jpeg");
-      return writer;
-   }
-   else if((mimeType == "image/tiff")||
-           (mimeType == "image/tif")||
-           (mimeType == "image/gtif")||
-           (mimeType == "image/gtiff"))
-   {
-      ossimTiffWriter* writer = new ossimTiffWriter;
-      writer->setOutputImageType("tiff_tiled_band_separate");
-      return writer;
-   }
-   else if((mimeType == "image/nitf") ||
-           (mimeType == "image/ntf"))
-   {
-      ossimNitfWriter* writer = new ossimNitfWriter;
-      writer->setOutputImageType("nitf_block_band_separate");
-      return writer;
-   }
-   else if((mimeType == "image/ras"))
-   {
-      ossimGeneralRasterWriter* writer = new ossimGeneralRasterWriter;
-      writer->setOutputImageType("general_raster_bsq");
-      return writer;
-   }
-   else if((mimeType == "application/pdf")||
-           (mimeType == "image/pdf"))
-   {
-      ossimPdfWriter* writer = new ossimPdfWriter;
-      writer->setOutputImageType("ossim_pdf");
-      return writer;
-   }
-   return 0;
-}
-
-ossimObject* ossimImageWriterFactory::createObject(const ossimKeywordlist& kwl,
-                                                   const char *prefix)const
-{
-   return createWriter(kwl, prefix);
-}
-
-ossimObject* ossimImageWriterFactory::createObject(const ossimString& typeName)const
-{
-   return createWriter(typeName);
-}
-
-
-void ossimImageWriterFactory::getExtensions(std::vector<ossimString>& result)const
-{
-   result.push_back("ras");
-   result.push_back("bsq");
-   result.push_back("bil");
-   result.push_back("bip");
-   result.push_back("tif");
-   result.push_back("jpg");
-   result.push_back("ntf");
-   result.push_back("pdf");
-}
-
-void ossimImageWriterFactory::getTypeNameList(std::vector<ossimString>& typeList)const
-{
-   typeList.push_back(STATIC_TYPE_NAME(ossimTiffWriter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimJpegWriter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimGeneralRasterWriter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimNitfWriter));
-   typeList.push_back(STATIC_TYPE_NAME(ossimNitf20Writer));
-   typeList.push_back(STATIC_TYPE_NAME(ossimPdfWriter));   
-}
-
-void ossimImageWriterFactory::getImageFileWritersBySuffix(
-   ossimImageWriterFactoryBase::ImageFileWriterList& result, const ossimString& ext)const
-{
-   ossimString testExt = ext.downcase();
-   if(testExt == "tiff" || testExt == "tif")
-   {
-      result.push_back(new ossimTiffWriter);
-   }
-   else if(testExt == "ntf" || testExt == "nitf")
-   {
-      result.push_back(new ossimNitfWriter);
-   }
-   else if(testExt == "jpg" || testExt == "jpeg")
-   {
-      result.push_back(new ossimJpegWriter);
-   }
-   else if(testExt == "ras" || testExt == "bsq" || testExt == "bil" || testExt == "bip")
-   {
-      result.push_back(new ossimGeneralRasterWriter);
-   }
-   else if( testExt == "pdf" )
-   {
-      result.push_back( new ossimPdfWriter );
-   }
-}
-
-void ossimImageWriterFactory::getImageFileWritersByMimeType(
-   ossimImageWriterFactoryBase::ImageFileWriterList& result, const ossimString& mimeType ) const
-{
-   ossimString testExt = mimeType.downcase();
-   testExt = ossimString(testExt.begin()+6, testExt.end());
-   
-   getImageFileWritersBySuffix(result, testExt);
-}
-
-void ossimImageWriterFactory::getImageTypeList( std::vector<ossimString>& imageTypeList ) const
-{
-   // Add the tiff writer types.
-   ossimRefPtr<ossimImageFileWriter> writer = new ossimTiffWriter;
-   writer->getImageTypeList(imageTypeList);
-
-   // Add the jpeg writer types.
-   writer = new ossimJpegWriter;
-   writer->getImageTypeList(imageTypeList);
-
-   // Add the general raster writer types.
-   writer = new ossimGeneralRasterWriter;
-   writer->getImageTypeList(imageTypeList);
-
-   // Add the nitf writer types.
-   writer = new ossimNitfWriter;
-   writer->getImageTypeList(imageTypeList);
-   
-   // Add the nitf writer types.
-   writer = new ossimNitf20Writer;
-   writer->getImageTypeList(imageTypeList);
-   
-   // Add the pdf writer types.
-   writer = new ossimPdfWriter;
-   writer->getImageTypeList(imageTypeList);
-   
-   writer = 0;
-}
diff --git a/src/ossim/imaging/ossimImageWriterFactoryRegistry.cpp b/src/ossim/imaging/ossimImageWriterFactoryRegistry.cpp
deleted file mode 100644
index 39dfb71..0000000
--- a/src/ossim/imaging/ossimImageWriterFactoryRegistry.cpp
+++ /dev/null
@@ -1,284 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Frank Warmerdam (warmerda at home.com)
-//
-//*******************************************************************
-//  $Id: ossimImageWriterFactoryRegistry.cpp 19907 2011-08-05 19:55:46Z dburken $
-
-#include <ossim/imaging/ossimImageWriterFactory.h>
-#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
-#include <ossim/imaging/ossimImageFileWriter.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimObjectFactoryRegistry.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimString.h>
-#include <algorithm>
-#include <iterator>
-#include <ostream>
-
-ossimImageWriterFactoryRegistry* ossimImageWriterFactoryRegistry::theInstance = NULL;
-
-ossimImageWriterFactoryRegistry::ossimImageWriterFactoryRegistry()
-{
-}
-
-ossimImageWriterFactoryRegistry* ossimImageWriterFactoryRegistry::instance()
-{
-   if(!theInstance)
-   {
-      theInstance = new ossimImageWriterFactoryRegistry;
-      ossimObjectFactoryRegistry::instance()->registerFactory(theInstance);
-      ossimImageWriterFactory::instance();
-   }
-
-   return theInstance;
-}
-
-
-ossimImageFileWriter* ossimImageWriterFactoryRegistry::createWriter(const ossimFilename& filename)const
-{
-   ossimImageFileWriter * writer = createWriterFromExtension(filename.ext().downcase());
-   if(writer)
-   {
-      writer->setFilename(filename);
-   }
-   
-   return writer;
-}
-
-ossimObject* ossimImageWriterFactoryRegistry::createObject(const ossimKeywordlist &kwl,
-                                                           const char *prefix)const
-{
-   return createObjectFromRegistry(kwl, prefix);
-}
-
-ossimObject* ossimImageWriterFactoryRegistry::createObject(const ossimString& typeName)const
-{
-   return createObjectFromRegistry(typeName);
-}
-
-void ossimImageWriterFactoryRegistry::getTypeNameList(std::vector<ossimString>& typeList)const
-{
-   getAllTypeNamesFromRegistry(typeList);
-}
-
-ossimImageFileWriter *ossimImageWriterFactoryRegistry::createWriterFromExtension(const ossimString& fileExtension)const
-{
-   ossimImageFileWriter *writer = NULL;
-   ossimImageWriterFactoryBase::ImageFileWriterList result;
-   getImageFileWritersBySuffix(result, fileExtension);
-   if(!result.empty())
-   {
-      writer = result[0].release();
-      result.clear();
-   }
-   return writer;
-}
-
-ossimImageFileWriter *ossimImageWriterFactoryRegistry::createWriter(const ossimKeywordlist &kwl,
-                                                                const char *prefix)const
-{
-   // let's see if we ned to return an object based on extension.
-   // this is specified by the type to be a generic
-   // ossimImageFileWriter
-   //
-   ossimString type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
-
-   if(type == "ossimImageFileWriter")
-   {
-      ossimFilename filename = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
-
-      if((filename != "")&&
-         (filename.ext() != ""))
-      {
-         ossimImageFileWriter* writer = createWriterFromExtension(filename.ext());
-
-         if(writer)
-         {
-            writer->setFilename(filename);
-         }
-         return writer;
-      }
-   }
-   
-   vector<ossimImageWriterFactoryBase*>::const_iterator factories;
-   ossimImageFileWriter *result = NULL;
-
-   factories = m_factoryList.begin();
-   while(factories != m_factoryList.end())
-   {
-      result = (*factories)->createWriter(kwl, prefix);
-      if(result)
-      {
-         return result;
-      }
-      ++factories;
-   }
-
-   return result;
-}
-
-ossimImageFileWriter *ossimImageWriterFactoryRegistry::createWriter(const ossimString& typeName)const
-{
-   vector<ossimImageWriterFactoryBase*>::const_iterator factories;
-   ossimImageFileWriter *result = NULL;
-
-   factories = m_factoryList.begin();
-   while(factories != m_factoryList.end())
-   {
-      result = (*factories)->createWriter(typeName);
-      if(result)
-      {
-         return result;
-      }
-      ++factories;
-   }
-
-   return result;
-}
-
-
-void ossimImageWriterFactoryRegistry::getImageTypeList(std::vector<ossimString>& typeList)const
-{
-   vector<ossimString> result;
-   vector<ossimImageWriterFactoryBase*>::const_iterator iter = m_factoryList.begin();
-   
-   while(iter != m_factoryList.end())
-   {
-      result.clear();
-      (*iter)->getImageTypeList(result);
-      
-      // now append to the end of the typeList.
-      typeList.insert(typeList.end(),
-                      result.begin(),
-                      result.end());
-      ++iter;
-   }  
-}
-
-void ossimImageWriterFactoryRegistry::getImageFileWritersBySuffix(ossimImageWriterFactoryBase::ImageFileWriterList& result,
-                                                                  const ossimString& ext)const
-{
-   ossimImageWriterFactoryBase::ImageFileWriterList tempResult;
-   vector<ossimImageWriterFactoryBase*>::const_iterator iter = m_factoryList.begin();
-   
-   while(iter != m_factoryList.end())
-   {
-      result.clear();
-      (*iter)->getImageFileWritersBySuffix(tempResult, ext);
-      
-      // now append to the end of the typeList.
-      result.insert(result.end(),
-                      tempResult.begin(),
-                      tempResult.end());
-      ++iter;
-   }  
-   
-}
-
-void ossimImageWriterFactoryRegistry::getImageFileWritersByMimeType(ossimImageWriterFactoryBase::ImageFileWriterList& result,
-                                                                    const ossimString& mimeType)const
-{
-   ossimImageWriterFactoryBase::ImageFileWriterList tempResult;
-   vector<ossimImageWriterFactoryBase*>::const_iterator iter = m_factoryList.begin();
-   
-   while(iter != m_factoryList.end())
-   {
-      result.clear();
-      (*iter)->getImageFileWritersByMimeType(tempResult, mimeType);
-      
-      // now append to the end of the typeList.
-      result.insert(result.end(),
-                    tempResult.begin(),
-                    tempResult.end());
-      ++iter;
-   }  
-}
-
-std::ostream& ossimImageWriterFactoryRegistry::printImageTypeList(
-   std::ostream& out)const
-{
-   std::vector<ossimString> outputType;
-   
-   this->getImageTypeList(outputType);
-   std::copy(outputType.begin(),
-             outputType.end(),
-             std::ostream_iterator<ossimString>(out, "\n"));
-   out << std::endl;
-   return out;
-}
-
-std::ostream& ossimImageWriterFactoryRegistry::printWriterProps(std::ostream& out)const
-{
-   // Loop through factories:
-   vector<ossimImageWriterFactoryBase*>::const_iterator factoryIter = m_factoryList.begin();
-   while( factoryIter != m_factoryList.end() )
-   {
-      out << "factory: " << (*factoryIter)->getClassName() << "\n\n";
-
-      // Loop through writer classes in factory.
-      std::vector<ossimString> typeNames;
-      (*factoryIter)->getTypeNameList(typeNames);
-      std::vector<ossimString>::const_iterator typeNamesIter = typeNames.begin();
-      while (typeNamesIter != typeNames.end())
-      {
-         ossimRefPtr<ossimImageFileWriter> writer = (*factoryIter)->createWriter(*typeNamesIter);
-         if ( writer.valid() )
-         {
-            out << "writer:\n" << writer->getClassName() << "\n";
-
-            // Loop through writer types, e.g. tiff_tiled_band_separate
-            std::vector<ossimString> imageTypeList;
-            writer->getImageTypeList(imageTypeList);
-            std::vector<ossimString>::const_iterator imageTypeListIter = imageTypeList.begin();
-            out << "\ntypes:\n";
-            while ( imageTypeListIter != imageTypeList.end() )
-            {
-               out << (*imageTypeListIter) << "\n";
-               ++imageTypeListIter;
-            }
-
-            // Loop through writer properties, e.g. compression_quality.
-            out << "\nproperties:\n";
-            std::vector<ossimString> propNames;
-            writer->getPropertyNames(propNames);
-            std::vector<ossimString>::const_iterator propNamesIter = propNames.begin();
-            while ( propNamesIter != propNames.end() )
-            {
-               out << (*propNamesIter) << "\n";
-               
-               ++propNamesIter;
-            }
-            out << "\n";
-         }
-
-         ++typeNamesIter;
-      }
-      
-      ++factoryIter;
-   }
-   return out;
-}
-
-extern "C"
-{
-  void* ossimImageWriterFactoryRegistryGetInstance()
-  {
-    return ossimImageWriterFactoryRegistry::instance();
-  }
-}
-
-ossimImageWriterFactoryRegistry::ossimImageWriterFactoryRegistry(const ossimImageWriterFactoryRegistry&)
-   :
-      ossimObjectFactory()
-{
-}
-
-void ossimImageWriterFactoryRegistry::operator=(const ossimImageWriterFactoryRegistry&)
-{
-}
diff --git a/src/ossim/imaging/ossimIndexToRgbLutFilter.cpp b/src/ossim/imaging/ossimIndexToRgbLutFilter.cpp
deleted file mode 100644
index 1f821a2..0000000
--- a/src/ossim/imaging/ossimIndexToRgbLutFilter.cpp
+++ /dev/null
@@ -1,626 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimIndexToRgbLutFilter.cpp 17206 2010-04-25 23:20:40Z dburken $
-#include <ossim/imaging/ossimIndexToRgbLutFilter.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/base/ossimRgbVector.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimFilenameProperty.h>
-#include <ossim/base/ossimStringProperty.h>
-
-static const ossimTrace traceDebug("ossimIndexToRgbLutFilter:debug");
-
-RTTI_DEF1(ossimIndexToRgbLutFilter, "ossimIndexToRgbLutFilter", ossimImageSourceFilter);
-
-static const char* MIN_VALUE_KW          = "min_value";
-static const char* MAX_VALUE_KW          = "max_value";
-static const char* INTERPOLATION_TYPE_KW = "interpolation_type";
-
-ossimIndexToRgbLutFilter::ossimIndexToRgbLutFilter()
-   :ossimImageSourceFilter(),
-    theLut(new ossimRgbLutDataObject()),
-    theMinValue(ossim::nan()),
-    theMaxValue(ossim::nan()),
-    theMinMaxDeltaLength(ossim::nan()),
-    theMinValueOverride(false),
-    theMaxValueOverride(false),
-    theInterpolationType(ossimIndexToRgbLutFilter_NEAREST),
-    theTile(NULL),
-    theLutFile("")
-{
-}
-
-ossimIndexToRgbLutFilter::ossimIndexToRgbLutFilter(ossimImageSource* inputSource,
-                                                 const ossimRgbLutDataObject& lut,
-                                                 double minValue,
-                                                 double maxValue,
-                                                 ossimIndexToRgbLutFilterInterpolationType interpolationType)
-   :ossimImageSourceFilter(inputSource),
-    theLut((ossimRgbLutDataObject*)lut.dup()),
-    theMinValue(minValue),
-    theMaxValue(maxValue),
-    theMinValueOverride(false),
-    theMaxValueOverride(false),
-    theInterpolationType(interpolationType),
-    theTile(NULL),
-    theLutFile("")
-{ 
-   if(theMinValue > theMaxValue)
-   {
-      double temp = theMinValue;
-      theMinValue = theMaxValue;
-      theMaxValue = temp;
-   }
-   theMinMaxDeltaLength = theMaxValue - theMinValue;
-   
-}
-
-ossimIndexToRgbLutFilter::~ossimIndexToRgbLutFilter()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimIndexToRgbLutFilter::getTile(
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   if(!theInputConnection)
-   {
-      return ossimRefPtr<ossimImageData>();
-   }
-   ossimRefPtr<ossimImageData> tile = theInputConnection->getTile(tileRect,
-                                                                  resLevel);
-   if(!tile)
-   {
-      return 0;
-   }
-   
-   if(!theTile)
-   {
-      allocate();
-      if (!theTile)
-      {
-         return theTile;
-      }
-   }
-
-   theTile->setImageRectangle(tileRect);
-
-   theTile->setDataObjectStatus(OSSIM_FULL);
-   theTile->makeBlank();
-
-   if(tile->getBuf()&&
-      tile->getDataObjectStatus() != OSSIM_EMPTY)
-   {
-      return convertInputTile(tile);
-   }
-
-   return theTile;
-   
-//    if ( theTile->getDataObjectStatus() != OSSIM_EMPTY )
-//    {
-//       theTile->makeBlank();
-//    }
-
-}
-
-ossimRefPtr<ossimImageData> ossimIndexToRgbLutFilter::convertInputTile(const ossimRefPtr<ossimImageData>& tile)
-{
-   ossim_uint8* outBuf[3];
-   outBuf[0] = (ossim_uint8*)(theTile->getBuf(0));
-   outBuf[1] = (ossim_uint8*)(theTile->getBuf(1));
-   outBuf[2] = (ossim_uint8*)(theTile->getBuf(2));
-   long numberOfEntries = (long)theLut->getNumberOfEntries();
-
-   if(!numberOfEntries)
-   {
-      return ossimRefPtr<ossimImageData>();
-   }
-   
-   long maxLength = tile->getWidth()*tile->getHeight();
-   ossimRgbVector color;
-
-   switch(tile->getScalarType())
-   {
-      case OSSIM_SSHORT16:
-      {      
-         ossim_sint16* buf = (ossim_sint16*)(tile->getBuf());
-
-         for(long index = 0; index < maxLength; ++index)
-         {
-            if(!tile->isNull(index))
-            {
-               double colorIndex;
-               normalizeValue(*buf, colorIndex);            
-               getColorNormIndex(colorIndex, color);
-               outBuf[0][index]  = color.getR();
-               outBuf[1][index]  = color.getG();
-               outBuf[2][index]  = color.getB();
-            }
-            else
-            {
-               outBuf[0][index] = 0;
-               outBuf[1][index] = 0;
-               outBuf[2][index] = 0;
-            }
-            ++buf;
-         }
-         break;
-      }
-      case OSSIM_FLOAT:
-      case OSSIM_NORMALIZED_FLOAT:
-      {      
-         float* buf = (float*)(tile->getBuf());
-       
-         for(long index = 0; index < maxLength; ++index)
-	 {
-            if(!tile->isNull(index))
-            {
-	       double colorIndex;
-	       normalizeValue(*buf, colorIndex);            
-	       getColorNormIndex(colorIndex, color);
-	       outBuf[0][index]  = color.getR();
-	       outBuf[1][index]  = color.getG();
-	       outBuf[2][index]  = color.getB();
-            }
-            else
-            {
-	       outBuf[0][index] = 0;
-	       outBuf[1][index] = 0;
-	       outBuf[2][index] = 0;
-            }
-            ++buf;
-	 }
-         break;
-      }
-      case OSSIM_UCHAR:
-      {
-         ossim_uint8* buf = (ossim_uint8*)(tile->getBuf());
-
-         for(long index = 0; index < maxLength; ++index)
-         {
-            if(!tile->isNull(index))
-            {
-               double colorIndex;
-               normalizeValue(*buf, colorIndex);
-               getColorNormIndex(colorIndex, color);
-	    
-               outBuf[0][index]  = color.getR();
-               outBuf[1][index]  = color.getG();
-               outBuf[2][index]  = color.getB();
-            }
-            else
-            {
-               outBuf[0][index] = 0;
-               outBuf[1][index] = 0;
-               outBuf[2][index] = 0;
-            }
-            ++buf;
-         }
-         break;
-      }
-      case OSSIM_USHORT16:
-      case OSSIM_USHORT11:
-      {
-         ossim_uint16* buf = (ossim_uint16*)(tile->getBuf());
-
-         for(long index = 0; index < maxLength; ++index)
-         {
-            if(!tile->isNull(index))
-            {
-               double colorIndex;
-               normalizeValue(*buf, colorIndex);            
-               getColorNormIndex(colorIndex, color);
-               outBuf[0][index]  = color.getR();
-               outBuf[1][index]  = color.getG();
-               outBuf[2][index]  = color.getB();
-            }
-            else
-            {
-               outBuf[0][index] = 0;
-               outBuf[1][index] = 0;
-               outBuf[2][index] = 0;
-            }
-            ++buf;
-         }
-         break;
-      }
-      default:
-         break;
-   }
-   theTile->validate();
-   return theTile;
-}
-
-void ossimIndexToRgbLutFilter::allocate()
-{
-   if(!theInputConnection) return;
-
-   theTile = ossimImageDataFactory::instance()->create(this, 3, this);
-   if(theTile.valid())
-   {
-      theTile->initialize();
-   }
-}
-
-void ossimIndexToRgbLutFilter::initialize()
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimIndexToRgbLutFilter::initialize() DEBUG: Entered .... " << std::endl;
-   }
-   ossimImageSourceFilter::initialize();
-   
-   theTile      = NULL;
-   if(!theInputConnection)
-   {
-      return;
-   }
-   if(!theMinValueOverride)
-   {
-      theMinValue = theInputConnection->getMinPixelValue(0);
-   }
-   if(!theMaxValueOverride)
-   {
-      theMaxValue = theInputConnection->getMaxPixelValue(0);
-   }
-   if(theMinValue > theMaxValue)
-   {
-      swap(theMinValue, theMaxValue);
-   }
-   theMinMaxDeltaLength = theMaxValue - theMinValue;
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "theInputConnection Pointer = " << theInputConnection
-         << "\nossimIndexToRgbLutFilter::initialize() DEBUG: Leaving .... "
-         << std::endl;
-   }
-
-}
-
-void ossimIndexToRgbLutFilter::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(property.valid())
-   {
-      ossimString value = property->valueToString();
-      value = value.trim();
-      
-      if(property->getName() == "Lut file")
-      {
-         setLut(ossimFilename(property->valueToString()));
-      }
-      else if(property->getName() == "Interpolation type")
-      {
-         value=value.downcase();
-         if(value == "linear")
-         {
-            setInterpolationType(ossimIndexToRgbLutFilter_LINEAR);
-         }
-         else
-         {
-            setInterpolationType(ossimIndexToRgbLutFilter_NEAREST);
-         }
-      }
-      else
-      {
-         ossimImageSourceFilter::setProperty(property);
-      }
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimIndexToRgbLutFilter::getProperty(const ossimString& name)const
-{
-   if(name == "Lut file")
-   {
-      ossimFilenameProperty* filenameProperty = new ossimFilenameProperty(name, theLutFile);
-      if(filenameProperty)
-      {
-         filenameProperty->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_INPUT);
-         filenameProperty->clearChangeType();
-         filenameProperty->setCacheRefreshBit();
-         filenameProperty->setReadOnlyFlag(false);
-
-         return filenameProperty;
-      }
-   }
-   else if(name == "Interpolation type")
-   {
-      std::vector<ossimString> options;
-      options.push_back("nearest");
-      options.push_back("linear");
-      ossimString value = "nearest";
-      if(theInterpolationType == ossimIndexToRgbLutFilter_LINEAR)
-      {
-         value = "linear";
-      }
-      
-      ossimStringProperty* stringProperty = new ossimStringProperty(name,
-                                                                    value,
-                                                                    false,
-                                                                    options);
-      
-      stringProperty->clearChangeType();
-      stringProperty->setCacheRefreshBit();
-      stringProperty->setReadOnlyFlag(false);
-
-      return stringProperty;
-   }
-
-   return ossimImageSourceFilter::getProperty(name);
-}
-
-void ossimIndexToRgbLutFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageSourceFilter::getPropertyNames(propertyNames);
-   propertyNames.push_back("Lut file");
-   propertyNames.push_back("Interpolation type");
-}
-
-void ossimIndexToRgbLutFilter::normalizeValue(double value,
-                                              double& normalizedValue)
-{
-   // map to normalized elevation within our range of values
-   normalizedValue = (value - theMinValue)/theMinMaxDeltaLength;
-   if(normalizedValue > 1) normalizedValue = 1;
-   if(normalizedValue < 0) normalizedValue = 0;   
-}
-
-void ossimIndexToRgbLutFilter::getColorNormIndex(double index,
-                                                 ossimRgbVector& result)
-{
-   long numberOfEntries = theLut->getNumberOfEntries();
-   index*=numberOfEntries;
-   if(theInterpolationType == ossimIndexToRgbLutFilter_LINEAR)
-   {
-      int lutIndex = (long)index;
-      
-      double lutT   = index - lutIndex;
-      
-      int lutIndex2 = lutIndex+1;
-      if(lutIndex2>=numberOfEntries) lutIndex2 = numberOfEntries-1;
-      
-      result = (*theLut)[lutIndex]*(1.0-lutT) +
-               (*theLut)[lutIndex2]*(lutT);
-      
-   }
-   else
-   {
-      int i = ossim::round<int>(index);
-      i = i < 0?0:i;
-      i = i >numberOfEntries?numberOfEntries:i;
-      result = (*theLut)[i];
-   }
-}
-
-void ossimIndexToRgbLutFilter::getColor(double index,
-                                        ossimRgbVector& result)
-{
-   if(theInterpolationType == ossimIndexToRgbLutFilter_LINEAR)
-   {
-      long numberOfEntries = theLut->getNumberOfEntries();
-      int lutIndex = (int)index;
-      
-      double lutT   = index - lutIndex;
-      int lutIndex2 = lutIndex+1;
-      
-      if(lutIndex2>=numberOfEntries) lutIndex2 = numberOfEntries-1;
-      
-      result = (*theLut)[lutIndex]*(1.0-lutT) +
-               (*theLut)[lutIndex2]*(lutT);
-   }
-   else
-   {
-      result = (*theLut)[ossim::round<int>(index)];
-   }
-}
-
-bool ossimIndexToRgbLutFilter::saveState(ossimKeywordlist& kwl,
-                                         const char* prefix)const
-{
-   kwl.add(prefix,
-           MIN_VALUE_KW,
-           theMinValue,
-           true);
-   
-   kwl.add(prefix,
-           MAX_VALUE_KW,
-           theMaxValue,
-           true);
-   
-   ossimString interpolationType = "nearest";
-   switch(theInterpolationType)
-   {
-      case ossimIndexToRgbLutFilter_LINEAR:
-      {
-         interpolationType = "linear";
-      }
-      default:
-         break;
-   }
-   kwl.add(prefix,
-           INTERPOLATION_TYPE_KW,
-           interpolationType.c_str(),
-           true);
-   
-   ossimString newPrefix = ossimString(prefix)+ "lut.";
-   if(theLutFile != "")
-   {
-      kwl.add(newPrefix.c_str(), "lut_file", theLutFile.c_str(), true);
-      ossimKeywordlist kwl2;
-      theLut->saveState(kwl2);
-   }
-   else
-   {
-      theLut->saveState(kwl, newPrefix.c_str());
-   }
-
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
-
-bool ossimIndexToRgbLutFilter::loadState(const ossimKeywordlist& kwl,
-                                         const char* prefix)
-{
-   const char* minValue = kwl.find(prefix,
-                                   MIN_VALUE_KW);
-   const char* maxValue = kwl.find(prefix,
-                                   MAX_VALUE_KW);
-
-   const char* interpolationType =  kwl.find(prefix,
-                                             INTERPOLATION_TYPE_KW);
-   
-   theInterpolationType = ossimIndexToRgbLutFilter_NEAREST;
-   if(interpolationType)
-   {
-      ossimString interp = ossimString(interpolationType).trim().upcase();
-      if(interp == "LINEAR")
-      {
-         theInterpolationType = ossimIndexToRgbLutFilter_LINEAR;
-      }
-   }
-   if(minValue)
-   {
-      theMinValue = ossimString(minValue).toDouble();
-      theMinValueOverride = true;
-      
-   }
-   else
-   {
-      theMinValueOverride = false;
-   }
-   
-   if(maxValue)
-   {
-      theMaxValue = ossimString(maxValue).toDouble();
-      theMaxValueOverride = true;
-   }
-   else
-   {
-      theMaxValueOverride = false;
-   }
-   if( (ossim::isnan(theMinValue) == false) &&
-       (ossim::isnan(theMaxValue) == false) )
-   {
-      if(theMinValue > theMaxValue)
-      {
-         double temp = theMinValue;
-         theMinValue = theMaxValue;
-         theMaxValue = temp;
-      }
-      theMinMaxDeltaLength = theMaxValue - theMinValue;
-   }
-   else
-   {
-      theMinMaxDeltaLength = ossim::nan();
-   }
-   ossimString newPrefix = ossimString(prefix)+ "lut.";
-
-   const char* file = kwl.find(newPrefix.c_str(), "lut_file");
-   if(file)
-   {
-      theLutFile = file;
-   }
-   else
-   {
-      theLutFile = "";
-   }
-   theLut->loadState(kwl, newPrefix.c_str());
-
-   bool result = ossimImageSourceFilter::loadState(kwl, prefix);
-
-   return result;
-}
-
-ossim_uint32 ossimIndexToRgbLutFilter::getNumberOfOutputBands() const
-{
-   if(isSourceEnabled())
-   {
-      return 3;
-   }
-   return ossimImageSourceFilter::getNumberOfOutputBands();
-}
-
-ossimScalarType ossimIndexToRgbLutFilter::getOutputScalarType() const
-{
-   if(isSourceEnabled())
-   {
-      return OSSIM_UCHAR;
-   }
-
-   return ossimImageSourceFilter::getOutputScalarType();
-}
-
-void ossimIndexToRgbLutFilter::setLut(ossimRgbLutDataObject& lut)
-{
-   theLut = new ossimRgbLutDataObject(lut);
-}
-
-void ossimIndexToRgbLutFilter::setLut(const ossimFilename& file)
-{
-   theLutFile = file;
-   if(file.exists())
-   {
-      ossimKeywordlist kwl(file.c_str());
-      theLut->loadState(kwl);
-   }
-}
-
-ossimFilename ossimIndexToRgbLutFilter::getLutFile()const
-{
-   return theLutFile;
-}
-
-double ossimIndexToRgbLutFilter::getMinValue()const
-{
-   return theMinValue;
-}
-
-double ossimIndexToRgbLutFilter::getMaxValue()const
-{
-   return theMaxValue;
-}
-
-void ossimIndexToRgbLutFilter::setMinValue(double value)
-{
-   theMinValue = value;
-}
-
-void ossimIndexToRgbLutFilter::setMaxValue(double value)
-{
-   theMaxValue = value;
-}
-
-double ossimIndexToRgbLutFilter::getNullPixelValue()const
-{
-   return 0.0;
-}
-
-double ossimIndexToRgbLutFilter::getMinPixelValue(ossim_uint32 /* band */)const
-{
-   return 1.0;
-}
-
-double ossimIndexToRgbLutFilter::getMaxPixelValue(ossim_uint32 /* band */)const
-{
-   return 255.0;
-}
-
-ossimIndexToRgbLutFilter::ossimIndexToRgbLutFilterInterpolationType ossimIndexToRgbLutFilter::getInterpolationType()const
-{
-   return theInterpolationType;
-}
-
-void ossimIndexToRgbLutFilter::setInterpolationType(ossimIndexToRgbLutFilterInterpolationType type)
-{
-   theInterpolationType = type;
-}
diff --git a/src/ossim/imaging/ossimIntensityAdjustmentFilter.cpp b/src/ossim/imaging/ossimIntensityAdjustmentFilter.cpp
deleted file mode 100644
index ad25eeb..0000000
--- a/src/ossim/imaging/ossimIntensityAdjustmentFilter.cpp
+++ /dev/null
@@ -1,288 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-// $Id: ossimIntensityAdjustmentFilter.cpp 13330 2008-07-28 18:04:40Z dburken $
-#include <ossim/imaging/ossimIntensityAdjustmentFilter.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimHsvVector.h>
-#include <ossim/base/ossimRgbVector.h>
-
-RTTI_DEF1(ossimIntensityAdjustmentFilter, "ossimIntensityAdjustmentFilter", ossimImageSourceFilter);
-
-ossimIntensityAdjustmentFilter::ossimIntensityAdjustmentFilter()
-   :ossimImageSourceFilter(),
-    theMeanIntensityTarget(ossim::nan()),
-    theNormTile(NULL),
-    theTile(NULL),
-    theBlankTile(NULL)
-{
-   theGridBounds.makeNan();
-}
-
-ossimIntensityAdjustmentFilter::~ossimIntensityAdjustmentFilter()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimIntensityAdjustmentFilter::getTile(
-   const ossimIrect& rect,
-   ossim_uint32 resLevel)
-{
-   if (!theTile.valid())
-   {
-      allocate(); // first time through.
-   }
-   
-   if(theBlankTile.valid())
-   {
-      theBlankTile->setImageRectangle(rect);
-   }
-   if(!theInputConnection)
-   {
-      return theBlankTile;
-   }
-   ossimRefPtr<ossimImageData> data =
-      theInputConnection->getTile(rect, resLevel);
-   
-   if(!isSourceEnabled())
-   {
-      return data;
-   }
-   theTile->setImageRectangle(rect);
-   theNormTile->setImageRectangle(rect);
-   loadNormTile(data);
-
-   if(ossim::isnan(theMeanIntensityTarget))
-   {
-      theMeanIntensityTarget = theMeanIntensityGrid.meanValue();
-   }
-
-   loadNormTile(data);
-   
-   if((theNormTile->getDataObjectStatus()!=OSSIM_NULL)&&
-      (theNormTile->getDataObjectStatus()!=OSSIM_EMPTY))
-   {
-      float* buf[3];
-      if(data->getNumberOfBands() == 3)
-      {
-         buf[0] = (float*)theNormTile->getBuf(0);
-         buf[1] = (float*)theNormTile->getBuf(1);
-         buf[2] = (float*)theNormTile->getBuf(2);
-      }
-      else
-      {
-         buf[0] = (float*)theNormTile->getBuf(0);
-         buf[1] = (float*)theNormTile->getBuf(0);
-         buf[2] = (float*)theNormTile->getBuf(0);
-         
-      }
-      ossim_int32 y = 0;
-      ossim_int32 x = 0;
-      ossim_int32 upperY = theNormTile->getHeight();
-      ossim_int32 upperX = theNormTile->getWidth();
-      ossimIpt origin = rect.ul();
-      
-      for(y = 0; y < upperY; ++y)
-      {
-         for(x = 0; x < upperX; ++x)
-         {
-            ossimIpt pt = ossimIpt(origin.x + x,
-                                   origin.y + y) - theGridBounds.ul();
-
-            if((buf[0] != 0) &&
-               (buf[1] != 0) &&
-               (buf[2] != 0))
-            {
-               
-               ossimRgbVector rgb((ossim_uint8)(*(buf[0])*255.0),
-                                  (ossim_uint8)(*(buf[1])*255.0),
-                                  (ossim_uint8)(*(buf[2])*255.0));
-               ossimHsvVector hsv(rgb);
-               
-               hsv.setV(matchTargetMean(hsv.getV(),
-                                        theMeanIntensityGrid(pt.x, pt.y),
-                                        theMeanIntensityTarget,
-                                        theNormTile->getMinPix(0),
-                                        theNormTile->getMaxPix(0)));
-               ossimRgbVector result(hsv);
-               
-               *buf[0] = result.getR()/255.0;
-               *buf[1] = result.getG()/255.0;
-               *buf[2] = result.getB()/255.0;
-            }
-            
-            ++buf[0];
-            ++buf[1];
-            ++buf[2];
-         }
-      }
-   }
-   theTile->copyNormalizedBufferToTile((float*)theNormTile->getBuf());
-   theTile->validate();
-   
-   return theTile;
-}
-
-void ossimIntensityAdjustmentFilter::initialize()
-{
-   ossimImageSourceFilter::initialize();
-
-   theNormTile = NULL;
-   theBlankTile = NULL;
-   
-   if(theInputConnection)
-   {
-      theGridBounds = theInputConnection->getBoundingRect();
-   }
-   else
-   {
-      theGridBounds.makeNan();
-   }
-}
-
-void ossimIntensityAdjustmentFilter::allocate()
-{
-   theBlankTile = ossimImageDataFactory::instance()->create(this, this);
-   theTile = (ossimImageData*)theBlankTile->dup();
-   theTile->initialize();
-}
-
-void ossimIntensityAdjustmentFilter::createAndPopulateGrid(const ossimIpt& spacing,
-                                                           double targetMean)
-{
-   if(theInputConnection)
-   {
-      ossim_uint32 x = 0;
-      ossim_uint32 y = 0;
-
-      theGridBounds        = theInputConnection->getBoundingRect();
-
-      ossimDrect rect(0,
-                      0,
-                      theGridBounds.width()-1,
-                      theGridBounds.height()-1);
-                      
-      theMeanIntensityGrid = ossimDblGrid(rect,
-                                          ossimDpt(spacing),
-                                          0);
-
-      for(y = 0; y <= theGridBounds.height(); y+=spacing.y)
-      {
-         for(x = 0; x <= theGridBounds.width(); x+=spacing.x)
-         {
-            ossimIpt ul(x - 16,
-                        y - 16);
-            
-            ossimIrect sampleRect(ul.x,
-                                  ul.y,
-                                  ul.x + 31,
-                                  ul.y + 31);
-            ossimRefPtr<ossimImageData> data = theInputConnection->getTile(sampleRect);
-            double mean = computeMeanIntensity(data);
-            theMeanIntensityGrid.setNearestNode(ossimDpt(x, y), mean);
-         }
-      }
-//      theMeanIntensityGrid.interpolateNullValuedNodes();
-   }
-   theMeanIntensityTarget = targetMean;
-}
-
-double ossimIntensityAdjustmentFilter::computeMeanIntensity(
-   ossimRefPtr<ossimImageData>& data)
-{
-   double result  = 0;
-   double divisor = 0;
-
-   if(data.valid() &&
-      (data->getDataObjectStatus()!=OSSIM_NULL)&&
-      (data->getDataObjectStatus()!=OSSIM_EMPTY))
-   {
-      loadNormTile(data);
-
-      int i = 0;
-      int upper = data->getWidth()*data->getHeight();
-      float* buf[3];
-      if(data->getNumberOfBands() == 3)
-      {
-         buf[0] = (float*)theNormTile->getBuf(0);
-         buf[1] = (float*)theNormTile->getBuf(1);
-         buf[2] = (float*)theNormTile->getBuf(2);
-      }
-      else
-      {
-         buf[0] = (float*)theNormTile->getBuf();
-         buf[1] = (float*)theNormTile->getBuf();
-         buf[2] = (float*)theNormTile->getBuf();
-      }
-      for(i = 0; i < upper; ++i)
-      {
-         ossimRgbVector rgb((ossim_uint8)(*(buf[0])*255.0),
-                            (ossim_uint8)(*(buf[1])*255.0),
-                            (ossim_uint8)(*(buf[2])*255.0));
-         ossimHsvVector hsv(rgb);
-         if(hsv.getV() > 0.0)
-         {
-            result += hsv.getV();
-            divisor += 1.0;
-         }
-         ++buf[0];
-         ++buf[1];
-         ++buf[2];
-      }
-   }
-
-   if(divisor > 0.0)
-   {
-      result /= divisor;
-   }
-   return result;
-}
-
-void ossimIntensityAdjustmentFilter::loadNormTile(ossimRefPtr<ossimImageData>& data)
-{
-   if(!theNormTile)
-   {
-      theNormTile = ossimImageDataFactory::instance()->create(this,
-                                                              OSSIM_NORMALIZED_FLOAT,
-                                                              data->getNumberOfBands(),
-                                                              data->getWidth(),
-                                                              data->getHeight());
-      theNormTile->initialize();
-   }
-   else
-   {
-      theNormTile->setImageRectangle(data->getImageRectangle());
-   }
-   data->copyTileToNormalizedBuffer((float*)theNormTile->getBuf());
-   theNormTile->validate();
-}
-
-double ossimIntensityAdjustmentFilter::matchTargetMean(double inputValue,
-                                                       double meanValue,
-                                                       double targetMean,
-                                                       double minValue,
-                                                       double maxValue)
-{
-    // max change
-   const double delta = targetMean - meanValue;
-   double weight=0.0;
-   
-   // weight max change dependend on proximity to end points
-   if (inputValue <= meanValue)
-   {
-      weight = fabs((inputValue - minValue) / (meanValue - minValue));
-   }
-   else
-   {
-      weight = fabs((maxValue - inputValue) / (maxValue - meanValue));
-   }
-
-   return  (inputValue + (delta * weight));
-}
diff --git a/src/ossim/imaging/ossimJpegWriter.cpp b/src/ossim/imaging/ossimJpegWriter.cpp
deleted file mode 100644
index c32cf21..0000000
--- a/src/ossim/imaging/ossimJpegWriter.cpp
+++ /dev/null
@@ -1,467 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  David Burken
-//
-//*******************************************************************
-//  $Id: ossimJpegWriter.cpp 21184 2012-06-29 15:13:09Z dburken $
-
-#include <cstdlib>
-#include <cstdio>
-
-//---
-// Using windows .NET compiler there is a conflict in the libjpeg with INT32
-// in the file jmorecfg.h.  Defining XMD_H fixes this.
-extern "C"
-{
-#if defined(_MSC_VER) || defined(__MINGW32__)
-#  ifndef XMD_H
-#    define XMD_H
-#  endif
-#endif
-#include <jpeglib.h>
-}
-
-#include <ossim/imaging/ossimJpegWriter.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-#include <ossim/base/ossimNumericProperty.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/imaging/ossimScalarRemapper.h>
-
-RTTI_DEF1_INST(ossimJpegWriter, "ossimJpegWriter", ossimImageFileWriter)
-
-static const char DEFAULT_FILE_NAME[] = "output.jpg";
-static const ossim_int32 DEFAULT_JPEG_QUALITY = 100;
-static ossimTrace traceDebug("ossimJpegWriter:debug");
-
-ossimJpegWriter::ossimJpegWriter()
-   : ossimImageFileWriter(),
-     theQuality(DEFAULT_JPEG_QUALITY),
-     theOutputFilePtr(NULL)
-{
-   // Since there is no internal geometry set the flag to write out one.
-   setWriteExternalGeometryFlag(true);
-}
-
-ossimJpegWriter::~ossimJpegWriter()
-{
-   close();
-}
-
-bool ossimJpegWriter::writeFile()
-{
-   static const char MODULE[] = "ossimJpegWriter::writeFile";
-   
-   if( !theInputConnection || (getErrorStatus() != ossimErrorCodes::OSSIM_OK))
-   {
-      return false;
-   }
-   
-   bool bandsDontMatch = false;
-   // Get the number of bands.  Must be one or three for this writer.
-   ossim_int32 components   = theInputConnection->getNumberOfOutputBands();
-   ossim_int32 outputComponents = components;
-   if (components != 1 && components != 3)
-   {
-      bandsDontMatch = true;
-      if(components < 3)
-      {
-         outputComponents = 1;
-      }
-      else if(components > 3)
-      {
-         outputComponents = 3;
-      }
-//      ossimNotify(ossimNotifyLevel_WARN)
-//         << MODULE << " Range Error:"
-//         << "\nInvalid number of input bands!  Must be one or three."
-//         << "\nInput bands = " << components
-//         << "\nReturning from method." << endl;
-      
-//      return false;
-   }
-   
-   if(theInputConnection->isMaster())
-   {
-      if (!isOpen())
-      {
-         open();
-      }
-      
-      if (!theOutputFilePtr)
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << MODULE << " ERROR:"
-            << "\nCannot open:  " << theFilename.c_str()
-            << "\nReturning from method." << endl;
-         
-         return false;
-      }
-   }
-   ossimRefPtr<ossimImageSource> savedInput;
-   
-   if(theInputConnection->getOutputScalarType() != OSSIM_UINT8)
-   {
-      savedInput = new ossimScalarRemapper;
-      
-      savedInput->connectMyInputTo(0, theInputConnection->getInput(0));
-      theInputConnection->connectMyInputTo(0, savedInput.get());
-      theInputConnection->initialize();
-   }
-   
-   if(theInputConnection->isMaster())
-   {
-      if (traceDebug())
-      {
-         CLOG << " DEBUG:"
-              << "\nOutput Rect:  " << theAreaOfInterest << endl;
-      }
-      
-      ossim_int32 image_height
-         = theAreaOfInterest.lr().y - theAreaOfInterest.ul().y + 1;
-      ossim_int32 image_width
-         = theAreaOfInterest.lr().x - theAreaOfInterest.ul().x + 1;
-      ossim_int32 tileWidth    = theInputConnection->getTileWidth();
-      ossim_int32 tileHeight   = theInputConnection->getTileHeight();
-      
-      // Allocate a buffer to hold a row of tiles.
-      ossim_uint32 buf_size   = tileHeight*image_width*outputComponents;
-      if (traceDebug())
-      {
-         CLOG << "DEBUG:"
-              << "\nbuf_size:  " << buf_size
-              << endl;
-      }
-      
-      std::vector<ossim_uint8> buf(buf_size);
-      ossimRefPtr<ossimImageData> blankTile =
-         new ossimImageData(NULL,
-                            OSSIM_UINT8,
-                            outputComponents,
-                            tileWidth,
-                            tileHeight);
-      ossimRefPtr<ossimImageData> tempTile;
-      std::vector<ossim_uint8> tempBuf;
-      if(bandsDontMatch)
-      {
-         tempTile = new ossimImageData(NULL,
-                                       OSSIM_UINT8,
-                                       outputComponents,
-                                       tileWidth,
-                                       tileHeight);
-         tempTile->initialize();
-      }
-      blankTile->initialize();
-      //
-      // Stuff needed for the jpeg library.
-      // Taken from "example.c" file of the "jpeg-6b" package.
-      //
-      struct jpeg_compress_struct cinfo;
-      struct jpeg_error_mgr jerr;
-      JSAMPROW row_pointer[1];  // pointer to JSAMPLE row[s]
-      
-      // physical row width in image buffer
-      int row_stride = image_width * outputComponents;
-      
-      cinfo.err = jpeg_std_error(&jerr);
-      jpeg_create_compress(&cinfo);
-      jpeg_stdio_dest(&cinfo, theOutputFilePtr);
-      cinfo.image_width = image_width;   // image width and height, in pixels
-      cinfo.image_height = image_height;
-      cinfo.input_components = outputComponents; // # of color components per pixel
-      
-      // colorspace of input image 
-      if (outputComponents == 3)
-      {
-         cinfo.in_color_space = JCS_RGB;
-      }
-      else
-      {
-         cinfo.in_color_space = JCS_GRAYSCALE;
-      }
-
-      jpeg_set_defaults(&cinfo);
-      jpeg_set_quality(&cinfo, theQuality, TRUE); //limit to baseline-JPEG values 
-      jpeg_start_compress(&cinfo, TRUE);
-      
-      theInputConnection->setAreaOfInterest(theAreaOfInterest);
-      theInputConnection->setToStartOfSequence();
-      long maxY = (long)theInputConnection->getNumberOfTilesVertical();
-      long maxX = (long)theInputConnection->getNumberOfTilesHorizontal();
-      
-      double tileCount = 0.0;
-      double totalTiles = theInputConnection->getNumberOfTiles();
-      //
-      // Ok the jpeg stuff should be set.  Loop through and grab a row of tiles
-      // and copy to the buffer.  Then write the buffer to the jpeg file.
-      // Get the next row... until finished.
-      //
-      for (ossim_int32 i=0;
-           ((i<maxY)&&
-            (!needsAborting()));
-           ++i)
-      {
-         ossimIrect buf_rect = theAreaOfInterest;
-         buf_rect.set_uly(theAreaOfInterest.ul().y+i*tileHeight);
-         buf_rect.set_lry(buf_rect.ul().y + tileHeight - 1);
-         
-         for (ossim_int32 j=0; ((j<maxX)&& (!needsAborting())); ++j)
-         {
-            // Grab the tile.
-            const ossimRefPtr<ossimImageData> t =
-               theInputConnection->getNextTile();
-            
-            if ( t.valid() )
-            {
-               if (t->getDataObjectStatus() != OSSIM_NULL)
-               {
-                  if(bandsDontMatch)
-                  {
-                     tempTile->setImageRectangle(t->getImageRectangle());
-                     tempTile->setDataObjectStatus(t->getDataObjectStatus());
-                     memcpy(tempTile->getBuf(), 
-                            t->getBuf(),  
-                            t->getSizePerBandInBytes()*outputComponents);
-                     tempTile->unloadTile(&buf.front(), buf_rect, OSSIM_BIP);
-                  }
-                  else
-                  {
-                     // Copy the tile to the buffer.
-                     t->unloadTile(&buf.front(), buf_rect, OSSIM_BIP);
-                  }
-               }
-               else
-               {
-                  blankTile->setOrigin(t->getOrigin());
-                  if(bandsDontMatch)
-                  {
-                     tempTile->setImageRectangle(blankTile->getImageRectangle());
-                     tempTile->setDataObjectStatus(t->getDataObjectStatus());
-                     memcpy(tempTile->getBuf(), t->getBuf(),  t->getSizePerBandInBytes()*outputComponents);
-                     blankTile->unloadTile(&buf.front(), buf_rect, OSSIM_BIP);
-                  }
-                  else
-                  {
-                     // Copy the tile to the buffer.
-                     blankTile->unloadTile(&buf.front(), buf_rect, OSSIM_BIP);
-                  }
-               }
-            }
-            ++tileCount;
-            setPercentComplete((100.0*(tileCount/totalTiles)));
-            
-         }  // End of loop through tiles in the x direction.
-         
-         // Copy the buffer to the jpeg file.
-         ossim_int32 lines_to_copy =
-            min( (buf_rect.lr().y-buf_rect.ul().y+1),
-                 (theAreaOfInterest.lr().y-buf_rect.ul().y+1) );
-         
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << MODULE
-               << "buf_rect:       " << buf_rect
-               << "lines_to_copy:  " << lines_to_copy << endl;
-         }
-         
-         if(!needsAborting())
-         {
-            // Now copy the buffer that should be full to the jpeg file.
-            ossim_int32 buf_offset = 0;
-            for (ossim_int32 line=0; line<lines_to_copy; ++line)
-            {
-               row_pointer[0] = &buf[buf_offset];
-               jpeg_write_scanlines(&cinfo, row_pointer, 1);
-               buf_offset += row_stride;
-            }
-         }
-         
-      } // End of loop through tiles in the y direction.
-      
-      // Free memory.
-      if(!needsAborting())
-      {
-         jpeg_finish_compress(&cinfo);
-      }
-      
-      fclose(theOutputFilePtr);
-      theOutputFilePtr = NULL;
-      
-      jpeg_destroy_compress(&cinfo);
-   }
-   else
-   {
-      theInputConnection->slaveProcessTiles();
-   }
-   if(savedInput.valid())
-   {
-      ossimConnectableObject* obj = theInputConnection->getInput(0);
-      if(obj)
-      {
-         theInputConnection->connectMyInputTo(0, obj->getInput(0));
-      }
-   }
-   savedInput = 0;   
-   return true;
-}
-
-bool ossimJpegWriter::saveState(ossimKeywordlist& kwl,
-                                const char* prefix)const
-{
-   kwl.add( prefix,
-            ossimKeywordNames::COMPRESSION_QUALITY_KW,
-            theQuality,
-            true );
-   return ossimImageFileWriter::saveState(kwl, prefix);
-}
-
-bool ossimJpegWriter::loadState(const ossimKeywordlist& kwl,
-                                const char* prefix)
-{
-   const char* value =
-      kwl.find(prefix, ossimKeywordNames::COMPRESSION_QUALITY_KW);
-   if(value)
-   {
-      setQuality(atoi(value));
-   }
-   
-   theOutputImageType = "jpeg";
-   
-   return ossimImageFileWriter::loadState(kwl, prefix);
-}
-
-void ossimJpegWriter::setQuality(ossim_int32 quality)
-{
-   static const char MODULE[] = "ossimJpegWriter::setQuality";
-   
-   // Range 1 to 100 with 100 being best.
-   if (quality > 0 && quality < 101)
-   {
-      theQuality = quality;
-   }
-   else
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE << " DEBUG:"
-            << "\nquality out of range:  " << quality
-            << "\nquality has been set to default:  " 
-            << DEFAULT_JPEG_QUALITY
-            << "\nvalid range:  1 to 100 with 100 being best."
-            << endl;
-      }
-      
-      theQuality = DEFAULT_JPEG_QUALITY;
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " DEBUG:"
-         << "\nQuality set to:  "
-         << theQuality << endl;
-   }
-}
-
-bool ossimJpegWriter::isOpen() const
-{
-   return (theOutputFilePtr!=NULL);
-}
-
-bool ossimJpegWriter::open()
-{
-   close();
-
-   // Check for empty filenames.
-   if (theFilename.empty())
-   {
-      return false;
-   }
-   
-   theOutputFilePtr = fopen(theFilename.c_str(), "wb");
-   if(theOutputFilePtr)
-   {
-      return true;
-   }
-   return false;
-}
-
-void ossimJpegWriter::close()
-{
-   if(theOutputFilePtr)
-   {
-      fclose(theOutputFilePtr);
-      theOutputFilePtr = NULL;
-   }
-}
-
-void ossimJpegWriter::getImageTypeList(std::vector<ossimString>& imageTypeList)const
-{
-   imageTypeList.push_back(ossimString("jpeg"));
-}
-
-ossimString ossimJpegWriter::getExtension() const
-{
-   return ossimString("jpg");
-}
-
-bool ossimJpegWriter::hasImageType(const ossimString& imageType) const
-{
-   if((imageType == "image/jpeg")||
-      (imageType == "image/jpg"))
-   {
-      return true;
-   }
-
-   return ossimImageFileWriter::hasImageType(imageType);
-}
-
-void ossimJpegWriter::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if ( property.valid() )
-   {
-      if(property->getName() == ossimKeywordNames::COMPRESSION_QUALITY_KW)
-      {
-         ossimString stringValue;
-         property->valueToString(stringValue);
-         setQuality( stringValue.toInt32() );
-      }
-      else
-      {
-         ossimImageFileWriter::setProperty(property);
-      }
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimJpegWriter::getProperty(const ossimString& name)const
-{
-   if (name == ossimKeywordNames::COMPRESSION_QUALITY_KW)
-   {
-      ossimNumericProperty* prop =
-         new ossimNumericProperty(name,
-                                  ossimString::toString(theQuality),
-                                  1.0,
-                                  100.0);
-      prop->setNumericType(ossimNumericProperty::ossimNumericPropertyType_INT);
-      return prop;
-   }
-
-   return ossimImageFileWriter::getProperty(name);
-}
-
-void ossimJpegWriter::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimString name = ossimKeywordNames::COMPRESSION_QUALITY_KW;
-   propertyNames.push_back(name);
-   
-   ossimImageFileWriter::getPropertyNames(propertyNames);
-}
diff --git a/src/ossim/imaging/ossimJpegYCbCrToRgbSource.cpp b/src/ossim/imaging/ossimJpegYCbCrToRgbSource.cpp
deleted file mode 100644
index 2ed46ca..0000000
--- a/src/ossim/imaging/ossimJpegYCbCrToRgbSource.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimJpegYCbCrToRgbSource.cpp 9094 2006-06-13 19:12:40Z dburken $
-#include <ossim/imaging/ossimJpegYCbCrToRgbSource.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimJpegYCbCrVector.h>
-#include <ossim/base/ossimRgbVector.h>
-
-RTTI_DEF1(ossimJpegYCbCrToRgbSource,
-          "ossimJpegYCbCrToRgbSource" ,
-          ossimImageSourceFilter)
-
-ossimJpegYCbCrToRgbSource::ossimJpegYCbCrToRgbSource()
-   :ossimImageSourceFilter(),
-    theBlankTile()
-{
-}
-
-ossimJpegYCbCrToRgbSource::ossimJpegYCbCrToRgbSource(ossimImageSource* inputSource)
-   : ossimImageSourceFilter(inputSource),
-     theBlankTile()
-{
-}
-
-ossimJpegYCbCrToRgbSource::~ossimJpegYCbCrToRgbSource()
-{
-}
-
-void ossimJpegYCbCrToRgbSource::initialize()
-{
-   ossimImageSourceFilter::initialize();
-}
-
-void ossimJpegYCbCrToRgbSource::allocate()
-{
-   theBlankTile = new ossimImageData(this,
-                                     OSSIM_UCHAR,
-                                     3);
-}
-
-ossimRefPtr<ossimImageData> ossimJpegYCbCrToRgbSource::getTile(
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   if (!theBlankTile.valid())
-   {
-      allocate(); // first time through.
-   }
-   
-   if(theBlankTile.valid())
-   {
-      theBlankTile->setOrigin(tileRect.ul());
-      theBlankTile->setWidthHeight(tileRect.width(), tileRect.height());
-   }
-   
-   if(theInputConnection)
-   {
-      ossimRefPtr<ossimImageData> imageData =
-         theInputConnection->getTile(tileRect, resLevel);
-
-      if(!imageData.valid())
-      {
-         return theBlankTile;
-      }
-      if((isSourceEnabled())&&
-         (imageData->getNumberOfBands()==3)&&
-         (imageData->getScalarType()==OSSIM_UCHAR)&&
-         (imageData->getDataObjectStatus()!=OSSIM_NULL)&&
-         (imageData->getDataObjectStatus()!=OSSIM_EMPTY))
-      {
-         ossim_uint8* bands[3];
-         
-         bands[0] = static_cast<ossim_uint8*>(imageData->getBuf(0));
-         bands[1] = static_cast<ossim_uint8*>(imageData->getBuf(1));
-         bands[2] = static_cast<ossim_uint8*>(imageData->getBuf(2));
-         
-         long height = imageData->getHeight();
-         long width  = imageData->getWidth();
-         long offset = 0;
-         for(long row = 0; row < height; ++row)
-         {
-            for(long col = 0; col < width; ++col)
-            {
-               
-               ossimJpegYCbCrVector ycbcr(bands[0][offset],
-                                          bands[1][offset],
-                                          bands[2][offset]);
-               ossimRgbVector rgb(ycbcr);
-               
-               
-               bands[0][offset] = rgb.getR();
-               bands[1][offset] = rgb.getG();
-               bands[2][offset] = rgb.getB();
-               
-               ++offset;
-            }
-         }
-         imageData->validate();
-      }
-      return imageData;
-   }
-   
-   return theBlankTile;
-}  
diff --git a/src/ossim/imaging/ossimLandsatTopoCorrectionFilter.cpp b/src/ossim/imaging/ossimLandsatTopoCorrectionFilter.cpp
deleted file mode 100644
index 9fe6a40..0000000
--- a/src/ossim/imaging/ossimLandsatTopoCorrectionFilter.cpp
+++ /dev/null
@@ -1,360 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimLandsatTopoCorrectionFilter.cpp 21850 2012-10-21 20:09:55Z dburken $
-#include <ossim/imaging/ossimLandsatTopoCorrectionFilter.h>
-#include <ossim/imaging/ossimImageToPlaneNormalFilter.h>
-#include <ossim/support_data/ossimFfL7.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/base/ossimDirectory.h>
-#include <ossim/base/ossim2dLinearRegression.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimVisitor.h>
-#include <iostream>
-
-RTTI_DEF1(ossimLandsatTopoCorrectionFilter, "ossimLandsatTopoCorrectionFilter",ossimTopographicCorrectionFilter);
-ossimLandsatTopoCorrectionFilter::ossimLandsatTopoCorrectionFilter()
-   :ossimTopographicCorrectionFilter(),
-    theLandsatHeader("")
-{
-}
-
-ossimLandsatTopoCorrectionFilter::~ossimLandsatTopoCorrectionFilter()
-{
-}
-
-ossimLandsatTopoCorrectionFilter::ossimLandsatTopoCorrectionFilter(ossimImageSource* colorSource,
-                                                                   ossimImageSource* elevSource,
-                                                                   const ossimFilename& landsatFileName)
-   :ossimTopographicCorrectionFilter(colorSource,
-                                     elevSource),
-    theLandsatHeader(landsatFileName)
-{
-}
-
-void ossimLandsatTopoCorrectionFilter::initialize()
-{
-   
-   ossimTopographicCorrectionFilter::initialize();
-   if(theLandsatHeader == "")
-   {
-      setLandsatHeader(findLandsatHeader());
-   }
-   else
-   {
-      setLandsatHeader(theLandsatHeader);
-   }
-}
-
-void ossimLandsatTopoCorrectionFilter::setLandsatHeader(const ossimFilename& header)
-{
-   if(header != "")
-   {
-      theLandsatHeader = header;
-      ossimRefPtr<ossimFfL7> headerL7 = new ossimFfL7(header.c_str());
-      headerL7->getGain(theGain);
-      headerL7->getBias(theBias);
-      headerL7->getSunElevation(theLightSourceElevationAngle);
-      headerL7->getSunAzimuth(theLightSourceAzimuthAngle);
-      computeLightDirection();
-      theJulianDay = headerL7->getJulianDay();
-   }
-}
-
-ossimFilename ossimLandsatTopoCorrectionFilter::findLandsatHeader()
-{
-   ossimFilename result;
-
-   if(!getInput(0))
-   {
-      return result;
-   }
-
-   ossimTypeNameVisitor visitor(ossimString("ossimImageHandler"),
-                                true,
-                                ossimVisitor::VISIT_CHILDREN|ossimVisitor::VISIT_INPUTS);
-   getInput(0)->accept(visitor);
-   
-   // If there are multiple image handlers, e.g. a mosaic do not uses.
-   ossimRefPtr<ossimImageHandler> handler = 0;   
-   if ( visitor.getObjects().size() == 1 )
-   {
-      handler = visitor.getObjectAs<ossimImageHandler>( 0 );
-   }
-
-   if( handler.valid() )
-   {
-      ossimFilename imageFile = handler->getFilename();
-      imageFile.setExtension("fst");
-      if(imageFile.exists())
-      {
-         result = imageFile;
-      }
-      else
-      {
-         imageFile.setExtension("FST");
-         if(imageFile.exists())
-         {
-            result = imageFile;
-         }
-         else
-         {
-            ossimDirectory dir;
-
-            if(dir.open(imageFile.path()))
-            {
-               vector<ossimFilename> fileList;
-
-               dir.findAllFilesThatMatch(fileList,
-                                         ".*.fst");
-               if(fileList.size() <1)
-               {
-                  dir.findAllFilesThatMatch(fileList,
-                                            ".*.FST");
-               }
-               for(int i = 0; i < (int)fileList.size(); ++i)
-               {
-                  if(fileList[i].contains("_hpn")||
-                     fileList[i].contains("_hrf")||
-                     fileList[i].contains("_htm"))
-                  {
-                     result = fileList[i];
-                     break;
-                  }
-               }
-            }
-         }
-      }
-   }
-   return result;
-}
-
-// void ossimLandsatTopoCorrectionFilter::addRegressionPoints(std::vector<ossim2dLinearRegression>& regressionPoints,
-//                                                            ossimImageData* colorData,
-//                                                            ossimImageData* normalData)
-// {
-//    ossim_uint32 b = 0;
-   
-//    for(b = 0; b < colorData->getNumberOfBands(); ++b)
-//    {
-//       ossim_float64* normalBands[3];
-//       normalBands[0] = normalData->getBuf(0);
-//       normalBands[1] = normalData->getBuf(1);
-//       normalBands[2] = normalData->getBuf(2);
-//       ossim_float64* colorData = 
-// }
-
-#if 0
-void ossimLandsatTopoCorrectionFilter::computeC()
-{
-   theCComputedFlag = false;
-   ossim_uint32 totalNumberOfPixelsUsed = 0;
-   if(getInput(0)&&getInput(1))
-   {
-      std::vector<ossim2dLinearRegression> linearRegression(6);
-      
-      ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
-      ossimImageSource* normalSource  = PTR_CAST(ossimImageSource, getInput(1));
-      ossimFfL7 headerL7(theLandsatHeader.c_str());
-
-      if(theLandsatHeader == "")
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << "No landsat header found " << std::endl;
-         return;
-      }
-      if(colorSource->getNumberOfOutputBands() < 6)
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << "The color source needs all the vir bands from the landsat" << std::endl
-                                            << "Not enough bands to process the request" << std::endl;
-         return;
-      }
-      
-      ossimIrect normalRect = normalSource->getBoundingRect();
-      ossimIrect colorRect  = colorSource->getBoundingRect();
-      ossimIrect clipRect   = normalRect.clipToRect(colorRect);
-      ossimIpt ul = clipRect.ul();
-      ossimIpt lr = clipRect.lr();
-      long julianDay = headerL7.getJulianDay();
-      double d2 =pow( (double)(1 - 0.01674 * ossim::cosd(0.9856*(julianDay-4)) ), 2.0);
-      ossim_uint32 numberOfPixelsUsedForTile = 0;
-      for(int y = ul.y; ((y < lr.y)&&(totalNumberOfPixelsUsed<1000));++y)
-      {
-         for(int x = ul.x; ((x < lr.x)&&(totalNumberOfPixelsUsed<1000)); ++x)
-         {
-            ossimIrect reqRect(x,
-                               y,
-                               x + 127,
-                               y + 127);
-            ossimIrect reqClip = reqRect.clipToRect(clipRect);
-            ossimImageData* colorData  = colorSource->getTile(reqClip, 0);
-            ossimImageData* normalData = normalSource->getTile(reqClip, 0);
-            ossim_uint8* colorBands[6];
-            double* normalBands[3];
-            double normalBandsNp[3];
-            ossim_uint8 colorBandsNp[6];
-            colorBands[0] = (ossim_uint8*)colorData->getBuf(0);
-            colorBands[1] = (ossim_uint8*)colorData->getBuf(1);
-            colorBands[2] = (ossim_uint8*)colorData->getBuf(2);
-            colorBands[3] = (ossim_uint8*)colorData->getBuf(3);
-            colorBands[4] = (ossim_uint8*)colorData->getBuf(4);
-            colorBands[5] = (ossim_uint8*)colorData->getBuf(5);
-            colorBandsNp[0] = (ossim_uint8)colorData->getNullPix(0);
-            colorBandsNp[1] = (ossim_uint8)colorData->getNullPix(1);
-            colorBandsNp[2] = (ossim_uint8)colorData->getNullPix(2);
-            colorBandsNp[3] = (ossim_uint8)colorData->getNullPix(3);
-            colorBandsNp[4] = (ossim_uint8)colorData->getNullPix(4);
-            colorBandsNp[5] = (ossim_uint8)colorData->getNullPix(5);
-            normalBands[0] = (double*)normalData->getBuf(0);
-            normalBands[1] = (double*)normalData->getBuf(1);
-            normalBands[2] = (double*)normalData->getBuf(2);
-            normalBandsNp[0] = normalData->getNullPix(0);
-            normalBandsNp[1] = normalData->getNullPix(1);
-            normalBandsNp[2] = normalData->getNullPix(2);
-            ossim_uint32 offset = 0;
-            ossim_uint32 numberOfPixels = reqClip.width()*reqClip.height();
-            numberOfPixelsUsedForTile = 0;
-            for(offset = 0; ((offset < numberOfPixels)&&(numberOfPixelsUsedForTile < 10)); ++offset)
-            {
-               if((*colorBands[0] != colorBandsNp[0])&&
-                  (*colorBands[1] != colorBandsNp[1])&&
-                  (*colorBands[2] != colorBandsNp[2])&&
-                  (*colorBands[3] != colorBandsNp[3])&&
-                  (*colorBands[4] != colorBandsNp[4])&&
-                  (*colorBands[5] != colorBandsNp[5])&&
-                  (*normalBands[0] != normalBandsNp[0])&&
-                  (*normalBands[1] != normalBandsNp[1])&&
-                  (*normalBands[2] != normalBandsNp[2]))
-               {
-                  double ndviTest = (((double)*colorBands[3] - (double)*colorBands[2])/
-                                     ((double)*colorBands[3] + (double)*colorBands[2]));
-                  if(ndviTest > 0.0)
-                  {
-                     double radiance5 = theBias[5]+(*colorBands[5]*theGain[5]);
-//                     double p = (M_PI*radiance5*d2)/(esun[5]*cosd(90-theLightSourceAzimuthAngle));
-
-//                    if(p < .05)
-                     {
-                        double cosineI = ((*normalBands[0])*theLightDirection[0] +
-                                          (*normalBands[1])*theLightDirection[1] +
-                                          (*normalBands[2])*theLightDirection[2]);
-
-                        double radiance0 = theBias[0]+(*colorBands[0]*theGain[0]);
-                        double radiance1 = theBias[1]+(*colorBands[1]*theGain[1]);
-                        double radiance2 = theBias[2]+(*colorBands[2]*theGain[2]);
-                        double radiance3 = theBias[3]+(*colorBands[3]*theGain[3]);
-                        double radiance4 = theBias[4]+(*colorBands[4]*theGain[4]);
-                        cosineI = fabs(cosineI);
-                        if(cosineI > 1.0) cosineI = 1.0;
-                        if(cosineI < 0.0) cosineI = 0.0;
-                       cosineI = acos(cosineI);
-// //                         linearRegression[0].addPoint(ossimDpt( cosineI,(double)(*colorBands[0])));
-// //                         linearRegression[1].addPoint(ossimDpt( cosineI,(double)(*colorBands[1])));
-// //                         linearRegression[2].addPoint(ossimDpt( cosineI,(double)(*colorBands[2])));
-// //                         linearRegression[3].addPoint(ossimDpt( cosineI,(double)(*colorBands[3])));
-// //                         linearRegression[4].addPoint(ossimDpt( cosineI,(double)(*colorBands[4])));
-// //                         linearRegression[5].addPoint(ossimDpt( cosineI,(double)(*colorBands[5])));
-
-                        linearRegression[0].addPoint(ossimDpt( cosineI,radiance0));
-                        linearRegression[1].addPoint(ossimDpt( cosineI,radiance1));
-                        linearRegression[2].addPoint(ossimDpt( cosineI,radiance2));
-                        linearRegression[3].addPoint(ossimDpt( cosineI,radiance3));
-                        linearRegression[4].addPoint(ossimDpt( cosineI,radiance4));
-                        linearRegression[5].addPoint(ossimDpt( cosineI,radiance5));
-                        
-                        ++numberOfPixelsUsedForTile;
-                        ++totalNumberOfPixelsUsed;
-                     }
-                  }
-               }
-               ++colorBands[0];
-               ++colorBands[1];
-               ++colorBands[2];
-               ++colorBands[3];
-               ++colorBands[4];
-               ++colorBands[5];
-               ++normalBands[0];
-               ++normalBands[1];
-               ++normalBands[2];
-            }
-         }
-      }
-      if(totalNumberOfPixelsUsed > 2)
-      {
-         linearRegression[0].solve();
-         linearRegression[1].solve();
-         linearRegression[2].solve();
-         linearRegression[3].solve();
-         linearRegression[4].solve();
-         linearRegression[5].solve();
-         
-         ossimNotify(ossimNotifyLevel_INFO) << "linear regression results = " << endl
-                                             << linearRegression[0] << endl
-                                             << linearRegression[1] << endl
-                                             << linearRegression[2] << endl
-                                             << linearRegression[3] << endl
-                                             << linearRegression[4] << endl
-                                             << linearRegression[5] << endl;
-         double b,m;
-         linearRegression[0].getEquation(m, b);
-         theC[0] = b/m;
-         linearRegression[1].getEquation(m, b);
-         theC[1] = b/m;
-         linearRegression[2].getEquation(m, b);
-         theC[2] = b/m;
-         linearRegression[3].getEquation(m, b);
-         theC[3] = b/m;
-         linearRegression[4].getEquation(m, b);
-         theC[4] = b/m;
-         linearRegression[5].getEquation(m, b);
-         theC[5] = b/m;
-      }
-      else
-      {
-         ossimNotify(ossimNotifyLevel_INFO) << "No points found in regression test" << endl;
-      }
-               
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "No input connected to the ossimLandsatTopoCorrectionFilter" << std::endl;
-      return;
-   }
-   
-   theCComputedFlag = true;
-}
-#endif
-
-bool ossimLandsatTopoCorrectionFilter::loadState(const ossimKeywordlist& kwl,
-                                                 const char* prefix)
-{
-   ossimTopographicCorrectionFilter::loadState(kwl, prefix);
-   const char* filename = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
-
-   if(filename)
-   {
-      setLandsatHeader(filename);
-   }
-
-   return true;
-}
-
-bool ossimLandsatTopoCorrectionFilter::saveState(ossimKeywordlist& kwl,
-                                                 const char* prefix)const
-{
-   ossimTopographicCorrectionFilter::saveState(kwl, prefix);
-
-   kwl.add(prefix,
-           ossimKeywordNames::FILENAME_KW,
-           theLandsatHeader.c_str(),
-           true);
-   
-   return true;
-}
diff --git a/src/ossim/imaging/ossimMapCompositionSource.cpp b/src/ossim/imaging/ossimMapCompositionSource.cpp
deleted file mode 100644
index 4b08e56..0000000
--- a/src/ossim/imaging/ossimMapCompositionSource.cpp
+++ /dev/null
@@ -1,3800 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimMapCompositionSource.cpp 21631 2012-09-06 18:10:55Z dburken $
-
-#include <ossim/imaging/ossimMapCompositionSource.h>
-#include <ossim/imaging/ossimU8ImageData.h>
-#include <ossim/imaging/ossimImageDataHelper.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/imaging/ossimAnnotationFontObject.h>
-#include <ossim/imaging/ossimAnnotationLineObject.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/font/ossimFontFactoryRegistry.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimDms.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimColorProperty.h>
-#include <ossim/base/ossimContainerProperty.h>
-#include <ossim/base/ossimFontProperty.h>
-#include <ossim/base/ossimBooleanProperty.h>
-#include <ossim/base/ossimTextProperty.h>
-#include <ossim/base/ossimNumericProperty.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <sstream>
-
-using namespace std;
-
-static const char* GRID_TYPE_ENUM_NAMES[]     = {"none", "line", "reseaux"};
-static const char* VIEW_WIDTH_KW              = "view_width";
-static const char* VIEW_HEIGHT_KW             = "view_height";
-static const char* METER_GRID_SPACING_X_KW    = "meter_grid_spacing_x";
-static const char* METER_GRID_SPACING_Y_KW    = "meter_grid_spacing_y";
-static const char* GEO_GRID_SPACING_LON_KW    = "geo_grid_spacing_lon";
-static const char* GEO_GRID_SPACING_LAT_KW    = "geo_grid_spacing_lat";
-static const char* METER_GRID_TYPE_KW         = "meter_grid_type";
-static const char* GEO_GRID_TYPE_KW           = "geo_grid_type";
-static const char* TOP_BORDER_LENGTH_KW       = "top_border_length";
-static const char* BOTTOM_BORDER_LENGTH_KW    = "bottom_border_length";
-static const char* LEFT_BORDER_LENGTH_KW      = "top_border_length";
-static const char* RIGHT_BORDER_LENGTH_KW     = "right_border_length";
-static const char* BORDER_COLOR_KW            = "border_color";
-static const char* GEO_GRID_COLOR_KW          = "geo_grid_color";
-static const char* METER_GRID_COLOR_KW        = "meter_grid_color";
-static const char* TITLE_STRING_KW            = "title_string";
-static const char* TITLE_COLOR_KW             = "title_color";
-
-static const char* TOP_GEO_LABEL_COLOR_KW     = "top_geo_label_color";
-static const char* BOTTOM_GEO_LABEL_COLOR_KW  = "bottom_geo_label_color";
-static const char* LEFT_GEO_LABEL_COLOR_KW    = "left_geo_label_color";
-static const char* RIGHT_GEO_LABEL_COLOR_KW   = "right_geo_label_color";
-
-static const char* TOP_METER_LABEL_COLOR_KW     = "top_meter_label_color";
-static const char* BOTTOM_METER_LABEL_COLOR_KW  = "bottom_meter_label_color";
-static const char* LEFT_METER_LABEL_COLOR_KW    = "left_meter_label_color";
-static const char* RIGHT_METER_LABEL_COLOR_KW   = "right_meter_label_color";
-
-static const char* TOP_GEO_LABEL_FORMAT_KW    = "top_geo_label_format";
-static const char* BOTTOM_GEO_LABEL_FORMAT_KW = "bottom_geo_label_format";
-static const char* LEFT_GEO_LABEL_FORMAT_KW   = "left_geo_label_format";
-static const char* RIGHT_GEO_LABEL_FORMAT_KW  = "right_geo_label_format";
-
-static const char* TOP_GEO_LABEL_FLAG_KW      = "top_geo_label_flag";
-static const char* BOTTOM_GEO_LABEL_FLAG_KW   = "bottom_geo_label_flag";
-static const char* LEFT_GEO_LABEL_FLAG_KW     = "left_geo_label_flag";
-static const char* RIGHT_GEO_LABEL_FLAG_KW    = "right_geo_label_flag";
-
-static const char* TOP_METER_LABEL_FLAG_KW    = "top_meter_label_flag";
-static const char* BOTTOM_METER_LABEL_FLAG_KW = "bottom_meter_label_flag";
-static const char* LEFT_METER_LABEL_FLAG_KW   = "left_meter_label_flag";
-static const char* RIGHT_METER_LABEL_FLAG_KW  = "right_meter_label_flag";
-
-static const char* TOP_GEO_LABEL_FONT_KW      = "top_geo_label_font";
-static const char* BOTTOM_GEO_LABEL_FONT_KW   = "bottom_geo_label_font";
-static const char* LEFT_GEO_LABEL_FONT_KW     = "left_geo_label_font";
-static const char* RIGHT_GEO_LABEL_FONT_KW    = "right_geo_label_font";
-static const char* TOP_METER_LABEL_FONT_KW    = "top_meter_label_font";
-static const char* BOTTOM_METER_LABEL_FONT_KW = "bottom_meter_label_font";
-static const char* LEFT_METER_LABEL_FONT_KW   = "left_meter_label_font";
-static const char* RIGHT_METER_LABEL_FONT_KW  = "right_meter_label_font";
-static const char* TITLE_FONT_KW              = "title_font";
-
-static ossimTrace traceDebug("ossimMapCompositionSource:debug");
-
-RTTI_DEF1(ossimMapCompositionSource, "ossimMapCompositionSource", ossimAnnotationSource);
-ossimMapCompositionSource::ossimMapCompositionSource()
-   :ossimAnnotationSource(),
-    theMeterGridType(OSSIM_GRID_NONE),
-    theGeographicGridType(OSSIM_GRID_LINE),
-    theTopBorderLength(200),
-    theBottomBorderLength(200),
-    theLeftBorderLength(300),
-    theRightBorderLength(300),
-    theBorderColor(255,255,255),
-    theGeographicGridColor(255,255,255),
-    theMeterGridColor(255,255,255),
-    theTitleString(""),
-    theTitleFont(NULL),
-    theTitleColor(1, 1, 1),
-    theTopGeographicLabelColor(1, 1, 1),
-    theBottomGeographicLabelColor(1, 1, 1),
-    theLeftGeographicLabelColor(1, 1, 1),
-    theRightGeographicLabelColor(1, 1, 1),
-    theTopMeterLabelColor(1, 1, 1),
-    theBottomMeterLabelColor(1, 1, 1),
-    theLeftMeterLabelColor(1, 1, 1),
-    theRightMeterLabelColor(1, 1, 1),
-    theGeographicTopLabelFont(NULL),
-    theGeographicBottomLabelFont(NULL),
-    theGeographicLeftLabelFont(NULL),
-    theGeographicRightLabelFont(NULL),
-    theMeterTopLabelFont(NULL),
-    theMeterBottomLabelFont(NULL),
-    theMeterLeftLabelFont(NULL),
-    theMeterRightLabelFont(NULL),
-    theTopGeographicFormat("dd at mm'ss\".ssssC"),
-    theBottomGeographicFormat("dd at mm'ss\".ssssC"),
-    theLeftGeographicFormat("dd at mm'ss\".ssssC"),
-    theRightGeographicFormat("dd at mm'ss\".ssssC"),
-    theTopGeographicLabelFlag(true),
-    theBottomGeographicLabelFlag(true),
-    theLeftGeographicLabelFlag(true),
-    theRightGeographicLabelFlag(true),
-    theTopGeographicTickFlag(true),
-    theBottomGeographicTickFlag(true),
-    theLeftGeographicTickFlag(true),
-    theRightGeographicTickFlag(true),
-    theTopMeterLabelFlag(false),
-    theBottomMeterLabelFlag(false),
-    theLeftMeterLabelFlag(false),
-    theRightMeterLabelFlag(false),
-    theTopMeterTickFlag(false),
-    theBottomMeterTickFlag(false),
-    theLeftMeterTickFlag(false),
-    theRightMeterTickFlag(false),
-    theGeographicSpacing(1.0, 1.0),
-    theMeterSpacing(3600*30, 3600*30)
-{
-   theViewWidthHeight = ossimIpt(-1,-1);
-   vector<ossimFontInformation> info;
-   ossimFontFactoryRegistry::instance()->getFontInformation(info);
-
-   if(info.size())
-   {
-      theGeographicTopLabelFont = ossimFontFactoryRegistry::instance()->createFont(info[0]);
-      theGeographicTopLabelFontInfo = info[0];
-      theGeographicTopLabelFontInfo.thePointSize = ossimIpt(12,12);
-
-      if(theGeographicTopLabelFont.valid())
-      {
-         theGeographicBottomLabelFont     = (ossimFont*)theGeographicTopLabelFont->dup();
-         theGeographicBottomLabelFontInfo = theGeographicTopLabelFontInfo;
-         theGeographicLeftLabelFont       = (ossimFont*)theGeographicTopLabelFont->dup();
-         theGeographicLeftLabelFontInfo   = theGeographicTopLabelFontInfo;
-         theGeographicRightLabelFont      = (ossimFont*)theGeographicTopLabelFont->dup();
-         theGeographicRightLabelFontInfo  = theGeographicTopLabelFontInfo;
-
-         theMeterTopLabelFont             = (ossimFont*)theGeographicTopLabelFont->dup();
-         theMeterTopLabelFontInfo         = theGeographicTopLabelFontInfo;
-         theMeterBottomLabelFont          = (ossimFont*)theGeographicTopLabelFont->dup();
-         theMeterBottomLabelFontInfo      = theGeographicTopLabelFontInfo;
-         theMeterLeftLabelFont            = (ossimFont*)theGeographicTopLabelFont->dup();
-         theMeterLeftLabelFontInfo        = theGeographicTopLabelFontInfo;
-         theMeterRightLabelFont           = (ossimFont*)theGeographicTopLabelFont->dup();
-         theMeterRightLabelFontInfo       = theGeographicTopLabelFontInfo;
-         
-         theTitleFont                     = (ossimFont*)theGeographicTopLabelFont->dup();
-         theTitleFontInfo                 = theGeographicTopLabelFontInfo;
-         theTitleFontInfo.thePointSize    = ossimIpt(48, 48);
-      }
-   }
-}
-
-ossimMapCompositionSource::~ossimMapCompositionSource()
-{
-   theGeographicTopLabelFont = 0;
-   theGeographicBottomLabelFont = 0;
-   theGeographicLeftLabelFont = 0;
-   theGeographicRightLabelFont = 0;
-   theMeterTopLabelFont = 0;
-   theMeterBottomLabelFont = 0;
-   theMeterLeftLabelFont = 0;
-
-   theMeterRightLabelFont = 0;
-   theTitleFont = 0;
-   deleteFixedAnnotations();
-}
-
-ossimRefPtr<ossimImageData> ossimMapCompositionSource::getTile(const ossimIrect& tileRect,
-                                                               ossim_uint32 resLevel)
-{
-   if(!theTile)
-   {
-      allocate(tileRect);
-      if(!theTile)
-      {
-         if(theInputConnection)
-         {
-            return theInputConnection->getTile(tileRect, resLevel);
-         }
-      }
-   }
-   theTile->setImageRectangle(tileRect);
-   theTile->makeBlank();
-   
-   if(theInputConnection)
-   {
-      ossimRefPtr<ossimImageData> tile = theInputConnection->getTile(tileRect,
-                                                                     resLevel);
-
-      if(tile.valid())
-      {
-         if(tile->getScalarType() != OSSIM_UCHAR)
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimMapCompositionSource::getTile\n"
-               << "Error input is not uchar" << endl;
-            return tile;
-         }
-         else
-         {
-            if(tile->getBuf()&&(tile->getDataObjectStatus() != OSSIM_EMPTY))
-            {
-               int band = 0;
-               int outBands = theTile->getNumberOfBands();
-               int minBand = std::min((long)theTile->getNumberOfBands(),
-                                      (long)tile->getNumberOfBands());
-               for(band = 0; band < minBand; ++band)
-               {
-                  theTile->loadBand(tile->getBuf(band),
-                                    tile->getImageRectangle(),
-                                    band);
-               }
-               // copy last band of input tile to all output
-               // bands if the input tile did not have enough bands.
-               //
-               for(;band < outBands;++band)
-               {
-                  theTile->loadBand(tile->getBuf(minBand-1),
-                                    tile->getImageRectangle(),
-                                    band);
-               }
-            }
-	    drawBorders();
-	    drawAnnotations(theTile);
-         }
-      }
-   }
-   theTile->validate();
-   return theTile;
-}
-
-void ossimMapCompositionSource::setGeographicLabelFormat(const ossimString format)
-{
-   if( (format == theTopGeographicFormat)&&
-       (format == theBottomGeographicFormat)&&
-       (format == theLeftGeographicFormat)&&
-       (format == theRightGeographicFormat))
-   {
-      return;
-   }
-   theTopGeographicFormat    = format;
-   theBottomGeographicFormat = format;
-   theLeftGeographicFormat   = format;
-   theRightGeographicFormat  = format;
-}
-
-void ossimMapCompositionSource::setTopGeographicLabelFormat(const ossimString& format)
-{
-   if(format == theTopGeographicFormat)
-   {
-      return;
-   }
-   theTopGeographicFormat = format;
-}
-
-void ossimMapCompositionSource::setBottomGeographicLabelFormat(const ossimString& format)
-{
-   if(format == theBottomGeographicFormat)
-   {
-      return;
-   }
-   theBottomGeographicFormat = format;
-
-   // need to reset the fonts
-//   layoutAnnotations();
-}
-
-void ossimMapCompositionSource::setLeftGeographicLabelFormat(const ossimString& format)
-{
-   if(format == theLeftGeographicFormat)
-   {
-      return;
-   }
-   theLeftGeographicFormat = format;
-
-   // need to reset the fonts
-//   layoutAnnotations();
-}
-
-void ossimMapCompositionSource::setRightGeographicLabelFormat(const ossimString& format)
-{
-   if(format == theRightGeographicFormat)
-   {
-      return;
-   }
-   theRightGeographicFormat = format;
-
-}
-
-void ossimMapCompositionSource::setTitleFont(const ossimFontInformation& fontInfo)
-{
-   if(theTitleFontInfo == fontInfo)
-   {
-      return;
-   }
-   ossimFont* font = ossimFontFactoryRegistry::instance()->createFont(fontInfo);
-   if(font)
-   {
- 
-      theTitleFont     = font;
-      theTitleFontInfo = fontInfo;      
-   }
-}
-
-void ossimMapCompositionSource::setGeographicTopLabelFont(const ossimFontInformation& fontInfo)
-{
-   const char* MODULE = "ossimMapCompositionSource::setGeographicTopLabelFont";
-   
-   if(traceDebug())
-   {
-      CLOG << "Entering...." <<endl;
-   }
-   if(theGeographicTopLabelFontInfo == fontInfo)
-   {
-      if(traceDebug())
-      {
-         CLOG << "Font info the same exiting...." <<endl
-              << theGeographicTopLabelFontInfo << endl;
-      }
-      
-      return;
-   }
-   ossimFont* font = ossimFontFactoryRegistry::instance()->createFont(fontInfo);
-
-   if(font)
-   {
-      if(traceDebug())
-      {
-         CLOG << "Previous font info " <<endl
-              << theGeographicTopLabelFont.get() << endl;
-      }
-      theGeographicTopLabelFont = font;
-      theGeographicTopLabelFontInfo = fontInfo;
-
-      if(traceDebug())
-      {
-         CLOG << "New font info " <<endl
-              << theGeographicTopLabelFont.get() << endl;
-      }      
-   }
-}
-
-void ossimMapCompositionSource::setGeographicBottomLabelFont(const ossimFontInformation& fontInfo)
-{
-   if(theGeographicBottomLabelFontInfo == fontInfo)
-   {
-      return;
-   }
-   ossimFont* font = ossimFontFactoryRegistry::instance()->createFont(fontInfo);
-
-   if(font)
-   {
-      theGeographicBottomLabelFont     = font;
-      theGeographicBottomLabelFontInfo = fontInfo;
-
-   }
-}
-
-void ossimMapCompositionSource::setGeographicLeftLabelFont(const ossimFontInformation& fontInfo)
-{
-   if(theGeographicRightLabelFontInfo == fontInfo)
-   {
-      return;
-   }
-   ossimFont* font = ossimFontFactoryRegistry::instance()->createFont(fontInfo);
-
-   if(font)
-   {
-      theGeographicLeftLabelFont     = font;
-      theGeographicLeftLabelFontInfo = fontInfo;
-
-   }
-}
-
-void ossimMapCompositionSource::setGeographicRightLabelFont(const ossimFontInformation& fontInfo)
-{
-   if(theGeographicRightLabelFontInfo == fontInfo)
-   {
-      return;
-   }
-   
-   ossimFont* font = ossimFontFactoryRegistry::instance()->createFont(fontInfo);
-
-   if(font)
-   {
-      theGeographicRightLabelFont = font;
-      theGeographicRightLabelFontInfo = fontInfo;
-   }
-}
-
-
-void ossimMapCompositionSource::setMeterTopLabelFont(const ossimFontInformation& fontInfo)
-{
-   if(theMeterTopLabelFontInfo == fontInfo)
-   {
-      return;
-   }
-   ossimFont* font = ossimFontFactoryRegistry::instance()->createFont(fontInfo);
-
-   if(font)
-   {
-      theMeterTopLabelFont     = font;
-      theMeterTopLabelFontInfo = fontInfo;
-   }
-}
-
-void ossimMapCompositionSource::setMeterBottomLabelFont(const ossimFontInformation& fontInfo)
-{
-   if(theMeterBottomLabelFontInfo == fontInfo)
-   {
-      return;
-   }
-   ossimFont* font = ossimFontFactoryRegistry::instance()->createFont(fontInfo);
-
-   if(font)
-   {
-      theMeterBottomLabelFont     = font;
-      theMeterBottomLabelFontInfo = fontInfo;
-   }
-}
-
-void ossimMapCompositionSource::setMeterLeftLabelFont(const ossimFontInformation& fontInfo)
-{
-   if(theMeterLeftLabelFontInfo == fontInfo)
-   {
-      return;
-   }
-   ossimFont* font = ossimFontFactoryRegistry::instance()->createFont(fontInfo);
-
-   if(font)
-   {
-      theMeterLeftLabelFont     = font;
-      theMeterLeftLabelFontInfo = fontInfo;
-   }
-}
-
-void ossimMapCompositionSource::setMeterRightLabelFont(const ossimFontInformation& fontInfo)
-{
-   if(theMeterRightLabelFontInfo == fontInfo)
-   {
-      return;
-   }
-   ossimFont* font = ossimFontFactoryRegistry::instance()->createFont(fontInfo);
-
-   if(font)
-   {
-      theMeterRightLabelFont     = font;
-      theMeterRightLabelFontInfo = fontInfo;
-   }
-}
-
-ossimIrect ossimMapCompositionSource::getBoundingRect(ossim_uint32 resLevel)const
-{
-   ossimIrect result;
-
-   result.makeNan();
-   if(theInputConnection)
-   {
-      ossimIrect inputRect  = getViewingRect();
-
-      if(!inputRect.hasNans())
-      {
-         ossimDpt decimation;
-         getDecimationFactor(resLevel,
-                             decimation);
-         int leftBorderLength   = theLeftBorderLength;
-         int rightBorderLength  = theRightBorderLength;
-         int topBorderLength    = theTopBorderLength;
-         int bottomBorderLength = theBottomBorderLength;
-
-         ossimIpt p1(inputRect.ul().x - leftBorderLength,
-                     inputRect.ul().y - topBorderLength);
-         
-         ossimIpt p2(inputRect.ur().x + rightBorderLength,
-                     inputRect.ur().y - topBorderLength);
-         
-         ossimIpt p3(inputRect.lr().x + rightBorderLength,
-                     inputRect.lr().y + bottomBorderLength);
-         
-         ossimIpt p4(inputRect.ll().x - leftBorderLength,
-                     inputRect.ll().y + bottomBorderLength);
-
-         result = ossimIrect(p1, p2, p3, p4);
-         
-         if(!decimation.hasNans())
-         {
-            result*=decimation;
-         }
-      }
-   }
-   return result;
-}
-
-void ossimMapCompositionSource::layoutAnnotations()
-{
-   deleteFixedAnnotations();
-
-   addTitle();
-   addGridLabels();
-   if(theGeographicGridType == OSSIM_GRID_LINE)
-   {
-      addGeographicGridLines();
-   }
-   else if(theGeographicGridType == OSSIM_GRID_RESEAUX)
-   {
-      addGeographicGridReseaux();
-   }
-   
-   if(theMeterGridType == OSSIM_GRID_LINE)
-   {
-      addMeterGridLines();
-   }
-   else if(theMeterGridType == OSSIM_GRID_RESEAUX)
-   {
-      addMeterGridReseaux();
-   }
-}
-
-
-void ossimMapCompositionSource::initialize()
-{
-   ossimAnnotationSource::initialize();   
-
-   theTile = 0;
-   if(theInputConnection)
-   {
-      computeBorderRects();
-      layoutAnnotations();
-   }
-   else 
-   {
-      deleteFixedAnnotations();
-   }
-}
-
-void ossimMapCompositionSource::computeBorderRects()
-{
-   if(theInputConnection)
-   {
-      ossimIrect inputRect = getViewingRect();;
-      
-      theTopBorder = ossimIrect(inputRect.ul().x - theLeftBorderLength,
-                                inputRect.ul().y - theTopBorderLength,
-                                inputRect.ur().x + theRightBorderLength,
-                                inputRect.ur().y);
-      
-      theBottomBorder = ossimIrect(inputRect.ll().x - theLeftBorderLength,
-                                   inputRect.ll().y,
-                                   inputRect.lr().x + theRightBorderLength,
-                                   inputRect.lr().y + theBottomBorderLength);
-      
-      theLeftBorder   = ossimIrect(theTopBorder.ul().x,
-                                   theTopBorder.ll().y,
-                                   inputRect.ll().x,
-                                   inputRect.ll().y);
-      
-      theRightBorder   = ossimIrect(inputRect.ur().x,
-                                    inputRect.ur().y,
-                                    theBottomBorder.lr().x,
-                                    inputRect.lr().y);
-   }
-   else
-   {
-      theTopBorder.makeNan();
-      theBottomBorder.makeNan();
-      theLeftBorder.makeNan();
-      theRightBorder.makeNan();
-   }
-      
-}
-
-void ossimMapCompositionSource::drawBorders()
-{
-   if(theTile.valid())
-   {
-      ossimIrect top    = theTopBorder;
-      ossimIrect bottom = theBottomBorder;
-      ossimIrect left   = theLeftBorder;
-      ossimIrect right  = theRightBorder;
-
-//       if(resLevel)
-//       {
-//          ossimDpt decimation;
-//          getDecimationFactor(resLevel,
-//                              decimation);
-
-//          if(!decimation.hasNans())
-//          {
-//             top*=decimation;
-//             bottom*=decimation;
-//             left*=decimation;
-//             right*=decimation;            
-//          }
-//       }
-      ossimIrect tileRect = theTile->getImageRectangle();
-      
-      ossimImageDataHelper helper(theTile.get());
-      
-      if(top.intersects(tileRect))
-      {
-         helper.fill(theBorderColor,
-                     top.clipToRect(tileRect),false);
-      }
-      if(bottom.intersects(tileRect))
-      {
-         helper.fill(theBorderColor,
-                     bottom.clipToRect(tileRect),false);
-      }
-      if(left.intersects(tileRect))
-      {
-         helper.fill(theBorderColor,
-                     left.clipToRect(tileRect),false);
-      }
-      if(right.intersects(tileRect))
-      {
-         helper.fill(theBorderColor,
-                     right.clipToRect(tileRect),false);
-      }
-   }
-}
-
-void ossimMapCompositionSource::addGridLabels()
-{
-   addGeographicTopGridLabels();
-   addGeographicBottomGridLabels();
-   addGeographicLeftGridLabels();
-   addGeographicRightGridLabels();
-
-   addMeterGridLabels();
-}
-
-void ossimMapCompositionSource::addGeographicTopGridLabels()
-{
-   const char* MODULE = "ossimMapCompositionSource::addGeographicTopGridLabels";
-   if(traceDebug())
-   {
-      CLOG << "Entering...." << endl;
-   }
-   if((!theTopGeographicLabelFlag)&&(!theTopGeographicTickFlag))
-   {
-      if(traceDebug())
-      {
-         CLOG << "Exiting, flags are false...." << endl;
-      }
-      return;
-   }
-   
-   if(theInputConnection)
-   { 
-      const ossimMapProjection* mapProj = inputMapProjection();
-      ossimGpt gpt[4];
-      ossimDrect rect = getViewingRect();
-
-      if(rect.hasNans()) return;
-      mapProj->lineSampleToWorld(rect.ul(), gpt[0]);
-      mapProj->lineSampleToWorld(rect.ur(), gpt[1]);
-      mapProj->lineSampleToWorld(rect.lr(), gpt[2]);
-      mapProj->lineSampleToWorld(rect.ll(), gpt[3]);
-      
-      ossimDrect grect(gpt[0], gpt[1], gpt[2], gpt[3], OSSIM_RIGHT_HANDED);
-
-      if(grect.hasNans()) return;
-      ossimDpt ulLatLon(((int)((grect.ul().x-theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
-                        ((int)((grect.ul().y+theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
-      
-      ossimDpt lrLatLon(((int)((grect.lr().x+theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
-                        ((int)((grect.lr().y-theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
-
-      while(ulLatLon.lat > 90)
-      {
-         ulLatLon.lat -= theGeographicSpacing.lat;
-      }
-      while(ulLatLon.lon < -180)
-      {
-         ulLatLon.lon += theGeographicSpacing.lon;
-      }
-      while(lrLatLon.lat < -90)
-      {
-         ulLatLon.lat += theGeographicSpacing.lat;
-      }
-      while(lrLatLon.lon > 180)
-      {
-         ulLatLon.lon -= theGeographicSpacing.lon;
-      }
-      
-      ossimDrect latLonSpacing(ulLatLon,
-                               lrLatLon,
-                               OSSIM_RIGHT_HANDED);
-
-      if(traceDebug())
-      {
-         CLOG << "labeling bounding geo rect = " << latLonSpacing << endl;
-      }
-      // do the top side labels.
-      for(double lon = latLonSpacing.ul().x; lon <= latLonSpacing.lr().x; lon+=theGeographicSpacing.x)
-      {
-         ossimDpt tipt; // top
-         ossimDpt bipt; // bottom
-         
-         ossimGpt tgpt(latLonSpacing.ul().y,
-                       lon,
-                       0.0,
-                       gpt[0].datum());
-
-         ossimGpt bgpt(latLonSpacing.lr().y,
-                       lon,
-                       0.0,
-                       gpt[0].datum());
-         
-         mapProj->worldToLineSample(tgpt, tipt);
-         mapProj->worldToLineSample(bgpt, bipt);
-
-         
-         if((!tipt.hasNans()&& !bipt.hasNans()) && rect.clip(tipt, bipt))
-         {
-            ossimIpt rounded(tipt);
-            if( (rounded.x >= rect.ul().x)&&
-                (rounded.x <= rect.lr().x))
-            {
-               if(theTopGeographicLabelFlag)
-               {
-                  ossimDms dms(tgpt.lond(), false);
-               
-                  ossimString dmsString = dms.toString(theTopGeographicFormat.c_str());
-                  ossimAnnotationFontObject* lonLabel = 
-                     new ossimAnnotationFontObject(ossimIpt(0,0), dmsString);
-                  lonLabel->setFont(theGeographicTopLabelFont.get());
-                  lonLabel->setGeometryInformation(theGeographicTopLabelFontInfo);
-                  lonLabel->computeBoundingRect();
-                  ossimDrect boundsD;
-                  lonLabel->getBoundingRect(boundsD);
-                  
-                  ossimIpt center( rounded.x, ossim::round<int>(rect.ul().y-(boundsD.height()/2)));
-               
-                  lonLabel->setColor(theTopGeographicLabelColor.getR(), theTopGeographicLabelColor.getG(), theTopGeographicLabelColor.getB());
-                  lonLabel->setCenterPosition(center);
-                  lonLabel->computeBoundingRect();
-
-                  ossimDrect labelRect;
-                  lonLabel->getBoundingRect(labelRect);
-                  
-                  if(rect.intersects(labelRect))
-                  {
-                     ossimIrect intersection = rect.clipToRect(labelRect);
-                     center.y -= ossim::round<int>(rect.ul().y - intersection.lr().y);
-                  }
-
-                  center.y -= 24; // this will need to be the tick height later;
-                  lonLabel->setCenterPosition(center);
-                  lonLabel->computeBoundingRect();
-                  
-                  addFixedAnnotation(lonLabel);
-               }
-               if(theTopGeographicTickFlag)
-               {
-                  ossimAnnotationLineObject* lineLabel = new ossimAnnotationLineObject
-                     (ossimIpt(rounded.x,ossim::round<int>(rect.ul().y-24)),
-                      ossimIpt(rounded.x, ossim::round<int>(rect.ul().y)));
-                  lineLabel->setColor(theTopGeographicLabelColor.getR(), theTopGeographicLabelColor.getG(), theTopGeographicLabelColor.getB());
-                  addFixedAnnotation(lineLabel);
-               }
-            }
-         }
-      }
-   }
-   if(traceDebug())
-   {
-      CLOG << "Exiting...." << endl;
-   }
-}
-
-void ossimMapCompositionSource::addGeographicBottomGridLabels()
-{
-   if((!theBottomGeographicLabelFlag)&&(!theBottomGeographicTickFlag))
-   {
-      return;
-   }
-
-   const ossimMapProjection* mapProj = inputMapProjection();
-   if(mapProj)
-   { 
-      ossimGpt gpt[4];
-      ossimDrect rect = getViewingRect();
-
-      if(rect.hasNans()) return;
-      mapProj->lineSampleToWorld(rect.ul(), gpt[0]);
-      mapProj->lineSampleToWorld(rect.ur(), gpt[1]);
-      mapProj->lineSampleToWorld(rect.lr(), gpt[2]);
-      mapProj->lineSampleToWorld(rect.ll(), gpt[3]);
-      
-      ossimDrect grect(gpt[0], gpt[1], gpt[2], gpt[3], OSSIM_RIGHT_HANDED);
-
-      if(grect.hasNans()) return;
-      ossimDpt ulLatLon(((int)((grect.ul().x-theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
-                        ((int)((grect.ul().y+theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
-      
-      ossimDpt lrLatLon(((int)((grect.lr().x+theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
-                        ((int)((grect.lr().y-theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
-
-      while(ulLatLon.lat > 90)
-      {
-         ulLatLon.lat -= theGeographicSpacing.lat;
-      }
-      while(ulLatLon.lon < -180)
-      {
-         ulLatLon.lon += theGeographicSpacing.lon;
-      }
-      while(lrLatLon.lat < -90)
-      {
-         ulLatLon.lat += theGeographicSpacing.lat;
-      }
-      while(lrLatLon.lon > 180)
-      {
-         ulLatLon.lon -= theGeographicSpacing.lon;
-      }
-      
-      ossimDrect latLonSpacing(ulLatLon,
-                               lrLatLon,
-                               OSSIM_RIGHT_HANDED);
-
-      // do the top side labels.
-      for(double lon = latLonSpacing.ul().x; lon <= latLonSpacing.lr().x; lon+=theGeographicSpacing.x)
-      {
-         ossimDpt tipt; // top
-         ossimDpt bipt; // bottom
-         
-         ossimGpt tgpt(latLonSpacing.ul().y,
-                       lon,
-                       0.0,
-                       gpt[0].datum());
-
-         ossimGpt bgpt(latLonSpacing.lr().y,
-                       lon,
-                       0.0,
-                       gpt[0].datum());
-         
-         mapProj->worldToLineSample(tgpt, tipt);
-         mapProj->worldToLineSample(bgpt, bipt);
-
-         if(rect.clip(tipt, bipt))
-         {
-            ossimIpt rounded(bipt);
-            if( (rounded.x >= rect.ul().x)&&
-                (rounded.x <= rect.lr().x))
-            {
-               if(theBottomGeographicLabelFlag)
-               {
-                  ossimDms dms(bgpt.lond(), false);
-                  
-                  ossimString dmsString = dms.toString(theBottomGeographicFormat.c_str());
-                  ossimAnnotationFontObject* lonLabel = new ossimAnnotationFontObject(ossimIpt(0,0),
-                                                                                      dmsString);
-                  lonLabel->setGeometryInformation(theGeographicBottomLabelFontInfo);
-                  lonLabel->setFont(theGeographicBottomLabelFont.get());
-//                  lonLabel->setFont(theGeographicBottomLabelFont->dup());
-                  
-                  lonLabel->computeBoundingRect();
-                  ossimDrect boundsD;
-                  lonLabel->getBoundingRect(boundsD);
-                  ossimIrect bounds = boundsD;
-                  
-                  ossimIpt center( rounded.x,
-                                   ossim::round<int>(rect.lr().y+(bounds.height()/2)));
-                  
-                  lonLabel->setColor(theBottomGeographicLabelColor.getR(), theBottomGeographicLabelColor.getG(), theBottomGeographicLabelColor.getB());
-                  lonLabel->setCenterPosition(center);
-                  lonLabel->computeBoundingRect();
-                  lonLabel->getBoundingRect(boundsD);
-                  bounds = boundsD;
-
-                  ossimDrect labelRect;
-                  lonLabel->getBoundingRect(labelRect);
-                  
-                  if(rect.intersects(labelRect))
-                  {
-                     ossimIrect intersection = rect.clipToRect(labelRect);
-                     center.y += ossim::round<int>(rect.lr().y - intersection.ul().y);
-                  }
-
-                  center.y += 24; // this will need to be the tick height later;
-                  lonLabel->setCenterPosition(center);
-                  lonLabel->computeBoundingRect();
-
-
-                  addFixedAnnotation(lonLabel);
-               }
-               if(theBottomGeographicTickFlag)
-               {
-                  ossimAnnotationLineObject* lineLabel = new ossimAnnotationLineObject(ossimIpt(rounded.x,
-                                                                                                ossim::round<int>(rect.lr().y+24)),
-                                                                                       ossimIpt(rounded.x,
-                                                                                                ossim::round<int>(rect.lr().y)));
-                  lineLabel->setColor(theBottomGeographicLabelColor.getR(), theBottomGeographicLabelColor.getG(), theBottomGeographicLabelColor.getB());
-                  addFixedAnnotation(lineLabel);
-               }
-            }         
-         }
-      }
-   }   
-}
-
-void ossimMapCompositionSource::addGeographicLeftGridLabels()
-{
-   if((!theLeftGeographicLabelFlag)&&(!theLeftGeographicTickFlag))
-   {
-      return;
-   }
-   
-   const ossimMapProjection* mapProj = inputMapProjection();
-   if(mapProj)
-   { 
-      ossimGpt gpt[4];
-      ossimDrect rect = getViewingRect();
-
-      if(rect.hasNans()) return;
-      mapProj->lineSampleToWorld(rect.ul(), gpt[0]);
-      mapProj->lineSampleToWorld(rect.ur(), gpt[1]);
-      mapProj->lineSampleToWorld(rect.lr(), gpt[2]);
-      mapProj->lineSampleToWorld(rect.ll(), gpt[3]);
-      
-      ossimDrect grect(gpt[0],
-                       gpt[1],
-                       gpt[2],
-                       gpt[3],
-                       OSSIM_RIGHT_HANDED);
-
-      if(grect.hasNans()) return;
-      ossimDpt ulLatLon(((int)((grect.ul().x-theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
-                        ((int)((grect.ul().y+theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
-      
-      ossimDpt lrLatLon(((int)((grect.lr().x+theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
-                        ((int)((grect.lr().y-theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
-
-      while(ulLatLon.lat > 90)
-      {
-         ulLatLon.lat -= theGeographicSpacing.lat;
-      }
-      while(ulLatLon.lon < -180)
-      {
-         ulLatLon.lon += theGeographicSpacing.lon;
-      }
-      while(lrLatLon.lat < -90)
-      {
-         ulLatLon.lat += theGeographicSpacing.lat;
-      }
-      while(lrLatLon.lon > 180)
-      {
-         ulLatLon.lon -= theGeographicSpacing.lon;
-      }
-      
-      ossimDrect latLonSpacing(ulLatLon,
-                               lrLatLon,
-                               OSSIM_RIGHT_HANDED);
-      // do the left side labels
-      for(double lat = latLonSpacing.ul().y; lat >= latLonSpacing.lr().y; lat-=theGeographicSpacing.y)
-      {
-         ossimDpt lipt;
-         ossimDpt ript;
-         ossimGpt lgpt(lat,
-                       latLonSpacing.ul().x,
-                       0.0,
-                       gpt[0].datum());
-         ossimGpt rgpt(lat,
-                       latLonSpacing.ur().x,
-                       0.0,
-                       gpt[0].datum());
-
-         
-         mapProj->worldToLineSample(lgpt, lipt);
-         mapProj->worldToLineSample(rgpt, ript);
-         if(rect.clip(lipt, ript))
-         {
-            ossimIpt rounded(lipt);
-            if( (rounded.y >= rect.ul().y)&&
-                (rounded.y <= rect.lr().y))
-            {
-               if(theLeftGeographicLabelFlag)
-               {
-                  ossimDms dms(lgpt.latd());
-                  
-                  ossimString dmsString = dms.toString(theLeftGeographicFormat.c_str());
-                  ossimAnnotationFontObject* latLabel = new ossimAnnotationFontObject(ossimIpt(0,0),
-                                                                                      dmsString);
-                  latLabel->setGeometryInformation(theGeographicLeftLabelFontInfo);
-                  latLabel->setFont(theGeographicLeftLabelFont.get());
-//                  latLabel->setFont(theGeographicLeftLabelFont->dup());
-                  
-                  latLabel->computeBoundingRect();
-                  ossimDrect boundsD;
-                  latLabel->getBoundingRect(boundsD);
-                  ossimIrect bounds = boundsD;
-                  
-                  ossimIpt center( ossim::round<int>((rect.ul().x - (bounds.width()/2))),
-                                   rounded.y);
-                  
-                  latLabel->setColor(theLeftGeographicLabelColor.getR(), theLeftGeographicLabelColor.getG(), theLeftGeographicLabelColor.getB());
-                  latLabel->setCenterPosition(center);
-                  latLabel->computeBoundingRect();
-                  latLabel->getBoundingRect(boundsD);
-                  bounds = boundsD;
-
-                  ossimDrect labelRect;
-                  latLabel->getBoundingRect(labelRect);
-                  
-                  if(rect.intersects(labelRect))
-                  {
-                     ossimIrect intersection = rect.clipToRect(labelRect);
-                     center.x -= ossim::round<int>(rect.ul().x - intersection.ur().x);
-                  }
-
-                  center.x -= 24; // this will need to be the tick height later;
-                  latLabel->setCenterPosition(center);
-                  latLabel->computeBoundingRect();
-
-
-                  
-                  addFixedAnnotation(latLabel);
-               }
-               
-               if(theLeftGeographicTickFlag)
-               {
-                  ossimAnnotationLineObject* lineLabel = new ossimAnnotationLineObject(ossimIpt(ossim::round<int>(rect.ul().x),
-                                                                                                rounded.y),
-                                                                                       ossimIpt(ossim::round<int>(rect.ul().x-23),
-                                                                                                rounded.y));
-                  lineLabel->setColor(theLeftGeographicLabelColor.getR(), theLeftGeographicLabelColor.getG(), theLeftGeographicLabelColor.getB());
-                  addFixedAnnotation(lineLabel);
-               }
-            }
-         }
-      }
-   }
-}
-
-void ossimMapCompositionSource::addGeographicRightGridLabels()
-{
-   if((!theRightGeographicLabelFlag)&&(!theRightGeographicTickFlag))
-   {
-      return;
-   }
-
-   const ossimMapProjection* mapProj = inputMapProjection();
-   if(mapProj)
-   { 
-      ossimGpt gpt[4];
-      ossimDrect rect = getViewingRect();
-
-      if(rect.hasNans()) return;
-      mapProj->lineSampleToWorld(rect.ul(), gpt[0]);
-      mapProj->lineSampleToWorld(rect.ur(), gpt[1]);
-      mapProj->lineSampleToWorld(rect.lr(), gpt[2]);
-      mapProj->lineSampleToWorld(rect.ll(), gpt[3]);
-      
-      ossimDrect grect(gpt[0],
-                       gpt[1],
-                       gpt[2],
-                       gpt[3],
-                       OSSIM_RIGHT_HANDED);
-
-      if(grect.hasNans()) return;
-      ossimDpt ulLatLon(((int)((grect.ul().x-theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
-                        ((int)((grect.ul().y+theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
-      
-      ossimDpt lrLatLon(((int)((grect.lr().x+theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
-                        ((int)((grect.lr().y-theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
-
-      while(ulLatLon.lat > 90)
-      {
-         ulLatLon.lat -= theGeographicSpacing.lat;
-      }
-      while(ulLatLon.lon < -180)
-      {
-         ulLatLon.lon += theGeographicSpacing.lon;
-      }
-      while(lrLatLon.lat < -90)
-      {
-         ulLatLon.lat += theGeographicSpacing.lat;
-      }
-      while(lrLatLon.lon > 180)
-      {
-         ulLatLon.lon -= theGeographicSpacing.lon;
-      }
-      
-      ossimDrect latLonSpacing(ulLatLon,
-                               lrLatLon,
-                               OSSIM_RIGHT_HANDED);
-      // do the left side labels
-      for(double lat = latLonSpacing.ul().y; lat >= latLonSpacing.lr().y; lat-=theGeographicSpacing.y)
-      {
-         ossimDpt lipt;
-         ossimDpt ript;
-         ossimGpt lgpt(lat,
-                       latLonSpacing.ul().x,
-                       0.0,
-                       gpt[0].datum());
-         ossimGpt rgpt(lat,
-                       latLonSpacing.ur().x,
-                       0.0,
-                       gpt[0].datum());
-         
-         
-         mapProj->worldToLineSample(lgpt, lipt);
-         mapProj->worldToLineSample(rgpt, ript);
-         
-         if(rect.clip(lipt, ript))
-         {
-            ossimIpt rounded(ript);
-            if( (rounded.y >= rect.ul().y)&&
-                (rounded.y <= rect.lr().y))
-            {
-               if(theRightGeographicLabelFlag)
-               {
-                  ossimDms dms(rgpt.latd());
-                  
-                  ossimString dmsString = dms.toString(theRightGeographicFormat.c_str());
-                  ossimAnnotationFontObject* latLabel = new ossimAnnotationFontObject(ossimIpt(0,0),
-                                                                                      dmsString);
-                  latLabel->setGeometryInformation(theGeographicRightLabelFontInfo);
-                  latLabel->setFont(theGeographicRightLabelFont.get());
-//                  latLabel->setFont(theGeographicRightLabelFont->dup());
-                  latLabel->computeBoundingRect();
-                  ossimDrect boundsD;
-                  latLabel->getBoundingRect(boundsD);
-                  ossimIrect bounds = boundsD;
-                  
-                  ossimIpt center( ossim::round<int>((rect.ur().x + (bounds.width()/2))),
-                                   rounded.y);
-               
-                  latLabel->setColor(theRightGeographicLabelColor.getR(), theRightGeographicLabelColor.getG(), theRightGeographicLabelColor.getB());
-                  latLabel->setCenterPosition(center);
-                  latLabel->computeBoundingRect();
-                  latLabel->getBoundingRect(boundsD);
-                  bounds = boundsD;
-
-                  ossimDrect labelRect;
-                  latLabel->getBoundingRect(labelRect);
-                  
-                  if(rect.intersects(labelRect))
-                  {
-                     ossimIrect intersection = rect.clipToRect(labelRect);
-                     center.x -= ossim::round<int>(rect.ur().x - intersection.ul().x);
-                  }
-
-                  center.x += 24; // this will need to be the tick height later;
-                  latLabel->setCenterPosition(center);
-                  latLabel->computeBoundingRect();
-                  
-
-                  addFixedAnnotation(latLabel);
-               }
-               
-               if(theRightGeographicTickFlag)
-               {
-                  ossimAnnotationLineObject* lineLabel = new ossimAnnotationLineObject(ossimIpt(ossim::round<int>(rect.lr().x),
-                                                                                                rounded.y),
-                                                                                       ossimIpt(ossim::round<int>(rect.lr().x+23),
-                                                                                                rounded.y));
-                  
-                  lineLabel->setColor(theRightGeographicLabelColor.getR(), theRightGeographicLabelColor.getG(), theRightGeographicLabelColor.getB());
-                  addFixedAnnotation(lineLabel);
-               }
-            }
-         }
-      }
-   }
-}
-
-void ossimMapCompositionSource::addGeographicGridLines()
-{
-   const ossimMapProjection* mapProj = inputMapProjection();
-   if(mapProj)
-   { 
-      ossimGpt gpt[4];
-      ossimDrect rect = getViewingRect();
-
-      if(rect.hasNans()) return;
-      mapProj->lineSampleToWorld(rect.ul(), gpt[0]);
-      mapProj->lineSampleToWorld(rect.ur(), gpt[1]);
-      mapProj->lineSampleToWorld(rect.lr(), gpt[2]);
-      mapProj->lineSampleToWorld(rect.ll(), gpt[3]);
-      
-      ossimDrect grect(gpt[0],
-                       gpt[1],
-                       gpt[2],
-                       gpt[3],
-                       OSSIM_RIGHT_HANDED);
-
-      if(grect.hasNans()) return;
-      ossimDpt ulLatLon(((int)((grect.ul().x-theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
-                        ((int)((grect.ul().y+theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
-      
-      ossimDpt lrLatLon(((int)((grect.lr().x+theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
-                        ((int)((grect.lr().y-theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
-
-      while(ulLatLon.lat > 90)
-      {
-         ulLatLon.lat -= theGeographicSpacing.lat;
-      }
-      while(ulLatLon.lon < -180)
-      {
-         ulLatLon.lon += theGeographicSpacing.lon;
-      }
-      while(lrLatLon.lat < -90)
-      {
-         ulLatLon.lat += theGeographicSpacing.lat;
-      }
-      while(lrLatLon.lon > 180)
-      {
-         ulLatLon.lon -= theGeographicSpacing.lon;
-      }
-      
-      ossimDrect latLonSpacing(ulLatLon,
-                               lrLatLon,
-                               OSSIM_RIGHT_HANDED);
-
-
-      for(double lon = latLonSpacing.ul().x; lon <= latLonSpacing.lr().x; lon+=theGeographicSpacing.x)
-      {
-         ossimDpt tipt; // top
-         ossimDpt bipt; // bottom
-         
-         ossimGpt tgpt(latLonSpacing.ul().y,
-                       lon,
-                       0.0,
-                       gpt[0].datum());
-
-         ossimGpt bgpt(latLonSpacing.lr().y,
-                       lon,
-                       0.0,
-                       gpt[0].datum());
-         
-         mapProj->worldToLineSample(tgpt, tipt);
-         mapProj->worldToLineSample(bgpt, bipt);
-
-         if(rect.clip(tipt, bipt))
-         {
-            ossimAnnotationLineObject* line = new ossimAnnotationLineObject(tipt, bipt);
-            line->setColor(theGeographicGridColor.getR(),
-                           theGeographicGridColor.getG(),
-                           theGeographicGridColor.getB());
-            addFixedAnnotation(line);
-         }
-      }
-      // do the left side labels
-      for(double lat = latLonSpacing.ul().y; lat >= latLonSpacing.lr().y; lat-=theGeographicSpacing.y)
-      {
-         ossimDpt lipt;
-         ossimDpt ript;
-         ossimGpt lgpt(lat,
-                       latLonSpacing.ul().x,
-                       0.0,
-                       gpt[0].datum());
-         ossimGpt rgpt(lat,
-                       latLonSpacing.ur().x,
-                       0.0,
-                       gpt[0].datum());
-
-         mapProj->worldToLineSample(lgpt, lipt);
-         mapProj->worldToLineSample(rgpt, ript);
-         
-         if(rect.clip(lipt, ript))
-         {
-            ossimAnnotationLineObject* line = new ossimAnnotationLineObject(lipt,
-                                                                            ript);
-         
-            line->setColor(theGeographicGridColor.getR(),
-                                theGeographicGridColor.getG(),
-                                theGeographicGridColor.getB());
-         
-            addFixedAnnotation(line);
-         }
-      }
-   }   
-}
-
-void ossimMapCompositionSource::addGeographicGridReseaux()
-{
-   const ossimMapProjection* mapProj = inputMapProjection();
-   if(mapProj)
-   { 
-      ossimGpt gptArray[4];
-      ossimDrect rect = getViewingRect();
-      
-      mapProj->lineSampleToWorld(rect.ul(), gptArray[0]);
-      mapProj->lineSampleToWorld(rect.ur(), gptArray[1]);
-      mapProj->lineSampleToWorld(rect.lr(), gptArray[2]);
-      mapProj->lineSampleToWorld(rect.ll(), gptArray[3]);
-      
-      ossimDrect grect(gptArray[0],
-                       gptArray[1],
-                       gptArray[2],
-                       gptArray[3],
-                       OSSIM_RIGHT_HANDED);
-
-      ossimDpt ulLatLon(((int)((grect.ul().x-theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
-                        ((int)((grect.ul().y+theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
-      
-      ossimDpt lrLatLon(((int)((grect.lr().x+theGeographicSpacing.x)/theGeographicSpacing.x))*theGeographicSpacing.x,
-                        ((int)((grect.lr().y-theGeographicSpacing.y)/theGeographicSpacing.y))*theGeographicSpacing.y);
-      
-      ossimDrect latLonSpacing(ulLatLon,
-                               lrLatLon,
-                               OSSIM_RIGHT_HANDED);
-
-      ossimDpt ipt; // top
-      for(double lat = latLonSpacing.ul().y; lat >= latLonSpacing.lr().y; lat-=theGeographicSpacing.y)
-      {
-         for(double lon = latLonSpacing.ul().x; lon <= latLonSpacing.lr().x; lon+=theGeographicSpacing.x)
-         {
-            
-            ossimGpt gpt(lat,
-                         lon,
-                         0.0,
-                         gptArray[0].datum());
-            
-            mapProj->worldToLineSample(gpt, ipt);
-
-            ossimIpt rounded(ipt);
-            if(rect.pointWithin(ossimDpt(rounded)))
-            {
-               ossimIpt horizontalStart(rounded.x-10, rounded.y);
-               ossimIpt horizontalEnd(rounded.x+10, rounded.y);
-
-               ossimIpt verticalStart(rounded.x, rounded.y-10);
-               ossimIpt verticalEnd(rounded.x, rounded.y+10);
-               
-               ossimAnnotationLineObject* line1 = new ossimAnnotationLineObject(horizontalStart, horizontalEnd);
-               ossimAnnotationLineObject* line2 = new ossimAnnotationLineObject(verticalStart,verticalEnd);
-
-               line1->setColor(theGeographicGridColor.getR(),
-                               theGeographicGridColor.getG(),
-                               theGeographicGridColor.getB());
-               line2->setColor(theGeographicGridColor.getR(),
-                               theGeographicGridColor.getG(),
-                               theGeographicGridColor.getB());
-               addFixedAnnotation(line1);
-               addFixedAnnotation(line2);
-            }  
-         }
-      }
-   }   
-}
-
-void ossimMapCompositionSource::addMeterGridLines()
-{
-   const ossimMapProjection* mapProj = inputMapProjection();
-   if(mapProj)
-   { 
-      ossimDpt dptArray[4];
-      ossimDrect rect = getViewingRect();
-      
-      mapProj->lineSampleToEastingNorthing(rect.ul(), dptArray[0]);
-      mapProj->lineSampleToEastingNorthing(rect.ur(), dptArray[1]);
-      mapProj->lineSampleToEastingNorthing(rect.lr(), dptArray[2]);
-      mapProj->lineSampleToEastingNorthing(rect.ll(), dptArray[3]);
-      
-      ossimDrect drect(dptArray[0], dptArray[1], dptArray[2], dptArray[3], OSSIM_RIGHT_HANDED);
-      
-      ossimDpt ulMeter(((int)((drect.ul().x-theMeterSpacing.x)/theMeterSpacing.x))*theMeterSpacing.x,
-                       ((int)((drect.ul().y+theMeterSpacing.y)/theMeterSpacing.y))*theMeterSpacing.y);
-      
-      ossimDpt lrMeter(((int)((drect.lr().x+theMeterSpacing.x)/theMeterSpacing.x))*theMeterSpacing.x,
-                        ((int)((drect.lr().y-theMeterSpacing.y)/theMeterSpacing.y))*theMeterSpacing.y);
-      
-      ossimDrect meterSpacing(ulMeter,
-                              lrMeter,
-                              OSSIM_RIGHT_HANDED);
-
-      for(double horizontal = meterSpacing.ul().x;
-          horizontal <= meterSpacing.lr().x;
-          horizontal+=theMeterSpacing.x)
-      {
-         ossimDpt tipt; // top
-         ossimDpt bipt; // bottom
-
-         ossimDpt tdpt(horizontal, meterSpacing.ul().y);
-
-         ossimDpt bdpt(horizontal, meterSpacing.lr().y);
-         
-         mapProj->eastingNorthingToLineSample(tdpt, tipt);
-         mapProj->eastingNorthingToLineSample(bdpt, bipt);
-         
-         if(rect.clip(tipt, bipt))
-         {
-            ossimAnnotationLineObject* line = new ossimAnnotationLineObject(tipt, bipt);
-            line->setColor(theMeterGridColor.getR(),
-                           theMeterGridColor.getG(),
-                           theMeterGridColor.getB());
-            addFixedAnnotation(line);
-         }
-      }
-      // do the left side labels
-      for(double vertical = meterSpacing.ul().y;
-          vertical >= meterSpacing.lr().y;
-          vertical-=theMeterSpacing.y)
-      {
-         ossimDpt lipt;
-         ossimDpt ript;
-         ossimDpt ldpt(meterSpacing.ul().x, vertical);
-         ossimDpt rdpt(meterSpacing.ur().x, vertical);
-
-         mapProj->eastingNorthingToLineSample(ldpt,  lipt);
-         mapProj->eastingNorthingToLineSample(rdpt,  ript);
-         
-         if(rect.clip(lipt, ript))
-         {
-            ossimAnnotationLineObject* line = new ossimAnnotationLineObject(lipt, ript);
-         
-            line->setColor(theMeterGridColor.getR(),
-                           theMeterGridColor.getG(),
-                           theMeterGridColor.getB());
-            
-            addFixedAnnotation(line);
-         }
-      }
-   }
-}
-
-void ossimMapCompositionSource::addMeterGridLabels()
-{
-   const ossimMapProjection* mapProj = inputMapProjection();
-   if(mapProj)
-   {
-      ossimDpt dptArray[4];
-      ossimDrect rect = getViewingRect();
-      
-      mapProj->lineSampleToEastingNorthing(rect.ul(), dptArray[0]);
-      mapProj->lineSampleToEastingNorthing(rect.ur(), dptArray[1]);
-      mapProj->lineSampleToEastingNorthing(rect.lr(), dptArray[2]);
-      mapProj->lineSampleToEastingNorthing(rect.ll(), dptArray[3]);
-      
-      ossimDrect drect(dptArray[0],
-                       dptArray[1],
-                       dptArray[2],
-                       dptArray[3],
-                       OSSIM_RIGHT_HANDED);
-      
-      ossimDpt ulMeter(((int)((drect.ul().x-theMeterSpacing.x)/theMeterSpacing.x))*theMeterSpacing.x,
-                       ((int)((drect.ul().y+theMeterSpacing.y)/theMeterSpacing.y))*theMeterSpacing.y);
-      
-      ossimDpt lrMeter(((int)((drect.lr().x+theMeterSpacing.x)/theMeterSpacing.x))*theMeterSpacing.x,
-                        ((int)((drect.lr().y-theMeterSpacing.y)/theMeterSpacing.y))*theMeterSpacing.y);
-      
-      ossimDrect meterSpacing(ulMeter,
-                              lrMeter,
-                              OSSIM_RIGHT_HANDED);
-      
-      ossimDrect labelRect;
-
-      // Since we support overlapping grid lables.  We will shift
-      // the meter label if there exists a gegraphic label.  To
-      // do this we need to compute an extra shift length based
-      // on the font type on each of the sides.  We could actually make this
-      // shift adjustable later????
-      //
-      long extraTopDelta     = 0;
-      long extraBottomDelta  = 0;
-      long extraLeftDelta    = 0;
-      long extraRightDelta   = 0;
-         
-      if(theTopGeographicLabelFlag&&theGeographicTopLabelFont.valid())
-      {  
-         ossimDms dms(180, false);
-         ossimString dmsString = dms.toString(theTopGeographicFormat.c_str());
-         
-         theGeographicTopLabelFont->setString(dmsString);
-         ossimIrect box;
-         
-         theGeographicTopLabelFont->getBoundingBox(box);
-         extraTopDelta = box.height();
-      }
-      if(theBottomGeographicLabelFlag&&theGeographicBottomLabelFont.valid())
-      {  
-         ossimDms dms(180, false);
-         ossimString dmsString = dms.toString(theBottomGeographicFormat.c_str());
-         theGeographicBottomLabelFont->setString(dmsString);
-         ossimIrect box;
-         
-         theGeographicBottomLabelFont->getBoundingBox(box);
-         extraBottomDelta = box.height();
-      }
-      if(theLeftGeographicLabelFlag&&theGeographicLeftLabelFont.valid())
-      {  
-         ossimDms dms(90.0, true);
-         ossimString dmsString = dms.toString(theLeftGeographicFormat.c_str());
-         theGeographicLeftLabelFont->setString(dmsString);
-         ossimIrect box;
-         
-         theGeographicLeftLabelFont->getBoundingBox(box);
-         extraLeftDelta = box.width();
-      }
-      if(theRightGeographicLabelFlag&&theGeographicRightLabelFont.valid())
-      {  
-         ossimDms dms(90.0, true);
-         ossimString dmsString = dms.toString(theRightGeographicFormat.c_str());
-         
-         theGeographicRightLabelFont->setString(dmsString);
-         ossimIrect box;
-         
-         theGeographicRightLabelFont->getBoundingBox(box);
-         extraRightDelta = box.width();
-      }
-
-      if(theTopMeterLabelFlag || theBottomMeterLabelFlag)
-      {
-         for(double horizontal = meterSpacing.ul().x;
-             horizontal <= meterSpacing.lr().x;
-             horizontal+=theMeterSpacing.x)
-         {
-            ossimDpt tipt; // top
-            ossimDpt bipt; // bottom
-            
-            ossimDpt tdpt(horizontal,
-                          meterSpacing.ul().y);
-            
-            ossimDpt bdpt(horizontal,
-                          meterSpacing.lr().y);
-            
-            mapProj->eastingNorthingToLineSample(tdpt, tipt);
-            mapProj->eastingNorthingToLineSample(bdpt, bipt);
-            
-            rect.clip(tipt, bipt);
-            
-            tipt = ossimIpt(tipt);
-            bipt = ossimIpt(bipt);
-            
-            if(theTopMeterLabelFlag&&rect.clip(tipt, bipt))
-            {
-               ossimAnnotationFontObject* topLabel = new ossimAnnotationFontObject(ossimIpt(0,0),
-                                                                                   ossimString::toString(horizontal).c_str());
-               
-               
-               topLabel->setFont(theMeterTopLabelFont.get());
-               
-               topLabel->setGeometryInformation(theMeterTopLabelFontInfo);
-               topLabel->computeBoundingRect();
-               ossimDrect boundsTop;
-               topLabel->getBoundingRect(boundsTop);
-               
-               ossimIpt centerTop(ossim::round<int>(tipt.x),
-                                  ossim::round<int>(rect.ul().y-(boundsTop.height()/2)));
-               
-               topLabel->setColor(theTopMeterLabelColor.getR(),
-                                  theTopMeterLabelColor.getG(),
-                                  theTopMeterLabelColor.getB());
-               
-               
-               topLabel->setCenterPosition(centerTop);
-               topLabel->computeBoundingRect();
-               
-               topLabel->getBoundingRect(labelRect);
-               
-               if(rect.intersects(labelRect))
-               {
-                  ossimIrect intersection = rect.clipToRect(labelRect);
-                  centerTop.y -= ossim::round<int>(rect.ul().y - intersection.lr().y);
-               }
-               
-               centerTop.y -= (24+extraTopDelta); // this will need to be the tick height later;
-               topLabel->setCenterPosition(centerTop);
-               topLabel->computeBoundingRect();
-               addFixedAnnotation(topLabel);
-
-               if(theTopMeterTickFlag)
-               {
-                  ossimAnnotationLineObject* lineLabel = new ossimAnnotationLineObject(ossimIpt(ossim::round<int>(tipt.x),
-                                                                                                ossim::round<int>(tipt.y-24)),
-                                                                                       ossimIpt(ossim::round<int>(tipt.x),
-                                                                                                ossim::round<int>(tipt.y)));
-                  
-                  lineLabel->setColor(theTopMeterLabelColor.getR(), theTopMeterLabelColor.getG(), theTopMeterLabelColor.getB());
-                  addFixedAnnotation(lineLabel);
-               }
-            }
-         // ------------------------- BOTTOM ----------------------------
-            
-            if(theBottomMeterLabelFlag&&rect.pointWithin(bipt))
-            {
-               ossimAnnotationFontObject* bottomLabel = new ossimAnnotationFontObject(ossimIpt(0,0),
-                                                                                      ossimString::toString(horizontal).c_str());
-               
-               
-               bottomLabel->setFont(theMeterBottomLabelFont.get());
-               
-               bottomLabel->setGeometryInformation(theMeterBottomLabelFontInfo);
-               bottomLabel->computeBoundingRect();
-               ossimDrect boundsBottom;
-               bottomLabel->getBoundingRect(boundsBottom);
-               
-               ossimIpt centerBottom(ossim::round<int>(bipt.x),
-                                     ossim::round<int>(rect.lr().y+(boundsBottom.height()/2)));
-               
-               bottomLabel->setColor(theBottomMeterLabelColor.getR(),
-                                     theBottomMeterLabelColor.getG(),
-                                     theBottomMeterLabelColor.getB());
-               
-               
-               bottomLabel->setCenterPosition(centerBottom);
-               bottomLabel->computeBoundingRect();
-               
-               bottomLabel->getBoundingRect(labelRect);
-               
-               if(rect.intersects(labelRect))
-               {
-                  ossimIrect intersection = rect.clipToRect(labelRect);
-                  centerBottom.y += ossim::round<int>(rect.lr().y - intersection.ul().y);
-               }
-               
-               centerBottom.y += (24+extraBottomDelta); // this will need to be the tick height later;
-               bottomLabel->setCenterPosition(centerBottom);
-               bottomLabel->computeBoundingRect();
-               addFixedAnnotation(bottomLabel);
-               if(theBottomMeterTickFlag)
-               {
-                  ossimAnnotationLineObject* lineLabel = new ossimAnnotationLineObject(ossimIpt(ossim::round<int>(bipt.x),
-                                                                                                ossim::round<int>(bipt.y+24)),
-                                                                                       ossimIpt(ossim::round<int>(bipt.x),
-                                                                                                ossim::round<int>(bipt.y)));
-                  
-                  lineLabel->setColor(theBottomMeterLabelColor.getR(), theBottomMeterLabelColor.getG(), theBottomMeterLabelColor.getB());
-                  addFixedAnnotation(lineLabel);
-               }
-            }            
-         }
-      }
-      if(theLeftMeterLabelFlag || theRightMeterLabelFlag)
-      {
-         for(double vertical = meterSpacing.ul().y;
-             vertical >= meterSpacing.lr().y;
-             vertical-=theMeterSpacing.y)
-         {
-            ossimDpt lipt;
-            ossimDpt ript;
-            ossimDpt ldpt(meterSpacing.ul().x,
-                          vertical);
-            ossimDpt rdpt(meterSpacing.ur().x,
-                          vertical);
-            
-            mapProj->eastingNorthingToLineSample(ldpt, lipt);
-            mapProj->eastingNorthingToLineSample(rdpt, ript);
-            
-            if(rect.clip(lipt, ript))
-            {
-               //------------------------------------------------ Left label ----------------------------------------------
-               ossimAnnotationFontObject* leftLabel = new ossimAnnotationFontObject(ossimIpt(0,0),
-                                                                                    ossimString::toString(vertical).c_str());
-               
-               
-               leftLabel->setFont(theMeterLeftLabelFont.get());
-               
-               leftLabel->setGeometryInformation(theMeterLeftLabelFontInfo);
-               leftLabel->computeBoundingRect();
-               ossimDrect boundsLeft;
-               leftLabel->getBoundingRect(boundsLeft);
-               
-               ossimIpt centerLeft(ossim::round<int>(rect.ul().x-(boundsLeft.width()/2)),
-                                   ossim::round<int>(lipt.y));
-                                  
-               
-               leftLabel->setColor(theLeftMeterLabelColor.getR(),
-                                   theLeftMeterLabelColor.getG(),
-                                   theLeftMeterLabelColor.getB());
-               
-               
-               leftLabel->setCenterPosition(centerLeft);
-               leftLabel->computeBoundingRect();
-               
-               leftLabel->getBoundingRect(labelRect);
-               
-               if(rect.intersects(labelRect))
-               {
-                  ossimIrect intersection = rect.clipToRect(labelRect);
-                  centerLeft.x -= ossim::round<int>(intersection.lr().x - rect.ul().x);
-               }
-               
-               centerLeft.x -= (24+extraLeftDelta); // this will need to be the tick height later;
-               leftLabel->setCenterPosition(centerLeft);
-               leftLabel->computeBoundingRect();
-               addFixedAnnotation(leftLabel);
-               if(theLeftMeterTickFlag)
-               {
-                  ossimAnnotationLineObject* lineLabel = new ossimAnnotationLineObject(ossimIpt(ossim::round<int>(lipt.x-24),
-                                                                                                ossim::round<int>(lipt.y)),
-                                                                                       ossimIpt(ossim::round<int>(lipt.x),
-                                                                                                ossim::round<int>(lipt.y)));
-                  
-                  lineLabel->setColor(theLeftMeterLabelColor.getR(), theLeftMeterLabelColor.getG(), theLeftMeterLabelColor.getB());
-                  addFixedAnnotation(lineLabel);
-               }
-
-               
-               //--------------------------------RIGHT-----------------------------------------------------------
-               ossimAnnotationFontObject* rightLabel = new ossimAnnotationFontObject(ossimIpt(0,0),
-                                                                                     ossimString::toString(vertical).c_str());
-               
-               
-               rightLabel->setFont(theMeterRightLabelFont.get());
-               
-               rightLabel->setGeometryInformation(theMeterRightLabelFontInfo);
-               rightLabel->computeBoundingRect();
-               ossimDrect boundsRight;
-               rightLabel->getBoundingRect(boundsRight);
-               
-               ossimIpt centerRight(ossim::round<int>(rect.ur().x+(boundsRight.width()/2)),
-                                    ossim::round<int>(ript.y));
-                                  
-               
-               rightLabel->setColor(theRightMeterLabelColor.getR(),
-                                    theRightMeterLabelColor.getG(),
-                                    theRightMeterLabelColor.getB());
-               
-               
-               rightLabel->setCenterPosition(centerRight);
-               rightLabel->computeBoundingRect();
-               
-               rightLabel->getBoundingRect(labelRect);
-               
-               if(rect.intersects(labelRect))
-               {
-                  ossimIrect intersection = rect.clipToRect(labelRect);
-                  centerRight.x += ossim::round<int>(intersection.ul().x - rect.ur().x);
-               }
-               
-               centerRight.x += (24+extraRightDelta); // this will need to be the tick height later;
-               rightLabel->setCenterPosition(centerRight);
-               rightLabel->computeBoundingRect();
-               addFixedAnnotation(rightLabel);
-               if(theRightMeterTickFlag)
-               {
-                  ossimAnnotationLineObject* lineLabel = new ossimAnnotationLineObject(ossimIpt(ossim::round<int>(ript.x+24),
-                                                                                                ossim::round<int>(ript.y)),
-                                                                                       ossimIpt(ossim::round<int>(ript.x),
-                                                                                                ossim::round<int>(ript.y)));
-                  
-                  lineLabel->setColor(theRightMeterLabelColor.getR(), theRightMeterLabelColor.getG(), theRightMeterLabelColor.getB());
-                  addFixedAnnotation(lineLabel);
-               }
-            }
-         }
-      }
-   }
-}
-
-
-void ossimMapCompositionSource::addMeterGridReseaux()
-{
-   const ossimMapProjection* mapProj = inputMapProjection();
-   if(mapProj)
-   { 
-      ossimDpt dpt[4];
-      ossimDrect rect = getViewingRect();
-      
-      mapProj->lineSampleToEastingNorthing(rect.ul(), dpt[0]);
-      mapProj->lineSampleToEastingNorthing(rect.ur(), dpt[1]);
-      mapProj->lineSampleToEastingNorthing(rect.lr(), dpt[2]);
-      mapProj->lineSampleToEastingNorthing(rect.ll(), dpt[3]);
-      
-      ossimDrect drect(dpt[0],
-                       dpt[1],
-                       dpt[2],
-                       dpt[3],
-                       OSSIM_RIGHT_HANDED);
-
-      ossimDpt ulMeter(((int)((drect.ul().x-theMeterSpacing.x)/theMeterSpacing.x))*theMeterSpacing.x,
-                       ((int)((drect.ul().y+theMeterSpacing.y)/theMeterSpacing.y))*theMeterSpacing.y);
-      
-      ossimDpt lrMeter(((int)((drect.lr().x+theMeterSpacing.x)/theMeterSpacing.x))*theMeterSpacing.x,
-                        ((int)((drect.lr().y-theMeterSpacing.y)/theMeterSpacing.y))*theMeterSpacing.y);
-
-      ossimDrect meterSpacing(ulMeter,
-                              lrMeter,
-                              OSSIM_RIGHT_HANDED);
-
-      ossimDpt ipt; // top
-
-      for(double vertical = meterSpacing.ul().y; vertical >= meterSpacing.lr().y; vertical-=theMeterSpacing.y)
-      {
-         for(double horizontal = meterSpacing.ul().x;  horizontal <= meterSpacing.lr().x; horizontal+=theMeterSpacing.x)
-         {            
-            ossimDpt dpt(horizontal,
-                         vertical);
-            
-            mapProj->eastingNorthingToLineSample(dpt, ipt);
-
-            ossimIpt rounded(ipt);
-            if(rect.pointWithin(ossimDpt(rounded)))
-            {
-               ossimIpt horizontalStart(rounded.x-10, rounded.y);
-               ossimIpt horizontalEnd(rounded.x+10, rounded.y);
-
-               ossimIpt verticalStart(rounded.x, rounded.y-10);
-               ossimIpt verticalEnd(rounded.x, rounded.y+10);
-               
-               ossimAnnotationLineObject* line1 = new ossimAnnotationLineObject(horizontalStart, horizontalEnd);
-               ossimAnnotationLineObject* line2 = new ossimAnnotationLineObject(verticalStart,verticalEnd);
-
-               line1->setColor(theMeterGridColor.getR(),
-                               theMeterGridColor.getG(),
-                               theMeterGridColor.getB());
-
-               line2->setColor(theMeterGridColor.getR(),
-                               theMeterGridColor.getG(),
-                               theMeterGridColor.getB());
-               addFixedAnnotation(line1);
-               addFixedAnnotation(line2);
-            }  
-         }
-      }
-   }   
-}
-
-void ossimMapCompositionSource::addTitle()
-{
-   ossimAnnotationFontObject* title = new ossimAnnotationFontObject(ossimIpt(0,0),
-                                                                    theTitleString);
-   title->setGeometryInformation(theTitleFontInfo);
-   title->setFont(theTitleFont.get());
-   title->setColor(theTitleColor.getR(),
-                   theTitleColor.getG(),
-                   theTitleColor.getB());
-   title->setCenterPosition(theTopBorder.midPoint());
-   title->computeBoundingRect();
-
-   addFixedAnnotation(title);
-}
-
-ossimIrect ossimMapCompositionSource::getViewingRect()const
-{
-   ossimIrect result;
-   result.makeNan();
-
-   if(theInputConnection)
-   {
-      result = theInputConnection->getBoundingRect();
-
-      if(!result.hasNans())
-      {
-         ossimIpt mid = result.midPoint();
-         ossim_int32 w = result.width();
-         ossim_int32 h = result.width();
-
-         if(theViewWidthHeight.x >-1)
-         {
-            w = theViewWidthHeight.x;
-         }
-         if(theViewWidthHeight.y >-1)
-         {
-            h = theViewWidthHeight.y;
-         }
-         ossimIpt ul(mid.x - w/2,
-                     mid.y - h/2);
-         
-         result = ossimIrect(ul.x,
-                             ul.y,
-                             ul.x + w-1,
-                             ul.y + h -1);
-      }
-   }
-
-   return result;
-}
-
-void ossimMapCompositionSource::drawAnnotations(
-   ossimRefPtr<ossimImageData> tile)
-{
-   if (!theImage)
-   {
-      return;
-   }
-      
-   theImage->setCurrentImageData(theTile);
-   
-   if(theImage->getImageData().valid())
-   {
-      ossimAnnotationSource::AnnotationObjectListType::iterator object = theFixedAnnotationList.begin();
-      while(object != theFixedAnnotationList.end())
-      {
-         if((*object).valid())
-         {
-            (*object)->draw(*theImage);
-         }
-         ++object;
-      }      
-   }
-   
-   ossimAnnotationSource::drawAnnotations(tile);
-}
-
-void ossimMapCompositionSource::deleteFixedAnnotations()
-{
-   theFixedAnnotationList.clear();
-}
-
-
-void ossimMapCompositionSource::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property.valid()) return;
-   
-   ossimRefPtr<ossimProperty>        tempProp     = 0;
-   ossimFontProperty*    fontProp     = 0;
-   ossimColorProperty*   colorProp    = 0;
-   ossimBooleanProperty* booleanProp  = 0;
-   
-   if(property->getName() == "Geographic label properties")
-   {
-      ossimContainerProperty* containerProp = PTR_CAST(ossimContainerProperty,
-                                                       property.get());
-      if(containerProp)
-      {
-         // first set the font format
-         //
-         tempProp = containerProp->getProperty("Top font");
-         fontProp = PTR_CAST(ossimFontProperty, tempProp.get());
-         if(fontProp)
-         {
-            setGeographicTopLabelFont(fontProp->getFontInformation());
-         }
-         tempProp = containerProp->getProperty("Bottom font");
-         fontProp = PTR_CAST(ossimFontProperty, tempProp.get());
-         if(fontProp)
-         {
-            setGeographicBottomLabelFont(fontProp->getFontInformation());
-         }
-         tempProp = containerProp->getProperty("Left font");
-         fontProp = PTR_CAST(ossimFontProperty, tempProp.get());
-         if(fontProp)
-         {
-            setGeographicLeftLabelFont(fontProp->getFontInformation());
-         }
-         tempProp = containerProp->getProperty("Right font");
-         fontProp = PTR_CAST(ossimFontProperty, tempProp.get());
-         if(fontProp)
-         {
-            setGeographicRightLabelFont(fontProp->getFontInformation());
-         }
-
-         // set color property
-         tempProp = containerProp->getProperty("Top color");
-         colorProp = PTR_CAST(ossimColorProperty, tempProp.get());
-         if(colorProp)
-         {
-            setTopGeographicLabelColor(colorProp->getColor());
-         }
-         tempProp = containerProp->getProperty("Bottom color");
-         colorProp = PTR_CAST(ossimColorProperty, tempProp.get());
-         if(colorProp)
-         {
-            setBottomGeographicLabelColor(colorProp->getColor());
-         }
-         tempProp = containerProp->getProperty("Left color");
-         colorProp = PTR_CAST(ossimColorProperty, tempProp.get());
-         if(colorProp)
-         {
-            setLeftGeographicLabelColor(colorProp->getColor());
-         }
-         tempProp = containerProp->getProperty("Right color");
-         colorProp = PTR_CAST(ossimColorProperty, tempProp.get());
-         if(colorProp)
-         {
-            setRightGeographicLabelColor(colorProp->getColor());
-         }
-
-         // set enable flags
-         tempProp = containerProp->getProperty("Top enabled");
-         booleanProp = PTR_CAST(ossimBooleanProperty,
-                                tempProp.get());
-         if(booleanProp)
-         {
-            setTopGeographicLabelFlag(booleanProp->getBoolean());
-         }
-
-         tempProp = containerProp->getProperty("Bottom enabled");
-         booleanProp = PTR_CAST(ossimBooleanProperty,
-                                tempProp.get());
-         if(booleanProp)
-         {
-            setBottomGeographicLabelFlag(booleanProp->getBoolean());
-         }
-
-         tempProp = containerProp->getProperty("Left enabled");
-         booleanProp = PTR_CAST(ossimBooleanProperty,
-                                tempProp.get());
-         if(booleanProp)
-         {
-            setLeftGeographicLabelFlag(booleanProp->getBoolean());
-         }
-
-         tempProp = containerProp->getProperty("Right enabled");
-         booleanProp = PTR_CAST(ossimBooleanProperty,
-                                tempProp.get());
-         if(booleanProp)
-         {
-            setRightGeographicLabelFlag(booleanProp->getBoolean());
-         }
-         
-         tempProp = containerProp->getProperty("Top tick enabled");
-         booleanProp = PTR_CAST(ossimBooleanProperty,
-                                tempProp.get());
-         if(booleanProp)
-         {
-            setTopGeographicTickMarkFlag(booleanProp->getBoolean());
-         }
-         tempProp = containerProp->getProperty("Bottom tick enabled");
-         booleanProp = PTR_CAST(ossimBooleanProperty,
-                                tempProp.get());
-         if(booleanProp)
-         {
-            setBottomGeographicTickMarkFlag(booleanProp->getBoolean());
-         }
-         tempProp = containerProp->getProperty("Left tick enabled");
-         booleanProp = PTR_CAST(ossimBooleanProperty,
-                                tempProp.get());
-         if(booleanProp)
-         {
-            setLeftGeographicTickMarkFlag(booleanProp->getBoolean());
-         }
-         tempProp = containerProp->getProperty("Right tick enabled");
-         booleanProp = PTR_CAST(ossimBooleanProperty,
-                                tempProp.get());
-         if(booleanProp)
-         {
-            setRightGeographicTickMarkFlag(booleanProp->getBoolean());
-         }
-      }
-   }
-   else if(property->getName() == "Geographic grid properties")
-   {
-      ossimContainerProperty* containerProp = PTR_CAST(ossimContainerProperty,
-                                                       property.get());
-      if(containerProp)
-      {
-         tempProp = containerProp->getProperty("Grid type");
-         if(tempProp.valid())
-         {
-            ossimString value = tempProp->valueToString();
-
-            if(value == "none")
-            {
-               setGeographicGridType(OSSIM_GRID_NONE);
-            }
-            else if(value == "line")
-            {
-               setGeographicGridType(OSSIM_GRID_LINE);
-            }
-            else if(value == "reseaux")
-            {
-               setGeographicGridType(OSSIM_GRID_RESEAUX);
-            }
-         }
-         tempProp = containerProp->getProperty("Horizontal spacing");
-         if(tempProp.valid())
-         {
-            setGeographicSpacingLon(tempProp->valueToString().toDouble());
-         }
-
-         tempProp = containerProp->getProperty("Vertical spacing");
-         if(tempProp.valid())
-         {
-            setGeographicSpacingLat(tempProp->valueToString().toDouble());
-         }
-
-         tempProp = containerProp->getProperty("Color");
-         colorProp = PTR_CAST(ossimColorProperty, tempProp.get());
-         if(tempProp.valid())
-         {
-            setGeographicGridColor(colorProp->getColor());
-         }
-      }
-   }
-   else if(property->getName() == "Meter label properties")
-   {
-      ossimContainerProperty* containerProp = PTR_CAST(ossimContainerProperty,
-                                                       property.get());
-      if(containerProp)
-      {
-         // first set the font format
-         //
-         tempProp = containerProp->getProperty("Top font");
-         fontProp = PTR_CAST(ossimFontProperty, tempProp.get());
-         if(fontProp)
-         {
-            setMeterTopLabelFont(fontProp->getFontInformation());
-         }
-         tempProp = containerProp->getProperty("Bottom font");
-         fontProp = PTR_CAST(ossimFontProperty, tempProp.get());
-         if(fontProp)
-         {
-            setMeterBottomLabelFont(fontProp->getFontInformation());
-         }
-         tempProp = containerProp->getProperty("Left font");
-         fontProp = PTR_CAST(ossimFontProperty, tempProp.get());
-         if(fontProp)
-         {
-            setMeterLeftLabelFont(fontProp->getFontInformation());
-         }
-         tempProp = containerProp->getProperty("Right font");
-         fontProp = PTR_CAST(ossimFontProperty, tempProp.get());
-         if(fontProp)
-         {
-            setMeterRightLabelFont(fontProp->getFontInformation());
-         }
-
-         // set color property
-         tempProp = containerProp->getProperty("Top color");
-         colorProp = PTR_CAST(ossimColorProperty, tempProp.get());
-         if(colorProp)
-         {
-            setTopMeterLabelColor(colorProp->getColor());
-         }
-         tempProp = containerProp->getProperty("Bottom color");
-         colorProp = PTR_CAST(ossimColorProperty, tempProp.get());
-         if(colorProp)
-         {
-            setBottomMeterLabelColor(colorProp->getColor());
-         }
-         tempProp = containerProp->getProperty("Left color");
-         colorProp = PTR_CAST(ossimColorProperty, tempProp.get());
-         if(colorProp)
-         {
-            setLeftMeterLabelColor(colorProp->getColor());
-         }
-         tempProp = containerProp->getProperty("Right color");
-         colorProp = PTR_CAST(ossimColorProperty, tempProp.get());
-         if(colorProp)
-         {
-            setRightMeterLabelColor(colorProp->getColor());
-         }
-
-         // set enable flags
-         tempProp = containerProp->getProperty("Top enabled");
-         booleanProp = PTR_CAST(ossimBooleanProperty,
-                                tempProp.get());
-         if(booleanProp)
-         {
-            setTopMeterLabelFlag(booleanProp->getBoolean());
-         }
-
-         tempProp = containerProp->getProperty("Bottom enabled");
-         booleanProp = PTR_CAST(ossimBooleanProperty,
-                                tempProp.get());
-         if(booleanProp)
-         {
-            setBottomMeterLabelFlag(booleanProp->getBoolean());
-         }
-
-         tempProp = containerProp->getProperty("Left enabled");
-         booleanProp = PTR_CAST(ossimBooleanProperty,
-                                tempProp.get());
-         if(booleanProp)
-         {
-            setLeftMeterLabelFlag(booleanProp->getBoolean());
-         }
-
-         tempProp = containerProp->getProperty("Right enabled");
-         booleanProp = PTR_CAST(ossimBooleanProperty,
-                                tempProp.get());
-         if(booleanProp)
-         {
-            setRightMeterLabelFlag(booleanProp->getBoolean());
-         }
-         
-         tempProp = containerProp->getProperty("Top tick enabled");
-         booleanProp = PTR_CAST(ossimBooleanProperty,
-                                tempProp.get());
-         if(booleanProp)
-         {
-            setTopMeterTickMarkFlag(booleanProp->getBoolean());
-         }
-         tempProp = containerProp->getProperty("Bottom tick enabled");
-         booleanProp = PTR_CAST(ossimBooleanProperty,
-                                tempProp.get());
-         if(booleanProp)
-         {
-            setBottomMeterTickMarkFlag(booleanProp->getBoolean());
-         }
-         tempProp = containerProp->getProperty("Left tick enabled");
-         booleanProp = PTR_CAST(ossimBooleanProperty,
-                                tempProp.get());
-         if(booleanProp)
-         {
-            setLeftMeterTickMarkFlag(booleanProp->getBoolean());
-         }
-         tempProp = containerProp->getProperty("Right tick enabled");
-         booleanProp = PTR_CAST(ossimBooleanProperty,
-                                tempProp.get());
-         if(booleanProp)
-         {
-            setRightMeterTickMarkFlag(booleanProp->getBoolean());
-         }
-      }
-   }
-   else if(property->getName() == "Meter grid properties")
-   {
-      ossimContainerProperty* containerProp = PTR_CAST(ossimContainerProperty,
-                                                       property.get());
-      if(containerProp)
-      {
-         tempProp = containerProp->getProperty("Grid type");
-         if(tempProp.valid())
-         {
-            ossimString value = tempProp->valueToString();
-
-            if(value == "none")
-            {
-               setMeterGridType(OSSIM_GRID_NONE);
-            }
-            else if(value == "line")
-            {
-               setMeterGridType(OSSIM_GRID_LINE);
-            }
-            else if(value == "reseaux")
-            {
-               setMeterGridType(OSSIM_GRID_RESEAUX);
-            }
-         }
-         tempProp = containerProp->getProperty("Horizontal spacing");
-         if(tempProp.valid())
-         {
-            setMeterSpacingX(tempProp->valueToString().toDouble());
-         }
-
-         tempProp = containerProp->getProperty("Vertical spacing");
-         if(tempProp.valid())
-         {
-            setMeterSpacingY(tempProp->valueToString().toDouble());
-         }
-
-         tempProp = containerProp->getProperty("Color");
-         colorProp = PTR_CAST(ossimColorProperty, tempProp.get());
-         if(tempProp.valid())
-         {
-            setMeterGridColor(colorProp->getColor());
-         }
-      }
-   }
-   else if(property->getName() == "Title properties")
-   {
-      ossimContainerProperty* container = PTR_CAST(ossimContainerProperty,
-                                                   property.get());
-      if(container)
-      {
-         ossimProperty* titleProp = container->getProperty("Title").get();
-         if(titleProp)
-         {
-            setTitle(titleProp->valueToString());
-         }
-         ossimFontProperty* fontProp = PTR_CAST(ossimFontProperty,
-                                                container->getProperty("Font").get());
-         ossimColorProperty* colorProp = PTR_CAST(ossimColorProperty,
-                                                  container->getProperty("Color").get());
-
-         if(fontProp)
-         {
-            setTitleFont(fontProp->getFontInformation());
-         }
-         if(colorProp)
-         {
-            setTitleColor(colorProp->getColor());
-         }
-      }
-   }
-   else if(property->getName() == "Viewport properties")
-   {
-      ossimContainerProperty* container = PTR_CAST(ossimContainerProperty,
-                                                   property.get());
-      if(container)
-      {
-         int w = -1;
-         int h = -1;
-         tempProp = container->getProperty("Width");
-         if(tempProp.valid())
-         {
-            w = tempProp->valueToString().toInt32();
-         }
-         tempProp = container->getProperty("Height");
-         if(tempProp.valid())
-         {
-            h = tempProp->valueToString().toInt32();
-         }
-         setViewWidthHeight(ossimIpt(w, h));
-      }
-   }
-   else if(property->getName() == "Border color")
-   {
-      colorProp = PTR_CAST(ossimColorProperty,
-                           property.get());
-      if(colorProp)
-      {
-         setBorderColor(colorProp->getColor());
-      }
-   }
-   else if(property->getName() == "Border size")
-   {
-      ossimContainerProperty* container = PTR_CAST(ossimContainerProperty,
-                                                   property.get());
-      if(container)
-      {
-         tempProp = container->getProperty("Top");
-         if(tempProp.valid())
-         {
-            setTopBorderLength(tempProp->valueToString().toInt32());
-            
-         }
-         tempProp = container->getProperty("Bottom");
-         if(tempProp.valid())
-         {
-            setBottomBorderLength(tempProp->valueToString().toInt32());
-            
-         }
-         tempProp = container->getProperty("Left");
-         if(tempProp.valid())
-         {
-            setLeftBorderLength(tempProp->valueToString().toInt32());
-            
-         }
-         tempProp = container->getProperty("Right");
-         if(tempProp.valid())
-         {
-            setRightBorderLength(tempProp->valueToString().toInt32());
-         }
-      }
-   }
-   else
-   {
-      ossimAnnotationSource::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimMapCompositionSource::getProperty(const ossimString& name)const
-{
-   if(name == "Viewport properties")
-   {
-      ossimContainerProperty* container = new ossimContainerProperty(name);
-
-      container->addChild(new ossimNumericProperty("Width",
-                                                   ossimString::toString(theViewWidthHeight.x),
-                                                   -1,1.0/DBL_EPSILON));
-      container->addChild(new ossimNumericProperty("Height",
-                                                   ossimString::toString(theViewWidthHeight.y),
-                                                   -1,1.0/DBL_EPSILON));
-      container->setCacheRefreshBit();
-      return container;
-   }
-   else if(name == "Geographic label properties")
-   {
-
-      ossimContainerProperty* container = new ossimContainerProperty(name);
-      
-      container->addChild(new ossimFontProperty("Top font",
-                                                theGeographicTopLabelFontInfo));
-      container->addChild(new ossimColorProperty("Top color",
-                                                 theTopGeographicLabelColor));
-      container->addChild(new ossimBooleanProperty("Top enabled",
-                                                   theTopGeographicLabelFlag));
-      container->addChild(new ossimBooleanProperty("Top tick enabled",
-                                                   theTopGeographicTickFlag));
-      
-      container->addChild(new ossimFontProperty("Bottom font",
-                                                theGeographicBottomLabelFontInfo));
-      container->addChild(new ossimColorProperty("Bottom color",
-                                                 theBottomGeographicLabelColor));
-      container->addChild(new ossimBooleanProperty("Bottom enabled",
-                                                   theBottomGeographicLabelFlag));
-      container->addChild(new ossimBooleanProperty("Bottom tick enabled",
-                                                   theBottomGeographicTickFlag));
-      
-      container->addChild(new ossimFontProperty("Left font",
-                                                theGeographicLeftLabelFontInfo));
-      container->addChild(new ossimColorProperty("Left color",
-                                                 theLeftGeographicLabelColor));
-      container->addChild(new ossimBooleanProperty("Left enabled",
-                                                   theLeftGeographicLabelFlag));
-      container->addChild(new ossimBooleanProperty("Left tick enabled",
-                                                   theLeftGeographicTickFlag));
-      
-      container->addChild(new ossimFontProperty("Right font",
-                                                theGeographicRightLabelFontInfo));
-      container->addChild(new ossimColorProperty("Right color",
-                                                 theRightGeographicLabelColor));
-      container->addChild(new ossimBooleanProperty("Right enabled",
-                                                   theRightGeographicLabelFlag));
-      container->addChild(new ossimBooleanProperty("Right tick enabled",
-                                                   theRightGeographicTickFlag));
-      container->setCacheRefreshBit();
-      return container;
-   }
-   else if(name == "Geographic grid properties")
-   {
-      ossimContainerProperty* container = new ossimContainerProperty(name);
-      std::vector<ossimString> gridTypeConstraints;
-      ossimString value = GRID_TYPE_ENUM_NAMES[(int)theGeographicGridType];
-
-      gridTypeConstraints.push_back("none");
-      gridTypeConstraints.push_back("line");
-      gridTypeConstraints.push_back("reseaux");
-      
-      container->addChild(new ossimStringProperty("Grid type",
-                                                  value,
-                                                  false,
-                                                  gridTypeConstraints));
-      container->addChild(new ossimColorProperty("Color",
-                                                 theGeographicGridColor));
-
-      container->addChild(new ossimNumericProperty("Horizontal spacing",
-                                                   ossimString::toString(theGeographicSpacing.x),
-                                                   0.0, 180.0));
-
-      container->addChild(new ossimNumericProperty("Vertical spacing",
-                                                   ossimString::toString(theGeographicSpacing.y),
-                                                   0.0, 180.0));
-                                                   
-      container->setCacheRefreshBit();
-      return container;
-   }
-   else if(name == "Meter label properties")
-   {
-      ossimContainerProperty* container = new ossimContainerProperty(name);
-      
-      container->addChild(new ossimFontProperty("Top font",
-                                                theMeterTopLabelFontInfo));
-      container->addChild(new ossimColorProperty("Top color",
-                                                 theTopMeterLabelColor));
-      container->addChild(new ossimBooleanProperty("Top enabled",
-                                                   theTopMeterLabelFlag));
-      container->addChild(new ossimBooleanProperty("Top tick enabled",
-                                                   theTopMeterTickFlag));
-      
-      container->addChild(new ossimFontProperty("Bottom font",
-                                                theMeterBottomLabelFontInfo));
-      container->addChild(new ossimColorProperty("Bottom color",
-                                                 theBottomMeterLabelColor));
-      container->addChild(new ossimBooleanProperty("Bottom enabled",
-                                                   theBottomMeterLabelFlag));
-      container->addChild(new ossimBooleanProperty("Bottom tick enabled",
-                                                   theBottomMeterTickFlag));
-      
-      container->addChild(new ossimFontProperty("Left font",
-                                                theMeterLeftLabelFontInfo));
-      container->addChild(new ossimColorProperty("Left color",
-                                                 theLeftMeterLabelColor));
-      container->addChild(new ossimBooleanProperty("Left enabled",
-                                                   theLeftMeterLabelFlag));
-      container->addChild(new ossimBooleanProperty("Left tick enabled",
-                                                   theLeftMeterTickFlag));
-      
-      container->addChild(new ossimFontProperty("Right font",
-                                                theMeterRightLabelFontInfo));
-      container->addChild(new ossimColorProperty("Right color",
-                                                 theRightMeterLabelColor));
-      container->addChild(new ossimBooleanProperty("Right enabled",
-                                                   theRightMeterLabelFlag));
-      container->addChild(new ossimBooleanProperty("Right tick enabled",
-                                                   theRightMeterTickFlag));
-      
-      container->setCacheRefreshBit();
-      return container;
-   }
-   else if(name == "Meter grid properties")
-   {
-      ossimContainerProperty* container = new ossimContainerProperty(name);
-      std::vector<ossimString> gridTypeConstraints;
-      ossimString value = GRID_TYPE_ENUM_NAMES[(int)theMeterGridType];
-
-      gridTypeConstraints.push_back("none");
-      gridTypeConstraints.push_back("line");
-      gridTypeConstraints.push_back("reseaux");
-      
-      container->addChild(new ossimStringProperty("Grid type",
-                                                  value,
-                                                  false,
-                                                  gridTypeConstraints));
-      container->addChild(new ossimColorProperty("Color",
-                                                 theMeterGridColor));
-      
-      container->addChild(new ossimNumericProperty("Horizontal spacing",
-                                                   ossimString::toString(theMeterSpacing.x),
-                                                   0.0, 1.0/DBL_EPSILON));
-
-      container->addChild(new ossimNumericProperty("Vertical spacing",
-                                                   ossimString::toString(theMeterSpacing.y),
-                                                   0.0, 1.0/DBL_EPSILON));
-      container->setCacheRefreshBit();
-      return container;
-   }
-   else if(name == "Title properties")
-   {
-      ossimContainerProperty* container = new ossimContainerProperty(name);
-      container->addChild(new ossimTextProperty("Title",
-                                                theTitleString));
-      container->addChild(new ossimFontProperty("Font",
-                                                theTitleFontInfo));
-      container->addChild(new ossimColorProperty("Color",
-                                                 theTitleColor));
-      
-      container->setCacheRefreshBit();
-      return container;
-   }
-   else if(name == "Border size")
-   {
-      ossimContainerProperty* container = new ossimContainerProperty(name);
-      
-      container->addChild(new ossimNumericProperty("Top",
-                                                   ossimString::toString(theTopBorderLength),
-                                                   0,10000));
-      container->addChild(new ossimNumericProperty("Bottom",
-                                                   ossimString::toString(theBottomBorderLength),
-                                                   0,10000));
-      container->addChild(new ossimNumericProperty("Left",
-                                                   ossimString::toString(theLeftBorderLength),
-                                                   0,10000));
-      container->addChild(new ossimNumericProperty("Right",
-                                                   ossimString::toString(theRightBorderLength),
-                                                   0,10000));
-      container->setCacheRefreshBit();
-      return container;
-   }
-   else if(name == "Border color")
-   {
-      ossimColorProperty* colorProp = new ossimColorProperty(name,
-                                                             theBorderColor);
-      colorProp->setCacheRefreshBit();
-      
-      return colorProp;
-   }
-   else if(name == "Viewport properties")
-   {
-      
-   }
-   return ossimAnnotationSource::getProperty(name);
-}
-
-void ossimMapCompositionSource::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimAnnotationSource::getPropertyNames(propertyNames);
-
-   
-   propertyNames.push_back("Title properties");
-   propertyNames.push_back("Border size");
-   propertyNames.push_back("Border color");
-   propertyNames.push_back("Viewport properties");
-   propertyNames.push_back("Geographic label properties");
-   propertyNames.push_back("Geographic grid properties");
-   propertyNames.push_back("Meter label properties");
-   propertyNames.push_back("Meter grid properties");
-}
-
-bool ossimMapCompositionSource::saveState(ossimKeywordlist& kwl,
-                                          const char* prefix)const
-{
-   kwl.add(prefix,
-           VIEW_WIDTH_KW,
-           theViewWidthHeight.x,
-           true);
-   
-   kwl.add(prefix,
-           VIEW_HEIGHT_KW,
-           theViewWidthHeight.x,
-           true);
-   
-   kwl.add(prefix,
-           METER_GRID_SPACING_X_KW,
-           theMeterSpacing.x,
-           true);
-
-   kwl.add(prefix,
-           METER_GRID_SPACING_Y_KW,
-           theMeterSpacing.y,
-           true);
-   
-   kwl.add(prefix,
-           GEO_GRID_SPACING_LON_KW,
-           theGeographicSpacing.lon,
-           true);
-
-   kwl.add(prefix,
-           GEO_GRID_SPACING_LAT_KW,
-           theGeographicSpacing.lat,
-           true);
-
-   ossimString meterGridType = "line";
-   if(theMeterGridType == OSSIM_GRID_NONE)
-   {
-      meterGridType = "none";
-   }
-   else if(theMeterGridType == OSSIM_GRID_RESEAUX)
-   {
-      meterGridType = "reseaux";
-   }
-   
-   kwl.add(prefix,
-           METER_GRID_TYPE_KW,
-           meterGridType.c_str(),
-           true);
-
-   ossimString geoGridType = "line";
-   if(theGeographicGridType == OSSIM_GRID_NONE)
-   {
-      geoGridType = "none";
-   }
-   else if(theGeographicGridType == OSSIM_GRID_RESEAUX)
-   {
-      geoGridType = "reseaux";
-   }
-
-   kwl.add(prefix,
-           GEO_GRID_TYPE_KW,
-           geoGridType.c_str(),
-           true);
-
-   kwl.add(prefix,
-           TOP_BORDER_LENGTH_KW,
-           theTopBorderLength,
-           true);
-   
-   kwl.add(prefix,
-           BOTTOM_BORDER_LENGTH_KW,
-           theBottomBorderLength,
-           true);
-
-   kwl.add(prefix,
-           LEFT_BORDER_LENGTH_KW,
-           theLeftBorderLength,
-           true);
-
-   kwl.add(prefix,
-           RIGHT_BORDER_LENGTH_KW,
-           theRightBorderLength,
-           true);
-
-   kwl.add(prefix,
-           BORDER_COLOR_KW,
-           (ossimString::toString(theBorderColor.getR()) +" "+
-            ossimString::toString(theBorderColor.getG()) +" "+
-            ossimString::toString(theBorderColor.getB())).c_str(),
-           true);
-
-   kwl.add(prefix,
-           GEO_GRID_COLOR_KW,
-           (ossimString::toString(theGeographicGridColor.getR()) +" "+
-            ossimString::toString(theGeographicGridColor.getG()) +" "+
-            ossimString::toString(theGeographicGridColor.getB())).c_str(),
-           true);
-
-   kwl.add(prefix,
-           METER_GRID_COLOR_KW,
-           (ossimString::toString(theMeterGridColor.getR()) +" "+
-            ossimString::toString(theMeterGridColor.getG()) +" "+
-            ossimString::toString(theMeterGridColor.getB())).c_str(),
-           true);
-
-   kwl.add(prefix,
-           TITLE_STRING_KW,
-           theTitleString.c_str(),
-           true);
-   
-   kwl.add(prefix,
-           TITLE_COLOR_KW,
-           (ossimString::toString(theTitleColor.getR()) +" "+
-            ossimString::toString(theTitleColor.getG()) +" "+
-            ossimString::toString(theTitleColor.getB())).c_str(),
-           true);
-
-   kwl.add(prefix,
-           TOP_GEO_LABEL_COLOR_KW,
-           (ossimString::toString(theTopGeographicLabelColor.getR()) +" "+
-            ossimString::toString(theTopGeographicLabelColor.getG()) +" "+
-            ossimString::toString(theTopGeographicLabelColor.getB())).c_str(),
-           true);
-
-   kwl.add(prefix,
-           BOTTOM_GEO_LABEL_COLOR_KW,
-           (ossimString::toString(theBottomGeographicLabelColor.getR()) +" "+
-            ossimString::toString(theBottomGeographicLabelColor.getG()) +" "+
-            ossimString::toString(theBottomGeographicLabelColor.getB())).c_str(),
-           true);
-   kwl.add(prefix,
-           LEFT_GEO_LABEL_COLOR_KW,
-           (ossimString::toString(theLeftGeographicLabelColor.getR()) +" "+
-            ossimString::toString(theLeftGeographicLabelColor.getG()) +" "+
-            ossimString::toString(theLeftGeographicLabelColor.getB())).c_str(),
-           true);
-   kwl.add(prefix,
-           RIGHT_GEO_LABEL_COLOR_KW,
-           (ossimString::toString(theRightGeographicLabelColor.getR()) +" "+
-            ossimString::toString(theRightGeographicLabelColor.getG()) +" "+
-            ossimString::toString(theRightGeographicLabelColor.getB())).c_str(),
-           true);
-
-   kwl.add(prefix,
-           TOP_GEO_LABEL_FORMAT_KW,
-           theTopGeographicFormat,
-           true);
-
-   kwl.add(prefix,
-           BOTTOM_GEO_LABEL_FORMAT_KW,
-           theBottomGeographicFormat,
-           true);
-   kwl.add(prefix,
-           LEFT_GEO_LABEL_FORMAT_KW,
-           theLeftGeographicFormat,
-           true);
-   kwl.add(prefix,
-           RIGHT_GEO_LABEL_FORMAT_KW,
-           theRightGeographicFormat,
-           true);
-
-   kwl.add(prefix,
-           TOP_GEO_LABEL_FLAG_KW,
-           (int)theTopGeographicLabelFlag,
-           true);
-
-   kwl.add(prefix,
-           BOTTOM_GEO_LABEL_FLAG_KW,
-           (int)theBottomGeographicLabelFlag,
-           true);
-
-   kwl.add(prefix,
-           LEFT_GEO_LABEL_FLAG_KW,
-           (int)theLeftGeographicLabelFlag,
-           true);
-
-   kwl.add(prefix,
-           RIGHT_GEO_LABEL_FLAG_KW,
-           (int)theRightGeographicLabelFlag,
-           true);
-
-   kwl.add(prefix,
-           TOP_METER_LABEL_COLOR_KW,
-           (ossimString::toString(theTopMeterLabelColor.getR()) +" "+
-            ossimString::toString(theTopMeterLabelColor.getG()) +" "+
-            ossimString::toString(theTopMeterLabelColor.getB())).c_str(),
-           true);
-
-   kwl.add(prefix,
-           BOTTOM_METER_LABEL_COLOR_KW,
-           (ossimString::toString(theBottomMeterLabelColor.getR()) +" "+
-            ossimString::toString(theBottomMeterLabelColor.getG()) +" "+
-            ossimString::toString(theBottomMeterLabelColor.getB())).c_str(),
-           true);
-   kwl.add(prefix,
-           LEFT_METER_LABEL_COLOR_KW,
-           (ossimString::toString(theLeftMeterLabelColor.getR()) +" "+
-            ossimString::toString(theLeftMeterLabelColor.getG()) +" "+
-            ossimString::toString(theLeftMeterLabelColor.getB())).c_str(),
-           true);
-   kwl.add(prefix,
-           RIGHT_METER_LABEL_COLOR_KW,
-           (ossimString::toString(theRightMeterLabelColor.getR()) +" "+
-            ossimString::toString(theRightMeterLabelColor.getG()) +" "+
-            ossimString::toString(theRightMeterLabelColor.getB())).c_str(),
-           true);
-
-
-   kwl.add(prefix,
-           TOP_METER_LABEL_FLAG_KW,
-           (int)theTopMeterLabelFlag,
-           true);
-
-   kwl.add(prefix,
-           BOTTOM_METER_LABEL_FLAG_KW,
-           (int)theBottomMeterLabelFlag,
-           true);
-
-   kwl.add(prefix,
-           LEFT_METER_LABEL_FLAG_KW,
-           (int)theLeftMeterLabelFlag,
-           true);
-
-   kwl.add(prefix,
-           RIGHT_METER_LABEL_FLAG_KW,
-           (int)theRightMeterLabelFlag,
-           true);
-   
-   theGeographicTopLabelFontInfo.saveState(kwl, (ossimString(prefix) + ossimString(TOP_GEO_LABEL_FONT_KW) + ".").c_str());
-   theGeographicBottomLabelFontInfo.saveState(kwl, (ossimString(prefix) + ossimString(BOTTOM_GEO_LABEL_FONT_KW) + ".").c_str());
-   theGeographicLeftLabelFontInfo.saveState(kwl, (ossimString(prefix) + ossimString(LEFT_GEO_LABEL_FONT_KW) + ".").c_str());
-   theGeographicRightLabelFontInfo.saveState(kwl, (ossimString(prefix) + ossimString(RIGHT_GEO_LABEL_FONT_KW) + ".").c_str());
-
-   theMeterTopLabelFontInfo.saveState(kwl, (ossimString(prefix) + ossimString(TOP_METER_LABEL_FONT_KW) + ".").c_str());
-   theMeterBottomLabelFontInfo.saveState(kwl, (ossimString(prefix) + ossimString(BOTTOM_METER_LABEL_FONT_KW) + ".").c_str());
-   theMeterLeftLabelFontInfo.saveState(kwl, (ossimString(prefix) + ossimString(LEFT_METER_LABEL_FONT_KW) + ".").c_str());
-   theMeterRightLabelFontInfo.saveState(kwl, (ossimString(prefix) + ossimString(RIGHT_METER_LABEL_FONT_KW) + ".").c_str());
-   
-   theTitleFontInfo.saveState(kwl, (ossimString(prefix) + ossimString(TITLE_FONT_KW) + ".").c_str());
-   
-           
-   return ossimImageSource::saveState(kwl, prefix);
-   
-}
-
-bool ossimMapCompositionSource::loadState(const ossimKeywordlist& kwl,
-                                          const char* prefix)
-{
-   const char* viewWidth            = kwl.find(prefix, VIEW_WIDTH_KW);
-   const char* viewHeight           = kwl.find(prefix, VIEW_HEIGHT_KW);
-   const char* meterGridSpacingX    = kwl.find(prefix, METER_GRID_SPACING_X_KW);
-   const char* meterGridSpacingY    = kwl.find(prefix, METER_GRID_SPACING_Y_KW);
-   const char* geoGridSpacingLon    = kwl.find(prefix, GEO_GRID_SPACING_LON_KW);
-   const char* geoGridSpacingLat    = kwl.find(prefix, GEO_GRID_SPACING_LAT_KW);
-   const char* meterGridType        = kwl.find(prefix, METER_GRID_TYPE_KW);
-   const char* geoGridType          = kwl.find(prefix, GEO_GRID_TYPE_KW);
-   const char* topBorderLength      = kwl.find(prefix, TOP_BORDER_LENGTH_KW);
-   const char* bottomBorderLength   = kwl.find(prefix, BOTTOM_BORDER_LENGTH_KW);
-   const char* leftBorderLength     = kwl.find(prefix, LEFT_BORDER_LENGTH_KW);
-   const char* rightBorderLength    = kwl.find(prefix, RIGHT_BORDER_LENGTH_KW);
-   
-   const char* borderColor          = kwl.find(prefix, BORDER_COLOR_KW);
-   const char* geoGridColor         = kwl.find(prefix, GEO_GRID_COLOR_KW);
-   const char* meterGridColor       = kwl.find(prefix, METER_GRID_COLOR_KW);
-   const char* titleString          = kwl.find(prefix, TITLE_STRING_KW);
-   const char* titleColor           = kwl.find(prefix, TITLE_COLOR_KW);
-
-   const char* topGeoLabelColor     = kwl.find(prefix, TOP_GEO_LABEL_COLOR_KW);
-   const char* bottomGeoLabelColor  = kwl.find(prefix, BOTTOM_GEO_LABEL_COLOR_KW);
-   const char* leftGeoLabelColor    = kwl.find(prefix, LEFT_GEO_LABEL_COLOR_KW);
-   const char* rightGeoLabelColor   = kwl.find(prefix, RIGHT_GEO_LABEL_COLOR_KW);
-
-   const char* topMeterLabelColor     = kwl.find(prefix, TOP_METER_LABEL_COLOR_KW);
-   const char* bottomMeterLabelColor  = kwl.find(prefix, BOTTOM_METER_LABEL_COLOR_KW);
-   const char* leftMeterLabelColor    = kwl.find(prefix, LEFT_METER_LABEL_COLOR_KW);
-   const char* rightMeterLabelColor   = kwl.find(prefix, RIGHT_METER_LABEL_COLOR_KW);
-   
-   const char* topGeoLabelFormat    = kwl.find(prefix, TOP_GEO_LABEL_FORMAT_KW);
-   const char* bottomGeoLabelFormat = kwl.find(prefix, BOTTOM_GEO_LABEL_FORMAT_KW);
-   const char* leftGeoLabelFormat   = kwl.find(prefix, LEFT_GEO_LABEL_FORMAT_KW);
-   const char* rightGeoLabelFormat  = kwl.find(prefix, RIGHT_GEO_LABEL_FORMAT_KW);
-
-   const char* topGeoLabelFlag      = kwl.find(prefix, TOP_GEO_LABEL_FLAG_KW);
-   const char* bottomGeoLabelFlag   = kwl.find(prefix, BOTTOM_GEO_LABEL_FLAG_KW);
-   const char* leftGeoLabelFlag     = kwl.find(prefix, LEFT_GEO_LABEL_FLAG_KW);
-   const char* rightGeoLabelFlag    = kwl.find(prefix, RIGHT_GEO_LABEL_FLAG_KW);
-
-   const char* topMeterLabelFlag    = kwl.find(prefix, TOP_METER_LABEL_FLAG_KW);
-   const char* bottomMeterLabelFlag = kwl.find(prefix, BOTTOM_METER_LABEL_FLAG_KW);
-   const char* leftMeterLabelFlag   = kwl.find(prefix, LEFT_METER_LABEL_FLAG_KW);
-   const char* rightMeterLabelFlag  = kwl.find(prefix, RIGHT_METER_LABEL_FLAG_KW);
-
-   deleteFixedAnnotations();
-   theViewWidthHeight.makeNan();
-   
-   if(viewWidth)
-   {
-      theViewWidthHeight.x = ossimString(viewWidth).toLong();
-   }
-   if(viewHeight)
-   {
-      theViewWidthHeight.y = ossimString(viewHeight).toLong();
-   }
-   
-   if(meterGridSpacingX)
-   {
-      theMeterSpacing.x = ossimString(meterGridSpacingX).toDouble();
-   }
-
-   if(meterGridSpacingY)
-   {
-      theMeterSpacing.y = ossimString(meterGridSpacingY).toDouble();
-   }
-   if(geoGridSpacingLon)
-   {
-      theGeographicSpacing.lon = ossimString(geoGridSpacingLon).toDouble();
-   }
-   if(geoGridSpacingLat)
-   {
-      theGeographicSpacing.lat = ossimString(geoGridSpacingLat).toDouble();
-   }
-   if(meterGridType)
-   {
-      ossimString type = ossimString(meterGridType).trim().downcase();
-      if(type == "reseaux")
-      {
-         theMeterGridType = OSSIM_GRID_RESEAUX;
-      }
-      else if(type == "line")
-      {
-         theMeterGridType = OSSIM_GRID_LINE;
-      }
-      else
-      {
-         theMeterGridType = OSSIM_GRID_NONE;
-      }
-   }
-
-   if(geoGridType)
-   {
-      ossimString type = ossimString(geoGridType).trim().downcase();
-      if(type == "reseaux")
-      {
-         theGeographicGridType = OSSIM_GRID_RESEAUX;
-      }
-      else if(type == "line")
-      {
-         theGeographicGridType = OSSIM_GRID_LINE;
-      }
-      else
-      {
-         theGeographicGridType = OSSIM_GRID_NONE;
-      }
-   }
-
-   if(topBorderLength)
-   {
-      theTopBorderLength = ossimString(topBorderLength).toULong();
-   }
-
-   if(bottomBorderLength)
-   {
-      theBottomBorderLength = ossimString(bottomBorderLength).toULong();
-   }
-   if(leftBorderLength)
-   {
-      theLeftBorderLength = ossimString(leftBorderLength).toULong();
-   }
-   if(rightBorderLength)
-   {
-      theRightBorderLength = ossimString(rightBorderLength).toULong();
-   }
-
-   if(borderColor)
-   {
-      istringstream in(borderColor);
-
-      ossimString r;
-      ossimString g;
-      ossimString b;
-      in >> r >> g >> b;
-
-      theBorderColor = ossimRgbVector((ossim_uint8)r.toUInt32(), 
-                                      (ossim_uint8)g.toUInt32(), 
-                                      (ossim_uint8)b.toUInt32());
-   }
-
-   if(geoGridColor)
-   {
-      istringstream in(geoGridColor);
-
-      ossimString r;
-      ossimString g;
-      ossimString b;
-      in >> r >> g >> b;
-      
-      theGeographicGridColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());
-   }
-
-   if(meterGridColor)
-   {
-      istringstream in(meterGridColor);
-
-      ossimString r;
-      ossimString g;
-      ossimString b;
-      in >> r >> g >> b;
-      
-      theMeterGridColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());      
-   }
-
-   if(titleString)
-   {
-      theTitleString = titleString;
-   }
-   
-   if(titleColor)
-   {
-      istringstream in(titleColor);
-
-      ossimString r;
-      ossimString g;
-      ossimString b;
-      in >> r >> g >> b;
-      
-      
-      theTitleColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());
-   }
-
-   if(topGeoLabelColor)
-   {
-      istringstream in(topGeoLabelColor);
-
-      ossimString r;
-      ossimString g;
-      ossimString b;
-      in >> r >> g >> b;
-      
-      theTopGeographicLabelColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());
-   }
-
-   if(bottomGeoLabelColor)
-   {
-      istringstream in(bottomGeoLabelColor);
-
-      ossimString r;
-      ossimString g;
-      ossimString b;
-      in >> r >> g >> b;
-      
-      theBottomGeographicLabelColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());
-   }
-
-   if(leftGeoLabelColor)
-   {
-      istringstream in(leftGeoLabelColor);
-
-      ossimString r;
-      ossimString g;
-      ossimString b;
-      in >> r >> g >> b;
-
-      theLeftGeographicLabelColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());
-   }
-
-   if(rightGeoLabelColor)
-   {
-      istringstream in(rightGeoLabelColor);
-
-      ossimString r;
-      ossimString g;
-      ossimString b;
-      in >> r >> g >> b;
-      
-      theRightGeographicLabelColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());
-   }
-
-
-/////
-   if(topMeterLabelColor)
-   {
-      istringstream in(topMeterLabelColor);
-
-      ossimString r;
-      ossimString g;
-      ossimString b;
-      in >> r >> g >> b;
-      
-      theTopMeterLabelColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());
-   }
-
-   if(bottomMeterLabelColor)
-   {
-      istringstream in(bottomMeterLabelColor);
-
-      ossimString r;
-      ossimString g;
-      ossimString b;
-      in >> r >> g >> b;
-      
-      theBottomMeterLabelColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());
-   }
-
-   if(leftMeterLabelColor)
-   {
-      istringstream in(leftMeterLabelColor);
-
-      ossimString r;
-      ossimString g;
-      ossimString b;
-      in >> r >> g >> b;
-      
-      theLeftMeterLabelColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());
-   }
-
-   if(rightMeterLabelColor)
-   {
-      istringstream in(rightMeterLabelColor);
-
-      ossimString r;
-      ossimString g;
-      ossimString b;
-      in >> r >> g >> b;
-      
-      theRightMeterLabelColor = ossimRgbVector((ossim_uint8)r.toUInt32(), (ossim_uint8)g.toUInt32(), (ossim_uint8)b.toUInt32());
-   }
-
-   if(topGeoLabelFormat)
-   {
-      theTopGeographicFormat = topGeoLabelFormat;
-   }
-   
-   if(bottomGeoLabelFormat)
-   {
-      theBottomGeographicFormat = bottomGeoLabelFormat;
-   }
-   
-   if(leftGeoLabelFormat)
-   {
-      theLeftGeographicFormat = leftGeoLabelFormat;
-   }
-   
-   if(rightGeoLabelFormat)
-   {
-      theRightGeographicFormat = rightGeoLabelFormat;
-   }
-
-   if(topGeoLabelFlag)
-   {
-      theTopGeographicLabelFlag = ossimString(topGeoLabelFlag).toBool();
-   }
-   if(bottomGeoLabelFlag)
-   {
-      theBottomGeographicLabelFlag = ossimString(bottomGeoLabelFlag).toBool();
-   }
-   if(leftGeoLabelFlag)
-   {
-      theLeftGeographicLabelFlag = ossimString(leftGeoLabelFlag).toBool();
-   }
-   if(rightGeoLabelFlag)
-   {
-      theRightGeographicLabelFlag = ossimString(rightGeoLabelFlag).toBool();
-   }
-
-   if(topMeterLabelFlag)
-   {
-      theTopMeterLabelFlag = ossimString(topMeterLabelFlag).toBool();
-   }
-   if(bottomMeterLabelFlag)
-   {
-      theBottomMeterLabelFlag = ossimString(bottomMeterLabelFlag).toBool();
-   }
-   if(leftMeterLabelFlag)
-   {
-      theLeftMeterLabelFlag = ossimString(leftMeterLabelFlag).toBool();
-   }
-   if(rightMeterLabelFlag)
-   {
-      theRightMeterLabelFlag = ossimString(rightMeterLabelFlag).toBool();
-   }
-   
-   theGeographicTopLabelFontInfo.loadState(kwl, (ossimString(prefix) + ossimString(TOP_GEO_LABEL_FONT_KW) + ".").c_str());
-   theGeographicBottomLabelFontInfo.loadState(kwl, (ossimString(prefix) + ossimString(BOTTOM_GEO_LABEL_FONT_KW) + ".").c_str());
-   theGeographicLeftLabelFontInfo.loadState(kwl, (ossimString(prefix) + ossimString(LEFT_GEO_LABEL_FONT_KW) + ".").c_str());
-   theGeographicRightLabelFontInfo.loadState(kwl, (ossimString(prefix) + ossimString(RIGHT_GEO_LABEL_FONT_KW) + ".").c_str());
-
-   theMeterTopLabelFontInfo.loadState(kwl, (ossimString(prefix) + ossimString(TOP_METER_LABEL_FONT_KW) + ".").c_str());
-   theMeterBottomLabelFontInfo.loadState(kwl, (ossimString(prefix) + ossimString(BOTTOM_METER_LABEL_FONT_KW) + ".").c_str());
-   theMeterLeftLabelFontInfo.loadState(kwl, (ossimString(prefix) + ossimString(LEFT_METER_LABEL_FONT_KW) + ".").c_str());
-   theMeterRightLabelFontInfo.loadState(kwl, (ossimString(prefix) + ossimString(RIGHT_METER_LABEL_FONT_KW) + ".").c_str());
-   
-   theTitleFontInfo.loadState(kwl, (ossimString(prefix) + ossimString(TITLE_FONT_KW) + ".").c_str());
-   theTitleFont = ossimFontFactoryRegistry::instance()->createFont(theTitleFontInfo);
-   theGeographicTopLabelFont = ossimFontFactoryRegistry::instance()->createFont(theGeographicTopLabelFontInfo);
-   theGeographicBottomLabelFont = ossimFontFactoryRegistry::instance()->createFont(theGeographicBottomLabelFontInfo);
-   theGeographicLeftLabelFont = ossimFontFactoryRegistry::instance()->createFont(theGeographicLeftLabelFontInfo);
-   theGeographicRightLabelFont = ossimFontFactoryRegistry::instance()->createFont(theGeographicRightLabelFontInfo);
-
-   theMeterTopLabelFont = ossimFontFactoryRegistry::instance()->createFont(theMeterTopLabelFontInfo);
-   theMeterBottomLabelFont = ossimFontFactoryRegistry::instance()->createFont(theMeterBottomLabelFontInfo);
-   theMeterLeftLabelFont = ossimFontFactoryRegistry::instance()->createFont(theMeterLeftLabelFontInfo);
-   theMeterRightLabelFont = ossimFontFactoryRegistry::instance()->createFont(theMeterRightLabelFontInfo);
-   
-   vector<ossimFontInformation> info;
-
-   
-   if(!theTitleFont)
-   {
-      theTitleFont = (ossimFont*)ossimFontFactoryRegistry::instance()->getDefaultFont()->dup();
-      theTitleFont->getFontInformation(info);
-      theTitleFontInfo = info[0];
-   }
-   if(!theGeographicTopLabelFont)
-   {
-      info.clear();
-      theGeographicTopLabelFont = (ossimFont*)ossimFontFactoryRegistry::instance()->getDefaultFont()->dup();
-      theGeographicTopLabelFont->getFontInformation(info);
-      theGeographicTopLabelFontInfo = info[0];
-   }
-   if(!theGeographicBottomLabelFont)
-   {
-      info.clear();
-      theGeographicBottomLabelFont = (ossimFont*)ossimFontFactoryRegistry::instance()->getDefaultFont()->dup();
-      theGeographicBottomLabelFont->getFontInformation(info);
-      theGeographicBottomLabelFontInfo = info[0];
-   }
-   if(!theGeographicLeftLabelFont)
-   {
-      info.clear();
-      theGeographicLeftLabelFont = (ossimFont*)ossimFontFactoryRegistry::instance()->getDefaultFont()->dup();
-      theGeographicLeftLabelFont->getFontInformation(info);
-      theGeographicLeftLabelFontInfo = info[0];
-   }
-   if(!theGeographicRightLabelFont)
-   {
-      info.clear();
-      theGeographicRightLabelFont = (ossimFont*)ossimFontFactoryRegistry::instance()->getDefaultFont()->dup();
-      theGeographicRightLabelFont->getFontInformation(info);
-      theGeographicRightLabelFontInfo = info[0];
-   }
-
-   if(!theMeterTopLabelFont)
-   {
-      info.clear();
-      theMeterTopLabelFont = (ossimFont*)ossimFontFactoryRegistry::instance()->getDefaultFont()->dup();
-      theMeterTopLabelFont->getFontInformation(info);
-      theMeterTopLabelFontInfo = info[0];
-   }
-   if(!theMeterBottomLabelFont)
-   {
-      info.clear();
-      theMeterBottomLabelFont = (ossimFont*)ossimFontFactoryRegistry::instance()->getDefaultFont()->dup();
-      theMeterBottomLabelFont->getFontInformation(info);
-      theMeterBottomLabelFontInfo = info[0];
-   }
-   if(!theMeterLeftLabelFont)
-   {
-      info.clear();
-      theMeterLeftLabelFont = (ossimFont*)ossimFontFactoryRegistry::instance()->getDefaultFont()->dup();
-      theMeterLeftLabelFont->getFontInformation(info);
-      theMeterLeftLabelFontInfo = info[0];
-   }
-   if(!theMeterRightLabelFont)
-   {
-      info.clear();
-      theMeterRightLabelFont = (ossimFont*)ossimFontFactoryRegistry::instance()->getDefaultFont()->dup();
-      theMeterRightLabelFont->getFontInformation(info);
-      theMeterRightLabelFontInfo = info[0];
-   }
-
-   bool result =  ossimAnnotationSource::loadState(kwl,
-                                                   prefix);
-   layoutAnnotations();
-
-   return result;
-}
-
-ossimScalarType ossimMapCompositionSource::getOutputScalarType() const
-{
-   return OSSIM_UCHAR;
-}
-
-ossim_uint32 ossimMapCompositionSource::getNumberOfOutputBands() const
-{
-   return 3;
-}
-
-ossimIpt ossimMapCompositionSource::getViewWidthHeight()const
-{
-   return theViewWidthHeight;
-}
-
-void ossimMapCompositionSource::getViewWidthHeight(ossimIpt& widthHeight)const
-{
-   widthHeight = theViewWidthHeight;
-}
-
-void ossimMapCompositionSource::setViewWidthHeight(const ossimIpt& widthHeight)
-{
-   theViewWidthHeight = widthHeight;
-}
-
-ossim_int32 ossimMapCompositionSource::getTopBorderLength()const
-{
-   return theTopBorderLength;
-}
-
-ossim_int32 ossimMapCompositionSource::getBottomBorderLength()const
-{
-   return theBottomBorderLength;
-}
-
-ossim_int32 ossimMapCompositionSource::getLeftBorderLength()const
-{
-   return theLeftBorderLength;
-}
-
-ossim_int32 ossimMapCompositionSource::getRightBorderLength()const
-{
-   return theRightBorderLength;
-}
-
-void ossimMapCompositionSource::setTopBorderLength(ossim_int32 length)
-{
-   theTopBorderLength = length;
-}
-
-void ossimMapCompositionSource::setBottomBorderLength(ossim_int32 length)
-{
-   theBottomBorderLength = length;
-}
-
-void ossimMapCompositionSource::setLeftBorderLength(ossim_int32 length)
-{
-   theLeftBorderLength = length;
-}
-
-void ossimMapCompositionSource::setRightBorderLength(ossim_int32 length)
-{
-   theRightBorderLength = length;
-}
-
-void ossimMapCompositionSource::setGeographicSpacingLat(double value)
-{
-   theGeographicSpacing.lat = value;
-}
-
-void ossimMapCompositionSource::setGeographicSpacingLon(double value)
-{
-   theGeographicSpacing.lon = value;
-}
-
-void ossimMapCompositionSource::setMeterSpacingX(double value)
-{
-   theMeterSpacing.x = value;
-}
-
-void ossimMapCompositionSource::setMeterSpacingY(double value)
-{
-   theMeterSpacing.y = value;
-}
-
-void ossimMapCompositionSource::setMeterSpacing(double x, double y)
-{
-   theMeterSpacing.x = x;
-   theMeterSpacing.y = y;
-}
-
-void ossimMapCompositionSource::setGeographicSpacing(double lat, double lon)
-{
-   theGeographicSpacing.lat = lat;
-   theGeographicSpacing.lon = lon;
-}
-
-ossimDpt ossimMapCompositionSource::getGeographicSpacing()const
-{
-   return theGeographicSpacing;
-}
-
-ossimDpt ossimMapCompositionSource::getMeterSpacing()const
-{
-   return theMeterSpacing;
-}
-
-ossimString ossimMapCompositionSource::getTopGeographicLabelFormat()const
-{
-   return theTopGeographicFormat;
-}
-
-ossimString ossimMapCompositionSource::getBottomGeographicLabelFormat()const
-{
-   return theBottomGeographicFormat;
-}
-
-ossimString ossimMapCompositionSource::getLeftGeographicLabelFormat()const
-{
-   return theLeftGeographicFormat;
-}
-
-ossimString ossimMapCompositionSource::getRightGeographicLabelFormat()const
-{
-   return theRightGeographicFormat;
-}
-
-ossimString ossimMapCompositionSource::getTitle()const
-{
-   return theTitleString;
-}
-
-ossimRgbVector ossimMapCompositionSource::getTitleColor()const
-{
-   return theTitleColor;
-}
-
-void ossimMapCompositionSource::setTitleColor(const ossimRgbVector& color)
-{
-   if(theTitleColor != color)
-   {
-      theTitleColor = color;
-   }
-}
-
-void ossimMapCompositionSource::setTitle(const ossimString& s)
-{
-   if(theTitleString != s)
-   {
-      theTitleString = s;
-   }
-         
-}
-
-ossimFontInformation ossimMapCompositionSource::getTitleFont()const
-{
-   return theTitleFontInfo;
-}
-
-ossimFontInformation ossimMapCompositionSource::getGeographicTopLabelFontInfo()const
-{
-   return theGeographicTopLabelFontInfo;
-}
-
-ossimFontInformation ossimMapCompositionSource::getGeographicBottomLabelFontInfo()const
-{
-   return theGeographicBottomLabelFontInfo;
-}
-
-ossimFontInformation ossimMapCompositionSource::getGeographicLeftLabelFontInfo()const
-{
-   return theGeographicLeftLabelFontInfo;
-}
-
-ossimFontInformation ossimMapCompositionSource::getGeographicRightLabelFontInfo()const
-{
-   return theGeographicRightLabelFontInfo;
-}
-
-ossimFontInformation ossimMapCompositionSource::getMeterTopLabelFontInfo()const
-{
-   return theMeterTopLabelFontInfo;
-}
-
-ossimFontInformation ossimMapCompositionSource::getMeterBottomLabelFontInfo()const
-{
-   return theMeterBottomLabelFontInfo;
-}
-
-ossimFontInformation ossimMapCompositionSource::getMeterLeftLabelFontInfo()const
-{
-   return theMeterLeftLabelFontInfo;
-}
-
-ossimFontInformation ossimMapCompositionSource::getMeterRightLabelFontInfo()const
-{
-   return theMeterRightLabelFontInfo;
-}
-   
-ossimRgbVector ossimMapCompositionSource::getBorderColor()const
-{
-   return theBorderColor;
-}
-
-void ossimMapCompositionSource::setBorderColor(const ossimRgbVector& color)
-{
-   theBorderColor=color;
-}
-
-ossimRgbVector ossimMapCompositionSource::getGeographicGridColor()const
-{
-   return theGeographicGridColor;
-}
-
-ossimRgbVector ossimMapCompositionSource::getMeterGridColor()const
-{
-   return theMeterGridColor;
-}
-
-ossimRgbVector ossimMapCompositionSource::getTopGeographicLabelColor()const
-{
-   return theTopGeographicLabelColor;
-}
-
-ossimRgbVector ossimMapCompositionSource::getBottomGeographicLabelColor()const
-{
-   return theBottomGeographicLabelColor;
-}
-
-ossimRgbVector ossimMapCompositionSource::getLeftGeographicLabelColor()const
-{
-   return theLeftGeographicLabelColor;
-}
-
-ossimRgbVector ossimMapCompositionSource::getRightGeographicLabelColor()const
-{
-   return theRightGeographicLabelColor;
-}
-
-void ossimMapCompositionSource::setGeographicGridColor(const ossimRgbVector& color)
-{
-   theGeographicGridColor = color;
-}
-
-void ossimMapCompositionSource::setTopGeographicLabelColor(const ossimRgbVector& color)
-{
-   theTopGeographicLabelColor = color;
-}
-
-void ossimMapCompositionSource::setBottomGeographicLabelColor(const ossimRgbVector& color)
-{
-   theBottomGeographicLabelColor = color;
-}
-
-void ossimMapCompositionSource::setLeftGeographicLabelColor(const ossimRgbVector& color)
-{
-   theLeftGeographicLabelColor = color;
-}
-
-void ossimMapCompositionSource::setRightGeographicLabelColor(const ossimRgbVector& color)
-{
-   theRightGeographicLabelColor = color;
-}
-
-void ossimMapCompositionSource::setGeographicLabelColor(const ossimRgbVector& color)
-{
-   setTopGeographicLabelColor(color);
-   setBottomGeographicLabelColor(color);
-   setLeftGeographicLabelColor(color);
-   setRightGeographicLabelColor(color);
-}
-
-ossimRgbVector ossimMapCompositionSource::getTopMeterLabelColor()const
-{
-   return theTopMeterLabelColor;
-}
-
-ossimRgbVector ossimMapCompositionSource::getBottomMeterLabelColor()const
-{
-   return theBottomMeterLabelColor;
-}
-
-ossimRgbVector ossimMapCompositionSource::getLeftMeterLabelColor()const
-{
-   return theLeftMeterLabelColor;
-}
-
-ossimRgbVector ossimMapCompositionSource::getRightMeterLabelColor()const
-{
-   return theRightMeterLabelColor;
-}
-   
-void ossimMapCompositionSource::setTopMeterLabelColor(const ossimRgbVector& color)
-{
-   theTopMeterLabelColor = color;
-}
-
-void ossimMapCompositionSource::setBottomMeterLabelColor(const ossimRgbVector& color)
-{
-   theBottomMeterLabelColor = color;
-}
-
-void ossimMapCompositionSource::setLeftMeterLabelColor(const ossimRgbVector& color)
-{
-   theLeftMeterLabelColor = color;
-}
-
-void ossimMapCompositionSource::setRightMeterLabelColor(const ossimRgbVector& color)
-{
-   theRightMeterLabelColor = color;
-}
-
-void ossimMapCompositionSource::setMeterLabelColor(const ossimRgbVector& color)
-{
-   setTopMeterLabelColor(color);
-   setBottomMeterLabelColor(color);
-   setLeftMeterLabelColor(color);
-   setRightMeterLabelColor(color);
-}
-   
-void ossimMapCompositionSource::setMeterGridColor(const ossimRgbVector& color)
-{
-   theMeterGridColor = color;
-}
-
-void ossimMapCompositionSource::setMeterGridType(ossimGridLineType gridType)
-{
-   theMeterGridType = gridType;
-}
-
-void ossimMapCompositionSource::setGeographicGridType(ossimGridLineType gridType)
-{
-   theGeographicGridType = gridType;
-}
-
-void ossimMapCompositionSource::setBorderColor(ossimRgbVector& color)
-{
-   theBorderColor = color;
-}
-
-ossimMapCompositionSource::ossimGridLineType ossimMapCompositionSource::getGeographicGridType()const
-{
-   return theGeographicGridType;
-}
-
-ossimMapCompositionSource::ossimGridLineType ossimMapCompositionSource::getMeterGridType()const
-{
-   return theMeterGridType;
-}
- 
-void ossimMapCompositionSource::setGeographicTickMarkFlag(bool flag)
-{
-   setTopGeographicTickMarkFlag(flag);
-   setBottomGeographicTickMarkFlag(flag);
-   setLeftGeographicTickMarkFlag(flag);
-   setRightGeographicTickMarkFlag(flag);
-}
-
-void ossimMapCompositionSource::setTopGeographicTickMarkFlag(bool flag)
-{
-   theTopGeographicTickFlag = flag;
-}
-
-void ossimMapCompositionSource::setBottomGeographicTickMarkFlag(bool flag)
-{
-   theBottomGeographicTickFlag = flag;
-}
-
-void ossimMapCompositionSource::setLeftGeographicTickMarkFlag(bool flag)
-{
-   theLeftGeographicTickFlag = flag;
-}
-
-void ossimMapCompositionSource::setRightGeographicTickMarkFlag(bool flag)
-{
-   theRightGeographicTickFlag = flag;
-}
-
-void ossimMapCompositionSource::setTopGeographicLabelFlag(bool flag)
-{
-   theTopGeographicLabelFlag = flag;
-}
-
-void ossimMapCompositionSource::setBottomGeographicLabelFlag(bool flag)
-{
-   theBottomGeographicLabelFlag = flag;
-}
-
-void ossimMapCompositionSource::setLeftGeographicLabelFlag(bool flag)
-{
-   theLeftGeographicLabelFlag = flag;
-}
-
-void ossimMapCompositionSource::setRightGeographicLabelFlag(bool flag)
-{
-   theRightGeographicLabelFlag = flag;
-}
-
-bool ossimMapCompositionSource::getTopGeographicTickMarkFlag()const
-{
-   return theTopGeographicTickFlag;
-}
-
-bool ossimMapCompositionSource::getBottomGeographicTickMarkFlag()const
-{
-   return theBottomGeographicTickFlag;
-}
-
-bool ossimMapCompositionSource::getLeftGeographicTickMarkFlag()const
-{
-   return theLeftGeographicTickFlag;
-}
-
-bool ossimMapCompositionSource::getRightGeographicTickMarkFlag()const
-{
-   return theRightGeographicTickFlag;
-}
-
-bool ossimMapCompositionSource::getTopGeographicLabelFlag()const
-{
-   return theTopGeographicLabelFlag;
-}
-
-bool ossimMapCompositionSource::getBottomGeographicLabelFlag()const
-{
-   return theBottomGeographicLabelFlag;
-}
-
-bool ossimMapCompositionSource::getLeftGeographicLabelFlag()const
-{
-   return theLeftGeographicLabelFlag;
-}
-
-bool ossimMapCompositionSource::getRightGeographicLabelFlag()const
-{
-   return theRightGeographicLabelFlag;
-}
-
-void ossimMapCompositionSource::setMeterTickMarkFlag(bool flag)
-{
-   setTopMeterTickMarkFlag(flag);
-   setBottomMeterTickMarkFlag(flag);
-   setLeftMeterTickMarkFlag(flag);
-   setRightMeterTickMarkFlag(flag);
-}
-
-void ossimMapCompositionSource::setTopMeterTickMarkFlag(bool flag)
-{
-   theTopMeterTickFlag = flag;
-}
-
-void ossimMapCompositionSource::setBottomMeterTickMarkFlag(bool flag)
-{
-   theBottomMeterTickFlag = flag;
-}
-
-void ossimMapCompositionSource::setLeftMeterTickMarkFlag(bool flag)
-{
-   theLeftMeterTickFlag = flag;
-}
-
-void ossimMapCompositionSource::setRightMeterTickMarkFlag(bool flag)
-{
-   theRightMeterTickFlag = flag;
-}
-
-void ossimMapCompositionSource::setTopMeterLabelFlag(bool flag)
-{
-   theTopMeterLabelFlag = flag;
-}
-
-void ossimMapCompositionSource::setBottomMeterLabelFlag(bool flag)
-{
-   theBottomMeterLabelFlag = flag;
-}
-
-void ossimMapCompositionSource::setLeftMeterLabelFlag(bool flag)
-{
-   theLeftMeterLabelFlag = flag;
-}
-
-void ossimMapCompositionSource::setRightMeterLabelFlag(bool flag)
-{
-   theRightMeterLabelFlag = flag;
-}
-   
-bool ossimMapCompositionSource::getTopMeterTickMarkFlag()const
-{
-   return theTopMeterTickFlag;
-}
-
-bool ossimMapCompositionSource::getBottomMeterTickMarkFlag()const
-{
-   return theBottomMeterTickFlag;
-}
-
-bool ossimMapCompositionSource::getLeftMeterTickMarkFlag()const
-{
-   return theLeftMeterTickFlag;
-}
-
-bool ossimMapCompositionSource::getRightMeterTickMarkFlag()const
-{
-   return theRightMeterTickFlag;
-}
-
-bool ossimMapCompositionSource::getTopMeterLabelFlag()const
-{
-   return theTopMeterLabelFlag;
-}
-
-bool ossimMapCompositionSource::getBottomMeterLabelFlag()const
-{
-   return theBottomMeterLabelFlag;
-}
-
-bool ossimMapCompositionSource::getLeftMeterLabelFlag()const
-{
-   return theLeftMeterLabelFlag;
-}
-
-bool ossimMapCompositionSource::getRightMeterLabelFlag()const
-{
-   return theRightMeterLabelFlag;
-}
-
-void ossimMapCompositionSource::addFixedAnnotation(ossimAnnotationObject* obj)
-{
-   if(obj)
-   {
-      theFixedAnnotationList.push_back(obj);
-   }
-}
-
-//**************************************************************************************************
-//! Fetches the input connection's image geometry and verifies that it is a map projection.
-//! Returns NULL if no valid projection found.
-//**************************************************************************************************
-const ossimMapProjection* ossimMapCompositionSource::inputMapProjection() const
-{
-   if (!theInputConnection)
-      return 0;
-
-   ossimRefPtr<ossimImageGeometry> inputGeom = theInputConnection->getImageGeometry();
-   if (!inputGeom)
-      return 0;
-
-   return PTR_CAST(ossimMapProjection, inputGeom->getProjection());
-}
-
diff --git a/src/ossim/imaging/ossimMaskFilter.cpp b/src/ossim/imaging/ossimMaskFilter.cpp
deleted file mode 100644
index f91ede6..0000000
--- a/src/ossim/imaging/ossimMaskFilter.cpp
+++ /dev/null
@@ -1,862 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// Modified by: Elan Sharghi (1/20/2009)
-// Description: Class definition for ossimMaskFilter.
-//
-//*************************************************************************
-// $Id: ossimMaskFilter.cpp 20409 2011-12-22 16:57:05Z dburken $
-
-#include <ossim/imaging/ossimMaskFilter.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimProperty.h>
-#include <ossim/base/ossimStringProperty.h>
-
-static const char * MASK_FILTER_MASK_TYPE_KW = "mask_type";
-
-RTTI_DEF1(ossimMaskFilter, "ossimMaskFilter", ossimImageSource);
-
-ossimMaskFilter::ossimMaskFilter(ossimObject* owner)
-   :
-   ossimImageSource(owner, 1, 1, true, false),
-   theMaskType(OSSIM_MASK_TYPE_SELECT),
-   theTile(0)
-{
-}
-
-ossimMaskFilter::~ossimMaskFilter()
-{
-}
-
-//*************************************************************************************************
-void ossimMaskFilter::setMaskSource(ossimImageSource* maskSource)
-{
-   theMaskSource = maskSource;
-}
-
-ossimRefPtr<ossimImageData> ossimMaskFilter::getTile(const ossimIrect& rect,
-                                                     ossim_uint32 resLevel)
-{
-   ossimImageSource* imageSource = PTR_CAST(ossimImageSource, getInput(0));
-   if (!imageSource || !theMaskSource.valid())
-   {
-      ossimRefPtr<ossimImageData>();
-      return theTile;
-   }
-
-   ossimRefPtr<ossimImageData> imageSourceData;
-   ossimRefPtr<ossimImageData> maskSourceData;
-   
-   imageSourceData = imageSource->getTile(rect, resLevel);
-   if(!isSourceEnabled())
-      return imageSourceData;
-   
-   if (!theTile.valid())
-      allocate();
-
-   maskSourceData = theMaskSource->getTile(rect, resLevel);
-   if(!imageSourceData.valid() || !theTile.valid())
-   {
-      return ossimRefPtr<ossimImageData>();
-   }
-   
-   theTile->setOrigin(rect.ul());
-   if(theTile->getImageRectangle() != rect)
-   {
-      theTile->setImageRectangle(rect);
-      theTile->initialize();
-   }
-   if(!imageSourceData.valid())
-   {
-      return theTile;
-   }
-   if(!maskSourceData.valid()) 
-   {
-      return imageSourceData;
-   }
-   
-   if(imageSourceData->getDataObjectStatus() != OSSIM_NULL)
-   {
-      return executeMaskFilter(imageSourceData, maskSourceData);  
-   }
-   
-   return theTile;
-}
-
-bool ossimMaskFilter::canConnectMyInputTo(ossim_int32 /* index */,
-                                          const ossimConnectableObject* object)const
-{
-   return (PTR_CAST(ossimImageSource, object)!= 0);
-}
-
-void ossimMaskFilter::initialize()
-{
-   if(getInput(0))
-   {
-      // Force an allocate on the next getTile.
-      theTile = 0;
-   }
-}
-
-void ossimMaskFilter::allocate()
-{
-   if(getInput())
-   {
-      theTile = ossimImageDataFactory::instance()->create(this, this);
-      theTile->initialize();
-   }
-}
-
-ossimRefPtr<ossimImageData> ossimMaskFilter::executeMaskFilter(
-   ossimRefPtr<ossimImageData> imageSourceData,
-   ossimRefPtr<ossimImageData> maskSourceData)
-{
-   if(!theTile)
-   {
-      theTile = (ossimImageData*)imageSourceData->dup();
-      if(!theTile->getBuf())
-      {
-         theTile->initialize();
-      }
-   }
-   else
-   {
-      ossim_uint32 tw = theTile->getWidth();
-      ossim_uint32 th = theTile->getHeight();
-      ossim_uint32 dw = imageSourceData->getWidth();
-      ossim_uint32 dh = imageSourceData->getHeight();
-      
-      theTile->setWidthHeight(imageSourceData->getWidth(),
-			      imageSourceData->getHeight());
-      theTile->setOrigin(imageSourceData->getOrigin());
-      if((tw*th) != (dw*dh))
-      {
-         theTile->initialize();
-      }
-      theTile->setDataObjectStatus(imageSourceData->getDataObjectStatus());
-   }
-   theTile->loadTile(imageSourceData.get());
-   theTile->setDataObjectStatus(imageSourceData->getDataObjectStatus());
-   switch(theMaskType)
-   {
-      case OSSIM_MASK_TYPE_SELECT:
-      case OSSIM_MASK_TYPE_SELECT_CLAMP_MIN:
-      {
-         return executeMaskFilterSelect(theTile, maskSourceData);
-      }
-      case OSSIM_MASK_TYPE_INVERT:
-      {
-         return executeMaskFilterInvertSelect(theTile, maskSourceData);
-      }
-      case OSSIM_MASK_TYPE_WEIGHTED:
-      {
-         return executeMaskFilterWeighted(theTile, maskSourceData);
-      }
-      case OSSIM_MASK_TYPE_BINARY:
-      case OSSIM_MASK_TYPE_BINARY_INVERSE:
-      {
-         return executeMaskFilterBinary(theTile, maskSourceData);
-      }
-   }
-   
-   return imageSourceData;
-}
-
-ossimRefPtr<ossimImageData> ossimMaskFilter::executeMaskFilterSelect(
-   ossimRefPtr<ossimImageData> imageSourceData,
-   ossimRefPtr<ossimImageData> maskSourceData)
-{
-   if(maskSourceData->getScalarType() != OSSIM_UCHAR)
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "ossimMaskFilter::executeMaskFilterSelect WARNING: Only uchar masks are supported" << endl;
-      return imageSourceData;
-   }
-
-   switch(imageSourceData->getScalarType())
-   {
-   case OSSIM_UCHAR:
-   {
-      executeMaskFilterSelection((ossim_uint8)0,
-                                 (ossim_uint8)0,
-                                 imageSourceData,
-                                 maskSourceData);
-      break;
-   }
-   case OSSIM_USHORT11:
-   case OSSIM_USHORT16:
-   {
-      executeMaskFilterSelection((ossim_uint16)0,
-                                 (ossim_uint8)0,
-                                 imageSourceData,
-                                 maskSourceData);
-      break;
-   }
-   case OSSIM_SSHORT16:
-   {
-      executeMaskFilterSelection((ossim_sint16)0,
-                                 (ossim_uint8)0,
-                                 imageSourceData,
-                                 maskSourceData);
-      break;
-   }
-   case OSSIM_FLOAT:
-   case OSSIM_NORMALIZED_FLOAT:
-   {
-      executeMaskFilterSelection((float)0,
-                                 (ossim_uint8)0,
-                                 imageSourceData,
-                                 maskSourceData);
-      break;
-   }
-   case OSSIM_DOUBLE:
-   case OSSIM_NORMALIZED_DOUBLE:
-   {
-      executeMaskFilterSelection((double)0,
-                                 (ossim_uint8)0,
-                                 imageSourceData,
-                                 maskSourceData);
-      break;
-   }
-   default:
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "ossimMaskFilter::executeMaskFilterSelect WARNING: Unknown scalar type" << endl;
-      break;
-   }   
-   }
-
-   return theTile;
-}
-
-ossimRefPtr<ossimImageData> ossimMaskFilter::executeMaskFilterInvertSelect(ossimRefPtr<ossimImageData> imageSourceData,
-                                                                           ossimRefPtr<ossimImageData> maskSourceData)
-{
-   if(maskSourceData->getScalarType() != OSSIM_UCHAR)
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "ossimMaskFilter::executeMaskFilterSelect WARNING: Only uchar masks are supported" << endl;
-      return imageSourceData;
-   }
-
-   switch(imageSourceData->getScalarType())
-   {
-   case OSSIM_UCHAR:
-   {
-      executeMaskFilterInvertSelection((ossim_uint8)0,
-                                       (ossim_uint8)0,
-                                       imageSourceData,
-                                       maskSourceData);
-      break;
-   }
-   case OSSIM_USHORT11:
-   case OSSIM_USHORT16:
-   {
-      executeMaskFilterInvertSelection((ossim_uint16)0,
-                                       (ossim_uint8)0,
-                                       imageSourceData,
-                                       maskSourceData);
-      break;
-   }
-   case OSSIM_SSHORT16:
-   {
-      executeMaskFilterInvertSelection((ossim_sint16)0,
-                                       (ossim_uint8)0,
-                                       imageSourceData,
-                                       maskSourceData);
-      break;
-   }
-   case OSSIM_FLOAT:
-   case OSSIM_NORMALIZED_FLOAT:
-   {
-      executeMaskFilterInvertSelection((float)0,
-                                       (ossim_uint8)0,
-                                       imageSourceData,
-                                       maskSourceData);
-      break;
-   }
-   case OSSIM_DOUBLE:
-   case OSSIM_NORMALIZED_DOUBLE:
-   {
-      executeMaskFilterInvertSelection((double)0,
-                                       (ossim_uint8)0,
-                                       imageSourceData,
-                                       maskSourceData);
-      break;
-   }
-   default:
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "ossimMaskFilter::executeMaskFilterSelect WARNING: Unknown scalar type" << endl;
-      break;
-   }   
-   }
-
-   return theTile;
-}
-
-ossimRefPtr<ossimImageData> ossimMaskFilter::executeMaskFilterWeighted(ossimRefPtr<ossimImageData> imageSourceData,
-                                                                       ossimRefPtr<ossimImageData> maskSourceData)
-{
-   if(maskSourceData->getScalarType() != OSSIM_UCHAR)
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "ossimMaskFilter::executeMaskFilterSelect WARNING: Only uchar masks are supported" << endl;
-      return imageSourceData;
-   }
-
-   switch(imageSourceData->getScalarType())
-   {
-   case OSSIM_UCHAR:
-   {
-      executeMaskFilterWeighted((ossim_uint8)0,
-                                (ossim_uint8)0,
-                                imageSourceData,
-                                maskSourceData);
-      break;
-   }
-   case OSSIM_USHORT11:
-   case OSSIM_USHORT16:
-   {
-      executeMaskFilterWeighted((ossim_uint16)0,
-                                (ossim_uint8)0,
-                                imageSourceData,
-                                maskSourceData);
-      break;
-   }
-   case OSSIM_SSHORT16:
-   {
-      executeMaskFilterWeighted((ossim_sint16)0,
-                                (ossim_uint8)0,
-                                imageSourceData,
-                                maskSourceData);
-      break;
-   }
-   case OSSIM_FLOAT:
-   case OSSIM_NORMALIZED_FLOAT:
-   {
-      executeMaskFilterWeighted((float)0,
-                                (ossim_uint8)0,
-                                imageSourceData,
-                                maskSourceData);
-      break;
-   }
-   case OSSIM_DOUBLE:
-   case OSSIM_NORMALIZED_DOUBLE:
-   {
-      executeMaskFilterWeighted((double)0,
-                                (ossim_uint8)0,
-                                imageSourceData,
-                                maskSourceData);
-      break;
-   }
-   default:
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "ossimMaskFilter::executeMaskFilterSelect WARNING: Unknown scalar type" << endl;
-      break;
-   }   
-   }
-
-   return theTile;
-}
-
-ossimRefPtr<ossimImageData> ossimMaskFilter::executeMaskFilterBinary(
-   ossimRefPtr<ossimImageData> imageSourceData, ossimRefPtr<ossimImageData> maskSourceData)
-{
-   if(maskSourceData->getScalarType() != OSSIM_UCHAR)
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "ossimMaskFilter::executeMaskFilterBinary WARNING: Only uchar masks are supported" << endl;
-      return imageSourceData;
-   }
-   
-   switch(imageSourceData->getScalarType())
-   {
-      case OSSIM_UCHAR:
-      {
-         executeMaskFilterBinarySelection((ossim_uint8)0,
-                                          (ossim_uint8)0,
-                                          imageSourceData,
-                                          maskSourceData);
-         break;
-      }
-      case OSSIM_USHORT11:
-      case OSSIM_USHORT16:
-      {
-         executeMaskFilterBinarySelection((ossim_uint16)0,
-                                          (ossim_uint8)0,
-                                          imageSourceData,
-                                          maskSourceData);
-         break;
-      }
-      case OSSIM_SSHORT16:
-      {
-         executeMaskFilterBinarySelection((ossim_sint16)0,
-                                          (ossim_uint8)0,
-                                          imageSourceData,
-                                          maskSourceData);
-         break;
-      }
-      case OSSIM_FLOAT:
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         executeMaskFilterBinarySelection((float)0,
-                                          (ossim_uint8)0,
-                                          imageSourceData,
-                                          maskSourceData);
-         break;
-      }
-      case OSSIM_DOUBLE:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         executeMaskFilterBinarySelection((double)0,
-                                          (ossim_uint8)0,
-                                          imageSourceData,
-                                          maskSourceData);
-         break;
-      }
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << "ossimMaskFilter::executeMaskFilterBinary WARNING: Unknown scalar type" << endl;
-         break;
-      }
-   }
-
-   return theTile;
-}
-
-template <class inputT, class maskT>
-ossimRefPtr<ossimImageData> ossimMaskFilter::executeMaskFilterSelection(
-   inputT /* dummyInput */,
-   maskT  /* dummyMask */,
-   ossimRefPtr<ossimImageData> imageSourceData,
-   ossimRefPtr<ossimImageData> maskSourceData)
-{
-   ossimDataObjectStatus maskDataStatus  = maskSourceData->getDataObjectStatus();
-   ossimDataObjectStatus inputDataStatus = imageSourceData->getDataObjectStatus();
-
-   // First just check if mask is full, which means pass the image source along untouched:
-   if (maskDataStatus == OSSIM_FULL)
-   {
-      theTile = imageSourceData;
-      return theTile;
-   }
-
-   // Then check for a total mask (all mask values are 0) and return empty tile if so:
-   if( (maskDataStatus == OSSIM_NULL) || (maskDataStatus == OSSIM_EMPTY))
-   {
-      theTile->makeBlank();
-      return theTile;
-   }
-
-   // Finally check for blank source tile and return it if so:
-   if( (inputDataStatus == OSSIM_NULL) || (inputDataStatus == OSSIM_EMPTY))
-   {
-      theTile->makeBlank();
-      return theTile;
-   }
-
-   ossim_uint32 maskBands  = maskSourceData->getNumberOfBands();
-   ossim_uint32 inputBands = imageSourceData->getNumberOfBands();
-   if(maskBands&&inputBands)
-   {
-      ossim_uint32 maxOffset = theTile->getWidth()*theTile->getHeight();
-      for(ossim_uint32 band = 0; band < inputBands; ++band)
-      {
-         maskT*  bufMask = static_cast<maskT*> ( maskSourceData->getBuf() );
-         inputT* bufIn   = static_cast<inputT*>( imageSourceData->getBuf(band) );
-         inputT* bufOut  = static_cast<inputT*>( theTile->getBuf(band) );
-         inputT  nullPix = static_cast<inputT> ( theTile->getNullPix(band) );
-         inputT  minPix  = static_cast<inputT> ( theTile->getMinPix(band) );
-         ossim_uint32 offset = 0;
-         for(offset = 0; offset < maxOffset; ++offset)
-         {
-            if(*bufMask)
-            {
-               if ( theMaskType == OSSIM_MASK_TYPE_SELECT )
-               {
-                  *bufOut = *bufIn;
-               }
-               else
-               {
-                  //---
-                  // OSSIM_MASK_TYPE_SELECT_CLAMP_MIN
-                  // Use input pixel clamping any nulls to min.
-                  //---
-                  *bufOut = *bufIn != nullPix ? *bufIn : minPix;
-               }
-            }
-            else
-            {
-               *bufOut = nullPix;
-            }
-            ++bufOut;
-            ++bufIn;
-            ++bufMask;
-         }
-      }
-      theTile->validate();
-   }
-   
-   return theTile;
-}
-
-template <class inputT, class maskT>
-ossimRefPtr<ossimImageData> ossimMaskFilter::executeMaskFilterInvertSelection(
-   inputT /* dummyInput */,
-   maskT  /* dummyMask */,
-   ossimRefPtr<ossimImageData> imageSourceData,
-   ossimRefPtr<ossimImageData> maskSourceData)
-{
-   ossimDataObjectStatus maskDataStatus  = maskSourceData->getDataObjectStatus();
-   ossimDataObjectStatus inputDataStatus = imageSourceData->getDataObjectStatus();
-
-   // First just check if mask is empty, which means pass the image source along untouched:
-   if( (maskDataStatus == OSSIM_NULL) || (maskDataStatus == OSSIM_EMPTY))
-   {
-      theTile = imageSourceData;
-      return theTile;
-   }
-
-   // Then check for a total mask (all mask values are 1) and return empty tile if so:
-   if (maskDataStatus == OSSIM_FULL)
-   {
-      theTile->makeBlank();
-      return theTile;
-   }
-
-   // Finally check for blank source tile and return it if so:
-   if( (inputDataStatus == OSSIM_NULL) || (inputDataStatus == OSSIM_EMPTY))
-   {
-      theTile->makeBlank();
-      return theTile;
-   }
-
-   ossim_uint32 maskBands  = maskSourceData->getNumberOfBands();
-   ossim_uint32 inputBands = imageSourceData->getNumberOfBands();
-   if(maskBands&&inputBands)
-   {
-      ossim_uint32 maxOffset = theTile->getWidth()*theTile->getHeight();
-      for(ossim_uint32 band = 0; band < inputBands; ++band)
-      {
-         maskT*    bufMask = (maskT*)maskSourceData->getBuf();
-         inputT* bufIn     = (inputT*)imageSourceData->getBuf(band);
-         inputT* bufOut    = (inputT*)theTile->getBuf(band);
-         inputT  np        = (inputT)theTile->getNullPix(band);
-         ossim_uint32 offset = 0;
-         for(offset = 0; offset < maxOffset; ++offset)
-         {
-            if(!*bufMask)
-            {
-               *bufOut = *bufIn;
-            }
-            else
-            {
-               *bufOut = np;
-            }
-            ++bufOut;
-            ++bufIn;
-            ++bufMask;
-         }
-      }
-      theTile->validate();
-   }
-   
-   return theTile;
-}
-
-template <class inputT, class maskT>
-ossimRefPtr<ossimImageData> ossimMaskFilter::executeMaskFilterWeighted(
-   inputT /* dummyInput */,
-   maskT  /* dummyMask */,
-   ossimRefPtr<ossimImageData> imageSourceData,
-   ossimRefPtr<ossimImageData> maskSourceData)
-{
-   ossimDataObjectStatus maskDataStatus  = maskSourceData->getDataObjectStatus();
-   ossimDataObjectStatus inputDataStatus = imageSourceData->getDataObjectStatus();
-
-   if( (maskDataStatus == OSSIM_NULL)||
-       (maskDataStatus == OSSIM_EMPTY))
-   {
-      theTile->makeBlank();
-      return theTile;
-   }
-   if( (inputDataStatus == OSSIM_NULL)||
-       (inputDataStatus == OSSIM_EMPTY))
-   {
-      return theTile;
-   }
-   
-   ossim_uint32 maskBands  = maskSourceData->getNumberOfBands();
-   ossim_uint32 inputBands = imageSourceData->getNumberOfBands();
-   if(maskBands&&inputBands)
-   {
-      ossim_uint32 maxOffset = theTile->getWidth()*theTile->getHeight();
-      for(ossim_uint32 band = 0; band < inputBands; ++band)
-      {
-         maskT*    bufMask = (maskT*)maskSourceData->getBuf();
-         inputT* bufIn     = (inputT*)imageSourceData->getBuf(band);
-         inputT* bufOut    = (inputT*)theTile->getBuf(band);
-         inputT  np        = (inputT)theTile->getNullPix(band);
-         inputT  minp      = (inputT)theTile->getMinPix(band);
-         ossim_uint32 offset = 0;
-
-         if(inputDataStatus == OSSIM_PARTIAL)
-         {
-            for(offset = 0; offset < maxOffset; ++offset)
-            {
-               if(*bufIn != np)
-               {
-                  *bufOut = (inputT)((*bufIn)*((double)(*bufMask)/255.0));
-                  if((*bufOut != np)&&
-                     (*bufOut < minp))
-                  {
-                     *bufOut = minp;
-                  }
-               }
-               else
-               {
-                  *bufOut = np;
-               }
-               ++bufOut;
-               ++bufIn;
-               ++bufMask;
-            }
-         }
-         else
-         {
-            for(offset = 0; offset < maxOffset; ++offset)
-            {
-               *bufOut = (inputT)((*bufIn)*((double)(*bufMask)/255.0));
-               if((*bufOut != np)&&
-                  (*bufOut < minp))
-               {
-                  *bufOut = minp;
-               }
-               ++bufOut;
-               ++bufIn;
-               ++bufMask;
-            }
-         }
-      }
-      theTile->validate();
-   }
-   
-   return theTile;
-}
-
-template <class inputT, class maskT>
-ossimRefPtr<ossimImageData> ossimMaskFilter::executeMaskFilterBinarySelection(
-   inputT /* dummyInput */,
-   maskT  /* dummyMask  */ ,
-   ossimRefPtr<ossimImageData> imageSourceData,
-   ossimRefPtr<ossimImageData> maskSourceData)
-{
-   ossim_uint32 maskBands  = maskSourceData->getNumberOfBands();
-   ossim_uint32 inputBands = imageSourceData->getNumberOfBands();
-   if(maskBands&&inputBands)
-   {
-      ossim_uint32 maxOffset = theTile->getWidth()*theTile->getHeight();
-      for(ossim_uint32 band = 0; band < inputBands; ++band)
-      {
-         maskT*  bufMask   = (maskT*)maskSourceData->getBuf();
-         inputT* bufOut    = (inputT*)theTile->getBuf(band);
-         const inputT  NP  = (inputT)theTile->getNullPix(band);
-         const inputT  MP  = (inputT)theTile->getMaxPix(band);
-         ossim_uint32 offset = 0;
-         for(offset = 0; offset < maxOffset; ++offset)
-         {
-            if (theMaskType == OSSIM_MASK_TYPE_BINARY_INVERSE)
-            {
-               if(*bufMask)      // if mask == 1
-                  *bufOut = MP;  // set to max pix
-               else              // if mask == 0
-                  *bufOut = NP;  // set to null pix
-            }
-            else
-            {
-               if(*bufMask)      // if mask == 1
-                  *bufOut = NP;  // set to null pix
-               else              // if mask == 0
-                  *bufOut = MP;  // set to max pix
-            }
-            ++bufOut;
-            ++bufMask;
-         }
-      }
-      theTile->validate();
-   }
-   
-   return theTile;
-}
-
-void ossimMaskFilter::setMaskType(ossimFileSelectionMaskType type)
-{
-   theMaskType = type;
-}
-
-void ossimMaskFilter::setMaskType(const ossimString& type)
-{
-   if(type != "")
-   {
-      ossimString maskType = type;
-      maskType.downcase();
-
-      if(maskType == "select")
-      {
-         theMaskType = OSSIM_MASK_TYPE_SELECT;
-      }
-      else if(maskType == "invert")
-      {
-         theMaskType = OSSIM_MASK_TYPE_INVERT;
-      }
-      else if(maskType == "weighted")
-      {
-         theMaskType = OSSIM_MASK_TYPE_WEIGHTED;
-      }
-      else if(maskType == "binary")
-      {
-         theMaskType = OSSIM_MASK_TYPE_BINARY;
-      }
-      else if(maskType == "binary_inverse")
-      {
-         theMaskType = OSSIM_MASK_TYPE_BINARY_INVERSE;
-      }
-      else if(maskType == "select_clamp_min")
-      {
-         theMaskType = OSSIM_MASK_TYPE_SELECT_CLAMP_MIN;
-      } 
-   }
-}
-
-ossimMaskFilter::ossimFileSelectionMaskType ossimMaskFilter::getMaskType()const
-{
-   return theMaskType;
-}
-
-ossimString ossimMaskFilter::getMaskTypeString() const
-{
-   ossimString maskType;
-   
-   switch(theMaskType)
-   {
-      case OSSIM_MASK_TYPE_SELECT:
-      {
-         maskType = "select";
-         break;
-      }
-      case OSSIM_MASK_TYPE_INVERT:
-      {
-         maskType = "invert";
-         break;
-      }
-      case OSSIM_MASK_TYPE_WEIGHTED:
-      {
-         maskType = "weighted";
-         break;
-      }
-      case OSSIM_MASK_TYPE_BINARY:
-      {
-         maskType = "binary";
-         break;
-      }
-      case OSSIM_MASK_TYPE_BINARY_INVERSE:
-      {
-         maskType = "binary_inverse";
-         break;
-      }
-      case OSSIM_MASK_TYPE_SELECT_CLAMP_MIN:
-      {
-         maskType = "select_clamp_min";
-         break;
-      }
-   }
-
-   return maskType;
-}
-
-bool ossimMaskFilter::loadState(const ossimKeywordlist& kwl,
-                                const char* prefix)
-{
-   bool result = ossimImageSource::loadState(kwl, prefix);
-   
-   theInputListIsFixedFlag  = true;
-   theOutputListIsFixedFlag = false;
-   setNumberOfInputs(2);
-
-   const char* lookup = kwl.find(prefix, MASK_FILTER_MASK_TYPE_KW);
-   if (lookup)
-   {
-      setMaskType(ossimString(lookup));
-   }
-
-   return result;
-}
-
-bool ossimMaskFilter::saveState(ossimKeywordlist& kwl,
-                                const char* prefix)const
-{
-   kwl.add(prefix,
-           MASK_FILTER_MASK_TYPE_KW,
-           getMaskTypeString().c_str(),
-           true);
-   
-   return ossimImageSource::saveState(kwl, prefix);
-}
-
-void ossimMaskFilter::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if( property.valid() )
-   {
-      if(property->getName() == MASK_FILTER_MASK_TYPE_KW)
-      {
-         setMaskType(property->valueToString());
-      }
-      else
-      {
-         ossimImageSource::setProperty(property);
-      }
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimMaskFilter::getProperty(
-   const ossimString& name)const
-{
-   ossimRefPtr<ossimProperty> result = 0;
-   
-   if(name == MASK_FILTER_MASK_TYPE_KW)
-   {
-      std::vector<ossimString> constraintList;
-      constraintList.push_back(ossimString("select"));
-      constraintList.push_back(ossimString("invert"));
-      constraintList.push_back(ossimString("weighted"));
-      
-      result = new ossimStringProperty(MASK_FILTER_MASK_TYPE_KW,
-                                       getMaskTypeString(),
-                                       false,
-                                       constraintList);
-   }
-   else
-   {
-      result = ossimImageSource::getProperty(name);
-   }
-   return result;
-}
-
-void ossimMaskFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageSource::getPropertyNames(propertyNames);
-   propertyNames.push_back(MASK_FILTER_MASK_TYPE_KW);
-}
-
-ossim_uint32 ossimMaskFilter::getNumberOfInputBands() const
-{
-   ossimImageSource* img_source = PTR_CAST(ossimImageSource, getInput());
-   if (img_source)
-      return img_source->getNumberOfInputBands();
-   return 0;
-}
-
diff --git a/src/ossim/imaging/ossimMaxMosaic.cpp b/src/ossim/imaging/ossimMaxMosaic.cpp
deleted file mode 100644
index c94b82f..0000000
--- a/src/ossim/imaging/ossimMaxMosaic.cpp
+++ /dev/null
@@ -1,550 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2005 SANZ Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Kenneth Melero (kmelero at sanz.com)
-//
-// Description: This combiner is designed to "float" the maximum pixel value
-//              of all inputs to top of the mosaic output. 
-//
-//*************************************************************************
-// $Id: ossimMaxMosaic.cpp 15766 2009-10-20 12:37:09Z gpotts $
-
-#include <ossim/imaging/ossimMaxMosaic.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/base/ossimTrace.h>
-
-static const ossimTrace traceDebug("ossimMaxMosaic:debug");
-
-using namespace std;
-
-RTTI_DEF1(ossimMaxMosaic, "ossimMaxMosaic", ossimImageCombiner)
-ossimMaxMosaic::ossimMaxMosaic()
-   :ossimImageCombiner(),
-    theTile(NULL)
-{
-}
-
-ossimMaxMosaic::ossimMaxMosaic(ossimConnectableObject::ConnectableObjectList& inputSources)
-    : ossimImageCombiner(inputSources),
-      theTile(NULL)
-{
-}
-
-
-ossimMaxMosaic::~ossimMaxMosaic()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimMaxMosaic::getTile(
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   long size = getNumberOfInputs();
-   ossim_uint32 layerIdx = 0;
-   // If there is only one in the mosaic then just return it.
-   if(size == 1)
-   {
-      return getNextTile(layerIdx, 0, tileRect, resLevel);
-   }
-   
-   ossimIpt origin = tileRect.ul();
-   ossim_uint32 w = tileRect.width();
-   ossim_uint32 h = tileRect.height();
-   
-   if(!theTile.valid())
-   {
-      // First time through...
-      allocate();
-
-      // If we still don't have a buffer then we will leave.
-      if(!theTile.valid())
-      {
-         return ossimRefPtr<ossimImageData>();
-      }
-   }
-   
-   ossim_uint32 tileW = theTile->getWidth();
-   ossim_uint32 tileH = theTile->getHeight();
-   if((w != tileW)||
-      (h != tileH))
-   {
-      theTile->setWidth(w);
-      theTile->setHeight(h);
-      if((w*h)!=(tileW*tileH))
-      {
-         theTile->initialize();
-      }
-   }
-   theTile->setOrigin(origin);
-
-   //---
-   // General Note:
-   //
-   // Note: I will not check for disabled or enabled since we have
-   // no clear way to handle this within a mosaic. The default will be
-   // to do a simple a A over B type mosaic.  Derived classes should
-   // check for the enabled and disabled and always
-   // use this default implementation if they are disabled.
-   //---
-   theTile->setOrigin(origin);
-   theTile->makeBlank();
-   switch(theTile->getScalarType())
-   {
-      case OSSIM_UCHAR:
-      {
-         if(!hasDifferentInputs())
-         {
-            return combine(static_cast<ossim_uint8>(0),
-                           tileRect,
-                           resLevel);
-         }
-         else
-         {
-            return combineNorm(static_cast<ossim_uint8>(0),
-                               tileRect,
-                               resLevel);
-         }
-      }
-      case OSSIM_SINT8:
-      {
-         if(!hasDifferentInputs())
-         {
-            return combine(static_cast<ossim_sint8>(0),
-                           tileRect,
-                           resLevel);
-         }
-         else
-         {
-            return combineNorm(static_cast<ossim_sint8>(0),
-                               tileRect,
-                               resLevel);
-         }
-      }
-      case OSSIM_FLOAT: 
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         if(!hasDifferentInputs())
-         {
-            return combine(static_cast<float>(0),
-                           tileRect,
-                           resLevel);
-         }
-         else
-         {
-            return combineNorm(static_cast<float>(0),
-                               tileRect,
-                               resLevel);
-         }
-      }
-      case OSSIM_USHORT16:
-      case OSSIM_USHORT11:
-      {
-         if(!hasDifferentInputs())
-         {
-            return combine(static_cast<ossim_uint16>(0),
-                           tileRect,
-                           resLevel);
-         }
-         else
-         {
-            return combineNorm(static_cast<ossim_uint16>(0),
-                               tileRect,
-                               resLevel);
-         }
-      }
-      case OSSIM_SSHORT16:
-      {
-         if(!hasDifferentInputs())
-         {
-            return combine(static_cast<ossim_sint16>(0),
-                           tileRect,
-                           resLevel);
-         }
-         else
-         {
-            return combineNorm(static_cast<ossim_sint16>(0),
-                               tileRect,
-                               resLevel);
-         }
-      }
-      case OSSIM_SINT32:
-      {
-         if(!hasDifferentInputs())
-         {
-            return combine(static_cast<ossim_sint32>(0),
-                           tileRect,
-                           resLevel);
-         }
-         else
-         {
-            return combineNorm(static_cast<ossim_sint32>(0),
-                               tileRect,
-                               resLevel);
-         }
-      }
-      case OSSIM_UINT32:
-      {
-         if(!hasDifferentInputs())
-         {
-            return combine(static_cast<ossim_uint32>(0),
-                           tileRect,
-                           resLevel);
-         }
-         else
-         {
-            return combineNorm(static_cast<ossim_uint32>(0),
-                               tileRect,
-                               resLevel);
-         }
-      }
-      case OSSIM_DOUBLE:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         if(!hasDifferentInputs())
-         {
-            return combine(static_cast<double>(0),
-                           tileRect,
-                           resLevel);
-         }
-         else
-         {
-            return combineNorm(static_cast<double>(0),
-                               tileRect,
-                               resLevel);
-         }
-      }
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "Scalar type = " << theTile->getScalarType()
-            << " Not supported by ossimMaxMosaic" << endl;
-      }
-   }
-
-   return ossimRefPtr<ossimImageData>();
-}
-
-void ossimMaxMosaic::initialize()
-{
-  ossimImageCombiner::initialize();
-  theTile = NULL;
-}
-
-void ossimMaxMosaic::allocate()
-{
-   theTile = NULL;
-   
-   if( (getNumberOfInputs() > 0) && getInput(0) )
-   {
-      theTile = ossimImageDataFactory::instance()->create(this, this);
-      theTile->initialize();
-   }
-}
-
-bool ossimMaxMosaic::saveState(ossimKeywordlist& kwl,
-                                 const char* prefix)const
-{
-   return ossimImageCombiner::saveState(kwl, prefix);
-}
-
-bool ossimMaxMosaic::loadState(const ossimKeywordlist& kwl,
-                                 const char* prefix)
-{
-   return ossimImageCombiner::loadState(kwl, prefix);
-}
-
-template <class T> ossimRefPtr<ossimImageData> ossimMaxMosaic::combineNorm(
-   T,// dummy template variable 
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   ossim_uint32 layerIdx = 0;
-   ossimRefPtr<ossimImageData> destination = theTile;
-   
-   ossimRefPtr<ossimImageData> currentImageData =
-      getNextNormTile(layerIdx, 0, tileRect, resLevel);
-      
-   if(!currentImageData)
-   {
-      return currentImageData;
-   }
-   
-   float** srcBands        = new float*[theLargestNumberOfInputBands];
-   float* srcBandsNullPix  = new float[theLargestNumberOfInputBands];
-   T** destBands = new T*[theLargestNumberOfInputBands];
-   T* destBandsNullPix = new T[theLargestNumberOfInputBands];
-   T* destBandsMinPix = new T[theLargestNumberOfInputBands];
-   T* destBandsMaxPix = new T[theLargestNumberOfInputBands];
-      
-   ossim_uint32 band;
-   ossim_uint32 upperBound = destination->getWidth()*destination->getHeight();
-   ossim_uint32 minNumberOfBands = currentImageData->getNumberOfBands();
-   for(band = 0; band < minNumberOfBands; ++band)
-   {
-      srcBands[band]  = static_cast<float*>(currentImageData->getBuf(band));
-      srcBandsNullPix[band]  = static_cast<float>(currentImageData->getNullPix(band));
-      
-      destBands[band] = static_cast<T*>(theTile->getBuf(band));
-      destBandsNullPix[band] = static_cast<T>(theTile->getNullPix(band));
-      destBandsMinPix[band] = static_cast<T>(theTile->getMinPix(band));
-      destBandsMaxPix[band] = static_cast<T>(theTile->getMaxPix(band));
-   }
-   // if the src is smaller than the destination in number
-   // of bands we will just duplicate the last band.
-   for(;band < theLargestNumberOfInputBands; ++band)
-   {
-      srcBands[band]  = static_cast<float*>(srcBands[minNumberOfBands - 1]);
-      srcBandsNullPix[band] = static_cast<float>(currentImageData->getNullPix(minNumberOfBands - 1));
-      
-      destBands[band] = static_cast<T*>(theTile->getBuf(band));
-      destBandsNullPix[band] = static_cast<T>(theTile->getNullPix(band));
-      destBandsMinPix[band] = static_cast<T>(theTile->getMinPix(band));
-      destBandsMaxPix[band] = static_cast<T>(theTile->getMaxPix(band));
-   }
-   // most of the time we will not overlap so let's
-   // copy the first tile into destination and check later.
-   //
-   ossim_uint32 tempBandIdx = 0;
-   for(band = 0; band < theTile->getNumberOfBands();++band)
-   {
-      if(band < currentImageData->getNumberOfBands())
-      {
-         theTile->copyNormalizedBufferToTile(band,
-                                             (float*)currentImageData->getBuf(band));
-         ++tempBandIdx;
-      }
-      else
-      {
-         if(tempBandIdx)
-         {
-            theTile->copyNormalizedBufferToTile(band,
-                                                (float*)currentImageData->getBuf(tempBandIdx-1));
-         }
-      }
-   }
-   destination->validate();
-   
-   currentImageData = getNextNormTile(layerIdx, tileRect, resLevel);
-
-   while(currentImageData.valid())
-   {  
-      ossim_uint32 minNumberOfBands           = currentImageData->getNumberOfBands();
-      ossimDataObjectStatus currentStatus     = currentImageData->getDataObjectStatus();
-      ossimDataObjectStatus destinationStatus = destination->getDataObjectStatus();
-      
-      if(destinationStatus == OSSIM_FULL)
-      {
-         return destination;
-      }
-      for(band = 0; band < minNumberOfBands; ++band)
-      {
-         srcBands[band]        = static_cast<float*>(currentImageData->getBuf(band));
-         srcBandsNullPix[band] = static_cast<float>(currentImageData->getNullPix(band));
-      }
-      // if the src is smaller than the destination in number
-      // of bands we will just duplicate the last band.
-      for(;band < theLargestNumberOfInputBands; ++band)
-      {
-         srcBands[band] = srcBands[minNumberOfBands - 1];
-         srcBandsNullPix[band] = static_cast<T>(currentImageData->getNullPix(minNumberOfBands - 1));
-      }
-
-      if((destinationStatus == OSSIM_EMPTY)&&
-         (currentStatus     != OSSIM_EMPTY)&&
-         (currentStatus     != OSSIM_NULL))
-      {
-         ossim_uint32 upperBound = destination->getWidth()*destination->getHeight();
-         for(band=0; band < theLargestNumberOfInputBands; ++band)
-         {
-            float delta = destBandsMaxPix[band] - destBandsMinPix[band];
-            float minP  = destBandsMinPix[band];
-            for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-            {
-               destBands[band][offset] = (T)( minP + delta*srcBands[band][offset]);
-            }
-         }
-      }
-      else if((destinationStatus == OSSIM_PARTIAL)&&
-              (currentStatus     != OSSIM_EMPTY)&&
-              (currentStatus     != OSSIM_NULL))
-      {
-         for(band = 0; band < theLargestNumberOfInputBands; ++band)
-         {
-            
-            float delta = destBandsMaxPix[band] - destBandsMinPix[band];
-            float minP  = destBandsMinPix[band];
-            for(ossim_uint32 offset = 0;
-                offset < upperBound;
-                ++offset)
-            {
-               
-               if(destBands[band][offset] == destBandsNullPix[band])
-               {
-                  destBands[band][offset] = (T)(minP + delta*srcBands[band][offset]);
-               }
-            }
-         }
-      }
-      destination->validate();
-      
-      currentImageData = getNextNormTile(layerIdx, tileRect, resLevel);
-   }
-   // Cleanup...
-   delete [] srcBands;
-   delete [] srcBandsNullPix;
-   delete [] destBands;
-   delete [] destBandsNullPix;
-   delete [] destBandsMinPix;
-   delete [] destBandsMaxPix;
-
-   return destination;
-}
-
-template <class T> ossimRefPtr<ossimImageData> ossimMaxMosaic::combine(
-   T,// dummy template variable 
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   ossim_uint32 layerIdx = 0;
-   ossimRefPtr<ossimImageData> destination = theTile;
-
-   ossimRefPtr<ossimImageData> currentImageData =
-      getNextTile(layerIdx, 0, tileRect, resLevel);
-      
-   T** srcBands         = new T*[theLargestNumberOfInputBands];
-   T*  srcBandsNullPix  = new T[theLargestNumberOfInputBands];
-   T** destBands        = new T*[theLargestNumberOfInputBands];
-   T*  destBandsNullPix = new T[theLargestNumberOfInputBands];
-      
-   ossim_uint32 band;
-   ossim_uint32 upperBound = destination->getWidth()*destination->getHeight();
-   ossim_uint32 bandIndex  = 0;
-   if(!currentImageData)
-   {
-      return currentImageData;
-   }
-   ossim_uint32 offset=0;
-   ossim_uint32 minNumberOfBands = currentImageData->getNumberOfBands();
-   for(band = 0; band < minNumberOfBands; ++band)
-   {
-      srcBands[band]  = static_cast<T*>(currentImageData->getBuf(band));
-      destBands[band] = static_cast<T*>(theTile->getBuf(band));
-      srcBandsNullPix[band]  = static_cast<T>(currentImageData->getNullPix(band));
-      destBandsNullPix[band] = static_cast<T>(theTile->getNullPix(band));
-   }
-   // if the src is smaller than the destination in number
-   // of bands we will just duplicate the last band.
-   for(;band < theLargestNumberOfInputBands; ++band)
-   {
-      srcBands[band]  = static_cast<T*>(srcBands[minNumberOfBands - 1]);
-      destBands[band] = static_cast<T*>(theTile->getBuf(band));
-      srcBandsNullPix[band] = static_cast<T>(currentImageData->getNullPix(minNumberOfBands - 1));
-      destBandsNullPix[band] = static_cast<T>(theTile->getNullPix(band));
-   }
-   // most of the time we will not overlap so let's
-   // copy the first tile into destination and check later.
-   //
-   for(band = 0; band < theTile->getNumberOfBands();++band)
-   {
-      T* destBand = destBands[band];
-      T* srcBand  = srcBands[band];
-      if(destBand&&srcBand)
-      {
-         for(offset = 0; offset < upperBound;++offset)
-         {
-	   *destBand = *srcBand;
-	   ++srcBand; ++destBand;
-         }
-      }
-   }
-   destination->setDataObjectStatus(currentImageData->getDataObjectStatus());
-
-   currentImageData = getNextTile(layerIdx,
-                                  tileRect,
-                                  resLevel);
-
-   while(currentImageData.valid())
-   {  
-      ossim_uint32 minNumberOfBands           = currentImageData->getNumberOfBands();
-      ossimDataObjectStatus currentStatus     = currentImageData->getDataObjectStatus();
-      ossimDataObjectStatus destinationStatus = destination->getDataObjectStatus();
-      
-      for(band = 0; band < minNumberOfBands; ++band)
-      {
-         srcBands[band]        = static_cast<T*>(currentImageData->getBuf(band));
-         srcBandsNullPix[band] = static_cast<T>(currentImageData->getNullPix(band));
-      }
-      // if the src is smaller than the destination in number
-      // of bands we will just duplicate the last band.
-      for(;band < theLargestNumberOfInputBands; ++band)
-      {
-         srcBands[band] = srcBands[minNumberOfBands - 1];
-         srcBandsNullPix[band] = static_cast<T>(currentImageData->getNullPix(minNumberOfBands - 1));
-      }
-
-
-      if((destinationStatus == OSSIM_PARTIAL)&&
-	 (currentStatus     != OSSIM_EMPTY)&&
-	 (currentStatus     != OSSIM_NULL))
-	{
-	  for(bandIndex = 0; bandIndex < theLargestNumberOfInputBands; ++bandIndex)
-	    {
-	      
-	      for(ossim_uint32 offset = 0;
-		  offset < upperBound;
-		  ++offset)
-		{
-		  if(srcBands[bandIndex][offset] > destBands[bandIndex][offset])
-		    {
-		      destBands[bandIndex][offset] = srcBands[bandIndex][offset];
-		    }
-		}
-	    }
-	}
-      else
-	{
-	  ossim_uint32 upperBound = destination->getWidth()*destination->getHeight();
-	  for(ossim_uint32 band=0; band < theLargestNumberOfInputBands; ++band)
-	    {
-	      for(ossim_uint32 offset = 0; offset < upperBound; ++offset)
-		{
-		  if(srcBands[band][offset] > destBands[band][offset])
-		    {
-		      destBands[band][offset] = srcBands[band][offset];
-		    }
-		}
-	    }
-	}
-      
-      destination->validate();
-      
-      currentImageData = getNextTile(layerIdx,tileRect, resLevel);
-   }
-   // Cleanup...
-   delete [] srcBands;
-   delete [] srcBandsNullPix;
-   delete [] destBands;
-   delete [] destBandsNullPix;
-   return destination;
-}
-
-ossimString ossimMaxMosaic::getShortName()const
-{
-   return ossimString("ossimMaxMosaic");
-}
-
-ossimString ossimMaxMosaic::getLongName()const
-{
-   return ossimString("Max Mosaic");
-}
-
-ossimString ossimMaxMosaic::getDescription()const
-{
-   return ossimString("Combiner which puts maximum dn value on image.");
-}
diff --git a/src/ossim/imaging/ossimMeanMedianFilter.cpp b/src/ossim/imaging/ossimMeanMedianFilter.cpp
deleted file mode 100644
index f1ced89..0000000
--- a/src/ossim/imaging/ossimMeanMedianFilter.cpp
+++ /dev/null
@@ -1,930 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimMeanMedianFilter.cpp 21631 2012-09-06 18:10:55Z dburken $
-
-#include <ossim/imaging/ossimMeanMedianFilter.h>
-#include <ossim/base/ossimNumericProperty.h>
-#include <ossim/base/ossimBooleanProperty.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <vector>
-#include <algorithm>
-#include <numeric>
-using namespace std;
-
-
-RTTI_DEF1(ossimMeanMedianFilter,
-          "ossimMeanMedianFilter",
-          ossimImageSourceFilter);
-
-// Keywords used throughout.
-static const ossimString WINDOW_SIZE_KW = "window_size";
-static const ossimString FILTER_TYPE_KW = "filter_type";
-static const ossimString AUTO_GROW_KW   = "auto_grow_rectangle_flag";
-
-ossimMeanMedianFilter::ossimMeanMedianFilter(ossimObject* owner)
-   :ossimImageSourceFilter(owner),
-    theTile(0),
-    theFilterType(OSSIM_MEDIAN),
-    theWindowSize(3),
-    theEnableFillNullFlag(false),
-    theAutoGrowRectFlag(false)
-{
-   setDescription(ossimString("Mean Median Filter"));
-}
-
-ossimMeanMedianFilter::~ossimMeanMedianFilter()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimMeanMedianFilter::getTile(
-   const ossimIrect& rect, ossim_uint32 resLevel)
-{
-   if(!isSourceEnabled())
-   {
-      return ossimImageSourceFilter::getTile(rect, resLevel);
-   }
-
-   ossim_uint32 halfSize = getWindowSize()>>1;
-
-   ossimIrect requestRect(rect.ul().x - halfSize,
-                          rect.ul().y - halfSize,
-                          rect.lr().x + halfSize,
-                          rect.lr().y + halfSize);
-
-   ossimRefPtr<ossimImageData> inputData =
-      ossimImageSourceFilter::getTile(requestRect, resLevel);
-   if(!inputData.valid() || !inputData->getBuf())
-   {
-      return inputData;
-   }
-
-   if(!theTile.valid())
-   {
-      theTile = (ossimImageData*)inputData->dup();
-      theTile->setImageRectangle(rect);
-   }
-   else
-   {
-      theTile->setImageRectangleAndBands(rect, inputData->getNumberOfBands());
-   }
-
-   applyFilter(inputData);
-
-   theTile->setDataObjectStatus(inputData->getDataObjectStatus());
-   if(theEnableFillNullFlag)
-   {
-      theTile->validate();
-   }
-
-   return theTile;
-}
-
-void ossimMeanMedianFilter::setWindowSize(ossim_uint32 windowSize)
-{
-   theWindowSize = windowSize;
-}
-
-ossim_uint32 ossimMeanMedianFilter::getWindowSize()const
-{
-   return theWindowSize;
-}
-
-void ossimMeanMedianFilter::initialize()
-{
-   ossimImageSourceFilter::initialize();
-
-   theTile = NULL;
-}
-
-void ossimMeanMedianFilter::applyFilter(ossimRefPtr<ossimImageData>& input)
-{
-   switch(input->getScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         switch (theFilterType)
-         {
-            case OSSIM_MEDIAN:
-            case OSSIM_MEDIAN_FILL_NULLS:
-               applyMedian(ossim_uint8(0), input);
-               break;
-               
-            case OSSIM_MEDIAN_NULL_CENTER_ONLY:
-               applyMedianNullCenterOnly(ossim_uint8(0), input);
-               break;
-               
-            case OSSIM_MEAN:
-            case OSSIM_MEAN_FILL_NULLS:
-               applyMean(ossim_uint8(0), input);
-               break;
-
-            case OSSIM_MEAN_NULL_CENTER_ONLY:
-               applyMeanNullCenterOnly(ossim_uint8(0), input);
-               
-            default:
-               break;
-         }
-         break;
-      }
-      case OSSIM_USHORT11:
-      case OSSIM_UINT16:
-      {
-         switch (theFilterType)
-         {
-            case OSSIM_MEDIAN:
-            case OSSIM_MEDIAN_FILL_NULLS:
-               applyMedian(ossim_uint16(0), input);
-               break;
-               
-            case OSSIM_MEDIAN_NULL_CENTER_ONLY:
-               applyMedianNullCenterOnly(ossim_uint16(0), input);
-               break;
-               
-            case OSSIM_MEAN:
-            case OSSIM_MEAN_FILL_NULLS:
-               applyMean(ossim_uint16(0), input);
-               break;
-
-            case OSSIM_MEAN_NULL_CENTER_ONLY:
-               applyMeanNullCenterOnly(ossim_uint16(0), input);
-               break;
-               
-            default:
-               break;
-         }
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         switch (theFilterType)
-         {
-            case OSSIM_MEDIAN:
-            case OSSIM_MEDIAN_FILL_NULLS:
-               applyMedian(ossim_sint16(0), input);
-               break;
-               
-            case OSSIM_MEDIAN_NULL_CENTER_ONLY:
-               applyMedianNullCenterOnly(ossim_sint16(0), input);
-               break;
-               
-            case OSSIM_MEAN:
-            case OSSIM_MEAN_FILL_NULLS:
-               applyMean(ossim_sint16(0), input);
-               break;
-
-            case OSSIM_MEAN_NULL_CENTER_ONLY:
-               applyMeanNullCenterOnly(ossim_sint16(0), input);
-               break;
-               
-            default:
-               break;
-         }
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         switch (theFilterType)
-         {
-            case OSSIM_MEDIAN:
-            case OSSIM_MEDIAN_FILL_NULLS:
-               applyMedian(ossim_uint32(0), input);
-               break;
-               
-            case OSSIM_MEDIAN_NULL_CENTER_ONLY:
-               applyMedianNullCenterOnly(ossim_uint32(0), input);
-               break;
-               
-            case OSSIM_MEAN:
-            case OSSIM_MEAN_FILL_NULLS:
-               applyMean(ossim_uint32(0), input);
-               break;
-
-            case OSSIM_MEAN_NULL_CENTER_ONLY:
-               applyMeanNullCenterOnly(ossim_uint32(0), input);
-               break;
-               
-            default:
-               break;
-         }
-      }
-      case OSSIM_FLOAT32:
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         switch (theFilterType)
-         {
-            case OSSIM_MEDIAN:
-            case OSSIM_MEDIAN_FILL_NULLS:
-               applyMedian(ossim_float32(0.0), input);
-               break;
-               
-            case OSSIM_MEDIAN_NULL_CENTER_ONLY:
-               applyMedianNullCenterOnly(ossim_float32(0.0), input);
-               break;
-               
-            case OSSIM_MEAN:
-            case OSSIM_MEAN_FILL_NULLS:
-               applyMean(ossim_float32(0.0), input);
-               break;
-
-            case OSSIM_MEAN_NULL_CENTER_ONLY:
-               applyMeanNullCenterOnly(ossim_float32(0.0), input);
-               break;
-               
-            default:
-               break;
-         }
-         break;
-      }
-      case OSSIM_FLOAT64:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         switch (theFilterType)
-         {
-            case OSSIM_MEDIAN:
-            case OSSIM_MEDIAN_FILL_NULLS:
-               applyMedian(ossim_float64(0.0), input);
-               break;
-               
-            case OSSIM_MEDIAN_NULL_CENTER_ONLY:
-               applyMedianNullCenterOnly(ossim_float64(0.0), input);
-               break;
-               
-            case OSSIM_MEAN:
-            case OSSIM_MEAN_FILL_NULLS:
-               applyMean(ossim_float64(0.0), input);
-               break;
-
-            case OSSIM_MEAN_NULL_CENTER_ONLY:
-               applyMeanNullCenterOnly(ossim_float64(0.0), input);
-               break;
-               
-            default:
-               break;
-         }
-         break;
-      }
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimMeanMedianFilter::applyFilter WARNING:\n"
-            << "Unhandled scalar type!" << endl;
-      }
-   }
-}
-
-template <class T>
-void ossimMeanMedianFilter::applyMean(T /* dummyVariable */,
-                                      ossimRefPtr<ossimImageData>& inputData)
-{
-   ossim_uint32 halfWindow = (theWindowSize >> 1);
-   ossim_uint32 bandIdx = 0;
-   ossim_uint32 x = 0;
-   ossim_uint32 y = 0;
-   ossim_uint32 kernelX   = 0;
-   ossim_uint32 kernelY   = 0;
-   ossim_uint32 kernelIdx = 0;
-   ossim_uint32 iw  = inputData->getWidth();
-   ossim_uint32 ow  = theTile->getWidth();
-   ossim_uint32 oh = theTile->getHeight();
-   ossim_uint32 numberOfBands = ossim::min(theTile->getNumberOfBands(),
-                                         inputData->getNumberOfBands());
-   ossimDataObjectStatus status = inputData->getDataObjectStatus();
-   std::vector<double> values(theWindowSize*theWindowSize);
-
-   if(status == OSSIM_FULL)
-   {
-      for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
-      {
-         T* inputBuf     = (T*)inputData->getBuf(bandIdx);
-         T* outputBuf    = (T*)theTile->getBuf(bandIdx);
-
-         if(inputBuf&&outputBuf)
-         {
-            for(y = 0; y < oh; ++y)
-            {
-               for(x = 0; x < ow; ++x)
-               {
-                  kernelIdx = 0;
-                  for(kernelY = 0; kernelY < theWindowSize; ++kernelY)
-                  {
-                     for(kernelX = 0; kernelX < theWindowSize;++kernelX)
-                     {
-                        values[kernelIdx] = *(inputBuf+kernelX + kernelY*iw);
-                        ++kernelIdx;
-                     }
-                  }
-
-
-                  if(values.size() > 0)
-                  {
-                     double sum = std::accumulate(values.begin(),
-                                                  values.end(),
-                                                  0.0);
-                     double average = sum/(double)values.size();
-                     (*outputBuf) = (T)average;
-                  }
-                  ++inputBuf;
-                  ++outputBuf;
-               }
-
-               inputBuf+=(halfWindow<<1);
-            }
-         }
-      }
-   }
-   else
-   {
-      for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
-      {
-         T* inputBuf     = (T*)inputData->getBuf(bandIdx);
-         T* outputBuf    = (T*)theTile->getBuf(bandIdx);
-         T np            = (T)inputData->getNullPix(bandIdx);
-         if(inputBuf&&outputBuf)
-         {
-            for(y = 0; y < oh; ++y)
-            {
-               for(x = 0; x < ow; ++x)
-               {
-                  values.clear();
-                  for(kernelY = 0; kernelY < theWindowSize; ++kernelY)
-                  {
-                     for(kernelX = 0; kernelX < theWindowSize;++kernelX)
-                     {
-                        T tempValue = *(inputBuf+kernelX + kernelY*iw);
-
-                        if(tempValue != np)
-                        {
-                           values.push_back((double)tempValue);
-                        }
-                     }
-                  }
-
-
-                  if(values.size() > 0)
-                  {
-                     double accumulate = std::accumulate(values.begin(),
-                                                         values.end(),
-                                                         0.0);
-                     double average = accumulate/(double)values.size();
-                     if(*(inputBuf+halfWindow + halfWindow*iw) == np)
-                     {
-                        if(theEnableFillNullFlag)
-                        {
-                           (*outputBuf) = (T)average;
-                        }
-                        else
-                        {
-                           (*outputBuf) = np;
-                        }
-                     }
-                     else
-                     {
-                        (*outputBuf) = (T)average;
-                     }
-                  }
-                  else
-                  {
-                     *outputBuf = np;
-                  }
-                  ++inputBuf;
-                  ++outputBuf;
-               }
-
-               inputBuf+=(halfWindow<<1);
-            }
-         }
-      }
-   }
-}
-
-template <class T> void ossimMeanMedianFilter::applyMeanNullCenterOnly(
-   T /* dummyVariable */,
-   ossimRefPtr<ossimImageData>& inputData)
-{
-   ossim_uint32 halfWindow = (theWindowSize >> 1);
-   ossim_uint32 bandIdx = 0;
-   ossim_uint32 x = 0;
-   ossim_uint32 y = 0;
-   ossim_uint32 kernelX   = 0;
-   ossim_uint32 kernelY   = 0;
-   ossim_uint32 iw  = inputData->getWidth();
-   ossim_uint32 ow  = theTile->getWidth();
-   ossim_uint32 oh = theTile->getHeight();
-   ossim_uint32 numberOfBands = ossim::min(theTile->getNumberOfBands(),
-                                         inputData->getNumberOfBands());
-   ossimDataObjectStatus status = inputData->getDataObjectStatus();
-   std::vector<double> values;
-
-   if(status == OSSIM_FULL)
-   {
-      // Nothing to do just copy the tile.
-      theTile->loadTile(inputData.get());
-   }
-   else
-   {
-      // Partial tile with nulls in it.
-      for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
-      {
-         T* inputBuf     = (T*)inputData->getBuf(bandIdx);
-         T* outputBuf    = (T*)theTile->getBuf(bandIdx);
-         if (!inputBuf || !outputBuf)
-         {
-            return; // Shouldn't happen...
-         }
-         
-         const T NP = (T)inputData->getNullPix(bandIdx);
-
-         for(y = 0; y < oh; ++y)
-         {
-            for(x = 0; x < ow; ++x)
-            {
-               // Get the center input pixel.
-               const T CP = *(inputBuf+halfWindow + halfWindow*iw);
-               if (CP == NP)
-               {
-                  values.clear();
-                  for(kernelY = 0; kernelY < theWindowSize; ++kernelY)
-                  {
-                     for(kernelX = 0; kernelX < theWindowSize;++kernelX)
-                     {
-                        T tempValue = *(inputBuf+kernelX + kernelY*iw);
-                        
-                        if(tempValue != NP)
-                        {
-                           values.push_back((double)tempValue);
-                        }
-                     }
-                  }
-                  
-                  if(values.size() > 0)
-                  {
-                     double accumulate = std::accumulate(values.begin(),
-                                                         values.end(),
-                                                         0.0);
-                     double average = accumulate/(double)values.size();
-                     (*outputBuf) = (T)average;
-                  }
-                  else
-                  {
-                     (*outputBuf) = NP;
-                  }
-                  
-               }
-               else // Center pixel (CP) not null.
-               {
-                  (*outputBuf) = CP;
-               }
-               
-               // Move over...
-               ++inputBuf;
-               ++outputBuf;
-               
-            } // End of loop in x direction.
-
-            // Move down...
-            inputBuf+=(halfWindow<<1);
-            
-         }  // End of loop in y direction.
-         
-      }  // End of band loop.
-      
-   }  // End of else "partial tile" block.
-}
-
-template <class T>
-void ossimMeanMedianFilter::applyMedian(T /* dummyVariable */,
-                                        ossimRefPtr<ossimImageData>& inputData)
-{
-   ossim_uint32 halfWindow = (theWindowSize >> 1);
-   ossim_uint32 bandIdx = 0;
-   ossim_uint32 x = 0;
-   ossim_uint32 y = 0;
-   ossim_uint32 kernelX   = 0;
-   ossim_uint32 kernelY   = 0;
-   ossim_uint32 kernelIdx = 0;
-   ossim_uint32 iw  = inputData->getWidth();
-   ossim_uint32 ow  = theTile->getWidth();
-   ossim_uint32 oh = theTile->getHeight();
-   ossim_uint32 numberOfBands = ossim::min(theTile->getNumberOfBands(),
-                                         inputData->getNumberOfBands());
-   ossimDataObjectStatus status = inputData->getDataObjectStatus();
-   std::vector<T> values(theWindowSize*theWindowSize);
-
-   if(status == OSSIM_FULL)
-   {
-      for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
-      {
-         T* inputBuf     = (T*)inputData->getBuf(bandIdx);
-         T* outputBuf    = (T*)theTile->getBuf(bandIdx);
-
-         if(inputBuf&&outputBuf)
-         {
-            for(y = 0; y < oh; ++y)
-            {
-               for(x = 0; x < ow; ++x)
-               {
-                  kernelIdx = 0;
-                  for(kernelY = 0; kernelY < theWindowSize; ++kernelY)
-                  {
-                     for(kernelX = 0; kernelX < theWindowSize;++kernelX)
-                     {
-                        values[kernelIdx] = *(inputBuf+kernelX + kernelY*iw);
-                        ++kernelIdx;
-                     }
-                  }
-
-                  std::sort(values.begin(),
-                            values.end());
-
-                  if(values.size() > 0)
-                  {
-                     (*outputBuf) = values[values.size()>>1];
-                  }
-                  ++inputBuf;
-                  ++outputBuf;
-               }
-
-               inputBuf+=(halfWindow<<1);
-            }
-         }
-      }
-   }
-   else
-   {
-      for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
-      {
-         T* inputBuf     = (T*)inputData->getBuf(bandIdx);
-         T* outputBuf    = (T*)theTile->getBuf(bandIdx);
-         T np            = (T)inputData->getNullPix(bandIdx);
-         if(inputBuf&&outputBuf)
-         {
-            for(y = 0; y < oh; ++y)
-            {
-               for(x = 0; x < ow; ++x)
-               {
-                  values.clear();
-                  for(kernelY = 0; kernelY < theWindowSize; ++kernelY)
-                  {
-                     for(kernelX = 0; kernelX < theWindowSize;++kernelX)
-                     {
-                        T tempValue = *(inputBuf+kernelX + kernelY*iw);
-
-                        if(tempValue != np)
-                        {
-                           values.push_back(tempValue);
-                        }
-                     }
-                  }
-
-                  std::sort(values.begin(),
-                            values.end());
-
-                  if(values.size() > 0)
-                  {
-                     if(*(inputBuf+halfWindow + halfWindow*iw) == np)
-                     {
-                        if(theEnableFillNullFlag)
-                        {
-                           (*outputBuf) = values[values.size()>>1];
-                        }
-                        else
-                        {
-                           (*outputBuf) = np;
-                        }
-                     }
-                     else
-                     {
-                        (*outputBuf) = values[values.size()>>1];
-                     }
-                  }
-                  else
-                  {
-                     *outputBuf = np;
-                  }
-                  ++inputBuf;
-                  ++outputBuf;
-               }
-
-               inputBuf+=(halfWindow<<1);
-            }
-         }
-      }
-   }
-}
-
-template <class T> void ossimMeanMedianFilter::applyMedianNullCenterOnly (
-   T /* dummyVariable */,
-   ossimRefPtr<ossimImageData>& inputData)
-{
-   ossim_uint32 halfWindow = (theWindowSize >> 1);
-   ossim_uint32 bandIdx = 0;
-   ossim_uint32 x = 0;
-   ossim_uint32 y = 0;
-   ossim_uint32 kernelX   = 0;
-   ossim_uint32 kernelY   = 0;
-   ossim_uint32 iw  = inputData->getWidth();
-   ossim_uint32 ow  = theTile->getWidth();
-   ossim_uint32 oh = theTile->getHeight();
-   ossim_uint32 numberOfBands = ossim::min(theTile->getNumberOfBands(),
-                                         inputData->getNumberOfBands());
-   ossimDataObjectStatus status = inputData->getDataObjectStatus();
-   std::vector<T> values;
-
-   if(status == OSSIM_FULL)
-   {
-      // Nothing to do just copy the tile.
-      theTile->loadTile(inputData.get());
-   }
-   else
-   {
-       // Partial tile with nulls in it.
-      for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
-      {
-         T* inputBuf     = (T*)inputData->getBuf(bandIdx);
-         T* outputBuf    = (T*)theTile->getBuf(bandIdx);
-         if (!inputBuf || !outputBuf)
-         {
-            return; // Shouldn't happen...
-         }
-         
-         const T NP = (T)inputData->getNullPix(bandIdx);
-
-         for(y = 0; y < oh; ++y)
-         {
-            for(x = 0; x < ow; ++x)
-            {
-               // Get the center input pixel.
-               const T CP = *(inputBuf+halfWindow + halfWindow*iw);
-               if (CP == NP)
-               {
-                  values.clear();
-                  for(kernelY = 0; kernelY < theWindowSize; ++kernelY)
-                  {
-                     for(kernelX = 0; kernelX < theWindowSize;++kernelX)
-                     {
-                        T tempValue = *(inputBuf+kernelX + kernelY*iw);
-                        
-                        if(tempValue != NP)
-                        {
-                           values.push_back(tempValue);
-                        }
-                     }
-                  }
-
-                  std::sort(values.begin(),
-                            values.end());
-                  
-                  if(values.size() > 0)
-                  {
-                     (*outputBuf) = values[values.size()>>1];
-                  }
-                  else
-                  {
-                     (*outputBuf) = NP;
-                  }
-               }
-               else // Center pixel (CP) not null.
-               {
-                  (*outputBuf) = CP;
-               }
-
-               // Move over...
-               ++inputBuf;
-               ++outputBuf;
-               
-            }  // End of loop in x direction.
-
-            // Move down...
-            inputBuf+=(halfWindow<<1);
-            
-         }  // End of loop in y direction.
-         
-      }  // End of band loop.
-      
-   }  // End of else "partial tile" block.
-}
-
-void ossimMeanMedianFilter::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property.valid())
-   {
-      return;
-   }
-
-   ossimString name = property->getName();
-
-   if (name == WINDOW_SIZE_KW)
-   {
-      theWindowSize = property->valueToString().toUInt32();
-   }
-   else if (name == FILTER_TYPE_KW)
-   {
-      ossimString value = property->valueToString();
-      setFilterType(value);
-   }
-   else if (name == AUTO_GROW_KW)
-   {
-      ossimString value;
-      property->valueToString(value);
-      setAutoGrowRectFlag(value.toBool());
-   }
-   else
-   {
-      ossimImageSourceFilter::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimMeanMedianFilter::getProperty(const ossimString& name)const
-{
-   if (name == WINDOW_SIZE_KW)
-   {
-      ossimProperty* prop =
-         new ossimNumericProperty(WINDOW_SIZE_KW,
-                                  ossimString::toString(theWindowSize),
-                                  3,
-                                  25);
-      prop->setCacheRefreshBit();
-
-      return prop;
-   }
-   else if (name == FILTER_TYPE_KW)
-   {
-      std::vector<ossimString> constraintList;
-      getFilterTypeList(constraintList);
-      ossimString value = getFilterTypeString();
-      ossimProperty* prop = new ossimStringProperty(FILTER_TYPE_KW,
-                                                    value,
-                                                    false,
-                                                    constraintList);
-      prop->setCacheRefreshBit();
-      
-      return prop;
-   }
-   else if (name == AUTO_GROW_KW)
-   {
-      ossimRefPtr<ossimProperty> p = new ossimBooleanProperty(
-         AUTO_GROW_KW, getAutoGrowRectFlag());
-      p->setFullRefreshBit();
-      return p;
-   }
-   return ossimImageSourceFilter::getProperty(name);
-}
-
-void ossimMeanMedianFilter::getPropertyNames(
-   std::vector<ossimString>& propertyNames)const
-{
-   propertyNames.push_back(WINDOW_SIZE_KW);
-   propertyNames.push_back(FILTER_TYPE_KW);
-   propertyNames.push_back(AUTO_GROW_KW);
-
-   ossimImageSourceFilter::getPropertyNames(propertyNames);
-}
-
-bool ossimMeanMedianFilter::saveState(ossimKeywordlist& kwl,
-                                      const char* prefix)const
-{
-   kwl.add(prefix,
-           WINDOW_SIZE_KW.c_str(),
-           theWindowSize,
-           true);
-   kwl.add(prefix,
-           FILTER_TYPE_KW.c_str(),
-           getFilterTypeString(),
-           true);
-   kwl.add(prefix,
-           AUTO_GROW_KW.c_str(),
-           (theAutoGrowRectFlag?"true":"false"),
-           true);   
-
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
-
-bool ossimMeanMedianFilter::loadState(const ossimKeywordlist& kwl,
-                                      const char* prefix)
-{
-   const char* lookup = NULL;
-   
-   lookup = kwl.find(prefix, WINDOW_SIZE_KW.c_str());
-   if(lookup)
-   {
-      theWindowSize = ossimString(lookup).toUInt32();
-   }
-   
-   lookup = kwl.find(prefix, FILTER_TYPE_KW.c_str());
-   if(lookup)
-   {
-      ossimString type = lookup;
-      setFilterType(type);
-   }
-
-   lookup = kwl.find(prefix, AUTO_GROW_KW.c_str());
-   if(lookup)
-   {
-      ossimString flag = lookup;
-      setAutoGrowRectFlag(flag.toBool());
-   }
-
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
-void ossimMeanMedianFilter::setFilterType(ossimMeanMedianFilterType type)
-{
-   theFilterType = type;
-}
-
-void ossimMeanMedianFilter::setFilterType(const ossimString& type)
-{
-   ossimString s = type;
-   s.downcase();
-
-   std::vector<ossimString> list;
-   getFilterTypeList(list);
-   
-   for (ossim_uint32 i = 0; i < list.size(); ++i)
-   {
-      if (s == list[i])
-      {
-         theFilterType = static_cast<ossimMeanMedianFilterType>(i);
-      }
-   }
-
-   if ( (theFilterType == OSSIM_MEDIAN_FILL_NULLS) ||
-        (theFilterType == OSSIM_MEAN_FILL_NULLS) )
-   {
-      theEnableFillNullFlag = true;
-   }
-   else
-   {
-      theEnableFillNullFlag = false;
-   }
-}
-
-void ossimMeanMedianFilter::setAutoGrowRectFlag(bool flag)
-{
-   theAutoGrowRectFlag = flag;
-}
-
-bool ossimMeanMedianFilter::getAutoGrowRectFlag() const
-{
-   return theAutoGrowRectFlag;
-}
-
-ossimString ossimMeanMedianFilter::getFilterTypeString() const
-{
-   std::vector<ossimString> list;
-   getFilterTypeList(list);
-   return list[theFilterType];
-}
-
-void ossimMeanMedianFilter::getFilterTypeList(
-   std::vector<ossimString>& list) const
-{
-   list.resize(OSSIM_MEAN_NULL_CENTER_ONLY+1);
-
-   list[0] = ossimString("median");
-   list[1] = ossimString("median_fill_nulls");
-   list[2] = ossimString("median_null_center_only");
-   list[3] = ossimString("mean");
-   list[4] = ossimString("mean_fill_nulls");
-   list[5] = ossimString("mean_null_center_only");
-}
-
-ossimIrect ossimMeanMedianFilter::getBoundingRect(ossim_uint32 resLevel)const
-{
-   // Get the input rectangle.
-   ossimIrect rect = ossimImageSourceFilter::getBoundingRect(resLevel);
-   if (!theAutoGrowRectFlag || rect.hasNans())
-   {
-      return rect; // Not in autogrow mode or no input connection yet...
-   }
-
-   if ( (theFilterType == OSSIM_MEDIAN_FILL_NULLS)       ||
-        (theFilterType == OSSIM_MEDIAN_NULL_CENTER_ONLY) ||
-        (theFilterType == OSSIM_MEAN_FILL_NULLS)         ||
-        (theFilterType == OSSIM_MEAN_NULL_CENTER_ONLY) )
-   {
-      ossimIpt pt = rect.ul();
-      const ossim_int32 HW = (theWindowSize >> 1); // half window size.
-
-      // Adjust the upper left.
-      pt.x = pt.x-HW;
-      pt.y = pt.y-HW;
-      rect.set_ul(pt);
-
-      // Adjust the lower right.
-      pt = rect.lr();
-      pt.x = pt.x+HW;
-      pt.y = pt.y+HW;
-      rect.set_lr(pt);
-   }
-
-   return rect;
-}
diff --git a/src/ossim/imaging/ossimMemoryImageSource.cpp b/src/ossim/imaging/ossimMemoryImageSource.cpp
deleted file mode 100644
index 7ca4de8..0000000
--- a/src/ossim/imaging/ossimMemoryImageSource.cpp
+++ /dev/null
@@ -1,245 +0,0 @@
-//*******************************************************************. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-//
-#include <ossim/imaging/ossimMemoryImageSource.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-RTTI_DEF1(ossimMemoryImageSource, "ossimMemoryImageSource", ossimImageSource);
-
-ossimMemoryImageSource::ossimMemoryImageSource()
-   :ossimImageSource(0, 0, 1, true, false)
-{
-   m_boundingRect.makeNan();
-}
-
-void ossimMemoryImageSource::setImage(ossimRefPtr<ossimImageData> image)
-{
-   m_image = image.get();
-	if(m_image.valid())
-	{
-		m_boundingRect = m_image->getImageRectangle();
-	}
-	else
-	{
-		m_boundingRect.makeNan();
-	}
-   m_result = 0;
-}
-
-void ossimMemoryImageSource::setImage(ossimScalarType scalarType,
-                                      ossim_uint32 numberOfBands,
-                                      ossim_uint32 width,
-                                      ossim_uint32 height)
-{
-   m_image = new ossimImageData(0,
-                                 scalarType,
-                                 numberOfBands,
-                                 width,
-                                 height);
-   m_image->initialize();
-   
-   m_boundingRect = m_image->getImageRectangle();
-   m_result = 0;
-}
-
-void ossimMemoryImageSource::setRect(ossim_uint32 ulx,
-                                     ossim_uint32 uly,
-                                     ossim_uint32 width,
-                                     ossim_uint32 height)
-{
-   if(m_image.valid())
-   {
-      m_image->setImageRectangle(ossimIrect(ulx, uly,
-                                             ulx + (width-1),
-                                             uly + (height-1)));
-      m_boundingRect = m_image->getImageRectangle();
-   }
-}
-
-ossim_uint32 ossimMemoryImageSource::getNumberOfInputBands() const
-{
-   if(m_image.valid())
-   {
-      return m_image->getNumberOfBands();
-   }
-   return 0;;
-}
-
-ossim_uint32 ossimMemoryImageSource::getNumberOfOutputBands() const
-{
-   return getNumberOfInputBands();
-}
-
-ossimScalarType ossimMemoryImageSource::getOutputScalarType() const
-{
-   if(m_image.valid())
-   {
-      return m_image->getScalarType();
-   }
-   
-   return ossimImageSource::getOutputScalarType();
-}
-
-double ossimMemoryImageSource::getNullPixelValue(ossim_uint32 band)const
-{
-   if(m_image.valid())
-   {
-      if(band < getNumberOfInputBands())
-      {
-         return m_image->getNullPix(band);
-      }
-   }
-   return ossimImageSource::getNullPixelValue(band);
-}
-
-double ossimMemoryImageSource::getMinPixelValue(ossim_uint32 band)const
-{
-   if(m_image.valid())
-   {
-      if(band < getNumberOfInputBands())
-      {
-         return m_image->getMinPix(band);
-      }
-   }
-   return ossimImageSource::getMinPixelValue(band);
-}
-
-double ossimMemoryImageSource::getMaxPixelValue(ossim_uint32 band)const
-{
-   if(m_image.valid())
-   {
-      if(band < getNumberOfInputBands())
-      {
-         return m_image->getMaxPix(band);
-      }
-   }
-   return ossimImageSource::getMaxPixelValue(band);
-}
-
-ossimIrect ossimMemoryImageSource::getBoundingRect(ossim_uint32 resLevel)const
-{
-   if(resLevel == 0)
-   {
-      if(m_image.valid())
-      {
-         return m_boundingRect;
-      }
-   }
-
-   return ossimImageSource::getBoundingRect(resLevel);
-}
-
-ossimRefPtr<ossimImageData> ossimMemoryImageSource::getTile(const ossimIrect& rect,
-                                                            ossim_uint32 /* resLevel */)
-{
-   if(!isSourceEnabled()||!m_image.valid()||m_boundingRect.hasNans()) return 0;
-   if(!m_result.valid())
-   {
-      m_result = new ossimImageData(0, getOutputScalarType(), getNumberOfOutputBands(), rect.width(), rect.height());
-      m_result->initialize();       
-   }
-
-   m_result->setImageRectangle(rect);
-   m_result->makeBlank();
-   ossimIrect clampRect = m_image->getImageRectangle().clipToRect(rect);
-	
-   m_result->loadTile(m_image->getBuf(),
-	                    m_boundingRect,
-	                    OSSIM_BSQ);
-
-	m_result->validate();
-   return m_result;
-}
-
-
-bool ossimMemoryImageSource::canConnectMyInputTo(ossim_int32 /* myInputIndex */,
-                                                 const ossimConnectableObject* /* object */)const
-{
-   return false;
-}
-   
-void ossimMemoryImageSource::initialize()
-{
-   m_result = 0;
-}
-
-ossim_uint32 ossimMemoryImageSource::getNumberOfDecimationLevels() const
-{
-   return 1;
-}
-
-void ossimMemoryImageSource::getDecimationFactor(ossim_uint32 resLevel,
-                                                 ossimDpt& result) const
-{
-   if (resLevel == 0)
-   {
-      result.x = 1.0;
-      result.y = 1.0;
-   }
-   else
-   {
-      result.x = 1.0 / (1<<resLevel);
-      result.y = result.x;
-   }
-}
-
-void ossimMemoryImageSource::getDecimationFactors(std::vector<ossimDpt>& decimations)const
-{
-   decimations.push_back(ossimDpt(1.0,1.0));
-}
-
-
-bool ossimMemoryImageSource::saveState(ossimKeywordlist& kwl, const char* prefix)const
-{
-   
-   ossimString imagePrefix = ossimString(prefix) + "image.";
-   ossimString geomPrefix = ossimString(prefix) + "geom.";
-   if(m_image.valid())
-   {
-      m_image->saveState(kwl, imagePrefix);
-   }
-   if(m_geometry.valid())
-   {
-      m_geometry->saveState(kwl, geomPrefix);
-   }
-   return ossimImageSource::saveState(kwl, prefix);
-}
-
-bool ossimMemoryImageSource::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   bool returnResult =  ossimImageSource::loadState(kwl, prefix);
-   m_geometry = 0;
-   if(returnResult)
-   {
-      ossimString imagePrefix = ossimString(prefix) + "image.";
-      ossimString geomPrefix = ossimString(prefix) + "geom.";
-      
-      ossimString type = kwl.find(imagePrefix, "type");
-      if(!type.empty())
-      {
-         m_image = new ossimImageData();
-         returnResult = m_image->loadState(kwl, imagePrefix.c_str());
-         m_image->initialize();
-         m_boundingRect = m_image->getImageRectangle();
-      }
-      
-      if(returnResult)
-      {
-         type = kwl.find(geomPrefix, "type");
-         if(!type.empty())
-         {
-            m_geometry = new ossimImageGeometry();
-            returnResult = m_geometry->loadState(kwl, geomPrefix.c_str());
-         }
-      }
-   }
-   m_result = 0;
-   return returnResult;
-}
diff --git a/src/ossim/imaging/ossimMetadataFileWriter.cpp b/src/ossim/imaging/ossimMetadataFileWriter.cpp
deleted file mode 100644
index 6368020..0000000
--- a/src/ossim/imaging/ossimMetadataFileWriter.cpp
+++ /dev/null
@@ -1,277 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2003 Stroage Area Networks, Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Kenneth Melero (kmelero at sanz.com)
-//
-//*******************************************************************
-//  $Id: ossimMetadataFileWriter.cpp 17195 2010-04-23 17:32:18Z dburken $
-
-#include <ossim/imaging/ossimMetadataFileWriter.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimViewController.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimErrorContext.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/base/ossimFilenameProperty.h>
-
-RTTI_DEF3(ossimMetadataFileWriter,
-          "ossimMetadataFileWriter",
-          ossimConnectableObject,
-          ossimProcessInterface,
-          ossimConnectableObjectListener);
-
-static ossimTrace traceDebug("ossimMetadataFileWriter:degug");
-
-ossimMetadataFileWriter::ossimMetadataFileWriter()
-   :ossimConnectableObject(0),
-      ossimProcessInterface(),
-      ossimConnectableObjectListener(),
-      theInputConnection(NULL),
-      theFilename(),
-      thePixelType(OSSIM_PIXEL_IS_POINT),
-      theAreaOfInterest()
-{
-   addListener((ossimConnectableObjectListener*)this);
-   theAreaOfInterest.makeNan();
-}
-
-ossimMetadataFileWriter::~ossimMetadataFileWriter()
-{
-   removeListener((ossimConnectableObjectListener*)this);
-}
-
-void ossimMetadataFileWriter::initialize()
-{
-   theInputConnection = dynamic_cast<ossimImageSource*> (getInput(0));
-}
-
-bool ossimMetadataFileWriter::loadState(const ossimKeywordlist& kwl,
-                                     const char* prefix)
-{
-   bool result = ossimConnectableObject::loadState(kwl, prefix);
-
-   // Get the filename...
-   const char* lookup = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
-   if(lookup)
-   {
-      ossimString filename = lookup;
-
-      setFilename(filename);
-   }
-
-   // Note: Defaulted to point in constructor.
-   lookup = kwl.find(prefix, ossimKeywordNames::PIXEL_TYPE_KW);
-   if (lookup)
-   {
-      ossimString s = lookup;
-      s.downcase();
-      if (s.contains("area"))
-      {
-         thePixelType = OSSIM_PIXEL_IS_AREA;
-      }
-      else if (s.contains("point"))
-      {
-         thePixelType = OSSIM_PIXEL_IS_POINT;
-      }
-   }
-   
-   if(theInputObjectList.size() != 1)
-   {
-      theInputObjectList.resize(1);
-      theInputListIsFixedFlag = true;
-   }
-   
-   theOutputListIsFixedFlag = false;
-      
-   return result;
-}
-
-void ossimMetadataFileWriter::disconnectInputEvent(ossimConnectionEvent& /* event */)
-{
-   initialize();
-}
-
-void ossimMetadataFileWriter::connectInputEvent(ossimConnectionEvent& /* event */)
-{
-   initialize();
-}
-
-void ossimMetadataFileWriter::propertyEvent(ossimPropertyEvent& /* event */)
-{
-   initialize();
-}
-
-void ossimMetadataFileWriter::setPixelType(ossimPixelType pixelType)
-{
-   thePixelType = pixelType;
-}
-
-ossimPixelType ossimMetadataFileWriter::getPixelType()const
-{
-   return thePixelType;
-}
-
-ossimObject* ossimMetadataFileWriter::getObject()
-{
-   return this;
-}
-
-const ossimObject* ossimMetadataFileWriter::getObject() const
-{
-   return this;
-}
-
-bool ossimMetadataFileWriter::execute()
-{
-   bool result = false;
-   if (!theInputConnection)
-   {
-      initialize();
-      if (!theInputConnection)
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "ossimMetadataFileWriter::execute DEBUG:\n"
-               << "theInputConnection is null!"
-               << endl;
-         }
-         return result;
-      }
-   }
-   
-   if(theFilename == ossimFilename::NIL)
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimMetadataFileWriter::execute DEBUG:\n"
-            << "theFilename is not set!"
-            << endl;
-      }
-      return result;
-   }
-   
-   //---
-   // If theAreaOfInterest hasNans then it was probably not set so use
-   // the bounding rectangle of the input source.
-   //---
-   if (theAreaOfInterest.hasNans())
-   {
-      theAreaOfInterest = theInputConnection->getBoundingRect();
-      if (theAreaOfInterest.hasNans())
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "ossimMetadataFileWriter::execute DEBUG:\n"
-               << "theAreaOfInterest is not set!"
-               << endl;
-         }
-         return result;
-      }
-   }
-
-   setProcessStatus(ossimProcessInterface::PROCESS_STATUS_EXECUTING);
-
-   setPercentComplete(0.0);
-
-   result = writeFile();
-
-   setProcessStatus(ossimProcessInterface::PROCESS_STATUS_NOT_EXECUTING);
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimMetadataFileWriter::execute DEBUG:\n"
-         << (result?"successful":"unsuccessful") << " write of file:  "
-         << theFilename
-         << endl;
-   }
-   
-   return result;
-}
-
-void ossimMetadataFileWriter::setPercentComplete(double percentComplete)
-{
-   ossimProcessInterface::setPercentComplete(percentComplete);
-   ossimProcessProgressEvent event(this,
-                                   percentComplete);
-   fireEvent(event);      
-}
-
-void ossimMetadataFileWriter::setFilename(const ossimFilename& file)
-{
-   theFilename = file;
-}
-
-const ossimFilename& ossimMetadataFileWriter::getFilename() const
-{
-   return theFilename;
-}
-
-bool ossimMetadataFileWriter::canConnectMyInputTo(ossim_int32 inputIndex,
-                                                  const ossimConnectableObject* object) const
-{
-   return (object &&
-           ((PTR_CAST(ossimImageSource, object) &&
-             inputIndex == 0)||
-            (PTR_CAST(ossimViewController, object) &&
-             inputIndex == 1)));
-}
-
-void ossimMetadataFileWriter::setAreaOfInterest(
-   const ossimIrect& areaOfInterest)
-{
-   theAreaOfInterest = areaOfInterest;
-}
-
-ossimIrect ossimMetadataFileWriter::getAreaOfInterest() const
-{
-   return theAreaOfInterest;
-}
-
-void ossimMetadataFileWriter::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property.valid())return;
-   
-   ossimString name = property->getName();
-
-   if(name == ossimKeywordNames::FILENAME_KW)
-   {
-      setFilename(property->valueToString());
-   }
-   else
-   {
-      ossimConnectableObject::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimMetadataFileWriter::getProperty(const ossimString& name)const
-{
-   if(name == ossimKeywordNames::FILENAME_KW)
-   {
-      ossimFilenameProperty* filenameProp =
-         new ossimFilenameProperty(name, theFilename);
-      
-      filenameProp->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_OUTPUT);
-      
-      return filenameProp;
-      
-   }
-
-   return ossimConnectableObject::getProperty(name);
-}
-
-void ossimMetadataFileWriter::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimConnectableObject::getPropertyNames(propertyNames);
-   propertyNames.push_back(ossimKeywordNames::FILENAME_KW);
-}
diff --git a/src/ossim/imaging/ossimMonoGridRemapEngine.cpp b/src/ossim/imaging/ossimMonoGridRemapEngine.cpp
deleted file mode 100644
index 83bafd1..0000000
--- a/src/ossim/imaging/ossimMonoGridRemapEngine.cpp
+++ /dev/null
@@ -1,368 +0,0 @@
-//*****************************************************************************
-// FILE: ossimMonoGridRemapEngine.cc
-//
-// Copyright (C) 2001 ImageLinks, Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// See the GPL in the COPYING.GPL file for more details.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Contains implementation of class 
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimMonoGridRemapEngine.cpp 15833 2009-10-29 01:41:53Z eshirschorn $
-
-#include <ossim/imaging/ossimMonoGridRemapEngine.h>
-
-RTTI_DEF1(ossimMonoGridRemapEngine, "ossimMonoGridRemapEngine",
-          ossimGridRemapEngine);
-
-#include <ossim/imaging/ossimGridRemapSource.h>
-#include <ossim/imaging/ossimAtbPointSource.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimDblGrid.h>
-#include <ossim/imaging/ossimImageData.h>
-
-//***
-// Define Trace flags for use within this file:
-//***
-#include <ossim/base/ossimTrace.h>
-static ossimTrace traceExec  ("ossimMonoGridRemapEngine:exec");
-static ossimTrace traceDebug ("ossimMonoGridRemapEngine:debug");
-static bool TRACE_FLAG = true;
-
-//*****************************************************************************
-//  METHOD: ossimMonoGridRemapEngine::dup
-//  
-//*****************************************************************************
-ossimObject* ossimMonoGridRemapEngine::dup() const
-{
-   return new ossimMonoGridRemapEngine;
-}
-
-//*****************************************************************************
-//  METHOD: ossimMonoGridRemapEngine::remapTile
-//  
-//*****************************************************************************
-void ossimMonoGridRemapEngine::remapTile(const ossimDpt&       origin,
-                                        ossimGridRemapSource* remapper,
-                                        ossimRefPtr<ossimImageData>& tile)
-{
-   static const char MODULE[] = "ossimMonoGridRemapEngine::remapTile";
-   if (traceExec())  CLOG << "entering..." << endl;
-
-   //***
-   // Fetch tile size and NULL pixel value:
-   //***
-   int    width         = tile->getWidth();
-   int    height        = tile->getHeight();
-   int    offset        = 0;
-   double null;
-
-   //***
-   // Determine null pixel values so that we can recognize a null coming in and
-   // not remap it:
-   //***
-   null = tile->getNullPix(0);
-   ossimDblGrid& grid = *(remapper->getGrid(0));
-   
-   //***
-   // Remap according to pixel type:
-   //***
-   switch(tile->getScalarType())
-   {
-   case OSSIM_UCHAR:
-   {
-      ossim_uint8* tile_buf  = (ossim_uint8*)tile->getBuf(0);
-      short  pixel;
-      
-      for (double line=origin.line; line<origin.line+height; line+=1.0)
-      {
-         for (double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
-         {
-            //***
-            // Scan for null pixel before adding remap delta:
-            //***
-            if (tile_buf[offset] != (ossim_uint8) null)
-            {
-               //***
-               // Remap MONO pixel with spatially variant bias value:
-               //***
-               pixel = tile_buf[offset] + (short) grid(samp,line);
-
-               //***
-               // Clamp:
-               //***
-               if      (pixel<0)   tile_buf[offset] = 0;
-               else if (pixel>255) tile_buf[offset] = 255;
-               else                tile_buf[offset] = pixel;
-               
-               //***
-               // Avoid NULLS:
-               //***
-               if (tile_buf[offset] == (ossim_uint8) null) tile_buf[offset]++;
-            }
-            
-            offset++;
-         }
-      }
-      break;
-   }
-   
-   case OSSIM_USHORT11:
-   {
-      ossim_uint16* tile_buf  = (ossim_uint16*)tile->getBuf(0);
-      int  pixel;
-      
-      for (double line=origin.line; line<origin.line+height; line+=1.0)
-      {
-         for (double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
-         {
-            //***
-            // Scan for null pixel before adding remap delta:
-            //***
-            if (tile_buf[offset] != (ossim_uint16) null)
-            {
-               //***
-               // Remap MONO pixel with spatially variant bias value:
-               //***
-               pixel = tile_buf[offset] + (int) grid(samp,line);
-
-               //***
-               // Clamp:
-               //***
-               if      (pixel<0)    tile_buf[offset] = 0;
-               else if (pixel>2047) tile_buf[offset] = 2047;
-               else                 tile_buf[offset] = pixel;
-               
-               //***
-               // Avoid NULLS:
-               //***
-               if (tile_buf[offset] == (ossim_uint16) null) tile_buf[offset]++;
-            }
-            
-            offset++;
-         }
-      }
-      break;
-   }
-   
-   case OSSIM_USHORT16:
-   {
-      ossim_uint16* tile_buf  = (ossim_uint16*)tile->getBuf(0);
-      int  pixel;
-      
-      for (double line=origin.line; line<origin.line+height; line+=1.0)
-      {
-         for (double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
-         {
-            //***
-            // Scan for null pixel before adding remap delta:
-            //***
-            if (tile_buf[offset] != (ossim_uint16) null)
-            {
-               //***
-               // Remap MONO pixel with spatially variant bias value:
-               //***
-               pixel = tile_buf[offset] + (int) grid(samp,line);
-
-               //***
-               // Clamp:
-               //***
-               if      (pixel<0)     tile_buf[offset] = 0;
-               else if (pixel>65535) tile_buf[offset] = 65535;
-               else                  tile_buf[offset] = pixel;
-               
-               //***
-               // Avoid NULLS:
-               //***
-               if (tile_buf[offset] == (ossim_uint16) null) tile_buf[offset]++;
-            }
-            
-            offset++;
-         }
-      }
-      break;
-   }
-   
-   case OSSIM_SSHORT16:
-   {
-      short* tile_buf  = (short*)tile->getBuf(0);
-      int  pixel;
-      
-      for (double line=origin.line; line<origin.line+height; line+=1.0)
-      {
-         for (double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
-         {
-            //***
-            // Scan for null pixel before adding remap delta:
-            //***
-            if (tile_buf[offset] != (short) null)
-            {
-               //***
-               // Remap MONO pixel with spatially variant bias value:
-               //***
-               pixel = tile_buf[offset] + (short) grid(samp,line);
-
-               //***
-               // Clamp:
-               //***
-               if      (pixel<-32766) tile_buf[offset] = -32766;
-               else if (pixel> 32767) tile_buf[offset] = 32767;
-               else                   tile_buf[offset] = pixel;
-               
-               //***
-               // Avoid NULLS:
-               //***
-               if (tile_buf[offset] == (short) null) tile_buf[offset]++;
-            }
-            
-            offset++;
-         }
-      }
-      break;
-   }
-   default:
-   {
-	   ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimMonoGridRemapEngine::remapTile: Scalar type not handled" << std::endl;
-	   break;
-   }
-	   
-   }   // end switch statement
-
-   if (traceExec())  CLOG << "returning..." << endl;
-   return;
-};
-
-//*****************************************************************************
-//  METHOD: ossimMonoGridRemapEngine::assignRemapValues
-//
-//  This engine defines the target value as an MONO vector of doubles, computed
-//  as the mean of all contributor MONO values.
-//  
-//*****************************************************************************
-void ossimMonoGridRemapEngine::assignRemapValues (
-   vector<ossimAtbPointSource*>& sources_list)
-{
-   static const char MODULE[] = "ossimMonoGridRemapEngine::assignRemapValues";
-   if (traceExec())  CLOG << "entering..." << endl;
-
-   int i; // index to individual sources
-
-   //***
-   // Declare a 2D array that will contain all of the contributing sources'
-   // MONO mean values. Also declare the accumulator target vector.
-   //***
-   int num_contributors = (int)sources_list.size();
-   double** contributor_pixel = new double* [num_contributors];
-   for (i=0; i<num_contributors; i++)
-      contributor_pixel[i] = new double[1];
-   double target_pixel = 0.0;
-
-   //***
-   // Now loop over each remaining contributor and sum in its contribution:
-   //***
-   vector<ossimAtbPointSource*>::iterator source;
-   i = 0;
-   for(source=sources_list.begin();
-       source!=sources_list.end();
-       source++)
-   {
-      (*source)->getSourceValue(contributor_pixel[i]);
-      target_pixel += contributor_pixel[i][0]/(double)num_contributors;
-      ++i;
-   }
-
-   //***
-   // The target pixel has been established. Now need to compute the actual
-   // remap quantities that will be written to the appropriate remap grids:
-   //***
-   i = 0;
-   for(source=sources_list.begin();
-       source!=sources_list.end();
-       source++)
-   {
-      computeRemapNode(*source, contributor_pixel[i], &target_pixel);
-      ++i;
-   }
-
-   // ***
-   // Delete locally allocated memory:
-   // ***
-   for (i=0; i<num_contributors; ++i)
-   {
-      delete [] contributor_pixel[i];
-   }
-   delete [] contributor_pixel;
-   
-   if (traceExec())  CLOG << "returning..." << endl;
-   return;
-}
-
-//*****************************************************************************
-//  METHOD: ossimMonoGridRemapEngine::computeSourceValue
-//  
-//*****************************************************************************
-void ossimMonoGridRemapEngine::computeSourceValue(
-   ossimRefPtr<ossimImageData>& source, void* result)
-{
-   static const char MODULE[]="ossimMonoGridRemapEngine::computeSourceValue";
-   if (traceExec())  CLOG << "entering..." << endl;
-
-   //***
-   // This engine defines "value" as the MONO vector corresponding to the mean
-   // MONO pixel value of the source data:
-   //***
-   ((double*)result)[0] = source->computeAverageBandValue(0);
-   
-   if (traceExec())  CLOG << "returning..." << endl;
-   return;
-}
-
-//*****************************************************************************
-//  METHOD: ossimMonoGridRemapEngine::computeRemapNode
-//
-//  This engine defines the remap value as the difference between the target
-//  MONO vector and the individual point source's value vector.
-//
-//*****************************************************************************
-void ossimMonoGridRemapEngine::computeRemapNode(ossimAtbPointSource* ps,
-                                              void* source_value,
-                                              void* target_value)
-{
-   static const char MODULE[] = "ossimMonoGridRemapEngine::computeRemapNode";
-   if (traceExec())  CLOG << "entering..." << endl;
-
-   //***
-   // Compute the remap grid node value specific to this MONO implementation:
-   //***
-   double node;
-   node = ((double*)target_value)[0] - ((double*)source_value)[0];
-
-   //***
-   // Fetch a pointer to the remapper feeding this point source in order to
-   // pass it the node value:
-   //***
-   ossimGridRemapSource* remapper = ps->getRemapSource();
-   remapper->setGridNode(ps->getViewPoint(), &node);
-                         
-   if (traceDebug() || TRACE_FLAG)
-   {
-      CLOG << "DEBUG -- "
-           << "\n\t ps->getViewPoint() = "<<ps->getViewPoint()
-           << "\n\t source_value = "<<((double*)source_value)[0]
-           << "\n\t target_value = "<<((double*)target_value)[0]
-           << "\n\t node = "<<node
-           << "\n\t remapper at "<<remapper<<endl;
-   }
-
-   if (traceExec())  CLOG << "returning..." << endl;
-   return;
-}
-
diff --git a/src/ossim/imaging/ossimNBandToIndexFilter.cpp b/src/ossim/imaging/ossimNBandToIndexFilter.cpp
deleted file mode 100644
index 68cbf16..0000000
--- a/src/ossim/imaging/ossimNBandToIndexFilter.cpp
+++ /dev/null
@@ -1,559 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2005 Garrett Potts
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimNBandToIndexFilter.cpp 19732 2011-06-06 22:24:54Z dburken $
-
-#include <ossim/imaging/ossimNBandToIndexFilter.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimFilenameProperty.h>
-#include <ossim/base/ossimBooleanProperty.h>
-#include <ossim/base/ossimNotifyContext.h>
-
-
-static const char* KEEP_QUANTIZED_VALUE_FLAG_KW = "keep_quantized_value_flag";
-
-RTTI_DEF1(ossimNBandToIndexFilter,
-          "ossimNBandToIndexFilter",
-          ossimImageSourceFilter);
-
-ossimNBandToIndexFilter::ossimNBandToIndexFilter()
-   :ossimImageSourceFilter(),
-    theLut(0),
-    theTile(0),
-    theKeepQuantizedValueFlag(false)
-{
-}
-
-ossimNBandToIndexFilter::~ossimNBandToIndexFilter()
-{
-}
-
-void ossimNBandToIndexFilter::initialize()
-{
-   ossimImageSourceFilter::initialize();
-
-   // Force allocate on next getTile.
-   theTile      = 0;
-   if(theLut.valid())
-   {
-      if(theKeepQuantizedValueFlag)
-      {
-         ossimNBandLutDataObject::LUT_ENTRY_TYPE minValue;
-         ossimNBandLutDataObject::LUT_ENTRY_TYPE maxValue;
-         ossim_uint32 bands = theLut->getNumberOfBands();
-         ossim_uint32 idx   = 0;
-         if(theMinValues.size() != bands)
-         {
-            theMinValues.resize(bands);
-            theMaxValues.resize(bands);
-            theNullValues.resize(bands);
-         }
-         std::fill(theNullValues.begin(),
-                   theNullValues.end(), 0);
-         for(idx = 0; idx < bands; ++idx)
-         {
-            theLut->getMinMax(idx, minValue, maxValue);
-            theMinValues[idx] = minValue;
-            theMaxValues[idx] = maxValue;
-            theNullValues[idx] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(ossimImageSourceFilter::getNullPixelValue(idx));
-         }
-      }
-      else
-      {
-         if(theMinValues.size() != 1)
-         {
-            theMinValues.resize(1);
-            theMaxValues.resize(1);
-            theNullValues.resize(1);
-         }
-         theMinValues[0]  = 0;
-         theMaxValues[0]  = theLut->getNumberOfEntries()-1;
-         theNullValues[0] = theLut->getNullPixelIndex();
-      }
-   }
-}
-
-void ossimNBandToIndexFilter::allocate()
-{
-   theTile      = 0;
-   
-   if(isSourceEnabled()&&theInputConnection)
-   {
-      theTile      = ossimImageDataFactory::instance()->create(this, this);
-      if(theTile.valid())
-      {
-         theTile->initialize();
-      }
-   }
-}
-
-void ossimNBandToIndexFilter::disableSource()
-{
-   ossimImageSourceFilter::disableSource();
-   theTile = 0;
-}
-
-ossimRefPtr<ossimImageData> ossimNBandToIndexFilter::getTile(const ossimIrect& origin,
-                                                             ossim_uint32 resLevel)
-{
-   if(!isSourceEnabled())
-   {
-      return ossimImageSourceFilter::getTile(origin, resLevel);
-   }
-   if(!theInputConnection)
-   {
-      return ossimRefPtr<ossimImageData>();
-   }
-
-   if(!theTile.valid())
-   {
-      allocate();
-   }
-   
-   ossimRefPtr<ossimImageData> input = theInputConnection->getTile(origin,
-                                                                   resLevel);
-
-   if(!theTile.valid() || !input.valid())
-   {
-      return input;
-   }
-
-   theTile->setImageRectangle(origin);
-   theTile->setDataObjectStatus(OSSIM_FULL);
-   theTile->makeBlank();
-
-   return convertInputTile(input.get());
-}
-
-ossimRefPtr<ossimImageData> ossimNBandToIndexFilter::convertInputTile(ossimImageData* tile)
-{
-   switch(getOutputScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         return convertOutputTileTemplate((ossim_uint8)0,
-                                          tile);
-         break;
-      }
-      case OSSIM_UINT16:
-      {
-         return convertOutputTileTemplate((ossim_uint16)0,
-                                          tile);
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         return convertOutputTileTemplate((ossim_uint32)0,
-                                         tile);
-         break;
-      }
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << "ossimNBandToIndexFilter::convertInputTile: Unsupported scalar type for conversion" << std::endl;
-      }
-   }
-
-   return theTile;
-}
-
-template <class T>
-ossimRefPtr<ossimImageData> ossimNBandToIndexFilter::convertOutputTileTemplate(T outputDummy,
-                                                                               ossimImageData* inputTile)
-{
-   switch(inputTile->getScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         return convertInputTileToOutputTemplate((ossim_uint8)0,
-                                                 outputDummy,
-                                                 inputTile);
-         break;
-      }
-      case OSSIM_SINT8:
-      {
-         return convertInputTileToOutputTemplate((ossim_sint8)0,
-                                                 outputDummy,
-                                                 inputTile);
-      }
-      case OSSIM_UINT16:
-      {
-         return convertInputTileToOutputTemplate((ossim_uint16)0,
-                                                 outputDummy,
-                                                 inputTile);
-      }
-      case OSSIM_SINT32:
-      {
-         return convertInputTileToOutputTemplate((ossim_sint32)0,
-                                                 outputDummy,
-                                                 inputTile);
-      }
-      case OSSIM_UINT32:
-      {
-         return convertInputTileToOutputTemplate((ossim_uint32)0,
-                                                 outputDummy,
-                                                 inputTile);
-      }
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << "convertInputTileToOutputTemplate::convertOutputTileTemplate: Unsupported scalar type for conversion." << std::endl;
-      }
-   }
-
-   return theTile;
-}
-
-template <class T1, class T2>
-ossimRefPtr<ossimImageData> ossimNBandToIndexFilter::convertInputTileToOutputTemplate(
-   T1 /* inputDummy */,
-   T2 /* outputDummy */,
-   ossimImageData* inputTile)
-{
-   if (!inputTile)
-   {
-      return theTile;
-   }
-   
-   const ossim_uint32 BANDS = inputTile->getNumberOfBands();
-
-   if (!BANDS)
-   {
-      return theTile;
-   }
-//   T2** outBand = (T2*)theTile->getBuf();
-
-   ossim_uint32 numberOfBands = theLut->getNumberOfBands();
-   
-   ossimNBandLutDataObject::LUT_ENTRY_TYPE* bandValues = new ossimNBandLutDataObject::LUT_ENTRY_TYPE[numberOfBands];
-
-   memset(bandValues, 0, sizeof(ossimNBandLutDataObject::LUT_ENTRY_TYPE)*numberOfBands);
-   numberOfBands = ossim::min(BANDS,
-                            numberOfBands);
-   if(!numberOfBands) return theTile;
-   T1** band = new T1*[numberOfBands];
-   T2** outBand = new T2*[numberOfBands];
-   ossim_int32 idx   = 0;
-
-   for(idx = 0; idx < (ossim_int32)numberOfBands; ++idx)
-   {
-      band[idx] = (T1*)inputTile->getBuf(idx);
-      outBand[idx] = (T2*)theTile->getBuf(idx);
-   }
-   if(band[0])
-   {
-      if(inputTile->getDataObjectStatus() == OSSIM_FULL)
-      {
-         ossim_uint32 upper = inputTile->getWidth()*inputTile->getHeight();
-         ossim_uint32 idx2=0;
-         for(ossim_uint32 offset = 0; offset < upper; ++offset)
-         {
-            for(idx2 = 0; idx2 < numberOfBands; ++idx2)
-            {
-               bandValues[idx2] = *band[idx2];
-               ++band[idx2];
-            }
-            //---
-            // Note call the ossimNBandLutDataObject::findIndex that takes a size as the input
-            // data may have dropped the alpha channel.
-            //---
-            idx = theLut->findIndex(bandValues, numberOfBands);
-
-            if(!theKeepQuantizedValueFlag)
-            {
-               *outBand[0] = (T2)idx;
-               ++outBand[0];
-            }
-            else
-            {
-               for(idx2 = 0; idx2 < numberOfBands; ++idx2)
-               {
-                  if(idx >=0)
-                  {
-                     *outBand[idx2] = (T2)(*theLut)[idx][idx2];
-                     ++outBand[idx2];
-                  }
-               }
-            }
-         }
-      }
-      else if(inputTile->getDataObjectStatus() == OSSIM_PARTIAL)
-      {
-         ossim_uint32 upper = inputTile->getWidth()*inputTile->getHeight();
-         ossim_uint32 idx2=0;
-         for(ossim_uint32 offset = 0; offset < upper; ++offset)
-         {
-            for(idx2 = 0; idx2 < numberOfBands; ++idx2)
-            {
-               bandValues[idx2] = *band[idx2];
-               ++band[idx2];
-            }
-            idx = -1;
-            if(!inputTile->isNull(offset))
-            {
-               //---
-               // Note call the ossimNBandLutDataObject::findIndex that takes a size as the input
-               // data may have dropped the alpha channel.
-               //---
-               idx = theLut->findIndex(bandValues, numberOfBands);
-            }
-            if(!theKeepQuantizedValueFlag)
-            {
-               if(idx>=0)
-               {
-                  *outBand[0] = (T2)idx;
-               }
-               ++outBand[0];
-            }
-            else
-            {
-               for(idx2 = 0; idx2 < numberOfBands; ++idx2)
-               {
-                  if(idx >=0)
-                  {
-                     if(idx>=0)
-                     {
-                        *outBand[idx2] = (T2)(*theLut)[idx][idx2];
-                     }
-                  }
-                  ++outBand[idx2];
-               }
-            }
-         }
-      }
-   }
-   if(theKeepQuantizedValueFlag)
-   {
-      theTile->validate();
-   }
-   else
-   {
-      theTile->setDataObjectStatus(OSSIM_FULL);
-   }
-   return theTile;
-}
-
-bool ossimNBandToIndexFilter::saveState(ossimKeywordlist& kwl,
-                                        const char* prefix)const
-{
-   ossimString newPrefix = prefix;
-   newPrefix = newPrefix + "lut.";
-
-   if(theLut.valid())
-   {
-      theLut->saveState(kwl, newPrefix.c_str());
-   }
-
-   kwl.add(prefix,
-           KEEP_QUANTIZED_VALUE_FLAG_KW,
-           theKeepQuantizedValueFlag?"true":"false",
-           true);
-           
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
-
-bool ossimNBandToIndexFilter::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   ossimString newPrefix = prefix;
-   newPrefix = newPrefix + "lut.";
-
-   if(!theLut.valid())
-   {
-      theLut = new ossimNBandLutDataObject;
-   }
-   theLut->loadState(kwl, newPrefix.c_str());
-
-   const char* flag = kwl.find(prefix, KEEP_QUANTIZED_VALUE_FLAG_KW);
-   if(flag)
-   {
-      theKeepQuantizedValueFlag = ossimString(flag).toBool();
-   }
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
-
-bool ossimNBandToIndexFilter::isSourceEnabled()const
-{
-   bool result = ossimSource::isSourceEnabled()&&theInputConnection;
-
-   // only support 3 band integral values, no floating point for now.
-   //
-   if(result)
-   {
-      
-      ossimScalarType inputScalarType = theInputConnection->getOutputScalarType();
-      if(!theLut.valid() ||
-         (theLut->getNumberOfEntries()<1)||
-         (inputScalarType==OSSIM_FLOAT32)||
-         (inputScalarType==OSSIM_FLOAT64)||
-         (theInputConnection->getNumberOfOutputBands()!=3))
-      {
-         result = false;
-      }
-   }
-   
-   return result;
-}
-
-ossim_uint32 ossimNBandToIndexFilter::getNumberOfOutputBands() const
-{
-   if(isSourceEnabled())
-   {
-      if(theKeepQuantizedValueFlag)
-      {
-         if(theLut.valid())
-         {
-            return theLut->getNumberOfBands();
-         }
-      }
-      else
-      {
-         return 1;
-      }
-   }
-   
-   return ossimImageSourceFilter::getNumberOfOutputBands();
-}
-   
-ossimScalarType ossimNBandToIndexFilter::getOutputScalarType() const
-{
-   if(isSourceEnabled())
-   {
-      
-      ossim_uint32 numberOfEntries = theLut->getNumberOfEntries();
-      
-      if(numberOfEntries < 257)
-      {
-         return OSSIM_UCHAR;
-      }
-      else if(numberOfEntries < 65537)
-      {
-         return OSSIM_UINT16;
-      }
-      else
-      {
-         return OSSIM_UINT32;
-      }
-   }
-   
-   return ossimImageSourceFilter::getOutputScalarType();
-}
-
-void ossimNBandToIndexFilter::setLut(ossimNBandLutDataObject& lut)
-{
-   theLut = new ossimNBandLutDataObject(lut);
-}
-
-double ossimNBandToIndexFilter::getNullPixelValue(ossim_uint32 band)const
-{
-   if(isSourceEnabled())
-   {
-      if(theLut->getNullPixelIndex() >= 0)
-      {
-         return theLut->getNullPixelIndex();
-      }
-   }
-   
-   return ossimImageSourceFilter::getNullPixelValue(band);
-}
-
-double ossimNBandToIndexFilter::getMinPixelValue(ossim_uint32 band)const
-{
-   if(isSourceEnabled())
-   {
-      if(band < theMinValues.size())
-      {
-         return (double)theMinValues[band];
-      }
-   }
-//    if(isSourceEnabled())
-//    {
-//       if(getNullPixelValue() != 0)
-//       {
-//          return 0;
-//       }
-//       else
-//       {
-//          return 1;
-//       }
-//       return 0;
-//    }
-   
-   return ossimImageSourceFilter::getMinPixelValue();
-}
-
-double ossimNBandToIndexFilter::getMaxPixelValue(ossim_uint32 band)const
-{
-   if(isSourceEnabled())
-   {
-      if(band < theMaxValues.size())
-      {
-         return (double)theMaxValues[band];
-      }
-//       if(theLut->getNullPixelIndex() != ((ossim_int32)(theLut->getNumberOfEntries())-1))
-//       {
-//          return theLut->getNumberOfEntries();
-//       }
-//       else
-//       {
-//          return (theLut->getNumberOfEntries()-1);
-//       }
-   }
-   
-   return ossimImageSourceFilter::getMaxPixelValue();
-}
-
-void ossimNBandToIndexFilter::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(property->getName() == ossimKeywordNames::FILENAME_KW)
-   {
-      ossimKeywordlist kwl;
-      if(kwl.addFile(ossimFilename(property->valueToString())))
-      {
-         theLut = new ossimNBandLutDataObject;
-         theLut->loadState(kwl);
-      }
-   }
-   else if(property->getName() == KEEP_QUANTIZED_VALUE_FLAG_KW)
-   {
-      theKeepQuantizedValueFlag = property->valueToString().toBool();
-   }
-   else
-   {
-      ossimImageSourceFilter::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimNBandToIndexFilter::getProperty(const ossimString& name)const
-{
-   if(name == ossimKeywordNames::FILENAME_KW)
-   {
-      ossimFilenameProperty* property = new ossimFilenameProperty(name, theLutFilename);
-      property->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_INPUT);
-      property->setCacheRefreshBit();
-      
-      return property;
-   }
-   else if(name == KEEP_QUANTIZED_VALUE_FLAG_KW)
-   {
-      ossimBooleanProperty* property = new ossimBooleanProperty(name, theKeepQuantizedValueFlag);
-      property->setCacheRefreshBit();
-
-      return property;
-   }
-   return ossimImageSourceFilter::getProperty(name);
-}
-
-void ossimNBandToIndexFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageSourceFilter::getPropertyNames(propertyNames);
-
-   propertyNames.push_back(ossimKeywordNames::FILENAME_KW);
-   propertyNames.push_back(KEEP_QUANTIZED_VALUE_FLAG_KW);
-}
diff --git a/src/ossim/imaging/ossimNitf20Writer.cpp b/src/ossim/imaging/ossimNitf20Writer.cpp
deleted file mode 100644
index 907fa11..0000000
--- a/src/ossim/imaging/ossimNitf20Writer.cpp
+++ /dev/null
@@ -1,832 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimNitf20Writer.cpp 2982 2011-10-10 21:28:55Z david.burken $
-
-
-#include <ossim/imaging/ossimNitf20Writer.h>
-#include <ossim/imaging/ossimNitfTileSource.h>
-#include <ossim/base/ossimDate.h>
-#include <ossim/base/ossimPreferences.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/projection/ossimRpcSolver.h>
-#include <ossim/projection/ossimUtmProjection.h>
-#include <ossim/projection/ossimMapProjectionInfo.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/imaging/ossimRectangleCutFilter.h>
-#include <ossim/base/ossimProperty.h>
-#include <ossim/base/ossimContainerProperty.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimNumericProperty.h>
-#include <ossim/base/ossimBooleanProperty.h>
-#include <ossim/base/ossimVisitor.h>
-#include <ossim/support_data/ossimNitfCommon.h>
-#include <ossim/support_data/ossimNitfGeoPositioningTag.h>
-#include <ossim/support_data/ossimNitfLocalGeographicTag.h>
-#include <ossim/support_data/ossimNitfLocalCartographicTag.h>
-#include <ossim/support_data/ossimNitfProjectionParameterTag.h>
-#include <ossim/support_data/ossimNitfNameConversionTables.h>
-#include <ossim/support_data/ossimNitfBlockaTag.h>
-#include <tiffio.h>
-#include <fstream>
-#include <algorithm>
-#include <sstream>
-#include <iomanip>
-
-RTTI_DEF1(ossimNitf20Writer, "ossimNitf20Writer", ossimNitfWriterBase);
-
-static ossimTrace traceDebug(ossimString("ossimNitfWriter:debug"));
-     
-static ossimString monthConversionTable[] = {"   ", "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"};
-
-ossimNitf20Writer::ossimNitf20Writer(const ossimFilename& filename,
-                                     ossimImageSource* inputSource)
-   : ossimNitfWriterBase(filename, inputSource),
-     theOutputStream(0),
-     theFileHeader(),
-     theImageHeader(),
-     theEnableRpcbTagFlag(false),
-     theEnableBlockaTagFlag(true),
-     theCopyFieldsFlag(false)
-{
-   //---
-   // Since the internal nitf tags are not very accurate, write an external
-   // geometry out as default behavior.  Users can disable this via the
-   // property interface or keyword list.
-   //---
-   setWriteExternalGeometryFlag(true);
-   
-   theFileHeader      = new ossimNitfFileHeaderV2_0;
-   theImageHeader     = new ossimNitfImageHeaderV2_0;
-   theOutputImageType = "nitf20_block_band_separate";
-
-   // These are always set:
-   theFileHeader->setEncryption( ossimString("0") );
-   theImageHeader->setJustification( ossimString("R") );
-   
-   // Set any site defaults.
-   initializeDefaultsFromConfigFile(
-      dynamic_cast<ossimNitfFileHeaderV2_X*>(theFileHeader.get()),
-      dynamic_cast<ossimNitfImageHeaderV2_X*>(theImageHeader.get()) );
-}
-
-ossimNitf20Writer::~ossimNitf20Writer()
-{
-   //---
-   // This looks like a leak but it's not as both of these are ossimRefPtr's.
-   //---
-   theFileHeader=0;
-   theImageHeader=0;
-   
-   close();
-}
-
-bool ossimNitf20Writer::isOpen()const
-{
-   return (theOutputStream != 0);
-}
-
-bool ossimNitf20Writer::open()
-{
-   if(isOpen())
-   {
-      close();
-   }
-   theOutputStream = new std::ofstream;
-   theOutputStream->open(theFilename.c_str(), ios::out|ios::binary);
-   
-   return theOutputStream->good();
-}
-
-void ossimNitf20Writer::close()
-{
-   if(theOutputStream)
-   {
-      theOutputStream->close();
-      delete theOutputStream;
-      theOutputStream = (std::ofstream*)0;
-   }
-}
-
-bool ossimNitf20Writer::writeFile()
-{
-   if(!theInputConnection->isMaster())
-   {
-      theInputConnection->slaveProcessTiles();
-
-      return true;
-   }
-
-   open();
-
-   if (!isOpen())
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitf20Writer::writeFile ERROR:"
-            << " Could not open!  Returning..."
-            << std::endl;
-      }
-
-      return false;
-   }
-
-   // Write out the geometry info.
-   writeGeometry(theImageHeader.get(), theInputConnection.get());
-   
-   addTags();
-   
-   bool result = false;
-   if((theOutputImageType == "nitf20_block_band_separate")||
-      (theOutputImageType == "image/nitf20"))
-   {
-      result =  writeBlockBandSeparate();
-   }
-   else if(theOutputImageType == "nitf20_block_band_sequential")
-   {
-      result =  writeBlockBandSequential();
-   }
-   
-   close();
-   
-   return result;
-}
-
-void ossimNitf20Writer::getImageTypeList(std::vector<ossimString>& imageTypeList)const
-{
-   imageTypeList.push_back(ossimString("nitf20_block_band_separate"));
-   imageTypeList.push_back(ossimString("nitf20_block_band_sequential"));
-}
-
-void ossimNitf20Writer::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property) return;
-   
-   ossimString name = property->getName();
-   
-   if(name == "file_header")
-   {
-      ossimContainerProperty* containerProperty = PTR_CAST(ossimContainerProperty,
-                                                           property.get());
-      if(containerProperty)
-      {
-         std::vector<ossimRefPtr<ossimProperty> > propertyList;
-         containerProperty->getPropertyList(propertyList);
-         theFileHeader->setProperties(propertyList);
-      }
-   }
-   else if(name == "image_header")
-   {
-      ossimContainerProperty* containerProperty = PTR_CAST(ossimContainerProperty,
-                                                           property.get());
-      if(containerProperty)
-      {
-         std::vector<ossimRefPtr<ossimProperty> > propertyList;
-         containerProperty->getPropertyList(propertyList);
-         theImageHeader->setProperties(propertyList);
-      }
-   }
-   else if (name == "enable_rpcb_tag")
-   {
-      theEnableRpcbTagFlag = property->valueToString().toBool();
-   }
-   else if (name == "enable_blocka_tag")
-   {
-      theEnableBlockaTagFlag = property->valueToString().toBool();
-   }
-   else if(name == "copy_fields_flag")
-   {
-      theCopyFieldsFlag = property->valueToString().toBool();
-   }
-   else
-   {
-      // just in case it was an nitf specific tag we can pass it safely like this
-      theFileHeader->setProperty(property);
-      theImageHeader->setProperty(property);
-      ossimImageFileWriter::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimNitf20Writer::getProperty(const ossimString& name)const
-{
-   ossimRefPtr<ossimProperty> result = 0;
-   
-   if(name == "file_header")
-   {
-      ossimContainerProperty* container = new ossimContainerProperty(name);
-      std::vector<ossimRefPtr<ossimProperty> > propertyList;
-      
-      theFileHeader->getPropertyList(propertyList);
-      container->addChildren(propertyList);
-      
-      result = container;
-   }
-   else if(name == "image_header")
-   {
-      ossimContainerProperty* container = new ossimContainerProperty(name);
-      std::vector<ossimRefPtr<ossimProperty> > propertyList;
-      
-      theImageHeader->getPropertyList(propertyList);
-      container->addChildren(propertyList);
-      
-      result = container;
-   }
-   else if(name == "enable_rpcb_tag")
-   {
-      ossimBooleanProperty* boolProperty =
-         new ossimBooleanProperty(name, theEnableRpcbTagFlag);
-
-      result = boolProperty;
-   }   
-   else if(name == "enable_blocka_tag")
-   {
-      ossimBooleanProperty* boolProperty =
-         new ossimBooleanProperty(name, theEnableBlockaTagFlag);
-
-      result = boolProperty;
-   }   
-   else if(name == "copy_fields_flag")
-   {
-      ossimBooleanProperty* boolProperty =
-      new ossimBooleanProperty(name, theCopyFieldsFlag);
-      
-      result = boolProperty;
-   }
-   else
-   {
-      return ossimImageFileWriter::getProperty(name);
-   }
-
-   return result;
-}
-
-void ossimNitf20Writer::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageFileWriter::getPropertyNames(propertyNames);
-
-   propertyNames.push_back("file_header");
-   propertyNames.push_back("image_header");
-   propertyNames.push_back("enable_rpcb_tag");
-   propertyNames.push_back("enable_blocka_tag");
-   propertyNames.push_back("copy_fields_flag");
-}
-
-bool ossimNitf20Writer::writeBlockBandSeparate()
-{
-   ossimScalarType scalarType = theInputConnection->getOutputScalarType();
-   ossim_uint64 byteSize      = ossim::scalarSizeInBytes(scalarType);
-   ossimIrect rect            = theInputConnection->getBoundingRect();
-   ossim_uint64 bands         = theInputConnection->getNumberOfOutputBands();
-   ossim_uint64 idx           = 0;
-   ossim_uint64 headerStart   = (ossim_uint64)theOutputStream->tellp();
-
-   ossimIpt blockSize(64, 64);
-   ossim_uint64 blocksHorizontal = (ossim_uint32)ceil(((double)rect.width()/(double)blockSize.x));
-   ossim_uint64 blocksVertical   = (ossim_uint32)ceil(((double)rect.height()/(double)blockSize.y));
-
-   ossimNitfImageInfoRecordV2_0 imageInfoRecord;
-   //imageInfoRecord.setSubheaderLength(439); // ok if no tags
-   imageInfoRecord.setImageLength(bands*byteSize*blocksVertical*blockSize.y*blocksHorizontal*blockSize.x);
-
-   theFileHeader->addImageInfoRecord(imageInfoRecord);
-
-   //---
-   // This makes space for the file header; it is written again at the end of
-   // this method with updated values
-   // need a better way to get the length.  This should be queried on the
-   // header before writing
-   //---
-   theFileHeader->writeStream(*theOutputStream); 
-   ossim_uint64 headerLength = ((ossim_uint64)theOutputStream->tellp() - headerStart) /* + 1 */;
-   
-   ossimString representation;
-   theImageHeader->setActualBitsPerPixel(
-      ossim::getActualBitsPerPixel(scalarType));
-   theImageHeader->setBitsPerPixel(ossim::getBitsPerPixel(scalarType));
-   theImageHeader->setPixelType(ossimNitfCommon::getNitfPixelType(scalarType));
-   theImageHeader->setNumberOfBands(bands);
-   theImageHeader->setImageMode('B');// blocked
-
-   if((bands == 3)&&
-      (scalarType == OSSIM_UCHAR))
-   {
-      theImageHeader->setRepresentation("RGB");
-      theImageHeader->setCategory("VIS");
-   }
-   else if(bands == 1)
-   {
-      theImageHeader->setRepresentation("MONO");
-      theImageHeader->setCategory("MS");
-   }
-   else
-   {
-      theImageHeader->setRepresentation("MULTI");
-      theImageHeader->setCategory("MS");
-   }
-   
-   theImageHeader->setBlocksPerRow(blocksHorizontal);
-   theImageHeader->setBlocksPerCol(blocksVertical);
-   theImageHeader->setNumberOfPixelsPerBlockRow(blockSize.x);
-   theImageHeader->setNumberOfPixelsPerBlockCol(blockSize.y);
-   theImageHeader->setNumberOfRows(rect.height());
-   theImageHeader->setNumberOfCols(rect.width());
-
-   ossimNitfImageBandV2_0 bandInfo;
-   for(idx = 0; idx < bands; ++idx)
-   {
-      std::ostringstream out;
-      
-      out << std::setfill('0')
-          << std::setw(2)
-          << idx;
-      
-      bandInfo.setBandRepresentation(out.str().c_str());
-      theImageHeader->setBandInfo(idx,
-                              bandInfo);
-   }
-
-   ossim_uint64 imageHeaderStart = theOutputStream->tellp();
-   theImageHeader->writeStream(*theOutputStream);
-   ossim_uint64 imageHeaderEnd = theOutputStream->tellp();
-   ossim_uint64 imageHeaderSize = imageHeaderEnd - imageHeaderStart;
-
-   theInputConnection->setTileSize(blockSize);
-   ossim_uint64 numberOfTiles   = theInputConnection->getNumberOfTiles();
-   theInputConnection->setToStartOfSequence();
-   ossimRefPtr<ossimImageData> data = theInputConnection->getNextTile();
-   ossim_uint64 tileNumber = 1;
-   ossimEndian endian;
-
-   
-   while( data.valid() && !needsAborting())
-   {
-      if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
-      {
-         switch(data->getScalarType())
-         {
-            case OSSIM_USHORT16:
-            case OSSIM_USHORT11:
-            {
-               endian.swap((ossim_uint16*)data->getBuf(),
-                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
-               break;
-            }
-            case OSSIM_SSHORT16:
-            {
-               endian.swap((ossim_sint16*)data->getBuf(),
-                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
-               break;
-            }
-            case OSSIM_FLOAT:
-            case OSSIM_NORMALIZED_FLOAT:
-            {
-               endian.swap((ossim_float32*)data->getBuf(),
-                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
-               break;
-            }
-            case OSSIM_DOUBLE:
-            case OSSIM_NORMALIZED_DOUBLE:
-            {
-               endian.swap((ossim_float64*)data->getBuf(),
-                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
-               break;
-            }
-            default:
-               break;
-         }
-      }
-      
-      theOutputStream->write((char*)(data->getBuf()),
-                             data->getSizeInBytes());
-      
-      setPercentComplete(((double)tileNumber / (double)numberOfTiles) * 100);
-      
-      if(!needsAborting())
-      {
-         data = theInputConnection->getNextTile();
-      }
-      ++tileNumber;
-   }
-
-   std::streamoff pos = theOutputStream->tellp();
-
-   setComplexityLevel(pos, theFileHeader.get());
-
-   /*
-    * Need to change the way I compute file length and header length later
-    * We need to figure out a better way to compute.
-    */
-   theFileHeader->setFileLength(static_cast<ossim_uint64>(pos));
-   theFileHeader->setHeaderLength(headerLength);
-   theOutputStream->seekp(0, ios::beg);
-   imageInfoRecord.setSubheaderLength(imageHeaderSize);
-   theFileHeader->replaceImageInfoRecord(0, imageInfoRecord);
-   theFileHeader->writeStream(*theOutputStream);
-   
-   return true;
-}
-
-bool ossimNitf20Writer::writeBlockBandSequential()
-{
-   ossimScalarType scalarType = theInputConnection->getOutputScalarType();
-   ossim_uint64    byteSize   = ossim::scalarSizeInBytes(scalarType);
-   ossimIrect      rect       = theInputConnection->getBoundingRect();
-   ossim_uint64    bands      = theInputConnection->getNumberOfOutputBands();
-   ossim_uint64    idx        = 0;
-   ossim_uint64    headerStart   = (ossim_uint64)theOutputStream->tellp();
-
-   ossimIpt blockSize(64, 64);
-
-   ossim_uint64 blocksHorizontal = theInputConnection->getNumberOfTilesHorizontal();
-   ossim_uint64 blocksVertical   = theInputConnection->getNumberOfTilesVertical();
-   theInputConnection->setTileSize(blockSize);
-   ossim_uint64 numberOfTiles   = theInputConnection->getNumberOfTiles();
-   theInputConnection->setToStartOfSequence();
-   
-   ossimNitfImageInfoRecordV2_0 imageInfoRecord;
- //  imageInfoRecord.setSubheaderLength(439);
-   imageInfoRecord.setImageLength(bands*byteSize*blocksHorizontal*blocksVertical*blockSize.x*blockSize.y);
-
-   ossimDate currentDate;
-   
-   theFileHeader->setDate(currentDate);
-   theFileHeader->addImageInfoRecord(imageInfoRecord);
-
-   //---
-   // This makes space for the file header; it is written again at the end of
-   // this method with updated values
-   // need a better way to get the length.  This should be queried on the
-   // header before writing
-   //---  
-   theFileHeader->writeStream(*theOutputStream);
-   ossim_uint64 headerLength = ((ossim_uint64)theOutputStream->tellp() - headerStart) /* + 1 */;
-   
-   ossimString representation;
-   theImageHeader->setActualBitsPerPixel(
-      ossim::getActualBitsPerPixel(scalarType));
-   theImageHeader->setBitsPerPixel(ossim::getBitsPerPixel(scalarType));
-   theImageHeader->setPixelType(ossimNitfCommon::getNitfPixelType(scalarType));
-   theImageHeader->setNumberOfBands(bands);
-   theImageHeader->setImageMode('S');// blocked
-   
-   if((bands == 3)&&
-      (scalarType == OSSIM_UCHAR))
-   {
-      theImageHeader->setRepresentation("RGB");
-      theImageHeader->setCategory("VIS");
-   }
-   else if(bands == 1)
-   {
-      theImageHeader->setRepresentation("MONO");
-      theImageHeader->setCategory("MS");
-   }
-   else
-   {
-      theImageHeader->setRepresentation("MULTI");
-      theImageHeader->setCategory("MS");
-   }
-   theImageHeader->setBlocksPerRow(blocksHorizontal);
-   theImageHeader->setBlocksPerCol(blocksVertical);
-   theImageHeader->setNumberOfPixelsPerBlockRow(blockSize.x);
-   theImageHeader->setNumberOfPixelsPerBlockCol(blockSize.y);
-   theImageHeader->setNumberOfRows(rect.height());
-   theImageHeader->setNumberOfCols(rect.width());
-
-   ossimNitfImageBandV2_0 bandInfo;
-   for(idx = 0; idx < bands; ++idx)
-   {
-      std::ostringstream out;
-      
-      out << std::setfill('0')
-          << std::setw(2)
-          << idx;
-      
-      bandInfo.setBandRepresentation(out.str().c_str());
-      theImageHeader->setBandInfo(idx,
-                              bandInfo);
-   }
-
-   int imageHeaderStart = theOutputStream->tellp();
-   theImageHeader->writeStream(*theOutputStream);
-   int imageHeaderEnd = theOutputStream->tellp();
-   int imageHeaderSize = imageHeaderEnd - imageHeaderStart;
-
-   // ossimIpt ul = rect.ul();
-   ossimRefPtr<ossimImageData> data = theInputConnection->getNextTile();
-   ossim_uint64 tileNumber = 0;
-   ossimEndian endian;
-
-   // get the start to the first band of data block
-   //
-   ossim_uint64 streamOffset = theOutputStream->tellp();
-   
-   // holds the total pixels to the next band
-
-   ossim_uint64 blockSizeInBytes = blockSize.x*blockSize.y*ossim::scalarSizeInBytes(data->getScalarType());
-   ossim_uint64 bandOffsetInBytes = (blockSizeInBytes*blocksHorizontal*blocksVertical);
-
-   bool needSwapping = endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN;
-   while(data.valid() && !needsAborting())
-   {
-      if(needSwapping)
-      {
-         switch(data->getScalarType())
-         {
-            case OSSIM_USHORT16:
-            case OSSIM_USHORT11:
-            {
-               endian.swap((ossim_uint16*)data->getBuf(),
-                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
-               break;
-            }
-            case OSSIM_SSHORT16:
-            {
-               endian.swap((ossim_sint16*)data->getBuf(),
-                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
-               break;
-            }
-            case OSSIM_FLOAT:
-            case OSSIM_NORMALIZED_FLOAT:
-            {
-               endian.swap((ossim_float32*)data->getBuf(),
-                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
-               break;
-            }
-            case OSSIM_DOUBLE:
-            case OSSIM_NORMALIZED_DOUBLE:
-            {
-               endian.swap((ossim_float64*)data->getBuf(),
-                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
-               break;
-            }
-            default:
-               break;
-         }
-      }
-
-      for(idx = 0; idx < bands; ++idx)
-      {
-         theOutputStream->seekp(streamOffset+ // start of image stream
-                                tileNumber*blockSizeInBytes + // start of block for band separate output
-                                bandOffsetInBytes*idx, // which band offset is it
-                                ios::beg); 
-         
-         theOutputStream->write((char*)(data->getBuf(idx)),
-                                blockSizeInBytes);
-      }
-      ++tileNumber;
-      
-      setPercentComplete(((double)tileNumber / (double)numberOfTiles) * 100);
-
-      if(!needsAborting())
-      {
-         data = theInputConnection->getNextTile();
-      }
-   }
-   
-   std::streamoff pos = theOutputStream->tellp();
-
-   setComplexityLevel(pos, theFileHeader.get());
-
-   /*
-    * Need to change the way I compute file length and header length later
-    * We need to figure out a better way to compute.
-    */
-   theFileHeader->setFileLength(static_cast<ossim_uint64>(pos));
-   theFileHeader->setHeaderLength(headerLength);
-   theOutputStream->seekp(0, ios::beg);
-   imageInfoRecord.setSubheaderLength(imageHeaderSize);
-   theFileHeader->replaceImageInfoRecord(0, imageInfoRecord);
-   theFileHeader->writeStream(*theOutputStream);
-   
-   return true;
-}
-
-
-void ossimNitf20Writer::addRegisteredTag(
-   ossimRefPtr<ossimNitfRegisteredTag> registeredTag)
-{
-   ossimNitfTagInformation tagInfo;
-   tagInfo.setTagData(registeredTag.get());
-     theImageHeader->addTag(tagInfo);
-}
-
-void ossimNitf20Writer::addTags()
-{
-   ossimDate currentDate;
-   theFileHeader->setDate(currentDate);
-   
-   if(theCopyFieldsFlag)
-   {
-      ossimTypeNameVisitor visitor(ossimString("ossimNitfTileSource"),
-                                   true,
-                                   (ossimVisitor::VISIT_CHILDREN|ossimVisitor::VISIT_INPUTS));
-      accept(visitor);
-      
-      // If there are multiple image handlers, e.g. a mosaic do not uses.
-      ossimRefPtr<ossimNitfTileSource> nitf = 0;
-      if ( visitor.getObjects().size() == 1 )
-      {
-         nitf = visitor.getObjectAs<ossimNitfTileSource>( 0 );
-      }
-
-      if( nitf.valid() )
-      {
-         ossimString value;
-         ossimPropertyInterface* fileHeaderProperties = dynamic_cast<ossimPropertyInterface*>(theFileHeader.get());
-         ossimPropertyInterface* imageHeaderProperties = dynamic_cast<ossimPropertyInterface*>(theImageHeader.get());
-         bool nitf21Flag = false;
-         const ossimNitfFileHeader*   header      = nitf->getFileHeader();
-         const ossimNitfImageHeader*  imageHeader = nitf->getCurrentImageHeader();
-         if(header)
-         {
-            ossimString version = header->getPropertyValueAsString("fhdr");
-            nitf21Flag = version.contains("2.1");
-            value = header->getPropertyValueAsString("stype");
-            if(value.size())
-            {
-               fileHeaderProperties->setProperty("stype", value);
-            }
-            value = header->getPropertyValueAsString("ostaid");
-            if(value.size())
-            {
-               fileHeaderProperties->setProperty("ostaid", value);
-            }
-            value = header->getPropertyValueAsString("ftitle");
-            if(value.size())
-            {
-               fileHeaderProperties->setProperty("ftitle", value);
-            }
-            value = header->getPropertyValueAsString("fsclas");
-            if(value.size())
-            {
-               fileHeaderProperties->setProperty("fsclas", value);
-            }
-            value = header->getPropertyValueAsString("oname");
-            if(value.size())
-            {
-               fileHeaderProperties->setProperty("oname", value);
-            }
-            value = header->getPropertyValueAsString("ophone");
-            if(value.size())
-            {
-               fileHeaderProperties->setProperty("ophone", value);
-            }
-            int idx = 0;
-            for(idx = 0; idx < header->getNumberOfTags(); ++idx)
-            {
-               ossimNitfTagInformation info;
-               header->getTagInformation(info,
-                                         idx);
-               theFileHeader->addTag(info);
-            }
-            value = header->getPropertyValueAsString("");
-            if(value.size())
-            {
-               fileHeaderProperties->setProperty("", value);
-            }
-            value = header->getPropertyValueAsString("fdt");
-            if(value.size()==14)
-            {
-               if(nitf21Flag)
-               {
-                  ossimString year(value.begin()+2, value.begin()+4);
-                  ossimString mon(value.begin()+4, value.begin()+6);
-                  ossimString day(value.begin()+6, value.begin()+8);
-                  ossimString hour(value.begin()+8, value.begin()+10);
-                  ossimString min(value.begin()+10, value.begin()+12);
-                  ossimString sec(value.begin()+12, value.begin()+14);
-                  if(mon.toUInt32() < 13)
-                  {
-                     mon = monthConversionTable[mon.toUInt32()];
-                  }
-                  fileHeaderProperties->setProperty("fdt", day+hour+min+sec+"Z"+mon+year);
-               }
-               else
-               {
-                  fileHeaderProperties->setProperty("fdt", value);
-               }
-            }
-         }
-         if(imageHeader)
-         {
-            ossim_uint32 idx = 0;
-            for(idx = 0; idx < imageHeader->getNumberOfTags(); ++idx)
-            {
-               ossimNitfTagInformation info;
-               imageHeader->getTagInformation(info,
-                                              idx);
-               theImageHeader->addTag(info);
-            }
-            value = imageHeader->getPropertyValueAsString("tgtid");
-            if(value.size())
-            {
-               imageHeaderProperties->setProperty("tgtid", value);
-            }
-            value = imageHeader->getPropertyValueAsString("isclas");
-            if(value.size())
-            {
-               imageHeaderProperties->setProperty("isclas", value);
-            }
-            value = imageHeader->getPropertyValueAsString("igeolo");
-            if(value.size())
-            {
-               imageHeaderProperties->setProperty("igeolo", value);
-            }
-            value = imageHeader->getPropertyValueAsString("ititle");
-            if(nitf21Flag)
-            {
-               value = imageHeader->getPropertyValueAsString("iid2");
-            }
-            if(value.size())
-            {
-               imageHeaderProperties->setProperty("ititle", value);
-            }
-            if(!nitf21Flag)
-            {
-               value = imageHeader->getPropertyValueAsString("iscaut");
-               if(value.size())
-               {
-                  imageHeaderProperties->setProperty("iscaut", value);
-               }
-               value = imageHeader->getPropertyValueAsString("iscode");
-               if(value.size())
-               {
-                  imageHeaderProperties->setProperty("iscode", value);
-               }
-               value = imageHeader->getPropertyValueAsString("isctlh");
-               if(value.size())
-               {
-                  imageHeaderProperties->setProperty("isctlh", value);
-               }
-               value = imageHeader->getPropertyValueAsString("isrel");
-               if(value.size())
-               {
-                  imageHeaderProperties->setProperty("isrel", value);
-               }
-               value = imageHeader->getPropertyValueAsString("isctln");
-               if(value.size())
-               {
-                  imageHeaderProperties->setProperty("isctln", value);
-               }
-               value = imageHeader->getPropertyValueAsString("isdwng");
-               if(value.size())
-               {
-                  imageHeaderProperties->setProperty("isdevt", value);
-               }
-               value = imageHeader->getPropertyValueAsString("isorce");
-               if(value.size())
-               {
-                  imageHeaderProperties->setProperty("isorce", value);
-               }
-            }
-            value = imageHeader->getPropertyValueAsString("idatim");
-            if(value.size()==14)
-            {
-               if(nitf21Flag)
-               {
-                  ossimString year(value.begin()+2, value.begin()+4);
-                  ossimString mon(value.begin()+4, value.begin()+6);
-                  ossimString day(value.begin()+6, value.begin()+8);
-                  ossimString hour(value.begin()+8, value.begin()+10);
-                  ossimString min(value.begin()+10, value.begin()+12);
-                  ossimString sec(value.begin()+12, value.begin()+14);
-                  if(mon.toUInt32() < 13)
-                  {
-                     mon = monthConversionTable[mon.toUInt32()];
-                  }
-                  imageHeaderProperties->setProperty("idatim", day+hour+min+sec+"Z"+mon+year);
-               }
-               else
-               {
-                  imageHeaderProperties->setProperty("idatim", value);
-               }
-            }
-         }
-         
-         // we will port over only a selected few 
-      }
-   }
-}
-
-bool ossimNitf20Writer::saveState(ossimKeywordlist& kwl,
-                                  const char* prefix) const
-{
-   return ossimNitfWriterBase::saveState(kwl, prefix);
-}
-
-bool ossimNitf20Writer::loadState(const ossimKeywordlist& kwl,
-                                  const char* prefix)
-{
-   return ossimNitfWriterBase::loadState(kwl, prefix);
-}
diff --git a/src/ossim/imaging/ossimNitfTileSource.cpp b/src/ossim/imaging/ossimNitfTileSource.cpp
deleted file mode 100644
index 8b5ce2f..0000000
--- a/src/ossim/imaging/ossimNitfTileSource.cpp
+++ /dev/null
@@ -1,3366 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:  Contains class definition for ossimNitfTileSource.
-// 
-//*******************************************************************
-//  $Id: ossimNitfTileSource.cpp 22354 2013-08-02 16:22:15Z gpotts $
-
-#include <ossim/imaging/ossimNitfTileSource.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimInterleaveTypeLut.h>
-#include <ossim/base/ossimPackedBits.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimBooleanProperty.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimJpegMemSrc.h>
-#include <ossim/imaging/ossimTiffTileSource.h>
-#include <ossim/imaging/ossimJpegDefaultTable.h>
-#include <ossim/base/ossim2dTo2dShiftTransform.h>
-#include <ossim/base/ossimContainerProperty.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/support_data/ossimNitfIchipbTag.h>
-#include <ossim/support_data/ossimNitfImageHeaderV2_0.h>
-#include <ossim/support_data/ossimNitfImageHeaderV2_1.h>
-#include <ossim/support_data/ossimNitfStdidcTag.h>
-#include <ossim/support_data/ossimNitfVqCompressionHeader.h>
-
-#if defined(JPEG_DUAL_MODE_8_12)
-#include <ossim/imaging/ossimNitfTileSource_12.h>
-#endif
-
-#include <jerror.h>
-#include <fstream>
-#include <algorithm> /* for std::fill */
-
-RTTI_DEF1_INST(ossimNitfTileSource, "ossimNitfTileSource", ossimImageHandler)
-
-#ifdef OSSIM_ID_ENABLED
-   static const char OSSIM_ID[] = "$Id: ossimNitfTileSource.cpp 22354 2013-08-02 16:22:15Z gpotts $";
-#endif
-   
-//---
-// NOTE:  This should match the enumerations for ReadMode.
-//---
-static const char* READ_MODE[] = { "READ_MODE_UNKNOWN",
-                                   "READ_BIB_BLOCK",
-                                   "READ_BIP_BLOCK",
-                                   "READ_BIR_BLOCK",
-                                   "READ_BSQ_BLOCK",
-                                   "READ_BIB",
-                                   "READ_BIP",
-                                   "READ_BIR",
-                                   "READ_JPEG_BLOCK" };
-
-//***
-// Static trace for debugging
-//***
-static ossimTrace traceDebug("ossimNitfTileSource:debug");
-
-// 64x64*12bits
-// divide by 8 bits to get bytes gives you 6144 bytes
-static const ossim_uint32   OSSIM_NITF_VQ_BLOCKSIZE = 6144;
-
-ossimNitfTileSource::ossimNitfTileSource()
-   :
-      ossimImageHandler(),
-      theTile(0),
-      theCacheTile(0),
-      theNitfFile(new ossimNitfFile()),
-      theNitfImageHeader(0),
-      theReadMode(READ_MODE_UNKNOWN),
-      theScalarType(OSSIM_SCALAR_UNKNOWN),
-      theSwapBytesFlag(false),
-      theNumberOfInputBands(0),
-      theNumberOfOutputBands(0),
-      theBlockSizeInBytes(0),
-      theReadBlockSizeInBytes(0),
-      theNumberOfImages(0),
-      theCurrentEntry(0),
-      theImageRect(0,0,0,0),
-      theFileStr(),
-      theOutputBandList(),
-      theCacheSize(0, 0),
-      theCacheTileInterLeaveType(OSSIM_INTERLEAVE_UNKNOWN),
-      theCacheEnabledFlag(false),
-      theCacheId(-1),
-      thePackedBitsFlag(false),
-      theCompressedBuf(0),
-      theNitfBlockOffset(0),
-      theNitfBlockSize(0),
-      m_isJpeg12Bit(false),
-      m_jpegOffsetsDirty(false)
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfTileSource::ossimNitfTileSource entered..." << endl;
-#ifdef OSSIM_ID_ENABLED
-      ossimNotify(ossimNotifyLevel_DEBUG)<< "OSSIM_ID:  " << OSSIM_ID << endl;
-#endif
-   }
-
-}
-
-ossimNitfTileSource::~ossimNitfTileSource()
-{
-   destroy();
-}
-
-void ossimNitfTileSource::destroy()
-{
-   if (theCacheId != -1)
-   {
-      ossimAppFixedTileCache::instance()->deleteCache(theCacheId);
-      theCacheId = -1;
-   }
-
-   // Delete the list of image headers.
-   theNitfImageHeader.clear();
-
-   if(theFileStr.is_open())
-   {
-      theFileStr.close();
-   }
-
-   theCacheTile = 0;
-   theTile      = 0;
-   theOverview  = 0;
- }
-
-bool ossimNitfTileSource::isOpen()const
-{
-   return (theNitfImageHeader.size() > 0);
-}
-
-bool ossimNitfTileSource::open()
-{
-   bool result = false;
-   
-   if(isOpen())
-   {
-      close();
-   }
-   
-   theErrorStatus = ossimErrorCodes::OSSIM_OK;
-
-   if ( parseFile() )
-   {
-      result = allocate();
-   }
-   if (result)
-   {
-      completeOpen();
-   }
-   
-   return result;
-}
-
-void ossimNitfTileSource::close()
-{
-   destroy();
-}
-
-bool ossimNitfTileSource::parseFile()
-{
-   static const char MODULE[] = "ossimNitfTileSource::parseFile";
-   
-   ossimFilename file = getFilename();
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " DEBUG: Nitf file =  " << file << endl;
-   }
-
-   if (file.empty())
-   {
-      setErrorStatus();
-      return false;
-   }
-
-   if ( !theNitfFile )  // A close deletes "theNitfFile".
-   {
-      theNitfFile = new ossimNitfFile();
-   }
-   
-   if ( !theNitfFile->parseFile(file) )
-   {
-      setErrorStatus();
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE << "DEBUG:" << "\nError parsing file!" << endl;
-      }
-
-      return false;
-   }
-
-   // Get the number of images within the file.
-   theNumberOfImages = theNitfFile->getHeader()->getNumberOfImages();
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << "DEBUG:\nNumber of images "
-         <<theNumberOfImages << std::endl; 
-   }
-   
-   if ( theNumberOfImages == 0 )
-   {
-      setErrorStatus();
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE << "DEBUG:\nNo images in file!" << endl;
-      }
-      
-      return false;
-   }
-   theEntryList.clear();
-   //---
-   // Get image header pointers.  Note there can be multiple images in one
-   // image file.
-   //---
-   for (ossim_uint32 i = 0; i < theNumberOfImages; ++i)
-   {
-      ossimRefPtr<ossimNitfImageHeader> hdr = theNitfFile->getNewImageHeader(i);
-      if (!hdr)
-      {
-         setErrorStatus();
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE << " ERROR:\nNull image header!" << endl;
-         }
-         
-         return false;
-      }
-      if (traceDebug())
-      {
-         if(hdr.valid())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << MODULE << "DEBUG:"
-               << "\nImage header[" << i << "]:\n" << *hdr
-               << endl;
-         }
-      }
-
-      if( !hdr->isCompressed() )
-      {
-         // Skip entries tagged NODISPLAY, e.g. cloud mask entries.
-         if (hdr->getRepresentation() != "NODISPLY")
-         {
-            theEntryList.push_back(i);
-            theNitfImageHeader.push_back(hdr);
-         }
-         else 
-         {
-            ossimString cat = hdr->getCategory().trim().downcase();
-            // this is an NGA Highr Resoluion Digital Terrain Model NITF format
-            if(cat == "dtem")
-            {
-               theEntryList.push_back(i);
-               theNitfImageHeader.push_back(hdr);
-            }
-         }
-
-      }
-      else if ( canUncompress(hdr.get()) )
-      {
-         theEntryList.push_back(i);
-         theCacheEnabledFlag = true;
-         theNitfImageHeader.push_back(hdr);
-
-         if (hdr->getBitsPerPixelPerBand() == 8)
-         {
-            m_isJpeg12Bit = false;
-         }
-         else if (hdr->getBitsPerPixelPerBand() == 12)
-         {
-           m_isJpeg12Bit = true;
-         }
-      }
-      else
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "Entry " << i
-               <<" has an unsupported compression code = "
-               << hdr->getCompressionCode() << std::endl;
-         }
-         return false;
-      }
-   }
-
-   if(theEntryList.size()<1)
-   {
-      return false;
-   }
-   
-   //### WHY IS THIS HERE? THIS CAUSED A BUG BECAUSE theCurrentEntry was previously initialized 
-   //### in loadState() according to a KWL. Any entry index in the KWL was being ignored.
-   //if(theEntryList.size()>0)
-   //{
-   //   theCurrentEntry = theEntryList[0];
-   //}
-
-   theNumberOfImages = (ossim_uint32)theNitfImageHeader.size();
-   
-   if (theNitfImageHeader.size() != theNumberOfImages)
-   {
-      setErrorStatus();
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE
-            << "DEBUG:\nNumber of header not equal number of images!"
-            << endl;
-      }
-      
-      return false;
-   }
-
-   // Check the current entry range.
-   if ( theCurrentEntry >= theNumberOfImages )
-   {
-      if(theEntryList.size())
-      {
-         theCurrentEntry = theEntryList[0];
-      }
-   }
-   
-   // Initialize the lut to the current entry if the current entry has a lut.
-   initializeLut();
-   
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " DEBUG:"
-         << "\nCurrent entry:  " << theCurrentEntry
-         << endl;
-   }
-
-
-   // Open up a stream to the file.
-   theFileStr.open(file.c_str(), ios::in | ios::binary);
-   if (!theFileStr)
-   {
-      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE << " ERROR:"
-            << "\nCannot open:  " << file.c_str() << endl;
-      }
-      return false;
-   }
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " leaving with true..." << endl;
-      
-   }
-   
-   return true;
-}
-
-bool ossimNitfTileSource::allocate()
-{
-   // Clear out the cache if there was any.
-   if (theCacheId != -1)
-   {
-      ossimAppFixedTileCache::instance()->deleteCache(theCacheId);
-      theCacheId = -1;
-   }
-
-   // Clear buffers:
-   theTile = 0;
-   theCacheTile = 0;
-   theCompressedBuf.clear();
-
-   // Set the scalar type.
-   initializeScalarType();
-   if (theScalarType == OSSIM_SCALAR_UNKNOWN)
-   {
-      return false;
-   }
-
-   // Set the swap bytes flag.
-   initializeSwapBytesFlag();
-   
-   // Set the read mode.
-   initializeReadMode();
-   if (theReadMode == READ_MODE_UNKNOWN)
-   {
-      return false;
-   }
-   
-   // Set the number of bands.
-   initializeBandCount();
-   if (theNumberOfInputBands == 0)
-   {
-      return false;
-   }
-   
-   // Initialize the image rectangle. before the cache size is done
-   if (initializeImageRect() == false)
-   {
-      return false;
-   }
-   
-   // Initialize the cache size.  Must be done before
-   // setting the blocksize.  Since bit encoded data may very
-   // and we need to know if the nitf file needs to be accessed
-   // like a general raster.
-   //
-   initializeCacheSize();
-   if ( (theCacheSize.x == 0) || (theCacheSize.y == 0) )
-   {
-      return false;
-   }
-   
-   // Initialize the block size.
-   if (initializeBlockSize() == false)
-   {
-      return false;
-   }
-
-   // Initialize the cache tile interleave type.
-   initializeCacheTileInterLeaveType();
-   if (theCacheTileInterLeaveType == OSSIM_INTERLEAVE_UNKNOWN)
-   {
-      return false;
-   }
-
-   return true;
-}
-
-bool ossimNitfTileSource::allocateBuffers()
-{
-   //---
-   // Initialize the cache tile.  This will be used for a block buffer even
-   // if the cache is disabled.
-   //---
-   initializeCacheTile();
-   if (!theCacheTile.valid())
-   {
-      return false;
-   }
-
-   // Initialize the cache if enabled.
-   if (theCacheEnabledFlag)
-   {
-      theCacheId = ossimAppFixedTileCache::instance()->
-         newTileCache(theBlockImageRect, theCacheSize);
-   }
-
-   //---
-   // Initialize the compressed buffer if needed.
-   //---
-   initializeCompressedBuf();
-
-   //---
-   // Make the output tile.
-   //---
-   initializeOutputTile();
-
-   return true;
-}
-
-bool ossimNitfTileSource::canUncompress(const ossimNitfImageHeader* hdr) const
-{
-
-   bool result = false;
-   if (hdr)
-   {
-      ossimString code = hdr->getCompressionCode();
-
-      if (code == "C3") // jpeg
-      {
-         if (hdr->getBitsPerPixelPerBand() == 8)
-         {
-            result = true;
-         }
-         else if (hdr->getBitsPerPixelPerBand() == 12)
-         {
-           result = true;
-         }
-         else
-         {
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG)
-                  << "Entry with jpeg compression (C3) has an unsupported "
-                  << "JPEG data precision: " << hdr->getBitsPerPixelPerBand()
-                  << std::endl;
-            }
-         }
-      }
-      else if(isVqCompressed( code ) &&
-              (hdr->getCompressionHeader().valid()) )
-      {
-         // we will only support single band vq compressed NITFS
-         // basically CIB and CADRG products are single band code words.
-         //
-         if(hdr->getNumberOfBands() == 1)
-         {
-            result = true;
-         }
-      }
-   }
-   return result;
-}
-
-void ossimNitfTileSource::initializeReadMode()
-{
-   // Initialize the read mode.
-   theReadMode = READ_MODE_UNKNOWN;
-   
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if (!hdr)
-   {
-      return;
-   }
-
-   ossim_uint32 numberOfBlocks = getNumberOfBlocks();
-   ossimString imode           = hdr->getIMode();
-   ossimString compressionCode = hdr->getCompressionCode();
-
-   if ( (compressionCode == "C3") && ((imode == "B")||(imode == "P")) )
-   {
-      theReadMode = READ_JPEG_BLOCK; 
-   }
-   else if (numberOfBlocks > 1)
-   {
-      if (imode == "B")
-      {
-         theReadMode = READ_BIB_BLOCK;
-      }
-      else if (imode == "P")
-      {
-         theReadMode = READ_BIP_BLOCK;
-      }
-      else if (imode == "R")
-      {
-         theReadMode = READ_BIR_BLOCK;
-      }
-      else if (imode == "S")
-      {
-         theReadMode = READ_BSQ_BLOCK;
-      }
-   }
-   else // The entire image comprises one block.
-   {
-      if (imode == "B")
-      {
-         theReadMode = READ_BIB;
-      }
-      else if (imode == "P")
-      {
-         theReadMode = READ_BIP;
-      }
-      else if (imode == "R")
-      {
-         theReadMode = READ_BIR;
-      }
-      else if (imode == "S")
-      {
-         theReadMode = READ_BSQ_BLOCK;
-      }
-   }        
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfTileSource::initializeReadMode DEBUG:"
-         << "\nnumberOfBlocks:  " << numberOfBlocks
-         << "\nIMODE:           " << imode
-         << "\nRead Mode:       " << READ_MODE[theReadMode]
-         << endl;
-   }
-}
-
-void ossimNitfTileSource::initializeScalarType()
-{
-   thePackedBitsFlag = false;
-   // Initialize the read mode.
-   theScalarType = OSSIM_SCALAR_UNKNOWN;
-   
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if (!hdr)
-   {
-      return;
-   }
-
-   ossim_int32 bitsPerPixel = hdr->getActualBitsPerPixelPerBand();
-   if (bitsPerPixel < 1)
-   {
-      bitsPerPixel = hdr->getBitsPerPixelPerBand();
-   }
-
-   ossimString pixelValueType = hdr->getPixelValueType().upcase();
-   
-   switch (bitsPerPixel)
-   {
-      case 8:
-      {
-         theScalarType = OSSIM_UINT8;
-         break;
-      }
-      case 11:
-      {
-         if(pixelValueType == "SI")
-         {
-            theScalarType = OSSIM_SINT16;
-         }
-         else
-         {
-            theScalarType = OSSIM_USHORT11;
-         }
-         break;
-      }
-      case  9:
-      case 10:
-      case 12:
-      case 13:
-      case 14:
-      case 15:
-      case 16:         
-      {
-         if(pixelValueType == "SI")
-         {
-            theScalarType = OSSIM_SINT16;
-         }
-         else
-         {
-            theScalarType = OSSIM_UINT16;
-         }
-         break;
-      }
-      case 32:
-      {
-         if(pixelValueType == "SI")
-         {
-            theScalarType = OSSIM_SINT32;
-         }
-         else if(pixelValueType == "R")
-         {
-            theScalarType = OSSIM_FLOAT32;
-         }
-         break;
-      }
-      case 64:
-      {
-         if(pixelValueType == "R")
-         {
-            theScalarType = OSSIM_FLOAT64;
-         }
-         
-         break;
-      }
-      default:
-      {
-         if(hdr->isCompressed())
-         {
-            thePackedBitsFlag = true;
-            if(bitsPerPixel < 8)
-            {
-               theScalarType = OSSIM_UINT8;
-            }
-            else if(bitsPerPixel < 16)
-            {
-               theScalarType = OSSIM_UINT16;
-            }
-            else if(bitsPerPixel < 32)
-            {
-               theScalarType = OSSIM_FLOAT32;
-            }
-         }
-         else
-         {
-            if(bitsPerPixel<8)
-            {
-               theScalarType = OSSIM_UINT8;
-            }
-         }
-         break;
-      }
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfTileSource::initializeScalarType DEBUG:"
-         << "\nScalar type:  "
-         << (ossimScalarTypeLut::instance()->getEntryString(theScalarType))
-         << "\nPacked bits:  " << (thePackedBitsFlag?"true":"false")
-         << endl;
-   }
-}
-
-void ossimNitfTileSource::initializeSwapBytesFlag()
-{
-   if ( (theScalarType != OSSIM_UINT8) &&
-        (ossim::byteOrder() == OSSIM_LITTLE_ENDIAN) )
-   {
-      theSwapBytesFlag = true;
-   }
-   else
-   {
-     theSwapBytesFlag = false;
-   }
-}
-
-void ossimNitfTileSource::initializeBandCount()
-{
-   // Initialize the read mode.
-   theNumberOfInputBands = 0;
-   theNumberOfOutputBands = 0;
-   theOutputBandList.clear();
-   
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if (!hdr)
-   {
-      return;
-   }
-
-   if(!isVqCompressed(hdr->getCompressionCode()))
-   {
-      theNumberOfInputBands = hdr->getNumberOfBands();
-      theNumberOfOutputBands = hdr->getNumberOfBands();
-      if(hdr->getRepresentation().contains("LUT")&&(theNumberOfInputBands == 1))
-      {
-         theNumberOfOutputBands = 3;
-      }
-   }
-   else 
-   {
-      ossimRefPtr<ossimNitfImageBand> bandInfo = hdr->getBandInformation(0);
-      if ( bandInfo.valid() )
-      {
-         theNumberOfInputBands = 1;
-         theNumberOfOutputBands = bandInfo->getNumberOfLuts();
-      }
-   }
-   
-   theOutputBandList.resize(theNumberOfOutputBands);
-   
-   for (ossim_uint32 i=0; i < theNumberOfOutputBands; ++i)
-   {
-      theOutputBandList[i] = i; // One to one for initial setup.
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfTileSource::initializeBandCount DEBUG:"
-         << "\nInput Band count:  " << theNumberOfInputBands
-         << "\nOutput Band count:  " << theNumberOfOutputBands
-         << endl;
-   }
-}
-
-bool ossimNitfTileSource::initializeBlockSize()
-{
-   theBlockSizeInBytes     = 0;
-   theReadBlockSizeInBytes = 0;
-   
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if (!hdr)
-   {
-      return false;
-   }
-
-   ossim_uint32 bytesRowCol = 0;
-   ossim_uint32 bytesRowColCacheTile = 0;
-
-   if(isVqCompressed(hdr->getCompressionCode()))
-   {
-      bytesRowCol = OSSIM_NITF_VQ_BLOCKSIZE;
-   }
-   else
-   {
-      bytesRowCol = (hdr->getNumberOfPixelsPerBlockHoriz()*
-                     hdr->getNumberOfPixelsPerBlockVert()*
-                     hdr->getBitsPerPixelPerBand()) / 8;
-   }
-   
-   bytesRowColCacheTile = (theCacheSize.x*
-                           theCacheSize.y*
-                           hdr->getBitsPerPixelPerBand())/8;
-
-#if 0
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG:"
-         << "\ncompressionHeader:  " << compressionHeader
-         << "\ngetNumberOfPixelsPerBlockHoriz():  "
-         << hdr->getNumberOfPixelsPerBlockHoriz()
-         << "\ngetNumberOfPixelsPerBlockVert():  "
-         << hdr->getNumberOfPixelsPerBlockVert()
-         << "\ngetBitsPerPixelPerBand():  "
-         << hdr->getBitsPerPixelPerBand()
-         << "\nbytesRowCol:  " << bytesRowCol
-         << "\nbytesRowColCacheTile:  " << bytesRowColCacheTile
-         << endl;
-   }
-#endif
-   
-   theBlockSizeInBytes = bytesRowCol;
-   theReadBlockSizeInBytes = theBlockSizeInBytes;
-   switch (theReadMode)
-   {
-      case READ_BSQ_BLOCK:
-      case READ_BIB_BLOCK:
-      {
-         break;
-      }
-      case READ_BIB:
-      {
-         theReadBlockSizeInBytes = bytesRowColCacheTile;
-         break;
-      }
-      
-      case READ_BIP_BLOCK:
-      case READ_BIR_BLOCK:
-      {
-         theBlockSizeInBytes     *= theNumberOfInputBands;
-         theReadBlockSizeInBytes *= theNumberOfInputBands;
-         break;
-      }
-      case READ_BIP:
-      case READ_BIR:   
-      {
-         theBlockSizeInBytes *= theNumberOfInputBands;
-         theReadBlockSizeInBytes = bytesRowColCacheTile*theNumberOfInputBands;
-         break;
-      }
-      case READ_JPEG_BLOCK:
-      {
-         theBlockSizeInBytes *= theNumberOfInputBands;
-         ossimString code = hdr->getCompressionCode();
-         if (code == "C3") // jpeg
-         {
-            m_jpegOffsetsDirty  = true;
-         }
-         break;
-      }
-      default:
-      {
-         return false;
-      }
-   }
-
-//#if 0
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfTileSource::initializeBlockSize DEBUG:"
-         << "\nNumber of input bands:          " << theNumberOfInputBands
-         << "\nNumber of output bands:          " << theNumberOfOutputBands
-         << "\nBlock size in bytes:      " << theBlockSizeInBytes
-         << "\nRead block size in bytes: " << theReadBlockSizeInBytes
-         << endl;
-   }
-//#endif
-
-   return true;
-}
-
-//*************************************************************************************************
-// Virtual method determines the decimation factors at each resolution level. 
-// This implementation derives the R0 decimation from the image metadata if available, then hands
-// off the computation of remaining R-levels to the base class implementation.
-//*************************************************************************************************
-void ossimNitfTileSource::establishDecimationFactors()
-{
-   theDecimationFactors.clear();
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if (hdr)
-   {
-      double decimation;
-      hdr->getDecimationFactor(decimation);
-      if ((decimation != 0.0) && !ossim::isnan(decimation))
-      {
-         //---
-         // Note: Commented out as other code is picking up the resolution and then we're applying
-         // a decimation on top of that. (drb Aug. 2011)
-         // ossimDpt dec_2d (decimation, decimation);
-         //---
-         ossimDpt dec_2d (1.0, 1.0);
-         theDecimationFactors.push_back(dec_2d);
-      }
-   }
-
-   // Just needed to set the first R level here, the base class can do the rest:
-   ossimImageHandler::establishDecimationFactors();
-}
-
-#if 0
-ossimImageGeometry* ossimNitfTileSource::getImageGeometry()
-{
-   //---
-   // Call base class getImageGeometry which will check for external geometry
-   // or an already set geometry.
-   //---
-   ossimImageGeometry* result = ossimImageHandler::getImageGeometry();
-
-   if (result)
-   {
-      if ( !result->getTransform() )
-      {
-         ossimRefPtr<ossim2dTo2dTransform> transform = 0;
-         
-         const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-         if (hdr)
-         {
-            //---
-            // Test for the ichipb tag and set the sub image if needed.
-            // 
-            // NOTE # 1:
-            // 
-            // There are nitf writers that set the ichipb offsets and only have
-            // IGEOLO field present.  For these it has been determined
-            // (but still in question) that we should not apply the sub image
-            // offset.
-            //
-            // See trac # 1578
-            // http://trac.osgeo.org/ossim/ticket/1578
-            //
-            // NOTE # 2:
-            //
-            // Let the ICHIPB have precedence over the STDIDC tag as we could
-            // have a chip of a segment.
-            //---
-            ossimRefPtr<ossimNitfRegisteredTag> tag =
-               hdr->getTagData(ossimString("ICHIPB"));
-            if (tag.valid())
-            {
-               ossimNitfIchipbTag* ichipb =
-                  PTR_CAST(ossimNitfIchipbTag, tag.get());
-               if (ichipb)
-               {
-//                  const ossimRefPtr<ossimNitfRegisteredTag> blocka =
-//                     hdr->getTagData(ossimString("BLOCKA"));
-//                  const ossimRefPtr<ossimNitfRegisteredTag> rpc00a =
-//                     hdr->getTagData(ossimString("RPC00A"));              
-//                  const ossimRefPtr<ossimNitfRegisteredTag> rpc00b =
-//                     hdr->getTagData(ossimString("RPC00B"));
-                  
-                  //---
-                  // If any of these tags are present we will use the sub
-                  // image from the ichipb tag.
-                  //---
-//                  if ( blocka.get() || rpc00a.get() || rpc00b.get() )
-                  // ************************* THERE ARE PROBLEMS NOT SETTING THIS AT SITE.  GO AHEAD AND ALWAYS INIT THE SHIFT
-                  {
-                     transform = ichipb->newTransform();
-                  }
-               }
-            }
-   
-            if ( !transform)
-            {
-               //---
-               // Look for the STDIDC tag for a sub image (segment) offset.
-               //
-               // See: STDI-002 Table 7.3 for documentation.
-               //---
-               tag = hdr->getTagData(ossimString("STDIDC"));
-               if (tag.valid() && (hdr->getIMode() == "B") )
-               {
-                  ossimDpt shift;
-                  ossimNitfStdidcTag* stdidc =
-                     PTR_CAST(ossimNitfStdidcTag, tag.get());
-                  if (stdidc)
-                  {
-                     ossim_int32 startCol = stdidc->getStartColumn().toInt32();
-                     ossim_int32 startRow = stdidc->getStartRow().toInt32();
-                     if ( (startCol > 0) && (startRow > 0) )
-                     {
-                        
-                        // field are one based; hence, the - 1.
-                        shift.x = (startCol-1) *
-                           hdr->getNumberOfPixelsPerBlockHoriz();
-                        shift.y = (startRow-1) *
-                           hdr->getNumberOfPixelsPerBlockVert();
-                     }
-                     if(shift.x > 0 ||
-                        shift.y > 0)
-                     {
-                        transform = new ossim2dTo2dShiftTransform(shift);
-                     }
-                  }
-               }
-            }
-            
-         } // matches: if (hdr)
-
-         if ( transform.valid() )
-         {
-            result->setTransform( transform.get() );
-         }
-         //else
-         //{
-         //   ossimImageGeometryRegistry::instance()->createTransform(this);
-         //}
-         
-         
-      } // matches: if ( !result->getTransform() )
-
-      if ( !result->getProjection() )
-      {
-         ossimRefPtr<ossimProjection> proj =
-            ossimProjectionFactoryRegistry::instance()->
-               createProjection(this);
-         if ( proj.valid() )
-         {
-            result->setProjection( proj.get() );
-         }
-         //else
-         //{
-         //   ossimImageGeometryRegistry::instance()->createProjection(this);
-         //}
-         
-      }
-      
-   } // matches: if (result)
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfTileSource::createImageGeometry DEBUG:\n";
-
-      if (result)
-      {
-         result->print(ossimNotify(ossimNotifyLevel_DEBUG)) << "\n";
-      }
-   }
-
-   return result;
-}
-#endif
-
-bool ossimNitfTileSource::initializeImageRect()
-{
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if (!hdr)
-   {
-      theImageRect.makeNan();
-      return false;
-   }
-   
-   theBlockImageRect = hdr->getBlockImageRect();
-   theImageRect      = hdr->getImageRect();
-
-   if (traceDebug())
-   {
-      ossimIpt iloc;
-      hdr->getImageLocation(iloc); // for temp debug (drb)
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfTileSource::initializeImageRect DEBUG:"
-         << "\noffset from ILOC field:  " << iloc
-         << "\nImage Rect:              " << theImageRect
-         << "\nBlock rect:              " << theBlockImageRect
-         << endl;
-   }
-   return true;
-}
-
-void ossimNitfTileSource::initializeCacheSize()
-{
-   theCacheSize.x = 0;
-   theCacheSize.y = 0;
-   
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if (!hdr)
-   {
-      return;
-   }
-   switch (theReadMode)
-   {
-      case READ_BIB_BLOCK:
-      case READ_BIP_BLOCK:
-      case READ_BIR_BLOCK:
-      case READ_BSQ_BLOCK:
-      case READ_JPEG_BLOCK:
-         theCacheSize.x = hdr->getNumberOfPixelsPerBlockHoriz();
-         theCacheSize.y = hdr->getNumberOfPixelsPerBlockVert();
-         break;
-
-      case READ_BIB:
-      case READ_BIP:
-      case READ_BIR:
-         theCacheSize.x = hdr->getNumberOfPixelsPerBlockHoriz();
-         theCacheSize.y = hdr->getNumberOfPixelsPerBlockVert();
-//          theCacheSize.x = getNumberOfSamples(0);
-//          theCacheSize.y = getTileHeight();
-//          if(theCacheSize.y > hdr->getNumberOfPixelsPerBlockVert())
-//          {
-//             theCacheSize.y = hdr->getNumberOfPixelsPerBlockVert();
-//          }
-         break;
-
-      default:
-         break;
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfTileSource::initializeCacheSize DEBUG:"
-         << "\nCache size:  " << theCacheSize
-         << endl;
-   }
-}
-
-void ossimNitfTileSource::initializeCacheTileInterLeaveType()
-{
-   theCacheTileInterLeaveType = OSSIM_INTERLEAVE_UNKNOWN;
-   
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if (!hdr)
-   {
-      return;
-   }
-
-   switch (theReadMode)
-   {
-      case READ_BIB_BLOCK:
-      case READ_BSQ_BLOCK:
-      case READ_BIB:
-      case READ_JPEG_BLOCK:  
-         theCacheTileInterLeaveType = OSSIM_BSQ;
-         break;
-
-      case READ_BIP_BLOCK:
-      case READ_BIP:
-         theCacheTileInterLeaveType = OSSIM_BIP;
-         break;
-
-      case READ_BIR_BLOCK:
-      case READ_BIR:
-         theCacheTileInterLeaveType = OSSIM_BIL;
-         break;
-
-      default:
-         break;
-   }
-
-   if (traceDebug())
-   {
-      ossimInterleaveTypeLut lut;
-      
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfTileSource::initializeCacheTileInterLeaveType DEBUG:"
-         << "\nCache tile interleave type:  "
-         << lut.getEntryString(theCacheTileInterLeaveType)
-         << endl;
-   }
-}
-
-void ossimNitfTileSource::initializeCacheTile()
-{
-   theCacheTile = ossimImageDataFactory::instance()->create(
-      this,
-      theScalarType,
-      theNumberOfOutputBands,
-      theCacheSize.x,
-      theCacheSize.y);
-
-   theCacheTile->initialize();
-}
-
-void ossimNitfTileSource::initializeCompressedBuf()
-{
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if (!hdr)
-   {
-      return;
-   }
-
-   if( (hdr->getRepresentation().upcase().contains("LUT")) ||
-       ( isVqCompressed(hdr->getCompressionCode()) ) )
-   {
-      theCompressedBuf.resize(theReadBlockSizeInBytes);
-      std::fill(theCompressedBuf.begin(), theCompressedBuf.end(), '\0');
-   }
-}
-
-void ossimNitfTileSource::initializeOutputTile()
-{
-   //---
-   // Make the output tile.  This implementation will use default tile size.
-   ossimImageDataFactory* idf = ossimImageDataFactory::instance();
-   theTile = idf->create(this, this);
-   theTile->initialize();
-}
-
-void ossimNitfTileSource::initializeLut()
-{
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if (hdr)
-   {
-      if ( hdr->hasLut() )
-      {
-         //---
-         // NOTE: Only band 0 ??? (drb)
-         //---
-         theLut = theNitfImageHeader[theCurrentEntry]->createLut(0);
-      }
-   }
-}
-
-ossimRefPtr<ossimImageData> ossimNitfTileSource::getTile(
-   const  ossimIrect& tileRect, ossim_uint32 resLevel)
-{
-   // This tile source bypassed, or invalid res level, return a blank tile.
-   if(!isSourceEnabled() || !isOpen() || !isValidRLevel(resLevel))
-   {
-      return ossimRefPtr<ossimImageData>();
-   }
-
-   if ( !theTile.valid() )
-   {
-      // First call to getTile:
-      allocateBuffers();
-      if ( !theTile.valid() )
-      {
-         return theTile;
-      }
-   }
-
-   // Rectangle must be set prior to getOverviewTile call.
-   theTile->setImageRectangle(tileRect);
-
-   if (resLevel)
-   {
-      if ( getOverviewTile(resLevel, theTile.get() ) )
-      {
-         return theTile;
-      }
-   }
-   
-   ossim_uint32 level = resLevel;
-   if (theStartingResLevel)  // Used as overview.
-   {
-      if (theStartingResLevel <= resLevel)
-      {
-         //---
-         // Adjust the level to be relative to the reader using this as
-         // overview.
-         //---
-         level -= theStartingResLevel; 
-      }
-   }
-
-   //---
-   // See if the whole tile is going to be filled, if not, start out with
-   // a blank tile so data from a previous load gets wiped out.
-   //---
-   if ( !tileRect.completely_within(theImageRect) )
-   {
-      // Start with a blank tile.
-      theTile->makeBlank();
-   }
-
-   //---
-   // See if any point of the requested tile is in the image.
-   //---
-   if ( tileRect.intersects(theBlockImageRect) )
-   {
-      ossimIrect clipRect = tileRect.clipToRect(theImageRect);
-            
-      // See if the requested clip rect is already in the cache tile.
-      if ( (clipRect.completely_within(theCacheTile->getImageRectangle()))&&
-           (theCacheTile->getDataObjectStatus() != OSSIM_EMPTY)&&
-           (theCacheTile->getBuf()))
-      {
-         //---
-         // Note: Clip the cache tile(nitf block) to the image clipRect since
-         // there are nitf blocks that go beyond the image dimensions, i.e.,
-         // edge blocks.
-         //---
-         ossimIrect cr =
-               theCacheTile->getImageRectangle().clipToRect(clipRect);
-         theTile->loadTile(theCacheTile->getBuf(),
-                           theCacheTile->getImageRectangle(),
-                           cr,
-                           theCacheTileInterLeaveType);
-         //---
-         // Validate the tile.  This will set the status to full, partial
-         // or empty.  Must be performed if any type of combining is to be
-         // performed down the chain.
-         //---
-         theTile->validate();
-      }
-      else
-      {
-         if ( loadTile(clipRect) == true )
-         {
-            //---
-            // Validate the tile.  This will set the status to full, partial
-            // or empty.  Must be performed if any type of combining is to be
-            // performed down the chain.
-            //---
-            theTile->validate();
-         }
-         else
-         {
-            //---
-            // Commented setting error status out for jpeg data that had several bad
-            // blocks but the rest of the image was good.  If the error status is
-            // set the overview builder stops! (drb) 10 May 2013
-            // Flag an error for callers:
-            // setErrorStatus();
-            
-            ossimNotify(ossimNotifyLevel_WARN)
-               << __FILE__ << " " << __LINE__
-               << " loadTile failed!"
-               << std::endl;
-
-            theTile->makeBlank(); // loadTile failed...
-         }
-      }
-   } // End of if ( tileRect.intersects(image_rect) )
-
-   return theTile;   
-}
-
-bool ossimNitfTileSource::loadTile(const ossimIrect& clipRect)
-{
-   ossimIrect zbClipRect  = clipRect;
-
-   const ossim_uint32 BLOCK_HEIGHT = theCacheSize.y;
-   const ossim_uint32 BLOCK_WIDTH  = theCacheSize.x;
-
-   zbClipRect.stretchToTileBoundary(ossimIpt(BLOCK_WIDTH, BLOCK_HEIGHT));
-   
-   //---
-   // Shift the upper left corner of the "clip_rect" to the an even nitf
-   // block boundry.  
-   //---
-   ossimIpt nitfBlockOrigin = zbClipRect.ul();
-
-   // Vertical block loop.
-   ossim_int32 y = nitfBlockOrigin.y;
-   while (y < zbClipRect.lr().y)
-   {
-      // Horizontal block loop.
-      ossim_int32 x = nitfBlockOrigin.x;
-      while (x < zbClipRect.lr().x)
-      {
-         if ( loadBlockFromCache(x, y, clipRect) == false )
-         {
-            if ( loadBlock(x, y) )
-            {
-               //---
-               // Note: Clip the cache tile(nitf block) to the image clipRect
-               // since there are nitf blocks that go beyond the image
-               // dimensions, i.e., edge blocks.
-               //---    
-               ossimIrect cr =
-                  theCacheTile->getImageRectangle().clipToRect(clipRect);
-               
-               theTile->loadTile(theCacheTile->getBuf(),
-                                 theCacheTile->getImageRectangle(),
-                                 cr,
-                                 theCacheTileInterLeaveType);
-            }
-            else
-            {
-               // Error loading...
-               return false;
-            }
-         }
-         
-         x += BLOCK_WIDTH; // Go to next block.
-      }
-      
-      y += BLOCK_HEIGHT; // Go to next row of blocks.
-   }
-
-   return true;
-}
-
-bool ossimNitfTileSource::loadBlockFromCache(ossim_uint32 x, ossim_uint32 y,
-                                             const ossimIrect& clipRect)
-{
-   bool result = false;
-   
-   if (theCacheEnabledFlag)
-   {
-      //---
-      // The origin set in the cache tile must have the sub image offset in it
-      // since "theTile" is relative to any sub image offset.  This is so that
-      // "theTile->loadTile(theCacheTile)" will work.
-      //---
-      ossimIpt origin(x, y);
-
-      ossimRefPtr<ossimImageData> tempTile =
-         ossimAppFixedTileCache::instance()->getTile(theCacheId, origin);
-      if (tempTile.valid())
-      {
-         //---
-         // Note: Clip the cache tile(nitf block) to the image clipRect since
-         // there are nitf blocks that go beyond the image dimensions, i.e.,
-         // edge blocks.
-         //---    
-         ossimIrect cr =
-            tempTile->getImageRectangle().clipToRect(clipRect);
-
-         theTile->loadTile(tempTile.get()->getBuf(),
-                           tempTile->getImageRectangle(),
-                           cr,
-                           theCacheTileInterLeaveType);
-         result = true;
-      }
-   }
-   
-   return result;
-}
-
-bool ossimNitfTileSource::loadBlock(ossim_uint32 x, ossim_uint32 y)
-{
-#if 0
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfTileSource::loadBlock DEBUG:"
-         << "  x:  " << x << " y:  " << y << endl;
-   }
-#endif
-   
-   //---
-   // The origin set in the cache tile must have the sub image offset in it
-   // since "theTile" is relative to any sub image offset.  This is so that
-   // "theTile->loadTile(theCacheTile)" will work.
-   //---
-   ossimIpt origin(x, y);
-    
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   theCacheTile->setOrigin(origin);
-   ossim_uint32 readSize = theReadBlockSizeInBytes;
-   if(!theCacheTile->getImageRectangle().completely_within(theBlockImageRect))
-   {
-      readSize = getPartialReadSize(origin);
-   }
-   if((hdr->hasBlockMaskRecords())||
-      (readSize != theReadBlockSizeInBytes))
-   {
-      theCacheTile->makeBlank();
-   }
-
-   switch (theReadMode)
-   {
-      case READ_BIR:  
-      case READ_BIR_BLOCK:
-      case READ_BIP:  
-      case READ_BIP_BLOCK:
-      {
-         std::streamoff p;
-         if(getPosition(p, x, y, 0))
-         {
-            theFileStr.seekg(p, ios::beg);
-            char* buf = (char*)(theCacheTile->getBuf());
-            if (!theFileStr.read(buf, readSize))
-            {
-               theFileStr.clear();
-               ossimNotify(ossimNotifyLevel_FATAL)
-                  << "ossimNitfTileSource::loadBlock BIP Read Error!"
-                  << "\nReturning error..." << endl;
-               theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-               
-               return false;
-            }
-         }
-         break;
-      }
-      case READ_BSQ_BLOCK:
-      case READ_BIB_BLOCK:
-      case READ_BIB:
-      {
-         //---
-         // NOTE:
-         // With some of these types we could do one read and get all bands.
-         // The reads are done per for future enabling on band selection
-         // at the image handler level.
-         //---
-         for (ossim_uint32 band = 0; band < theNumberOfInputBands; ++band)
-         {
-            ossim_uint8* buf =0;
-            if(isVqCompressed(hdr->getCompressionCode())||
-               hdr->getRepresentation().upcase().contains("LUT"))
-            {
-               buf = (ossim_uint8*)&(theCompressedBuf.front());
-            }
-            else
-            {
-               buf = (ossim_uint8*)(theCacheTile->getBuf(band));
-            }
-            std::streamoff p;
-            if(getPosition(p, x, y, band))
-            {
-               theFileStr.seekg(p, ios::beg);
-               if (!theFileStr.read((char*)buf, readSize))
-               {
-                  theFileStr.clear();
-                  ossimNotify(ossimNotifyLevel_FATAL)
-                     << "ossimNitfTileSource::loadBlock Read Error!"
-                     << "\nReturning error..." << endl;
-                  theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-                  return false;
-               }
-               else if(hdr->getCompressionCode() == "C4")
-               {
-                  vqUncompressC4(theCacheTile,
-                                 (ossim_uint8*)&(theCompressedBuf.front()));
-               }
-
-               else if(hdr->getCompressionCode() == "M4")
-               {
-                  vqUncompressM4(theCacheTile,
-                                 (ossim_uint8*)&(theCompressedBuf.front()));
-               }
-               else if(hdr->getRepresentation().upcase().contains("LUT"))
-               {
-                  lutUncompress(theCacheTile,
-                                (ossim_uint8*)&(theCompressedBuf.front()));
-               }
-            }
-         }
-         break;
-      }
-      case READ_JPEG_BLOCK:
-      {
-         if (uncompressJpegBlock(x, y) == false)
-         {
-            theCacheTile->makeBlank();
-            theFileStr.clear();
-            ossimNotify(ossimNotifyLevel_FATAL)
-               << "ossimNitfTileSource::loadBlock Read Error!"
-               << "\nReturning error..." << endl;
-            return false;
-         }
-         break;
-      }
-      default:
-         break;
-   }
-   
-   if(thePackedBitsFlag)
-   {
-      explodePackedBits(theCacheTile);
-   }
-   // Check for swap bytes.
-   if (theSwapBytesFlag)
-   {
-      ossimEndian swapper;
-      swapper.swap(theScalarType,
-                   theCacheTile->getBuf(),
-                   theCacheTile->getSize());
-   }
-
-   if ( !isVqCompressed(hdr->getCompressionCode()) )
-   {
-      convertTransparentToNull(theCacheTile);
-   }
-
-   // Set the origin of the cache tile.
-   theCacheTile->validate();
-   if (theCacheEnabledFlag)
-   {
-      // Add it to the cache for the next time.
-      ossimAppFixedTileCache::instance()->addTile(theCacheId, theCacheTile);
-   }
-   
-   return true;
-}
-
-void ossimNitfTileSource::explodePackedBits(ossimRefPtr<ossimImageData> packedBuffer)const
-{
-   ossim_uint8* tempBuf = new ossim_uint8[packedBuffer->getSizePerBandInBytes()];
-   ossim_uint32 idx      = 0;
-   ossim_uint32 bandIdx  = 0;
-   ossim_uint32 h = packedBuffer->getHeight();
-   ossim_uint32 w = packedBuffer->getWidth();
-   ossim_uint32 maxIdx = w*h;
-   ossim_uint32 bandCount = packedBuffer->getNumberOfBands();
-   switch(packedBuffer->getScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         
-         ossim_uint8* outputBuf = (ossim_uint8*)tempBuf;
-         for(bandIdx = 0; bandIdx < bandCount; ++bandIdx)
-         {
-            ossimPackedBits packedBits((ossim_uint8*)packedBuffer->getBuf(bandIdx),
-                                           getCurrentImageHeader()->getBitsPerPixelPerBand());
-            for(idx = 0; idx < maxIdx; ++idx)
-            {
-               *outputBuf = (ossim_uint8)packedBits.getValueAsUint32(idx);
-               ++outputBuf;
-            }
-            
-            memcpy((char*)packedBuffer->getBuf(bandIdx),
-                   (char*)tempBuf,
-                   theCacheTile->getSizePerBandInBytes()*bandCount);
-         }
-         break;
-      }
-      case OSSIM_UINT16:
-      {
-         
-         ossim_uint16* outputBuf = (ossim_uint16*)tempBuf;
-         for(bandIdx = 0; bandIdx < bandCount; ++bandIdx)
-         {
-            ossimPackedBits packedBits((ossim_uint8*)packedBuffer->getBuf(bandIdx),
-                                           getCurrentImageHeader()->getBitsPerPixelPerBand());
-            for(idx = 0; idx < maxIdx; ++idx)
-            {
-               *outputBuf = (ossim_uint16)packedBits.getValueAsUint32(idx);
-               ++outputBuf;
-            }
-            
-            memcpy((char*)packedBuffer->getBuf(bandIdx),
-                   (char*)tempBuf,
-                   theCacheTile->getSizePerBandInBytes()*bandCount);
-         }
-         break;
-      }
-      case OSSIM_FLOAT:
-      {
-         ossim_float32* outputBuf = (ossim_float32*)tempBuf;
-         for(bandIdx = 0; bandIdx < bandCount; ++bandIdx)
-         {
-            ossimPackedBits packedBits((ossim_uint8*)packedBuffer->getBuf(bandIdx),
-                                           getCurrentImageHeader()->getBitsPerPixelPerBand());
-            for(idx = 0; idx < maxIdx; ++idx)
-            {
-               *outputBuf = (ossim_float32)packedBits.getValueAsUint32(idx);
-               ++outputBuf;
-            }
-            
-            memcpy((char*)packedBuffer->getBuf(bandIdx),
-                   (char*)tempBuf,
-                   theCacheTile->getSizePerBandInBytes()*bandCount);
-         }
-         break;
-      }
-      default:
-      {
-         break;
-      }
-   }
-   delete [] tempBuf;
-}
-
-void ossimNitfTileSource::convertTransparentToNull(ossimRefPtr<ossimImageData> tile)const
-{
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-
-   if(!hdr||!tile) return;
-
-   if(!tile->getBuf()) return;
-   ossimIpt tempOrigin = tile->getOrigin();
-   ossim_uint32 blockNumber = getBlockNumber(tempOrigin);
-   ossim_uint32 numberOfBands = tile->getNumberOfBands();
-   ossim_uint32 band = 0;
-
-   if(hdr->hasPadPixelMaskRecords())
-   {
-      if(hdr->hasTransparentCode())
-      {
-         ossim_uint32 idx = 0;
-         ossim_uint32 maxIdx = tile->getWidth()*tile->getHeight();
-         
-         for (band = 0; band < numberOfBands; ++band)
-         {
-            if(hdr->getPadPixelMaskRecordOffset(blockNumber,
-                                                band)!=0xffffffff)
-            {
-               switch(tile->getScalarType())
-               {
-                  case OSSIM_UINT8:
-                  {
-                     ossim_uint8 transparentValue = hdr->getTransparentCode();
-                     ossim_uint8* buf = (ossim_uint8*)tile->getBuf(band);
-                     ossim_uint8 nullPix = (ossim_uint8)tile->getNullPix(band);
-                     for(idx = 0; idx < maxIdx; ++idx)
-                     {
-                        if(*buf == transparentValue)
-                        {
-                           *buf = nullPix;
-                        }
-                        ++buf;
-                     }
-                     break;
-                  }
-                  case OSSIM_USHORT11:
-                  case OSSIM_UINT16:
-                  {
-                     ossim_uint16 transparentValue = hdr->getTransparentCode();
-                     ossim_uint16* buf = (ossim_uint16*)tile->getBuf(band);
-                     ossim_uint16 nullPix = (ossim_uint16)tile->getNullPix(band);
-                     for(idx = 0; idx < maxIdx; ++idx)
-                     {
-                        if(*buf == transparentValue)
-                        {
-                           *buf = nullPix;
-                        }
-                        ++buf;
-                     }
-                     break;
-                  }
-                  case OSSIM_SINT16:
-                  {
-                     ossim_sint16 transparentValue = hdr->getTransparentCode();
-                     ossim_sint16* buf = (ossim_sint16*)tile->getBuf(band);
-                     ossim_sint16 nullPix = (ossim_sint16)tile->getNullPix(band);
-                     for(idx = 0; idx < maxIdx; ++idx)
-                     {
-                        if(*buf == transparentValue)
-                        {
-                           *buf = nullPix;
-                        }
-                        ++buf;
-                     }
-                     break;
-                  }
-                  default:
-                  {
-                     break;
-                  }
-               }
-            }
-         }
-      }
-   }
-}
-
-
-double ossimNitfTileSource::getMinPixelValue(ossim_uint32 band)const
-{
-   double result = ossimImageHandler::getMinPixelValue(band);
-
-   if(thePackedBitsFlag)
-   {
-      if(result < 1.0) result = 1.0;
-   }
-   
-   return result;
-}
-
-double ossimNitfTileSource::getMaxPixelValue(ossim_uint32 band)const
-{
-   double result = ossimImageHandler::getMaxPixelValue(band);
-
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if(hdr)
-   {
-      if(thePackedBitsFlag)
-      {
-         double test = 1<<(hdr->getBitsPerPixelPerBand());
-         
-         if(result > test) result = test;
-      }
-      else
-      {
-         ossim_int32 bitsPerPixel = hdr->getActualBitsPerPixelPerBand();
-         switch (bitsPerPixel)
-         {
-            case 11:
-            {
-               if (result > 2047.0)
-               {
-                  result = 2047.0;
-               }
-               break;
-            }
-            case 12:
-            {
-               if (result > 4095.0)
-               {
-                  result = 4095.0;
-               }
-               break;
-            }
-            default:
-               break;
-         }
-      }
-   }
-
-   return result;
-}
-
-double ossimNitfTileSource::getNullPixelValue(ossim_uint32 band)const
-{
-   double result = ossimImageHandler::getNullPixelValue(band);
-
-   if(thePackedBitsFlag)
-   {
-      if((result < 0) ||
-         (result > getMaxPixelValue(band)))
-         {
-            result = 0.0;
-         }
-   }
-
-
-   return result;
-}
-
-
-bool ossimNitfTileSource::getPosition(std::streamoff& streamPosition,
-                                      ossim_uint32 x,
-                                      ossim_uint32 y,
-                                      ossim_uint32 band) const
-{
-   //
-   // NOTE:  "theCacheSize is always relative to a block size except in
-   // the case where a block is the entire image.
-   //
-   streamPosition = 0;
-   
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if (!hdr)
-   {
-      return streamPosition;
-   }
-
-   ossim_uint64 blockNumber = getBlockNumber(ossimIpt(x,y));
-   
-#if 0
-   cout << "ossimNitfTileSource::getPosition blockNumber:  "
-        << blockNumber << endl;
-#endif
-   
-   streamPosition = (std::streamoff)hdr->getDataLocation(); // Position to first block.
-   if(hdr->hasBlockMaskRecords())
-   {
-      ossim_uint64 blockOffset = hdr->getBlockMaskRecordOffset(blockNumber,
-                                                               band);
-      if(blockOffset == 0xffffffff)
-      {
-         return false;
-      }
-      streamPosition += blockOffset;
-   }
-   
-   switch (theReadMode)
-   {
-      case READ_BIB_BLOCK:
-      {
-         if(!hdr->hasBlockMaskRecords())
-         {
-            streamPosition +=
-            (std::streamoff)((ossim_uint64)blockNumber * 
-                (ossim_uint64)getBlockOffset()) +
-               ((ossim_uint64)getBandOffset() * band);
-         }
-         else
-         {
-            streamPosition += (std::streamoff)((ossim_uint64)getBandOffset() * (ossim_uint64)band);
-            
-         }
-         break;
-      }
-      
-      case READ_BIB:
-      {
-         streamPosition +=
-         (std::streamoff) ((ossim_uint64)blockNumber * (ossim_uint64)theReadBlockSizeInBytes)+
-            ((ossim_uint64)getBandOffset() * (ossim_uint64)band);
-         break;
-      }
-      
-      case READ_BSQ_BLOCK:
-      {
-         
-         if(!hdr->hasBlockMaskRecords())
-         {
-            streamPosition += (std::streamoff)((ossim_uint64)blockNumber * 
-                                               (ossim_uint64)getBlockOffset()) +
-                                              ((ossim_uint64)getBandOffset() * 
-                                               (ossim_uint64)band);
-         }
-         
-         break;
-      }
-      case READ_JPEG_BLOCK:
-      {
-         streamPosition += (std::streamoff)((ossim_uint64)blockNumber * (ossim_uint64)theReadBlockSizeInBytes);
-         break;
-      }
-      default:
-      {
-         if(!hdr->hasBlockMaskRecords())
-         {
-            streamPosition += (std::streamoff)((ossim_uint64)blockNumber*(ossim_uint64)getBlockOffset());
-         }
-         
-         break;
-      }
-   }
-
-   return true;
-}
-
-std::streampos ossimNitfTileSource::getBandOffset() const
-{
-   std::streampos bandOffset = 0;
-
-   switch (theReadMode)
-   {
-      case READ_BIB_BLOCK:
-      case READ_BIP_BLOCK:
-      case READ_BIR_BLOCK:
-      case READ_BIB:
-      case READ_BIP:
-      case READ_BIR:
-         bandOffset = theBlockSizeInBytes;
-         break;
-         
-      case READ_BSQ_BLOCK:
-         bandOffset = getNumberOfBlocks() * theBlockSizeInBytes;
-         break;
-
-      default:
-         break;
-   }
-
-   return bandOffset;
-}
-
-std::streampos ossimNitfTileSource::getBlockOffset() const
-{
-   std::streampos blockOffset = 0;
-   std::streampos blockSizeInBytes = 0;
-   if (getNumberOfBlocks() == 1)
-   {
-      blockSizeInBytes = theReadBlockSizeInBytes;
-   }
-   else
-   {
-      blockSizeInBytes = theBlockSizeInBytes;
-   }
-   
-   switch (theReadMode)
-   {
-      case READ_BIB_BLOCK:
-      case READ_BIB:
-         // Band interleaved by block.
-         blockOffset = blockSizeInBytes * theNumberOfInputBands;
-         break;
-         
-      case READ_BIR_BLOCK:
-      case READ_BSQ_BLOCK:
-      case READ_BIP_BLOCK:
-      case READ_BIP:
-      case READ_BIR:
-         // Blocks side by side.
-         blockOffset = blockSizeInBytes;
-         break;
-      case READ_JPEG_BLOCK:
-        blockSizeInBytes = theReadBlockSizeInBytes;
-        break;
-   
-      default:
-         break;
-   }
-
-   return blockOffset;
-}
-   
-ossim_uint32 ossimNitfTileSource::getNumberOfBlocks() const
-{
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if (!hdr)
-   {
-      return 0;
-   }
-
-   return static_cast<ossim_uint32>( hdr->getNumberOfBlocksPerRow() *
-                                     hdr->getNumberOfBlocksPerCol() );
-}
-
-bool ossimNitfTileSource::loadState(const ossimKeywordlist& kwl,
-                                    const char* prefix)
-{
-   if ( !ossimImageHandler::loadState(kwl, prefix) )
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfTileSource::loadState(kwl, prefix) DEBUG:"
-            << "\nUnable to load, exiting..." << std::endl;
-      }
-      return false;
-   }
-   
-   const char* lookup = kwl.find(prefix, "entry");
-   if (lookup)
-   {
-      ossimString s(lookup);
-      theCurrentEntry = s.toUInt32();
-   }
-
-   lookup = kwl.find(prefix,ossimKeywordNames::ENABLE_CACHE_KW);
-   if (lookup)
-   {
-      ossimString s(lookup);
-      theCacheEnabledFlag = s.toBool();
-   }
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfTileSource::loadState(kwl, prefix) DEBUG:"
-         << "\nCurrent entry:      " << theCurrentEntry
-         << "\nCache enable flag:  " << theCacheEnabledFlag
-         << std::endl;
-   }
-   
-   return open();
-}
-
-bool ossimNitfTileSource::saveState(ossimKeywordlist& kwl,
-                                    const char* prefix) const
-{
-   // Add the entry number.
-   kwl.add(prefix, "entry", theCurrentEntry, true);
-
-   // Add the cache_enable flag.
-   kwl.add(prefix, ossimKeywordNames::ENABLE_CACHE_KW, theCacheEnabledFlag, true);
-
-   // Call the base class save state.
-   return ossimImageHandler::saveState(kwl, prefix);
-}
-
-ossimScalarType ossimNitfTileSource::getOutputScalarType() const
-{
-   return theScalarType;
-}
-
-ossim_uint32 ossimNitfTileSource::getTileWidth() const
-{
-   ossim_uint32 result = 0;
-   if(!theCacheSize.hasNans()&& theCacheSize.x > 0)
-   {
-      result = theCacheSize.x;
-   }
-   else
-   {
-      ossimIpt tileSize;
-      ossim::defaultTileSize(tileSize);
-      result = static_cast<ossim_uint32>(tileSize.x);
-   }
-   return result;
-}
-
-ossim_uint32 ossimNitfTileSource::getTileHeight() const
-{
-   ossim_uint32 result = 0;
-   if(!theCacheSize.hasNans()&& theCacheSize.y > 0)
-   {
-      result = theCacheSize.y;
-   }
-   else
-   {
-      ossimIpt tileSize;
-      ossim::defaultTileSize(tileSize);
-      result = static_cast<ossim_uint32>(tileSize.y);
-   }
-   return result;
-}
-
-ossim_uint32 ossimNitfTileSource::getNumberOfInputBands() const
-{
-   return theNumberOfInputBands;
-}
-
-ossim_uint32 ossimNitfTileSource::getNumberOfOutputBands() const
-{
-   return theNumberOfOutputBands;
-}
-
-ossim_uint32 ossimNitfTileSource::getNumberOfLines(ossim_uint32 resLevel) const
-{
-   ossim_uint32 result = 0;
-   if (resLevel == 0)
-   {
-      const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-      if (hdr)
-      {
-         result = hdr->getNumberOfRows();
-      }
-   }
-   else if (theOverview.valid())
-   {
-      result = theOverview->getNumberOfLines(resLevel);
-   }
-   return result;
-}
-
-ossim_uint32 ossimNitfTileSource::getNumberOfSamples(ossim_uint32 resLevel) const
-{
-   ossim_uint32 result = 0;
-   if (resLevel == 0)
-   {
-      const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-      if (hdr)
-      {
-         result = hdr->getNumberOfCols();
-      }
-   }
-   else if (theOverview.valid())
-   {
-      result = theOverview->getNumberOfSamples(resLevel);
-   }
-   return result;
-}
-
-ossim_uint32 ossimNitfTileSource::getBlockNumber(const ossimIpt& block_origin) const
-{
-   ossim_uint32 blockNumber = 0;
-   
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if (!hdr)
-   {
-      return blockNumber; 
-   }
-
-   ossim_uint32 blockY;
-   ossim_uint32 blockX;
-   blockX  = (block_origin.x /
-              theCacheSize.x);
-   blockY= (block_origin.y /
-            theCacheSize.y);
-
-   switch (theReadMode)
-   {
-      case READ_BIB_BLOCK:
-      case READ_BIP_BLOCK:
-      case READ_BIR_BLOCK:
-      case READ_BSQ_BLOCK:
-      case READ_JPEG_BLOCK:
-      {
-         blockNumber = ((blockY*hdr->getNumberOfBlocksPerRow()) +
-                        blockX);
-         break;
-      }
-      case READ_BIB:
-      case READ_BIP:
-      case READ_BIR:
-         //---
-         // These read modes are for a single block image.  The cache size will
-         // be set to the width of the image (block) by the height of one tile.
-         //
-         // This is to avoid reading an entire large image with a single block
-         // into memory.
-         //---
-         blockNumber = blockY;
-         break;
-
-      default:
-         break;
-   }
-   return blockNumber;
-}
-
-ossim_uint32 ossimNitfTileSource::getPartialReadSize(const ossimIpt& /* blockOrigin */)const
-{
-   ossim_uint32 result = 0;
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if (!hdr)
-   {
-      return result;
-   }
-   
-   if(theCacheTile->getImageRectangle().completely_within(theBlockImageRect))
-   {
-      return theReadBlockSizeInBytes;
-   }
-   ossimIrect clipRect = theCacheTile->getImageRectangle().clipToRect(theBlockImageRect);
-   
-   result = (theCacheSize.x*
-             clipRect.height()*
-             hdr->getBitsPerPixelPerBand())/8;
-   
-   switch (theReadMode)
-   {
-      case READ_BSQ_BLOCK:
-      case READ_BIB_BLOCK:
-      case READ_BIB:
-      {
-         // purposely left blank.  only hear for clarity.
-         break;
-      }
-
-      case READ_BIP_BLOCK:
-      case READ_BIR_BLOCK:
-      case READ_BIP:
-      case READ_BIR:   
-      {
-         result *= theNumberOfInputBands;
-         break;
-      }
-      default:
-      {
-         break;
-      }
-   }
-   return result;
-}
-
-bool ossimNitfTileSource::isVqCompressed(const ossimString& compressionCode)const
-{
-   return((compressionCode == "C4")||
-          (compressionCode == "M4"));
-}
-
-
-ossim_uint32 ossimNitfTileSource::getImageTileWidth() const
-{
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if (!hdr)
-   {
-      return 0;
-   }
-   return hdr->getNumberOfPixelsPerBlockHoriz();
-}
-
-ossim_uint32 ossimNitfTileSource::getImageTileHeight() const
-{
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if (!hdr)
-   {
-      return 0;
-   }
-   return hdr->getNumberOfPixelsPerBlockVert();
-}
-
-ossimString ossimNitfTileSource::getShortName()const
-{
-   return ossimString("nitf");
-}
-
-ossimString ossimNitfTileSource::getLongName()const
-{
-   return ossimString("nitf reader");
-}
-
-ossim_uint32 ossimNitfTileSource::getCurrentEntry() const
-{
-   return theCurrentEntry;
-}
-
-ossim_uint32 ossimNitfTileSource::getNumberOfEntries() const
-{
-   return (ossim_uint32)theEntryList.size();
-}
-
-void ossimNitfTileSource::getEntryList(std::vector<ossim_uint32>& entryList)const
-{
-   entryList = theEntryList;
-//    entryList.resize(theNumberOfImages);
-//    for (ossim_uint32 i = 0; i < theNumberOfImages; ++i)
-//    {
-//       entryList[i] = i;
-//    }
-}
-
-bool ossimNitfTileSource::setCurrentEntry(ossim_uint32 entryIdx)
-{
-   bool result = true;
-   if (theCurrentEntry != entryIdx)
-   {
-      if ( isOpen() )
-      {
-         if ( entryIdx < theNumberOfImages )
-         {
-            // Clear the geometry.
-            theGeometry = 0;
-            
-            // Must clear or openOverview will use last entries.
-            theOverviewFile.clear();
-            
-            theCurrentEntry = entryIdx;
-            
-            //---
-            // Since we were previously open and the the entry has changed we
-            // need to reinitialize some things.
-            //---
-            result = allocate();
-            if (result)
-            {
-               completeOpen();
-            }
-         }
-         else
-         {
-            result = false; // Entry index out of range.
-         }
-      }
-      else
-      {
-         //---
-         // Not open.
-         // Allow this knowing that the parseFile will check for out of range.
-         //---
-         theCurrentEntry = entryIdx;
-      }
-   }
-   
-   if(result)
-   {
-      if(theNitfImageHeader[theCurrentEntry]->getRepresentation().contains("LUT"))
-      {
-         theLut = theNitfImageHeader[theCurrentEntry]->createLut(0);
-      }
-      
-      
-   }
-   return result;
-}
-
-bool ossimNitfTileSource::getCacheEnabledFlag() const
-{
-   return theCacheEnabledFlag;
-}
-
-void ossimNitfTileSource::setCacheEnabledFlag(bool flag)
-{
-   if (flag != theCacheEnabledFlag)
-   {
-      // State of caching has changed...
-
-      theCacheEnabledFlag = flag;
-
-      if ( theCacheEnabledFlag) // Cache enabled.
-      {
-         theCacheId = ossimAppFixedTileCache::instance()->
-            newTileCache(theBlockImageRect, theCacheSize);
-      }
-      else // Cache disabled...
-      {
-         // Clean out the cache if there was one.
-         if (theCacheId != -1)
-         {
-            ossimAppFixedTileCache::instance()->deleteCache(theCacheId);
-            theCacheId = -1;
-         }
-      }
-   }
-}
-
-const ossimNitfFileHeader* ossimNitfTileSource::getFileHeader()const
-{
-   if(theNitfFile.valid())
-   {
-      return theNitfFile->getHeader();
-   }
-   
-   return 0;
-}
-
-ossimNitfFileHeader* ossimNitfTileSource::getFileHeader()
-{
-   if(theNitfFile.valid())
-   {
-      return theNitfFile->getHeader();
-   }
-   
-   return 0;
-}
-
-const ossimNitfImageHeader* ossimNitfTileSource::getCurrentImageHeader() const
-{
-   if(theNitfImageHeader.size())
-   {
-      return theNitfImageHeader[theCurrentEntry].get();
-   }
-   
-   return 0;
-}
-
-ossimNitfImageHeader* ossimNitfTileSource::getCurrentImageHeader()
-{
-   if(theNitfImageHeader.size())
-   {
-      return theNitfImageHeader[theCurrentEntry].get();
-   }
-   
-   return 0;
-}
-
-void ossimNitfTileSource::setBoundingRectangle(const ossimIrect& imageRect)
-{
-   theImageRect = imageRect;
-   // now shift the internal block rect as well
-   theBlockImageRect = (theBlockImageRect - theBlockImageRect.ul());
-}
-
-ossimRefPtr<ossimProperty> ossimNitfTileSource::getProperty(const ossimString& name)const
-{
-   if (name == ossimKeywordNames::ENABLE_CACHE_KW)
-   {
-      ossimProperty* p = new ossimBooleanProperty(name, theCacheEnabledFlag);
-      return ossimRefPtr<ossimProperty>(p);
-   }
-   else 
-   {
-      if(theNitfFile.valid())
-      {
-         if(theNitfFile->getHeader())
-         {
-            ossimRefPtr<ossimProperty> p = theNitfFile->getHeader()->getProperty(name);
-            if(p.valid())
-            {
-               p->setReadOnlyFlag(true);
-               return p;
-            }
-         }
-      }
-      const ossimNitfImageHeader* imageHeader = getCurrentImageHeader();
-      if(imageHeader)
-      {
-         ossimRefPtr<ossimProperty> p = imageHeader->getProperty(name);
-         if(p.valid())
-         {
-            p->setReadOnlyFlag(true);
-            return p;
-         }
-      }
-   }
-
-   return ossimImageHandler::getProperty(name);
-}
-
-void ossimNitfTileSource::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if (!property) return;
-   
-   ossimString name = property->getName();
-
-   if (name == ossimKeywordNames::ENABLE_CACHE_KW)
-   {
-      ossimBooleanProperty* obj = PTR_CAST(ossimBooleanProperty,
-                                           property.get());
-      if (obj)
-      {
-         setCacheEnabledFlag(obj->getBoolean());
-      }
-   }
-   else
-   {
-      ossimImageHandler::setProperty(property);
-   }
-}
-
-void ossimNitfTileSource::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageHandler::getPropertyNames(propertyNames);
-   propertyNames.push_back(ossimKeywordNames::ENABLE_CACHE_KW);
-   if(theNitfFile->getHeader())
-   {
-      theNitfFile->getHeader()->getPropertyNames(propertyNames);
-   }
-   const ossimNitfImageHeader* imageHeader = getCurrentImageHeader();
-   if(imageHeader)
-   {
-      imageHeader->getPropertyNames(propertyNames);
-   }
-}
-
-ossimString ossimNitfTileSource::getSecurityClassification() const
-{
-   if(getCurrentImageHeader())
-   {
-      return getCurrentImageHeader()->getSecurityClassification();
-   }
-   
-   return "U";
-}
-
-void ossimNitfTileSource::lutUncompress(ossimRefPtr<ossimImageData> destination, ossim_uint8* source)
-{
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if (!hdr||!destination)
-   {
-      return;
-   }
-   if((destination->getNumberOfBands()<3)||
-      (!destination->getBuf())||
-      (destination->getScalarType()!=OSSIM_UINT8)||
-      (!theLut.valid()))
-   {
-      return;
-   }
-
-   if(destination->getNumberOfBands()!=theLut->getNumberOfBands())
-   {
-      return;
-   }
-   
-   ossim_uint8* tempRows[3];
-   tempRows[0] = (ossim_uint8*)destination->getBuf(0);
-   tempRows[1] = (ossim_uint8*)destination->getBuf(1);
-   tempRows[2] = (ossim_uint8*)destination->getBuf(2);
-   
-   ossim_uint8* srcPtr = source;
-   ossim_uint32 compressionYidx   = 0;
-   ossim_uint32 compressionXidx   = 0;
-   ossim_uint32 uncompressIdx     = 0;
-   ossim_uint32 h = destination->getHeight();
-   ossim_uint32 w = destination->getWidth();
-   
-   for(compressionYidx = 0; compressionYidx < h; ++compressionYidx)
-   {
-      for(compressionXidx = 0; compressionXidx < w; ++compressionXidx)
-      {
-         tempRows[0][uncompressIdx] = (*theLut)[*srcPtr][0];
-         tempRows[1][uncompressIdx] = (*theLut)[*srcPtr][1];
-         tempRows[2][uncompressIdx] = (*theLut)[*srcPtr][2];
-         ++srcPtr;
-         ++uncompressIdx;
-      }
-   }
-}
-
-void ossimNitfTileSource::vqUncompressC4(
-   ossimRefPtr<ossimImageData> destination, ossim_uint8* source)
-{
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if (!hdr||!destination)
-   {
-      return;
-   }
-
-   const ossim_uint32 BANDS = destination->getNumberOfBands();
-
-   if( ( (BANDS != 1) && (BANDS!=3) ) ||
-       (!destination->getBuf()) ||
-       (destination->getScalarType()!=OSSIM_UINT8) ||
-       !theLut.valid() ||
-       (theLut->getNumberOfBands() != BANDS) )
-   {
-      return;
-   }
-   
-   ossimNitfVqCompressionHeader* compressionHeader =
-      PTR_CAST(ossimNitfVqCompressionHeader,
-               hdr->getCompressionHeader().get());
-
-   if(!compressionHeader)
-   {
-      return;
-   }
-   
-   const std::vector<ossimNitfVqCompressionOffsetTableData>& table =
-      compressionHeader->getTable();
-
-   ossimRefPtr<ossimNitfImageBand> bandInfo = hdr->getBandInformation(0);
-   
-   if(!bandInfo.valid()) return;
-   
-   std::vector<ossimRefPtr<ossimNitfImageLut> > luts(BANDS);
-   std::vector<ossim_uint8*> tempRows(BANDS);
-   
-   ossim_uint32 band;
-   for (band =0; band<BANDS; ++band)
-   {
-      luts[band] = bandInfo->getLut(band);
-      if ( luts[band].valid() )
-      {
-         tempRows[band] = (ossim_uint8*)destination->getBuf(band);
-      }
-      else
-      {
-         return;
-      }
-   }
-
-   ossimPackedBits bits(source, compressionHeader->getImageCodeBitLength());
-
-
-   const ossim_uint32 ROWS = static_cast<ossim_uint32>(table.size());
-   const ossim_uint32 COLS =
-      static_cast<ossim_uint32>(table[0].
-                                theNumberOfValuesPerCompressionLookup);
-   const ossim_uint32 COMPRESSION_HEIGHT =
-      compressionHeader->getNumberOfImageRows();
-   const ossim_uint32 COMPRESSION_WIDTH  =
-      compressionHeader->getNumberOfImageCodesPerRow();
-   ossim_uint32 DEST_WIDTH  = destination->getWidth();
-   
-   ossim_uint32 compressionIdx = 0;
-   ossim_uint32 uncompressIdx  = 0;
-   ossim_uint32 uncompressYidx = 0;
-   ossim_uint8  lutValue = 0;
-   ossim_uint8* data     = 0;
-   ossim_uint32 codeWord = 0;
-   
-   for(ossim_uint32 compressionYidx = 0;
-       compressionYidx < COMPRESSION_HEIGHT;
-       ++compressionYidx)
-   {
-      uncompressYidx = compressionYidx * ROWS * DEST_WIDTH;
-      
-      for(ossim_uint32 compressionXidx = 0;
-          compressionXidx < COMPRESSION_WIDTH;
-          ++compressionXidx)
-      {
-         uncompressIdx = uncompressYidx + COLS * compressionXidx;
-
-         codeWord = bits.getValueAsUint32(compressionIdx++);
-         codeWord *= COLS;
-
-         for(ossim_uint32 rowIdx = 0; rowIdx < ROWS; ++rowIdx)
-         {
-            data = &(table[rowIdx].theData[codeWord]);
-            
-            for(ossim_uint32 colIdx = 0; colIdx < COLS; ++colIdx)
-            {
-               lutValue = (*data)&0xff;
-
-               for (band = 0; band < BANDS; ++band)
-               {
-                  ossim_uint8 p = (*theLut.get())[lutValue][band];
-                  tempRows[band][uncompressIdx+colIdx] = p;
-               }
-               ++data;
-               
-            } // column loop
-
-            uncompressIdx += DEST_WIDTH;
-            
-         } // row loop
-
-      } // x compression loop
-      
-   } // y compression loop
-}
-
-void ossimNitfTileSource::vqUncompressM4(
-   ossimRefPtr<ossimImageData> destination, ossim_uint8* source)
-{
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if (!hdr||!destination)
-   {
-      return;
-   }
-
-   const ossim_uint32 BANDS = destination->getNumberOfBands();
-
-   if(( (BANDS != 1)&&(BANDS!=3) ) ||
-      (!destination->getBuf())||
-      (destination->getScalarType()!=OSSIM_UINT8))
-   {
-      return;
-   }
-   
-   ossimNitfVqCompressionHeader* compressionHeader =
-      PTR_CAST(ossimNitfVqCompressionHeader,
-               hdr->getCompressionHeader().get());
-
-   if(!compressionHeader)
-   {
-      return;
-   }
-
-   const std::vector<ossimNitfVqCompressionOffsetTableData>& table =
-      compressionHeader->getTable();
-
-   ossimRefPtr<ossimNitfImageBand> bandInfo = hdr->getBandInformation(0);
-   
-   if(!bandInfo.valid()) return;
-   
-   std::vector<ossimRefPtr<ossimNitfImageLut> > luts(BANDS);
-   std::vector<ossim_uint8*> tempRows(BANDS);
-
-   ossim_uint32 band;
-   for (band =0; band<BANDS; ++band)
-   {
-      luts[band] = bandInfo->getLut(band);
-      if ( luts[band].valid() )
-      {
-         tempRows[band] = (ossim_uint8*)destination->getBuf(band);
-      }
-      else
-      {
-         return;
-      }
-   }
-
-   const ossim_uint8 NI = 216; // null index (transparency index).
-   const ossim_uint8 NP = 0;   // null pixel
-
-   ossim_uint32 destWidth  = destination->getWidth();
-   ossimPackedBits bits(source, compressionHeader->getImageCodeBitLength());
-
-   ossim_uint32 compressionYidx   = 0;
-   ossim_uint32 compressionXidx   = 0;
-   ossim_uint32 compressionIdx    = 0;
-   ossim_uint32 uncompressIdx     = 0;
-   ossim_uint32 uncompressYidx    = 0;
-   ossim_uint32 rows   = (ossim_uint32)table.size();
-   ossim_uint32 cols   = 0;
-   ossim_uint32 rowIdx = 0;
-   ossim_uint32 colIdx = 0;
-   if(rows)
-   {
-      cols = table[0].theNumberOfValuesPerCompressionLookup;
-   }
-   ossim_uint32 compressionHeight = compressionHeader->getNumberOfImageRows();
-   ossim_uint32 compressionWidth  =
-      compressionHeader->getNumberOfImageCodesPerRow();
-   ossim_uint8 lutValue = 0;
-   ossim_uint8* data=0;
-
-   for(compressionYidx = 0;
-       compressionYidx < compressionHeight;
-       ++compressionYidx)
-   {
-      uncompressYidx = compressionYidx*rows*destWidth;
-
-      for(compressionXidx = 0;
-          compressionXidx < compressionWidth;
-          ++compressionXidx)
-      {
-         uncompressIdx = uncompressYidx + cols*compressionXidx;
-         ossim_uint32 codeWord = bits.getValueAsUint32(compressionIdx);
-         
-         bool transparent = false;
-         if (codeWord == 4095)
-         {
-            //---
-            // Check to see if the whole kernel is transparent.  If no, the
-            // null index '216' could be used for valid pixels.
-            //
-            // For more see docs:
-            // MIL-PRF-89041A 3.13.1.2 Transparent pixels
-            // MIL-STD-2411
-            //---
-            codeWord *= cols;
-            transparent = true;
-            for(rowIdx = 0; rowIdx < rows; ++rowIdx)
-            {
-               data = &table[rowIdx].theData[codeWord];
-               
-               for(colIdx = 0; colIdx < cols; ++colIdx)
-               {
-                  lutValue = (*data)&0xff;
-                  if (lutValue != NI)
-                  {
-                     // Not a kernel full of transparent pixels.
-                     transparent = false;
-                     break;
-                  }
-                  ++data;
-               }
-               if (!transparent)
-               {
-                  break;
-               }
-               uncompressIdx += destWidth;
-            }
-         }
-
-         // Reset everyone for loop to copy pixel data from lut.
-         uncompressIdx = uncompressYidx + cols*compressionXidx;
-         codeWord = bits.getValueAsUint32(compressionIdx);
-         codeWord *= cols;
-
-         for(rowIdx = 0; rowIdx < rows; ++rowIdx)
-         {
-            data = &table[rowIdx].theData[codeWord];
-            
-            for(colIdx = 0; colIdx < cols; ++colIdx)
-            {
-               lutValue = (*data)&0xff;
-               
-               for (band = 0; band < BANDS; ++band)
-               {
-                  ossim_uint8 p = luts[band]->getValue(lutValue);
-                  tempRows[band][uncompressIdx+colIdx] = (!transparent?p:NP);
-               }
-               ++data;
-            }
-
-            uncompressIdx += destWidth;
-         }
-         ++compressionIdx;
-         
-      } // x loop
-      
-   } // y loop
-}
-
-bool ossimNitfTileSource::scanForJpegBlockOffsets()
-{
-   // Find, capture all jpeg block offsets and sizes for an entry.
-   
-   bool allBlocksFound = false;
-   
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-
-   if ( !hdr || (theReadMode != READ_JPEG_BLOCK) || !theFileStr )
-   {
-      return allBlocksFound; // Get out...
-   }
-
-   theNitfBlockOffset.clear();
-   theNitfBlockSize.clear();
-
-   //---
-   // Get the totol blocks.
-   // Note:  There can be more than one jpeg image in the nitf.  So after blocks
-   // found equals total_blocks get out.
-   //---
-   ossim_uint32 total_blocks = hdr->getNumberOfBlocksPerRow()*hdr->getNumberOfBlocksPerCol();
-   
-   //---
-   // NOTE:
-   // SOI = 0xffd8 Start of image
-   // EOI = 0xffd9 End of image
-   // DHT = 0xffc4 Define Huffman Table(s)
-   // DQT = 0xffdb Define Quantization Table(s)
-   //---
-
-   // Seek to the first block.
-   theFileStr.seekg(hdr->getDataLocation(), ios::beg);
-
-   if ( theFileStr.good() )
-   {
-      const ossim_uint8 AP6 = 0xe6;
-      const ossim_uint8 AP7 = 0xe7;
-      const ossim_uint8 DHT = 0xc4;
-      const ossim_uint8 DQT = 0xdb;
-      const ossim_uint8 EOI = 0xd9;
-      const ossim_uint8 FF  = 0xff;
-      const ossim_uint8 SOI = 0xd8;
-      const ossim_uint8 SOS = 0xda;
-
-      union
-      {
-         char c;
-         ossim_uint8 uc;
-      } ct;
-
-      std::streamoff soiOffset = 0;
-      std::streamoff eoiOffset = 0;
-      ossim_uint16   length    = 0;
-
-      ossimEndian* swapper = 0;
-      if ( ossim::byteOrder() == OSSIM_LITTLE_ENDIAN )
-      {
-         swapper = new ossimEndian();
-      }
-      
-      // Find all the SOI markers.
-      while ( theFileStr.get( ct.c ) && !allBlocksFound ) 
-      {
-         if ( ct.uc == FF ) // Found FF byte.
-         {
-            // Loop to skip multiple 0xff's in cases like FF FF D8
-            while ( theFileStr.get( ct.c ) )
-            {
-               if ( ct.uc != FF)
-               {
-                  break;
-               }
-            }
-         
-            if ( ct.uc == SOI ) 
-            {
-               // At SOI 0xFFD8 marker... SOI marker offset is two bytes back.
-               soiOffset = ((std::streamoff)theFileStr.tellg()) - 2;
-
-               // Now look for matching EOI.
-               while ( theFileStr.get( ct.c ) )
-               {
-                  if ( ct.uc == FF ) // Found FF byte.
-                  {
-                     // Loop to skip multiple 0xff's in cases like FF FF D8
-                     while ( theFileStr.get( ct.c ) )
-                     {
-                        if ( ct.uc != FF )
-                        {
-                           break;
-                        }
-                     }
-
-                     if ( ct.uc == EOI )
-                     {
-                        // At EOI 0xD9marker...
-                        eoiOffset = theFileStr.tellg();
-
-                        // Capture offset:
-                        theNitfBlockOffset.push_back( soiOffset );
-
-                        // Capture block size:
-                        theNitfBlockSize.push_back( eoiOffset - soiOffset );
-
-                        //---
-                        // Since there can be more than one jpeg entry in a file, breeak out of
-                        // loop when we hit block size.
-                        //---
-                        if ( theNitfBlockOffset.size() == total_blocks )
-                        {
-                           allBlocksFound = true;
-                        }
-
-                        break; // From "find EOI" while loop.
-                     }
-                     //---
-                     // These are things to skip to avoid hitting random sequence of FFD9
-                     // and picking up a false EOI.
-                     // Not a complete set of markers but all test data works.
-                     // drb - 14 May 2013.
-                     //---
-                     else if ( ( ct.uc == AP6 ) || ( ct.uc == AP7 ) || ( ct.uc == DHT ) ||
-                               ( ct.uc == DQT ) || ( ct.uc == SOS ) ||
-                               ( ( ct.uc >= 0xc0 ) && ( ct.uc <= 0xcF ) )
-                               )
-                     {
-                        // Length two byte big endian.
-                        theFileStr.read( (char*)&length, 2 );
-                        if ( swapper )
-                        {
-                           swapper->swap( length );
-                        }
-                        // Length includes two length bytes.
-
-                        // Seek to the end of the record.
-                        theFileStr.seekg( length - 2, std::ios_base::cur );
-                     }
-
-                  } //  Matches: if ( ct.uc == FF )
-                  
-               } // Matches: while ( theFileStr.get( ut.c ) ) "find EOI loop" 
-               
-            } // Matches: if ( ut.uc == SOI ) "SOI marker found"
-
-         } // Matches: if ( ut.uc == FF )
-
-      } // Matches: while ( theFileStr.get( ut.c ) && !allBlocksFound )
-
-      if ( swapper )
-      {
-         delete swapper;
-         swapper = 0;
-      }
-
-   } // Matches: if ( theFileStr.good() )
-
-   theFileStr.seekg(0, ios::beg);
-   theFileStr.clear();
-
-#if 0 /* Please leave for debug. (drb) */
-   std::streamoff startOfData = hdr->getDataLocation();
-   ossimNotify(ossimNotifyLevel_WARN) << "current entry: " << theCurrentEntry << "\n";
-   for (ossim_uint32 i = 0; i < total_blocks; ++i)
-   {
-      cout << "theNitfBlockOffset[" << i << "]: " << theNitfBlockOffset[i]
-           << "\nrealative_offset[" << i << "]:   " << (theNitfBlockOffset[i] - startOfData)
-           << "\ntheNitfBlockSize[" << i << "]:   " << theNitfBlockSize[i]
-           << "\n";
-   }
-#endif
-   
-   if ( !allBlocksFound )
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "DEBUG:"
-            << "\nBlock offset count wrong!"
-            << "\nexpected blocks:        " << total_blocks
-            << "\noffset array count:     " << theNitfBlockOffset.size()
-            << "\nblock size array count: " << theNitfBlockSize.size()
-            << std::endl;
-      }
-      theNitfBlockOffset.clear();
-      theNitfBlockSize.clear();
-   }
-
-   return allBlocksFound;
-}
-
-bool ossimNitfTileSource::uncompressJpegBlock(ossim_uint32 x, ossim_uint32 y)
-{
-   ossim_uint32 blockNumber = getBlockNumber( ossimIpt(x,y) );
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfTileSource::uncompressJpegBlock DEBUG:"
-         << "\nblockNumber:  " << blockNumber
-         << std::endl;
-   }
-
-   //---
-   // Logic to hold off on scanning for offsets until a block is actually needed
-   // to speed up loads for things like ossim-info that don't actually read
-   // pixel data.
-   //---
-   if ( m_jpegOffsetsDirty )
-   {
-      if ( scanForJpegBlockOffsets() )
-      {
-         m_jpegOffsetsDirty = false;
-      }
-      else
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-            << "ossimNitfTileSource::uncompressJpegBlock scan for offsets error!"
-            << "\nReturning error..." << endl;
-         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-         return false;
-      }
-   }
-   
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "\noffset to block: " << theNitfBlockOffset[blockNumber]
-         << "\nblock size: " << theNitfBlockSize[blockNumber]
-         << std::endl;
-   }
-   
-   // Seek to the block.
-   theFileStr.seekg(theNitfBlockOffset[blockNumber], ios::beg);
-   
-   // Read the block into memory.
-   std::vector<ossim_uint8> compressedBuf(theNitfBlockSize[blockNumber]);
-   if (!theFileStr.read((char*)&(compressedBuf.front()),
-                        theNitfBlockSize[blockNumber]))
-   {
-      theFileStr.clear();
-      ossimNotify(ossimNotifyLevel_FATAL)
-         << "ossimNitfTileSource::uncompressJpegBlock Read Error!"
-         << "\nReturning error..." << endl;
-      return false;
-   }
-   
-   if (m_isJpeg12Bit)
-   {
-#if defined(JPEG_DUAL_MODE_8_12)
-      return ossimNitfTileSource_12::uncompressJpeg12Block(x,y,theCacheTile, 
-       getCurrentImageHeader(), theCacheSize, compressedBuf, theReadBlockSizeInBytes, 
-       theNumberOfOutputBands);
-#endif  
-   }
-
-   //---
-   // Most of comments below from jpeg-6b "example.c" file.
-   //---
-   
-   /* This struct contains the JPEG decompression parameters and pointers
-    * to working space (which is allocated as needed by the JPEG library).
-    */
-   jpeg_decompress_struct cinfo;
-   
-   /* We use our private extension JPEG error handler.
-    * Note that this struct must live as long as the main JPEG parameter
-    * struct, to avoid dangling-pointer problems.
-    */
-   ossimJpegErrorMgr jerr;
-   
-   /* Step 1: allocate and initialize JPEG decompression object */
-   
-   /* We set up the normal JPEG error routines, then override error_exit. */
-   cinfo.err = jpeg_std_error(&jerr.pub);
- 
-   jerr.pub.error_exit = ossimJpegErrorExit;
-
-   /* Establish the setjmp return context for my_error_exit to use. */
-   if (setjmp(jerr.setjmp_buffer))
-   {
-      /* If we get here, the JPEG code has signaled an error.
-       * We need to clean up the JPEG object, close the input file, and return.
-       */
-     jpeg_destroy_decompress(&cinfo);
-     return false;
-   }
-
-   /* Now we can initialize the JPEG decompression object. */
-   jpeg_CreateDecompress(&cinfo, JPEG_LIB_VERSION, sizeof(cinfo));
-   
-   //---
-   // Step 2: specify data source.  In this case we will uncompress from
-   // memory so we will use "ossimJpegMemorySrc" in place of " jpeg_stdio_src".
-   //---
-   ossimJpegMemorySrc (&cinfo,
-                       &(compressedBuf.front()),
-                       static_cast<size_t>(theReadBlockSizeInBytes));
-
-   /* Step 3: read file parameters with jpeg_read_header() */
-   jpeg_read_header(&cinfo, TRUE);
-  
-   // Check for Quantization tables.
-   if (cinfo.quant_tbl_ptrs[0] == NULL)
-   {
-      // This will load table specified in COMRAT field.
-      if (loadJpegQuantizationTables(cinfo) == false)
-      {
-        jpeg_destroy_decompress(&cinfo);
-        return false;
-      }
-   }
-
-   // Check for huffman tables.
-   if (cinfo.ac_huff_tbl_ptrs[0] == NULL)
-   {
-      // This will load default huffman tables into .
-      if (loadJpegHuffmanTables(cinfo) == false)
-      {
-        jpeg_destroy_decompress(&cinfo);
-        return false;
-      }
-   }
-
-   /* Step 4: set parameters for decompression */
-   
-   /* In this example, we don't need to change any of the defaults set by
-    * jpeg_read_header(), so we do nothing here.
-    */
-
-   /* Step 5: Start decompressor */
-   jpeg_start_decompress(&cinfo);
-
-#if 0 /* Please leave for debug. (drb) */
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "jpeg cinfo.output_width:  " << cinfo.output_width
-         << "\njpeg cinfo.output_height: " << cinfo.output_height
-         << "\n";
-   }
-#endif
-   
-   const ossim_uint32 SAMPLES = cinfo.output_width;
-
-   //---
-   // Note: Some nitf will be tagged with a given number of lines but the last
-   // jpeg block may go beyond that to a complete block.  So it you clamp to
-   // last line of the nitf you will get a libjpeg error:
-   // 
-   // "Application transferred too few scanlines"
-   //
-   // So here we will always read the full jpeg block even if it is beyond the
-   // last line of the nitf.
-   //---
-   const ossim_uint32 LINES_TO_READ =
-      min(static_cast<ossim_uint32>(theCacheSize.y), cinfo.output_height);
-
-   /* JSAMPLEs per row in output buffer */
-   const ossim_uint32 ROW_STRIDE = SAMPLES * cinfo.output_components;
-
-   if ( (SAMPLES < theCacheTile->getWidth() ) ||
-        (LINES_TO_READ < theCacheTile->getHeight()) )
-   {
-      theCacheTile->makeBlank();
-   }
-
-   if ( (SAMPLES > theCacheTile->getWidth()) ||
-        (LINES_TO_READ > theCacheTile->getHeight()) )
-   {
-     // Error...
-     jpeg_finish_decompress(&cinfo);
-     jpeg_destroy_decompress(&cinfo);
-     return false;
-   }
-
-   // Get pointers to the cache tile buffers.
-   std::vector<ossim_uint8*> destinationBuffer(theNumberOfInputBands);
-   for (ossim_uint32 band = 0; band < theNumberOfInputBands; ++band)
-   {
-     destinationBuffer[band] = theCacheTile->getUcharBuf(band);
-   }
-
-   std::vector<ossim_uint8> lineBuffer(ROW_STRIDE);
-   JSAMPROW jbuf[1];
-   jbuf[0] = (JSAMPROW) &(lineBuffer.front());
-
-   while (cinfo.output_scanline < LINES_TO_READ)
-   {
-     // Read a line from the jpeg file.
-     jpeg_read_scanlines(&cinfo, jbuf, 1);
-
-     //---
-     // Copy the line which if band interleaved by pixel the the band
-     // separate buffers.
-     //
-     // Note:
-     // Not sure if IMODE of 'B' is interleaved the same as image with
-     // IMODE of 'P'.
-     //
-     // This works with all samples with IMODE of B and P but I only have
-     // one band 'B' and three band 'P'.  So if we ever get a three band
-     // 'B' it could be wrong here. (drb - 20090615)
-     //---
-     ossim_uint32 index = 0;
-     for (ossim_uint32 sample = 0; sample < SAMPLES; ++sample)         
-     {
-       for (ossim_uint32 band = 0; band < theNumberOfInputBands; ++band)
-       {
-         destinationBuffer[band][sample] = lineBuffer[index];
-         ++index;
-       }
-     }
-
-     for (ossim_uint32 band = 0; band < theNumberOfInputBands; ++band)
-     {
-       destinationBuffer[band] += theCacheSize.x;         
-     }
-   }
-
-   // clean up...
-
-   jpeg_finish_decompress(&cinfo);
-   jpeg_destroy_decompress(&cinfo);
-
-   return true;
-}
-
-//---
-// Default JPEG quantization tables
-// Values from: MIL-STD-188-198, APPENDIX A
-//---
-bool ossimNitfTileSource::loadJpegQuantizationTables(
-   jpeg_decompress_struct& cinfo) const
-{
-   //---
-   // Check to see if table is present.  We will only look at the first table
-   // in the array of arrays.
-   // 
-   // NOTE:  There are four tables in the array "cinfo.quant_tbl_ptrs".  It
-   // looks like the standard is to use the first table. (not sure though)
-   //---
-   if (cinfo.quant_tbl_ptrs[0] != NULL)
-   {
-      return false;
-   }
-
-   // Get the COMRAT (compression rate code) from the header:
-   const ossimNitfImageHeader* hdr = getCurrentImageHeader();
-   if (!hdr)
-   {
-      return false;
-   }
-   
-   ossimString comrat = hdr->getCompressionRateCode();
-   ossim_uint32 tableIndex = 0;
-   if (comrat.size() >= 4)
-   {
-      // COMRAT string like: "00.2" = use table 2. (between 1 and 5).
-      ossimString s;
-      s.push_back(comrat[static_cast<std::string::size_type>(3)]);
-      ossim_int32 comTbl = s.toInt32();
-      if ( (comTbl > 0) && (comTbl < 6) )
-      {
-         tableIndex = comTbl-1;
-      }
-      else
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimNitfTileSource::loadJpegQuantizationTables WARNING\n"
-            << "\nNo quantization tables specified!"
-            << endl;
-         return false;  
-      }
-   }
-
-   cinfo.quant_tbl_ptrs[0] = jpeg_alloc_quant_table((j_common_ptr) &cinfo);
- 
-   JQUANT_TBL* quant_ptr = cinfo.quant_tbl_ptrs[0]; // quant_ptr is JQUANT_TBL*
-
-   for (ossim_int32 i = 0; i < 64; ++i)
-   {
-      /* Qtable[] is desired quantization table, in natural array order */
-      quant_ptr->quantval[i] = QTABLE_ARRAY[tableIndex][i];
-   }
-   return true;
-}
-
-//---
-// Default JPEG Huffman tables
-// Values from: MIL-STD-188-198, APPENDIX B
-//---
-bool ossimNitfTileSource::loadJpegHuffmanTables(
-   jpeg_decompress_struct& cinfo) const
-{
-   if ( (cinfo.ac_huff_tbl_ptrs[0] != NULL) &&
-        (cinfo.dc_huff_tbl_ptrs[0] != NULL) )
-   {
-      return false;
-   }
-
-   cinfo.ac_huff_tbl_ptrs[0] = jpeg_alloc_huff_table((j_common_ptr)&cinfo);
-   cinfo.dc_huff_tbl_ptrs[0] = jpeg_alloc_huff_table((j_common_ptr)&cinfo);
-
-   ossim_int32 i;
-   JHUFF_TBL* huff_ptr;
-   
-   // Copy the ac tables.
-   huff_ptr = cinfo.ac_huff_tbl_ptrs[0]; /* huff_ptr is JHUFF_TBL* */     
-   for (i = 0; i < 16; ++i) 
-   {
-      // huff_ptr->bits is array of 17 bits[0] is unused; hence, the i+1
-      huff_ptr->bits[i+1] = AC_BITS[i]; 
-   }
-   
-   for (i = 0; i < 256; ++i)
-   {
-      huff_ptr->huffval[i] = AC_HUFFVAL[i];
-   }
-   
-   // Copy the dc tables.
-   huff_ptr = cinfo.dc_huff_tbl_ptrs[0]; /* huff_ptr is JHUFF_TBL* */
-   for (i = 0; i < 16; ++i)
-   {
-      // huff_ptr->bits is array of 17 bits[0] is unused; hence, the i+1
-      huff_ptr->bits[i+1] = DC_BITS[i];
-   }
-   
-   for (i = 0; i < 256; i++)
-   {
-      /* symbols[] is the list of Huffman symbols, in code-length order */
-      huff_ptr->huffval[i] = DC_HUFFVAL[i];
-   }
-   return true;
-}
-
-// Protected to disallow use...
-ossimNitfTileSource::ossimNitfTileSource(const ossimNitfTileSource& /* obj */)
-{
-}
-
-// Protected to disallow use...
-ossimNitfTileSource& ossimNitfTileSource::operator=(
-   const ossimNitfTileSource& /* rhs */)
-{
-   return *this;
-}
diff --git a/src/ossim/imaging/ossimNitfTileSource_12.cpp b/src/ossim/imaging/ossimNitfTileSource_12.cpp
deleted file mode 100644
index 55be303..0000000
--- a/src/ossim/imaging/ossimNitfTileSource_12.cpp
+++ /dev/null
@@ -1,255 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Mingjie Su
-//
-// Description:
-//
-// Contains class declaration for NitfTileSource_12.
-//
-//*******************************************************************
-//  $Id: ossimNitfTileSource_12.cpp 958 2010-06-03 23:00:32Z ming.su $
-
-//#if defined(JPEG_DUAL_MODE_8_12)
-#include <fstream>
-
-#if defined(JPEG_DUAL_MODE_8_12)
-#include <jpeg12/jpeglib.h>
-
-//ossim includes
-#include <ossim//imaging/ossimJpegMemSrc.h>
-#include <ossim/imaging/ossimNitfTileSource_12.h>
-#include <ossim/imaging/ossimJpegDefaultTable.h>
-
-bool ossimNitfTileSource_12::uncompressJpeg12Block(ossim_uint32 x, ossim_uint32 y,
-                                                   ossimRefPtr<ossimImageData> cacheTile,
-                                                   ossimNitfImageHeader* hdr,
-                                                   ossimIpt cacheSize,
-                                                   std::vector<ossim_uint8> compressedBuf,
-                                                   ossim_uint32 readBlockSizeInBytes,
-                                                   ossim_uint32 bands)
-{
-   jpeg_decompress_struct cinfo;
-
-   ossimJpegErrorMgr jerr;
-
-   cinfo.err = jpeg_std_error(&jerr.pub);
-   
-   jerr.pub.error_exit = ossimJpegErrorExit;
-
-   /* Establish the setjmp return context for my_error_exit to use. */
-   if (setjmp(jerr.setjmp_buffer))
-   {
-     jpeg_destroy_decompress(&cinfo);
-   
-     return false;
-   }
-
-   jpeg_CreateDecompress(&cinfo, JPEG_LIB_VERSION, sizeof(cinfo));
-  
-   //---
-   // Step 2: specify data source.  In this case we will uncompress from
-   // memory so we will use "ossimJpegMemorySrc" in place of " jpeg_stdio_src".
-   //---
-   ossimJpegMemorySrc (&cinfo,
-                       &(compressedBuf.front()),
-                       static_cast<size_t>(readBlockSizeInBytes));
-
-   /* Step 3: read file parameters with jpeg_read_header() */
-  
-   jpeg_read_header(&cinfo, TRUE);
-  
-   
-   // Check for Quantization tables.
-   if (cinfo.quant_tbl_ptrs[0] == NULL)
-   {
-      // This will load table specified in COMRAT field.
-      if (loadJpegQuantizationTables(hdr, cinfo) == false)
-      {
-        jpeg_destroy_decompress(&cinfo);
-        return false;
-      }
-   }
-
-   // Check for huffman tables.
-   if (cinfo.ac_huff_tbl_ptrs[0] == NULL)
-   {
-      // This will load default huffman tables into .
-      if (loadJpegHuffmanTables(cinfo) == false)
-      {
-        jpeg_destroy_decompress(&cinfo);
-        return false;
-      }
-   }
-
-   /* Step 4: set parameters for decompression */
-   
-   /* In this example, we don't need to change any of the defaults set by
-    * jpeg_read_header(), so we do nothing here.
-    */
-
-   /* Step 5: Start decompressor */
-   
-   jpeg_start_decompress(&cinfo);
-  
-   const ossim_uint32 SAMPLES = cinfo.output_width;
-
-   //---
-   // Note: Some nitf will be tagged with a given number of lines but the last
-   // jpeg block may go beyond that to a complete block.  So it you clamp to
-   // last line of the nitf you will get a libjpeg error:
-   // 
-   // "Application transferred too few scanlines"
-   //
-   // So here we will always read the full jpeg block even if it is beyond the
-   // last line of the nitf.
-   //---
-   const ossim_uint32 LINES_TO_READ =
-      min(static_cast<ossim_uint32>(cacheSize.y), cinfo.output_height);
-
-   /* JSAMPLEs per row in output buffer */
-   const ossim_uint32 ROW_STRIDE = SAMPLES * cinfo.output_components;
-
-   if ( (SAMPLES < cacheTile->getWidth() ) ||
-        (LINES_TO_READ < cacheTile->getHeight()) )
-   {
-      cacheTile->makeBlank();
-   }
-
-   if ( (SAMPLES > cacheTile->getWidth()) ||
-        (LINES_TO_READ > cacheTile->getHeight()) )
-   {
-     jpeg_finish_decompress(&cinfo);
-     jpeg_destroy_decompress(&cinfo);
-
-     return false;
-   }
-   
-   // Get pointers to the cache tile buffers.
-   std::vector<ossim_uint16*> destinationBuffer(bands);
-   ossim_uint32 band = 0;
-   for (band = 0; band < bands; ++band)
-   {
-     destinationBuffer[band] = cacheTile->getUshortBuf(band);
-   }
-
-   std::vector<ossim_uint16> lineBuffer(ROW_STRIDE);
-   JSAMPROW jbuf[1];
-   jbuf[0] = (JSAMPROW) &(lineBuffer.front());
-
-   while (cinfo.output_scanline < LINES_TO_READ)
-   {
-     // Read a line from the jpeg file.
-     jpeg_read_scanlines(&cinfo, jbuf, 1);
-
-     ossim_uint32 index = 0;
-     for (ossim_uint32 sample = 0; sample < SAMPLES; ++sample)         
-     {
-       for (band = 0; band < bands; ++band)
-       {
-         destinationBuffer[band][sample] = lineBuffer[index];
-         ++index;
-       }
-     }
-
-     for (band = 0; band < bands; ++band)
-     {
-       destinationBuffer[band] += cacheSize.x;         
-     }
-   }
-
-   jpeg_finish_decompress(&cinfo);
-   jpeg_destroy_decompress(&cinfo);
- 
-   return true;
-}
-
-bool ossimNitfTileSource_12::loadJpegQuantizationTables(ossimNitfImageHeader* hdr,
-                                jpeg_decompress_struct& cinfo)
-{
-  if (!hdr)
-  {
-    return false;
-  }
-
-  ossimString comrat = hdr->getCompressionRateCode();
-  ossim_uint32 tableIndex = 0;
-  if (comrat.size() >= 4)
-  {
-    // COMRAT string like: "00.2" = use table 2. (between 1 and 5).
-    ossimString s;
-    s.push_back(comrat[static_cast<std::string::size_type>(3)]);
-    ossim_int32 comTbl = s.toInt32();
-    if ( (comTbl > 0) && (comTbl < 6) )
-    {
-      tableIndex = comTbl-1;
-    }
-    else
-    {
-      ossimNotify(ossimNotifyLevel_WARN)
-        << "ossimNitfTileSource_12::loadJpegQuantizationTables WARNING\n"
-        << "\nNo quantization tables specified!"
-        << endl;
-      return false;  
-    }
-  }
-
-  cinfo.quant_tbl_ptrs[0] = jpeg_alloc_quant_table((j_common_ptr) &cinfo);
-
-  JQUANT_TBL* quant_ptr = cinfo.quant_tbl_ptrs[0]; // quant_ptr is JQUANT_TBL*
-
-  for (ossim_int32 i = 0; i < 64; ++i)
-  {
-    /* Qtable[] is desired quantization table, in natural array order */
-    quant_ptr->quantval[i] = QTABLE_ARRAY[tableIndex][i];
-  }
-  return true;
-}
-
-bool ossimNitfTileSource_12::loadJpegHuffmanTables(jpeg_decompress_struct& cinfo)
-{
-  if ( (cinfo.ac_huff_tbl_ptrs[0] != NULL) &&
-    (cinfo.dc_huff_tbl_ptrs[0] != NULL) )
-  {
-    return false;
-  }
-
-  cinfo.ac_huff_tbl_ptrs[0] = jpeg_alloc_huff_table((j_common_ptr)&cinfo);
-  cinfo.dc_huff_tbl_ptrs[0] = jpeg_alloc_huff_table((j_common_ptr)&cinfo);
-
-  ossim_int32 i;
-  JHUFF_TBL* huff_ptr;
-
-  // Copy the ac tables.
-  huff_ptr = cinfo.ac_huff_tbl_ptrs[0]; /* huff_ptr is JHUFF_TBL* */     
-  for (i = 0; i < 16; ++i) 
-  {
-    // huff_ptr->bits is array of 17 bits[0] is unused; hence, the i+1
-    huff_ptr->bits[i+1] = AC_BITS[i]; 
-  }
-
-  for (i = 0; i < 256; ++i)
-  {
-    huff_ptr->huffval[i] = AC_HUFFVAL[i];
-  }
-
-  // Copy the dc tables.
-  huff_ptr = cinfo.dc_huff_tbl_ptrs[0]; /* huff_ptr is JHUFF_TBL* */
-  for (i = 0; i < 16; ++i)
-  {
-    // huff_ptr->bits is array of 17 bits[0] is unused; hence, the i+1
-    huff_ptr->bits[i+1] = DC_BITS[i];
-  }
-
-  for (i = 0; i < 256; i++)
-  {
-    /* symbols[] is the list of Huffman symbols, in code-length order */
-    huff_ptr->huffval[i] = DC_HUFFVAL[i];
-  }
-  return true;
-}
-
-#endif /* defined(JPEG_DUAL_MODE_8_12) */
diff --git a/src/ossim/imaging/ossimNitfWriter.cpp b/src/ossim/imaging/ossimNitfWriter.cpp
deleted file mode 100644
index 5c4d1b3..0000000
--- a/src/ossim/imaging/ossimNitfWriter.cpp
+++ /dev/null
@@ -1,739 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimNitfWriter.cpp 21631 2012-09-06 18:10:55Z dburken $
-
-#include <ossim/imaging/ossimNitfWriter.h>
-#include <ossim/base/ossimBooleanProperty.h>
-#include <ossim/base/ossimContainerProperty.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimNumericProperty.h>
-#include <ossim/base/ossimProperty.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/projection/ossimRpcSolver.h>
-#include <ossim/projection/ossimUtmProjection.h>
-#include <ossim/projection/ossimMapProjectionInfo.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimRectangleCutFilter.h>
-#include <ossim/support_data/ossimNitfCommon.h>
-#include <ossim/support_data/ossimNitfGeoPositioningTag.h>
-#include <ossim/support_data/ossimNitfLocalGeographicTag.h>
-#include <ossim/support_data/ossimNitfLocalCartographicTag.h>
-#include <ossim/support_data/ossimNitfProjectionParameterTag.h>
-#include <ossim/support_data/ossimNitfNameConversionTables.h>
-#include <ossim/support_data/ossimNitfBlockaTag.h>
-#include <tiffio.h>
-#include <fstream>
-#include <algorithm>
-#include <sstream>
-#include <iomanip>
-
-RTTI_DEF1(ossimNitfWriter, "ossimNitfWriter", ossimNitfWriterBase);
-
-static ossimTrace traceDebug(ossimString("ossimNitfWriter:debug"));
-                             
-ossimNitfWriter::ossimNitfWriter(const ossimFilename& filename,
-                                 ossimImageSource* inputSource)
-   : ossimNitfWriterBase(filename, inputSource),
-     m_outputStream(0),
-     m_fileHeader(0),
-     m_imageHeader(0),
-     m_textHeader(0),
-     m_textEntry(),
-     m_blockSize(OSSIM_DEFAULT_TILE_WIDTH, OSSIM_DEFAULT_TILE_HEIGHT)
-{
-   //---
-   // Since the internal nitf tags are not very accurate, write an external
-   // geometry out as default behavior.  Users can disable this via the
-   // property interface or keyword list.
-   //---
-   setWriteExternalGeometryFlag(true);
-   
-   m_fileHeader       = new ossimNitfFileHeaderV2_1;
-   m_imageHeader      = new ossimNitfImageHeaderV2_1;
-
-   // m_textHeader is conditional so we will not new here.
-   
-   theOutputImageType = "nitf_block_band_separate";
-
-   //---
-   // The tile size can be set in the preferences via "tile_size" keyword.
-   // This will get it if set; else, set to default.
-   //---
-   ossim::defaultTileSize(m_blockSize);
-
-   // These are always set:
-   m_fileHeader->setEncryption( ossimString("0") );
-   m_imageHeader->setJustification( ossimString("R") );
-
-   // Set any site defaults.
-   initializeDefaultsFromConfigFile(
-      dynamic_cast<ossimNitfFileHeaderV2_X*>(m_fileHeader.get()),
-      dynamic_cast<ossimNitfImageHeaderV2_X*>(m_imageHeader.get()) );
-}
-
-ossimNitfWriter::~ossimNitfWriter()
-{
-   //---
-   // This looks like a leak but it's not as both of these are ossimRefPtr's.
-   //---
-   m_fileHeader=0;
-   m_imageHeader=0;
-   m_textHeader=0;
-
-   close();
-}
-
-bool ossimNitfWriter::isOpen()const
-{
-   return (m_outputStream != 0);
-}
-
-bool ossimNitfWriter::open()
-{
-   if(isOpen())
-   {
-      close();
-   }
-   m_outputStream = new std::ofstream;
-   m_outputStream->open(theFilename.c_str(), ios::out|ios::binary);
-   
-   return m_outputStream->good();
-}
-
-void ossimNitfWriter::close()
-{
-   if(m_outputStream)
-   {
-      m_outputStream->close();
-      delete m_outputStream;
-      m_outputStream = (std::ofstream*)0;
-   }
-}
-
-bool ossimNitfWriter::writeFile()
-{
-   if(!theInputConnection->isMaster())
-   {
-      theInputConnection->slaveProcessTiles();
-
-      return true;
-   }
-
-   open();
-
-   if (!isOpen())
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfWriter::writeFile ERROR:"
-            << " Could not open!  Returning..."
-            << std::endl;
-      }
-
-      return false;
-   }
-   
-   // Write out the geometry info.
-   writeGeometry(m_imageHeader.get(), theInputConnection.get());
-
-   // addStandardTags();
-   
-   bool result = false;
-   if((theOutputImageType == "nitf_block_band_separate")||
-      (theOutputImageType == "image/nitf"))
-   {
-      result =  writeBlockBandSeparate();
-   }
-   else if(theOutputImageType == "nitf_block_band_sequential")
-   {
-      result =  writeBlockBandSequential();
-   }
-   
-   close();
-   
-   return result;
-}
-
-void ossimNitfWriter::getImageTypeList(std::vector<ossimString>& imageTypeList)const
-{
-   imageTypeList.push_back(ossimString("nitf_block_band_separate"));
-   imageTypeList.push_back(ossimString("nitf_block_band_sequential"));
-}
-
-void ossimNitfWriter::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property) return;
-   
-   ossimString name = property->getName();
-   
-   if(name == "file_header")
-   {
-      ossimContainerProperty* containerProperty = PTR_CAST(ossimContainerProperty,
-                                                           property.get());
-      if(containerProperty)
-      {
-         std::vector<ossimRefPtr<ossimProperty> > propertyList;
-         containerProperty->getPropertyList(propertyList);
-         m_fileHeader->setProperties(propertyList);
-      }
-   }
-   else if(name == "image_header")
-   {
-      ossimContainerProperty* containerProperty = PTR_CAST(ossimContainerProperty,
-                                                           property.get());
-      if(containerProperty)
-      {
-         std::vector<ossimRefPtr<ossimProperty> > propertyList;
-         containerProperty->getPropertyList(propertyList);
-         m_imageHeader->setProperties(propertyList);
-      }
-   }
-   else if(name == "block_size")
-   {
-      ossimIpt blockSize;
-      blockSize.x = property->valueToString().toInt32();
-      blockSize.y = blockSize.x;
-      setTileSize(blockSize);
-   }
-   else
-   {
-      ossimNitfWriterBase::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimNitfWriter::getProperty(const ossimString& name)const
-{
-   ossimRefPtr<ossimProperty> result = 0;
-   
-   if(name == "file_header")
-   {
-      ossimContainerProperty* container = new ossimContainerProperty(name);
-      std::vector<ossimRefPtr<ossimProperty> > propertyList;
-      
-      m_fileHeader->getPropertyList(propertyList);
-      container->addChildren(propertyList);
-      
-      result = container;
-   }
-   else if(name == "image_header")
-   {
-      ossimContainerProperty* container = new ossimContainerProperty(name);
-      std::vector<ossimRefPtr<ossimProperty> > propertyList;
-      
-      m_imageHeader->getPropertyList(propertyList);
-      container->addChildren(propertyList);
-      
-      result = container;
-   }
-   else if(name == "block_size")
-   {
-      ossimStringProperty* stringProp =
-         new ossimStringProperty(name,
-                                 ossimString::toString(m_blockSize.x),
-                                 false); // editable flag
-      stringProp->addConstraint(ossimString("64"));
-      stringProp->addConstraint(ossimString("128"));
-      stringProp->addConstraint(ossimString("256"));      
-      stringProp->addConstraint(ossimString("512"));      
-      stringProp->addConstraint(ossimString("1024"));      
-      stringProp->addConstraint(ossimString("2048"));      
-      return stringProp;
-   }
-   else
-   {
-      return ossimNitfWriterBase::getProperty(name);
-   }
-
-   return result;
-}
-
-void ossimNitfWriter::getPropertyNames(
-   std::vector<ossimString>& propertyNames)const
-{
-   ossimNitfWriterBase::getPropertyNames(propertyNames);
-
-   propertyNames.push_back("file_header");
-   propertyNames.push_back("image_header");
-   propertyNames.push_back("block_size");
-}
-
-bool ossimNitfWriter::writeBlockBandSeparate()
-{
-   ossimScalarType scalarType  = theInputConnection->getOutputScalarType();
-   ossim_uint64    byteSize    = ossim::scalarSizeInBytes(scalarType);
-   ossimIrect      rect        = theInputConnection->getBoundingRect();
-   ossim_uint64    bands       = theInputConnection->getNumberOfOutputBands();
-   ossim_uint64    idx         = 0;
-   ossim_uint64    headerStart = (ossim_uint64)m_outputStream->tellp();
-
-   // Set the sequencer block size to be the same as output.
-   theInputConnection->setTileSize(m_blockSize);
-   
-   ossim_uint64 blocksHorizontal = theInputConnection->getNumberOfTilesHorizontal();
-   ossim_uint64 blocksVertical   = theInputConnection->getNumberOfTilesVertical();
-   ossim_uint64 numberOfTiles    = theInputConnection->getNumberOfTiles();
-
-   ossimNitfImageInfoRecordV2_1 imageInfoRecord;
-   imageInfoRecord.setSubheaderLength(439); // ok if no tags
-   imageInfoRecord.setImageLength(bands*byteSize*blocksVertical*m_blockSize.y*blocksHorizontal*m_blockSize.x);
-
-   m_fileHeader->setDate();
-   m_fileHeader->addImageInfoRecord(imageInfoRecord);
-
-   if ( m_textHeader.valid() )
-   {
-      // Add any text headers
-      ossimNitfTextFileInfoRecordV2_1 textInfoRecord;
-      textInfoRecord.setSubheaderLength(285); //default
-      // Set length of text to be that of input text
-      textInfoRecord.setTextLength(m_textEntry.length()); 
-      m_fileHeader->addTextInfoRecord(textInfoRecord);
-   }  
-
-   //---
-   // This makes space for the file header; it is written again at the end of
-   // this method with updated values
-   // need a better way to get the length.  This should be queried on the
-   // header before writing
-   //---
-   m_fileHeader->writeStream(*m_outputStream); 
-   ossim_uint64 headerLength = ((ossim_uint64)m_outputStream->tellp() - headerStart) /* + 1 */;
-   
-   ossimString representation;
-   m_imageHeader->setActualBitsPerPixel(ossim::getActualBitsPerPixel(scalarType));
-   m_imageHeader->setBitsPerPixel(ossim::getBitsPerPixel(scalarType));
-   m_imageHeader->setPixelType(ossimNitfCommon::getNitfPixelType(scalarType));
-   m_imageHeader->setNumberOfBands(bands);
-   m_imageHeader->setImageMode('B');// blocked
-
-   if((bands == 3)&&
-      (scalarType == OSSIM_UCHAR))
-   {
-      m_imageHeader->setRepresentation("RGB");
-      m_imageHeader->setCategory("VIS");
-   }
-   else if(bands == 1)
-   {
-      m_imageHeader->setRepresentation("MONO");
-      m_imageHeader->setCategory("MS");
-   }
-   else
-   {
-      m_imageHeader->setRepresentation("MULTI");
-      m_imageHeader->setCategory("MS");
-   }
-   
-   m_imageHeader->setBlocksPerRow(blocksHorizontal);
-   m_imageHeader->setBlocksPerCol(blocksVertical);
-   m_imageHeader->setNumberOfPixelsPerBlockRow(m_blockSize.x);
-   m_imageHeader->setNumberOfPixelsPerBlockCol(m_blockSize.y);
-   m_imageHeader->setNumberOfRows(rect.height());
-   m_imageHeader->setNumberOfCols(rect.width());
-
-   ossimNitfImageBandV2_1 bandInfo;
-   for(idx = 0; idx < bands; ++idx)
-   {
-      std::ostringstream out;
-      
-      out << std::setfill('0')
-          << std::setw(2)
-          << idx;
-      
-      bandInfo.setBandRepresentation(out.str().c_str());
-      m_imageHeader->setBandInfo(idx, bandInfo);
-   }
-
-   ossim_uint64 imageHeaderStart = m_outputStream->tellp();
-   m_imageHeader->writeStream(*m_outputStream);
-   ossim_uint64 imageHeaderEnd = m_outputStream->tellp();
-   ossim_uint64 imageHeaderSize = imageHeaderEnd - imageHeaderStart;
-
-   // Start the sequence through tiles:
-   theInputConnection->setToStartOfSequence();
-   
-   ossimRefPtr<ossimImageData> data = theInputConnection->getNextTile();
-   ossim_uint64 tileNumber = 1;
-   ossimEndian endian;
-   
-   while( data.valid() && !needsAborting())
-   {
-      if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
-      {
-         switch(data->getScalarType())
-         {
-            case OSSIM_USHORT16:
-            case OSSIM_USHORT11:
-            {
-               endian.swap((ossim_uint16*)data->getBuf(),
-                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
-               break;
-            }
-            case OSSIM_SSHORT16:
-            {
-               endian.swap((ossim_sint16*)data->getBuf(),
-                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
-               break;
-            }
-            case OSSIM_FLOAT:
-            case OSSIM_NORMALIZED_FLOAT:
-            {
-               endian.swap((ossim_float32*)data->getBuf(),
-                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
-               break;
-            }
-            case OSSIM_DOUBLE:
-            case OSSIM_NORMALIZED_DOUBLE:
-            {
-               endian.swap((ossim_float64*)data->getBuf(),
-                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
-               break;
-            }
-            default:
-               break;
-         }
-      }
-      
-      m_outputStream->write((char*)(data->getBuf()), data->getSizeInBytes());
-      
-      setPercentComplete(((double)tileNumber / (double)numberOfTiles) * 100);
-      
-      if(!needsAborting())
-      {
-         data = theInputConnection->getNextTile();
-      }
-      ++tileNumber;
-   }
-
-   // Let's write our text header
-   if ( m_textHeader.valid() )
-   {
-      m_textHeader->writeStream(*m_outputStream); 
-      //Now write the text
-      m_outputStream->write((char*)(m_textEntry.c_str()), m_textEntry.length());
-   }   
-
-   std::streamoff pos = m_outputStream->tellp();
-
-   setComplexityLevel(pos, m_fileHeader.get());
-
-   /*
-    * Need to change the way I compute file length and header length later
-    * We need to figure out a better way to compute.
-    */
-   m_fileHeader->setFileLength(static_cast<ossim_uint64>(pos));
-   m_fileHeader->setHeaderLength(headerLength);
-   m_outputStream->seekp(0, ios::beg);
-   imageInfoRecord.setSubheaderLength(imageHeaderSize);
-   m_fileHeader->replaceImageInfoRecord(0, imageInfoRecord);
-   m_fileHeader->writeStream(*m_outputStream);
-   
-   return true;
-}
-
-bool ossimNitfWriter::writeBlockBandSequential()
-{
-   ossimScalarType scalarType = theInputConnection->getOutputScalarType();
-   ossim_uint64    byteSize   = ossim::scalarSizeInBytes(scalarType);
-   ossimIrect      rect       = theInputConnection->getBoundingRect();
-   ossim_uint64    bands      = theInputConnection->getNumberOfOutputBands();
-   ossim_uint64    idx        = 0;
-   ossim_uint64    headerStart   = (ossim_uint64)m_outputStream->tellp();
-
-   // Set the sequencer block size to be the same as output.
-   theInputConnection->setTileSize(m_blockSize);
-   
-   ossim_uint64 blocksHorizontal = theInputConnection->getNumberOfTilesHorizontal();
-   ossim_uint64 blocksVertical   = theInputConnection->getNumberOfTilesVertical();
-   ossim_uint64 numberOfTiles    = theInputConnection->getNumberOfTiles();
-
-   ossimNitfImageInfoRecordV2_1 imageInfoRecord;
-   imageInfoRecord.setSubheaderLength(439);
-   imageInfoRecord.setImageLength(bands*byteSize*blocksHorizontal*blocksVertical*m_blockSize.x*m_blockSize.y);
-
-   m_fileHeader->setDate();
-   m_fileHeader->addImageInfoRecord(imageInfoRecord);
-
-   if ( m_textHeader.valid() )
-   {
-      // Add any text headers
-      ossimNitfTextFileInfoRecordV2_1 textInfoRecord;
-      textInfoRecord.setSubheaderLength(285); //default
-      // Set length of text to be that of input text
-      textInfoRecord.setTextLength(m_textEntry.length()); 
-      m_fileHeader->addTextInfoRecord(textInfoRecord);
-   }
-
-   //---
-   // This makes space for the file header; it is written again at the end of
-   // this method with updated values
-   // need a better way to get the length.  This should be queried on the
-   // header before writing
-   //---  
-   m_fileHeader->writeStream(*m_outputStream);
-   ossim_uint64 headerLength = ((ossim_uint64)m_outputStream->tellp() - headerStart) /* + 1 */;
-   
-   ossimString representation;
-   m_imageHeader->setActualBitsPerPixel(ossim::getActualBitsPerPixel(scalarType));
-   m_imageHeader->setBitsPerPixel(ossim::getBitsPerPixel(scalarType));
-   m_imageHeader->setPixelType(ossimNitfCommon::getNitfPixelType(scalarType));
-   m_imageHeader->setNumberOfBands(bands);
-   m_imageHeader->setImageMode('S');// blocked
-   
-   if((bands == 3)&&
-      (scalarType == OSSIM_UCHAR))
-   {
-      m_imageHeader->setRepresentation("RGB");
-      m_imageHeader->setCategory("VIS");
-   }
-   else if(bands == 1)
-   {
-      m_imageHeader->setRepresentation("MONO");
-      m_imageHeader->setCategory("MS");
-   }
-   else
-   {
-      m_imageHeader->setRepresentation("MULTI");
-      m_imageHeader->setCategory("MS");
-   }
-   m_imageHeader->setBlocksPerRow(blocksHorizontal);
-   m_imageHeader->setBlocksPerCol(blocksVertical);
-   m_imageHeader->setNumberOfPixelsPerBlockRow(m_blockSize.x);
-   m_imageHeader->setNumberOfPixelsPerBlockCol(m_blockSize.y);
-   m_imageHeader->setNumberOfRows(rect.height());
-   m_imageHeader->setNumberOfCols(rect.width());
-
-   ossimNitfImageBandV2_1 bandInfo;
-   for(idx = 0; idx < bands; ++idx)
-   {
-      std::ostringstream out;
-      
-      out << std::setfill('0')
-          << std::setw(2)
-          << idx;
-      
-      bandInfo.setBandRepresentation(out.str().c_str());
-      m_imageHeader->setBandInfo(idx, bandInfo);
-   }
-
-   int imageHeaderStart = m_outputStream->tellp();
-   m_imageHeader->writeStream(*m_outputStream);
-   int imageHeaderEnd = m_outputStream->tellp();
-   int imageHeaderSize = imageHeaderEnd - imageHeaderStart;
-
-   // ossimIpt ul = rect.ul();
-
-   // Start the sequence through tiles:
-   theInputConnection->setToStartOfSequence();
-
-   ossimRefPtr<ossimImageData> data = theInputConnection->getNextTile();
-   ossim_uint64 tileNumber = 0;
-   ossimEndian endian;
-
-   // get the start to the first band of data block
-   //
-   ossim_uint64 streamOffset = m_outputStream->tellp();
-   
-   // holds the total pixels to the next band
-
-   ossim_uint64 blockSizeInBytes = m_blockSize.x*m_blockSize.y*ossim::scalarSizeInBytes(data->getScalarType());
-   ossim_uint64 bandOffsetInBytes = (blockSizeInBytes*blocksHorizontal*blocksVertical);
-
-   bool needSwapping = endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN;
-   while(data.valid() && !needsAborting())
-   {
-      if(needSwapping)
-      {
-         switch(data->getScalarType())
-         {
-            case OSSIM_USHORT16:
-            case OSSIM_USHORT11:
-            {
-               endian.swap((ossim_uint16*)data->getBuf(),
-                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
-               break;
-            }
-            case OSSIM_SSHORT16:
-            {
-               endian.swap((ossim_sint16*)data->getBuf(),
-                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
-               break;
-            }
-            case OSSIM_FLOAT:
-            case OSSIM_NORMALIZED_FLOAT:
-            {
-               endian.swap((ossim_float32*)data->getBuf(),
-                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
-               break;
-            }
-            case OSSIM_DOUBLE:
-            case OSSIM_NORMALIZED_DOUBLE:
-            {
-               endian.swap((ossim_float64*)data->getBuf(),
-                           data->getWidth()*data->getHeight()*data->getNumberOfBands());
-               break;
-            }
-            default:
-               break;
-         }
-      }
-
-      for(idx = 0; idx < bands; ++idx)
-      {
-         m_outputStream->seekp(streamOffset+ // start of image stream
-                               tileNumber*blockSizeInBytes + // start of block for band separate output
-                               bandOffsetInBytes*idx, // which band offset is it
-                               ios::beg); 
-         
-         m_outputStream->write((char*)(data->getBuf(idx)),
-                               blockSizeInBytes);
-      }
-      ++tileNumber;
-      
-      setPercentComplete(((double)tileNumber / (double)numberOfTiles) * 100);
-      
-      if(!needsAborting())
-      {
-         data = theInputConnection->getNextTile();
-      }
-   }
-
-   // Let's write our text header
-   if ( m_textHeader.valid() )
-   {
-      m_textHeader->writeStream(*m_outputStream); 
-      //Now write the text
-      m_outputStream->write((char*)(m_textEntry.c_str()), m_textEntry.length());
-   }   
-
-   std::streamoff pos = m_outputStream->tellp();
-
-   setComplexityLevel(pos, m_fileHeader.get());
-
-   /*
-    * Need to change the way I compute file length and header length later
-    * We need to figure out a better way to compute.
-    */
-   m_fileHeader->setFileLength(static_cast<ossim_uint64>(pos));
-   m_fileHeader->setHeaderLength(headerLength);
-   m_outputStream->seekp(0, ios::beg);
-   imageInfoRecord.setSubheaderLength(imageHeaderSize);
-   m_fileHeader->replaceImageInfoRecord(0, imageInfoRecord);
-   m_fileHeader->writeStream(*m_outputStream);
-   
-   return true;
-}
-
-
-void ossimNitfWriter::addRegisteredTag(
-   ossimRefPtr<ossimNitfRegisteredTag> registeredTag)
-{
-   ossimNitfTagInformation tagInfo;
-   tagInfo.setTagData(registeredTag.get());
-   m_imageHeader->addTag(tagInfo);
-}
-
-bool ossimNitfWriter::addTextToNitf(std::string &inputText)
-{
-   // Initialize the m_textHeader
-   m_textEntry = inputText;
-   if ( m_textHeader.valid() == false )
-   {
-      // Only created if we need it.
-      m_textHeader = new ossimNitfTextHeaderV2_1;
-   }
-   return true;
-}
-void ossimNitfWriter::getTileSize(ossimIpt& size) const
-{
-   size = m_blockSize;
-}
-
-void ossimNitfWriter::setTileSize(const ossimIpt& tileSize)
-{
-   const ossim_int32 MIN_BLOCK_SIZE = 64;
-   if ( (tileSize.x % MIN_BLOCK_SIZE) || (tileSize.y % MIN_BLOCK_SIZE) )
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfWriter::setTileSize ERROR:"
-            << "\nBlock size must be a multiple of " << MIN_BLOCK_SIZE
-            << "\nSize remains:  " << m_blockSize
-            << std::endl;
-      }
-   }
-   else
-   {
-      m_blockSize = tileSize;
-   }
-}
-
-#if 0
-void ossimNitfWriter::addStandardTags()
-{
-
-   if(!theInputConnection)
-   {
-      return;
-   }
-   
-   // commenting this out for now.  For some reason the pixels
-   // are off when I add this tag.  I checked the parsing and it
-   // appears to be the correct length???  So, I am not sure
-   // why we are off when reading the output back in.
-   //
-   // first lets do the projection tag.  I REALLY need to add
-   // parameter support soon or this tag is useless.
-   //
-   ossimKeywordlist kwl;
-   theInputConnection->getImageGeometry(kwl);
-   ossimRefPtr<ossimProjection> proj = ossimProjectionFactoryRegistry::instance()->createProjection(kwl);
-   ossimNitfNameConversionTables table;
-   ossimMapProjection* mapProj = PTR_CAST(ossimMapProjection, proj.get());
-   ossimNitfTagInformation tagInfo;
-   
-   if(mapProj)
-   {
-
-      if(!PTR_CAST(ossimUtmProjection, mapProj))
-      {
-         ossimRefPtr<ossimNitfProjectionParameterTag> parameterTag = new ossimNitfProjectionParameterTag;
-         
-         ossimString nitfCode = table.convertMapProjectionNameToNitfCode(proj->getClassName());
-         ossimString nitfName = table.convertNitfCodeToNitfProjectionName(nitfCode);
-         
-         parameterTag->setName(nitfName);
-         parameterTag->setCode(nitfCode);
-         parameterTag->setFalseX(mapProj->getFalseEasting());
-         parameterTag->setFalseY(mapProj->getFalseNorthing());
-         
-         tagInfo.setTagData(parameterTag.get());
-         m_imageHeader->addTag(tagInfo);
-      }
-   }
-}
-#endif
-
-bool ossimNitfWriter::saveState(ossimKeywordlist& kwl,
-                                const char* prefix) const
-{
-   return ossimNitfWriterBase::saveState(kwl, prefix);
-}
-
-bool ossimNitfWriter::loadState(const ossimKeywordlist& kwl,
-                                const char* prefix)
-{
-   return ossimNitfWriterBase::loadState(kwl, prefix);
-}
diff --git a/src/ossim/imaging/ossimNitfWriterBase.cpp b/src/ossim/imaging/ossimNitfWriterBase.cpp
deleted file mode 100644
index 7de480d..0000000
--- a/src/ossim/imaging/ossimNitfWriterBase.cpp
+++ /dev/null
@@ -1,360 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: OSSIM Kakadu based nitf writer.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimNitfWriterBase.cpp 2981 2011-10-10 21:14:02Z david.burken $
-
-#include <ossim/imaging/ossimNitfWriterBase.h>
-#include <ossim/base/ossimBooleanProperty.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimPreferences.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageSourceSequencer.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimMapProjectionInfo.h>
-#include <ossim/projection/ossimUtmProjection.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/projection/ossimRpcSolver.h>
-#include <ossim/support_data/ossimNitfBlockaTag.h>
-#include <ossim/support_data/ossimNitfFileHeader.h>
-#include <ossim/support_data/ossimNitfFileHeaderV2_X.h>
-#include <ossim/support_data/ossimNitfImageHeader.h>
-#include <ossim/support_data/ossimNitfImageHeaderV2_X.h>
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-#include <ossim/support_data/ossimNitfTagInformation.h>
-
-static const char ENABLE_BLOCKA_KW[] = "enable_blocka_tag";
-static const char ENABLE_RPCB_KW[]   = "enable_rpcb_tag";
-
-RTTI_DEF1(ossimNitfWriterBase, "ossimNitfWriterBase", ossimImageFileWriter)
-   
-static ossimTrace traceDebug(ossimString("ossimNitfWriterBase:debug"));
-
-ossimNitfWriterBase::ossimNitfWriterBase()
-   : ossimImageFileWriter(),
-     theEnableRpcbTagFlag(false),
-     theEnableBlockaTagFlag(true)
-{
-}
-
-ossimNitfWriterBase::ossimNitfWriterBase(const ossimFilename& filename,
-                                         ossimImageSource* inputSource)
-   : ossimImageFileWriter(filename, inputSource, 0),
-     theEnableRpcbTagFlag(false),
-     theEnableBlockaTagFlag(true)
-{
-}
-
-ossimNitfWriterBase::~ossimNitfWriterBase()
-{
-}
-
-void ossimNitfWriterBase::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(property.valid())
-   {
-      ossimString name = property->getName();
-
-      if (name == ENABLE_RPCB_KW)
-      {
-         theEnableRpcbTagFlag = property->valueToString().toBool();
-      }
-      else if (name == ENABLE_BLOCKA_KW)
-      {
-         theEnableBlockaTagFlag = property->valueToString().toBool();
-      }
-      else
-      {
-         ossimImageFileWriter::setProperty(property);
-      }
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimNitfWriterBase::getProperty(
-   const ossimString& name)const
-{
-   ossimRefPtr<ossimProperty> result = 0;
-   
-   if(name == ENABLE_RPCB_KW)
-   {
-      result = new ossimBooleanProperty(name, theEnableRpcbTagFlag);
-   }   
-   else if(name == ENABLE_BLOCKA_KW)
-   {
-      result = new ossimBooleanProperty(name, theEnableBlockaTagFlag);
-   }   
-   else
-   {
-      result = ossimImageFileWriter::getProperty(name);
-   }
-
-   return result;
-}
-
-void ossimNitfWriterBase::getPropertyNames(
-   std::vector<ossimString>& propertyNames)const
-{
-   ossimImageFileWriter::getPropertyNames(propertyNames);
-
-   propertyNames.push_back(ENABLE_BLOCKA_KW);
-   propertyNames.push_back(ENABLE_RPCB_KW);
-}
-
-
-bool ossimNitfWriterBase::saveState(ossimKeywordlist& kwl,
-                                    const char* prefix) const
-{
-   kwl.add(prefix, ENABLE_RPCB_KW, theEnableRpcbTagFlag, true);
-   kwl.add(prefix, ENABLE_BLOCKA_KW, theEnableBlockaTagFlag, true);
-
-   return ossimImageFileWriter::saveState(kwl, prefix);
-}
-
-bool ossimNitfWriterBase::loadState(const ossimKeywordlist& kwl,
-                                    const char* prefix)
-{
-   // Look for the rpcb enable flag keyword.
-   const char* lookup = kwl.find(prefix, ENABLE_RPCB_KW);
-   if(lookup)
-   {
-      ossimString os = lookup;
-      theEnableRpcbTagFlag = os.toBool();
-   }
-
-   // Look for the blocka enable flag keyword.
-   lookup = kwl.find(prefix, ENABLE_BLOCKA_KW);
-   if(lookup)
-   {
-      ossimString os = lookup;
-      theEnableBlockaTagFlag = os.toBool();
-   }
-
-   return ossimImageFileWriter::loadState(kwl, prefix);
-}
-
-void ossimNitfWriterBase::writeGeometry(ossimNitfImageHeaderV2_X* hdr,
-                                        ossimImageSourceSequencer* seq)
-{
-   if (hdr && seq)
-   {
-      ossimRefPtr<ossimImageGeometry> geom = theInputConnection->getImageGeometry();
-      ossimKeywordlist kwl;
-
-      if (geom.valid()&&geom->hasProjection())
-      {
-         // Get the requested bounding rectangles.
-         ossimIrect rect = seq->getBoundingRect();
-         
-         // See if it's a map projection; else, a sensor model.
-         ossimMapProjection* mapProj =
-            PTR_CAST(ossimMapProjection, geom->getProjection());
-         if (mapProj)
-         {
-            // Use map info to get the corners.
-            ossimMapProjectionInfo mapInfo(mapProj, rect);
-            mapInfo.setPixelType(OSSIM_PIXEL_IS_AREA);
-            
-            // See if it's utm.
-            ossimUtmProjection* utmProj = PTR_CAST(ossimUtmProjection,
-                                                   mapProj);
-            if(utmProj)
-            {
-               ossimDpt ul = mapInfo.ulEastingNorthingPt();
-               ossimDpt ur = mapInfo.urEastingNorthingPt();
-               ossimDpt lr = mapInfo.lrEastingNorthingPt();
-               ossimDpt ll = mapInfo.llEastingNorthingPt();
-               
-               if(utmProj->getHemisphere() == 'N')
-               {
-                  hdr->setUtmNorth(utmProj->getZone(), ul, ur, lr, ll);
-               }
-               else
-               {
-                  hdr->setUtmSouth(utmProj->getZone(), ul, ur, lr, ll);
-               }
-            }
-            else
-            {
-               ossimGpt ul = mapInfo.ulGroundPt();
-               ossimGpt ur = mapInfo.urGroundPt();
-               ossimGpt lr = mapInfo.lrGroundPt();
-               ossimGpt ll = mapInfo.llGroundPt();
-               hdr->setGeographicLocationDms(ul, ur, lr, ll);
-            }
-
-            if (theEnableBlockaTagFlag)
-            {
-               addBlockaTag(mapInfo, hdr);
-            }
-         }
-         
-         if (theEnableRpcbTagFlag)
-         {
-            addRpcbTag(rect, geom->getProjection(), hdr);
-         }
-         
-      } // matches:  if (proj.valid())
-      
-   } // matches: if (hdr && seq)
-}
-
-void ossimNitfWriterBase::addBlockaTag(ossimMapProjectionInfo& mapInfo,
-                                       ossimNitfImageHeaderV2_X* hdr)
-{
-   if (hdr)
-   {
-      // Capture the current pixel type.
-      ossimPixelType originalPixelType = mapInfo.getPixelType();
-      
-      // This tag wants corners as area:
-      mapInfo.setPixelType(OSSIM_PIXEL_IS_AREA);
-      
-      // Stuff the blocka tag which has six digit precision.
-      ossimNitfBlockaTag* blockaTag = new ossimNitfBlockaTag();
-      
-      // Set the block number.
-      blockaTag->setBlockInstance(1);
-      
-      // Set the number of lines.
-      blockaTag->setLLines(mapInfo.linesPerImage());
-      
-      // Set first row, first column.
-      blockaTag->setFrfcLoc(ossimDpt(mapInfo.ulGroundPt()));
-      
-      // Set first row, last column.
-      blockaTag->setFrlcLoc(ossimDpt(mapInfo.urGroundPt()));
-      
-      // Set last row, last column.
-      blockaTag->setLrlcLoc(ossimDpt(mapInfo.lrGroundPt()));
-      
-      // Set last row, first column.
-      blockaTag->setLrfcLoc(ossimDpt(mapInfo.llGroundPt()));
-      
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfWriterBase::addBlockaTag DEBUG:"
-            << "\nBLOCKA Tag:" << *((ossimObject*)(blockaTag))
-            << std::endl;
-      }
-      
-      // Add the tag to the header.
-      ossimRefPtr<ossimNitfRegisteredTag> blockaTagRp = blockaTag;
-      ossimNitfTagInformation blockaTagInfo(blockaTagRp);
-      hdr->addTag(blockaTagInfo);
-      
-      // Reset the pixel type to original value
-      mapInfo.setPixelType(originalPixelType);
-      
-   } // matches: if (hdr)
-}
-
-void ossimNitfWriterBase::addRpcbTag(const ossimIrect& rect,
-                                     ossimProjection* proj,
-                                     ossimNitfImageHeaderV2_X* hdr)
-{
-   if (proj && hdr)
-   {
-      bool useElevation = false;
-      
-      if (PTR_CAST(ossimMapProjection, proj))
-      {
-         // If we're already map projected turn the elevation off.
-         useElevation = false;
-      }
-      
-      // Make an rpc solver.
-      ossimRefPtr<ossimRpcSolver> rs = new ossimRpcSolver(useElevation);
-      
-      // Compute the coefficients.
-      rs->solveCoefficients(ossimDrect(rect), proj, 64, 64);
-      
-      // Add the tag.
-      ossimRefPtr<ossimNitfRegisteredTag> tag = rs->getNitfRpcBTag();
-      ossimNitfTagInformation tagInfo(tag);
-      hdr->addTag(tagInfo);
-      
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfWriterBase::addRpcbTag DEBUG:"
-            << "\nRPCB Tag:" << *((ossimObject*)(tag.get()))
-            << "\nProjection:\n";
-         
-         proj->print(ossimNotify(ossimNotifyLevel_DEBUG));
-         
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "\nRect: " << rect << std::endl;
-      }
-      
-   } // matches: if (proj && hdr)
-}
-
-void ossimNitfWriterBase::setComplexityLevel(std::streamoff endPosition,
-                                             ossimNitfFileHeaderV2_X* hdr)
-{
-   if (hdr)
-   {
-      //---
-      // See MIL-STD-2500C, Table A-10:
-      //
-      // Lots of rules here, but for now we will key off of file size.
-      //---
-      const std::streamoff MB   = 1024 * 1024;
-      const std::streamoff MB50 = 50   * MB;
-      const std::streamoff GIG  = 1000 * MB;
-      const std::streamoff GIG2 = 2    * GIG;
-      
-      ossimString complexity = "03"; // Less than 50 mb.
-      
-      if ( (endPosition >= MB50) && (endPosition < GIG) )
-      {
-         complexity = "05";
-      }
-      else if ( (endPosition >= GIG) && (endPosition < GIG2) )
-      {
-         complexity = "06";
-      }
-      else if (endPosition >= GIG2)
-      {
-         complexity = "07";
-      }
-      
-      hdr->setComplexityLevel(complexity);
-   }
-}
-
-ossimString ossimNitfWriterBase::getExtension() const
-{
-   return ossimString("ntf");
-}
-
-void ossimNitfWriterBase::initializeDefaultsFromConfigFile( ossimNitfFileHeaderV2_X* fileHdr,
-                                                            ossimNitfImageHeaderV2_X* imgHdr )
-{
-   // Look in prefs for site configuration file:
-   const char* lookup = ossimPreferences::instance()->
-      findPreference("nitf_writer.site_configuration_file");
-   if ( lookup && fileHdr && imgHdr )
-   {
-      ossimKeywordlist kwl;
-      if ( kwl.addFile( lookup ) )
-      {
-         fileHdr->loadState( kwl, "nitf.file." );
-         imgHdr->loadState( kwl, "nitf.image." );
-      }
-   }
-}
-
diff --git a/src/ossim/imaging/ossimNormalizedRemapTable.cpp b/src/ossim/imaging/ossimNormalizedRemapTable.cpp
deleted file mode 100644
index 05f26c9..0000000
--- a/src/ossim/imaging/ossimNormalizedRemapTable.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author:  David Burken
-//
-// Description:
-//
-// Contains class definition for NormalizedRemapTable.
-// 
-//*******************************************************************
-//  $Id: ossimNormalizedRemapTable.cpp 15496 2009-09-29 11:36:56Z dburken $
-
-#include <ossim/imaging/ossimNormalizedRemapTable.h>
-
-ossimNormalizedRemapTable::ossimNormalizedRemapTable()
-{
-}
-
-ossimNormalizedRemapTable::~ossimNormalizedRemapTable()
-{
-}
-
-// Private copy constructor.
-ossimNormalizedRemapTable::ossimNormalizedRemapTable(
-   const ossimNormalizedRemapTable&)
-{}
-
-// Private assignment operator.
-ossimNormalizedRemapTable& ossimNormalizedRemapTable::operator=(
-   const ossimNormalizedRemapTable&)
-{
-   return *this;
-}
diff --git a/src/ossim/imaging/ossimNormalizedS16RemapTable.cpp b/src/ossim/imaging/ossimNormalizedS16RemapTable.cpp
deleted file mode 100644
index ecd1593..0000000
--- a/src/ossim/imaging/ossimNormalizedS16RemapTable.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Description:
-//
-// Contains class definition for ossimNormalizedS16RemapTable.
-// 
-//*******************************************************************
-//  $Id: ossimNormalizedS16RemapTable.cpp 9963 2006-11-28 21:11:01Z gpotts $
-
-#include <ossim/imaging/ossimNormalizedS16RemapTable.h>
-
-ossim_float64 ossimNormalizedS16RemapTable::theTable[TABLE_ENTRIES];
-bool          ossimNormalizedS16RemapTable::theTableIsInitialized = false;
-
-ossimNormalizedS16RemapTable::ossimNormalizedS16RemapTable()
-   : ossimNormalizedRemapTable()
-{
-   if (!theTableIsInitialized)
-   {
-      const ossim_int32   ENTRIES     = getEntries();
-      const ossim_float64 DENOMINATOR = getNormalizer();
-      
-      //---
-      // Initialize the remap table.
-      //
-      // Specialized for elevation, make -32768 and -32767 map to 0 since
-      // DTED NULL is -32767.
-      //
-      // NOTE: Zero will always remap back to -32768 with this hack.  This
-      // could cause issues on writers that use pixFromNorm(). (drb)
-      //---
-      theTable[0] = 0.0; // Index zero always for null.
-      theTable[1] = 0.0; // Specialized for DTED.
-
-      for (ossim_int32 i = 2; i < ENTRIES; ++i)
-      {
-         theTable[i] = static_cast<ossim_float64>(i)/DENOMINATOR;
-      }
-
-      theTableIsInitialized = true;
-   }
-}
-
-ossimNormalizedS16RemapTable::~ossimNormalizedS16RemapTable()
-{}
diff --git a/src/ossim/imaging/ossimNormalizedU11RemapTable.cpp b/src/ossim/imaging/ossimNormalizedU11RemapTable.cpp
deleted file mode 100644
index a8df5c9..0000000
--- a/src/ossim/imaging/ossimNormalizedU11RemapTable.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Description:
-//
-// Contains class definition for ossimNormalizedU11RemapTable.
-// 
-//*******************************************************************
-//  $Id: ossimNormalizedU11RemapTable.cpp 15743 2009-10-17 13:00:45Z dburken $
-
-#include <ossim/imaging/ossimNormalizedU11RemapTable.h>
-
-ossim_float64 ossimNormalizedU11RemapTable::theTable[TABLE_ENTRIES];
-bool          ossimNormalizedU11RemapTable::theTableIsInitialized = false;
-
-ossimNormalizedU11RemapTable::ossimNormalizedU11RemapTable()
-   : ossimNormalizedRemapTable()
-{
-   if (!theTableIsInitialized)
-   {
-      const ossim_int32   ENTRIES     = getEntries();
-      const ossim_float64 DENOMINATOR = getNormalizer();
-      
-      //---
-      // Initialize the remap table.
-      //---
-      theTable[0] = 0.0; // Index zero always for null.
-      for (ossim_int32 i = 1; i < ENTRIES; ++i)
-      {
-         theTable[i] = static_cast<ossim_float64>(i)/DENOMINATOR;
-      }
-
-      theTableIsInitialized = true;
-   }
-}
-
-ossimNormalizedU11RemapTable::~ossimNormalizedU11RemapTable()
-{}
diff --git a/src/ossim/imaging/ossimNormalizedU16RemapTable.cpp b/src/ossim/imaging/ossimNormalizedU16RemapTable.cpp
deleted file mode 100644
index 9bc8070..0000000
--- a/src/ossim/imaging/ossimNormalizedU16RemapTable.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Description:
-//
-// Contains class definition for ossimNormalizedU16RemapTable.
-// 
-//*******************************************************************
-//  $Id: ossimNormalizedU16RemapTable.cpp 15743 2009-10-17 13:00:45Z dburken $
-
-#include <ossim/imaging/ossimNormalizedU16RemapTable.h>
-
-ossim_float64 ossimNormalizedU16RemapTable::theTable[TABLE_ENTRIES];
-bool          ossimNormalizedU16RemapTable::theTableIsInitialized = false;
-
-
-ossimNormalizedU16RemapTable::ossimNormalizedU16RemapTable()
-   : ossimNormalizedRemapTable()
-{
-   if (!theTableIsInitialized)
-   {
-      const ossim_int32   ENTRIES     = getEntries();
-      const ossim_float64 DENOMINATOR = getNormalizer();
-      
-      //---
-      // Initialize the remap table.
-      //---
-      theTable[0] = 0.0; // Index zero always for null.
-      for (ossim_int32 i = 1; i < ENTRIES; ++i)
-      {
-         theTable[i] = static_cast<ossim_float64>(i)/DENOMINATOR;
-      }
-
-      theTableIsInitialized = true;
-   }
-}
-
-ossimNormalizedU16RemapTable::~ossimNormalizedU16RemapTable()
-{}
-
-
diff --git a/src/ossim/imaging/ossimNormalizedU8RemapTable.cpp b/src/ossim/imaging/ossimNormalizedU8RemapTable.cpp
deleted file mode 100644
index a353d5a..0000000
--- a/src/ossim/imaging/ossimNormalizedU8RemapTable.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Description:
-//
-// Contains class definition for ossimNormalizedU8RemapTable.
-// 
-//*******************************************************************
-//  $Id: ossimNormalizedU8RemapTable.cpp 15743 2009-10-17 13:00:45Z dburken $
-
-#include <ossim/imaging/ossimNormalizedU8RemapTable.h>
-
-ossim_float64 ossimNormalizedU8RemapTable::theTable[TABLE_ENTRIES];
-bool          ossimNormalizedU8RemapTable::theTableIsInitialized = false;
-
-ossimNormalizedU8RemapTable::ossimNormalizedU8RemapTable()
-   : ossimNormalizedRemapTable()
-{
-   if (!theTableIsInitialized)
-   {
-      const ossim_int32   ENTRIES     = getEntries();
-      const ossim_float64 DENOMINATOR = getNormalizer();
-      
-      //---
-      // Initialize the remap table.
-      //---
-      theTable[0] = 0.0; // Index zero always for null.
-      for (ossim_int32 i = 1; i < ENTRIES; ++i)
-      {
-         theTable[i] = static_cast<ossim_float64>(i)/DENOMINATOR;
-      }
-
-      theTableIsInitialized = true;
-   }
-}
-
-ossimNormalizedU8RemapTable::~ossimNormalizedU8RemapTable()
-{}
-
diff --git a/src/ossim/imaging/ossimOverviewSequencer.cpp b/src/ossim/imaging/ossimOverviewSequencer.cpp
deleted file mode 100644
index 9f04820..0000000
--- a/src/ossim/imaging/ossimOverviewSequencer.cpp
+++ /dev/null
@@ -1,1050 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description: Sequencer for building overview files.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimOverviewSequencer.cpp 22149 2013-02-11 21:36:10Z dburken $
-
-#include <ossim/imaging/ossimOverviewSequencer.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimMultiResLevelHistogram.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageMetaData.h>
-#include <ossim/parallel/ossimMpi.h>
-
-
-#ifdef OSSIM_ID_ENABLED
-static const char OSSIM_ID[] = "$Id: ossimOverviewSequencer.cpp 22149 2013-02-11 21:36:10Z dburken $";
-#endif
-
-static ossimTrace traceDebug("ossimOverviewSequencer:debug");
-
-ossimOverviewSequencer::ossimOverviewSequencer()
-   :
-   ossimReferenced(),
-   ossimErrorStatusInterface(),
-   m_imageHandler(0),
-   m_maskWriter(0),
-   m_maskFilter(0),
-   m_tile(0),
-   m_areaOfInterest(),
-   m_tileSize(OSSIM_DEFAULT_TILE_WIDTH, OSSIM_DEFAULT_TILE_HEIGHT),
-   m_numberOfTilesHorizontal(0),
-   m_numberOfTilesVertical(0),
-   m_currentTileNumber(0),
-   m_sourceResLevel(0),
-   m_dirtyFlag(true),
-   m_decimationFactor(2),
-   m_resampleType(ossimFilterResampler::ossimFilterResampler_BOX),
-   m_histogram(0),
-   m_histoMode(OSSIM_HISTO_MODE_UNKNOWN),
-   m_histoTileIndex(1),
-   m_scanForMinMax(false),
-   m_scanForMinMaxNull(false),
-   m_minValues(0),
-   m_maxValues(0),
-   m_nulValues(0)
-{
-   m_areaOfInterest.makeNan();
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimOverviewSequencer::ossimOverviewSequencer entered..."
-         << "\nmpi rank:  "<< ossimMpi::instance()->getRank()
-         << std::endl;
-#ifdef OSSIM_ID_ENABLED
-      ossimNotify(ossimNotifyLevel_DEBUG)<< "OSSIM_ID:  " << OSSIM_ID
-                                         << std::endl;
-#endif
-   }
-}
-
-ossimOverviewSequencer::~ossimOverviewSequencer()
-{
-   m_imageHandler = 0;
-   m_maskFilter   = 0;
-   m_maskWriter   = 0;
-   m_tile         = 0;
-   m_histogram    = 0;
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimOverviewSequencer::~ossimOverviewSequencer entered..."
-         << "\nmpi rank:  " << ossimMpi::instance()->getRank()
-         << std::endl;
-   }
-}
-
-ossim_uint32 ossimOverviewSequencer::getNumberOfTiles() const
-{
-   return (m_numberOfTilesHorizontal*m_numberOfTilesVertical);
-}
-
-ossim_uint32 ossimOverviewSequencer::getNumberOfTilesHorizontal()const
-{
-   return m_numberOfTilesHorizontal;
-}
-
-ossim_uint32 ossimOverviewSequencer::getNumberOfTilesVertical()const
-{
-   return m_numberOfTilesVertical;
-}
-
-void ossimOverviewSequencer::getOutputImageRectangle(ossimIrect& rect) const
-{
-   if (m_areaOfInterest.hasNans())
-   {
-      rect.makeNan(); // not initialized...
-   }
-   else
-   {
-      ossim_int32 width  = m_areaOfInterest.width()  / m_decimationFactor;
-      ossim_int32 height = m_areaOfInterest.height() / m_decimationFactor;
-
-      //---
-      // NOTE:
-      // This will add a sample or line if there is a remainder like:
-      // 1025 / 2 = 512 will then become 513.  It will be up to the resample
-      // tile method to fill the extra sample correctly.
-      //---
-      if (m_areaOfInterest.width() % m_decimationFactor)
-      {
-         ++width;
-      }
-      if (m_areaOfInterest.height() % m_decimationFactor)
-      {
-         ++height;
-      }
-      
-      rect = ossimIrect(0, 0, width-1, height-1);
-   }
-}
-
-void ossimOverviewSequencer::setImageHandler(ossimImageHandler* input)
-{
-   m_imageHandler = input;
-   m_areaOfInterest.makeNan();
-   m_dirtyFlag = true;
-
-   if (m_maskWriter.valid())
-      m_maskWriter->connectMyInputTo(m_imageHandler.get());
-}
-
-void ossimOverviewSequencer::setSourceLevel(ossim_uint32 level)
-{
-   m_sourceResLevel = level;
-   m_areaOfInterest.makeNan();
-   m_dirtyFlag = true;
-}
-
-ossimHistogramMode ossimOverviewSequencer::getHistogramMode() const
-{
-   return m_histoMode;
-}
-
-void ossimOverviewSequencer::setHistogramMode(ossimHistogramMode mode)
-{
-   m_histoMode = mode;
-   m_dirtyFlag = true;
-}
-
-void ossimOverviewSequencer::writeHistogram()
-{
-   if ( m_histogram.valid() && m_imageHandler.valid() )
-   {
-      writeHistogram( m_imageHandler->getFilenameWithThisExtension("his") );
-   }
-}
-
-void ossimOverviewSequencer::writeHistogram(const ossimFilename& file)
-{
-   if ( m_histogram.valid() )
-   {
-      ossimRefPtr<ossimMultiResLevelHistogram> histo = new ossimMultiResLevelHistogram;
-      histo->addHistogram( m_histogram.get() );
-      ossimKeywordlist kwl;
-      histo->saveState(kwl);
-      kwl.write(file.c_str());
-   }
-}
-
-void ossimOverviewSequencer::initialize()
-{
-   if ( m_dirtyFlag == false )
-   {
-      return; // Already initialized.
-   }
-   
-   if ( !m_imageHandler )
-   {
-      return;
-   }
-
-   ossimImageSource* imageSource = m_imageHandler.get();
-   if (m_maskFilter.valid())
-      imageSource = m_maskFilter.get();
-
-   // Check the area of interest and set from image if needed.
-   if ( m_areaOfInterest.hasNans() )
-   {
-      m_areaOfInterest = m_imageHandler->getImageRectangle(m_sourceResLevel);
-   }
-
-   // Check the tile size and set from image if needed.
-   if ( m_tileSize.hasNans() )
-   {
-      m_tileSize.x = imageSource->getTileWidth();
-      m_tileSize.y = imageSource->getTileHeight();
-   }
-
-   // Update m_numberOfTilesHorizontal and m_numberOfTilesVertical.
-   updateTileDimensions();
-
-   // Start on first tile.
-   m_currentTileNumber = 0;
-
-   // Use this factory constructor as it copies the min/max/nulls from the image handler.
-   m_tile = ossimImageDataFactory::instance()->
-      create( 0, imageSource->getNumberOfOutputBands(), imageSource);
-   
-   if(m_tile.valid())
-   {
-      // Set the width and height.
-      m_tile->setWidthHeight(static_cast<ossim_uint32>(m_tileSize.x),
-                             static_cast<ossim_uint32>(m_tileSize.y) );
-      // Initialize tile buffer.
-      m_tile->initialize();
-   }
-
-   if (m_histoMode != OSSIM_HISTO_MODE_UNKNOWN)
-   {
-      m_histogram = new ossimMultiBandHistogram;
-      
-      m_histogram->create(imageSource);
-
-      if (m_histoMode == OSSIM_HISTO_MODE_NORMAL)
-      {
-         m_histoTileIndex = 1; // Sample every tile.
-      }
-      else
-      {
-         const ossim_float64 PIXEL_TO_SAMPLE = 100.0 * 256.0 * 256.0; // 100 256x256 tiles.
-         ossim_float64 pixels = m_tileSize.x * m_tileSize.y * getNumberOfTiles();
-
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "pixels: " << pixels << "\n"
-               << "PIXEL_TO_SAMPLE: " << PIXEL_TO_SAMPLE << "\n";
-         }
-         
-         if (pixels > PIXEL_TO_SAMPLE)
-         {
-            m_histoTileIndex = ossim::round<ossim_uint32>(pixels/PIXEL_TO_SAMPLE);
-         }
-         else
-         {
-            m_histoTileIndex = 1; // Sample every tile.
-         }
-      }
-   }
-   else
-   {
-      m_histogram = 0;
-   }
-
-
-   if ( m_scanForMinMax || m_scanForMinMaxNull )
-   {
-      //---
-      // The methods ossimImageData::computeMinMaxNullPix and computeMinMaxPix
-      // will resize and set min to max, max to min and null to max if the arrays passed in
-      // are empty.
-      //---
-      clearMinMaxNullArrays();
-   }
-   
-   m_dirtyFlag = false;
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "aoi:                      " << m_areaOfInterest
-         << "\ntile size:              " << m_tileSize
-         << "\ntiles wide:             " << m_numberOfTilesHorizontal
-         << "\ntiles high:             " << m_numberOfTilesVertical
-         << "\nsource rlevel:          " << m_sourceResLevel
-         << "\ndecimation factor:      " << m_decimationFactor
-         << "\nresamp type:            " << m_resampleType
-         << "\nscan for min max:       " << (m_scanForMinMax?"true\n":"false\n")
-         << "\nscan for min, max null: " << (m_scanForMinMaxNull?"true\n":"false\n")
-         << "\nhisto mode:             " << m_histoMode << "\n";
-      if (m_histoMode != OSSIM_HISTO_MODE_UNKNOWN)
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "Sampling every " << m_histoTileIndex << " tile(s) for histogram.\n";
-      }
-   }
-}
-
-void ossimOverviewSequencer::setToStartOfSequence()
-{
-   m_currentTileNumber = 0;
-}
-
-ossimRefPtr<ossimImageData> ossimOverviewSequencer::getNextTile()
-{
-   if ( m_dirtyFlag )
-   {
-      return ossimRefPtr<ossimImageData>();
-   }
-
-   // Get the rectangle to grab from the image.
-   ossimIrect inputRect;
-   getInputTileRectangle(inputRect);
-
-   // Get the output rectangle.
-   ossimIrect outputRect;
-   getOutputTileRectangle(outputRect);
-
-   // Capture the output rectangle.
-   m_tile->setImageRectangle(outputRect);
-
-   // Start with a blank tile.
-   m_tile->makeBlank();
-
-   // Grab the input tile.
-   ossimRefPtr<ossimImageData> inputTile;
-   if (m_maskFilter.valid())
-   {
-      inputTile = m_maskFilter->getTile(inputRect, m_sourceResLevel);
-
-      // Check for errors reading tile and set our error status for callers.
-      if ( m_maskFilter->hasError() )
-      {
-         setErrorStatus();
-      }
-   }
-   else
-   {
-      inputTile = m_imageHandler->getTile(inputRect, m_sourceResLevel);
-
-      // Check for errors reading tile and set our error status for callers.
-      if ( m_imageHandler->hasError() )
-      {
-         setErrorStatus();
-      }
-   }
-
-   if ( hasError() )
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimOverviewSequencer::getNextTile  ERROR:"
-         << "\nError set reading tile:  " << m_currentTileNumber << std::endl;
-      if ( inputTile.valid() )
-      {
-         inputTile->makeBlank();
-      }
-   }
-   else if ( inputTile.valid() )
-   {
-      if ( m_scanForMinMaxNull )
-      {
-         inputTile->computeMinMaxNulPix(m_minValues, m_maxValues, m_nulValues);
-      }
-      else if ( m_scanForMinMax )
-      {
-         inputTile->computeMinMaxPix(m_minValues, m_maxValues);
-      }
-      
-      if ( ( m_histoMode != OSSIM_HISTO_MODE_UNKNOWN ) &&
-           ( (m_currentTileNumber % m_histoTileIndex) == 0 ) )
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "ossimOverviewSequencer::getNextTile DEBUG:"
-               << "\npopulating histogram for tile: " << m_currentTileNumber
-               << "\n";
-         }
-         inputTile->populateHistogram(m_histogram);
-      }
-      
-      if ( (inputTile->getDataObjectStatus() == OSSIM_PARTIAL) ||
-           (inputTile->getDataObjectStatus() == OSSIM_FULL ) )
-      {
-         // Resample the tile.
-         resampleTile(inputTile.get());
-         m_tile->validate();
-         
-         // Scan the resampled pixels for bogus values to be masked out (if masking enabled)
-         if (m_maskWriter.valid())
-            m_maskWriter->generateMask(m_tile, m_sourceResLevel+1);
-      }
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimOverviewSequencer::getNextTile DEBUG:"
-         << "\nRequest failed for input rect: " << inputRect
-         << "\nRes level:  " << m_sourceResLevel << std::endl;
-   }
-
-   // Increment the tile index.
-   ++m_currentTileNumber;
-
-   return m_tile;
-}
-
-void ossimOverviewSequencer::slaveProcessTiles()
-{
-}
-
-bool ossimOverviewSequencer::isMaster() const
-{
-   return true;
-}
-
-ossimIpt ossimOverviewSequencer::getTileSize() const
-{
-   return m_tileSize;
-}
-
-void ossimOverviewSequencer::setTileSize(const ossimIpt& tileSize)
-{
-   m_tileSize = tileSize;
-   updateTileDimensions();
-   m_dirtyFlag = true;
-}
-
-void ossimOverviewSequencer::setResampleType(
-   ossimFilterResampler::ossimFilterResamplerType resampleType)
-{
-   m_resampleType = resampleType;
-}
-
-void ossimOverviewSequencer::setScanForMinMax(bool flag)
-{
-   m_scanForMinMax  = flag;
-}
-
-bool ossimOverviewSequencer::getScanForMinMax() const
-{
-   return m_scanForMinMax;
-}
-
-void ossimOverviewSequencer::setScanForMinMaxNull(bool flag)
-{
-   m_scanForMinMaxNull = flag;
-}
-
-bool ossimOverviewSequencer::getScanForMinMaxNull() const
-{
-   return m_scanForMinMaxNull;
-}
-
-void ossimOverviewSequencer::clearMinMaxNullArrays()
-{
-   m_minValues.clear();
-   m_maxValues.clear();
-   m_nulValues.clear();
-}
-
-bool ossimOverviewSequencer::writeOmdFile(const std::string& file)
-{
-   static const char M[] = "ossimOverviewSequencer::writeOmdFile";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\nfile: " << file << endl;
-   }
-
-   //---
-   // This method writes an omd file to disk.  Typically called after sequencing trough tile that
-   // were scanned for min, max, and potentially null values.
-   // Since this can be called without a scan there is extra logic in here to initialize values
-   // if so.  Also there are sanity checks for cases where there is no null value, i.e. a
-   // full tile, in which case assumptions have to be made...
-   //---
-   
-   bool result = false;
-   if ( file.size() && m_imageHandler.valid() )
-   {
-      const ossim_uint32 BANDS = m_imageHandler->getNumberOfInputBands();
-      const ossimScalarType SCALAR = m_imageHandler->getOutputScalarType();
-      const ossim_float64 DEFAULT_NUL = ossim::defaultNull(SCALAR);
-      const ossim_float64 FALLBACK_NULL = -32767; // This is my arbitrary pick. (drb)
-
-      if ( traceDebug() )
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "Original array values:\n";
-         std::vector<ossim_float64>::const_iterator i = m_minValues.begin();
-         ossim_int32 band = 0;
-         while ( i < m_minValues.end() )
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "min[" << band++ << "]: " << *i << "\n";
-            ++i;
-         }
-         i = m_maxValues.begin();
-         band = 0;
-         while ( i < m_maxValues.end() )
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "max[" << band++ << "]: " << *i << "\n";
-            ++i;
-         }
-         i = m_nulValues.begin();
-         band = 0;
-         while ( i < m_nulValues.end() )
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "nul[" << band++ << "]: " << *i << "\n";
-            ++i;
-         }
-      }
-      
-      if ( (m_scanForMinMax == true) || (m_nulValues.size() !=  BANDS) )
-      {
-         // Only scanned for min and max so set the null.
-         if (m_nulValues.size() !=  BANDS)
-         {
-            m_nulValues.resize(BANDS);
-         }
-         for (ossim_uint32 band = 0; band < BANDS; ++band)
-         {
-            m_nulValues[band] = m_imageHandler->getNullPixelValue(band);
-         }
-      }
-      else if ( m_scanForMinMaxNull == true )
-      {
-         //---
-         // The arrays (sizes) should be set if we did the scan.
-         // Note that scanning for null only works if there IS a null in the image; hence, the
-         // extra sanity checks as if there are no null then the null gets set to the real min.
-         //
-         // This is very dangerous code as it makes assumptions (drb)...
-         //---
-         if ( (m_minValues.size() ==  BANDS) &&
-              (m_maxValues.size() ==  BANDS) &&
-              (m_nulValues.size() ==  BANDS) )
-         {
-            switch(SCALAR)
-            {
-               case OSSIM_UINT8:
-               case OSSIM_SINT8:                  
-               case OSSIM_UINT16:
-               case OSSIM_USHORT11:
-               case OSSIM_UINT32:
-               {
-                  // All of these should have a null of 0.
-                  for (ossim_uint32 band = 0; band < BANDS; ++band)
-                  {
-                     if ( m_nulValues[band] > DEFAULT_NUL )
-                     {
-                        if ( m_nulValues[band] < m_minValues[band] )
-                        {
-                           m_minValues[band] = m_nulValues[band];
-                        }
-                        m_nulValues[band] = DEFAULT_NUL;
-                     }
-                  }
-                  break;
-               }
-               case OSSIM_SINT16:
-               {
-                  for (ossim_uint32 band = 0; band < BANDS; ++band)
-                  {
-                     if ( ( m_nulValues[band] != DEFAULT_NUL ) && // -32768
-                          ( m_nulValues[band] != -32767.0 )    &&
-                          ( m_nulValues[band] != -32766.0 )    &&
-                          ( m_nulValues[band] != -9999.0 ) )
-                     {
-                        if ( ( m_nulValues[band] > -9999.0 ) &&
-                             ( m_nulValues[band] < m_minValues[band] ) )
-                        {
-                           m_minValues[band] = m_nulValues[band];
-                        }
-                        m_nulValues[band] = FALLBACK_NULL;
-                     }
-                  }
-                  break;
-               }
-               case OSSIM_SINT32:
-               {
-                  for (ossim_uint32 band = 0; band < BANDS; ++band)
-                  {
-                     if ( ( m_nulValues[band] != DEFAULT_NUL ) &&
-                          ( m_nulValues[band] != -32768.0 ) &&        // Common null
-                          ( m_nulValues[band] != -32767.0 ) &&       // The other common null.
-                          ( m_nulValues[band] != -32766.0 ) &&
-                          ( m_nulValues[band] != -9999.0  ) &&
-                          ( m_nulValues[band] != -99999.0 ) )
-                     {
-                        if ( ( m_nulValues[band] > -9999.0 ) &&
-                             ( m_nulValues[band] < m_minValues[band] ) )
-                        {
-                           m_minValues[band] = m_nulValues[band];
-                        }
-                        m_nulValues[band] = FALLBACK_NULL;
-                     } 
-                  }
-                  break;
-               }
-               case OSSIM_FLOAT32:
-               case OSSIM_FLOAT64: 
-               {
-                  for (ossim_uint32 band = 0; band < BANDS; ++band)
-                  {
-                     if ( ( m_nulValues[band] != DEFAULT_NUL ) &&
-                          ( m_nulValues[band] != -32768.0 ) &&  
-                          ( m_nulValues[band] != -32767.0 ) && 
-                          ( m_nulValues[band] != -32766.0 ) &&
-                          ( m_nulValues[band] != -9999.0  ) &&
-                          ( m_nulValues[band] != -99999.0 ) )
-                     {
-                        if ( ( m_nulValues[band] > -9999 ) &&
-                             ( m_nulValues[band] < m_minValues[band] ) )
-                        {
-                           m_minValues[band] = m_nulValues[band];
-                        }
-                        m_nulValues[band] = FALLBACK_NULL;
-                     } 
-                  }
-                  break;
-               }
-               case OSSIM_NORMALIZED_FLOAT:
-               case OSSIM_NORMALIZED_DOUBLE:
-               {
-                  for (ossim_uint32 band = 0; band < BANDS; ++band)
-                  {
-                     if ( ( m_nulValues[band] != DEFAULT_NUL ) &&
-                          ( m_nulValues[band] > 0.0) )
-                     {
-                        if ( m_nulValues[band] < m_minValues[band] )
-                        {
-                           m_minValues[band] = m_nulValues[band];
-                        }
-                        m_nulValues[band] = 0.0;
-                     }
-                  }
-                  break;
-               }
-               case OSSIM_SCALAR_UNKNOWN:
-               default:
-               {
-                  if(traceDebug())
-                  {
-                     ossimNotify(ossimNotifyLevel_DEBUG)
-                        << __FILE__ << ":" << __LINE__
-                        << " " << M << "\nUnhandled scalar type:  " << SCALAR << std::endl;
-                  }
-                  break;
-               }
-
-            } // End: switch(SCALAR)
-            
-         } // Matches: if ( (m_minValues.size() ==  BANDS) &&...
-         else
-         {
-            // ERROR!
-            ossimNotify(ossimNotifyLevel_WARN)
-               << M << "ERROR:\nMin, max and null array sizes bad! No omd file will be written."
-               << std::endl;
-         }
-         
-      } // Matches: else if ( m_scanForMinMaxNull == true )
-      else
-      {
-         // Get the values from the image handler.
-         if (m_minValues.size() !=  BANDS)
-         {
-            m_minValues.resize(BANDS);
-            for (ossim_uint32 band = 0; band < BANDS; ++band)
-            {
-               m_minValues[band] = m_imageHandler->getMinPixelValue(band);
-            }
-         }
-         if (m_maxValues.size() !=  BANDS)
-         {
-            m_maxValues.resize(BANDS);
-            for (ossim_uint32 band = 0; band < BANDS; ++band)
-            {
-               m_maxValues[band] = m_imageHandler->getMaxPixelValue(band);
-            }
-         }
-         if (m_nulValues.size() !=  BANDS)
-         {
-            m_nulValues.resize(BANDS);
-            for (ossim_uint32 band = 0; band < BANDS; ++band)
-            {
-               m_nulValues[band] = m_imageHandler->getNullPixelValue(band);
-            }
-         }
-      }
-
-      // Last size check as the m_scanForMinMaxNull block could have failed.
-      if ( ( m_minValues.size() ==  BANDS ) &&
-           ( m_maxValues.size() ==  BANDS ) &&
-           ( m_nulValues.size() ==  BANDS ) )
-      {
-         // Write the omd file:
-         ossimKeywordlist kwl;
-         if( ossimFilename(file).exists())
-         {
-            // Pick up existing omd file.
-            kwl.addFile(file.c_str());
-         }
-         ossimImageMetaData metaData(SCALAR, BANDS);
-         for(ossim_uint32 band = 0; band < BANDS; ++band)
-         {
-            metaData.setMinPix(band,  m_minValues[band]);
-            metaData.setMaxPix(band,  m_maxValues[band]);
-            metaData.setNullPix(band, m_nulValues[band]);
-         }
-         // Save to keyword list.
-         metaData.saveState(kwl);
-         
-         // Write to disk.
-         result = kwl.write(file.c_str());
-         if ( result )
-         {
-            ossimNotify(ossimNotifyLevel_NOTICE) << "Wrote file: " << file << "\n";
-         }
-         else
-         {
-            ossimNotify(ossimNotifyLevel_WARN) << "ERROR writing file: " << file << "\n";
-         }
-      }
-
-      if ( traceDebug() )
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "Final array values:\n";
-         std::vector<ossim_float64>::const_iterator i = m_minValues.begin();
-         ossim_int32 band = 0;
-         while ( i < m_minValues.end() )
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "min[" << band++ << "]: " << *i << "\n";
-            ++i;
-         }
-         i = m_maxValues.begin();
-         band = 0;
-         while ( i < m_maxValues.end() )
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "max[" << band++ << "]: " << *i << "\n";
-            ++i;
-         }
-         i = m_nulValues.begin();
-         band = 0;
-         while ( i < m_nulValues.end() )
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "nul[" << band++ << "]: " << *i << "\n";
-            ++i;
-         }
-      }
-
-   } // Matches: if ( file && m_imageHandler.valid() )
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exit status" << (result?"true\n":"false\n");
-   }
-   
-   return result;
-}
-
-void ossimOverviewSequencer::getInputTileRectangle(ossimIrect& inputRect) const
-{
-   if (!m_imageHandler) return;
-   
-   getOutputTileRectangle(inputRect);
-   inputRect = inputRect * m_decimationFactor;
-   inputRect = inputRect;
-
-#if 0
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimOverviewSequencer::getInputTileRectangle DEBUG:"
-         << "input rect: " << inputRect << std::endl;
-   }
-#endif
-}
-
-void ossimOverviewSequencer::getOutputTileRectangle(
-   ossimIrect& outputRect) const
-{
-   // Get the row and column.
-   ossim_int32 row = m_currentTileNumber / m_numberOfTilesHorizontal;
-   ossim_int32 col = m_currentTileNumber % m_numberOfTilesHorizontal;
-
-   ossimIpt pt;
-
-   // Set the upper left.
-   pt.y = row * m_tileSize.y;
-   pt.x = col * m_tileSize.x;
-   outputRect.set_ul(pt);
-
-   // Set the lower right.
-   pt.y = pt.y + m_tileSize.y - 1;
-   pt.x = pt.x + m_tileSize.x - 1;   
-   outputRect.set_lr(pt);
-
-#if 0
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimOverviewSequencer::getOutputTileRectangle DEBUG:"
-         << "output rect: " << outputRect << std::endl;
-   }
-#endif
-}
-
-void ossimOverviewSequencer::updateTileDimensions()
-{
-   if( m_areaOfInterest.hasNans() || m_tileSize.hasNans() )
-   {
-      m_numberOfTilesHorizontal = 0;
-      m_numberOfTilesVertical   = 0;
-      m_dirtyFlag = true;
-   }
-   else
-   {
-      // Get the output rectangle.
-      ossimIrect rect;
-      getOutputImageRectangle(rect);
-      
-      m_numberOfTilesHorizontal =
-         static_cast<ossim_uint32>( rect.width()  / m_tileSize.x );
-      m_numberOfTilesVertical =
-         static_cast<ossim_uint32>( rect.height() / m_tileSize.y );
-
-      if (rect.width()  % m_tileSize.x)
-      {
-         ++m_numberOfTilesHorizontal;
-      }
-      if (rect.height() % m_tileSize.y)
-      {
-         ++m_numberOfTilesVertical;
-      }
-   }
-}
-
-void ossimOverviewSequencer::resampleTile(const ossimImageData* inputTile)
-{
-   switch(m_imageHandler->getOutputScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         resampleTile(inputTile, ossim_uint8(0));
-         break;
-      }
-
-      case OSSIM_USHORT11:
-      case OSSIM_UINT16:
-      {
-         resampleTile(inputTile, ossim_uint16(0));
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         resampleTile(inputTile, ossim_sint16(0));
-         break;
-      }
-
-      case OSSIM_UINT32:
-      {
-         resampleTile(inputTile, ossim_uint32(0));
-         break;
-      }
-         
-      case OSSIM_SINT32:
-      {
-         resampleTile(inputTile, ossim_sint32(0));
-         break;
-      }
-         
-      case OSSIM_FLOAT32:
-      {
-         resampleTile(inputTile, ossim_float32(0.0));
-         break;
-      }
-         
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_FLOAT64:
-      {
-         resampleTile(inputTile, ossim_float64(0.0));
-         break;
-      }
-      default:
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimOverviewSequencer::resampleTile Unkown pixel type!"
-            << std::endl;
-         return;
-         
-   } // End of "switch(m_imageHandler->getOutputScalarType())"
-}
-
-template <class T>
-void  ossimOverviewSequencer::resampleTile(const ossimImageData* inputTile, T  /* dummy */ )
-{
-#if 0
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimOverviewSequencer::resampleTile DEBUG: "
-         << "\ncurrent tile: " << m_currentTileNumber
-         << "\ninput tile:\n" << *inputTile
-         << "output tile:\n" << *(m_tile.get())
-         << endl;
-   }
-#endif
-   
-   const ossim_uint32 BANDS = m_tile->getNumberOfBands();
-   const ossim_uint32 LINES = m_tile->getHeight();
-   const ossim_uint32 SAMPS = m_tile->getWidth();
-   const ossim_uint32 INPUT_WIDTH = m_decimationFactor*m_tileSize.x;
-   
-   T nullPixel              = 0;
-   ossim_float64 weight     = 0.0;
-   ossim_float64 value      = 0.0;
-   ossim_uint32 sampOffset  = 0;
-   
-   if (m_resampleType == ossimFilterResampler::ossimFilterResampler_NEAREST_NEIGHBOR)
-   {
-      for (ossim_uint32 band=0; band<BANDS; ++band)
-      {
-         const T* s = static_cast<const T*>(inputTile->getBuf(band)); // source
-         T*       d = static_cast<T*>(m_tile->getBuf(band)); // destination
-         
-         nullPixel = static_cast<T>(inputTile->getNullPix(band));
-         weight = 0.0;
-         value  = 0.0;
-         
-         for (ossim_uint32 i=0; i<LINES; ++i)
-         {
-            for (ossim_uint32 j=0; j<SAMPS; ++j)
-            {
-               sampOffset = j*m_decimationFactor;
-               
-               weight = 1.0;
-               value  = *(s + i*m_decimationFactor*INPUT_WIDTH + sampOffset);
-               
-               if(weight)
-               {
-                  d[j] = static_cast<T>( value/weight );
-               }
-               else
-               {
-                  d[j] = nullPixel;
-               }
-               
-            } // End of sample loop.
-            
-            d += m_tileSize.x;
-            
-         } // End of line loop.
-         
-      } // End of band loop.
-      
-   }
-   else // ossimFilterResampler::ossimFilterResampler_BOX
-   {
-      ossim_uint32 lineOffset1 = 0;
-      ossim_uint32 lineOffset2 = 0;
-      ossim_float64 ul = 0.0;
-      ossim_float64 ur = 0.0;
-      ossim_float64 ll = 0.0;
-      ossim_float64 lr = 0.0;
-
-      for (ossim_uint32 band=0; band<BANDS; ++band)
-      {
-         const T* s = static_cast<const T*>(inputTile->getBuf(band)); // source
-         T*       d = static_cast<T*>(m_tile->getBuf(band)); // destination
-
-         nullPixel = static_cast<T>(inputTile->getNullPix(band));
-         weight = 0.0;
-         value  = 0.0;
-         
-         for (ossim_uint32 i=0; i<LINES; ++i)
-         {
-            lineOffset1 = i*m_decimationFactor*INPUT_WIDTH;
-            lineOffset2 = (i*m_decimationFactor+1)*INPUT_WIDTH;
-            
-            for (ossim_uint32 j=0; j<SAMPS; ++j)
-            {
-               sampOffset = j*m_decimationFactor;
-               
-               weight = 0.0;
-               value  = 0.0;
-               
-               //---
-               // Grab four pixels from the source, average, and assign
-               // to output.
-               //---
-               ul = *(s + lineOffset1 + sampOffset);
-               ur = *(s + lineOffset1 + sampOffset + 1);
-               ll = *(s + lineOffset2 + sampOffset);
-               lr = *(s + lineOffset2 + sampOffset + 1);
-               
-               if(ul != nullPixel)
-               {
-                  ++weight;
-                  value += ul;
-               }
-               if(ur != nullPixel)
-               {
-                  ++weight;
-                  value += ur;
-               }
-               if(ll != nullPixel)
-               {
-                  ++weight;
-                  value += ll;
-               }
-               if(lr != nullPixel)
-               {
-                  ++weight;
-                  value += lr;
-               }
-
-               if(weight)
-               {
-                  d[j] = static_cast<T>( value/weight );
-               }
-               else
-               {
-                  d[j] = nullPixel;
-               }
-            
-            } // End of sample loop.
-            
-            d += m_tileSize.x;
-            
-         } // End of line loop.
-         
-      } // End of band loop.
-   }
-}
-
-void ossimOverviewSequencer::setBitMaskObjects(ossimBitMaskWriter* mask_writer,
-                                               ossimMaskFilter* mask_filter)
-{
-   m_maskWriter = mask_writer;
-   m_maskFilter = mask_filter;
-}
diff --git a/src/ossim/imaging/ossimPdfWriter.cpp b/src/ossim/imaging/ossimPdfWriter.cpp
deleted file mode 100644
index 1c6106f..0000000
--- a/src/ossim/imaging/ossimPdfWriter.cpp
+++ /dev/null
@@ -1,1875 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file
-//
-// Author:  David Burken
-//
-// Description: OSSIM Portable Document Format (PDF) writer.
-//
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/imaging/ossimPdfWriter.h>
-#include <ossim/base/ossimBooleanProperty.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimNumericProperty.h>
-#include <ossim/imaging/ossimBandSelector.h>
-#include <ossim/imaging/ossimGeneralRasterWriter.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
-#include <ossim/imaging/ossimJpegMemDest.h>
-#include <ossim/imaging/ossimScalarRemapper.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimUtmProjection.h>
-#include <ctime>
-#include <fstream>
-#include <iomanip>
-#include <ostream>
-#include <sstream>
-#include <string>
-#include <vector>
-
-RTTI_DEF1(ossimPdfWriter,
-	  "ossimPdfWriter",
-	  ossimImageFileWriter)
-
-//---
-// For trace debugging (to enable at runtime do:
-// your_app -T "ossimPdfWriter:debug" your_app_args
-//---
-static ossimTrace traceDebug("ossimPdfWriter:debug");
-static ossimTrace traceLog("ossimPdfWriter:log");
-
-// Property keywords:
-static const std::string AUTHOR_KW        = "Author";
-static const std::string CREATOR_KW       = "Creator";
-static const std::string CREATION_DATE_KW = "CreationDate";
-static const std::string KEYWORDS_KW      = "Keywords";
-static const std::string MOD_DATE_KW      = "ModDate";
-static const std::string PRODUCER_KW      = "Producer";
-static const std::string SUBJECT_KW       = "Subject";
-static const std::string TITLE_KW         = "Title";
-
-//---
-// For the "ident" program which will find all exanded $Id$ macros and print them.
-//---
-#if OSSIM_ID_ENABLED
-static const char OSSIM_ID[] = "$Id$";
-#endif
-
-ossimPdfWriter::ossimPdfWriter()
-   : ossimImageFileWriter(),
-     m_str(0),
-     m_ownsStream(false),
-     m_savedInput(0),
-     m_kwl( new ossimKeywordlist() ),
-     m_mutex()
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimPdfWriter::ossimPdfWriter entered" << std::endl;
-#if OSSIM_ID_ENABLED
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "OSSIM_ID:  "
-         << OSSIM_ID
-         << std::endl;
-#endif
-   }
-   
-   // Since there is no internal geometry set the flag to write out one.
-   setWriteExternalGeometryFlag(true);
-   
-   theOutputImageType = "ossim_pdf";
-}
-
-ossimPdfWriter::~ossimPdfWriter()
-{
-   // This will flush stream and delete it if we own it.
-   close();
-
-   m_kwl = 0; // Not a leak, ossimRefPtr
-}
-
-ossimString ossimPdfWriter::getShortName() const
-{
-   return ossimString("ossim_pdf_writer");
-}
-
-ossimString ossimPdfWriter::getLongName() const
-{
-   return ossimString("ossim pdf writer");
-}
-
-ossimString ossimPdfWriter::getClassName() const
-{
-   return ossimString("ossimPdfWriter");
-}
-
-bool ossimPdfWriter::writeFile()
-{
-   bool result = false;
-   
-   if( theInputConnection.valid() && ( getErrorStatus() == ossimErrorCodes::OSSIM_OK ) )
-   {
-      //---
-      // Make sure we can open the file.  Note only the master process is used for
-      // writing...
-      //---
-      if(theInputConnection->isMaster())
-      {
-         if (!isOpen())
-         {
-            open();
-         }
-      }
-      
-      result = writeStream();
-   }
-
-   return result;
-}
-
-bool ossimPdfWriter::writeStream()
-{
-   static const char MODULE[] = "ossimPdfWriter::writeStream";
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " entered..."
-         << "\nCurrent options:\n"
-         << *(m_kwl.get()) <<  std::endl;
-   }
-   
-   bool result = false;
-
-   if ( isOpen() )
-   {
-      // Make sure we have a region of interest.
-      if( theAreaOfInterest.hasNans() )
-      {
-         theInputConnection->initialize();
-         theAreaOfInterest = theInputConnection->getAreaOfInterest();
-      }
-      else
-      {
-         theInputConnection->setAreaOfInterest( theAreaOfInterest );
-      }
-
-      // Write the image:
-      writeImage( m_str );
-
-      close();
-
-      // Set the status:
-      result = true;
-
-      // Reset the input to the image source sequence if it was modified.      
-      if ( m_savedInput.get() != theInputConnection->getInput( 0 ) )
-      {
-         theInputConnection->connectMyInputTo( 0, m_savedInput.get() );  
-      }
-   }
-   
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " exit status = " << (result?"true":"false") << std::endl;
-   }
-
-   return result;
-   
-} // bool ossimPdfWriter::writeStream()
-
-void ossimPdfWriter::writeHeader( std::ostream* str )
-{
-   // Header:
-   if ( str )
-   {
-      // Open in binary mode:
-      std::ostringstream os( std::ios_base::out|std::ios_base::binary );
-      
-      os << "%PDF-1.7\n";
-
-      //---
-      // Add comment with four characters greater than 127 to flag "binary pdf".
-      // Standard/norm from spec is "0xE2E3CFD3":
-      //---
-      std::vector<ossim_uint8> binData(4);
-      binData[0] = 0xE2;
-      binData[1] = 0xE3;
-      binData[2] = 0xCF;
-      binData[3] = 0xD3;
-
-      os << "%";
-      os.write( (char*)&binData.front(), binData.size() );
-      os << "\n";
-
-      // Write it:
-      str->write( os.str().data(), os.str().size() );
-
-      if ( traceLog() )
-      {
-         // Has binary data in it???
-         ossimNotify(ossimNotifyLevel_DEBUG) << os.str() << "\n";
-      }
-   }
-}
-
-void ossimPdfWriter::writeCatalog( std::ostream* str,
-                                   std::vector<std::streamoff>& xref )
-{
-   // Write the Catalog object.  This assumes an order of:
-   if ( str )
-   {
-      // Capture position:
-      xref.push_back( (std::streamoff)m_str->tellp() );
-
-      std::ostringstream os; // tmp stream...
-      os << xref.size() << " 0 obj\n"
-         << "  << /Type /Catalog\n"
-         << "     /Pages "    << xref.size()+1 << " 0 R\n" // Reference to Pages.
-         << "  >>\n"
-         << "endobj\n";
-
-      // Write it:
-      str->write( os.str().data(), os.str().size() );
-
-      if ( traceLog() )
-      {
-         // Has binary data in it???
-         ossimNotify(ossimNotifyLevel_DEBUG) << os.str() << "\n";
-      }
-   }
-}
-
-#if 0
-void ossimPdfWriter::writeOutlines( std::ostream* str,
-                                    std::vector<std::streamoff>& xref )
-{
-   // Write the Outlines object:
-   if ( str )
-   {
-      // Capture position:
-      xref.push_back( (std::streamoff)m_str->tellp() );
-
-      std::ostringstream os; // tmp stream...
-      os << xref.size() << " 0 obj\n"
-         << "  << /Type /Outlines\n"
-         << "     /Count 0\n"
-         << "  >>\n"
-         << "endobj\n";
-
-      str->write( os.str().data(), os.str().size() );
-
-      if ( traceLog() )
-      {
-         // Has binary data in it???
-         ossimNotify(ossimNotifyLevel_DEBUG) << os.str() << "\n";
-      }
-   }
-}
-#endif
-
-void ossimPdfWriter::writePages( std::ostream* str,
-                                 std::vector<std::streamoff>& xref )
-{
-   // Write Pages object.
-   if ( str )
-   {
-      // Capture position:
-      xref.push_back( (std::streamoff)str->tellp() );
-
-      std::ostringstream os;
-      os << xref.size() << " 0 obj\n"
-         << "  << /Type /Pages\n"
-         << "     /Kids [ " << xref.size()+1 << " 0 R ]\n" // Reference to Page.
-         << "     /Count 1\n"
-         << "  >>\n"
-         << "endobj\n";
-
-      str->write( os.str().data(), os.str().size() );
-      
-      if ( traceLog() )
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << os.str() << "\n";
-      }
-   }
-}
-
-void ossimPdfWriter::writeInfo( std::ostream* str,
-                                std::vector<std::streamoff>& xref )
-{
-   // Write Pages object.
-   if ( str )
-   {
-      // Capture position:
-      xref.push_back( (std::streamoff)str->tellp() );
-
-      std::ostringstream os;
-      os << xref.size() << " 0 obj % Document Information Dictionary\n";
-
-      // Tile:
-      std::string s;
-      getTitle( s );
-      if ( s.size() )
-      {
-         os << "   << /Title (" << s << ")\n";
-      }
-      
-      // Author:
-      getAuthor( s );
-      if ( s.size() )
-      {
-         os << "      /Author (" << s << ")\n";
-      }
-
-      // Creator:
-      getCreator( s );
-      if ( s.size() )
-      {
-         os << "      /Creator (" << s << ")\n";
-      }
-
-      // Producer:
-      getProducer( s );
-      if ( s.size() )
-      {
-         os << "      /Producer (" << s << ")\n";
-      }
-
-      // Creation date ( D : YYYYMMDDHHmmSSOHH ' mm ' ):
-      getCreationDate( s );
-      if ( s.size() )
-      {
-         os << "      /CreationDate " << s << "\n";
-      }
-
-      // Modification date ( D : YYYYMMDDHHmmSSOHH ' mm ' ):
-      getModDate( s );
-      if ( s.size() )
-      {
-         os << "      /ModDate " << s << "\n";
-      }
-
-      os << "   >>\n"
-            << "endobj\n";
-
-      str->write( os.str().data(), os.str().size() );
-      
-      if ( traceLog() )
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << os.str() << "\n";
-      }
-   }
-   
-} // End: ossimPdfWriter::writeInfo
-
-bool ossimPdfWriter::writeImage( std::ostream* str )
-{
-   bool status = false;
-   
-   if ( str )
-   {
-      //---
-      // This will remap input to eight bit if not already and make input one or
-      // three band depending on number of bands.
-      //---
-      setupInputChain();
-         
-      // Set the sequence tile size:
-      ossimIpt tileSize;
-      getTileSize( tileSize );
-      theInputConnection->setTileSize( tileSize );
-      
-      // Start the sequence at the first tile.
-      theInputConnection->setToStartOfSequence();
-      
-      const ossim_uint32 WIDTH  = theAreaOfInterest.width();
-      const ossim_uint32 HEIGHT = theAreaOfInterest.height();
-      const ossim_uint32 TW     = theInputConnection->getNumberOfTilesHorizontal();    
-      const ossim_uint32 TH     = theInputConnection->getNumberOfTilesVertical();
-      const ossim_uint32 TILES  = theInputConnection->getNumberOfTiles();
-
-#if 0 /* Please save for debug. (drb) */
-      ossimIrect   boundingRect  = theInputConnection->getBoundingRect();
-      ossimNotify(ossimNotifyLevel_NOTICE)
-         << "\nBounding rect: " << theInputConnection->getBoundingRect()
-         << "\nAOI:           " << theAreaOfInterest  
-         << "\nBands:         " << theInputConnection->getNumberOfOutputBands()
-         << "\ntilesWide:     " << TW
-         << "\ntilesHigh:     " << TH
-         << "\ntileWidth:     " << tileWidth
-         << "\ntileHeight     " << tileHeight << std::endl;
-#endif
-
-      if ( traceLog() )
-      {
-         ossimKeywordlist logKwl;
-         theInputConnection->saveStateOfAllInputs(logKwl);      
-         ossimFilename logFile = getFilename();
-         logFile.setExtension("log");
-         ossimKeywordlist kwl;
-         theInputConnection->saveStateOfAllInputs(kwl);
-         kwl.write(logFile.c_str() );
-      }
-      
-      // Cross reference(xref) table.  Holds the offset of each object.  Written at the end.
-      std::vector<std::streamoff> xref;
-         
-      //---
-      // Header:
-      //---
-      writeHeader( str );
-         
-      //---
-      // Catalog object:
-      //---
-      writeCatalog( str, xref );
-         
-      //---
-      // Outlines object:
-      //---
-      // writeOutlines( m_str, xref );
-         
-      //---
-      // Pages object:
-      //---
-      writePages( str, xref );
-      
-      //---
-      // Page object:
-      //---
-      
-      // Capture position:
-      xref.push_back( (std::streamoff)str->tellp() );
-      
-      std::ostringstream os1;
-      os1 << xref.size() << " 0 obj\n"
-          << "  << /Type /Page\n"
-          << "     /Parent "    << xref.size()-1 << " 0 R\n" // Parent always one back.
-          << "     /Resources " << xref.size()+1 << " 0 R\n" // Next object.
-          << "     /MediaBox[0.0 0.0 " << WIDTH << " " << HEIGHT << "]\n"
-          // Contents = Resources_dictionary + tiles + base_form + 1):
-          << "     /Contents["  << (xref.size()+TILES+3) << " 0 R]\n";
-      
-      ossimRefPtr<ossimImageGeometry> geom = theInputConnection->getImageGeometry();      
-      if ( geom.valid() )
-      {
-         // Coordinate Transformation Matrix (CTM)
-         std::string lgiDictString;
-         getLgiDict( geom.get(), theAreaOfInterest, lgiDictString );
-         
-         if ( lgiDictString.size() )
-         {
-            os1 << lgiDictString;
-         }
-      }
-      
-      os1 << "  >>\n"
-         << "endobj\n"; // Matches: <</Type /Page"
-      
-      str->write( os1.str().data(), os1.str().size() );
-      if ( traceLog() )
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << os1.str() << "\n";
-      }
-      
-      // End /Page object
-      
-      //---
-      // Resource dictionary for page:
-      //---
-      
-      // Capture position:
-      xref.push_back( (std::streamoff)str->tellp() );
-
-      std::ostringstream os2;
-      os2 << xref.size() << " 0 obj % Resource dictionary for page.\n"
-          << "  << /ProcSet[/PDF/ImageB/ImageC]\n"
-          << "     /XObject << /Basemap_Form " << (xref.size()+TILES+1) << " 0 R ";
-
-      // Write in the tiles:
-      ossim_uint32 objIndex = static_cast<ossim_uint32>(xref.size()+1);
-      ossim_uint32 x;
-      ossim_uint32 y;
-      for ( x = 0; x < TW; ++x )
-      {
-         for ( y = 0; y < TH; ++y )
-         {
-            os2 << getTileString( x, y ) << " " << objIndex << " 0 R ";
-
-            ++objIndex;
-         }
- 
-      }
-      os2 << ">>\n" // Matches: /XObject<<
-          << "  >>\nendobj\n"; // Matches: % Resources...";
-
-      str->write( os2.str().data(), os2.str().size() );
-      if ( traceLog() )
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << os2.str() << "\n";
-      }
-      
-      // End Resources dictionary.
-
-      //---
-      // Now write the XObjects jpeg tiles:
-      //---
-      ossim_uint32 tileNumber = 0;
-      std::vector<ossimIrect> outputTileRects;
-      while ( tileNumber < TILES )
-      {
-         ossimRefPtr<ossimImageData> id = theInputConnection->getNextTile();
-         if( id.valid() )
-         {
-            // To hold output tile rect clamped to AOI.
-            ossimIrect outputTileRect;
-
-            switch ( getImageType() )
-            {
-               case ossimPdfWriter::RAW:
-               {
-                  writeRawTile( str, xref, id.get(), theAreaOfInterest, outputTileRect );
-                  break;
-               }
-               case ossimPdfWriter::JPEG:
-               default:
-               {
-                  writeJpegTile( str, xref, id.get(), theAreaOfInterest, outputTileRect );
-                  break;
-               }
-            }
-
-            // Capture tile rect:
-            outputTileRects.push_back( outputTileRect );
-         }
-         else
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimPdfWriter::writeImage ERROR:"
-               << "\nNULL Tile encountered, tile number=" << tileNumber
-               << std::endl;
-            status = false;
-            break;
-         }
-
-         ++tileNumber;
-
-         setPercentComplete( tileNumber / TILES * 100.0 );
-      }
-
-      if ( tileNumber == TILES )
-      {
-         status = true;
-      }
-
-      if ( status )
-      {
-         //---
-         // XObect Form for image tiles:
-         //---
-         
-         // Capture position:
-         xref.push_back( (std::streamoff)str->tellp() );
-
-         ossimIpt llPageOffset;
-         getLowerLeftPageOffset( theAreaOfInterest, llPageOffset );
-
-         std::ostringstream os3;
-         
-         // Tile loop - ontents for each ile:
-         tileNumber = 0;
-         ossim_uint32 x;
-         ossim_uint32 y;
-         for ( x = 0; x < TW; ++x )
-         {
-            for ( y = 0; y < TH; ++y )
-            {
-               //---
-               // PDF space is positive y = up, positive x = right.
-               // ossim image space is positive y down.
-               // 0, 0 is lower left corner in pdf space so "y of 0" in pdf space is
-               // theAreaOfInterest.ll().y in image space.
-               //---
-               ossim_int32 width = outputTileRects[tileNumber].width();
-
-               ossim_int32 height = outputTileRects[tileNumber].height();
-               
-               ossim_int32 llOffsetX =
-                  llPageOffset.x + outputTileRects[tileNumber].ll().x - theAreaOfInterest.ll().x;
-
-               ossim_int32 llOffsetY = llPageOffset.y + theAreaOfInterest.lr().y -
-                  outputTileRects[tileNumber].ll().y;
-               
-               os3 << "   q\n"                      // Save graphics state
-                   << "      " << width << " 0 0 " << height << " "
-                   << llOffsetX << " " << llOffsetY << " cm\n"
-                   << "      " << getTileString( x, y ) << " Do\n"
-                   << "   Q\n"; // Restore graphics state.
-               ++tileNumber;
-            }
-         }
-
-         std::ostringstream os4;
-         os4 << xref.size() << " 0 obj % /XObject/Form dictionary for image tiles.\n"
-             << "   << /Type /XObject\n"
-             << "      /Subtype /Form\n"
-             << "      /Length " << os3.str().size() << "\n"
-             << "      /BBox["
-             << llPageOffset.x << " " << llPageOffset.y << " "
-             << WIDTH << " " << HEIGHT << "]\n"
-             << "   >>\n"
-             << "stream\n";
-
-         // Write the content stream to tmp stream.
-         os4.write( os3.str().data(), os3.str().size() );
-         
-         os4 << "\n"
-             << "endstream\n"
-             << "endobj\n";
-
-         // Write the tmp stream to output stream.
-         str->write( os4.str().data(), os4.str().size() );
-         
-         if ( traceLog() )
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << os4.str() << "\n";
-         }
-         
-         //---
-         // Contents of page:
-         //---
-         
-         // Capture position:
-         xref.push_back( (std::streamoff)str->tellp() );
-
-         std::ostringstream os5;
-         os5 << "/Basemap_Form Do";
-         
-         std::ostringstream os6;
-         os6 << xref.size() << " 0 obj % Contents of page.\n"
-             << "   << /Length " << os5.str().size() << " >>\n"
-             << "stream\n";
-
-         os6.write( os5.str().data(), os5.str().size() );
-         os6 << "\n"
-             << "endstream\n"
-             << "endobj\n";
-         
-         str->write( os6.str().data(), os6.str().size() );
-         if ( traceLog() )
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG) << os6.str() << "\n";
-         }
-         
-         m_mutex.lock(); // Code not thread safe.
-         
-         // Document Information dictionary:
-         writeInfo( str, xref );
-         
-         m_mutex.unlock();
-         
-         //---
-         // Cross reference tables:
-         //---
-         
-         // Capture start of xref for the second to last line:
-         std::streamoff xrefOffset = (std::streamoff)m_str->tellp();
-         
-         writeXref( m_str, xref );
-         
-         //---
-         // Trailer:
-         //---
-         writeTrailer( m_str, static_cast<ossim_uint32>(xref.size()+1), xrefOffset );
-      }
-      
-   } // Matches: if ( str ...
-   
-   return status;
-
-} // End: ossimPdfWriter::writeImage
-
-void ossimPdfWriter::writeJpegTile( std::ostream* str,
-                                    std::vector<std::streamoff>& xref,
-                                    ossimImageData* id,
-                                    const ossimIrect& aoi,
-                                    ossimIrect& outputTileRect )
-{
-   //---
-   // Most of code and comments below are from jpeg-6b "example.c" file. See 
-   // http://www4.cs.fau.de/Services/Doc/graphics/doc/jpeg/libjpeg.html
-   //---
-
-   //---
-   // Initialize JPEG compression library:
-   // Note: JDIMENSION is typedefed to an unsigned int.
-   //---
-   struct jpeg_compress_struct cinfo;
-   struct jpeg_error_mgr jerr;
-   cinfo.err = jpeg_std_error( &jerr );
-   jpeg_create_compress(&cinfo);
-
-   //---
-   // Need to define a custom ostream destination manager for jpeglib to write compressed block:
-   // Note: Write the tile to a temp memory stream to get the size up front.
-   //---
-   std::ostringstream tileStream;
-   jpeg_cpp_stream_dest(&cinfo, tileStream);
-   
-   
-   // Setting the parameters of the output file here.
-   const ossim_uint32 BANDS = id->getNumberOfBands();
-   const ossim_uint32 TW    = id->getWidth();
-   const ossim_uint32 TH    = id->getHeight();
-   
-   // Assign width, height clamping to the aoi.      
-   cinfo.image_width = ossim::min<ossim_uint32>(
-      TW, aoi.lr().x - id->getOrigin().x + 1 );
-   cinfo.image_height = ossim::min<ossim_uint32>(
-      TH, aoi.lr().y - id->getOrigin().y + 1 );
-   cinfo.input_components = BANDS;
-
-   // Capture the output tile rect:
-   outputTileRect = ossimIrect( id->getOrigin(),
-                                ossimIpt( id->getOrigin().x + cinfo.image_width - 1,
-                                          id->getOrigin().y + cinfo.image_height - 1 ) );
-   
-   // colorspace of input image 
-   if ( BANDS == 3 )
-   {
-      cinfo.in_color_space = JCS_RGB;
-   }
-   else
-   {
-      cinfo.in_color_space = JCS_GRAYSCALE;
-   }
-   
-   // Default compression parameters...
-   jpeg_set_defaults( &cinfo );
-   
-   /* Now do the compression .. */
-   jpeg_start_compress( &cinfo, TRUE );
-   
-   // Compress the tile on line at a time:
-   JSAMPLE** samp_array = new JSAMPLE* [cinfo.image_height];
-   
-   //---
-   // Get a pointer to the source data.
-   // Needs to be band interleaved by pixel(BIP), so convert if needed.
-   //---
-   ossimRefPtr<ossimImageData> tempTile = 0;
-   ossim_uint8* tile = 0;
-   if ( ( BANDS == 1 ) &&
-        ( cinfo.image_width == id->getWidth() ) &&
-        ( cinfo.image_height == id->getHeight() ) )
-   {
-      tile = id->getUcharBuf();
-   }
-   else
-   {
-      // Convert from OSSIM's native BSQ interleave to BIP.
-      tempTile = new ossimImageData(
-         0, OSSIM_UINT8, BANDS, cinfo.image_width, cinfo.image_height );
-      tempTile->setOrigin( id->getOrigin() );
-      tempTile->initialize();
-      tile = tempTile->getUcharBuf();
-      id->unloadTile( tile, tempTile->getImageRectangle(), OSSIM_BIP );
-   }
-      
-   for ( ossim_uint32 row=0; row<cinfo.image_height; ++row )
-   {
-      samp_array[row] = (JSAMPLE*) tile + row*cinfo.input_components*cinfo.image_width;
-   }
-   
-   jpeg_write_scanlines( &cinfo, samp_array, cinfo.image_height );
-
-   //---
-   // Clean up after done compressing:
-   // Note: MUST do before writing to output stream below.
-   //---
-   jpeg_finish_compress( &cinfo );
-   jpeg_destroy_compress( &cinfo );
-   delete [] samp_array;
-   samp_array = 0;
-
-   // Capture position:
-   xref.push_back( (std::streamoff)str->tellp() );
-   
-   std::ostringstream os1;
-   os1 << xref.size() << " 0 obj\n"
-       << "   << /Type /XObject\n"
-       << "      /Subtype /Image\n"
-       << "      /Length " << tileStream.str().size() << "\n"
-       << "      /Filter[/DCTDecode]\n"
-       << "      /BitsPerComponent 8"
-       << "      /ColorSpace " << (BANDS==1?"/DeviceGray\n":"/DeviceRGB\n")
-       << "      /Width " << cinfo.image_width
-       << "      /Height " << cinfo.image_height
-       << "   >>\n"
-       << "stream\n";
-   
-   str->write( os1.str().data(), os1.str().size() );
-   
-   if ( traceLog() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << os1.str()
-         << "*** image stream not displayed ***\n"
-         << "endstream\n"
-         << "endobj\n\n";
-   }
-
-   // Write the image tile from memory to output stream.
-   str->write( tileStream.str().data(), tileStream.str().size() );
-
-   // Close out stream object.
-   *str << "\n"
-        << "endstream\n"
-        << "endobj\n";
-   
-} // End: ossimPdfWriter::writeJpegTile( ... )
-
-void ossimPdfWriter::writeRawTile( std::ostream* str,
-                                   std::vector<std::streamoff>& xref,
-                                   ossimImageData* id,
-                                   const ossimIrect& aoi,
-                                   ossimIrect& outputTileRect )
-{
-   const ossim_uint32 BANDS = id->getNumberOfBands();
-   const ossim_uint32 TW    = id->getWidth();
-   const ossim_uint32 TH    = id->getHeight();
-
-   // Assign width, height clamping to the aoi.      
-   ossim_uint32 width = ossim::min<ossim_uint32>(
-      TW, aoi.lr().x - id->getOrigin().x + 1  );
-   ossim_uint32 height = ossim::min<ossim_uint32>(
-      TH, aoi.lr().y - id->getOrigin().y + 1 );
-
-   // Capture the output tile rect:
-   outputTileRect = ossimIrect( id->getOrigin(),
-                                ossimIpt( id->getOrigin().x + width - 1,
-                                          id->getOrigin().y + height - 1 ) );
-
-   //---
-   // Get a pointer to the source data.
-   // Needs to be band interleaved by pixel(BIP), so convert if needed.
-   //---
-   ossimRefPtr<ossimImageData> tempTile = 0;
-   ossim_uint8* tile = 0;
-   ossim_uint32 length = 0;
-   if ( ( BANDS == 1 ) && ( width == id->getWidth() ) && ( height == id->getHeight() ) )
-   {
-      tile   = id->getUcharBuf();
-      length = id->getSizeInBytes();
-   }
-   else
-   {
-      // Convert from OSSIM's native BSQ interleave to BIP.
-      tempTile = new ossimImageData( 0, OSSIM_UINT8, BANDS, width, height );
-      tempTile->setOrigin( id->getOrigin() );
-      tempTile->initialize();
-      tile = tempTile->getUcharBuf();
-      id->unloadTile( tile, tempTile->getImageRectangle(), OSSIM_BIP );
-      length = tempTile->getSizeInBytes();
-   }
-
-   // Capture position:
-   xref.push_back( (std::streamoff)str->tellp() );
-   
-   std::ostringstream os1;
-   os1 << xref.size() << " 0 obj\n"
-       << "   << /Type /XObject\n"
-       << "      /Subtype /Image\n"
-       << "      /Length " << length << "\n"
-       << "      /BitsPerComponent 8"
-       << "      /ColorSpace " << (BANDS==1?"/DeviceGray\n":"/DeviceRGB\n")
-       << "      /Width " << width
-       << "      /Height " << height
-       << "   >>\n"
-       << "stream\n";
-
-   str->write( os1.str().data(), os1.str().size() );
-   
-   if ( traceLog() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << os1.str()
-         << "*** image stream not displayed ***\n"
-         << "endstream\n"
-         << "endobj\n\n";
-   }
-
-   // Write the image tile from memory to output stream.
-   str->write( (char*)tile, length );
-   
-   // Close out stream object.
-   *str << "\n"
-        << "endstream\n"
-        << "endobj\n";
-   
-} // End ossimPdfWriter::writeRawTile( ... )
-
-void ossimPdfWriter::writeXref( std::ostream* str,
-                                const std::vector<std::streamoff>& xref )
-{
-   if ( str )
-   {
-      std::ostringstream os;
-      os << "xref\n"
-         << "0 " << (xref.size()+1) << "\n"
-         << "0000000000 65535 f \n";
-            
-      std::vector<std::streamoff>::const_iterator i = xref.begin();
-      while ( i != xref.end() )
-      {
-         os << std::setiosflags(std::ios_base::fixed|std::ios_base::right)
-            << std::setfill('0')
-            << std::setw(10)
-            << (*i)
-            << " 00000 n \n";
-         ++i;
-      }
-      
-      // os << "\n";
-      
-      str->write( os.str().data(), os.str().size() );
-      
-      if ( traceLog() )
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << os.str() << "\n";
-      }
-   }
-}
-
-void ossimPdfWriter::writeTrailer( std::ostream* str,
-                                   ossim_uint32 entrySize,
-                                   std::streamoff xrefOffset )
-{
-   if ( str )
-   {
-      std::ostringstream os;
-      os << "trailer\n"
-         << "   << /Size " << entrySize << "\n"
-         << "      /Root 1 0 R\n"
-         << "      /Info " << entrySize-1 << " 0 R\n"
-         << "   >>\n"
-         << "startxref\n"
-         << xrefOffset << "\n"
-         << "%%EOF\n";
-      // << "%%EOF";
-
-      str->write( os.str().data(), os.str().size() );
-
-      if ( traceLog() )
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << os.str() << "\n";
-      }
-   }
-}
-
-#if 0
-void ossimPdfWriter::writeDummy( std::ostream* str,
-                                 std::vector<std::streamoff>& xref  )
-{
-   // Write a blank object.
-   if ( str )
-   {
-      // Capture position:
-      xref.push_back( (std::streamoff)str->tellp() );
-      
-      std::ostringstream os;
-      os << xref.size() << " 0 obj % dummy\n"
-         << "endobj\n";
-      
-      str->write( os.str().data(), os.str().size() );
-      
-      if ( traceLog() )
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << os.str() << "\n";
-      }
-   }
-}
-#endif
-
-bool ossimPdfWriter::saveState(ossimKeywordlist& kwl,
-                               const char* prefix)const
-{
-   return ossimImageFileWriter::saveState(kwl, prefix);
-}
-
-bool ossimPdfWriter::loadState(const ossimKeywordlist& kwl,
-                               const char* prefix)
-{
-   return ossimImageFileWriter::loadState(kwl, prefix);
-}
-
-bool ossimPdfWriter::isOpen() const
-{
-   bool result = false;
-   if (m_str)
-   {
-      const std::ofstream* fs = dynamic_cast<const std::ofstream*>(m_str);
-      if ( fs )
-      {
-         result = fs->is_open();
-      }
-      else
-      {
-         // Pointer good enough...
-         result = true;
-      }
-   }
-   return result;
-}
-
-
-bool ossimPdfWriter::open()
-{
-   bool result = false;
-   
-   close();
-
-   // Check for empty filenames.
-   if (theFilename.size())
-   {
-      std::ofstream* os = new std::ofstream();
-      os->open(theFilename.c_str(), ios::out | ios::binary);
-      if(os->is_open())
-      {
-         m_str = os;
-         m_ownsStream = true;
-         result = true;
-      }
-      else
-      {
-         delete os;
-         os = 0;
-      }
-   }
-   return result;
-}
-
-void ossimPdfWriter::close()
-{
-   if (m_str)      
-   {
-      m_str->flush();
-
-      if (m_ownsStream)
-      {
-         delete m_str;
-         m_str = 0;
-         m_ownsStream = false;
-      }
-   }
-}
-
-void ossimPdfWriter::getImageTypeList(std::vector<ossimString>& imageTypeList)const
-{
-   imageTypeList.push_back(ossimString("ossim_pdf"));
-}
-
-ossimString ossimPdfWriter::getExtension() const
-{
-   return ossimString("pdf");
-}
-
-bool ossimPdfWriter::hasImageType(const ossimString& imageType) const
-{
-   bool result = false;
-   if ( (imageType == "ossim_pdf") || (imageType == "image/pdf")||(imageType == "application/pdf") )
-   {
-      result = true;
-   }
-   return result;
-}
-
-void ossimPdfWriter::setProperty( ossimRefPtr<ossimProperty> property )
-{
-   if ( property.valid() )
-   {
-      std::string name = property->getName().string();
-      if ( name.size() )
-      {
-         if ( ( name == ossimKeywordNames::IMAGE_TYPE_KW ) ||
-              ( name == AUTHOR_KW ) ||
-              ( name == CREATOR_KW ) ||
-              ( name == CREATION_DATE_KW ) ||
-              ( name == KEYWORDS_KW ) ||
-              ( name == MOD_DATE_KW ) ||
-              ( name == ossimKeywordNames::OUTPUT_TILE_SIZE_KW ) ||
-              ( name == PRODUCER_KW ) ||
-              ( name == SUBJECT_KW ) ||
-              ( name == TITLE_KW ) )
-         {
-            addOption( name, property->valueToString().string() );
-         }
-         else
-         {
-            ossimImageFileWriter::setProperty(property);
-         }
-      }
-   }
-   
-} // ossimPdfWriter::setProperty
-
-ossimRefPtr<ossimProperty> ossimPdfWriter::getProperty(const ossimString& name)const
-{
-   ossimRefPtr<ossimProperty> prop = 0;
-
-   if ( name.size() )
-   {
-      if ( name == AUTHOR_KW )
-      {
-         ossimString value;
-         getAuthor( value.string() );
-         ossimRefPtr<ossimStringProperty> stringProp =
-            new ossimStringProperty( name, value, true);
-         prop = stringProp.get();
-      }
-      else if ( name == CREATOR_KW )
-      {
-         ossimString value;
-         getCreator( value.string() );
-         ossimRefPtr<ossimStringProperty> stringProp =
-            new ossimStringProperty( name, value, true);
-         prop = stringProp.get();
-      }
-      else if ( name == CREATION_DATE_KW )
-      {
-         ossimString value;
-         getCreationDate( value.string() );
-         ossimRefPtr<ossimStringProperty> stringProp =
-            new ossimStringProperty( name, value, true);
-         prop = stringProp.get();
-      }
-      else if ( name == ossimKeywordNames::IMAGE_TYPE_KW )
-      {
-         ossimString value;
-         getImageType( value.string() );
-         ossimRefPtr<ossimStringProperty> stringProp =
-            new ossimStringProperty( name, value, false); //  editable flag = false
-         
-         // Alway support jpeg.
-         stringProp->addConstraint( ossimString("jpeg") );
-         
-         // Alway support raw (general raster).
-         stringProp->addConstraint( ossimString("raw") );
-
-         prop = stringProp.get();
-      }
-      else if ( name == KEYWORDS_KW )
-      {
-         ossimString value;
-         getKeywords( value.string() );
-         ossimRefPtr<ossimStringProperty> stringProp =
-            new ossimStringProperty( name, value, true);
-         prop = stringProp.get();
-      }
-      else if ( name == MOD_DATE_KW )
-      {
-         ossimString value;
-         getModDate( value.string() );
-         ossimRefPtr<ossimStringProperty> stringProp =
-            new ossimStringProperty( name, value, true);
-         prop = stringProp.get();
-      }
-      else if( name == ossimKeywordNames::OUTPUT_TILE_SIZE_KW )
-      {
-         ossimString value;
-         getTileSize( value.string() );
-         ossimRefPtr<ossimStringProperty> stringProp =
-            new ossimStringProperty( name, value, false);
-         stringProp->addConstraint(ossimString("16"));
-         stringProp->addConstraint(ossimString("32"));
-         stringProp->addConstraint(ossimString("64"));
-         stringProp->addConstraint(ossimString("128"));
-         stringProp->addConstraint(ossimString("256"));      
-         stringProp->addConstraint(ossimString("512"));      
-         stringProp->addConstraint(ossimString("1024"));      
-         stringProp->addConstraint(ossimString("2048"));      
-         prop = stringProp.get();
-      }
-      else if ( name == SUBJECT_KW )
-      {
-         ossimString value;
-         getSubject( value.string() );
-         ossimRefPtr<ossimStringProperty> stringProp =
-            new ossimStringProperty( name, value, true);
-         prop = stringProp.get();
-      }
-      else if ( name == TITLE_KW )
-      {
-         ossimString value;
-         getSubject( value.string() );
-         ossimRefPtr<ossimStringProperty> stringProp =
-            new ossimStringProperty( name, value, true);
-         prop = stringProp.get();
-      }
-      else
-      {
-         prop = ossimImageFileWriter::getProperty(name);
-      }
-   }
-   
-   return prop;
-   
-} // End: ossimPdfWriter::getProperty
-
-void ossimPdfWriter::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   propertyNames.push_back( ossimString( AUTHOR_KW ) );
-   propertyNames.push_back( ossimString( CREATOR_KW ) );
-   propertyNames.push_back( ossimString( CREATION_DATE_KW ) );
-   propertyNames.push_back( ossimString( ossimKeywordNames::IMAGE_TYPE_KW ) );
-   propertyNames.push_back( ossimString( KEYWORDS_KW ) );
-   propertyNames.push_back( ossimString( MOD_DATE_KW ) );
-   propertyNames.push_back( ossimString( ossimKeywordNames::OUTPUT_TILE_SIZE_KW ) );
-   propertyNames.push_back( ossimString( PRODUCER_KW ) );
-   propertyNames.push_back( ossimString( SUBJECT_KW ) );
-   propertyNames.push_back( ossimString( TITLE_KW ) );
-
-   ossimImageFileWriter::getPropertyNames(propertyNames);
-}
-
-bool ossimPdfWriter::setOutputStream(std::ostream& stream)
-{
-   if (m_ownsStream && m_str)
-   {
-      delete m_str;
-   }
-   m_str = &stream;
-   m_ownsStream = false;
-   return true;
-}
-
-void ossimPdfWriter::setupInputChain()
-{
-   if ( theInputConnection.get() )
-   {
-      // Capture the input to the image source sequencer(theInputConnection).
-      m_savedInput = theInputConnection->getInput( 0 );
-      
-      ossimScalarType inputScalar = theInputConnection->getOutputScalarType();
-      ossim_uint32 bands          = theInputConnection->getNumberOfOutputBands();
-
-      if( inputScalar != OSSIM_UINT8 )
-      {
-         // Make eight bit.
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimPdfWriter::setupInputChain WARNING:"
-               << "\nData is being scaled to 8 bit!"
-               << "\nOriginal scalar type:  "
-               << ossimScalarTypeLut::instance()->
-               getEntryString(inputScalar).c_str()
-               << std::endl;
-         }
-         
-         //---
-         // Attach a scalar remapper to the end of the input chain.  This will
-         // need to be unattached and deleted at the end of this.
-         //---
-         ossimRefPtr<ossimScalarRemapper> sr = new ossimScalarRemapper;
-
-         // Connect remapper's input to sequencer input.
-         sr->connectMyInputTo( 0, theInputConnection->getInput(0) );
-
-         // Connet sequencer to remapper.
-         theInputConnection->connectMyInputTo(0, sr.get() );
-
-         // Initialize connections.
-         theInputConnection->initialize();
-      }
-
-      // Must be one or three band. Note bands are zero based...      
-      if ( ( bands != 1 ) && ( bands != 3 ) )
-      {
-         std::vector<ossim_uint32> bandList;
-         
-         // Always have one band.
-         bandList.push_back( 0 );
-
-         if ( bands > 3 )
-         {
-            // Use the first three bands.
-            bandList.push_back( 1 );
-            bandList.push_back( 2 );
-         }
-
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimPdfWriter::setupInputChain WARNING:"
-               << "\nOutput bands must be 1 or 3 and are being filterd!"
-               << "\nOriginal band count: " << bands
-               << "\nNew band count: " << bandList.size()
-               << std::endl;
-         }
-         
-         ossimRefPtr<ossimBandSelector> bs = new ossimBandSelector();
-
-         // Set the the band selector list.
-         bs->setOutputBandList( bandList );
-         
-         // Connect band selector's input to sequencer input.
-         bs->connectMyInputTo( 0, theInputConnection->getInput(0) );
-
-         // Connet sequencer to band selector.
-         theInputConnection->connectMyInputTo(0, bs.get() );
-
-         // Initialize connections.
-         theInputConnection->initialize();
-      }
-
-      if (  m_savedInput != theInputConnection->getInput( 0 ) )
-      {
-         //---
-         // If the input to the image source sequencer change the AOI
-         // MUST be reset as it gets wiped.
-         //---
-         theInputConnection->setAreaOfInterest( theAreaOfInterest );
-      }
-      
-   } // Matches: if ( theInputConnection )
-
-} // End: void ossimPdfWriter::setupInputChain()
-
-ossimPdfWriter::ossimPdfImageType ossimPdfWriter::getImageType() const
-{
-   ossimPdfWriter::ossimPdfImageType result = ossimPdfWriter::UNKNOWN;
-
-   // Get the type and downcase.
-   ossimString os;
-   getImageType( os.string() );
-   os.downcase();
-
-   if ( os == "jpeg" )
-   {
-      result = ossimPdfWriter::JPEG;
-   }
-   else if ( os == "raw" )
-   {
-      result = ossimPdfWriter::RAW;
-   }
-   else
-   {
-      // Unknown value:
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimPdfWriter::getImageCompression WARN\n"
-         << "Unhandled image compression type: " << os << std::endl;
-   }
-   return result;
-}
-
-void ossimPdfWriter::getImageType( std::string& type ) const
-{
-   type = m_kwl->findKey( std::string(ossimKeywordNames::IMAGE_TYPE_KW) );
-   if ( type.empty() )
-   {
-      type = "jpeg"; // default
-   }
-}
-
-void ossimPdfWriter::addOption(  const std::string& key, const std::string& value )
-{
-   m_mutex.lock();
-   if ( m_kwl.valid() )
-   {
-      if ( key.size() && value.size() )
-      {
-         m_kwl->addPair( key, value );
-      }
-   }
-   m_mutex.unlock();
-}
-
-#if 0
-void ossimPdfWriter::getMediaBoxSize(  ossim_uint32 imageWidth,
-                                       ossim_uint32 imageHeight,
-                                       ossimIpt& size ) const
-{
-   //---
-   // This could be an option / property.
-   // 612 x 792 = 8.5 x 11 inches at 72 dots per inch (612/72 x 792/72)
-   //---
-   size.x = static_cast<ossim_uint32>(imageWidth);
-   size.y = static_cast<ossim_uint32>(imageHeight);
-}
-#endif
-
-void ossimPdfWriter::getLowerLeftPageOffset( const ossimIrect& aoi, ossimIpt& offset ) const
-{
-   if ( aoi.hasNans() == false )
-   {
-      // Get the page size.
-      // ossimIpt mediaBoxSize;
-      // getMediaBoxSize( mediaBoxSize );
-
-      // Temp hard coded. (drb)
-      offset.x = 0;
-      offset.y = 0;
-   }
-   else
-   {
-      offset.x = 0;
-      offset.y = 0;
-   }
-}
-
-void ossimPdfWriter::getLgiDict( ossimImageGeometry* geom,
-                                 const ossimIrect& aoi,
-                                 std::string& s ) const
-{
-   s.clear(); // Empty string indicates error.
-
-   if ( geom && !aoi.hasNans() )
-   {
-      // Coordinate Transformation Matrix (CTM)
-      std::string ctmString;
-      getLgiDictCtm( geom, aoi, ctmString );
-
-      if ( ctmString.size() )
-      {
-         // ProjectionType
-         std::string projectionString;
-         getLgiDictProjection( geom, projectionString );
-         
-         if ( projectionString.size() )
-         {
-            //---
-            // Neatline: Not required for single frame.
-            // std::string neatLineString;
-            // getLgiDictNeatline( geom, neatLineString );
-            //---
-            
-            // if ( neatLineString.size() )
-            // {
-            // cout << "d..." << endl;
-               
-            // Description
-            std::string descriptionString;
-            getLgiDictDescription( geom, descriptionString );
-            
-            if ( descriptionString.size() )
-            {
-               std::ostringstream os;
-               os << "/LGIDict"
-                  << "[<<"
-                  << ctmString
-                  << "/Version(2.1)"
-                  << projectionString
-                  // << neatLineString
-                  << descriptionString
-                  << "/Type/LGIDict>>]";
-               
-               s = os.str();
-               // }
-            }
-         }
-      }
-   }
-   
-} // End: ossimPdfWriter::getLgiDictString
-
-void ossimPdfWriter::getLgiDictDatum( ossimImageGeometry* geom,
-                                      std::string& s ) const
-{
-   s.clear();
-   if ( geom )
-   {
-      ossimRefPtr<const ossimMapProjection> mapProj = geom->getAsMapProjection();
-      if ( mapProj.valid() )
-      {
-         const ossimDatum* datum = mapProj->getDatum();
-         if ( datum )
-         {
-            s = "/Datum(";
-            s += datum->code().string();
-            s += ")";
-         }
-      }
-   }
-   
-} // End: ossimPdfWriter::getLgiDictDatum
-
-void ossimPdfWriter::getLgiDictDescription( ossimImageGeometry* geom,
-                                            std::string& s ) const
-{
-   s.clear();
-   if ( geom )
-   {
-      ossimRefPtr<const ossimMapProjection> mapProj = geom->getAsMapProjection();
-      if ( mapProj.valid() )
-      {
-         const ossimDatum* datum = mapProj->getDatum();
-         if ( datum )
-         {
-            std::string code = datum->code().string();
-
-            if ( code == "WGE" )
-            {
-               s = "/Description(WGS 84)";
-            }
-         }
-      }
-   }
-   
-} // End: ossimPdfWriter::getLgiDictDescription
-
-#if 0
-void ossimPdfWriter::getLgiDictNeatline( ossimImageGeometry* geom,
-                                         std::string& s ) const
-{
-   s.clear();
-   if ( geom )
-   {
-      std::ostringstream os;
-
-      // Tmp drb...
-      os << "/Neatline[(0.0000000000)(0.0000000000)(0.0000000000)(718.0800000000)(609.8400000000)(718.0800000000)(609.8400000000)(0.0000000000)]";
-
-      s = os.str();
-   }
-   
-} // End: ossimPdfWriter::getLgiDictNeatline
-#endif
-
-void ossimPdfWriter::getLgiDictProjection( ossimImageGeometry* geom,
-                                           std::string& s ) const
-{
-   s.clear(); // Empty string indicates error.
-   
-   // Projection:
-   std::string projType;
-   getLgiDictProjectionType( geom, projType );
-   
-   // Datum:
-   std::string datumString;
-   getLgiDictDatum( geom, datumString );
-   
-   // Description
-   std::string descriptionString;
-   getLgiDictDescription( geom, descriptionString );
-
-   if ( projType.size() && datumString.size() )
-   {
-      std::ostringstream os;
-      os << "/Projection<<"
-         << projType
-         << descriptionString
-         << datumString
-         << "/Type/Projection>>"
-         << "/Display<<"
-         << projType
-         << descriptionString
-         << datumString
-         << "/Type/Projection>>";
-
-      s = os.str();
-   }
-   
-} // End: ossimPdfWriter::getLgiDictProjection
-
-void ossimPdfWriter::getLgiDictCtm( ossimImageGeometry* geom,
-                                    const ossimIrect& aoi,
-                                    std::string& s ) const
-{
-   s.clear(); // Empty string indicates error.
-
-   ossimDpt scale;
-   scale.makeNan();
-   ossimDpt dTie;
-   dTie.makeNan();
-   
-   ossimRefPtr<ossimProjection> proj = geom->getProjection();
-   if ( proj.valid() )
-   {
-      ossimRefPtr<ossimMapProjection> mapProj = dynamic_cast<ossimMapProjection*>( proj.get() );
-      if ( mapProj.valid() )
-      {
-         if ( mapProj->isGeographic() )
-         {
-            // Degrees per pixel.
-            geom->getDegreesPerPixel( scale );
-
-            if ( !scale.hasNans() )
-            {
-               // Tie point: Lat, lon of lower left corner. 
-               ossimGpt gTie;
-               geom->localToWorld( ossimDpt( aoi.ll() ), gTie );
-
-               // Check just lat and lon disregard height.
-               if ( !ossim::isnan(gTie.lon) && !ossim::isnan(gTie.lon) )
-               {
-                  dTie.x = gTie.lon;
-                  dTie.y = gTie.lat;
-               }
-            }
-         }
-      }
-   }
-
-   if ( !scale.hasNans() && !dTie.hasNans() )
-   {
-      //---
-      // Example string:
-      // (0.0000381944)(0.0000000000)(0.0000000000)(0.0000381944)(-77.0558525000)(38.8388091667)
-      // NOTE: (0,0) is lower left corner in pdf space.
-      ossim_float64 d = 0.0;
-      std::ostringstream os;
-      os << setprecision(15) // Not sure if this should be 10??? (drb)
-         << std::setiosflags(std::ios_base::fixed|std::ios_base::right)
-         << std::setfill('0')
-         << "/CTM[(" << scale.x << ")(" << d << ")(" << d << ")("
-         << scale.y << ")(" << dTie.x << ")(" << dTie.y << ")]";
-      
-      s = os.str();
-   }
-   
-} // End: ossimPdfWriter::getCtmString
-
-void ossimPdfWriter::getLgiDictProjectionType( ossimImageGeometry* geom, std::string& s ) const
-{
-   //---
-   // Initialize the projection string from geometry:
-   // Currently only coded for geographic and UTM projection.
-   //---
-   
-   s.clear(); // Empty string indicates error.
-
-   if ( geom )
-   {
-      ossimRefPtr<const ossimMapProjection> mapProj = geom->getAsMapProjection();
-      if ( mapProj.valid() )
-      {
-         if ( mapProj->isGeographic() )
-         {
-            s = "/ProjectionType(GEOGRAPHIC)";
-         }
-         else
-         {
-            // Check for UTM:
-            ossimRefPtr<const ossimUtmProjection> utmProj =
-               dynamic_cast<const ossimUtmProjection*>( mapProj.get() );
-            if ( utmProj.valid() )
-            {
-               ossim_int32 zone = utmProj->getZone();
-               char hemisphere = utmProj->getHemisphere();
-               std::ostringstream os;
-               os << "/ProjectionType(UT)"
-                  << "/Zone(" << zone << ")"
-                  << "/Hemisphere(" << hemisphere << ")";
-               s = os.str();
-            }
-         }
-      }
-      
-   } // Matches if ( geom )
-   
-} // End: ossimPdfWriter::getProjectionType
-
-ossim_uint32 ossimPdfWriter::getEpsgCode( const ossimImageGeometry* geom ) const
-{
-   ossim_uint32 code = 32767;
-   if ( geom )
-   {
-      ossimRefPtr<const ossimProjection> proj = geom->getProjection();
-      if ( proj.valid() )
-      {
-         // Map projection:
-         ossimRefPtr<const ossimMapProjection> mapProj =
-            dynamic_cast<const ossimMapProjection*>( proj.get() );
-            
-         if ( mapProj.valid() )
-         {
-            code = mapProj->getPcsCode();
-         }
-      }
-   }
-   return code;
-}
-
-#if 0
-void ossimPdfWriter::getNumberOfTiles( ossim_uint32 imageWidth,
-                                       ossim_uint32 imageHeight,
-                                       ossimIpt size ) const
-{
-   const ossim_int32 DEFAULT_TILE_DIMENSION = 1024;
-
-   size.x = imageWidth / DEFAULT_TILE_DIMENSION;
-   size.y = imageHeight / DEFAULT_TILE_DIMENSION;   
-
-   if ( imageWidth % DEFAULT_TILE_DIMENSION )
-   {
-      ++size.x;
-   }
-   if ( imageHeight % DEFAULT_TILE_DIMENSION )
-   {
-      ++size.y;
-   }
-   
-} // End: getNumberOfTiles( ... )
-#endif
-
-void ossimPdfWriter::getTitle( std::string& s ) const
-{
-   // Check if in keyword list.
-   s = m_kwl->findKey( TITLE_KW );
-   
-   if ( s.empty() )
-   {
-      if ( theFilename.size() )
-      {
-         // Set to basename of file.
-         s = theFilename.file().string();
-      }
-   }
-}
-
-void ossimPdfWriter::getAuthor( std::string& s ) const
-{
-   // Check if in keyword list.
-   s = m_kwl->findKey( AUTHOR_KW );
-   
-   if ( s.empty() )
-   {
-      s = "ossim"; // Default: ???
-   }
-}
-
-void ossimPdfWriter::getSubject( std::string& s ) const
-{
-   // Check if in keyword list.
-   s = m_kwl->findKey( SUBJECT_KW );
-}
-
-void ossimPdfWriter::getKeywords( std::string& s ) const
-{
-   // Check if in keyword list.
-   s = m_kwl->findKey( KEYWORDS_KW ); 
-}
-
-void ossimPdfWriter::getCreator( std::string& s ) const
-{
-   // Check if in keyword list.
-   s = m_kwl->findKey( CREATOR_KW );
-   
-   if ( s.empty() )
-   {
-      s = "ossim"; // Default: ???
-   }
-}
-
-void ossimPdfWriter::getProducer( std::string& s ) const
-{
-   // Check if in keyword list.
-   s = m_kwl->findKey( PRODUCER_KW );
-   
-   if ( s.empty() )
-   {
-      s = "ossim"; // Default: ???
-   }
-}
-
-void ossimPdfWriter::getCreationDate( std::string& s ) const
-{
-   // Check if in keyword list.
-   s = m_kwl->findKey( CREATION_DATE_KW );
-   
-   if ( s.empty() )
-   {
-      getGmtDate( s ); 
-   }
-}
-
-void ossimPdfWriter::getModDate( std::string& s ) const
-{
-   // Check if in keyword list.
-   s = m_kwl->findKey( MOD_DATE_KW );
-   
-   if ( s.empty() )
-   {
-      getGmtDate( s );
-   }
-}
-
-void ossimPdfWriter::getGmtDate( std::string& s ) const
-{
-   // Get the time:
-   time_t now;
-   time(&now);
-   
-   // Convert to UTC:
-   tm* gt = gmtime(&now);
-
-   if ( gt )
-   {
-      //---
-      // Format(26 charactors including trailing null):
-      // (D:YYYYMMDDHHmmSSZ00'00')
-      char dateChars[26];
-      dateChars[25] = '\0';
-      strftime(dateChars, 26, "(D:%Y%m%d%H%M%SZ00'00')", gt);
-      s = dateChars;
-   }
-   
-} // End: ossimPdfWriter::getGmtDate
-
-void ossimPdfWriter::getTileSize( std::string& s ) const
-{
-   // Check if in keyword list.
-   s = m_kwl->findKey( std::string( ossimKeywordNames::OUTPUT_TILE_SIZE_KW ) );
-   if ( s.empty() )
-   {
-      ossimIpt tileSize;
-      ossim::defaultTileSize( tileSize );
-      s = ossimString::toString( tileSize.x ).string(); 
-   }
-}
-
-void ossimPdfWriter::getTileSize( ossimIpt& tileSize ) const
-{
-   std::string s;
-   getTileSize( s );
-   if ( s.size() )
-   {
-      tileSize.x = ossimString(s).toInt32();
-   }
-   else
-   {
-      tileSize.x = 1024; // default
-   }
-   tileSize.y = tileSize.x;
-}
-
-std::string ossimPdfWriter::getTileString( ossim_uint32 x, ossim_uint32 y ) const
-{
-   // Format like:  /Tile_0001_0002
-   std::ostringstream os;
-   os << std::setiosflags(std::ios_base::fixed|std::ios_base::right)
-      << std::setfill('0')
-      << "/Tile_"
-      << std::setw(4) << x
-      << "_"
-      << std::setw(4) << y;
-   
-   return os.str();
-}
diff --git a/src/ossim/imaging/ossimPolyCutter.cpp b/src/ossim/imaging/ossimPolyCutter.cpp
deleted file mode 100644
index 6db4813..0000000
--- a/src/ossim/imaging/ossimPolyCutter.cpp
+++ /dev/null
@@ -1,411 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimPolyCutter.cpp 21518 2012-08-22 21:15:56Z dburken $
-#include <ossim/imaging/ossimPolyCutter.h>
-#include <ossim/base/ossimPolyArea2d.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimRgbImage.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/base/ossimActiveEdgeTable.h>
-static const char* NUMBER_POLYGONS_KW = "number_polygons";
-
-RTTI_DEF1(ossimPolyCutter, "ossimPolyCutter", ossimImageSourceFilter)
-
-ossimPolyCutter::ossimPolyCutter()
-   : ossimImageSourceFilter(),
-     theTile(NULL),
-     theCutType(OSSIM_POLY_NULL_OUTSIDE),
-     m_boundingOverwrite(false)
-{
-   thePolygonList.push_back(ossimPolygon());
-   theBoundingRect.makeNan();
-}
-
-// ossimPolyCutter::ossimPolyCutter(ossimImageSource* inputSource,
-//                                  ossimPolyArea2d* polygon)
-ossimPolyCutter::ossimPolyCutter(ossimImageSource* inputSource,
-                                 const ossimPolygon& polygon)
-   : ossimImageSourceFilter(inputSource),
-     theTile(NULL),
-     theCutType(OSSIM_POLY_NULL_INSIDE),
-     m_boundingOverwrite(false)
-{
-   thePolygonList.push_back(polygon);
-   computeBoundingRect();
-   initialize();
-}
-
-ossimPolyCutter::~ossimPolyCutter()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimPolyCutter::getTile(const ossimIrect& tileRect,
-                                                     ossim_uint32 resLevel)
-{
-   if(!theInputConnection)
-   {
-      return theTile;
-   }
-   ossimRefPtr<ossimImageData> input = theInputConnection->getTile(tileRect,
-                                                                   resLevel);
-   
-   if(!isSourceEnabled() || theBoundingRect.hasNans() || !input.valid())
-   {
-      return input;
-   }
-   
-   if((input->getDataObjectStatus() == OSSIM_EMPTY) ||
-      (input->getDataObjectStatus() == OSSIM_NULL))
-   {
-      return input;
-   }
-
-   if(!theTile.valid())
-   {
-      allocate(); // First time through...
-   }
-
-   if(!theTile.valid())
-   {
-      return input;
-   }
-   
-   theTile->setImageRectangle(tileRect);
-   
-   theTile->loadTile(input.get());
-   theTile->setDataObjectStatus(input->getDataObjectStatus());
-   vector<ossimPolygon>* polyList = &thePolygonList;
-   vector<ossimPolygon>  scaledPoly;
-   
-   ossimIrect boundingRect = getBoundingRect(resLevel);
-   if(resLevel)
-   {
-      ossimDpt decimation;
-      getDecimationFactor(resLevel, decimation);
-
-      if(!decimation.hasNans())
-      {
-         for(int polyIndex = 0;
-             polyIndex < (int)thePolygonList.size();
-             ++polyIndex)
-         {
-            scaledPoly.push_back(thePolygonList[polyIndex]*decimation);
-         }
-         polyList = &scaledPoly;
-      }
-   }
-   
-   if(polyList->size()&&
-      theTile->getDataObjectStatus()!=OSSIM_NULL)
-   {
-//       ossimActiveEdgeTable aet;
-      
-      
-      if(theCutType == OSSIM_POLY_NULL_OUTSIDE)
-      {
-         if(boundingRect.intersects(tileRect))
-         {
-            theTile->makeBlank();
-            theHelper.setImageData(theTile.get());
-            for(int polyIndex = 0; polyIndex < (int)polyList->size(); ++polyIndex)
-            {
-               theHelper.copyInputToThis(input->getBuf(),
-                                      (*polyList)[polyIndex]);
-            }
-            theTile->validate();
-         }
-         else
-         {
-            theTile->makeBlank();
-         }
-      }
-      else if(theCutType == OSSIM_POLY_NULL_INSIDE)
-      {
-         if(boundingRect.intersects(tileRect))
-         {
-            theHelper.setImageData(theTile.get());
-            for(int polyIndex = 0;
-                polyIndex < (int)polyList->size();
-                ++polyIndex)
-            {
-               theHelper.fill(theTile->getNullPix(),
-                           (*polyList)[polyIndex]);
-            }
-         }
-         theTile->validate();
-      }
-      
-   }
-   return theTile;
-}
-
-ossimIrect ossimPolyCutter::getBoundingRect(ossim_uint32 resLevel)const
-{
-   ossimIrect result;
-
-   result.makeNan();
-   if(!theInputConnection)
-   {
-      return result;
-   }
-   if(!isSourceEnabled())
-   {
-      return ossimImageSourceFilter::getBoundingRect(resLevel);
-   }
-   
-   result = theInputConnection->getBoundingRect(resLevel);
-
-   if(isSourceEnabled()&&(!theBoundingRect.hasNans()))
-   {
-      if(theCutType == OSSIM_POLY_NULL_OUTSIDE)
-      {
-         ossimDpt decimation;
-         getDecimationFactor(resLevel, decimation);
-         if(decimation.hasNans())
-         {
-            result =  theBoundingRect;
-         }
-         else
-         {
-            result = theBoundingRect*decimation;
-         }
-      }
-   }
-   else if(isSourceEnabled())
-   {
-      return theBoundingRect;
-   }
-   
-   return result;
-}
-
-void ossimPolyCutter::initialize()
-{
-   // Capture the input connection.
-   ossimImageSourceFilter::initialize();
-
-   // Force an allocate on next getTile.
-   theTile = NULL;
-}
-
-void ossimPolyCutter::allocate()
-{
-   theTile=NULL;
-   if(theInputConnection)
-   {
-      theTile = ossimImageDataFactory::instance()->create(this,
-                                                          theInputConnection);
-      theTile->initialize();
-
-   }
-}
-
-bool ossimPolyCutter::saveState(ossimKeywordlist& kwl,
-                                const char* prefix)const
-{
-   ossimString newPrefix = prefix;
-
-   for(int i = 0; i < (int)thePolygonList.size();++i)
-   {
-      newPrefix = ossimString(prefix) + "polygon" + ossimString::toString(i)+".";
-
-      thePolygonList[i].saveState(kwl, newPrefix.c_str());
-   }
-   kwl.add(prefix,
-           NUMBER_POLYGONS_KW,
-           (int)thePolygonList.size(),
-           true);
-   
-   ossimString fillType = "null_inside";
-   if(theCutType == OSSIM_POLY_NULL_OUTSIDE)
-   {
-      fillType = "null_outside";
-   }
-   kwl.add(prefix,
-           "cut_type",
-           fillType.c_str(),
-           true);   
-  
-   return ossimImageSourceFilter::saveState(kwl, prefix);;
-}
-
-bool ossimPolyCutter::loadState(const ossimKeywordlist& kwl,
-                                const char* prefix)
-{
-   const char* numberPolygons = kwl.find(prefix, NUMBER_POLYGONS_KW);
-
-   ossimString newPrefix;
-   if(numberPolygons)
-   {
-      thePolygonList.clear();
-      int npolys = ossimString(numberPolygons).toLong();
-      for(int i = 0; i < npolys;++i)
-      {
-         thePolygonList.push_back(ossimPolygon());
-         
-         newPrefix = ossimString(prefix) + "polygon" + ossimString::toString(i)+".";
-         
-         thePolygonList[i].loadState(kwl, newPrefix.c_str());
-      }
-   }
-
-   const char* lookup = kwl.find(prefix,
-                                 "cut_type");
-   if(lookup)
-   {
-      theCutType = OSSIM_POLY_NULL_INSIDE;
-      ossimString test = lookup;
-      if(test == "null_outside")
-      {
-         theCutType = OSSIM_POLY_NULL_OUTSIDE;
-      }
-   }
-   else
-   {
-      theCutType = OSSIM_POLY_NULL_OUTSIDE;
-   }
-
-   computeBoundingRect();
-
-   
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
-
-void ossimPolyCutter::setPolygon(const vector<ossimDpt>& polygon,
-                                 ossim_uint32 index)
-{
-   if(index < polygon.size())
-   {
-      thePolygonList[index] = polygon;
-
-      computeBoundingRect();
-   }
-
-}
-
-void ossimPolyCutter::setPolygon(const vector<ossimIpt>& polygon,
-                                 ossim_uint32 index)
-{
-   if(polygon.size())
-   {
-      thePolygonList[index] = polygon;
-      computeBoundingRect();
-   }
-}
-
-void ossimPolyCutter::addPolygon(const vector<ossimIpt>& polygon)
-{
-   thePolygonList.push_back(ossimPolygon(polygon));
-   computeBoundingRect();
-}
-
-void ossimPolyCutter::addPolygon(const vector<ossimDpt>& polygon)
-{
-   thePolygonList.push_back(ossimPolygon(polygon));
-   computeBoundingRect();
-}
-
-void ossimPolyCutter::addPolygon(const ossimPolygon& polygon)
-{
-   thePolygonList.push_back(ossimPolygon(polygon));
-   computeBoundingRect();
-}
-
-
-void ossimPolyCutter::setCutType(ossimPolyCutterCutType cutType)
-{
-   theCutType = cutType;
-}
-
-ossimPolyCutter::ossimPolyCutterCutType ossimPolyCutter::getCutType()const
-{
-   return theCutType;
-}
-
-void ossimPolyCutter::clear()
-{
-   setNumberOfPolygons(0);
-}
-
-void ossimPolyCutter::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   ossimImageSourceFilter::setProperty(property);
-}
-
-ossimRefPtr<ossimProperty> ossimPolyCutter::getProperty(const ossimString& name)const
-{
-
-   return ossimImageSourceFilter::getProperty(name);
-}
-
-void ossimPolyCutter::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageSourceFilter::getPropertyNames(propertyNames);
-} 
-
-void ossimPolyCutter::computeBoundingRect()
-{
-   ossimIrect bounds;
-   theBoundingRect.makeNan();
-
-   for(int i = 0; i < (int)thePolygonList.size(); ++i)
-   {
-      thePolygonList[i].getBoundingRect(bounds);
-
-      if(!bounds.hasNans())
-      {
-         if(theBoundingRect.hasNans())
-         {
-            theBoundingRect = bounds;
-         }
-         else
-         {
-            theBoundingRect = theBoundingRect.combine(bounds);
-         }
-      }
-   }
-}
-
-const ossimIrect& ossimPolyCutter::getRectangle() const
-{
-   return theBoundingRect;
-}
-
-void ossimPolyCutter::setRectangle(const ossimIrect& rect)
-{
-   theBoundingRect = rect;
-   m_boundingOverwrite = true;
-}
-
-void ossimPolyCutter::setNumberOfPolygons(ossim_uint32 count)
-{
-   if(!count)
-   {
-      thePolygonList.clear();
-      thePolygonList.clear();
-   }
-   else
-   {
-      thePolygonList.resize(count);
-   }
-}
-
-std::vector<ossimPolygon>& ossimPolyCutter::getPolygonList()
-{
-   return thePolygonList;
-}
-
-const std::vector<ossimPolygon>& ossimPolyCutter::getPolygonList()const
-{
-   return thePolygonList;
-}
-
diff --git a/src/ossim/imaging/ossimQbTileFilesHandler.cpp b/src/ossim/imaging/ossimQbTileFilesHandler.cpp
deleted file mode 100644
index 626b2d5..0000000
--- a/src/ossim/imaging/ossimQbTileFilesHandler.cpp
+++ /dev/null
@@ -1,290 +0,0 @@
-//*************************************************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Oscar Kramer
-//
-// Description: Image handler used for tiled Quickbird imagery. 
-//
-//*************************************************************************************************
-//  $Id: ossimQbTileFilesHandler.cpp 2814 2011-07-05 13:40:16Z oscar.kramer $
-
-#include <ossim/imaging/ossimQbTileFilesHandler.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimRegExp.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimPreferences.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimPolygon.h>
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/imaging/ossimTiffOverviewBuilder.h>
-#include <ossim/imaging/ossimTiffTileSource.h>
-#include <ossim/support_data/ossimQuickbirdTile.h>
-#include <ossim/projection/ossimQuickbirdRpcModel.h>
-#include <algorithm>
-
-RTTI_DEF1(ossimQbTileFilesHandler, "ossimQbTileFilesHandler", ossimTiledImageHandler)
-
-// Static trace for debugging
-static ossimTrace traceDebug("ossimQbTileFilesHandler:debug");
-
-//*************************************************************************************************
-//!  Constructor (default):
-//*************************************************************************************************
-ossimQbTileFilesHandler::ossimQbTileFilesHandler()
-{
-}
-
-//*************************************************************************************************
-//! Destructor:
-//*************************************************************************************************
-ossimQbTileFilesHandler::~ossimQbTileFilesHandler()
-{
-}
-
-//*************************************************************************************************
-//! Opens the image file given entry index. This class does not support multiple entries.
-//! @param imageFile File to open.
-//! @param entryIndex
-//! @return false if entry index other than 0 specified.
-//*************************************************************************************************
-bool ossimQbTileFilesHandler::open()
-{
-   static const char* MODULE = "ossimQbTileFilesHandler::open() -- ";
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_INFO)
-         <<MODULE << "Entering...\nimage: " << theImageFile << "\n";
-   }
-   
-   // Test for extension: image.til
-   ossimString ext = theImageFile.ext().downcase();
-   if ( ext == "ovr" )
-   {
-      return false; // Don't try to open overviews.
-   }
-   
-   ossimRegExp regExp("^[t|T][i|I][l|L]");
-   if ( regExp.find( ext.c_str() ) )
-   {
-      if (!theImageFile.exists())
-      {
-         return false;
-      }
-   }
-      
-   // Use ossimQuickbirdTile object for parsing the TIL file and fetching the data structure 
-   // containing tile-file info:
-   if (traceDebug())
-      ossimNotify(ossimNotifyLevel_INFO)<<MODULE<<"OPENING ossimQuickbirdTile..."<<std::endl;
-   
-   ossimQuickbirdTile qbt;
-   bool success = qbt.open(theImageFile);
-   if (!success)
-      return false;
-   
-   // Populate our own data structure given the QBT map:
-   ossimFilename image_dir (theImageFile.path());
-   const ossimQuickbirdTile::TileMap& qbtTileMap = qbt.getMap();
-
-   m_fullImgRect.makeNan();
-   ossimIrect subImageRect;
-   ossimQuickbirdTile::TileMap::const_iterator qbt_iter = qbtTileMap.begin();
-   ossimImageHandlerRegistry* factory = ossimImageHandlerRegistry::instance();
-   while (qbt_iter != qbtTileMap.end())
-   {
-      ossimQuickbirdTileInfo info ((*qbt_iter).second);
-      ossimTileFile tilefile;
-      tilefile.tileFilename = (*qbt_iter).second.theFilename;
-      tilefile.tileFilename.setPath(image_dir);
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_INFO)<<MODULE<<"Using factory to open <"
-            <<tilefile.tileFilename<<">"<<std::endl;
-      }
-
-      // Now open up the handlers for this tile-file:
-      tilefile.imageHandler = factory->open(tilefile.tileFilename);
-      if (tilefile.imageHandler.valid())
-      {
-         // Valid handler, populate remaining items of interest and push it on our list...
-         // Fetch image coordinates in full-view:
-         subImageRect.set_ulx((*qbt_iter).second.theUlXOffset);
-         subImageRect.set_uly((*qbt_iter).second.theUlYOffset);
-         subImageRect.set_lrx((*qbt_iter).second.theLrXOffset);
-         subImageRect.set_lry((*qbt_iter).second.theLrYOffset);
-         tilefile.subImageRects.push_back(subImageRect);
-
-         // Update bounding image rectangle:
-         m_fullImgRect = m_fullImgRect.combine(subImageRect);
-         m_tileFiles.push_back(tilefile);
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_INFO)<<MODULE<<"Pushed <"<<tilefile.tileFilename<<"> on"
-               "to tile-files list."<<std::endl;
-         }
-      }
-      else
-      {
-         ossimNotify(ossimNotifyLevel_WARN)<<MODULE<<"TIL file listed <"
-            <<tilefile.tileFilename<<"> as one of the tiles, but the file could not be opened. "
-            <<"This is being ignored but may cause a problem downstream."<<std::endl;
-      }
-   
-      ++qbt_iter;   
-   }
-
-   // Need to check the full-image rect for validity. May need to explore the .IMD file if this 
-   // was not properly initialized:
-   if (m_fullImgRect.hasNans())
-   {
-      if (!computeImageRects())
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_INFO)<<MODULE<<"Could not establish image rectangles."
-               <<std::endl;
-         }
-         return false;
-      }
-   }
-
-   if (traceDebug())
-      ossimNotify(ossimNotifyLevel_INFO)<<MODULE<<"Finished loading tiles."<<std::endl;
-
-   bool open_good = false;
-   if ((m_tileFiles.size() != 0) && m_tileFiles[0].imageHandler.valid())
-   {
-      completeOpen();
-      open_good = true;
-      
-      if (traceDebug())
-         ossimNotify(ossimNotifyLevel_INFO)<<MODULE<<"Open successful."<<std::endl;
-   }
-   
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_INFO)<<MODULE<<"Returning with <"
-         <<ossimString::toString(open_good)<<">"<<std::endl;
-   }
-   return open_good;
-}
-
-//*************************************************************************************************
-//! Fetch the tile-files common RPC data file and create the projection for this image
-//*************************************************************************************************
-ossimRefPtr<ossimImageGeometry> ossimQbTileFilesHandler::getImageGeometry()
-{
-   // Try external geom first:
-   theGeometry = getExternalImageGeometry();
-   if (theGeometry.valid())
-      return theGeometry;  // We should return here.
-   
-   // The dataset is expected to have an RPC model associated with it:
-   ossimRefPtr<ossimQuickbirdRpcModel> model = new ossimQuickbirdRpcModel(this);
-   if (!model->getErrorStatus())
-   {
-      theGeometry = new ossimImageGeometry;
-      theGeometry->setProjection(model.get());
-      
-      // Set image things the geometry object should know about.
-      initImageParameters( theGeometry.get() );
-
-      return theGeometry;
-   }
-   return ossimRefPtr<ossimImageGeometry>();
-}
-
-//*************************************************************************************************
-//! Initializes tile image rects by considering adjacent row/col offsets. Called when TIL
-//! doesn't contain the info. Returns true if successful.
-//*************************************************************************************************
-bool ossimQbTileFilesHandler::computeImageRects()
-{
-   try
-   {
-      ossimQuickbirdMetaData oqmd;
-      if (!oqmd.open(theImageFile))
-         throw 1;
-
-      ossimIpt image_size (oqmd.getImageSize());
-      if (image_size.hasNans())
-         throw 2;
-
-      ossimIpt full_image_lr (image_size.x-1, image_size.y-1);
-      m_fullImgRect.set_ulx(0);
-      m_fullImgRect.set_uly(0);
-      m_fullImgRect.set_lr(full_image_lr);
-
-      // Now consider the subrects for each tile. It is assumed that all tiles (except right
-      // and bottom) will be of uniform size. The TIL file should have at least provided the row
-      // and column offsets for each tile into the full image. This is equivalent to the UL corner.
-      // It is presumed that the TIL failed to provide the LR corner since this method was called.
-      int dx=0, dy=0, i=0;
-      int num_tiles = (int) m_tileFiles.size();
-      while (((dx == 0) || (dy == 0)) && (i < num_tiles-1))
-      {
-         if (dx == 0)
-            dx = m_tileFiles[i+1].subImageRects[0].ul().x - m_tileFiles[i].subImageRects[0].ul().x;
-         if (dy == 0)
-            dy = m_tileFiles[i+1].subImageRects[0].ul().y - m_tileFiles[i].subImageRects[0].ul().y;
-         ++i;
-      }
-
-      // We should have the nominal tile size now. Check this is so:
-      if ((dx == 0) || (dy == 0))
-      {
-         // Prior scheme failed for establishing the tile dimensions. Final resort is to open the first
-         // available tile file and query its dimensions:
-         if (num_tiles == 0)
-            throw 3;
-         if (m_tileFiles[0].imageHandler.valid())
-         {
-            // we have an open handler, so just query it:
-            dy = m_tileFiles[0].imageHandler->getNumberOfLines();
-            dx = m_tileFiles[0].imageHandler->getNumberOfSamples();
-         }
-         else
-         {
-            // Struck out, just assume the tile is square:
-            if ((dx == 0) && (dy == 0))
-               throw 4;
-            if (dy == 0)
-               dy = dx;
-            else
-               dx = dy;
-         }
-      }
-
-      // Loop over all tiles to properly assign their image rectangles:
-      for (i=0; i<num_tiles; i++)
-      {
-         ossimIpt ul (m_tileFiles[i].subImageRects[0].ul());
-         ossimIpt lr (ul.x + dx - 1, ul.y + dy - 1);
-
-         // Check to make sure we don't exceed extents of full image:
-         if (lr.x > full_image_lr.x)
-            lr.x = full_image_lr.x;
-         if (lr.y > full_image_lr.y)
-            lr.y = full_image_lr.y;
-
-         m_tileFiles[i].subImageRects[0].set_lr(lr);
-      }
-   }
-   
-   catch (...)
-   {
-      // Could not establish the rectangles:
-      return false;
-   }
-
-   return true;
-}
-
diff --git a/src/ossim/imaging/ossimQuickbirdNitfTileSource.cpp b/src/ossim/imaging/ossimQuickbirdNitfTileSource.cpp
deleted file mode 100644
index 406cf40..0000000
--- a/src/ossim/imaging/ossimQuickbirdNitfTileSource.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-//*******************************************************************
-//  $Id: ossimQuickbirdNitfTileSource.cpp 21631 2012-09-06 18:10:55Z dburken $
-#include <ossim/imaging/ossimQuickbirdNitfTileSource.h>
-#include <ossim/support_data/ossimQuickbirdTile.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossim2dTo2dShiftTransform.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/support_data/ossimNitfImageHeader.h>
-
-RTTI_DEF1(ossimQuickbirdNitfTileSource, "ossimQuickbirdNitfTileSource", ossimNitfTileSource);
-
-static const ossimTrace traceDebug("ossimQuickbirdNitfTileSource:debug");
-
-bool ossimQuickbirdNitfTileSource::open()
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimQuickbirdNitfTileSource::open(file) DEBUG: entered ..."
-         << std::endl;
-   }
-   
-   ossimFilename file = theImageFile;
-   file = file.replaceAllThatMatch("_R[0-9]+C[0-9]+");
-   ossimQuickbirdTile tileFile;
-   bool openedTileFile = false;
-   file.setExtension("TIL");
-   
-   if(!tileFile.open(file))
-   {
-      file.setExtension("TIL");
-      if(tileFile.open(file))
-      {
-         openedTileFile = true;
-      }
-      else
-      {
-         file.setExtension("til");
-         if(tileFile.open(file))
-         {
-            openedTileFile = true;
-         }
-      }
-   }
-   else
-   {
-      openedTileFile = true;
-   }
-   
-   if(openedTileFile)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimQuickbirdNitfTileSource::open(file) DEBUG:"
-            << "\nOpened tile file" << std::endl;
-      }
-
-      // Call the base class open...
-      if(!ossimNitfTileSource::open())
-      {
-         return false;
-      }
-      
-      ossimQuickbirdTileInfo info;
-      ossimIrect tempBounds = getCurrentImageHeader()->getImageRect();
-      
-      
-      tempBounds = ossimIrect(0,
-                              0,
-                              tempBounds.width() - 1,
-                              tempBounds.height() - 1);
-      
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimQuickbirdNitfTileSource::open(file) DEBUG:"
-            << "\nheader rectangle = " << tempBounds << std::endl;
-      }
-      
-      ossimIpt ulPt;
-      ossimIpt urPt;
-      ossimIpt lrPt;
-      ossimIpt llPt;
-      ossimDpt shift;
-      if(tileFile.getInfo(info, theImageFile.file().upcase()))
-      {
-         ulPt.makeNan();
-         urPt.makeNan();
-         lrPt.makeNan();
-         llPt.makeNan();
-         
-         if((info.theUlXOffset != OSSIM_INT_NAN) &&
-            (info.theUlYOffset != OSSIM_INT_NAN))
-         {
-            shift = ossimIpt(info.theUlXOffset, info.theUlYOffset);
-         }
-         else
-         {
-            shift = ossimIpt(0,0);
-         }
-         m_transform = new ossim2dTo2dShiftTransform(shift);
-      }
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimQuickbirdNitfTileSource::open(file) DEBUG:"
-            << "\nUl = " << ulPt
-            << "\nUr = " << urPt
-            << "\nLr = " << lrPt
-            << "\nLl = " << llPt
-            << "\ntheImageRect:  " << getImageRectangle(0)
-            << "\nExiting..." 
-            << std::endl;
-      }
-   }
-   else
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimQuickbirdNitfTileSource::open(file) DEBUG"
-            << "Not opened..."
-            << std::endl;
-      }
-   }
-   
-   return openedTileFile;
-}
-
-ossimRefPtr<ossimImageGeometry> ossimQuickbirdNitfTileSource::getImageGeometry()
-{
-   ossimRefPtr<ossimImageGeometry> result = ossimImageHandler::getImageGeometry();
-   if( result.valid() )
-   {
-      if(!result->getTransform())
-      {
-         result->setTransform(m_transform.get());
-      }
-   }
-   return result;
-}
diff --git a/src/ossim/imaging/ossimRLevelFilter.cpp b/src/ossim/imaging/ossimRLevelFilter.cpp
deleted file mode 100644
index d046497..0000000
--- a/src/ossim/imaging/ossimRLevelFilter.cpp
+++ /dev/null
@@ -1,234 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimRLevelFilter.cpp 21631 2012-09-06 18:10:55Z dburken $
-#include <ossim/imaging/ossimRLevelFilter.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/base/ossimTrace.h>
-
-static const char* CURRENT_RLEVEL_KW    = "current_rlevel";
-static const char* OVERRIDE_GEOMETRY_KW = "override_geometry";
-
-static ossimTrace traceDebug("ossimRLevelFilter:debug");
-
-RTTI_DEF1(ossimRLevelFilter, "ossimRLevelFilter", ossimImageSourceFilter);
-
-//**************************************************************************************************
-ossimRLevelFilter::ossimRLevelFilter()
-   : ossimImageSourceFilter(),
-     theCurrentRLevel(0),
-     theOverrideGeometryFlag(false)
-{
-}
-
-//**************************************************************************************************
-ossimRLevelFilter::~ossimRLevelFilter()
-{
-}
-
-//**************************************************************************************************
-void ossimRLevelFilter::getDecimationFactor(ossim_uint32 resLevel,
-                                            ossimDpt& result) const
-{
-   if(!theInputConnection)
-   {
-      result.makeNan();
-   }
-
-   theInputConnection->getDecimationFactor(resLevel,
-                                           result);
-}
-
-//**************************************************************************************************
-bool ossimRLevelFilter::getOverrideGeometryFlag() const
-{
-   return theOverrideGeometryFlag;
-}
-
-//**************************************************************************************************
-void ossimRLevelFilter::setOverrideGeometryFlag(bool override)
-{
-   theOverrideGeometryFlag = override;
-}
-
-//**************************************************************************************************
-void ossimRLevelFilter::setCurrentRLevel(ossim_uint32 rlevel)
-{
-   theCurrentRLevel = rlevel;
-   updateGeometry();
-}
-
-//**************************************************************************************************
-ossim_uint32 ossimRLevelFilter::getCurrentRLevel()const
-{
-   return theCurrentRLevel;
-}
-
-//**************************************************************************************************
-// Returns a pointer reference to the active image geometry at this filter. The input source
-// geometry is modified, so we need to maintain our own geometry object as a data member.
-//**************************************************************************************************
-ossimRefPtr<ossimImageGeometry> ossimRLevelFilter::getImageGeometry()
-{
-   // Have we already defined our own geometry? Return it if so:
-   if (m_ScaledGeometry.valid()) return m_ScaledGeometry;
-
-   if (!theInputConnection) return ossimRefPtr<ossimImageGeometry>();
-
-   ossim_uint32 rlevel = getCurrentRLevel();
-   ossimRefPtr<ossimImageGeometry> inputGeom = theInputConnection->getImageGeometry();
-
-   // If no scaling is happening, just return the input image geometry:
-   if ((!inputGeom) || (rlevel == 0) || (getEnableFlag() == false))
-      return inputGeom;
-
-   // Need to create a copy of the input geom and modify it as our own, then pass that:
-   m_ScaledGeometry = new ossimImageGeometry(*inputGeom);
-   updateGeometry();
-
-   // Return our version of the image geometry:
-   return m_ScaledGeometry;
-}
-
-//**************************************************************************************************
-//! If this object is maintaining an ossimImageGeometry, this method needs to be called after 
-//! a scale change so that the geometry's projection is modified accordingly.
-//**************************************************************************************************
-void ossimRLevelFilter::updateGeometry()
-{
-   if (m_ScaledGeometry.valid())
-   {
-      // Modify the image geometry's projection with the scale factor before returning geom:
-      ossimProjection* proj = m_ScaledGeometry->getProjection();
-      ossimMapProjection* mapProj = PTR_CAST(ossimMapProjection, proj);;
-      if(mapProj)
-      {
-         ossimDpt decimation;
-         getDecimationFactor(theCurrentRLevel, decimation);
-         decimation.x = 1.0/decimation.x;
-         decimation.y = 1.0/decimation.y;
-
-         // This will adjust both the scale and the tie point to account for decimation.
-         mapProj->applyScale(decimation, true);  // recenter tie point flag
-      }
-   }
-}
-
-//**************************************************************************************************
-void ossimRLevelFilter::getSummedDecimation(ossimDpt& result) const
-{
-   // Start with fresh values.
-   result.x = 0.0;
-   result.y = 0.0;
-
-   ossim_uint32 rlevel = getCurrentRLevel();
-
-   if (rlevel == 0)
-   {
-      return; // no decimation.
-   }
-
-   // Sum the decimations from rlevel one to the current rlevel.
-   for (ossim_uint32 i = 1; i <= rlevel; ++i)
-   {
-      ossimDpt dpt;
-      getDecimationFactor(i, dpt);
-      if (dpt.hasNans())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimRLevelFilter::getSummedDecimation WARNING:"
-            << "\nNans returned from getDecimationFactor!"
-            << std::endl;
-         result.makeNan();
-         return;
-      }
-      result.x += dpt.x;
-      result.y += dpt.y;
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimRLevelFilter::getSummedDecimation result: " << result
-         << std::endl;
-   }
-}
-
-//**************************************************************************************************
-ossimIrect ossimRLevelFilter::getBoundingRect(ossim_uint32 resLevel)const
-{
-   ossimIrect rect;
-   rect.makeNan();
-   if(!theInputConnection) return rect;
-
-   if (isSourceEnabled())
-   {
-      return theInputConnection->getBoundingRect(theCurrentRLevel);
-   }
-   return theInputConnection->getBoundingRect(resLevel);
-}
-
-//**************************************************************************************************
-ossimRefPtr<ossimImageData> ossimRLevelFilter::getTile(
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   if(!theInputConnection)
-   {
-      return 0;
-   }
-
-   if(!isSourceEnabled())
-   {
-      return theInputConnection->getTile(tileRect, resLevel);
-   }
-
-   // Ignoring resLevel as we're in charge of it here!
-   return theInputConnection->getTile(tileRect, theCurrentRLevel);
-}
-
-//**************************************************************************************************
-bool ossimRLevelFilter::loadState(const ossimKeywordlist& kwl,
-                                  const char* prefix)
-{
-   const char* current  = kwl.find(prefix, CURRENT_RLEVEL_KW);
-   const char* override = kwl.find(prefix, OVERRIDE_GEOMETRY_KW);
-
-   if(current)
-      theCurrentRLevel = ossimString(current).toULong();
-
-   if(override)
-      theOverrideGeometryFlag = ossimString(override).toBool();
-
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-
-   // An existing image geometry object here will need to be updated:
-   updateGeometry();
-}
-
-//**************************************************************************************************
-bool ossimRLevelFilter::saveState(ossimKeywordlist& kwl,
-                                  const char* prefix)const
-{
-   kwl.add(prefix,
-           CURRENT_RLEVEL_KW,
-           theCurrentRLevel,
-           true);
-
-   kwl.add(prefix,
-           OVERRIDE_GEOMETRY_KW,
-           (ossim_uint32)theOverrideGeometryFlag,
-           true);
-
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
diff --git a/src/ossim/imaging/ossimReadmeFileWriter.cpp b/src/ossim/imaging/ossimReadmeFileWriter.cpp
deleted file mode 100644
index 60b5146..0000000
--- a/src/ossim/imaging/ossimReadmeFileWriter.cpp
+++ /dev/null
@@ -1,454 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2003 Storage Area Networks, Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Kenneth Melero (kmelero at sanz.com)
-//
-//*******************************************************************
-//  $Id: ossimReadmeFileWriter.cpp 21631 2012-09-06 18:10:55Z dburken $
-
-#include <ossim/imaging/ossimReadmeFileWriter.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimUtmProjection.h>
-#include <ossim/projection/ossimMapProjectionInfo.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <iostream>
-using namespace std;
-
-RTTI_DEF1(ossimReadmeFileWriter,
-          "ossimReadmeFileWriter",
-          ossimMetadataFileWriter)
-
-static const char DEFAULT_FILE_NAME[] = "output_readme.txt";
-static ossimTrace traceDebug("ossimReadmeFileWriter:debug");
-
-//**************************************************************************************************
-// 
-//**************************************************************************************************
-ossimReadmeFileWriter::ossimReadmeFileWriter()
-:
-ossimMetadataFileWriter()
-{
-}
-
-//**************************************************************************************************
-// 
-//**************************************************************************************************
-ossimReadmeFileWriter::~ossimReadmeFileWriter()
-{
-}
-
-//**************************************************************************************************
-// 
-//**************************************************************************************************
-bool ossimReadmeFileWriter::writeFile()
-{
-   static const char MODULE[] = "ossimReadmeFileWriter::writeFile";
-
-   if(!theInputConnection)
-   {
-      if (traceDebug())
-      {
-         CLOG << "DEBUG:"
-              << "\nNo input connection!  Returning..."
-              << endl;
-      }
-
-      return false;
-   }
-
-   std::ofstream out(theFilename.c_str(), ios_base::out);
-   if (!out)
-      return false;
-
-   // Fetch the map projection of the input image if it exists:
-   const ossimMapProjection* mapProj = 0;
-   ossimRefPtr<ossimImageGeometry> imgGeom = theInputConnection->getImageGeometry();
-   if ( imgGeom.valid() )
-   {
-      const ossimProjection* proj = imgGeom->getProjection();
-      mapProj = PTR_CAST(ossimMapProjection, proj);
-   }
-   if (!mapProj)
-   {
-      out.close();
-      return false;
-   }
-
-   ossimMapProjectionInfo* projectionInfo = new ossimMapProjectionInfo(mapProj, theAreaOfInterest);
-   if(projectionInfo)
-   {
-      out << setiosflags(ios::fixed)
-          << setiosflags(ios::left)
-          << setw(16) << "Image: "
-          << projectionInfo->getImageInfoString();
-      
-      out << setw(17) << "\nLines:"
-          << projectionInfo->linesPerImage()
-          << setw(17) << "\nSamples:"
-          << projectionInfo->pixelsPerLine()
-          << setw(17) << "\nPixel Size x:"
-          << setprecision(8) 
-          << projectionInfo->getMetersPerPixel().x 
-          << " meters";
-      
-      out << ", " 
-          << setprecision(8) 
-          << projectionInfo->getUsSurveyFeetPerPixel().x
-          << " U.S. feet";
-      
-      out << setw(17) << "\nPixel Size y:"
-          << setprecision(8) 
-          << projectionInfo->getMetersPerPixel().y 
-          << " meters";
-      
-      out << ", " 
-          << setprecision(8) 
-          << projectionInfo->getUsSurveyFeetPerPixel().y
-          << " U.S. feet";
-      
-      const ossimString type  = TYPE_NAME(mapProj);
-      const ossimString datum = mapProj->getDatum()->code();
-      const ossimString ellipsoid = mapProj->getEllipsoid().code();
-
-      if(type)
-         out << setw(17) << "\nProjection:" << type;
-
-      const ossimUtmProjection* utmProj = PTR_CAST(ossimUtmProjection, mapProj);
-      if (utmProj)
-         out << setw(17) << "\nUTM map zone:" << utmProj->getZone();
-      
-      if(datum && ellipsoid)
-         out << setw(17) << "\nDatum:"      << datum
-             << setw(17) << "\nEllipsoid:"
-             << ellipsoid;
-      
-      out << resetiosflags(ios::left) << endl;
-      
-      const ossimString NORTH = "N";
-      const ossimString SOUTH = "S";
-      const ossimString EAST  = "E";
-      const ossimString WEST  = "W";
-      
-      ossimString tmpString;
-      double tmpDouble;
-      
-      // HACK: Easiest way to get projection info for optional params is via the old keywordlist:
-      ossimKeywordlist kwl;
-      mapProj->saveState(kwl);
-      const char* parallel1   = kwl.find(ossimKeywordNames::STD_PARALLEL_1_KW);
-      const char* parallel2   = kwl.find(ossimKeywordNames::STD_PARALLEL_2_KW);
-      const char* scaleFactor = kwl.find(ossimKeywordNames::SCALE_FACTOR_KW);
-      
-      
-      ossimString proj_name = mapProj->getClassName();
-      if ( ( proj_name.contains("Lambert")           ) ||
-           ( proj_name.contains("Albers")            ) ||
-           ( proj_name.contains("TransverseMercator" ) ) )
-      {
-         double falseEasting  =  mapProj->getFalseEasting();
-         double falseNorthing =  mapProj->getFalseNorthing();
- 
-         double origin_lat = mapProj->origin().latd();
-         tmpDouble = fabs(origin_lat);
-         tmpString = (origin_lat < 0.0) ? SOUTH : NORTH;
-         out << setiosflags(ios::left)
-             << "\n"
-             << setw(18) << "Origin Latitude:"
-             << resetiosflags(ios::left)
-             << setw(21) << setprecision(12) << tmpDouble 
-             << tmpString << endl;
-         
-         double origin_lon = mapProj->origin().lond();
-         tmpDouble = fabs(origin_lon);
-         tmpString = (origin_lon < 0.0) ? WEST : EAST;
-         out << setiosflags(ios::left)
-             << setw(18) << "Origin Longitude:"
-             << resetiosflags(ios::left)
-             << setw(21) << tmpDouble << tmpString
-             << setiosflags(ios::left)
-             << "\n"
-             << setw(23) << "False Easting:"
-             << resetiosflags(ios::left)
-             << setw(17) << setprecision(4) 
-             << falseEasting;
-         
-         out << " meters, " << setprecision(4)
-             << ossim::mtrs2usft(falseEasting) 
-             << " U.S. feet";
-         
-         out << endl;
-	 
-         out << setiosflags(ios::left)
-             << setw(23) << "False Northing:"
-             << resetiosflags(ios::left)
-             << setw(17) << setprecision(4) 
-             << falseNorthing;
-         
-         out << " meters, " << setprecision(4)
-             << ossim::mtrs2usft(falseNorthing) 
-             << " U.S. feet";
-         
-         out << endl;
-	 
-      } // End of if "Alber Lambert or TM.
-      
-      if (proj_name.contains("TransverseMercator"))
-      {
-
-         out << setiosflags(ios::left)
-             << "\n"
-             << setw(18) << "Scale Factor:"
-             << resetiosflags(ios::left)
-             << setw(21) << setprecision(10) 
-             << ossimString(scaleFactor).toDouble()
-             << "\n" << endl;
-      }
-      
-      if ( (proj_name.contains("Lambert") ) ||
-           (proj_name.contains("Albers")  ) )
-      {
-         double stdpar1 = ossimString(parallel1).toDouble();
-         tmpDouble = fabs(stdpar1);
-         tmpString = (stdpar1 < 0.0) ? SOUTH : NORTH;
-         out << setiosflags(ios::left) 
-             << setw(23) << "Standard Parallel #1:"
-             << resetiosflags(ios::left)
-             << setw(16) << setprecision(12) << tmpDouble
-             << tmpString << endl;
-         
-         double stdpar2 = ossimString(parallel2).toDouble();
-         tmpDouble = fabs(stdpar2);
-         tmpString = (stdpar2 < 0.0) ? SOUTH : NORTH;
-         out << setiosflags(ios::left)
-             << setw(23) << "Standard Parallel #2:"
-             << resetiosflags(ios::left)
-             << setw(16) << setprecision(12) 
-             << tmpDouble << tmpString
-             << "\n" << endl;
-      }
-      
-      ossimString cornerString[4] = { "Upper Left",
-                                      "Upper Right",
-                                      "Lower Right",
-                                      "Lower Left" };
-	
-      //---
-      // Add a note to the readme file stating what the corner coordinates
-      // are relative to.
-      //---
-      if (projectionInfo->getPixelType() == OSSIM_PIXEL_IS_AREA)
-      {
-         out 
-            << "\nCorner coordinates relative to outer edge of pixel.\n\n";
-      }
-      else
-      {
-         out
-            << "\nCorner coordinates relative to center of pixel.\n\n";
-      }
-      
-      out << "Corner Coordinates:\n\n";
-      
-      //---
-      // Upper Left Corner Points
-      //---
-      tmpDouble = fabs(projectionInfo->ulGroundPt().latd());
-      tmpString = (projectionInfo->ulGroundPt().latd() < 0.0) ? SOUTH : NORTH; 
-      out << cornerString[0]  << endl;
-      out << setw(14) << "Latitude:  "
-          << setw(16) << setprecision(12) << tmpDouble 
-          << tmpString << endl;
-      tmpDouble = fabs(projectionInfo->ulGroundPt().lond());
-      tmpString = (projectionInfo->ulGroundPt().lond() < 0.0) ? WEST : EAST;
-      out << setw(14) << "Longitude:  "
-          << setw(16) << tmpDouble << tmpString << endl;
-      
-      out << setw(14) << "Easting:  "
-          << setw(17) << setprecision(4) 
-          << projectionInfo->ulEastingNorthingPt().x;
-      
-      out << " meters, " << setprecision(4)
-          << ossim::mtrs2usft(projectionInfo->ulEastingNorthingPt().x)
-          << " U.S. feet";
-      
-      out << endl
-          << setw(14) << "Northing:  "
-          << setw(17) << projectionInfo->ulEastingNorthingPt().y;
-      
-      out << " meters, " << setprecision(4)
-          << ossim::mtrs2usft(projectionInfo->ulEastingNorthingPt().y)
-          << " U.S. feet";
-      
-      out << endl << endl;
-      
-      //---
-      // Upper Right Corner Points
-      //---
-      tmpDouble = fabs(projectionInfo->urGroundPt().latd());
-      tmpString = (projectionInfo->urGroundPt().latd() < 0.0) ? SOUTH : NORTH; 
-      out << cornerString[1]  << endl;
-      out << setw(14) << "Latitude:  "
-          << setw(16) << setprecision(12) << tmpDouble
-          << tmpString << endl;
-      tmpDouble = fabs(projectionInfo->urGroundPt().lond());
-      tmpString = (projectionInfo->urGroundPt().lond() < 0.0) ? WEST : EAST;
-      out << setw(14) << "Longitude:  "
-          << setw(16) << tmpDouble << tmpString << endl;
-      
-      out << setw(14) << "Easting:  "
-          << setw(17) << setprecision(4)
-          << projectionInfo->urEastingNorthingPt().x;
-      
-      out << " meters, " << setprecision(4)
-          << ossim::mtrs2usft(projectionInfo->urEastingNorthingPt().x)
-          << " U.S. feet";
-      
-      out << endl
-          << setw(14) << "Northing:  "
-          << setw(17) << projectionInfo->urEastingNorthingPt().y;
-      
-      out << " meters, " << setprecision(4)
-          << ossim::mtrs2usft(projectionInfo->urEastingNorthingPt().y)
-          << " U.S. feet";
-      
-      out << endl << endl;
-      
-      //---
-      // Lower Right Corner Points
-      //---
-      tmpDouble = fabs(projectionInfo->lrGroundPt().latd());
-      tmpString = (projectionInfo->lrGroundPt().latd() < 0.0) ? SOUTH : NORTH; 
-      out << cornerString[2]  << endl;
-      out << setw(14) << "Latitude:  "
-          << setw(16) << setprecision(12) << tmpDouble 
-          << tmpString << endl;
-      tmpDouble = fabs(projectionInfo->lrGroundPt().lond());
-      tmpString = (projectionInfo->lrGroundPt().lond() < 0.0) ? WEST : EAST;
-      out << setw(14) << "Longitude:  "
-          << setw(16) << tmpDouble << tmpString << endl;
-      
-      out << setw(14) << "Easting:  "
-          << setw(17) << setprecision(4) 
-          << projectionInfo->lrEastingNorthingPt().x;
-      
-      out << " meters, " << setprecision(4)
-          << ossim::mtrs2usft(projectionInfo->lrEastingNorthingPt().x)
-          << " U.S. feet";
-      
-      out << endl
-          << setw(14) << "Northing:  "
-          << setw(17) << projectionInfo->lrEastingNorthingPt().y;
-      
-      out << " meters, " << setprecision(4)
-          << ossim::mtrs2usft(projectionInfo->lrEastingNorthingPt().y)
-          << " U.S. feet";
-      
-      out << endl << endl;
-      
-      //---
-      // Lower Left Corner Points
-      //---
-      tmpDouble = fabs(projectionInfo->llGroundPt().latd());
-      tmpString = (projectionInfo->llGroundPt().latd() < 0.0) ? SOUTH : NORTH; 
-      out << cornerString[3]  << endl;
-      out << setw(14) << "Latitude:  "
-          << setw(16) << setprecision(12) << tmpDouble
-          << tmpString << endl;
-      tmpDouble = fabs(projectionInfo->llGroundPt().lond());
-      tmpString = (projectionInfo->llGroundPt().lond() < 0.0) ? WEST : EAST;
-      out << setw(14) << "Longitude:  "
-          << setw(16) << tmpDouble << tmpString << endl;
-      
-      out << setw(14) << "Easting:  "
-          << setw(17) << setprecision(4)
-          <<  projectionInfo->llEastingNorthingPt().x;
-      
-      out << " meters, " << setprecision(4)
-          << ossim::mtrs2usft(projectionInfo->llEastingNorthingPt().x)
-          << " U.S. feet";
-      
-      out << endl
-          << setw(14) << "Northing:  "
-          << setw(17) << projectionInfo->llEastingNorthingPt().y;
-      
-      out << " meters, " << setprecision(4)
-          << ossim::mtrs2usft(projectionInfo->llEastingNorthingPt().y)
-          << " U.S. feet";
-      
-      out << endl << endl;
-      
-      out << "Center Coordinates:\n\n";
-      
-      tmpDouble = fabs(projectionInfo->centerGroundPt().latd());
-      
-      tmpString = (projectionInfo->centerGroundPt().latd() < 0.0) ? SOUTH : NORTH;
-      
-      out << setw(14) << "Latitude:  "
-          << setw(16) << setprecision(12) << tmpDouble
-          << tmpString << endl;
-      
-      tmpDouble = fabs(projectionInfo->centerGroundPt().lond());
-      
-      tmpString = (projectionInfo->centerGroundPt().lond() < 0.0) ? WEST : EAST;
-      
-      out << setw(14) << "Longitude:  "
-          << setw(16) << tmpDouble << tmpString << endl;
-      
-      out << setw(14) << "Easting:  "
-          << setw(17) << setprecision(4)
-          << projectionInfo->centerEastingNorthingPt().x;
-      
-      out << " meters, " << setprecision(4)
-          << ossim::mtrs2usft(projectionInfo->centerEastingNorthingPt().x)
-          << " U.S. feet";
-      
-      out << endl
-          << setw(14) << "Northing:  "
-          << setw(17) << projectionInfo->centerEastingNorthingPt().y;
-      
-      out << " meters, " << setprecision(4)
-          << ossim::mtrs2usft(projectionInfo->centerEastingNorthingPt().y)
-          << " U.S. feet";
-      
-      out << endl << endl;
-      
-      out 
-         << "\nNOTE:  Lat/Lon values are in decimal degrees.";
-      
-      out 
-         << "\n       Eastings/Northings are in meters.";
-      
-      out << endl;
-      
-      delete projectionInfo;
-   }
-   
-   out.close();
-   return true;
-}
-
-//**************************************************************************************************
-// 
-//**************************************************************************************************
-void ossimReadmeFileWriter::getMetadatatypeList(std::vector<ossimString>& metadatatypeList) const
-{
-   metadatatypeList.push_back(ossimString("ossim_readme")); 
-}
-
-//**************************************************************************************************
-// 
-//**************************************************************************************************
-bool ossimReadmeFileWriter::hasMetadataType(const ossimString& metadataType) const
-{
-   return (metadataType == "ossim_readme");
-}
diff --git a/src/ossim/imaging/ossimRectangleCutFilter.cpp b/src/ossim/imaging/ossimRectangleCutFilter.cpp
deleted file mode 100644
index 16168fa..0000000
--- a/src/ossim/imaging/ossimRectangleCutFilter.cpp
+++ /dev/null
@@ -1,308 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimRectangleCutFilter.cpp 21631 2012-09-06 18:10:55Z dburken $
-#include <ossim/imaging/ossimRectangleCutFilter.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-
-static ossimTrace traceDebug("ossimRectangleCutFilter:debug");
-
-RTTI_DEF1(ossimRectangleCutFilter,
-          "ossimRectangleCutFilter",
-          ossimImageSourceFilter);
-
-ossimRectangleCutFilter::ossimRectangleCutFilter(ossimObject* owner,
-                                     ossimImageSource* inputSource)
-   :ossimImageSourceFilter(owner, inputSource),
-    theCutType(OSSIM_RECTANGLE_NULL_OUTSIDE)
-{
-   theRectangle.makeNan();
-}
-
-ossimRectangleCutFilter::ossimRectangleCutFilter(ossimImageSource* inputSource)
-   :ossimImageSourceFilter(NULL, inputSource),
-    theCutType(OSSIM_RECTANGLE_NULL_OUTSIDE)
-{
-   theRectangle.makeNan();
-}
-
-
-ossimRefPtr<ossimImageData> ossimRectangleCutFilter::getTile(
-   const ossimIrect& rect,
-   ossim_uint32 resLevel)
-{
-   if(!theInputConnection)
-   {
-      return NULL;
-   }
-   
-   ossimRefPtr<ossimImageData> tile =
-      theInputConnection->getTile(rect, resLevel);
-   if(!isSourceEnabled()||theRectangle.hasNans()||!tile.valid())
-   {
-      return tile;
-   }
-   if(tile->getDataObjectStatus() == OSSIM_NULL ||
-      tile->getDataObjectStatus() == OSSIM_EMPTY)
-   {
-      return tile;
-   }
-   ossim_int32 decimationIndex = min((ossim_int32)resLevel,
-                                     (ossim_int32)theDecimationList.size()-1);
-
-   ossimIrect cutRect = theRectangle*theDecimationList[decimationIndex];
-   
-   ossimIrect inputRectangle = tile->getImageRectangle();
-   if(theCutType==OSSIM_RECTANGLE_NULL_INSIDE)
-   {
-      if(cutRect.intersects(inputRectangle))
-      {
-         if(!inputRectangle.completely_within(cutRect))
-         {
-            ossim_int32 ulx = inputRectangle.ul().x;
-            ossim_int32 uly = inputRectangle.ul().y;
-            ossim_int32 w   = tile->getWidth();
-            ossim_int32 h   = tile->getHeight();
-            ossim_int32 offset = 0;
-            ossimIpt tempPoint(ulx, uly);
-            
-            for(ossim_int32 y = 0;  y < h; ++tempPoint.y,++y)
-            {
-               tempPoint.x = ulx;
-               for(ossim_int32 x = 0; x < w; ++tempPoint.x,++x)
-               {
-                  if(cutRect.pointWithin(tempPoint))
-                  {
-                     tile->setNull(offset);
-                  }
-                  ++offset;
-               }
-            }
-            tile->validate();
-         }
-         else
-         {
-            tile->makeBlank();
-         }
-      }
-   }
-   else // cut out the outide
-   {      
-      if(cutRect.intersects(inputRectangle))
-      {
-         if(!inputRectangle.completely_within(cutRect))
-         {
-            ossim_int32 ulx = inputRectangle.ul().x;
-            ossim_int32 uly = inputRectangle.ul().y;
-            ossim_int32 w   = tile->getWidth();
-            ossim_int32 h   = tile->getHeight();
-            ossim_int32 offset = 0;
-            ossimIpt tempPoint(ulx, uly);
-            
-            for(ossim_int32 y = 0;  y < h; ++tempPoint.y,++y)
-            {
-               tempPoint.x = ulx;
-               for(ossim_int32 x = 0; x < w; ++tempPoint.x,++x)
-               {
-                  if(!cutRect.pointWithin(tempPoint))
-                  {
-                     tile->setNull(offset);
-                  }
-                  ++offset;
-               }
-            }
-            tile->validate();
-         }
-      }
-      else
-      {
-         tile->makeBlank();
-      }
-   }
-   
-   return tile;
-}
-
-void ossimRectangleCutFilter::setRectangle(const ossimIrect& rect)
-{
-   theRectangle = rect;
-
-   if(theRectangle.hasNans())
-   {
-      if(theInputConnection)
-      {
-         theRectangle = theInputConnection->getBoundingRect();
-      }
-   }
-}
-
-void ossimRectangleCutFilter::getValidImageVertices(
-   vector<ossimIpt>& validVertices,
-   ossimVertexOrdering ordering,
-   ossim_uint32 /* resLevel */)const
-{
-   ossimIrect rect = getBoundingRect();
-
-   if(ordering == OSSIM_CLOCKWISE_ORDER)
-   {
-      validVertices.push_back(rect.ul());
-      validVertices.push_back(rect.ur());
-      validVertices.push_back(rect.lr());
-      validVertices.push_back(rect.ll());
-   }
-   else
-   {
-      validVertices.push_back(rect.ul());
-      validVertices.push_back(rect.ll());
-      validVertices.push_back(rect.lr());
-      validVertices.push_back(rect.ur());
-   }
-}
-
-ossimIrect ossimRectangleCutFilter::getBoundingRect(ossim_uint32 resLevel)const
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimRectangleCutFilter::getBoundingRect DEBUG: entered..." << std::endl;
-   }
-   ossimIrect result;
-
-   result.makeNan();
-   if(!theInputConnection)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << "ossimRectangleCutFilter::getBoundingRect DEBUG: Input connection was not valid so leaving" << std::endl;
-      }
-      return result;
-   }
-
-   result = theInputConnection->getBoundingRect(resLevel);
-   if(isSourceEnabled())
-   {
-      if(theCutType == OSSIM_RECTANGLE_NULL_OUTSIDE)
-      {
-         ossimDpt decimation;
-         getDecimationFactor(resLevel, decimation);
-         ossimIrect cutRect = theRectangle;
-         if(!decimation.hasNans())
-         {
-            cutRect = theRectangle*decimation;
-         }
-         result = cutRect;
-      }
-   }
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimRectangleCutFilter::getBoundingRect DEBUG: cut rect = " << result  << std::endl;
-   }
-   return result;
-}
-
-void ossimRectangleCutFilter::initialize()
-{
-   theDecimationList.clear();
-   if(theInputConnection)
-   {
-      getDecimationFactors(theDecimationList);
-   }
-   if(theDecimationList.empty())
-   {
-      theDecimationList.push_back(ossimDpt(1,1));
-   }
-   if(theRectangle.hasNans())
-   {
-      setRectangle(theRectangle);
-   }
-}
-
-bool ossimRectangleCutFilter::saveState(ossimKeywordlist& kwl,
-                                        const char* prefix)const
-{
-   ossimString newPrefix = prefix;
-   newPrefix+="clip_rect.";
-   
-   theRectangle.saveState(kwl, newPrefix);
-
-   if(theCutType == OSSIM_RECTANGLE_NULL_INSIDE)
-   {
-      kwl.add(prefix,
-              "cut_type",
-              "null_inside",
-              true);
-   }
-   else if(theCutType == OSSIM_RECTANGLE_NULL_OUTSIDE)
-   {
-      kwl.add(prefix,
-              "cut_type",
-              "null_outside",
-              true);      
-   }
-   
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
-
-bool ossimRectangleCutFilter::loadState(const ossimKeywordlist& kwl,
-                                        const char* prefix)
-{
-   ossimString newPrefix = prefix;
-   
-   ossimString rect = kwl.find(prefix, "rect");
-   if(!rect.empty())
-   {
-      theRectangle.toRect(rect);
-   }
-   else 
-   {
-      newPrefix+="clip_rect.";
-      
-      theRectangle.loadState(kwl, newPrefix.c_str());
-   }
-
-   const char* cutType = kwl.find(prefix, "cut_type");
-   if(cutType)
-   {
-      ossimString c = cutType;
-      if(c == "null_inside")
-      {
-         theCutType = OSSIM_RECTANGLE_NULL_INSIDE;
-      }
-      else if(c == "null_outside")
-      {
-         theCutType = OSSIM_RECTANGLE_NULL_OUTSIDE;         
-      }
-      else
-      {
-         theCutType = static_cast<ossimRectangleCutType>(ossimString(cutType).toLong());
-      }
-   }
-
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
-
-const ossimIrect& ossimRectangleCutFilter::getRectangle()const
-{
-   return theRectangle;
-}
-
-ossimRectangleCutFilter::ossimRectangleCutType ossimRectangleCutFilter::getCutType()const
-{
-   return theCutType;
-}
-
-void ossimRectangleCutFilter::setCutType(ossimRectangleCutType cutType)
-{
-   theCutType = cutType;
-}
diff --git a/src/ossim/imaging/ossimRgbGridRemapEngine.cpp b/src/ossim/imaging/ossimRgbGridRemapEngine.cpp
deleted file mode 100644
index 2ce2923..0000000
--- a/src/ossim/imaging/ossimRgbGridRemapEngine.cpp
+++ /dev/null
@@ -1,271 +0,0 @@
-//*****************************************************************************
-// FILE: ossimRgbGridRemapEngine.cc
-//
-// Copyright (C) 2001 ImageLinks, Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Contains implementation of class 
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimRgbGridRemapEngine.cpp 15833 2009-10-29 01:41:53Z eshirschorn $
-
-#include <ossim/imaging/ossimRgbGridRemapEngine.h>
-
-RTTI_DEF1(ossimRgbGridRemapEngine, "ossimRgbGridRemapEngine",
-          ossimGridRemapEngine);
-
-#include <ossim/imaging/ossimGridRemapSource.h>
-#include <ossim/imaging/ossimAtbPointSource.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimDblGrid.h>
-#include <ossim/imaging/ossimImageData.h>
-
-//***
-// Define Trace flags for use within this file:
-//***
-#include <ossim/base/ossimTrace.h>
-static ossimTrace traceExec  ("ossimRgbGridRemapEngine:exec");
-static ossimTrace traceDebug ("ossimRgbGridRemapEngine:debug");
-
-//*****************************************************************************
-//  METHOD: ossimRgbGridRemapEngine::dup
-//  
-//*****************************************************************************
-ossimObject* ossimRgbGridRemapEngine::dup() const
-{
-   return new ossimRgbGridRemapEngine;
-}
-
-//*****************************************************************************
-//  METHOD: ossimRgbGridRemapEngine::remapTile
-//  
-//*****************************************************************************
-void ossimRgbGridRemapEngine::remapTile(const ossimDpt&       origin,
-                                        ossimGridRemapSource* remapper,
-                                        ossimRefPtr<ossimImageData>& tile)
-{
-   static const char MODULE[] = "ossimRgbGridRemapEngine::remapTile";
-   if (traceExec())  CLOG << "entering..." << endl;
-
-   //***
-   // Fetch tile size and NULL pixel value:
-   //***
-   int    width         = tile->getWidth();
-   int    height        = tile->getHeight();
-   int    offset        = 0;
-   double null[3];
-
-   //***
-   // Determine null pixel values so that we can recognize a null coming in and
-   // not remap it:
-   //***
-   null[0] = tile->getNullPix(0);
-   null[1] = tile->getNullPix(1);
-   null[2] = tile->getNullPix(2);
-   
-   ossimDblGrid& gridR = *(remapper->getGrid(0));
-   ossimDblGrid& gridG = *(remapper->getGrid(1));
-   ossimDblGrid& gridB = *(remapper->getGrid(2));
-      
-   //***
-   // Remap according to pixel type:
-   //***
-   switch(tile->getScalarType())
-   {
-   case OSSIM_UCHAR:
-   {
-      ossim_uint8* red_buf  = (ossim_uint8*)tile->getBuf(0);
-      ossim_uint8* grn_buf  = (ossim_uint8*)tile->getBuf(1);
-      ossim_uint8* blu_buf  = (ossim_uint8*)tile->getBuf(2);
-      short  pixel_buffer[3];
-      
-      for (double line=origin.line; line<origin.line+height; line+=1.0)
-      {
-         for (double samp=origin.samp; samp<origin.samp+width; samp+=1.0)
-         {
-            //***
-            // Scan for null pixel before adding remap delta:
-            //***
-            if ((red_buf[offset] != (ossim_uint8) null[0]) &&
-                (grn_buf[offset] != (ossim_uint8) null[1]) &&
-                (blu_buf[offset] != (ossim_uint8) null[2]))
-            {
-               //***
-               // Remap RGB pixel with spatially variant bias value:
-               //***
-               pixel_buffer[0] = red_buf[offset] + (short) gridR(samp,line);
-               pixel_buffer[1] = grn_buf[offset] + (short) gridG(samp,line);
-               pixel_buffer[2] = blu_buf[offset] + (short) gridB(samp,line);
-
-               //***
-               // Clamp:
-               //***
-               if      (pixel_buffer[0]<0)   red_buf[offset] = 0;
-               else if (pixel_buffer[0]>255) red_buf[offset] = 255;
-               else                          red_buf[offset] = pixel_buffer[0];
-               
-
-               if      (pixel_buffer[1]<0)   grn_buf[offset] = 0;
-               else if (pixel_buffer[1]>255) grn_buf[offset] = 255;
-               else                          grn_buf[offset] = pixel_buffer[1];
-               
-
-               if      (pixel_buffer[2]<0)   blu_buf[offset] = 0;
-               else if (pixel_buffer[2]>255) blu_buf[offset] = 255;
-               else                          blu_buf[offset] = pixel_buffer[2];
-               
-               //***
-               // Avoid NULLS:
-               //***
-               if (red_buf[offset] == (ossim_uint8) null[0]) red_buf[offset]++;
-               if (grn_buf[offset] == (ossim_uint8) null[1]) grn_buf[offset]++;
-               if (blu_buf[offset] == (ossim_uint8) null[2]) blu_buf[offset]++;
-            }
-            
-            offset++;
-         }
-      }
-      break;
-   }
-   
-   default:
-   {
-	   ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimRgbGridRemapEngine::remapTile: Scalar type not handled" << std::endl;
-	   break;
-   }
-
-   }   // end switch statement
-
-   if (traceExec())  CLOG << "returning..." << endl;
-   return;
-};
-
-//*****************************************************************************
-//  METHOD: ossimRgbGridRemapEngine::assignRemapValues
-//
-//  This engine defines the target value as an RGB vector of doubles, computed
-//  as the mean of all contributor RGB values.
-//  
-//*****************************************************************************
-void ossimRgbGridRemapEngine::assignRemapValues (
-   vector<ossimAtbPointSource*>& sources_list)
-{
-   static const char MODULE[] = "ossimRgbGridRemapEngine::assignRemapValues";
-   if (traceExec())  CLOG << "entering..." << endl;
-
-   int i; // index to individual sources
-
-   //***
-   // Declare a 2D array that will contain all of the contributing sources'
-   // RGB mean values. Also declare the accumulator target vector.
-   //***
-   int num_contributors =  (int)sources_list.size();
-   double** contributor_pixel = new double* [num_contributors];
-   for (i=0; i<num_contributors; i++)
-      contributor_pixel[i] = new double[3];
-   double target_pixel[3] = {0.0, 0.0, 0.0};
-
-   //***
-   // Now loop over each remaining contributor and sum in its contribution:
-   //***
-   vector<ossimAtbPointSource*>::iterator source;
-   i = 0;
-   for(source=sources_list.begin();
-       source!=sources_list.end();
-       source++)
-   {
-      (*source)->getSourceValue(contributor_pixel[i]);
-
-      target_pixel[0] += contributor_pixel[i][0]/(double)num_contributors;
-      target_pixel[1] += contributor_pixel[i][1]/(double)num_contributors;
-      target_pixel[2] += contributor_pixel[i][2]/(double)num_contributors;
-
-      i++;
-   }
-
-   //***
-   // The target pixel has been established. Now need to compute the actual
-   // remap quantities that will be written to the appropriate remap grids:
-   //***
-   i = 0;
-   for(source=sources_list.begin();
-       source!=sources_list.end();
-       source++)
-   {
-      computeRemapNode(*source, contributor_pixel[i], target_pixel);
-      i++;
-   }
-
-   //***
-   // Delete locally allocated memory:
-   //***
-   for (i=0; i<num_contributors; i++)
-      delete [] contributor_pixel[i];
-   delete [] contributor_pixel;
-   
-   if (traceExec())  CLOG << "returning..." << endl;
-   return;
-}
-
-//*****************************************************************************
-//  METHOD: ossimRgbGridRemapEngine::computeSourceValue
-//  
-//*****************************************************************************
-void ossimRgbGridRemapEngine::computeSourceValue(
-   ossimRefPtr<ossimImageData>& source, void* result)
-{
-   static const char MODULE[]="ossimRgbGridRemapEngine::computeSourceValue";
-   if (traceExec())  CLOG << "entering..." << endl;
-
-   //***
-   // This engine defines "value" as the RGB vector corresponding to the mean
-   // RGB pixel value of the source data:
-   //***
-   ((double*)result)[0] = source->computeAverageBandValue(0);
-   ((double*)result)[1] = source->computeAverageBandValue(1);
-   ((double*)result)[2] = source->computeAverageBandValue(2);
-   
-   if (traceExec())  CLOG << "returning..." << endl;
-   return;
-}
-
-//*****************************************************************************
-//  METHOD: ossimRgbGridRemapEngine::computeRemapNode
-//
-//  This engine defines the remap value as the difference between the target
-//  RGB vector and the individual point source's value vector.
-//
-//*****************************************************************************
-void ossimRgbGridRemapEngine::computeRemapNode(ossimAtbPointSource* ps,
-                                              void* source_value,
-                                              void* target_value)
-{
-   static const char MODULE[] = "ossimRgbGridRemapEngine::computeRemapNode";
-   if (traceExec())  CLOG << "entering..." << endl;
-
-   //***
-   // Compute the remap grid node value specific to this RGB implementation:
-   //***
-   double node[3];
-   node[0] = ((double*)target_value)[0] - ((double*)source_value)[0];
-   node[1] = ((double*)target_value)[1] - ((double*)source_value)[1];
-   node[2] = ((double*)target_value)[2] - ((double*)source_value)[2];
-
-   //***
-   // Fetch a pointer to the remapper feeding this point source in order to
-   // pass it the node value:
-   //***
-   ossimGridRemapSource* remapper = ps->getRemapSource();
-   remapper->setGridNode(ps->getViewPoint(), node);
-
-   if (traceExec())  CLOG << "returning..." << endl;
-   return;
-}
-
diff --git a/src/ossim/imaging/ossimRgbToGreyFilter.cpp b/src/ossim/imaging/ossimRgbToGreyFilter.cpp
deleted file mode 100644
index 141dca5..0000000
--- a/src/ossim/imaging/ossimRgbToGreyFilter.cpp
+++ /dev/null
@@ -1,247 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimRgbToGreyFilter.cpp 19223 2011-03-24 13:38:21Z dburken $
-
-#include <ossim/imaging/ossimRgbToGreyFilter.h>
-#include <ossim/imaging/ossimU8ImageData.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimKeywordlist.h>
-
-RTTI_DEF1(ossimRgbToGreyFilter, "ossimRgbToGreyFilter", ossimImageSourceFilter)
-
-ossimRgbToGreyFilter::ossimRgbToGreyFilter(ossimObject* owner)
-   :ossimImageSourceFilter(owner),
-    theBlankTile(NULL),
-    theTile(NULL),
-    theC1(1.0/3.0),
-    theC2(1.0/3.0),
-    theC3(1.0/3.0)
-{
-}
-
-ossimRgbToGreyFilter::ossimRgbToGreyFilter(ossimImageSource* inputSource,
-                                           double c1,
-                                           double c2,
-                                           double c3)
-   : ossimImageSourceFilter(NULL, inputSource),
-     theBlankTile(NULL),
-     theTile(NULL),
-     theC1(c1),
-     theC2(c2),
-     theC3(c3)
-{
-}
-
-ossimRgbToGreyFilter::ossimRgbToGreyFilter(ossimObject* owner,
-                                           ossimImageSource* inputSource,
-                                           double c1,
-                                           double c2,
-                                           double c3)
-   : ossimImageSourceFilter(owner, inputSource),
-     theBlankTile(NULL),
-     theTile(NULL),
-     theC1(c1),
-     theC2(c2),
-     theC3(c3)
-{
-}
-ossimRgbToGreyFilter::~ossimRgbToGreyFilter()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimRgbToGreyFilter::getTile(const ossimIrect& tileRect,
-                                              ossim_uint32 resLevel)
-{
-   if(!theInputConnection)
-   {
-      return NULL;  // This filter requires an input.
-   }
-
-   ossimRefPtr<ossimImageData> inputTile = theInputConnection->getTile(tileRect,
-                                                           resLevel);   
-   if(!isSourceEnabled() || !inputTile.valid())
-   {
-      return inputTile;
-   }
-
-   if(!theTile)
-   {
-      allocate(); // First time through...
-   }
-
-   // if (!theTile) // throw exeption...
-
-   if( inputTile->getDataObjectStatus() == OSSIM_NULL ||
-       inputTile->getDataObjectStatus() == OSSIM_EMPTY )
-   {
-      theBlankTile->setImageRectangle(tileRect);
-      return theBlankTile;
-   }
-
-   // Set the origin, resize if needed of the output tile.
-   theTile->setImageRectangle(tileRect);
-
-   // Filter the tile.
-   runUcharTransformation(inputTile);
-
-   // Always validate to set the status.
-   theTile->validate();
-   
-   return theTile;
-}
-
-
-void ossimRgbToGreyFilter::initialize()
-{
-   // Base class will recapture "theInputConnection".
-   ossimImageSourceFilter::initialize();
-}
-
-void ossimRgbToGreyFilter::allocate()
-{
-   if(theInputConnection)
-   {
-      theTile      = NULL;
-      theBlankTile = NULL;
-
-      if(isSourceEnabled())
-      {
-         theBlankTile = new ossimU8ImageData(this,
-                                             1,
-                                             theInputConnection->getTileWidth(),
-                                             theInputConnection->getTileHeight());  
-         
-         
-         theTile = (ossimImageData*)theBlankTile->dup();
-         theTile->initialize();
-      }
-   }
-}
-
-ossim_uint32 ossimRgbToGreyFilter::getNumberOfOutputBands() const
-{
-   if(isSourceEnabled())
-   {
-      return 1;
-   }
-
-   return ossimImageSourceFilter::getNumberOfOutputBands();
-}
-
-bool ossimRgbToGreyFilter::saveState(ossimKeywordlist& kwl,
-                                     const char* prefix)const
-{
-   ossimImageSourceFilter::saveState(kwl, prefix);
-
-   kwl.add(prefix,
-           "c1",
-           theC1,
-           true);
-   kwl.add(prefix,
-           "c2",
-           theC2,
-           true);
-   kwl.add(prefix,
-           "c3",
-           theC2,
-           true);
-   
-   return true;
-}
-
-bool ossimRgbToGreyFilter::loadState(const ossimKeywordlist& kwl,
-                                     const char* prefix)
-{
-   ossimImageSourceFilter::loadState(kwl, prefix);
-
-   const char* lookup = kwl.find(prefix, "c1");
-   if(lookup)
-   {
-      theC1 = ossimString(lookup).toDouble();
-   }
-   lookup = kwl.find(prefix, "c2");
-   if(lookup)
-   {
-      theC2 = ossimString(lookup).toDouble();
-   }
-   lookup = kwl.find(prefix, "c3");
-   if(lookup)
-   {
-      theC3 = ossimString(lookup).toDouble();
-   }
-   return true;
-}
-
-void ossimRgbToGreyFilter::runUcharTransformation(ossimRefPtr<ossimImageData>& tile)
-{   
-   unsigned char** bandSrc = new unsigned char*[tile->getNumberOfBands()];
-   unsigned char* bandDest;
-   
-   if(tile->getNumberOfBands() == 1)
-   {
-      bandSrc[0]  = static_cast<unsigned char*>(tile->getBuf(0));
-      bandSrc[1]  = static_cast<unsigned char*>(tile->getBuf(0));
-      bandSrc[2]  = static_cast<unsigned char*>(tile->getBuf(0));
-   }
-   else if(tile->getNumberOfBands() == 2)
-   {
-      bandSrc[0]  = static_cast<unsigned char*>(tile->getBuf(0));
-      bandSrc[1]  = static_cast<unsigned char*>(tile->getBuf(1));
-      bandSrc[2]  = static_cast<unsigned char*>(tile->getBuf(1));      
-   }
-   else if(tile->getNumberOfBands() >= 3)
-   {
-      bandSrc[0]  = static_cast<unsigned char*>(tile->getBuf(0));
-      bandSrc[1]  = static_cast<unsigned char*>(tile->getBuf(1));
-      bandSrc[2]  = static_cast<unsigned char*>(tile->getBuf(2));      
-   }
-   bandDest = static_cast<unsigned char*>(theTile->getBuf());
-   
-   ossim_int32 offset;
-
-   ossim_int32 upperBound = tile->getWidth()*tile->getHeight();
-   for(offset = 0; offset < upperBound; ++offset)
-   {
-      ossim_int32 value;
-      
-      value = ossim::round<int>(theC1*(bandSrc[0][offset]) +
-                    theC2*(bandSrc[1][offset]) +
-                    theC3*(bandSrc[2][offset]));
-      
-      value = value<255?value:255;
-      value = value>0?value:0;
-
-      bandDest[offset] = value;
-   }
-
-   delete [] bandSrc;
-}
-
-ossimString ossimRgbToGreyFilter::getShortName()const
-{
-   return ossimString("grey");
-}
-
-ossimString ossimRgbToGreyFilter::getLongName()const
-{
-   return ossimString("rgb to grey scale filter");
-}
-
-ossimScalarType ossimRgbToGreyFilter::getOutputScalarType() const
-{
-   if(isSourceEnabled())
-   {
-      return OSSIM_UCHAR;
-   }
-   
-   return ossimImageSourceFilter::getOutputScalarType();
-}
diff --git a/src/ossim/imaging/ossimRgbToHsiSource.cpp b/src/ossim/imaging/ossimRgbToHsiSource.cpp
deleted file mode 100644
index 6ee4a99..0000000
--- a/src/ossim/imaging/ossimRgbToHsiSource.cpp
+++ /dev/null
@@ -1,162 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimRgbToHsiSource.cpp 17206 2010-04-25 23:20:40Z dburken $
-
-#include <ossim/imaging/ossimRgbToHsiSource.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimHsiVector.h>
-#include <ossim/base/ossimRgbVector.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-
-RTTI_DEF1(ossimRgbToHsiSource, "ossimRgbToHsiSource", ossimImageSourceFilter)
-
-ossimRgbToHsiSource::ossimRgbToHsiSource()
-   :ossimImageSourceFilter(),
-    theBlankTile(NULL),
-    theTile(NULL)
-{
-}
-
-ossimRgbToHsiSource::ossimRgbToHsiSource(ossimImageSource* inputSource)
-   : ossimImageSourceFilter(inputSource),
-     theBlankTile(NULL),
-     theTile(NULL)
-{
-}
-
-ossimRgbToHsiSource::~ossimRgbToHsiSource()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimRgbToHsiSource::getTile(
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   if(!theInputConnection)
-   {
-      return ossimRefPtr<ossimImageData>();  // This filter requires an input.
-   }
-   
-   ossimRefPtr<ossimImageData> inputTile = theInputConnection->getTile(tileRect,
-                                                                       resLevel);   
-   if(!isSourceEnabled() || !inputTile.valid())
-   {
-      return inputTile;
-   }
-
-   if(!theTile)
-   {
-      allocate(); // First time through...
-   }
-
-   if (!theTile.valid())
-   {
-      return inputTile;
-   }
-   
-   if( inputTile->getDataObjectStatus() == OSSIM_NULL ||
-       inputTile->getDataObjectStatus() == OSSIM_EMPTY )
-   {
-      theBlankTile->setImageRectangle(tileRect);
-      return theBlankTile;
-   }
-   
-   if((inputTile->getNumberOfBands()==3)&&
-      (inputTile->getScalarType()==OSSIM_UCHAR)&&
-      (inputTile->getDataObjectStatus()!=OSSIM_NULL))
-   {
-      // Set the origin, resize if needed of the output tile.
-      theTile->setImageRectangle(tileRect);
-
-      float* outputBands[3];
-      ossim_uint8* inputBands[3];
-      outputBands[0] = static_cast<float*>(theTile->getBuf(0));
-      outputBands[1] = static_cast<float*>(theTile->getBuf(1));
-      outputBands[2] = static_cast<float*>(theTile->getBuf(2));
-      inputBands[0]  = static_cast<ossim_uint8*>(inputTile->getBuf(0));
-      inputBands[1]  = static_cast<ossim_uint8*>(inputTile->getBuf(1));
-      inputBands[2]  = static_cast<ossim_uint8*>(inputTile->getBuf(2));
-      
-      long height = inputTile->getHeight();
-      long width  = inputTile->getWidth();
-      long offset = 0;
-      for(long row = 0; row < height; ++row)
-      {
-         for(long col = 0; col < width; ++col)
-         {
-            ossimRgbVector rgb(inputBands[0][offset],
-                               inputBands[1][offset],
-                               inputBands[2][offset]);
-            
-            ossimHsiVector hsi(rgb);
-            
-            
-            outputBands[0][offset] = hsi.getH();
-            outputBands[1][offset] = hsi.getS();
-            outputBands[2][offset] = hsi.getI();
-            
-            ++offset;
-         }
-      }
-   }
-   else // Input tile not of correct type to process...
-   {
-      return inputTile;
-   }
-
-   theTile->validate();
-   return theTile;
-}
-
-ossimScalarType ossimRgbToHsiSource::getOutputScalarType() const
-{
-   return OSSIM_NORMALIZED_FLOAT;
-}
-
-void ossimRgbToHsiSource::initialize()
-{
-   // Base class will recapture "theInputConnection".
-   ossimImageSourceFilter::initialize();   
-}
-
-void ossimRgbToHsiSource::allocate()
-{
-   theBlankTile = NULL;
-   theTile = NULL;
-
-   if(!theInputConnection) return;
-   
-   theBlankTile = ossimImageDataFactory::instance()->create(this, this);
-   theTile      = (ossimImageData*)theBlankTile->dup();
-   theTile->initialize();
-}
-
-ossim_uint32 ossimRgbToHsiSource::getNumberOfOutputBands()const
-{
-   return 3;
-}
-
-double ossimRgbToHsiSource::getNullPixelValue()const
-{
-   return ossim::nan();
-}
-
-double ossimRgbToHsiSource::getMinPixelValue(ossim_uint32 /* band */)const
-{
-   return 0.0;
-}
-
-double ossimRgbToHsiSource::getMaxPixelValue(ossim_uint32 /* band */)const
-{
-   return 1.0;
-}
diff --git a/src/ossim/imaging/ossimRgbToHsvSource.cpp b/src/ossim/imaging/ossimRgbToHsvSource.cpp
deleted file mode 100644
index 18ea93c..0000000
--- a/src/ossim/imaging/ossimRgbToHsvSource.cpp
+++ /dev/null
@@ -1,155 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimRgbToHsvSource.cpp 17195 2010-04-23 17:32:18Z dburken $
-#include <ossim/imaging/ossimRgbToHsvSource.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimHsvVector.h>
-#include <ossim/base/ossimRgbVector.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-
-RTTI_DEF1(ossimRgbToHsvSource, "ossimRgbToHsvSource", ossimImageSourceFilter)
-
-ossimRgbToHsvSource::ossimRgbToHsvSource()
-   :ossimImageSourceFilter(),
-    theBlankTile(NULL),
-    theTile(NULL)
-{
-}
-
-
-ossimRgbToHsvSource::ossimRgbToHsvSource(ossimImageSource* inputSource)
-   : ossimImageSourceFilter(inputSource),
-    theBlankTile(NULL),
-    theTile(NULL)
-{
-}
-
-ossimRgbToHsvSource::~ossimRgbToHsvSource()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimRgbToHsvSource::getTile(
-   const  ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   if(!theInputConnection)
-   {
-      return ossimRefPtr<ossimImageData>();  // This filter requires an input.
-   }
-
-   ossimRefPtr<ossimImageData> inputTile =
-      theInputConnection->getTile(tileRect, resLevel);   
-   if(!isSourceEnabled() || !inputTile.valid())
-   {
-      return inputTile;
-   }
-
-   if(!theTile.valid())
-   {
-      allocate(); // First time through...
-   }
-   
-   if (!theTile.valid()) // throw exeption...
-   {
-      return inputTile;
-   }
-   
-   if( inputTile->getDataObjectStatus() == OSSIM_NULL ||
-       inputTile->getDataObjectStatus() == OSSIM_EMPTY )
-   {
-      theBlankTile->setImageRectangle(tileRect);
-      return theBlankTile;
-   }
-
-   if((inputTile->getNumberOfBands()==3)&&
-      (inputTile->getScalarType()==OSSIM_UCHAR)&&
-      (inputTile->getDataObjectStatus()!=OSSIM_NULL))
-   {
-      // Set the origin, resize if needed of the output tile.
-      theTile->setImageRectangle(tileRect);
-
-      float* outputBands[3];
-      ossim_uint8* inputBands[3];
-      outputBands[0] = static_cast<float*>(theTile->getBuf(0));
-      outputBands[1] = static_cast<float*>(theTile->getBuf(1));
-      outputBands[2] = static_cast<float*>(theTile->getBuf(2));
-      inputBands[0] = static_cast<ossim_uint8*>(inputTile->getBuf(0));
-      inputBands[1] = static_cast<ossim_uint8*>(inputTile->getBuf(1));
-      inputBands[2] = static_cast<ossim_uint8*>(inputTile->getBuf(2));
-      
-      long height = inputTile->getHeight();
-      long width  = inputTile->getWidth();
-      long offset = 0;
-      for(long row = 0; row < height; ++row)
-      {
-         for(long col = 0; col < width; ++col)
-         {
-            ossimRgbVector rgb(inputBands[0][offset],
-                               inputBands[1][offset],
-                               inputBands[2][offset]);
-            
-            ossimHsvVector hsv(rgb);
-            
-            outputBands[0][offset] = hsv.getH();
-            outputBands[1][offset] = hsv.getS();
-            outputBands[2][offset] = hsv.getV();
-            
-            ++offset;
-         }
-      }
-   }
-   else // Input tile not of correct type to process...
-   {
-      return inputTile;
-   }
-   theTile->validate();
-   return theTile;
-}
-
-void ossimRgbToHsvSource::initialize()
-{
-   // Base class will recapture "theInputConnection".
-   ossimImageSourceFilter::initialize();
-}
-
-void ossimRgbToHsvSource::allocate()
-{
-   theBlankTile = ossimImageDataFactory::instance()->create(this, this);
-   theTile      = (ossimImageData*)theBlankTile->dup();
-   theTile->initialize();
-}
-
-ossimScalarType ossimRgbToHsvSource::getOutputScalarType() const
-{
-   return OSSIM_NORMALIZED_FLOAT;
-}
-
-ossim_uint32 ossimRgbToHsvSource::getNumberOfOutputBands()const
-{
-   return 3;
-}
-
-double ossimRgbToHsvSource::getNullPixelValue()const
-{
-   return ossim::nan();
-}
-
-double ossimRgbToHsvSource::getMinPixelValue(ossim_uint32 /* band */)const
-{
-   return 0.0;
-}
-
-double ossimRgbToHsvSource::getMaxPixelValue(ossim_uint32 /* band */)const
-{
-   return 1.0;
-}
diff --git a/src/ossim/imaging/ossimRgbToIndexFilter.cpp b/src/ossim/imaging/ossimRgbToIndexFilter.cpp
deleted file mode 100644
index a77246d..0000000
--- a/src/ossim/imaging/ossimRgbToIndexFilter.cpp
+++ /dev/null
@@ -1,228 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimRgbToIndexFilter.cpp 17195 2010-04-23 17:32:18Z dburken $
-
-#include <ossim/imaging/ossimRgbToIndexFilter.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-
-
-RTTI_DEF1(ossimRgbToIndexFilter,
-          "ossimRgbToIndexFilter",
-          ossimImageSourceFilter);
-
-ossimRgbToIndexFilter::ossimRgbToIndexFilter()
-   :ossimImageSourceFilter(),
-    theLut(new ossimRgbLutDataObject()),
-    theTile(NULL)
-{
-}
-
-ossimRgbToIndexFilter::ossimRgbToIndexFilter(ossimImageSource* inputSource,
-                                             const ossimRgbLutDataObject& rgbLut)
-   :ossimImageSourceFilter(inputSource),
-    theLut((ossimRgbLutDataObject*)rgbLut.dup()),
-    theTile(NULL)
-{
-}
-
-ossimRgbToIndexFilter::~ossimRgbToIndexFilter()
-{
-   theLut = 0;
-}
-
-void ossimRgbToIndexFilter::initialize()
-{
-   ossimImageSourceFilter::initialize();
-
-   // Force allocate on next getTile.
-   theTile      = NULL;
-}
-
-void ossimRgbToIndexFilter::allocate()
-{
-   theTile      = NULL;
-   
-   if(isSourceEnabled())
-   {
-      theTile      = ossimImageDataFactory::instance()->create(this, this);
-      theTile->initialize();
-   }
-}
-
-void ossimRgbToIndexFilter::disableSource()
-{
-   ossimImageSourceFilter::disableSource();
-   theTile = NULL;
-}
-
-ossimRefPtr<ossimImageData> ossimRgbToIndexFilter::getTile(
-   const ossimIrect& origin,
-   ossim_uint32 resLevel)
-{
-   if(!theInputConnection)
-   {
-      return ossimRefPtr<ossimImageData>();
-   }
-
-   if(!theTile.valid())
-   {
-      allocate();
-   }
-   
-   ossimRefPtr<ossimImageData> input = theInputConnection->getTile(origin,
-                                                                   resLevel);
-
-   if(!theTile.valid() || !input.valid())
-   {
-      return input;
-   }
-
-   theTile->setImageRectangle(origin);
-
-   if(input->getScalarType() == OSSIM_UCHAR)
-   {
-      theTile->setDataObjectStatus(OSSIM_FULL);
-      return convertInputTile(input);
-   }
-   else
-   {
-      theTile->makeBlank();
-   }
-
-   theTile->setDataObjectStatus(OSSIM_FULL);
-   
-   return theTile;
-}
-
-ossimRefPtr<ossimImageData> ossimRgbToIndexFilter::convertInputTile(ossimRefPtr<ossimImageData>& tile)
-{
-   if (!tile)
-   {
-      return theTile;
-   }
-   
-   const ossim_uint32 BANDS = tile->getNumberOfBands();
-
-   if (!BANDS)
-   {
-      return theTile;
-   }
-   
-   ossim_uint8* band[3];
-   ossim_uint8* outBand = (ossim_uint8*)theTile->getBuf();
-
-   if(BANDS >= 3)
-   {
-      band[0] = (ossim_uint8*)(tile->getBuf(0));
-      band[1] = (ossim_uint8*)(tile->getBuf(1));
-      band[2] = (ossim_uint8*)(tile->getBuf(2));
-   }
-   else
-   {
-      band[0] = (ossim_uint8*)(tile->getBuf(0));
-      band[1] = (ossim_uint8*)(tile->getBuf(0));
-      band[2] = (ossim_uint8*)(tile->getBuf(0));
-   }
-
-   if(band[0])
-   {
-      ossim_uint32 upper = tile->getWidth()*tile->getHeight();
-
-      for(ossim_uint32 offset = 0; offset < upper; ++offset)
-      {
-         *outBand = theLut->findIndex(*band[0], *band[1], *band[2]);
-         
-         ++outBand;
-         ++band[0];
-         ++band[1];
-         ++band[2];
-      }
-   }
-   
-   return theTile;
-}
-
-bool ossimRgbToIndexFilter::saveState(ossimKeywordlist& kwl,
-                                      const char* prefix)const
-{
-   ossimString newPrefix = prefix;
-   newPrefix = newPrefix + "lut.";
-
-   theLut->saveState(kwl, newPrefix.c_str());
-
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
-
-bool ossimRgbToIndexFilter::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   ossimString newPrefix = prefix;
-   newPrefix = newPrefix + "lut.";
-
-   theLut->loadState(kwl, newPrefix.c_str());
-   
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
-
-ossim_uint32 ossimRgbToIndexFilter::getNumberOfOutputBands() const
-{
-   if(isSourceEnabled())
-   {
-      return 1;
-   }
-   
-   return ossimImageSourceFilter::getNumberOfOutputBands();
-}
-   
-ossimScalarType ossimRgbToIndexFilter::getOutputScalarType() const
-{
-   if(isSourceEnabled())
-   {
-      return OSSIM_UCHAR;
-   }
-   
-   return ossimImageSourceFilter::getOutputScalarType();
-}
-
-void ossimRgbToIndexFilter::setLut(ossimRgbLutDataObject& lut)
-{
-   theLut = (ossimRgbLutDataObject*) lut.dup();
-}
-
-double ossimRgbToIndexFilter::getNullPixelValue(ossim_uint32 band)const
-{
-   if(isSourceEnabled())
-   {
-      return 0.0;
-   }
-   
-   return ossimImageSourceFilter::getNullPixelValue(band);
-}
-
-double ossimRgbToIndexFilter::getMinPixelValue(ossim_uint32 /* band */)const
-{
-   if(isSourceEnabled())
-   {
-      return 1.0;
-   }
-   
-   return ossimImageSourceFilter::getMinPixelValue();
-}
-
-double ossimRgbToIndexFilter::getMaxPixelValue(ossim_uint32 /* band */)const
-{
-   if(isSourceEnabled())
-   {
-      return 255.0;
-   }
-   
-   return ossimImageSourceFilter::getMaxPixelValue();
-}
diff --git a/src/ossim/imaging/ossimRgbToJpegYCbCrSource.cpp b/src/ossim/imaging/ossimRgbToJpegYCbCrSource.cpp
deleted file mode 100644
index 5d34ec8..0000000
--- a/src/ossim/imaging/ossimRgbToJpegYCbCrSource.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimRgbToJpegYCbCrSource.cpp 9094 2006-06-13 19:12:40Z dburken $
-#include <ossim/imaging/ossimRgbToJpegYCbCrSource.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimJpegYCbCrVector.h>
-#include <ossim/base/ossimRgbVector.h>
-
-RTTI_DEF1(ossimRgbToJpegYCbCrSource,
-          "ossimRgbToJpegYCbCrSource",
-          ossimImageSourceFilter)
-
-ossimRgbToJpegYCbCrSource::ossimRgbToJpegYCbCrSource()
-   :ossimImageSourceFilter()
-{
-   theBlankTile = new ossimImageData(this,
-                                     OSSIM_UCHAR,
-                                     3);
-}
-
-ossimRgbToJpegYCbCrSource::ossimRgbToJpegYCbCrSource(ossimImageSource* inputSource)
-   : ossimImageSourceFilter(inputSource)
-{
-}
-
-ossimRgbToJpegYCbCrSource::~ossimRgbToJpegYCbCrSource()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimRgbToJpegYCbCrSource::getTile(const  ossimIrect& tileRect,
-                                                   ossim_uint32 resLevel)
-{
-   theBlankTile->setOrigin(tileRect.ul());
-   theBlankTile->setWidthHeight(tileRect.width(), tileRect.height());
-   
-   if(theInputConnection)
-   {
-      ossimRefPtr<ossimImageData> imageData = theInputConnection->getTile(tileRect,
-                                                              resLevel);
-      if(!imageData.valid())
-      {
-         return theBlankTile;
-      }
-      if((isSourceEnabled())&&
-         (imageData->getNumberOfBands()==3)&&
-         (imageData->getScalarType()==OSSIM_UCHAR)&&
-         (imageData->getDataObjectStatus()!=OSSIM_NULL)&&
-         (imageData->getDataObjectStatus()!=OSSIM_EMPTY))
-      {
-         ossim_uint8* bands[3];
-         
-         bands[0] = static_cast<ossim_uint8*>(imageData->getBuf(0));
-         bands[1] = static_cast<ossim_uint8*>(imageData->getBuf(1));
-         bands[2] = static_cast<ossim_uint8*>(imageData->getBuf(2));
-         
-         long height = imageData->getHeight();
-         long width  = imageData->getWidth();
-         long offset = 0;
-         
-         for(long row = 0; row < height; ++row)
-         {
-            for(long col = 0; col < width; ++col)
-            {
-               ossimRgbVector rgb(bands[0][offset],
-                                  bands[1][offset],
-                                  bands[2][offset]);
-               
-               ossimJpegYCbCrVector ycbcr(rgb);
-               
-               
-               bands[0][offset] = ycbcr.getY();
-               bands[1][offset] = ycbcr.getCb();
-               bands[2][offset] = ycbcr.getCr();
-               ++offset;
-            }
-         }
-         imageData->validate();
-      }
-      return imageData;
-   }
-   
-   return theBlankTile;
-}  
diff --git a/src/ossim/imaging/ossimRpfCacheTileSource.cpp b/src/ossim/imaging/ossimRpfCacheTileSource.cpp
deleted file mode 100644
index f631f55..0000000
--- a/src/ossim/imaging/ossimRpfCacheTileSource.cpp
+++ /dev/null
@@ -1,1314 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//********************************************************************
-// $Id: ossimRpfCacheTileSource.cpp 1361 2010-08-26 00:24:22Z david.burken $
-#include <algorithm>
-using namespace std;
-
-#include <ossim/imaging/ossimRpfCacheTileSource.h>
-
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/base/ossimNBandLutDataObject.h>
-#include <ossim/imaging/ossimHistogramWriter.h>
-#include <ossim/imaging/ossimImageHistogramSource.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimContainerProperty.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimEllipsoid.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/support_data/ossimRpfFrame.h>
-#include <ossim/support_data/ossimRpfToc.h>
-#include <ossim/support_data/ossimRpfTocEntry.h>
-#include <ossim/support_data/ossimRpfCompressionSection.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/projection/ossimEquDistCylProjection.h>
-#include <ossim/projection/ossimCylEquAreaProjection.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimPolygon.h>
-
-static ossimTrace traceDebug = ossimTrace("ossimRpfCacheTileSource:debug");
-
-#ifdef OSSIM_ID_ENABLED
-static const char OSSIM_ID[] = "$Id: ossimRpfCacheTileSource.cpp 1361 2010-08-26 00:24:22Z david.burken $";
-#endif
-
-RTTI_DEF1(ossimRpfCacheTileSource, "ossimRpfCacheTileSource", ossimImageHandler)
-
-const ossim_uint32 ossimRpfCacheTileSource::CIBCADRG_FRAME_WIDTH  = 1536;
-const ossim_uint32 ossimRpfCacheTileSource::CIBCADRG_FRAME_HEIGHT = 1536;
-
-ossimRpfCacheTileSource::ossimRpfCacheTileSource()
-   :
-   ossimImageHandler(),
-
-   // a CADRG and CIBis a 64*64*12 bit buffer and must divide by 8 to
-   // convert to bytes   
-   m_compressedBuffer(new ossim_uint8[(64*64*12)/8]),
-
-   // whether CIB or CADRG we will alocate the buffer
-   // to the larger of the 2 (CADRG is 3 bands) 
-   m_uncompressedBuffer(new ossim_uint8[256*256*3]),
-   
-   m_numberOfLines(0),
-   m_numberOfSamples(0),
-   m_tile(0),
-   m_fileNames(),
-   m_tileSize(128, 128),
-   m_productType(OSSIM_PRODUCT_TYPE_UNKNOWN),
-   m_workFrame(new ossimRpfFrame),
-   m_bBox_LL_Lon(0.0),
-   m_bBox_LL_Lat(0.0),
-   m_bBox_UR_Lon(0.0),
-   m_bBox_UR_Lat(0.0),
-   m_numOfFramesVertical(0),
-   m_numOfFramesHorizontal(0),
-   m_frameEntryArray()
-{
-  if (traceDebug())
-  {
-    ossimNotify(ossimNotifyLevel_DEBUG)
-      << "ossimRpfCacheTileSource::ossimRpfCacheTileSource entered...\n";
-#ifdef OSSIM_ID_ENABLED
-    ossimNotify(ossimNotifyLevel_DEBUG)
-      << "OSSIM_ID:  " << OSSIM_ID << "\n";
-#endif      
-  }
-
-  m_actualImageRect.makeNan();
-
-}
-
-ossimRpfCacheTileSource::~ossimRpfCacheTileSource()
-{
-  if(m_compressedBuffer)
-  {
-    delete [] m_compressedBuffer;
-    m_compressedBuffer = 0;
-  }
-  if(m_uncompressedBuffer)
-  {
-    delete [] m_uncompressedBuffer;
-    m_uncompressedBuffer = 0;
-  }
-  if(m_workFrame)
-  {
-    delete m_workFrame;
-    m_workFrame = 0;
-  }
-  close();
-}
-
-ossimString ossimRpfCacheTileSource::getShortName()const
-{
-  return ossimString("RpfCache");
-}
-
-ossimString ossimRpfCacheTileSource::getLongName()const
-{
-  return ossimString("RpfCache reader");
-}
-
-
-void ossimRpfCacheTileSource::close()
-{
-  deleteAll();
-}
-
-bool ossimRpfCacheTileSource::isOpen()const
-{
-  //return (theTableOfContents!=0);
-  ossimString ext = theImageFile.ext().downcase();
-
-  if(ext == "rpf")
-  {
-    return true;
-  }
-  else
-  {
-    return false;
-  }
-}
-
-bool ossimRpfCacheTileSource::open()
-{
-  if(traceDebug())
-  {
-    ossimNotify(ossimNotifyLevel_DEBUG) << "ossimRpfCacheTileSource::open(): Entered....." << std::endl;
-  }
-
-  ossimFilename imageFile = theImageFile;
-  bool result = true;
-
-  if(isOpen() == false)
-  {
-    close();
-    result = false;
-  }
-
-  if(result)
-  {
-    if (m_fileNames.size() == 0 && m_frameEntryArray.size() == 0)
-    {
-      if (buildFrameEntryArray(imageFile) == false)
-      {
-        return false;
-      }
-    }
-    
-    setCurrentEntry(0);
-    //---
-    // Adjust image rect so not to go over the -180 to 180 and -90 to 90
-    // bounds.
-    //---
-    setActualImageRect();
-
-    // Set the base class image file name.
-    theImageFile = imageFile;
-    m_tile = ossimImageDataFactory::instance()->create(this, this);
-    m_tile->initialize();
-  }
-
-  if(traceDebug())
-  {
-    ossimNotify(ossimNotifyLevel_DEBUG) << "ossimRpfCacheTileSource::open(): Leaving at line" << __LINE__ << std::endl;
-  }
-
-  return result;
-}
-
-bool ossimRpfCacheTileSource::buildFrameEntryArray(ossimFilename imageFile)
-{
-   static const char MODULE[] = "ossimRpfCacheTileSource::buildFrameEntryArray";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered..." << endl;
-   }
-
-   std::ifstream in((imageFile).c_str() );
-   
-   std::string line;
-   ossim_uint32 index = 0; // used throughout
-   while( in.good() )
-   {
-      // Read in a line.
-      std::getline(in, line);
-
-      ossimString tmpStr = ossimString(line);
-      if (!tmpStr.empty())
-      {
-         if (index == 0)
-         {
-            std::vector<ossimString> box_lat_lon;
-            tmpStr.split(box_lat_lon, "|");
-            
-            if (box_lat_lon.size() > 2)
-            {
-               std::vector<ossimString> ll;
-               std::vector<ossimString> ur;
-               
-               box_lat_lon[0].split(ll, ",");
-               box_lat_lon[1].split(ur, ",");
-               ossimString bandStr = box_lat_lon[2];
-               
-               m_bBox_LL_Lon = ll[0].toFloat64();
-               m_bBox_LL_Lat = ll[1].toFloat64();
-               m_bBox_UR_Lon = ur[0].toFloat64();
-               m_bBox_UR_Lat = ur[1].toFloat64();
-               
-               checkLongitude(m_bBox_LL_Lon, m_bBox_UR_Lon);
-               
-               ossim_int32 bands = ossimString(bandStr).toInt32();
-               if (bands == 1)
-               {
-                  m_productType = OSSIM_PRODUCT_TYPE_CIB;
-               }
-               else if (bands == 3)
-               {
-                  m_productType = OSSIM_PRODUCT_TYPE_CADRG;
-               }
-            }
-            else
-            {
-               return false;
-            }
-         }
-         else if (index == 1)
-         {
-            m_fileNames.push_back(tmpStr);
-            std::vector<ossimString> frame_lat_lon = tmpStr.split("|");
-            if (frame_lat_lon.size() > 2)
-            {
-               ossimString ll_lon_lat = frame_lat_lon[1];
-               ossimString ur_lon_lat = frame_lat_lon[2];
-               ossim_float64 ll_lon = ossimString(ll_lon_lat.split(",")[0]).toDouble();
-               ossim_float64 ll_lat = ossimString(ll_lon_lat.split(",")[1]).toDouble();
-               ossim_float64 ur_lon = ossimString(ur_lon_lat.split(",")[0]).toDouble();
-               ossim_float64 ur_lat = ossimString(ur_lon_lat.split(",")[1]).toDouble();
-
-               checkLongitude(ll_lon, ur_lon);
-               
-               ossim_float64 bBox_lat_diff = std::fabs(m_bBox_UR_Lat - m_bBox_LL_Lat);
-               ossim_float64 bBox_lon_diff = std::fabs(m_bBox_UR_Lon - m_bBox_LL_Lon);
-               
-               ossim_float64 lat_diff = std::fabs(ur_lat - ll_lat);
-               ossim_float64 lon_diff = std::fabs(ur_lon - ll_lon);
-               
-               m_numOfFramesVertical   = static_cast<ossim_uint32>(bBox_lat_diff/lat_diff + 0.5);
-               m_numOfFramesHorizontal = static_cast<ossim_uint32>(bBox_lon_diff/lon_diff + 0.5);
-               
-               m_numberOfLines   = m_numOfFramesVertical*CIBCADRG_FRAME_HEIGHT;
-               m_numberOfSamples = m_numOfFramesHorizontal*CIBCADRG_FRAME_WIDTH;
-
-               if ( traceDebug() )
-               {
-                  ossimNotify(ossimNotifyLevel_DEBUG)
-                     << "\nscene height in degrees: " << bBox_lat_diff
-                     << "\nscene width in degrees:  " << bBox_lon_diff
-                     << "\nframe height in degrees: " << lat_diff
-                     << "\nframe width in degrees:  " << lon_diff
-                     << "\nframes vertical:         " << m_numOfFramesVertical
-                     << "\nframes horizontal:       " << m_numOfFramesHorizontal
-                     << "\nlines:                   " << m_numberOfLines
-                     << "\nsamples:                 " << m_numberOfSamples << "\n";
-               }
-            }
-            else
-            {
-               return false;
-            }
-         }
-         else
-         {
-            m_fileNames.push_back(tmpStr);
-         }
-         
-      } // matches: if (!tmpStr.empty())
-      
-      ++index;
-      
-   } // matches: while( in.good() )
-   in.close();
-
-   m_frameEntryArray.resize(m_numOfFramesVertical);
-   for(index = 0; index < m_frameEntryArray.size(); ++index)
-   {
-      m_frameEntryArray[index].resize(m_numOfFramesHorizontal);
-   }
-
-   for(index = 0; index < m_fileNames.size(); ++index)
-   {
-      ossimString tmpStr = m_fileNames[index];
-      std::vector<ossimString> frameInfos = tmpStr.split("|");
-      if (frameInfos.size() > 1)
-      {
-         ossimString fileName = frameInfos[0];
-         ossimString ll_lon_lat = frameInfos[1];
-         ossimString ur_lon_lat = frameInfos[2];
-         double ll_lon = ossimString(ll_lon_lat.split(",")[0]).toDouble();
-         double ll_lat = ossimString(ll_lon_lat.split(",")[1]).toDouble();
-         double ur_lon = ossimString(ur_lon_lat.split(",")[0]).toDouble();
-         double ur_lat = ossimString(ur_lon_lat.split(",")[1]).toDouble();
-         
-         checkLongitude(ll_lon, ur_lon);
-         
-         ossim_float64 tmpColPostion = std::fabs(ll_lon - m_bBox_LL_Lon);
-         ossim_float64 tmpFrameLon = std::fabs(ur_lon - ll_lon);
-         
-         ossim_float64 tmpRowPostion = std::fabs(m_bBox_UR_Lat - ur_lat);
-         ossim_float64 tmpFrameLat = std::fabs(ur_lat - ll_lat);
-         
-         ossim_uint32 colNum = static_cast<ossim_uint32>(tmpColPostion/tmpFrameLon + 0.5);
-         ossim_uint32 rowNum = static_cast<ossim_uint32>(tmpRowPostion/tmpFrameLat + 0.5);
-         
-         if (colNum >= m_numOfFramesHorizontal)
-         {
-            colNum = m_numOfFramesHorizontal-1; // Clamp to last column.
-         }
-         
-         if (rowNum >= m_numOfFramesVertical)
-         {
-            rowNum = m_numOfFramesVertical-1; // Clamp to last row.
-         }
-         
-         ossimRpfFrameEntry tempEntry;
-         tempEntry.setEntry(ossimFilename(""), fileName);
-         m_frameEntryArray[rowNum][colNum] = tempEntry;
-      }
-      else
-      {
-         return false;
-      }
-   }
-
-   return true;
-}
-
-void ossimRpfCacheTileSource::checkLongitude(ossim_float64& leftLon,
-                                             const ossim_float64& rightLon) const
-{
-   //---
-   // Test for scene coordinates being 180 to 180 and adjust leftLon to -180
-   // if so.
-   //
-   // NOTE:
-   // Setting tolerance to 1/7200 about 15 meters.
-   // Not sure if this is too loose or not. (drb)
-   //---
-   const ossim_float64 TOLERANCE = 0.000138889; // 1/7200 about 15 meters.
-
-   if ( ossim::almostEqual(leftLon, 180.0, TOLERANCE) )
-   {
-      if ( ossim::almostEqual(rightLon, 180.0, TOLERANCE) )
-      {
-         leftLon = -180.0;
-      }
-   }
-}
-
-ossimRefPtr<ossimImageData> ossimRpfCacheTileSource::getTile(
-  const  ossimIrect& rect, ossim_uint32 resLevel)
-{
-  if (m_tile.valid())
-  {
-    // Image rectangle must be set prior to calling getTile.
-    m_tile->setImageRectangle(rect);
-
-    if ( getTile( m_tile.get(), resLevel ) == false )
-    {
-      if (m_tile->getDataObjectStatus() != OSSIM_NULL)
-      {
-        m_tile->makeBlank();
-      }
-    }
-  }
-
-  return m_tile;
-}
-
-bool ossimRpfCacheTileSource::getTile(ossimImageData* result,
-                                      ossim_uint32 resLevel)
-{
-   bool status = false;
-   
-   //---
-   // Not open, this tile source bypassed, or invalid res level,
-   // return a blank tile.
-   //---
-   if( isOpen() && isSourceEnabled() && isValidRLevel(resLevel) &&
-       result && (result->getNumberOfBands() == getNumberOfOutputBands()) &&
-       (m_productType != OSSIM_PRODUCT_TYPE_UNKNOWN) )
-   {
-      if ( resLevel > 0 )
-      {
-         //---
-         // Check for overview tile.  Some overviews can contain r0 so always
-         // call even if resLevel is 0 (if overview is not virtual).  Method 
-         // returns true on success, false on error.
-         //---
-         status = getOverviewTile(resLevel, result);
-      }
-      
-      if (!status) // Did not get an overview tile.
-      {
-         status = true;
-         
-         ossimIrect rect = result->getImageRectangle();
-         
-         ossimIrect imageRect = getImageRectangle();
-         
-         if ( rect.intersects(imageRect) )
-         {
-            //---
-            // Start with a blank tile in case there is not total coverage
-            // for rect.
-            //---
-            result->makeBlank();
-            
-            vector<ossimFrameEntryData> frames = getIntersectingEntries(rect);
-            if(frames.size() > 0)
-            {
-               //---
-               // Now lets render each frame.  Note we will have to find
-               // subframes
-               // that intersect the rectangle of interest for each frame.
-               //---
-               fillTile(rect, frames, result);
-               
-               // Revalidate tile status.
-               result->validate();
-            }
-         }
-         else
-         {
-            result->makeBlank();
-         }
-      }
-   }
-   
-   return status;
-}
-
-ossim_uint32 ossimRpfCacheTileSource::getNumberOfInputBands()const
-{
-  switch(m_productType)
-  {
-  case  OSSIM_PRODUCT_TYPE_UNKNOWN:
-    {
-      return 0;
-    }
-  case OSSIM_PRODUCT_TYPE_CIB:
-    {
-      return 1;
-    }
-  case OSSIM_PRODUCT_TYPE_CADRG:
-    {
-      return 3;
-    }
-  }
-
-  return 0;
-}
-
-ossim_uint32 ossimRpfCacheTileSource::getNumberOfOutputBands()const
-{
-  switch(m_productType)
-  {
-  case  OSSIM_PRODUCT_TYPE_UNKNOWN:
-    {
-      return 0;
-    }
-  case OSSIM_PRODUCT_TYPE_CIB:
-    {
-      return 1;
-    }
-  case OSSIM_PRODUCT_TYPE_CADRG:
-    {
-      return 3;
-    }
-  }
-
-  return 0;
-}
-
-ossim_uint32 ossimRpfCacheTileSource::getNumberOfLines(ossim_uint32 reduced_res_level) const
-{
-   if (reduced_res_level == 0)
-   {
-      return m_numberOfLines;
-   }
-   else if (theOverview.valid())
-   {
-      return theOverview->getNumberOfLines(reduced_res_level);
-   }
-   
-   return 0;
-}
-
-ossim_uint32 ossimRpfCacheTileSource::getNumberOfSamples(ossim_uint32 reduced_res_level) const
-{
-   if (reduced_res_level == 0)
-   {
-      return m_numberOfSamples;
-   }
-   else if (theOverview.valid())
-   {
-      return theOverview->getNumberOfSamples(reduced_res_level);
-   }
-   
-   return 0;
-}
-
-void ossimRpfCacheTileSource::setActualImageRect()
-{
-   m_actualImageRect = ossimIrect(0,0,m_numberOfLines, m_numberOfSamples);
-}
-
-ossimIrect ossimRpfCacheTileSource::getImageRectangle(ossim_uint32 reduced_res_level) const
-{
-   return ossimIrect(0,                         // upper left x
-                     0,                         // upper left y
-                     getNumberOfSamples(reduced_res_level) - 1,  // lower right x
-                     getNumberOfLines(reduced_res_level)   - 1); // lower right y                     
-}
-
-ossimRefPtr<ossimImageGeometry> ossimRpfCacheTileSource::getImageGeometry()
-{
-   if (theGeometry.valid()) return theGeometry;
-   
-   // datum
-   // WGS 84
-   ossimKeywordlist kwl;
-   const char* prefix = 0; // legacy
-   kwl.add(prefix,
-           ossimKeywordNames::DATUM_KW,
-           "WGE",
-           true);   
-   
-   ossimGpt ul(m_bBox_UR_Lat,m_bBox_LL_Lon);
-   ossimGpt ll(m_bBox_LL_Lat,m_bBox_LL_Lon);
-   ossimGpt ur(m_bBox_UR_Lat,m_bBox_UR_Lon);
-   ossimGpt lr(m_bBox_LL_Lat,m_bBox_UR_Lon);
-
-   double latInterval = fabs(ul.latd() - lr.latd())/ getNumberOfLines();
-   double lonInterval = fabs(ul.lond() - ur.lond())/ getNumberOfSamples();
-
-   kwl.add(prefix,
-           ossimKeywordNames::UL_LAT_KW,
-           ul.latd(),//-(latInterval/2.0),
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::UL_LON_KW,
-           ul.lond(),//+(lonInterval/2.0),
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::LL_LAT_KW,
-           ll.latd(),//+(latInterval/2.0),
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::LL_LON_KW,
-           ll.lond(),//+(lonInterval/2.0),
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::LR_LAT_KW,
-           lr.latd(),//+(latInterval/2.0),
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::LR_LON_KW,
-           lr.lond(),//-(lonInterval/2.0),
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::UR_LAT_KW,
-           ur.latd(),//-(latInterval/2.0),
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::UR_LON_KW,
-           ur.lond(),//-(latInterval/2.0),
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::NUMBER_INPUT_BANDS_KW,
-           getNumberOfInputBands(),
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::NUMBER_OUTPUT_BANDS_KW,
-           getNumberOfOutputBands(),
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::NUMBER_LINES_KW,
-           getNumberOfLines(),
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::NUMBER_SAMPLES_KW,
-           getNumberOfSamples(),
-           true);
-
-
-   //---
-   // Make a projection to get the easting / northing of the tie point and
-   // the scale in meters.  This will only be used by the CIB.
-   //---
-   kwl.add(prefix,
-           ossimKeywordNames::DATUM_KW,
-           "WGE",
-           true);
-
-   ossimGpt origin((ul.latd()+lr.latd())*.5,
-                   (ul.lond()+lr.lond())*.5,
-                   0.0);
-
-   double deltaLatPerPixel = latInterval;
-   double deltaLonPerPixel = lonInterval;
-
-   ossimDpt tie;
-
-   tie.lat = ul.latd() - deltaLatPerPixel/2.0;
-   tie.lon = ul.lond() + deltaLonPerPixel/2.0;
-
-   kwl.add(prefix, 
-           ossimKeywordNames::TIE_POINT_XY_KW,
-           tie.toString(),
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT,
-           deltaLatPerPixel,
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON,
-           deltaLonPerPixel,
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::ORIGIN_LATITUDE_KW,
-           origin.latd(),
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::CENTRAL_MERIDIAN_KW,
-           origin.lond(),
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::TIE_POINT_LAT_KW,
-           ul.latd()-(deltaLatPerPixel/2.0),
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::TIE_POINT_LON_KW,
-           ul.lond()+(deltaLonPerPixel/2.0),
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::TYPE_KW,
-           "ossimEquDistCylProjection",
-           true);
-  
-   // Capture this for next time.
-   theGeometry = new ossimImageGeometry;
-   theGeometry->loadState(kwl, prefix);
-
-   // Set image things the geometry object should know about.
-   initImageParameters( theGeometry.get() ); 
-
-   return theGeometry;
-}
-
-ossimScalarType ossimRpfCacheTileSource::getOutputScalarType() const
-{
-   return OSSIM_UCHAR;
-}
-
-ossim_uint32 ossimRpfCacheTileSource::getTileWidth() const
-{
-   return m_tileSize.x;
-}
-
-ossim_uint32 ossimRpfCacheTileSource::getTileHeight() const
-{
-   return m_tileSize.y;
-}
-
-bool ossimRpfCacheTileSource::setCurrentEntry(ossim_uint32 entryIdx)
-{
-   // Clear the geometry.
-   theGeometry = 0;
-
-   // Must clear or openOverview will use last entries.
-   theOverviewFile.clear();
-
-   if(!setEntryToRender(entryIdx))
-   {
-      return false;
-   }
-   completeOpen();
-
-   return true;
-}
-
-void ossimRpfCacheTileSource::getEntryList(std::vector<ossim_uint32>& entryList)const
-{
-   entryList.push_back(0);
-}
-
-bool ossimRpfCacheTileSource::setEntryToRender(ossim_uint32 /* index */)
-{
-   if(isOpen())
-   { 
-      populateLut();
-      return true;
-   }
-
-   return false;
-}
-
-bool ossimRpfCacheTileSource::isValidRLevel(ossim_uint32 reduced_res_level) const
-{
-   if (reduced_res_level == 0)
-   {
-      return true;
-   }
-   else if (theOverview.valid())
-   {
-      return theOverview->isValidRLevel(reduced_res_level);
-   }
-   else
-   {
-      return false;
-   }
-}
-
-vector<ossimRpfCacheTileSource::ossimFrameEntryData> ossimRpfCacheTileSource::getIntersectingEntries(const ossimIrect& rect)
-{
-   vector<ossimFrameEntryData> result;
-
-   // make sure we have the Toc entry to render
-   if(!isOpen()) return result;
-
-   ossimIrect imageRect = getImageRectangle();
-   if(rect.intersects(imageRect))
-   {
-      ossimIrect clipRect  = rect.clipToRect(imageRect);
-      ossimIrect frameRect(clipRect.ul().x/CIBCADRG_FRAME_WIDTH,
-                           clipRect.ul().y/CIBCADRG_FRAME_HEIGHT,
-                           clipRect.lr().x/CIBCADRG_FRAME_WIDTH,
-                           clipRect.lr().y/CIBCADRG_FRAME_HEIGHT);
-
-      for(ossim_int32 row = frameRect.ul().y; row <= frameRect.lr().y; ++row)
-      {
-         for(ossim_int32 col = frameRect.ul().x; col <= frameRect.lr().x; ++col)
-         {
-            ossimRpfFrameEntry tempEntry = m_frameEntryArray[row][col];
-            if(tempEntry.exists())
-            {
-               result.push_back(ossimFrameEntryData(row,
-                                                    col,
-                                                    row*CIBCADRG_FRAME_HEIGHT,
-                                                    col*CIBCADRG_FRAME_WIDTH,
-                                                    tempEntry));
-            }
-         }
-      }
-   }
-
-   return result;
-}
-
-void ossimRpfCacheTileSource::fillTile(
-   const ossimIrect& tileRect,
-   const vector<ossimFrameEntryData>& framesInvolved,
-   ossimImageData* tile)
-{
-   ossim_uint32 idx = 0;
-   for(idx = 0;
-       idx < framesInvolved.size();
-       ++idx)
-   {
-
-      if(m_workFrame->parseFile(framesInvolved[idx].theFrameEntry.getFullPath())
-         == ossimErrorCodes::OSSIM_OK)
-      {
-         // we will fill a subtile.  We pass in which frame it is and the position of the frame.
-         // the actual pixel will be 1536*row and 1536 *col.
-         if(m_productType == OSSIM_PRODUCT_TYPE_CIB)
-         {
-            fillSubTileCib(*m_workFrame,
-                           tileRect,
-                           framesInvolved[idx],
-                           tile);
-         }
-         else
-         {
-            fillSubTileCadrg(*m_workFrame,
-                             tileRect,
-                             framesInvolved[idx],
-                             tile);
-         }
-      }
-   }
-}
-
-void ossimRpfCacheTileSource::fillSubTileCadrg(
-   const ossimRpfFrame&  aFrame,
-   const ossimIrect& tileRect,
-   const ossimFrameEntryData& frameEntryData,
-   ossimImageData* tile)
-{;
-// first let's grab the absolute position of the frame rectangle in pixel space
-   ossimIrect frameRect(frameEntryData.thePixelCol,
-                        frameEntryData.thePixelRow,
-                        frameEntryData.thePixelCol + CIBCADRG_FRAME_WIDTH  - 1,
-                        frameEntryData.thePixelRow + CIBCADRG_FRAME_HEIGHT - 1);
-
-
-// now clip it to the tile
-   ossimIrect clipRect = tileRect.clipToRect(frameRect);
-
-   const ossimRpfCompressionSection* compressionSection = aFrame.getCompressionSection();
-
-   if(!compressionSection)
-   {
-      return;
-   }
-
-   const vector<ossimRpfColorGrayscaleTable>& colorTable =
-      aFrame.getColorGrayscaleTable();
-
-// ESH 03/2009 -- Partial fix for ticket #646.
-// Crash fix on reading RPFs: Make sure the colorTable vector 
-// has entries before trying to make use of them. 
-   int numTables = (int)colorTable.size();
-   if ( numTables <= 0 )
-   {
-      return;
-   }
-
-   ossim_uint8 *tempRows[3];
-
-   tempRows[0] = m_uncompressedBuffer;
-   tempRows[1] = (m_uncompressedBuffer + 256*256);
-   tempRows[2] = (tempRows[1] + 256*256);
-
-// find the shift to 0,0
-   ossimIpt tempDelta(clipRect.ul().x - frameEntryData.thePixelCol,
-                      clipRect.ul().y - frameEntryData.thePixelRow);
-
-
-// In order to compute the subframe we will need the corner offsets of
-// the upper left of the frame and the upper left of the clip rect.  The
-// clip rect should be completely within the frame.  This just translates the value
-// to make the upper left of the frame be 0,0.
-//
-   ossimIrect offsetRect(tempDelta.x,
-                         tempDelta.y,
-                         tempDelta.x + clipRect.width()-1,
-                         tempDelta.y + clipRect.height()-1);
-
-// each subframe is 64x64.  We will actually use 256x256 since
-// we will be uncompressing them.  Note CADRG is a 256x256 tile
-// compressed to 64x64x12 bit data
-//
-   ossimIrect subFrameRect(offsetRect.ul().x/256,
-                           offsetRect.ul().y/256,
-                           (offsetRect.lr().x)/256,
-                           (offsetRect.lr().y)/256);
-
-   ossim_uint32 readPtr  = 0;
-
-   ossim_int32 row = 0;
-   ossim_int32 col = 0;
-   ossim_uint32 i = 0;
-   ossim_uint32 j = 0;
-   ossim_int32 upperY = subFrameRect.lr().y;
-   ossim_int32 upperX = subFrameRect.lr().x;
-   ossim_int32 lowerY = subFrameRect.ul().y;
-   ossim_int32 lowerX = subFrameRect.ul().x; 
-   for(row = lowerY; row <= upperY; ++row)
-   {
-      for(col = lowerX; col <= upperX; ++col)
-      {
-         readPtr = 0;
-         if(aFrame.fillSubFrameBuffer(m_compressedBuffer, 0, row, col))
-         {
-            for (i = 0; i < 256; i += 4)
-            {
-               for (j = 0; j < 256; j += 8)
-               {
-                  ossim_uint16 firstByte  = m_compressedBuffer[readPtr++] & 0xff;
-                  ossim_uint16 secondByte = m_compressedBuffer[readPtr++] & 0xff;
-                  ossim_uint16 thirdByte  = m_compressedBuffer[readPtr++] & 0xff;
-
-                  //because dealing with half-bytes is hard, we
-                  //uncompress two 4x4 tiles at the same time. (a
-                  //4x4 tile compressed is 12 bits )
-                  // this little code was grabbed from openmap software.
-
-                  /* Get first 12-bit value as index into VQ table */
-                  // I think we need to swap
-                  ossim_uint16 val1 = (firstByte << 4) | (secondByte >> 4);
-
-                  /* Get second 12-bit value as index into VQ table*/
-                  ossim_uint16 val2 = ((secondByte & 0x000F) << 8) | thirdByte;
-
-                  for (ossim_uint32 t = 0; t < 4; ++t)
-                  {
-                     for (ossim_uint32 e = 0; e < 4; ++e)
-                     {
-                        ossim_uint16 tableVal1 = compressionSection->getTable()[t].theData[val1*4 + e] & 0xff;
-                        ossim_uint16 tableVal2 = compressionSection->getTable()[t].theData[val2*4 + e] & 0xff;
-
-                        ossim_uint32 pixindex = ((i+t)*256) +
-                           (j + e);
-                        const ossim_uint8* color1 = colorTable[0].getStartOfData(tableVal1);
-                        const ossim_uint8* color2 = colorTable[0].getStartOfData(tableVal2);
-
-
-                        tempRows[0][pixindex] = color1[0];
-                        tempRows[1][pixindex] = color1[1];
-                        tempRows[2][pixindex] = color1[2];
-
-                        tempRows[0][pixindex+4] = color2[0];
-                        tempRows[1][pixindex+4] = color2[1];
-                        tempRows[2][pixindex+4] = color2[2];
-                     } //for e
-                  } //for t
-               }  /* for j */
-            } //for i
-         }
-         else
-         {
-            memset(m_uncompressedBuffer, 0, 256*256*3);
-         }
-         ossim_int32 tempCol = col*256;
-         ossim_int32 tempRow = row*256;
-         ossimIrect subRectToFill(frameRect.ul().x + tempCol,
-                                  frameRect.ul().y + tempRow,
-                                  frameRect.ul().x + tempCol + 255,
-                                  frameRect.ul().y + tempRow + 255);
-         tile->loadTile(m_uncompressedBuffer,
-                        subRectToFill,
-                        OSSIM_BSQ);
-      }
-   }
-}
-
-void ossimRpfCacheTileSource::fillSubTileCib(
-   const ossimRpfFrame&  aFrame,
-   const ossimIrect& tileRect,
-   const ossimFrameEntryData& frameEntryData,
-   ossimImageData* tile)
-{
-   // first let's grab the absolute position of the frame rectangle in pixel
-   // space
-   ossimIrect frameRect(frameEntryData.thePixelCol,
-                        frameEntryData.thePixelRow,
-                        frameEntryData.thePixelCol + CIBCADRG_FRAME_WIDTH  - 1,
-                        frameEntryData.thePixelRow + CIBCADRG_FRAME_HEIGHT - 1);
-
-
-   // now clip it to the tile
-   ossimIrect clipRect = tileRect.clipToRect(frameRect);
-
-   const ossimRpfCompressionSection* compressionSection = aFrame.getCompressionSection();
-
-   if(!compressionSection)
-   {
-      return;
-   }
-
-   const vector<ossimRpfColorGrayscaleTable>& colorTable =
-      aFrame.getColorGrayscaleTable();
-
-   // ESH 03/2009 -- Partial fix for ticket #646.
-   // Crash fix on reading RPFs: Make sure the colorTable vector 
-   // has entries before trying to make use of them. 
-   int numTables = (int)colorTable.size();
-   if ( numTables <= 0 )
-   {
-      return;
-   }
-
-   // check to see if it does overlap.  If it doesn't then the width and height
-   // will be a single point
-   {
-      ossim_uint8 *tempRow;
-
-      tempRow = m_uncompressedBuffer;
-
-      // find the shift to 0,0
-      ossimIpt tempDelta(clipRect.ul().x - frameEntryData.thePixelCol,
-                         clipRect.ul().y - frameEntryData.thePixelRow);
-
-      // In order to compute the subframe we will need the corner offsets of
-      // the upper left of the frame and the upper left of the clip rect.  The
-      // clip rect should be completely within the frame.  This just translates the value
-      // to make the upper left of the frame be 0,0.
-      //
-      ossimIrect offsetRect(tempDelta.x,
-                            tempDelta.y,
-                            tempDelta.x + clipRect.width()-1,
-                            tempDelta.y + clipRect.height()-1);
-
-      // each subframe is 64x64.  We will actually use 256x256 since
-      // we will be uncompressing them.  Note CADRG is a 256x256 tile
-      // compressed to 64x64x12 bit data
-      //
-      ossimIrect subFrameRect(offsetRect.ul().x/256,
-                              offsetRect.ul().y/256,
-                              (offsetRect.lr().x)/256,
-                              (offsetRect.lr().y)/256);
-
-      ossim_int32 row = 0;
-      ossim_int32 col = 0;
-      ossim_uint32 i = 0;
-      ossim_uint32 j = 0;
-      ossim_uint32 readPtr = 0;
-      for(row = subFrameRect.ul().y; row <= subFrameRect.lr().y; ++row)
-      {
-         for(col = subFrameRect.ul().x; col <= subFrameRect.lr().x; ++col)
-         {
-            readPtr = 0;
-            if(aFrame.fillSubFrameBuffer(m_compressedBuffer, 0, row, col))
-            {
-               for (i = 0; i < 256; i += 4)
-               {
-                  for (j = 0; j < 256; j += 8)
-                  {
-                     ossim_uint16 firstByte  = m_compressedBuffer[readPtr++] & 0xff;
-                     ossim_uint16 secondByte = m_compressedBuffer[readPtr++] & 0xff;
-                     ossim_uint16 thirdByte  = m_compressedBuffer[readPtr++] & 0xff;
-
-                     //because dealing with half-bytes is hard, we
-                     //uncompress two 4x4 tiles at the same time. (a
-                     //4x4 tile compressed is 12 bits )
-                     // this little code was grabbed from openmap software.
-
-                     /* Get first 12-bit value as index into VQ table */
-                     // I think we need to swap
-                     ossim_uint16 val1 = (firstByte << 4) | (secondByte >> 4);
-
-                     /* Get second 12-bit value as index into VQ table*/
-                     ossim_uint16 val2 = ((secondByte & 0x000F) << 8) | thirdByte;
-
-                     for (ossim_uint32 t = 0; t < 4; ++t)
-                     {
-                        for (ossim_uint32 e = 0; e < 4; ++e)
-                        {
-                           ossim_uint16 tableVal1 = compressionSection->getTable()[t].theData[val1*4 + e] & 0xff;
-                           ossim_uint16 tableVal2 = compressionSection->getTable()[t].theData[val2*4 + e] & 0xff;
-
-                           ossim_uint32 pixindex = ((i+t)*256) + (j + e);
-                           const ossim_uint8* color1 = colorTable[0].getStartOfData(tableVal1);
-                           const ossim_uint8* color2 = colorTable[0].getStartOfData(tableVal2);
-
-
-                           tempRow[pixindex]      = color1[0];
-                           tempRow[pixindex + 4]  = color2[0];
-                        } //for e
-                     } //for t
-                  }  /* for j */
-               } //for i
-            }
-            else
-            {
-               memset(m_uncompressedBuffer, 0, 256*256);
-            }
-            ossim_int32 tCol = col*256;
-            ossim_int32 tRow = row*256;
-            ossimIrect subRectToFill(frameRect.ul().x + tCol,
-                                     frameRect.ul().y + tRow,
-                                     frameRect.ul().x + tCol + 255,
-                                     frameRect.ul().y + tRow + 255);
-            tile->loadTile(m_uncompressedBuffer,
-                           subRectToFill,
-                           OSSIM_BSQ);
-         }
-      }
-   }  
-}
-
-void ossimRpfCacheTileSource::allocateForProduct()
-{
-   if(m_productType ==  OSSIM_PRODUCT_TYPE_UNKNOWN)
-   {
-      return;
-   }
-   if(m_uncompressedBuffer)
-   {
-      delete [] m_uncompressedBuffer;
-      m_uncompressedBuffer = 0;
-   }
-   if(m_compressedBuffer)
-   {
-      delete [] m_compressedBuffer;
-      m_compressedBuffer = 0;
-   }
-
-   // a CADRG and CIBis a 64*64*12 bit buffer and must divide by 8 to
-   // convert to bytes
-   m_compressedBuffer   = new ossim_uint8[(64*64*12)/8];
-   if(m_productType == OSSIM_PRODUCT_TYPE_CIB)
-   {
-      m_uncompressedBuffer = new ossim_uint8[256*256];
-   }
-   else
-   {
-      m_uncompressedBuffer = new ossim_uint8[256*256*3];
-   }
-
-   m_tile = ossimImageDataFactory::instance()->create(this, this);
-   m_tile->initialize();
-}
-
-void ossimRpfCacheTileSource::deleteAll()
-{
-   theOverview = 0;
-}
-
-bool ossimRpfCacheTileSource::saveState(ossimKeywordlist& kwl,
-                                        const char* prefix)const
-{
-   bool result = ossimImageHandler::saveState(kwl, prefix);
-
-   return result;
-}
-
-bool ossimRpfCacheTileSource::loadState(const ossimKeywordlist& kwl,
-                                        const char* prefix)
-{
-   const char* MODULE = "ossimRpfCacheTileSource::loadState";
-
-   if(traceDebug())
-   {
-      CLOG << "Entering..." << endl;
-   }
-   bool result = ossimImageHandler::loadState(kwl, prefix);
-
-   if(!result)
-   {
-      if(traceDebug())
-      {
-         CLOG << "Leaving..." << endl;
-      }
-      return false;
-   }
-   const char* lookup = 0;
-   lookup = kwl.find(ossimString(prefix), "entry");
-   ossim_int32 entry = ossimString(lookup).toInt32();
-
-   // if an entry is specified then
-   // call the open with an entry number
-   if(lookup)
-   {
-      if(traceDebug())
-      {
-         CLOG << "Leaving..." << endl;
-      }
-      result = ossimImageHandler::open(theImageFile);
-      setCurrentEntry(entry);
-      return result;
-   }
-
-   result = ossimImageHandler::open(theImageFile);
-
-   return result;
-}
-
-ossim_uint32 ossimRpfCacheTileSource::getImageTileWidth() const
-{
-   return 256;
-}
-
-ossim_uint32 ossimRpfCacheTileSource::getImageTileHeight() const
-{
-   return 256;
-}
-
-bool ossimRpfCacheTileSource::isCib() const
-{
-   return (m_productType==OSSIM_PRODUCT_TYPE_CIB);
-}
-
-bool ossimRpfCacheTileSource::isCadrg() const
-{
-   return (m_productType==OSSIM_PRODUCT_TYPE_CADRG);
-}
-
-ossimRefPtr<ossimProperty> ossimRpfCacheTileSource::getProperty(const ossimString& name)const
-{
-   if(name == "file_type")
-   {
-      if(m_productType == OSSIM_PRODUCT_TYPE_CIB)
-      {
-         return new ossimStringProperty("file_type", "CIB");
-      }
-      else if(m_productType == OSSIM_PRODUCT_TYPE_CADRG)
-      {
-         return new ossimStringProperty("file_type", "CADRG");
-      }
-      return 0;
-   }
-   return ossimImageHandler::getProperty(name);
-}
-
-void ossimRpfCacheTileSource::populateLut()
-{
-   theLut = 0;
-   if(m_fileNames.size() > 0)
-   {
-      // bool found = false;
-      ossimRpfFrameEntry tempEntry;
-      ossimRpfFrame aFrame;
-      ossimFilename fileName = m_fileNames[0].split("|")[0];
-      // if (fileName.exists())
-      // {
-      //    found = true;
-      // }
-
-      if(aFrame.parseFile(fileName)
-         == ossimErrorCodes::OSSIM_OK)
-      {
-         const vector<ossimRpfColorGrayscaleTable>& colorTable =
-            aFrame.getColorGrayscaleTable();
-
-         // ESH 03/2009 -- Partial fix for ticket #646.
-         // Crash fix on reading RPFs: Make sure the colorTable vector 
-         // has entries before trying to make use of them. 
-         int numTables = (int)colorTable.size();
-
-         ossim_uint32 numElements = (numTables > 0) ? colorTable[0].getNumberOfElements() : 0;
-         if(numElements > 0)
-         {
-            if((m_productType == OSSIM_PRODUCT_TYPE_CIB)||
-               (m_productType == OSSIM_PRODUCT_TYPE_CADRG))
-            {
-               theLut = new ossimNBandLutDataObject(numElements,
-                                                    3,
-                                                    OSSIM_UINT8);
-            }
-            else
-            {
-               theLut = 0;
-               return;
-            }
-            ossim_uint32 idx = 0;
-
-            for(idx = 0; idx < numElements;++idx)
-            {
-               const ossim_uint8* startOfData = colorTable[0].getStartOfData(idx);
-               switch(m_productType)
-               {
-                  case OSSIM_PRODUCT_TYPE_CIB:
-                  {
-                     (*theLut)[idx][0] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[0]);
-                     (*theLut)[idx][1] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[0]);
-                     (*theLut)[idx][2] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[0]);
-                     break;
-                  }
-                  case OSSIM_PRODUCT_TYPE_CADRG:
-                  {
-                     (*theLut)[idx][0] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[0]);
-                     (*theLut)[idx][1] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[1]);
-                     (*theLut)[idx][2] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(startOfData[2]);
-                     break;
-                  }
-                  default:
-                  {
-                     break;
-                  }
-               }
-            }
-         }
-      }
-   }
-}
-
-void ossimRpfCacheTileSource::establishDecimationFactors()
-{
-   theDecimationFactors.clear();
-   
-   // Just needed to set the first R level here, the base class can do the rest:
-   ossimImageHandler::establishDecimationFactors();
-}
-
diff --git a/src/ossim/imaging/ossimSFIMFusion.cpp b/src/ossim/imaging/ossimSFIMFusion.cpp
deleted file mode 100644
index c63979a..0000000
--- a/src/ossim/imaging/ossimSFIMFusion.cpp
+++ /dev/null
@@ -1,408 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2005 Garrett Potts
-//
-// LICENSE:  See top level LICENSE.txt
-// 
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimSFIMFusion.cpp 20061 2011-09-07 16:46:16Z gpotts $
-#include <ossim/imaging/ossimSFIMFusion.h>
-#include <ossim/matrix/newmat.h>
-#include <ossim/matrix/newmatio.h>
-#include <ossim/base/ossimNumericProperty.h>
-#include <ossim/base/ossim2dLinearRegression.h>
-#include <ossim/base/ossimNormRgbVector.h>
-#include <ossim/base/ossimHsiVector.h>
-#include <ossim/base/ossimVisitor.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/base/ossimBooleanProperty.h>
-
-RTTI_DEF2(ossimSFIMFusion, "ossimSFIMFusion", ossimFusionCombiner, ossimAdjustableParameterInterface);
-
-
-static const ossim_uint32 HIGH_PASS_GAIN_OFFSET = 0;
-static const ossim_uint32 LOW_PASS_WIDTH_OFFSET = 1;
-static const ossim_uint32  NUMBER_OF_ADJUSTABLE_PARAMETERS = 2;
-
-ossimSFIMFusion::ossimSFIMFusion()
-   :theLowPassKernelWidth(1.5),
-    theHighPassKernelWidth(3)
-{
-   theAutoAdjustScales = true;
-   theLowPassFilter  = new ossimImageGaussianFilter;
-   theHighPassFilter = new ossimConvolutionSource;
-
-   setFilters();
-
-   initAdjustableParameters();
-}
-
-ossimSFIMFusion::~ossimSFIMFusion()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimSFIMFusion::getTile(const ossimIrect& rect,
-                                                                 ossim_uint32 resLevel)
-{
-   if(!theInputConnection)
-   {
-      return ossimRefPtr<ossimImageData>();
-   }
-
-   if (!theIntensityConnection)
-   {
-      return theInputConnection->getTile(rect, resLevel);
-   }
-
-   
-   
-   if(!theNormLowPassTile.valid())
-   {
-      theNormLowPassTile = new ossimImageData(this,
-                                              OSSIM_NORMALIZED_FLOAT,
-                                              1,
-                                              rect.width(),
-                                              rect.height());
-      theNormHighPassTile = new ossimImageData(this,
-                                              OSSIM_NORMALIZED_FLOAT,
-                                               1,
-                                               rect.width(),
-                                               rect.height());
-      theNormLowPassTile->initialize();
-      theNormHighPassTile->initialize();
-      theNormLowPassTile->makeBlank();
-      theNormHighPassTile->makeBlank();
-   }
-
-   theNormLowPassTile->setImageRectangle(rect);
-   theNormHighPassTile->setImageRectangle(rect);
-   theNormLowPassTile->makeBlank();
-   theNormHighPassTile->makeBlank();
-
-   if(!theLowPassFilter->getInput() && getInput())
-   {
-      initialize();
-   }
-
-   ossimRefPtr<ossimImageData> lowTile  = theLowPassFilter->getTile(rect, resLevel);
-   ossimRefPtr<ossimImageData> highTile = theHighPassFilter->getTile(rect, resLevel);
-//   ossimRefPtr<ossimImageData> highTile = getNormIntensity(rect, resLevel);
-
-   // if we don't have valid low and high pass then return the input color tile
-   // in its original format
-   //
-   if(!lowTile.valid()||!highTile.valid())
-   {
-//       return theInputConnection->getTile(rect, resLevel);
-      return 0;
-   }
-
-   if((lowTile->getDataObjectStatus() == OSSIM_EMPTY)||
-      (!lowTile->getBuf()) ||
-      (highTile->getDataObjectStatus() == OSSIM_EMPTY)||
-      (!highTile->getBuf()))
-   {
-//      return theInputConnection->getTile(rect, resLevel);
-      return 0;
-   }
-
-   ossimRefPtr<ossimImageData> normColorData = getNormTile(rect, resLevel);
-   
-   ossim_uint32 y = 0;
-   ossim_uint32 x = 0;
-   ossim_uint32 w = theTile->getWidth();
-   ossim_uint32 h = theTile->getHeight();
-
-   theTile->makeBlank();
-   theTile->setImageRectangle(rect);
-   
-   if(!normColorData.valid())
-   {
-     return 0;
-//      return theTile;
-   }
-
-   if((normColorData->getDataObjectStatus() == OSSIM_EMPTY)||
-      !normColorData->getBuf())
-   {
-      return theTile;
-   }
-   ossimRefPtr<ossimImageData> normColorOutputData = (ossimImageData*)normColorData->dup();
-   normColorOutputData->setImageRectangle(rect);
-   normColorOutputData->loadTile(normColorData.get());
-   
-   // ossim_float64 slopeResult = 0.0;
-   ossim_uint32 idx = 0;
-   std::vector<ossim_float32*> bands(normColorData->getNumberOfBands());
-   
-   lowTile->copyTileToNormalizedBuffer((ossim_float32*)theNormLowPassTile->getBuf());
-   
-   highTile->copyTileToNormalizedBuffer((ossim_float32*)theNormHighPassTile->getBuf());
-   theNormLowPassTile->validate();
-   theNormHighPassTile->validate();
-   ossimRefPtr<ossimImageData> lowPan = (ossimImageData*)theNormLowPassTile->dup();
-   lowPan->setImageRectangle(rect);
-   lowPan->loadTile(theNormLowPassTile.get());
-   ossimRefPtr<ossimImageData> highPan = (ossimImageData*)theNormHighPassTile->dup();
-   highPan->setImageRectangle(rect);
-   highPan->loadTile(theNormHighPassTile.get());
-   
-   ossim_float32* panHigh = (ossim_float32*)highPan->getBuf();
-   ossim_float32* panLow  = (ossim_float32*)lowPan->getBuf();
-   for(idx = 0; idx < bands.size(); ++idx)
-   {
-      bands[idx] = (ossim_float32*)normColorOutputData->getBuf(idx);
-   }
-   // double delta = 0.0;
-   ossim_uint32 bandsSize = (ossim_uint32)bands.size();
-   double normMinPix = 0.0;
-   for(y = 0; y < h; ++y)
-   {
-      for(x = 0; x < w; ++x)
-      {
-         for(idx = 0; idx < bandsSize; ++idx)
-         {
-            if((*bands[idx] != 0.0)&&
-               (*panLow > FLT_EPSILON) ) // if band is not null and not divide by 0
-            {
-               normMinPix = (ossim_float32)normColorOutputData->getMinPix(idx);
-               *bands[idx] = ((*bands[idx])*(*panHigh))/
-                  (*panLow);
-               if(*bands[idx] > 1.0) *bands[idx] = 1.0;
-               if(*bands[idx] < normMinPix) *bands[idx] = normMinPix;
-            }
-            // let's comment out the nulling and we will instead just pass the color on
-            //
-//            else
-//            {
-//               *bands[idx] = 0.0;
-//            }
-            ++bands[idx];
-         }
-         ++panHigh;
-         ++panLow;
-      }
-   }
-   
-   theTile->copyNormalizedBufferToTile((ossim_float32*)normColorOutputData->getBuf());
-   theTile->validate();
-   
-   return theTile;
-}
-
-void ossimSFIMFusion::initialize()
-{
-   ossimFusionCombiner::initialize();
-   if(!theIntensityConnection)
-   {
-      theLowPassFilter->disconnectAllInputs();
-      theHighPassFilter->disconnectAllInputs();
-   }
-   else
-   {
-      theLowPassFilter->connectMyInputTo(0, PTR_CAST(ossimConnectableObject,
-                                                     theIntensityConnection->getObject()));
-      theHighPassFilter->connectMyInputTo(0, PTR_CAST(ossimConnectableObject,
-                                                      theIntensityConnection->getObject()));
-      adjustableParametersChanged();
-      setFilters();
-      theLowPassFilter->initialize();
-      theHighPassFilter->initialize();
-      if(theAutoAdjustScales)
-      {
-         if(theInputConnection && theIntensityConnection)
-         {
-            ossimTypeNameVisitor visitor("ossimImageRenderer", true);
-            
-            theInputConnection->accept(visitor);
-            ossimRefPtr<ossimConnectableObject> inputColor = visitor.getObjectAs<ossimConnectableObject>();
-            visitor.reset();
-            theIntensityConnection->accept(visitor);
-            ossimRefPtr<ossimConnectableObject> inputPan = visitor.getObjectAs<ossimConnectableObject>();
-            
-            
-            if(inputColor.valid()&&inputPan.valid())
-            {
-               ossimImageSource* inputColorSource = dynamic_cast<ossimImageSource*> (inputColor->getInput());
-               ossimImageSource* inputPanSource = dynamic_cast<ossimImageSource*> (inputPan->getInput());
-               
-               if(inputColorSource&&inputPanSource)
-               {
-                  ossimRefPtr<ossimImageGeometry> colorGeom     = inputColorSource->getImageGeometry();
-                  ossimRefPtr<ossimImageGeometry> intensityGeom = inputPanSource->getImageGeometry();
-                  if(colorGeom.valid()&&intensityGeom.valid())
-                  {
-                     ossimDpt gsdIntensity = intensityGeom->getMetersPerPixel();
-                     ossimDpt gsdColor     = colorGeom->getMetersPerPixel();
-                     if(!gsdColor.hasNans()&&!gsdIntensity.hasNans())
-                     {
-                        double scaleChange = gsdColor.length()/gsdIntensity.length();
-                        if(scaleChange < 1.0) scaleChange = 1.0;
-                        setParameterOffset(LOW_PASS_WIDTH_OFFSET,
-                                           scaleChange);
-                     }
-                  }
-               }
-            }
-         }
-      }
-   }
-}
-
-void ossimSFIMFusion::setFilters()
-{
-   theLowPassFilter->setGaussStd(theLowPassKernelWidth);
-   
-   theHighPassMatrix = NEWMAT::Matrix(theHighPassKernelWidth, theHighPassKernelWidth);
-   theHighPassMatrix = 0;
-   theHighPassMatrix[theHighPassKernelWidth>>1][theHighPassKernelWidth>>1] = 1;
-   
-   // adjust the gain for the high pass filter
-   //
-   NEWMAT::Matrix high =  theHighPassMatrix;
-
-   ossim_float64 kernelW2 = theHighPassKernelWidth*theHighPassKernelWidth;
-   double gain = computeParameterOffset(HIGH_PASS_GAIN_OFFSET)*(kernelW2);
-   double multiplier = gain/(kernelW2);
-   high = -multiplier;
-   ossim_int32 cx = theHighPassKernelWidth>>1;
-   ossim_int32 cy = theHighPassKernelWidth>>1;
-
-   if(gain > FLT_EPSILON)
-   {
-      high[cy][cx] = multiplier* ( (kernelW2-1)+kernelW2/gain);
-   }
-   else
-   {
-      high = 0.0;
-      high[cy][cx] = 1.0;
-   }
-
-   theHighPassFilter->setConvolution(high);
-}
-
-void ossimSFIMFusion::initAdjustableParameters()
-{
-   resizeAdjustableParameterArray(NUMBER_OF_ADJUSTABLE_PARAMETERS);
-
-   setAdjustableParameter(HIGH_PASS_GAIN_OFFSET,
-                          -1.0);
-   setParameterDescription(HIGH_PASS_GAIN_OFFSET,
-                           "High pass gain");
-   setParameterSigma(HIGH_PASS_GAIN_OFFSET,
-                     1);
-   setParameterCenter(HIGH_PASS_GAIN_OFFSET,
-                      1.0);
-
-   setAdjustableParameter(LOW_PASS_WIDTH_OFFSET,
-                          -1);
-   setParameterDescription(LOW_PASS_WIDTH_OFFSET,
-                           "Low pass kernel width");
-   setParameterSigma(LOW_PASS_WIDTH_OFFSET,
-                     40);
-   setParameterCenter(LOW_PASS_WIDTH_OFFSET,
-                      40.5);
-   
-
-   setParameterOffset(LOW_PASS_WIDTH_OFFSET,
-                      1.5);
-}
-
-void ossimSFIMFusion::adjustableParametersChanged()
-{
-//   std::cout << "Parameter offset = " << computeParameterOffset(2) << std::endl;
-   theLowPassKernelWidth = (ossim_uint32)(ossim::round<int>(computeParameterOffset(LOW_PASS_WIDTH_OFFSET)));
-}
-
-void ossimSFIMFusion::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   ossimString name = property->getName();
-   if(name=="low_pass_kernel_width")
-   {
-      setParameterOffset(LOW_PASS_WIDTH_OFFSET,
-                         property->valueToString().toDouble(),
-                         true);
-   }
-   else if(name=="high_pass_gain")
-   {
-      setParameterOffset(HIGH_PASS_GAIN_OFFSET,
-                         property->valueToString().toDouble(),
-                         true);
-   }
-   else if(name=="auto_adjust_scales")
-   {
-      theAutoAdjustScales =  property->valueToString().toBool();
-   }
-   else
-   {
-      ossimFusionCombiner::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimSFIMFusion::getProperty(const ossimString& name)const
-{
-   if(name == "low_pass_kernel_width")
-   {
-      ossimNumericProperty* prop =  new ossimNumericProperty(name, 
-                                      ossimString::toString(computeParameterOffset(LOW_PASS_WIDTH_OFFSET)),
-                                      getParameterCenter(LOW_PASS_WIDTH_OFFSET)-getParameterSigma(LOW_PASS_WIDTH_OFFSET),
-                                      getParameterCenter(LOW_PASS_WIDTH_OFFSET)+getParameterSigma(LOW_PASS_WIDTH_OFFSET));
-      prop->setCacheRefreshBit();
-      return prop;
-   }
-   else if(name == "high_pass_gain")
-   {
-      ossimNumericProperty* prop =  new ossimNumericProperty(name, 
-                                      ossimString::toString(computeParameterOffset(HIGH_PASS_GAIN_OFFSET)),
-                                      getParameterCenter(HIGH_PASS_GAIN_OFFSET)-getParameterSigma(HIGH_PASS_GAIN_OFFSET),
-                                      getParameterCenter(HIGH_PASS_GAIN_OFFSET)+getParameterSigma(HIGH_PASS_GAIN_OFFSET));
-      prop->setCacheRefreshBit();
-      return prop;
-   }
-   else if(name=="auto_adjust_scales")
-   {
-      ossimBooleanProperty* prop = new ossimBooleanProperty(name,theAutoAdjustScales);
-      prop->setCacheRefreshBit();
-      return prop;
-   }
-   
-   return ossimFusionCombiner::getProperty(name);
-}
-
-void ossimSFIMFusion::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimFusionCombiner::getPropertyNames(propertyNames);
-   propertyNames.push_back("low_pass_kernel_width");
-   propertyNames.push_back("high_pass_gain");
-   propertyNames.push_back("auto_adjust_scales");
-}
-
-bool ossimSFIMFusion::saveState(ossimKeywordlist& kwl,
-                                            const char* prefix) const
-{
-   ossimFusionCombiner::saveState(kwl, prefix);
-   saveAdjustments(kwl, prefix);
-   kwl.add(prefix,
-           "auto_adjust_scales",
-           theAutoAdjustScales,
-           true);
-   
-   return true;
-}
-
-bool ossimSFIMFusion::loadState(const ossimKeywordlist& kwl,
-                                            const char* prefix)
-{
-   ossimFusionCombiner::loadState(kwl, prefix);
-   loadAdjustments(kwl, prefix);
-   adjustableParametersChanged();
-   ossimString autoAdjustScales = kwl.find(prefix, "auto_adjust_scales");
-                                    
-   if(!autoAdjustScales.empty())
-   {
-      theAutoAdjustScales = autoAdjustScales.toBool();
-   }
-   return true;
-}
diff --git a/src/ossim/imaging/ossimScaleFilter.cpp b/src/ossim/imaging/ossimScaleFilter.cpp
deleted file mode 100644
index e0b753d..0000000
--- a/src/ossim/imaging/ossimScaleFilter.cpp
+++ /dev/null
@@ -1,959 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimScaleFilter.cpp 21631 2012-09-06 18:10:55Z dburken $
-#include <ossim/imaging/ossimScaleFilter.h>
-#include <ossim/imaging/ossimFilter.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimDiscreteConvolutionKernel.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/base/ossimKeywordNames.h>
-
-RTTI_DEF1(ossimScaleFilter, "ossimScaleFilter", ossimImageSourceFilter);
-
-//**************************************************************************************************
-ossimScaleFilter::ossimScaleFilter()
-   :ossimImageSourceFilter(),
-    m_BlankTile(NULL),
-    m_Tile(NULL),
-    m_MinifyFilter(NULL),
-    m_MagnifyFilter(NULL),
-    m_MinifyFilterType(ossimScaleFilter_NEAREST_NEIGHBOR),
-    m_MagnifyFilterType(ossimScaleFilter_NEAREST_NEIGHBOR),
-    m_ScaleFactor(1.0, 1.0),
-    m_InverseScaleFactor(1.0, 1.0),
-    m_TileSize(64, 64),
-    m_BlurFactor(1.0)
-{
-   m_InputRect.makeNan();
-   m_MinifyFilter  = new ossimNearestNeighborFilter();
-   m_MagnifyFilter = new ossimNearestNeighborFilter();
-}
-
-//**************************************************************************************************
-ossimScaleFilter::ossimScaleFilter(ossimImageSource* inputSource,
-                                   const ossimDpt& scaleFactor)
-   :ossimImageSourceFilter(inputSource),
-    m_BlankTile(NULL),
-    m_Tile(NULL),
-    m_MinifyFilter(NULL),
-    m_MagnifyFilter(NULL),
-    m_MinifyFilterType(ossimScaleFilter_NEAREST_NEIGHBOR),
-    m_MagnifyFilterType(ossimScaleFilter_NEAREST_NEIGHBOR),
-    m_ScaleFactor(scaleFactor),
-    m_TileSize(64, 64),
-    m_BlurFactor(1.0)
-{
-   m_InputRect.makeNan();
-   m_MinifyFilter  = new ossimNearestNeighborFilter();
-   m_MagnifyFilter = new ossimNearestNeighborFilter();
-}
-
-//**************************************************************************************************
-ossimScaleFilter::~ossimScaleFilter()
-{
-   if(m_MinifyFilter)
-   {
-      delete m_MinifyFilter;
-      m_MinifyFilter = NULL;
-   }
-   
-   if(m_MagnifyFilter)
-   {
-      delete m_MagnifyFilter;
-      m_MagnifyFilter = NULL;
-   }
-}
-
-//**************************************************************************************************
-ossimRefPtr<ossimImageData> ossimScaleFilter::getTile(
-   const ossimIrect& tileRect, ossim_uint32 resLevel)
-{
-   
-   if((!isSourceEnabled())||
-      (!theInputConnection)||
-      ((m_ScaleFactor.x == 1.0)&&
-       (m_ScaleFactor.y == 1.0)&&
-       (m_BlurFactor == 1.0)))
-   {
-      return ossimImageSourceFilter::getTile(tileRect, resLevel);
-   }
-   if(!m_Tile.valid())
-   {
-      allocate();
-   }
-
-   if(!m_Tile)
-   {
-      return ossimImageSourceFilter::getTile(tileRect, resLevel);
-   }
-
-   m_Tile->makeBlank();
-
-                       
-   ossimIrect imageRect = tileRect*m_InverseScaleFactor;
-
-   m_Tile->setImageRectangle(tileRect);
-   m_BlankTile->setImageRectangle(tileRect);
-
-
-   double xSupport;
-   double ySupport;
-
-   getSupport(xSupport, ySupport);
-   
-   ossimIpt deltaPt;
-   deltaPt.x = (ossim_int32)ceil(xSupport);
-   deltaPt.y = (ossim_int32)ceil(ySupport);
-
-   imageRect = ossimIrect(imageRect.ul().x - (deltaPt.x),
-                          imageRect.ul().y - (deltaPt.y),
-                          imageRect.lr().x + (deltaPt.x),
-                          imageRect.lr().y + (deltaPt.y));
-
-   
-   runFilter(imageRect, tileRect);
-   
-   m_Tile->validate();
-   
-   return m_Tile;
-}
-
-//**************************************************************************************************
-void ossimScaleFilter::runFilter(const ossimIrect& imageRect,
-                                 const ossimIrect& viewRect)
-{
-   switch(m_Tile->getScalarType())
-   {
-      case OSSIM_UINT8:
-      {
-         runFilterTemplate((ossim_uint8)0,
-                           imageRect,
-                           viewRect);
-         break;
-      }
-      case OSSIM_USHORT11:
-      case OSSIM_UINT16:
-      {
-         runFilterTemplate((ossim_uint16)0,
-                           imageRect,
-                           viewRect);
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         runFilterTemplate((ossim_sint16)0,
-                           imageRect,
-                           viewRect);
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         runFilterTemplate((ossim_uint32)0,
-                           imageRect,
-                           viewRect);
-         break;
-      }
-      case OSSIM_DOUBLE:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         runFilterTemplate((ossim_float64)0,
-                           imageRect,
-                           viewRect);
-         break;
-      }
-      case OSSIM_FLOAT:
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         runFilterTemplate((ossim_float32)0,
-                           imageRect,
-                           viewRect);
-         break;
-      }
-      default:
-         break;
-   }
-}
-
-//**************************************************************************************************
-template <class T>
-void ossimScaleFilter::runFilterTemplate(T dummy,
-                                         const ossimIrect& imageRect,
-                                         const ossimIrect& viewRect)
-{
-   ossimRefPtr<ossimImageData> inputData =
-      theInputConnection->getTile(imageRect);
-
-   if(!inputData.valid()   ||
-      !inputData->getBuf() ||
-      (inputData->getDataObjectStatus() == OSSIM_EMPTY))
-   {
-      return;
-   }
-
-   ossim_int32 h = imageRect.height();
-   ossimRefPtr<ossimImageData> tempData =
-      ossimImageDataFactory::instance()->create(NULL,
-                                                inputData->getScalarType(),
-                                                inputData->getNumberOfBands(),
-                                                viewRect.width(),
-                                                h);
-   tempData->setOrigin(ossimIpt(viewRect.ul().x,
-                                imageRect.ul().y));
-   
-   tempData->initialize();
-   
-   if((m_ScaleFactor.x != 1.0)||
-      (m_BlurFactor != 1.0))
-   {
-      runHorizontalFilterTemplate(dummy,
-                                  inputData,
-                                  tempData);
-      tempData->validate();
-   }
-   else
-   {
-      tempData->loadTile(inputData.get());
-   }
-   
-   if((m_ScaleFactor.y != 1.0)||
-      (m_BlurFactor != 1.0))
-   {
-      runVerticalFilterTemplate(dummy,
-                                tempData,
-                                m_Tile);
-   }
-   else
-   {
-      m_Tile->loadTile(tempData.get());
-   }
-   
-   m_Tile->validate();
-}
-
-//**************************************************************************************************
-ossimIrect ossimScaleFilter::getBoundingRect(ossim_uint32 resLevel)const
-{
-   ossimIrect result = ossimImageSourceFilter::getBoundingRect(resLevel);
-
-   if(!result.hasNans())
-   {
-      result = ossimIrect(result.ul().x,
-                          result.ul().y,
-                          result.lr().x+1,
-                          result.lr().y+1);
-      result *= m_ScaleFactor;
-   }
-   
-   return result;
-}
-
-//**************************************************************************************************
-void ossimScaleFilter::setFilterType(ossimScaleFilterType filterType)
-{
-   setFilterType(filterType, filterType);
-}
-
-
-//**************************************************************************************************
-void ossimScaleFilter::setFilterType(ossimScaleFilterType minifyFilterType,
-                                     ossimScaleFilterType magnifyFilterType)
-{
-   if(m_MinifyFilter)
-   {
-      delete m_MinifyFilter;
-      m_MinifyFilter = NULL;
-   }
-   if(m_MagnifyFilter)
-   {
-      delete m_MagnifyFilter;
-      m_MagnifyFilter = NULL;
-   }
-   
-   m_MinifyFilterType  = minifyFilterType;
-   m_MagnifyFilterType = magnifyFilterType;
-   
-   m_MinifyFilter  = createNewFilter(minifyFilterType, m_MinifyFilterType);
-   m_MagnifyFilter = createNewFilter(magnifyFilterType, m_MagnifyFilterType);
-}
-
-//**************************************************************************************************
-ossimFilter* ossimScaleFilter::createNewFilter(ossimScaleFilterType filterType,
-                                               ossimScaleFilterType& result)
-{
-   switch(filterType)
-   {
-   case ossimScaleFilter_NEAREST_NEIGHBOR:
-   {
-      return new ossimNearestNeighborFilter();
-   }
-   case ossimScaleFilter_BOX:
-   {
-      return new ossimBoxFilter();
-   }
-   case ossimScaleFilter_GAUSSIAN:
-   {
-      return new ossimGaussianFilter();
-   }
-   case ossimScaleFilter_CUBIC:
-   {
-      return new ossimCubicFilter();
-   }
-   case ossimScaleFilter_HANNING:
-   {
-      return new ossimHanningFilter();
-   }
-   case ossimScaleFilter_HAMMING:
-   {
-      return new ossimHammingFilter();
-   }
-   case ossimScaleFilter_LANCZOS:
-   {
-      return new ossimLanczosFilter();
-   }
-   case ossimScaleFilter_CATROM:
-   {
-      return new ossimCatromFilter();
-   }
-   case ossimScaleFilter_MITCHELL:
-   {
-      return new ossimMitchellFilter();
-   }
-   case ossimScaleFilter_BLACKMAN:
-   {
-      return new ossimBlackmanFilter();
-   }
-   case ossimScaleFilter_BLACKMAN_SINC:
-   {
-      return new ossimBlackmanSincFilter();
-   }
-   case ossimScaleFilter_BLACKMAN_BESSEL:
-   {
-      return new ossimBlackmanBesselFilter();
-   }
-   case ossimScaleFilter_QUADRATIC:
-   {
-      return new ossimQuadraticFilter();
-   }
-   case ossimScaleFilter_TRIANGLE:
-   {
-      return new ossimTriangleFilter();
-   }
-   case ossimScaleFilter_HERMITE:
-   {
-      return new ossimHermiteFilter();
-   }
-   
-   }
-
-   result = ossimScaleFilter_NEAREST_NEIGHBOR;
-   return new ossimNearestNeighborFilter();
-}
-
-//**************************************************************************************************
-void ossimScaleFilter::setScaleFactor(const ossimDpt& scale)
-{
-   m_ScaleFactor = scale;
-   if(fabs(m_ScaleFactor.x) <= FLT_EPSILON)
-   {
-      m_ScaleFactor.x = 1.0;
-   }
-   if(fabs(m_ScaleFactor.y) <= FLT_EPSILON)
-   {
-      m_ScaleFactor.y = 1.0;
-   }
-
-   m_InverseScaleFactor.x = 1.0/m_ScaleFactor.x;
-   m_InverseScaleFactor.y = 1.0/m_ScaleFactor.y;
-
-   // A change in the scale factor implies a change to the image geometry. If one has been created
-   // it needs to be modified:
-   updateGeometry();
-}
-
-
-//**************************************************************************************************
-template <class T> void ossimScaleFilter::runHorizontalFilterTemplate(
-   T /* dummy */,
-   const ossimRefPtr<ossimImageData>& input,
-   ossimRefPtr<ossimImageData>& output)
-{
-   ossimIrect viewRect  = output->getImageRectangle();
-   ossimIrect imageRect = input->getImageRectangle();
-   ossim_int32 vw = viewRect.width();
-   ossim_int32 vh = viewRect.height();
-   ossim_int32 iw = imageRect.width();
-   ossimIpt origin(viewRect.ul());
-   ossimIpt imageOrigin(imageRect.ul());
-   ossimIpt inputUl = m_InputRect.ul();
-   ossimIpt inputLr = m_InputRect.lr();
-   
-   double scale = 0.0;
-   double support = 0.0;
-   ossim_int32 x = 0;
-   ossim_int32 y = 0;
-   ossim_int32 start = 0;
-   ossim_int32 stop  = 0;
-   ossim_int32 kernelIdx = 0;
-   const ossimFilter* filter = getHorizontalFilter();
-   ossim_float64 center = 0.0;
-   ossim_int32 bandIdx = 0;
-   ossim_int32 numberOfBands = m_Tile->getNumberOfBands();
-   
-   scale = m_BlurFactor*ossim::max(1.0/m_ScaleFactor.x, 1.0);
-   
-   support=scale*filter->getSupport();
-   if (support <= 0.5)
-   {
-      support = 0.5 + FLT_EPSILON;
-      scale = 1.0;
-   }
-   scale=1.0/scale;
-   for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
-   {
-      T* imageBuf = (T*)input->getBuf(bandIdx);
-      T* viewBuf  = (T*)output->getBuf(bandIdx);
-      T np        = (T)input->getNullPix(bandIdx);
-      T outNp     = (T)output->getNullPix(bandIdx);
-      T outMinPix = (T)output->getMinPix(bandIdx);
-      T outMaxPix = (T)output->getMaxPix(bandIdx);
-      
-      for(x = 0; x < vw; ++x)
-      {
-         center=(origin.x + x+ .5)/m_ScaleFactor.x;
-         start=ossim::max((ossim_int32)ossim::round<int>(center-support), (ossim_int32)inputUl.x);
-         stop=ossim::min((ossim_int32)ossim::round<int>(center+support), (ossim_int32)inputLr.x);
-         ossim_int32 delta = stop-start;
-         if (delta <= 0)
-         {
-            break;
-         }
-         vector<double> kernel(delta);
-         double density=0.0;
-         
-         for(kernelIdx = 0; kernelIdx < delta; ++kernelIdx)
-         {
-            double t = scale*(start + kernelIdx -
-                              center + .5);
-            kernel[kernelIdx] = filter->filter(t,
-                                               filter->getSupport());
-            density += kernel[kernelIdx];
-         }
-         if ((density != 0.0) && (density != 1.0))
-         {
-            /*
-              Normalize.
-            */
-            density=1.0/density;
-            for (kernelIdx=0; kernelIdx < delta; kernelIdx++)
-               kernel[kernelIdx]*=density;
-         }
-         ossim_int32 offset       = start  - imageOrigin.x;
-         
-         T* xptr         = imageBuf + offset;
-         T* xCenterptr   = imageBuf + offset;
-         T* outptr       = viewBuf  + x;
-         
-         for(y = 0; y < vh; ++y)
-         {
-            double result = 0.0;
-            density = 0.0;
-            if((*xCenterptr) == np)
-            {
-               *outptr = outNp;
-            }
-            else
-            {
-               for(kernelIdx = 0; kernelIdx < (int)kernel.size(); ++kernelIdx)
-               {
-                  if((*xptr != np)&&
-                     (kernel[kernelIdx] != 0.0))
-                  {
-                     result  += ((double)(*(xptr+kernelIdx))*kernel[kernelIdx]);
-                     density += kernel[kernelIdx];
-                  }
-               }
-               if(density != 0.0)
-               {
-                  result /= density;
-                  
-                  if(result < outMinPix) result = outMinPix;
-                  if(result > outMaxPix) result = outMaxPix;
-                  
-                  *outptr = (T)result;
-               }
-               else
-               {
-                  *outptr = outNp;
-               }
-            }
-            xCenterptr += iw;
-            xptr   += iw;
-            outptr += vw;
-         }
-      }
-   }
-}
-
-//**************************************************************************************************
-template <class T> void ossimScaleFilter::runVerticalFilterTemplate(
-   T /* dummy */,
-   const ossimRefPtr<ossimImageData>& input,
-   ossimRefPtr<ossimImageData>& output)
-{
-   ossimIrect viewRect  = output->getImageRectangle();
-   ossimIrect imageRect = input->getImageRectangle();
-   ossim_int32 vw = viewRect.width();
-   ossim_int32 vh = viewRect.height();
-   ossim_int32 iw = imageRect.width();
-   ossimIpt origin(viewRect.ul());
-   ossimIpt imageOrigin(imageRect.ul());
-   ossimIpt inputUl = m_InputRect.ul();
-   ossimIpt inputLr = m_InputRect.lr();
-   double scale = 0.0;
-   double support = 0.0;
-   ossim_int32 x = 0;
-   ossim_int32 y = 0;
-   ossim_int32 start = 0;
-   ossim_int32 stop  = 0;
-   ossim_int32 kernelIdx = 0;
-   const ossimFilter* filter = getVerticalFilter();
-   ossim_float64 center = 0.0;
-   ossim_int32 bandIdx = 0;
-   ossim_int32 numberOfBands = m_Tile->getNumberOfBands();
-   
-   scale = m_BlurFactor*ossim::max(1.0/m_ScaleFactor.y, 1.0);
-   
-   support=scale*filter->getSupport();
-   if (support <= 0.5)
-   {
-      support = .5 + FLT_EPSILON;
-      scale = 1.0;
-   }
-   scale=1.0/scale;
-
-   for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
-   {
-      T* imageBuf = (T*)input->getBuf(bandIdx);
-      T* viewBuf  = (T*)output->getBuf(bandIdx);
-      T np        = (T)input->getNullPix(bandIdx);
-      T outNp     = (T)output->getNullPix(bandIdx);
-      T outMinPix = (T)output->getMinPix(bandIdx);
-      T outMaxPix = (T)output->getMaxPix(bandIdx);
-     
-      for(y = 0; y < vh; ++y)
-      {
-         center=(double) ((y + origin.y+0.5)/m_ScaleFactor.y);
-         start=ossim::max((ossim_int32)ossim::round<int>(center-support), (ossim_int32)inputUl.y);
-         stop=ossim::min((ossim_int32)ossim::round<int>(center+support), (ossim_int32)inputLr.y);
-         ossim_int32 delta = stop-start;
-         if (delta <= 0)
-         {
-            break;
-         }
-         vector<double> kernel(delta);
-         double density = 0.0;
-         for(kernelIdx = 0; kernelIdx < delta; ++kernelIdx)
-         {
-            kernel[kernelIdx] = filter->filter(scale*(start + kernelIdx - center + .5),
-                                               filter->getSupport());
-            density += kernel[kernelIdx];
-         }
-         if ((density != 0.0) && (density != 1.0))
-         {
-            /*
-              Normalize.
-            */
-            density=1.0/density;
-            for (kernelIdx=0; kernelIdx < delta; kernelIdx++)
-               kernel[kernelIdx]*=density;
-         }
-
-         ossim_int32 offset       = ((start  - imageOrigin.y)*iw);
-         ossim_int32 offsetCenter = ((((ossim_int32)center) - imageOrigin.y)*iw);
-        
-         for(x = 0; x < vw; ++x)
-         {
-            T* yptr         = imageBuf + offset       + x;
-            T* yCenterptr   = imageBuf + offsetCenter + x;
-            double result = 0.0;
-            density = 0.0;
-
-            if((*yCenterptr) == np)
-            {
-               *viewBuf = outNp;
-            }
-            else
-            {
-               for(kernelIdx = 0; kernelIdx < delta; ++kernelIdx)
-               {
-                  if((*yptr != np)&&
-                     (kernel[kernelIdx] != 0.0))
-                  {
-                     result  += ((*yptr)*kernel[kernelIdx]);
-                     density += kernel[kernelIdx];
-                  }
-                  yptr += iw;
-               }
-               if(density != 0.0)
-               {
-                  result /= density;
-                 
-                  if(result < outMinPix) result = outMinPix;
-                  if(result > outMaxPix) result = outMaxPix;
-                 
-                  *viewBuf = (T)result;
-               }
-               else
-               {
-                  *viewBuf = outNp;
-               }
-            }
-            ++viewBuf;
-         }
-      }
-   }
-}
-
-//**************************************************************************************************
-void ossimScaleFilter::initialize()
-{
-   ossimImageSourceFilter::initialize();
-
-   // Force an allocate next getTile.
-   m_Tile = NULL;
-   m_BlankTile = NULL;
-   m_InputRect.makeNan();
-}
-
-//**************************************************************************************************
-void ossimScaleFilter::allocate()
-{
-   m_Tile      = NULL;
-   m_BlankTile = NULL;
-   m_InputRect.makeNan();
-
-   if(theInputConnection&&isSourceEnabled())
-   {
-      m_Tile      = ossimImageDataFactory::instance()->create(this, this);
-      m_BlankTile = ossimImageDataFactory::instance()->create(this, this);
-      
-      m_Tile->initialize();
-
-      m_InputRect = theInputConnection->getBoundingRect();
-   }
-}
-
-//**************************************************************************************************
-// Returns a pointer reference to the active image geometry at this filter. The input source
-// geometry is modified, so we need to maintain our own geometry object as a data member.
-//**************************************************************************************************
-ossimRefPtr<ossimImageGeometry> ossimScaleFilter::getImageGeometry()
-{
-   // Have we already defined our own geometry? Return it if so:
-   if (m_ScaledGeometry.valid()) return m_ScaledGeometry;
-
-   // Otherwise we'll need to establish a geometry based on the input connection:
-   if(theInputConnection)
-   {
-      // Fetch the map projection of the input image if it exists:
-      ossimRefPtr<ossimImageGeometry> inputGeom = theInputConnection->getImageGeometry();
-
-      // If trivial case of identity scale, just pass along the input connection's geometry:
-      if ((m_ScaleFactor.x == 1.0) && (m_ScaleFactor.y == 1.0))
-         return inputGeom;
-
-      // Need to create a copy of the input geom and modify it as our own, then pass that:
-      if ( inputGeom.valid() )
-      {
-         m_ScaledGeometry = new ossimImageGeometry(*inputGeom);
-         updateGeometry();
-
-         // Return the modified geometry:
-         return m_ScaledGeometry;
-      }
-   }
-
-   // No geometry defined, return NULL pointer:
-   return ossimRefPtr<ossimImageGeometry>();
-}
-
-//**************************************************************************************************
-ossimIrect ossimScaleFilter::scaleRect(const ossimIrect input,
-                                       const ossimDpt& scaleFactor)const
-{
-   ossimIpt origin(ossim::round<int>(input.ul().x*scaleFactor.x),
-                   ossim::round<int>(input.ul().y*scaleFactor.y));
-   ossim_int32 w = ossim::round<int>(input.width()*scaleFactor.x);
-   ossim_int32 h = ossim::round<int>(input.height()*scaleFactor.y);
-
-   if(w < 1) w = 1;
-   if(h < 1) h = 1;
-   
-   return ossimIrect(origin.x,
-                     origin.y,
-                     origin.x + (w-1),
-                     origin.y + (h-1));
-}
-
-//**************************************************************************************************
-ossimString ossimScaleFilter::getFilterTypeAsString(ossimScaleFilterType type)const
-{
-   switch(type)
-   {
-   case ossimScaleFilter_NEAREST_NEIGHBOR:
-   {
-      return "nearest_neighbor";
-   }
-   case ossimScaleFilter_BOX:
-   {
-      return "box";
-   }
-   case ossimScaleFilter_GAUSSIAN:
-   {
-      return "gaussian";
-   }
-   case ossimScaleFilter_CUBIC:
-   {
-      return "cubic";
-   }
-   case ossimScaleFilter_HANNING:
-   {
-      return "hanning";
-   }
-   case ossimScaleFilter_HAMMING:
-   {
-      return "hamming";
-   }
-   case ossimScaleFilter_LANCZOS:
-   {
-      return "lanczos";
-   }
-   case ossimScaleFilter_MITCHELL:
-   {
-      return "mitchell";
-   }
-   case ossimScaleFilter_CATROM:
-   {
-      return "catrom";
-   }
-   case ossimScaleFilter_BLACKMAN:
-   {
-      return "blackman";
-   }
-   case ossimScaleFilter_BLACKMAN_SINC:
-   {
-      return "blackman_sinc";
-   }
-   case ossimScaleFilter_BLACKMAN_BESSEL:
-   {
-      return "blackman_bessel";
-   }
-   case ossimScaleFilter_QUADRATIC:
-   {
-      return "quadratic";
-   }
-   case ossimScaleFilter_TRIANGLE:
-   {
-      return "triangle";
-   }
-   case ossimScaleFilter_HERMITE:
-   {
-      return "hermite";
-   }
-   }
-
-   return "nearest_neighbor";
-}
-
-//**************************************************************************************************
-ossimScaleFilter::ossimScaleFilterType ossimScaleFilter::getFilterType(const ossimString& type)const
-{
-   ossimString typeUpper = type;
-   typeUpper = typeUpper.upcase();
-
-   if(typeUpper.contains("BOX"))
-   {
-      return ossimScaleFilter_BOX;
-   }
-   else if(typeUpper.contains("NEAREST_NEIGHBOR"))
-   {
-      return ossimScaleFilter_NEAREST_NEIGHBOR;
-   }
-   else if(typeUpper.contains("GAUSSIAN"))
-   {
-      return ossimScaleFilter_GAUSSIAN;
-   }
-   else if(typeUpper.contains("HANNING"))
-   {
-      return ossimScaleFilter_HANNING;
-   }
-   else if(typeUpper.contains("HAMMING"))
-   {
-      return ossimScaleFilter_HAMMING;
-   }
-   else if(typeUpper.contains("LANCZOS"))
-   {
-      return ossimScaleFilter_LANCZOS;
-   }
-   else if(typeUpper.contains("MITCHELL"))
-   {
-      return ossimScaleFilter_MITCHELL;
-   }
-   else if(typeUpper.contains("CATROM"))
-   {
-      return ossimScaleFilter_CATROM;
-   }
-   else if(typeUpper.contains("CUBIC"))
-   {
-      return ossimScaleFilter_CUBIC;
-   }
-   else if(typeUpper.contains("BLACKMAN_BESSEL"))
-   {
-      return ossimScaleFilter_BLACKMAN_BESSEL;
-   }
-   else if(typeUpper.contains("BLACKMAN_SINC"))
-   {
-      return ossimScaleFilter_BLACKMAN_SINC;
-   }
-   else if(typeUpper.contains("BLACKMAN"))
-   {
-      return ossimScaleFilter_BLACKMAN;
-   }
-   else if(typeUpper.contains("QUADRATIC"))
-   {
-      return ossimScaleFilter_QUADRATIC;
-   }
-   else if(typeUpper.contains("TRIANGLE"))
-   {
-      return ossimScaleFilter_TRIANGLE;
-   }
-   else if(typeUpper.contains("HERMITE"))
-   {
-      return ossimScaleFilter_HERMITE;
-   }
-   
-   return ossimScaleFilter_NEAREST_NEIGHBOR;
-}
-
-//**************************************************************************************************
-void ossimScaleFilter::getSupport(double& x, double& y)
-{
-   const ossimFilter* horizontalFilter = getHorizontalFilter();
-   const ossimFilter* verticalFilter   = getVerticalFilter();
-   
-   x = m_BlurFactor*ossim::max(1.0/m_ScaleFactor.x, 1.0)*
-       horizontalFilter->getSupport();
-   y = m_BlurFactor*ossim::max(1.0/m_ScaleFactor.y, 1.0)*
-       verticalFilter->getSupport();
-}
-
-//**************************************************************************************************
-const ossimFilter* ossimScaleFilter::getHorizontalFilter()const
-{
-   if(m_ScaleFactor.x < 1)
-   {
-      return m_MinifyFilter;
-   }
-
-   return m_MagnifyFilter;
-}
-
-//**************************************************************************************************
-const ossimFilter* ossimScaleFilter::getVerticalFilter()const
-{
-   if(m_ScaleFactor.y < 1)
-   {
-      return m_MinifyFilter;
-   }
-
-   return m_MagnifyFilter;
-}
-
-
-
-//**************************************************************************************************
-bool ossimScaleFilter::saveState(ossimKeywordlist& kwl, const char* prefix)const
-{
-   kwl.add(prefix,
-           ossimKeywordNames::SCALE_X_KW,
-           m_ScaleFactor.x,
-           true);
-   kwl.add(prefix,
-           ossimKeywordNames::SCALE_Y_KW,
-           m_ScaleFactor.y,
-           true);
-   kwl.add(prefix,
-           "minify_type",
-           getFilterTypeAsString(m_MinifyFilterType),
-           true);
-   kwl.add(prefix,
-           "magnify_type",
-           getFilterTypeAsString(m_MagnifyFilterType),
-           true);
-   
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
-
-//**************************************************************************************************
-bool ossimScaleFilter::loadState(const ossimKeywordlist& kwl,
-                                 const char* prefix)
-{
-   ossimString scalex  = kwl.find(prefix,
-                                 ossimKeywordNames::SCALE_X_KW);
-   ossimString scaley  = kwl.find(prefix,
-                                  ossimKeywordNames::SCALE_Y_KW);
-   ossimString minify  = kwl.find(prefix,
-                                  "minify_type");
-   ossimString magnify = kwl.find(prefix,
-                                  "magnify_type");
-   
-   m_ScaleFactor.x = scalex.toDouble();
-   m_ScaleFactor.y = scaley.toDouble();
-
-   if(fabs(m_ScaleFactor.x) <= FLT_EPSILON)
-   {
-      m_ScaleFactor.x = 1.0;
-   }
-   if(fabs(m_ScaleFactor.y) <= FLT_EPSILON)
-   {
-      m_ScaleFactor.y = 1.0;
-   }
-
-   m_InverseScaleFactor.x = 1.0/m_ScaleFactor.x;
-   m_InverseScaleFactor.y = 1.0/m_ScaleFactor.y;
-   
-   setFilterType(getFilterType(minify),
-                 getFilterType(magnify));
-   
-   // A change in the scale factor implies a change to the image geometry. If one has been created
-   // it needs to be modified:
-   updateGeometry();
-
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
-
-//**************************************************************************************************
-//! If this object is maintaining an ossimImageGeometry, this method needs to be called after 
-//! a scale change so that the geometry's projection is modified accordingly.
-//**************************************************************************************************
-void ossimScaleFilter::updateGeometry()
-{
-   if (m_ScaledGeometry.valid())
-   {
-      // Modify the image geometry's projection with the scale factor before returning geom:
-      ossimProjection* proj = m_ScaledGeometry->getProjection();
-      ossimMapProjection* mapProj = PTR_CAST(ossimMapProjection, proj);
-      if(mapProj)
-         mapProj->applyScale(m_InverseScaleFactor, true);
-   }
-}
diff --git a/src/ossim/imaging/ossimSingleImageChain.cpp b/src/ossim/imaging/ossimSingleImageChain.cpp
deleted file mode 100644
index 48d8bf5..0000000
--- a/src/ossim/imaging/ossimSingleImageChain.cpp
+++ /dev/null
@@ -1,766 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Utility class definition for a single image chain.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/imaging/ossimSingleImageChain.h>
-
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/support_data/ossimSrcRecord.h>
-
-ossimSingleImageChain::ossimSingleImageChain()
-   :
-   ossimImageChain(),
-   m_handler(0),
-   m_bandSelector(0),
-   m_histogramRemapper(0),
-   m_resamplerCache(0),
-   m_resampler(0),
-   m_scalarRemapper(0),
-   m_chainCache(0),
-   m_addHistogramFlag(false),
-   m_addResamplerCacheFlag(false),
-   m_addChainCacheFlag(false),
-   m_remapToEightBitFlag(false),
-   m_threeBandFlag(false),
-   m_threeBandReverseFlag(false)
-{
-}
-
-ossimSingleImageChain::ossimSingleImageChain(bool addHistogramFlag,
-                                             bool addResamplerCacheFlag,
-                                             bool addChainCacheFlag,
-                                             bool remapToEightBitFlag,
-                                             bool threeBandFlag,
-                                             bool threeBandReverseFlag)
-   :
-   ossimImageChain(),
-   m_handler(0),
-   m_bandSelector(0),
-   m_histogramRemapper(0),
-   m_resamplerCache(0),
-   m_resampler(0),
-   m_scalarRemapper(0),
-   m_chainCache(0),
-   m_addHistogramFlag(addHistogramFlag),
-   m_addResamplerCacheFlag(addResamplerCacheFlag),
-   m_addChainCacheFlag(addChainCacheFlag),
-   m_remapToEightBitFlag(remapToEightBitFlag),
-   m_threeBandFlag(threeBandFlag),
-   m_threeBandReverseFlag(threeBandReverseFlag)   
-{
-}
-
-ossimSingleImageChain::~ossimSingleImageChain()
-{
-}
-
-void ossimSingleImageChain::reset()
-{
-   bool result = true;
-   do
-   {
-      result = deleteLast();
-   } while (result);
-
-   m_handler               = 0;
-   m_bandSelector          = 0;
-   m_histogramRemapper     = 0;
-   m_resamplerCache        = 0;
-   m_resampler             = 0;
-   m_scalarRemapper        = 0;
-   m_chainCache            = 0;
-   m_addHistogramFlag      = false;
-   m_addResamplerCacheFlag = false;
-   m_addChainCacheFlag     = false;
-   m_remapToEightBitFlag   = false;
-   m_threeBandFlag         = false;
-   m_threeBandReverseFlag  = false;
-}
-
-void ossimSingleImageChain::close()
-{
-   if ( m_handler.valid() )
-   {
-      if ( removeChild(m_handler.get()) )
-      {
-         m_handler = 0;
-      }
-   }
-}
-
-ossimFilename ossimSingleImageChain::getFilename() const
-{
-   ossimFilename result;
-   if ( m_handler.valid() )
-   {
-      result = m_handler->getFilename();
-   }
-   return result;
-}
-
-bool ossimSingleImageChain::open(const ossimFilename& file, bool openOverview)
-{
-   return addImageHandler(file, openOverview);
-}
-
-bool ossimSingleImageChain::isOpen() const
-{
-   return m_handler.valid();
-}
-
-bool ossimSingleImageChain::open(const ossimSrcRecord& src)
-{
-   return addImageHandler(src);
-}
-
-void ossimSingleImageChain::createRenderedChain()
-{
-   // Band selector after image handler only if needed.
-   if ( m_handler.valid() )
-   {
-      // Only add if multiple bands.
-      if ( m_handler->getNumberOfOutputBands() != 1 )
-      {
-         addBandSelector();
-         if ( m_threeBandReverseFlag )
-         {
-            setToThreeBandsReverse();
-         }
-      }
-   }
-   else // No image handler so just add it.
-   {
-      addBandSelector();
-   }
-   
-   // histogram
-   if ( m_addHistogramFlag )
-   {
-      addHistogramRemapper();
-   }
-
-   // resampler cache
-   if ( m_addResamplerCacheFlag )
-   {
-      m_resamplerCache = addCache();
-   }
-
-   // scalar remapper
-   if ( m_remapToEightBitFlag )
-   {
-      if ( m_handler.valid() )
-      {
-         // See if it's eight bit.
-         if (m_handler->getOutputScalarType() != OSSIM_UINT8)
-         {
-            addScalarRemapper();
-         }
-      }
-      else
-      {
-         // Just add...
-         addScalarRemapper(); 
-      }
-   }
-   
-   // resampler
-   addResampler();
-
-   //---
-   // Do this here so that if a band selector is added to the end of the
-   // chain it will go in before the end of chain cache.
-   //---
-   if (m_threeBandFlag)
-   {
-      if (!m_bandSelector)
-      {
-         addBandSelector();
-      }
-      setToThreeBands();
-   }
-
-   //---
-   // Ditto...
-   //---
-   if ( m_threeBandReverseFlag && !m_bandSelector )
-   {
-      addBandSelector();
-      setToThreeBandsReverse();
-   }
-
-   // End of chain cache.
-   if ( m_addChainCacheFlag )
-   {
-      m_chainCache = addCache();
-   }
-
-   initialize();
-
-}
-
-void ossimSingleImageChain::createRenderedChain(const ossimSrcRecord& src)
-{
-   // Band selector after image handler only if needed.
-   if ( m_handler.valid() )
-   {
-      // Only add if needed.
-      if ( ( m_handler->getNumberOfOutputBands() != 1 ) || src.getBands().size() )
-      {
-         addBandSelector(src);
-         if ( m_threeBandReverseFlag )
-         {
-            setToThreeBandsReverse();
-         }
-      }
-   }
-   else // No image handler so just add it.
-   {
-      addBandSelector(src);
-   }
-   
-   // histogram
-   if ( m_addHistogramFlag || src.getHistogramOp().size() )
-   {
-      addHistogramRemapper(src);
-   }
-
-   // resampler cache
-   if ( m_addResamplerCacheFlag )
-   {
-      m_resamplerCache = addCache();
-   }
-
-   // scalar remapper
-   if ( m_remapToEightBitFlag )
-   {
-      if ( m_handler.valid() )
-      {
-         // See if it's eight bit.
-         if (m_handler->getOutputScalarType() != OSSIM_UINT8)
-         {
-            addScalarRemapper();
-         }
-      }
-      else
-      {
-         // Just add...
-         addScalarRemapper(); 
-      }
-   }
-   
-   // resampler
-   addResampler();
-
-   //---
-   // Do this here so that if a band selector is added to the end of the
-   // chain it will go in before the end of chain cache.
-   //---
-   if (m_threeBandFlag)
-   {
-      if (!m_bandSelector) // Input must be one band.
-      {
-         addBandSelector(src);
-      }
-      setToThreeBands();
-   }
-
-   //---
-   // Ditto...
-   //---
-   if ( m_threeBandReverseFlag && !m_bandSelector )
-   {
-      addBandSelector();
-      setToThreeBandsReverse();
-   }
-
-   // End of chain cache.
-   if ( m_addChainCacheFlag )
-   {
-      m_chainCache = addCache();
-   }
-
-   initialize();
-
-}
-
-bool ossimSingleImageChain::addImageHandler(const ossimFilename& file, bool openOverview)
-{
-   bool result = false;
-
-   close();
-   
-   m_handler = ossimImageHandlerRegistry::instance()->open(file, true, openOverview);
-   
-   if ( m_handler.valid() )
-   {
-      // Add to the chain.  Note: last is really first.
-      addLast( m_handler.get() );
-      
-      result = true;
-   }
-
-   return result;
-}
-
-bool ossimSingleImageChain::addImageHandler(const ossimSrcRecord& src)
-{
-   bool result = addImageHandler( src.getFilename() );
-   if (result)
-   {
-      //---
-      // When loading from ossimSrcRecord typically the overview/histograms are
-      // not in the same directory and the "support" keyword is not set.  For
-      // the ossimImageHandler::getFilenameWithThisExtension to work correctly
-      // the ossimImageHandler::theSupplementaryDirectory must be set.
-      // So if the ossimSrcRecord::getSupportDir() is empty and the overview
-      // or histogram is not co-located with the image we will set it here.
-      //---
-      ossimFilename supportDir = src.getSupportDir();
-      if ( supportDir.empty() )
-      {
-         if ( src.getOverviewPath().size() )
-         {
-            if ( src.getOverviewPath().isDir() )
-            {
-               supportDir = src.getOverviewPath();
-            }
-            else
-            {
-               supportDir = src.getOverviewPath().path();
-            }
-         }
-         else if ( src.getHistogramPath().size() )
-         {
-            if ( src.getHistogramPath().isDir() )
-            {
-               supportDir = src.getHistogramPath();
-            }
-            else
-            {
-               supportDir = src.getHistogramPath().path();
-            }
-         }
-         else if ( src.getMaskPath().size() )
-         {
-            if ( src.getMaskPath().isDir() )
-            {
-               supportDir = src.getMaskPath();
-            }
-            else
-            {
-               supportDir = src.getMaskPath().path();
-            }
-         }
-      }
-      if ( supportDir.size() && (src.getFilename().path() != supportDir) )
-      {
-         m_handler->setSupplementaryDirectory( supportDir );
-      }
-      if ( src.getEntryIndex() > 0 ) // defaulted to -1.
-      {
-         m_handler->setCurrentEntry( static_cast<ossim_uint32>( src.getEntryIndex() ) );
-      }
-      if ( m_handler->getOverview() == 0 )
-      {
-         if ( src.getOverviewPath().size() )
-         {
-            m_handler->openOverview( src.getOverviewPath() );
-         }
-         else
-         {
-            ossimFilename ovrFile = m_handler->getFilenameWithThisExtension(ossimString(".ovr"));
-            m_handler->openOverview( ovrFile ); 
-         }
-      }
-   }
-   return result;
-}
-
-void ossimSingleImageChain::addBandSelector()
-{
-   if (!m_bandSelector)
-   {
-      m_bandSelector = new ossimBandSelector();
-
-      // Add to the end of the chain.
-      addFirst(m_bandSelector.get());
-   }
-}
-
-void ossimSingleImageChain::addBandSelector(const ossimSrcRecord& src)
-{
-   if (!m_bandSelector)
-   {
-      m_bandSelector = new ossimBandSelector();
-      
-      // Add to the end of the chain.
-      addFirst(m_bandSelector.get());
-   }
-   if ( src.getBands().size() )
-   {
-      m_bandSelector->setOutputBandList( src.getBands() );
-   }
-}
-
-void ossimSingleImageChain::addHistogramRemapper()
-{
-   if (!m_histogramRemapper)
-   {
-      m_histogramRemapper = new ossimHistogramRemapper();
-      
-      m_histogramRemapper->setEnableFlag(false);
-
-      // Add to the end of the chain.
-      addFirst(m_histogramRemapper.get());
-   } 
-}
-
-void ossimSingleImageChain::addHistogramRemapper(const ossimSrcRecord& src)
-{
-   static const char MODULE[] =
-      "ossimSingleImageChain::addHistogramRemapper(const ossimSrcRecord&)";
-   
-   if (!m_histogramRemapper)
-   {
-      m_histogramRemapper = new ossimHistogramRemapper();
-      
-      m_histogramRemapper->setEnableFlag(false);
-
-      // Add to the end of the chain.
-      addFirst(m_histogramRemapper.get());
-   }
-
-   if ( src.getHistogramOp().size() && m_handler.valid() )
-   {
-      // Create histogram code here???
-      
-      // Open the histogram if needed.
-      if ( m_histogramRemapper->getHistogramFile() == ossimFilename::NIL )
-      {
-         ossimFilename f;
-         if ( src.getSupportDir().size() )
-         {
-            f = src.getSupportDir();
-            f.dirCat( m_handler->getFilename().fileNoExtension() );
-            f.setExtension(".his");
-         }
-         else
-         {
-            f = m_handler->getFilenameWithThisExtension( ossimString("his") );
-         }
-         if ( m_histogramRemapper->openHistogram( f ) == false )
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << "\nCould not open:  " << f << "\n";
-         }
-      }
-
-      // Set the histogram strech mode.
-      if ( src.getHistogramOp().size() )
-      {
-         // Enable.
-         m_histogramRemapper->setEnableFlag(true);
-         
-         // Set the histo mode:
-         ossimString op = src.getHistogramOp();
-         op.downcase();
-         if ( op == "auto-minmax" )
-         {
-            m_histogramRemapper->setStretchMode( ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX );
-         }
-         else if ( (op == "std-stretch-1") || (op == "std-stretch 1") )
-         {
-            m_histogramRemapper->setStretchMode( ossimHistogramRemapper::LINEAR_1STD_FROM_MEAN );
-         } 
-         else if ( (op == "std-stretch-2") || (op == "std-stretch 2") )
-         {
-            m_histogramRemapper->setStretchMode( ossimHistogramRemapper::LINEAR_2STD_FROM_MEAN );
-         } 
-         else if ( (op == "std-stretch-3") || (op == "std-stretch 3") )
-         {
-            m_histogramRemapper->setStretchMode( ossimHistogramRemapper::LINEAR_3STD_FROM_MEAN );
-         }
-         else
-         {
-            m_histogramRemapper->setEnableFlag(false);
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << "\nUnhandled operation: " << op << "\n";
-         }
-      }
-      
-   } // End: if ( src.setHistogramOp().size() && m_handler.valid() )
-}
-
-ossimRefPtr<ossimCacheTileSource> ossimSingleImageChain::addCache()
-{
-   ossimRefPtr<ossimCacheTileSource> cache = new ossimCacheTileSource();
-
-   // Add to the end of the chain.
-   addFirst(cache.get());
-
-   return cache;
-}
-
-void ossimSingleImageChain::addResampler()
-{
-   if ( !m_resampler )
-   {
-      m_resampler = new ossimImageRenderer();
-
-      // Add to the end of the chain.
-      addFirst(m_resampler.get());
-   }
-}
-
-void ossimSingleImageChain::addScalarRemapper()
-{
-   if ( !m_scalarRemapper )
-   {
-      m_scalarRemapper = new ossimScalarRemapper();
-
-      if ( m_resamplerCache.valid() )
-      {
-         // Add to the left of the resampler cache.
-         insertLeft(m_scalarRemapper.get(), m_resamplerCache.get());
-      }
-      else
-      {
-         // Add to the end of the chain.
-         addFirst(m_scalarRemapper.get());
-      }
-   }
-}
-
-ossimRefPtr<ossimImageHandler> ossimSingleImageChain::getImageHandler() const
-{
-   return m_handler;
-}
-
-ossimRefPtr<ossimImageHandler> ossimSingleImageChain::getImageHandler()
-{
-   return m_handler;
-}
-
-ossimRefPtr<ossimBandSelector> ossimSingleImageChain::getBandSelector() const
-{
-   return m_bandSelector;
-}
-
-ossimRefPtr<ossimBandSelector> ossimSingleImageChain::getBandSelector()
-{
-   return m_bandSelector;
-}
-
-ossimRefPtr<ossimHistogramRemapper> ossimSingleImageChain::getHistogramRemapper() const
-{
-   return m_histogramRemapper;
-}
-
-ossimRefPtr<ossimHistogramRemapper> ossimSingleImageChain::getHistogramRemapper()
-{
-   return m_histogramRemapper;
-}
-
-ossimRefPtr<ossimCacheTileSource> ossimSingleImageChain::getResamplerCache() const
-{
-   return m_resamplerCache;
-}
-
-ossimRefPtr<ossimCacheTileSource> ossimSingleImageChain::getResamplerCache()
-{
-   return m_resamplerCache;
-}
-
-ossimRefPtr<ossimImageRenderer> ossimSingleImageChain::getImageRenderer() const
-{
-   return m_resampler;
-}
-
-ossimRefPtr<ossimImageRenderer> ossimSingleImageChain::getImageRenderer()
-{
-   return m_resampler;
-}
-
-ossimRefPtr<ossimScalarRemapper> ossimSingleImageChain::getScalarRemapper() const
-{
-   return m_scalarRemapper;
-}
-
-ossimRefPtr<ossimScalarRemapper> ossimSingleImageChain::getScalarRemapper()
-{
-   return m_scalarRemapper;
-}
-
-ossimRefPtr<ossimCacheTileSource> ossimSingleImageChain::getChainCache() const
-{
-   return m_chainCache;
-}
-
-ossimRefPtr<ossimCacheTileSource> ossimSingleImageChain::getChainCache()
-{
-   return m_chainCache;
-}
-
-void ossimSingleImageChain::setAddHistogramFlag(bool flag)
-{
-   m_addHistogramFlag = flag;
-}
-
-bool ossimSingleImageChain::getAddHistogramFlag() const
-{
-   return m_addHistogramFlag;
-}
-
-void ossimSingleImageChain::setAddResamplerCacheFlag(bool flag)
-{
-   m_addResamplerCacheFlag = flag;
-}
-
-bool ossimSingleImageChain::getAddResamplerCacheFlag() const
-{
-   return m_addResamplerCacheFlag;
-}
-
-void ossimSingleImageChain::setAddChainCacheFlag(bool flag)
-{
-   m_addChainCacheFlag = flag;
-}
-
-bool ossimSingleImageChain::getAddChainCacheFlag() const
-{
-   return m_addChainCacheFlag;
-}
-
-void ossimSingleImageChain::setRemapToEightBitFlag(bool flag)
-{
-   m_remapToEightBitFlag = flag;
-}
-
-bool ossimSingleImageChain::getRemapToEightBitFlag() const
-{
-   return m_remapToEightBitFlag;
-}
-
-void ossimSingleImageChain::setThreeBandFlag(bool flag)
-{
-   m_threeBandFlag = flag;
-}
-
-bool ossimSingleImageChain::getThreeBandFlag() const
-{
-   return m_threeBandFlag;
-}
-   
-void ossimSingleImageChain::setThreeBandReverseFlag(bool flag)
-{
-   m_threeBandReverseFlag = flag;
-}
-
-bool ossimSingleImageChain::getThreeBandReverseFlag() const
-{
-   return m_threeBandReverseFlag;
-}
-
-void ossimSingleImageChain::setToThreeBands()
-{
-   if ( m_handler.valid() )
-   {
-      std::vector<ossim_uint32> bandList(3);
-      const ossim_uint32 BANDS = m_handler->getNumberOfInputBands();
-      if(BANDS >= 3)
-      {
-         bandList[0] = 0;
-         bandList[1] = 1;
-         bandList[2] = 2;
-      }
-      else
-      {
-         bandList[0] = 0;
-         bandList[1] = 0;
-         bandList[2] = 0;
-      }
-      setBandSelection(bandList);
-   }
-}
-   
-void ossimSingleImageChain::setToThreeBandsReverse()
-{
-   if ( m_handler.valid() )
-   {
-      std::vector<ossim_uint32> bandList(3);
-      const ossim_uint32 BANDS = m_handler->getNumberOfInputBands();
-      if(BANDS >= 3)
-      {
-         bandList[0] = 2;
-         bandList[1] = 1;
-         bandList[2] = 0;
-      }
-      else
-      {
-         bandList[0] = 0;
-         bandList[1] = 0;
-         bandList[2] = 0;
-      }
-      setBandSelection(bandList);
-   }
-}
-
-void ossimSingleImageChain::setBandSelection(
-   const std::vector<ossim_uint32>& bandList)
-{
-   if (!m_bandSelector)
-   {
-      addBandSelector();
-   }
-   m_bandSelector->setEnableFlag(true);
-   m_bandSelector->setOutputBandList(bandList);
-   if ( m_histogramRemapper.valid() )
-   {
-      m_histogramRemapper->initialize();
-   }
-}
-ossimScalarType ossimSingleImageChain::getImageHandlerScalarType() const
-{
-   ossimScalarType result = OSSIM_SCALAR_UNKNOWN;
-   if ( m_handler.valid() )
-   {
-      result = m_handler->getOutputScalarType();
-   }
-   return result;
-}
-
-bool ossimSingleImageChain::openHistogram( ossimHistogramRemapper::StretchMode mode )
-{
-   bool result = false;
-   ossimRefPtr<ossimImageHandler> ih = getImageHandler();
-   if ( ih.valid() )
-   {
-      ossimRefPtr<ossimHistogramRemapper> hr = getHistogramRemapper();
-      if ( hr.valid() )
-      {
-         ossimFilename f = ih->getFilenameWithThisExtension( ossimString("his") );
-         if ( hr->openHistogram( f ) == true )
-         {
-            // Enable:
-            hr->setEnableFlag(true);
-
-            // Set the mode:
-            hr->setStretchMode( mode );
-
-            result = true;
-         }
-      }
-   }
-   return result;
-}
diff --git a/src/ossim/imaging/ossimSrtmTileSource.cpp b/src/ossim/imaging/ossimSrtmTileSource.cpp
deleted file mode 100644
index b00166d..0000000
--- a/src/ossim/imaging/ossimSrtmTileSource.cpp
+++ /dev/null
@@ -1,159 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  David Burken
-//
-// Description:
-// 
-// Image handler class for a Shuttle Radar Topography Mission (SRTM) file.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimSrtmTileSource.cpp 21631 2012-09-06 18:10:55Z dburken $
-
-#include <ossim/imaging/ossimSrtmTileSource.h>
-#include <ossim/base/ossimDirectory.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/support_data/ossimSrtmSupportData.h>
-
-RTTI_DEF1(ossimSrtmTileSource,
-          "ossimSrtmTileSource",
-          ossimGeneralRasterTileSource)
-
-static ossimTrace traceDebug("ossimSrtmTileSource:debug");
-
-ossimSrtmTileSource::ossimSrtmTileSource()
-   :
-   ossimGeneralRasterTileSource(),
-   m_SrtmSupportData()
-{
-}
-
-ossimSrtmTileSource::~ossimSrtmTileSource()
-{
-}
-
-bool ossimSrtmTileSource::open()
-{
-   static const char MODULE[] = "ossimSrtmTileSource::open";
-   if (traceDebug())
-   {
-      CLOG << " Entered..." << std::endl
-           << "srtm " << theImageFile << std::endl;
-   }
-   
-   if(isOpen())
-   {
-      close();
-   }
-
-   //---
-   // Set the scan for min max flag to true.  This will only scan if not found
-   // in a omd file so this is a one time hit typically taken when building
-   // reduced res sets.
-   //---
-   if (!m_SrtmSupportData.setFilename(theImageFile, true))
-   {
-      if (traceDebug()) CLOG << " Unable to set filename"<< std::endl;
-      
-      return false;
-   }
-
-   ossimKeywordlist kwl;
-   m_SrtmSupportData.saveState(kwl);
-   
-   ossimGeneralRasterInfo generalRasterInfo;
-   bool result = generalRasterInfo.loadState(kwl);
-   
-   // theMetaData.loadState(kwl);
-   theMetaData = generalRasterInfo.getImageMetaData();
-
-   if(result)
-   {
-       result =  ossimGeneralRasterTileSource::open(generalRasterInfo);
-   }
-
-   if (traceDebug())
-   {
-      CLOG << " Exited with " << (result?"true":"false") << " ..."
-           << std::endl;
-   }
-   
-   return result;
-}
-   
-//************************************************************************************************
-//! Returns the image geometry object associated with this tile source or NULL if non defined.
-//! The geometry contains full-to-local image transform as well as projection (image-to-world)
-//************************************************************************************************
-ossimRefPtr<ossimImageGeometry> ossimSrtmTileSource::getImageGeometry()
-{
-   if(!theGeometry.valid())
-   {
-      // First time through set the projection.
-      theGeometry = new ossimImageGeometry();
-
-      theGeometry->setProjection( m_SrtmSupportData.getProjection().get() );
-
-      // Set image things the geometry object should know about.
-      initImageParameters( theGeometry.get() );
-   }
-   return theGeometry;
-}
-
-bool ossimSrtmTileSource::saveState(ossimKeywordlist& kwl,
-                                    const char* prefix)const
-{
-   if (m_SrtmSupportData.saveState(kwl, prefix))
-   {
-      return ossimImageHandler::saveState(kwl,prefix);
-   }
-   return false;
-}
-
-bool ossimSrtmTileSource::loadState(const ossimKeywordlist& kwl,
-                                    const char* prefix)
-{
-   if (m_SrtmSupportData.loadState(kwl, prefix))
-   {
-      setFilename(m_SrtmSupportData.getFilename());
-      if (open())
-      {
-         // Must call to pick up id for connections.
-         return ossimImageSource::loadState(kwl, prefix);
-      }
-   }
-
-   return false;
-}
-
-ossimRefPtr<ossimProperty> ossimSrtmTileSource::getProperty(
-   const ossimString& name)const
-{
-   if(name == "file_type")
-   {
-      return new ossimStringProperty(name, getShortName());
-   }
-   
-   return ossimImageHandler::getProperty(name);
-}
-
-void ossimSrtmTileSource::getPropertyNames(
-   std::vector<ossimString>& propertyNames)const
-{
-   ossimImageHandler::getPropertyNames(propertyNames);
-   propertyNames.push_back("file_type");
-}
-
-ossimString ossimSrtmTileSource::getShortName() const
-{
-   return ossimString("SRTM");
-}
-   
-ossimString ossimSrtmTileSource::getLongName() const
-{
-   return ossimString("SRTM reader");
-}
- 
diff --git a/src/ossim/imaging/ossimSubImageTileSource.cpp b/src/ossim/imaging/ossimSubImageTileSource.cpp
deleted file mode 100644
index 398bf85..0000000
--- a/src/ossim/imaging/ossimSubImageTileSource.cpp
+++ /dev/null
@@ -1,225 +0,0 @@
-//*****************************************************************************
-// FILE: ossimSubImageTileSource.cc
-//
-// Copyright (C) 2001 ImageLinks, Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Contains implementation of class ossimSubImageTileSource.
-//   This tile source permits specifying an offset that is to be applied to the
-//   tile origin for all getTile() requests. It is intended for converting
-//   a full-image space coordinate to a sub-image coordinate.
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimSubImageTileSource.cpp 17206 2010-04-25 23:20:40Z dburken $
-
-#include <ossim/imaging/ossimSubImageTileSource.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/imaging/ossimImageData.h>
-
-RTTI_DEF1(ossimSubImageTileSource,
-          "ossimSubImageTileSource",
-          ossimImageSourceFilter);
-
-static const char* SUBIMAGE_OFFSET_X = "offset_x";
-static const char* SUBIMAGE_OFFSET_Y = "offset_y";
-
-ossimSubImageTileSource::ossimSubImageTileSource()
-   : ossimImageSourceFilter(),
-     theSubImageOffset(0, 0),
-     theTile(0)
-{
-}
-
-ossimSubImageTileSource::ossimSubImageTileSource(ossimImageSource* inputSource)
-   : ossimImageSourceFilter(inputSource), theSubImageOffset(0, 0),
-     theTile(0)
-{
-}
-
-ossimSubImageTileSource::ossimSubImageTileSource(ossimImageSource* inputSource,
-                                                 const ossimIpt&   offset)
-   : ossimImageSourceFilter(inputSource), theSubImageOffset(offset),
-     theTile(0)
-{
-}
-
-ossimSubImageTileSource::~ossimSubImageTileSource()
-{
-}
-
-//*****************************************************************************
-//  METHOD: ossimSubImageTileSource::getTile()
-//  
-//*****************************************************************************
-ossimRefPtr<ossimImageData> ossimSubImageTileSource::getTile(
-   const ossimIrect& rect,
-   ossim_uint32  res_level)
-{
-   ossimIpt offset = theSubImageOffset;
-
-   if(res_level)
-   {
-      //***
-      // Determine the offset for the particular rr level requested:
-      //***
-      ossimDpt decimation_factor;
-      theInputConnection->getDecimationFactor(res_level, decimation_factor);
-      
-      if(!decimation_factor.hasNans())
-      {
-         offset = ossimIpt((int)(theSubImageOffset.x*decimation_factor.x + 0.5),
-                           (int)(theSubImageOffset.y*decimation_factor.y + 0.5));
-      }
-      else
-      {
-         offset = theSubImageOffset;
-      }
-   }
-   //
-   // Apply the offset to the requested rect and fetch tile. The tile's origin
-   // needs to be adjusted to reflect the requested origin:
-   //
-   ossimIrect rect_prime (rect - offset);
-
-   ossimRefPtr<ossimImageData> tile =
-      ossimImageSourceFilter::getTile(rect_prime, res_level);
-   
-   if(theTile.valid())
-   {
-      theTile->setImageRectangle(rect_prime);
-
-      if(tile.valid())
-      {
-         theTile->loadTile(tile.get());
-      }
-      else
-      {
-         theTile->makeBlank();
-      }
-   }
-   else
-   {
-      if(tile.valid())
-      {
-         theTile = (ossimImageData*)tile->dup();
-      }
-   }
-   if(theTile.valid())
-   {
-      theTile->setOrigin(rect.ul());
-      theTile->validate();
-   }
-   
-   return theTile;
-}
-
-//*****************************************************************************
-//  METHOD: ossimSubImageTileSource::getBoundingRect()
-//  
-//*****************************************************************************
-ossimIrect ossimSubImageTileSource::getBoundingRect(ossim_uint32 resLevel) const
-{
-   ossimDrect result;
-
-   result.makeNan();
-   if(!theInputConnection)
-      return result;
-   ossimDpt offset = theSubImageOffset;
-   
-   ossimDrect rect (theInputConnection->getBoundingRect(resLevel));
-   if(resLevel)
-   {
-      ossimDpt decimation_factor;
-      theInputConnection->getDecimationFactor(resLevel, decimation_factor);
-
-      if(!decimation_factor.hasNans())
-      {
-         rect*=decimation_factor;
-         offset= ossimDpt(theSubImageOffset.x*decimation_factor.x,
-                          theSubImageOffset.y*decimation_factor.y);
-      }
-   }
-   ossimDrect rect_prime (rect + offset);
-   
-   return rect_prime;
-}
-
-//*****************************************************************************
-//  METHOD: ossimSubImageTileSource::getValidImageVertices()
-//  
-//*****************************************************************************
-void ossimSubImageTileSource::getValidImageVertices(vector<ossimIpt>& vertices,
-                                                    ossimVertexOrdering ordering,
-                                                    ossim_uint32 /* resLevel */) const
-{
-   if(!theInputConnection)
-   {
-      vertices.clear();
-      return;
-   }
-
-   ossimDpt offset (theSubImageOffset);
-
-   theInputConnection->getValidImageVertices(vertices, ordering);
-   vector<ossimIpt>::iterator vertex = vertices.begin();
-
-   while (vertex != vertices.end())
-   {
-      (*vertex) += offset;
-      vertex++;
-   }
-   
-   return;
-}
-
-void ossimSubImageTileSource::initialize()
-{
-   ossimImageSourceFilter::initialize();
-
-   theTile = NULL;
-}
-
-bool ossimSubImageTileSource::loadState(const ossimKeywordlist& kwl,
-                                        const char* prefix)
-{
-   const char* offset_x = kwl.find(prefix, SUBIMAGE_OFFSET_X);
-   const char* offset_y = kwl.find(prefix, SUBIMAGE_OFFSET_Y);
-
-   if(offset_x)
-   {
-      theSubImageOffset.x = ossimString(offset_x).toLong();
-      
-   }
-   if(offset_y)
-   {
-      theSubImageOffset.y = ossimString(offset_y).toLong();      
-   }
-   
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
-
-bool ossimSubImageTileSource::saveState(ossimKeywordlist& kwl,
-                                        const char* prefix)const
-{
-   bool result = ossimImageSourceFilter::saveState(kwl, prefix);
-   
-   kwl.add(prefix,
-           SUBIMAGE_OFFSET_X,
-           theSubImageOffset.x,
-           true);
-
-   kwl.add(prefix,
-           SUBIMAGE_OFFSET_Y,
-           theSubImageOffset.y,
-           true);
-   
-   return result;        
-}
diff --git a/src/ossim/imaging/ossimTableRemapper.cpp b/src/ossim/imaging/ossimTableRemapper.cpp
deleted file mode 100644
index e238515..0000000
--- a/src/ossim/imaging/ossimTableRemapper.cpp
+++ /dev/null
@@ -1,584 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Table remapper class definition.
-//
-// Takes input tile, remaps it through a table, then output tile in the desired
-// scalar type.
-//
-// Two modes one that works on native remap tables, that being of the same
-// scalar type (like ossim_uint8) of the input connection, and another that
-// uses a normalized remap table (more scalar independent).
-//
-//*************************************************************************
-// $Id: ossimTableRemapper.cpp 21787 2012-09-30 21:27:09Z gpotts $
-
-#include <ossim/imaging/ossimTableRemapper.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-
-RTTI_DEF1(ossimTableRemapper, "ossimTableRemapper", ossimImageSourceFilter)
-
-static ossimTrace traceDebug("ossimTableRemapper:debug");
-
-static const char* TABLE_TYPE[] = { "UNKNOWN", "NATIVE", "NORMALIZED" };
-
-ossimTableRemapper::ossimTableRemapper()
-   :
-      ossimImageSourceFilter(),  // base class
-      theTile(0),
-      theTmpTile(0),
-      theNormBuf(0),
-      theTableBinCount(0),
-      theTableBandCount(0),
-      theTableType(ossimTableRemapper::UKNOWN),
-      theInputScalarType(OSSIM_SCALAR_UNKNOWN),
-      theOutputScalarType(OSSIM_SCALAR_UNKNOWN)
-{
-   //***
-   // Set the base class "theEnableFlag" to off since no adjustments have been
-   // made yet.
-   //***
-   //disableSource();
-}
-
-ossimTableRemapper::~ossimTableRemapper()
-{
-   destroy();
-}
-
-void ossimTableRemapper::destroy()
-{
-   if (theNormBuf)
-   {
-      delete [] theNormBuf;
-      theNormBuf = 0;
-   }
-   theTmpTile = 0;
-   theTile    = 0;
-}
-
-void ossimTableRemapper::initialize()
-{
-   //---
-   // Call the base class initialize.
-   // Note:  This will reset "theInputConnection" if it changed...
-   //---
-   ossimImageSourceFilter::initialize();
-   destroy();
-   if (theInputConnection)
-   {
-      // Since we override "getOutputScalarType" make sure something's set.
-      if (theOutputScalarType == OSSIM_SCALAR_UNKNOWN)
-      {
-         theOutputScalarType = theInputConnection->getOutputScalarType();
-      }
-
-      if (theTile.valid())
-      {
-         //if ( theTile->getNumberOfBands() !=
-         //     theInputConnection->getNumberOfOutputBands() )
-        // {
-            // Wipe everything slick. The next getTile will call allocate.
-        //    destroy();
-        // }
-      }
-   }
-
-   // Nothing else to do for this...
-}
-
-void ossimTableRemapper::allocate(const ossimIrect& rect)
-{
-   //---
-   // It's either first getTile or we've had either a resize, so allocate
-   // needed stuff...
-   //---
-   destroy();
-
-   if (theInputConnection)
-   {
-      ossim_uint32 width  = rect.width();
-      ossim_uint32 height = rect.height();
-      theInputScalarType  = theInputConnection->getOutputScalarType();
-    
-      theTile =  ossimImageDataFactory::instance()->create(this,this);
-      theTile->setImageRectangle(rect); 
-     // theTile =
-     //    ossimImageDataFactory::instance()->create(this,
-     //                                              getOutputScalarType(),
-     //                                              getNumberOfOutputBands(),
-     //                                              width,x
-     //                                              height);
-      theTile->initialize();
-
-
-      if (theInputScalarType !=  getOutputScalarType() &&
-          theTableType == ossimTableRemapper::NATIVE)
-      {
-         //---
-         // We need a temp tile so we can do two remaps
-         // inputTile->remapTable->tmpTile then
-         // tmpTile->normalize->theTile(unnormalize to new scalar)...
-         //---
-         theTmpTile 
-         = ossimImageDataFactory::instance()->create(this,
-                                                     theInputScalarType,
-                                                     getNumberOfOutputBands(),
-                                                     width,
-                                                     height);
-         theTmpTile->setMinPix(theTile->getMinPix(), theTile->getNumberOfBands());
-         theTmpTile->initialize();
-
-      }
-
-      if (theTableType == ossimTableRemapper::NORMALIZED ||
-          theInputScalarType != theOutputScalarType)
-      {
-         theNormBuf = new ossim_float64[theTile->getSize()];
-      }
-   }
-}
-
-ossimRefPtr<ossimImageData> ossimTableRemapper::getTile(
-   const ossimIrect& tile_rect, ossim_uint32 resLevel)
-{
-   ossimRefPtr<ossimImageData> result = 0;
-   
-   if(theInputConnection)
-   {
-      // Fetch tile from pointer from the input source.
-      result = theInputConnection->getTile(tile_rect, resLevel);
-      if (theEnableFlag&&result.valid())
-      {  
-         // Get its status of the input tile.
-         ossimDataObjectStatus tile_status = result->getDataObjectStatus();
-         
-         // Check for remap bypass:
-         if ( (tile_status != OSSIM_NULL) &&
-              (tile_status != OSSIM_EMPTY) && theTable.size() )
-         {
-
-            // OK we have an input tile... and it's not null or empty.
-            if(!theTile)
-            {
-               allocate(tile_rect);
-            }
-            if (theTile.valid())
-            {
-               theTile->setImageRectangle(tile_rect);
-               if(theTmpTile.valid()) // not mandatory for all modes.
-               {
-                  theTmpTile->setImageRectangle(tile_rect);
-               }   
-               // Think things are good.  Do the real work...
-               if (theTableType == ossimTableRemapper::NATIVE)
-               {
-                  // Most efficient case...
-                  remapFromNativeTable(result);
-               }
-               else
-               {
-                  remapFromNormalizedTable(result);
-               }
-              
-               theTile->validate();
-               result = theTile;
-            }
-         }
-      }
-   }
-   return result;
-}
-
-void ossimTableRemapper::remapFromNativeTable(
-   ossimRefPtr<ossimImageData>& inputTile)
-{
-   switch (theOutputScalarType)
-   {
-      case OSSIM_UINT8:
-      {
-         remapFromNativeTable(ossim_uint8(0), inputTile);
-         break;
-      }
-      
-      case OSSIM_USHORT11:
-      case OSSIM_USHORT16:
-      {
-         remapFromNativeTable(ossim_uint16(0), inputTile);
-         break;
-      }
-      
-      case OSSIM_SSHORT16:
-      {
-         remapFromNativeTable(ossim_sint16(0), inputTile);
-         break;
-      }
-      
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT:
-      {
-         remapFromNativeTable(ossim_float32(0), inputTile);
-         break;
-      }
-      
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_DOUBLE:
-      {
-         remapFromNativeTable(ossim_float64(0), inputTile);
-         break;
-      }
-      
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         if(traceDebug())
-         {
-         // Shouldn't hit this.
-            ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimTableRemapper::remapFromNativeTable"
-            << "\nOutput scalar type is OSSIM_SCALAR_UNKNOWN!\n";
-         }
-         break;
-      }
-
-   } // End of "switch (theTableType)"
-}
-
-template <class T> void ossimTableRemapper::remapFromNativeTable(
-   T /* dummy */,
-   ossimRefPtr<ossimImageData>& inputTile)
-{
-   
-   const ossim_uint32 BANDS = theTile->getNumberOfBands();
-   const ossim_uint32 PPB   = theTile->getSizePerBand(); // pixels per band
-
-   //---
-   // NOTE:
-   // If (theTableBandCount == one) that means we only have one band; or,
-   // the user wanted to remap all bands using the same table...
-   //---
-   const ossim_uint32 BAND_OFFSET =
-      (theTableBandCount != 1) ? theTableBinCount: 0;
-
-   const T* rt = reinterpret_cast<T*>(&theTable.front()); // remap table (rt)
-   ossimRefPtr<ossimImageData> id;
-   if (theInputScalarType == theOutputScalarType)
-   {
-      id = theTile;
-   }
-   else
-   {
-      id = theTmpTile;
-   }
-   
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      const T NULL_PIX = static_cast<T>(id->getNullPix(band));
-      //const T MIN_PIX  = static_cast<T>(id->getMinPix(band));
-
-      const T* s = static_cast<T*>(inputTile->getBuf(band)); // source (s)
-      T*       d = static_cast<T*>(id->getBuf(band));   // destination (d)
-
-      for (ossim_uint32 pixel = 0; pixel < PPB; ++pixel)
-      {
-         //---
-         // Get the source pixel and use it as an index to the table.
-         // Note Null is always the "0" index, min always the "1".
-         //---
-         T p = s[pixel];
-         if (p == NULL_PIX)  // Null is not always zero (dted).
-         {
-            d[pixel] = NULL_PIX;
-           // p = 0;
-         }
-         else
-         {
-//         else
-//         {
-//            p = (p+1-MIN_PIX);  // If min == 1 we want that to map to index 1.
-//         }
-
-            ossim_uint32 table_index = static_cast<ossim_uint32>(p);
-            
-            //---
-            // If within range use to index the remap table; else, null.
-            // Note:
-            // There is no min, max range checking on value retrieved from table.
-            // Range checking should be performed when the table is built.
-            //---
-            if(table_index < theTableBinCount)
-            {
-               d[pixel] = rt[table_index];
-            }
-//            else if(table_index < 0)
-//            {
-//               if(theTableBinCount > 1)
-//               {
-//                  d[pixel] = rt[1];
-//               }
-//               else
-//               {
-//                  d[pixel] = table_index;
- //              }
- //           }
-            else
-            {
-               if(theTableBinCount>0)
-               {
-                  d[pixel] = rt[theTableBinCount-1];
-               }
-               else
-               {
-                  d[pixel] = table_index;
-              }
-            }
-         }
-      }
-
-      rt += BAND_OFFSET; // Go to next band in the table.
-   }
-
-   if (theInputScalarType != theOutputScalarType)
-   {
-      // Normalize and copy the temp tile to a buffer.
-      id->copyTileToNormalizedBuffer(theNormBuf);
-
-      // Un-normalize and copy the buffer to the destination tile.
-      theTile->copyNormalizedBufferToTile(theNormBuf);
-   }
-}
-
-void ossimTableRemapper::remapFromNormalizedTable(
-   ossimRefPtr<ossimImageData>& inputTile)
-{
-   if (!theNormBuf) // First time...
-   {
-      theNormBuf = new ossim_float64[theTile->getSize()];
-   }
-   
-   // Normalize and copy the source tile to a buffer.
-   inputTile->copyTileToNormalizedBuffer(theNormBuf);
-
-   const ossim_uint32 BANDS = theTile->getNumberOfBands();
-   const ossim_uint32 PPB   = theTile->getSizePerBand(); // pixels per band
-
-   //---
-   // NOTE:
-   // If (theTableBandCount == one) that means we only have one band; or,
-   // the user wanted to remap all bands using the same table...
-   //---
-   const ossim_uint32 BAND_OFFSET = (theTableBandCount == 1) ? 0 : PPB;
-
-   // remap table (rt)
-   ossim_float64* rt = reinterpret_cast<ossim_float64*>(&theTable.front()); 
-
-   ossim_float64* buf = theNormBuf;
-   ossim_float64 p = 0.0;
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      for (ossim_uint32 pixel = 0; pixel < PPB; ++pixel)
-      {
-         // Get the source pixel...
-         ossim_uint32 idx
-            = static_cast<ossim_uint32>(buf[pixel]*theTableBinCount+0.5);
-
-         if((idx < theTableBinCount))
-         {
-            // If within range use to index the remap table; else, null.
-            p = (idx < theTableBinCount) ? rt[idx] : 0.0;
-         }
-//         else if(idx < 0)
-//         {
-//            p = 0.0;
-//         }
-         else 
-         {
-            p = 1.0;
-         }
-         // Range check (in case table bad) and assign to destination pixel.
-         buf[pixel] = (p >= 0.0) ? ( (p <=1.0) ? p : 1) : 0.0;
-      }
-
-      // Go to next band.
-      rt += BAND_OFFSET;
-      buf += PPB;
-   }
-   
-   // Un-normalize and copy the buffer to the destination tile.
-   theTile->copyNormalizedBufferToTile(theNormBuf);
-}
-
-ossimScalarType ossimTableRemapper::getOutputScalarType() const
-{
-   if (theOutputScalarType != OSSIM_SCALAR_UNKNOWN)
-   {
-      return theOutputScalarType;
-   }
-
-   return ossimImageSourceFilter::getOutputScalarType();
-}
-
-void ossimTableRemapper::setTable(const std::vector<ossim_uint8>& table,
-                                  ossim_uint32 table_bin_count,
-                                  ossim_uint32 table_band_count,
-                                  RemapTableType table_type,
-                                  ossimScalarType output_scalar_type)
-{
-   // Start with a clean slate...
-   destroy();
-   
-   theTable            = table;
-   theTableBinCount    = table_bin_count;
-   theTableBandCount   = table_band_count;
-   theTableType        = table_type;
-   theOutputScalarType = output_scalar_type;
-}
-
-bool ossimTableRemapper::loadState(const ossimKeywordlist& kwl,
-                                   const char* prefix)
-{
-   // Look for scalar type keyword.
-   ossim_int32 st = ossimScalarTypeLut::instance()->
-      getEntryNumber(kwl, prefix, true);
-
-   // Lookup table returns -1 if not found so check return...
-   if ( (st != -1) && (st != OSSIM_SCALAR_UNKNOWN) )
-   {
-      theOutputScalarType = static_cast<ossimScalarType>(st);
-   }
-
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
-
-bool ossimTableRemapper::saveState(ossimKeywordlist& kwl,
-                                   const char* prefix) const
-{
-   // Save the output scalar type.
-   kwl.add(prefix,
-           ossimKeywordNames::SCALAR_TYPE_KW,
-           ossimScalarTypeLut::instance()->
-           getEntryString(theOutputScalarType).c_str(),
-           true);
-   
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
-
-ostream& ossimTableRemapper::print(ostream& os) const
-{
-   ossimScalarTypeLut* sl = ossimScalarTypeLut::instance();
-
-   os << "\nossimTableRemapper::print:"
-      << "\ntheTableBinCount:    " << theTableBinCount
-      << "\ntheTableBandCount:   " << theTableBandCount
-      << "\ntheTableType:        " << TABLE_TYPE[theTableType]
-      << "\ntheInputScalarType:  " << (*sl)[theInputScalarType]
-      << "\ntheOutputScalarType: " << (*sl)[theOutputScalarType]
-      << endl;
-   
-   if (theTile.valid())
-   {
-      os << "theTile:\n" << *theTile << endl;
-   }
-   if (theTmpTile.valid())
-   {
-      os << "theTmpTile:\n" << *theTmpTile << endl;
-   }
-
-   switch (theOutputScalarType)
-   {
-      case OSSIM_UCHAR:
-      {
-         dumpTable(ossim_uint8(0), os);
-         break;
-      }
-      
-      case OSSIM_USHORT11:
-      case OSSIM_USHORT16:
-      {
-         dumpTable(ossim_uint16(0), os);
-         break;
-      }
-      
-      case OSSIM_SSHORT16:
-      {
-         dumpTable(ossim_sint16(0), os);
-         break;
-      }
-      
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_FLOAT:
-      {
-         dumpTable(ossim_float32(0), os);
-         break;
-      }
-      
-      case OSSIM_NORMALIZED_DOUBLE:
-      case OSSIM_DOUBLE:
-      {
-         dumpTable(ossim_float64(0), os);
-         break;
-      }
-      
-      case OSSIM_SCALAR_UNKNOWN:
-      default:
-      {
-         if(traceDebug())
-         {
-         // Shouldn't hit this.
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimTableRemapper::print OSSIM_SCALAR_UNKNOWN!\n";
-         }
-         break;
-      }
-
-   } // End of "switch (theTableType)"
-
-   return os;
-}
-
-template <class T> void ossimTableRemapper::dumpTable(T /*dummy*/,
-                                                      ostream& os) const
-{
-   if (theTable.empty() || !theTableBinCount || !theTableBandCount)
-   {
-      return;
-   }
-
-   const T* table = reinterpret_cast<const T*>(&theTable.front());
-
-   ossim_uint32 table_index = 0;
-   for (ossim_uint32 band = 0; band < theTableBandCount; ++band)
-   {
-      for (ossim_uint32 index = 0; index < theTableBinCount; ++index)
-      {
-         os << "tabel[" << band << "][" << index << "]:  "
-            << static_cast<int>(table[table_index]) << endl;
-         ++table_index;
-      }
-   }
-}
-
-
-ostream& operator<<(ostream& os, const ossimTableRemapper& tr)
-{
-   return tr.print(os);
-}
-
-// Private to disallow use...
-ossimTableRemapper::ossimTableRemapper(const ossimTableRemapper&)
-{
-}
-
-// Private to disallow use...
-ossimTableRemapper& ossimTableRemapper::operator=(const ossimTableRemapper&)
-{
-   return *this;
-}
diff --git a/src/ossim/imaging/ossimTiffOverviewBuilder.cpp b/src/ossim/imaging/ossimTiffOverviewBuilder.cpp
deleted file mode 100644
index c01dc82..0000000
--- a/src/ossim/imaging/ossimTiffOverviewBuilder.cpp
+++ /dev/null
@@ -1,1438 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Contains class definition for TiffOverviewBuilder
-// 
-//*******************************************************************
-//  $Id: ossimTiffOverviewBuilder.cpp 22366 2013-08-09 12:13:24Z gpotts $
-
-#include <ossim/imaging/ossimTiffOverviewBuilder.h>
-#include <ossim/parallel/ossimMpi.h>
-#include <ossim/parallel/ossimMpiMasterOverviewSequencer.h>
-#include <ossim/parallel/ossimMpiSlaveOverviewSequencer.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimErrorCodes.h>
-#include <ossim/base/ossimErrorContext.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/imaging/ossimBitMaskTileSource.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimTiffTileSource.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimMapProjectionInfo.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/support_data/ossimGeoTiff.h>
-
-#include <xtiffio.h>
-#include <algorithm> /* for std::fill */
-#include <sstream>
-using namespace std;
-
-RTTI_DEF1(ossimTiffOverviewBuilder,
-          "ossimTiffOverviewBuilder",
-          ossimOverviewBuilderBase)
-
-static ossimTrace traceDebug("ossimTiffOverviewBuilder:degug");
-
-// Property keywords.
-static const char COPY_ALL_KW[]           = "copy_all_flag";
-static const char INTERNAL_OVERVIEWS_KW[] = "internal_overviews_flag";
-
-#ifdef OSSIM_ID_ENABLED
-static const char OSSIM_ID[] = "$Id: ossimTiffOverviewBuilder.cpp 22366 2013-08-09 12:13:24Z gpotts $";
-#endif
-
-
-//*******************************************************************
-// Public Constructor:
-//*******************************************************************
-ossimTiffOverviewBuilder::ossimTiffOverviewBuilder()
-   :
-      ossimOverviewBuilderBase(),
-      m_nullDataBuffer(0),
-      m_bytesPerPixel(1),
-      m_bitsPerSample(8),
-      m_tileWidth(0),
-      m_tileHeight(0),
-      m_tileSizeInBytes(0),
-      m_sampleFormat(0),
-      m_currentTiffDir(0),
-      m_tiffCompressType(COMPRESSION_NONE),
-      m_jpegCompressQuality(DEFAULT_COMPRESS_QUALITY),
-      m_resampleType(ossimFilterResampler::ossimFilterResampler_BOX),
-      m_nullPixelValues(),
-      m_copyAllFlag(false),
-      m_outputTileSizeSetFlag(false),
-      m_internalOverviewsFlag(false)
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimTiffOverviewBuilder::ossimTiffOverviewBuilder DEBUG:\n";
-#ifdef OSSIM_ID_ENABLED
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "OSSIM_ID:  "
-         << OSSIM_ID
-         << "\n";
-#endif
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "overview stop dimension: " << m_overviewStopDimension
-         << std::endl;
-   }
-}
-
-ossimTiffOverviewBuilder::~ossimTiffOverviewBuilder()
-{
-}
-
-void ossimTiffOverviewBuilder::setResampleType(
-   ossimFilterResampler::ossimFilterResamplerType resampleType)
-{
-   m_resampleType = resampleType;
-}
-
-bool ossimTiffOverviewBuilder::buildOverview(const ossimFilename& overview_file, bool copy_all)
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimTiffOverviewBuilder::buildOverview DEBUG:"
-         << "\noverview file: " << overview_file.c_str()
-         << "\ncopy_all flag: " << (copy_all?"true":"false")
-         << std::endl;
-   }
-
-
-   m_outputFile  = overview_file;
-   m_copyAllFlag = copy_all;
-
-   return execute();
-}
-
-
-bool ossimTiffOverviewBuilder::execute()
-{
-   static const char MODULE[] = "ossimTiffOverviewBuilder::execute";
-   
-   if (theErrorStatus == ossimErrorCodes::OSSIM_ERROR)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE << " ERROR:"
-         << "\nError status has been previously set!  Returning..."
-         << std::endl;
-      return false;
-   }
-
-   if ( !m_imageHandler || m_imageHandler->hasError() )
-   {
-      setErrorStatus();
-      return false;
-   }
-
-   m_outputFile = getOutputFile();
-   if (m_outputFile == ossimFilename::NIL)
-   {
-      return false;
-   }
-
-   // Check the file.  Disallow same file overview building.
-   if ( !buildInternalOverviews() && (m_imageHandler->getFilename() == m_outputFile) )
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "Source image file and overview file cannot be the same!"
-         << std::endl;
-      return false;
-   }
-
-   ossimFilename outputFileTemp = m_outputFile;
-   
-   if ( !buildInternalOverviews() )
-   {
-      // Add .tmp in case process gets aborted to avoid leaving bad .ovr file.
-      outputFileTemp += ".tmp";
-   }
-
-   // Required number of levels needed including r0.
-   ossim_uint32 requiedResLevels = getRequiredResLevels(m_imageHandler.get());
-
-   // Zero based starting resLevel.
-   ossim_uint32 startingResLevel  = 0;
-   if ( !copyR0() )
-   {
-      startingResLevel = m_imageHandler->getNumberOfDecimationLevels();
-   }
-   
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE
-         << "\nCurrent number of reduced res sets: "
-         << m_imageHandler->getNumberOfDecimationLevels()
-         << "\nNumber of required reduced res sets:  " << requiedResLevels
-         << "\nStarting reduced res set:    " << startingResLevel
-         << "\nResampling type:  " << getOverviewType().c_str()
-         << std::endl;
-   }
-
-   if ( startingResLevel >= requiedResLevels )
-   {
-      ossimNotify(ossimNotifyLevel_INFO)
-         << MODULE << " NOTICE:"
-         << "\nImage has required reduced resolution data sets.\nReturning..."
-         << std::endl;
-      return true;
-   }
-
-   //---
-   // If image handler is band selector, start with all bands.
-   // Some sources, e.g. ossimEnviTileSource can pick up default
-   // bands and filter out all other bands.
-   //---
-   m_imageHandler->setOutputToInputBandList();  
-   
-   //---
-   // If alpha bit mask generation was requested, then need to instantiate the mask writer object.
-   // This is simply a "transparent" tile source placed after to the right of the image handler
-   // that scans the pixels being pulled and accumulates alpha bit mask for writing at the end.
-   //---
-   if (m_bitMaskSpec.getSize() > 0)
-   {
-      m_maskWriter = new ossimBitMaskWriter();
-      m_maskWriter->loadState(m_bitMaskSpec);
-      m_maskWriter->setStartingResLevel(1);
-      ossimRefPtr<ossimBitMaskTileSource> bmts = new ossimBitMaskTileSource;
-      bmts->setAssociatedMaskWriter(m_maskWriter.get());
-      m_maskFilter = new ossimMaskFilter();
-      m_maskFilter->connectMyInputTo(m_imageHandler.get());
-      m_maskFilter->setMaskSource((ossimImageSource*)bmts.get());
-   }
-
-   ossimStdOutProgress* progressListener = 0; // Only used on master.
-   TIFF* tif = 0;                             // Only used on master.
-
-   setProcessStatus(ossimProcessInterface::PROCESS_STATUS_EXECUTING);
-   setPercentComplete(0.0);
-
-   if (ossimMpi::instance()->getRank() == 0 )
-   {
-      //---
-      // See if the file can be opened for writing.
-      // Note:  If this file existed previously it will be overwritten.
-      //---
-      tif = openTiff(outputFileTemp);
-      if (!tif)
-      {
-         // Set the error...
-         setErrorStatus();
-         ossimNotify(ossimNotifyLevel_WARN)
-            << __FILE__ << " " << __LINE__ << " " << MODULE
-            << "\nCannot open file: " << outputFileTemp << std::endl;
-         return false;
-      } 
-
-      //---
-      // Check for a listeners.  If the list is empty, add a standard out
-      // listener so that command line apps like img2rr will get some progress.
-      //---
-      ossimStdOutProgress* progressListener = 0;
-      if (theListenerList.empty())
-      {
-         progressListener = new ossimStdOutProgress(0, true);
-         addListener(progressListener);
-      }
-
-      if (startingResLevel == 0)
-      {       
-         if (!writeR0(tif))
-         {
-            // Set the error...
-            setErrorStatus();
-            ossimNotify(ossimNotifyLevel_WARN)
-               << __FILE__ << " " << __LINE__
-               << "\nError copying image!" << std::endl;
-
-            closeTiff(tif);
-            if (progressListener)
-            {
-               removeListener(progressListener);
-               delete progressListener;
-               progressListener = 0;
-            }
-            
-            if ( outputFileTemp.exists() && !buildInternalOverviews() )
-            {
-               ossimFilename::remove( outputFileTemp );
-            }
-            return false;
-         }
-
-         ++startingResLevel; // Go to r1.
-      }
-
-      if (needsAborting())
-      {
-         closeTiff(tif);
-         if (progressListener)
-         {
-            removeListener(progressListener);
-            delete progressListener;
-            progressListener = 0;
-         }
-         return false;
-      }
-      
-      TIFFFlush(tif);
-      
-   } // End of master only write of r0.
-        
-   for (ossim_uint32 i = startingResLevel; i < requiedResLevels; ++i)
-   {
-      if (ossimMpi::instance()->getRank() == 0 )
-      {
-         TIFFFlush(tif);
-      }
-
-      // Sync all processes...
-      ossimMpi::instance()->barrier();
-      
-      ossimRefPtr<ossimImageHandler> ih = 0;
-
-      //---
-      // If we copied r0 to the overview file use it instead of the
-      // original image handler as it is probably faster.
-      //---
-      if ( !copyR0() && (i <= m_imageHandler->getNumberOfDecimationLevels()) ) 
-      {
-         ih = m_imageHandler;
-      }
-      else
-      {
-         // We know we're a tiff so don't use the factory.
-         ih = new ossimTiffTileSource;
-         if ( ih->open(outputFileTemp) == false )
-         {
-            ih = 0;
-            
-            // Set the error...
-            setErrorStatus();
-            ossimNotify(ossimNotifyLevel_WARN)
-               << __FILE__ << " " << __LINE__ << " " << MODULE
-               << "\nCannot open file: " << outputFileTemp << std::endl;
-            
-            return false;
-         }
-
-         //---
-         // Since the overview file is being opened here, need to set its handler's starting res
-         // level where the original image file left off. This is usually R1 since the original
-         // file only has R0, but the original file may have more than R0:
-         //---
-         if ( !copyR0() &&  !buildInternalOverviews() )
-         {
-            ih->setStartingResLevel( m_imageHandler->getNumberOfDecimationLevels());
-         }
-      }
-      
-      // If mask is to be generated, need to notify both the writer and the reader of new 
-      // input source:
-      if (m_bitMaskSpec.getSize() > 0)
-      {
-         m_maskFilter->connectMyInputTo(0, ih.get());
-         m_maskWriter->connectMyInputTo(ih.get());
-      }
-
-      if ( !writeRn( ih.get(), tif, i, (i==startingResLevel) && !copyR0() ) )
-      {
-         // Set the error...
-         setErrorStatus();
-         ossimNotify(ossimNotifyLevel_WARN)
-            << __FILE__ << " " << __LINE__ << " " << MODULE
-            << "\nError creating reduced res set: " << i << std::endl;
-
-         ih->disconnect();
-         ih = 0;
-         if (tif)
-         {
-            closeTiff(tif);
-            tif = 0;
-         }
-
-         if (progressListener)
-         {
-            removeListener(progressListener);
-            delete progressListener;
-            progressListener = 0;
-         }
-
-         if ( outputFileTemp.exists() && !buildInternalOverviews() )
-         {
-            ossimFilename::remove( outputFileTemp );
-         }
-
-         return false;
-      }
-      
-      if (needsAborting())
-      {
-         ih->disconnect();
-         ih = 0;
-         if (tif)
-         {
-            closeTiff(tif);
-            tif = 0;
-         }
-         if (progressListener)
-         {
-            removeListener(progressListener);
-            delete progressListener;
-            progressListener = 0;
-         }
-         return false;
-      }
-      
-      if (m_bitMaskSpec.getSize() > 0)
-      {
-         m_maskFilter->disconnectMyInput(0);
-         m_maskWriter->disconnectAllInputs();
-      }
-      ih = 0;
-   }
-
-   if (ossimMpi::instance()->getRank() == 0 )
-   {
-      if (tif)
-      {
-         closeTiff(tif);
-         tif = 0;
-      }
-
-      // Write out the alpha bit mask if one was enabled:
-      if (m_maskWriter.valid())
-      {
-         ossimNotify(ossimNotifyLevel_INFO) << "Writing alpha bit mask file..." << std::endl;
-         m_maskWriter->close();
-      }
-
-      // Remove the listener if we had one.
-      if (progressListener)
-      {
-         removeListener(progressListener);
-         delete progressListener;
-         progressListener = 0;
-      }
-
-      if ( !buildInternalOverviews() )
-      {
-         outputFileTemp.rename(m_outputFile);
-      }
-      
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_INFO)
-            << "Wrote file:  " << m_outputFile.c_str() << std::endl;
-      }
-     
-      setCurrentMessage(ossimString("Finished..."));
-   }
-   
-   finalize();  // Reset band list if a band selector.
-
-   return true;
-}
-
-bool ossimTiffOverviewBuilder::writeR0(TIFF* tif)
-{
-   static const char MODULE[] = "ossimTiffOverviewBuilder::writeR0";
-
-   ossimIrect rect = m_imageHandler->getImageRectangle();
-
-   if (!setTags(tif, rect, 0))
-   {
-      closeTiff(tif);
-      ossimNotify(ossimNotifyLevel_WARN) << MODULE << " Error writing tags!" << std::endl;
-      return false;
-   }
-   
-   // Set the geotiff tags.
-   if ( setGeotiffTags(m_imageHandler->getImageGeometry().get(),
-                       m_imageHandler->getBoundingRect(),
-                       0,
-                       tif) == false )
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_NOTICE)
-            << MODULE << " NOTICE: geotiff tags not set." << std::endl;
-      } 
-   }
-   
-   ossim_int32 samples         = m_imageHandler->getNumberOfSamples();
-   ossim_int32 lines           = m_imageHandler->getNumberOfLines();
-   ossim_int32 tilesWide       = samples % m_tileWidth ?
-                           samples / m_tileWidth + 1 : samples / m_tileWidth;
-   ossim_int32 tilesHigh       = lines % m_tileHeight ?
-                           lines / m_tileHeight + 1 : lines / m_tileHeight;
-   ossim_int32 numberOfTiles   = tilesWide * tilesHigh;
-
-   int tileNumber = 0;
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimTiffOverviewBuilder::writeR0 DEBUG:"
-         << "\nsamples:        " << samples
-         << "\nlines:          " << lines
-         << "\ntilesWide:      " << tilesWide
-         << "\ntilesHigh:      " << tilesHigh
-         << "\nnumberOfTiles:  " << numberOfTiles
-         << std::endl;
-   }
-
-   setCurrentMessage(ossimString("Copying r0..."));
-   
-   //***
-   // Tile loop in the line direction.
-   //***
-   for(int i = 0; i < tilesHigh; ++i)
-   {
-      ossimIpt origin(0, 0);
-      origin.y = i * m_tileHeight;
-      
-      //***
-      // Tile loop in the sample (width) direction.
-      //***
-      for(int j = 0; j < tilesWide; ++j)
-      {
-         origin.x = j * m_tileWidth;
-
-         ossimRefPtr<ossimImageData> t =
-            m_imageHandler->getTile(ossimIrect(origin.x,
-                                                origin.y,
-                                                origin.x +(m_tileWidth-1),
-                                                origin.y +(m_tileHeight-1)));
-
-         // Check for errors reading tile:
-         if ( m_imageHandler->hasError() )
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << " ERROR: reading tile:  " << i << std::endl;
-            return false;
-         }
-
-         // If masking was enabled, pass the tile onto that object for processing:
-         if (m_maskWriter.valid())
-            m_maskWriter->generateMask(t, 0);
-
-         //***
-         // Band loop.
-         //***
-         for (uint32 band=0;
-              band < m_imageHandler->getNumberOfOutputBands();
-              ++band)
-         {
-            tdata_t data;
-            
-            if ( t.valid() && (t->getDataObjectStatus() != OSSIM_NULL) )
-            {
-               // Grab a pointer to the tile for the band.
-               data = static_cast<tdata_t>(t->getBuf(band));
-            }
-            else
-            {
-               data = static_cast<tdata_t>(&(m_nullDataBuffer.front()));
-            }
-
-            // Write the tile.
-            int bytesWritten = 0;
-            bytesWritten = TIFFWriteTile(tif,
-                                         data,
-                                         origin.x,
-                                         origin.y,
-                                         0,        // z
-                                         band);    // sample
-
-            if (bytesWritten != m_tileSizeInBytes)
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << MODULE << " ERROR:"
-                  << "Error returned writing tiff tile:  " << i
-                  << "\nExpected bytes written:  " << m_tileSizeInBytes
-                  << "\nBytes written:  " << bytesWritten
-                  << std::endl;
-               theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-               return false;
-            }
-
-         } // End of band loop.  
-        
-         ++tileNumber;
-
-      } // End of tile loop in the sample (width) direction.
-
-      if (needsAborting())
-      {
-         setPercentComplete(100.0);
-         break;
-      }
-      else
-      {
-         double tile = tileNumber;
-         double numTiles = numberOfTiles;
-         setPercentComplete(tile / numTiles * 100.0);
-      }
-
-   } // End of tile loop in the line (height) direction.
-
-   //***
-   // Write the current dirctory.
-   //***
-   if (!TIFFWriteDirectory(tif))
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE << " Error writing directory!" << std::endl;
-      return false;
-   }
-
-   ++m_currentTiffDir;
-
-   return true;
-}
-
-bool ossimTiffOverviewBuilder::writeRn( ossimImageHandler* imageHandler,
-                                        TIFF* tif,
-                                        ossim_uint32 resLevel,
-                                        bool firstResLevel )
-{
-   if ( tif ) //  && buildInternalOverviews() )
-   {
-      // Create an empty directory to start with.
-      TIFFCreateDirectory( tif );
-   }
-   else
-   {
-      return false;
-   }
-   
-   //---
-   // Set up the sequencer.  This will be one of three depending on if we're
-   // running mpi and if we are a master process or a slave process.
-   //---
-   ossimRefPtr<ossimOverviewSequencer> sequencer;
-   
-   if(ossimMpi::instance()->getNumberOfProcessors() > 1)
-   {
-      if ( ossimMpi::instance()->getRank() == 0 )
-      {
-         sequencer = new ossimMpiMasterOverviewSequencer();
-      }
-      else
-      {
-         sequencer = new ossimMpiSlaveOverviewSequencer();
-      }
-   }
-   else
-   {
-      sequencer = new ossimOverviewSequencer();
-   }
-   
-   sequencer->setImageHandler(imageHandler);
-
-   if (m_maskWriter.valid() && m_maskFilter.valid())
-   {
-      sequencer->setBitMaskObjects(m_maskWriter.get(), m_maskFilter.get());
-   }
-
-   // sourceResLevel: This is the res level to pull data from:
-   ossim_uint32 sourceResLevel = imageHandler->getNumberOfDecimationLevels() +
-      imageHandler->getStartingResLevel() - 1;
-
-   sequencer->setSourceLevel(sourceResLevel);
-   sequencer->setResampleType(m_resampleType);
-   sequencer->setTileSize( ossimIpt(m_tileWidth, m_tileHeight) );
-   
-   if ( firstResLevel )
-   {
-      // Set up things that are only performed on first scan through tiles.
-      
-      if ( getHistogramMode() != OSSIM_HISTO_MODE_UNKNOWN )
-      {
-         // Accumulate a histogram.  Can't do with mpi/multi-process.
-         if(ossimMpi::instance()->getNumberOfProcessors() == 1)
-         {
-            sequencer->setHistogramMode(getHistogramMode());
-         }
-         //---
-         // else{} Not sure if we want an error thrown here.  For now will handle at the
-         // application level.
-         //---
-      }
-      if ( getScanForMinMaxNull() == true )
-      {
-         sequencer->setScanForMinMaxNull(true);
-      }
-      else if ( getScanForMinMax() == true )
-      {
-         sequencer->setScanForMinMax(true);
-      }
-   }
-
-   // Note sequence setup must be performed before intialize. 
-   sequencer->initialize();
-
-   // If we are a slave process start the resampling of tiles.
-   if (ossimMpi::instance()->getRank() != 0 )
-   {
-      sequencer->slaveProcessTiles();
-      return true;
-   }
-
-   //---
-   // The rest of the method on master node only.
-   //---
-   static const char MODULE[] = "ossimTiffOverviewBuilder::writeRn";
-
-   ostringstream os;
-   os << "creating r" << resLevel << "...";
-   setCurrentMessage(os.str());
-
-   if (resLevel == 0)
-   {
-      return false;
-   }
-
-   ossimIrect rect;
-   sequencer->getOutputImageRectangle(rect);
-
-   if (!setTags(tif, rect, resLevel))
-   {
-      setErrorStatus();
-      closeTiff(tif);
-      tif = 0;
-      ossimNotify(ossimNotifyLevel_WARN) << MODULE << " Error writing tags!" << std::endl;
-      return false;
-   }
-
-   if ( !buildInternalOverviews() && !copyR0() && (resLevel == 1) )
-   {
-      //---
-      // Set the geotif tags for the first layer.
-      // Note this is done in writeR0 method if m_copyAllFlag is set.
-      //---
-      if ( setGeotiffTags(m_imageHandler->getImageGeometry().get(),
-                          ossimDrect(rect),
-                          resLevel,
-                          tif) == false )
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_NOTICE)
-               << MODULE << " NOTICE: geotiff tags not set." << std::endl;
-         } 
-      }
-   }
-
-   ossim_uint32 outputTilesWide = sequencer->getNumberOfTilesHorizontal();
-   ossim_uint32 outputTilesHigh = sequencer->getNumberOfTilesVertical();
-   ossim_uint32 numberOfTiles   = sequencer->getNumberOfTiles();
-   ossim_uint32 tileNumber      = 0;
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimTiffOverviewBuilder::writeRn DEBUG:"
-         << "\noutputTilesWide:  " << outputTilesWide
-         << "\noutputTilesHigh:  " << outputTilesHigh
-         << "\nnumberOfTiles:    " << numberOfTiles
-         << std::endl;
-   }
- 
-   // Tile loop in the line direction.
-   ossim_uint32 y = 0;
-
-   for(ossim_uint32 i = 0; i < outputTilesHigh; ++i)
-   {
-      // Tile loop in the sample (width) direction.
-      ossim_uint32 x = 0;
-      for(ossim_uint32 j = 0; j < outputTilesWide; ++j)
-      {
-         // Grab the resampled tile.
-         ossimRefPtr<ossimImageData> t = sequencer->getNextTile();
-
-         // Check for errors reading tile:
-         if ( sequencer->hasError() )
-         {
-            setErrorStatus();
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << " ERROR: reading tile:  " << i << std::endl;
-            return false;
-         }
-         
-         if ( t.valid() && ( t->getDataObjectStatus() != OSSIM_NULL ) )
-         {
-            // Write it to the tiff.
-            for (ossim_uint32 band = 0; band < t->getNumberOfBands(); ++band)
-            {
-               // Write the tile.
-               int bytesWritten = 0;
-               bytesWritten = TIFFWriteTile(tif,
-                                            t->getBuf(band),
-                                            x,
-                                            y,
-                                            0,        // z
-                                            band);    // sample
-               
-               if (bytesWritten != m_tileSizeInBytes)
-               {
-                  ossimNotify(ossimNotifyLevel_WARN)
-                     << MODULE << " ERROR:"
-                     << "Error returned writing tiff tile:  " << i
-                     << "\nExpected bytes written:  " << m_tileSizeInBytes
-                     << "\nBytes written:  " << bytesWritten
-                     << std::endl;
-                  theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-                  
-                  return false;
-               }
-            }
-         }
-         x += m_tileWidth; // Increment x for next TIFFWriteTile.
-         ++tileNumber;      // Increment tile number for percent complete.
-
-      } // End of tile loop in the sample (width) direction.
-
-      if (needsAborting())
-      {
-         setPercentComplete(100.0);
-         break;
-      }
-      else
-      {
-         double tile = tileNumber;
-         double numTiles = numberOfTiles;
-         setPercentComplete(tile / numTiles * 100.0);
-      }
-
-      y += m_tileHeight; // Increment y for next TIFFWriteTile.
-
-   } // End of tile loop in the line (height) direction.
-
-   //---
-   // Write the current dirctory.
-   //---
-   if (!TIFFFlush(tif))
-   {
-      setErrorStatus();
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE << " Error writing to TIF file!" << std::endl;
-      return false;
-   }
-
-   if ( firstResLevel )
-   {
-      if ( ossimMpi::instance()->getNumberOfProcessors() == 1 )
-      {
-         if ( getHistogramMode() != OSSIM_HISTO_MODE_UNKNOWN )
-         {
-            // Write the histogram.
-            ossimFilename histoFilename = getOutputFile();
-            histoFilename.setExtension("his");
-            sequencer->writeHistogram(histoFilename);
-         }
-
-         if ( ( getScanForMinMaxNull() == true ) || ( getScanForMinMax() == true ) )
-         {
-            // Write the omd file:
-            ossimFilename file = getOutputFile();
-            file = file.setExtension("omd");
-            sequencer->writeOmdFile(file);
-         }
-      }
-   }
-
-   ++m_currentTiffDir;
-
-   return true;
-}
-
-//*******************************************************************
-// Private Method:
-//*******************************************************************
-bool ossimTiffOverviewBuilder::setTags(TIFF* tif,
-                                       const ossimIrect& outputRect,
-                                       ossim_int32 resLevel) const
-{
-   if (outputRect.hasNans())
-   {
-      return false;
-   }
-   
-   ossim_int32   imageWidth      = outputRect.width();
-   ossim_int32   imageHeight     = outputRect.height();
-   int16         samplesPerPixel = m_imageHandler->getNumberOfOutputBands();
-   ossim_float64 minSampleValue  = m_imageHandler->getMinPixelValue();
-   ossim_float64 maxSampleValue  = m_imageHandler->getMaxPixelValue();
-
-   if (resLevel)
-   {
-      TIFFSetField( tif, TIFFTAG_SUBFILETYPE, FILETYPE_REDUCEDIMAGE );
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimTiffOverviewBuilder::setTags DEBUG:"
-         << "\nrrds_level:      " << resLevel
-         << "\nimageWidth:      " << imageWidth
-         << "\nimageHeight:     " << imageHeight
-         << "\nminSampleValue:  " << minSampleValue
-         << "\nmaxSampleValue:  " << maxSampleValue
-         << std::endl;
-   }
-   TIFFSetField( tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_SEPARATE );
-   TIFFSetField( tif, TIFFTAG_IMAGEWIDTH, imageWidth);
-   TIFFSetField( tif, TIFFTAG_IMAGELENGTH, imageHeight);
-   TIFFSetField( tif, TIFFTAG_BITSPERSAMPLE, m_bitsPerSample );
-   TIFFSetField( tif, TIFFTAG_SAMPLEFORMAT, m_sampleFormat );
-   TIFFSetField( tif, TIFFTAG_SAMPLESPERPIXEL, samplesPerPixel );
-
-   if( m_imageHandler->getNumberOfInputBands() == 3 )
-      TIFFSetField( tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB );
-   else
-      TIFFSetField( tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK );
-   
-   TIFFSetField( tif, TIFFTAG_TILEWIDTH,  m_tileWidth  );
-   TIFFSetField( tif, TIFFTAG_TILELENGTH, m_tileHeight );
-
-   //---
-   // Only turn on compression for 8 bit, one or three band data.  Not sure what compression
-   // types can handle what but this was crashing ossim-prepoc on a directory walk with jpeg
-   // compression.
-   //---
-   if ( ( m_imageHandler->getOutputScalarType() == OSSIM_UINT8 ) &&
-        ( ( m_imageHandler->getNumberOfInputBands() == 3 ) ||
-          ( m_imageHandler->getNumberOfInputBands() == 1 ) ) )
-   {
-      // Set the compression related tags...
-      TIFFSetField( tif, TIFFTAG_COMPRESSION, m_tiffCompressType );
-      if (m_tiffCompressType == COMPRESSION_JPEG)
-      {
-         TIFFSetField( tif, TIFFTAG_JPEGQUALITY,  m_jpegCompressQuality);
-      }
-   }
-   else
-   {
-      if ( traceDebug() && (m_tiffCompressType != COMPRESSION_NONE ) )
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimTiffOverviewBuilder::setTags WARNING:\n"
-            << "Compression not set for this data type:\n"
-            << "scalar type: "
-            << ossimScalarTypeLut::instance()->getEntryString(
-               m_imageHandler->getOutputScalarType())
-            << "\nband count: " << m_imageHandler->getNumberOfInputBands()
-            << std::endl;
-      }
-      TIFFSetField( tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE );
-   }
-   
-   // Set the min/max values.
-   switch( m_imageHandler->getOutputScalarType() )
-   {
-      case OSSIM_SINT16:
-      case OSSIM_FLOAT32:
-      case OSSIM_FLOAT64:
-      case OSSIM_NORMALIZED_DOUBLE:
-         TIFFSetField( tif, TIFFTAG_SMINSAMPLEVALUE, minSampleValue );
-         TIFFSetField( tif, TIFFTAG_SMAXSAMPLEVALUE, maxSampleValue );
-         break;
-
-      case OSSIM_UINT8:
-      case OSSIM_USHORT11:
-      case OSSIM_UINT16:
-      case OSSIM_UINT32:
-      default:
-         TIFFSetField( tif, TIFFTAG_MINSAMPLEVALUE,
-                       static_cast<int>(minSampleValue) );
-         TIFFSetField( tif, TIFFTAG_MAXSAMPLEVALUE,
-                       static_cast<int>(maxSampleValue) );
-         break;
-   }
-   
-    return true;
-}
-
-bool ossimTiffOverviewBuilder::setGeotiffTags(const ossimImageGeometry* geom,
-                                              const ossimDrect& boundingRect,
-                                              ossim_uint32 resLevel,
-                                              TIFF* tif)
-{
-   bool result = false;
-
-   if ( geom && tif )
-   {
-      const ossimProjection* proj = geom->getProjection();
-      if (proj)
-      {
-         // Must duplicate if changing scale.
-         ossimObject* obj = proj->dup();
-         ossimMapProjection* mapProj = PTR_CAST(ossimMapProjection, obj);
-         if ( mapProj )
-         {
-            if ( mapProj->hasModelTransform() == false )
-            {
-               if (resLevel)
-               {
-                  ossim_float64 factor = (ossim_float64)(1 << resLevel);
-                  mapProj->applyScale(ossimDpt(factor, factor), true);
-               }
-               ossimRefPtr<ossimMapProjectionInfo> projInfo =
-                  new ossimMapProjectionInfo(mapProj, boundingRect);
-               result = ossimGeoTiff::writeTags(tif, projInfo);
-            }
-         }
-         delete obj; // Cleanup from dup.
-         obj = 0;
-      }
-   }
-   
-   return result;
-}
-
-TIFF* ossimTiffOverviewBuilder::openTiff(const ossimString& filename) const
-{
-   ossimString openMode;
-   if ( !buildInternalOverviews() )
-   {
-      openMode = "w";
-
-      ossim_uint64 fourGigs = (static_cast<ossim_uint64>(1024)*
-                               static_cast<ossim_uint64>(1024)*
-                               static_cast<ossim_uint64>(1024)*
-                               static_cast<ossim_uint64>(4));
-      ossimIrect bounds = m_imageHandler->getBoundingRect();
-      ossim_uint64 byteCheck =
-         (static_cast<ossim_uint64>(bounds.width())*
-          static_cast<ossim_uint64>(bounds.height())*
-          static_cast<ossim_uint64>(m_imageHandler->getNumberOfOutputBands())*
-          static_cast<ossim_uint64>(ossim::scalarSizeInBytes(m_imageHandler->
-                                                             getOutputScalarType())));
-         
-      if((byteCheck*static_cast<ossim_uint64>(2))>fourGigs)
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG) << " Big tiff activated\n";
-         }
-         openMode += "8";
-      }
-      else
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG) << " No big tiff activated\n";
-         }
-      }
-   }
-   else
-   {
-      openMode = "r+"; // Append to existing file...
-   }
-
-   // Open:
-   return XTIFFOpen( filename.c_str(), openMode.c_str() );
-}
-
-void ossimTiffOverviewBuilder::closeTiff(TIFF* tif)
-{
-   XTIFFClose( tif );
-}
-
-void ossimTiffOverviewBuilder::setCompressionType(ossim_uint16 compression_type)
-{
-   switch (compression_type)
-   {
-   case COMPRESSION_JPEG:
-   case COMPRESSION_LZW:
-   case COMPRESSION_DEFLATE:
-   case COMPRESSION_PACKBITS:
-      m_tiffCompressType = compression_type;
-      break;
-   default:
-      m_tiffCompressType = COMPRESSION_NONE;
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << __FILE__ << " " << __LINE__
-            << "\nossimTiffOverviewBuilder::setCompressionType Unsupported compression type: "
-            << compression_type << "\nDefaulting to none."
-            << std::endl;
-      }
-      break;
-   }
-}
-
-void ossimTiffOverviewBuilder::setJpegCompressionQuality(ossim_int32 quality)
-{
-   if (quality > 1 && quality < 101)
-   {
-      m_jpegCompressQuality = quality;
-   }
-   else
-   {
-      m_jpegCompressQuality = DEFAULT_COMPRESS_QUALITY;
-
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimTiffOverviewBuilder::setJpegCompressionQuality\n"
-         << "\nCompression quality of " << quality << " is out of range!"
-         << "\nRange is 100 to 1.  Current quality set to default of 75."
-         << std::endl;
-   }
-}
-
-bool ossimTiffOverviewBuilder::getCopyAllFlag() const
-{
-   return m_copyAllFlag;
-}
-
-void ossimTiffOverviewBuilder::setCopyAllFlag(bool flag)
-{
-   m_copyAllFlag = flag;
-}
-
-void ossimTiffOverviewBuilder::setInternalOverviewsFlag( bool flag )
-{
-   m_internalOverviewsFlag = flag;
-}
-
-bool ossimTiffOverviewBuilder::getInternalOverviewsFlag() const
-{
-   return m_internalOverviewsFlag;
-}
-
-ossimObject* ossimTiffOverviewBuilder::getObject()
-{
-   return this;
-}
-
-const ossimObject* ossimTiffOverviewBuilder::getObject() const
-{
-   return this;
-}
-
-void ossimTiffOverviewBuilder::setOutputFile(const ossimFilename& file)
-{
-   m_outputFile = file;
-}
-
-ossimFilename ossimTiffOverviewBuilder::getOutputFile() const
-{
-   ossimFilename result;
-
-   if ( buildInternalOverviews() )
-   {
-      // m_imageHandler pointer good if buildInternalOverviews() returns true.
-      result = m_imageHandler->getFilename();
-   }
-   else
-   {
-      result = m_outputFile;
-   }
-
-   if (m_outputFile == ossimFilename::NIL)
-   {
-      if ( m_imageHandler.valid() )
-      {
-         bool usePrefix = (m_imageHandler->getNumberOfEntries()>1?true:false);
-         result = m_imageHandler->
-            getFilenameWithThisExtension(ossimString("ovr"), usePrefix);
-      }
-   }
-   
-   return result;
-}
-
-void ossimTiffOverviewBuilder::setOutputTileSize(const ossimIpt& tileSize)
-{
-   m_tileWidth  = tileSize.x;
-   m_tileHeight = tileSize.y;
-   m_outputTileSizeSetFlag = true;
-}
-
-bool ossimTiffOverviewBuilder::setInputSource(ossimImageHandler* imageSource)
-{
-   static const char MODULE[] = "ossimTiffOverviewBuilder::initializeFromHandler";
-
-   bool result = ossimOverviewBuilderBase::setInputSource( imageSource );
-   
-   if ( result )
-   {
-      if(!m_outputTileSizeSetFlag)
-      {
-         ossimIpt tileSize;
-         ossim::defaultTileSize(tileSize);
-         m_tileWidth  = tileSize.x;
-         m_tileHeight = tileSize.y;
-      }
-      
-      if (traceDebug())
-      {
-         CLOG << "DEBUG:"
-              << "\nm_tileWidth:   " << m_tileWidth
-              << "\nm_tileHeight:  " << m_tileHeight
-              << "\nSource image is tiled:  "
-              << (m_imageHandler->isImageTiled()?"true":"false")
-              << "\nm_imageHandler->getTileWidth():  "
-              << m_imageHandler->getTileWidth()
-              << "\nm_imageHandler->getTileHeight():  "
-              << m_imageHandler->getTileHeight()
-              << "\nm_imageHandler->getImageTileWidth():  "
-              << m_imageHandler->getImageTileWidth()
-              << "\nm_imageHandler->getImageTileHeight():  "
-              << m_imageHandler->getImageTileHeight()
-              << std::endl;
-      }
-
-      switch(m_imageHandler->getOutputScalarType())
-      {
-         case OSSIM_UINT8:
-            m_bitsPerSample = 8;
-            m_bytesPerPixel = 1;
-            m_sampleFormat  = SAMPLEFORMAT_UINT;
-            break;
-            
-         case OSSIM_USHORT11:
-         case OSSIM_UINT16:
-            m_bitsPerSample = 16;
-            m_bytesPerPixel = 2;
-            m_sampleFormat  = SAMPLEFORMAT_UINT;
-            break;
-            
-         case OSSIM_SINT16:
-            m_bitsPerSample = 16;
-            m_bytesPerPixel = 2;
-            m_sampleFormat  = SAMPLEFORMAT_INT;
-            break;
-            
-         case OSSIM_SINT32:
-            m_bitsPerSample = 32;
-            m_bytesPerPixel = 4;
-            m_sampleFormat  = SAMPLEFORMAT_INT;
-            break;
-            
-         case OSSIM_UINT32:
-            m_bitsPerSample = 32;
-            m_bytesPerPixel = 4;
-            m_sampleFormat  = SAMPLEFORMAT_UINT;
-            break;
-            
-         case OSSIM_FLOAT32:
-            m_bitsPerSample = 32;
-            m_bytesPerPixel = 4;
-            m_sampleFormat  = SAMPLEFORMAT_IEEEFP;
-            break;
-            
-         case OSSIM_NORMALIZED_DOUBLE:
-         case OSSIM_FLOAT64:
-            m_bitsPerSample = 64;
-            m_bytesPerPixel = 8;
-            m_sampleFormat  = SAMPLEFORMAT_IEEEFP;
-            break;
-            
-         default:
-            // Set the error...
-            setErrorStatus();
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << " ERROR:"
-               << "\nUnknow pixel type:  "
-               << (ossimScalarTypeLut::instance()->
-                   getEntryString(m_imageHandler->getOutputScalarType()))
-               << std::endl;
-            result = false;
-      }
-
-      if ( result )
-      {
-         m_tileSizeInBytes = m_tileWidth * m_tileHeight * m_bytesPerPixel;
-         
-         //---
-         // Make a buffer to pass to pass to the write tile methods when an image
-         // handler returns a null tile.
-         //---
-         m_nullDataBuffer.resize(m_tileSizeInBytes);
-      
-         // Fill it with zeroes.
-         std::fill(m_nullDataBuffer.begin(), m_nullDataBuffer.end(), 0);
-      }
-   }
-   else
-   {
-      // Set the error...
-      setErrorStatus();
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE << " ERROR:"
-         << "\nSetting image handler as input failed!"
-         << std::endl;
-   }
-
-   return result;
-
-} // End: ossimTiffOverviewBuilder::setInputSource(ossimImageHandler* imageSource)
-
-bool ossimTiffOverviewBuilder::setOverviewType(const ossimString& type)
-{
-   bool result = true;
-   if (type == "ossim_tiff_nearest")
-   {
-      m_resampleType =
-         ossimFilterResampler::ossimFilterResampler_NEAREST_NEIGHBOR;
-   }
-   else if (type == "ossim_tiff_box")
-   {
-      m_resampleType = ossimFilterResampler::ossimFilterResampler_BOX;
-   }
-   else
-   {
-      result = false;
-   }
-   return result;
-}
-
-ossimString ossimTiffOverviewBuilder::getOverviewType() const
-{
-   ossimString type;
-   if (m_resampleType == ossimFilterResampler::ossimFilterResampler_NEAREST_NEIGHBOR)
-   {
-      type = "ossim_tiff_nearest";
-   }
-   else
-   {
-      type = "ossim_tiff_box"; // This is default...
-   }
-   return type;
-}
-
-void ossimTiffOverviewBuilder::getTypeNameList(
-   std::vector<ossimString>& typeList)const
-{
-   typeList.push_back(ossimString("ossim_tiff_box"));
-   typeList.push_back(ossimString("ossim_tiff_nearest"));
-}
-
-void ossimTiffOverviewBuilder::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if ( property.valid() )
-   {
-      if(property->getName() == ossimKeywordNames::COMPRESSION_QUALITY_KW)
-      {
-         m_jpegCompressQuality = property->valueToString().toInt32();
-      }
-      else if(property->getName() == ossimKeywordNames::COMPRESSION_TYPE_KW)
-      {
-         ossimString value = property->valueToString();
-         value = value.downcase();
-         if(value == "jpeg")
-         {
-            m_tiffCompressType =  COMPRESSION_JPEG;
-         }
-         else if(value == "lzw")
-         {
-            m_tiffCompressType =  COMPRESSION_LZW;
-            
-         }
-         else if(value == "deflate")
-         {
-            m_tiffCompressType =  COMPRESSION_DEFLATE;
-         }
-         else if(value == "packbits")
-         {
-            m_tiffCompressType =  COMPRESSION_PACKBITS;
-         }
-         else
-         {
-            m_tiffCompressType = COMPRESSION_NONE;
-         }
-      }
-      else if(property->getName() == COPY_ALL_KW)
-      {
-         m_copyAllFlag = property->valueToString().toBool();
-      }
-      else if( property->getName() == INTERNAL_OVERVIEWS_KW )
-      {
-         m_internalOverviewsFlag = property->valueToString().toBool();
-      }
-      else if(property->getName() == ossimKeywordNames::OVERVIEW_STOP_DIMENSION_KW)
-      {
-         m_overviewStopDimension = property->valueToString().toUInt32();
-      }
-      else if(property->getName() == ossimKeywordNames::OUTPUT_TILE_SIZE_KW)
-      {
-         ossimIpt ipt;
-         
-         ipt.toPoint(property->valueToString());
-         
-         setOutputTileSize(ipt);
-      }
-   }
-}
-
-void ossimTiffOverviewBuilder::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   propertyNames.push_back(ossimKeywordNames::COMPRESSION_QUALITY_KW);
-   propertyNames.push_back(ossimKeywordNames::COMPRESSION_TYPE_KW);
-   propertyNames.push_back(COPY_ALL_KW);
-   propertyNames.push_back(INTERNAL_OVERVIEWS_KW);
-   propertyNames.push_back(ossimKeywordNames::OVERVIEW_STOP_DIMENSION_KW);
-}
-
-bool ossimTiffOverviewBuilder::canConnectMyInputTo(
-   ossim_int32 index,
-   const ossimConnectableObject* obj) const
-{
-   if ( (index == 0) &&
-        PTR_CAST(ossimImageHandler, obj) )
-   {
-      return true;
-   }
-
-   return false;
-}
-
-bool ossimTiffOverviewBuilder::buildInternalOverviews() const
-{
-   bool result = false;
-   if ( m_internalOverviewsFlag &&  m_imageHandler.valid() )
-   {
-      if ( m_imageHandler->getClassName() == "ossimTiffTileSource" )
-      {
-         result = true;
-      }
-      else
-      {
-         ossimNotify(ossimNotifyLevel_NOTICE)
-            << "Internal overviews opton not supported for class: "
-            << m_imageHandler->getClassName()
-            << std::endl;
-      }
-   }
-   return result;
-}
-
-bool ossimTiffOverviewBuilder::copyR0() const
-{
-   return ( m_copyAllFlag && !buildInternalOverviews());
-}
diff --git a/src/ossim/imaging/ossimTiffTileSource.cpp b/src/ossim/imaging/ossimTiffTileSource.cpp
deleted file mode 100644
index e53064f..0000000
--- a/src/ossim/imaging/ossimTiffTileSource.cpp
+++ /dev/null
@@ -1,2691 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//          Frank Warmerdam (warmerdam at pobox.com)
-//
-// Description:
-//
-// Contains class definition for TiffTileSource.
-//
-//*******************************************************************
-//  $Id: ossimTiffTileSource.cpp 22282 2013-06-09 14:57:06Z dburken $
-
-#include <ossim/imaging/ossimTiffTileSource.h>
-#include <ossim/support_data/ossimGeoTiff.h>
-#include <ossim/support_data/ossimTiffInfo.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimPreferences.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimIoStream.h> /* for ossimIOMemoryStream */
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimEllipsoid.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimBooleanProperty.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <xtiffio.h>
-#include <geo_normalize.h>
-#include <cstdlib> /* for abs(int) */
-
-RTTI_DEF1(ossimTiffTileSource, "ossimTiffTileSource", ossimImageHandler)
-
-static ossimTrace traceDebug("ossimTiffTileSource:debug");
-
-#define OSSIM_TIFF_UNPACK_R4(value) ( (value)&0x000000FF)
-#define OSSIM_TIFF_UNPACK_G4(value) ( ((value)>>8)&0x000000FF)
-#define OSSIM_TIFF_UNPACK_B4(value) ( ((value)>>16)&0x000000FF)
-#define OSSIM_TIFF_UNPACK_A4(value) ( ((value)>>24)&0x000000FF)
-
-//---
-// OSSIM_BUFFER_SCAN_LINE_READS:
-// If set to 1 ossimTiffTileSource::loadFromScanLine method will buffer image
-// width by tile height.  If set to 0 one line will be read at a time which
-// conserves memory on wide images or tall tiles.
-//
-// Buffered read is faster but uses more memory. Non-buffered slower less
-// memory.
-//
-// Only affects reading strip tiffs.
-//---
-#define OSSIM_BUFFER_SCAN_LINE_READS 1
-
-//*******************************************************************
-// Public Constructor:
-//*******************************************************************
-ossimTiffTileSource::ossimTiffTileSource()
-   :
-      ossimImageHandler(),
-      theTiffPtr(0),
-      theTile(0),
-      theBuffer(0),
-      theBufferSize(0),
-      theBufferRect(0, 0, 0, 0),
-      theBufferRLevel(0),
-      theCurrentTileWidth(0),
-      theCurrentTileHeight(0),
-      theSamplesPerPixel(0),
-      theBitsPerSample(0),
-      theSampleFormatUnit(0),
-      theMaxSampleValue(ossim::nan()),
-      theMinSampleValue(ossim::nan()),
-      theNullSampleValue(ossim::nan()),
-      theNumberOfDirectories(0),
-      theCurrentDirectory(0),
-      theR0isFullRes(false),
-      theBytesPerPixel(0),
-      theScalarType(OSSIM_SCALAR_UNKNOWN),
-      theApplyColorPaletteFlag(true),
-      theImageWidth(0),
-      theImageLength(0),
-      theReadMethod(0),
-      thePlanarConfig(0),
-      thePhotometric(0),
-      theRowsPerStrip(0),
-      theImageTileWidth(0),
-      theImageTileLength(0),
-      theImageDirectoryList(0),
-      theCurrentTiffRlevel(0),
-      theCompressionType(0),
-      theOutputBandList(0)
-{}
-
-ossimTiffTileSource::~ossimTiffTileSource()
-{
-   close();
-}
-
-ossimRefPtr<ossimImageData> ossimTiffTileSource::getTile(
-   const ossimIrect& tile_rect, ossim_uint32 resLevel )
-{
-   if ( theTile.valid() == false )
-   {
-      allocateTile(); // First time through...
-   }
-   
-   if ( theTile.valid() )
-   {
-      // Image rectangle must be set prior to calling getTile.
-      theTile->setImageRectangle(tile_rect);
-
-      if ( getTile( theTile.get(), resLevel ) == false )
-      {
-         if (theTile->getDataObjectStatus() != OSSIM_NULL)
-         {
-            theTile->makeBlank();
-         }
-      }
-   }
-
-   return theTile;
-}
-
-bool ossimTiffTileSource::getTile(ossimImageData* result,
-                                  ossim_uint32 resLevel)
-{
-   static const char MODULE[] = "ossimTiffTileSource::getTile(ossimImageData*, resLevel)";
-
-   bool status = false;
-   
-   //---
-   // Not open, this tile source bypassed, or invalid res level,
-   // return a blank tile.
-   //---
-   if( isOpen() && isSourceEnabled() && isValidRLevel(resLevel) &&
-       result && (result->getNumberOfBands() == getNumberOfOutputBands()) )
-   {
-      result->ref(); // Increment ref count.
-      
-      //---
-      // Check for overview tile.  Some overviews can contain r0 so always
-      // call even if resLevel is 0.  Method returns true on success, false
-      // on error.
-      //---
-      status = getOverviewTile(resLevel, result);
-
-      if (!status) // Did not get an overview tile.
-      {
-         status = true;
-         
-         ossim_uint32 level = resLevel;
-
-         //---
-         // If we have r0 our reslevels are the same as the callers so
-         // no adjustment necessary.
-         //---
-         if (theStartingResLevel && !theR0isFullRes) // Used as overview.
-         {
-            //---
-            // If we have r0 our reslevels are the same as the callers so
-            // no adjustment necessary.
-            //---
-            if (level >= theStartingResLevel)
-            {
-               //---
-               // Adjust the level to be relative to the reader using this
-               // as overview.
-               //---
-               level -= theStartingResLevel; 
-            }
-         }
-
-         ossimIrect tile_rect = result->getImageRectangle();
-
-         //---
-         // This should be the zero base image rectangle for this res level.
-         // Note passed the non adjusted resLevel by design.
-         //---
-         ossimIrect image_rect = getImageRectangle(resLevel);
-
-         // See if any point of the requested tile is in the image.
-         if ( tile_rect.intersects(image_rect) )
-         {
-            // Initialize the tile if needed as we're going to stuff it.
-            if (result->getDataObjectStatus() == OSSIM_NULL)
-            {
-               result->initialize();
-            }
-
-            bool reallocateBuffer = false;   
-            if ( (tile_rect.width()  != theCurrentTileWidth) ||
-                 (tile_rect.height() != theCurrentTileHeight) )
-            {
-               // Current tile size must be set prior to allocatBuffer call.
-               theCurrentTileWidth = tile_rect.width();
-               theCurrentTileHeight = tile_rect.height();
-               
-               reallocateBuffer = true;
-            }
-            
-            if (getCurrentTiffRLevel() != theImageDirectoryList[level])
-            {
-               status = setTiffDirectory(theImageDirectoryList[level]);
-               if (status)
-               {
-                  reallocateBuffer = true;
-               }
-            }
-
-            if (status)
-            {
-               if (reallocateBuffer)
-               {
-                  // NOTE: Using this buffer will be a thread issue. (drb) 
-                  status = allocateBuffer();
-               }
-            }
-
-            if ( status )
-            {  
-               ossimIrect clip_rect = tile_rect.clipToRect( image_rect );
-               
-               if ( !tile_rect.completely_within( clip_rect ) )
-               {
-                  //---
-                  // We're not going to fill the whole tile so start with a
-                  // blank tile.
-                  //---
-                  result->makeBlank();
-               }
-               
-               // Load the tile buffer with data from the tif.
-               if ( loadTile( tile_rect, clip_rect, result ) )
-               {
-                  result->validate();
-                  status = true;
-               }
-               else
-               {
-                  // Would like to change this to throw ossimException.(drb)
-                  status = false;
-                  if(traceDebug())
-                  {
-                     // Error in filling buffer.
-                     ossimNotify(ossimNotifyLevel_WARN)
-                        << MODULE
-                        << " Error filling buffer. Return status = false..."
-                        << std::endl;
-                  }
-               }
-
-            } // matches: if (status)
-               
-         } // matches:  if ( zeroBasedTileRect.intersects(image_rect) )
-         else 
-         {
-            // No part of requested tile within the image rectangle.
-            status = true; // Not an error.
-            result->makeBlank();
-         }
-         
-      } // matches: if (!status)
-      
-      result->unref(); // Decrement ref count.
-      
-   } // matches: if( isOpen() && isSourceEnabled() && isValidRLevel(level) )
-
-   return status;
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-bool ossimTiffTileSource::saveState(ossimKeywordlist& kwl,
-                                    const char* prefix) const
-{
-   bool result = ossimImageHandler::saveState(kwl, prefix);
-   
-   if ( result )
-   {
-      if ( isBandSelector() && theOutputBandList.size() )
-      {
-         if ( isIdentityBandList( theOutputBandList ) == false )
-         {
-            // If we're not identity output the bands.
-            ossimString bandsString;
-            ossim::toSimpleStringList(bandsString, theOutputBandList);
-            kwl.add(prefix,
-                    ossimKeywordNames::BANDS_KW,
-                    bandsString,
-                    true);
-         }
-      }
-      
-      kwl.add(prefix,
-              "apply_color_palette_flag",
-              theApplyColorPaletteFlag,
-              true);
-   }
-   
-   return result;
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-bool ossimTiffTileSource::loadState(const ossimKeywordlist& kwl,
-                                    const char* prefix)
-{
-   bool result = false;
-   theOutputBandList.clear();
-
-   if (ossimImageHandler::loadState(kwl, prefix))
-   {
-      std::string pfx = ( prefix ? prefix : "" );
-      std::string key = "apply_color_palette_flag";
-      ossimString value;
-      
-      value.string() = kwl.findKey( pfx, key );
-      if ( value.size() )
-      {
-         theApplyColorPaletteFlag = value.toBool();
-      }
-      else
-      {
-         theApplyColorPaletteFlag = true;
-      }
-
-      key = ossimKeywordNames::BANDS_KW;
-      value.string() = kwl.findKey( pfx, key );
-      if ( value.size() )
-      {
-         ossim::toSimpleVector( theOutputBandList, value );
-      }
-      
-      if ( open() ) 
-      {
-         // Set the band list after open so that the overview also gets set.
-         result = true;
-      }
-   }
-   return result;
-}
-
-bool ossimTiffTileSource::open(const ossimFilename& image_file)
-{
-   if (theTiffPtr)
-   {
-     close();
-   }
-   theImageFile = image_file;
-   return open();
-}
-
-void ossimTiffTileSource::close()
-{
-   if(theTiffPtr)
-   {
-      XTIFFClose(theTiffPtr);
-      theTiffPtr = 0;
-   }
-   theImageWidth.clear();
-   theImageLength.clear();
-   theReadMethod.clear();
-   thePlanarConfig.clear();
-   thePhotometric.clear();
-   theRowsPerStrip.clear();
-   theImageTileWidth.clear();
-   theImageTileLength.clear();
-   if (theBuffer)
-   {
-      delete [] theBuffer;
-      theBuffer = 0;
-      theBufferSize = 0;
-   }
-   ossimImageHandler::close();
-}
-
-bool ossimTiffTileSource::open()
-{
-   static const char MODULE[] = "ossimTiffTileSource::open";
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " Entered..."
-         << "\nFile:  " << theImageFile.c_str() << std::endl;
-   }
-
-   if(isOpen())
-   {
-     close();
-   }
-
-   // Check for empty file name.
-   if (theImageFile.empty())
-   {
-      return false;
-   }
-#if 0  
-   // First we do a quick test to see if the file looks like a tiff file.
-   FILE		*fp;
-   unsigned char header[2];
-
-   fp = fopen( theImageFile.c_str(), "rb" );
-   if( fp == NULL )
-       return false;
-
-   fread( header, 2, 1, fp );
-   fclose( fp );
-
-   if( (header[0] != 'M' || header[1] != 'M')
-       && (header[0] != 'I' || header[1] != 'I') )
-       return false;
-#endif
-   
-   theImageDirectoryList.clear();
-
-   //---
-   // Note:  The 'm' in "rm" is to tell TIFFOpen to not memory map the file.
-   //---
-   theTiffPtr = XTIFFOpen(theImageFile.c_str(), "rm");
-   if (!theTiffPtr)
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << MODULE << " ERROR:\n"
-            << "libtiff could not open..." << std::endl;
-      }
-      return false;
-   }
-
-   theCompressionType = COMPRESSION_NONE;
-   //***
-   // Get the general tiff info.
-   //***
-   if(!TIFFGetField(theTiffPtr, TIFFTAG_COMPRESSION, &theCompressionType))
-   {
-      theCompressionType = COMPRESSION_NONE;
-   }
-
-   //***
-   // See if the first directory is of FILETYPE_REDUCEDIMAGE; if not,
-   // the first level is considered to be full resolution data.
-   // Note:  If the tag is not present, consider the first level full
-   // resolution.
-   //***
-   theImageDirectoryList.push_back(0);
-   ossim_uint32 sub_file_type;
-   if ( !TIFFGetField( theTiffPtr,
-                       TIFFTAG_SUBFILETYPE ,
-                       &sub_file_type ) )
-   {
-      sub_file_type = 0;
-   }
-
-   if (sub_file_type == FILETYPE_REDUCEDIMAGE)
-   {
-      theR0isFullRes = false;
-   }
-   else
-   {
-      theR0isFullRes = true;
-   }
-   
-   if( !TIFFGetField(theTiffPtr, TIFFTAG_BITSPERSAMPLE, &(theBitsPerSample)) )
-   {
-      theBitsPerSample = 8;
-   }
-
-   if( !TIFFGetField(theTiffPtr,
-                     TIFFTAG_SAMPLESPERPIXEL,
-                     &theSamplesPerPixel ) )
-   {
-      theSamplesPerPixel = 1; 
-   }
-
-   if ( !TIFFGetField( theTiffPtr,
-                       TIFFTAG_SAMPLEFORMAT,
-                       &theSampleFormatUnit ) )
-   {
-      theSampleFormatUnit = 0;
-   }
-
-   if ( !TIFFGetField( theTiffPtr,
-                       TIFFTAG_SMAXSAMPLEVALUE,
-                       &theMaxSampleValue ) )
-   {
-      uint16 maxValue = 0;
-      if(!TIFFGetField( theTiffPtr,
-                        TIFFTAG_MAXSAMPLEVALUE,
-                        &maxValue))
-      {
-         //---
-         // This will be reset in validateMinMax method.  Can't set right now because we
-         // don't know the scalar type yet.
-         //---
-         theMaxSampleValue = ossim::nan();
-      }
-      else
-      {
-         theMaxSampleValue = maxValue;
-      }
-   }
-
-   if ( !TIFFGetField( theTiffPtr,
-                       TIFFTAG_SMINSAMPLEVALUE,
-                       &theMinSampleValue ) )
-   {
-      uint16 minValue = 0;
-      if(!TIFFGetField( theTiffPtr,
-                        TIFFTAG_MINSAMPLEVALUE,
-                        &minValue))
-      {
-         //---
-         // This will be reset in validateMinMax method.  Can't set right now because we
-         // don't know the scalar type yet.
-         //--- 
-         theMinSampleValue = ossim::nan();
-      }
-      else
-      {
-         theMinSampleValue = minValue;
-      }
-   }
-
-   if (traceDebug())
-   {
-      CLOG << "DEBUG:"
-           << "\ntheMinSampleValue:  " << theMinSampleValue
-           << "\ntheMaxSampleValue:  " << theMaxSampleValue
-           << endl;
-   }
-
-   // Get the number of directories.
-   theNumberOfDirectories = TIFFNumberOfDirectories(theTiffPtr);
-
-   // Current dir.
-   theCurrentDirectory = TIFFCurrentDirectory(theTiffPtr);
-
-   theImageWidth.resize(theNumberOfDirectories);
-   theImageLength.resize(theNumberOfDirectories);
-   theReadMethod.resize(theNumberOfDirectories);
-   thePlanarConfig.resize(theNumberOfDirectories);
-   thePhotometric.resize(theNumberOfDirectories);
-   theRowsPerStrip.resize(theNumberOfDirectories);
-   theImageTileWidth.resize(theNumberOfDirectories);
-   theImageTileLength.resize(theNumberOfDirectories);
-
-   for (ossim_uint32 dir=0; dir<theNumberOfDirectories; ++dir)
-   {
-      if (setTiffDirectory(dir) == false)
-      {
-         return false;
-      }
-
-      // Note: Need lines, samples before acceptAsRrdsLayer check.
-      
-      // lines:
-      if ( !TIFFGetField( theTiffPtr,
-                          TIFFTAG_IMAGELENGTH,
-                          &theImageLength[dir] ) )
-      {
-         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-         ossimNotify(ossimNotifyLevel_WARN)
-            << MODULE << " Cannot determine image length."
-            << endl;
-      }
-
-      // samples:
-      if ( !TIFFGetField( theTiffPtr,
-                          TIFFTAG_IMAGEWIDTH,
-                          &theImageWidth[dir] ) )
-      {
-         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-         ossimNotify(ossimNotifyLevel_WARN)
-            << MODULE << " Cannot determine image width."
-            << endl;
-      }
-      
-      if ( !TIFFGetField( theTiffPtr,
-                         TIFFTAG_SUBFILETYPE ,
-                         &sub_file_type ) )
-      {
-         sub_file_type = 0;
-      }
-
-      if (sub_file_type == FILETYPE_REDUCEDIMAGE)
-      {
-         //---
-         // Check for a thumbnail image.  If present don't use as it will mess with
-         // overviews.  Currently only checking if it's a two directory image, i.e. a full
-         // res and a thumbnail.
-         // 
-         // Note this shuts off the thumbnail which someone may want to see.  We could make
-         // this a reader prop if it becomes an issue. drb - 09 Jan. 2012.
-         //---
-         if ( dir!=0 )
-         {
-            bool acceptAsRrdsLayer = true;
-            if ( ( theNumberOfDirectories == 2 ) && ( dir == 1 ) )
-            {
-               acceptAsRrdsLayer = isPowerOfTwoDecimation(dir);
-            }
-
-            if ( acceptAsRrdsLayer )
-            {
-               theImageDirectoryList.push_back(dir);
-            }
-         }
-      }
-      
-      if( !TIFFGetField( theTiffPtr, TIFFTAG_PLANARCONFIG,
-                         &(thePlanarConfig[dir]) ) )
-      {
-         thePlanarConfig[dir] = PLANARCONFIG_CONTIG;
-      }
-      
-      if( !TIFFGetField( theTiffPtr, TIFFTAG_PHOTOMETRIC,
-                         &(thePhotometric[dir]) ) )
-      {
-         thePhotometric[dir] = PHOTOMETRIC_MINISBLACK;
-      }
-      theLut = 0;
-      // Check for palette.
-      uint16* red;
-      uint16* green;
-      uint16* blue;
-      if(TIFFGetField(theTiffPtr, TIFFTAG_COLORMAP, &red, &green, &blue))
-      {
-         if(theApplyColorPaletteFlag)
-         {
-            thePhotometric[dir] = PHOTOMETRIC_PALETTE;
-            theSamplesPerPixel = 3;
-         }
-         populateLut();
-      }
-
-      if( TIFFIsTiled(theTiffPtr))
-      {
-         theRowsPerStrip[dir] = 0;
-         if ( !TIFFGetField( theTiffPtr,
-                             TIFFTAG_TILEWIDTH,
-                             &theImageTileWidth[dir] ) )
-         {
-            theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimTiffTileSource::getTiffTileWidth ERROR:"
-               << "\nCannot determine tile width." << endl;
-            theImageTileWidth[dir] = 0;
-         }
-         if ( !TIFFGetField( theTiffPtr,
-                             TIFFTAG_TILELENGTH,
-                             &theImageTileLength[dir] ) )
-         {
-            theErrorStatus = ossimErrorCodes::OSSIM_ERROR;   
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimTiffTileSource::getTiffTileLength ERROR:"
-               << "\nCannot determine tile length." << endl;
-             theImageTileLength[dir] = 0;
-         }
-      }
-      else
-      {
-         // Strip tiff:
-         theImageTileWidth[dir]  = 0;
-         theImageTileLength[dir] = 0;
-         if( !TIFFGetField( theTiffPtr, TIFFTAG_ROWSPERSTRIP,
-                            &(theRowsPerStrip[dir]) ) )
-         {
-            theRowsPerStrip[dir] = 1;
-         }
-         
-         theImageTileWidth[dir]  = theImageWidth[dir];
-         theImageTileLength[dir] = theRowsPerStrip[dir];
-
-         //---
-         // Let's default the tile size to something efficient.
-         //
-         // NOTE:
-         //
-         // This is not used by the strip reader method.  Only by the getImageTileHeight
-         // and getImageTileHeight methods.
-         //---
-         if ( theImageTileWidth[dir] > 256 )
-         {
-            theImageTileWidth[dir] = 256;
-         }
-         else if( theImageTileWidth[dir] < 64 )
-         {
-            theImageTileWidth[dir]  = 64;
-         }
-         if( theImageTileLength[dir] > 256 )
-         {
-            theImageTileLength[dir] = 256;
-         }
-         else if(theImageTileLength[dir] < 64)
-         {
-            theImageTileLength[dir] = 64;
-         }
-      }
-      
-   } // End of "for (ossim_uint32 dir=0; dir<theNumberOfDirectories; dir++)"
-   
-   // Reset the directory back to "0".
-   if (setTiffDirectory(0) == false)
-   {
-      return false;
-   }
-
-   //---
-   // Get the scalar type.
-   //---
-   theScalarType = OSSIM_SCALAR_UNKNOWN;
-   if (theBitsPerSample == 16)
-   {
-      theBytesPerPixel = 2;
-
-      if (theSampleFormatUnit == SAMPLEFORMAT_INT)
-      {
-         // this is currently causing pixel problems.  I am going to comment this out until we figure out a better solution
-         //
-#if 0         
-         if (theMinSampleValue == 0) //  && (theMaxSampleValue > 36535) )
-         {
-            //---
-            // This is a hack for RadarSat data which is has tag 339 set to
-            // signed sixteen bit data with a min sample value of 0 and
-            // sometimes a max sample value greater than 36535.
-            //---
-            theScalarType = OSSIM_UINT16;
-         }
-         else
-         {
-            theScalarType = OSSIM_SINT16;
-         }
-#else
-         theScalarType = OSSIM_SINT16;
-#endif
-
-      }
-      else if (theSampleFormatUnit == SAMPLEFORMAT_UINT)
-      {
-         // ESH 03/2009 -- Changed "== 2047" to "<= 2047"
-         if (theMaxSampleValue <= 2047) // 2^11-1
-         {
-            // 11 bit EO, i.e. Ikonos, QuickBird, WorldView, GeoEye.
-            theScalarType = OSSIM_USHORT11; // IKONOS probably...
-         }
-         else
-         {
-            theScalarType = OSSIM_UINT16; 
-         }
-      }
-      else
-      {
-         if (theMaxSampleValue <= 2047) // 2^11-1
-         {
-            // 11 bit EO, i.e. Ikonos, QuickBird, WorldView, GeoEye.
-            theScalarType = OSSIM_USHORT11; // IKONOS probably...
-         }
-         else
-            theScalarType = OSSIM_UINT16; // Default to unsigned...
-      }
-   }
-   else if ( (theBitsPerSample == 32) &&
-             (theSampleFormatUnit == SAMPLEFORMAT_UINT) )
-   {
-      theBytesPerPixel = 4;
-      theScalarType = OSSIM_UINT32;
-   }
-   else if ( (theBitsPerSample == 32) &&
-             (theSampleFormatUnit == SAMPLEFORMAT_INT) )
-   {
-      theBytesPerPixel = 4;
-      theScalarType = OSSIM_SINT32;
-   }
-   else if (theBitsPerSample == 32 &&
-            theSampleFormatUnit == SAMPLEFORMAT_IEEEFP)
-   {
-      theBytesPerPixel = 4;
-      theScalarType = OSSIM_FLOAT32;
-   }
-   else if(theBitsPerSample == 64 &&
-	   theSampleFormatUnit == SAMPLEFORMAT_IEEEFP)
-   {
-      theBytesPerPixel = 8;
-      theScalarType = OSSIM_FLOAT64;
-   }
-   else if (theBitsPerSample <= 8)
-   {
-      theBytesPerPixel = 1;
-      theScalarType = OSSIM_UINT8;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE << " Error:\nCannot determine scalar type.\n"
-         << "Trace dump follows:\n";
-      print(ossimNotify(ossimNotifyLevel_WARN));
-      
-      return false;
-   }
-   
-   // Sanity check for min, max and null values.
-   validateMinMaxNull();
-   
-   setReadMethod();
-   
-   // Establish raster pixel alignment type:
-   GTIF* gtif = GTIFNew(theTiffPtr);
-   ossim_uint16 raster_type;
-   if (GTIFKeyGet(gtif, GTRasterTypeGeoKey, &raster_type, 0, 1) && (raster_type == 1))
-   {
-      thePixelType = OSSIM_PIXEL_IS_AREA;
-   }
-   else
-   {
-      thePixelType = OSSIM_PIXEL_IS_POINT;
-   }
-   GTIFFree(gtif);
-
-   // Let base-class finish the rest:
-   completeOpen();
-
-   if ( isBandSelector() && theOutputBandList.size() && ( isIdentityBandList( theOutputBandList ) == false ) )
-   {
-      // This does range checking and will pass to overview if open.
-      setOutputBandList( theOutputBandList );
-   }
-   
-   //---
-   // Note: Logic changed to leave theTile and theBuffer uninitialized until first getTile(...)
-   // request. (drb)
-   //---
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " Debug:";
-      print(ossimNotify(ossimNotifyLevel_DEBUG));
-   }
-   
-   // Finished...
-   return true;
-}
-   
-ossim_uint32 ossimTiffTileSource::getNumberOfLines( ossim_uint32 resLevel ) const
-{
-   ossim_uint32 result = 0;
-   if ( theImageDirectoryList.size() && theTiffPtr && isValidRLevel(resLevel) )
-   {
-      //---
-      // If we have r0 our reslevels are the same as the callers so
-      // no adjustment necessary.
-      //---
-      if (!theStartingResLevel || theR0isFullRes) // not an overview or has r0.
-      {
-         //---
-         // If we have r0 our reslevels are the same as the callers so
-         // no adjustment necessary.
-         //---
-         if (resLevel < theImageDirectoryList.size())
-         {
-            result = theImageLength[theImageDirectoryList[resLevel]];
-         }
-         else if (theOverview.valid())
-         {
-            result = theOverview->getNumberOfLines(resLevel);
-         }
-      }
-      else // this is an overview without r0
-      {
-         if (resLevel >= theStartingResLevel)
-         {
-            //---
-            // Adjust the level to be relative to the reader using this as
-            // overview.
-            //---
-            ossim_uint32 level = resLevel - theStartingResLevel;
-            if (level < theImageDirectoryList.size())
-            {
-               result = theImageLength[theImageDirectoryList[level]];
-            }
-         }
-      }
-   }
-   return result;
-}
-
-ossim_uint32 ossimTiffTileSource::getNumberOfSamples( ossim_uint32 resLevel ) const
-{
-   ossim_uint32 result = 0;
-   if ( theImageDirectoryList.size() && theTiffPtr && isValidRLevel(resLevel) )
-   {
-      //---
-      // If we have r0 our reslevels are the same as the callers so
-      // no adjustment necessary.
-      //---
-      if (!theStartingResLevel||theR0isFullRes) // not an overview or has r0.
-      {
-         if (resLevel < theImageDirectoryList.size())
-         {
-            result = theImageWidth[theImageDirectoryList[resLevel]];
-         }
-         else if (theOverview.valid())
-         {
-            result = theOverview->getNumberOfSamples(resLevel);
-         }
-      }
-      else // this is an overview.
-      {
-         if (resLevel >= theStartingResLevel)
-         {
-            //---
-            // Adjust the level to be relative to the reader using this as
-            // overview.
-            //---
-            ossim_uint32 level = resLevel - theStartingResLevel;
-            if (level < theImageDirectoryList.size())
-            {
-               result = theImageWidth[theImageDirectoryList[level]];
-            }
-         }
-      }
-   }
-   return result;
-}
-
-ossim_uint32 ossimTiffTileSource::getNumberOfDecimationLevels() const
-{
-   ossim_uint32 result = theImageDirectoryList.size();
-   
-   // If starting res level is not 0 then this is an overview.
-   if (theStartingResLevel&&theR0isFullRes)
-   {
-      // Don't count r0.
-      --result;
-   }
-   else if (theOverview.valid())
-   {
-      result += theOverview->getNumberOfDecimationLevels();
-   }
-
-   return result;
-}
-
-//*******************************************************************
-// Public method:
-//*******************************************************************
-ossimScalarType ossimTiffTileSource::getOutputScalarType() const
-{
-   return theScalarType;
-}
-
-bool ossimTiffTileSource::loadTile(const ossimIrect& tile_rect,
-                                   const ossimIrect& clip_rect,
-                                   ossimImageData* result)
-{
-   static const char MODULE[] = "ossimTiffTileSource::loadTile";
-
-   bool status = true;
-
-   if ( !theBuffer )
-   {
-      status = allocateBuffer();
-   }
-
-   if ( status )
-   {
-      switch(theReadMethod[theCurrentDirectory])
-      {
-         case READ_TILE:
-            status = loadFromTile(clip_rect, result);
-            break;
-            
-         case READ_SCAN_LINE:
-            status = loadFromScanLine(clip_rect, result);
-            break;
-            
-         case READ_RGBA_U8_TILE:
-            status = loadFromRgbaU8Tile(tile_rect, clip_rect, result);
-            break;
-            
-         case READ_RGBA_U8_STRIP:
-            status = loadFromRgbaU8Strip(tile_rect, clip_rect, result);
-            break;
-            
-         case READ_RGBA_U8A_STRIP:
-            status = loadFromRgbaU8aStrip(tile_rect, clip_rect, result);
-            break;
-
-         case READ_U16_STRIP:
-            status = loadFromU16Strip(clip_rect, result);
-            break;
-            
-         default:
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << " Unsupported tiff type!" << endl;
-            status = false;
-            break;
-      }
-   }
-   
-   return status;
-}
-
-bool ossimTiffTileSource::loadFromScanLine(const ossimIrect& clip_rect,
-                                           ossimImageData* result)
-{
-#if OSSIM_BUFFER_SCAN_LINE_READS
-   ossimInterleaveType type =
-      (thePlanarConfig[theCurrentDirectory] == PLANARCONFIG_CONTIG) ?
-       OSSIM_BIP : OSSIM_BIL;
-
-   if ( theBufferRLevel != getCurrentTiffRLevel() ||
-        !clip_rect.completely_within(theBufferRect) )
-   {
-      //***
-      // Must reload the buffer.  Grab enough lines to fill the depth of the
-      // clip rectangle.
-      //***
-      theBufferRLevel = getCurrentTiffRLevel();
-      theBufferRect   = getImageRectangle(theBufferRLevel);
-      theBufferRect.set_uly(clip_rect.ul().y);
-      theBufferRect.set_lry(clip_rect.lr().y);
-      ossim_uint32 startLine = clip_rect.ul().y;
-      ossim_uint32 stopLine  = clip_rect.lr().y;
-      ossim_uint8* buf = theBuffer;
-
-      if (thePlanarConfig[theCurrentDirectory] == PLANARCONFIG_CONTIG)
-      {
-         ossim_uint32 lineSizeInBytes = getNumberOfSamples(theBufferRLevel) *
-                                  theBytesPerPixel * theSamplesPerPixel;
-
-         for (ossim_uint32 line = startLine; line <= stopLine; ++line)
-         {
-            TIFFReadScanline(theTiffPtr, (void*)buf, line, 0);
-            buf += lineSizeInBytes;
-         }
-      }
-      else
-      {
-         ossim_uint32 lineSizeInBytes = getNumberOfSamples(theBufferRLevel) *
-                                  theBytesPerPixel;
-
-         for (ossim_uint32 line = startLine; line <= stopLine; ++line)
-         {
-            for (ossim_uint32 band = 0; band < theSamplesPerPixel; ++band)
-            {
-               TIFFReadScanline(theTiffPtr, (void*)buf, line, band);
-               buf += lineSizeInBytes;
-            }
-         }
-      }
-   }
-
-   //---
-   // Since theTile's internal rectangle is relative to any sub image offset
-   // we must adjust both the zero based "theBufferRect" and the zero base
-   // "clip_rect" before passing to
-   // theTile->loadTile method.
-   //---
-   result->loadTile(theBuffer, theBufferRect, clip_rect, type);
-   return true;
-
-#else
-   ossimInterleaveType type =
-      (thePlanarConfig[theCurrentDirectory] == PLANARCONFIG_CONTIG) ? OSSIM_BIP : OSSIM_BIL;
-
-   ossim_int32 startLine = clip_rect.ul().y;
-   ossim_int32 stopLine  = clip_rect.lr().y;
-   ossim_int32 stopSamp  = static_cast<ossim_int32>(getNumberOfSamples(theBufferRLevel)-1);
-   
-   if (thePlanarConfig[theCurrentDirectory] == PLANARCONFIG_CONTIG)
-   {
-      for (ossim_int32 line = startLine; line <= stopLine; ++line)
-      {
-         TIFFReadScanline(theTiffPtr, (void*)theBuffer, line, 0);
-         result->copyLine((void*)theBuffer, line, 0, stopSamp, type);
-      }
-   }
-   else
-   {
-      ossim_uint32 lineSizeInBytes = getNumberOfSamples(theBufferRLevel) * theBytesPerPixel;
-      for (ossim_int32 line = startLine; line <= stopLine; ++line)
-      {
-         ossim_uint8* buf = theBuffer;
-         for (ossim_uint32 band = 0; band < theSamplesPerPixel; ++band)
-         {
-            TIFFReadScanline(theTiffPtr, (void*)buf, line, band);
-            buf += lineSizeInBytes;
-         }
-         result->copyLine((void*)theBuffer, line, 0, stopSamp, type);
-      }
-   }
-   return true;
-#endif /* #if OSSIM_BUFFER_SCAN_LINE_READS #else - Non buffered scan line reads. */
-}
-
-bool ossimTiffTileSource::loadFromTile(const ossimIrect& clip_rect,
-                                       ossimImageData* result)
-{
-   static const char MODULE[] = "ossimTiffTileSource::loadFromTile";
-   
-   ossim_int32 tileSizeRead = 0;
-   
-   //---
-   // Shift the upper left corner of the "clip_rect" to the an even tile
-   // boundary.  Note this will shift in the upper left direction.
-   //---
-   ossimIpt tileOrigin = clip_rect.ul();
-   adjustToStartOfTile(tileOrigin);
-   ossimIpt ulTilePt       = tileOrigin;
-//   ossimIpt subImageOffset = getSubImageOffset(getCurrentTiffRLevel()+theStartingResLevel);
-
-   //---
-   // Calculate the number of tiles needed in the line/sample directions.
-   //---
-   ossim_uint32 tiles_in_v_dir = (clip_rect.lr().x-tileOrigin.x+1) /
-      theImageTileWidth[theCurrentDirectory];
-   ossim_uint32 tiles_in_u_dir = (clip_rect.lr().y-tileOrigin.y+1) /
-      theImageTileLength[theCurrentDirectory];
-
-   if ( (clip_rect.lr().x-tileOrigin.x+1) %
-        theImageTileWidth[theCurrentDirectory]  ) ++tiles_in_v_dir;
-   if ( (clip_rect.lr().y-tileOrigin.y+1) %
-        theImageTileLength[theCurrentDirectory] ) ++tiles_in_u_dir;
-
-
-   // Tile loop in line direction.
-   for (ossim_uint32 u=0; u<tiles_in_u_dir; ++u)
-   {
-      ulTilePt.x = tileOrigin.x;
-
-      // Tile loop in sample direction.
-      for (ossim_uint32 v=0; v<tiles_in_v_dir; ++v)
-      {
-         ossimIrect tiff_tile_rect(ulTilePt.x,
-                                   ulTilePt.y,
-                                   ulTilePt.x +
-                                   theImageTileWidth[theCurrentDirectory]  - 1,
-                                   ulTilePt.y +
-                                   theImageTileLength[theCurrentDirectory] - 1);
-         
-         if (tiff_tile_rect.intersects(clip_rect))
-         {
-            ossimIrect tiff_tile_clip_rect
-               = tiff_tile_rect.clipToRect(clip_rect);
-
-            //---
-            // Since theTile's internal rectangle is relative to any sub
-            // image offset we must adjust both the zero based
-            // "theBufferRect" and the zero based "clip_rect" before
-            // passing to theTile->loadTile method.
-            //---
-            ossimIrect bufRectWithOffset = tiff_tile_rect;// + subImageOffset;
-            ossimIrect clipRectWithOffset = tiff_tile_clip_rect;// + subImageOffset;
-            
-            if  (thePlanarConfig[theCurrentDirectory] == PLANARCONFIG_CONTIG)
-            {
-               tileSizeRead = TIFFReadTile(theTiffPtr,
-                                           theBuffer,
-                                           ulTilePt.x,
-                                           ulTilePt.y,
-                                           0,
-                                           0);
-               if (tileSizeRead > 0)
-               {
-                  result->loadTile(theBuffer,
-                                  bufRectWithOffset,
-                                  clipRectWithOffset,
-                                  OSSIM_BIP);
-               }
-               else if(tileSizeRead < 0)
-               {
-                  if(traceDebug())
-                  {
-                     ossimNotify(ossimNotifyLevel_WARN)
-                        << MODULE << " Read Error!"
-                        << "\nReturning error...  " << endl;
-                  }
-                  theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-                  return false;
-               }
-            }
-            else
-            {
-               if ( theOutputBandList.empty() )
-               {
-                  // This will set to identity.
-                  ossimImageSource::getOutputBandList( theOutputBandList );
-               }
-               
-               // band separate tiles...
-               std::vector<ossim_uint32>::const_iterator bandIter = theOutputBandList.begin();
-               ossim_uint32 destinationBand = 0;
-               while ( bandIter != theOutputBandList.end() )
-               {
-                  tileSizeRead = TIFFReadTile( theTiffPtr,
-                                               theBuffer,
-                                               ulTilePt.x,
-                                               ulTilePt.y,
-                                               0,
-                                               (*bandIter) );
-                  if(tileSizeRead > 0)
-                  {
-                     result->loadBand( theBuffer,
-                                       bufRectWithOffset,
-                                       clipRectWithOffset,
-                                       destinationBand );
-                  }
-                  else if (tileSizeRead < 0)
-                  {
-                     if(traceDebug())
-                     {
-                        ossimNotify(ossimNotifyLevel_WARN)
-                           << MODULE << " Read Error!"
-                           << "\nReturning error...  " << endl;
-                     }
-                     theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-                     return false;
-                  }
-                  ++bandIter; // Next band...
-                  ++destinationBand;
-               }
-            }
-
-         } // End of if (tiff_tile_rect.intersects(clip_rect))
-         
-         ulTilePt.x += theImageTileWidth[theCurrentDirectory];
-         
-      }  // End of tile loop in the sample direction.
-
-      ulTilePt.y += theImageTileLength[theCurrentDirectory];
-      
-   }  // End of tile loop in the line direction.
-
-   return true;
-}
-
-bool ossimTiffTileSource::loadFromRgbaU8Tile(const ossimIrect& tile_rect,
-                                             const ossimIrect& clip_rect,
-                                             ossimImageData* result)
-{
-   static const char MODULE[] = "ossimTiffTileSource::loadFromRgbaTile";
-
-   if (theSamplesPerPixel != 3 || theBytesPerPixel!=1)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE << " Error:"
-         << "\nInvalid number of bands or bytes per pixel!" << endl;
-   }
-   
-   //***
-   // Shift the upper left corner of the "clip_rect" to the an even tile
-   // boundary.  Note this will shift in the upper left direction.
-   //***
-   ossimIpt tileOrigin = clip_rect.ul();
-   adjustToStartOfTile(tileOrigin);
-
-   //---
-   // Calculate the number of tiles needed in the line/sample directions
-   // to fill the tile.
-   //---
-   ossim_uint32 tiles_in_v_dir = (clip_rect.lr().x-tileOrigin.x+1) /
-      theImageTileWidth[theCurrentDirectory];
-   ossim_uint32 tiles_in_u_dir = (clip_rect.lr().y-tileOrigin.y+1) /
-      theImageTileLength[theCurrentDirectory];
-
-   if ( (clip_rect.lr().x-tileOrigin.x+1) %
-        theImageTileWidth[theCurrentDirectory]  ) ++tiles_in_v_dir;
-   if ( (clip_rect.lr().y-tileOrigin.y+1) %
-        theImageTileLength[theCurrentDirectory] ) ++tiles_in_u_dir;
-   
-   ossimIpt ulTilePt = tileOrigin;
-
-#if 0
-   if (traceDebug())
-   {
-      CLOG << "DEBUG:"
-           << "\ntile_rect:  " << tile_rect
-           << "\nclip_rect:  " << clip_rect
-           << "\ntiles_in_v_dir:  " << tiles_in_v_dir
-           << "\ntiles_in_u_dir:  " << tiles_in_u_dir
-           << endl;
-   }
-#endif
-   
-   
-   // Tile loop in line direction.
-   for (ossim_uint32 u=0; u<tiles_in_u_dir; u++)
-   {
-      ulTilePt.x = tileOrigin.x;
-
-      // Tile loop in sample direction.
-      for (ossim_uint32 v=0; v<tiles_in_v_dir; v++)
-      {
-         ossimIrect tiff_tile_rect
-            = ossimIrect(ulTilePt.x,
-                         ulTilePt.y,
-                         ulTilePt.x +
-                         theImageTileWidth[theCurrentDirectory]  - 1,
-                         ulTilePt.y +
-                         theImageTileLength[theCurrentDirectory] - 1);
-
-         if ( getCurrentTiffRLevel() != theBufferRLevel ||
-              tiff_tile_rect != theBufferRect)
-         {
-            // Need to grab a new tile.
-            // Read a tile into the buffer.
-            if ( !TIFFReadRGBATile(theTiffPtr,
-                                   ulTilePt.x,
-                                   ulTilePt.y,
-                                   (uint32*)theBuffer) ) // use tiff typedef
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << MODULE << " Read Error!"
-                  << "\nReturning error..." << endl;
-               theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-               return false;
-            }
-
-            // Capture the rectangle.
-            theBufferRect   = tiff_tile_rect;
-            theBufferRLevel = getCurrentTiffRLevel();
-         }
-
-         ossimIrect tile_clip_rect = clip_rect.clipToRect(theBufferRect);
-         
-         //***
-         // Get the offset to the first valid pixel.
-         // 
-         // Note: The data in the tile buffer is organized bottom up.  So the
-         //       coordinate must be negated in the line direction since
-         //       the met assumes an origin of upper left.
-         //***
-         ossim_uint32 in_buf_offset =
-              (tiff_tile_rect.lr().y-tile_clip_rect.ul().y)*
-              theImageTileWidth[theCurrentDirectory]*4 +
-              ((tile_clip_rect.ul().x - ulTilePt.x)*4);
-         
-         ossim_uint32 out_buf_offset =
-            (tile_clip_rect.ul().y - tile_rect.ul().y) *
-            ((ossim_int32)result->getWidth()) +
-            tile_clip_rect.ul().x - tile_rect.ul().x;
-         
-         //
-         // Get a pointer positioned at the first valid pixel in buffers.
-         //
-         ossim_uint32* s = (ossim_uint32*)(theBuffer + in_buf_offset);  // s for source...
-//         ossim_uint8* s = theBuffer + in_buf_offset;  // s for source...
-         ossim_uint8* r = static_cast<ossim_uint8*>(result->getBuf(0))+
-            out_buf_offset;
-         ossim_uint8* g = static_cast<ossim_uint8*>(result->getBuf(1))+
-            out_buf_offset;
-         ossim_uint8* b = static_cast<ossim_uint8*>(result->getBuf(2))+
-            out_buf_offset;
-         
-         ossim_uint32 lines2copy = tile_clip_rect.lr().y-tile_clip_rect.ul().y+1;
-         ossim_uint32 samps2copy = tile_clip_rect.lr().x-tile_clip_rect.ul().x+1;
-         
-         // Line loop through valid portion of the tiff tile.         
-         for (ossim_uint32 line = 0; line < lines2copy; line++)
-         {
-            // Sample loop through the tiff tile.
-            ossim_uint32 i=0;
-            ossim_uint32 j=0;
-            
-            // note the bands from the TIFF READ are stored in a, b, g, r ordering.
-            // we must reverse the bands and skip the first byte.
-            for (ossim_uint32 sample = 0; sample < samps2copy; sample++)
-            {
-               r[i] = (ossim_uint8)OSSIM_TIFF_UNPACK_R4(s[j]);
-               g[i] = (ossim_uint8)OSSIM_TIFF_UNPACK_G4(s[j]);
-               b[i] = (ossim_uint8)OSSIM_TIFF_UNPACK_B4(s[j]);
-               i++;
-               ++j;
-            }
-            
-            // Increment the pointers by one line.
-            const ossim_uint32 OUTPUT_TILE_WIDTH = result->getWidth();
-            r += OUTPUT_TILE_WIDTH;
-            g += OUTPUT_TILE_WIDTH;
-            b += OUTPUT_TILE_WIDTH;
-            s -= theImageTileWidth[theCurrentDirectory];
-         }
-      
-         ulTilePt.x += theImageTileWidth[theCurrentDirectory];
-      
-      }  // End of tile loop in the sample direction.
-      
-      ulTilePt.y += theImageTileLength[theCurrentDirectory];
-      
-   }  // End of tile loop in the line direction.
-   
-   return true;
-}
-
-bool ossimTiffTileSource::loadFromRgbaU8Strip(const ossimIrect& tile_rect,
-                                              const ossimIrect& clip_rect,
-                                              ossimImageData* result)
-{
-   static const char MODULE[] = "ossimTiffTileSource::loadFromRgbaU8Strip";
-
-   if (theSamplesPerPixel > 4 || theBytesPerPixel != 1)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE << " Error:"
-         << "\nInvalid number of bands or bytes per pixel!" << endl;
-   }
-   
-   //***
-   // Calculate the number of strips to read.
-   //***
-   const ossim_uint32 OUTPUT_TILE_WIDTH = result->getWidth();
-
-   ossim_uint32 starting_strip = clip_rect.ul().y /
-      theRowsPerStrip[theCurrentDirectory];
-   ossim_uint32 ending_strip   = clip_rect.lr().y /
-      theRowsPerStrip[theCurrentDirectory];
-   ossim_uint32 strip_width    = theImageWidth[theCurrentDirectory]*4;   
-   ossim_uint32 output_tile_offset = (clip_rect.ul().y - tile_rect.ul().y) *
-                                OUTPUT_TILE_WIDTH + clip_rect.ul().x -
-                                tile_rect.ul().x;
-
-#if 0 /* Please keep for debug: */
-   CLOG << "DEBUG:"
-        << "\nsamples:         " << theSamplesPerPixel
-        << "\ntile_rect:       " << tile_rect
-        << "\nclip_rect:       " << clip_rect
-        << "\nstarting_strip:  " << starting_strip
-        << "\nending_strip:    " << ending_strip
-        << "\nstrip_width:     " << strip_width
-        << "\noutput_tile_offset:  " << output_tile_offset
-        << endl;
-#endif
-   
-   //***
-   // Get the pointers positioned at the first valid pixel in the buffers.
-   // s = source
-   // d = destination
-   //***
-   ossim_uint32 band;
-
-   ossim_uint8** d = new ossim_uint8*[theSamplesPerPixel];
-   for (band = 0; band < theSamplesPerPixel; band++)
-   {
-      d[band] = static_cast<ossim_uint8*>(result->getBuf(band))+output_tile_offset;
-   }
-
-   // Loop through strips...
-   for (ossim_uint32 strip=starting_strip; strip<=ending_strip; strip++)
-   {
-      if ( (theBufferRLevel != theCurrentDirectory) ||
-           ( clip_rect.completely_within( theBufferRect ) == false ) )
-      {
-         if (TIFFReadRGBAStrip(theTiffPtr,
-                               (strip*theRowsPerStrip[theCurrentDirectory]),
-                               (uint32*)theBuffer) == 0) // use tiff typedef
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << " Error reading strip!" <<endl;
-            delete [] d;
-            return false;
-         }
-
-         // Capture rect and rlevel of buffer:
-         theBufferRLevel = theCurrentDirectory;
-         theBufferRect = ossimIrect(
-            0,
-            starting_strip,
-            theImageWidth[theCurrentDirectory]-1,
-            (ending_strip-starting_strip) ? (ending_strip-starting_strip) *
-            theRowsPerStrip[theCurrentDirectory] - 1 :
-            theRowsPerStrip[theCurrentDirectory] - 1 );
-      }
-      
-      //***
-      // If the last strip is a partial strip then the first line of the
-      // strip will be the last line of the image.
-      //***
-      ossim_uint32 last_line = theImageLength[theCurrentDirectory] - 1;
-
-      ossim_uint32 strip_offset
-         = ((strip * theRowsPerStrip[theCurrentDirectory]) +
-            theRowsPerStrip[theCurrentDirectory] - 1) <
-         last_line ?  0 :
-         ((strip * theRowsPerStrip[theCurrentDirectory]) +
-          theRowsPerStrip[theCurrentDirectory] - 1) - last_line;
-
-      ossim_uint32 total_rows = theRowsPerStrip[theCurrentDirectory] -
-         strip_offset;
-      
-      for (ossim_uint32 row=0; row<total_rows; row++)
-      {
-         // Write the line if it's in the clip rectangle.
-         ossim_int32 current_line = strip * theRowsPerStrip[theCurrentDirectory]
-            + row;
-         if  (current_line >= clip_rect.ul().y &&
-              current_line <= clip_rect.lr().y)
-         {
-            //
-            // Position the stip pointer to the correct spot.
-            // 
-            // Note:
-            // A strip is organized from bottom to top and the raster buffer is
-            // orgainized from top to bottom so the lineBuf must be offset
-            // accordingly.
-            //
-            ossim_uint32* s = (ossim_uint32*)(theBuffer+ ((theRowsPerStrip[theCurrentDirectory] - row -
-                                                           strip_offset - 1) * strip_width + clip_rect.ul().x * 4));
-            
-            // Copy the data to the output buffer.
-            ossim_uint32 i=0;
-                                                 
-            for (int32 sample=clip_rect.ul().x;
-                 sample<=clip_rect.lr().x;
-                 sample++)
-            {
-               d[0][i] = OSSIM_TIFF_UNPACK_R4(*s);
-               d[1][i] = OSSIM_TIFF_UNPACK_G4(*s);
-               d[2][i] = OSSIM_TIFF_UNPACK_B4(*s);
-               ++i;
-               ++s;
-            }
-
-            for (band = 0; band < theSamplesPerPixel; band++)
-            {
-               d[band] += OUTPUT_TILE_WIDTH;
-            }
-         }
-      }  // End of loop through rows in a strip.
-
-   }  // End of loop through strips.
-
-   delete [] d;
-               
-   return true;
-}
-
-//*******************************************************************
-// Private Method:
-//*******************************************************************
-bool ossimTiffTileSource::loadFromRgbaU8aStrip(const ossimIrect& tile_rect,
-                                               const ossimIrect& clip_rect,
-                                               ossimImageData* result)
-{
-   static const char MODULE[] = "ossimTiffTileSource::loadFromRgbaU8aStrip";
-
-   //***
-   // Specialized for one bit data to handle null values.
-   //***
-   const ossim_uint32 OUTPUT_TILE_WIDTH = result->getWidth();
-   const ossim_uint8 NULL_PIX = static_cast<ossim_uint8>(result->getNullPix(0));
-   const ossim_uint8 MIN_PIX  = static_cast<ossim_uint8>(result->getMinPix(0));
-
-   if (theSamplesPerPixel > 4 || theBytesPerPixel!= 1)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE << " Error:"
-         << "\nInvalid number of bands or bytes per pixel!" << endl;
-   }
-   
-   //***
-   // Calculate the number of strips to read.
-   //***
-   ossim_uint32 starting_strip = clip_rect.ul().y /
-        theRowsPerStrip[theCurrentDirectory];
-   ossim_uint32 ending_strip   = clip_rect.lr().y /
-      theRowsPerStrip[theCurrentDirectory];
-   ossim_uint32 output_tile_offset = (clip_rect.ul().y - tile_rect.ul().y) *
-                                OUTPUT_TILE_WIDTH + clip_rect.ul().x -
-                                tile_rect.ul().x;
-
-#if 0
-   if (traceDebug())
-   {
-      CLOG << "DEBUG:"
-           << "\ntile_rect:       " << tile_rect
-           << "\nclip_rect:       " << clip_rect
-           << "\nstarting_strip:  " << starting_strip
-           << "\nending_strip:    " << ending_strip
-           << "\nstrip_width:     " << strip_width
-           << "\noutput_tile_offset:     " << output_tile_offset
-           << "\nsamples:         " << theSamplesPerPixel
-           << endl;
-   }
-#endif
-   
-   //***
-   // Get the pointers positioned at the first valid pixel in the buffers.
-   // s = source
-   // d = destination
-   //***
-   ossim_uint32 band;
-
-   ossim_uint8** d = new ossim_uint8*[theSamplesPerPixel];
-   for (band = 0; band < theSamplesPerPixel; band++)
-   {
-      d[band] = static_cast<ossim_uint8*>(result->getBuf(band))+output_tile_offset;
-   }
-
-   // Loop through strips...
-   for (ossim_uint32 strip=starting_strip; strip<=ending_strip; strip++)
-   {
-      if (TIFFReadRGBAStrip(theTiffPtr,
-                            (strip*theRowsPerStrip[theCurrentDirectory]),
-                            (uint32*)theBuffer) == 0) // use tiff typedef
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << MODULE << " Error reading strip!" <<endl;
-         delete [] d;
-         return false;
-      }
-
-      //***
-      // If the last strip is a partial strip then the first line of the
-      // strip will be the last line of the image.
-      //***
-      ossim_uint32 last_line = theImageLength[theCurrentDirectory] - 1;
-
-      ossim_uint32 strip_offset
-         = ((strip * theRowsPerStrip[theCurrentDirectory]) +
-            theRowsPerStrip[theCurrentDirectory] - 1) < last_line ?  0 :
-         ((strip * theRowsPerStrip[theCurrentDirectory]) +
-          theRowsPerStrip[theCurrentDirectory] - 1) - last_line;
-
-      ossim_uint32 total_rows = theRowsPerStrip[theCurrentDirectory] -
-         strip_offset;
-      
-      for (ossim_uint32 row=0; row<total_rows; row++)
-      {
-         // Write the line if it's in the clip rectangle.
-         ossim_int32 current_line = strip * theRowsPerStrip[theCurrentDirectory]
-            + row;
-         if  (current_line >= clip_rect.ul().y &&
-              current_line <= clip_rect.lr().y)
-         {
-            //***
-            // Position the stip pointer to the correct spot.
-            // 
-            // Note:
-            // A strip is organized from bottom to top and the raster buffer is
-            // orgainized from top to bottom so the lineBuf must be offset
-            // accordingly.
-            //***
-            ossim_uint8* s = theBuffer;
-            s += (theRowsPerStrip[theCurrentDirectory] - row -
-                  strip_offset - 1) *
-                 theImageWidth[theCurrentDirectory] * 4 +
-                 clip_rect.ul().x * 4;
-            
-            // Copy the data to the output buffer.
-            ossim_uint32 i=0;
-            ossim_uint32 j=0;
-            for (int32 sample=clip_rect.ul().x;
-                 sample<=clip_rect.lr().x;
-                 sample++)
-            {
-               for (band = 0; band < theSamplesPerPixel; band++)
-               {
-                  ossim_uint8 pix = s[j + band];
-                  d[band][i] = pix != NULL_PIX ? pix : MIN_PIX;
-               }
-               ++i;
-               j += 4;
-            }
-
-            for (band = 0; band < theSamplesPerPixel; band++)
-            {
-               d[band] += OUTPUT_TILE_WIDTH;
-            }
-         }
-      }  // End of loop through rows in a strip.
-
-   }  // End of loop through strips.
-
-   delete [] d;
-               
-   return true;
-   
-} // End: ossimTiffTileSource::loadFromRgbaU8aStrip( ... )
-
-bool ossimTiffTileSource::loadFromU16Strip( const ossimIrect& clip_rect, ossimImageData* result )
-{
-   bool status = true;
-   
-   // Calculate the strips to read.
-   ossim_uint32 starting_strip = clip_rect.ul().y / theRowsPerStrip[theCurrentDirectory];
-   ossim_uint32 ending_strip   = clip_rect.lr().y / theRowsPerStrip[theCurrentDirectory];
-
-   ossim_uint32 stripsPerBand = theImageLength[theCurrentDirectory] /
-      theRowsPerStrip[theCurrentDirectory];
-   if ( theImageLength[theCurrentDirectory] % theRowsPerStrip[theCurrentDirectory] )
-   {
-      ++stripsPerBand;
-   }
-   
-   // Loop through strips....
-   for ( ossim_uint32 strip = starting_strip; strip <= ending_strip; ++strip )
-   {
-      if ( (theBufferRLevel != theCurrentDirectory) ||
-           !clip_rect.completely_within(theBufferRect) )
-      {
-         // Fill buffer block:
-         
-         ossim_uint32 linesInStrip = theRowsPerStrip[theCurrentDirectory];
-         
-         // If last strip and not filling entirely memset it.
-         if ( strip == ( stripsPerBand - 1 ) )
-         {
-            // Last strip of image. Strip may be clipped to end of image.
-            linesInStrip = theImageLength[theCurrentDirectory] %
-               theRowsPerStrip[theCurrentDirectory];
-         }
-
-         ossim_uint32 bytesPerStrip = linesInStrip * theImageWidth[theCurrentDirectory] * 2;
-                  
-         // TIFFReadEncodedStrip takes signed int32 arg.
-         ossim_int32 bytesToRead = (ossim_int32)bytesPerStrip;
-         
-         ossim_uint32 startY = strip * theRowsPerStrip[theCurrentDirectory];
-         
-         // Need to read in the strip data:
-         ossim_uint32 bufferOffsetInBytes = 0;
-         
-         for (ossim_uint32 band = 0; band < theSamplesPerPixel; ++band)
-         {
-            ossim_uint32 bandStrip = strip + band * stripsPerBand;
-            
-            //---
-            // TIFFReadEncodedStrip does byte swapping for us.
-            // -1 says to read entire strip.
-            // Return of -1 is error.
-            //---
-            ossim_int32 bytesRead = TIFFReadEncodedStrip( theTiffPtr,
-                                                          bandStrip,
-                                                          theBuffer+bufferOffsetInBytes,
-                                                          bytesToRead );
-            if ( bytesRead != bytesToRead )
-            {
-               if(traceDebug())
-               {
-                  ossimNotify(ossimNotifyLevel_WARN)
-                     << "ossimTiffTileSource::loadFromU16Strip Read Error!"
-                     << "\nReturning error...  " << endl;
-               }
-               theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-               status = false;
-               result->makeBlank();
-               break;
-            }
-            bufferOffsetInBytes += bytesPerStrip;
-         }
-         
-         if ( status )
-         {
-            // Capture rect and rlevel of buffer:
-            theBufferRLevel = theCurrentDirectory;
-            theBufferRect = ossimIrect( 0,
-                                        startY,
-                                        theImageWidth[theCurrentDirectory] - 1,
-                                        startY + linesInStrip - 1);
-         }
-         
-      } // End: Fill buffer block.
-      
-      if ( status )
-      {
-         result->loadTile(theBuffer, theBufferRect, OSSIM_BSQ);
-      }
-      
-   } // End of strip loop.
-   
-   return status;
-   
-} // End: ossimTiffTileSource::loadFromU16Strip( ... )
-
-void ossimTiffTileSource::adjustToStartOfTile(ossimIpt& pt) const
-{
-   //***
-   // Notes:
-   // - Assumes an origin of (0,0)
-   // - Shifts in to the upper left direction.
-   //***
-   ossim_int32 tw =
-      static_cast<ossim_int32>(theImageTileWidth[theCurrentDirectory]);
-   ossim_int32 th =
-      static_cast<ossim_int32>(theImageTileLength[theCurrentDirectory]);
-   
-   if (pt.x > 0)
-   {
-      pt.x = (pt.x/tw) * tw;
-   }
-   else if (pt.x < 0)
-   {
-      pt.x = std::abs(pt.x) < tw ? -tw : (pt.x/tw)*tw;
-   }
-
-   if (pt.y > 0)
-   {
-      pt.y = (pt.y/th) * th;
-   }
-   else if (pt.y < 0)
-   {
-      pt.y = std::abs(pt.y) < th ? -th : (pt.y/th)*th;
-   }
-}
-
-bool ossimTiffTileSource::isValidRLevel(ossim_uint32 resLevel) const
-{
-   bool result = false;
-   
-   const ossim_uint32 LEVELS = getNumberOfDecimationLevels();
-
-   //---
-   // If we have r0 our reslevels are the same as the callers so
-   // no adjustment necessary.
-   //---
-   if ( !theStartingResLevel || theR0isFullRes) // Not an overview or has r0.
-   {
-      result = (resLevel < LEVELS);
-   }
-   else if (resLevel >= theStartingResLevel) // Used as overview.
-   {
-      result = ( (resLevel - theStartingResLevel) < LEVELS);
-   }
-   
-   return result;
-}
-
-ossim_uint32 ossimTiffTileSource::getCurrentTiffRLevel() const
-{
-   return theCurrentTiffRlevel;
-//   return theCurrentDirectory;
-}
-
-ossimString ossimTiffTileSource::getReadMethod(ossim_uint32 directory) const
-{
-   ossimString result = "UNKNOWN";
-   if ( directory < theReadMethod.size() )
-   {
-      switch (theReadMethod[directory])
-      {
-         case READ_RGBA_U8_TILE:
-            result = "READ_RGBA_U8_TILE";
-            break;
-         case READ_RGBA_U8_STRIP:
-            result = "READ_RGBA_U8_STRIP";
-            break;
-         case READ_RGBA_U8A_STRIP:
-            result = "READ_RGBA_U8A_STRIP";
-            break;
-         case READ_SCAN_LINE:
-            result = "READ_SCAN_LINE";
-            break;
-         case READ_TILE:
-            result = "READ_TILE";
-            break;
-         case UNKNOWN:
-         default:
-            break;
-      }
-   }
-   return result;
-}      
-
-ossim_uint32 ossimTiffTileSource::getNumberOfDirectories() const
-{
-   return theNumberOfDirectories;
-}
-
-ossim_uint32 ossimTiffTileSource::getImageTileWidth() const
-{
-   ossim_uint32 result = 0;
-   if(isOpen())
-   {
-      if(theCurrentDirectory < theImageTileWidth.size())
-      {
-         result = theImageTileWidth[theCurrentDirectory];
-      }
-   }   
-   return result;
-}
-
-ossim_uint32 ossimTiffTileSource::getImageTileHeight() const
-{
-   ossim_uint32 result = 0;
-   if(isOpen())
-   {
-      if(theCurrentDirectory < theImageTileLength.size())
-      {
-         result = theImageTileLength[theCurrentDirectory];
-      }
-   }
-   return result;
-}
-
-ossim_uint32 ossimTiffTileSource::getTileWidth() const
-{
-   ossim_uint32 result = getImageTileWidth();
-   if (!result)
-   {
-      ossimIpt tileSize;
-      ossim::defaultTileSize(tileSize);
-      result = tileSize.x;
-   }
-   return result;
-}
-
-ossim_uint32 ossimTiffTileSource::getTileHeight() const
-{
-   ossim_uint32 result = getImageTileHeight();
-   if (!result)
-   {
-      ossimIpt tileSize;
-      ossim::defaultTileSize(tileSize);
-      result = tileSize.y;
-   }
-   return result;
-}
-
-void ossimTiffTileSource::setApplyColorPaletteFlag(bool flag)
-{
-   theApplyColorPaletteFlag = flag;
-   
-   if(isColorMapped())
-   {
-      if(theApplyColorPaletteFlag)
-      {
-         thePhotometric[0] = PHOTOMETRIC_PALETTE;
-         theSamplesPerPixel = 3;
-      }
-      else
-      {
-         thePhotometric[0] = PHOTOMETRIC_MINISBLACK;
-         theSamplesPerPixel = 1; 
-      }
-      
-      setReadMethod();
-
-      theTile = 0;
-      if (theBuffer)
-      {
-         delete [] theBuffer;
-         theBuffer = 0;
-      }
-   }
-}
-
-bool ossimTiffTileSource::getApplyColorPaletteFlag()const
-{
-   return theApplyColorPaletteFlag;
-}
-
-ossimString ossimTiffTileSource::getLongName()const
-{
-   return ossimString("TIFF Image Handler");
-}
-
-ossimString ossimTiffTileSource::getShortName()const
-{
-   return ossimString("ossim_tiff");
-}
-
-std::ostream& ossimTiffTileSource::print(std::ostream& os) const
-{
-   //***
-   // Use a keyword format.
-   //***
-   os << "image_file:                    " << theImageFile
-      << "\nsamples_per_pixel:           " << theSamplesPerPixel
-      << "\nbits_per_sample:             " << theBitsPerSample
-      << "\nsample_format_unit:          " << theSampleFormatUnit
-      << "\nmin_sample_value:            " << theMinSampleValue
-      << "\nmax_sample_value:            " << theMaxSampleValue
-      << "\nnull_sample_value:           " << theNullSampleValue
-      << "\ntheNumberOfDirectories:      " << theNumberOfDirectories
-      << "\nr0_is_full_res:              " << theR0isFullRes;
-
-   
-   for (ossim_uint32 i=0; i<theNumberOfDirectories; ++i)
-   {
-      os << "\ndirectory[" << i << "]"
-         << "\nimage width:     " << theImageWidth[i]
-         << "\nimage_length:    " << theImageLength[i]
-         << "\nread method:     " << getReadMethod(i).c_str()
-         << "\nplanar:          " << thePlanarConfig[i]
-         << "\nphotometric:     " << thePhotometric[i];
-      if (theRowsPerStrip[i])
-      {
-         os << "\nrows per strip:  " << theRowsPerStrip[i];
-      }
-      if (theImageTileWidth[i])
-      {
-         os << "\ntile_width:      " << theImageTileWidth[i];
-      }
-      if (theImageTileLength[i])
-      {
-         os << "\ntile_length:     " << theImageTileLength[i];
-      }
-      os << endl;
-   }
-
-   if (theTile.valid())
-   {
-      os << "\nOutput tile dump:\n" << *theTile << endl;
-   }
-
-   if (theOverview.valid())
-   {
-      os << "\nOverview file:\n";
-      theOverview->print(os);
-   }
-
-   os << endl;
-   
-   return ossimSource::print(os);
-}
-
-ossim_uint32 ossimTiffTileSource::getNumberOfInputBands() const
-{
-   return theSamplesPerPixel;
-}
-
-ossim_uint32 ossimTiffTileSource::getNumberOfOutputBands () const
-{
-   ossim_uint32 bands = theOutputBandList.size();
-   if ( !bands )
-   {
-      bands = getNumberOfInputBands();
-   }
-   return bands;
-}
-
-bool ossimTiffTileSource::isBandSelector() const
-{
-   bool result = false;
-   if ( isOpen() && theReadMethod.size() && ( theReadMethod.size() == thePlanarConfig.size() ) )
-   {
-      // Tiled band separate currently is only coded to be band selector.
-      result = true;
-      for ( ossim_uint32 i = 0; i < theReadMethod.size(); ++i )
-      {
-         if ( ( theReadMethod[i] != READ_TILE ) ||
-              ( thePlanarConfig[i] == PLANARCONFIG_CONTIG ) )
-         {
-            result = false;
-            break;
-         }
-      }
-      if ( result && theOverview.valid() )
-      {
-         result = theOverview->isBandSelector();
-      }
-   }
-   return result;
-}
-
-bool ossimTiffTileSource::setOutputBandList(const std::vector<ossim_uint32>& band_list)
-{
-   bool result = false;
-   if ( isBandSelector() )
-   {
-      // Making a copy as passed in list could be our m_outputBandList.
-      std::vector<ossim_uint32> inputList = band_list;
-      result = ossimImageHandler::setOutputBandList( inputList, theOutputBandList );
-      if ( result && theTile.valid() )
-      {
-         if ( theTile->getNumberOfBands() != theOutputBandList.size() )
-         {
-            theTile = 0; // Force a reinitialize on next getTile.
-         }
-      }
-   }
-   return result;
-}
-
-void ossimTiffTileSource::getOutputBandList(std::vector<ossim_uint32>& bandList) const
-{
-   if ( theOutputBandList.size() )
-   {
-      bandList = theOutputBandList;
-   }
-   else
-   {
-      ossimImageSource::getOutputBandList( bandList );
-   }
-}
-
-bool ossimTiffTileSource::isOpen()const
-{
-   return (theTiffPtr!=NULL);
-}
-
-bool ossimTiffTileSource::hasR0() const
-{
-   return theR0isFullRes;
-}
-
-ossim_float64 ossimTiffTileSource::getMinPixelValue(ossim_uint32 band)const
-{
-   if(theMetaData.getNumberOfBands())
-   {
-      return ossimImageHandler::getMinPixelValue(band);
-   }
-   return theMinSampleValue;
-}
-
-ossim_float64 ossimTiffTileSource::getMaxPixelValue(ossim_uint32 band)const
-{
-   if(theMetaData.getNumberOfBands())
-   {
-      return ossimImageHandler::getMaxPixelValue(band);
-   }
-   return theMaxSampleValue;
-}
-
-ossim_float64 ossimTiffTileSource::getNullPixelValue(ossim_uint32 band)const
-{
-   if(theMetaData.getNumberOfBands())
-   {
-      return ossimImageHandler::getNullPixelValue(band);
-   }
-   return theNullSampleValue;
-}
-
-bool ossimTiffTileSource::isColorMapped() const
-{
-   bool result = false;
-   if ( isOpen() )
-   {
-      uint16* red;
-      uint16* green;
-      uint16* blue;
-      
-      result = static_cast<bool>(TIFFGetField(theTiffPtr,
-                                              TIFFTAG_COLORMAP,
-                                              &red, &green, &blue));
-   }
-   return result;
-}
-
-void ossimTiffTileSource::setReadMethod()
-{
-   for (ossim_uint32 dir=0; dir<theNumberOfDirectories; ++dir)
-   {
-      if (setTiffDirectory(dir) == false)
-      {
-         return;
-      }
-      
-      //---
-      // Establish how this tiff directory will be read.
-      //---
-      if (TIFFIsTiled(theTiffPtr)) 
-      {
-         if ( ( thePhotometric[dir] == PHOTOMETRIC_YCBCR ||
-                thePhotometric[dir] == PHOTOMETRIC_PALETTE ) &&
-              (theSamplesPerPixel <= 3) &&
-              (theBitsPerSample   <= 8 ))
-         {
-            theReadMethod[dir] = READ_RGBA_U8_TILE;
-         }
-         else
-         {
-            theReadMethod[dir] = READ_TILE;
-         }
-      }
-      else // Not tiled...
-      {
-         if ( (thePhotometric[dir] == PHOTOMETRIC_PALETTE ||
-               thePhotometric[dir] == PHOTOMETRIC_YCBCR ) &&
-              theSamplesPerPixel <= 3 &&
-              theBitsPerSample   <= 8 )
-         {
-            theReadMethod[dir] = READ_RGBA_U8_STRIP;
-         }
-         else if ( ( theBitsPerSample == 16 ) &&
-                   ( theRowsPerStrip[dir] > 1 ) &&
-                   ( thePlanarConfig[dir] == PLANARCONFIG_SEPARATE ) &&
-                   ( theCompressionType == COMPRESSION_NONE ) )
-         {
-            // Buffer a strip of bands.
-            theReadMethod[dir] = READ_U16_STRIP;
-         }
-         else if (theSamplesPerPixel <= 3 && theBitsPerSample == 1)
-         {
-            //---
-            // Note:  One bit data expands to zeroes and 255's so run it through
-            //        a specialized method to flip zeroes to one's since zeroes
-            //        are usually reserved for null value.
-            //---
-            theReadMethod[dir] = READ_RGBA_U8A_STRIP;
-         }
-         else if((theCompressionType == COMPRESSION_NONE)||
-                 (theRowsPerStrip[dir]==1))
-         {
-            theReadMethod[dir] = READ_SCAN_LINE;
-         }
-         else if((theCompressionType!=COMPRESSION_NONE)&&
-                 (theSamplesPerPixel <= 3) &&
-                 (theBitsPerSample   <= 8) )
-         {
-            theReadMethod[dir] = READ_RGBA_U8_STRIP;
-         }
-         else
-         {
-            theReadMethod[dir] = UNKNOWN;
-         }
-      }
-      
-   } // End of loop through directories.
-
-   // Reset the directory back to "0".
-   setTiffDirectory(0);
-}
-
-void ossimTiffTileSource::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property.valid())
-   {
-      return;
-   }
-   if(property->getName() == "apply_color_palette_flag")
-   {
-      // Assuming first directory...
-      setApplyColorPaletteFlag(property->valueToString().toBool());
-   }
-   else
-   {
-      ossimImageHandler::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimTiffTileSource::getProperty(const ossimString& name)const
-{
-   if(name == "apply_color_palette_flag")
-   {
-      ossimBooleanProperty* property = new ossimBooleanProperty("apply_color_palette_flag",
-                                                                theApplyColorPaletteFlag);
-      property->clearChangeType();
-      property->setFullRefreshBit();
-      return property;
-   }
-   else if(name == "file_type")
-	{
-		return new ossimStringProperty(name, "TIFF");
-	}
-	
-   return ossimImageHandler::getProperty(name);
-}
-
-void ossimTiffTileSource::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimImageHandler::getPropertyNames(propertyNames);
-   propertyNames.push_back("file_type");
-   propertyNames.push_back("apply_color_palette_flag");
-}
-
-bool ossimTiffTileSource::setTiffDirectory(ossim_uint16 directory)
-{
-   bool status = true;
-   theCurrentTiffRlevel = 0;
-   if (theCurrentDirectory != directory)
-   {
-      status = TIFFSetDirectory(theTiffPtr, directory);
-      if (status == true)
-      {
-         theCurrentDirectory = directory;
-      }
-      else
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimTiffTileSource::setTiffDirectory ERROR setting directory "
-               << directory << "!" << endl;
-         }
-      }
-   }
-   
-   ossim_uint32 idx = 0;
-   for(idx = 0; idx<theImageDirectoryList.size();++idx)
-   {
-      if(theImageDirectoryList[idx] == directory)
-      {
-         theCurrentTiffRlevel = idx;
-         break;
-      }
-   }
-   return status;
-}
-
-void ossimTiffTileSource::populateLut()
-{
-   ossim_uint16* r;
-   ossim_uint16* g;
-   ossim_uint16* b;
-   if(TIFFGetField(theTiffPtr, TIFFTAG_COLORMAP, &r, &g, &b))
-   {
-      ossim_uint32 numEntries = 256;
-      ossimScalarType scalarType = OSSIM_UINT8;
-      if(theBitsPerSample == 16)
-      {
-         numEntries = 65536;
-         scalarType = OSSIM_UINT16;
-      }
-      theLut = new ossimNBandLutDataObject(numEntries,
-                                           3,
-                                           scalarType,
-                                           0);
-      ossim_uint32 entryIdx = 0;
-      for(entryIdx = 0; entryIdx < numEntries; ++entryIdx)
-      {
-         if(scalarType == OSSIM_UINT8)
-         {
-            (*theLut)[entryIdx][0] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(((*r)/65535.0)*255.0);
-            (*theLut)[entryIdx][1] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(((*g)/65535.0)*255.0);
-            (*theLut)[entryIdx][2] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(((*b)/65535.0)*255.0);
-         }
-         else
-         {
-            (*theLut)[entryIdx][0] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(*r);
-            (*theLut)[entryIdx][1] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(*g);
-            (*theLut)[entryIdx][2] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(*b);
-         }
-         ++r;++g;++b;
-      }
-   }
-}
-
-void ossimTiffTileSource::validateMinMaxNull()
-{
-   ossim_float64 tempNull = ossim::defaultNull(theScalarType);
-   ossim_float64 tempMax  = ossim::defaultMax(theScalarType);
-   ossim_float64 tempMin  = ossim::defaultMin(theScalarType);
-   
-   if( (theMinSampleValue == tempNull) || ossim::isnan(theMinSampleValue) ) 
-   {
-      theMinSampleValue = tempMin;
-   }
-   if( (theMaxSampleValue == tempNull) || ossim::isnan(theMaxSampleValue) )
-   {
-      theMaxSampleValue = tempMax;
-   }
-   if ( ossim::isnan(theNullSampleValue) )
-   {
-      theNullSampleValue = tempNull;
-   }
-
-   if (theScalarType == OSSIM_FLOAT32)
-   {
-      std::ifstream inStr(theImageFile.c_str(), std::ios::in|std::ios::binary);
-      if ( inStr.good() )
-      {   
-         // Do a print to a memory stream in key:value format.
-         ossimTiffInfo ti;
-         ossimIOMemoryStream memStr;
-         ti.print(inStr, memStr);
-
-         // Make keywordlist with all the tags.
-         ossimKeywordlist gtiffKwl;
-         if ( gtiffKwl.parseStream(memStr) )
-         {
-#if 0 /* Please keep for debug. (drb) */
-            if ( traceDebug() )
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG)
-                  << "ossimTiffTileSource::validateMinMaxNull kwl:\n" << gtiffKwl
-                  << endl;
-            }
-#endif
-            const char* lookup;
-
-            lookup = gtiffKwl.find("tiff.image0.gdal_nodata");
-            bool nullFound = false;
-            if ( lookup )
-            {
-               ossimString os = lookup;
-               theNullSampleValue = os.toFloat32();
-               nullFound = true;
-            }
-            lookup = gtiffKwl.find("tiff.image0.vertical_citation");
-            if ( lookup )
-            {     
-               //---
-               // Format of string this handles:
-               // "Null: -9999.000000, Non-Null Min: 12.428605, 
-               // Non-Null Avg: 88.944082, Non-Null Max: 165.459558|"
-               ossimString citation = lookup;
-               std::vector<ossimString> array;
-               citation.split( array, ossimString(",") );
-               if ( array.size() == 4 )
-               {
-                  std::vector<ossimString> array2;
-
-                  if ( !nullFound )
-                  {
-                     // null
-                     array[0].split( array2, ossimString(":") );
-                     if ( array2.size() == 2 )
-                     {
-                        ossimString os = array2[0].downcase();
-                        if ( os.contains( ossimString("null") ) )
-                        {
-                           if ( array2[1].size() )
-                           {
-                              theNullSampleValue = array2[1].toFloat64(); 
-                              nullFound = true;
-                           }
-                        }
-                     }
-                  }
-
-                  // min
-                  array2.clear();
-                  array[1].split( array2, ossimString(":") );
-                  if ( array2.size() == 2 )
-                  {  
-                     ossimString os = array2[0].downcase();
-                     if ( os.contains( ossimString("min") ) )
-                     {
-                        if ( array2[1].size() )
-                        {
-                           theMinSampleValue = array2[1].toFloat64();
-                        }
-                     }
-                  }
-
-                  // Skipping average.
-
-                  // max
-                  array2.clear();
-                  array[3].split( array2, ossimString(":") );
-                  if ( array2.size() == 2 )
-                  {
-                     ossimString os = array2[0].downcase();
-                     if ( os.contains( ossimString("max") ) )
-                     {
-                        if ( array2[1].size() )
-                        {
-                           array2[1].trim( ossimString("|") );
-                           theMaxSampleValue = array2[1].toFloat64();   
-                        }
-                     }
-                  }
-               }
-            }
-         }
-      }
-   }
-}
-
-#if 0
-ossimImageGeometry* ossimTiffTileSource::getImageGeometry()
-{
-   //---
-   // Call base class getImageGeometry which will check for external geometry
-   // or an already set geometry.
-   //---
-   ossimImageGeometry* result = ossimImageHandler::getImageGeometry();
-
-   if (result)
-   {
-      //---
-      // TODO: Add transform from tags.
-      //---
-
-      
-      // if ( !result->getTransform() )
-      // {
-      //    if ( transform.valid() )
-      //    {
-      //       result->setTransform( transform.get() );
-      //    }
-      // }
-      //else
-      //{
-      //   ossimImageGeometryRegistry::instance()->createTransform(this);
-      //}
-      
-      if ( !result->getProjection() )
-      {
-         // Get the projection from the tags.
-         
-         ossimRefPtr<ossimProjection> proj = 0;
-
-         if (theTiffPtr)
-         {
-            ossimGeoTiff geotiff;
-
-            //---
-            // Note: must pass false to readTags so it doesn't close our
-            // tiff pointer.
-            //---
-            geotiff.readTags(theTiffPtr, getCurrentEntry(), false);
-            ossimKeywordlist kwl;
-            if(geotiff.addImageGeometry(kwl))
-            {
-               proj = ossimProjectionFactoryRegistry::instance()->
-                  createProjection(kwl);
-            }
-            
-            if ( proj.valid() )
-            {
-               result->setProjection( proj.get() );
-            }
-            //else
-            //{
-            // ossimImageGeometryRegistry::instance()->createProjection(this);
-            //}
-         }
-      }
-      
-   } // matches: if (result)
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimTiffTileSource::createImageGeometry DEBUG:\n";
-
-      if (result)
-      {
-         result->print(ossimNotify(ossimNotifyLevel_DEBUG)) << "\n";
-      }
-   }
-
-   return result;
-}
-#endif
-
-bool ossimTiffTileSource::isPowerOfTwoDecimation(ossim_uint32 level) const
-{
-   // Check size of this level against last level to see if it's half the previous.
-   bool result = false;
-   if ( (level > 0) && ( theImageWidth.size() > level ) && ( theImageLength.size() > level ) )
-   {
-      ossim_uint32 i = level-1; // previous level
-      
-      if ( ( ( theImageWidth[i]/2 == theImageWidth[level] ) ||
-             ( (theImageWidth[i]+1)/2 == theImageWidth[level] ) ) &&
-           ( ( theImageLength[i]/2 == theImageLength[level] ) ||
-             ( (theImageLength[i]+1)/2 == theImageLength[level] ) ) )
-      {
-         result = true;
-      }
-   }
-   return result;
-}
-
-void ossimTiffTileSource::allocateTile()
-{
-   theTile = 0;
-   ossim_uint32 bands = 0;
-   if ( theOutputBandList.empty() )
-   {
-      bands = getNumberOfOutputBands();
-   }
-   else
-   {
-      bands = theOutputBandList.size();
-   }
-
-   if ( bands )
-   {
-      theTile = ossimImageDataFactory::instance()->create( this, getOutputScalarType(), bands );
-      if ( theTile.valid() )
-      {
-         theTile->initialize();
-         
-         // The width and height mus be set prior to call to allocateBuffer.
-         theCurrentTileWidth  = theTile->getWidth();
-         theCurrentTileHeight = theTile->getHeight();
-      }
-   }
-}
-
-bool ossimTiffTileSource::allocateBuffer()
-{
-   bool bSuccess = true;
-
-   // Allocate memory for a buffer to hold data grabbed from the tiff file.
-   ossim_uint32 buffer_size=0;
-   switch (theReadMethod[theCurrentDirectory])
-   {
-      case READ_RGBA_U8_TILE:
-      {
-         buffer_size = theImageTileWidth[theCurrentDirectory]*
-            theImageTileWidth[theCurrentDirectory]*theBytesPerPixel*4;
-         break;
-      }  
-      case READ_TILE:
-      {
-         if (thePlanarConfig[theCurrentDirectory] == PLANARCONFIG_CONTIG)
-         {
-            buffer_size = theImageTileWidth[theCurrentDirectory] *
-               theImageTileLength[theCurrentDirectory] *
-               theBytesPerPixel * theSamplesPerPixel;
-         }
-         else
-         {
-            buffer_size = theImageTileWidth[theCurrentDirectory] *
-               theImageTileLength[theCurrentDirectory] *
-               theBytesPerPixel;
-         }
-         break;
-      }  
-      case READ_RGBA_U8_STRIP:
-      case READ_RGBA_U8A_STRIP:
-      {
-         buffer_size = theImageWidth[0]*theRowsPerStrip[theCurrentDirectory]*
-            theBytesPerPixel*4;
-         break;
-      } 
-      case READ_U16_STRIP:
-      {
-         buffer_size = theImageWidth[0]*theRowsPerStrip[theCurrentDirectory]*
-            theBytesPerPixel*theSamplesPerPixel;
-         break;
-      }
-      case READ_SCAN_LINE:
-      {
-#if OSSIM_BUFFER_SCAN_LINE_READS
-         // Buffer a image width by tile height.
-         buffer_size = theImageWidth[0] * theBytesPerPixel *
-            theSamplesPerPixel * theCurrentTileHeight;
-#else
-         buffer_size = theImageWidth[0] * theBytesPerPixel * theSamplesPerPixel;
-#endif
-         break;
-      }
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "Unknown read method!" << endl;
-         print(ossimNotify(ossimNotifyLevel_WARN));
-         bSuccess = false;
-      }
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimTiffTileSource::allocateBuffer DEBUG:"
-         << "\nbuffer_size:  " << buffer_size
-         << endl;
-   }
-
-   theBufferRect.makeNan();
-   theBufferRLevel = theCurrentDirectory;
-
-   if ( bSuccess && ( buffer_size != theBufferSize ) )
-   {
-      theBufferSize = buffer_size;
-      if (theBuffer)
-      {
-         delete [] theBuffer;
-      }
-
-      // ESH 05/2009 -- Fix for ticket #738:  
-      // image_info crashing on aerial_ortho image during ingest
-      try
-      {
-         theBuffer = new ossim_uint8[buffer_size];
-      }
-      catch(...)
-      {
-         theBuffer = 0;
-         bSuccess = false;
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimTiffTileSource::allocateBuffer WARN:"
-               << "\nNot enough memory: buffer_size:  " << buffer_size
-               << endl;
-         }
-      }
-   }
-
-   return bSuccess;
-}
diff --git a/src/ossim/imaging/ossimTiffWriter.cpp b/src/ossim/imaging/ossimTiffWriter.cpp
deleted file mode 100644
index ddf3342..0000000
--- a/src/ossim/imaging/ossimTiffWriter.cpp
+++ /dev/null
@@ -1,1739 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Frank Warmerdam (warmerda at home.com)
-//
-//*******************************************************************
-//  $Id: ossimTiffWriter.cpp 22235 2013-04-16 22:37:08Z dburken $
-
-#include <ossim/ossimConfig.h>
-#include <ossim/imaging/ossimTiffWriter.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimNumericProperty.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimBooleanProperty.h>
-#include <ossim/base/ossimFilenameProperty.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimMapProjectionInfo.h>
-#include <ossim/imaging/ossimImageChain.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/projection/ossimUtmProjection.h>
-#include <ossim/projection/ossimEpsgProjectionDatabase.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/projection/ossimStatePlaneProjectionInfo.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/base/ossimFilenameProperty.h>
-#include <ossim/support_data/ossimGeoTiff.h>
-#include <ossim/imaging/ossimMemoryImageSource.h>
-#include <ossim/imaging/ossimScalarRemapper.h>
-
-#include <tiffio.h>
-#ifdef OSSIM_HAS_GEOTIFF
-#  if OSSIM_HAS_GEOTIFF
-#    include <xtiffio.h>
-#    include <geotiff.h>
-#    include <geo_normalize.h>
-#    include <geovalues.h>
-#  endif
-#endif
-
-#include <algorithm>
-#include <sstream>
-
-static ossimTrace traceDebug("ossimTiffWriter:debug");
-static const char* TIFF_WRITER_OUTPUT_TILE_SIZE_X_KW = "output_tile_size_x";
-static const char* TIFF_WRITER_OUTPUT_TILE_SIZE_Y_KW = "output_tile_size_y";
-static const int   PCS_BRITISH_NATIONAL_GRID = 27700;
-static const long  DEFAULT_JPEG_QUALITY = 75;
-
-RTTI_DEF1(ossimTiffWriter, "ossimTiffWriter", ossimImageFileWriter);
-
-#ifdef OSSIM_ID_ENABLED
-static const char OSSIM_ID[] = "$Id: ossimTiffWriter.cpp 22235 2013-04-16 22:37:08Z dburken $";
-#endif
-
-ossimTiffWriter::ossimTiffWriter()
-   :
-      ossimImageFileWriter(),
-      theTif(NULL),
-      theCompressionType("none"),
-      theJpegQuality(DEFAULT_JPEG_QUALITY),
-      theOutputGeotiffTagsFlag(true),
-      theColorLutFlag(false),
-      theProjectionInfo(NULL),
-      theOutputTileSize(OSSIM_DEFAULT_TILE_WIDTH, OSSIM_DEFAULT_TILE_HEIGHT),
-      theForceBigTiffFlag(false),
-      theBigTiffFlag(false)
-{
-   theColorLut = new ossimNBandLutDataObject();
-   ossim::defaultTileSize(theOutputTileSize);
-   theOutputImageType = "tiff_tiled_band_separate";
-
-   
-#ifdef OSSIM_ID_ENABLED /* to quell unused variable warning. */
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)<< "OSSIM_ID:  " << OSSIM_ID << endl;
-   }
-#endif
-}
-
-ossimTiffWriter::~ossimTiffWriter()
-{
-   if(isOpen())
-   {
-      closeTiff();
-   }
-}
-
-bool ossimTiffWriter::openTiff()
-{
-   static const char* MODULE = "ossimTiffWriter::openTiff()";
-
-   bool status = false;
-   
-   // Close the existing file pointer.
-   closeTiff();
-
-   // Check for empty file name.
-   if ( theFilename.size() )
-   {
-      //---
-      // On windows libtiff can treat class tiff offsets as signed(2GB limit) or
-      // unsigned(4GB) so if even close to 2GB (2.1.47 GB) limit make a big tiff.
-      //---
-      const ossim_uint64 BIGTIFF_THRESHOLD = 2000000000;
-      ossimIrect bounds = theInputConnection->getBoundingRect();
-      ossim_uint64 byteCheck =
-         (static_cast<ossim_uint64>(bounds.width())*
-          static_cast<ossim_uint64>(bounds.height())*
-          static_cast<ossim_uint64>(theInputConnection->getNumberOfOutputBands())*
-          static_cast<ossim_uint64>(ossim::scalarSizeInBytes(theInputConnection->getOutputScalarType())));
-      
-      if( byteCheck > BIGTIFF_THRESHOLD )
-      {
-         theBigTiffFlag = true;
-      }
-      
-      ossimString openMode = "w";
-      if(theBigTiffFlag||theForceBigTiffFlag)
-      {
-         openMode += "8";
-      }
-      
-      // Open the new file.
-      theTif = XTIFFOpen( theFilename.c_str(), openMode.c_str() );
-      if ( theTif )
-      {
-         status = true;
-      }
-      else
-      {
-         setErrorStatus(); // base class
-         ossimSetError(getClassName().c_str(),
-                       ossimErrorCodes::OSSIM_ERROR,
-                       "File %s line %d Module %s Error:\n\
-Error opening file:  %s\n",
-                       __FILE__,
-                       __LINE__,
-                       MODULE,
-                       theFilename.c_str());
-      }
-   }
-   return status;
-}
-
-bool ossimTiffWriter::closeTiff()
-{
-   if (theTif)
-   {
-      XTIFFClose( (TIFF*)theTif );
-      theTif = NULL;
-   }
-   return true;
-}
-
-bool ossimTiffWriter::writeTiffTags()
-{
-   static const char MODULE[] = "ossimTiffWriter::writeTiffTags";
-   TIFF* tiffPtr = (TIFF*)theTif;
-   if (!tiffPtr)
-   {
-      setErrorStatus(); // base class
-      ossimSetError(getClassName().c_str(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "File %s line %d %s\nError:  Tiff pointer is null!\n\
-Call setFilename method.\n",
-                    __FILE__,
-                    __LINE__,
-                    MODULE);
-      return false;
-   }
-
-   //---
-   // NOTE:
-   // Since the tiff library uses the variable argument list function "va_arg"
-   // it is important to use the correct data type.  If in doubt see the
-   // code for libtiff's _TIFFVSetField in "tif_dir.c" in the libtiff package.
-   //---
-
-   int bitsPerSample  = 0;
-   int sampleFormat   = 0;
-   switch( theInputConnection->getOutputScalarType() )
-   {
-   case OSSIM_UINT8:
-      bitsPerSample = 8;
-      sampleFormat = SAMPLEFORMAT_UINT;
-      break;
-
-   case OSSIM_UINT16:
-   case OSSIM_USHORT11:
-      bitsPerSample = 16;
-      sampleFormat = SAMPLEFORMAT_UINT;
-      break;
-
-   case OSSIM_SINT16:
-      bitsPerSample = 16;
-      sampleFormat = SAMPLEFORMAT_INT;
-      break;
-
-   case OSSIM_FLOAT32:
-   case OSSIM_NORMALIZED_FLOAT:
-      bitsPerSample = 32;
-      sampleFormat = SAMPLEFORMAT_IEEEFP;
-      break;
-
-   case OSSIM_NORMALIZED_DOUBLE:
-   case OSSIM_FLOAT64:
-      bitsPerSample = 64;
-      sampleFormat = SAMPLEFORMAT_IEEEFP;
-      break;
-
-   default:
-      return false;
-   }
-
-   // Set the pixel type.
-   TIFFSetField( (TIFF*)tiffPtr, TIFFTAG_BITSPERSAMPLE, bitsPerSample );
-   TIFFSetField( (TIFF*)tiffPtr, TIFFTAG_SAMPLEFORMAT, sampleFormat );
-
-   // Set the image dimensions.
-   ossim_uint32  width  = theAreaOfInterest.width();
-   ossim_uint32  height = theAreaOfInterest.height();
-   TIFFSetField( tiffPtr, TIFFTAG_IMAGEWIDTH, width);
-   TIFFSetField( tiffPtr, TIFFTAG_IMAGELENGTH, height);
-   if (isTiled())
-   {
-      ossim_uint32 tileXSize = theOutputTileSize.x;
-      ossim_uint32 tileYSize = theOutputTileSize.y;
-      TIFFSetField(tiffPtr, TIFFTAG_TILEWIDTH,  tileXSize);
-      TIFFSetField(tiffPtr, TIFFTAG_TILELENGTH, tileYSize);
-   }
-   else
-   {
-      TIFFSetField(tiffPtr, TIFFTAG_ROWSPERSTRIP, ossim_uint32(1));
-   }
-
-   ossim_uint32 numberOfBands = theInputConnection->getNumberOfOutputBands();
-
-   // Set the min/max values.
-   std::vector<ossim_float64> minBand(numberOfBands);
-   std::vector<ossim_float64> maxBand(numberOfBands);
-   for(ossim_uint32 idx = 0; idx < numberOfBands; ++idx)
-   {
-      maxBand[idx] = theInputConnection->getMaxPixelValue(idx);
-      minBand[idx] = theInputConnection->getMinPixelValue(idx);
-   }
-   
-   writeMinMaxTags(minBand, maxBand);
-   
-   // Set the planar configuration.
-   if ( (theOutputImageType == "tiff_strip") ||
-        (theOutputImageType == "tiff_tiled") ||
-        (theOutputImageType == "image/tiff") ||
-        (theOutputImageType == "image/tif") ||
-        (theOutputImageType == "image/gtif") ||
-        (theOutputImageType == "image/gtiff") )
-   {
-      TIFFSetField( tiffPtr, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
-   }
-   else
-   {
-      TIFFSetField( tiffPtr, TIFFTAG_PLANARCONFIG, PLANARCONFIG_SEPARATE);
-   }
-
-   // Set the compression type:
-   uint16 tiffCompressType = COMPRESSION_NONE;
-   theCompressionType.downcase();
-   if( theCompressionType == "jpeg")
-   {
-      tiffCompressType  = COMPRESSION_JPEG;
-
-      // Set the jpeg quality.
-      TIFFSetField( tiffPtr, TIFFTAG_JPEGQUALITY,  theJpegQuality);
-   }
-   else if(theCompressionType == "packbits")
-   {
-      tiffCompressType = COMPRESSION_PACKBITS;
-   }
-   else if((theCompressionType == "deflate") ||
-           (theCompressionType == "zip"))
-   {
-      tiffCompressType  = COMPRESSION_DEFLATE;
-   }
-   TIFFSetField( tiffPtr, TIFFTAG_COMPRESSION, tiffCompressType);
-   TIFFSetField(tiffPtr, TIFFTAG_SAMPLESPERPIXEL, (int)theInputConnection->getNumberOfOutputBands());
-
-   ossimScalarType scalarType = theInputConnection->getOutputScalarType();
-   bool lutEnabled = (theColorLutFlag&&
-                      ((scalarType == OSSIM_UINT8)||
-                       (scalarType == OSSIM_UINT16)||
-                       (scalarType == OSSIM_USHORT11))&&
-                      (theColorLut->getNumberOfEntries() > 0)&&
-                      (theInputConnection->getNumberOfOutputBands() == 1));
-   if(lutEnabled)
-   {
-      TIFFSetField( tiffPtr, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE );
-      TIFFSetField( tiffPtr, TIFFTAG_INDEXED, (ossim_uint16)1);
-
-      if(scalarType == OSSIM_UINT8)
-      {
-         ossim_uint16 r[256], g[256], b[256];
-         
-         memset(r, '\0', sizeof(ossim_uint16)*256);
-         memset(g, '\0', sizeof(ossim_uint16)*256);
-         memset(b, '\0', sizeof(ossim_uint16)*256);
-         
-         for(ossim_uint32 i = 0; i < theColorLut->getNumberOfEntries(); i++)
-         {
-            r[i] = (ossim_uint16) (((*theColorLut)[i][0]/255.0)*65535);
-            g[i] = (ossim_uint16) (((*theColorLut)[i][1]/255.0)*65535);
-            b[i] = (ossim_uint16) (((*theColorLut)[i][2]/255.0)*65535);
-         }
-         TIFFSetField(tiffPtr, TIFFTAG_COLORMAP, r, g ,b);
-      }
-      else
-      {
-         ossim_uint16 r[65536], g[65536], b[65536];
-         memset(r, '\0', sizeof(ossim_uint16)*65536);
-         memset(g, '\0', sizeof(ossim_uint16)*65536);
-         memset(b, '\0', sizeof(ossim_uint16)*65536);
-         
-         for(ossim_uint32 i = 0; i < theColorLut->getNumberOfEntries(); i++)
-         {
-            r[i] = (ossim_uint16) ((*theColorLut)[i][0]);
-            g[i] = (ossim_uint16) ((*theColorLut)[i][1]);
-            b[i] = (ossim_uint16) ((*theColorLut)[i][2]);
-         }
-         TIFFSetField(tiffPtr, TIFFTAG_COLORMAP, r, g ,b);
-      }
-   }
-   else if( (theInputConnection->getNumberOfOutputBands() == 3 ||
-             theInputConnection->getNumberOfOutputBands() == 4 ||
-             (thePhotoMetric == "rgb"))&&
-            (scalarType == OSSIM_UCHAR))
-   {
-      TIFFSetField( tiffPtr, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB );
-   }
-   else
-   {
-      TIFFSetField( tiffPtr, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK );
-   }
-
-   return true;
-}
-
-bool ossimTiffWriter::writeGeotiffTags(ossimRefPtr<ossimMapProjectionInfo> projectionInfo)
-{
-   TIFF* tiffPtr = (TIFF*)theTif;
-   bool result = false;
-   if ( tiffPtr )
-   {
-      if ( projectionInfo.valid() )
-      {
-         result = ossimGeoTiff::writeTags(tiffPtr, projectionInfo);
-      }
-   }
-   return result;
-}
-
-void ossimTiffWriter::checkColorLut()
-{
-   
-   // this code appears to be wrong.  We can only do an outo lut if the immediate input to the sequencer is 
-   // a handler with a lut or some kind of lut source.
-   // 
-   // I think that we should add a flag to enable auto setting of the lut instead of just doing it. This code causes core
-   // dumps if one is to replicate bands with a band selector where a lut is a single band output like a CIB
-   //
-   // I currenlty have to disable
-   //
-   
-   
-#if 0
-   bool needColorLut = false;
-   bool needLoop = true;
-   ossimRefPtr<ossimNBandLutDataObject> colorLut = 0;
-   ossimConnectableObject::ConnectableObjectList imageInputs = theInputConnection->getInputList();
-   if (imageInputs.size() > 0)
-   {
-      for (ossim_uint32 i = 0; i < imageInputs.size(); i++)
-      {
-         if (needLoop == false)
-         {
-            break;
-         }
-         ossimImageChain* source = PTR_CAST(ossimImageChain, imageInputs[i].get());
-         if (source)
-         {
-            ossimConnectableObject::ConnectableObjectList imageChains = source->getInputList();
-            for (ossim_uint32 j = 0; j < imageChains.size(); j++)
-            {
-               if (needLoop == false)
-               {
-                  break;
-               }
-               ossimImageChain* imageChain = PTR_CAST(ossimImageChain, imageChains[j].get());
-               if (imageChain)
-               {
-                  ossimConnectableObject::ConnectableObjectList imageHandlers =
-                     imageChain->findAllObjectsOfType(STATIC_TYPE_INFO(ossimImageHandler), false);
-                  
-                  for (ossim_uint32 h= 0; h < imageHandlers.size(); h++)
-                  {
-                     ossimImageHandler* handler =
-                        PTR_CAST(ossimImageHandler, imageHandlers[h].get());
-                     if (handler)
-                     {
-                        if (handler->getLut() != 0) //
-                        {
-                           colorLut = handler->getLut();
-                           needColorLut = true;
-                        }
-                        else //if not all handlers have color luts, ignore the color lut.
-                        {
-                           needColorLut = false;
-                           needLoop = false;
-                           break;
-                        }
-                     }
-                  }
-               }
-            }
-         }
-      }
-   }
-   
-   if (needColorLut && colorLut != 0)
-   {
-      setLut(*colorLut.get());
-   }
-#endif
-}
-
-bool ossimTiffWriter::writeFile()
-
-{
-   static const char MODULE[] = "ossimTiffWriter::writeFile";
-
-   if (traceDebug()) CLOG << "Entered..." << std::endl;
-
-   //checkColorLut();
-
-   if(isLutEnabled())
-   {
-      theNBandToIndexFilter = new ossimNBandToIndexFilter;
-      theNBandToIndexFilter->connectMyInputTo(0, theInputConnection->getInput());
-      theNBandToIndexFilter->setLut(*theColorLut.get());
-      theNBandToIndexFilter->initialize();
-      theInputConnection->disconnect();
-      theInputConnection->connectMyInputTo(0, theNBandToIndexFilter.get());
-      theInputConnection->initialize();
-   }
-   else
-   {
-      theNBandToIndexFilter = 0;
-   }
-   
-   if (traceDebug() && theInputConnection.get())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << "DEBUG:"
-         << "\nnull:  " << theInputConnection->getNullPixelValue()
-         << "\nmin:   " << theInputConnection->getMinPixelValue()
-         << "\nmax:   " << theInputConnection->getMaxPixelValue()
-         << std::endl;
-   }
-   
-   if (isTiled())
-   {
-      if ( (theInputConnection->getTileWidth()  !=
-            static_cast<ossim_uint32>(theOutputTileSize.x)) ||
-           (theInputConnection->getTileHeight() !=
-            static_cast<ossim_uint32>(theOutputTileSize.y)) )
-      {
-         theInputConnection->setTileSize(theOutputTileSize);
-      }
-   }
-   
-   if(!theInputConnection->isMaster())
-   {
-      theInputConnection->slaveProcessTiles();
-
-      if(theNBandToIndexFilter.valid())
-      {
-         theInputConnection->connectMyInputTo(0, theNBandToIndexFilter->getInput());
-         theNBandToIndexFilter = 0;
-      }
-      
-      return true;
-   }
-
-   open();
-
-   if (!isOpen())
-   {
-      if (traceDebug())
-      {
-         CLOG << " ERROR:  Could not open!  Returning..." << std::endl;
-      }
-
-      return false;
-   }
-
-   if(!theInputConnection)
-   {
-      if (traceDebug())
-      {
-         CLOG << " ERROR:  No input connection!  Returning..." << std::endl;
-      }
-
-      return false;
-   }
-
-   // First write the tiff tags.
-   if (writeTiffTags() == false)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE << " ERROR:"
-            << "\nError detected writing tiff tags.  Returning..." << std::endl;
-         return false;
-      }
-   }
-
-   // Write the geotiff tags.
-   if (theOutputGeotiffTagsFlag)
-   {
-      if(theViewController.get()) // let this override
-      {                     // found in ossimImageWriter base
-         ossimMapProjection* proj = PTR_CAST(ossimMapProjection,
-                                             theViewController->getView());
-         if(proj)
-         {
-            ossimRefPtr<ossimMapProjectionInfo> projectionInfo
-               = new ossimMapProjectionInfo(proj, theAreaOfInterest);
-            projectionInfo->setPixelType(thePixelType);
-
-            if (writeGeotiffTags(projectionInfo) == false)
-            {
-               if(traceDebug())
-               {
-                  ossimNotify(ossimNotifyLevel_DEBUG)
-                     << MODULE << " ERROR:"
-                     << "\nError detected writing geotiff tags.  Returning..."
-                     << std::endl;
-               }
-               return false;
-            }
-         }
-      }
-      else if(theProjectionInfo.valid())
-      {
-         theProjectionInfo->setPixelType(thePixelType);
-         if (writeGeotiffTags(theProjectionInfo) == false)
-         {
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG)
-                  << MODULE << " ERROR:"
-                  << "\nError detected writing geotiff tags.  Returning..."
-                  << std::endl;
-            }
-            return false;
-         }
-      }
-      else
-      {
-         // Fetch the map projection of the input image if it exists:
-         ossimMapProjection* mapProj = 0;
-         ossimRefPtr<ossimImageGeometry> imgGeom = theInputConnection->getImageGeometry();
-         if ( imgGeom.valid() )
-         {
-            const ossimProjection* proj = imgGeom->getProjection();
-            mapProj = PTR_CAST(ossimMapProjection, proj);
-         }
-         if(mapProj)
-         {
-            ossimRefPtr<ossimMapProjectionInfo> projectionInfo
-               = new ossimMapProjectionInfo(mapProj, theAreaOfInterest);
-
-            projectionInfo->setPixelType(thePixelType);
-            if (writeGeotiffTags(projectionInfo) == false)
-            {
-               if(traceDebug())
-               {
-                  ossimNotify(ossimNotifyLevel_DEBUG)
-                     << MODULE << " ERROR:"
-                     << "\nError detected writing geotiff tags.  Returning..."
-                     << std::endl;
-               }
-               return false;
-            }
-         }
-      }
-
-   } // End of "if (theOutputGeotiffTagsFlag)"
-
-   // Write the file with the image data.
-   bool status = false;
-   if(theOutputImageType == "tiff_strip")
-   {
-      status = writeToStrips();
-   }
-   else if(theOutputImageType == "tiff_strip_band_separate")
-   {
-      status = writeToStripsBandSep();
-   }
-   else if((theOutputImageType == "tiff_tiled")||
-           (ossimString::downcase(theOutputImageType) == "image/tiff")||
-           (ossimString::downcase(theOutputImageType) == "image/tif")||
-           (ossimString::downcase(theOutputImageType) == "image/gtif")||
-           (ossimString::downcase(theOutputImageType) == "image/gtiff"))
-   {
-      status = writeToTiles();
-   }
-   else if(theOutputImageType == "tiff_tiled_band_separate")
-   {
-      status = writeToTilesBandSep();
-   }
-   else
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE << " ERROR:"
-            << "\nUnsupported output type:  " << theOutputImageType
-            << std::endl;
-      }
-   }
-
-   close();
-
-   if (traceDebug()) CLOG << " Exited..." << std::endl;
-
-   if(theNBandToIndexFilter.valid())
-   {
-      theInputConnection->connectMyInputTo(0, theNBandToIndexFilter->getInput());
-      theNBandToIndexFilter = 0;
-   }
-   
-   return status;
-}
-
-void ossimTiffWriter::setLut(const ossimNBandLutDataObject& lut)
-{
-   theColorLutFlag = true;
-   theColorLut = (ossimNBandLutDataObject*)lut.dup();
-}
-
-bool ossimTiffWriter::saveState(ossimKeywordlist& kwl,
-                                const char* prefix)const
-{
-   kwl.add(prefix,
-           "output_geotiff_flag",
-           (int)theOutputGeotiffTagsFlag,
-           true);
-
-   kwl.add(prefix,
-           TIFF_WRITER_OUTPUT_TILE_SIZE_X_KW,
-           theOutputTileSize.x,
-           true);
-
-   kwl.add(prefix,
-           TIFF_WRITER_OUTPUT_TILE_SIZE_Y_KW,
-           theOutputTileSize.y,
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::COMPRESSION_QUALITY_KW,
-           theJpegQuality,
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::COMPRESSION_TYPE_KW,
-           theCompressionType,
-           true);
-
-   kwl.add(prefix,
-           "color_lut_flag",
-           (ossim_uint32)theColorLutFlag,
-           true);
-
-   if(theColorLutFlag)
-   {
-      if(theLutFilename != "")
-      {
-         kwl.add(prefix,
-                 "lut_filename",
-                 theLutFilename.c_str(),
-                 true);
-      }
-      else
-      {
-         ossimString newPrefix = ossimString(prefix) + "lut.";
-         theColorLut->saveState(kwl, newPrefix.c_str());
-      }
-   }
-
-
-   return ossimImageFileWriter::saveState(kwl,
-                                          prefix);
-}
-
-bool ossimTiffWriter::loadState(const ossimKeywordlist& kwl,
-                                const char* prefix)
-{
-   const char *value;
-
-   ossimIpt defaultTileSize;
-   ossim::defaultTileSize(defaultTileSize);
-
-   value = kwl.find(prefix,
-                    TIFF_WRITER_OUTPUT_TILE_SIZE_X_KW);
-   if(value)
-   {
-      theOutputTileSize.x = ossimString(value).toLong();
-      if(theOutputTileSize.x<1)
-      {
-         theOutputTileSize.x = defaultTileSize.x;
-      }
-   }
-
-   value = kwl.find(prefix,
-                    TIFF_WRITER_OUTPUT_TILE_SIZE_Y_KW);
-   if(value)
-   {
-      theOutputTileSize.y = ossimString(value).toLong();
-      if(theOutputTileSize.y<1)
-      {
-         theOutputTileSize.y = defaultTileSize.y;
-      }
-   }
-
-
-   value = kwl.find(prefix, ossimKeywordNames::COMPRESSION_TYPE_KW);
-   if(value)
-   {
-      theCompressionType = ossimString(value).downcase();
-   }
-   else
-   {
-      theCompressionType = "none";
-   }
-
-   value = kwl.find(prefix, ossimKeywordNames::COMPRESSION_QUALITY_KW);
-   if(value)
-   {
-      setJpegQuality(ossimString(value).toLong());
-   }
-
-   value = kwl.find(prefix, ossimKeywordNames::PHOTOMETRIC_KW);
-   if(value)
-   {
-      thePhotoMetric = ossimString(value).downcase();
-   }
-
-   value = kwl.find(prefix, ossimKeywordNames::FILENAME_KW);
-   if(value)
-   {
-      setFilename(ossimFilename(value));
-   }
-
-   const char* flag = kwl.find(prefix, "output_geotiff_flag");
-   if(flag)
-   {
-      theOutputGeotiffTagsFlag = ossimString(flag).toBool();
-   }
-
-   ossimString newPrefix = ossimString(prefix) + "lut.";
-
-   const char* colorLutFlag = kwl.find(prefix, "color_lut_flag");
-   if(colorLutFlag)
-   {
-      theColorLutFlag = ossimString(colorLutFlag).toBool();
-   }
-   else
-   {
-      theColorLutFlag = false;
-   }
-   theLutFilename = ossimFilename(kwl.find(prefix, "lut_filename"));
-
-   theLutFilename = ossimFilename(theLutFilename.trim());
-   if(theLutFilename != "")
-   {
-      theColorLut->open(theLutFilename);
-   }
-   else
-   {
-      theColorLut->loadState(kwl, newPrefix.c_str());
-   }
-
-   if(ossimImageFileWriter::loadState(kwl,
-                                      prefix))
-   {
-      if((theOutputImageType!="tiff_tiled") &&
-         (theOutputImageType!="tiff_tiled_band_separate") &&
-         (theOutputImageType!="tiff_strip") &&
-         (theOutputImageType!="tiff_strip_band_separate")&&
-         (theOutputImageType!="image/tiff")&&
-         (theOutputImageType!="image/tif")&&
-         (theOutputImageType!="image/gtif")&&
-         (theOutputImageType!="image/gtiff"))
-      {
-
-         theOutputImageType = "tiff_tiled_band_separate";;
-      }
-   }
-   else
-   {
-      return false;
-   }
-
-   return true;
-}
-
-bool ossimTiffWriter::isTiled() const
-{
-   return ( theOutputImageType == "tiff_tiled" ||
-            theOutputImageType == "image/tiff" ||
-            theOutputImageType == "image/tif" ||
-            theOutputImageType == "image/gtif" ||
-            theOutputImageType == "image/gtiff" ||
-            theOutputImageType == "tiff_tiled_band_separate" );
-}
-
-bool ossimTiffWriter::writeToTiles()
-{
-   static const char* const MODULE = "ossimTiffWriter::writeToTiles";
-   TIFF* tiffPtr = (TIFF*)theTif;
-
-   if (traceDebug()) CLOG << " Entered." << std::endl;
-
-   // Start the sequence at the first tile.
-   theInputConnection->setToStartOfSequence();
-
-   ossimRefPtr<ossimImageData> tempTile = 0;
-
-   if(theColorLutFlag)
-   {
-      tempTile = ossimImageDataFactory::instance()->create(this, 1, theInputConnection.get());
-   }
-   else
-   {
-      tempTile = ossimImageDataFactory::instance()->create(this, theInputConnection.get());
-   }
-   if(tempTile.valid())
-   {
-      tempTile->initialize();
-   }
-   ossim_uint32 tilesWide       = theInputConnection->getNumberOfTilesHorizontal();
-   ossim_uint32 tilesHigh       = theInputConnection->getNumberOfTilesVertical();
-   ossim_uint32 tileWidth       = theInputConnection->getTileWidth();
-   ossim_uint32 tileHeight      = theInputConnection->getTileHeight();
-   ossim_uint32 numberOfTiles   = theInputConnection->getNumberOfTiles();
-
-   // Tile loop in the height direction.
-   ossim_uint32 tileNumber = 0;
-   vector<ossim_float64> minBands;
-   vector<ossim_float64> maxBands;
-   for(ossim_uint32 i = 0; ((i < tilesHigh)&&!needsAborting()); i++)
-   {
-      ossimIpt origin(0,0);
-      origin.y = i * tileHeight;
-
-      // Tile loop in the sample (width) direction.
-      for(ossim_uint32 j = 0; ((j < tilesWide)&&!needsAborting()); j++)
-      {
-         origin.x = j * tileWidth;
-
-         // Grab the tile.
-         ossimRefPtr<ossimImageData> id = theInputConnection->getNextTile();
-         if (!id)
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << " ERROR:"
-               << "Error returned writing tiff tile:  " << tileNumber
-               << "\nNULL Tile encountered"
-               << std::endl;
-            return false;
-         }
-
-         ossimDataObjectStatus  tileStatus      = id->getDataObjectStatus();
-         ossim_uint32           tileSizeInBytes = id->getSizeInBytes();
-         if (tileStatus != OSSIM_FULL)
-         {
-            // Clear out the buffer since it won't be filled all the way.
-            tempTile->setImageRectangle(id->getImageRectangle());
-            tempTile->makeBlank();
-         }
-
-         if ((tileStatus == OSSIM_PARTIAL || tileStatus == OSSIM_FULL))
-         {
-            // Stuff the tile into the tileBuffer.
-            id->unloadTile(tempTile->getBuf(),
-                           id->getImageRectangle(),
-                           OSSIM_BIP);
-            tempTile->setDataObjectStatus(id->getDataObjectStatus());
-            if(!theColorLutFlag&&!needsAborting())
-            {
-               id->computeMinMaxPix(minBands, maxBands);
-            }
-         }
-
-         //---
-         // Write the tile to disk.
-         //---
-         ossim_uint32 bytesWritten = 0;
-         bytesWritten = TIFFWriteTile(tiffPtr,
-                                      tempTile->getBuf(),
-                                      origin.x,
-                                      origin.y,
-                                      0,            // z
-                                      0);           // s
-
-         if (bytesWritten != tileSizeInBytes)
-         {
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG)
-                  << MODULE << " ERROR:"
-                  << "Error returned writing tiff tile:  " << i
-                  << "\nExpected bytes written:  " << tileSizeInBytes
-                  << "\nBytes written:  " << bytesWritten
-                  << std::endl;
-            }
-            setErrorStatus();
-            return false;
-         }
-
-         ++tileNumber;
-
-      } // End of tile loop in the sample (width) direction.
-
-      double tile = tileNumber;
-      double numTiles = numberOfTiles;
-      setPercentComplete(tile / numTiles * 100);
-
-   } // End of tile loop in the line (height) direction.
-
-   if(!theColorLutFlag&&!needsAborting())
-   {
-      writeMinMaxTags(minBands, maxBands);
-   }
-
-   if (traceDebug()) CLOG << " Exited." << std::endl;
-
-   return true;
-}
-
-bool ossimTiffWriter::writeToTilesBandSep()
-{
-   static const char* const MODULE = "ossimTiffWriter::writeToTilesBandSep";
-   TIFF* tiffPtr = (TIFF*)theTif;
-   if (traceDebug()) CLOG << " Entered." << std::endl;
-
-   // Start the sequence at the first tile.
-   theInputConnection->setToStartOfSequence();
-
-   ossim_uint32 bands     = theInputConnection->getNumberOfOutputBands();
-   ossim_uint32 tilesWide = theInputConnection->getNumberOfTilesHorizontal();
-   ossim_uint32 tilesHigh = theInputConnection->getNumberOfTilesVertical();
-   ossim_uint32 tileWidth     = theInputConnection->getTileWidth();
-   ossim_uint32 tileHeight    = theInputConnection->getTileHeight();
-   ossim_uint32 numberOfTiles = theInputConnection->getNumberOfTiles();
-
-#if 0
-   if(traceDebug())
-   {
-      ossimIrect   boundingRect  = theInputConnection->getBoundingRect();
-      ossimNotify(ossimNotifyLevel_NOTICE)
-         << "Bounding rect = " << boundingRect
-         << "\nBands         = " << bands
-         << "\ntilesWide     = " << tilesWide
-         << "\ntilesHigh     = " << tilesHigh
-         << "\ntileWidth     = " << tileWidth
-         << "\ntileHeight    = " << tileHeight << std::endl;
-   }
-#endif
-
-   ossim_uint32 tileNumber = 0;
-   vector<ossim_float64> minBands;
-   vector<ossim_float64> maxBands;
-   for(ossim_uint32 i = 0; ((i < tilesHigh)&&!needsAborting()); ++i)
-   {
-      ossimIpt origin;
-      origin.y = i * tileHeight;
-
-      //---
-      // Tile loop in the sample (width) direction.
-      //---
-      for(ossim_uint32 j = 0; ((j < tilesWide)&&!needsAborting()); ++j)
-      {
-         origin.x = j * tileWidth;
-
-         ossimRefPtr<ossimImageData> id = theInputConnection->getNextTile();
-	 if(!id)
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << " ERROR:"
-               << "Error returned writing tiff tile:  " << i
-               << "\nNULL Tile encountered"
-               << std::endl;
-            return false;
-         }
-	 ossim_int32 tileSizeInBytes = id->getSizePerBandInBytes();
-
-         if(!theColorLutFlag)
-         {
-            id->computeMinMaxPix(minBands, maxBands);
-         }
-
-         //---
-         // Band loop.
-         //---
-         for (ossim_uint32 band=0; ((band<bands)&&(!needsAborting())); ++band)
-         {
-            // Grab a pointer to the tile for the band.
-            tdata_t* data = (tdata_t*)id->getBuf(band);
-            // Write the tile.
-            tsize_t bytesWritten = 0;
-            if(data)
-            {
-               bytesWritten = TIFFWriteTile(tiffPtr,
-                                            data,
-                                            (ossim_uint32)origin.x,
-                                            (ossim_uint32)origin.y,
-                                            (ossim_uint32)0,        // z
-                                            (tsample_t)band);    // sample
-            }
-            if ( ( bytesWritten != tileSizeInBytes ) && !needsAborting() )
-            {
-               if(traceDebug())
-               {
-                  ossimNotify(ossimNotifyLevel_DEBUG)
-                     << MODULE << " ERROR:"
-                     << "Error returned writing tiff tile:  " << i
-                     << "\nExpected bytes written:  " << tileSizeInBytes
-                     << "\nBytes written:  " << bytesWritten
-                     << std::endl;
-               }
-               setErrorStatus();
-               return false;
-            }
-            
-         } // End of band loop.
-
-         ++tileNumber;
-
-      } // End of tile loop in the sample (width) direction.
-
-      double tile = tileNumber;
-      double numTiles = numberOfTiles;
-      setPercentComplete(tile / numTiles * 100);
-      if(needsAborting())
-      {
-         setPercentComplete(100);
-      }
-
-   } // End of tile loop in the line (height) direction.
-
-   if(!theColorLutFlag&&!needsAborting())
-   {
-      writeMinMaxTags(minBands, maxBands);
-   }
-    
-   if (traceDebug()) CLOG << " Exited." << std::endl;
-
-   return true;
-}
-
-bool ossimTiffWriter::writeToStrips()
-{
-   static const char* const MODULE = "ossimTiffWriter::writeToStrips";
-   TIFF* tiffPtr = (TIFF*)theTif;
-
-   if (traceDebug()) CLOG << " Entered." << std::endl;
-
-   // Start the sequence at the first tile.
-   theInputConnection->setToStartOfSequence();
-
-   ossim_uint32 bands = theInputConnection->getNumberOfOutputBands();
-   ossim_uint32 tilesWide = theInputConnection->getNumberOfTilesHorizontal();
-   ossim_uint32 tilesHigh = theInputConnection->getNumberOfTilesVertical();
-   ossim_uint32 tileHeight = theInputConnection->getTileHeight();
-   ossim_uint32 numberOfTiles = theInputConnection->getNumberOfTiles();
-   ossim_uint32 width = theAreaOfInterest.width();
-   ossim_uint32 bytesInLine =
-      ossim::scalarSizeInBytes(theInputConnection->getOutputScalarType()) *
-      width * bands;
-
-   //---
-   // Buffer to hold one line x tileHeight
-   //---
-   ossim_uint32 bufferSizeInBytes = bytesInLine * tileHeight;
-   unsigned char* buffer = new unsigned char[bufferSizeInBytes];
-
-   int tileNumber = 0;
-   vector<ossim_float64> minBands;
-   vector<ossim_float64> maxBands;
-   for(ossim_uint32 i = 0; ((i < tilesHigh)&&(!needsAborting())); ++i)
-   {
-      // Clear the buffer.
-      memset(buffer, 0, bufferSizeInBytes);
-
-      // Set the buffer rectangle.
-      ossimIrect bufferRect(theAreaOfInterest.ul().x,
-                            theAreaOfInterest.ul().y + i * tileHeight,
-                            theAreaOfInterest.ul().x + width - 1,
-                            theAreaOfInterest.ul().y + i * tileHeight +
-                            tileHeight - 1);
-
-      // Tile loop in the sample (width) direction.
-      for(ossim_uint32 j = 0; ((j < tilesWide)&&(!needsAborting())); ++j)
-      {
-         // Get the tile and copy it to the buffer.
-         ossimRefPtr<ossimImageData> id = theInputConnection->getNextTile();
-         if (!id)
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << " ERROR:"
-               << "Error returned writing tiff tile:  " << tileNumber
-               << "\nNULL Tile encountered"
-               << std::endl;
-            delete [] buffer;
-            return false;
-         }
-         id->unloadTile(buffer, bufferRect, OSSIM_BIP);
-         if(!theColorLutFlag&&!needsAborting())
-         {
-            id->computeMinMaxPix(minBands, maxBands);
-         }
-         ++tileNumber;
-      }
-
-      // Get the number of lines to write from the buffer.
-      ossim_uint32 linesToWrite = min(tileHeight, static_cast<ossim_uint32>(theAreaOfInterest.lr().y - bufferRect.ul().y + 1));
-
-      // Write the buffer out to disk.
-      ossim_uint32 row = static_cast<ossim_uint32>(bufferRect.ul().y -
-                                                   theAreaOfInterest.ul().y);
-      ossim_uint8* buf = buffer;
-      for (ossim_uint32 ii=0; ((ii<linesToWrite)&&(!needsAborting())); ++ii)
-      {
-         ossim_int32 status = TIFFWriteScanline(tiffPtr,
-                                                buf,
-                                                row,
-                                                0);
-         if (status == -1)
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << " ERROR:"
-               << "Error returned writing tiff scanline:  " << row
-               << std::endl;
-            setErrorStatus();
-            delete [] buffer;
-            return false;
-         }
-
-         ++row;  // Increment the line number.
-         buf += bytesInLine;
-
-      } // End of loop to write lines from buffer to tiff file.
-
-      double tile = tileNumber;
-      double numTiles = numberOfTiles;
-      setPercentComplete(tile / numTiles * 100);
-      if(needsAborting())
-      {
-         setPercentComplete(100);
-      }
-
-   } // End of loop in the line (height) direction.
-
-   if(!theColorLutFlag)
-   {
-      writeMinMaxTags(minBands, maxBands);
-   }
-   
-   // Free the memory.
-   delete [] buffer;
-
-   if (traceDebug()) CLOG << " Exited." << std::endl;
-
-   return true;
-}
-
-bool ossimTiffWriter::writeToStripsBandSep()
-{
-   static const char* const MODULE = "ossimTiffWriter::writeToStripsBandSep";
-   TIFF* tiffPtr = (TIFF*)theTif;
-
-   if (traceDebug()) CLOG << " Entered." << std::endl;
-
-   // Start the sequence at the first tile.
-   theInputConnection->setToStartOfSequence();
-
-   ossim_uint32 bands = theInputConnection->getNumberOfOutputBands();
-   ossim_uint32 tilesWide = theInputConnection->getNumberOfTilesHorizontal();
-   ossim_uint32 tilesHigh = theInputConnection->getNumberOfTilesVertical();
-   ossim_uint32 tileHeight      = theInputConnection->getTileHeight();
-   ossim_uint32 numberOfTiles   = theInputConnection->getNumberOfTiles();
-   ossim_uint32 width           = theAreaOfInterest.width();
-   ossim_uint32 bytesInLine     =
-      ossim::scalarSizeInBytes(theInputConnection->getOutputScalarType()) *
-      width;
-
-   //---
-   // Buffer to hold one line x tileHeight
-   //---
-   ossim_uint32 bufferSizeInBytes = bytesInLine * tileHeight * bands;
-
-   unsigned char* buffer = new unsigned char[bufferSizeInBytes];
-
-   // Tile loop in height direction.
-   ossim_uint32 tileNumber = 0;
-   vector<ossim_float64> minBands;
-   vector<ossim_float64> maxBands;
-   for(ossim_uint32 i = 0; ((i < tilesHigh)&&(!needsAborting())); ++i)
-   {
-      // Clear the buffer.
-      memset(buffer, 0, bufferSizeInBytes);
-
-      // Set the buffer rectangle.
-      ossimIrect bufferRect(theAreaOfInterest.ul().x,
-                            theAreaOfInterest.ul().y + i * tileHeight,
-                            theAreaOfInterest.ul().x + width - 1,
-                            theAreaOfInterest.ul().y + i * tileHeight +
-                            tileHeight - 1);
-
-      // Tile loop in the sample (width) direction.
-      for(ossim_uint32 j = 0; ((j < tilesWide)&&(!needsAborting())); ++j)
-      {
-         // Get the tile and copy it to the buffer.
-         ossimRefPtr<ossimImageData> id = theInputConnection->getNextTile();
-         if (!id)
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << " ERROR:"
-               << "Error returned writing tiff tile:  " << tileNumber
-               << "\nNULL Tile encountered"
-               << std::endl;
-            delete [] buffer;
-            return false;
-         }
-         id->unloadTile(buffer, bufferRect, OSSIM_BIL);
-         if(!theColorLutFlag)
-         {
-            id->computeMinMaxPix(minBands, maxBands);
-         }
-         ++tileNumber;
-      }
-
-      // Get the number of lines to write from the buffer.
-      ossim_uint32 linesToWrite = min(tileHeight, static_cast<ossim_uint32>(theAreaOfInterest.lr().y - bufferRect.ul().y + 1));
-
-      // Write the buffer out to disk.
-      ossim_uint32 row = static_cast<ossim_uint32>(bufferRect.ul().y -
-                                       theAreaOfInterest.ul().y);
-      ossim_uint8* buf = buffer;
-      for (ossim_uint32 ii=0; ((ii<linesToWrite)&&(!needsAborting())); ++ii)
-      {
-         for (ossim_uint32 band =0; ((band<bands)&&(!needsAborting())); ++band)
-         {
-            ossim_int32 status = TIFFWriteScanline(tiffPtr,
-                                                   buf,
-                                                   row,
-                                                   band);
-            if (status == -1)
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << MODULE << " ERROR:"
-                  << "Error returned writing tiff scanline:  " << row
-                  << std::endl;
-               delete [] buffer;
-               return false;
-            }
-            buf += bytesInLine;
-         }
-
-         ++row;  // Increment the line number.
-
-      } // End of loop to write lines from buffer to tiff file.
-
-      double tile = tileNumber;
-      double numTiles = numberOfTiles;
-      setPercentComplete(tile / numTiles * 100);
-      if(needsAborting())
-      {
-         setPercentComplete(100);
-      }
-   } // End of loop in the line (height) direction.
-
-   if(!theColorLutFlag)
-   {
-      writeMinMaxTags(minBands, maxBands);
-   }
-
-   // Free the memory.
-   delete [] buffer;
-
-   if (traceDebug()) CLOG << " Exited." << std::endl;
-
-   return true;
-}
-
-void ossimTiffWriter::setTileSize(const ossimIpt& tileSize)
-{
-   if ( (tileSize.x % 16) || (tileSize.y % 16) )
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimTiffWriter::changeTileSize ERROR:"
-            << "\nTile size must be a multiple of 32!"
-            << "\nSize remains:  " << theOutputTileSize
-            << std::endl;
-      }
-      return;
-   }
-
-   theOutputTileSize = tileSize;
-}
-
-void ossimTiffWriter::writeMinMaxTags(const vector<ossim_float64>& minBand,
-                                      const vector<ossim_float64>& maxBand)
-{
-   TIFF* tiffPtr = (TIFF*)theTif;
-   if(minBand.size() && maxBand.size())
-   {
-      ossim_float64 minValue =
-         *std::min_element(minBand.begin(), minBand.end());
-      ossim_float64 maxValue =
-         *std::max_element(maxBand.begin(), maxBand.end());
-
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimTiffWriter::writeMinMaxTags DEBUG:"
-            << "\nminValue:  " << minValue
-            << "\nmaxValue:  " << maxValue
-            << std::endl;
-      }
-
-      switch( theInputConnection->getOutputScalarType() )
-      {
-         case OSSIM_USHORT11:
-         {
-            TIFFSetField( tiffPtr, TIFFTAG_MINSAMPLEVALUE,
-                          static_cast<ossim_sint16>(0) );
-            TIFFSetField( tiffPtr, TIFFTAG_MAXSAMPLEVALUE,
-                          static_cast<ossim_sint16>(2047) );
-            break;
-         }
-         case OSSIM_UINT8:
-         case OSSIM_UINT16:
-         {
-            TIFFSetField( tiffPtr, TIFFTAG_MINSAMPLEVALUE,
-                          static_cast<ossim_sint16>(minValue) );
-            TIFFSetField( tiffPtr, TIFFTAG_MAXSAMPLEVALUE,
-                          static_cast<ossim_sint16>(maxValue) );
-            break;
-         }
-         
-         case OSSIM_SINT16: 
-         case OSSIM_UINT32:
-         case OSSIM_FLOAT32:
-         case OSSIM_FLOAT64:
-         case OSSIM_NORMALIZED_FLOAT:
-         case OSSIM_NORMALIZED_DOUBLE:
-         {
-            TIFFSetField( tiffPtr, TIFFTAG_SMINSAMPLEVALUE,
-                          static_cast<ossim_float32>(minValue) );
-            TIFFSetField( tiffPtr, TIFFTAG_SMAXSAMPLEVALUE,
-                          static_cast<ossim_float32>(maxValue) );
-            break;
-         }
-         default:
-         {
-            break;
-         }
-      }
-   }
-}
-
-void ossimTiffWriter::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property)
-   {
-      return;
-   }
-
-   if(property->getName() == ossimKeywordNames::COMPRESSION_QUALITY_KW)
-   {
-//       ossimNumericProperty* numericProperty = PTR_CAST(ossimNumericProperty,
-//                                                        property.get());
-//       if (numericProperty)
-//       {
-      setJpegQuality( property->valueToString().toInt32() );
-//       }
-   }
-   else if (property->getName() == ossimKeywordNames::COMPRESSION_TYPE_KW)
-   {
-      ossimStringProperty* stringProperty = PTR_CAST(ossimStringProperty,
-                                                     property.get());
-      if (stringProperty)
-      {
-         ossimString s;
-         stringProperty->valueToString(s);
-         setCompressionType(s);
-      } 
-   }
-   else if(property->getName() == "lut_file")
-   {
-      theLutFilename = ossimFilename(property->valueToString());
-      theColorLut->open(theLutFilename);
-   }
-   else if(property->getName() == "color_lut_flag")
-   {
-      theColorLutFlag = property->valueToString().toBool();
-   }
-   else if(property->getName() == "big_tiff_flag")
-   {
-      theForceBigTiffFlag = property->valueToString().toBool();
-   }
-   else if(property->getName() == ossimKeywordNames::OUTPUT_TILE_SIZE_KW)
-   {
-      theOutputTileSize.x = property->valueToString().toInt32();
-      theOutputTileSize.y =  theOutputTileSize.x;
-   }
-   else
-   {
-      ossimImageFileWriter::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimTiffWriter::getProperty(const ossimString& name)const
-{
-   ossimRefPtr<ossimProperty> prop = 0;
-   
-   if (name == "Filename")
-   {
-      prop = ossimImageFileWriter::getProperty(name);
-      if ( prop.valid() )
-      {
-         ossimRefPtr<ossimFilenameProperty> filenameProp = PTR_CAST(ossimFilenameProperty,
-                                                                    prop.get());
-         if ( filenameProp.valid() )
-         {
-            filenameProp->addFilter("*.tif");
-         }
-         prop = filenameProp.get();
-      }
-   }
-   else if (name == ossimKeywordNames::COMPRESSION_QUALITY_KW)
-   {
-      ossimRefPtr<ossimNumericProperty> numericProp =
-         new ossimNumericProperty(name,
-                                  ossimString::toString(theJpegQuality),
-                                  1.0,
-                                  100.0);
-      numericProp->setNumericType(ossimNumericProperty::ossimNumericPropertyType_INT);
-      prop = numericProp.get();
-   }
-   else if (name == ossimKeywordNames::COMPRESSION_TYPE_KW)
-   {
-      ossimRefPtr<ossimStringProperty> stringProp =
-         new ossimStringProperty(name,
-                                 getCompressionType(),
-                                 false); // editable flag
-      stringProp->addConstraint(ossimString("none"));
-      stringProp->addConstraint(ossimString("jpeg"));
-      stringProp->addConstraint(ossimString("packbits"));
-      stringProp->addConstraint(ossimString("deflate"));
-      stringProp->addConstraint(ossimString("zip"));      
-      prop = stringProp.get();
-   }
-   else if (name == "lut_file")
-   {
-      ossimRefPtr<ossimFilenameProperty> property =
-         new ossimFilenameProperty(name, theLutFilename);
-      property->setIoType(ossimFilenameProperty::ossimFilenamePropertyIoType_INPUT);
-      
-      prop = property.get();
-   }
-   else if (name == "color_lut_flag")
-   {
-      prop = new ossimBooleanProperty(name, theColorLutFlag);
-   }
-   else if(name == "big_tiff_flag")
-   {
-       prop = new ossimBooleanProperty(name, theForceBigTiffFlag);
-   }
-   else if( name == ossimKeywordNames::OUTPUT_TILE_SIZE_KW )
-   {
-      ossimRefPtr<ossimStringProperty> stringProp =
-         new ossimStringProperty(name,
-                                 ossimString::toString(theOutputTileSize.x),
-                                 false); // editable flag
-      stringProp->addConstraint(ossimString("16"));
-      stringProp->addConstraint(ossimString("32"));
-      stringProp->addConstraint(ossimString("64"));
-      stringProp->addConstraint(ossimString("128"));
-      stringProp->addConstraint(ossimString("256"));      
-      stringProp->addConstraint(ossimString("512"));      
-      stringProp->addConstraint(ossimString("1024"));      
-      stringProp->addConstraint(ossimString("2048"));
-      prop = stringProp.get();
-   }
-   else
-   {
-      prop = ossimImageFileWriter::getProperty(name);
-   }
-   return prop;
-}
-
-void ossimTiffWriter::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   propertyNames.push_back(ossimString(
-                              ossimKeywordNames::COMPRESSION_QUALITY_KW));
-   propertyNames.push_back(ossimString(
-                              ossimKeywordNames::COMPRESSION_TYPE_KW));
-   propertyNames.push_back(ossimString("lut_file"));
-   propertyNames.push_back(ossimString("color_lut_flag"));
-   propertyNames.push_back(ossimString("big_tiff_flag"));
-   propertyNames.push_back(ossimString(ossimKeywordNames::OUTPUT_TILE_SIZE_KW));
-  
-   ossimImageFileWriter::getPropertyNames(propertyNames);
-}
-
-bool ossimTiffWriter::isOpen()const
-{
-   return (theTif!=NULL);
-}
-
-bool ossimTiffWriter::open()
-{
-   if(theTif)
-   {
-      closeTiff();
-   }
-   return openTiff();
-}
-
-void ossimTiffWriter::close()
-{
-   closeTiff();
-}
-
-void ossimTiffWriter::setJpegQuality(ossim_int32 quality)
-{
-   // Range 1 to 100 with 100 being best.
-   if (quality > 0 && quality < 101)
-   {
-      theJpegQuality = quality;
-   }
-   else
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimTiffWriter::setJpegQuality DEBUG:"
-            << "\nquality out of range:  " << quality
-            << "\nquality has been set to default:  " 
-            << DEFAULT_JPEG_QUALITY
-            << "\nvalid range:  1 to 100 with 100 being best."
-            << std::endl;
-      }
-      
-      theJpegQuality = DEFAULT_JPEG_QUALITY;
-   }
-}
-
-ossim_int32 ossimTiffWriter::getJpegQuality()const
-{
-   
-   return theJpegQuality;
-}
-
-void ossimTiffWriter::setCompressionType(const ossimString& type)
-{
-   theCompressionType = type;
-}
-
-ossimString ossimTiffWriter::getCompressionType()const
-{
-   return theCompressionType;
-}
-
-bool ossimTiffWriter::getGeotiffFlag()const
-{
-   return theOutputGeotiffTagsFlag;
-}
-
-void ossimTiffWriter::setGeotiffFlag(bool flag)
-{
-   theOutputGeotiffTagsFlag = flag;
-}
-
-ossimIpt ossimTiffWriter::getOutputTileSize()const
-{
-   return theOutputTileSize;
-}
-
-ossim_int32 ossimTiffWriter::setProjectionInfo(const ossimMapProjectionInfo& proj)
-{
-   theProjectionInfo = new ossimMapProjectionInfo(proj);
-
-   return ossimErrorCodes::OSSIM_OK;
-}
-
-
-void ossimTiffWriter::getImageTypeList(std::vector<ossimString>& imageTypeList)const
-{
-   imageTypeList.push_back(ossimString("tiff_strip"));
-   imageTypeList.push_back(ossimString("tiff_strip_band_separate"));
-   imageTypeList.push_back(ossimString("tiff_tiled"));
-   imageTypeList.push_back(ossimString("tiff_tiled_band_separate"));
-}
-
-ossimString ossimTiffWriter::getExtension() const
-{
-   return ossimString("tif");
-}
-
-bool ossimTiffWriter::hasImageType(const ossimString& imageType) const
-{
-   // check for non image type list types
-   // We will support mime type
-   //
-   if((imageType == "image/tiff")||
-      (imageType == "image/gtiff")||
-      (imageType == "image/tif")||
-      (imageType == "image/gtif"))
-   {
-      return true;
-   }
-
-   return ossimImageFileWriter::hasImageType(imageType);
-}
-
-bool ossimTiffWriter::isLutEnabled()const
-{
-   return (theColorLutFlag);
-}
-
-ossimTiffWriter::UnitType ossimTiffWriter::getUnitType(
-   ossim_int32 pcsCode,
-   const ossimString& projName) const
-{
-
-
-   if ( ( projName == "ossimCylEquAreaProjection" ) ||
-        ( projName == "ossimEquDistCylProjection" ) ||
-        ( projName == "ossimLlxyProjection" ) )
-   {
-      return ANGULAR_DEGREES;
-   } 
-
-   UnitType pcsUnits = getPcsUnitType(pcsCode);
-
-   UnitType type = UNDEFINED;
-   
-   switch (theLinearUnits)
-   {
-      case OSSIM_METERS:
-      {
-         type = LINEAR_METER;
-         break;
-      }
-      
-      case OSSIM_FEET:
-      {
-         type = LINEAR_FOOT;
-         break;
-      }
-      
-      case OSSIM_US_SURVEY_FEET:
-      {
-         type = LINEAR_FOOT_US_SURVEY;
-         break;
-      }
-      default:
-      {
-         break;
-      }
-   }
-   if (type == UNDEFINED)
-   {
-      return pcsUnits;
-   }
-   return type;
-}
-
-ossimTiffWriter::UnitType ossimTiffWriter::getPcsUnitType(ossim_int32 pcsCode) const
-{
-   UnitType pcsUnits = UNDEFINED;
-   
-   ossimRefPtr<ossimMapProjection> proj = PTR_CAST(ossimMapProjection, 
-      ossimEpsgProjectionDatabase::instance()->findProjection((ossim_uint32) pcsCode));
-   
-   if (proj.valid())
-   {
-      ossimUnitType type = proj->getProjectionUnits();
-      if (type == OSSIM_METERS)
-      {
-         pcsUnits = LINEAR_METER;
-      }
-      else
-      {
-         pcsUnits = LINEAR_FOOT_US_SURVEY;
-      }
-   }
-   return pcsUnits;
-}
-
-//*************************************************************************************************
-// Will take an ossimIMageData tile and write it to disk as a general raster file.
-//*************************************************************************************************
-void ossimTiffWriter::dumpTileToFile(ossimRefPtr<ossimImageData> t,  const ossimFilename& f)
-{
-   ossimRefPtr<ossimMemoryImageSource> tile = new ossimMemoryImageSource;
-   tile->setImage(t);
-   ossimRefPtr<ossimScalarRemapper> remapper = new ossimScalarRemapper(tile.get(), OSSIM_UINT8);
-   ossimRefPtr<ossimTiffWriter> writer = new ossimTiffWriter();
-   writer->connectMyInputTo(0, remapper.get());
-   writer->setFilename(f);
-   writer->setGeotiffFlag(false);
-   writer->execute();
-   writer=0;
-   tile=0;
-}
diff --git a/src/ossim/imaging/ossimTilePatch.cpp b/src/ossim/imaging/ossimTilePatch.cpp
deleted file mode 100644
index 1757641..0000000
--- a/src/ossim/imaging/ossimTilePatch.cpp
+++ /dev/null
@@ -1,518 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimTilePatch.cpp 17195 2010-04-23 17:32:18Z dburken $
-
-#include <vector>
-using namespace std;
-
-#include <ossim/imaging/ossimTilePatch.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/base/ossimErrorCodes.h>
-ossimDiscreteNearestNeighbor ossimTilePatch::nearestNeighborKernel;
-
-ossimTilePatch::ossimTilePatch(ossimImageSource* input)
-{
-   thePatchData = ossimImageDataFactory::instance()->create(NULL, input);
-   thePatchData->initialize();
-}
-
-ossimTilePatch::ossimTilePatch(ossimScalarType scalarType,
-                               long numberOfComponents,
-                               long width,
-                               long height)
-   :thePatchData(NULL)
-{
-   thePatchData = ossimImageDataFactory::instance()->create(NULL,
-                                                            scalarType,
-                                                            numberOfComponents,
-                                                            width,
-                                                            height);
-
-   thePatchData->initialize();
-}
-
-ossimTilePatch::~ossimTilePatch()
-{
-}
-
-ossimIrect ossimTilePatch::getRect()const
-{
-   return thePatchData->getImageRectangle();
-}
-
-ossimDrect ossimTilePatch::findBoundingRect(const ossimDpt &p1,
-                                            const ossimDpt &p2,
-                                            const ossimDpt &p3,
-                                            const ossimDpt &p4)
-{
-   vector<ossimDpt> points(4);
-   
-   points[0] = p1;
-   points[1] = p2;
-   points[2] = p3;
-   points[3] = p4;
-
-   return ossimDrect(points);
-}
-
-void ossimTilePatch::fillPatch(ossimImageSource* tileSource,
-                               long resLevel)
-{
-   // long w = tileSource->getTileWidth();
-   // long h = tileSource->getTileHeight();
-   
-   if(thePatchData.valid())
-   {
-      ossimIrect rect   = thePatchData->getImageRectangle();
-      thePatchData->makeBlank();
-      // ossimIpt origin(rect.ul());
-      ossimRefPtr<ossimImageData> aTile = tileSource->getTile(rect, resLevel);
-      thePatchData->loadTile(aTile.get());
-   }
-}
-
-void ossimTilePatch::setData(ossimRefPtr<ossimImageData>& patchData)
-{
-   thePatchData = patchData;
-}
-
-void ossimTilePatch::convolve(ossimDiscreteConvolutionKernel* kernel)
-{
-   if(!kernel) return;
-
-   long w = thePatchData->getWidth();
-   long h = thePatchData->getHeight();
-
-   long kW = kernel->getWidth();
-   long kH = kernel->getHeight();
-   ossimIpt origin = thePatchData->getOrigin();
-   
-   if( (w < kW) || (h < kH))
-   {
-      cerr << " Error ossimTilePatch::convolve(kernel): patch is smaller than kernel size" << endl;
-      return;
-   }
-   ossimRefPtr<ossimImageData> kernelBuffer =(ossimImageData*) thePatchData->dup();
-
-   // now let's make the buffer just fit the convolution filter
-   //
-   kernelBuffer->setWidth(w - kW);
-   kernelBuffer->setHeight(h - kH);
-   kernelBuffer->setOrigin(ossimDpt(origin.x + kW/2.0,
-                                    origin.y + kH/2.0));
-   kernelBuffer->initialize();
-
-   fillTile(kernelBuffer, kernel);
-
-   kernelBuffer->validate();
-   // now copy the data back to the buffer
-   //
-   thePatchData->loadTile(kernelBuffer.get());
-
-   // now make sure we validate the buffer.
-   thePatchData->validate();
-}
-
-void ossimTilePatch::fillTile(ossimRefPtr<ossimImageData>& aTile)const
-{
-   if(aTile.valid() &&
-      (aTile->getNumberOfBands()==thePatchData->getNumberOfBands())&&
-      (aTile->getBuf())&&
-      (thePatchData->getBuf())&&
-      (thePatchData->getScalarType()==aTile->getScalarType()))
-   {
-      aTile->loadTile(thePatchData.get());
-   }
-}
-
-void ossimTilePatch::fillTile(ossimRefPtr<ossimImageData>& result,
-                              ossimDiscreteConvolutionKernel* kernel)const
-{
-   if(!kernel)
-   {
-      cerr << "Error: Kernel is NULL in  ossimTilePatch::fillTile(tile, kernel)!!" << endl;
-   }
-   if(thePatchData->getScalarType() != result->getScalarType())
-   {
-      //ERROR
-      return;
-   }
-   else
-   {
-      switch(thePatchData->getScalarType())
-      {
-      case OSSIM_UCHAR:
-      {
-         fillTileTemplate(static_cast<ossim_uint8>(0),
-                          result,
-                          kernel);
-         break;
-      }
-      case OSSIM_USHORT16:
-      case OSSIM_USHORT11:
-      {
-         fillTileTemplate(static_cast<ossim_uint16>(0),
-                          result,
-                          kernel);
-         break;
-      }
-      case OSSIM_SSHORT16:
-      {
-         fillTileTemplate(static_cast<ossim_sint16>(0),
-                          result,
-                          kernel);
-         break;
-      }
-      case OSSIM_FLOAT:
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         fillTileTemplate(static_cast<float>(0),
-                          result,
-                          kernel);
-         break;
-      }
-      case OSSIM_DOUBLE:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         fillTileTemplate(static_cast<double>(0),
-                          result,
-                          kernel);
-         break;
-      }
-      default:
-	{
-	  ossimSetError("ossimTilePatch",
-			ossimErrorCodes::OSSIM_ERROR,
-			"unhandled scalar type %d",
-			(int)thePatchData->getScalarType());
-	  break;
-	}
-      }
-   }
-}
-
-
-
-void ossimTilePatch::fillTile(ossimRefPtr<ossimImageData>& result,
-                              const ossimDpt   &ul,
-                              const ossimDpt   &ur,
-                              const ossimDpt   &deltaUl,
-                              const ossimDpt   &deltaUr,
-                              const ossimDpt   &length)const
-{   
-   result->setNullPix(thePatchData->getNullPix(), thePatchData->getNumberOfBands());
-   result->setMinPix(thePatchData->getMinPix(), thePatchData->getNumberOfBands());
-   result->setMaxPix(thePatchData->getMaxPix(), thePatchData->getNumberOfBands());
-   result->makeBlank();
-   if(thePatchData->getScalarType() != result->getScalarType())
-   {
-      //ERROR
-      return;
-   }
-   else
-   {
-      switch(thePatchData->getScalarType())
-      {
-      case OSSIM_UCHAR:
-      {
-         fillTileTemplate(static_cast<ossim_uint8>(0),
-                          result,
-                          ul,
-                          ur,
-                          deltaUl,
-                          deltaUr,
-                          length);
-         break;
-      }
-      case OSSIM_USHORT16:
-      case OSSIM_USHORT11:
-      {
-         fillTileTemplate(static_cast<ossim_uint16>(0),
-                          result,
-                          ul,
-                          ur,
-                          deltaUl,
-                          deltaUr,
-                          length);
-         break;
-      }
-      case OSSIM_SSHORT16:
-      {
-         fillTileTemplate(static_cast<ossim_sint16>(0),
-                          result,
-                          ul,
-                          ur,
-                          deltaUl,
-                          deltaUr,
-                          length);
-         break;
-      }
-      case OSSIM_FLOAT:
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         fillTileTemplate(static_cast<float>(0),
-                          result,
-                          ul,
-                          ur,
-                          deltaUl,
-                          deltaUr,
-                          length);
-         break;
-      }
-      case OSSIM_DOUBLE:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         fillTileTemplate(static_cast<double>(0),
-                          result,
-                          ul,
-                          ur,
-                          deltaUl,
-                          deltaUr,
-                          length);
-         break;
-      }
-      default:
-	{
-	  ossimSetError("ossimTilePatch",
-			ossimErrorCodes::OSSIM_ERROR,
-			"unhandled scalar type %d",
-			(int)thePatchData->getScalarType());
-	  break;
-	}
-      }
-   }
-
-}
-
-
-template<class T>
-void ossimTilePatch::fillTileTemplate(T /* dummyVariable */,
-                                      ossimRefPtr<ossimImageData>& result,
-                                      ossimDiscreteConvolutionKernel* kernel)const
-{
-   // get the origin.  The convolution could be
-   // an offset into the patch.
-   //
-   ossimIpt startOrigin   = result->getOrigin();
-
-   // Make sure that the patch is not empty or NULL
-   //
-   ossimDataObjectStatus status = thePatchData->getDataObjectStatus();
-   if((status==OSSIM_EMPTY)||
-      (status == OSSIM_NULL))
-   {
-      return;
-   }
-   ossimDpt startDelta(fabs((double)startOrigin.x - thePatchData->getOrigin().x),
-                       fabs((double)startOrigin.y - thePatchData->getOrigin().y));
-   
-   // let's setup some variables that we will need to do the
-   // convolution algorithm.
-   //
-   ossimIrect patchRect   = thePatchData->getImageRectangle();
-   long tileHeight        = result->getHeight();
-   long tileWidth         = result->getWidth();
-   long outputBands       = result->getNumberOfBands();
-   long convolutionWidth  = kernel->getWidth();
-   long convolutionHeight = kernel->getHeight();
-   long convolutionOffsetX= convolutionWidth/2;
-   long convolutionOffsetY= convolutionHeight/2;
-   long patchWidth        = patchRect.width();
-   long patchCenterOffset = (long)(patchWidth*startDelta.y + startDelta.x);
-   long patchConvolutionOffsetDelta = patchWidth*convolutionOffsetY + convolutionOffsetX;
-   long patchLineStartOffset        = patchCenterOffset  - patchConvolutionOffsetDelta;
-   long outputOffset                = 0;
-   double min = 1.0;
-   double max = 255.0;
-   if(status == OSSIM_PARTIAL) // must check for NULLS
-   {
-      for(long y = 0; y <tileHeight; y++)
-      {
-         patchCenterOffset = patchLineStartOffset;
-         
-         for(long x =0; x < tileWidth; x++)
-         {  
-            if(!thePatchData->isNull(patchCenterOffset))
-            {
-               double convolveResult = 0;
-               for(long b = 0; b < outputBands; ++b)
-               {                  
-                  min=result->getMinPix(b);
-                  max=result->getMaxPix(b);
-                  T* buf    = (T*)(thePatchData->getBuf(b)) + patchCenterOffset;
-                  T* outBuf = (T*)(result->getBuf(b));
-
-                  kernel->convolveSubImage(buf,
-                                           patchWidth,
-                                           convolveResult);
-                  convolveResult = convolveResult < min?min:convolveResult;
-                  convolveResult = convolveResult > max?max:convolveResult;
-                  outBuf[outputOffset] = (ossim_uint8)convolveResult;
-               }
-            }
-            else
-            {
-               result->setNull(outputOffset);
-            }
-            ++outputOffset;
-            ++patchCenterOffset;
-         }
-         patchLineStartOffset += patchWidth;
-      }
-    }
-    else
-    {
-       for(long b = 0; b < outputBands; ++b)
-       {                  
-          double convolveResult = 0;
-          const T* buf    = (const T*)thePatchData->getBuf(b);
-          T* outBuf = (T*)(result->getBuf(b));
-          outputOffset = 0;
-          patchCenterOffset = (long)(patchWidth*startDelta.y + startDelta.x);
-          patchLineStartOffset  = patchCenterOffset - patchConvolutionOffsetDelta;
-          min=result->getMinPix(b);
-          max=result->getMaxPix(b);
-          
-          for(long y = 0; y <tileHeight; y++)
-          {
-             patchCenterOffset = patchLineStartOffset;
-             
-             for(long x =0; x < tileWidth; x++)
-             {
-                kernel->convolveSubImage(&buf[patchCenterOffset],
-                                         patchWidth,
-                                         convolveResult);
-                convolveResult = convolveResult < min? min:convolveResult;
-                convolveResult = convolveResult > max?max:convolveResult;
-                outBuf[outputOffset] = (T)convolveResult;
-                ++outputOffset;
-                ++patchCenterOffset;
-             }
-             patchLineStartOffset += patchWidth;
-          }
-       }
-    }
-}
-
-
-template <class T>
-void ossimTilePatch::fillTileTemplate(T /* dummyVariable */,
-                              ossimRefPtr<ossimImageData>& result,
-                              const ossimDpt   &ul,
-                              const ossimDpt   &ur,
-                              const ossimDpt   &deltaUl,
-                              const ossimDpt   &deltaUr,
-                              const ossimDpt   &length)const
-{
-   double stepSizeWidth  = 1.0/length.x;
-   double stepSizeHeight = 1.0/length.y;
-   long patchWidth = thePatchData->getWidth();
-   long patchHeight = thePatchData->getHeight();
-
-   
-   ossimIrect rect = thePatchData->getImageRectangle();
-   
-   ossimDpt startSave(ul.x - rect.ul().x,
-                      ul.y - rect.ul().y );
-   ossimDpt endSave(ur.x - rect.ul().x,
-                    ur.y - rect.ul().y);
-   for(ossim_uint32 band = 0; band < thePatchData->getNumberOfBands(); ++band)
-   {
-      T *resultBuf = (T*)result->getBuf(band);
-      const T *sourceBuf = (T*)thePatchData->getBuf(band);
-      ossimDpt start = startSave;
-      ossimDpt end   = endSave;
-      T nullPix = static_cast<T>(result->getNullPix(band));
-      for(long y = 0; y < length.y; y++)
-      {
-         double deltaX = (end.x - start.x)*stepSizeWidth;
-         double deltaY = (end.y - start.y)*stepSizeHeight;
-         ossimDpt pointXY = start;
-         for(long x = 0; x < length.x; x++)
-         {
-            int xPixel = pointXY.x<0?(int)floor(pointXY.x):(int)pointXY.x;
-            int yPixel = pointXY.y<0?(int)floor(pointXY.y):(int)pointXY.y;
-            if( (xPixel >=0) && (xPixel < patchWidth) &&
-                (yPixel >=0) && (yPixel < patchHeight))
-            {              
-               *resultBuf = sourceBuf[yPixel*patchWidth + xPixel];
-            }
-            else
-            {
-               *resultBuf = nullPix;
-            }
-            
-            resultBuf++;
-            pointXY.y += deltaY;
-            pointXY.x += deltaX;
-         }
-         
-         start.x += deltaUl.x;
-         start.y += deltaUl.y;
-         end.x   += deltaUr.x;
-         end.y   += deltaUr.y;
-      }
-   }
-}
-
-
-void ossimTilePatch::setRect(const ossimDpt &p1,
-                             const ossimDpt &p2,
-                             const ossimDpt &p3,
-                             const ossimDpt &p4,
-                             const ossimDpt &tile_size,
-                             const ossimDpt &padding)
-{
-   setRect(findBoundingRect(p1, p2, p3, p4),
-           tile_size,
-           padding);
-}
-
-void ossimTilePatch::setRect(const ossimDpt &center,
-                             const ossimDpt &rect_size,
-                             const ossimDpt &tile_size,
-                             const ossimDpt &padding)
-{
-   ossimDpt ul (center - rect_size/2.0);
-   ossimDpt lr (center + rect_size/2.0);
-   ossimDrect rect (ul, lr);
-   setRect(rect, tile_size, padding);
-}
-
-void ossimTilePatch::setRect(const ossimDrect& aRect,
-                             const ossimDpt& /* tile_size*/,
-                             const ossimDpt& padding)
-{
-   ossimDpt   ul(aRect.ul().x - padding.x,
-                 aRect.ul().y - padding.y);
-   ossimDpt   lr(aRect.lr().x + padding.x,
-                 aRect.lr().y + padding.y);
-
-   ossimDrect rect(ul, lr);
-   rect.stretchOut();
-   
-//   rect   = alignRectToBoundary(rect, tile_size);
-
-   if(thePatchData.valid())
-   {
-      if(  ((long)thePatchData->getWidth()  != (long)rect.width()) ||
-           ((long)thePatchData->getHeight() != (long)rect.height()))
-      {
-         thePatchData->setWidth((long)rect.width());
-         thePatchData->setHeight((long)rect.height());
-      }
-      thePatchData->setOrigin(rect.ul());
-      thePatchData->initialize();
-   }
-}
-
diff --git a/src/ossim/imaging/ossimTiledImageHandler.cpp b/src/ossim/imaging/ossimTiledImageHandler.cpp
deleted file mode 100644
index 9129345..0000000
--- a/src/ossim/imaging/ossimTiledImageHandler.cpp
+++ /dev/null
@@ -1,564 +0,0 @@
-//*************************************************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Oscar Kramer
-//
-// Description:
-// 
-// Image handler used for tile-files when the full image is distributed across multiple files,
-// as is the case for tiled Quickbird imagery. This is not for use with band-separate formats,
-// but only "spatially-separate" schemes.
-//
-//*************************************************************************************************
-//  $Id: ossimTiledImageHandler.cpp 2644 2011-05-26 15:20:11Z oscar.kramer $
-
-#include <algorithm>
-
-#include <ossim/imaging/ossimTiledImageHandler.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimRegExp.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimPreferences.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimPolygon.h>
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/imaging/ossimTiffOverviewBuilder.h>
-#include <ossim/imaging/ossimTiffTileSource.h>
-
-RTTI_DEF1(ossimTiledImageHandler, "ossimTiledImageHandler", ossimImageHandler)
-
-// Static trace for debugging
-static ossimTrace traceDebug("ossimTiledImageHandler:debug");
-
-//*************************************************************************************************
-//!  Constructor (default):
-//*************************************************************************************************
-ossimTiledImageHandler::ossimTiledImageHandler()
-   : m_tileFiles(0),
-     m_tile(0),
-     m_fullImgRect(),
-#if USING_SUB_OVRS
-     m_startOvrResLevel(-1),
-     m_lockSubOvrs(false)
-#else
-     m_startOvrResLevel(1)
-#endif
-{
-}
-
-//*************************************************************************************************
-//! Destructor:
-//*************************************************************************************************
-ossimTiledImageHandler::~ossimTiledImageHandler()
-{
-   close();
-}
-
-//*************************************************************************************************
-//! Deletes the overview and clears the valid image vertices.  Derived
-//! classes should implement.
-//*************************************************************************************************
-void ossimTiledImageHandler::close()
-{
-   vector<ossimTileFile>::iterator iter = m_tileFiles.begin();
-   while (iter != m_tileFiles.end())
-   {
-      (*iter).imageHandler->close();
-      ++iter;
-   }
-   m_tileFiles.clear();
-}
-
-//*************************************************************************************************
-//! Derived classes must implement this method to be concrete.
-//! @return true if open, false if not.
-//*************************************************************************************************
-bool ossimTiledImageHandler::isOpen()const
-{
-   if (m_tileFiles.size() > 0)
-      return true;
-
-   return false;
-}
-
-//*************************************************************************************************
-//! Initialize tile buffer to natch image datatype
-//*************************************************************************************************
-void ossimTiledImageHandler::allocate()
-{
-   m_tile = 0;
-   if ((m_tileFiles.size() == 0))
-      return;
-
-   // Just copy the image data tile of the first tile-file:
-   ossimRefPtr<ossimImageHandler> h0 = m_tileFiles[0].imageHandler;
-   ossimIrect rect (h0->getBoundingRect());
-   rect.set_lr(rect.ul() + ossimIpt(h0->getTileWidth()-1, h0->getTileHeight()-1));
-   ossimRefPtr<ossimImageData> source_tile = m_tileFiles[0].imageHandler->getTile(rect);
-   if (!source_tile.valid())
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "ossimTiledImageHandler::allocate() -- Could not"
-         "determine file-tile image data for allocating image tile. Aborting."<<endl;
-      return;
-   }
-
-   m_tile = (ossimImageData*) source_tile->dup();
-}
-
-//*************************************************************************************************
-//! Fills the requested tile by pulling pixels from multiple file tiles as needed.
-//*************************************************************************************************
-ossimRefPtr<ossimImageData> ossimTiledImageHandler::getTile(const ossimIrect& tile_rect, 
-                                                             ossim_uint32 resLevel)
-{
-   // First verify that there are file-tiles available:
-   if (m_tileFiles.size() == 0)
-      return ossimRefPtr<ossimImageData>();
-
-   // Allocate data tile if needed:
-   if(!m_tile.valid())
-   {
-      allocate();
-      if(!m_tile.valid())
-         return ossimRefPtr<ossimImageData>();
-   }
-
-   // Check if res level represents data inside the overall scene overview:
-   if (theOverview.valid() && (resLevel >= m_startOvrResLevel))
-      return theOverview->getTile(tile_rect, resLevel);
-
-   // Loop over all tile-files to find which intersect the requested image rect. This necessarily
-   // needs to be done at full res coordinates, so need to adjust by res level requested:
-   ossimDpt decimation_factor;
-   const ossim_uint32 BANDS = m_tile->getNumberOfBands();
-   // const ossim_uint32 PPB   = m_tile->getSizePerBand(); // pixels per band
-   // bool none_found = true;
-
-   m_tile->setImageRectangle(tile_rect);
-   ossim_uint32 wd, hd, ws, hs;
-   m_tile->getWidthHeight(wd, hd);
-
-   // Always start with blank tile.
-   m_tile->makeBlank();
-   
-   // See if any point of the requested tile is in the image.
-   if ( tile_rect.intersects( m_fullImgRect ) )
-   {
-      vector<ossimTileFile>::iterator tf_iter = m_tileFiles.begin();
-      ossimRefPtr<ossimImageData> source_tile = 0;
-      while (tf_iter != m_tileFiles.end())
-      {
-         if (( (*tf_iter).subImageRects.size() > resLevel) &&
-             tile_rect.intersects((*tf_iter).subImageRects[resLevel]))
-         {
-            // Current image handler lies within requested rect, need to adjust this rect to be 
-            // relative to this subimage offset before fetching the tile:
-            ossimIrect relative_rect (tile_rect - (*tf_iter).subImageRects[resLevel].ul());
-            source_tile = (*tf_iter).imageHandler->getTile(relative_rect, resLevel);
-            
-            // Quick check to see if a full tile was returned, in which case we can just return that
-            // tile instead of looping below:
-            //if (source_tile->getDataObjectStatus() == OSSIM_FULL)
-            //{
-            //   source_tile->setImageRectangle(tile_rect);
-            //   return source_tile;
-            //}
-
-            // Set the tile's rect back to full image space before saving to the list:
-            source_tile->getWidthHeight(ws, hs);
-            for (ossim_uint32 band = 0; band < BANDS; ++band)
-            {
-               const ossim_uint16 null_pixel = (ossim_uint16) m_tile->getNullPix(band);
-               const ossim_uint16* s = (const ossim_uint16*) source_tile->getBuf(band);
-               ossim_uint16* d = (ossim_uint16*) m_tile->getBuf(band);
-               ossim_uint32 is = 0; 
-               ossim_uint32 id = 0; 
-               for (ossim_uint32 y=0; (y<hd)&&(y<hs); y++)
-               {
-                  for (ossim_uint32 x=0; x<wd; x++)
-                  {
-                     if (x < ws)
-                     {
-                        if (s[is] != null_pixel)
-                           d[id] = s[is];
-                        ++is;
-                     }
-                     ++id;
-                  }
-               }
-            }
-         }
-         ++tf_iter;
-      }
-      
-      m_tile->validate();
-      
-   } // Matches: if ( tile_rect.intersects( m_fullImgRect ) )
-
-   return m_tile;
-}
-
-//*************************************************************************************************
-//! @param resLevel Reduced resolution level to return lines of.
-//! Default = 0
-//! @return The number of lines for specified reduced resolution level.
-//*************************************************************************************************
-ossim_uint32 ossimTiledImageHandler::getNumberOfLines(ossim_uint32 resLevel) const
-{
-   if (m_fullImgRect.hasNans())
-      return 0;
-
-   // Using simple decimation by powers of 2:
-   ossim_uint32 numlines = m_fullImgRect.height() >> resLevel;
-   return numlines;
-}
-
-//*************************************************************************************************
-//! @param resLevel Reduced resolution level to return samples of.
-//! Default = 0
-//! @return The number of samples for specified reduced resolution level.
-//*************************************************************************************************
-ossim_uint32 ossimTiledImageHandler::getNumberOfSamples(ossim_uint32 resLevel) const
-{
-   if (m_fullImgRect.hasNans())
-      return 0;
-
-   // Using simple decimation by powers of 2:
-   ossim_uint32 numsamps = m_fullImgRect.width() >> resLevel;
-   return numsamps;
-}
-
-//*************************************************************************************************
-//! Method to save the state of an object to a keyword list.
-//! Return true if ok or false on error.
-//*************************************************************************************************
-bool ossimTiledImageHandler::saveState(ossimKeywordlist& kwl, const char* prefix) const
-{
-  return ossimImageHandler::saveState(kwl, prefix);
-}
-
-//*************************************************************************************************
-//! Method to the load (recreate) the state of an object from a keyword
-//! list.  Return true if ok or false on error.
-//*************************************************************************************************
-bool ossimTiledImageHandler::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   if (!ossimImageHandler::loadState(kwl, prefix))
-      return false;
-
-   return open();
-}
-
-//*************************************************************************************************
-//! Indicates whether or not the image is tiled internally.
-//! This implementation returns true if (getImageTileWidth() &&
-//! getImageTileHeight()) are both non zero.
-//! Override in the image handler if something else is desired.
-//! Returns true if tiled, false if not.
-//*************************************************************************************************
-bool ossimTiledImageHandler::isImageTiled() const
-{
-   return true;
-}
-
-//*************************************************************************************************
-// Returns the number of bands of the first tile since all tiles need to have the same pixel type.
-//*************************************************************************************************
-ossim_uint32 ossimTiledImageHandler::getNumberOfInputBands() const
-{
-   if ((m_tileFiles.size() == 0) || (!m_tileFiles[0].imageHandler.valid()))
-      return 0;
-
-   return m_tileFiles[0].imageHandler->getNumberOfInputBands();
-}
-
-//*************************************************************************************************
-//! Returns the tile width of the image or 0 if the image is not tiled.
-//! Note: this is not the same as the ossimImageSource::getTileWidth which
-//! returns the output tile width which can be different than the internal
-//! image tile width on disk.
-//*************************************************************************************************
-ossim_uint32 ossimTiledImageHandler::getImageTileWidth() const
-{
-   if ((m_tileFiles.size() == 0) || (!m_tileFiles[0].imageHandler.valid()))
-      return 0;
-
-  if (m_tileFiles[0].imageHandler->isImageTiled())
-     return m_tileFiles[0].imageHandler->getImageTileWidth();
-
-  return m_tileFiles[0].imageHandler->getNumberOfSamples();
-}
-
-//*************************************************************************************************
-//! Returns the tile height of the image or 0 if the image is not tiled.
-//! Note: this is not the same as the ossimImageSource::getTileHeight which
-//! returns the output tile height which can be different than the internal
-//! image tile height on disk.
-//*************************************************************************************************
-ossim_uint32 ossimTiledImageHandler::getImageTileHeight() const
-{
-   if ((m_tileFiles.size() == 0) || (!m_tileFiles[0].imageHandler.valid()))
-      return 0;
-
-   if (m_tileFiles[0].imageHandler->isImageTiled())
-      return m_tileFiles[0].imageHandler->getImageTileHeight();
-
-   return m_tileFiles[0].imageHandler->getNumberOfLines();
-}
-
-//*************************************************************************************************
-//! Returns scalar type of first tile (should be the same for all tiles)
-//*************************************************************************************************
-ossimScalarType ossimTiledImageHandler::getOutputScalarType() const
-{
-   if ((m_tileFiles.size() == 0) || (!m_tileFiles[0].imageHandler.valid()))
-      return OSSIM_SCALAR_UNKNOWN;
-
-   return m_tileFiles[0].imageHandler->getOutputScalarType();
-}
-
-//*************************************************************************************************
-//! Returns overall bounding rect in image space.
-//*************************************************************************************************
-ossimIrect ossimTiledImageHandler::getImageRectangle(ossim_uint32 resLevel) const
-{
-   if (resLevel == 0)
-      return m_fullImgRect;
-
-   ossimDpt decimation;
-   getDecimationFactor(resLevel, decimation);
-
-   return m_fullImgRect*decimation;
-}
-
-
-#if USING_SUB_OVRS
-//*************************************************************************************************
-// Overrides base class
-//*************************************************************************************************
-void ossimTiledImageHandler::completeOpen()
-{
-   openOverview();
-   openValidVertices();
-}
-
-//*************************************************************************************************
-//! Will build over files, one for each tile file.
-//! @param includeFullResFlag if true the full resolution layer will also
-//! be put in the overview format.  This is handy for inefficient formats.
-//*************************************************************************************************
-bool ossimTiledImageHandler::buildOverview(ossimImageHandlerOverviewCompressionType ctype, 
-                                            ossim_uint32 qual,
-                                            ossimFilterResampler::ossimFilterResamplerType rtype,
-                                            bool ifr_flag)
-{
-   if (m_tileFiles.size() == 0)
-      return false;
-
-   bool all_ok = true;
-   vector<ossimTileFile>::iterator iter = m_tileFiles.begin();
-   while ((iter != m_tileFiles.end()) && all_ok)
-   {
-      if (!(*iter).imageHandler->hasOverviews())
-      {
-         ossimNotify(ossimNotifyLevel_INFO)<<"\nBuilding overview for <"
-            <<(*iter).imageHandler->getFilename()<<">"<<std::endl;
-
-         all_ok = (*iter).imageHandler->buildOverview(ctype, qual, rtype, ifr_flag);
-      }
-      ++iter;
-   }
-
-   // Overviews for subimage tile-files have been processed. However, we need to check the
-   // preferences for the overview stop dimension to see if we need additional decimation of the
-   // overall scene to achieve the final desired dimension.
-   ossimString stop_dim_str = 
-      ossimPreferences::instance()->findPreference(ossimKeywordNames::OVERVIEW_STOP_DIMENSION_KW);
-   if (!stop_dim_str.empty())
-   {
-      ossim_uint32 stop_dim = stop_dim_str.toUInt32();
-      ossimDpt decimation = theDecimationFactors.back();
-      ossim_uint32 nlines = decimation.y * m_fullImgRect.height();
-      ossim_uint32 nsamps = decimation.x * m_fullImgRect.width();
-      if ((nlines > stop_dim) || (nsamps > stop_dim))
-      {
-         // Need to continue decimating. These decimations are stored in an overall scene file.
-         // Need subimage OVRs open for this next operation:
-         openOverview();
-
-         ossimTiffOverviewBuilder tob;
-         tob.setInputSource(this);
-         theOverviewFile = getFilenameWithThisExtension("ovr");
-
-         // This magically takes over where we left off in decimating:
-         if (tob.buildOverview(theOverviewFile))
-         {
-            // Overview was successfully written, now open it:
-            theOverview = new ossimTiffTileSource;
-            all_ok = openOverview();
-         }
-      }
-   }
-
-   return all_ok;
-}
-
-//*************************************************************************************************
-// Will open overview files for all tile files. Actually, the tile-files will already have opened
-// their individual overviews, so this method only verifies the fact and initializes the 
-// associated subimage rects at all decimation levels.
-//*************************************************************************************************
-bool ossimTiledImageHandler::openOverview()
-{
-   if (m_tileFiles.size() == 0)
-      return false;
-
-   theDecimationFactors.clear();
-   bool all_ok = true;
-   ossimRefPtr<ossimImageHandler> handler = 0;
-   vector<ossimDpt> factors;
-   ossim_uint32 min_num_rlevels = 999;
-
-   // Loop over all tile-files to verify their OVR was opened and to calculate the associated 
-   // subimage rects at each res level:
-   vector<ossimTileFile>::iterator iter = m_tileFiles.begin();
-   while ((iter != m_tileFiles.end()) && all_ok)
-   {
-      handler = (*iter).imageHandler;
-      if (!handler.valid())
-      {
-         ++iter;
-         continue;
-      }
-
-      if ((*iter).subImageRects.size() == 0)
-      {
-         ossimNotify(ossimNotifyLevel_INFO)<<"\nBounding image rectangle not defined for <"
-            <<(*iter).imageHandler->getFilename()<<">! Cannot proceed with overviews."<<std::endl;
-         all_ok = false;
-      }
-
-      else if (handler->getOverview())
-      {
-         // Only verified that overview for tile-file was opened. Check number of decimation levels
-         // to latch minimum:
-         (*iter).overviewIsOpen = true;
-         handler->getDecimationFactors(factors);
-
-         if (factors.size() < min_num_rlevels)
-            min_num_rlevels = (ossim_uint32) factors.size();
-
-         // Need to determine the sub image rects at each decimation level:
-         ossimIrect subRectR0 ((*iter).subImageRects[0]);
-         for (ossim_uint32 i=1; i<(ossim_uint32)factors.size(); i++)
-         {
-            ossimIrect r (factors[i].x * subRectR0.ul().x, factors[i].y * subRectR0.ul().y,
-               factors[i].x * subRectR0.lr().x, factors[i].y * subRectR0.lr().y);
-            (*iter).subImageRects.push_back(r);
-         }
-      }
-      else
-      {
-         ossimNotify(ossimNotifyLevel_INFO)<<"\nNo overview available for <"
-            <<(*iter).imageHandler->getFilename()<<">"<<std::endl;
-         all_ok = false;
-      }
-      ++iter;
-   }
-
-   // Assuming here that the first tile will always provide a good representation of the decimations
-   // for all res levels in all tile-files. This may not be true.
-   if (m_tileFiles.size() && m_tileFiles[0].imageHandler.valid())
-   {
-      m_tileFiles[0].imageHandler->getDecimationFactors(theDecimationFactors);
-      theDecimationFactors.resize(min_num_rlevels);
-   }
-
-   // Check for overall scene overview file, that takes over where the individual tile-file
-   // overviews leave off:
-   theOverviewFile = getFilenameWithThisExtension("ovr");
-   if (!theOverviewFile.exists())
-      theOverviewFile.setExtension("OVR");
-   if (theOverviewFile.exists())
-   {
-      m_lockSubOvrs = true; // prevent closing and reopening of subimage ovrs
-      ossimImageHandler::openOverview(theOverviewFile);
-      m_lockSubOvrs = false; // reset
-      if (theOverview.valid())
-      {
-         vector<ossimDpt> extra_decimations;
-         theOverview->getDecimationFactors(extra_decimations);
-         if (extra_decimations.size())
-         {
-            // Obtain the decimations and add it to our decimation list:
-            m_startOvrResLevel = (ossim_uint32) theDecimationFactors.size();
-            ossimDpt start_decimation (theDecimationFactors.back() * 0.5);
-            ossimDpt decimation;
-            for (ossim_uint32 i=0; i<extra_decimations.size(); i++)
-            {
-               decimation.x = start_decimation.x*extra_decimations[i].x;
-               decimation.y = start_decimation.y*extra_decimations[i].y;
-               theDecimationFactors.push_back(decimation);
-            }
-         }
-      }
-   }
-
-   return all_ok;
-}
-
-//*************************************************************************************************
-//! Will close all tile files' overviews.
-//*************************************************************************************************
-void ossimTiledImageHandler::closeOverview()
-{
-   if (theOverview.valid())
-      theOverview = 0;
-
-   if (m_lockSubOvrs == false)
-   {
-      vector<ossimTileFile>::iterator iter = m_tileFiles.begin();
-      while ((iter != m_tileFiles.end()))
-      {
-         if ((*iter).imageHandler.valid())
-            (*iter).imageHandler->closeOverview();
-
-         ++iter;
-      }
-   }
-}
-
-//*************************************************************************************************
-//! Will return TRUE if all tile files have overviews.
-//*************************************************************************************************
-bool ossimTiledImageHandler::hasOverviews() const
-{
-   bool all_have_ovrs = true;
-   vector<ossimTileFile>::const_iterator iter = m_tileFiles.begin();
-   while ((iter != m_tileFiles.end()) && all_have_ovrs)
-   {
-      if (((*iter).imageHandler.valid()) && !((*iter).imageHandler->hasOverviews()))
-         all_have_ovrs = false;
-      ++iter;
-   }
-   return all_have_ovrs;
-}
-
-//*************************************************************************************************
-//! Returns the number of decimation (resolution) levels. This is the minimum number
-//! among all sub-image tile-files.
-//*************************************************************************************************
-ossim_uint32 ossimTiledImageHandler::getNumberOfDecimationLevels() const
-{
-   return (ossim_uint32) theDecimationFactors.size();
-}
-
-#endif /* #if USING_SUB_OVRS */
-
diff --git a/src/ossim/imaging/ossimTiling.cpp b/src/ossim/imaging/ossimTiling.cpp
deleted file mode 100644
index 8b35f7c..0000000
--- a/src/ossim/imaging/ossimTiling.cpp
+++ /dev/null
@@ -1,986 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2004 Garrett Potts
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: implementation for image generator
-//
-//*************************************************************************
-// $Id: ossimTiling.cpp 20103 2011-09-17 16:10:42Z dburken $
-
-#include <sstream>
-#include <iomanip>
-#include <ossim/imaging/ossimTiling.h>
-#include <ossim/base/ossimUnitTypeLut.h>
-#include <ossim/base/ossimUnitConversionTool.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimTrace.h>
-
-static ossimTrace traceDebug("ossimTiling:debug");
-
-RTTI_DEF1(ossimTiling, "ossimTiling", ossimObject);
-
-ossimTiling::ossimTiling()
-      :theTilingDistance(0,0),
-       theTilingDistanceUnitType(OSSIM_UNIT_UNKNOWN),
-       theDelta(0,0),
-       theDeltaType(ossimTilingDeltaType_TOTAL_PIXELS),
-       theOutputSizeInBytes(0),
-       theNumberOfBands(1),
-       theNumberOfBytesPerPixelPerBand(1),
-       thePaddingSizeInPixels(0.0, 0.0),
-       theMapProjection(),
-       theImageRect(),
-       theTilingRect(),
-       theTileId(-1),
-       theTotalHorizontalTiles(0),
-       theTotalVerticalTiles(0),
-       theTotalTiles(0),
-       theTileNameMask(),
-       theEdgeToEdgeFlag(false)
-{
-}
-
-bool ossimTiling::initialize(const ossimMapProjection& proj,
-                             const ossimIrect& boundingRect)
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimTiling::initialize DEBUG: Entered..."
-         << "\nBounding rect === " << boundingRect
-         << std::endl;
-   }
-   
-   bool result = true;
-   theMapProjection = (ossimMapProjection*)proj.dup();
-   theImageRect     = boundingRect;
-
-   result = validate();
-
-   ossimDpt convertedTilingDistance = theTilingDistance;
-
-   if(result)
-   {
-      // Let's setup the bounding tile rect.
-      if(theTilingDistanceUnitType != OSSIM_PIXEL)
-      {
-         getConvertedTilingDistance(convertedTilingDistance);
-         
-         if(theMapProjection->isGeographic())
-         {
-            ossimGpt ul;
-            ossimGpt ur;
-            ossimGpt lr;
-            ossimGpt ll;
-
-            theMapProjection->lineSampleToWorld(theImageRect.ul(),
-                                                ul);
-            theMapProjection->lineSampleToWorld(theImageRect.ur(),
-                                                ur);
-            theMapProjection->lineSampleToWorld(theImageRect.lr(),
-                                                lr);
-            theMapProjection->lineSampleToWorld(theImageRect.ll(),
-                                                ll);
-
-            theTilingRect = ossimDrect(ossimDpt(ul),
-                                       ossimDpt(ur),
-                                       ossimDpt(lr),
-                                       ossimDpt(ll),
-                                       OSSIM_RIGHT_HANDED);
-
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG)
-                  << "DEBUG: Geographic input bounds =  "
-                  << theTilingRect
-                  << std::endl;
-            }
-            
-            theTilingRect.stretchToTileBoundary(convertedTilingDistance);
-            
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG)
-                  << "DEBUG: Geographic input bounds stretched =  "
-                  << theTilingRect << std::endl;
-            }
-            
-            clampGeographic(theTilingRect);
-
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG)
-                  << "DEBUG: Geographic input bounds clamped =  "
-                  << theTilingRect << std::endl;
-            }
-
-         }  // End "if(theMapProjection->isGeographic())"
-         
-         else // meters
-         {
-            ossimDpt ul;
-            ossimDpt ur;
-            ossimDpt lr;
-            ossimDpt ll;
-            
-            theMapProjection->lineSampleToEastingNorthing(theImageRect.ul(),
-                                                          ul);
-            theMapProjection->lineSampleToEastingNorthing(theImageRect.ur(),
-                                                          ur);
-            theMapProjection->lineSampleToEastingNorthing(theImageRect.lr(),
-                                                          lr);
-            theMapProjection->lineSampleToEastingNorthing(theImageRect.ll(),
-                                                          ll);
-            theTilingRect = ossimDrect(ul,
-                                       ur,
-                                       lr,
-                                       ll,
-                                       OSSIM_RIGHT_HANDED);
-            
-            theTilingRect.stretchToTileBoundary(convertedTilingDistance);
-         }
-      }
-      else
-      {
-         ossim_int32 remainderX = (ossim_int32)((theImageRect.width()%((ossim_int32)theDelta.x)) != 0);
-         ossim_int32 remainderY = (ossim_int32)((theImageRect.height()%((ossim_int32)theDelta.y)) != 0);
-         
-         ossim_int32 w = (ossim_int32)((theImageRect.width()/(ossim_int32)theDelta.x)*theDelta.x +
-                                       (remainderX*theDelta.x));
-         ossim_int32 h = (ossim_int32)((theImageRect.height()/(ossim_int32)theDelta.y)*theDelta.y +
-                                       (remainderY*theDelta.y));
-         theTilingRect = ossimDrect(theImageRect.ul().x,
-                                    theImageRect.ul().y,
-                                    theImageRect.ul().x + (w-1),
-                                    theImageRect.ul().y + (h-1));
-
-         // since we are pixel space we force delta to be 1 pixel unit
-         //
-         theDelta.x   = 1.0;
-         theDelta.y   = 1.0;
-         theDeltaType = ossimTilingDeltaType_PER_PIXEL;
-      }
-   }
-   
-   theTotalHorizontalTiles = ossim::round<int>(fabs(theTilingRect.ur().x - theTilingRect.ul().x)/convertedTilingDistance.x);
-   theTotalVerticalTiles   = ossim::round<int>(fabs(theTilingRect.ur().y - theTilingRect.lr().y)/convertedTilingDistance.y);
-   theTotalTiles           = theTotalHorizontalTiles*theTotalVerticalTiles;
-
-   // reset the tile id to the beginning
-   //
-   reset();
-   
-   if(traceDebug())
-   {
-      print(ossimNotify(ossimNotifyLevel_DEBUG));
-      
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "\nossimTiling::initialize DEBUG: Leaving..." << std::endl;
-   }
-   return result;
-}
-
-bool ossimTiling::next(ossimRefPtr<ossimMapProjection>& resultProjection,
-                       ossimIrect& resultingBounds,
-                       ossimString& resultingName)const
-{
-   bool result = true;
-   
-   if(theTileId < theTotalTiles)
-   {
-      ossimDpt origin;
-      ossim_int64 row=0;
-      ossim_int64 col=0;
-
-      getRowCol(row, col, theTileId);
-
-      getTileName(resultingName,
-                  row, col, theTileId);
-      
-      getOrigin(origin, row, col);
-
-      if(theTilingDistanceUnitType == OSSIM_PIXEL)
-      {
-         ossimIpt ul = origin;
-
-         resultingBounds =
-            ossimIrect(ul.x - (ossim_int32)thePaddingSizeInPixels.x,
-                       ul.y - (ossim_int32)thePaddingSizeInPixels.y,
-                       ul.x + ((ossim_int32)theTilingDistance.x-1) +
-                       (ossim_int32)thePaddingSizeInPixels.x,
-                       ul.y + ((ossim_int32)theTilingDistance.y-1) +
-                       (ossim_int32)thePaddingSizeInPixels.y);
-      }
-      else
-      {
-         
-         ossimDpt deltaPerPixel = getDeltaPerPixel();
-         ossimIpt pixels;
-
-         if(theDeltaType == ossimTilingDeltaType_TOTAL_PIXELS)
-         {
-            pixels =   theDelta;
-         }
-         else
-         {
-            pixels =   ossimDpt(theTilingDistance.x/theDelta.x,
-                                theTilingDistance.y/theDelta.y);
-         }
-
-         if(theMapProjection->isGeographic())
-         {
-            if ( theEdgeToEdgeFlag )
-            {
-               theMapProjection->setUlTiePoints(
-                  ossimGpt( origin.lat - (deltaPerPixel.y/2.0),
-                            origin.lon + (deltaPerPixel.x/2.0),
-                            0.0,
-                            theMapProjection->origin().datum()) );
-            }
-            else
-            {
-               theMapProjection->setUlTiePoints(
-                  ossimGpt(origin.lat,
-                           origin.lon,
-                           0.0,
-                           theMapProjection->origin().datum()));
-               
-            }
-            theMapProjection->setDecimalDegreesPerPixel(deltaPerPixel);
-         }
-         else
-         {
-            if ( theEdgeToEdgeFlag )
-            {
-               theMapProjection->setUlTiePoints(
-                  ossimDpt( origin.x + (deltaPerPixel.x/2.0),
-                            origin.y - (deltaPerPixel.y/2.0) ) );
-            }
-            else
-            {
-               theMapProjection->setUlTiePoints(ossimDpt(origin.x, origin.y));
-            }
-            theMapProjection->setMetersPerPixel(deltaPerPixel);
-         }
-         resultingBounds = ossimIrect(-(ossim_int32)thePaddingSizeInPixels.x,
-                                      -(ossim_int32)thePaddingSizeInPixels.y,
-                                      (pixels.x-1) + (ossim_int32)thePaddingSizeInPixels.x,
-                                      (pixels.y-1) + (ossim_int32)thePaddingSizeInPixels.y);
-      }
-      resultProjection = theMapProjection;
-
-      ++theTileId;
-      if(traceDebug()&&resultProjection.valid())
-      {
-         ossimKeywordlist projKwl;
-         
-         resultProjection->saveState(projKwl);
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimTiling::next DEBUG: rect = " << resultingBounds
-            << "\nproj                          = " << projKwl
-            << "\ntileName                      = " << resultingName
-            << "\norigin                        = " << origin << std::endl;
-      }
-   }
-   else
-   {
-      result = false;
-   }
-
-   
-   return result;
-}
-
-
-void ossimTiling::reset()
-{
-   theTileId = 0;
-}
-
-void ossimTiling::setTilingDistance(const ossimDpt& tilingDistance,
-                                    ossimUnitType unitType)
-{
-   theTilingDistance         = tilingDistance;
-   theTilingDistanceUnitType = unitType;
-}
-
-void ossimTiling::setDelta(const ossimDpt& delta,
-                           ossimTilingDeltaType deltaType)
-{
-   theDelta     = delta;
-   theDeltaType = deltaType;
-}
-
-bool ossimTiling::validate()const
-{
-   bool result = true;
-
-   if(theMapProjection.valid())
-   {
-      if(theMapProjection->isGeographic())
-      {
-         switch(theTilingDistanceUnitType)
-         {
-            case OSSIM_DEGREES:
-            case OSSIM_RADIANS:
-            case OSSIM_SECONDS:
-            case OSSIM_MINUTES:
-            case OSSIM_PIXEL:
-            {
-               break;
-            }
-            default:
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << "ossimTiling::validate()\n"
-                  << "Map projeciton requires tiling in angular units but the"
-                  << "\nspacing is in non angular" << std::endl;
-               result = false;
-            }
-         }
-      }
-      else
-      {
-         switch(theTilingDistanceUnitType)
-         {
-            case OSSIM_METERS:
-            case OSSIM_FEET:
-            case OSSIM_US_SURVEY_FEET:
-            case OSSIM_NAUTICAL_MILES:
-            case OSSIM_PIXEL:
-            case OSSIM_MILES:
-            case OSSIM_MILLIMETERS:
-            {
-               break;
-            }
-            default:
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << "ossimTiling::validate()"
-                  << "\nMap projeciton requires tiling using linear spacing"
-                  << " but the spacing is in non linear" << std::endl;
-               result = false;
-            }
-         }
-      }
-   }
-   else
-   {
-      result = false;
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimTiling::validate()"
-         << "\nthe image projection is null and so not valid"
-         << std::endl;
-   }
-   if((theDelta.x <= FLT_EPSILON) ||
-      (theDelta.y <= FLT_EPSILON))
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimTiling::validate() the delta is too small or is negative"
-         << "value = " << theDelta << std::endl;
-      result = false;
-   }
-   if((theTilingDistance.x <= FLT_EPSILON)||
-      (theTilingDistance.y <= FLT_EPSILON))
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimTiling::validate()"
-         << "\nthe tiling distance is too small or is negative"
-         << "Value = " << theTilingDistance << std::endl;
-   }
-   
-   if(theImageRect.hasNans())
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimTiling::validate() the image rect has nans"
-         << std::endl;
-      result = false;
-   }
-   
-   return result;
-}
-
-bool ossimTiling::isAngularUnit(ossimUnitType unitType)const
-{
-   bool result = false;
-   
-   switch(unitType)
-   {
-      case OSSIM_DEGREES:
-      case OSSIM_RADIANS:
-      case OSSIM_SECONDS:
-      case OSSIM_MINUTES:
-      {
-         result = true;
-         break;
-      }
-      default:
-      {
-         break;
-      }
-   }
-   return result;
-}
-
-bool ossimTiling::isLinearUnit(ossimUnitType unitType)const
-{
-   bool result = false;
-   
-   switch(unitType)
-   {
-      case OSSIM_METERS:
-      case OSSIM_FEET:
-      case OSSIM_US_SURVEY_FEET:
-      case OSSIM_NAUTICAL_MILES:
-      case OSSIM_MILES:
-      case OSSIM_MILLIMETERS:
-      {
-         result = true;
-         break;
-      }
-      default:
-      {
-         break;
-      }
-   }
-   return result;
-   
-}
-
-void ossimTiling::setTileNameMask(const ossimString& mask)
-{
-   if(theTileNameMask == "")
-   {
-      theTileNameMask = "tile%i%";
-   }
-   if(mask.contains("%i%")||
-      mask.contains("%oc%")||
-      mask.contains("%or%")||
-      mask.contains("%r%")||
-      mask.contains("%c%")||
-      mask.contains("%SRTM%"))
-   {
-      theTileNameMask = mask;
-   }
-   else
-   {
-      theTileNameMask += "%i%";
-   }
-}
-
-ossimString ossimTiling::getTileNameMask()const
-{
-   return theTileNameMask;
-}
-
-bool ossimTiling::getRowCol(ossim_int64& row,
-                            ossim_int64& col,
-                            ossim_int64 tileId)const
-{
-   bool result = true;
-   
-   if((theTotalHorizontalTiles > 0)&&
-      (tileId < theTotalTiles))
-   {
-      row = tileId/static_cast<ossim_int64>(theTotalHorizontalTiles);
-      col = tileId%static_cast<ossim_int64>(theTotalHorizontalTiles);
-      if((col >= static_cast<ossim_int32>(theTotalHorizontalTiles)) &&
-         (row >= static_cast<ossim_int32>(theTotalVerticalTiles)))
-      {           
-         result = false;
-      }
-   }
-   return result;
-}
-
-bool ossimTiling::getOrigin(ossimDpt& origin,
-                            ossim_int64 tileId)const
-{
-   ossim_int64 row=0;
-   ossim_int64 col=0;
-   
-   bool result = getRowCol(row, col, tileId);
-   if(result)
-   {
-      result = getOrigin(origin, row, col);
-   }
-
-   return result;
-}
-
-bool ossimTiling::getOrigin(ossimDpt& origin,
-                            ossim_int64 row,
-                            ossim_int64 col)const
-{
-   bool result = false;
-
-   if((col < static_cast<ossim_int64>(theTotalHorizontalTiles)) &&
-      (row < static_cast<ossim_int64>(theTotalVerticalTiles)))
-   {
-      ossimDpt convertedTilingDistance;
-      getConvertedTilingDistance(convertedTilingDistance);
-
-      result = true;
-      if(theTilingRect.orientMode() == OSSIM_RIGHT_HANDED)
-      {
-         origin.x = theTilingRect.ul().x + col*convertedTilingDistance.x;
-         origin.y = theTilingRect.ul().y - row*convertedTilingDistance.y;
-      }
-      else
-      {
-         origin.x = theTilingRect.ul().x + col*convertedTilingDistance.x;
-         origin.y = theTilingRect.ul().y + row*convertedTilingDistance.y;
-      }
-   }
-
-   return result;
-}
-
-ossimDpt ossimTiling::getDeltaPerPixel()const
-{
-   
-   ossimDpt result = theDelta;
-
-   if (!theMapProjection)
-   {
-      return result;
-   }
-
-   if(theDeltaType == ossimTilingDeltaType_TOTAL_PIXELS)
-   {
-      result = ossimDpt(theTilingDistance.x/theDelta.x,
-                        theTilingDistance.y/theDelta.y);
-   }
-
-   ossimUnitConversionTool unitConverter(theMapProjection->origin(),
-                                         1.0,
-                                         theTilingDistanceUnitType);
-   if(theMapProjection->isGeographic())
-   {
-      unitConverter.setValue(result.x, theTilingDistanceUnitType);
-      result.x = unitConverter.getValue(OSSIM_DEGREES);
-      
-      unitConverter.setValue(result.y,
-                             theTilingDistanceUnitType);
-      result.y = unitConverter.getValue(OSSIM_DEGREES);
-   }
-   else
-   {
-      unitConverter.setValue(result.x,
-                             theTilingDistanceUnitType);
-      result.x = unitConverter.getValue(OSSIM_METERS);
-      
-      unitConverter.setValue(result.y,
-                             theTilingDistanceUnitType);
-      result.y = unitConverter.getValue(OSSIM_METERS);
-   }
-
-   return result;
-}
-
-void ossimTiling::getTileName(ossimString& resultingName,
-                              ossim_int64 row,
-                              ossim_int64 col,
-                              ossim_int64 id)const
-{
-   if(theTileNameMask == "")
-   {
-      ostringstream idString;
-      idString << id;
-      resultingName = ossimString("tile") + idString.str().c_str();
-   }
-   else if(theTileNameMask.contains("%SRTM%"))
-   {
-      // must be a 1x1 degree tiling distance
-      //
-      if((theTilingDistanceUnitType == OSSIM_DEGREES)&&
-         (theTilingDistance.x == 1.0)&&
-         (theTilingDistance.x == 1.0))
-      {
-         ostringstream latString;
-         ostringstream lonString;
-         
-         resultingName = "";
-         ossimDpt origin;
-         getOrigin(origin, row, col);
-         // the name is lower left and not upper left 
-         // subtract one degree
-         //
-         origin.lat -=1;
-         latString << setfill('0') << setw(2) << fabs(origin.lat);
-         lonString << setfill('0') << setw(3) << fabs(origin.lon);
-         
-         if(origin.lat < 0.0)
-         {
-            resultingName += "S";
-         }
-         else 
-         {
-            resultingName += "N";
-         }
-         resultingName += latString.str().c_str();
-         if(origin.lon < 0.0)
-         {
-            resultingName += "W";
-         }
-         else
-         {
-            resultingName += "E";
-         }
-         resultingName += lonString.str().c_str();
-         resultingName += ".hgt";
-      }
-   }
-   else
-   {
-      ostringstream rowString;
-      ostringstream colString;
-      ostringstream idString;
-      ostringstream oRowString;
-      ostringstream oColString;
-      ossimDpt      origin;
-      getOrigin(origin, row, col);
-      
-      rowString << row;
-      colString << col;
-      idString  << id;
-      oRowString << row;
-      oColString << col;
-      
-      resultingName = theTileNameMask;
-      resultingName = resultingName.substitute("%r%",
-                                               rowString.str().c_str());
-      resultingName = resultingName.substitute("%c%",
-                                               colString.str().c_str());
-      resultingName = resultingName.substitute("%i%",
-                                               idString.str().c_str());
-      resultingName = resultingName.substitute("%oc",
-                                               oColString.str().c_str());
-      resultingName = resultingName.substitute("%or",
-                                               oRowString.str().c_str());
-   }
-}
-
-void ossimTiling::clampGeographic(ossimDrect& rect)const
-{
-   ossimDpt ul = rect.ul();
-   ossimDpt lr = rect.lr();
-
-   if(ul.lat > 90) ul.lat = 90.0;
-   if(lr.lat < -90.0) lr.lat = -90.0;
-
-   if(ul.lon < -180) ul.lon = -180;
-   if(lr.lon > 180)  lr.lon = 180;
-
-   rect = ossimDrect(ul, lr, rect.orientMode());
-}
-
-bool ossimTiling::saveState(ossimKeywordlist& kwl,
-                            const char* prefix)const
-{
-   std::stringstream tilingDistance;
-
-   tilingDistance << theTilingDistance.x << " " << theTilingDistance.y << std::endl;
-   
-   kwl.add(prefix,
-           "tiling_distance",
-           tilingDistance.str().c_str(),
-           true);
-
-   
-   kwl.add(prefix,
-           "tiling_distance_type",
-           ossimUnitTypeLut::instance()->
-           getTableIndexString(theTilingDistanceUnitType),
-           true);
-   std::ostringstream delta;
-   delta << theDelta.x << " " << theDelta.y;
-   kwl.add(prefix,
-           "delta",
-           delta.str().c_str(),
-           true);
-   
-   if(theDeltaType == ossimTilingDeltaType_TOTAL_PIXELS)
-   {
-      kwl.add(prefix,
-              "delta_type",
-              "total_pixels",
-              true);
-   }
-   else
-   {
-      kwl.add(prefix,
-              "delta_type",
-              "delta_per_pixels",
-              true);
-   }
-   std::ostringstream padding;
-
-   padding << thePaddingSizeInPixels.x << " " << thePaddingSizeInPixels.y;
-   kwl.add(prefix,
-           "padding_size_in_pixels",
-           padding.str().c_str(),
-           true);
-
-   kwl.add(prefix,
-           "tile_name_mask",
-           theTileNameMask.c_str(),
-           true);
-
-   if (theOutputSizeInBytes)
-   {
-      kwl.add(prefix,
-              "output_size_in_bytes",
-              ossimString::toString(theOutputSizeInBytes).c_str(),
-              true);
-      kwl.add(prefix,
-              "output_bands",
-              theNumberOfBands,
-              true);
-      kwl.add(prefix,
-              "output_bytes_per_pixel_per_band",
-              theNumberOfBytesPerPixelPerBand,
-              true);
-   }
-
-   kwl.add(prefix,
-           "edge_to_edge",
-           ossimString::toString(theEdgeToEdgeFlag),
-           true);
-   
-   
-   return true;
-}
-
-bool ossimTiling::loadState(const ossimKeywordlist& kwl,
-                            const char* prefix)
-{
-   bool result = false;
-   
-   // Get the mask if any.
-   theTileNameMask = kwl.find(prefix, "tile_name_mask");
-   setTileNameMask(theTileNameMask);
-
-   const char* paddingSizeInPixels = kwl.find(prefix,
-                                              "padding_size_in_pixels");
-   if (paddingSizeInPixels)
-   {
-      ossimString x,y;
-      std::istringstream padding(ossimString(paddingSizeInPixels).c_str());
-      padding >> x >> y;
-      thePaddingSizeInPixels.x = x.toFloat64();
-      thePaddingSizeInPixels.y = y.toFloat64();
-   }
-   
-   // Check to tile by size in bytes.
-   const char* lookup;
-   if (kwl.numberOf(prefix, "output_size_in_"))
-   {
-      lookup = kwl.find(prefix, "output_size_in_bytes");
-      if (lookup)
-      {
-         theOutputSizeInBytes = ossimString(lookup).toInt64();
-      }
-      lookup = kwl.find(prefix, "output_size_in_kilo_bytes");
-      if (lookup)
-      {
-         theOutputSizeInBytes = ossimString(lookup).toInt64() * 1024;
-      }
-      lookup = kwl.find(prefix, "output_size_in_mega_bytes");
-      if (lookup)
-      {
-         theOutputSizeInBytes = ossimString(lookup).toInt64() * 1024 * 1024;
-      }
-   }
-
-   if (theOutputSizeInBytes)
-   {
-      
-      lookup = kwl.find(prefix, "output_bands");
-      if (lookup)
-      {
-         theNumberOfBands = ossimString(lookup).toInt32();
-      }
-      lookup = kwl.find(prefix, "output_bytes_per_pixel_per_band");
-      if (lookup)
-      {
-         theNumberOfBytesPerPixelPerBand = ossimString(lookup).toInt32();
-      }
-      
-      ossim_int64 pixelsPerBand = theOutputSizeInBytes /
-         (theNumberOfBands * theNumberOfBytesPerPixelPerBand);
-      
-      ossim_int32 oneDimension =
-         static_cast<ossim_int32>(floor(sqrt((double)pixelsPerBand)));
-
-      //---
-      // TODO: Clamp to power of two option. (drb)
-      //---
-      // theDelta.x = oneDimension;
-      // theDelta.y = oneDimension;
-      // theTilingDistance.x = 1;
-      // theTilingDistance.y = 1;
-      
-      theDelta.x = 1;
-      theDelta.y = 1;
-      theTilingDistance.x = oneDimension;
-      theTilingDistance.y = oneDimension;
-      theDeltaType = ossimTilingDeltaType_TOTAL_PIXELS;
-      theTilingDistanceUnitType = OSSIM_PIXEL;
-      result = true;
-   }
-   else
-   {
-      const char* tilingDistance = kwl.find(prefix,
-                                            "tiling_distance");
-      const char* tilingDistanceType = kwl.find(prefix,
-                                                "tiling_distance_type");
-      const char* delta = kwl.find(prefix,
-                                   "delta");
-      
-      const char* deltaType = kwl.find(prefix,
-                                       "delta_type");
-      
-      result = tilingDistance&&tilingDistanceType&&delta&&deltaType&&paddingSizeInPixels;
-      ossimString x,y;
-      std::istringstream distance(ossimString(tilingDistance).c_str());
-      distance >> x >> y;
-      theTilingDistance.x = x.toFloat64();
-      theTilingDistance.y = y.toFloat64();
-      if(theTilingDistance.x <= 0.0)
-      {
-         theTilingDistance.x = 1.0;
-      }
-      if(theTilingDistance.y<=0.0)
-      {
-         theTilingDistance.y = theTilingDistance.x;
-      }
-      
-      // unitLut.getTableIndexString(theTilingDistanceUnitType), ?????
-      
-      theTilingDistanceUnitType = (ossimUnitType)
-         ossimUnitTypeLut::instance()->getEntryNumber(
-            ossimString(tilingDistanceType).c_str());
-      
-      theDelta = ossimDpt(0,0);
-      x="";
-      y="";
-      std::istringstream deltaValues(ossimString(delta).c_str());
-      deltaValues >> x >> y;
-      theDelta.x = x.toFloat64();
-      theDelta.y = y.toFloat64();
-      
-      if(theDelta.x <= 0.0)
-      {
-         theDelta.x = 1.0;
-      }
-      
-      if(theDelta.y <= 0.0)
-      {
-         theDelta.y = theDelta.x;
-      }
-      
-      if(ossimString(deltaType).downcase().contains("total"))
-      {
-         theDeltaType = ossimTilingDeltaType_TOTAL_PIXELS;
-      }
-      else
-      {
-         theDeltaType = ossimTilingDeltaType_PER_PIXEL;
-      }
-   }
-   
-   lookup = kwl.find(prefix, "edge_to_edge");
-   if ( lookup )
-   {
-      theEdgeToEdgeFlag = ossimString::toBool(lookup);
-   }
-      
-   if (traceDebug())
-   {
-      print(ossimNotify(ossimNotifyLevel_DEBUG));
-   }
-
-   return result;
-}
-
-std::ostream& ossimTiling::print(std::ostream& out) const
-{
-   out << "theTilingDistance:                 " << theTilingDistance
-       << "\ntheTilingDistanceUnitType:       " << theTilingDistanceUnitType
-       << "\ntheDelta:                        " << theDelta
-       << "\ntheDeltaType:                    " << theDeltaType
-       << "\nthePaddingSizeInPixels:          " << thePaddingSizeInPixels
-       << "\ntheImageRect:                    " << theImageRect
-       << "\ntheTilingRect:                   " << theTilingRect
-       << "\ntheTileId:                       " << theTileId
-       << "\ntheTotalHorizontalTiles:         " << theTotalHorizontalTiles
-       << "\ntheTotalVerticalTiles:           " << theTotalVerticalTiles
-       << "\ntheTotalTiles:                   " << theTotalTiles
-       << "\ntheTileNameMask:                 " << theTileNameMask
-       << "\ntheOutputSizeInBytes:            " << theOutputSizeInBytes
-       << "\ntheNumberOfBands:                " << theNumberOfBands
-       << "\ntheNumberOfBytesPerPixelPerBand: " <<
-      theNumberOfBytesPerPixelPerBand
-       << "\ntheEdgeToEdgeFlag:               " << theEdgeToEdgeFlag
-       << "\n";
-
-   if (theMapProjection.valid())
-   {
-      out << "\ntheMapProjection:\n" << theMapProjection->print(out);
-   }
-   else
-   {
-      out << "theMapProjection is not set.";
-   }
-   out << endl;
-
-   return out;
-}
-
-void ossimTiling::getConvertedTilingDistance(ossimDpt& pt) const
-{
-   if(theTilingDistanceUnitType == OSSIM_PIXEL)
-   {
-      pt = theTilingDistance;
-      return;
-   }
-   if (!theMapProjection)
-   {
-      // This should not happen...
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimTiling::getConvertedTilingDistance WARNING"
-         << " projection not set!" << endl;
-      pt = theTilingDistance;
-      return;
-   }
-   ossimUnitConversionTool unitConverter(theMapProjection->origin(),
-                                         1.0,
-                                         theTilingDistanceUnitType);
-
-   if(theMapProjection->isGeographic())
-   {
-      unitConverter.setValue(theTilingDistance.x,
-                             theTilingDistanceUnitType);
-      pt.x = unitConverter.getValue(OSSIM_DEGREES);
-      
-      unitConverter.setValue(theTilingDistance.y,
-                             theTilingDistanceUnitType);
-      pt.y = unitConverter.getValue(OSSIM_DEGREES);
-   }
-   else
-   {
-      unitConverter.setValue(theTilingDistance.x,
-                             theTilingDistanceUnitType);
-      pt.x = unitConverter.getValue(OSSIM_METERS);
-      
-      unitConverter.setValue(theTilingDistance.y,
-                             theTilingDistanceUnitType);
-      pt.y = unitConverter.getValue(OSSIM_METERS);
-   }
-}
diff --git a/src/ossim/imaging/ossimTilingPoly.cpp b/src/ossim/imaging/ossimTilingPoly.cpp
deleted file mode 100644
index 61ddc56..0000000
--- a/src/ossim/imaging/ossimTilingPoly.cpp
+++ /dev/null
@@ -1,369 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Mingjie Su
-// 
-// Description: implementation for image generator
-//
-//*************************************************************************
-// $Id: ossimTilingPoly.cpp 2725 2011-06-15 18:13:07Z david.burken $
-
-#include <sstream>
-#include <iomanip>
-#include <ossim/imaging/ossimTilingPoly.h>
-#include <ossim/base/ossimUnitTypeLut.h>
-#include <ossim/base/ossimUnitConversionTool.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/imaging/ossimEsriShapeFileInterface.h>
-
-static ossimTrace traceDebug("ossimTilingPoly:debug");
-
-RTTI_DEF1(ossimTilingPoly, "ossimTilingPoly", ossimTilingRect);
-
-ossimTilingPoly::ossimTilingPoly()
-      : ossimTilingRect(),
-      m_shpFilename(""),
-      m_useMbr(true),
-      m_bufferDistance(0.0),
-      m_exteriorCut(0),
-      m_interiorCut(0),
-      m_featureBoundingIntersect(true)
-{
-}
-
-ossimTilingPoly::~ossimTilingPoly()
-{
-   m_exteriorCut = 0; // Ref ptr, not a leak.
-   m_interiorCut = 0; // ditto...
-   m_features.clear();
-}
-
-bool ossimTilingPoly::initialize(const ossimMapProjection& proj,
-                             const ossimIrect& boundingRect)
-{
-   bool result = false;
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimTilingPoly::initialize DEBUG: Entered..."
-         << "\nBounding rect === " << boundingRect
-         << std::endl;
-   }
-
-   ossimDpt convertedTilingDistance = theTilingDistance;
-   result = initializeBase(proj, boundingRect, convertedTilingDistance);
-   if (result)
-   {
-      return parseShpFile();
-   }
-   return result;
-}
-
-bool ossimTilingPoly::next(ossimRefPtr<ossimMapProjection>& resultProjection,
-                           ossimIrect& resultingBounds,
-                           ossimString& resultingName)
-{
-   bool result = true;
-   
-   if(theTileId < theTotalTiles)
-   {
-      ostringstream idString;
-      ossim_int64 tileId = theTileId + 1;
-      if (tileId < static_cast<ossim_int64>(m_features.size()))
-      {
-         idString  << m_features[tileId].m_fid;
-         resultingName = theTileNameMask;
-         resultingName = resultingName.substitute("%f%", idString.str().c_str());
-      }
-      result = nextFeature();
-      resultingBounds = m_exteriorCut->getRectangle();
-
-      resultProjection = theMapProjection;
-
-      ++theTileId; 
-   }
-   else
-   {
-      result = false;
-   }
-
-   return result;
-}
-
-bool ossimTilingPoly::saveState(ossimKeywordlist& kwl,
-                                const char* prefix)const
-{
-   kwl.add(prefix,
-           "tile_source",
-           m_shpFilename.c_str(),
-           true);
-
-   kwl.add(prefix,
-      "paddding_use_mbr",
-      m_useMbr,
-      true);
-
-   return  ossimTilingRect::saveState(kwl, prefix);;
-}
-
-bool ossimTilingPoly::loadState(const ossimKeywordlist& kwl,
-                            const char* prefix)
-{
-   bool result = ossimTilingRect::loadState(kwl, prefix);
-   
-   //Get the shp file if any
-   m_shpFilename = kwl.find(prefix, "tile_source");
-
-   // Get the mask if any.
-   if (!m_shpFilename.empty())
-   {
-      if (theTileNameMask.contains("%r%_%c%"))
-      {
-         theTileNameMask = theTileNameMask.substitute("%r%_%c%", "%f%", true);
-      }
-      result = true;
-   }
- 
-   const char* useMbr = kwl.find(prefix, "padding_use_mbr");
-   if (useMbr)
-   {
-      if (!ossimString(useMbr).toBool())
-      {
-         m_useMbr = false;
-         m_bufferDistance = thePaddingSizeInPixels.x;
-      }
-   }
-
-   return result;
-}
-
-bool ossimTilingPoly::nextFeature()
-{
-   if (m_exteriorCut == 0)
-   {
-      m_exteriorCut = new ossimGeoPolyCutter;
-      m_exteriorCut->setView(theMapProjection.get());
-   }
-   
-   bool result = false;
-   ossim_int64 tileId = theTileId + 1;//use (theTileId+1) because theTileId is intialized as -1
-   if (tileId < static_cast<ossim_int64>(m_features.size())) 
-   {
-      if (m_features[tileId].m_polygon.size() > 0)
-      {
-         if (m_features[tileId].m_polyType == ossimGeoAnnotationPolyObject::OSSIM_POLY_INTERIOR_RING)
-         {
-            if (m_interiorCut == 0)
-            {
-               m_interiorCut = new ossimGeoPolyCutter;
-               m_interiorCut->setView(theMapProjection.get());
-               m_interiorCut->setCutType(ossimPolyCutter::OSSIM_POLY_NULL_INSIDE);
-            }
-            m_interiorCut->setPolygon(m_features[tileId].m_polygon);
-         }
-         else
-         {
-            // std::vector<ossimGpt> points = m_features[tileId].m_polygon;
-            // for (ossim_uint32 i = 0; i < points.size(); i++)
-            // {
-            //    ossimGpt point = points[i];
-            // }
-            m_exteriorCut->setPolygon(m_features[tileId].m_polygon);
-            setRect();
-         }
-         result = true;
-      }
-      else if (m_features[tileId].m_multiPolys.size() > 0)
-      {
-         for (ossim_uint32 i = 0; i < m_features[tileId].m_multiPolys.size(); i++)
-         {
-            ossimGeoPolygon geoPoly = m_features[tileId].m_multiPolys[i];
-            std::vector<ossimGeoPolygon> holePolys = geoPoly.getHoleList();
-            if (holePolys.size() > 0)
-            {
-               if (m_interiorCut == 0)
-               {
-                  m_interiorCut = new ossimGeoPolyCutter;
-                  m_interiorCut->setView(theMapProjection.get());
-                  m_interiorCut->setCutType(ossimPolyCutter::OSSIM_POLY_NULL_INSIDE);
-               }
-               m_interiorCut->clear();
-               for (ossim_uint32 j = 0; j < holePolys.size(); j++)
-               {
-                  m_interiorCut->addPolygon(holePolys[j]);
-               }
-            }
-            m_exteriorCut->setPolygon(m_features[tileId].m_multiPolys[i]);
-            setRect();
-         }
-         result = true;
-      }
-   }
-   else
-   {
-      result = false;
-   }
-   return result;
-}
-
- void ossimTilingPoly::setRect()
- {
-    ossimIrect rect = m_exteriorCut->getRectangle();
-    if (rect.intersects(theImageRect))
-    {
-       m_featureBoundingIntersect = true;
-       if (!rect.completely_within(theImageRect))
-       {
-          ossimIrect clipRect = rect.clipToRect(theImageRect);
-          m_exteriorCut->setRectangle(clipRect);
-          rect = clipRect;
-       }
-    }
-    else
-    {
-       m_featureBoundingIntersect = false;
-    }
-    if (m_useMbr)
-    {
-       if (thePaddingSizeInPixels.x > 0 && thePaddingSizeInPixels.y > 0)
-       {
-          ossimIrect newRect = ossimIrect(rect.ul().x-(ossim_int32)thePaddingSizeInPixels.x,
-             rect.ul().y-(ossim_int32)thePaddingSizeInPixels.y,
-             rect.lr().x + (ossim_int32)thePaddingSizeInPixels.x,
-             rect.lr().y + (ossim_int32)thePaddingSizeInPixels.y);
-          ossimIrect clipRect = newRect.clipToRect(theImageRect);//in case the bounding is larger than input image after adding buffer
-          m_exteriorCut->setRectangle(clipRect);
-       }
-    }
- }
-
-bool ossimTilingPoly::parseShpFile()
-{
-   m_features.clear();
-
-   ossimString query = "";
-   bool result = false;
-   if (m_shpFilename.contains("|"))
-   {
-      ossimString fileName = m_shpFilename;
-      std::vector<ossimString> fileList = fileName.split("|");
-      if (fileList.size() > 1)
-      {
-         m_shpFilename = fileList[0];
-         query = fileList[1];
-      }
-   }
-
-   ossimRefPtr<ossimImageHandler> shpHandler = ossimImageHandlerRegistry::instance()->open(m_shpFilename);
-   ossimEsriShapeFileInterface* shpInterface = PTR_CAST(ossimEsriShapeFileInterface, shpHandler.get());
-   if (shpInterface != 0)
-   {
-      if (!query.empty())
-      {
-         shpInterface->setQuery(query);
-      }
-      if (m_useMbr == false)
-      {
-         ossimProjection* proj = shpHandler->getImageGeometry()->getProjection();
-         ossimMapProjection* mapProj = PTR_CAST(ossimMapProjection, proj);
-         if (mapProj)
-         {
-            if (mapProj->isGeographic())
-            {
-               m_bufferDistance = thePaddingSizeInPixels.x * theMapProjection->getDecimalDegreesPerPixel().x;
-               shpInterface->setGeometryBuffer(m_bufferDistance, OSSIM_DEGREES);
-            }
-            else
-            {
-               m_bufferDistance = thePaddingSizeInPixels.x * theMapProjection->getMetersPerPixel().x;
-               shpInterface->setGeometryBuffer(m_bufferDistance, OSSIM_METERS);
-            }
-         }
-      }
-      std::multimap<long, ossimAnnotationObject*> features = shpInterface->getFeatureTable();
-      if (features.size() > 0)
-      {
-         std::multimap<long, ossimAnnotationObject*>::iterator it = features.begin();
-         while (it != features.end())
-         {
-            ossimAnnotationObject* anno = it->second;
-            if (anno != 0)
-            {
-               ossimGeoAnnotationPolyObject* annoPoly = PTR_CAST(ossimGeoAnnotationPolyObject, anno);
-               ossimGeoAnnotationMultiPolyObject* annoMultiPoly = 0;
-               if (annoPoly == 0)
-               {
-                  annoMultiPoly = PTR_CAST(ossimGeoAnnotationMultiPolyObject, anno);
-               }
-               if (annoPoly != 0)
-               {
-                  result = true;
-                  std::vector<ossimGpt> polygon;
-
-                  //get the points of a polygon
-                  std::vector<ossimGpt> points = annoPoly->getPoints();
-                  for (ossim_uint32 i = 0; i < points.size(); i++)
-                  {
-                     polygon.push_back(points[i]);
-                  }
-
-                  //get polygon type, if it is an internal polygon, initialize the internal cutter
-                  ossimGeoAnnotationPolyObject::ossimPolyType polyType = annoPoly->getPolyType();
-                  ossimShpFeature feature(it->first, polyType, polygon, std::vector<ossimGeoPolygon>()); 
-                  m_features.push_back(feature);
-               }
-               else if (annoMultiPoly != 0)
-               {
-                  std::vector<ossimGeoPolygon> multiPolys = annoMultiPoly->getMultiPolygon();
-                  ossimShpFeature feature(it->first, 0, std::vector<ossimGpt>(), multiPolys); 
-               }
-            }
-            it++;
-         }
-      }
-   }
-   if (m_features.size() > 0)
-   {
-      theTotalTiles = m_features.size();
-      result = true;
-   }
-   return result;
-}
-
-bool ossimTilingPoly::useMbr() const
-{
-   //if the use_mbr is set to true, no matter if the padding is set to 0 or greater than 0,
-   //always clip the MBR of each feature
-   return m_useMbr;
-}
-
-bool ossimTilingPoly::hasExteriorCut() const
-{
-   return m_exteriorCut.valid();
-}
-
-bool ossimTilingPoly::hasInteriorCut() const
-{
-   return m_interiorCut.valid();
-}
-
-ossimRefPtr<ossimGeoPolyCutter>& ossimTilingPoly::getExteriorCut()
-{
-   return m_exteriorCut;
-}
-
-ossimRefPtr<ossimGeoPolyCutter>& ossimTilingPoly::getInteriorCut()
-{
-   return m_interiorCut;
-}
-
-bool ossimTilingPoly::isFeatureBoundingIntersect() const
-{
-   return m_featureBoundingIntersect;
-}
diff --git a/src/ossim/imaging/ossimTilingRect.cpp b/src/ossim/imaging/ossimTilingRect.cpp
deleted file mode 100644
index 941692e..0000000
--- a/src/ossim/imaging/ossimTilingRect.cpp
+++ /dev/null
@@ -1,886 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Mingjie Su
-// 
-// Description: implementation for image generator
-//
-//*************************************************************************
-// $Id: ossimTilingRect.cpp 2725 2011-06-15 18:13:07Z david.burken $
-
-#include <sstream>
-#include <iomanip>
-#include <ossim/imaging/ossimTilingRect.h>
-#include <ossim/base/ossimUnitTypeLut.h>
-#include <ossim/base/ossimUnitConversionTool.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/imaging/ossimEsriShapeFileInterface.h>
-
-static ossimTrace traceDebug("ossimTilingRect:debug");
-
-RTTI_DEF1(ossimTilingRect, "ossimTilingRect", ossimTiling);
-
-ossimTilingRect::ossimTilingRect()
-      : ossimTiling(),
-      m_clipToAoi(true),
-      m_lastWidth(0),
-      m_lastHeight(0),
-      m_useOffset(false),
-      m_offsetInPixels(0,0),
-      m_tilingDistanceInPixels(0,0),
-      m_tilinResolutionDistance(ossim::nan(),ossim::nan()),
-      m_tilingResolutionUnitType(OSSIM_UNIT_UNKNOWN),
-      m_fractionalPixelMisalignment(ossim::nan(),ossim::nan())
-{
-}
-
-ossimTilingRect::~ossimTilingRect()
-{
-}
-
-bool ossimTilingRect::initializeBase(const ossimMapProjection& proj,
-   const ossimIrect& boundingRect,
-   ossimDpt& convertedTilingDistance)
-{
-   theMapProjection = (ossimMapProjection*)proj.dup();
-   theImageRect     = boundingRect;
-
-   ossimDpt gsd = theMapProjection->getMetersPerPixel();
-   // Find image center and GSD at that point:
-   if (theMapProjection->isGeographic() && theTilingDistanceUnitType != OSSIM_DEGREES)
-   {
-      ossimRefPtr<ossimImageGeometry> geom = new ossimImageGeometry (0, theMapProjection.get());
-      geom->setImageSize(ossimIpt(theImageRect.width(), theImageRect.height()));
-      gsd = geom->getMetersPerPixel();
-   }
-
-   m_tilingDistanceInPixels = theTilingDistance;
-
-   //if resolution and resolution type are defined, need to reset degree/meter per pixel and the image rect. do calculation below
-   ossim_float64 latDiff = 0.0;
-   ossim_float64 lonDiff = 0.0;
-   ossim_uint32 imageWidth = 0;
-   ossim_uint32 imageHeight = 0;
-   if (!m_tilinResolutionDistance.hasNans())
-   {
-      ossimDpt result(0,0);
-      if (m_tilingResolutionUnitType == OSSIM_DEGREES)
-      {
-         ossimGpt ulg;
-         ossimGpt llg;
-         ossimGpt lrg;
-         ossimGpt urg;
-
-         theMapProjection->lineSampleToWorld(theImageRect.ul(), ulg);
-         theMapProjection->lineSampleToWorld(theImageRect.ll(), llg);
-         theMapProjection->lineSampleToWorld(theImageRect.lr(), lrg);
-         theMapProjection->lineSampleToWorld(theImageRect.ur(), urg);
-
-         latDiff = fabs(ulg.lat - llg.lat);
-         lonDiff = fabs(urg.lon - llg.lon);
-
-         if (!theMapProjection->isGeographic())
-         {
-            ossim_float64 tileHorizatalNum = lonDiff/m_tilinResolutionDistance.x;
-            ossim_float64 tileVerticalNum = latDiff/m_tilinResolutionDistance.y;
-
-            if (theTilingDistanceUnitType != OSSIM_PIXEL) //convert tiling distance to pixel if unit type is not pixel
-            {
-               ossimDpt convertedDis = m_tilingDistanceInPixels;
-               getConvertedDistance(convertedDis, m_tilingDistanceInPixels);
-               imageWidth = (ossim_uint32)convertedDis.x/gsd.x*tileHorizatalNum;
-               imageHeight = (ossim_uint32)convertedDis.y/gsd.y*tileVerticalNum;
-            }
-            else
-            {
-               imageWidth = (ossim_uint32)m_tilingDistanceInPixels.x*tileHorizatalNum;
-               imageHeight = (ossim_uint32)m_tilingDistanceInPixels.y*tileVerticalNum;
-            }
-            result = ossimDpt(theImageRect.width()*gsd.x/imageWidth, theImageRect.height()*gsd.y/imageHeight);
-            gsd = result;
-
-            theMapProjection->setMetersPerPixel(result);
-         }
-         else
-         {
-            result = ossimDpt(m_tilinResolutionDistance.x/m_tilingDistanceInPixels.x,
-               m_tilinResolutionDistance.y/m_tilingDistanceInPixels.y);
-
-            theMapProjection->setDecimalDegreesPerPixel(result);
-         }
-      }
-      else //only handle degree type for resolution
-      {
-         return false;
-      }
-   }
-
-   if (theTilingDistanceUnitType != OSSIM_PIXEL)
-   {
-      ossimDpt paddingSize = getPaddingSize();//convert padding size to meters or degree
-      getConvertedDistance(convertedTilingDistance, theTilingDistance);
-
-      ossimDpt convertedOffset = m_offsetInPixels;
-      if (m_useOffset)
-      {
-         getConvertedDistance(convertedOffset, m_offsetInPixels);
-      }
-
-      if (theMapProjection->isGeographic() && theTilingDistanceUnitType == OSSIM_DEGREES)
-      {
-         thePaddingSizeInPixels.x = ossim::round<int>(paddingSize.x / theMapProjection->getDecimalDegreesPerPixel().x);
-         thePaddingSizeInPixels.y = ossim::round<int>(paddingSize.y / theMapProjection->getDecimalDegreesPerPixel().y);
-
-         double intpart;
-         m_fractionalPixelMisalignment.x = modf(convertedTilingDistance.x / theMapProjection->getDecimalDegreesPerPixel().x, &intpart);
-         m_fractionalPixelMisalignment.y = modf(convertedTilingDistance.y / theMapProjection->getDecimalDegreesPerPixel().y, &intpart);
-
-         m_tilingDistanceInPixels.x = ossim::round<int>(convertedTilingDistance.x / theMapProjection->getDecimalDegreesPerPixel().x);
-         m_tilingDistanceInPixels.y = ossim::round<int>(convertedTilingDistance.y / theMapProjection->getDecimalDegreesPerPixel().y);
-
-         if (m_useOffset)
-         {
-            m_offsetInPixels.x = ossim::round<int>(convertedOffset.x / theMapProjection->getDecimalDegreesPerPixel().x);
-            m_offsetInPixels.y = ossim::round<int>(convertedOffset.y / theMapProjection->getDecimalDegreesPerPixel().y);
-         }
-      }
-      else
-      {
-         thePaddingSizeInPixels.x = ossim::round<int>(paddingSize.x / gsd.x);
-         thePaddingSizeInPixels.y = ossim::round<int>(paddingSize.y / gsd.y);
-
-         double intpart;
-         m_fractionalPixelMisalignment.x = modf(convertedTilingDistance.x / gsd.x, &intpart);
-         m_fractionalPixelMisalignment.y = modf(convertedTilingDistance.y / gsd.y, &intpart);
-
-         m_tilingDistanceInPixels.x = ossim::round<int>(convertedTilingDistance.x / gsd.x);
-         m_tilingDistanceInPixels.y = ossim::round<int>(convertedTilingDistance.y / gsd.y);
-
-         if (m_useOffset)
-         {
-            m_offsetInPixels.x = ossim::round<int>(convertedOffset.x / gsd.x);
-            m_offsetInPixels.y = ossim::round<int>(convertedOffset.y / gsd.y);
-         }
-      }
-   }
-   else
-   {
-      if (theMapProjection->isGeographic())
-      {
-         theTilingDistance.x = theTilingDistance.x * theMapProjection->getDecimalDegreesPerPixel().x;
-         theTilingDistance.y = theTilingDistance.y * theMapProjection->getDecimalDegreesPerPixel().y;
-      }
-      else
-      {
-         theTilingDistance.x = theTilingDistance.x * gsd.x;
-         theTilingDistance.y = theTilingDistance.y * gsd.y;
-      }
-   }
-
-   //re-calculation the image rect if resolution and resolution type defined
-   if (!m_tilinResolutionDistance.hasNans())
-   {
-      if (theMapProjection->isGeographic())
-      {
-         imageWidth = (ossim_uint32)m_tilingDistanceInPixels.x * lonDiff;
-         imageHeight = (ossim_uint32)m_tilingDistanceInPixels.y * latDiff;
-      }
-
-      //avoid very small pixel offset by calculation if tiling distance unit type is pixel
-      if (theTilingDistanceUnitType == OSSIM_PIXEL)
-      {
-         if (imageWidth % (ossim_int32)m_tilingDistanceInPixels.x != 0)
-         {
-            ossim_int32 numX =  ossim::round<int>((double)imageWidth/m_tilingDistanceInPixels.x);
-            imageWidth = m_tilingDistanceInPixels.x * numX;
-         }
-         if (imageHeight % (ossim_int32)m_tilingDistanceInPixels.y != 0)
-         {
-            ossim_int32 numY =  ossim::round<int>((double)imageHeight/m_tilingDistanceInPixels.y);
-            imageHeight = m_tilingDistanceInPixels.y * numY;
-         }
-      }
-    
-      theImageRect = ossimIrect(boundingRect.ul(),
-         ossimIpt((boundingRect.ul().x + imageWidth), boundingRect.ul().y),
-         ossimIpt((boundingRect.ul().x + imageWidth), (imageHeight - boundingRect.ul().y)),
-         ossimIpt(boundingRect.ul().x , (imageHeight - boundingRect.ul().y)));
-   }
-   return true;
-}
-
-bool ossimTilingRect::initialize(const ossimMapProjection& proj,
-   const ossimIrect& boundingRect)
-{
-   bool result = false;
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimTilingRect::initialize DEBUG: Entered..."
-         << "\nBounding rect === " << boundingRect
-         << std::endl;
-   }
-
-   ossimDpt convertedTilingDistance = theTilingDistance;
-   result = initializeBase(proj, boundingRect, convertedTilingDistance);
-   ossimDrect tilingRectInPixels = theImageRect;
-
-   // Let's setup the bounding tile rect.
-   if(theMapProjection->isGeographic())
-   {
-      ossimGpt ul;
-      ossimGpt ur;
-      ossimGpt lr;
-      ossimGpt ll;
-
-      theMapProjection->lineSampleToWorld(theImageRect.ul(), ul);
-      theMapProjection->lineSampleToWorld(theImageRect.ur(), ur);
-      theMapProjection->lineSampleToWorld(theImageRect.lr(), lr);
-      theMapProjection->lineSampleToWorld(theImageRect.ll(), ll);
-
-      theTilingRect = ossimDrect(ossimDpt(ul), ossimDpt(ur), ossimDpt(lr), ossimDpt(ll),
-         OSSIM_RIGHT_HANDED);
-
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG: Geographic input bounds =  "
-            << theTilingRect
-            << std::endl;
-      }
-
-      if (!m_clipToAoi)
-      {
-         theTilingRect.stretchToTileBoundary(convertedTilingDistance);
-      }
-
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG: Geographic input bounds stretched =  "
-            << theTilingRect << std::endl;
-      }
-
-      clampGeographic(theTilingRect);
-
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG: Geographic input bounds clamped =  "
-            << theTilingRect << std::endl;
-      }
-
-   }  // End "if(theMapProjection->isGeographic())"
-   else // meters
-   {
-      ossimDpt ul;
-      ossimDpt ur;
-      ossimDpt lr;
-      ossimDpt ll;
-
-      theMapProjection->lineSampleToEastingNorthing(theImageRect.ul(), ul);
-      theMapProjection->lineSampleToEastingNorthing(theImageRect.ur(), ur);
-      theMapProjection->lineSampleToEastingNorthing(theImageRect.lr(), lr);
-      theMapProjection->lineSampleToEastingNorthing(theImageRect.ll(), ll);
-      theTilingRect = ossimDrect(ul, ur, lr, ll, OSSIM_RIGHT_HANDED);
-
-      if (!m_clipToAoi)
-      {
-         theTilingRect.stretchToTileBoundary(convertedTilingDistance);
-      }
-   }
-
-   theTotalHorizontalTiles = ossim::round<int>(fabs(tilingRectInPixels.ur().x - tilingRectInPixels.ul().x)/m_tilingDistanceInPixels.x);
-   theTotalVerticalTiles   = ossim::round<int>(fabs(tilingRectInPixels.ur().y - tilingRectInPixels.lr().y)/m_tilingDistanceInPixels.y);
-
-   if (m_clipToAoi)
-   {
-      if (m_useOffset)
-      {
-         ossim_float32 totalHorizontalTilesAfterOffset = 
-            ((fabs(tilingRectInPixels.ur().x - tilingRectInPixels.ul().x))-m_tilingDistanceInPixels.x)/(m_tilingDistanceInPixels.x - m_offsetInPixels.x) + 1;
-         ossim_float32 totalVerticalTilesAfterOffset = 
-            ((fabs(tilingRectInPixels.ur().y - tilingRectInPixels.lr().y))-m_tilingDistanceInPixels.y)/(m_tilingDistanceInPixels.y - m_offsetInPixels.y) + 1;
-
-         ossim_float32 lastHorizontal = totalHorizontalTilesAfterOffset - (ossim_int32)totalHorizontalTilesAfterOffset;
-         ossim_float32 lastVertical = totalVerticalTilesAfterOffset - (ossim_int32)totalVerticalTilesAfterOffset;
-
-         m_lastWidth = ossim::round<int>(fabs(lastHorizontal* (m_tilingDistanceInPixels.x - m_offsetInPixels.x) + m_offsetInPixels.x));
-         m_lastHeight = ossim::round<int>(fabs(lastVertical* (m_tilingDistanceInPixels.y - m_offsetInPixels.y) + m_offsetInPixels.y));
-
-         theTotalHorizontalTiles = ossim::round<int>(totalHorizontalTilesAfterOffset);
-         theTotalVerticalTiles = ossim::round<int>(totalVerticalTilesAfterOffset);
-
-         if (m_lastWidth > 0 && (lastHorizontal < 0.5))//if lastHorizontal is less than 0.5, the last tile will not add to total tiles after rounding, do here
-         {
-            theTotalHorizontalTiles = theTotalHorizontalTiles + 1;
-         }
-         if (m_lastHeight > 0 && (lastVertical < 0.5))
-         {
-            theTotalVerticalTiles = theTotalVerticalTiles + 1;
-         }
-      }
-      else
-      {
-         ossim_int32 tmpX = (ossim_int32)(fabs(tilingRectInPixels.ur().x - tilingRectInPixels.ul().x)) + 1;
-         ossim_int32 tmpY = (ossim_int32)(fabs(tilingRectInPixels.ur().y - tilingRectInPixels.lr().y)) + 1;
-
-         ossim_int32 modValueX = tmpX % (ossim_int32)m_tilingDistanceInPixels.x;
-         ossim_int32 modValueY = tmpY % (ossim_int32)m_tilingDistanceInPixels.y;
-         if (modValueX >= 1)
-         {
-            m_lastWidth = modValueX;
-         }
-         else
-         {
-            m_lastWidth = m_tilingDistanceInPixels.x;
-         }
-         if (modValueY >= 1)
-         {
-            m_lastHeight = modValueY;
-         }
-         else
-         {
-            m_lastHeight = m_tilingDistanceInPixels.y;
-         }
-
-         if (m_lastWidth > 0)
-         {  
-            if (m_lastWidth < m_tilingDistanceInPixels.x/2)
-            {
-               theTotalHorizontalTiles = theTotalHorizontalTiles + 1;
-            }
-         }
-         if (m_lastHeight > 0)
-         {
-            if (m_lastHeight < m_tilingDistanceInPixels.y/2)
-            {
-               theTotalVerticalTiles = theTotalVerticalTiles + 1;
-            }
-         }
-      }
-   }
-
-   theTotalTiles = theTotalHorizontalTiles*theTotalVerticalTiles;
-
-   // reset the tile id to the beginning
-   reset();
-
-   if(traceDebug())
-   {
-      print(ossimNotify(ossimNotifyLevel_DEBUG));
-
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "\nossimTiling::initialize DEBUG: Leaving..." << std::endl;
-   }
-
-   return result;
-}
-
-bool ossimTilingRect::next(ossimRefPtr<ossimMapProjection>& resultProjection,
-   ossimIrect& resultingBounds,
-   ossimString& resultingName)
-{
-   bool result = true;
-
-   if(theTileId < theTotalTiles)
-   {
-      ossimDpt origin;
-      ossim_int64 row=0;
-      ossim_int64 col=0;
-
-      getRowCol(row, col, theTileId);
-
-      getTileName(resultingName,
-         (row+1), (col+1), theTileId);
-
-      getOrigin(origin, row, col);
-
-      if (!m_fractionalPixelMisalignment.isNan())
-      {
-         if (row == 0 && col != 0)
-         {
-            if (m_fractionalPixelMisalignment.x >= 0.5)
-            {
-               if (theMapProjection->isGeographic())
-               {
-                  origin.x = origin.x + (1 - m_fractionalPixelMisalignment.x) * theMapProjection->getDecimalDegreesPerPixel().x * col;
-               }
-               else
-               {
-                  origin.x = origin.x + (1 - m_fractionalPixelMisalignment.x) * theMapProjection->getMetersPerPixel().x * col;
-               }
-            }  
-            else
-            {
-               if (theMapProjection->isGeographic())
-               {
-                  origin.x = origin.x - m_fractionalPixelMisalignment.x * theMapProjection->getDecimalDegreesPerPixel().x * col;
-               }
-               else
-               {
-                  origin.x = origin.x - m_fractionalPixelMisalignment.x * theMapProjection->getMetersPerPixel().x * col;
-               }
-            }
-         }
-         else if (col == 0 && row != 0)
-         {
-            if (m_fractionalPixelMisalignment.y >= 0.5)
-            {
-               if (theMapProjection->isGeographic())
-               {
-                  origin.y = origin.y - (1 - m_fractionalPixelMisalignment.y) * theMapProjection->getDecimalDegreesPerPixel().y * row;
-               }
-               else
-               {
-                  origin.y = origin.y - (1 - m_fractionalPixelMisalignment.y) * theMapProjection->getMetersPerPixel().y * row;
-               }
-            }
-            else
-            {
-               if (theMapProjection->isGeographic())
-               {
-                  origin.y = origin.y + m_fractionalPixelMisalignment.y * theMapProjection->getDecimalDegreesPerPixel().y * row;
-               }
-               else
-               {
-                  origin.y = origin.y + m_fractionalPixelMisalignment.y * theMapProjection->getMetersPerPixel().y * row;
-               }  
-            }
-         }
-         else if (col != 0 && row != 0)
-         {
-            if (m_fractionalPixelMisalignment.x >= 0.5)
-            {
-               if (theMapProjection->isGeographic())
-               {
-                  origin.x = origin.x + (1 - m_fractionalPixelMisalignment.x) * theMapProjection->getDecimalDegreesPerPixel().x * col;
-               }
-               else
-               {
-                  origin.x = origin.x + (1 - m_fractionalPixelMisalignment.x) * theMapProjection->getMetersPerPixel().x * col;
-               }
-            }  
-            else
-            {
-               if (theMapProjection->isGeographic())
-               {
-                  origin.x = origin.x - m_fractionalPixelMisalignment.x * theMapProjection->getDecimalDegreesPerPixel().x * col;
-               }
-               else
-               {
-                  origin.x = origin.x - m_fractionalPixelMisalignment.x * theMapProjection->getMetersPerPixel().x * col;
-               }
-            }
-
-            if (m_fractionalPixelMisalignment.y >= 0.5)
-            {
-               if (theMapProjection->isGeographic())
-               {
-                  origin.y = origin.y - (1 - m_fractionalPixelMisalignment.y) * theMapProjection->getDecimalDegreesPerPixel().y * row;
-               }
-               else
-               {
-                  origin.y = origin.y - (1 - m_fractionalPixelMisalignment.y) * theMapProjection->getMetersPerPixel().y * row;
-               }
-            }
-            else
-            {
-               if (theMapProjection->isGeographic())
-               {
-                  origin.y = origin.y + m_fractionalPixelMisalignment.y * theMapProjection->getDecimalDegreesPerPixel().y * row;
-               }
-               else
-               {
-                  origin.y = origin.y + m_fractionalPixelMisalignment.y * theMapProjection->getMetersPerPixel().y * row;
-               }  
-            }
-         }
-      }
-
-      ossimIpt pixels = ossimDpt(m_tilingDistanceInPixels.x, m_tilingDistanceInPixels.y);
-
-      if(theMapProjection->isGeographic())
-      {
-         theMapProjection->setUlTiePoints(
-            ossimGpt(origin.lat,
-            origin.lon,
-            0.0,
-            theMapProjection->origin().datum()));
-      }
-      else
-      {
-         theMapProjection->setUlTiePoints(ossimDpt(origin.x, origin.y));
-      }
-
-      if (m_clipToAoi || m_useOffset)
-      {
-         if (row == 0 && col == 0)
-         {
-            resultingBounds = ossimIrect(0, 0,
-               (pixels.x-1) + (ossim_int32)thePaddingSizeInPixels.x,
-               (pixels.y-1) + (ossim_int32)thePaddingSizeInPixels.y);
-         }
-         else if (row == 0 && col != 0)
-         {
-            if (col == (theTotalHorizontalTiles-1))
-            {
-               resultingBounds = ossimIrect(-(ossim_int32)thePaddingSizeInPixels.x, 0,
-                  (m_lastWidth-1),
-                  (pixels.y-1) + (ossim_int32)thePaddingSizeInPixels.y);
-
-               if (m_useOffset)
-               {
-                  ossim_int32 lr_x = -((ossim_int32)m_offsetInPixels.x*col)- resultingBounds.width();
-                  resultingBounds = ossimIrect(-((ossim_int32)m_offsetInPixels.x*col), 0,
-                     lr_x, (resultingBounds.height()-1));
-               }
-            }
-            else
-            {
-               resultingBounds = ossimIrect(-(ossim_int32)thePaddingSizeInPixels.x, 0,
-                  (pixels.x-1) + (ossim_int32)thePaddingSizeInPixels.x,
-                  (pixels.y-1) + (ossim_int32)thePaddingSizeInPixels.y);
-
-               if (m_useOffset)
-               {
-                  resultingBounds = ossimIrect(-((ossim_int32)m_offsetInPixels.x*col), 0,
-                     (resultingBounds.width()-1)-((ossim_int32)m_offsetInPixels.x*col), 
-                     (resultingBounds.height()-1));
-               }
-            }
-         }
-         else if (row != 0 && col == 0)
-         {
-            if (row == (theTotalVerticalTiles-1))
-            {
-               resultingBounds = ossimIrect(0, -(ossim_int32)thePaddingSizeInPixels.y,
-                  (pixels.x-1) + (ossim_int32)thePaddingSizeInPixels.x,
-                  (m_lastHeight-1));
-
-               if (m_useOffset)
-               {
-                  ossim_int32 lr_y = -((ossim_int32)m_offsetInPixels.y*row)-resultingBounds.height();
-                  resultingBounds = ossimIrect(0, -((ossim_int32)m_offsetInPixels.y*row),
-                     (resultingBounds.width()-1), lr_y);
-               }
-            }
-            else
-            {
-               resultingBounds = ossimIrect(0,
-                  -(ossim_int32)thePaddingSizeInPixels.y,
-                  (pixels.x-1) + (ossim_int32)thePaddingSizeInPixels.x,
-                  (pixels.y-1) + (ossim_int32)thePaddingSizeInPixels.y);
-
-               if (m_useOffset)
-               {
-                  resultingBounds = ossimIrect(0, -((ossim_int32)m_offsetInPixels.y*row),
-                     (resultingBounds.width()-1), 
-                     (resultingBounds.height()-1)-((ossim_int32)m_offsetInPixels.y*row));
-               }
-            }
-         }
-         else if (row != 0 && col != 0)
-         {
-            if (row == (theTotalVerticalTiles-1) && col == (theTotalHorizontalTiles-1))
-            {
-               resultingBounds = ossimIrect(-(ossim_int32)thePaddingSizeInPixels.x,
-                  -(ossim_int32)thePaddingSizeInPixels.y,
-                  (m_lastWidth-1),
-                  (m_lastHeight-1));
-
-               if (m_useOffset)
-               {
-                  ossim_int32 lr_x = -((ossim_int32)m_offsetInPixels.x*col)-resultingBounds.width();
-                  ossim_int32 lr_y = -((ossim_int32)m_offsetInPixels.y*row)-resultingBounds.height();
-                  resultingBounds = ossimIrect(-((ossim_int32)m_offsetInPixels.x*col), 
-                     -((ossim_int32)m_offsetInPixels.y*row),
-                     lr_x, lr_y);
-               }
-            }
-            else if (row != (theTotalVerticalTiles-1) && col == (theTotalHorizontalTiles-1))
-            {
-               resultingBounds = ossimIrect(-(ossim_int32)thePaddingSizeInPixels.x,
-                  -(ossim_int32)thePaddingSizeInPixels.y,
-                  (m_lastWidth-1),
-                  (pixels.y-1) + (ossim_int32)thePaddingSizeInPixels.y);
-
-               if (m_useOffset)
-               {
-                  ossim_int32 lr_x = -((ossim_int32)m_offsetInPixels.x*col)-resultingBounds.width();
-                  resultingBounds = ossimIrect(-((ossim_int32)m_offsetInPixels.x*col), 
-                     -((ossim_int32)m_offsetInPixels.y*row),
-                     lr_x, (resultingBounds.height()-1)-((ossim_int32)m_offsetInPixels.y*row));
-               }
-            }
-            else if (row == (theTotalVerticalTiles-1) && col != (theTotalHorizontalTiles-1))
-            {
-               resultingBounds = ossimIrect(-(ossim_int32)thePaddingSizeInPixels.x,
-                  -(ossim_int32)thePaddingSizeInPixels.y,
-                  (pixels.x-1) + (ossim_int32)thePaddingSizeInPixels.x,
-                  (m_lastHeight-1));
-
-               if (m_useOffset)
-               {
-                  ossim_int32 lr_y = -((ossim_int32)m_offsetInPixels.y*row)-resultingBounds.height();
-                  resultingBounds = ossimIrect(-((ossim_int32)m_offsetInPixels.x*col), 
-                     -((ossim_int32)m_offsetInPixels.y*row),
-                     (resultingBounds.width()-1)-((ossim_int32)m_offsetInPixels.x*col), 
-                     lr_y);
-               }
-            }
-            else
-            {
-               resultingBounds = ossimIrect(-(ossim_int32)thePaddingSizeInPixels.x,
-                  -(ossim_int32)thePaddingSizeInPixels.y,
-                  (pixels.x-1) + (ossim_int32)thePaddingSizeInPixels.x,
-                  (pixels.y-1) + (ossim_int32)thePaddingSizeInPixels.y);
-
-               if (m_useOffset)
-               {
-                  resultingBounds = ossimIrect(-((ossim_int32)m_offsetInPixels.x*col), 
-                     -((ossim_int32)m_offsetInPixels.y*row),
-                     (resultingBounds.width()-1)-((ossim_int32)m_offsetInPixels.x*col), 
-                     (resultingBounds.height()-1)-((ossim_int32)m_offsetInPixels.y*row));
-               }
-            }
-         }
-      }
-      else
-      {
-         resultingBounds = ossimIrect(-(ossim_int32)thePaddingSizeInPixels.x,
-            -(ossim_int32)thePaddingSizeInPixels.y,
-            (pixels.x-1) + (ossim_int32)thePaddingSizeInPixels.x,
-            (pixels.y-1) + (ossim_int32)thePaddingSizeInPixels.y);
-
-         if (m_useOffset)
-         {
-            resultingBounds = ossimIrect(-(ossim_int32)m_offsetInPixels.x, 
-               -(ossim_int32)m_offsetInPixels.y,
-               (resultingBounds.width()-1), (resultingBounds.height()-1));
-         }
-      }
-
-      if(traceDebug()&&resultProjection.valid())
-      {
-         ossimKeywordlist projKwl;
-
-         resultProjection->saveState(projKwl);
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimTilingRect::next DEBUG: rect = " << resultingBounds
-            << "\nproj                          = " << projKwl
-            << "\ntileName                      = " << resultingName
-            << "\norigin                        = " << origin << std::endl;
-      }
-
-      resultProjection = theMapProjection;
-
-      ++theTileId; 
-   }
-   else
-   {
-      result = false;
-   }
-
-   return result;
-}
-
-bool ossimTilingRect::saveState(ossimKeywordlist& kwl,
-                            const char* prefix)const
-{
-   std::stringstream tilingDistance;
-
-   tilingDistance << theTilingDistance.x << " " << theTilingDistance.y << std::endl;
-   
-   kwl.add(prefix,
-           "tile_size",
-           tilingDistance.str().c_str(),
-           true);
-
-   kwl.add(prefix,
-           "units",
-           ossimUnitTypeLut::instance()->
-           getTableIndexString(theTilingDistanceUnitType),
-           true);
-   
-   std::ostringstream padding;
-
-   padding << thePaddingSizeInPixels.x << " " << thePaddingSizeInPixels.y;
-   kwl.add(prefix,
-           "padding",
-           padding.str().c_str(),
-           true);
-
-   kwl.add(prefix,
-      "output_file_name",
-      theTileNameMask.c_str(),
-      true);
-
-   kwl.add(prefix,
-      "clip_to_aoi",
-      m_clipToAoi,
-      true);
-
-   return true;
-}
-
-bool ossimTilingRect::loadState(const ossimKeywordlist& kwl,
-                            const char* prefix)
-{
-   bool result = false;
-   
-   // Get the mask if any.
-   theTileNameMask = kwl.find(prefix, "output_file_name");
-   if (!theTileNameMask.contains("%f%")) //%f% format is used for feature id in a shape file
-   {
-      setTileNameMask(theTileNameMask);
-   }
-  
-   const char* paddingSizeInPixels = kwl.find(prefix, "padding");
-
-   if (paddingSizeInPixels)
-   {
-      ossimString x,y;
-      std::istringstream padding(ossimString(paddingSizeInPixels).c_str());
-      padding >> x >> y;
-      thePaddingSizeInPixels.x = x.toFloat64();
-      thePaddingSizeInPixels.y = y.toFloat64();
-   }
-  
-   const char* tilingDistance = kwl.find(prefix, "tile_size");
-
-   const char* tilingDistanceType = kwl.find(prefix, "units");
-   
-   result = tilingDistance&&tilingDistanceType&&paddingSizeInPixels;
-   
-   ossimString x,y;
-   std::istringstream distance(ossimString(tilingDistance).c_str());
-   distance >> x >> y;
-   theTilingDistance.x = x.toFloat64();
-   theTilingDistance.y = y.toFloat64();
-   if(theTilingDistance.x <= 0.0)
-   {
-      theTilingDistance.x = 1.0;
-   }
-   if(theTilingDistance.y<=0.0)
-   {
-      theTilingDistance.y = theTilingDistance.x;
-   }
-
-   theTilingDistanceUnitType = (ossimUnitType)
-      ossimUnitTypeLut::instance()->getEntryNumber(
-      ossimString(tilingDistanceType).c_str());
-
-   const char* clipToAoi = kwl.find(prefix, "clip_to_aoi");
-   if (clipToAoi)
-   {
-      if (!ossimString(clipToAoi).toBool())
-      {
-         m_clipToAoi = false;
-      }
-   }
-
-   const char* offset = kwl.find(prefix, "use_offset");
-   if (offset)
-   {
-      ossimString width, height;
-      std::istringstream distanceOffset(ossimString(offset).c_str());
-      distanceOffset >> width >> height;
-      m_offsetInPixels.x = width.toFloat64();
-      m_offsetInPixels.y = height.toFloat64();
-      if (m_offsetInPixels.x > 0 || m_offsetInPixels.y > 0.0)
-      {
-         m_useOffset = true;
-         result = true;
-      }
-   }
-
-   const char* tileRes = kwl.find(prefix, "resolution");
-   if (tileRes)
-   {
-      theDelta = ossimDpt(0,0);
-      x="";
-      y="";
-      std::istringstream tileResValues(ossimString(tileRes).c_str());
-      tileResValues >> x >> y;
-
-      m_tilinResolutionDistance.x = x.toFloat64();
-      m_tilinResolutionDistance.y = y.toFloat64();
-   }
- 
-   const char* tilingResType = kwl.find(prefix, "resolution_units");
-   if (tilingResType)
-   {
-      m_tilingResolutionUnitType = (ossimUnitType)
-         ossimUnitTypeLut::instance()->getEntryNumber(
-         ossimString(tilingResType).c_str());
-   }
-
-   if (traceDebug())
-   {
-      print(ossimNotify(ossimNotifyLevel_DEBUG));
-   }
-   return result;
-}
-
-ossimDpt ossimTilingRect::getPaddingSize()const
-{
-   ossimDpt result = thePaddingSizeInPixels;
-
-   if (!theMapProjection.valid())
-      return result;
-
-   if(theMapProjection->isGeographic() && theTilingDistanceUnitType == OSSIM_DEGREES)
-   {
-      return result;
-   }
-   else
-   {
-      ossimUnitConversionTool unitConverter(1.0, theTilingDistanceUnitType);
-      unitConverter.setValue(result.x, theTilingDistanceUnitType);
-      result.x = unitConverter.getValue(OSSIM_METERS);
-
-      unitConverter.setValue(result.y, theTilingDistanceUnitType);
-      result.y = unitConverter.getValue(OSSIM_METERS);
-   }
-
-   return result;
-}
-
-void ossimTilingRect::getConvertedDistance(ossimDpt& pt, ossimDpt inputDistance) const
-{
-   if (!theMapProjection)
-   {
-      // This should not happen...
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimTiling::getConvertedDistance WARNING"
-         << " projection not set!" << endl;
-      pt = inputDistance;
-      return;
-   }
-
-   if(theMapProjection->isGeographic() && theTilingDistanceUnitType == OSSIM_DEGREES)
-   {
-      pt = inputDistance;
-   }
-   else
-   {
-      ossimUnitConversionTool unitConverter(theMapProjection->origin(),
-         1.0,
-         theTilingDistanceUnitType);
-
-      unitConverter.setValue(inputDistance.x,
-         theTilingDistanceUnitType);
-      pt.x = unitConverter.getValue(OSSIM_METERS);
-
-      unitConverter.setValue(inputDistance.y,
-         theTilingDistanceUnitType);
-      pt.y = unitConverter.getValue(OSSIM_METERS);
-   }
-}
diff --git a/src/ossim/imaging/ossimTopographicCorrectionFilter.cpp b/src/ossim/imaging/ossimTopographicCorrectionFilter.cpp
deleted file mode 100644
index 6ca1849..0000000
--- a/src/ossim/imaging/ossimTopographicCorrectionFilter.cpp
+++ /dev/null
@@ -1,1297 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimTopographicCorrectionFilter.cpp 21184 2012-06-29 15:13:09Z dburken $
-#include <algorithm>
-#include <sstream>
-#include <ossim/imaging/ossimTopographicCorrectionFilter.h>
-#include <ossim/imaging/ossimImageToPlaneNormalFilter.h>
-#include <ossim/imaging/ossimScalarRemapper.h>
-#include <ossim/imaging/ossimScalarRemapper.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/matrix/newmat.h>
-#include <ossim/base/ossimMatrix3x3.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimKeywordNames.h>
-
-static const char* CORRECTION_TYPE_KW        = "correction_type";
-static const char* C_COMPUTED_FLAG_KW        = "c_computed_flag";
-static const char* NDVI_RANGE_KW             = "ndvi_range";
-
-RTTI_DEF1(ossimTopographicCorrectionFilter, "ossimTopographicCorrectionFilter", ossimImageCombiner);
-ossimTopographicCorrectionFilter::ossimTopographicCorrectionFilter()
-   :ossimImageCombiner(NULL, 2, 0, true, false),
-    theTile(NULL),
-//    theScalarRemapper(NULL),
-    theLightSourceElevationAngle(45.0),
-    theLightSourceAzimuthAngle(45.0),
-    theJulianDay(0),
-    theCComputedFlag(false),
-    theTopoCorrectionType(TOPO_CORRECTION_COSINE),
-//    theTopoCorrectionType(TOPO_CORRECTION_MINNAERT),
-    theNdviLowTest(-0.1),
-    theNdviHighTest(0.1)
-{
-//    theScalarRemapper = new ossimScalarRemapper();
-//    theScalarRemapper->setOutputScalarType(OSSIM_NORMALIZED_DOUBLE);
-//    theScalarRemapper->initialize();
-}
-
-ossimTopographicCorrectionFilter::ossimTopographicCorrectionFilter(ossimImageSource* colorSource,
-                                                                   ossimImageSource* elevSource)
-   :ossimImageCombiner(NULL, 2, 0, true, false),
-    theTile(NULL),
-    theLightSourceElevationAngle(45.0),
-    theLightSourceAzimuthAngle(45.0),
-    theJulianDay(0),
-    theCComputedFlag(false),
-    theTopoCorrectionType(TOPO_CORRECTION_COSINE),
-    theNdviLowTest(-0.1),
-    theNdviHighTest(0.1)
-{
-   connectMyInputTo(colorSource);
-   connectMyInputTo(elevSource);
-}
-
-ossimTopographicCorrectionFilter::~ossimTopographicCorrectionFilter()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimTopographicCorrectionFilter::getTile(
-   const  ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   ossimImageSource* colorSource = PTR_CAST(ossimImageSource,
-                                                     getInput(0));
-   ossimImageSource* normalSource  = PTR_CAST(ossimImageSource,
-                                                       getInput(1));
-
-   if(!isSourceEnabled()||!normalSource||!colorSource)
-   {
-      if(colorSource)
-      {
-         return colorSource->getTile(tileRect, resLevel);
-      }
-   }
-
-   if(!theTile.valid())
-   {
-      allocate();
-   }
-
-   if(!theTile)
-   {
-      return ossimRefPtr<ossimImageData>();
-   }
-
-   long w = tileRect.width();
-   long h = tileRect.height();
-   ossimIpt origin = tileRect.ul();
-
-   theTile->setOrigin(origin);
-   long tileW = theTile->getWidth();
-   long tileH = theTile->getHeight();
-   if((w != tileW)||
-      (h != tileH))
-   {
-      theTile->setWidth(w);
-      theTile->setHeight(h);
-      if((w*h)!=(tileW*tileH))
-      {
-         theTile->initialize();
-      }
-      else
-      {
-         theTile->makeBlank();
-      }
-   }
-   else
-   {
-      theTile->makeBlank();
-   }
-
-   // ossimImageData* inputTile = NULL;
-
-   ossimRefPtr<ossimImageData> normalData = normalSource->getTile(tileRect,
-                                                                  resLevel);
-
-   ossimRefPtr<ossimImageData> colorData  = colorSource->getTile(tileRect,
-                                                                 resLevel);
-
-   if(!colorData.valid() || !normalData.valid())
-   {
-      return theTile;
-   }
-
-   if((normalData->getNumberOfBands() != 3)||
-      (normalData->getScalarType() != OSSIM_DOUBLE)||
-      !normalData->getBuf()||
-      !colorData->getBuf()||
-      (colorData->getDataObjectStatus() == OSSIM_EMPTY)||
-      (normalData->getDataObjectStatus()==OSSIM_EMPTY))
-   {
-      return colorData;
-   }
-
-   executeTopographicCorrection(theTile,
-                                colorData,
-                                normalData);
-   theTile->validate();
-   return theTile;
-}
-
-void ossimTopographicCorrectionFilter::initialize()
-{
-   ossimImageCombiner::initialize();
-
-   // Force an "allocate()" on the first getTile.
-   theTile      = NULL;
-}
-
-void ossimTopographicCorrectionFilter::allocate()
-{
-   if(!getInput(0) || !getInput(1)) return;
-   theBandMapping.clear();
-   if(isSourceEnabled())
-   {
-      // ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
-
-      theTile = ossimImageDataFactory::instance()->create(this, this);
-      theTile->initialize();
-
-      int arraySize = theTile->getNumberOfBands();
-      if(theGain.size() > 0)
-      {
-         arraySize = (int)theGain.size();
-      }
-      // we will do a non destructive resize onf the arrays
-      //
-      resizeArrays(arraySize);
-
-      ossimImageSource* input1 = PTR_CAST(ossimImageSource,
-                                                   getInput(0));
-      if(input1)
-      {
-         input1->getOutputBandList(theBandMapping);
-         for(ossim_uint32 idx = 0; idx < theBandMapping.size(); ++idx)
-         {
-            if(theBias.size())
-            {
-               if(theBandMapping[idx] >= theBias.size())
-               {
-                  theBandMapping[idx] = (unsigned int)theBias.size()-1;
-               }
-            }
-            else
-            {
-               theBandMapping[idx] = 0;
-            }
-         }
-      }
-   }
-
-   computeLightDirection();
-}
-
-void ossimTopographicCorrectionFilter::computeLightDirection()
-{
-   NEWMAT::Matrix m = ossimMatrix3x3::createRotationMatrix(theLightSourceElevationAngle,
-                                                           0.0,
-                                                           theLightSourceAzimuthAngle);
-   NEWMAT::ColumnVector v(3);
-   v[0] = 0;
-   v[1] = 1;
-   v[2] = 0;
-   v = m*v;
-   // reflect Z.  We need the Z pointing up from the surface and not into it.
-   //
-   ossimColumnVector3d d(v[0], v[1], -v[2]);
-   d = d.unit();
-   theLightDirection[0] = d[0];
-   theLightDirection[1] = d[1];
-   theLightDirection[2] = d[2];
-}
-
-void ossimTopographicCorrectionFilter::executeTopographicCorrection(
-   ossimRefPtr<ossimImageData>& outputData,
-   ossimRefPtr<ossimImageData>& colorData,
-   ossimRefPtr<ossimImageData>& normalData)
-{
-   switch(colorData->getScalarType())
-   {
-   case OSSIM_UCHAR:
-   {
-      if(theTopoCorrectionType!=TOPO_CORRECTION_MINNAERT)
-      {
-         executeTopographicCorrectionTemplate((ossim_uint8)0,
-                                              outputData,
-                                              colorData,
-                                              normalData);
-      }
-      else
-      {
-         executeTopographicCorrectionMinnaertTemplate((ossim_uint8)0,
-                                                      outputData,
-                                                      colorData,
-                                                      normalData);
-      }
-      break;
-   }
-   case OSSIM_USHORT11:
-   case OSSIM_USHORT16:
-   {
-      if(theTopoCorrectionType!=TOPO_CORRECTION_MINNAERT)
-      {
-         executeTopographicCorrectionTemplate((ossim_uint16)0,
-                                              outputData,
-                                              colorData,
-                                              normalData);
-      }
-      else
-      {
-         executeTopographicCorrectionMinnaertTemplate((ossim_uint16)0,
-                                                      outputData,
-                                                      colorData,
-                                                      normalData);
-      }
-      break;
-   }
-   case OSSIM_SSHORT16:
-   {
-      if(theTopoCorrectionType!=TOPO_CORRECTION_MINNAERT)
-      {
-         executeTopographicCorrectionTemplate((ossim_sint16)0,
-                                              outputData,
-                                              colorData,
-                                              normalData);
-      }
-      else
-      {
-         executeTopographicCorrectionMinnaertTemplate((ossim_sint16)0,
-                                                      outputData,
-                                                      colorData,
-                                                      normalData);
-      }
-      break;
-   }
-   case OSSIM_DOUBLE:
-   case OSSIM_NORMALIZED_DOUBLE:
-   {
-      if(theTopoCorrectionType!=TOPO_CORRECTION_MINNAERT)
-      {
-         executeTopographicCorrectionTemplate((ossim_float64)0,
-                                              outputData,
-                                              colorData,
-                                              normalData);
-      }
-      else
-      {
-         executeTopographicCorrectionMinnaertTemplate((ossim_float64)0,
-                                                      outputData,
-                                                      colorData,
-                                                      normalData);
-      }
-      break;
-   }
-   case OSSIM_FLOAT:
-   case OSSIM_NORMALIZED_FLOAT:
-   {
-      if(theTopoCorrectionType!=TOPO_CORRECTION_MINNAERT)
-      {
-         executeTopographicCorrectionTemplate((ossim_float32)0,
-                                              outputData,
-                                              colorData,
-                                              normalData);
-      }
-      else
-      {
-         executeTopographicCorrectionMinnaertTemplate((ossim_float32)0,
-                                                      outputData,
-                                                      colorData,
-                                                      normalData);
-      }
-      break;
-   }
-   default:
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimTopographicCorrectionFilter::executeTopographicCorrection WARN: Not handling scalar type"
-         << endl;
-   }
-   }
-}
-
-template <class T>
-void ossimTopographicCorrectionFilter::executeTopographicCorrectionTemplate(
-   T /* dummy */,
-   ossimRefPtr<ossimImageData>& outputData,
-   ossimRefPtr<ossimImageData>& colorData,
-   ossimRefPtr<ossimImageData>& normalData)
-{
-   ossim_int32 y = 0;
-   ossim_int32 x = 0;
-   ossim_int32 colorW = colorData->getWidth();
-   ossim_int32 colorH = colorData->getHeight();
-
-   T* colorDataBand = 0;
-   T* outputDataBand = 0;
-   ossim_float64 colorNp = 0;
-   ossim_float64 colorMin = 0;
-   ossim_float64 colorMax = 0;
-   // ossim_float64 outputDelta = 0;;
-   // ossim_float64 outputMin = 0;
-   // ossim_float64 outputMax = 0;
-   ossim_float64 outputNp;
-   double  normalNp = normalData->getNullPix(0);
-   double  LPrime = 0.0;
-   double  LNew   = 0.0;
-   double  dn     = 0.0;
-   double cosineZenith = ossim::cosd(90 - theLightSourceElevationAngle);
-
-   if(!colorData->getBuf()||
-      !normalData->getBuf()||
-      (colorData->getDataObjectStatus() == OSSIM_EMPTY))
-   {
-      return;
-   }
-   for(ossim_uint32 b = 0; b < outputData->getNumberOfBands();++b)
-   {
-      int mappedBand = theBandMapping[b];
-      double* normalX  = (double*)normalData->getBuf(0);
-      double* normalY  = (double*)normalData->getBuf(1);
-      double* normalZ  = (double*)normalData->getBuf(2);
-      double numerator = cosineZenith + theC[mappedBand];
-      outputNp  = (ossim_float64)outputData->getNullPix(b);
-      // outputMin = (ossim_float64)outputData->getMinPix(b);
-      // outputMax = (ossim_float64)outputData->getMaxPix(b);
-      // outputDelta = outputMax - outputMin;
-      colorDataBand    = (T*)(colorData->getBuf(b));
-      colorNp          = (ossim_float64)(colorData->getNullPix(b));
-      colorMin         = (ossim_float64)(colorData->getMinPix(b));
-      colorMax         = (ossim_float64)(colorData->getMaxPix(b));
-      outputDataBand   = (T*)(outputData->getBuf(b));
-      bool theValuesAreGood = b < theC.size();
-      double c = theC[mappedBand];
-      if(theTopoCorrectionType != TOPO_CORRECTION_COSINE_C)
-      {
-         c = 0;
-      }
-      for(y = 0; y < colorH; ++y)
-      {
-         for(x = 0; x < colorW; ++x)
-         {
-            if((*colorDataBand) != colorNp)
-            {
-               if((*normalX != normalNp)&&
-                  (*normalY != normalNp)&&
-                  (*normalZ != normalNp)&&
-                  theValuesAreGood)
-               {
-
-                  double cosineNewI = ((*normalX)*theLightDirection[0] +
-                                       (*normalY)*theLightDirection[1] +
-                                       (*normalZ)*theLightDirection[2]);
-                  double cosineRatioDenom = (cosineNewI + c);
-                  if((fabs(cosineRatioDenom) > FLT_EPSILON)&&(cosineNewI >= 0.0))
-                  {
-                     double cosineRatio = numerator/cosineRatioDenom;
-
-                     LPrime = theGain[mappedBand]*((ossim_float64)(*colorDataBand)) + theBias[mappedBand];
-
-                     LNew = LPrime*cosineRatio;
-
-                     dn = ((LNew-theBias[mappedBand])/theGain[mappedBand]);
-
-                     if(dn < colorMin) dn = colorMin;
-                     if(dn > colorMax) dn = colorMax;
-
-                     *outputDataBand = (T)(dn);
-                  }
-                  else
-                  {
-                     *outputDataBand = (T)(*colorDataBand);
-                  }
-               }
-               else
-               {
-                  *outputDataBand = (T)(*colorDataBand);
-               }
-            }
-            else
-            {
-               *outputDataBand = (T)outputNp;
-            }
-
-            ++outputDataBand;
-            ++colorDataBand;
-            ++normalX;
-            ++normalY;
-            ++normalZ;
-         }
-      }
-   }
-}
-
-template <class T>
-void ossimTopographicCorrectionFilter::executeTopographicCorrectionMinnaertTemplate(
-   T /* dummy */,
-   ossimRefPtr<ossimImageData>& outputData,
-   ossimRefPtr<ossimImageData>& colorData,
-   ossimRefPtr<ossimImageData>& normalData)
-{
-
-   ossim_int32 y = 0;
-   ossim_int32 x = 0;
-   ossim_int32 colorW = colorData->getWidth();
-   ossim_int32 colorH = colorData->getHeight();
-
-   T* colorDataBand = 0;
-   T* outputDataBand = 0;
-   ossim_float64 colorNp = 0;
-   ossim_float64 colorMin = 0;
-   ossim_float64 colorMax = 0;
-   // ossim_float64 outputDelta = 0;;
-   // ossim_float64 outputMin = 0;
-   // ossim_float64 outputMax = 0;
-   ossim_float64 outputNp;
-   double  normalNp = normalData->getNullPix(0);
-   double  LPrime = 0.0;
-   double  LNew   = 0.0;
-   double  dn     = 0.0;
-
-   if(!colorData->getBuf()||
-      !normalData->getBuf()||
-      (colorData->getDataObjectStatus() == OSSIM_EMPTY))
-   {
-      return;
-   }
-   int maxBands = ossim::min((int)theK.size(), (int)outputData->getNumberOfBands());
-   for(int b = 0; b < maxBands;++b)
-   {
-      int mappedBand = theBandMapping[b];
-      double* normalX  = (double*)normalData->getBuf(0);
-      double* normalY  = (double*)normalData->getBuf(1);
-      double* normalZ  = (double*)normalData->getBuf(2);
-      outputNp  = (ossim_float64)outputData->getNullPix(b);
-      // outputMin = (ossim_float64)outputData->getMinPix(b);
-      // outputMax = (ossim_float64)outputData->getMaxPix(b);
-      // outputDelta = outputMax - outputMin;
-      colorDataBand    = (T*)(colorData->getBuf(b));
-      colorNp          = (ossim_float64)(colorData->getNullPix(b));
-      colorMin         = (ossim_float64)(colorData->getMinPix(b));
-      colorMax         = (ossim_float64)(colorData->getMaxPix(b));
-      outputDataBand   = (T*)(outputData->getBuf(b));
-      for(y = 0; y < colorH; ++y)
-      {
-         for(x = 0; x < colorW; ++x)
-         {
-            if((*colorDataBand) != colorNp)
-            {
-               if((*normalX != normalNp)&&
-                  (*normalY != normalNp)&&
-                  (*normalZ != normalNp))
-               {
-
-//                   if(fabs(*normalZ) < FLT_EPSILON)
-//                   {
-//                      *normalZ = 0.0;
-//                   }
-                  double cosineNewI = (((*normalX)*theLightDirection[0] +
-                                        (*normalY)*theLightDirection[1] +
-                                        (*normalZ)*theLightDirection[2]));
-                  double slopeAngle = acos(*normalZ);
-                  double cosineSlope = cos(slopeAngle);
-                  double k  = theK[mappedBand];
-                  double cosineSlopeKPower = pow(cosineSlope, k);
-                  double denom = pow((double)cosineNewI, k)*cosineSlopeKPower;
-                  double numerator = cosineSlope;
-
-//                  double slopeAngle = asin(*normalZ);
-//                  double tempK = theK[mappedBand]*cosineNewI;
-//                double denom = pow((double)cosineNewI*cosineSlope, theK[mappedBand]);
-//                  double numerator = pow((double)cosineSlope, 1-tempK);
-//                  if((fabs(denom) > .0001)&&(cosineNewI >= 0.0))
-//                  if((cosineNewI >= 0.0) &&fabs(denom) > .000001)
-                  if(fabs(denom) > .00000001)
-                  {
-//                     double cosineRatio = cosineSlope/denom;
-                     double cosineRatio = numerator/denom;
-
-                     LPrime = theGain[mappedBand]*((ossim_float64)(*colorDataBand)) + theBias[mappedBand];
-
-                     LNew = LPrime*cosineRatio;
-
-                     dn = ((LNew-theBias[mappedBand])/theGain[mappedBand]);
-
-                     if(dn < colorMin) dn = colorMin;
-                     if(dn > colorMax) dn = colorMax;
-
-                     *outputDataBand = (T)(dn);
-                  }
-                  else
-                  {
-                     *outputDataBand = (T)(*colorDataBand);
-                  }
-               }
-               else
-               {
-                  *outputDataBand = (T)(*colorDataBand);
-               }
-            }
-            else
-            {
-               *outputDataBand = (T)outputNp;
-            }
-
-            ++outputDataBand;
-            ++colorDataBand;
-            ++normalX;
-            ++normalY;
-            ++normalZ;
-         }
-      }
-   }
-}
-
-
-#if 0
-void ossimTopographicCorrectionFilter::computeC()
-{
-   theCComputedFlag = false;
-   int b = 0;
-   int tileCount = 0;
-   bool done = false;
-   if(theC.size()<1) return;
-
-   for(b = 0; b < (int) theC.size(); ++b)
-   {
-      theC[b] = 0.0;
-   }
-
-
-   theNdviLowTest  = 0.1;
-   theNdviHighTest = 1;
-
-   ossimImageSource* colorSource  = PTR_CAST(ossimImageSource, getInput(0));
-   ossimImageSource* normalSource = PTR_CAST(ossimImageSource, getInput(1));
-
-   if(!colorSource || !normalSource)
-   {
-      return;
-   }
-   std::vector<ossim2dLinearRegression> linearRegression(theC.size());
-   ossimIrect normalRect = normalSource->getBoundingRect();
-   ossimIrect colorRect  = colorSource->getBoundingRect();
-   ossimIrect clipRect   = normalRect.clipToRect(colorRect);
-   ossimIpt ul = clipRect.ul();
-   ossimIpt lr = clipRect.lr();
-   ossimIpt tileSize(128,128);
-   ossim_int32 tilesHoriz = clipRect.width()/tileSize.x;
-   ossim_int32 tilesVert  = clipRect.height()/tileSize.y;
-
-
-   if(!normalRect.intersects(colorRect))
-   {
-      return;
-   }
-   ossim_int32 maxSize = tilesHoriz*tilesVert;//ossim::min(200, );
-
-   int idx = 0;
-
-   idx = 0;
-   std::vector<int> cosineIBucketCount(10);
-   std::fill(cosineIBucketCount.begin(), cosineIBucketCount.end(), 0);
-   const int maxBucketCount = 1000;
-   bool goodCoefficients = false;
-   long numberOfRuns = 0;
-   while((!goodCoefficients)&&(numberOfRuns < 2))
-   {
-      while((idx < maxSize)&&
-            (!done))
-      {
-         ossim_int32 ty = idx/tilesHoriz;
-         ossim_int32 tx = idx%tilesHoriz;
-
-
-         ossim_int32 x = (ul.x + tx*tileSize.x);
-         ossim_int32 y = (ul.y + ty*tileSize.y);
-
-         ossimIrect requestRect(x,
-                                y,
-                                x+tileSize.x-1,
-                                y+tileSize.y-1);
-
-         ossimRefPtr<ossimImageData> colorData  = colorSource->getTile(requestRect);
-         ossimRefPtr<ossimImageData> normalData = normalSource->getTile(requestRect);
-
-         switch(colorData->getScalarType())
-         {
-         case OSSIM_UCHAR:
-         {
-            addRegressionPointsTemplate((ossim_uint8)0,
-                                        linearRegression, cosineIBucketCount, maxBucketCount, colorData, normalData);
-            break;
-         }
-         case OSSIM_USHORT11:
-         case OSSIM_USHORT16:
-         {
-            addRegressionPointsTemplate((ossim_uint16)0,
-                                        linearRegression, cosineIBucketCount, maxBucketCount, colorData, normalData);
-            break;
-         }
-         case OSSIM_SSHORT16:
-         {
-            addRegressionPointsTemplate((ossim_sint16)0,
-                                        linearRegression, cosineIBucketCount, maxBucketCount, colorData, normalData);
-            break;
-         }
-         case OSSIM_FLOAT:
-         case OSSIM_NORMALIZED_FLOAT:
-         {
-            addRegressionPointsTemplate((ossim_float32)0,
-                                        linearRegression, cosineIBucketCount, maxBucketCount, colorData, normalData);
-            break;
-         }
-         case OSSIM_DOUBLE:
-         case OSSIM_NORMALIZED_DOUBLE:
-         {
-            addRegressionPointsTemplate((ossim_float64)0,
-                                        linearRegression, cosineIBucketCount, maxBucketCount, colorData, normalData);
-            break;
-         }
-         }
-         if(((double)linearRegression[0].getNumberOfPoints()/(double)(maxBucketCount*10.0))>=.7)
-         {
-            done = true;
-         }
-         ++idx;
-      }
-
-      double intercept, m;
-      long numberOfPositiveSlopes=0;
-      for(b=0;b<theC.size();++b)
-      {
-         if(linearRegression[b].getNumberOfPoints()>2)
-         {
-            linearRegression[b].solve();
-            linearRegression[b].getEquation(m, intercept);
-            theC[b] = intercept/m;
-
-            ossimNotify(ossimNotifyLevel_INFO) << "equation for b = " << b <<" is y = " << m << "*x + " << intercept << endl
-                                               << "with c =         " << theC[b] << endl;
-            if(m >=0.0)
-            {
-               numberOfPositiveSlopes++;
-            }
-         }
-      }
-      for(idx = 0; idx < cosineIBucketCount.size(); ++idx)
-      {
-         ossimNotify(ossimNotifyLevel_INFO) << "bucket " << idx << " = " << cosineIBucketCount[idx] << endl;
-      }
-      if(numberOfPositiveSlopes > .5*theC.size())
-      {
-         goodCoefficients = true;
-      }
-      else
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << "ossimTopographicCorrectionFilter::computeC() WARN: not enough positive slopes" << endl
-                                             << "changing test to look for dirt areas" << endl;
-         theNdviLowTest = -1.0;
-         theNdviHighTest = .1;
-         for(b=0;b<theC.size();++b)
-         {
-            linearRegression[b].clear();
-         }
-      }
-      ++numberOfRuns;
-   }
-   theCComputedFlag = true;
-}
-
-template<class T>
-void ossimTopographicCorrectionFilter::addRegressionPointsTemplate(
-   T, //dummy
-   std::vector<ossim2dLinearRegression>& regressionPoints,
-   std::vector<int>& cosineIBucketCount,
-   ossim_int32 maxCountPerBucket,
-   ossimRefPtr<ossimImageData>& colorData,
-   ossimRefPtr<ossimImageData>& normalData)
-{
-   if(!colorData||!normalData)
-   {
-      return;
-   }
-   if((colorData->getDataObjectStatus() == OSSIM_EMPTY)||
-      (!colorData->getBuf())||
-      (!normalData->getBuf())||
-      (normalData->getDataObjectStatus()==OSSIM_EMPTY))
-   {
-      return;
-   }
-
-   ossim_float64* normalBands[3];
-   ossim_float64 normalBandsNp[3];
-   ossim_uint32 count=0;
-   ossim_uint32 b = 0;
-   std::vector<T*> colorBands(colorData->getNumberOfBands());
-   std::vector<T> colorBandsNp(colorData->getNumberOfBands());
-
-   normalBands[0]   = (ossim_float64*)normalData->getBuf(0);
-   normalBands[1]   = (ossim_float64*)normalData->getBuf(1);
-   normalBands[2]   = (ossim_float64*)normalData->getBuf(2);
-   normalBandsNp[0] = normalData->getNullPix(0);
-   normalBandsNp[1] = normalData->getNullPix(1);
-   normalBandsNp[2] = normalData->getNullPix(2);
-
-   for(b=0;b<colorData->getNumberOfBands();++b)
-   {
-      colorBands[b]   = (T*)colorData->getBuf(b);
-      colorBandsNp[b] = (T)colorData->getNullPix(b);
-   }
-
-   ossim_uint32 maxOffset = colorData->getWidth()*colorData->getHeight();
-   ossim_uint32 offset=0;
-   ossim_float64 ndviTest=0.0;
-   ossim_uint32 numberOfTests = 0;
-   if(maxOffset)
-   {
-      maxOffset-=1;
-   }
-
-   ossim_int32 percent = (ossim_int32)(colorData->getWidth()*colorData->getHeight()*.2);
-   offset = 0;
-   ossim_uint32 countPixels = 0;
-   while(offset < maxOffset)
-   {
-      bool nullBandsExist = false;
-      for(b = 0; ((b < colorData->getNumberOfBands())&&(!nullBandsExist));++b)
-      {
-         if(*colorBands[b] == colorBandsNp[b])
-         {
-            nullBandsExist = true;
-         }
-      }
-
-      if((!nullBandsExist)&&
-         (*normalBands[0] != normalBandsNp[0])&&
-         (*normalBands[1] != normalBandsNp[1])&&
-         (*normalBands[2] != normalBandsNp[2]))
-      {
-         if(computeNdvi((T)0,
-                        ndviTest,
-                        offset,
-                        colorBands))
-         {
-            if((ndviTest >= theNdviLowTest) && (ndviTest <= theNdviHighTest))
-            {
-               double cosineI = ((*(normalBands[0]+offset))*theLightDirection[0] +
-                                 (*(normalBands[1]+offset))*theLightDirection[1] +
-                                 (*(normalBands[2]+offset))*theLightDirection[2]);
-               if(cosineI >= 0.0)
-               {
-                  long bucketIdx = (long)(cosineI*cosineIBucketCount.size());
-
-                  // we will try to disperse the normals out and so we don't clump everything
-                  // in one place
-                  //
-                  if(cosineIBucketCount[bucketIdx] < maxCountPerBucket)
-                  {
-                     for(b = 0; b < colorData->getNumberOfBands();++b)
-                     {
-                        regressionPoints[b].addPoint(ossimDpt(cosineI, *(colorBands[b]+offset)));
-                     }
-                     ++cosineIBucketCount[bucketIdx];
-                     ++count;
-                  }
-               }
-            }
-         }
-      }
-      ++offset;
-   }
-}
-#endif
-
-template <class T> bool ossimTopographicCorrectionFilter::computeNdvi(
-   T,
-   ossim_float64& result,
-   ossim_uint32 offset,
-   const std::vector<T*>& bands)const
-{
-   if(bands.size() > 3)
-   {
-      result = (((double)*(bands[3]+offset) - (double)*(bands[2]+offset))/
-                ((double)*(bands[3]+offset) + (double)*(bands[2]+offset)));
-      return true;
-   }
-
-   return false;
-}
-
-void ossimTopographicCorrectionFilter::resizeArrays(ossim_uint32 newSize)
-{
-  if(!getInput(0) || !getInput(1)) return;
-
-
-   vector<double> tempC    = theC;
-   vector<double> tempK    = theK;
-   vector<double> tempBias = theBias;
-   vector<double> tempGain = theGain;
-
-   theC.resize(newSize);
-   theK.resize(newSize);
-   theBias.resize(newSize);
-   theGain.resize(newSize);
-   ossim_uint32 tempIdx = 0;
-   if(tempC.size() > 0 && (theC.size() > 0))
-   {
-      int numberOfElements = ossim::min((int)tempC.size(),(int)theC.size());
-
-      std::copy(tempC.begin(), tempC.begin()+numberOfElements,
-                theC.begin());
-      std::copy(tempK.begin(), tempK.begin()+numberOfElements,
-                theK.begin());
-      std::copy(tempBias.begin(), tempBias.begin()+numberOfElements,
-                theBias.begin());
-      std::copy(tempGain.begin(), tempGain.begin()+numberOfElements,
-                theGain.begin());
-
-      if(theC.size() > tempC.size())
-      {
-         std::fill(theC.begin()+numberOfElements, theC.end(), (double)0.0);
-         std::fill(theBias.begin()+numberOfElements, theBias.end(), (double)0.0);
-         std::fill(theGain.begin()+numberOfElements, theGain.end(), (double)1.0);
-         for(tempIdx = numberOfElements; tempIdx < theK.size(); ++tempIdx)
-         {
-            theK[tempIdx] = 0.3 + .4*(tempIdx/(double)(theK.size()));
-         }
-      }
-   }
-   else
-   {
-      std::fill(theC.begin(), theC.end(), (double)0.0);
-      std::fill(theBias.begin(), theBias.end(), (double)0.0);
-      std::fill(theGain.begin(), theGain.end(), (double)1.0);
-      for(tempIdx = 0; tempIdx < theK.size(); ++tempIdx)
-      {
-         theK[tempIdx] = 0.3 + .4*(tempIdx/(double)(theK.size()));
-      }
-   }
-}
-
-bool ossimTopographicCorrectionFilter::loadState(const ossimKeywordlist& kwl,
-                                                 const char* prefix)
-{
-
-   ossimString elevAngle      = kwl.find(prefix, ossimKeywordNames::ELEVATION_ANGLE_KW);
-   ossimString azimuthAngle   = kwl.find(prefix, ossimKeywordNames::AZIMUTH_ANGLE_KW);
-   ossimString bands          = kwl.find(prefix, ossimKeywordNames::NUMBER_BANDS_KW);
-   ossimString correctionType = kwl.find(prefix, CORRECTION_TYPE_KW);
-   ossimString julianDay      = kwl.find(prefix, ossimKeywordNames::JULIAN_DAY_KW);
-   ossimString cComputedFlag  = kwl.find(prefix, C_COMPUTED_FLAG_KW);
-   ossimString ndviRange      = kwl.find(prefix, NDVI_RANGE_KW);
-
-   theCComputedFlag = cComputedFlag.toBool();
-   correctionType = correctionType.downcase();
-   int numberOfBands = bands.toInt();
-   theLightSourceElevationAngle = elevAngle.toDouble();
-   theLightSourceAzimuthAngle   = azimuthAngle.toDouble();
-   theJulianDay = julianDay.toDouble();
-
-   if(ndviRange != "")
-   {
-      std::istringstream input(ndviRange.c_str());
-
-      input >> theNdviLowTest >> theNdviHighTest;
-   }
-   if(numberOfBands>0)
-   {
-     theGain.resize(numberOfBands);
-     theBias.resize(numberOfBands);
-     theC.resize(numberOfBands);
-     theK.resize(numberOfBands);
-      for(int b = 0; b < numberOfBands; ++b)
-      {
-         ossimString k    = "k"+ossimString::toString(b);
-         ossimString c    = "c"+ossimString::toString(b);
-         ossimString bias = "bias"+ossimString::toString(b);
-         ossimString gain = "gain"+ossimString::toString(b);
-
-         const char* kValue    = kwl.find(prefix, k);
-         const char* cValue    = kwl.find(prefix, c);
-         const char* biasValue = kwl.find(prefix, bias);
-         const char* gainValue = kwl.find(prefix, gain);
-	 if(kValue)
-	   {
-	     theK[b] = ossimString(kValue).toDouble();
-	   }
-	 else
-	   {
-	     theK[b] = 1.0;
-	   }
-         if(cValue)
-         {
-            theC[b] = ossimString(cValue).toDouble();
-         }
-         else
-         {
-            theC[b] = 0.0;;
-         }
-         if(biasValue)
-         {
-            theBias[b] = ossimString(biasValue).toDouble();
-         }
-         else
-         {
-            theBias[b] = 0.0;
-         }
-         if(gainValue)
-         {
-            theGain[b] = ossimString(gainValue).toDouble();
-         }
-         else
-         {
-            theGain[b] = 1.0;
-         }
-      }
-   }
-
-   if(correctionType.contains("cosine_c"))
-   {
-      theTopoCorrectionType = TOPO_CORRECTION_COSINE_C;
-   }
-   else if(correctionType.contains("minnaert"))
-   {
-      theTopoCorrectionType = TOPO_CORRECTION_MINNAERT;
-   }
-   else
-   {
-      theTopoCorrectionType = TOPO_CORRECTION_COSINE;
-   }
-
-
-   bool result =  ossimImageCombiner::loadState(kwl, prefix);
-
-   computeLightDirection();
-
-   return result;
-}
-
-bool ossimTopographicCorrectionFilter::saveState(ossimKeywordlist& kwl,
-                                                 const char* prefix)const
-{
-   // we can use any of the arrays theC, theBias, or theGain since
-   // they mirror the number of input bands
-   //
-   int numberOfBands = (int)theC.size();
-
-   kwl.add(prefix,
-           ossimKeywordNames::NUMBER_BANDS_KW,
-           numberOfBands,
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::ELEVATION_ANGLE_KW,
-           theLightSourceElevationAngle,
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::AZIMUTH_ANGLE_KW,
-           theLightSourceAzimuthAngle,
-           true);
-
-   kwl.add(prefix,
-           C_COMPUTED_FLAG_KW,
-           (ossim_uint32)theCComputedFlag,
-           true);
-   kwl.add(prefix,
-           NDVI_RANGE_KW,
-           ossimString::toString(theNdviLowTest) +
-           " " + ossimString::toString(theNdviHighTest),
-           true);
-
-   if(theTopoCorrectionType == TOPO_CORRECTION_COSINE_C)
-   {
-      kwl.add(prefix,
-              CORRECTION_TYPE_KW,
-              "cosine_c",
-              true);
-   }
-   else if(theTopoCorrectionType == TOPO_CORRECTION_MINNAERT)
-   {
-      kwl.add(prefix,
-              CORRECTION_TYPE_KW,
-              "minnaert",
-              true);
-   }
-   else
-   {
-      kwl.add(prefix,
-              CORRECTION_TYPE_KW,
-              "cosine",
-              true);
-   }
-
-   for(int b = 0; b < numberOfBands; ++b)
-   {
-      ossimString k    = "k"+ossimString::toString(b);
-      ossimString c    = "c"+ossimString::toString(b);
-      ossimString bias = "bias"+ossimString::toString(b);
-      ossimString gain = "gain"+ossimString::toString(b);
-      kwl.add(prefix,
-              k,
-              theK[b],
-              true);
-      kwl.add(prefix,
-              c,
-              theC[b],
-              true);
-      kwl.add(prefix,
-              bias,
-              theBias[b],
-              true);
-      kwl.add(prefix,
-              gain,
-              theGain[b],
-              true);
-   }
-
-   return ossimImageCombiner::saveState(kwl, prefix);
-}
-
-ossim_uint32 ossimTopographicCorrectionFilter::getNumberOfOutputBands() const
-{
-   ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
-   if(colorSource)
-   {
-      return colorSource->getNumberOfOutputBands();
-   }
-   return ossimImageCombiner::getNumberOfOutputBands();
-}
-
-ossimScalarType ossimTopographicCorrectionFilter::getOutputScalarType() const
-{
-   ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
-   if(colorSource)
-   {
-      return colorSource->getOutputScalarType();
-   }
-   return ossimImageCombiner::getOutputScalarType();
-}
-
-double ossimTopographicCorrectionFilter::getNullPixelValue(ossim_uint32 band)const
-{
-   ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
-   if(colorSource)
-   {
-      return colorSource->getNullPixelValue(band);
-   }
-   return ossimImageCombiner::getNullPixelValue(band);
-}
-
-double ossimTopographicCorrectionFilter::getMinPixelValue(ossim_uint32 band)const
-{
-   ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
-   if(colorSource)
-   {
-      return colorSource->getMinPixelValue(band);
-   }
-   return ossimImageCombiner::getMinPixelValue(band);
-}
-
-double ossimTopographicCorrectionFilter::getMaxPixelValue(ossim_uint32 band)const
-{
-   ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
-   if(colorSource)
-   {
-      return colorSource->getMaxPixelValue(band);
-   }
-   return ossimImageCombiner::getMaxPixelValue(band);
-}
-
-ossimIrect ossimTopographicCorrectionFilter::getBoundingRect(ossim_uint32 resLevel)const
-{
-   ossimIrect result;
-   result.makeNan();
-   ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
-
-   if(colorSource)
-   {
-      result = colorSource->getBoundingRect(resLevel);
-   }
-
-   return result;
-}
-
-void ossimTopographicCorrectionFilter::getDecimationFactor(ossim_uint32 resLevel,
-                                                           ossimDpt& result) const
-{
-   result.makeNan();
-   ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
-
-   if(colorSource)
-   {
-      colorSource->getDecimationFactor(resLevel,
-                                       result);
-   }
-}
-
-void ossimTopographicCorrectionFilter::getDecimationFactors(vector<ossimDpt>& decimations) const
-{
-   ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
-   if(colorSource)
-   {
-      colorSource->getDecimationFactors(decimations);
-   }
-}
-
-ossim_uint32 ossimTopographicCorrectionFilter::getNumberOfDecimationLevels()const
-{
-   ossimImageSource* colorSource = PTR_CAST(ossimImageSource, getInput(0));
-   if(colorSource)
-   {
-      return colorSource->getNumberOfDecimationLevels();
-   }
-   return 0;
-}
-
-double ossimTopographicCorrectionFilter::getAzimuthAngle()const
-{
-   return theLightSourceAzimuthAngle;
-}
-
-double ossimTopographicCorrectionFilter::getElevationAngle()const
-{
-   return theLightSourceElevationAngle;
-}
-
-void ossimTopographicCorrectionFilter::setAzimuthAngle(double angle)
-{
-   theLightSourceAzimuthAngle = angle;
-}
-
-void ossimTopographicCorrectionFilter::setElevationAngle(double angle)
-{
-   theLightSourceElevationAngle = angle;
-}
-bool ossimTopographicCorrectionFilter::canConnectMyInputTo(ossim_int32 inputIndex,
-                                                           const ossimConnectableObject* object)const
-{
-   return (object&&
-           ( (inputIndex>=0) && inputIndex < 2)&&
-           PTR_CAST(ossimImageSource, object));
-
-}
-
-void ossimTopographicCorrectionFilter::connectInputEvent(ossimConnectionEvent& /* event */)
-{
-   initialize();
-}
-
-void ossimTopographicCorrectionFilter::disconnectInputEvent(ossimConnectionEvent& /* event */)
-{
-   initialize();
-}
-
-void ossimTopographicCorrectionFilter::propertyEvent(ossimPropertyEvent& /* event */)
-{
-   initialize();
-}
-
-void ossimTopographicCorrectionFilter::refreshEvent(ossimRefreshEvent& /* event */)
-{
-   initialize();
-}
-
-ossimTopographicCorrectionFilter::ossimTopoCorrectionType ossimTopographicCorrectionFilter::getTopoCorrectionType()const
-{
-   return theTopoCorrectionType;
-}
-
-void ossimTopographicCorrectionFilter::setTopoCorrectionType(ossimTopoCorrectionType topoType)
-{
-   theTopoCorrectionType = topoType;
-}
-
-const std::vector<double>& ossimTopographicCorrectionFilter::getGainValues()const
-{
-   return theGain;
-}
-
-void ossimTopographicCorrectionFilter::setGainValues(const std::vector<double>& gainValues)
-{
-   theGain = gainValues;
-}
-
-const vector<double>& ossimTopographicCorrectionFilter::getBiasValues()const
-{
-   return theBias;
-}
-
-void ossimTopographicCorrectionFilter::setBiasValues(const std::vector<double>& biasValues)
-{
-   theBias = biasValues;
-}
-
-const vector<double>& ossimTopographicCorrectionFilter::getKValues()const
-{
-   return theK;
-}
-
-double ossimTopographicCorrectionFilter::getK(int idx)const
-{
-   if(idx < (int)theK.size())
-   {
-      return theK[idx];
-   }
-   else
-   {
-      return 1.0;
-   }
-}
-
-void ossimTopographicCorrectionFilter::setK(int idx, double value)
-{
-   if(idx < (int)theK.size())
-   {
-      theK[idx] = value;
-   }
-}
-
-void ossimTopographicCorrectionFilter::setKValues(const vector<double>& kValues)
-{
-   theK = kValues;
-}
-
-double ossimTopographicCorrectionFilter::getC(int idx)const
-{
-   if(idx < (int)theC.size())
-   {
-      return theC[idx];
-   }
-   else
-   {
-      return 0.0;
-   }
-}
-
-void ossimTopographicCorrectionFilter::setC(int idx, double value)
-{
-   if(idx < (int)theC.size())
-   {
-      theC[idx] = value;
-   }
-}
-
-void ossimTopographicCorrectionFilter::setCValues(const vector<double>& cValues)
-{
-   theC = cValues;
-}
diff --git a/src/ossim/imaging/ossimTrimFilter.cpp b/src/ossim/imaging/ossimTrimFilter.cpp
deleted file mode 100644
index 0de08f7..0000000
--- a/src/ossim/imaging/ossimTrimFilter.cpp
+++ /dev/null
@@ -1,357 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimTrimFilter.cpp 9094 2006-06-13 19:12:40Z dburken $
-#include <ossim/imaging/ossimTrimFilter.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimNumericProperty.h>
-#include <ossim/base/ossimDpt.h>
-
-static ossimTrace traceDebug("ossimTrimFilter:debug");
-
-RTTI_DEF1(ossimTrimFilter,
-          "ossimTrimFilter",
-          ossimImageSourceFilter);
-
-ossimTrimFilter::ossimTrimFilter()
-   :ossimImageSourceFilter(),
-    theLeftPercent(0.0),
-    theRightPercent(0.0),
-    theTopPercent(0.0),
-    theBottomPercent(0.0)
-{
-   theCutter = new ossimPolyCutter;
-}
-
-ossimTrimFilter::~ossimTrimFilter()
-{
-   theCutter = 0;
-}
-
-ossimRefPtr<ossimImageData> ossimTrimFilter::getTile(
-   const ossimIrect& rect,
-   ossim_uint32 resLevel)
-{
-   if(!theInputConnection)
-   {
-      return NULL;
-   }
-
-   if(!theValidVertices.size())
-   {
-      return ossimImageSourceFilter::getTile(rect, resLevel);
-   }
-   
-   ossimRefPtr<ossimImageData> tile =
-      theCutter->getTile(rect, resLevel);
-
-   if(!isSourceEnabled()||!tile.valid())
-   {
-      return tile;
-   }
-   if(tile->getDataObjectStatus() == OSSIM_NULL ||
-      tile->getDataObjectStatus() == OSSIM_EMPTY)
-   {
-      return tile;
-   }
-
-   return theCutter->getTile(rect, resLevel);
-//    theTile->setImageRectangle(rect);
-//    theTile->setDataObjectStatus(OSSIM_FULL);
-
-//    theTile->makeBlank();
-//    ossimIrect boundingRect = getBoundingRect(resLevel);
-//    ossimIrect tileRect     = tile->getImageRectangle();
-//    ossimIrect clipRect     = boundingRect.clipToRect(tileRect);
-
-//    theTile->loadTile(tile->getBuf(),
-//                      tile->getImageRectangle(),
-//                      clipRect,
-//                      OSSIM_BSQ);
-   
-//    theTile->validate();
-   
-}
-
-void ossimTrimFilter::getValidImageVertices(
-   vector<ossimIpt>& validVertices,
-   ossimVertexOrdering ordering,
-   ossim_uint32 resLevel)const
-{
-   ossimImageSource::getValidImageVertices(validVertices,
-                                           ordering,
-                                           resLevel);
-   if(validVertices.size()==4)
-   {
-      ossimDpt averagePt((ossimDpt(validVertices[0])+
-                          ossimDpt(validVertices[1])+
-                          ossimDpt(validVertices[2])+
-                          ossimDpt(validVertices[3]))*.25);
-      ossimDpt averageTop( ( ossimDpt(validVertices[0]+
-                                      validVertices[1])*.5) );
-      ossimDpt averageBottom( ( ossimDpt(validVertices[2]+
-                                         validVertices[3])*.5 ) );
-      ossimDpt averageLeft( (ossimDpt(validVertices[0]+
-                                      validVertices[3])*.5) );
-      ossimDpt averageRight( (ossimDpt(validVertices[1]+
-                                       validVertices[2])*.5) );
-
-      ossimDpt topAxis    = (averageTop-averagePt);
-      ossimDpt rightAxis = (averageRight-averagePt);
-      ossimDpt leftAxis  = (averageLeft-averagePt);
-      ossimDpt bottomAxis = (averageBottom-averagePt);
-
-      double topLen    = topAxis.length();
-      double bottomLen = bottomAxis.length();
-      double rightLen  = rightAxis.length();
-      double leftLen   = leftAxis.length();
-
-      if((topLen > FLT_EPSILON)&&
-         (bottomLen > FLT_EPSILON)&&
-         (leftLen > FLT_EPSILON)&&
-         (rightLen > FLT_EPSILON))
-      {
-         topAxis    = topAxis*(1.0/topLen);
-         bottomAxis = bottomAxis*(1.0/bottomLen);
-         leftAxis   = leftAxis*(1.0/leftLen);
-         rightAxis  = rightAxis*(1.0/rightLen);
-
-         ossim_uint32 idx = 0;
-         ossim_uint32 count = 0;
-         for(idx = 0; idx < validVertices.size(); ++idx)
-         {
-            ossimDpt axis[2];
-            double   axisLen[2];
-            ossimDpt diff  = validVertices[idx]-averagePt;
-            double testLen = (topAxis.x*diff.x+
-                              topAxis.y*diff.y);
-            count = 0;
-            if(testLen >= -FLT_EPSILON)
-            {
-               axis[count]    = topAxis;
-               axisLen[count] = testLen*(1.0-theTopPercent);
-               ++count;
-            }
-
-            if(count < 2)
-            {
-               testLen = (bottomAxis.x*diff.x+
-                          bottomAxis.y*diff.y);
-               if(testLen >= -FLT_EPSILON)
-               {
-                  axis[count]    = bottomAxis;
-                  axisLen[count] = testLen*(1.0-theBottomPercent);
-                  ++count;
-               }
-            }
-            if(count < 2)
-            {
-               testLen = (leftAxis.x*diff.x+
-                          leftAxis.y*diff.y);
-               if(testLen >= -FLT_EPSILON)
-               {
-                  axis[count]    = leftAxis;
-                  axisLen[count] = testLen*(1.0-theLeftPercent);
-                  ++count;
-               }
-            }
-            if(count < 2)
-            {
-               testLen = (rightAxis.x*diff.x+
-                          rightAxis.y*diff.y);
-               if(testLen >= -FLT_EPSILON)
-               {
-                  axis[count]    = rightAxis;
-                  axisLen[count] = testLen*(1.0-theRightPercent);
-                  ++count;
-               }
-            }
-            if(count == 2)
-            {
-               validVertices[idx] = (averagePt + (axis[0]*axisLen[0] +
-                                                  axis[1]*axisLen[1]));
-            }
-         }
-      }
-   }
-//    ossimIrect rect = getBoundingRect();
-
-//    if(ordering == OSSIM_CLOCKWISE_ORDER)
-//    {
-//       validVertices.push_back(rect.ul());
-//       validVertices.push_back(rect.ur());
-//       validVertices.push_back(rect.lr());
-//       validVertices.push_back(rect.ll());
-//    }
-//    else
-//    {
-//       validVertices.push_back(rect.ul());
-//       validVertices.push_back(rect.ll());
-//       validVertices.push_back(rect.lr());
-//       validVertices.push_back(rect.ur());
-//    }
-}
-
-ossimIrect ossimTrimFilter::getBoundingRect(ossim_uint32 resLevel)const
-{
-
-   vector<ossimIpt> validVertices;
-   ossimIrect result;
-   result.makeNan();
-   getValidImageVertices(validVertices, OSSIM_CLOCKWISE_ORDER, resLevel);
-   
-   if(validVertices.size())
-   {
-      result = ossimIrect(validVertices);
-   }
-
-   return result;
-}
-
-void ossimTrimFilter::initialize()
-{
-   if(theInputConnection)
-   {
-      theCutter->disconnectMyInput(0, false, false);
-      if(getInput())
-      {
-         theCutter->connectMyInputTo(0, getInput());
-      }
-      theCutter->initialize();
-      getValidImageVertices(theValidVertices);
-      theCutter->setNumberOfPolygons(1);
-      theCutter->setPolygon(theValidVertices);
-   }
-}
-
-bool ossimTrimFilter::saveState(ossimKeywordlist& kwl,
-                                const char* prefix)const
-{
-   kwl.add(prefix,
-           "left_percent",
-           theLeftPercent,
-           true);
-   kwl.add(prefix,
-           "right_percent",
-           theRightPercent,
-           true);
-   kwl.add(prefix,
-           "top_percent",
-           theTopPercent,
-           true);
-   kwl.add(prefix,
-           "bottom_percent",
-           theBottomPercent,
-           true);
-
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
-
-bool ossimTrimFilter::loadState(const ossimKeywordlist& kwl,
-                                const char* prefix)
-{
-   const char* leftPerc   = kwl.find(prefix, "left_percent");
-   const char* rightPerc  = kwl.find(prefix, "right_percent");
-   const char* topPerc    = kwl.find(prefix, "top_percent");
-   const char* bottomPerc = kwl.find(prefix, "bottom_percent");
-
-   if(leftPerc)
-   {
-      theLeftPercent = ossimString(leftPerc).toDouble();
-   }
-   if(rightPerc)
-   {
-      theRightPercent = ossimString(rightPerc).toDouble();
-   }
-   if(topPerc)
-   {
-      theTopPercent = ossimString(topPerc).toDouble();
-   }
-   if(bottomPerc)
-   {
-      theBottomPercent = ossimString(bottomPerc).toDouble();
-   }
-   
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
-
-ossimRefPtr<ossimProperty> ossimTrimFilter::getProperty(const ossimString& name)const
-{
-   ossimProperty* prop = 0;
-   if(name == "left_percent")
-   {
-      prop = new ossimNumericProperty(name,
-                                      ossimString::toString(theLeftPercent),
-                                      0.0, 1.0);
-      prop->setFullRefreshBit();
-   }
-   else if(name == "right_percent")
-   {
-      prop = new ossimNumericProperty(name,
-                                      ossimString::toString(theRightPercent),
-                                      0.0, 1.0);
-      prop->setFullRefreshBit();
-   }
-   else if(name == "top_percent")
-   {
-      prop = new ossimNumericProperty(name,
-                                      ossimString::toString(theTopPercent),
-                                      0.0, 1.0);
-      prop->setFullRefreshBit();
-   }
-   else if(name == "bottom_percent")
-   {
-      prop = new ossimNumericProperty(name,
-                                      ossimString::toString(theBottomPercent),
-                                      0.0, 1.0);
-      prop->setFullRefreshBit();
-   }
-
-   if(prop) return prop;
-   
-   return ossimImageSourceFilter::getProperty(name);
-}
-
-void ossimTrimFilter::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property.valid())return;
-   ossimString name = property->getName();
-   
-   if(name == "left_percent")
-   {
-      theLeftPercent = property->valueToString().toDouble();
-   }
-   else if(name == "right_percent")
-   {
-      theRightPercent = property->valueToString().toDouble();
-   }
-   else if(name == "top_percent")
-   {
-      theTopPercent = property->valueToString().toDouble();
-   }
-   else if(name == "bottom_percent")
-   {
-      theBottomPercent = property->valueToString().toDouble();
-   }
-   else
-   {
-      return ossimImageSourceFilter::setProperty(property);
-   }
-}
-
-void ossimTrimFilter::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   propertyNames.push_back("left_percent");
-   propertyNames.push_back("right_percent");
-   propertyNames.push_back("top_percent");
-   propertyNames.push_back("bottom_percent");
-}
diff --git a/src/ossim/imaging/ossimTwoColorView.cpp b/src/ossim/imaging/ossimTwoColorView.cpp
deleted file mode 100644
index 92f61c1..0000000
--- a/src/ossim/imaging/ossimTwoColorView.cpp
+++ /dev/null
@@ -1,420 +0,0 @@
-//-------------------------------------------------------------------
-// License:  LGPL.  See top level LICENSE.txt file.
-//
-// Author:  Garrett Potts
-//
-//-------------------------------------------------------------------
-//  $Id$
-
-#include <ossim/imaging/ossimTwoColorView.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-
-RTTI_DEF1(ossimTwoColorView,
-          "ossimTwoColorView" ,
-          ossimImageCombiner);
-
-ossimTwoColorView::ossimTwoColorView()
-   :
-   ossimImageCombiner(0, 2, 0, true, false) ,
-   m_byPassFlag(true),
-   m_nativeFlag(false),
-   m_newInput(0),
-   m_oldInput(0),
-   m_newInputBandIndex(0),
-   m_oldInputBandIndex(0),
-   m_redSource(ossimTwoColorView::OLD),
-   m_grnSource(ossimTwoColorView::NEW),
-   m_bluSource(ossimTwoColorView::NEW)
-{
-}
-
-ossim_uint32 ossimTwoColorView::getNumberOfOutputBands() const
-{
-   if(m_byPassFlag||!isSourceEnabled())
-   {
-      return ossimImageCombiner::getNumberOfOutputBands();
-   }
-   return 3;
-}
-
-ossimScalarType ossimTwoColorView::getOutputScalarType() const
-{
-   if(m_byPassFlag||!isSourceEnabled())
-   {
-      return ossimImageCombiner::getOutputScalarType();
-   }
-   return OSSIM_UINT8;
-}
-
-void ossimTwoColorView::setBandIndexMapping(
-   ossim_uint32 oldInputBandIndex,
-   ossim_uint32 newInputBandIndex,
-   ossimTwoColorMultiViewOutputSource redOutputSource,
-   ossimTwoColorMultiViewOutputSource grnOutputSource,
-   ossimTwoColorMultiViewOutputSource bluOutputSource)
-{
-   m_oldInputBandIndex = oldInputBandIndex;
-   m_newInputBandIndex = newInputBandIndex;
-   m_redSource = redOutputSource;
-   m_grnSource = grnOutputSource;
-   m_bluSource = bluOutputSource;
-}
-
-double ossimTwoColorView::getNullPixelValue(ossim_uint32 band)const
-{
-   if(m_byPassFlag||!isSourceEnabled())
-   {
-      return ossimImageCombiner::getNullPixelValue(band);
-   }
-   return 0;
-}
-
-double ossimTwoColorView::getMinPixelValue(ossim_uint32 band)const
-{
-   if(m_byPassFlag||!isSourceEnabled())
-   {
-      return ossimImageCombiner::getMinPixelValue(band);
-   }
-   return 1;
-}
-
-double ossimTwoColorView::getMaxPixelValue(ossim_uint32 band)const
-{
-   if(m_byPassFlag||!isSourceEnabled())
-   {
-      return ossimImageCombiner::getMaxPixelValue(band);
-   }
-   return 256;
-}
-
-ossimRefPtr<ossimImageData> ossimTwoColorView::getTile(const ossimIrect& rect,
-                                                       ossim_uint32 resLevel)
-{
-   ossim_uint32 tileIdx = 0;
-   if(m_byPassFlag||!isSourceEnabled())
-   {
-      return getNextTile(tileIdx, 0, rect, resLevel);
-   }
-   if(!m_twoColorTile.valid())
-   {
-      allocate();
-   }
-   if(!m_twoColorTile.valid())
-   {
-      return m_twoColorTile;
-   }
-   m_twoColorTile->setImageRectangle(rect);
-   m_twoColorTile->makeBlank();
-   
-   ossimRefPtr<ossimImageData> newData = m_newInput->getTile(rect, resLevel);
-   ossimRefPtr<ossimImageData> oldData = m_oldInput->getTile(rect, resLevel);
-
-   runAlgorithm(newData.get(), oldData.get());
-
-   m_twoColorTile->validate();
-
-   return m_twoColorTile;
-}
-void ossimTwoColorView::runAlgorithm(ossimImageData* newData, ossimImageData* oldData)
-{
-   if(m_nativeFlag)
-   {
-      runNative8(newData, oldData);
-   }
-   else 
-   {
-      runNorm(newData, oldData);
-   }
-}
-
-void ossimTwoColorView::runNative8(ossimImageData* newData, ossimImageData* oldData)
-{
-   if ( newData && oldData && m_twoColorTile.valid() &&
-        ( m_twoColorTile->getNumberOfBands() == 3 ) )
-   {
-      // old, new, red, green, blue buffers...
-      ossim_uint8* o = static_cast<ossim_uint8*>( oldData->getBuf(m_oldInputBandIndex) );
-      ossim_uint8* n = static_cast<ossim_uint8*>( newData->getBuf(m_newInputBandIndex) );
-      ossim_uint8* r = static_cast<ossim_uint8*>( m_twoColorTile->getBuf(0) );
-      ossim_uint8* g = static_cast<ossim_uint8*>( m_twoColorTile->getBuf(1) );
-      ossim_uint8* b = static_cast<ossim_uint8*>( m_twoColorTile->getBuf(2) );
-
-      if ( o && n && r && g && b )
-      {
-         // Assuming null pix of 0 for 8 bit.
-         const ossim_uint8 MP = 1;
-         const ossim_uint8 NP = 0;
-
-         ossim_uint8 newPix = 0;
-         ossim_uint8 oldPix = 0;
-         
-         const ossim_uint32 MAX_IDX = m_twoColorTile->getSizePerBand();
-         
-         for(ossim_uint32 idx = 0; idx < MAX_IDX; ++idx)
-         {
-            if( ( *n == NP ) && ( *o == NP ) )
-            {
-               // Both inputs null, set all outputs null.
-               *r = NP;
-               *b = NP;
-               *g = NP;
-            }
-            else 
-            {
-               // At least one input is not null.
-               newPix = (*n != NP) ? *n : MP;
-               oldPix = (*o != NP) ? *o : MP;
-
-               // Set red, OLD is default so check first:
-               if ( m_redSource == ossimTwoColorView::OLD )
-               {
-                  *r = oldPix;
-               }
-               else if ( m_redSource == ossimTwoColorView::NEW )
-               {
-                  *r = newPix;
-               }
-               else
-               {
-                  *r = MP;
-               }
-
-               // Set green, NEW is default so check first:
-               if ( m_grnSource == ossimTwoColorView::NEW )
-               {
-                  *g = newPix;
-               }
-               else if ( m_grnSource == ossimTwoColorView::OLD )
-               {
-                  *g = oldPix;
-               }
-               else
-               {
-                  *g = MP;
-               }
-
-               // Set blue, NEW is default so check first:
-               if ( m_grnSource == ossimTwoColorView::NEW )
-               {
-                  *b = newPix;
-               }
-               else if ( m_grnSource == ossimTwoColorView::OLD )
-               {
-                  *b = oldPix;
-               }
-               else
-               {
-                  *b = MP;
-               }
-            }
-
-            // Next pixel:
-            ++n;
-            ++o;
-            ++r;
-            ++g;
-            ++b;
-         }
-      }
-   }
-}
-
-void ossimTwoColorView::runNorm(ossimImageData* newData, ossimImageData* oldData)
-{
-   if ( newData && oldData && m_twoColorTile.valid() &&
-        ( m_twoColorTile->getNumberOfBands() == 3 ) )
-   {
-      const ossim_uint32 MAX_IDX = m_twoColorTile->getSizePerBand();
-      
-      // Buffers for normalized oldData and newData tiles.
-      std::vector<ossim_float32> oldDataBuffer(MAX_IDX);
-      std::vector<ossim_float32> newDataBuffer(MAX_IDX);
-
-      // old and new input buffers.
-      ossim_float32* o = &oldDataBuffer.front();      
-      ossim_float32* n = &newDataBuffer.front();
-
-      // Normalize/copy to buffers.
-      newData->copyTileBandToNormalizedBuffer(m_newInputBandIndex, n);
-      oldData->copyTileBandToNormalizedBuffer(m_oldInputBandIndex, o);
-      
-      // Get the output buffers.
-      ossim_uint8* r = static_cast<ossim_uint8*>( m_twoColorTile->getBuf(0) );
-      ossim_uint8* g = static_cast<ossim_uint8*>( m_twoColorTile->getBuf(1) );
-      ossim_uint8* b = static_cast<ossim_uint8*>( m_twoColorTile->getBuf(2) );
-
-      if ( o && n && r && g && b )
-      {
-         // Assuming null pix of 0 for 8 bit.
-         const ossim_uint8 MP = 1;
-         const ossim_uint8 NP = 0;
-
-         ossim_uint8   newPix = 0;
-         ossim_uint8   oldPix = 0;
-         ossim_float32 tmpPix = 0.0;
-         
-         const ossim_uint32 MAX_IDX = m_twoColorTile->getSizePerBand();
-         
-         for(ossim_uint32 idx = 0; idx < MAX_IDX; ++idx)
-         {
-            if( ( *n == NP ) && ( *o == NP ) )
-            {
-               // Both inputs null, set all outputs null.
-               *r = NP;
-               *b = NP;
-               *g = NP;
-            }
-            else 
-            {
-               // At least one input is not null.
-               
-               // Set the newPix:
-               if ( *n != NP )
-               {
-                  // Un-normalize:
-                  tmpPix = (*n) * 255.0;
-
-                  // Clamp to min/max.
-                  tmpPix = (tmpPix <= 255.0) ? ( (tmpPix >= 1.0) ? tmpPix : 1.0) : 255.0;
-
-                  // Copy
-                  newPix = static_cast<ossim_uint8>( tmpPix );
-               }
-               else
-               {
-                  newPix = MP;
-               }
-
-               // Set the oldPix:
-               if ( *o != NP )
-               {
-                  // Un-normalize:
-                  tmpPix = (*o) * 255.0;
-
-                  // Clamp to min/max.
-                  tmpPix = (tmpPix <= 255.0) ? ( (tmpPix >= 1.0) ? tmpPix : 1.0) : 255.0;
-
-                  // Copy
-                  oldPix = static_cast<ossim_uint8>( tmpPix );
-               }
-               else
-               {
-                  oldPix = MP;
-               }
-
-               // Set red, OLD is default so check first:
-               if ( m_redSource == ossimTwoColorView::OLD )
-               {
-                  *r = oldPix;
-               }
-               else if ( m_redSource == ossimTwoColorView::NEW )
-               {
-                  *r = newPix;
-               }
-               else
-               {
-                  *r = MP;
-               }
-
-               // Set green, NEW is default so check first:
-               if ( m_grnSource == ossimTwoColorView::NEW )
-               {
-                  *g = newPix;
-               }
-               else if ( m_grnSource == ossimTwoColorView::OLD )
-               {
-                  *g = oldPix;
-               }
-               else
-               {
-                  *g = MP;
-               }
-
-               // Set blue, NEW is default so check first:
-               if ( m_grnSource == ossimTwoColorView::NEW )
-               {
-                  *b = newPix;
-               }
-               else if ( m_grnSource == ossimTwoColorView::OLD )
-               {
-                  *b = oldPix;
-               }
-               else
-               {
-                  *b = MP;
-               }
-            }
-
-            // Next pixel:
-            ++n;
-            ++o;
-            ++r;
-            ++g;
-            ++b;
-         }
-      }
-   }
-}
-
-void ossimTwoColorView::allocate()
-{
-   m_twoColorTile = ossimImageDataFactory::instance()->create(this, this);
-   if(m_twoColorTile.valid())
-   {
-      m_twoColorTile->initialize();
-   }
-}
-
-
-void ossimTwoColorView::initialize()
-{
-   ossimImageCombiner::initialize();
-   m_newInput = 0;
-   m_oldInput = 0;
-   m_twoColorTile = 0;
-   m_nativeFlag = false;
-   m_byPassFlag = false;
-
-   if(getNumberOfInputs() < 2)
-   {
-      m_byPassFlag = true;
-   }
-   else 
-   {
-      m_oldInput = dynamic_cast<ossimImageSource*>( getInput(0) );
-      m_newInput = dynamic_cast<ossimImageSource*>( getInput(1) );
-
-      //---
-      // Range check band selection. This can be set from setBandIndexMapping method which
-      // does no error checking because inputs may not be set.
-      //----
-      if ( m_oldInput.valid() )
-      {
-         if ( m_oldInputBandIndex >= m_oldInput->getNumberOfOutputBands() )
-         {
-            m_oldInputBandIndex = 0;
-         }
-      }
-      
-      if ( m_newInput.valid() )
-      {
-         if ( m_newInputBandIndex >= m_newInput->getNumberOfOutputBands() )
-         {
-            m_newInputBandIndex = 0;
-         }
-      }
-         
-      if(!m_newInput||!m_oldInput)
-      {
-         m_byPassFlag = true;
-      }
-      else
-      {
-         if((m_newInput->getOutputScalarType() == OSSIM_UINT8)&&
-            (m_oldInput->getOutputScalarType() == OSSIM_UINT8))
-         {
-            m_nativeFlag = true;
-         }
-      }
-   }
-}
diff --git a/src/ossim/imaging/ossimUsgsDemTileSource.cpp b/src/ossim/imaging/ossimUsgsDemTileSource.cpp
deleted file mode 100644
index 75ed1a8..0000000
--- a/src/ossim/imaging/ossimUsgsDemTileSource.cpp
+++ /dev/null
@@ -1,574 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description:
-//
-// Contains class declaration for ossimUsgsDemTileSource.
-//
-//********************************************************************
-// $Id: ossimUsgsDemTileSource.cpp 19640 2011-05-25 15:58:00Z oscarkramer $
-
-#include <iostream>
-#include <fstream>
-#include <ossim/imaging/ossimUsgsDemTileSource.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-#include <ossim/imaging/ossimTiffTileSource.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/support_data/ossimDemHeader.h>
-#include <ossim/support_data/ossimDemProfile.h>
-#include <ossim/support_data/ossimDemGrid.h>
-#include <ossim/support_data/ossimDemUtil.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/imaging/ossimImageGeometryRegistry.h>
-
-RTTI_DEF1(ossimUsgsDemTileSource, "ossimUsgsDemTileSource", ossimImageHandler)
-
-// Static trace for debugging
-static ossimTrace traceDebug("ossimUsgsDemTileSource:debug");
-
-static const char DEM_TYPE_KW[] = "dem_type";
-static const char USGS_DEM_KW[] = "usgs_dem";
-
-
-ossimUsgsDemTileSource::ossimUsgsDemTileSource()
-   :
-      ossimImageHandler(),
-      theDem(0),
-      theTile(0),
-      theNullValue(0.0),
-      theMinHeight(0.0),
-      theMaxHeight(0.0),
-      theFeetFlag(false),
-      theIsDemFlag(false),
-      theScalarType(OSSIM_SINT16)
-{
-   // Construction not complete.  Users should call "open" method.
-}
-
-ossimUsgsDemTileSource::~ossimUsgsDemTileSource()
-{
-   if (theDem)
-   {
-      delete theDem;
-      theDem = 0;
-   }
-   theTile = 0;
-}
-
-ossimRefPtr<ossimImageData> ossimUsgsDemTileSource::getTile(
-   const  ossimIrect& tile_rect, ossim_uint32 resLevel)
-{
-   if (theTile.valid())
-   {
-      // Image rectangle must be set prior to calling getTile.
-      theTile->setImageRectangle(tile_rect);
-      
-      if ( getTile( theTile.get(), resLevel ) == false )
-      {
-         if (theTile->getDataObjectStatus() != OSSIM_NULL)
-         {
-            theTile->makeBlank();
-         }
-      }
-   }
-   
-   return theTile;
-}
-
-bool ossimUsgsDemTileSource::getTile(ossimImageData* result,
-                                     ossim_uint32 resLevel)
-{
-   bool status = false;
-
-   //---
-   // Not open, this tile source bypassed, or invalid res level,
-   // return a blank tile.
-   //---
-   if( isOpen() && isSourceEnabled() && isValidRLevel(resLevel) &&
-       result && (result->getNumberOfBands() == getNumberOfOutputBands()) )
-   {
-      result->ref(); // Increment ref count.
-
-      //---
-      // Check for overview tile.  Some overviews can contain r0 so always
-      // call even if resLevel is 0.  Method returns true on success, false
-      // on error.
-      //---
-      status = getOverviewTile(resLevel, result);
-      
-      if (status) // From old code.  Not sure if still needed.
-      {
-         result->setMinPix(theTile->getMinPix(), theTile->getNumberOfBands());
-         result->setMaxPix(theTile->getMaxPix(), theTile->getNumberOfBands());
-         result->setNullPix(theTile->getNullPix(), theTile->getNumberOfBands());
-      }
-      
-      if (!status) // Did not get an overview tile.
-      {
-         status = true;
-         
-         ossimIrect tile_rect = result->getImageRectangle();
-         
-         ossimIrect image_rect = getImageRectangle(resLevel);
-         
-         //---
-         // See if any point of the requested tile is in the image.
-         //---
-         if ( tile_rect.intersects(image_rect) )
-         {
-            ossimIrect clip_rect = tile_rect.clipToRect(image_rect);
-            
-            if ( !tile_rect.completely_within(clip_rect) )
-            {
-               // Start with a blank tile.
-               result->makeBlank();
-            }
-            
-            // Load the tile buffer with data from the dem cell.
-            if (theScalarType == OSSIM_FLOAT32)
-            {
-               status = fillBuffer(ossim_float32(0.0),
-                                   tile_rect,
-                                   clip_rect,
-                                   result);
-            }
-            else
-            {
-               status = fillBuffer(ossim_sint16(0),
-                                   tile_rect,
-                                   clip_rect,
-                                   result);
-            }
-            if (status == true)
-            {
-               result->validate();
-            }
-         }    
-         else // No intersection:  if ( tile_rect.intersects(image_rect) )
-         {
-            result->makeBlank();
-         }
-      }
-
-      result->unref(); // Decrement ref count.
-   }
-
-   return status;
-}
-
-//*******************************************************************
-// Private Method:
-//*******************************************************************
-template <class T>
-bool ossimUsgsDemTileSource::fillBuffer(T,
-                                        const ossimIrect& tile_rect,
-                                        const ossimIrect& clip_rect,
-                                        ossimImageData* tile)
-{
-   const uint32 TILE_WIDTH = tile->getWidth();
-
-   T* d = static_cast<T*>(tile->getBuf());
-   
-   ossim_float32 spatialResZ = theDem->getHeader().getSpatialResZ();
-   if (spatialResZ == 0.0) spatialResZ = 1.0;
-
-   // Compute the starting offset.
-   uint32 offset = (clip_rect.ul().y - tile_rect.ul().y) * TILE_WIDTH +
-                   clip_rect.ul().x - tile_rect.ul().x;
-
-   for (int32 line = clip_rect.ul().y; line <= clip_rect.lr().y; ++line)
-   {
-      // Loop in the longitude or sample direction.
-      int samp_offset = 0;
-      for (int32 samp = clip_rect.ul().x; samp <= clip_rect.lr().x; ++samp)
-      {
-         ossim_float32 p = theDem->getElevation(samp, line);
-         if (p != theNullValue)
-         {
-            p *= spatialResZ;
-            if (theFeetFlag) p = p * MTRS_PER_FT;
-         }
-         d[offset + samp_offset] = static_cast<T>(p);
-         ++samp_offset;
-      }
-      offset += TILE_WIDTH;
-   }
-
-   return true;
-}
-
-ossimIrect
-ossimUsgsDemTileSource::getImageRectangle(ossim_uint32 reduced_res_level) const
-{
-   return ossimIrect(0,
-                     0,
-                     getNumberOfSamples(reduced_res_level) - 1,
-                     getNumberOfLines(reduced_res_level)   - 1);
-}
-
-bool ossimUsgsDemTileSource::open()
-{
-   static const char MODULE[] = "ossimUsgsDemTileSource::open";
-
-   if (traceDebug())
-   {
-      CLOG << "DEBUG:"
-           << "\nAttempting to parse file:  " << theImageFile.c_str()
-           << std::endl;
-   }
-
-   theIsDemFlag = ossimDemUtil::isUsgsDem(theImageFile);
-
-   if (theIsDemFlag)
-   {
-      // Open up the file for reading.
-      std::ifstream is(theImageFile.c_str(),
-                       std::ios_base::in | std::ios_base::binary);
-      if (is.good())
-      {
-         // Start out with a fresh dem.
-         if (theDem) delete theDem;
-         
-         //---
-         // Set the null to -32768.  This will also be the missing data values.
-         //---
-         theNullValue = OSSIM_DEFAULT_NULL_PIX_SINT16;
-         
-         //---
-         // Read the dem.
-         // 
-         // NOTE:  This defines the missing data value.  It should be the
-         // same as null for mosaicing and min/max calculations.
-         //---
-         theDem = new ossimDemGrid(theNullValue);
-         theDem->read(is);
-         
-         is.close();
-      }
-      else
-      {
-         theIsDemFlag = false;
-      }
-   }
-   
-   if (theIsDemFlag)
-   {
-      theFeetFlag  = (theDem->getHeader().getElevationUnits() == 1) ?
-         true : false;
-      
-      theMinHeight = theFeetFlag ? theDem->getHeader().getMinimumElev() *
-         MTRS_PER_FT : theDem->getHeader().getMinimumElev();
-      theMaxHeight = theFeetFlag ? theDem->getHeader().getMaximumElev() *
-         MTRS_PER_FT : theDem->getHeader().getMaximumElev();
-      
-      completeOpen();
-      
-      //---
-      // Set up the tiles.  Note the blank tile will not get initialized to
-      // save memory.  This includes setting the min and max pixel value
-      // gathered from the statistics.
-      //---
-      theTile = ossimImageDataFactory::instance()->create(this, this);
-      theTile->initialize();
-      
-      if (traceDebug())
-      {
-         CLOG << setiosflags(ios::fixed) << setprecision(5) << "DEBUG:"
-              << "\nNull pix:  " << (theTile->getNullPix(0))
-              << "\nMin  pix:  " << (theTile->getMinPix(0))
-              << "\nMax  pix:  " << (theTile->getMaxPix(0))
-              << "\nlines:     " << theDem->getHeight()
-              << "\nsamples:   " << theDem->getWidth()
-              << std::endl;
-      }
-   }
-
-   return theIsDemFlag;
-}
-
-bool ossimUsgsDemTileSource::saveState(ossimKeywordlist& kwl,
-                                       const char* prefix) const
-{
-   // Save of the dem type keyword.
-   kwl.add(prefix, DEM_TYPE_KW, USGS_DEM_KW, true);
-
-   // Save the scalar type.
-   kwl.add(prefix,
-           ossimKeywordNames::SCALAR_TYPE_KW,
-           ossimScalarTypeLut::instance()->getEntryString(theScalarType));
-   
-   return ossimImageHandler::saveState(kwl, prefix);
-}
-
-bool ossimUsgsDemTileSource::loadState(const ossimKeywordlist& kwl,
-                                       const char* prefix)
-{
-   if (ossimImageHandler::loadState(kwl, prefix))
-   {
-      //***
-      // Look for "dem_type: usgs_dem" key value pair.
-      // Note:  If not in the keyword list the "open" will look for it on
-      //        disk.
-      //***
-      const char* lookup = kwl.find(prefix, DEM_TYPE_KW);
-      if (lookup)
-      {
-         ossimString s = lookup;
-         s.downcase();
-         if (s == USGS_DEM_KW) theIsDemFlag = true;
-      }
-
-      //---
-      // Look for scalar type override.
-      //
-      // Note: We only allow float or signed 16 bit.
-      //---
-      lookup = kwl.find(prefix, ossimKeywordNames::SCALAR_TYPE_KW);
-      if (lookup)
-      {
-         ossimScalarType st =
-            static_cast<ossimScalarType>(ossimScalarTypeLut::instance()->
-                                         getEntryNumber(lookup));
-         if ( (st == OSSIM_FLOAT32) || (st == OSSIM_SINT16))
-         {
-            theScalarType = st;
-         }
-         else
-         {
-            if (traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << "ossimUsgsDemTileSource::loadState WARNING:"
-                  << "\nInvalid scalar type: "
-                  << ossimScalarTypeLut::instance()->
-                  getEntryString(st)
-                  << std::endl;
-            }
-         }
-      }
-
-      if (open())
-      {
-         return true;
-      }
-   }
-
-   return false;
-}
-
-ossimRefPtr<ossimImageGeometry> ossimUsgsDemTileSource::getImageGeometry()
-{
-   if ( !theGeometry )
-   {
-      // Check for external geom:
-      theGeometry = getExternalImageGeometry();
-
-      if ( !theGeometry )
-      {
-         // Check the internal geometry first to avoid a factory call.
-         theGeometry = getInternalImageGeometry();
-
-         // At this point it is assured theGeometry is set.
-
-         //---
-         // WARNING:
-         // Must create/set theGeometry at this point or the next call to
-         // ossimImageGeometryRegistry::extendGeometry will put us in an infinite loop
-         // as it does a recursive call back to ossimImageHandler::getImageGeometry().
-         //---         
-
-         // Check for set projection.
-         if ( !theGeometry->getProjection() )
-         {
-            // Try factories for projection.
-            ossimImageGeometryRegistry::instance()->extendGeometry(this);
-         }
-      }
-
-      // Set image things the geometry object should know about.
-      initImageParameters( theGeometry.get() );
-   }
-
-   return theGeometry;
-}
-
-
-ossimRefPtr<ossimImageGeometry> ossimUsgsDemTileSource::getInternalImageGeometry() const
-{
-   ossimRefPtr<ossimImageGeometry> geom = new ossimImageGeometry();
-   
-   if (theDem)
-   {
-      const ossimDemHeader HDR = theDem->getHeader();
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimUsgsDemTileSource::getInternalImageGeometry DEBUG:"
-            << "\nDEM Header:"
-            << std::endl;
-         HDR.print(ossimNotify(ossimNotifyLevel_DEBUG));
-      }
-      
-      // The DEM's image geometry is a map projection, obtained here via KWL:
-      ossimKeywordlist proj_kwl;
-      if ( HDR.getImageGeometry(proj_kwl) ) 
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "ossimUsgsDemTileSource::getInternalImageGeometry DEBUG:"
-               << "keyword list:\n" << proj_kwl
-               << std::endl;
-         }
-         
-         // Capture for next time.
-         ossimRefPtr<ossimProjection> proj =
-            ossimProjectionFactoryRegistry::instance()->
-            createProjection(proj_kwl);
-         if ( proj.valid() )
-         {
-            geom->setProjection(proj.get());
-         }
-      }
-   }
-   
-   return geom;
-}
-
-ossimScalarType ossimUsgsDemTileSource::getOutputScalarType() const
-{
-   return theScalarType;
-}
-
-ossim_uint32 ossimUsgsDemTileSource::getTileWidth() const
-{
-   return ( theTile.valid() ? theTile->getWidth() : 0 );
-}
-
-ossim_uint32 ossimUsgsDemTileSource::getTileHeight() const
-{
-   return ( theTile.valid() ? theTile->getHeight() : 0 );
-}
-
-ossim_uint32 ossimUsgsDemTileSource::getNumberOfLines(ossim_uint32 reduced_res_level) const
-{
-   if (reduced_res_level == 0)
-   {
-      if (theDem)
-      {
-         return theDem->getHeight();
-      }
-      else
-      {
-         cerr << "ossimUsgsDemTileSource::getNumberOfLines ERROR:"
-              << "\nNot initialized!" << std::endl;
-         return 0;
-      }
-   }
-   else if (theOverview.valid())
-   {
-      return theOverview->getNumberOfLines(reduced_res_level);
-   }
-
-   return 0;
-}
-
-ossim_uint32 ossimUsgsDemTileSource::getNumberOfSamples(ossim_uint32 reduced_res_level) const
-{
-   if (reduced_res_level == 0)
-   {
-      if (theDem)
-      {
-         return theDem->getWidth();
-      }
-      else
-      {
-         cerr << "ossimUsgsDemTileSource::getNumberOfSamples ERROR:"
-              << "\nNot initialized!" << std::endl;
-         return 0;
-      }
-   }
-   else if (theOverview.valid())
-   {
-      return theOverview->getNumberOfSamples(reduced_res_level);
-   }
-
-   return 0;
-}
-
-ossim_uint32 ossimUsgsDemTileSource::getImageTileWidth() const
-{
-   return 0;
-}
-
-ossim_uint32 ossimUsgsDemTileSource::getImageTileHeight() const
-{
-   return 0;
-}
-
-ossimString ossimUsgsDemTileSource::getShortName() const
-{
-   return ossimString("usgs dem");
-}
-
-ossimString ossimUsgsDemTileSource::getLongName() const
-{
-   return ossimString("usgs dem reader");
-}
-
-ossim_uint32 ossimUsgsDemTileSource::getNumberOfInputBands() const
-{
-   return 1;
-}
-
-ossim_uint32 ossimUsgsDemTileSource::getNumberOfOutputBands()const
-{
-   return 1;
-}
-
-double ossimUsgsDemTileSource::getNullPixelValue(ossim_uint32 /* band */)const 
-{
-   return theNullValue;
-}
-
-double ossimUsgsDemTileSource::getMinPixelValue(ossim_uint32 band)const 
-{
-   if(band < theMetaData.getNumberOfBands())
-   {
-      return theMetaData.getMinPix(band);
-   }
-   return theMinHeight; 
-}
-
-double ossimUsgsDemTileSource::getMaxPixelValue(ossim_uint32 band)const 
-{
-   if(theMetaData.getNumberOfBands())
-   {
-      return theMetaData.getMaxPix(band);
-   }
-   return theMaxHeight; 
-}
-
-bool ossimUsgsDemTileSource::isOpen()const
-{
-   return (theDem ? true : false );
-}
-
-const ossimUsgsDemTileSource& ossimUsgsDemTileSource::operator=(const  ossimUsgsDemTileSource& rhs)
-{
-   return rhs;
-} 
-
-ossimUsgsDemTileSource::ossimUsgsDemTileSource(const ossimUsgsDemTileSource&)
-{
-}
diff --git a/src/ossim/imaging/ossimValueAssignImageSourceFilter.cpp b/src/ossim/imaging/ossimValueAssignImageSourceFilter.cpp
deleted file mode 100644
index c310cba..0000000
--- a/src/ossim/imaging/ossimValueAssignImageSourceFilter.cpp
+++ /dev/null
@@ -1,377 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimValueAssignImageSourceFilter.cpp 15833 2009-10-29 01:41:53Z eshirschorn $
-#include <ossim/imaging/ossimValueAssignImageSourceFilter.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageDataFactory.h>
-
-RTTI_DEF1(ossimValueAssignImageSourceFilter,
-          "ossimValueAssignImageSourceFilter",
-          ossimImageSourceFilter);
-
-ossimValueAssignImageSourceFilter::ossimValueAssignImageSourceFilter(ossimObject* owner)
-   :ossimImageSourceFilter(owner),
-    theAssignType(ossimValueAssignType_GROUP),
-    theTile(NULL)
-{
-}
-
-ossimValueAssignImageSourceFilter::~ossimValueAssignImageSourceFilter()
-{
-}
-
-ossimRefPtr<ossimImageData> ossimValueAssignImageSourceFilter::getTile(
-   const ossimIrect& tileRect,
-   ossim_uint32 resLevel)
-{
-   if(!theInputConnection)
-   {
-      return NULL;  // This filter requires an input.
-   }
-   
-   ossimRefPtr<ossimImageData> inputTile =
-      theInputConnection->getTile(tileRect, resLevel);
-   
-   if(!isSourceEnabled() || !inputTile.valid())
-   {
-      return inputTile;
-   }
-
-   if(!theTile.valid())
-   {
-      allocate(); // First time through...
-   }
-   
-   if (!theTile.valid()) // throw exeption...
-   {
-      return inputTile;
-   }
-
-   // Set the origin, resize if needed of the output tile.
-   theTile->setImageRectangle(tileRect);
-
-   if( inputTile->getDataObjectStatus() == OSSIM_NULL ||
-       inputTile->getDataObjectStatus() == OSSIM_EMPTY )
-   {
-      theTile->makeBlank();
-      return theTile;
-   }
-
-   if(!inputTile->getBuf())
-   {
-      theTile->makeBlank();
-   }
-   else
-   {
-      theTile->loadTile(inputTile.get());
-   }
-
-   switch(inputTile->getScalarType())
-   {
-      case OSSIM_UCHAR:
-      {
-         executeAssign(static_cast<ossim_uint8>(0),
-                       theTile);
-         break;
-      }
-      case OSSIM_FLOAT: 
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         executeAssign(static_cast<float>(0),
-                       theTile);
-         break;
-      }
-      case OSSIM_USHORT16:
-      case OSSIM_USHORT11:
-      {
-         executeAssign(static_cast<ossim_uint16>(0),
-                       theTile);
-         break;
-      }
-      case OSSIM_SSHORT16:
-      {
-         executeAssign(static_cast<ossim_sint16>(0),
-                       theTile);
-         break;
-      }
-      case OSSIM_DOUBLE:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         executeAssign(static_cast<double>(0),
-                       theTile);
-         break;
-      }
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << "ossimValueAssignImageSourceFilter::getTile WARN: Scalar type = " << theTile->getScalarType()
-                                            << " Not supported!" << std::endl;
-         break;
-      }
-   }
-
-   theTile->validate();
-   
-   return theTile;
-}
-
-void ossimValueAssignImageSourceFilter::setInputOutputValues(const vector<double>& inputValues,
-                                                             const vector<double>& outputValues)
-{
-   theInputValueArray  = inputValues;
-   theOutputValueArray = outputValues;
-
-   validateArrays();
-}
-
-void ossimValueAssignImageSourceFilter::validateArrays()
-{
-   if(theOutputValueArray.size() != theInputValueArray.size())
-   {
-      ossim_uint32 index = std::min((ossim_uint32)theOutputValueArray.size(),
-                                    (ossim_uint32)theInputValueArray.size());
-      
-      vector<double> copyVector(theOutputValueArray.begin(),
-                                theOutputValueArray.begin() + index);
-
-      theOutputValueArray = copyVector;
-
-      for(ossim_uint32 index2 = index; index < theInputValueArray.size(); ++index)
-      {
-         theOutputValueArray.push_back(theInputValueArray[index2]);
-      }
-   }
-}
-
-template <class T> void ossimValueAssignImageSourceFilter::executeAssign(
-   T,
-   ossimRefPtr<ossimImageData>& data)
-{
-   if(!theInputValueArray.size()) return;
-   
-   if(theAssignType == ossimValueAssignType_SEPARATE)
-   {
-      executeAssignSeparate(static_cast<T>(0), data);
-   }
-   else
-   {
-      executeAssignGroup(static_cast<T>(0), data);      
-   }
-}
-
-template <class T> void ossimValueAssignImageSourceFilter::executeAssignSeparate(
-   T,
-   ossimRefPtr<ossimImageData>& data)
-{
-   ossim_uint32 numberOfBands = std::min((ossim_uint32)data->getNumberOfBands(),
-                                         (ossim_uint32)theInputValueArray.size());
-   ossim_uint32 maxOffset     = data->getWidth()*data->getHeight();
-   
-   for(ossim_uint32 band = 0; band<numberOfBands; ++band)
-   {
-      T* buf      = static_cast<T*>(data->getBuf(band));
-      T  inValue  = static_cast<T>(theInputValueArray[band]);
-      T  outValue = static_cast<T>(theOutputValueArray[band]);
-      for(ossim_uint32 count = 0; count < maxOffset; ++count)
-      {
-         if(*buf == inValue)
-         {
-            *buf = outValue;
-         }
-         ++buf;
-      }
-   }
-}
-
-template <class T> void ossimValueAssignImageSourceFilter::executeAssignGroup(
-   T,
-   ossimRefPtr<ossimImageData>& data)
-{
-   ossim_uint32 numberOfBands = std::min((ossim_uint32)data->getNumberOfBands(),
-                                         (ossim_uint32)theInputValueArray.size());
-   ossim_uint32 maxOffset     = data->getWidth()*data->getHeight();
-   ossim_uint32 band = 0;
-   bool equalFlag = false;
-
-   T** bufArray = new T*[data->getNumberOfBands()];
-   for(band = 0; band < data->getNumberOfBands(); ++band)
-   {
-      bufArray[band] = static_cast<T*>(data->getBuf(band));
-   }
-   
-   for(ossim_uint32 offset = 0; offset < maxOffset; ++offset)
-   {
-      equalFlag = true;
-      
-      for(band = 0; band<numberOfBands; ++band)
-      {
-         if(bufArray[band][offset] != theInputValueArray[band])
-         {
-            equalFlag = false;
-         }
-      }
-      if(equalFlag)
-      {
-         for(band = 0; band<numberOfBands; ++band)
-         {
-            bufArray[band][offset] = static_cast<T>(theOutputValueArray[band]);
-         }
-      }
-   }
-
-   delete [] bufArray;
-}
-
-void ossimValueAssignImageSourceFilter::initialize()
-{
-   // Base class will recapture "theInputConnection".
-   ossimImageSourceFilter::initialize();
-}
-
-void ossimValueAssignImageSourceFilter::allocate()
-{   
-   theTile = NULL;
-
-   if(theInputConnection)
-   {
-      ossimImageDataFactory* idf = ossimImageDataFactory::instance();
-      
-      theTile = idf->create(this,
-                            this);
-      
-      theTile->initialize();
-   }
-}
-
-bool ossimValueAssignImageSourceFilter::saveState(ossimKeywordlist& kwl,
-                                                  const char* prefix)const
-{
-   ossim_uint32 index = 0;
-   for(index =0; index < theInputValueArray.size(); ++index)
-   {
-      ossimString in  = ("input_band" + ossimString::toString(index));
-      ossimString out = ("output_band" + ossimString::toString(index));
-
-      kwl.add(prefix,
-              in.c_str(),
-              theInputValueArray[index],
-              true);
-      kwl.add(prefix,
-              out.c_str(),
-              theOutputValueArray[index],
-              true);
-   }
-   if(theAssignType ==  ossimValueAssignType_SEPARATE)
-   {
-      kwl.add(prefix,
-              "assign_type",
-              "separate",
-              true);
-   }
-   else
-   {
-      kwl.add(prefix,
-              "assign_type",
-              "group",
-              true);
-   }
-           
-   return ossimImageSourceFilter::saveState(kwl, prefix);
-}
-
-/*!
- * Method to the load (recreate) the state of an object from a keyword
- * list.  Return true if ok or false on error.
- */
-bool ossimValueAssignImageSourceFilter::loadState(const ossimKeywordlist& kwl,
-                                                  const char* prefix)
-{
-   
-   ossimString inRegExpression =  ossimString("^(") +
-                                  ossimString(prefix) +
-                                  "input_band[0-9]+)";
-   ossimString outRegExpression =  ossimString("^(") +
-                                   ossimString(prefix) +
-                                   "output_band[0-9]+)";
-   ossim_uint32 numberOfInputs  = kwl.getNumberOfSubstringKeys(inRegExpression);
-   ossim_uint32 numberOfOutputs = kwl.getNumberOfSubstringKeys(outRegExpression);
-   ossim_uint32 index = 0;
-   ossim_uint32 currentIndex = 0;
-   
-   theInputValueArray.clear();
-   theOutputValueArray.clear();
-
-   while(index < numberOfInputs)
-   {
-      const char* value = kwl.find(prefix,
-                                   (ossimString("input_band") +
-                                    ossimString::toString(currentIndex)).c_str()
-                                   );
-      if(value)
-      {
-         theInputValueArray.push_back(ossimString(value).toDouble());
-         ++index;
-      }
-      ++currentIndex;
-   }
-   index = 0;
-   currentIndex = 0;
-   while(index < numberOfOutputs)
-   {
-      const char* value = kwl.find(prefix,
-                                   (ossimString("output_band") +
-                                    ossimString::toString(currentIndex)).c_str()
-                                   );
-      if(value)
-      {
-         theOutputValueArray.push_back(ossimString(value).toDouble());
-         ++index;
-      }
-      ++currentIndex;
-   }
-   validateArrays();
-   
-   const char* assignType = kwl.find(prefix, "assign_type");
-   if(assignType)
-   {
-      if(ossimString(assignType).trim().downcase() == "separate")
-      {
-         theAssignType = ossimValueAssignType_SEPARATE;
-      }
-      else
-      {
-         theAssignType = ossimValueAssignType_GROUP;
-      }
-   }
-   else
-   {
-      theAssignType = ossimValueAssignType_GROUP;
-   }
-   
-   return ossimImageSourceFilter::loadState(kwl, prefix);
-}
-
-const vector<double>& ossimValueAssignImageSourceFilter::getInputValues()const
-{
-   return theInputValueArray;
-}
-const vector<double>& ossimValueAssignImageSourceFilter::getOutputValues()const
-{
-   return theOutputValueArray;
-}
-
-ossimValueAssignImageSourceFilter::ossimValueAssignType ossimValueAssignImageSourceFilter::getValueAssignType()const
-{
-   return theAssignType;
-}
-void ossimValueAssignImageSourceFilter::setValueAssignType(ossimValueAssignType type)
-{
-   theAssignType = type;
-}
diff --git a/src/ossim/imaging/ossimVpfAnnotationCoverageInfo.cpp b/src/ossim/imaging/ossimVpfAnnotationCoverageInfo.cpp
deleted file mode 100644
index a7f1d92..0000000
--- a/src/ossim/imaging/ossimVpfAnnotationCoverageInfo.cpp
+++ /dev/null
@@ -1,217 +0,0 @@
-//*************************************************************************
-// Copyright (C) 2004 Intelligence Data Systems, Inc.  All rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-//**************************************************************************
-// $Id: ossimVpfAnnotationCoverageInfo.cpp 15833 2009-10-29 01:41:53Z eshirschorn $
-
-#include <vector>
-#include <algorithm>
-#include <ossim/imaging/ossimVpfAnnotationCoverageInfo.h>
-#include <ossim/vec/ossimVpfLibrary.h>
-#include <ossim/vec/ossimVpfFeatureClassSchema.h>
-
-bool ossimVpfAnnotationCoverageInfo::hasRenderableFeature()const
-{
-  for(ossim_uint32 idx = 0; idx < theFeatureInfoArray.size();++idx)
-  {
-     if(theFeatureInfoArray[idx]->getEnabledFlag())
-     {
-        return true;
-     }
-  }
-
-  return false;
-}
-
-void ossimVpfAnnotationCoverageInfo::getEnabledFeatures(std::vector<ossimVpfAnnotationFeatureInfo*>& result)
-{
-  for(ossim_uint32 idx = 0; idx < theFeatureInfoArray.size();++idx)
-    {
-      if(theFeatureInfoArray[idx]->getEnabledFlag())
-	{
-	  result.push_back(theFeatureInfoArray[idx]);
-	}
-    }
-}
-
-void ossimVpfAnnotationCoverageInfo::getAllFeatures(std::vector<ossimVpfAnnotationFeatureInfo*>& result)
-{
-  for(ossim_uint32 idx = 0; idx < theFeatureInfoArray.size();++idx)
-  {
-     result.push_back(theFeatureInfoArray[idx]);
-  }
-}
-
-ossimIrect ossimVpfAnnotationCoverageInfo::getBoundingProjectedRect()const
-{
-  ossimIrect result;
-  result.makeNan();
-
-  for(ossim_uint32 idx = 0; idx < theFeatureInfoArray.size();++idx)
-    {
-      ossimIrect tempRect = theFeatureInfoArray[idx]->getBoundingProjectedRect();
-      if(!tempRect.hasNans())
-	{
-	  if(result.hasNans())
-	    {
-	      result = tempRect;
-	    }
-	  else
-	    {
-	      result = result.combine(tempRect);
-	    }
-	}
-    }
-
-  return result;
-}
-
-
-void ossimVpfAnnotationCoverageInfo::transform(ossimImageGeometry* geom)
-{
-  for(ossim_uint32 idx = 0; idx < theFeatureInfoArray.size();++idx)
-  {
-     theFeatureInfoArray[idx]->transform(geom);
-  }
-}
-
-void ossimVpfAnnotationCoverageInfo::buildCoverage()
-{
-   buildCoverage( "" );
-}
-
-void ossimVpfAnnotationCoverageInfo::buildCoverage(const ossimString& feature)
-{
-   deleteAllFeatures();
-   if(theLibrary)
-   {
-      ossimVpfCoverage coverage;
-      
-      if(theLibrary->getCoverage(theName, coverage))
-      {
-         ossimVpfFeatureClassSchema schema;
-         if(coverage.openFeatureClassSchema(schema))
-         {
-            std::vector<ossimString> featureClassArray;
-            schema.getFeatureClasses(featureClassArray);
-            schema.closeTable();
-            for(ossim_uint32  idx = 0; idx < featureClassArray.size(); ++idx)
-            {
-               ossimString s1 = feature;
-               ossimString s2 = featureClassArray[idx];
-               s1.downcase();
-               s2.downcase();
-               if (! feature.length() || (s1 == s2) )
-               {
-                  ossimVpfAnnotationFeatureInfo* featureInfo =
-                     new ossimVpfAnnotationFeatureInfo;
-                  featureInfo->setName(featureClassArray[idx]);
-                  featureInfo->setCoverage(coverage);
-                  theFeatureInfoArray.push_back(featureInfo);
-                  featureInfo->buildFeature();
-               }
-            }
-         }
-      }
-   }
-}
-
-void ossimVpfAnnotationCoverageInfo::drawAnnotations(ossimRgbImage* tile)
-{
-   for(ossim_uint32 idx = 0; idx < theFeatureInfoArray.size();++idx)
-   {
-      if(theFeatureInfoArray[idx]->getEnabledFlag())
-      {
-         theFeatureInfoArray[idx]->drawAnnotations(tile);
-      }
-   }
-}
-
-void ossimVpfAnnotationCoverageInfo::deleteAllFeatures()
-{
-   for(ossim_uint32 idx = 0; idx < theFeatureInfoArray.size();++idx)
-   {
-      theFeatureInfoArray[idx];
-   }
-   
-   theFeatureInfoArray.clear();
-}
-
-
-
-bool ossimVpfAnnotationCoverageInfo::saveState(ossimKeywordlist& kwl,
-					       const char* prefix)const
-{
-   kwl.add(prefix,
-           "name",
-           theName,
-           true);
-   
-   for(ossim_uint32 idx = 0; idx < theFeatureInfoArray.size(); ++idx)
-   {
-      theFeatureInfoArray[idx]->saveState(kwl,
-					  (ossimString(prefix) + "feature" +
-					   ossimString::toString(idx) + ".").c_str());
-   }
-   
-   return true;
-}
-
-bool ossimVpfAnnotationCoverageInfo::loadState(const ossimKeywordlist& kwl,
-					       const char* prefix)
-{
-  deleteAllFeatures();
-
-  if(!theLibrary)
-    {
-      return false;
-    }
-
-  theName = kwl.find(prefix, "name");
-  ossimVpfCoverage coverage;
-
-  if(theLibrary->getCoverage(theName, coverage))
-    {
-      ossimString regExpression =  ossimString("^(") + ossimString(prefix) + "feature[0-9]+.)";
-      vector<ossimString> keys =
-	kwl.getSubstringKeyList( regExpression );
-      std::vector<int> theNumberList(keys.size());
-      int offset = (int)(ossimString(prefix)+"feature").size();
-      int idx = 0;
-      for(idx = 0; idx < (int)theNumberList.size();++idx)
-	{
-	  ossimString numberStr(keys[idx].begin() + offset,
-				keys[idx].end());
-	  theNumberList[idx] = numberStr.toInt();
-	}
-      std::sort(theNumberList.begin(), theNumberList.end());
-      
-      for(idx=0;idx < (int)keys.size();++idx)
-	{
-	  ossimString newPrefix = ossimString(prefix);
-	  newPrefix += ossimString("feature");
-	  newPrefix += ossimString::toString(theNumberList[idx]);
-	  newPrefix += ossimString(".");
-	  ossimVpfAnnotationFeatureInfo* featureInfo = new ossimVpfAnnotationFeatureInfo;
-	  featureInfo->setCoverage(coverage);
-	  theFeatureInfoArray.push_back(featureInfo);
-	  if(!featureInfo->loadState(kwl,
-				     newPrefix))
-	    {
-	      return false;
-	    }
-	}
-    }
-  else
-    {
-      return false;
-    }
-
-  return true;
-}
diff --git a/src/ossim/imaging/ossimVpfAnnotationFeatureInfo.cpp b/src/ossim/imaging/ossimVpfAnnotationFeatureInfo.cpp
deleted file mode 100644
index b452979..0000000
--- a/src/ossim/imaging/ossimVpfAnnotationFeatureInfo.cpp
+++ /dev/null
@@ -1,1446 +0,0 @@
-#include <sstream>
-
-#include <ossim/imaging/ossimVpfAnnotationFeatureInfo.h>
-#include <ossim/vec/ossimVpfCoverage.h>
-#include <ossim/vec/ossimVpfLibrary.h>
-#include <ossim/vec/ossimVpfFeatureClassSchema.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/base/ossimPolyLine.h>
-#include <ossim/base/ossimGeoPolygon.h>
-#include <ossim/imaging/ossimGeoAnnotationSource.h>
-#include <ossim/imaging/ossimAnnotationObject.h>
-#include <ossim/imaging/ossimGeoAnnotationMultiPolyLineObject.h>
-#include <ossim/imaging/ossimGeoAnnotationMultiEllipseObject.h>
-#include <ossim/imaging/ossimGeoAnnotationFontObject.h>
-#include <ossim/imaging/ossimGeoAnnotationMultiPolyObject.h>
-#include <ossim/imaging/ossimRgbImage.h>
-#include <ossim/font/ossimFont.h>
-#include <ossim/font/ossimFontFactoryRegistry.h>
-#include <ossim/base/ossimTrace.h>
-
-static ossimTrace traceDebug("ossimVpfAnnotationFeatureInfo:debug");
-
-RTTI_DEF1(ossimVpfAnnotationFeatureInfo, "ossimVpfAnnotationFeatureInfo", ossimObject);
-
-ossimVpfAnnotationFeatureInfo::ossimVpfAnnotationFeatureInfo(const ossimString& featureName,
-                                                             const ossimRgbVector& penColor,
-                                                             const ossimRgbVector& brushColor,
-                                                             const ossimDpt& pointRadius,
-                                                             int   thickness,
-                                                             bool enabledFlag)
-   :theName(featureName),
-    thePenColor(penColor),
-    theBrushColor(brushColor),
-    thePointRadius(pointRadius),
-    theThickness(thickness),
-    theFillEnabledFlag(false),
-    theEnabledFlag(enabledFlag),
-    theFeatureType(ossimVpfAnnotationFeatureType_UNKNOWN),
-    theFontInformation(),
-    theAnnotationArray(0)
-{
-   ossimFont* font = ossimFontFactoryRegistry::instance()->getDefaultFont();
-
-   if(font)
-   {
-      std::vector<ossimFontInformation> fontInfoArray;
-
-      font->getFontInformation(fontInfoArray);
-
-      if(fontInfoArray.size())
-      {
-         theFontInformation = fontInfoArray[0];
-      }
-   }
-}
-
-
-ossimVpfAnnotationFeatureInfo::~ossimVpfAnnotationFeatureInfo()
-{
-   deleteAllObjects();
-}
-
-void ossimVpfAnnotationFeatureInfo::transform(ossimImageGeometry* proj)
-{
-   if(theEnabledFlag)
-   {
-      for(int idx = 0; idx < (int)theAnnotationArray.size();++idx)
-      {
-         if(theAnnotationArray[idx].valid())
-         {
-            theAnnotationArray[idx]->transform(proj);
-            theAnnotationArray[idx]->computeBoundingRect();
-         }
-      }
-   }
-}
-ossimIrect ossimVpfAnnotationFeatureInfo::getBoundingProjectedRect()const
-{
-  ossimIrect result;
-  result.makeNan();
-
-  if(theEnabledFlag)
-  {
-     for(int idx = 0; idx < (int)theAnnotationArray.size();++idx)
-     {
-        if(theAnnotationArray[idx].valid())
-	{
-           ossimIrect tempRect = theAnnotationArray[idx]->getBoundingRect();
-           if(!tempRect.hasNans())
-           {
-	      if(result.hasNans())
-              {
-                 result = tempRect;
-              }
-	      else
-              {
-                 result = result.combine(tempRect);
-              }
-           }
-	}
-     }
-  }
-  
-  return result;
-}
-
-void ossimVpfAnnotationFeatureInfo::setEnabledFlag(bool flag)
-{
-   if(!flag && theEnabledFlag)
-   {
-      deleteAllObjects();
-   }
-   else if(flag&&(!theEnabledFlag))
-   {
-      theEnabledFlag = flag;
-      buildFeature();
-   }
-   theEnabledFlag = flag;
-}
-
-void ossimVpfAnnotationFeatureInfo::buildFeature()
-{
-  deleteAllObjects();
-  
-  ossimVpfFeatureClassSchemaNode node;
-
-  ossimVpfFeatureClassSchema schema;
-  theCoverage.openFeatureClassSchema(schema);
-  if(schema.getFeatureClassNode(theName,
-				node))
-    {
-      if(node.thePrimitiveTable.contains("edg"))
-      {
-         theFeatureType = ossimVpfAnnotationFeatureType_LINE;
-	 if(theEnabledFlag)
-	   {
-	     buildEdgFeature(node.theTable.trim(),
-			     node.theTableKey.trim(),
-			     node.thePrimitiveTable.trim(),
-			     node.thePrimitiveTableKey.trim());
-	   }
-	}
-      else if(node.thePrimitiveTable.contains("txt"))
-	{
-            theFeatureType = ossimVpfAnnotationFeatureType_TEXT;
-	    if(theEnabledFlag)
-	      {
-		buildTxtFeature(node.theTable.trim(),
-				node.theTableKey.trim(),
-				node.thePrimitiveTable.trim(),
-				node.thePrimitiveTableKey.trim());
-	      }
-	}
-      else if(node.thePrimitiveTable.contains("fac"))
-	{
-            theFeatureType = ossimVpfAnnotationFeatureType_POLYGON;
-	    if(theEnabledFlag)
-	      {
-		buildFaceFeature(node.theTable.trim(),
-				 node.theTableKey.trim(),
-				 node.thePrimitiveTable.trim(),
-				 node.thePrimitiveTableKey.trim());
-	      }
-	}
-      else if(node.thePrimitiveTable.contains("cnd"))
-	{
-            theFeatureType = ossimVpfAnnotationFeatureType_POINT;
-	    if(theEnabledFlag)
-	      {
-		buildPointFeature("cnd",
-				  node.theTable.trim(),
-				  node.theTableKey.trim(),
-				  node.thePrimitiveTable.trim(),
-				  node.thePrimitiveTableKey.trim());
-	      }
-	}
-      else if(node.thePrimitiveTable.contains("end"))
-	{
-            theFeatureType = ossimVpfAnnotationFeatureType_POINT;
-	    if(theEnabledFlag)
-	      {
-		buildPointFeature("end",
-				  node.theTable.trim(),
-				  node.theTableKey.trim(),
-				  node.thePrimitiveTable.trim(),
-				  node.thePrimitiveTableKey.trim());
-	      }
-	}
-      else
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG) << "Primitive \""<<node.thePrimitiveTable<<"\" not handled yet" << endl;
-         }
-      }
-    }
-}
-
-void ossimVpfAnnotationFeatureInfo::drawAnnotations(ossimRgbImage* tile)
-{
-   if(theEnabledFlag)
-   {
-      int idx = 0;
-      for(idx = 0; idx < (int)theAnnotationArray.size(); ++idx)
-      {
-         theAnnotationArray[idx]->draw(*tile);
-      }
-   }
-}
-
-bool ossimVpfAnnotationFeatureInfo::saveState(ossimKeywordlist& kwl,
-					      const char* prefix)const
-{
-  kwl.add(prefix,
-	  "name",
-	  theName.c_str(),
-	  true);
-  kwl.add(prefix,
-	  "description",
-	  theDescription.c_str(),
-	  true);
-  ossimString penColor = (ossimString::toString((int)thePenColor.getR())+ " " +
-			  ossimString::toString((int)thePenColor.getG())+ " " +
-			  ossimString::toString((int)thePenColor.getB()));
-  ossimString brushColor = (ossimString::toString((int)theBrushColor.getR())+ " " +
-			    ossimString::toString((int)theBrushColor.getG())+ " " +
-			    ossimString::toString((int)theBrushColor.getB()));
-  kwl.add(prefix,
-	  "pen_color",
-	  penColor,
-	  true);
-  kwl.add(prefix,
-	  "brush_color",
-	  brushColor,
-	  true);
-
-  if(theFeatureType == ossimVpfAnnotationFeatureType_POINT)
-    {
-      kwl.add(prefix,
-	      "point_radius",
-	      ossimString::toString(thePointRadius.x) + " " +
-	      ossimString::toString(thePointRadius.y),
-	      true);
-      kwl.add(prefix,
-	      "fill_enabled",
-	      theFillEnabledFlag,
-	      true);
-    }
-  else if(theFeatureType == ossimVpfAnnotationFeatureType_LINE)
-    {
-      kwl.add(prefix,
-	      "thickness",
-	      theThickness,
-	      true);
-    }
-  else if(theFeatureType == ossimVpfAnnotationFeatureType_POLYGON)
-    {
-      kwl.add(prefix,
-	      "fill_enabled",
-	      theFillEnabledFlag,
-	      true);
-      kwl.add(prefix,
-	      "thickness",
-	      theThickness,
-	      true);
-    }
-  else if(theFeatureType == ossimVpfAnnotationFeatureType_TEXT)
-    {
-      theFontInformation.saveState(kwl,
-				   (ossimString(prefix)+"font.").c_str());
-    }
-  kwl.add(prefix,
-	  "enabled",
-	  theEnabledFlag,
-	  true);
-  kwl.add(prefix,
-	  "feature_type",
-	  getFeatureTypeAsString(),
-	  true);
-
-  return true;
-}
-
-bool ossimVpfAnnotationFeatureInfo::loadState(const ossimKeywordlist& kwl,
-					      const char* prefix)
-{
-  const char* name        = kwl.find(prefix, "name");
-  const char* description = kwl.find(prefix, "description");
-  const char* enabled     = kwl.find(prefix, "enabled");
-  const char* fillEnabled = kwl.find(prefix, "fill_enabled");
-  const char* thickness   = kwl.find(prefix, "thickness");
-  const char* pointRadius = kwl.find(prefix, "point_radius");
-  const char* brushColor  = kwl.find(prefix, "brush_color");
-  const char* penColor    = kwl.find(prefix, "pen_color");
-  
-  theFontInformation.loadState(kwl,
-			       (ossimString(prefix)+"font.").c_str());
-
-  if(name)
-    {
-      if(theName != name)
-	{
-	  deleteAllObjects();
-	}
-      theName = name;
-    }
-  if(description)
-    {
-      theDescription = description;
-    }
-  if(enabled)
-    {
-      theEnabledFlag = ossimString(enabled).toBool();
-
-      if(!theEnabledFlag)
-	{
-	  deleteAllObjects();
-	}
-    }
-  
-  if(fillEnabled)
-    {
-      theFillEnabledFlag = ossimString(fillEnabled).toBool();
-    }
-  if(thickness)
-    {
-      theThickness = ossimString(thickness).toInt();
-    }
-  if(pointRadius)
-    {
-      stringstream ptRadiusStream(pointRadius);
-      ptRadiusStream >> thePointRadius.x >> thePointRadius.y;
-    }
-  if(brushColor)
-    {
-      int r, g, b;
-      stringstream colorStream(brushColor);
-      colorStream >> r >> g >> b;
-
-      theBrushColor.setR((ossim_uint8)r);
-      theBrushColor.setG((ossim_uint8)g);
-      theBrushColor.setB((ossim_uint8)b);
-    }
-  if(penColor)
-    {
-      int r, g, b;
-      stringstream colorStream(brushColor);
-      colorStream >> r >> g >> b;
-
-      thePenColor.setR((ossim_uint8)r);
-      thePenColor.setG((ossim_uint8)g);
-      thePenColor.setB((ossim_uint8)b);
-    }
-  
-  if(theEnabledFlag&&(theAnnotationArray.size() < 1))
-    {
-      buildFeature();
-    }
-  else
-    {
-      setDrawingFeaturesToAnnotation();
-    }
-
-  return true;
-}
-
-ossimString ossimVpfAnnotationFeatureInfo::getFeatureTypeAsString()const
-{
-   switch(theFeatureType)
-   {
-      case ossimVpfAnnotationFeatureType_POINT:
-      {
-         return "point";
-      }
-      case ossimVpfAnnotationFeatureType_LINE:
-      {
-         return "line";
-      }
-      case ossimVpfAnnotationFeatureType_POLYGON:
-      {
-         return "polygon";
-      }
-      case ossimVpfAnnotationFeatureType_TEXT:
-      {
-         return "text";
-      }
-      default:
-         break;
-   }
-   
-  return "unknown";
-}
-
-ossimVpfAnnotationFeatureInfo::ossimVpfAnnotationFeatureType ossimVpfAnnotationFeatureInfo::getFeatureTypeFromString(const ossimString& featureType)const
-{
-  ossimString downCased = featureType;
-  downCased = downCased.downcase();
-
-  if(downCased.contains("point"))
-    {
-      return ossimVpfAnnotationFeatureType_POINT;
-    }
-  else if(downCased.contains("line"))
-    {
-      return ossimVpfAnnotationFeatureType_LINE;
-    }
-  else if(downCased.contains("polygon"))
-    {
-      return ossimVpfAnnotationFeatureType_POLYGON;
-    }
-  else if(downCased.contains("text"))
-    {
-      return ossimVpfAnnotationFeatureType_TEXT;
-    }
-
-  return ossimVpfAnnotationFeatureType_UNKNOWN;
-
-}
-
-void ossimVpfAnnotationFeatureInfo::deleteAllObjects()
-{
-   theAnnotationArray.clear();
-}
-
-void ossimVpfAnnotationFeatureInfo::setDrawingFeaturesToAnnotation()
-{
-   switch(theFeatureType)
-   {
-   case ossimVpfAnnotationFeatureType_POINT:
-   {
-      ossimGeoAnnotationMultiEllipseObject* annotation = 0;
-      for(int idx = 0; idx < (int)theAnnotationArray.size();++idx)
-      {
-         annotation = (ossimGeoAnnotationMultiEllipseObject*)theAnnotationArray[idx].get();
-
-         annotation->setColor(thePenColor.getR(),
-                              thePenColor.getG(),
-                              thePenColor.getB());
-         annotation->setThickness(theThickness);
-         annotation->setFillFlag(theFillEnabledFlag);
-         annotation->setWidthHeight(thePointRadius);
-      }
-      
-      break;
-   }
-   case ossimVpfAnnotationFeatureType_TEXT:
-   {
-      ossimGeoAnnotationFontObject* annotation = 0;
-      ossimRefPtr<ossimFont> font = ossimFontFactoryRegistry::instance()->createFont(theFontInformation);
-
-      for(int idx = 0; idx < (int)theAnnotationArray.size();++idx)
-      {
-         annotation = (ossimGeoAnnotationFontObject*)theAnnotationArray[idx].get();
-         annotation->setColor(thePenColor.getR(),
-                              thePenColor.getG(),
-                              thePenColor.getB());
-         annotation->setThickness(theThickness);
-         
-         if(font.valid())
-         {
-            annotation->setFont((ossimFont*)font->dup());
-         }
-         annotation->setPointSize(theFontInformation.thePointSize);
-         annotation->setScale(theFontInformation.theScale);
-         annotation->setShear(theFontInformation.theShear);
-         annotation->setRotation(theFontInformation.theRotation);
-      }
-      break;
-   }
-   case ossimVpfAnnotationFeatureType_LINE:
-   {
-      ossimGeoAnnotationMultiPolyLineObject* annotation = 0;
-      for(int idx = 0; idx < (int)theAnnotationArray.size();++idx)
-      {
-         annotation = (ossimGeoAnnotationMultiPolyLineObject*)theAnnotationArray[idx].get();
-         annotation->setColor(thePenColor.getR(),
-                              thePenColor.getG(),
-                              thePenColor.getB());
-         annotation->setThickness(theThickness);
-      }
-      
-      break;
-   }
-   case ossimVpfAnnotationFeatureType_POLYGON:
-   {
-      ossimGeoAnnotationMultiPolyObject* annotation = 0;
-      for(int idx = 0; idx < (int)theAnnotationArray.size();++idx)
-      {
-         annotation = (ossimGeoAnnotationMultiPolyObject*)theAnnotationArray[idx].get();
-         annotation->setColor(thePenColor.getR(),
-                              thePenColor.getG(),
-                              thePenColor.getB());
-         annotation->setThickness(theThickness);
-         annotation->setFillFlag(theFillEnabledFlag);
-      }
-      break;
-   }
-   default:
-   {
-      break;
-   }
-   }
-}
-
-
-void ossimVpfAnnotationFeatureInfo::buildTxtFeature(const ossimFilename& tableName,
-						    const ossimString&   tableKey,
-						    const ossimFilename& /* primitiveName */,
-						    const ossimString&   /* primitiveKey */)
-{
-  ossimFilename tableFileName      = theCoverage.getPath().dirCat(tableName);
-  ossimFilename primitiveTableName;
-  ossimVpfTable table;
-  ossimVpfTable primitiveTable;
-
-  if(table.openTable(tableFileName))
-    {
-      table.reset();
-      vector<ossimString> columnValues = table.getColumnValues(tableKey.trim());
-      
-      primitiveTableName = theCoverage.getPath().dirCat("txt");
-      
-      vector<ossimString> tileIds;
-      ossim_int32 stringValuePosition = 0;
-      ossim_int32 shapeLinePosition = 0;
-      bool isTiled = false;
-      if(table.getColumnPosition("tile_id") >= 0)
-	{
-	  tileIds = table.getColumnValues("tile_id");
-	  isTiled = true;
-	}
-      if(!isTiled)
-	{
-	  primitiveTableName = theCoverage.getPath().dirCat("txt");
-	  if(!primitiveTable.openTable(primitiveTableName))
-	    {
-	      return;
-	    }
-	  stringValuePosition = primitiveTable.getColumnPosition("string");
-	  shapeLinePosition   = primitiveTable.getColumnPosition("shape_line");
-	}
-      ossim_int32 tileId = -1;
-      for(ossim_uint32 idx = 0; idx < columnValues.size();++idx)
-	{
-	  if(isTiled)
-	    {
-	      if(tileId != tileIds[idx].toInt())
-		{
-		  tileId = tileIds[idx].toInt();
-		  ossimFilename filename = theCoverage.getLibrary()->getTileName(tileIds[idx].toInt());
-		  if(theCoverage.getPath().dirCat(filename).dirCat("txt").exists())
-		    {
-		      primitiveTableName = theCoverage.getPath().dirCat(filename).dirCat("txt");
-		    }
-		  else if(theCoverage.getPath().dirCat(filename.downcase()).dirCat("txt").exists())
-		    {
-		      primitiveTableName = theCoverage.getPath().dirCat(filename.downcase()).dirCat("txt");
-		    }
-		  if(!primitiveTable.openTable(primitiveTableName))
-		    {
-		      return;
-		    }
-		  stringValuePosition = primitiveTable.getColumnPosition("string");
-		  shapeLinePosition   = primitiveTable.getColumnPosition("shape_line");
-		}
-	    }
-	  row_type row = read_row( columnValues[idx].toInt(), 
-				   *primitiveTable.getVpfTableData());
-	  ossim_int32 count = 0;
-	  ossimDpt* ptArray = getXy(*primitiveTable.getVpfTableData(),
-				    row,
-				    shapeLinePosition,
-				    &count);
-	  ossimDpt midPoint;
-	  if(ptArray)
-	    {
-	      midPoint = *ptArray;
-	      
-	      delete [] ptArray;
-	    }
-	  ossimString stringValue = primitiveTable.getColumnValueAsString(row,
-									  stringValuePosition);
-	  free_row(row,  *primitiveTable.getVpfTableData());
-	  
-	  if(!midPoint.hasNans())
-	    {
-	      ossimGpt centerPoint(midPoint.lat,
-				   midPoint.lon,
-				   ossim::nan());
-              ossimFont* font = ossimFontFactoryRegistry::instance()->createFont(theFontInformation);
-	      ossimGeoAnnotationFontObject* annotation = new ossimGeoAnnotationFontObject(centerPoint,
-											  stringValue);
-              annotation->setColor(thePenColor.getR(),
-                                   thePenColor.getG(),
-                                   thePenColor.getB());
-              annotation->setThickness(theThickness);
-                 
-              annotation->setFont(font);
-	      annotation->setPointSize(theFontInformation.thePointSize);
-	      annotation->setScale(theFontInformation.theScale);
-	      annotation->setShear(theFontInformation.theShear);
-	      annotation->setRotation(theFontInformation.theRotation);
-	      theAnnotationArray.push_back(annotation);
-	    }
-	}  
-    }
-}
-
-void ossimVpfAnnotationFeatureInfo::buildEdgFeature(const ossimFilename& tableName,
-						    const ossimString&   tableKey,
-						    const ossimFilename& /* primitiveName */,
-						    const ossimString&   /* primitiveKey */)
-{
-   ossimFilename tableFileName      = theCoverage.getPath().dirCat(tableName);
-   ossimFilename primitiveTableName;
-   ossimVpfTable table;
-   ossimVpfTable primitiveTable;
-  
-   std::vector<ossimPolyLine> polyLineArray;
-
-   if(table.openTable(tableFileName))
-   {
-      
-      vector<ossimString> columnValues = table.getColumnValues(tableKey.trim());
-      vector<ossimString> tileIds;
-      bool isTiled = false;
-      if(table.getColumnPosition("tile_id") >= 0)
-      {
-         tileIds = table.getColumnValues("tile_id");
-         isTiled = true;
-      }
-      ossim_int32 coordinateValuePosition = 0;
-      if(!isTiled)
-      {
-         primitiveTableName = theCoverage.getPath().dirCat("edg");
-         if(!primitiveTable.openTable(primitiveTableName))
-         {
-            return;
-         }
-         coordinateValuePosition = primitiveTable.getColumnPosition("coordinates");
-      }
-      ossim_int32 tileId = -1;
-      for(ossim_uint32 idx = 0; idx < columnValues.size();++idx)
-      {
-         if(isTiled)
-         {
-            if(tileId != tileIds[idx].toInt())
-            {
-               tileId = tileIds[idx].toInt();
-               ossimFilename filename = theCoverage.getLibrary()->getTileName(tileIds[idx].toInt());
-               if(theCoverage.getPath().dirCat(filename).dirCat("edg").exists())
-               {
-                  primitiveTableName = theCoverage.getPath().dirCat(filename).dirCat("edg");
-               }
-               else if(theCoverage.getPath().dirCat(filename.downcase()).dirCat("edg").exists())
-               {
-                  primitiveTableName = theCoverage.getPath().dirCat(filename.downcase()).dirCat("edg");
-               }
-               if(!primitiveTable.openTable(primitiveTableName))
-               {
-                  return;
-               }
-               coordinateValuePosition = primitiveTable.getColumnPosition("coordinates");
-            }
-         }
-         ossimPolyLine polyLine;
-	  
-         readEdge(polyLine,
-                  columnValues[idx].toInt(),
-                  coordinateValuePosition,
-                  primitiveTable);
-
-	 readAttributes(polyLine, table, idx + 1); // third parm is one-based row
-	  
-         polyLineArray.push_back(polyLine);
-      }
-   }
-   ossimGeoAnnotationMultiPolyLineObject* annotation = new ossimGeoAnnotationMultiPolyLineObject(polyLineArray);
-   annotation->setColor(thePenColor.getR(),
-                        thePenColor.getG(),
-                        thePenColor.getB());
-   annotation->setThickness(theThickness);
-   theAnnotationArray.push_back(annotation);
-}
-
-void ossimVpfAnnotationFeatureInfo::readAttributes(ossimPolyLine& polyLine, ossimVpfTable& table, int row) {
-  int numCols = table.getNumberOfColumns();
-
-  for (int col = 0; col < numCols; col ++) {
-    polyLine.addAttribute( table.getColumnValueAsString( row, col ));
-  }
-}
-
-void ossimVpfAnnotationFeatureInfo::buildPointFeature(const ossimString& primitiveName,
-						      const ossimFilename& tableName,
-						      const ossimString&   tableKey,
-						      const ossimFilename& /* primitive */,
-						      const ossimString&   /* primitiveKey */)
-{
-  ossimFilename tableFileName      = theCoverage.getPath().dirCat(tableName);
-  ossimFilename primitiveTableName;
-  ossimVpfTable table;
-  ossimVpfTable primitiveTable;
-  
-  std::vector<ossimGpt> centerPointArray;
-
-  if(table.openTable(tableFileName))
-    {
-      
-      vector<ossimString> columnValues = table.getColumnValues(tableKey.trim());
-      vector<ossimString> tileIds;
-      bool isTiled = false;
-      if(table.getColumnPosition("tile_id") >= 0)
-	{
-	  tileIds = table.getColumnValues("tile_id");
-	  isTiled = true;
-	}
-      ossim_int32 coordinateValuePosition = 0;
-      if(!isTiled)
-	{
-	  primitiveTableName = theCoverage.getPath().dirCat(primitiveName);
-	  if(!primitiveTable.openTable(primitiveTableName))
-	    {
-	      return;
-	    }
-	  coordinateValuePosition = primitiveTable.getColumnPosition("coordinate");
-	}
-      ossim_int32 tileId = -1;
-      for(ossim_uint32 idx = 0; idx < columnValues.size();++idx)
-	{
-	  if(isTiled)
-	    {
-	      if(tileId != tileIds[idx].toInt())
-		{
-		  tileId = tileIds[idx].toInt();
-		  ossimFilename filename = theCoverage.getLibrary()->getTileName(tileIds[idx].toInt());
-		  if(theCoverage.getPath().dirCat(filename).dirCat(primitiveName).exists())
-		    {
-		      primitiveTableName = theCoverage.getPath().dirCat(filename).dirCat(primitiveName);
-		    }
-		  else if(theCoverage.getPath().dirCat(filename.downcase()).dirCat(primitiveName).exists())
-		    {
-		      primitiveTableName = theCoverage.getPath().dirCat(filename.downcase()).dirCat(primitiveName);
-		    }
-		  if(!primitiveTable.openTable(primitiveTableName))
-		    {
-		      return;
-		    }
-		  coordinateValuePosition = primitiveTable.getColumnPosition("coordinate");
-		}
-	    }
-	  row_type row = read_row( columnValues[idx].toInt(), 
-				   *primitiveTable.getVpfTableData());
-
-	  ossim_int32 count = 0;
-	  ossimDpt* ptArray = getXy(*primitiveTable.getVpfTableData(),
-				    row,
-				    coordinateValuePosition,
-				    &count);
-	  
-	  if(ptArray)
-	    {
-	      for(int i = 0; i < count; ++i)
-		{
-		  if((fabs(ptArray[i].x) <= 180.0)&&
-		     (fabs(ptArray[i].y) <= 90.0))
-		    {
-		      centerPointArray.push_back(ossimGpt(ptArray[i].lat,
-							  ptArray[i].lon,
-							  ossim::nan()));
-		    }
-		}
-	      delete [] ptArray;
-	    }
-	  free_row(row,  *primitiveTable.getVpfTableData());
-	}
-    }
-  ossimGeoAnnotationMultiEllipseObject* annotation = new ossimGeoAnnotationMultiEllipseObject(centerPointArray,
-											      ossimDpt(2,2));
-  annotation->setColor(thePenColor.getR(),
-                       thePenColor.getG(),
-                       thePenColor.getB());
-  annotation->setThickness(theThickness);
-  annotation->setFillFlag(theFillEnabledFlag);
-  annotation->setWidthHeight(thePointRadius);
-  theAnnotationArray.push_back(annotation);
-}
-
-int myFaceCount = 0;
-
-void ossimVpfAnnotationFeatureInfo::buildFaceFeature(const ossimFilename& tableName,
-						     const ossimString&   tableKey, // face_id
-						     const ossimFilename& /* primitive */, //face
-						     const ossimString&   /* primitiveKey */) // id
-{
-   ossimFilename tableFileName      = theCoverage.getPath().dirCat(tableName);
-   ossimFilename primitiveTableName;
-   ossimFilename rngTableName;
-   ossimFilename edgTableName;
-   ossimVpfTable table;
-   ossimVpfTable primitiveTable;
-   ossimVpfTable rngTable;
-   ossimVpfTable edgTable;
-   vector<ossimGeoPolygon> thePolyList;
-  
-   if(table.openTable(tableFileName))
-   {
-      vector<ossimString> columnValues = table.getColumnValues(tableKey.trim()); // fac_id
-      vector<ossimString> tileIds;
-      bool isTiled = false;
-      if(table.getColumnPosition("tile_id") >= 0)
-      {
-         tileIds = table.getColumnValues("tile_id");
-         isTiled = true;
-      }
-      // ossim_int32 coordinateValuePosition = 0;
-      ossim_int32 startEdgePosition = 0;
-      ossim_int32 rngPtrPosition = 0;
-      if(!isTiled)
-      {
-         primitiveTableName = theCoverage.getPath().dirCat("fac");
-         rngTableName = theCoverage.getPath().dirCat("rng");
-         edgTableName = theCoverage.getPath().dirCat("edg");
-         if(!primitiveTable.openTable(primitiveTableName)||
-            !rngTable.openTable(rngTableName)||
-            !edgTable.openTable(edgTableName))
-         {
-            return;
-         }
-         // coordinateValuePosition = edgTable.getColumnPosition("coordinates");
-         startEdgePosition = rngTable.getColumnPosition("start_edge");
-         rngPtrPosition = primitiveTable.getColumnPosition("ring_ptr");
-      } // else will get for each face in loop below
-
-      ossim_int32 tileId = -1;
-
-      for(ossim_uint32 idx = 0; idx < columnValues.size();++idx) // for each face feature
-      {
-         if(isTiled)		// then get table names because we didn't get them above
-         {
-            if((tileId != tileIds[idx].toInt())||
-               (tileId < 0))
-            {
-               tileId = tileIds[idx].toInt();
-               ossimFilename filename = theCoverage.getLibrary()->getTileName(tileIds[idx].toInt());
-               if(theCoverage.getPath().dirCat(filename).dirCat("fac").exists())
-               {
-                  primitiveTableName = theCoverage.getPath().dirCat(filename).dirCat("fac");
-                  rngTableName = theCoverage.getPath().dirCat(filename).dirCat("rng");
-                  edgTableName = theCoverage.getPath().dirCat(filename).dirCat("edg");
-               }
-               else if(theCoverage.getPath().dirCat(filename.downcase()).dirCat("fac").exists())
-               {
-                  primitiveTableName = theCoverage.getPath().dirCat(filename.downcase()).dirCat("fac");
-                  rngTableName = theCoverage.getPath().dirCat(filename.downcase()).dirCat("rng");
-                  edgTableName = theCoverage.getPath().dirCat(filename.downcase()).dirCat("edg");
-               }
-               if(!primitiveTable.openTable(primitiveTableName)||
-                  !rngTable.openTable(rngTableName)||
-                  !edgTable.openTable(edgTableName))
-               {
-                  return;
-               }
-               // coordinateValuePosition = edgTable.getColumnPosition("coordinates");
-               startEdgePosition = rngTable.getColumnPosition("start_edge");
-               rngPtrPosition = primitiveTable.getColumnPosition("ring_ptr");
-            }
-         } // if(isTiled)
-
-         // get the outer ring id for this face
-         int thisFaceId = columnValues[idx].toInt();
-         int rngId = -1;
-
-         if (thisFaceId <= primitiveTable.getNumberOfRows())
-	    rngId = readRngId(thisFaceId,
-			      rngPtrPosition,
-			      primitiveTable);           // face table
-         else
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG) << "not getting face " << thisFaceId << " from tile " << tileId << " " << primitiveTableName <<
-                  " bacause it has only " << primitiveTable.getNumberOfRows() << " rows" << endl;
-            }
-
-         if(rngId > 0)
-         {
-            int startEdge = readStartEdgeId(rngId,
-                                            startEdgePosition,
-                                            rngTable);
-            int outerStartEdge = startEdge;
-            if(startEdge > 0 )
-            {
-               ossimGeoPolygon polygon;
-                 
-               myFaceCount ++;
-                 
-               int ringTableFaceIdColumn = rngTable.getColumnPosition("face_id");
-               int ringFaceId = readTableCellAsInt(rngId, ringTableFaceIdColumn, rngTable);
-                 
-               if (thisFaceId != ringFaceId) {
-                  // as of Mon Dec 20 2004, this has not been observed in vmap0 or vmap1
-                  if(traceDebug())
-                  {
-                     ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting face " << thisFaceId << " from " << tableFileName <<
-                        " because it's ring (" << rngId << ") has face " << ringFaceId << " and startEdgeId " << startEdge << endl;
-                  }
-               } else {
-                  readGeoPolygon( polygon,
-                                  thisFaceId,
-                                  startEdge,
-                                  edgTable );
-                    
-                  // get the inner rings (holes)
-                  int faceIdPosition = rngTable.getColumnPosition("face_id");
-                  int innerRingOffset = 1;
-                  int rowFaceId = -1;
-                  if (rngId + innerRingOffset <= rngTable.getNumberOfRows())
-                     rowFaceId = rngTable.getColumnValueAsString( rngId + innerRingOffset, faceIdPosition ).toInt();
-                  while (rowFaceId == thisFaceId && rngId + innerRingOffset <= rngTable.getNumberOfRows()) {	// while there are more inner rings
-                     startEdge = readStartEdgeId(rngId + innerRingOffset, startEdgePosition, rngTable);
-
-                     if (startEdge == outerStartEdge) {
-			// as of Mon Dec 20 2004, this has not been observed in vmap0 or vmap1
-                        if(traceDebug())
-                        {
-                           ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting hole in face "
-                                                               << thisFaceId << " because inner ring "
-                                                               << rngId + innerRingOffset
-                                                               << " touches outer ring " << rngId << endl;
-                        }
-
-			innerRingOffset ++;
-			rowFaceId = rngTable.getColumnValueAsString( rngId + innerRingOffset, faceIdPosition ).toInt();
-			continue;
-                     }
-
-                     if(startEdge > 0 )
-                     {
-                        ossimGeoPolygon holePolygon;
-		  
-                        readGeoPolygon( holePolygon,
-                                        thisFaceId,
-                                        startEdge,
-                                        edgTable );
-                        if(holePolygon.size())
-                           polygon.addHole( holePolygon );
-                     }
-
-                     innerRingOffset ++;
-                     if (rngId + innerRingOffset <= rngTable.getNumberOfRows())
-                        rowFaceId = rngTable.getColumnValueAsString( rngId + innerRingOffset, faceIdPosition ).toInt();
-                  }
-
-                  readAttributes(polygon, table, idx + 1); // third parm is one-based row
-
-                  thePolyList.push_back(polygon);
-               }
-            }
-         }
-      } // each fac_id
-   }
-   ossimGeoAnnotationMultiPolyObject* annotation = new ossimGeoAnnotationMultiPolyObject(thePolyList);
-   annotation->setColor(thePenColor.getR(),
-                        thePenColor.getG(),
-                        thePenColor.getB());
-   annotation->setThickness(theThickness);
-   annotation->setFillFlag(theFillEnabledFlag);
-  
-   theAnnotationArray.push_back(annotation);
-}
-
-void ossimVpfAnnotationFeatureInfo::readAttributes(ossimGeoPolygon& polygon, ossimVpfTable& table, int row) {
-  int numCols = table.getNumberOfColumns();
-
-  for (int col = 0; col < numCols; col ++) {
-    ossimString s = table.getColumnValueAsString( row, col );
-    polygon.addAttribute( s );
-  }
-}
-
-/* GET_XY                                                                    */
-/*****************************************************************************/
-ossimDpt *ossimVpfAnnotationFeatureInfo::getXy(vpf_table_type table, 
-					       row_type row, 
-					       ossim_int32 pos, 
-					       ossim_int32 *count)
-{
-   ossim_int32 i;
-   ossimDpt *coord = 0;
-  
-   switch (table.header[pos].type)
-   {
-      case 'C':
-      {
-         coordinate_type temp, *ptr;
-         ptr = (coordinate_type*)get_table_element(pos, row, table, &temp, count);
-         coord = new ossimDpt[*count];
-         if ((*count == 1) && (ptr == (coordinate_type*)0))
-         {
-            coord->x = (double)temp.x;
-            coord->y = (double)temp.y;
-         }
-         else 
-         {
-	    for (i=0; i<*count; i++)
-            {
-               coord[i].x = (double)ptr[i].x;
-               coord[i].y = (double)ptr[i].y;
-            }
-         }
-         if (ptr)
-         {
-            free((char *)ptr);
-         }
-         break;
-      }
-      case 'Z':
-      {
-         tri_coordinate_type temp, *ptr;
-         ptr = (tri_coordinate_type*)get_table_element (pos, row, table, &temp, count);
-	 coord = new ossimDpt[*count];
-         if ((*count == 1) && (ptr == (tri_coordinate_type*)0))
-         {
-            coord->x = (double)temp.x;
-            coord->y = (double)temp.y;
-         }
-         else
-         {
-            for (i=0; i<*count; i++)
-            {
-               coord[i].x = (double)ptr[i].x;
-               coord[i].y = (double)ptr[i].y;
-            }
-         }
-         if (ptr)
-         {
-            free ((char*)ptr);
-         }
-         break;
-      }
-      case 'B':
-      {
-         double_coordinate_type temp, *ptr;
-         ptr = (double_coordinate_type*)get_table_element (pos, row, table, &temp, count);
-         coord = new ossimDpt[*count];
-         if ((*count == 1) && (ptr == (double_coordinate_type*)0))
-         {
-            coord->x = temp.x;
-            coord->y = temp.y;
-         }
-         else
-         {
-	    for (i=0; i<*count; i++)
-            {
-               coord[i].x = ptr[i].x;
-               coord[i].y = ptr[i].y;
-            }
-         }
-         if (ptr)
-         {
-	    free ((char*)ptr);
-         }
-         break;
-      }
-      case 'Y':
-      {
-         double_tri_coordinate_type temp, *ptr;
-         ptr = (double_tri_coordinate_type*)get_table_element (pos, row, table, &temp, count);
-         coord = new ossimDpt[*count];
-         if ((*count == 1) && (ptr == (double_tri_coordinate_type*)0))
-         {
-            coord->x = temp.x;
-            coord->y = temp.y;
-         }
-         else
-         {
-            for (i=0; i<*count; i++)
-            {
-               coord[i].x = ptr[i].x;
-               coord[i].y = ptr[i].y;
-            }
-         }
-         if (ptr)
-         {
-	    free((char*)ptr);
-         }
-         break;
-      }
-      
-      default:
-         break;
-   } /* switch type */
-   return (coord);
-}
-
-int ossimVpfAnnotationFeatureInfo::readTableCellAsInt (int rowNumber,
-						       int colNumber,
-						       ossimVpfTable& table)
-{
-  int result = -1;
-  row_type row = read_row( rowNumber, *table.getVpfTableData());
-  
-  result = table.getColumnValueAsString(row, colNumber).toInt();
-  
-  free_row(row, *table.getVpfTableData());
-  
-  return result;
-}
-
-int ossimVpfAnnotationFeatureInfo::readRngId(int rowNumber,
-					     int colNumber,
-					     ossimVpfTable& faceTable)
-{
-  int idResult = -1;
-  row_type row = read_row( rowNumber, 
-			   *faceTable.getVpfTableData());
-  
-  idResult = faceTable.getColumnValueAsString(row,
-					      colNumber).toInt();
-  
-  free_row(row, *faceTable.getVpfTableData());
-  
-  return idResult;
-}
-
-int ossimVpfAnnotationFeatureInfo::readStartEdgeId(int rowNumber,
-						   int colNumber,
-						   ossimVpfTable& rngTable)
-{
-  int idResult = -1;
-
-  row_type row = read_row( rowNumber, 
-			   *rngTable.getVpfTableData());
-  
-  idResult = rngTable.getColumnValueAsString(row,
-					     colNumber).toInt();
-  
-  free_row(row, *rngTable.getVpfTableData());
-  
-  return idResult;
-  
-}
-
-int ossimVpfAnnotationFeatureInfo::getEdgeKeyId (vpf_table_type& table, row_type& row, int col) {
-    id_triplet_type key;
-    ossim_int32 keyCount;
-    get_table_element( col,
-		       row,
-		       table,
-		       & key,
-		       & keyCount );
-    return key.id;
-}
-
-void ossimVpfAnnotationFeatureInfo::readGeoPolygon(ossimGeoPolygon& polygon,
-						   int faceId,
-						   int startEdgeId,
-						   ossimVpfTable& edgTable) {
-
-  ossim_int32 coordinatesCol = edgTable.getColumnPosition( "coordinates" );
-  ossim_int32 startNodeCol = edgTable.getColumnPosition( "start_node" );
-  ossim_int32 endNodeCol = edgTable.getColumnPosition( "end_node" );
-  ossim_int32 rightEdgeCol = edgTable.getColumnPosition( "right_edge" );
-  ossim_int32 leftEdgeCol = edgTable.getColumnPosition( "left_edge" );
-  ossim_int32 rightFaceCol = edgTable.getColumnPosition( "right_face" );
-  ossim_int32 leftFaceCol = edgTable.getColumnPosition( "left_face" );
-
-  // collect edges
-  vector < int > edges;
-  int lastEdge = startEdgeId;
-  edges.push_back( lastEdge );
-
-  row_type row = read_row( startEdgeId, *edgTable.getVpfTableData() );
-  int startNode = edgTable.getColumnValueAsString( row, startNodeCol ).toInt();
-  int endNode = edgTable.getColumnValueAsString( row, endNodeCol ).toInt();
-
-  if (startNode != endNode) { // there's more than one edge to this ring
-    int rightFace = getEdgeKeyId( *edgTable.getVpfTableData(), row, rightFaceCol );
-    int leftFace = getEdgeKeyId( *edgTable.getVpfTableData(), row, leftFaceCol );
-    int rightEdge = getEdgeKeyId( *edgTable.getVpfTableData(), row, rightEdgeCol );
-    int leftEdge = getEdgeKeyId( *edgTable.getVpfTableData(), row, leftEdgeCol );
-    int nextEdge;
-    int firstNode, lastNode;
-
-    if (rightFace == leftFace) {
-      if (rightEdge == leftEdge) {
-	free_row(row,  *edgTable.getVpfTableData());
-	// as of Mon Dec 20 2004, this has not been observed in vmap0 or vmap1
-	// cout << "rejecting floating line face " << faceId << " line " << __LINE__ << endl;
-	return;
-      }
-
-      // this is a dangling start edge; find a non dangling edge to use as the start edge
-      int dirRight = 1;
-      int nextEdge = startEdgeId;
-      int nextLeftFace = leftFace;
-      int nextRightFace = rightFace;
-      int mobiusLimit = 1000;
-
-      while (nextLeftFace == nextRightFace) {
-	if (-- mobiusLimit < 0) {
-	    free_row(row,  *edgTable.getVpfTableData());
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting mobius face " << faceId << " line " << __LINE__ << endl;
-            }
-	    return;
-	}
-
-	int thisEdge = nextEdge;
-	if (dirRight) {
-	  nextEdge = getEdgeKeyId( *edgTable.getVpfTableData(), row, rightEdgeCol );
-	  if (nextEdge == thisEdge)
-	    dirRight = 0;
-	  else if (nextEdge == startEdgeId) {
-	    free_row(row,  *edgTable.getVpfTableData());
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting mobius face " << faceId << " line " << __LINE__ << endl;
-            }
-	    return;
-	  }
-	} else {
-	  nextEdge = getEdgeKeyId( *edgTable.getVpfTableData(), row, leftEdgeCol );
-	  if (nextEdge == thisEdge) {
-	    free_row(row,  *edgTable.getVpfTableData());
-	    // as of Mon Dec 20 2004, this has not been observed in vmap0 or vmap1
-	    // cout << "rejecting multi floating line face " << faceId << " line " << __LINE__ << endl;
-	    return;
-	  } else if (nextEdge == startEdgeId) {
-	    free_row(row,  *edgTable.getVpfTableData());
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting mobius face " << faceId << " line " << __LINE__ << endl;
-            }
-	    return;
-	  }
-	}
-	free_row(row,  *edgTable.getVpfTableData());
-	row = read_row( nextEdge, *edgTable.getVpfTableData() );
-	nextRightFace = getEdgeKeyId( *edgTable.getVpfTableData(), row, rightFaceCol );
-	nextLeftFace = getEdgeKeyId( *edgTable.getVpfTableData(), row, leftFaceCol );
-      }
-
-      startEdgeId = nextEdge;
-      rightFace = nextRightFace;
-      leftFace = nextLeftFace;
-      free_row(row,  *edgTable.getVpfTableData());
-      row = read_row( startEdgeId, *edgTable.getVpfTableData() );
-      startNode = edgTable.getColumnValueAsString( row, startNodeCol ).toInt();
-      endNode = edgTable.getColumnValueAsString( row, endNodeCol ).toInt();
-    }
-
-    if (rightFace == faceId) {
-      nextEdge = getEdgeKeyId( *edgTable.getVpfTableData(), row, rightEdgeCol );
-      firstNode = startNode;
-      lastNode = endNode;
-    } else if (leftFace == faceId) {
-      nextEdge = getEdgeKeyId( *edgTable.getVpfTableData(), row, leftEdgeCol );
-      firstNode = endNode;
-      lastNode = startNode;
-    }
-    else
-    {
-       if(traceDebug())
-       {
-          ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting face " << faceId << " line " << __LINE__ << endl;
-       }
-       return;
-    }
-
-    row_type nextRow;
-    while (true) {
-      nextRow = read_row( nextEdge, *edgTable.getVpfTableData() );
-      int nextLeftEdge = getEdgeKeyId( *edgTable.getVpfTableData(), nextRow, leftEdgeCol );
-      int nextRightEdge = getEdgeKeyId( *edgTable.getVpfTableData(), nextRow, rightEdgeCol );
-      int nextLeftFace = getEdgeKeyId( *edgTable.getVpfTableData(), nextRow, leftFaceCol );
-      int nextRightFace = getEdgeKeyId( *edgTable.getVpfTableData(), nextRow, rightFaceCol );
-      int nextStartNode = edgTable.getColumnValueAsString( nextRow, startNodeCol ).toInt();
-      int nextEndNode = edgTable.getColumnValueAsString( nextRow, endNodeCol ).toInt();
-
-      while (nextLeftFace == nextRightFace) {
-	int lastEnd;
-	if (rightFace == faceId)
-	  lastEnd = edgTable.getColumnValueAsString( row, endNodeCol ).toInt();
-	else
-	  lastEnd = edgTable.getColumnValueAsString( row, startNodeCol ).toInt();
-
-	if (lastEnd == nextStartNode)
-	  nextEdge = nextLeftEdge;
-	else if (lastEnd == nextEndNode)
-	  nextEdge = nextRightEdge;
-	else {			// bad face
-           if(traceDebug())
-           {
-              ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting face " << faceId << " line " << __LINE__ << endl;
-           }
-	  return;
-	}
-	if (lastEdge == nextEdge)
-        { // bad face
-           if(traceDebug())
-           {
-              ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting face " << faceId << " line " << __LINE__ << endl;
-           }
-           return;
-	}
-
-	free_row(nextRow,  *edgTable.getVpfTableData());
-	nextRow = read_row( nextEdge, *edgTable.getVpfTableData() );
-	nextLeftEdge = getEdgeKeyId( *edgTable.getVpfTableData(), nextRow, leftEdgeCol );
-	nextRightEdge = getEdgeKeyId( *edgTable.getVpfTableData(), nextRow, rightEdgeCol );
-	nextLeftFace = getEdgeKeyId( *edgTable.getVpfTableData(), nextRow, leftFaceCol );
-	nextRightFace = getEdgeKeyId( *edgTable.getVpfTableData(), nextRow, rightFaceCol );
-	nextStartNode = edgTable.getColumnValueAsString( nextRow, startNodeCol ).toInt();
-	nextEndNode = edgTable.getColumnValueAsString( nextRow, endNodeCol ).toInt();
-      }
-	
-      lastEdge = nextEdge;
-      edges.push_back( lastEdge );
-
-      {
-	int lastEnd;
-	if (nextRightFace == faceId) {
-	  if (lastNode != nextStartNode) {
-             if(traceDebug())
-             {
-                ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting face " << faceId << " line " << __LINE__ << endl;
-             }
-	    return;
-	  }
-	  lastEnd = nextEndNode;
-	} else if (nextLeftFace == faceId) {
-	  if (lastNode != nextEndNode) {
-             if(traceDebug())
-             {
-                ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting face " << faceId << " line " << __LINE__ << endl;
-             }
-	    return;
-	  }
-	  lastEnd = nextStartNode;
-	} else {
-           if(traceDebug())
-           {
-              ossimNotify(ossimNotifyLevel_DEBUG) << "rejecting face " << faceId << " line " << __LINE__ << endl;
-           }
-	  return;
-	}
-
-	if (lastEnd == firstNode)
-	  break;
-      }
-
-      free_row(row,  *edgTable.getVpfTableData());
-      row = nextRow;
-      startNode = nextStartNode;
-      endNode = nextEndNode;
-      rightFace = nextRightFace;
-      leftFace = nextLeftFace;
-
-      if (rightFace == faceId) {
-	nextEdge = nextRightEdge;
-	lastNode = endNode;
-      } else {
-	nextEdge = nextLeftEdge;
-	lastNode = startNode;
-      }
-    }
-
-    free_row(nextRow,  *edgTable.getVpfTableData());
-    nextRow = 0;
-  }
-
-  for (vector< int >::iterator i = edges.begin(); i != edges.end(); i++) {
-    ossim_int32 count = 0;
-    free_row(row,  *edgTable.getVpfTableData());
-    row = read_row( *i, *edgTable.getVpfTableData() );
-    ossimDpt* ptArray = getXy(*edgTable.getVpfTableData(),
-			      row,
-			      coordinatesCol,
-			      &count);
-  
-    if(ptArray)
-    {
-       int rightFace = getEdgeKeyId( *edgTable.getVpfTableData(), row, rightFaceCol );
-       
-       if (rightFace == faceId)
-       {
-	  for(int p = 0; p < count; ++p)
-          {
-             if((fabs(ptArray[p].x) <= 180.0)&&
-                (fabs(ptArray[p].y) <= 90.0))
-             {
-                polygon.addPoint(ptArray[p].y, ptArray[p].x);
-             }
-          }
-       }
-       else
-       {
-	  for(int p = count - 1; p >= 0; --p)
-          {
-             if((fabs(ptArray[p].x) <= 180.0)&&
-                (fabs(ptArray[p].y) <= 90.0))
-             {
-                polygon.addPoint(ptArray[p].y, ptArray[p].x);
-             }
-          }
-       }
-       delete [] ptArray;
-    }
-  }
-  free_row(row,  *edgTable.getVpfTableData());
-}
-
-void ossimVpfAnnotationFeatureInfo::readEdge(ossimPolyLine& polyLine,
-					     int rowNumber,
-					     int colPosition,
-					     ossimVpfTable& edgeTable)
-{
-  polyLine.clear();
-  row_type row = read_row( rowNumber, 
-			   *edgeTable.getVpfTableData());
-
-  ossim_int32 count = 0;
-  ossimDpt* ptArray = getXy(*edgeTable.getVpfTableData(),
-			    row,
-			    colPosition,
-			    &count);
-  
-  if(ptArray)
-    {
-      for(int i = 0; i < count; ++i)
-	{
-	  if((fabs(ptArray[i].x) <= 180.0)&&
-	     (fabs(ptArray[i].y) <= 90.0))
-	    {
-	      polyLine.addPoint(ossimDpt(ptArray[i].x,
-					 ptArray[i].y));
-	    }
-	}
-      delete [] ptArray;
-    }
-  free_row(row,  *edgeTable.getVpfTableData());
-}
-
-
diff --git a/src/ossim/imaging/ossimVpfAnnotationLibraryInfo.cpp b/src/ossim/imaging/ossimVpfAnnotationLibraryInfo.cpp
deleted file mode 100644
index dcb2134..0000000
--- a/src/ossim/imaging/ossimVpfAnnotationLibraryInfo.cpp
+++ /dev/null
@@ -1,259 +0,0 @@
-//*************************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-//**************************************************************************
-// $Id: ossimVpfAnnotationLibraryInfo.cpp 15836 2009-10-30 12:29:09Z dburken $
-
-#include <algorithm>
-
-#include <ossim/imaging/ossimVpfAnnotationLibraryInfo.h>
-#include <ossim/imaging/ossimVpfAnnotationFeatureInfo.h>
-#include <ossim/vec/ossimVpfLibrary.h>
-#include <ossim/vec/ossimVpfDatabase.h>
-#include <ossim/base/ossimTrace.h>
-
-static ossimTrace traceDebug("ossimVpfAnnotationLibraryInfo:debug");
-
-
-ossimVpfAnnotationLibraryInfo::ossimVpfAnnotationLibraryInfo(const ossimString& libraryName, bool enabledFlag)
-   :
-      theName(libraryName),
-      theEnabledFlag(enabledFlag),
-      theDatabase(NULL)
-{
-}
-
-ossimVpfAnnotationLibraryInfo::~ossimVpfAnnotationLibraryInfo()
-{
-   deleteAllCoverage();
-}
-
-bool ossimVpfAnnotationLibraryInfo::getEnabledFlag()const
-{
-   return theEnabledFlag;
-}
-
-void ossimVpfAnnotationLibraryInfo::setEnabledFlag(bool flag)
-{
-   theEnabledFlag = flag;
-}
-
-const ossimString& ossimVpfAnnotationLibraryInfo::getName()const
-{
-   return theName;
-}
-
-void ossimVpfAnnotationLibraryInfo::setName(const ossimString& libraryName)
-{
-   theName = libraryName;
-}
-
-void ossimVpfAnnotationLibraryInfo::setDatabase(ossimVpfDatabase* database)
-{
-   theDatabase = database;
-}
-
-ossimVpfDatabase* ossimVpfAnnotationLibraryInfo::getDatabase()
-{
-   return theDatabase;
-}
-
-ossimIrect ossimVpfAnnotationLibraryInfo::getBoundingProjectedRect()const
-{
-   ossimIrect result;
-   result.makeNan();
-   
-   for(ossim_uint32 idx = 0; idx < theCoverageLayerList.size(); ++idx)
-   {
-      ossimIrect tempRect = theCoverageLayerList[idx]->getBoundingProjectedRect();
-      if(!tempRect.hasNans())
-      {
-         if(result.hasNans())
-         {
-            result = tempRect;
-         }
-         else
-         {
-            result = result.combine(tempRect);
-         }
-      }
-   }
-   
-   return result;
-}
-
-void ossimVpfAnnotationLibraryInfo::getAllFeatures(std::vector<ossimVpfAnnotationFeatureInfo*>& features)
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimVpfAnnotationLibraryInfo::getAllFeatures DEBUG: entered..." << std::endl;
-   }
-   
-   for(ossim_uint32 idx = 0; idx < theCoverageLayerList.size(); ++idx)
-   {
-      theCoverageLayerList[idx]->getAllFeatures(features);
-   }
-   
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimVpfAnnotationLibraryInfo::getAllFeatures DEBUG: leaving..." << std::endl;
-   }
-}
-
-void ossimVpfAnnotationLibraryInfo::transform(ossimImageGeometry* geom)
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimVpfAnnotationLibraryInfo::transform DEBUG: entered..." << std::endl;
-   }
-   
-   
-   for(ossim_uint32 idx = 0; idx < theCoverageLayerList.size(); ++idx)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << "transforming coverage = " << theCoverageLayerList[idx]->getName() << std::endl;
-      }
-      
-      theCoverageLayerList[idx]->transform(geom);
-   }
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimVpfAnnotationLibraryInfo::transform DEBUG: leaving..." << std::endl;
-   }
-}
-
-void ossimVpfAnnotationLibraryInfo::buildLibrary()
-{
-   buildLibrary( "", "");
-}
-
-void ossimVpfAnnotationLibraryInfo::buildLibrary(const ossimString& coverageName, const ossimString& feature)
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimVpfAnnotationLibraryInfo::buildLibrary DEBUG: entered..." << std::endl;
-   }
-   deleteAllCoverage();
-   if(!theDatabase)
-   {
-      return;
-   }
-   
-   ossimVpfLibrary* library = theDatabase->getLibrary(theName);
-   if(library)
-   {
-      std::vector<ossimString> coverageNames;
-      library->getCoverageNames(coverageNames);
-      for(ossim_uint32 idx = 0; idx < coverageNames.size(); ++idx)
-      {
-         ossimString s1 = coverageName;
-         ossimString s2 = coverageNames[idx];
-         s1.downcase();
-         s2.downcase();
-         if ( ! coverageName.length() || (s1 == s2) )
-         {
-            ossimVpfAnnotationCoverageInfo* coverageInfo =
-               new ossimVpfAnnotationCoverageInfo;
-            coverageInfo->setName(coverageNames[idx]);
-            coverageInfo->setLibrary(library);
-            theCoverageLayerList.push_back(coverageInfo);
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG) << "coverage name = " << coverageNames[idx] << std::endl;
-            }
-            coverageInfo->buildCoverage(feature);
-         }
-      }
-   }
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimVpfAnnotationLibraryInfo::buildLibrary DEBUG: leaving..." << std::endl;
-   }
-}
-
-
-void ossimVpfAnnotationLibraryInfo::drawAnnotations(ossimRgbImage* tile)
-{
-  for(ossim_uint32 idx = 0; idx < theCoverageLayerList.size(); ++idx)
-    {
-      theCoverageLayerList[idx]->drawAnnotations(tile);
-    }
-}
-
-void ossimVpfAnnotationLibraryInfo::deleteAllCoverage()
-{
-  for(ossim_uint32 idx = 0; idx < theCoverageLayerList.size(); ++idx)
-    {
-      delete theCoverageLayerList[idx];
-    }
-
-  theCoverageLayerList.clear();
-}
-
-bool ossimVpfAnnotationLibraryInfo::saveState(ossimKeywordlist& kwl,
-					      const char* prefix)const
-{
-   ossim_uint32 idx;
-   
-   kwl.add(prefix,
-           "name",
-           theName,
-           true);
-   
-   for(idx = 0; idx < theCoverageLayerList.size(); ++idx)
-   {
-      theCoverageLayerList[idx]->saveState(kwl,
-					   (ossimString(prefix) + "coverage" + ossimString::toString(idx) + ".").c_str());
-   }
-   
-   return true;
-}
-
-bool ossimVpfAnnotationLibraryInfo::loadState(const ossimKeywordlist& kwl,
-					      const char* prefix)
-{
-  deleteAllCoverage();
-  theName = kwl.find(prefix, "name");
-  
-  ossimVpfLibrary* library = theDatabase->getLibrary(theName);
-
-  if(!library)
-    {
-      return false;
-    }
-  ossimString regExpression =  ossimString("^(") + ossimString(prefix) + "coverage[0-9]+.)";
-  vector<ossimString> keys =
-    kwl.getSubstringKeyList( regExpression );
-  std::vector<int> theNumberList(keys.size());
-  int offset = (int)(ossimString(prefix)+"coverage").size();
-  int idx = 0;
-  for(idx = 0; idx < (int)theNumberList.size();++idx)
-    {
-      ossimString numberStr(keys[idx].begin() + offset,
-			    keys[idx].end());
-      theNumberList[idx] = numberStr.toInt();
-    }
-  std::sort(theNumberList.begin(), theNumberList.end());
-  
-  for(idx = 0; idx < (int)keys.size(); ++idx)
-    {
-      ossimString newPrefix = ossimString(prefix);
-      newPrefix += ossimString("coverage");
-      newPrefix += ossimString::toString(theNumberList[idx]);
-      newPrefix += ossimString(".");
-      ossimVpfAnnotationCoverageInfo* coverageInfo = new ossimVpfAnnotationCoverageInfo;
-      coverageInfo->setLibrary(library);
-      theCoverageLayerList.push_back(coverageInfo);
-      coverageInfo->loadState(kwl,
-			      newPrefix);
-    }
-  
-  return true;
-}
diff --git a/src/ossim/init/.cvsignore b/src/ossim/init/.cvsignore
deleted file mode 100644
index a438335..0000000
--- a/src/ossim/init/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.d
diff --git a/src/ossim/init/ossimInit.cpp b/src/ossim/init/ossimInit.cpp
deleted file mode 100644
index bae6d84..0000000
--- a/src/ossim/init/ossimInit.cpp
+++ /dev/null
@@ -1,716 +0,0 @@
-//*****************************************************************************
-// FILE: ossimInit.cpp
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// DESCRIPTION:
-//   Contains implementation of class ossimInit. This object handles all
-//   aspects of initialization for OSSIM applications. These tasks include:
-//
-//      1. Parsing the command line.
-//      2. Instantiating all class factories.
-//      3. Initializing the "trace" code execution tracing functionality.
-//      4. Scanning the preferences file for relevant values.
-//
-// SOFTWARE HISTORY:
-//   24Apr2001  Oscar Kramer
-//              Initial coding.
-//*****************************************************************************
-// $Id: ossimInit.cpp 22278 2013-06-08 01:19:14Z gpotts $
-
-
-#include <ossim/init/ossimInit.h>
-#include <ossim/ossimVersion.h>
-#include <ossim/base/ossimPreferences.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <ossim/base/ossimTraceManager.h>
-#include <algorithm>
-#include <ossim/base/ossimEnvironmentUtility.h>
-#include <ossim/base/ossimGeoidEgm96.h>
-//***
-// Define Trace flags for use within this file:
-//***
-#include <ossim/base/ossimTrace.h>
-
-// include the image file formats
-#include <ossim/base/ossimObjectFactoryRegistry.h>
-#include <ossim/imaging/ossimImageSourceFactoryRegistry.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/base/ossim2dTo2dTransformRegistry.h>
-#include <ossim/imaging/ossimImageGeometryRegistry.h>
-#include <ossim/elevation/ossimElevManager.h>
-#include <ossim/base/ossimGeoidManager.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/imaging/ossimOverviewBuilderFactoryRegistry.h>
-#include <ossim/imaging/ossimOverviewBuilderFactory.h>
-
-#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
-#include <ossim/imaging/ossimImageMetaDataWriterRegistry.h>
-#include <ossim/projection/ossimProjectionViewControllerFactory.h>
-#include <ossim/base/ossimDatumFactoryRegistry.h>
-#include <ossim/base/ossimBaseObjectFactory.h>
-#include <ossim/base/ossimCustomEditorWindowRegistry.h>
-#include <ossim/base/ossimDirectory.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/plugin/ossimSharedPluginRegistry.h>
-#include <ossim/plugin/ossimDynamicLibrary.h>
-#include <ossim/font/ossimFontFactoryRegistry.h>
-#include <ossim/base/ossimNotifyContext.h>
-
-
-static ossimTrace traceExec = ossimTrace("ossimInit:exec");
-static ossimTrace traceDebug = ossimTrace("ossimInit:debug");
-
-ossimInit* ossimInit::theInstance = 0;
-
-ossimInit::~ossimInit()
-{
-   theInstance = 0;
-}
-
-ossimInit::ossimInit()
-    :
-       theInitializedFlag(false),
-       theAppName(),
-       thePreferences(ossimPreferences::instance()),
-       theElevEnabledFlag(true),
-       thePluginLoaderEnabledFlag(true)
-{
-}
-
-ossimInit* ossimInit::instance()
-{
-   static OpenThreads::Mutex m;
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m);
-   if (!theInstance)
-   {
-      theInstance = new ossimInit();
-   }
-   return theInstance;
-}
-
-void ossimInit::addOptions(ossimArgumentParser& parser)
-{
-   parser.getApplicationUsage()->addCommandLineOption("-P", "specify a preference file to load");
-   parser.getApplicationUsage()->addCommandLineOption("-K", "specify individual keywords to add to the preferences keyword list: name=value");
-   parser.getApplicationUsage()->addCommandLineOption("-T", "specify the classes to trace, ex: ossimInit|ossimImage.* \nwill trace ossimInit and all ossimImage classes");
-   parser.getApplicationUsage()->addCommandLineOption("--disable-elev", "Will disable the elevation");
-   parser.getApplicationUsage()->addCommandLineOption("--disable-plugin", "Will disable the plugin loader");
-   
-   parser.getApplicationUsage()->addCommandLineOption("--ossim-logfile", "takes a logfile as an argument.  All output messages are redirected to the specified log file.  By default there is no log file and all messages are enabled.");
-   parser.getApplicationUsage()->addCommandLineOption("--disable-notify", "Takes an argument. Arguments are ALL, WARN, NOTICE, INFO, FATAL, DEBUG.  If you want multiple disables then just do multiple --disable-notify on the command line.  All argument are case insensitive.  Default is all are enabled.");
-   parser.getApplicationUsage()->addCommandLineOption("-V or --version", "Display version information.");
-}
-
-/*!****************************************************************************
- * METHOD: ossimInit::initialize()
- *  
- *  Method called from the OSSIM application main.
- *  
- *****************************************************************************/
-void ossimInit::initialize(int& argc, char** argv)
-{
-    static OpenThreads::Mutex m;
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m);
-  if( !theInitializedFlag )
-   {
-      ossimArgumentParser argumentParser(&argc, argv);
-      theInstance->initialize(argumentParser);
-   }
-}
-
-void ossimInit::initialize(ossimArgumentParser& parser)
-{
-   static OpenThreads::Mutex m;
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m);
-   if(theInitializedFlag)
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG ossimInit::initialize(parser):"
-            << " Already initialized, returning......"
-            << std::endl;
-      }
-      return;
-   }
-
-   theInstance->theAppName  = parser.getApplicationUsage()->getApplicationName();
-   theInstance->parseNotifyOption(parser);
-   theInstance->thePreferences = ossimPreferences::instance();
-      
-   //Parse the command line:
-   theInstance->parseOptions(parser);
-
-   theInstance->initializeDefaultFactories();
-   
-   if ( theElevEnabledFlag )
-   {
-      theInstance->initializeElevation();
-   }
-
-   theInstance->initializeLogFile();
-   
-   if(thePluginLoaderEnabledFlag)
-   {
-      theInstance->initializePlugins();
-   }
-   
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossim preferences file: "
-         << theInstance->thePreferences->getPreferencesFilename()
-         << "\nVersion: " << version()
-         << "\nossimInit::initialize(parser): leaving..." << std::endl;
-   }
-   
-   theInitializedFlag = true;
-}
-
-void ossimInit::initialize()
-{
-    static OpenThreads::Mutex m;
-   OpenThreads::ScopedLock<OpenThreads::Mutex> lock(m);
-   if(theInitializedFlag)
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG ossimInit::initialize(): Already initialized, returning......" << std::endl;
-      }
-      return;
-   }
-
-   theInstance->theAppName  = "";
-   theInstance->thePreferences = ossimPreferences::instance();
-   theInstance->initializeDefaultFactories();
-   
-   if ( theElevEnabledFlag )
-   {
-      theInstance->initializeElevation();
-   }
-
-   theInstance->initializeLogFile();
-
-   //---
-   // To do:
-   // We need a mechanism to register factories to the "front" or the
-   // "back" of factory list so that plugins can override things.  For
-   // now we will initialize the plugins last...
-   //---
-   if(thePluginLoaderEnabledFlag)
-   {
-      theInstance->initializePlugins();
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossim preferences file: "
-         << theInstance->thePreferences->getPreferencesFilename()
-         << "\nVersion: " << version()
-         << "\nossimInit::initialize() leaving..."
-         << std::endl;
-   } 
-   
-   theInitializedFlag = true;
-}
-
-void ossimInit::finalize()
-{
-   
-}
-/*!****************************************************************************
- *  Prints to stdout the list of command line options that this object parses.
- *****************************************************************************/
-void ossimInit::usage()
-{
-   ossimNotify(ossimNotifyLevel_INFO)
-      << "INFORMATION ossimInit::usage():\n"
-      << "Additional command-line options available are as follows: "
-      << "\n"
-      << "\n  -P<pref_filename> -- Allows the user to override the loading "
-      << "\n    of the default preferences with their own pref file."
-      << "\n"
-      << "\n  -K<keyword>[=<value>] -- Allows the user to specify additional"
-      << "\n    keyword/value pairs that are added onto the preferences "
-      << "\n    previously loaded. Keywords specified here override those in"
-      << "\n    the preferences file."
-      << "\n"
-      << "\n  -T<trace_tag> -- Lets user turn on specific trace flags."
-      << "\n"
-      << "\n  -S<session_filename> -- Allows user to specify a session file"
-      << "\n    to load."
-      << "\n  -V or --version -- Outputs version information."
-      << std::endl;
-   return;
-}
-
-bool ossimInit::getElevEnabledFlag() const
-{
-   return theElevEnabledFlag;
-}
-
-void ossimInit::setElevEnabledFlag(bool flag)
-{
-   theElevEnabledFlag = flag; 
-}
-
-void ossimInit::setPluginLoaderEnabledFlag(bool flag)
-{
-   thePluginLoaderEnabledFlag = flag;  
-}
-
-void ossimInit::loadPlugins(const ossimFilename& plugin, const char* options)
-{
-   if(!thePluginLoaderEnabledFlag) return;
-
-   if(plugin.exists())
-   {
-      if(plugin.isDir())
-      {
-         ossimDirectory dir;
-         if(dir.open(plugin))
-         {
-            ossimFilename file;
-            
-            if(dir.getFirst(file,
-                            ossimDirectory::OSSIM_DIR_FILES))
-            {
-               do
-               { 
-                  ossimSharedPluginRegistry::instance()->registerPlugin(file, options);
-               }
-               while(dir.getNext(file));
-            }
-         }
-      }
-      else
-      {
-         ossimSharedPluginRegistry::instance()->registerPlugin(plugin, options);
-      }
-   }
-}
-
-void ossimInit::parseOptions(ossimArgumentParser& parser)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
-      << "DEBUG ossimInit::parseOptions: entering..." << std::endl;
-   
-   std::string tempString;
-   ossimArgumentParser::ossimParameter stringParameter(tempString);
-   while(parser.read("-P", stringParameter));
-
-   if(tempString != "")
-   {
-      thePreferences->loadPreferences(ossimFilename(tempString));
-   }
-   while(parser.read("-K", stringParameter))
-   {
-      ossimString option = tempString;
-      if (option.contains("=") )
-      {
-         ossimString delimiter = "=";
-         ossimString key (option.before(delimiter));
-         ossimString value = option.after(delimiter);
-         thePreferences->addPreference(key.c_str(), value.c_str());
-      }
-      else
-      {
-         ossimString key (option);
-         thePreferences->addPreference(key, "");
-      }
-   }
-
-   while(parser.read("-T", stringParameter))
-   {
-      ossimTraceManager::instance()->setTracePattern(ossimString(tempString));
-   }
-
-   while(parser.read("--ossim-logfile", stringParameter))
-   {
-      ossimSetLogFilename(ossimFilename(tempString));
-   }
-   while(parser.read("--disable-notify", stringParameter))
-   {
-      ossimString tempDownCase = tempString;
-      tempDownCase = tempDownCase.downcase();
-
-      if(tempDownCase == "warn")
-      {
-         ossimDisableNotify(ossimNotifyFlags_WARN);
-      }
-      else if(tempDownCase == "fatal")
-      {
-         ossimDisableNotify(ossimNotifyFlags_FATAL);
-      }
-      else if(tempDownCase == "debug")
-      {
-         ossimDisableNotify(ossimNotifyFlags_DEBUG);
-      }
-      else if(tempDownCase == "info")
-      {
-         ossimDisableNotify(ossimNotifyFlags_INFO);
-      }
-      else if(tempDownCase == "notice")
-      {
-         ossimDisableNotify(ossimNotifyFlags_NOTICE);
-      }
-      else if(tempDownCase == "all")
-      {
-         ossimDisableNotify(ossimNotifyFlags_ALL);
-      }
-   }
-   if(parser.read("--disable-elev"))
-   {
-      theElevEnabledFlag = false;
-   }
-   if(parser.read("--disable-plugin"))
-   {
-      thePluginLoaderEnabledFlag = false;
-   }
-   if (parser.read("--version") || parser.read("-V")) 
-   {
-      ossimNotify(ossimNotifyLevel_NOTICE)
-         << "\n" << parser.getApplicationName().c_str() << " " << version() << std::endl;
-   }
-}
-
-void ossimInit::parseNotifyOption(ossimArgumentParser& parser)
-{
-   std::string tempString;
-   ossimArgumentParser::ossimParameter stringParameter(tempString);
-   while(parser.read("--disable-notify", stringParameter))
-   {
-      ossimString tempDownCase = tempString;
-      tempDownCase = tempDownCase.downcase();
-
-      if(tempDownCase == "warn")
-      {
-         ossimDisableNotify(ossimNotifyFlags_WARN);
-      }
-      else if(tempDownCase == "fatal")
-      {
-         ossimDisableNotify(ossimNotifyFlags_FATAL);
-      }
-      else if(tempDownCase == "debug")
-      {
-         ossimDisableNotify(ossimNotifyFlags_DEBUG);
-      }
-      else if(tempDownCase == "info")
-      {
-         ossimDisableNotify(ossimNotifyFlags_INFO);
-      }
-      else if(tempDownCase == "notice")
-      {
-         ossimDisableNotify(ossimNotifyFlags_NOTICE);
-      }
-      else if(tempDownCase == "all")
-      {
-         ossimDisableNotify(ossimNotifyFlags_ALL);
-      }
-   }
-}
-
-/*!****************************************************************************
- * METHOD: ossimInit::removeOption()
- *  
- * Removes all characters associated with the indicated option from the
- * command line string.
- *  
- *****************************************************************************/
-void ossimInit::removeOption(int& argc,
-                             char** argv,
-                             int argToRemove)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
-      << "DEBUG ossimInit::removeOption(argc, argv, argToRemove): entering..."
-      << std::endl;
-   
-   // Shift the args up by one position, overwriting the arg being removed:
-   for (int i=argToRemove+1; i<argc;  i++)
-   {
-      argv[i - 1] = argv[i];
-   }
-   
-   argc--;
-   argv[argc] = 0;
-   
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
-      << "DEBUG ossimInit::removeOption(argc, argv, argToRemove): leaving..."
-      << std::endl;
-   return;
-}
-
-void ossimInit::initializeDefaultFactories()
-{
-   ossimObjectFactoryRegistry::instance()->registerFactory(ossimImageSourceFactoryRegistry::instance());
-
-   //---
-   // Because of how the imagehandlers work off a magic number make sure
-   // we place the writer first if we don't then the imagehandler will
-   // be false and will then try to open the filename and go through a
-   // magic number and if the file already
-   // existed it will open and create a handler instead of a writer.
-   //---
-   ossimImageWriterFactoryRegistry::instance();
-   ossimDatumFactoryRegistry::instance();
-   ossimImageMetaDataWriterRegistry::instance();
-   ossimImageHandlerRegistry::instance();
-   ossim2dTo2dTransformRegistry::instance();
-   ossimImageGeometryRegistry::instance();
-   // Initialize the overview factories.
-   ossimOverviewBuilderFactoryRegistry::instance()->
-      registerFactory(ossimOverviewBuilderFactory::instance(), true);
-   
-   ossimObjectFactoryRegistry::instance()->addFactory(ossimBaseObjectFactory::instance());
-   
-   // initialize. projection factory.
-   ossimProjectionFactoryRegistry::instance();
-
-   // add the view controllers
-   ossimObjectFactoryRegistry::instance()->registerFactory(ossimProjectionViewControllerFactory::instance());
-
-   ossimFontFactoryRegistry::instance();
-}
-
-void ossimInit::initializePlugins()
-{      
-   ossimString regExpressionDir =  ossimString("^(") + "plugin.dir[0-9]+)";
-   ossimString regExpressionFile =  ossimString("^(") + "plugin.file[0-9]+)";
-
-   const ossimKeywordlist& kwl = thePreferences->preferencesKWL();
-
-   vector<ossimString> keys = kwl.getSubstringKeyList( regExpressionDir );
-
-   ossim_uint32 numberOfDirs = (ossim_uint32)keys.size();
-   ossim_uint32 offset = (ossim_uint32)ossimString("plugin.dir").size();
-   int idx = 0;
-   
-   std::vector<int> numberList(numberOfDirs);
-   
-   // register user plugins first
-   ossimFilename userPluginDir = ossimEnvironmentUtility::instance()->getUserOssimPluginDir();
-   loadPlugins(userPluginDir);
-
-   if(numberList.size()>0)
-   {
-      for(idx = 0; idx < (int)numberList.size();++idx)
-      {
-         ossimString numberStr(keys[idx].begin() + offset,
-                               keys[idx].end());
-         numberList[idx] = numberStr.toInt();
-      }
-      
-      std::sort(numberList.begin(), numberList.end());
-      for(idx=0;idx < (int)numberList.size();++idx)
-      {
-         ossimString newPrefix = "plugin.dir";
-         newPrefix += ossimString::toString(numberList[idx]);
-         const char* directory = kwl.find(newPrefix.c_str());
-         
-         if(directory)
-         {
-            loadPlugins(ossimFilename(directory));
-         }
-      }
-   }
-   keys = kwl.getSubstringKeyList( regExpressionFile );
-   
-   ossim_uint32 numberOfFiles = (ossim_uint32)keys.size();
-   offset = (ossim_uint32)ossimString("plugin.file").size();
-   numberList.resize(numberOfFiles);
-   if(numberList.size()>0)
-   {
-      for(idx = 0; idx < (int)numberList.size();++idx)
-      {
-         ossimString numberStr(keys[idx].begin() + offset,
-                               keys[idx].end());
-         numberList[idx] = numberStr.toInt();
-      }
-      
-      std::sort(numberList.begin(), numberList.end());   
-      for(idx=0;idx < (int)numberList.size();++idx)
-      {
-         ossimString newPrefix="plugin.file";
-         newPrefix += ossimString::toString(numberList[idx]);
-         const char* file = kwl.find(newPrefix.c_str());
-         
-         if(file&&ossimFilename(file).exists())
-         {
-            loadPlugins(file);
-//             ossimSharedPluginRegistry::instance()->registerPlugin(file);
-         }
-      }
-   }
-   
-   // now check new plugin loading that supports passing options to the plugins
-   // 
-   regExpressionFile =  ossimString("^(") + "plugin[0-9]+\\.file)";
-   keys = kwl.getSubstringKeyList( regExpressionFile );
-   
-   numberOfFiles = (ossim_uint32)keys.size();
-   offset = (ossim_uint32)ossimString("plugin").size();
-   numberList.resize(numberOfFiles);
-   
-   if(numberList.size()>0)
-   {
-      for(idx = 0; idx < (int)numberList.size();++idx)
-      {
-         std::vector<ossimString> splitArray;
-         keys[idx].split(splitArray, ".");
-         if(splitArray.size())
-         {
-            keys[idx] = ossimString(splitArray[0].begin(), splitArray[0].begin()+offset);
-         }
-         ossimString numberStr(splitArray[0].begin() + offset,
-                               splitArray[0].end());
-         numberList[idx] = numberStr.toInt();
-      }
-      
-      std::sort(numberList.begin(), numberList.end());   
-      for(idx=0;idx < (int)numberList.size();++idx)
-      {
-         ossimString newPrefix = ossimString("plugin")+ossimString::toString(numberList[idx]) + ".";
-         const char* file    = kwl.find((newPrefix+"file").c_str());
-         const char* options = kwl.find((newPrefix+"options").c_str());
-         if(file&&ossimFilename(file).exists())
-         {
-            loadPlugins(file, options);
-         }
-      }
-   }
-
-   ossimString auto_load_plugins(ossimPreferences::instance()->findPreference("ossim_init.auto_load_plugins"));
-   
-   if(auto_load_plugins.empty()) auto_load_plugins = "true";
-   // now load any plugins not found in the keywordlist
-   //
-   // check for plugins in the current directory
-   // and load them
-   if(auto_load_plugins.toBool())
-   {
-      ossimFilename ossimpluginsDir = ossimFilename(theAppName).dirCat("ossimplugins");
-      ossimDirectory currentDir(theAppName.path());
-
-      if(ossimpluginsDir.exists())
-      {
-         currentDir = ossimpluginsDir;
-      }
-      std::vector<ossimFilename> result;
-      currentDir.findAllFilesThatMatch(result, "ossim.*plugin.*", ossimDirectory::OSSIM_DIR_FILES);
-      
-      if(result.size())
-      {
-         ossim_uint32 idx = 0;
-         for(idx = 0; idx < result.size(); ++idx)
-         {
-            ossimSharedPluginRegistry::instance()->registerPlugin(result[idx]);
-         }
-      }
-   }
-}
-
-void ossimInit::initializeElevation()
-{
-   if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)
-      << "DEBUG ossimInit::initializeElevation(): Entered..." << std::endl;
-   
-   const ossimKeywordlist& KWL = thePreferences->preferencesKWL();
-
-   ossimFilename appPath = theAppName.path();
-   // look for bundled elevation and geoids
-   {
-	   ossimFilename geoid = appPath.dirCat("geoids");
-	   geoid = geoid.dirCat("geoid1996");
-	   geoid = geoid.dirCat("egm96.grd");
-	   if(geoid.exists())
-	   {
-         ossimGeoid* geoidPtr = new ossimGeoidEgm96(geoid);
-
-         if (geoidPtr->getErrorStatus() == ossimErrorCodes::OSSIM_OK)
-         {
-		    ossimGeoidManager::instance()->addGeoid(geoidPtr);
-		 }
-	   }
-   }
-   ossimGeoidManager::instance()->loadState(KWL);
-   
-   ossimFilename elevation = appPath.dirCat("elevation");
-   if(elevation.exists())
-   {
-      ossimElevManager::instance()->loadElevationPath(elevation);
-   }
-   // lets do backward compatability here
-   //
-   ossimString regExpression =  ossimString("^(") + "elevation_source[0-9]+.)";
-   vector<ossimString> keys =
-   KWL.getSubstringKeyList( regExpression );
-   if(!keys.empty())
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "Please specify elevation_source keywords with the new prefix\n"
-                                         << "of elevation_manager.elevation_source....\n";
-      thePreferences->preferencesKWL().addPrefixToKeysThatMatch("elevation_manager.", regExpression);
-   }
-   ossimElevManager::instance()->loadState(KWL, "elevation_manager.");
-   
-   if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG)
-      << "DEBUG ossimInit::initializeElevation(): leaving..." << std::endl;
-}
-
-void ossimInit::initializeLogFile()
-{
-   //---
-   // Do not set if already as --ossim-logfile take precidence over preferences
-   // file.
-   //---
-   ossimFilename logFile;
-   ossimGetLogFilename(logFile);
-
-   if ( (logFile.size() == 0) && thePreferences )
-   {
-      const char* lookup =
-         thePreferences->preferencesKWL().find("ossim.log.file");
-      if (lookup)
-      {
-         logFile = lookup;
-         ossimSetLogFilename(logFile);
-      }
-   }
-}
-
-ossimString ossimInit::version() const
-{
-   ossimString versionString;
-#ifdef OSSIM_VERSION
-   versionString += OSSIM_VERSION;
-#else
-   versionString += "Version ?.?.?";
-#endif
-   
-   versionString += " ";
-
-#ifdef OSSIM_BUILD_DATE
-   versionString += OSSIM_BUILD_DATE;
-#else
-   versionString += "(yyyymmdd)";
-#endif
-
-   return versionString;
-}
-
-ossimFilename ossimInit::appName()const
-{
-   return theAppName;
-}
-
-ossimInit::ossimInit(const ossimInit& /* obj */ )
-{}       
-
-void ossimInit::operator=(const ossimInit& /* rhs */) const
-{}
diff --git a/src/ossim/kbool/.cvsignore b/src/ossim/kbool/.cvsignore
deleted file mode 100644
index 853bca6..0000000
--- a/src/ossim/kbool/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-*.d
-*.o
-*~
-
diff --git a/src/ossim/kbool/booleng.cpp b/src/ossim/kbool/booleng.cpp
deleted file mode 100644
index f4ccd37..0000000
--- a/src/ossim/kbool/booleng.cpp
+++ /dev/null
@@ -1,685 +0,0 @@
-/*! \file kbool/src/booleng.cpp
-    \author Probably Klaas Holwerda
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: booleng.cpp 13795 2008-10-28 19:32:44Z gpotts $
-*/
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include <math.h>
-#include <time.h>
-
-#include <ossim/kbool/booleng.h>
-#include <ossim/kbool/link.h>
-#include <ossim/kbool/line.h>
-#include <ossim/kbool/node.h>
-#include <ossim/kbool/graph.h>
-#include <ossim/kbool/graphlst.h>
-#include <iostream>
-
-B_INT bmin(B_INT value1, B_INT value2)
-{
-	return((value1 < value2) ? value1 : value2 );
-}
-
-B_INT bmax(B_INT value1, B_INT value2)
-{
-	return((value1 > value2) ? value1 : value2 );
-}
-
-B_INT babs(B_INT a)
-{
-   if (a < 0) a=-a;
-   return a;
-}
-
-//-------------------------------------------------------------------/
-//----------------- Bool_Engine_Error -------------------------------/
-//-------------------------------------------------------------------/
-
-Bool_Engine_Error::Bool_Engine_Error(const char* message,
-                                     const char* header,
-                                     int degree,
-                                     int fatal)
-{
-   _message = message;
-   _header  = header;
-   _degree = degree;
-   _fatal = fatal;
-
-}
-
-Bool_Engine_Error::Bool_Engine_Error(const Bool_Engine_Error& a)
-{
-   _message = a._message;
-   _header  = a._header;
-   _degree = a._degree;
-   _fatal = a._fatal;
-
-}
-
-Bool_Engine::Bool_Engine(const Bool_Engine& rhs)
-   :m_graphlist(0),
-    m_MARGE(rhs.m_MARGE),
-    m_GRID(rhs.m_GRID),
-    m_DGRID(rhs.m_DGRID),
-    m_CORRECTIONABER(rhs.m_CORRECTIONABER),
-    m_CORRECTIONFACTOR(rhs.m_CORRECTIONFACTOR),
-    m_SMOOTHABER(rhs.m_SMOOTHABER),
-    m_MAXLINEMERGE(rhs.m_MAXLINEMERGE),
-    m_WINDINGRULE(rhs.m_WINDINGRULE),
-    m_ACCUR(rhs.m_ACCUR),
-    m_ROUNDFACTOR(rhs.m_ROUNDFACTOR),
-    m_orientationEntryMode(rhs.m_orientationEntryMode),
-    m_doLinkHoles(rhs.m_doLinkHoles),
-    m_GraphToAdd(0),
-    m_lastNodeToAdd(0),
-    m_firstNodeToAdd(0),
-    m_groupType(rhs.m_groupType),
-    m_getGraph(0),
-    m_getLink(0),
-    m_getNode(0),
-    m_PolygonXPoint(rhs.m_PolygonXPoint),
-    m_PolygonYPoint(rhs.m_PolygonYPoint),
-    m_numPtsInPolygon(rhs.m_numPtsInPolygon),
-    m_numNodesVisited(rhs.m_numNodesVisited),
-    m_logfile(0),
-    m_intersectionruns(rhs.m_intersectionruns)
-{
-   if(rhs.m_graphlist)
-   {
-      m_graphlist = new GraphList(rhs.m_graphlist);
-   }
-//    _linkiter=new TDLI<KBoolLink>();
-#if KBOOL_LOG == 1
-   SetLog( true );
-#else
-   SetLog( false );
-#endif
-}
-
-Bool_Engine_Error::~Bool_Engine_Error()
-{
-}
-
-const char* Bool_Engine_Error::GetErrorMessage()
-{
-   return _message.c_str();
-}
-
-const char* Bool_Engine_Error::GetHeaderMessage()
-{
-   return _header.c_str();
-}
-
-int Bool_Engine_Error::GetErrorDegree()
-{
-   return _degree;
-}
-
-int Bool_Engine_Error::GetFatal()
-{
-   return _fatal;
-}
-
-//-------------------------------------------------------------------/
-//----------------- Bool_Engine -------------------------------------/
-//-------------------------------------------------------------------/
-
-Bool_Engine::Bool_Engine()
-{
-//    _linkiter=new TDLI<KBoolLink>();
-   m_intersectionruns = 1;
-
-   m_orientationEntryMode = false;
-   m_doLinkHoles = true;
-      
-   m_graphlist = new GraphList(this);
-   m_ACCUR = 1e-4;
-   m_WINDINGRULE = true;
-   m_GraphToAdd = NULL;
-   m_firstNodeToAdd = NULL;
-   m_lastNodeToAdd = NULL;
-   
-   m_logfile = NULL;
-   
-#if KBOOL_LOG == 1
-   SetLog( true );
-#else
-   SetLog( false );
-#endif
-}
-
-Bool_Engine::~Bool_Engine()
-{
-   if (m_logfile != NULL)
-      fclose (m_logfile);
-   
-   if (m_logfile != NULL)
-   {
-      fclose (m_logfile);
-   }
-    if(m_graphlist)
-    {
-       delete m_graphlist;
-       m_graphlist = 0;
-    }
-}
-
-void Bool_Engine::SetLog( bool OnOff )
-{
-	m_doLog = OnOff;
-   if ( m_doLog )
-	{
-		if ( m_logfile == NULL )
-		{
-		    // create a new logfile
-		    m_logfile = fopen(KBOOL_LOGFILE, "w");
-			if (m_logfile == NULL)
-				fprintf(stderr,"Bool_Engine: Unable to write to Boolean Engine logfile\n");
-			else
-			{
-            time_t timer;
-	         struct tm * today;
-	         timer = time(NULL);
-	         today = localtime(&timer);
-
-            fprintf(m_logfile, "Logfile created on:\t\t\t%s", ctime( &timer ) );
-			}
-		}
-	}
-	else 
-	{
-	   if (m_logfile != NULL)
-      {      
-		   fclose (m_logfile);
-         m_logfile = NULL;
-      }
-	}
-}
-
-void Bool_Engine::SetState( const char* process )
-{
-   Write_Log(process);
-}
-
-void Bool_Engine::error(const char *text, const char *title)
-{
-   Write_Log("FATAL ERROR: ", title);
-   Write_Log("FATAL ERROR: ", text);
-   throw Bool_Engine_Error(" Fatal Error", "Fatal Error", 9, 1);
-};
-
-void Bool_Engine::info(const char *text, const char *title)
-{
-   Write_Log("FATAL ERROR: ", title);
-   Write_Log("FATAL ERROR: ", text);
-};
-
-void Bool_Engine::SetMarge(double marge)
-{
-    m_MARGE = marge;
-    Write_Log("Bool_Engine::m_MARGE = %f\n", m_MARGE);
-}
-
-double Bool_Engine::GetAccur()
-{
-    return m_ACCUR;
-}
-
-void Bool_Engine::SetRoundfactor(double roundfac)
-{
-    m_ROUNDFACTOR = roundfac;
-    Write_Log("Bool_Engine::m_ROUNDFACTOR = %f\n", m_ROUNDFACTOR);
-}
-
-double Bool_Engine::GetRoundfactor()
-{
-    return m_ROUNDFACTOR;
-}
-
-double Bool_Engine::GetMarge()
-{
-    return m_MARGE;
-}
-
-void Bool_Engine::SetDGrid(double dgrid)
-{
-    m_DGRID = dgrid;
-    Write_Log("Bool_Engine::m_DGRID = %f\n", m_DGRID);
-}
-
-double Bool_Engine::GetDGrid()
-{
-    return m_DGRID;
-}
-
-void Bool_Engine::SetGrid(B_INT grid)
-{
-    m_GRID = grid;
-    Write_Log("Bool_Engine::m_GRID = %lld\n", m_GRID);
-}
-
-B_INT Bool_Engine::GetGrid()
-{
-    return m_GRID;
-}
-
-void Bool_Engine::SetCorrectionAber(double aber)
-{
-    m_CORRECTIONABER = aber;
-    Write_Log("Bool_Engine::m_CORRECTIONABER = %f\n", m_CORRECTIONABER);
-}
-
-double Bool_Engine::GetCorrectionAber()
-{
-    return m_CORRECTIONABER;
-}
-
-void Bool_Engine::SetCorrectionFactor(double aber)
-{
-    m_CORRECTIONFACTOR = aber;
-    Write_Log("Bool_Engine::m_CORRECTIONFACTOR = %f\n", m_CORRECTIONFACTOR );
-}
-
-double Bool_Engine::GetCorrectionFactor()
-{
-    return m_CORRECTIONFACTOR;
-}
-
-void Bool_Engine::SetSmoothAber(double aber)
-{
-    m_SMOOTHABER = aber;
-    Write_Log("Bool_Engine::m_SMOOTHABER = %f\n",m_SMOOTHABER );
-}
-
-double Bool_Engine::GetSmoothAber()
-{
-    return m_SMOOTHABER;
-}
-
-void Bool_Engine::SetMaxlinemerge(double maxline)
-{
-    m_MAXLINEMERGE = maxline;
-    Write_Log("Bool_Engine::m_MAXLINEMERGE = %f\n",m_MAXLINEMERGE );
-}
-
-double Bool_Engine::GetMaxlinemerge()
-{
-    return m_MAXLINEMERGE;
-}
-
-void Bool_Engine::SetWindingRule(bool rule)
-{
-    m_WINDINGRULE = rule;
-}
-
-bool Bool_Engine::GetWindingRule()
-{
-    return m_WINDINGRULE;
-}
-
-
-void Bool_Engine::SetInternalMarge( B_INT marge )
-{
-   m_MARGE = (double)marge/m_GRID/m_DGRID;
-}
-
-B_INT Bool_Engine::GetInternalMarge()
-{
-   return (B_INT) ( m_MARGE*m_GRID*m_DGRID );
-}
-
-double Bool_Engine::GetInternalCorrectionAber()
-{
-   return  m_CORRECTIONABER*m_GRID*m_DGRID;
-}
-
-double Bool_Engine::GetInternalCorrectionFactor()
-{
-   return m_CORRECTIONFACTOR*m_GRID*m_DGRID;
-}
-
-double Bool_Engine::GetInternalSmoothAber()
-{
-   return m_SMOOTHABER*m_GRID*m_DGRID;
-}
-
-B_INT Bool_Engine::GetInternalMaxlinemerge()
-{
-   return (B_INT) ( m_MAXLINEMERGE*m_GRID*m_DGRID );
-}
-
-#define TRIALS 30  
-
-bool Bool_Engine::Do_Operation(BOOL_OP operation)
-{
-
-#if KBOOL_DEBUG
-   GraphList* saveme = new GraphList( m_graphlist );
-#endif
-
-   try 
-   {
-      switch (operation)
-      {
-         case (BOOL_OR):
-         case (BOOL_AND):
-         case (BOOL_EXOR):
-         case (BOOL_A_SUB_B):
-         case (BOOL_B_SUB_A):
-            m_graphlist->Boolean(operation, m_intersectionruns);
-            break;
-         case (BOOL_CORRECTION):
-            m_graphlist->Correction();
-            break;
-         case (BOOL_MAKERING):
-            m_graphlist->MakeRings();
-            break;
-         case (BOOL_SMOOTHEN):
-            m_graphlist->Smoothen( GetInternalSmoothAber() );
-            break;
-         default:
-         {
-	         error("Wrong operation","Command Error");
-	         return false;
-         }
-      }
-   }
-	catch (Bool_Engine_Error& error)
-	{
-
-#if BOOL_DEBUG
-      delete m_graphlist;
-      m_graphlist = new GraphList( saveme );
-      m_graphlist->WriteGraphsKEY(this);
-#endif
-
-	   if (m_logfile != NULL)
-      {      
-		   fclose (m_logfile);
-         m_logfile = NULL;
-      }
-
-      info(error.GetErrorMessage(), "error");
-		throw error;
-	}
-   catch(...)
-   {
-
-#if BOOL_DEBUG
-      delete m_graphlist;
-      m_graphlist = new GraphList( saveme );
-      m_graphlist->WriteGraphsKEY(this);
-#endif
-
-	   if (m_logfile != NULL)
-      {      
-		   fclose (m_logfile);
-         m_logfile = NULL;
-      }
-
-      info("Unknown exception", "error");
-		throw ;
-   }
-
-#if BOOL_DEBUG
-   delete saveme;
-#endif
-
-   return true;
-}
-
-bool Bool_Engine::StartPolygonAdd(GroupType A_or_B)
-{
-#if BOOL_DEBUG
-    if (m_logfile != NULL)
-   	fprintf(m_logfile, "-> StartPolygonAdd(%d)\n", A_or_B);
-#endif
-    if (m_GraphToAdd != NULL)
-      return false;
-
-    Graph *myGraph = new Graph(this);
-    m_graphlist->insbegin(myGraph);
-    m_GraphToAdd = myGraph;
-    m_groupType = A_or_B;
-
-    return true;
-}
-
-bool Bool_Engine::AddPoint(double x, double y)
-{
-   if (m_GraphToAdd == NULL){return false;}
-
-   double scaledx = x * m_DGRID * m_GRID;
-   double scaledy = y * m_DGRID * m_GRID;
-
-   if ( scaledx > MAXB_INT  || scaledx < MINB_INT )
-      error("X coordinate of vertex to big", "" );
-   if ( scaledy > MAXB_INT || scaledy < MINB_INT )
-      error("Y coordinate of vertex to big", "" );
-
-
-   B_INT rintx = ((B_INT) (x * m_DGRID)) * m_GRID;
-   B_INT rinty = ((B_INT) (y * m_DGRID)) * m_GRID;
-   Node *myNode = new Node( rintx, rinty, this );
-
-    // adding first point to graph
-   if (m_firstNodeToAdd == NULL)
-   {
-#if BOOL_DEBUG
-      if (m_logfile != NULL)
-      {
-		   fprintf(m_logfile, "-> AddPt() *FIRST* :");
-		   fprintf(m_logfile, " input: x = %f, y = %f\n", x, y);
-		   fprintf(m_logfile, " input: x = %I64d, y = %I64d\n", rintx, rinty) ;
-      }
-#endif
-
-		m_firstNodeToAdd = (Node *) myNode;
-		m_lastNodeToAdd  = (Node *) myNode;
-   }
-   else
-   {
-#if BOOL_DEBUG
-      if (m_logfile != NULL)
-      {
-   		fprintf(m_logfile, "-> AddPt():");
-	   	fprintf(m_logfile, " input: x = %f, y = %f\n", x, y);
-		   fprintf(m_logfile, " input: x = %I64d, y = %I64d\n", rintx, rinty) ;
-      }
-#endif
-
-		m_GraphToAdd->AddLink(m_lastNodeToAdd, myNode);
-		m_lastNodeToAdd = (Node *) myNode;
-   }
-
-   return true;
-}
-
-bool Bool_Engine::EndPolygonAdd()
-{
-   if (m_GraphToAdd == NULL) {return false;}
-
-   m_GraphToAdd->AddLink(m_lastNodeToAdd, m_firstNodeToAdd);
-   m_GraphToAdd->SetGroup(m_groupType);
-   m_GraphToAdd = NULL;
-   m_lastNodeToAdd  = NULL;
-   m_firstNodeToAdd = NULL;
-
-   return true;
-}
-
-bool Bool_Engine::StartPolygonGet()
-{
-//    if(m_graphiter.isAttached())
-//    {
-      m_graphiter.Detach();
-//    }
-   if(m_graphlist)
-   {
-      m_graphiter.Attach((DL_List<GraphList*>*)m_graphlist);
-      m_graphiter.toroot();
-      return true;
-   }
-   return false;
-}
-
-bool Bool_Engine::PolygonHasMorePoints()
-{
-    // see if first point
-    if (m_numNodesVisited == 0)
-    {
-        // don't need to touch the m_getNode
-        m_numNodesVisited++;
-        return true;
-    }
-
-    if (m_numNodesVisited < m_numPtsInPolygon)
-    {
-        // traverse to the next node
-        m_getNode = m_getLink->GetOther(m_getNode);
-        m_getLink = m_getLink->Forth(m_getNode);
-
-        m_numNodesVisited++;
-        return true;
-    }
-    else
-    {
-        return false;
-    }
-}
-bool Bool_Engine::nextPolygon()
-{
-   if(!m_graphiter.empty())
-   {
-      ++m_graphiter;
-      if(m_graphiter.hitroot())
-      {
-         m_graphiter.Detach();
-         return false;
-      }
-      m_getGraph = (Graph*) m_graphiter.item();
-      if(m_getGraph)
-      {
-         m_getLink  = m_getGraph->GetFirstLink();
-      }
-      else
-      {
-         m_getLink = 0;
-      }
-      if(m_getLink)
-      {
-         m_getNode  = m_getLink->GetBeginNode();
-      }
-      else
-      {
-         m_getNode = 0;
-      }
-      if(m_getGraph)
-      {
-         m_numPtsInPolygon = m_getGraph->GetNumberOfLinks();
-      }
-      else
-      {
-         m_numPtsInPolygon = 0; 
-      }
-      m_numNodesVisited = 0;
-      
-      return (m_getGraph&&m_getLink);
-   } 
-   
-   return false;
-}
-
-void Bool_Engine::EndPolygonGet()
-{
-   m_getGraph = 0;
-   m_getGraph = 0;
-   m_getLink  = 0;
-   m_getNode  = 0;
-//     m_graphlist->removehead();
-//     delete m_getGraph;
-}
-
-double Bool_Engine::GetPolygonXPoint()
-{
-   if(!m_getNode) return 0;
-    return m_getNode->GetX()/m_GRID/m_DGRID;
-}
-
-double Bool_Engine::GetPolygonYPoint()
-{
-   if(!m_getNode) return 0;
-    return m_getNode->GetY()/m_GRID/m_DGRID;
-}
-
-bool Bool_Engine::GetHoleSegment()
-{
-   if(!m_getLink) return false;
-     if (m_getLink->GetHole())
-		 return true;
-	 return false;
-}
-
-bool Bool_Engine::GetHoleConnectionSegment()
-{
-   if(!m_getLink) return false;
-   if (m_getLink->GetHoleLink())
-      return true;
-   return false;
-}
-
-kbEdgeType Bool_Engine::GetPolygonPointEdgeType()
-{
-   if(!m_getLink) return KB_FALSE_EDGE;
-   
-   // see if the point is the beginning of a false edge
-   if ( m_getLink->GetHoleLink() )
-      return  KB_FALSE_EDGE;
-   else
-      // it's either an outside or inside edge
-      if ( m_getLink->GetHole() )
-         return  KB_INSIDE_EDGE;
-      else
-         return  KB_OUTSIDE_EDGE;
-}
-
-
-void Bool_Engine::Write_Log(const char *msg1)
-{
-   if (m_logfile == NULL)
-       return;
-
-   fprintf(m_logfile,"%s \n",msg1);
-}
-
-void Bool_Engine::Write_Log(const char *msg1, const char* msg2)
-{
-   if (m_logfile == NULL)
-       return;
-
-   fprintf(m_logfile,"%s %s\n",msg1, msg2);
-}
-
-void Bool_Engine::Write_Log(const char *fmt, double dval)
-{
-   if (m_logfile == NULL)
-       return;
-
-   fprintf(m_logfile,fmt,dval);
-}
-
-void Bool_Engine::Write_Log(const char *fmt, B_INT bval)
-{
-   if (m_logfile == NULL)
-       return;
-
-   fprintf(m_logfile,fmt,bval);
-}
diff --git a/src/ossim/kbool/graph.cpp b/src/ossim/kbool/graph.cpp
deleted file mode 100644
index 979be06..0000000
--- a/src/ossim/kbool/graph.cpp
+++ /dev/null
@@ -1,2647 +0,0 @@
-/*! \file kbool/src/graph.cpp
-    \brief Used to Intercect and other process functions
-    \author Probably Klaas Holwerda 
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: graph.cpp 17606 2010-06-21 20:46:16Z dburken $
-*/
-
-// Grpah is the structure used to store polygons
-
-#ifdef __GNUG__
-#pragma implementation 
-#endif
-#include <ossim/base/ossimErrorContext.h>
-#include <math.h>
-#include <assert.h>
-
-#include <ossim/kbool/booleng.h>
-#include <ossim/kbool/graph.h>
-#include <ossim/kbool/graphlst.h>
-#include <ossim/kbool/node.h>
-
-// Prototype of function
-int linkXYsorter(KBoolLink *, KBoolLink *);
-int linkYXsorter(KBoolLink *, KBoolLink *);
-int linkLsorter(KBoolLink *, KBoolLink *);
-int linkYXtopsorter(KBoolLink *a, KBoolLink *b);
-int linkGraphNumsorter(KBoolLink *_l1, KBoolLink* _l2);
-
-// constructor, initialize with one link
-// usage: Graph *a_graph = new Graph(a_link);
-Graph::Graph(KBoolLink *a_link, Bool_Engine* GC )
-{
-   _GC = GC;
-	_linklist=new DL_List<void*>();
-
-	_linklist->insbegin(a_link);
-	_bin = false;
-
-}
-
-
-// constructor, initialize graph with no contents
-// usage: Graph *a_graph = new Graph();
-Graph::Graph(Bool_Engine* GC)
-{
-   _GC = GC;
-	_linklist=new DL_List<void*>();
-	_bin = false;
-}
-
-Graph::Graph( Graph* other )
-{
-   _GC = other->_GC;
-	_linklist = new DL_List<void*>();
-	_bin = false;
-
-	int _nr_of_points = other->_linklist->count();
-	KBoolLink* _current = other->GetFirstLink();
-
-	Node* _last = _current->GetBeginNode();
-	Node* node = new Node( _current->GetBeginNode()->GetX(), _current->GetBeginNode()->GetY(), _GC );
-	Node* nodefirst = node;
-	for (int i = 0; i < _nr_of_points; i++)
-	{
-		// get the other node on the link
-		_last = _current->GetOther(_last);
-		// get the other link on the _last node
-		_current = _current->Forth(_last);
-
-   	Node* node2 = new Node( _current->GetBeginNode()->GetX(), _current->GetBeginNode()->GetY(), _GC );
-      _linklist->insend( new KBoolLink( node,  node2, _GC ) );
-      node = node2;
-	}
-   _linklist->insend( new KBoolLink( node,  nodefirst, _GC ) );
-}
-
-// destructor
-// deletes all object of the linklist
-Graph::~Graph()
-{
-   if(_linklist)
-   {
-      {
-         TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-         
-         //first empty the graph
-         _LI.delete_all();
-      }
-      delete _linklist;
-      _linklist = 0;
-   }
-   _GC = 0;
-}
-
-KBoolLink*	Graph::GetFirstLink()
-{
-   if(!_linklist) return 0;
-   return (KBoolLink*) _linklist->headitem();
-};
-
-
-void Graph::Prepare( int intersectionruns )
-{
-   if(!_GC) return;
-   _GC->SetState("Intersection");
-
-   bool found = true;
-   int run = 0;
-   while( run < intersectionruns && found )
-   {    
-	   found = CalculateCrossings(_GC->GetInternalMarge());
-      run++;
-   }
-
-//WHY
-//	Round(_GC->Get_Grid());
-
-   {
-   	TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-		_LI.foreach_mf(&KBoolLink::UnMark);// Reset Bin and Mark flag
-   }
-   _GC->SetState("Set group A/B Flags");
-
-   bool dummy = false;
-
-   if (_GC->GetWindingRule())
-	   ScanGraph2( INOUT, dummy );
-
-   ScanGraph2( GENLR, dummy );
-
-//	writegraph();
-
-	_GC->SetState("Set operation Flags");
-	Set_Operation_Flags();
-
-	_GC->SetState("Remove doubles");
-	// Remove the marked links
-   {
-   	TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-      _LI.tohead();
-      while(!_LI.hitroot())
-      {
-         if (_LI.item()->IsMarked())
-         {
-            delete _LI.item();
-            _LI.remove();
-         }
-         else
-            _LI++;
-      }
-   }
-
-	_GC->SetState("Remove inlinks");
-	Remove_IN_Links();
-
-
-	_GC->SetState("Finished prepare graph");
-}
-
-
-
-// x and y of the point will be rounded to the nearest
-// xnew=N*grid and ynew=N*grid
-void Graph::RoundInt(B_INT grid)
-{
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	_LI.tohead();
-	while (!_LI.hitroot())
-	{
-			_LI.item()->GetBeginNode()->RoundInt(grid);
-			_LI.item()->GetEndNode()->RoundInt(grid);
-			_LI++;
-	}
-}
-
-// rotate graph minus 90 degrees or plus 90 degrees
-void Graph::Rotate(bool plus90)
-{
-	B_INT swap;
-	Node* last=NULL;
-
-   B_INT neg=-1;
-   if (plus90)
-      neg=1;
-
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	_LI.mergesort(linkXYsorter);
-
-	_LI.tohead();
-	while (!_LI.hitroot())
-	{
-			if (_LI.item()->GetBeginNode() != last)
-			{
-				swap=_LI.item()->GetBeginNode()->GetX();
-				_LI.item()->GetBeginNode()->SetX(-neg*(_LI.item()->GetBeginNode()->GetY()));
-				_LI.item()->GetBeginNode()->SetY(neg*swap);
-				last=_LI.item()->GetBeginNode();
-			}
-			_LI++;
-	}
-}
-
-bool Graph::RemoveNullLinks()
-{
-   bool graph_is_modified = false;
-   
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-   _LI.tohead();
-   while (!_LI.hitroot())
-   {
-      if (_LI.item()->GetBeginNode() == _LI.item()->GetEndNode())
-      {
-         _LI.item()->MergeNodes(_LI.item()->GetBeginNode());
-         delete _LI.item();
-         _LI.remove();
-         graph_is_modified = true;
-      }
-      else
-         _LI++;
-   }
-   return (graph_is_modified);
-}
-
-// Add a link to the graph connection with
-// other links is through the link his nodes
-void Graph::AddLink(KBoolLink *a_link)
-{
-   if(!_linklist) return;
-   
-   assert(a_link);
-   
-   _linklist->insend(a_link);
-}
-
-
-// Add a link to the graph, by giving it two nodes
-// the link is then made and added to the graph
-void Graph::AddLink(Node *begin, Node *end)
-{
-   if(!(begin&&end))
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "Graph::AddLink WARING: line " << __LINE__ << " begin or end are NULL" << std::endl;
-      return;
-   }
-   if(begin==end)
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "Graph::AddLink WARING: line " << __LINE__ << " begin and end are equal" << std::endl;
-      return;
-   }
-//    assert(begin && end);
-//    assert(begin != end);
-//    if(!_GC) return;
-   AddLink(new KBoolLink(0, begin, end, _GC));
-}
-
-
-// Checks if there is a zeroline in the graph
-bool Graph::AreZeroLines(B_INT Marge)
-{
-	bool Found_it = false;
-
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	_LI.tohead();
-	while (!_LI.hitroot())
-	{
-		if (_LI.item()->IsZero(Marge))
-		{
-			Found_it = true;
-			break;
-		}
-		_LI++;
-	}
-	return Found_it;
-}
-
-
-// Delete links that do not fit the condition for given operation
-void Graph::DeleteNonCond(BOOL_OP operation)
-{
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	_LI.tohead();
-	while(!_LI.hitroot())
-	{
-		if ( !_LI.item()->IsMarked(operation))
-		{
-			delete _LI.item();
-			_LI.remove();
-		}
-		else
-			_LI++;
-	}
-}
-
-void Graph::HandleNonCond(BOOL_OP operation)
-{
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	_LI.tohead();
-	while(!_LI.hitroot())
-	{
-		if ( !_LI.item()->IsMarked(operation))
-      {
-         _LI.item()->SetBeenHere();
-         _LI.item()->SetGraphNum( -1 );
-      }   
-   	_LI++;
-	}
-}
-
-// All lines in the graph wich have a length < _GC->Get_Marge() will be deleted
-//
-// input : a marge, standard on _GC->Get_Marge()
-// return: true if lines in the graph are deleted
-//       : false if no lines in the graph are deleted
-bool Graph::DeleteZeroLines(B_INT Marge)
-{
-	// Is the graph modified ?
-	bool Is_Modified = false;
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-
-	int Processed = _LI.count();
-
-	_LI.tohead();
-	while (Processed > 0)
-	{
-		Processed--;
-		if (_LI.item()->IsZero(Marge))
-		{
-			// the current link is zero, so make from both nodes one node
-			// and delete the current link from this graph
-			_LI.item()->MergeNodes(_LI.item()->GetBeginNode());
-			// if an item is deleted the cursor of the list is set to the next
-			// so no explicit forth is needed
-			delete _LI.item();
-			_LI.remove();
-			// we have to set Processed, because if a zero line is deleted
-			// another can be made zero by this deletion
-			Processed = _LI.count();
-			Is_Modified = true;
-			if (_LI.hitroot())
-				_LI.tohead();
-		}
-		else
-			_LI++;
-			if (_LI.hitroot())
-				_LI.tohead();
-	}
-	return Is_Modified;
-}
-
-
-// Collects a graph starting at currentnode or attached link
-// follow graphs right around.
-// since the input node is always a topleft node, we can see on
-// a connected link if we or dealing with a hole or NON hole.
-// for instance a top link of a hole that is horizontal, always
-// is IN above the link and OUT underneath the link.
-// this for a non hole the opposite
-void Graph::CollectGraph(Node *current_node,BOOL_OP operation, bool detecthole,int graphnumber, bool& foundholes )
-{
-	KBoolLink *currentlink;
-	KBoolLink *nextlink;
-	Node *next_node;
-	Node *MyFirst;
-	Node *Unlinked;
-	KBoolLink *MyFirstlink;
-
-	bool Hole;
-	LinkStatus whatside;
-
-	currentlink=current_node->GetNotFlat();
-	if (!currentlink)
-   {
-      char buf[100];
-      if (detecthole)
-	      sprintf(buf,"no NON flat link Collectgraph for operation at %15.3lf , %15.3lf",
-         				double(current_node->GetX()),double(current_node->GetY()));
-      else
-	      sprintf(buf,"no NON flat link Collectgraph at %15.3lf , %15.3lf",
-         				double(current_node->GetX()),double(current_node->GetY()));
-		throw Bool_Engine_Error(buf, "Error", 9, 0);
-	}
-
-	currentlink->SetBeenHere();
-
-   if (detecthole)
-		Hole = currentlink->IsHole(operation);
-   else
-      Hole = currentlink->GetHole(); //simple extract do not detect holes, but use hole flag.
-
-   currentlink->Redirect(current_node);
-
-   foundholes = Hole || foundholes;
-
-	//depending if we have a hole or not
-	//we take the left node or right node from the selected link (currentlink)
-	//this MEANS for holes go left around and for non holes go right around
-   //since the currentlink is already set to binhere, it will not go in that direction
-	if (Hole)
-	{
-      whatside = IS_LEFT;
-	   if ( currentlink->GetEndNode()->GetX() > current_node->GetX())
-		   current_node=currentlink->GetEndNode();
-	}
-	else
-	{
-      whatside = IS_RIGHT;
-	   if ( currentlink->GetEndNode()->GetX() < current_node->GetX())
-			current_node=currentlink->GetEndNode();
-	}
-   currentlink->Redirect(current_node);
-   MyFirst=current_node; //remember this as the start
-   MyFirstlink=currentlink;
-
-	next_node = currentlink->GetEndNode();
-
-	// If this is a hole, Set as special link, this is the top link of this hole !
-	// from this link we have to make links to the link above later on.
-	if (Hole)
-		currentlink->SetTopHole(true);
-   //set also the link as being part of a hole
-   if (detecthole)
-		currentlink->SetHole(Hole);
-	currentlink->SetGraphNum(graphnumber);
-
-	// Walk over links and redirect them. taking most right links around
-	while (currentlink != NULL)
-	{
-      if ( Hole )
-      {
-         nextlink = next_node->GetMost(currentlink, IS_RIGHT, operation);
-      }
-      else
-      {
-         nextlink = next_node->GetMost(currentlink, IS_LEFT, operation);
-         // next works too if same is used in CollectGraphLast
-         //nextlink = next_node->GetMost(currentlink, IS_RIGHT, operation);
-      }
-
-		if (nextlink == NULL)
-		{	//END POINT MUST BE EQAUL TO BEGIN POINT
-			if (!next_node->Equal(MyFirst, 1))
-			{
-            throw Bool_Engine_Error("no next (endpoint != beginpoint)","graph", 9, 0);
-
-          //for god sake try this
-				  //nextlink = next_node->GetMost(currentlink, whatside ,operation);
-			}
-		}
-
-		current_node = next_node;
-
-		if (nextlink!=NULL)
-		{
-		   nextlink->Redirect(current_node);
-			nextlink->SetBeenHere();
-			next_node = nextlink->GetEndNode();
-
-         if ( current_node->GetNumberOfLinks() > 2)
-         {  // replace endnode of currentlink and beginnode of nextlink with new node
-            Unlinked = new Node(current_node, _GC);
-				currentlink->Replace(current_node,Unlinked);
-				nextlink->Replace(current_node,Unlinked);
-         }
-
-		   if (detecthole)
-				nextlink->SetHole(Hole);
-			nextlink->SetGraphNum(graphnumber);
-		}
-      else
-      {
-         //close the found graph properly
-         if ( current_node->GetNumberOfLinks() > 2)
-         {  // replace endnode of currentlink and beginnode of nextlink with new node
-            Unlinked = new Node(current_node, _GC);
-            currentlink->Replace(current_node,Unlinked);
-            MyFirstlink->Replace(current_node,Unlinked);
-         }
-      }
-
-		currentlink = nextlink;
-	}
-
-	//END POINT MUST BE EQAUL TO BEGIN POINT
-	if (!current_node->Equal(MyFirst, 1))
-   {
-      throw Bool_Engine_Error("in collect graph endpoint != beginpoint", "Error", 9, 0);
-   }
-}
-
-void Graph::CollectGraphLast(Node *current_node,BOOL_OP operation, bool detecthole,int graphnumber, bool& foundholes )
-{
-	KBoolLink *currentlink;
-	KBoolLink *nextlink;
-	Node *next_node;
-	Node *MyFirst;
-	Node *Unlinked;
-	KBoolLink *MyFirstlink;
-
-	bool Hole;
-	LinkStatus whatside;
-
-	currentlink=current_node->GetNotFlat();
-	if (!currentlink)
-   {
-      char buf[100];
-      if (detecthole)
-	      sprintf(buf,"no NON flat link Collectgraph for operation at %15.3lf , %15.3lf",
-         				double(current_node->GetX()),double(current_node->GetY()));
-      else
-	      sprintf(buf,"no NON flat link Collectgraph at %15.3lf , %15.3lf",
-         				double(current_node->GetX()),double(current_node->GetY()));
-		throw Bool_Engine_Error(buf, "Error", 9, 0);
-	}
-
-	currentlink->SetBeenHere();
-
-   if (detecthole)
-		Hole = currentlink->IsHole(operation);
-   else
-      Hole = currentlink->GetHole(); //simple extract do not detect holes, but use hole flag.
-
-   currentlink->Redirect(current_node);
-
-   foundholes = Hole || foundholes;
-
-	//depending if we have a hole or not
-	//we take the left node or right node from the selected link (currentlink)
-	//this MEANS for holes go left around and for non holes go right around
-   //since the currentlink is already set to binhere, it will not go in that direction
-	if (Hole)
-	{
-      whatside = IS_LEFT;
-	   if ( currentlink->GetEndNode()->GetX() > current_node->GetX())
-		   current_node=currentlink->GetEndNode();
-	}
-	else
-	{
-      whatside = IS_RIGHT;
-	   if ( currentlink->GetEndNode()->GetX() < current_node->GetX())
-			current_node=currentlink->GetEndNode();
-	}
-   currentlink->Redirect(current_node);
-   MyFirst=current_node; //remember this as the start
-   MyFirstlink=currentlink;
-
-	next_node = currentlink->GetEndNode();
-
-	// If this is a hole, Set as special link, this is the top link of this hole !
-	// from this link we have to make links to the link above later on.
-	if (Hole)
-		currentlink->SetTopHole(true);
-	currentlink->SetGraphNum(graphnumber);
-
-	// Walk over links and redirect them. taking most right links around
-	while (currentlink != NULL)
-	{
-      if ( Hole )
-      {
-         if ( currentlink->GetHoleLink() )
-         {
-            //in case we entered the hole via the hole link just now, we followe the hole.
-            //This is taking as many holes as possible ( most right around)
-            nextlink = next_node->GetMostHole(currentlink, IS_RIGHT ,operation );
-            if ( !nextlink ) // hole done?
-               //if we did get to this hole via a holelink?, then we might now be on the return link.
-               //BTW it is also possible that holes are already found via a non linked hole path,
-               //in that case, we did go to the HoleLink here, and directly return on the other holelink. 
-   		      nextlink = next_node->GetHoleLink(currentlink, true, operation );
-            if ( !nextlink )
-            {
-               //we did get to this hole via a holelink and we are on the returning holelink.
-               //So we left the hole collection, and continue with contours.
-               //Most Right is needed!
-               nextlink = next_node->GetMost(currentlink, IS_RIGHT, operation);
-            }
-         }
-         else
-         {
- 		      nextlink = next_node->GetHoleLink(currentlink, true, operation ); // other linked holes first
-            if ( !nextlink ) 
-               nextlink = next_node->GetMostHole(currentlink, IS_RIGHT, operation ); // other holes first
-            if ( !nextlink ) 
-            {
-               //We are leaving the hole.
-               //So we left the hole collection, and continue with contours.
-               //Most Right is needed!
-               nextlink = next_node->GetMost(currentlink, IS_RIGHT, operation);
-            }
-         }
-      }
-      else
-      {
-
-         //a hole link is preferred above a normal link. If not no holes would be linked in anyway.
-         nextlink = next_node->GetHoleLink(currentlink, true, operation );
-         if ( !nextlink )
-            //also if we can get to a hole directly within a contour, that is better (get as much as possible)
-            nextlink = next_node->GetMostHole(currentlink, IS_RIGHT, operation);
-         if ( !nextlink )
-            //if non of the above, we are still on the contour and take as must as possible to the left.
-            //Like that we take as many contour togethere as possible.
-
-            nextlink = next_node->GetMost(currentlink, IS_LEFT, operation);
-            // next works too if same is used in CollectGraphLast
-            //nextlink = next_node->GetMost(currentlink, IS_RIGHT, operation);
-      }
-
-		if (nextlink == NULL)
-		{	//END POINT MUST BE EQAUL TO BEGIN POINT
-			if (!next_node->Equal(MyFirst, 1))
-			{
-            throw Bool_Engine_Error("no next (endpoint != beginpoint)","graph", 9, 0);
-
-            //for god sake try this
-				    //nextlink = next_node->GetMost(currentlink, whatside, operation);
-			}
-		}
-      else
-      {
-         // when holes are already know, use the hole information to
-         // go left are right around.
-         Hole = nextlink->GetHole() || nextlink->GetHoleLink();
-      }
-		current_node = next_node;
-
-		if (nextlink!=NULL)
-		{
-		   nextlink->Redirect(current_node);
-			nextlink->SetBeenHere();
-			next_node = nextlink->GetEndNode();
-
-         if ( current_node->GetNumberOfLinks() > 2)
-         {  // replace endnode of currentlink and beginnode of nextlink with new node
-            Unlinked = new Node(current_node, _GC);
-				currentlink->Replace(current_node,Unlinked);
-				nextlink->Replace(current_node,Unlinked);
-         }
-
-			nextlink->SetGraphNum(graphnumber);
-		}
-      else
-      {
-         //close the found graph properly
-         if ( current_node->GetNumberOfLinks() > 2)
-         {  // replace endnode of currentlink and beginnode of nextlink with new node
-            Unlinked = new Node(current_node, _GC);
-            currentlink->Replace(current_node,Unlinked);
-            MyFirstlink->Replace(current_node,Unlinked);
-         }
-      }
-
-		currentlink = nextlink;
-	}
-
-	//END POINT MUST BE EQAUL TO BEGIN POINT
-	if (!current_node->Equal(MyFirst, 1))
-   {
-      throw Bool_Engine_Error("in collect graph endpoint != beginpoint", "Error", 9, 0);
-   }
-}
-//==============================================================================
-//==============================================================================
-
-// Extract bi-directional graphs from this graph
-// Mark the graphs also as being a hole or not.
-void Graph::Extract_Simples(BOOL_OP operation, bool detecthole, bool& foundholes )
-{
-	TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	if (_LI.empty()) return;
-	Node *begin;
-   int graphnumber=1;
-
-	_LI.mergesort(linkYXtopsorter);
-   _LI.tohead();
-	while (true)
-	{
-		begin = GetMostTopLeft(&_LI); // from all the most Top nodes,
-												// take the most left one
-												// to most or not to most, that is the question
-		if (!begin)
-			break;
-
-		try // collect the graph
-		{
-         if ( detecthole )
-				CollectGraph( begin,operation,detecthole,graphnumber++, foundholes );
-         else 
-				//CollectGraph( begin,operation,detecthole,graphnumber++, foundholes );
-				CollectGraphLast( begin,operation,detecthole,graphnumber++, foundholes );
-		}
-		catch (Bool_Engine_Error& error)
-		{
-			_GC->info(error.GetErrorMessage(), "error");
-			throw error;
-		}
-	}
-}
-
-void Graph::Split(GraphList* partlist)
-{
-  TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-  if (_LI.empty()) return;
-
-  Graph *part = NULL;
-  int graphnumber=0;
-
-  //sort the graph on graphnumber
-  _LI.mergesort(linkGraphNumsorter);
-
-  _LI.tohead();
-  while (!_LI.hitroot())
-  {
-    if ( _LI.item()->GetGraphNum() > 0 && graphnumber != _LI.item()->GetGraphNum())
-    {
-      graphnumber=_LI.item()->GetGraphNum();
-      part = new Graph(_GC);
-      partlist->insend(part);
-    }
-    KBoolLink* tmp=_LI.item();
-    if ( _LI.item()->GetGraphNum() > 0 )
-    {
-      part->AddLink(tmp);
-    }
-    else
-    {
-      delete tmp; 
-    }
-    _LI.remove();
-	}
-}
-
-bool Graph::GetBeenHere()
-{
-	return _bin;
-}
-
-// return total number of links in this graph
-int Graph::GetNumberOfLinks()
-{
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	return _LI.count();
-}
-
-//for all operations set the operation flags for the links
-//based on the Group_Left_Right values
-void Graph::Set_Operation_Flags()
-{
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	_LI.tohead();
-	while(!_LI.hitroot())
-	{
-	  _LI.item()->SetLineTypes();
-	  _LI++;
-	}
-}
-
-//  Remove unused (those not used for any operation) links
-void Graph::Remove_IN_Links()
-{
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	_LI.tohead();
-	for (int t = _LI.count() ; t > 0; t--)
-	{
-		// Is this link not used for any operation?
-		if (_LI.item()->IsUnused())
-		{
-			delete _LI.item();
-			_LI.remove();
-		}
-		else
-			_LI++;
-	}
-}
-
-void Graph::ResetBinMark()
-{
-	TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	if (_LI.empty()) return;
-	_LI.foreach_mf(&KBoolLink::UnMark);//reset bin and mark flag of each link
-}
-
-void Graph::ReverseAllLinks()
-{
-	Node*dummy;
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	_LI.tohead();
-	while (!_LI.hitroot())
-	{
-		// swap the begin- and endnode of the current link
-		dummy = _LI.item()->GetBeginNode();
-		_LI.item()->SetBeginNode(_LI.item()->GetEndNode());
-		_LI.item()->SetEndNode(dummy);
-		_LI++;
-	}
-}
-
-void Graph::SetBeenHere(bool value)
-{
-	_bin=value;
-}
-
-// ReSet the flags  of the links
-void Graph::Reset_flags()
-{
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	_LI.foreach_mf(&KBoolLink::Reset_flags);
-}
-
-// ReSet the bin and mark flag of the links
-void Graph::Reset_Mark_and_Bin()
-{
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	_LI.foreach_mf(&KBoolLink::UnMark);//reset bin and mark flag of each link
-}
-
-// Set the group of the links to the same as newgroup
-void Graph::SetGroup(GroupType newgroup)
-{
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	_LI.tohead();
-	while (!_LI.hitroot())
-	{
-		_LI.item()->SetGroup(newgroup);
-		_LI++;
-	}
-}
-
-
-// Set the number of the links to the same as newnr
-void Graph::SetNumber(int newnr)
-{
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	_LI.tohead();
-	while (!_LI.hitroot())
-	{
-		_LI.item()->SetGraphNum(newnr);
-		_LI++;
-	}
-}
-
-
-// This function will simplify a graph with the following rules
-//
-// This are the rules for symplifying the graphs
-// 1. The following point is the same as the current one
-// 2. The point after the following point is the same as the current one
-// 3. The point after the following point lies on the same line as the current
-//
-// input : a marge
-// return: true if graph is modified
-// 		: false if graph is NOT simplified
-bool Graph::Simplify( B_INT Marge )
-{
-	bool graph_is_modified = false;
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	int Processed = _LI.count();
-
-	_LI.foreach_mf(&KBoolLink::UnMark);//reset bin and mark flag of each link
-
-	_LI.tohead();
-	GroupType mygroup=_LI.item()->Group();
-
-	// All items must be processed
-	while (Processed > 0)
-	{
-		// Gives the number of items to process
-		Processed--;
-		// Check if line is marked
-		// Links will be marked during the process
-		if (_LI.item()->IsMarked())
-		{
-			delete _LI.item();
-			_LI.remove();
-			graph_is_modified = true;
-			Processed = _LI.count();
-			if (_LI.hitroot())
-				_LI.tohead();
-			continue;
-		}
-
-		// Line is not marked, check if line is zero
-		if (_LI.item()->IsZero(Marge))
-		{
-			_LI.item()->MergeNodes(_LI.item()->GetBeginNode());
-			delete _LI.item();
-			_LI.remove();
-			graph_is_modified = true;
-			Processed = _LI.count();
-			if (_LI.hitroot())
-				_LI.tohead();
-			continue;
-		}
-
-		// begin with trying to simplify the link
-		{
-			// Line is not marked, not zero, so maybe it can be simplified
-			bool virtual_link_is_modified;
-			Node*new_begin, *new_end, *a_node;
-			KBoolLink *a_link;
-
-			_LI.item()->Mark();
-			new_begin = _LI.item()->GetBeginNode();
-			new_end   = _LI.item()->GetEndNode();
-
-			// while virtual link is modified
-			do
-			{
-				virtual_link_is_modified = false;
-				// look in the previous direction
-				if ((a_link = new_begin->GetPrevLink()) != NULL)
-				{
-					a_node = a_link->GetBeginNode();
-					if (a_node->Simplify(new_begin,new_end,Marge))
-					{
-						new_begin->GetPrevLink()->Mark();
-						new_begin = a_node;
-						virtual_link_is_modified = true;
-					}
-				}
-				// look in the next direction
-				if ((a_link = new_end->GetNextLink()) != NULL)
-				{
-					a_node = a_link->GetEndNode();
-					if (a_node->Simplify(new_begin,new_end,Marge))
-					{
-						new_end->GetNextLink()->Mark();
-						new_end = a_node;
-						virtual_link_is_modified = true;
-					}
-				}
-				graph_is_modified = (bool) (graph_is_modified || virtual_link_is_modified);
-			} while (virtual_link_is_modified);
-
-			// was the link simplified
-			if ((_LI.item()->GetBeginNode() != new_begin) ||
-				(_LI.item()->GetEndNode() != new_end))
-			{
-				// YES !!!!!
-				int number = _LI.item()->GetGraphNum();
-				delete _LI.item();
-				_LI.remove();
-
-            if (_LI.hitroot())
-               _LI.tohead();
-
-				KBoolLink *newlink = new KBoolLink(number, new_begin, new_end, _GC);
-				newlink->SetGroup(mygroup);
-
-				_LI.insend(newlink);
-				Processed = _LI.count();
-				graph_is_modified = true;
-				continue;
-			}
-			_LI.item()->UnMark();
-		}	// end of try to simplify
-		_LI++;
-		if (_LI.hitroot())
-			_LI.tohead();
-	}//end while all processed
-
-	return graph_is_modified;
-}
-
-/*
-// This function will smoothen a graph with the following rules
-//
-// 0.	Process graphs with more than 3 links only. (while more than 3)
-//		Otherwise some objects may end-up as lines or disappear completely.
-// 1.
-// 	a. ?  Does begin-node lay on line(prevline.beginnode,endnode)
-//    	->  merge beginnode to endnode
-// 	b. ?  Does end-node lay on line(beginnode,nextline.endnode)
-//   		->  merge endnode to beginnode
-// 2.
-//		a. ?  Is distance between prevline.beginnode and endnode to short
-//   		->  merge beginnode to endnode
-//	 	b.	?  Is distance between beginnode and nextline.endnode to short
-//   		->  merge endnode to beginnode
-// 3.
-//		a. ?  Does (this)beginnode lay in area of nextline
-//				AND does cross-node lay on nextline
-//			->   move endnode to crossing of prevline and nextline
-//		b. ?  Does (this)endnode lay in area of prevline
-//				AND does cross-node lay on prevline
-//			->   move beginnode to crossing of prevline and nextline
-// 4.
-//		?  Is this link too short
-//			?  Is prevline shorter than nextline
-//		   Y ->  ?  Is prevlink shorter than maxlength
-//					->  merge endnode to beginnode
-//		   N ->  ?  Is nextlink shorter than maxlength
-//					->  merge endnode to beginnode
-//
-//
-//	Types of glitches / lines to remove :
-//
-//    \         /      \   		/							\         /
-//		 Z---A---B	 OR 	Z-------B---A				=> 	 Z-------B
-//
-//	  (1)
-//
-//	  ----A   	C----										=>		----A-----C----
-//			 \   /
-//	  (2)   \ /
-//		      B
-//
-//	  ---Z                                        		---Z
-//	      \                                                \
-//	  (3)  \                                                \
-//	        \   B----------C--							=>          A---B----------C--
-//          \ /
-//           A
-//
-//	  --Z---A                                          --Z__
-//          \                                              -__
-//	  (4)     B------------C--							=>            B------------C--
-//
-//	linkLsorter(L1,L2)
-//		ret:
-//			+1		L1 <	L2
-//			 0		L1 ==	L2
-//			-1		L1 >	L2
-//
-*/
-bool Graph::Smoothen( B_INT Marge )
-{
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	if (_LI.count()<=3)	// Don't modify it
-		return false;
-
-	Node*Z, *A, *B, *C, *cross_node = new Node(_GC);
-	KBoolLink *prevlink, *nextlink, *thislink;
-	KBoolLine	prevline(_GC),  nextline(_GC),  thisline(_GC);
-	KBoolLine	prevhelp(_GC),  nexthelp(_GC);
-
-	KBoolLink  LZB(new Node(_GC), new Node(_GC), _GC),
-			LAC(new Node(_GC), new Node(_GC), _GC);
-
-	double distance=0;
-   double prevdist,nextdist;
-
-	bool doprev, donext;
-	bool graph_is_modified = false;
-	bool kill = false;	// for first instance
-
-	_LI.tohead();
-	int todo = _LI.count();
-	thislink=_LI.item();
-	B = thislink->GetEndNode();
-	nextlink = thislink->Forth(B);
-
-	// Type 1
-	while (todo>0)
-	{
-		if (kill==true)
-		{
-			// remove link from graph
-			_LI.toitem(thislink);
-			graph_is_modified = true;
-			delete _LI.item();
-			_LI.remove();
-			kill=false;
-			thislink=nextlink;
-			todo--;
-			if (_LI.count()<3)
-				break;
-		}
-
-		A = thislink->GetBeginNode();
-		B = thislink->GetEndNode();
-
-		if (A->ShorterThan(B,1))
-		{
-			A->Merge(B);
-			kill = true;
-			continue;
-		}
-
-		Z = thislink->Forth(A)->GetBeginNode();
-		C = thislink->Forth(B)->GetEndNode();
-		thisline.Set(thislink);
-		thisline.CalculateLineParameters();
-		nextlink = thislink->Forth(B);
-
-		if (thisline.PointInLine(Z,distance,0.0) == ON_AREA)
-		{	// Z--A--B	=>		Z--B							Merge this to previous
-			thislink->MergeNodes(B);	// remove A
-			kill = true;
-			continue;
-		}
-		else if (thisline.PointInLine(C,distance,0.0) == ON_AREA)
-		{	// A--B--C	=>		A--C							Merge this to next
-			thislink->MergeNodes(A);	//	remove B
-			kill = true;
-			continue;
-		}
-
-		thislink=nextlink;
-		todo--;
-	}
-
-	kill=false;
-	todo = _LI.count();
-	_LI.mergesort(linkLsorter);
-	_LI.tohead();
-
-	while (todo>0)
-	{
-		if (kill==true)
-		{
-			delete _LI.item();
-			_LI.remove();
-			graph_is_modified = true;
-			kill = false;
-			//mergesort(linkLsorter);
-			_LI.mergesort(linkLsorter);
-			_LI.tohead();
-			todo = _LI.count();
-			if (todo<3)		// A polygon, at least, has 3 sides
-				break;
-		}
-
-		// Keep this order!
-		thislink = _LI.item();
-		A = thislink->GetBeginNode();
-		B = thislink->GetEndNode();
-		prevlink = thislink->Forth(A);
-		nextlink = thislink->Forth(B);
-		Z = prevlink->GetBeginNode();
-		C = nextlink->GetEndNode();
-
-		if (A->ShorterThan(B,1))
-		{
-			A->Merge(B);
-			kill = true;
-			continue;
-		}
-
-		prevline.Set(prevlink);
-		prevline.CalculateLineParameters();
-		nextline.Set(nextlink);
-		nextline.CalculateLineParameters();
-
-		// Type 2
-		if (B->ShorterThan(Z,Marge))
-		{	// Z--A--B	=>		Z--B							Merge this to previous
-			thislink->MergeNodes(B);	// remove A
-			kill = true;
-			continue;
-		}
-		else if (A->ShorterThan(C,Marge))
-		{	// A--B--C	=>		A--C							Merge this to next
-			thislink->MergeNodes(A);	//	remove B
-			kill = true;
-			continue;
-		}
-
-
-		*LZB.GetBeginNode()=*Z;
-		*LZB.GetEndNode()=*B;
-		*LAC.GetBeginNode()=*A;
-		*LAC.GetEndNode()=*C;
-		prevhelp.Set(&LZB);
-		nexthelp.Set(&LAC);
-		prevhelp.CalculateLineParameters();
-		nexthelp.CalculateLineParameters();
-
-
-		//	Type 4
-		doprev = bool(prevhelp.PointInLine(A,prevdist,(double)Marge) == IN_AREA);
-		donext = bool(nexthelp.PointInLine(B,nextdist,(double)Marge) == IN_AREA);
-		doprev = bool(B->ShorterThan(Z,_GC->GetInternalMaxlinemerge()) && doprev);
-		donext = bool(A->ShorterThan(C,_GC->GetInternalMaxlinemerge()) && donext);
-
-		if (doprev && donext)
-		{
-			if (fabs(prevdist)<=fabs(nextdist))
-				thislink->MergeNodes(B);	// remove A
-			else
-				thislink->MergeNodes(A);	// remove B
-
-			kill = true;
-			continue;
-		}
-		else if (doprev)
-		{
-			thislink->MergeNodes(B);	// remove A
-			kill = true;
-			continue;
-		}
-		else if (donext)
-		{
-			thislink->MergeNodes(A);	// remove B
-			kill = true;
-			continue;
-		}
-
-
-		thisline.Set(thislink);
-		thisline.CalculateLineParameters();
-
-		// Type 1
-		if (thisline.PointInLine(Z,distance,0.0) == ON_AREA)
-		{	// Z--A--B	=>		Z--B							Merge this to previous
-			thislink->MergeNodes(B);	// remove A
-			kill = true;
-			continue;
-		}
-		else if (thisline.PointInLine(C,distance,0.0) == ON_AREA)
-		{	// A--B--C	=>		A--C							Merge this to next
-			thislink->MergeNodes(A);	//	remove B
-			kill = true;
-			continue;
-		}
-
-
-		// Type 3
-		if (nextline.PointInLine(A,distance, (double) Marge)==IN_AREA)
-		{
-			if (nextline.Intersect2(cross_node,&prevline))
-			{
-				if (nextline.PointInLine(cross_node,distance,0.0)==IN_AREA)
-				{
-					B->Set(cross_node);
-					thislink->MergeNodes(B);	// remove A
-					kill=true;
-					continue;
-				}
-				else
-				{
-					thislink->MergeNodes(A);	// remove B
-					kill=true;
-					continue;
-				}
-			}
-			else
-			{
-				thislink->MergeNodes(A);	// remove B
-				kill=true;
-				continue;
-			}
-		}
-
-		// Type 3
-		if (prevline.PointInLine(B,distance,(double)Marge)==IN_AREA)
-		{
-			if (prevline.Intersect2(cross_node,&nextline))
-			{
-				if (prevline.PointInLine(cross_node,distance,0.0)==IN_AREA)
-				{
-					A->Set(cross_node);
-					thislink->MergeNodes(A);	// remove B
-					kill=true;
-					continue;
-				}
-				else
-				{
-					thislink->MergeNodes(B);	// remove A
-					kill=true;
-					continue;
-				}
-			}
-			else
-			{
-				thislink->MergeNodes(B);	// remove A
-				kill=true;
-				continue;
-			}
-		}
-
-		todo--;
-		_LI++;
-	}	// end: while all processed
-
-	delete cross_node;
-
-	return graph_is_modified;
-}
-
-
-// Give the graphnumber of the first link in the graphlist
-int Graph::GetGraphNum()
-{
-	return ((KBoolLink*)_linklist->headitem())->GetGraphNum();
-}
-
-
-// get the node with the highest Y value
-Node* Graph::GetTopNode()
-{
-	B_INT max_Y = MAXB_INT;
-	Node* result;
-
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-
-	_LI.tohead();
-	while (!_LI.hitroot())
-	{
-		if (!(_LI.item()->GetBeginNode()->GetY() < max_Y))
-			 break;
-		_LI++;
-	}
-	result = _LI.item()->GetBeginNode();
-
-	return result;
-}
-
-// THE GRAPH MUST be SORTED before using this function
-//	mergesort(linkYXtopsorter);
-// Get the mostleft top node from the graph  for which the link flag is not set yet
-Node*	Graph::GetMostTopLeft(TDLI<KBoolLink>* _LI)
-{
-	while (!_LI->hitroot())
-	{
-		if (!_LI->item()->BeenHere())
-      {
-         KBoolLink* a=_LI->item();
-         //find the top node of this link (sorted on top allready)
-         if (a->GetBeginNode()->GetY() > a->GetEndNode()->GetY())
-				return(a->GetBeginNode());
-         if (a->GetBeginNode()->GetY() < a->GetEndNode()->GetY())
-   			return(a->GetEndNode());
-         else
-   			return(a->GetBeginNode());
-      }
-		(*_LI)++;
-	}
-	return NULL;
-}
-
-// Take the linkslist over from a other graph
-// The linklist of the other graph will be empty afterwards
-void Graph::TakeOver(Graph *other)
-{
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	_LI.takeover( other->_linklist);
-}
-
-// calculate crossing with scanbeams   
-bool Graph::CalculateCrossings(B_INT Marge)
-{
-	// POINT <==> POINT
-	_GC->SetState("Node to Node");
-
-   bool found = false;
-   bool dummy = false;
-
-	found = Merge_NodeToNode(Marge) != 0;
-
-	if (_linklist->count() < 3)
-		  return found;
-
-	// POINT <==> LINK
-	_GC->SetState("Node to KBoolLink 0");
-
-   found = ScanGraph2(NODELINK, dummy) != 0 || found;
-
-	_GC->SetState("Rotate -90");
-	Rotate(false);
-
-	_GC->SetState("Node to KBoolLink -90");
-   found = ScanGraph2(NODELINK, dummy) != 0 || found;
-
-	_GC->SetState("Rotate +90");
-	Rotate(true);
-
-	// LINK <==> LINK
-	_GC->SetState("intersect");
-
-   found = ScanGraph2(LINKLINK, dummy) != 0 || found;
-
-/*
-   if (!checksort())
-   { {
-	   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-		_LI.mergesort(linkXYsorter);
-     }
-	  writeintersections();
-	  writegraph(true);
-   }
-*/
-
-//	Rotate(false);
-//	_GC->SetState("KBoolLink to KBoolLink -90");
-//   ScanGraph2(LINKLINK);
-//	Rotate(true);
-
-   writegraph(true);
-
-   _GC->Write_Log("Node to Node");
-	_GC->SetState("Node to Node");
-
-	found = Merge_NodeToNode(Marge) != 0 || found;
-   writegraph(true);
-
-   return found;
-}
-
-// neem de nodes die binnen de margeafstand bij elkaar liggen samen	RICHARD
-int Graph::Merge_NodeToNode(B_INT Marge)
-{
-	//aantal punten dat verplaatst is
-	int merges = 0;
-   {
-      TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-
-      //unmark all links; markflag wordt gebruikt om aan te geven
-      //of een link (eigenlijk beginnode ervan) al verwerkt is
-      _LI.foreach_mf(&KBoolLink::UnMark);
-
-      //sort links on x value of beginnode
-      _LI.mergesort(linkXYsorter);
-
-      //extra iterator voor doorlopen links in graph
-      {
-      TDLI<KBoolLink> 	links=TDLI<KBoolLink>(_linklist);
-
-      Node*nodeOne, *nodeTwo;
-      //verwerk alle links (alle (begin)nodes)
-      for(_LI.tohead(); !_LI.hitroot(); _LI++)
-      {
-         nodeOne = _LI.item()->GetBeginNode();
-
-         // link (beginnode) al verwerkt?
-         if(!_LI.item()->IsMarked())
-         {
-            // wordt verwerkt dus markeer
-            _LI.item()->Mark();
-
-            // doorloop alle links vanaf huidige tot link buiten marge
-            links.toiter(&_LI);links++;
-            while (!links.hitroot())
-            {
-               nodeTwo = links.item()->GetBeginNode();
-
-               // marked?
-               if(!links.item()->IsMarked())
-               {
-                  // x van beginnode vd link binnen marge?
-                  if(babs(nodeOne->GetX()-nodeTwo->GetX()) <= Marge )
-                  {
-                     // y van beginnode vd link binnen marge?
-                     // zijn twee node-object referenties wel verschillend?
-                     if(babs(nodeOne->GetY()-nodeTwo->GetY()) <= Marge &&
-                        (!(nodeOne == nodeTwo))
-                       )
-                     {
-                        links.item()->Mark();
-                        nodeOne->Merge(nodeTwo);
-                        merges++;
-                     }//y binnen marge en niet zelfde node
-                  }//x binnen marge?
-                  else
-                  {
-                     // link valt buiten marge; de rest vd links
-                     // dus ook (omdat lijst gesorteerd is)
-                     links.totail();
-                  }
-               }//marked?
-               links++;
-            }//current -> ongeldig
-         }//verwerkt?
-      }//all links
-
-      }//om de extra iterator te verwijderen
-   }
-	RemoveNullLinks();
-
-	return merges;
-}
-
-
-int Graph::ScanGraph2(SCANTYPE scantype, bool& holes )
-{
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-   int found=0;
-
-	//sort links on x and y value of beginnode
-	_LI.mergesort(linkXYsorter);
-
-	writegraph( false );
-
-	//bin flag is used in scanbeam so reset
-   _LI.foreach_mf(&KBoolLink::SetNotBeenHere);
-
-   ScanBeam* scanbeam = new ScanBeam(_GC);
-   Node*  _low;
-   Node*  _high;
-
-   _LI.tohead();
-   while (!_LI.attail())
-   {
-         _low = _LI.item()->GetBeginNode();
-         //find new links for the new beam and remove the old links
-         if ( scanbeam->FindNew(scantype,&_LI, holes ) )
-            found++;
-
-         //find a new low node, this should be a node not eqaul to the current _low
-         do
-         {  _LI++;}
-         while (!_LI.hitroot() && (_low == _LI.item()->GetBeginNode()));
-         if (_LI.hitroot())
-            //if the last few links share the same beginnode
-            //we arive here
-            break;
-         else
-            _high=_LI.item()->GetBeginNode();
-
-         scanbeam->SetType(_low,_high);
-
-         if (scanbeam->RemoveOld(scantype,&_LI, holes ) )
-            found++;
-   }
-
-	delete scanbeam;
-	return found;
-}
-
-
-/*
-
-//      	scanbeam->writebeam();
-
-      if (j%100 ==0)
-      {
-        long x;
-        long y;
-        char buf[80];
-		   x=(long)_lowlink->GetBeginNode()->GetX();
-		   y=(long)_lowlink->GetBeginNode()->GetY();
-        sprintf(buf," x=%I64d , y=%I64d here %I64d",x,y,scanbeam->count());
-			_GC->SetState(buf);
-      	scanbeam->writebeam();
-      }
-
-
-
-         writegraph(false);
-            if (!checksort())
-            {
-               double x=_lowlink->GetBeginNode()->GetX();
-               checksort();
-            }
-
-
-
-         _LI++;
-      }
-   }
-
-	delete scanbeam;
-	return 0;
-}
-
-
-         if (!checksort())
-         {
-            x=_lowlink->GetBeginNode()->GetX();
-            checksort();
-         }
-
-         if (x >= -112200)
-         {
-//	         writegraph(true);
-//	         scanbeam->writebeam();
-         }
-*/
-
-
-//=============================== Global Functions =============================
-
-// Sorts the links on the X values
-int linkXYsorter(KBoolLink *a, KBoolLink* b)
-{
-	if ( a->GetBeginNode()->GetX() < b->GetBeginNode()->GetX())
-		return(1);
-	if ( a->GetBeginNode()->GetX() > b->GetBeginNode()->GetX())
-		return(-1);
-   //they are eqaul in x
-	if ( a->GetBeginNode()->GetY() < b->GetBeginNode()->GetY())
-		return(-1);
-	if ( a->GetBeginNode()->GetY() > b->GetBeginNode()->GetY())
-		return(1);
-   //they are eqaul in y
-	return(0);
-}
-
-// Sorts the links on the Y value of the beginnode
-int linkYXsorter(KBoolLink *a, KBoolLink* b)
-{
-	if ( a->GetBeginNode()->GetY() > b->GetBeginNode()->GetY())
-		return(1);
-	if ( a->GetBeginNode()->GetY() < b->GetBeginNode()->GetY())
-		return(-1);
-	if ( a->GetBeginNode()->GetX() > b->GetBeginNode()->GetX())
-		return(-1);
-	if ( a->GetBeginNode()->GetX() < b->GetBeginNode()->GetX())
-		return(1);
-	return(0);
-}
-
-
-// The sort function for sorting graph from shortest to longest (_l1 < _l2)
-int linkLsorter(KBoolLink *_l1, KBoolLink* _l2)
-{
-	B_INT dx1,dx2,dy1,dy2;
-	dx1 = (_l1->GetEndNode()->GetX() - _l1->GetBeginNode()->GetX());
-	dx1*=dx1;
-	dy1 = (_l1->GetEndNode()->GetY() - _l1->GetBeginNode()->GetY());
-	dy1*=dy1;
-	dx2 = (_l2->GetEndNode()->GetX() - _l2->GetBeginNode()->GetX());
-	dx2*=dx2;
-	dy2 = (_l2->GetEndNode()->GetY() - _l2->GetBeginNode()->GetY());
-	dy2*=dy2;
-
-	dx1+=dy1;	dx2+=dy2;
-
-	if ( dx1 > dx2 )
-		return(-1);
-	if ( dx1 < dx2 )
-		return(1);
-	return(0);
-}
-
-// The sort function for the links in a graph (a.topnode < b.topnode)
-// if the two links lay with the top nodes on eachother the most left will be selected
-
-int linkYXtopsorter(KBoolLink *a, KBoolLink *b)
-{
-
-   if (bmax(a->GetBeginNode()->GetY(),a->GetEndNode()->GetY()) < bmax(b->GetBeginNode()->GetY(),b->GetEndNode()->GetY()))
-      return -1;
-   
-   if (bmax(a->GetBeginNode()->GetY(),a->GetEndNode()->GetY()) > bmax(b->GetBeginNode()->GetY(),b->GetEndNode()->GetY()))
-      return 1;
-   
-   //equal
-   if (bmin(a->GetBeginNode()->GetX(),a->GetEndNode()->GetX()) < bmin(b->GetBeginNode()->GetX(),b->GetEndNode()->GetX()))
-      return -1;
-   
-   if (bmin(a->GetBeginNode()->GetX(),a->GetEndNode()->GetX()) > bmin(b->GetBeginNode()->GetX(),b->GetEndNode()->GetX()))
-      return 1;
-   
-   return 0;
-}
-
-// The sort function for sorting graph from shortest to longest (_l1 < _l2)
-int linkGraphNumsorter(KBoolLink *_l1, KBoolLink* _l2)
-{
-	if ( _l1->GetGraphNum() > _l2->GetGraphNum())
-		return(-1);
-	if ( _l1->GetGraphNum() < _l2->GetGraphNum())
-		return(1);
-	return(0);
-}
-
-// Perform an operation on the graph
-void Graph::Boolean(BOOL_OP operation,GraphList* Result)
-{
-	_GC->SetState("Performing Operation");
-
-	// At this moment we have one graph
-	// step one, split it up in single graphs, and mark the holes
-	// step two, make one graph again and link the holes
-	// step three, split up again and dump the result in Result
-
-	_GC->SetState("Extract simples first ");
-
-   ResetBinMark();
-   DeleteNonCond(operation);
-   HandleNonCond(operation);
-
-   bool foundholes = false;
-   try
-	{
-//       WriteGraphKEY(_GC);
-      writegraph(true);
-
-		Extract_Simples(operation,true, foundholes);
-	}
-	catch (Bool_Engine_Error& error)
-	{
-      throw error;
-	}
-
-	// now we will link all the holes in de graphlist
-	// By the scanbeam method we will search all the links that are marked
-	//	as topleft link of a the hole polygon, when we find them we will get the
-	//	closest link, being the one higher in the beam.
-	//	Next we will create a link and nodes toceoonect the hole into it outside contour 
-   // or other hole.
-	_GC->SetState("Linking Holes");
-
-   if (_linklist->count() == 0)
-      //extract simples did leaf an empty graph
-      //so we are ready
-      return;
-
-   if ( foundholes && _GC->GetLinkHoles() )
-   {
-      //the first extract simples introduced nodes at the same location that are not merged.
-      //e.g. Butterfly polygons as two seperate polygons.
-      //The scanlines can not cope with this, so merge them, and later extract one more time.
-      Merge_NodeToNode(0);
-
-      _GC->Write_Log("LINKHOLES\n");
-      writegraph( false );
-
-      //link the holes into the non holes if there are any.
-      bool holes = false; 
-      ScanGraph2(LINKHOLES, holes );
-
-//       WriteGraphKEY(_GC);
-      writegraph(true);
-      if ( holes )
-      {
-		   //to delete extra points
-		   //those extra points are caused by link holes
-         //and are eqaul
-		   DeleteZeroLines(1);
-
-		   _GC->SetState("extract simples last");
-         ResetBinMark();
-         HandleNonCond(operation);
-         DeleteNonCond(operation);
-		   Extract_Simples(operation,false, foundholes);
-      }
-   }
-
-   writegraph( true );
-   Split(Result);
-}
-
-// Perform an correction on the graph
-void Graph::Correction( GraphList* Result, double factor )
-{
-	// At this moment we have one graph
-	// step one, split it up in single graphs, and mark the holes
-	// step two, make one graph again and link the holes
-	// step three, split up again and dump the result in Result
-	_GC->SetState("Extract simple graphs");
-
-	//extract the (MERGE or OR) result from the graph
-	if (Simplify(_GC->GetGrid()))
-		if (GetNumberOfLinks() < 3)
-				return;
-
-	Graph* original=new Graph(_GC);
-
-   {
-      if (_linklist->empty()) return;
-
-      KBoolLink* _current = GetFirstLink();
-		Node*_first = new Node(_current->GetBeginNode(), _GC);
-      Node*_last	 = _current->GetBeginNode();
-      Node*_begin = _first;
-      Node*_end   = _first;
-
-		int _nr_of_points = GetNumberOfLinks();
-		for (int i = 1; i < _nr_of_points; i++)
-      {
- 			// get the other node on the link
-			_last = _current->GetOther(_last);
-        // make a node from this point
-         _end = new Node(_last, _GC);
-
-         // make a link between begin and end
-         original->AddLink(_begin, _end);
-
-         _begin=_end;
- 			_current = _current->Forth(_last);
-      }
-
-      // make a link between the _begin and the first to close the graph
-      original->AddLink(_begin, _first);
-   }
-
-	SetNumber(1);
-	SetGroup(GROUP_A);
-	Prepare(1);
-   ResetBinMark();
-   //DeleteNonCond(BOOL_OR);
-   HandleNonCond(BOOL_OR);
-
-   bool foundholes = false;
-	Extract_Simples( BOOL_OR, true, foundholes );
-   Split(Result);
-
-	//Result contains the separate boundaries and holes
-
-   //ring creation should never be alternate rule, since it overlaps.
-   //So temprarely modify it.
-   bool rule = _GC->GetWindingRule();
-   _GC->SetWindingRule( true );
-
-	_GC->SetState("Create rings");
-	//first create a ring around all simple graphs
-   {
-     	TDLI<Graph> IResult=TDLI<Graph>(Result);
-      GraphList *_ring = new GraphList(_GC);
-      {
-         //put into one graphlist
-         IResult.tohead();
-         int i;
-         int n=IResult.count();
-         for (i=0;i<n;i++)
-         {
-           {
-				  IResult.item()->MakeClockWise();
-              IResult.item()->CreateRing_fast(_ring,fabs(factor));
-      //			  IResult.item()->CreateRing(_ring,fabs(factor));
-           }
-           delete(IResult.item());
-           IResult.remove();
-
-            //move ring graphlist to result
-            while (!_ring->empty())
-            {
-               //add to end
-					((Graph*)_ring->headitem())->MakeClockWise();
-               IResult.insend((Graph*)_ring->headitem());
-               _ring->removehead();
-            }
-         }
-      }
-      delete _ring;
-
-      //IResult contains all rings
-      //prepare the graphs for extracting the links of a certain operation
-      //set original graphlist to groupA and ring to groupB
-      int i=2;
-      IResult.tohead();
-      while (!IResult.hitroot())
-      {
-        IResult.item()->Reset_flags();
-        IResult.item()->SetGroup(GROUP_B);
-        IResult.item()->SetNumber(i);
-        i++;
-        IResult++;
-      }
-   }
-
-   //a ring shape can overlap itself, for alternate filling this is problem. 
-   //doing a merge in winding rule makes this oke, since overlap is removed by it.
-   if ( !rule ) //alternate rule? 
-   {
-      Prepare(1);
-      Boolean(BOOL_OR,Result);
-
-     	TDLI<Graph> IResult=TDLI<Graph>(Result);
-      //IResult contains all rings
-      //prepare the graphs for extracting the links of a certain operation
-      //set original graphlist to groupA and ring to groupB
-      int i=2;
-      IResult.tohead();
-      while (!IResult.hitroot())
-      {
-        IResult.item()->Reset_flags();
-        IResult.item()->SetGroup(GROUP_B);
-        IResult.item()->SetNumber(i);
-        i++;
-        IResult++;
-      }
-   }
-
-   //restore filling rule
-   _GC->SetWindingRule( rule );
-
-	TakeOver(original);
-   Reset_flags();
-   SetNumber(1);
-   SetGroup(GROUP_A);
-   Result->MakeOneGraph(this); // adds all graph its links to original
-										  // Result will be empty afterwords
-
-
-	//merge ring with original shapes for positive correction else subtract ring
-
-	//calculate intersections etc.
-	//SINCE correction will calculate intersections between
-	//ring and original _GC->Get_Marge() must be set a lot smaller then factor
-	//during the rest of this routine
-	//else wierd effects will be the result.
-	double Backup_Marge = _GC->GetMarge();
-
-	if (_GC->GetInternalMarge() > fabs(factor/100))
-	{
-      _GC->SetInternalMarge( (B_INT) fabs(factor/100));
-	   //less then 1 is usless since all coordinates are integers
-	   if (_GC->GetInternalMarge() < 1)
-		   _GC->SetInternalMarge(1);
-	}
-
-
-	Prepare(1);
-
-	_GC->SetState("Add/Substract rings");
-
-	if (factor > 0)
-		Boolean(BOOL_OR,Result);
-	else
-		Boolean(BOOL_A_SUB_B,Result);
-
-	_GC->SetMarge( Backup_Marge);
-
-	//the result of the graph correction is in Result
-   delete original;
-}
-
-// Perform an operation on the graph
-void Graph::MakeRing( GraphList* Result, double factor )
-{
-
-   bool rule = _GC->GetWindingRule();
-   _GC->SetWindingRule( true );
-
-	// At this moment we have one graph
-	// step one, split it up in single graphs, and mark the holes
-	// step two, make one graph again and link the holes
-	// step three, split up again and dump the result in Result
-	_GC->SetState("Extract simple graphs");
-
-	//extract the (MERGE or OR) result from the graph
-	SetNumber(1);
-	Prepare(1);
-
-   ResetBinMark();
-   //DeleteNonCond(BOOL_OR);
-   HandleNonCond(BOOL_OR);
-
-   bool foundholes = false;
-	Extract_Simples( BOOL_OR, true, foundholes );
-   Split(Result);
-	//Iresult contains the separate boundaries and holes
-	//make a correction on the boundaries factor
-	//make a correction on the holes -factor
-
-	_GC->SetState("Create rings");
-
-   //first create a ring around all simple graphs
-   TDLI<Graph> IResult=TDLI<Graph>(Result);
-   GraphList *_ring = new GraphList(_GC);
-   {
-      IResult.tohead();
-      int i;
-      int n=IResult.count();
-      for (i=0;i<n;i++)
-      {
-        {
-  			   IResult.item()->MakeClockWise();
-            IResult.item()->CreateRing_fast(_ring,fabs(factor));
-        }
-        delete(IResult.item());
-        IResult.remove();
-
-         //move ring graphlist to result
-         while (!_ring->empty())
-         {
-            //add to end
-				((Graph*)_ring->headitem())->MakeClockWise();
-            IResult.insend((Graph*)_ring->headitem());
-            _ring->removehead();
-         }
-      }
-   }
-	delete _ring;
-   _GC->SetWindingRule( rule );
-}
-
-//create a ring shapes on every edge of the graph
-void Graph::CreateRing( GraphList *ring, double factor )
-{
-  TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-  _LI.tohead();
-  while( !_LI.hitroot())
-  {
-	 Graph *shape=new Graph(_GC);
-	 //generate shape around link
-	 shape->Make_Rounded_Shape(_LI.item(),factor);
-	 ring->insbegin(shape);
-	 _LI++;
-  }
-}
-
-//create a ring shapes on every edge of the graph
-void Graph::CreateRing_fast( GraphList *ring, double factor )
-{
-	Node* begin;
-	KBoolLink* currentlink;
-	KBoolLine  currentline(_GC);
-
-	KBoolLine  firstline(_GC);
-
-	KBoolLink* nextlink;
-	KBoolLine nextline(_GC);
-
-   {
-   	TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-		_LI.foreach_mf(&KBoolLink::UnMark);//reset bin and mark flag of each link
-		_LI.mergesort(linkYXsorter);
-	   _LI.tohead();
-
-		begin = GetMostTopLeft(&_LI); // from all the most Top nodes,
-											   // take the most left one
-   }
-	if (!begin)
-		return;
-
-	currentlink=begin->GetIncomingLink();
-	currentline.Set(currentlink);
-	currentline.CalculateLineParameters();
-
-	nextlink=begin->GetOutgoingLink();
-	nextline.Set(nextlink);
-	nextline.CalculateLineParameters();
-
-	firstline.Set(nextlink);
-	firstline.CalculateLineParameters();
-
-	while (nextlink)
-	{
-		Graph *shape=new Graph(_GC);
-		{
-
-			Node* _last_ins_left  =0;
-			Node* _last_ins_right =0;
-
-			currentline.Create_Begin_Shape(&nextline,&_last_ins_left,&_last_ins_right,factor,shape);
-
-			while(true)
-			{
-				currentline=nextline;
-				currentlink=nextlink;
-				currentlink->SetBeenHere();
-
-				nextlink=currentlink->GetEndNode()->Follow(currentlink);
-				if (nextlink)
-				{
-					nextline.Set(nextlink);
-					nextline.CalculateLineParameters();
-					if (!currentline.Create_Ring_Shape(&nextline,&_last_ins_left,&_last_ins_right,factor,shape))
-						break;
-				}
-				else
-					break;
-			}
-
-			//finish this part
-			if (nextlink)
-				currentline.Create_End_Shape(&nextline,_last_ins_left,_last_ins_right,factor,shape);
-			else
-				currentline.Create_End_Shape(&firstline,_last_ins_left,_last_ins_right,factor,shape);
-
-			shape->MakeOneDirection();
-  			shape->MakeClockWise();
-		}
-
-		//if the shape is very small first merge it with the previous shape
-		if (!ring->empty() && shape->Small( (B_INT) fabs(factor*3)))
-		{
-		   TDLI<Graph> Iring = TDLI<Graph>(ring);
-
-			Iring.totail();
-
-			GraphList *_twoshapes=new GraphList(_GC);
-			_twoshapes->insbegin(shape);
-			_twoshapes->insbegin(Iring.item());
-			Iring.remove();
-			_twoshapes->Merge();
-
-			//move merged graphlist to ring
-			Iring.takeover(_twoshapes);
-			delete _twoshapes;
-		}
-		else
-			ring->insend(shape);
-
-		currentlink->SetBeenHere();
-   }
-}
-
-//create an arc and add it to the graph
-//center of circle
-//begin point of arc
-//end point of arc
-//radius of arc
-//aberation for generating the segments
-void Graph::CreateArc(Node* center, Node* begin, Node* end,double radius,bool clock,double aber)
-{
-	double phi,dphi,dx,dy;
-	int Segments;
-	int i;
-	double ang1,ang2,phit;
-
-	Node* _last_ins;
-	Node* _current;
-
-	_last_ins=begin;
-
-	dx = (double) _last_ins->GetX() - center->GetX();
-	dy = (double) _last_ins->GetY() - center->GetY();
-	ang1=atan2(dy,dx);
-	if (ang1<0) ang1+=2.0*M_PI;
-	dx = (double) end->GetX() - center->GetX();
-	dy = (double) end->GetY() - center->GetY();
-	ang2=atan2(dy,dx);
-	if (ang2<0) ang2+=2.0*M_PI;
-
-	if (clock)
-	{ //clockwise
-		if (ang2 > ang1)
-			phit=2.0*M_PI-ang2+ ang1;
-		else
-			phit=ang1-ang2;
-	}
-	else
-	{ //counter_clockwise
-		if (ang1 > ang2)
-			phit=-(2.0*M_PI-ang1+ ang2);
-		else
-			phit=-(ang2-ang1);
-	}
-
-	//what is the delta phi to get an accurancy of aber
-	dphi=2*acos((radius-aber)/radius);
-
-	//set the number of segments
-	if (phit > 0)
-		Segments=(int)ceil(phit/dphi);
-	else
-		Segments=(int)ceil(-phit/dphi);
-
-	if (Segments <= 1)
-	  Segments=1;
-	if (Segments > 6)
-	  Segments=6;
-
-	dphi=phit/(Segments);
-
-	for (i=1; i<Segments; i++)
-	{
-	  dx = (double) _last_ins->GetX() - center->GetX();
-	  dy = (double) _last_ins->GetY() - center->GetY();
-	  phi=atan2(dy,dx);
-
-	  _current = new Node((B_INT) (center->GetX() + radius * cos(phi-dphi)),
-								 (B_INT) (center->GetY() + radius * sin(phi-dphi)), _GC);
-	  AddLink(_last_ins, _current);
-
-	  _last_ins=_current;
-	}
-
-	// make a node from the endnode of link
-	AddLink(_last_ins, end);
-}
-
-void Graph::CreateArc(Node* center, KBoolLine* incoming, Node* end,double radius,double aber)
-{
-	double distance=0;
-	if (incoming->PointOnLine(center, distance, _GC->GetAccur()) == RIGHT_SIDE)
-		CreateArc(center,incoming->GetEndNode(),end,radius,true,aber);
-	else
-		CreateArc(center,incoming->GetEndNode(),end,radius,false,aber);
-}
-
-void Graph::MakeOneDirection()
-{
-	int _nr_of_points = _linklist->count();
-	KBoolLink* _current = (KBoolLink*)_linklist->headitem();
-
-	Node* _last = _current->GetBeginNode();
-	Node* dummy;
-
-	for (int i = 0; i < _nr_of_points; i++)
-	{
-		// get the other node on the link
-		_last = _current->GetOther(_last);
-		// get the other link on the node
-		_current = _current->Forth(_last);
-
-		if (_current->GetBeginNode() != _last)
-		{
-			// swap the begin- and endnode of the current link
-			dummy = _current->GetBeginNode();
-			_current->SetBeginNode(_current->GetEndNode());
-			_current->SetEndNode(dummy);
-		}
-	}
-}
-
-bool Graph::Small(B_INT howsmall)
-{
-
-   TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	_LI.tohead();
-   Node* bg=_LI.item()->GetBeginNode();
-   B_INT xmin=bg->GetX();
-   B_INT xmax=bg->GetX();
-   B_INT ymin=bg->GetY();
-   B_INT ymax=bg ->GetY();
-	while (!_LI.hitroot())
-	{
-     bg=_LI.item()->GetBeginNode();
-     // make _boundingbox bigger if the link makes the graph bigger
-	  // Checking if point is in bounding-box with marge
-     xmin=bmin(xmin,bg->GetX());
-     xmax=bmax(xmax,bg->GetX());
-     ymin=bmin(ymin,bg->GetY());
-     ymax=bmax(ymax,bg->GetY());
-	  _LI++;
-	}
-
-	B_INT dx=(xmax-xmin);
-	B_INT dy=(ymax-ymin);
-
-	if ((dx < howsmall) && (dy < howsmall) )
-      return true;
-
-	return false;
-}
-
-
-//create a circle at end and begin point
-// and block in between
-void	Graph::Make_Rounded_Shape( KBoolLink* a_link, double factor)
-{
-	double phi,dphi,dx,dy;
-	int Segments=6;
-	int i;
-
-
-	KBoolLine theline(a_link, _GC);
-	theline.CalculateLineParameters();
-
-	Node* _current;
-	Node*_first = new Node(a_link->GetBeginNode(), _GC);
-	Node*_last_ins = _first;
-
-	theline.Virtual_Point(_first,factor);
-
-	// make a node from this point
-	_current = new Node(a_link->GetEndNode(), _GC);
-	theline.Virtual_Point(_current,factor);
-
-	// make a link between the current and the previous and add this to graph
-	AddLink(_last_ins, _current);
-	_last_ins=_current;
-
-	// make a half circle around the clock with the opposite point as
-	// the middle point of the circle
-	dphi=M_PI/(Segments);
-	for (i=1; i<Segments; i++)
-	{
-	  dx = (double) _last_ins->GetX() - a_link->GetEndNode()->GetX();
-	  dy = (double) _last_ins->GetY() - a_link->GetEndNode()->GetY();
-	  phi=atan2(dy,dx);
-
-	  _current = new Node((B_INT) (a_link->GetEndNode()->GetX() + factor * cos(phi-dphi)),
-								 (B_INT) (a_link->GetEndNode()->GetY() + factor * sin(phi-dphi)), _GC);
-
-	  AddLink(_last_ins, _current);
-
-	  _last_ins=_current;
-	}
-
-	// make a node from the endnode of link
-	_current = new Node(a_link->GetEndNode(), _GC);
-	theline.Virtual_Point(_current,-factor);
-	AddLink(_last_ins, _current);
-	_last_ins=_current;
-
-	// make a node from this beginnode of link
-	_current = new Node(a_link->GetBeginNode(), _GC);
-	theline.Virtual_Point(_current,-factor);
-	AddLink(_last_ins, _current);
-	_last_ins=_current;
-
-	for (i=1; i<Segments; i++)
-	{
-	  dx = (double) _last_ins->GetX() - a_link->GetBeginNode()->GetX();
-	  dy = (double) _last_ins->GetY() - a_link->GetBeginNode()->GetY();
-	  phi=atan2(dy,dx);
-
-	  _current = new Node((B_INT)(a_link->GetBeginNode()->GetX() + factor * cos(phi-dphi)),
-								 (B_INT)(a_link->GetBeginNode()->GetY() + factor * sin(phi-dphi)), _GC);
-
-	  AddLink(_last_ins, _current);
-
-	  _last_ins=_current;
-	}
-
-	// make a link between the last and the first to close the graph
-	AddLink(_last_ins, _first);
-};
-
-//make the graph clockwise orientation,
-//return if the graph needed redirection
-bool Graph::MakeClockWise()
-{
-   if ( _GC->GetOrientationEntryMode() )
-      return false;
-
-	TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	if (_LI.empty()) return false;
-
-	KBoolLink *currentlink;
-	Node* begin;
-
-	_LI.foreach_mf(&KBoolLink::UnMark);//reset bin and mark flag of each link
-	_LI.mergesort(linkYXtopsorter);
-   _LI.tohead();
-
-	begin = GetMostTopLeft(&_LI); // from all the most Top nodes,
-   								  		// take the most left one
-
-	currentlink=begin->GetNotFlat();
-	if (!currentlink)
-   {
-      char buf[100];
-	   sprintf(buf,"no NON flat link MakeClockWise at %15.3lf , %15.3lf",
-         				double(begin->GetX()),double(begin->GetY()));
-		throw Bool_Engine_Error(buf, "Error", 9, 0);
-	}
-
-   //test to see if the orientation is right or left
-   if (currentlink->GetBeginNode() == begin)
-   {
-      if ( currentlink->GetEndNode()->GetX() < begin->GetX())
-      {
-	      //going left
-         //it needs redirection
-         ReverseAllLinks();
-         return true;
-      }
-   }
-   else
-   {
-      if ( currentlink->GetBeginNode()->GetX() > begin->GetX())
-      {  //going left
-			//it needs redirection
-         ReverseAllLinks();
-         return true;
-      }
-   }
-   return false;
-}
-
-bool Graph::writegraph(bool linked)
-{
-#if DEBUG == 1
-
-   FILE* file = _GC->GetLogFile();
-
-   if (file == NULL)
-       return true;
-
-	fprintf( file, "# graph\n" );
-
-	TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	if (_LI.empty())
-   {  
-		return true;
-   }
-
-   _LI.tohead();
-   while(!_LI.hitroot())
-   {
-	   KBoolLink* curl = _LI.item();
-
-      fprintf( file, " linkbegin %I64d %I64d \n", curl->GetBeginNode()->GetX() , curl->GetBeginNode()->GetY() );
-
-		if (linked)
-      {
-			TDLI<KBoolLink> Inode(curl->GetBeginNode()->GetLinklist());
-         Inode.tohead();
-		   while(!Inode.hitroot())
-   		{
-
-            fprintf( file, " b %I64d %I64d \n", Inode.item()->GetBeginNode()->GetX() , Inode.item()->GetBeginNode()->GetY() );
-
-            fprintf( file, " e %I64d %I64d \n", Inode.item()->GetEndNode()->GetX() , Inode.item()->GetEndNode()->GetY() );
-
-            Inode++;
-         }
-      }
-      fprintf( file, " linkend %I64d %I64d \n", curl->GetEndNode()->GetX() , curl->GetEndNode()->GetY() );
-
-
-      if (linked)
-      {
-			TDLI<KBoolLink> Inode(curl->GetEndNode()->GetLinklist());
-         Inode.tohead();
-		   while(!Inode.hitroot())
-   		{
-
-            fprintf( file, " b %I64d %I64d \n", Inode.item()->GetBeginNode()->GetX() , Inode.item()->GetBeginNode()->GetY() );
-
-            fprintf( file, " e %I64d %I64d \n", Inode.item()->GetEndNode()->GetX() , Inode.item()->GetEndNode()->GetY() );
-
-            Inode++;
-         }
-
-      }
-
-      if ( curl->GetBeginNode() == curl->GetEndNode() )
-		   fprintf( file, "     null_link \n" );
-
-	   fprintf( file, "    group %d ", curl->Group() );
-	   fprintf( file, "    bin   %d ", curl->BeenHere() );
-	   fprintf( file, "    mark  %d ", curl->IsMarked() );
-	   fprintf( file, "    leftA %d ", curl->GetLeftA() );
-	   fprintf( file, "    rightA %d ", curl->GetRightA() );
-	   fprintf( file, "    leftB %d ", curl->GetLeftB() );
-	   fprintf( file, "    rightB %d \n", curl->GetRightB() );
-	   fprintf( file, "    or %d ", curl->IsMarked(BOOL_OR) );
-	   fprintf( file, "    and %d " , curl->IsMarked(BOOL_AND) );
-	   fprintf( file, "    exor %d " , curl->IsMarked(BOOL_EXOR) );
-	   fprintf( file, "    a_sub_b %d " , curl->IsMarked(BOOL_A_SUB_B) );
-	   fprintf( file, "    b_sub_a %d " , curl->IsMarked(BOOL_B_SUB_A) );
-	   fprintf( file, "    hole %d " , curl->GetHole() );
-	   fprintf( file, "    top_hole %d \n" , curl->IsTopHole() );
-      
-      _LI++;
-   }
-
-#endif
-
-   return true;
-}
-
-bool Graph::writeintersections()
-{
-
-#if DEBUG == 1
-
-   FILE* file = _GC->GetLogFile();
-
-   if (file == NULL)
-       return true;
-
-   fprintf( file, "# graph\n" );
-
-	TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	if (_LI.empty())
-   {  
-		return true;
-   }
-
-   _LI.tohead();
-   while(!_LI.hitroot())
-   {
-	   KBoolLink* curl=_LI.item();
-      TDLI<KBoolLink> Inode(curl->GetBeginNode()->GetLinklist());
-      Inode.tohead();
-      if (Inode.count() > 2)
-      {
-         fprintf( file, " count %I64d", Inode.count() );
-         fprintf( file, " b %I64d %I64d \n\n", curl->GetBeginNode()->GetX() , curl->GetBeginNode()->GetY() );
-      }
-      _LI++;
-   }
-#endif
-
-   return true;
-}
-
-bool Graph::checksort()
-{
-	// if empty then just insert
-	if (_linklist->empty())
-		return true;
-
-	TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-   // put new item left of the one that is bigger
-   _LI.tohead();
-   KBoolLink* prev=_LI.item();
-   KBoolLink* cur=_LI.item();
-   _LI++;
-   while(!_LI.hitroot())
-   {
-      KBoolLink* aap=_LI.item();
-      if (linkXYsorter(prev,_LI.item())==-1)
-      {
-         cur=aap;
-
-         return false;
-      }
-      prev=_LI.item();
-      _LI++;
-   }
-   return true;
-}
-
-
-void Graph::WriteKEY( Bool_Engine* GC, FILE* file )
-{
-   double scale = 1.0/GC->GetGrid()/GC->GetGrid();
-
-   bool ownfile = false;
-   if ( !file )
-   {
-      file = fopen("keyfile.key", "w");
-      ownfile = true;
-
-      fprintf(file,"\
-         HEADER 5; \
-         BGNLIB; \
-         LASTMOD {2-11-15  15:39:21}; \
-         LASTACC {2-11-15  15:39:21}; \
-         LIBNAME trial; \
-         UNITS; \
-         USERUNITS 0.0001; PHYSUNITS 1e-009; \
-      \
-         BGNSTR;  \
-         CREATION {2-11-15  15:39:21}; \
-         LASTMOD  {2-11-15  15:39:21}; \
-         STRNAME top; \
-      ");
-   }
-
-	TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	if (_LI.empty())
-   {  
-      if ( ownfile )
-      {
-         fprintf(file,"\
-            ENDSTR top; \
-            ENDLIB; \
-         ");
-         fclose (file);
-
-      }
-		return;
-   }
-
-
-   _LI.tohead();
-   KBoolLink* curl = _LI.item();
-
-	if ( _LI.item()->Group() == GROUP_A )
-      fprintf(file,"BOUNDARY; LAYER 0;  DATATYPE 0;\n");
-   else
-      fprintf(file,"BOUNDARY; LAYER 1;  DATATYPE 0;\n");
-   fprintf(file," XY %d; \n", _LI.count()+1 );
-
-   double firstx = curl->GetBeginNode()->GetX()*scale;
-   double firsty = curl->GetBeginNode()->GetY()*scale;
-   fprintf(file,"X %f;\t", firstx);
-   fprintf(file,"Y %f; \n", firsty); 
-   _LI++;
-
-   while(!_LI.hitroot())
-   {
-	   KBoolLink* curl = _LI.item();
-
-      fprintf(file,"X %f;\t", curl->GetBeginNode()->GetX()*scale);
-      fprintf(file,"Y %f; \n", curl->GetBeginNode()->GetY()*scale); 
-      
-      _LI++;
-   }
-   fprintf(file,"X %f;\t", firstx);
-   fprintf(file,"Y %f; \n", firsty); 
-   fprintf(file,"ENDEL;\n");
-
-   if ( ownfile )
-   {
-      fprintf(file,"\
-         ENDSTR top; \
-         ENDLIB; \
-      ");
-      fclose (file);
-
-   }
-}
- 
-
-void Graph::WriteGraphKEY(Bool_Engine* GC)
-{
-
-   double scale = 1.0/GC->GetGrid()/GC->GetGrid();
-
-   FILE* file = fopen("keygraphfile.key", "w");
-
-   fprintf(file,"\
-      HEADER 5; \
-      BGNLIB; \
-      LASTMOD {2-11-15  15:39:21}; \
-      LASTACC {2-11-15  15:39:21}; \
-      LIBNAME trial; \
-      UNITS; \
-      USERUNITS 1; PHYSUNITS 1e-006; \
-   \
-      BGNSTR;  \
-      CREATION {2-11-15  15:39:21}; \
-      LASTMOD  {2-11-15  15:39:21}; \
-      STRNAME top; \
-   ");
-
-
-	TDLI<KBoolLink> _LI=TDLI<KBoolLink>(_linklist);
-	if (_LI.empty())
-   {  
-      fprintf(file,"\
-         ENDSTR top; \
-         ENDLIB; \
-      ");
-      fclose (file);
-		return;
-   }
-
-   _LI.tohead();
-   KBoolLink* curl;
-
-	int _nr_of_points = _linklist->count();
-	for (int i = 0; i < _nr_of_points; i++)
-	{
-	   curl = _LI.item();
-
-	   if ( curl->Group() == GROUP_A )
-         fprintf(file,"PATH; LAYER 0;\n");
-      else
-         fprintf(file,"PATH; LAYER 1;\n");
-
-      fprintf(file," XY %d; \n", 2 );
-      fprintf(file,"X %f;\t", curl->GetBeginNode()->GetX()*scale);
-      fprintf(file,"Y %f; \n", curl->GetBeginNode()->GetY()*scale); 
-      fprintf(file,"X %f;\t", curl->GetEndNode()->GetX()*scale);
-      fprintf(file,"Y %f; \n", curl->GetEndNode()->GetY()*scale); 
-      _LI++;
-      fprintf(file,"ENDEL;\n");      
-	}
-
-   fprintf(file,"\
-      ENDSTR top; \
-      ENDLIB; \
-   ");
-
-   fclose (file);
-}
-
-
-
-
diff --git a/src/ossim/kbool/graphlst.cpp b/src/ossim/kbool/graphlst.cpp
deleted file mode 100644
index 5b59a45..0000000
--- a/src/ossim/kbool/graphlst.cpp
+++ /dev/null
@@ -1,414 +0,0 @@
-/*! \file kbool/src/graphlst.cpp
-    \brief Implements a list of graphs
-    \author Probably Klaas Holwerda 
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda 
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: graphlst.cpp 9094 2006-06-13 19:12:40Z dburken $
-*/
-
-#ifdef __GNUG__
-#pragma implementation 
-#endif
-
-//#include "debugdrv.h"
-#include <ossim/kbool/booleng.h>
-#include <ossim/kbool/graphlst.h>
-
-//extern Debug_driver* _debug_driver;
-//this here is to initialize the static iterator of graphlist
-//with NOLIST constructor
-
-int 	graphsorterX( Graph *, Graph * );
-int 	graphsorterY( Graph *, Graph * );
-
-GraphList::GraphList(Bool_Engine* GC) 
-{
-   _GC=GC;
-}
-
-GraphList::GraphList( GraphList* other ) 
-{
-   _GC = other->_GC;
-
-   TDLI<Graph> _LI = TDLI<Graph>( other );
-	_LI.tohead();
-	while (!_LI.hitroot())
-	{
-      insend( new Graph( _LI.item() ) );
-		_LI++;
-	}
-}
-
-GraphList::~GraphList()
-{
-   clearListAndBoolEngine();
-}
-
-void GraphList::clearList()
-{
-   if(!empty())
-   {
-      TDLI<Graph> _LI=TDLI<Graph>(this);
-      //first empty the graph
-      _LI.delete_all();
-   }
-}
-
-void GraphList::clearListAndBoolEngine()
-{
-   if(!empty())
-   {
-      TDLI<Graph> _LI=TDLI<Graph>(this);
-      //first empty the graph
-      _LI.delete_all();
-   }
-   _GC = 0;
-}
-//prepare the graphlist for the boolean operations
-//group all graphs into ONE graph
-void GraphList::Prepare(Graph* total)
-{
-   if (empty())
-      return;
-
-   //round to grid and put in one graph
-	_GC->SetState("Simplify");
-
-	// Simplify all graphs in the list
-	Simplify( (double) _GC->GetGrid() );
-
-   if ( ! _GC->GetOrientationEntryMode() )
-   {
-      TDLI<Graph> _LI=TDLI<Graph>(this);
-      _LI.tohead();
-      while (!_LI.hitroot())
-      {
-			_LI.item()->MakeClockWise();
-         _LI++;
-      }
-   }
-
-	Renumber();
-
-	//the graplist contents will be transferred to one graph
-	MakeOneGraph(total);
-}
-
-// the function will make from all the graphs in the graphlist one graph,
-// simply by throwing all the links in one graph, the graphnumbers will
-// not be changed
-void GraphList::MakeOneGraph(Graph* total)
-{
-   TDLI<Graph> _LI=TDLI<Graph>(this);
-	_LI.tohead();
-	while(!_LI.hitroot())
-	{
-		total->TakeOver(_LI.item());
-		delete _LI.item();
-		_LI.remove();
-	}
-}
-
-//
-// Renumber all the graphs
-//
-void GraphList::Renumber()
-{
-   if ( _GC->GetOrientationEntryMode() )
-   {
-      TDLI<Graph> _LI=TDLI<Graph>(this);
-	   _LI.tohead();
-	   while (!_LI.hitroot())
-	   {
-         if ( _LI.item()->GetFirstLink()->Group() == GROUP_A )
-		      _LI.item()->SetNumber(1);
-         else
-		      _LI.item()->SetNumber(2);
-		   _LI++;
-	   }
-   }
-   else
-   {
-	   unsigned int Number = 1;
-      TDLI<Graph> _LI=TDLI<Graph>(this);
-	   _LI.tohead();
-	   while (!_LI.hitroot())
-	   {
-		   _LI.item()->SetNumber(Number++);
-		   _LI++;
-	   }
-   }
-}
-
-
-// Simplify the graphs
-void GraphList::Simplify(double marge)
-{
-   TDLI<Graph> _LI=TDLI<Graph>(this);
-	_LI.foreach_mf(&Graph::Reset_Mark_and_Bin);
-
-	_LI.tohead();
-	while (!_LI.hitroot())
-	{
-		if (_LI.item()->Simplify( (B_INT) marge))
-      { 
-			if (_LI.item()->GetNumberOfLinks() < 3)
-				// delete this graph from the graphlist
-         {
-            delete _LI.item();
-            _LI.remove();
-         }
-      }
-		else
-			_LI++;
-	}
-}
-
-// Smoothen the graphs
-void GraphList::Smoothen(double marge)
-{
-   TDLI<Graph> _LI=TDLI<Graph>(this);
-	_LI.foreach_mf(&Graph::Reset_Mark_and_Bin);
-
-	_LI.tohead();
-	while (!_LI.hitroot())
-	{
-		if (_LI.item()->Smoothen( (B_INT) marge))
-      {
-			if (_LI.item()->GetNumberOfLinks() < 3)
-			// delete this graph from the graphlist
-         {
-            delete _LI.item();
-            _LI.remove();
-         }
-      }
-		else
-			_LI++;
-	}
-}
-
-
-// Turn off all markers in all the graphs
-void GraphList::UnMarkAll()
-{
-   TDLI<Graph> _LI=TDLI<Graph>(this);
-	_LI.foreach_mf(&Graph::Reset_Mark_and_Bin);
-}
-
-//==============================================================================
-//
-//======================== BOOLEAN FUNCTIONS ===================================
-//
-//==============================================================================
-
-void GraphList::Correction()
-{
-   TDLI<Graph> _LI=TDLI<Graph>(this);
-	int todo=_LI.count();
-
-   if ( _GC->GetInternalCorrectionFactor()) //not zero
-   {
-      _LI.tohead();
-      for(int i=0; i<todo ; i++)
-      {
-         //the input graph will be empty in the end
-         GraphList *_correct=new GraphList(_GC);
-         {
-            _LI.item()->MakeClockWise();
-            _LI.item()->Correction(_correct,_GC->GetInternalCorrectionFactor());
-
-            delete _LI.item();
-            _LI.remove();
-
-            //move corrected graphlist to result
-            while (!_correct->empty())
-            {
-               //add to end
-               _LI.insend((Graph*)_correct->headitem());
-               _correct->removehead();
-            }
-         }
-         delete _correct;
-      }
-   }  
-   }
-
-void GraphList::MakeRings()
-{
-   TDLI<Graph> _LI=TDLI<Graph>(this);
-	int todo=_LI.count();
-
-	_LI.tohead();
-	for(int i=0; i<todo ; i++)
-	{
-		//the input graph will be empty in the end
-		GraphList *_ring=new GraphList(_GC);
-		{
-			_LI.item()->MakeClockWise();
-			_LI.item()->MakeRing(_ring,_GC->GetInternalCorrectionFactor());
-
-         delete _LI.item();
-			_LI.remove();
-
-			//move created rings graphs to this
-			while (!_ring->empty())
-			{
-				//add to end
-				((Graph*)_ring->headitem())->MakeClockWise();
-				_LI.insend((Graph*)_ring->headitem());
-				_ring->removehead();
-			}
-		}
-		delete _ring;
-	}
-
-}
-
-//merge the graphs in the list and return the merged result
-void GraphList::Merge()
-{
-   if (count()<=1)
-      return;
-
-   {
-      TDLI<Graph> _LI=TDLI<Graph>(this);
-      _LI.tohead();
-      while (!_LI.hitroot())
-      {
-         _LI.item()->SetGroup(GROUP_A);
-         _LI++;
-      }
-   }
-
-   Graph* _tomerge=new Graph(_GC);
-
-   Renumber();
-
-   //the graplist contents will be transferred to one graph
-   MakeOneGraph(_tomerge);
-   //the original is empty now
-
-   _tomerge->Prepare(1);
-   _tomerge->Boolean(BOOL_OR,this);
-
-	delete _tomerge;
-}
-
-#define TRIALS 30  
-#define SAVEME 1
-
-//perform boolean operation on the graphs in the list
-void GraphList::Boolean(BOOL_OP operation, int intersectionRunsMax )
-{
-	_GC->SetState("Performing Boolean Operation");
-
-   if (count()==0)
-         return;
-
-	Graph* _prepared = new Graph(_GC);
-
-   if (empty())
-      return;
-   
-   //round to grid and put in one graph
-	_GC->SetState("Simplify");
-
-   int intersectionruns = 1;
-
-   while ( intersectionruns <= intersectionRunsMax )
-   {
-      try
-	   {
-         Prepare( _prepared );
-
-         if (_prepared->GetNumberOfLinks())
-         {
-            //calculate intersections etc.
-            _GC->SetState("prepare");
-            _prepared->Prepare( intersectionruns );
-            //_prepared->writegraph(true);
-            _prepared->Boolean(operation,this);
-         }
-         intersectionruns = intersectionRunsMax +1;
-      }
-	   catch (Bool_Engine_Error& error)
-	   {
-#if BOOL_DEBUG
-         _prepared->WriteGraphKEY(_GC);
-#endif
-         intersectionruns++;
-         if ( intersectionruns == intersectionRunsMax )
-         {
-            _prepared->WriteGraphKEY(_GC);
-            _GC->info(error.GetErrorMessage(), "error");
-		      throw error;
-         }
-      }
-      catch(...)
-      {
-
-#if BOOL_DEBUG
-         _prepared->WriteGraphKEY(_GC);
-#endif
-         intersectionruns++;
-         if ( intersectionruns == intersectionRunsMax )
-         {
-            _prepared->WriteGraphKEY(_GC);
-            _GC->info("Unknown exception", "error");
-		      throw;
-         }
-      }
-   }
-
-	delete _prepared;
-}
-
-
-void GraphList::WriteGraphs()
-{
-   TDLI<Graph> _LI=TDLI<Graph>(this);
-	_LI.tohead();
-	while(!_LI.hitroot())
-	{
-        _LI.item()->writegraph( false );
-        _LI++;
-	}
-}
-
-void GraphList::WriteGraphsKEY( Bool_Engine* GC )
-{
-   FILE* file = fopen("graphkeyfile.key", "w");
-
-   fprintf(file,"\
-      HEADER 5; \
-      BGNLIB; \
-      LASTMOD {2-11-15  15:39:21}; \
-      LASTACC {2-11-15  15:39:21}; \
-      LIBNAME trial; \
-      UNITS; \
-      USERUNITS 0.0001; PHYSUNITS 1e-009; \
-   \
-      BGNSTR;  \
-      CREATION {2-11-15  15:39:21}; \
-      LASTMOD  {2-11-15  15:39:21}; \
-      STRNAME top; \
-   ");
-
-   TDLI<Graph> _LI=TDLI<Graph>(this);
-	_LI.tohead();
-	while(!_LI.hitroot())
-	{
-        _LI.item()->WriteKEY( GC, file );
-        _LI++;
-	}
-
-   fprintf(file,"\
-      ENDSTR top; \
-      ENDLIB; \
-   ");
-
-   fclose (file);
-}
diff --git a/src/ossim/kbool/line.cpp b/src/ossim/kbool/line.cpp
deleted file mode 100644
index 1d98d46..0000000
--- a/src/ossim/kbool/line.cpp
+++ /dev/null
@@ -1,1476 +0,0 @@
-/*! \file kbool/src/line.cpp
-    \brief Mainly used for calculating crossings
-    \author Probably Klaas Holwerda 
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda 
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: line.cpp 9094 2006-06-13 19:12:40Z dburken $
-*/
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-// Standard include files
-#include <assert.h>
-#include <math.h>
-
-#include <ossim/kbool/booleng.h>
-
-// Include files for forward declarations
-#include <ossim/kbool/link.h>
-#include <ossim/kbool/node.h>
-
-// header
-#include <ossim/kbool/line.h>
-
-#include <ossim/kbool/graph.h>
-#include <ossim/kbool/graphlst.h>
-
-//
-// The default constructor
-//
-KBoolLine::KBoolLine(Bool_Engine* GC)
-{
-    m_GC=GC;
-	m_AA = 0.0;
-	m_BB = 0.0;
-	m_CC = 0.0;
-	m_link = 0;
-	linecrosslist = NULL;
-	m_valid_parameters = false;
-}
-
-KBoolLine::~KBoolLine()
-{
-	if (linecrosslist)
-		delete linecrosslist;
-}
-
-//
-// constructor with a link
-//
-KBoolLine::KBoolLine(KBoolLink *a_link,Bool_Engine* GC)
-{
-	m_GC=GC;
-	// a_link must exist
-	assert(a_link);
-	// points may not be equal
-	// must be an if statement because if an assert is used there will
-	// be a macro expansion error
-
-	//if (a_link->GetBeginNode()->Equal(a_link->GetEndNode(), 1))
-	//	assert(!a_link);
-
-	linecrosslist = NULL;
-	m_link = a_link;
-	m_valid_parameters = false;
-}
-
-
-
-// ActionOnTable1
-// This function decide which action must be taken, after PointInLine
-// has given the results of two points in relation to a line. See table 1 in the report
-//
-// input Result_beginnode:
-//			Result_endnode :
-//       The results can be LEFT_SIDE, RIGHT_SIDE, ON_AREA, IN_AREA
-//
-// return -1: Illegal combination
-//         0: No action, no crosspoints
-//         1: Investigate results points in relation to the other line
-//         2: endnode is a crosspoint, no further investigation
-//         3: beginnode is a crosspoint, no further investigation
-//			  4: beginnode and endnode are crosspoints, no further investigation
-//         5: beginnode is a crosspoint, need further investigation
-//         6: endnode is a crosspoint, need further investigation
-int KBoolLine::ActionOnTable1(PointStatus Result_beginnode, PointStatus Result_endnode)
-{
-	// Action 1.5 beginnode and endnode are crosspoints, no further investigation needed
-	if (
-		 (Result_beginnode == IN_AREA)
-		 &&
-		 (Result_endnode == IN_AREA)
-		)
-		return 4;
-   // Action 1.1, there are no crosspoints, no action
-	if (
-		 (
-		  (Result_beginnode == LEFT_SIDE)
-		  &&
-		  (Result_endnode == LEFT_SIDE)
-		 )
-		 ||
-		 (
-		  (Result_beginnode == RIGHT_SIDE)
-		  &&
-		  (Result_endnode == RIGHT_SIDE)
-		 )
-		)
-		return 0;
-	// Action 1.2, maybe there is a crosspoint, further investigation needed
-	if (
-		 (
-		  (Result_beginnode == LEFT_SIDE)
-		  &&
-		  (
-			(Result_endnode == RIGHT_SIDE)
-			||
-			(Result_endnode == ON_AREA)
-		  )
-		 )
-		 ||
-		 (
-		  (Result_beginnode == RIGHT_SIDE)
-		  &&
-		  (
-			(Result_endnode == LEFT_SIDE)
-			||
-			(Result_endnode == ON_AREA)
-		  )
-		 )
-		 ||
-		 (
-		  (Result_beginnode == ON_AREA)
-		  &&
-		  (
-			(Result_endnode == LEFT_SIDE)
-			||
-			(Result_endnode == RIGHT_SIDE)
-			||
-			(Result_endnode == ON_AREA)
-		  )
-		 )
-		)
-		return 1;
-	// Action 1.3, there is a crosspoint, no further investigation
-	if (
-		 (
-		  (Result_beginnode == LEFT_SIDE)
-		  ||
-		  (Result_beginnode == RIGHT_SIDE)
-		 )
-		 &&
-		 (Result_endnode == IN_AREA)
-		)
-		return 2;
-	// Action 1.4  there is a crosspoint, no further investigation
-	if (
-		 (Result_beginnode == IN_AREA)
-		 &&
-		 (
-		  (Result_endnode == LEFT_SIDE)
-		  ||
-		  (Result_endnode == RIGHT_SIDE)
-		 )
-		)
-		return 3;
-	// Action 1.6  beginnode is a crosspoint, further investigation needed
-	if (
-		 (Result_beginnode == IN_AREA)
-		 &&
-		 (Result_endnode == ON_AREA)
-		)
-		return 5;
-	// Action 1.7  endnode is a crosspoint, further investigation needed
-	if (
-		 (Result_beginnode == ON_AREA)
-		 &&
-		 (Result_endnode == IN_AREA)
-		)
-		return 6;
-	// All other combinations are illegal
-	return -1;
-}
-
-
-// ActionOnTable2
-// This function decide which action must be taken, after PointInLine
-// has given the results of two points in relation to a line. It can only give a
-// correct decision if first the relation of the points from the line
-// are investigated in relation to the line wich can be constucted from the points.
-//
-// input Result_beginnode:
-//			Result_endnode :
-//       The results can be LEFT_SIDE, RIGHT_SIDE, ON_AREA, IN_AREA
-//
-// return -1: Illegal combination
-//         0: No action, no crosspoints
-//         1: Calculate crosspoint
-//         2: endnode is a crosspoint
-//         3: beginnode is a crosspoint
-//         4: beginnode and endnode are crosspoints
-int KBoolLine::ActionOnTable2(PointStatus Result_beginnode, PointStatus Result_endnode)
-{
-	// Action 2.5, beginnode and eindpoint are crosspoints
-	if (
-		 (Result_beginnode == IN_AREA)
-		 &&
-		 (Result_endnode == IN_AREA)
-		)
-		return 4;
-	// Action 2.1, there are no crosspoints
-	if (
-		 (
-		  (Result_beginnode == LEFT_SIDE)
-		  &&
-		  (
-			(Result_endnode == LEFT_SIDE)
-			||
-			(Result_endnode == ON_AREA)
-		  )
-		 )
-		 ||
-		 (
-		  (Result_beginnode == RIGHT_SIDE)
-		  &&
-		  (
-			(Result_endnode == RIGHT_SIDE)
-			||
-			(Result_endnode == ON_AREA)
-		  )
-		 )
-		 ||
-		 (
-		  (Result_beginnode == ON_AREA)
-		  &&
-		  (
-			(Result_endnode == LEFT_SIDE)
-			||
-			(Result_endnode == RIGHT_SIDE)
-			||
-			(Result_endnode == ON_AREA)
-		  )
-		 )
-		)
-		return 0;
-	// Action 2.2, there is a real intersect
ion, which must be calculated
-	if (
-		 (
-		  (Result_beginnode == LEFT_SIDE)
-		  &&
-		  (Result_endnode == RIGHT_SIDE)
-		 )
-		 ||
-		 (
-		  (Result_beginnode == RIGHT_SIDE)
-		  &&
-		  (Result_endnode == LEFT_SIDE)
-		 )
-		)
-		return 1;
-	// Action 2.3, endnode is a crosspoint
-	if (
-		 (
-		  (Result_beginnode == LEFT_SIDE)
-		  ||
-		  (Result_beginnode == RIGHT_SIDE)
-		  ||
-		  (Result_beginnode == ON_AREA)
-		 )
-		 &&
-		 (Result_endnode == IN_AREA)
-		)
-		return 2;
-	// Action 2.4, beginnode is a crosspoint
-	if (
-		 (Result_beginnode == IN_AREA)
-		 &&
-		 (
-		  (Result_endnode == LEFT_SIDE)
-		  ||
-		  (Result_endnode == RIGHT_SIDE)
-		  ||
-		  (Result_endnode == ON_AREA)
-		 )
-		)
-		return 3;
-	// All other combinations are illegal
-	return -1;
-}
-
-//
-// This fucntion will ad a crossing to this line and the other line
-// the crossing will be put in the link, because the line will be destructed
-// after use of the variable
-//
-void KBoolLine::AddLineCrossing(B_INT X, B_INT Y, KBoolLine *other_line)
-{
-	// the other line must exist
-	assert(other_line);
-	// the links of the lines must exist
-	assert(other_line->m_link && m_link);
-	other_line->AddCrossing(AddCrossing(X,Y));
-}
-
-// Calculate the Y when the X is given
-//
-B_INT KBoolLine::Calculate_Y(B_INT X)
-{
-	// link must exist to get info about the nodes
-	assert(m_link);
-
-	CalculateLineParameters();
-	if (m_AA != 0)
-		return (B_INT)(-(m_AA * X + m_CC) / m_BB);
-	else
-		// horizontal line
-		return m_link->GetBeginNode()->GetY();
-}
-
-B_INT KBoolLine::Calculate_Y_from_X(B_INT X)
-{
-	// link must exist to get info about the nodes
-	assert(m_link);
-	assert(m_valid_parameters);
-
-	if (m_AA != 0)
-		return (B_INT) ((-(m_AA * X + m_CC) / m_BB)+0.5);
-	else
-		// horizontal line
-		return m_link->GetBeginNode()->GetY();
-}
-
-void KBoolLine::Virtual_Point(LPoint *a_point,double distance)
-{
-	// link must exist to get info about the nodes
-	assert(m_link);
-	assert(m_valid_parameters);
-
-	//calculate the distance using the slope of the line
-   //and rotate 90 degrees
-
-	a_point->SetY((B_INT)(a_point->GetY() + (distance * -(m_BB))));
-	a_point->SetX((B_INT)(a_point->GetX() - (distance * m_AA   )));
-}
-
-
-
-//
-// Calculate the lineparameters for the line if nessecary
-//
-void KBoolLine::CalculateLineParameters()
-{
-	// linkmust exist to get beginnode AND endnode
-	assert(m_link);
-
-	// if not valid_parameters calculate the parameters
-	if (!m_valid_parameters)
-	{
-		Node *bp, *ep;
-		double length;
-
-		// get the begin and endnode via the link
-		bp = m_link->GetBeginNode();
-		ep = m_link->GetEndNode();
-
-		// bp AND ep may not be the same
-		if (bp == ep)
-			assert (bp != ep);
-
-		m_AA = (double) (ep->GetY() - bp->GetY()); // A = (Y2-Y1)
-		m_BB = (double) (bp->GetX() - ep->GetX()); // B = (X1-X2)
-
-		// the parameters A end B can now be normalized
-		length = sqrt(m_AA*m_AA + m_BB*m_BB);
-
-		if(length ==0)
-			m_GC->error("length = 0","CalculateLineParameters");
-
-		m_AA = (m_AA / length);
-		m_BB = (m_BB / length);
-
-		m_CC = -((m_AA * bp->GetX()) + (bp->GetY() * m_BB));
-
-		m_valid_parameters = true;
-	}
-}
-
-
-// Checks if a line intersect with another line
-// inout    Line : another line
-//          Marge: optional, standard on MARGE (declared in MISC.CPP)
-//
-// return	true : lines are crossing
-// 			false: lines are not crossing
-//
-int KBoolLine::CheckIntersect (KBoolLine * lijn, double Marge)
-{
-	double distance=0;
-	// link must exist
-	assert(m_link);
-	// lijn must exist
-	assert(lijn);
-
-	// points may not be equal
-	// must be an if statement because if an assert is used there will
-	// be a macro expansion error
-	if (m_link->GetBeginNode() == m_link->GetEndNode())
-		assert(!m_link);
-
-	int Take_Action1, Take_Action2, Total_Result;
-	Node *bp, *ep;
-	PointStatus Result_beginnode,Result_endnode;
-
-	bp = lijn->m_link->GetBeginNode();
-	ep = lijn->m_link->GetEndNode();
-	Result_beginnode = PointInLine(bp,distance,Marge);
-	Result_endnode   = PointInLine(ep,distance,Marge);
-	Take_Action1 = ActionOnTable1(Result_beginnode,Result_endnode);
-	switch (Take_Action1)
-	{
-		case 0: Total_Result = false ; break;
-		case 1: {
-						bp = m_link->GetBeginNode();
-						ep = m_link->GetEndNode();
-						Result_beginnode = lijn->PointInLine(bp,distance,Marge);
-						Result_endnode   = lijn->PointInLine(ep,distance,Marge);
-						Take_Action2 = ActionOnTable2(Result_beginnode,Result_endnode);
-						switch (Take_Action2)
-						{
-							case 0: Total_Result = false; break;
-							case 1: case 2: case 3: case 4: Total_Result = true; break;
-              default: Total_Result = false; assert( Total_Result );
-						}
-				  }; break; // This break belongs to the switch(Take_Action1)
-		case 2: case 3: case 4: case 5: case 6: Total_Result = true; break;
-    default: Total_Result = false; assert( Total_Result );
-	}
-	return Total_Result; //This is the final decision
-}
-
-
-//
-// Get the beginnode from the line
-// usage: Node *anode = a_line.GetBeginNode()
-//
-Node *KBoolLine::GetBeginNode()
-{
-  // link must exist
-  assert(m_link);
-  return m_link->GetBeginNode();
-}
-
-
-//
-// Get the endnode from the line
-// usage: Node *anode = a_line.GetEndNode()
-//
-Node *KBoolLine::GetEndNode()
-{
-	// link must exist
-	assert(m_link);
-	return m_link->GetEndNode();
-}
-
-// Intersects two lines
-// input    Line : another line
-//          Marge: optional, standard on MARGE
-//
-// return	0: If there are no crossings
-//				1: If there is one crossing
-//				2: If there are two crossings
-int KBoolLine::Intersect(KBoolLine * lijn, double Marge)
-{
-	double distance=0;
-	// lijn must exist
-	assert(lijn);
-
-	// points may not be equal
-	// must be an if statement because if an assert is used there will
-	// be a macro expansion error
-	if (m_link->GetBeginNode() == m_link->GetEndNode())
-		assert(!m_link);
-
-	Node *bp, *ep;
-	PointStatus Result_beginnode,Result_endnode;
-	int Take_Action1, Take_Action2, Number_of_Crossings = 0;
-
-	// Get the nodes from lijn via the link
-	bp = lijn->m_link->GetBeginNode();
-	ep = lijn->m_link->GetEndNode();
-
-  	Result_beginnode = PointInLine(bp,distance,Marge);
-	Result_endnode   = PointInLine(ep,distance,Marge);
-
-	Take_Action1 = ActionOnTable1(Result_beginnode,Result_endnode);
-
-	// The first switch will insert a crosspoint immediatly
-	switch (Take_Action1)
-	{
-		// for the cases see the returnvalue of ActionTable1
-		case 2: case 6: AddCrossing(ep);
-							 Number_of_Crossings = 1;
-							 break;
-		case 3: case 5: AddCrossing(bp);
-							 Number_of_Crossings = 1;
-							 break;
-		case 4: 			 AddCrossing(bp);
-							 AddCrossing(ep);
-							 Number_of_Crossings = 2;
-							 break;
-	}
-	// This switch wil investigate the points of this line in relation to lijn
-	switch (Take_Action1)
-	{
-		// for the cases see the returnvalue of ActionTable1
-		case 1: case 5: case 6:
-		  {
-				// Get the nodes from this line via the link
-				bp = m_link->GetBeginNode();
-				ep = m_link->GetEndNode();
-            Result_beginnode = lijn->PointInLine(bp,distance,Marge);
-            Result_endnode   = lijn->PointInLine(ep,distance,Marge);
-				Take_Action2 = ActionOnTable2(Result_beginnode,Result_endnode);
-				switch (Take_Action2)
-				{
-					// for the cases see the returnvalue of ActionTable2
-					case 1: {   // begin of scope to calculate the intersection
-									double X, Y, Denominator;
-									CalculateLineParameters();
-									Denominator  = (m_AA * lijn->m_BB) - (lijn->m_AA * m_BB);
-									// Denominator may not be 0
-									assert(Denominator != 0.0);
-									// Calculate intersection of both linesegments
-									X = ((m_BB * lijn->m_CC) - (lijn->m_BB * m_CC)) / Denominator;
-									Y = ((lijn->m_AA * m_CC) - (m_AA * lijn->m_CC)) / Denominator;
-
-                           //make a decent rounding to B_INT
-                           AddLineCrossing((B_INT)X,(B_INT)Y,lijn);
-							  }   // end of scope to calculate the intersection
-							  Number_of_Crossings++;
-							  break;
-					case 2: lijn->AddCrossing(ep);
-							  Number_of_Crossings++;
-							  break;
-					case 3: lijn->AddCrossing(bp);
-							  Number_of_Crossings++;
-							  break;
-					case 4: lijn->AddCrossing(bp);
-							  lijn->AddCrossing(ep);
-							  Number_of_Crossings = 2;
-							  break;
-				}
-		  }; break; // This break belongs to the outer switch
-	}
-	return Number_of_Crossings; //This is de final number of crossings
-}
-
-
-// Intersects two lines there must be a crossing
-int KBoolLine::Intersect_simple(KBoolLine * lijn)
-{
-	// lijn must exist
-	assert(lijn);
-
-	double X, Y, Denominator;
-	Denominator  = (m_AA * lijn->m_BB) - (lijn->m_AA * m_BB);
-	// Denominator may not be 0
-	if (Denominator == 0.0)
-			m_GC->error("colliniar lines","line");
-	// Calculate intersection of both linesegments
-	X = ((m_BB * lijn->m_CC) - (lijn->m_BB * m_CC)) / Denominator;
-	Y = ((lijn->m_AA * m_CC) - (m_AA * lijn->m_CC)) / Denominator;
-	AddLineCrossing((B_INT)X,(B_INT)Y,lijn);
-
-	return(0);
-}
-
-// Intersects two lines there must be a crossing
-bool KBoolLine::Intersect2(Node* crossing,KBoolLine * lijn)
-{
-	// lijn must exist
-	assert(lijn);
-
-	double X, Y, Denominator;
-	Denominator  = (m_AA * lijn->m_BB) - (lijn->m_AA * m_BB);
-	// Denominator may not be 0
-	if (Denominator == 0.0)
-		return false;
-	// Calculate intersection of both linesegments
-	X = ((m_BB * lijn->m_CC) - (lijn->m_BB * m_CC)) / Denominator;
-	Y = ((lijn->m_AA * m_CC) - (m_AA * lijn->m_CC)) / Denominator;
-
-	crossing->SetX((B_INT)X);
-	crossing->SetY((B_INT)Y);
-	return true;
-}
-
-//
-// test if a point lies in the linesegment. If the point isn't on the line
-// the function returns a value that indicates on which side of the
-// line the point is (in linedirection from first point to second point
-//
-// returns LEFT_SIDE, when point lies on the left side of the line
-//         RIGHT_SIDE, when point lies on the right side of the line
-//         ON_AREA, when point lies on the infinite line within a range
-//			  IN_AREA, when point lies in the area of the linesegment
-// 		  the returnvalues are declared in (LINE.H)
-PointStatus KBoolLine::PointInLine(Node *a_node, double& Distance, double Marge)
-{
-	  Distance=0;
-
-	  //Punt must exist
-	  assert(a_node);
-	  // link must exist to get beginnode and endnode via link
-	  assert(m_link);
-
-	  // get the nodes form the line via the link
-	  Node *bp, *ep;
-	  bp = m_link->GetBeginNode();
-	  ep = m_link->GetEndNode();
-
-	  // both node must exist
-	  assert(bp && ep);
-	  // node may not be the same
-	  assert(bp != ep);
-
-     //quick test if point is begin or endpoint
-     if (a_node == bp || a_node == ep)
-        return IN_AREA;
-
-	  int Result_of_BBox=false;
-	  PointStatus Result_of_Online;
-
-	  // Checking if point is in bounding-box with marge
-     B_INT xmin=bmin(bp->GetX(),ep->GetX());
-     B_INT xmax=bmax(bp->GetX(),ep->GetX());
-     B_INT ymin=bmin(bp->GetY(),ep->GetY());
-     B_INT ymax=bmax(bp->GetY(),ep->GetY());
-
-     if (  a_node->GetX() >= (xmin - Marge) && a_node->GetX() <= (xmax + Marge) &&
-           a_node->GetY() >= (ymin - Marge) && a_node->GetY() <= (ymax + Marge) )
-		  Result_of_BBox=true;
-
-	  // Checking if point is on the infinite line
-	  Result_of_Online = PointOnLine(a_node, Distance, Marge);
-
-	  // point in boundingbox of the line and is on the line then the point is IN_AREA
-	  if ((Result_of_BBox) && (Result_of_Online == ON_AREA))
-			return IN_AREA;
-	  else
-			return Result_of_Online;
-}
-
-
-//
-// test if a point lies on the line. If the point isn't on the line
-// the function returns a value that indicates on which side of the
-// line the point is (in linedirection from first point to second point
-//
-// returns LEFT_SIDE, when point lies on the left side of the line
-//         ON_AREA, when point lies on the infinite line within a range
-//         RIGHT_SIDE, when point lies on the right side of the line
-// 		  LEFT_SIDE , RIGHT_SIDE , ON_AREA
-PointStatus KBoolLine::PointOnLine(Node *a_node, double& Distance, double Marge)
-{
-   Distance=0;
-
-	// a_node must exist
-	assert(a_node);
-	// link must exist to get beginnode and endnode
-	assert(m_link);
-
-	// get the nodes from the line via the link
-	Node *bp, *ep;
-	bp = m_link->GetBeginNode();
-	ep = m_link->GetEndNode();
-
-	// both node must exist
-	assert(bp && ep);
-	// node may not be queal
-	assert(bp!=ep);
-
-   //quick test if point is begin or endpoint
-   if (a_node == bp || a_node == ep)
-      return ON_AREA;
-
-	CalculateLineParameters();
-	// calculate the distance of a_node in relation to the line
-	Distance = (m_AA * a_node->GetX())+(m_BB * a_node->GetY()) + m_CC;
-
-	if (Distance < -Marge)
-		return LEFT_SIDE;
-	else
-	{
-		if (Distance > Marge)
-			return RIGHT_SIDE;
-		else
-		 return ON_AREA;
-	}
-}
-
-
-//
-// Sets lines parameters
-// usage: a_line.Set(a_pointer_to_a_link);
-//
-void KBoolLine::Set(KBoolLink *a_link)
-{
-	// points must exist
-	assert(a_link);
-	// points may not be equal
-	// must be an if statement because if an assert is used there will
-	// be a macro expansion error
-//	if (a_link->GetBeginNode()->Equal(a_link->GetEndNode(),MARGE)) assert(!a_link);
-
-	linecrosslist = NULL;
-	m_link = a_link;
-	m_valid_parameters = false;
-}
-
-KBoolLink* KBoolLine::GetLink()
-{
-   return m_link;
-}
-//
-// makes a line same as these
-// usage : line1 = line2;
-//
-KBoolLine& KBoolLine::operator=(const KBoolLine& a_line)
-{
-	m_AA = a_line.m_AA;
-	m_BB = a_line.m_BB;
-	m_CC = a_line.m_CC;
-	m_link = a_line.m_link;
-  	linecrosslist = NULL;
-	m_valid_parameters = a_line.m_valid_parameters;
-	return *this;
-}
-
-Node* KBoolLine::OffsetContour(KBoolLine* const nextline,Node* _last_ins, double factor,Graph *shape)
-{
-	KBoolLink* offs_currentlink;
-	KBoolLine  offs_currentline(m_GC);
-	KBoolLink* offs_nextlink;
-	KBoolLine  offs_nextline(m_GC);
-	Node* offs_end;
-
-	Node* offs_bgn_next;
-	Node* offs_end_next;
-
-	// make a node from this point
-	offs_end = new Node(GetEndNode(), m_GC);
-	Virtual_Point(offs_end,factor);
-	offs_currentlink=new KBoolLink(0, _last_ins,offs_end, m_GC);
-	offs_currentline.Set(offs_currentlink);
-
-	offs_bgn_next = new Node(nextline->m_link->GetBeginNode(), m_GC);
-	nextline->Virtual_Point(offs_bgn_next,factor);
-
-	offs_end_next = new Node(nextline->m_link->GetEndNode(), m_GC);
-	nextline->Virtual_Point(offs_end_next,factor);
-
-	offs_nextlink=new KBoolLink(0, offs_bgn_next, offs_end_next, m_GC);
-	offs_nextline.Set(offs_nextlink);
-
-	offs_currentline.CalculateLineParameters();
-	offs_nextline.CalculateLineParameters();
-	offs_currentline.Intersect2(offs_end,&offs_nextline);
-
-	// make a link between the current and the previous and add this to graph
-	shape->AddLink(offs_currentlink);
-
-	delete offs_nextlink;
-
-	return(offs_end);
-}
-
-
-Node* KBoolLine::OffsetContour_rounded(KBoolLine* const nextline,Node* _last_ins, double factor,Graph *shape)
-{
-	KBoolLink* offs_currentlink;
-	KBoolLine  offs_currentline(m_GC);
-	KBoolLink* offs_nextlink;
-	KBoolLine  offs_nextline(m_GC);
-	Node* offs_end;
-	Node* medial_axes_point= new Node(m_GC);
-	Node* bu_last_ins = new Node(_last_ins, m_GC);
-
-	Node* offs_bgn_next;
-	Node* offs_end_next;
-
-	// make a node from this point
-	offs_end = new Node(GetEndNode(), m_GC);
-
-	*_last_ins = *GetBeginNode();
-	Virtual_Point(_last_ins,factor);
-	Virtual_Point(offs_end,factor);
-	offs_currentlink=new KBoolLink(0, _last_ins,offs_end, m_GC);
-	offs_currentline.Set(offs_currentlink);
-
-	offs_bgn_next = new Node(nextline->m_link->GetBeginNode(), m_GC);
-	nextline->Virtual_Point(offs_bgn_next,factor);
-
-	offs_end_next = new Node(nextline->m_link->GetEndNode(), m_GC);
-	nextline->Virtual_Point(offs_end_next,factor);
-
-	offs_nextlink=new KBoolLink(0, offs_bgn_next, offs_end_next, m_GC);
-	offs_nextline.Set(offs_nextlink);
-
-	offs_currentline.CalculateLineParameters();
-	offs_nextline.CalculateLineParameters();
-	offs_currentline.Intersect2(medial_axes_point,&offs_nextline);
-
-	double result_offs=sqrt( pow((double)GetEndNode()->GetY()-medial_axes_point->GetY(),2) +
-							 pow((double)GetEndNode()->GetX()-medial_axes_point->GetX(),2) );
-
-	if ( result_offs < fabs(m_GC->GetRoundfactor()*factor))
-	{
-		*_last_ins=*bu_last_ins;
-		*offs_end=*medial_axes_point;
-		delete medial_axes_point;
-		delete bu_last_ins;
-		// make a link between the current and the previous and add this to graph
-		delete offs_nextlink;
-		shape->AddLink(offs_currentlink);
-		return(offs_end);
-	}
-	else
-	{ //let us create a circle
-		*_last_ins=*bu_last_ins;
-		delete medial_axes_point;
-		delete bu_last_ins;
-		Node* endarc= new Node(offs_bgn_next, m_GC);
-		shape->AddLink(offs_currentlink);
-		delete offs_nextlink;
-		shape->CreateArc(GetEndNode(), &offs_currentline, endarc,fabs(factor),m_GC->GetInternalCorrectionAber());
-		return(endarc);
-	}
-}
-
-
-bool KBoolLine::OkeForContour(KBoolLine* const nextline,double factor,Node* LastLeft,Node* LastRight, LinkStatus& _outproduct)
-{
-	assert(m_link);
-	assert(m_valid_parameters);
-	assert(nextline->m_link);
-	assert(nextline->m_valid_parameters);
-
-	factor = fabs(factor);
-
-//	PointStatus status=ON_AREA;
-	double distance=0;
-
-	Node offs_end_next(nextline->m_link->GetEndNode(), m_GC);
-
-	_outproduct= m_link->OutProduct(nextline->m_link,m_GC->GetAccur());
-
-	switch (_outproduct)
-	{
-		// current line lies on  leftside of prev line
-		case IS_RIGHT :
-		{
-			nextline->Virtual_Point(&offs_end_next,-factor);
-
-			// status=
-			nextline->PointOnLine(LastRight, distance, m_GC->GetAccur());
-			if (distance > factor)
-			{  PointOnLine(&offs_end_next, distance, m_GC->GetAccur());
-				if (distance > factor)
-					 return(true);
-			}
-		}
-		break;
-		// current line lies on  rightside of prev line
-		case IS_LEFT :
-		{
-			nextline->Virtual_Point(&offs_end_next,factor);
-
-			// status=
-			nextline->PointOnLine(LastLeft, distance, m_GC->GetAccur());
-			if (distance < -factor)
-			{  PointOnLine(&offs_end_next, distance, m_GC->GetAccur());
-				if (distance <-factor)
-					 return(true);
-			}
-		}
-		break;
-		// current line  lies on prev line
-		case IS_ON	 :
-		{
-			return(true);
-		}
-	}//end switch
-
-	return(false);
-}
-
-
-bool KBoolLine::Create_Ring_Shape(KBoolLine* nextline,Node** _last_ins_left,Node** _last_ins_right,double factor,Graph *shape)
-{
-	Node* _current;
-	LinkStatus _outproduct=IS_ON;
-
-	if (OkeForContour(nextline,factor,*_last_ins_left,*_last_ins_right,_outproduct))
-	{
-		switch (_outproduct)
-		{
-			// Line 2 lies on  leftside of this line
-			case IS_RIGHT :
-			{
-				*_last_ins_left  =OffsetContour_rounded(nextline,*_last_ins_left,factor,shape);
-				*_last_ins_right =OffsetContour(nextline,*_last_ins_right,-factor,shape);
-			}
-			break;
-			case IS_LEFT :
-			{
-				*_last_ins_left  =OffsetContour(nextline,*_last_ins_left,factor,shape);
-				*_last_ins_right =OffsetContour_rounded(nextline,*_last_ins_right,-factor,shape);
-
-			}
-			break;
-			// Line 2 lies on this line
-			case IS_ON	 :
-			{
-				// make a node from this point
-				_current = new Node(m_link->GetEndNode(), m_GC);
-				Virtual_Point(_current,factor);
-
-				// make a link between the current and the previous and add this to graph
-				shape->AddLink(*_last_ins_left, _current);
-				*_last_ins_left=_current;
-
-				_current = new Node(m_link->GetEndNode(), m_GC);
-				Virtual_Point(_current,-factor);
-
-				shape->AddLink(*_last_ins_right, _current);
-				*_last_ins_right=_current;
-			}
-			break;
-		}//end switch
-		return(true);
-	}
-/*	else
-	{
-		switch (_outproduct)
-		{
-			// Line 2 lies on  leftside of this line
-			case IS_RIGHT :
-			{
-				*_last_ins_left  =OffsetContour_rounded(nextline,*_last_ins_left,factor,Ishape);
-				*_last_ins_right =OffsetContour(nextline,*_last_ins_right,-factor,Ishape);
-			}
-			break;
-			case IS_LEFT :
-			{
-				*_last_ins_left  =OffsetContour(nextline,*_last_ins_left,factor,Ishape);
-				*_last_ins_right =OffsetContour_rounded(nextline,*_last_ins_right,-factor,Ishape);
-
-			}
-			break;
-			// Line 2 lies on this line
-			case IS_ON	 :
-			{
-				// make a node from this point
-				_current = new Node(m_link->GetEndNode());
-				Virtual_Point(_current,factor);
-
-				// make a link between the current and the previous and add this to graph
-				Ishape->AddLink(*_last_ins_left, _current);
-				*_last_ins_left=_current;
-
-				_current = new Node(m_link->GetEndNode());
-				Virtual_Point(_current,-factor);
-
-				Ishape->AddLink(*_last_ins_right, _current);
-				*_last_ins_right=_current;
-			}
-			break;
-		}//end switch
-		return(true);
-	}
-*/
-	return(false);
-}
-
-
-void KBoolLine::Create_Begin_Shape(KBoolLine* nextline,Node** _last_ins_left,Node** _last_ins_right,double factor,Graph *shape)
-{
-	factor = fabs(factor);
-	LinkStatus _outproduct;
-	_outproduct= m_link->OutProduct(nextline->m_link,m_GC->GetAccur());
-
-	switch (_outproduct)
-	{
-		case IS_RIGHT :
-		{
-			*_last_ins_left = new Node(m_link->GetEndNode(), m_GC);
-
-			Virtual_Point(*_last_ins_left,factor);
-
-			*_last_ins_right = new Node(nextline->m_link->GetBeginNode(), m_GC);
-			nextline->Virtual_Point(*_last_ins_right,-factor);
-
-			shape->AddLink(*_last_ins_left, *_last_ins_right);
-
-			*_last_ins_left=OffsetContour_rounded(nextline,*_last_ins_left,factor,shape);
-		}
-		break;
-		case IS_LEFT :
-		{
-			*_last_ins_left = new Node(nextline->m_link->GetBeginNode(), m_GC);
-			nextline->Virtual_Point(*_last_ins_left,factor);
-
-			*_last_ins_right = new Node(m_link->GetEndNode(), m_GC);
-			Virtual_Point(*_last_ins_right,-factor);
-
-			shape->AddLink(*_last_ins_left, *_last_ins_right);
-
-			*_last_ins_right=OffsetContour_rounded(nextline,*_last_ins_right,-factor,shape);
-		}
-		break;
-		// Line 2 lies on this line
-		case IS_ON	 :
-		{
-			*_last_ins_left = new Node(nextline->m_link->GetBeginNode(), m_GC);
-			Virtual_Point(*_last_ins_left,factor);
-
-			*_last_ins_right = new Node(nextline->m_link->GetBeginNode(), m_GC);
-			Virtual_Point(*_last_ins_right,-factor);
-
-			shape->AddLink(*_last_ins_left, *_last_ins_right);
-		}
-		break;
-	}//end switch
-
-}
-
-void KBoolLine::Create_End_Shape(KBoolLine* nextline,Node* _last_ins_left,Node* _last_ins_right,double factor,Graph *shape)
-{
-	Node* _current;
-	factor = fabs(factor);
-	LinkStatus _outproduct;
-	_outproduct= m_link->OutProduct(nextline->m_link,m_GC->GetAccur());
-
-	switch (_outproduct)
-	{
-		case IS_RIGHT :
-		{
-			_current = new Node(m_link->GetEndNode(), m_GC);
-			Virtual_Point(_current,-factor);
-			shape->AddLink(_last_ins_right, _current);
-			_last_ins_right=_current;
-
-			_last_ins_left=OffsetContour_rounded(nextline,_last_ins_left,factor,shape);
-			shape->AddLink(_last_ins_left,_last_ins_right);
-		}
-		break;
-		case IS_LEFT :
-		{
-			_current = new Node(m_link->GetEndNode(), m_GC);
-			Virtual_Point(_current,factor);
-			shape->AddLink(_last_ins_left, _current);
-			_last_ins_left=_current;
-
-			_last_ins_right=OffsetContour_rounded(nextline,_last_ins_right,-factor,shape);
-			shape->AddLink(_last_ins_right, _last_ins_left);
-		}
-		break;
-		// Line 2 lies on this line
-		case IS_ON	 :
-		{
-			_current = new Node(m_link->GetEndNode(), m_GC);
-			Virtual_Point(_current,factor);
-			shape->AddLink(_last_ins_left, _current);
-			_last_ins_left=_current;
-
-			_current = new Node(m_link->GetEndNode(), m_GC);
-			Virtual_Point(_current,-factor);
-			shape->AddLink(_last_ins_right, _current);
-			_last_ins_right=_current;
-
-			shape->AddLink(_last_ins_left, _last_ins_right);
-		}
-		break;
-	}//end switch
-
-}
-
-//
-// Generate from the found crossings a part of the graph
-//
-bool KBoolLine::ProcessCrossings(TDLI<KBoolLink>* _LI)
-{
-	Node *last;	KBoolLink *dummy;
-//	assert (beginnode && endnode);
-
-	if (!linecrosslist)	return false;
-
-	if (linecrosslist->empty())	return false;
-	if (linecrosslist->count()>1)	SortLineCrossings();
-	m_link->GetEndNode()->RemoveLink(m_link);
-	last=m_link->GetEndNode();
-	// Make new links :
-	while (!linecrosslist->empty())
-	{
-		dummy=new KBoolLink(m_link->GetGraphNum(),(Node*) linecrosslist->tailitem(),last, m_GC);
-      dummy->SetBeenHere();
-		dummy->SetGroup(m_link->Group());
-      _LI->insbegin(dummy);
-		last=(Node*)linecrosslist->tailitem();
-		linecrosslist->removetail();
-	}
-	// Recycle this link :
-	last->AddLink(m_link);
-	m_link->SetEndNode(last);
-	delete linecrosslist;
-	linecrosslist=NULL;
-	return true;
-}
-
-/*
-// Sorts the links on the X values
-int NodeXYsorter(Node* a, Node* b)
-{
-	if ( a->GetX() < b->GetX())
-		return(1);
-	if ( a->GetX() > b->GetX())
-		return(-1);
-   //they are eqaul in x
-	if ( a->GetY() < b->GetY())
-		return(-1);
-	if ( a->GetY() > b->GetY())
-		return(1);
-   //they are eqaul in y
-	return(0);
-}
-
-//
-// Generate from the found crossings a part of the graph
-// this routine is used in combination with the scanbeam class
-// the this link most stay at the same place in the sorted graph
-// The link is split into peaces wich are inserted sorted into the graph
-// on beginnode.
-// The mostleft link most become the new link for the beam record
-// therefore the mostleft new/old link is returned to become the beam record link
-// also the part returned needs to have the bin flag set to the original value it had in the beam
-KBoolLink* KBoolLine::ProcessCrossingsSmart(TDLI<KBoolLink>* _LI)
-{
-   Node *lastinserted;
-   KBoolLink *new_link;
-   KBoolLink *returnlink;
-	assert (beginnode && endnode);
-	if (!linecrosslist)	return this;
-
-	if (linecrosslist->empty())	return this;
-	if (linecrosslist->count()>1)
-   {
-   	SortLineCrossings();
-   }
-	int inbeam;
-
-   //most left at the beginnode or endnode
-   if (NodeXYsorter(beginnode,endnode)==1)
-   {
-      //re_use this link
-      endnode->RemoveLink(this);
-      linecrosslist->insend(endnode); //the last link to create is towards this node
-      endnode=(Node*) linecrosslist->headitem();
-      endnode->AddLink(this);
-      inbeam=NodeXYsorter(_LI->item()->beginnode,beginnode);
-      switch (inbeam)
-      {
-        case -1:
-        case 0:
-            bin=true;
-            break;
-        case 1:
-            bin=false;
-            break;
-      }
-      returnlink=this;
-
-      lastinserted=endnode;
-      linecrosslist->removehead();
-      // Make new links starting at endnode
-      while (!linecrosslist->empty())
-      {
-         new_link=new KBoolLink(graphnum,lastinserted,(Node*) linecrosslist->headitem());
-
-         new_link->group=group;
-         int inbeam=NodeXYsorter(_LI->item()->beginnode,lastinserted);
-         switch (inbeam)
-         {
-           case -1:
-               {
-                 double x,y,xl,yl;
-                 char buf[80];
-                 x=((Node*)(linecrosslist->headitem()))->GetX();
-                 y=((Node*)(linecrosslist->headitem()))->GetY();
-					  xl=_LI->item()->beginnode->GetX();
-                 yl=_LI->item()->beginnode->GetY();
-                 sprintf(buf," x=%f , y=%f inserted before %f,%f",x,y,xl,yl);
-                 _messagehandler->info(buf,"scanbeam");
-		           new_link->bin=true;
-               }
-               break;
-           case 0:
-	            new_link->bin=true;
-	            returnlink=new_link;
-               break;
-           case 1:
-	            new_link->bin=false;
-               break;
-         }
-
-         //insert a link into the graph that is already sorted on beginnodes of the links.
-         //starting at a given position
-         // if empty then just insert
-
-         if (_LI->empty())
-            _LI->insend(new_link);
-         else
-         {
-            // put new item left of the one that is bigger are equal
-            int i=0;
-            int insert=0;
-            while(!_LI->hitroot())
-            {
-               if ((insert=linkXYsorter(new_link,_LI->item()))!=-1)
-                  break;
-               (*_LI)++;
-               i++;
-            }
-
-            _LI->insbefore_unsave(new_link);
-            if (insert==0 && _LI->item()->beginnode!=new_link->beginnode)
-             //the begin nodes are equal but not the same merge them into one node
-            {  Node* todelete=_LI->item()->beginnode;
-					new_link->beginnode->Merge(todelete);
-					delete todelete;
-            }
-
-            //set back iter
-            (*_LI) << (i+1);
-         }
-
-         lastinserted=(Node*)linecrosslist->headitem();
-         linecrosslist->removehead();
-      }
-   }
-   else
-   {
-      //re_use this link
-      endnode->RemoveLink(this);
-      linecrosslist->insend(endnode); //the last link to create is towards this node
-      endnode=(Node*) linecrosslist->headitem();
-      endnode->AddLink(this);
-      inbeam=NodeXYsorter(_LI->item()->beginnode,endnode);
-      switch (inbeam)
-      {
-        case -1:
-        case 0:
-            bin=true;
-            break;
-        case 1:
-            bin=false;
-            break;
-      }
-      returnlink=this;
-
-      lastinserted=endnode;
-      linecrosslist->removehead();
-
-      // Make new links starting at endnode
-      while (!linecrosslist->empty())
-      {
-         new_link=new KBoolLink(graphnum,lastinserted,(Node*) linecrosslist->headitem());
-         new_link->group=group;
-
-         inbeam=NodeXYsorter(_LI->item()->beginnode,(Node*) linecrosslist->headitem());
-         switch (inbeam)
-         {
-           case -1:
-           case 0:
-	            new_link->bin=true;
-               break;
-           case 1:
-	            new_link->bin=false;
-               break;
-         }
-         inbeam=NodeXYsorter(_LI->item()->beginnode,lastinserted);
-         switch (inbeam)
-         {
-           case -1:
-               {
-                 double x,y,xl,yl;
-                 char buf[80];
-                 x=lastinserted->GetX();
-                 y=lastinserted->GetY();
-					  xl=_LI->item()->beginnode->GetX();
-                 yl=_LI->item()->beginnode->GetY();
-                 sprintf(buf," x=%f , y=%f inserted before %f,%f",x,y,xl,yl);
-                 _messagehandler->info(buf,"scanbeam");
-               }
-               break;
-           case 0:
-               break;
-           case 1:
-	            returnlink=new_link;
-               break;
-         }
-
-         //insert a link into the graph that is already sorted on beginnodes of the links.
-         //starting at a given position
-         // if empty then just insert
-
-         if (_LI->empty())
-            _LI->insend(new_link);
-         else
-         {
-            // put new item left of the one that is bigger are equal
-            int i=0;
-            int insert=0;
-            while(!_LI->hitroot())
-            {
-               if ((insert=linkXYsorter(new_link,_LI->item()))!=-1)
-                  break;
-               (*_LI)++;
-               i++;
-            }
-
-            _LI->insbefore_unsave(new_link);
-            if (insert==0 && _LI->item()->beginnode!=new_link->beginnode)
-             //the begin nodes are equal but not the same merge them into one node
-            {  Node* todelete=_LI->item()->beginnode;
-					new_link->beginnode->Merge(todelete);
-					delete todelete;
-            }
-            //set back iter
-            (*_LI) << (i+1);
-         }
-
-         lastinserted=(Node*)linecrosslist->headitem();
-         linecrosslist->removehead();
-      }
-   }
-	delete linecrosslist;
-	linecrosslist=NULL;
-
-  	return returnlink;
-}
-*/
-
-static int NODE_X_ASCENDING_L (Node* a, Node* b)
-{
-	if(b->GetX() > a->GetX()) return(1);
-	else
-	if(b->GetX() == a->GetX()) return(0);
-
-	return(-1);
-}
-
-static int NODE_X_DESCENDING_L(Node* a, Node* b)
-{
-	if(a->GetX() > b->GetX()) return(1);
-	else
-	if(a->GetX() == b->GetX()) return(0);
-
-	return(-1);
-}
-
-static int NODE_Y_ASCENDING_L (Node* a, Node* b)
-{
-	if(b->GetY() > a->GetY()) return(1);
-	else
-	if(b->GetY() == a->GetY()) return(0);
-	return(-1);
-}
-
-static int NODE_Y_DESCENDING_L(Node* a, Node* b)
-{
-	if(a->GetY() > b->GetY()) return(1);
-	else
-	if(a->GetY() == b->GetY()) return(0);
-
-	return(-1);
-}
-
-//
-// This function finds out which sortfunction to use with sorting
-// the crossings.
-//
-void KBoolLine::SortLineCrossings()
-{
-	TDLI<Node> I(linecrosslist);
-
-	B_INT dx, dy;
-	dx=babs(m_link->GetEndNode()->GetX() - m_link->GetBeginNode()->GetX());
-	dy=babs(m_link->GetEndNode()->GetY() - m_link->GetBeginNode()->GetY());
-	if (dx > dy)
-	{	// thislink is more horizontal then vertical
-		if (m_link->GetEndNode()->GetX() > m_link->GetBeginNode()->GetX())
-			I.mergesort(NODE_X_ASCENDING_L);
-		else
-			I.mergesort(NODE_X_DESCENDING_L);
-	}
-	else
-	{	// this link is more vertical then horizontal
-		if (m_link->GetEndNode()->GetY() > m_link->GetBeginNode()->GetY())
-			I.mergesort(NODE_Y_ASCENDING_L);
-		else
-			I.mergesort(NODE_Y_DESCENDING_L);
-	}
-}
-
-//
-// Adds a cross Node to this. a_node may not be deleted before processing the crossings
-//
-void KBoolLine::AddCrossing(Node *a_node)
-{
-	if (a_node==m_link->GetBeginNode() || a_node==m_link->GetEndNode())	return;
-
-
-	if (!linecrosslist)
-	{
-		linecrosslist=new DL_List<void*>();
-		linecrosslist->insend(a_node);
-	}
-	else
-	{
-		TDLI<Node> I(linecrosslist);
-		if (!I.has(a_node))
-			I.insend(a_node);
-	}
-}
-
-//
-// see above
-//
-Node* KBoolLine::AddCrossing(B_INT X, B_INT Y)
-{
-	Node* result=new Node(X,Y, m_GC);
-	AddCrossing(result);
-	return result;
-}
-
-DL_List<void*>* KBoolLine::GetCrossList()
-{
-	if (linecrosslist)
-		return linecrosslist;
-	return NULL;
-}
-
-bool KBoolLine::CrossListEmpty()
-{
-	if (linecrosslist)
-		return linecrosslist->empty();
-	return true;
-}
-
-/*
-bool KBoolLine::HasInCrossList(Node *n)
-{
-	if(linecrosslist!=NULL)
-	{
-		TDLI<Node> I(linecrosslist);
-		return I.has(n);
-	}
-	return false;
-}
-*/
-
diff --git a/src/ossim/kbool/link.cpp b/src/ossim/kbool/link.cpp
deleted file mode 100644
index 36b933a..0000000
--- a/src/ossim/kbool/link.cpp
+++ /dev/null
@@ -1,724 +0,0 @@
-/*! \file kbool/src/link.cpp
-    \author Probably Klaas Holwerda
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: link.cpp 11347 2007-07-23 13:01:59Z gpotts $
-*/
-
-#ifdef __GNUG__
-#pragma implementation 
-#endif
-
-#include <ossim/kbool/booleng.h>
-
-#include <ossim/kbool/link.h>
-#include <ossim/kbool/line.h>
-#include <math.h>
-#include <assert.h>
-
-#include <ossim/kbool/node.h>
-#include <ossim/kbool/graph.h>
-#include <ossim/kbool/graphlst.h>
-
-int linkXYsorter(KBoolLink *, KBoolLink *);
-
-//
-// Default constructor
-//
-KBoolLink::KBoolLink(Bool_Engine* GC)
-{
-   _GC=GC;
-	Reset();
-}
-
-
-//
-// This constructor makes this link a valid part of a graph
-//
-KBoolLink::KBoolLink(int graphnr, Node *begin, Node *end, Bool_Engine* GC)
-{
-   _GC=GC;
-	Reset();
-
-	// Set the references of the node and of this link correct
-	begin->AddLink(this);
-	end->AddLink(this);
-	m_beginnode = begin;
-	m_endnode = end;
-	m_graphnum = graphnr;
-}
-
-//
-// This constructor makes this link a valid part of a graph
-//
-KBoolLink::KBoolLink(Node *begin, Node *end, Bool_Engine* GC)
-{
-	_GC=GC;
-	Reset();
-
-	// Set the references of the node and of this link correct
-	begin->AddLink(this);
-	end->AddLink(this);
-	m_beginnode=begin;
-	m_endnode=end;
-	m_graphnum=0;
-}
-
-
-//
-// Destructor
-//
-KBoolLink::~KBoolLink()
-{
-	UnLink();
-}
-
-//
-//	Checks whether the current algorithm has been on this link
-//
-bool KBoolLink::BeenHere()
-{
-   if (m_bin) return true;
-	return false;
-}
-
-void KBoolLink::TakeOverOperationFlags( KBoolLink* link )
-{
-   m_merge_L = link->m_merge_L;
-   m_a_substract_b_L = link->m_a_substract_b_L;
-   m_b_substract_a_L = link->m_b_substract_a_L;
-   m_intersect_L = link->m_intersect_L;
-   m_exor_L = link->m_exor_L;
-
-   m_merge_R = link->m_merge_R;
-   m_a_substract_b_R = link->m_a_substract_b_R;
-   m_b_substract_a_R = link->m_b_substract_a_R;
-   m_intersect_R = link->m_intersect_R;
-   m_exor_R = link->m_exor_R;
-}
-//
-//	Returns the next link from the argument
-//
-KBoolLink*	KBoolLink::Forth(Node *node)
-{
-	assert(node==m_beginnode || node==m_endnode);
-	return node->GetOtherLink(this);
-}
-
-//
-// Returns the Beginnode
-//
-Node *KBoolLink::GetBeginNode()
-{
-	return m_beginnode;
-}
-
-//
-// Returns the endnode
-//
-Node*	KBoolLink::GetEndNode()
-{
-	return m_endnode;
-}
-
-Node*	KBoolLink::GetLowNode()
-{
-	return ( ( m_beginnode->GetY() < m_endnode->GetY() ) ? m_beginnode : m_endnode );
-}
-
-Node*	KBoolLink::GetHighNode()
-{
-	return ( ( m_beginnode->GetY() > m_endnode->GetY() ) ? m_beginnode : m_endnode );
-}
-
-//
-// Returns the graphnumber
-//
-int KBoolLink::GetGraphNum()
-{
-	return m_graphnum;
-}
-
-bool KBoolLink::GetInc()
-{
-   return m_Inc;
-//   if (Inc) return true;
-//	return false;
-}
-
-void KBoolLink::SetInc(bool inc)
-{
-     m_Inc = inc;
-//   Inc=0;
-//   if (inc) Inc=1;
-}
-
-bool KBoolLink::GetLeftA()
-{
-	return m_LeftA;
-}
-
-void KBoolLink::SetLeftA(bool la)
-{
-	m_LeftA = la;
-}
-
-bool KBoolLink::GetLeftB()
-{
-	return m_LeftB;
-}
-
-void KBoolLink::SetLeftB(bool lb)
-{
-	m_LeftB = lb;
-}
-
-bool KBoolLink::GetRightA()
-{
-	return m_RightA;
-}
-
-void KBoolLink::SetRightA(bool ra)
-{
-	m_RightA = ra;
-}
-
-bool KBoolLink::GetRightB()
-{
-	return m_RightB;
-}
-
-void KBoolLink::SetRightB(bool rb)
-{
-	m_RightB = rb;
-}
-
-//
-//	This function is very popular by GP-faults
-// It returns the node different from a
-//
-Node* KBoolLink::GetOther(const Node *const a)
-{
-	return ( (a != m_beginnode) ? m_beginnode : m_endnode);
-}
-
-
-//
-//	Is this marked for given operation
-//
-bool KBoolLink::IsMarked(BOOL_OP operation)
-{
-   switch (operation)
-   {
-      case(BOOL_OR): 	   return m_merge_L || m_merge_R;
-      case(BOOL_AND):     return m_intersect_L || m_intersect_R;
-      case(BOOL_A_SUB_B): return m_a_substract_b_L || m_a_substract_b_R;
-      case(BOOL_B_SUB_A): return m_b_substract_a_L || m_b_substract_a_R;
-      case(BOOL_EXOR):    return m_exor_L || m_exor_R;
-      default:             return false;
-   }
-}
-
-bool KBoolLink::IsMarkedLeft(BOOL_OP operation)
-{
-   switch (operation)
-   {
-      case(BOOL_OR):      return m_merge_L;
-      case(BOOL_AND):     return m_intersect_L;
-      case(BOOL_A_SUB_B): return m_a_substract_b_L;
-      case(BOOL_B_SUB_A): return m_b_substract_a_L;
-      case(BOOL_EXOR):    return m_exor_L;
-      default:             return false;
-   }
-}
-
-bool KBoolLink::IsMarkedRight(BOOL_OP operation)
-{
-   switch (operation)
-   {
-      case(BOOL_OR):      return m_merge_R;
-      case(BOOL_AND):     return m_intersect_R;
-      case(BOOL_A_SUB_B): return m_a_substract_b_R;
-      case(BOOL_B_SUB_A): return m_b_substract_a_R;
-      case(BOOL_EXOR):    return m_exor_R;
-      default:             return false;
-   }
-}
-
-//
-//	Is this a hole for given operation
-// beginnode must be to the left
-bool KBoolLink::IsHole(BOOL_OP operation)
-{
-
-   bool topsideA,topsideB;
-   
-   if (m_beginnode->GetX() < m_endnode->GetX()) //going to the right?
-   { 	topsideA = m_RightA; topsideB = m_RightB;  }
-   else
-   {  topsideA = m_LeftA; topsideB = m_LeftB; }
-   
-   switch (operation)
-   {
-      case(BOOL_OR):      return ( !topsideB && !topsideA );
-      case(BOOL_AND):     return ( !topsideB || !topsideA );
-      case(BOOL_A_SUB_B): return ( topsideB || !topsideA );
-      case(BOOL_B_SUB_A): return ( topsideA || !topsideB );
-      case(BOOL_EXOR):    return !( (topsideB && !topsideA) || (!topsideB && topsideA) );
-      default:             return false;
-   }
-}
-
-//
-// Is this a part of a hole
-//
-bool KBoolLink::GetHole()
-{
-	return (m_hole);
-}
-
-
-void KBoolLink::SetHole(bool h)
-{
-	m_hole = h;
-}
-
-
-//
-//	Is this not marked at all
-//
-bool KBoolLink::IsUnused()
-{
-	return 
-            !(m_merge_L || m_merge_R ||
-              m_a_substract_b_L || m_a_substract_b_R ||
-              m_b_substract_a_L || m_b_substract_a_R ||
-              m_intersect_L || m_intersect_R ||
-              m_exor_L || m_exor_R );
-}
-
-
-bool KBoolLink::IsZero(B_INT marge)
-{
-	return (m_beginnode->Equal(m_endnode,marge)) ;
-}
-
-
-bool KBoolLink::ShorterThan(B_INT marge)
-{
-	return (m_beginnode->ShorterThan(m_endnode,marge)) ;
-}
-
-
-//
-//	Mark this link
-//
-void KBoolLink::Mark()
-{
-	m_mark = true;
-}
-
-
-//
-// This makes from the begin and endnode one node (argument begin_or_end_node)
-// The references to this link in the node will also be deleted
-// After doing that, link link can be deleted or be recycled.
-//
-void KBoolLink::MergeNodes(Node *const begin_or_end_node)
-{
-//	assert(beginnode && endnode);
-//	assert ((begin_or_end_node == beginnode)||(begin_or_end_node == endnode));
-
-	m_beginnode->RemoveLink(this);
-	m_endnode->RemoveLink(this);
-
-	if (m_endnode != m_beginnode)
-	{	// only if beginnode and endnode are different nodes
-		begin_or_end_node->Merge(GetOther(begin_or_end_node));
-	}
-	m_endnode = NULL;
-	m_beginnode=NULL;
-}
-
-//
-//	Return the position of the second link compared to this link
-// Result = IS_ON | IS_LEFT | IS_RIGHT
-// Here Left and Right is defined as being left or right from
-// the this link towards the center (common) node
-//
-LinkStatus KBoolLink::OutProduct(KBoolLink* const two,double accur)
-{
-	Node*	center;
-	double distance;
-	if (two->GetBeginNode()->Equal(two->GetEndNode(), 1))
-		assert(!two);
-	if (GetBeginNode()->Equal(GetEndNode(), 1))
-		assert(!this);
-	KBoolLine* temp_line = new KBoolLine(this, _GC);
-
-	//the this link should connect to the other two link at at least one node
-	if (m_endnode == two->m_endnode || m_endnode == two->m_beginnode)
-		center = m_endnode;
-	else
-	{	center = m_beginnode;
-//		assert(center==two->endnode || center==two->beginnode);
-	}
-
-	//here something tricky
-	// the factor 10000.0 is needed to asure that the pointonline
-	// is more accurate in this case compared to the intersection for graphs
-	int uitp = temp_line->PointOnLine(two->GetOther(center), distance, accur);
-
-	delete temp_line;
-
-	/*double uitp=	(_x - first._x) * (third._y - _y) -
-					(_y - first._y) * (third._x - _x);
-	if (uitp>0) return IS_LEFT;
-	if (uitp<0) return IS_RIGHT;
-	return IS_ON;*/
-
-	//depending on direction of this link (going to or coming from centre)
-	if (center == m_endnode)
-	{
-	  if (uitp==LEFT_SIDE)
-			return IS_LEFT;
-	  if (uitp==RIGHT_SIDE)
-			return IS_RIGHT;
-	}
-	else  //center=beginnode
-	{
-	  if (uitp==LEFT_SIDE)
-			return IS_RIGHT;
-	  if (uitp==RIGHT_SIDE)
-			return IS_LEFT;
-	}
-	return IS_ON;
-}
-
-//
-//	Return the position of the third link compared to this link and
-// the second link
-// Result = IS_ON | IS_LEFT | IS_RIGHT
-//
-LinkStatus KBoolLink::PointOnCorner(KBoolLink* const two, KBoolLink* const third)
-{
-	LinkStatus
-	TwoToOne,		// Position of two to this line
-	ThirdToOne,    // Position of third to this line
-	ThirdToTwo,		// Position of third to two
-	Result;
-
-//m		Node*	center;
-
-//the this link should connect to the other two link at at least one node
-//m		if (endnode==two->endnode || endnode==two->beginnode)
-//m			center=endnode;
-//m		else
-//m		{	center=beginnode;
-//		assert(center==two->endnode || center==two->beginnode);
-//m	}
-//	assert(center==third->endnode || center==third->beginnode);
-
-
-
-	// Calculate the position of the links compared to eachother
-	TwoToOne	 = OutProduct(two,_GC->GetAccur());
-	ThirdToOne= OutProduct(third,_GC->GetAccur());
-	//center is used in outproduct to give de direction of two
-	// this is why the result should be swapped
-	ThirdToTwo=	two->OutProduct(third,_GC->GetAccur());
-	if (ThirdToTwo==IS_RIGHT)
-	  ThirdToTwo=IS_LEFT;
-	else if (ThirdToTwo==IS_LEFT)
-	  ThirdToTwo=IS_RIGHT;
-
-	// Select the result
-	switch(TwoToOne)
-	{
-		// Line 2 lies on  leftside of this line
-		case IS_LEFT : if ((ThirdToOne==IS_RIGHT) || (ThirdToTwo==IS_RIGHT))	return IS_RIGHT;
-							else if ((ThirdToOne==IS_LEFT) && (ThirdToTwo==IS_LEFT))	return IS_LEFT;
-							else	Result=IS_ON;	break;
-		// Line 2 lies on this line
-		case IS_ON	 :	if ((ThirdToOne==IS_RIGHT) && (ThirdToTwo==IS_RIGHT))		  return IS_RIGHT;
-							else if ((ThirdToOne==IS_LEFT) && (ThirdToTwo==IS_LEFT))   return IS_LEFT;
-					  //		else if ((ThirdToOne==IS_RIGHT) && (ThirdToTwo==IS_LEFT))   return IS_RIGHT;
-					  //		else if ((ThirdToOne==IS_LEFT) && (ThirdToTwo==IS_RIGHT))   return IS_LEFT;
-							else	Result=IS_ON;	break;
-		// Line 2 lies on right side of this line
-		case IS_RIGHT :if ((ThirdToOne==IS_RIGHT) && (ThirdToTwo==IS_RIGHT))	return IS_RIGHT;
-							else if ((ThirdToOne==IS_LEFT) || (ThirdToTwo==IS_LEFT)) return IS_LEFT;
-							else	Result=IS_ON;	break;
-    default: Result = IS_ON; assert( false );
-	}
-	return Result;
-}
-
-//
-// Remove the reference from this link to a_node
-//
-void KBoolLink::Remove(Node *a_node)
-{
-	(m_beginnode == a_node) ? m_beginnode = NULL : m_endnode = NULL;
-}
-
-
-//
-//	Replace oldnode by newnode and correct the references
-//
-void KBoolLink::Replace(Node *oldnode, Node *newnode)
-{	
-   if (m_beginnode == oldnode)
-	{	m_beginnode->RemoveLink(this);	// remove the reference to this
-		newnode->AddLink(this);       // let newnode refer to this
-		m_beginnode = newnode;				// let this refer to newnode
-	}
-	else
-	{	//assert(endnode==oldnode);
-		m_endnode->RemoveLink(this);
-		newnode->AddLink(this);
-		m_endnode = newnode;
-	}
-}
-
-
-//
-//	Reset all values
-//
-void KBoolLink::Reset()
-{
-	m_beginnode = 0;
-	m_endnode = 0;
-	Reset_flags();
-}
-
-
-//
-//	Reset all flags
-//
-void KBoolLink::Reset_flags()
-{
-	m_bin	= false; 			// Marker for walking over the graph
-	m_hole  = false;			// Is this a part of hole ?
-	m_hole_top = false;	   // link that is toplink of hole?
-	m_group = GROUP_A;		// Does this belong to group A or B ( o.a. for boolean operations between graphs)
-	m_LeftA = false;     	// Is left in polygongroup A
-	m_RightA= false;     	// Is right in polygon group A
-	m_LeftB = false;     	// Is left in polygon group B
-	m_RightB= false;     	// Is right in polygongroup B
-	m_mark	= false;     	// General purose marker, internally unused
-   m_holelink=false;
-
-	m_merge_L = m_merge_R = false;			// Marker for Merge
-	m_a_substract_b_L = m_a_substract_b_R = false;	// Marker for substract
-	m_b_substract_a_L = m_b_substract_a_R = false;	// Marker for substract
-	m_intersect_L = m_intersect_R = false;		// Marker for intersect
-	m_exor_L	= m_exor_R= false;          // Marker for Exor
-}
-
-//
-//	Refill this link by the arguments
-//
-void KBoolLink::Reset(Node *begin, Node *end,int graphnr)
-{
-	// Remove all the previous references
-	UnLink();
-	Reset();
-	// Set the references of the node and of this link correct
-	begin->AddLink(this);
-	end->AddLink(this);
-	m_beginnode = begin;
-	m_endnode = end;
-	if (graphnr!=0)
-		 m_graphnum = graphnr;
-}
-
-
-void KBoolLink::Set(Node *begin, Node *end)
-{
-	m_beginnode = begin;
-	m_endnode = end;
-}
-
-void KBoolLink::SetBeenHere()
-{
-	m_bin = true;
-}
-
-void KBoolLink::SetNotBeenHere()
-{
-	m_bin = false;
-}
-
-void KBoolLink::SetBeginNode(Node* new_node)
-{
-	m_beginnode = new_node;
-}
-
-
-void KBoolLink::SetEndNode(Node* new_node)
-{
-	m_endnode = new_node;
-}
-
-
-//
-//	Sets the graphnumber to argument num
-//
-void KBoolLink::SetGraphNum( int num )
-{
-	m_graphnum=num;
-}
-
-GroupType KBoolLink::Group()
-{
-	return m_group;
-}
-
-
-//
-// Reset the groupflag to argument groep
-//
-void KBoolLink::SetGroup(GroupType groep)
-{
-	m_group= groep;
-}
-
-
-//
-//	Remove all references to this link and from this link
-//
-void KBoolLink::UnLink()
-{
-   if (m_beginnode)
-   {
-      m_beginnode->RemoveLink(this);
-      if (!m_beginnode->GetNumberOfLinks())
-      {
-         delete m_beginnode;
-      }
-   }
-   m_beginnode = 0;
-   if (m_endnode)
-   {
-      m_endnode->RemoveLink(this);
-      if (!m_endnode->GetNumberOfLinks())
-      {
-         delete m_endnode;
-      }
-   }
-   m_endnode = 0;
-}
-
-
-void KBoolLink::UnMark()
-{
-	m_mark = false;
-	m_bin = false;
-}
-
-void KBoolLink::SetMark(bool value)
-{
-	m_mark = value;
-}
-
-//
-//	general purpose mark checker
-//
-bool KBoolLink::IsMarked() { return m_mark; }
-
-void  KBoolLink::SetTopHole(bool value) {	m_hole_top = value; }
-
-bool KBoolLink::IsTopHole() {	return m_hole_top; }
-
-//
-// Calculates the merge/substact/exor/intersect flags
-//
-void	KBoolLink::SetLineTypes()
-{
-	m_merge_R     = 
-	m_a_substract_b_R = 
-	m_b_substract_a_R = 
-	m_intersect_R = 
-	m_exor_R      = 
-	m_merge_L     = 
-	m_a_substract_b_L = 
-	m_b_substract_a_L = 
-	m_intersect_L = 
-	m_exor_L      = false;
-
-   //if left side is in group A and B then it is for the merge
-	m_merge_L   = m_LeftA || m_LeftB;  											
-	m_merge_R   = m_RightA || m_RightB;
-   //both in mean does not add to result.
-   if (m_merge_L && m_merge_R)
-      m_merge_L = m_merge_R = false;
-   
-   m_a_substract_b_L = m_LeftA && !m_LeftB;  
-   m_a_substract_b_R = m_RightA && !m_RightB;
-   //both in mean does not add to result.
-   if (m_a_substract_b_L && m_a_substract_b_R)
-      m_a_substract_b_L = m_a_substract_b_R = false;
-
-   m_b_substract_a_L = m_LeftB && !m_LeftA;  
-   m_b_substract_a_R = m_RightB && !m_RightA;
-   //both in mean does not add to result.
-   if (m_b_substract_a_L && m_b_substract_a_R)
-      m_b_substract_a_L = m_b_substract_a_R = false;
-
-	m_intersect_L = m_LeftB && m_LeftA;
-	m_intersect_R = m_RightB && m_RightA;
-   //both in mean does not add to result.
-   if (m_intersect_L && m_intersect_R)
-      m_intersect_L = m_intersect_R = false;
-
-	m_exor_L = !( (m_LeftB && m_LeftA) || (!m_LeftB && !m_LeftA) );
-	m_exor_R = !( (m_RightB && m_RightA) || (!m_RightB && !m_RightA) );
-   //both in mean does not add to result.
-   if (m_exor_L && m_exor_R)
-      m_exor_L = m_exor_R = false;
-}
-
-
-//put in direction with a_node as beginnode
-void  KBoolLink::Redirect(Node* a_node)
-{
-   if (a_node != m_beginnode)
-   {
-		// swap the begin- and endnode of the current link
-		Node* dummy = m_beginnode;
-		m_beginnode = m_endnode;
-		m_endnode = dummy;
-
-      bool swap = m_LeftA;
-	   m_LeftA = m_RightA;     	
-	   m_RightA= swap;
-
-      swap = m_LeftB;
-	   m_LeftB = m_RightB;     	
-	   m_RightB= swap;
-      
-      swap = m_merge_L ;
-	   m_merge_L = m_merge_R; 
-	   m_merge_R = swap; 
-
-      swap = m_a_substract_b_L;
-	   m_a_substract_b_L = m_a_substract_b_R; 
-	   m_a_substract_b_R = swap; 
-
-      swap = m_b_substract_a_L;
-	   m_b_substract_a_L = m_b_substract_a_R; 
-	   m_b_substract_a_R = swap; 
-
-      swap = m_intersect_L;
-	   m_intersect_L = m_intersect_R; 
-	   m_intersect_R = swap; 
-
-      swap = m_exor_L;
-	   m_exor_L = m_exor_R; 
-	   m_exor_R = swap; 
-   }
-}
diff --git a/src/ossim/kbool/lpoint.cpp b/src/ossim/kbool/lpoint.cpp
deleted file mode 100644
index e134977..0000000
--- a/src/ossim/kbool/lpoint.cpp
+++ /dev/null
@@ -1,203 +0,0 @@
-/*! \file kbool/src/lpoint.cpp
-    \brief Definition of GDSII LPoint type structure
-    \author Probably Klaas Holwerda
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda 
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: lpoint.cpp 9094 2006-06-13 19:12:40Z dburken $
-*/
-
-#ifdef __GNUG__
-#pragma implementation 
-#endif
-
-#include <ossim/kbool/lpoint.h>
-#include <math.h>
-
-// Constructors
-LPoint::LPoint()
-{
-	_x = 0;
-	_y = 0;
-}
-
-
-LPoint::LPoint(B_INT const X, B_INT const Y)
-{
-	_x = X;
-	_y = Y;
-}
-
-
-LPoint::LPoint(LPoint* const a_point)
-{
-	if (!a_point)
-		throw Bool_Engine_Error("Cannot copy a NULL Point Object.\n\nCould not create a LPoint Object.",
-						"Fatal Creation Error", 0, 1);
-	_x = a_point->_x;
-	_y = a_point->_y;
-}
-
-
-B_INT LPoint::GetX()
-{
-	return _x;
-}
-
-B_INT LPoint::GetY()
-{
-	return _y;
-}
-
-
-void LPoint::SetX(B_INT a_point_x)
-{
-	_x = a_point_x;
-}
-
-
-void LPoint::SetY(B_INT a_point_y)
-{
-	_y = a_point_y;
-}
-
-
-LPoint LPoint::GetPoint()
-{
-	return *this;
-}
-
-
-void LPoint::Set(const B_INT X,const B_INT Y)
-{
-	_x = X;
-	_y = Y;
-}
-
-
-void LPoint::Set(const LPoint &a_point)
-{
-	_x = a_point._x;
-	_y  =a_point._y;
-}
-
-bool LPoint::Equal(const LPoint a_point, B_INT Marge)
-{
-	B_INT delta_x, delta_y;
-
-	delta_x = babs((_x - a_point._x));
-	delta_y = babs((_y - a_point._y));
-
-	if ((delta_x <= Marge) && (delta_y <= Marge))
-		return true;
-	else
-		return false;
-}
-
-
-bool LPoint::Equal(const B_INT X, const B_INT Y, B_INT Marge)
-{
-	return (bool)((babs(_x - X) <= Marge) && (babs(_y - Y) <= Marge));
-}
-
-bool LPoint::ShorterThan(const LPoint a_point, B_INT Marge)
-{
-	double a,b;
-	a = (double) (a_point._x - _x);
-	a*= a;
-	b = (double) (a_point._y - _y);
-	b*= b;
-
-	return (bool) ( (a+b) <= Marge*Marge ? true : false ) ;
-}
-
-
-bool LPoint::ShorterThan(const B_INT X, const B_INT Y, B_INT Marge)
-{
-	double a,b;
-	a = (double) (X - _x);
-	a*= a;
-	b = (double) (Y - _y);
-	b*= b;
-
-	return (bool) ( a+b <= Marge*Marge ? true : false ) ;
-}
-
-
-// overload the assign (=) operator
-// usage : a_point = another_point;
-
-LPoint &LPoint::operator=(const LPoint &other_point)
-{
-	_x = other_point._x;
-	_y = other_point._y;
-	return *this;
-}
-
-
-// overload the + operator
-// usage : a_point = point1 + point2;
-
-LPoint &LPoint::operator+(const LPoint &other_point)
-{
-	_x += other_point._x;
-	_y += other_point._y;
-	return *this;
-}
-
-
-
-// overload the - operator
-// usage : a_point = point1 - point2;
-
-LPoint &LPoint::operator-(const LPoint &other_point)
-{
-	_x -= other_point._x;
-	_y -= other_point._y;
-	return *this;
-}
-
-
-// overload the * operator
-// usage: a_point = point1 * 100;
-
-LPoint &LPoint::operator*(int factor)
-{
-	_x *= factor;
-	_y *= factor;
-	return *this;
-}
-
-
-// overload the / operator
-// usage: a_point = point1 / 100;
-
-LPoint &LPoint::operator/(int factor)
-{
-	_x /= factor;
-	_y /= factor;
-	return *this;
-}
-
-
-// overload the compare (==) operator
-// usage: if (point1 == point2) { };
-
-int LPoint::operator==(const LPoint &other_point) const
-{
-	return ((other_point._x == _x) && (other_point._y == _y));
-}
-
-
-// overload the diffrent (!=) operator
-// usage: if (point1 != point2) { };
-
-int LPoint::operator!=(const LPoint &other_point) const
-{
-	return ((other_point._x != _x) || (other_point._y != _y));
-}
-
-
-
diff --git a/src/ossim/kbool/makefile.vc b/src/ossim/kbool/makefile.vc
deleted file mode 100644
index 0c4afa5..0000000
--- a/src/ossim/kbool/makefile.vc
+++ /dev/null
@@ -1,23 +0,0 @@
-###
-# $Id: makefile.vc 9232 2006-07-05 21:42:47Z dburken $
-#
-# Windows nmake make file.
-###
-OSSIM_ROOT	=	..\..\..
-!INCLUDE $(OSSIM_ROOT)\nmake.opt
-
-OBJ = \
-booleng.obj \
-graph.obj \
-graphlst.obj \
-line.obj \
-link.obj \
-lpoint.obj \
-node.obj \
-record.obj \
-scanbeam.obj
-
-default:	$(OBJ)
-
-clean:
-	$(RM) *.obj
diff --git a/src/ossim/kbool/node.cpp b/src/ossim/kbool/node.cpp
deleted file mode 100644
index 5e14b3c..0000000
--- a/src/ossim/kbool/node.cpp
+++ /dev/null
@@ -1,673 +0,0 @@
-/*! \file kbool/src/node.cpp
-    \brief Holds a GDSII node structure
-    \author Probably Klaas Holwerda
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda 
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: node.cpp 19473 2011-05-03 15:04:19Z gpotts $
-*/
-#ifdef __GNUG__
-#pragma implementation 
-#endif
-
-#include <ossim/kbool/node.h>
-#include <ossim/kbool/link.h>
-#include <ossim/kbool/line.h>
-#include <cmath>
-#include <iostream>
-
-//this here is to initialize the static iterator of node
-//with NOLIST constructor
-//TDLI<KBoolLink> 	Node::_linkiter=TDLI<KBoolLink>(_GC);
-
-Node::Node(Bool_Engine* /*GC*/) : LPoint(0,0)
-{
-//     _GC=GC;
-	_linklist=new DL_List<void*>();
-}
-
-
-Node::Node(B_INT const X, B_INT const Y, Bool_Engine* /*GC*/) : LPoint(X,Y)
-{
-//     _GC=GC;
-	_linklist=new DL_List<void*>();
-}
-
-
-Node::Node(LPoint* const a_point, Bool_Engine* /*GC*/) : LPoint(a_point)
-{
-//     _GC=GC;
-	_linklist=new DL_List<void*>();
-}
-
-
-//Node::Node(Node * const other) : LPoint(other)
-Node::Node(Node * const other, Bool_Engine* /*GC*/)
-{
-//     _GC=GC;
-	_x = other->_x;
-	_y = other->_y;
-	_linklist=new DL_List<void*>();
-}
-
-Node& Node::operator=(const Node &other_node)
-{
-	_x = other_node._x;
-	_y = other_node._y;
-
-	return *this;
-}
-
-
-// x and y of the point will be rounded to the nearest
-// xnew=N*grid and ynew=N*grid
-void Node::RoundInt(B_INT grid)
-{
-   _x=(B_INT) std::floor((_x + grid * 0.5) / grid) * grid;
-   _y=(B_INT) std::floor((_y + grid * 0.5) / grid) * grid;
-}
-
-Node::~Node()
-{
-   if(_linklist)
-   {
-      delete _linklist;
-      _linklist = 0;
-   }
-//    _GC = 0;
-}
-
-DL_List<void*>* Node::GetLinklist()
-{
-	return _linklist;
-}
-
-void Node::AddLink(KBoolLink *a_link)
-{
-   if(!_linklist) return;
-//	assert(a_link);
-	_linklist->insbegin(a_link);
-}
-
-KBoolLink* Node::GetIncomingLink()
-{
-   if(!_linklist) return 0;
-	if (((KBoolLink*)_linklist->headitem())->GetEndNode() == this)
-		return (KBoolLink*)_linklist->headitem();
-   else
-		return (KBoolLink*)_linklist->tailitem();
-}
-
-KBoolLink* Node::GetOutgoingLink()
-{
-   if(!_linklist) return 0;
-	if (((KBoolLink*)_linklist->headitem())->GetBeginNode() == this)
-		return (KBoolLink*)_linklist->headitem();
-   else
-		return (KBoolLink*)_linklist->tailitem();
-}
-
-//
-// Returns the number of connected links
-//
-int	Node::GetNumberOfLinks()
-{
-   if(!_linklist) return 0;
-   return _linklist->count();
-}
-
-KBoolLink* Node::GetOtherLink(KBoolLink* prev)
-{
-   if(!_linklist) return 0;
-   if (prev==(KBoolLink*)_linklist->headitem())
-      return (KBoolLink*)_linklist->tailitem();
-   if (prev==(KBoolLink*)_linklist->tailitem())
-      return (KBoolLink*)_linklist->headitem();
-   
-   return NULL;
-}
-
-
-int Node::Merge(Node *other)
-{
-   if (this==other) //they are already merged dummy
-      return 0;
-   TDLI<KBoolLink> 	linkiter(_linklist);
-//    if(!_GC) return 0;
-//    if(!_GC->_linkiter) return 0;
-//   if(_GC->_linkiter->isAttached())
-   {
-//       _GC->_linkiter->Detach();
-   }
-//    _GC->_linkiter->Attach(_linklist);
-   int Counter;
-	// used to delete Iterator on other->_linklist
-	// otherwise there can't be a takeover, because for takeover there can't
-	// be an iterator on other->_linklist;
-   {
-      TDLI<KBoolLink> Iother(other->_linklist);
-      KBoolLink* temp;
-
-      Counter = Iother.count();
-
-      Iother.tohead();
-      while (!Iother.hitroot())
-      {
-         temp=Iother.item();
-         //need to test both nodes because it may be a zero length link
-         if (temp->GetEndNode()==other)
-            temp->SetEndNode(this);
-         if (temp->GetBeginNode()==other)
-            temp->SetBeginNode(this);
-         Iother++;
-      }
-      linkiter.takeover(&Iother);
-   }
-//    _GC->_linkiter->Detach();
-   
-   //at this moment the other nodes has no link pointing to it so it needs to be deleted
-   delete other;
-   return Counter;
-}
-
-
-void Node::RemoveLink(KBoolLink *a_link)
-{
-//	assert(a_link);
-//    if(!_GC) return;
-//    if(!_GC->_linkiter) return;
-
-//    if(_GC->_linkiter->isAttached())
-//    {
-//       _GC->_linkiter->Detach();
-//    }
-   TDLI<KBoolLink> 	linkiter(_linklist);
-//    _GC->_linkiter->Attach(_linklist);
-   
-   if (linkiter.toitem(a_link))	// find the link
-      linkiter.remove();
-//    _GC->linkiter->Detach();
-}
-
-// This function will determinate if the given three points
-// can be simplified to two points
-//
-// input : three nodes, the first and the second must be points of
-//			  a line in correct order, the third point is a point of another
-//         line.
-// output: -
-// return: true if points can be simplified
-//			  false if points can't be simplified
-bool Node::Simplify(Node *First, Node *Second, B_INT Marge)
-{
-	double distance=0;
-
-	// The first and second point are a zero line, if so we can
-	// make a line between the first and third point
-	if (First->Equal(Second,Marge))
-		return true;
-
-	// Are the first and third point equal, if so
-	// we can delete the second point
-	if (First->Equal(this, Marge))
-		return true;
-
-	// Used tmp_link.set here, because the link may not be linked in the graph,
-	// because the point of the graphs are used, after use of the line we have
-	//to set the link to zero so the nodes will not be destructed by exit of the function
-	KBoolLink tmp_link(_GC);
-	tmp_link.Set(First,Second);
-	KBoolLine tmp_line(_GC);
-	tmp_line.Set(&tmp_link);
-
-	//	If third point is on the same line which is made from the first
-	// and second point then we can delete the second point
-	if (tmp_line.PointOnLine(this,distance, (double) Marge) == ON_AREA)
-	{
-		tmp_link.Set(NULL,NULL);
-		return true;
-	}
-	//
-	//
-	tmp_link.Set(Second,this);
-	tmp_line.Set(&tmp_link);
-	if (tmp_line.PointOnLine(First,distance, (double) Marge) == ON_AREA)
-	{
-		tmp_link.Set(NULL,NULL);
-		return true;
-	}
-	tmp_link.Set(NULL,NULL);
-	return false;
-}
-
-
-KBoolLink* Node::GetNextLink()
-{
-   if(!_linklist) return 0;
-   int Aantal = _linklist->count();
-   
-//	assert (Aantal != 0);
-   
-   // there is one link, so there is no previous link
-   if (Aantal == 1)
-      return NULL;
-   int Marked_Counter = 0;
-   KBoolLink *the_link = NULL;
-   TDLI<KBoolLink> 	linkiter(_linklist);
-   
-   // count the marked links
-//         if(!_GC) return 0;
-//         if(!_GC->_linkiter) return 0;
-// 	_GC->_linkiter->Attach(_linklist);
-   linkiter.tohead();
-   while (!linkiter.hitroot())
-   {
-      if (linkiter.item()->IsMarked())
-         Marked_Counter++;
-      else
-      {
-         if (!the_link)
-            the_link = linkiter.item();
-      }
-      (++linkiter);
-   }
-// 	_GC->_linkiter->Detach();
-   if (Aantal - Marked_Counter != 1)
-      // there arent two unmarked links
-      return NULL;
-   else
-   {
-      if (the_link->GetBeginNode() == this)
-         return the_link;
-      else
-         return NULL;
-   }
-}
-
-
-KBoolLink* Node::GetPrevLink()
-{
-   int Aantal;
-   if (!_linklist)
-      return 0;
-//         if(!_GC) return 0;
-//         if(!_GC->_linkiter) return 0;
-   TDLI<KBoolLink> 	linkiter(_linklist);
-   
-   Aantal = _linklist->count();
-   
-//	assert (Aantal != 0);
-   
-   // there is one link, so there is no previous link
-   if (Aantal == 1)
-      return NULL;
-   
-   int Marked_Counter = 0;
-   KBoolLink *the_link = NULL;
-   
-// 	_GC->_linkiter->Attach(_linklist);
-   // count the marked links
-   linkiter.tohead();
-   while (!linkiter.hitroot())
-   {
-      if (linkiter.item()->IsMarked())
-         Marked_Counter++;
-      else
-      {
-         if (!the_link)
-            the_link = linkiter.item();
-      }
-      (++linkiter);
-   }
-// 	_GC->_linkiter->Detach();
-   if (Aantal - Marked_Counter != 1)
-      // there arent two unmarked links
-      return NULL;
-   else
-   {
-      if (the_link->GetEndNode() == this)
-         return the_link;
-      else
-         return NULL;
-   }
-}
-
-bool Node::SameSides( KBoolLink* const prev , KBoolLink* const link, BOOL_OP operation )
-{
-   bool directedLeft;
-   bool directedRight;
-   if ( prev->GetEndNode() == this ) //forward direction
-   {
-      directedLeft = prev->IsMarkedLeft( operation );
-      directedRight = prev->IsMarkedRight( operation );
-      if ( link->GetBeginNode() == this ) //forward direction
-      {
-         return directedLeft == link->IsMarkedLeft( operation ) && 
-                directedRight == link->IsMarkedRight( operation );
-      }
-
-      return directedLeft == link->IsMarkedRight( operation ) && 
-             directedRight == link->IsMarkedLeft( operation );
-   }
-
-   directedLeft = prev->IsMarkedRight( operation );
-   directedRight = prev->IsMarkedLeft( operation );
-   if ( link->GetBeginNode() == this ) //forward direction
-   {
-      return directedLeft == link->IsMarkedLeft( operation ) && 
-             directedRight == link->IsMarkedRight( operation );
-   }
-   return directedLeft == link->IsMarkedRight( operation ) && 
-          directedRight == link->IsMarkedLeft( operation );
-}
-
-//  on the node get the link
-//  is the most right or left one
-//  This function is used to collect the simple graphs from a graph
-KBoolLink* Node::GetMost( KBoolLink* const prev ,LinkStatus whatside, BOOL_OP operation )
-{
-   KBoolLink *reserve=0;
-   KBoolLink *Result = NULL,*link;
-   Node* prevbegin = prev->GetOther(this);
-   
-   if(!_linklist) return 0;
-   if (_linklist->count() == 2) // only two links to this node take the one != prev
-   {
-      if ( (link = (KBoolLink*)_linklist->headitem()) == prev )      //this is NOT the one to go on
-         link = (KBoolLink*)_linklist->tailitem();
-      if (!link->BeenHere() && SameSides( prev, link, operation ) )
-         //we are back where we started (bin is true) return Null
-         return link;
-      return(0);
-   }
-   
-   TDLI<KBoolLink> 	linkiter(_linklist);
-//         if(!_GC) return 0;
-//         if(!_GC->_linkiter) return 0;
-// 	_GC->_linkiter->Attach(_linklist);
-   linkiter.tohead();
-   //more then 2 links to the Node
-   while(!linkiter.hitroot())
-   {
-      link = linkiter.item();
-      if ( !link->BeenHere() &&
-           SameSides( prev, link, operation ) && 
-           link != prev   //should be set to bin already
-           )
-      {
-         if (prevbegin == link->GetOther(this) )//pointers equal
-            //we are going back in the same direction on a parallel link
-            //only take this possibility if nothing else is possible
-            reserve = link;
-         else
-         {  //this link is in a different direction
-            if (!Result)
-               Result = link; //first one found sofar
-            else
-            {
-               if	(prev->PointOnCorner(Result, link) == whatside )
-                  //more to the whatside than take this one
-                  Result = link;
-            }
-         }
-      }
-      (++linkiter);
-   }
-   
-   // if there is a next link found return it
-   // else if a parallel link is found return that one
-   // else return NULL
-//    _GC->_linkiter->Detach();
-   return ((Result) ? Result : reserve);
-}
-
-//  on the node get the link
-//  is the most right or left one
-//  This function is used to collect the simple graphs from a graph
-KBoolLink* Node::GetMostHole( KBoolLink* const prev, LinkStatus whatside, BOOL_OP operation )
-{
-   if(!_linklist) return 0;
-   KBoolLink *reserve=0;
-   KBoolLink *Result=NULL,*link;
-   Node* prevbegin = prev->GetOther(this);
-   
-   if (_linklist->count() == 2) // only two links to this node take the one != prev
-   {
-      if ( (link = (KBoolLink*)_linklist->headitem()) == prev )      //this is NOT the one to go on
-         link = (KBoolLink*)_linklist->tailitem();
-      if ( link->GetHole() && !link->GetHoleLink() && !link->BeenHere() && SameSides( prev, link, operation ) )
-         //we are back where we started (bin is true) return Null
-         return link;
-      return(0);
-   }
-   
-   TDLI<KBoolLink> 	linkiter(_linklist);
-//         if(!_GC) return 0;
-//         if(!_GC->_linkiter) return 0;
-// 	_GC->_linkiter->Attach(_linklist);
-   linkiter.tohead();
-   //more then 2 links to the Node
-   while(!linkiter.hitroot())
-   {
-      link = linkiter.item();
-      if ( !link->BeenHere() &&
-           link->GetHole() &&
-           !link->GetHoleLink() && 
-           SameSides( prev, link, operation ) &&
-           link != prev   //should be set to bin already
-           )
-      {
-         if (prevbegin == link->GetOther(this) )//pointers equal
-            //we are going back in the same direction on a parallel link
-            //only take this possibility if nothing else is possible
-            reserve = link;
-         else
-         {  //this link is in a different direction
-            if (!Result)
-               Result = link; //first one found sofar
-            else
-            {
-               if	(prev->PointOnCorner(Result, link) == whatside )
-                  //more to the whatside than take this one
-                  Result = link;
-            }
-         }
-      }
-      (++linkiter);
-   }
-   
-   // if there is a next link found return it
-   // else if a parallel link is found return that one
-   // else return NULL
-//    _GC->_linkiter->Detach();
-   return ((Result) ? Result : reserve);
-}
-
-// this function gets the highest not flat link
-KBoolLink* Node::GetHoleLink( KBoolLink* const prev, bool checkbin, BOOL_OP operation )
-{
-   if(!_linklist) return 0;
-	KBoolLink *Result=NULL,*link;
-
-//         if(!_GC) return 0;
-        TDLI<KBoolLink> 	linkiter(_linklist);
-//         if(!_GC->_linkiter) return 0;
-// 	_GC->_linkiter->Attach(_linklist);
-
-//	for(_GC->_linkiter->tohead();!_GC->_linkiter->hitroot();(*_GC->_linkiter)++)
-	for(linkiter.tohead();!linkiter.hitroot();++linkiter)
-	{
-// 		link=_GC->_linkiter->item();
-           link = linkiter.item();
-           if ( link->GetHoleLink() && 
-                ( !checkbin || ( checkbin && !link->BeenHere()) ) &&
-                SameSides( prev, link, operation ) 
-                )
-           {
-              Result=link; 
-              break;
-           }
-	}
-        
-// 	_GC->_linkiter->Detach();
-	return (Result);
-}
-
-// this function gets the highest not flat link
-KBoolLink* Node::GetNotFlat()
-{
-   if(!_linklist) return 0;
-   KBoolLink *Result=NULL,*link;
-   TDLI<KBoolLink> 	linkiter(_linklist);
-   
-//    if(!_GC) return 0;
-//    if(!_GC->_linkiter) return 0;
-//    _GC->_linkiter->Attach(_linklist);
-
-  double tangold = 0.0;
-  double tangnew = 0.0;
-
-// 	for(_GC->_linkiter->tohead();!_GC->_linkiter->hitroot();(*_GC->_linkiter)++)
-  for(linkiter.tohead();!linkiter.hitroot();++linkiter)
-  {
-//		link=_GC->_linkiter->item();
-     link=linkiter.item();
-     if (!linkiter.item()->BeenHere())
-     {
-        B_INT dx=link->GetOther(this)->GetX()-_x;
-        B_INT dy=link->GetOther(this)->GetY()-_y;
-        if (dx!=0)
-        {
-           tangnew=fabs( (double) dy / (double) dx );
-        }
-        else
-        {
-           tangnew=MAXDOUBLE;
-        }
-        
-        if (!Result)
-        {
-           //this link is in a different direction
-           Result=link; //first one found sofar
-           tangold=tangnew;
-        }
-        else
-        {
-           if(tangnew < tangold)
-           {
-              //this one is higher (more horizontal) then the old Result
-              Result=link;
-              tangold=tangnew;
-           }
-        }
-     }
-  }
-  
-  // if there is a next link found return it
-  // else if a parallel link is found return that one
-  // else return NULL
-//   _GC->_linkiter->Detach();
-  return (Result);
-}
-
-//  on the node get the link that is not BIN
-//  and that has the same graphnumber and is in same direction
-KBoolLink *Node::Follow(KBoolLink* const prev )
-{
-   if(!_linklist) return 0;
-   KBoolLink *temp;
-   TDLI<KBoolLink> 	linkiter(_linklist);
-//    if(!_GC) return 0;
-//    if(!_GC->_linkiter) return 0;
-//    _GC->_linkiter->Attach(_linklist);
-   
-   linkiter.tohead();
-   while(!linkiter.hitroot())
-   {
-      if (( linkiter.item() != prev ) &&
-          ( !linkiter.item()->BeenHere()) &&
-          ( linkiter.item()->GetGraphNum() == prev->GetGraphNum()) &&
-          (
-             ( (prev->GetEndNode()   == this) &&
-               (linkiter.item()->GetEndNode()  !=this)
-               )
-             ||
-             ( (prev->GetBeginNode() == this) &&
-               (linkiter.item()->GetBeginNode() !=this)
-               )
-             )
-          )
-      {
-         temp=linkiter.item();
-         linkiter.Detach();
-         return(temp);
-      }
-      (++linkiter);
-   }
-   
-//    _GC->_linkiter->Detach();
-   return (0);
-}
-
-// this function gets the highest (other node) link ascending from the node
-// that has the bin flag set as the argument binset
-// if no such link exists return 0
-KBoolLink* Node::GetBinHighest(bool binset)
-{
-   if(!_linklist) return 0;
-   TDLI<KBoolLink> 	linkiter(_linklist);
-//    if(!_GC) return 0;
-//    if(!_GC->_linkiter) return 0;
-
-   KBoolLink *Result=NULL,*link;
-//    _GC->_linkiter->Attach(_linklist);
-   
-   double tangold = 0.0;
-   double tangnew = 0.0;
-   
-   for(linkiter.tohead();!linkiter.hitroot();(++linkiter))
-   {
-      link=linkiter.item();
-      if (linkiter.item()->BeenHere() == binset)
-      {
-         B_INT dx=link->GetOther(this)->GetX()-_x;
-         B_INT dy=link->GetOther(this)->GetY()-_y;
-         if (dx!=0)
-         {
-            tangnew = (double) dy / (double) dx;
-         }
-         else if (dy > 0)
-         {
-            tangnew = MAXDOUBLE;
-         }
-         else
-         {
-            tangnew = -MAXDOUBLE;
-         }
-         
-         if (!Result)
-         {
-            Result = link; //first one found sofar
-            tangold = tangnew;
-         }
-         else
-         {
-            if(tangnew > tangold)
-            {
-               //this one is higher then the old Result
-               Result = link;
-               tangold = tangnew;
-            }
-         }
-      }
-   }
-   
-   // if there is a link found return it
-   // else return NULL
-//    _GC->_linkiter->Detach();
-   return (Result);
-}
-
-
diff --git a/src/ossim/kbool/record.cpp b/src/ossim/kbool/record.cpp
deleted file mode 100644
index e1c9ab6..0000000
--- a/src/ossim/kbool/record.cpp
+++ /dev/null
@@ -1,357 +0,0 @@
-/*! \file kbool/src/record.cpp
-    \author Probably Klaas Holwerda or Julian Smart
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: record.cpp 9094 2006-06-13 19:12:40Z dburken $
-*/
-
-#ifdef __GNUG__
-#pragma implementation 
-#endif
-
-#include <ossim/kbool/booleng.h>
-#include <ossim/kbool/record.h>
-#include <ossim/kbool/node.h>
-
-#include <stdlib.h>
-#include <math.h>
-
-#define LNK _line.GetLink()
-
-//int r_index=-1;
-//void* _Record_Pool[30];
-
-//void DeleteRecordPool()
-//{
-//   while (r_index!=-1)
-//   {
-//     free( _Record_Pool[r_index--]);
-//   }
-//}
-
-Record::~Record()
-{
-}
-
-
-//void* Record::operator new(size_t size)
-//{
-//
-//   if (r_index!=-1)
-//   {
-//     return _Record_Pool[r_index--];
-//   }
-//
-//   return malloc(size);
-//}
-
-//void Record::operator delete(void* recordptr)
-//{
-//
-//   if (r_index < 28)
-//   {
-//     _Record_Pool[++r_index]= recordptr;
-//     return;
-//   }
-//
-//	free (recordptr);
-//}
-
-//void Record::deletepool()
-//{
-//
-//   while (r_index!=-1)
-//   {
-//     free( _Record_Pool[r_index--]);
-//   }
-//}
-
-Record::Record(KBoolLink* link,Bool_Engine* GC)
-   :_line(GC)
-{
-   _GC=GC;
-	_dir=GO_RIGHT;
-   _a=0;
-   _b=0;
-	_line.Set(link);
-	_line.CalculateLineParameters();
-}
-
-
-//when the dimensions of a link for a record changes, its line parameters need to be recalculated
-void Record::SetNewLink(KBoolLink* link)
-{
-	_line.Set(link);
-   _line.CalculateLineParameters();
-}
-
-//for beams calculate the ysp on the low scanline
-void Record::Calc_Ysp(Node* low)
-{
-	if ((LNK->GetEndNode() == low) || (LNK->GetBeginNode() == low))
-   {
-      _ysp=low->GetY();
-      return;
-   }
-
-   if	(LNK->GetEndNode()->GetX() == LNK->GetBeginNode()->GetX())
-         _ysp=low->GetY(); //flatlink only in flatbeams
-   else if (LNK->GetEndNode()->GetX() == low->GetX())
-         _ysp=LNK->GetEndNode()->GetY();
-   else if (LNK->GetBeginNode()->GetX() == low->GetX())
-         _ysp=LNK->GetBeginNode()->GetY();
-   else
-      	_ysp=_line.Calculate_Y_from_X(low->GetX());
-}
-
-//to set the _dir for new links in the beam
-void Record::Set_Flags()
-{
-	if (LNK->GetEndNode()->GetX()==LNK->GetBeginNode()->GetX()) //flatlink ?
-	{  //only happens in flat beams
-		if (LNK->GetEndNode()->GetY() < LNK->GetBeginNode()->GetY())
-			_dir=GO_RIGHT;
-		else
-			_dir=GO_LEFT;
-	}
-	else
-	{
-		if (LNK->GetEndNode()->GetX() > LNK->GetBeginNode()->GetX())
-			_dir=GO_RIGHT;
-		else
-			_dir=GO_LEFT;
-	}
-}
-
-KBoolLink* Record::GetLink()
-{
-	return LNK;
-}
-
-B_INT Record::Ysp()
-{
-	return _ysp;
-}
-
-void Record::SetYsp(B_INT ysp)
-{
-	_ysp=ysp;
-}
-
-DIRECTION Record::Direction()
-{
-	return DIRECTION(_dir);
-}
-
-bool Record::Calc_Left_Right(Record* record_above_me)
-{
-   bool par=false;
-
-   if (!record_above_me)   //null if no record above
-   { 	_a=0;_b=0;  }
-   else
-   {
-   	_a=record_above_me->_a;
-   	_b=record_above_me->_b;
-   }
-
-   switch (_dir&1)
-   {
-      case GO_LEFT	:	if (LNK->Group() == GROUP_A)
-                        {
-                           LNK->SetRightA((bool)(_a>0));
-
-                           if (_GC->GetWindingRule())
-                              LNK->GetInc() ? _a++ : _a--;
-                           else
-                           {  //ALTERNATE
-                              if (_a)
-                                 _a=0;
-                              else
-                                 _a=1;
-                           }
-
-                           LNK->SetLeftA((bool)(_a>0));
-                           LNK->SetLeftB((bool)(_b>0));
-                           LNK->SetRightB((bool)(_b>0));
-                        }
-                        else
-                        {
-                           LNK->SetRightA((bool)(_a > 0));
-                           LNK->SetLeftA((bool)(_a>0));
-                           LNK->SetRightB((bool)(_b>0));
-
-                           if (_GC->GetWindingRule())
-                              LNK->GetInc() ? _b++ : _b--;
-                           else //ALTERNATE
-                           {
-                               if (_b)
-                                    _b=0;
-                               else
-                                    _b=1;
-                           }
-
-                           LNK->SetLeftB((bool)(_b>0));
-                        }
-                           break;
-      case	GO_RIGHT	:	if (LNK->Group() == GROUP_A)
-                        {
-                           LNK->SetLeftA((bool)(_a>0));
-
-                           if (_GC->GetWindingRule())
-                              LNK->GetInc() ? _a++ : _a--;
-                           else
-                           {  //ALTERNATE
-                              if (_a)
-                                 _a=0;
-                              else
-                                 _a=1;
-                           }
-
-                           LNK->SetRightA((bool)(_a>0));
-                           LNK->SetLeftB((bool)(_b>0));
-                           LNK->SetRightB((bool)(_b>0));
-                        }
-                        else
-                        {
-                           LNK->SetRightA((bool)(_a>0));
-                           LNK->SetLeftA((bool)(_a>0));
-                           LNK->SetLeftB((bool)(_b>0));
-
-                           if (_GC->GetWindingRule())
-                              LNK->GetInc() ? _b++ : _b--;
-                           else
-                           {  //ALTERNATE
-                              if (_b)
-                                 _b=0;
-                              else
-                                 _b=1;
-                           }
-
-                           LNK->SetRightB((bool)(_b>0));
-                        }
-                        break;
-      default			:  _GC->error("Undefined Direction of link","function IScanBeam::Calc_Set_Left_Right()");
-                        break;
-   }
-
-//THE NEXT WILL WORK for MOST windingrule polygons,
-//even when not taking into acount windingrule
-// not all
-/*
-   switch (_dir&1)
-   {
-      case GO_LEFT	:	if (LNK->Group() == GROUP_A)
-                        {
-                           LNK->SetRightA((bool)(_a>0));
-
-                           if (booleng->Get_WindingRule())
-                              LNK->GetInc() ? _a++ : _a--;
-                           else
-                              _a--;
-
-                           LNK->SetLeftA((bool)(_a>0));
-                           LNK->SetLeftB((bool)(_b>0));
-                           LNK->SetRightB((bool)(_b>0));
-                        }
-                        else
-                        {
-                           LNK->SetRightA((bool)(_a > 0));
-                           LNK->SetLeftA((bool)(_a>0));
-                           LNK->SetRightB((bool)(_b>0));
-
-                           if (booleng->Get_WindingRule())
-                              LNK->GetInc() ? _b++ : _b--;
-                           else
-                              _b--;
-
-                           LNK->SetLeftB((bool)(_b>0));
-                        }
-                           break;
-      case	GO_RIGHT	:	if (LNK->Group() == GROUP_A)
-                           {
-                              LNK->SetLeftA((bool)(_a>0));
-
-                              if (booleng->Get_WindingRule())
-                                 LNK->GetInc() ? _a++ : _a--;
-                              else
-                                 _a++;
-
-                              LNK->SetRightA((bool)(_a>0));
-                              LNK->SetLeftB((bool)(_b>0));
-                              LNK->SetRightB((bool)(_b>0));
-                           }
-                        else
-                           {
-                              LNK->SetRightA((bool)(_a>0));
-                              LNK->SetLeftA((bool)(_a>0));
-                              LNK->SetLeftB((bool)(_b>0));
-
-                              if (booleng->Get_WindingRule())
-                                 LNK->GetInc() ? _b++ : _b--;
-                              else
-                                 _b++;
-
-                              LNK->SetRightB((bool)(_b>0));
-                           }
-                        break;
-      default			:  _messagehandler->error("Undefined Direction of link","function IScanBeam::Calc_Set_Left_Right()");
-                        break;
-   }
-*/
-   //if the records are parallel (same begin/endnodes)
-   //the above link a/b flag are adjusted to the current a/b depth
-   if (record_above_me && Equal(record_above_me))
-   {
-      par=true;
-		LNK->Mark();
-   	record_above_me->_a=_a;
-   	record_above_me->_b=_b;
-		if (Direction()== GO_LEFT)
-		{
-         //set the bottom side  of the above link
-         if (record_above_me->Direction()== GO_LEFT)
-         {
-            record_above_me->LNK->SetLeftA(LNK->GetLeftA());
-            record_above_me->LNK->SetLeftB(LNK->GetLeftB());
-         }
-         else
-         {
-            record_above_me->LNK->SetRightA(LNK->GetLeftA());
-            record_above_me->LNK->SetRightB(LNK->GetLeftB());
-         }
-		}
-		else
-		{
-         //set the bottom side  of the above link
-         if (record_above_me->Direction()== GO_LEFT)
-         {
-            record_above_me->LNK->SetLeftA(LNK->GetRightA());
-            record_above_me->LNK->SetLeftB(LNK->GetRightB());
-         }
-         else
-         {
-            record_above_me->LNK->SetRightA(LNK->GetRightA());
-            record_above_me->LNK->SetRightB(LNK->GetRightB());
-         }
-		}
-   }
-   return par;
-}
-
-bool Record::Equal(Record *a)
-{
-	return((bool)( ( LNK->GetOther(a->LNK->GetBeginNode()) == a->LNK->GetEndNode())  &&
-						  ( LNK->GetOther(a->LNK->GetEndNode())   == a->LNK->GetBeginNode())  ));
-}
-
-
-KBoolLine* Record::GetLine()
-{
-	return &_line;
-}
-
-
diff --git a/src/ossim/kbool/scanbeam.cpp b/src/ossim/kbool/scanbeam.cpp
deleted file mode 100644
index 1ef63e3..0000000
--- a/src/ossim/kbool/scanbeam.cpp
+++ /dev/null
@@ -1,1374 +0,0 @@
-/*! \file kbool/src/scanbeam.cpp
-    \author Probably Klaas Holwerda or Julian Smart
-
-    Copyright: 2001-2004 (C) Probably Klaas Holwerda 
-
-    Licence: wxWidgets Licence
-
-    RCS-ID: $Id: scanbeam.cpp 9094 2006-06-13 19:12:40Z dburken $
-*/
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-// class scanbeam
-// this class represents de space between two scanlines
-#include <ossim/kbool/scanbeam.h>
-#include <math.h>
-#include <assert.h>
-
-#include <ossim/kbool/booleng.h>
-
-#include <ossim/kbool/graph.h>
-#include <ossim/kbool/node.h>
-
-//this here is to initialize the static iterator of scanbeam
-//with NOLIST constructor
-
-int recordsorter(Record* , Record* );
-
-int recordsorter_ysp_angle(Record* , Record* );
-int recordsorter_ysp_angle_back(Record* rec1, Record* rec2);
-
-ScanBeam::ScanBeam(Bool_Engine* GC):DL_List<Record*>()
-{
-   _GC = GC;
-	_type=NORMAL;
-   _BI.Attach(this);
-}
-
-ScanBeam::~ScanBeam()
-{
-   //first delete all record still in the beam
-   _BI.Detach();
-   remove_all( true );
-
-   //DeleteRecordPool(); 
-}
-
-void ScanBeam::SetType(Node* low,Node* high)
-{
-   if (low->GetX() < high->GetX())
-   	_type=NORMAL;
-   else
-   	_type=FLAT;
-}
-
-/*
-//catch node to link crossings
-// must be sorted on ysp
-int ScanBeam::FindCloseLinksAndCross(TDLI<KBoolLink>* _I,Node* _lowf)
-{
-	int merges = 0;
-	Record* record;
-
-   TDLI<Record> _BBI=TDLI<Record>(this);
-
-	if (_BI.count() > 1)
-	{
-		//first search a link towards this node
-		for(_BI.tohead(); !_BI.hitroot(); _BI++)
-		{
-			record=_BI.item();
-			if( (record->GetLink()->GetBeginNode()==_lowf) ||
-				 (record->GetLink()->GetEndNode()  ==_lowf)
-			  )
-			  break;
-		}
-
-		//NOTICE if the node "a_node" is not inside a record
-		//for instance to connected flat links (flatlinks not in beam)
-		//then IL will be at end    (those will be catched at 90 degrees rotation)
-		if (_BI.hitroot())
-      {
-			return(merges);
-      }
-
-      //from IL search back for close links
-      _BBI.toiter(&_BI);
-      _BBI--;
-      while(!_BBI.hitroot())
-      {
-         record=_BBI.item();
-
-         if (record->Ysp() != _lowf->GetY())
-            break;
-
-         // the distance to the low node is smaller then the MARGE
-         if( (record->GetLink()->GetBeginNode()!=_lowf) &&
-             (record->GetLink()->GetEndNode()  !=_lowf)
-           )
-         {  // the link is not towards the low node
-            record->GetLink()->AddCrossing(_lowf);
-            record->SetNewLink(record->GetLink()->ProcessCrossingsSmart(_I));
-            merges++;
-         }
-         _BBI--;
-      }
-
-      //from IL search forward for close links
-      _BBI.toiter(&_BI);
-      _BBI++;
-      while(!_BBI.hitroot())
-      {
-         record=_BBI.item();
-
-         if (record->Ysp() != _lowf->GetY())
-//         if (record->Ysp() < _lowf->GetY()-MARGE)
-            break;
-
-         // the distance to the low node is smaller then the MARGE
-         if( (record->GetLink()->GetBeginNode()!=_lowf) &&
-             (record->GetLink()->GetEndNode()  !=_lowf)
-           )
-         {  // the link is not towards the low node
-            record->GetLink()->AddCrossing(_lowf);
-            record->SetNewLink(record->GetLink()->ProcessCrossingsSmart(_I));
-            merges++;
-         }
-         _BBI++;
-      }
-   }
-	return merges;
-}
-*/
-
-/*
-bool  ScanBeam::Update(TDLI<KBoolLink>* _I,Node* _lowf)
-{
-	bool found=false;
-	KBoolLink* link;
-
-	_BI.tohead();
-	while (!_BI.hitroot())
-	{
-
-		Record* record=_BI.item();
-		record->Calc_Ysp(_type,_low);
-		_BI++;
-	}
-
-   FindCloseLinksAndCross(_I,_lowf);
-
-   _BI.tohead();
-   while (!_BI.hitroot())
-   {
-      Record* record=_BI.item();
-      //records containing links towards the new low node
-      //are links to be marked for removal
-
-      if ((record->GetLink()->GetEndNode() == _lowf) ||
-          (record->GetLink()->GetBeginNode() == _lowf)
-         )
-      {
-         //cross here the links that meat eachother now
-         delete _BI.item();
-         _BI.remove();
-
-         //cross here the links that meat eachother now
-         _BI--;
-         if (!_BI.hitroot() && (_BI.count() > 1))
-         {
-            Record* prev=_BI.item();
-            _BI++;
-            if (!_BI.hitroot())
-            {
-               if (!_BI.item()->Equal(prev)) // records NOT parallel
-                  if (_BI.item()->GetLine()->Intersect(prev->GetLine(),MARGE))
-                  {
-                     //they did cross, integrate the crossings in the graph
-                     //this  may modify the links already part of the record
-                     //this is why they are returned in set for the record
-                     _BI.item()->SetNewLink(_BI.item()->GetLink()->ProcessCrossingsSmart(_I));
-                     prev->SetNewLink(prev->GetLink()->ProcessCrossingsSmart(_I));
-                  }
-            }
-         }
-         else
-          	_BI++;
-      }
-      else
-         _BI++;
-   }
-
-	//writebeam();
-
-   //ONLY links towards the low node are possible to be added
-	//the bin flag will be set if it fits in the beam
-	//so for following beams it will not be checked again
-	while ( bool(link=_lowf->GetBinHighest(false)) )
-	{
-      Record* record=new Record(link);
-      // yp_new will always be the y of low node since all new links are
-      // from this node
-      record->SetYsp(_lowf->GetY());
-      record->Set_Flags(_type);
-      //need to calculate ysn to be able to sort this record in the right order
-      //this is only used when the insert node is equal for both records
-      // ins_smart and cross neighbour  directly
-      // if empty then just insert
-
-      if (empty())
-         insend(record);
-      else
-      {
-         // put new item left of the one that is bigger
-         _BI.tohead();
-         while(!_BI.hitroot())
-         {
-            if (recordsorter_ysp_angle(record,_BI.item())==1)
-               break;
-            _BI++;
-         }
-
-         _BI.insbefore(record);
-         _BI--;_BI--; //just before the new record inserted
-         if (!_BI.hitroot())
-         {
-            Record* prev=_BI.item();
-            _BI++; //goto the new record inserted
-            if (!_BI.item()->Equal(prev)) // records NOT parallel
-            {
-               if (_BI.item()->GetLine()->Intersect(prev->GetLine(),MARGE))
-               {
-                  //this  may modify the links already part of the record
-                  //this is why they are returned in set for the record
-                  _BI.item()->SetNewLink(_BI.item()->GetLink()->ProcessCrossingsSmart(_I));
-                  prev->SetNewLink(prev->GetLink()->ProcessCrossingsSmart(_I));
-               }
-            }
-         }
-         else
-           _BI++;
-
-         Record* prev=_BI.item(); //the new record
-         _BI++;
-         if (!_BI.hitroot() && !_BI.item()->Equal(prev)) // records NOT parallel
-         {
-	         Record* cur=_BI.item();
-            if (cur->GetLine()->Intersect(prev->GetLine(),MARGE))
-            {
-               //this  may modify the links already part of the record
-               //this is why they are returned in set for the record
-               cur->SetNewLink(cur->GetLink()->ProcessCrossingsSmart(_I));
-               prev->SetNewLink(prev->GetLink()->ProcessCrossingsSmart(_I));
-            }
-         }
-      }
-      //remember this to calculate in/out values for each new link its polygon again.
-      GNI->insend(record->GetLink()->GetGraphNum());
-      found=true;
-	   record->GetLink()->SetBeenHere();
-   }
-
-   FindCloseLinksAndCross(_I,_lowf);
-	//writebeam();
-	return(found);
-}
-*/
-
-bool ScanBeam::FindNew(SCANTYPE scantype,TDLI<KBoolLink>* _I, bool& holes )
-{
-   bool foundnew = false;
-
-   _low = _I->item()->GetBeginNode();
-
-	KBoolLink* link;
-
-	//if (!checksort())
-	//	SortTheBeam();
-
-   lastinserted=0;
-   //ONLY links towards the low node are possible to be added
-	//the bin flag will be set if it fits in the beam
-	//so for following beams it will not be checked again
-	while ( (link = _low->GetBinHighest(false)) != NULL )
-   {
-     	if ( (link->GetEndNode()->GetX() == link->GetBeginNode()->GetX()) //flatlink in flatbeam
-           && ((scantype == NODELINK) || (scantype == LINKLINK) || (scantype == LINKHOLES))
-         )
-      {
-            switch(scantype)
-            {
-               case NODELINK:
-               {
-                  //all vertical links in flatbeam are ignored
-                  //normal link in beam
-                  Record* record=new Record(link,_GC);
-                  // yp_new will always be the y of low node since all new links are
-                  // from this node
-                  record->SetYsp(_low->GetY());
-                  record->Set_Flags();
-                  // put new item left of the one that is lower in the beam 
-                  // The last one inserted in this loop, is already left of the current
-                  // iterator position. So the new links are inerted in proper order.                  
-                  link->SetRecordNode( _BI.insbefore(record) );
-                  _BI--;
-	               foundnew = Process_PointToLink_Crossings() !=0 || foundnew;
-                  delete record;
-                  _BI.remove();
-                  break;
-               }
-               case LINKLINK:
-               //is the new record a flat link
-               {
-                  KBoolLine flatline = KBoolLine(link, _GC);
-                  foundnew = Process_LinkToLink_Flat(&flatline) || foundnew;
-                  //flatlinks are not part of the beams, still they are used to find new beams
-                  //they can be processed now if the beginnode does not change, since this is used to
-                  //to find new beams. and its position does not change
-                  //ProcessCrossings does take care of this
-	   				flatline.ProcessCrossings(_I);
-		            break;
-               }
-               case LINKHOLES : //holes are never to flatlinks
-                   assert( true );
-      	      default: 
-      		       break;             
-            }
-      }
-      else
-      {
-         //normal link in beam
-         Record* record = new Record(link,_GC);
-         // yp_new will always be the y of low node since all new links are
-         // from this node
-         record->SetYsp(_low->GetY());
-         record->Set_Flags();
-         // put new item left of the one that is lower in the beam 
-         // The last one inserted in this loop, is already left of the current
-         // iterator position. So the new links are inserted in proper order.
-         link->SetRecordNode( _BI.insbefore(record) );         
-         lastinserted++;
-
-         //_GC->Write_Log( "after insert" );
-         writebeam();
-
-         switch(scantype)
-         {
-          case NODELINK:
-               _BI--;
-               foundnew = Process_PointToLink_Crossings() !=0  || foundnew;
-               _BI++;
-               break;
-          case INOUT:
-            {
-               _BI--;
-               //now we can set the _inc flag
-					Generate_INOUT(record->GetLink()->GetGraphNum());
-               _BI++;
-            }
-            break;
-          case GENLR:
-            {
-               //now we can set the a/b group flags based on the above link
-               _BI--;
-               _BI--;
-               Record* above=0;
-               if (!_BI.hitroot())
-                  above=_BI.item();
-               _BI++;
-
-               //something to do for winding rule
-
-               if (record->Calc_Left_Right(above))
-               {
-                  delete record;
-                  _BI.remove();
-                  lastinserted--;
-               }
-               else
-                  _BI++;
-            }
-            break;
-          case LINKHOLES:
-            _BI--;
-            holes = ProcessHoles(true,_I) || holes;
-            _BI++;
-            break;
-
-	       default:
-	         break;
-         }
-      }
-      link->SetBeenHere();
-	}
-
-   writebeam();
-
-	return foundnew;
-}
-
-bool ScanBeam::RemoveOld(SCANTYPE scantype,TDLI<KBoolLink>* _I, bool& holes )
-{
-	bool found = false;
-	bool foundnew = false;
-   DL_Iter<Record*>  _BBI=DL_Iter<Record*>();
-	bool attached=false;
-
-   _low = _I->item()->GetBeginNode();
-
-   switch(scantype)
-   {
-      case INOUT:
-      case GENLR:
-      case LINKHOLES:
-      if (_type==NORMAL )
-      {
-         if (_low->GetBinHighest(true)) //is there something to remove
-         {
-            if ( scantype == LINKHOLES )
-            {
-               _BI.tohead();
-               while (!_BI.hitroot())
-               {
-                  Record* record=_BI.item();
-                  //records containing links towards the new low node
-                  //are links to be removed
-                  if ((record->GetLink()->GetEndNode() == _low) ||
-                      (record->GetLink()->GetBeginNode() == _low)
-                     )
-                  {
-                     holes = ProcessHoles(false,_I) || holes;
-                  }
-                  _BI++;
-               }
-            }
-
-            _BI.tohead();
-            while (!_BI.hitroot())
-            {
-               Record* record=_BI.item();
-               //records containing links towards the new low node
-               //are links to be removed
-               if ((record->GetLink()->GetEndNode() == _low) ||
-                   (record->GetLink()->GetBeginNode() == _low)
-                  )
-               {
-                  if (attached)   //there is a bug
-                  {
-                     _BBI.Detach();
-                     if (!checksort())
-                        SortTheBeam( true );
-                     _BI.tohead();
-                     attached=false;
-
-                  }
-                  delete _BI.item();
-                  _BI.remove();
-                  found=true;
-               }
-               else if (found) //only once in here
-               {
-                  attached=true;
-                  found=false;
-                  _BBI.Attach(this);
-                  _BBI.toiter(&_BI); //this is the position new records will be inserted
-
-                  //recalculate ysp for the new scanline
-                  record->Calc_Ysp(_low);
-                  _BI++;
-               }
-               else
-               {
-                  //recalculate ysp for the new scanline
-                  record->Calc_Ysp(_low);
-                  _BI++;
-               }
-            }
-
-            if (attached)
-            {
-               _BI.toiter(&_BBI);
-               _BBI.Detach();
-            }
-
-         }
-         else
-         {
-            _BBI.Attach(this);
-            _BBI.toroot();
-            _BI.tohead();
-            while (!_BI.hitroot())
-            {
-                  Record* record=_BI.item();
-
-                  record->Calc_Ysp(_low);
-                  if (!found && (record->Ysp() < _low->GetY()))
-                  {
-                     found=true;
-                     _BBI.toiter(&_BI);
-                  }
-                  _BI++;
-            }
-            _BI.toiter(&_BBI);
-            _BBI.Detach();
-         }
-      }
-      else
-      {  //because the previous beam was flat the links to remove are
-         //below the last insert position
-         if (_low->GetBinHighest(true)) //is there something to remove
-         {
-
-            if ( scantype == LINKHOLES )
-            {
-               _BI.tohead();
-               while (!_BI.hitroot())
-               {
-                  Record* record=_BI.item();
-                  //records containing links towards the new low node
-                  //are links to be removed
-                  if ((record->GetLink()->GetEndNode() == _low) ||
-                      (record->GetLink()->GetBeginNode() == _low)
-                     )
-                  {
-                     holes = ProcessHoles(false,_I) || holes;
-                  }
-                  _BI++;
-               }
-            }
-
-            //on record back bring us to the last inserted record
-            //or if nothing was inserted the record before the last deleted record
-            //if there was no record before the last deleted record this means
-            //we where at the beginning of the beam, so at root
-
-            //_BI << (lastinserted+1);
-            //_BI--;
-            //if (_BI.hitroot())  //only possible when at the begin of the beam
-
-            _BI.tohead();
-            while (!_BI.hitroot())
-            {
-               Record* record=_BI.item();
-               //records containing links towards the new low node
-               //are links to be removed
-               if ((record->GetLink()->GetEndNode() == _low) ||
-                   (record->GetLink()->GetBeginNode() == _low)
-                  )
-               {
-                  delete _BI.item();
-                  _BI.remove();
-                  found=true;
-               }
-               else if (found) //only once in here
-                  break;
-               else if (record->Ysp() < _low->GetY())
-                     //if flatlinks are not in the beam nothing will be found
-                     //this will bring us to the right insertion point
-                     break;
-               else
-                  _BI++;
-            }
-         }
-         else
-         {
-            //on record back bring us to the last inserted record
-            //or if nothing was inserted the record before the last deleted record
-            //if there was no record before the last deleted record this means
-            //we where at the beginning of the beam, so at root
-
-            //_BI << (lastinserted+ 1);
-            //_BI--;
-            //if (_BI.hitroot())  //only possible when at the begin of the beam
-               _BI.tohead();
-            while (!_BI.hitroot())
-            {
-                  Record* record=_BI.item();
-                  if (record->Ysp() < _low->GetY())
-                     break;
-                  _BI++;
-            }
-         }
-      }
-      break;
-
-      case NODELINK:
-      case LINKLINK:
-      {
-         if (_type == NORMAL)
-         {
-            Calc_Ysp();
-            if (scantype==LINKLINK)
-               foundnew = Process_LinkToLink_Crossings() !=0 || foundnew;
-            else
-               SortTheBeam( false );
-         }
-         //else beam is already sorted because the added/removed flat links
-         //do not change the ysp of links already there, new non flat links
-         //are inserted in order, as result the beam stays sorted
-
-         if (_low->GetBinHighest(true)) //is there something to remove
-         {
-            _BI.tohead();
-            while (!_BI.hitroot())
-            {
-               Record* record=_BI.item();
-               //records containing links towards the new low node
-               //are links to be removed
-               if ((record->GetLink()->GetEndNode() == _low) ||
-                   (record->GetLink()->GetBeginNode() == _low)
-                  )
-               {
-                  KBoolLine* line=record->GetLine();
-                  if (scantype==NODELINK)
-   	               foundnew = Process_PointToLink_Crossings() !=0 || foundnew;
-                  line->ProcessCrossings(_I);
-                  delete _BI.item();
-                  _BI.remove();
-                  found=true;
-               }
-               //because the beam is sorted on ysp, stop when nothing can be there to remove
-               //and the right insertion point for new links has been found
-               else if ((record->Ysp() < _low->GetY()))
-                  break;
-               else
-                  _BI++;
-            }
-         }
-         else
-         {
-            _BI.tohead();
-            while (!_BI.hitroot())
-            {
-                  Record* record=_BI.item();
-                  //because the beam is sorted on ysp, stop when
-                  //the right insertion point for new links has been found
-                  if ((record->Ysp() < _low->GetY()))
-                     break;
-                  _BI++;
-            }
-         }
-      }
-      break;
-
-      default: 
-         break; 
-   }
-
-	return foundnew;
-}
-/*
-bool ScanBeam::RemoveOld(SCANTYPE scantype,TDLI<KBoolLink>* _I, bool& holes )
-{
-	bool found = false;
-	bool foundnew = false;
-   DL_Iter<Record*>  _BBI=DL_Iter<Record*>();
-	bool attached=false;
-
-   _low = _I->item()->GetBeginNode();
-
-   switch(scantype)
-   {
-      case INOUT:
-      case GENLR:
-      case LINKHOLES:
-      if (_type==NORMAL )
-      {
-         KBoolLink* link = _low->GetBinHighest(true);
-         if ( link ) //is there something to remove
-         {
-            link->SetRecordNode( NULL );
-
-            if ( scantype == LINKHOLES )
-            {
-               _BI.tohead();
-               while (!_BI.hitroot())
-               {
-                  Record* record = _BI.item();
-                  //records containing links towards the new low node
-                  //are links to be removed
-                  if ((record->GetLink()->GetEndNode() == _low) ||
-                      (record->GetLink()->GetBeginNode() == _low)
-                     )
-                  {
-                     holes = ProcessHoles(false,_I) || holes;
-                  }
-                  _BI++;
-               }
-            }
-
-            _BI.tohead();
-            while (!_BI.hitroot())
-            {
-               Record* record=_BI.item();
-               //records containing links towards the new low node
-               //are links to be removed
-               if ((record->GetLink()->GetEndNode() == _low) ||
-                   (record->GetLink()->GetBeginNode() == _low)
-                  )
-               {
-                  delete _BI.item();
-                  _BI.remove();
-                  found=true;
-               }
-               else if (found) //only once in here
-               {
-                  attached=true;
-                  found=false;
-                  //recalculate ysp for the new scanline
-                  record->Calc_Ysp(_low);
-                  _BI++;
-               }
-               else
-               {
-                  //recalculate ysp for the new scanline
-                  record->Calc_Ysp(_low);
-                  _BI++;
-               }
-            }
-         }
-         else
-         {
-            _BI.tohead();
-            while (!_BI.hitroot())
-            {
-                  Record* record=_BI.item();
-                  record->Calc_Ysp(_low);
-                  _BI++;
-            }
-         }
-      }
-      else
-      {  //because the previous beam was flat the links to remove are
-         //below the last insert position
-         KBoolLink* link;
-         link = _low->GetBinHighest(true);
-         if( link  )//is there something to remove
-         {
-            link->SetRecordNode( NULL );
-
-            bool linkf = false;
-            _BI.tohead();
-            while (!_BI.hitroot())
-            {
-               Record* record = _BI.item();
-               if (record->GetLink() == link) 
-                  linkf = true;
-               _BI++;
-            }
-
-            if ( !linkf )
-               _BI.tohead();
-
-
-            if ( scantype == LINKHOLES )
-            {
-               _BI.tohead();
-               while (!_BI.hitroot())
-               {
-                  Record* record=_BI.item();
-                  //records containing links towards the new low node
-                  //are links to be removed
-                  if ((record->GetLink()->GetEndNode() == _low) ||
-                      (record->GetLink()->GetBeginNode() == _low)
-                     )
-                  {
-                     holes = ProcessHoles(false,_I) || holes;
-                  }
-                  _BI++;
-               }
-            }
-
-            //_BI.tonode( link->GetRecordNode() );
-            //delete _BI.item();
-            //_BI.remove();
-
-            //on record back bring us to the last inserted record
-            //or if nothing was inserted the record before the last deleted record
-            //if there was no record before the last deleted record this means
-            //we where at the beginning of the beam, so at root
-
-            //_BI << (lastinserted+1);
-            //_BI--;
-            //if (_BI.hitroot())  //only possible when at the begin of the beam
-
-            //found=false;
-
-            _BI.tohead();
-            while (!_BI.hitroot())
-            {
-               Record* record=_BI.item();
-               //records containing links towards the new low node
-               //are links to be removed
-               if ((record->GetLink()->GetEndNode() == _low) ||
-                   (record->GetLink()->GetBeginNode() == _low)
-                  )
-               {
-                  if ( link != record->GetLink() )
-                  {
-                     break;
-                  }
-                  if ( link->GetRecordNode() != _BI.node() )
-                  {
-                     delete _BI.item();
-                     _BI.remove();
-                  }
-                  else
-                  {
-                     delete _BI.item();
-                     _BI.remove();
-                  }
-                  found=true;
-               }
-               else if (found) //only once in here
-                  break;
-               else if (record->Ysp() < _low->GetY())
-                     //if flatlinks are not in the beam nothing will be found
-                     //this will bring us to the right insertion point
-                     break;
-               else
-                  _BI++;
-            }
-
-         }
-
-         else
-         {
-
-            //on record back bring us to the last inserted record
-            //or if nothing was inserted the record before the last deleted record
-            //if there was no record before the last deleted record this means
-            //we where at the beginning of the beam, so at root
-
-            //_BI << (lastinserted+ 1);
-            //_BI--;
-            //if (_BI.hitroot())  //only possible when at the begin of the beam
-               _BI.tohead();
-            while (!_BI.hitroot())
-            {
-                  Record* record=_BI.item();
-                  if (record->Ysp() < _low->GetY())
-                     break;
-                  _BI++;
-            }
-
-         }
-      }
-      break;
-
-      case NODELINK:
-      case LINKLINK:
-      {
-         if (_type == NORMAL)
-         {
-            Calc_Ysp();
-            if (scantype==LINKLINK)
-               foundnew = Process_LinkToLink_Crossings() !=0 || foundnew;
-            else
-               SortTheBeam( false );
-         }
-         //else beam is already sorted because the added/removed flat links
-         //do not change the ysp of links already there, new non flat links
-         //are inserted in order, as result the beam stays sorted
-
-         if (_low->GetBinHighest(true)) //is there something to remove
-         {
-            _BI.tohead();
-            while (!_BI.hitroot())
-            {
-               Record* record=_BI.item();
-               //records containing links towards the new low node
-               //are links to be removed
-               if ((record->GetLink()->GetEndNode() == _low) ||
-                   (record->GetLink()->GetBeginNode() == _low)
-                  )
-               {
-                  KBoolLine* line=record->GetLine();
-                  if (scantype==NODELINK)
-   	               foundnew = Process_PointToLink_Crossings() !=0 || foundnew;
-                  line->ProcessCrossings(_I);
-                  delete _BI.item();
-                  _BI.remove();
-                  found=true;
-               }
-               //because the beam is sorted on ysp, stop when nothing can be there to remove
-               //and the right insertion point for new links has been found
-               else if ((record->Ysp() < _low->GetY()))
-                  break;
-               else
-                  _BI++;
-            }
-         }
-         else
-         {
-            _BI.tohead();
-            while (!_BI.hitroot())
-            {
-                  Record* record=_BI.item();
-                  //because the beam is sorted on ysp, stop when
-                  //the right insertion point for new links has been found
-                  if ((record->Ysp() < _low->GetY()))
-                     break;
-                  _BI++;
-            }
-         }
-      }
-      break;
-
-      default: 
-         break; 
-   }
-
-	return foundnew;
-}
-*/
-
-void ScanBeam::SortTheBeam( bool backangle )
-{
-   if ( backangle )
-      _BI.mergesort( recordsorter_ysp_angle_back );
-   else
-	   _BI.mergesort( recordsorter_ysp_angle );
-}
-
-void	ScanBeam::Calc_Ysp()
-{
-	_BI.tohead();
-	while (!_BI.hitroot())
-	{
-		Record* record=_BI.item();
-//		KBoolLink* link=_BI.item()->GetLink();
-      record->Calc_Ysp(_low);
-		_BI++;
-	}
-}
-
-// this function will set for all the records which contain a link with the
-// corresponding graphnumber the inc flag.
-// The inc flag's function is to see in a beam if we go deeper in the graph or not
-void ScanBeam::Generate_INOUT(int graphnumber)
-{
-	DIRECTION first_dir = GO_LEFT;
-	int diepte          = 0;
-
-   DL_Iter<Record*> _BBI = DL_Iter<Record*>();
-   _BBI.Attach(this);
-	for( _BBI.tohead(); !_BBI.hitroot(); _BBI++ )
-	{
-   	// recalculate _inc again
-		if ( _BBI.item()->GetLink()->GetGraphNum()==graphnumber)
-		{	//found a link that belongs to the graph
-			if (diepte==0)
-			{	// first link found or at depth zero again
-            // the direction is important since this is used to find out
-            // if we go further in or out for coming links
-				first_dir=_BBI.item()->Direction();
-				_BBI.item()->GetLink()->SetInc(true);
-				diepte=1;
-			}
-			else
-			{	// according to depth=1 links set depth
-				// verhoog of verlaag diepte
-				if (_BBI.item()->Direction() == first_dir)
-				{
-					diepte++;
-					_BBI.item()->GetLink()->SetInc(true);
-				}
-				else
-				{
-					diepte--;
-					_BBI.item()->GetLink()->SetInc(false);
-				}
-			}
-		}
-		if ( _BBI.item() == _BI.item()) break; //not need to do the rest, will come in a later beam
-	}
-   _BBI.Detach();
-}
-
-
-// function ProcessHoles
-//
-// this function will search the closest link to a hole
-// step one, search for a link that is marked (this is a hole)
-// step two, this is tricky, the closest link is the previous link in
-//				 the beam, but only in the beam that contains the highest node
-//				 from the marked link.
-//				 why ? : if the marked link has for the begin and end node different
-//				 x,y values, see below as link C
-//                                 B
-//               A            +---------+
-//          +----------+
-//				                 ___--+
-//		                ___---
-//	               +---    C
-//
-//				 when we at first detect link C we would link it to link A, should work he
-//				 but; we always link a hole at its topleft node, so the highest node
-//				 and then we can't link to A but we should link to B
-//				 so when we found the link, we will look if the node that will come
-//				 in a later beam will be higher than the current, if so we will wait
-//				 till that node comes around otherwise we will link this node to the
-//				 closest link (prev in beam)
-bool ScanBeam::ProcessHoles( bool atinsert, TDLI<KBoolLink>* _LI )
-{
-	// The scanbeam must already be sorted at this moment
-   Node *topnode;
-   bool foundholes = false;
-
-   Record* record = _BI.item();
-   KBoolLink* link = record->GetLink();
-
-   if (!record->GetLine()->CrossListEmpty())
-   {
-      SortTheBeam( atinsert );
-
-      // link the holes in the graph to a link above.
-      // a the link where the linecrosslist is not empty, means that
-      //	there are links which refer to this link (must be linked to this link)
-      //	make new nodes and links and set them, re-use the old link, so the links
-      //	that still stand in the linecrosslist will not be lost.
-      // There is a hole that must be linked to this link !
-      TDLI<Node> I(record->GetLine()->GetCrossList());
-      I.tohead();
-      while(!I.hitroot())
-      {
-         topnode = I.item();
-         I.remove();
-
-         KBoolLine line(_GC);
-         line.Set(link);
-
-         B_INT Y = line.Calculate_Y(topnode->GetX());
-
-         // Now we'll create new nodes and new links to make the link between
-         // the graphs.
-
-         //holes are always linked in a non hole or hole
-         //for a non hole this link will be to the right
-         //because non holes are right around
-         //for holes this will be to the right also,
-         //because they are left around but the link is always on the
-         //bottom of the hole
-
-         //			 linkA                      linkD
-         //	  o-------->--------NodeA------->------------o
-         //							  |  |
-         //							  |  |
-         //					 linkB  v  ^ linkBB
-         //							  |  |
-         //							  |  |
-         //		 outgoing*       |  |          incoming*
-         //	  o------<---------topnode--------<----------o
-         //
-         // all holes are oriented left around
-
-
-         Node * leftnode; //left node of clossest link
-         (link->GetBeginNode()->GetX() < link->GetEndNode()->GetX()) ?
-               leftnode = link->GetBeginNode():
-               leftnode = link->GetEndNode();
-
-         Node *node_A = new Node(topnode->GetX(),Y, _GC);
-         KBoolLink *link_A = new KBoolLink(0, leftnode, node_A, _GC);
-         KBoolLink *link_B = new KBoolLink(0, node_A, topnode, _GC);
-         KBoolLink *link_BB = new KBoolLink(0, topnode, node_A, _GC);
-         KBoolLink *link_D = _BI.item()->GetLink();
-         link_D->Replace(leftnode,node_A);
-         _LI->insbegin(link_A);
-         _LI->insbegin(link_B);
-         _LI->insbegin(link_BB);
-
-         //mark those two segments as hole linking segments
-         link_B->SetHoleLink(true);
-         link_BB->SetHoleLink(true);
-
-         //is where we come from/link to a hole
-         bool closest_is_hole = link->GetHole();
-
-         // if the polygon linked to, is a hole, this hole here
-         // just gets bigger, so we take over the links its hole marking.
-         link_A->SetHole(closest_is_hole);
-         link_B->SetHole(closest_is_hole);
-         link_BB->SetHole(closest_is_hole);
-
-         // we have only one operation at the time, taking
-         // over the operation flags is enough, since the linking segments will
-         // be part of that output for any operation done.
-         link_A->TakeOverOperationFlags( link );
-         link_B->TakeOverOperationFlags( link );
-         link_BB->TakeOverOperationFlags( link );
-      }
-   }
-
-   if (link->IsTopHole() )
-   {
-      SortTheBeam( atinsert );
-      writebeam();
-   }      
-      
-   if (link->IsTopHole() && !_BI.athead() )
-   {
-     	 // now we check if this hole should now be linked, or later
-   	 // we always link on the node with the maximum y value, Why ? because i like it !
-   	 // to link we put the node of the hole into the crosslist of the closest link !
-
-       assert( record->Direction() == GO_LEFT );
-       // he goes to the left
-       if (atinsert)
-       {
-          if ( link->GetBeginNode()->GetY() <= link->GetEndNode()->GetY() )
-          {
-            topnode = link->GetEndNode();
-            //the previous link in the scanbeam == the closest link to the hole in vertical
-            //direction PUT this node into this link
-            _BI--;
-            _BI.item()->GetLine()->AddCrossing(topnode);
-            _BI++;
-            //reset tophole flag, hole has been processed
-            link->SetTopHole(false);
-            foundholes = true;
-          }
-       }
-       else  //remove stage of links from te beam
-       {
-         //the tophole link was NOT linked at the insert stage, so it most be linked now
-         topnode = _BI.item()->GetLink()->GetBeginNode();
-         //the previous link in the scanbeam == the closest link to the hole in vertical
-         //direction PUT this node into this link
-         _BI--;
-         _BI.item()->GetLine()->AddCrossing(topnode);
-         _BI++;
-         //reset mark to flag that this hole has been processed
-         link->SetTopHole(false);
-         foundholes = true;
-       }
-   }
-   return foundholes;
-}
-
-//sort the records on Ysp if eqaul, sort on tangent at ysp
-int recordsorter_ysp_angle(Record* rec1, Record* rec2)
-{
-	if (rec1->Ysp() > rec2->Ysp() )
-		return(1);
-	if (rec1->Ysp() < rec2->Ysp() )
-		return(-1);
-	//it seems they are equal
-   B_INT rightY1;
-   if (rec1->Direction()==GO_LEFT)
-      rightY1 = rec1->GetLink()->GetBeginNode()->GetY();
-   else
-      rightY1 = rec1->GetLink()->GetEndNode()->GetY();
-   B_INT rightY2;
-   if (rec2->Direction()==GO_LEFT)
-      rightY2 = rec2->GetLink()->GetBeginNode()->GetY();
-   else
-      rightY2 = rec2->GetLink()->GetEndNode()->GetY();
-
-   if ( rightY1 > rightY2 )
-		return(1);
-   if ( rightY1 < rightY2 )
-     return(-1);
-   return(0);
-}
-
-//sort the records on Ysp if eqaul, sort on tangent at ysp
-int recordsorter_ysp_angle_back(Record* rec1, Record* rec2)
-{
-	if (rec1->Ysp() > rec2->Ysp() )
-		return(1);
-	if (rec1->Ysp() < rec2->Ysp() )
-		return(-1);
-	//it seems they are equal
-   B_INT leftY1;
-   if ( rec1->Direction() == GO_RIGHT )
-      leftY1 = rec1->GetLink()->GetBeginNode()->GetY();
-   else
-      leftY1 = rec1->GetLink()->GetEndNode()->GetY();
-   B_INT leftY2;
-   if ( rec2->Direction() == GO_RIGHT )
-      leftY2 = rec2->GetLink()->GetBeginNode()->GetY();
-   else
-      leftY2 = rec2->GetLink()->GetEndNode()->GetY();
-
-   if ( leftY1 > leftY2 )
-		return(1);
-   if ( leftY1 < leftY2 )
-     return(-1);
-   return(0);
-}
-
-// swap functie for cocktailsort ==> each swap means an intersection of links
-bool swap_crossing_normal(Record *a, Record *b)
-{
-	if (!a->Equal(b)) // records NOT parallel
-   {
-		a->GetLine()->Intersect_simple( b->GetLine() );
-      return true;
-   }
-   return false;
-}
-
-int ScanBeam::Process_LinkToLink_Crossings()
-{
-	// sort on y value of next intersection; and find the intersections
-	return _BI.cocktailsort( recordsorter_ysp_angle_back, swap_crossing_normal );
-}
-
-//catch node to link crossings
-// must be sorted on ysp
-int ScanBeam::Process_PointToLink_Crossings()
-{
-	int merges = 0;
-	Record* record;
-
-	if (_BI.count() > 1)
-	{
-	   DL_Iter<Record*> IL = DL_Iter<Record*>(this);
-	   IL.toiter(&_BI);
-
-		//from IL search back for close links
-		IL--;
-		while(!IL.hitroot())
-		{
-			record=IL.item();
-
-			if (record->Ysp() > _low->GetY()+ _GC->GetInternalMarge())
-				break;
-
-			// the distance to the lo/hi node is smaller then the _GC->GetInternalMarge()
-			if( (record->GetLink()->GetBeginNode()!= _low) &&
-				 (record->GetLink()->GetEndNode()  != _low)
-			  )
-			{  // the link is not towards the lohi node
-				record->GetLine()->AddCrossing(_low);
-				merges++;
-			}
-			IL--;
-		}
-
-		//from IL search forward for close links
-		IL.toiter(&_BI);
-		IL++;
-		while(!IL.hitroot())
-		{
-			record=IL.item();
-
-			if (record->Ysp() < _low->GetY()- _GC->GetInternalMarge())
-				break;
-
-			// the distance to the lohi node is smaller then the booleng->Get_Marge()
-			if( (record->GetLink()->GetBeginNode()!=_low) &&
-				 (record->GetLink()->GetEndNode()  !=_low)
-			  )
-			{  // the link is not towards the low node
-				record->GetLine()->AddCrossing(_low);
-				merges++;
-			}
-			IL++;
-		}
-
-	}
-
-	return merges;
-}
-
-int ScanBeam::Process_LinkToLink_Flat(KBoolLine* flatline)
-{
-	int crossfound = 0;
-	Record* record;
-   DL_Iter<Record*> _BBI = DL_Iter<Record*>();
-   _BBI.Attach(this);
-   _BBI.toiter(&_BI);
-
-		for(_BI.tohead(); !_BI.hitroot(); _BI++)
-		{
-			record=_BI.item();
-
-			if (record->Ysp() < (flatline->GetLink()->GetLowNode()->GetY() - _GC->GetInternalMarge()))
-				break;//they are sorted so no other can be there
-
-			if ((record->Ysp() > (flatline->GetLink()->GetLowNode()->GetY() - _GC->GetInternalMarge()))
-				  &&
-				 (record->Ysp() < (flatline->GetLink()->GetHighNode()->GetY() + _GC->GetInternalMarge()))
-				)
-			{ //it is in between the flat link region
-			  //create a new node at ysp and insert it in both the flatlink and the crossing link
-
-				if (
-						(record->GetLink()->GetEndNode()  != flatline->GetLink()->GetHighNode()) &&
-						(record->GetLink()->GetEndNode()  != flatline->GetLink()->GetLowNode() ) &&
-						(record->GetLink()->GetBeginNode()!= flatline->GetLink()->GetHighNode()) &&
-						(record->GetLink()->GetBeginNode()!= flatline->GetLink()->GetLowNode() )
-					)
-				{
-				  Node *newnode = new Node(_low->GetX(),_BI.item()->Ysp(), _GC);
-				  flatline->AddCrossing(newnode);
-				  record->GetLine()->AddCrossing(newnode);
-				  crossfound++;
-				}
-			}
-		}
-
-   _BI.toiter(&_BBI);
-   _BBI.Detach();
-	return crossfound;
-}
-
-bool ScanBeam::checksort()
-{
-	// if empty then just insert
-	if (empty())
-		return true;
-
-   // put new item left of the one that is bigger
-   _BI.tohead();
-   Record* prev=_BI.item();
-   _BI++;
-   while(!_BI.hitroot())
-   {
-	   Record* curr=_BI.item();
-      if (recordsorter_ysp_angle(prev,curr)==-1)
-      {
-         recordsorter_ysp_angle(prev,curr);
-         return false;
-      }
-      prev=_BI.item();
-      _BI++;
-   }
-   return true;
-}
-
-bool ScanBeam::writebeam()
-{
-#if KBOOL_DEBUG == 1
-   FILE* file = _GC->GetLogFile();
-
-   if (file == NULL)
-       return true;
-
-	fprintf( file, "# beam %d \n", count() );
-   fprintf( file, " low %I64d %I64d \n", _low->GetX() , _low->GetY() );
-   fprintf( file, " type %d \n", _type );
-
-	if (empty())
-   {  
-      fprintf( file, "             empty \n" );
-		return true;
-   }
-
-   DL_Iter<Record*> _BI( this );
-
-   // put new item left of the one that is bigger
-   _BI.tohead();
-   while(!_BI.hitroot())
-   {
-	   Record* cur=_BI.item();
-
-      fprintf( file, " ysp %I64d \n", cur->Ysp() );
-
-      KBoolLink* curl=cur->GetLink();
-
-	   fprintf( file, "             linkbegin %I64d %I64d \n", curl->GetBeginNode()->GetX(), curl->GetBeginNode()->GetY() );
-	   fprintf( file, "             linkend %I64d %I64d \n", curl->GetEndNode()->GetX(), curl->GetEndNode()->GetY() );
-
-      _BI++;
-   }
-#endif
-
-   return true;
-}
diff --git a/src/ossim/matrix/.cvsignore b/src/ossim/matrix/.cvsignore
deleted file mode 100644
index a438335..0000000
--- a/src/ossim/matrix/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.d
diff --git a/src/ossim/matrix/newmat4.cpp b/src/ossim/matrix/newmat4.cpp
deleted file mode 100644
index 38f8c94..0000000
--- a/src/ossim/matrix/newmat4.cpp
+++ /dev/null
@@ -1,1027 +0,0 @@
-//$$ newmat4.cpp       Constructors, ReSize, basic utilities
-
-// Copyright (C) 1991,2,3,4,8,9: R B Davies
-
-#include <ossim/matrix/include.h>
-
-#include <ossim/matrix/newmat.h>
-#include <ossim/matrix/newmatrc.h>
-
-#ifdef use_namespace
-namespace NEWMAT {
-#endif
-
-
-
-#ifdef DO_REPORT
-#define REPORT { static ExeCounter ExeCount(__LINE__,4); ++ExeCount; }
-#else
-#define REPORT {}
-#endif
-
-
-#define DO_SEARCH                   // search for LHS of = in RHS
-
-// ************************* general utilities *************************/
-
-static int tristore(int n)                    // elements in triangular matrix
-{ return (n*(n+1))/2; }
-
-
-// **************************** constructors ***************************/
-
-GeneralMatrix::GeneralMatrix()
-{ store=0; storage=0; nrows=0; ncols=0; tag=-1; }
-
-GeneralMatrix::GeneralMatrix(ArrayLengthSpecifier s)
-{
-   REPORT
-   storage=s.Value(); tag=-1;
-   if (storage)
-   {
-      store = new Real [storage]; MatrixErrorNoSpace(store);
-      MONITOR_REAL_NEW("Make (GenMatrix)",storage,store)
-   }
-   else store = 0;
-}
-
-Matrix::Matrix(int m, int n) : GeneralMatrix(m*n)
-{ REPORT nrows=m; ncols=n; }
-
-SquareMatrix::SquareMatrix(ArrayLengthSpecifier n)
-   : Matrix(n.Value(),n.Value())
-{ REPORT }
-
-SymmetricMatrix::SymmetricMatrix(ArrayLengthSpecifier n)
-   : GeneralMatrix(tristore(n.Value()))
-{ REPORT nrows=n.Value(); ncols=n.Value(); }
-
-UpperTriangularMatrix::UpperTriangularMatrix(ArrayLengthSpecifier n)
-   : GeneralMatrix(tristore(n.Value()))
-{ REPORT nrows=n.Value(); ncols=n.Value(); }
-
-LowerTriangularMatrix::LowerTriangularMatrix(ArrayLengthSpecifier n)
-   : GeneralMatrix(tristore(n.Value()))
-{ REPORT nrows=n.Value(); ncols=n.Value(); }
-
-DiagonalMatrix::DiagonalMatrix(ArrayLengthSpecifier m) : GeneralMatrix(m)
-{ REPORT nrows=m.Value(); ncols=m.Value(); }
-
-Matrix::Matrix(const BaseMatrix& M)
-{
-   REPORT // CheckConversion(M);
-   // MatrixConversionCheck mcc;
-   GeneralMatrix* gmx=((BaseMatrix&)M).Evaluate(MatrixType::Rt);
-   GetMatrix(gmx);
-}
-
-SquareMatrix::SquareMatrix(const BaseMatrix& M) : Matrix(M)
-{
-   REPORT
-   if (ncols != nrows)
-   {
-      Tracer tr("SquareMatrix");
-      Throw(NotSquareException(*this));
-   }
-}
-
-
-SquareMatrix::SquareMatrix(const Matrix& gm)
-{
-   REPORT
-   if (gm.ncols != gm.nrows)
-   {
-      Tracer tr("SquareMatrix(Matrix)");
-      Throw(NotSquareException(gm));
-   }
-   GetMatrix(&gm);
-}
-
-
-RowVector::RowVector(const BaseMatrix& M) : Matrix(M)
-{
-   REPORT
-   if (nrows!=1)
-   {
-      Tracer tr("RowVector");
-      Throw(VectorException(*this));
-   }
-}
-
-ColumnVector::ColumnVector(const BaseMatrix& M) : Matrix(M)
-{
-   REPORT
-   if (ncols!=1)
-   {
-      Tracer tr("ColumnVector");
-      Throw(VectorException(*this));
-   }
-}
-
-SymmetricMatrix::SymmetricMatrix(const BaseMatrix& M)
-{
-   REPORT  // CheckConversion(M);
-   // MatrixConversionCheck mcc;
-   GeneralMatrix* gmx=((BaseMatrix&)M).Evaluate(MatrixType::Sm);
-   GetMatrix(gmx);
-}
-
-UpperTriangularMatrix::UpperTriangularMatrix(const BaseMatrix& M)
-{
-   REPORT // CheckConversion(M);
-   // MatrixConversionCheck mcc;
-   GeneralMatrix* gmx=((BaseMatrix&)M).Evaluate(MatrixType::UT);
-   GetMatrix(gmx);
-}
-
-LowerTriangularMatrix::LowerTriangularMatrix(const BaseMatrix& M)
-{
-   REPORT // CheckConversion(M);
-   // MatrixConversionCheck mcc;
-   GeneralMatrix* gmx=((BaseMatrix&)M).Evaluate(MatrixType::LT);
-   GetMatrix(gmx);
-}
-
-DiagonalMatrix::DiagonalMatrix(const BaseMatrix& M)
-{
-   REPORT //CheckConversion(M);
-   // MatrixConversionCheck mcc;
-   GeneralMatrix* gmx=((BaseMatrix&)M).Evaluate(MatrixType::Dg);
-   GetMatrix(gmx);
-}
-
-IdentityMatrix::IdentityMatrix(const BaseMatrix& M)
-{
-   REPORT //CheckConversion(M);
-   // MatrixConversionCheck mcc;
-   GeneralMatrix* gmx=((BaseMatrix&)M).Evaluate(MatrixType::Id);
-   GetMatrix(gmx);
-}
-
-GeneralMatrix::~GeneralMatrix()
-{
-   if (store)
-   {
-      MONITOR_REAL_DELETE("Free (GenMatrix)",storage,store)
-      delete [] store;
-   }
-}
-
-CroutMatrix::CroutMatrix(const BaseMatrix& m)
-{
-   REPORT
-   Tracer tr("CroutMatrix");
-   indx = 0;                     // in case of exception at next line
-   GeneralMatrix* gm = ((BaseMatrix&)m).Evaluate(MatrixType::Rt);
-   GetMatrix(gm);
-   if (nrows!=ncols) { CleanUp(); Throw(NotSquareException(*gm)); }
-   d=true; sing=false;
-   indx=new int [nrows]; MatrixErrorNoSpace(indx);
-   MONITOR_INT_NEW("Index (CroutMat)",nrows,indx)
-   ludcmp();
-}
-
-CroutMatrix::~CroutMatrix()
-{
-   MONITOR_INT_DELETE("Index (CroutMat)",nrows,indx)
-   delete [] indx;
-}
-
-//ReturnMatrix::ReturnMatrix(GeneralMatrix& gmx)
-//{
-//   REPORT
-//   gm = gmx.Image(); gm->ReleaseAndDelete();
-//}
-
-
-GeneralMatrix::operator ReturnMatrix() const
-{
-   REPORT
-   GeneralMatrix* gm = Image(); gm->ReleaseAndDelete();
-   return ReturnMatrix(gm);
-}
-
-
-
-ReturnMatrix GeneralMatrix::ForReturn() const
-{
-   REPORT
-   GeneralMatrix* gm = Image(); gm->ReleaseAndDelete();
-   return ReturnMatrix(gm);
-}
-
-
-// ************************** ReSize matrices ***************************/
-
-void GeneralMatrix::ReSize(int nr, int nc, int s)
-{
-   REPORT
-   if (store)
-   {
-      MONITOR_REAL_DELETE("Free (ReDimensi)",storage,store)
-      delete [] store;
-   }
-   storage=s; nrows=nr; ncols=nc; tag=-1;
-   if (s)
-   {
-      store = new Real [storage]; MatrixErrorNoSpace(store);
-      MONITOR_REAL_NEW("Make (ReDimensi)",storage,store)
-   }
-   else store = 0;
-}
-
-void Matrix::ReSize(int nr, int nc)
-{ REPORT GeneralMatrix::ReSize(nr,nc,nr*nc); }
-
-void SquareMatrix::ReSize(int n)
-{ REPORT GeneralMatrix::ReSize(n,n,n*n); }
-
-void SquareMatrix::ReSize(int nr, int nc)
-{
-   REPORT
-   Tracer tr("SquareMatrix::ReSize");
-   if (nc != nr) Throw(NotSquareException(*this));
-   GeneralMatrix::ReSize(nr,nc,nr*nc);
-}
-
-void SymmetricMatrix::ReSize(int nr)
-{ REPORT GeneralMatrix::ReSize(nr,nr,tristore(nr)); }
-
-void UpperTriangularMatrix::ReSize(int nr)
-{ REPORT GeneralMatrix::ReSize(nr,nr,tristore(nr)); }
-
-void LowerTriangularMatrix::ReSize(int nr)
-{ REPORT GeneralMatrix::ReSize(nr,nr,tristore(nr)); }
-
-void DiagonalMatrix::ReSize(int nr)
-{ REPORT GeneralMatrix::ReSize(nr,nr,nr); }
-
-void RowVector::ReSize(int nc)
-{ REPORT GeneralMatrix::ReSize(1,nc,nc); }
-
-void ColumnVector::ReSize(int nr)
-{ REPORT GeneralMatrix::ReSize(nr,1,nr); }
-
-void RowVector::ReSize(int nr, int nc)
-{
-   Tracer tr("RowVector::ReSize");
-   if (nr != 1) Throw(VectorException(*this));
-   REPORT GeneralMatrix::ReSize(1,nc,nc);
-}
-
-void ColumnVector::ReSize(int nr, int nc)
-{
-   Tracer tr("ColumnVector::ReSize");
-   if (nc != 1) Throw(VectorException(*this));
-   REPORT GeneralMatrix::ReSize(nr,1,nr);
-}
-
-void IdentityMatrix::ReSize(int nr)
-{ REPORT GeneralMatrix::ReSize(nr,nr,1); *store = 1; }
-
-
-void Matrix::ReSize(const GeneralMatrix& A)
-{ REPORT  ReSize(A.Nrows(), A.Ncols()); }
-
-void SquareMatrix::ReSize(const GeneralMatrix& A)
-{
-   REPORT
-   int n = A.Nrows();
-   if (n != A.Ncols())
-   {
-      Tracer tr("SquareMatrix::ReSize(GM)");
-      Throw(NotSquareException(*this));
-   }
-   ReSize(n);
-}
-
-void nricMatrix::ReSize(const GeneralMatrix& A)
-{ REPORT  ReSize(A.Nrows(), A.Ncols()); }
-
-void ColumnVector::ReSize(const GeneralMatrix& A)
-{ REPORT  ReSize(A.Nrows(), A.Ncols()); }
-
-void RowVector::ReSize(const GeneralMatrix& A)
-{ REPORT  ReSize(A.Nrows(), A.Ncols()); }
-
-void SymmetricMatrix::ReSize(const GeneralMatrix& A)
-{
-   REPORT
-   int n = A.Nrows();
-   if (n != A.Ncols())
-   {
-      Tracer tr("SymmetricMatrix::ReSize(GM)");
-      Throw(NotSquareException(*this));
-   }
-   ReSize(n);
-}
-
-void DiagonalMatrix::ReSize(const GeneralMatrix& A)
-{
-   REPORT
-   int n = A.Nrows();
-   if (n != A.Ncols())
-   {
-      Tracer tr("DiagonalMatrix::ReSize(GM)");
-      Throw(NotSquareException(*this));
-   }
-   ReSize(n);
-}
-
-void UpperTriangularMatrix::ReSize(const GeneralMatrix& A)
-{
-   REPORT
-   int n = A.Nrows();
-   if (n != A.Ncols())
-   {
-      Tracer tr("UpperTriangularMatrix::ReSize(GM)");
-      Throw(NotSquareException(*this));
-   }
-   ReSize(n);
-}
-
-void LowerTriangularMatrix::ReSize(const GeneralMatrix& A)
-{
-   REPORT
-   int n = A.Nrows();
-   if (n != A.Ncols())
-   {
-      Tracer tr("LowerTriangularMatrix::ReSize(GM)");
-      Throw(NotSquareException(*this));
-   }
-   ReSize(n);
-}
-
-void IdentityMatrix::ReSize(const GeneralMatrix& A)
-{
-   REPORT
-   int n = A.Nrows();
-   if (n != A.Ncols())
-   {
-      Tracer tr("IdentityMatrix::ReSize(GM)");
-      Throw(NotSquareException(*this));
-   }
-   ReSize(n);
-}
-
-void GeneralMatrix::ReSize(const GeneralMatrix&)
-{
-   REPORT
-   Tracer tr("GeneralMatrix::ReSize(GM)");
-   Throw(NotDefinedException("ReSize", "this type of matrix"));
-}
-
-void GeneralMatrix::ReSizeForAdd(const GeneralMatrix& A, const GeneralMatrix&)
-{ REPORT ReSize(A); }
-
-void GeneralMatrix::ReSizeForSP(const GeneralMatrix& A, const GeneralMatrix&)
-{ REPORT ReSize(A); }
-
-
-// ************************* SameStorageType ******************************/
-
-// SameStorageType checks A and B have same storage type including bandwidth
-// It does not check same dimensions since we assume this is already done
-
-bool GeneralMatrix::SameStorageType(const GeneralMatrix& A) const
-{
-   REPORT
-   return Type() == A.Type();
-}
-
-
-// ******************* manipulate types, storage **************************/
-
-int GeneralMatrix::search(const BaseMatrix* s) const
-{ REPORT return (s==this) ? 1 : 0; }
-
-int GenericMatrix::search(const BaseMatrix* s) const
-{ REPORT return gm->search(s); }
-
-int MultipliedMatrix::search(const BaseMatrix* s) const
-{ REPORT return bm1->search(s) + bm2->search(s); }
-
-int ShiftedMatrix::search(const BaseMatrix* s) const
-{ REPORT return bm->search(s); }
-
-int NegatedMatrix::search(const BaseMatrix* s) const
-{ REPORT return bm->search(s); }
-
-int ReturnMatrix::search(const BaseMatrix* s) const
-{ REPORT return (s==gm) ? 1 : 0; }
-
-MatrixType Matrix::Type() const { return MatrixType::Rt; }
-MatrixType SquareMatrix::Type() const { return MatrixType::Sq; }
-MatrixType SymmetricMatrix::Type() const { return MatrixType::Sm; }
-MatrixType UpperTriangularMatrix::Type() const { return MatrixType::UT; }
-MatrixType LowerTriangularMatrix::Type() const { return MatrixType::LT; }
-MatrixType DiagonalMatrix::Type() const { return MatrixType::Dg; }
-MatrixType RowVector::Type() const { return MatrixType::RV; }
-MatrixType ColumnVector::Type() const { return MatrixType::CV; }
-MatrixType CroutMatrix::Type() const { return MatrixType::Ct; }
-MatrixType BandMatrix::Type() const { return MatrixType::BM; }
-MatrixType UpperBandMatrix::Type() const { return MatrixType::UB; }
-MatrixType LowerBandMatrix::Type() const { return MatrixType::LB; }
-MatrixType SymmetricBandMatrix::Type() const { return MatrixType::SB; }
-
-MatrixType IdentityMatrix::Type() const { return MatrixType::Id; }
-
-
-
-MatrixBandWidth BaseMatrix::BandWidth() const { REPORT return -1; }
-MatrixBandWidth DiagonalMatrix::BandWidth() const { REPORT return 0; }
-MatrixBandWidth IdentityMatrix::BandWidth() const { REPORT return 0; }
-
-MatrixBandWidth UpperTriangularMatrix::BandWidth() const
-   { REPORT return MatrixBandWidth(0,-1); }
-
-MatrixBandWidth LowerTriangularMatrix::BandWidth() const
-   { REPORT return MatrixBandWidth(-1,0); }
-
-MatrixBandWidth BandMatrix::BandWidth() const
-   { REPORT return MatrixBandWidth(lower,upper); }
-
-MatrixBandWidth GenericMatrix::BandWidth()const
-   { REPORT return gm->BandWidth(); }
-
-MatrixBandWidth AddedMatrix::BandWidth() const
-   { REPORT return gm1->BandWidth() + gm2->BandWidth(); }
-
-MatrixBandWidth SPMatrix::BandWidth() const
-   { REPORT return gm1->BandWidth().minimum(gm2->BandWidth()); }
-
-MatrixBandWidth KPMatrix::BandWidth() const
-{
-   int lower, upper;
-   MatrixBandWidth bw1 = gm1->BandWidth(), bw2 = gm2->BandWidth();
-   if (bw1.Lower() < 0)
-   {
-      if (bw2.Lower() < 0) { REPORT lower = -1; }
-      else { REPORT lower = bw2.Lower() + (gm1->Nrows() - 1) * gm2->Nrows(); }
-   }
-   else
-   {
-      if (bw2.Lower() < 0)
-         { REPORT lower = (1 + bw1.Lower()) * gm2->Nrows() - 1; }
-      else { REPORT lower = bw2.Lower() + bw1.Lower() * gm2->Nrows(); }
-   }
-   if (bw1.Upper() < 0)
-   {
-      if (bw2.Upper() < 0) { REPORT upper = -1; }
-      else { REPORT upper = bw2.Upper() + (gm1->Nrows() - 1) * gm2->Nrows(); }
-   }
-   else
-   {
-      if (bw2.Upper() < 0)
-         { REPORT upper = (1 + bw1.Upper()) * gm2->Nrows() - 1; }
-      else { REPORT upper = bw2.Upper() + bw1.Upper() * gm2->Nrows(); }
-   }
-   return MatrixBandWidth(lower, upper);
-}
-
-MatrixBandWidth MultipliedMatrix::BandWidth() const
-{ REPORT return gm1->BandWidth() * gm2->BandWidth(); }
-
-MatrixBandWidth ConcatenatedMatrix::BandWidth() const { REPORT return -1; }
-
-MatrixBandWidth SolvedMatrix::BandWidth() const
-{
-   if (+gm1->Type() & MatrixType::Diagonal)
-      { REPORT return gm2->BandWidth(); }
-   else { REPORT return -1; }
-}
-
-MatrixBandWidth ScaledMatrix::BandWidth() const
-   { REPORT return gm->BandWidth(); }
-
-MatrixBandWidth NegatedMatrix::BandWidth() const
-   { REPORT return gm->BandWidth(); }
-
-MatrixBandWidth TransposedMatrix::BandWidth() const
-   { REPORT return gm->BandWidth().t(); }
-
-MatrixBandWidth InvertedMatrix::BandWidth() const
-{
-   if (+gm->Type() & MatrixType::Diagonal)
-      { REPORT return MatrixBandWidth(0,0); }
-   else { REPORT return -1; }
-}
-
-MatrixBandWidth RowedMatrix::BandWidth() const { REPORT return -1; }
-MatrixBandWidth ColedMatrix::BandWidth() const { REPORT return -1; }
-MatrixBandWidth DiagedMatrix::BandWidth() const { REPORT return 0; }
-MatrixBandWidth MatedMatrix::BandWidth() const { REPORT return -1; }
-MatrixBandWidth ReturnMatrix::BandWidth() const
-   { REPORT return gm->BandWidth(); }
-
-MatrixBandWidth GetSubMatrix::BandWidth() const
-{
-
-   if (row_skip==col_skip && row_number==col_number)
-      { REPORT return gm->BandWidth(); }
-   else { REPORT return MatrixBandWidth(-1); }
-}
-
-// ********************** the memory managment tools **********************/
-
-//  Rules regarding tDelete, reuse, GetStore, BorrowStore
-//    All matrices processed during expression evaluation must be subject
-//    to exactly one of reuse(), tDelete(), GetStore() or BorrowStore().
-//    If reuse returns true the matrix must be reused.
-//    GetMatrix(gm) always calls gm->GetStore()
-//    gm->Evaluate obeys rules
-//    bm->Evaluate obeys rules for matrices in bm structure
-
-void GeneralMatrix::tDelete()
-{
-   if (tag<0)
-   {
-      if (tag<-1) { REPORT store = 0; delete this; return; }  // borrowed
-      else { REPORT return; }   // not a temporary matrix - leave alone
-   }
-   if (tag==1)
-   {
-      if (store)
-      {
-         REPORT  MONITOR_REAL_DELETE("Free   (tDelete)",storage,store)
-         delete [] store;
-      }
-      MiniCleanUp(); return;                           // CleanUp
-   }
-   if (tag==0) { REPORT delete this; return; }
-
-   REPORT tag--; return;
-}
-
-static void BlockCopy(int n, Real* from, Real* to)
-{
-   REPORT
-   int i = (n >> 3);
-   while (i--)
-   {
-      *to++ = *from++; *to++ = *from++; *to++ = *from++; *to++ = *from++;
-      *to++ = *from++; *to++ = *from++; *to++ = *from++; *to++ = *from++;
-   }
-   i = n & 7; while (i--) *to++ = *from++;
-}
-
-bool GeneralMatrix::reuse()
-{
-   if (tag < -1)                 // borrowed storage
-   {
-      if (storage)
-      {
-         REPORT
-         Real* s = new Real [storage]; MatrixErrorNoSpace(s);
-         MONITOR_REAL_NEW("Make     (reuse)",storage,s)
-         BlockCopy(storage, store, s); store = s;
-      }
-      else { REPORT MiniCleanUp(); }                // CleanUp
-      tag = 0; return true;
-   }
-   if (tag < 0 ) { REPORT return false; }
-   if (tag <= 1 )  { REPORT return true; }
-   REPORT tag--; return false;
-}
-
-Real* GeneralMatrix::GetStore()
-{
-   if (tag<0 || tag>1)
-   {
-      Real* s;
-      if (storage)
-      {
-         s = new Real [storage]; MatrixErrorNoSpace(s);
-         MONITOR_REAL_NEW("Make  (GetStore)",storage,s)
-         BlockCopy(storage, store, s);
-      }
-      else s = 0;
-      if (tag > 1) { REPORT tag--; }
-      else if (tag < -1) { REPORT store = 0; delete this; } // borrowed store
-      else { REPORT }
-      return s;
-   }
-   Real* s = store;                             // CleanUp - done later
-   if (tag==0) { REPORT store = 0; delete this; }
-   else { REPORT  MiniCleanUp(); }
-   return s;
-}
-
-void GeneralMatrix::GetMatrix(const GeneralMatrix* gmx)
-{
-   REPORT  tag=-1; nrows=gmx->Nrows(); ncols=gmx->Ncols();
-   storage=gmx->storage; SetParameters(gmx);
-   store=((GeneralMatrix*)gmx)->GetStore();
-}
-
-GeneralMatrix* GeneralMatrix::BorrowStore(GeneralMatrix* gmx, MatrixType mt)
-// Copy storage of *this to storage of *gmx. Then convert to type mt.
-// If mt == 0 just let *gmx point to storage of *this if tag==-1.
-{
-   if (!mt)
-   {
-      if (tag == -1) { REPORT gmx->tag = -2; gmx->store = store; }
-      else { REPORT gmx->tag = 0; gmx->store = GetStore(); }
-   }
-   else if (Compare(gmx->Type(),mt))
-   { REPORT  gmx->tag = 0; gmx->store = GetStore(); }
-   else
-   {
-      REPORT gmx->tag = -2; gmx->store = store;
-      gmx = gmx->Evaluate(mt); gmx->tag = 0; tDelete();
-   }
-
-   return gmx;
-}
-
-void GeneralMatrix::Eq(const BaseMatrix& X, MatrixType mt)
-// Count number of references to this in X.
-// If zero delete storage in this;
-// otherwise tag this to show when storage can be deleted
-// evaluate X and copy to this
-{
-#ifdef DO_SEARCH
-   int counter=X.search(this);
-   if (counter==0)
-   {
-      REPORT
-      if (store)
-      {
-         MONITOR_REAL_DELETE("Free (operator=)",storage,store)
-         REPORT delete [] store; storage = 0; store = 0;
-      }
-   }
-   else { REPORT Release(counter); }
-   GeneralMatrix* gmx = ((BaseMatrix&)X).Evaluate(mt);
-   if (gmx!=this) { REPORT GetMatrix(gmx); }
-   else { REPORT }
-   Protect();
-#else
-   GeneralMatrix* gmx = ((BaseMatrix&)X).Evaluate(mt);
-   if (gmx!=this)
-   {
-      REPORT
-      if (store)
-      {
-         MONITOR_REAL_DELETE("Free (operator=)",storage,store)
-         REPORT delete [] store; storage = 0; store = 0;
-      }
-      GetMatrix(gmx);
-   }
-   else { REPORT }
-   Protect();
-#endif
-}
-
-// version with no conversion
-void GeneralMatrix::Eq(const GeneralMatrix& X)
-{
-   GeneralMatrix* gmx = (GeneralMatrix*)&X;
-   if (gmx!=this)
-   {
-      REPORT
-      if (store)
-      {
-         MONITOR_REAL_DELETE("Free (operator=)",storage,store)
-         REPORT delete [] store; storage = 0; store = 0;
-      }
-      GetMatrix(gmx);
-   }
-   else { REPORT }
-   Protect();
-}
-
-// version to work with operator<<
-void GeneralMatrix::Eq(const BaseMatrix& X, MatrixType mt, bool ldok)
-{
-   REPORT
-   if (ldok) mt.SetDataLossOK();
-   Eq(X, mt);
-}
-
-void GeneralMatrix::Eq2(const BaseMatrix& X, MatrixType mt)
-// a cut down version of Eq for use with += etc.
-// we know BaseMatrix points to two GeneralMatrix objects,
-// the first being this (may be the same).
-// we know tag has been set correctly in each.
-{
-   GeneralMatrix* gmx = ((BaseMatrix&)X).Evaluate(mt);
-   if (gmx!=this) { REPORT GetMatrix(gmx); }  // simplify GetMatrix ?
-   else { REPORT }
-   Protect();
-}
-
-void GeneralMatrix::Inject(const GeneralMatrix& X)
-// copy stored values of X; otherwise leave els of *this unchanged
-{
-   REPORT
-   Tracer tr("Inject");
-   if (nrows != X.nrows || ncols != X.ncols)
-      Throw(IncompatibleDimensionsException());
-   MatrixRow mr((GeneralMatrix*)&X, LoadOnEntry);
-   MatrixRow mrx(this, LoadOnEntry+StoreOnExit+DirectPart);
-   int i=nrows;
-   while (i--) { mrx.Inject(mr); mrx.Next(); mr.Next(); }
-}
-
-// ************* checking for data loss during conversion *******************/
-
-bool Compare(const MatrixType& source, MatrixType& destination)
-{
-   if (!destination) { destination=source; return true; }
-   if (destination==source) return true;
-   if (!destination.DataLossOK && !(destination>=source))
-      Throw(ProgramException("Illegal Conversion", source, destination));
-   return false;
-}
-
-// ************* Make a copy of a matrix on the heap *********************/
-
-GeneralMatrix* Matrix::Image() const
-{
-   REPORT
-   GeneralMatrix* gm = new Matrix(*this); MatrixErrorNoSpace(gm);
-   return gm;
-}
-
-GeneralMatrix* SquareMatrix::Image() const
-{
-   REPORT
-   GeneralMatrix* gm = new SquareMatrix(*this); MatrixErrorNoSpace(gm);
-   return gm;
-}
-
-GeneralMatrix* SymmetricMatrix::Image() const
-{
-   REPORT
-   GeneralMatrix* gm = new SymmetricMatrix(*this); MatrixErrorNoSpace(gm);
-   return gm;
-}
-
-GeneralMatrix* UpperTriangularMatrix::Image() const
-{
-   REPORT
-   GeneralMatrix* gm = new UpperTriangularMatrix(*this);
-   MatrixErrorNoSpace(gm); return gm;
-}
-
-GeneralMatrix* LowerTriangularMatrix::Image() const
-{
-   REPORT
-   GeneralMatrix* gm = new LowerTriangularMatrix(*this);
-   MatrixErrorNoSpace(gm); return gm;
-}
-
-GeneralMatrix* DiagonalMatrix::Image() const
-{
-   REPORT
-   GeneralMatrix* gm = new DiagonalMatrix(*this); MatrixErrorNoSpace(gm);
-   return gm;
-}
-
-GeneralMatrix* RowVector::Image() const
-{
-   REPORT
-   GeneralMatrix* gm = new RowVector(*this); MatrixErrorNoSpace(gm);
-   return gm;
-}
-
-GeneralMatrix* ColumnVector::Image() const
-{
-   REPORT
-   GeneralMatrix* gm = new ColumnVector(*this); MatrixErrorNoSpace(gm);
-   return gm;
-}
-
-GeneralMatrix* BandMatrix::Image() const
-{
-   REPORT
-   GeneralMatrix* gm = new BandMatrix(*this); MatrixErrorNoSpace(gm);
-   return gm;
-}
-
-GeneralMatrix* UpperBandMatrix::Image() const
-{
-   REPORT
-   GeneralMatrix* gm = new UpperBandMatrix(*this); MatrixErrorNoSpace(gm);
-   return gm;
-}
-
-GeneralMatrix* LowerBandMatrix::Image() const
-{
-   REPORT
-   GeneralMatrix* gm = new LowerBandMatrix(*this); MatrixErrorNoSpace(gm);
-   return gm;
-}
-
-GeneralMatrix* SymmetricBandMatrix::Image() const
-{
-   REPORT
-   GeneralMatrix* gm = new SymmetricBandMatrix(*this); MatrixErrorNoSpace(gm);
-   return gm;
-}
-
-GeneralMatrix* nricMatrix::Image() const
-{
-   REPORT
-   GeneralMatrix* gm = new nricMatrix(*this); MatrixErrorNoSpace(gm);
-   return gm;
-}
-
-GeneralMatrix* IdentityMatrix::Image() const
-{
-   REPORT
-   GeneralMatrix* gm = new IdentityMatrix(*this); MatrixErrorNoSpace(gm);
-   return gm;
-}
-
-GeneralMatrix* GeneralMatrix::Image() const
-{
-   bool dummy = true;
-   if (dummy)                                   // get rid of warning message
-      Throw(InternalException("Cannot apply Image to this matrix type"));
-   return 0;
-}
-
-
-// *********************** nricMatrix routines *****************************/
-
-void nricMatrix::MakeRowPointer()
-{
-   REPORT
-   if (nrows > 0)
-   {
-      row_pointer = new Real* [nrows]; MatrixErrorNoSpace(row_pointer);
-      Real* s = Store() - 1; int i = nrows; Real** rp = row_pointer;
-      if (i) for (;;) { *rp++ = s; if (!(--i)) break; s+=ncols; }
-   }
-   else row_pointer = 0;
-}
-
-void nricMatrix::DeleteRowPointer()
-   { REPORT if (nrows) delete [] row_pointer; }
-
-void GeneralMatrix::CheckStore() const
-{
-   REPORT
-   if (!store)
-      Throw(ProgramException("NRIC accessing matrix with unset dimensions"));
-}
-
-
-// *************************** CleanUp routines *****************************/
-
-void GeneralMatrix::CleanUp()
-{
-   // set matrix dimensions to zero, delete storage
-   REPORT
-   if (store && storage)
-   {
-      MONITOR_REAL_DELETE("Free (CleanUp)    ",storage,store)
-      REPORT delete [] store;
-   }
-   store=0; storage=0; nrows=0; ncols=0; tag = -1;
-}
-
-void nricMatrix::CleanUp()
-   { REPORT DeleteRowPointer(); GeneralMatrix::CleanUp(); }
-
-void nricMatrix::MiniCleanUp()
-   { REPORT DeleteRowPointer(); GeneralMatrix::MiniCleanUp(); }
-
-void RowVector::CleanUp()
-   { REPORT GeneralMatrix::CleanUp(); nrows=1; }
-
-void ColumnVector::CleanUp()
-   { REPORT GeneralMatrix::CleanUp(); ncols=1; }
-
-void CroutMatrix::CleanUp()
-{
-   REPORT
-   if (nrows) delete [] indx;
-   GeneralMatrix::CleanUp();
-}
-
-void CroutMatrix::MiniCleanUp()
-{
-   REPORT
-   if (nrows) delete [] indx;
-   GeneralMatrix::MiniCleanUp();
-}
-
-void BandLUMatrix::CleanUp()
-{
-   REPORT
-   if (nrows) delete [] indx;
-   if (storage2) delete [] store2;
-   GeneralMatrix::CleanUp();
-}
-
-void BandLUMatrix::MiniCleanUp()
-{
-   REPORT
-   if (nrows) delete [] indx;
-   if (storage2) delete [] store2;
-   GeneralMatrix::MiniCleanUp();
-}
-
-// ************************ simple integer array class ***********************
-
-// construct a new array of length xn. Check that xn is non-negative and
-// that space is available
-
-SimpleIntArray::SimpleIntArray(int xn) : n(xn)
-{
-   if (n < 0) Throw(Logic_error("invalid array length"));
-   else if (n == 0) { REPORT  a = 0; }
-   else { REPORT  a = new int [n]; if (!a) Throw(Bad_alloc()); }
-}
-
-// destroy an array - return its space to memory
-
-SimpleIntArray::~SimpleIntArray() { REPORT  if (a) delete [] a; }
-
-// access an element of an array; return a "reference" so elements
-// can be modified.
-// check index is within range
-// in this array class the index runs from 0 to n-1
-
-int& SimpleIntArray::operator[](int i)
-{
-   REPORT
-   if (i < 0 || i >= n) Throw(Logic_error("array index out of range"));
-   return a[i];
-}
-
-// same thing again but for arrays declared constant so we can't
-// modify its elements
-
-int SimpleIntArray::operator[](int i) const
-{
-   REPORT
-   if (i < 0 || i >= n) Throw(Logic_error("array index out of range"));
-   return a[i];
-}
-
-// set all the elements equal to a given value
-
-void SimpleIntArray::operator=(int ai)
-   { REPORT  for (int i = 0; i < n; i++) a[i] = ai; }
-
-// set the elements equal to those of another array.
-// check the arrays are of the same length
-
-void SimpleIntArray::operator=(const SimpleIntArray& b)
-{
-   REPORT
-   if (b.n != n) Throw(Logic_error("array lengths differ in copy"));
-   for (int i = 0; i < n; i++) a[i] = b.a[i];
-}
-
-// construct a new array equal to an existing array
-// check that space is available
-
-SimpleIntArray::SimpleIntArray(const SimpleIntArray& b) : n(b.n)
-{
-   if (n == 0) { REPORT  a = 0; }
-   else
-   {
-      REPORT
-      a = new int [n]; if (!a) Throw(Bad_alloc());
-      for (int i = 0; i < n; i++) a[i] = b.a[i];
-   }
-}
-
-// change the size of an array; optionally copy data from old array to
-// new array
-
-void SimpleIntArray::ReSize(int n1, bool keep)
-{
-   if (n1 == n) { REPORT  return; }
-   else if (n1 == 0) { REPORT  n = 0; delete [] a; a = 0; }
-   else if (n == 0)
-      { REPORT  a = new int [n1]; if (!a) Throw(Bad_alloc()); n = n1; }
-   else
-   {
-      int* a1 = a;
-      if (keep)
-      {
-         REPORT
-         a = new int [n1]; if (!a) Throw(Bad_alloc());
-         if (n > n1) n = n1;
-         for (int i = 0; i < n; i++) a[i] = a1[i];
-         n = n1; delete [] a1;
-      }
-      else
-      {
-         REPORT  n = n1; delete [] a1;
-         a = new int [n]; if (!a) Throw(Bad_alloc());
-      }
-   }
-}
-
-
-#ifdef use_namespace
-}
-#endif
-
diff --git a/src/ossim/matrix/newmat5.cpp b/src/ossim/matrix/newmat5.cpp
deleted file mode 100644
index 0e8da17..0000000
--- a/src/ossim/matrix/newmat5.cpp
+++ /dev/null
@@ -1,485 +0,0 @@
-//$$ newmat5.cpp         Transpose, evaluate etc
-
-// Copyright (C) 1991,2,3,4: R B Davies
-
-//#define WANT_STREAM
-
-#include <ossim/matrix/include.h>
-
-#include <ossim/matrix/newmat.h>
-#include <ossim/matrix/newmatrc.h>
-
-#ifdef use_namespace
-namespace NEWMAT {
-#endif
-
-
-#ifdef DO_REPORT
-#define REPORT { static ExeCounter ExeCount(__LINE__,5); ++ExeCount; }
-#else
-#define REPORT {}
-#endif
-
-
-/************************ carry out operations ******************************/
-
-
-GeneralMatrix* GeneralMatrix::Transpose(TransposedMatrix* tm, MatrixType mt)
-{
-   GeneralMatrix* gm1;
-
-   if (Compare(Type().t(),mt))
-   {
-      REPORT
-      gm1 = mt.New(ncols,nrows,tm);
-      for (int i=0; i<ncols; i++)
-      {
-         MatrixRow mr(gm1, StoreOnExit+DirectPart, i);
-         MatrixCol mc(this, mr.Data(), LoadOnEntry, i);
-      }
-   }
-   else
-   {
-      REPORT
-      gm1 = mt.New(ncols,nrows,tm);
-      MatrixRow mr(this, LoadOnEntry);
-      MatrixCol mc(gm1, StoreOnExit+DirectPart);
-      int i = nrows;
-      while (i--) { mc.Copy(mr); mr.Next(); mc.Next(); }
-   }
-   tDelete(); gm1->ReleaseAndDelete(); return gm1;
-}
-
-GeneralMatrix* SymmetricMatrix::Transpose(TransposedMatrix*, MatrixType mt)
-{ REPORT  return Evaluate(mt); }
-
-
-GeneralMatrix* DiagonalMatrix::Transpose(TransposedMatrix*, MatrixType mt)
-{ REPORT return Evaluate(mt); }
-
-GeneralMatrix* ColumnVector::Transpose(TransposedMatrix*, MatrixType mt)
-{
-   REPORT
-   GeneralMatrix* gmx = new RowVector; MatrixErrorNoSpace(gmx);
-   gmx->nrows = 1; gmx->ncols = gmx->storage = storage;
-   return BorrowStore(gmx,mt);
-}
-
-GeneralMatrix* RowVector::Transpose(TransposedMatrix*, MatrixType mt)
-{
-   REPORT
-   GeneralMatrix* gmx = new ColumnVector; MatrixErrorNoSpace(gmx);
-   gmx->ncols = 1; gmx->nrows = gmx->storage = storage;
-   return BorrowStore(gmx,mt);
-}
-
-GeneralMatrix* IdentityMatrix::Transpose(TransposedMatrix*, MatrixType mt)
-{ REPORT return Evaluate(mt); }
-
-GeneralMatrix* GeneralMatrix::Evaluate(MatrixType mt)
-{
-   if (Compare(this->Type(),mt)) { REPORT return this; }
-   REPORT
-   GeneralMatrix* gmx = mt.New(nrows,ncols,this);
-   MatrixRow mr(this, LoadOnEntry);
-   MatrixRow mrx(gmx, StoreOnExit+DirectPart);
-   int i=nrows;
-   while (i--) { mrx.Copy(mr); mrx.Next(); mr.Next(); }
-   tDelete(); gmx->ReleaseAndDelete(); return gmx;
-}
-
-GeneralMatrix* GenericMatrix::Evaluate(MatrixType mt)
-   { REPORT  return gm->Evaluate(mt); }
-
-GeneralMatrix* ShiftedMatrix::Evaluate(MatrixType mt)
-{
-   gm=((BaseMatrix*&)bm)->Evaluate();
-   int nr=gm->Nrows(); int nc=gm->Ncols();
-   Compare(gm->Type().AddEqualEl(),mt);
-   if (!(mt==gm->Type()))
-   {
-      REPORT
-      GeneralMatrix* gmx = mt.New(nr,nc,this);
-      MatrixRow mr(gm, LoadOnEntry);
-      MatrixRow mrx(gmx, StoreOnExit+DirectPart);
-      while (nr--) { mrx.Add(mr,f); mrx.Next(); mr.Next(); }
-      gmx->ReleaseAndDelete(); gm->tDelete();
-      return gmx;
-   }
-   else if (gm->reuse())
-   {
-      REPORT gm->Add(f);
-      return gm;
-   }
-   else
-   {
-      REPORT GeneralMatrix* gmy = gm->Type().New(nr,nc,this);
-      gmy->ReleaseAndDelete(); gmy->Add(gm,f);
-      return gmy;
-   }
-}
-
-GeneralMatrix* NegShiftedMatrix::Evaluate(MatrixType mt)
-{
-   gm=((BaseMatrix*&)bm)->Evaluate();
-   int nr=gm->Nrows(); int nc=gm->Ncols();
-   Compare(gm->Type().AddEqualEl(),mt);
-   if (!(mt==gm->Type()))
-   {
-      REPORT
-      GeneralMatrix* gmx = mt.New(nr,nc,this);
-      MatrixRow mr(gm, LoadOnEntry);
-      MatrixRow mrx(gmx, StoreOnExit+DirectPart);
-      while (nr--) { mrx.NegAdd(mr,f); mrx.Next(); mr.Next(); }
-      gmx->ReleaseAndDelete(); gm->tDelete();
-      return gmx;
-   }
-   else if (gm->reuse())
-   {
-      REPORT gm->NegAdd(f);
-      return gm;
-   }
-   else
-   {
-      REPORT GeneralMatrix* gmy = gm->Type().New(nr,nc,this);
-      gmy->ReleaseAndDelete(); gmy->NegAdd(gm,f);
-      return gmy;
-   }
-}
-
-GeneralMatrix* ScaledMatrix::Evaluate(MatrixType mt)
-{
-   gm=((BaseMatrix*&)bm)->Evaluate();
-   int nr=gm->Nrows(); int nc=gm->Ncols();
-   if (Compare(gm->Type(),mt))
-   {
-      if (gm->reuse())
-      {
-         REPORT gm->Multiply(f);
-         return gm;
-      }
-      else
-      {
-         REPORT GeneralMatrix* gmx = gm->Type().New(nr,nc,this);
-         gmx->ReleaseAndDelete(); gmx->Multiply(gm,f);
-         return gmx;
-      }
-   }
-   else
-   {
-      REPORT
-      GeneralMatrix* gmx = mt.New(nr,nc,this);
-      MatrixRow mr(gm, LoadOnEntry);
-      MatrixRow mrx(gmx, StoreOnExit+DirectPart);
-      while (nr--) { mrx.Multiply(mr,f); mrx.Next(); mr.Next(); }
-      gmx->ReleaseAndDelete(); gm->tDelete();
-      return gmx;
-   }
-}
-
-GeneralMatrix* NegatedMatrix::Evaluate(MatrixType mt)
-{
-   gm=((BaseMatrix*&)bm)->Evaluate();
-   int nr=gm->Nrows(); int nc=gm->Ncols();
-   if (Compare(gm->Type(),mt))
-   {
-      if (gm->reuse())
-      {
-         REPORT gm->Negate();
-         return gm;
-      }
-      else
-      {
-         REPORT
-         GeneralMatrix* gmx = gm->Type().New(nr,nc,this);
-         gmx->ReleaseAndDelete(); gmx->Negate(gm);
-         return gmx;
-      }
-   }
-   else
-   {
-      REPORT
-      GeneralMatrix* gmx = mt.New(nr,nc,this);
-      MatrixRow mr(gm, LoadOnEntry);
-      MatrixRow mrx(gmx, StoreOnExit+DirectPart);
-      while (nr--) { mrx.Negate(mr); mrx.Next(); mr.Next(); }
-      gmx->ReleaseAndDelete(); gm->tDelete();
-      return gmx;
-   }
-}
-
-GeneralMatrix* ReversedMatrix::Evaluate(MatrixType mt)
-{
-   gm=((BaseMatrix*&)bm)->Evaluate(); GeneralMatrix* gmx;
-
-   if ((gm->Type()).IsBand() && ! (gm->Type()).IsDiagonal())
-   {
-      gm->tDelete();
-      Throw(NotDefinedException("Reverse", "band matrices"));
-   }
-
-   if (gm->reuse()) { REPORT gm->ReverseElements(); gmx = gm; }
-   else
-   {
-      REPORT
-      gmx = gm->Type().New(gm->Nrows(), gm->Ncols(), this);
-      gmx->ReverseElements(gm); gmx->ReleaseAndDelete();
-   }
-   return gmx->Evaluate(mt); // target matrix is different type?
-
-}
-
-GeneralMatrix* TransposedMatrix::Evaluate(MatrixType mt)
-{
-   REPORT
-   gm=((BaseMatrix*&)bm)->Evaluate();
-   Compare(gm->Type().t(),mt);
-   GeneralMatrix* gmx=gm->Transpose(this, mt);
-   return gmx;
-}
-
-GeneralMatrix* RowedMatrix::Evaluate(MatrixType mt)
-{
-   gm = ((BaseMatrix*&)bm)->Evaluate();
-   GeneralMatrix* gmx = new RowVector; MatrixErrorNoSpace(gmx);
-   gmx->nrows = 1; gmx->ncols = gmx->storage = gm->storage;
-   return gm->BorrowStore(gmx,mt);
-}
-
-GeneralMatrix* ColedMatrix::Evaluate(MatrixType mt)
-{
-   gm = ((BaseMatrix*&)bm)->Evaluate();
-   GeneralMatrix* gmx = new ColumnVector; MatrixErrorNoSpace(gmx);
-   gmx->ncols = 1; gmx->nrows = gmx->storage = gm->storage;
-   return gm->BorrowStore(gmx,mt);
-}
-
-GeneralMatrix* DiagedMatrix::Evaluate(MatrixType mt)
-{
-   gm = ((BaseMatrix*&)bm)->Evaluate();
-   GeneralMatrix* gmx = new DiagonalMatrix; MatrixErrorNoSpace(gmx);
-   gmx->nrows = gmx->ncols = gmx->storage = gm->storage;
-   return gm->BorrowStore(gmx,mt);
-}
-
-GeneralMatrix* MatedMatrix::Evaluate(MatrixType mt)
-{
-   Tracer tr("MatedMatrix::Evaluate");
-   gm = ((BaseMatrix*&)bm)->Evaluate();
-   GeneralMatrix* gmx = new Matrix; MatrixErrorNoSpace(gmx);
-   gmx->nrows = nr; gmx->ncols = nc; gmx->storage = gm->storage;
-   if (nr*nc != gmx->storage)
-      Throw(IncompatibleDimensionsException());
-   return gm->BorrowStore(gmx,mt);
-}
-
-GeneralMatrix* GetSubMatrix::Evaluate(MatrixType mt)
-{
-   REPORT
-   Tracer tr("SubMatrix(evaluate)");
-   gm = ((BaseMatrix*&)bm)->Evaluate();
-   if (row_number < 0) row_number = gm->Nrows();
-   if (col_number < 0) col_number = gm->Ncols();
-   if (row_skip+row_number > gm->Nrows() || col_skip+col_number > gm->Ncols())
-   {
-      gm->tDelete();
-      Throw(SubMatrixDimensionException());
-   }
-   if (IsSym) Compare(gm->Type().ssub(), mt);
-   else Compare(gm->Type().sub(), mt);
-   GeneralMatrix* gmx = mt.New(row_number, col_number, this);
-   int i = row_number;
-   MatrixRow mr(gm, LoadOnEntry, row_skip); 
-   MatrixRow mrx(gmx, StoreOnExit+DirectPart);
-   MatrixRowCol sub;
-   while (i--)
-   {
-      mr.SubRowCol(sub, col_skip, col_number);   // put values in sub
-      mrx.Copy(sub); mrx.Next(); mr.Next();
-   }
-   gmx->ReleaseAndDelete(); gm->tDelete();
-   return gmx;
-}
-
-
-GeneralMatrix* ReturnMatrix::Evaluate(MatrixType mt)
-{
-   return gm->Evaluate(mt);
-}
-
-
-void GeneralMatrix::Add(GeneralMatrix* gm1, Real f)
-{
-   REPORT
-   Real* s1=gm1->store; Real* s=store; int i=(storage >> 2);
-   while (i--)
-   { *s++ = *s1++ + f; *s++ = *s1++ + f; *s++ = *s1++ + f; *s++ = *s1++ + f; }
-   i = storage & 3; while (i--) *s++ = *s1++ + f;
-}
-   
-void GeneralMatrix::Add(Real f)
-{
-   REPORT
-   Real* s=store; int i=(storage >> 2);
-   while (i--) { *s++ += f; *s++ += f; *s++ += f; *s++ += f; }
-   i = storage & 3; while (i--) *s++ += f;
-}
-   
-void GeneralMatrix::NegAdd(GeneralMatrix* gm1, Real f)
-{
-   REPORT
-   Real* s1=gm1->store; Real* s=store; int i=(storage >> 2);
-   while (i--)
-   { *s++ = f - *s1++; *s++ = f - *s1++; *s++ = f - *s1++; *s++ = f - *s1++; }
-   i = storage & 3; while (i--) *s++ = f - *s1++;
-}
-   
-void GeneralMatrix::NegAdd(Real f)
-{
-   REPORT
-   Real* s=store; int i=(storage >> 2);
-   while (i--)
-   {
-      *s = f - *s; s++; *s = f - *s; s++;
-      *s = f - *s; s++; *s = f - *s; s++;
-   }
-   i = storage & 3; while (i--)  { *s = f - *s; s++; }
-}
-   
-void GeneralMatrix::Negate(GeneralMatrix* gm1)
-{
-   // change sign of elements
-   REPORT
-   Real* s1=gm1->store; Real* s=store; int i=(storage >> 2);
-   while (i--)
-   { *s++ = -(*s1++); *s++ = -(*s1++); *s++ = -(*s1++); *s++ = -(*s1++); }
-   i = storage & 3; while(i--) *s++ = -(*s1++);
-}
-   
-void GeneralMatrix::Negate()
-{
-   REPORT
-   Real* s=store; int i=(storage >> 2);
-   while (i--)
-   { *s = -(*s); s++; *s = -(*s); s++; *s = -(*s); s++; *s = -(*s); s++; }
-   i = storage & 3; while(i--) { *s = -(*s); s++; }
-}
-   
-void GeneralMatrix::Multiply(GeneralMatrix* gm1, Real f)
-{
-   REPORT
-   Real* s1=gm1->store; Real* s=store;  int i=(storage >> 2);
-   while (i--)
-   { *s++ = *s1++ * f; *s++ = *s1++ * f; *s++ = *s1++ * f; *s++ = *s1++ * f; }
-   i = storage & 3; while (i--) *s++ = *s1++ * f;
-}
-   
-void GeneralMatrix::Multiply(Real f)
-{
-   REPORT
-   Real* s=store; int i=(storage >> 2);
-   while (i--) { *s++ *= f; *s++ *= f; *s++ *= f; *s++ *= f; }
-   i = storage & 3; while (i--) *s++ *= f;
-}
-   
-
-/************************ MatrixInput routines ****************************/
-
-// int MatrixInput::n;          // number values still to be read
-// Real* MatrixInput::r;        // pointer to next location to be read to
-
-MatrixInput MatrixInput::operator<<(Real f)
-{
-   REPORT
-   Tracer et("MatrixInput");
-   if (n<=0) Throw(ProgramException("List of values too long"));
-   *r = f; int n1 = n-1; n=0;   // n=0 so we won't trigger exception
-   return MatrixInput(n1, r+1);
-}
-
-
-MatrixInput GeneralMatrix::operator<<(Real f)
-{
-   REPORT
-   Tracer et("MatrixInput");
-   int n = Storage();
-   if (n<=0) Throw(ProgramException("Loading data to zero length matrix"));
-   Real* r; r = Store(); *r = f; n--;
-   return MatrixInput(n, r+1);
-}
-
-MatrixInput GetSubMatrix::operator<<(Real f)
-{
-   REPORT
-   Tracer et("MatrixInput (GetSubMatrix)");
-   SetUpLHS();
-   if (row_number != 1 || col_skip != 0 || col_number != gm->Ncols())
-   {
-      Throw(ProgramException("MatrixInput requires complete rows"));
-   }
-   MatrixRow mr(gm, DirectPart, row_skip);  // to pick up location and length
-   int n = mr.Storage();
-   if (n<=0)
-   {
-      Throw(ProgramException("Loading data to zero length row"));
-   }
-   Real* r; r = mr.Data(); *r = f; n--;
-   if (+(mr.cw*HaveStore))
-   {
-      Throw(ProgramException("Fails with this matrix type"));
-   }
-   return MatrixInput(n, r+1);
-}
-
-MatrixInput::~MatrixInput()
-{
-   REPORT
-   Tracer et("MatrixInput");
-   if (n!=0) Throw(ProgramException("A list of values was too short"));
-}
-
-MatrixInput BandMatrix::operator<<(Real)
-{
-   Tracer et("MatrixInput");
-   bool dummy = true;
-   if (dummy)                                   // get rid of warning message
-      Throw(ProgramException("Cannot use list read with a BandMatrix"));
-   return MatrixInput(0, 0);
-}
-
-void BandMatrix::operator<<(const Real*)
-{ Throw(ProgramException("Cannot use array read with a BandMatrix")); }
-
-void BandMatrix::operator<<(const int*)
-{ Throw(ProgramException("Cannot use array read with a BandMatrix")); }
-
-void SymmetricBandMatrix::operator<<(const Real*)
-{ Throw(ProgramException("Cannot use array read with a BandMatrix")); }
-
-void SymmetricBandMatrix::operator<<(const int*)
-{ Throw(ProgramException("Cannot use array read with a BandMatrix")); }
-
-// ************************* Reverse order of elements ***********************
-
-void GeneralMatrix::ReverseElements(GeneralMatrix* gm)
-{
-   // reversing into a new matrix
-   REPORT
-   int n = Storage(); Real* rx = Store() + n; Real* x = gm->Store();
-   while (n--) *(--rx) = *(x++);
-}
-
-void GeneralMatrix::ReverseElements()
-{
-   // reversing in place
-   REPORT
-   int n = Storage(); Real* x = Store(); Real* rx = x + n;
-   n /= 2;
-   while (n--) { Real t = *(--rx); *rx = *x; *(x++) = t; }
-}
-
-
-#ifdef use_namespace
-}
-#endif
-
diff --git a/src/ossim/ossimVersion.h.in b/src/ossim/ossimVersion.h.in
deleted file mode 100644
index fe25598..0000000
--- a/src/ossim/ossimVersion.h.in
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef ossimVersion_HEADER
-#define ossimVersion_HEADER
-
-#define OSSIM_VERSION @OSSIM_VERSION_NUMBER@
-#define OSSIM_MAJOR_VERSION_NUMBER @OSSIM_MAJOR_VERSION_NUMBER@
-#define OSSIM_MINOR_VERSION_NUMBER @OSSIM_MINOR_VERSION_NUMBER@
-#define OSSIM_PATCH_VERSION_NUMBER @OSSIM_PATCH_VERSION_NUMBER@  
-#define OSSIM_RELEASE_NUMBER @OSSIM_RELEASE_NUMBER@  
-#define OSSIM_REVISION_NUMBER @OSSIM_SVN_REVISION_NUMBER@  
-
-// date format = (yyyymmdd)
-#define OSSIM_BUILD_DATE @OSSIM_BUILD_DATE@
-
-#endif /* End of #ifndef ossimVersion_HEADER */
diff --git a/src/ossim/parallel/.cvsignore b/src/ossim/parallel/.cvsignore
deleted file mode 100644
index c7420bf..0000000
--- a/src/ossim/parallel/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-*.d
-Makefile
-.shared_obj
-
diff --git a/src/ossim/parallel/ossimIgen.cpp b/src/ossim/parallel/ossimIgen.cpp
deleted file mode 100644
index bc38e26..0000000
--- a/src/ossim/parallel/ossimIgen.cpp
+++ /dev/null
@@ -1,727 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-// 
-// Description: implementation for image generator
-//
-//*************************************************************************
-// $Id: ossimIgen.cpp 21850 2012-10-21 20:09:55Z dburken $
-
-#include <ossim/ossimConfig.h> /* To pick up define OSSIM_HAS_MPI. */
-
-#if OSSIM_HAS_MPI
-#  include <mpi.h>
-#  include <ossim/parallel/ossimImageMpiMWriterSequenceConnection.h>
-#  include <ossim/parallel/ossimImageMpiSWriterSequenceConnection.h>
-#endif
-
-#include <ossim/parallel/ossimIgen.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/base/ossimVisitor.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/imaging/ossimImageChain.h>
-#include <ossim/imaging/ossimRectangleCutFilter.h>
-#include <ossim/imaging/ossimGeoPolyCutter.h>
-#include <ossim/imaging/ossimTiffWriter.h>
-#include <ossim/imaging/ossimTilingRect.h>
-#include <ossim/imaging/ossimTilingPoly.h>
-#include <ossim/base/ossimPreferences.h>
-#include <ossim/parallel/ossimMpi.h>
-#include <ossim/parallel/ossimMultiThreadSequencer.h>
-#include <ossim/parallel/ossimMtDebug.h> //### For debug/performance eval
-#include <iterator>
-#include <sstream>
-
-static ossimTrace traceDebug(ossimString("ossimIgen:debug"));
-static ossimTrace traceLog(ossimString("ossimIgen:log"));
-
-ossimIgen::ossimIgen()
-:
-theContainer(new ossimConnectableContainer()),
-theProductProjection(0),
-theProductChain(0),
-theTiling(new ossimTiling),
-theOutputRect(),
-theBuildThumbnailFlag(false),
-theThumbnailSize(0, 0),
-theNumberOfTilesToBuffer(2),
-theKwl(),
-theTilingEnabled(false),
-theProgressFlag(true),
-theStdoutFlag(false),
-theThreadCount(9999) // Default no threading
-{
-   theOutputRect.makeNan();
-}
-
-ossimIgen::~ossimIgen()
-{
-   theProductProjection = 0;
-   theTiling = 0;
-   theContainer->disconnect();
-   theContainer->deleteAllChildren();
-   theContainer = 0;
-}
-
-void ossimIgen::initializeAttributes()
-{
-   theBuildThumbnailFlag  = false;
-   theThumbnailSize = ossimIpt(0,0);
-   theTilingEnabled = false;
-
-   if(ossimMpi::instance()->getRank() != 0)
-   {
-      ossimPreferences::instance()->addPreferences(theKwl,
-         "preferences.",
-         true);
-   }
-
-   const char* lookup = theKwl.find("igen.output_progress");
-   if (lookup)
-   {
-      ossimString os = lookup;
-      theProgressFlag = os.toBool();
-   }
-
-   const char* thumbnailStr = theKwl.find("igen.thumbnail");
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "Thumbnail string = " << ossimString(thumbnailStr) << std::endl;
-   }
-   if(thumbnailStr)
-   {
-      theBuildThumbnailFlag= ossimString(thumbnailStr).toBool();
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "Generate thumbnail attribute is set to "
-            << theBuildThumbnailFlag << std::endl;
-      }
-      if(theBuildThumbnailFlag)
-      {
-         const char* resStr = theKwl.find("igen.thumbnail_res");
-         if(resStr)
-         {
-            theThumbnailSize = ossimIpt(0,0);
-            std::istringstream in(resStr);
-            ossimString x,y;
-
-            in >> x >> y;
-
-            ossim_int32 ix = x.toInt32();
-            ossim_int32 iy = y.toInt32();
-
-            if (ix > 0)
-            {
-               theThumbnailSize.x = ix;
-            }
-            else
-            {
-               theThumbnailSize.x = 128;
-            }
-
-            if (iy > 0)
-            {
-               theThumbnailSize.y = iy;
-            }
-            else
-            {
-               theThumbnailSize.y = theThumbnailSize.x;
-            }
-         }
-         else
-         {
-            theThumbnailSize = ossimIpt(128, 128);
-         }
-      }
-   }
-   const char* numberOfSlaveTileBuffersStr = theKwl.find("igen.slave_tile_buffers");
-   if(numberOfSlaveTileBuffersStr)
-   {
-      theNumberOfTilesToBuffer = ossimString(numberOfSlaveTileBuffersStr).toLong();
-   }
-
-   const char* tilingKw = theKwl.find("igen.tiling.type");
-   if(tilingKw)
-   {
-      theTilingEnabled = true;
-      if(!theTiling->loadState(theKwl, "igen.tiling."))
-      {
-         theTilingEnabled = false;
-      }
-   }
-}
-
-void ossimIgen::slaveSetup()
-{
-#if OSSIM_HAS_MPI
-   int stringSize;
-   MPI_Status status;
-   int numberOfTimes = 0;
-
-   memset((void *)&status, 0, sizeof(MPI_Status));
-
-
-   // we first need to receive the size of the keyword list to load
-   MPI_Recv(&stringSize,
-      1,
-      MPI_INT,
-      0,    // source
-      0,    // tag
-      MPI_COMM_WORLD,
-      &status);
-
-   if(status.MPI_ERROR != MPI_SUCCESS)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "SLAVE = "
-         << ossimMpi::instance()->getRank()
-         << "Had errors receiving!!!!" << std::endl;
-      return;
-   }
-
-   char* buf = new char[stringSize+1];
-
-   numberOfTimes = 0;
-
-   memset((void *)&status, 0, sizeof(MPI_Status));
-
-   // now lets get the keywordlist as a string so we can load it up
-   MPI_Recv(buf,
-      stringSize,
-      MPI_CHAR,
-      0, // source
-      0, // tag
-      MPI_COMM_WORLD,
-      &status);
-
-   if(status.MPI_ERROR != MPI_SUCCESS)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "SLAVE = " << ossimMpi::instance()->getRank()
-         << "Had errors receiving in ossimIgen::slaveCreate(!!!!"
-         << std::endl;
-      return;
-   }
-   buf[stringSize] = '\0';
-
-   if(status.MPI_ERROR != MPI_SUCCESS)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "SLAVE = " << ossimMpi::instance()->getRank()
-         << "Had errors receiving!!!!" << std::endl;
-      return;
-   }
-
-   // now lets convert the received keywordlist into an actual
-   // ossimKeywordlist by using the parsStream method.
-   std::ostringstream kwlStream;
-
-   kwlStream << buf << ends;
-
-   istringstream kwlInStream(kwlStream.str());
-   theKwl.clear();
-   theKwl.parseStream(kwlInStream);
-   initializeAttributes();
-   delete [] buf;
-   buf = 0;
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "****************** KWL ************************" << std::endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << theKwl << std::endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "**************** END KWL ************************" << std::endl;
-
-   }
-   loadProductSpec();
-#endif
-}
-
-void ossimIgen::initialize(const ossimKeywordlist& kwl)
-{
-#if OSSIM_HAS_MPI
-   if(ossimMpi::instance()->getNumberOfProcessors() > 0)
-   {
-      if(ossimMpi::instance()->getRank() != 0)
-      {
-         slaveSetup();
-         return;
-      }
-   }
-#endif
-   theKwl = kwl;
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "The igen kewyord list  ==== \n" << theKwl << std::endl;
-   }
-   ossimKeywordlist kwlPrefs = ossimPreferences::instance()->preferencesKWL();
-
-   kwlPrefs.addPrefixToAll("preferences.");
-   theKwl.add(kwlPrefs);
-
-   initializeAttributes();
-
-   // now stream it to all slave processors
-   //
-#if OSSIM_HAS_MPI
-   if(ossimMpi::instance()->getNumberOfProcessors() > 0)
-   {
-      std::ostringstream outputKeywordlist;
-
-      theKwl.writeToStream(outputKeywordlist);
-      ossimString kwlString = outputKeywordlist.str();
-      ossim_uint32 size = kwlString.size();
-
-      for(long processor = 1;
-         processor < ossimMpi::instance()->getNumberOfProcessors();
-         ++processor)
-      {
-         // let's send the keywordlist argument.
-         // This is two steps.  We send a message to
-         // indicate the size and then we send the
-         // string.
-         //
-         MPI_Send(&size,
-            1,
-            MPI_INT,
-            processor,
-            0,
-            MPI_COMM_WORLD);
-
-         MPI_Send((void*)kwlString.c_str(),
-            size,
-            MPI_CHAR,
-            processor,
-            0,
-            MPI_COMM_WORLD);
-      }
-   }
-#endif
-   loadProductSpec();
-
-}
-
-bool ossimIgen::loadProductSpec()
-{
-   const char* MODULE = "ossimIgen::loadProductSpec";
-   if(traceDebug())  CLOG << "entered..." << std::endl;
-
-   // Clear out the overall container and initialize it with spec in KWL:
-   theContainer->deleteAllChildren();
-   theContainer->loadState(theKwl);
-
-   // There should be a product chain defined in the container:
-   // ossimConnectableObject* obj = 
-   //   theContainer->findFirstObjectOfType(STATIC_TYPE_NAME(ossimImageChain), false);
-   // theProductChain = PTR_CAST(ossimImageChain, obj);
-
-   ossimTypeNameVisitor visitor( ossimString("ossimImageChain"),
-                                 true, // firstofTypeFlag
-                                 (ossimVisitor::VISIT_INPUTS |
-                                  ossimVisitor::VISIT_CHILDREN) );
-   theContainer->accept( visitor );
-   theProductChain = visitor.getObjectAs<ossimImageChain>(0);
-   
-   if (!theProductChain.valid())
-   {
-      // Search for a connectable container specified that contains the entire product chain:
-      // ossimConnectableObject* obj2 = 
-      //    theContainer->findFirstObjectOfType(STATIC_TYPE_NAME(ossimImageFileWriter), true);
-      // ossimImageFileWriter* writer = PTR_CAST(ossimImageFileWriter, obj2);
-      visitor.reset();
-      visitor.setTypeName( ossimString( "ossimImageFileWriter" ) );
-      theContainer->accept( visitor );
-      ossimRefPtr<ossimImageFileWriter> writer = visitor.getObjectAs<ossimImageFileWriter>(0);
-      if ( writer.valid() )
-      {
-         theProductChain = dynamic_cast<ossimImageChain*>( writer->getInput() );
-      }
-
-      if (!theProductChain.valid())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL) << MODULE 
-            << " -- No processing chain defined for generating product." << std::endl;
-         return false; 
-      }
-   }
-
-   // The output projection is specified separately in the KWL:
-   ossimString prefix = "product.projection.";
-   theProductProjection = dynamic_cast<ossimMapProjection*>( 
-      ossimProjectionFactoryRegistry::instance()->createProjection(theKwl, prefix) );
-
-   const char* lookup = theKwl.find("igen.write_to_stdout");
-   if (lookup && ossimString(lookup).toBool())
-   {
-      theStdoutFlag = true;
-   }
-
-   return true;
-}
-
-//*************************************************************************************************
-//! Writes the output product image. Throws an ossimException if error encountered.
-//*************************************************************************************************
-void ossimIgen::outputProduct()
-{
-   // Verify that all vitals have been initialized:
-   if (!theProductChain.valid())
-   {
-      std::string err = "ossimIgen::outputProduct() ERROR:  No product processing chain has yet"
-         " been established. Nothing to output!";
-      throw(ossimException(err));
-   }
-   if (!theProductProjection.valid())
-   {
-      std::string err = "ossimIgen::outputProduct() ERROR:  No product projection has yet"
-         " been established. Nothing to output!";
-      throw(ossimException(err));
-   }
-
-   // Update the chain with the product view specified:
-   setView();
-   initializeChain();
-
-   // if it's a thumbnail then adjust the GSD and reset the view proj to the chain.
-   if(theBuildThumbnailFlag)
-      initThumbnailProjection();
-
-   ossimRefPtr<ossimImageSourceSequencer> sequencer = 0;
-
-#if OSSIM_HAS_MPI
-   // only allocate the slave connection if the number of processors is larger than 1
-   if(ossimMpi::instance()->getNumberOfProcessors() > 1)
-   {
-      if(ossimMpi::instance()->getRank()!=0)
-         sequencer = new ossimImageMpiSWriterSequenceConnection(0, theNumberOfTilesToBuffer);
-      else
-         sequencer = new ossimImageMpiMWriterSequenceConnection();
-   }
-#endif
-
-   // we will just load a serial connection if MPI is not supported.
-   // Threading?
-   if (!sequencer.valid() && (theThreadCount != 9999))
-      sequencer = new ossimMultiThreadSequencer(0, theThreadCount);
-
-   if (!sequencer.valid())
-      sequencer = new ossimImageSourceSequencer(0);
-
-
-   // Look for the first writer (should be the only writer) in our list of objects:
-
-   // ossimRefPtr<ossimImageFileWriter> writer  = 0;
-   // ossimConnectableObject::ConnectableObjectList imageWriters =
-   //    theContainer->findAllObjectsOfType(STATIC_TYPE_INFO(ossimImageFileWriter), false);
-
-   ossimTypeNameVisitor visitor( ossimString("ossimImageFileWriter"),
-                                 true, // firstofTypeFlag
-                                 (ossimVisitor::VISIT_INPUTS |
-                                  ossimVisitor::VISIT_CHILDREN) );
-   theContainer->accept( visitor );
-   ossimRefPtr<ossimImageFileWriter> writer = visitor.getObjectAs<ossimImageFileWriter>(0);
-   
-   if ( !writer.valid() )
-   {
-      sequencer = 0;
-      std::string err = "ossimIgen::outputProduct() ERROR:  No image writer object was found in "
-         " processing chain.";
-      throw(ossimException(err));
-   }
-
-   // writer = PTR_CAST(ossimImageFileWriter, imageWriters[0].get());
-   writer->changeSequencer(sequencer.get());
-   writer->connectMyInputTo(theProductChain.get());
-   
-   // Check for writing to standard output flag. Not all writers support this so check and 
-   // throw an error if not supported.
-   if (theStdoutFlag)
-   {
-      if ( writer->setOutputStream(std::cout) == false )
-      {
-         std::string err = "ERROR:  The write to standard out flag is set; however, writer does "
-            "not support going to standard out. Bummer...";
-         throw(ossimException(err));
-      }
-   }
-   
-   writer->initialize();
-
-   if ( theBuildThumbnailFlag )
-   {
-      //---
-      // Use theOutputRect as it has been clamped to be within the requested thumbnail size.
-      // 
-      // Relying of the bounding rectangle of the scaled product chain has given us off by
-      // one rectangles, i.e., a width of 513 instead of 512.
-      // 
-      // NOTE: This must be called after the writer->initialize() as
-      // ossimImageFileWriter::initialize incorrectly resets theAreaOfInterest
-      // back to the bounding rect.
-      //---
-      writer->setAreaOfInterest( ossimIrect(theOutputRect) );
-   }
-
-   // If multi-file tiled output is not desired perform simple output, handle special:
-   if(theTilingEnabled && theProductProjection.valid())
-   {
-      theTiling->initialize(*(theProductProjection.get()), theOutputRect);
-
-      ossimRectangleCutFilter* cut = NULL;
-      ossimTilingPoly* tilingPoly = dynamic_cast<ossimTilingPoly*>( theTiling.get() );
-      if (tilingPoly == NULL)
-      {
-         cut = new ossimRectangleCutFilter;
-         theProductChain->addFirst(cut);
-      }
-      
-      ossimFilename tempFile = writer->getFilename();
-      if(!tempFile.isDir())
-         tempFile = tempFile.path();
-
-      ossimString tileName;
-      ossimIrect clipRect;
-
-      // 'next' method modifies the mapProj which is the same instance as theProductProjection,
-      // so this data member is modified here, then later accessed by setView:
-      while(theTiling->next(theProductProjection, clipRect, tileName))
-      {
-         if (cut && tilingPoly == NULL)//use ossimTiling or ossimTilingRect
-         {
-            setView();
-            cut->setRectangle(clipRect);
-         }
-         else //otherwise use ossimTilingPoly
-         {
-            if (tilingPoly != NULL)
-            {
-               if (!tilingPoly->isFeatureBoundingIntersect())//if clip rect does not intersect with output rect, do nothing
-               {
-                  continue;
-               }
-               if (tilingPoly->useMbr())//if use_mbr flag is set to true, all pixels within the MBR will be preserved
-               {
-                  if (cut == NULL)
-                  {
-                      cut = new ossimRectangleCutFilter;
-                      theProductChain->addFirst(cut);
-                  }
-                  setView();
-                  cut->setRectangle(clipRect);
-               }
-               else
-               {
-                  if ( tilingPoly->hasExteriorCut() )
-                  {
-                     theProductChain->addFirst( tilingPoly->getExteriorCut().get() );
-                  }
-                  if ( tilingPoly->hasInteriorCut() )
-                  {
-                     theProductChain->addFirst( tilingPoly->getInteriorCut().get() );
-                  }
-               }
-            }
-         }
-         
-         initializeChain();
-         writer->disconnect();
-         writer->connectMyInputTo(theProductChain.get());
-         writer->setFilename(tempFile.dirCat(tileName));
-         writer->initialize();
-
-         if (!writeToFile(writer.get()))
-            break;
-      }
-   }
-   else
-   {
-      // No multi-file tiling, just conventional write to single file:
-      writeToFile(writer.get());
-   }
-
-   //########## DEBUG CODE FOR TIMING MULTI THREAD LOCKS ##############
-   if (sequencer.valid() && (theThreadCount != 9999))
-   {
-      ossimMultiThreadSequencer* mts = dynamic_cast<ossimMultiThreadSequencer*>(sequencer.get());
-      if (mts != NULL)
-      {
-
-         double jgtt = mts->d_jobGetTileT;
-         ossim_uint32 num_threads = mts->getNumberOfThreads();
-         double jgttpj = jgtt/num_threads;
-         cout<<setprecision(3)<<endl;
-         cout << "Multi-threading metrics ---"<<endl;
-         cout << "   Number of threads:      " << num_threads<< endl;
-         cout << "   Max cache used:         "<< mts->d_maxCacheUsed << endl;
-         cout << "   Cache emptied count:    "<< ossimString::toString(mts->d_cacheEmptyCount) << endl;
-         cout << "   Time waiting on jobs:   "<<mts->d_idleTime2<<" s"<<endl;
-         cout << "   Time waiting on cache:  "<<mts->d_idleTime5<<" s"<<endl;
-         cout << "   Handler getTile T:      "<<mts->handlerGetTileT()<<" s"<<endl;
-         cout << "   Job getTile T:          "<<jgtt<<" s"<<endl;
-         cout << "   Average getTile T/job:  "<<jgttpj<<" s\n"<<endl;
-      }
-   }
-   //##################################################################
-}
-
-//*************************************************************************************************
-//! Consolidates job of actually writing to the output file.
-//*************************************************************************************************
-bool ossimIgen::writeToFile(ossimImageFileWriter* writer)
-{
-   ossimStdOutProgress* prog = 0;
-   if ( (ossimMpi::instance()->getRank() == 0) && theProgressFlag)
-   {
-      // Add a listener to master.
-      prog = new ossimStdOutProgress(0, true);
-      writer->addListener(prog);
-   }
-
-   if (traceLog() && (ossimMpi::instance()->getRank() == 0))
-   {
-      ossimFilename logFile = writer->getFilename();
-      logFile.setExtension(ossimString("log"));
-
-      ossimRefPtr<ossimConnectableContainer> container = new ossimConnectableContainer;
-      writer->fillContainer(*container.get());
-      ossimKeywordlist logKwl;
-      container->saveState(logKwl);
-      logKwl.write(logFile.c_str());
-   }
-
-   try
-   {
-      writer->execute();
-   }
-
-   // Catch internal exceptions:
-   catch(const ossimException& e)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL)
-         << "ossimIgen::outputProduct ERROR:\n"
-         << "Caught exception!\n"
-         << e.what()
-         << std::endl;
-      return false;
-   }
-   catch(...)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL)
-         << "ossimIgen::outputProduct ERROR:\n"
-         << "Unknown exception caught!\n"
-         << std::endl;
-      return false;
-   }
-
-   if (prog)
-   {
-      writer->removeListener(prog);
-      delete prog;
-      prog = 0;
-   }
-
-   return true;
-}
-
-//*************************************************************************************************
-//! Initializes all clients of the view projection to the current product projection.
-//*************************************************************************************************
-void ossimIgen::setView()
-{
-   if( theProductChain.valid() && theProductProjection.valid() )
-   {
-      // Find all view clients in the chain, and notify them of the new view:
-#if 0
-      ossimConnectableObject::ConnectableObjectList clientList;
-      theProductChain->findAllInputsOfType(clientList, STATIC_TYPE_INFO(ossimViewInterface), true, true);
-      for(ossim_uint32 i = 0; i < clientList.size();++i)
-      {
-         ossimViewInterface* viewClient = dynamic_cast<ossimViewInterface*>( clientList[i].get() );
-         if (viewClient)
-            viewClient->setView(theProductProjection->dup());
-      }
-#endif
-      
-      ossimTypeNameVisitor visitor( ossimString("ossimViewInterface"),
-                                    false, // firstofTypeFlag
-                                    (ossimVisitor::VISIT_INPUTS|
-                                     ossimVisitor::VISIT_CHILDREN) );
-      theProductChain->accept( visitor );
-      for( ossim_uint32 i = 0; i < visitor.getObjects().size(); ++i )
-      {
-         ossimViewInterface* viewClient = visitor.getObjectAs<ossimViewInterface>( i );
-         if (viewClient)
-         {
-            viewClient->setView( theProductProjection->dup() );
-         }
-      }
-
-      // Force recompute of bounding rect:
-      initializeChain();
-   }
-}
-
-//*************************************************************************************************
-//! Modifies the production chain to output redused-resolution thumbnail image.
-//*************************************************************************************************
-void ossimIgen::initThumbnailProjection()
-{
-   double thumb_size = ossim::max(theThumbnailSize.x, theThumbnailSize.y);
-   ossimMapProjection* mapProj = dynamic_cast<ossimMapProjection*>(theProductProjection.get());
-
-   if(mapProj && !theOutputRect.hasNans())
-   {
-      double xScale = theOutputRect.width()  / thumb_size;
-      double yScale = theOutputRect.height() / thumb_size;
-      double scale = ossim::max(xScale, yScale);
-      mapProj->applyScale(ossimDpt(scale, scale), true);
-   }
-
-   // Need to change the view in the product chain:
-   setView();
-
-   // Clamp output rectangle to thumbnail bounds.
-   ossimDpt ul = theOutputRect.ul();
-   ossimDpt lr = theOutputRect.lr();
-   if ( (lr.x - ul.x + 1) > thumb_size)
-   {
-      lr.x = ul.x + thumb_size - 1;
-   }
-   if ( (lr.y - ul.y + 1) > thumb_size )
-   {
-      lr.y = ul.y + thumb_size - 1;
-   }
-   theOutputRect = ossimDrect(ul, lr);
-}
-
-//*************************************************************************************************
-// This method is called after a change is made to the product chain. It recomputes the bounding
-// rectangle.
-//*************************************************************************************************
-void ossimIgen::initializeChain()
-{
-   // Force initialization of the chain to recompute parameters:
-   theProductChain->initialize();
-   theOutputRect = theProductChain->getBoundingRect();
-   
-   if(!theOutputRect.hasNans())
-   {
-      // Stretch the rectangle out to integer boundaries.
-      theOutputRect.stretchOut();
-
-      // Communicate the new product size to the view's geometry object. This is a total HACK that 
-      // external code needs to worry about setting this. Something is wrong with this picture 
-      // (OLK 02/11)
-      ossimImageGeometry* geom = theProductChain->getImageGeometry().get();
-      if (geom)
-         geom->setImageSize(ossimIpt(theOutputRect.size()));
-   }
-}
diff --git a/src/ossim/parallel/ossimImageChainMtAdaptor.cpp b/src/ossim/parallel/ossimImageChainMtAdaptor.cpp
deleted file mode 100644
index 90ca102..0000000
--- a/src/ossim/parallel/ossimImageChainMtAdaptor.cpp
+++ /dev/null
@@ -1,458 +0,0 @@
-//*************************************************************************************************
-//                                            OSSIM
-//
-// License:  LGPL -- See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Oscar Kramer
-//
-// This class supports multi-threading of image chain getTile() requests and associated chain
-// updating. It accepts an original ossimImageChain object which is then cloned (replicated). 
-// One replicant per thread is created (counting the original as replicant[0]), with all replicants
-// sharing a common input handler (if directed) so that disk access is serialized and thread-safe.
-//
-//*************************************************************************************************
-// $Id$
-
-#include <ossim/parallel/ossimImageChainMtAdaptor.h>
-#include <ossim/parallel/ossimMtDebug.h>
-#include <ossim/base/ossimPreferences.h>
-#include <ossim/parallel/ossimImageHandlerMtAdaptor.h>
-#include <ossim/base/ossimVisitor.h>
-#include <ossim/base/ossimObjectFactoryRegistry.h>
-#include <iterator>
-
-static const char* NUM_THREADS_KW         = "ossimImageChainMtAdaptor.num_threads";
-static const char* ORIGINAL_SOURCE_ID_KW  = "ossimImageChainMtAdaptor.original_source_id";
-
-//*************************************************************************************************
-// Constructor.
-//*************************************************************************************************
-ossimImageChainMtAdaptor::ossimImageChainMtAdaptor()
-:  m_numThreads (0),
-   d_useSharedHandlers(false),
-   d_debugEnabled(false)
-{
-   //###### DEBUG ############
-   ossimMtDebug* mt_debug = ossimMtDebug::instance();
-   d_useSharedHandlers = mt_debug->chainSharedHandlers;
-   d_debugEnabled = mt_debug->chainDebugEnabled;
-   //###### END DEBUG ############
-}
-
-//*************************************************************************************************
-// Constructor with original image chain provided. This source becomes the first clone in the list.
-//*************************************************************************************************
-ossimImageChainMtAdaptor::ossimImageChainMtAdaptor(ossimImageChain* original,
-                                                   ossim_uint32 num_threads_req)
-:  m_numThreads (0),
-   d_useSharedHandlers(true),
-   d_debugEnabled(false)
-{
-   //###### DEBUG ############
-   ossimMtDebug* mt_debug = ossimMtDebug::instance();
-   d_useSharedHandlers = mt_debug->chainSharedHandlers;
-   d_debugEnabled = mt_debug->chainDebugEnabled;
-   //###### END DEBUG ############
-
-   setNumberOfThreads(num_threads_req); 
-   setOriginalChain(original); 
-}
-
-//*************************************************************************************************
-// Destructor.
-//*************************************************************************************************
-ossimImageChainMtAdaptor::~ossimImageChainMtAdaptor()
-{
-   removeListener((ossimConnectableObjectListener*)this);
-   m_clones.clear();
-   m_chainContainers.clear();
-}
-
-//*************************************************************************************************
-//! Alternate way of specifying number of threads to support. This is the same as the number of 
-//! clones that will be available after replicating the original chain.
-//*************************************************************************************************
-void ossimImageChainMtAdaptor::setNumberOfThreads(ossim_uint32 num_threads)
-{
-   if (m_numThreads == num_threads)
-      return;
-
-   // Determine number of cores/threads to set up:
-   if (num_threads > 0)
-   {
-      m_numThreads = num_threads;
-   }
-   else
-   {
-      // Look in ossim preferences if arg is provided above.
-      ossimString value = ossimPreferences::instance()->findPreference("ossim_threads");
-      if ( !value.empty() )
-         m_numThreads = value.toUInt32();
-   }
-
-   // If there is a valid original chain, we can perform the replication:
-   if (!m_chainContainers.empty())
-      replicate();
-}
-
-//*************************************************************************************************
-//! Alternate way of specifying the original chain being adapted for multi-threading.
-//*************************************************************************************************
-void ossimImageChainMtAdaptor::setOriginalChain(ossimImageChain* original)
-{
-   if (original == NULL)
-      return;
-
-   ossimImageSource* first_source = original->getFirstSource();
-   if (first_source == NULL)
-      return;
-
-   // Assign the adaptee and put it in the first position of the clones list:
-   m_adaptedChain = original;
-   m_clones.clear();
-   m_clones.push_back(first_source);
-
-   m_chainContainers.clear();
-   m_chainContainers.push_back(new ossimConnectableContainer);
-   m_adaptedChain->fillContainer(*m_chainContainers[0].get());
-
-   // If we know the number of threads, we can begin replicating:
-   if (m_numThreads > 1)
-      replicate();
-}
-
-//*************************************************************************************************
-// Creates clones of the original and pushes them onto the clone list.
-//
-// Need to consider the possibility that the original chain is a combiner with multiple image 
-// handler inputs, and also the possibility that one handler is wired to multiple input chains
-// before the combiner. In order to handle this, we will save the connection information for each 
-// input handler encountered so that we can later reproduce it using a shared handler (if requested)
-//*************************************************************************************************
-bool ossimImageChainMtAdaptor::replicate()
-{
-   if ((m_clones.empty()) || (m_numThreads == 0))
-      return false;
-
-   // Don't need to replicate if only one thread is being requested. This is not an error though:
-   if (m_numThreads == 1)
-      return true;
-
-   // If the handlers are to be shared, need to isolate them from the original chain and replace
-   // them with a "hollow adaptor" (i.e., a handler adaptor without the adaptee set yet:
-   m_sharedHandlers.clear();
-   if (d_useSharedHandlers)
-   {
-      if (m_chainContainers.empty())
-         return false;
-
-      // Collect all image handlers in original chain for possible sharing with all clones:
-      ossimTypeNameVisitor visitor (ossimString("ossimImageHandler"));
-      m_chainContainers[0]->accept(visitor);
-      ossimRefPtr<ossimImageHandler> handler = 0;
-      ossimRefPtr<ossimImageHandlerMtAdaptor> handler_adaptor = 0;
-      ossimRefPtr<ossimConnectableObject> output_connection = 0;
-      ossim_uint32 handler_idx = 0;
-
-      // Loop over all image handlers found in the original chain. Each handler's connection info
-      // is stored and the handler is removed temporarily from the original chain.
-      while (1) 
-      {
-         // Fetch a handler from the chain and wrap it with a handler adaptor:
-         handler = visitor.getObjectAs<ossimImageHandler>(handler_idx++);
-         if (handler == NULL)
-            break; // Only exit point of while loop
-         
-         handler_adaptor = new ossimImageHandlerMtAdaptor(handler.get());
-         m_sharedHandlers.push_back(handler_adaptor);
-
-         // Change ownership:
-         m_chainContainers[0]->removeChild(handler.get());
-         handler->changeOwner(this);
-      } 
-
-      // If no handler was found, we can't continue.
-      if (m_sharedHandlers.empty())
-         return false;
-   }
-
-   // Fetch the state of this and the original chain. This KWL will be used for creating replicas
-   // via the loadState. The saveState essentially bootstraps the replication task:
-   ossimKeywordlist kwl;
-   bool succeeded = saveState(kwl);
-
-   // The original chain may have had the handlers temporarily removed for the saveState in support
-   // of shared handlers. If so, need to restore them now:
-   if (d_useSharedHandlers)
-      succeeded = connectSharedHandlers(0);
-
-   // Finally, initialize THIS chain with the original chain's state. This call will also create
-   // the clones:
-   if (succeeded)
-      succeeded = loadState(kwl);
-
-   return succeeded;
-}
-
-//*************************************************************************************************
-// Deletes instances of all replicas from the clone list and leaves only the original.
-//*************************************************************************************************
-void ossimImageChainMtAdaptor::deleteReplicas()
-{
-   if (m_clones.size() > 1)
-   {
-      std::vector< ossimRefPtr<ossimImageSource> >::iterator first_copy = m_clones.begin();
-      first_copy++;
-      m_clones.erase(first_copy, m_clones.end());
-   }
-   m_numThreads = 1;
-}
-
-//*************************************************************************************************
-// Saves the state of the original chain along with number of clones present.
-//*************************************************************************************************
-bool ossimImageChainMtAdaptor::saveState(ossimKeywordlist& kwl, const char* prefix) const
-{
-   if (m_chainContainers.empty())
-      return false;
-
-   kwl.add(prefix, NUM_THREADS_KW, m_numThreads);
-   kwl.add(prefix, ORIGINAL_SOURCE_ID_KW, m_clones[0]->getId().getId());
-   
-   bool rtn_state = m_chainContainers[0]->saveState(kwl, prefix);
-
-   if (d_debugEnabled)
-      kwl.write("ossimImageChainMtAdaptor.kwl");
-
-   return rtn_state;
-}
-
-//*************************************************************************************************
-// Fetches the state of the original chain and regenerates the clones. Special handling is required
-// when the image handlers are to be shared among all clones.
-//*************************************************************************************************
-bool ossimImageChainMtAdaptor::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   bool succeeded;
-
-   // Reset this object:
-   deleteReplicas();
-
-   // Fetch this object's data members before moving onto original chain:
-   ossimString value = kwl.find(prefix, NUM_THREADS_KW);
-   if (value.empty())
-      return false;
-   m_numThreads = value.toUInt32();
-   if (m_numThreads == 0)
-      return false;
-
-   // The chain ID needs to be read from KWL:
-   ossimId orig_source_id (ossimId::INVALID_ID);
-   value = kwl.find(prefix, ORIGINAL_SOURCE_ID_KW);
-   if (value.empty())
-      return false;
-   orig_source_id.setId(value.toInt64());
-
-   // This loadState may be called for the purpose of replicating the existing original, or it can
-   // be intended as an adapter to a yet-to-be-instantiated original chain. Check if we already
-   // have a valid original chain:
-   ossimConnectableObject* candidate = 0;
-   ossimImageSource* original_source = 0;
-   if (!m_adaptedChain.valid() || m_chainContainers.empty())
-   {
-      m_chainContainers.clear();
-      m_chainContainers.push_back(new ossimConnectableContainer);
-      m_chainContainers[0]->loadState(kwl, prefix);
-
-      // Need to instantiate a new original. This is a bootstrap for a full initialization of this
-      // object. We'll need to replicate the clones afterwards:
-      ossimIdVisitor visitor (orig_source_id);
-      m_chainContainers[0]->accept(visitor);
-      candidate = visitor.getObject();
-      original_source = dynamic_cast<ossimImageSource*>(candidate);
-      if (original_source == NULL)
-         return false;
-      m_clones.push_back(original_source); // original is always in first position of clones list
-
-      // The original "chain" is morphed into a chain with a single child (original first source).
-      // This source is the one maintaining the connection to the rest of the sources in the real
-      // processing chain:
-      m_adaptedChain = new ossimImageChain;
-      m_adaptedChain->add(original_source);
-
-      // Now that we have an original chain, Recursive code to replicate clones:
-      succeeded = replicate();
-      if (!succeeded)
-         return false;
-   }
-
-   // We may be done:
-   if (m_numThreads == 1)
-      return true;
-
-   // In preparation for multi-threading jobs, loop to instantiate all clone chains. The container
-   // class is used to perform a deep copy of the original chain with all connections established.
-   // It would have been cleaner to just use the ossimImageChain::dup() but that method was not
-   // traversing the full chain, resulting in missing input sources:
-   succeeded = true;
-   for (ossim_uint32 i=1; (i<m_numThreads) && succeeded; ++i)
-   {
-      // Use original container's kwl to dup clone container, and pull out our chain of interest:
-      m_chainContainers.push_back(new ossimConnectableContainer);
-      m_chainContainers[i]->loadState(kwl, prefix);
-      
-      // Special handling required if the handlers are being shared. In this case, the handler had
-      // been removed from the original chain, so connections need to be identified and made:
-      if (d_useSharedHandlers)
-      {
-         succeeded = connectSharedHandlers(i);
-         if (!succeeded)
-            return false;
-      }
-
-      // Find the first (right-most) source in the chain and store it in the clone list. Need to
-      // Modify all IDs
-      ossimIdVisitor visitor (orig_source_id);
-      m_chainContainers[i]->accept(visitor);
-      candidate = visitor.getObject();
-      m_chainContainers[i]->makeUniqueIds();
-      ossimRefPtr<ossimImageSource> clone_source = dynamic_cast<ossimImageSource*>(candidate);
-      if (clone_source == NULL)
-         return false;
-      m_clones.push_back(clone_source);
-   }
-
-   return succeeded;
-}
-
-//*************************************************************************************************
-//! Adapts call to original chain so that all clones are initialized.
-//*************************************************************************************************
-void ossimImageChainMtAdaptor::initialize()
-{
-   for (size_t i=0; i<m_clones.size(); ++i)
-      m_clones[i]->initialize();
-}
-
-//*************************************************************************************************
-// Intercept this getTile because it should never be called directly. The tile request must go
-// to the specific chain clone.
-//*************************************************************************************************
-ossimRefPtr<ossimImageData> ossimImageChainMtAdaptor::getTile(const ossimIrect& tileRect,
-                                                                       ossim_uint32 resLevel)
-{
-   ossimNotify(ossimNotifyLevel_WARN)<<"ossimImageChainMtAdaptor::getTile() -- This method "
-      "Should never be called directly. The tile request must go to the specific chain clone. "
-      "Returning a tile using the original chain's getTile (not threaded)..."<<endl;
-   
-   if (!m_adaptedChain.valid())
-      return ossimRefPtr<ossimImageData>(0);
-      
-   return m_adaptedChain->getTile(tileRect, resLevel);
-}
-
-//*************************************************************************************************
-// Manages reconnecting shared image handlers to an image chain after its creation.
-// This is in support of shared image handlers. Returns TRUE if successful.
-//*************************************************************************************************
-bool ossimImageChainMtAdaptor::connectSharedHandlers(ossim_uint32 chain_index)
-{
-   if ((size_t)chain_index >= m_chainContainers.size())
-      return false;
-
-   // Loop over each adapted handler in our shared handler list:
-   SharedHandlerList::iterator handler = m_sharedHandlers.begin();
-   while (handler != m_sharedHandlers.end())
-   {
-      // Fetch all objects connected to this adapted handler. The list will point to objects in
-      // m_chainContainers[0], the original chain. The new chain's objects share the same ID's as
-      // the original chain for the moment. So we can search for the output connection 
-      // in the new chain using the ID of the corresponding object in the original chain:
-      ConnectableObjectList handler_connections = (*handler)->getOutputList();
-      ConnectableObjectList::iterator output_connection = handler_connections.begin();
-      while (output_connection != handler_connections.end())
-      {
-         ossimId obj_id = (*output_connection)->getId();
-         ossimIdVisitor visitor (obj_id);
-         m_chainContainers[chain_index]->accept(visitor);
-
-         // Get the pointer to the actual output object that needs to be connected to the shared
-         // handler:
-         ossimConnectableObject* output_obj = visitor.getObject();
-         if (output_obj == NULL)
-            return false; // Should never happen
-         output_obj->connectMyInputTo((*handler).get(), true, true);
-
-         output_connection++;
-      }
-      handler++;
-   }
-   return true;
-}
-
-
-//*************************************************************************************************
-// Adapts base class method for accessing connectables in the original chain.
-//*************************************************************************************************
-ossimConnectableObject::ConnectableObjectList& ossimImageChainMtAdaptor::imageChainList()
-{
-   // If there is no original chain defined, then just return our own blank list:
-   if (!m_adaptedChain.valid())
-      return theImageChainList;
-
-   return m_adaptedChain->imageChainList();
-}
-
-//*************************************************************************************************
-// Adapts base class method for accessing connectables in the original chain.
-//*************************************************************************************************
-const ossimConnectableObject::ConnectableObjectList& 
-   ossimImageChainMtAdaptor::imageChainList()const
-{
-   // If there is no original chain defined, then just return our own blank list:
-   if (!m_adaptedChain.valid())
-      return theImageChainList;
-
-   return m_adaptedChain->imageChainList();
-}
-
-//*************************************************************************************************
-//! Adapts the image chain event handler. If the event involves a change to the original image 
-//! chain, then the clones will need to be regenerated here.
-//*************************************************************************************************
-void ossimImageChainMtAdaptor::processEvent(ossimEvent& /* event */)
-{
-   ossimNotify(ossimNotifyLevel_WARN)<<"ossimImageChainMtAdaptor::processEvent() -- "
-      "NOT YET IMPLEMENTED"<<endl;
-}
-
-//*************************************************************************************************
-ossimImageSource* ossimImageChainMtAdaptor::getClone(ossim_uint32 index)
-{
-   if (index < (ossim_uint32) m_clones.size())
-      return m_clones[index].get();
-   
-   return 0;
-}
-
-//*************************************************************************************************
-//! Overrides base class implementation in order to make the connection to each clone. This 
-//! connection is typically to the multi-thread sequencer object.
-//*************************************************************************************************
-ossim_int32 ossimImageChainMtAdaptor::connectMyOutputTo(ossimConnectableObject* outputObject,
-                                                        bool makeInputConnection,
-                                                        bool createEventFlag)
-{
-   // Make output connection for each clone source:
-   std::vector< ossimRefPtr<ossimImageSource> >::iterator clone_source = m_clones.begin();
-   while (clone_source != m_clones.end())
-   {
-      (*clone_source)->connectMyOutputTo(outputObject, false, false);
-      clone_source++;
-   }
-
-   // Now make master connection including making input connection on outputObject and firing event:
-   return ossimConnectableObject::connectMyOutputTo(outputObject, 
-                                                    makeInputConnection, 
-                                                    createEventFlag);
-}
diff --git a/src/ossim/parallel/ossimMpi.cpp b/src/ossim/parallel/ossimMpi.cpp
deleted file mode 100644
index 21ad7f0..0000000
--- a/src/ossim/parallel/ossimMpi.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimMpi.cpp 13602 2008-09-25 14:23:32Z gpotts $
-
-#include <ossim/parallel/ossimMpi.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <time.h>
-#if OSSIM_HAS_MPI
-#  include <mpi.h>
-#endif
-
-#if OSSIM_ID_ENABLED
-static const char OSSIM_ID[] = "$Id: ossimMpi.cpp 13602 2008-09-25 14:23:32Z gpotts $";
-#endif
-
-static ossimTrace traceDebug = ossimTrace("ossimMpi:debug");
-
-ossimMpi* ossimMpi::theInstance=0;
-
-ossimMpi* ossimMpi::instance()
-{
-   if(!theInstance)
-   {
-      theInstance = new ossimMpi;
-   }
-   
-   return theInstance;
-}
-
-bool ossimMpi::isEnabled()const
-{
-   return theEnabledFlag;
-}
-
-void ossimMpi::barrier()
-{
-#if OSSIM_HAS_MPI
-   if(theEnabledFlag)
-   {
-      // Blocks until all processes have reached this routine.
-      MPI_Barrier( MPI_COMM_WORLD );
-   }
-#endif
-}
-
-ossim_float64 ossimMpi::getTime()const
-{
-#if OSSIM_HAS_MPI
-   if(theEnabledFlag)
-   {
-      return MPI_Wtime();
-   }
-   else
-   {
-      return time(0);
-   }
-#else
-   return time(0);
-#endif
-}
-
-void ossimMpi::initialize(int* argc, char*** argv)
-{
-#if OSSIM_HAS_MPI
-   int success=0;
-   success = MPI_Init(argc, argv);
-   if(success == MPI_SUCCESS)
-   {
-      theEnabledFlag = true;
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG ossimMpi::initialize\n"
-            << "MPI is initialized and running with "
-            << getNumberOfProcessors()
-            << " processors..."
-            << std::endl;
-      }
-   }
-   else
-   {
-      theEnabledFlag = false;
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG ossimMpi::initialize:  MPI is not initialized."
-            << std::endl;
-      }
-   }
-#else
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimMpi::initialize: Not compiled with mpi!"
-         << std::endl;
-   }
-#endif
-}
-void ossimMpi::setEnabledFlag(bool flag)
-{
-   theEnabledFlag = flag;
-}
-
-void ossimMpi::finalize()
-{
-#if OSSIM_HAS_MPI
-   if(theEnabledFlag)
-   {
-      int success;
-      success = MPI_Finalize();
-      if(traceDebug())
-      {
-         if(success == MPI_SUCCESS)
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "DEBUG ossimMpi::finalize(): mpi is finalized" << std::endl;
-         }
-         else
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "DEBUG ossimMpi::finalize(): "
-               << "mpi is not finalized successfully" << std::endl;
-         }
-      }
-   }
-#endif
-}
-
-int ossimMpi::getRank()const
-{
-   int result = 0;
-
-#if OSSIM_HAS_MPI
-   if(theEnabledFlag)
-   {
-      MPI_Comm_rank(MPI_COMM_WORLD, &result);
-   }
-#endif
-   
-   return result;
-}
-
-int ossimMpi::getNumberOfProcessors()const
-{
-   int result = 1;
-
-#if OSSIM_HAS_MPI
-   if(theEnabledFlag)
-   {
-      MPI_Comm_size(MPI_COMM_WORLD, &result);
-   }
-#endif
-
-   return result;
-}
-
-ossimMpi::ossimMpi()
-   : theEnabledFlag(false)
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimMpi::ossimMpi entered..."
-         << std::endl;
-#ifdef OSSIM_ID_ENABLED
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "OSSIM_ID = " << OSSIM_ID << std::endl;
-#endif
-   }
-}
-
-ossimMpi::ossimMpi(const ossimMpi& obj)
-   : theEnabledFlag(obj.theEnabledFlag)
-{}
-
-void ossimMpi::operator=(const ossimMpi& rhs)
-{
-   theEnabledFlag = rhs.theEnabledFlag; 
-}
diff --git a/src/ossim/parallel/ossimOrthoIgen.cpp b/src/ossim/parallel/ossimOrthoIgen.cpp
deleted file mode 100644
index a8ad157..0000000
--- a/src/ossim/parallel/ossimOrthoIgen.cpp
+++ /dev/null
@@ -1,2975 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimOrthoIgen.cpp 21962 2012-11-30 15:44:32Z dburken $
-
-
-#include <ossim/parallel/ossimOrthoIgen.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimObjectFactoryRegistry.h>
-#include <ossim/base/ossimPreferences.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimVisitor.h>
-#include <ossim/imaging/ossimBandSelector.h>
-#include <ossim/imaging/ossimCacheTileSource.h>
-#include <ossim/imaging/ossimGeoAnnotationSource.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageRenderer.h>
-#include <ossim/imaging/ossimHistogramRemapper.h>
-#include <ossim/imaging/ossimImageMosaic.h>
-#include <ossim/imaging/ossimBlendMosaic.h>
-#include <ossim/imaging/ossimBandMergeSource.h>
-#include <ossim/imaging/ossimFilterResampler.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/imaging/ossimOrthoImageMosaic.h>
-#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
-#include <ossim/imaging/ossimMaskFilter.h>
-#include <ossim/imaging/ossimTiffWriter.h>
-#include <ossim/imaging/ossimEsriShapeFileInterface.h>
-#include <ossim/imaging/ossimTilingRect.h>
-#include <ossim/imaging/ossimTilingPoly.h>
-#include <ossim/imaging/ossimGeoPolyCutter.h>
-#include <ossim/imaging/ossimEastingNorthingCutter.h>
-#include <ossim/imaging/ossimHistogramEqualization.h>
-#include <ossim/imaging/ossimImageHistogramSource.h>
-#include <ossim/imaging/ossimHistogramWriter.h>
-#include <ossim/imaging/ossimGeoAnnotationPolyObject.h>
-#include <ossim/imaging/ossimGeoAnnotationMultiPolyObject.h>
-#include <ossim/imaging/ossimPixelFlipper.h>
-#include <ossim/imaging/ossimScalarRemapper.h>
-#include <ossim/parallel/ossimIgen.h>
-#include <ossim/parallel/ossimMpi.h>
-#include <ossim/projection/ossimUtmProjection.h>
-#include <ossim/projection/ossimEquDistCylProjection.h>
-#include <ossim/projection/ossimEpsgProjectionFactory.h>
-
-#include <sstream>
-
-// In Windows, standard output is ASCII by default. 
-// Let's include the following in case we have
-// to change it over to binary mode.
-#if defined(_WIN32)
-#  include <io.h>
-#  include <fcntl.h>
-#endif
-
-
-static ossimTrace traceDebug("ossimOrthoIgen:debug");
-static ossimTrace traceLog("ossimOrthoIgen:log");
-
-static const char* AUTOGENERATE_HISTOGRAM_KW = "autogenerate_histogram";
-
-using namespace ossim;
-
-//*************************************************************************************************
-// Parses the file info as specified in the command line or src file. The file info is a '|'-
-// delimited string with filename and additional attributes such as entry and band numbers.
-//*************************************************************************************************
-bool ossimOrthoIgen::parseFilename(const ossimString& file_spec, bool decodeEntry)
-{
-   ossimSrcRecord src_record;
-
-   std::vector<ossimString> fileInfos = file_spec.split("|");
-   unsigned int num_fields = (unsigned int) fileInfos.size();
-   unsigned int field_idx = 0;
-
-   if (num_fields == 0)
-      return false;
-
-   // First field is the actual filename:
-   src_record.setFilename(fileInfos[field_idx]);
-   ++field_idx;
-
-   // Next field depends on whether an entry is being decoded:
-   if ((field_idx < num_fields) && decodeEntry)
-   {
-      src_record.setEntryIndex(fileInfos[field_idx].trim().toInt32());
-      ++field_idx;
-   }
-
-   // The rest of the fields can appear in any order:
-   while (field_idx < num_fields)
-   {
-      ossimString active_field (fileInfos[field_idx].trim());
-      ossimString downcased_field (active_field);
-      downcased_field.downcase();
-      ++field_idx;
-
-      // Check for overview file spec:
-      ossimFilename filename (active_field);
-      if (filename.contains(".ovr") || filename.isDir())
-      {
-         src_record.setSupportDir(filename.path());
-      }
-      else if (filename.contains(".mask") || filename.isDir())
-      {
-         src_record.setSupportDir(filename.path());
-      }
-
-      // else check for auto-minmax histogram stretch:
-      else if ((downcased_field == "auto-minmax") || downcased_field.contains("std-stretch"))
-      {
-         src_record.setHistogramOp(downcased_field);
-      }
-
-      // Otherwise, this must be a band specification. Band numbers begin with 1:
-      else
-      {
-         // multiple bands delimited by comma:
-         std::vector<ossimString> bandsStr = active_field.split(",");
-         std::vector<ossim_uint32> bands;
-         for (unsigned int i = 0; i < bandsStr.size(); i++)
-         {
-            int band = bandsStr[i].toInt32() - 1;
-            if (band >= 0)
-               bands.push_back((ossim_uint32)band);
-         }
-         src_record.setBands(bands);
-      }
-
-   } // end of while loop parsing fileInfos spec
-
-   theSrcRecords.push_back(src_record);
-   return true;
-}
-
-//*************************************************************************************************
-// Constructor
-//*************************************************************************************************
-ossimOrthoIgen::ossimOrthoIgen()
-   :
-   ossimIgen(),
-   theDeltaPerPixelUnit(OSSIM_UNIT_UNKNOWN),
-   theDeltaPerPixelOverride(ossim::nan(), ossim::nan()),
-   theProjectionType(OSSIM_UNKNOWN_PROJECTION),
-   theProjectionName(""),
-   theGeoScalingLatitude(ossim::nan()),
-   theCombinerType("ossimImageMosaic"),
-   theResamplerType("nearest neighbor"),
-   theWriterType(""),
-   theTemplateView(""),
-   theTilingTemplate(""),
-   theTilingFilename(""),
-   theChainTemplate(""),
-   theCombinerTemplate(""),
-   theAnnotationTemplate(""),
-   theWriterTemplate(""),
-   theSupplementaryDirectory(""),
-   theSlaveBuffers("2"),
-   theCutOriginType(ossimOrthoIgen::OSSIM_CENTER_ORIGIN),
-   theCutOrigin(ossim::nan(), ossim::nan()),
-   theCutDxDy(ossim::nan(), ossim::nan()),
-   theCutOriginUnit(OSSIM_UNIT_UNKNOWN),
-   theCutDxDyUnit(OSSIM_UNIT_UNKNOWN),
-   theLowPercentClip(ossim::nan()),
-   theHighPercentClip(ossim::nan()),
-   theStdDevClip(-1),
-   theUseAutoMinMaxFlag(false),
-   theClipToValidRectFlag(false),   
-   theReaderProperties(),
-   theWriterProperties(),   
-   theTargetHistoFileName(),
-   theProductFilename(),
-   theReferenceProj(0),
-   theMaskShpFile(""),
-   theCacheExcludedFlag(false),
-   theOutputRadiometry(""),
-   thePixelAlignment(OSSIM_PIXEL_IS_AREA) // will revert to "point" upon first occurrence in source list
-{
-   // Determine default behavior of clip from preferences:
-   ossimString flag = ossimPreferences::instance()->findPreference("orthoigen.clip_to_valid_rect");
-   if (!flag.empty())
-      theClipToValidRectFlag = flag.toBool();
-
-   thePixelReplacementMode = ossimPreferences::instance()->findPreference("orthoigen.flip_null_pixels"); 
-   return;
-}
-
-//*************************************************************************************************
-// Initializes the argument parser
-//*************************************************************************************************
-void ossimOrthoIgen::addArguments(ossimArgumentParser& argumentParser)
-{
-   // These are in ALPHABETIC ORDER. Please keep it that way.
-
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--annotate", "annotation keyword list");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--chain-template","Specify an external file that contains chain information");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--clamp-pixels <min> <max>","Specify the min and max allowed pixel values. All values "
-      "outside of this get mapped to their corresponding clamp value.");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--clip-pixels <min> <max>","Causes all pixel values between min and max (inclusive)"
-      " to be mapped to the null pixel value. Min and max can be equal for mapping a single value."
-      " See also related option \"--replacement-mode\" for additional explanation.");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--clip-to-valid-rect <true|false>","When true, any requested cut rect is clipped by the "
-      "valid image bounding rect to minimize null border pixels. If false, the output will "
-      "correspond to the cut rect as close as possible given the product projection. This option "
-      "overrides the ossim_preferences setting. If no cut options are supplied, this option is "
-      "ignored.");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--combiner-template","Specify an external file that contains combiner information");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--combiner-type","Specify what mosaic to use, ossimImageMosiac or ossimFeatherMosaic or "
-      "osimBlendMosaic ... etc");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--cut-bbox-en","Specify the min easting, min northing, max easting, max northing");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--cut-bbox-ll","Specify the min lat and min lon and max lat and maxlon <minLat> <minLon> "
-      "<maxLat> <maxLon>");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--cut-center-ll","Specify the center cut in lat lon space.  Takes two argument <lat> <lon>");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--cut-pixel-width-height","Specify cut box's width and height in pixels");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--cut-radius-meters","Specify the cut distance in meters.  A bounding box for the cut will "
-      "be produced");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--degrees","Specifies an override for degrees per pixel. Takes either a single value "
-      "applied equally to x and y directions, or two values applied correspondingly to x then y.");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--geo","Defaults to a geographic image chain with GSD = to the input.  Origin of latitude is"
-      "on the equator.");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--geo-scaled","Takes a latitude as an argument for purpose of scaling in the longitude "
-      "direction so that the pixels will appear nearly square in ground space at specified "
-      "latitude. Implies a geographic projection.");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--hist-auto-minmax","uses the automatic search for the best min and max clip values."
-      " Incompatible with other histogram options.");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--hist-match","Takes one image filename argument for target histogram to match."
-      " Incompatible with other histogram options.");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--hist-std-stretch","Specify histogram stretch as a standard deviation from the mean as"
-      " <int>, where <int> is 1, 2, or 3."
-      " Incompatible with other histogram options.");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--hist-stretch","Specify in normalized percent the low clip and then the high clip value"
-      " as <low.dd> <hi.dd>."
-      " Incompatible with other histogram options.");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--input-proj","Makes the view equal to the input.  If more than one file then the first is "
-      "taken");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--mask","Specify the ESRI shape file with polygons to clip the image");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--meters","Specifies an override for the meters per pixel. Takes either a single value "
-      "applied equally to x and y directions, or two values applied correspondingly to x then y.");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--no-cache","Excludes the cache from the input image chain(s). Necessary as a workaround "
-      " for inconsistent cache behavior for certain image types.");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--output-radiometry","Specifies the desired product's pixel radiometry type. Possible "
-      "values are: U8, U11, U16, S16, F32. Note this overrides the deprecated option \"scale-to"
-      "-8-bit\".");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--reader-prop","Passes a name=value pair to the reader(s) for setting it's property.  Any "
-      "number of these can appear on the line.");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--replacement-mode <mode>","Specify how to treat multi-band imagery when providing "
-      "clip-pixels and/or clamp-pixels settings. Possible values are: REPLACE_BAND_IF_TARGET | "
-      "REPLACE_BAND_IF_PARTIAL_TARGET | REPLACE_ALL_BANDS_IF_ANY_TARGET | "
-      "REPLACE_ONLY_FULL_TARGETS.");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--resample-type","Specify what resampler to use, nearest neighbor, bilinear, cubic");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--scale-to-8-bit","Scales the output to unsigned eight bits per band. This option has been"
-      " deprecated by the newer \"--output-radiometry\" option.");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--slave-buffers","number of slave tile buffers for mpi processing (default = 2)");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--srs","specify an output reference frame/projection. Example: --srs EPSG:4326");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--stdout","Output the image to standard out.  This will return an error if writer does not "
-      "support writing to standard out.  Callers should combine this with the --ossim-logfile "
-      "option to ensure output image stream does not get corrupted.  You must still pass an output "
-      "file so the writer type can be determined like \"dummy.png\".");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--supplementary-directory or --support","Specify the supplementary directory path where "
-      "overviews, histograms and external geometries are located");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "-t or --thumbnail", "thumbnail size");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--tiling-template","Specify an external file that contains tiling information");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--threads [n]","Indicates multi-threaded process using optionally-specified number of threads");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--utm","Defaults to a utm image chain with GSD = to the input");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--view-template","Specify an external file that contains view information");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "-w or --writer","Specifies the output writer.  Default uses output file extension to "
-      "determine writer.");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--wkt","specify an output reference frame/projection that is in a wkt format.  Must have the"
-      " ossimgdal_plugin compiled");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--writer-prop","Passes a name=value pair to the writer for setting it's property.  Any "
-      "number of these can appear on the line.");
-   argumentParser.getApplicationUsage()->addCommandLineOption(
-      "--writer-template","Specify an external file that contains tiling information"); 
-}
-
-//*************************************************************************************************
-// Initializes this objects data members given the command line args
-//*************************************************************************************************
-void ossimOrthoIgen::initialize(ossimArgumentParser& argumentParser)
-{
-   if(traceDebug())
-   {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimOrthoIgen::initialize DEBUG:"
-            << "Entered..... " 
-            << std::endl;
-   }
-   double tempDouble;
-   double tempDouble2;
-   double tempDouble3;
-   double tempDouble4;
-   ossimString tempString;
-   unsigned int tempUint;
-   ossimArgumentParser::ossimParameter stringParam(tempString);
-   ossimArgumentParser::ossimParameter doubleParam(tempDouble);
-   ossimArgumentParser::ossimParameter doubleParam2(tempDouble2);
-   ossimArgumentParser::ossimParameter doubleParam3(tempDouble3);
-   ossimArgumentParser::ossimParameter doubleParam4(tempDouble4);
-   ossimArgumentParser::ossimParameter uintParam(tempUint);
-   theCutOriginType = ossimOrthoIgen::OSSIM_CENTER_ORIGIN;
-   theCutOrigin.makeNan();
-   theCutDxDy.makeNan();
-   theCutOriginUnit   = OSSIM_UNIT_UNKNOWN;
-   theCutDxDyUnit     = OSSIM_UNIT_UNKNOWN;
-   theLowPercentClip  = ossim::nan();
-   theHighPercentClip = ossim::nan();
-   double minX=ossim::nan(), minY=ossim::nan(), maxX=ossim::nan(), maxY=ossim::nan();
-   theUseAutoMinMaxFlag = false;
-   theDeltaPerPixelOverride.makeNan();
-   theDeltaPerPixelUnit = OSSIM_UNIT_UNKNOWN;
-   theCacheExcludedFlag = false;
-   theClampPixelMin = ossim::nan();
-   theClampPixelMax = ossim::nan();
-   theClipPixelMin = ossim::nan();
-   theClipPixelMax = ossim::nan();
-   
-   if(argumentParser.read("--annotate", stringParam))
-   {
-      theAnnotationTemplate = ossimFilename(tempString);
-   }
-   if(argumentParser.read("-t", stringParam)   ||
-      argumentParser.read("--thumbnail", stringParam))
-   {
-      ossimString comma (",");
-      if (tempString.contains(comma))
-      {
-         theThumbnailSize.x = tempString.before(comma).toInt();
-         theThumbnailSize.y = tempString.after(comma).toInt();
-      }
-      else
-      {
-         theThumbnailSize.x = tempString.toInt();
-         theThumbnailSize.y = 0;
-      }
-      theBuildThumbnailFlag = true;
-   }
-
-   theReaderProperties.clear();
-   while(argumentParser.read("--reader-prop", stringParam))
-   {
-      std::vector<ossimString> splitArray;
-      tempString.split(splitArray, "=");
-      if(splitArray.size() == 2)
-      {
-         theReaderProperties.insert(std::make_pair(splitArray[0], splitArray[1]));
-      }
-   }
-
-   if(argumentParser.read("-w", stringParam)   ||
-      argumentParser.read("--writer", stringParam))
-   {
-      theWriterType = tempString;
-   }
-
-   theWriterProperties.clear();
-   
-   while(argumentParser.read("--writer-prop", stringParam))
-   {
-      std::vector<ossimString> splitArray;
-      tempString.split(splitArray, "=");
-      if(splitArray.size() == 2)
-      {
-         theWriterProperties.insert(std::make_pair(splitArray[0], splitArray[1]));
-      }
-   }
-         
-   if(argumentParser.read("--slave-buffers", stringParam))
-   {
-      theSlaveBuffers = tempString;
-   }
-   if(argumentParser.read("--cut-center-ll", doubleParam, doubleParam2))
-   {
-      theCutOrigin.lat = tempDouble;
-      theCutOrigin.lon = tempDouble2;
-      theCutOriginUnit = OSSIM_DEGREES;
-      theCutOriginType = ossimOrthoIgen::OSSIM_CENTER_ORIGIN;
-   }
-   if(argumentParser.read("--cut-radius-meters", doubleParam))
-   {
-      theCutDxDy.x = tempDouble;
-      theCutDxDy.y = tempDouble;
-      theCutDxDyUnit = OSSIM_METERS;
-   }
-   if(argumentParser.read("--cut-bbox-ll", doubleParam, doubleParam2, doubleParam3, doubleParam4))
-   {
-      minY = tempDouble;
-      minX = tempDouble2;
-      maxY = tempDouble3;
-      maxX = tempDouble4;
-      theCutOriginUnit = OSSIM_DEGREES;
-      theCutOriginType = ossimOrthoIgen::OSSIM_UPPER_LEFT_ORIGIN;
-      theCutOrigin.lat = maxY;
-      theCutOrigin.lon = minX;
-      theCutDxDy.lat   = (maxY-minY);
-      if ( (maxX < 0.0) && (minX >= 0.0) )
-      {
-         //---
-         // Min is eastern hemisphere, max is western. Crossed the international date line.
-         // Add 360 to make it positive.
-         //
-         // Note no check for just max < min here???  Perhaps throw exception.(drb)
-         //---
-         maxX += 360.0;
-      }      
-      theCutDxDy.lon   = (maxX-minX);
-      theCutDxDyUnit   = OSSIM_DEGREES;
-   }
-   if(argumentParser.read("--cut-bbox-en", doubleParam, doubleParam2, doubleParam3, doubleParam4))
-   {
-      minX = tempDouble;
-      minY = tempDouble2;
-      maxX = tempDouble3;
-      maxY = tempDouble4;
-      theCutOriginUnit = OSSIM_METERS;
-      theCutOriginType = ossimOrthoIgen::OSSIM_UPPER_LEFT_ORIGIN;
-      theCutOrigin.x = minX;
-      theCutOrigin.y = maxY;
-      theCutDxDy.x   = (maxX-minX);
-      theCutDxDy.y   = (maxY-minY);
-      theCutDxDyUnit   = OSSIM_METERS;
-   }
-   if(argumentParser.read("--cut-pixel-width-height", doubleParam, doubleParam2))
-   {
-      if((ossim::isnan(minX) == false)&&
-         (ossim::isnan(minY) == false)&&
-         (ossim::isnan(maxX) == false)&&
-         (ossim::isnan(maxY) == false))
-      {
-         theDeltaPerPixelOverride = ossimDpt(theCutDxDy.x/(tempDouble-1),
-                                             theCutDxDy.y/(tempDouble2-1));
-         theDeltaPerPixelUnit     = theCutDxDyUnit;
-      }
-      else
-      {
-         theCutOrigin.makeNan();
-         ossimNotify(ossimNotifyLevel_WARN) << "Can't have option --cut-pixel-width-height without --cut-bbox-ll" << std::endl;
-      }
-   }
-   
-   int num_params = argumentParser.numberOfParams("--degrees", doubleParam);
-   if (num_params == 1)
-   {
-      argumentParser.read("--degrees", doubleParam);
-      theDeltaPerPixelUnit = OSSIM_DEGREES;
-      theDeltaPerPixelOverride.x = tempDouble;
-      theDeltaPerPixelOverride.y = tempDouble;
-   }
-   else if (num_params == 2)
-   {
-      argumentParser.read("--degrees", doubleParam, doubleParam2);
-      theDeltaPerPixelUnit = OSSIM_DEGREES;
-      theDeltaPerPixelOverride.x = tempDouble;
-      theDeltaPerPixelOverride.y = tempDouble2;
-   }
-
-   // The three histogram options are mutually exclusive:
-   bool histo_op_selected = false;
-   if(argumentParser.read("--hist-match", stringParam))
-   {
-      ossimFilename target_image (tempString);
-      histo_op_selected = true;
-      
-      // Check for histogram matching request and initialize for that:
-      if (target_image.isReadable())
-      {
-         // Establish target histogram file:
-         theTargetHistoFileName = target_image;
-         theTargetHistoFileName.setExtension("his");
-         if (!theTargetHistoFileName.isReadable())
-         {
-            ossimNotify(ossimNotifyLevel_NOTICE)<<"Target histogram file <" << theTargetHistoFileName 
-               << "> not found. Cannot perform histogram matching." << std::endl;
-            theTargetHistoFileName.clear();
-         }
-      }
-   }
-   if(argumentParser.read("--hist-stretch", doubleParam, doubleParam2))
-   {
-      if (histo_op_selected)
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << "Cannot specify nore than one histogram operation. "
-            " Ignoring --hist-stretch option." << std::endl;
-      }
-      else
-      {
-         theLowPercentClip = tempDouble;
-         theHighPercentClip = tempDouble2;
-         histo_op_selected = true;
-      }
-   }
-   if(argumentParser.read("--hist-std-stretch", stringParam))
-   {
-      if (histo_op_selected)
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << "Cannot specify nore than one histogram operation. "
-            " Ignoring --hist-stretch option." << std::endl;
-      }
-      else
-      {
-         theStdDevClip = tempString.toInt32();
-         histo_op_selected = true;
-         if ((theStdDevClip < 1) || (theStdDevClip > 3))
-         {
-            ossimNotify(ossimNotifyLevel_WARN) << "Invalid standard deviation value provided with"
-               " --hist-std-stretch option. Only 1,2, or 3 allowed. Ignoring option."<< std::endl;
-         }
-      }
-   }
-   if(argumentParser.read("--hist-auto-minmax"))
-   {
-      if (histo_op_selected)
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << "Cannot specify nore than one histogram operation. "
-            " Ignoring --hist-auto-minmax option." << std::endl;
-      }
-      else
-         theUseAutoMinMaxFlag = true;
-   }
-
-   num_params = argumentParser.numberOfParams("--meters", doubleParam);
-   if (num_params == 1)
-   {
-      argumentParser.read("--meters", doubleParam);
-      theDeltaPerPixelUnit = OSSIM_METERS;
-      theDeltaPerPixelOverride.x = tempDouble;
-      theDeltaPerPixelOverride.y = tempDouble;
-   }
-   else if (num_params == 2)
-   {
-      argumentParser.read("--meters", doubleParam, doubleParam2);
-      theDeltaPerPixelUnit = OSSIM_METERS;
-      theDeltaPerPixelOverride.x = tempDouble;
-      theDeltaPerPixelOverride.y = tempDouble2;
-   }
-
-   if(argumentParser.read("--no-cache"))
-   {
-      theCacheExcludedFlag = true;
-   }
-
-   if(argumentParser.read("--output-radiometry", stringParam))
-   {
-      theOutputRadiometry = tempString;
-   }
-
-   if(argumentParser.read("--scale-to-8-bit"))
-   {
-      if (theOutputRadiometry.empty())
-         theOutputRadiometry = "U8";
-   }
-
-   if (argumentParser.read("--stdout"))
-   {
-#if defined(_WIN32)
-      // In Windows, cout is ASCII by default. 
-      // Let's change it over to binary mode.
-      int result = _setmode( _fileno(stdout), _O_BINARY );
-      if( result == -1 )
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimOrthoIgen::initialize WARNING:"
-            << "\nCannot set standard output mode to binary."
-            << std::endl;
-         return;
-      }
-#endif
-
-      theStdoutFlag = true;
-   }
-   
-   if(argumentParser.read("--writer-template", stringParam))
-   {
-      theWriterTemplate = tempString;
-   }
-   if(argumentParser.read("--tiling-template", stringParam))
-   {
-      theTilingTemplate = ossimFilename(tempString);
-   }
-   if(argumentParser.read("--chain-template", stringParam))
-   {
-      theChainTemplate = ossimFilename(tempString);
-   }
-   if(argumentParser.read("--combiner-template", stringParam))
-   {
-      theCombinerTemplate = ossimFilename(tempString);
-   }
-   
-   theGeoScalingLatitude = ossim::nan();
-
-   if (argumentParser.read("--utm"))
-   {
-      theProjectionType = OSSIM_UTM_PROJECTION;
-      theProjectionName = "ossimUtmProjection";
-   }
-   else if(argumentParser.read("--geo"))
-   {
-      theProjectionType = OSSIM_GEO_PROJECTION;
-      theProjectionName = "ossimEquDistCylProjection";
-      theGeoScalingLatitude = 0.0;
-   }
-   else if(argumentParser.read("--input-proj"))
-   {
-      theProjectionType = OSSIM_INPUT_PROJECTION;
-   }
-   else if (argumentParser.read("--srs", stringParam))
-   {
-      theCrsString=tempString;
-      theProjectionType = OSSIM_SRS_PROJECTION;
-   }
-
-   if(argumentParser.read("--view-template", stringParam))
-   {
-      theTemplateView = ossimFilename(tempString);
-      theProjectionType = OSSIM_EXTERNAL_PROJECTION;
-   }
-
-   if(argumentParser.read("--geo-scaled", doubleParam))
-   {
-      theProjectionType = OSSIM_GEO_PROJECTION;
-      theProjectionName = "ossimEquDistCylProjection";
-      if ( (tempDouble < 90.0) && (tempDouble > -90.0) )
-      {
-         theGeoScalingLatitude = tempDouble;
-      }
-      else
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimOrthoIgen::initialize WARNING:"
-            << "\nLatitude out  of range!  Must be between -90 and 90."
-            << std::endl;
-      }
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimOrthoIgen::initialize DEBUG:"
-            << "\ngeographicOriginOfLatitude:  " << theGeoScalingLatitude
-            << std::endl;
-      }
-   }
-   if(argumentParser.read("--combiner-type", stringParam))
-      theCombinerType = tempString;
-
-   if(argumentParser.read("--resample-type", stringParam))
-   {
-      theResamplerType = tempString;
-   }
-   if(argumentParser.read("--supplementary-directory", stringParam) ||
-      argumentParser.read("--support", stringParam))
-   {
-      theSupplementaryDirectory = ossimFilename(tempString);
-   }
-
-   if (argumentParser.read("--clip-to-valid-rect", stringParam))
-   {
-      theClipToValidRectFlag = tempString.toBool();
-   }
-
-   if(argumentParser.read("--mask", stringParam))
-   {
-     theMaskShpFile = tempString;
-   }
-
-   // Pixel flipper control options:
-   if (argumentParser.read("--clip-pixels", doubleParam, doubleParam2))
-   {
-      theClipPixelMin = tempDouble;
-      theClipPixelMax = tempDouble2;
-   }
-   if (argumentParser.read("--clamp-pixels", doubleParam, doubleParam2))
-   { 
-      theClampPixelMin = tempDouble;
-      theClampPixelMax = tempDouble2;
-   }
-   if (argumentParser.read("--replacement-mode", stringParam))
-   { 
-      thePixelReplacementMode = tempString;
-   }
-
-   // Threading:
-   num_params = argumentParser.numberOfParams("--threads", uintParam);
-   if (num_params == 0)   // No param means system decides optimal thread count
-   {
-      argumentParser.read("--threads");
-      theThreadCount = 0; // Flags system-resolved
-   }
-   else if (num_params == 1)
-   {
-      argumentParser.read("--threads", uintParam);
-      theThreadCount = (ossim_uint32) tempUint; 
-   }
-
-   if(traceDebug())
-   {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimOrthoIgen::initialize DEBUG:"
-            << "Leaving..... " 
-            << std::endl;
-   }
-}
-
-//*************************************************************************************************
-// Adds any file specifications to the files list
-//*************************************************************************************************
-void ossimOrthoIgen::addFiles(ossimArgumentParser& argumentParser,
-                              bool withDecoding,
-                              ossim_uint32 startIdx)
-{
-   ossim_uint32 idx = startIdx;
-   ossim_uint32 last_idx = argumentParser.argc()-1;
-   while(argumentParser.argv()[idx] && (idx < last_idx))
-   {
-     ossimString file_spec = argumentParser.argv()[idx];
-     if (file_spec.contains(".src"))
-     {
-        // input file spec provided via src file. Need to parse it:
-        addSrcFile(ossimFilename(file_spec));
-     }
-     else
-     {
-        // Filename with optional switches explicitly provided on command line:
-        parseFilename(file_spec, withDecoding);
-     }
-     ++idx;
-   }
-
-   // The last filename left on the command line should be the product filename:
-   theProductFilename = argumentParser.argv()[last_idx];
-}
-
-//*************************************************************************************************
-// Performs the top-level management of image generation
-//*************************************************************************************************
-bool ossimOrthoIgen::execute()
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimOrthoIgen::execute DEBUG: Entered ..."
-         << std::endl;
-   }
-//   double start=0, stop=0;
-
-   if(theSrcRecords.size() < 1)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimOrthoIgen::execute WARNING: No filenames to process"
-         << std::endl;
-      return false;
-   }
-
-   if (!theCrsString.empty() && !theProductFilename.empty())
-   {
-     if ((theProductFilename.ext().upcase() == "KMZ" || theProductFilename.ext().upcase() == "KML") 
-       && theCrsString.upcase() != "EPSG:4326")
-     {
-       ossimNotify(ossimNotifyLevel_FATAL)
-         << "ossimOrthoIgen::execute ERROR: Unsupported projection for kmz or kml"
-         << std::endl;
-       return false;
-     }
-   }
-
-   if(ossimMpi::instance()->getRank() == 0)
-   {
-      try
-      {
-         setupIgenChain();
-      }
-      catch (const ossimException& e)
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG) << e.what() << std::endl;
-         }
-         throw; // re-throw exception
-      }
-
-      if (traceLog())
-      {
-         generateLog();
-      }
-   }
-
-   try
-   {
-      // theProductProjection->print(cout) << endl;
-      outputProduct();
-   }
-   catch(const ossimException& e)
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << e.what() << std::endl;
-      }
-      throw; // re-throw
-   }
-   
-   return true;
-}
-
-//*************************************************************************************************
-// METHOD
-//*************************************************************************************************
-void ossimOrthoIgen::clearFilenameList()
-{
-   theSrcRecords.clear();
-}
-
-//*************************************************************************************************
-// Parses the .src file specified in the command line. These contain an alternate specification
-// of input file and associated attributes as a KWL.
-//*************************************************************************************************
-void ossimOrthoIgen::addSrcFile(const ossimFilename& src_file)
-{
-   if (!src_file.isReadable())
-      return;
-
-   ossimKeywordlist src_kwl;
-   src_kwl.setExpandEnvVarsFlag(true);
-   if ( src_kwl.addFile(src_file) == false ) return;
-
-   unsigned int image_idx = 0;
-   // int entry = -1;
-
-   // Loop to read all image file entries:
-   double sum_weights = 0;
-   while (true)
-   {
-      ossimSrcRecord src_record(src_kwl, image_idx++);
-      if (!src_record.valid()) 
-         break;
-
-      // Check for the presence of separate RGB file specs in this SRC record. This indicates 
-      // special processing. (comment added OLK 01/11)
-      if (src_record.isRgbData())
-      {
-         for (ossim_uint32 rgb_index = 0; rgb_index < 3; rgb_index++)
-         {
-            // This call creates another band-specific ossimSrcRecord that is pushed onto 
-            // theSrcRecords vector data member. (comment added OLK 01/11)
-            if (parseFilename(src_record.getRgbFilename(rgb_index), true))
-            {
-               // The parseFilename call pushes the R, G, or B band onto the back of theSrcRecords 
-               // vector. Set some additional attributes on this last entry. (OLK 01/11)
-               theSrcRecords.back().setRgbDataBool(true);
-               theSrcRecords.back().setHistogramOp(src_record.getRgbHistogramOp(rgb_index));
-               theSrcRecords.back().setHistogram(src_record.getRgbHistogramPath(rgb_index));
-               theSrcRecords.back().setOverview(src_record.getRgbOverviewPath(rgb_index));
-            }
-         }
-      }
-      else
-      {
-         // Not RGB data, so treat as conventional image: (comment added OLK 01/11)
-         theSrcRecords.push_back(src_record);
-         sum_weights += src_record.getWeight();
-
-         //if the vector file exists, set the mosaic combiner type to ossimBlendMosaic
-         if (src_record.isVectorData())
-            theCombinerType = "ossimBlendMosaic";
-      }
-   }
-
-   double max_weight = (sum_weights > 100.0 ? sum_weights : 100.0);
-   double num_entries = (double)theSrcRecords.size();
-   double weight; 
-   vector<ossimSrcRecord>::iterator iter = theSrcRecords.begin();
-   while (iter != theSrcRecords.end())
-   {
-      if (sum_weights > 0.0)
-      {
-         // Somebody declared opacity, so need to share the remaining contributions among
-         // other images:
-         theCombinerType = "ossimBlendMosaic";
-         if (iter->getWeight() == 0.0)
-         {
-            // No weight has been assigned for this image, so use default remaining partial
-            if (num_entries == 1.0)
-               weight = 1.0; // This is the only image, so full weight
-            else
-            {
-               // share remaining contributions:
-               weight = (1.0 - sum_weights/max_weight)/(num_entries - 1); 
-               if (weight < 0.01)
-                  weight = 0.01;
-            }
-         }
-         else
-         {
-            // An opacity value was specified for this
-            weight = iter->getWeight()/max_weight;
-         }
-      }
-      else
-      {
-         // No opacity values were specified, so simply use the default equal share. Note that the
-         // mosaic may not even be of type ossimBlendMosaic:
-         weight = 100.0/num_entries; // default if no opacity specified
-      }
-
-      iter->setWeight(weight);
-      iter++;
-   }
-}
-
-//*************************************************************************************************
-// METHOD
-//*************************************************************************************************
-void ossimOrthoIgen::setDefaultValues()
-{
-   theBuildThumbnailFlag = false;
-   theDeltaPerPixelUnit = OSSIM_UNIT_UNKNOWN;
-   theDeltaPerPixelOverride.makeNan();
-   theTemplateView = "";
-   theProjectionType = OSSIM_UNKNOWN_PROJECTION;
-   theGeoScalingLatitude = ossim::nan();
-   theCombinerType = "ossimImageMosaic";
-   theResamplerType = "nearest neighbor";
-   theTilingTemplate = "";
-   theTilingFilename = "";
-   theSupplementaryDirectory = "";
-   theSlaveBuffers = "2";
-   clearFilenameList();
-   theLowPercentClip = ossim::nan();
-   theHighPercentClip = ossim::nan();
-   theCutOrigin.makeNan();
-   theCutDxDy.makeNan();
-   theCutOriginUnit   = OSSIM_UNIT_UNKNOWN;
-   theCutDxDyUnit     = OSSIM_UNIT_UNKNOWN;
-
-   // PIXEL_IS_AREA HACK -- Set the assumed pixel alignment type to "area". Upon the first occurrence
-   // of a pixel-is-point entry, this property will revert to point. THIS NEEDS TO BE
-   // REMOVED WHEN THE EW GUI PROVIDES FOR THE USER TO SET THIS PROPERTY (OLK 09/11):
-   thePixelAlignment = OSSIM_PIXEL_IS_AREA; // not a default, but necessary for later logic
-}
-
-//*************************************************************************************************
-// Initializes the processing chain from the information on the command line
-//*************************************************************************************************
-void ossimOrthoIgen::setupIgenChain()
-{
-   if (traceDebug())
-      ossimNotify(ossimNotifyLevel_DEBUG)<< "ossimOrthoIgen::setupIgenChain DEBUG: Entered ..."<< std::endl;
-
-   setupTiling();
-
-   if (theSlaveBuffers == "")
-      theNumberOfTilesToBuffer = 2;
-   else
-      theNumberOfTilesToBuffer = theSlaveBuffers.toLong();
-
-   if(theProductFilename.empty())
-      throw(ossimException(std::string("Must supply an output file.")));
-
-   // Create the output mosaic object, to be connected to its inputs later:
-   ossimKeywordlist templateKwl;
-   templateKwl.clear();
-   ossimRefPtr<ossimImageCombiner> mosaicObject = 0;
-   ossimRefPtr<ossimImageCombiner> bandMergeObject = 0;
-   if(theCombinerTemplate.exists())
-   {
-      templateKwl.addFile(theCombinerTemplate);
-      mosaicObject = PTR_CAST(ossimImageCombiner, 
-                              ossimObjectFactoryRegistry::instance()->createObject(templateKwl));
-   }
-   if (!mosaicObject.valid())
-   {
-      mosaicObject = PTR_CAST(ossimImageCombiner, 
-         ossimObjectFactoryRegistry::instance()->createObject(theCombinerType));
-      if(!mosaicObject.valid())
-      {
-         mosaicObject = PTR_CAST(ossimImageMosaic, ossimObjectFactoryRegistry::instance()->
-            createObject(ossimString("ossimImageMosaic")));
-      }
-   }
-   
-   // Keep this pointer around for special processing if blend mosaic:
-   ossimBlendMosaic* obm = PTR_CAST(ossimBlendMosaic, mosaicObject.get());
-
-   // An orthomosaic implies that all input images are already orthorectified to a common projection
-   // so the input chains do not require a renderer:
-   bool orthoMosaic = (PTR_CAST(ossimOrthoImageMosaic, mosaicObject.get()) != 0);
-
-   // Establish default individual input chain from template, if any:
-   templateKwl.clear();
-   ossimRefPtr<ossimImageChain> default_single_image_chain = 0;
-   if(theChainTemplate.exists())
-   {
-      templateKwl.addFile(theChainTemplate);
-      ossimObject* obj = 0;
-      if(templateKwl.find("type"))
-         obj = ossimObjectFactoryRegistry::instance()->createObject(templateKwl);
-      else if(templateKwl.find("object1.type"))
-         obj = ossimObjectFactoryRegistry::instance()->createObject(templateKwl, "object1.");  
-      default_single_image_chain = PTR_CAST(ossimImageChain, obj);
-   }
-   if(!default_single_image_chain.valid())  // then create a default rendering chain
-   {
-      default_single_image_chain = new ossimImageChain;
-      {
-         // Only need a renderer if an output projection or an explicit GSD was specified.
-         if(!orthoMosaic)
-         {
-            ossimImageRenderer* renderer   = new ossimImageRenderer;
-            if (renderer->getResampler())
-               renderer->getResampler()->setFilterType(theResamplerType);
-            default_single_image_chain->addChild(renderer);
-         }
-      }
-   }
-
-   ossim_uint32 num_inputs = (ossim_uint32)theSrcRecords.size();
-   ossim_uint32 idx;
-   ossimString prefix ("object1.object");
-   theReferenceProj = 0;
-
-   // Loop over each input image file to establish a single image chain that will be added to the
-   // output mosaic:
-   ossimImageSource* current_source = 0;
-   for(idx = 0; idx < num_inputs; ++idx)
-   {
-      // first lets add an input handler to the chain:
-      ossimFilename input  = theSrcRecords[idx].getFilename();
-      ossimRefPtr<ossimImageHandler> handler = ossimImageHandlerRegistry::instance()->open(input);
-      if(!handler.valid())
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << "Could not open input file <" << input << ">. "
-            << "Skipping this entry." << std::endl;
-         continue;
-      }
-
-      // Pass on any reader properties if there are any.
-      ossimPropertyInterface* propInterface = (ossimPropertyInterface*)handler.get();
-      PropertyMap::iterator iter = theReaderProperties.begin();
-      while(iter != theReaderProperties.end())
-      {
-         propInterface->setProperty(iter->first, iter->second);
-         ++iter;
-      }
-
-      // Presently, handler->loadState() is called only on vector data, though in the future we
-      // should stuff many of the members in ossimSrcRecord in a KWL (similar to what is currently
-      // done with vector properties) so that the handler is initialized via loadState() instead of 
-      // individual calls to set methods.  OLK 10/10
-      if (theSrcRecords[idx].isVectorData())
-         handler->loadState(theSrcRecords[idx].getAttributesKwl());
-
-      std::vector<ossim_uint32> entryList;
-      if(theSrcRecords[idx].getEntryIndex() > -1 )
-         entryList.push_back(theSrcRecords[idx].getEntryIndex());
-      else
-         handler->getEntryList(entryList);
-
-      // Input image file may have multiple entries. Loop over each and establish single image
-      // chains for each:
-      ossim_uint32 entryIdx = 0;
-      for(entryIdx = 0; entryIdx < entryList.size(); ++entryIdx)
-      {
-         // Instantiate the chain for one input image source. Copy existing default chain
-         // which may already possess a renderer (so don't do any addFirst()!):
-         ossimImageChain* singleImageChain = (ossimImageChain*) default_single_image_chain->dup();
-
-         // Establish the image handler for this particular frame. This may be just
-         // the handler already opened in the case of single image per file:
-          ossimImageHandler* img_handler = 0;
-         if (entryList.size() == 1)
-            img_handler = handler.get();
-         else
-            img_handler = (ossimImageHandler*)handler->dup();
-
-         // The user can specify an external "support" (a.k.a. supplementary directory) several ways
-         if ( theSupplementaryDirectory.empty() == false )
-         {
-            img_handler->setSupplementaryDirectory( theSupplementaryDirectory );
-         }
-         else if (theSrcRecords[idx].getSupportDir().empty() == false)
-         {
-            img_handler->setSupplementaryDirectory(theSrcRecords[idx].getSupportDir());
-         }
-         else if (theSrcRecords[idx].getOverviewPath().empty() == false)
-         {
-            if (theSrcRecords[idx].getOverviewPath().isDir())
-               img_handler->setSupplementaryDirectory(theSrcRecords[idx].getOverviewPath());
-            else
-               img_handler->setSupplementaryDirectory(theSrcRecords[idx].getOverviewPath().path());
-         }
-         img_handler->setCurrentEntry(entryList[entryIdx]);
-         if ( img_handler->hasOverviews() )
-         {
-            img_handler->openOverview();
-         }
-         if (theSrcRecords[idx].isRgbData() && theSrcRecords[idx].getBands().size() > 0 && 
-            theSrcRecords[idx].getOverviewPath().empty())
-         {
-            img_handler->setOutputBandList(theSrcRecords[idx].getBands());
-         }
-
-         // Image handler is ready to insert on the input side of the chain:
-         singleImageChain->addLast(img_handler);
-         current_source = img_handler;
-
-         // PIXEL_IS_AREA HACK -- Scan the pixel alignment to see if all inputs are "area",
-         // in which case we override the command-line writer property setting. THIS NEEDS TO BE
-         // REMOVED WHEN THE EW GUI PROVIDES FOR THE USER TO SET THIS PROPERTY (OLK 09/11):
-         if (img_handler->getPixelType() == OSSIM_PIXEL_IS_POINT)
-            thePixelAlignment = OSSIM_PIXEL_IS_POINT;
-
-         // This call will check for the presence of a raster mask file alongside the image,
-         // and insert the mask filter in the chain if present:
-         current_source = setupRasterMask(singleImageChain, theSrcRecords[idx]);
-
-         // If this is the first input chain, use it as the reference projection to help with
-         // the instantiation of the product projection (the view):
-         if (!theReferenceProj.valid())
-         {
-            ossimRefPtr<ossimImageGeometry> geom = img_handler->getImageGeometry();
-            if ( geom.valid() ) 
-               theReferenceProj = geom->getProjection();
-         }
-
-         // Insert a partial-pixel flipper to remap null-valued pixels to min.  
-         // This is set via preference keyword "orthoigen.flip_null_pixels"  
-         current_source = setupPixelFlipper(singleImageChain, theSrcRecords[idx]);
-
-         // Install a band selector if needed:
-         if (theSrcRecords[idx].getBands().size() && (img_handler->getNumberOfOutputBands() > 1))
-         {
-            ossim_uint32 bands = img_handler->getNumberOfOutputBands();
-            bool validBand = true;
-            for (ossim_uint32 i = 0; i < theSrcRecords[idx].getBands().size(); ++i)
-            {
-               if (theSrcRecords[idx].getBands()[i] >= bands)
-               {
-                  validBand = false;
-                  ossimNotify(ossimNotifyLevel_FATAL) << " ERROR:" << "\nBand list range error!"
-                     << "\nHighest available band:  " << bands << std::endl;
-               }
-            }
-            if (validBand)
-            {
-               ossimRefPtr<ossimBandSelector> bs = new ossimBandSelector();
-               singleImageChain->insertRight(bs.get(), current_source);
-               bs->setOutputBandList(theSrcRecords[idx].getBands());
-               current_source = bs.get();
-            }
-         }
-
-         // Install a histogram object if needed. This inserts just to the left of the resampler.
-         setupHistogram(singleImageChain, theSrcRecords[idx]);
-
-         // Add a cache just to the left of the resampler.
-         if (!theCacheExcludedFlag)
-            addChainCache(singleImageChain);
-
-         // Add the single image chain to the mosaic and save it to the product spec file:
-         singleImageChain->makeUniqueIds();
-
-         if (theSrcRecords[idx].isRgbData())
-         {
-            if (bandMergeObject == 0)
-            {
-               bandMergeObject = new ossimBandMergeSource();
-            }
-            bandMergeObject->connectMyInputTo(singleImageChain);
-            singleImageChain->changeOwner(bandMergeObject.get());
-         }
-         else
-         {
-            mosaicObject->connectMyInputTo(singleImageChain);
-            singleImageChain->changeOwner(mosaicObject.get());
-         }
-         //theContainer->addChild(singleImageChain);
-
-         // Set the weight for this image when doing a blend mosaic:
-         if (obm)
-            obm->setWeight(idx, theSrcRecords[idx].getWeight());
-      }
-   }
-
-   // Finished initializing the inputs to the mosaic. Add the mosaic to the product chain.
-   theProductChain = new ossimImageChain;
-   if (bandMergeObject != 0)
-   {
-      theProductChain->addFirst(bandMergeObject.get());
-   }
-   theProductChain->addFirst(mosaicObject.get());
-   
-   // Now need to pass the product chain through the histogram setup for possible remapper given 
-   // target histogram (used when histo-matching selected):
-   setupHistogram();
-
-   // When mosaicking common input projections without rendering each, need to add a renderer to the
-   // mosaic for reprojecting to output projection:
-   if(orthoMosaic)
-   {
-      ossimImageRenderer* renderer   = new ossimImageRenderer;
-      renderer->getResampler()->setFilterType(theResamplerType);
-      theProductChain->addFirst(current_source);
-   }
-
-   //---
-   // Now that "theProductChain" is initialized we must initialize elevation if needed as it can
-   // affect the tie point of the output projection.
-   //---
-   if ( isAffectedByElevation() )
-   {
-      ossimInit::instance()->initializeElevation();
-
-      // Chain gsd's affected by elevation so recompute.
-      reComputeChainGsds();
-   }
-
-   // Set up the output product's projection:
-   setupProjection();
-
-   // Annotation setup...
-   setupAnnotation();
-
-   // Output rect cutter:
-   setupCutter();
-
-   // Output radiometry filter:
-   setupOutputRadiometry();
-
-   // After all the connections have been established, add the product chain to the overall 
-   // product container. This container will also hold the writer object.
-   theContainer->addChild(theProductChain.get());
-
-   // Lastly, set up the write object (object2):
-   setupWriter();
-
-}
-
-//*************************************************************************************************
-// Initializes the Cut Rect filter to crop the mosaic to specified rectangle.
-// This method assumes that the view (theProductProjection) has already been propagated to all 
-// the renderers (via call to setView()). This was done by prior call to setupProjection().
-//*************************************************************************************************
-void ossimOrthoIgen::setupCutter()
-{
-   // The command line accepts cut rect specification in several formats. Consolidate them to
-   // a common form (UL tiepoint <theCutOrigin> and distance to LR pixel center <theCutDxDy>. This
-   // method also updates the product projection with new bounds:
-   consolidateCutRectSpec();
-
-   ossimImageSource* input_source = theProductChain->getFirstSource();
-   if((theCutDxDy.hasNans()&&theMaskShpFile.empty())||!theProductProjection.valid()||!input_source)
-      return;
-
-   //user may pass the shape filename with an query (e.g C:/myshp.shp|select * from myshp),
-   //parse the name of mask shape file here
-   ossimString query = "";
-   if (!theMaskShpFile.empty())
-   {
-     if (theMaskShpFile.contains("|"))
-     {
-       ossimString fileName = theMaskShpFile;
-       std::vector<ossimString> fileList = fileName.split("|");
-       if (fileList.size() > 1)
-       {
-         theMaskShpFile = fileList[0];
-         query = fileList[1];
-       }
-     }
-   }
-
-   if (!theMaskShpFile.exists())
-   {
-     if (theCutOriginUnit == OSSIM_METERS)  // projection in meters...
-     {
-       ossimEastingNorthingCutter* cutter = new ossimEastingNorthingCutter;
-       ossimDpt mpp (theProductProjection->getMetersPerPixel());
-       ossimDpt lr (theCutOrigin.x + theCutDxDy.x - mpp.x, theCutOrigin.y - theCutDxDy.y + mpp.y);
-       cutter->setView(theProductProjection.get());
-       cutter->setEastingNorthingRectangle(theCutOrigin, lr);
-       theProductChain->addFirst(cutter);
-     }
-     else // geographic projection, units = decimal degrees.
-     {
-       ossimGeoPolyCutter* cutter = new ossimGeoPolyCutter;
-       std::vector<ossimGpt> polygon;
-
-       ossimDpt dpp (theProductProjection->getDecimalDegreesPerPixel());
-       ossimGpt ul(theCutOrigin.lat,                        theCutOrigin.lon               );
-       ossimGpt ur(theCutOrigin.lat,                        theCutOrigin.lon + theCutDxDy.x - dpp.x);
-       ossimGpt lr(theCutOrigin.lat - theCutDxDy.y + dpp.y, theCutOrigin.lon + theCutDxDy.x - dpp.x);
-       ossimGpt ll(theCutOrigin.lat - theCutDxDy.y + dpp.y, theCutOrigin.lon               );
-
-       polygon.push_back(ul);
-       polygon.push_back(ur);
-       polygon.push_back(lr);
-       polygon.push_back(ll);
-
-       cutter->setView(theProductProjection.get());
-       cutter->setNumberOfPolygons(1);
-       cutter->setPolygon(polygon);
-       theProductChain->addFirst(cutter);
-     }
-   }
-   else
-   {
-     ossimIrect inputRect = input_source->getBoundingRect();
-
-     ossimGeoPolyCutter* exteriorCutter = new ossimGeoPolyCutter;
-     exteriorCutter->setView(theProductProjection.get());
-
-     ossimGeoPolyCutter* interiorCutter = NULL;
-
-     ossimRefPtr<ossimImageHandler> shpHandler = ossimImageHandlerRegistry::instance()->open(theMaskShpFile);
-     ossimEsriShapeFileInterface* shpInterface = PTR_CAST(ossimEsriShapeFileInterface, shpHandler.get());
-     if (shpInterface != NULL)
-     {
-       if (!query.empty())
-       {
-         shpInterface->setQuery(query);
-       }
-       std::multimap<long, ossimAnnotationObject*> features = shpInterface->getFeatureTable();
-       if (features.size() > 0)
-       {
-         std::multimap<long, ossimAnnotationObject*>::iterator it = features.begin();
-         while (it != features.end())
-         {
-           ossimAnnotationObject* anno = it->second;
-           if (anno != NULL)
-           {
-             ossimGeoAnnotationPolyObject* annoPoly = PTR_CAST(ossimGeoAnnotationPolyObject, anno);
-             ossimGeoAnnotationMultiPolyObject* annoMultiPoly = NULL;
-             if (annoPoly == NULL)
-             {
-                annoMultiPoly = PTR_CAST(ossimGeoAnnotationMultiPolyObject, anno);
-             }
-             if (annoPoly != NULL)
-             {
-               std::vector<ossimGpt> polygon;
-
-               //get the points of a polygon
-               std::vector<ossimGpt> points = annoPoly->getPoints();
-               for (ossim_uint32 i = 0; i < points.size(); i++)
-               {
-                 polygon.push_back(points[i]);
-               }
-
-               //get polygon type, if it is an internal polygon, initialize the internal cutter
-               ossimGeoAnnotationPolyObject::ossimPolyType polyType = annoPoly->getPolyType();
-               if (polyType == ossimGeoAnnotationPolyObject::OSSIM_POLY_INTERIOR_RING)
-               {
-                 if (interiorCutter == NULL)
-                 {
-                   interiorCutter = new ossimGeoPolyCutter;
-                   interiorCutter->setView(theProductProjection.get());
-                   interiorCutter->setCutType(ossimPolyCutter::OSSIM_POLY_NULL_INSIDE);
-                 }
-                 interiorCutter->addPolygon(polygon);
-               }
-               else
-               {
-                 exteriorCutter->addPolygon(polygon);
-               }
-             }
-             else if (annoMultiPoly != NULL)
-             {
-               std::vector<ossimGeoPolygon> multiPolys = annoMultiPoly->getMultiPolygon();
-               for (ossim_uint32 i = 0; i < multiPolys.size(); i++)
-               {
-                 ossimGeoPolygon geoPoly = multiPolys[i];
-                 std::vector<ossimGeoPolygon> holePolys = geoPoly.getHoleList();
-                 if (holePolys.size() > 0)
-                 {
-                   if (interiorCutter == NULL)
-                   {
-                     interiorCutter = new ossimGeoPolyCutter;
-                     interiorCutter->setView(theProductProjection.get());
-                     interiorCutter->setCutType(ossimPolyCutter::OSSIM_POLY_NULL_INSIDE);
-                   }
-                   for (ossim_uint32 j = 0; j < holePolys.size(); j++)
-                   {
-                      interiorCutter->addPolygon(holePolys[j]);
-                   }
-                 }
-                 exteriorCutter->addPolygon(multiPolys[i]);
-               }
-             }
-             else
-             {
-                throw(ossimException(std::string("The geometry type of the mask shape file is not polygon.")));
-             }
-           }
-           it++;
-         }
-       }
-     }
-
-     //if user define the cut box, add it to the image chain
-     ossimGeoPolyCutter* boundCutter = NULL;
-     if (!theCutDxDy.hasNans() && !theCutOrigin.hasNans())
-     {
-       std::vector<ossimGpt> bound;
-       if (theCutOriginUnit == OSSIM_METERS)
-       {
-          ossimDpt mpp (theProductProjection->getMetersPerPixel());
-         ossimGpt ul = theProductProjection->inverse(ossimDpt(theCutOrigin.x, theCutOrigin.y));
-         ossimGpt ur = theProductProjection->inverse(ossimDpt(theCutOrigin.x + theCutDxDy.x - mpp.x, theCutOrigin.y));
-         ossimGpt lr = theProductProjection->inverse(ossimDpt(theCutOrigin.x + theCutDxDy.x - mpp.x, theCutOrigin.y - theCutDxDy.y + mpp.y));
-         ossimGpt ll = theProductProjection->inverse(ossimDpt(theCutOrigin.x, theCutOrigin.y - theCutDxDy.y + mpp.y));
-
-         bound.push_back(ul);
-         bound.push_back(ur);
-         bound.push_back(lr);
-         bound.push_back(ll);
-       }
-       else
-       {
-          ossimDpt dpp (theProductProjection->getDecimalDegreesPerPixel());
-          ossimGpt ul(theCutOrigin.lat,                        theCutOrigin.lon               );
-          ossimGpt ur(theCutOrigin.lat,                        theCutOrigin.lon + theCutDxDy.x - dpp.x);
-          ossimGpt lr(theCutOrigin.lat - theCutDxDy.y + dpp.y, theCutOrigin.lon + theCutDxDy.x - dpp.x);
-          ossimGpt ll(theCutOrigin.lat - theCutDxDy.y + dpp.y, theCutOrigin.lon               );
-
-         bound.push_back(ul);
-         bound.push_back(ur);
-         bound.push_back(lr);
-         bound.push_back(ll);
-       }
-       boundCutter = new ossimGeoPolyCutter;
-
-       boundCutter->setView(theProductProjection.get());
-       boundCutter->setNumberOfPolygons(1);
-       boundCutter->setPolygon(bound);
-     }
-
-     if (boundCutter == NULL)
-     {
-        ossimIrect shpRect = shpHandler->getBoundingRect();
-        if (shpRect.width() > inputRect.width() && shpRect.height() > inputRect.height())
-        {
-           exteriorCutter->setRectangle(inputRect);
-        }
-     }
-     
-     theProductChain->addFirst(exteriorCutter);
-
-     if (interiorCutter != NULL)
-     {
-       theProductChain->addFirst(interiorCutter);
-     }
-
-     if (boundCutter != NULL)
-     {
-        theProductChain->addFirst(boundCutter);
-     }
-   }
-}
-
-//*************************************************************************************************
-// METHOD 
-//*************************************************************************************************
-void ossimOrthoIgen::setupWriter()
-{
-   if (!theProductChain.valid())
-      return;
-
-   ossimRefPtr<ossimImageFileWriter> writer = 0;
-   
-   if (theWriterType.size())
-   {
-       // User selected writer with -w or --writer option.
-      writer = ossimImageWriterFactoryRegistry::instance()->createWriter(theWriterType);
-   }
-   else if ( theWriterTemplate.size() && theWriterTemplate.exists() )
-   {
-      // User sent us a writer template.
-      ossimKeywordlist kwlTemplate;
-      kwlTemplate.addFile(theWriterTemplate);
-
-      // Try first with no prefix.
-      writer = ossimImageWriterFactoryRegistry::instance()->createWriter(kwlTemplate);
-      if ( !writer.valid() )
-         writer = ossimImageWriterFactoryRegistry::instance()->createWriter(kwlTemplate, "object2.");
-   }
-   else if ( theTilingFilename == "%SRTM%")
-   {
-      ossimKeywordlist kwlWriter;
-      kwlWriter.add("type", "ossimGeneralRasterWriter", true);
-      kwlWriter.add("byte_order", "big_endian");
-      writer = ossimImageWriterFactoryRegistry::instance()->createWriter(kwlWriter);
-      theProductFilename = theProductFilename.path();
-   }
-   else if (!theTilingFilename.empty())
-   {
-      if (theProductFilename.isDir())
-      {
-         theProductFilename = theProductFilename + "/" + theTilingFilename;
-      }
-   }
-
-   try
-   {
-      //---
-      // Set the output file name if not already set.
-      // NOTE: Could be outputing to stdout in which case outputFilename does not
-      // make sense.  Leaving here though to not break code downstream. (drb)
-      //---
-      if ( theProductFilename == ossimFilename::NIL )
-      {
-         throw(ossimException(std::string("Writer output filename not set.")));
-      }
-
-      //---
-      // Final check for writer.
-      //---
-      if ( !writer.valid() )
-      {
-         // Derive writer from the extension.
-         ossimFilename ext = theProductFilename.ext();
-         if ( ext.size() )
-            writer = ossimImageWriterFactoryRegistry::instance()->createWriterFromExtension(ext);
-
-         //---
-         // Lastly default to tiff.  Perhaps throw exception here instead. (drb)
-         //---
-         if( !writer.valid() )
-         {
-            writer = new ossimTiffWriter;
-            theProductFilename.setExtension("tif");
-         }
-      }
-
-      // PIXEL_IS_AREA HACK: Temporary patch to override command line alignment type with source
-      // image's alignment type. TO BE REMOVED ONCE EW GUI PROVIDES FOR USER-SETTING OF THIS 
-      // PROPERTY (OLK 09/11):
-      if (thePixelAlignment == OSSIM_PIXEL_IS_AREA)
-      {
-          ossimString pixelType ("pixel_type");
-          theWriterProperties.erase(pixelType);
-          theWriterProperties.insert(std::make_pair(pixelType, ossimString("area")));
-      }
-
-      //---
-      // Set writer filename, connect and add to writer to keyword list.
-      //---
-      if ( writer.valid() )
-      {
-         writer->setFilename(theProductFilename);
-         writer->connectMyInputTo(0, theProductChain.get());
-
-         ossimPropertyInterface* propInterface = (ossimPropertyInterface*)writer.get();
-         PropertyMap::iterator iter = theWriterProperties.begin();
-         while(iter != theWriterProperties.end())
-         {
-            propInterface->setProperty(iter->first, iter->second);
-            ++iter;
-         }
-         theContainer->addChild(writer.get());
-      }
-      else
-      {
-         throw(ossimException(std::string("Unable to create writer.")));
-      }
-   }
-   catch (const ossimException& e)
-   {
-      if (traceDebug())
-         ossimNotify(ossimNotifyLevel_DEBUG) << e.what() << std::endl;
-      throw; // re-throw exception
-   }
-}
-
-
-//*************************************************************************************************
-// This method establishes the output (view) projection of the product.
-// NOTE: Completely rewritten to simplify and reduce redundancy. OLK 3/10
-//*************************************************************************************************
-void ossimOrthoIgen::setupProjection()
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)<<"Entering ossimOrthoIgen::setupProjection():"<<std::endl;
-   }
-
-   theProductProjection = 0;
-
-   // Throw exception if no valid input image projection was established:
-   if(!theReferenceProj.valid())
-   {
-      std::string errMsg = "ossimOrthoIgen::setupProjection() -- Could not establish input image's "
-         "projection. Cannot setup output view.";
-      throw(ossimException(errMsg));
-   }
-
-   // Fetch the reference input projection first. Settings may be copied to the product projection:
-   ossimMapProjection* ref_map = PTR_CAST(ossimMapProjection, theReferenceProj.get());
-
-   // Now focus on establishing the output product projection.
-   // Consider externally specified geometry first:
-   if (theProjectionType == OSSIM_EXTERNAL_PROJECTION)
-   {
-      if (!theTemplateView.isReadable())
-      {
-         ossimString errMsg = "ossimOrthoIgen::setupProjection() -- Could not read the product "
-            "projection template file at <";
-         errMsg += theTemplateView;
-         errMsg += ">. Cannot establish output projection.";
-         throw(ossimException(errMsg));
-      }
-
-      // Default template format is no prefix, but consider alternate with prefix if first attempt 
-      // fails:
-      ossimKeywordlist templateKwl (theTemplateView);
-      ossimObjectFactoryRegistry* ofr = ossimObjectFactoryRegistry::instance();
-      ossimRefPtr<ossimObject> productObj = ofr->createObject(templateKwl, "product.projection.");
-      if(!productObj.valid())
-         productObj = ofr->createObject(templateKwl);
-      theProductProjection = PTR_CAST(ossimMapProjection, productObj.get());
-   }
-
-   // Geographic? (Assuming WGS 84 for now.)
-   else if (theProjectionType == OSSIM_GEO_PROJECTION)
-   {
-      theProductProjection = new ossimEquDistCylProjection();
-      ossimGpt gpt(0.0, 0.0);
-      if (!ossim::isnan(theGeoScalingLatitude))
-        gpt = ossimGpt(theGeoScalingLatitude, 0.0);
-      theProductProjection->setOrigin(gpt);
-   }
-
-   // CRS code specified on the command line
-   else if (theProjectionType == OSSIM_SRS_PROJECTION)
-   {
-      ossimProjection* base_proj = 
-        ossimEpsgProjectionFactory::instance()->createProjection(theCrsString);
-
-      theProductProjection = PTR_CAST(ossimMapProjection, base_proj);
-      if(theProductProjection.valid())
-      {
-         // Reassign the type for geographic. Now we know
-         if (theProductProjection->isGeographic())
-         {
-            theProjectionType = OSSIM_GEO_PROJECTION;
-            ossimGpt gpt(0.0, 0.0);
-            if (!ossim::isnan(theGeoScalingLatitude))
-              gpt = ossimGpt(theGeoScalingLatitude, 0.0);
-            theProductProjection->setOrigin(gpt);
-         }
-      }
-      else
-      {
-         theProjectionType = OSSIM_UNKNOWN_PROJECTION;
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimOrthoIgen::setupProjection() WARNING:" << " Unsupported spatial reference system."
-            << " Will default to the projection from the input image."
-            << std::endl;
-      }
-   }
-
-   // UTM?
-   else if (theProjectionType == OSSIM_UTM_PROJECTION)
-   {
-      ossimUtmProjection* utm = new ossimUtmProjection;
-      ossimGpt refGpt;
-      theReferenceProj->lineSampleToWorld(ossimDpt(0,0), refGpt);
-
-      utm->setZone(refGpt);
-      utm->setHemisphere(refGpt);
-      theProductProjection = utm;
-   }
-
-   // None of the above?
-   else
-   {
-      // Either OSSIM_INPUT_PROJECTION or OSSIM_UNKNOWN_PROJECTION. In both cases
-      // just use the first image's input projection for the output. Need to make 
-      // sure the input_proj is a map projection though:
-      if (ref_map)
-      {
-         theProductProjection = PTR_CAST(ossimMapProjection, ref_map->dup());
-         theProjectionType = OSSIM_INPUT_PROJECTION; // just in case it was unknown before
-      }
-      else
-      {  
-         theProjectionType = OSSIM_GEO_PROJECTION;
-         theProductProjection = new ossimEquDistCylProjection();
-
-         ossimGpt gpt(0.0, 0.0);
-         if (!ossim::isnan(theGeoScalingLatitude))
-            gpt = ossimGpt(theGeoScalingLatitude, 0.0);
-         theProductProjection->setOrigin(gpt);
-      }  
-   }
-
-   // At this point there should be a valid output projection defined:
-   if (!theProductProjection.valid())
-   {
-      std::string errMsg = "ossimOrthoIgen::setupProjection() -- Could not establish valid output "
-         "projection";
-      throw(ossimException(errMsg));
-   }
-
-   // HACK (OLK 06/10): The projection may not have had the PCS code initialized even though it
-   // is an EPSG projection, so take this opportunity to identify a PCS for output:
-   ossim_uint32 pcs_code = theProductProjection->getPcsCode();
-   if (pcs_code == 0)
-   {
-      pcs_code = ossimEpsgProjectionDatabase::instance()->
-         findProjectionCode(*(theProductProjection.get()));
-      theProductProjection->setPcsCode(pcs_code);
-   }
-
-   // Bootstrap the process of establishing the mosaic tiepoint by setting it to the reference proj.
-   if (ref_map)
-      theProductProjection->setUlGpt(ref_map->getUlGpt());
-
-   // cout << "ref_map->getUlGpt(): " << ref_map->getUlGpt() << endl;
-
-   // Base class makes sure the product view projection is properly wired into the chain. 
-   setView();
-
-   // Set the desired image GSD. This is nontrivial due to the many ways GSD can be implied and/or
-   // explicitly provided. This method also does a setView before returning:
-   setProductGsd();
-
-   theProjectionName = theProductProjection->getProjectionName();
-
-   // At this point, the product projection will not have a tiepoint (UL corner coordinates)
-   // defined unless it is the same projection as the input reference. Need to set it now. Note that
-   // if a cut-rect is specified, the tie-point will be modified later in setupCutter()
-   establishMosaicTiePoint();
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimOrthoIgen::setupProjection DEBUG:"
-         << "Leaving...." << __LINE__
-         << std::endl;
-   }
-}
-
-//*************************************************************************************************
-// METHOD
-//*************************************************************************************************
-void ossimOrthoIgen::setupAnnotation()
-{
-   ossimImageSource* input_source = theProductChain->getFirstSource();
-   if (!input_source)
-      return;
-
-   if(theAnnotationTemplate.exists() == false)
-      return;
-   
-   ossimKeywordlist templateKwl;
-   if (templateKwl.addFile(theAnnotationTemplate) == false)
-      return;
-   
-   ossimRefPtr<ossimObject> obj = ossimObjectFactoryRegistry::instance()->
-      createObject(templateKwl, "object1.");
-   if (obj.valid())
-   {
-      ossimGeoAnnotationSource* oga = PTR_CAST(ossimGeoAnnotationSource, obj.get());
-      if (oga)
-      {
-         if (theProductProjection.valid())
-            oga->setGeometry(new ossimImageGeometry(0, theProductProjection.get())); 
-         theProductChain->addFirst(oga);
-      }
-   }
-   return;
-}
-
-//*************************************************************************************************
-// Set up multi-file tiling if indicated on the command line.
-//*************************************************************************************************
-bool ossimOrthoIgen::setupTiling()
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimOrthoIgen::setupTiling: Entered......" << std::endl;
-   }
-   ossimKeywordlist templateKwl;
-   ossimFilename outputFilename = theProductFilename;
-   theTilingEnabled = false;
-
-   if ((theTilingTemplate == "")||(!templateKwl.addFile(theTilingTemplate)))
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimOrthoIgen::setupTiling: Leaving......" << __LINE__ << std::endl;
-      }
-      return false;
-   }
-
-   ossimString prefix ("igen.tiling.");
-   while (1)
-   {
-      if(outputFilename.isDir())
-      {
-         if(templateKwl.find(prefix.chars(), "type"))
-         {
-            theTilingFilename = templateKwl.find(prefix.chars(),"tile_name_mask");
-            theTilingEnabled = true;
-            break;
-         }
-         else if (templateKwl.find(prefix.chars(), "tile_size") || templateKwl.find(prefix.chars(), "tile_source"))
-         {
-            theTilingFilename = templateKwl.find(prefix.chars(),"output_file_name");
-            theTilingEnabled = true;
-            break;
-         }
-      }
-      else
-      {
-         theTilingFilename = outputFilename.file();
-         if (!theTilingFilename.contains("%"))
-         {
-            ossimString fileNoExt = theTilingFilename.fileNoExtension();
-            ossimString ext = theTilingFilename.ext();
-            theTilingFilename = fileNoExt + "_%r%_%c%." + ext;
-         }
-         if(templateKwl.find(prefix.chars(), "type"))
-         {
-            templateKwl.add(prefix.chars(), "tile_name_mask", theTilingFilename.c_str(), true);
-            ossimFilename path (outputFilename.path());
-            theProductFilename = path;
-            theTilingEnabled = true;
-            break;
-         }
-         else if (templateKwl.find(prefix.chars(), "tile_size") || templateKwl.find(prefix.chars(), "tile_source"))
-         {
-            templateKwl.add(prefix.chars(), "output_file_name", theTilingFilename.c_str(), true);
-            ossimFilename path (outputFilename.path());
-            theProductFilename = path;
-            theTilingEnabled = true;
-            break;
-         }
-      }
-
-      // If we got here, then no matches were found in the template. Try again but without a prefix:
-      if (prefix.empty())
-         break;
-      prefix.clear();
-   }
-
-   // Initialize the tiling object if enabled:
-   if (templateKwl.find(prefix.chars(), "tile_size"))
-   {
-      theTiling = 0;
-      theTiling = new ossimTilingRect;
-   }
-
-   if (templateKwl.find(prefix.chars(), "tile_source"))
-   {
-      theTiling = 0;
-      theTiling = new ossimTilingPoly;
-   }
-
-   if (theTilingEnabled && !theTiling->loadState(templateKwl, prefix))
-      theTilingEnabled = false;
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimOrthoIgen::setupTiling: templateKwl = \n" << templateKwl << std::endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimOrthoIgen::setupTiling: Leaving......" << __LINE__ << std::endl;
-   }
-   
-   return true;
-}
-
-//*************************************************************************************************
-// Consolidates specification of bounding rect given various ways of specifying on the command
-// line. This avoids multiple, redundant checks scattered throughout the code. On exit:
-// 
-//   1. theCutOriginType is converted to OSSIM_UPPER_LEFT_ORIGIN
-//   2. theCutOrigin is converted to the proper coordinates (lat/lon or easting/northing) and
-//      associated theCutOriginUnits is assigned accordingly.
-//   3. theCutDxDy reflects the full size of the rect, in the units corresponding to the projection
-//      and associated theCutDxDyUnit is set to METERS for UTM, DEGREES for geographic
-//   4. The product projection's origin (image center) and tie point are updated to reflect the
-//      output rectangle.
-//
-//*************************************************************************************************
-void ossimOrthoIgen::consolidateCutRectSpec()
-{
-   if (!theProductProjection.valid() || theCutDxDy.hasNans() || theCutOrigin.hasNans())
-      return; 
-
-   if ((theCutDxDyUnit != OSSIM_METERS) && 
-       (theCutDxDyUnit != OSSIM_DEGREES) &&
-       (theCutDxDyUnit != OSSIM_UNIT_UNKNOWN))
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "ossimOrthoIgen::consolidateCutRectSpec: An unhandled"
-         " type of units was encountered. The cut rect needs to be specified in either meters or"
-         " degrees. The resulting cut rect and origin may be incorrect." << std::endl;
-      return;
-   }
-
-   ossimGpt originPLH;
-   ossimDpt resolution;
-
-   // Geographic Projection (lat/lon cut rect) requested?
-   if(theProductProjection->isGeographic()) 
-   {
-      // geographic projection; units need to be decimal degrees. First check for consistent origin:
-      if (theCutOriginUnit == OSSIM_METERS)
-      {
-         originPLH = theProductProjection->inverse(theCutOrigin);
-         theCutOrigin.x = originPLH.lon;
-         theCutOrigin.y = originPLH.lat;
-      }
-      else
-      {
-         originPLH.lat = theCutOrigin.y;
-         originPLH.lon = theCutOrigin.x;
-      }
-
-      // Check for consistent rect size:
-      if (theCutDxDyUnit == OSSIM_METERS)
-      {
-         ossimDpt mtrs_per_deg (originPLH.metersPerDegree());
-         theCutDxDy.x = theCutDxDy.x/mtrs_per_deg.x;
-         theCutDxDy.y = theCutDxDy.y/mtrs_per_deg.y;
-      }
-
-      // Set these to the correct units. May already be correct, but just in case...
-      theCutOriginUnit = OSSIM_DEGREES; 
-      theCutDxDyUnit = OSSIM_DEGREES; 
-
-      if (theClipToValidRectFlag)
-      {
-         // Now we need to clip the cut rect by the valid image footprint for the entire mosaic:
-         ossimDrect boundingRect = theProductChain->getBoundingRect(); // in view coordinates
-
-         // The bounding rect is in image space. Since pixel-is-point, the actual valid area on the
-         // ground will extend 1/2 pixel beyond the centers, so grow the bounding rect by 1/2 p:
-         boundingRect.expand(ossimDpt(0.5, 0.5));
-         ossimGpt mosaic_ul, mosaic_lr;
-         theProductProjection->lineSampleHeightToWorld(boundingRect.ul(), 0, mosaic_ul);
-         theProductProjection->lineSampleHeightToWorld(boundingRect.lr(), 0, mosaic_lr);
-
-         // Establish the LR bound defined by the cut-rect and clip the cut-rect if necessary:
-         ossimGpt cutrect_lr (theCutOrigin.lat - theCutDxDy.lat, theCutOrigin.lon + theCutDxDy.lon);
-         if (mosaic_ul.lat < theCutOrigin.lat)
-            theCutOrigin.lat = mosaic_ul.lat;
-         if (mosaic_lr.lat > cutrect_lr.lat)
-            theCutDxDy.lat = theCutOrigin.lat - mosaic_lr.lat;
-         if (mosaic_ul.lon > theCutOrigin.lon)
-            theCutOrigin.lon = mosaic_ul.lon;
-         if (mosaic_lr.lon < cutrect_lr.lon)
-            theCutDxDy.lon = mosaic_lr.lon - theCutOrigin.lon;
-      }
-
-      resolution = theProductProjection->getDecimalDegreesPerPixel();
-   }
-
-   // Map Projection (easting, northing cut rect) requested?
-   else 
-   {
-      // Special case code to account for origin and delta being specified in geographic, leading to
-      // offset error due to northing difference between UL and UR corners at constant lat:
-      if ((theCutOriginType == OSSIM_UPPER_LEFT_ORIGIN) &&
-          (theCutOriginUnit == OSSIM_DEGREES) && (theCutDxDyUnit == OSSIM_DEGREES))
-      {
-         ossimGpt ulgp (theCutOrigin.lat                 , theCutOrigin.lon                 , 0);
-         ossimGpt urgp (theCutOrigin.lat                 , theCutOrigin.lon + theCutDxDy.lon, 0);
-         ossimGpt llgp (theCutOrigin.lat - theCutDxDy.lat, theCutOrigin.lon                 , 0);
-         ossimGpt lrgp (theCutOrigin.lat - theCutDxDy.lat, theCutOrigin.lon + theCutDxDy.lon, 0);
-
-         ossimDpt ulen (theProductProjection->forward(ulgp));
-         ossimDpt uren (theProductProjection->forward(urgp));
-         ossimDpt llen (theProductProjection->forward(llgp));
-         ossimDpt lren (theProductProjection->forward(lrgp));
-         
-         double n_top    = (ulen.y > uren.y ? ulen.y : uren.y);
-         double n_bottom = (llen.y < lren.y ? llen.y : lren.y);
-         double e_left   = (ulen.x < llen.x ? ulen.x : llen.x);
-         double e_right  = (uren.x > lren.x ? uren.x : lren.x);
-
-         theCutOrigin.x = e_left;
-         theCutOrigin.y = n_top;
-
-         theCutDxDy.x = e_right - e_left;
-         theCutDxDy.y = n_top - n_bottom;
-
-         if (theClipToValidRectFlag)
-         {
-            // Now we need to clip the cut rect by the valid image footprint for the entire mosaic:
-            ossimDrect boundingRect = theProductChain->getBoundingRect(); // in view coordinates
-            boundingRect.expand(ossimDpt(0.5, 0.5));
-            ossimDpt mosaic_ul, mosaic_lr;
-            theProductProjection->lineSampleToEastingNorthing(boundingRect.ul(), mosaic_ul);
-            theProductProjection->lineSampleToEastingNorthing(boundingRect.lr(), mosaic_lr);
-
-            // Establish the LR bound defined by the cut-rect and clip the cut-rect if necessary:
-            ossimDpt cutrect_lr (theCutOrigin.x + theCutDxDy.x, theCutOrigin.y - theCutDxDy.y);
-            if (mosaic_ul.y < theCutOrigin.y)
-               theCutOrigin.y = mosaic_ul.y;
-            if (mosaic_lr.y > cutrect_lr.y)
-               theCutDxDy.y = theCutOrigin.y - mosaic_lr.y;
-            if (mosaic_ul.x > theCutOrigin.x)
-               theCutOrigin.x = mosaic_ul.x;
-            if (mosaic_lr.x < cutrect_lr.x)
-               theCutDxDy.x = mosaic_lr.x - theCutOrigin.x;
-         }
-      }
-      else
-      {
-         // Just map the geographic coordinates to easting/northing, without regard to corner
-         // mismatch:
-         if (theCutOriginUnit == OSSIM_DEGREES)
-         {
-            originPLH.lat = theCutOrigin.y;
-            originPLH.lon = theCutOrigin.x;
-            theCutOrigin = theProductProjection->forward(originPLH);
-         }
-         else
-         {
-            // Determine the geographic position that might be needed for scaling below:
-            originPLH = theProductProjection->inverse(theCutOrigin);
-         }
-
-         // Check for consistent rect size:
-         if (theCutDxDyUnit == OSSIM_DEGREES)
-         {
-            // POTENTIAL BUG: conversion from degrees longitude to meters should be a function 
-            //                of latitude here. Implemented here but needs testing:
-            ossimDpt mtrs_per_deg (originPLH.metersPerDegree());
-            theCutDxDy.x = theCutDxDy.x * mtrs_per_deg.x;
-            theCutDxDy.y = theCutDxDy.y * mtrs_per_deg.y;
-         }
-      }
-
-      // Set these to the correct units. May already be correct, but just in case...
-      theCutOriginUnit = OSSIM_METERS; 
-      theCutDxDyUnit = OSSIM_METERS; 
-
-      resolution = theProductProjection->getMetersPerPixel();
-   }
-
-   // The cut rect corresponds to the edges of the pixel ("edge-to-edge"), while OSSIM considers
-   // coordinates to correspond to the pixel centers. Need to shift the origin to the SE by 1/2p:
-   ossimDpt half_pixel = resolution * 0.5;
-   theCutOrigin.y -= half_pixel.y;
-   theCutOrigin.x += half_pixel.x;
-
-   // The size of the cutrect needs to be an integral number of pixels in output space:
-   theCutDxDy.x = (floor(theCutDxDy.x/resolution.x + 0.5))* resolution.x;
-   theCutDxDy.y = (floor(theCutDxDy.y/resolution.y + 0.5))* resolution.y;
-
-   // Adjust a center origin specification to be Upper Left corner:
-   if (theCutOriginType == OSSIM_CENTER_ORIGIN)
-   {
-      theCutOrigin.y += theCutDxDy.y;
-      theCutOrigin.x -= theCutDxDy.x;
-
-      // theCutDxDy in this case represented a radius. This needs to be converted to 
-      // OSSIM_UPPER_LEFT_ORIGIN form:
-      theCutDxDy.x *= 2.0;
-      theCutDxDy.y *= 2.0;
-      theCutOriginType = OSSIM_UPPER_LEFT_ORIGIN;
-   }
-
-   // Finally, update the product projection with new rectangle:
-   ossimDpt cutCenter (theCutOrigin.x + theCutDxDy.x/2.0, theCutOrigin.y - theCutDxDy.y/2.0);
-   ossimGpt gpt;
-   if (theCutDxDyUnit == OSSIM_METERS)
-   {
-      // Set the E/N values for the cut origin as the tie point:
-      theProductProjection->setUlTiePoints(theCutOrigin);
-   }
-   else
-   {
-      // Set the projection center (origin) latitude at the center of the cut rect:
-      gpt.lat = cutCenter.y;
-      gpt.lon = 0.0;
-      theProductProjection->setOrigin(gpt);
-
-      // Set the lat/lon values for the cut origin as the tie point:
-      gpt.lat = theCutOrigin.y;
-      gpt.lon = theCutOrigin.x;
-      theProductProjection->setUlTiePoints(gpt);
-   }
-
-   // cout << "\n**************** proj 2:\n";
-   // theProductProjection->print(cout);
-
-   // Propagates changes to the projection to the processing chain:
-   setView();
-}
-
-//*************************************************************************************************
-//! Sets up the histogram operation requested for the image chain passed in.
-//*************************************************************************************************
-void ossimOrthoIgen::setupHistogram(ossimImageChain* input_chain, const ossimSrcRecord& src_record)
-{
-   // Check if the source passed in is the output mosaic object, because the target
-   // histogram remapper needs to be connected to it (only valid when histo matching is requested):
-   if (input_chain == NULL)
-   {
-      if (!theTargetHistoFileName.isReadable())
-         return;
-
-      ossimHistogramRemapper* remapper = new ossimHistogramRemapper;
-      remapper->openHistogram(theTargetHistoFileName);
-      theProductChain->addFirst(remapper);
-      return;
-   }
-
-   // Check if any histo operation was requested on individual image:
-   if ((ossim::isnan(theHighPercentClip) || ossim::isnan(theLowPercentClip)) &&
-      !theUseAutoMinMaxFlag && (theStdDevClip < 0) && src_record.getHistogramOp().empty() &&
-      theTargetHistoFileName.empty())
-   {
-      return; // no histo op requested
-   }
-
-   // Remaining operations require a histogram on the input image source:
-   ossimImageHandler* handler = PTR_CAST(ossimImageHandler, input_chain->getLastSource());
-   if (handler == NULL)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL)<<"Could not locate an image handler object in the image"
-         << "chain provided. This should not happen. Ignoring histogram request." << std::endl;
-      return;
-   }
-
-   // Establish the ideal filename for this histogram. The following do-block is all for testing
-   // different histogram file naming schemes since alternate directory and entry-indexing might be
-   // used:
-   ossimFilename histoFilename (src_record.getHistogramPath());
-   ossimFilename candidateHistoFilename;
-   ossimFilename defaultHistoFilename (handler->createDefaultHistogramFilename());
-   ossimFilename entryName (handler->getFilenameWithThisExtension(ossimString(".his"), true));
-
-   do
-   {
-      if (!histoFilename.empty())
-      {
-         // Try histogram filename based on specified name in the .src file:
-         if (histoFilename.isDir())
-            histoFilename = histoFilename.dirCat(defaultHistoFilename.file());
-         if (histoFilename.exists()) break;
-
-         // Try specified name with entry index:
-         if (src_record.getEntryIndex() >= 0)
-         {
-            histoFilename = histoFilename.path().dirCat(entryName.file());
-            if (histoFilename.exists()) break;
-         }
-
-         // Not found so set the candidate filename in case we need to generate it:
-         candidateHistoFilename = histoFilename;
-      }
-
-      // Next try looking for a histogram based on the default name:
-      histoFilename = defaultHistoFilename;
-      if (histoFilename.exists())  break;
-
-      //---
-      // Last possibility is the default name with entry index.  We will test
-      // even if there is only one entry, like "file_e0.his".
-      //---
-      histoFilename = entryName;
-      if (histoFilename.exists())  break;
-
-      // If not already set, set the candidate filename in case we need to generate it:
-      if (candidateHistoFilename.empty())
-         candidateHistoFilename = histoFilename;
-   }
-   while (false); // only pass through once
-
-
-   // If the histogram was still not located, look into creating one:
-   if (!histoFilename.exists())
-   {
-      // Check the preferences for histogram autogeneration:
-      ossimString lookup = ossimPreferences::instance()->findPreference(AUTOGENERATE_HISTOGRAM_KW);
-      if (lookup.toBool())
-      {
-         // No histogram available for this image, need to create one:
-         histoFilename = candidateHistoFilename;
-         ossimNotify(ossimNotifyLevel_WARN) <<"Histogram file <" <<  histoFilename
-            << "> not found. Creating one now..."  << std::endl;
-         bool success = createHistogram(input_chain, histoFilename);
-         if (!success)
-         {
-            ossimNotify(ossimNotifyLevel_WARN) <<"Error encountered creating histogram file <" 
-               << histoFilename << ">. Ignoring histogram request."  << std::endl;
-            return;
-         }
-      }
-   }
-
-   // Need to insert any histogram object to the left of the renderer in the chain. Search for a 
-   // renderer and save for later:
-   // ossimConnectableObject* renderer = PTR_CAST(ossimConnectableObject,
-   //    input_chain->findFirstObjectOfType(ossimString("ossimImageRenderer")));
-
-   ossimTypeNameVisitor visitor( ossimString("ossimImageRenderer"),
-                                 true, // firstofTypeFlag
-                                 (ossimVisitor::VISIT_INPUTS|
-                                  ossimVisitor::VISIT_CHILDREN) );
-   input_chain->accept( visitor );
-   ossimRefPtr<ossimImageRenderer> renderer = visitor.getObjectAs<ossimImageRenderer>(0);
-
-   // Histo Match?
-   if (theTargetHistoFileName.isReadable())
-   {
-      // A histogram match was requested. This involves applying a histo equalization to the input
-      // chain and then applying an inverted equalization using the target histogram:
-      ossimRefPtr<ossimHistogramEqualization> forwardEq = new ossimHistogramEqualization;
-      ossimRefPtr<ossimHistogramEqualization> inverseEq = new ossimHistogramEqualization;
-      
-      // Init equalizers with the source and target histogram files:
-      forwardEq->setInverseFlag(false);
-      forwardEq->setHistogram(histoFilename);
-      inverseEq->setInverseFlag(true);
-      inverseEq->setHistogram(theTargetHistoFileName);
-
-      // Need check that source and target histograms are compatible:
-      ossimRefPtr<ossimMultiResLevelHistogram> sourceHisto = forwardEq->getHistogram();
-      ossimRefPtr<ossimMultiResLevelHistogram> targetHisto = inverseEq->getHistogram();
-      bool are_incompatible = false;
-      if (!sourceHisto.valid() || !targetHisto.valid())
-      {
-         are_incompatible = true;
-      }
-      else
-      {
-         ossim_uint32 num_source_bands = sourceHisto->getNumberOfBands();
-         if (num_source_bands != targetHisto->getNumberOfBands())
-         {
-            are_incompatible = true;
-         }
-         else
-         {
-            for (ossim_uint32 band=0; band<num_source_bands; band++)
-            {
-               ossimRefPtr<ossimHistogram> sourceBandHisto = sourceHisto->getHistogram(band);
-               ossimRefPtr<ossimHistogram> targetBandHisto = targetHisto->getHistogram(band);
-               if (!sourceBandHisto.valid() || !targetBandHisto.valid() ||
-                   (sourceBandHisto->GetRes() != targetBandHisto->GetRes()))
-               {
-                  are_incompatible = true;
-                  break;
-               }
-            }
-         }
-      }
-      if (are_incompatible)
-      {
-         // Error was encountered establishing histograms for match operation:
-         ossimNotify(ossimNotifyLevel_WARN)<<"Error encountered setting up histogram match "
-            "operation. Check that source and target histograms are compatible. No histogram "
-            "operations will be performed on this image." << std::endl;
-         return;
-      }
-
-      // The source and target histos are compatible, insert to the left of renderer if one exists:
-      if ( renderer.valid() )
-         input_chain->insertLeft( forwardEq.get(), renderer.get() );
-      else
-         input_chain->addFirst(forwardEq.get());
-      input_chain->insertRight(inverseEq.get(), forwardEq.get());
-      
-      return;
-   }
-
-   // Remaining possibilities (clip or stretch) require a remapper.
-   // Insert to the left of renderer if one exists:
-   ossimRefPtr<ossimHistogramRemapper> remapper = new ossimHistogramRemapper;
-   if ( renderer.valid() )
-      input_chain->insertLeft( remapper.get(), renderer.get() );
-   else
-      input_chain->addFirst(remapper.get());
-
-   // Fetch the input histogram:
-   bool histo_read_ok = remapper->openHistogram(histoFilename);
-   if (!histo_read_ok)
-   {
-      // No histogram available for this image, need to create one (TODO):
-      ossimNotify(ossimNotifyLevel_WARN)<<"Error encountered loading histogram file <" 
-         << histoFilename << ">. No histogram operations will be performed on this image." 
-         << std::endl;
-      return;
-   }
-
-   // Set values to construct remap table:
-   if (!ossim::isnan(theHighPercentClip) && !ossim::isnan(theLowPercentClip))
-   {
-      // Hi/Lo clip requested
-      remapper->setHighNormalizedClipPoint(1.0-theHighPercentClip);
-      remapper->setLowNormalizedClipPoint(theLowPercentClip);
-   }
-
-   else
-   {
-      // Consider histogram stretch operations. These can be on a per-image basis or global for all
-      // input images. Give priority to the img_histo_op (per-image spec) over general flags below:
-      ossimHistogramRemapper::StretchMode mode = ossimHistogramRemapper::STRETCH_UNKNOWN;
-      ossimString img_histo_op (src_record.getHistogramOp());
-      if (img_histo_op=="auto-minmax")
-         mode = ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX;
-      else if (img_histo_op.contains("std-stretch"))
-      {
-         if (img_histo_op.contains("1"))
-            mode = ossimHistogramRemapper::LINEAR_1STD_FROM_MEAN;
-         else if (img_histo_op.contains("2"))
-            mode = ossimHistogramRemapper::LINEAR_2STD_FROM_MEAN;
-         else if (img_histo_op.contains("3"))
-            mode = ossimHistogramRemapper::LINEAR_3STD_FROM_MEAN;
-      }
-      else if (theUseAutoMinMaxFlag)
-         mode = ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX;
-      else if (theStdDevClip > 0)
-         mode = (ossimHistogramRemapper::StretchMode) theStdDevClip;
-
-      // Finally init the remapper with proper stretch mode:
-      if (mode != ossimHistogramRemapper::STRETCH_UNKNOWN)
-         remapper->setStretchMode(mode, true);
-   }
-   
-   return;
-}
-
-
-//*************************************************************************************************
-//! Utility method for creating a histogram for an input image. Returns TRUE if successful.
-//*************************************************************************************************
-bool ossimOrthoIgen::createHistogram(ossimImageChain* chain, const ossimFilename& histo_filename)
-{
-   ossimRefPtr<ossimImageHistogramSource> histoSource = new ossimImageHistogramSource;
-   ossimRefPtr<ossimHistogramWriter> writer = new ossimHistogramWriter;
-
-   histoSource->connectMyInputTo(chain);
-   histoSource->enableSource();
-   histoSource->setComputationMode(OSSIM_HISTO_MODE_FAST);
-
-   writer->connectMyInputTo(histoSource.get());
-   writer->setFilename(histo_filename);
-   writer->addListener(&theStdOutProgress);
-   bool success = writer->execute();
-
-   writer=0;
-   histoSource=0;
-
-   if (success)
-   {
-      ossimNotify(ossimNotifyLevel_NOTICE)<<std::endl;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)<<"Error encountered creating Histogram file <" 
-         << histo_filename << ">. No histogram operations will be performed on this image." 
-         << std::endl;
-   }
-
-   return success;
-}
-
-//*************************************************************************************************
-// METHOD
-//*************************************************************************************************
-void ossimOrthoIgen::addChainCache(ossimImageChain* chain) const
-{
-   if (chain)
-   {
-      //ossimConnectableObject* renderer =
-      //   PTR_CAST(ossimConnectableObject,
-      //             chain->findFirstObjectOfType(ossimString("ossimImageRenderer")));
-
-      ossimTypeNameVisitor visitor( ossimString("ossimImageRenderer"),
-                                    true, // firstofTypeFlag
-                                    (ossimVisitor::VISIT_INPUTS|
-                                     ossimVisitor::VISIT_CHILDREN) );
-      chain->accept( visitor );
-      ossimRefPtr<ossimImageRenderer> renderer = visitor.getObjectAs<ossimImageRenderer>(0);
-      if ( renderer.valid() )
-      {
-         ossimCacheTileSource* cache = new ossimCacheTileSource();
-         chain->insertLeft( cache, renderer.get() );
-      }
-   }
-}
-
-//*************************************************************************************************
-// Generates a log KWL file that could be fed directly to Igen. Used for verifying chain.
-//*************************************************************************************************
-void ossimOrthoIgen::generateLog()
-{
-   if (!theSrcRecords.size() || !theProductChain.valid() || theProductFilename.empty())
-      return;
-
-   // Establish output filename:
-   ossimFilename logFile = theProductFilename;
-   logFile.setExtension("log");
-
-   // Fill a KWL with all info:
-   ossimKeywordlist kwl; 
-   theContainer->saveState(kwl);
-
-   if (theProductProjection.valid())
-      theProductProjection->saveState(kwl, "product.projection.");
-
-   kwl.write(logFile.chars());
-}
-
-//*************************************************************************************************
-//! Determines the UL corner tiepoint of the product projection as the overall UL corner of the
-//! mosaic. This may not be the final tiepoint, since a cut origin may have been specified, and the
-//*************************************************************************************************
-void ossimOrthoIgen::establishMosaicTiePoint()
-{
-   if (!theProductChain.valid())
-      return;
-
-   // Need to find all image handlers to query for their UL ground point:
-#if 0
-   ossimConnectableObject::ConnectableObjectList clientList;
-   theProductChain->findAllInputsOfType(clientList, STATIC_TYPE_INFO(ossimImageHandler), true, true);
-
-   if (clientList.size() == 0)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)<<"ossimOrthoIgen::establishMosaicTiePoint() WARNING -- "
-         "Expected to find image handler in the chain but none was identified."<<std::endl;
-      return;
-   }
-#endif
-
-   ossimTypeNameVisitor visitor( ossimString("ossimImageHandler"),
-                                 false, // firstofTypeFlag
-                                 (ossimVisitor::VISIT_INPUTS|
-                                  ossimVisitor::VISIT_CHILDREN) );
-   theProductChain->accept( visitor );
-
-   if ( visitor.getObjects().empty() )
-   {
-      ossimNotify(ossimNotifyLevel_WARN)<<"ossimOrthoIgen::establishMosaicTiePoint() WARNING -- "
-         "Expected to find image handler in the chain but none was identified."<<std::endl;
-      return;
-   }
-   ossimGpt tie_gpt_i, tie_gpt;
-   ossimDpt tie_dpt_i, tie_dpt;
-   tie_gpt.makeNan();
-   tie_gpt.height(0.0);
-   tie_dpt.makeNan();
-
-
-   // Loop over all input handlers and latch the most NW tiepoint as the mosaic TP:
-   //   ossimConnectableObject::ConnectableObjectList::iterator iter = clientList.begin();
-   // while (iter != clientList.end())
-   for( ossim_uint32 i = 0; i < visitor.getObjects().size(); ++i )
-   {
-      // ossimImageHandler* handler = PTR_CAST(ossimImageHandler, (*iter).get());
-      // iter++;
-
-      ossimImageHandler* handler = visitor.getObjectAs<ossimImageHandler>( i );
-      if (!handler) break;
-
-      ossimRefPtr<ossimImageGeometry> geom = handler->getImageGeometry();
-      if (!geom.valid()) 
-         continue; // Skip over any non geometry inputs (e.g., masks)
-
-      if ( theProductProjection->isGeographic() )
-      {
-         geom->getTiePoint( tie_gpt_i, true ); // True to get edge of tie.
-         if ( tie_gpt_i.hasNans() == false )
-         {
-            if (tie_gpt.hasNans())
-               tie_gpt = tie_gpt_i;
-            else
-            {
-               if (tie_gpt_i.lat > tie_gpt.lat) 
-                  tie_gpt.lat = tie_gpt_i.lat;
-               if (tie_gpt_i.lon < tie_gpt.lon) 
-                  tie_gpt.lon = tie_gpt_i.lon;
-            }
-         }
-      }
-      else
-      {
-         geom->getTiePoint( tie_dpt_i, true ); // True to get edge of tie.
-         if ( tie_dpt_i.hasNans() == false )
-         {
-            if (tie_dpt.hasNans())
-               tie_dpt = tie_dpt_i;
-            else
-            {
-               if (tie_dpt_i.y > tie_dpt.y) 
-                  tie_dpt.y = tie_dpt_i.y;
-               if (tie_dpt_i.x < tie_dpt.x) 
-                  tie_dpt.x = tie_dpt_i.x;
-            }
-         }
-      }
-   }
-   
-#if 0
-      // Establish input image bounding rect, making sure to expand to include the FULL pixel since
-      // pixel is point -- i.e. the pixel coordinate corresponds to the center of the pixel area, 
-      // not the edge. Therefore shift the image point by 1/2 pixel to correspond to edges:
-      // (OLK 09/11)
-      ossimDrect boundingRect (handler->getBoundingRect());
-      vector<ossimDpt> img_vertices;
-      img_vertices.push_back(boundingRect.ul() + ossimDpt(-0.5, -0.5));
-      img_vertices.push_back(boundingRect.ur() + ossimDpt( 0.5, -0.5));
-      img_vertices.push_back(boundingRect.lr() + ossimDpt( 0.5,  0.5));
-      img_vertices.push_back(boundingRect.ll() + ossimDpt(-0.5,  0.5));
-      
-
-      // The tie point will be in easting/northing or lat/lon depending on the type of projection 
-      // used for the product. Need to consider all image corners since the orientation of the image
-      // is not known:
-      for (int j=0; j<4; j++)
-      {
-         geom->localToWorld(img_vertices[j], tie_gpt_i);
-         if (theProductProjection->isGeographic())
-         {
-            tie_gpt.height(0.0);
-            if (tie_gpt.hasNans())
-               tie_gpt = tie_gpt_i;
-            else
-            {
-               if (tie_gpt_i.lat > tie_gpt.lat) 
-                  tie_gpt.lat = tie_gpt_i.lat;
-               if (tie_gpt_i.lon < tie_gpt.lon) 
-                  tie_gpt.lon = tie_gpt_i.lon;
-            }
-         }
-         else
-         {
-            tie_dpt_i = theProductProjection->forward(tie_gpt_i);
-            if (tie_dpt.hasNans())
-               tie_dpt = tie_dpt_i;
-            else
-            {
-               if (tie_dpt_i.y > tie_dpt.y) 
-                  tie_dpt.y = tie_dpt_i.y;
-               if (tie_dpt_i.x < tie_dpt.x) 
-                  tie_dpt.x = tie_dpt_i.x;
-            }
-         }
-      }
-   }
-
-#endif
-
-   // The tie point coordinates currently reflect the UL edge of the UL pixel. We'll need to shift
-   // the tie point from the edge to the center. (OLK 09/11)
-   ossimDpt half_pixel_shift(0,0);
-   if (theProductProjection->isGeographic())
-   {
-      half_pixel_shift = theProductProjection->getDecimalDegreesPerPixel() * 0.5;
-      if (!tie_gpt.hasNans())
-      {
-         tie_gpt.lat -= half_pixel_shift.lat;
-         tie_gpt.lon += half_pixel_shift.lon;
-         theProductProjection->setUlTiePoints(tie_gpt);
-      }
-   }
-   else
-   {
-      half_pixel_shift = theProductProjection->getMetersPerPixel() * 0.5;
-      tie_dpt.y -= half_pixel_shift.y;
-      tie_dpt.x += half_pixel_shift.x;
-      theProductProjection->setUlTiePoints(tie_dpt);
-   }
-
-   // Propagates changes to the projection to the processing chain:
-   setView();
-}
-
-//*************************************************************************************************
-// Initialize the pixel flipper in the source chain if one is called for
-//*************************************************************************************************
-ossimImageSource* ossimOrthoIgen::setupPixelFlipper(ossimImageChain* singleImageChain,
-                                                    const ossimSrcRecord& src_record)
-{
-   if (singleImageChain == NULL)
-      return NULL;
-
-   // Fetch the image handler that should be the last (left-most) source in the chain:
-   ossimImageSource* current_source = singleImageChain->getLastSource();
-   if (current_source == NULL)
-      return NULL;
-
-   // There are two possibilities for specifying pixel flipping -- either as a command line option
-   // that applies to all input imagery, or specified for a particular input via the .src file.
-   // The .src file takes precedence:
-   const ossimSrcRecord::PixelFlipParams& flipParams = src_record.getPixelFlipParams();
-
-   // The replacement can be specified globally in the preferences if none found in the src record:  
-   ossimString replaceModeStr = flipParams.replacementMode;
-   if (replaceModeStr.empty())
-      replaceModeStr = thePixelReplacementMode; 
-   
-   // First consider if a range of clipped pixels was specified:
-   ossim_float64 clip_min = flipParams.clipMin;
-   if (ossim::isnan(clip_min)) 
-      clip_min = theClipPixelMin;
-   ossim_float64 clip_max = flipParams.clipMax;
-   if (ossim::isnan(clip_max))
-      clip_max = theClipPixelMax;
-
-   ossimPixelFlipper* flipper = 0;
-   if (!ossim::isnan(clip_min) && !ossim::isnan(clip_max))
-   {
-      // A clip within a range of pixel values was requested. All pixels within the specified range
-      // are mapped to NULL. Create the remapper and insert it into the chain just after the handler
-      flipper = new ossimPixelFlipper();  
-      flipper->setTargetRange(clip_min, clip_max);  
-      flipper->setReplacementValue(current_source->getNullPixelValue());
-      flipper->setReplacementMode(replaceModeStr);
-      singleImageChain->insertRight(flipper, current_source);  
-      current_source = flipper;
-   }
-
-   // The user can also specify a clamping similar to the pixel clipping above. This would be a
-   // second flipper object in the chain:
-   ossim_float64 clamp_min = flipParams.clampMin;
-   if (ossim::isnan(clamp_min))
-      clamp_min = theClampPixelMin;
-   ossim_float64 clamp_max = flipParams.clampMax;
-   if (ossim::isnan(clamp_max))
-      clamp_max = theClampPixelMax;
-
-   flipper = 0; // no leak since chain assumes ownership of prior instance.
-   if (!ossim::isnan(clamp_min))
-   {
-      // A bottom clamping was requested. All pixels below this value are set to this value:
-      flipper = new ossimPixelFlipper();  
-      flipper->setClampValue(clamp_min, false); // false = clamp bottom
-   }
-   if (!ossim::isnan(clamp_max))
-   {
-      // A top clamping was requested. All pixels above this value are set to this value.
-      // The same flipper object can be used as the bottom clamp (if created):
-      if (!flipper)
-         flipper = new ossimPixelFlipper();  
-      flipper->setClampValue(clamp_max, true); // true = clamp top
-   }
-   if (flipper)
-   {
-      // Common code for top and bottom clamping:
-      flipper->setReplacementMode(replaceModeStr);
-      singleImageChain->insertRight(flipper, current_source);  
-      current_source = flipper;
-   }
-
-   return current_source;
-}
-
-//*************************************************************************************************
-// Checks for the presence of a raster mask file alongside the image, and inserts the mask 
-// filter in the chain if mask file exists. Returns pointer to the "current (last added) source 
-// in the single image chain. 
-//*************************************************************************************************
-ossimImageSource* ossimOrthoIgen::setupRasterMask(ossimImageChain* singleImageChain,
-                                                  const ossimSrcRecord& src_record)
-{
-   if (singleImageChain == NULL)
-      return NULL;
-
-   // Search for the image handler in the chain:
-   ossimImageHandler* img_handler = 
-      dynamic_cast<ossimImageHandler*>(singleImageChain->getLastSource());
-   if (img_handler == NULL) 
-      return NULL;
-
-   // See if a raster mask was specified in the SRC record:
-   ossimFilename mask_file = src_record.getMaskPath();
-   if (!mask_file.exists())
-      return img_handler;
-
-   // Open up the mask file and verify it is good:
-   ossimImageHandler* mask_handler =  ossimImageHandlerRegistry::instance()->open(mask_file);
-   if (mask_handler == NULL)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)<<"ossimOrthoIgen::setupRasterMask() -- Could not open "
-         "raster mask file <"<<mask_file<<">. Maske request will be ignored."<<endl;
-      return img_handler;
-   }
-
-   // Create the mask filter and give it the image and mask tile sources. Add it to the chain.
-   // IMPORTANT NOTE: the mask filter is an image combiner. It is being inserted into a single 
-   // image chain. Since it owns its two inputs (the image handler and the mask), it must
-   // replace the handler in the chain. Also, see note in ossimMaskFilter::setInputSources().
-   //singleImageChain->deleteLast(); // Remove the handler
-   // ossimImageSource* nextInChain = singleImageChain->getLastSource();
-   ossimRefPtr<ossimMaskFilter> mask_filter = new ossimMaskFilter;
-   singleImageChain->insertRight(mask_filter.get(), img_handler); 
-   mask_filter->setMaskSource(mask_handler);  // assumes ownership of object
-
-   //---
-   // Set the mode to SELECT_CLAMP_MIN.  This clamps data to min pixel value in the valid image
-   // area if the input pixel is null(essentially a pixel flip).
-   //---
-   mask_filter->setMaskType(ossimMaskFilter::OSSIM_MASK_TYPE_SELECT_CLAMP_MIN);
-   
-   return mask_filter.get();
-}
-
-//*************************************************************************************************
-// Adds a scalar remapper to the extreme right of the chain is specified by the 
-// --output-radiometry option.
-//*************************************************************************************************
-void ossimOrthoIgen::setupOutputRadiometry()
-{
-   if (theOutputRadiometry.empty())
-      return;
-
-   // Map the specified radiometry to a valid type:
-   ossimScalarType scalar_type = 
-      ossimScalarTypeLut::instance()->getScalarTypeFromString(theOutputRadiometry);
-   if (scalar_type == OSSIM_SCALAR_UNKNOWN)
-      return;
-
-   // Add a scalar remapper to the product chain:
-   if(theProductChain->getOutputScalarType() != scalar_type)
-   {
-      ossimScalarRemapper* remapper = new ossimScalarRemapper;
-      remapper->setOutputScalarType(scalar_type);
-      theProductChain->addFirst(remapper);
-   }
-}
-
-//*************************************************************************************************
-// Private method to see if any image chain input projections are affected by elevation.
-//*************************************************************************************************
-bool ossimOrthoIgen::isAffectedByElevation()
-{
-   bool result = false;
-   
-   // Get a list of all the image handlers.
-   // ossimConnectableObject::ConnectableObjectList clientList;
-   // theProductChain->findAllInputsOfType(clientList, STATIC_TYPE_INFO(ossimImageHandler),
-   //                                      true, true);
-
-   ossimTypeNameVisitor visitor( ossimString("ossimImageHandler"),
-                                 false, // firstofTypeFlag
-                                 (ossimVisitor::VISIT_INPUTS|
-                                  ossimVisitor::VISIT_CHILDREN) );
-   theProductChain->accept( visitor );
-   
-   // Loop over all input handlers and see if affected by elevation.
-   // ossimConnectableObject::ConnectableObjectList::iterator iter = clientList.begin();
-   // while (iter != clientList.end())
-   for( ossim_uint32 i = 0; i < visitor.getObjects().size(); ++i )
-   {
-      // ossimRefPtr<ossimImageHandler> handler = PTR_CAST(ossimImageHandler, (*iter).get());
-      ossimRefPtr<ossimImageHandler> handler =  visitor.getObjectAs<ossimImageHandler>( i );
-      if ( handler.valid() )
-      {
-         ossimRefPtr<ossimImageGeometry> geom = handler->getImageGeometry();
-         if (geom.valid())
-         {
-            ossimRefPtr<const ossimProjection> proj = geom->getProjection();
-            if ( proj.valid() )
-            {
-               if ( proj->isAffectedByElevation() )
-               {
-                  result = true;
-                  break;
-               }
-            }
-         }
-      }
-      // ++iter;
-   }
-   return result;
-}
-
-//*************************************************************************************************
-// Private method to recompute the gsd on all image handlers that have projections affected by
-// elevation.
-//*************************************************************************************************
-void ossimOrthoIgen::reComputeChainGsds()
-{
-   // Get a list of all the image handlers.
-   // ossimConnectableObject::ConnectableObjectList clientList;
-   // theProductChain->findAllInputsOfType(clientList, STATIC_TYPE_INFO(ossimImageHandler),
-   //                                      true, true);
-   
-   // Loop over all input handlers and see if affected by elevation.
-   // ossimConnectableObject::ConnectableObjectList::iterator iter = clientList.begin();
-   // while (iter != clientList.end())
-
-   ossimTypeNameVisitor visitor( ossimString("ossimImageHandler"),
-                                 false, // firstofTypeFlag
-                                 (ossimVisitor::VISIT_INPUTS|
-                                  ossimVisitor::VISIT_CHILDREN) );
-   theProductChain->accept( visitor );
-
-   for( ossim_uint32 i = 0; i < visitor.getObjects().size(); ++i )
-   {
-      // ossimRefPtr<ossimImageHandler> handler = PTR_CAST(ossimImageHandler, (*iter).get());
-
-      ossimRefPtr<ossimImageHandler> handler =  visitor.getObjectAs<ossimImageHandler>( i );
-      if ( handler.valid() )
-      {
-         ossimRefPtr<ossimImageGeometry> geom = handler->getImageGeometry();
-         if (geom.valid())
-         {
-            ossimRefPtr<ossimProjection> proj = geom->getProjection();
-            if ( proj.valid() )
-            {
-               if ( proj->isAffectedByElevation() )
-                  proj->getMetersPerPixel();
-            }
-         }
-      }
-      // ++iter;
-   }
-}
-
-//*************************************************************************************************
-// GSD Determination is nontrivial since there are various command-line options that control
-// this quantity. This method considers all information before setting the product's GSD.
-//*************************************************************************************************
-void ossimOrthoIgen::setProductGsd()
-{
-   if (!theProductChain.valid())
-      return;
-
-   // Fetch the reference input projection first. Settings may be copied to the product projection:
-   ossimMapProjection* ref_map = PTR_CAST(ossimMapProjection, theReferenceProj.get());
-   ossimGpt origin;
-
-   // The geo-scaling latitude effectively specifies the map projection's origin latitude, which
-   // may affect the scaling of GSD in x-direction. This is only relevant for geographic projections
-   if (theProductProjection->isGeographic())
-   {
-      ossimGpt origin (0.0, theProductProjection->getOrigin().lon, 0.0);
-      if (ossim::isnan(theGeoScalingLatitude))
-      {
-         // Loop over all input handlers and accumulate the geographic centers. This will allow 
-         // computing mosaic center point (approximate) for purposes of establishing reference 
-         // latitude for scale:
-         origin.lat = 0.0;
-         origin.lon = theProductProjection->getOrigin().lon;
-
-         // ossimConnectableObject::ConnectableObjectList clientList;
-         // theProductChain->findAllInputsOfType(clientList, STATIC_TYPE_INFO(ossimImageHandler), 1, 1);
-         // ossimConnectableObject::ConnectableObjectList::iterator iter = clientList.begin();
-
-         ossimTypeNameVisitor visitor( ossimString("ossimImageHandler"),
-                                       false, // firstofTypeFlag
-                                       (ossimVisitor::VISIT_INPUTS|
-                                        ossimVisitor::VISIT_CHILDREN) );
-         theProductChain->accept( visitor );
-         
-         ossimDpt center_pt;
-         ossimGpt geocenter;
-         int num_contributors = 0;
-         // while (iter != clientList.end())
-
-         for( ossim_uint32 i = 0; i < visitor.getObjects().size(); ++i )
-         {
-            // ossimImageHandler* handler = PTR_CAST(ossimImageHandler, (*iter).get());
-            ossimRefPtr<ossimImageHandler> handler =  visitor.getObjectAs<ossimImageHandler>( i );
-            if ( handler.valid() )
-            {
-               // iter++;
-               ossimRefPtr<ossimImageGeometry> geom = handler->getImageGeometry();
-               if (!geom.valid()) 
-                  continue; // Skip over any non geometry inputs (e.g., masks)
-               
-               handler->getBoundingRect().getCenter(center_pt);
-               if (!geom->localToWorld(center_pt, geocenter))  
-                  continue;
-               if (num_contributors == 0)
-                  origin.lat = geocenter.lat;
-               else
-                  origin.lat += geocenter.lat;
-               ++num_contributors;
-            }
-            else
-            {
-               break;
-            }
-         }
-
-         // Compute average latitude among all contributors:
-         if (num_contributors)
-            origin.lat /= (double)num_contributors;
-      }
-      else
-      {
-         // A geo-scaling reference latitude was provided on the command line:
-         origin.lat = theGeoScalingLatitude;
-      }
-
-      // Set the latitude of origin to the reference latitude (either specified on command line or
-      // computed as scene center):
-      theProductProjection->setOrigin(origin); // proj now can handle meters and degrees correctly
-   }
-
-   // Establish the resolution based on either command line option or reference proj if no values
-   // provided on command line (--degrees or --meters):
-   ossimDpt resolution (theDeltaPerPixelOverride);
-   ossimUnitType resUnits = theDeltaPerPixelUnit;
-   if (resolution.hasNans())
-   {
-      //  No GSD specified, so copy it from the input projection:
-      if (ref_map && ref_map->isGeographic())
-      {
-         resolution = ref_map->getDecimalDegreesPerPixel();
-         resUnits = OSSIM_DEGREES;
-      }
-      else
-      {
-         resolution = theReferenceProj->getMetersPerPixel();
-         resUnits = OSSIM_METERS;
-      }
-   }
-
-   // Set the desired image GSD, accounting for possible mixing of units:
-   if (resUnits == OSSIM_DEGREES)
-   {
-      // Need to adjust the resolution in the longitude direction if the user requested geo-scaling:
-      if (!ossim::isnan(theGeoScalingLatitude))
-         resolution.lon = resolution.lat/ossim::cosd(theGeoScalingLatitude);
-      theProductProjection->setDecimalDegreesPerPixel(resolution);
-   }
-   else 
-      theProductProjection->setMetersPerPixel(resolution);
-
-   // Propagates changes to the projection to the processing chain:
-   setView();
-}
diff --git a/src/ossim/plugin/.cvsignore b/src/ossim/plugin/.cvsignore
deleted file mode 100644
index a438335..0000000
--- a/src/ossim/plugin/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.d
diff --git a/src/ossim/plugin/ossimDynamicLibrary.cpp b/src/ossim/plugin/ossimDynamicLibrary.cpp
deleted file mode 100644
index 6f34bcc..0000000
--- a/src/ossim/plugin/ossimDynamicLibrary.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-//*******************************************************************
-//
-// LICENSE: LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//*********************************************************************
-// $Id: ossimDynamicLibrary.cpp 20694 2012-03-19 12:22:05Z dburken $
-#include <ossim/plugin/ossimDynamicLibrary.h>
-#include <ossim/plugin/ossimSharedObjectBridge.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimNotifyContext.h>
-
-// Static trace for debugging.
-static ossimTrace traceDebug(ossimString("ossimDynamicLibrary:debug"));
-
-ossimDynamicLibrary::ossimDynamicLibrary()
-   :theLibrary(0)
-{
-}
-
-ossimDynamicLibrary::ossimDynamicLibrary(const ossimString& name)
-{
-   load(name);
-}
-
-ossimDynamicLibrary::~ossimDynamicLibrary()
-{
-   unload();
-}
-
-bool ossimDynamicLibrary::load()
-{
-   return load(theLibraryName);
-}
-
-bool ossimDynamicLibrary::load(const ossimString& name)
-{
-   ossimFilename libraryName = name.trim();
-   if(libraryName.empty()||!libraryName.isFile()) return false;
-   
-#  if defined(__WIN32__) || defined(_WIN32)
-   theLibrary = LoadLibrary(libraryName.c_str());
-#  else 
-   theLibrary = dlopen(libraryName.c_str(), RTLD_LAZY);
-#endif
-
-   if (isLoaded())
-   {
-      theLibraryName = libraryName;
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimDynamicLibrary::load DEBUG:" << std::endl;
-      
-      if (isLoaded())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "Loaded library:  " << name << std::endl;
-      }
-      else
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimDynamicLibrary::load DEBUG:"
-            << "\nFailed to load library:  " << name
-            << std::endl;
-#  if !defined(__WIN32__) && !defined(_WIN32)
-         ossimNotify(ossimNotifyLevel_DEBUG) << dlerror() << std::endl;
-#endif
-      }
-      
-   }
-   
-   return isLoaded();
-}
-
-void ossimDynamicLibrary::unload()
-{
-   if(isLoaded())
-   {
-#if defined(__WIN32__) || defined(_WIN32)
-      FreeLibrary(theLibrary);
-// #else HAVE_DLFCN_H
-#else
-      dlclose(theLibrary);
-#endif
-      theLibrary = 0;
-   }
-}
-
-void *ossimDynamicLibrary::getSymbol(const ossimString& name) const
-{
-   if(isLoaded())
-   {
-#if defined(__WIN32__) || defined(_WIN32)
-      return (void*)GetProcAddress( (HINSTANCE)theLibrary, name.c_str());
-#else
-      return dlsym(theLibrary, name.c_str());
-#endif
-   }
-
-   return (void*)0;
-}
diff --git a/src/ossim/plugin/ossimPluginLibrary.cpp b/src/ossim/plugin/ossimPluginLibrary.cpp
deleted file mode 100644
index 5f90ad8..0000000
--- a/src/ossim/plugin/ossimPluginLibrary.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-//*******************************************************************
-///
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimPluginLibrary.cpp 20694 2012-03-19 12:22:05Z dburken $
-#include <ossim/plugin/ossimPluginLibrary.h>
-#include <iostream>
-
-ossimPluginLibrary::ossimPluginLibrary()
-   :ossimDynamicLibrary(),
-    m_info(0)
-{
-}
-
-ossimPluginLibrary::ossimPluginLibrary(const ossimString& name, const ossimString& options)
-   :ossimDynamicLibrary(name),
-    m_options(options),
-    m_info(0)
-{
-   initialize();
-}
-
-ossimPluginLibrary::~ossimPluginLibrary()
-{
-   finalize();
-}
-
-void ossimPluginLibrary::initialize()
-{
-   if(!isLoaded())
-   {
-      load();
-   }
-   
-   ossimSharedLibraryInitializePtr init = (ossimSharedLibraryInitializePtr)getSymbol("ossimSharedLibraryInitialize");
-   if(init)
-   {
-      init(&m_info, m_options.c_str());
-   }
-}
-
-void ossimPluginLibrary::finalize()
-{
-   ossimSharedLibraryFinalizePtr finalizeLib = (ossimSharedLibraryFinalizePtr)getSymbol("ossimSharedLibraryFinalize");
-   if(finalizeLib)
-   {         
-      finalizeLib();
-   }
-   
-   unload();
-}
-
-ossimString ossimPluginLibrary::getDescription()const
-{
-   ossimString result;
-
-   if(m_info&&isLoaded()&&m_info->getDescription)
-   {
-      result = m_info->getDescription();
-   }
-
-   return result;
-}
-
-void ossimPluginLibrary::getClassNames(std::vector<ossimString>& classNames)const
-{
-   if(m_info&&m_info->getNumberOfClassNames&&m_info->getClassName)
-   {
-      ossim_int32 idx        = 0;
-      ossim_int32 numObjects = 0;
-
-      numObjects = m_info->getNumberOfClassNames();
-      for(idx = 0; idx < numObjects; ++idx)
-      {
-         classNames.push_back(m_info->getClassName(idx));
-      }
-   }
-}
-
-void ossimPluginLibrary::setOptions(const ossimString& options)
-{
-   m_options = options;
-   
-}
diff --git a/src/ossim/plugin/ossimSharedPluginRegistry.cpp b/src/ossim/plugin/ossimSharedPluginRegistry.cpp
deleted file mode 100644
index e16bf92..0000000
--- a/src/ossim/plugin/ossimSharedPluginRegistry.cpp
+++ /dev/null
@@ -1,230 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimSharedPluginRegistry.cpp 20608 2012-02-27 12:03:40Z gpotts $
-#include <algorithm>
-#include <iterator>
-#include <ossim/plugin/ossimSharedPluginRegistry.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/plugin/ossimSharedObjectBridge.h>
-
-//ossimSharedPluginRegistry* ossimSharedPluginRegistry::theInstance = NULL;
-//ossimPluginBridgeStructure ossimSharedPluginRegistry::thePluginBridgeFactoryPointers;
-
-static ossimTrace traceDebug("ossimSharedPluginRegistry:debug");
-
-ossimSharedPluginRegistry::ossimSharedPluginRegistry()
-{
-}
-
-ossimSharedPluginRegistry::~ossimSharedPluginRegistry()
-{
-   theLibraryList.clear();
-}
-
-ossimSharedPluginRegistry* ossimSharedPluginRegistry::instance()
-{
-   static ossimSharedPluginRegistry sharedInstance;
-
-   return &sharedInstance;//theInstance;
-}
-
-bool ossimSharedPluginRegistry::registerPlugin(const ossimFilename& filename, const ossimString& options)//, bool insertFrontFlag)
-{
-   bool result = false;
-   if(!getPlugin(filename))
-   {
-      ossimPluginLibrary *lib =new ossimPluginLibrary;
-      if(lib->load(filename))
-      {
-         lib->setOptions(options);
-         if(lib->getSymbol("ossimSharedLibraryInitialize"))
-         {
-            lib->initialize();
-//            if(!insertFrontFlag)
-//            {
-               theLibraryList.push_back(lib);
-//            }
-//            else
-//            {
-//               theLibraryList.insert(theLibraryList.begin(), lib);
- //           }
-            result = true;
-         }
-         else
-         {
-            if (traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG)
-                  << "ossimSharedPluginRegistry DEBUG:"
-                  << "ossimSharedLibraryInitialize symbol not found\n"
-                  << std::endl;
-            }
-            
-         }
-      }
-      else
-      {
-         delete lib;
-         lib = 0;
-      }
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "WARNING: Plugin with the name " << filename << std::endl
-                                         << "Already registered with OSSIM" << std::endl;
-   }
-   
-   return result;
-}
-
-bool ossimSharedPluginRegistry::unregisterPlugin(int idx)
-{
-   ossimPluginLibrary* lib = getPlugin(idx);
-   
-   return unregisterPlugin(lib);
-}
-
-bool ossimSharedPluginRegistry::unregisterPlugin(ossimPluginLibrary* library)
-{
-   std::vector<ossimRefPtr<ossimPluginLibrary> >::iterator iter = theLibraryList.begin();
-   while(iter!=theLibraryList.end())
-   {
-      if((*iter).get() == library)
-      {
-         theLibraryList.erase(iter);
-         return true;
-      }
-      ++iter;
-   }
-   return false;
-}
-
-const ossimPluginLibrary* ossimSharedPluginRegistry::getPlugin(const ossimFilename& filename)const
-{
-   ossim_uint32 idx = 0;
-   ossimFilename fileOnly = filename.file();
-   for(idx = 0; idx < theLibraryList.size();++idx)
-   {
-      if(fileOnly == ossimFilename(theLibraryList[idx]->getName()).file())
-      {
-         return theLibraryList[idx].get();
-      }
-   }
-   
-   return 0;
-}
-
-ossimPluginLibrary* ossimSharedPluginRegistry::getPlugin(const ossimFilename& filename)
-{
-   ossim_uint32 idx = 0;
-   ossimFilename fileOnly = filename.file();
-
-   for(idx = 0; idx < theLibraryList.size();++idx)
-   {
-      if(fileOnly == ossimFilename(theLibraryList[idx]->getName()).file())
-      {
-         return theLibraryList[idx].get();
-      }
-   }
-   
-   return 0;
-}
-
-ossim_uint32 ossimSharedPluginRegistry::getIndex(const ossimPluginLibrary* lib)const
-{
-   ossim_uint32 idx = 0;
-
-   for(idx = 0; idx < theLibraryList.size(); ++idx)
-   {
-      if(theLibraryList[idx] == lib)
-      {
-         return idx;
-      }
-   }
-
-   return idx;
-}
-
-ossimPluginLibrary* ossimSharedPluginRegistry::getPlugin(ossim_uint32 idx)
-{
-   ossimPluginLibrary* result = 0;
-   
-   if(idx < theLibraryList.size())
-   {
-      result = theLibraryList[idx].get();
-   }
-
-   return result;
-}
-
-const ossimPluginLibrary* ossimSharedPluginRegistry::getPlugin(ossim_uint32 idx)const
-{
-   const ossimPluginLibrary* result = 0;
-   
-   if(idx < theLibraryList.size())
-   {
-      result = theLibraryList[idx].get();
-   }
-
-   return result;
-}
-
-ossim_uint32 ossimSharedPluginRegistry::getNumberOfPlugins()const
-{
-   return (ossim_uint32)theLibraryList.size();
-}
-
-
-bool ossimSharedPluginRegistry::isLoaded(const ossimFilename& filename) const
-   
-{
-   ossimFilename fileOnly = filename.file();
-   bool result = false;
-   ossim_uint32 count = getNumberOfPlugins();
-   for (ossim_uint32 i = 0; i < count; ++i)
-   {
-      const ossimPluginLibrary* pi = getPlugin(i);
-      if (pi)
-      {
-         if (fileOnly == ossimFilename(pi->getName()).file())
-         {
-            result = true;
-            break;
-         }
-      }
-   }
-   return result;
-}
-
-void ossimSharedPluginRegistry::printAllPluginInformation(std::ostream& out)
-{
-   ossim_uint32 count = getNumberOfPlugins();
-   ossim_uint32 idx = 0;
-   
-   for(idx = 0; idx < count; ++idx)
-   {
-      std::vector<ossimString> classNames;
-      const ossimPluginLibrary* pi = getPlugin(idx);
-      if(pi)
-      {
-         pi->getClassNames(classNames);
-         out << "Plugin: " << pi->getName() << std::endl;
-         out << "DESCRIPTION: \n";
-         out << pi->getDescription() << "\n";
-         out << "CLASSES SUPPORTED\n     ";
-         std::copy(classNames.begin(),
-                   classNames.end(),
-                   std::ostream_iterator<ossimString>(out, "\n     "));
-         out << "\n";
-      }
-   }
-}
diff --git a/src/ossim/projection/.cvsignore b/src/ossim/projection/.cvsignore
deleted file mode 100644
index 7df3918..0000000
--- a/src/ossim/projection/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-*.d
-Makefile
-
diff --git a/src/ossim/projection/ossimAdjMapModel.cpp b/src/ossim/projection/ossimAdjMapModel.cpp
deleted file mode 100644
index 7b9e4a4..0000000
--- a/src/ossim/projection/ossimAdjMapModel.cpp
+++ /dev/null
@@ -1,417 +0,0 @@
-//----------------------------------------------------------------------------
-// Copyright (c) 2005, Oscar Kramer, all rights reserved.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Oscar Kramer
-//
-// Description:
-// 
-// Special "sensor model" that provides a conventional map projection but
-// with additional capability for adjusting the map x,y coordinates with
-// offset, scale, and rotation transform.  Funtions to control notifications,
-// information and error output.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimAdjMapModel.cpp 15766 2009-10-20 12:37:09Z gpotts $
-
-#include <cstdlib> /* for atof */
-#include <ossim/projection/ossimAdjMapModel.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/projection/ossimMapProjectionFactory.h>
-#include <ossim/elevation/ossimElevManager.h>
-
-// Geometry File Keywords:
-static const char* PARAMETER_KEYWORDS[] = {"map_offset_x",
-                                           "map_offset_y",
-                                           "map_rotation",
-                                           "map_scale_x",
-                                           "map_scale_y"};
-static const char* MAP_PROJ_FILE_KW    = "map_proj_filename";
-
-RTTI_DEF1(ossimAdjMapModel, "ossimAdjMapModel", ossimSensorModel);
-
-//----------------------------------------------------------------------------
-//! Constructs to uninitialized state (needed by factory).
-//----------------------------------------------------------------------------
-
-ossimAdjMapModel::ossimAdjMapModel()
-   :
-   ossimSensorModel(),
-   theAdjParams(NUM_ADJ_PARAMS),
-   theMapProjection(),
-   theCosTheta(0.0),
-   theSinTheta(0.0)
-{
-   theImageSize = ossimIpt(0,0);
-   initAdjustableParameters();
-   theErrorStatus++;
-}
-
-//----------------------------------------------------------------------------
-//! Constructs with map projection and image rectangle size.
-//----------------------------------------------------------------------------
-
-ossimAdjMapModel::ossimAdjMapModel(ossimMapProjection* map_proj,
-                                   const ossimIpt& image_size)
-   :
-   ossimSensorModel(),
-   theAdjParams(NUM_ADJ_PARAMS),
-   theMapProjection(map_proj),
-   theCosTheta(0.0),
-   theSinTheta(0.0)
-{
-   initializeFromMap();
-   theImageSize = image_size;
-   initAdjustableParameters();
-}
-
-//----------------------------------------------------------------------------
-//! Copy constructor
-//----------------------------------------------------------------------------
-
-ossimAdjMapModel::ossimAdjMapModel(const ossimAdjMapModel& copy_this)
-   :
-   ossimSensorModel(copy_this),
-   theAdjParams(NUM_ADJ_PARAMS),
-   theMapProjection(copy_this.theMapProjection),
-   theCosTheta(0.0),
-   theSinTheta(0.0)
-{
-   theAdjParams = copy_this.theAdjParams;
-}
-
-//----------------------------------------------------------------------------
-//! Constructs from Geom KWL
-//----------------------------------------------------------------------------
-ossimAdjMapModel::ossimAdjMapModel(const ossimKeywordlist& kwl,
-                                   const char* prefix)
-   :
-   ossimSensorModel(kwl),
-   theAdjParams(NUM_ADJ_PARAMS),
-   theMapProjection(),
-   theCosTheta(0.0),
-   theSinTheta(0.0)      
-                
-{
-   initAdjustableParameters();
-   loadState(kwl, prefix);
-}
-
-//----------------------------------------------------------------------------
-//! Constructs from Geom KWL
-//----------------------------------------------------------------------------
-
-ossimAdjMapModel::ossimAdjMapModel(const ossimFilename& kwl_filename)
-   :
-   ossimSensorModel(),
-   theAdjParams(NUM_ADJ_PARAMS),
-   theMapProjection(),
-   theCosTheta(0.0),
-   theSinTheta(0.0)      
-{
-   initAdjustableParameters();
-   ossimKeywordlist kwl (kwl_filename);
-   loadState(kwl);
-}
-
-//----------------------------------------------------------------------------
-//! Initializes base class data members after map model established. Returns TRUE if all's well.
-//----------------------------------------------------------------------------
-bool ossimAdjMapModel::initializeFromMap()
-{
-   if (!theMapProjection)
-   {
-      theErrorStatus++;
-      return false;
-   }
-   theSensorID = "AdjMapModel";
-   theGSD = theMapProjection->getMetersPerPixel();
-   theMeanGSD = 0.5*(theGSD.x + theGSD.y);
-   theRefGndPt = theMapProjection->origin();
-
-   return true;
-}
-
-//----------------------------------------------------------------------------
-//! Destructor
-//----------------------------------------------------------------------------
-ossimAdjMapModel::~ossimAdjMapModel()
-{
-   theAdjParams.CleanUp();
-}
-
-//----------------------------------------------------------------------------
-//! Initializes adjustable parameters to their default values.
-//! Overrides ossimAdjustableParameterInterface virtual method.
-//----------------------------------------------------------------------------
-void ossimAdjMapModel::initAdjustableParameters()
-{
-   // Initialize this adjustment as the initial geometry "adjustment":
-   removeAllAdjustments();
-   newAdjustment(NUM_ADJ_PARAMS);
-   setAdjustmentDescription("Initial Geometry");
-
-   // Initialize each adjustable parameter for this initial:
-   setAdjustableParameter (OFFSET_X, 0.0, 1.0);
-   setParameterDescription(OFFSET_X, "map_offset_x");
-   setParameterCenter     (OFFSET_X, 0.0);
-
-   setAdjustableParameter (OFFSET_Y, 0.0, 1.0);
-   setParameterDescription(OFFSET_Y, "map_offset_y");
-   setParameterCenter     (OFFSET_Y, 0.0);
-
-   setAdjustableParameter (ROTATION, 0.0, 1.0);
-   setParameterDescription(ROTATION, "map_rotation");
-   setParameterCenter     (ROTATION, 0.0);
-
-   setAdjustableParameter (SCALE_X, 0.0, 1.0);
-   setParameterDescription(SCALE_X, "map_scale_x");
-   setParameterCenter     (SCALE_X, 1.0);
-
-   setAdjustableParameter (SCALE_Y, 0.0, 1.0);
-   setParameterDescription(SCALE_Y, "map_scale_y");
-   setParameterCenter     (SCALE_Y, 1.0);
-
-   updateModel();
-}
-
-//----------------------------------------------------------------------------
-//! Following a change to the adjustable parameter set, this virtual is called
-//! to permit instances to compute derived quantities after parameter change.
-//----------------------------------------------------------------------------
-void ossimAdjMapModel::updateModel()
-{
-   for (int i=0; i<NUM_ADJ_PARAMS; i++)
-      theAdjParams[i] = computeParameterOffset(i);
-
-   theCosTheta = ossim::cosd(theAdjParams[ROTATION]);
-   theSinTheta = ossim::sind(theAdjParams[ROTATION]);
-}
-
-//----------------------------------------------------------------------------
-//! Overrides base class pure virtual.
-//----------------------------------------------------------------------------
-void ossimAdjMapModel::lineSampleHeightToWorld(const ossimDpt& image_point,
-                                     const double&   heightEllipsoid,
-                                     ossimGpt&       worldPoint) const
-{
-   // Just call other transform method 
-   // Check for bad map projection pointer:
-   if (!theMapProjection)
-   {
-      worldPoint = ossimGpt(ossim::nan(), ossim::nan(), ossim::nan());
-      return;
-   }
-
-   // Adjust image point by transform:
-   double x = theAdjParams[SCALE_X]*(image_point.x - theAdjParams[OFFSET_X]);
-   double y = theAdjParams[SCALE_Y]*(image_point.y - theAdjParams[OFFSET_Y]);
-   ossimDpt adjusted_point(x*theCosTheta + y*theSinTheta, 
-                           y*theCosTheta - x*theSinTheta);
-
-   // Obtain ground point given adjusted image point:
-   theMapProjection->lineSampleHeightToWorld(adjusted_point,
-                                             heightEllipsoid,
-                                             worldPoint);
-   worldPoint.height(heightEllipsoid);
-}
-
-//----------------------------------------------------------------------------
-//! Overrides base class virtual.
-//----------------------------------------------------------------------------
-void ossimAdjMapModel::lineSampleToWorld(const ossimDpt& image_point,
-                                         ossimGpt&       worldPoint) const
-{
-   lineSampleHeightToWorld(image_point, 0.0, worldPoint);
-   if (!worldPoint.hasNans())
-   {
-//      worldPoint.height(theElevation->getHeightAboveEllipsoid(worldPoint));
-   }
-}
-
-//----------------------------------------------------------------------------
-//! Rigorous inverse transform implented, overrides base-class' iterative
-//! solution.
-//----------------------------------------------------------------------------
-void ossimAdjMapModel::worldToLineSample(const ossimGpt& world_point,
-                                         ossimDpt&       image_point) const
-{
-   // Check for bad map projection pointer:
-   if (!theMapProjection)
-   {
-      image_point = ossimDpt(ossim::nan(), ossim::nan());
-      return;
-   }
-
-   // Obtain non-adjusted image point given ground point:
-   ossimDpt p1;
-   theMapProjection->worldToLineSample(world_point, p1);
-
-   // Adjust image point by transform:
-   ossimDpt p2 (p1.x*theCosTheta - p1.y*theSinTheta, 
-                p1.y*theCosTheta + p1.x*theSinTheta);
-   image_point.x = p2.x/theAdjParams[SCALE_X] + theAdjParams[OFFSET_X];
-   image_point.y = p2.y/theAdjParams[SCALE_Y] + theAdjParams[OFFSET_Y];
-}
-
-//----------------------------------------------------------------------------
-//! Fulfills ossimObject base-class pure virtuals. Saves geometry
-//! KWL files. Returns true if successful.
-//----------------------------------------------------------------------------
-bool ossimAdjMapModel::saveState(ossimKeywordlist& kwl, const char* prefix) const
-{
-   kwl.add(prefix, ossimKeywordNames::TYPE_KW, "ossimAdjMapModel");
-
-   // Hand off to base class for common stuff:
-   ossimSensorModel::saveState(kwl, prefix);
-
-   // Save off data members:
-   for (int i=0; i<NUM_ADJ_PARAMS; i++)
-      kwl.add(prefix, PARAMETER_KEYWORDS[i], theAdjParams[i]);
-
-   // Save off map projection info:
-   if (theMapProjection.valid())
-   {
-      theMapProjection->saveState(kwl, prefix);
-   }
-
-   return true;
-}
-
-//----------------------------------------------------------------------------
-//! Fulfills ossimObject base-class pure virtuals. Loads geometry
-//! KWL files. Returns true if successful.
-//----------------------------------------------------------------------------
-bool ossimAdjMapModel::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   static const ossimString MODULE ("ossimAdjMapModel::loadState() -- ");
-   bool success = true;
-   const char* value_str;
-   double value;
-   ossimString error_msg (MODULE+"Error encountered reading keyword: ");
-
-   try
-   {
-      // Verify correct model type:
-      value_str = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
-      if ((!value_str) || (strcmp(value_str, TYPE_NAME(this))))
-      {
-         throw (error_msg + ossimKeywordNames::TYPE_KW);
-      }
-
-      //---
-      // Instantiate the map projection via the factory if one has not been
-      // initialized yet:
-      //---
-      if (!theMapProjection)
-      {
-         // should find the map projection filename in the KWL:
-         value_str = kwl.find(prefix, MAP_PROJ_FILE_KW);
-         if (!value_str)
-         {
-            throw (error_msg + MAP_PROJ_FILE_KW);
-         }
-         theMapProjection = PTR_CAST(ossimMapProjection,
-            ossimMapProjectionFactory::instance()->createProjection(ossimKeywordlist(value_str)));
-         if (!theMapProjection)
-         {
-            throw "Error encountered instantiating map ";
-         }
-      }
-
-      // Everything OK so far, just load in the adjustable parameters. This involves modifying the
-      // center value of the bsae class adjustable parameter:
-      for (int i=0; i<NUM_ADJ_PARAMS; i++)
-      {
-         value_str = kwl.find(prefix, PARAMETER_KEYWORDS[i]);
-         if (!value_str)
-         {
-            throw (error_msg + PARAMETER_KEYWORDS[i]).chars();
-         }
-         value = atof(value_str);
-         setParameterCenter(i, value);
-      }
-   }
-   catch (const char* /*message*/)
-   {
-      theErrorStatus++;
-      success = false;
-   }
-
-   //---
-   // updateModel() reads the base class adjustable parameters and initializes
-   // theAdjParams
-   // with the unnormalized, biased (to the "center" set above) quantities
-   // used in the projection:
-   //---
-   if (success)
-   {
-      initializeFromMap();
-      updateModel();
-   }
-
-   return success;
-}  
-
-//----------------------------------------------------------------------------
-//! Writes a template of geom keywords processed by loadState and saveState to
-//! output stream.
-//----------------------------------------------------------------------------
-void ossimAdjMapModel::writeGeomTemplate(ostream& os)
-{
-   os <<
-      "//*****************************************************************\n"
-      "// Template for Adjustable Map Model keywordlist\n"
-      "//*****************************************************************\n"
-      << ossimKeywordNames::TYPE_KW << ": " << "ossimFcsiModel" << endl;
-
-   ossimSensorModel::writeGeomTemplate(os);
-
-   os << "//***\n"
-      << "// Derived-class AdjMapModel Keywords:\n"
-      << "//***\n"
-      << PARAMETER_KEYWORDS[OFFSET_X] << ": <east offset meters>\n"
-      << PARAMETER_KEYWORDS[OFFSET_Y] << ": <north offset meters>\n"
-      << PARAMETER_KEYWORDS[ROTATION] << ": <degrees CW>\n"
-      << PARAMETER_KEYWORDS[SCALE_X]  << ": <ratio>\n"
-      << PARAMETER_KEYWORDS[SCALE_Y]  << ": <ratio>\n"
-      << endl;
-
-   return;
-}
-
-//----------------------------------------------------------------------------
-//! Extends base-class implementation. Dumps contents of object to ostream.
-//----------------------------------------------------------------------------
-std::ostream& ossimAdjMapModel::print(std::ostream& out) const
-{      
-   ossimSensorModel::print(out);
-   for (int i=0; i<NUM_ADJ_PARAMS; i++)
-      out << PARAMETER_KEYWORDS[i]  << ": " << theAdjParams[i] << endl;
-   out << endl;
-
-   return out;
-}
-
-//----------------------------------------------------------------------------
-//! Fetches the GSD from the internal map projection.
-//----------------------------------------------------------------------------
-ossimDpt ossimAdjMapModel::getMetersPerPixel () const
-{
-   if (theMapProjection.valid())
-   {
-      return theMapProjection->getMetersPerPixel();
-   }
-   
-   return ossimDpt(0,0);
-}
-
-ossimObject* ossimAdjMapModel::dup() const
-{
-   return new ossimAdjMapModel(*this);
-}
-
diff --git a/src/ossim/projection/ossimAlbersProjection.cpp b/src/ossim/projection/ossimAlbersProjection.cpp
deleted file mode 100644
index a685a01..0000000
--- a/src/ossim/projection/ossimAlbersProjection.cpp
+++ /dev/null
@@ -1,641 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  See top LICENSE.txt file.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-// Calls Geotrans Albers projection code.  
-//*******************************************************************
-//  $Id: ossimAlbersProjection.cpp 17815 2010-08-03 13:23:14Z dburken $
-
-#include <ossim/projection/ossimAlbersProjection.h>
-
-#include <ossim/base/ossimKeywordNames.h>
-
-RTTI_DEF1(ossimAlbersProjection, "ossimAlbersProjection", ossimMapProjection)
-
-#ifdef PI_OVER_2
-#  undef PI_OVER_2
-#endif   
-
-#define ALBERS_NO_ERROR           0x0000
-#define ALBERS_LAT_ERROR          0x0001
-#define ALBERS_LON_ERROR          0x0002
-#define ALBERS_EASTING_ERROR      0x0004
-#define ALBERS_NORTHING_ERROR     0x0008
-#define ALBERS_ORIGIN_LAT_ERROR   0x0010
-#define ALBERS_CENT_MER_ERROR     0x0020
-#define ALBERS_A_ERROR            0x0040
-#define ALBERS_INV_F_ERROR        0x0080
-#define ALBERS_FIRST_STDP_ERROR   0x0100
-#define ALBERS_SECOND_STDP_ERROR  0x0200
-#define ALBERS_FIRST_SECOND_ERROR 0x0400
-#define ALBERS_HEMISPHERE_ERROR   0x0800
-
-#define PI_OVER_2  ( M_PI / 2.0)                 
-#define ES_SIN(sinlat)          (es * sinlat)
-#define ONE_MINUS_SQR(x)        (1.0 - x * x)
-#define ALBERS_M(clat,oneminussqressin)   (clat / sqrt(oneminussqressin))
-#define ALBERS_Q(slat,oneminussqressin,essin) (one_MINUS_es2)*(slat / (oneminussqressin)-    \
-											  (1 / (two_es)) *log((1 - essin) / (1 + essin)))
-
-
-ossimAlbersProjection::ossimAlbersProjection(const ossimEllipsoid& ellipsoid,
-                                             const ossimGpt& origin)
-   :ossimMapProjection(ellipsoid, origin)
-{
-   Albers_Delta_Northing = 40000000.0;
-   Albers_Delta_Easting  = 40000000.0;
-   setDefaults();
-   update();
-}
-    
-ossimAlbersProjection::ossimAlbersProjection(const ossimEllipsoid& ellipsoid,
-                                             const ossimGpt& origin,
-                                             double stdParallel1,
-                                             double stdParallel2,
-                                             double falseEasting,
-                                             double falseNorthing)
-  :ossimMapProjection(ellipsoid, origin)
-{
-   Albers_Std_Parallel_1 = stdParallel1*RAD_PER_DEG;
-   Albers_Std_Parallel_2 = stdParallel2*RAD_PER_DEG;
-   Albers_Delta_Northing = 40000000.0;
-   Albers_Delta_Easting  = 40000000.0;
-   Albers_False_Easting  = falseEasting;
-   Albers_False_Northing = falseNorthing;
-   
-   update();
-   
-}
-
-ossimObject* ossimAlbersProjection::dup() const
-{
-   return new ossimAlbersProjection(*this);
-}
-
-ossimAlbersProjection::~ossimAlbersProjection()
-{
-}
-
-void ossimAlbersProjection::update()
-{
-   Set_Albers_Parameters(theEllipsoid.getA(),
-                         theEllipsoid.getFlattening(),
-                         theOrigin.latr(),
-                         theOrigin.lonr(),
-                         Albers_Std_Parallel_1,
-                         Albers_Std_Parallel_2,
-                         Albers_False_Easting,
-                         Albers_False_Northing);
-   
-   theFalseEastingNorthing.x = Albers_False_Easting;
-   theFalseEastingNorthing.y = Albers_False_Northing;
-
-   ossimMapProjection::update();
-}
-
-
-ossimGpt ossimAlbersProjection::inverse(const ossimDpt &eastingNorthing)const
-{
-   double lat, lon;
-   
-   
-   Convert_Albers_To_Geodetic(eastingNorthing.x,
-                              eastingNorthing.y,
-                              &lat,
-                              &lon);
-   
-   return ossimGpt(lat*DEG_PER_RAD, lon*DEG_PER_RAD, 0, theDatum);
-}
-
-ossimDpt ossimAlbersProjection::forward(const ossimGpt &latLon)const
-{
-   double easting  = 0.0;
-   double northing = 0.0;
-   ossimGpt gpt = latLon;
-   
-   if (theDatum)
-   {
-      if (theDatum->code() != latLon.datum()->code())
-      {
-         gpt.changeDatum(theDatum); // Shift to our datum.
-      }
-   }
-
-
-   Convert_Geodetic_To_Albers(gpt.latr(),
-                              gpt.lonr(),
-                              &easting,
-                              &northing);
-   
-   return ossimDpt(easting, northing);
-}
-
-void ossimAlbersProjection::setStandardParallel1(double degree)
-{
-   Albers_Std_Parallel_1 = degree*RAD_PER_DEG;
-   update();
-}
-
-void ossimAlbersProjection::setStandardParallel2(double degree)
-{
-   Albers_Std_Parallel_2 = degree*RAD_PER_DEG;
-   update();
-}
-
-void ossimAlbersProjection::setStandardParallels(double parallel1Degree,
-                                                 double parallel2Degree)
-{
-   Albers_Std_Parallel_1 = parallel1Degree*RAD_PER_DEG;
-   Albers_Std_Parallel_2 = parallel2Degree*RAD_PER_DEG;
-   update();
-   
-}
-
-void ossimAlbersProjection::setFalseEasting(double falseEasting)
-{
-   Albers_False_Easting = falseEasting;
-   update();
-}
-
-void ossimAlbersProjection::setFalseNorthing(double falseNorthing)
-{
-   Albers_False_Northing = falseNorthing;
-   update();
-}
-
-void ossimAlbersProjection::setFalseEastingNorthing(double falseEasting,
-                                                    double falseNorthing)
-{
-   Albers_False_Easting = falseEasting;
-   Albers_False_Northing = falseNorthing;  
-   update();
-}
-
-void ossimAlbersProjection::setParameters(double parallel1,
-                                          double parallel2,
-                                          double falseEasting,
-                                          double falseNorthing)
-{
-   Albers_False_Easting = falseEasting;
-   Albers_False_Northing = falseNorthing;  
-   Albers_Std_Parallel_1 = parallel1*RAD_PER_DEG;
-   Albers_Std_Parallel_2 = parallel2*RAD_PER_DEG;
-   update(); 
-}
-
-double ossimAlbersProjection::getStandardParallel1()const
-{
-   return  Albers_Std_Parallel_1/RAD_PER_DEG;
-}
-
-double ossimAlbersProjection::getStandardParallel2()const
-{
-   return  Albers_Std_Parallel_2/RAD_PER_DEG;
-}
-
-void ossimAlbersProjection::setDefaults()
-{
-   // initialize to some default
-   Albers_Std_Parallel_1 = 29.5*RAD_PER_DEG;
-   Albers_Std_Parallel_2 = 45.5*RAD_PER_DEG;
-   Albers_False_Easting  = 0.0;
-   Albers_False_Northing = 0.0;  
-}
-
-bool ossimAlbersProjection::saveState(ossimKeywordlist& kwl, const char* prefix) const
-{
-   kwl.add(prefix,
-           ossimKeywordNames::STD_PARALLEL_1_KW,
-           Albers_Std_Parallel_1*DEG_PER_RAD,
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::STD_PARALLEL_2_KW,
-           Albers_Std_Parallel_2*DEG_PER_RAD,
-           true);
-   
-   return ossimMapProjection::saveState(kwl, prefix);
-}
-
-bool ossimAlbersProjection::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   // Must do this first...
-   bool flag = ossimMapProjection::loadState(kwl, prefix);
-
-   const char* type          = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
-
-   const char* stdParallel1  = kwl.find(prefix, ossimKeywordNames::STD_PARALLEL_1_KW);
-   const char* stdParallel2  = kwl.find(prefix, ossimKeywordNames::STD_PARALLEL_2_KW);
-
-   
-   if(ossimString(type) == STATIC_TYPE_NAME(ossimAlbersProjection))
-   {
-      Albers_False_Easting  = theFalseEastingNorthing.x;
-      Albers_False_Northing = theFalseEastingNorthing.y;
-
-      if(stdParallel1)
-      {
-         Albers_Std_Parallel_1 = ossimString(stdParallel1).toDouble()*RAD_PER_DEG;
-      }
-      else
-      {
-         Albers_Std_Parallel_1 = 29.5*RAD_PER_DEG;         
-      }
-      if(stdParallel2)
-      {
-         Albers_Std_Parallel_2 = ossimString(stdParallel2).toDouble()*RAD_PER_DEG;
-      }
-      else
-      {
-         Albers_Std_Parallel_2 = 45.5*RAD_PER_DEG;
-      }
-   }
-
-   update();
-   
-   return flag;
-}
-
-
-/***************************************************************************/
-/*
- *                              FUNCTIONS
- */
-long ossimAlbersProjection::Set_Albers_Parameters(double a,
-                                                  double f,
-                                                  double Origin_Latitude,
-                                                  double Central_Meridian,
-                                                  double Std_Parallel_1,
-                                                  double Std_Parallel_2,
-                                                  double False_Easting,
-                                                  double False_Northing)
-
-{
-/*
- * The function Set_Albers_Parameters receives the ellipsoid parameters and
- * projection parameters as inputs, and sets the corresponding state
- * variables.  If any errors occur, the error code(s) are returned by the function, 
- * otherwise ALBERS_NO_ERROR is returned.
- *
- *    a                 : Semi-major axis of ellipsoid, in meters   (input)
- *    f                 : Flattening of ellipsoid                   (input)
- *    Origin_Latitude   : Latitude in radians at which the          (input)
- *                          point scale factor is 1.0
- *    Central_Meridian  : Longitude in radians at the center of     (input)
- *                          the projection
- *    Std_Parallel_1    : First standard parallel                   (input)
- *    Std_Parallel_2    : Second standard parallel                  (input)
- *    False_Easting     : A coordinate value in meters assigned to the
- *                          central meridian of the projection.     (input)
- *    False_Northing    : A coordinate value in meters assigned to the
- *                          origin latitude of the projection       (input)
- */
-
-  double sin_lat, sin_lat_1, cos_lat;
-  double m1, m2, SQRm1;
-  double q0, q1, q2;
-  double es_sin, one_MINUS_SQRes_sin;
-  double nq0;
-  double inv_f = 1 / f;
-  long Error_Code = ALBERS_NO_ERROR;
-
-  if (a <= 0.0)
-  { /* Semi-major axis must be greater than zero */
-    Error_Code |= ALBERS_A_ERROR;
-  }
-  if ((inv_f < 250) || (inv_f > 350))
-  { /* Inverse flattening must be between 250 and 350 */
-    Error_Code |= ALBERS_INV_F_ERROR;
-  }
-  if ((Origin_Latitude < -PI_OVER_2) || (Origin_Latitude > PI_OVER_2))
-  { /* origin latitude out of range */
-    Error_Code |= ALBERS_ORIGIN_LAT_ERROR;
-  }
-  if ((Central_Meridian < -M_PI) || (Central_Meridian > TWO_PI))
-  { /* origin longitude out of range */
-    Error_Code |= ALBERS_CENT_MER_ERROR;
-  }
-  if ((Std_Parallel_1 < -PI_OVER_2) || (Std_Parallel_1 > PI_OVER_2))
-  { /* First Standard Parallel out of range */
-    Error_Code |= ALBERS_FIRST_STDP_ERROR;
-  }
-  if ((Std_Parallel_2 < -PI_OVER_2) || (Std_Parallel_2 > PI_OVER_2))
-  { /* Second Standard Parallel out of range */
-    Error_Code |= ALBERS_SECOND_STDP_ERROR;
-  }
-  if ((Std_Parallel_1 == 0.0) && (Std_Parallel_2 == 0.0))
-  { /* First & Second Standard Parallels equal 0 */
-    Error_Code |= ALBERS_FIRST_SECOND_ERROR;
-  }
-  if (Std_Parallel_1 == -Std_Parallel_2)
-  { /* Parallels are opposite latitudes */
-    Error_Code |= ALBERS_HEMISPHERE_ERROR;
-  }
-
-  if (!Error_Code)
-  { /* no errors */
-    Albers_a = a;
-    Albers_f = f;
-    Albers_Origin_Lat = Origin_Latitude;
-    Albers_Std_Parallel_1 = Std_Parallel_1;
-    Albers_Std_Parallel_2 = Std_Parallel_2;
-    if (Central_Meridian > M_PI)
-      Central_Meridian -= TWO_PI;
-    Albers_Origin_Long = Central_Meridian;
-    Albers_False_Easting = False_Easting;
-    Albers_False_Northing = False_Northing;
-
-    es2 = 2 * Albers_f - Albers_f * Albers_f;
-    es = sqrt(es2);
-    one_MINUS_es2 = 1 - es2;
-    two_es = 2 * es;
-
-    sin_lat = sin(Albers_Origin_Lat);
-    es_sin = ES_SIN(sin_lat);
-    one_MINUS_SQRes_sin = ONE_MINUS_SQR(es_sin);
-    q0 = ALBERS_Q(sin_lat, one_MINUS_SQRes_sin, es_sin);
-
-    sin_lat_1 = sin(Albers_Std_Parallel_1);
-    cos_lat = cos(Albers_Std_Parallel_1);
-    es_sin = ES_SIN(sin_lat_1);
-    one_MINUS_SQRes_sin = ONE_MINUS_SQR(es_sin);
-    m1 = ALBERS_M(cos_lat, one_MINUS_SQRes_sin);
-    q1 = ALBERS_Q(sin_lat_1, one_MINUS_SQRes_sin, es_sin);
-
-    SQRm1 = m1 * m1;
-    if (fabs(Albers_Std_Parallel_1 - Albers_Std_Parallel_2) > 1.0e-10)
-    {
-      sin_lat = sin(Albers_Std_Parallel_2);
-      cos_lat = cos(Albers_Std_Parallel_2);
-      es_sin = ES_SIN(sin_lat);
-      one_MINUS_SQRes_sin = ONE_MINUS_SQR(es_sin);
-      m2 = ALBERS_M(cos_lat, one_MINUS_SQRes_sin);
-      q2 = ALBERS_Q(sin_lat, one_MINUS_SQRes_sin, es_sin);
-      n = (SQRm1 - m2 * m2) / (q2 - q1);
-    }
-    else
-      n = sin_lat_1;
-
-    C = SQRm1 + n * q1;
-    Albers_a_OVER_n = Albers_a / n;
-    nq0 = n * q0;
-    if (C < nq0)
-      rho0 = 0;
-    else
-      rho0 = Albers_a_OVER_n * sqrt(C - nq0);
-
-
-  } /* END OF if(!Error_Code) */
-  return (Error_Code);
-} /* END OF Set_Albers_Parameters */
-
-
-void ossimAlbersProjection::Get_Albers_Parameters(double *a,
-                                                  double *f,
-                                                  double *Origin_Latitude,
-                                                  double *Central_Meridian,
-                                                  double *Std_Parallel_1,
-                                                  double *Std_Parallel_2,
-                                                  double *False_Easting,
-                                                  double *False_Northing)const
-
-{ /* BEGIN Get_Albers_Parameters */
-/*
- * The function Get_Albers_Parameters returns the current ellipsoid
- * parameters, and Albers projection parameters.
- *
- *    a                 : Semi-major axis of ellipsoid, in meters   (output)
- *    f                 : Flattening of ellipsoid										(output)
- *    Origin_Latitude   : Latitude in radians at which the          (output)
- *                          point scale factor is 1.0
- *    Origin_Longitude  : Longitude in radians at the center of     (output)
- *                          the projection
- *    Std_Parallel_1    : First standard parallel                   (output)
- *    Std_Parallel_2    : Second standard parallel                  (output)
- *    False_Easting     : A coordinate value in meters assigned to the
- *                          central meridian of the projection.     (output)
- *    False_Northing    : A coordinate value in meters assigned to the
- *                          origin latitude of the projection       (output)
- */
-
-  *a = Albers_a;
-  *f = Albers_f;
-  *Origin_Latitude = Albers_Origin_Lat;
-  *Std_Parallel_1 = Albers_Std_Parallel_1;
-  *Std_Parallel_2 = Albers_Std_Parallel_2;
-  *Central_Meridian = Albers_Origin_Long;
-  *False_Easting = Albers_False_Easting;
-  *False_Northing = Albers_False_Northing;
-  return;
-} /* END OF Get_Albers_Parameters */
-
-
-long ossimAlbersProjection::Convert_Geodetic_To_Albers (double Latitude,
-                                                        double Longitude,
-                                                        double *Easting,
-                                                        double *Northing)const
-
-{ /* BEGIN Convert_Geodetic_To_Albers */
-/*
- * The function Convert_Geodetic_To_Albers converts geodetic (latitude and
- * longitude) coordinates to Albers projection (easting and northing)
- * coordinates, according to the current ellipsoid and Albers projection
- * parameters.  If any errors occur, the error code(s) are returned by the
- * function, otherwise ALBERS_NO_ERROR is returned.
- *
- *    Latitude          : Latitude (phi) in radians           (input)
- *    Longitude         : Longitude (lambda) in radians       (input)
- *    Easting           : Easting (X) in meters               (output)
- *    Northing          : Northing (Y) in meters              (output)
- */
-
-  double dlam;                      /* Longitude - Central Meridan */
-  double sin_lat, cos_lat;
-  double es_sin, one_MINUS_SQRes_sin;
-  double q;
-  double rho;
-  double theta;
-  double nq;
-  long Error_Code = ALBERS_NO_ERROR;
-
-  if ((Latitude < -PI_OVER_2) || (Latitude > PI_OVER_2))
-  {  /* Latitude out of range */
-    Error_Code |= ALBERS_LAT_ERROR;
-  }
-  if ((Longitude < -M_PI) || (Longitude > TWO_PI))
-  {  /* Longitude out of range */
-    Error_Code|= ALBERS_LON_ERROR;
-  }
-
-  if (!Error_Code)
-  { /* no errors */
-
-    dlam = Longitude - Albers_Origin_Long;
-    if (dlam > M_PI)
-    {
-      dlam -= TWO_PI;
-    }
-    if (dlam < -M_PI)
-    {
-      dlam += TWO_PI;
-    }
-    sin_lat = sin(Latitude);
-    cos_lat = cos(Latitude);
-    es_sin = ES_SIN(sin_lat);
-    one_MINUS_SQRes_sin = ONE_MINUS_SQR(es_sin);
-    q = ALBERS_Q(sin_lat, one_MINUS_SQRes_sin, es_sin);
-    nq = n * q;
-    if (C < nq)
-      rho = 0;
-    else
-      rho = Albers_a_OVER_n * sqrt(C - nq);
-
-
-    theta = n * dlam;
-    *Easting = rho * sin(theta) + Albers_False_Easting;
-    *Northing = rho0 - rho * cos(theta) + Albers_False_Northing;
-  }
-  return (Error_Code);
-} /* END OF Convert_Geodetic_To_Albers */
-
-
-long ossimAlbersProjection::Convert_Albers_To_Geodetic(double Easting,
-                                                       double Northing,
-                                                       double *Latitude,
-                                                       double *Longitude)const
-{ /* BEGIN Convert_Albers_To_Geodetic */
-/*
- * The function Convert_Albers_To_Geodetic converts Albers projection
- * (easting and northing) coordinates to geodetic (latitude and longitude)
- * coordinates, according to the current ellipsoid and Albers projection
- * coordinates.  If any errors occur, the error code(s) are returned by the
- * function, otherwise ALBERS_NO_ERROR is returned.
- *
- *    Easting           : Easting (X) in meters                  (input)
- *    Northing          : Northing (Y) in meters                 (input)
- *    Latitude          : Latitude (phi) in radians              (output)
- *    Longitude         : Longitude (lambda) in radians          (output)
- */
-
-  double dy, dx;
-  double rho0_MINUS_dy;
-  double q, qconst, q_OVER_2;
-  double rho, rho_n;
-  double PHI, Delta_PHI = 1.0;
-  double sin_phi;
-  double es_sin, one_MINUS_SQRes_sin;
-  double theta = 0.0;
-  double tolerance = 4.85e-10;        /* approximately 1/1000th of
-                              an arc second or 1/10th meter */
-  long Error_Code = ALBERS_NO_ERROR; 
-
-  if ((Easting < (Albers_False_Easting - Albers_Delta_Easting)) 
-      || (Easting > Albers_False_Easting + Albers_Delta_Easting))
-  { /* Easting out of range  */
-    Error_Code |= ALBERS_EASTING_ERROR;
-  }
-  if ((Northing < (Albers_False_Northing - Albers_Delta_Northing)) 
-      || (Northing > Albers_False_Northing + Albers_Delta_Northing))
-  { /* Northing out of range */
-    Error_Code |= ALBERS_NORTHING_ERROR;
-  }
-
-  if (!Error_Code)
-  {
-    dy = Northing - Albers_False_Northing;
-    dx = Easting - Albers_False_Easting;
-    rho0_MINUS_dy = rho0 - dy;
-    rho = sqrt(dx * dx + rho0_MINUS_dy * rho0_MINUS_dy);
-
-    if (n < 0)
-    {
-      rho *= -1.0;
-      dy *= -1.0;
-      dx *= -1.0;
-      rho0_MINUS_dy *= -1.0;
-    }
-
-    if (rho != 0.0)
-      theta = atan2(dx, rho0_MINUS_dy);
-    rho_n = rho * n;
-    q = (C - (rho_n * rho_n) / (Albers_a * Albers_a)) / n;
-    qconst = 1 - ((one_MINUS_es2) / (two_es)) * log((1.0 - es) / (1.0 + es));
-    if (fabs(fabs(qconst) - fabs(q)) > 1.0e-6)
-    {
-      q_OVER_2 = q / 2.0;
-      if (q_OVER_2 > 1.0)
-        *Latitude = PI_OVER_2;
-      else if (q_OVER_2 < -1.0)
-        *Latitude = -PI_OVER_2;
-      else
-      {
-        PHI = asin(q_OVER_2);
-        if (es < 1.0e-10)
-          *Latitude = PHI;
-        else
-        {
-          while (fabs(Delta_PHI) > tolerance)
-          {
-            sin_phi = sin(PHI);
-            es_sin = ES_SIN(sin_phi);
-            one_MINUS_SQRes_sin = ONE_MINUS_SQR(es_sin);
-            Delta_PHI = (one_MINUS_SQRes_sin * one_MINUS_SQRes_sin) / (2.0 * cos(PHI)) *
-                        (q / (one_MINUS_es2) - sin_phi / one_MINUS_SQRes_sin +
-                         (log((1.0 - es_sin) / (1.0 + es_sin)) / (two_es)));
-            PHI += Delta_PHI;
-          }
-          *Latitude = PHI;
-        }
-
-        if (*Latitude > PI_OVER_2)  /* force distorted values to 90, -90 degrees */
-          *Latitude = PI_OVER_2;
-        else if (*Latitude < -PI_OVER_2)
-          *Latitude = -PI_OVER_2;
-
-      }
-    }
-    else
-    {
-      if (q >= 0.0)
-        *Latitude = PI_OVER_2;
-      else
-        *Latitude = -PI_OVER_2;
-    }
-    *Longitude = Albers_Origin_Long + theta / n;
-
-    if (*Longitude > M_PI)
-      *Longitude -= TWO_PI;
-    if (*Longitude < -M_PI)
-      *Longitude += TWO_PI;
-
-    if (*Longitude > M_PI) /* force distorted values to 180, -180 degrees */
-      *Longitude = M_PI;
-    else if (*Longitude < -M_PI)
-      *Longitude = -M_PI;
-
-  }
-  return (Error_Code);
-} /* END OF Convert_Albers_To_Geodetic */
-
-//*************************************************************************************************
-//! Returns TRUE if principal parameters are within epsilon tolerance.
-//*************************************************************************************************
-bool ossimAlbersProjection::operator==(const ossimProjection& proj) const
-{
-   if (!ossimMapProjection::operator==(proj)) return false;
-
-   ossimAlbersProjection* p = PTR_CAST(ossimAlbersProjection, &proj);
-   if (!p) return false;
-
-   if (!ossim::almostEqual(Albers_Std_Parallel_1,p->Albers_Std_Parallel_1)) return false;
-   if (!ossim::almostEqual(Albers_Std_Parallel_2,p->Albers_Std_Parallel_2)) return false;
-   if (!ossim::almostEqual(Albers_Delta_Northing,p->Albers_Delta_Northing)) return false;
-   if (!ossim::almostEqual(Albers_Delta_Easting, p->Albers_Delta_Easting) ) return false;
-
-   return true;
-}
diff --git a/src/ossim/projection/ossimApplanixEcefModel.cpp b/src/ossim/projection/ossimApplanixEcefModel.cpp
deleted file mode 100644
index e360de7..0000000
--- a/src/ossim/projection/ossimApplanixEcefModel.cpp
+++ /dev/null
@@ -1,801 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimApplanixEcefModel.cpp 22271 2013-05-27 18:24:22Z gpotts $
-#include <sstream>
-#include <ossim/projection/ossimApplanixEcefModel.h>
-#include <ossim/base/ossimEllipsoid.h>
-#include <ossim/base/ossimUnitConversionTool.h>
-#include <ossim/base/ossimUnitTypeLut.h>
-#include <ossim/base/ossimDatumFactory.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimLsrSpace.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimGeoidManager.h>
-#include <ossim/projection/ossimUtmProjection.h>
-#include <ossim/support_data/ossimApplanixEOFile.h>
-#include <ossim/base/ossimMatrix4x4.h>
-#include <ossim/elevation/ossimElevManager.h>
-static ossimTrace traceDebug("ossimApplanixEcefModel:debug");
-
-RTTI_DEF1(ossimApplanixEcefModel, "ossimApplanixEcefModel", ossimSensorModel);
-
-#ifdef OSSIM_ID_ENABLED
-static const char OSSIM_ID[] = "$Id: ossimApplanixEcefModel.cpp 22271 2013-05-27 18:24:22Z gpotts $";
-#endif
-
-ossimApplanixEcefModel::ossimApplanixEcefModel()
-{
-   theCompositeMatrix          = ossimMatrix4x4::createIdentity();
-   theCompositeMatrixInverse   = ossimMatrix4x4::createIdentity();
-   theRoll                     = 0.0;
-   thePitch                    = 0.0;
-   theHeading                  = 0.0;
-   theFocalLength              = 55.0;
-   thePixelSize = ossimDpt(.009, .009);
-   theEcefPlatformPosition = ossimGpt(0.0,0.0, 1000.0);
-   theAdjEcefPlatformPosition = ossimGpt(0.0,0.0, 1000.0);
-   theGSD.x = 0.1524;
-   theGSD.y = 0.1524;
-   theMeanGSD = 0.1524;
-   theLensDistortion = new ossimMeanRadialLensDistortion;
-   initAdjustableParameters();
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimApplanixEcefModel::ossimApplanixEcefModel DEBUG:" << endl;
-#ifdef OSSIM_ID_ENABLED
-      ossimNotify(ossimNotifyLevel_DEBUG)<< "OSSIM_ID:  " << OSSIM_ID << endl;
-#endif
-   }
-}
-ossimApplanixEcefModel::ossimApplanixEcefModel(const ossimDrect& imageRect,
-                                               const ossimGpt& platformPosition,
-                                               double roll,
-                                               double pitch,
-                                               double heading,
-                                               const ossimDpt& /* principalPoint */, // in millimeters
-                                               double focalLength, // in millimeters
-                                               const ossimDpt& pixelSize) // in millimeters
-{
-   theImageClipRect = imageRect;
-   theRefImgPt      = theImageClipRect.midPoint();
-   theCompositeMatrix          = ossimMatrix4x4::createIdentity();
-   theCompositeMatrixInverse   = ossimMatrix4x4::createIdentity();
-   theRoll                     = roll;
-   thePitch                    = pitch;
-   theHeading                  = heading;
-   theFocalLength              = focalLength;
-   thePixelSize                = pixelSize;
-   theEcefPlatformPosition     = platformPosition;
-   theAdjEcefPlatformPosition  = platformPosition;
-   theLensDistortion           = new ossimMeanRadialLensDistortion;
-   initAdjustableParameters();
-   updateModel();
-
-   try
-   {
-      // Method throws ossimException.
-      computeGsd();
-   }
-   catch (const ossimException& e)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimApplanixEcefModel Constructor caught Exception:\n"
-         << e.what() << std::endl;
-   }
-   
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-      << "ossimApplanixEcefModel::ossimApplanixEcefModel DEBUG:" << endl;
-#ifdef OSSIM_ID_ENABLED
-      ossimNotify(ossimNotifyLevel_DEBUG)<< "OSSIM_ID:  " << OSSIM_ID << endl;
-#endif
-   }
-}
-
-ossimApplanixEcefModel::ossimApplanixEcefModel(const ossimApplanixEcefModel& src)
-   :ossimSensorModel(src)
-{
-   initAdjustableParameters();
-   
-   if(src.theLensDistortion.valid())
-   {
-      theLensDistortion = new ossimMeanRadialLensDistortion(*(src.theLensDistortion.get()));
-   }
-   else
-   {
-      theLensDistortion = new ossimMeanRadialLensDistortion();
-   }
-}
-
-ossimObject* ossimApplanixEcefModel::dup()const
-{
-   return new ossimApplanixEcefModel(*this);
-}
-
-void ossimApplanixEcefModel::imagingRay(const ossimDpt& image_point,
-                                    ossimEcefRay&   image_ray) const
-{
-//    if(traceDebug())
-//    {
-//       ossimNotify(ossimNotifyLevel_DEBUG) << "ossimApplanixEcefModel::imagingRay: ..... entered" << std::endl;
-//    }
-    ossimDpt f1 ((image_point) - theRefImgPt);
-   f1.x *= thePixelSize.x;
-   f1.y *= -thePixelSize.y;
-   ossimDpt film (f1 - thePrincipalPoint);
-//    if(traceDebug())
-//    {
-//       ossimNotify(ossimNotifyLevel_DEBUG) << "pixel size   = " << thePixelSize << std::endl;
-//       ossimNotify(ossimNotifyLevel_DEBUG) << "principal pt = " << thePrincipalPoint << std::endl;
-//       ossimNotify(ossimNotifyLevel_DEBUG) << "film pt      = " << film << std::endl;
-//    }
-   if (theLensDistortion.valid())
-   {
-      ossimDpt filmOut;
-      theLensDistortion->undistort(film, filmOut);
-      film = filmOut;
-   }
-   
-   ossimColumnVector3d cam_ray_dir (film.x,
-                                    film.y,
-                                    -theFocalLength);
-   ossimEcefVector     ecf_ray_dir (theCompositeMatrix*cam_ray_dir);
-   ecf_ray_dir = ecf_ray_dir*(1.0/ecf_ray_dir.magnitude());
-  
-   image_ray.setOrigin(theAdjEcefPlatformPosition);
-   image_ray.setDirection(ecf_ray_dir);
-
-//    if(traceDebug())
-//    {
-//       ossimNotify(ossimNotifyLevel_DEBUG) << "ossimApplanixEcefModel::imagingRay: ..... leaving" << std::endl;
-//    }
-}
-
-void ossimApplanixEcefModel::lineSampleToWorld(const ossimDpt& image_point,
-                                               ossimGpt&       gpt) const
-{
-   if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimApplanixEcefModel::lineSampleToWorld:entering..." << std::endl;
-   
-   if(image_point.hasNans())
-   {
-      gpt.makeNan();
-      return;
-   }
-   //***
-   // Extrapolate if image point is outside image:
-   //***
-//   if (!insideImage(image_point))
-//   {
-//      gpt.makeNan();
-//       gpt = extrapolate(image_point);
-//      return;
-//   }
-
-   //***
-   // Determine imaging ray and invoke elevation source object's services to
-   // intersect ray with terrain model:
-   //***
-   ossimEcefRay ray;
-   imagingRay(image_point, ray);
-   ossimElevManager::instance()->intersectRay(ray, gpt);
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "image_point = " << image_point << std::endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ray = " << ray << std::endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "gpt = " << gpt << std::endl;
-   }
-
-   if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::lineSampleToWorld: returning..." << std::endl;
-   return;
-}
-
-void ossimApplanixEcefModel::lineSampleHeightToWorld(const ossimDpt& image_point,
-                                                 const double&   heightEllipsoid,
-                                                 ossimGpt&       worldPoint) const
-{
-   if (!insideImage(image_point))
-   {
-      worldPoint.makeNan();
-//       worldPoint = extrapolate(image_point, heightEllipsoid);
-   }
-   else
-   {
-      //***
-      // First establish imaging ray from image point:
-      //***
-      ossimEcefRay ray;
-      imagingRay(image_point, ray);
-      ossimEcefPoint Pecf (ray.intersectAboveEarthEllipsoid(heightEllipsoid));
-      worldPoint = ossimGpt(Pecf);
-   }
-}
-
-void ossimApplanixEcefModel::worldToLineSample(const ossimGpt& world_point,
-                                           ossimDpt&       image_point) const
-{
-   if((theBoundGndPolygon.getNumberOfVertices() > 0)&&
-      (!theBoundGndPolygon.hasNans()))
-   {
-      if (!(theBoundGndPolygon.pointWithin(world_point)))
-      {
-//         image_point.makeNan();
-//          image_point = extrapolate(world_point);
-//         return;
-      }         
-   }
-   ossimEcefPoint g_ecf(world_point);
-   ossimEcefVector ecfRayDir(g_ecf - theAdjEcefPlatformPosition);
-   ossimColumnVector3d camRayDir (theCompositeMatrixInverse*ecfRayDir.data());
-   
-      
-   double scale = -theFocalLength/camRayDir[2];
-   ossimDpt film (scale*camRayDir[0], scale*camRayDir[1]);
-      
-   if (theLensDistortion.valid())
-   {
-      ossimDpt filmOut;
-      theLensDistortion->distort(film, filmOut);
-      film = filmOut;
-    }
-   
-     ossimDpt f1(film + thePrincipalPoint);
-    ossimDpt p1(f1.x/thePixelSize.x,
-                -f1.y/thePixelSize.y);
-
-    ossimDpt p0 (p1.x + theRefImgPt.x,
-                 p1.y + theRefImgPt.y);
-    
-    image_point = p0;
-}
-
-void ossimApplanixEcefModel::updateModel()
-{
-   ossimGpt gpt;
-   ossimGpt wgs84Pt;
-   double metersPerDegree = wgs84Pt.metersPerDegree().x;
-   double degreePerMeter = 1.0/metersPerDegree;
-   double latShift = -computeParameterOffset(1)*theMeanGSD*degreePerMeter;
-   double lonShift = computeParameterOffset(0)*theMeanGSD*degreePerMeter;
-
-   gpt = theEcefPlatformPosition;
-   double height = gpt.height();
-   gpt.height(height + computeParameterOffset(5));
-   gpt.latd(gpt.latd() + latShift);
-   gpt.lond(gpt.lond() + lonShift);
-   theAdjEcefPlatformPosition = gpt;
-   ossimLsrSpace lsrSpace(theAdjEcefPlatformPosition, theHeading+computeParameterOffset(4));
-
-   // make a left handed roational matrix;
-   ossimMatrix4x4 lsrMatrix(lsrSpace.lsrToEcefRotMatrix());
-   NEWMAT::Matrix orientation = (ossimMatrix4x4::createRotationXMatrix(thePitch+computeParameterOffset(3), OSSIM_LEFT_HANDED)*
-                                 ossimMatrix4x4::createRotationYMatrix(theRoll+computeParameterOffset(2), OSSIM_LEFT_HANDED));
-   theCompositeMatrix        = (lsrMatrix.getData()*orientation);
-   theCompositeMatrixInverse = theCompositeMatrix.i();
-
-   theBoundGndPolygon.resize(4);
-   // ossim_float64 w = theImageClipRect.width()*2.0;
-   // ossim_float64 h = theImageClipRect.height()*2.0;
-   theExtrapolateImageFlag = false;
-   theExtrapolateGroundFlag = false;
-
-   lineSampleToWorld(theImageClipRect.ul(),gpt);//+ossimDpt(-w, -h), gpt);
-   theBoundGndPolygon[0] = gpt;
-   lineSampleToWorld(theImageClipRect.ur(),gpt);//+ossimDpt(w, -h), gpt);
-   theBoundGndPolygon[1] = gpt;
-   lineSampleToWorld(theImageClipRect.lr(),gpt);//+ossimDpt(w, h), gpt);
-   theBoundGndPolygon[2] = gpt;
-   lineSampleToWorld(theImageClipRect.ll(),gpt);//+ossimDpt(-w, h), gpt);
-   theBoundGndPolygon[3] = gpt;
-}
-
-void ossimApplanixEcefModel::initAdjustableParameters()
-{
-   
-   resizeAdjustableParameterArray(6);
-   
-   setAdjustableParameter(0, 0.0);
-   setParameterDescription(0, "x_offset");
-   setParameterUnit(0, "pixels");
-
-   setAdjustableParameter(1, 0.0);
-   setParameterDescription(1, "y_offset");
-   setParameterUnit(1, "pixels");
-
-   setAdjustableParameter(2, 0.0);
-   setParameterDescription(2, "roll");
-   setParameterUnit(2, "degrees");
-
-   setAdjustableParameter(3, 0.0);
-   setParameterDescription(3, "pitch");
-   setParameterUnit(3, "degrees");
-
-   setAdjustableParameter(4, 0.0);
-   setParameterDescription(4, "heading");
-   setParameterUnit(4, "degrees");
-
-   setAdjustableParameter(5, 0.0);
-   setParameterDescription(5, "altitude");
-   setParameterUnit(5, "meters");
-   
-   
-   setParameterSigma(0, 20.0);
-   setParameterSigma(1, 20.0);
-   setParameterSigma(2, .1);
-   setParameterSigma(3, .1);
-   setParameterSigma(4, .1);
-   setParameterSigma(5, 50);
-}
-
-void ossimApplanixEcefModel::setPrincipalPoint(ossimDpt principalPoint)
-{
-   thePrincipalPoint = principalPoint;
-}
-
-void ossimApplanixEcefModel::setRollPitchHeading(double roll,
-                                                 double pitch,
-                                                 double heading)
-{
-   theRoll    = roll;
-   thePitch   = pitch;
-   theHeading = heading;
-   
-   updateModel();
-}
-
-void ossimApplanixEcefModel::setPixelSize(const ossimDpt& pixelSize)
-{
-   thePixelSize = pixelSize;
-}
-
-void ossimApplanixEcefModel::setImageRect(const ossimDrect& rect)
-{
-   theImageClipRect = rect;
-   theRefImgPt = rect.midPoint();
-}
-
-void ossimApplanixEcefModel::setFocalLength(double focalLength)
-{
-   theFocalLength = focalLength;
-}
-
-void ossimApplanixEcefModel::setPlatformPosition(const ossimGpt& gpt)
-{
-   theRefGndPt            = gpt;
-   theEcefPlatformPosition = gpt;
-   updateModel();
-   
-}
-
-bool ossimApplanixEcefModel::saveState(ossimKeywordlist& kwl,
-                                   const char* prefix) const
-{
-   ossimSensorModel::saveState(kwl, prefix);
-   
-   kwl.add(prefix, "type", "ossimApplanixEcefModel", true);
-
-   kwl.add(prefix, "roll", theRoll, true);
-   kwl.add(prefix, "pitch", thePitch, true);
-   kwl.add(prefix, "heading", theHeading, true);
-   kwl.add(prefix, "principal_point", ossimString::toString(thePrincipalPoint.x) + " " + ossimString::toString(thePrincipalPoint.y));
-   kwl.add(prefix, "pixel_size",      ossimString::toString(thePixelSize.x) + " " + ossimString::toString(thePixelSize.y));
-   kwl.add(prefix, "focal_length", theFocalLength);
-   kwl.add(prefix, "ecef_platform_position",
-           ossimString::toString(theEcefPlatformPosition.x()) + " " +
-           ossimString::toString(theEcefPlatformPosition.y()) + " " +
-           ossimString::toString(theEcefPlatformPosition.z()));
-
-   if(theLensDistortion.valid())
-   {
-      ossimString lensPrefix = ossimString(prefix)+"distortion.";
-      theLensDistortion->saveState(kwl,
-                                   lensPrefix.c_str());
-   }
-   
-   return true;
-}
-
-bool ossimApplanixEcefModel::loadState(const ossimKeywordlist& kwl,
-                                       const char* prefix)
-{
-   if(traceDebug())
-   {
-      std::cout << "ossimApplanixEcefModel::loadState: ......... entered" << std::endl;
-   }
-
-   theImageClipRect = ossimDrect(0,0,4076,4091);
-   theRefImgPt      = ossimDpt(2046.0, 2038.5);
-
-   ossimSensorModel::loadState(kwl, prefix);
-   if(getNumberOfAdjustableParameters() < 1)
-   {
-      initAdjustableParameters();
-   }
-   theEcefPlatformPosition    = ossimGpt(0.0,0.0,1000.0);
-   theAdjEcefPlatformPosition = ossimGpt(0.0,0.0,1000.0);
-   theRoll    = 0.0;
-   thePitch   = 0.0;
-   theHeading = 0.0;
-   // bool computeGsdFlag = false;
-   const char* roll              = kwl.find(prefix, "roll");
-   const char* pitch             = kwl.find(prefix, "pitch");
-   const char* heading           = kwl.find(prefix, "heading");
-   const char* principal_point   = kwl.find(prefix, "principal_point");
-   const char* pixel_size        = kwl.find(prefix, "pixel_size");
-   const char* focal_length      = kwl.find(prefix, "focal_length");
-   const char* ecef_platform_position = kwl.find(prefix, "ecef_platform_position");
-   const char* latlonh_platform_position = kwl.find(prefix, "latlonh_platform_position");
-   const char* compute_gsd_flag  = kwl.find(prefix, "compute_gsd_flag");
-   const char* eo_file           = kwl.find(prefix, "eo_file");
-   const char* camera_file       = kwl.find(prefix, "camera_file");
-   const char* eo_id             = kwl.find(prefix, "eo_id");
-   bool result = true;
-   if(eo_id)
-   {
-      theImageID = eo_id;
-   }
-   if(eo_file)
-   {
-      ossimApplanixEOFile eoFile;
-      if(eoFile.parseFile(ossimFilename(eo_file)))
-      {
-         ossimRefPtr<ossimApplanixEORecord> record = eoFile.getRecordGivenId(theImageID);
-         if(record.valid())
-         {
-            ossim_int32 rollIdx    = eoFile.getFieldIdx("ROLL");
-            ossim_int32 pitchIdx   = eoFile.getFieldIdx("PITCH");
-            ossim_int32 headingIdx = eoFile.getFieldIdx("HEADING");
-            ossim_int32 xIdx       = eoFile.getFieldIdx("X");
-            ossim_int32 yIdx       = eoFile.getFieldIdx("Y");
-            ossim_int32 zIdx       = eoFile.getFieldIdx("Z");
-
-            if((rollIdx >= 0)&&
-               (pitchIdx >= 0)&&
-               (headingIdx >= 0)&&
-               (xIdx >= 0)&&
-               (yIdx >= 0)&&
-               (zIdx >= 0))
-            {
-               theRoll    = (*record)[rollIdx].toDouble();
-               thePitch   = (*record)[pitchIdx].toDouble();
-               theHeading = (*record)[headingIdx].toDouble();
-               theEcefPlatformPosition = ossimEcefPoint((*record)[xIdx].toDouble(),
-                                                        (*record)[yIdx].toDouble(),
-                                                        (*record)[zIdx].toDouble());
-               theAdjEcefPlatformPosition = theEcefPlatformPosition;
-            }
-            else
-            {
-               return false;
-            }
-         }
-         else
-         {
-            ossimNotify(ossimNotifyLevel_WARN) << "ossimApplanixEcefModel::loadState()  Image id " << theImageID << " not found in eo file " << eo_file << std::endl;
-            
-            return false;
-         }
-      }
-      else
-      {
-         return false;
-      }
-      // computeGsdFlag = true;
-   }
-   else
-   {
-      if(roll)
-      {
-         theRoll = ossimString(roll).toDouble();
-      }
-      if(pitch)
-      {
-         thePitch = ossimString(pitch).toDouble();
-      }
-      if(heading)
-      {
-         theHeading = ossimString(heading).toDouble();
-      }
-      if(ecef_platform_position)
-      {
-         std::vector<ossimString> splitString;
-         ossimString tempString(ecef_platform_position);
-         tempString.split(splitString, ossimString(" "));
-         if(splitString.size() > 2)
-         {
-            theEcefPlatformPosition  = ossimEcefPoint(splitString[0].toDouble(),
-                                                      splitString[1].toDouble(),
-                                                      splitString[2].toDouble());
-         }
-      }
-      else if(latlonh_platform_position)
-      {
-         std::vector<ossimString> splitString;
-         ossimString tempString(latlonh_platform_position);
-         tempString.split(splitString, ossimString(" "));
-         std::string datumString;
-         double lat=0.0, lon=0.0, h=0.0;
-         if(splitString.size() > 2)
-         {
-            lat = splitString[0].toDouble();
-            lon = splitString[1].toDouble();
-            h = splitString[2].toDouble();
-         }
-         
-         theEcefPlatformPosition = ossimGpt(lat,lon,h);
-      }
-   }
-
-   if(camera_file)
-   {
-      ossimKeywordlist cameraKwl;
-      ossimKeywordlist lensKwl;
-      cameraKwl.add(camera_file);
-      const char* sensor = cameraKwl.find("sensor");
-      const char* image_size      = cameraKwl.find(prefix, "image_size");
-      principal_point = cameraKwl.find("principal_point");
-      focal_length    = cameraKwl.find("focal_length");
-      pixel_size      = cameraKwl.find(prefix, "pixel_size");
-      focal_length    = cameraKwl.find(prefix, "focal_length");
-      const char* distortion_units = cameraKwl.find(prefix, "distortion_units");
-      ossimUnitConversionTool tool;
-      ossimUnitType unitType = OSSIM_MILLIMETERS;
-
-      if(distortion_units)
-      {
-         unitType = (ossimUnitType)ossimUnitTypeLut::instance()->getEntryNumber(distortion_units);
-
-         if(unitType == OSSIM_UNIT_UNKNOWN)
-         {
-            unitType = OSSIM_MILLIMETERS;
-         }
-      }
-      if(image_size)
-      {
-         std::vector<ossimString> splitString;
-         ossimString tempString(image_size);
-         tempString.split(splitString, ossimString(" "));
-         double w=1, h=1;
-         if(splitString.size() == 2)
-         {
-            w = splitString[0].toDouble();
-            h = splitString[1].toDouble();
-         }
-         theImageClipRect = ossimDrect(0,0,w-1,h-1);
-         theRefImgPt      = ossimDpt(w/2.0, h/2.0);
-      }
-      if(sensor)
-      {
-         theSensorID = sensor;
-      }
-      if(principal_point)
-      {
-         std::vector<ossimString> splitString;
-         ossimString tempString(principal_point);
-         tempString.split(splitString, ossimString(" "));
-         if(splitString.size() == 2)
-         {
-            thePrincipalPoint.x = splitString[0].toDouble();
-            thePrincipalPoint.y = splitString[1].toDouble();
-         }
-      }
-      if(pixel_size)
-      {
-         std::vector<ossimString> splitString;
-         ossimString tempString(pixel_size);
-         tempString.split(splitString, ossimString(" "));
-         if(splitString.size() == 1)
-         {
-            thePixelSize.x = splitString[0].toDouble();
-            thePixelSize.y = thePixelSize.x;
-         }
-         else if(splitString.size() == 2)
-         {
-            thePixelSize.x = splitString[0].toDouble();
-            thePixelSize.y = splitString[1].toDouble();
-         }
-      }
-      if(focal_length)
-      {
-         theFocalLength = ossimString(focal_length).toDouble();
-      }
-
-      cameraKwl.trimAllValues();
-      
-      
-      ossimString regExpression =  ossimString("^(") + "d[0-9]+)";
-      vector<ossimString> keys;
-      cameraKwl.getSubstringKeyList( keys, regExpression );
-      long numberOfDistortions = (long)keys.size();
-      int offset = (int)ossimString("d").size();
-      ossim_uint32 idx = 0;
-      std::vector<int> numberList(numberOfDistortions);
-      for(idx = 0; idx < numberList.size();++idx)
-      {
-         ossimString numberStr(keys[idx].begin() + offset,
-                               keys[idx].end());
-         numberList[idx] = numberStr.toInt();
-      }
-      std::sort(numberList.begin(), numberList.end());
-      double distance=0.0, distortion=0.0;
-
-      for(idx = 0; idx < numberList.size(); ++idx)
-      {
-         ossimString value = cameraKwl.find(ossimString("d")+ossimString::toString(numberList[idx]));
-
-         if(!value.empty())
-         {
-            std::istringstream inStr(value.c_str());
-            inStr >> distance;
-            ossim::skipws(inStr);
-            inStr >> distortion;
-#if 0
-            std::vector<ossimString> splitString;
-            ossimString tempString(value);
-            tempString = tempString.trim();
-            tempString.split(splitString, " ");
-            std::cout << splitString.size() << std::endl;
-            if(splitString.size() >= 2)
-            {
-               distance = splitString[0].toDouble();
-               distortion = splitString[1].toDouble();
-            }
-#endif
-            
-            tool.setValue(distortion, unitType);
-            lensKwl.add(ossimString("distance") + ossimString::toString(idx),
-                        distance,
-                        true);
-            lensKwl.add(ossimString("distortion") + ossimString::toString(idx),
-                        tool.getMillimeters(),
-                        true);
-         }
-         lensKwl.add("convergence_threshold",
-                     .00001,
-                     true);
-         if(pixel_size)
-         {
-            lensKwl.add("dxdy",
-                        ossimString(pixel_size) + " " + ossimString(pixel_size),
-                        true);
-         }
-         else
-         {
-            lensKwl.add("dxdy",
-                        ".009 .009",
-                        true);
-         }
-      }
-      if(theLensDistortion.valid())
-      {
-         theLensDistortion->loadState(lensKwl,"");
-      }
-   }
-   else
-   {
-      
-      if(principal_point)
-      {
-         std::vector<ossimString> splitString;
-         ossimString tempString(principal_point);
-         tempString.split(splitString, ossimString(" "));
-         if(splitString.size() == 2)
-         {
-            thePrincipalPoint.x = splitString[0].toDouble();
-            thePrincipalPoint.y = splitString[1].toDouble();
-         }
-      }
-      else
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG) << "No principal_point found" << std::endl;
-            result = false;
-         }
-      }
-      if(pixel_size)
-      {
-         std::vector<ossimString> splitString;
-         ossimString tempString(pixel_size);
-         tempString.split(splitString, ossimString(" "));
-         if(splitString.size() == 1)
-         {
-            thePixelSize.x = splitString[0].toDouble();
-            thePixelSize.y = thePixelSize.x;
-         }
-         else if(splitString.size() == 2)
-         {
-            thePixelSize.x = splitString[0].toDouble();
-            thePixelSize.y = splitString[1].toDouble();
-         }
-      }
-      else
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG) << "No pixel size found" << std::endl;
-            result = false;
-         }
-      }
-      if(focal_length)
-      {
-         theFocalLength = ossimString(focal_length).toDouble();
-      }
-      else
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG) << "No focal length found" << std::endl;
-            result = false;
-         }
-      }
-      
-      if(theLensDistortion.valid())
-      {
-         ossimString lensPrefix = ossimString(prefix)+"distortion.";
-         if(!theLensDistortion->loadState(kwl,
-                                          lensPrefix.c_str()))
-         {
-            result = false;
-         }
-      }
-   }
-   theRefGndPt = theEcefPlatformPosition;
-   theRefGndPt.height(0.0);
-
-   updateModel();
-
-   if(compute_gsd_flag)
-   {
-      if(ossimString(compute_gsd_flag).toBool())
-      {
-         try
-         {
-            //---
-            // This will set theGSD and theMeanGSD. Method throws
-            // ossimException.
-            //---
-            computeGsd();
-         }
-         catch (const ossimException& e)
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimApplanixEcefModel::loadState Caught Exception:\n"
-               << e.what() << std::endl;
-         }
-      }
-   }
-   
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << std::setprecision(15) << std::endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "roll:     " << theRoll << std::endl
-                                          << "pitch:    " << thePitch << std::endl
-                                          << "heading:  " << theHeading << std::endl
-                                          << "platform: " << theEcefPlatformPosition << std::endl
-                                          << "latlon Platform: " << ossimGpt(theEcefPlatformPosition) << std::endl
-                                          << "focal len: " << theFocalLength << std::endl
-                                          << "principal: " << thePrincipalPoint << std::endl
-                                          << "Ground:    " << ossimGpt(theEcefPlatformPosition) << std::endl;
-   }
-   return result;
-}
-
-bool ossimApplanixEcefModel::setupOptimizer(const ossimString& init_file)
-{
-   ossimKeywordlist kwl;
-   kwl.addFile(init_file.c_str());
-
-   return loadState(kwl);
-}
diff --git a/src/ossim/projection/ossimApplanixUtmModel.cpp b/src/ossim/projection/ossimApplanixUtmModel.cpp
deleted file mode 100644
index b60c0d4..0000000
--- a/src/ossim/projection/ossimApplanixUtmModel.cpp
+++ /dev/null
@@ -1,978 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2005 Garrett Potts
-//
-// LGPL
-// 
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimApplanixUtmModel.cpp 21214 2012-07-03 16:20:11Z dburken $
-#include <sstream>
-#include <ossim/projection/ossimApplanixUtmModel.h>
-#include <ossim/base/ossimEllipsoid.h>
-#include <ossim/base/ossimUnitConversionTool.h>
-#include <ossim/base/ossimUnitTypeLut.h>
-#include <ossim/base/ossimDatumFactory.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimLsrSpace.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimGeoidManager.h>
-#include <ossim/projection/ossimUtmProjection.h>
-#include <ossim/support_data/ossimApplanixEOFile.h>
-#include <ossim/base/ossimMatrix4x4.h>
-#include <ossim/elevation/ossimElevManager.h>
-static ossimTrace traceDebug("ossimApplanixUtmModel:debug");
-
-RTTI_DEF1(ossimApplanixUtmModel, "ossimApplanixUtmModel", ossimSensorModel);
-
-#ifdef OSSIM_ID_ENABLED
-static const char OSSIM_ID[] = "$Id: ossimApplanixUtmModel.cpp 21214 2012-07-03 16:20:11Z dburken $";
-#endif
-
-ossimApplanixUtmModel::ossimApplanixUtmModel()
-   :theOmega(0.0),
-    thePhi(0.0),
-    theKappa(0.0),
-    theBoreSightTx(0.0),
-    theBoreSightTy(0.0),
-    theBoreSightTz(0.0)
-{
-   theCompositeMatrix          = ossimMatrix4x4::createIdentity();
-   theCompositeMatrixInverse   = ossimMatrix4x4::createIdentity();
-   theFocalLength              = 55.0;
-   thePixelSize = ossimDpt(.009, .009);
-   theEcefPlatformPosition = ossimGpt(0.0,0.0, 1000.0);
-   theGSD.x = 0.1524;
-   theGSD.y = 0.1524;
-   theMeanGSD = 0.1524;
-   theLensDistortion = new ossimMeanRadialLensDistortion;
-   initAdjustableParameters();
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimApplanixUtmModel::ossimApplanixUtmModel DEBUG:" << endl;
-#ifdef OSSIM_ID_ENABLED
-      ossimNotify(ossimNotifyLevel_DEBUG)<< "OSSIM_ID:  " << OSSIM_ID << endl;
-#endif
-   }
-}
-
-ossimApplanixUtmModel::ossimApplanixUtmModel(const ossimApplanixUtmModel& src)
-   :ossimSensorModel(src),
-    theCompositeMatrix(src.theCompositeMatrix),
-    theCompositeMatrixInverse(src.theCompositeMatrixInverse),
-    theOmega(src.theOmega),
-    thePhi(src.thePhi),
-    theKappa(src.theKappa),
-    theBoreSightTx(src.theBoreSightTx),
-    theBoreSightTy(src.theBoreSightTy),
-    theBoreSightTz(src.theBoreSightTz),
-    thePrincipalPoint(src.thePrincipalPoint),
-    thePixelSize(src.thePixelSize),
-    theFocalLength(src.theFocalLength),
-    theEcefPlatformPosition(src.theEcefPlatformPosition),
-    thePlatformPosition(src.thePlatformPosition),
-    theUtmZone(src.theUtmZone),
-    theUtmHemisphere(src.theUtmHemisphere),
-    theUtmPlatformPosition(src.theUtmPlatformPosition)
-{
-   if(src.theLensDistortion.valid())
-   {
-      theLensDistortion = new ossimMeanRadialLensDistortion(*(src.theLensDistortion.get()));
-   }
-   else
-   {
-      theLensDistortion = new ossimMeanRadialLensDistortion();
-   }
-}
-
-ossimObject* ossimApplanixUtmModel::dup()const
-{
-   return new ossimApplanixUtmModel(*this);
-}
-
-void ossimApplanixUtmModel::imagingRay(const ossimDpt& image_point,
-                                    ossimEcefRay&   image_ray) const
-{
-//    if(traceDebug())
-//    {
-//       ossimNotify(ossimNotifyLevel_DEBUG) << "ossimApplanixUtmModel::imagingRay: ..... entered" << std::endl;
-//    }
-    ossimDpt f1 ((image_point) - theRefImgPt);
-   f1.x *= thePixelSize.x;
-   f1.y *= -thePixelSize.y;
-   ossimDpt film (f1 - thePrincipalPoint);
-//    if(traceDebug())
-//    {
-//       ossimNotify(ossimNotifyLevel_DEBUG) << "pixel size   = " << thePixelSize << std::endl;
-//       ossimNotify(ossimNotifyLevel_DEBUG) << "principal pt = " << thePrincipalPoint << std::endl;
-//       ossimNotify(ossimNotifyLevel_DEBUG) << "film pt      = " << film << std::endl;
-//    }
-   if (theLensDistortion.valid())
-   {
-      ossimDpt filmOut;
-      theLensDistortion->undistort(film, filmOut);
-      film = filmOut;
-   }
-   
-   ossimColumnVector3d cam_ray_dir (film.x,
-                                    film.y,
-                                    -theFocalLength);
-   ossimEcefVector     ecf_ray_dir (theCompositeMatrix*cam_ray_dir);
-   ecf_ray_dir = ecf_ray_dir*(1.0/ecf_ray_dir.magnitude());
-   
-   image_ray.setOrigin(theAdjEcefPlatformPosition);
-   image_ray.setDirection(ecf_ray_dir);
-   
-//    if(traceDebug())
-//    {
-//       ossimNotify(ossimNotifyLevel_DEBUG) << "ossimApplanixUtmModel::imagingRay: ..... leaving" << std::endl;
-//    }
-}
-
-void ossimApplanixUtmModel::lineSampleToWorld(const ossimDpt& image_point,
-                                               ossimGpt&       gpt) const
-{
-   if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimApplanixEcefModel::lineSampleToWorld:entering..." << std::endl;
-   
-   if(image_point.hasNans())
-   {
-      gpt.makeNan();
-      return;
-   }
-   //***
-   // Extrapolate if image point is outside image:
-   //***
-  // if (!insideImage(image_point))
-  // {
-   //   gpt.makeNan();
-//       gpt = extrapolate(image_point);
-   //   return;
-   //}
-
-   //***
-   // Determine imaging ray and invoke elevation source object's services to
-   // intersect ray with terrain model:
-   //***
-   ossimEcefRay ray;
-   imagingRay(image_point, ray);
-   ossimElevManager::instance()->intersectRay(ray, gpt);
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "image_point = " << image_point << std::endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ray = " << ray << std::endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "gpt = " << gpt << std::endl;
-   }
-
-   if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::lineSampleToWorld: returning..." << std::endl;
-   return;
-}
-
-void ossimApplanixUtmModel::lineSampleHeightToWorld(const ossimDpt& image_point,
-                                                 const double&   heightEllipsoid,
-                                                 ossimGpt&       worldPoint) const
-{
-//   if (!insideImage(image_point))
-//   {
-      //worldPoint.makeNan();
-//       worldPoint = extrapolate(image_point, heightEllipsoid);
-//   }
-//   else
-   {
-      //***
-      // First establish imaging ray from image point:
-      //***
-      ossimEcefRay ray;
-      imagingRay(image_point, ray);
-      ossimEcefPoint Pecf (ray.intersectAboveEarthEllipsoid(heightEllipsoid));
-      worldPoint = ossimGpt(Pecf);
-   }
-}
-
-void ossimApplanixUtmModel::worldToLineSample(const ossimGpt& world_point,
-                                           ossimDpt&       image_point) const
-{
-#if 0
-   if((theBoundGndPolygon.getNumberOfVertices() > 0)&&
-      (!theBoundGndPolygon.hasNans()))
-   {
-      if (!(theBoundGndPolygon.pointWithin(world_point)))
-      {
-         image_point.makeNan();
-//          image_point = extrapolate(world_point);
-         return;
-      }         
-   }
-#endif
-   ossimEcefPoint g_ecf(world_point);
-   ossimEcefVector ecfRayDir(g_ecf - theAdjEcefPlatformPosition);
-   ossimColumnVector3d camRayDir (theCompositeMatrixInverse*ecfRayDir.data());
-   
-      
-   double scale = -theFocalLength/camRayDir[2];
-   ossimDpt film (scale*camRayDir[0], scale*camRayDir[1]);
-      
-   if (theLensDistortion.valid())
-   {
-      ossimDpt filmOut;
-      theLensDistortion->distort(film, filmOut);
-      film = filmOut;
-    }
-   
-     ossimDpt f1(film + thePrincipalPoint);
-    ossimDpt p1(f1.x/thePixelSize.x,
-                -f1.y/thePixelSize.y);
-
-    ossimDpt p0 (p1.x + theRefImgPt.x,
-                 p1.y + theRefImgPt.y);
-    
-    image_point = p0;
-}
-
-void ossimApplanixUtmModel::updateModel()
-{
-
-   ossimGpt wgs84Pt;
-   double metersPerDegree = wgs84Pt.metersPerDegree().x;
-   double degreePerMeter = 1.0/metersPerDegree;
-   double latShift = -computeParameterOffset(1)*theMeanGSD*degreePerMeter;
-   double lonShift = computeParameterOffset(0)*theMeanGSD*degreePerMeter;
-
-   ossimGpt gpt = thePlatformPosition;
-//   gpt.height(0.0);
-   double height = gpt.height();
-   gpt.height(height + computeParameterOffset(5));
-   gpt.latd(gpt.latd() + latShift);
-   gpt.lond(gpt.lond() + lonShift);
-   
-   theAdjEcefPlatformPosition = gpt;
-   ossimLsrSpace lsrSpace(theAdjEcefPlatformPosition);
-   // ORIENT TO A UTM AXIS
-   //
-    NEWMAT::ColumnVector v(3);
-   
-    v[0] = 0.0;
-    v[1] = 0.0;
-    v[2] = 1.0;
-    NEWMAT::ColumnVector v2 = lsrSpace.lsrToEcefRotMatrix()*v;
-    ossimEcefVector zVector(v2[0], v2[1], v2[2]);
-    zVector.normalize();
-   
-   // now lets create a UTM axis by creating a derivative at the center
-   // by shift over a few pixels and subtracting
-   //
-   ossimUtmProjection utmProj;
-   
-   utmProj.setZone(theUtmZone);
-   utmProj.setZone(theUtmHemisphere);
-   utmProj.setMetersPerPixel(ossimDpt(1.0,1.0));
-   ossimDpt midPt  = utmProj.forward(theAdjEcefPlatformPosition);
-   ossimDpt rPt    = midPt + ossimDpt(10, 0.0);
-   ossimDpt uPt    = midPt + ossimDpt(0.0, 10.0);
-   ossimGpt wMidPt = utmProj.inverse(midPt);
-   ossimGpt wRPt   = utmProj.inverse(rPt);
-   ossimGpt wUPt   = utmProj.inverse(uPt);
-   
-   ossimEcefPoint ecefMidPt = wMidPt;
-   ossimEcefPoint ecefRPt   = wRPt;
-   ossimEcefPoint ecefUPt   = wUPt;
-   
-   ossimEcefVector east  = ecefRPt-ecefMidPt;
-   ossimEcefVector north = ecefUPt-ecefMidPt;
-   east.normalize();
-   north.normalize();
-   
-   // now use the lsr space constructors to construct an orthogonal set of axes
-   //
-   lsrSpace = ossimLsrSpace(thePlatformPosition,
-                            0,
-                            north,
-                            east.cross(north));
-//   lsrSpace = ossimLsrSpace(thePlatformPosition);
-   // DONE ORIENT TO UTM AXIS
-   
-   NEWMAT::Matrix platformLsrMatrix = lsrSpace.lsrToEcefRotMatrix();
-   NEWMAT::Matrix orientationMatrix = (ossimMatrix3x3::createRotationXMatrix(theOmega+computeParameterOffset(2), OSSIM_LEFT_HANDED)*
-                                       ossimMatrix3x3::createRotationYMatrix(thePhi+computeParameterOffset(3), OSSIM_LEFT_HANDED)*
-                                       ossimMatrix3x3::createRotationZMatrix(theKappa+computeParameterOffset(4), OSSIM_LEFT_HANDED));
-   
-   theCompositeMatrix         = platformLsrMatrix*orientationMatrix;
-   theCompositeMatrixInverse  = theCompositeMatrix.i();
-
-//   theAdjEcefPlatformPosition = theEcefPlatformPosition; 
-
-   theBoundGndPolygon.resize(4);
-   // ossim_float64 w = theImageClipRect.width();//*2.0;
-   // ossim_float64 h = theImageClipRect.height();//*2.0;
-   
-   lineSampleToWorld(theImageClipRect.ul(),gpt);//+ossimDpt(-w, -h), gpt);
-   theBoundGndPolygon[0] = gpt;
-   lineSampleToWorld(theImageClipRect.ur(),gpt);//+ossimDpt(w, -h), gpt);
-   theBoundGndPolygon[1] = gpt;
-   lineSampleToWorld(theImageClipRect.lr(),gpt);//+ossimDpt(w, h), gpt);
-   theBoundGndPolygon[2] = gpt;
-   lineSampleToWorld(theImageClipRect.ll(),gpt);//+ossimDpt(-w, h), gpt);
-   theBoundGndPolygon[3] = gpt;
-}
-
-void ossimApplanixUtmModel::initAdjustableParameters()
-{
-   resizeAdjustableParameterArray(6);
-   
-   setAdjustableParameter(0, 0.0);
-   setParameterDescription(0, "x_offset");
-   setParameterUnit(0, "pixels");
-
-   setAdjustableParameter(1, 0.0);
-   setParameterDescription(1, "y_offset");
-   setParameterUnit(1, "pixels");
-
-   setAdjustableParameter(2, 0.0);
-   setParameterDescription(2, "orientation x");
-   setParameterUnit(2, "degrees");
-
-   setAdjustableParameter(3, 0.0);
-   setParameterDescription(3, "orientation y");
-   setParameterUnit(3, "degrees");
-
-   setAdjustableParameter(4, 0.0);
-   setParameterDescription(4, "orientation z");
-   setParameterUnit(4, "degrees");
-
-   setAdjustableParameter(5, 0.0);
-   setParameterDescription(5, "Altitude delta");
-   setParameterUnit(5, "meters");
-
-   
-   
-   setParameterSigma(0, 20.0);
-   setParameterSigma(1, 20.0);
-   setParameterSigma(2, .1);
-   setParameterSigma(3, .1);
-   setParameterSigma(4, .1);
-   setParameterSigma(5, 50);
-}
-
-void ossimApplanixUtmModel::setPrincipalPoint(ossimDpt principalPoint)
-{
-   thePrincipalPoint = principalPoint;
-}
-
-void ossimApplanixUtmModel::setPixelSize(const ossimDpt& pixelSize)
-{
-   thePixelSize = pixelSize;
-}
-
-void ossimApplanixUtmModel::setImageRect(const ossimDrect& rect)
-{
-   theImageClipRect = rect;
-   theRefImgPt = rect.midPoint();
-}
-
-void ossimApplanixUtmModel::setFocalLength(double focalLength)
-{
-   theFocalLength = focalLength;
-}
-
-void ossimApplanixUtmModel::setPlatformPosition(const ossimGpt& gpt)
-{
-   theRefGndPt             = gpt;
-   theEcefPlatformPosition = gpt;
-   updateModel();
-   
-}
-
-bool ossimApplanixUtmModel::saveState(ossimKeywordlist& kwl,
-                                   const char* prefix) const
-{
-   ossimSensorModel::saveState(kwl, prefix);
-   
-   kwl.add(prefix, "type", "ossimApplanixUtmModel", true);
-
-   kwl.add(prefix, "omega", theOmega, true);
-   kwl.add(prefix, "phi", thePhi, true);
-   kwl.add(prefix, "kappa", theKappa, true);
-   kwl.add(prefix, "bore_sight_tx", theBoreSightTx*60, true);
-   kwl.add(prefix, "bore_sight_ty", theBoreSightTy*60, true);
-   kwl.add(prefix, "bore_sight_tz", theBoreSightTz*60, true);
-   kwl.add(prefix, "principal_point", ossimString::toString(thePrincipalPoint.x) + " " + ossimString::toString(thePrincipalPoint.y));
-   kwl.add(prefix, "pixel_size",      ossimString::toString(thePixelSize.x) + " " + ossimString::toString(thePixelSize.y));
-   kwl.add(prefix, "focal_length", theFocalLength);
-   kwl.add(prefix, "ecef_platform_position",
-           ossimString::toString(theEcefPlatformPosition.x()) + " " +
-           ossimString::toString(theEcefPlatformPosition.y()) + " " +
-           ossimString::toString(theEcefPlatformPosition.z()));
-   kwl.add(prefix, "latlonh_platform_position",
-           ossimString::toString(thePlatformPosition.latd()) + " " +
-           ossimString::toString(thePlatformPosition.lond()) + " " +
-           ossimString::toString(thePlatformPosition.height()) + " " +
-           thePlatformPosition.datum()->code());
-   kwl.add(prefix,
-           "utm_platform_position",
-           ossimString::toString(theUtmPlatformPosition.x) + " " +
-           ossimString::toString(theUtmPlatformPosition.y) + " " +
-           ossimString::toString(theUtmPlatformPosition.z) + " " +
-           thePlatformPosition.datum()->code(),
-           true);
-   kwl.add(prefix,
-           "utm_zone",
-           theUtmZone,
-           true);
-   kwl.add(prefix,
-           "utm_hemisphere",
-           theUtmHemisphere,
-           true);
-   kwl.add(prefix,
-           "shift_values",
-           ossimString::toString(theShiftValues.x()) + " " + 
-           ossimString::toString(theShiftValues.y()) + " " +
-           ossimString::toString(theShiftValues.z()),
-           true);
-   if(theLensDistortion.valid())
-   {
-      ossimString lensPrefix = ossimString(prefix)+"distortion.";
-      theLensDistortion->saveState(kwl,
-                                   lensPrefix.c_str());
-   }
-   
-   return true;
-}
-
-bool ossimApplanixUtmModel::loadState(const ossimKeywordlist& kwl,
-                                   const char* prefix)
-{
-   if(traceDebug())
-   {
-      std::cout << "ossimApplanixUtmModel::loadState: ......... entered" << std::endl;
-   }
-   theImageClipRect = ossimDrect(0,0,4076,4091);
-   theRefImgPt      = ossimDpt(2046.0, 2038.5);
-   
-   ossimSensorModel::loadState(kwl, prefix);
-
-   if(getNumberOfAdjustableParameters() < 1)
-   {
-      initAdjustableParameters();
-   }
-
-   const char* eo_file           = kwl.find(prefix, "eo_file");
-   const char* eo_id             = kwl.find(prefix, "eo_id");
-   const char* omega             = kwl.find(prefix, "omega");
-   const char* phi               = kwl.find(prefix, "phi");
-   const char* kappa             = kwl.find(prefix, "kappa");
-   const char* bore_sight_tx     = kwl.find(prefix, "bore_sight_tx");
-   const char* bore_sight_ty     = kwl.find(prefix, "bore_sight_ty");
-   const char* bore_sight_tz     = kwl.find(prefix, "bore_sight_tz");
-   
-   const char* principal_point   = kwl.find(prefix, "principal_point");
-   const char* pixel_size        = kwl.find(prefix, "pixel_size");
-   const char* focal_length      = kwl.find(prefix, "focal_length");
-   const char* latlonh_platform_position = kwl.find(prefix, "latlonh_platform_position");
-   const char* utm_platform_position = kwl.find(prefix, "utm_platform_position");
-   const char* compute_gsd_flag  = kwl.find(prefix, "compute_gsd_flag");
-   const char* utm_zone          = kwl.find(prefix, "utm_zone");
-   const char* utm_hemisphere    = kwl.find(prefix, "utm_hemisphere");
-   const char* camera_file       = kwl.find(prefix, "camera_file");
-   const char* shift_values      = kwl.find(prefix, "shift_values");
-   
-   theCompositeMatrix          = ossimMatrix3x3::createIdentity();
-   theCompositeMatrixInverse   = ossimMatrix3x3::createIdentity();
-   theOmega                    = 0.0;
-   thePhi                      = 0.0;
-   theKappa                    = 0.0;
-   theBoreSightTx              = 0.0;
-   theBoreSightTy              = 0.0;
-   theBoreSightTz              = 0.0;
-   theFocalLength              = 55.0;
-   thePixelSize = ossimDpt(.009, .009);
-   theEcefPlatformPosition = ossimGpt(0.0,0.0, 1000.0);
-
-   bool loadedFromEoFile = false;
-
-   if(eo_id)
-   {
-      theImageID = eo_id;
-   }
-   // loading from standard eo file with given record id
-   //
-   if(eo_file)
-   {
-      ossimApplanixEOFile eoFile;
-      
-      if(eoFile.parseFile(ossimFilename(eo_file)))
-      {
-         ossimRefPtr<ossimApplanixEORecord> record = eoFile.getRecordGivenId(theImageID);
-
-         if(record.valid())
-         {
-            loadedFromEoFile = true;
-            theBoreSightTx = eoFile.getBoreSightTx()/60.0;
-            theBoreSightTy = eoFile.getBoreSightTy()/60.0;
-            theBoreSightTz = eoFile.getBoreSightTz()/60.0;
-            theShiftValues = ossimEcefVector(eoFile.getShiftValuesX(),
-                                             eoFile.getShiftValuesY(),
-                                             eoFile.getShiftValuesZ());
-            ossim_int32 easting  = eoFile.getFieldIdxLike("EASTING");
-            ossim_int32 northing = eoFile.getFieldIdxLike("NORTHING");
-            ossim_int32 height   = eoFile.getFieldIdxLike("HEIGHT");
-            ossim_int32 omega    = eoFile.getFieldIdxLike("OMEGA");
-            ossim_int32 phi      = eoFile.getFieldIdxLike("PHI");
-            ossim_int32 kappa    = eoFile.getFieldIdxLike("KAPPA");
-
-            if((omega>=0)&&
-               (phi>=0)&&
-               (kappa>=0)&&
-               (height>=0)&&
-               (easting>=0)&&
-               (northing>=0))
-            {
-               theOmega = (*record)[omega].toDouble();
-               thePhi   = (*record)[phi].toDouble();
-               theKappa = (*record)[kappa].toDouble();
-               double h = (*record)[height].toDouble();
-               ossimString heightType = kwl.find(prefix, "height_type");
-               if(eoFile.isUtmFrame())
-               {
-                  theUtmZone = eoFile.getUtmZone();
-                  theUtmHemisphere = eoFile.getUtmHemisphere()=="North"?'N':'S';
-                  ossimUtmProjection utmProj;
-                  utmProj.setZone(theUtmZone);
-                  utmProj.setHemisphere((char)theUtmHemisphere);
-                  theUtmPlatformPosition.x = (*record)[easting].toDouble();
-                  theUtmPlatformPosition.y = (*record)[northing].toDouble();
-                  theUtmPlatformPosition.z = h;
-                  thePlatformPosition = utmProj.inverse(ossimDpt(theUtmPlatformPosition.x,
-                                                                 theUtmPlatformPosition.y));
-                  thePlatformPosition.height(h);
-
-                  if(eoFile.isHeightAboveMSL())
-                  {
-                     double offset = ossimGeoidManager::instance()->offsetFromEllipsoid(thePlatformPosition);
-                     if(!ossim::isnan(offset))
-                     {
-                        thePlatformPosition.height(h + offset);
-                        theUtmPlatformPosition.z = h + offset;
-                     }
-                  }
-               }
-               else
-               {
-                  return false;
-               }
-            }
-            theEcefPlatformPosition = thePlatformPosition;
-         }
-         else
-         {
-            return false;
-         }
-      }
-   }
-   if(!loadedFromEoFile)
-   {
-      if(shift_values)
-      {
-         std::vector<ossimString> splitString;
-         ossimString tempString(shift_values);
-         tempString = tempString.trim();
-         tempString.split(splitString, " " );
-         if(splitString.size() == 3)
-         {
-            theShiftValues = ossimEcefVector(splitString[0].toDouble(),
-                                             splitString[1].toDouble(),
-                                             splitString[2].toDouble());
-         }
-      }
-      if(omega&&phi&&kappa)
-      {
-         theOmega = ossimString(omega).toDouble();
-         thePhi   = ossimString(phi).toDouble();
-         theKappa = ossimString(kappa).toDouble();
-      }
-      if(bore_sight_tx&&bore_sight_ty&&bore_sight_tz)
-      {
-         theBoreSightTx = ossimString(bore_sight_tx).toDouble()/60.0;
-         theBoreSightTy = ossimString(bore_sight_ty).toDouble()/60.0;
-         theBoreSightTz = ossimString(bore_sight_tz).toDouble()/60.0;
-      }
-      double lat=0.0, lon=0.0, h=0.0;
-      if(utm_zone)
-      {
-         theUtmZone = ossimString(utm_zone).toInt32();
-      }
-      if(utm_hemisphere)
-      {
-         ossimString hem = utm_hemisphere;
-         hem = hem.trim();
-         hem = hem.upcase();
-         theUtmHemisphere = *(hem.begin());
-      }
-      if(utm_platform_position)
-      {
-         ossimUtmProjection utmProj;
-         std::vector<ossimString> splitString;
-         ossimString tempString(utm_platform_position);
-         tempString = tempString.trim();
-         ossimString datumString;
-         utmProj.setZone(theUtmZone);
-         utmProj.setHemisphere((char)theUtmHemisphere);
-         tempString.split(splitString, " ");
-         if(splitString.size() > 2)
-         {
-            theUtmPlatformPosition.x = splitString[0].toDouble();
-            theUtmPlatformPosition.y = splitString[1].toDouble();
-            theUtmPlatformPosition.z = splitString[2].toDouble();
-         }
-         if(splitString.size() > 3)
-         {
-            datumString = splitString[3];
-         }
-         const ossimDatum* datum = ossimDatumFactory::instance()->create(datumString);
-         if(datum)
-         {
-            utmProj.setDatum(datum);
-         }
-         
-         thePlatformPosition = utmProj.inverse(ossimDpt(theUtmPlatformPosition.x,
-                                                        theUtmPlatformPosition.y));
-         thePlatformPosition.height(theUtmPlatformPosition.z);
-         
-         ossimString heightType = kwl.find(prefix, "height_type");
-         if(heightType == "msl")
-         {
-            double offset = ossimGeoidManager::instance()->offsetFromEllipsoid(thePlatformPosition);
-            if(ossim::isnan(offset) == false)
-            {
-               thePlatformPosition.height(thePlatformPosition.height() + offset);
-               theUtmPlatformPosition.z = thePlatformPosition.height();
-            }
-         }
-         theEcefPlatformPosition = thePlatformPosition;
-      }
-      else if(latlonh_platform_position)
-      {
-         std::vector<ossimString> splitString;
-         ossimString tempString(latlonh_platform_position);
-         std::string datumString;
-         tempString = tempString.trim();
-         tempString.split(splitString, " ");
-         if(splitString.size() > 2)
-         {
-            lat = splitString[0].toDouble();
-            lon = splitString[1].toDouble();
-            h = splitString[2].toDouble();
-         }
-         if(splitString.size() > 3)
-         {
-            datumString = splitString[3].string();
-         }
-         thePlatformPosition.latd(lat);
-         thePlatformPosition.lond(lon);
-         thePlatformPosition.height(h);
-         const ossimDatum* datum = ossimDatumFactory::instance()->create(datumString);
-         if(datum)
-         {
-            thePlatformPosition.datum(datum);
-         }
-         ossimString heightType = kwl.find(prefix, "height_type");
-         if(heightType == "msl")
-         {
-            double offset = ossimGeoidManager::instance()->offsetFromEllipsoid(thePlatformPosition);
-            if(ossim::isnan(offset) == false)
-            {
-               thePlatformPosition.height(thePlatformPosition.height() + offset);
-            }
-         }
-         theEcefPlatformPosition = thePlatformPosition;
-      }
-   }
-   if(principal_point)
-   {
-      std::vector<ossimString> splitString;
-      ossimString tempString(principal_point);
-      tempString = tempString.trim();
-      tempString.split(splitString, " ");
-      if(splitString.size() == 2)
-      {
-         thePrincipalPoint.x = splitString[0].toDouble();
-         thePrincipalPoint.y = splitString[1].toDouble();
-      }
-   }
-   if(pixel_size)
-   {
-      std::vector<ossimString> splitString;
-      ossimString tempString(principal_point);
-      tempString = tempString.trim();
-      tempString.split(splitString, " ");
-      if(splitString.size() == 2)
-      {
-         thePixelSize.x = splitString[0].toDouble();
-         thePixelSize.y = splitString[1].toDouble();
-      }
-   }
-   if(focal_length)
-   {
-      theFocalLength = ossimString(focal_length).toDouble();
-   }
-
-   if(camera_file)
-   {
-      ossimKeywordlist cameraKwl;
-      ossimKeywordlist lensKwl;
-      cameraKwl.add(camera_file);
-      const char* sensor = cameraKwl.find("sensor");
-      const char* image_size      = cameraKwl.find(prefix, "image_size");
-      principal_point = cameraKwl.find("principal_point");
-      focal_length    = cameraKwl.find("focal_length");
-      pixel_size      = cameraKwl.find(prefix, "pixel_size");
-      focal_length    = cameraKwl.find(prefix, "focal_length");
-      const char* distortion_units = cameraKwl.find(prefix, "distortion_units");
-      ossimUnitConversionTool tool;
-      ossimUnitType unitType = OSSIM_MILLIMETERS;
-
-      if(distortion_units)
-      {
-         unitType = (ossimUnitType)ossimUnitTypeLut::instance()->getEntryNumber(distortion_units);
-
-         if(unitType == OSSIM_UNIT_UNKNOWN)
-         {
-            unitType = OSSIM_MILLIMETERS;
-         }
-      }
-      if(image_size)
-      {
-         std::vector<ossimString> splitString;
-         ossimString tempString(image_size);
-         tempString = tempString.trim();
-         tempString.split(splitString, " ");
-         double w=1, h=1;
-         if(splitString.size() == 2)
-         {
-            w = splitString[0].toDouble();
-            h = splitString[1].toDouble();
-         }
-         theImageClipRect = ossimDrect(0,0,w-1,h-1);
-         theRefImgPt      = ossimDpt(w/2.0, h/2.0);
-      }
-      if(sensor)
-      {
-         theSensorID = sensor;
-      }
-      if(principal_point)
-      {
-         std::vector<ossimString> splitString;
-         ossimString tempString(principal_point);
-         tempString = tempString.trim();
-         tempString.split(splitString, " ");
-         if(splitString.size() == 2)
-         {
-            thePrincipalPoint.x = splitString[0].toDouble();
-            thePrincipalPoint.y = splitString[1].toDouble();
-         }
-      }
-      if(pixel_size)
-      {
-         std::vector<ossimString> splitString;
-         ossimString tempString(pixel_size);
-         tempString = tempString.trim();
-         tempString.split(splitString, " ");
-         if(splitString.size() == 1)
-         {
-            thePixelSize.x = splitString[0].toDouble();
-            thePixelSize.y = thePixelSize.x;
-         }
-         else if(splitString.size() == 2)
-         {
-            thePixelSize.x = splitString[0].toDouble();
-            thePixelSize.y = splitString[1].toDouble();
-         }
-      }
-      if(focal_length)
-      {
-         theFocalLength = ossimString(focal_length).toDouble();
-      }
-
-      cameraKwl.trimAllValues();
-      
-      
-      ossimString regExpression =  ossimString("^(") + "d[0-9]+)";
-      vector<ossimString> keys;
-      cameraKwl.getSubstringKeyList( keys, regExpression );
-      long numberOfDistortions = (long)keys.size();
-      int offset = (int)ossimString("d").size();
-      ossim_uint32 idx = 0;
-      std::vector<int> numberList(numberOfDistortions);
-      for(idx = 0; idx < numberList.size();++idx)
-      {
-         ossimString numberStr(keys[idx].begin() + offset,
-                               keys[idx].end());
-         numberList[idx] = numberStr.toInt();
-      }
-      std::sort(numberList.begin(), numberList.end());
-      double distance=0.0, distortion=0.0;
-     
-      for(idx = 0; idx < numberList.size(); ++idx)
-      {
-         ossimString value = cameraKwl.find(ossimString("d")+ossimString::toString(numberList[idx]));
-         if(!value.empty())
-         {
-            std::istringstream inStr(value.c_str());
-            inStr >> distance;
-            ossim::skipws(inStr);
-            inStr >> distortion;
-#if 0
-            std::vector<ossimString> splitString;
-            ossimString tempString(value);
-            tempString = tempString.trim();
-            tempString.split(splitString, " ");
-            std::cout << splitString.size() << std::endl;
-            if(splitString.size() >= 2)
-            {
-               distance = splitString[0].toDouble();
-               distortion = splitString[1].toDouble();
-            }
-#endif
-            
-            tool.setValue(distortion, unitType);
-            lensKwl.add(ossimString("distance") + ossimString::toString(idx),
-                        distance,
-                        true);
-            lensKwl.add(ossimString("distortion") + ossimString::toString(idx),
-                        tool.getMillimeters(),
-                        true);
-         }
-         lensKwl.add("convergence_threshold",
-                     .00001,
-                     true);
-         if(pixel_size)
-         {
-            lensKwl.add("dxdy",
-                        ossimString::toString(thePixelSize.x) + " " +ossimString::toString(thePixelSize.y),
-                        true);
-         }
-         else
-         {
-            lensKwl.add("dxdy",
-                        ".009 .009",
-                        true);
-         }
-      }
-      if(theLensDistortion.valid())
-      {
-         theLensDistortion->loadState(lensKwl,"");
-      }
-   }
-   else
-   {
-      
-      if(principal_point)
-      {
-         std::vector<ossimString> splitString;
-         ossimString tempString(principal_point);
-         tempString = tempString.trim();
-         tempString.split(splitString, " ");
-         if(splitString.size() >= 2)
-         {
-            thePrincipalPoint.x = splitString[0].toDouble();
-            thePrincipalPoint.y = splitString[1].toDouble();
-         }
-      }
-      else
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG) << "No principal_point found" << std::endl;
-            return false;
-         }
-      }
-      if(pixel_size)
-      {
-         std::vector<ossimString> splitString;
-         ossimString tempString(pixel_size);
-         tempString = tempString.trim();
-         tempString.split(splitString, " ");
-         if(splitString.size() == 1)
-         {
-            thePixelSize.x = splitString[0].toDouble();
-            thePixelSize.y = thePixelSize.x;
-         }
-         else if(splitString.size() == 2)
-         {
-            thePixelSize.x = splitString[0].toDouble();
-            thePixelSize.y = splitString[1].toDouble();
-         }
-      }
-      else
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG) << "No pixel size found" << std::endl;
-            return false;
-         }
-      }
-      if(focal_length)
-      {
-         theFocalLength = ossimString(focal_length).toDouble();
-      }
-      else
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG) << "No focal length found" << std::endl;
-            return false;
-         }
-      }
-      
-      if(theLensDistortion.valid())
-      {
-         ossimString lensPrefix = ossimString(prefix)+"distortion.";
-         theLensDistortion->loadState(kwl,
-                                      lensPrefix.c_str());
-      }
-   }
-   theRefGndPt = thePlatformPosition;
-   
-   updateModel();
-
-   lineSampleToWorld(theRefImgPt, theRefGndPt);
-   if(compute_gsd_flag)
-   {
-      if(ossimString(compute_gsd_flag).toBool())
-      {
-         ossimGpt right;
-         ossimGpt top;
-         lineSampleToWorld(theRefImgPt + ossimDpt(1.0, 0.0),
-                           right);
-         lineSampleToWorld(theRefImgPt + ossimDpt(1.0, 0.0),
-                           top);
-
-         ossimEcefVector horizontal = ossimEcefPoint(theRefGndPt)-ossimEcefPoint(right);
-         ossimEcefVector vertical   = ossimEcefPoint(theRefGndPt)-ossimEcefPoint(top);
-
-         theGSD.x = horizontal.length();
-         theGSD.y = vertical.length();
-         theMeanGSD = (theGSD.x+theGSD.y)*.5;
-      }
-   }
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "theOmega:              " << theOmega << std::endl
-                                          << "thePhi:                " << thePhi   << std::endl
-                                          << "theKappa:              " << theKappa << std::endl;
-      std::cout << "platform position:     " << thePlatformPosition << std::endl;
-      std::cout << "platform position ECF: " << theEcefPlatformPosition << std::endl;
-      std::cout << "ossimApplanixModel::loadState: ......... leaving" << std::endl;
-   }
-
-   return true;
-}
-
-bool ossimApplanixUtmModel::setupOptimizer(const ossimString& init_file)
-{
-   ossimKeywordlist kwl;
-   kwl.addFile(init_file.c_str());
-
-   return loadState(kwl);
-}
diff --git a/src/ossim/projection/ossimBuckeyeSensor.cpp b/src/ossim/projection/ossimBuckeyeSensor.cpp
deleted file mode 100644
index 3d1896f..0000000
--- a/src/ossim/projection/ossimBuckeyeSensor.cpp
+++ /dev/null
@@ -1,623 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Andrew Johnson
-//
-//*******************************************************************
-//  $Id: ossimBuckeyeSensor.cpp  $
-#include <sstream>
-#include <ossim/projection/ossimBuckeyeSensor.h>
-#include <ossim/base/ossimEllipsoid.h>
-#include <ossim/base/ossimUnitConversionTool.h>
-#include <ossim/base/ossimUnitTypeLut.h>
-#include <ossim/base/ossimDatumFactory.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimLsrSpace.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimGeoidManager.h>
-#include <ossim/projection/ossimUtmProjection.h>
-#include <ossim/base/ossimMatrix4x4.h>
-#include <ossim/elevation/ossimElevManager.h>
-#include <ossim/base/ossimCsvFile.h>
-static ossimTrace traceDebug("ossimBuckeyeSensor:debug");
-
-RTTI_DEF1(ossimBuckeyeSensor, "ossimBuckeyeSensor", ossimSensorModel);
-
-ossimBuckeyeSensor::ossimBuckeyeSensor()
-{
-	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::ossimBuckeyeSensor(): entering..." << std::endl;
-
-	theCompositeMatrix			= ossimMatrix4x4::createIdentity();
-	theCompositeMatrixInverse	= ossimMatrix4x4::createIdentity();
-	theRoll						= 0.0;
-	thePitch					= 0.0;
-	theHeading					= 0.0;
-	theFocalLength				= 195.1000;
-	thePixelSize				= ossimDpt(.006, .006);
-	thePrincipalPoint			= ossimDpt(0, 0);
-	theEcefPlatformPosition		= ossimGpt(0.0,0.0, 1000.0);
-	theAdjEcefPlatformPosition	= ossimGpt(0.0,0.0, 1000.0);
-	theLensDistortion			= new ossimSmacCallibrationSystem();
-
-	theGSD.makeNan();
-	initAdjustableParameters();
-
-	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::ossimBuckeyeSensor(): returning..." << std::endl;
-}
-ossimBuckeyeSensor::ossimBuckeyeSensor(const ossimDrect& imageRect,
-	const ossimGpt& platformPosition,
-	double roll,
-	double pitch,
-	double heading,
-	const ossimDpt& /* principalPoint */, // in millimeters
-	double focalLength, // in millimeters
-	const ossimDpt& pixelSize) // in millimeters
-{
-	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::ossimBuckeyeSensor(imageRect,platformPosition,roll,pitch,heading,ossimDpt,focalLength,pixelSize): entering..." << std::endl;
-
-	theImageClipRect			= imageRect;
-	theRefImgPt					= theImageClipRect.midPoint();
-	theCompositeMatrix          = ossimMatrix4x4::createIdentity();
-	theCompositeMatrixInverse   = ossimMatrix4x4::createIdentity();
-	theRoll                     = roll;
-	thePitch                    = pitch;
-	theHeading                  = heading;
-	theFocalLength              = focalLength;
-	thePixelSize                = pixelSize;
-	theEcefPlatformPosition     = platformPosition;
-	theAdjEcefPlatformPosition  = platformPosition;
-	theLensDistortion           = new ossimSmacCallibrationSystem();
-	theGSD.makeNan();
-
-	initAdjustableParameters();
-	updateModel();
-	
-	try
-	{
-		// Method throws ossimException.
-		computeGsd();
-	}
-	catch (const ossimException& e)
-	{
-		ossimNotify(ossimNotifyLevel_WARN)
-			<< "ossimBuckeyeSensor Constructor caught Exception:\n"
-			<< e.what() << std::endl;
-	}
-
-	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::ossimBuckeyeSensor(imageRect,platformPosition,roll,pitch,heading,ossimDpt,focalLength,pixelSize): returning..." << std::endl;
-}
-
-ossimBuckeyeSensor::ossimBuckeyeSensor(const ossimBuckeyeSensor& src)
-	:ossimSensorModel(src)
-{
-	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::ossimBuckeyeSensor(src): entering..." << std::endl;
-
-	initAdjustableParameters();
-
-	if(src.theLensDistortion.valid())
-	{
-		theLensDistortion = new ossimSmacCallibrationSystem(*(src.theLensDistortion.get()));
-	}
-	else
-	{
-		theLensDistortion = new ossimSmacCallibrationSystem();
-	}
-	theGSD.makeNan();
-
-	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::ossimBuckeyeSensor(src): returning..." << std::endl;
-}
-
-ossimObject* ossimBuckeyeSensor::dup()const
-{
-	return new ossimBuckeyeSensor(*this);
-}
-
-void ossimBuckeyeSensor::imagingRay(const ossimDpt& image_point,
-	ossimEcefRay&   image_ray) const
-{
-	if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG) << "ossimBuckeyeSensor::imagingRay: ..... entered" << std::endl;
-
-	ossimDpt f1 ((image_point) - theRefImgPt);
-	f1.x *= thePixelSize.x;
-	f1.y *= -thePixelSize.y;
-	ossimDpt film (f1 - thePrincipalPoint);
-
-	if(traceDebug())
-	{
-		ossimNotify(ossimNotifyLevel_DEBUG) << "pixel size   = " << thePixelSize << std::endl;
-		ossimNotify(ossimNotifyLevel_DEBUG) << "principal pt = " << thePrincipalPoint << std::endl;
-		ossimNotify(ossimNotifyLevel_DEBUG) << "film pt      = " << film << std::endl;
-	}
-
-	if (theLensDistortion.valid())
-	{
-		ossimDpt filmOut;
-		theLensDistortion->undistort(film, filmOut);
-		film = filmOut;
-	}
-
-	ossimColumnVector3d cam_ray_dir (film.x,
-		film.y,
-		-theFocalLength);
-	ossimEcefVector     ecf_ray_dir (theCompositeMatrix*cam_ray_dir);
-	ecf_ray_dir = ecf_ray_dir*(1.0/ecf_ray_dir.magnitude());
-
-	image_ray.setOrigin(theAdjEcefPlatformPosition);
-	image_ray.setDirection(ecf_ray_dir);
-
-	if(traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG) << "ossimBuckeyeSensor::imagingRay: ..... leaving" << std::endl;
-}
-
-void ossimBuckeyeSensor::lineSampleToWorld(const ossimDpt& image_point,
-	ossimGpt&       gpt) const
-{
-	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::lineSampleToWorld:entering..." << std::endl;
-
-	if(image_point.hasNans())
-	{
-		gpt.makeNan();
-		return;
-	}
-
-	//***
-	// Determine imaging ray and invoke elevation source object's services to
-	// intersect ray with terrain model:
-	//***
-
-	ossimEcefRay ray;
-	imagingRay(image_point, ray);
-	ossimElevManager::instance()->intersectRay(ray, gpt);
-
-	if (traceDebug())
-	{
-		ossimNotify(ossimNotifyLevel_DEBUG) << "image_point = " << image_point << std::endl;
-		ossimNotify(ossimNotifyLevel_DEBUG) << "ray = " << ray << std::endl;
-		ossimNotify(ossimNotifyLevel_DEBUG) << "gpt = " << gpt << std::endl;
-	}
-
-	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::lineSampleToWorld: returning..." << std::endl;
-	return;
-}
-
-void ossimBuckeyeSensor::lineSampleHeightToWorld(const ossimDpt& image_point,
-	const double&   heightEllipsoid,
-	ossimGpt&       worldPoint) const
-{
-	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::lineSampleHeightToWorld: entering..." << std::endl;
-	if (!insideImage(image_point))
-	{
-		worldPoint.makeNan();
-	}
-	else
-	{
-		//***
-		// First establish imaging ray from image point:
-		//***
-		ossimEcefRay ray;
-		imagingRay(image_point, ray);
-		ossimEcefPoint Pecf (ray.intersectAboveEarthEllipsoid(heightEllipsoid));
-		worldPoint = ossimGpt(Pecf);
-	}
-	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::lineSampleHeightToWorld: returning..." << std::endl;
-}
-
-void ossimBuckeyeSensor::worldToLineSample(const ossimGpt& world_point,
-	ossimDpt&       image_point) const
-{
-	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::worldToLineSample: entering..." << std::endl;
-	if((theBoundGndPolygon.getNumberOfVertices() > 0)&&
-		(!theBoundGndPolygon.hasNans()))
-	{
-		if (!(theBoundGndPolygon.pointWithin(world_point)))
-		{
-			image_point.makeNan();
-			return;
-		}         
-	}
-	ossimEcefPoint g_ecf(world_point);
-	ossimEcefVector ecfRayDir(g_ecf - theAdjEcefPlatformPosition);
-	ossimColumnVector3d camRayDir (theCompositeMatrixInverse*ecfRayDir.data());
-
-
-	double scale = -theFocalLength/camRayDir[2];
-	ossimDpt film (scale*camRayDir[0], scale*camRayDir[1]);
-
-	if (theLensDistortion.valid())
-	{
-		ossimDpt filmOut;
-		theLensDistortion->distort(film, filmOut);
-		film = filmOut;
-	}
-
-	ossimDpt f1(film + thePrincipalPoint);
-	ossimDpt p1(f1.x/thePixelSize.x,
-		-f1.y/thePixelSize.y);
-
-	ossimDpt p0 (p1.x + theRefImgPt.x,
-		p1.y + theRefImgPt.y);
-
-	image_point = p0;
-	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::worldToLineSample: returning..." << std::endl;
-}
-
-void ossimBuckeyeSensor::updateModel()
-{
-	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::updateModel: entering..." << std::endl;
-	ossimGpt gpt;
-	ossimGpt wgs84Pt;
-	double metersPerDegree = wgs84Pt.metersPerDegree().x;
-	double degreePerMeter = 1.0/metersPerDegree;
-	double latShift = -computeParameterOffset(1)*degreePerMeter;
-	double lonShift = computeParameterOffset(0)*degreePerMeter;
-
-	gpt = theEcefPlatformPosition;
-	double height = gpt.height();
-	gpt.height(height + computeParameterOffset(5));
-	gpt.latd(gpt.latd() + latShift);
-	gpt.lond(gpt.lond() + lonShift);
-	theAdjEcefPlatformPosition = gpt;
-	ossimLsrSpace lsrSpace(theAdjEcefPlatformPosition, theHeading+computeParameterOffset(4));
-
-	// make a left handed roational matrix;
-	ossimMatrix4x4 lsrMatrix(lsrSpace.lsrToEcefRotMatrix());
-	NEWMAT::Matrix orientation = (ossimMatrix4x4::createRotationXMatrix(thePitch+computeParameterOffset(3), OSSIM_LEFT_HANDED)*
-		ossimMatrix4x4::createRotationYMatrix(theRoll+computeParameterOffset(2), OSSIM_LEFT_HANDED));
-	theCompositeMatrix        = (lsrMatrix.getData()*orientation);
-	theCompositeMatrixInverse = theCompositeMatrix.i();
-
-	theBoundGndPolygon.resize(4);
-	// ossim_float64 w = theImageClipRect.width()*2.0;
-	// ossim_float64 h = theImageClipRect.height()*2.0;
-	theExtrapolateImageFlag = false;
-	theExtrapolateGroundFlag = false;
-
-	lineSampleToWorld(theImageClipRect.ul(),gpt);//+ossimDpt(-w, -h), gpt);
-	theBoundGndPolygon[0] = gpt;
-	lineSampleToWorld(theImageClipRect.ur(),gpt);//+ossimDpt(w, -h), gpt);
-	theBoundGndPolygon[1] = gpt;
-	lineSampleToWorld(theImageClipRect.lr(),gpt);//+ossimDpt(w, h), gpt);
-	theBoundGndPolygon[2] = gpt;
-	lineSampleToWorld(theImageClipRect.ll(),gpt);//+ossimDpt(-w, h), gpt);
-	theBoundGndPolygon[3] = gpt;
-	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::updateModel: returning..." << std::endl;
-}
-
-void ossimBuckeyeSensor::initAdjustableParameters()
-{
-	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::initAdjustableParameters: entering..." << std::endl;
-	resizeAdjustableParameterArray(6);
-
-	setAdjustableParameter(0, 0.0);
-	setParameterDescription(0, "x_offset");
-	setParameterUnit(0, "pixels");
-
-	setAdjustableParameter(1, 0.0);
-	setParameterDescription(1, "y_offset");
-	setParameterUnit(1, "pixels");
-
-	setAdjustableParameter(2, 0.0);
-	setParameterDescription(2, "roll");
-	setParameterUnit(2, "degrees");
-
-	setAdjustableParameter(3, 0.0);
-	setParameterDescription(3, "pitch");
-	setParameterUnit(3, "degrees");
-
-	setAdjustableParameter(4, 0.0);
-	setParameterDescription(4, "heading");
-	setParameterUnit(4, "degrees");
-
-	setAdjustableParameter(5, 0.0);
-	setParameterDescription(5, "altitude");
-	setParameterUnit(5, "meters");
-
-	// TODO: default to correct default values, or just leave it up to the input file, since we have different offsets for the B100, 182, and Metroliner, also need a z offset
-	setParameterSigma(0, 1.0);
-	setParameterSigma(1, 1.0);
-	setParameterSigma(2, 0);
-	setParameterSigma(3, 0);
-	setParameterSigma(4, 0);
-	setParameterSigma(5, 1000);
-	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::initAdjustableParameters: returning..." << std::endl;
-}
-
-
-bool ossimBuckeyeSensor::saveState(ossimKeywordlist& kwl,
-	const char* prefix) const
-{
-	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::saveState: entering..." << std::endl;
-	ossimSensorModel::saveState(kwl, prefix);
-
-	kwl.add(prefix, "type", "ossimBuckeyeSensor", true);
-
-	kwl.add(prefix, "roll", theRoll, true);
-	kwl.add(prefix, "pitch", thePitch, true);
-	kwl.add(prefix, "heading", theHeading, true);
-	kwl.add(prefix, "principal_point", "("+ossimString::toString(thePrincipalPoint.x) + "," + ossimString::toString(thePrincipalPoint.y)+")");
-	kwl.add(prefix, "pixel_size", "("+ossimString::toString(thePixelSize.x) + "," + ossimString::toString(thePixelSize.y)+")");
-	kwl.add(prefix, "focal_length", theFocalLength);
-	kwl.add(prefix, "ecef_platform_position",
-		ossimString::toString(theEcefPlatformPosition.x()) + " " +
-		ossimString::toString(theEcefPlatformPosition.y()) + " " +
-		ossimString::toString(theEcefPlatformPosition.z()));
-
-	if(theLensDistortion.valid())
-	{
-		ossimString lensPrefix = ossimString(prefix)+"distortion.";
-		theLensDistortion->saveState(kwl,
-			lensPrefix.c_str());
-	}
-	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::saveState: returning..." << std::endl;
-	return true;
-}
-
-bool ossimBuckeyeSensor::loadState(const ossimKeywordlist& kwl,
-	const char* prefix)
-{
-	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::loadState: entering..." << std::endl;
-
-	theImageClipRect = ossimDrect(0,0,8984,6732);
-	theRefImgPt      = ossimDpt(4492, 3366);
-
-	ossimSensorModel::loadState(kwl, prefix);
-	if(getNumberOfAdjustableParameters() < 1)
-	{
-		initAdjustableParameters();
-	}
-	theEcefPlatformPosition    = ossimGpt(0.0,0.0,1000.0);
-	theAdjEcefPlatformPosition = ossimGpt(0.0,0.0,1000.0);
-	theRoll    = 0.0;
-	thePitch   = 0.0;
-	theHeading = 0.0;
-
-	ossimString framemeta_gsti = kwl.find(prefix, "framemeta_gsti");
-	ossimString framemeta = kwl.find(prefix,"framemeta");
-	ossimString frame_number = kwl.find(prefix, "frame_number");
-	ossimString pixel_size = kwl.find(prefix, "pixel_size");
-	ossimString principal_point = kwl.find(prefix, "principal_point");
-	ossimString focal_length = kwl.find(prefix, "focal_length");
-	ossimString smac_radial = kwl.find(prefix, "smac_radial");
-	ossimString smac_decent = kwl.find(prefix, "smac_decent");
-	ossimString roll;
-	ossimString pitch;
-	ossimString yaw;
-	ossimString platform_position;
-	ossimFilename file_to_load;
-
-	ossimString FRAME_STRING	= "Frame#";
-	ossimString ROLL_STRING		= "Roll(deg)";
-	ossimString PITCH_STRING	= "Pitch(deg)";
-	ossimString YAW_STRING		= "Yaw(deg)";
-	ossimString LAT_STRING		= "Lat(deg)";
-	ossimString LON_STRING		= "Lon(deg)";
-	ossimString HAE_STRING		= "HAE(m)";
-
-	// Deal with the fact that there are 3 different types of 'FrameMeta' file
-	if (framemeta_gsti.empty() && !framemeta.empty() && !frame_number.empty())
-	{
-		file_to_load.setFile(framemeta);
-		YAW_STRING	= "Azimuth(deg)";
-	}
-	else if (!framemeta_gsti.empty() && framemeta.empty() && !frame_number.empty())
-	{
-		file_to_load.setFile(framemeta_gsti);
-	}
-
-	if (file_to_load.exists() && !frame_number.empty())
-	{
-		ossimCsvFile csv(" \t"); // we will use tab or spaces as seaparator
-		if(csv.open(file_to_load))
-		{
-			if(csv.readHeader())
-			{
-				ossimCsvFile::StringListType heads = csv.fieldHeaderList();
-				// Try to see if you can find the first header item, if not, then you either have a file that doesn't work in this case, or it's uppercase
-				if (std::find(heads.begin(), heads.end(), FRAME_STRING) == heads.end())
-				{
-					FRAME_STRING	= FRAME_STRING.upcase();
-					ROLL_STRING		= ROLL_STRING.upcase();
-					PITCH_STRING	= PITCH_STRING.upcase();
-					YAW_STRING		= YAW_STRING.upcase();
-					LAT_STRING		= LAT_STRING.upcase();
-					LON_STRING		= LON_STRING.upcase();
-					HAE_STRING		= HAE_STRING.upcase();
-				}
-
-				ossimRefPtr<ossimCsvFile::Record> record;
-				bool foundFrameNumber = false;
-				while( ((record = csv.nextRecord()).valid()) && !foundFrameNumber)
-				{
-					if( (*record)[FRAME_STRING] == frame_number)
-					{
-						foundFrameNumber = true;
-						roll = (*record)[ROLL_STRING];
-						pitch = (*record)[PITCH_STRING];
-						yaw = (*record)[YAW_STRING];
-						platform_position = (*record)[LAT_STRING] + " " 
-							+ (*record)[LON_STRING]+ " "
-							+ (*record)[HAE_STRING] + " WGE";
-					}
-				}
-			}
-		}
-		csv.close();
-	}
-	else
-	{
-		roll = kwl.find(prefix, "roll"); 
-		pitch = kwl.find(prefix, "pitch"); 
-		yaw = kwl.find(prefix, "heading"); 
-		platform_position = kwl.find(prefix, "ecef_platform_position");
-	}
-
-	bool result = (!pixel_size.empty()&&
-		!principal_point.empty()&&
-		!focal_length.empty()&&
-		!platform_position.empty());
-
-	if(!focal_length.empty())
-	{
-		theFocalLength = focal_length.toDouble();
-	}
-	if(!pixel_size.empty())
-	{
-		thePixelSize.toPoint(pixel_size);
-	}
-	if(!roll.empty())
-	{
-		theRoll = roll.toDouble();
-	}
-	if(!pitch.empty())
-	{
-		thePitch = pitch.toDouble();
-	}
-	if(!yaw.empty())
-	{
-		theHeading   = yaw.toDouble();
-	}
-	if(!principal_point.empty())
-	{
-		thePrincipalPoint.toPoint(principal_point);
-	}
-	if(platform_position.contains("WGE"))
-	{
-		std::vector<ossimString> splitString;
-		ossimString tempString(platform_position);
-		tempString.split(splitString, ossimString(" "));
-		std::string datumString;
-		double lat=0.0, lon=0.0, h=0.0;
-		if(splitString.size() > 2)
-		{
-			lat = splitString[0].toDouble();
-			lon = splitString[1].toDouble();
-			h = splitString[2].toDouble();
-		}
-
-		theEcefPlatformPosition = ossimGpt(lat,lon,h);
-	} else {
-		std::vector<ossimString> splitString;
-		ossimString tempString(platform_position);
-		tempString.split(splitString, ossimString(" "));
-		std::string datumString;
-		double x=0.0, y=0.0, z=0.0;
-		if(splitString.size() > 2)
-		{
-			x = splitString[0].toDouble();
-			y = splitString[1].toDouble();
-			z = splitString[2].toDouble();
-		}
-		theEcefPlatformPosition = ossimEcefPoint(x, y, z);
-	}
-	theLensDistortion = 0;
-	if(!smac_radial.empty()&&
-		!smac_decent.empty())
-	{
-		std::vector<ossimString> radial;
-		std::vector<ossimString> decent;
-		smac_radial.split(radial, " ");
-		smac_decent.split(decent, " ");
-		if((radial.size() == 5)&&
-			(decent.size() == 4))
-		{
-			// Just for debugging really.. optomization will make this sleeker
-			double k0 = radial[0].toDouble();
-			double k1 = radial[1].toDouble();
-			double k2 = radial[2].toDouble();
-			double k3 = radial[3].toDouble();
-			double k4 = radial[4].toDouble();
-
-			double p0 = decent[0].toDouble();
-			double p1 = decent[1].toDouble();
-			double p2 = decent[2].toDouble();
-			double p3 = decent[3].toDouble();
-
-			//theLensDistortion = new ossimSmacCallibrationSystem(radial[0].toDouble(),
-			//	radial[1].toDouble(),
-			//	radial[2].toDouble(),
-			//	radial[3].toDouble(),
-			//	radial[4].toDouble(),
-			//	decent[0].toDouble(),
-			//	decent[1].toDouble(),
-			//	decent[2].toDouble(),
-			//	decent[3].toDouble());
-
-			theLensDistortion = new ossimSmacCallibrationSystem(k0,k1,k2,k3,k4,p0,p1,p2,p3);
-		}
-	}
-	theImageSize = ossimDpt(theImageClipRect.width(),
-		theImageClipRect.height());
-
-	updateModel();
-
-	if(theGSD.isNan())
-	{
-		try
-		{
-			// This will set theGSD and theMeanGSD. Method throws ossimException.
-			computeGsd();
-		}
-		catch (const ossimException& e)
-		{
-			if (traceDebug())
-			{
-				ossimNotify(ossimNotifyLevel_DEBUG)
-					<< "ossimBuckeyeSensor::loadState Caught Exception:\n"
-					<< e.what() << std::endl;
-			}
-		}
-	}
-	if (traceDebug())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::loadState: returning..." << std::endl;
-	return result;
-}
-
-bool ossimBuckeyeSensor::setupOptimizer(const ossimString& init_file)
-{
-	ossimKeywordlist kwl;
-	kwl.addFile(init_file.c_str());
-
-	return loadState(kwl);
-}
-
-void ossimBuckeyeSensor::setPrincipalPoint(ossimDpt principalPoint)
-{
-	thePrincipalPoint = principalPoint;
-}
-
-void ossimBuckeyeSensor::setRollPitchHeading(double roll,
-	double pitch,
-	double heading)
-{
-	theRoll    = roll;
-	thePitch   = pitch;
-	theHeading = heading;
-
-	updateModel();
-}
-
-void ossimBuckeyeSensor::setPixelSize(const ossimDpt& pixelSize)
-{
-	thePixelSize = pixelSize;
-}
-
-void ossimBuckeyeSensor::setImageRect(const ossimDrect& rect)
-{
-	theImageClipRect = rect;
-	theRefImgPt = rect.midPoint();
-}
-
-void ossimBuckeyeSensor::setFocalLength(double focalLength)
-{
-	theFocalLength = focalLength;
-}
-
-void ossimBuckeyeSensor::setPlatformPosition(const ossimGpt& gpt)
-{
-	theRefGndPt            = gpt;
-	theEcefPlatformPosition = gpt;
-	updateModel();
-
-}
\ No newline at end of file
diff --git a/src/ossim/projection/ossimCoarseGridModel.cpp b/src/ossim/projection/ossimCoarseGridModel.cpp
deleted file mode 100644
index 2347b82..0000000
--- a/src/ossim/projection/ossimCoarseGridModel.cpp
+++ /dev/null
@@ -1,1025 +0,0 @@
-//*****************************************************************************
-// FILE: ossimCoarseGridModel.cc
-//
-// License:  See LICENSE.txt file in the top level directory.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION:
-//   Contains implementation of class ossimCoarseGridModel. This is an
-//   implementation of an interpolation sensor model. 
-//
-//   IMPORTANT: The lat/lon grid is for ground points on the ellipsoid.
-//   The dLat/dHgt and dLon/dHgt partials therefore are used against
-//   elevations relative to the ellipsoid.
-//
-//*****************************************************************************
-//  $Id: ossimCoarseGridModel.cpp 20710 2012-04-03 19:43:46Z gpotts $
-
-#include <ossim/projection/ossimCoarseGridModel.h>
-
-RTTI_DEF1(ossimCoarseGridModel, "ossimCoarseGridModel", ossimSensorModel);
-
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimDatumFactory.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/elevation/ossimElevManager.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/support_data/ossimSupportFilesList.h>
-#include <cstdio>
-#include <fstream>
-
-//***
-// Define Trace flags for use within this file:
-//***
-#include <ossim/base/ossimTrace.h>
-
-static ossimTrace traceExec  ("ossimCoarseGridModel:exec");
-static ossimTrace traceDebug ("ossimCoarseGridModel:debug");
-
-static const char* MODEL_TYPE = "ossimCoarseGridModel";
-static const char* GRID_FILE_NAME_KW = "grid_file_name";
-const ossimFilename DEFAULT_GEOM_FILE_EXT ("geom");
-const ossimFilename DEFAULT_GRID_FILE_EXT ("ocg");
-double ossimCoarseGridModel::theInterpolationError = .1;
-ossim_int32 ossimCoarseGridModel::theMinGridSpacing     = 100;
-
-//*****************************************************************************
-//  DEFAULT CONSTRUCTOR: ossimCoarseGridModel()
-//  
-//*****************************************************************************
-ossimCoarseGridModel::ossimCoarseGridModel()
-   :
-      ossimSensorModel(),
-      theDlatDparamGrid (0),
-      theDlonDparamGrid (0),
-      theHeightEnabledFlag(true)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
-      << "DEBUG ossimCoarseGridModel::ossimCoarseGridModel: entering..."
-      << std::endl;
-
-   theLatGrid.setDomainType(ossimDblGrid::SAWTOOTH_90);
-   theLonGrid.setDomainType(ossimDblGrid::WRAP_180);
-   theLatGrid.enableExtrapolation();
-   theLonGrid.enableExtrapolation();
-
-   setErrorStatus();
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
-      << "DEBUG ossimCoarseGridModel::ossimCoarseGridModel: returning..."
-      << std::endl;
-}
-
-//*****************************************************************************
-//  COPY CONSTRUCTOR: ossimCoarseGridModel(ossimCoarseGridModel)
-//  
-//*****************************************************************************
-ossimCoarseGridModel::ossimCoarseGridModel(const ossimCoarseGridModel& model)
-   :
-      ossimSensorModel  (model),
-      theGridFilename   (model.theGridFilename),
-      theLatGrid        (model.theLatGrid),
-      theLonGrid        (model.theLonGrid),
-      theDlatDhGrid     (model.theDlatDhGrid),
-      theDlonDhGrid     (model.theDlonDhGrid),
-      theDlatDparamGrid (0),
-      theDlonDparamGrid (0),
-      theHeightEnabledFlag(true)
-{
-   if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG)
-      << "DEBUG ossimCoarseGridModel::ossimCoarseGridModel(model): entering..."
-      << std::endl;
-
-   int numberOfParams = getNumberOfAdjustableParameters();
-   if(numberOfParams)
-   {
-      //***
-      // Allocate adjustable parameter partials grids then assign:
-      //***
-      theDlatDparamGrid = new ossimDblGrid [numberOfParams];
-      theDlonDparamGrid = new ossimDblGrid [numberOfParams];
-      
-      for (int i=0; i<numberOfParams; i++)
-      {
-         theDlatDparamGrid[i] = model.theDlatDparamGrid[i];
-         theDlonDparamGrid[i] = model.theDlonDparamGrid[i];
-      }
-   }
-   
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
-      << "DEBUG ossimCoarseGridModel::ossimCoarseGridModel: returning..."
-      << std::endl;
-}
-
-//*****************************************************************************
-//  CONSTRUCTOR: ossimCoarseGridModel(filename)
-//  
-//  Constructs model from geometry file
-//  
-//*****************************************************************************
-ossimCoarseGridModel::ossimCoarseGridModel(const ossimFilename& geom_file)
-   :
-      ossimSensorModel(),
-      theDlatDparamGrid (0),
-      theDlonDparamGrid (0),
-      theHeightEnabledFlag(true)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::ossimCoarseGridModel(geom_file): entering..." << std::endl;
-   
-   theLatGrid.setDomainType(ossimDblGrid::SAWTOOTH_90);
-   theLonGrid.setDomainType(ossimDblGrid::WRAP_180);
-   theLatGrid.enableExtrapolation();
-   theLonGrid.enableExtrapolation();
-
-   ossimKeywordlist kwl;
-   if(geom_file.exists()&&kwl.addFile(geom_file))
-   {
-      loadState(kwl);
-   }
-   else
-   {
-      ++theErrorStatus;
-   }
-
-   if (traceExec())   ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::ossimCoarseGridModel(geom_file): returning..." << std::endl;
-   return;
-}
-
-//*****************************************************************************
-//  CONSTRUCTOR: ossimCoarseGridModel(kwl)
-//  
-//  Constructs model from keywordlist geometry file
-//  
-//*****************************************************************************
-ossimCoarseGridModel::ossimCoarseGridModel(const ossimKeywordlist& geom_kwl)
-   :
-      ossimSensorModel(),
-      theDlatDparamGrid (0),
-      theDlonDparamGrid (0),
-      theHeightEnabledFlag(true)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::ossimCoarseGridModel(geom_kwl): entering..." << std::endl;
-
-   theLatGrid.setDomainType(ossimDblGrid::SAWTOOTH_90);
-   theLonGrid.setDomainType(ossimDblGrid::WRAP_180);
-   theLatGrid.enableExtrapolation();
-   theLonGrid.enableExtrapolation();
-
-  // Parse keywordlist for geometry:
-   loadState(geom_kwl);
-}
-
-//*************************************************************************************************
-//! Assigns the grid data given a projection (typically a rigorous sensor model)
-//*************************************************************************************************
-void ossimCoarseGridModel::buildGrid(const ossimDrect& imageBounds,
-                                     ossimProjection* proj,
-                                     double heightDelta,
-                                     bool enableHeightFlag,
-                                     bool makeAdjustableFlag)
-{
-   ossimRefPtr<ossimImageGeometry> geom = new ossimImageGeometry();
-   geom->setProjection(proj);
-   buildGrid(imageBounds, geom.get(), heightDelta, enableHeightFlag, makeAdjustableFlag);
-}  
-
-
-//*************************************************************************************************
-//! Assigns the grid data given a geometry
-//*************************************************************************************************
-void ossimCoarseGridModel::buildGrid(const ossimDrect& imageBounds,
-                                     ossimImageGeometry* geom,
-                                     double heightDelta,
-                                     bool enableHeightFlag,
-                                     bool makeAdjustableFlag)
-{
-   theHeightEnabledFlag =  enableHeightFlag;
-   
-   if (!geom->getProjection() || imageBounds.hasNans())
-      return;
-
-   // don't let it get any smaller than 100, 100 pixels
-   // on the input projector
-   //
-   // may want this to be adjusted by outside
-   //
-   const ossimDatum* targetDatum = ossimDatumFactory::instance()->wgs84();
-   ossimIpt gridSize(2,2);
-   ossimDpt gridOrigin(0,0);
-   ossimGpt gpt;
-   ossimGpt gpt2;
-   ossimGpt bilinearGpt;
-   resizeAdjustableParameterArray(0);
-   double normSplit = 1.0;
-   ossimIpt imageSize = ossimIpt(imageBounds.width(), imageBounds.height());
-   double error = 0.0;
-
-   ossimIpt imageOrigin = imageBounds.ul();
-   ossimDpt spacing ((double)(imageBounds.width()-1)/(gridSize.x-1),
-      (double)(imageBounds.height()-1)/(gridSize.y-1));
-
-   if(theDlatDparamGrid)
-   {
-      delete [] theDlatDparamGrid;
-      theDlatDparamGrid = NULL;
-   }
-   if(theDlonDparamGrid)
-   {
-      delete [] theDlonDparamGrid;
-      theDlonDparamGrid = NULL;
-   }
-
-   geom->localToWorld(imageBounds.midPoint(), gpt);
-
-   do
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << "Checking grid size " << gridSize << std::endl;
-      }
-
-      spacing = ossimDpt((double)(imageBounds.width()-1)/(gridSize.x-1),
-         (double)(imageBounds.height()-1)/(gridSize.y-1));
-
-      theLatGrid.setNullValue(ossim::nan());
-      theLonGrid.setNullValue(ossim::nan());
-      theDlatDhGrid.setNullValue(0.0);
-      theDlonDhGrid.setNullValue(0.0);
-      theLatGrid.setDomainType(ossimDblGrid::SAWTOOTH_90);
-      theLonGrid.setDomainType(ossimDblGrid::WRAP_180);
-      theLatGrid.initialize(gridSize, gridOrigin, spacing);
-      theLonGrid.initialize(gridSize, gridOrigin, spacing);
-      theDlatDhGrid.initialize(gridSize, gridOrigin, spacing);
-      theDlonDhGrid.initialize(gridSize, gridOrigin, spacing);
-      ossim_int32 x, y;
-
-      for(y = 0; y < gridSize.y; ++y)
-      {
-         for(x = 0; x < gridSize.x; ++x)
-         {
-            ossimDpt norm((double)x/(double)(gridSize.x-1),
-               (double)y/(double)(gridSize.y-1));
-
-            ossimDpt pt(imageOrigin.x + norm.x*(imageSize.x-1),
-               imageOrigin.y + norm.y*(imageSize.y-1));
-
-            geom->localToWorld(pt, gpt);
-            double h = gpt.height();
-            if(ossim::isnan(h))
-            {
-               h += heightDelta;
-            }
-            ossimDpt fullPt;
-            geom->rnToFull(pt, 0, fullPt);
-            geom->getProjection()->lineSampleHeightToWorld(fullPt, h, gpt2);
-            gpt.changeDatum(targetDatum);
-            gpt2.changeDatum(targetDatum);
-
-            theLatGrid.setNode(x, y, gpt.latd());
-            theLonGrid.setNode(x, y, gpt.lond());
-
-            theDlatDhGrid.setNode(x, y, (gpt2.latd() - gpt.latd())/heightDelta);
-            theDlonDhGrid.setNode(x, y, (gpt2.lond() - gpt.lond())/heightDelta);
-         }
-      }
-      ossim_int32 upperY = 2*gridSize.y;
-      ossim_int32 upperX = 2*gridSize.x;
-      error = 0.0;
-
-      // Set all base-class data members needed for subsequent calls to projection code:
-      initializeModelParams(imageBounds);
-
-      for(y = 0; ((y < upperY)&&(error < theInterpolationError)); ++y)
-      {
-         for(x = 0; ((x < upperX)&&(error<theInterpolationError)); ++x)
-         {
-            ossimDpt norm((double)x/(double)(upperX-1),
-               (double)y/(double)(upperY-1));
-
-            ossimDpt imagePoint(imageOrigin.x + norm.x*(imageSize.x-1),
-               imageOrigin.y + norm.y*(imageSize.y-1));
-            ossimDpt testIpt;
-
-            geom->localToWorld(imagePoint, gpt);
-            worldToLineSample(gpt, testIpt);
-            error = (testIpt-imagePoint).length();
-         }
-      }
-
-      gridSize.x *= 2;
-      gridSize.y *= 2;
-      normSplit *= .5;
-   } while((error > theInterpolationError) &&
-           ((imageSize.x*normSplit) > theMinGridSpacing) &&
-           ((imageSize.y*normSplit) > theMinGridSpacing));
-
-   gridSize = theLatGrid.size();
-
-   ossimAdjustableParameterInterface* adjustableParameters = 
-      PTR_CAST(ossimAdjustableParameterInterface, geom->getProjection());
-   removeAllAdjustments();
-   if(adjustableParameters&&makeAdjustableFlag)
-   {
-      if(adjustableParameters->getNumberOfAdjustableParameters() > 0)
-      {
-         newAdjustment(adjustableParameters->getNumberOfAdjustableParameters());
-
-         int numberOfParams = getNumberOfAdjustableParameters();
-         if(numberOfParams)
-         {
-            //***
-            // Allocate adjustable parameter partials grids then assign:
-            //***
-            theDlatDparamGrid = new ossimDblGrid [numberOfParams];
-            theDlonDparamGrid = new ossimDblGrid [numberOfParams];
-            for(int paramIdx = 0; paramIdx < numberOfParams; ++ paramIdx)
-            {
-               theDlonDparamGrid[paramIdx].setNullValue(0.0);
-               theDlatDparamGrid[paramIdx].setNullValue(0.0);
-               theDlatDparamGrid[paramIdx].initialize(gridSize, gridOrigin, spacing);
-               theDlonDparamGrid[paramIdx].initialize(gridSize, gridOrigin, spacing);
-               setAdjustableParameter(paramIdx, 0.0);
-               setParameterSigma(paramIdx, adjustableParameters->getParameterSigma(paramIdx));
-               setParameterUnit(paramIdx, adjustableParameters->getParameterUnit(paramIdx));
-               setParameterCenter(paramIdx, 0.0);
-               setParameterDescription(paramIdx,
-                  adjustableParameters->getParameterDescription(paramIdx));
-
-               double oldParameter = adjustableParameters->getAdjustableParameter(paramIdx);
-               adjustableParameters->setAdjustableParameter(paramIdx, 1.0, true);
-               double adjust = adjustableParameters->computeParameterOffset(paramIdx);
-               double deltaLat = 0;
-               double deltaLon = 0;
-               if(adjust != 0.0)
-               {
-                  for(int y = 0; y < gridSize.y; ++y)
-                  {
-                     for(int x = 0; x < gridSize.x; ++x)
-                     {
-                        ossimDpt norm((double)x/(double)(gridSize.x-1),
-                           (double)y/(double)(gridSize.y-1));
-
-                        ossimDpt pt(imageOrigin.x + norm.x*(imageSize.x-1),
-                           imageOrigin.y + norm.y*(imageSize.y-1));
-                        geom->localToWorld(pt, gpt);
-
-                        gpt.changeDatum(targetDatum);
-                        gpt2.latd(theLatGrid(pt));
-                        gpt2.lond(theLonGrid(pt));
-                        deltaLat = gpt.latd()-gpt2.latd();
-                        deltaLon = gpt.lond()-gpt2.lond();
-
-                        theDlatDparamGrid[paramIdx].setNode(x, y, deltaLat/adjust);
-                        theDlonDparamGrid[paramIdx].setNode(x, y, deltaLon/adjust);
-                     }
-                  }
-
-                  // The partials grids for this parameter are initialized, now initialize the
-                  // grid's extrapolator:
-                  theDlatDparamGrid[paramIdx].enableExtrapolation();
-                  theDlonDparamGrid[paramIdx].enableExtrapolation();
-               }
-               adjustableParameters->setAdjustableParameter(paramIdx, oldParameter, true);
-            }
-         }
-      }
-   }
-   getAdjustment(theInitialAdjustment);
-
-
-}
-
-void ossimCoarseGridModel::setInterpolationError(double error)
-{
-   theInterpolationError = error;
-}
-
-void ossimCoarseGridModel::setMinGridSpacing(ossim_int32 minSpacing)
-{
-   theMinGridSpacing = minSpacing;
-}
-
-//*************************************************************************************************
-//! Initializes base class data members after grids have been assigned.
-//! It is assumed that theImageSize and the origin image point were already set.
-//*************************************************************************************************
-void ossimCoarseGridModel::initializeModelParams(ossimIrect imageBounds)
-{
-   // NOTE: it is assumed that the grid size and spacing is the same for ALL grids:
-   ossimIpt gridSize (theLatGrid.size());
-   ossimDpt spacing  (theLatGrid.spacing());
-   ossimDpt v[4];
-   v[0].lat = theLatGrid.getNode(0,0);
-   v[0].lon = theLonGrid.getNode(0,0);
-   v[1].lat = theLatGrid.getNode(gridSize.x-1, 0);
-   v[1].lon = theLonGrid.getNode(gridSize.x-1, 0);
-   v[2].lat = theLatGrid.getNode(gridSize.x-1, gridSize.y-1);
-   v[2].lon = theLonGrid.getNode(gridSize.x-1, gridSize.y-1);
-   v[3].lat = theLatGrid.getNode(0, gridSize.y-1);
-   v[3].lon = theLonGrid.getNode(0, gridSize.y-1);
-
-   // Guaranty longitude values are -180 to 180
-   for (int i=0; i<4; i++)
-   {
-      if (v[i].lon > 180.0)
-         v[i].lon -= 360.0;
-   }
-
-   theBoundGndPolygon = ossimPolygon(4, v);
-   
-   theImageSize  = ossimDpt(imageBounds.width(), imageBounds.height());
-   theRefImgPt   = imageBounds.midPoint();
-   theRefGndPt.lat = theLatGrid(theRefImgPt);
-   theRefGndPt.lon = theLonGrid(theRefImgPt);
-   
-   ossimDpt ref_ip_dx (theRefImgPt.x+1.0, theRefImgPt.y    );
-   ossimDpt ref_ip_dy (theRefImgPt.x    , theRefImgPt.y+1.0);
-   ossimGpt ref_gp_dx (theLatGrid(ref_ip_dx), theLonGrid(ref_ip_dx));
-   ossimGpt ref_gp_dy (theLatGrid(ref_ip_dy), theLonGrid(ref_ip_dy));
-
-   theGSD.x   = theRefGndPt.distanceTo(ref_gp_dx);
-   theGSD.y   = theRefGndPt.distanceTo(ref_gp_dy);
-
-   theMeanGSD = (theGSD.line + theGSD.samp)/2.0;
-   theImageClipRect  = imageBounds;
-   theSubImageOffset = imageBounds.ul();
-}
-
-//*****************************************************************************
-//  DESTRUCTOR: ~ossimCoarseGridModel()
-//  
-//*****************************************************************************
-ossimCoarseGridModel::~ossimCoarseGridModel()
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
-      << "DEBUG ossimCoarseGridModel::~ossimCoarseGridModel: entering..."
-      << std::endl;
-
-   if(theDlatDparamGrid&&theDlonDparamGrid)
-   {
-      //***
-      // Deallocate memory:
-      //***
-      delete [] theDlatDparamGrid;
-      delete [] theDlonDparamGrid;
-      theDlatDparamGrid = NULL;
-      theDlonDparamGrid = NULL;
-   }
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
-      << "DEBUG ossimCoarseGridModel::~ossimCoarseGridModel: returning..."
-      << std::endl;
-}
-
-//*************************************************************************************************
-// METHOD
-//*************************************************************************************************
-void ossimCoarseGridModel::lineSampleToWorld(const ossimDpt& image_point,
-                                             ossimGpt&       gpt) const
-{
-   if(!theHeightEnabledFlag)
-   {
-      //
-      // Extrapolate if image point is outside image:
-      //
-      if (!insideImage(image_point))
-      {
-         gpt = extrapolate(image_point);
-         return;
-      }
-      
-      lineSampleHeightToWorld(image_point, 0.0, gpt);
-   }
-   else
-   {
-      ossimSensorModel::lineSampleToWorld(image_point, gpt);
-   }
-}
-
-//*****************************************************************************
-//  METHOD: ossimCoarseGridModel::lineSampleHeightToWorld()
-//  
-//  Establishes the ground point corresponding to the input image_point and
-//  specified elevation above MSL
-//
-//*****************************************************************************
-void
-ossimCoarseGridModel::lineSampleHeightToWorld(const ossimDpt& lineSampPt,
-                                              const double&   arg_hgt_above_ellipsoid,
-                                              ossimGpt&       worldPt) const
-{
-   if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::lineSampleHeightToWorld: entering..." << std::endl;
-   
-   if(theLatGrid.size().x < 1 ||
-      theLatGrid.size().y < 1)
-   {
-      worldPt.makeNan();
-      return;
-   }
-
-   double height = (ossim::isnan(arg_hgt_above_ellipsoid)) ? 0.0 : arg_hgt_above_ellipsoid;
-
-   // Note that there is no check for image point outside of valid image rect because this model
-   // uses the extrapolation inherent to the ossimDblGrid.
-
-   // The image point may correspond to an offset sub-image. Need to convert
-   // to full image space before anything:
-   ossimDpt ip = lineSampPt + theSubImageOffset;
-   
-   // Establish the interpolated values from the grids:
-   worldPt.lat = theLatGrid(ip);
-   worldPt.lon = theLonGrid(ip);
-   worldPt.hgt = height;
-
-   if(theHeightEnabledFlag)
-   {
-      // Adjust horizontally due to elevation:
-      worldPt.lat += theDlatDhGrid(ip)*height;
-      worldPt.lon += theDlonDhGrid(ip)*height;
-   }
-   int numberOfParams = getNumberOfAdjustableParameters();
- 
-   // Now add increments due to adjustable parameter deltas:
-   for (int p=0; p<numberOfParams; p++)
-   {
-       worldPt.lat += (theDlatDparamGrid[p](ip) * computeParameterOffset(p));
-       worldPt.lon += (theDlonDparamGrid[p](ip) * computeParameterOffset(p));
-   }
-
-   worldPt.limitLonTo180();
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::lineSampleHeightToWorld: returning..." << std::endl;
-}
-
-//*************************************************************************************************
-// METHOD
-//*************************************************************************************************
-void ossimCoarseGridModel::initAdjustableParameters()
-{
-   if(getNumberOfAdjustableParameters() < 1)
-   {
-      addAdjustment(theInitialAdjustment, true);
-   }
-   else
-   {
-      setAdjustment(theInitialAdjustment, true);
-   }
-}
-
-//*************************************************************************************************
-// METHOD
-//*************************************************************************************************
-void ossimCoarseGridModel::imagingRay(const ossimDpt& image_point,
-                                      ossimEcefRay&   image_ray) const
-{
-   ossimSensorModel::imagingRay(image_point, image_ray);
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimCoarseGridModel::print()
-//  
-//  Formatted dump of data members.
-//  
-//*****************************************************************************
-std::ostream& ossimCoarseGridModel::print(std::ostream& out) const 
-{
-   out << "\nDump of ossimCoarseGridModel object at: " << this << "\n"
-       << "\n           Grid File Name: " << theGridFilename 
-       << "\n                 Image ID: " << theImageID 
-       << "\n                   Sensor: " << theSensorID
-       << "\n  Image Size (rows, cols): " << theImageSize
-       << "\n      Ref Pt (samp, line): " << theRefImgPt 
-       << "\n   Ref Pt (lat, lon, hgt): " << theRefGndPt 
-       << "\n           GSD (row, col): " << theGSD 
-       << "\n  Bounding Ground Polygon: " << theBoundGndPolygon << endl;
-//      << "\n         Number of Params: " << theNumParams << "\n"<<endl;
-   
-   char buf[256];
-   ossimIpt size (theLatGrid.size());
-   ossimDpt spacing (theLatGrid.spacing());
-   int line, samp;
-   ossimIpt node;
-   
-   out << "[ line,  samp]        lat        lon         dLat/dH      dLon/dH\n"
-       << "-------------------------------------------------------------------"
-       <<endl;
-
-   for (node.y=0; node.y<size.y; node.y++)
-   {
-      line = (int) (node.y*spacing.y);
-      
-      for (node.x=0; node.x<size.x; node.x++)
-      {
-         samp = (int) (node.x*spacing.x);
-         
-         sprintf(buf, "[%5d, %5d]    %+9.5f  %+10.5f    %+11.4e  %+11.4e",
-                  line, samp,
-                  theLatGrid.getNode(node),
-                  theLonGrid.getNode(node),
-                  theDlatDhGrid.getNode(node),
-                  theDlonDhGrid.getNode(node));
-         out << buf << endl;
-      }
-      out <<"-----------------------------------------------------------------"
-          <<endl;
-   }
-
-   out << "\n\nDump of lat/lon Partials w.r.t. Adjustable Parameters:"<<endl;
-   out << "\nEnd Dump of ossimCoarseGridModel.\n" <<  endl;
-   return out;
-}
-
-//*****************************************************************************
-//  METHOD: ossimCoarseGridModel::saveState()
-//  
-//  Saves the model state to the KWL. This KWL also serves as a geometry file.
-//
-//  Returns true if successful.
-//  
-//*****************************************************************************
-bool ossimCoarseGridModel::saveState(ossimKeywordlist& kwl,
-                                     const char* prefix) const
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::saveState: entering..." << std::endl;
-
-   kwl.add(prefix, ossimKeywordNames::TYPE_KW, "ossimCoarseGridModel");
-   kwl.add(prefix, GRID_FILE_NAME_KW, theGridFilename);
-   kwl.add(prefix, "height_enabled_flag", theHeightEnabledFlag, true);
-   ossimSensorModel::saveState(kwl, prefix);
-   ossimString initAdjPrefix = ossimString(prefix) + "init_adjustment.";
-   theInitialAdjustment.saveState(kwl, initAdjPrefix);
-   
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::saveState: returning..." << std::endl;
-
-   return true;
-}
-
-//*****************************************************************************
-//  METHOD: ossimCoarseGridModel::loadState()
-//  
-//  Restores the model's state from the KWL. This KWL also serves as a
-//  geometry file.
-//
-//  Returns true if successful.
-//  
-//*****************************************************************************
-bool ossimCoarseGridModel::loadState(const ossimKeywordlist& kwl,
-                                     const char* prefix) 
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::loadState: entering..." << std::endl;
-
-   clearErrorStatus();
-   const char* value;
-   bool success;
-   
-   //***
-   // Assure this keywordlist contains correct type info:
-   //***
-   value = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
-   if (!value || (strcmp(value, "ossimCoarseGridModel")))
-   {
-      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::loadState:  returning..." << std::endl;
-      theErrorStatus++;
-      return false;
-   }
-   value = kwl.find(prefix, "height_enabled_flag");
-   if(value)
-   {
-      theHeightEnabledFlag = ossimString(value).toBool();
-   }
-
-   //***
-   // Pass on to the base-class for parsing first:
-   //***
-   success = ossimSensorModel::loadState(kwl, prefix);
-   if (!success)
-   {
-      theErrorStatus++;
-      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::loadState: returning with error..." << std::endl;
-      return false;
-   }
-
-   //***
-   // Look for geom filename or explicit grid filename to establish path to grid:
-   //***
-   theGridFilename = kwl.find(prefix, GRID_FILE_NAME_KW);
-   if (!theGridFilename.isReadable())
-   {
-      ossimFilename alt_path_to_grid = kwl.find(prefix, ossimKeywordNames::GEOM_FILE_KW);
-      theGridFilename = alt_path_to_grid.setExtension(DEFAULT_GRID_FILE_EXT);
-   }
-   if (!theGridFilename.isReadable())
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "ossimCoarseGridModel::loadState() -- Error "
-         "encountered opening coarse grid file at "<< "<" <<theGridFilename << ">." << std::endl;
-      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::loadState: returning with error..." << std::endl;
-      theErrorStatus++;
-      return false;
-   }
-
-   // Load the coarse grid file specified in KWL. This method resets the
-   // theErrorStatus to OSSIM_OK if successful:
-   if (!loadCoarseGrid(theGridFilename))
-   {
-      theErrorStatus++;
-      return false;
-   }
-
-   // Add the coarse grid filename to list of support files being referenced for logging purposes:
-   ossimSupportFilesList::instance()->add(theGridFilename.expand());
-
-   ossimString initAdjPrefix = ossimString(prefix) + "init_adjustment.";
-   theInitialAdjustment.loadState(kwl, initAdjPrefix.c_str());
-
-   if((ossim::isnan(theRefGndPt.hgt)) ||
-      (theRefGndPt.hgt == 0))
-   {
-      theRefGndPt.hgt = ossimElevManager::instance()->getHeightAboveEllipsoid(theRefGndPt);
-      if(theRefGndPt.hgt < 0)
-      {
-         theRefGndPt.hgt = fabs(theRefGndPt.hgt);
-      }
-   }
-      
-   if(theInitialAdjustment.getNumberOfAdjustableParameters() < 1)
-   {
-      getAdjustment(theInitialAdjustment);
-   }
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::loadState: returning..." << std::endl;
-   if (theErrorStatus)
-      return false;
-   
-   return true;
-}
-
-//*****************************************************************************
-//  METHOD: ossimCoarseGridModel::saveCoarseGrid(cgFileName)
-//  
-//  Saves the coarse grid to disk file.
-//
-//  Returns true if successful.
-//  
-//*****************************************************************************
-bool ossimCoarseGridModel::saveCoarseGrid(const ossimFilename& fileName)const
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::saveCoarseGrid: entering..." << std::endl;
-
-   // Create and open grid file as stream:
-   theGridFilename = fileName.expand();
-   theGridFilename.setExtension(DEFAULT_GRID_FILE_EXT);
-   ofstream outstream (theGridFilename.chars());
-   if (!outstream.is_open())
-   {
-      theErrorStatus++;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::saveCoarseGrid: Error "
-         "encountered creating coarse grid file <" << theGridFilename<< ">. Check that directory "
-         "exists and is writable." << std::endl;
-      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::saveCoarseGrid: returning with error..." << std::endl;
-      return false;
-   }
-
-   // Let each grid object write itself to the output file:
-   theLatGrid.save(outstream, "Latitude Grid");
-   theLonGrid.save(outstream, "Longitude Grid");
-   theDlatDhGrid.save(outstream, "dLat/dH Grid");
-   theDlonDhGrid.save(outstream, "dLon_dH Grid");
-
-   ossimString descr;
-   int numberOfParams = getNumberOfAdjustableParameters();
-   for (int p=0; p<numberOfParams; p++)
-   {
-      descr = getParameterDescription(p) + " dLat_dParam Grid";
-      theDlatDparamGrid[p].save(outstream, descr.chars());
-      descr = getParameterDescription(p) + " dLon_dParam Grid";
-      theDlonDparamGrid[p].save(outstream, descr.chars());
-   }
-   
-   // Since the geom file is needed in the same path as the grid file, take this opportunity to 
-   // write the geom file out as well:
-   ossimFilename geom_file (theGridFilename);
-   geom_file.setExtension(DEFAULT_GEOM_FILE_EXT);
-   ossimKeywordlist kwl;
-   saveState(kwl);
-   kwl.write(geom_file);
-
-   // Add to the list of support files referenced (though technically it has not yet been 
-   // referenced, but will be next time this image is opened):
-   ossimSupportFilesList::instance()->add(geom_file);
-   ossimSupportFilesList::instance()->add(theGridFilename);
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::saveCoarseGrid: returning..." << std::endl;
-   return true;
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimCoarseGridModel::loadCoarseGrid(cgFileName)
-//  
-//  Loads the coarse grid from disk file.
-//
-//  Returns true if successful.
-//  
-//*****************************************************************************
-bool ossimCoarseGridModel::loadCoarseGrid(const ossimFilename& cgFileName)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::loadCoarseGrid: entering..." << std::endl;
-
-   ossimDpt v[4];
-   ossimIpt grid_size;
-
-   //***
-   // Open existing grid file:
-   //***
-   ifstream instream (cgFileName.chars());
-   if (!instream.is_open())
-   {
-      theErrorStatus++;
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimCoarseGridModel::loadCoarseGrid: Error encountered opening coarse grid file <" << cgFileName
-         << ">. Check that the file exists and is readable." << std::endl;
-      }
-      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "CEBUG ossimCoarseGridModel::loadCoarseGrid: returning with error..." << std::endl;
-      return false;
-   }
-   theGridFilename = cgFileName;
-   if(theDlatDparamGrid)
-     {
-       delete [] theDlatDparamGrid;
-       theDlatDparamGrid = NULL;
-     }
-   if(theDlonDparamGrid)
-     {
-       delete [] theDlonDparamGrid;
-       theDlonDparamGrid = NULL;
-     }
-   //
-   // Reallocate memory:
-   //
-   int numberOfParams = getNumberOfAdjustableParameters();
-   if(numberOfParams)
-   {
-      theDlatDparamGrid = new ossimDblGrid [numberOfParams];
-      theDlonDparamGrid = new ossimDblGrid [numberOfParams];
-   }
-   //***
-   // Let each grid object read itself from the input file:
-   //***
-   if (!theLatGrid.load(instream))
-   {
-      ++theErrorStatus;
-      return false;
-   }
-   if (!theLonGrid.load(instream))
-   {
-      ++theErrorStatus;
-      return false;
-   }
-   if (!theDlatDhGrid.load(instream))
-   {
-      ++theErrorStatus;
-      return false;
-   }
-   if (!theDlonDhGrid.load(instream))
-   {
-      ++theErrorStatus;
-      return false;
-   }
-
-   for (int p=0; p<numberOfParams; p++)
-   {
-      if (!theDlatDparamGrid[p].load(instream))
-      {
-         ++theErrorStatus;
-         return false;
-      }
-      if (!theDlonDparamGrid[p].load(instream))
-      {
-         ++theErrorStatus;
-         return false;
-      }
-   }
-
-   //***
-   // Initialize the bounding ground rectangle:
-   //***
-   grid_size = theLatGrid.size();
-
-   v[0].lat = theLatGrid(0,0);
-   v[0].lon = theLonGrid(0,0);
-   v[1].lat = theLatGrid(theImageSize.x-1, 0);
-   v[1].lon = theLonGrid(theImageSize.x-1, 0);
-   v[2].lat = theLatGrid(theImageSize.x-1, theImageSize.y-1);
-   v[2].lon = theLonGrid(theImageSize.x-1, theImageSize.y-1);
-   v[3].lat = theLatGrid(0, theImageSize.y-1);
-   v[3].lon = theLonGrid(0, theImageSize.y-1);
-
-   theBoundGndPolygon = ossimPolygon(4, v);
-   
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::loadCoarseGrid: returning..." << std::endl;
-   return true;
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimCoarseGridModel::reallocateGrid()
-//  
-//  Deletes existing grid arrays and allocates new ones.
-//  
-//*****************************************************************************
-void ossimCoarseGridModel::reallocateGrid(const ossimIpt& grid_size)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::reallocateGrid:entering..." << endl;
-
-
-   //***
-   // Deallocate memory:
-   //***
-   if(theDlatDparamGrid)
-     {
-       delete [] theDlatDparamGrid;
-       theDlatDparamGrid = NULL;
-     }
-   if(theDlonDparamGrid)
-     {
-       delete [] theDlonDparamGrid;
-       theDlonDparamGrid = NULL;
-     }
-   //***
-   // determine grid spacing given new info:
-   //***
-   ossimDpt spacing ((double)(theImageSize.x-1)/(double)(grid_size.x-1),
-                     (double)(theImageSize.y-1)/(double)(grid_size.y-1));
-
-   //***
-   // Allocate all:
-   //***
-   ossimDpt grid_origin(0.0, 0.0);
-   theLatGrid.setNullValue(ossim::nan());
-   theLonGrid.setNullValue(ossim::nan());
-   theDlatDhGrid.setNullValue(0.0);
-   theDlonDhGrid.setNullValue(0.0);
-   theLatGrid.initialize(grid_size, grid_origin, spacing);
-   theLonGrid.initialize(grid_size, grid_origin, spacing);
-   theDlatDhGrid.initialize(grid_size, grid_origin, spacing);
-   theDlonDhGrid.initialize(grid_size, grid_origin, spacing);
-   
-   int numberOfParams = getNumberOfAdjustableParameters();
-   if(numberOfParams)
-   {
-      
-      theDlatDparamGrid = new ossimDblGrid [numberOfParams];
-      theDlonDparamGrid = new ossimDblGrid [numberOfParams];
-   }
-   for (int p=0; p<numberOfParams; p++)
-   {
-      theDlonDparamGrid[p].setNullValue(0.0);
-      theDlatDparamGrid[p].setNullValue(0.0);
-      theDlatDparamGrid[p].initialize(grid_size, grid_origin, spacing);
-      theDlonDparamGrid[p].initialize(grid_size, grid_origin, spacing);
-   }
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::reallocateGrid: returning..." << std::endl;
-   return;
-}
-
-//*****************************************************************************
-// STATIC METHOD: ossimCoarseGridModel::writeGeomTemplate
-//  
-//  Writes a sample geometry KWL to the output stream.
-//  
-//*****************************************************************************
-void ossimCoarseGridModel::writeGeomTemplate(ostream& os)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::writeGeomTemplate: entering..." << std::endl;
-
-   os <<
-      "//**************************************************************\n"
-      "// Template for OCG model kewordlist\n"
-      "//**************************************************************\n"
-      << ossimKeywordNames::TYPE_KW << ": " << MODEL_TYPE << endl;
-
-   ossimSensorModel::writeGeomTemplate(os);
-   
-   os << "//\n"
-      << "// Derived-class ossimCoarseGridModel Keywords:\n"
-      << "//\n"
-      << GRID_FILE_NAME_KW << ": <string>\n" << endl;
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimCoarseGridModel::writeGeomTemplate: returning..." << std::endl;
-   return;
-}
-   
-//*************************************************************************************************
-// Overrides base-class extrapolation code. Uses extrapolation inherent to ossimDbleGrid
-//*************************************************************************************************
-ossimGpt ossimCoarseGridModel::extrapolate(const ossimDpt& local_ip, const double& height) const
-{
-   ossimGpt gpt;
-   lineSampleHeightToWorld(local_ip, height, gpt);
-   return gpt;
-}
diff --git a/src/ossim/projection/ossimEpsgProjectionDatabase.cpp b/src/ossim/projection/ossimEpsgProjectionDatabase.cpp
deleted file mode 100644
index 1abbf8d..0000000
--- a/src/ossim/projection/ossimEpsgProjectionDatabase.cpp
+++ /dev/null
@@ -1,877 +0,0 @@
-//*************************************************************************************************
-//                          OSSIM -- Open Source Software Image Map
-//
-// LICENSE:  See top level LICENSE.txt file.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Projection database for EPSG coded projections provided in database files
-//
-//*************************************************************************************************
-//  $Id: ossimEpsgProjectionDatabase.cpp 21519 2012-08-22 21:16:25Z dburken $
-#include <ossim/projection/ossimEpsgProjectionDatabase.h>
-#include <ossim/projection/ossimStatePlaneProjectionInfo.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/projection/ossimUtmProjection.h>
-#include <ossim/projection/ossimEquDistCylProjection.h>
-#include <ossim/projection/ossimTransMercatorProjection.h>
-#include <ossim/projection/ossimMercatorProjection.h>
-#include <ossim/projection/ossimOrthoGraphicProjection.h>
-#include <ossim/projection/ossimNewZealandMapGridProjection.h>
-#include <ossim/projection/ossimLambertConformalConicProjection.h>
-#include <ossim/projection/ossimCassiniProjection.h>
-#include <ossim/projection/ossimAlbersProjection.h>
-#include <ossim/base/ossimEpsgDatumFactory.h>
-#include <ossim/base/ossimDatumFactory.h>
-#include <ossim/base/ossimDatumFactoryRegistry.h>
-#include <ossim/base/ossimPreferences.h>
-#include <ossim/projection/ossimMapProjectionFactory.h>
-#include <ossim/base/ossimException.h>
-#include <math.h>
-
-ossimEpsgProjectionDatabase* ossimEpsgProjectionDatabase::m_instance = 0;
-
-// Indexes into the DB file fields using "SPADAC EPSG" format (format "A"). 
-// IF THE LINE FIELDS CHANGE ORDER, THIS LIST WILL NEED TO BE CHANGED TO REFLECT THE NEW ORDER!
-enum
-{
-   A_CODE = 0,  // This is the EPSG code
-   A_NAME,
-   A_PROJ_TYPE,
-   A_UNITS,
-   A_DATUM_CODE,
-   A_DATUM_NAME,
-   A_ELLIPSOID_NAME,
-   A_FALSE_EASTING,
-   A_NAT_ORG_LAT,
-   A_FALSE_NORTHING,
-   A_NAT_ORG_LON,
-   A_NAT_ORG_SCALE,
-   A_INIT_LINE_AZ,
-   A_PROJ_CTR_LAT,
-   A_PROJ_CTR_NORTHING,
-   A_RECT_TO_SKEW_ANGLE,
-   A_INIT_LINE_SCALE,
-   A_PROJ_CTR_EASTING,
-   A_PROJ_CTR_LON,
-   A_PSEUDO_STD_PARL_1,
-   A_PSEUDO_STD_PARL_1_SCALE,
-   A_ORG_LON,
-   A_STD_PARL_2_LAT,
-   A_FALSE_ORG_LAT,
-   A_FALSE_ORG_LON,
-   A_STD_PARL_1_LAT,
-   A_FALSE_ORG_NORTHING,
-   A_FALSE_ORG_EASTING,
-   A_STD_PARL_LAT,
-   A_TOPOCTR_HGT,
-   A_TOPOCTR_LAT,
-   A_TOPOCTR_Z,
-   A_TOPOCTR_Y,
-   A_TOPOCTR_X,
-   A_VIEWPOINT_H,
-   A_INIT_LON,
-   A_ZONE_WIDTH,
-   A_NUM_FIELDS   // Not an index, but a count
-};
-static const ossimString EPSG_DB_FORMAT_A ("EPSG_DB_FORMAT_A");
-
-// State Plane database CSV file field format (format "B")
-// NOTE: Eventually, all EPSG-coded projections, including State Plane/HARN should be specified
-// in the EPSG database format. Presently there is a disconnect between Geotrans params and EPSG-Db
-// params, particularly regarding datums, that makes a purely EPSG-Db solution too awkward to
-// implement, so provision is made here to continue reading the state plane CSV files.
-enum 
-{
-   B_NAME = 0,
-   B_CODE,   // This is the EPSG code
-   B_PROJ_TYPE,
-   B_PARAM1,
-   B_PARAM2,
-   B_PARAM3,
-   B_PARAM4,
-   B_FALSE_EASTING,
-   B_FALSE_NORTHING,
-   B_UNITS,
-   B_DATUM_CODE,
-   B_NUM_FIELDS   // Not an index, but a count
-};
-static const ossimString STATE_PLANE_FORMAT_B ("STATE_PLANE");
-
-// "Ming Special" database CSV file format (format "C")
-// State Plane Coordinate System (SPCS) coding is an alternate coding scheme that maps to EPSG.
-// http://www.pcigeomatics.com/cgi-bin/pcihlp/PROJ%7CSPCS+ZONES
-enum 
-{
-   C_NAME = 0,
-   C_CODE,
-   C_NUM_FIELDS   // Not an index, but a count
-};
-static const ossimString SPCS_EPSG_MAP_FORMAT_C ("SPCS_EPSG_MAP");
-
-//*************************************************************************************************
-//! Converts sexagesimal DMS to decimal degrees
-//*************************************************************************************************
-double decodeSexagesimalDms(const ossimString& sex_str)
-{
-   if (!sex_str.contains("."))
-      return sex_str.toDouble();
-
-   double sign = 1.0;
-   if (sex_str.chars()[0] == '-')
-      sign = -1.0;
-
-   double dsex, msex, ssex;
-   std::vector<ossimString> splitstr = sex_str.split(".");
-   dsex = splitstr[0].toDouble();
-   
-   if (splitstr.size() < 2)
-      return dsex;
-
-   const char* MMSSssstr = splitstr[1].chars();
-   unsigned int str_size = (unsigned int) splitstr[1].size();
-   char minstr[] = "00";
-   ossimString secstr ("00.");
-   minstr[0] = MMSSssstr[0];
-   if (str_size > 1)
-   {
-      minstr[1] = MMSSssstr[1];
-      if (str_size > 2)
-      {
-         secstr = &(MMSSssstr[2]);
-         if (str_size == 3)
-            secstr += ossimString("0.");
-         else if (str_size > 4)
-            secstr.insert(2, ".");
-      }
-   }
-   msex = ossimString(minstr).toDouble();
-   ssex = secstr.toDouble();
-   dsex += sign*(msex + ssex/60.0)/60.0;
-   return dsex;
-}
-
-//*************************************************************************************************
-//! Implements singleton pattern
-//*************************************************************************************************
-ossimEpsgProjectionDatabase* ossimEpsgProjectionDatabase::instance()
-{
-   if(!m_instance)
-      m_instance = new ossimEpsgProjectionDatabase;
-   return m_instance;
-}
-
-//*************************************************************************************************
-//! Destructor
-//*************************************************************************************************
-ossimEpsgProjectionDatabase::~ossimEpsgProjectionDatabase()
-{
-}
-
-//*************************************************************************************************
-//! Constructor loads all DB CSV files specified in the ossim prefs
-//*************************************************************************************************
-ossimEpsgProjectionDatabase::ossimEpsgProjectionDatabase()
-   :
-   m_projDatabase(),
-   m_mutex()
-{
-   // Read the ossim preferences for Db CSV files.
-   m_mutex.lock();
-   initialize();
-   m_mutex.unlock();
-}
-
-//*************************************************************************************************
-//! Populates the database with contents of DB files as specified in ossim_preferences.
-//*************************************************************************************************
-void ossimEpsgProjectionDatabase::initialize()
-{
-   // Fetch filenames of all projection DB files specified in ossim_preferences:
-   ossimString regEx =  ossimString("^epsg_database_file[0-9]+");
-   vector<ossimString> keys = 
-      ossimPreferences::instance()->preferencesKWL().getSubstringKeyList(regEx);
-   vector<ossimString>::const_iterator i = keys.begin();
-
-   // Create only once outside the loop:
-   ossimFilename db_name;
-   ossimString group_id;
-   ossimString format_id;
-   ossimString line;
-
-   // Loop over each file and read contents into memory:
-   while ( i != keys.end() )
-   {
-      db_name = ossimPreferences::instance()->preferencesKWL().find( (*i).c_str() );
-      ++i;
-      if (!db_name.isReadable())
-         continue;
-
-      // Open the DB file:
-      std::ifstream db_stream (db_name.chars());
-      bool good_file = false;
-      if (db_stream.good())
-      {
-         // Format specification implied in file's magic number:
-         std::getline(db_stream, format_id.string());
-         format_id.trim();
-         if ((format_id == EPSG_DB_FORMAT_A) || 
-             (format_id == STATE_PLANE_FORMAT_B) ||
-             (format_id == SPCS_EPSG_MAP_FORMAT_C))
-            good_file = true;
-      }
-      if (!good_file)
-      {
-         ossimNotify(ossimNotifyLevel_WARN)<<"ossimEpsgProjectionDatabase::initialize() -- "
-            "Encountered bad database file <"<<db_name<<">. Skipping this file."<<endl;
-         db_stream.close();
-         continue;
-      }
-
-      // The file is good. Skip over the column descriptor line:
-      std::getline(db_stream, line.string());
-
-      // Loop to read all data records:
-      while (!db_stream.eof())
-      {
-         ossimRefPtr<ProjDbRecord> db_record = new ProjDbRecord;
-         std::getline(db_stream, line.string());
-         db_record->csvRecord = line.explode(","); // ONLY CSV FILES CONSIDERED HERE
-         if (db_record->csvRecord.size())
-         {
-            // Check if primary EPSG database format A:
-            if (format_id == EPSG_DB_FORMAT_A)
-            {
-               db_record->code = db_record->csvRecord[A_CODE].toUInt32();
-               db_record->name = db_record->csvRecord[A_NAME];
-               db_record->csvFormat = FORMAT_A;
-            }
-
-            // Check if State Plane (subset of EPSG but handled differently until projection 
-            // geotrans-EPSG disconnect is resolved. 
-            else if (format_id == STATE_PLANE_FORMAT_B)
-            {
-               db_record->code = db_record->csvRecord[B_CODE].toUInt32();
-               db_record->name = db_record->csvRecord[B_NAME];
-               db_record->csvFormat = FORMAT_B;
-            }
-
-            // This format is for Ming-special State Plane Coordinate System coded format.
-            // This format is simply a mapping from SPCS spec name (OSSIM-specific) to EPSG code.
-            // Note that no proj is instantiated and no KWL is populated. Only name and EPSG mapped
-            // code is saved.
-            else if (format_id == SPCS_EPSG_MAP_FORMAT_C)
-            {
-               db_record->code = db_record->csvRecord[C_CODE].toUInt32();
-               db_record->name = db_record->csvRecord[C_NAME];
-               db_record->csvFormat = FORMAT_C;
-            }
-
-            m_projDatabase.insert(make_pair(db_record->code, db_record));
-         }
-      }
-
-      db_stream.close();
-   } // end of while loop over all DB files
-}
-
-//*************************************************************************************************
-//! Returns a projection corresponding to the group (e.g., "EPSG") and PCS code provided, 
-//! or NULL if no entry found.
-//*************************************************************************************************
-ossimProjection* ossimEpsgProjectionDatabase::findProjection(ossim_uint32 epsg_code) const
-{
-   ossimMapProjection* proj = 0;
-
-   // Quick check for bogus EPSG:
-   if ((epsg_code == 0) || (epsg_code == 32767))
-      return 0;
-
-   // Check for Google projection:
-   else if (epsg_code == 900913)
-   {
-      const ossimDatum* datum = ossimDatumFactory::instance()->create(ossimString("6055"));
-      ossimMercatorProjection* merc_proj = new ossimMercatorProjection();
-      ossimGpt origin(0.0,0.0,0.0, datum);
-      merc_proj->setFalseEasting(0.0);
-      merc_proj->setFalseNorthing(0.0);
-      merc_proj->setOrigin(origin); // Also sets the projections datum to the origin's datum
-      merc_proj->update();
-      merc_proj->setPcsCode(900913);
-      proj = merc_proj;
-   }
-
-   else
-   {
-      // Search database for entry:
-      std::multimap<ossim_uint32, ossimRefPtr<ProjDbRecord> >::iterator db_iter = 
-         m_projDatabase.find(epsg_code);
-      if (db_iter != m_projDatabase.end())
-      {
-         // See if a projection has already been created for this entry:
-         m_mutex.lock();
-         ossimRefPtr<ProjDbRecord> db_record = db_iter->second;
-         if ( db_record.valid() )
-         {
-            if (db_record->proj.valid())
-               proj = (ossimMapProjection*) db_record->proj->dup();
-            else
-            {
-               // Try decoding the EPSG code before accessing DB:
-               proj = createProjFromUtmCode(epsg_code);
-               if (proj)
-               {
-                  db_record->proj = proj;
-                  db_record->datumValid = true;
-               }
-               else if (db_iter->second->csvFormat == FORMAT_A)
-               {
-                  proj = createProjFromFormatARecord( db_record.get() );
-               }
-               else if (db_iter->second->csvFormat == FORMAT_B)
-               {
-                  proj = createProjFromFormatBRecord( db_record.get() );
-               }
-               
-               if (proj)
-               {
-                  // To save allocated memory, get rid of the original CSV entry since a real 
-                  // projection is now represented in the database:
-                  db_record->csvRecord.clear();
-                  db_record->csvFormat = NOT_ASSIGNED;
-               }
-            }
-
-         } // Matches: if  ( db_record.valid() )
-         m_mutex.unlock();
-      }
-   }
-
-   return proj;
-}
-
-//*************************************************************************************************
-//! Returns a projection corresponding to the group (e.g., "EPSG") and PCS code provided, 
-//! or NULL if no entry found.
-//*************************************************************************************************
-ossimProjection* ossimEpsgProjectionDatabase::findProjection(const ossimString& spec) const
-{
-   //std::cout << "ossimEpsgProjectionDatabase::findProjection: entered with spec " << spec << "\n";
-   ossimProjection* proj = 0;
-
-   // Use the CRS code to access the database. The spec should be <group>:<code> where <group> is 
-   // "EPSG" (the only group handled here):
-   ossim_uint32 spec_code;
-   ossimString spec_group ("epsg"); // default if only integer code provided
-   if (spec.contains(":"))
-   {
-      spec_group = spec.before(":");
-      spec_code = spec.after(":").toUInt32();
-      spec_group = spec_group.downcase();
-   }
-   else
-   {
-      spec_code = spec.toUInt32();
-   }
-
-   // Presently only EPSG database is handled:
-   if ((spec_code != 0) && (spec_group == "epsg"))
-      return findProjection(spec_code);
-
-   // The spec is probably a projection name. Need to search Db by the projection name. 
-   // Search database for entry. The spec may use different delimiters than
-   // the DB so need to split the strings and compare the words:
-   ossimString separators ("_ /()");
-   vector<ossimString> split_spec = spec.split(separators, true);
-   vector<ossimString> split_db_name;
-   ossimRefPtr<ossimMapProjection> map_proj = 0;
-   std::multimap<ossim_uint32, ossimRefPtr<ProjDbRecord> >::iterator db_iter = m_projDatabase.begin();
-   while ((db_iter != m_projDatabase.end()) && !proj)
-   {
-      ossimRefPtr<ProjDbRecord> db_record = db_iter->second;
-      if ( db_record.valid() )
-      {
-         split_db_name.clear();
-         db_record->name.split(split_db_name, separators, true);
-         if (split_spec == split_db_name)
-         {
-            // We may already have instantiated this projection, in which case just return its copy.
-            // Otherwise, create the projection from the EPSG code that corresponds to the name:
-            if (db_record->proj.valid())
-               proj = (ossimMapProjection*) db_record->proj->dup();
-            else
-               proj = findProjection(db_record->code);
-            return proj;
-         }
-      }
-      ++db_iter;
-   }
-    
-   // No hit? Could be that just a datum was identified, in which case we need a simple 
-   // Platte Carree:
-   const ossimDatum* datum = ossimDatumFactoryRegistry::instance()->create(spec);
-   if (datum)
-   {
-      ossimEquDistCylProjection* proj = new ossimEquDistCylProjection(*(datum->ellipsoid()));
-      proj->setDatum(datum);
-      proj->setPcsCode(spec_code);
-      return proj;
-   }
-
-   return 0;
-}
-
-
-//*************************************************************************************************
-//! Given a projection name, assigns the group (e.g., "EPSG") and code of the projection. 
-//! Returns "<group>:<code>" if match was found or empty string if not found.
-//*************************************************************************************************
-ossim_uint32 ossimEpsgProjectionDatabase::findProjectionCode(const ossimString& proj_name) const
-{
-   std::multimap<ossim_uint32, ossimRefPtr<ProjDbRecord> >::iterator db_iter = m_projDatabase.begin();
-   while (db_iter != m_projDatabase.end())
-   {
-      ossimRefPtr<ProjDbRecord> db_record = db_iter->second.get();
-      if ( db_record.valid() )
-      {
-         if (db_record->name == proj_name)
-            return (db_record->code);
-      }
-      ++db_iter;
-   }
-      
-   return 0;
-}
-
-//*************************************************************************************************
-//! Given a projection instance, this method determines the corresponding EPSG code. Obviously
-//! this is only needed if the projection does not have its PCS code assigned (it is NULL). This
-//! happens when the projection was constructed with full parameters instead of the EPSG code.
-//! Returns integer EPSG code if match was found or 0 if not found.
-//*************************************************************************************************
-ossim_uint32 
-ossimEpsgProjectionDatabase::findProjectionCode(const ossimMapProjection& lost_proj) const
-{
-   ossimString lost_type (lost_proj.getClassName());
-
-   // Shortcut for EPSG:4326 (WGS-85 geographic rectangular -- very common):
-   if ((lost_type == "ossimEquDistCylProjection") && (lost_proj.getDatum()->epsgCode() == 6326))
-      return 4326;
-
-   ossim_uint32 found_code = 0;
-   if (lost_type == "ossimUtmProjection")
-   {
-      found_code = getCodeFromUtmProj(dynamic_cast<const ossimUtmProjection*>(&lost_proj));
-      if (found_code)
-         return found_code;
-   }
-
-   ossimString lookup;
-   std::multimap<ossim_uint32, ossimRefPtr<ProjDbRecord> >::iterator db_iter =
-      m_projDatabase.begin();
-   while ((db_iter != m_projDatabase.end()) && (found_code == 0))
-   {
-      ossimRefPtr<ProjDbRecord> db_record = db_iter->second;
-      if ( db_record.valid() )
-      {
-         // Has a projection already been created for this db iter?
-         if (!db_record->proj.valid())
-         {
-            // No projection has been created yet for this DB entry. 
-            // NOTE: THIS IS VERY SLOW BECAUSE WE ARE INSTANTIATING EVERY PROJECTION IN THE DB!!!
-            db_record->proj = dynamic_cast<ossimMapProjection*>(findProjection(db_record->code));
-         }
-         if (db_record->proj.valid() && (*(db_record->proj.get()) == lost_proj))
-         {
-            found_code = db_record->code;
-            
-            // Hack to remap projection code 4087 to 4326 (which is not really a projection 
-            // code but other packages like to see 4326 for geographic projections.
-            // Hacked under protest (OLK, 08/2010)
-            if (found_code == 4087)
-               found_code = 4326;
-         }
-      }
-      ++db_iter;
-   }
-   return found_code;
-}
-
-//*************************************************************************************************
-//! This method provides acess to the projection name given the EPSG code. The name provides 
-//! enough info for recognizing a non-meters HARN-based projection. 
-//*************************************************************************************************
-ossimString ossimEpsgProjectionDatabase::findProjectionName(ossim_uint32 epsg_code) const
-{
-   ossimString name ("");
-   std::multimap<ossim_uint32, ossimRefPtr<ProjDbRecord> >::iterator db_iter = 
-       m_projDatabase.find(epsg_code);
-   
-   if (db_iter != m_projDatabase.end())
-      name = db_iter->second->name;
-   
-   return name;
-}
-
-//*************************************************************************************************
-//! Populates caller's list with all projections currently represented in the database.
-//! The format is: 
-//!    EPSG:<code>  "<Name as appears in Db>"
-//! There may be duplicate entries if the projection is duplicated in the various Db files.
-//*************************************************************************************************
-void ossimEpsgProjectionDatabase::getProjectionsList(std::vector<ossimString>& list) const
-{
-   std::multimap<ossim_uint32, ossimRefPtr<ProjDbRecord> >::iterator db_iter = m_projDatabase.begin();
-   while (db_iter != m_projDatabase.end())
-   {
-      ossimRefPtr<ProjDbRecord> db_record = db_iter->second;
-      if ( db_record.valid() )
-      {
-         ossimString record ("EPSG:");
-         record += ossimString::toString(db_record->code);
-         record += "  \"";
-         record += db_record->name;
-         record += "\"";
-         list.push_back(record);
-      }
-      ++db_iter;
-   }
-   return;
-}
-
-//*************************************************************************************************
-//! This method is invoked to parse the Db record and produce a projection (or NULL if spec invalid)
-//
-// LIMITATION: Currently not parsing the datum info from the EPSG database file due to disconnect
-// with current ossimDatumFactory. Setting to default WGS84 with warning message.
-//*************************************************************************************************
-ossimMapProjection* 
-ossimEpsgProjectionDatabase::createProjFromFormatARecord(ProjDbRecord* record) const
-{
-   // Establish EPSG code and test for UTM (full projection is implied in the code itself -- no 
-   // accessing the database). Until the database is solidified, it is probably better to do 
-   // it this way:
-   record->datumValid = true;
-   record->proj = 0;
-
-   // Establish the units in which the easting/northing is provided:
-   double mtrs_per_unit = 1.0;
-   if (record->csvRecord[A_UNITS] == "US survey foot")
-      mtrs_per_unit = US_METERS_PER_FT;
-   else if (record->csvRecord[A_UNITS].contains("foot")) // THIS IS INTERNATIONAL FOOT, NOT EXACT FOR MANY INTERNATIONAL VARIETIES
-      mtrs_per_unit = MTRS_PER_FT;
-   else if (record->csvRecord[A_UNITS].contains("kilometre"))
-      mtrs_per_unit = 1000.0;
-   else if (!record->csvRecord[A_UNITS].contains("metre"))
-   {
-      // ### SKIP THIS MESSAGE BUT BE AWARE THAT THIS PROJECTION WON'T BE REPRESENTED IN DB ###
-      //ossimNotify(ossimNotifyLevel_WARN)<<MODULE<<"EPSG:"<<pcs_code<<" units of <"
-      //   <<record->csvRecord[A_UNITS]<<"> not presently supported."<<endl;
-      return 0;
-   }
-
-   // First create a datum given the datum code in the record:
-   ossim_uint32 gcs_code = record->csvRecord[A_DATUM_CODE].toUInt32();
-   const ossimDatum* datum = ossimEpsgDatumFactory::instance()->create(gcs_code);
-   if (!datum)
-   {
-      // Default to WGS 84 -- this may throw an exception:
-      datum = ossimDatumFactory::instance()->create(ossimString("WGE"));
-      record->datumValid = false;
-   }
-   const ossimEllipsoid* ellipsoid = datum->ellipsoid();
-
-   ossimGpt origin(0,0,0,datum);
-   ossimString proj_type = record->csvRecord[A_PROJ_TYPE];
-   if (proj_type.contains("Transverse Mercator"))
-   {
-      origin.lat = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LAT]);
-      origin.lon = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LON]);
-      double fe = mtrs_per_unit*record->csvRecord[A_FALSE_EASTING].toDouble();
-      double fn = mtrs_per_unit*record->csvRecord[A_FALSE_NORTHING].toDouble();
-      double sf = record->csvRecord[A_NAT_ORG_SCALE].toDouble();
-      record->proj = new ossimTransMercatorProjection(*ellipsoid, origin, fe, fn, sf);
-   }
-   else if (proj_type.contains("Lambert Conic Conformal (1SP)"))
-   {
-      origin.lat = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LAT]);
-      origin.lon = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LON]);
-      double fe = mtrs_per_unit*record->csvRecord[A_FALSE_EASTING].toDouble();
-      double fn = mtrs_per_unit*record->csvRecord[A_FALSE_NORTHING].toDouble();
-      record->proj = new ossimLambertConformalConicProjection(*ellipsoid, origin, origin.lat, 
-         origin.lat, fe, fn);
-   }
-   else if (proj_type.contains("Lambert Conic Conformal (2SP)"))
-   {
-      origin.lat = decodeSexagesimalDms(record->csvRecord[A_FALSE_ORG_LAT]);
-      origin.lon = decodeSexagesimalDms(record->csvRecord[A_FALSE_ORG_LON]);
-      double p1 = decodeSexagesimalDms(record->csvRecord[A_STD_PARL_1_LAT]);
-      double p2 = decodeSexagesimalDms(record->csvRecord[A_STD_PARL_2_LAT]);
-      double fe = mtrs_per_unit*record->csvRecord[A_FALSE_ORG_EASTING].toDouble();
-      double fn = mtrs_per_unit*record->csvRecord[A_FALSE_ORG_NORTHING].toDouble();
-      record->proj = new ossimLambertConformalConicProjection(*ellipsoid, origin, p1, p2, fe, fn);
-   }
-   else if (proj_type.contains("Cassini"))
-   {
-      origin.lat = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LAT]);
-      origin.lon = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LON]);
-      double fe = mtrs_per_unit*record->csvRecord[A_FALSE_EASTING].toDouble();
-      double fn = mtrs_per_unit*record->csvRecord[A_FALSE_NORTHING].toDouble();
-      record->proj =  new ossimCassiniProjection(*ellipsoid, origin, fe, fn);
-   }
-   else if (proj_type.contains("Mercator (1SP)") || proj_type.contains("Pseudo-Mercator"))
-   {
-      origin.lat = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LAT]);
-      origin.lon = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LON]);
-      double fe = mtrs_per_unit*record->csvRecord[A_FALSE_EASTING].toDouble();
-      double fn = mtrs_per_unit*record->csvRecord[A_FALSE_NORTHING].toDouble();
-      double sf = record->csvRecord[A_NAT_ORG_SCALE].toDouble();
-      record->proj = new ossimMercatorProjection(*ellipsoid, origin, fe, fn, sf);
-   }
-   else if (proj_type.contains("Albers"))
-   {
-      origin.lat = decodeSexagesimalDms(record->csvRecord[A_FALSE_ORG_LAT]);
-      origin.lon = decodeSexagesimalDms(record->csvRecord[A_FALSE_ORG_LON]);
-      double p1 = decodeSexagesimalDms(record->csvRecord[A_STD_PARL_1_LAT]);
-      double p2 = decodeSexagesimalDms(record->csvRecord[A_STD_PARL_2_LAT]);
-      double fe = mtrs_per_unit*record->csvRecord[A_FALSE_ORG_EASTING].toDouble();
-      double fn = mtrs_per_unit*record->csvRecord[A_FALSE_ORG_NORTHING].toDouble();
-      record->proj = new ossimAlbersProjection(*ellipsoid, origin, p1, p2, fe, fn);
-   }
-   else if (proj_type.contains("Equidistant Cylindrical"))
-   {
-      origin.lat = decodeSexagesimalDms(record->csvRecord[A_STD_PARL_1_LAT]);
-      origin.lon = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LON]);
-      double fe = mtrs_per_unit*record->csvRecord[A_FALSE_EASTING].toDouble();
-      double fn = mtrs_per_unit*record->csvRecord[A_FALSE_NORTHING].toDouble();
-      record->proj = new ossimEquDistCylProjection(*ellipsoid, origin, fe, fn);
-   }
-   else if (proj_type.contains("New Zealand Map Grid"))
-   {
-      origin.lat = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LAT]);
-      origin.lon = decodeSexagesimalDms(record->csvRecord[A_NAT_ORG_LON]);
-      double fe = mtrs_per_unit*record->csvRecord[A_FALSE_EASTING].toDouble();
-      double fn = mtrs_per_unit*record->csvRecord[A_FALSE_NORTHING].toDouble();
-      ossimNewZealandMapGridProjection* nz_proj = new ossimNewZealandMapGridProjection;
-      nz_proj->setOrigin(origin);
-      nz_proj->setFalseEastingNorthing(fe, fn);
-      record->proj = nz_proj;
-   }
-   else 
-   {
-      // Can't handle it now. 
-      //ossimNotify(ossimNotifyLevel_FATAL)<<MODULE<<"EPSG:"<<record->csvRecord[A_CODE]<<" \""<<proj_type<<"\" "
-      //   "not presently supported. Returning NULL projection..."<<endl;
-      return 0;
-   }
-  
-   record->proj->setDatum(datum);
-   record->proj->setPcsCode(record->code);
-   
-   return record->proj.get();
-}
-
-//*************************************************************************************************
-// ### HACK ###
-//! State Plane projections as specified in the EPSG are indistinguishable from regular TM. 
-//! Unfortunately OSSIM does make a distinction. For the time being, parse the code and 
-//! programmatically arrive at the UTM projection.
-//*************************************************************************************************
-ossimMapProjection* 
-ossimEpsgProjectionDatabase::createProjFromFormatBRecord(ProjDbRecord* db_record) const
-{
-   // Unfortunately, as of this writing, there is a disconnect between the Geotrans projection
-   // parameters and those provided by EPSG database. In the meantime, to maintain functionality,
-   // we intercept the EPSG code and programmatically arrive at the projection versus pulling
-   // all the parameters out of the Db record->
-   ossimStatePlaneProjectionInfo  info(db_record->name,
-                                       db_record->code,
-                                       db_record->csvRecord[B_PROJ_TYPE],
-                                       db_record->csvRecord[B_PARAM1],
-                                       db_record->csvRecord[B_PARAM2],
-                                       db_record->csvRecord[B_PARAM3],
-                                       db_record->csvRecord[B_PARAM4],
-                                       db_record->csvRecord[B_FALSE_EASTING].toDouble(),
-                                       db_record->csvRecord[B_FALSE_NORTHING].toDouble(),
-                                       db_record->csvRecord[B_UNITS],
-                                       db_record->csvRecord[B_DATUM_CODE]);
-   
-   // NOTE: In order to avoid infinite recursion with this object, we initialized the PCS code in 
-   // info to NULL to insure that the projection is instantiated directly (not via this class):
-   ossimKeywordlist kwl;
-   info.populateProjectionKeywords(kwl);
-   kwl.remove(ossimKeywordNames::PCS_CODE_KW);
-   db_record->proj = 
-      PTR_CAST(ossimMapProjection, ossimMapProjectionFactory::instance()->createProjection(kwl));
-   if (db_record->proj.valid())
-   {
-      db_record->proj->setPcsCode(db_record->csvRecord[B_CODE].toUInt32());
-      db_record->datumValid = true;
-   }
-
-   return db_record->proj.get();
-}
-
-//*************************************************************************************************
-// ### HACK ###
-//! UTM projections as specified in the EPSG are indistinguishable from regular TM. Unfortunately
-//! OSSIM does make a distinction. For the time being, parse the code and programmatically arrive 
-//! at the UTM projection.
-//*************************************************************************************************
-ossimMapProjection* ossimEpsgProjectionDatabase::createProjFromUtmCode(ossim_uint32 code) const
-{
-   // This code originally found in deprecated ossimPcsCodeProjectionFactory authored by
-   // David Burken.
-   int type = code/100;
-   int zone = code%100;
-   ossimUtmProjection* proj = NULL;
-   switch (type)
-   {
-   case 322:
-      // utm, WGS72 (WGD), northern hemisphere
-      if ( (zone > 0 ) && (zone < 61) )
-      {
-         proj = new ossimUtmProjection(*(ossimDatumFactory::instance()->wgs72()->ellipsoid()));
-         proj->setDatum(ossimDatumFactory::instance()->wgs72());
-         proj->setZone(zone);
-         proj->setHemisphere('N');
-      }
-      break;
-
-   case 323:
-      // utm, WGS72 (WGD), southern hemisphere
-      if ( (zone > 0) && (zone < 61) )
-      {
-         proj = new ossimUtmProjection(*(ossimDatumFactory::instance()->wgs72()->ellipsoid()));
-         proj->setDatum(ossimDatumFactory::instance()->wgs72());
-         proj->setZone(zone);
-         proj->setHemisphere('S');
-      }
-      break;
-
-   case 326:
-      // utm, WGS84 (WGE), northern hemisphere
-      if ( (zone > 0) && (zone < 61) )
-      {
-         proj = new ossimUtmProjection(*(ossimDatumFactory::instance()->wgs84()->ellipsoid()));
-         proj->setDatum(ossimDatumFactory::instance()->wgs84());
-         proj->setZone(zone);
-         proj->setHemisphere('N');
-      }
-      break;
-
-   case 327:
-      // utm, WGS84 (WGE), southern hemisphere
-      if ( (zone > 0) && (zone < 61) )
-      {
-         proj = new ossimUtmProjection(*(ossimDatumFactory::instance()->wgs84()->ellipsoid()));
-         proj->setDatum(ossimDatumFactory::instance()->wgs84());
-         proj->setZone(zone);
-         proj->setHemisphere('S');
-      }
-      break;
-
-   case 267:
-      // utm, "NAS-C", northern hemisphere
-      // Only UTM NAD27 North zones 3 to 22 are in the 267xx range...
-      // 26729 through 26803 handled by state plane factory.
-      //---
-      if ( (code > 26702) && (code < 26723) )
-      {
-         proj = new ossimUtmProjection(*(ossimDatumFactory::instance()->
-            create(ossimString("NAS-C"))->ellipsoid()));
-         proj->setDatum(ossimDatumFactory::instance()->create(ossimString("NAS-C")));
-         proj->setZone(zone);
-         proj->setHemisphere('N');
-      }
-      break;
-
-   case 269:
-      // utm, "NAR-C", northern hemisphere
-      // Only UTM NAD83 North zones 3 to 23 are in the 269xx range...
-      // 26929 through 26998 handled by state plane factory.
-      if ( (code > 26902) && (code < 26924) )
-      {
-         proj = new ossimUtmProjection(*(ossimDatumFactory::instance()->
-            create(ossimString("NAR-C"))->ellipsoid()));
-         proj->setDatum(ossimDatumFactory::instance()->create(ossimString("NAR-C")));
-         proj->setZone(zone);
-         proj->setHemisphere('N');
-      }
-      break;
-
-   case 248:
-      // Provisional S. American 1956, 24818 through 24880
-      if ( (code > 24817) && (code < 24881) )
-      {
-         proj = new ossimUtmProjection(*(ossimDatumFactory::instance()->
-            create(ossimString("PRP-M"))->ellipsoid()));
-         proj->setDatum(ossimDatumFactory::instance()->create(ossimString("PRP-M")));
-         if (zone > 60)
-         {
-            proj->setZone(zone - 60);
-            proj->setHemisphere('S');
-         }
-         else
-         {
-            proj->setZone(zone);
-            proj->setHemisphere('N');
-         }
-      }
-      break;
-
-   } // End of switch on code.
-
-   if (proj)
-      proj->setPcsCode(code);
-
-   return proj;
-}
-
-//*************************************************************************************************
-//! Given UTM projection, derives the associated EPSG code. This is faster than a Db lookup.
-//*************************************************************************************************
-ossim_uint32 ossimEpsgProjectionDatabase::getCodeFromUtmProj(const ossimUtmProjection* proj) const
-{
-   if (proj == NULL)
-      return 0;
-
-   char hemisphere = proj->getHemisphere();
-   ossim_uint32 zone = proj->getZone();
-   ossimString datum_code = proj->getDatum()->code();
-   
-   if ((zone < 1 ) || (zone > 60))
-      return 0;
-
-   ossim_uint32 epsg_code = zone;
-   if ((hemisphere == 'N') && (datum_code == "WGD"))
-      epsg_code += 32200;
-   
-   else if ((hemisphere == 'S') && (datum_code == "WGD"))
-      epsg_code += 32300;
-
-   else if ((hemisphere == 'N') && (datum_code == "WGE"))
-      epsg_code += 32600;
-
-   else if ((hemisphere == 'S') && (datum_code == "WGE"))
-      epsg_code += 32700;
-
-   else if ((hemisphere == 'N') && (datum_code == "NAS-C") && (zone > 2) && (zone < 23))
-      epsg_code += 26700;
-
-   else if ((hemisphere == 'N') && (datum_code == "NAR-C") && (zone > 2) && (zone < 24))
-      epsg_code += 26900;
-
-   else if ((hemisphere == 'N') && (datum_code == "PRP-M"))
-      epsg_code += 24800;
-
-   else if ((hemisphere == 'S') && (datum_code == "PRP-M"))
-      epsg_code += 24800 + 60;
-   
-   else
-      epsg_code = 0;
-
-   return epsg_code;
-}
-
diff --git a/src/ossim/projection/ossimEpsgProjectionFactory.cpp b/src/ossim/projection/ossimEpsgProjectionFactory.cpp
deleted file mode 100644
index 7c1d2e8..0000000
--- a/src/ossim/projection/ossimEpsgProjectionFactory.cpp
+++ /dev/null
@@ -1,203 +0,0 @@
-//*************************************************************************************************
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Oscar Kramer
-//
-// DESCRIPTION:
-// Projection Factory for EPSG coded projections. These are projections
-// that are fully defined in database files and specified via a projection coordinate system (PCS)
-// code.
-//
-//*************************************************************************************************
-//  $Id: ossimEpsgProjectionFactory.cpp 19879 2011-07-30 16:21:50Z dburken $
-
-#include <ossim/projection/ossimEpsgProjectionFactory.h>
-#include <ossim/projection/ossimEquDistCylProjection.h>
-#include <ossim/projection/ossimOrthoGraphicProjection.h>
-#include <ossim/projection/ossimTransMercatorProjection.h>
-#include <ossim/projection/ossimUtmProjection.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <sstream>
-
-ossimEpsgProjectionFactory* ossimEpsgProjectionFactory::m_instance = 0;
-
-//*************************************************************************************************
-//! Implements singleton pattern
-//*************************************************************************************************
-ossimEpsgProjectionFactory* ossimEpsgProjectionFactory::instance()
-{
-   if(!m_instance)
-      m_instance = new ossimEpsgProjectionFactory;
-   return m_instance;
-}
-
-//*************************************************************************************************
-//! Constructor loads all SRS CSV files specified in the ossim prefs
-//*************************************************************************************************
-ossimEpsgProjectionFactory::ossimEpsgProjectionFactory()
-{
-   m_projDatabase = ossimEpsgProjectionDatabase::instance();
-}
-
-//*************************************************************************************************
-//! From keywordlist
-//*************************************************************************************************
-ossimProjection* ossimEpsgProjectionFactory::createProjection(const ossimKeywordlist &keywordList,
-                                                             const char *prefix) const
-{
-    ossimProjection* proj = 0;
-
-   // Look for a PCS (Projected Coordinate System) code entry and construct the basic projection.
-   // This is the bootstrap for creating the fully-initialized proj:
-   ossimString proj_spec = keywordList.find(prefix, ossimKeywordNames::PCS_CODE_KW);
-   if(!proj_spec.empty())
-      proj = createProjection(proj_spec);
-  
-   if (!proj)
-   {
-      // An alternate way of specifying an EPSG projection is by its database name:
-      proj_spec = keywordList.find(prefix, ossimKeywordNames::PROJECTION_KW);
-      proj = createProjection(proj_spec);
-   }
-
-   if (!proj)
-      return NULL;
-
-   // The tie points and perhaps other params might still be in the KWL, so pass the KWL on to the
-   // new projection after it has been amended with the default proj info extracted from the 
-   // EPSG code (i.e., sans tiepoints and gsd):
-   ossimKeywordlist proj_kwl;
-   proj->saveState(proj_kwl, prefix);
-   proj_kwl.remove(prefix, ossimKeywordNames::PIXEL_SCALE_XY_KW);
-   proj_kwl.remove(prefix, ossimKeywordNames::PIXEL_SCALE_UNITS_KW);
-   proj_kwl.remove(prefix, ossimKeywordNames::TIE_POINT_XY_KW);
-   proj_kwl.remove(prefix, ossimKeywordNames::TIE_POINT_UNITS_KW);
-   proj_kwl.addList(keywordList, false); // false: do not override existing items
-   proj->loadState(proj_kwl, prefix);
-   
-   return proj;
-}
-
-//*************************************************************************************************
-// This is the principal factory method. It accepts a string in one of three formats:
-//
-//   1. <group>:<code>, for example "EPSG:32615"
-//   2. <code>, for example "32615", this is the CRS code ID for the projerection.
-//   3. AUTO:<comma-separated spec>, for specifying custom user-defined codes.
-//
-// Both projected and geographic (Platte Carre) codes are handled.
-//
-// IMPORTANT NOTE: Image tie-points cannot be conveyed by an EPSG projection code. The projection
-// created here will not be fully initialized for use in rendering imagery.
-//*************************************************************************************************
-ossimProjection* ossimEpsgProjectionFactory::createProjection(const ossimString &spec) const
-{
-   std::vector<ossimString> split_line;
-   
-   // Intercept custom codes here before resorting to the database. This really shouldn't be in this
-   // class but nobody else is parsing for it, so leave it here for now.
-   if (ossimString(spec).downcase().contains("auto"))
-   {
-      split_line = spec.after(":").explode(",");
-      return createProjFromAutoCode(split_line);
-   }
-
-   // Strip commonly found or bar '|' from end if present.
-   ossimString s = spec;
-   s.trim(ossimString("|"));
-
-   // Otherwise, pass along the request to the database object for record search:
-   return m_projDatabase->findProjection(s);
-}
-
-//*************************************************************************************************
-//! When the CRS is specified with the "AUTO:<spec>" code format, this method is invoked to
-//! parse the <spec> and produce a projection (or NULL if spec invalid):
-//*************************************************************************************************
-ossimMapProjection* 
-ossimEpsgProjectionFactory::createProjFromAutoCode(const std::vector<ossimString>& spec) const
-{
-   if (spec.size() != 4)
-      return 0;
-
-   ossim_uint32 code = spec[0].toUInt32();
-   ossimGpt origin (spec[3].toDouble(), spec[2].toDouble()) ;
-
-   // Only a few AUTO codes are considered:
-   switch(code)
-   {
-      case 42001:
-      {
-         ossimUtmProjection* utm = new ossimUtmProjection;
-         utm->setZone(origin);
-         utm->setHemisphere(origin);
-         utm->setOrigin(origin);
-         utm->update();
-         utm->setPcsCode(42001);
-         return utm;
-      }
-      
-      case 42002:
-      {
-         ossimTransMercatorProjection* transMerc = new ossimTransMercatorProjection;
-         transMerc->setFalseNorthing(origin.latd()>=0.0?0.0:10000000.0);
-         transMerc->setOrigin(ossimGpt(0.0, origin.lond()));
-         transMerc->setScaleFactor(.9996);
-         transMerc->update();
-         transMerc->setPcsCode(42002);
-         return transMerc;
-      }
-      
-      case 42003:
-      {
-         ossimOrthoGraphicProjection* ortho = new ossimOrthoGraphicProjection;
-         ortho->setOrigin(origin);
-         ortho->update();
-         ortho->setPcsCode(42003);
-         return ortho;
-      }
-      
-      case 42004:
-      {
-         ossimEquDistCylProjection* geographic = new ossimEquDistCylProjection;
-         geographic->setOrigin(origin);
-         geographic->update();
-         geographic->setPcsCode(42004);
-         return geographic;
-      }
-   }
-   return 0;
-}
-
-//*************************************************************************************************
-ossimObject* ossimEpsgProjectionFactory::createObject(const ossimString& typeName)const
-{
-   return createProjection(typeName);
-}
-
-//*************************************************************************************************
-ossimObject* ossimEpsgProjectionFactory::createObject(const ossimKeywordlist& kwl,
-                                                     const char* prefix)const
-{
-   return createProjection(kwl, prefix);
-}
-
-//*************************************************************************************************
-//! STUB. Not implemented
-//*************************************************************************************************
-ossimProjection* ossimEpsgProjectionFactory::createProjection(const ossimFilename& /* filename */,
-                                                              ossim_uint32 /* entryIdx */)const
-{
-   return 0;
-}
-
-//*************************************************************************************************
-//! This returns the type name of all objects in all factories. This is the name used to 
-//! construct the objects dynamically and this name must be unique.
-//*************************************************************************************************
-void ossimEpsgProjectionFactory::getTypeNameList(std::vector<ossimString>& typeList) const
-{
-   m_projDatabase->getProjectionsList(typeList);
-   return;
-}
-
diff --git a/src/ossim/projection/ossimEquDistCylProjection.cpp b/src/ossim/projection/ossimEquDistCylProjection.cpp
deleted file mode 100644
index b3dd2bb..0000000
--- a/src/ossim/projection/ossimEquDistCylProjection.cpp
+++ /dev/null
@@ -1,672 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  See top LICENSE.txt file.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-// Calls Geotrans Equidistant Cylinder projection code.  
-//*******************************************************************
-//  $Id: ossimEquDistCylProjection.cpp 20542 2012-02-06 17:41:05Z dburken $
-
-#include <ossim/projection/ossimEquDistCylProjection.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/elevation/ossimElevManager.h>
-
-static ossimTrace traceDebug("ossimEquDistCylProjection:debug");
-
-RTTI_DEF1(ossimEquDistCylProjection,
-          "ossimEquDistCylProjection",
-	  ossimMapProjection);
-	  //          ossimLlxyProjection)
-   
-/***************************************************************************/
-/*
- *                               DEFINES
- */
-
-#ifndef PI_OVER_2
-#  define PI_OVER_2  ( M_PI / 2.0)
-#endif
-#ifndef TWO_PI
-#  define TWO_PI     (2.0 * M_PI)
-#endif
-#define ONE	   (1.0 * M_PI / 180.0)       /* 1 degree in radians*/
-
-#define EQCY_NO_ERROR           0x0000
-#define EQCY_LAT_ERROR          0x0001
-#define EQCY_LON_ERROR          0x0002
-#define EQCY_EASTING_ERROR      0x0004
-#define EQCY_NORTHING_ERROR     0x0008
-#define EQCY_ORIGIN_LAT_ERROR   0x0010
-#define EQCY_CENT_MER_ERROR     0x0020
-#define EQCY_A_ERROR            0x0040
-#define EQCY_B_ERROR            0x0080
-#define EQCY_A_LESS_B_ERROR     0x0100
-
-
-ossimEquDistCylProjection::ossimEquDistCylProjection(const ossimEllipsoid& ellipsoid,
-                                                     const ossimGpt& origin)
-//  :ossimLlxyProjection(ellipsoid, origin)
-  :ossimMapProjection(ellipsoid, origin)
-{
-   setDefaults();
-   update();
-}
-
-ossimEquDistCylProjection::ossimEquDistCylProjection(const ossimEllipsoid& ellipsoid,
-                                                     const ossimGpt& origin,
-                                                     double falseEasting,
-                                                     double falseNorthing)
-//  :ossimLlxyProjection(ellipsoid, origin)
-  :ossimMapProjection(ellipsoid, origin)
-{
-   Eqcy_False_Easting  = falseEasting;
-   Eqcy_False_Northing = falseNorthing;
-
-   Eqcy_Delta_Northing = 10007555.0;
-   Eqcy_Max_Easting    = 20015110.0;
-   Eqcy_Min_Easting    = -20015110.0;
-   
-   update();
-}
-
-void ossimEquDistCylProjection::update()
-{
-   Set_Equidistant_Cyl_Parameters(theEllipsoid.getA(),
-                                  theEllipsoid.getFlattening(),
-                                  theOrigin.latr(),
-                                  theOrigin.lonr(),
-                                  Eqcy_False_Easting,
-                                  Eqcy_False_Northing);
-
-   theFalseEastingNorthing.x = Eqcy_False_Easting;
-   theFalseEastingNorthing.y = Eqcy_False_Northing;
-
-   theMetersPerPixel.makeNan(); // force recompute by base class
-
-   ossimMapProjection::update();
-
-   // For geographic projection, the PCS EPSG code can be derived from the datum in most cases:
-   if ((thePcsCode == 0) && (theDatum != NULL))
-   {
-      ossim_uint32 datum_code = theDatum->epsgCode();
-      if ((datum_code >= 6000) && (datum_code < 7000))
-         thePcsCode = datum_code - 2000;
-   }
-}
-
-void ossimEquDistCylProjection::setFalseEasting(double falseEasting)
-{
-   Eqcy_False_Easting = falseEasting;
-   update();
-}
-
-void ossimEquDistCylProjection::setFalseNorthing(double falseNorthing)
-{
-   Eqcy_False_Northing = falseNorthing;
-   update();
-}
-
-void ossimEquDistCylProjection::setFalseEastingNorthing(double falseEasting,
-                                                        double falseNorthing)
-{
-   Eqcy_False_Easting  = falseEasting;
-   Eqcy_False_Northing = falseNorthing;
-   
-   update();
-}
-
-void ossimEquDistCylProjection::setDefaults()
-{
-   theProjectionUnits = OSSIM_DEGREES;
-   Eqcy_False_Easting  = 0.0;
-   Eqcy_False_Northing = 0.0;
-   Eqcy_Delta_Northing = 10007555.0;
-   Eqcy_Max_Easting    = 20015110.0;
-   Eqcy_Min_Easting    = -20015110.0;
-}
-
-void ossimEquDistCylProjection::lineSampleHeightToWorld(const ossimDpt &lineSample,
-                                                        const double&  hgtEllipsoid,
-                                                        ossimGpt&      gpt)const
-{
-   //
-   // make sure that the passed in lineSample is good and
-   // check to make sure our easting northing is good so
-   // we can compute the line sample.
-   //
-   //
-   if(lineSample.hasNans())
-   {
-      gpt.makeNan();
-      return;
-   }
-   if(theModelTransformUnitType != OSSIM_UNIT_UNKNOWN)
-   {
-      ossimMapProjection::lineSampleHeightToWorld(lineSample, hgtEllipsoid, gpt);
-      return;
-   }
-   else
-   {
-      if(theUlEastingNorthing.hasNans())
-      {
-         gpt.makeNan();
-         return;
-      }
-      ossimDpt eastingNorthing;
-      
-      eastingNorthing = (theUlEastingNorthing);
-      
-      eastingNorthing.x += (lineSample.x*theMetersPerPixel.x);
-      
-      //
-      // Note:  the Northing is positive up.  In image space
-      // the positive axis is down so we must multiply by
-      // -1
-      //
-      eastingNorthing.y += (-lineSample.y*theMetersPerPixel.y);
-      
-      //
-      // now invert the meters into a ground point.
-      //
-      gpt = inverse(eastingNorthing);
-      gpt.datum(theDatum);
-      
-      if(gpt.isLatNan() && gpt.isLonNan())
-      {
-         gpt.makeNan();
-      }
-      else
-      {
-         // Finally assign the specified height:
-         gpt.hgt = hgtEllipsoid;
-      }
-   }
-   if(theElevationLookupFlag)
-   {
-      gpt.hgt = ossimElevManager::instance()->getHeightAboveEllipsoid(gpt);
-   }
-}
-
-void ossimEquDistCylProjection::worldToLineSample(const ossimGpt &worldPoint,
-                                                  ossimDpt&       lineSample)const
-{
-   if(theModelTransformUnitType != OSSIM_UNIT_UNKNOWN)
-   {
-      ossimMapProjection::worldToLineSample(worldPoint, lineSample);
-      return;
-   }
-   
-   // make sure our tie point is good and world point is good.
-   if(theUlEastingNorthing.isNan() || worldPoint.isLatNan() || worldPoint.isLonNan())
-   {
-      lineSample.makeNan();
-      return;
-   }
-
-   // see if we have a datum set and if so shift the world to our datum.  If not then
-   // find the easting northing value for the world point.
-   ossimDpt gptEastingNorthing;
-   if(theDatum)
-   {
-      ossimGpt gpt = worldPoint;
-      gpt.changeDatum(theDatum);
-      gptEastingNorthing = forward(gpt);
-   }
-   else
-   {
-      gptEastingNorthing = forward(worldPoint);
-   }
-
-   // check the final result to make sure there were no problems.
-   if(!gptEastingNorthing.isNan())
-   {
-      lineSample.x = ((gptEastingNorthing.x  - theUlEastingNorthing.x)/theMetersPerPixel.x);
-
-      // We must remember that the Northing is negative since the positive
-      // axis for an image is assumed to go down since it's image space.
-      lineSample.y = (-(gptEastingNorthing.y - theUlEastingNorthing.y)/theMetersPerPixel.y);
-   }
-}
-
-void ossimEquDistCylProjection::worldToLineSample( const ossimGpt& worldPoint,
-                                                   const ossimIpt& imageSize,
-                                                   ossimDpt&       lineSample ) const
-{
-   if( theModelTransformUnitType == OSSIM_UNIT_UNKNOWN )
-   {
-      // Make sure our points are good.
-      if( !theUlEastingNorthing.isNan() && !worldPoint.isLatNan() && !worldPoint.isLonNan() &&
-          !imageSize.isNan() )
-      {
-         ossimGpt gpt = worldPoint;
-
-         //---
-         // See if we have a datum set and if so shift the world to our datum.  If not then
-         // find the easting northing value for the world point.
-         if(theDatum)
-         {
-            gpt.changeDatum(theDatum);
-         }
-
-         // Convert to easting northing.
-         ossimDpt gptEastingNorthing = forward(gpt);
-
-         if( !gptEastingNorthing.isNan() )
-         {
-            if ( imageSize.x > 0.0 )
-            {
-               ossimGpt edge(gpt.lat, -180.0, 0.0);
-               ossimDpt leftProjectionEdge = forward(edge);
-               
-               edge.lon = 180;
-               ossimDpt rightProjectionEdge = forward(edge);
-
-               // Right edge Easting of image from tie.
-               ossim_float64 leftImageX = theUlEastingNorthing.x  - (0.5*theMetersPerPixel.x);
-               ossim_float64 rightImageX = leftImageX + (imageSize.x * theMetersPerPixel.x);
-
-               if ( rightImageX < rightProjectionEdge.x ) // Image edge left of date line.
-               {
-                  // Image does not cross the date line.
-                  lineSample.x =
-                     (gptEastingNorthing.x - theUlEastingNorthing.x) / theMetersPerPixel.x;
-               }
-               else // Crossed date line:
-               {
-                  // Normalize the right image point to account for wrap:
-                  ossim_float64 normRightX =
-                     rightImageX - rightProjectionEdge.x + leftProjectionEdge.x;
-
-                  if ( ( gptEastingNorthing.x >= leftImageX ) &&
-                       ( gptEastingNorthing.x <= rightProjectionEdge.x ) )
-                  {
-                     // Between tie and date line.
-                     lineSample.x =
-                        (gptEastingNorthing.x - theUlEastingNorthing.x)/theMetersPerPixel.x;
-                  }
-                  else if ( ( gptEastingNorthing.x >= leftProjectionEdge.x ) &&
-                            ( gptEastingNorthing.x <=  normRightX ) )
-                  {
-                     // Between date line and right image point.
-                     lineSample.x = ( rightProjectionEdge.x - theUlEastingNorthing.x +
-                                     gptEastingNorthing.x - leftProjectionEdge.x )/theMetersPerPixel.x;
-                  }
-                  else
-                  {
-                     // Point in between normalized right x and tie:
-                     ossim_float64 deltaToLeft  = theUlEastingNorthing.x - gptEastingNorthing.x;
-                     ossim_float64 deltaToRight = gptEastingNorthing.x - normRightX;
-                     
-                     // Make relative to the closest edge.
-                     if ( deltaToRight < deltaToLeft )
-                     {
-                        lineSample.x = (imageSize.x - 1) + deltaToRight/theMetersPerPixel.x;
-                     }
-                     else
-                     {
-                        lineSample.x = -(deltaToLeft/theMetersPerPixel.x );
-                     }
-                  }  
-               }
-              
-            } // Matches: if ( ( imageSize.x > 0.0 ) && ( imageSize.y > 0.0 ) )
-            else
-            {
-               lineSample.x = (gptEastingNorthing.x - theUlEastingNorthing.x)/theMetersPerPixel.x;
-            }
-            
-            // We must remember that the Northing is negative since the positive
-            // axis for an image is assumed to go down since it's image space.
-            lineSample.y = (theUlEastingNorthing.y - gptEastingNorthing.y) / theMetersPerPixel.y;
-            
-         } // Matches: if( !lineSample.isNan() )
-         
-      }
-      else // Some point we need has nans...
-      {
-         lineSample.makeNan();
-      }
-      
-   } // Matches: if( theModelTransformUnitType == OSSIM_UNIT_UNKNOWN )
-   else 
-   {
-      // Has transform:
-      ossimMapProjection::worldToLineSample(worldPoint, lineSample);
-   }
-
-} // End: ossimEquDistCylProjection::worldToLineSample(worldPoint, lineSample, imageSize)
-
-ossimGpt ossimEquDistCylProjection::inverse(const ossimDpt &eastingNorthing)const
-{
-   double lat = 0.0;
-   double lon = 0.0;
-
-   Convert_Equidistant_Cyl_To_Geodetic(eastingNorthing.x,
-                                       eastingNorthing.y,
-                                       &lat,
-                                       &lon);
-
-   return ossimGpt(lat*DEG_PER_RAD, lon*DEG_PER_RAD, 0.0, theDatum);
-}
-
-ossimDpt ossimEquDistCylProjection::forward(const ossimGpt &latLon)const
-{
-   double easting  = 0.0;
-   double northing = 0.0;
-   ossimGpt gpt = latLon;
-   
-   if (theDatum)
-   {
-      if (theDatum->code() != latLon.datum()->code())
-      {
-         gpt.changeDatum(theDatum); // Shift to our datum.
-      }
-   }
-
-   Convert_Geodetic_To_Equidistant_Cyl(gpt.latr(),
-                                       gpt.lonr(),
-                                       &easting,
-                                       &northing);
-   
-   return ossimDpt(easting, northing);
-}
-
-
-
-bool ossimEquDistCylProjection::saveState(ossimKeywordlist& kwl, const char* prefix) const
-{
-   return ossimMapProjection::saveState(kwl, prefix);
-}
-
-bool ossimEquDistCylProjection::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimEquDistCylProjection::loadState: Input keyword list is \n" << kwl << endl;
-   }
-
-   //   ossimLlxyProjection::loadState(kwl, prefix);
-   ossimMapProjection::loadState(kwl, prefix);
-   theProjectionUnits = OSSIM_DEGREES;
-
-   // Make sure the origin.lat is defined since it is needed to relate degrees/meter:
-   if (ossim::isnan(theOrigin.lat))
-   {
-      theOrigin.lat = theUlGpt.lat;
-      if (ossim::isnan(theOrigin.lat))
-         theOrigin.lat = 0.0;
-   }
-
-   // Make sure degrees per pixel is defined:
-   if (theDegreesPerPixel.hasNans() && !theMetersPerPixel.hasNans())
-      computeDegreesPerPixel();
-
-   const char* type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
-
-   setDefaults();
-   // make sure we are of the same type.  If we are then the easting
-   // northing values will make since
-   //
-   if(ossimString(type) == STATIC_TYPE_NAME(ossimEquDistCylProjection))
-   {
-      Eqcy_False_Easting  = theFalseEastingNorthing.x;
-      Eqcy_False_Northing = theFalseEastingNorthing.y;
-   }
-   else
-   {
-      theUlEastingNorthing.makeNan();
-   }
-   // finalize the initialization.
-   update();
-            
-   return true;
-}
-
-/***************************************************************************/
-/*
- *                              FUNCTIONS
- */
-
-
-long ossimEquDistCylProjection::Set_Equidistant_Cyl_Parameters(double a,
-                                                               double f,
-                                                               double Std_Parallel,
-                                                               double Central_Meridian,
-                                                               double False_Easting,
-                                                               double False_Northing)
-{ /* Begin Set_Equidistant_Cyl_Parameters */
-/*
- * The function Set_Equidistant_Cyl_Parameters receives the ellipsoid parameters and
- * projection parameters as inputs, and sets the corresponding state
- * variables.  It also calculates the spherical radius of the sphere having 
- * the same area as the ellipsoid.  If any errors occur, the error code(s) 
- * are returned by the function, otherwise EQCY_NO_ERROR is returned.
- *
- *    a                 : Semi-major axis of ellipsoid, in meters   (input)
- *    f                 : Flattening of ellipsoid						        (input)
- *    Std_Parallel      : Latitude in radians at which the          (input)
- *                          point scale factor is 1.0
- *    Central_Meridian  : Longitude in radians at the center of     (input)
- *                          the projection
- *    False_Easting     : A coordinate value in meters assigned to the
- *                          central meridian of the projection.     (input)
- *    False_Northing    : A coordinate value in meters assigned to the
- *                          standard parallel of the projection     (input)
- */
-
-  double temp;
-//  double inv_f = 1 / f;
-  long Error_Code = EQCY_NO_ERROR;
-
-//   if (a <= 0.0)
-//   { /* Semi-major axis must be greater than zero */
-//     Error_Code |= EQCY_A_ERROR;
-//   }
-//   if ((inv_f < 250) || (inv_f > 350))
-//   { /* Inverse flattening must be between 250 and 350 */
-//     Error_Code |= EQCY_INV_F_ERROR;
-//   }
-//   if ((Std_Parallel < -PI_OVER_2) || (Std_Parallel > PI_OVER_2))
-//   { /* standard parallel out of range */
-//     Error_Code |= EQCY_STDP_ERROR;
-//   }
-//   if ((Central_Meridian < -PI) || (Central_Meridian > TWO_PI))
-//   { /* origin longitude out of range */
-//     Error_Code |= EQCY_CENT_MER_ERROR;
-//   }
-  if (!Error_Code)
-  { /* no errors */
-    Eqcy_a = a;
-    Eqcy_f = f;
-    es2 = 2 * Eqcy_f - Eqcy_f * Eqcy_f;
-    es4 = es2 * es2;
-    es6 = es4 * es2;
-    /* spherical radius */
-    Ra = Eqcy_a * (1.0 - es2 / 6.0 - 17.0 * es4 / 360.0 - 67.0 * es6 /3024.0);
-    Eqcy_Std_Parallel = Std_Parallel;
-    Cos_Eqcy_Std_Parallel = cos(Eqcy_Std_Parallel);
-    Ra_Cos_Eqcy_Std_Parallel = Ra * Cos_Eqcy_Std_Parallel;
-//    if (Central_Meridian > M_PI)
-//      Central_Meridian -= TWO_PI;
-    Eqcy_Origin_Long = Central_Meridian;
-    Eqcy_False_Easting = False_Easting;
-    Eqcy_False_Northing = False_Northing;
-    if (Eqcy_Origin_Long > 0)
-    {
-      Convert_Geodetic_To_Equidistant_Cyl(PI_OVER_2, Eqcy_Origin_Long - M_PI - ONE, &Eqcy_Max_Easting, &temp);
-      Convert_Geodetic_To_Equidistant_Cyl(PI_OVER_2, Eqcy_Origin_Long - M_PI, &Eqcy_Min_Easting, &temp);
-    }
-    else if (Eqcy_Origin_Long < 0)
-    {
-      Convert_Geodetic_To_Equidistant_Cyl(PI_OVER_2, Eqcy_Origin_Long + M_PI, &Eqcy_Max_Easting, &temp);
-      Convert_Geodetic_To_Equidistant_Cyl(PI_OVER_2, Eqcy_Origin_Long + M_PI + ONE, &Eqcy_Min_Easting, &temp);
-    }
-    else
-    {
-      Convert_Geodetic_To_Equidistant_Cyl(PI_OVER_2, M_PI, &Eqcy_Max_Easting, &temp);
-      Eqcy_Min_Easting = -Eqcy_Max_Easting;
-    }
-  } /* End if(!Error_Code) */
-  return (Error_Code);
-} /* End Set_Equidistant_Cyl_Parameters */
-
-
-void ossimEquDistCylProjection::Get_Equidistant_Cyl_Parameters(double *a,
-                                                               double *f,
-                                                               double *Std_Parallel,
-                                                               double *Central_Meridian,
-                                                               double *False_Easting,
-                                                               double *False_Northing)const
-{ /* Begin Get_Equidistant_Cyl_Parameters */
-/*
- * The function Get_Equidistant_Cyl_Parameters returns the current ellipsoid
- * parameters and Equidistant Cylindrical projection parameters.
- *
- *    a                 : Semi-major axis of ellipsoid, in meters   (output)
- *    f                 : Flattening of ellipsoid						        (output)
- *    Std_Parallel      : Latitude in radians at which the          (output)
- *                          point scale factor is 1.0
- *    Central_Meridian  : Longitude in radians at the center of     (output)
- *                          the projection
- *    False_Easting     : A coordinate value in meters assigned to the
- *                          central meridian of the projection.     (output)
- *    False_Northing    : A coordinate value in meters assigned to the
- *                          standard parallel of the projection     (output)
- */
-
-  *a = Eqcy_a;
-  *f = Eqcy_f;
-  *Std_Parallel = Eqcy_Std_Parallel;
-  *Central_Meridian = Eqcy_Origin_Long;
-  *False_Easting = Eqcy_False_Easting;
-  *False_Northing = Eqcy_False_Northing;
-  return;
-} /* End Get_Equidistant_Cyl_Parameters */
-
-
-long ossimEquDistCylProjection::Convert_Geodetic_To_Equidistant_Cyl (double Latitude,
-                                                                     double Longitude,
-                                                                     double *Easting,
-                                                                     double *Northing)const
-   
-{ /* Begin Convert_Geodetic_To_Equidistant_Cyl */
-/*
- * The function Convert_Geodetic_To_Equidistant_Cyl converts geodetic (latitude and
- * longitude) coordinates to Equidistant Cylindrical projection (easting and northing)
- * coordinates, according to the current ellipsoid, spherical radiius
- * and Equidistant Cylindrical projection parameters.
- * If any errors occur, the error code(s) are returned by the
- * function, otherwise EQCY_NO_ERROR is returned.
- *
- *    Latitude          : Latitude (phi) in radians           (input)
- *    Longitude         : Longitude (lambda) in radians       (input)
- *    Easting           : Easting (X) in meters               (output)
- *    Northing          : Northing (Y) in meters              (output)
- */
-
-  double dlam;     /* Longitude - Central Meridan */
-  long Error_Code = EQCY_NO_ERROR;
-
-//   if ((Latitude < -PI_OVER_2) || (Latitude > PI_OVER_2))
-//   {  /* Latitude out of range */
-//     Error_Code |= EQCY_LAT_ERROR;
-//   }
-//   if ((Longitude < -M_PI) || (Longitude > TWO_PI))
-//   {  /* Longitude out of range */
-//     Error_Code|= EQCY_LON_ERROR;
-//   }
-
-  if (!Error_Code)
-  { /* no errors */
-    dlam = Longitude - Eqcy_Origin_Long;
-    if (dlam >= TWO_PI)
-    {
-      dlam -= TWO_PI;
-    }
-    if (dlam <= -TWO_PI)
-    {
-      dlam += TWO_PI;
-    }
-
-    *Easting = Ra_Cos_Eqcy_Std_Parallel * dlam + Eqcy_False_Easting;
-    *Northing = Ra * Latitude + Eqcy_False_Northing;
-
-  }
-  return (Error_Code);
-
-} /* End Convert_Geodetic_To_Equidistant_Cyl */
-
-
-long ossimEquDistCylProjection::Convert_Equidistant_Cyl_To_Geodetic(double Easting,
-                                                                    double Northing,
-                                                                    double *Latitude,
-                                                                    double *Longitude)const
-{ /* Begin Convert_Equidistant_Cyl_To_Geodetic */
-/*
- * The function Convert_Equidistant_Cyl_To_Geodetic converts Equidistant Cylindrical projection
- * (easting and northing) coordinates to geodetic (latitude and longitude)
- * coordinates, according to the current ellipsoid, spherical radius
- * and Equidistant Cylindrical projection coordinates.
- * If any errors occur, the error code(s) are returned by the
- * function, otherwise EQCY_NO_ERROR is returned.
- *
- *    Easting           : Easting (X) in meters                  (input)
- *    Northing          : Northing (Y) in meters                 (input)
- *    Latitude          : Latitude (phi) in radians              (output)
- *    Longitude         : Longitude (lambda) in radians          (output)
- */
-
-  double dx, dy;
-  long Error_Code = EQCY_NO_ERROR;
-
-//   if ((Easting < (Eqcy_False_Easting + Eqcy_Min_Easting))
-//       || (Easting > (Eqcy_False_Easting + Eqcy_Max_Easting)))
-//   { /* Easting out of range */
-//     Error_Code |= EQCY_EASTING_ERROR;
-//   }
-//   if ((Northing < (Eqcy_False_Northing - Eqcy_Delta_Northing))
-//       || (Northing > (Eqcy_False_Northing + Eqcy_Delta_Northing)))
-//   { /* Northing out of range */
-//     Error_Code |= EQCY_NORTHING_ERROR;
-//   }
-
-  if (!Error_Code)
-  {
-    dy = Northing - Eqcy_False_Northing;
-    dx = Easting - Eqcy_False_Easting;
-    *Latitude = dy / Ra;
-
-    if (Ra_Cos_Eqcy_Std_Parallel == 0)
-      *Longitude = 0;
-    else
-      *Longitude = Eqcy_Origin_Long + dx / Ra_Cos_Eqcy_Std_Parallel;
-
-//     if (*Latitude > PI_OVER_2)  /* force distorted values to 90, -90 degrees */
-//       *Latitude = PI_OVER_2;
-//     else if (*Latitude < -PI_OVER_2)
-//       *Latitude = -PI_OVER_2;
-
-//    if (*Longitude > PI)
-//      *Longitude -= TWO_PI;
-//    if (*Longitude < -PI)
-//      *Longitude += TWO_PI;
-
-//    if (*Longitude > PI)  /* force distorted values to 180, -180 degrees */
-//      *Longitude = PI;
-//    else if (*Longitude < -PI)
-//      *Longitude = -PI;
-
-  }
-  return (Error_Code);
-
-} /* End Convert_Equidistant_Cyl_To_Geodetic */
diff --git a/src/ossim/projection/ossimFcsiModel.cpp b/src/ossim/projection/ossimFcsiModel.cpp
deleted file mode 100644
index 7817135..0000000
--- a/src/ossim/projection/ossimFcsiModel.cpp
+++ /dev/null
@@ -1,1064 +0,0 @@
-//*****************************************************************************
-// FILE: ossimFcsiModel.cc
-//
-// Copyright (C) 2001 ImageLinks, Inc.
-//
-// LGPL
-//
-// AUTHOR: Oscar Kramer (okramer at imagelinks.com)
-//
-// DESCRIPTION: Contains sensor model implementation for "Frame Camera Scanned
-//   Image" (FCSI, pronounced "foxy"). 
-//   
-//   This model represents image data that was scanned from film exposed by a
-//   conventional aerial frame camera. The data members defined in this class
-//   represent the fundamental quantities needed for the transformation.
-//   Typically, a different set of parameters will be provided in the metadata.
-//   An interface (support data) class will need to be implemented to convert
-//   a particular system's format to the quantities needed by this model.
-// 
-//   Coordinate systems in use are described here:
-//
-//   Pixel    -- line/sample in the digital image. The origin of this system is
-//               the upper left corner of the image, and represents a LEFT-
-//               HANDED coordinate system with Y (line) positive down and X
-//               (sample) positive to the right.
-//
-//   Film     -- x, y related to pixel space by affine transform (which includes
-//               mirror reflection due to left-handed system above) represented
-//               by thePrincipalPoint and the theScanXformMatrix. The latter
-//               contains scale, skew, and rotation/reflection. The film
-//               coordinates are adjusted for radial and decentering distortion.
-//
-//   Camera/  -- 3D system containing film plane and optical (Z) axis. Given the
-//   Platform    focal length (Z) and the film point (X,Y), a 3D ray direction
-//               is established in this space. This space is also termed "LSR"
-//               in the code. If there is a rotation between the film/optical
-//               axes and the platform (interior orientation), then that
-//               transformation must be included as part of the LSR-to-ECF
-//               rotation by the metadata reader object.
-//
-//   ECF      -- Universal earth frame of reference. The imaging ray direction
-//               is transformed from Camera space to ECF by theAdjLsrToEcfRot.
-//
-//   There are two rotations to go from Camera to ECF. First is the initial
-//   camera orientation as derived from the metadata, combining the interior
-//   orientation (relation between camera and platform) and the exterior
-//   orientation dependent on the platform attitude w.r.t. the ECF system.
-//   The second rotation is a differential rotation due to the attitude
-//   adjustable params. These are arbitrarily taken as rotations about the ECF
-//   XYZ axes, not the platform attitude axes of roll/pitch/yaw. The
-//   combined rotation is stored in theAdjLsrToEcfRot, which is precomputed
-//   in updateModel() once with each adjustment.
-//
-//   When the time comes to incorporate least-squares parameter adjustment, care
-//   must be taken to propagate the a priori sigmas for position and attitude
-//   (including both internal and external orientation angles) into the ECF
-//   coordinates. This also applies to the affine transform parameters used in
-//   transforming pixels to film coordinates. The propagated uncertainties can
-//   then be used to assign the adjustable parameter sigmas array (and
-//   covariance when we get to that...)
-//
-// SOFTWARE HISTORY:
-//   16JAN2003  Oscar Kramer, ImageLinks
-//              Initial coding
-//
-//*****************************************************************************
-// $Id: ossimFcsiModel.cpp 13005 2008-06-08 20:26:36Z dburken $
-
-#include <cstdlib>
-#include <fstream>
-#include <sstream>
-
-#include <ossim/projection/ossimFcsiModel.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimEcefRay.h>
-
-RTTI_DEF1(ossimFcsiModel, "ossimFcsiModel", ossimSensorModel);
-
-//***
-// Define Trace flags for use within this file:
-//***
-#include <ossim/base/ossimTrace.h>
-static ossimTrace traceExec  ("ossimFcsiModel:exec");
-static ossimTrace traceDebug ("ossimFcsiModel:debug");
-
-//***
-// File-scope constants:
-//***
-static const int MODEL_VERSION_NUMBER  = 1;
-static const ossimString PARAM_NAMES[] ={"x_pos_offset",
-                                         "y_pos_offset",
-                                         "z_pos_offset",
-                                         "x_rot_corr",
-                                         "y_rot_corr",
-                                         "z_rot_corr",
-                                         "foc_len_offset",
-                                         "scan_skew_corr"};
-static const ossimString PARAM_UNITS[] ={"meters",
-                                         "meters",
-                                         "meters",
-                                         "degrees",
-                                         "degress",
-                                         "degress",
-                                         "millimeters",
-                                         "degrees"};
-
-//***
-// Public FCSI Keywords:
-//***
-const char* ossimFcsiModel::PRINCIPAL_POINT_X_KW   = "principal_point_x";
-const char* ossimFcsiModel::PRINCIPAL_POINT_Y_KW   = "principal_point_y";
-const char* ossimFcsiModel::SCAN_SCALE_MATRIX_00_KW = "scan_scale_matrix_00";
-const char* ossimFcsiModel::SCAN_SCALE_MATRIX_01_KW = "scan_scale_matrix_01";
-const char* ossimFcsiModel::SCAN_SCALE_MATRIX_10_KW = "scan_scale_matrix_10";
-const char* ossimFcsiModel::SCAN_SCALE_MATRIX_11_KW = "scan_scale_matrix_11";
-const char* ossimFcsiModel::SCAN_ROTATION_ANGLE_KW = "scan_rotation_angle";
-const char* ossimFcsiModel::SCAN_SKEW_ANGLE_KW     = "scan_skew_angle";
-const char* ossimFcsiModel::FOCAL_LENGTH_KW        = "focal_length";
-const char* ossimFcsiModel::PLATFORM_POSITION_X_KW = "platform_position_x";
-const char* ossimFcsiModel::PLATFORM_POSITION_Y_KW = "platform_position_y";
-const char* ossimFcsiModel::PLATFORM_POSITION_Z_KW = "platform_position_z";
-const char* ossimFcsiModel::CAMERA_ORIENTATION_MATRIX_ELEM_KW
-                               = "camera_orientation_matrix_elem_";
-
-//*****************************************************************************
-//  DEFAULT CONSTRUCTOR: ossimFcsiModel()
-//
-//  Note: Using this constructor results in an uninitialized model. It is
-//  expected that either a loadState with valid keywordlist is called, or that
-//  the individual set-methods (including the base-class' set methods are
-//  called. When set-methods are used, a final call to completeInitialization()
-//  (declared in ossimSensorModel) is required to give the model a chance to
-//  "digest" the values previously set.
-//  
-//*****************************************************************************
-ossimFcsiModel::ossimFcsiModel()
-   :
-   ossimSensorModel       (),
-   thePrincipalPoint      (0, 0),
-   theScanSkew            (0.0),  
-   theScanRotation        (0.0),
-   theOpticalDistortion   (0),
-   theLsrToEcfRot         (3, 3),
-   theEcfOffset           (0, 0, 0),
-   theXrotCorr            (0.0),
-   theYrotCorr            (0.0),
-   theZrotCorr            (0.0),
-   theFocalOffset         (0.0),
-   theScanSkewCorr        (0.0),
-   theAdjLsrToEcfRot      (3, 3),
-   theAdjEcfToLsrRot      (3, 3)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::ossimFcsiModel: entering..." << std::endl;
-   theScanScaleMatrix[0] = 1.0;
-   theScanScaleMatrix[1] = 0.0;
-   theScanScaleMatrix[2] = 0.0;
-   theScanScaleMatrix[3] = 1.0;
-   theScanXformMatrix[0] = 1.0;
-   theScanXformMatrix[1] = 0.0;
-   theScanXformMatrix[2] = 0.0;
-   theScanXformMatrix[3] = 1.0;
-   initAdjustableParameters();
-   setErrorStatus(); // indicate uninitialized
-   
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::ossimFcsiModel: returning..." << std::endl;
-}
-
-//*****************************************************************************
-//  CONSTRUCTOR: ossimFcsiModel(filename)
-//  
-//  Constructs model from a keywordlist filename
-//  
-//*****************************************************************************
-ossimFcsiModel::ossimFcsiModel(const ossimFilename& init_file)
-   :
-   ossimSensorModel       (),
-   thePrincipalPoint      (0, 0),
-   theScanSkew            (0.0),  
-   theScanRotation        (0.0),
-   theOpticalDistortion   (0),
-   theLsrToEcfRot         (3, 3),
-   theEcfOffset           (0, 0, 0),
-   theXrotCorr            (0.0),
-   theYrotCorr            (0.0),
-   theZrotCorr            (0.0),
-   theFocalOffset         (0.0),
-   theScanSkewCorr        (0.0),
-   theAdjLsrToEcfRot      (3, 3),
-   theAdjEcfToLsrRot      (3, 3)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::ossimFcsiModel: entering..." << std::endl;
-
-   initAdjustableParameters();
-   ossimKeywordlist kwl (init_file);
-   loadState(kwl);
-
-   if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::ossimFcsiModel: Exited..." << std::endl;
-}
-
-//*****************************************************************************
-//  CONSTRUCTOR: ossimFcsiModel(kwl)
-//  
-//  Constructs model from keywordlist geometry file
-//  
-//*****************************************************************************
-ossimFcsiModel::ossimFcsiModel(const ossimKeywordlist& geom_kwl)
-   :
-   ossimSensorModel       (),
-   thePrincipalPoint      (0, 0),
-   theScanSkew            (0.0),  
-   theScanRotation        (0.0),
-   theOpticalDistortion   (0),
-   theLsrToEcfRot         (3, 3),
-   theEcfOffset           (0, 0, 0),
-   theXrotCorr            (0.0),
-   theYrotCorr            (0.0),
-   theZrotCorr            (0.0),
-   theFocalOffset         (0.0),
-   theScanSkewCorr        (0.0),
-   theAdjLsrToEcfRot      (3, 3),
-   theAdjEcfToLsrRot      (3, 3)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::ossimFcsiModel: entering..." << std::endl;
-
-   initAdjustableParameters();
-   loadState(geom_kwl);
-
-   if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::ossimFcsiModel: Exited..." << std::endl;
-}
-
-//*****************************************************************************
-//  COPY CONSTRUCTOR: 
-//*****************************************************************************
-ossimFcsiModel::ossimFcsiModel(const ossimFcsiModel& foxy)
-   :
-   ossimSensorModel     (foxy),
-   thePrincipalPoint    (foxy.thePrincipalPoint),
-   theScanSkew          (foxy.theScanSkew),  
-   theScanRotation      (foxy.theScanRotation),
-   theFocalLen          (foxy.theFocalLen),
-   thePlatformPos       (foxy.thePlatformPos),
-   theLsrToEcfRot       (foxy.theLsrToEcfRot),
-   theEcfOffset         (foxy.theEcfOffset),
-   theXrotCorr          (foxy.theXrotCorr),
-   theYrotCorr          (foxy.theYrotCorr),
-   theZrotCorr          (foxy.theZrotCorr),
-   theFocalOffset       (foxy.theFocalOffset),
-   theScanSkewCorr      (foxy.theScanSkewCorr)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::ossimFcsiModel: entering..." << std::endl;
-
-   if(foxy.theOpticalDistortion)
-   {
-      //
-      // Finish the copy:
-      //
-      theOpticalDistortion =
-         new ossimRadialDecentLensDistortion (*(foxy.theOpticalDistortion));
-   }
-
-   for (int i=0; i<4; i++)
-      theScanScaleMatrix[i] = foxy.theScanScaleMatrix[i];
-
-   //***
-   // Compute quantities derived from adjustables:
-   //***
-   updateModel();
-   
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::ossimFcsiModel: returning..." << std::endl;
-}
-
-//*****************************************************************************
-//  METHOD: ossimFcsiModel::lineSampleHeightToWorld()
-//  
-//  Performs the line/sample to groundpoint projection given an elevation.
-//
-//  1. Compute ECF Imaging ray (see imagingRay() method below)
-//  5. Intersect imaging ray with elevation surface.
-//
-//*****************************************************************************
-void ossimFcsiModel::lineSampleHeightToWorld(const ossimDpt& image_point,
-                                             const double&   height,
-                                             ossimGpt&       gpt) const
-{
-   bool debug = false;  // setable via interactive debugger
-   if (traceExec() || debug)  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::ossimFcsiModel: entering..." << std::endl;
-   
-   //***
-   // Extrapolate if point is outside image:
-   //***
-   if (!insideImage(image_point))
-   {
-      gpt = extrapolate(image_point, height);
-   }
-
-   else
-   {
-      //***
-      // First establish imaging ray from image point:
-      //***
-      ossimEcefRay imaging_ray;
-      imagingRay(image_point, imaging_ray);
-      ossimEcefPoint Pecf (imaging_ray.intersectAboveEarthEllipsoid(height));
-      gpt = ossimGpt(Pecf);
-
-      if (traceDebug() || debug)
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << "Pecf = " << Pecf << std::endl;
-         ossimNotify(ossimNotifyLevel_DEBUG) << "gpt = " << gpt << std::endl;
-      }
-   }
-
-   if (traceExec() || debug)  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::ossimFcsiModel: returning..." << std::endl;
-}
-   
-   
-//*****************************************************************************
-//  METHOD: ossimFcsiModel::imagingRay()
-//
-//  Establishes an origin (at the platform position) and direction of the
-//  imaging ray as follows:
-//
-//  1. Remove any pixel offset into the image (in the case where the digital
-//     image is a sub-image of a larger scan).
-//  2. Transform pixel coordinates to film point (with inherent lens distortion)
-//  3. Remove radial and decentering lens distortion to arrive at ideal film
-//     coordinates.
-//  4. Establish an internal imaging ray direction vector given the focal length
-//  5. Transform ray direction vector to ECF coordinates and assign origin.
-//
-//*****************************************************************************
-void ossimFcsiModel::imagingRay(const ossimDpt& image_point,
-                                ossimEcefRay&   image_ray) const
-{
-   bool debug = false;  // setable via interactive debugger: "set debug = true"
-   if (traceExec() || debug)  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::imagingRay: entering..." << std::endl;
-   
-   //***
-   // In case this is a sub-image of a full image scan, need to add the
-   // sub-image offset maintained in the base-class:
-   //***
-   ossimDpt p0 (image_point + theSubImageOffset);
-
-   if (traceDebug() || debug)
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "image_point = " << image_point << std::endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "theSubImageOffset = " << theSubImageOffset << std::endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "p0 = " << p0 << std::endl;
-   }
-   
-   //***
-   // Apply pixel to film coordinates affine transform:
-   //***
-   ossimDpt p1 (p0 - theRefImgPt);
-   ossimDpt f1 (theScanXformMatrix[0]*p1.x + theScanXformMatrix[1]*p1.y,
-                theScanXformMatrix[2]*p1.x + theScanXformMatrix[3]*p1.y);
-   ossimDpt film (f1 - thePrincipalPoint);
-   if (traceDebug() || debug)
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "theRefImgPt = " << theRefImgPt << std::endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "p1 = " << p1 << std::endl;
-      for (int i=0; i<4; i++)
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << "theScanXformMatrix["<<i<<"] = "<<theScanXformMatrix[i] << std::endl;
-      }
-      ossimNotify(ossimNotifyLevel_DEBUG) << "f1 = " << f1 << std::endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "thePrincipalPoint = " << thePrincipalPoint << std::endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "film (distorted) = " << film << std::endl;
-   }
-
-   //***
-   // Correct film point for optical (radial, decentering) distortion:
-   //***
-   if (theOpticalDistortion)
-      theOpticalDistortion->inverse(film);
-   if (traceDebug() || debug)
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "film (undistorted) = " << film << std::endl;
-      if(theOpticalDistortion)
-      {
-         theOpticalDistortion->print(ossimNotify(ossimNotifyLevel_DEBUG));
-      }
-   }
-   
-   //***
-   // Establish image ray in  camera-space (LSR) coordinates, then rotate to the
-   // ECF. This rotation contains interior orientation, exterior orientation,
-   // and attitude correction:
-   //***
-   ossimColumnVector3d cam_ray_dir (film.x, film.y, -theAdjFocalLen);
-   ossimEcefVector ecf_ray_dir (theAdjLsrToEcfRot*cam_ray_dir);
-   ecf_ray_dir = ecf_ray_dir*(1.0/ecf_ray_dir.magnitude());
-   if (traceDebug() || debug)
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "theAdjFocalLen = " << theAdjFocalLen << std::endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "cam_ray_dir = " << cam_ray_dir << std::endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "theAdjLsrToEcfRot = \n" << theAdjLsrToEcfRot << std::endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ecf_ray_dir = " << ecf_ray_dir << std::endl;
-   }
-   
-   //***
-   // Establish ECF Ray object to represent imaging ray:
-   //***
-   image_ray.setOrigin(theAdjPlatformPos);
-   image_ray.setDirection(ecf_ray_dir);
-   if (traceDebug() || debug)
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "theAdjPlatformPos = " << theAdjPlatformPos << std::endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "theAdjPlatformPos (ossimGpt): " << ossimGpt(theAdjPlatformPos)
-                                          << std::endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "image_ray = " << image_ray << std::endl;
-   }
-
-   if (traceExec() || debug)  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::imagingRay: returning..." << std::endl;
-}
-
-//*****************************************************************************
-//  METHOD ossimFcsiModel::worldToLineSample()
-//
-//  Rigorous inverse transform overrides base-class iterative solution. It
-//  implements the exact reverse transform as imagingRay() above.
-//  
-//*****************************************************************************
-void ossimFcsiModel::worldToLineSample(const ossimGpt& world_point,
-                                       ossimDpt&       image_point) const
-{
-   bool debug = false;  // setable via interactive debugger: "set debug = true"
-   if (traceExec() || debug)  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::imagingRay: entering..." << std::endl;
-
-   //***
-   // Establish ECF ray from platform to ground point and rotate to platform LSR
-   //***
-   ossimEcefPoint g_ecf (world_point);
-   ossimEcefVector ecf_ray_dir (g_ecf - theAdjPlatformPos);
-   ossimColumnVector3d cam_ray_dir (theAdjEcfToLsrRot*ecf_ray_dir.data());
-
-   if (traceDebug() || debug)
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)<<"world_point = " << world_point << endl;
-      ossimNotify(ossimNotifyLevel_DEBUG)<<"g_ecf = " << g_ecf << endl;
-      ossimNotify(ossimNotifyLevel_DEBUG)<<"theAdjPlatformPos = " << theAdjPlatformPos << endl;
-      ossimNotify(ossimNotifyLevel_DEBUG)<<"theAdjPlatformPos (ossimGpt): "<<ossimGpt(theAdjPlatformPos)<<endl;
-      ossimNotify(ossimNotifyLevel_DEBUG)<<"ecf_ray_dir = " << ecf_ray_dir.unitVector() << endl;
-      ossimNotify(ossimNotifyLevel_DEBUG)<<"theAdjEcfToLsrRot = \n" << theAdjEcfToLsrRot << endl;
-      ossimNotify(ossimNotifyLevel_DEBUG)<<"cam_ray_dir = " << cam_ray_dir << endl;
-   }
-      
-   //***
-   // Scale the direction vector by the focal length to arrive at  film
-   // coordinates:
-   //***
-   double scale = -theAdjFocalLen/cam_ray_dir[2];
-   ossimDpt film (scale*cam_ray_dir[0], scale*cam_ray_dir[1]);
-
-   if (traceDebug() || debug)
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "theAdjFocalLen = " << theAdjFocalLen << endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "scale = " << scale << endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "film (undistorted) = " << film << endl;
-   }
-      
-   //***
-   // Add distortion:
-   //***
-   if (theOpticalDistortion)
-      theOpticalDistortion->forward(film);
-   
-   if (traceDebug() || debug)
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "film (distorted) = " << film << endl;
-   }
-      
-   //***
-   // Apply film to pixel coordinates affine transform:
-   //***
-   ossimDpt f1(film + thePrincipalPoint);
-   ossimDpt p1(theInvScanXformMatrix[0]*f1.x+theInvScanXformMatrix[1]*f1.y,
-               theInvScanXformMatrix[2]*f1.x+theInvScanXformMatrix[3]*f1.y);
-   ossimDpt p0 (p1 + theRefImgPt);
-
-   if (traceDebug() || debug)
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "thePrincipalPoint = " << thePrincipalPoint << endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "f1 = " << f1 << endl;
-      for (int i=0; i<4; i++)
-         ossimNotify(ossimNotifyLevel_DEBUG)<<"theInvScanXformMatrix["<<i<<"] = "<<theInvScanXformMatrix[i]
-             <<endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "p1 = " << p1 << endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "theRefImgPt = " << theRefImgPt << endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "p0 = " << p0 << endl;
-   }
-      
-   //***
-   // Finally, apply the sub-image offset to get to digital image coordinates:
-   //***
-   image_point = p0 - theSubImageOffset;
-   
-   if (traceDebug() || debug)
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "theImageOffset = " << theSubImageOffset << endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "image_point = " << image_point << endl;
-   }
-   
-   if (traceExec() || debug)  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::imagingRay: returning..." << std::endl;
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimFcsiModel::print()
-//  
-//  Formatted dump of data members.
-//  
-//*****************************************************************************
-std::ostream& ossimFcsiModel::print(std::ostream& out) const
-{
-   out << "\nDump of ossimFcsiModel object at " << hex << this << ":\n"
-       << "\nossimFcsiModel data members: "
-       << "\n        thePrincipalPoint: " << thePrincipalPoint
-       << "\n        theScanScaleMatrix: " << theScanScaleMatrix[0] << "  "
-       << theScanScaleMatrix[1]
-       << "\n                            " << theScanScaleMatrix[2] << "  "
-       << theScanScaleMatrix[3]
-       << "\n          theScanSkew: " << theScanSkew
-       << "\n      theScanRotation: " << theScanRotation;
-
-   for (int i=0; i<4; ++i)
-   {
-      out << "\ntheScanXformMatrix["<<i<<"]: " << theScanXformMatrix[i];
-   }
-
-   out << "\n          theFocalLen: " << theFocalLen
-       << "\n       thePlatformPos: " << thePlatformPos
-       << "\n       theLsrToEcfRot: \n"  << theLsrToEcfRot
-       << "\n    theAdjLsrToEcfRot: \n" << theAdjLsrToEcfRot
-       << "\n         theEcfOffset: " << theEcfOffset
-       << "\n          theXrotCorr: " << theXrotCorr
-       << "\n          theYrotCorr: " << theYrotCorr
-       << "\n          theZrotCorr: " << theZrotCorr
-       << "\n       theFocalOffset: " << theFocalOffset
-       << "\n      theScanSkewCorr: " << theScanSkewCorr
-       << endl;
-   
-   if (theOpticalDistortion)
-   {
-      out << *theOpticalDistortion << endl;
-   }
-
-   return ossimSensorModel::print(out);
-}
-
-//*****************************************************************************
-//  METHOD: ossimFcsiModel::saveState()
-//  
-//  Saves the model state to the KWL. This KWL also serves as a geometry file.
-//  
-//*****************************************************************************
-bool ossimFcsiModel::saveState(ossimKeywordlist& kwl,
-                              const char* prefix) const
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::saveState: entering..." << std::endl;
-
-   kwl.add(prefix, ossimKeywordNames::TYPE_KW, "ossimFcsiModel");
-
-   //***
-   // Hand off to base class for common stuff:
-   //***
-   ossimSensorModel::saveState(kwl, prefix);
-
-   //***
-   // Save off data members:
-   //***
-   kwl.add(prefix, PRINCIPAL_POINT_X_KW,    thePrincipalPoint.x);
-   kwl.add(prefix, PRINCIPAL_POINT_Y_KW,    thePrincipalPoint.y);
-   kwl.add(prefix, SCAN_SCALE_MATRIX_00_KW, theScanScaleMatrix[0]);
-   kwl.add(prefix, SCAN_SCALE_MATRIX_01_KW, theScanScaleMatrix[1]);
-   kwl.add(prefix, SCAN_SCALE_MATRIX_10_KW, theScanScaleMatrix[2]);
-   kwl.add(prefix, SCAN_SCALE_MATRIX_11_KW, theScanScaleMatrix[3]);
-   kwl.add(prefix, SCAN_SKEW_ANGLE_KW,      theScanSkew);
-   kwl.add(prefix, SCAN_ROTATION_ANGLE_KW,  theScanRotation);
-   kwl.add(prefix, FOCAL_LENGTH_KW,         theFocalLen);
-   kwl.add(prefix, PLATFORM_POSITION_X_KW,
-           thePlatformPos.x());
-   kwl.add(prefix, PLATFORM_POSITION_Y_KW,
-           thePlatformPos.y());
-   kwl.add(prefix, PLATFORM_POSITION_Z_KW,
-           thePlatformPos.z());
-
-   //***
-   // Camera orientation matrix:
-   // i is row and j is column
-   //***
-   for (int i=0; i<3; i++)
-   {
-      for (int j=0; j<3; j++)
-      {
-         ostringstream ostr;
-         ostr << CAMERA_ORIENTATION_MATRIX_ELEM_KW
-              << i << "_" << j << ends;
-         kwl.add(prefix, ostr.str().c_str(), theLsrToEcfRot[i][j]);
-      }
-   }
-   
-   //***
-   // Optical distortion coefficients:
-   //***
-   if (theOpticalDistortion)
-   {
-      ostringstream ostr;
-      ostr << prefix << "distortion." << ends;
-      theOpticalDistortion->saveState(kwl, ostr.str().c_str());
-   }
-   
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::saveState: returning..." << std::endl;
-   return true;
-}
-
-//*****************************************************************************
-//  METHOD: ossimFcsiModel::loadState()
-//  
-//  Restores the model's state from the KWL. This KWL also serves as a
-//  geometry file.
-//  
-//*****************************************************************************
-bool ossimFcsiModel::loadState(const ossimKeywordlist& kwl,
-                               const char* prefix) 
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::loadState: entering..." << std::endl;
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:"
-                                          << "\nInput kwl:  " << kwl
-                                          << std::endl;
-   }
-
-   const char* value;
-   const char* keyword;
-   bool success;
-
-   //***
-   // Assure this keywordlist contains correct type info:
-   //***
-   keyword = ossimKeywordNames::TYPE_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "Type name not found");
-      return false;
-      
-   }
-   if (strcmp(value, TYPE_NAME(this)))
-   {
-      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::saveState: returning..." << std::endl;
-      return false;
-   }
-      
-   //***
-   // Clear out any existing adjustable params:
-   //***
-   
-   //***
-   // Pass on to the base-class for parsing first:
-   //***
-   success = ossimSensorModel::loadState(kwl, prefix);
-   if (!success)
-   {
-      return false;
-   }
-   if(!getNumberOfAdjustableParameters())
-   {
-      initAdjustableParameters();
-   }
-
-   //***
-   // Now begin loading data members:
-   //***
-   keyword = PRINCIPAL_POINT_X_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "principle point x not given");
-      return false;
-   }
-   thePrincipalPoint.x = atof(value);
- 
-   keyword = PRINCIPAL_POINT_Y_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "principle point y not given");
-      return false;
-   }
-      
-   thePrincipalPoint.y = atof(value);
- 
-   keyword = SCAN_SCALE_MATRIX_00_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "scale matrix 0,0 not given");
-      return false;
-   }
-   theScanScaleMatrix[0] = atof(value);
- 
-   keyword = SCAN_SCALE_MATRIX_01_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "scale matrix 0,1 not given");
-      return false;
-   }
-   theScanScaleMatrix[1] = atof(value);
- 
-   keyword = SCAN_SCALE_MATRIX_10_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "scale matrix 1,0 not given");
-      return false;
-   }
-   theScanScaleMatrix[2] = atof(value);
- 
-   keyword = SCAN_SCALE_MATRIX_11_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "scale matrix 1,1 not given");
-      return false;
-   }
-   theScanScaleMatrix[3] = atof(value);
- 
-   keyword = SCAN_SKEW_ANGLE_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-      theScanSkew = 0.0;
-   else
-      theScanSkew = atof(value);
-
-   keyword = SCAN_ROTATION_ANGLE_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-      theScanRotation = 0.0;
-   else
-      theScanRotation = atof(value);
- 
-   keyword = FOCAL_LENGTH_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "Focal length not given");
-      return false;
-   }
-   theFocalLen = atof(value);
- 
-   keyword = PLATFORM_POSITION_X_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "Platform position X not given");
-      return false;
-   }
-   thePlatformPos.x() = atof(value);
- 
-   keyword = PLATFORM_POSITION_Y_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "Platform position Y not given");
-   }
-   thePlatformPos.y() = atof(value);
- 
-   keyword = PLATFORM_POSITION_Z_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimSetError(getClassName(),
-                    ossimErrorCodes::OSSIM_ERROR,
-                    "Platform position Z not given");
-   }
-   thePlatformPos.z() = atof(value);
-   
-   //***
-   // Platform orientation matrix:
-   //***
-   for (int i=0; i<3; i++)
-   {
-      for (int j=0; j<3; j++)
-      {
-         ostringstream ostr;
-         ostr << CAMERA_ORIENTATION_MATRIX_ELEM_KW
-              << i << "_" << j << ends;
-         ossimString s = ostr.str();
-         keyword = s.c_str();
-         value = kwl.find(prefix, keyword);
-         if (!value)
-         {
-            ossimSetError(getClassName(),
-                          ossimErrorCodes::OSSIM_ERROR,
-                          "Camera orientation matrix not given");
-         }
-         theLsrToEcfRot[i][j] = ossimString(value).toDouble();
-      }
-   }
-   
-   //***
-   // Reading of optical distortion coefficients is left to the service object:
-   //***
-   if (theOpticalDistortion)
-      delete theOpticalDistortion;
-   theOpticalDistortion = new ossimRadialDecentLensDistortion(kwl, prefix);
-
-   //***
-   // Initialize given parameters read:
-   //***
-   clearErrorStatus();
-   updateModel();
-   
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::loadState: returning..." << std::endl;
-   return true;
-}
-
-//*****************************************************************************
-// PROTECTED METHOD: ossimFcsiModel::updateModel()
-//
-// Following a parameter adjustment, this method is called to recompute all
-// dependent quantities that are used by the projection methods.
-// 
-//*****************************************************************************
-void  ossimFcsiModel::updateModel()
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::updateModel: entering..." << std::endl;
-   
-   //***
-   // Update the geometry...
-   // Adjusted = Initial + adj_parm[i]*adj_sigma[i]
-   // Some parameters have a zero initial value and that term is not included.
-   //***
-   theEcfOffset.x() = getAdjustableParameter(X_POS) *
-                      getParameterSigma(X_POS);
-   theEcfOffset.y() = getAdjustableParameter(Y_POS) *
-                      getParameterSigma(Y_POS);
-   theEcfOffset.z() = getAdjustableParameter(Z_POS) *
-                      getParameterSigma(Z_POS);
-   theXrotCorr      = getAdjustableParameter(X_ROT) *
-                      getParameterSigma(X_ROT);
-   theYrotCorr      = getAdjustableParameter(Y_ROT) *
-                      getParameterSigma(Y_ROT);
-   theZrotCorr      = getAdjustableParameter(Z_ROT) *
-                      getParameterSigma(Z_ROT);
-   theFocalOffset   = getAdjustableParameter(FOCAL_LEN) *
-                      getParameterSigma(FOCAL_LEN);
-   theScanSkewCorr  = getAdjustableParameter(SCAN_SKEW) *
-                      getParameterSigma(SCAN_SKEW);
-
-   //***
-   // Compute adjusted quatities used in projection code:
-   //***
-   theAdjFocalLen    = theFocalLen    + theFocalOffset;
-   theAdjPlatformPos = thePlatformPos + theEcfOffset;
-   
-   //***
-   // Establish the Scanner to film transform matrix.
-   //
-   // NOTE FOR IMPLEMENTING PARAMETER ADJUSTMENT: while the scan skew
-   // angle is an adjustable parameter, the pixel scaling is not since this
-   // error can be absorbed by the focal length adjustment, though the sigma
-   // for the focal length must be inflated to account for the additional error
-   // source. A similar situation occurrs with the scan rotation which manifests
-   // as an attitude adjustment.
-   //***
-   double cos_rot  = ossim::cosd(theScanRotation);
-   double sin_rot  = ossim::sind(theScanRotation);
-   double tan_skew = ossim::tand(theScanSkew + theScanSkewCorr);
-
-   double a =  theScanScaleMatrix[0]*(sin_rot*tan_skew + cos_rot) +
-               theScanScaleMatrix[1]*(cos_rot*tan_skew - sin_rot);
-   double b =  theScanScaleMatrix[0]*sin_rot + theScanScaleMatrix[1]*cos_rot;
-   double c =  theScanScaleMatrix[2]*(sin_rot*tan_skew + cos_rot) +
-               theScanScaleMatrix[3]*(cos_rot*tan_skew - sin_rot);
-   double d =  theScanScaleMatrix[2]*sin_rot + theScanScaleMatrix[3]*cos_rot;
-
-   theScanXformMatrix[0] = a;
-   theScanXformMatrix[1] = b;
-   theScanXformMatrix[2] = c;
-   theScanXformMatrix[3] = d;
-
-   //***
-   // The inverse of the scanner-to-film transform must be computed since it is
-   // not an orthogonal matrix (inverse != transpose):
-   //***
-   theInvScanXformMatrix[0] =  d/(d*a - b*c);
-   theInvScanXformMatrix[1] = -b/(d*a - b*c);
-   theInvScanXformMatrix[2] =  c/(b*c - a*d);
-   theInvScanXformMatrix[3] = -a/(b*c - a*d);
-
-   //***
-   // Establish the differential rotation matrix due to attitude correction:
-   //***
-   double cw = ossim::cosd(theXrotCorr);
-   double sw = ossim::sind(theXrotCorr);
-   double cp = ossim::cosd(theYrotCorr);
-   double sp = ossim::sind(theYrotCorr);
-   double ck = ossim::cosd(theZrotCorr);
-   double sk = ossim::sind(theZrotCorr);
-
-   NEWMAT::Matrix attitudeCorrection(3, 3);
-   attitudeCorrection(1,1) =  ck*cw - sk*sp*sw;
-   attitudeCorrection(1,2) =  sk*cp;
-   attitudeCorrection(1,3) =  ck*sw + sk*sp*cw;
-   attitudeCorrection(2,1) = -sk*cw - ck*sp*sw;
-   attitudeCorrection(2,2) =  cp*ck;
-   attitudeCorrection(2,3) = -sk*sw + ck*sp*cw;
-   attitudeCorrection(3,1) = -cp*sw;
-   attitudeCorrection(3,2) = -sp;
-   attitudeCorrection(3,3) =  cp*cw;
-
-   //***
-   // Now compute the final LSR to ECF rotation:
-   //***
-   theAdjLsrToEcfRot = attitudeCorrection * theLsrToEcfRot;
-   theAdjEcfToLsrRot = theAdjLsrToEcfRot.t();
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::updateModel: returning..." << std::endl;
-}
-
-
-//*****************************************************************************
-// PRIVATE METHOD: ossimFcsiModel::initAdjustableParameters()
-//  
-//  This method initializes the base class adjustable parameter and associated
-//  sigmas arrays with quantities specific to this model. These are default
-//  values only. A functional implementation would assign the sigmas via a
-//  keywordlist or camera specific derived class.
-//  
-//*****************************************************************************
-void ossimFcsiModel::initAdjustableParameters()
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::initAdjustableParameters: entering..." << std::endl;
-
-   int numParams = NUM_ADJUSTABLE_PARAMS;
-   resizeAdjustableParameterArray(NUM_ADJUSTABLE_PARAMS);
-   
-//   if(!getNumberOfAdjustableParameters())
-///   {
-   //***
-   // Allocate storage for adjustables and assign their names and units strings
-   //***
-//      newAdjustment(NUM_ADJUSTABLE_PARAMS);
-//   }
-   //***
-   // Initialize base-class adjustable parameter array:
-   //***
-   for (int i=0; i<numParams; i++)
-   {
-      setAdjustableParameter(i, 0.0);
-      setParameterDescription(i, PARAM_NAMES[i]);
-      setParameterUnit(i, PARAM_UNITS[i]);
-   }
-   
-   //***
-   // Initialize base-class parameter sigma array:
-   //***
-   setParameterSigma(X_POS, 50.0);
-   setParameterSigma(Y_POS, 50.0);
-   setParameterSigma(Z_POS, 50.0);  
-   setParameterSigma(X_ROT, 0.01);
-   setParameterSigma(Y_ROT, 0.01);
-   setParameterSigma(Z_ROT, 0.01);
-   setParameterSigma(FOCAL_LEN,0.005);  
-   setParameterSigma(SCAN_SKEW, 0.001);
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::initAdjustableParameters: returning..." << std::endl;
-}
-
-//*****************************************************************************
-// STATIC METHOD: ossimFcsiModel::writeGeomTemplate
-//  
-//  Writes a sample kwl to output stream. Please update this method with any
-//  format and/or keyword changes. It will make life a lot easier for everyone.
-//  
-//*****************************************************************************
-void ossimFcsiModel::writeGeomTemplate(ostream& os)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::writeGeomTemplate: entering..." << std::endl;
-
-   os <<
-      "//*****************************************************************\n"
-      "// Template for Frame Camera Scanned Image (FCSI) model keywordlist\n"
-      "//*****************************************************************\n"
-      << ossimKeywordNames::TYPE_KW << ": " << "ossimFcsiModel" << endl;
-
-   ossimSensorModel::writeGeomTemplate(os);
-   
-   os << "//***\n"
-      << "// Derived-class FCSI Keywords:\n"
-      << "//***\n"
-      << PRINCIPAL_POINT_X_KW << ": <pixels>\n"
-      << PRINCIPAL_POINT_Y_KW << ": <pixels>\n"
-      << SCAN_SCALE_MATRIX_00_KW << ": <mm/pixel>\n"
-      << SCAN_SCALE_MATRIX_01_KW << ": <mm/pixel>\n"
-      << SCAN_SCALE_MATRIX_10_KW << ": <mm/pixel>\n"
-      << SCAN_SCALE_MATRIX_11_KW << ": <mm/pixel>\n"
-      << SCAN_SKEW_ANGLE_KW << ": <degrees> [OPTIONAL]\n"
-      << SCAN_ROTATION_ANGLE_KW << ": <degrees> [OPTIONAL]\n"
-      << FOCAL_LENGTH_KW << ": <millimeters>\n"
-      << PLATFORM_POSITION_X_KW << ": <meters (ECF)>\n"
-      << PLATFORM_POSITION_Y_KW << ": <meters (ECF)>\n"
-      << PLATFORM_POSITION_Z_KW << ": <meters (ECF)>\n"
-      << "\n"
-      << "//***\n"
-      << "// Camera (LSR) to ECF orientation matrix:\n"
-      << "//***\n";
-   
-   for (int i=0; i<3; i++)
-   {
-      for (int j=0; j<3; j++)
-      {
-         ostringstream ostr;
-         ostr << CAMERA_ORIENTATION_MATRIX_ELEM_KW
-              << i << "_" << j << ends;
-         os << ostr.str() << ": <Euler rot matrix element>\n";
-      }
-   }
-
-   os << "\n"
-      << "//***\n"
-      << "// Optical distortion coefficients [OPTIONAL]:\n"
-      << "//***\n"
-      << "distortion."
-      << ossimRadialDecentLensDistortion::RADIAL_DISTORTION_COEFF_KW
-      << "N: <coeff N> (for N <= 5)\n"
-      << "distortion."
-      << ossimRadialDecentLensDistortion::DECENT_DISTORTION_COEFF_KW
-      << "N: <coeff N> (for N <= 4)\n"
-      << endl;
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimFcsiModel::writeGeomTemplate: returning..." << std::endl;
-   
-   return;
-}
-
-
diff --git a/src/ossim/projection/ossimIkonosRpcModel.cpp b/src/ossim/projection/ossimIkonosRpcModel.cpp
deleted file mode 100644
index 88ef0f7..0000000
--- a/src/ossim/projection/ossimIkonosRpcModel.cpp
+++ /dev/null
@@ -1,959 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Contains implementation of class ossimIkonosRpcModel. This 
-//    derived class implements the capability of reading Ikonos RPC support
-//    data.
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimIkonosRpcModel.cpp 20606 2012-02-24 12:29:52Z gpotts $
-
-#include <cstdlib>
-#include <ossim/projection/ossimIkonosRpcModel.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/imaging/ossimTiffTileSource.h>
-#include <ossim/base/ossimTrace.h>
-
-
-RTTI_DEF1(ossimIkonosRpcModel, "ossimIkonosRpcModel", ossimRpcModel);
-
-//***
-// Define Trace flags for use within this file:
-//***
-static ossimTrace traceExec  ("ossimIkonosRpcModel:exec");
-static ossimTrace traceDebug ("ossimIkonosRpcModel:debug");
-
-const ossimFilename INIT_RPC_GEOM_FILENAME ("rpc_init.geom");
-
-static const char* MODEL_TYPE        = "ossimIkonosRpcModel";
-static const char* META_DATA_FILE    = "meta_data_file";
-static const char* RPC_DATA_FILE     = "rpc_data_file";
-static const char* LINE_OFF_KW       = "LINE_OFF";
-static const char* SAMP_OFF_KW       = "SAMP_OFF";
-static const char* LAT_OFF_KW        = "LAT_OFF";
-static const char* LONG_OFF_KW       = "LONG_OFF";
-static const char* HEIGHT_OFF_KW     = "HEIGHT_OFF";
-static const char* LINE_SCALE_KW     = "LINE_SCALE";
-static const char* SAMP_SCALE_KW     = "SAMP_SCALE";
-static const char* LAT_SCALE_KW      = "LAT_SCALE";
-static const char* LONG_SCALE_KW     = "LONG_SCALE";
-static const char* HEIGHT_SCALE_KW   = "HEIGHT_SCALE";
-static const char* LINE_NUM_COEFF_KW = "LINE_NUM_COEFF_";
-static const char* LINE_DEN_COEFF_KW = "LINE_DEN_COEFF_";
-static const char* SAMP_NUM_COEFF_KW = "SAMP_NUM_COEFF_";
-static const char* SAMP_DEN_COEFF_KW = "SAMP_DEN_COEFF_";
-
-
-ossimIkonosRpcModel::ossimIkonosRpcModel()
-   :ossimRpcModel(),
-    theSupportData(new ossimIkonosMetaData())
-{
-}
-
-//*****************************************************************************
-//  CONSTRUCTOR: ossimIkonosRpcModel
-//  
-//  Constructs given a geometry file that specifies the filenames for the
-//  metadata and RPC data files.
-//  
-//*****************************************************************************
-ossimIkonosRpcModel::ossimIkonosRpcModel(const ossimFilename& geom_file)
-   :  ossimRpcModel(),
-      theSupportData(new ossimIkonosMetaData())
-{
-   if (traceExec())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimIkonosRpcModel Constructor #1: entering..."
-         << std::endl;
-   }
-
-   ossimKeywordlist kwl(geom_file);
-   const char* value;
-   
-   //***
-   // Assure this keywordlist contains correct type info:
-   //***
-   value = kwl.find(ossimKeywordNames::TYPE_KW);
-   if (!value || (strcmp(value, "ossimIkonosRpcModel")))
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG  ossimIkonosRpcModel Constructor #1:"
-            << "\nFailed attempt to construct. sensor type \""<<value
-            << "\" does not match \"ossimIkonosRpcModel\"." << std::endl;
-      }
-
-      theErrorStatus++;
-      if (traceExec())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG  ossimIkonosRpcModel Constructor #1: returning..."
-            << std::endl;
-      }
-      return;
-   }
-
-   //***
-   // Read meta data filename from geom file:
-   //***
-   value = kwl.find(META_DATA_FILE);
-   if (!value)
-   {
-      theErrorStatus++;
-      if (traceExec())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG ossimIkonosRpcModel Constructor #1: returning..."
-            << std::endl;
-      }
-      return;
-   }
-
-   ossimFilename metadata (value);
-
-   //***
-   // Read RPC data filename from geom file:
-   //***
-   value = kwl.find(RPC_DATA_FILE);
-   if (!value)
-   {
-      theErrorStatus++;
-      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG  ossimIkonosRpcModel Constructor #1: returning..." << std::endl;
-      return;
-   }
-   ossimFilename rpcdata (value);
-
-   parseMetaData(metadata);
-   parseRpcData (rpcdata);
-   finishConstruction();
-
-   ossimString drivePart;
-   ossimString pathPart;
-   ossimString filePart;
-   ossimString extPart;
-   geom_file.split(drivePart,
-                   pathPart,
-                   filePart,
-                   extPart);
-
-   
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG returning..." << std::endl;
-   
-   return;
-}
-
-//*****************************************************************************
-//  CONSTRUCTOR: ossimIkonosRpcModel
-//  
-//  Constructs given filenames for metadata and RPC data.
-//  
-//*****************************************************************************
-ossimIkonosRpcModel::ossimIkonosRpcModel(const ossimFilename& metadata,
-                                         const ossimFilename& rpcdata)
-   :
-   ossimRpcModel(),
-   theSupportData(new ossimIkonosMetaData())
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimIkonosRpcModel Constructor #2: entering..." << std::endl;
-
-   parseMetaData(metadata);
-   parseRpcData (rpcdata);
-   finishConstruction();
-
-   //***
-   // Save current state in RPC model format:
-   //***
-   ossimString drivePart;
-   ossimString pathPart;
-   ossimString filePart;
-   ossimString extPart;
-   metadata.split(drivePart,
-                  pathPart,
-                  filePart,
-                  extPart);
-   
-   ossimFilename init_rpc_geom;
-   init_rpc_geom.merge(drivePart,
-                       pathPart,
-                       INIT_RPC_GEOM_FILENAME,
-                       "");
-//      (metadata.path().dirCat(ossimRpcModel::INIT_RPC_GEOM_FILENAME));
-   ossimKeywordlist kwl (init_rpc_geom);
-   saveState(kwl);
-   
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimIkonosRpcModel Constructor #2: returning..." << std::endl;
-}
-
-ossimIkonosRpcModel::~ossimIkonosRpcModel()
-{
-   theSupportData = 0;
-}
-
-//*****************************************************************************
-//  METHOD: ossimIkonosRpcModel::finishConstruction()
-//  
-//*****************************************************************************
-void ossimIkonosRpcModel::finishConstruction()
-{
-   if (traceExec())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimIkonosRpcModel finishConstruction(): entering..."
-         << std::endl;
-   }
-
-   //***
-   // Assign other data members:
-   //***
-   thePolyType      = B; // This may not be true for early RPC imagery
-   theRefImgPt.line = theLineOffset;
-   theRefImgPt.samp = theSampOffset;
-   theRefGndPt.lat  = theLatOffset;
-   theRefGndPt.lon  = theLonOffset;
-   theRefGndPt.hgt  = theHgtOffset;
-
-   //***
-   // Assign the bounding image space rectangle:
-   //***
-   theImageClipRect = ossimDrect(0.0, 0.0,
-                                 theImageSize.samp-1, theImageSize.line-1);
-
-   //---
-   // NOTE:  We must call "updateModel()" to set parameter used by base
-   // ossimRpcModel prior to calling lineSampleHeightToWorld or all
-   // the world points will be same.
-   //---
-   updateModel();   
-
-   //***
-   // Assign the bounding ground polygon:
-   //***
-   ossimGpt v0, v1, v2, v3;
-   ossimDpt ip0 (0.0, 0.0);
-   lineSampleHeightToWorld(ip0, 0.0, v0);
-   ossimDpt ip1 (theImageSize.samp-1.0, 0.0);
-   lineSampleHeightToWorld(ip1, 0.0, v1);
-   ossimDpt ip2 (theImageSize.samp-1.0, theImageSize.line-1.0);
-   lineSampleHeightToWorld(ip2, 0.0, v2);
-   ossimDpt ip3 (0.0, theImageSize.line-1.0);
-   lineSampleHeightToWorld(ip3, 0.0, v3);
-   theBoundGndPolygon
-      = ossimPolygon (ossimDpt(v0), ossimDpt(v1), ossimDpt(v2), ossimDpt(v3));
-
-   //---
-   // Call compute gsd:
-   // 
-   // This will set theGSD and theMeanGSD using lineSampleHeightToWorld on
-   // three image points.  Previously this was pulled from metadata.  Some of
-   // which was in US Survey feet and not converted to meters.  This method
-   // is more accurate as it uses the sensor model to compute.
-   //---
-   try
-   {
-      // Method throws ossimException.
-      computeGsd();
-   }
-   catch (const ossimException& e)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimIkonosRpcModel finishConstruction Caught Exception:\n"
-         << e.what() << std::endl;
-   }
-   
-   if (traceExec())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimIkonosRpcModel finishConstruction(): returning..."
-         << std::endl;
-   }
-}
-
-//*****************************************************************************
-// PROTECTED METHOD: ossimIkonosRpcModel::parseMetaData()
-//  
-//  Parses the Ikonos metadata file.
-//  
-//*****************************************************************************
-void ossimIkonosRpcModel::parseMetaData(const ossimFilename& data_file)
-{
-   if (traceExec())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimIkonosRpcModel::parseMetaData(data_file): entering..."
-         << std::endl;
-   }
-
-   FILE* fptr = fopen (data_file, "r");
-   if (!fptr)
-   {
-      ++theErrorStatus;
-      if (traceExec())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimIkonosRpcModel::parseMetaData(data_file) DEBUG:"
-            << "\nCould not open Meta data file:  " << data_file
-            << "\nreturning with error..." << std::endl;
-      }
-      return;
-   }
-
-   char* strptr;
-   // char linebuf[80];
-   char dummy[80], name[80];
-
-   //***
-   // Read the file into a buffer:
-   //***
-   char filebuf[5000];
-   fread(filebuf, 1, 5000, fptr);
-   
-   //***
-   // Image ID:
-   //***
-   strptr = strstr(filebuf, "\nSource Image ID:");
-   if (!strptr)
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
-            << "\n\tAborting construction. Error encountered parsing "
-            << "presumed meta-data file." << endl;
-      }
-      return;
-   }
-      
-   sscanf(strptr, "%17c %s", dummy, name);
-   theImageID = name;
-
-   //***
-   // Sensor Type:
-   //***
-   strptr = strstr(strptr, "\nSensor:");
-   if (!strptr)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
-            << "\n\tAborting construction. Error encountered parsing "
-            << "presumed meta-data file." << endl;
-         
-         return;
-      }
-   }
-   sscanf(strptr, "%8c %s", dummy, name);
-   theSensorID = name;
-
-   //***
-   // GSD:  NOTE - this will be recomputed by computeGsd method later.
-   //***
-   strptr = strstr(strptr, "\nPixel Size X:");
-   if (!strptr)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
-            << "\n\tAborting construction. Error encountered parsing "
-            << "presumed meta-data file." << endl;
-         
-         return;
-      }
-   }
-   
-   sscanf(strptr, "%14c %lf", dummy, &theGSD.samp);
-   strptr = strstr(strptr, "\nPixel Size Y:");
-   if (!strptr)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
-            << "\n\tAborting construction. Error encountered parsing "
-            << "presumed meta-data file." << endl;
-         
-         return;
-      }
-   }
-   sscanf(strptr, "%14c %lf", dummy, &theGSD.line);
-
-   //***
-   // Image size:
-   //***
-   strptr = strstr(strptr, "\nColumns:");
-   if (!strptr)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
-            << "\n\tAborting construction. Error encountered parsing "
-            << "presumed meta-data file." << endl;
-         
-         return;
-      }
-   }
-   sscanf(strptr, "%s %d", dummy, &theImageSize.samp);
-   strptr = strstr(strptr, "\nRows:");
-   if (!strptr)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
-            << "\n\tAborting construction. Error encountered parsing "
-            << "presumed meta-data file." << endl;
-         
-         return;
-      }
-   }
-   sscanf(strptr, "%s %d", dummy, &theImageSize.line);
-           
-   if (traceExec())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimIkonosRpcModel::parseMetaData(data_file): returning..."
-         << std::endl;
-   }
-}
-
-//*****************************************************************************
-// PROTECTED METHOD: ossimIkonosRpcModel::parseHdrData()
-//  
-//  Parses the Ikonos hdr file.
-//  
-//*****************************************************************************
-bool ossimIkonosRpcModel::parseHdrData(const ossimFilename& data_file)
-{
-   if (traceExec())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimIkonosRpcModel::parseHdrData(data_file): entering..."
-         << std::endl;
-   }
-   
-   if( !data_file.exists() )
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimIkonosRpcModel::parseHdrData(data_file) WARN:"
-            << "\nrpc data file <" << data_file << ">. "<< "doesn't exist..."
-            << std::endl;
-      }
-      return false;
-   }
-
-   FILE* fptr = fopen (data_file, "r");
-   if (!fptr)
-   {
-      ++theErrorStatus;
-      
-      if (traceDebug())
-      { 
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimIkonosRpcModel::parseHdrData(data_file) WARN:"
-            << "\nCould not open hdr data file <" << data_file << ">. "
-            << "returning with error..." << std::endl;
-      }
-      return false;
-   }
-
-   char* strptr = 0;
-   // char linebuf[80];
-   char dummy[80];
-   // , name[80];
-
-   //***
-   // Read the file into a buffer:
-   //***
-   char filebuf[5000];
-   fread(filebuf, 1, 5000, fptr);
-
-   //***
-   // GSD:  NOTE - this will be recomputed by computeGsd method later.
-   //***
-   strptr = strstr(filebuf, "\nPixel Size X:");
-   if (!strptr)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimIkonosRpcModel::parseHdrData(data_file):"
-            << "\n\tAborting construction. Error encountered parsing "
-            << "presumed hdr file." << endl;
-      }
-      
-      return false;
-   }
-      
-   sscanf(strptr, "%14c %lf", dummy, &theGSD.samp);
-   strptr = strstr(strptr, "\nPixel Size Y:");
-   if (!strptr)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimIkonosRpcModel::parseHdrData(data_file): "
-            << "\n\tAborting construction. Error encountered parsing "
-            << "presumed hdr file." << endl;
-      }
-         
-      return false;
-   }
-
-   sscanf(strptr, "%14c %lf", dummy, &theGSD.line);
-
-   //***
-   // Image size:
-   //***
-   strptr = strstr(strptr, "\nColumns:");
-   if (!strptr)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimIkonosRpcModel::parseHdrData(data_file): "
-            << "\n\tAborting construction. Error encountered parsing "
-            << "presumed hdr file." << endl;
-      }
-         
-      return false;
-   }
-   sscanf(strptr, "%s %d", dummy, &theImageSize.samp);
-   strptr = strstr(strptr, "\nRows:");
-   if (!strptr)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimIkonosRpcModel::parseHdrData(data_file): "
-            << "\n\tAborting construction. Error encountered parsing "
-            << "presumed hdr file." << endl;
-      }
-         
-      return false;
-   }
-   sscanf(strptr, "%s %d", dummy, &theImageSize.line);
-           
-   if (traceExec())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimIkonosRpcModel::parseHdrData(data_file): returning..."
-         << std::endl;
-   }
-   return true;
-}
-
-//*****************************************************************************
-// PROTECTED METHOD: ossimIkonosRpcModel::parseRpcData()
-//  
-//  Parses the Ikonos RPC data file.
-//  
-//*****************************************************************************
-void ossimIkonosRpcModel::parseRpcData(const ossimFilename& data_file)
-{
-   if (traceExec())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimIkonosRpcModel::parseRpcData(data_file): entering..."
-         << std::endl;
-   }
-      
-   if( !data_file.exists() )
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimIkonosRpcModel::parseRpcData(data_file) WARN:"
-            << "\nrpc data file <" << data_file << ">. "<< "doesn't exist..."
-            << std::endl;
-      }
-      ++theErrorStatus;
-      return;
-   }
-   
-   //***
-   // The Ikonos RPC data file is conveniently formatted as KWL file:
-   //***
-   ossimKeywordlist kwl (data_file);
-   if (kwl.getErrorStatus())
-   {
-      ossimNotify(ossimNotifyLevel_FATAL)
-         << "ERROR ossimIkonosRpcModel::parseRpcData(data_file): Could not open RPC data file <" << data_file << ">. " << "Aborting..." << std::endl;
-      ++theErrorStatus;
-      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG)
-         << "returning with error..." << std::endl;
-      return;
-   }
-
-   const char* buf;
-   const char* keyword;
-   
-   //***
-   // Parse data from KWL:
-   //***
-   keyword = LINE_OFF_KW;
-   buf = kwl.find(keyword);
-   if (!buf)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
-                                          << "\nAborting construction. Error looking up keyword: "
-                                          << keyword << std::endl;
-      return;
-   }
-   theLineOffset = atof(buf);
-      
-   keyword = SAMP_OFF_KW;
-   buf = kwl.find(keyword);
-   if (!buf)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
-                                          << "\nAborting construction. Error looking up keyword: "
-                                          << keyword << std::endl;
-      return;
-   }
-   theSampOffset = atof(buf);
-
-   keyword = LAT_OFF_KW;
-   buf = kwl.find(keyword);
-   if (!buf)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
-                                          << "\nAborting construction. Error looking up keyword: "
-                                          << keyword << std::endl;
-      return;
-   }
-      
-   theLatOffset = atof(buf);
-   
-   keyword = LONG_OFF_KW;
-   buf = kwl.find(keyword);
-   if (!buf)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
-                                          << "\nAborting construction. Error looking up keyword: "
-                                          << keyword << std::endl;
-      return;
-   }
-   theLonOffset = atof(buf);
-
-   keyword = HEIGHT_OFF_KW;
-   buf = kwl.find(keyword);
-   if (!buf)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
-                                          << "\nAborting construction. Error looking up keyword: "
-                                          << keyword << std::endl;
-      return;
-   }
-      
-   theHgtOffset = atof(buf);
-
-   keyword = LINE_SCALE_KW;
-   buf = kwl.find(keyword);
-   if (!buf)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
-                                          << "\nAborting construction. Error looking up keyword: "
-                                          << keyword << std::endl;
-      return;
-   }
-   theLineScale = atof(buf);
-   
-   keyword = SAMP_SCALE_KW;
-   buf = kwl.find(keyword);
-   if (!buf)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
-                                          << "\nAborting construction. Error looking up keyword: "
-                                          << keyword << std::endl;
-      return;
-   }
-   theSampScale = atof(buf);
-   
-   keyword = LAT_SCALE_KW;
-   buf = kwl.find(keyword);
-   if (!buf)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
-                                          << "\nAborting construction. Error looking up keyword: "
-                                          << keyword << std::endl;
-      return;
-   }
-   else
-     {
-       // copy ossimIkonosMetada-sensor into ossimIkonosRpcModel-sensorId
-       theSensorID = theSupportData->getSensorID();
-     }
-   
-
-   theLatScale = atof(buf);
-   
-   keyword = LONG_SCALE_KW;
-   buf = kwl.find(keyword);
-   if (!buf)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
-                                          << "\nAborting construction. Error looking up keyword: "
-                                          << keyword << std::endl;
-      return;
-   }
-   theLonScale = atof(buf);
-   
-   keyword = HEIGHT_SCALE_KW;
-   buf = kwl.find(keyword);
-   if (!buf)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
-                                          << "\nAborting construction. Error looking up keyword: "
-                                          << keyword << std::endl;
-      return;
-   }
-      
-   theHgtScale = atof(buf);
-   
-   char kwbuf[32];
-   keyword = kwbuf;
-   for(int i=1; i<=20; i++)
-   {
-      sprintf(kwbuf, "%s%d", LINE_NUM_COEFF_KW, i);
-      buf = kwl.find(keyword);
-      if (!buf)
-      {
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
-                                             << "\nAborting construction. Error looking up keyword: "
-                                             << keyword << std::endl;
-         return;
-      }
-      
-      theLineNumCoef[i-1] = atof(buf);
-      
-      sprintf(kwbuf, "%s%d", LINE_DEN_COEFF_KW, i);
-      buf = kwl.find(keyword);
-      if (!buf)
-      {
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
-                                             << "\nAborting construction. Error looking up keyword: "
-                                             << keyword << std::endl;
-         return;
-      }
-      theLineDenCoef[i-1] = atof(buf);
-      
-      sprintf(kwbuf, "%s%d", SAMP_NUM_COEFF_KW, i);
-      buf = kwl.find(keyword);
-      if (!buf)
-      {
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
-                                             << "\nAborting construction. Error looking up keyword: "
-                                             << keyword << std::endl;
-         return;
-      }
-      theSampNumCoef[i-1] = atof(buf);
-      
-      sprintf(kwbuf, "%s%d", SAMP_DEN_COEFF_KW, i);
-      buf = kwl.find(keyword);
-      if (!buf)
-      {
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimIkonosRpcModel::parseRpcData(data_file):"
-                                             << "\nAborting construction. Error looking up keyword: "
-                                             << keyword << std::endl;
-         return;
-      }
-      theSampDenCoef[i-1] = atof(buf);
-   }
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimIkonosRpcModel::parseRpcData(data_file): returning..." << std::endl;
-   return;
-
-   theErrorStatus++;
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimIkonosRpcModel::parseRpcData(data_file): returning with error..." << std::endl;
-   
-   return;
-}
-
-//*****************************************************************************
-//  METHOD: ossimIkonosRpcModel::writeGeomTemplate()
-//  
-//   Writes a template of an ossimIkonosRpcModel geometry file.
-//  
-//*****************************************************************************
-void ossimIkonosRpcModel::writeGeomTemplate(ostream& os)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::writeGeomTemplate(os): entering..." << std::endl;
-
-   os <<
-      "//**************************************************************\n"
-      "// Template for Ikonos RPC geometry keywordlist\n"
-      "//\n"
-      "// NOTE: It is preferable to select the full RPC geometry KWL \n"
-      "//       that should have been created with the first use of the\n"
-      "//       derived model type ossimIkonosRpcModel. Using this KWL \n"
-      "//       implies that an initial geometry is being constructed \n"
-      "//       with all adjustable parameters initialized to 0. \n"
-      "//**************************************************************\n"
-      << ossimKeywordNames::TYPE_KW << ": " << MODEL_TYPE << endl;
-   os << META_DATA_FILE << ": <string>\n"
-      << RPC_DATA_FILE  << ": <string>\n" << endl;
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::writeGeomTemplate(os): returning..." << std::endl;
-   return;
-}
-
-bool ossimIkonosRpcModel::saveState(ossimKeywordlist& kwl,
-				    const char* prefix)const
-{
-   if(theSupportData.valid())
-   {
-      ossimString supportPrefix = ossimString(prefix) + "support_data.";
-      // copy ossimIkonosMetada-sensor into ossimIkonosRpcModel-sensorId
-      theSupportData->saveState(kwl, supportPrefix);
-   }
-
-   ossimRpcModel::saveState(kwl, prefix);
-
-  // this model just sets the base class values so
-  // we do not need to re-construct this model so 
-  // specify the type as the base class type
-  //
-//   kwl.add(prefix,
-// 	  ossimKeywordNames::TYPE_KW,
-// 	  STATIC_TYPE_NAME(ossimRpcModel),
-// 	  true);
-
-  // cout << "kwl:\n" << kwl << std::endl;
-
-  return true;
-}
-
-bool ossimIkonosRpcModel::loadState(const ossimKeywordlist& kwl,
-                                    const char* prefix)
-{
-   if(theSupportData.valid())
-   {
-      ossimString supportPrefix = ossimString(prefix) + "support_data.";
-      theSupportData->loadState(kwl, supportPrefix);
-   }
-
-   return ossimRpcModel::loadState(kwl, prefix);
-}
-
-bool ossimIkonosRpcModel::parseFile(const ossimFilename& file)
-{
-      return parseTiffFile(file);
-}
-
-bool ossimIkonosRpcModel::parseTiffFile(const ossimFilename& filename)
-{
-   bool result = false;
-   
-   ossimRefPtr<ossimTiffTileSource> tiff = new ossimTiffTileSource();
-
-   if ( tiff->open(filename) )
-   {
-      if ( !theSupportData )
-      {
-         theSupportData = new ossimIkonosMetaData();
-      }
-
-      if ( theSupportData->open(filename) == false )
-      {
-         if(traceDebug())
-         {
-            // Currently not required by model so we will not error out here.
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "WARNING: ossimIkonosMetaData::open returned false.\n"
-               << std::endl;
-         }
-      }
-      else
-      {
-         // copy ossimIkonosMetada-sensor into ossimIkonosRpcModel-sensorId
-         theSensorID = theSupportData->getSensorID();
-      }
-
-      //convert file to rpc filename and hdr filename so we can get some info
-      ossimFilename rpcfile = filename.noExtension();
-      rpcfile += "_rpc.txt";
-      
-      ossimFilename hdrfile = filename;
-      hdrfile.setExtension(ossimString("hdr"));
-      
-      if( parseHdrData(hdrfile) )
-      {
-         // parseRpcData sets the error status on error.
-         parseRpcData (rpcfile);
-         if ( !getErrorStatus() ) //check for errors in parsing rpc data
-         {
-            finishConstruction();
-            
-            //---
-            // Save current state in RPC model format:
-            //---
-            ossimString drivePart;
-            ossimString pathPart;
-            ossimString filePart;
-            ossimString extPart;
-            filename.split(drivePart,
-                           pathPart,
-                           filePart,
-                           extPart);
-            
-            ossimFilename init_rpc_geom;
-            init_rpc_geom.merge(drivePart,
-                                pathPart,
-                                INIT_RPC_GEOM_FILENAME,
-                                "");
-
-            ossimKeywordlist kwl (init_rpc_geom);
-            saveState(kwl);
-
-            // If we get here set the return status to true.
-            result = true;
-
-         } // matches: if ( !getErrorStatus() )
-   
-      } // matches: if( parseHdrData(hdrfile) )
-
-   } // matches:  if ( tiff->open(filename) )
-   
-   if ( traceExec() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "return status: " << (result?"true\n":"false\n")
-         << "DEBUG ossimIkonosRpcModel parseTiffFile: returning..."
-         << std::endl;
-   }
-
-   return result;
-}
-
-bool ossimIkonosRpcModel::isNitf(const ossimFilename& filename)
-{
-   std::ifstream in(filename.c_str(), ios::in|ios::binary);
-   
-   if(in)
-   {
-      char nitfFile[4];
-      in.read((char*)nitfFile, 4);
-
-      return (ossimString(nitfFile,
-                          nitfFile+4) == "NITF");
-   }
-
-   return false;
-}
diff --git a/src/ossim/projection/ossimImageProjectionModel.cpp b/src/ossim/projection/ossimImageProjectionModel.cpp
deleted file mode 100644
index 2be06e9..0000000
--- a/src/ossim/projection/ossimImageProjectionModel.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-//-----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Class definition of ossimImageProjectionModel.
-//
-//-----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/projection/ossimImageProjectionModel.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/projection/ossimProjection.h>
-#include <string>
-
-RTTI_DEF1(ossimImageProjectionModel,
-          "ossimImageProjectionModel",
-          ossimImageModel)
-
-ossimImageProjectionModel::ossimImageProjectionModel()
-   : ossimImageModel(),
-     theProjection(0)
-{
-}
-
-ossimImageProjectionModel::~ossimImageProjectionModel()
-{
-   theProjection = 0;
-}
-
-void ossimImageProjectionModel::initialize(const ossimImageHandler& ih)
-{
-   // Initialize base.
-   ossimImageModel::initialize(ih);
-   
-   theProjection = 0;
-
-   // Fetch the handler's image geometry and see if it has a projection:
-   ossimImageHandler* iih = const_cast<ossimImageHandler*>(&ih); // cast away constness
-   ossimRefPtr<ossimImageGeometry> image_geom = iih->getImageGeometry();
-   if ( image_geom.valid() )
-   {
-      theProjection = image_geom->getProjection();
-   }
-}
-
-const ossimProjection* ossimImageProjectionModel::getProjection() const
-{
-   return theProjection;
-}
diff --git a/src/ossim/projection/ossimImageViewAffineTransform.cpp b/src/ossim/projection/ossimImageViewAffineTransform.cpp
deleted file mode 100644
index 0ab3ee6..0000000
--- a/src/ossim/projection/ossimImageViewAffineTransform.cpp
+++ /dev/null
@@ -1,306 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimImageViewAffineTransform.cpp 19802 2011-07-11 11:08:07Z gpotts $
-
-#include <ossim/projection/ossimImageViewAffineTransform.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimMatrix3x3.h>
-#include <ossim/base/ossimString.h>
-
-RTTI_DEF1(ossimImageViewAffineTransform, "ossimImageViewAffineTransform", ossimImageViewTransform)
-
-ossimImageViewAffineTransform::ossimImageViewAffineTransform(double rotateDegrees,
-                                                             double scaleXValue,
-                                                             double scaleYValue,
-                                                             double translateXValue,
-                                                             double translateYValue,
-                                                             double pivotXValue,
-                                                             double pivotYValue)
-   :m_transform(3,3),
-    m_inverseTransform(3,3),
-    m_rotation(rotateDegrees),
-    m_scale(scaleXValue, scaleYValue),
-    m_translate(translateXValue, translateYValue),
-    m_pivot(pivotXValue, pivotYValue)
-{
-   m_transform << 1 << 0 << 0
-                << 0 << 1 << 0
-                << 0 << 0 << 1;
-   
-   m_inverseTransform << 1 << 0 << 0
-                       << 0 << 1 << 0
-                       << 0 << 0 << 1;
-
-   
-   rotate(rotateDegrees);
-   scale(scaleXValue, scaleYValue);
-   translate(translateXValue, translateYValue);
-   pivot(m_pivot.x, m_pivot.y);
-}
-
-ossimImageViewAffineTransform::~ossimImageViewAffineTransform()
-{
-}
-
-void ossimImageViewAffineTransform::imageToView(const ossimDpt& imagePoint,
-                                                ossimDpt&       viewPoint)const
-{
-   
-    viewPoint.x = m_transform[0][0]*imagePoint.x + m_transform[0][1]*imagePoint.y + m_transform[0][2];
-    viewPoint.y = m_transform[1][0]*imagePoint.x + m_transform[1][1]*imagePoint.y + m_transform[1][2];
-}
-
-void ossimImageViewAffineTransform::viewToImage(const ossimDpt& viewPoint,
-                                                ossimDpt&       imagePoint)const
-{
-   imagePoint.x = m_inverseTransform[0][0]*viewPoint.x + m_inverseTransform[0][1]*viewPoint.y + m_inverseTransform[0][2];
-   imagePoint.y = m_inverseTransform[1][0]*viewPoint.x + m_inverseTransform[1][1]*viewPoint.y + m_inverseTransform[1][2];
-}
-
-void ossimImageViewAffineTransform::setMatrix(NEWMAT::Matrix& matrix)
-{
-   m_transform        = matrix;
-   m_inverseTransform = m_transform.i();
-}
-
-const NEWMAT::Matrix& ossimImageViewAffineTransform::getMatrix()const
-{
-   return m_transform;
-}
-
-
-
-void ossimImageViewAffineTransform::scale(double x, double y)
-{
-//    NEWMAT::Matrix m(3, 3);
-
-//    m << x << 0 << 0
-//      << 0 << y << 0
-//      << 0 << 0 << 1;
-
-   
-//   m_transform = (m*m_transform);
-
-//   m_inverseTransform = m_transform.i();
-
-   m_scale = ossimDpt(x,y);
-   buildCompositeTransform();
-}
-
-void ossimImageViewAffineTransform::translate(double deltaX,
-                                              double deltaY)
-{
-   m_translate = ossimDpt(deltaX, deltaY);
-   buildCompositeTransform();
-//    NEWMAT::Matrix m(3,3);
-
-//    m << 1 << 0 << deltaX
-//      << 0 << 1 << deltaY
-//      << 0 << 0 << 1;
-   
-   
-//    m_transform = m*m_transform;
-//    m_inverseTransform = m_transform.i();
-}
-
-void ossimImageViewAffineTransform::translateX(double deltaX)
-{
-   translate(deltaX, m_translate.y);
-}
-
-void ossimImageViewAffineTransform::translateY(double deltaY)
-{
-   translate(m_translate.x, deltaY);
-}
-
-void ossimImageViewAffineTransform::scaleX(double x)
-{
-   scale(x, m_scale.y);
-}
-
-void ossimImageViewAffineTransform::scaleY(double y)
-{
-   scale(m_scale.x, y);
-}
-
-void ossimImageViewAffineTransform::pivot(double originX, double originY)
-{
-   m_pivot.x = originX;
-   m_pivot.y = originY;
-   buildCompositeTransform();
-}
-
-void ossimImageViewAffineTransform::pivotX(double originX)
-{
-   pivot(originX,m_pivot.y);
-}
-
-void ossimImageViewAffineTransform::pivotY(double originY)
-{
-   pivot(m_pivot.x, originY);
-}
-
-void ossimImageViewAffineTransform::rotate(double degrees)
-{
-   m_rotation = degrees;
-   buildCompositeTransform();
-//   m_transform = (m_transform * ossimMatrix3x3::createRotationZMatrix(degrees));
-//    m_transform = ossimMatrix3x3::createRotationZMatrix(degrees) * m_transform;
-
-//    m_inverseTransform = m_transform.i();
-}
-
-void ossimImageViewAffineTransform::buildCompositeTransform()
-{
-   NEWMAT::Matrix scaleM(3, 3);
-   NEWMAT::Matrix rotzM = ossimMatrix3x3::createRotationZMatrix(m_rotation);
-   NEWMAT::Matrix transM(3,3);
-   NEWMAT::Matrix transOriginM(3,3);
-   NEWMAT::Matrix transOriginNegatedM(3,3);
-   
-   transM << 1 << 0 << m_translate.x
-          << 0 << 1 << m_translate.y
-          << 0 << 0 << 1;
-   
-   transOriginM << 1 << 0 << m_pivot.x
-                << 0 << 1 << m_pivot.y
-                << 0 << 0 << 1;
-   
-   transOriginNegatedM << 1 << 0 << -m_pivot.x
-                       << 0 << 1 << -m_pivot.y
-                       << 0 << 0 << 1;
-   
-   scaleM << m_scale.x << 0 << 0
-          << 0 << m_scale.y << 0
-          << 0 << 0 << 1;
-
-//   m_transform        = transOriginM*transM*scaleM*rotzM*transOriginNegatedM;
-   // pivot should just be around the rotation
-   m_transform        = transM*scaleM*transOriginM*rotzM*transOriginNegatedM;
-   m_inverseTransform = m_transform.i();
-   
-}
-
-
-bool ossimImageViewAffineTransform::loadState(const ossimKeywordlist& kwl,
-                                              const char* prefix)
-{
-   ossimString scaleString(kwl.find(prefix,"scale"));
-   ossimString pivotString(kwl.find(prefix,"pivot"));
-   ossimString translateString(kwl.find(prefix,"translate"));
-   ossimString rotateString(kwl.find(prefix,"rotate"));
-   
-   if(!scaleString.empty())
-   {
-      m_scale.toPoint(scaleString);
-   }
-   if(!pivotString.empty())
-   {
-      m_pivot.toPoint(pivotString);
-   }
-   if(!translateString.empty())
-   {
-      m_translate.toPoint(translateString);
-   }
-   if(!rotateString.empty())
-   {
-      m_rotation = rotateString.toDouble();
-   }
-   buildCompositeTransform();
-   ossimImageViewTransform::loadState(kwl, prefix);
-   return true;
-}
-
-bool ossimImageViewAffineTransform::saveState(ossimKeywordlist& kwl,
-                                              const char* prefix)const
-{
-   kwl.add(prefix,
-           "rotation",
-           m_rotation,
-           true);
-   kwl.add(prefix,
-           "pivot",
-           m_pivot.toString(),
-           true);
-   kwl.add(prefix,
-           "scale",
-           m_scale.toString(),
-           true);
-   kwl.add(prefix,
-           "translate",
-           m_translate.toString(),
-           true);
-           
-   return ossimImageViewTransform::saveState(kwl,prefix);
-}
-
-bool ossimImageViewAffineTransform::isValid()const
-{
-   return true;
-}
-
-bool ossimImageViewAffineTransform::setView(ossimObject* obj)
-{
-   ossimImageViewAffineTransform* view = dynamic_cast<ossimImageViewAffineTransform*> (obj);
-   if(view)
-   {  
-      m_transform = view->m_transform;
-      m_inverseTransform = view->m_inverseTransform;
-      m_rotation = view->m_rotation;
-      m_scale = view->m_scale;
-      m_translate = view->m_translate;
-      m_pivot = view->m_pivot;
-   }
-   return (view!=0);
-}
-
-ossimObject* ossimImageViewAffineTransform::getView()
-{
-   return this;
-}
-
-const ossimObject* ossimImageViewAffineTransform::getView()const
-{
-   return this;
-}
-
-ossimDpt ossimImageViewAffineTransform::getInputMetersPerPixel()const
-{
-   return ossimDpt(1,1);
-}
-
-ossimDpt ossimImageViewAffineTransform::getOutputMetersPerPixel()const
-{
-   ossimDpt result;
-   
-   result.makeNan();
-   
-   return result;
-}
-
-bool ossimImageViewAffineTransform::isEqualTo(const ossimObject& obj, ossimCompareType compareType)const
-{
-   bool result = ossimImageViewTransform::isEqualTo(obj,compareType);
-   
-   if(result)
-   {
-      result = false;
-      const ossimImageViewAffineTransform* rhs = dynamic_cast<const ossimImageViewAffineTransform*> (&obj);
-      if(rhs)
-      {
-         result = (ossim::almostEqual(m_rotation, rhs->m_rotation)&&
-                   (m_scale.isEqualTo(rhs->m_scale))&&
-                   (m_translate.isEqualTo(rhs->m_translate))&&
-                   (m_pivot.isEqualTo(rhs->m_pivot))
-                   );  
-      }
-   }
-   
-   return result;
-}
diff --git a/src/ossim/projection/ossimImageViewProjectionTransform.cpp b/src/ossim/projection/ossimImageViewProjectionTransform.cpp
deleted file mode 100644
index 77ef68d..0000000
--- a/src/ossim/projection/ossimImageViewProjectionTransform.cpp
+++ /dev/null
@@ -1,507 +0,0 @@
-//*****************************************************************************
-// FILE: ossimImageViewProjectionTransform.cc
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// AUTHOR: Garrett Potts
-//         Oscar Kramer (oscar at krameranalytic.com)
-//
-// DESCRIPTION: Contains declaration of ossimImageViewProjectionTransform.
-//    This class provides an image to view transform that utilizes two
-//    independent 2D-to-3D projections. Intended for transforming view to
-//    geographic "world" space to input image space.
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimImageViewProjectionTransform.cpp 20489 2012-01-23 20:07:56Z dburken $
-//
-#include <ossim/projection/ossimImageViewProjectionTransform.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimGeoPolygon.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimPolyArea2d.h>
-#include <ossim/projection/ossimEquDistCylProjection.h>
-#include <cmath>
-
-RTTI_DEF1(ossimImageViewProjectionTransform,
-          "ossimImageViewProjectionTransform",
-          ossimImageViewTransform);
-
-//*****************************************************************************
-//  CONSTRUCTOR: ossimImageViewProjectionTransform
-//*****************************************************************************
-ossimImageViewProjectionTransform::ossimImageViewProjectionTransform
-(  ossimImageGeometry* imageGeometry, ossimImageGeometry* viewGeometry)
-:  m_imageGeometry(imageGeometry),
-   m_viewGeometry(viewGeometry)
-{
-}
-
-//*****************************************************************************
-//  CONSTRUCTOR: ossimImageViewProjectionTransform
-//*****************************************************************************
-ossimImageViewProjectionTransform::
-ossimImageViewProjectionTransform(const ossimImageViewProjectionTransform& src)
-: ossimImageViewTransform(src),
-  m_imageGeometry(src.m_imageGeometry),
-  m_viewGeometry(src.m_viewGeometry)
-{
-}
-
-//*****************************************************************************
-//  DESTRUCTOR: ~ossimImageViewProjectionTransform
-//*****************************************************************************
-ossimImageViewProjectionTransform::~ossimImageViewProjectionTransform()
-{
-}
-
-//*****************************************************************************
-//  Workhorse of the object. Converts image-space to view-space.
-//*****************************************************************************
-void ossimImageViewProjectionTransform::imageToView(const ossimDpt& ip, ossimDpt& vp) const
-{
-   // Check for same geometries on input and output (this includes NULL geoms):
-   if (m_imageGeometry == m_viewGeometry)
-   {
-      vp = ip;
-      return;
-   }
-   
-   // Otherwise we need access to good geoms. Check for a bad geometry object:
-   if (!m_imageGeometry || !m_viewGeometry)
-   {
-      vp.makeNan();
-      return;
-   }
-   
-   // Check for same projection on input and output sides to save projection to ground:
-   if (m_imageGeometry->getProjection() == m_viewGeometry->getProjection())
-   {
-      // Check for possible same 2D transforms as well:
-      if ( (m_imageGeometry->getTransform() == m_viewGeometry->getTransform()) &&
-           (m_imageGeometry->decimationFactor(0) == m_viewGeometry->decimationFactor(0)) )
-      {
-         vp = ip;
-         return;
-      }
-      
-      // Not the same 2D transform, so just perform local-image -> full-image -> local-view:
-      ossimDpt fp;
-      m_imageGeometry->rnToFull(ip, 0, fp);
-      m_viewGeometry->fullToRn(fp, 0, vp);
-      return;
-   }
-   
-   //---
-   // Completely different left and right side geoms (typical situation).
-   // Need to project to ground.
-   //---
-   ossimGpt gp;
-   m_imageGeometry->localToWorld(ip, gp);
-   m_viewGeometry->worldToLocal(gp, vp);
-
-#if 0 /* Please leave for debug. */
-   cout <<"DEBUG ossimImageViewProjectionTransform::imageToView:"
-        <<"\n    ip: "<<ip
-        <<"\n    gp: "<<gp
-        <<"\n    vp: "<<vp<<std::endl;
-#endif
-}
-
-//*****************************************************************************
-//  Other workhorse of the object. Converts view-space to image-space.
-//*****************************************************************************
-void ossimImageViewProjectionTransform::viewToImage(const ossimDpt& vp, ossimDpt& ip) const
-{
-   // Check for same geometries on input and output (this includes NULL geoms):
-   if (m_imageGeometry == m_viewGeometry)
-   {
-      ip = vp;
-      return;
-   }
-   
-   // Otherwise we need access to good geoms. Check for a bad geometry object:
-   if (!m_imageGeometry || !m_viewGeometry)
-   {
-      ip.makeNan();
-      return;
-   }
-   
-   // Check for same projection on input and output sides to save projection to ground:
-   const ossimProjection* iproj = m_imageGeometry->getProjection();
-   const ossimProjection* vproj = m_viewGeometry->getProjection();
-   if ((iproj && vproj && iproj->isEqualTo(*vproj)) || (iproj == vproj))
-   {
-      // Check for possible same 2D transforms as well:
-      const ossim2dTo2dTransform* ixform = m_imageGeometry->getTransform();
-      const ossim2dTo2dTransform* vxform = m_viewGeometry->getTransform();
-      if (((ixform && vxform && ixform->isEqualTo(*vxform)) || (ixform == vxform)) &&
-          (m_imageGeometry->decimationFactor(0) == m_viewGeometry->decimationFactor(0)))
-      {
-         ip = vp;
-         return;
-      }
-      
-      // Not the same 2D transform, so just perform local-image -> full-image -> local-view:
-      ossimDpt fp;
-      m_viewGeometry->rnToFull(vp, 0, fp);
-      m_imageGeometry->fullToRn(fp, 0, ip);
-      return;
-   }
-   
-   //---
-   // Completely different left and right side geoms (typical situation).
-   // Need to project to ground.
-   //---
-   ossimGpt gp;
-   m_viewGeometry->localToWorld(vp, gp);
-   m_imageGeometry->worldToLocal(gp, ip);
-
-#if 0 /* Please leave for debug. */
-   cout <<"DEBUG ossimImageViewProjectionTransform::viewToImage:"
-        <<"\n    vp: "<<vp
-        <<"\n    gp: "<<gp
-        <<"\n    ip: "<<ip
-        <<std::endl;
-#endif
-}
-
-//*****************************************************************************
-//! OLK: Not sure where this is used, but needed to satisfy ossimViewInterface base class.
-//*****************************************************************************
-bool ossimImageViewProjectionTransform::setView(ossimObject* baseObject)
-{
-   ossimImageGeometry* g = dynamic_cast<ossimImageGeometry*>(baseObject);
-   bool new_view_set = false;
-   if (g)
-   {
-      m_viewGeometry = g;
-      new_view_set = true;
-   }
-   else
-   {
-      ossimProjection* proj = dynamic_cast<ossimProjection*>(baseObject);
-      if(proj)
-      {
-         if(m_viewGeometry.valid())
-         {
-            m_viewGeometry->setProjection(proj);
-         }
-         else
-         {
-            m_viewGeometry = new ossimImageGeometry(0, proj);
-         }
-
-         new_view_set = true;
-      }
-   }
-
-   if ( m_viewGeometry.valid() && m_viewGeometry->getImageSize().hasNans() )
-   {
-      // Sets the view image size from the image geometry if present.
-      initializeViewSize();
-   } 
-
-   return new_view_set;
-}
-
-//*****************************************************************************
-//  Dumps contents to stream
-//*****************************************************************************
-std::ostream& ossimImageViewProjectionTransform::print(std::ostream& out)const
-{
-    out << "ossimImageViewProjectionTransform::print: ..... entered " <<endl;
-
-    if(m_imageGeometry.valid())
-    {
-        out << "  Input Image (LEFT) Geometry: " << endl;
-        m_imageGeometry->print(out);
-    }
-    else
-    {
-        out << "  None defined." << endl;
-    }
-    if(m_viewGeometry.valid())
-    {
-        out << "Output View (RIGHT) Geometry: " << endl;
-        m_viewGeometry->print(out);
-    }
-    else
-    {
-        out << "  None defined." << endl;
-    }
-    return out;
-}
-
-//**************************************************************************************************
-// Converts the local image space rect into bounding view-space rect
-//**************************************************************************************************
-ossimDrect ossimImageViewProjectionTransform::getImageToViewBounds(const ossimDrect& imageRect)const
-{
-    // Let base class try:
-   ossimDrect result = ossimImageViewTransform::getImageToViewBounds(imageRect);
-
-   // If not successful, compute using input and output geometries:
-   if (result.hasNans() && m_imageGeometry.valid() && m_viewGeometry.valid() &&
-       m_imageGeometry->hasProjection() && m_viewGeometry->hasProjection())
-   {
-      ossimGeoPolygon viewClip;
-      m_viewGeometry->getProjection()->getGroundClipPoints(viewClip);
-      if(viewClip.size())
-      {
-         std::vector<ossimGpt> imageGpts(4);
-         m_imageGeometry->localToWorld(imageRect.ul(), imageGpts[0]);
-         m_imageGeometry->localToWorld(imageRect.ur(), imageGpts[1]);
-         m_imageGeometry->localToWorld(imageRect.lr(), imageGpts[2]);
-         m_imageGeometry->localToWorld(imageRect.ll(), imageGpts[3]);
-
-         const ossimDatum* viewDatum = m_viewGeometry->getProjection()->origin().datum();
-         imageGpts[0].changeDatum(viewDatum);
-         imageGpts[1].changeDatum(viewDatum);
-         imageGpts[2].changeDatum(viewDatum);
-         imageGpts[3].changeDatum(viewDatum);
-         
-         ossimPolyArea2d viewPolyArea(viewClip.getVertexList());
-         ossimPolyArea2d imagePolyArea(imageGpts);
-         viewPolyArea &= imagePolyArea;
-         std::vector<ossimPolygon> visiblePolygons;
-         viewPolyArea.getVisiblePolygons(visiblePolygons);
-         if(visiblePolygons.size())
-         {
-            std::vector<ossimDpt> vpts;
-            ossim_uint32 idx = 0;
-            for(idx=0; idx<visiblePolygons[0].getNumberOfVertices();++idx)
-            {
-               ossimDpt tempPt;
-               ossimGpt gpt(visiblePolygons[0][idx].lat, visiblePolygons[0][idx].lon, 0.0,  viewDatum);
-               m_viewGeometry->worldToLocal(gpt, tempPt);
-               vpts.push_back(tempPt);
-            }
-            result = ossimDrect(vpts);
-         }
-      }
-   }
-   return result;
-}
-
-//*****************************************************************************
-//  METHOD: ossimImageViewProjectionTransform::loadState
-//*****************************************************************************
-bool ossimImageViewProjectionTransform::loadState(const ossimKeywordlist& kwl,
-                                                  const char* prefix)
-{
-   bool result = ossimImageViewTransform::loadState(kwl, prefix);
-   if(result)
-   {
-      ossimString imagePrefix = ossimString(prefix)+"image_geometry.";
-      ossimString viewPrefix  = ossimString(prefix)+"view_geometry.";
-      if(kwl.numberOf(imagePrefix.c_str())>0)
-      {
-         m_imageGeometry = new ossimImageGeometry();
-         m_imageGeometry->loadState(kwl, imagePrefix.c_str());
-      }
-      if(kwl.numberOf(viewPrefix.c_str())>0)
-      {
-         m_viewGeometry = new ossimImageGeometry();
-         m_viewGeometry->loadState(kwl, viewPrefix.c_str());
-      }
-      
-   }
-   
-   return result;
-}
-
-//**************************************************************************************************
-// 
-//**************************************************************************************************
-bool ossimImageViewProjectionTransform::saveState(ossimKeywordlist& kwl,
-                                                  const char* prefix)const
-{
-   ossimString imagePrefix = ossimString(prefix)+"image_geometry.";
-   ossimString viewPrefix  = ossimString(prefix)+"view_geometry.";
-   
-   if(m_imageGeometry.valid())
-   {
-      m_imageGeometry->saveState(kwl, imagePrefix.c_str());
-   }
-   if(m_viewGeometry.valid())
-   {
-      m_viewGeometry->saveState(kwl, viewPrefix.c_str());
-   }
-   return ossimImageViewTransform::saveState(kwl, prefix);
-}
-
-//**************************************************************************************************
-// Returns the GSD of input image.
-//**************************************************************************************************
-ossimDpt ossimImageViewProjectionTransform::getInputMetersPerPixel() const
-{
-    ossimDpt result;
-
-    if (m_imageGeometry.valid() && m_imageGeometry->hasProjection())
-        result = m_imageGeometry->getProjection()->getMetersPerPixel();
-    else
-        result.makeNan();
-
-    return result;
-}
-
-//**************************************************************************************************
-// Returns the GSD of the output view.
-//**************************************************************************************************
-ossimDpt ossimImageViewProjectionTransform::getOutputMetersPerPixel() const
-{
-    ossimDpt result;
-
-    if(m_viewGeometry.valid() && m_viewGeometry->hasProjection())
-        result = m_viewGeometry->getProjection()->getMetersPerPixel();
-    else
-        result.makeNan();
-
-    return result;
-}
-
-// Initialize view geometry image size from image geometry.
-bool ossimImageViewProjectionTransform::initializeViewSize()
-{
-   bool result = false;
-
-   if ( m_imageGeometry.valid() )
-   {
-      ossimIrect imageRect( 0, 0,
-                            m_imageGeometry->getImageSize().x - 1,
-                            m_imageGeometry->getImageSize().y - 1);
-      
-      if ( (imageRect.hasNans() == false) && m_viewGeometry.valid() )
-      {
-         ossimRefPtr<ossimProjection> viewProj = m_viewGeometry->getProjection();
-         if ( viewProj.valid() )
-         {
-            ossimIpt size;
-            size.makeNan();
-            
-            const ossimEquDistCylProjection* eqProj =
-               dynamic_cast<const ossimEquDistCylProjection*>( viewProj.get() );
-            if ( eqProj )
-            {
-               // Specialized to take into consideration a date line crossing.
-               
-               // Get the ground points we need:
-               ossimDpt iRight(imageRect.ul().x+1, imageRect.ul().y);
-               ossimDpt iDown(imageRect.ul().x, imageRect.ul().y+1);
-               ossimGpt gul;
-               ossimGpt gur; 
-               ossimGpt glr;
-               ossimGpt gll;
-               ossimGpt gRight;
-               ossimGpt gDown;
-               ossim_float64 hdd; // height decimal degrees
-               ossim_float64 wdd; // width decimal degrees
-               ossim_float64 leftLon;
-               ossim_float64 rightLon;
-               
-               m_imageGeometry->localToWorld( imageRect.ul(), gul );
-               m_imageGeometry->localToWorld( imageRect.ur(), gur );
-               m_imageGeometry->localToWorld( imageRect.lr(), glr );
-               m_imageGeometry->localToWorld( imageRect.ll(), gll );
-               m_imageGeometry->localToWorld( iRight, gRight );
-               m_imageGeometry->localToWorld( iDown, gDown );
-               
-               //---
-               // Determine the direction of the image and get the geographic bounding box.
-               // For the longitude consider a date line crossing.
-               //---
-               if ( gul.lat > gDown.lat ) // oriented north up
-               {
-                  if ( gul.lat >= gRight.lat ) // straight up or leaning right
-                  {
-                     hdd      = gul.lat - glr.lat;
-                     leftLon  = gll.lon;
-                     rightLon = gur.lon;
-                  }
-                  else // leaning left
-                  {
-                     hdd      = gur.lat - gll.lat;
-                     leftLon  = gul.lon;
-                     rightLon = glr.lon;
-                  }
-               }
-               else // south or on side
-               {
-                  if ( gRight.lat >= gul.lat ) // straight down or leaning right
-                  {
-                     hdd      = glr.lat - gul.lat;
-                     leftLon  = gur.lon;
-                     rightLon = gll.lon;
-                  }
-                  else // leaning left
-                  {
-                     hdd      = gll.lat - gur.lat;
-                     leftLon  = glr.lon;
-                     rightLon = gul.lon;
-                  }
-               }
-               
-               if ( rightLon > leftLon )
-               {
-                  wdd = rightLon - leftLon;
-               }
-               else // Date line cross:
-               {
-                  wdd = rightLon + 360.0 - leftLon;
-               }
-
-               //---
-               // Add one pixel width/height to the point to point size to make it edge to edge
-               // before dividing by gsd to get the size.  The view projection gsd is used here
-               // since the view could be a different resolution than the input projection.
-               //---
-               size.x = ossim::round<ossim_int32>(
-                  ( wdd + eqProj->getDecimalDegreesPerPixel().x ) /
-                  eqProj->getDecimalDegreesPerPixel().x );
-               size.y = ossim::round<ossim_int32>(
-                  ( hdd + eqProj->getDecimalDegreesPerPixel().y ) /
-                  eqProj->getDecimalDegreesPerPixel().y );
-               
-#if 0 /* Please leave for debug: */
-               cout << "\nwdd: " << wdd
-                    << "\nhdd: " << hdd
-                    << "\ngul: " << gul
-                    << "\ngur: " << gur
-                    << "\nglr: " << glr
-                    << "\ngll: " << gll
-                    << endl;
-#endif
-            }
-            else // Not an ossimEquDistCylProjection:
-            {
-               ossimDrect rect = getImageToViewBounds( imageRect );
-               size.x = ossim::round<ossim_int32>( rect.width()  );
-               size.y = ossim::round<ossim_int32>( rect.height() );
-            }
-
-#if 0 /* Please leave for debug: */
-            cout << "m_imageGeometry:\n" << *(m_imageGeometry.get())
-                 << "\n\nm_viewGeometry:\n" << *(m_imageGeometry.get())
-                 << "\n\ncomputed view size: " << size << endl;
-#endif
-            
-            if ( size.hasNans() == false )
-            {
-               m_viewGeometry->setImageSize( size );
-               result = true;
-            }
-            
-         } // Matches: if ( viewProj.valid() )
-
-      } // Matches: if ( (imageRect.hasNans() == false) ... 
-      
-   } // Matches: if ( m_imageGeometry.valid() && ...
-
-   return result;
-   
-} // End:  bool ossimImageViewProjectionTransform::initializeViewSize()
diff --git a/src/ossim/projection/ossimImageViewTransform.cpp b/src/ossim/projection/ossimImageViewTransform.cpp
deleted file mode 100644
index 94475c7..0000000
--- a/src/ossim/projection/ossimImageViewTransform.cpp
+++ /dev/null
@@ -1,278 +0,0 @@
-#include <math.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/projection/ossimImageViewTransform.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimIrect.h>
-
-RTTI_DEF2(ossimImageViewTransform, "ossimImageViewTransform", ossim2dTo2dTransform, ossimViewInterface)
-
-ossimImageViewTransform::ossimImageViewTransform()
-    :
-       ossim2dTo2dTransform(),
-       ossimViewInterface(NULL)
-{
-   ossimViewInterface::theObject = this;
-}
-
-void ossimImageViewTransform::forward(const ossimDpt& input,
-                                      ossimDpt& output) const
-{
-   imageToView(input, output);
-}
-
-void ossimImageViewTransform::inverse(const ossimDpt& input,
-                                      ossimDpt& output) const
-{
-   viewToImage(input, output);
-}
-
-void ossimImageViewTransform::imageToView(const ossimDpt& imagePoint,
-                                          ossimDpt&       viewPoint)const
-{
-   viewPoint = imagePoint;
-}
-
-void ossimImageViewTransform::viewToImage(const ossimDpt& viewPoint,
-                                          ossimDpt&       imagePoint)const
-{
-   ossim2dTo2dTransform::inverse(viewPoint, imagePoint);
-}
-
-ossimDpt ossimImageViewTransform::imageToView(const ossimDpt& imagePoint)const
-{
-   ossimDpt tempPt;
-   
-   imageToView(imagePoint, tempPt);
-   
-   return tempPt;
-}
-
-ossimDpt ossimImageViewTransform::viewToImage(const ossimDpt& viewPoint)const
-{
-   ossimDpt tempPt;
-   
-   viewToImage(viewPoint, tempPt);
-   
-   return tempPt;
-}
-
-void ossimImageViewTransform::getRoundTripErrorView(ossimDpt& result,
-                                                    const ossimDpt& /* viewPt */)const
-{
-   result = ossimDpt(0,0);
-}
-
-ossimDpt ossimImageViewTransform::getRoundTripErrorView(const ossimDpt& viewPt)const
-{
-   ossimDpt result;
-   getRoundTripErrorView(result, viewPt);
-   return result;
-}
-
-void ossimImageViewTransform::getRoundTripErrorImage(ossimDpt& result,
-                                                     const ossimDpt& /* imagePt */)const
-{
-   result = ossimDpt(0,0);
-}
-
-ossimDpt ossimImageViewTransform::getRoundTripErrorImage(const ossimDpt& imagePt)const
-{
-   ossimDpt result;
-   getRoundTripErrorView(result, imagePt);
-   return result;
-}
-  
-bool ossimImageViewTransform::loadState(const ossimKeywordlist& kwl,
-                                        const char* prefix)
-{
-   return ossim2dTo2dTransform::loadState(kwl, prefix);
-}
-
-bool ossimImageViewTransform::saveState(ossimKeywordlist& kwl,
-                                        const char* prefix)const
-{
-   return ossim2dTo2dTransform::saveState(kwl, prefix);
-}
-
-void ossimImageViewTransform::getScaleChangeImageToView(ossimDpt& result,
-                                                        const ossimDrect& imageRect)
-{
-   result.makeNan();
-   if(!imageRect.hasNans())
-   {
-      ossimDpt vul;
-      ossimDpt vur;
-      ossimDpt vlr;
-      ossimDpt vll;
-
-      imageToView(imageRect.ul(),
-                  vul);
-      imageToView(imageRect.ur(),
-                  vur);
-      imageToView(imageRect.lr(),
-                  vlr);
-      imageToView(imageRect.ll(),
-                  vll);
-
-      if(!vul.hasNans()&&
-         !vur.hasNans()&&
-         !vlr.hasNans()&&
-         !vll.hasNans())
-      {
-         
-         double deltaTop    = (vul - vur).length();
-         double deltaBottom = (vll - vlr).length();
-         double deltaRight  = (vur - vlr).length();
-         
-         double w = imageRect.width();
-         double h = imageRect.height();
-         result.x = (deltaTop/w + deltaBottom/w)*.5;
-         result.y = (deltaRight/h + deltaRight/h)*.5;
-      }
-   }
-}
-
-void ossimImageViewTransform::getScaleChangeViewToImage(ossimDpt& result,
-                                                        const ossimDrect& viewRect)
-{
-   result.makeNan();
-   if(!viewRect.hasNans())
-   {
-      ossimDpt iul;
-      ossimDpt iur;
-      ossimDpt ilr;
-      ossimDpt ill;
-
-      imageToView(viewRect.ul(),
-                  iul);
-      imageToView(viewRect.ur(),
-                  iur);
-      imageToView(viewRect.lr(),
-                  ilr);
-      imageToView(viewRect.ll(),
-                  ill);
-
-      if(!iul.hasNans()&&
-         !iur.hasNans()&&
-         !ilr.hasNans()&&
-         !ill.hasNans())
-      {
-         
-         double deltaTop    = (iul - iur).length();
-         double deltaBottom = (ill - ilr).length();
-         double deltaRight  = (iur - ilr).length();
-         
-         double w = viewRect.width();
-         double h = viewRect.height();
-         result.x = (deltaTop/w + deltaBottom/w)*.5;
-         result.y = (deltaRight/h + deltaRight/h)*.5;
-      }
-   }
-}
-
-void ossimImageViewTransform::getImageToViewScale(ossimDpt& resultScale,
-						  const ossimDpt& imagePoint,
-						  const ossimDpt& deltaImagePointXY)const
-{
-  ossimDpt p1 = imagePoint;
-  ossimDpt p2(imagePoint.x + deltaImagePointXY.x,
-	      imagePoint.y);
-  ossimDpt p3(imagePoint.x,
-	      imagePoint.y + deltaImagePointXY.y);
-  
-  ossimDpt transformedP1;
-  ossimDpt transformedP2;
-  ossimDpt transformedP3;
-
-  imageToView(p1, transformedP1);
-  imageToView(p2, transformedP2);
-  imageToView(p3, transformedP3);
-
-  ossimDpt deltaP1P2 = transformedP1 - transformedP2;
-  ossimDpt deltaP1P3 = transformedP1 - transformedP3;
- 
-  // now compute the distances.
-  double sumSquaredSqrtP1P2 = sqrt((deltaP1P2.x*deltaP1P2.x) +
-			       (deltaP1P2.y*deltaP1P2.y));
-  double sumSquaredSqrtP1P3 = sqrt((deltaP1P3.x*deltaP1P3.x) +
-			       (deltaP1P3.y*deltaP1P3.y));
-
-  resultScale.x = 0;
-  resultScale.y = 0;
-
-  if(sumSquaredSqrtP1P2 > FLT_EPSILON)
-    {
-      resultScale.x = sumSquaredSqrtP1P2/deltaImagePointXY.x;
-    }
-  if(sumSquaredSqrtP1P3 > FLT_EPSILON)
-    {
-      resultScale.y = sumSquaredSqrtP1P3/deltaImagePointXY.y;
-    }
-}
-
-void ossimImageViewTransform::getViewToImageScale(ossimDpt& resultScale,
-						  const ossimDpt& viewPoint,
-						  const ossimDpt& deltaViewPointXY)const
-{
-  ossimDpt p1 = viewPoint;
-  ossimDpt p2(viewPoint.x + deltaViewPointXY.x,
-	      viewPoint.y);
-  ossimDpt p3(viewPoint.x,
-	      viewPoint.y + deltaViewPointXY.y);
-
-  ossimDpt transformedP1;
-  ossimDpt transformedP2;
-  ossimDpt transformedP3;
-
-  viewToImage(p1, transformedP1);
-  viewToImage(p2, transformedP2);
-  viewToImage(p3, transformedP3);
-
-  ossimDpt deltaP1P2 = transformedP1 - transformedP2;
-  ossimDpt deltaP1P3 = transformedP1 - transformedP3;
-
-  // now compute the distances.
-  double sumSquaredSqrtP1P2 = sqrt((deltaP1P2.x*deltaP1P2.x) +
-                                   (deltaP1P2.y*deltaP1P2.y));
-  double sumSquaredSqrtP1P3 = sqrt((deltaP1P3.x*deltaP1P3.x) +
-                                   (deltaP1P3.y*deltaP1P3.y));
-
-  resultScale.x = 0;
-  resultScale.y = 0;
-
-  if(sumSquaredSqrtP1P2 > FLT_EPSILON)
-    {
-      resultScale.x = sumSquaredSqrtP1P2/deltaViewPointXY.x;
-    }
-  if(sumSquaredSqrtP1P3 > FLT_EPSILON)
-    {
-      resultScale.y = sumSquaredSqrtP1P3/deltaViewPointXY.y;
-    }
-}
-
-ossimDrect ossimImageViewTransform::getImageToViewBounds(const ossimDrect& imageRect)const
-{
-   ossimDpt p1;
-   ossimDpt p2;
-   ossimDpt p3;
-   ossimDpt p4;
-
-   imageToView(imageRect.ul(), p1);
-   imageToView(imageRect.ur(), p2);
-   imageToView(imageRect.lr(), p3);
-   imageToView(imageRect.ll(), p4);
-
-   return ossimDrect(p1, p2, p3, p4);
-}
-
-std::ostream& ossimImageViewTransform::print(std::ostream& out) const
-{
-   return out;
-}
-
-std::ostream& operator<<(std::ostream& out,
-                         const ossimImageViewTransform& data)
-{
-   return data.print(out);
-}
-
diff --git a/src/ossim/projection/ossimLensDistortion.cpp b/src/ossim/projection/ossimLensDistortion.cpp
deleted file mode 100644
index a5de567..0000000
--- a/src/ossim/projection/ossimLensDistortion.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2005 Garrett Potts
-//
-// LGPL
-// 
-// Author:  Garrett Potts
-//
-// Description:
-//
-// ossimLensDistortion
-//*******************************************************************
-//  $Id: ossimLensDistortion.cpp 15929 2009-11-16 18:20:46Z gpotts $
-#include <sstream>
-#include <ossim/projection/ossimLensDistortion.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimString.h>
-
-RTTI_DEF1(ossimLensDistortion, "ossimLensDistortion", ossim2dTo2dTransform);
-
-bool ossimLensDistortion::saveState(ossimKeywordlist& kwl,
-                                    const char* prefix)const
-{
-   ossim2dTo2dTransform::saveState(kwl, prefix);
-   
-   kwl.add(prefix,
-           "center",
-           ossimString::toString(theCenter.x) + " " + ossimString::toString(theCenter.y),
-           true);
-
-   return true;
-}
-
-bool ossimLensDistortion::loadState(const ossimKeywordlist& kwl,
-                                    const char* prefix)
-{
-   const char* center = kwl.find(prefix, "center");
-   theCenter.x = 0.0;
-   theCenter.y = 0.0;
-   
-   if(center)
-   {
-      std::vector<ossimString> splitString;
-      ossimString tempString(center);
-      tempString = tempString.trim();
-      tempString.split(splitString, " ");
-      if(splitString.size() == 2)
-      {
-         theCenter.x = splitString[0].toDouble();
-         theCenter.y = splitString[1].toDouble();
-      }
-   }
-
-   return ossim2dTo2dTransform::loadState(kwl, prefix);
-
-}
-
-void ossimLensDistortion::distort(const ossimDpt& input, ossimDpt& output)const
-{
-   int iters = 0;
-   
-   //***
-   // Begin with guess. Forward transform is defined as trasforming left to
-   // right. We are therefore solving for left:
-   //***
-   ossimDpt left (input);
-   ossimDpt left_dx;
-   ossimDpt left_dy;
-   ossimDpt right;
-   ossimDpt right_dx;
-   ossimDpt right_dy;
-   ossimDpt dr_dx;
-   ossimDpt dr_dy;
-   ossimDpt r_diff;
-   ossimDpt l_diff;
-   double inverse_norm;
-   
-   //***
-   // Begin iterations:
-   //***
-   do
-   {
-      //***
-      // establish perturbed image points about the guessed point:
-      //***
-      left_dx.x = left.x + 1.0;
-      left_dx.y = left.y;
-      left_dy.x = left.x;
-      left_dy.y = left.y + 1.0;
-      
-      //***
-      // Compute numerical partials at current guessed point:
-      //***
-      undistort(left,    right);
-      undistort(left_dx, right_dx);
-      undistort(left_dy, right_dy);
-      
-      dr_dx.x = (right_dx.x - right.x); //e
-      dr_dx.y = (right_dx.y - right.y); //g
-      dr_dy.x = (right_dy.x - right.x); //f
-      dr_dy.y = (right_dy.y - right.y); //h
-      
-      //***
-      // Test for convergence:
-      //***
-      r_diff = input - right;
-      
-      //***
-      // Compute linearized estimate of image point given gp delta:
-      //***
-      inverse_norm = dr_dy.u*dr_dx.v - dr_dx.u*dr_dy.v; // fg-eh
-      if (inverse_norm != 0)
-      {
-         l_diff.u = (-dr_dy.v*r_diff.u + dr_dy.u*r_diff.v)/inverse_norm;
-         l_diff.v = ( dr_dx.v*r_diff.u - dr_dx.u*r_diff.v)/inverse_norm;
-         left += l_diff;
-      }
-      else
-      {
-         l_diff.u = 0;
-         l_diff.v = 0;
-      }
-      
-      iters++;
-      
-   } while (((fabs(l_diff.u) > theConvergenceThreshold) ||
-             (fabs(l_diff.v) > theConvergenceThreshold)) &&
-            (iters < theMaxIterations));
-   
-   
-   output = left;
-}
-
diff --git a/src/ossim/projection/ossimMapProjection.cpp b/src/ossim/projection/ossimMapProjection.cpp
deleted file mode 100644
index 251258c..0000000
--- a/src/ossim/projection/ossimMapProjection.cpp
+++ /dev/null
@@ -1,1670 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-// Base class for all map projections.
-// 
-//*******************************************************************
-//  $Id: ossimMapProjection.cpp 20154 2011-10-13 19:00:18Z dburken $
-
-#include <iostream>
-#include <cstdlib>
-#include <iomanip>
-#include <sstream>
-
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimEpsgProjectionFactory.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimDatumFactoryRegistry.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimEllipsoid.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/elevation/ossimElevManager.h>
-#include <ossim/base/ossimMatrix3x3.h>
-#include <ossim/base/ossimUnitConversionTool.h>
-#include <ossim/base/ossimUnitTypeLut.h>
-#include <ossim/base/ossimTrace.h>
-
-static ossimTrace traceDebug("ossimMapProjection:debug");
-
-// RTTI information for the ossimMapProjection
-RTTI_DEF1(ossimMapProjection, "ossimMapProjection" , ossimProjection);
-
-ossimMapProjection::ossimMapProjection(const ossimEllipsoid& ellipsoid,
-                                       const ossimGpt& origin)
-   :theEllipsoid(ellipsoid),
-    theOrigin(origin),
-    theDatum(origin.datum()), // force no shifting
-    theUlGpt(0, 0),
-    theUlEastingNorthing(0, 0),
-    theFalseEastingNorthing(0, 0),
-    thePcsCode(0),
-    theElevationLookupFlag(false),
-    theModelTransform(),
-    theInverseModelTransform(),
-    theModelTransformUnitType(OSSIM_UNIT_UNKNOWN),
-    theProjectionUnits(OSSIM_METERS) 
-{
-   theUlGpt = theOrigin;
-   theUlEastingNorthing.makeNan();
-   theMetersPerPixel.makeNan();
-   theDegreesPerPixel.makeNan();
-}
-
-ossimMapProjection::ossimMapProjection(const ossimMapProjection& src)
-      : ossimProjection(src),
-        theEllipsoid(src.theEllipsoid),
-        theOrigin(src.theOrigin),
-        theDatum(src.theDatum),
-        theMetersPerPixel(src.theMetersPerPixel),
-        theDegreesPerPixel(src.theDegreesPerPixel),
-        theUlGpt(src.theUlGpt),
-        theUlEastingNorthing(src.theUlEastingNorthing),
-        theFalseEastingNorthing(src.theFalseEastingNorthing),
-        thePcsCode(src.thePcsCode),
-        theElevationLookupFlag(false),
-        theModelTransform(src.theModelTransform),
-        theInverseModelTransform(src.theInverseModelTransform),
-        theModelTransformUnitType(src.theModelTransformUnitType),
-        theProjectionUnits(src.theProjectionUnits)
-{
-}
-
-ossimMapProjection::~ossimMapProjection()
-{
-}
-
-ossimGpt ossimMapProjection::origin()const
-{
-   return theOrigin;
-}
-
-void ossimMapProjection::setPcsCode(ossim_uint32 pcsCode)
-{
-   thePcsCode = pcsCode;
-}
-
-ossim_uint32 ossimMapProjection::getPcsCode() const
-{
-   // The PCS code is not always set when the projection is instantiated with explicit parameters,
-   // since the code is only necessary when looking up those parameters in a database. However, it
-   // is still necessary to recognize when an explicit projection coincides with an EPSG-specified
-   // projection, and assign our PCS code to match it. So let's take this opportunity now to make 
-   // sure the PCS code is properly initialized.
-   if (thePcsCode == 0)
-   {
-      thePcsCode = ossimEpsgProjectionDatabase::instance()->findProjectionCode(*this);
-      if (thePcsCode == 0)
-         thePcsCode = 32767; // user-defined (non-EPSG) projection
-   }
-  
-   if (thePcsCode == 32767)
-      return 0; // 32767 only used internally. To the rest of OSSIM, the PCS=0 is undefined
-   
-   return thePcsCode;
-}
-
-ossimString ossimMapProjection::getProjectionName() const
-{
-   return getClassName();
-}
-
-double ossimMapProjection::getA() const
-{
-   return theEllipsoid.getA();
-}
-
-double ossimMapProjection::getB() const
-{
-   return theEllipsoid.getB();
-}
-
-double ossimMapProjection::getF() const
-{
-   return theEllipsoid.getFlattening();
-}
-
-ossimDpt ossimMapProjection::getMetersPerPixel() const
-{
-   return theMetersPerPixel;
-}
-
-const ossimDpt& ossimMapProjection::getDecimalDegreesPerPixel() const
-{
-   return theDegreesPerPixel;
-}
-
-const ossimDpt& ossimMapProjection::getUlEastingNorthing() const
-{
-   return theUlEastingNorthing;
-}
-
-const ossimGpt&   ossimMapProjection::getUlGpt() const
-{
-   return theUlGpt;
-}
-
-const ossimGpt& ossimMapProjection::getOrigin() const
-{
-  return theOrigin;
-}
-
-const ossimDatum* ossimMapProjection::getDatum() const
-{
-   return theDatum;
-}
-
-bool ossimMapProjection::isGeographic()const
-{
-   return false;
-}
-
-void ossimMapProjection::setEllipsoid(const ossimEllipsoid& ellipsoid)
-{
-   theEllipsoid = ellipsoid; update();
-}
-
-void ossimMapProjection::setAB(double a, double b)
-{
-   theEllipsoid.setA(a); theEllipsoid.setB(b); update();
-}
-
-void ossimMapProjection::setDatum(const ossimDatum* datum)
-{
-
-   if (!datum || (*theDatum == *datum))
-      return;
-
-   theDatum = datum; 
-   theEllipsoid = *(theDatum->ellipsoid());
-
-   // Change the datum of the ossimGpt data members:
-   theOrigin.changeDatum(theDatum);
-   theUlGpt.changeDatum(theDatum);
-
-   update();
-
-   // A change of datum usually implies a change of EPSG codes. Reset the PCS code. It will be
-   // reestablished as needed in the getPcsCode() method:
-   thePcsCode = 0;
-}
-
-void ossimMapProjection::setOrigin(const ossimGpt& origin)
-{
-   // Set the origin and since the origin has a datum which in turn has
-   // an ellipsoid, sync them up.
-   // NOTE: Or perhaps we need to change the datum of the input origin to that of theDatum? (OLK 05/11)
-   theOrigin    = origin;
-   theOrigin.changeDatum(theDatum);
-      
-   update();
-}
-
-//*****************************************************************************
-//  METHOD: ossimMapProjection::assign
-//
-//*****************************************************************************
-void ossimMapProjection::assign(const ossimProjection &aProjection)
-{
-   if(&aProjection!=this)
-   {
-      ossimKeywordlist kwl;
-
-      aProjection.saveState(kwl);
-      loadState(kwl);
-   }
-}
-
-//*****************************************************************************
-//  METHOD: ossimMapProjection::update
-//
-//*****************************************************************************
-void ossimMapProjection::update()
-{
-   // if the delta lat and lon per pixel is set then
-   // check to see if the meters were set.
-   //
-   if( hasModelTransform() )
-   {
-      updateFromTransform();
-   }
-   else if( theDegreesPerPixel.hasNans() == false )
-   {
-      if(theMetersPerPixel.hasNans())
-      {
-         computeMetersPerPixel();
-      }
-   }
-   else if(!theMetersPerPixel.hasNans())
-   {
-      computeDegreesPerPixel();
-   }
-   // compute the tie points if not already computed
-   //
-   // The tiepoint was specified either as easting/northing or lat/lon. Need to initialize the one
-   // that has not been assigned yet:
-   if (theUlEastingNorthing.hasNans() && !theUlGpt.hasNans())
-      theUlEastingNorthing = forward(theUlGpt);
-   else if (theUlGpt.hasNans() && !theUlEastingNorthing.hasNans())
-      theUlGpt = inverse(theUlEastingNorthing);
-   else if (theUlGpt.hasNans() && theUlEastingNorthing.hasNans())
-   {
-      theUlGpt = theOrigin;
-      theUlEastingNorthing = forward(theUlGpt);
-   }
-}
-
-void ossimMapProjection::updateFromTransform()
-{
-   if ( hasModelTransform() )
-   {
-      const NEWMAT::Matrix& m = theModelTransform.getData();
-      ossimDpt ls1(0, 0);
-      ossimDpt ls2(1, 0);
-      ossimDpt ls3(0, 1);
-      ossimGpt wpt1;
-      ossimGpt wpt2;
-      lineSampleToWorld(ls1, wpt1);
-      ossimDpt mpt1(m[0][0]*ls1.x + m[0][1]*ls1.y + m[0][3],
-                    m[1][0]*ls1.x + m[1][1]*ls1.y + m[1][3]);
-      ossimDpt mpt2(m[0][0]*ls2.x + m[0][1]*ls2.y + m[0][3],
-                    m[1][0]*ls2.x + m[1][1]*ls2.y + m[1][3]);
-      ossimDpt mpt3(m[0][0]*ls3.x + m[0][1]*ls3.y + m[0][3],
-                    m[1][0]*ls3.x + m[1][1]*ls3.y + m[1][3]);
-      
-      double len = 1.0;
-      double len2 = 1.0;
-      switch(theModelTransformUnitType)
-      {
-         case OSSIM_DEGREES:
-         case OSSIM_MINUTES:
-         case OSSIM_SECONDS:
-         case OSSIM_RADIANS:
-         {
-            ossimUnitConversionTool ut;
-            len  = (mpt1-mpt2).length();
-            len2  = (mpt1-mpt3).length();
-            ut.setValue((len+len2)*.5, theModelTransformUnitType);
-            len = ut.getValue(OSSIM_DEGREES);
-            theDegreesPerPixel = ossimDpt(len, len);
-            theUlGpt = wpt1;
-            computeMetersPerPixel();
-            break;
-         }
-         default:
-         {
-            ossimUnitConversionTool ut;
-            len  = (mpt1-mpt2).length();
-            len2  = (mpt1-mpt3).length();
-            ut.setValue(mpt1.x, theModelTransformUnitType);
-            mpt1.x = ut.getValue(OSSIM_METERS);
-            ut.setValue(mpt1.y, theModelTransformUnitType);
-            mpt1.y = ut.getValue(OSSIM_METERS);
-            ut.setValue((len+len2)*.5, theModelTransformUnitType);
-            len = ut.getValue(OSSIM_METERS);
-            theMetersPerPixel = ossimDpt(len, len);
-            theUlEastingNorthing = mpt1;
-            computeDegreesPerPixel();
-            break;
-         }
-      }
-      theUlGpt = wpt1;
-   }
-}
-
-void ossimMapProjection::applyScale(const ossimDpt& scale,
-                                    bool recenterTiePoint)
-{
-   ossimDpt mapTieDpt;
-   ossimGpt mapTieGpt;
-   if (recenterTiePoint)
-   {
-      if (isGeographic())
-      {
-         mapTieGpt = getUlGpt();
-         mapTieGpt.lat += theDegreesPerPixel.lat/2.0;
-         mapTieGpt.lon -= theDegreesPerPixel.lon/2.0;
-      }
-      else
-      {
-         mapTieDpt = getUlEastingNorthing();
-         mapTieDpt.x -= theMetersPerPixel.x/2.0;
-         mapTieDpt.y += theMetersPerPixel.y/2.0;
-      }
-   }
-
-   theDegreesPerPixel.x *= scale.x;
-   theDegreesPerPixel.y *= scale.y;
-   theMetersPerPixel.x  *= scale.x;
-   theMetersPerPixel.y  *= scale.y;
-
-   if ( recenterTiePoint )
-   {
-      if (isGeographic())
-      {
-         mapTieGpt.lat -= theDegreesPerPixel.lat/2.0;
-         mapTieGpt.lon += theDegreesPerPixel.lon/2.0;
-         setUlTiePoints(mapTieGpt);
-      }
-      else
-      {
-         mapTieDpt.x += theMetersPerPixel.x/2.0;
-         mapTieDpt.y -= theMetersPerPixel.y/2.0;
-         setUlTiePoints(mapTieDpt);
-      }
-   }
-
-   if (theModelTransformUnitType != OSSIM_UNIT_UNKNOWN)
-   {
-      theModelTransform.getData()[0][0] = theModelTransform.getData()[0][0]*scale.x;
-      theModelTransform.getData()[1][1] = theModelTransform.getData()[1][1]*scale.y;
-
-      theInverseModelTransform = theModelTransform;
-      theInverseModelTransform.i();
-
-      updateFromTransform();
-   }
-}
-
-//*****************************************************************************
-//  METHOD: ossimMapProjection::worldToLineSample
-//
-//*****************************************************************************
-ossimDpt ossimMapProjection::worldToLineSample(const ossimGpt &worldPoint)const
-{
-   ossimDpt result;
-
-   worldToLineSample(worldPoint, result);
-
-   return result;
-}
-
-//*****************************************************************************
-//  METHOD: ossimMapProjection::lineSampleToWorld
-//
-//*****************************************************************************
-ossimGpt ossimMapProjection::lineSampleToWorld(const ossimDpt &lineSample)const
-{
-   ossimGpt result;
-
-   lineSampleToWorld(lineSample, result);
-
-   return result;
-}
-
-//*****************************************************************************
-//  METHOD: ossimMapProjection::worldToLineSample
-//
-//*****************************************************************************
-void ossimMapProjection::worldToLineSample(const ossimGpt &worldPoint,
-                                           ossimDpt&       lineSample)const
-{
-
-   if(theModelTransformUnitType != OSSIM_UNIT_UNKNOWN)
-   {
-      ossimGpt gpt = worldPoint;
-      if(theDatum)
-      {
-         gpt.changeDatum(theDatum);
-      }
-      switch(theModelTransformUnitType)
-      {
-         case OSSIM_METERS:
-         case OSSIM_FEET:
-         case OSSIM_US_SURVEY_FEET:
-         {
-            ossimDpt modelPoint = forward(gpt);
-            ossimUnitConversionTool ut;
-            ut.setValue(modelPoint.x, OSSIM_METERS);
-            modelPoint.x = ut.getValue(theModelTransformUnitType);
-            ut.setValue(modelPoint.y, OSSIM_METERS);
-            modelPoint.y = ut.getValue(theModelTransformUnitType);
-            const NEWMAT::Matrix& m = theInverseModelTransform.getData();
-            
-            lineSample.x = m[0][0]*modelPoint.x + m[0][1]*modelPoint.y + m[0][3];
-            lineSample.y = m[1][0]*modelPoint.x + m[1][1]*modelPoint.y + m[1][3];
-            
-            return;
-         }
-         case OSSIM_DEGREES:
-         case OSSIM_RADIANS:
-         case OSSIM_MINUTES:
-         case OSSIM_SECONDS:
-         {
-            ossimUnitConversionTool ut;
-            ossimDpt modelPoint;
-            modelPoint.lat = gpt.latd();
-            modelPoint.lon = gpt.lond();
-            ut.setValue(modelPoint.lat, OSSIM_DEGREES);
-            modelPoint.lat = ut.getValue(theModelTransformUnitType);
-            ut.setValue(modelPoint.lon, OSSIM_DEGREES);
-            modelPoint.lon = ut.getValue(theModelTransformUnitType);
-            const NEWMAT::Matrix& m = theInverseModelTransform.getData();
-            
-            lineSample.x = m[0][0]*modelPoint.x + m[0][1]*modelPoint.y + m[0][3];
-            lineSample.y = m[1][0]*modelPoint.x + m[1][1]*modelPoint.y + m[1][3];
-            return;
-         }
-         default:
-         {
-            lineSample.makeNan();
-            return;
-         }
-      }
-   }
-   else if(isGeographic())
-   {
-      ossimGpt gpt = worldPoint;
-      
-      if (theOrigin.datum() != gpt.datum())
-      {
-         // Apply datum shift if it's not the same.
-         gpt.changeDatum(theOrigin.datum());
-      }
-      
-      lineSample.line = (theUlGpt.latd() - gpt.latd()) / theDegreesPerPixel.y;
-      lineSample.samp = (gpt.lond() - theUlGpt.lond()) / theDegreesPerPixel.x;
-   }
-   else
-   {
-      // make sure our tie point is good and world point
-      // is good.
-      //
-      if(theUlEastingNorthing.isNan()||
-         worldPoint.isLatNan() || worldPoint.isLonNan())
-      {
-         lineSample.makeNan();
-         return;
-      }
-      // initialize line sample
-      //   lineSample = ossimDpt(0,0);
-      
-      // I am commenting this code out because I am going to
-      // move it to the ossimImageViewProjectionTransform.
-      //
-      // see if we have a datum set and if so
-      // shift the world to our datum.  If not then
-      // find the easting northing value for the world
-      // point.
-      if(theDatum)
-      {
-         ossimGpt gpt = worldPoint;
-         
-         gpt.changeDatum(theDatum);
-         
-         // lineSample is currently in easting northing
-         // and will need to be converted to line sample.
-         lineSample = forward(gpt);
-      }
-      else
-      {
-         // lineSample is currently in easting northing
-         // and will need to be converted to line sample.
-         lineSample = forward(worldPoint);
-      }
-      
-      // check the final result to make sure there were no
-      // problems.
-      //
-      if(!lineSample.isNan())
-      {
-//       if(!isIdentityMatrix())
-//       {
-//          ossimDpt temp = lineSample;
-         
-//          lineSample.x = theInverseTrans[0][0]*temp.x+
-//                         theInverseTrans[0][1]*temp.y+
-//                         theInverseTrans[0][2];
-         
-//          lineSample.y = theInverseTrans[1][0]*temp.x+
-//                         theInverseTrans[1][1]*temp.y+
-//                         theInverseTrans[1][2];
-//       }
-//       else
-         {
-            lineSample.x = ((lineSample.x  - theUlEastingNorthing.x)/theMetersPerPixel.x);
-            
-            // We must remember that the Northing is negative since the positive
-            // axis for an image is assumed to go down since it's image space.
-            lineSample.y = (-(lineSample.y - theUlEastingNorthing.y)/theMetersPerPixel.y);
-         }
-      }
-   }
-}
-
-//*****************************************************************************
-//  METHOD: ossimMapProjection::lineSampleHeightToWorld
-//
-//*****************************************************************************
-void ossimMapProjection::lineSampleHeightToWorld(const ossimDpt &lineSample,
-                                                 const double&  hgtEllipsoid,
-                                                 ossimGpt&      gpt)const
-{
-   // make sure that the passed in lineSample is good and
-   // check to make sure our easting northing is good so
-   // we can compute the line sample.
-   if(lineSample.hasNans())
-   {
-      gpt.makeNan();
-      return;
-   }
-   if(theModelTransformUnitType != OSSIM_UNIT_UNKNOWN)
-   {
-      const NEWMAT::Matrix& m = theModelTransform.getData();
-      // map transforms can only be 2-D for now so we will look at
-      // the first 2 rows only
-      ossimDpt modelPoint(m[0][0]*lineSample.x + m[0][1]*lineSample.y + m[0][3],
-                          m[1][0]*lineSample.x + m[1][1]*lineSample.y + m[1][3]);
-      switch(theModelTransformUnitType)
-      {
-         case OSSIM_DEGREES:
-         {
-            gpt.latd(modelPoint.lat);
-            gpt.lond(modelPoint.lon);
-            gpt.datum(theDatum);
-            return;
-         }
-         case OSSIM_MINUTES:
-         case OSSIM_SECONDS:
-         case OSSIM_RADIANS:
-         {
-            ossimUnitConversionTool ut;
-            ut.setValue(modelPoint.x, theModelTransformUnitType);
-            modelPoint.x = ut.getValue(OSSIM_DEGREES);
-            ut.setValue(modelPoint.y, theModelTransformUnitType);
-            modelPoint.y = ut.getValue(OSSIM_DEGREES);
-            gpt.latd(modelPoint.lat);
-            gpt.lond(modelPoint.lon);
-            gpt.datum(theDatum);
-            return;
-         }
-         default:
-         {
-            ossimUnitConversionTool ut;
-            ut.setValue(modelPoint.x, theModelTransformUnitType);
-            modelPoint.x = ut.getValue(OSSIM_METERS);
-            ut.setValue(modelPoint.y, theModelTransformUnitType);
-            modelPoint.y = ut.getValue(OSSIM_METERS);
-            gpt = inverse(modelPoint);
-            break;
-         }
-      }
-      gpt.datum(theDatum);
-   }
-   else if(isGeographic())
-   {
-      double lat = theUlGpt.latd() - (lineSample.line * theDegreesPerPixel.y);
-      double lon = theUlGpt.lond() + (lineSample.samp * theDegreesPerPixel.x);
-      
-      gpt.latd(lat);
-      gpt.lond(lon);
-      gpt.hgt = hgtEllipsoid;
-   }
-   else
-   {
-      if(theUlEastingNorthing.hasNans())
-      {
-         gpt.makeNan();
-         return;
-      }
-      ossimDpt eastingNorthing;
-      
-      eastingNorthing = (theUlEastingNorthing);
-      
-      eastingNorthing.x += (lineSample.x*theMetersPerPixel.x);
-      
-      //
-      // Note:  the Northing is positive up.  In image space
-      // the positive axis is down so we must multiply by
-      // -1
-      //
-      eastingNorthing.y += (-lineSample.y*theMetersPerPixel.y);
-      
-      
-      //
-      // now invert the meters into a ground point.
-      //
-      gpt = inverse(eastingNorthing);
-      gpt.datum(theDatum);
-      
-      if(gpt.isLatNan() && gpt.isLonNan())
-      {
-         gpt.makeNan();
-      }
-      else
-      {
-         gpt.clampLat(-90, 90);
-         gpt.clampLon(-180, 180);
-         
-         // Finally assign the specified height:
-         gpt.hgt = hgtEllipsoid;
-      }
-   }
-   if(theElevationLookupFlag)
-   {
-      gpt.hgt = ossimElevManager::instance()->getHeightAboveEllipsoid(gpt);
-   }
-}
-
-//*****************************************************************************
-//  METHOD: ossimMapProjection::lineSampleToWorld
-//
-//  Implements the base class pure virtual. Simply calls lineSampleToWorld()
-//  and assigns argument height to the resultant groundpoint.
-//
-//*****************************************************************************
-void ossimMapProjection::lineSampleToWorld (const ossimDpt& lineSampPt,
-                                            ossimGpt&       worldPt) const
-{
-   double elev = ossim::nan();
-
-//    if(theElevationLookupFlag)
-//    {
-//       elev =  ossimElevManager::instance()->getHeightAboveEllipsoid(worldPt);
-//    }
-
-   lineSampleHeightToWorld(lineSampPt, elev, worldPt);
-
-}
-
-//*****************************************************************************
-//  METHOD: ossimMapProjection::lineSampleToEastingNorthing
-//
-//*****************************************************************************
-void ossimMapProjection::lineSampleToEastingNorthing(const ossimDpt& lineSample,
-                                                     ossimDpt&       eastingNorthing)const
-{
-   // make sure that the passed in lineSample is good and
-   // check to make sure our easting northing is good so
-   // we can compute the line sample.
-   //
-   if(lineSample.hasNans()||theUlEastingNorthing.hasNans())
-   {
-      eastingNorthing.makeNan();
-      return;
-   }
-   ossimDpt deltaPoint = lineSample;
-
-   eastingNorthing.x = theUlEastingNorthing.x + deltaPoint.x*theMetersPerPixel.x;
-   eastingNorthing.y = theUlEastingNorthing.y + (-deltaPoint.y)*theMetersPerPixel.y ;
-
-   //   eastingNorthing.x += (lineSample.x*theMetersPerPixel.x);
-
-   // Note:  the Northing is positive up.  In image space
-   // the positive axis is down so we must multiply by
-   // -1
-   //   eastingNorthing.y += (-lineSample.y*theMetersPerPixel.y);
-}
-
-
-void ossimMapProjection::setMetersPerPixel(const ossimDpt& resolution)
-{
-   theMetersPerPixel = resolution;
-   computeDegreesPerPixel();
-}
-
-void ossimMapProjection::setDecimalDegreesPerPixel(const ossimDpt& resolution)
-{
-   theDegreesPerPixel = resolution;
-   computeMetersPerPixel();
-}
-
-void ossimMapProjection::eastingNorthingToWorld(const ossimDpt& eastingNorthing,
-                                                ossimGpt&       worldPt)const
-{
-   ossimDpt lineSample;
-   eastingNorthingToLineSample(eastingNorthing, lineSample);
-   lineSampleToWorld(lineSample, worldPt);
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimMapProjection::eastingNorthingToLineSample
-//
-//*****************************************************************************
-void ossimMapProjection::eastingNorthingToLineSample(const ossimDpt& eastingNorthing,
-                                                     ossimDpt&       lineSample)const
-{
-   if(eastingNorthing.hasNans())
-   {
-      lineSample.makeNan();
-      return;
-   }
-   // check the final result to make sure there were no
-   // problems.
-   //
-   if(!eastingNorthing.isNan())
-   {
-     lineSample.x = (eastingNorthing.x - theUlEastingNorthing.x)/theMetersPerPixel.x;
-
-     // We must remember that the Northing is negative since the positive
-     // axis for an image is assumed to go down since it's image space.
-     lineSample.y = (-(eastingNorthing.y-theUlEastingNorthing.y))/theMetersPerPixel.y;
-   }
-}
-
-void ossimMapProjection::setUlTiePoints(const ossimGpt& gpt)
-{
-   setUlGpt(gpt);
-   setUlEastingNorthing(forward(gpt));
-}
-
-void ossimMapProjection::setUlTiePoints(const ossimDpt& eastingNorthing)
-{
-   setUlEastingNorthing(eastingNorthing);
-   setUlGpt(inverse(eastingNorthing));
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimMapProjection::setUlEastingNorthing
-//
-//*****************************************************************************
-void ossimMapProjection::setUlEastingNorthing(const ossimDpt& ulEastingNorthing)
-{
-   theUlEastingNorthing = ulEastingNorthing;
-}
-
-//*****************************************************************************
-//  METHOD: ossimMapProjection::setUlGpt
-//
-//*****************************************************************************
-void ossimMapProjection::setUlGpt(const ossimGpt& ulGpt)
-{
-   theUlGpt = ulGpt;
-
-   // The ossimGpt data members need to use the same datum as this projection:
-   if (*theDatum != *(ulGpt.datum()))
-      theUlGpt.changeDatum(theDatum);
-}
-
-//*****************************************************************************
-//  METHOD: ossimMapProjection::saveState
-//
-//*****************************************************************************
-bool ossimMapProjection::saveState(ossimKeywordlist& kwl, const char* prefix) const
-{
-   ossimProjection::saveState(kwl, prefix);
-
-   kwl.add(prefix,
-           ossimKeywordNames::ORIGIN_LATITUDE_KW,
-           theOrigin.latd(),
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::CENTRAL_MERIDIAN_KW,
-           theOrigin.lond(),
-           true);
-
-   theEllipsoid.saveState(kwl, prefix);
-
-   if(theDatum)
-   {
-      kwl.add(prefix,
-              ossimKeywordNames::DATUM_KW,
-              theDatum->code(),
-              true);
-   }
-
-   // Calling access method to give it an opportunity to update the code in case of param change:
-   ossim_uint32 code = getPcsCode();
-   if (code)
-   {
-      ossimString epsg_spec = ossimString("EPSG:") + ossimString::toString(code);
-      kwl.add(prefix, ossimKeywordNames::SRS_NAME_KW, epsg_spec, true);
-   }
-   
-   if(isGeographic())
-   {
-      kwl.add(prefix,
-              ossimKeywordNames::TIE_POINT_XY_KW,
-              ossimDpt(theUlGpt).toString().c_str(),
-              true);
-      kwl.add(prefix,
-              ossimKeywordNames::TIE_POINT_UNITS_KW,
-              ossimUnitTypeLut::instance()->getEntryString(OSSIM_DEGREES),
-              true);
-      kwl.add(prefix,
-              ossimKeywordNames::PIXEL_SCALE_XY_KW,
-              theDegreesPerPixel.toString().c_str(),
-              true);
-      kwl.add(prefix,
-              ossimKeywordNames::PIXEL_SCALE_UNITS_KW,
-              ossimUnitTypeLut::instance()->getEntryString(OSSIM_DEGREES),
-              true);
-   }
-   else
-   {
-      kwl.add(prefix,
-              ossimKeywordNames::TIE_POINT_XY_KW,
-              theUlEastingNorthing.toString().c_str(),
-              true);
-      kwl.add(prefix,
-              ossimKeywordNames::TIE_POINT_UNITS_KW,
-              ossimUnitTypeLut::instance()->getEntryString(OSSIM_METERS),
-              true);
-      kwl.add(prefix,
-              ossimKeywordNames::PIXEL_SCALE_XY_KW,
-              theMetersPerPixel.toString().c_str(),
-              true);
-      kwl.add(prefix,
-              ossimKeywordNames::PIXEL_SCALE_UNITS_KW,
-              ossimUnitTypeLut::instance()->getEntryString(OSSIM_METERS),
-              true);  
-   }
-
-   kwl.add(prefix, ossimKeywordNames::PCS_CODE_KW, code, true);
-   kwl.add(prefix, ossimKeywordNames::FALSE_EASTING_NORTHING_KW,
-           theFalseEastingNorthing.toString().c_str(), true);
-   kwl.add(prefix, ossimKeywordNames::FALSE_EASTING_NORTHING_UNITS_KW,
-           ossimUnitTypeLut::instance()->getEntryString(OSSIM_METERS), true);
-   kwl.add(prefix, ossimKeywordNames::ELEVATION_LOOKUP_FLAG_KW,
-           ossimString::toString(theElevationLookupFlag), true);
-
-   if(theModelTransformUnitType != OSSIM_UNIT_UNKNOWN)
-   {
-      const NEWMAT::Matrix& m = theModelTransform.getData();
-      ostringstream out;
-      ossim_uint32 row, col;
-      for(row = 0; row < 4; ++row)
-      {
-         for(col = 0; col < 4; ++col)
-         {
-            out << std::setprecision(20) << m[row][col] << " ";
-         }
-      }
-      kwl.add(prefix,
-              ossimKeywordNames::IMAGE_MODEL_TRANSFORM_MATRIX_KW,
-              out.str().c_str(),
-              true);
-      kwl.add(prefix,
-              ossimKeywordNames::IMAGE_MODEL_TRANSFORM_UNIT_KW,
-              ossimUnitTypeLut::instance()->getEntryString(theModelTransformUnitType),
-              true);
-   }
-
-   return true;
-}
-
-//*****************************************************************************
-//  METHOD: ossimMapProjection::loadState
-//
-//*****************************************************************************
-bool ossimMapProjection::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   ossimProjection::loadState(kwl, prefix);
-
-   const char* elevLookupFlag = kwl.find(prefix, ossimKeywordNames::ELEVATION_LOOKUP_FLAG_KW);
-   if(elevLookupFlag)
-   {
-      theElevationLookupFlag = ossimString(elevLookupFlag).toBool();
-   }
-   // Get the ellipsoid.
-   theEllipsoid.loadState(kwl, prefix);
-
-   const char *lookup;
-
-   // Get the Projection Coordinate System (assumed from EPSG database). 
-   // NOTE: the code is read here for saving in this object only. 
-   // The code is not verified until a call to getPcs() is called. If ONLY this code
-   // had been provided, then the EPSG projection factory would populate a new instance of the 
-   // corresponding map projection and have it saveState for constructing again later in the 
-   // conventional fashion here
-   thePcsCode = 0; 
-   lookup = kwl.find(prefix, ossimKeywordNames::PCS_CODE_KW);
-   if(lookup)
-      thePcsCode = ossimString(lookup).toUInt32(); // EPSG PROJECTION CODE
-
-   // The datum can be specified in 2 ways: either via OSSIM/geotrans alpha-codes or EPSG code.
-   // Last resort use WGS 84 (consider throwing an exception to catch any bad datums): 
-   theDatum = ossimDatumFactoryRegistry::instance()->create(kwl, prefix);
-   if (theDatum == NULL)
-   {
-      theDatum = ossimDatumFactory::instance()->wgs84();
-   }
-
-   // Set all ossimGpt-type members to use this datum:
-   theOrigin.datum(theDatum);
-   theUlGpt.datum(theDatum);
-
-   // Fetch the ellipsoid from the datum:
-   const ossimEllipsoid* ellipse = theDatum->ellipsoid();
-   if(ellipse)
-      theEllipsoid = *ellipse;
-   
-   // Get the latitude of the origin.
-   lookup = kwl.find(prefix, ossimKeywordNames::ORIGIN_LATITUDE_KW);
-   if (lookup)
-   {
-      theOrigin.latd(ossimString(lookup).toFloat64());
-   }
-   // else ???
-
-   // Get the central meridian.
-   lookup = kwl.find(prefix, ossimKeywordNames::CENTRAL_MERIDIAN_KW);
-   if (lookup)
-   {
-      theOrigin.lond(ossimString(lookup).toFloat64());
-   }
-   // else ???
-
-
-   // Get the pixel scale.
-   theMetersPerPixel.makeNan();
-   theDegreesPerPixel.makeNan();
-   lookup = kwl.find(prefix, ossimKeywordNames::PIXEL_SCALE_UNITS_KW);
-   if (lookup)
-   {
-      ossimUnitType units =
-         static_cast<ossimUnitType>(ossimUnitTypeLut::instance()->
-                                    getEntryNumber(lookup));
-      
-      lookup = kwl.find(prefix, ossimKeywordNames::PIXEL_SCALE_XY_KW);
-      if (lookup)
-      {
-         ossimDpt scale;
-         scale.toPoint(std::string(lookup));
-
-         switch (units)
-         {
-            case OSSIM_METERS:
-            {
-               theMetersPerPixel = scale;
-               break;
-            }
-            case OSSIM_DEGREES:
-            {
-               theDegreesPerPixel.x = scale.x;
-               theDegreesPerPixel.y = scale.y;
-               break;
-            }
-            case OSSIM_FEET:
-            case OSSIM_US_SURVEY_FEET:
-            {
-               ossimUnitConversionTool ut;
-               ut.setValue(scale.x, units);
-               theMetersPerPixel.x = ut.getValue(OSSIM_METERS);
-               ut.setValue(scale.y, units);
-               theMetersPerPixel.y = ut.getValue(OSSIM_METERS);
-               break;
-            }
-            default:
-            {
-               if(traceDebug())
-               {
-                  // Unhandled unit type!
-                  ossimNotify(ossimNotifyLevel_WARN)
-                  << "ossimMapProjection::loadState WARNING!"
-                  << "Unhandled unit type for "
-                  << ossimKeywordNames::PIXEL_SCALE_UNITS_KW << ":  "
-                  << ( ossimUnitTypeLut::instance()->
-                      getEntryString(units).c_str() )
-                  << endl;
-               }
-               break;
-            }
-         } // End of switch (units)
-         
-      }  // End of if (PIXEL_SCALE_XY)
-
-   } // End of if (PIXEL_SCALE_UNITS)
-   else
-   {
-      // BACKWARDS COMPATIBILITY LOOKUPS...
-      lookup =  kwl.find(prefix, ossimKeywordNames::METERS_PER_PIXEL_X_KW);
-      if(lookup)
-      {
-         theMetersPerPixel.x = fabs(ossimString(lookup).toFloat64());
-      }
-      
-      lookup =  kwl.find(prefix, ossimKeywordNames::METERS_PER_PIXEL_Y_KW);
-      if(lookup)
-      {
-         theMetersPerPixel.y = fabs(ossimString(lookup).toFloat64());
-      }
-      
-      lookup = kwl.find(prefix,
-                        ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT);
-      if(lookup)
-      {
-         theDegreesPerPixel.y = fabs(ossimString(lookup).toFloat64());
-      }
-      
-      lookup = kwl.find(prefix,
-                        ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON);
-      if(lookup)
-      {
-         theDegreesPerPixel.x = fabs(ossimString(lookup).toFloat64());
-      }
-   }            
-
-   // Get the tie point.
-   theUlGpt.makeNan();
-
-    // Since this won't be picked up from keywords set to 0 to keep nan out.
-   theUlGpt.hgt = 0.0;
-   
-   theUlEastingNorthing.makeNan();
-   lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_UNITS_KW);
-   if (lookup)
-   {
-      ossimUnitType units =
-         static_cast<ossimUnitType>(ossimUnitTypeLut::instance()->
-                                    getEntryNumber(lookup));
-      
-      lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_XY_KW);
-      if (lookup)
-      {
-         ossimDpt tie;
-         tie.toPoint(std::string(lookup));
-
-         switch (units)
-         {
-            case OSSIM_METERS:
-            {
-               theUlEastingNorthing = tie;
-               break;
-            }
-            case OSSIM_DEGREES:
-            {
-               theUlGpt.lond(tie.x);
-               theUlGpt.latd(tie.y);
-               break;
-            }
-            case OSSIM_FEET:
-            case OSSIM_US_SURVEY_FEET:
-            {
-               ossimUnitConversionTool ut;
-               ut.setValue(tie.x, units);
-               theUlEastingNorthing.x = ut.getValue(OSSIM_METERS);
-               ut.setValue(tie.y, units);
-               theUlEastingNorthing.y = ut.getValue(OSSIM_METERS);
-               break;
-            }
-            default:
-            {
-               if(traceDebug())
-               {
-                  // Unhandled unit type!
-                  ossimNotify(ossimNotifyLevel_WARN)
-                  << "ossimMapProjection::loadState WARNING!"
-                  << "Unhandled unit type for "
-                  << ossimKeywordNames::TIE_POINT_UNITS_KW << ": " 
-                  << ( ossimUnitTypeLut::instance()->
-                      getEntryString(units).c_str() )
-                  << endl;
-               }
-               break;
-            }
-         } // End of switch (units)
-         
-      }  // End of if (TIE_POINT_XY)
-
-   } // End of if (TIE_POINT_UNITS)
-   else
-   {
-      // BACKWARDS COMPATIBILITY LOOKUPS...
-      lookup =  kwl.find(prefix, ossimKeywordNames::TIE_POINT_EASTING_KW);
-      if(lookup)
-      {
-         theUlEastingNorthing.x = (ossimString(lookup).toFloat64());
-      }
-
-      lookup =  kwl.find(prefix, ossimKeywordNames::TIE_POINT_NORTHING_KW);
-      if(lookup)
-      {
-         theUlEastingNorthing.y = (ossimString(lookup).toFloat64());
-      }
-
-      lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_LAT_KW);
-      if (lookup)
-      {
-         theUlGpt.latd(ossimString(lookup).toFloat64());
-      }
-
-      lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_LON_KW);
-      if (lookup)
-      {
-         theUlGpt.lond(ossimString(lookup).toFloat64());
-      }
-   }
-   
-   // Get the false easting northing.
-   theFalseEastingNorthing.x = 0.0;
-   theFalseEastingNorthing.y = 0.0;
-   theProjectionUnits = OSSIM_METERS;
-   lookup = kwl.find(prefix, ossimKeywordNames::FALSE_EASTING_NORTHING_UNITS_KW);
-   if (lookup)
-   {
-      theProjectionUnits =
-         static_cast<ossimUnitType>(ossimUnitTypeLut::instance()->getEntryNumber(lookup));
-   }
-
-   lookup = kwl.find(prefix, ossimKeywordNames::FALSE_EASTING_NORTHING_KW);
-   if (lookup)
-   {
-      ossimDpt eastingNorthing;
-      eastingNorthing.toPoint(std::string(lookup));
-
-      switch (theProjectionUnits)
-      {
-         case OSSIM_METERS:
-         {
-            theFalseEastingNorthing = eastingNorthing;
-            break;
-         }
-         case OSSIM_FEET:
-         case OSSIM_US_SURVEY_FEET:
-         {
-            ossimUnitConversionTool ut;
-            ut.setValue(eastingNorthing.x, theProjectionUnits);
-            theFalseEastingNorthing.x = ut.getValue(OSSIM_METERS);
-            ut.setValue(eastingNorthing.y, theProjectionUnits);
-            theFalseEastingNorthing.y = ut.getValue(OSSIM_METERS);
-            theProjectionUnits = OSSIM_METERS;
-            break;
-         }
-         default:
-         {
-            if(traceDebug())
-            {
-               // Unhandled unit type!
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << "ossimMapProjection::loadState WARNING! Unhandled unit type for "
-                  << ossimKeywordNames::FALSE_EASTING_NORTHING_UNITS_KW << ":  " 
-                  << (ossimUnitTypeLut::instance()->getEntryString(theProjectionUnits).c_str())
-                  << endl;
-            }
-            break;
-         }
-      } // End of switch (units)
-   }  // End of if (FALSE_EASTING_NORTHING_KW)
-   else
-   {
-      // BACKWARDS COMPATIBILITY LOOKUPS...
-      lookup =  kwl.find(prefix, ossimKeywordNames::FALSE_EASTING_KW);
-      if(lookup)
-      {
-         theFalseEastingNorthing.x = (ossimString(lookup).toFloat64());
-      }
-      
-      lookup =  kwl.find(prefix, ossimKeywordNames::FALSE_NORTHING_KW);
-      if(lookup)
-      {
-         theFalseEastingNorthing.y = (ossimString(lookup).toFloat64());
-      }
-   }            
-
-//    if((theDegreesPerPixel.x!=OSSIM_DBL_NAN)&&
-//       (theDegreesPerPixel.y!=OSSIM_DBL_NAN)&&
-//       theMetersPerPixel.hasNans())
-//    {
-//       theMetersPerPixel    = theOrigin.metersPerDegree();
-//       theMetersPerPixel.x *= theDegreesPerPixel.x;
-//       theMetersPerPixel.y *= theDegreesPerPixel.y;
-//    }
-
-   lookup = kwl.find(prefix, ossimKeywordNames::PIXEL_TYPE_KW);
-   if (lookup)
-   {
-      ossimString pixelType = lookup;
-      pixelType=pixelType.trim();
-      if(pixelType!="")
-      {
-         pixelType.downcase();
-         if(pixelType.contains("area"))
-         {
-            if( theMetersPerPixel.hasNans() == false)
-            {
-               if(!theUlEastingNorthing.hasNans())
-               {
-                  theUlEastingNorthing.x += (theMetersPerPixel.x*0.5);
-                  theUlEastingNorthing.y -= (theMetersPerPixel.y*0.5);
-               }
-            }
-            if(theDegreesPerPixel.hasNans() == false)
-            {
-               theUlGpt.latd( theUlGpt.latd() - (theDegreesPerPixel.y*0.5) );
-               theUlGpt.lond( theUlGpt.lond() + (theDegreesPerPixel.x*0.5) );
-            }
-         }
-      }
-   }
-   
-   theModelTransformUnitType = OSSIM_UNIT_UNKNOWN;
-   const char* modelTransform = kwl.find(prefix, ossimKeywordNames::IMAGE_MODEL_TRANSFORM_MATRIX_KW);
-   const char* modelTransformUnit = kwl.find(prefix, ossimKeywordNames::IMAGE_MODEL_TRANSFORM_UNIT_KW);
-   if(modelTransform&&modelTransformUnit) // row ordered 4x4 matrix.  Should be 16 values
-   {
-      
-      NEWMAT::Matrix& m = theModelTransform.getData();
-      istringstream in(modelTransform);
-      ossim_uint32 row, col;
-      ossimString value;
-      for(row = 0; row < 4; ++row)
-      {
-         for(col = 0; col < 4; ++col)
-         {
-            in >> value;
-            m[row][col] = value.toDouble();
-         }
-      }
-      // make sure these have the identity and all unused are 0.0
-      m[2][2] = 1.0;
-      m[2][0] = 0.0;
-      m[2][1] = 0.0;
-      m[2][3] = 0.0;
-      m[3][3] = 1.0;
-      m[3][2] = 0.0;
-      m[3][1] = 0.0;
-      m[3][0] = 0.0;
-      
-      if(!in.fail())
-      {
-         try
-         {
-            theInverseModelTransform = theModelTransform;
-            theInverseModelTransform.i();
-            theModelTransformUnitType = static_cast<ossimUnitType>(ossimUnitTypeLut::instance()->
-                                                                   getEntryNumber(modelTransformUnit));
-         }
-         catch(...)
-         {
-            theModelTransformUnitType = OSSIM_UNIT_UNKNOWN;   
-         }
-      }
-   }
-
-   //---
-   // Set the datum of the origin and tie point.
-   // Use method that does NOT perform a shift.
-   //---
-   if(theDatum)
-   {
-      theOrigin.datum(theDatum);
-      theUlGpt.datum(theDatum);
-   }
-
-   if(theMetersPerPixel.hasNans() &&
-      theDegreesPerPixel.hasNans())
-   {
-      ossimDpt mpd = ossimGpt().metersPerDegree();
-      if(isGeographic())
-      {
-         theDegreesPerPixel.lat = 1.0/mpd.y;
-         theDegreesPerPixel.lon = 1.0/mpd.y;
-      }
-      else
-      {
-         theMetersPerPixel.x = 1.0;
-         theMetersPerPixel.y = 1.0;
-      }
-   }
-
-   //---
-   // Final sanity check:
-   //---
-   if ( theOrigin.hasNans() )
-   {
-      if ( theModelTransformUnitType == OSSIM_DEGREES )
-      {
-         const NEWMAT::Matrix& m = theModelTransform.getData();
-         theOrigin.lon = m[0][3];
-         theOrigin.lat = m[1][3];
-      }
-      else
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << __FILE__ << ": " << __LINE__
-            << "\nossimMapProjection::loadState ERROR: Origin is not set!"
-            << std::endl;
-      }
-   }
-
-   return true;
-}
-
-//*****************************************************************************
-//  METHOD: ossimMapProjection::print
-//*****************************************************************************
-std::ostream& ossimMapProjection::print(std::ostream& out) const
-{
-   const char MODULE[] = "ossimMapProjection::print";
-
-   out << setiosflags(ios::fixed) << setprecision(15)
-       << "\n// " << MODULE
-       << "\n" << ossimKeywordNames::TYPE_KW               << ":  "
-       << getClassName()
-       << "\n" << ossimKeywordNames::MAJOR_AXIS_KW         << ":  "
-       << theEllipsoid.getA()
-       << "\n" << ossimKeywordNames::MINOR_AXIS_KW         << ":  "
-       << theEllipsoid.getB()
-       << "\n" << ossimKeywordNames::ORIGIN_LATITUDE_KW    << ":  "
-       << theOrigin.latd()
-       << "\n" << ossimKeywordNames::CENTRAL_MERIDIAN_KW   << ":  "
-       << theOrigin.lond()
-       << "\norigin: " << theOrigin
-       << "\n" << ossimKeywordNames::DATUM_KW              << ":  "
-       << (theDatum?theDatum->code().c_str():"unknown")
-       << "\n" << ossimKeywordNames::METERS_PER_PIXEL_X_KW << ":  "
-       << ((ossim::isnan(theMetersPerPixel.x))?ossimString("nan"):ossimString::toString(theMetersPerPixel.x, 15))
-       << "\n" << ossimKeywordNames::METERS_PER_PIXEL_Y_KW << ":  "
-       << ((ossim::isnan(theMetersPerPixel.y))?ossimString("nan"):ossimString::toString(theMetersPerPixel.y, 15))
-       << "\n" << ossimKeywordNames::FALSE_EASTING_NORTHING_KW << ": "
-       << theFalseEastingNorthing.toString().c_str()
-       << "\n" << ossimKeywordNames::FALSE_EASTING_NORTHING_UNITS_KW << ": "
-       << ossimUnitTypeLut::instance()->getEntryString(OSSIM_METERS)
-       << "\n" << ossimKeywordNames::PCS_CODE_KW << ": " << thePcsCode;
-
-   if(isGeographic())
-   {
-      out << "\n" << ossimKeywordNames::TIE_POINT_XY_KW << ": " 
-          << ossimDpt(theUlGpt).toString().c_str()
-          << "\n" << ossimKeywordNames::TIE_POINT_UNITS_KW << ": " 
-          << ossimUnitTypeLut::instance()->getEntryString(OSSIM_DEGREES)
-          << "\n" << ossimKeywordNames::PIXEL_SCALE_XY_KW << ": "
-          << theDegreesPerPixel.toString().c_str()
-          << "\n" << ossimKeywordNames::PIXEL_SCALE_UNITS_KW << ": "
-          << ossimUnitTypeLut::instance()->getEntryString(OSSIM_DEGREES)
-          << std::endl;
-   }
-   else
-   {
-      out << "\n" << ossimKeywordNames::TIE_POINT_XY_KW << ": " 
-          << theUlEastingNorthing.toString().c_str()
-          << "\n" << ossimKeywordNames::TIE_POINT_UNITS_KW << ": " 
-          << ossimUnitTypeLut::instance()->getEntryString(OSSIM_METERS)
-          << "\n" << ossimKeywordNames::PIXEL_SCALE_XY_KW << ": "
-          << theMetersPerPixel.toString().c_str()
-          << "\n" << ossimKeywordNames::PIXEL_SCALE_UNITS_KW << ": "
-          << ossimUnitTypeLut::instance()->getEntryString(OSSIM_METERS)
-          << std::endl;
-   }
-   
-   return ossimProjection::print(out);
-}
-
-//*****************************************************************************
-//  METHOD: ossimMapProjection::computeDegreesPerPixel
-//
-//*****************************************************************************
-void ossimMapProjection::computeDegreesPerPixel()
-{
-   ossimDpt eastNorthGround = forward(theOrigin);
-   ossimDpt rightEastNorth  =  eastNorthGround;
-   ossimDpt downEastNorth   =  eastNorthGround;
-   rightEastNorth.x += theMetersPerPixel.x;
-   downEastNorth.y  -= theMetersPerPixel.y;
-
-   ossimGpt rightGpt = inverse(rightEastNorth);
-   ossimGpt downGpt  = inverse(downEastNorth);
-
-   // use euclidean distance to get length along the horizontal (lon)
-   // and vertical (lat) directions
-   //
-   double tempDeltaLat = rightGpt.latd() - theOrigin.latd();
-   double tempDeltaLon = rightGpt.lond() - theOrigin.lond();
-   theDegreesPerPixel.lon = sqrt(tempDeltaLat*tempDeltaLat + tempDeltaLon*tempDeltaLon);
-
-   tempDeltaLat = downGpt.latd() - theOrigin.latd();
-   tempDeltaLon = downGpt.lond() - theOrigin.lond();
-   theDegreesPerPixel.lat = sqrt(tempDeltaLat*tempDeltaLat + tempDeltaLon*tempDeltaLon);
-}
-
-//*****************************************************************************
-//  METHOD: ossimMapProjection::computeMetersPerPixel
-//
-//*****************************************************************************
-void ossimMapProjection::computeMetersPerPixel()
-{
-//#define USE_OSSIMGPT_METERS_PER_DEGREE
-#ifdef USE_OSSIMGPT_METERS_PER_DEGREE
-   ossimDpt metersPerDegree (theOrigin.metersPerDegree());
-   theMetersPerPixel.x = metersPerDegree.x * theDegreesPerPixel.lon;
-   theMetersPerPixel.y = metersPerDegree.y * theDegreesPerPixel.lat;
-#else
-   ossimGpt right=theOrigin;
-   ossimGpt down=theOrigin;
-
-   down.latd(theOrigin.latd()  + theDegreesPerPixel.lat);
-   right.lond(theOrigin.lond() + theDegreesPerPixel.lon);
-
-   ossimDpt centerMeters = forward(theOrigin);
-   ossimDpt rightMeters = forward(right);
-   ossimDpt downMeters  = forward(down);
-
-   theMetersPerPixel.x = (rightMeters - centerMeters).length();
-   theMetersPerPixel.y = (downMeters  - centerMeters).length();
-#endif
-}
-
-//**************************************************************************************************
-//  METHOD: ossimMapProjection::operator==
-//! Compares this to arg projection and returns TRUE if the same. 
-//! NOTE: As currently implemented in OSSIM, map projections also contain image geometry 
-//! information like tiepoint and scale. This operator is only concerned with the map 
-//! specification and ignores image geometry differences.
-//**************************************************************************************************
-bool ossimMapProjection::operator==(const ossimProjection& projection) const
-{
-   // Verify that derived types match:
-   if (getClassName() != projection.getClassName())
-      return false;
-
-   // If both PCS codes are non-zero, that's all we need to check:
-   const ossimMapProjection* mapProj = PTR_CAST(ossimMapProjection, &projection);
-   if (thePcsCode && mapProj->thePcsCode && (thePcsCode != 32767) && 
-       (thePcsCode == mapProj->thePcsCode) )
-   {
-      return true;
-   }
-
-   if ( *theDatum != *(mapProj->theDatum) )
-      return false;
-   
-   if (theOrigin != mapProj->theOrigin)
-      return false;
-
-   if (theFalseEastingNorthing != mapProj->theFalseEastingNorthing)
-      return false;
-
-#if 0
-   THIS SECTION IGNORED SINCE IT DEALS WITH IMAGE GEOMETRY, NOT MAP PROJECTION
-   if (isGeographic())
-   {
-      if ((theDegreesPerPixel != mapProj->theDegreesPerPixel) ||
-          (theUlGpt != mapProj->theUlGpt))
-         return false;
-   }
-   else
-   {
-      if ((theMetersPerPixel != mapProj->theMetersPerPixel) ||
-         (theUlEastingNorthing != mapProj->theUlEastingNorthing))
-         return false;
-   }
-#endif
-
-   // Units must match:
-   if ((theProjectionUnits != OSSIM_UNIT_UNKNOWN) && 
-       (mapProj->theProjectionUnits != OSSIM_UNIT_UNKNOWN) &&
-       (theProjectionUnits != mapProj->theProjectionUnits))
-       return false;
-
-   // Check transform if present and compare it also:
-   if (hasModelTransform() && mapProj->hasModelTransform() &&
-      (theModelTransform.getData() != mapProj->theModelTransform.getData()))
-      return false;
-
-   return true;
-}
-
-bool ossimMapProjection::isEqualTo(const ossimObject& obj, ossimCompareType compareType)const
-{
-   const ossimMapProjection* mapProj = dynamic_cast<const ossimMapProjection*>(&obj);
-   bool result = mapProj&&ossimProjection::isEqualTo(obj, compareType);
-   
-   if(result)
-   {
-      result = (theEllipsoid.isEqualTo(mapProj->theEllipsoid, compareType)&&
-                theOrigin.isEqualTo(mapProj->theOrigin, compareType)&&
-                theMetersPerPixel.isEqualTo(mapProj->theMetersPerPixel, compareType)&&             
-                theDegreesPerPixel.isEqualTo(mapProj->theDegreesPerPixel, compareType)&&             
-                theUlGpt.isEqualTo(mapProj->theUlGpt, compareType)&&             
-                theUlEastingNorthing.isEqualTo(mapProj->theUlEastingNorthing, compareType)&&             
-                theFalseEastingNorthing.isEqualTo(mapProj->theFalseEastingNorthing, compareType)&&             
-                (thePcsCode == mapProj->thePcsCode)&&
-                (theElevationLookupFlag == mapProj->theElevationLookupFlag)&&
-                (theElevationLookupFlag == mapProj->theElevationLookupFlag)&&
-                (theModelTransform.isEqualTo(mapProj->theModelTransform))&&
-                (theInverseModelTransform.isEqualTo(mapProj->theInverseModelTransform))&&
-                (theModelTransformUnitType == mapProj->theModelTransformUnitType)&&
-                (theProjectionUnits == mapProj->theProjectionUnits));
-      
-      if(result)
-      {
-         if(compareType == OSSIM_COMPARE_FULL)
-         {
-            if(theDatum&&mapProj->theDatum)
-            {
-               result = theDatum->isEqualTo(*mapProj->theDatum, compareType);
-            }
-         }
-         else 
-         {
-            result = (theDatum==mapProj->theDatum);
-         }
-      }
-   }
-   return result;
-}
-
-double ossimMapProjection::getFalseEasting() const
-{
-   return theFalseEastingNorthing.x;
-}
-
-double ossimMapProjection::getFalseNorthing() const
-{
-   return theFalseEastingNorthing.y;
-}
-
-double ossimMapProjection::getStandardParallel1() const
-{
-   return 0.0;
-}
-
-double ossimMapProjection::getStandardParallel2() const
-{
-   return 0.0;
-}
-
-void ossimMapProjection::snapTiePointTo(ossim_float64 multiple,
-                                        ossimUnitType unitType)
-{
-   ossim_float64 convertedMultiple = multiple;
-   
-   if (isGeographic() && (unitType != OSSIM_DEGREES) )
-   {
-      // Convert to degrees.
-      ossimUnitConversionTool convertor;
-      convertor.setOrigin(theOrigin);
-      convertor.setValue(multiple, unitType);
-      convertedMultiple = convertor.getDegrees();
-   }
-   else if ( !isGeographic() && (unitType != OSSIM_METERS) )
-   {
-      // Convert to meters.
-      ossimUnitConversionTool convertor;
-      convertor.setOrigin(theOrigin);
-      convertor.setValue(multiple, unitType);
-      convertedMultiple = convertor.getMeters();
-   }
-
-   // Convert the tie point.
-   if (isGeographic())
-   {
-      // Snap the latitude.
-      ossim_float64 d = theUlGpt.latd();
-      d = ossim::round<int>(d / convertedMultiple) * convertedMultiple;
-      theUlGpt.latd(d);
-
-      // Snap the longitude.
-      d = theUlGpt.lond();
-      d = ossim::round<int>(d / convertedMultiple) * convertedMultiple;
-      theUlGpt.lond(d);
-
-      // Adjust the stored easting / northing.
-      theUlEastingNorthing = forward(theUlGpt);
-   }
-   else
-   {
-      // Snap the easting.
-      ossim_float64 d = theUlEastingNorthing.x - getFalseEasting();
-      d = ossim::round<int>(d / convertedMultiple) * convertedMultiple;
-      theUlEastingNorthing.x = d + getFalseEasting();
-
-      // Snap the northing.
-      d = theUlEastingNorthing.y - getFalseNorthing();
-      d = ossim::round<int>(d / convertedMultiple) * convertedMultiple;
-      theUlEastingNorthing.y = d + getFalseNorthing();
-
-      // Adjust the stored upper left ground point.
-      theUlGpt = inverse(theUlEastingNorthing);
-   }
-}
-
-void ossimMapProjection::snapTiePointToOrigin()
-{
-   // Convert the tie point.
-   if (isGeographic())
-   {
-      // Note the origin may not be 0.0, 0.0:
-      
-      // Snap the latitude.
-      ossim_float64 d = theUlGpt.latd() - origin().latd();
-      d = ossim::round<int>(d / theDegreesPerPixel.y) * theDegreesPerPixel.y;
-      theUlGpt.latd(d + origin().latd());
-
-      // Snap the longitude.
-      d = theUlGpt.lond() - origin().lond();
-      d = ossim::round<int>(d / theDegreesPerPixel.x) * theDegreesPerPixel.x;
-      theUlGpt.lond(d + origin().lond());
-
-      // Adjust the stored easting / northing.
-      theUlEastingNorthing = forward(theUlGpt);
-   }
-   else
-   {
-      // Snap the easting.
-      ossim_float64 d = theUlEastingNorthing.x - getFalseEasting();
-      d = ossim::round<int>(d / theMetersPerPixel.x) * theMetersPerPixel.x;
-      theUlEastingNorthing.x = d + getFalseEasting();
-
-      // Snap the northing.
-      d = theUlEastingNorthing.y - getFalseNorthing();
-      d = ossim::round<int>(d / theMetersPerPixel.y) * theMetersPerPixel.y;
-      theUlEastingNorthing.y = d + getFalseNorthing();
-
-      // Adjust the stored upper left ground point.
-      theUlGpt = inverse(theUlEastingNorthing);
-   }
-}
-
-void ossimMapProjection::setElevationLookupFlag(bool flag)
-{
-   theElevationLookupFlag = flag;
-}
-
-bool ossimMapProjection::getElevationLookupFlag()const
-{
-   return theElevationLookupFlag;
-}
-   
-
diff --git a/src/ossim/projection/ossimMapProjectionFactory.cpp b/src/ossim/projection/ossimMapProjectionFactory.cpp
deleted file mode 100644
index 138e60e..0000000
--- a/src/ossim/projection/ossimMapProjectionFactory.cpp
+++ /dev/null
@@ -1,285 +0,0 @@
-//*****************************************************************************
-// FILE: ossimMapProjectionFactory.cc
-//
-// License:  See top level LICENSE.txt file.
-//
-// DESCRIPTION:
-//   Contains implementation of class ossimMapProjectionFactory
-//
-// SOFTWARE HISTORY:
-//>
-//   15Jun2001  Garrett Potts
-//              Initial coding.
-//<
-//*****************************************************************************
-//  $Id: ossimMapProjectionFactory.cpp 17815 2010-08-03 13:23:14Z dburken $
-
-#include <ossim/projection/ossimMapProjectionFactory.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimFilename.h>
-
-//***
-// Note to programmer: To add a new projection, search this file for
-// "ADD_PROJECTION" to locate places requiring editing. Functional example
-// below...
-//
-// ADD_PROJECTION: Include all map projection headers here:
-//***
-
-#include <ossim/projection/ossimAlbersProjection.h>
-#include <ossim/projection/ossimAzimEquDistProjection.h>
-#include <ossim/projection/ossimBonneProjection.h>
-#include <ossim/projection/ossimBngProjection.h>
-#include <ossim/projection/ossimCassiniProjection.h>
-#include <ossim/projection/ossimCylEquAreaProjection.h>
-#include <ossim/projection/ossimEquDistCylProjection.h>
-#include <ossim/projection/ossimEckert4Projection.h>
-#include <ossim/projection/ossimEckert6Projection.h>
-#include <ossim/projection/ossimGnomonicProjection.h>
-#include <ossim/projection/ossimLambertConformalConicProjection.h>
-#include <ossim/projection/ossimLlxyProjection.h>
-#include <ossim/projection/ossimMercatorProjection.h>
-#include <ossim/projection/ossimMillerProjection.h>
-#include <ossim/projection/ossimMollweidProjection.h>
-#include <ossim/projection/ossimNewZealandMapGridProjection.h>
-#include <ossim/projection/ossimObliqueMercatorProjection.h>
-#include <ossim/projection/ossimOrthoGraphicProjection.h>
-#include <ossim/projection/ossimPolarStereoProjection.h>
-#include <ossim/projection/ossimPolyconicProjection.h>
-#include <ossim/projection/ossimSinusoidalProjection.h>
-#include <ossim/projection/ossimStereographicProjection.h>
-#include <ossim/projection/ossimTransCylEquAreaProjection.h>
-#include <ossim/projection/ossimTransMercatorProjection.h>
-#include <ossim/projection/ossimUpsProjection.h>
-#include <ossim/projection/ossimUtmProjection.h>
-#include <ossim/projection/ossimVanDerGrintenProjection.h>
-#include <ossim/projection/ossimSpaceObliqueMercatorProjection.h>
-#include <ossim/support_data/ossimSpaceImagingGeom.h>
-//***
-// ADD_PROJECTION: List names of all map projections produced by this factory:
-//***
-
-ossimMapProjectionFactory* ossimMapProjectionFactory::theInstance = 0;
-
-//*****************************************************************************
-//  STATIC METHOD: ossimMapProjectionFactory::instance()
-//  
-//*****************************************************************************
-ossimMapProjectionFactory* ossimMapProjectionFactory::instance()
-{
-   if(!theInstance)
-   {
-      theInstance = new ossimMapProjectionFactory;
-   }
-
-   return (ossimMapProjectionFactory*) theInstance;
-}
-
-ossimProjection*
-ossimMapProjectionFactory::createProjection(const ossimFilename& filename,
-                                            ossim_uint32 entryIdx)const
-{
-   if(!filename.exists())
-   {
-      return NULL;
-   }
-
-   // Check for external geometry file.
-   ossimProjection* proj = createProjectionFromGeometryFile(filename,
-                                                            entryIdx);
-   if (proj)
-   {
-      return proj;
-   }
-
-   ossimFilename geomFile = filename;
-   geomFile = geomFile.setExtension("geom");
-   if(!geomFile.exists())
-   {
-      return NULL;
-   }
-   ossimKeywordlist kwl;
-   if(kwl.addFile(geomFile))
-   {
-      return createProjection(kwl);
-   }
-
-   return NULL;
-}
-
-//*****************************************************************************
-//  METHOD: ossimMapProjectionFactory::create(kwl, prefix)
-//  
-//*****************************************************************************
-ossimProjection* ossimMapProjectionFactory::createProjection(const ossimKeywordlist &keywordList,
-															 const char *prefix) const
-{
-   ossimProjection *result=NULL;
-	
-   const char *lookup = keywordList.find(prefix, ossimKeywordNames::TYPE_KW);
-   const char *lookupSpaceImaging = keywordList.find(prefix, ossimSpaceImagingGeom::SIG_PRODUCER_KW);
-   if(lookup)
-   {
-      result = createProjection(ossimString(lookup).trim());
-      if(result)
-      {
-         result->loadState(keywordList, prefix);
-      }
-   }
-   else
-   {
-      if(lookupSpaceImaging)
-      {
-		  ossimKeywordlist kwl;
-		  ossimKeywordlist kwl2;
-		  kwl.add(keywordList,
-				  prefix,
-				  true);
-         
-         ossimSpaceImagingGeom spaceImaging;
-         
-         spaceImaging.setGeometry(kwl);
-
-         spaceImaging.exportToOssim(kwl2);
-
-         result = ossimProjectionFactoryRegistry::instance()->createProjection(kwl2);
-         if(result)
-         {
-            return result;
-         }
-      }
-      // look for the geom_file keyword.
-      //
-      lookup = keywordList.find(prefix, ossimKeywordNames::GEOM_FILE_KW);
-      if(lookup)
-      {
-         ossimKeywordlist kwl;
-
-         kwl.addFile(lookup);
-
-         result = createProjection(kwl);
-         
-         if(!result)
-         {
-         // maybe they prepend projection. in the geom
-         // file.
-            result = createProjection(kwl, "projection.");
-         }
-
-      }      
-   }
-   return result;
-}
-
-//*****************************************************************************
-//  METHOD: ossimMapProjectionFactory::create(projection_name)
-//*****************************************************************************
-ossimProjection* ossimMapProjectionFactory::createProjection(const ossimString &name) const
-{
-   //***
-   // ADD_PROJECTION: Test for each map projection here:
-   //***
-   if(name ==  STATIC_TYPE_NAME(ossimAlbersProjection))
-      return new ossimAlbersProjection;
-   if(name ==  STATIC_TYPE_NAME(ossimAzimEquDistProjection))
-      return new ossimAzimEquDistProjection;
-   if( name == STATIC_TYPE_NAME(ossimBonneProjection))
-      return new ossimBonneProjection;
-   if( name == STATIC_TYPE_NAME(ossimBngProjection))
-      return new ossimBngProjection;
-   if(name ==  STATIC_TYPE_NAME(ossimCassiniProjection))
-      return new ossimCassiniProjection;
-   if(name ==  STATIC_TYPE_NAME(ossimCylEquAreaProjection))
-      return new ossimCylEquAreaProjection;
-   if(name ==  STATIC_TYPE_NAME(ossimEquDistCylProjection))
-      return new ossimEquDistCylProjection;
-   if(name ==  STATIC_TYPE_NAME(ossimEckert4Projection))
-      return new ossimEckert4Projection;
-   if(name ==  STATIC_TYPE_NAME(ossimEckert6Projection))
-      return new ossimEckert6Projection;
-   if(name == STATIC_TYPE_NAME(ossimGnomonicProjection))
-      return new ossimGnomonicProjection;
-   if(name ==  STATIC_TYPE_NAME(ossimLambertConformalConicProjection))
-      return new ossimLambertConformalConicProjection;
-   if(name ==  STATIC_TYPE_NAME(ossimLlxyProjection))
-      return new ossimLlxyProjection;
-   if(name == STATIC_TYPE_NAME(ossimMercatorProjection))
-      return new ossimMercatorProjection;
-   if(name == STATIC_TYPE_NAME(ossimMillerProjection))
-      return new ossimMillerProjection;
-   if(name == STATIC_TYPE_NAME(ossimMollweidProjection))
-      return new ossimMollweidProjection;
-   if(name == STATIC_TYPE_NAME(ossimNewZealandMapGridProjection))
-      return new ossimNewZealandMapGridProjection;
-   if(name == STATIC_TYPE_NAME(ossimObliqueMercatorProjection))
-      return new ossimObliqueMercatorProjection;
-   if(name == STATIC_TYPE_NAME(ossimOrthoGraphicProjection))
-      return new ossimOrthoGraphicProjection;
-   if(name == STATIC_TYPE_NAME(ossimPolarStereoProjection))
-      return new ossimPolarStereoProjection;
-   if(name == STATIC_TYPE_NAME(ossimPolyconicProjection))
-      return new ossimPolyconicProjection;
-   if(name == STATIC_TYPE_NAME(ossimSinusoidalProjection))
-      return new ossimSinusoidalProjection;
-   if(name == STATIC_TYPE_NAME(ossimStereographicProjection))
-      return new ossimStereographicProjection;
-   if(name == STATIC_TYPE_NAME(ossimTransCylEquAreaProjection))
-      return new ossimTransCylEquAreaProjection;
-   if(name == STATIC_TYPE_NAME(ossimTransMercatorProjection))
-      return new ossimTransMercatorProjection;
-   if(name == STATIC_TYPE_NAME(ossimUpsProjection))
-      return new ossimUpsProjection;
-   if(name == STATIC_TYPE_NAME(ossimUtmProjection))
-      return new ossimUtmProjection;
-   if(name == STATIC_TYPE_NAME(ossimVanDerGrintenProjection))
-      return new ossimVanDerGrintenProjection;
-   if(name == STATIC_TYPE_NAME(ossimSpaceObliqueMercatorProjection))
-      return new ossimSpaceObliqueMercatorProjection;
-   return NULL;
-}
-
-ossimObject* ossimMapProjectionFactory::createObject(const ossimString& typeName)const
-{
-   return createProjection(typeName);
-}
-
-ossimObject* ossimMapProjectionFactory::createObject(const ossimKeywordlist& kwl,
-                                                     const char* prefix)const
-{
-   return createProjection(kwl, prefix);
-}
-
-void ossimMapProjectionFactory::getTypeNameList(std::vector<ossimString>& typeList)const
-{
-   
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimAlbersProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimAzimEquDistProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimBonneProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimBngProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimCassiniProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimCylEquAreaProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimEquDistCylProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimEckert4Projection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimEckert6Projection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimGnomonicProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimLambertConformalConicProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimLlxyProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimMercatorProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimMillerProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimMollweidProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimNewZealandMapGridProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimObliqueMercatorProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimOrthoGraphicProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimPolarStereoProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimPolyconicProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimSinusoidalProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimStereographicProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimTransCylEquAreaProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimTransMercatorProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimUpsProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimUtmProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimVanDerGrintenProjection)));
-   typeList.push_back(ossimString(STATIC_TYPE_NAME(ossimSpaceObliqueMercatorProjection)));
-}
diff --git a/src/ossim/projection/ossimMgrs.c b/src/ossim/projection/ossimMgrs.c
deleted file mode 100644
index 59d1b48..0000000
--- a/src/ossim/projection/ossimMgrs.c
+++ /dev/null
@@ -1,1325 +0,0 @@
-/***************************************************************************/
-/* RSC IDENTIFIER:  MGRS
- *
- * ABSTRACT
- *
- *    This component converts between geodetic coordinates (latitude and 
- *    longitude) and Military Grid Reference System (MGRS) coordinates. 
- *
- * ERROR HANDLING
- *
- *    This component checks parameters for valid values.  If an invalid value
- *    is found, the error code is combined with the current error code using 
- *    the bitwise or.  This combining allows multiple error codes to be
- *    returned. The possible error codes are:
- *
- *          MGRS_NO_ERROR          : No errors occurred in function
- *          MGRS_LAT_ERROR         : Latitude outside of valid range 
- *                                    (-90 to 90 degrees)
- *          MGRS_LON_ERROR         : Longitude outside of valid range
- *                                    (-180 to 360 degrees)
- *          MGRS_STR_ERROR         : An MGRS string error: string too long,
- *                                    too short, or badly formed
- *          MGRS_PRECISION_ERROR   : The precision must be between 0 and 5 
- *                                    inclusive.
- *          MGRS_A_ERROR           : Semi-major axis less than or equal to zero
- *          MGRS_INV_F_ERROR       : Inverse flattening outside of valid range
- *									                  (250 to 350)
- *          MGRS_EASTING_ERROR     : Easting outside of valid range
- *                                    (100,000 to 900,000 meters for UTM)
- *                                    (0 to 4,000,000 meters for UPS)
- *          MGRS_NORTHING_ERROR    : Northing outside of valid range
- *                                    (0 to 10,000,000 meters for UTM)
- *                                    (0 to 4,000,000 meters for UPS)
- *          MGRS_ZONE_ERROR        : Zone outside of valid range (1 to 60)
- *          MGRS_HEMISPHERE_ERROR  : Invalid hemisphere ('N' or 'S')
- *
- * REUSE NOTES
- *
- *    MGRS is intended for reuse by any application that does conversions
- *    between geodetic coordinates and MGRS coordinates.
- *
- * REFERENCES
- *
- *    Further information on MGRS can be found in the Reuse Manual.
- *
- *    MGRS originated from : U.S. Army Topographic Engineering Center
- *                           Geospatial Information Division
- *                           7701 Telegraph Road
- *                           Alexandria, VA  22310-3864
- *
- * LICENSES
- *
- *    None apply to this component.
- *
- * RESTRICTIONS
- *
- *
- * ENVIRONMENT
- *
- *    MGRS was tested and certified in the following environments:
- *
- *    1. Solaris 2.5 with GCC version 2.8.1
- *    2. Windows 95 with MS Visual C++ version 6
- *
- * MODIFICATIONS
- *
- *    Date              Description
- *    ----              -----------
- *    16-11-94          Original Code
- *    15-09-99          Reengineered upper layers
- *
- */
-
-
-/***************************************************************************/
-/*
- *                               INCLUDES
- */
-#include <ctype.h>
-#include <math.h>
-#include <stdio.h>
-#include <string.h>
-#include <ossim/projection/ossimUps.h>
-#include <ossim/projection/ossimUtm.h>
-#include <ossim/projection/ossimMgrs.h>
-
-/*
- *      ctype.h     - Standard C character handling library
- *      math.h      - Standard C math library
- *      stdio.h     - Standard C input/output library
- *      string.h    - Standard C string handling library
- *      ups.h       - Universal Polar Stereographic (UPS) projection
- *      utm.h       - Universal Transverse Mercator (UTM) projection
- *      mgrs.h      - function prototype error checking
- */
-
-
-/***************************************************************************/
-/*
- *                              GLOBAL DECLARATIONS
- */
-#define DEGRAD       0.017453292519943295 /* PI/180                          */
-#define R3           0.052359877559829890 /* RADIANS FOR  3 DEGREES          */ 
-#define R8           0.139626340159546400 /* RADIANS FOR  8 DEGREES          */
-#define R9           0.157079632679489700 /* RADIANS FOR  9 DEGREES          */
-#define R21          0.366519142918809200 /* RADIANS FOR  21 DEGREES         */
-#define R33          0.575958653158128800 /* RADIANS FOR  33 DEGREES         */
-#define R56          0.977384381116824600 /* RADIANS FOR  56 DEGREES         */
-#define R64          1.117010721276371000 /* RADIANS FOR  64 DEGREES         */
-#define R72          1.256637061435917000 /* RADIANS FOR  72 DEGREES         */
-#define R80          1.396263401595464000 /* RADIANS FOR  80 DEGREES         */
-#define UPS_SOUTH              3    /* UPS COORDINATE IN SOUTHERN HEMISPHERE */
-#define UPS_NORTH              2    /* UPS COORDINATE IN NORTHERN HEMISPHERE */ 
-#define UTM                    1    /* UTM COORDINATE                        */ 
-#define ALBET                 "ABCDEFGHIJKLMNOPQRSTUVWXYZ" /* ALPHABET       */
-#define LETTER_A               0   /* ARRAY INDEX FOR LETTER A               */
-#define LETTER_B               1   /* ARRAY INDEX FOR LETTER B               */
-#define LETTER_C               2   /* ARRAY INDEX FOR LETTER C               */
-#define LETTER_D               3   /* ARRAY INDEX FOR LETTER D               */
-#define LETTER_E               4   /* ARRAY INDEX FOR LETTER E               */
-#define LETTER_H               7   /* ARRAY INDEX FOR LETTER H               */
-#define LETTER_I               8   /* ARRAY INDEX FOR LETTER I               */
-#define LETTER_J               9   /* ARRAY INDEX FOR LETTER J               */
-#define LETTER_L              11   /* ARRAY INDEX FOR LETTER L               */
-#define LETTER_M              12   /* ARRAY INDEX FOR LETTER M               */
-#define LETTER_N              13   /* ARRAY INDEX FOR LETTER N               */
-#define LETTER_O              14   /* ARRAY INDEX FOR LETTER O               */
-#define LETTER_P              15   /* ARRAY INDEX FOR LETTER P               */
-#define LETTER_Q              16   /* ARRAY INDEX FOR LETTER Q               */
-#define LETTER_R              17   /* ARRAY INDEX FOR LETTER R               */
-#define LETTER_S              18   /* ARRAY INDEX FOR LETTER S               */
-#define LETTER_U              20   /* ARRAY INDEX FOR LETTER U               */
-#define LETTER_V              21   /* ARRAY INDEX FOR LETTER V               */
-#define LETTER_W              22   /* ARRAY INDEX FOR LETTER W               */
-#define LETTER_X              23   /* ARRAY INDEX FOR LETTER X               */
-#define LETTER_Y              24   /* ARRAY INDEX FOR LETTER Y               */
-#define LETTER_Z              25   /* ARRAY INDEX FOR LETTER Z               */
-#define RND1                  0.1e0  /* ROUND TO NEAREST .1            */
-#define RND5                  0.5e0  /* ROUND TO NEAREST .5            */
-#define EOLN                   '\0'  /* END OF STRING CHARACTER        */
-#define BLANK                   ' '  /* BLANK CHARACTER                */
-#define OSSIM_MGRS_LETTERS            3  /* NUMBER OF LETTERS IN MGRS              */
-#define NUM_OFFSET             48  /* USED TO CONVERT NUMBERS TO LETTERS     */
-#define ONEHT          100000.e0    /* ONE HUNDRED THOUSAND                  */
-#define TWOMIL        2000000.e0    /* TWO MILLION                           */
-#define EIGHT          800000.e0    /* EIGHT HUNDRED THOUSAND                */
-#define ONE3HT        1300000.e0    /* ONE MILLION THREE HUNDRED THOUSAND    */
-#define ZERO                   0.e0  /* ZERO                           */
-#define TEN                10.e0    /* TEN                                   */
-#define TRUE                      1  /* CONSTANT VALUE FOR TRUE VALUE  */
-#define FALSE                     0  /* CONSTANT VALUE FOR FALSE VALUE */
-#define PI    3.14159265358979323e0  /* PI                             */
-#define PI_OVER_2  (PI / 2.0e0)
-#define NUM                   "01234567890"                /* NUMBERS        */
-#define MAXALBET              25   /* LAST INDEX IN ALPHABET ARRAY(0-25)     */
-#define MAXNUMBER             10   /* LAST INDEX IN NUMBER ARRAY(0-9)        */
-#define OSSIM_MGRS_ZONE_AND_LETTERS   5  /* NUM. OF CHARS. IN ZONE AND LETTERS     */
-#define OSSIM_MGRS_MINIMUM            9  /* MINIMUM NUMBER OF CHARS FOR MGRS       */
-#define OSSIM_MGRS_MAXIMUM           15  /* MAXIMUM NUMBER OF CHARS FOR MGRS       */
-
-#define MIN_EASTING  100000
-#define MAX_EASTING  900000
-#define MIN_NORTHING 0
-#define MAX_NORTHING 10000000
-#define MAX_PRECISION           5   /* Maximum precision of easting & northing */
-#define MIN_UTM_LAT      ( (-80 * PI) / 180.0 ) /* -80 degrees in radians    */
-#define MAX_UTM_LAT      ( (84 * PI) / 180.0 )  /* 84 degrees in radians     */
-
-#define MIN_EAST_NORTH 0
-#define MAX_EAST_NORTH 4000000
-
-/* Ellipsoid parameters, default to WGS 84 */
-double OSSIM_MGRS_a = 6378137.0;    /* Semi-major axis of ellipsoid in meters */
-double OSSIM_MGRS_f = 1 / 298.257223563; /* Flattening of ellipsoid           */
-double OSSIM_MGRS_recpf = 298.257223563;
-char   OSSIM_MGRS_Ellipsoid_Code[3] = {'W','E',0};
-
-const char* OSSIM_CLARKE_1866 = "CC";
-const char* OSSIM_CLARKE_1880 = "CD";
-const char* OSSIM_BESSEL_1841 = "BR";
-/* 
- *    OSSIM_CLARKE_1866 : Ellipsoid code for OSSIM_CLARKE_1866
- *    OSSIM_CLARKE_1880 : Ellipsoid code for OSSIM_CLARKE_1880
- *    OSSIM_BESSEL_1841 : Ellipsoid code for OSSIM_BESSEL_1841
- */
-
-
-/***************************************************************************/
-/*
- *                              FUNCTIONS     
- */
-
-
-void UTMSET (long izone, 
-             long* ltrlow, 
-             long* ltrhi, 
-             double *fnltr)
-{ /* BEGIN UTMSET */
-  /*
-   *    izone  : Zone number
-   *    ltrlow : 2nd letter low number
-   *    ltrhi  : 2nd letter high number
-   *    fnltr  : False northing
-   */
-  long iset;      /* Set number (1-6) based on UTM zone number           */
-  long igroup;    /* Group number (1-2) based on ellipsoid code and zone */
-  iset = 1;
-  while (((izone-iset) / 6) * 6 + iset != izone)
-  {
-    iset = iset +1;
-    if (iset > 6)
-    {
-      return;
-    }
-  } 
-  igroup = 1;
-  if (!strcmp(OSSIM_MGRS_Ellipsoid_Code,OSSIM_CLARKE_1866) || !strcmp(OSSIM_MGRS_Ellipsoid_Code, OSSIM_CLARKE_1880) || !strcmp(OSSIM_MGRS_Ellipsoid_Code,OSSIM_BESSEL_1841))
-  {
-    igroup = 2;
-  }
-  else if (!strcmp(OSSIM_MGRS_Ellipsoid_Code, OSSIM_CLARKE_1866) && (izone >= 47) && (izone <= 55 ))
-  {
-    igroup = 1;
-  }
-  if ((iset == 1) || (iset == 4))
-  {
-    *ltrlow = LETTER_A;
-    *ltrhi = LETTER_H;
-  }
-  else if ((iset == 2) || (iset == 5))
-  {
-    *ltrlow = LETTER_J;
-    *ltrhi = LETTER_R;
-  }
-  else if ((iset == 3) || (iset == 6))
-  {
-    *ltrlow = LETTER_S;
-    *ltrhi = LETTER_Z;
-  }
-  if (igroup == 1)
-  {
-    *fnltr = ZERO;
-    if ((iset % 2) ==  0)
-    {
-      *fnltr = 1500000.e0;
-    }
-  }
-  else if (igroup == 2)
-  {
-    *fnltr = 1000000.0e0;
-    if ((iset % 2) == 0)
-    {
-      *fnltr =  500000.e0;
-    }
-  }
-  return;
-} /* END OF UTMSET */
-
-
-void UTMLIM (long* n, 
-             double sphi, 
-             long izone, 
-             double *spsou, 
-             double *spnor,
-             double *sleast, 
-             double *slwest)
-{                          /* BEGIN UTMLIM */
-  /*
-   *    n      : 1st letter number for MGRS
-   *    sphi   : Latitude in radians
-   *    izone  : Zone number 
-   *    spsou  : South latitude limit
-   *    spnor  : North latitude limit
-   *    sleast : East longitude limit 
-   *    slwest : West longitude limit 
-   */
-  double slcm;     /* Central meridian - Longitude of origin              */
-  double temp;     /* Temporary variable                                  */
-  long icm;        /* Central meridian                                    */
-  long isphi;      /* South latitude limit                                */
-  if (*n <= LETTER_A)
-  {
-    temp = ((sphi + R80) / (R8)) + 2;
-    temp = temp + .00000001;
-    *n = (long)temp;
-    if (*n > LETTER_H)
-    {
-      *n = *n + 1;
-    }
-    if (*n > LETTER_N)
-    {
-      *n = *n + 1;
-    }
-    if (*n >= LETTER_Y)
-    {
-      *n = LETTER_X;
-    }
-    if ((*n  ==  LETTER_M) && (sphi  ==  ZERO ))
-    {
-      *n = LETTER_N;
-    }
-    isphi = (*n - 3) * 8 - 80;
-  }
-  else
-  {
-    isphi = (*n - 3) * 8 - 80;
-    *n = *n - 1;    
-  }
-  if (*n > LETTER_H)
-  {
-    isphi = isphi - 8;
-  }
-  if (*n > LETTER_N)
-  {
-    isphi = isphi - 8;
-  }
-  *spsou = (double)(isphi) * DEGRAD;
-  *spnor = *spsou + R8;
-  if (*n == LETTER_X)
-  {
-    *spnor = *spsou + 12.e0 * DEGRAD;
-  }
-  icm = izone * 6 - 183;
-  slcm = (double) icm * DEGRAD;
-  *sleast = slcm + R3;
-  *slwest = slcm - R3;
-  if ((izone < 31) || (izone > 37))
-  {
-    return;
-  }
-  if (*n < LETTER_V)
-  {
-    return;
-  }
-  if ((*n == LETTER_V) && (izone == 31))
-  {
-    *sleast = R3;
-  }
-  if ((*n == LETTER_V) && (izone == 32))
-  {
-    *slwest = R3;
-  }
-  if (*n < LETTER_X)
-  {
-    return;
-  }
-  if (izone == 31)
-  {
-    *sleast = R9;
-  }
-  if (izone == 33)
-  {
-    *slwest = R9;
-    *sleast = R21;
-  }
-  if (izone == 35)
-  {
-    *slwest = R21;
-    *sleast = R33;
-  }
-  if (izone == 37)
-  {
-    *slwest = R33;
-  }
-  return;
-} /* END OF UTMLIM */
-
-
-void UTMOSSIM_MGRS (long izone,
-              long* ltrnum,
-              double sphi,
-              double x,
-              double y)
-{ /* BEGIN UTMMGRS */
-  /*
-   *    izone      : Zone number.
-   *    ltrnum     : Values of letters in the MGRS coordinate.
-   *    sphi       : Latitude in radians.
-   *    x          : Easting.
-   *    y          : Northing.
-   *
-   *    UTMMGRS CALLS THE FOLLOWING ROUTINES:
-   *
-   *    GPTUTM
-   *    UTMLIM
-   *    UTMSET
-   */
-  double fnltr;       /* False northing for 3rd letter                     */
-  double slcm;        /* Central meridian - longitude of origin            */
-  double sleast;      /* Longitude east limit - UTM                        */
-  double slwest;      /* Longitude west limit -UTM                         */
-  double spnor;       /* MGRS north latitude limits based on 1st letter    */
-  double spsou;       /* MGRS south latitude limits based on 1st letter    */
-  double xltr;        /* Easting used to derive 2nd letter of MGRS         */
-  double yltr;        /* Northing used to derive 3rd letter of MGRS        */
-  long ltrlow;        /* 2nd letter range - low number                     */
-  long ltrhi;         /* 2nd letter range - high number                    */
-  char hemisphere;
-
-  UTMSET(izone, &ltrlow, &ltrhi, &fnltr);
-  ltrnum[0] = LETTER_A;
-  UTMLIM(&ltrnum[0], sphi, izone, &spsou, &spnor, &sleast, &slwest);
-  slcm = (double)(izone * 6 - 183) * DEGRAD;
-  /*
-    GPTUTM(a, recf, spsou, slcm, &izone, &yltr, &xltr, (long)1);
-  */
-  Set_UTM_Parameters(OSSIM_MGRS_a,OSSIM_MGRS_f,izone);
-  Convert_Geodetic_To_UTM(spsou,slcm,&izone,&hemisphere,&xltr,&yltr);
-
-  yltr = (double)((long)(y + RND5));
-  if (((double)((long)(yltr + RND5))) == ((double)((long)(1.e7 + RND5))))
-  {
-    yltr = (double)((long)(yltr - 1.e0 + RND5)); 
-  }
-  while (yltr >= TWOMIL)
-  {
-    yltr = yltr - TWOMIL; 
-  }
-  yltr = yltr - fnltr;
-  if (yltr < ZERO)
-  {
-    yltr = yltr + TWOMIL;
-  }
-  ltrnum[2] = (long)((yltr + RND1) / ONEHT); 
-  if (ltrnum[2] > LETTER_H)
-  {
-    ltrnum[2] = ltrnum[2] + 1;
-  }
-  if (ltrnum[2] > LETTER_N)
-  {
-    ltrnum[2] = ltrnum[2] + 1;
-  }
-  xltr = (double)((long)(x));
-  if (((ltrnum[0] == LETTER_V) && (izone == 31)) && 
-      (((double)((long)(xltr + RND5))) == ((double)((long)(5.e5 + RND5)))))
-  {
-    xltr = (double)((long)(xltr - 1.e0 + RND5)); /* SUBTRACT 1 METER */
-  }
-  ltrnum[1] = ltrlow + ((long)((xltr + RND1) / ONEHT) -1); 
-  if ((ltrlow == LETTER_J) && (ltrnum[1] > LETTER_N))
-  {
-    ltrnum[1] = ltrnum[1] + 1;
-  }
-  return;
-} /* END UTMMGRS */
-
-
-void UPSSET (long n, 
-             long* ltrlow, 
-             long* ltrhi, 
-             double *feltr,
-             double *fnltr, 
-             long* ltrhy)
-{ /* BEGIN UPSSET */
-  /*
-   *   n      : Value of 1st letter in MGRS coordinate.
-   *   ltrlow : Low number for 2nd letter.
-   *   ltrhi  : High number for 2nd letter.
-   *   feltr  : False easting.
-   *   fnltr  : False northing.
-   *   ltrhy  : High number for 3rd letter.
-   */
-  if (n == LETTER_Z) /* EASTERN HEMISPHERE-NORTH ZONE */
-  {
-    *ltrlow = LETTER_A;
-    *ltrhi  = LETTER_J;
-    *feltr = TWOMIL;
-    *fnltr = ONE3HT;
-    *ltrhy = LETTER_P;
-  }
-  else if (n == LETTER_Y) /* WESTERN HEMISPHERE-NORTH ZONE */
-  {
-    *ltrlow = LETTER_J;
-    *ltrhi  = LETTER_Z;
-    *feltr = EIGHT;
-    *fnltr = ONE3HT;
-    *ltrhy = LETTER_P;
-  }
-  else if (n == LETTER_B) /* ** EASTERN HEMISPHERE - SOUTH ZONE */
-  {
-    *ltrlow = LETTER_A;
-    *ltrhi  = LETTER_R;
-    *feltr = TWOMIL;
-    *fnltr = EIGHT;
-    *ltrhy = LETTER_Z;
-  }
-  else if (n == LETTER_A) /* ** WESTERN HEMISPHERE - SOUTH ZONE */
-  {
-    *ltrlow = LETTER_J;
-    *ltrhi  = LETTER_Z;
-    *feltr = EIGHT;
-    *fnltr = EIGHT;
-    *ltrhy = LETTER_Z;
-  }
-  return;
-} /* END OF UPSSET */
-
-
-void UPS (char* mgrs,
-          long* ltrnum,
-          double x,
-          double y,
-          long iarea)
-{ /* BEGIN UPS */
-  /*
-   *    mgrs   : MGRS coordinate.
-   *    ltrnum : Values of the letters in the MGRS coordinate.
-   *    x      : Easting.
-   *    y      : Northing.
-   *    iarea  : Set to UPS_NORTH or UPS_SOUTH.
-   *
-   *    UPS CALLS THE FOLLOWING ROUTINES:
-   *
-   *    UPSSET
-   */
-  double feltr=0.0;       /* False easting for 2nd letter                      */
-  double fnltr=0.0;       /* False northing for 3rd letter                     */
-  double xltr=0.0;        /* Easting used to derive 2nd letter of MGRS         */
-  double yltr=0.0;        /* Northing used to derive 3rd letter of MGRS        */
-  long ltrlow=0;        /* 2nd letter range - low number                     */
-  long ltrhi=0;         /* 2nd letter range - high number                    */
-  long ltrhy=0;         /* 3rd letter range - high number (UPS)              */
-  if (iarea == UPS_NORTH)
-  {
-    ltrnum[0] = LETTER_Y;
-    if (((double)((long)(x + RND5))) >= TWOMIL)
-    {
-      ltrnum[0] = LETTER_Z; 
-    }
-  }
-  else if (iarea == UPS_SOUTH)
-  {
-    ltrnum[0] = LETTER_A;
-    if (((double)((long)(x + RND5))) >= TWOMIL)
-    {
-      ltrnum[0] = LETTER_B;
-    }
-  }
-  UPSSET(ltrnum[0], &ltrlow, &ltrhi, &feltr, &fnltr, &ltrhy);
-  mgrs[0] = BLANK;
-  mgrs[1] = BLANK;
-  yltr = (double)((long)(y + RND5));
-  yltr = yltr - fnltr;
-  ltrnum[2] = (long)((yltr + RND1) / ONEHT);
-  if (ltrnum[2] > LETTER_H)
-  {
-    ltrnum[2] = ltrnum[2] + 1;
-  }
-  if (ltrnum[2] > LETTER_N)
-  {
-    ltrnum[2] = ltrnum[2] + 1;
-  }
-  xltr = (double)((long)(x + RND5));
-  xltr = xltr - feltr;
-  ltrnum[1] = ltrlow + ((long)((xltr + RND1) / ONEHT)); 
-  if (x < TWOMIL)
-  {
-    if (ltrnum[1] > LETTER_L)
-    {
-      ltrnum[1] = ltrnum[1] + 3; 
-    }
-    if (ltrnum[1] > LETTER_U)
-    {
-      ltrnum[1] = ltrnum[1] + 2; 
-    }
-  }
-  if (x >= TWOMIL)
-  {
-    if (ltrnum[1] > LETTER_C)
-    {
-      ltrnum[1] = ltrnum[1] + 2; 
-    }
-    if (ltrnum[1] > LETTER_H)
-    {
-      ltrnum[1] = ltrnum[1] + 1; 
-    }
-    if (ltrnum[1] > LETTER_L)
-    {
-      ltrnum[1] = ltrnum[1] + 3; 
-    }
-  }
-  return;
-} /* END OF UPS */
-
-
-void LTR2UPS (long* ltrnum, 
-              long ltrlow, 
-              long ltrhi, 
-              long ltrhy, 
-              long* ierr, 
-              double *xltr, 
-              double *yltr, 
-              double fnltr, 
-              double feltr, 
-              double *x, 
-              double *y, 
-              double sign)
-{ /* BEGIN LTR2UPS */
-  /*    
-   *    ltrnum : Values of the letters in the MGRS coordinate
-   *    ltrlow : Low number
-   *    ltrhi  : High number-2nd letter
-   *    ltrhy  : High number-3rd letter
-   *    ierr   : Error code
-   *    xltr   : Easting for 100,000 meter grid square
-   *    yltr   : Northing for 100,000 meter grid square
-   *    fnltr  : False northing for 3rd letter
-   *    feltr  : False easting for 2nd letter
-   *    x      : Easting
-   *    y      : Northing
-   *    sign   : Set to either positive or negative
-   */
-  if (ltrnum[1] < ltrlow)
-  {
-    *ierr = TRUE;
-    return;
-  }
-  if (ltrnum[1] > ltrhi)
-  {
-    *ierr = TRUE;
-    return;
-  }
-  if (ltrnum[2] > ltrhy)
-  {
-    *ierr = TRUE;
-    return;
-  }
-  if ((ltrnum[1] == LETTER_D) || (ltrnum[1] == LETTER_E) ||
-      (ltrnum[1] == LETTER_M) || (ltrnum[1] == LETTER_N) ||
-      (ltrnum[1] == LETTER_V) || (ltrnum[1] == LETTER_W))
-  {
-    *ierr = TRUE;
-    return;
-  }
-  *yltr = (double)ltrnum[2] * ONEHT + fnltr; 
-  if (ltrnum[2] > LETTER_I)
-  {
-    *yltr = *yltr - ONEHT;
-  }
-  if (ltrnum[2] > LETTER_O)
-  {
-    *yltr = *yltr - ONEHT;
-  }
-  *xltr = (double)((ltrnum[1]) - ltrlow) * ONEHT + feltr; 
-  if (ltrlow != LETTER_A)
-  {
-    if (ltrnum[1] > LETTER_L)
-    {
-      *xltr = *xltr - 3.e0 * ONEHT;
-    }
-    if (ltrnum[1] > LETTER_U)
-    {
-      *xltr = *xltr - 2.e0 * ONEHT;
-    }
-  }
-  else if (ltrlow == LETTER_A)
-  {
-    if (ltrnum[1] > LETTER_C)
-    {
-      *xltr = *xltr - 2.e0 * ONEHT;
-    }
-    if (ltrnum[1] > LETTER_I)
-    {
-      *xltr = *xltr - ONEHT;
-    }
-    if (ltrnum[1] > LETTER_L)
-    {
-      *xltr = *xltr - 3.e0 * ONEHT ;
-    }
-  }
-  *x = *xltr;
-  *y = *yltr * sign;
-  return;
-} /* END OF LTR2UPS */
-
-
-void GRID_UPS (long   *Letters,
-               char   *Hemisphere,
-               double *Easting,
-               double *Northing,
-               long   *Error)
-{ /* BEGIN GRID_UPS */
-  double feltr=0.0;               /* False easting for 2nd letter               */
-  double fnltr=0.0;               /* False northing for 3rd letter              */
-  double sleast=0.0;              /* Longitude east limit - UTM                 */
-  double slwest=0.0;              /* Longitude west limit -UTM                  */
-  double spnor=0.0;               /* North latitude limits based on 1st letter  */
-  double spsou=0.0;               /* South latitude limits based on 1st letter  */
-  double x=0.0;                   /* easting                                    */
-  double xltr=0.0;                /* easting for 100,000 meter grid square      */
-  double xnum=0.0;                /* easting part of MGRS                       */
-  double y=0.0;                   /* northing                                   */
-  double yltr=0.0;                /* northing for 100,000 meter grid square     */
-  double ynum=0.0;                /* northing part of MGRS                      */
-  long izone=0;                 /* Zone number                                */
-  long ltrhi=0;                 /* 2nd letter range - high number             */
-  long ltrhy=0;                 /* 3rd letter range - high number (UPS)       */
-  long ltrlow=0;                /* 2nd letter range - low number              */
-  long sign=0;
-  double sphi=0.0;
-  double slam=0.0;
-  if ((Letters[0] == LETTER_Y) || (Letters[0] == LETTER_Z))
-  {
-    spsou = MAX_UTM_LAT;
-    sign = 1;
-  }
-  else
-  {
-    spsou = MIN_UTM_LAT;
-    sign = -1;
-  }
-  slam = PI / 2.e0;
-  if ((Letters[0] == LETTER_Y) || (Letters[0] == LETTER_A))
-  {
-    slam = -slam;
-  }
-  izone = 0;
-  sphi = spsou;
-  Set_UPS_Parameters(OSSIM_MGRS_a,OSSIM_MGRS_f);
-  Convert_Geodetic_To_UPS(sphi,slam,Hemisphere,&x,&y);
-  spnor = sphi;
-  sleast = slam;
-  slwest = slam;
-  UPSSET(Letters[0], &ltrlow, &ltrhi, &feltr, &fnltr, &ltrhy);
-  LTR2UPS(Letters, ltrlow, ltrhi, ltrhy, Error, &xltr, &yltr, fnltr, feltr, 
-          &x, &y, sign);
-  xnum = *Easting;
-  ynum = *Northing;
-  y = (yltr + ynum);
-  x = xltr + xnum;
-  *Easting = x;
-  *Northing = y;
-  return;
-} /* END OF GRID_UPS */
-
-
-void LTR2UTM (long* ltrnum, 
-              long ltrlow, 
-              long ltrhi, 
-              long* ierr, 
-              double *xltr, 
-              double *yltr, 
-              double fnltr, 
-              double yslow, 
-              double ylow) 
-{ /* BEGIN LTR2UTM */
-  /*    
-   *    xltr   : Easting for 100,000 meter grid square.
-   *    yltr   : Northing for 100,000 meter grid square.
-   *    ierr   : Error code.
-   *    ltrnum : Values of the letters in the OSSIM_MGRS coordinate.
-   *    ltrlow : Low number.
-   *    ltrhi  : High number.
-   *    fnltr  : False northing for 3rd letter.
-   *    yslow  : Northing scaled down to less than 2 million.
-   *    ylow   : Lowest northing of area to nearest 100,000.
-   */
-  if (ltrnum[1] < ltrlow)
-  {
-    *ierr = TRUE;
-    return;
-  }
-  if (ltrnum[1] > ltrhi)
-  {
-    *ierr = TRUE;
-    return;
-  }
-  if (ltrnum[2] > LETTER_V)
-  {
-    *ierr = TRUE;
-    return;
-  }
-  *yltr = (double)(ltrnum[2]) * ONEHT + fnltr;
-  *xltr = (double)((ltrnum[1]) - ltrlow + 1) * ONEHT;
-  if ((ltrlow == LETTER_J) && (ltrnum[1] > LETTER_O))
-  {
-    *xltr = *xltr - ONEHT;
-  }
-  if (ltrnum[2] > LETTER_O)
-  {
-    *yltr = *yltr - ONEHT;
-  }
-  if (ltrnum[2] > LETTER_I)
-  {
-    *yltr = *yltr - ONEHT; 
-  }
-  if (((double)((long)(*yltr + RND5))) >= ((double)((long)(TWOMIL + RND5))))
-  {
-    *yltr = *yltr - TWOMIL;
-  }
-  *yltr = ((double)((long)(*yltr + RND5)));
-  *yltr = *yltr - yslow;
-  if (*yltr < ZERO)
-  {
-    *yltr = *yltr + TWOMIL;
-  }
-  *yltr = ((double)((long)(ylow + *yltr + RND5)));
-  return;
-} /* END OF LTR2UTM */
-
-
-void GRID_UTM (long   *Zone,
-               long   *Letters,
-               char   *Hemisphere,
-               double *Easting,
-               double *Northing,
-               long   In_Precision,
-               long   *Error)
-{ /* BEGIN GRID_UTM */
-  double fnltr;               /* False northing for 3rd letter              */
-  long ltrhi;                 /* 2nd letter range - High number             */
-  long ltrlow;                /* 2nd letter range - Low number              */
-  long number;                /* Value of ltrnum[0] + 1                     */
-/*  double slam;*/
-  double slcm;                /* Central meridian                           */
-  double sleast;              /* Longitude east limit - UTM                 */
-  double slwest;              /* Longitude west limit -UTM                  */
-  double sphi;                /* Latitude (needed by UTMLIM)                */
-  double spnor;               /* North latitude limits based on 1st letter  */
-  double spsou;               /* South latitude limits based on 1st letter  */
-  double xltr;                /* Easting for 100,000 meter grid square      */
-  double ylow;                /* Lowest northing of area to nearest 100,000 */
-  double yltr;                /* Northing for 100,000 meter grid square     */
-  double yslow;               /* Northing scaled down to less than 2 million*/
-  double Latitude = 0.0;
-  double Longitude = 0.0;
-  double divisor = 1.0;
-  if ((*Zone == 32) && (Letters[0] == LETTER_X))
-  {
-    *Error = TRUE;
-    return;
-  }
-  if ((*Zone == 34) && (Letters[0] == LETTER_X))
-  {
-    *Error = TRUE;
-    return;
-  }
-  if ((*Zone == 36) && (Letters[0] == LETTER_X))
-  {
-    *Error = TRUE;
-    return;
-  }
-  number = Letters[0] + 1;
-  sphi = 0.0;
-  UTMLIM(&number,sphi,*Zone,&spsou,&spnor,&sleast,&slwest);
-  Set_UTM_Parameters(OSSIM_MGRS_a,OSSIM_MGRS_f,*Zone);
-  slcm = (double)(*Zone * 6 - 183) * DEGRAD; 
-  Convert_Geodetic_To_UTM(spsou,slcm,Zone,Hemisphere,&xltr,&yltr);
-  ylow = ((double)((long)((double)((long)(yltr / ONEHT)) * ONEHT)));
-  yslow = ylow;
-  while (yslow >= TWOMIL)
-  {
-    yslow = yslow - TWOMIL;
-  }
-  yslow = ((double)((long)(yslow)));
-  UTMSET(*Zone, &ltrlow, &ltrhi, &fnltr);
-  LTR2UTM(Letters, ltrlow, ltrhi, Error, &xltr, &yltr, fnltr, yslow, ylow);
-  *Easting = xltr + *Easting;
-  *Northing = yltr + *Northing;
-  /* check that point is within Zone Letter bounds */
-  Convert_UTM_To_Geodetic(*Zone,*Hemisphere,*Easting,*Northing,&Latitude,&Longitude);
-  divisor = pow (10.0, In_Precision);
-  if (((spsou - DEGRAD/divisor) <= Latitude) && (Latitude <= (spnor + DEGRAD/divisor)))
-    return;
-  else
-    *Error = TRUE;
-  return;
-}/* END OF GRID_UTM */
-
-
-long Round_OSSIM_MGRS (double value)
-/* Round value to nearest integer, using standard engineering rule */
-{ /* Round_OSSIM_MGRS */
-  double ivalue;
-  long ival;
-  double fraction = modf (value, &ivalue);
-  ival = (long)(ivalue);
-  if ((fraction > 0.5) || ((fraction == 0.5) && (ival%2 == 1)))
-    ival++;
-  return (ival);
-} /* Round_OSSIM_MGRS */
-
-
-long Make_OSSIM_MGRS_String (char* OSSIM_MGRS, 
-                       long Zone, 
-                       long ltrnum[OSSIM_MGRS_LETTERS], 
-                       double Easting, 
-                       double Northing,
-                       long Precision)
-/* Construct an OSSIM_MGRS string from its component parts */
-{ /* Make_OSSIM_MGRS_String */
-  int i;
-  int j;
-  int error_code = OSSIM_MGRS_NO_ERROR;
-  double divisor;
-  long int east;  /* double data type? (drb) */
-  long int north; /* double data type? (drb) */
-  i = 0;
-  if (Zone)
-    i = sprintf (OSSIM_MGRS+i,"%2.2ld",Zone);
-  for (j=0;j<3;j++)
-    OSSIM_MGRS[i++] = ALBET[ltrnum[j]];
-  divisor = pow (10.0, (5 - Precision));
-  Easting = fmod (Easting, 100000.0);
-  if (Easting >= 99999.5)
-    Easting = 99999.0;
-  east = (long int)(Easting/divisor);
-  i += sprintf (OSSIM_MGRS+i, "%*.*ld", (int)Precision, (int)Precision, east);
-  Northing = fmod (Northing, 100000.0);
-  if (Northing >= 99999.5)
-    Northing = 99999.0;
-  north = (long int)(Northing/divisor);
-  i += sprintf (OSSIM_MGRS+i, "%*.*ld", (int)Precision, (int)Precision, north);
-  return (error_code);
-} /* Make_OSSIM_MGRS_String */
-
-
-long Break_OSSIM_MGRS_String (const char* OSSIM_MGRS,
-                        long* Zone,
-                        long Letters[OSSIM_MGRS_LETTERS],
-                        double* Easting,
-                        double* Northing,
-                        long* Precision)
-/* Break down an OSSIM_MGRS string into its component parts */
-{ /* Break_OSSIM_MGRS_String */
-  long error_code = OSSIM_MGRS_NO_ERROR;
-  long i = 0;
-  long j;
-  long num_digits;
-  long num_letters;
-  while (OSSIM_MGRS[i] == ' ')
-    i++;  /* skip any leading blanks */
-  j = i;
-  while (isdigit(OSSIM_MGRS[i]))
-    i++;
-  num_digits = i - j;
-  if (num_digits <= 2)
-    if (num_digits > 0)
-    {
-      char zone_string[3];
-      /* get zone */
-      strncpy (zone_string, OSSIM_MGRS+j, 2);
-      zone_string[2] = 0;
-      sscanf (zone_string, "%ld", Zone);  
-      if ((*Zone < 1) || (*Zone > 60))
-        error_code |= OSSIM_MGRS_STRING_ERROR;
-    }
-    else
-      *Zone = 0;
-  else
-    error_code |= OSSIM_MGRS_STRING_ERROR;
-  j = i;
-  while (isalpha(OSSIM_MGRS[i]))
-    i++;
-  num_letters = i - j;
-  if (num_letters == 3)
-  {
-    /* get letters */
-    Letters[0] = (toupper(OSSIM_MGRS[j]) - (long)'A');
-    if ((Letters[0] == LETTER_I) || (Letters[0] == LETTER_O))
-      error_code |= OSSIM_MGRS_STRING_ERROR;
-    Letters[1] = (toupper(OSSIM_MGRS[j+1]) - (long)'A');
-    if ((Letters[1] == LETTER_I) || (Letters[1] == LETTER_O))
-      error_code |= OSSIM_MGRS_STRING_ERROR;
-    Letters[2] = (toupper(OSSIM_MGRS[j+2]) - (long)'A');
-    if ((Letters[2] == LETTER_I) || (Letters[2] == LETTER_O))
-      error_code |= OSSIM_MGRS_STRING_ERROR;
-  }
-  else
-    error_code |= OSSIM_MGRS_STRING_ERROR;
-  j = i;
-  while (isdigit(OSSIM_MGRS[i]))
-    i++;
-  num_digits = i - j;
-  if ((num_digits <= 10) && (num_digits%2 == 0))
-  {
-    long n;
-    char east_string[6];
-    char north_string[6];
-    long east;
-    long north;
-    double multiplier;
-    /* get easting & northing */
-    n = num_digits/2;
-    *Precision = n;
-    if (n > 0)
-    {
-      strncpy (east_string, OSSIM_MGRS+j, n);
-      east_string[n] = 0;
-      sscanf (east_string, "%ld", &east);
-      strncpy (north_string, OSSIM_MGRS+j+n, n);
-      north_string[n] = 0;
-      sscanf (north_string, "%ld", &north);
-      multiplier = pow (10.0, 5 - n);
-      *Easting = east * multiplier;
-      *Northing = north * multiplier;
-    }
-    else
-    {
-      *Easting = 0.0;
-      *Northing = 0.0;
-    }
-  }
-  else
-    error_code |= OSSIM_MGRS_STRING_ERROR;
-  return (error_code);
-} /* Break_OSSIM_MGRS_String */
-
-
-long Set_OSSIM_MGRS_Parameters (double a,
-                          double f,
-                          const char* Ellipsoid_Code)
-/*
- * The function SET_OSSIM_MGRS_PARAMETERS receives the ellipsoid parameters and sets
- * the corresponding state variables. If any errors occur, the error code(s)
- * are returned by the function, otherwise OSSIM_MGRS_NO_ERROR is returned.
- *
- *   a                : Semi-major axis of ellipsoid in meters  (input)
- *   f                : Flattening of ellipsoid                 (input)
- *   Ellipsoid_Code   : 2-letter code for ellipsoid             (input)
- */
-{ /* Set_OSSIM_MGRS_Parameters  */
-
-  double inv_f = 1 / f;
-  long Error_Code = OSSIM_MGRS_NO_ERROR;
-
-  if (a <= 0.0)
-  { /* Semi-major axis must be greater than zero */
-    Error_Code |= OSSIM_MGRS_A_ERROR;
-  }
-  if ((inv_f < 250) || (inv_f > 350))
-  { /* Inverse flattening must be between 250 and 350 */
-    Error_Code |= OSSIM_MGRS_INV_F_ERROR;
-  }
-  if (!Error_Code)
-  { /* no errors */
-    OSSIM_MGRS_a = a;
-    OSSIM_MGRS_f = f;
-    OSSIM_MGRS_recpf = inv_f;
-    strcpy (OSSIM_MGRS_Ellipsoid_Code, Ellipsoid_Code);
-  }
-  return (Error_Code);
-}  /* Set_OSSIM_MGRS_Parameters  */
-
-
-
-void Get_OSSIM_MGRS_Parameters (double *a,
-                          double *f,
-                          char* Ellipsoid_Code)
-/*
- * The function Get_OSSIM_MGRS_Parameters returns the current ellipsoid
- * parameters.
- *
- *  a                : Semi-major axis of ellipsoid, in meters (output)
- *  f                : Flattening of ellipsoid					       (output)
- *  Ellipsoid_Code   : 2-letter code for ellipsoid             (output)
- */
-{ /* Get_OSSIM_MGRS_Parameters */
-  *a = OSSIM_MGRS_a;
-  *f = OSSIM_MGRS_f;
-  strcpy (Ellipsoid_Code, OSSIM_MGRS_Ellipsoid_Code);
-  return;
-} /* Get_OSSIM_MGRS_Parameters */
-
-
-long Convert_Geodetic_To_OSSIM_MGRS (double Latitude,
-                               double Longitude,
-                               long Precision,
-                               char* OSSIM_MGRS)
-/*
- *    Latitude   : Latitude in radians              (input)
- *    Longitude  : Longitude in radians             (input)
- *    OSSIM_MGRS       : OSSIM_MGRS coordinate string           (output)
- *  
- */
-{ /* Convert_Geodetic_To_OSSIM_MGRS */
-  long error_code = OSSIM_MGRS_NO_ERROR;
-  long zone;
-  char hemisphere;
-  double easting;
-  double northing;
-  if ((Latitude < -PI_OVER_2) || (Latitude > PI_OVER_2))
-  { /* Latitude out of range */
-    error_code |= OSSIM_MGRS_LAT_ERROR;
-  }
-  if ((Longitude < -PI) || (Longitude > (2*PI)))
-  { /* Longitude out of range */
-    error_code |= OSSIM_MGRS_LON_ERROR;
-  }
-  if ((Precision < 0) || (Precision > MAX_PRECISION))
-    error_code |= OSSIM_MGRS_PRECISION_ERROR;
-  if (!error_code)
-  {
-    if ((Latitude < MIN_UTM_LAT) || (Latitude > MAX_UTM_LAT))
-    {
-      Set_UPS_Parameters (OSSIM_MGRS_a, OSSIM_MGRS_f);
-      error_code |= Convert_Geodetic_To_UPS (Latitude, Longitude, &hemisphere, &easting, &northing);
-      error_code |= Convert_UPS_To_OSSIM_MGRS (hemisphere, easting, northing, Precision, OSSIM_MGRS);
-    }
-    else
-    {
-      Set_UTM_Parameters (OSSIM_MGRS_a, OSSIM_MGRS_f, 0);
-      error_code |= Convert_Geodetic_To_UTM (Latitude, Longitude, &zone, &hemisphere, &easting, &northing);
-      error_code |= Convert_UTM_To_OSSIM_MGRS (zone, hemisphere, easting, northing, Precision, OSSIM_MGRS);
-    }
-  }
-  return (error_code);
-} /* Convert_Geodetic_To_OSSIM_MGRS */
-
-
-long Convert_OSSIM_MGRS_To_Geodetic (const char* OSSIM_MGRS, 
-                               double *Latitude, 
-                               double *Longitude)
-/*
- *    OSSIM_MGRS       : OSSIM_MGRS coordinate string           (output)
- *    Latitude   : Latitude in radians              (input)
- *    Longitude  : Longitude in radians             (input)
- *  
- */
-{ /* Convert_OSSIM_MGRS_To_Geodetic */
-  long error_code = OSSIM_MGRS_NO_ERROR;
-  long Zone;
-  long Letters[OSSIM_MGRS_LETTERS];
-  char Hemisphere;
-  double Easting;
-  double Northing;
-  long In_Precision;
-  error_code = Break_OSSIM_MGRS_String (OSSIM_MGRS, &Zone, Letters, &Easting, &Northing, &In_Precision);
-  if (!error_code)
-  {
-     if (Zone)
-     {
-        error_code |= Convert_OSSIM_MGRS_To_UTM (OSSIM_MGRS, &Zone, &Hemisphere, &Easting, &Northing);
-        Set_UTM_Parameters (OSSIM_MGRS_a, OSSIM_MGRS_f, 0);
-        error_code |= Convert_UTM_To_Geodetic (Zone, Hemisphere, Easting, Northing, Latitude, Longitude);
-     }
-     else
-     {
-        error_code |= Convert_OSSIM_MGRS_To_UPS (OSSIM_MGRS, &Hemisphere, &Easting, &Northing);
-        Set_UPS_Parameters (OSSIM_MGRS_a, OSSIM_MGRS_f);
-        error_code |= Convert_UPS_To_Geodetic (Hemisphere, Easting, Northing, Latitude, Longitude);
-     }
-  }
-  return (error_code);
-} /* END OF Convert_OSSIM_MGRS_To_Geodetic */
-
-
-
-long Convert_UTM_To_OSSIM_MGRS (long Zone,
-                          char Hemisphere,
-                          double Easting,
-                          double Northing,
-                          long Precision,
-                          char* OSSIM_MGRS)
-/*
- * The function Convert_UTM_To_OSSIM_MGRS converts UTM (zone, easting, and
- * northing) coordinates to an OSSIM_MGRS coordinate string, according to the 
- * current ellipsoid parameters.  If any errors occur, the error code(s) 
- * are returned by the  function, otherwise OSSIM_MGRS_NO_ERROR is returned.
- *
- *    Zone       : UTM zone                         (input)
- *    Hemisphere : North or South hemisphere        (input)
- *    Easting    : Easting (X) in meters            (input)
- *    Northing   : Northing (Y) in meters           (input)
- *    Precision  : Precision level of OSSIM_MGRS string   (input)
- *    OSSIM_MGRS       : OSSIM_MGRS coordinate string           (output)
- */
-{ /* Convert_UTM_To_OSSIM_MGRS */
-  long error_code = OSSIM_MGRS_NO_ERROR;
-  long temp_error = OSSIM_MGRS_NO_ERROR;
-  long Letters[OSSIM_MGRS_LETTERS]; /* Number location of 3 letters in alphabet   */
-  double Latitude;           /* Latitude of UTM point */
-  double Longitude;          /* Longitude of UTM point */
-  double divisor;
-  if ((Zone < 1) || (Zone > 60))
-    error_code |= OSSIM_MGRS_ZONE_ERROR;
-  if ((Hemisphere != 'S') && (Hemisphere != 'N'))
-    error_code |= OSSIM_MGRS_HEMISPHERE_ERROR;
-  if ((Easting < MIN_EASTING) || (Easting > MAX_EASTING))
-    error_code |= OSSIM_MGRS_EASTING_ERROR;
-  if ((Northing < MIN_NORTHING) || (Northing > MAX_NORTHING))
-    error_code |= OSSIM_MGRS_NORTHING_ERROR;
-  if ((Precision < 0) || (Precision > MAX_PRECISION))
-    error_code |= OSSIM_MGRS_PRECISION_ERROR;
-  if (!error_code)
-  {
-    Set_UTM_Parameters (OSSIM_MGRS_a, OSSIM_MGRS_f,0);
-    temp_error = Convert_UTM_To_Geodetic (Zone, Hemisphere, Easting, Northing, &Latitude, &Longitude);
-	if (temp_error & UTM_NORTHING_ERROR)
-		error_code |= OSSIM_MGRS_NORTHING_ERROR;
-	else
-	{
-	  /* Round easting and northing values */
-	  divisor = pow (10.0, (5 - Precision));
-	  Easting = Round_OSSIM_MGRS (Easting/divisor) * divisor;
-	  Northing = Round_OSSIM_MGRS (Northing/divisor) * divisor;
-	  UTMOSSIM_MGRS (Zone, Letters, Latitude, Easting, Northing);
-	  /* UTM checks - these should be done in UTMOSSIM_MGRS */
-	  if ((Zone == 31) && (Letters[0] == LETTER_V))
-	    if (Easting > 500000)
-		  Easting = 500000;
-	  if (Northing > 10000000)
-	    Northing = 10000000;
-	  Make_OSSIM_MGRS_String (OSSIM_MGRS, Zone, Letters, Easting, Northing, Precision);
-	}
-  }
-  return (error_code);
-} /* Convert_UTM_To_OSSIM_MGRS */
-
-
-long Convert_OSSIM_MGRS_To_UTM (const char   *OSSIM_MGRS,
-                          long   *Zone,
-                          char   *Hemisphere,
-                          double *Easting,
-                          double *Northing)
-/*
- * The function Convert_OSSIM_MGRS_To_UTM converts an OSSIM_MGRS coordinate string
- * to UTM projection (zone, hemisphere, easting and northing) coordinates 
- * according to the current ellipsoid parameters.  If any errors occur, 
- * the error code(s) are returned by the function, otherwise UTM_NO_ERROR 
- * is returned.
- *
- *    OSSIM_MGRS       : OSSIM_MGRS coordinate string           (input)
- *    Zone       : UTM zone                         (output)
- *    Hemisphere : North or South hemisphere        (output)
- *    Easting    : Easting (X) in meters            (output)
- *    Northing   : Northing (Y) in meters           (output)
- */
-{ /* Convert_OSSIM_MGRS_To_UTM */
-  long error_code = OSSIM_MGRS_NO_ERROR;
-  long Letters[OSSIM_MGRS_LETTERS];
-  long In_Precision;
-  long Error = 0;
-  error_code = Break_OSSIM_MGRS_String (OSSIM_MGRS, Zone, Letters, Easting, Northing, &In_Precision);
-  if (!*Zone)
-    error_code |= OSSIM_MGRS_STRING_ERROR;
-  if (!error_code)
-  {
-    GRID_UTM (Zone, Letters, Hemisphere, Easting, Northing, In_Precision, &Error);
-    if (Error)
-      error_code = OSSIM_MGRS_STRING_ERROR;
-  }
-  return (error_code);
-} /* Convert_OSSIM_MGRS_To_UTM */
-
-
-long Convert_UPS_To_OSSIM_MGRS (char   Hemisphere,
-                          double Easting,
-                          double Northing,
-                          long   Precision,
-                          char*  OSSIM_MGRS)
-/*
- *  The function Convert_UPS_To_OSSIM_MGRS converts UPS (hemisphere, easting, 
- *  and northing) coordinates to an OSSIM_MGRS coordinate string according to 
- *  the current ellipsoid parameters.  If any errors occur, the error
- *  code(s) are returned by the function, otherwise UPS_NO_ERROR is 
- *  returned.
- *
- *    Hemisphere    : Hemisphere either 'N' or 'S'     (input)
- *    Easting       : Easting/X in meters              (input)
- *    Northing      : Northing/Y in meters             (input)
- *    Precision     : Precision level of OSSIM_MGRS string   (input)
- *    OSSIM_MGRS          : OSSIM_MGRS coordinate string           (output)
- */
-{ /* Convert_UPS_To_OSSIM_MGRS */
-  double divisor;
-  long error_code = OSSIM_MGRS_NO_ERROR;
-  long ltrnum[OSSIM_MGRS_LETTERS]; /* Number location of 3 letters in alphabet   */
-  if ((Hemisphere != 'N') && (Hemisphere != 'S'))
-    error_code |= OSSIM_MGRS_HEMISPHERE_ERROR;
-  if ((Easting < MIN_EAST_NORTH) || (Easting > MAX_EAST_NORTH))
-    error_code |= OSSIM_MGRS_EASTING_ERROR;
-  if ((Northing < MIN_EAST_NORTH) || (Northing > MAX_EAST_NORTH))
-    error_code |= OSSIM_MGRS_NORTHING_ERROR;
-  if ((Precision < 0) || (Precision > MAX_PRECISION))
-    error_code |= OSSIM_MGRS_PRECISION_ERROR;
-  if (!error_code)
-  {
-    divisor = pow (10.0, (5 - Precision));
-    Easting = Round_OSSIM_MGRS (Easting/divisor) * divisor;
-    Northing = Round_OSSIM_MGRS (Northing/divisor) * divisor;
-    if (Hemisphere == 'S')
-      UPS (OSSIM_MGRS, ltrnum, Easting, Northing, UPS_SOUTH);
-    else
-      UPS (OSSIM_MGRS, ltrnum, Easting, Northing, UPS_NORTH);
-    Make_OSSIM_MGRS_String (OSSIM_MGRS, 0, ltrnum, Easting, Northing, Precision);
-  }
-  return (error_code);
-} /* Convert_UPS_To_OSSIM_MGRS */
-
-
-long Convert_OSSIM_MGRS_To_UPS ( const char   *OSSIM_MGRS,
-                           char   *Hemisphere,
-                           double *Easting,
-                           double *Northing)
-/*
- *  The function Convert_OSSIM_MGRS_To_UPS converts an OSSIM_MGRS coordinate string
- *  to UPS (hemisphere, easting, and northing) coordinates, according 
- *  to the current ellipsoid parameters. If any errors occur, the error 
- *  code(s) are returned by the function, otherwide UPS_NO_ERROR is returned.
- *
- *    OSSIM_MGRS          : OSSIM_MGRS coordinate string           (input)
- *    Hemisphere    : Hemisphere either 'N' or 'S'     (output)
- *    Easting       : Easting/X in meters              (output)
- *    Northing      : Northing/Y in meters             (output)
- */
-{ /* Convert_OSSIM_MGRS_To_UPS */
-  long error_code = OSSIM_MGRS_NO_ERROR;
-  long Error = 0;
-  long Zone;
-  long Letters[OSSIM_MGRS_LETTERS];
-  long In_Precision;
-  error_code = Break_OSSIM_MGRS_String (OSSIM_MGRS, &Zone, Letters, Easting, Northing, &In_Precision);
-  if (Zone)
-    error_code |= OSSIM_MGRS_STRING_ERROR;
-  if (!error_code)
-  {
-    GRID_UPS (Letters, Hemisphere, Easting, Northing, &Error);
-    if (Error)
-      error_code = OSSIM_MGRS_STRING_ERROR;
-  }
-  return (error_code);
-} /* Convert_OSSIM_MGRS_To_UPS */
-
-
diff --git a/src/ossim/projection/ossimNitfProjectionFactory.cpp b/src/ossim/projection/ossimNitfProjectionFactory.cpp
deleted file mode 100644
index 834d41d..0000000
--- a/src/ossim/projection/ossimNitfProjectionFactory.cpp
+++ /dev/null
@@ -1,986 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Matt Revelle
-//          David Burken
-//
-// Description:
-//
-// Contains class definition for ossimNitfProjectionFactory.
-//
-// $Id: ossimNitfProjectionFactory.cpp 20457 2012-01-13 20:08:49Z dburken $
-//----------------------------------------------------------------------------
-
-#include <ossim/projection/ossimNitfProjectionFactory.h>
-#include <ossim/base/ossimDms.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/imaging/ossimNitfTileSource.h>
-#include <ossim/projection/ossimBilinearProjection.h>
-#include <ossim/projection/ossimEquDistCylProjection.h>
-#include <ossim/projection/ossimMgrs.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/projection/ossimUtmProjection.h>
-#include <ossim/support_data/ossimNitfBlockaTag.h>
-#include <ossim/support_data/ossimNitfFile.h>
-#include <ossim/support_data/ossimNitfFileHeader.h>
-#include <ossim/support_data/ossimNitfImageHeader.h>
-#include <fstream>
-#include <cmath>
-
-// Define Trace flags for use within this file:
-static ossimTrace traceDebug(ossimString("ossimNitfProjectionFactory:debug"));
-
-ossimNitfProjectionFactory* ossimNitfProjectionFactory::theInstance = 0;
-
-ossimNitfProjectionFactory::ossimNitfProjectionFactory()
-{
-}
-
-ossimNitfProjectionFactory::~ossimNitfProjectionFactory()
-{
-}
-
-ossimNitfProjectionFactory* ossimNitfProjectionFactory::instance()
-{
-   if(!theInstance)
-   {
-      theInstance = new ossimNitfProjectionFactory();
-   }
-
-   return theInstance;
-}
-
-ossimProjection*
-ossimNitfProjectionFactory::createProjection(const ossimFilename& filename,
-                                             ossim_uint32 entryIdx)const
-{
-   static const char MODULE[]="ossimNitfProjectionFactory::createProjection";
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " DEBUG:"
-         << "\nfilename:  " << filename
-         << "\nentryIdx:  " << entryIdx
-         << std::endl;
-   }
-
-   // See if there is an external geomtry.
-   ossimProjection* result = createProjectionFromGeometryFile(filename, entryIdx);
-   if (result)
-   {
-      return result;
-   }
-
-   if(!isNitf(filename))
-   {
-      return result; // result is NULL
-   }
-
-   ossimRefPtr<ossimNitfFile> nitf = new ossimNitfFile();
-   if (!nitf->parseFile(filename))
-   {
-      return result; // result is NULL
-   }
-
-   long imageIndex = static_cast<long>(entryIdx);
-   if ( imageIndex > (nitf->getHeader()->getNumberOfImages()-1) )
-   {
-      return result;
-   }
-
-   ossimRefPtr<ossimNitfImageHeader> imageHeader = nitf->getNewImageHeader(imageIndex);
-   {
-      if (!imageHeader)
-      {
-         return result;
-      }
-   }
-
-   result = createProjectionFromHeaders(nitf->getHeader(),
-                                        imageHeader.get());
-   if (traceDebug())
-   {
-      ossimString coordinateSystem   = imageHeader->getCoordinateSystem();
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " DEBUG:"
-         << "\ncoordinateSysetm:       " << coordinateSystem
-         << std::endl;
-   }
-
-   return result;
-}
-
-
-ossimProjection*
-ossimNitfProjectionFactory::createProjection(const ossimKeywordlist& /* kwl */,
-                                             const char* /* prefix */) const
-{
-   return 0;
-}
-
-ossimProjection*
-ossimNitfProjectionFactory::createProjection(const ossimString& /* name */) const
-{
-   return 0;
-}
-
-ossimObject*
-ossimNitfProjectionFactory::createObject(const ossimString& typeName)const
-{
-   return (ossimObject*)createProjection(typeName);
-}
-
-ossimObject*
-ossimNitfProjectionFactory::createObject(const ossimKeywordlist& kwl,
-                                         const char* prefix)const
-{
-   return createProjection(kwl, prefix);
-}
-
-void ossimNitfProjectionFactory::getTypeNameList(std::vector<ossimString>& /* typeList */)const
-{
-   
-}
-
-ossimProjection* ossimNitfProjectionFactory::createProjection(ossimImageHandler* handler)const
-{
-   ossimNitfTileSource* nitfTileSource = dynamic_cast<ossimNitfTileSource*> (handler);
-   ossimProjection* result = 0;
-   if(nitfTileSource)
-   {
-      if(!result)
-      {
-         ossimNitfImageHeader* imageHeader = nitfTileSource->getCurrentImageHeader();
-         if(imageHeader)
-         {
-            result = createProjectionFromHeaders(nitfTileSource->getFileHeader(),imageHeader);
-         }
-      }
-   }
-   else if(isNitf(handler->getFilename()))
-   {
-      result =  createProjection(handler->getFilename(), handler->getCurrentEntry());
-   }
-   return result;
-}
-
-bool ossimNitfProjectionFactory::isNitf(const ossimFilename& filename)const
-{
-   std::ifstream in(filename.c_str(), ios::in|ios::binary);
-   
-   if(in)
-   {
-      char nitfFile[4];
-      in.read((char*)nitfFile, 4);
-      ossimString s(nitfFile, nitfFile+4);
-      if ( (s == "NITF") || (s == "NSIF") )
-      {
-         return true;
-      }
-   }
-
-   return false;
-}
-
-ossimProjection* ossimNitfProjectionFactory::createProjectionFromHeaders(
-   ossimNitfFileHeader* fileHeader, ossimNitfImageHeader* imageHeader)const
-{
-   ossimProjection* result = 0;
-   ossimString version = fileHeader->getVersion();
-   ossimString coordinateSystem = imageHeader->getCoordinateSystem();
-
-   // Note in version 2.0 ICORDS with 'N' == NONE.  In 2.1 it is UTM North:
-   if (coordinateSystem == "G" || coordinateSystem == "D")
-   {
-      result = makeGeographic(imageHeader, coordinateSystem);
-   }
-   else if( (coordinateSystem == "S") || (coordinateSystem == "U") || 
-            ( version != "02.00" && (coordinateSystem == "N") ) )
-   {
-      result = makeUtm(imageHeader, coordinateSystem);
-   }
-   return result;
-}
-
-ossimProjection* ossimNitfProjectionFactory::makeGeographic(
-   const ossimNitfImageHeader* hdr,
-   const ossimString& coordinateSysetm) const
-{
-   ossimProjection* proj = 0;
-
-   if (hdr)
-   {
-      // To hold corner points.
-      std::vector<ossimGpt> gpts;
-      
-      //---
-      // Get the corner points.
-      // 
-      // Look for points from the BLOCKA tag.  This may or may not be present.
-      // If present since it has six digit precision use it for the points.
-      //---
-      if ( getBlockaPoints(hdr, gpts) == false )
-      {
-         ossimString geographicLocation = hdr->getGeographicLocation();
-
-         if ( geographicLocation.size() )
-         {
-            if (traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG)
-                  << "ossimNitfProjectionFactory::makeGeographic DEBUG:"
-                  << "\ngeographicLocation: " << geographicLocation
-                  << std::endl;
-            }
-            
-            if (coordinateSysetm == "G")
-            {
-               //---
-               // If coord system is G then format is:
-               // Lat = ddmmssX
-               //       where d is degrees and m is minutes
-               //       and s is seconds and X is either N (North) or S (South).
-               // Lon = dddmmssX
-               //       where d is degrees and m is minutes
-               //       and s is seconds and X is either N (North) or S (South).
-               //---
-               parseGeographicString(geographicLocation, gpts);
-            }
-            else if (coordinateSysetm == "D")
-            {
-               //---
-               // If coor system is D then format is:
-               // +-dd.ddd +-dd.ddd four times where + is northern hemispher and
-               // - is souther hemisphere for lat and longitude
-               // + is easting and - is westing.
-               //---
-               parseDecimalDegreesString(geographicLocation, gpts);
-            }
-            
-         } // matches: if ( geographicLocation.size() )
-         
-      } // matches: if ( getBlockaPoints(hdr, gpts) == false )
-         
-      if (gpts.size() == 4)
-      {
-         if (!isSkewed(gpts))
-         {
-            proj = makeEuiDistant(hdr, gpts);
-         }
-         else
-         {
-            // Image is rotated.  Make a Bilinear.
-            proj = makeBilinear(hdr, gpts);
-         }
-      }
-
-      if (traceDebug() && proj)
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfProjectionFactory::makeGeographic DEBUG:"
-            << "\nUpper left corner:   " << gpts[0]
-            << "\nUpper right corner:  " << gpts[1]
-            << "\nLower right corner:  " << gpts[2]
-            << "\nLower left corner:   " << gpts[3] << endl
-            << proj->print(ossimNotify(ossimNotifyLevel_DEBUG))
-            << std::endl;
-      }
-      
-   } // matches: if (hdr)
-
-   return proj;
-}
-
-ossimProjection* ossimNitfProjectionFactory::makeUtm(
-   const ossimNitfImageHeader* hdr,
-   const ossimString& coordinateSystem) const
-{
-   ossimProjection* proj = 0;
-   if (hdr)
-   {
-      ossimString geographicLocation = hdr->getGeographicLocation();
-
-      if ( geographicLocation.size() )
-      {
-         std::vector<ossimDpt> utmPoints;
-         ossim_uint32 zone;
-         ossimDpt scale;
-         char hemisphere = 'N';
-         
-         bool status = true;
-         if ( coordinateSystem == "U")
-         {
-            // Sets zone, hemisphere and utmPoints. Returns true on success.
-            status = parseMgrsString(geographicLocation, zone, hemisphere, utmPoints);
-         }
-         else
-         {
-            // Sets zone and utmPoints.  Void return...
-            parseUtmString(geographicLocation, zone, utmPoints);
-            if(coordinateSystem == "S")
-            {
-               hemisphere = 'S';
-            }
-         }
-         
-         if ( status )
-         {
-            if ( traceDebug() )
-            {
-               std::string s;
-               s.push_back(hemisphere);
-               ossimNotify(ossimNotifyLevel_DEBUG)
-                  << "ossimNitfProjectionFactory::makeUtm DEBUG"
-                  << "\ngeo string: " << geographicLocation
-                  << "\nutm zone:   " << zone
-                  << "\nhemisphere: " << hemisphere
-                  << std::endl;
-               for (ossim_uint32 i=0; i<utmPoints.size(); ++i)
-               {
-                  ossimNotify(ossimNotifyLevel_DEBUG)
-                     << "utmPoints[" << utmPoints[i] << std::endl;
-               }
-            }
-            
-            ossimRefPtr<ossimUtmProjection> uproj = new ossimUtmProjection;
-            uproj->setHemisphere(hemisphere);
-            uproj->setZone(zone);
-            
-            if(isSkewed(utmPoints))
-            {
-               std::vector<ossimGpt> gpts;
-               
-               // Try blocka points first as they are more accurate.
-               if ( getBlockaPoints(hdr, gpts) == false )
-               {
-                  ossimGpt ul = uproj->inverse(utmPoints[0]);
-                  ossimGpt ur = uproj->inverse(utmPoints[1]);
-                  ossimGpt lr = uproj->inverse(utmPoints[2]);
-                  ossimGpt ll = uproj->inverse(utmPoints[3]);
-                  gpts.push_back(ul);
-                  gpts.push_back(ur);
-                  gpts.push_back(lr);
-                  gpts.push_back(ll);
-               }
-
-               //---
-               // Make a bilinear either from our skewed utm points or the points from the blocka
-               // tag.
-               //---
-               proj = makeBilinear(hdr, gpts);
-               
-               uproj = 0; // Done with utm projeciton
-               
-            }
-            else
-            {
-               computeScaleInMeters(hdr, utmPoints, scale);
-               
-               //---
-               // Assign our projection to the return "proj".
-               // Use ossimRefPtr::release the so we don't delete proj when uproj
-               // goes out of scope.
-               //---
-               proj = uproj.release(); 
-            }
-            
-            if( scale.hasNans() == false )
-            {
-               //---
-               // Get the tie point.
-               // 
-               // Look for the the BLOCKA tag which may or may not be present.
-               // This has six digit precision in decimal degrees which equates to
-               // about 0.11 meters (at equator) as compared to 1.0 accuaracy of the
-               // IGEOLO field.
-               //---
-               ossimDpt tie;
-               std::vector<ossimGpt> gpts;
-               if ( getBlockaPoints(hdr, gpts) )
-               {
-                  if (traceDebug())
-                  {
-                     ossimNotify(ossimNotifyLevel_DEBUG)
-                        << "ossimNitfProjectionFactory::makeUtm DEBUG:"
-                        << "\nTie point from blocka: " << gpts[0]
-                        << endl;
-                  }
-                  
-                  tie = proj->forward(gpts[0]);
-                  tie.x += scale.x/2.0;
-                  tie.y -= scale.y/2.0;
-               }
-               else
-               {
-                  tie.x = utmPoints[0].x + scale.x/2.0;
-                  tie.y = utmPoints[0].y - scale.y/2.0;
-               }
-               
-               if (traceDebug())
-               {
-                  ossimNotify(ossimNotifyLevel_DEBUG)
-                     << "ossimNitfProjectionFactory::makeUtm DEBUG:"
-                     << "\nTie point: " << tie
-                     << "\nScale:     " << scale
-                     << endl;
-               }
-               
-               // Set the tie and scale.
-               ossimMapProjection* mproj = dynamic_cast<ossimMapProjection*>(proj);
-               if ( mproj )
-               {
-                  mproj->setUlEastingNorthing(tie);
-                  mproj->setMetersPerPixel(scale);
-               }
-               else // cannot cast
-               {
-                  if ( proj )
-                  {
-                     delete proj;
-                     proj = 0;
-                  }
-               }
-            }
-            else // Scale has nans
-            {
-               if ( proj )
-               {
-                  delete proj;
-                  proj = 0;
-               }
-            }
-            
-         } // matches: if (status)
-
-      } // matches:  if ( geographicLocation.size() )
-         
-   } // matches: if (hdr)
-   
-   return proj;
-}
-
-bool ossimNitfProjectionFactory::parseMgrsString(const ossimString& mgrsLocationString,
-                                                 ossim_uint32& zone,
-                                                 char& hemisphere,
-                                                 std::vector<ossimDpt>& utmPoints)const
-{
-   bool result = false; // Start false.
-   
-   //---
-   // From spec:
-   // UTM expressed in MGRS use the format zzBJKeeeeennnnn (15 characters).
-   // Assumption Zone and hemisphere same for all corners.
-   //---
-   if ( mgrsLocationString.size() >= 60 )
-   {
-      // Split the location string into four separate ones.
-      std::vector<std::string> mgrsStr(4); // Corner strings.
-      mgrsStr[0] = mgrsLocationString.substr(0, 15);
-      mgrsStr[1] = mgrsLocationString.substr(15, 15);
-      mgrsStr[2] = mgrsLocationString.substr(30, 15);
-      mgrsStr[3] = mgrsLocationString.substr(45, 15);
-      
-      utmPoints.resize(4);
-      long z = 0;
-      ossim_float64 e=0.0;
-      ossim_float64 n=0.0;
-      
-      result = true; // Set to true.
-
-      //---
-      // Convert each string to Easting Northing.  This also sets zone hemisphere.
-      // Method takes long for zone.
-      //---
-      for (ossim_uint32 i = 0; i < 4; ++i)
-      {
-         if ( Convert_OSSIM_MGRS_To_UTM(mgrsStr[i].c_str(), &z, &hemisphere, &e, &n) == 0 )
-         {
-            utmPoints[i].x = e;
-            utmPoints[i].y = n;
-         }
-         else
-         {
-            result = false; // Geotrans code errored on string.
-            break;
-         }
-      }
-      if (result) zone = static_cast<ossim_uint32>(z); // Set the zone.
-   }
-   return result;
-}
-
-ossimProjection* ossimNitfProjectionFactory::makeEuiDistant(
-   const ossimNitfImageHeader* hdr,
-   const std::vector<ossimGpt>& gpts) const
-{
-   ossimEquDistCylProjection* proj = 0;
-
-   // Get the scale.
-   ossimDpt scale;
-   computeScaleInDecimalDegrees(hdr, gpts, scale);
-
-   if (scale.hasNans())
-   {
-      return proj;
-   }
-   
-   // Make the projection.
-   proj = new ossimEquDistCylProjection();
-
-   if ( scale.x )
-   {
-      ossimGpt origin = proj->getOrigin();
-      
-      //---
-      // ossimEquDistCylProjection uses the origin_latitude for meters per pixel (gsd)
-      // computation.  So is not set in tiff tags, compute to achieve the proper
-      // horizontal scaling.
-      //---
-      origin.lat = ossim::acosd(scale.y/scale.x);
-
-      proj->setOrigin(origin);
-   }
-
-   // Shift the tie to the center of the pixel.
-   ossimGpt tiePoint;
-   tiePoint.latd(gpts[0].latd() - (scale.y/2.0));
-   tiePoint.lond(gpts[0].lond() + (scale.x/2.0));
-
-   // Set the tie points.
-   proj->setUlTiePoints(tiePoint);
-
-   // Set the scale.
-   proj->setDecimalDegreesPerPixel(scale);
-
-   return proj;
-}
-
-ossimProjection* ossimNitfProjectionFactory::makeBilinear(
-   const ossimNitfImageHeader* hdr,
-   const std::vector<ossimGpt>& gpts) const
-{
-   double rows = hdr->getNumberOfRows();
-   double cols = hdr->getNumberOfCols();
-   
-   ossimDpt ul(0.0, 0.0);
-   ossimDpt ur(cols-1.0, 0.0);   
-   ossimDpt lr(cols-1.0, rows-1.0);
-   ossimDpt ll(0.0, rows-1.0);
-
-   ossimRefPtr<ossimBilinearProjection> proj;
-   try
-   {
-     proj = new ossimBilinearProjection(ul,
-                                      ur,
-                                      lr,
-                                      ll,
-                                      gpts[0],
-                                      gpts[1],
-                                      gpts[2],
-                                      gpts[3]);
-   }
-   catch(...)
-   {
-      proj = 0;
-   }
-   
-   return proj.release();
-}
-
-bool ossimNitfProjectionFactory::isSkewed(
-   const std::vector<ossimGpt>& gpts) const
-{
-
-   return !( (gpts[0].latd() == gpts[1].latd()) &&
-             (gpts[2].latd() == gpts[3].latd()) &&
-             (gpts[0].lond() == gpts[3].lond()) &&
-             (gpts[1].lond() == gpts[2].lond()) );
-   
-}
-
-bool ossimNitfProjectionFactory::isSkewed(
-   const std::vector<ossimDpt>& dpts) const
-{
-   return !( (dpts[0].y == dpts[1].y) &&
-             (dpts[2].y == dpts[3].y) &&
-             (dpts[0].x == dpts[3].x) &&
-             (dpts[1].x == dpts[2].x) );
-   
-}
-
-bool ossimNitfProjectionFactory::getBlockaPoints(
-   const ossimNitfImageHeader* hdr,
-   std::vector<ossimGpt>& gpts) const
-{
-   if (!hdr)
-   {
-      return false;
-   }
-
-   ossimRefPtr<ossimNitfRegisteredTag> tag =
-      hdr->getTagData(ossimString("BLOCKA"));
-
-   if (!tag)
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfProjectionFactory::getBlockaPoints DEBUG:"
-            << "\nBLOCKA tag not found."
-            << std::endl;
-      }
-      return false;
-   }
-
-   if (gpts.size())
-   {
-      gpts.clear();
-   }
-
-   ossimNitfBlockaTag* blockaTag = PTR_CAST(ossimNitfBlockaTag, tag.get());
-   if (!blockaTag)
-   {
-      return false;
-   }
-
-   ossimDpt dpt;
-   ossimGpt gpt;
-
-   // Get the upper left or first row first column.
-   blockaTag->getFrfcLoc(dpt);
-   gpt.latd(dpt.y);
-   gpt.lond(dpt.x);
-   gpts.push_back(gpt);
-
-   // Get the upper right or first row last column.
-   blockaTag->getFrlcLoc(dpt);
-   gpt.latd(dpt.y);
-   gpt.lond(dpt.x);
-   gpts.push_back(gpt);
-
-   // Get the lower right or last row last column.
-   blockaTag->getLrlcLoc(dpt);
-   gpt.latd(dpt.y);
-   gpt.lond(dpt.x);
-   gpts.push_back(gpt);
-
-   // Get the lower left or last row first column.
-   blockaTag->getLrfcLoc(dpt);
-   gpt.latd(dpt.y);
-   gpt.lond(dpt.x);
-   gpts.push_back(gpt);
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfProjectionFactory::getBlockaPoints DEBUG:"
-         << std::endl;
-      for (int i=0; i<4; ++i)
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "gpt[" << i << "] " << gpts[i] << std::endl;
-      }
-   }
-   
-   return true;
-}
-
-void ossimNitfProjectionFactory::computeScaleInDecimalDegrees(
-   const ossimNitfImageHeader* hdr,
-   const std::vector<ossimGpt>& gpts,
-   ossimDpt& scale) const
-{
-   if ( !hdr || isSkewed(gpts))
-   {
-      scale.makeNan();
-      return;
-   }
-   ossimIrect imageRect = hdr->getImageRect();
-
-   //---
-   // Calculate the scale.  This assumes that the corner points are for the
-   // edge of the corner pixels, not the center of the corner pixels.
-   //---
-   double longitudeSize  = 0.0;
-   double latitudeSize = 0.0;
-   if ( (gpts[1].lond() < 0.0) && (gpts[0].lond() >= 0) )
-   {
-      //---
-      // Upper right negative(Western), upper left positive (Eastern).
-      // Crossing date line maybe???
-      //---
-      longitudeSize = (gpts[1].lond() + 360.0) - gpts[0].lond();
-   }
-   else
-   {
-      longitudeSize = gpts[1].lond() - gpts[0].lond();
-   }
-
-   latitudeSize = gpts[0].latd() - gpts[2].latd();
-
-   double rows = imageRect.height();
-   double cols = imageRect.width();
-//   double rows = hdr->getNumberOfRows();
-//   double cols = hdr->getNumberOfCols();
-       
-   if (!rows || !cols)
-   {
-      scale.makeNan();
-      return;
-   }
-   scale.y = latitudeSize  / rows;
-   scale.x = longitudeSize / cols;
-}
-
-void ossimNitfProjectionFactory::computeScaleInMeters(
-   const ossimNitfImageHeader* hdr,
-   const std::vector<ossimDpt>& dpts,
-   ossimDpt& scale) const
-{
-   if ( !hdr || isSkewed(dpts))
-   {
-      scale.makeNan();
-      return;
-   }
-   ossimIrect imageRect = hdr->getImageRect();
-
-   //---
-   // Calculate the scale.  This assumes that the corner points are for the
-   // edge of the corner pixels, not the center of the corner pixels.
-   //---
-   double eastingSize  = 0.0;
-   double northingSize = 0.0;
-   
-   eastingSize  = fabs(dpts[1].x - dpts[0].x);
-   northingSize = fabs(dpts[0].y - dpts[3].y);
-
-   double rows = imageRect.height();//hdr->getNumberOfRows();
-   double cols = imageRect.width();//hdr->getNumberOfCols();
-
-   if (!rows || !cols)
-   {
-      scale.makeNan();
-      return;
-   }
-   scale.y = northingSize / rows;
-   scale.x = eastingSize  / cols;
-}
-
-void ossimNitfProjectionFactory::parseUtmString(const ossimString& utmLocation,
-                                                ossim_uint32& zone,
-                                                std::vector<ossimDpt>& utmPoints)const
-{
-   ossim_uint32 idx = 0;
-   ossimString z;
-   ossimString east;
-   ossimString north;
-
-   
-   z    = ossimString(utmLocation.begin() + idx,
-                   utmLocation.begin() + idx + 2);
-   idx += 2;
-   east = ossimString(utmLocation.begin() + idx,
-                      utmLocation.begin() + idx + 6);
-   idx += 6;
-   north = ossimString(utmLocation.begin() + idx,
-                       utmLocation.begin() + idx + 7);
-   idx += 7;
-
-   utmPoints.push_back(ossimDpt(east.toDouble(),
-                                north.toDouble()));
-   
-   z    = ossimString(utmLocation.begin() + idx,
-                   utmLocation.begin() + idx + 2);
-   idx += 2;
-   east = ossimString(utmLocation.begin() + idx,
-                      utmLocation.begin() + idx + 6);
-   idx += 6;
-   north = ossimString(utmLocation.begin() + idx,
-                       utmLocation.begin() + idx + 7);
-   idx += 7;
-   utmPoints.push_back(ossimDpt(east.toDouble(),
-                                north.toDouble()));
-
-   z    = ossimString(utmLocation.begin() + idx,
-                   utmLocation.begin() + idx + 2);
-   idx += 2;
-   east = ossimString(utmLocation.begin() + idx,
-                      utmLocation.begin() + idx + 6);
-   idx += 6;
-   north = ossimString(utmLocation.begin() + idx,
-                       utmLocation.begin() + idx + 7);
-   idx += 7;
-   utmPoints.push_back(ossimDpt(east.toDouble(),
-                                north.toDouble()));
-
-   z    = ossimString(utmLocation.begin() + idx,
-                   utmLocation.begin() + idx + 2);
-   idx += 2;
-   east = ossimString(utmLocation.begin() + idx,
-                      utmLocation.begin() + idx + 6);
-   idx += 6;
-   north = ossimString(utmLocation.begin() + idx,
-                       utmLocation.begin() + idx + 7);
-   idx += 7;
-   utmPoints.push_back(ossimDpt(east.toDouble(),
-                                north.toDouble()));
-
-   zone = z.toUInt32();
-}
-
-
-void ossimNitfProjectionFactory::parseGeographicString(
-   const ossimString& geographicLocation, std::vector<ossimGpt>& gpts) const
-{
-   gpts.clear();
-   
-   if (geographicLocation.size() != 60)
-   {
-      return;
-   }
-
-   std::string::size_type geo_index = 0;
-   for (int i=0; i<4; ++i)
-   {
-      //---
-      // We have to split up the geographicLocation string for the dms class.
-      // 
-      // geographicLocation = ddmmssXdddmmssX (four times).
-      // "dd mm ss X" has a string length of 10
-      // "ddd mm ss X" has a string length of 11
-      //---
-      std::string::size_type lat_index = 0;
-      std::string::size_type lon_index = 0;
-      const char SPACE = ' ';
-      ossimString latString(10, SPACE);
-      ossimString lonString(11, SPACE);
-
-      // degrees latitude
-      latString[lat_index++] = geographicLocation[geo_index++];
-      latString[lat_index++] = geographicLocation[geo_index++];
-      ++lat_index;
-
-      // minutes latitude
-      latString[lat_index++] = geographicLocation[geo_index++];
-      latString[lat_index++] = geographicLocation[geo_index++];
-      ++lat_index;
-      
-      // seconds latitude
-      latString[lat_index++] = geographicLocation[geo_index++];
-      latString[lat_index++] = geographicLocation[geo_index++];
-      ++lat_index;
-
-      // hemisphere
-      latString[lat_index++] = geographicLocation[geo_index++];
- 
-      // degrees longitude
-      lonString[lon_index++] = geographicLocation[geo_index++];
-      lonString[lon_index++] = geographicLocation[geo_index++];
-      lonString[lon_index++] = geographicLocation[geo_index++];
-      ++lon_index;
-
-      // minutes longitude
-      lonString[lon_index++] = geographicLocation[geo_index++];
-      lonString[lon_index++] = geographicLocation[geo_index++];
-      ++lon_index;
-
-      // seconds longitude
-      lonString[lon_index++] = geographicLocation[geo_index++];
-      lonString[lon_index++] = geographicLocation[geo_index++];
-      ++lon_index;
-
-      // hemisphere
-      lonString[lon_index++] = geographicLocation[geo_index++];
-
-      // Convert to decimal degrees using the dms class.
-      ossimGpt gpt;
-      ossimDms dms(0.0);
-      dms.setLatFlag(true);
-      if ( ! dms.setDegrees(latString.c_str()) )
-      {
-         gpts.clear();
-         return;
-      }
-      gpt.latd(dms.getDegrees());
-
-      dms.setLatFlag(false);
-      if ( ! dms.setDegrees(lonString.c_str()) )
-      {
-         gpts.clear();
-         return;
-      }
-      gpt.lond(dms.getDegrees());
-
-      gpts.push_back(gpt);
-
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfProjectionFactory::parseGeographicString DEBUG:"
-            << "\nground point[" << i << "]:  " << gpt
-            << std::endl;
-      }
-   }
-}
-
-void ossimNitfProjectionFactory::parseDecimalDegreesString(const ossimString& geographicLocation,
-                                                           std::vector<ossimGpt>& gpts) const
-{
-   const char* bufPtr = geographicLocation.c_str();
-
-   
-   ossimString ulLat(bufPtr,
-                     bufPtr + 7);
-   bufPtr+=7;
-   ossimString ulLon(bufPtr,
-                     bufPtr+8);
-   bufPtr+=8;
-   ossimString urLat(bufPtr,
-                     bufPtr + 7);
-   bufPtr+=7;
-   ossimString urLon(bufPtr,
-                     bufPtr+8);
-   bufPtr+=8;
-   ossimString lrLat(bufPtr,
-                     bufPtr + 7);
-   bufPtr+=7;
-   ossimString lrLon(bufPtr,
-                     bufPtr+8);
-   bufPtr+=8;
-   ossimString llLat(bufPtr,
-                     bufPtr + 7);
-   bufPtr+=7;
-   ossimString llLon(bufPtr,
-                     bufPtr+8);
-
-   gpts.push_back(ossimGpt(ulLat.toDouble(), ulLon.toDouble()));
-   gpts.push_back(ossimGpt(urLat.toDouble(), urLon.toDouble()));
-   gpts.push_back(ossimGpt(lrLat.toDouble(), lrLon.toDouble()));
-   gpts.push_back(ossimGpt(llLat.toDouble(), llLon.toDouble()));
-   
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfProjectionFactory::parseDecimalDegreesString DEBUG:"
-         << "\nground point[" << 0 << "]:  " << gpts[0]
-         << "\nground point[" << 1 << "]:  " << gpts[1]
-         << "\nground point[" << 2 << "]:  " << gpts[2]
-         << "\nground point[" << 3 << "]:  " << gpts[3]
-         << std::endl;
-   }
-}
-
-ossimNitfProjectionFactory::ossimNitfProjectionFactory(const ossimNitfProjectionFactory&)
-{
-}
-
-ossimNitfProjectionFactory& ossimNitfProjectionFactory::operator=(const ossimNitfProjectionFactory&)
-{
-   return *this;
-}
diff --git a/src/ossim/projection/ossimNitfRpcModel.cpp b/src/ossim/projection/ossimNitfRpcModel.cpp
deleted file mode 100644
index a32fbcc..0000000
--- a/src/ossim/projection/ossimNitfRpcModel.cpp
+++ /dev/null
@@ -1,474 +0,0 @@
-//*****************************************************************************
-// FILE: ossimNitfRpcModel.cc
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Contains implementation of class ossimNitfRpcModel. This 
-//    derived class implements the capability of reading Nitf RPC support
-//    data.
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimNitfRpcModel.cpp 16643 2010-02-22 21:32:43Z dburken $
-
-#include <ossim/projection/ossimNitfRpcModel.h>
-
-RTTI_DEF1(ossimNitfRpcModel, "ossimNitfRpcModel", ossimRpcModel);
-
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/support_data/ossimNitfFile.h>
-#include <ossim/support_data/ossimNitfFileHeader.h>
-#include <ossim/support_data/ossimNitfImageHeader.h>
-#include <ossim/support_data/ossimNitfUse00aTag.h>
-#include <ossim/support_data/ossimNitfPiaimcTag.h>
-#include <ossim/support_data/ossimNitfStdidcTag.h>
-#include <ossim/support_data/ossimNitfRpcBase.h>
-
-//***
-// Define Trace flags for use within this file:
-//***
-#include <ossim/base/ossimTrace.h>
-static ossimTrace traceExec  ("ossimNitfRpcModel:exec");
-static ossimTrace traceDebug ("ossimNitfRpcModel:debug");
-
-static const char* RPC00A_TAG = "RPC00A";
-static const char* RPC00B_TAG = "RPC00B";
-static const char* PIAIMC_TAG = "PIAIMC";
-static const char* STDIDC_TAG = "STDIDC";
-static const char* USE00A_TAG = "USE00A";
-
-ossimNitfRpcModel::ossimNitfRpcModel()
-   :
-   ossimRpcModel(),
-   theDecimation(1.0)
-{
-}
-
-ossimNitfRpcModel::ossimNitfRpcModel(const ossimNitfRpcModel& rhs)
-  :
-   ossimRpcModel(rhs),
-   theDecimation(1.0)
-{
-}
-
-//*****************************************************************************
-//  CONSTRUCTOR: ossimNitfRpcModel
-//  
-//  Constructs given filename for NITF file
-//  
-//*****************************************************************************
-ossimNitfRpcModel::ossimNitfRpcModel(const ossimFilename& nitfFile)
-   :
-   ossimRpcModel(),
-   theDecimation(1.0)
-{
-   if (traceExec())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimNitfRpcModel::ossimNitfRpcModel(nitfFile): entering..."
-         << std::endl;
-   }
-   if(!parseFile(nitfFile))
-   {
-      if (traceExec())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG ossimNitfRpcModel::ossimNitfRpcModel(nitfFile): Unable to parse file " << nitfFile
-            << std::endl;
-      }
-      ++theErrorStatus;
-   }
-
-   if (traceExec())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimNitfRpcModel::ossimNitfRpcModel(nitfFile): returning..."
-         << std::endl;
-   }
-}
-
-ossimObject* ossimNitfRpcModel::dup() const
-{
-   return new ossimNitfRpcModel(*this);
-}
-
-bool ossimNitfRpcModel::parseFile(const ossimFilename& nitfFile,
-                                  ossim_uint32 entryIndex)
-{
-   ossimRefPtr<ossimNitfFile> file = new ossimNitfFile;
-
-   if(!file->parseFile(nitfFile))
-   {
-      setErrorStatus();
-      return false;
-   }
-   
-   ossimRefPtr<ossimNitfImageHeader> ih = file->getNewImageHeader(entryIndex);
-   if(!ih)
-   {
-      setErrorStatus();
-      return false;
-   }
-
-   return parseImageHeader(ih.get());
-   
-}
-
-bool ossimNitfRpcModel::parseImageHeader(const ossimNitfImageHeader* ih)
-{
-   // Do this first so we don't waste time if not rpc image.
-   if (getRpcData(ih) == false)
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfRpcModel::parseFile DEBUG:"
-         << "\nError parsing rpc tags.  Aborting with error."
-         << std::endl;
-      }
-      setErrorStatus();
-      return false;
-   }
-   
-   
-   //---
-   // Get the decimation if any from the header "IMAG" field.
-   // 
-   // Look for string like:
-   // "/2" = 1/2
-   // "/4  = 1/4
-   // ...
-   // "/16 = 1/16
-   // If it is full resolution it should be "1.0"
-   //---
-   ossimString os = ih->getImageMagnification();
-   if ( os.contains("/") )
-   {
-      os = os.after("/");
-      ossim_float64 d = os.toFloat64();
-      if (d)
-      {
-         theDecimation = 1.0 / d;
-      }
-   }
-   
-   //***
-   // Fetch Image ID:
-   //***
-   theImageID = ih->getImageId();
-   
-   ossimIrect imageRect = ih->getImageRect();
-   
-   //---
-   // Fetch Image Size:
-   //---
-   theImageSize.line =
-   static_cast<ossim_int32>(imageRect.height() / theDecimation);
-   theImageSize.samp =
-   static_cast<ossim_int32>(imageRect.width() / theDecimation);
-   
-   // Search for the STDID Tag to fetch mission (satellite) name:
-   getSensorID(ih);
-   
-   //***
-   // Assign other data members:
-   //***
-   theRefImgPt.line = theImageSize.line/2.0;
-   theRefImgPt.samp = theImageSize.samp/2.0;
-   theRefGndPt.lat  = theLatOffset;
-   theRefGndPt.lon  = theLonOffset;
-   theRefGndPt.hgt  = theHgtOffset;
-   
-   //***
-   // Assign the bounding image space rectangle:
-   //***
-   theImageClipRect = ossimDrect(0.0, 0.0,
-                                 theImageSize.samp-1, theImageSize.line-1);
-   
-   //---
-   // Assign the bounding ground polygon:
-   //
-   // NOTE:  We will use the base ossimRpcModel for transformation since all
-   // of our calls are in full image space (not decimated).
-   //---
-   ossimGpt v0, v1, v2, v3;
-   ossimDpt ip0 (0.0, 0.0);
-   ossimRpcModel::lineSampleHeightToWorld(ip0, theHgtOffset, v0);
-   ossimDpt ip1 (theImageSize.samp-1.0, 0.0);
-   ossimRpcModel::lineSampleHeightToWorld(ip1, theHgtOffset, v1);
-   ossimDpt ip2 (theImageSize.samp-1.0, theImageSize.line-1.0);
-   ossimRpcModel::lineSampleHeightToWorld(ip2, theHgtOffset, v2);
-   ossimDpt ip3 (0.0, theImageSize.line-1.0);
-   ossimRpcModel::lineSampleHeightToWorld(ip3, theHgtOffset, v3);
-   
-   theBoundGndPolygon
-   = ossimPolygon (ossimDpt(v0), ossimDpt(v1), ossimDpt(v2), ossimDpt(v3));
-   
-   updateModel();
-   
-   // Set the ground reference point.
-   ossimRpcModel::lineSampleHeightToWorld(theRefImgPt,
-                                          theHgtOffset,
-                                          theRefGndPt);
-   if ( theRefGndPt.isLatNan() || theRefGndPt.isLonNan() )
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfRpcModel::ossimNitfRpcModel DEBUG:"
-         << "\nGround Reference Point not valid." 
-         << " Aborting with error..."
-         << std::endl;
-      }
-      setErrorStatus();
-      return false;
-   }
-   
-   //---
-   // This will set theGSD and theMeanGSD.  This model doesn't need these but
-   // others do.
-   //---
-   try
-   {
-      computeGsd();
-   }
-   catch (const ossimException& e)
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfRpcModel::ossimNitfRpcModel DEBUG:\n"
-         << e.what() << std::endl;
-      }
-   }
-   
-   if (traceExec())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-      << "DEBUG ossimNitfRpcModel::parseFile: returning..."
-      << std::endl;
-   }
-   
-   return true;
-}
-
-void ossimNitfRpcModel::worldToLineSample(const ossimGpt& world_point,
-                                          ossimDpt&       image_point) const
-{
-   // Get the full res (not decimated) point.
-   ossimRpcModel::worldToLineSample(world_point, image_point);
-
-   // Apply decimation.
-   image_point.x = image_point.x * theDecimation;
-   image_point.y = image_point.y * theDecimation;
-}
-
-void ossimNitfRpcModel::lineSampleHeightToWorld(
-   const ossimDpt& image_point,
-   const double&   heightEllipsoid,
-   ossimGpt&       worldPoint) const
-{
-   // Convert image point to full res (not decimated) point.
-   ossimDpt pt;
-   pt.x = image_point.x / theDecimation;
-   pt.y = image_point.y / theDecimation;
-
-   // Call base...
-   ossimRpcModel::lineSampleHeightToWorld(pt, heightEllipsoid, worldPoint);
-}
-
-bool ossimNitfRpcModel::saveState(ossimKeywordlist& kwl,
-                                  const char* prefix) const
-{
-   // Save the decimation.
-   kwl.add(prefix, "decimation", theDecimation);
-
-   // Call base.
-   return ossimRpcModel::saveState(kwl, prefix);
-}
-
-bool ossimNitfRpcModel::loadState(const ossimKeywordlist& kwl,
-                                  const char* prefix)
-{
-   // Lookup decimation.
-   const char* value = kwl.find(prefix, "decimation");
-   if (value)
-   {
-      theDecimation = ossimString(value).toFloat64();
-      if (theDecimation <= 0.0)
-      {
-         // Do not allow negative or "0.0"(divide by zero).
-         theDecimation = 1.0;
-      }
-   }
-
-   // Call base.
-   return ossimRpcModel::loadState(kwl, prefix);
-}
-
-void ossimNitfRpcModel::getGsd(const ossimNitfImageHeader* ih)
-{
-   theGSD.line = ossim::nan();
-   theGSD.samp = ossim::nan();
-
-   if (!ih)
-   {
-      return;
-   }
-   
-   ossimRefPtr<ossimNitfRegisteredTag> tag;
-   tag = ih->getTagData(PIAIMC_TAG);
-   if (tag.valid())
-   {
-      ossimNitfPiaimcTag* p = PTR_CAST(ossimNitfPiaimcTag, tag.get());
-      if (p)
-      {
-         theGSD.line = p->getMeanGsdInMeters();
-         theGSD.samp = theGSD.line;
-         return;
-      }
-   }
-
-   tag = ih->getTagData(USE00A_TAG);
-   if (tag.valid())
-   {
-      ossimNitfUse00aTag* p = PTR_CAST(ossimNitfUse00aTag, tag.get());
-      if (p)
-      {
-         theGSD.line = p->getMeanGsdInMeters();
-         theGSD.samp = theGSD.line;
-      }
-   }
-}
-
-void ossimNitfRpcModel::getSensorID(const ossimNitfImageHeader* ih)
-{
-   theSensorID = "UNKNOWN";
-
-   if (!ih)
-   {
-      return;
-   }
-   
-   ossimRefPtr<ossimNitfRegisteredTag> tag;
-   tag = ih->getTagData(STDIDC_TAG);
-   if (tag.valid())
-   {
-      ossimNitfStdidcTag* p = PTR_CAST(ossimNitfStdidcTag, tag.get());
-      if (p)
-      {
-         theSensorID = p->getMission();
-         return;
-      }
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfRpcModel::getSensorID DEBUG:"
-            << "\ntheSensorID set to: " << theSensorID << endl;
-   }
-}
-
-bool ossimNitfRpcModel::getRpcData(const ossimNitfImageHeader* ih)
-{
-   if (!ih)
-   {
-      return false;
-   }
-
-   // Get the the RPC tag:
-   ossimNitfRpcBase* rpcTag = 0;
-
-   // Look for the RPC00B tag first.
-   ossimRefPtr<ossimNitfRegisteredTag> tag = ih->getTagData(RPC00B_TAG);
-   if (tag.valid())
-   {
-      rpcTag = PTR_CAST(ossimNitfRpcBase, tag.get());
-   }
-
-   if (!rpcTag)
-   {
-      // Look for RPC00A tag.
-      tag = ih->getTagData(RPC00A_TAG);
-      if (tag.valid())
-      {
-         rpcTag = PTR_CAST(ossimNitfRpcBase, tag.get());
-      }
-   }
-
-   if (!rpcTag)
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfRpcModel::getRpcData DEBUG:"
-            << "\nCould not find neither RPC tags <" << RPC00A_TAG
-            << "> nor <" << RPC00B_TAG
-            << "\nAborting with error..."
-            << std::endl;
-      }
-      return false;
-   }
-
-   if ( rpcTag->getSuccess() == false )
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfRpcModel::getRpcData DEBUG:"
-            << "\nSuccess flag set to false."
-            << "\nAborting with error..."
-            << std::endl;
-      }
-      return false;
-   }
-
-   // Set the polynomial type.
-   if (rpcTag->getRegisterTagName() == "RPC00B")
-   {
-      thePolyType = B;
-   }
-   else
-   {
-      thePolyType = A;
-   }
-   
-   // Now parse the tag block for pertinent data:
-   theBiasError  = rpcTag->getErrorBias().toFloat64();
-   theRandError  = rpcTag->getErrorRand().toFloat64();
-   theLineOffset = rpcTag->getLineOffset().toFloat64();
-   theSampOffset = rpcTag->getSampleOffset().toFloat64();
-   theLatOffset  = rpcTag->getGeodeticLatOffset().toFloat64();
-   theLonOffset  = rpcTag->getGeodeticLonOffset().toFloat64();
-   theHgtOffset  = rpcTag->getGeodeticHeightOffset().toFloat64();
-   theLineScale  = rpcTag->getLineScale().toFloat64();
-   theSampScale  = rpcTag->getSampleScale().toFloat64();
-   theLatScale   = rpcTag->getGeodeticLatScale().toFloat64();
-   theLonScale   = rpcTag->getGeodeticLonScale().toFloat64();
-   theHgtScale   = rpcTag->getGeodeticHeightScale().toFloat64();
-
-   // Parse coefficients:
-   ossim_uint32 i;
-   
-   for (i=0; i<20; ++i)
-   {
-      theLineNumCoef[i] = rpcTag->getLineNumeratorCoeff(i).toFloat64();
-      theLineDenCoef[i] = rpcTag->getLineDenominatorCoeff(i).toFloat64();
-      theSampNumCoef[i] = rpcTag->getSampleNumeratorCoeff(i).toFloat64();
-      theSampDenCoef[i] = rpcTag->getSampleDenominatorCoeff(i).toFloat64();
-   }
-   
-   // Assign other data members to default values:
-   theNominalPosError = sqrt(theBiasError*theBiasError +
-                             theRandError*theRandError); // meters
-
-   return true;
-}
diff --git a/src/ossim/projection/ossimProjectionFactoryBase.cpp b/src/ossim/projection/ossimProjectionFactoryBase.cpp
deleted file mode 100644
index c9324b4..0000000
--- a/src/ossim/projection/ossimProjectionFactoryBase.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//*******************************************************************
-//  $Id: ossimProjectionFactoryBase.cpp 15766 2009-10-20 12:37:09Z gpotts $
-
-#include <ossim/projection/ossimProjectionFactoryBase.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/imaging/ossimImageHandler.h>
-//---
-// Define Trace flags for use within this file:
-//---
-#include <ossim/base/ossimTrace.h>
-static ossimTrace traceDebug = ossimTrace("ossimProjectionFactoryBase:debug");
-
-RTTI_DEF1(ossimProjectionFactoryBase, "ossimProjectionFactoryBase", ossimObjectFactory);
-
-ossimProjection* ossimProjectionFactoryBase::createProjectionFromGeometryFile(const ossimFilename& imageFile, ossim_uint32 entryIdx)const
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimProjectionFactoryBase::createProjectionFromGeometryFile "
-         << "DEBUG:"
-         << "\nimageFile:  " << imageFile
-         << "\nentryIdx:   " << entryIdx
-         << std::endl;
-   }
-
-   // Try to find a geometry file for imageFile.
-   
-   ossimFilename geomFile = imageFile;
-   if (entryIdx == 0)
-   {
-      geomFile.setExtension("geom");
-      if(geomFile.exists())
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "Found geometry file:  " << geomFile
-               << std::endl;
-         }
-
-         ossimKeywordlist kwl;
-         if(kwl.addFile(geomFile))
-         {
-            return ossimProjectionFactoryRegistry::instance()->
-               createProjection(kwl);
-         }
-      }
-   }
-
-   // Look for an indexed geometry file.
-   geomFile = imageFile.fileNoExtension();
-   geomFile += "_e";
-   geomFile += ossimString::toString(entryIdx);
-   geomFile.setExtension("geom");
-   if(geomFile.exists())
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "Found geometry file:  " << geomFile
-            << std::endl;
-      }
-      
-      ossimKeywordlist kwl;
-      if(kwl.addFile(geomFile))
-      {
-         return ossimProjectionFactoryRegistry::instance()->
-            createProjection(kwl);
-      }
-   }   
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG:  No geometry file found.  Returning NULL..."
-         << std::endl;
-   }
-
-   return NULL;
-}
-
-ossimProjection* ossimProjectionFactoryBase::createProjection(ossimImageHandler* handler)const
-{
-   if(!handler) return 0;
-   return createProjection(handler->getFilename(), handler->getCurrentEntry());
-}
-
diff --git a/src/ossim/projection/ossimProjectionFactoryRegistry.cpp b/src/ossim/projection/ossimProjectionFactoryRegistry.cpp
deleted file mode 100644
index d8f5292..0000000
--- a/src/ossim/projection/ossimProjectionFactoryRegistry.cpp
+++ /dev/null
@@ -1,168 +0,0 @@
-//*******************************************************************
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimProjectionFactoryRegistry.cpp 20413 2012-01-03 19:03:59Z dburken $
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/projection/ossimProjectionFactoryBase.h>
-#include <ossim/projection/ossimEpsgProjectionFactory.h>
-#include <ossim/projection/ossimWktProjectionFactory.h>
-#include <ossim/projection/ossimMapProjectionFactory.h>
-#include <ossim/projection/ossimTiffProjectionFactory.h>
-#include <ossim/projection/ossimNitfProjectionFactory.h>
-#include <ossim/projection/ossimSensorModelFactory.h>
-#include <ossim/projection/ossimMiscProjectionFactory.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/base/ossimObjectFactoryRegistry.h>
-#include <algorithm>
-#include <vector>
-
-ossimProjectionFactoryRegistry* ossimProjectionFactoryRegistry::m_instance = 0;
-
-
-ossimProjectionFactoryRegistry::ossimProjectionFactoryRegistry()
-{
-   initializeDefaults();
-   ossimObjectFactoryRegistry::instance()->registerFactory(this);
-}
-
-ossimProjectionFactoryRegistry::ossimProjectionFactoryRegistry(const ossimProjectionFactoryRegistry& rhs)
-:
-ossimObjectFactory(rhs)
-{}
-
-void ossimProjectionFactoryRegistry::operator=(const ossimProjectionFactoryRegistry&)
-{}
-
-ossimProjectionFactoryRegistry::~ossimProjectionFactoryRegistry()
-{
-}
-
-ossimProjectionFactoryRegistry* ossimProjectionFactoryRegistry::instance()
-{
-   if(!m_instance)
-   {
-      m_instance = new ossimProjectionFactoryRegistry();
-   }
-   
-   return m_instance;
-}
-
-ossimProjection*
-ossimProjectionFactoryRegistry::createProjection(const ossimFilename& name,
-                                                 ossim_uint32 entryIdx)const
-{
-   ossimProjection* result = 0;
-   ossim_uint32 idx = 0;
-   for(idx = 0; ((idx < m_factoryList.size())&&(!result)); ++idx)
-   {
-      result = m_factoryList[idx]->createProjection(name, entryIdx);
-   }
-   
-   return result;
-}
-
-ossimProjection* ossimProjectionFactoryRegistry::createProjection(ossimImageHandler* handler)const
-{
-   ossimProjection* result = 0;
-   ossim_uint32 idx = 0;
-   for(idx = 0; ((idx < m_factoryList.size())&&(!result)); ++idx)
-   {
-      result = m_factoryList[idx]->createProjection(handler);
-   }
-   
-   return result;
-}
-
-ossimProjection* ossimProjectionFactoryRegistry::createProjection(
-   const ossimKeywordlist& kwl, const char* prefix)const
-{
-   ossimProjection* result = 0;//createNativeObjectFromRegistry(kwl, prefix); 
-   ossim_uint32 idx = 0; 
-   for(idx = 0; ((idx < m_factoryList.size())&&!result);++idx) 
-   { 
-      result = m_factoryList[idx]->createProjection(kwl, prefix); 
-   } 
-   
-   if ( (result == 0) && (prefix == 0) )
-   {
-      //---
-      // Check for an embedded prefix like "image0."
-      //
-      // This is a workaround for people who use the "image_info" application
-      // to create a geometry file.
-      //
-      // If the image has an external geometry file and it has a prefix like
-      // "image0." and someone does:
-      //
-      // theInputConnection->getImageGeometry(kwl);
-      // ossimRefPtr<ossimProjection> proj =
-      // ossimProjectionFactoryRegistry::instance()->createProjection(kwl);
-      //
-      // It will fail because the factory doesn't know it has a prefix.
-      //
-      // ESH 01/2009: I've changed the following so that not just the first
-      // line is checked for "image" and ".".  If the image_info .geom file
-      // was created with the -m (metadata) option, the first lines of the
-      // file will not have the expected structure.
-      //---
-      bool bFoundImageLine = false;
-      ossimKeywordlist::KeywordMap::const_iterator i = kwl.getMap().begin();
-      while ( (i != kwl.getMap().end()) && (bFoundImageLine == false) )
-      {
-         ossimString s1 = (*i).first;
-         if ( s1.size() )
-         {
-            std::vector<ossimString> v;
-            s1.split(v, ossimString("."));
-            if ( v.size() )
-            {
-               if ( v[0].contains("image") )
-               {
-                  bFoundImageLine = true;
-                  ossimString s2 = v[0];
-                  s2 += ".";
-                  idx = 0;
-                  for(;((idx < m_factoryList.size())&&!result); ++idx)
-                  {
-                     result =  m_factoryList[idx]->createProjection(kwl, s2.c_str());
-                  }
-               }
-            }
-         }
-
-         // Go to the next line of the .geom file
-         ++i;
-      }
-   }
-
-   return result;
-}
-
-void ossimProjectionFactoryRegistry::initializeDefaults()
-{
-   registerFactory(ossimSensorModelFactory::instance());
-   registerFactory(ossimNitfProjectionFactory::instance());
-   registerFactory(ossimTiffProjectionFactory::instance());
-   registerFactory(ossimWktProjectionFactory::instance());
-   registerFactory(ossimMapProjectionFactory::instance());
-   registerFactory(ossimMiscProjectionFactory::instance());
-
-   // KEEP THIS LAST PLEASE!
-   // This factory constructs map projections from EPSG codes. An infinite loop will occur if this
-   // is placed before the explicit (non-coded) factories, since this factory will invoke the above
-   // factories via this registry after populating a KWL which includes a PCS code. If this factory
-   // sees that request before the others, it will be caught in a loop.
-   registerFactory(ossimEpsgProjectionFactory::instance()); 
-}
-
-extern "C"
-{
-  void* ossimProjectionFactoryRegistryGetInstance()
-  {
-    return ossimProjectionFactoryRegistry::instance();
-  }
-
-}
diff --git a/src/ossim/projection/ossimQuickbirdRpcModel.cpp b/src/ossim/projection/ossimQuickbirdRpcModel.cpp
deleted file mode 100644
index b75dfc0..0000000
--- a/src/ossim/projection/ossimQuickbirdRpcModel.cpp
+++ /dev/null
@@ -1,490 +0,0 @@
-//*****************************************************************************
-// FILE: ossimQuickbirdRpcModel.cpp
-//
-// License:  See top level LICENSE.txt file.
-//
-// DESCRIPTION: Contains declaration of class ossimQuickbirdRpcModel. This 
-//    derived class implements the capability of reading Quickbird RPC support
-//    data.
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimQuickbirdRpcModel.cpp 20606 2012-02-24 12:29:52Z gpotts $
-
-#include <ossim/projection/ossimQuickbirdRpcModel.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/support_data/ossimQuickbirdRpcHeader.h>
-#include <ossim/support_data/ossimQuickbirdTile.h>
-#include <ossim/support_data/ossimNitfFile.h>
-#include <ossim/support_data/ossimNitfFileHeader.h>
-#include <ossim/support_data/ossimNitfImageHeader.h>
-#include <ossim/support_data/ossimNitfRpcBase.h>
-#include <ossim/support_data/ossimNitfUse00aTag.h>
-#include <ossim/support_data/ossimNitfPiaimcTag.h>
-#include <ossim/imaging/ossimTiffTileSource.h>
-#include <ossim/imaging/ossimQbTileFilesHandler.h>
-
-static const char* RPC00A_TAG = "RPC00A";
-static const char* RPC00B_TAG = "RPC00B";
-static const char* PIAIMC_TAG = "PIAIMC";
-static const char* USE00A_TAG = "USE00A";
-
-RTTI_DEF1(ossimQuickbirdRpcModel, "ossimQuickbirdRpcModel", ossimRpcModel);
-
-
-//*************************************************************************************************
-// Constructor
-//*************************************************************************************************
-ossimQuickbirdRpcModel::ossimQuickbirdRpcModel()
-   :ossimRpcModel(),
-    theSupportData(new ossimQuickbirdMetaData())
-{
-}
-
-//*************************************************************************************************
-// Constructor
-//*************************************************************************************************
-ossimQuickbirdRpcModel::ossimQuickbirdRpcModel(const ossimQuickbirdRpcModel& rhs)
-   : ossimRpcModel(rhs),
-     theSupportData(new ossimQuickbirdMetaData())
-{
-}
-
-//*************************************************************************************************
-//! Constructor for multiple tile-files sharing common RPC model initializes given pointer
-//! to multi-tile-files handler.
-//*************************************************************************************************
-ossimQuickbirdRpcModel::ossimQuickbirdRpcModel(const ossimQbTileFilesHandler* handler)
-:  ossimRpcModel(),
-   theSupportData(new ossimQuickbirdMetaData())
-{
-   setErrorStatus();
-   if (!handler)
-      return;
-
-   // Make the gsd nan so it gets computed.
-   theGSD.makeNan();
-
-   theImageClipRect = handler->getImageRectangle();
-
-   ossimFilename imageFile = handler->getFilename();
-   if (!parseRpcData(imageFile))
-      return;
-
-   finishConstruction();
-   clearErrorStatus();
-   return;
-}
-
-//*************************************************************************************************
-// Destructor
-//*************************************************************************************************
-ossimQuickbirdRpcModel::~ossimQuickbirdRpcModel()
-{
-   theSupportData = 0;
-}
-
-//*************************************************************************************************
-// Infamous DUP 
-//*************************************************************************************************
-ossimObject* ossimQuickbirdRpcModel::dup() const
-{
-   return new ossimQuickbirdRpcModel(*this);
-}
-
-//*************************************************************************************************
-//! Public method for parsing generic image file.
-//*************************************************************************************************
-bool ossimQuickbirdRpcModel::parseFile(const ossimFilename& file)
-{
-   if (!parseNitfFile(file))
-   {
-      return parseTiffFile(file);
-   }
-   return true;
-}
-
-//*************************************************************************************************
-//! Parses a NITF image file for RPC info. Returns TRUE if successful.
-//*************************************************************************************************
-bool ossimQuickbirdRpcModel::parseNitfFile(const ossimFilename& file)
-{
-   setErrorStatus();
-   ossimFilename nitfFile = file;
-   
-   ossimRefPtr<ossimNitfFile> nitfFilePtr = new ossimNitfFile;
-   
-   if(!nitfFilePtr->parseFile(nitfFile))
-   {
-      nitfFile = nitfFile.setExtension("NTF");
-      if(!nitfFilePtr->parseFile(nitfFile))
-      {
-         nitfFile = nitfFile.setExtension("ntf");
-         if(!nitfFilePtr->parseFile(nitfFile))
-            return false;
-      }
-   }
-   
-   ossimRefPtr<ossimNitfImageHeader> ih = nitfFilePtr->getNewImageHeader(0);
-   if (!ih)
-      return false;
-
-   theImageClipRect = ih->getImageRect();
- 
-   // Give preference to external RPC data file:
-   bool useInternalRpcTags = false;
-   if(!parseRpcData(file))
-      useInternalRpcTags = true;
-   
-   if (!parseTileData(file))
-      return false;
-  
-   // Check for IMD (metadata) file:
-   parseMetaData(file);
-
-   // Get the gsd.
-   theGSD.line = ossim::nan();
-   theGSD.samp = ossim::nan();
-   
-   ossimRefPtr<ossimNitfRegisteredTag> tag;
-   tag = ih->getTagData(PIAIMC_TAG);
-   if (tag.valid())
-   {
-      ossimNitfPiaimcTag* p = PTR_CAST(ossimNitfPiaimcTag, tag.get());
-      if (p)
-      {
-         theGSD.line = p->getMeanGsdInMeters();
-         theGSD.samp = theGSD.line;
-      }
-   }
-   if (ossim::isnan(theGSD.line))
-   {
-      tag = ih->getTagData(USE00A_TAG);
-      if (tag.valid())
-      {
-         ossimNitfUse00aTag* p = PTR_CAST(ossimNitfUse00aTag, tag.get());
-         if (p)
-         {
-            theGSD.line = p->getMeanGsdInMeters();
-            theGSD.samp = theGSD.line;
-         }
-      }
-   }
-
-   // If external RPC data file was correctly parsed, then we can bypass this code block. Otherwise
-   // need to parse internal NITF tags for RPC data:
-   if (useInternalRpcTags)
-   {
-      // Get the the RPC tag:
-      ossimNitfRpcBase* rpcTag = NULL;
-      
-      // Look for the RPC00B tag first.
-      tag = ih->getTagData(RPC00B_TAG);
-      if (tag.valid())
-         rpcTag = PTR_CAST(ossimNitfRpcBase, tag.get());
-      
-      if (!tag.valid())
-      {
-         // Look for RPC00A tag.
-         tag = ih->getTagData(RPC00A_TAG);
-         if (tag.valid())
-            rpcTag = PTR_CAST(ossimNitfRpcBase, tag.get());
-      }
-      
-      if (!rpcTag)
-         return false;
-      
-      // Set the polynomial type.
-      if (rpcTag->getRegisterTagName() == "RPC00B")
-         thePolyType = B;
-      else
-         thePolyType = A;
-
-      // Parse coefficients:
-      for (ossim_uint32 i=0; i<20; ++i)
-      {
-         theLineNumCoef[i] = rpcTag->getLineNumeratorCoeff(i).toFloat64();
-         theLineDenCoef[i] = rpcTag->getLineDenominatorCoeff(i).toFloat64();
-         theSampNumCoef[i] = rpcTag->getSampleNumeratorCoeff(i).toFloat64();
-         theSampDenCoef[i] = rpcTag->getSampleDenominatorCoeff(i).toFloat64();
-      }
-
-      // Initialize other items in tags:
-      theLineScale  = rpcTag->getLineScale().toFloat64();
-      theSampScale  = rpcTag->getSampleScale().toFloat64();
-      theLatScale   = rpcTag->getGeodeticLatScale().toFloat64();
-      theLonScale   = rpcTag->getGeodeticLonScale().toFloat64();
-      theHgtScale   = rpcTag->getGeodeticHeightScale().toFloat64();
-      theLineOffset = rpcTag->getLineOffset().toFloat64();
-      theSampOffset = rpcTag->getSampleOffset().toFloat64();
-      theLatOffset  = rpcTag->getGeodeticLatOffset().toFloat64();
-      theLonOffset  = rpcTag->getGeodeticLonOffset().toFloat64();
-      theHgtOffset  = rpcTag->getGeodeticHeightOffset().toFloat64();
-      theImageID    = ih->getImageId();
-   }
-
-   finishConstruction();
-   clearErrorStatus();
-   return true;
-}
-
-//*************************************************************************************************
-//! Parses a tagged TIFF image file for RPC info. Returns TRUE if successful.
-//*************************************************************************************************
-bool ossimQuickbirdRpcModel::parseTiffFile(const ossimFilename& file)
-{
-   setErrorStatus();
-
-   // Make the gsd nan so it gets computed.
-   theGSD.makeNan();
-
-   ossimFilename tiffFile = file;
-   ossimRefPtr<ossimTiffTileSource> tiff = new ossimTiffTileSource();
-   if (!tiff->open(file))
-   {
-      return false;
-   }
-
-   theImageClipRect = tiff->getImageRectangle();
-
-   parseMetaData(file);
-
-   if (!parseRpcData(file))
-      return false;
-
-   if (!parseTileData(file))
-      return false;
-
-   finishConstruction();
-   clearErrorStatus();
-   return true;
-}
-
-//*************************************************************************************************
-//! Given some base name for the image data, parses the associated RPC data file. Returns TRUE
-//! if successful
-//*************************************************************************************************
-bool ossimQuickbirdRpcModel::parseRpcData(const ossimFilename& base_name)
-{
-   ossimFilename rpcFile (base_name);
-
-   // There are two possibilities for RPC data files: either each image file has its own RPC data
-   // file, or a single RPC file is provided for a multi-tile scene.
-   rpcFile.setExtension("RPB");
-   if (!findSupportFile(rpcFile))
-   {
-      rpcFile.setExtension("RPA");
-      if (!findSupportFile(rpcFile))
-         return false;
-   }
-
-   // An RPC file was located, open it:
-   ossimQuickbirdRpcHeader hdr;
-   if(!hdr.open(rpcFile))
-      return false;
-
-   if(hdr.isAPolynomial())
-      thePolyType = A;
-   else
-      thePolyType = B;
-
-   std::copy(hdr.theLineNumCoeff.begin(), hdr.theLineNumCoeff.end(), theLineNumCoef);
-   std::copy(hdr.theLineDenCoeff.begin(), hdr.theLineDenCoeff.end(), theLineDenCoef);
-   std::copy(hdr.theSampNumCoeff.begin(), hdr.theSampNumCoeff.end(), theSampNumCoef);
-   std::copy(hdr.theSampDenCoeff.begin(), hdr.theSampDenCoeff.end(), theSampDenCoef);
-
-   theLineScale  = hdr.theLineScale;
-   theSampScale  = hdr.theSampScale;
-   theLatScale   = hdr.theLatScale;
-   theLonScale   = hdr.theLonScale;
-   theHgtScale   = hdr.theHeightScale;
-   theLineOffset = hdr.theLineOffset;
-   theSampOffset = hdr.theSampOffset;
-   theLatOffset  = hdr.theLatOffset;
-   theLonOffset  = hdr.theLonOffset;
-   theHgtOffset  = hdr.theHeightOffset;
-   theImageID    = rpcFile.fileNoExtension();
-
-   return true;
-}
-
-
-//*************************************************************************************************
-//! Initializes the support data member with metadata file info. Returns TRUE if successful
-//*************************************************************************************************
-bool ossimQuickbirdRpcModel::parseMetaData(const ossimFilename& base_name)
-{
-
-   ossimFilename metadataFile (base_name);
-   metadataFile.setExtension("IMD");
-   if (!findSupportFile(metadataFile))
-      return false;
-
-   if ( !theSupportData.valid() )
-      theSupportData = new ossimQuickbirdMetaData();
-
-   if(!theSupportData->open(metadataFile))
-   {
-      theSupportData = 0; // ossimRefPtr
-      ossimNotify(ossimNotifyLevel_WARN) << "ossimQuickbirdRpcModel::parseNitfFile WARNING:"
-         << "\nCould not open IMD file.  Sensor ID unknown." << std::endl;
-      return false;
-   }
-
-   theSensorID = theSupportData->getSatID();
-   return true;
-}
-
-//*************************************************************************************************
-//! Reads the TIL file for pertinent info. Returns TRUE if successful
-//*************************************************************************************************
-bool ossimQuickbirdRpcModel::parseTileData(const ossimFilename& image_file)
-{
-   ossimFilename tileFile (image_file);
-   tileFile.setExtension("TIL");
-   if (!findSupportFile(tileFile))
-      return false;
-
-   ossimQuickbirdTile tileHdr;
-   if(!tileHdr.open(tileFile))
-      return false;
-
-   ossimQuickbirdTileInfo info;
-   if(!tileHdr.getInfo(info, image_file.file()))
-      return false;
-
-   if((info.theUlXOffset != OSSIM_INT_NAN) && (info.theUlYOffset != OSSIM_INT_NAN) &&
-      (info.theLrXOffset != OSSIM_INT_NAN) && (info.theLrYOffset != OSSIM_INT_NAN) &&
-      (info.theLlXOffset != OSSIM_INT_NAN) && (info.theLlYOffset != OSSIM_INT_NAN) &&
-      (info.theUrXOffset != OSSIM_INT_NAN) && (info.theUrYOffset != OSSIM_INT_NAN))
-   {
-      theImageClipRect = ossimIrect(ossimIpt(info.theUlXOffset, info.theUlYOffset),
-                                    ossimIpt(info.theUrXOffset, info.theUrYOffset),
-                                    ossimIpt(info.theLrXOffset, info.theLrYOffset),
-                                    ossimIpt(info.theLlXOffset, info.theLlYOffset));
-   }
-   else if ((info.theUlXOffset != OSSIM_INT_NAN) && (info.theUlYOffset != OSSIM_INT_NAN) &&
-      (theImageClipRect.width() != OSSIM_INT_NAN) && (theImageClipRect.height() != OSSIM_INT_NAN))
-   {
-      theImageClipRect = ossimIrect(info.theUlXOffset, info.theUlYOffset,
-                                    info.theUlXOffset+theImageClipRect.width()-1, 
-                                    info.theUlYOffset+theImageClipRect.height()-1);
-   }
-
-   return true;
-}
-
-//*************************************************************************************************
-//! Collects common code among all parsers
-//*************************************************************************************************
-void ossimQuickbirdRpcModel::finishConstruction()
-{
-   theImageSize.line = theImageClipRect.height();
-   theImageSize.samp = theImageClipRect.width();
-   theRefImgPt.line = theImageClipRect.midPoint().y;
-   theRefImgPt.samp = theImageClipRect.midPoint().x;
-   theRefGndPt.lat = theLatOffset;
-   theRefGndPt.lon = theLonOffset;
-   theRefGndPt.hgt = theHgtOffset;
-
-   //---
-   // NOTE:  We must call "updateModel()" to set parameter used by base
-   // ossimRpcModel prior to calling lineSampleHeightToWorld or all
-   // the world points will be same.
-   //---
-   updateModel();
-
-   ossimGpt v0, v1, v2, v3;
-   lineSampleHeightToWorld(theImageClipRect.ul(), theHgtOffset, v0);
-   lineSampleHeightToWorld(theImageClipRect.ur(), theHgtOffset, v1);
-   lineSampleHeightToWorld(theImageClipRect.lr(), theHgtOffset, v2);
-   lineSampleHeightToWorld(theImageClipRect.ll(), theHgtOffset, v3);
-
-   theBoundGndPolygon = ossimPolygon (ossimDpt(v0), ossimDpt(v1), ossimDpt(v2), ossimDpt(v3));
-
-   // Set the ground reference point using the model.
-   lineSampleHeightToWorld(theRefImgPt, theHgtOffset, theRefGndPt);
-
-   if( theGSD.hasNans() )
-   {
-      try
-      {
-         // This will set theGSD and theMeanGSD. Method throws ossimException.
-         computeGsd();
-      }
-      catch (const ossimException& e)
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimQuickbirdRpcModel::finishConstruction -- caught exception:\n"
-            << e.what() << std::endl;
-      }
-   }
-}
-
-bool ossimQuickbirdRpcModel::saveState(ossimKeywordlist& kwl,
-                                       const char* prefix) const
-{
-   // sanity check only.  This shoulc always be true
-   if(theSupportData.valid())
-   {
-      ossimString supportPrefix = ossimString(prefix) + "support_data.";
-      theSupportData->saveState(kwl, supportPrefix);
-   }
-
-   return ossimRpcModel::saveState(kwl, prefix);
-}
-
-bool ossimQuickbirdRpcModel::loadState(const ossimKeywordlist& kwl,
-                                       const char* prefix)
-{
-   // sanity check only.  This shoulc always be true
-   if(theSupportData.valid())
-   {
-      ossimString supportPrefix = ossimString(prefix) + "support_data.";
-      theSupportData->loadState(kwl, supportPrefix);
-   }
-   return ossimRpcModel::loadState(kwl, prefix);
-}
-
-//*************************************************************************************************
-// Given an initial filename with case-agnostic extension, this method searches first for an
-// image-specific instance of that file (i.e., with R*C* in the filename) before considering
-// the mosaic-global support file (R*C* removed). If a file is found, the argument is modified to
-// match the actual filename and TRUE is returned. Otherwise, argument filename is left unchanged
-// and FALSE is returned.
-//*************************************************************************************************
-bool ossimQuickbirdRpcModel::findSupportFile(ossimFilename& filename) const
-{
-   ossimFilename f (filename);
-   ossimString extension = f.ext();
-   while (true)
-   {
-      // Search for support file with same basename as image:
-      extension.upcase();
-      f.setExtension(extension);
-      if (f.exists())  
-         break;
-      extension.downcase();
-      f.setExtension(extension);
-      if (f.exists())  
-         break;
-
-      // None found so far, search for mosaic-global support file:
-      f = f.replaceAllThatMatch("_R[0-9]+C[0-9]+");
-      if (f.exists())  
-         break;
-      extension.upcase();
-      f.setExtension(extension);
-      if (f.exists())  
-         break;
-
-      // Nothing found:
-      return false;
-   }
-
-   // Modify argument to match good filename:
-   filename = f;
-   return true;
-}
diff --git a/src/ossim/projection/ossimRS1SarModel.cpp b/src/ossim/projection/ossimRS1SarModel.cpp
deleted file mode 100644
index 3ec1b9a..0000000
--- a/src/ossim/projection/ossimRS1SarModel.cpp
+++ /dev/null
@@ -1,1083 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Oscar Kramer
-//
-// Description:
-//
-// Sensor Model for Radarsat1 SAR sensor.
-// 
-//*******************************************************************
-//  $Id:$
-
-#include <ossim/projection/ossimRS1SarModel.h>
-#include <cstdio>
-#include <fstream>
-#include <iomanip>
-#include <iostream>
-#include <sstream>
-#include <string>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/matrix/newmat.h>
-#include <ossim/base/ossimLsrPoint.h>
-#include <ossim/elevation/ossimElevManager.h>
-
-
-using namespace std;
-using namespace ossim;
-
-static ossimTrace traceDebug("ossimRS1SarModel:debug");
-
-static const double SEC_PER_DAY              = 86400.0;
-static const double NOMINAL_ORBIT_ELEVATION  = 798000.0; // m
-static const double DEG_PER_SEC              = 0.004178074;
-static const double INTRACK_OFFSET_SIGMA     = 1000.0;  // meters
-static const double CRTRACK_OFFSET_SIGMA     = 300.0;
-static const double RADIAL_OFFSET_SIGMA      = 300.0;
-static const double LINE_SCALE_SIGMA         = 0.01;
-static const double SKEW_SIGMA               = 0.1;  // deg
-static const double ORIENTATION_SIGMA        = 0.2;  // deg
-static const double EARTH_ANGULAR_VELOCITY   = 7.2921151467e-05;  // radians/sec
-static const char*  IMAGING_MODE_ID[] = 
-{"UNKNOWN", "SCN", "SCW", "SGC", "SGF", "SGX", "SLC", "SPG", "SSG","RAW","ERS"};
-
-//******************************************************************************
-// Default.
-//******************************************************************************
-ossimRS1SarModel::ossimRS1SarModel()
-:  theCeosData        (0),
-   theImagingMode     (UNKNOWN_MODE)
-{
-   setErrorStatus();
-}
-
-//******************************************************************************
-// Takes a ossimFilename& directory containing support data, initializes the model,
-// and writes out the initial geometry file.
-//******************************************************************************
-ossimRS1SarModel::ossimRS1SarModel(const ossimFilename& imageFile)
-   :
-      theCeosData        (0),
-      theImagingMode     (UNKNOWN_MODE)
-{
-   static const char MODULE[] = "Constructor ossimRS1SarModel(ossimFilename)";
-   if (traceDebug())  CLOG << "entering..." << endl;
-
-   clearErrorStatus();
-
-   // Parse the CEOS data files:
-   ossimFilename dataDirName (imageFile.path());
-   initFromCeos(dataDirName);
-   if(getErrorStatus() != ossimErrorCodes::OSSIM_OK)
-   {
-      return;
-   }
-   if (theImagingMode == UNKNOWN_MODE) 
-      return;
-
-   // Parse the image data file for the local ORPs interpolator:
-   if ((theImagingMode == SCN) || (theImagingMode == SCW))
-      establishOrpGrid();
-   else
-      establishOrpInterp();
-
-   // Establish the ephemeris interpolator:
-   establishEphemeris();
-
-   initAdjParms();
-   establishVehicleSpace();
-
-   if (traceDebug())  CLOG << "returning..." << endl;
-   return;
-}
-
-
-//******************************************************************************
-//  DESTRUCTOR: ~ossimRS1SarModel
-//******************************************************************************
-ossimRS1SarModel::~ossimRS1SarModel()
-{
-   deallocateMemory();
-}
-
-//******************************************************************************
-//  loadSate()
-//******************************************************************************
-bool ossimRS1SarModel::loadState(const ossimKeywordlist& /* kwl */, const char* /* prefix */)
-{
-   // NOT YET IMPLEMENTED
-   setErrorStatus();
-   return false;
-}
-
-//******************************************************************************
-//  saveState()
-//******************************************************************************
-bool ossimRS1SarModel::saveState(ossimKeywordlist& /* kwl */, const char* /* prefix */) const
-{
-   // NOT YET IMPLEMENTED
-   setErrorStatus();
-   return false;
-}
-
-//*************************************************************************************************
-//! Given an image point, returns a ray originating at some arbitrarily high
-//! point (in this model at the sensor position) and pointing towards the target.
-//*************************************************************************************************
-void ossimRS1SarModel::imagingRay(const ossimDpt& image_point, ossimEcefRay& /* image_ray */) const
-{
-   const char* MODULE = "ossimRS1SarModel::imagingRay()";
-
-   // Apply offset, scale, skew, and rotation to image point:
-   ossimDpt offset (theImageSize.line/2.0, theImageSize.samp/2.0);
-   ossimDpt ip1 = image_point - offset;
-   ossimDpt ip2;
-   ip2.line = ip1.line*theCosOrientation*theLineScale +
-      ip1.samp*(theCosOrientation*theSinSkew+theSinOrientation);
-   ip2.samp = -ip1.line*theSinOrientation*theLineScale -
-      ip1.samp*(theSinOrientation*theSinSkew-theCosOrientation);
-
-   // Offset point back to origin of image:
-   ip1 = ip2 + offset;
-
-   // Given new line number, obtain the interpolated ORP:
-   ossimEcefPoint localORP;
-   if ((theImagingMode == SCN) || (theImagingMode == SCW))
-   {
-      ossimGpt gpt (theLatGrid(ip1.x, ip1.y), theLonGrid(ip1.x, ip1.y), theRefHeight);
-      localORP = ossimEcefPoint(gpt);
-   }
-   else
-   {
-      NEWMAT::ColumnVector orpPos(3);
-      theLocalOrpInterp->interpolate(ip1.line, orpPos);
-      localORP = ossimEcefPoint(orpPos[0], orpPos[1], orpPos[2]);
-   }
-   
-   // Establish imaging line time (zero-Doppler time):
-   double arpTime = theFirstLineTime + ip1.line*theTimePerLine;
-
-   NEWMAT::ColumnVector arpEph(3);
-   theArpPosInterp->interpolate(arpTime, arpEph);
-   ossimEcefPoint ecfArpPos (arpEph[0], arpEph[1], arpEph[2]);
-
-   theArpVelInterp->interpolate(arpTime, arpEph);
-   ossimEcefVector ecfArpVel (arpEph[0], arpEph[1], arpEph[2]);
-
-   // Need to correct the velocity vector by the earth rotational velocity:
-   ossimEcefVector earthVel 
-      (-ecfArpPos.y()*EARTH_ANGULAR_VELOCITY, ecfArpPos.x()*EARTH_ANGULAR_VELOCITY, 0.0);
-   ecfArpVel = ecfArpVel - earthVel;
-
-   // Compute a vehicle space with Z near intrack, X normal to Z and range
-   // vector to ORP (slant range normal), and Y in range direction.
-   // Note the application of the position adjustable parameter to the space's
-   // origin (after the range vector was established):
-   ossimEcefVector rangeVector     = localORP - ecfArpPos;
-   ossimEcefVector rangeNormal     = rangeVector.cross(ecfArpVel);
-   // ossimEcefVector zDirection      = rangeNormal.cross(rangeVector);
-   ossimLsrSpace localVehicleSpace (ossimEcefPoint(ecfArpPos + thePosCorrection), // origin
-                                    rangeNormal,  // X-direction
-                                    rangeVector, 0);   // Y-direction (Z not specified
-   double local_orp_range = rangeVector.length();
-
-   // Compute slant range distance to pixel in question:
-   double slant_range = local_orp_range;
-   switch (theImagingMode)
-   {
-   case SLC:
-      if (theDirectionFlag == ASCENDING)
-         slant_range += thePixelSpacing.samp*ip1.samp;
-      else
-         slant_range += (theImageSize.samp-1.0-ip1.samp) * thePixelSpacing.samp;
-      break;
-
-   case SGC:
-   case SGF:
-   case SGX:
-   case ERS:
-      {
-         // Compute the slant range as a polynomial expansion given ground range
-         double ground_range;
-         if (theDirectionFlag == ASCENDING)
-            ground_range = ip1.samp * thePixelSpacing.samp;
-         else
-            ground_range = (theImageSize.samp - 1.0 - ip1.samp) *
-            thePixelSpacing.samp;
-         //         double delta_g_i = 1.0;
-         //         for (int 0=1; i<6; i++)
-         double delta_g_i = ground_range;
-         for (int i=1; i<6; i++)  // NOTE: not using offset (i=0) term
-         {
-            slant_range += theSrGrCoeff[i] * delta_g_i;
-            delta_g_i *= ground_range;
-         }
-      }
-      break;
-
-   case SCN:
-   case SCW:
-      slant_range = local_orp_range;
-      break;
-
-   default:
-      CLOG << "ERROR: Invalid imaging mode encountered." << endl;
-      setErrorStatus();
-   }
-}
-
-//*************************************************************************************************
-// PUBLIC METHOD: ossimRS1SarModel::lineSampleHeightToWorld(image_point, height, is_inside_image)
-//
-//  Performs image to ground projection. 
-//*************************************************************************************************
-void ossimRS1SarModel::lineSampleHeightToWorld(const ossimDpt& image_point,
-                                               const double&   height_ellip,
-                                               ossimGpt&       worldPt) const
-{
-   static const char MODULE[] = "ossimRS1SarModel::lineSampleHeightToWorld()";
-   if (traceDebug())  CLOG << "entering..." << endl;
-
-   // static const int    MAX_NUM_ITERS = 50;
-   // static const double MAX_ELEV_DIFF = 0.001;
-
-   ossimEcefRay imaging_ray;
-   imagingRay(image_point, imaging_ray);
-   worldPt = imaging_ray.intersectAboveEarthEllipsoid(height_ellip);
-         
-   if (traceDebug())  CLOG << "returning..." << endl;
-}
-
-//******************************************************************************
-//  This method sets theImagingMode data member given a character string
-//  abbreviation of the mode.
-//******************************************************************************
-void ossimRS1SarModel::setImagingMode(char* modeStr)
-{
-   static const char MODULE[] = "ossimRS1SarModel::setImagingMode(modeStr)";
-   if (traceDebug())  CLOG << "entering..." << endl;
-
-   bool illegal_mode = false;
-   
-   if (strcmp(modeStr, "SCN") == 0)
-   {
-      theImagingMode = SCN;
-   }
-   else if (strcmp(modeStr, "SCW") == 0)
-   {
-      theImagingMode = SCW;
-   }
-   else if (strcmp(modeStr, "SGC") == 0)
-   {
-      theImagingMode = SGC;
-   }
-   else if (strcmp(modeStr, "SGF") == 0)
-   {
-      theImagingMode = SGF;
-   }
-   else if (strcmp(modeStr, "SGX") == 0)
-   {
-      theImagingMode = SGX;
-   }
-   else if (strcmp(modeStr, "SLC") == 0)
-   {
-      theImagingMode = SLC;
-   }
-   else if (strcmp(modeStr, "SPG") == 0)
-   {
-      theImagingMode = SPG;
-      illegal_mode = true;
-   }
-   else if (strcmp(modeStr, "SSG") == 0)
-   {
-      theImagingMode = SSG;
-      illegal_mode = true;
-   }
-   else if (strcmp(modeStr, "RAW") == 0)
-   {
-      theImagingMode = RAW;
-      illegal_mode = true;
-   }
-   else if (strcmp(modeStr, "ERS") == 0)
-   {
-      theImagingMode = ERS;
-   }
-   else 
-   {
-      theImagingMode = UNKNOWN_MODE;
-      illegal_mode = true;
-   }
-
-   // Test for ERS product:
-   if ((theImagingMode == UNKNOWN_MODE) && theCeosData.valid())
-   {
-      char buf[] = "xxx";
-      strncpy(buf, &(theCeosData->textRec()->product_type[8]), 3);
-      if (strcmp(buf, "ERS") == 0)
-      {
-         theImagingMode = ERS;
-         illegal_mode = false;
-      }
-   }
-      
-   // Filter the imaging modes that are not handled:
-   if (illegal_mode)
-   {
-      CLOG << "\n\t ERROR: The imaging mode <"
-           << IMAGING_MODE_ID[(int) theImagingMode]
-           << "> is currently not supported. \n" << endl;
-      theImagingMode = UNKNOWN_MODE;
-   }
-   
-   if (traceDebug())  CLOG << "returning..." << endl;
-}
-
-
-//******************************************************************************
-//  Initialize various data members from the CEOS records.
-//******************************************************************************
-void ossimRS1SarModel::initFromCeos(const ossimFilename& fname)
-{
-   static const char MODULE[] = "ossimRS1SarModel::initFromCeos()";
-   if (traceDebug())  CLOG << "entering..." << endl;
-
-   // Instantiate a CeosData object:
-   theCeosData = new ossimCeosData(fname);
-   
-   if(theCeosData->errorStatus() != ossimErrorCodes::OSSIM_OK) return;
-   const dataset_sum_rec* dsr = theCeosData->dataSetSumRec();
-   const proc_parm_rec*   ppr = theCeosData->procParmRec();
-   char buf[1024];
-   
-   // Set imaging mode:
-   strncpy(buf, &(theCeosData->volDescRec()->logvol_id[11]), 3);
-   buf[3] = '\0';
-   setImagingMode(buf);
-   
-   // Determine whether ascending or descending path acquisition. This flag
-   // dictates whether the first or last pixel of a line is of shorter range:
-   if (theImagingMode == ERS)
-   {
-      theDirectionFlag = DESCENDING;
-   }
-   else
-   {
-      if (dsr->asc_des[0] == 'A')
-         theDirectionFlag = ASCENDING;
-      else if (dsr->asc_des[0] == 'D')
-         theDirectionFlag = DESCENDING;
-      else
-      {
-         CLOG << "ERROR: Direction Flag: " << dsr->asc_des << " not supported"
-              << endl;
-         theDirectionFlag = UNKNOWN_DIRECTION;
-         setErrorStatus();
-         if (traceDebug())  CLOG << "returning with error..." << endl;
-         return;
-      }
-   }
-
-   // Image (Product) ID:
-   buf[8] = '\0';
-   strncpy(buf, theCeosData->volDescRec()->product_id, 8);
-   theImageID = buf;
-   
-   // pixel spacing in range:
-   buf[16] = '\0';
-   strncpy(buf, dsr->pix_spacing, 16);
-   thePixelSpacing.samp = atof(buf);
-   
-   // pixel spacing in azimuth:
-   strncpy(buf, dsr->line_spacing, 16);
-   buf[16] = '\0';
-   thePixelSpacing.line = atof(buf);
-
-   // The ground reference point (ORP) latitude:
-   ossimGpt grp;
-   strncpy(buf, dsr->pro_lat, 16);
-   buf[16] = '\0';
-   grp.lat = atof(buf);
-      
-   // The ground reference point (ORP) longitude:
-   strncpy(buf, dsr->pro_long, 16);
-   buf[16] = '\0';
-   grp.lon = atof(buf);
-      
-   // The ground reference point (ORP) elevation:
-   strncpy(buf, dsr->terrain_h, 16);
-   buf[16] = '\0';
-   grp.hgt = atof(buf);
-   theORP = ossimEcefPoint(grp);
-   theRefHeight = grp.hgt;
-   
-   // Illumination elevation:
-   strncpy(buf, dsr->incident_ang, 8);
-   buf[8] = '\0';
-   double incidence = atof(buf);
-   theIllumElevation = 90.0 - incidence;
-
-   // Illumination azimuth -- need to determine whether sensor is in normal
-   // right-looking mode or "antarctic" (left-looking) mode:
-   strncpy(buf, dsr->plat_head, 8);
-   theIllumAzimuth = atof(buf);
-   char sensor_orientation[] = "123456789";
-   strncpy(sensor_orientation, ppr->sens_orient, 9);
-   if (strcmp(sensor_orientation, "ANTARCTIC") == 0)
-   {
-      theIllumAzimuth -= 90.0;
-      if (theIllumAzimuth < 0.0) theIllumAzimuth += 360.0;
-   }
-   else
-   {
-      theIllumAzimuth += 90.0;
-      if (theIllumAzimuth >= 360.0) theIllumAzimuth -= 360.0;
-   }
-
-   // Determine the number of lines per image and pixels per line. NOTE: if
-   // image is scan mode, the number of lines must be computed indirectly. 
-   if ((theImagingMode == SCN) || (theImagingMode == SCW))
-   {
-      FILE* fptr = fopen(theCeosData->imageFile().chars(), "r");
-      if (!fptr)
-      {
-         CLOG << " ERROR:\n\tCannot open CEOS image file: "
-              << theCeosData->imageFile() << endl;
-         setErrorStatus();
-         return;
-      }
-      fseek(fptr, 0, SEEK_END);
-      long byte_count = ftell(fptr);
-      buf[6] = '\0';
-      strncpy(buf, theCeosData->imopDescRec()->l_dataset, 6);
-      int lengthOfRec = atoi(buf);
-      theImageSize.line = (byte_count - sizeof(*theCeosData->imopDescRec()))
-                           /lengthOfRec;
-      fclose(fptr);
-   }
-   else
-   {
-      strncpy(buf, theCeosData->imopDescRec()->n_dataset, 6);
-      buf[6] = '\0';
-      theImageSize.line = atoi(buf);
-   }
-   strncpy(buf, theCeosData->imopDescRec()->nleft, 4);
-   buf[4] = '\0';
-   int left_pixels = atoi(buf);
-   strncpy(buf, theCeosData->imopDescRec()->ngrp, 8);
-   buf[8] = '\0';
-   int data_pixels = atoi(buf);
-   strncpy(buf, theCeosData->imopDescRec()->nright, 4);
-   buf[4] = '\0';
-   int right_pixels  = atoi(buf);
-   theImageSize.samp = left_pixels + data_pixels + right_pixels;
-
-   // If ground range product, need to read the ground-to-slant range
-   // conversion coefficients from the proc_parm_rec. NOTE: only single-look
-   // products handled properly. ScanSAR requires reading multiple coefficient
-   // sets. See MDA Detailed Processing Parameter Record Description sec.3.84.
-   if ((theImagingMode==SGC) ||
-       (theImagingMode==SGF) ||
-       (theImagingMode==SGX) ||
-       (theImagingMode==ERS))
-   {
-      buf[16] = '\0';
-      for (int i=0; i<6; i++)
-      {
-         strncpy(buf, ppr->srgr_coefset[0].srgr_coef[i], 16);
-         theSrGrCoeff[i] = atof(buf);
-      }
-   }
-   else
-   {
-      theSrGrCoeff[0] = 0.0;
-      theSrGrCoeff[1] = 1.0;  // note 1.0 here (should never be accessed)
-      theSrGrCoeff[2] = 0.0;
-      theSrGrCoeff[3] = 0.0;
-      theSrGrCoeff[4] = 0.0;
-      theSrGrCoeff[5] = 0.0;
-   }
-   
-   if (traceDebug())
-   {
-      CLOG << "DEBUG -- "
-           << "\n\t theDirectionFlag = " << theDirectionFlag
-           << "\n\t thePixelSpacing = " << thePixelSpacing
-           << "\n\t theORP = " << theORP
-           << "\n\t theRefHeight = " << theRefHeight
-           << "\n\t theImageSize = " << theImageSize
-           << "\n\t sensor_orientation = " << sensor_orientation
-           << "\n\t theIllumElevation = " << theIllumElevation
-           << "\n\t theIllumAzimuth = " << theIllumAzimuth
-           << endl;
-   }
-
-   if (traceDebug())  CLOG << "returning..." << endl;
-}
-
-
-//******************************************************************************
-//  This method sets the rigorous model adjustable parameters to
-//  their initial values.
-//******************************************************************************
-void ossimRS1SarModel::initAdjParms()
-{
-   // Adjustable model not yet implemented
-#if 0
-
-   static const char* MODULE = "ossimRS1SarModel::initAdjParms()";
-   if (traceDebug())  CLOG << "entering..." << endl;
-
-   theInTrackOffset = (init_adj_parm[INTRACK_OFFSET]+adj_parm[INTRACK_OFFSET])
-                      * adj_sigma[INTRACK_OFFSET];
-   
-   theCrTrackOffset = (init_adj_parm[CRTRACK_OFFSET]+adj_parm[CRTRACK_OFFSET])
-                      * adj_sigma[CRTRACK_OFFSET];
-   
-   theRadialOffset = (init_adj_parm[RADIAL_OFFSET]+adj_parm[RADIAL_OFFSET])
-                     * adj_sigma[RADIAL_OFFSET];
-   
-   theLineScale   = (init_adj_parm[LINE_SCALE]+adj_parm[LINE_SCALE])
-                    * adj_sigma[LINE_SCALE];
-   
-   theSkew        = (init_adj_parm[SKEW]+adj_parm[SKEW])
-                    * adj_sigma[SKEW];
-   
-   theOrientation = (init_adj_parm[ORIENTATION]+adj_parm[ORIENTATION]);
-
-   // Initialize base-class initial adjustable parameter array:
-   init_adj_parm[INTRACK_OFFSET]  = theInTrackOffset/adj_sigma[INTRACK_OFFSET];
-   init_adj_parm[CRTRACK_OFFSET]  = theCrTrackOffset/adj_sigma[CRTRACK_OFFSET];
-   init_adj_parm[RADIAL_OFFSET]   = theRadialOffset/adj_sigma[RADIAL_OFFSET];  
-   init_adj_parm[LINE_SCALE]      = theLineScale/adj_sigma[LINE_SCALE];  
-   init_adj_parm[SKEW]            = theSkew/adj_sigma[SKEW];  
-   init_adj_parm[ORIENTATION]     = theOrientation/adj_sigma[ORIENTATION];  
-   
-   //  Initialize sensor adjustable parameter description strings:
-   strncpy (adj_desc[INTRACK_OFFSET], "intrack_offset", MAX_DESC_CHARS);
-   strncpy (adj_desc[CRTRACK_OFFSET], "crtrack_offset", MAX_DESC_CHARS);
-   strncpy (adj_desc[RADIAL_OFFSET],  "radial_offset",  MAX_DESC_CHARS);
-//   strncpy (adj_desc[SAMP_SCALE],  "samp_scale",      MAX_DESC_CHARS);
-   strncpy (adj_desc[LINE_SCALE],   "line_scale",       MAX_DESC_CHARS);
-   strncpy (adj_desc[SKEW],         "image_skew",       MAX_DESC_CHARS);
-   strncpy (adj_desc[ORIENTATION],  "image_orientation",MAX_DESC_CHARS);
-
-   // Initialize the adj_parms (parameter corrections) to 0:
-   for (int i=0; i<num_adj_parm; i++)
-      adj_parm[i] = 0.0;
-   
-   if (traceDebug())  CLOG << "returning..." << endl;
-#endif
-}
-
-
-//******************************************************************************
-//  This method parses the SAR header information associated with the
-//  ephemeris state vectors, and instantiates a Lagrange interpolator object
-//  for interpolating intermediate ehemeris states.
-//******************************************************************************
-void ossimRS1SarModel::establishEphemeris()
-{
-   static const char MODULE[] = "ossimRS1SarModel::establishEphemeris()";
-   if (traceDebug())  CLOG << "entering..." << endl;
-
-   char buf[23];
-   
-   // Establish pointer to platform position data record:
-   const pos_data_rec* pdr = theCeosData->posDataRec();
-   
-   // Establish the Greenwich mean hour angle at time of first sample:
-   char gha_str [23];
-   strncpy(gha_str, pdr->hr_angle, 22);
-   gha_str[22] = '\0';
-   theGHA = atof(gha_str);
-
-   // Fetch number of points in record and allocate memory:
-   strncpy(buf, pdr->ndata, 4);
-   buf[4] = '\0';
-   int numPoints = atoi(buf);
-
-   // Fetch sampling period:
-   strncpy(buf, pdr->data_int, 22);
-   buf[22] = '\0';
-   double sampling_period = atof(buf);
-
-   // Establish the first sample time's day:
-   strncpy(buf, pdr->gmt_day, 4);
-   buf[4] = '\0';
-   int first_day =  atoi(buf);
-   double time_offset = (double) (first_day - theFirstLineDay)*SEC_PER_DAY;
-
-   // Establish the first sample time in seconds from beginning of day:
-   strncpy(buf, pdr->gmt_sec, 22);
-   buf[22] = '\0';
-   theEphFirstSampTime =  atof(buf) + time_offset;
-
-   int i, j;
-   double sample_time = theEphFirstSampTime;
-   buf[22] = '\0';
-   NEWMAT::ColumnVector eciArpPos(3);
-   NEWMAT::ColumnVector eciArpVel(3);
-   NEWMAT::ColumnVector ecfArpPos(3);
-   NEWMAT::ColumnVector ecfArpVel(3);
-   NEWMAT::ColumnVector earthVel(3);
-   NEWMAT::Matrix xform;
-   theArpPosInterp = new ossimLagrangeInterpolator;
-   theArpVelInterp = new ossimLagrangeInterpolator;
-
-   // Loop over each point, converting them to vectors:
-   for (i=0; i<numPoints; i++)
-   {
-      for (j=0; j<3; j++)
-      {
-         strncpy(buf, pdr->pos_vect[i].pos[j], 22);
-         eciArpPos[j] = atof(buf);
-         strncpy(buf, pdr->pos_vect[i].vel[j], 22);
-         eciArpVel[j] = atof(buf)/1000.0;
-      }
-
-      // Convert pos and vel vectors from ECI to ECF:
-      eciToEcfXform(sample_time, xform);
-      ecfArpPos = xform*eciArpPos;
-      ecfArpVel = xform*eciArpVel;
-      theArpPosInterp->addData(sample_time, ecfArpPos);
-
-      // Correct velocity for earth rotation:
-      earthVel[0] = -ecfArpPos[1]*EARTH_ANGULAR_VELOCITY;
-      earthVel[1] =  ecfArpPos[0]*EARTH_ANGULAR_VELOCITY;
-      earthVel[2] =  0.0;
-      ecfArpVel = ecfArpVel - earthVel;
-      theArpVelInterp->addData(sample_time, ecfArpVel);
-
-      sample_time += sampling_period;
-   }
-
-   if (traceDebug())
-   {
-      CLOG << "DEBUG -- "
-           << "\n\t theGHA:              " << theGHA 
-           << "\n\t numPoints:           " << numPoints 
-           << "\n\t sampling_period:     " << sampling_period 
-           << "\n\t theEphFirstSampTime: " << theEphFirstSampTime << endl;
-   }
-
-   if (traceDebug())  CLOG << "returning..." << endl;
-}
-
-
-//******************************************************************************
-//  Returns 3x3 transform to rotate ECI into ECF. The argument is
-// in seconds of the day.
-//******************************************************************************
-void ossimRS1SarModel::eciToEcfXform(const double& acq_time, NEWMAT::Matrix& xform) const
-{
-   static const char MODULE[] = "ossimRS1SarModel::eciToEcfXform(acq_time)";
-   if (traceDebug())  CLOG << "entering..." << endl;
-
-   // Determine time elapsed since ephemeris first sample time:
-   double delta_t = acq_time - theEphFirstSampTime;
-
-   // Compute GHA at time of this image line (in degrees):
-   double gha = theGHA + delta_t*DEG_PER_SEC;
-   if (gha >= 360.0)
-      gha -=360.0;
-   else if (gha < 0.0)
-      gha += 360.0;
-   
-   // Establish rotation:
-   double cos_gha = ossim::cosd(gha);
-   double sin_gha = ossim::sind(gha);
-
-   // Establish rotation matrix:
-   xform = ossimMatrix3x3::create(cos_gha,  sin_gha,  0.0,
-                                 -sin_gha,  cos_gha,  0.0,
-                                      0.0,      0.0,  1.0);
-   if (traceDebug())
-   {
-      CLOG << "DEBUG -- "
-           << "\n\t acq_time = " << acq_time
-           << "\n\t delta_t  = " << delta_t
-           << "\n\t gha      = " << gha << endl;
-   }
-
-   if (traceDebug())  CLOG << "returning..." << endl;
-}
-   
-
-//******************************************************************************
-// PRIVATE METHOD: ossimRS1SarModel::establishOrpInterp()
-//  
-//  This method reads the image data file for obtaining the local ORPs (taken
-//  to be the lat-lon of the nearest pixel for each line), and the zero-doppler
-//  time for each line. These ORPs are used for computing SPNs.
-//
-//  The processed data records correspond to lines of imagery. Accompanying
-//  each data line is the lat-lon (at the ellipsoid) of the first, middle, and
-//  last sample of the line, the time of zero-doppler (broadside) imaging for
-//  the line.
-//
-//  A Lagrange interpolator is established with N data points representing the
-//  local ORPs and their corresponding image line numbers
-//  uniformly distributed over the image.
-//
-//  If the image is a ground range product, need to also read the ground-to-
-//  slant range conversion coefficients.
-//  
-//******************************************************************************
-void ossimRS1SarModel::establishOrpInterp()
-{
-   static const char MODULE[] = "ossimRS1SarModel::establishOrpInterp()";
-   if (traceDebug())  CLOG << "entering..." << endl;
-   
-   if (traceDebug())
-      CLOG << "DEBUG -- " << endl;
-
-   static const int      NUM_DATA_POINTS  = 11;
-
-   desc_rec        descRec;
-   pdr_prefix_rec  prefix;
-   int             sizeOfDescRec = sizeof(descRec);
-   int             sizeOfPrefRec = sizeof(prefix);
-   int             headerSize    = sizeOfDescRec + sizeOfPrefRec;
-   char            buf[] = "123456";
-   ossimGpt localOrp (0.0, 0.0, theRefHeight);
-   std::vector<double> line_numbers_list;
-   std::vector<NEWMAT::ColumnVector> orpVectorList; // X, Y, Z
-
-   if (traceDebug())
-   {
-      CLOG << "DEBUG:"
-           << "\nsizeOfDescRec:  " << sizeOfDescRec
-           << "\nsizeOfPrefRec:  " << sizeOfPrefRec << endl;
-   }
-   
-   // Open the image data file given the image directory name and seek to first
-   // SAR data record:
-   FILE* fptr = fopen(theCeosData->imageFile().chars(), "r");
-   if (!fptr)
-   {
-      CLOG << "ERROR: Could not open data file <" << theCeosData->imageFile()
-           << ">" << endl;
-      setErrorStatus();
-      return;
-   }
-   fseek(fptr, theCeosData->imopDescRec()->desc.length, SEEK_SET);
-
-   // Declare some constants and variables used in loop:
-   int last_line    = (int) theImageSize.line - 1;
-   int delta_line   = (int)ceil(last_line/((double)NUM_DATA_POINTS-1.0));
-   int line_number  = 0;
-
-   // Compute the number of SAR data bytes to skip to reach prefix of next
-   // record of interest:
-   strncpy(buf, theCeosData->imopDescRec()->l_dataset, 6);
-   int record_size = atoi(buf);
-   
-   // Loop over each imaging line:
-   int index;
-   theLocalOrpInterp = new ossimLagrangeInterpolator;
-   for (index=0; index<NUM_DATA_POINTS; index++)
-   {
-      if (traceDebug())
-         clog << "\t Processing ORP for line number " << line_number << endl;
-
-      // Read the image line prefix info:
-      fread(&descRec, sizeOfDescRec, 1, fptr);
-      fread(&prefix,  sizeOfPrefRec,  1, fptr);
-
-      // Verify correct line number being read:
-      if ((prefix.line_num-1) != line_number)
-      {
-         CLOG << "\n\tERROR: Synchronization error reading image file. "
-              << "Expected line number " << line_number+1
-              << " but read line number " << prefix.line_num << "." << endl;
-         setErrorStatus();
-         return;
-      }
-      
-      // Latch the imaging time for the first line collected:
-      if (index == 0)
-      {
-         theFirstLineDay  = prefix.acq_date.acq_day;
-         theFirstLineTime = (double) prefix.acq_date.acq_msec/1000.0;
-      }
-      
-      // Read the local ORP for this line and convert to ECF:
-      if (theDirectionFlag == ASCENDING)
-      {
-         localOrp.lat    = (double) prefix.lat_first  / 1.0e6;
-         localOrp.lon = (double) prefix.long_first / 1.0e6;
-      }
-      else
-      {
-         localOrp.lat    = (double) prefix.lat_last  / 1.0e6;
-         localOrp.lon = (double) prefix.long_last / 1.0e6;
-      }
-
-      theLocalOrpInterp->addData(line_number, ossimEcefPoint(localOrp).toVector());
-      
-      // Update the line number for next record, insuring we don't go passed
-      // the last line:
-      line_number += delta_line;
-      if (line_number > last_line)
-      {
-         delta_line -= line_number - last_line;  // adjust for fseek below
-         line_number = last_line;
-      }
-
-      // Advance to read the next prefix record of interest:
-      fseek(fptr, (delta_line)*record_size-headerSize, SEEK_CUR);
-   }
-
-   // Compute time interval between each line, handle possible day rollover:
-   double lastLineTime = (double) prefix.acq_date.acq_msec/1000.0;
-   if ((lastLineTime-theFirstLineTime) > (SEC_PER_DAY/2.0))
-      lastLineTime -= SEC_PER_DAY;
-   else if ((theFirstLineTime-lastLineTime) > (SEC_PER_DAY/2.0))
-      lastLineTime += SEC_PER_DAY;
-   theTimePerLine = (lastLineTime - theFirstLineTime)/line_number;
-
-   if (traceDebug())
-   {
-      clog << "\n\t line_number (last)   = " << line_number
-           << "\n\t last_line (in image) = " << last_line
-           << "\n\t theFirstLineTime     = " << theFirstLineTime
-           << "\n\t lastLineTime         = " << lastLineTime
-           << "\n\t theTimePerLine       = " << theTimePerLine
-           << endl;
-   }
-   
-   if (traceDebug())  CLOG << "returning..." << endl;
-}
-
-//******************************************************************************
-//  This method establishes a common mean intrack-crosstrack-radial LSR
-//  space at the ARP.
-//******************************************************************************
-void ossimRS1SarModel::establishVehicleSpace()
-{
-   static const char MODULE[] = "ossimRS1SarModel::establishVehicleSpace()";
-   if (traceDebug())  CLOG << "entering..." << endl;
-
-   // Obtain the imaging time when the vehicle is at the ARP:
-   double line = theImageSize.line/2.0;
-   double arpTime = theFirstLineTime + line*theTimePerLine;
-
-   // Obtain the ephemeris at this time:
-   NEWMAT::ColumnVector arpPos(3);
-   theArpPosInterp->interpolate(arpTime, arpPos);
-   NEWMAT::ColumnVector arpVel(3);
-   theArpVelInterp->interpolate(arpTime, arpVel);
-
-   // Convert ephemeris to ECF:
-   NEWMAT::Matrix xform;
-   eciToEcfXform(arpTime, xform);
-   ossimEcefPoint ecfArpPos  (xform * arpPos);
-   ossimEcefVector ecfArpVel (xform * arpVel);
-
-   // Need to correct the velocity vector by the earth rotational velocity:
-   ossimEcefVector earthVel(-ecfArpPos.y()*EARTH_ANGULAR_VELOCITY,
-                             ecfArpPos.x()*EARTH_ANGULAR_VELOCITY,
-                             0.0);
-   ecfArpVel = ecfArpVel - earthVel;
-
-   // Establish LSR space for intrack-crosstrack-radial at vehicle:
-   ossimEcefVector intrackDir (ecfArpVel);
-   ossimEcefVector crtrackDir (ecfArpPos.data().cross(intrackDir.data())); 
-   theVehicleSpace = ossimLsrSpace (ecfArpPos, intrackDir, crtrackDir, 0);
-
-   if (traceDebug())
-   {
-      CLOG << "DEBUG -- "
-           << "\n\t theVehicleSpace: " << theVehicleSpace << endl;
-   }
-
-   if (traceDebug())  CLOG << "returning..." << endl;
-}
-   
-
-//******************************************************************************
-//  For scan-mode imagery, this method interpolates the lat/lon given the image pixel.
-//******************************************************************************
-void ossimRS1SarModel::interpolatedScanORP(const ossimDpt& orp, ossimEcefPoint& orp_ecf) const
-{
-   static const char MODULE[] = "ossimRS1SarModel::interpolatedScanORP(gDblPoint)";
-   if (traceDebug())  CLOG << "entering..." << endl;
-
-   ossimGpt gpt;
-   gpt.lat = theLatGrid(orp);
-   gpt.lon = theLonGrid(orp);
-
-   // Convert to ECF:
-   orp_ecf = ossimEcefPoint(gpt);
-   
-   if (traceDebug())  CLOG << "returning..." << endl;
-}
-
-
-//******************************************************************************
-// PRIVATE METHOD: ossimRS1SarModel::establishOrpGrid()
-//
-//  This method establishes a grid of lat-lon across the image for interpolating
-//  the geographic point on the ellipsoid given a pixel value. This is used for
-//  scan-mode imagery for obtaining a local ORP.
-//
-//******************************************************************************
-void ossimRS1SarModel::establishOrpGrid()
-{
-   static const char MODULE[] = "ossimRS1SarModel::establishOrpGrid()";
-   if (traceDebug())  CLOG << "entering..." << endl;
-   
-   if (traceDebug())
-   {
-      CLOG << "DEBUG -- " << endl;
-   }
-
-   static const int      NUM_GRID_POINTS_U  = 11;
-
-   desc_rec        descRec;
-   pdr_prefix_rec  prefix;
-   int             sizeOfDescRec = sizeof(descRec);
-   int             sizeOfPrefRec = sizeof(prefix);
-   int             headerSize    = sizeOfDescRec + sizeOfPrefRec;
-   char            buf[] = "123456";
-   ossimDpt gridSize ((double) NUM_GRID_POINTS_U, 3.0);
-   ossimDpt cellSize (theImageSize.line/gridSize.u, theImageSize.samp/gridSize.v);
-
-   // Because we are doing integer arithmetic, it will be necessary to
-   // consider the last grid cells as being of a slightly different size:
-   //theLastGridCellSize.line = theImageSize.line - 1.0 -
-   //                           (theGridSize.u-2.0)*theGridCellSize.u;
-   //theLastGridCellSize.samp = theImageSize.samp - 1.0 -
-   //                           (theGridSize.v-2.0)*theGridCellSize.v;
-   
-   // Open the image data file given the image directory name and seek to first
-   // SAR data record:
-   FILE* fptr = fopen(theCeosData->imageFile().chars(), "r");
-   if (!fptr)
-   {
-      CLOG << "ERROR: Could not open data file <" << theCeosData->imageFile()
-           << ">" << endl;
-      setErrorStatus();
-      return;
-   }
-   fseek(fptr, theCeosData->imopDescRec()->desc.length, SEEK_SET);
-
-   // Declare some constants and variables used in loop:
-   int last_line    = (int) theImageSize.line - 1;
-   int delta_line   = (int) cellSize.u;
-   int line_number  = 0;
-
-   // Allocate memory for coarse grid:
-   theLatGrid.initialize(gridSize, ossimDpt(0,0), ossimDpt(1,1));
-   theLonGrid.initialize(gridSize, ossimDpt(0,0), ossimDpt(1,1));
-
-   // Compute the number of SAR data bytes to skip to reach prefix of next
-   // record of interest:
-   strncpy(buf, theCeosData->imopDescRec()->l_dataset, 6);
-   int record_size = atoi(buf);
-   int test_line = (int) gridSize.u - 2;
-   
-   // Loop over each imaging line:
-   for (int u=0; u<(int)gridSize.u; u++)
-   {
-      if (traceDebug())
-      {
-         clog << "\t Processing grid line number " << u << endl;
-      }
-
-      // Read the image line prefix info:
-      fread(&descRec, sizeOfDescRec, 1, fptr);
-      fread(&prefix,  sizeOfPrefRec,  1, fptr);
-
-      // Verify correct line number being read:
-      if ((prefix.line_num-1) != line_number)
-      {
-         CLOG << "\n\tERROR: Synchronization error reading image file. "
-              << "Expected line number " << line_number+1
-              << " but read line number " << prefix.line_num << "." << endl;
-         setErrorStatus();
-         return;
-      }
-      
-      // Latch the imaging time for the first line collected:
-      if (u == 0)
-      {
-         theFirstLineDay  = prefix.acq_date.acq_day;
-         theFirstLineTime = (double) prefix.acq_date.acq_msec/1000.0;
-      }
-      
-      // Read the ground points for this line:
-      theLatGrid.setNode(u, 0, (double) prefix.lat_first /1.0e6);
-      theLatGrid.setNode(u, 1, (double) prefix.lat_mid   /1.0e6);
-      theLatGrid.setNode(u, 2, (double) prefix.lat_last  /1.0e6);
-      theLonGrid.setNode(u, 0, (double) prefix.long_first/1.0e6);
-      theLonGrid.setNode(u, 1, (double) prefix.long_mid  /1.0e6);
-      theLonGrid.setNode(u, 2, (double) prefix.long_last /1.0e6);
-      
-      // Update the line number for next record, insuring we don't go passed
-      // the last line:
-      if (u == test_line)
-      {
-         delta_line  = last_line - line_number;
-         line_number = last_line;
-      }
-      else
-      {
-         line_number += delta_line;
-      }
-
-      //***
-      // Advance to read the next prefix record of interest:
-      //***
-      fseek(fptr, (delta_line)*record_size-headerSize, SEEK_CUR);
-   }
-
-   // Compute time interval between each line, handle possible day rollover:
-   double lastLineTime = (double) prefix.acq_date.acq_msec/1000.0;
-   if ((lastLineTime-theFirstLineTime) > (SEC_PER_DAY/2.0))
-   {
-      lastLineTime -= SEC_PER_DAY;
-   }
-   else if ((theFirstLineTime-lastLineTime) > (SEC_PER_DAY/2.0))
-   {
-      lastLineTime += SEC_PER_DAY;
-   }
-   theTimePerLine = (lastLineTime - theFirstLineTime)/line_number;
-
-   if (traceDebug())
-   {
-      clog << "\n\t line_number (last)   = " << line_number
-           << "\n\t last_line (in image) = " << last_line
-           << "\n\t theFirstLineTime     = " << theFirstLineTime
-           << "\n\t lastLineTime         = " << lastLineTime
-           << "\n\t theTimePerLine       = " << theTimePerLine
-           << endl;
-   }
-   
-   if (traceDebug())  CLOG << "returning..." << endl;
-}
-
-//******************************************************************************
-// PRIVATE METHOD: deallocateMemory()
-//  
-//  This method permits the partial destruction of the object so that it may
-//  be reconstructed without invoking the destructor.
-//  
-//******************************************************************************
-void ossimRS1SarModel::deallocateMemory()
-{
-   static const char MODULE[] = "ossimRS1SarModel::deallocateMemory()";
-   if (traceDebug())  CLOG << "entering..." << endl;
-
-   theArpPosInterp = 0;
-   theArpVelInterp = 0;
-   theLocalOrpInterp = 0;
-   theCeosData        = 0;
-   theLatGrid.clear();
-   theLonGrid.clear();
-      
-   if (traceDebug())  CLOG << "returning..." << endl;
-}
-
-
diff --git a/src/ossim/projection/ossimRpcModel.cpp b/src/ossim/projection/ossimRpcModel.cpp
deleted file mode 100644
index 08fd46b..0000000
--- a/src/ossim/projection/ossimRpcModel.cpp
+++ /dev/null
@@ -1,1391 +0,0 @@
-//*****************************************************************************
-// FILE: ossimRpcModel.cpp
-//
-// License:  See top level LICENSE.txt file.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION: Contains implementation of class ossimRpcModel.
-//   This is a replacement model utilizing the Rational Polynomial Coefficients
-//   (RPC), a.k.a. Rapid Positioning Capability, and Universal Sensor Model
-//   (USM).
-//
-// LIMITATIONS: Does not support parameter adjustment (YET)
-//
-//*****************************************************************************
-//  $Id: ossimRpcModel.cpp 22283 2013-06-10 18:41:54Z dburken $
-
-#include <ossim/projection/ossimRpcModel.h>
-#include <ossim/elevation/ossimElevManager.h>
-
-RTTI_DEF1(ossimRpcModel, "ossimRpcModel", ossimSensorModel);
-
-#include <ossim/elevation/ossimHgtRef.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimEllipsoid.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimNotify.h>
-#include <iostream>
-#include <algorithm>
-#include <iomanip>
-#include <sstream>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-
-//***
-// Define Trace flags for use within this file:
-//***
-#include <ossim/base/ossimTrace.h>
-static ossimTrace traceExec  ("ossimRpcModel:exec");
-static ossimTrace traceDebug ("ossimRpcModel:debug");
-
-static const int    MODEL_VERSION_NUMBER  = 1;
-static const int    NUM_COEFFS        = 20;
-static const char*  MODEL_TYPE        = "ossimRpcModel";
-static const char*  POLY_TYPE_KW      = "polynomial_format";
-static const char*  LINE_SCALE_KW     = "line_scale";
-static const char*  SAMP_SCALE_KW     = "samp_scale";
-static const char*  LAT_SCALE_KW      = "lat_scale";
-static const char*  LON_SCALE_KW      = "long_scale";
-static const char*  HGT_SCALE_KW      = "height_scale";
-static const char*  LINE_OFFSET_KW    = "line_off";
-static const char*  SAMP_OFFSET_KW    = "samp_off";
-static const char*  LAT_OFFSET_KW     = "lat_off";
-static const char*  LON_OFFSET_KW     = "long_off";
-static const char*  HGT_OFFSET_KW     = "height_off";
-
-static const char*  BIAS_ERROR_KW     = "bias_error";
-static const char*  RAND_ERROR_KW     = "rand_error";
-
-static const char*  LINE_NUM_COEF_KW  = "line_num_coeff_";
-static const char*  LINE_DEN_COEF_KW  = "line_den_coeff_";
-static const char*  SAMP_NUM_COEF_KW  = "samp_num_coeff_";
-static const char*  SAMP_DEN_COEF_KW  = "samp_den_coeff_";
-
-static const ossimString PARAM_NAMES[] ={"intrack_offset",
-                                        "crtrack_offset",
-                                        "intrack_scale",
-                                        "crtrack_scale",
-                                        "map_rotation",
-                                        "yaw_offset"};
-static const ossimString PARAM_UNITS[] ={"pixel",
-                                        "pixel",
-                                        "scale",
-                                        "scale",
-                                        "degrees",
-                                        "degrees"};
-      
-//*****************************************************************************
-//  DEFAULT CONSTRUCTOR: ossimRpcModel()
-//  
-//*****************************************************************************
-ossimRpcModel::ossimRpcModel()
-   :  ossimSensorModel(),
-      thePolyType     (A),
-      theLineScale    (0.0),
-      theSampScale    (0.0),
-      theLatScale     (0.0),
-      theLonScale     (0.0),
-      theHgtScale     (0.0),
-      theLineOffset   (0.0),
-      theSampOffset   (0.0),
-      theLatOffset    (0.0),
-      theLonOffset    (0.0),
-      theHgtOffset    (0.0),
-      theIntrackOffset(0.0),
-      theCrtrackOffset(0.0),
-      theIntrackScale (0.0),
-      theCrtrackScale (0.0),
-      theCosMapRot    (0.0),
-      theSinMapRot    (0.0),
-      theBiasError    (0.0),
-      theRandError    (0.0)
-
-{
-   initAdjustableParameters();
-}
-
-//*****************************************************************************
-//  COPY CONSTRUCTOR: ossimRpcModel(ossimRpcModel)
-//  
-//*****************************************************************************
-ossimRpcModel::ossimRpcModel(const ossimRpcModel& model)
-   :
-      ossimSensorModel(model),
-      thePolyType     (model.thePolyType),
-      theLineScale    (model.theLineScale),
-      theSampScale    (model.theSampScale),
-      theLatScale     (model.theLatScale),
-      theLonScale     (model.theLonScale),
-      theHgtScale     (model.theHgtScale),
-      theLineOffset   (model.theLineOffset),
-      theSampOffset   (model.theSampOffset),
-      theLatOffset    (model.theLatOffset),
-      theLonOffset    (model.theLonOffset),
-      theHgtOffset    (model.theHgtOffset),
-      theIntrackOffset(model.theIntrackOffset),
-      theCrtrackOffset(model.theCrtrackOffset),
-      theIntrackScale(model.theIntrackScale),
-      theCrtrackScale(model.theCrtrackScale),
-      theCosMapRot    (model.theCosMapRot),
-      theSinMapRot    (model.theSinMapRot),
-      theBiasError    (model.theBiasError),
-      theRandError    (model.theRandError)
-{
-   for (int i=0; i<20; ++i  )
-   {
-      theLineNumCoef[i] = model.theLineNumCoef[i];
-      theLineDenCoef[i] = model.theLineDenCoef[i];
-      theSampNumCoef[i] = model.theSampNumCoef[i];
-      theSampDenCoef[i] = model.theSampDenCoef[i];
-   }
-}
-
-//*****************************************************************************
-//  DESTRUCTOR: ~ossimRpcModel()
-//  
-//*****************************************************************************
-ossimRpcModel::~ossimRpcModel()
-{
-}
-
-void ossimRpcModel::setAttributes(ossim_float64 sampleOffset,
-                                  ossim_float64 lineOffset,
-                                  ossim_float64 sampleScale,
-                                  ossim_float64 lineScale,
-                                  ossim_float64 latOffset,
-                                  ossim_float64 lonOffset,
-                                  ossim_float64 heightOffset,
-                                  ossim_float64 latScale,
-                                  ossim_float64 lonScale,
-                                  ossim_float64 heightScale,
-                                  const std::vector<double>& xNumeratorCoeffs,
-                                  const std::vector<double>& xDenominatorCoeffs,
-                                  const std::vector<double>& yNumeratorCoeffs,
-                                  const std::vector<double>& yDenominatorCoeffs,
-                                  PolynomialType polyType,
-                                  bool computeGsdFlag)
-{
-   thePolyType = polyType;
-   
-   theLineScale  = lineScale;
-   theSampScale  = sampleScale;
-   theLatScale   = latScale;
-   theLonScale   = lonScale;
-   theHgtScale   = heightScale;
-   theLineOffset = lineOffset;
-   theSampOffset = sampleOffset;
-   theLatOffset  = latOffset;
-   theLonOffset  = lonOffset;
-   theHgtOffset  = heightOffset;
-
-   if(xNumeratorCoeffs.size() == 20)
-   {
-      std::copy(xNumeratorCoeffs.begin(),
-                xNumeratorCoeffs.end(),
-                theSampNumCoef);
-   }
-   if(xDenominatorCoeffs.size() == 20)
-   {
-      std::copy(xDenominatorCoeffs.begin(),
-                xDenominatorCoeffs.end(),
-                theSampDenCoef);
-   }
-   if(yNumeratorCoeffs.size() == 20)
-   {
-      std::copy(yNumeratorCoeffs.begin(),
-                yNumeratorCoeffs.end(),
-                theLineNumCoef);
-   }
-   if(yDenominatorCoeffs.size() == 20)
-   {
-      std::copy(yDenominatorCoeffs.begin(),
-                yDenominatorCoeffs.end(),
-                theLineDenCoef);
-   }
-
-   if(computeGsdFlag)
-   {
-      try
-      {
-         // This will set theGSD and theMeanGSD. Method throws ossimException.
-         computeGsd();
-      }
-      catch (const ossimException& e)
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "ossimRpcModel::setAttributes Caught Exception:\n"
-               << e.what() << std::endl;
-         }
-      }
-   }
-}
-
-void ossimRpcModel::setMetersPerPixel(const ossimDpt& metersPerPixel)
-{
-   theGSD = metersPerPixel;
-   theMeanGSD = (theGSD.x+theGSD.y)*.5;
-}
-
-void ossimRpcModel::setPositionError(const ossim_float64& biasError,
-                                     const ossim_float64& randomError,
-                                     bool initNominalPostionErrorFlag)
-{
-   theBiasError = biasError;
-   theRandError = randomError;
-   if (initNominalPostionErrorFlag)
-   {
-      theNominalPosError = sqrt(theBiasError*theBiasError +
-                                theRandError*theRandError); // meters
-   }
-}
-
-//*****************************************************************************
-//  METHOD: ossimRpcModel::worldToLineSample()
-//  
-//  Overrides base class implementation. Directly computes line-sample from
-//  the polynomials.
-//*****************************************************************************
-void ossimRpcModel::worldToLineSample(const ossimGpt& ground_point,
-                                      ossimDpt&       img_pt) const
-{
-   // if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::worldToLineSample(): entering..." << std::endl;
-
-   if(ground_point.isLatNan() || ground_point.isLonNan() )
-   {
-      img_pt.makeNan();
-      return;
-   }
-
-   //***
-   // First check if the world point is inside bounding rectangle:
-   //***
-//   ossimDpt wdp (ground_point);
-//    if (!(theBoundGndPolygon.pointWithin(wdp)))
-//    {
-//      img_pt = extrapolate(ground_point);
-//       if (traceExec())  CLOG << "returning..." << endl;
-//       return;
-//    }
-         
-   //***
-   // Normalize the lat, lon, hgt:
-   //***
-   double nlat = (ground_point.lat - theLatOffset) / theLatScale;
-   double nlon = (ground_point.lon - theLonOffset) / theLonScale;
-   double nhgt;
-
-   if( ground_point.isHgtNan() )
-   {
-      // nhgt = (theHgtScale - theHgtOffset) / theHgtScale;
-      nhgt = ( - theHgtOffset) / theHgtScale;
-   }
-   else
-   {
-      nhgt = (ground_point.hgt - theHgtOffset) / theHgtScale;
-   }
-
-   //***
-   // Compute the adjusted, normalized line (U) and sample (V):
-   //***
-   double Pu = polynomial(nlat, nlon, nhgt, theLineNumCoef);
-   double Qu = polynomial(nlat, nlon, nhgt, theLineDenCoef);
-   double Pv = polynomial(nlat, nlon, nhgt, theSampNumCoef);
-   double Qv = polynomial(nlat, nlon, nhgt, theSampDenCoef);
-   double U_rot  = Pu / Qu;
-   double V_rot  = Pv / Qv;
-
-   //***
-   // U, V are normalized quantities. Need now to establish the image file
-   // line and sample. First, back out the adjustable parameter effects
-   // starting with rotation:
-   //***
-   double U = U_rot*theCosMapRot + V_rot*theSinMapRot;
-   double V = V_rot*theCosMapRot - U_rot*theSinMapRot;
-
-   //***
-   // Now back out skew, scale, and offset adjustments:
-   //***
-   img_pt.line = U*(theLineScale+theIntrackScale) + theLineOffset + theIntrackOffset;
-   
-   img_pt.samp = V*(theSampScale+theCrtrackScale) + theSampOffset + theCrtrackOffset;
-
-   // if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::worldToLineSample(): returning..." << std::endl;
-   return;
-}
-
-//*****************************************************************************
-//  METHOD: ossimRpcModel::lineSampleToWorld()
-//  
-//  Overrides base class implementation. Performs DEM intersection.
-//*****************************************************************************
-void  ossimRpcModel::lineSampleToWorld(const ossimDpt& imagePoint,
-                                       ossimGpt&       worldPoint) const
-{
-
-//---
-// Under debate... (drb 20130610)
-// this seems to be more accurate for the round trip
-//---   
-#if 0
-   if(!imagePoint.hasNans())
-   {
-      
-      lineSampleHeightToWorld(imagePoint,
-                              worldPoint.height(),
-                              worldPoint);
-   }
-   else
-   {
-      worldPoint.makeNan();
-   }
-#else
-   if(!imagePoint.hasNans())
-   {
-      ossimEcefRay ray;
-      imagingRay(imagePoint, ray);
-      ossimElevManager::instance()->intersectRay(ray, worldPoint);
-   }
-   else
-   {
-      worldPoint.makeNan();
-   }
-#endif
-}
-
-//*****************************************************************************
-//  METHOD: ossimRpcModel::imagingRay()
-//  
-//  Constructs an RPC ray by intersecting 2 ellipsoid heights above and
-//  below the RPC height offset, and then forming a vector between the two.
-//
-//*****************************************************************************
-void ossimRpcModel::imagingRay(const ossimDpt& imagePoint,
-                               ossimEcefRay&   imageRay) const
-{
-   //---
-   // For "from point", "to point" we want the image ray to be from above the
-   // ellipsoid down to Earth.
-   // 
-   // It appears the ray "from point" must be above the ellipsiod for the
-   // ossimElevSource::intersectRay method; ultimately, the
-   // ossimEllipsoid::nearestIntersection method, else it goes off in the
-   // weeds...
-   //---
-
-// this one is messed up so keep as #if 0 untill tested more
-  #if 0 
-
-  ossimGpt gpt;
-
- lineSampleHeightToWorld(imagePoint, theHgtOffset, gpt);
-
- //lineSampleHeightToWorld(imagePoint, ossim::nan(), gpt);
-
-  ossimEcefVector v;
-  if(gpt.datum())
-  {
-    if(gpt.datum()->ellipsoid())
-    {
-      gpt.datum()->ellipsoid()->gradient(ossimEcefPoint(gpt), v);
-
-      v = v.unitVector();
-
-      ossimEcefPoint intECFto(gpt);
-      ossimEcefPoint intECFfrom = (intECFto + v*100000);
-
-      ossimEcefRay ray(intECFfrom, intECFto);
-
-      imageRay = ray;
-    }
-  }
-#else
-   double vectorLength = theHgtScale ? (theHgtScale * 2.0) : 1000.0;
-
-   ossimGpt gpt;
-   
-   // "from" point
-   double intHgt = theHgtOffset + vectorLength;
-   lineSampleHeightToWorld(imagePoint, intHgt, gpt);
-   ossimEcefPoint intECFfrom(gpt);
-   
-   // "to" point
-   lineSampleHeightToWorld(imagePoint, theHgtOffset, gpt);
-   ossimEcefPoint intECFto(gpt);
-   
-   // Construct ray
-   ossimEcefRay ray(intECFfrom, intECFto);
-   
-   imageRay = ray;
-
-   #endif
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimRpcModel::lineSampleHeightToWorld()
-//  
-//  Performs reverse projection of image line/sample to ground point.
-//  The imaging ray is intersected with a level plane at height = elev.
-//
-//  NOTE: U = line, V = sample -- this differs from the convention.
-//
-//*****************************************************************************
-void ossimRpcModel::lineSampleHeightToWorld(const ossimDpt& image_point,
-                                            const double&   ellHeight,
-                                            ossimGpt&       gpt) const
-{
-   // if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::lineSampleHeightToWorld: entering..." << std::endl;
-
-   //***
-   // Extrapolate if point is outside image:
-   //***
-//    if (!insideImage(image_point))
-//    {
-//       gpt = extrapolate(image_point, ellHeight);
-//       if (traceExec())  CLOG << "returning..." << endl;
-//       return;
-//    }
-
-   //***
-   // Constants for convergence tests:
-   //***
-   static const int    MAX_NUM_ITERATIONS  = 10;
-   static const double CONVERGENCE_EPSILON = 0.1;  // pixels
-   
-   //***
-   // The image point must be adjusted by the adjustable parameters as well
-   // as the scale and offsets given as part of the RPC param normalization.
-   //
-   //      NOTE: U = line, V = sample
-   //***
-   double U    = (image_point.y-theLineOffset - theIntrackOffset) / (theLineScale+theIntrackScale);
-   double V    = (image_point.x-theSampOffset - theCrtrackOffset) / (theSampScale+theCrtrackScale);
-
-   //***
-   // Rotate the normalized U, V by the map rotation error (adjustable param):
-   //***
-   double U_rot = theCosMapRot*U - theSinMapRot*V;
-   double V_rot = theSinMapRot*U + theCosMapRot*V;
-   U = U_rot; V = V_rot;
-
-
-   // now apply adjust intrack and cross track
-   //***
-   // Initialize quantities to be used in the iteration for ground point:
-   //***
-   double nlat      = 0.0;  // normalized latitude
-   double nlon      = 0.0;  // normalized longitude
-   
-   double nhgt;
-
-   if(ossim::isnan(ellHeight))
-   {
-     nhgt = (theHgtScale - theHgtOffset) / theHgtScale;  // norm height
-   }
-   else
-   {
-      nhgt = (ellHeight - theHgtOffset) / theHgtScale;  // norm height
-   }
-   
-   double epsilonU = CONVERGENCE_EPSILON/(theLineScale+theIntrackScale);
-   double epsilonV = CONVERGENCE_EPSILON/(theSampScale+theCrtrackScale);
-   int    iteration = 0;
-
-   //***
-   // Declare variables only once outside the loop. These include:
-   // * polynomials (numerators Pu, Pv, and denominators Qu, Qv),
-   // * partial derivatives of polynomials wrt X, Y,
-   // * computed normalized image point: Uc, Vc,
-   // * residuals of normalized image point: deltaU, deltaV,
-   // * partial derivatives of Uc and Vc wrt X, Y,
-   // * corrections to normalized lat, lon: deltaLat, deltaLon.
-   //***
-   double Pu, Qu, Pv, Qv;
-   double dPu_dLat, dQu_dLat, dPv_dLat, dQv_dLat;
-   double dPu_dLon, dQu_dLon, dPv_dLon, dQv_dLon;
-   double Uc, Vc;
-   double deltaU, deltaV;
-   double dU_dLat, dU_dLon, dV_dLat, dV_dLon, W;
-   double deltaLat, deltaLon;
-   
-   //***
-   // Now iterate until the computed Uc, Vc is within epsilon of the desired
-   // image point U, V:
-   //***
-   do
-   {
-      //***
-      // Calculate the normalized line and sample Uc, Vc as ratio of
-      // polynomials Pu, Qu and Pv, Qv:
-      //***
-      Pu = polynomial(nlat, nlon, nhgt, theLineNumCoef);
-      Qu = polynomial(nlat, nlon, nhgt, theLineDenCoef);
-      Pv = polynomial(nlat, nlon, nhgt, theSampNumCoef);
-      Qv = polynomial(nlat, nlon, nhgt, theSampDenCoef);
-      Uc = Pu/Qu;
-      Vc = Pv/Qv;
-      
-      //***
-      // Compute residuals between desired and computed line, sample:
-      //***
-      deltaU = U - Uc;
-      deltaV = V - Vc;
-      
-      //***
-      // Check for convergence and skip re-linearization if converged:
-      //***
-      if ((fabs(deltaU) > epsilonU) || (fabs(deltaV) > epsilonV))
-      {
-         //***
-         // Analytically compute the partials of each polynomial wrt lat, lon:
-         //***
-         dPu_dLat = dPoly_dLat(nlat, nlon, nhgt, theLineNumCoef);
-         dQu_dLat = dPoly_dLat(nlat, nlon, nhgt, theLineDenCoef);
-         dPv_dLat = dPoly_dLat(nlat, nlon, nhgt, theSampNumCoef);
-         dQv_dLat = dPoly_dLat(nlat, nlon, nhgt, theSampDenCoef);
-         dPu_dLon = dPoly_dLon(nlat, nlon, nhgt, theLineNumCoef);
-         dQu_dLon = dPoly_dLon(nlat, nlon, nhgt, theLineDenCoef);
-         dPv_dLon = dPoly_dLon(nlat, nlon, nhgt, theSampNumCoef);
-         dQv_dLon = dPoly_dLon(nlat, nlon, nhgt, theSampDenCoef);
-         
-         //***
-         // Analytically compute partials of quotients U and V wrt lat, lon: 
-         //***
-         dU_dLat = (Qu*dPu_dLat - Pu*dQu_dLat)/(Qu*Qu);
-         dU_dLon = (Qu*dPu_dLon - Pu*dQu_dLon)/(Qu*Qu);
-         dV_dLat = (Qv*dPv_dLat - Pv*dQv_dLat)/(Qv*Qv);
-         dV_dLon = (Qv*dPv_dLon - Pv*dQv_dLon)/(Qv*Qv);
-         
-         W = dU_dLon*dV_dLat - dU_dLat*dV_dLon;
-         
-         //***
-         // Now compute the corrections to normalized lat, lon:
-         //***
-         deltaLat = (dU_dLon*deltaV - dV_dLon*deltaU) / W;
-         deltaLon = (dV_dLat*deltaU - dU_dLat*deltaV) / W;
-         nlat += deltaLat;
-         nlon += deltaLon;
-      }
-      
-      //double h = ossimElevManager::instance()->getHeightAboveEllipsoid(ossimGpt(nlat, nlon));
-     // if(!ossim::isnan(h))
-     // {
-     //   nhgt = h;
-     // }
-
-      iteration++;
-      
-   } while (((fabs(deltaU)>epsilonU) || (fabs(deltaV)>epsilonV))
-            && (iteration < MAX_NUM_ITERATIONS));
-      
-   //***
-   // Test for exceeding allowed number of iterations. Flag error if so:
-   //***
-   if (iteration == MAX_NUM_ITERATIONS)
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimRpcModel::lineSampleHeightToWorld: \nMax number of iterations reached in ground point "
-                                         << "solution. Results are inaccurate." << endl;
-   }
-
-   //***
-   // Now un-normalize the ground point lat, lon and establish return quantity:
-   //***
-   gpt.lat = nlat*theLatScale + theLatOffset;
-   gpt.lon = nlon*theLonScale + theLonOffset;
-   gpt.hgt = ellHeight;
-   
-}
-
-//*****************************************************************************
-// PRIVATE METHOD: ossimRpcModel::polynomial
-//  
-//  Computes polynomial.
-//  
-//*****************************************************************************
-double ossimRpcModel::polynomial(const double& P, const double& L,
-                                 const double& H, const double* c) const
-{
-   double r;
-
-   if (thePolyType == A)
-   {
-      r = c[ 0]       + c[ 1]*L     + c[ 2]*P     + c[ 3]*H     +
-          c[ 4]*L*P   + c[ 5]*L*H   + c[ 6]*P*H   + c[ 7]*L*P*H +
-          c[ 8]*L*L   + c[ 9]*P*P   + c[10]*H*H   + c[11]*L*L*L +
-          c[12]*L*L*P + c[13]*L*L*H + c[14]*L*P*P + c[15]*P*P*P +
-          c[16]*P*P*H + c[17]*L*H*H + c[18]*P*H*H + c[19]*H*H*H;
-   }
-   else
-   {
-      r = c[ 0]       + c[ 1]*L     + c[ 2]*P     + c[ 3]*H     +
-          c[ 4]*L*P   + c[ 5]*L*H   + c[ 6]*P*H   + c[ 7]*L*L   +
-          c[ 8]*P*P   + c[ 9]*H*H   + c[10]*L*P*H + c[11]*L*L*L +
-          c[12]*L*P*P + c[13]*L*H*H + c[14]*L*L*P + c[15]*P*P*P +
-          c[16]*P*H*H + c[17]*L*L*H + c[18]*P*P*H + c[19]*H*H*H;
-   }
-   
-   return r;
-}
-
-//*****************************************************************************
-// PRIVATE METHOD: ossimRpcModel::dPoly_dLat
-//  
-//  Computes derivative of polynomial wrt normalized Latitude P.
-//  
-//*****************************************************************************
-double ossimRpcModel::dPoly_dLat(const double& P, const double& L,
-                                 const double& H, const double* c) const
-{
-   double dr;
-
-   if (thePolyType == A)
-   {
-      dr = c[2] + c[4]*L + c[6]*H + c[7]*L*H + 2*c[9]*P + c[12]*L*L +
-           2*c[14]*L*P + 3*c[15]*P*P +2*c[16]*P*H + c[18]*H*H;
-   }
-   else
-   {
-      dr = c[2] + c[4]*L + c[6]*H + 2*c[8]*P + c[10]*L*H + 2*c[12]*L*P +
-           c[14]*L*L + 3*c[15]*P*P + c[16]*H*H + 2*c[18]*P*H;
-   }
-   
-   return dr;
-}
-
-//*****************************************************************************
-// PRIVATE METHOD: ossimRpcModel::dPoly_dLon
-//  
-//  Computes derivative of polynomial wrt normalized Longitude L.
-//  
-//*****************************************************************************
-double ossimRpcModel::dPoly_dLon(const double& P, const double& L,
-                                 const double& H, const double* c) const
-{
-   double dr;
-
-   if (thePolyType == A)
-   {
-      dr = c[1] + c[4]*P + c[5]*H + c[7]*P*H + 2*c[8]*L + 3*c[11]*L*L +
-           2*c[12]*L*P + 2*c[13]*L*H + c[14]*P*P + c[17]*H*H;
-   }
-   else
-   {
-      dr = c[1] + c[4]*P + c[5]*H + 2*c[7]*L + c[10]*P*H + 3*c[11]*L*L +
-           c[12]*P*P + c[13]*H*H + 2*c[14]*P*L + 2*c[17]*L*H;
-   }
-   return dr;
-}
-
-//*****************************************************************************
-// PRIVATE METHOD: ossimRpcModel::dPoly_dHgt
-//  
-//  Computes derivative of polynomial wrt normalized Height H.
-//  
-//*****************************************************************************
-double ossimRpcModel::dPoly_dHgt(const double& P, const double& L,
-                                 const double& H, const double* c) const
-{
-   double dr;
-
-   if (thePolyType == A)
-   {
-      dr = c[3] + c[5]*L + c[6]*P + c[7]*L*P + 2*c[10]*H + c[13]*L*L +
-           c[16]*P*P + 2*c[17]*L*H + 2*c[18]*P*H + 3*c[19]*H*H;
-   }
-   else
-   {
-      dr = c[3] + c[5]*L + c[6]*P + 2*c[9]*H + c[10]*L*P + 2*c[13]*L*H +
-           2*c[16]*P*H + c[17]*L*L + c[18]*P*P + 3*c[19]*H*H;
-   }
-   return dr;
-}
-
-void ossimRpcModel::updateModel()
-{
-   theIntrackOffset    = computeParameterOffset(INTRACK_OFFSET);
-   theCrtrackOffset    = computeParameterOffset(CRTRACK_OFFSET);
-   theIntrackScale     = computeParameterOffset(INTRACK_SCALE);
-   theCrtrackScale     = computeParameterOffset(CRTRACK_SCALE);
-   double mapRotation  = computeParameterOffset(MAP_ROTATION);
-   theCosMapRot        = ossim::cosd(mapRotation);
-   theSinMapRot        = ossim::sind(mapRotation);
-}
-
-void ossimRpcModel::initAdjustableParameters()
-{
-   resizeAdjustableParameterArray(NUM_ADJUSTABLE_PARAMS);
-   int numParams = getNumberOfAdjustableParameters();
-   for (int i=0; i<numParams; i++)
-   {
-      setAdjustableParameter(i, 0.0);
-      setParameterDescription(i, PARAM_NAMES[i]);
-      setParameterUnit(i,PARAM_UNITS[i]);
-   }
-   setParameterSigma(INTRACK_OFFSET, 50.0);
-   setParameterSigma(CRTRACK_OFFSET, 50.0);
-   setParameterSigma(INTRACK_SCALE, 50.0);  
-   setParameterSigma(CRTRACK_SCALE, 50.0);  
-   setParameterSigma(MAP_ROTATION, 0.1);
-//   setParameterSigma(YAW_OFFSET, 0.001);
-}
-
-ossimObject* ossimRpcModel::dup() const
-{
-   return new ossimRpcModel(*this);
-}
-
-//*****************************************************************************
-//  METHOD: ossimRpcModel::print()
-//  
-//  Formatted dump of data members.
-//  
-//*****************************************************************************
-std::ostream& ossimRpcModel::print(std::ostream& out) const
-{
-   out << "\nDump of ossimRpcModel object at " << std::hex << this << std::dec << ":\n"
-       << POLY_TYPE_KW   << ": " << thePolyType   << "\n"
-       << LINE_SCALE_KW  << ": " << theLineScale  << "\n"
-       << SAMP_SCALE_KW  << ": " << theSampScale  << "\n"
-       << LAT_SCALE_KW   << ": " << theLatScale   << "\n"
-       << LON_SCALE_KW   << ": " << theLonScale   << "\n"
-       << HGT_SCALE_KW   << ": " << theHgtScale   << "\n"
-       << LINE_OFFSET_KW << ": " << theLineOffset << "\n"
-       << SAMP_OFFSET_KW << ": " << theSampOffset << "\n"
-       << LAT_OFFSET_KW  << ": " << theLatOffset  << "\n"
-       << LON_OFFSET_KW  << ": " << theLonOffset  << "\n"
-       << HGT_OFFSET_KW  << ": " << theHgtOffset  << "\n"
-       << BIAS_ERROR_KW  << ": " << theBiasError  << "\n"
-       << RAND_ERROR_KW  << ": " << theRandError  << "\n"
-       << std::endl;
-
-   for (int i=0; i<NUM_COEFFS; i++)
-      out<<"  "<<LINE_NUM_COEF_KW<<"["<<i<<"]: "<<theLineNumCoef[i]<<std::endl;
-
-   out << std::endl;
-   for (int i=0; i<NUM_COEFFS; i++)
-      out<<"  "<<LINE_DEN_COEF_KW<<"["<<i<<"]: "<<theLineDenCoef[i]<<std::endl;
-
-   out << std::endl;
-   for (int i=0; i<NUM_COEFFS; i++)
-      out<<"  "<<SAMP_NUM_COEF_KW<<"["<<i<<"]: "<<theSampNumCoef[i]<<std::endl;
-
-   out << std::endl;
-   for (int i=0; i<NUM_COEFFS; i++)
-      out<<"  "<<SAMP_DEN_COEF_KW<<"["<<i<<"]: "<<theSampDenCoef[i]<<std::endl;
-      
-   out << std::endl;
-
-   return ossimSensorModel::print(out);
-}
-
-//*****************************************************************************
-//  METHOD: ossimRpcModel::saveState()
-//  
-//  Saves the model state to the KWL. This KWL also serves as a geometry file.
-//  
-//*****************************************************************************
-bool ossimRpcModel::saveState(ossimKeywordlist& kwl,
-                              const char* prefix) const
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::saveState(): entering..." << std::endl;
-
-   kwl.add(prefix, ossimKeywordNames::TYPE_KW, MODEL_TYPE);
-
-   //***
-   // Hand off to base class for common stuff:
-   //***
-   ossimSensorModel::saveState(kwl, prefix);
-
-   //---
-   // Save off offsets and scales:
-   //---
-   kwl.add(prefix, POLY_TYPE_KW,   ((char)thePolyType));
-   kwl.add(prefix, LINE_SCALE_KW,  theLineScale);
-   kwl.add(prefix, SAMP_SCALE_KW,  theSampScale);
-   kwl.add(prefix, LAT_SCALE_KW,   theLatScale);
-   kwl.add(prefix, LON_SCALE_KW,   theLonScale);
-   kwl.add(prefix, HGT_SCALE_KW,   theHgtScale);
-   kwl.add(prefix, LINE_OFFSET_KW, theLineOffset);
-   kwl.add(prefix, SAMP_OFFSET_KW, theSampOffset);
-   kwl.add(prefix, LAT_OFFSET_KW,  theLatOffset);
-   kwl.add(prefix, LON_OFFSET_KW,  theLonOffset);
-   kwl.add(prefix, HGT_OFFSET_KW,  theHgtOffset);
-   kwl.add(prefix, BIAS_ERROR_KW,  theBiasError);
-   kwl.add(prefix, RAND_ERROR_KW,  theRandError);
-
-   for (int i=0; i<NUM_COEFFS; i++)
-   {
-      ossimString key;
-      std::ostringstream os;
-      os << setw(2) << setfill('0') << right << i;
-      
-      key = LINE_NUM_COEF_KW;
-      key += os.str();
-      kwl.add(prefix, key.c_str(), theLineNumCoef[i],
-              true, 15);
-      
-      key = LINE_DEN_COEF_KW;
-      key += os.str();
-      kwl.add(prefix, key.c_str(), theLineDenCoef[i],
-              true, 15);
-
-      key = SAMP_NUM_COEF_KW;
-      key += os.str();
-      kwl.add(prefix, key.c_str(), theSampNumCoef[i],
-              true, 15);
-
-      key = SAMP_DEN_COEF_KW;
-      key += os.str();
-      kwl.add(prefix, key.c_str(), theSampDenCoef[i],
-              true, 15);
-   }
-      
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::saveState(): returning..." << std::endl;
-   return true;
-}
-
-//*****************************************************************************
-//  METHOD: ossimRpcModel::loadState()
-//  
-//  Restores the model's state from the KWL. This KWL also serves as a
-//  geometry file.
-//  
-//*****************************************************************************
-bool ossimRpcModel::loadState(const ossimKeywordlist& kwl,
-                              const char* prefix) 
-{
-   if (traceExec())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimRpcModel::loadState(): entering..." << std::endl;
-   }
-
-   const char* value;
-   const char* keyword;
-
-   //***
-   // Pass on to the base-class for parsing first:
-   //***
-   bool success = ossimSensorModel::loadState(kwl, prefix);
-   if (!success)
-   {
-      theErrorStatus++;
-
-      if (traceExec())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG ossimRpcModel::loadState(): returning with error..."
-            << std::endl;
-      }
-      return false;
-   }
-      
-   //---
-   // Continue parsing for local members:
-   //---
-   value = kwl.find(prefix, BIAS_ERROR_KW);
-   if (value)
-   {
-      theBiasError = ossimString(value).toDouble();
-   }
-
-   value = kwl.find(prefix, RAND_ERROR_KW);
-   if (value)
-   {
-      theRandError = ossimString(value).toDouble();
-   }
-        
-   keyword = POLY_TYPE_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   thePolyType = (PolynomialType) value[0];
-      
-   keyword = LINE_SCALE_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   theLineScale = atof(value);
-   
-   keyword = SAMP_SCALE_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   theSampScale = atof(value);
-   
-   keyword = LAT_SCALE_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   theLatScale = atof(value);
-   
-   keyword = LON_SCALE_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   theLonScale = atof(value);
-   
-   keyword = HGT_SCALE_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   theHgtScale = atof(value);
-   
-   keyword = LINE_OFFSET_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   theLineOffset = atof(value);
-   
-   keyword = SAMP_OFFSET_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   theSampOffset = atof(value);
-   
-   keyword = LAT_OFFSET_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   theLatOffset = atof(value);
-   
-   keyword = LON_OFFSET_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   theLonOffset = atof(value);
-   
-   keyword = HGT_OFFSET_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   theHgtOffset = atof(value);
-
-   for (int i=0; i<NUM_COEFFS; i++)
-   {
-      ossimString keyword;
-      ostringstream os;
-      os << setw(2) << setfill('0') << right << i;
-
-      keyword = LINE_NUM_COEF_KW;
-      keyword += os.str();
-      value = kwl.find(prefix, keyword.c_str());
-      if (!value)
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-            << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
-            << "<" << keyword << ">. Check the keywordlist for proper syntax."
-            << std::endl;
-         return false;
-      }
-      theLineNumCoef[i] = atof(value);
-
-      keyword = LINE_DEN_COEF_KW;
-      keyword += os.str();
-      value = kwl.find(prefix, keyword.c_str());
-      if (!value)
-      {
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
-                                             << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                             << std::endl;
-         return false;
-      }
-      theLineDenCoef[i] = atof(value);
-   
-      keyword = SAMP_NUM_COEF_KW;
-      keyword += os.str();
-      value = kwl.find(prefix, keyword.c_str());
-      if (!value)
-      {
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
-                                             << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                             << std::endl;
-         return false;
-      }
-      theSampNumCoef[i] = atof(value);
-
-      keyword = SAMP_DEN_COEF_KW;
-      keyword += os.str();
-      value = kwl.find(prefix, keyword.c_str());
-      if (!value)
-      {
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcModel::loadState(): Error encountered parsing the following required keyword: "
-                                             << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                             << std::endl;
-         return false;
-      }
-      theSampDenCoef[i] = atof(value);
-   }
-      
-   //***
-   // Initialize other data members given quantities read in KWL:
-   //***
-   theCosMapRot = 1.0;
-   theSinMapRot = 0.0;
-
-   updateModel();
-   
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::loadState(): returning..." << std::endl;
-   return true;
-}
-
-//*****************************************************************************
-// STATIC METHOD: ossimRpcModel::writeGeomTemplate
-//  
-//  Writes a sample kwl to output stream.
-//  
-//*****************************************************************************
-void ossimRpcModel::writeGeomTemplate(ostream& os)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::writeGeomTemplate(): entering..." << std::endl;
-
-   os <<
-      "//**************************************************************\n"
-      "// Template for RPC model keywordlist\n"
-      "//**************************************************************\n"
-      << ossimKeywordNames::TYPE_KW << ": " << MODEL_TYPE << endl;
-
-   ossimSensorModel::writeGeomTemplate(os);
-   
-   os << "//\n"
-      << "// Derived-class ossimRpcModel Keywords:\n"
-      << "//\n"
-      << POLY_TYPE_KW << ": A|B\n"
-      << "\n"
-      << "// RPC data consists of coefficients and normalization \n"
-      << "// parameters. The RPC keywords used here are compatible with \n"
-      << "// keywords found in Ikonos \"rpc.txt\" files.\n"
-      << "// First are the normalization parameters:\n"
-      << LINE_OFFSET_KW << ": <float>\n"
-      << SAMP_OFFSET_KW << ": <float>\n"
-      << LAT_OFFSET_KW << ": <float>\n"
-      << LON_OFFSET_KW << ": <float>\n"
-      << HGT_OFFSET_KW << ": <float>\n"
-      << LINE_SCALE_KW << ": <float>\n"
-      << SAMP_SCALE_KW << ": <float>\n"
-      << LAT_SCALE_KW << ": <float>\n"
-      << LON_SCALE_KW << ": <float>\n"
-      << HGT_SCALE_KW << ": <float>\n"
-      << BIAS_ERROR_KW << ": <float>\n"
-      << RAND_ERROR_KW << ": <float>\n"
-      << "\n"
-      << "// RPC Coefficients are specified with indexes. Coefficients \n "
-      << "// are specified for the four polynomials: line numerator, line \n"
-      << "// denominator, sample numerator, and sample denominator:" << endl;
-
-   for (int i=1; i<=20; i++)
-      os << LINE_NUM_COEF_KW << setw(2) << setfill('0') << right
-         << i << ": <float>" << endl; 
-   os << endl;
-   for (int i=1; i<=20; i++)
-      os << LINE_DEN_COEF_KW << setw(2) << setfill('0') << right
-         << i << ": <float>" << endl; 
-   os << endl;
-   for (int i=1; i<=20; i++)
-      os << SAMP_NUM_COEF_KW << setw(2) << setfill('0') << right
-         << i << ": <float>" << endl; 
-   os << endl;
-   for (int i=1; i<=20; i++)
-      os << SAMP_DEN_COEF_KW << setw(2) << setfill('0') << right
-         << i << ": <float>" << endl; 
-   os << "\n" <<endl;
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::writeGeomTemplate(): returning..." << std::endl;
-   return;
-}
-
-bool ossimRpcModel::setupOptimizer(const ossimString& init_file)
-{
-   ossimKeywordlist kwl;
-
-   if(kwl.addFile(ossimFilename(init_file)))
-   {
-      return loadState(kwl);
-   }
-   else
-   {
-      ossimRefPtr<ossimProjection> proj = ossimProjectionFactoryRegistry::instance()->createProjection(init_file);
-      if(proj.valid())
-      {
-         kwl.clear();
-         proj->saveState(kwl);
-         
-         return loadState(kwl);
-      }
-   }
-   
-   return false;
-}
-
-//*****************************************************************************
-//  METHOD: ossimSarModel::getForwardDeriv()
-//  
-//  Compute partials of samp/line WRT to ground.
-//  
-//*****************************************************************************
-ossimDpt ossimRpcModel::getForwardDeriv(int derivMode,
-                                        const ossimGpt& pos,
-                                        double h)
-{
-   // If derivMode (parmIdx) >= 0 call base class version
-   // for "adjustable parameters"
-   if (derivMode >= 0)
-   {
-      return ossimSensorModel::getForwardDeriv(derivMode, pos, h);
-   }
-   
-   // Use alternative derivMode definitions
-   else
-   {
-      ossimDpt returnData;
-
-      //******************************************
-      // OBS_INIT mode
-      //    [1] 
-      //    [2] 
-      //  Note: In this mode, pos is used to pass
-      //  in the (s,l) observations.
-      //******************************************
-      if (derivMode==OBS_INIT)
-      {
-         // Image coordinates
-         ossimDpt obs;
-         obs.samp = pos.latd();
-         obs.line = pos.lond();
-         theObs = obs;
-      }
-
-      //******************************************
-      // EVALUATE mode
-      //   [1] evaluate & save partials, residuals
-      //   [2] return residuals
-      //******************************************
-      else if (derivMode==EVALUATE)
-      {
-         //***
-         // Normalize the lat, lon, hgt:
-         //***
-         double nlat = (pos.lat - theLatOffset) / theLatScale;
-         double nlon = (pos.lon - theLonOffset) / theLonScale;
-         double nhgt;
-
-         if( ossim::isnan(pos.hgt) )
-         {
-            nhgt = (theHgtScale - theHgtOffset) / theHgtScale;
-         }
-         else
-         {
-            nhgt = (pos.hgt - theHgtOffset) / theHgtScale;
-         }
-         
-         //***
-         // Compute the normalized line (Un) and sample (Vn):
-         //***
-         double Pu = polynomial(nlat, nlon, nhgt, theLineNumCoef);
-         double Qu = polynomial(nlat, nlon, nhgt, theLineDenCoef);
-         double Pv = polynomial(nlat, nlon, nhgt, theSampNumCoef);
-         double Qv = polynomial(nlat, nlon, nhgt, theSampDenCoef);
-         double Un  = Pu / Qu;
-         double Vn  = Pv / Qv;
-         
-         //***
-         // Compute the actual line (U) and sample (V):
-         //***
-         double U  = Un*theLineScale + theLineOffset;
-         double V  = Vn*theSampScale + theSampOffset;
-
-         //***
-         // Compute the partials of each polynomial wrt lat, lon, hgt
-         //***
-         double dPu_dLat, dQu_dLat, dPv_dLat, dQv_dLat;
-         double dPu_dLon, dQu_dLon, dPv_dLon, dQv_dLon;
-         double dPu_dHgt, dQu_dHgt, dPv_dHgt, dQv_dHgt;
-         dPu_dLat = dPoly_dLat(nlat, nlon, nhgt, theLineNumCoef);
-         dQu_dLat = dPoly_dLat(nlat, nlon, nhgt, theLineDenCoef);
-         dPv_dLat = dPoly_dLat(nlat, nlon, nhgt, theSampNumCoef);
-         dQv_dLat = dPoly_dLat(nlat, nlon, nhgt, theSampDenCoef);
-         dPu_dLon = dPoly_dLon(nlat, nlon, nhgt, theLineNumCoef);
-         dQu_dLon = dPoly_dLon(nlat, nlon, nhgt, theLineDenCoef);
-         dPv_dLon = dPoly_dLon(nlat, nlon, nhgt, theSampNumCoef);
-         dQv_dLon = dPoly_dLon(nlat, nlon, nhgt, theSampDenCoef);
-         dPu_dHgt = dPoly_dHgt(nlat, nlon, nhgt, theLineNumCoef);
-         dQu_dHgt = dPoly_dHgt(nlat, nlon, nhgt, theLineDenCoef);
-         dPv_dHgt = dPoly_dHgt(nlat, nlon, nhgt, theSampNumCoef);
-         dQv_dHgt = dPoly_dHgt(nlat, nlon, nhgt, theSampDenCoef);
-         
-         //***
-         // Compute partials of quotients U and V wrt lat, lon, hgt 
-         //***
-         double dU_dLat, dU_dLon, dU_dHgt, dV_dLat, dV_dLon, dV_dHgt;
-         dU_dLat = (Qu*dPu_dLat - Pu*dQu_dLat)/(Qu*Qu);
-         dU_dLon = (Qu*dPu_dLon - Pu*dQu_dLon)/(Qu*Qu);
-         dU_dHgt = (Qu*dPu_dHgt - Pu*dQu_dHgt)/(Qu*Qu);
-         dV_dLat = (Qv*dPv_dLat - Pv*dQv_dLat)/(Qv*Qv);
-         dV_dLon = (Qv*dPv_dLon - Pv*dQv_dLon)/(Qv*Qv);
-         dV_dHgt = (Qv*dPv_dHgt - Pv*dQv_dHgt)/(Qv*Qv);
-         
-         //***
-         // Apply necessary scale factors 
-         //***
-        dU_dLat *= theLineScale/theLatScale;
-        dU_dLon *= theLineScale/theLonScale;
-        dU_dHgt *= theLineScale/theHgtScale;
-        dV_dLat *= theSampScale/theLatScale;
-        dV_dLon *= theSampScale/theLonScale;
-        dV_dHgt *= theSampScale/theHgtScale;
-
-        dU_dLat *= DEG_PER_RAD;
-        dU_dLon *= DEG_PER_RAD;
-        dV_dLat *= DEG_PER_RAD;
-        dV_dLon *= DEG_PER_RAD;
-
-         // Save the partials referenced to ECF
-         ossimEcefPoint location(pos);
-         NEWMAT::Matrix jMat(3,3);
-         pos.datum()->ellipsoid()->jacobianWrtEcef(location, jMat);
-         //  Line
-         theParWRTx.u = dU_dLat*jMat(1,1)+dU_dLon*jMat(2,1)+dU_dHgt*jMat(3,1);
-         theParWRTy.u = dU_dLat*jMat(1,2)+dU_dLon*jMat(2,2)+dU_dHgt*jMat(3,2);
-         theParWRTz.u = dU_dLat*jMat(1,3)+dU_dLon*jMat(2,3)+dU_dHgt*jMat(3,3);
-         //  Samp
-         theParWRTx.v = dV_dLat*jMat(1,1)+dV_dLon*jMat(2,1)+dV_dHgt*jMat(3,1);
-         theParWRTy.v = dV_dLat*jMat(1,2)+dV_dLon*jMat(2,2)+dV_dHgt*jMat(3,2);
-         theParWRTz.v = dV_dLat*jMat(1,3)+dV_dLon*jMat(2,3)+dV_dHgt*jMat(3,3);
-
-         // Residuals
-         ossimDpt resid(theObs.samp-V, theObs.line-U);
-         returnData = resid;
-      }
-
-      //******************************************
-      // P_WRT_X, P_WRT_Y, P_WRT_Z modes
-      //   [1] 3 separate calls required
-      //   [2] return 3 sets of partials
-      //******************************************
-      else if (derivMode==P_WRT_X)
-      {
-         returnData = theParWRTx;
-      }
-
-      else if (derivMode==P_WRT_Y)
-      {
-         returnData = theParWRTy;
-      }
-
-      else
-      {
-         returnData = theParWRTz;
-      }
-
-      return returnData;
-   }
-}
-
-double ossimRpcModel::getBiasError() const
-{
-   return theBiasError;
-}
-
-double ossimRpcModel::getRandError() const
-{
-   return theRandError;
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimSarModel::getRpcParameters)
-//  
-//  Accessor for RPC parameter set.
-//  
-//*****************************************************************************
-void ossimRpcModel::getRpcParameters(ossimRpcModel::rpcModelStruct& model) const
-{
-   model.lineScale  = theLineScale;
-   model.sampScale  = theSampScale;
-   model.latScale   = theLatScale;
-   model.lonScale   = theLonScale;
-   model.hgtScale   = theHgtScale;
-   model.lineOffset = theLineOffset;
-   model.sampOffset = theSampOffset;
-   model.latOffset  = theLatOffset;
-   model.lonOffset  = theLonOffset;
-   model.hgtOffset  = theHgtOffset;
-   
-   for (int i=0; i<20; ++i)
-   {
-      model.lineNumCoef[i] = theLineNumCoef[i];
-      model.lineDenCoef[i] = theLineDenCoef[i];
-      model.sampNumCoef[i] = theSampNumCoef[i];
-      model.sampDenCoef[i] = theSampDenCoef[i];
-   }
-   
-   if (thePolyType == A)
-   {
-      model.type= 'A';
-   }
-   else
-   {
-      model.type= 'B';
-   }
-}
diff --git a/src/ossim/projection/ossimRpcProjection.cpp b/src/ossim/projection/ossimRpcProjection.cpp
deleted file mode 100644
index 637cf1b..0000000
--- a/src/ossim/projection/ossimRpcProjection.cpp
+++ /dev/null
@@ -1,1393 +0,0 @@
-//*****************************************************************************
-// FILE: ossimRpcModel.cc
-//
-// Copyright (C) 2004 Intelligence Data Systems.
-//
-// LGPL
-// 
-// AUTHOR: Garrett Potts
-//
-//*****************************************************************************
-//$Id: ossimRpcProjection.cpp 17206 2010-04-25 23:20:40Z dburken $
-
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/projection/ossimRpcProjection.h>
-#include <ossim/projection/ossimRpcSolver.h>
-#include <ossim/base/ossimEcefPoint.h>
-#include <ossim/base/ossimEcefVector.h>
-#include <ossim/base/ossimTieGptSet.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-
-RTTI_DEF3(ossimRpcProjection, "ossimRpcProjection", ossimProjection, ossimOptimizableProjection,
-          ossimAdjustableParameterInterface);
-
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <cstdio>
-#include <fstream>
-#include <iostream>
-#include <algorithm>
-#include <ossim/matrix/newmatrc.h>
-
-//***
-// Define Trace flags for use within this file:
-//***
-#include <ossim/base/ossimTrace.h>
-static ossimTrace traceExec  ("ossimRpcProjection:exec");
-static ossimTrace traceDebug ("ossimRpcProjection:debug");
-
-static const int    MODEL_VERSION_NUMBER  = 1;
-static const int    NUM_COEFFS        = 20;
-static const char*  MODEL_TYPE        = "ossimRpcModel";
-static const char*  POLY_TYPE_KW      = "polynomial_format";
-static const char*  LINE_SCALE_KW     = "line_scale";
-static const char*  SAMP_SCALE_KW     = "samp_scale";
-static const char*  LAT_SCALE_KW      = "lat_scale";
-static const char*  LON_SCALE_KW      = "long_scale";
-static const char*  HGT_SCALE_KW      = "height_scale";
-static const char*  LINE_OFFSET_KW    = "line_off";
-static const char*  SAMP_OFFSET_KW    = "samp_off";
-static const char*  LAT_OFFSET_KW     = "lat_off";
-static const char*  LON_OFFSET_KW     = "long_off";
-static const char*  HGT_OFFSET_KW     = "height_off";
-static const char*  LINE_NUM_COEF_KW  = "line_num_coeff_";
-static const char*  LINE_DEN_COEF_KW  = "line_den_coeff_";
-static const char*  SAMP_NUM_COEF_KW  = "samp_num_coeff_";
-static const char*  SAMP_DEN_COEF_KW  = "samp_den_coeff_";
-
-static const ossim_int32 INTRACK_OFFSET = 0;
-static const ossim_int32 CRTRACK_OFFSET = 1;
-static const ossim_int32 INTRACK_SCALE  = 2;
-static const ossim_int32 CRTRACK_SCALE  = 3;
-static const ossim_int32 MAP_ROTATION   = 4;
-//static const ossim_int32 YAW_OFFSET;
-static const ossim_int32 NUM_ADJUSTABLE_PARAMS = 5;
-
-static const ossimString PARAM_NAMES[] ={"intrack_offset",
-                                        "crtrack_offset",
-                                        "intrack_scale",
-                                        "crtrack_scale",
-                                        "map_rotation",
-                                        "yaw_offset"};
-
-static const ossimString PARAM_UNITS[] ={"pixel",
-                                        "pixel",
-                                        "scale",
-                                        "scale",
-                                        "degrees",
-                                        "degrees"};
-
-//*****************************************************************************
-//  DEFAULT CONSTRUCTOR: ossimRpcModel()
-//  
-//*****************************************************************************
-ossimRpcProjection::ossimRpcProjection()
-   : ossimOptimizableProjection(),
-     theIntrackOffset(0),
-     theCrtrackOffset(0),
-     theIntrackScale(0.0),
-     theCrtrackScale(0.0),
-     theYawSkew   (0.0),
-     theCosMapRot (1.0),
-     theSinMapRot (0.0)
-
- {
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection Default Constructor: entering..." << std::endl;
-
-   initAdjustableParameters();
-   
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection Default Constructor: returning..." << std::endl;
-}
-
-//*****************************************************************************
-//  COPY CONSTRUCTOR: ossimRpcProjection(ossimRpcProjection)
-//  
-//*****************************************************************************
-ossimRpcProjection::ossimRpcProjection(const ossimRpcProjection& model)
-   :
-      ossimOptimizableProjection(model),
-      ossimAdjustableParameterInterface(model),
-      thePolyType     (model.thePolyType),
-      theLineScale    (model.theLineScale),
-      theSampScale    (model.theSampScale),
-      theLatScale     (model.theLatScale),
-      theLonScale     (model.theLonScale),
-      theHgtScale     (model.theHgtScale),
-      theLineOffset   (model.theLineOffset),
-      theSampOffset   (model.theSampOffset),
-      theLatOffset    (model.theLatOffset),
-      theLonOffset    (model.theLonOffset),
-      theHgtOffset    (model.theHgtOffset),
-      theIntrackOffset(model.theIntrackOffset),
-      theCrtrackOffset(model.theCrtrackOffset),
-      theIntrackScale(model.theIntrackScale),
-      theCrtrackScale(model.theCrtrackScale),
-      theYawSkew      (model.theYawSkew),
-      theCosMapRot    (model.theCosMapRot),
-      theSinMapRot    (model.theSinMapRot)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection Copy Constructor: entering..." << std::endl;
-
-   for (int i=0; i<20; i++)
-   {
-      theLineNumCoef[i] = model.theLineNumCoef[i];
-      theLineDenCoef[i] = model.theLineDenCoef[i];
-      theSampNumCoef[i] = model.theSampNumCoef[i];
-      theSampDenCoef[i] = model.theSampDenCoef[i];
-   }
-   
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection Copy Constructor: returning..." << std::endl;
-}
-
-//*****************************************************************************
-//  DESTRUCTOR: ~ossimRpcProjection()
-//  
-//*****************************************************************************
-ossimRpcProjection::~ossimRpcProjection()
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ~ossimRpcProjection() Destructor: entering..." << std::endl;
-   
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimNotify(ossimNotifyLevel_DEBUG): returning..." << std::endl;
-}
-
-ossimObject* ossimRpcProjection::getBaseObject()
-{
-   return this;
-}
-
-const ossimObject* ossimRpcProjection::getBaseObject()const
-{
-   return this;
-}
-
-ossimRpcProjection& 
-ossimRpcProjection::operator=(const ossimRpcProjection& source)
-{
-   if (this != &source)
-   {
-      ossimOptimizableProjection::operator=(source);
-
-      thePolyType    = source.thePolyType;
-      theLineScale   = source.theLineScale;
-      theSampScale   = source.theSampScale;
-      theLatScale    = source.theLatScale;
-      theLonScale    = source.theLonScale;
-      theHgtScale    = source.theHgtScale;
-      theLineOffset  = source.theLineOffset;
-      theSampOffset  = source.theSampOffset;
-      theLatOffset   = source.theLatOffset;
-      theLonOffset   = source.theLonOffset;
-      theHgtOffset   = source.theHgtOffset;
-      for (int i=0; i<20; i++)
-      {
-         theLineNumCoef[i] = source.theLineNumCoef[i];
-         theLineDenCoef[i] = source.theLineDenCoef[i];
-         theSampNumCoef[i] = source.theSampNumCoef[i];
-         theSampDenCoef[i] = source.theSampDenCoef[i];
-      }
-   }
-   return *this;
-}
-
-void ossimRpcProjection::setAttributes(ossim_float64 sampleOffset,
-                                       ossim_float64 lineOffset,
-                                       ossim_float64 sampleScale,
-                                       ossim_float64 lineScale,
-                                       ossim_float64 latOffset,
-                                       ossim_float64 lonOffset,
-                                       ossim_float64 heightOffset,
-                                       ossim_float64 latScale,
-                                       ossim_float64 lonScale,
-                                       ossim_float64 heightScale,
-                                       const std::vector<double>& xNumeratorCoeffs,
-                                       const std::vector<double>& xDenominatorCoeffs,
-                                       const std::vector<double>& yNumeratorCoeffs,
-                                       const std::vector<double>& yDenominatorCoeffs,
-                                       PolynomialType polyType)
-{
-   thePolyType = polyType;
-   
-   theLineScale  = lineScale;
-   theSampScale  = sampleScale;
-   theLatScale   = latScale;
-   theLonScale   = lonScale;
-   theHgtScale   = heightScale;
-   theLineOffset = lineOffset;
-   theSampOffset = sampleOffset;
-   theLatOffset  = latOffset;
-   theLonOffset  = lonOffset;
-   theHgtOffset  = heightOffset;
-
-   if(xNumeratorCoeffs.size() == 20)
-   {
-      std::copy(xNumeratorCoeffs.begin(),
-                xNumeratorCoeffs.end(),
-                theSampNumCoef);
-   }
-   if(xDenominatorCoeffs.size() == 20)
-   {
-      std::copy(xDenominatorCoeffs.begin(),
-                xDenominatorCoeffs.end(),
-                theSampDenCoef);
-   }
-   if(yNumeratorCoeffs.size() == 20)
-   {
-      std::copy(yNumeratorCoeffs.begin(),
-                yNumeratorCoeffs.end(),
-                theLineNumCoef);
-   }
-   if(yDenominatorCoeffs.size() == 20)
-   {
-      std::copy(yDenominatorCoeffs.begin(),
-                yDenominatorCoeffs.end(),
-                theLineDenCoef);
-   }
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimRpcProjection::worldToLineSample()
-//  
-//  Overrides base class implementation. Directly computes line-sample from
-//  the polynomials.
-//*****************************************************************************
-void ossimRpcProjection::worldToLineSample(const ossimGpt& ground_point,
-                                      ossimDpt&       imgPt) const
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection::worldToLineSample(): entering..." << std::endl;
-
-   if(ground_point.isLatNan() ||
-      ground_point.isLonNan() )
-     {
-       imgPt.makeNan();
-       return;
-     }
-         
-   //*
-   // Normalize the lat, lon, hgt:
-   //*
-   double nlat = (ground_point.lat - theLatOffset) / theLatScale;
-   double nlon = (ground_point.lon - theLonOffset) / theLonScale;
-   double nhgt;
-
-   if(ossim::isnan(ground_point.hgt))
-   {
-      nhgt = (theHgtScale - theHgtOffset) / theHgtScale;
-   }
-   else
-   {
-      nhgt = (ground_point.hgt - theHgtOffset) / theHgtScale;
-   }
-
-   
-   //***
-   // Compute the adjusted, normalized line (U) and sample (V):
-   //***
-   double Pu = polynomial(nlat, nlon, nhgt, theLineNumCoef);
-   double Qu = polynomial(nlat, nlon, nhgt, theLineDenCoef);
-   double Pv = polynomial(nlat, nlon, nhgt, theSampNumCoef);
-   double Qv = polynomial(nlat, nlon, nhgt, theSampDenCoef);
-   double U_rot  = Pu / Qu;
-   double V_rot  = Pv / Qv;
-
-   //***
-   // U, V are normalized quantities. Need now to establish the image file
-   // line and sample. First, back out the adjustable parameter effects
-   // starting with rotation:
-   //***
-   double U = U_rot*theCosMapRot + V_rot*theSinMapRot;
-   double V = V_rot*theCosMapRot - U_rot*theSinMapRot;
-
-   //***
-   // Now back out skew, scale, and offset adjustments:
-   //***
-   imgPt.line = U*(theLineScale+theIntrackScale) + theLineOffset + theIntrackOffset;
-   imgPt.samp = V*(theSampScale+theCrtrackScale) + theSampOffset + theCrtrackOffset;
-
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection::worldToLineSample(): returning..." << std::endl;
-
-   return;
-}
-
-void  ossimRpcProjection::lineSampleToWorld(const ossimDpt& imagePoint,
-                                            ossimGpt&       worldPoint) const
-{
-   if(!imagePoint.hasNans())
-   {
-      
-      lineSampleHeightToWorld(imagePoint,
-                              worldPoint.height(),
-                              worldPoint);
-   }
-   else
-   {
-      worldPoint.makeNan();
-   }
-}
-
-//*****************************************************************************
-//  METHOD: ossimRpcProjection::lineSampleHeightToWorld()
-//  
-//  Performs reverse projection of image line/sample to ground point.
-//  The imaging ray is intersected with a level plane at height = elev.
-//
-//  NOTE: U = line, V = sample -- this differs from the convention.
-//
-//*****************************************************************************
-void ossimRpcProjection::lineSampleHeightToWorld(const ossimDpt& image_point,
-                                            const double&   ellHeight,
-                                            ossimGpt&       gpt) const
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection::lineSampleHeightToWorld: entering..." << std::endl;
-
-   //***
-   // Constants for convergence tests:
-   //***
-   static const int    MAX_NUM_ITERATIONS  = 10;
-   static const double CONVERGENCE_EPSILON = 0.1;  // pixels
-   
-   //***
-   // The image point must be adjusted by the adjustable parameters as well
-   // as the scale and offsets given as part of the RPC param normalization.
-   //
-   //      NOTE: U = line, V = sample
-   //***
-   double skew = (image_point.x-theSampOffset - theCrtrackOffset)*theYawSkew;
-   double U    = (image_point.y-theLineOffset - theIntrackOffset+skew) / (theLineScale+theIntrackScale);
-   double V    = (image_point.x-theSampOffset - theCrtrackOffset) / (theSampScale+theCrtrackScale);
-
-   //***
-   // Rotate the normalized U, V by the map rotation error (adjustable param):
-   //***
-   double U_rot = theCosMapRot*U - theSinMapRot*V;
-   double V_rot = theSinMapRot*U + theCosMapRot*V;
-   U = U_rot; V = V_rot;
-
-
-   // now apply adjust intrack and cross track
-   //***
-   // Initialize quantities to be used in the iteration for ground point:
-   //***
-   double nlat      = 0.0;  // normalized latitude
-   double nlon      = 0.0;  // normalized longitude
-   
-   double nhgt;
-
-   if(ossim::isnan(ellHeight))
-   {
-     nhgt = (theHgtScale - theHgtOffset) / theHgtScale;  // norm height
-   }
-   else
-   {
-      nhgt = (ellHeight - theHgtOffset) / theHgtScale;  // norm height
-   }
-   
-   double epsilonU = CONVERGENCE_EPSILON/(theLineScale+theIntrackScale);
-   double epsilonV = CONVERGENCE_EPSILON/(theSampScale+theCrtrackScale);
-   int    iteration = 0;
-
-   //***
-   // Declare variables only once outside the loop. These include:
-   // * polynomials (numerators Pu, Pv, and denominators Qu, Qv),
-   // * partial derivatives of polynomials wrt X, Y,
-   // * computed normalized image point: Uc, Vc,
-   // * residuals of normalized image point: deltaU, deltaV,
-   // * partial derivatives of Uc and Vc wrt X, Y,
-   // * corrections to normalized lat, lon: deltaLat, deltaLon.
-   //***
-   double Pu, Qu, Pv, Qv;
-   double dPu_dLat, dQu_dLat, dPv_dLat, dQv_dLat;
-   double dPu_dLon, dQu_dLon, dPv_dLon, dQv_dLon;
-   double Uc, Vc;
-   double deltaU, deltaV;
-   double dU_dLat, dU_dLon, dV_dLat, dV_dLon, W;
-   double deltaLat, deltaLon;
-   
-   //***
-   // Now iterate until the computed Uc, Vc is within epsilon of the desired
-   // image point U, V:
-   //***
-   do
-   {
-      //***
-      // Calculate the normalized line and sample Uc, Vc as ratio of
-      // polynomials Pu, Qu and Pv, Qv:
-      //***
-      Pu = polynomial(nlat, nlon, nhgt, theLineNumCoef);
-      Qu = polynomial(nlat, nlon, nhgt, theLineDenCoef);
-      Pv = polynomial(nlat, nlon, nhgt, theSampNumCoef);
-      Qv = polynomial(nlat, nlon, nhgt, theSampDenCoef);
-      Uc = Pu/Qu;
-      Vc = Pv/Qv;
-      
-      //***
-      // Compute residuals between desired and computed line, sample:
-      //***
-      deltaU = U - Uc;
-      deltaV = V - Vc;
-      
-      //***
-      // Check for convergence and skip re-linearization if converged:
-      //***
-      if ((fabs(deltaU) > epsilonU) || (fabs(deltaV) > epsilonV))
-      {
-         //***
-         // Analytically compute the partials of each polynomial wrt lat, lon:
-         //***
-         dPu_dLat = dPoly_dLat(nlat, nlon, nhgt, theLineNumCoef);
-         dQu_dLat = dPoly_dLat(nlat, nlon, nhgt, theLineDenCoef);
-         dPv_dLat = dPoly_dLat(nlat, nlon, nhgt, theSampNumCoef);
-         dQv_dLat = dPoly_dLat(nlat, nlon, nhgt, theSampDenCoef);
-         dPu_dLon = dPoly_dLon(nlat, nlon, nhgt, theLineNumCoef);
-         dQu_dLon = dPoly_dLon(nlat, nlon, nhgt, theLineDenCoef);
-         dPv_dLon = dPoly_dLon(nlat, nlon, nhgt, theSampNumCoef);
-         dQv_dLon = dPoly_dLon(nlat, nlon, nhgt, theSampDenCoef);
-         
-         //***
-         // Analytically compute partials of quotients U and V wrt lat, lon: 
-         //***
-         dU_dLat = (Qu*dPu_dLat - Pu*dQu_dLat)/(Qu*Qu);
-         dU_dLon = (Qu*dPu_dLon - Pu*dQu_dLon)/(Qu*Qu);
-         dV_dLat = (Qv*dPv_dLat - Pv*dQv_dLat)/(Qv*Qv);
-         dV_dLon = (Qv*dPv_dLon - Pv*dQv_dLon)/(Qv*Qv);
-         
-         W = dU_dLon*dV_dLat - dU_dLat*dV_dLon;
-         
-         //***
-         // Now compute the corrections to normalized lat, lon:
-         //***
-         deltaLat = (dU_dLon*deltaV - dV_dLon*deltaU) / W;
-         deltaLon = (dV_dLat*deltaU - dU_dLat*deltaV) / W;
-         nlat += deltaLat;
-         nlon += deltaLon;
-      }
-      
-      iteration++;
-      
-   } while (((fabs(deltaU)>epsilonU) || (fabs(deltaV)>epsilonV))
-            && (iteration < MAX_NUM_ITERATIONS));
-      
-   //***
-   // Test for exceeding allowed number of iterations. Flag error if so:
-   //***
-   if (iteration == MAX_NUM_ITERATIONS)
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimRpcProjection::lineSampleHeightToWorld: \nMax number of iterations reached in ground point "
-                                         << "solution. Results are inaccurate." << endl;
-   }
-
-   //***
-   // Now un-normalize the ground point lat, lon and establish return quantity:
-   //***
-   gpt.lat = nlat*theLatScale + theLatOffset;
-   gpt.lon = nlon*theLonScale + theLonOffset;
-   gpt.hgt = ellHeight;
-   
-}
-
-ossimGpt ossimRpcProjection::origin()const
-{
-   return ossimGpt(theLatOffset,
-                   theLonOffset,
-                   theHgtOffset);
-}
-
-
-ossimDpt ossimRpcProjection::getMetersPerPixel() const
-{
-   ossimDpt result;
-   
-//    ossimDpt left  = ossimDpt(theSampOffset-1,
-//                              theLineOffset);
-//    ossimDpt right = ossimDpt(theSampOffset+1,
-//                              theLineOffset);
-   ossimDpt top  = ossimDpt(theSampOffset,
-                            theLineOffset-1);
-   ossimDpt bottom = ossimDpt(theSampOffset,
-                              theLineOffset+1);
-//    ossimGpt leftG;
-//    ossimGpt rightG;
-   ossimGpt topG;
-   ossimGpt bottomG;
-   
-//    lineSampleToWorld(left, leftG);
-//    lineSampleToWorld(right, rightG);
-   lineSampleToWorld(top, topG);
-   lineSampleToWorld(bottom, bottomG);
-   
-//    result.x = (ossimEcefPoint(leftG) - ossimEcefPoint(rightG)).magnitude()/2.0;
-   result.y = (ossimEcefPoint(topG) - ossimEcefPoint(bottomG)).magnitude()/2.0;
-   result.x = result.y;
-
-   return result;
-}
-
-bool ossimRpcProjection::operator==(const ossimProjection& projection) const
-{
-   if(&projection == this) return true;
-
-   // not implemented yet
-   //
-   return false;
-}
-
-//*****************************************************************************
-// PRIVATE METHOD: ossimRpcProjection::polynomial
-//  
-//  Computes polynomial.
-//  
-//*****************************************************************************
-double ossimRpcProjection::polynomial(const double& P, const double& L,
-                                      const double& H, const double* c) const
-{
-   double r;
-
-   if (thePolyType == A)
-   {
-      r = c[ 0]       + c[ 1]*L     + c[ 2]*P     + c[ 3]*H     +
-          c[ 4]*L*P   + c[ 5]*L*H   + c[ 6]*P*H   + c[ 7]*L*P*H +
-          c[ 8]*L*L   + c[ 9]*P*P   + c[10]*H*H   + c[11]*L*L*L +
-          c[12]*L*L*P + c[13]*L*L*H + c[14]*L*P*P + c[15]*P*P*P +
-          c[16]*P*P*H + c[17]*L*H*H + c[18]*P*H*H + c[19]*H*H*H;
-   }
-   else
-   {
-      r = c[ 0]       + c[ 1]*L     + c[ 2]*P     + c[ 3]*H     +
-          c[ 4]*L*P   + c[ 5]*L*H   + c[ 6]*P*H   + c[ 7]*L*L   +
-          c[ 8]*P*P   + c[ 9]*H*H   + c[10]*L*P*H + c[11]*L*L*L +
-          c[12]*L*P*P + c[13]*L*H*H + c[14]*L*L*P + c[15]*P*P*P +
-          c[16]*P*H*H + c[17]*L*L*H + c[18]*P*P*H + c[19]*H*H*H;
-   }
-   
-   return r;
-}
-
-//*****************************************************************************
-// PRIVATE METHOD: ossimRpcProjection::dPoly_dLat
-//  
-//  Computes derivative of polynomial wrt normalized Latitude P.
-//  
-//*****************************************************************************
-double ossimRpcProjection::dPoly_dLat(const double& P, const double& L,
-                                 const double& H, const double* c) const
-{
-   double dr;
-
-   if (thePolyType == A)
-   {
-      dr = c[2] + c[4]*L + c[6]*H + c[7]*L*H + 2*c[9]*P + c[12]*L*L +
-           2*c[14]*L*P + 3*c[15]*P*P +2*c[16]*P*H + c[18]*H*H;
-   }
-   else
-   {
-      dr = c[2] + c[4]*L + c[6]*H + 2*c[8]*P + c[10]*L*H + 2*c[12]*L*P +
-           c[14]*L*L + 3*c[15]*P*P + c[16]*H*H + 2*c[18]*P*H;
-   }
-   
-   return dr;
-}
-
-//*****************************************************************************
-// PRIVATE METHOD: ossimRpcProjection::dPoly_dLon
-//  
-//  Computes derivative of polynomial wrt normalized Longitude L.
-//  
-//*****************************************************************************
-double ossimRpcProjection::dPoly_dLon(const double& P, const double& L,
-                                 const double& H, const double* c) const
-{
-   double dr;
-
-   if (thePolyType == A)
-   {
-      dr = c[1] + c[4]*P + c[5]*H + c[7]*P*H + 2*c[8]*L + 3*c[11]*L*L +
-           2*c[12]*L*P + 2*c[13]*L*H + c[14]*P*P + c[17]*H*H;
-   }
-   else
-   {
-      dr = c[1] + c[4]*P + c[5]*H + 2*c[7]*L + c[10]*P*H + 3*c[11]*L*L +
-           c[12]*P*P + c[13]*H*H + 2*c[14]*P*L + 2*c[17]*L*H;
-   }
-   return dr;
-}
-
-//*****************************************************************************
-//  METHOD: ossimRpcProjection::print()
-//  
-//  Formatted dump of data members.
-//  
-//*****************************************************************************
-std::ostream& ossimRpcProjection::print(std::ostream& out) const
-{
-   out << "\nDump of ossimRpcProjection object at " << hex << this << ":\n"
-       << POLY_TYPE_KW   << ": " << thePolyType   << "\n"
-       << LINE_SCALE_KW  << ": " << theLineScale  << "\n"
-       << SAMP_SCALE_KW  << ": " << theSampScale  << "\n"
-       << LAT_SCALE_KW   << ": " << theLatScale   << "\n"
-       << LON_SCALE_KW   << ": " << theLonScale   << "\n"
-       << HGT_SCALE_KW   << ": " << theHgtScale   << "\n"
-       << LINE_OFFSET_KW << ": " << theLineOffset << "\n"
-       << SAMP_OFFSET_KW << ": " << theSampOffset << "\n"
-       << LAT_OFFSET_KW  << ": " << theLatOffset  << "\n"
-       << LON_OFFSET_KW  << ": " << theLonOffset  << "\n"
-       << HGT_OFFSET_KW  << ": " << theHgtOffset  << endl;
-
-   for (int i=0; i<NUM_COEFFS; i++)
-      out<<"  "<<LINE_NUM_COEF_KW<<"["<<i<<"]: "<<theLineNumCoef[i]<<endl;
-
-   out << endl;
-   for (int i=0; i<NUM_COEFFS; i++)
-      out<<"  "<<LINE_DEN_COEF_KW<<"["<<i<<"]: "<<theLineDenCoef[i]<<endl;
-
-   out << endl;
-   for (int i=0; i<NUM_COEFFS; i++)
-      out<<"  "<<SAMP_NUM_COEF_KW<<"["<<i<<"]: "<<theSampNumCoef[i]<<endl;
-
-   out << endl;
-   for (int i=0; i<NUM_COEFFS; i++)
-      out<<"  "<<SAMP_DEN_COEF_KW<<"["<<i<<"]: "<<theSampDenCoef[i]<<endl;
-      
-   out << endl;
-
-   return ossimProjection::print(out);
-}
-
-//*****************************************************************************
-//  METHOD: ossimRpcProjection::saveState()
-//  
-//  Saves the model state to the KWL. This KWL also serves as a geometry file.
-//  
-//*****************************************************************************
-bool ossimRpcProjection::saveState(ossimKeywordlist& kwl,
-                              const char* prefix) const
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection::saveState(): entering..." << std::endl;
-
-   kwl.add(prefix, ossimKeywordNames::TYPE_KW, MODEL_TYPE);
-
-   //***
-   // Hand off to base class for common stuff:
-   //***
-   ossimProjection::saveState(kwl, prefix);
-
-   kwl.add(prefix,
-           POLY_TYPE_KW,
-           (char)thePolyType,
-           true);
-   
-   kwl.add(prefix, LINE_SCALE_KW, theLineScale);
-   kwl.add(prefix, SAMP_SCALE_KW, theSampScale);
-   kwl.add(prefix, LAT_SCALE_KW, theLatScale);
-   kwl.add(prefix, LON_SCALE_KW, theLonScale);
-   kwl.add(prefix, HGT_SCALE_KW, theHgtScale);
-   kwl.add(prefix, LINE_OFFSET_KW, theLineOffset);
-   kwl.add(prefix, SAMP_OFFSET_KW, theSampOffset);
-   kwl.add(prefix, LAT_OFFSET_KW, theLatOffset);
-   kwl.add(prefix, LON_OFFSET_KW, theLonOffset);
-   
-   kwl.add(prefix, HGT_OFFSET_KW, theHgtOffset);
-
-   for (int i=0; i<NUM_COEFFS; i++)
-   {
-      kwl.add(prefix, (LINE_NUM_COEF_KW + ossimString::toString(i)).c_str(), theLineNumCoef[i]);
-      kwl.add(prefix, (LINE_DEN_COEF_KW + ossimString::toString(i)).c_str(), theLineDenCoef[i]);
-      kwl.add(prefix, (SAMP_NUM_COEF_KW + ossimString::toString(i)).c_str(), theSampNumCoef[i]);
-      kwl.add(prefix, (SAMP_DEN_COEF_KW + ossimString::toString(i)).c_str(), theSampDenCoef[i]);
-   }
-      
-   saveAdjustments(kwl, prefix);
-   
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection::saveState(): returning..." << std::endl;
-   return true;
-}
-
-//*****************************************************************************
-//  METHOD: ossimRpcProjection::loadState()
-//  
-//  Restores the model's state from the KWL. This KWL also serves as a
-//  geometry file.
-//  
-//*****************************************************************************
-bool ossimRpcProjection::loadState(const ossimKeywordlist& kwl,
-                              const char* prefix) 
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection::loadState(): entering..." << std::endl;
-
-   const char* value;
-   const char* keyword;
-
-   //***
-   // Pass on to the base-class for parsing first:
-   //***
-   bool success = ossimProjection::loadState(kwl, prefix);
-   if (!success)
-   {
-      theErrorStatus++;
-      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection::loadState(): returning with error..." << std::endl;
-      return false;
-   }
-      
-   //***
-   // Continue parsing for local members:
-   //***
-   keyword = POLY_TYPE_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   thePolyType = (PolynomialType) value[0];
-      
-   keyword = LINE_SCALE_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   theLineScale = ossimString(value).toDouble();
-   
-   keyword = SAMP_SCALE_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   theSampScale = ossimString(value).toDouble();
-   
-   keyword = LAT_SCALE_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   theLatScale = ossimString(value).toDouble();
-   
-   keyword = LON_SCALE_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   theLonScale = ossimString(value).toDouble();
-   
-   keyword = HGT_SCALE_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   theHgtScale = ossimString(value).toDouble();
-   
-   keyword = LINE_OFFSET_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   theLineOffset = ossimString(value).toDouble();
-   
-   keyword = SAMP_OFFSET_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   theSampOffset = ossimString(value).toDouble();
-   
-   keyword = LAT_OFFSET_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   theLatOffset = ossimString(value).toDouble();
-   
-   keyword = LON_OFFSET_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   theLonOffset = ossimString(value).toDouble();
-   
-   keyword = HGT_OFFSET_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
-                                          << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                          << std::endl;
-      return false;
-   }
-   theHgtOffset = ossimString(value).toDouble();
-
-   for (int i=0; i<NUM_COEFFS; i++)
-   {
-      value = kwl.find(prefix, (LINE_NUM_COEF_KW+ossimString::toString(i)).c_str());
-      if (!value)
-      {
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
-                                             << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                             << std::endl;
-         return false;
-      }
-      theLineNumCoef[i] = ossimString(value).toDouble();
-   
-      value = kwl.find(prefix, (LINE_DEN_COEF_KW+ossimString::toString(i)).c_str());
-      if (!value)
-      {
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
-                                             << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                             << std::endl;
-         return false;
-      }
-      theLineDenCoef[i] = ossimString(value).toDouble();
-   
-      value = kwl.find(prefix, (SAMP_NUM_COEF_KW+ossimString::toString(i)).c_str());
-      if (!value)
-      {
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
-                                             << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                             << std::endl;
-         return false;
-      }
-      theSampNumCoef[i] = ossimString(value).toDouble();
-      
-      value = kwl.find(prefix, (SAMP_DEN_COEF_KW+ossimString::toString(i)).c_str());
-      if (!value)
-      {
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::loadState(): Error encountered parsing the following required keyword: "
-                                             << "<" << keyword << ">. Check the keywordlist for proper syntax."
-                                             << std::endl;
-         return false;
-      }
-      theSampDenCoef[i] = ossimString(value).toDouble();
-   }
-
-   loadAdjustments(kwl, prefix);
-
-   if(getNumberOfAdjustableParameters() < 1)
-   {
-      initAdjustableParameters();
-   }
-      
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection::loadState(): returning..." << std::endl;
-
-   return true;
-}
-
-void ossimRpcProjection::initAdjustableParameters()
-{
-   resizeAdjustableParameterArray(NUM_ADJUSTABLE_PARAMS);
-   int numParams = getNumberOfAdjustableParameters();
-   for (int i=0; i<numParams; i++)
-   {
-      setAdjustableParameter(i, 0.0);
-      setParameterDescription(i, PARAM_NAMES[i]);
-      setParameterUnit(i,PARAM_UNITS[i]);
-   }
-   setParameterSigma(INTRACK_OFFSET, 50.0);
-   setParameterSigma(CRTRACK_OFFSET, 50.0);
-   setParameterSigma(INTRACK_SCALE, 50.0);  
-   setParameterSigma(CRTRACK_SCALE, 50.0);  
-   setParameterSigma(MAP_ROTATION, 0.1);
-//   setParameterSigma(YAW_OFFSET, 0.001);
-}
-
-void ossimRpcProjection::adjustableParametersChanged()
-{
-   theIntrackOffset    = computeParameterOffset(INTRACK_OFFSET);
-   theCrtrackOffset    = computeParameterOffset(CRTRACK_OFFSET);
-   theIntrackScale     = computeParameterOffset(INTRACK_SCALE);
-   theCrtrackScale     = computeParameterOffset(CRTRACK_SCALE);
-   double mapRotation  = computeParameterOffset(MAP_ROTATION);
-   theCosMapRot        = ossim::cosd(mapRotation);
-   theSinMapRot        = ossim::sind(mapRotation);
-}
-
-bool
-ossimRpcProjection::setupOptimizer(const ossimString& setup)
-{
-   ossimKeywordlist kwl;
-
-   if(kwl.addFile(ossimFilename(setup)))
-   {
-      return loadState(kwl);
-   }
-   else
-   {
-      ossimRefPtr<ossimProjection> proj = ossimProjectionFactoryRegistry::instance()->createProjection(setup);
-      if(proj.valid())
-      {
-         kwl.clear();
-         proj->saveState(kwl);
-         
-         return loadState(kwl);
-      }
-   }
-   
-   return false;
-}
-
-ossim_uint32
-ossimRpcProjection::degreesOfFreedom()const
-{
-   ossim_uint32 dof = 0;
-   ossim_uint32 idx = 0;
-   ossim_uint32 numAdj = getNumberOfAdjustableParameters();
-   for(idx = 0; idx < numAdj; ++idx)
-   {
-      if(!isParameterLocked(idx))
-      {
-         ++dof;
-      }
-   }
-   
-   return dof;
-}
-//give inverse() partial derivative regarding parameter parmIdx (>=0)
-ossimGpt
-ossimRpcProjection::getInverseDeriv(int parmIdx, const ossimDpt& ipos, double hdelta)
-{   
-   double den = 0.5/hdelta;
-   ossimGpt res,gd;
-
-   double middle = getAdjustableParameter(parmIdx);
-   //set parm to high value
-   setAdjustableParameter(parmIdx, middle + hdelta, true);
-   res = inverse(ipos);
-   //set parm to low value and gte difference
-   setAdjustableParameter(parmIdx, middle - hdelta, true);
-   gd = inverse(ipos);
-
-   //reset parm
-   setAdjustableParameter(parmIdx, middle, true);
-
-   res.lon = den*(res.lon - gd.lon) * 100000.0; //TBC : approx meters
-   res.lat = den*(res.lat - gd.lat) * 100000.0 * cos(gd.lat / 180.0 * M_PI);
-   res.hgt = den*(res.hgt - gd.hgt);
-
-   return res;
-}
-
-//give forward() partial derivative regarding parameter parmIdx (>=0)
-ossimDpt
-ossimRpcProjection::getForwardDeriv(int parmIdx, const ossimGpt& gpos, double hdelta)
-{   
-   static double den = 0.5/hdelta;
-   ossimDpt res;
-
-   double middle = getAdjustableParameter(parmIdx);
-   //set parm to high value
-   setAdjustableParameter(parmIdx, middle + hdelta, true);
-   res = inverse(gpos);
-   //set parm to low value and gte difference
-   setAdjustableParameter(parmIdx, middle - hdelta, true);
-   res -= inverse(gpos);
-   //get partial derivative
-   res = res*den;
-
-   //reset parm
-   setAdjustableParameter(parmIdx, middle, true);
-
-   return res;
-}
-
-double
-ossimRpcProjection::optimizeFit(const ossimTieGptSet& tieSet, double* /* targetVariance */)
-{
-#if 1
-   //NOTE : ignore targetVariance
-   ossimRefPtr<ossimRpcSolver> solver = new ossimRpcSolver(false, false); //TBD : choices should be part of setupFromString
-
-   std::vector<ossimDpt> imagePoints;
-   std::vector<ossimGpt> groundPoints;
-   tieSet.getSlaveMasterPoints(imagePoints, groundPoints);
-   solver->solveCoefficients(imagePoints, groundPoints);
-
-   ossimRefPtr< ossimImageGeometry > optProj = solver->createRpcProjection();
-   if (!optProj)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimRpcProjection::optimizeFit(): error when optimizing the RPC with given tie points"
-                                             << std::endl;
-      return -1.0;
-   }
-
-   if(optProj->hasProjection())
-   {
-      ossimKeywordlist kwl;
-      optProj->getProjection()->saveState(kwl);
-      this->loadState(kwl);
-   }
-
-   return std::pow(solver->getRmsError(), 2); //variance in pixel^2
-#else
-   // COPIED from ossimRpcProjection
-   //
-   //
-   //use a simple Levenberg-Marquardt non-linear optimization
-   //note : please limit the number of tie points
-   //
-   //INPUTS: requires Jacobian matrix (partial derivatives with regards to parameters)
-   //OUPUTS: will also compute parameter covariance matrix
-   //
-   //TBD: use targetVariance!
- 
-   int np = getNumberOfAdjustableParameters();
-   int nobs = tieSet.size();
-
-   //setup initail values
-   int iter=0;
-   int iter_max = 200;
-   double minResidue = 1e-10; //TBC
-   double minDelta = 1e-10; //TBC
-
-   //build Least Squares initial normal equation
-   // don't waste memory, add samples one at a time
-   NEWMAT::SymmetricMatrix A;
-   NEWMAT::ColumnVector residue;
-   NEWMAT::ColumnVector projResidue;
-   double deltap_scale = 1e-4; //step_Scale is 1.0 because we expect parameters to be between -1 and 1
-   buildNormalEquation(tieSet, A, residue, projResidue, deltap_scale);
-   double ki2=residue.SumSquare();
-
-   //get current adjustment (between -1 and 1 normally) and convert to ColumnVector
-   ossimAdjustmentInfo cadj;
-   getAdjustment(cadj);
-   std::vector< ossimAdjustableParameterInfo >& parmlist = cadj.getParameterList();
-   NEWMAT::ColumnVector cparm(np), nparm(np);
-   for(int n=0;n<np;++n)
-   {
-      cparm(n+1) = parmlist[n].getParameter();
-   }
-
-   double damping_speed = 2.0;
-   //find max diag element for A
-   double maxdiag=0.0;
-   for(int d=1;d<=np;++d) {
-      if (maxdiag < A(d,d)) maxdiag=A(d,d);
-   }
-   double damping = 1e-3 * maxdiag;
-   double olddamping = 0.0;
-   bool found = false;
-
-//DEBUG TBR
-cout<<"rms="<<sqrt(ki2/nobs)<<" ";
-cout.flush();
-
-   while ( (!found) && (iter < iter_max) ) //non linear optimization loop
-   {
-      bool decrease = false;
-
-      do
-      {
-         //add damping update to normal matrix
-         for(int d=1;d<=np;++d) A(d,d) += damping - olddamping;
-         olddamping = damping;
-
-         NEWMAT::ColumnVector deltap = solveLeastSquares(A, projResidue);
-
-         if (deltap.NormFrobenius() <= minDelta) 
-         {
-            found = true;
-         } else {
-            //update adjustment
-            nparm = cparm + deltap;
-            for(int n=0;n<np;++n)
-            {
-               setAdjustableParameter(n, nparm(n+1), false); //do not update now, wait
-            }
-            adjustableParametersChanged();
-
-            //check residue is reduced
-            NEWMAT::ColumnVector newresidue = getResidue(tieSet);
-            double newki2=newresidue.SumSquare();
-            double res_reduction = (ki2 - newki2) / (deltap.t()*(deltap*damping + projResidue)).AsScalar();
- //DEBUG TBR
-       cout<<sqrt(newki2/nobs)<<" ";
-       cout.flush();
-
-            if (res_reduction > 0)
-            {
-               //accept new parms
-               cparm = nparm;
-               ki2=newki2;
-
-               deltap_scale = max(1e-15, deltap.NormInfinity()*1e-4);
-
-               buildNormalEquation(tieSet, A, residue, projResidue, deltap_scale);
-               olddamping = 0.0;
-
-               found = ( projResidue.NormInfinity() <= minResidue );
-               //update damping factor
-               damping *= std::max( 1.0/3.0, 1.0-std::pow((2.0*res_reduction-1.0),3));
-               damping_speed = 2.0;
-               decrease = true;
-            } else {
-               //cancel parameter update
-               for(int n=0;n<np;++n)
-               {
-                  setAdjustableParameter(n, nparm(n+1), false); //do not update right now
-               }
-               adjustableParametersChanged();
-
-               damping *= damping_speed;
-               damping_speed *= 2.0;
-            }
-         }
-      } while (!decrease && !found);
-      ++iter;
-   }
-
-//DEBUG TBR
-cout<<endl;
-
-   //compute parameter correlation
-   // use normal matrix inverse
-   //TBD
-
-   return ki2/nobs;
-#endif
-}
-
-void
-ossimRpcProjection::buildNormalEquation(const ossimTieGptSet& tieSet,
-                                      NEWMAT::SymmetricMatrix& A,
-                                      NEWMAT::ColumnVector& residue,
-                                      NEWMAT::ColumnVector& projResidue,
-                                      double pstep_scale)
-{
-   //goal:       build Least Squares system
-   //constraint: never store full Jacobian matrix in memory (can be huge)
-   //            so we build the matrices incrementally
-   // the system can be built using forward() or inverse() depending on the projection capabilities : useForward()
-   //
-   //TBD : add covariance matrix for each tie point
-
-   //init
-   int np = getNumberOfAdjustableParameters();
-   int dimObs;
-   bool useImageObs = useForward(); //caching
-   if (useImageObs)
-   {
-      dimObs = 2; //image observation
-   } else {
-      dimObs = 3; //ground observations
-   }
-   int no = dimObs * tieSet.size(); //number of observations
-
-   A.ReSize(np);
-   residue.ReSize(no);
-   projResidue.ReSize(np);
-   //Zeroify matrices that will be accumulated
-   A           = 0.0;
-   projResidue = 0.0;
-
-   const vector<ossimRefPtr<ossimTieGpt> >& theTPV = tieSet.getTiePoints();
-   vector<ossimRefPtr<ossimTieGpt> >::const_iterator tit;
-   unsigned long c=1;
-
-   if (useImageObs)
-   { 
-     //image observations 
-     ossimDpt* imDerp = new ossimDpt[np];
-     ossimDpt resIm;
-     // loop on tie points
-      for (tit = theTPV.begin() ; tit != theTPV.end() ; ++tit)
-      {
-         //compute residue
-         resIm = (*tit)->tie - forward(*(*tit));
-         residue(c++) = resIm.x;
-         residue(c++) = resIm.y;
-
-         //compute all image derivatives regarding parametres for the tie point position
-         for(int p=0;p<np;++p)
-         {
-            imDerp[p] = getForwardDeriv( p , *(*tit) , pstep_scale);
-         }
-
-         //compute influence of tie point on all sytem elements
-         for(int p1=0;p1<np;++p1)
-         {        
-            //proj residue: J * residue
-            projResidue.element(p1) += imDerp[p1].x * resIm.x + imDerp[p1].y * resIm.y;
-
-            //normal matrix A = transpose(J)*J
-            for(int p2=p1;p2<np;++p2)
-            {
-               A.element(p1,p2) += imDerp[p1].x * imDerp[p2].x + imDerp[p1].y * imDerp[p2].y;
-            }
-         }
-      }
-      delete []imDerp;
-   }
-   else
-   {
-      // ground observations
-      std::vector<ossimGpt> gdDerp(np);
-      ossimGpt gd, resGd;
-      // loop on tie points
-      for (tit = theTPV.begin() ; tit != theTPV.end() ; ++tit)
-      {
-         //compute residue
-         gd = inverse((*tit)->tie);
-         residue(c++) = resGd.lon = ((*tit)->lon - gd.lon) * 100000.0;
-         residue(c++) = resGd.lat = ((*tit)->lat - gd.lat) * 100000.0 * cos(gd.lat / 180.0 * M_PI);
-         residue(c++) = resGd.hgt = (*tit)->hgt - gd.hgt; //TBD : normalize to meters?
-
-         //compute all image derivatives regarding parametres for the tie point position
-         for(int p=0;p<np;++p)
-         {
-            gdDerp[p] = getInverseDeriv( p , (*tit)->tie, pstep_scale);
-         }
-
-         //compute influence of tie point on all sytem elements
-         for(int p1=0;p1<np;++p1)
-         {        
-            //proj residue: J * residue
-            projResidue.element(p1) += gdDerp[p1].lon * resGd.lon + gdDerp[p1].lat * resGd.lat + gdDerp[p1].hgt * resGd.hgt; //TBC
-
-            //normal matrix A = transpose(J)*J
-            for(int p2=p1;p2<np;++p2)
-            {
-               A.element(p1,p2) += gdDerp[p1].lon * gdDerp[p2].lon + gdDerp[p1].lat * gdDerp[p2].lat + gdDerp[p1].hgt * gdDerp[p2].hgt;
-            }
-         }
-      }
-   } //end of if (useImageObs)
-}
-
-NEWMAT::ColumnVector
-ossimRpcProjection::getResidue(const ossimTieGptSet& tieSet)
-{
-   //init
-   NEWMAT::ColumnVector residue;
-   int dimObs;
-
-   bool useImageObs = useForward(); //caching
-   if (useImageObs)
-   {
-      dimObs = 2; //image observation
-   } else {
-      dimObs = 3; //ground observations
-   }
-   int no = dimObs * tieSet.size(); //number of observations
-
-   residue.ReSize(no);
-
-   const vector<ossimRefPtr<ossimTieGpt> >& theTPV = tieSet.getTiePoints();
-   vector<ossimRefPtr<ossimTieGpt> >::const_iterator tit;
-   unsigned long c=1;
-
-   if (useImageObs)
-   { 
-     //image observations 
-     ossimDpt resIm;
-     // loop on tie points
-      for (tit = theTPV.begin() ; tit != theTPV.end() ; ++tit)
-      {
-         //compute residue
-         resIm = (*tit)->tie - forward(**tit);
-         residue(c++) = resIm.x;
-         residue(c++) = resIm.y;
-      }
-   } else {
-      // ground observations
-      ossimGpt gd;
-      // loop on tie points
-      for (tit = theTPV.begin() ; tit != theTPV.end() ; ++tit)
-      {
-         //compute residue
-         gd = inverse((*tit)->tie);
-         residue(c++) = ((*tit)->lon - gd.lon) * 100000.0; //approx meters //TBC TBD
-         residue(c++) = ((*tit)->lat - gd.lat) * 100000.0 * cos(gd.lat / 180.0 * M_PI);
-         residue(c++) = (*tit)->hgt - gd.hgt; //meters
-      }
-   } //end of if (useImageObs)
-
-   return residue;
-}
-
-/*!
- * solves Ax = r , with A symmetric positive definite
- * A can be rank deficient
- * size of A is typically between 10 and 100 rows
- */
-NEWMAT::ColumnVector 
-ossimRpcProjection::solveLeastSquares(NEWMAT::SymmetricMatrix& A,  NEWMAT::ColumnVector& r)const
-{
-   NEWMAT::ColumnVector x = invert(A)*r;
-   return x;
-}
-
-/** 
- * stable invert stolen from ossimRpcSolver
- */
-NEWMAT::Matrix 
-ossimRpcProjection::invert(const NEWMAT::Matrix& m)const
-{
-   ossim_uint32 idx = 0;
-   NEWMAT::DiagonalMatrix d;
-   NEWMAT::Matrix u;
-   NEWMAT::Matrix v;
-
-   // decompose m.t*m which is stored in Temp into the singular values and vectors.
-   //
-   NEWMAT::SVD(m, d, u, v, true, true);
-   
-   // invert the diagonal
-   // this is just doing the reciprical fo all diagonal components and store back int
-   // d.  ths compute d inverse.
-   //
-   for(idx=0; idx < (ossim_uint32)d.Ncols(); ++idx)
-   {
-      if(d[idx] > 1e-14) //TBC : use DBL_EPSILON ?
-      {
-         d[idx] = 1.0/d[idx];
-      }
-      else
-      {
-         d[idx] = 0.0;
-
-//DEBUG TBR
-cout<<"warning: singular matrix in SVD"<<endl;
-
-      }
-   }
-
-   //compute inverse of decomposed m;
-   return v*d*u.t();
-}
diff --git a/src/ossim/projection/ossimRpcSolver.cpp b/src/ossim/projection/ossimRpcSolver.cpp
deleted file mode 100644
index f61d462..0000000
--- a/src/ossim/projection/ossimRpcSolver.cpp
+++ /dev/null
@@ -1,827 +0,0 @@
-//*****************************************************************************
-// FILE: ossimRpcModel.h
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// AUTHOR: Garrett Potts
-//
-//*****************************************************************************
-//  $Id: ossimRpcSolver.cpp 18960 2011-02-25 12:07:18Z gpotts $
-
-#include <cstdlib>
-#include <ctime>
-#include <iomanip>
-#include <iostream>
-#include <iterator>
-
-#include <ossim/projection/ossimRpcSolver.h>
-#include <ossim/projection/ossimRpcModel.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/matrix/newmatap.h>
-#include <ossim/matrix/newmatio.h>
-#include <ossim/matrix/newmatnl.h>
-#include <ossim/matrix/newmatio.h>
-#include <ossim/elevation/ossimElevManager.h>
-#include <ossim/support_data/ossimNitfRpcBTag.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/base/ossim2dTo2dIdentityTransform.h>
-ossimRpcSolver::ossimRpcSolver(bool useElevation,
-                               bool useHeightAboveMSLFlag)
-{
-   theUseElevationFlag   = useElevation;
-   theHeightAboveMSLFlag = useHeightAboveMSLFlag;
-   theXNumCoeffs.resize(20);
-   theXDenCoeffs.resize(20);
-   theYNumCoeffs.resize(20);
-   theYDenCoeffs.resize(20);
-
-   std::fill(theXNumCoeffs.begin(),
-             theXNumCoeffs.end(), 0.0);
-   std::fill(theXDenCoeffs.begin(),
-             theXDenCoeffs.end(), 0.0);
-   std::fill(theYNumCoeffs.begin(),
-             theYNumCoeffs.end(), 0.0);
-   std::fill(theYDenCoeffs.begin(),
-             theYDenCoeffs.end(), 0.0);
-   theXNumCoeffs[0] = 1.0;
-   theXDenCoeffs[0] = 1.0;
-   theYNumCoeffs[0] = 1.0;
-   theYDenCoeffs[0] = 1.0;
-}
-
-void ossimRpcSolver::solveCoefficients(const ossimDrect& imageBounds,
-                                       ossimProjection* proj,
-                                       ossim_uint32 xSamples,
-                                       ossim_uint32 ySamples,
-                                       bool shiftTo0Flag)
-{
-   ossimRefPtr<ossimImageGeometry> geom = new ossimImageGeometry();
-   geom->setProjection(proj);
-   solveCoefficients(imageBounds, geom.get(), xSamples, ySamples, shiftTo0Flag);
-}
-
-void ossimRpcSolver::solveCoefficients(const ossimDrect& imageBounds,
-                                       ossimImageGeometry* geom,
-                                       ossim_uint32 xSamples,
-                                       ossim_uint32 ySamples,
-                                       bool shiftTo0Flag)
-{
-   std::vector<ossimGpt> theGroundPoints;
-   std::vector<ossimDpt> theImagePoints;
-   ossim_uint32 x,y;
-   ossim_float64 w = imageBounds.width();
-   ossim_float64 h = imageBounds.height();
-   ossimGpt gpt;
-   ossimGpt defaultGround;
-   if(ySamples < 1) ySamples = 12;
-   if(xSamples < 1) xSamples = 12;
-   srand(time(0));
-   double xnorm;
-   double ynorm;
-   ossimDpt ul = imageBounds.ul();
-   ossimDpt shiftTo0(-ul.x,
-                     -ul.y);
-   for(y = 0; y < ySamples; ++y)
-   {
-      for(x = 0; x < xSamples; ++x)
-      {
-         if(ySamples > 1)
-         {
-//            ynorm = (double)y/(double)(ySamples-1.0);
-            ynorm = (double)y/(double)(ySamples);
-         }
-         else
-         {
-            ynorm = 0.0;
-         }
-         if(xSamples > 1)
-         {
-//            xnorm = (double)x/(double)(xSamples-1.0);
-            xnorm = (double)x/(double)(xSamples);
-         }
-         else
-         {
-            xnorm = 0.0;
-         }
-         
-//          ossimDpt dpt((.25 + .5*xnorm)*w + ul.x,
-//                       (.25 + .5*ynorm)*h + ul.y);
-         ossimDpt dpt(w*xnorm + ul.x,
-                      h*ynorm + ul.y);
-         
-         geom->localToWorld(dpt, gpt);
-         gpt.changeDatum(defaultGround.datum());
-
-         if(shiftTo0Flag)
-         {
-            theImagePoints.push_back(dpt+shiftTo0);
-         }
-         else
-         {
-            theImagePoints.push_back(dpt);
-         }
-         if(theHeightAboveMSLFlag)
-         {
-            double h = ossimElevManager::instance()->getHeightAboveMSL(gpt);
-            if(ossim::isnan(h) == false)
-            {
-               gpt.height(h);
-            }
-         }
-         if(gpt.isHgtNan())
-         {
-            gpt.height(0.0);
-         }
-         theGroundPoints.push_back(gpt);
-      }
-   }
-   solveCoefficients(theImagePoints,
-                     theGroundPoints);
-}
-
-void ossimRpcSolver::solveCoefficients(const std::vector<ossimDpt>& imagePoints,
-                                       const std::vector<ossimGpt>& groundControlPoints,
-                                       const ossimDpt& /* imageShift */)
-{
-   if((imagePoints.size() != groundControlPoints.size()))
-   {
-      return;
-   }
-
-   // we will first create f which holds the result of f(x,y,z).
-   // This basically holds the cooresponding image point for each
-   // ground control point.  One for x and a second array for y
-   //
-   std::vector<double> f[2];
-
-   //  Holds the x, y, z vectors
-   //
-   std::vector<double> x;
-   std::vector<double> y;
-   std::vector<double> z;
-   ossim_uint32 c = 0;
-   f[0].resize(imagePoints.size());
-   f[1].resize(imagePoints.size());
-   x.resize(imagePoints.size());
-   y.resize(imagePoints.size());
-   z.resize(imagePoints.size());
-
-   // compute the image bounds for the given image points
-   //
-   ossimDrect rect(imagePoints);
-
-   // get the widtha dn height that will be used
-   // in data normalization
-   //
-   ossim_float64 w = rect.width();
-   ossim_float64 h = rect.height();
-
-   // setup scales for normalization
-//   ossim_float64 xScale = w/2.0;
-//   ossim_float64 yScale = h/2.0;
-
-   // get the shift for the cneter of the data
-   ossimDpt centerImagePoint  = rect.midPoint();
-   
-   double latSum=0.0;
-   double lonSum=0.0;
-   double heightSum=0.0;
-
-   // find the center ground  Use elevation only if its enabled
-   //
-   for(c = 0; c < groundControlPoints.size();++c)
-   {
-      if(ossim::isnan(groundControlPoints[c].latd()) == false)
-      {
-         latSum += groundControlPoints[c].latd();
-      }
-      if(ossim::isnan(groundControlPoints[c].lond()) == false)
-      {
-         lonSum += groundControlPoints[c].lond();
-      }
-      if(!groundControlPoints[c].isHgtNan())
-      {
-         if(theUseElevationFlag)
-         {
-            heightSum += groundControlPoints[c].height();
-         }
-      }
-   }
-
-   // set the center ground for the offset
-   //
-   ossimGpt centerGround(latSum/groundControlPoints.size(),
-                         lonSum/groundControlPoints.size(),
-                         heightSum/groundControlPoints.size());
-
-   // set up ground scales and deltas for normalization
-   //
-//   ossim_float64 latScale       = 0.0;
-//   ossim_float64 lonScale       = 0.0;
-//   ossim_float64 heightScale    = 0.0;
-   ossim_float64 deltaLat       = 0.0;
-   ossim_float64 deltaLon       = 0.0;
-   ossim_float64 deltaHeight    = 0.0;
-   ossim_float64 maxDeltaLat    = 0.0;
-   ossim_float64 maxDeltaLon    = 0.0;
-   ossim_float64 maxDeltaHeight = 0.0;
-   ossim_float64 heightTest       = 0.0;
-   for(c = 0; c < groundControlPoints.size(); ++c)
-   {
-      deltaLat = (groundControlPoints[c].latd()-centerGround.latd());
-      deltaLon = (groundControlPoints[c].lond()-centerGround.lond());
-      if(!groundControlPoints[c].isHgtNan())
-      {
-         if(theUseElevationFlag)
-         {
-            deltaHeight = groundControlPoints[c].height() - centerGround.height();
-            heightTest  = groundControlPoints[c].height();
-         }
-         else
-         {
-            deltaHeight = 0.0;
-            heightTest  = 0.0;
-         }
-      }
-      else
-      {
-         deltaHeight = 0.0;
-      }
-      f[0][c] = (imagePoints[c].x - centerImagePoint.x)/(w/2.0);
-      f[1][c] = (imagePoints[c].y - centerImagePoint.y)/(h/2.0);
-      
-      x[c] = deltaLon;
-      y[c] = deltaLat;
-      z[c] = deltaHeight;
-
-      if(fabs(deltaLat) > maxDeltaLat) maxDeltaLat          = fabs(deltaLat);
-      if(fabs(deltaLon) > maxDeltaLon) maxDeltaLon          = fabs(deltaLon);
-      if(fabs(heightTest) > maxDeltaHeight) maxDeltaHeight  = fabs(heightTest);
-   }
-   bool elevationEnabled = theUseElevationFlag;
-   // always normalize, except if too small
-   //
-   // if max delta is less than a degree set it to 1 degree.
-   //
-   if(maxDeltaLat < 1.0)    maxDeltaLat = 1.0;
-   // if max delta is less than 1 degree then set it to 1.0 degree
-   if(maxDeltaLon < 1.0)    maxDeltaLon = 1.0;
-
-   if(fabs(maxDeltaHeight) < FLT_EPSILON) elevationEnabled = false;
-   // if max delta is less than a meter then set it to a meter.
-   if(maxDeltaHeight < 1.0) maxDeltaHeight = 1.0;
-
-   // set the height scale to something pretty large
-   if(!elevationEnabled)
-   {
-      maxDeltaHeight = 1.0/DBL_EPSILON;
-      centerGround.height(0.0);
-   }
-   // normalize the ground points
-   for(c = 0; c < groundControlPoints.size(); ++c)
-   {
-      x[c] /= maxDeltaLon;
-      y[c] /= maxDeltaLat;
-      z[c] /= maxDeltaHeight;
-   }
-
-   theLatScale    = maxDeltaLat;
-   theLonScale    = maxDeltaLon;
-   theHeightScale = maxDeltaHeight;
-
-   theImageOffset = centerImagePoint;
-   theImageScale  = ossimDpt(w/2.0,
-                             h/2.0);
-   theGroundOffset = centerGround;
-
-   if(ossim::isnan(theGroundOffset.height()))
-   {
-      theGroundOffset.height(0.0);
-   }
-
-   // now lets solve the coefficients
-   //
-   std::vector<double> coeffx;
-   std::vector<double> coeffy;
-
-   NEWMAT::ColumnVector coeffxVec;
-   NEWMAT::ColumnVector coeffyVec;
-   // perform a least squares fit for sample values found in f
-   // given the world values with variables x, y, z
-   //
-   solveCoefficients(coeffxVec,
-                     f[0],
-                     x,
-                     y,
-                     z);
-
-   
-   // perform a least squares fit for line values found in f
-   // given the world values with variables x, y, z
-   //
-   solveCoefficients(coeffyVec,
-                     f[1],
-                     x,
-                     y,
-                     z);
-
-   coeffx.resize(coeffxVec.Nrows());
-   coeffy.resize(coeffyVec.Nrows());
-   
-   for(c = 0; c < coeffx.size();++c)
-   {
-      coeffx[c] = coeffxVec[c];
-      coeffy[c] = coeffyVec[c];
-   }
-   // there are 20 numerator coefficients
-   // and 19 denominator coefficients
-   // I believe that the very first one for the
-   // denominator coefficients is fixed at 1.0
-   //
-   std::copy(coeffx.begin(),
-             coeffx.begin()+20,
-             theXNumCoeffs.begin());
-   std::copy(coeffx.begin()+20,
-             coeffx.begin()+39,
-             theXDenCoeffs.begin()+1);
-   std::copy(coeffy.begin(),
-             coeffy.begin()+20,
-             theYNumCoeffs.begin());
-   std::copy(coeffy.begin()+20,
-             coeffy.begin()+39,
-             theYDenCoeffs.begin()+1);
-   theXDenCoeffs[0] = 1.0;
-   theYDenCoeffs[0] = 1.0;
-
-
-   // now lets compute the RMSE for the given control points by feeding it
-   // back through the modeled RPC
-   //
-   ossim_float64  sumSquareError = 0.0;
-   ossim_uint32 idx = 0;
-
-//    std::cout << "ground offset height = " << theGroundOffset.height()
-//              << "Height scale         = " << theHeightScale << std::endl;
-   for (idx = 0; idx<imagePoints.size(); idx++)
-   {
-      ossim_float64 x = (groundControlPoints[idx].lond() - theGroundOffset.lond())/theLonScale;
-      ossim_float64 y = (groundControlPoints[idx].latd() - theGroundOffset.latd())/theLatScale;
-      ossim_float64 z = (groundControlPoints[idx].height() - theGroundOffset.height())/theHeightScale;
-      
-      if(ossim::isnan(z))
-      {
-         z = 0.0;
-      }
-      else
-      {
-         z = (z - theGroundOffset.height()/theHeightScale);
-      }
-       ossim_float64 imageX = ((eval(theXNumCoeffs, x, y, z)/
-                                eval(theXDenCoeffs, x, y, z))*theImageScale.x) + theImageOffset.x;
-      
-       ossim_float64 imageY = ((eval(theYNumCoeffs, x, y, z)/
-                                eval(theYDenCoeffs, x, y, z))*theImageScale.y) + theImageOffset.y;
-      
-      ossimDpt evalPt(imageX, imageY);
-      ossim_float64 len = (evalPt - imagePoints[idx]).length();
-      
-      sumSquareError += (len*len);
-   }
-
-   // set the error
-   //
-   theError = sqrt(sumSquareError/imagePoints.size());
-}
-
-ossimImageGeometry* ossimRpcSolver::createRpcModel()const
-{
-   ossimRpcModel* model = new ossimRpcModel;
-   
-   model->setAttributes(theImageOffset.x,
-                        theImageOffset.y,
-                        theImageScale.x,
-                        theImageScale.y,
-                        theGroundOffset.latd(),
-                        theGroundOffset.lond(),
-                        theGroundOffset.height(),
-                        theLatScale,
-                        theLonScale,
-                        theHeightScale,
-                        theXNumCoeffs,
-                        theXDenCoeffs,
-                        theYNumCoeffs,
-                        theYDenCoeffs);
-   return new ossimImageGeometry(new ossim2dTo2dIdentityTransform, model);
-}
-
-ossimImageGeometry* ossimRpcSolver::createRpcProjection()const
-{
-   ossimRpcProjection* proj = new ossimRpcProjection;
-   
-   proj->setAttributes(theImageOffset.x,
-                       theImageOffset.y,
-                       theImageScale.x,
-                       theImageScale.y,
-                       theGroundOffset.latd(),
-                       theGroundOffset.lond(),
-                       theGroundOffset.height(),
-                       theLatScale,
-                       theLonScale,
-                       theHeightScale,
-                       theXNumCoeffs,
-                       theXDenCoeffs,
-                       theYNumCoeffs,
-                       theYDenCoeffs);
-   return new ossimImageGeometry(new ossim2dTo2dIdentityTransform, proj);
-}
-
-const std::vector<double>& ossimRpcSolver::getImageXNumCoefficients()const
-{
-   return theXNumCoeffs;
-}
-
-const std::vector<double>& ossimRpcSolver::getImageXDenCoefficients()const
-{
-   return theXDenCoeffs;
-}
-
-const std::vector<double>& ossimRpcSolver::getImageYNumCoefficients()const
-{
-   return theYNumCoeffs;
-}
-
-const std::vector<double>& ossimRpcSolver::getImageYDenCoefficients()const
-{
-   return theYDenCoeffs;
-}
-
-double ossimRpcSolver::getImageXOffset()const
-{
-   return theImageOffset.x;
-}
-
-double ossimRpcSolver::getImageYOffset()const
-{
-   return theImageOffset.y;
-}
-
-double ossimRpcSolver::getLatOffset()const
-{
-   return theGroundOffset.latd();
-}
-
-double ossimRpcSolver::getLonOffset()const
-{
-   return theGroundOffset.lond();
-}
-
-double ossimRpcSolver::getHeightOffset()const
-{
-   return theGroundOffset.height();
-}
-
-double ossimRpcSolver::getImageXScale()const
-{
-   return theImageScale.x;
-}
-
-double ossimRpcSolver::getImageYScale()const
-{
-   return theImageScale.y;
-}
-
-double ossimRpcSolver::getLatScale()const
-{
-   return theLatScale;
-}
-
-double ossimRpcSolver::getLonScale()const
-{
-   return theLonScale;
-}
-
-double ossimRpcSolver::getHeightScale()const
-{
-   return theHeightScale;
-}
-
-double ossimRpcSolver::getRmsError()const
-{
-   return theError;
-}
-
-void ossimRpcSolver::solveInitialCoefficients(NEWMAT::ColumnVector& coeff,
-                                              const std::vector<double>& f,
-                                              const std::vector<double>& x,
-                                              const std::vector<double>& y,
-                                              const std::vector<double>& z)const
-{
-   ossim_uint32 idx = 0;
-   NEWMAT::Matrix m;
-   NEWMAT::ColumnVector r((int)f.size());
-   for(idx = 0; idx < f.size(); ++idx)
-   {
-      r[idx] = f[idx];
-   }
-   setupSystemOfEquations(m,
-                          r,
-                          x,
-                          y,
-                          z);
-   
-   coeff = invert(m.t()*m)*m.t()*r;
-}
-
-void ossimRpcSolver::solveCoefficients(NEWMAT::ColumnVector& coeff,
-                                       const std::vector<double>& f,
-                                       const std::vector<double>& x,
-                                       const std::vector<double>& y,
-                                       const std::vector<double>& z)const
-{
-   // this is an iterative  linear least square fit.  We really pobably need
-   // a nonlinear fit instead
-   //
-   ossim_uint32 idx = 0;
-   NEWMAT::Matrix m;
-
-   NEWMAT::ColumnVector r((int)f.size());
-
-   for(idx = 0; idx < f.size(); ++idx)
-   {
-      r[idx] = f[idx];
-   }
-
-   NEWMAT::ColumnVector tempCoeff;
-   NEWMAT::DiagonalMatrix weights((int)f.size());
-   NEWMAT::ColumnVector denominator(20);
-
-   // initialize the weight matrix to the identity
-   //
-   for(idx = 0; idx < f.size(); ++idx)
-   {
-      weights[idx] = 1.0;
-   }
-
-   double residualValue = 1.0/FLT_EPSILON;
-   ossim_uint32 iterations = 0;
-   NEWMAT::Matrix w2;
-   do
-   {
-      w2 = weights*weights;
-
-      // sets up the matrix to hold the system of
-      // equations
-      setupSystemOfEquations(m,
-                             r,
-                             x,
-                             y,
-                             z);
-
-      // solve the least squares solution.  Note: the invert is used
-      // to do a Singular Value Decomposition for the inverse since the
-      // matrix is more than likely singular.  Slower but more robust
-      //
-      tempCoeff = invert(m.t()*w2*m)*m.t()*w2*r;
-
-      // set up the weight matrix by using the denominator
-      //
-      for(idx = 0; idx < 19; ++idx)
-      {
-         denominator[idx+1] = tempCoeff[20+idx];
-      }
-      denominator[0] = 1.0;
-      
-      setupWeightMatrix(weights,
-                        denominator,
-                        r,
-                        x,
-                        y,
-                        z);
-
-      // compute the residual
-      //
-      NEWMAT::ColumnVector residual = m.t()*w2*(m*tempCoeff-r);
-
-      // now get the innerproduct
-      //
-      NEWMAT::Matrix tempRes = (residual.t()*residual);
-      residualValue = tempRes[0][0];
-
-      ++iterations;
-      
-   }while((residualValue >FLT_EPSILON)&&
-          (iterations < 10));
-   coeff = tempCoeff;
-
-}
-
-NEWMAT::Matrix ossimRpcSolver::invert(const NEWMAT::Matrix& m)const
-{
-   ossim_uint32 idx = 0;
-   NEWMAT::DiagonalMatrix d;
-   NEWMAT::Matrix u;
-   NEWMAT::Matrix v;
-
-   // decompose m.t*m which is stored in Temp into the singular values and vectors.
-   //
-   NEWMAT::SVD(m, d, u, v, true, true);
-   
-   // invert the diagonal
-   // this is just doing the reciprical fo all diagonal components and store back int
-   // d.  ths compute d inverse.
-   //
-   for(idx=0; idx < (ossim_uint32)d.Ncols(); ++idx)
-   {
-      if(d[idx] > FLT_EPSILON)
-      {
-         d[idx] = 1.0/d[idx];
-      }
-      else
-      {
-         d[idx] = 0.0;
-      }
-   }
-
-   //compute inverse of decomposed m;
-   return v*d*u.t();
-}
-
-
-void ossimRpcSolver::setupSystemOfEquations(NEWMAT::Matrix& equations,
-                                            const NEWMAT::ColumnVector& f,
-                                            const std::vector<double>& x,
-                                            const std::vector<double>& y,
-                                            const std::vector<double>& z)const
-{
-   ossim_uint32 idx;
-   equations.ReSize(f.Nrows(),
-                    39);
-   
-   for(idx = 0; idx < (ossim_uint32)f.Nrows();++idx)
-   {
-      equations[idx][0]  = 1;
-      equations[idx][1]  = x[idx];
-      equations[idx][2]  = y[idx];
-      equations[idx][3]  = z[idx];
-      equations[idx][4]  = x[idx]*y[idx];
-      equations[idx][5]  = x[idx]*z[idx];
-      equations[idx][6]  = y[idx]*z[idx];
-      equations[idx][7]  = x[idx]*x[idx];
-      equations[idx][8]  = y[idx]*y[idx];
-      equations[idx][9]  = z[idx]*z[idx];
-      equations[idx][10] = x[idx]*y[idx]*z[idx];
-      equations[idx][11] = x[idx]*x[idx]*x[idx];
-      equations[idx][12] = x[idx]*y[idx]*y[idx];
-      equations[idx][13] = x[idx]*z[idx]*z[idx];
-      equations[idx][14] = x[idx]*x[idx]*y[idx];
-      equations[idx][15] = y[idx]*y[idx]*y[idx];
-      equations[idx][16] = y[idx]*z[idx]*z[idx];
-      equations[idx][17] = x[idx]*x[idx]*z[idx];
-      equations[idx][18] = y[idx]*y[idx]*z[idx];
-      equations[idx][19] = z[idx]*z[idx]*z[idx];
-      equations[idx][20] = -f[idx]*x[idx];
-      equations[idx][21] = -f[idx]*y[idx];
-      equations[idx][22] = -f[idx]*z[idx];
-      equations[idx][23] = -f[idx]*x[idx]*y[idx];
-      equations[idx][24] = -f[idx]*x[idx]*z[idx];
-      equations[idx][25] = -f[idx]*y[idx]*z[idx];
-      equations[idx][26] = -f[idx]*x[idx]*x[idx];
-      equations[idx][27] = -f[idx]*y[idx]*y[idx];
-      equations[idx][28] = -f[idx]*z[idx]*z[idx];
-      equations[idx][29] = -f[idx]*x[idx]*y[idx]*z[idx];
-      equations[idx][30] = -f[idx]*x[idx]*x[idx]*x[idx];
-      equations[idx][31] = -f[idx]*x[idx]*y[idx]*y[idx];
-      equations[idx][32] = -f[idx]*x[idx]*z[idx]*z[idx];
-      equations[idx][33] = -f[idx]*x[idx]*x[idx]*y[idx];
-      equations[idx][34] = -f[idx]*y[idx]*y[idx]*y[idx];
-      equations[idx][35] = -f[idx]*y[idx]*z[idx]*z[idx];
-      equations[idx][36] = -f[idx]*x[idx]*x[idx]*z[idx];
-      equations[idx][37] = -f[idx]*y[idx]*y[idx]*z[idx];
-      equations[idx][38] = -f[idx]*z[idx]*z[idx]*z[idx];
-   }
-}
-
-void ossimRpcSolver::setupWeightMatrix(NEWMAT::DiagonalMatrix& result, // holds the resulting weights
-                                       const NEWMAT::ColumnVector& coefficients,
-                                       const NEWMAT::ColumnVector& f,
-                                       const std::vector<double>& x,
-                                       const std::vector<double>& y,
-                                       const std::vector<double>& z)const
-{
-   result.ReSize(f.Nrows());
-   ossim_uint32 idx = 0;
-   ossim_uint32 idx2 = 0;
-   NEWMAT::RowVector row(coefficients.Nrows());
-   
-    for(idx = 0; idx < (ossim_uint32)f.Nrows(); ++idx)
-    {
-       row[0]  = 1;
-       row[1]  = x[idx];
-       row[2]  = y[idx];
-       row[3]  = z[idx];
-       row[4]  = x[idx]*y[idx];
-       row[5]  = x[idx]*z[idx];
-       row[6]  = y[idx]*z[idx];
-       row[7]  = x[idx]*x[idx];
-       row[8]  = y[idx]*y[idx];
-       row[9]  = z[idx]*z[idx];
-       row[10] = x[idx]*y[idx]*z[idx];
-       row[11] = x[idx]*x[idx]*x[idx];
-       row[12] = x[idx]*y[idx]*y[idx];
-       row[13] = x[idx]*z[idx]*z[idx];
-       row[14] = x[idx]*x[idx]*y[idx];
-       row[15] = y[idx]*y[idx]*y[idx];
-       row[16] = y[idx]*z[idx]*z[idx];
-       row[17] = x[idx]*x[idx]*z[idx];
-       row[18] = y[idx]*y[idx]*z[idx];
-       row[19] = z[idx]*z[idx]*z[idx];
-
-      result[idx] = 0.0;
-      for(idx2 = 0; idx2 < (ossim_uint32)row.Ncols(); ++idx2)
-      {
-         result[idx] += row[idx2]*coefficients[idx2];
-      }
-
-      if(result[idx] > FLT_EPSILON)
-      {
-         result[idx] = 1.0/result[idx];
-      }
-    }
-}
-
-double ossimRpcSolver::eval(const std::vector<double>& coeff,
-                            double x,
-                            double y,
-                            double z)const
-{
-   return coeff[ 0]       + coeff[ 1]*x     + coeff[ 2]*y     + coeff[ 3]*z     +
-          coeff[ 4]*x*y   + coeff[ 5]*x*z   + coeff[ 6]*y*z   + coeff[ 7]*x*x   +
-          coeff[ 8]*y*y   + coeff[ 9]*z*z   + coeff[10]*x*y*z + coeff[11]*x*x*x +
-          coeff[12]*x*y*y + coeff[13]*x*z*z + coeff[14]*x*x*y + coeff[15]*y*y*y +
-          coeff[16]*y*z*z + coeff[17]*x*x*z + coeff[18]*y*y*z + coeff[19]*z*z*z;
-}
-
-
-ossimRefPtr<ossimNitfRegisteredTag> ossimRpcSolver::getNitfRpcBTag() const
-{
-   ossimNitfRpcBTag* rpcbTag = new ossimNitfRpcBTag();
-
-   // success always true
-   rpcbTag->setSuccess(true);
-
-   // temp "0"...
-   rpcbTag->setErrorBias(0.0);
-
-   // temp "0"...
-   rpcbTag->setErrorRand(0.0);
-
-   // line offset
-   rpcbTag->setLineOffset(static_cast<ossim_uint32>(getImageYOffset()));
-
-   // sample offset
-   rpcbTag->setSampleOffset(static_cast<ossim_uint32>(getImageXOffset()));
-
-   // latitude offset
-   rpcbTag->setGeodeticLatOffset(getLatOffset());
-
-   // longitude offset
-   rpcbTag->setGeodeticLonOffset(getLonOffset());
-
-   // height offset
-   rpcbTag->setGeodeticHeightOffset(
-      static_cast<ossim_int32>(getHeightOffset()));
-
-   // line scale
-   rpcbTag->setLineScale(static_cast<ossim_uint32>(getImageYScale()));
-
-   // sample scale
-   rpcbTag->setSampleScale(static_cast<ossim_uint32>(getImageXScale()));
-
-   // latitude scale
-   rpcbTag->setGeodeticLatScale(getLatScale());
-
-   // longitude scale
-   rpcbTag->setGeodeticLonScale(getLonScale());
-
-   // height scale
-   rpcbTag->setGeodeticHeightScale(static_cast<ossim_int32>(getHeightScale()));
-
-   // line numerator coefficients
-   rpcbTag->setLineNumeratorCoeff(getImageYNumCoefficients());
-   
-   // line denominator coefficients
-   rpcbTag->setLineDenominatorCoeff(getImageYDenCoefficients());
-
-   // sample numerator coefficients
-   rpcbTag->setSampleNumeratorCoeff(getImageXNumCoefficients());
-
-   // sample denominator coefficients
-   rpcbTag->setSampleDenominatorCoeff(getImageXDenCoefficients());
-
-   // Return it as an ossimRefPtr<ossimNitfRegisteredTag>...
-   ossimRefPtr<ossimNitfRegisteredTag> tag = rpcbTag;
-   
-   return tag;
-}
diff --git a/src/ossim/projection/ossimSensorModel.cpp b/src/ossim/projection/ossimSensorModel.cpp
deleted file mode 100644
index 8aa771b..0000000
--- a/src/ossim/projection/ossimSensorModel.cpp
+++ /dev/null
@@ -1,1679 +0,0 @@
-//*****************************************************************************
-// FILE: ossimSensorModel.cc
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// AUTHOR: Oscar Kramer
-//
-// DESCRIPTION:
-//   Contains implementation of class ossimSensorModel. This is the base
-//   class to all sensor model-related projections including replacement
-//   models such as coarse grids and polynomial models. This base class
-//   supports adjustable parameters for registration adjustment.
-//
-//   Important note to sensor model implementors: In order to avoid a separate
-//   set of "initial adjustable parameters," this design assumes ALL initial
-//   values are 0. When designing the derived-class model, insure that the
-//   adjustable parameters are 0-based. This applies to the adjustable param
-//   array declared in this base class only. The derived classes can declare
-//   their own adjstable params that are more descriptive and that can be
-//   assigned an initial value thet is non-zero, but that are linearly related
-//   to the adjustable params of this class. In that case, the updateModel()
-//   method will compute the derived-class's parameters based on
-//   theAdjustableParams array, after an adjustment is made.
-//
-// LIMITATIONS: None.
-//
-//*****************************************************************************
-//  $Id: ossimSensorModel.cpp 21808 2012-10-05 14:23:33Z dhicks $
-#include <iostream>
-#include <sstream>
-using namespace std;
-
-// #include <stdio.h>
-
-#include <ossim/projection/ossimSensorModel.h>
-
-RTTI_DEF3(ossimSensorModel, "ossimSensorModel", ossimProjection, ossimOptimizableProjection, ossimAdjustableParameterInterface);
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimDatumFactory.h>
-
-#include <ossim/elevation/ossimElevManager.h>
-#include <ossim/base/ossimTieGptSet.h>
-
-#include <ossim/matrix/newmatrc.h>
-
-//***
-// Define Trace flags for use within this file:
-//***
-#include <ossim/base/ossimTrace.h>
-static ossimTrace traceExec  ("ossimSensorModel:exec");
-static ossimTrace traceDebug ("ossimSensorModel:debug");
-
-static const char*       REF_GPT_LAT_KW      = "ref_point_lat";
-static const char*       REF_GPT_LON_KW      = "ref_point_lon";
-static const char*       REF_GPT_HGT_KW      = "ref_point_hgt";
-static const char*       REF_IPT_LINE_KW     = "ref_point_line";
-static const char*       REF_IPT_SAMP_KW     = "ref_point_samp";
-static const char*       IMAGE_ID_KW         = "image_id";
-static const char*       SENSOR_ID_KW        = "sensor";
-static const ossimString NULL_STRING         = "NULL";
-static const double      RAY_ORIGIN_HEIGHT   = 10000.0; //meters
-
-
-//DEBUG TBR : output ops
-std::ostream& operator<<(std::ostream& os, NEWMAT::GeneralMatrix& mat)
-{
-   int nr=mat.Nrows();
-   int nc=mat.Ncols();
-
-   NEWMAT::MatrixRow crow(&mat,NEWMAT::LoadOnEntry);
-//   NEWMAT::MatrixRowCol crow;
-   mat.RestoreRow(crow);  
-   for (int r=0;r<nr;++r)
-   {
-      for (int c=0;c<nc;++c)
-      {
-         os<<*(crow.Data()+c)<<" ";
-      }
-      os<<std::endl;
-      mat.NextRow(crow);
-   }
-   return os;
-}
-
-//*****************************************************************************
-//  DEFAULT CONSTRUCTOR: ossimSensorModel()
-//*****************************************************************************
-ossimSensorModel::ossimSensorModel()
-   :
-   ossimOptimizableProjection       (),
-   ossimAdjustableParameterInterface(),
-   theImageSize        (0, 0),
-   theSubImageOffset   (0.0, 0.0),
-   theImageID          (),
-   theSensorID         (),
-   theGSD              (0.0, 0.0),
-   theMeanGSD          (0.0),
-   theRefGndPt         (0.0, 0.0, 0.0),
-   theRefImgPt         (0.0, 0.0),
-   theBoundGndPolygon  (),
-   theImageClipRect    (),
-   theRelPosError      (0),
-   theNominalPosError  (0),
-   theExtrapolateImageFlag(false),
-   theExtrapolateGroundFlag(false)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::ossimSensorModel(geom_kwl): entering..." << endl;
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::ossimSensorModel(geom_kwl): returning..." << std::endl;
-}
-
-//*****************************************************************************
-//  COPY CONSTRUCTOR: ossimSensorModel(ossimSensorModel)
-//*****************************************************************************
-ossimSensorModel::ossimSensorModel(const ossimSensorModel& model)
-   :
-   ossimOptimizableProjection(model),
-   ossimAdjustableParameterInterface(model),
-   theImageSize       (model.theImageSize),
-   theSubImageOffset  (model.theSubImageOffset),
-   theImageID         (model.theImageID),
-   theSensorID        (model.theSensorID),
-   theGSD             (model.theGSD),
-   theMeanGSD         (model.theMeanGSD),
-   theRefGndPt        (model.theRefGndPt),
-   theRefImgPt        (model.theRefImgPt),
-   theBoundGndPolygon (model.theBoundGndPolygon),
-   theImageClipRect   (model.theImageClipRect),
-   theRelPosError      (model.theRelPosError),
-   theNominalPosError (model.theNominalPosError),
-   theExtrapolateImageFlag(false),
-   theExtrapolateGroundFlag(false)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::ossimSensorModel(model): entering..." << std::endl;
-
-   theErrorStatus = model.theErrorStatus;
-   
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::ossimSensorModel(model): returning..." << std::endl;
-   return;
-}
-
-//*****************************************************************************
-//  CONSTRUCTOR: ossimSensorModel(geom_kwl)
-//  
-//  Constructs from a geometry keywordlist.
-//  
-//*****************************************************************************
-ossimSensorModel::ossimSensorModel(const ossimKeywordlist& geom_kwl)
-   :
-   ossimOptimizableProjection     (),
-   ossimAdjustableParameterInterface(),
-   theImageSize        (0, 0),
-   theSubImageOffset   (0.0, 0.0),
-   theImageID          (),
-   theSensorID         (),
-   theGSD              (0.0, 0.0),
-   theMeanGSD          (0.0),
-   theRefGndPt         (0.0, 0.0, 0.0),
-   theRefImgPt         (0.0, 0.0),
-   theBoundGndPolygon  (),
-   theImageClipRect    (),
-   theRelPosError      (0),
-   theNominalPosError      (0),
-   theExtrapolateImageFlag(false),
-   theExtrapolateGroundFlag(false)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::ossimSensorModel(geom_kwl): entering..." << std::endl;
-
-//   ossimElevManager::instance()->loadState(geom_kwl);
-   loadState(geom_kwl);
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::ossimSensorModel(geom_kwl): returning..." << std::endl;
-   return;
-}
-
-//*****************************************************************************
-//  DESTRUCTOR: ~ossimSensorModel
-//  
-//*****************************************************************************
-ossimSensorModel::~ossimSensorModel()
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::~ossimSensorModel: entering..." << std::endl;
-   
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::~ossimSensorModel: returning..." << std::endl;
-}
-
-ossimObject* ossimSensorModel::getBaseObject()
-{
-   return this;
-}
-
-const ossimObject* ossimSensorModel::getBaseObject()const
-{
-   return this;
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimSensorModel::lineSampleToWorld(image_pt, &gpt)
-//  
-//  Intersects the ray associated with image_pt with the available elevation
-//  model. Returns ground point
-//  
-//*****************************************************************************
-void ossimSensorModel::lineSampleToWorld(const ossimDpt& image_point,
-                                         ossimGpt&       gpt) const
-{
-   bool debug = false;  // setable via interactive debugger
-   if (traceExec() || debug)  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::lineSampleToWorld:entering..." << std::endl;
-   
-   if(image_point.hasNans())
-   {
-      gpt.makeNan();
-      return;
-   }
-   //***
-   // Extrapolate if image point is outside image:
-   //***
-   if (!insideImage(image_point)&&(!theExtrapolateImageFlag))
-   {
-      gpt = extrapolate(image_point);
-      return;
-   }
-
-   //***
-   // Determine imaging ray and invoke elevation source object's services to
-   // intersect ray with terrain model:
-   //***
-   ossimEcefRay ray;
-   imagingRay(image_point, ray);
-   ossimElevManager::instance()->intersectRay(ray, gpt);
-
-   if (traceDebug() || debug)
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "image_point = " << image_point << std::endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ray = " << ray << std::endl;
-      ossimNotify(ossimNotifyLevel_DEBUG) << "gpt = " << gpt << std::endl;
-   }
-
-   if (traceExec() || debug)  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::lineSampleToWorld: returning..." << std::endl;
-   return;
-}
-
-//*****************************************************************************
-//  METHOD: ossimSensorModel::worldToLineSample()
-//  
-//  Performs forward projection of ground point to image space.
-//  
-//*****************************************************************************
-void ossimSensorModel::worldToLineSample(const ossimGpt& worldPoint,
-                                         ossimDpt&       ip) const
-{
-   //   static bool recursionFlag = false;
-
-   static const double PIXEL_THRESHOLD    = .1; // acceptable pixel error
-   static const int    MAX_NUM_ITERATIONS = 20;
-
-
-   if(worldPoint.isLatNan()||
-      worldPoint.isLonNan())
-     {
-       ip.makeNan();
-       return;
-     }
-      
-   //***
-   // First check if the world point is inside bounding rectangle:
-   //***
-   int iters = 0;
-   ossimDpt wdp (worldPoint);
-   //   if ((!recursionFlag)&&!(theBoundGndPolygon.pointWithin(wdp)))
-
-   if((theBoundGndPolygon.getNumberOfVertices() > 0)&&
-      (!theBoundGndPolygon.hasNans()))
-   {
-      if (!(theBoundGndPolygon.pointWithin(wdp)))
-      {
-         if(theSeedFunction.valid())
-         {
-            theSeedFunction->worldToLineSample(worldPoint, ip);
-         }
-         else if(!theExtrapolateGroundFlag) // if I am not already in the extrapolation routine
-
-         {
-         //      recursionFlag = true;
-            ip = extrapolate(worldPoint);
-         //      recursionFlag = false;
-         }
-         return;
-      }         
-   }
-
-   //***
-   // Substitute zero for null elevation if present:
-   //***
-   double height = worldPoint.hgt;
-   if ( ossim::isnan(height) )
-   {
-      height = 0.0;
-   }
-
-   //
-   // Utilize iterative scheme for arriving at image point. Begin with guess
-   // at image center:
-   //
-   if(theSeedFunction.valid())
-   {
-      theSeedFunction->worldToLineSample(worldPoint, ip);
-   }
-   else
-   {
-      ip.u = theRefImgPt.u;
-      ip.v = theRefImgPt.v;
-   }
-   
-   ossimDpt ip_du;
-   ossimDpt ip_dv;
-
-   ossimGpt gp, gp_du, gp_dv;
-   double dlat_du, dlat_dv, dlon_du, dlon_dv;
-   double delta_lat, delta_lon, delta_u, delta_v;
-   double inverse_norm;
-   bool done = false;
-   //***
-   // Begin iterations:
-   //***
-   do
-   {
-      //***
-      // establish perturbed image points about the guessed point:
-      //***
-      ip_du.u = ip.u + 1.0;
-      ip_du.v = ip.v;
-      ip_dv.u = ip.u;
-      ip_dv.v = ip.v + 1.0;
-      
-      //***
-      // Compute numerical partials at current guessed point:
-      //***
-      lineSampleHeightToWorld(ip,    height, gp);
-      lineSampleHeightToWorld(ip_du, height, gp_du);
-      lineSampleHeightToWorld(ip_dv, height, gp_dv);
-
-      if(gp.isLatNan() || gp.isLonNan())
-      {
-         gp = extrapolate(ip);
-      }
-      if(gp_du.isLatNan() || gp_du.isLonNan())
-      {
-         gp_du = extrapolate(ip_du);
-      }
-      if(gp_dv.isLatNan() | gp_dv.isLonNan())
-      {
-         gp_dv = extrapolate(ip_dv);
-         
-      }
-      dlat_du = gp_du.lat - gp.lat; //e
-      dlon_du = gp_du.lon - gp.lon; //g
-      dlat_dv = gp_dv.lat - gp.lat; //f
-      dlon_dv = gp_dv.lon - gp.lon; //h
-      
-      //
-      // Test for convergence:
-      //
-      delta_lat = worldPoint.lat - gp.lat;
-      delta_lon = worldPoint.lon - gp.lon;
-
-
-      //
-      // Compute linearized estimate of image point given gp delta:
-      //
-      inverse_norm = dlat_dv*dlon_du - dlat_du*dlon_dv; // fg-eh
-      
-      if (!ossim::almostEqual(inverse_norm, 0.0, DBL_EPSILON))
-      {
-         delta_u = (-dlon_dv*delta_lat + dlat_dv*delta_lon)/inverse_norm;
-         delta_v = ( dlon_du*delta_lat - dlat_du*delta_lon)/inverse_norm;
-         ip.u += delta_u;
-         ip.v += delta_v;
-      }
-      else
-      {
-         delta_u = 0;
-         delta_v = 0;
-      }
-      done = ((fabs(delta_u) < PIXEL_THRESHOLD)&&
-              (fabs(delta_v) < PIXEL_THRESHOLD));
-      iters++;
-   } while ((!done) &&
-             (iters < MAX_NUM_ITERATIONS));
-//    } while (((fabs(delta_u) > PIXEL_THRESHOLD) ||
-//              (fabs(delta_v) > PIXEL_THRESHOLD)) &&
-//             (iters < MAX_NUM_ITERATIONS));
-
-   //***
-   // Note that this error mesage appears only if max count was reached while
-   // iterating. A linear (no iteration) solution would finish with iters =
-   // MAX_NUM_ITERATIONS + 1:
-   //***
-   if (iters >= MAX_NUM_ITERATIONS)
-   {
-//       std::cout << "MAX ITERATION!!!" << std::endl;
-//       std::cout << "delta_u = "   << delta_u
-//                 << "\ndelta_v = " << delta_v << "\n";
-   }
-   else
-   {
-//       std::cout << "ITERS === " << iters << std::endl;
-   }
-//    std::cout << "iters = " << iters << "\n";
-   //***
-   // The image point computed this way corresponds to full image space.
-   // Apply image offset in the case this is a sub-image rectangle:
-   //***
-      ip -= theSubImageOffset;
-
-   return;
-}
-
-//*****************************************************************************
-//  METHOD: ossimSensorModel::print(ostream)
-//  
-//  Dumps contents of object to ostream.
-//  
-//*****************************************************************************
-std::ostream& ossimSensorModel::print(std::ostream& out) const
-{
-   out << setprecision(15) << setiosflags(ios::fixed)
-       << "\n ossimSensorModel base-class data members:\n"
-       << "\n         theImageID: " << theImageID
-       << "\n        theSensorID: " << theSensorID
-       << "\n       theImageSize: " << theImageSize
-       << "\n  theSubImageOffset: " << theSubImageOffset
-       << "\n             theGSD: " << theGSD
-       << "\n         theMeanGSD: " << theMeanGSD
-       << "\n        theRefGndPt: " << theRefGndPt
-       << "\n        theRefImgPt: " << theRefImgPt
-       << "\n theBoundGndPolygon: \n" << theBoundGndPolygon
-       << "\n   theImageClipRect: " << theImageClipRect
-       << "\n theNominalPosError: " << theNominalPosError
-       << "\n     theNominalPosError: " << theNominalPosError
-       << "\n     theRelPosError: " << theRelPosError
-       << endl;
-
-   //---
-   // Note:
-   // need ossimAdjustableParameterInterface::print(os);
-   //---
-   return ossimProjection::print(out);
-}
-
-void ossimSensorModel::setRefImgPt(const ossimDpt& pt)
-{
-   theRefImgPt = pt;
-}
-
-void ossimSensorModel::setRefGndPt(const ossimGpt& pt)
-{
-   theRefGndPt = pt;
-}
-
-void ossimSensorModel::setImageRect(const ossimDrect& imageRect)
-{
-   theImageClipRect = imageRect;
-   theRefImgPt = imageRect.midPoint();
-}
-void ossimSensorModel::setGroundRect(const ossimGpt& ul,
-                                     const ossimGpt& ur,
-                                     const ossimGpt& lr,
-                                     const ossimGpt& ll)
-{
-   theBoundGndPolygon.clear();
-   theBoundGndPolygon.addPoint(ul);
-   theBoundGndPolygon.addPoint(ur);
-   theBoundGndPolygon.addPoint(lr);
-   theBoundGndPolygon.addPoint(ll);
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimSensorModel::saveState()
-//  
-//  Saves the state of this object to KWL.
-//  
-//*****************************************************************************
-bool ossimSensorModel::saveState(ossimKeywordlist& kwl,
-                                 const char*       prefix) const 
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::saveState: entering..." << std::endl;
-
-   kwl.add(prefix, IMAGE_ID_KW, theImageID.chars());
-   kwl.add(prefix, SENSOR_ID_KW, theSensorID.chars());
-   
-   kwl.add(prefix,
-           ossimKeywordNames::NUMBER_LINES_KW,
-           theImageSize.line,
-           true);
-   kwl.add(prefix,
-           ossimKeywordNames::NUMBER_SAMPLES_KW,
-           theImageSize.samp,
-           true);
-   
-   kwl.add(prefix,
-           REF_GPT_LAT_KW,
-           theRefGndPt.lat,
-           true);
-   
-   kwl.add(prefix,
-           REF_GPT_LON_KW,
-           theRefGndPt.lon,
-           true);
-   
-   kwl.add(prefix,
-           REF_GPT_HGT_KW,
-           theRefGndPt.hgt,
-           true);
-   
-   kwl.add(prefix,
-           REF_IPT_LINE_KW,
-           theRefImgPt.line,
-           true);
-      
-   kwl.add(prefix,
-           REF_IPT_SAMP_KW,
-           theRefImgPt.samp,
-           true);
-   
-   kwl.add(prefix,
-           ossimKeywordNames::METERS_PER_PIXEL_Y_KW,
-           theGSD.line,
-           true);
-   
-   kwl.add(prefix,
-           ossimKeywordNames::METERS_PER_PIXEL_X_KW,
-           theGSD.samp,
-           true);
-   
-   ossimDpt corner;
-   if(!theBoundGndPolygon.vertex(0, corner))
-   {
-      corner = ossimDpt(0,0);
-   }
-   
-   kwl.add(prefix,
-           ossimKeywordNames::UL_LAT_KW,
-           corner.lat,
-           true);
-   
-   kwl.add(prefix,
-           ossimKeywordNames::UL_LON_KW,
-           corner.lon,
-           true);
-   
-   if(!theBoundGndPolygon.nextVertex(corner))
-   {
-      corner = ossimDpt(0,0);
-   }
-   kwl.add(prefix,
-           ossimKeywordNames::UR_LAT_KW,
-           corner.lat,
-           true);
-   
-   kwl.add(prefix,
-           ossimKeywordNames::UR_LON_KW,
-           corner.lon,
-           true);
-   
-   if(!theBoundGndPolygon.nextVertex(corner))
-   {
-      corner = ossimDpt(0,0);
-   }
-   kwl.add(prefix,
-           ossimKeywordNames::LR_LAT_KW,
-           corner.lat,
-           true);
-   kwl.add(prefix,
-           ossimKeywordNames::LR_LON_KW,
-           corner.lon,
-           true);
-   
-   
-   if(!theBoundGndPolygon.nextVertex(corner))
-   {
-      corner = ossimDpt(0,0);
-   }
-   kwl.add(prefix,
-           ossimKeywordNames::LL_LAT_KW,
-           corner.lat,
-           true);
-   kwl.add(prefix,
-           ossimKeywordNames::LL_LON_KW,
-           corner.lon,
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::CE90_ABSOLUTE_KW,
-           theNominalPosError,
-           true, 20);
-
-   kwl.add(prefix,
-           ossimKeywordNames::CE90_RELATIVE_KW,
-           theRelPosError,
-           true, 20);
-
-   kwl.add(prefix,
-           "rect",
-           ossimString::toString(theImageClipRect.ul().x)
-           + " " + ossimString::toString(theImageClipRect.ul().y) + " " +
-           ossimString::toString(theImageClipRect.lr().x) + " " +
-           ossimString::toString(theImageClipRect.lr().y),
-           true);
-
-   // Avoid passing null char* to method that takes an ossimString.
-   ossimString tmpStr;
-   if (prefix)
-   {
-      tmpStr = prefix;
-   }
-   saveAdjustments(kwl, tmpStr);
-      
-   //
-   // Also save the state of the elevation object:
-   //
-//   ossimElevManager::instance()->saveState(kwl, prefix);
-   
-   
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::saveState:returning..." << std::endl;
-   return ossimProjection::saveState(kwl, prefix);;
-}
-
-//*****************************************************************************
-//  METHOD: ossimSensorModel::loadState()
-//  
-//  Loads the state of this object from KWL.
-//  
-//*****************************************************************************
-bool ossimSensorModel::loadState(const ossimKeywordlist& kwl,
-                                 const char*       prefix)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::loadState: entering..." << std::endl;
-
-   const char* keyword;
-   const char* value;
-//   int nconv;
-   ossimDpt v[4]; // temporarily holds vertices for ground polygon
-
-   //***
-   // Read each keyword, breaking out if error occurs:
-   //***
-   keyword = IMAGE_ID_KW;
-   value = kwl.find(prefix, keyword);
-   if (value)
-      theImageID = value;
-   else
-      theImageID = NULL_STRING;
-   
-   keyword = SENSOR_ID_KW;
-   value = kwl.find(prefix, keyword);
-   if (value)
-      theSensorID = value;
-   else
-      theSensorID = NULL_STRING;
-      
-   keyword = ossimKeywordNames::NUMBER_LINES_KW;//IMAGE_SIZE_LINES_KW;
-   value = kwl.find(prefix, keyword);
-   if (value)
-   {
-      theImageSize.line = ossimString(value).toLong();
-   }
-
-   keyword = ossimKeywordNames::NUMBER_SAMPLES_KW;// IMAGE_SIZE_SAMPS_KW;
-   value = kwl.find(prefix, keyword);
-   if (value)
-   {
-      theImageSize.samp = ossimString(value).toLong();
-   }
-
-   keyword = REF_IPT_LINE_KW;
-   value = kwl.find(prefix, keyword);
-   if (value)
-   {
-      theRefImgPt.line = ossimString(value).toDouble();
-   }
-
-   keyword = REF_IPT_SAMP_KW;
-   value = kwl.find(prefix, keyword);
-   if (value)
-   {
-      theRefImgPt.samp = ossimString(value).toDouble();
-   }
-
-   keyword = REF_GPT_LAT_KW;
-   value = kwl.find(prefix, keyword);
-   if(value)
-   {
-      theRefGndPt.latd(ossimString(value).toDouble());
-   }
-   
-
-   keyword = REF_GPT_LON_KW;
-   value = kwl.find(prefix, keyword);
-   if(value)
-   {
-      theRefGndPt.lond(ossimString(value).toDouble());
-   }
-   
-
-   keyword = REF_GPT_HGT_KW;
-   value = kwl.find(prefix, keyword);
-   if(value)
-   {
-      theRefGndPt.hgt = ossimString(value).toDouble();
-   }
-   
-
-   keyword = ossimKeywordNames::METERS_PER_PIXEL_Y_KW;// GSD_LINE_DIR_KW;
-   value = kwl.find(prefix, keyword);
-   if (value)
-   {
-      theGSD.line = ossimString(value).toDouble();
-   }
-
-   keyword = ossimKeywordNames::METERS_PER_PIXEL_X_KW;//GSD_SAMP_DIR_KW;
-   value = kwl.find(prefix, keyword);
-   if (value)
-   {
-      theGSD.samp = ossimString(value).toDouble();
-   }
-
-   theMeanGSD = (fabs(theGSD.line) + fabs(theGSD.samp))/2.0;
-
-   keyword = ossimKeywordNames::UL_LAT_KW;
-   value = kwl.find(prefix, keyword);
-   if (value)
-   {
-      v[0].lat = ossimString(value).toDouble();
-   }
-
-   keyword = ossimKeywordNames::UL_LON_KW;
-   value = kwl.find(prefix, keyword);
-   if (value)
-   {
-      v[0].lon = ossimString(value).toDouble();
-   }
-
-   keyword = ossimKeywordNames::UR_LAT_KW;
-   value = kwl.find(prefix, keyword);
-   if (value)
-   {
-      v[1].lat = ossimString(value).toDouble();
-   }
-
-   keyword = ossimKeywordNames::UR_LON_KW;
-   value = kwl.find(prefix, keyword);
-   if (value)
-   {
-      v[1].lon = ossimString(value).toDouble();
-   }
-
-   keyword = ossimKeywordNames::LR_LAT_KW;
-   value = kwl.find(prefix, keyword);
-   if (value)
-   {
-      v[2].lat = ossimString(value).toDouble();
-   }
-
-   keyword = ossimKeywordNames::LR_LON_KW;
-   value = kwl.find(prefix, keyword);
-   if (value)
-   {
-      v[2].lon = ossimString(value).toDouble();
-   }
-
-   keyword = ossimKeywordNames::LL_LAT_KW;
-   value = kwl.find(prefix, keyword);
-   if (value)
-   {
-      v[3].lat = ossimString(value).toDouble();
-   }
-
-   keyword = ossimKeywordNames::LL_LON_KW;
-   value = kwl.find(prefix, keyword);
-   if (value)
-   {
-      v[3].lon = ossimString(value).toDouble();
-   }
-
-   keyword = ossimKeywordNames::CE90_ABSOLUTE_KW;
-   value = kwl.find(prefix, keyword);
-   if (!value)
-   {
-      // Try old keyword for legacy purposes:
-      keyword = ossimKeywordNames::IMAGE_CE90_KW;
-      value = kwl.find(prefix, keyword);
-   }
-   if (value)
-      theNominalPosError = atof(value);
-   else
-      theNominalPosError = 0.0;
-
-   keyword = ossimKeywordNames::CE90_RELATIVE_KW;
-   value = kwl.find(prefix, keyword);
-   if (value)
-      theRelPosError = atof(value);
-   else
-      theRelPosError = theNominalPosError;
-
-   //***
-   // Initialize other data members given quantities read in KWL:
-   //***
-   theBoundGndPolygon = ossimPolygon(4, v);
-
-   const char* rect = kwl.find(prefix, "rect");
-   if(rect)
-   {
-      std::vector<ossimString> splitArray;
-      ossimString rectString(rect);
-      rectString = rectString.trim();
-      rectString.split(splitArray, " ");
-      if(splitArray.size() == 4)
-      {
-         theImageClipRect = ossimDrect(splitArray[0].toDouble(),
-                                       splitArray[1].toDouble(),
-                                       splitArray[2].toDouble(),
-                                       splitArray[3].toDouble());
-      }
-      else
-      {
-         theImageClipRect = ossimDrect(0.0, 0.0,
-                                       theImageSize.samp-1, theImageSize.line-1);
-      }
-   }
-   else
-   {
-      theImageClipRect = ossimDrect(0.0, 0.0,
-                                    theImageSize.samp-1, theImageSize.line-1);
-   }
-   
-   // Avoid passing null char* to method that takes an ossimString.
-   ossimString tmpStr;
-   if (prefix)
-   {
-      tmpStr = prefix;
-   }
-   loadAdjustments(kwl, tmpStr);
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::loadState: returning..." << std::endl;
-   return ossimProjection::loadState(kwl, prefix);;
-}
-
-//*****************************************************************************
-// PROTECTED METHOD: Model_type::extrapolate(image_point)
-//
-//  This method computes extrapolated values of latitude and longitude for
-//  points which are outside the actual image boundaries.
-//*****************************************************************************
-ossimGpt ossimSensorModel::extrapolate (const ossimDpt& imagePoint,
-                                        const double&   height) const
-{
-   theExtrapolateImageFlag = true;
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) <<  "DEBUG ossimSensorModel::extrapolate: entering... " << std::endl;
-
-   //---
-   // If image point supplied has NaN components, return now with a NaN point.
-   // This prevents an infinite recursion between model worldToLineSample
-   // and this method:
-   //---
-   if (imagePoint.hasNans())
-   {
-      theExtrapolateImageFlag = false;
-      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::extrapolate: returning..." << std::endl;
-      return ossimGpt(ossim::nan(), ossim::nan(), ossim::nan());
-   }
-
-   if(theSeedFunction.valid())
-   {
-      ossimGpt wpt;
-
-      theSeedFunction->lineSampleToWorld(imagePoint, wpt);
-      theExtrapolateImageFlag = false;
-      return wpt;
-   }
-   //***
-   // Determine which edge is intersected by the radial, and establish
-   // intersection:
-   //***
-   ossimGpt gpt;
-   ossimDpt edgePt (imagePoint);
-   ossimDpt image_center (theRefImgPt);
-   theImageClipRect.clip(image_center, edgePt);
-
-   //***
-   // Need edgePt relative to image center. Compute an epsilon perturbation in
-   // the direction of edgePt for later computing directional derivative,
-   // and back out the offset to origin:
-   //***
-   ossimDpt deltaPt (edgePt - image_center);
-   ossimDpt epsilon (deltaPt/deltaPt.length());
-   edgePt -= epsilon;  // insure that we are inside the image
-   ossimDpt edgePt_prime (edgePt - epsilon); // epsilon=1pixel
-       
-   //***
-   // Establish ground point corresponding to edge point and edgePt+epsilon:
-   //***
-   ossimGpt edgeGP;
-   ossimGpt edgeGP_prime;
-
-   if (ossim::isnan(height))
-   {
-      lineSampleToWorld(edgePt, edgeGP);
-      lineSampleToWorld(edgePt_prime, edgeGP_prime);
-   }
-   else
-   {
-      lineSampleHeightToWorld(edgePt, height, edgeGP);
-      lineSampleHeightToWorld(edgePt_prime, height, edgeGP_prime);
-   }
-   
-   //***
-   // Compute approximate directional derivatives of lat and lon along radial
-   // at the edge:
-   //***
-   double dpixel    = (edgePt-edgePt_prime).length();
-   double dlat_drad = (edgeGP.lat - edgeGP_prime.lat)/dpixel;
-   double dlon_drad = (edgeGP.lon - edgeGP_prime.lon)/dpixel;
-
-   //***
-   // Now extrapolate to image point of interest:
-   //***
-   double delta_pixel = (imagePoint - edgePt).length();
-
-   gpt.lat = edgeGP.lat + dlat_drad*delta_pixel;
-   gpt.lon = edgeGP.lon + dlon_drad*delta_pixel;
-   if ( ossim::isnan(height) )
-   {
-      gpt.hgt = ossimElevManager::instance()->getHeightAboveEllipsoid(gpt);
-   }
-   else
-   {
-      gpt.hgt = height;
-   }
-   theExtrapolateImageFlag = false;
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::extrapolate: returning..." << std::endl;
-   return gpt;
-}
-
-
-//*****************************************************************************
-// PROTECTED METHOD: Model_type::extrapolate(ground_point)
-//
-//  This method computes extrapolated values of line and sample for
-//  points which are outside the actual image boundaries.
-//*****************************************************************************
-ossimDpt ossimSensorModel::extrapolate (const ossimGpt& gpt) const
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) <<  "DEBUG ossimSensorModel::extrapolate: entering... " << std::endl;
-   theExtrapolateGroundFlag = true;
-   double height = 0.0;
-   //---
-   // If ground point supplied has NaN components, return now with a NaN point.
-   //---
-   if ( (ossim::isnan(gpt.lat)) || (ossim::isnan(gpt.lon)) )
-//       (gpt.hgt==OSSIM_DBL_NAN))
-   {
-      theExtrapolateGroundFlag = false;
-      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::extrapolate: returning..." << std::endl;
-      return ossimDpt(ossim::nan(), ossim::nan());
-   }
-   if(ossim::isnan(gpt.hgt) == false)
-   {
-      height = gpt.hgt;
-   }
-   
-   if(theSeedFunction.valid())
-   {
-      ossimDpt ipt;
-
-      theSeedFunction->worldToLineSample(gpt, ipt);
-
-      theExtrapolateGroundFlag = false;
-     return ipt;
-   }
-   //***
-   // Determine which edge is intersected by the radial, and establish
-   // intersection:
-   //***
-   ossimDpt edgePt (gpt);
-   ossimDpt image_center (theRefGndPt);
-   theBoundGndPolygon.clipLineSegment(image_center, edgePt);
-
-   //---
-   // Compute an epsilon perturbation in the direction away from edgePt for
-   // later computing directional derivative:
-   //---
-   const double  DEG_PER_MTR =  8.983152841e-06; // Equator WGS-84...
-   double epsilon = theMeanGSD*DEG_PER_MTR; //degrees (latitude) per pixel
-   ossimDpt deltaPt (edgePt-image_center);
-   ossimDpt epsilonPt (deltaPt*epsilon/deltaPt.length());
-   edgePt -= epsilonPt;
-   ossimDpt edgePt_prime (edgePt - epsilonPt);
-       
-   //***
-   // Establish image point corresponding to edge point and edgePt+epsilon:
-   //***
-      ossimGpt edgeGP       (edgePt.lat,       edgePt.lon,       height);//gpt.hgt);
-      ossimGpt edgeGP_prime (edgePt_prime.lat, edgePt_prime.lon, height);//gpt.hgt);
-
-   worldToLineSample(edgeGP, edgePt);
-   worldToLineSample(edgeGP_prime, edgePt_prime);
-
-   //***
-   // Compute approximate directional derivatives of line and sample along
-   // radial at the edge:
-   //***
-   double dsamp_drad = (edgePt.samp - edgePt_prime.samp)/epsilon;
-   double dline_drad = (edgePt.line - edgePt_prime.line)/epsilon;
-
-   //***
-   // Now extrapolate to point of interest:
-   //***
-   double delta = (ossimDpt(gpt) - ossimDpt(edgeGP)).length();
-
-   
-   ossimDpt extrapolated_ip (edgePt.samp + delta*dsamp_drad,
-                             edgePt.line + delta*dline_drad);
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::extrapolate: returning..." << std::endl;
-
-   theExtrapolateGroundFlag = false;
-   return extrapolated_ip;
-}
-
-
-//*****************************************************************************
-//  METHOD: ossimSensorModel::imagingRay()
-//  
-//  Default implementation for computing imaging ray from image point.
-//  
-//*****************************************************************************
-void ossimSensorModel::imagingRay(const ossimDpt& image_point,
-                                  ossimEcefRay&   image_ray) const
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::imagingRay: entering..." << std::endl;
-
-   ossimGpt start;
-   ossimGpt end;
-
-   lineSampleHeightToWorld(image_point, RAY_ORIGIN_HEIGHT, start);
-   lineSampleHeightToWorld(image_point, 0.0, end);
-
-   image_ray = ossimEcefRay(start, end);
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::imagingRay: returning..." << std::endl;
-   return;
-}
-
-//*****************************************************************************
-//  METHOD: ossimSensorModel::getObsCovMat()
-//  
-//  Default implementation for forming observation covariance matrix.
-//
-//    Note: At this base class level, the only error source currently
-//          considered is mensuration error.  This is obviously optimistic,
-//          but is included as a placeholder/example, and is presently
-//          the trivial case.
-//  
-//*****************************************************************************
-ossimSensorModel::CovMatStatus ossimSensorModel::getObsCovMat(
-   const ossimDpt& /* ipos */ , NEWMAT::SymmetricMatrix& Cov, const ossim_float64 defPointingSigma)
-{
-   // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-   // Mensuration error contribution
-   // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-   //  Sensitivity matrix
-   NEWMAT::SymmetricMatrix B(2);
-   B = 0.0;
-   B(1,1) = 1.0;
-   B(2,2) = B(1,1);
-
-   //  Pointing covariance matrix
-   NEWMAT::SymmetricMatrix P(2);
-   P = 0.0;
-   P(1,1) = defPointingSigma*defPointingSigma;
-   P(2,2) = P(1,1);
-
-   //  Propagate
-   NEWMAT::SymmetricMatrix Cm;
-   Cm << B * P * B.t();
-
-   // ~~~~~~~~~~~~~~~~~~~~
-   // Sum total covariance
-   // ~~~~~~~~~~~~~~~~~~~~
-   NEWMAT::SymmetricMatrix Ctot = Cm; //+ other contributors as identified
-
-   // ~~~~~~~~~~~~~~~~~~
-   // Propagate to image
-   // ~~~~~~~~~~~~~~~~~~
-   NEWMAT::SymmetricMatrix Bi(2);
-   Bi = 0.0;
-   Bi(1,1) = 1.0;
-   Bi(2,2) = Bi(1,1);
-
-   Cov << Bi * Ctot * Bi.t();
-
-   return ossimSensorModel::COV_PARTIAL;
-}
-
-void ossimSensorModel::computeGsd()
-{
-   static const char MODULE[] = "ossimSensorModel::computeGsd";
-
-   if (theImageSize.hasNans())
-   {
-      std::string e = MODULE;
-      e += "Error image size has nans!";
-      throw ossimException(e);
-   }
-
-   //---
-   // Compute gsd in the x direction from left to right points across the middle of image.
-   // Compute gsd in the y direction from top to bottom points across the middle of image.
-   //---
-
-   ossim_float64 midLine = 0.0;
-   ossim_float64 midSamp = 0.0;
-   ossim_float64 endLine = 1.0;
-   ossim_float64 endSamp = 1.0;
-   if (theImageSize.x > 2)
-   {
-      midSamp = (theImageSize.x-1)/2.0;
-      endSamp = theImageSize.x-1;
-         
-   }
-   if (theImageSize.y > 2)
-   {
-      midLine = (theImageSize.y-1)/2.0;
-      endLine = theImageSize.y-1;
-   }
-   
-   ossimDpt leftDpt  (0.0,     midLine);
-   ossimDpt rightDpt (endSamp, midLine);
-   ossimDpt topDpt   (midSamp, 0.0);
-   ossimDpt bottomDpt(midSamp, endLine);
-   
-   ossimGpt leftGpt;
-   ossimGpt rightGpt;
-   ossimGpt topGpt;
-   ossimGpt bottomGpt;
-
-   //---
-   // Left point.
-   // For the first point use lineSampleToWorld to get the height.
-   //---
-   lineSampleToWorld(leftDpt, leftGpt);
-   if (leftGpt.hasNans())
-   {
-      std::string e = MODULE;
-      e += "Error leftGpt has nans!";
-      throw ossimException(e);
-   }
-
-   //---
-   // Right point:
-   // Use lineSampleHeightToWorld using the left height since we want the horizontal distance.
-   //---
-   lineSampleHeightToWorld(rightDpt, leftGpt.hgt, rightGpt);
-   if (rightGpt.hasNans())
-   {
-      std::string e = MODULE;
-      e += "Error rightGpt has nans!";
-      throw ossimException(e);
-   }
-
-   //---
-   // Top point:
-   // Use lineSampleHeightToWorld using the left height since we want the horizontal distance.
-   //---
-   lineSampleHeightToWorld(topDpt, leftGpt.hgt, topGpt);
-   if (topGpt.hasNans())
-   {
-      std::string e = MODULE;
-      e += "Error topGpt has nans!";
-      throw ossimException(e);
-   }
-   
-   //---
-   // Bottom point:
-   // Use lineSampleHeightToWorld using the left height since we want the horizontal distance.
-   //---
-   lineSampleHeightToWorld(bottomDpt, leftGpt.hgt, bottomGpt);
-   if (bottomGpt.hasNans())
-   {
-      std::string e = MODULE;
-      e += "Error bottomGpt has nans!";
-      throw ossimException(e);
-   }
-
-#if 0 /* Please leave for debug. (drb) */
-   ossimNotify(ossimNotifyLevel_DEBUG)
-      << "image size:    " << theImageSize
-      << "\nleftDpt:   " << leftDpt
-      << "\nrightDpt:  " << rightDpt
-      << "\ntopDpt:    " << topDpt
-      << "\nbottomDpt: " << bottomDpt      
-      << "\nleftGpt:   " << leftGpt
-      << "\nrightGpt:  " << rightGpt
-      << "\ntopGpt:    " << topGpt
-      << "\nbottomGpt: " << bottomGpt      
-      << "\n";
-#endif
-      
-   theGSD.x   = leftGpt.distanceTo(rightGpt)/(rightDpt.x-leftDpt.x);
-   theGSD.y   = topGpt.distanceTo(bottomGpt)/(bottomDpt.y-topDpt.y);
-   theMeanGSD = (theGSD.x + theGSD.y)/2.0;
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimSensorModel::computGsd DEBUG:"
-         << "\ntheGSD:     " << theGSD
-         << "\ntheMeanGSD: " << theMeanGSD << std::endl;
-   }
-}
-
-//*****************************************************************************
-//  STATIC METHOD: ossimSensorModel::writeGeomTemplate
-//  
-//  Outputs a sample geometry KWL to stream provided.
-//  
-//*****************************************************************************
-void ossimSensorModel::writeGeomTemplate(ostream& os)
-{
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::writeGeomTemplate:entering..." << std::endl;
-   
-   os << "//***\n"
-      << "// Base-class ossimSensorModel Keywords:\n"
-      << "//***\n"
-      << ossimKeywordNames::ID_KW << ":  <string>\n"
-      << SENSOR_ID_KW << ": <string>\n"
-      << ossimKeywordNames::NUMBER_LINES_KW << ": <int>\n"
-      << ossimKeywordNames::NUMBER_SAMPLES_KW << ": <int>\n"
-      << REF_GPT_LAT_KW << ": <decimal degrees>\n"
-      << REF_GPT_LON_KW << ": <decimal degrees>\n"
-      << REF_GPT_HGT_KW << ": <float meters>\n"
-      << REF_IPT_LINE_KW << ": <float>\n"
-      << REF_IPT_SAMP_KW << ": <float>\n"
-      << ossimKeywordNames::METERS_PER_PIXEL_Y_KW << ": <float meters>\n"
-      << ossimKeywordNames::METERS_PER_PIXEL_X_KW << ": <float meters>\n"
-      << ossimKeywordNames::UL_LAT_KW << ": <decimal degrees>\n"
-      << ossimKeywordNames::UL_LON_KW << ": <decimal degrees>\n"
-      << ossimKeywordNames::UR_LAT_KW << ": <decimal degrees>\n"
-      << ossimKeywordNames::UR_LON_KW << ": <decimal degrees>\n"
-      << ossimKeywordNames::LR_LAT_KW << ": <decimal degrees>\n"
-      << ossimKeywordNames::LR_LON_KW << ": <decimal degrees>\n"
-      << ossimKeywordNames::LL_LAT_KW << ": <decimal degrees>\n"
-      << ossimKeywordNames::LL_LON_KW << ": <decimal degrees>\n"
-      << "\n"
-      << "//***\n"
-      << "// Repeat following four entries for each adjustable parameter:\n"
-      << "//***\n"
-//       << PARAM_PREFIX << "N." << PARAM_NAME_KW << ": <string>\n" 
-//       << PARAM_PREFIX << "N." << PARAM_UNITS_KW << ": <string>\n" 
-//       << PARAM_PREFIX << "N." << PARAM_VALUE_KW << ": <float>\n" 
-//       << PARAM_PREFIX << "N." << PARAM_SIGMA_KW << ": <float>\n"
-      << std::endl;
-
-   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::writeGeomTemplate: returning..." << std::endl;
-   return;
-}
-
-ossim_uint32 
-ossimSensorModel::degreesOfFreedom()const
-{
-   ossim_uint32 dof = 0;
-   ossim_uint32 idx = 0;
-   ossim_uint32 numAdj = getNumberOfAdjustableParameters();
-   for(idx = 0; idx < numAdj; ++idx)
-   {
-      if(!isParameterLocked(idx))
-      {
-         ++dof;
-      }
-   }
-   
-   return dof;
-}
-
-double
-ossimSensorModel::optimizeFit(const ossimTieGptSet& tieSet, double* /* targetVariance */)
-{
-   //use a simple Levenberg-Marquardt non-linear optimization
-   //note : please limit the number of tie points
-   //
-   //INPUTS: requires Jacobian matrix (partial derivatives with regards to parameters)
-   //OUPUTS: will also compute parameter covariance matrix
-   //
-   //TBD: use targetVariance!
- 
-   int np = getNumberOfAdjustableParameters();
-   int nobs = tieSet.size();
-
-   //setup initail values
-   int iter=0;
-   int iter_max = 200;
-   double minResidue = 1e-10; //TBC
-   double minDelta = 1e-10; //TBC
-
-   //build Least Squares initial normal equation
-   // don't waste memory, add samples one at a time
-   NEWMAT::SymmetricMatrix A;
-   NEWMAT::ColumnVector residue;
-   NEWMAT::ColumnVector projResidue;
-   double deltap_scale = 1e-4; //step_Scale is 1.0 because we expect parameters to be between -1 and 1
-   buildNormalEquation(tieSet, A, residue, projResidue, deltap_scale);
-   double ki2=residue.SumSquare();
-
-   //get current adjustment (between -1 and 1 normally) and convert to ColumnVector
-   ossimAdjustmentInfo cadj;
-   getAdjustment(cadj);
-   std::vector< ossimAdjustableParameterInfo >& parmlist = cadj.getParameterList();
-   NEWMAT::ColumnVector cparm(np), nparm(np);
-   for(int n=0;n<np;++n)
-   {
-      cparm(n+1) = parmlist[n].getParameter();
-   }
-
-   double damping_speed = 2.0;
-   //find max diag element for A
-   double maxdiag=0.0;
-   for(int d=1;d<=np;++d) {
-      if (maxdiag < A(d,d)) maxdiag=A(d,d);
-   }
-   double damping = 1e-3 * maxdiag;
-   double olddamping = 0.0;
-   bool found = false;
-
-   //DEBUG TBR
-   // cout<<"rms="<<sqrt(ki2/nobs)<<" ";
-   // cout.flush();
-
-   while ( (!found) && (iter < iter_max) ) //non linear optimization loop
-   {
-      bool decrease = false;
-
-      do
-      {
-         //add damping update to normal matrix
-         for(int d=1;d<=np;++d) A(d,d) += damping - olddamping;
-         olddamping = damping;
-
-         NEWMAT::ColumnVector deltap = solveLeastSquares(A, projResidue);
-
-         if (deltap.NormFrobenius() <= minDelta) 
-         {
-            found = true;
-         } else {
-            //update adjustment
-            nparm = cparm + deltap;
-            for(int n=0;n<np;++n)
-            {
-               setAdjustableParameter(n, nparm(n+1), false); //do not update now, wait
-            }
-            updateModel();
-
-            //check residue is reduced
-            NEWMAT::ColumnVector newresidue = getResidue(tieSet);
-            double newki2=newresidue.SumSquare();
-            double res_reduction = (ki2 - newki2) / (deltap.t()*(deltap*damping + projResidue)).AsScalar();
- //DEBUG TBR
-       cout<<sqrt(newki2/nobs)<<" ";
-       cout.flush();
-
-            if (res_reduction > 0)
-            {
-               //accept new parms
-               cparm = nparm;
-               ki2=newki2;
-
-               deltap_scale = max(1e-15, deltap.NormInfinity()*1e-4);
-
-               buildNormalEquation(tieSet, A, residue, projResidue, deltap_scale);
-               olddamping = 0.0;
-
-               found = ( projResidue.NormInfinity() <= minResidue );
-               //update damping factor
-               damping *= std::max( 1.0/3.0, 1.0-std::pow((2.0*res_reduction-1.0),3));
-               damping_speed = 2.0;
-               decrease = true;
-            } else {
-               //cancel parameter update
-               for(int n=0;n<np;++n)
-               {
-                  setAdjustableParameter(n, nparm(n+1), false); //do not update right now
-               }
-               updateModel();
-
-               damping *= damping_speed;
-               damping_speed *= 2.0;
-            }
-         }
-      } while (!decrease && !found);
-      ++iter;
-   }
-
-//DEBUG TBR
-cout<<endl;
-
-   //compute parameter correlation
-   // use normal matrix inverse
-   //TBD
-
-   return ki2/nobs;
-}
-
-void
-ossimSensorModel::buildNormalEquation(const ossimTieGptSet& tieSet,
-                                      NEWMAT::SymmetricMatrix& A,
-                                      NEWMAT::ColumnVector& residue,
-                                      NEWMAT::ColumnVector& projResidue,
-                                      double pstep_scale)
-{
-   //goal:       build Least Squares system
-   //constraint: never store full Jacobian matrix in memory (can be huge)
-   //            so we build the matrices incrementally
-   // the system can be built using forward() or inverse() depending on the projection capabilities : useForward()
-   //
-   //TBD : add covariance matrix for each tie point
-
-   //init
-   int np = getNumberOfAdjustableParameters();
-   int dimObs;
-   bool useImageObs = useForward(); //caching
-   if (useImageObs)
-   {
-      dimObs = 2; //image observation
-   } else {
-      dimObs = 3; //ground observations
-   }
-   int no = dimObs * tieSet.size(); //number of observations
-
-   A.ReSize(np);
-   residue.ReSize(no);
-   projResidue.ReSize(np);
-   //Zeroify matrices that will be accumulated
-   A           = 0.0;
-   projResidue = 0.0;
-
-   const vector<ossimRefPtr<ossimTieGpt> >& theTPV = tieSet.getTiePoints();
-   vector<ossimRefPtr<ossimTieGpt> >::const_iterator tit;
-   unsigned long c=1;
-
-   if (useImageObs)
-   { 
-     //image observations 
-      std::vector<ossimDpt> imDerp(np);
-     ossimDpt resIm;
-     // loop on tie points
-      for (tit = theTPV.begin() ; tit != theTPV.end() ; ++tit)
-      {
-         //compute residue
-         resIm = (*tit)->tie - forward(*(*tit));
-         residue(c++) = resIm.x;
-         residue(c++) = resIm.y;
-
-         //compute all image derivatives regarding parametres for the tie point position
-         for(int p=0;p<np;++p)
-         {
-            imDerp[p] = getForwardDeriv( p , *(*tit) , pstep_scale);
-         }
-
-         //compute influence of tie point on all sytem elements
-         for(int p1=0;p1<np;++p1)
-         {        
-            //proj residue: J * residue
-            projResidue.element(p1) += imDerp[p1].x * resIm.x + imDerp[p1].y * resIm.y;
-
-            //normal matrix A = transpose(J)*J
-            for(int p2=p1;p2<np;++p2)
-            {
-               A.element(p1,p2) += imDerp[p1].x * imDerp[p2].x + imDerp[p1].y * imDerp[p2].y;
-            }
-         }
-      }
-   }
-   else
-   {
-      // ground observations
-      std::vector<ossimGpt>  gdDerp(np);
-      ossimGpt gd, resGd;
-      // loop on tie points
-      for (tit = theTPV.begin() ; tit != theTPV.end() ; ++tit)
-      {
-         //compute residue
-         gd = inverse((*tit)->tie);
-         residue(c++) = resGd.lon = ((*tit)->lon - gd.lon) * 100000.0;
-         residue(c++) = resGd.lat = ((*tit)->lat - gd.lat) * 100000.0 * cos(gd.lat / 180.0 * M_PI);
-         residue(c++) = resGd.hgt = (*tit)->hgt - gd.hgt; //TBD : normalize to meters?
-
-         //compute all image derivatives regarding parametres for the tie point position
-         for(int p=0;p<np;++p)
-         {
-            gdDerp[p] = getInverseDeriv( p , (*tit)->tie, pstep_scale);
-         }
-
-         //compute influence of tie point on all sytem elements
-         for(int p1=0;p1<np;++p1)
-         {        
-            //proj residue: J * residue
-            projResidue.element(p1) += gdDerp[p1].lon * resGd.lon + gdDerp[p1].lat * resGd.lat + gdDerp[p1].hgt * resGd.hgt; //TBC
-
-            //normal matrix A = transpose(J)*J
-            for(int p2=p1;p2<np;++p2)
-            {
-               A.element(p1,p2) += gdDerp[p1].lon * gdDerp[p2].lon + gdDerp[p1].lat * gdDerp[p2].lat + gdDerp[p1].hgt * gdDerp[p2].hgt;
-            }
-         }
-      }
-
-   } //end of if (useImageObs)
-}
-
-//give inverse() partial derivative regarding parameter parmIdx (>=0)
-ossimGpt
-ossimSensorModel::getInverseDeriv(int parmIdx, const ossimDpt& ipos, double hdelta)
-{   
-   double den = 0.5/hdelta;
-   ossimGpt res,gd;
-
-   double middle = getAdjustableParameter(parmIdx);
-   //set parm to high value
-   setAdjustableParameter(parmIdx, middle + hdelta, true);
-   res = inverse(ipos);
-   //set parm to low value and gte difference
-   setAdjustableParameter(parmIdx, middle - hdelta, true);
-   gd = inverse(ipos);
-
-   //reset parm
-   setAdjustableParameter(parmIdx, middle, true);
-
-   res.lon = den*(res.lon - gd.lon) * 100000.0; //TBC : approx meters
-   res.lat = den*(res.lat - gd.lat) * 100000.0 * cos(gd.lat / 180.0 * M_PI);
-   res.hgt = den*(res.hgt - gd.hgt);
-
-   return res;
-}
-
-//give forward() partial derivative regarding parameter parmIdx (>=0)
-ossimDpt
-ossimSensorModel::getForwardDeriv(int parmIdx, const ossimGpt& gpos, double hdelta)
-{   
-   static double den = 0.5/hdelta;
-   ossimDpt res;
-
-   double middle = getAdjustableParameter(parmIdx);
-   //set parm to high value
-   setAdjustableParameter(parmIdx, middle + hdelta, true);
-   res = inverse(gpos);
-   //set parm to low value and gte difference
-   setAdjustableParameter(parmIdx, middle - hdelta, true);
-   res -= inverse(gpos);
-   //get partial derivative
-   res = res*den;
-
-   //reset parm
-   setAdjustableParameter(parmIdx, middle, true);
-
-   return res;
-}
-
-NEWMAT::ColumnVector
-ossimSensorModel::getResidue(const ossimTieGptSet& tieSet)
-{
-   //init
-   NEWMAT::ColumnVector residue;
-   int dimObs;
-
-   bool useImageObs = useForward(); //caching
-   if (useImageObs)
-   {
-      dimObs = 2; //image observation
-   } else {
-      dimObs = 3; //ground observations
-   }
-   int no = dimObs * tieSet.size(); //number of observations
-
-   residue.ReSize(no);
-
-   const vector<ossimRefPtr<ossimTieGpt> >& theTPV = tieSet.getTiePoints();
-   vector<ossimRefPtr<ossimTieGpt> >::const_iterator tit;
-   unsigned long c=1;
-
-   if (useImageObs)
-   { 
-     //image observations 
-     ossimDpt resIm;
-     // loop on tie points
-      for (tit = theTPV.begin() ; tit != theTPV.end() ; ++tit)
-      {
-         //compute residue
-         resIm = (*tit)->tie - forward(**tit);
-         residue(c++) = resIm.x;
-         residue(c++) = resIm.y;
-      }
-   } else {
-      // ground observations
-      ossimGpt gd;
-      // loop on tie points
-      for (tit = theTPV.begin() ; tit != theTPV.end() ; ++tit)
-      {
-         //compute residue
-         gd = inverse((*tit)->tie);
-         residue(c++) = ((*tit)->lon - gd.lon) * 100000.0; //approx meters //TBC TBD
-         residue(c++) = ((*tit)->lat - gd.lat) * 100000.0 * cos(gd.lat / 180.0 * M_PI);
-         residue(c++) = (*tit)->hgt - gd.hgt; //meters
-      }
-   } //end of if (useImageObs)
-
-   return residue;
-}
-
-/*!
- * solves Ax = r , with A symmetric positive definite
- * A can be rank deficient
- * size of A is typically between 10 and 100 rows
- */
-NEWMAT::ColumnVector 
-ossimSensorModel::solveLeastSquares(NEWMAT::SymmetricMatrix& A,  NEWMAT::ColumnVector& r)const
-{
-   NEWMAT::ColumnVector x = invert(A)*r;
-   return x;
-}
-
-/** 
- * stable invert stolen from ossimRpcSolver
- */
-NEWMAT::Matrix 
-ossimSensorModel::invert(const NEWMAT::Matrix& m)const
-{
-   ossim_uint32 idx = 0;
-   NEWMAT::DiagonalMatrix d;
-   NEWMAT::Matrix u;
-   NEWMAT::Matrix v;
-
-   // decompose m.t*m which is stored in Temp into the singular values and vectors.
-   //
-   NEWMAT::SVD(m, d, u, v, true, true);
-   
-   // invert the diagonal
-   // this is just doing the reciprical fo all diagonal components and store back int
-   // d.  ths compute d inverse.
-   //
-   for(idx=0; idx < (ossim_uint32)d.Ncols(); ++idx)
-   {
-      if(d[idx] > 1e-14) //TBC : use DBL_EPSILON ?
-      {
-         d[idx] = 1.0/d[idx];
-      }
-      else
-      {
-         d[idx] = 0.0;
-
-//DEBUG TBR
-cout<<"warning: singular matrix in SVD"<<endl;
-
-      }
-   }
-
-   //compute inverse of decomposed m;
-   return v*d*u.t();
-}
diff --git a/src/ossim/projection/ossimSensorModelFactory.cpp b/src/ossim/projection/ossimSensorModelFactory.cpp
deleted file mode 100644
index 33f5eb2..0000000
--- a/src/ossim/projection/ossimSensorModelFactory.cpp
+++ /dev/null
@@ -1,680 +0,0 @@
-//*****************************************************************************
-// FILE: ossimSensorModelFactory.cc
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// AUTHOR:  Oscar Kramer
-//
-// DESCRIPTION:
-//   Contains implementation of class ossimSensorModelFactory
-//
-//*****************************************************************************
-//  $Id: ossimSensorModelFactory.cpp 21522 2012-08-23 13:57:45Z dburken $
-#include <fstream>
-#include <algorithm>
-#include <ossim/projection/ossimSensorModelFactory.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimDirectory.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimNotifyContext.h>
-
-//***
-// Define Trace flags for use within this file:
-//***
-#include <ossim/base/ossimTrace.h>
-static ossimTrace traceExec  = ossimTrace("ossimSensorModelFactory:exec");
-static ossimTrace traceDebug = ossimTrace("ossimSensorModelFactory:debug");
-
-//***
-// Note to programmer: To add a new model, search this file for "ADD_MODEL"
-// to locate places requiring editing. Functional example below...
-//
-// ADD_MODEL: Include all sensor model headers here:
-//***
-#include <ossim/projection/ossimCoarseGridModel.h>
-#include <ossim/projection/ossimRpcModel.h>
-#include <ossim/projection/ossimRpcProjection.h>
-#include <ossim/projection/ossimIkonosRpcModel.h>
-#include <ossim/projection/ossimNitfRpcModel.h>
-#include <ossim/projection/ossimQuickbirdRpcModel.h>
-#include <ossim/projection/ossimLandSatModel.h>
-#include <ossim/projection/ossimSpot5Model.h>
-#include <ossim/projection/ossimBuckeyeSensor.h>
-#include <ossim/projection/ossimSarModel.h>
-#include <ossim/projection/ossimRS1SarModel.h>
-#include <ossim/support_data/ossimSpotDimapSupportData.h>
-#include <ossim/projection/ossimNitfMapModel.h>
-#include <ossim/projection/ossimFcsiModel.h>
-#include <ossim/projection/ossimApplanixUtmModel.h>
-#include <ossim/projection/ossimApplanixEcefModel.h>
-#include <ossim/projection/ossimSkyBoxLearSensor.h>
-#include <ossim/projection/ossimIpodSensor.h>
-#include <ossim/projection/ossimPpjFrameSensor.h>
-#include <ossim/projection/ossimAlphaSensorHRI.h>
-#include <ossim/projection/ossimAlphaSensorHSI.h>
-#include <ossim/support_data/ossimFfL7.h>
-#include <ossim/support_data/ossimFfL5.h>
-#include <ossim/support_data/ossimPpjFrameSensorFile.h>
-#include <ossim/support_data/ossimAlphaSensorSupportData.h>
-
-//***
-// ADD_MODEL: List names of all sensor models produced by this factory:
-//***
-//const char* MY_NEW_MODEL = "myNewModel";
-// const char* OCG_MODEL        = "ossimCoarseGridModel";
-// const char* RPC_MODEL        = "ossimRpcModel";
-// const char* IKONOS_RPC_MODEL = "ossimIkonosRpcModel";
-// const char* NITF_RPC_MODEL   = "ossimNitfRpcModel";
-// const char* LANDSAT_MODEL    = "ossimLandSatModel";
-// const char* NITF_MAP_MODEL   = "ossimNitfMapModel";
-// const char* FCSI_MODEL       = "ossimFcsiModel";
-// const char* EMERGE_FCSI_MODEL= "ossimEmergeFcsiModel";
-
-ossimSensorModelFactory* ossimSensorModelFactory::theInstance = 0;
-
-//*****************************************************************************
-//  STATIC METHOD: ossimSensorModelFactory::instance()
-//  
-//*****************************************************************************
-ossimSensorModelFactory*  ossimSensorModelFactory::instance()
-{
-   if(!theInstance)
-   {
-      theInstance = new ossimSensorModelFactory;
-   }
-
-   return (ossimSensorModelFactory*) theInstance;
-}
-
-//*****************************************************************************
-//  METHOD: ossimSensorModelFactory::create(kwl, prefix)
-//*****************************************************************************
-ossimProjection* ossimSensorModelFactory::createProjection(const ossimKeywordlist &keywordList,
-                                                           const char *prefix) const
-{
-   ossimRefPtr<ossimProjection> result;
-
-   //
-   // Permit specification of geometry file name in lieu of type:
-   //
-   const char*  value = keywordList.find(prefix, ossimKeywordNames::GEOM_FILE_KW);
-   if (value)
-   {
-      result = createProjection(ossimFilename(value), 0);
-   }
-   //
-   // Search for occurence of "type" keyword:
-   //
-   else
-   {
-      value = keywordList.find(prefix, ossimKeywordNames::TYPE_KW);
-      if(value)
-      {
-         result = createProjection(ossimString(value));
-         if(result.valid())
-         {
-            if(!result->loadState(keywordList, prefix))
-            {
-               result = 0;
-            }
-        }
-      }
-   }
-   
-   return result.release();
-}
-
-//*****************************************************************************
-//  METHOD: 
-//  
-//*****************************************************************************
-ossimProjection*
-ossimSensorModelFactory::createProjection(const ossimString &name) const
-{
-   //***
-   // Name should represent the model type:
-   //***
-   if(name == STATIC_TYPE_NAME(ossimSkyBoxLearSensor))
-   {
-      return new ossimSkyBoxLearSensor;
-   }
-   if(name == STATIC_TYPE_NAME(ossimIpodSensor))
-   {
-      return new ossimIpodSensor;
-   }
-   if(name == STATIC_TYPE_NAME(ossimCoarseGridModel))
-   {
-      return new ossimCoarseGridModel;
-   }
-   if(name == STATIC_TYPE_NAME(ossimBuckeyeSensor))
-   {
-      return new ossimBuckeyeSensor;
-   }
-   
-   if (name ==  STATIC_TYPE_NAME(ossimRpcModel))
-   {
-      return new ossimRpcModel;
-   }
-
-   if(name == STATIC_TYPE_NAME(ossimLandSatModel))
-   {
-      return new ossimLandSatModel;
-   }
-
-   if(name == STATIC_TYPE_NAME(ossimNitfMapModel))
-   {
-      return new ossimNitfMapModel;
-   }
-
-   if(name == STATIC_TYPE_NAME(ossimQuickbirdRpcModel))
-   {
-      return new ossimQuickbirdRpcModel;
-   }
-   
-   if(name == STATIC_TYPE_NAME(ossimIkonosRpcModel))
-   {
-     return new ossimIkonosRpcModel;
-   }
-
-   if(name == STATIC_TYPE_NAME(ossimNitfRpcModel))
-   {
-      return new ossimNitfRpcModel;
-   }
-   if(name == STATIC_TYPE_NAME(ossimRpcProjection))
-   {
-      return new ossimRpcProjection;
-   }
-   if(name == STATIC_TYPE_NAME(ossimFcsiModel))
-   {
-      return new ossimFcsiModel;
-   }
-   if(name == STATIC_TYPE_NAME(ossimApplanixUtmModel))
-   {
-      return new ossimApplanixUtmModel;
-   }
-   if(name == STATIC_TYPE_NAME(ossimApplanixEcefModel))
-   {
-      return new ossimApplanixEcefModel;
-   }
-   if(name == STATIC_TYPE_NAME(ossimSpot5Model))
-   {
-      return new ossimSpot5Model;
-   }
-   if(name == STATIC_TYPE_NAME(ossimSarModel))
-   {
-      return new ossimSarModel;
-   }
-   if(name == STATIC_TYPE_NAME(ossimRS1SarModel))
-   {
-      return new ossimRS1SarModel;
-   }
-   if(name == STATIC_TYPE_NAME(ossimPpjFrameSensor))
-   {
-      return new ossimPpjFrameSensor;
-   }
-   if(name == STATIC_TYPE_NAME(ossimAlphaSensorHRI))
-   {
-      return new ossimAlphaSensorHRI;
-   }
-   if(name == STATIC_TYPE_NAME(ossimAlphaSensorHSI))
-   {
-      return new ossimAlphaSensorHSI;
-   }
-
-   //***
-   // ADD_MODEL: (Please leave this comment for the next programmer)
-   //***
-//   if(name == MY_NEW_MODEL)
-//      return new myNewModel;
-
-   return NULL;
-}
-
-//*****************************************************************************
-//  METHOD
-//*****************************************************************************
-ossimObject*
-ossimSensorModelFactory::createObject(const ossimString& typeName)const
-{
-   return createProjection(typeName);
-}
-
-//*****************************************************************************
-//  METHOD
-//*****************************************************************************
-ossimObject*
-ossimSensorModelFactory::createObject(const ossimKeywordlist& kwl,
-                                      const char* prefix)const
-{
-   return createProjection(kwl, prefix);
-}
-   
-//*****************************************************************************
-//  METHOD
-//*****************************************************************************
-void
-ossimSensorModelFactory::getTypeNameList(std::vector<ossimString>& typeList)
-   const
-{
-   typeList.push_back(STATIC_TYPE_NAME(ossimApplanixEcefModel));
-   typeList.push_back(STATIC_TYPE_NAME(ossimApplanixUtmModel));
-   typeList.push_back(STATIC_TYPE_NAME(ossimCoarseGridModel));
-   typeList.push_back(STATIC_TYPE_NAME(ossimRpcModel));
-   typeList.push_back(STATIC_TYPE_NAME(ossimIkonosRpcModel));
-   typeList.push_back(STATIC_TYPE_NAME(ossimQuickbirdRpcModel));
-   typeList.push_back(STATIC_TYPE_NAME(ossimNitfRpcModel));
-   typeList.push_back(STATIC_TYPE_NAME(ossimLandSatModel));
-   typeList.push_back(STATIC_TYPE_NAME(ossimNitfMapModel));
-   typeList.push_back(STATIC_TYPE_NAME(ossimFcsiModel));
-   typeList.push_back(STATIC_TYPE_NAME(ossimSpot5Model));
-   typeList.push_back(STATIC_TYPE_NAME(ossimSarModel));
-   typeList.push_back(STATIC_TYPE_NAME(ossimRS1SarModel));
-   typeList.push_back(STATIC_TYPE_NAME(ossimBuckeyeSensor));
-   typeList.push_back(STATIC_TYPE_NAME(ossimSkyBoxLearSensor));
-   typeList.push_back(STATIC_TYPE_NAME(ossimIpodSensor));
-   typeList.push_back(STATIC_TYPE_NAME(ossimPpjFrameSensor));
-   typeList.push_back(STATIC_TYPE_NAME(ossimAlphaSensorHRI));
-   typeList.push_back(STATIC_TYPE_NAME(ossimAlphaSensorHSI));
-
-   //***
-   // ADD_MODEL: Please leave this comment for the next programmer. Add above.
-   //***
-   //typeList.push_back(ossimString(MY_NEW_MODEL));
-   
-}
-
-ossimProjection* ossimSensorModelFactory::createProjection(
-   const ossimFilename& filename, ossim_uint32  entryIdx) const
-{
-   if(!filename.exists()) return 0;
-   static const char MODULE[] = "ossimSensorModelFactory::createProjection";
-   
-   ossimKeywordlist kwl;
-   ossimRefPtr<ossimProjection> model = 0;
-
-   ossimFilename geomFile = filename;
-   geomFile = geomFile.setExtension("geom");
-   
-   if(geomFile.exists()&&
-      kwl.addFile(filename.c_str()))
-   {
-      ossimFilename coarseGrid;
-      
-      const char* type = kwl.find(ossimKeywordNames::TYPE_KW);
-      if(type)
-      {
-         if(ossimString(type) ==
-            ossimString(STATIC_TYPE_NAME(ossimCoarseGridModel)))
-         {
-            findCoarseGrid(coarseGrid, filename);
-            
-            if(coarseGrid.exists() &&(coarseGrid != ""))
-            {
-               kwl.add("grid_file_name",
-                       coarseGrid.c_str(),
-                       true);
-               model = new ossimCoarseGridModel(kwl);
-               if(!model->getErrorStatus())
-               {
-                  return model.release();
-               }
-               model = 0;
-            }
-         }
-      }
-      kwl.clear();
-   }
-
-   // See if there is an external geomtry.
-   ossimRefPtr<ossimProjection> proj =
-      createProjectionFromGeometryFile(filename, entryIdx);
-   if (proj.valid())
-   {
-      return proj.release();
-   }
-
-   if(model.valid())
-   {
-      model = 0;
-   }
-   
-   // first check for override
-   //
-   if(geomFile.exists()&&kwl.addFile(geomFile.c_str()))
-   {
-      model =  createProjection(kwl);
-      if(model.valid())
-      {
-         return model.release();
-      }
-      model = 0;
-   }
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " DEBUG: Testing ossimCoarsGridModel" << std::endl;
-   }
-   
-   ifstream input(geomFile.c_str());
-   char ecgTest[4];
-   input.read((char*)ecgTest, 3);
-   ecgTest[3] = '\0';
-   input.close();
-   if(ossimString(ecgTest) == "eCG")
-   {
-      ossimKeywordlist kwlTemp;
-      kwlTemp.add("type",
-                  "ossimCoarseGridModel",
-                  true);
-      kwlTemp.add("geom_file",
-                  geomFile.c_str(),
-                  true);
-      return createProjection(kwlTemp);
-   }
-   
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " DEBUG: testing ossimRpcModel" << std::endl;
-   }
-
-   //---
-   // Test for quick bird rpc.  Could be either a tiff or nitf so not wrapped
-   // around "isNitf()" anymore.
-   //---
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " DEBUG: testing ossimQuickbirdRpcModel"
-         << std::endl;
-   }
-   
-   ossimRefPtr<ossimQuickbirdRpcModel> qbModel = new ossimQuickbirdRpcModel;
-   if(qbModel->parseFile(filename))
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE << " DEBUG: returning ossimQuickbirdRpcModel"
-            << std::endl;
-      }
-      model = qbModel.get();
-      qbModel = 0;
-      return model.release();
-   }
-   else
-   {
-      qbModel = 0;
-   }
-   
-   //---
-   // Test for ikonos rpc.  Could be tiff or nitf which is handled in
-   // parseFile method.
-   //---
-   ossimRefPtr<ossimIkonosRpcModel> ikModel = new ossimIkonosRpcModel;
-   if(ikModel->parseFile(filename))
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE << " DEBUG returning ossimQuickbirdRpcModel"
-            << std::endl;
-      }
-      model = ikModel.get();
-      ikModel = 0;
-      return model.release();
-   }
-   else
-   {
-      ikModel = 0;
-   }
-
-   if(isNitf(filename))
-   {
-     if(traceDebug())
-     {
-        ossimNotify(ossimNotifyLevel_DEBUG)
-           << MODULE << " DEBUG: testing ossimNitfRpcModel" << std::endl;
-     }
-
-     ossimRefPtr<ossimNitfRpcModel> rpcModel = new ossimNitfRpcModel();
-     if ( rpcModel->parseFile(filename, entryIdx) ) // filename = NITF_file
-     {
-        model = rpcModel.get();
-        rpcModel = 0;
-        return model.release();
-     }
-     else
-     {
-        rpcModel = 0;
-     }
-     
-     if(traceDebug())
-     {
-        ossimNotify(ossimNotifyLevel_DEBUG)
-           << MODULE << " DEBUG: testing ossimIkinosRpcModel" << std::endl;
-     }
-     
-     model = new ossimNitfMapModel(filename); // filename = NITF_file
-     if(!model->getErrorStatus())
-     {
-        return model.release();
-     }
-     model = 0;
-   }
-   else if(isLandsat(filename))
-   {
-      model = new ossimLandSatModel(filename);
-      if(!model->getErrorStatus())
-      {
-         return model.release();
-      }
-      model = 0;
-   }
-   
-   model = new ossimRS1SarModel(filename);
-   if(model->getErrorStatus()!= ossimErrorCodes::OSSIM_OK)
-   {
-      return model.release();
-   }
-   model = 0;
-
-   ossimFilename spot5Test = geomFile;
-   if(!spot5Test.exists())
-   {
-      spot5Test = geomFile.path();
-      spot5Test = spot5Test.dirCat(ossimFilename("METADATA.DIM"));
-      if (spot5Test.exists() == false)
-      {
-         spot5Test = geomFile.path();
-         spot5Test = spot5Test.dirCat(ossimFilename("metadata.dim"));
-      }
-   }
-   if(spot5Test.exists())
-   {
-      ossimRefPtr<ossimSpotDimapSupportData> meta =
-         new ossimSpotDimapSupportData;
-      if(meta->loadXmlFile(spot5Test))
-      {
-         model = new ossimSpot5Model(meta.get());
-         if(!model->getErrorStatus())
-         {
-            return model.release();
-         }
-         model = 0;
-      }
-   }
-   
-   ossimFilename ppjFilename = filename;
-   ppjFilename = ppjFilename.setExtension("ppj");
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " DEBUG: testing ossimPpjFrameSensor" << std::endl;
-   }
-   if(ppjFilename.exists())
-   {
-      ossimRefPtr<ossimPpjFrameSensorFile> ppjFile = new ossimPpjFrameSensorFile();
-
-      if(ppjFile->readFile(ppjFilename))
-      {
-         ossimRefPtr<ossimPpjFrameSensor> sensor = new ossimPpjFrameSensor();
-         ossimDpt imageSize = ppjFile->getImageSize();
-         sensor->setFocalLength(ppjFile->getIntrinsic()[0][0], ppjFile->getIntrinsic()[1][1]);
-         sensor->setPrincipalPoint(ppjFile->getPrincipalPoint());
-         sensor->setecef2CamMatrix(ppjFile->getExtrinsic().SymSubMatrix(1,3));
-         sensor->setCameraPosition(ppjFile->getPlatformPosition());
-         sensor->setImageSize(imageSize);
-         sensor->setImageRect(ossimDrect(0,0,imageSize.x-1, imageSize.y-1));
-         sensor->setRefImgPt(ossimDpt(imageSize.x*.5, imageSize.y*.5));
-         sensor->setAveragePrjectedHeight(ppjFile->getAverageProjectedHeight());
-         sensor->updateModel();
-         return sensor.release();         
-      }
-      ppjFile = 0;
-   }
-   
-   ossimFilename hdrFilename = filename;
-   hdrFilename = hdrFilename.setExtension("hdr"); // image.hdr
-   if ( !hdrFilename.exists() )   
-   {     
-      hdrFilename = filename;
-      hdrFilename.string() += ".hdr"; // image.ras.hdr
-   }
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " DEBUG: testing ossimAlphaSensor\nheader file: " << hdrFilename << std::endl;
-   }
-   if(hdrFilename.exists())
-   {
-      ossimRefPtr<ossimAlphaSensorSupportData> supData = new ossimAlphaSensorSupportData();
-      if(supData->readSupportFiles(hdrFilename))
-      {
-         if (supData->isHSI())
-         {
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG)
-                  << MODULE << " DEBUG: loading ossimAlphaSensorHSI" << std::endl;
-            }
-            ossimRefPtr<ossimAlphaSensorHSI> sensor = new ossimAlphaSensorHSI();
-            if ( sensor->initialize( *(supData.get()) ) )
-            {
-               return (ossimProjection*)sensor.release();
-            }
-         }
-         else
-         {
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG)
-                  << MODULE << " DEBUG: loading ossimAlphaSensorHRI" << std::endl;
-            }
-            ossimRefPtr<ossimAlphaSensorHRI> sensor = new ossimAlphaSensorHRI();
-            if ( sensor->initialize( *(supData.get()) ) )
-            {
-               return (ossimProjection*)sensor.release();
-            }
-         }
-      }
-      supData = 0;
-   }
-
-   model = new ossimCoarseGridModel(geomFile);
-   if(model.valid())
-   {
-      if(!model->getErrorStatus())
-      {
-         return model.release();
-      }
-      model = 0;
-   }
-
-   return model.release();
-}
-   
-bool ossimSensorModelFactory::isNitf(const ossimFilename& filename)const
-{
-   std::ifstream in(filename.c_str(), ios::in|ios::binary);
-   
-   if(in)
-   {
-      char nitfFile[4];
-      in.read((char*)nitfFile, 4);
-
-      return (ossimString(nitfFile,
-                          nitfFile+4) == "NITF");
-   }
-
-   return false;
-}
-
-bool ossimSensorModelFactory::isLandsat(const ossimFilename& filename)const
-{
-   ossimFilename temp(filename);
-   temp.downcase();
-   ossimRefPtr<ossimFfL7> ff_headerp;
-   if (temp.contains("header.dat"))
-   {
-       ff_headerp = new ossimFfL5(filename);
-   } 
-   else 
-   {
-       ff_headerp = new ossimFfL7(filename);
-   }
-   bool r = !(ff_headerp->getErrorStatus());
-   ff_headerp = 0;
-   return r;
-}
-
-void ossimSensorModelFactory::findCoarseGrid(ossimFilename& result,
-                                             const ossimFilename& geomFile)const
-{
-   result = geomFile;
-   result.setFile(result.fileNoExtension()+"_ocg");
-   result.setExtension("dat");
-   
-   if(!result.exists())
-   {
-      result = geomFile;
-      result.setExtension("dat");
-   }
-   
-   // let's find a .dat file in the current directory
-   //
-   if(!result.exists())
-   {
-      result = "";
-      ossimDirectory directoryList(geomFile.path());
-      ossimFilename file;
-      if(directoryList.getFirst(file,
-                                ossimDirectory::OSSIM_DIR_FILES))
-      {
-         ossimString testString = "OSSIM_DBL_GRID";
-         char tempBuf[14];
-         do
-         {
-            if(file.ext().downcase() == "dat")
-            {
-               std::ifstream in(file.c_str());
-               if(in)
-               {
-                  in.read((char*)tempBuf, 14);
-                  in.close();
-                  if(ossimString(tempBuf, tempBuf+14) == testString)
-                  {
-                     result = file;
-                  }
-               }
-               
-            }
-         }while((directoryList.getNext(file))&&(result == ""));
-      }
-      // try to find it
-   }
-}
-
diff --git a/src/ossim/projection/ossimTranmerc.c b/src/ossim/projection/ossimTranmerc.c
deleted file mode 100644
index c9a480e..0000000
--- a/src/ossim/projection/ossimTranmerc.c
+++ /dev/null
@@ -1,625 +0,0 @@
-/***************************************************************************/
-/* RSC IDENTIFIER: TRANSVERSE MERCATOR
- *
- * ABSTRACT
- *
- *    This component provides conversions between Geodetic coordinates 
- *    (latitude and longitude) and Transverse Mercator projection coordinates
- *    (easting and northing).
- *
- * ERROR HANDLING
- *
- *    This component checks parameters for valid values.  If an invalid value
- *    is found the error code is combined with the current error code using 
- *    the bitwise or.  This combining allows multiple error codes to be
- *    returned. The possible error codes are:
- *
- *       TRANMERC_NO_ERROR           : No errors occurred in function
- *       TRANMERC_LAT_ERROR          : Latitude outside of valid range
- *                                      (-90 to 90 degrees)
- *       TRANMERC_LON_ERROR          : Longitude outside of valid range
- *                                      (-180 to 360 degrees, and within
- *                                        +/-90 of Central Meridian)
- *       TRANMERC_EASTING_ERROR      : Easting outside of valid range
- *                                      (depending on ellipsoid and
- *                                       projection parameters)
- *       TRANMERC_NORTHING_ERROR     : Northing outside of valid range
- *                                      (depending on ellipsoid and
- *                                       projection parameters)
- *       TRANMERC_ORIGIN_LAT_ERROR   : Origin latitude outside of valid range
- *                                      (-90 to 90 degrees)
- *       TRANMERC_CENT_MER_ERROR     : Central meridian outside of valid range
- *                                      (-180 to 360 degrees)
- *       TRANMERC_A_ERROR            : Semi-major axis less than or equal to zero
- *       TRANMERC_INV_F_ERROR        : Inverse flattening outside of valid range
- *								  	                  (250 to 350)
- *       TRANMERC_SCALE_FACTOR_ERROR : Scale factor outside of valid
- *                                     range (0.3 to 3.0)
- *		 TM_LON_WARNING              : Distortion will result if longitude is more
- *                                       than 9 degrees from the Central Meridian
- *
- * REUSE NOTES
- *
- *    TRANSVERSE MERCATOR is intended for reuse by any application that 
- *    performs a Transverse Mercator projection or its inverse.
- *    
- * REFERENCES
- *
- *    Further information on TRANSVERSE MERCATOR can be found in the 
- *    Reuse Manual.
- *
- *    TRANSVERSE MERCATOR originated from :  
- *                      U.S. Army Topographic Engineering Center
- *                      Geospatial Information Division
- *                      7701 Telegraph Road
- *                      Alexandria, VA  22310-3864
- *
- * LICENSES
- *
- *    None apply to this component.
- *
- * RESTRICTIONS
- *
- *    TRANSVERSE MERCATOR has no restrictions.
- *
- * ENVIRONMENT
- *
- *    TRANSVERSE MERCATOR was tested and certified in the following 
- *    environments:
- *
- *    1. Solaris 2.5 with GCC, version 2.8.1
- *    2. Windows 95 with MS Visual C++, version 6
- *
- * MODIFICATIONS
- *
- *    Date              Description
- *    ----              -----------
- *    10-02-97          Original Code
- *    03-02-97          Re-engineered Code
- *
- */
-
-
-/***************************************************************************/
-/*
- *                               INCLUDES
- */
-
-#include <stdio.h>
-#include <math.h>
-#include <ossim/projection/ossimTranmerc.h>
-#include <ossim/base/ossimConstants.h>
-
-/*
- *    math.h      - Standard C math library
- *    tranmerc.h  - Is for prototype error checking
- */
-
-
-/****************************** DEFINES ************************************/
-
-#define MAX_LAT         ((M_PI * 90.0)/180.0)    /* 90 degrees in radians */
-#define MAX_DELTA_LONG  ((M_PI * 90.0)/180.0)    /* 90 degrees in radians */
-#define MIN_SCALE_FACTOR  0.3
-#define MAX_SCALE_FACTOR  3.0
-
-#define SPHTMD(Latitude) ((double) (TranMerc_ap * Latitude \
-      - TranMerc_bp * sin(2.e0 * Latitude) + TranMerc_cp * sin(4.e0 * Latitude) \
-      - TranMerc_dp * sin(6.e0 * Latitude) + TranMerc_ep * sin(8.e0 * Latitude) ) )
-
-#define SPHSN(Latitude) ((double) (TranMerc_a / sqrt( 1.e0 - TranMerc_es * \
-      pow(sin(Latitude), 2))))
-
-#define SPHSR(Latitude) ((double) (TranMerc_a * (1.e0 - TranMerc_es) / \
-    pow(DENOM(Latitude), 3)))
-
-#define DENOM(Latitude) ((double) (sqrt(1.e0 - TranMerc_es * pow(sin(Latitude),2))))
-
-
-/**************************************************************************/
-/*                               GLOBAL DECLARATIONS
- *
- */
-
-/* Ellipsoid Parameters, default to WGS 84  */
-static double TranMerc_a = 6378137.0;              /* Semi-major axis of ellipsoid i meters */
-static double TranMerc_f = 1 / 298.257223563;      /* Flattening of ellipsoid  */
-static double TranMerc_es = 0.0066943799901413800; /* Eccentricity (0.08181919084262188000) squared */
-static double TranMerc_ebs = 0.0067394967565869;   /* Second Eccentricity squared */
-
-/* Transverse_Mercator projection Parameters */
-static double TranMerc_Origin_Lat = 0.0;           /* Latitude of origin in radians */
-static double TranMerc_Origin_Long = 0.0;          /* Longitude of origin in radians */
-static double TranMerc_False_Northing = 0.0;       /* False northing in meters */
-static double TranMerc_False_Easting = 0.0;        /* False easting in meters */
-static double TranMerc_Scale_Factor = 1.0;         /* Scale factor  */
-
-/* Isometeric to geodetic latitude parameters, default to WGS 84 */
-static double TranMerc_ap = 6367449.1458008;
-static double TranMerc_bp = 16038.508696861;
-static double TranMerc_cp = 16.832613334334;
-static double TranMerc_dp = 0.021984404273757;
-static double TranMerc_ep = 3.1148371319283e-005;
-
-/* Maximum variance for easting and northing values for WGS 84. */
-static double TranMerc_Delta_Easting = 40000000.0;
-static double TranMerc_Delta_Northing = 40000000.0;
-
-/* These state variables are for optimization purposes. The only function
- * that should modify them is Set_Tranverse_Mercator_Parameters.         */
-
-
-/************************************************************************/
-/*                              FUNCTIONS     
- *
- */
-
-
-long Set_Transverse_Mercator_Parameters(double a,
-                                        double f,
-                                        double Origin_Latitude,
-                                        double Central_Meridian,
-                                        double False_Easting,
-                                        double False_Northing,
-                                        double Scale_Factor)
-
-{ /* BEGIN Set_Tranverse_Mercator_Parameters */
-  /*
-   * The function Set_Tranverse_Mercator_Parameters receives the ellipsoid
-   * parameters and Tranverse Mercator projection parameters as inputs, and
-   * sets the corresponding state variables. If any errors occur, the error
-   * code(s) are returned by the function, otherwise TRANMERC_NO_ERROR is
-   * returned.
-   *
-   *    a                 : Semi-major axis of ellipsoid, in meters    (input)
-   *    f                 : Flattening of ellipsoid						         (input)
-   *    Origin_Latitude   : Latitude in radians at the origin of the   (input)
-   *                         projection
-   *    Central_Meridian  : Longitude in radians at the center of the  (input)
-   *                         projection
-   *    False_Easting     : Easting/X at the center of the projection  (input)
-   *    False_Northing    : Northing/Y at the center of the projection (input)
-   *    Scale_Factor      : Projection scale factor                    (input) 
-   */
-
-  double tn;        /* True Meridianal distance constant  */
-  double tn2;
-  double tn3;
-  double tn4;
-  double tn5;
-  double dummy_northing;
-  double TranMerc_b; /* Semi-minor axis of ellipsoid, in meters */
-/*  double inv_f = 1 / f; */
-  long Error_Code = TRANMERC_NO_ERROR;
-
-#if 0
-  if (a <= 0.0)
-  { /* Semi-major axis must be greater than zero */
-    Error_Code |= TRANMERC_A_ERROR;
-  }
-  if ((inv_f < 250) || (inv_f > 350))
-  { /* Inverse flattening must be between 250 and 350 */
-    Error_Code |= TRANMERC_INV_F_ERROR;
-  }
-  if ((Origin_Latitude < -MAX_LAT) || (Origin_Latitude > MAX_LAT))
-  { /* origin latitude out of range */
-    Error_Code |= TRANMERC_ORIGIN_LAT_ERROR;
-  }
-  if ((Central_Meridian < -M_PI) || (Central_Meridian > (TWO_PI)))
-  { /* origin longitude out of range */
-    Error_Code |= TRANMERC_CENT_MER_ERROR;
-  }
-  if ((Scale_Factor < MIN_SCALE_FACTOR) || (Scale_Factor > MAX_SCALE_FACTOR))
-  {
-    Error_Code |= TRANMERC_SCALE_FACTOR_ERROR;
-  }
-#endif
-  if (!Error_Code)
-  { /* no errors */
-    TranMerc_a = a;
-    TranMerc_f = f;
-    TranMerc_Origin_Lat = 0;
-    TranMerc_Origin_Long = 0;
-    TranMerc_False_Northing = 0;
-    TranMerc_False_Easting = 0; 
-    TranMerc_Scale_Factor = 1;
-
-    /* Eccentricity Squared */
-    TranMerc_es = 2 * TranMerc_f - TranMerc_f * TranMerc_f;
-    /* Second Eccentricity Squared */
-    TranMerc_ebs = (1 / (1 - TranMerc_es)) - 1;
-
-    TranMerc_b = TranMerc_a * (1 - TranMerc_f);    
-    /*True meridianal constants  */
-    tn = (TranMerc_a - TranMerc_b) / (TranMerc_a + TranMerc_b);
-    tn2 = tn * tn;
-    tn3 = tn2 * tn;
-    tn4 = tn3 * tn;
-    tn5 = tn4 * tn;
-
-    TranMerc_ap = TranMerc_a * (1.e0 - tn + 5.e0 * (tn2 - tn3)/4.e0
-                                + 81.e0 * (tn4 - tn5)/64.e0 );
-    TranMerc_bp = 3.e0 * TranMerc_a * (tn - tn2 + 7.e0 * (tn3 - tn4)
-                                       /8.e0 + 55.e0 * tn5/64.e0 )/2.e0;
-    TranMerc_cp = 15.e0 * TranMerc_a * (tn2 - tn3 + 3.e0 * (tn4 - tn5 )/4.e0) /16.0;
-    TranMerc_dp = 35.e0 * TranMerc_a * (tn3 - tn4 + 11.e0 * tn5 / 16.e0) / 48.e0;
-    TranMerc_ep = 315.e0 * TranMerc_a * (tn4 - tn5) / 512.e0;
-    Convert_Geodetic_To_Transverse_Mercator(MAX_LAT,
-                                            MAX_DELTA_LONG,
-                                            &TranMerc_Delta_Easting,
-                                            &TranMerc_Delta_Northing);
-    Convert_Geodetic_To_Transverse_Mercator(0,
-                                            MAX_DELTA_LONG,
-                                            &TranMerc_Delta_Easting,
-                                            &dummy_northing);
-    TranMerc_Origin_Lat = Origin_Latitude;
-    if (Central_Meridian > M_PI)
-      Central_Meridian -= (TWO_PI);
-    TranMerc_Origin_Long = Central_Meridian;
-    TranMerc_False_Northing = False_Northing;
-    TranMerc_False_Easting = False_Easting; 
-    TranMerc_Scale_Factor = Scale_Factor;
-  } /* END OF if(!Error_Code) */
-  
-  return (Error_Code);
-}  /* END of Set_Transverse_Mercator_Parameters  */
-
-
-void Get_Transverse_Mercator_Parameters(double *a,
-                                        double *f,
-                                        double *Origin_Latitude,
-                                        double *Central_Meridian,
-                                        double *False_Easting,
-                                        double *False_Northing,
-                                        double *Scale_Factor)
-
-{ /* BEGIN Get_Tranverse_Mercator_Parameters  */
-  /*
-   * The function Get_Transverse_Mercator_Parameters returns the current
-   * ellipsoid and Transverse Mercator projection parameters.
-   *
-   *    a                 : Semi-major axis of ellipsoid, in meters    (output)
-   *    f                 : Flattening of ellipsoid						         (output)
-   *    Origin_Latitude   : Latitude in radians at the origin of the   (output)
-   *                         projection
-   *    Central_Meridian  : Longitude in radians at the center of the  (output)
-   *                         projection
-   *    False_Easting     : Easting/X at the center of the projection  (output)
-   *    False_Northing    : Northing/Y at the center of the projection (output)
-   *    Scale_Factor      : Projection scale factor                    (output) 
-   */
-
-  *a = TranMerc_a;
-  *f = TranMerc_f;
-  *Origin_Latitude = TranMerc_Origin_Lat;
-  *Central_Meridian = TranMerc_Origin_Long;
-  *False_Easting = TranMerc_False_Easting;
-  *False_Northing = TranMerc_False_Northing;
-  *Scale_Factor = TranMerc_Scale_Factor;
-  return;
-} /* END OF Get_Tranverse_Mercator_Parameters */
-
-
-
-long Convert_Geodetic_To_Transverse_Mercator (double Latitude,
-                                              double Longitude,
-                                              double *Easting,
-                                              double *Northing)
-
-{      /* BEGIN Convert_Geodetic_To_Transverse_Mercator */
-
-  /*
-   * The function Convert_Geodetic_To_Transverse_Mercator converts geodetic
-   * (latitude and longitude) coordinates to Transverse Mercator projection
-   * (easting and northing) coordinates, according to the current ellipsoid
-   * and Transverse Mercator projection coordinates.  If any errors occur, the
-   * error code(s) are returned by the function, otherwise TRANMERC_NO_ERROR is
-   * returned.
-   *
-   *    Latitude      : Latitude in radians                         (input)
-   *    Longitude     : Longitude in radians                        (input)
-   *    Easting       : Easting/X in meters                         (output)
-   *    Northing      : Northing/Y in meters                        (output)
-   */
-
-  double c;       /* Cosine of latitude                          */
-  double c2;
-  double c3;
-  double c5;
-  double c7;
-  double dlam;    /* Delta longitude - Difference in Longitude       */
-  double eta;     /* constant - TranMerc_ebs *c *c                   */
-  double eta2;
-  double eta3;
-  double eta4;
-  double s;       /* Sine of latitude                        */
-  double sn;      /* Radius of curvature in the prime vertical       */
-  double t;       /* Tangent of latitude                             */
-  double tan2;
-  double tan3;
-  double tan4;
-  double tan5;
-  double tan6;
-  double t1;      /* Term in coordinate conversion formula - GP to Y */
-  double t2;      /* Term in coordinate conversion formula - GP to Y */
-  double t3;      /* Term in coordinate conversion formula - GP to Y */
-  double t4;      /* Term in coordinate conversion formula - GP to Y */
-  double t5;      /* Term in coordinate conversion formula - GP to Y */
-  double t6;      /* Term in coordinate conversion formula - GP to Y */
-  double t7;      /* Term in coordinate conversion formula - GP to Y */
-  double t8;      /* Term in coordinate conversion formula - GP to Y */
-  double t9;      /* Term in coordinate conversion formula - GP to Y */
-  double tmd;     /* True Meridional distance                        */
-  double tmdo;    /* True Meridional distance for latitude of origin */
-  long    Error_Code = TRANMERC_NO_ERROR;
-/*  double temp_Origin; */
-/*  double temp_Long; */
-#if 0
-  if ((Latitude < -MAX_LAT) || (Latitude > MAX_LAT))
-  {  /* Latitude out of range */
-    Error_Code|= TRANMERC_LAT_ERROR;
-  }
-  if (Longitude > M_PI)
-    Longitude -= (TWO_PI);
-  if ((Longitude < (TranMerc_Origin_Long - MAX_DELTA_LONG))
-      || (Longitude > (TranMerc_Origin_Long + MAX_DELTA_LONG)))
-  {
-    if (Longitude < 0)
-      temp_Long = Longitude + TWO_PI;
-    else
-      temp_Long = Longitude;
-    if (TranMerc_Origin_Long < 0)
-      temp_Origin = TranMerc_Origin_Long + TWO_PI;
-    else
-      temp_Origin = TranMerc_Origin_Long;
-    if ((temp_Long < (temp_Origin - MAX_DELTA_LONG))
-        || (temp_Long > (temp_Origin + MAX_DELTA_LONG)))
-      Error_Code|= TRANMERC_LON_ERROR;
-  }
-#endif
-
-  if (!Error_Code)
-  { /* no errors */
-
-    /* 
-     *  Delta Longitude
-     */
-    dlam = Longitude - TranMerc_Origin_Long;
-
-    if (fabs(dlam) > (9.0 * RAD_PER_DEG))
-    { /* Distortion will result if Longitude is more than 9 degrees from the Central Meridian */
-      Error_Code |= TRANMERC_LON_WARNING;
-    }
-
-    if (dlam > M_PI)
-      dlam -= (TWO_PI);
-    if (dlam < -M_PI)
-      dlam += (TWO_PI);
-    if (fabs(dlam) < 2.e-10)
-      dlam = 0.0;
-
-    s = sin(Latitude);
-    c = cos(Latitude);
-    c2 = c * c;
-    c3 = c2 * c;
-    c5 = c3 * c2;
-    c7 = c5 * c2;
-    t = tan (Latitude);
-    tan2 = t * t;
-    tan3 = tan2 * t;
-    tan4 = tan3 * t;
-    tan5 = tan4 * t;
-    tan6 = tan5 * t;
-    eta = TranMerc_ebs * c2;
-    eta2 = eta * eta;
-    eta3 = eta2 * eta;
-    eta4 = eta3 * eta;
-
-    /* radius of curvature in prime vertical */
-    sn = SPHSN(Latitude);
-
-    /* True Meridianal Distances */
-    tmd = SPHTMD(Latitude);
-
-    /*  Origin  */
-    tmdo = SPHTMD (TranMerc_Origin_Lat);
-
-    /* northing */
-    t1 = (tmd - tmdo) * TranMerc_Scale_Factor;
-    t2 = sn * s * c * TranMerc_Scale_Factor/ 2.e0;
-    t3 = sn * s * c3 * TranMerc_Scale_Factor * (5.e0 - tan2 + 9.e0 * eta 
-                                                + 4.e0 * eta2) /24.e0; 
-
-    t4 = sn * s * c5 * TranMerc_Scale_Factor * (61.e0 - 58.e0 * tan2
-                                                + tan4 + 270.e0 * eta - 330.e0 * tan2 * eta + 445.e0 * eta2
-                                                + 324.e0 * eta3 -680.e0 * tan2 * eta2 + 88.e0 * eta4 
-                                                -600.e0 * tan2 * eta3 - 192.e0 * tan2 * eta4) / 720.e0;
-
-    t5 = sn * s * c7 * TranMerc_Scale_Factor * (1385.e0 - 3111.e0 * 
-                                                tan2 + 543.e0 * tan4 - tan6) / 40320.e0;
-
-    *Northing = TranMerc_False_Northing + t1 + pow(dlam,2.e0) * t2
-                + pow(dlam,4.e0) * t3 + pow(dlam,6.e0) * t4
-                + pow(dlam,8.e0) * t5; 
-
-    /* Easting */
-    t6 = sn * c * TranMerc_Scale_Factor;
-    t7 = sn * c3 * TranMerc_Scale_Factor * (1.e0 - tan2 + eta ) /6.e0;
-    t8 = sn * c5 * TranMerc_Scale_Factor * (5.e0 - 18.e0 * tan2 + tan4
-                                            + 14.e0 * eta - 58.e0 * tan2 * eta + 13.e0 * eta2 + 4.e0 * eta3 
-                                            - 64.e0 * tan2 * eta2 - 24.e0 * tan2 * eta3 )/ 120.e0;
-    t9 = sn * c7 * TranMerc_Scale_Factor * ( 61.e0 - 479.e0 * tan2
-                                             + 179.e0 * tan4 - tan6 ) /5040.e0;
-
-    *Easting = TranMerc_False_Easting + dlam * t6 + pow(dlam,3.e0) * t7 
-               + pow(dlam,5.e0) * t8 + pow(dlam,7.e0) * t9;
-  }
-  return (Error_Code);
-} /* END OF Convert_Geodetic_To_Transverse_Mercator */
-
-
-long Convert_Transverse_Mercator_To_Geodetic (
-                                             double Easting,
-                                             double Northing,
-                                             double *Latitude,
-                                             double *Longitude)
-{      /* BEGIN Convert_Transverse_Mercator_To_Geodetic */
-
-  /*
-   * The function Convert_Transverse_Mercator_To_Geodetic converts Transverse
-   * Mercator projection (easting and northing) coordinates to geodetic
-   * (latitude and longitude) coordinates, according to the current ellipsoid
-   * and Transverse Mercator projection parameters.  If any errors occur, the
-   * error code(s) are returned by the function, otherwise TRANMERC_NO_ERROR is
-   * returned.
-   *
-   *    Easting       : Easting/X in meters                         (input)
-   *    Northing      : Northing/Y in meters                        (input)
-   *    Latitude      : Latitude in radians                         (output)
-   *    Longitude     : Longitude in radians                        (output)
-   */
-
-  double c;       /* Cosine of latitude                          */
-  double de;      /* Delta easting - Difference in Easting (Easting-Fe)    */
-  double dlam;    /* Delta longitude - Difference in Longitude       */
-  double eta;     /* constant - TranMerc_ebs *c *c                   */
-  double eta2;
-  double eta3;
-  double eta4;
-  double ftphi;   /* Footpoint latitude                              */
-  int    i;       /* Loop iterator                   */
-  double s;       /* Sine of latitude                        */
-  double sn;      /* Radius of curvature in the prime vertical       */
-  double sr;      /* Radius of curvature in the meridian             */
-  double t;       /* Tangent of latitude                             */
-  double tan2;
-  double tan4;
-  double t10;     /* Term in coordinate conversion formula - GP to Y */
-  double t11;     /* Term in coordinate conversion formula - GP to Y */
-  double t12;     /* Term in coordinate conversion formula - GP to Y */
-  double t13;     /* Term in coordinate conversion formula - GP to Y */
-  double t14;     /* Term in coordinate conversion formula - GP to Y */
-  double t15;     /* Term in coordinate conversion formula - GP to Y */
-  double t16;     /* Term in coordinate conversion formula - GP to Y */
-  double t17;     /* Term in coordinate conversion formula - GP to Y */
-  double tmd;     /* True Meridional distance                        */
-  double tmdo;    /* True Meridional distance for latitude of origin */
-  long Error_Code = TRANMERC_NO_ERROR;
-
-#if 0
-  if ((Easting < (TranMerc_False_Easting - TranMerc_Delta_Easting))
-      ||(Easting > (TranMerc_False_Easting + TranMerc_Delta_Easting)))
-  { /* Easting out of range  */
-    Error_Code |= TRANMERC_EASTING_ERROR;
-  }
-  if ((Northing < (TranMerc_False_Northing - TranMerc_Delta_Northing))
-      || (Northing > (TranMerc_False_Northing + TranMerc_Delta_Northing)))
-  { /* Northing out of range */
-    Error_Code |= TRANMERC_NORTHING_ERROR;
-  }
-#endif
-
-  if (!Error_Code)
-  {
-    /* True Meridional Distances for latitude of origin */
-    tmdo = SPHTMD(TranMerc_Origin_Lat);
-
-    /*  Origin  */
-    tmd = tmdo +  (Northing - TranMerc_False_Northing) / TranMerc_Scale_Factor; 
-
-    /* First Estimate */
-    sr = SPHSR(0.e0);
-    ftphi = tmd/sr;
-
-    for (i = 0; i < 5 ; i++)
-    {
-      t10 = SPHTMD (ftphi);
-      sr = SPHSR(ftphi);
-      ftphi = ftphi + (tmd - t10) / sr;
-    }
-
-    /* Radius of Curvature in the meridian */
-    sr = SPHSR(ftphi);
-
-    /* Radius of Curvature in the meridian */
-    sn = SPHSN(ftphi);
-
-    /* Sine Cosine terms */
-    s = sin(ftphi);
-    c = cos(ftphi);
-
-    /* Tangent Value  */
-    t = tan(ftphi);
-    tan2 = t * t;
-    tan4 = tan2 * tan2;
-    eta = TranMerc_ebs * pow(c,2);
-    eta2 = eta * eta;
-    eta3 = eta2 * eta;
-    eta4 = eta3 * eta;
-    de = Easting - TranMerc_False_Easting;
-    if (fabs(de) < 0.0001)
-      de = 0.0;
-
-    /* Latitude */
-    t10 = t / (2.e0 * sr * sn * pow(TranMerc_Scale_Factor, 2));
-    t11 = t * (5.e0  + 3.e0 * tan2 + eta - 4.e0 * pow(eta,2)
-               - 9.e0 * tan2 * eta) / (24.e0 * sr * pow(sn,3) 
-                                       * pow(TranMerc_Scale_Factor,4));
-    t12 = t * (61.e0 + 90.e0 * tan2 + 46.e0 * eta + 45.E0 * tan4
-               - 252.e0 * tan2 * eta  - 3.e0 * eta2 + 100.e0 
-               * eta3 - 66.e0 * tan2 * eta2 - 90.e0 * tan4
-               * eta + 88.e0 * eta4 + 225.e0 * tan4 * eta2
-               + 84.e0 * tan2* eta3 - 192.e0 * tan2 * eta4)
-          / ( 720.e0 * sr * pow(sn,5) * pow(TranMerc_Scale_Factor, 6) );
-    t13 = t * ( 1385.e0 + 3633.e0 * tan2 + 4095.e0 * tan4 + 1575.e0 
-                * pow(t,6))/ (40320.e0 * sr * pow(sn,7) * pow(TranMerc_Scale_Factor,8));
-    *Latitude = ftphi - pow(de,2) * t10 + pow(de,4) * t11 - pow(de,6) * t12 
-                + pow(de,8) * t13;
-
-    t14 = 1.e0 / (sn * c * TranMerc_Scale_Factor);
-
-    t15 = (1.e0 + 2.e0 * tan2 + eta) / (6.e0 * pow(sn,3) * c * 
-                                        pow(TranMerc_Scale_Factor,3));
-
-    t16 = (5.e0 + 6.e0 * eta + 28.e0 * tan2 - 3.e0 * eta2
-           + 8.e0 * tan2 * eta + 24.e0 * tan4 - 4.e0 
-           * eta3 + 4.e0 * tan2 * eta2 + 24.e0 
-           * tan2 * eta3) / (120.e0 * pow(sn,5) * c  
-                             * pow(TranMerc_Scale_Factor,5));
-
-    t17 = (61.e0 +  662.e0 * tan2 + 1320.e0 * tan4 + 720.e0 
-           * pow(t,6)) / (5040.e0 * pow(sn,7) * c 
-                          * pow(TranMerc_Scale_Factor,7));
-
-    /* Difference in Longitude */
-    dlam = de * t14 - pow(de,3) * t15 + pow(de,5) * t16 - pow(de,7) * t17;
-
-    /* Longitude */
-    (*Longitude) = TranMerc_Origin_Long + dlam;
-    while (*Latitude > (90.0 * RAD_PER_DEG))
-    {
-      *Latitude = M_PI - *Latitude;
-      *Longitude += M_PI;
-      if (*Longitude > M_PI)
-        *Longitude -= (TWO_PI);
-    }
-
-    while (*Latitude < (-90.0 * RAD_PER_DEG))
-    {
-      *Latitude = - (*Latitude + M_PI);
-      *Longitude += M_PI;
-      if (*Longitude > M_PI)
-        *Longitude -= (TWO_PI);
-    }
-    if (*Longitude > (TWO_PI))
-      *Longitude -= (TWO_PI);
-    if (*Longitude < -M_PI)
-      *Longitude += (TWO_PI);
-
-    if (fabs(dlam) > (9.0 * RAD_PER_DEG))
-    { /* Distortion will result if Longitude is more than 9 degrees from the Central Meridian */
-      Error_Code |= TRANMERC_LON_WARNING;
-    }
-  }
-  return (Error_Code);
-} /* END OF Convert_Transverse_Mercator_To_Geodetic */
diff --git a/src/ossim/projection/ossimTransMercatorProjection.cpp b/src/ossim/projection/ossimTransMercatorProjection.cpp
deleted file mode 100644
index fd7d3ef..0000000
--- a/src/ossim/projection/ossimTransMercatorProjection.cpp
+++ /dev/null
@@ -1,733 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  See top LICENSE.txt file.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-// Calls Geotrans Transverse Mercator  projection code.  
-//*******************************************************************
-//  $Id: ossimTransMercatorProjection.cpp 17815 2010-08-03 13:23:14Z dburken $
-#include <cmath>
-using namespace std;
-
-#include <ossim/projection/ossimTransMercatorProjection.h>
-#include <ossim/base/ossimKeywordNames.h>
-
-RTTI_DEF1(ossimTransMercatorProjection, "ossimTransMercatorProjection", ossimMapProjection)
-
-/******************************* DEFINES *********************************/
-
-#define TRANMERC_NO_ERROR           0x0000
-#define TRANMERC_LAT_ERROR          0x0001
-#define TRANMERC_LON_ERROR          0x0002
-#define TRANMERC_EASTING_ERROR      0x0004
-#define TRANMERC_NORTHING_ERROR     0x0008
-#define TRANMERC_ORIGIN_LAT_ERROR   0x0010
-#define TRANMERC_CENT_MER_ERROR     0x0020
-#define TRANMERC_A_ERROR            0x0040
-#define TRANMERC_B_ERROR            0x0080
-#define TRANMERC_A_LESS_B_ERROR     0x0100
-#define TRANMERC_SCALE_FACTOR_ERROR 0x0200
-#define TRANMERC_LON_WARNING        0x0400
-
-#define MAX_LAT         ((M_PI * 90.0)/180.0)    /* 90 degrees in radians */
-#define MAX_DELTA_LONG  ((M_PI * 90.0)/180.0)    /* 90 degrees in radians */
-#define MIN_SCALE_FACTOR  0.3
-#define MAX_SCALE_FACTOR  3.0
-
-#define SPHTMD(Latitude) ((double) (TranMerc_ap * Latitude \
-      - TranMerc_bp * sin(2.e0 * Latitude) + TranMerc_cp * sin(4.e0 * Latitude) \
-      - TranMerc_dp * sin(6.e0 * Latitude) + TranMerc_ep * sin(8.e0 * Latitude) ) )
-
-#define SPHSN(Latitude) ((double) (getA() / sqrt( 1.e0 - TranMerc_es * \
-      pow(sin(Latitude), 2))))
-
-#define SPHSR(Latitude) ((double) (getA() * (1.e0 - TranMerc_es) / \
-    pow(DENOM(Latitude), 3)))
-
-#define DENOM(Latitude) ((double) (sqrt(1.e0 - TranMerc_es * pow(sin(Latitude),2))))
-
-ossimTransMercatorProjection::ossimTransMercatorProjection(const ossimEllipsoid& ellipsoid,
-                                                           const ossimGpt& origin)
-   :
-      ossimMapProjection(ellipsoid, origin),
-      TranMerc_a(6378137.0),
-      TranMerc_f(1.0/298.257223563),
-      TranMerc_es(0.0066943799901413800),
-      TranMerc_ebs(0.0067394967565869),
-      TranMerc_Origin_Lat(origin.latr()),
-      TranMerc_Origin_Long(origin.lonr()),
-      TranMerc_False_Northing(0.0),
-      TranMerc_False_Easting(0.0),
-      TranMerc_Scale_Factor(1.0),
-      TranMerc_ap(6367449.1458008),
-      TranMerc_bp(16038.508696861),
-      TranMerc_cp(16.832613334334),
-      TranMerc_dp(0.021984404273757),
-      TranMerc_Delta_Easting(40000000.0),
-      TranMerc_Delta_Northing(40000000.0)
-{
-   update();
-}
-
-ossimTransMercatorProjection::ossimTransMercatorProjection(const ossimEllipsoid& ellipsoid,
-                                                           const ossimGpt& origin,
-                                                           double falseEasting,
-                                                           double falseNorthing,
-                                                           double scaleFactor)
-   :
-      ossimMapProjection(ellipsoid, origin),
-      TranMerc_a(6378137.0),
-      TranMerc_f(1.0/298.257223563),
-      TranMerc_es(0.0066943799901413800),
-      TranMerc_ebs(0.0067394967565869),
-      TranMerc_Origin_Lat(origin.latr()),
-      TranMerc_Origin_Long(origin.lonr()),
-      TranMerc_False_Northing(falseNorthing),
-      TranMerc_False_Easting(falseEasting),
-      TranMerc_Scale_Factor(scaleFactor),
-      TranMerc_ap(6367449.1458008),
-      TranMerc_bp(16038.508696861),
-      TranMerc_cp(16.832613334334),
-      TranMerc_dp(0.021984404273757),
-      TranMerc_Delta_Easting(40000000.0),
-      TranMerc_Delta_Northing(40000000.0)
-{
-   update();
-}
-
-void ossimTransMercatorProjection::update()
-{
-   Set_Transverse_Mercator_Parameters(theEllipsoid.getA(),
-                                      theEllipsoid.getFlattening(),
-                                      theOrigin.latr(),
-                                      theOrigin.lonr(),
-                                      TranMerc_False_Easting,
-                                      TranMerc_False_Northing,
-                                      TranMerc_Scale_Factor);
-
-   theFalseEastingNorthing.x = TranMerc_False_Easting;
-   theFalseEastingNorthing.y = TranMerc_False_Northing;
-
-   ossimMapProjection::update();
-}
-
-void ossimTransMercatorProjection::setFalseEasting(double falseEasting)
-{
-   TranMerc_False_Easting  = falseEasting;
-   
-   update();
-}
-
-
-void ossimTransMercatorProjection::setFalseNorthing(double falseNorthing)
-{
-   TranMerc_False_Northing = falseNorthing;
-   
-   update();
-}
-
-void ossimTransMercatorProjection::setFalseEastingNorthing(double falseEasting,
-                                                      double falseNorthing)
-{
-   TranMerc_False_Easting  = falseEasting;
-   TranMerc_False_Northing = falseNorthing;
-   
-   update();
-}
-
-void ossimTransMercatorProjection::setScaleFactor(double scaleFactor)
-{
-   TranMerc_Scale_Factor = scaleFactor;
-   
-   update();
-}
-
-void ossimTransMercatorProjection::setParameters(double falseEasting,
-                                                   double falseNorthing,
-                                                   double scaleFactor)
-{
-   TranMerc_False_Easting  = falseEasting;
-   TranMerc_False_Northing = falseNorthing;
-   TranMerc_Scale_Factor   = scaleFactor;
-   
-   update();
-}
-
-void ossimTransMercatorProjection::setDefaults()
-{
-   TranMerc_False_Easting  = 0.0;
-   TranMerc_False_Northing = 0.0;
-   TranMerc_Scale_Factor   = 1.0;
-   TranMerc_Delta_Easting  = 40000000.0;
-   TranMerc_Delta_Northing = 40000000.0;
-}
-
-ossimGpt ossimTransMercatorProjection::inverse(const ossimDpt &eastingNorthing)const
-{
-   double lat = 0.0;
-   double lon = 0.0;
-   
-   Convert_Transverse_Mercator_To_Geodetic(eastingNorthing.x,
-                                           eastingNorthing.y,
-                                           &lat,
-                                           &lon);
-   
-   return ossimGpt(lat*DEG_PER_RAD, lon*DEG_PER_RAD, 0.0, theDatum);
-}
-
-ossimDpt ossimTransMercatorProjection::forward(const ossimGpt &latLon)const
-{
-   double easting  = 0.0;
-   double northing = 0.0;
-   ossimGpt gpt = latLon;
-   
-   if (theDatum)
-   {
-      if (theDatum->code() != latLon.datum()->code())
-      {
-         gpt.changeDatum(theDatum); // Shift to our datum.
-      }
-   }
-
-   Convert_Geodetic_To_Transverse_Mercator(gpt.latr(),
-                                           gpt.lonr(),
-                                           &easting,
-                                           &northing);
-   
-   return ossimDpt(easting, northing);
-}
-
-bool ossimTransMercatorProjection::saveState(ossimKeywordlist& kwl, const char* prefix) const
-{
-   kwl.add(prefix,
-           ossimKeywordNames::SCALE_FACTOR_KW,
-           TranMerc_Scale_Factor,
-           true);
-   
-   return ossimMapProjection::saveState(kwl, prefix);
-}
-
-bool ossimTransMercatorProjection::loadState(const ossimKeywordlist& kwl,
-                                             const char* prefix)
-{
-   bool flag = ossimMapProjection::loadState(kwl, prefix);
-   const char* type          = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
-   const char* scaleFactor   = kwl.find(prefix, ossimKeywordNames::SCALE_FACTOR_KW);
-   
-   setDefaults();
-   if(ossimString(type) == STATIC_TYPE_NAME(ossimTransMercatorProjection))
-   {
-      TranMerc_False_Easting  = theFalseEastingNorthing.x;
-      TranMerc_False_Northing = theFalseEastingNorthing.y;
-
-      if(scaleFactor)
-      {
-         double d = ossimString(scaleFactor).toDouble();
-         if (d > 0.0) // Check to avoid divide by zero.
-         {
-            TranMerc_Scale_Factor = d;
-         }
-      }
-   }
-
-   update();
-
-   return flag;
-}
-
-/************************************************************************/
-/*                              FUNCTIONS     
- *
- */
-
-
-long ossimTransMercatorProjection::Set_Transverse_Mercator_Parameters(double a,
-                                                                      double f,
-                                                                      double Origin_Latitude,
-                                                                      double Central_Meridian,
-                                                                      double False_Easting,
-                                                                      double False_Northing,
-                                                                      double Scale_Factor)
-
-{ /* BEGIN Set_Tranverse_Mercator_Parameters */
-  /*
-   * The function Set_Tranverse_Mercator_Parameters receives the ellipsoid
-   * parameters and Tranverse Mercator projection parameters as inputs, and
-   * sets the corresponding state variables. If any errors occur, the error
-   * code(s) are returned by the function, otherwise TRANMERC_NO_ERROR is
-   * returned.
-   *
-   *    a                 : Semi-major axis of ellipsoid, in meters    (input)
-   *    f                 : Flattening of ellipsoid						         (input)
-   *    Origin_Latitude   : Latitude in radians at the origin of the   (input)
-   *                         projection
-   *    Central_Meridian  : Longitude in radians at the center of the  (input)
-   *                         projection
-   *    False_Easting     : Easting/X at the center of the projection  (input)
-   *    False_Northing    : Northing/Y at the center of the projection (input)
-   *    Scale_Factor      : Projection scale factor                    (input) 
-   */
-
-  double tn;        /* True Meridianal distance constant  */
-  double tn2;
-  double tn3;
-  double tn4;
-  double tn5;
-  double dummy_northing;
-  double TranMerc_b; /* Semi-minor axis of ellipsoid, in meters */
-//  double inv_f = 1 / f;
-  long Error_Code = TRANMERC_NO_ERROR;
-
-//   if (a <= 0.0)
-//   { /* Semi-major axis must be greater than zero */
-//     Error_Code |= TRANMERC_A_ERROR;
-//   }
-//   if ((inv_f < 250) || (inv_f > 350))
-//   { /* Inverse flattening must be between 250 and 350 */
-//     Error_Code |= TRANMERC_INV_F_ERROR;
-//   }
-//   if ((Origin_Latitude < -MAX_LAT) || (Origin_Latitude > MAX_LAT))
-//   { /* origin latitude out of range */
-//     Error_Code |= TRANMERC_ORIGIN_LAT_ERROR;
-//   }
-//   if ((Central_Meridian < -M_PI) || (Central_Meridian > TWO_PI))
-//   { /* origin longitude out of range */
-//     Error_Code |= TRANMERC_CENT_MER_ERROR;
-//   }
-//   if ((Scale_Factor < MIN_SCALE_FACTOR) || (Scale_Factor > MAX_SCALE_FACTOR))
-//   {
-//     Error_Code |= TRANMERC_SCALE_FACTOR_ERROR;
-//   }
-  if (!Error_Code)
-  { /* no errors */
-    TranMerc_a = a;
-    TranMerc_f = f;
-    TranMerc_Origin_Lat = 0;
-    TranMerc_Origin_Long = 0;
-    TranMerc_False_Northing = 0;
-    TranMerc_False_Easting = 0; 
-    TranMerc_Scale_Factor = 1;
-
-    /* Eccentricity Squared */
-    TranMerc_es = 2 * TranMerc_f - TranMerc_f * TranMerc_f;
-    /* Second Eccentricity Squared */
-    TranMerc_ebs = (1 / (1 - TranMerc_es)) - 1;
-
-    TranMerc_b = TranMerc_a * (1 - TranMerc_f);    
-    /*True meridianal constants  */
-    tn = (TranMerc_a - TranMerc_b) / (TranMerc_a + TranMerc_b);
-    tn2 = tn * tn;
-    tn3 = tn2 * tn;
-    tn4 = tn3 * tn;
-    tn5 = tn4 * tn;
-
-    TranMerc_ap = TranMerc_a * (1.e0 - tn + 5.e0 * (tn2 - tn3)/4.e0
-                                + 81.e0 * (tn4 - tn5)/64.e0 );
-    TranMerc_bp = 3.e0 * TranMerc_a * (tn - tn2 + 7.e0 * (tn3 - tn4)
-                                       /8.e0 + 55.e0 * tn5/64.e0 )/2.e0;
-    TranMerc_cp = 15.e0 * TranMerc_a * (tn2 - tn3 + 3.e0 * (tn4 - tn5 )/4.e0) /16.0;
-    TranMerc_dp = 35.e0 * TranMerc_a * (tn3 - tn4 + 11.e0 * tn5 / 16.e0) / 48.e0;
-    TranMerc_ep = 315.e0 * TranMerc_a * (tn4 - tn5) / 512.e0;
-    Convert_Geodetic_To_Transverse_Mercator(MAX_LAT,
-                                            MAX_DELTA_LONG,
-                                            &TranMerc_Delta_Easting,
-                                            &TranMerc_Delta_Northing);
-    Convert_Geodetic_To_Transverse_Mercator(0,
-                                            MAX_DELTA_LONG,
-                                            &TranMerc_Delta_Easting,
-                                            &dummy_northing);
-    TranMerc_Origin_Lat = Origin_Latitude;
-    if (Central_Meridian > M_PI)
-      Central_Meridian -= TWO_PI;
-    TranMerc_Origin_Long = Central_Meridian;
-    TranMerc_False_Northing = False_Northing;
-    TranMerc_False_Easting = False_Easting; 
-    TranMerc_Scale_Factor = Scale_Factor;
-  } /* END OF if(!Error_Code) */
-  return (Error_Code);
-}  /* END of Set_Transverse_Mercator_Parameters  */
-
-
-void ossimTransMercatorProjection::Get_Transverse_Mercator_Parameters(double *a,
-                                                                      double *f,
-                                                                      double *Origin_Latitude,
-                                                                      double *Central_Meridian,
-                                                                      double *False_Easting,
-                                                                      double *False_Northing,
-                                                                      double *Scale_Factor)const
-
-{ /* BEGIN Get_Tranverse_Mercator_Parameters  */
-  /*
-   * The function Get_Transverse_Mercator_Parameters returns the current
-   * ellipsoid and Transverse Mercator projection parameters.
-   *
-   *    a                 : Semi-major axis of ellipsoid, in meters    (output)
-   *    f                 : Flattening of ellipsoid						         (output)
-   *    Origin_Latitude   : Latitude in radians at the origin of the   (output)
-   *                         projection
-   *    Central_Meridian  : Longitude in radians at the center of the  (output)
-   *                         projection
-   *    False_Easting     : Easting/X at the center of the projection  (output)
-   *    False_Northing    : Northing/Y at the center of the projection (output)
-   *    Scale_Factor      : Projection scale factor                    (output) 
-   */
-
-  *a = TranMerc_a;
-  *f = TranMerc_f;
-  *Origin_Latitude = TranMerc_Origin_Lat;
-  *Central_Meridian = TranMerc_Origin_Long;
-  *False_Easting = TranMerc_False_Easting;
-  *False_Northing = TranMerc_False_Northing;
-  *Scale_Factor = TranMerc_Scale_Factor;
-  
-  return;
-} /* END OF Get_Tranverse_Mercator_Parameters */
-
-
-
-long ossimTransMercatorProjection::Convert_Geodetic_To_Transverse_Mercator (double Latitude,
-                                                                            double Longitude,
-                                                                            double *Easting,
-                                                                            double *Northing)const
-   
-{      /* BEGIN Convert_Geodetic_To_Transverse_Mercator */
-
-  /*
-   * The function Convert_Geodetic_To_Transverse_Mercator converts geodetic
-   * (latitude and longitude) coordinates to Transverse Mercator projection
-   * (easting and northing) coordinates, according to the current ellipsoid
-   * and Transverse Mercator projection coordinates.  If any errors occur, the
-   * error code(s) are returned by the function, otherwise TRANMERC_NO_ERROR is
-   * returned.
-   *
-   *    Latitude      : Latitude in radians                         (input)
-   *    Longitude     : Longitude in radians                        (input)
-   *    Easting       : Easting/X in meters                         (output)
-   *    Northing      : Northing/Y in meters                        (output)
-   */
-
-  double c;       /* Cosine of latitude                          */
-  double c2;
-  double c3;
-  double c5;
-  double c7;
-  double dlam;    /* Delta longitude - Difference in Longitude       */
-  double eta;     /* constant - TranMerc_ebs *c *c                   */
-  double eta2;
-  double eta3;
-  double eta4;
-  double s;       /* Sine of latitude                        */
-  double sn;      /* Radius of curvature in the prime vertical       */
-  double t;       /* Tangent of latitude                             */
-  double tan2;
-  double tan3;
-  double tan4;
-  double tan5;
-  double tan6;
-  double t1;      /* Term in coordinate conversion formula - GP to Y */
-  double t2;      /* Term in coordinate conversion formula - GP to Y */
-  double t3;      /* Term in coordinate conversion formula - GP to Y */
-  double t4;      /* Term in coordinate conversion formula - GP to Y */
-  double t5;      /* Term in coordinate conversion formula - GP to Y */
-  double t6;      /* Term in coordinate conversion formula - GP to Y */
-  double t7;      /* Term in coordinate conversion formula - GP to Y */
-  double t8;      /* Term in coordinate conversion formula - GP to Y */
-  double t9;      /* Term in coordinate conversion formula - GP to Y */
-  double tmd;     /* True Meridional distance                        */
-  double tmdo;    /* True Meridional distance for latitude of origin */
-  long    Error_Code = TRANMERC_NO_ERROR;
-//  double temp_Origin;
-//  double temp_Long;
-
-//   if ((Latitude < -MAX_LAT) || (Latitude > MAX_LAT))
-//   {  /* Latitude out of range */
-//     Error_Code|= TRANMERC_LAT_ERROR;
-//   }
-   if (Longitude > M_PI)
-     Longitude -= TWO_PI;
-//   if ((Longitude < (TranMerc_Origin_Long - MAX_DELTA_LONG))
-//       || (Longitude > (TranMerc_Origin_Long + MAX_DELTA_LONG)))
-//   {
-//     if (Longitude < 0)
-//       temp_Long = Longitude + TWO_PI;
-//     else
-//       temp_Long = Longitude;
-//     if (TranMerc_Origin_Long < 0)
-//       temp_Origin = TranMerc_Origin_Long + TWO_PI;
-//     else
-//       temp_Origin = TranMerc_Origin_Long;
-//     if ((temp_Long < (temp_Origin - MAX_DELTA_LONG))
-//         || (temp_Long > (temp_Origin + MAX_DELTA_LONG)))
-//       Error_Code|= TRANMERC_LON_ERROR;
-//   }
-  if (!Error_Code)
-  { /* no errors */
-
-    /* 
-     *  Delta Longitude
-     */
-    dlam = Longitude - TranMerc_Origin_Long;
-
-//     if (fabs(dlam) > (9.0 * M_PI / 180))
-//     { /* Distortion will result if Longitude is more than 9 degrees from the Central Meridian */
-//       Error_Code |= TRANMERC_LON_WARNING;
-//     }
-
-     if (dlam > M_PI)
-       dlam -= TWO_PI;
-     if (dlam < -M_PI)
-       dlam += TWO_PI;
-     if (fabs(dlam) < 2.e-10)
-       dlam = 0.0;
-
-    s = sin(Latitude);
-    c = cos(Latitude);
-    c2 = c * c;
-    c3 = c2 * c;
-    c5 = c3 * c2;
-    c7 = c5 * c2;
-    t = tan (Latitude);
-    tan2 = t * t;
-    tan3 = tan2 * t;
-    tan4 = tan3 * t;
-    tan5 = tan4 * t;
-    tan6 = tan5 * t;
-    eta = TranMerc_ebs * c2;
-    eta2 = eta * eta;
-    eta3 = eta2 * eta;
-    eta4 = eta3 * eta;
-
-    /* radius of curvature in prime vertical */
-    sn = SPHSN(Latitude);
-
-    /* True Meridianal Distances */
-    tmd = SPHTMD(Latitude);
-
-    /*  Origin  */
-    tmdo = SPHTMD (TranMerc_Origin_Lat);
-
-    /* northing */
-    t1 = (tmd - tmdo) * TranMerc_Scale_Factor;
-    t2 = sn * s * c * TranMerc_Scale_Factor/ 2.e0;
-    t3 = sn * s * c3 * TranMerc_Scale_Factor * (5.e0 - tan2 + 9.e0 * eta 
-                                                + 4.e0 * eta2) /24.e0; 
-
-    t4 = sn * s * c5 * TranMerc_Scale_Factor * (61.e0 - 58.e0 * tan2
-                                                + tan4 + 270.e0 * eta - 330.e0 * tan2 * eta + 445.e0 * eta2
-                                                + 324.e0 * eta3 -680.e0 * tan2 * eta2 + 88.e0 * eta4 
-                                                -600.e0 * tan2 * eta3 - 192.e0 * tan2 * eta4) / 720.e0;
-
-    t5 = sn * s * c7 * TranMerc_Scale_Factor * (1385.e0 - 3111.e0 * 
-                                                tan2 + 543.e0 * tan4 - tan6) / 40320.e0;
-
-    *Northing = TranMerc_False_Northing + t1 + pow(dlam,2.e0) * t2
-                + pow(dlam,4.e0) * t3 + pow(dlam,6.e0) * t4
-                + pow(dlam,8.e0) * t5; 
-
-    /* Easting */
-    t6 = sn * c * TranMerc_Scale_Factor;
-    t7 = sn * c3 * TranMerc_Scale_Factor * (1.e0 - tan2 + eta ) /6.e0;
-    t8 = sn * c5 * TranMerc_Scale_Factor * (5.e0 - 18.e0 * tan2 + tan4
-                                            + 14.e0 * eta - 58.e0 * tan2 * eta + 13.e0 * eta2 + 4.e0 * eta3 
-                                            - 64.e0 * tan2 * eta2 - 24.e0 * tan2 * eta3 )/ 120.e0;
-    t9 = sn * c7 * TranMerc_Scale_Factor * ( 61.e0 - 479.e0 * tan2
-                                             + 179.e0 * tan4 - tan6 ) /5040.e0;
-
-    *Easting = TranMerc_False_Easting + dlam * t6 + pow(dlam,3.e0) * t7 
-               + pow(dlam,5.e0) * t8 + pow(dlam,7.e0) * t9;
-  }
-  return (Error_Code);
-} /* END OF Convert_Geodetic_To_Transverse_Mercator */
-
-
-long ossimTransMercatorProjection::Convert_Transverse_Mercator_To_Geodetic (double Easting,
-                                                                            double Northing,
-                                                                            double *Latitude,
-                                                                            double *Longitude)const
-{      /* BEGIN Convert_Transverse_Mercator_To_Geodetic */
-
-  /*
-   * The function Convert_Transverse_Mercator_To_Geodetic converts Transverse
-   * Mercator projection (easting and northing) coordinates to geodetic
-   * (latitude and longitude) coordinates, according to the current ellipsoid
-   * and Transverse Mercator projection parameters.  If any errors occur, the
-   * error code(s) are returned by the function, otherwise TRANMERC_NO_ERROR is
-   * returned.
-   *
-   *    Easting       : Easting/X in meters                         (input)
-   *    Northing      : Northing/Y in meters                        (input)
-   *    Latitude      : Latitude in radians                         (output)
-   *    Longitude     : Longitude in radians                        (output)
-   */
-
-  double c;       /* Cosine of latitude                          */
-  double de;      /* Delta easting - Difference in Easting (Easting-Fe)    */
-  double dlam;    /* Delta longitude - Difference in Longitude       */
-  double eta;     /* constant - TranMerc_ebs *c *c                   */
-  double eta2;
-  double eta3;
-  double eta4;
-  double ftphi;   /* Footpoint latitude                              */
-  int    i;       /* Loop iterator                   */
-  double s;       /* Sine of latitude                        */
-  double sn;      /* Radius of curvature in the prime vertical       */
-  double sr;      /* Radius of curvature in the meridian             */
-  double t;       /* Tangent of latitude                             */
-  double tan2;
-  double tan4;
-  double t10;     /* Term in coordinate conversion formula - GP to Y */
-  double t11;     /* Term in coordinate conversion formula - GP to Y */
-  double t12;     /* Term in coordinate conversion formula - GP to Y */
-  double t13;     /* Term in coordinate conversion formula - GP to Y */
-  double t14;     /* Term in coordinate conversion formula - GP to Y */
-  double t15;     /* Term in coordinate conversion formula - GP to Y */
-  double t16;     /* Term in coordinate conversion formula - GP to Y */
-  double t17;     /* Term in coordinate conversion formula - GP to Y */
-  double tmd;     /* True Meridional distance                        */
-  double tmdo;    /* True Meridional distance for latitude of origin */
-  long Error_Code = TRANMERC_NO_ERROR;
-
-//   if ((Easting < (TranMerc_False_Easting - TranMerc_Delta_Easting))
-//       ||(Easting > (TranMerc_False_Easting + TranMerc_Delta_Easting)))
-//   { /* Easting out of range  */
-//     Error_Code |= TRANMERC_EASTING_ERROR;
-//   }
-//   if ((Northing < (TranMerc_False_Northing - TranMerc_Delta_Northing))
-//       || (Northing > (TranMerc_False_Northing + TranMerc_Delta_Northing)))
-//   { /* Northing out of range */
-//     Error_Code |= TRANMERC_NORTHING_ERROR;
-//   }
-
-  if (!Error_Code)
-  {
-    /* True Meridional Distances for latitude of origin */
-    tmdo = SPHTMD(TranMerc_Origin_Lat);
-
-    /*  Origin  */
-    tmd = tmdo +  (Northing - TranMerc_False_Northing) / TranMerc_Scale_Factor; 
-
-    /* First Estimate */
-    sr = SPHSR(0.e0);
-    ftphi = tmd/sr;
-
-    for (i = 0; i < 5 ; i++)
-    {
-      t10 = SPHTMD (ftphi);
-      sr = SPHSR(ftphi);
-      ftphi = ftphi + (tmd - t10) / sr;
-    }
-
-    /* Radius of Curvature in the meridian */
-    sr = SPHSR(ftphi);
-
-    /* Radius of Curvature in the meridian */
-    sn = SPHSN(ftphi);
-
-    /* Sine Cosine terms */
-    s = sin(ftphi);
-    c = cos(ftphi);
-
-    /* Tangent Value  */
-    t = tan(ftphi);
-    tan2 = t * t;
-    tan4 = tan2 * tan2;
-    eta = TranMerc_ebs * pow(c,2);
-    eta2 = eta * eta;
-    eta3 = eta2 * eta;
-    eta4 = eta3 * eta;
-    de = Easting - TranMerc_False_Easting;
-    if (fabs(de) < 0.0001)
-      de = 0.0;
-
-    /* Latitude */
-    t10 = t / (2.e0 * sr * sn * pow(TranMerc_Scale_Factor, 2));
-    t11 = t * (5.e0  + 3.e0 * tan2 + eta - 4.e0 * pow(eta,2)
-               - 9.e0 * tan2 * eta) / (24.e0 * sr * pow(sn,3) 
-                                       * pow(TranMerc_Scale_Factor,4));
-    t12 = t * (61.e0 + 90.e0 * tan2 + 46.e0 * eta + 45.E0 * tan4
-               - 252.e0 * tan2 * eta  - 3.e0 * eta2 + 100.e0 
-               * eta3 - 66.e0 * tan2 * eta2 - 90.e0 * tan4
-               * eta + 88.e0 * eta4 + 225.e0 * tan4 * eta2
-               + 84.e0 * tan2* eta3 - 192.e0 * tan2 * eta4)
-          / ( 720.e0 * sr * pow(sn,5) * pow(TranMerc_Scale_Factor, 6) );
-    t13 = t * ( 1385.e0 + 3633.e0 * tan2 + 4095.e0 * tan4 + 1575.e0 
-                * pow(t,6))/ (40320.e0 * sr * pow(sn,7) * pow(TranMerc_Scale_Factor,8));
-    *Latitude = ftphi - pow(de,2) * t10 + pow(de,4) * t11 - pow(de,6) * t12 
-                + pow(de,8) * t13;
-
-    t14 = 1.e0 / (sn * c * TranMerc_Scale_Factor);
-
-    t15 = (1.e0 + 2.e0 * tan2 + eta) / (6.e0 * pow(sn,3) * c * 
-                                        pow(TranMerc_Scale_Factor,3));
-
-    t16 = (5.e0 + 6.e0 * eta + 28.e0 * tan2 - 3.e0 * eta2
-           + 8.e0 * tan2 * eta + 24.e0 * tan4 - 4.e0 
-           * eta3 + 4.e0 * tan2 * eta2 + 24.e0 
-           * tan2 * eta3) / (120.e0 * pow(sn,5) * c  
-                             * pow(TranMerc_Scale_Factor,5));
-
-    t17 = (61.e0 +  662.e0 * tan2 + 1320.e0 * tan4 + 720.e0 
-           * pow(t,6)) / (5040.e0 * pow(sn,7) * c 
-                          * pow(TranMerc_Scale_Factor,7));
-
-    /* Difference in Longitude */
-    dlam = de * t14 - pow(de,3) * t15 + pow(de,5) * t16 - pow(de,7) * t17;
-
-    /* Longitude */
-    (*Longitude) = TranMerc_Origin_Long + dlam;
-    while (*Latitude > (90.0 * RAD_PER_DEG))
-    {
-      *Latitude = M_PI - *Latitude;
-      *Longitude += M_PI;
-      if (*Longitude > M_PI)
-        *Longitude -= TWO_PI;
-    }
-
-     while (*Latitude < (-90.0 * RAD_PER_DEG))
-     {
-       *Latitude = - (*Latitude + M_PI);
-       *Longitude += M_PI;
-       if (*Longitude > M_PI)
-         *Longitude -= TWO_PI;
-     }
-     if (*Longitude > TWO_PI)
-       *Longitude -= TWO_PI;
-     if (*Longitude < -M_PI)
-       *Longitude += TWO_PI;
-
-//     if (fabs(dlam) > (9.0 * M_PI / 180))
-//     { /* Distortion will result if Longitude is more than 9 degrees from the Central Meridian */
-//       Error_Code |= TRANMERC_LON_WARNING;
-//     }
-  }
-  return (Error_Code);
-} /* END OF Convert_Transverse_Mercator_To_Geodetic */
-
-std::ostream& ossimTransMercatorProjection::print(std::ostream& out) const
-{
-   out << setiosflags(ios::fixed) << setprecision(15)
-       << "// ossimTransMercatorProjection::print\n"
-       << ossimKeywordNames::SCALE_FACTOR_KW << ":  " << TranMerc_Scale_Factor
-       << endl;
-   return ossimMapProjection::print(out);
-}
-
-//*************************************************************************************************
-//! Returns TRUE if principal parameters are within epsilon tolerance.
-//*************************************************************************************************
-bool ossimTransMercatorProjection::operator==(const ossimProjection& proj) const
-{
-   if (!ossimMapProjection::operator==(proj))
-      return false;
-
-   ossimTransMercatorProjection* p = PTR_CAST(ossimTransMercatorProjection, &proj);
-   if (!p) return false;
-
-   if (!ossim::almostEqual(TranMerc_Scale_Factor,p->TranMerc_Scale_Factor)) return false;
-
-   return true;
-}
diff --git a/src/ossim/projection/ossimUtmpt.cpp b/src/ossim/projection/ossimUtmpt.cpp
deleted file mode 100644
index f9d5c20..0000000
--- a/src/ossim/projection/ossimUtmpt.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-// Description:
-//
-// This is the Universal Transverse Mercator (UTM) point.  Allows
-// easy onversion between different coordinates.
-//*******************************************************************
-//  $Id: ossimUtmpt.cpp 10058 2006-12-08 20:04:23Z mlucas $
-
-#include <ossim/projection/ossimUtmpt.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimEcefPoint.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimEllipsoid.h>
-#include <ossim/projection/ossimUtm.h>
-
-ossimUtmpt::ossimUtmpt(const ossimGpt &aPt)
-{
-   convertFromGround(aPt);
-}
-
-ossimUtmpt::ossimUtmpt(const ossimEcefPoint &aPt)
-{
-   convertFromGround(ossimGpt(aPt));
-}
-
-ossimUtmpt::ossimUtmpt(long         zone,
-                       char         hemisphere,  // N or S
-                       double       easting,
-                       double       northing,
-                       const ossimDatum* datum)
-   :
-      theZone       (zone),
-      theHemisphere (hemisphere),
-      theEasting    (easting),
-      theNorthing   (northing),
-      theDatum      (datum)
-{}
-
-void ossimUtmpt::convertFromGround(const ossimGpt &aPt)
-{
-   const ossimDatum *aDatum = aPt.datum();
-
-   if(aDatum)
-   {
-      //call Geotrans init code
-      Set_UTM_Parameters(aDatum->ellipsoid()->a(), aDatum->ellipsoid()->flattening(), 0);
-      Convert_Geodetic_To_UTM(aPt.latr(),
-                              aPt.lonr(),
-                              &theZone,
-                              &theHemisphere,
-                              &theEasting,
-                              &theNorthing);
-      theDatum = aDatum;
-   }
-   else
-   {
-      //ERROR: Should never happen
-   }
-}
-
-void ossimUtmpt::convertToGround(ossimGpt &aPt)
-{
-   Set_UTM_Parameters( theDatum->ellipsoid()->a(),
-                       theDatum->ellipsoid()->flattening(),
-                       0 );
-   
-   double latitude  = 0.0;
-   double longitude = 0.0;
-
-   Convert_UTM_To_Geodetic( zone(),
-                            hemisphere(),
-                            easting(),
-                            northing(),
-                            &latitude,
-                            &longitude );
-
-   aPt.latr(latitude);
-   aPt.lonr(longitude);
-   aPt.datum(theDatum);
-}
diff --git a/src/ossim/projection/ossimWktProjectionFactory.cpp b/src/ossim/projection/ossimWktProjectionFactory.cpp
deleted file mode 100644
index 884fa3b..0000000
--- a/src/ossim/projection/ossimWktProjectionFactory.cpp
+++ /dev/null
@@ -1,188 +0,0 @@
-//*************************************************************************************************
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Oscar Kramer
-//
-// DESCRIPTION:
-// Projection Factory for EPSG coded projections. These are projections
-// that are fully defined in database files and specified via a projection coordinate system (PCS)
-// code.
-//
-//*************************************************************************************************
-//  $Id: ossimWktProjectionFactory.cpp 19879 2011-07-30 16:21:50Z dburken $
-
-#include <ossim/projection/ossimWktProjectionFactory.h>
-#include <ossim/projection/ossimEquDistCylProjection.h>
-#include <ossim/projection/ossimOrthoGraphicProjection.h>
-#include <ossim/projection/ossimTransMercatorProjection.h>
-#include <ossim/projection/ossimUtmProjection.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimPreferences.h>
-#include <ossim/projection/ossimEpsgProjectionDatabase.h>
-#include <sstream>
-
-ossimWktProjectionFactory* ossimWktProjectionFactory::m_instance = 0;
-static const ossimString WKT_MAGIC ("WKT_PCS");
-
-//*************************************************************************************************
-//! Implements singleton pattern
-//*************************************************************************************************
-ossimWktProjectionFactory* ossimWktProjectionFactory::instance()
-{
-   if(!m_instance)
-      m_instance = new ossimWktProjectionFactory;
-   return m_instance;
-}
-
-//*************************************************************************************************
-//! Constructor loads all SRS CSV files specified in the ossim prefs
-//*************************************************************************************************
-ossimWktProjectionFactory::ossimWktProjectionFactory()
-{
-   // Fetch filename of WKT projection DB file specified in ossim_preferences:
-   ossimFilename db_name = 
-      ossimPreferences::instance()->preferencesKWL().find("wkt_database_file");
-   if (!db_name.isReadable())
-      return;
-
-   // Create only once outside the loop:
-   ossimString format_id;
-   ossimString line;
-
-   // Open the DB file:
-   std::ifstream db_stream (db_name.chars());
-   bool good_file = false;
-   if (db_stream.good())
-   {
-      // Format specification implied in file's magic number:
-      std::getline(db_stream, format_id.string());
-      format_id.trim();
-      if (format_id == WKT_MAGIC)
-         good_file = true;
-   }
-   if (!good_file)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)<<"ossimWktProjectionDatabase Constructor -- "
-         "Encountered bad WKT database file <"<<db_name<<">. Skipping this file."<<endl;
-      db_stream.close();
-      return;
-   }
-
-   // The file is good. Skip over the column descriptor line:
-   std::getline(db_stream, line.string());
-
-   // Loop to read all data records:
-   while (!db_stream.eof())
-   {
-      ossimRefPtr<WktProjRecord> db_record = new WktProjRecord;
-      std::getline(db_stream, line.string());
-      std::vector<ossimString> csvRecord = line.explode(","); // ONLY CSV FILES CONSIDERED HERE
-      if (csvRecord.size())
-      {
-         db_record->epsgCode  = csvRecord[0].toUInt32();
-         db_record->wktString = csvRecord[1];
-         m_wktProjRecords.push_back(db_record);
-      }
-   }
-
-   db_stream.close();
-
-}
-
-//*************************************************************************************************
-//! From keywordlist
-//*************************************************************************************************
-ossimProjection* ossimWktProjectionFactory::createProjection(const ossimKeywordlist &keywordList,
-                                                             const char *prefix) const
-{
-    ossimProjection* proj = 0;
-
-   // Look for a PCS (Projected Coordinate System) code entry and construct the basic projection.
-   // This is the bootstrap for creating the fully-initialized proj:
-   ossimString proj_spec = keywordList.find(prefix, ossimKeywordNames::PROJECTION_KW);
-   if(!proj_spec.empty())
-      proj = createProjection(proj_spec);
-  
-   if (!proj)
-      return NULL;
-
-   // The tie points and perhaps other params might still be in the KWL, so pass the KWL on to the
-   // new projection after it has been amended with the default proj info extracted from the 
-   // EPSG code (i.e., sans tiepoints and gsd):
-   ossimKeywordlist proj_kwl;
-   proj->saveState(proj_kwl, prefix);
-   proj_kwl.remove(prefix, ossimKeywordNames::PIXEL_SCALE_XY_KW);
-   proj_kwl.remove(prefix, ossimKeywordNames::PIXEL_SCALE_UNITS_KW);
-   proj_kwl.remove(prefix, ossimKeywordNames::TIE_POINT_XY_KW);
-   proj_kwl.remove(prefix, ossimKeywordNames::TIE_POINT_UNITS_KW);
-   proj_kwl.addList(keywordList, false); // false: do not override existing items
-   proj->loadState(proj_kwl, prefix);
-   
-   return proj;
-}
-
-//*************************************************************************************************
-// This is the principal factory method. It accepts a WKT string, for example 
-// "Anguilla_1957_British_West_Indies_Grid"
-//
-// IMPORTANT NOTE: Image tie-points cannot be conveyed by a WKT projection string. The projection
-// created here will not be fully initialized for use in rendering imagery.
-//*************************************************************************************************
-ossimProjection* ossimWktProjectionFactory::createProjection(const ossimString &spec) const
-{
-   ossimProjection* proj = 0;
-   
-   std::vector<ossimRefPtr<WktProjRecord> >::iterator db_iter = m_wktProjRecords.begin();
-   while ((db_iter != m_wktProjRecords.end()) && !proj)
-   {
-      if ((*db_iter)->wktString == spec)
-      {
-         // We may already have instantiated this projection, in which case just return its copy.
-         // Otherwise, create the projection from the EPSG code that corresponds to the name:
-         if ((*db_iter)->proj.valid())
-            proj = (ossimProjection*) (*db_iter)->proj->dup();
-         else
-            proj = ossimEpsgProjectionDatabase::instance()->findProjection((*db_iter)->epsgCode);
-      }
-      db_iter++;
-   }
-   return proj;
-}
-
-//*************************************************************************************************
-ossimObject* ossimWktProjectionFactory::createObject(const ossimString& typeName)const
-{
-   return createProjection(typeName);
-}
-
-//*************************************************************************************************
-ossimObject* ossimWktProjectionFactory::createObject(const ossimKeywordlist& kwl,
-                                                     const char* prefix)const
-{
-   return createProjection(kwl, prefix);
-}
-
-//*************************************************************************************************
-//! STUB. Not implemented
-//*************************************************************************************************
-ossimProjection* ossimWktProjectionFactory::createProjection(const ossimFilename& /* filename */,
-                                                              ossim_uint32 /* entryIdx */)const
-{
-   return 0;
-}
-
-//*************************************************************************************************
-//! This returns the type name of all objects in all factories. This is the name used to 
-//! construct the objects dynamically and this name must be unique.
-//*************************************************************************************************
-void ossimWktProjectionFactory::getTypeNameList(std::vector<ossimString>& typeList) const
-{
-   std::vector<ossimRefPtr<WktProjRecord> >::iterator db_iter = m_wktProjRecords.begin();
-   while (db_iter != m_wktProjRecords.end())
-   {
-      typeList.push_back((*db_iter)->wktString);
-      db_iter++;
-   }
-   return;
-}
-
diff --git a/src/ossim/support_data/.cvsignore b/src/ossim/support_data/.cvsignore
deleted file mode 100644
index 3ccb77a..0000000
--- a/src/ossim/support_data/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-*.d
-*.o
-*.~*
-Makefile
diff --git a/src/ossim/support_data/ossimAlphaSensorSupportData.cpp b/src/ossim/support_data/ossimAlphaSensorSupportData.cpp
deleted file mode 100644
index abc2e00..0000000
--- a/src/ossim/support_data/ossimAlphaSensorSupportData.cpp
+++ /dev/null
@@ -1,691 +0,0 @@
-#include <ossim/support_data/ossimAlphaSensorSupportData.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimEcefPoint.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/support_data/ossimEnviHeader.h>
-#include <fstream>
-#include <sstream>
-
-static ossimTrace traceDebug("ossimAlphaSensorSupportData:debug");
-
-
-ossimAlphaSensorSupportData::ossimAlphaSensorSupportData()
-   : m_isHSI(false),
-     m_sensorType(),
-     m_imageSize(),
-     m_rollBias(ossim::nan()),
-     m_pitchBias(ossim::nan()),
-     m_headingBias(ossim::nan()),
-     m_fov(ossim::nan()),
-     m_slitRot(ossim::nan()),
-     m_imgLine(),
-     m_roll(),
-     m_pitch(),
-     m_heading(),
-     m_lon(),
-     m_lat(),
-     m_alt(),
-     m_scanAng(),
-     m_rollPolyCoef(),
-     m_pitchPolyCoef(),
-     m_headingPolyCoef(),
-     m_lonPolyCoef(),
-     m_altPolyCoef(),
-     m_scanAngPolyCoef()
-{
-   reset();
-}
-
-void ossimAlphaSensorSupportData::reset()
-{
-   m_imageSize.makeNan();
-}
-
-
-bool ossimAlphaSensorSupportData::readSupportFiles(const ossimFilename& hdrFile)
-{
-   bool readOK = false;
-
-   // Read ENVI hdr file
-   ossimEnviHeader hdr;
-   if ( hdr.open(hdrFile) )
-   {
-      readOK= readSupportFiles( hdr );
-   }
-   return readOK;
-}
-
-bool ossimAlphaSensorSupportData::readSupportFiles(const ossimEnviHeader& hdr)
-{
-   bool readOK = readHdrFile(hdr);
-
-   ossimFilename txtFile = hdr.getFile();
-   
-   if ( readOK )
-   {
-      // Derive associated insgps.txt file name
-      if (m_isHSI)
-      {
-         // HSI:
-         //  Associated file is located in /NavData, sub-directory of current container
-         //   example:
-         //   .hdr = "/data/AH/2012-06-15_20-00-29/HSI/Scan_00002/2012-06-15_20-00-29.HSI.Scan_00002.scene.corrected.hsi.hdr"
-         //   .txt = "/data/AH/2012-06-15_20-00-29/HSI/Scan_00002/NavData/2012-06-15_20-00-29.HSI.Scan_00002.scene.insgps.txt"
-         // txtFile.insert(hdr.getFile().find_last_of('/'), "/NavData");
-         // txtFile.gsub("corrected.hsi.hdr", "insgps.txt");
-
-         ossimFilename navDir = hdr.getFile().path();
-         navDir = navDir.dirCat("NavData");
-         if ( navDir.exists() )
-         {
-            txtFile = navDir.dirCat( hdr.getFile().file() );
-            txtFile.gsub("corrected.hsi.hdr", "insgps.txt");
-         }
-         else
-         {
-            //-- 
-            // Example header and inertial nav support(INS) data file paths:
-            // 
-            // Header: /data/20131113/hsi/cal/001_001_hsi_cal_001.hsi.hdr
-            // INS:    /data/20131113/hsi/nav/001_001_hsi_cal_001.txt
-            //---
-            
-            // Expand header file out to absolute path:
-            txtFile = hdr.getFile().expand();
-            
-            // Substitute the "cal" directory with "nav".
-            txtFile.gsub("cal/", "nav/");
-
-            // Substitute the "hsi.hdr" directory with "txt".
-            txtFile.gsub("hsi.hdr", "txt");
-         }
-      }
-      else
-      {
-         // HRI:
-         //  Associated file is located in ../NavData, parallel to current container
-         //  There is one insgps.txt file common to multiple hdr files
-         //   example:
-         //   .hdr = "/data/AH/2012-06-15_20-00-29/HRI/HRI_2/2012-06-15_20-00-29.HRI_2.Strip_00004.corrected.hri.hdr"
-         //   .txt = "/data/AH/2012-06-15_20-00-29/HRI/NavData/2012-06-15_20-00-29.HRI.Strip_00004.insgps.txt"
-
-         // Replaced: 29 July 2013 (drb)
-         // txtFile = hdr.getFile().path();
-         // if ( txtFile.empty() )
-         // {
-         //    txtFile = txtFile.dirCat("../NavData");
-         // }
-         // else
-         // {
-         //    txtFile.replace(txtFile.find("HRI_"), 5, "NavData");
-         // }  
-         // txtFile = txtFile.dirCat( hdr.getFile().file() );
-         // txtFile.replace(txtFile.find("HRI_"), 5, "HRI");
-         // txtFile.gsub("corrected.hri.hdr", "insgps.txt");
-         // 
-         // with:
-
-         ossimFilename navDir = hdr.getFile().path();
-         if ( navDir.empty() )
-         {
-            navDir = navDir.dirCat("../NavData");
-         }
-         else
-         {
-            navDir = navDir.replace(navDir.find("HRI_"), 5, "NavData");
-         }
-         if ( navDir.exists() )
-         {
-            txtFile = navDir.dirCat( hdr.getFile().file() );
-            txtFile.replace(txtFile.find("HRI_"), 5, "HRI");
-            txtFile.gsub("corrected.hri.hdr", "insgps.txt");
-         }
-         else
-         {
-            navDir = "../nav";
-            txtFile = navDir.dirCat( hdr.getFile().file() );
-            txtFile.gsub("hri.hdr", "txt");
-         }
-      }            
-
-      // Read .txt file
-      readOK = readInsGpsFile(txtFile);
-   }    
-   
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimAlphaSensorSupportData::readSupportFiles DEBUG:"
-         << "\n hdrFile = " << hdr.getFile()
-         << "\n txtFile = " << txtFile
-         << std::endl;
-   }
-
-   return readOK;
-}
-
-bool ossimAlphaSensorSupportData::readHdrFile(const ossimFilename& hdrFile)
-{
-   bool result = false;
-   ossimEnviHeader hdr;
-   if ( hdr.open(hdrFile) )
-   {
-      result = readHdrFile( hdr );
-   }
-   return result;
-}
-
-bool ossimAlphaSensorSupportData::readHdrFile(const ossimEnviHeader& hdr)
-{
-   bool result = false;
-
-   while( 1 )
-   {
-      // Required stuff will break from loop if not found/valid.
-
-      m_sensorType = hdr.getSensorType();
-      if ( m_sensorType.empty() ) break;
-      
-      if ( m_sensorType == "Unknown" )
-      {
-         // Make an assumption from file name...
-         if ( hdr.getFile().file().contains( ossimString("HSI") ) )
-         {
-            m_sensorType = "ACES_YOGI-HSI";
-         }
-         else if (  hdr.getFile().file().contains( ossimString("HRI") ) )
-         {
-            m_sensorType = "ACES_YOGI-HRI2";
-         }
-      }
-
-      if ( m_sensorType == "Unknown" )
-      {
-         break; // Get out...
-      }
-
-      // Set the hsi flag:
-      if ( m_sensorType.contains("HSI") || (hdr.getBands() > 63 ) ) // arbitrary...
-      {
-         m_isHSI = true;
-      }
-      else
-      {
-         m_isHSI = false;
-      }
-
-      m_imageSize.x = hdr.getSamples();
-      m_imageSize.y = hdr.getLines();
-      if ( !m_imageSize.x || !m_imageSize.y ) break;
-      
-      ossimString value;
- 
-      hdr.getValue("roll bias", value);
-      if ( value.size() )
-      {
-         m_rollBias = ossimString::toDouble(value);
-      }
-      else
-      {
-         break;
-      }
-
-      hdr.getValue("pitch bias", value);
-      if ( value.size() )
-      {
-         m_pitchBias = ossimString::toDouble(value);
-      }
-      else
-      {
-         break;
-      }
-
-      hdr.getValue("heading bias", value);
-      if ( value.size() )
-      {
-         m_headingBias = ossimString::toDouble(value);
-      }
-      else
-      {
-         break;
-      }
-
-      hdr.getValue("fpa fov deg", value);
-      if ( value.size() )
-      {
-         m_fov = ossimString::toDouble(value);
-      }
-      else
-      {
-         break;
-      }
-
-      hdr.getValue("slit rotation deg", value);
-      if ( value.size() )
-      {
-         m_slitRot = ossimString::toDouble(value);
-      }
-      else
-      {
-         // Removed requirement. Missing in some support data and always 0 when present.
-         if ( traceDebug() )
-         {
-            ossimNotify(ossimNotifyLevel_NOTICE)
-               << "Missing: \"slit rotation deg\"\n";
-         }
-      }
-
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimAlphaSensorSupportData::readHdrFile DEBUG:"
-            << "\n getSensorType = " << m_sensorType
-            << "\n getSamples = " << m_imageSize.x
-            << "\n getLines = " << m_imageSize.y
-            << "\n roll bias = " << m_rollBias
-            << "\n pitch bias = " << m_pitchBias
-            << "\n heading bias = " << m_headingBias
-            << "\n fpa fov deg = " << m_fov
-            << "\n slit rotation deg = " << m_slitRot
-            << "\n";
-      }
-
-      // Last two lines of while forever.  If we get here, set status true and break out.
-      result = true;
-      break;
-   }
-
-   return result;
-
-} // End: bool ossimAlphaSensorSupportData::readHdrFile(const ossimEnviHeader& )
-
-bool ossimAlphaSensorSupportData::readInsGpsFile(const ossimFilename& file)
-{
-   bool result = true;
-
-   static const char M[] = "ossimAlphaSensorSupportData::readInsGpsFile";
-   
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << M << " entered:\n" << "file: " << file << "\n";
-   }
-   
-   std::ifstream in(file.c_str(), std::ios::in);
-   if ( in.good() )
-   {
-      ossim_float64 inum;
-      ossim_float64 roll;
-      ossim_float64 pitch;
-      ossim_float64 heading;
-      ossim_float64 lon;
-      ossim_float64 lat;
-      ossim_float64 alt;
-      ossim_float64 scanAng;
-      int res;
-      int frm;
-      const ossim_float64 BOGUS = -99999.0; // To detect read error/missing value.
-      ossim_float64 timeCode = BOGUS;
-
-      std::vector< ossim_uint32 > lines;
-
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimAlphaSensorSupportData::readInsGpsFile DEBUG:" << std::endl;
-         ossimNotify(ossimNotifyLevel_DEBUG)<<std::setprecision(8);
-         ossimNotify(ossimNotifyLevel_DEBUG)<<std::setiosflags(std::ios_base::scientific);
-
-      }
-
-      // Format: line,roll,pitch,heading,lon,lat,alt,scanAngle,reserved,frame,time
-
-      // Check the first line.  Some data has a phantom line, some starts with good data.
-      std::string line1;
-      std::getline( in, line1 );
-      ossim_uint32 fields = 0;
-      if ( line1.size() )
-      {
-         std::string s;
-         std::istringstream tmpStr( line1 );
-         while ( !tmpStr.eof() )
-         {
-            tmpStr >> s;
-            if ( s.size() )
-            {
-               ++fields;
-               s.clear();
-            }
-         }
-         if ( fields == 11 )
-         {
-            // First line is valid.
-            in.seekg( 0, std::ios_base::beg );
-         }
-      }
-
-      while( !in.eof() )
-      {
-         // To detect read error/missing value. Check eof was missing last line.
-         timeCode = BOGUS; 
-         
-         in >> inum >> roll >> pitch >> heading >> lon >> lat
-            >> alt >> scanAng >> res >> frm >> timeCode;
-
-         // if(!in.eof())
-         if ( timeCode != BOGUS )
-         {
-            lines.push_back(inum);
-            m_roll.push_back(roll);
-            m_pitch.push_back(pitch);
-            m_heading.push_back(heading);
-            m_lon.push_back(lon);
-            m_lat.push_back(lat);
-            m_alt.push_back(alt);
-            m_scanAng.push_back(scanAng);
-          }
-      }
-      
-      // Make sure we have a value per line
-      if( (lines.size() < m_imageSize.y) || (lines.size() < 10) )
-      {
-         return false;
-      }
-
-      // Load independent variable (line number, referenced to first line)
-      vector< ossimPolynom< ossim_float64 , 1 >::VAR_TUPLE >::iterator pit;
-      m_imgLine.resize(lines.size());
-      int j;
-      for (pit=m_imgLine.begin(), j=0; pit!=m_imgLine.end(); ++pit,++j)
-      {
-         pit->push_back(lines[j]-lines[0]);
-      }
-
-      // Dependent variable solutions follow...
-      double rms=0.0;
-
-      // Exponent sets
-      std::vector< ossimPolynom<ossim_float64,1>::EXPT_SET > expSet;
-      expSet.resize(MAX_TERMS);
-      ossimPolynom<ossim_float64,1>::EXP_TUPLE et(1);
-      for (int numExp=1; numExp<=MAX_TERMS; ++numExp)
-      {
-         for(int o=0; o<numExp ; ++o)
-         {
-            et[0]=o;
-            expSet[numExp-1].insert(et);
-         }
-      }
-
-      // Polynomial classes
-      //  scanAngle
-      ossimPolynom<ossim_float64,1> saPoly;
-      //  orientation angles (roll, pitch, heading)
-      ossimPolynom<ossim_float64,1> rPoly;
-      ossimPolynom<ossim_float64,1> pPoly;
-      ossimPolynom<ossim_float64,1> hPoly;
-      //  position (longitude, latitude, altitude)
-      ossimPolynom<ossim_float64,1> lonPoly;
-      ossimPolynom<ossim_float64,1> latPoly;
-      ossimPolynom<ossim_float64,1> altPoly;
-
-      // Solve for polynomial coefficients
-      if (m_isHSI)
-      {
-         result = saPoly.SLSfit(expSet[SCAN_ANGLE_DEG], m_imgLine, m_scanAng, &rms);
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "\n SA  poly deg, rms error = "
-               << SCAN_ANGLE_DEG << ", " << ossim::radiansToDegrees(rms) << " deg";
-         }
-      }
-      if (result)
-      {
-         result = rPoly.SLSfit(expSet[ROLL_DEG], m_imgLine, m_roll, &rms);
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "\n R   poly deg, rms error = "
-               << ROLL_DEG << ", " << ossim::radiansToDegrees(rms) << " deg";
-         }
-
-         if (result)
-         {
-            result = pPoly.SLSfit(expSet[PITCH_DEG], m_imgLine, m_pitch, &rms);
-            if (traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG)
-                  << "\n P   poly deg, rms error = "
-                  << PITCH_DEG << ", " << ossim::radiansToDegrees(rms) << " deg";
-            }
-
-            if (result)
-            {
-               result = hPoly.SLSfit(expSet[HEADING_DEG], m_imgLine, m_heading, &rms);
-               if (traceDebug())
-               {
-                  ossimNotify(ossimNotifyLevel_DEBUG)
-                     << "\n H   poly deg, rms error = "
-                     << HEADING_DEG << ", " << ossim::radiansToDegrees(rms) << " deg";
-               }
-
-               if (result)
-               {
-                  result = lonPoly.SLSfit(expSet[LON_DEG], m_imgLine, m_lon, &rms);
-                  if (traceDebug())
-                  {
-                     ossimNotify(ossimNotifyLevel_DEBUG)
-                        << "\n Lon poly deg, rms error = "
-                        << LON_DEG << ", " << ossim::radiansToDegrees(rms) << " deg";
-                  }
-
-                  if (result)
-                  {
-                     result = latPoly.SLSfit(expSet[LAT_DEG], m_imgLine, m_lat, &rms);
-                     if (traceDebug())
-                     {
-                        ossimNotify(ossimNotifyLevel_DEBUG)
-                           << "\n Lat poly deg, rms error = "
-                           << LAT_DEG << ", " << ossim::radiansToDegrees(rms) << " deg";
-                     }
-
-                     if (result)
-                     {
-                        result = altPoly.SLSfit(expSet[ALT_DEG], m_imgLine, m_alt, &rms);
-                        if (traceDebug())
-                        {
-                           ossimNotify(ossimNotifyLevel_DEBUG)
-                              << "\n Alt poly deg, rms error = "
-                              << ALT_DEG << ", " << rms << " mtr";
-                        }
-                     }
-                  }
-               }
-            }
-         }
-      }
-
-      if (result)
-      {
-         // Save coefficients
-         ossimPolynom<ossim_float64,1>::MONOM_MAP::const_iterator it;
-         for (it = rPoly.getMonoms().begin(); it != rPoly.getMonoms().end() ; ++it )
-         {
-            m_rollPolyCoef.push_back(it->second);
-         }
-         for (it = pPoly.getMonoms().begin(); it != pPoly.getMonoms().end() ; ++it )
-         {
-            m_pitchPolyCoef.push_back(it->second);
-         }
-         for (it = hPoly.getMonoms().begin(); it != hPoly.getMonoms().end() ; ++it )
-         {
-            m_headingPolyCoef.push_back(it->second);
-         }
-         for (it = lonPoly.getMonoms().begin(); it != lonPoly.getMonoms().end() ; ++it )
-         {
-            m_lonPolyCoef.push_back(it->second);
-         }
-         for (it = latPoly.getMonoms().begin(); it != latPoly.getMonoms().end() ; ++it )
-         {
-            m_latPolyCoef.push_back(it->second);
-         }
-         for (it = altPoly.getMonoms().begin(); it != altPoly.getMonoms().end() ; ++it )
-         {
-            m_altPolyCoef.push_back(it->second);
-         }
-         if (m_isHSI)
-         {
-            for (it = saPoly.getMonoms().begin(); it != saPoly.getMonoms().end() ; ++it )
-            {
-               m_scanAngPolyCoef.push_back(it->second);
-            }
-         }
-         else
-         {
-            m_scanAngPolyCoef.push_back(0.0);
-         }
-      }
-
-
-      if (traceDebug())
-      {
-         if (result)
-         {
-            vector<ossim_float64> inp(1);
-            inp[0] = 510.0;
-            ossimNotify(ossimNotifyLevel_DEBUG) << "\n Test eval line number = " << inp[0] << endl;
-            if (m_isHSI)
-            {
-               saPoly.print(ossimNotify(ossimNotifyLevel_DEBUG));
-               ossim_float64 sa = saPoly.eval(inp);
-               ossimNotify(ossimNotifyLevel_DEBUG)<<"\n sa="<<sa<<endl;
-            }
-            rPoly.print(ossimNotify(ossimNotifyLevel_DEBUG));
-            ossim_float64 rr = rPoly.eval(inp);
-            ossimNotify(ossimNotifyLevel_DEBUG)<<"\n r="<<rr<<endl;
-
-            pPoly.print(ossimNotify(ossimNotifyLevel_DEBUG));
-            ossim_float64 pp = pPoly.eval(inp);
-            ossimNotify(ossimNotifyLevel_DEBUG)<<"\n p="<<pp<<endl;
-
-            hPoly.print(ossimNotify(ossimNotifyLevel_DEBUG));
-            ossim_float64 hh = hPoly.eval(inp);
-            ossimNotify(ossimNotifyLevel_DEBUG)<<"\n h="<<hh<<endl;
-
-            lonPoly.print(ossimNotify(ossimNotifyLevel_DEBUG));
-            ossim_float64 lon = lonPoly.eval(inp);
-            ossimNotify(ossimNotifyLevel_DEBUG)<<"\n lon="<<lon<<endl;
-
-            latPoly.print(ossimNotify(ossimNotifyLevel_DEBUG));
-            ossim_float64 lat = latPoly.eval(inp);
-            ossimNotify(ossimNotifyLevel_DEBUG)<<"\n lat="<<lat<<endl;
-
-            altPoly.print(ossimNotify(ossimNotifyLevel_DEBUG));
-            ossim_float64 alt = altPoly.eval(inp);
-            ossimNotify(ossimNotifyLevel_DEBUG)<<"\n alt="<<alt<<endl;
-         }
-         else
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "  ...polynomial solution error for file: " << file << std::endl;
-         }
-      }
-   }
-   else
-   {
-      result = false;
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "Could not open: " << file << "\n";
-      }
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << M << " exit status = " << ( result ? "true" : "false" ) << "\n";
-   }
-   
-   return result;
-}
-
-const ossimDpt& ossimAlphaSensorSupportData::getImageSize()const
-{
-   return m_imageSize;
-}
-
-const ossim_float64& ossimAlphaSensorSupportData::getRollBias()const
-{
-   return m_rollBias;
-}
-
-const ossim_float64& ossimAlphaSensorSupportData::getPitchBias()const
-{
-   return m_pitchBias;
-}
-
-const ossim_float64& ossimAlphaSensorSupportData::getHeadingBias()const
-{
-   return m_headingBias;
-}
-
-const ossim_float64& ossimAlphaSensorSupportData::getFov()const
-{
-   return m_fov;
-}
-
-const ossim_float64& ossimAlphaSensorSupportData::getSlitRot()const
-{
-   return m_slitRot;
-}
-
-const std::vector< ossim_float64 >& ossimAlphaSensorSupportData::getRollPoly()const
-{
-   return m_rollPolyCoef;
-}
-
-const std::vector< ossim_float64 >& ossimAlphaSensorSupportData::getPitchPoly()const
-{
-   return m_pitchPolyCoef;
-}
-
-const std::vector< ossim_float64 >& ossimAlphaSensorSupportData::getHeadingPoly()const
-{
-   return m_headingPolyCoef;
-}
-
-const std::vector< ossim_float64 >& ossimAlphaSensorSupportData::getLonPoly()const
-{
-   return m_lonPolyCoef;
-}
-
-const std::vector< ossim_float64 >& ossimAlphaSensorSupportData::getLatPoly()const
-{
-   return m_latPolyCoef;
-}
-
-const std::vector< ossim_float64 >& ossimAlphaSensorSupportData::getAltPoly()const
-{
-   return m_altPolyCoef;
-}
-
-const std::vector< ossim_float64 >& ossimAlphaSensorSupportData::getScanPoly()const
-{
-   return m_scanAngPolyCoef;
-}
-
-
-// Hidden from use...
-ossimAlphaSensorSupportData::ossimAlphaSensorSupportData(const ossimAlphaSensorSupportData& /* src */)
-{
-}
-
-ossimAlphaSensorSupportData& ossimAlphaSensorSupportData::operator=(
-   const ossimAlphaSensorSupportData& /* src */)
-{
-   return *this;
-}
-
diff --git a/src/ossim/support_data/ossimApplanixEOFile.cpp b/src/ossim/support_data/ossimApplanixEOFile.cpp
deleted file mode 100644
index 478db2e..0000000
--- a/src/ossim/support_data/ossimApplanixEOFile.cpp
+++ /dev/null
@@ -1,691 +0,0 @@
-//*******************************************************************
-//
-// LGPL
-// 
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimApplanixEOFile.cpp 20483 2012-01-21 15:42:22Z dburken $
-
-#include <ossim/support_data/ossimApplanixEOFile.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimRegExp.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimCommon.h>
-#include <iterator>
-#include <fstream>
-#include <sstream>
-#include <iostream>
-#include <iomanip>
-
-static ossimTrace traceDebug("ossimApplanixEOFile:debug");
-
-static std::istream& applanix_skipws(std::istream& in)
-{
-   int c = in.peek();
-   while(((c == ' ') ||
-          (c == '\r') ||
-          (c == '\t') ||
-          (c == '\n'))&&
-         (in.good()))
-   {
-      in.ignore(1);
-      c = in.peek();
-   }
-   
-   return in;
-}
-
-std::ostream& operator <<(std::ostream& out, const ossimApplanixEORecord& src)
-{
-   if(src.theField.size())
-   {
-      std::copy(src.theField.begin(),
-                src.theField.end(),
-                std::ostream_iterator<ossimString>(out, " "));
-   }
-
-   return out;
-}
-
-std::ostream& operator <<(std::ostream& out, const ossimApplanixEOFile& src)
-{
-   ossim_uint32 idx = 0;
-   out << src.theHeader << std::endl << std::endl;
-
-   if(src.theRecordFormat.size())
-   {
-      std::copy(src.theRecordFormat.begin(),
-                src.theRecordFormat.end()-1,
-                std::ostream_iterator<ossimString>(out, ", "));
-      out << *(src.theRecordFormat.end()-1);
-      out << std::endl;
-   }
-
-   out << "Kappa Cardinal Rotation = " << src.theKappaCardinal << std::endl;
-   out << "Bore Sight tx = " << src.theBoreSightTx << std::endl
-       << "Bore Sight ty = " << src.theBoreSightTy << std::endl
-       << "Bore Sight tz = " << src.theBoreSightTz << std::endl;
-   
-   out << "Lever arm lx = " << src.theLeverArmLx << std::endl
-       << "Lever arm ly = " << src.theLeverArmLy << std::endl
-       << "Lever arm lz = " << src.theLeverArmLz << std::endl;
-   
-   out << "Shift Value X = " << src.theShiftValuesX << std::endl
-       << "Shift Value Y = " << src.theShiftValuesY << std::endl
-       << "Shift Value Z = " << src.theShiftValuesZ << std::endl;
-   
-   out << "Mapping Frame Datum      = " << src.theMappingFrameDatum      << std::endl
-       << "Mapping Frame Projection = " << src.theMappingFrameProjection << std::endl
-       << "Central Meridian         = " << src.theCentralMeridian << std::endl
-       << "Origin of Latitude       = " << src.theOriginLatitude  << std::endl
-       << "Grid Scale Factor        = " << src.theGridScaleFactor << std::endl
-       << "False easting            = " << src.theFalseEasting    << std::endl
-       << "False northing           = " << src.theFalseNorthing   << std::endl;
-
-   out << "theUtmZone               = " << src.theUtmZone << std::endl;
-   out << "theUtmHemisphere         = " << src.theUtmHemisphere << std::endl;
-   
-   if(src.theApplanixRecordList.size())
-   {
-      out << std::endl;
-      for(idx = 0; idx < src.theApplanixRecordList.size()-1; ++idx)
-      {
-         out << *(src.theApplanixRecordList[idx]) << std::endl;
-      }
-      out << *(src.theApplanixRecordList[idx]);
-      
-   }
-
-   return out;
-}
-
-ossimApplanixEOFile::ossimApplanixEOFile()
-{
-   theMinLat = ossim::nan();
-   theMinLon = ossim::nan();
-   theMaxLat = ossim::nan();
-   theMaxLon = ossim::nan();
-}
-
-bool ossimApplanixEOFile::parseFile(const ossimFilename& file)
-{
-   std::ifstream in(file.c_str());
-
-   return parseStream(in);
-}
-
-bool ossimApplanixEOFile::isEOFile(const ossimFilename& file)const
-{
-   std::ifstream in(file.c_str());
-
-   return isEOFile(in);
-}
-
-bool ossimApplanixEOFile::isEOFile(std::istream& in)const
-{
-   ossimString header;
-
-   return parseHeader(in, header);
-}
-
-bool ossimApplanixEOFile::parseStream(std::istream& in)
-{
-   theRecordIdMap.clear();
-   ossimString line;
-   int c = '\0';
-   if(!parseHeader(in, theHeader))
-   {
-      return false;
-   }
-
-   // now parse parameters
-   in>>applanix_skipws;
-   line = "";
-   while(in.good()&&
-         !line.contains("RECORD FORMAT"))
-   {
-      std::getline(in, line.string());
-      line = line.upcase();
-      line = line.substitute("\r","\n", true);
-      if(line.contains("KAPPA CARDINAL"))
-      {
-         theKappaCardinal = line;
-         theKappaCardinal = theKappaCardinal.substitute("KAPPA CARDINAL ROTATION","");
-         theKappaCardinal = theKappaCardinal.substitute(":","");
-         theKappaCardinal = theKappaCardinal.substitute("\n","");
-      }
-      else if(line.contains("LEVER ARM"))
-      {
-         ossimKeywordlist kwl('=');
-         line = line.substitute("LEVER ARM VALUES:",
-                                "");
-         line = line.substitute(",",
-                                "\n",
-                                true);
-         std::istringstream in(line);
-
-         kwl.parseStream(in);
-
-         theLeverArmLx = kwl.find("LX");
-         theLeverArmLy = kwl.find("LY");
-         theLeverArmLz = kwl.find("LZ");
-      }
-      else if(line.contains("BORESIGHT VALUES"))
-      {
-         ossimKeywordlist kwl('=');
-         line = line.substitute("BORESIGHT VALUES:",
-                                "");
-         line = line.substitute(",",
-                                "\n",
-                                true);
-
-         std::istringstream in(line);
-
-         kwl.parseStream(in);
-
-         
-         theBoreSightTx = kwl.find("TX");
-         theBoreSightTy = kwl.find("TY");
-         theBoreSightTz = kwl.find("TZ");
-      }
-      else if(line.contains("SHIFT VALUES:"))
-      {
-         ossimKeywordlist kwl('=');
-         line = line.substitute("SHIFT VALUES:","");
-         line = line.substitute(",",
-                                "\n",
-                                true);
-
-         std::istringstream in(line);
-         kwl.parseStream(in);
-
-         
-         theShiftValuesX = kwl.find("X");
-         theShiftValuesY = kwl.find("Y");
-         theShiftValuesZ = kwl.find("Z");
-         
-      }
-      else if(line.contains("GRID:"))
-      { 
-         ossimKeywordlist kwl(':');
-         line = line.substitute(";",
-                                "\n",
-                                true);
-         std::istringstream in(line);
-         kwl.parseStream(in);
-         theUtmZone = kwl.find("ZONE");
-
-         if(theUtmZone.contains("NORTH"))
-         {
-            theUtmHemisphere = "North";
-         }
-         else
-         {
-            theUtmHemisphere = "South";
-         }
-          theUtmZone = theUtmZone.replaceAllThatMatch("UTM|\\(.*\\)|NORTH|SOUTH","");
-          theUtmZone = theUtmZone.trim();
-      }
-      else if(line.contains("FRAME DATUM"))
-      {
-         ossimKeywordlist kwl(':');
-         line = line.substitute(";",
-                                "\n",
-                                true);
-         std::istringstream in(line);
-         kwl.parseStream(in);
-
-         theMappingFrameDatum = kwl.find("MAPPING FRAME DATUM");
-         theMappingFrameProjection = kwl.find("MAPPING FRAME PROJECTION");
-         theMappingFrameDatum = theMappingFrameDatum.trim();
-         theMappingFrameProjection = theMappingFrameProjection.trim();
-      }
-      else if(line.contains("POSPROC SBET"))
-      {
-         theSbetField = line.after(":");
-         theSbetField = theSbetField.trim();
-      }
-      else if(line.contains("CENTRAL MERIDIAN"))
-      {
-         theCentralMeridian = line;
-         theCentralMeridian = theCentralMeridian.substitute("CENTRAL MERIDIAN","");
-         theCentralMeridian = theCentralMeridian.substitute("=","");
-         theCentralMeridian = theCentralMeridian.substitute("DEG","");
-         theCentralMeridian = theCentralMeridian.substitute(";","");
-      }
-      else if(line.contains("LATITUDE OF THE GRID ORIGIN"))
-      {
-         ossimKeywordlist kwl('=');
-         line = line.substitute(";",
-                                "\n",
-                                true);
-         std::istringstream in(line);
-         kwl.parseStream(in);
-
-         theOriginLatitude  = kwl.find("LATITUDE OF THE GRID ORIGIN");
-         theGridScaleFactor = kwl.find("GRID SCALE FACTOR");
-      }
-      else if(line.contains("FALSE EASTING"))
-      {
-         ossimKeywordlist kwl('=');
-         line = line.substitute(";",
-                                "\n",
-                                true);
-         std::istringstream in(line);
-         kwl.parseStream(in);
-
-         theFalseEasting  = kwl.find("FALSE EASTING");
-         theFalseNorthing = kwl.find("FALSE NORTHING");
-      }
-   }
-
-   in>>applanix_skipws;
-
-   c = in.get();
-
-   std::vector<ossimString> fieldArray;
-   ossimString field;
-
-   while(in.good()&&
-         (c!='\n')&&
-         (c!='\r'))
-   {
-      field = "";
-      while((c != ',')&&
-            (c != '\n')&&
-            (c != '\r'))
-      {
-         field += (char)c;
-         c = in.get();
-      }
-      if((c!='\n')&&
-         (c!='\r'))
-      {
-         c = in.get();
-      }
-      field = field.trim();
-      if(field != "")
-      {
-         theRecordFormat.push_back(field);
-      }
-   }
-   in>>applanix_skipws;
-
-   if(in.peek() == '(')
-   {
-      std::getline(in, line.string());
-   }
-   in>>applanix_skipws;
-   ossimRefPtr<ossimApplanixEORecord> record = new ossimApplanixEORecord((ossim_uint32)theRecordFormat.size());
-   ossim_int32 latIdx = getFieldIdx("LAT");
-   ossim_int32 lonIdx = getFieldIdx("LONG");;
-   bool hasLatLon = (latIdx >=0)&&(lonIdx >= 0);
-
-   
-   if(hasLatLon)
-   {
-      theMinLat = 90.0;
-      theMaxLat = -90.0;
-      theMinLon = 180.0;
-      theMaxLon = -180.0;
-   }
-   else
-   {
-      theMinLat = ossim::nan();
-      theMaxLat = ossim::nan();
-      theMinLon = ossim::nan();
-      theMaxLon = ossim::nan();
-   }
-   
-   while(in.good()&&theRecordFormat.size())
-   {
-      std::getline(in, line.string());
-      line = line.trim();
-      if(line != "")
-      {
-         std::istringstream inStr(line);
-         ossim_uint32 idx;
-         ossimString value;
-
-         for(idx = 0; idx < theRecordFormat.size(); ++idx)
-         {
-            inStr >> (*record)[idx];
-         }
-         if(hasLatLon)
-         {
-            double lat = (*record)[latIdx].toDouble();
-            double lon = (*record)[lonIdx].toDouble();
-
-            if(lat<theMinLat) theMinLat = lat;
-            if(lat>theMaxLat) theMaxLat = lat;
-            if(lon<theMinLon) theMinLon = lon;
-            if(lon>theMaxLon) theMaxLon = lon;
-            
-         }
-         theApplanixRecordList.push_back(new ossimApplanixEORecord(*record));
-      }
-   }
-   indexRecordIds();
-
-   if(traceDebug())
-   {
-      if(hasLatLon)
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << "min lat: " << theMinLat << std::endl
-                                             << "min lon: " << theMinLon << std::endl
-                                             << "max lat: " << theMaxLat << std::endl
-                                             << "max lon: " << theMaxLon << std::endl;
-      }
-   }
-   return true;
-}
-
-bool ossimApplanixEOFile::parseHeader(const ossimFilename& file,
-                                      ossimString& header)const
-{
-   std::ifstream in(file.c_str());
-
-   return parseHeader(in, header);
-}
-
-bool ossimApplanixEOFile::parseHeader(std::istream& in,
-                                      ossimString& header)const
-{
-   header = "";
-   in >> applanix_skipws;
-
-   int c = in.peek();
-   
-   if((c!='*')||
-      (!in.good()))
-   {
-      return false;
-   }
-   ossimString line;
-
-   std::getline(in, line.string());
-   line = line .substitute("\r",
-                           "\n");
-   if(!line.contains("************"))
-   {
-      return false;
-   }
-
-   header = line;
-   header += "\n";
-
-   in>>applanix_skipws;
-   std::getline(in, line.string());
-   line = line .substitute("\r",
-                           "\n");
-   
-   while((in.good())&&
-         (!line.contains("***********")))
-   {
-      header += line;
-      header += "\n";
-      std::getline(in, line.string());
-      line = line .substitute("\r",
-                              "\n");
-   }
-   header += line;
-   header += "\n";
-
-   if(!header.contains("Applanix"))
-   {
-      return false;
-   }
-   
-   return true;
-}
-
-void ossimApplanixEOFile::indexRecordIds()
-{
-   ossimString id;
-   ossim_uint32 idx;
-   ossim_int32 idIdx = getFieldIdxLike("ID");
-   ossim_uint32 size = (ossim_uint32)theApplanixRecordList.size();
-   theRecordIdMap.clear();
-
-   if(idIdx < 0) return;
-
-   for(idx = 0; idx < size; ++idx)
-   {
-      id = (*theApplanixRecordList[idx])[idIdx];
-      theRecordIdMap.insert(std::make_pair(id, theApplanixRecordList[idx]));
-   }
-}
-
-ossim_int32 ossimApplanixEOFile::getFieldIdxLike(const ossimString& searchKey)const
-{
-   ossimString key = searchKey;
-   ossim_uint32 idx = 0;
-   key = key.upcase();
-
-   for(idx = 0; idx < theRecordFormat.size(); ++idx)
-   {
-      if(ossimString::upcase(theRecordFormat[idx]).contains(key))
-      {
-         return (int)idx;
-      }
-   }
-
-   return -1;
-}
-
-ossim_int32 ossimApplanixEOFile::getFieldIdx(const ossimString& searchKey)const
-{
-   ossimString key = searchKey;
-   ossim_uint32 idx = 0;
-   
-   key = key.upcase();
-
-   for(idx = 0; idx < theRecordFormat.size(); ++idx)
-   {
-      if(ossimString::upcase(theRecordFormat[idx]) == key)
-      {
-         return (int)idx;
-      }
-   }
-   
-   return -1;
-}
-
-
-const ossimRefPtr<ossimApplanixEORecord> ossimApplanixEOFile::getRecordGivenId(const ossimString& id)const
-{
-
-   if(theRecordIdMap.size())
-   {
-      std::map<ossimString, ossimRefPtr<ossimApplanixEORecord>,
-         ossimStringLtstr >::const_iterator iter = theRecordIdMap.find(id);
-      
-      if(iter!=theRecordIdMap.end())
-      {
-         return iter->second;
-      }
-   }
-   else
-   {
-      ossim_uint32 idx;
-      ossim_int32 idxId = getFieldIdx("ID");
-      
-      if(idxId >= 0)
-      {
-         for(idx = 0; idx < theApplanixRecordList.size(); ++idx)
-         {
-            if((*theApplanixRecordList[idx])[idxId] == id)
-            {
-               return theApplanixRecordList[idx];
-            }
-         }
-      }
-   }
-   
-   return 0;
-}
-
-ossim_uint32 ossimApplanixEOFile::getNumberOfRecords()const
-{
-   return (ossim_uint32)theApplanixRecordList.size();
-}
-
-const ossimRefPtr<ossimApplanixEORecord> ossimApplanixEOFile::getRecord(ossim_uint32 idx)const
-{
-   if(idx < theApplanixRecordList.size())
-   {
-      return theApplanixRecordList[idx];
-   }
-   
-   return 0;
-}
-
-bool ossimApplanixEOFile::isHeightAboveMSL()const
-{
-   return (getFieldIdx("ORTHOMETRIC HEIGHT") >= 0);
-}
-
-bool ossimApplanixEOFile::isEcefModel()const
-{
-   ossim_int32 xIdx = getFieldIdx("X");
-   ossim_int32 yIdx = getFieldIdx("Y");
-   ossim_int32 zIdx = getFieldIdx("Z");
-   ossim_int32 rollIdx = getFieldIdx("ROLL");
-   ossim_int32 pitchIdx = getFieldIdx("PITCH");
-   ossim_int32 headingIdx = getFieldIdx("HEADING");
-
-   return ((xIdx >=0)&&
-           (yIdx >=0)&&
-           (zIdx >=0)&&
-           (rollIdx>=0)&&
-           (pitchIdx>=0)&&
-           (headingIdx>=0));
-}
-
-
-bool ossimApplanixEOFile::isUtmFrame()const
-{
-   return ((getFieldIdxLike("EASTING")>=0)&&
-            (getFieldIdxLike("NORTHING") >=0)&&
-            (getFieldIdxLike("HEIGHT") >= 0)&&
-            (getFieldIdxLike("OMEGA") >=0)&&
-            (getFieldIdxLike("PHI") >=0)&&
-            (getFieldIdxLike("KAPPA") >=0));
-            
-   return (getUtmZone() >= 0.0);
-}
-
-ossim_int32 ossimApplanixEOFile::getUtmZone()const
-{
-   return theUtmZone.toInt32();
-}
-
-ossimString ossimApplanixEOFile::getUtmHemisphere()const
-{
-   return theUtmHemisphere;
-}
-
-ossimString ossimApplanixEOFile::getSbetField()const
-{
-   return theSbetField;
-}
-
-double ossimApplanixEOFile::getBoreSightTx()const
-{
-   return theBoreSightTx.toDouble();
-}
-
-double ossimApplanixEOFile::getBoreSightTy()const
-{
-   return theBoreSightTy.toDouble();
-}
-
-double ossimApplanixEOFile::getBoreSightTz()const
-{
-   return theBoreSightTz.toDouble();
-}
-
-double ossimApplanixEOFile::getLeverArmLx()const
-{
-   return theLeverArmLx.toDouble();
-}
-
-double ossimApplanixEOFile::getLeverArmLy()const
-{
-   return theLeverArmLy.toDouble();
-}
-
-double ossimApplanixEOFile::getLeverArmLz()const
-{
-   return theLeverArmLz.toDouble();
-}
-
-double ossimApplanixEOFile::getKardinalKappa()const
-{
-   return theKappaCardinal.toDouble();
-}
-
-double ossimApplanixEOFile::getShiftValuesX()const
-{
-   return theShiftValuesX.toDouble();
-}
-
-double ossimApplanixEOFile::getShiftValuesY()const
-{
-   return theShiftValuesY.toDouble();
-}
-
-double ossimApplanixEOFile::getShiftValuesZ()const
-{
-   return theShiftValuesZ.toDouble();
-}
-
-ossimString ossimApplanixEOFile::getMappingFrameDatum()const
-{
-   return theMappingFrameDatum;
-}
-
-ossimString ossimApplanixEOFile::getMappingFrameProjection()const
-{
-   return theMappingFrameProjection;
-}
-
-double ossimApplanixEOFile::getMappingFrameCentralMeridian()const
-{
-   return theCentralMeridian.toDouble();
-}
-
-double ossimApplanixEOFile::getMappingFrameOriginLatitude()const
-{
-   return theOriginLatitude.toDouble();
-}
-
-double ossimApplanixEOFile::getMappingFrameGridScaleFactor()const
-{
-   return theGridScaleFactor.toDouble();
-}
-
-double ossimApplanixEOFile::getMappingFrameFalseEasting()const
-{
-   return theFalseEasting.toDouble();
-}
-
-double ossimApplanixEOFile::getMappingFrameFalseNorthing()const
-{
-   return theFalseNorthing.toDouble();
-}
-
-ossimString ossimApplanixEOFile::convertToOssimDatumCode(const ossimString& datum)const
-{
-   ossimString result = "WGE";
-   ossimString temp = datum;
-   temp = temp.upcase();
-
-   if(temp == "NAD83")
-   {
-      result = "NAR-C";
-   }
-
-   return result;
-}
diff --git a/src/ossim/support_data/ossimAuxFileHandler.cpp b/src/ossim/support_data/ossimAuxFileHandler.cpp
deleted file mode 100644
index 236f304..0000000
--- a/src/ossim/support_data/ossimAuxFileHandler.cpp
+++ /dev/null
@@ -1,1138 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: SPADAC Inc
-//         Adaptd from the GDAL package hfadataset.cpp
-// Description: This class provides some simple utilities for aux file.
-//
-//********************************************************************
-// $Id: ossimAuxFileHandler.cpp 2644 2011-05-26 15:20:11Z oscar.kramer $
-
-#include <cstdio>
-#include <cstdlib>
-#include <iostream>
-
-#include <ossim/support_data/ossimAuxFileHandler.h>
-
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimKeywordlist.h>
-using namespace std;
-
-void ossimAuxStandardFile( int nBytes, void * pData )
-
-{
-  int		i;
-  char	*entryData = (char *) pData;
-
-  for( i = nBytes/2-1; i >= 0; i-- )
-  {
-    ossim_uint8	byTemp;
-
-    byTemp = entryData[i];
-    entryData[i] = entryData[nBytes-i-1];
-    entryData[nBytes-i-1] = byTemp;
-  }
-}
-
-int ossimAuxGetDataTypeBits( int nDataType )
-
-{
-  switch( nDataType )
-  {
-  case EPT_u1:
-    return 1;
-
-  case EPT_u2:
-    return 2;
-
-  case EPT_u4:
-    return 4;
-
-  case EPT_u8:
-  case EPT_s8:
-    return 8;
-
-  case EPT_u16:
-  case EPT_s16:
-    return 16;
-
-  case EPT_u32:
-  case EPT_s32:
-  case EPT_f32:
-    return 32;
-
-  case EPT_f64:
-  case EPT_c64:
-    return 64;
-
-  case EPT_c128:
-    return 128;
-  }
-
-  return 0;
-}
-
-static char * ossimAuxGetDictionary(ossimAuxInfo* hHFA)
-
-{
-  int		nDictMax = 100;
-  char	*pszDictionary = (char *)malloc(nDictMax);
-  int		nDictSize = 0;
-
-  fseek(hHFA->fp, hHFA->nDictionaryPos, SEEK_SET );
-
-  while( true )
-  {
-    if( nDictSize >= nDictMax-1 )
-    {
-      nDictMax = nDictSize * 2 + 100;
-      pszDictionary = (char *) realloc(pszDictionary, nDictMax );
-    }
-
-    if( fread( pszDictionary + nDictSize, 1, 1, hHFA->fp ) < 1
-      || pszDictionary[nDictSize] == '\0'
-      || (nDictSize > 2 && pszDictionary[nDictSize-2] == ','
-      && pszDictionary[nDictSize-1] == '.') )
-      break;
-
-    nDictSize++;
-  }
-
-  pszDictionary[nDictSize] = '\0';
-
-  return( pszDictionary );
-}
-
-ossimAuxFileHandler::ossimAuxFileHandler()
-{
-  m_auxInfo = NULL;
-}
-
-ossimAuxFileHandler::~ossimAuxFileHandler()
-{
-  if (m_auxInfo != NULL)
-  {
-    delete m_auxInfo;
-    m_auxInfo = 0;
-  }
-}
-
-bool ossimAuxFileHandler::isAuxFile(const ossimFilename& file)
-{
-  bool result = false;
-
-  if ( file.exists() )
-  { 
-    ossimString ext = file.ext();
-    ext.downcase();
-    if (ext == "aux")
-    {
-      result = true;
-    }
-    else
-    {
-      result = false;
-    } 
-  } 
-
-  return result;
-}
-
-bool ossimAuxFileHandler::open(const ossimFilename& file)
-{
-  FILE	*fp = fopen(file.c_str(), "r");
-  char	header[16];
-  ossim_uint32	nHeaderPos;
-
-  if( fp == NULL )
-  {
-    return false;
-  }
-
-  fread( header, 16, 1, fp);
-  
-  char* tmpHeader = const_cast<char*>(header);
-  if(!strcmp(tmpHeader,"EHFA_HEADER_TAG") == 0)
-  {
-    return false;
-  }
-
-  //Create the ossimAuxInfo                                          
-  m_auxInfo = new ossimAuxInfo();
-  m_auxInfo->fp = fp;
- 
-  //Where is the header?						
-  fread( &nHeaderPos, sizeof(ossim_int32), 1, fp );
-
-  fseek( fp, nHeaderPos, SEEK_SET );
-
-  fread( &(m_auxInfo->nVersion), sizeof(ossim_int32), 1, fp );
- 
-  fread( header, 4, 1, fp ); /* skip freeList */
-
-  fread( &(m_auxInfo->nRootPos), sizeof(ossim_int32), 1, fp );
- 
-  fread( &(m_auxInfo->nEntryHeaderLength), sizeof(ossim_int16), 1, fp );
-  fread( &(m_auxInfo->nDictionaryPos), sizeof(ossim_int32), 1, fp );
-  
-  fseek( fp, 0, SEEK_END );
-  m_auxInfo->nEndOfFile = (ossim_int32) ftell(fp);
-
-  m_auxInfo->m_Root = new ossimAuxEntry( m_auxInfo, m_auxInfo->nRootPos, NULL, NULL );
-
-  m_auxInfo->dictionaryData = ossimAuxGetDictionary(m_auxInfo);
-  m_auxInfo->m_Dictionary = new ossimAuxDictionary( m_auxInfo->dictionaryData );
-
-  ossimAuxEntry	*node = m_auxInfo->m_Root->getChild();
-  while( node != NULL )
-  {
-    std::string typeStr = node->getType();
-    size_t typeLen = typeStr.length();
-    std::string str = "Eimg_Layer";
-    size_t strLen = str.length();
-    if( typeLen == strLen)
-    {
-      ossimAuxEntry* projEntry = node->getNamedChild("Map_Info");
-      if( projEntry == NULL )
-      {
-         ossimAuxEntry* childEntry;
-         for( childEntry = node->getChild(); childEntry != NULL && projEntry == NULL; childEntry = childEntry->getNext() )
-         {
-            if (ossimString(childEntry->getType()) == "Eprj_MapInfo")
-               projEntry = childEntry;
-         }
-      }
-
-      const char* proj = NULL;
-      const char* units = NULL;
-      if (projEntry)
-      {
-        proj = projEntry->getStringField("proName");
-        units = projEntry->getStringField("units");
-      }
-      
-      if (proj != NULL)
-      {
-        m_projName = ossimString(proj);
-      }
-      if (units != NULL)
-      {
-         m_unitsType = ossimString(proj);
-      }
-
-      ossimAuxEntry* datumEntry = node->getNamedChild( "Projection.Datum" );
-      const char* datumStr = NULL;
-      if (datumEntry)
-      {
-        datumStr = datumEntry->getStringField("datumname");
-      }
-      if (datumStr != NULL)
-      {
-        m_datumName = ossimString(datumStr);;
-      }
-      break;
-    }
-    node = node->getNext();
-  }
-
-  fclose(fp);
-  return true;
-}
-
-/************************************************************************/
-/*                              ossimAuxInfo()                              */
-/************************************************************************/
-ossimAuxInfo::ossimAuxInfo()
-{
-  fp = NULL;
-  m_Root = NULL;
-  m_Dictionary = NULL;
-  dictionaryData = NULL;
-}
-
-ossimAuxInfo::~ossimAuxInfo()
-{
-  if (m_Root != NULL)
-  {
-    delete m_Root;
-    m_Root = 0;
-  }
-
-  if (m_Dictionary != NULL)
-  {
-    delete m_Dictionary;
-    m_Dictionary = 0;
-  }
-
-  if (dictionaryData != NULL)
-  {
-    delete[] dictionaryData;
-    dictionaryData = 0;
-  }
-}
-
-/************************************************************************/
-/*                              ossimAuxEntry()                              */
-/************************************************************************/
-
-ossimAuxEntry::ossimAuxEntry(ossimAuxInfo * auxInfoIn, ossim_uint32 nPos,
-                   ossimAuxEntry * parentIn, ossimAuxEntry * prevIn)
-
-{
-  m_auxInfo = auxInfoIn;
-
-  nFilePos = nPos;
-  
-  m_Parent = parentIn;
-  m_Prev = prevIn;
-
-  m_Next = NULL;
-  m_Child = NULL;
-  entryData = NULL;
-
-  nDataPos = nDataSize = 0;
-  nNextPos = nChildPos = 0;
-
-  entryNodeName[0] = entryType[0] = '\0';
-
-  ossim_int32	anEntryNums[6];
- 
-  if( fseek( m_auxInfo->fp, nFilePos, SEEK_SET ) == -1
-    || fread( anEntryNums, sizeof(ossim_uint32), 6, m_auxInfo->fp ) < 1 )
-  {
-    return;
-  }
-
-  nNextPos = anEntryNums[0];
-  nChildPos = anEntryNums[3];
-  nDataPos = anEntryNums[4];
-  nDataSize = anEntryNums[5];
-
-  if( fread( entryNodeName, 1, 64, m_auxInfo->fp ) < 1
-    || fread( entryType, 1, 32, m_auxInfo->fp ) < 1 )
-  {
-    return;
-  }
-}
-ossimAuxEntry::~ossimAuxEntry()
-{
-  if( entryData != NULL )
-  {
-    delete entryData;
-    entryData = 0;
-  }
-
-  if( m_Next != NULL )
-  {
-    delete m_Next;
-    m_Next = 0;
-  }
-
-  if( m_Child != NULL )
-  {
-    delete m_Child;
-    m_Child = 0;
-  }
-}
-
-void ossimAuxEntry::setName( const char *nodeName )
-{
-  memset( entryNodeName, 0, 64 );
-  strncpy( entryNodeName, nodeName, 64 );
-}
-
-ossimAuxEntry *ossimAuxEntry::getChild()
-{
-  if( m_Child == NULL && nChildPos != 0 )
-  {
-    m_Child = new ossimAuxEntry( m_auxInfo, nChildPos, this, NULL );
-  }
-
-  return( m_Child );
-}
-
-ossimAuxEntry* ossimAuxEntry::getNext()
-{
-  if( m_Next == NULL && nNextPos != 0 )
-  {
-    // Check if we have a loop on the next node in this sibling chain.
-    ossimAuxEntry *past;
-
-    for( past = this; 
-      past != NULL && past->nFilePos != nNextPos; 
-      past = past->m_Prev ) {}
-
-    if( past != NULL )
-    {
-      nNextPos = 0;
-      return NULL;
-    }
-
-    m_Next = new ossimAuxEntry(m_auxInfo, nNextPos, m_Parent, this );
-  }
-
-  return( m_Next );
-}
-
-void ossimAuxEntry::loadData()
-{
-  if( entryData != NULL || nDataSize == 0 )
-  {
-    return;
-  }
-
-  entryData = (char*) malloc(nDataSize);
-  if (entryData == NULL)
-  {
-    return;
-  }
-
-  if(fseek(m_auxInfo->fp, nDataPos, SEEK_SET ) < 0 )
-  {
-    return;
-  }
-
-  if( fread( entryData, 1, nDataSize, m_auxInfo->fp ) < 1 )
-  {
-    return;
-  }
-
-  m_Type = m_auxInfo->m_Dictionary->findType( entryType );
-  if(m_Type == NULL)
-  {
-    return;
-  }
-}
-
-ossimAuxEntry* ossimAuxEntry::getNamedChild( const char* name )
-{
-  int		nNameLen;
-  ossimAuxEntry	*entry;
-
-  for( nNameLen = 0;
-    name[nNameLen] != '.'
-    && name[nNameLen] != '\0'
-    && name[nNameLen] != ':';
-  nNameLen++ ) {}
-
-  
-  for( entry = getChild(); entry != NULL; entry = entry->getNext() )
-  {
-    std::string tmpEntryName = const_cast<char*>(entry->getName());
-    tmpEntryName = tmpEntryName.substr(0, nNameLen);
-    std::string tmpName = const_cast<char*>(name);
-    tmpName = tmpName.substr(0, nNameLen);
-    if( strcmp(tmpEntryName.c_str(),tmpName.c_str()) == 0
-      && (int) strlen(entry->getName()) == nNameLen )
-    {
-      if( name[nNameLen] == '.' )
-      {
-        ossimAuxEntry *result;
-
-        result = entry->getNamedChild( name+nNameLen+1 );
-        if( result != NULL )
-          return result;
-      }
-      else
-        return entry;
-    }
-  }
-
-  return NULL;
-}
-
-int ossimAuxEntry::getFieldValue( const char * auxFieldPath,
-                            char chReqType, void *reqReturn )
-{
-  ossimAuxEntry	*entry = this;
-
-  if( strchr(auxFieldPath,':') != NULL )
-  {
-    entry = getNamedChild( auxFieldPath );
-    if( entry == NULL )
-      return false;
-
-    auxFieldPath = strchr(auxFieldPath,':') + 1;
-  }
-
-  loadData();
-
-  if( entryData == NULL )
-  {
-    return false;
-  }
-
-  if( m_Type == NULL )
-  {
-    return false;
-  }
-
-  return (m_Type->extractInstValue( auxFieldPath,
-    entryData, nDataPos, nDataSize,
-    chReqType, reqReturn ));
-}
-
-ossim_int16 ossimAuxEntry::getIntField(const char* auxFieldPath)
-{
-  ossim_int16	nIntValue;
-
-  if( !getFieldValue( auxFieldPath, 'i', &nIntValue ) )
-  {
-    return 0;
-  }
-  else
-  {
-    return nIntValue;
-  }
-}
-
-const char* ossimAuxEntry::getStringField( const char* auxFieldPath)
-{
-  char *result = NULL;
-
-  if( !getFieldValue( auxFieldPath, 's', &result ) )
-  {
-    return NULL;
-  }
-  else
-  {
-    return result;
-  }
-}
-
-/************************************************************************/
-/*                              ossimAuxField()                              */
-/************************************************************************/
-
-ossimAuxField::ossimAuxField()
-{
-  nBytes = 0;
-
-  nItemCount = 0;
-  chPointer = '\0';
-  chItemType = '\0';
-
-  itemObjectType = NULL;
-  m_auxItemObjectType = NULL;
-
-  enumNames = NULL;
-  fieldName = NULL;
-}
-
-ossimAuxField::~ossimAuxField()
-{
-  if (itemObjectType != NULL)
-  {
-    delete[] itemObjectType;
-    itemObjectType = 0;
-  }
-
-  if (enumNames != NULL)
-  {
-    delete[] enumNames;
-    enumNames = 0;
-  }
-
-  if (fieldName != NULL)
-  {
-    delete[] fieldName;
-    fieldName = 0;
-  }
-}
-
-int ossimAuxField::extractInstValue( const char* /* auxField */, int nIndexValue,
-                           char* entryData, ossim_uint32 nDataOffset, int nDataSize,
-                           char chReqType, void *reqReturn )
-
-{
-  int			nInstItemCount = getInstCount( entryData, nDataSize );
-  
-  if( nIndexValue < 0 || nIndexValue >= nInstItemCount )
-  {
-    if( chItemType == 'b' && nIndexValue >= -3 && nIndexValue < 0 )
-      /* ok - special index values */;
-    else
-      return false;
-  }
-
-  if( chPointer != '\0' )
-  {
-    ossim_uint32	nOffset;
-
-    memcpy( &nOffset, entryData+4, 4 );
-  
-    entryData += 8;
-
-    nDataOffset += 8;
-    nDataSize -= 8;
-  }
-
-  if( (chItemType == 'c' || chItemType == 'C') && chReqType == 's' )
-  {
-    *((char **)reqReturn) = entryData;
-    return( entryData != NULL );
-  }
-
-  return false;
-}
-
-int ossimAuxField::getInstCount( char * entryData, int nDataSize )
-{
-  if( chPointer == '\0' )
-    return nItemCount;
-  else if( chItemType == 'b' )
-  {
-    ossim_int32 nRows, nColumns;
-
-    if( nDataSize < 20 )
-      return 0;
-
-    memcpy( &nRows, entryData+8, 4 );
-    ossimAuxStandardFile( 4, &nRows );
-    memcpy( &nColumns, entryData+12, 4 );
-    ossimAuxStandardFile( 4, &nColumns );
-
-    return nRows * nColumns;
-  }
-  else
-  {
-    ossim_int32 nCount;
-
-    if( nDataSize < 4 )
-      return 0;
-
-    memcpy( &nCount, entryData, 4 );
-    ossimAuxStandardFile( 4, &nCount );
-    return nCount;
-  }
-}
-
-void ossimAuxField::completeDefn( ossimAuxDictionary * auxDict )
-
-{
-  if( itemObjectType != NULL )
-  {
-    m_auxItemObjectType = auxDict->findType( itemObjectType );
-  }
-
-  if( chPointer == 'p' )
-  {
-    nBytes = -1; /* we can't know the instance size */
-  }
-  else if( m_auxItemObjectType != NULL )
-  {
-    m_auxItemObjectType->completeDefn( auxDict );
-    if( m_auxItemObjectType->nBytes == -1 )
-    {
-      nBytes = -1;
-    }
-    else
-    {
-      nBytes = m_auxItemObjectType->nBytes * nItemCount;
-    }
-
-    if( chPointer == '*' && nBytes != -1 )
-    {
-      nBytes += 8; /* count, and offset */
-    }
-  }
-  else
-  {
-    nBytes = auxDict->getItemSize( chItemType ) * nItemCount;
-  }
-}
-
-const char *ossimAuxField::initialize( const char * fieldInput )
-{
-  int		i;
-  nItemCount = atoi(fieldInput);
-
-  while( *fieldInput != '\0' && *fieldInput != ':' )
-  {
-    fieldInput++;
-  }
-
-  if( *fieldInput == '\0' )
-  {
-    return NULL;
-  }
-
-  fieldInput++;
-
-  if( *fieldInput == 'p' || *fieldInput == '*' )
-    chPointer = *(fieldInput++);
-
-  if( *fieldInput == '\0' )
-    return NULL;
-
-  chItemType = *(fieldInput++);
-
-  if( chItemType == 'o' )
-  {
-    for( i = 0; fieldInput[i] != '\0' && fieldInput[i] != ','; i++ ) {}
-
-    itemObjectType = (char *) malloc(i+1);
-    strncpy( itemObjectType, fieldInput, i );
-    itemObjectType[i] = '\0';
-
-    fieldInput += i+1;
-  }
-
-  if( chItemType == 'x' && *fieldInput == '{' )
-  {
-    int nBraceDepth = 1;
-    fieldInput++;
-
-    // Skip past the definition.
-    while( nBraceDepth > 0 && *fieldInput != '\0' )
-    {
-      if( *fieldInput == '{' )
-        nBraceDepth++;
-      else if( *fieldInput == '}' )
-        nBraceDepth--;
-
-      fieldInput++;
-    }
-
-    chItemType = 'o';
-
-    // find the comma terminating the type name.
-    for( i = 0; fieldInput[i] != '\0' && fieldInput[i] != ','; i++ ) {}
-
-    itemObjectType = (char *) malloc(i+1);
-    strncpy( itemObjectType, fieldInput, i );
-    itemObjectType[i] = '\0';
-
-    fieldInput += i+1;
-  }
-
-  if( chItemType == 'e' )
-  {
-    int	nEnumCount = atoi(fieldInput);
-    int	iEnum;
-
-    fieldInput = strchr(fieldInput,':');
-    if( fieldInput == NULL )
-      return NULL;
-
-    fieldInput++;
-
-    enumNames = (char **) calloc(sizeof(char *), nEnumCount+1);
-
-    for( iEnum = 0; iEnum < nEnumCount; iEnum++ )
-    {
-      char	*pszToken;
-
-      for( i = 0; fieldInput[i] != '\0' && fieldInput[i] != ','; i++ ) {}
-
-      if( fieldInput[i] != ',' )
-        return NULL;
-
-      pszToken = (char *) malloc(i+1);
-      strncpy( pszToken, fieldInput, i );
-      pszToken[i] = '\0';
-
-      enumNames[iEnum] = pszToken;
-
-      fieldInput += i+1;
-    }
-  }
-
-  for( i = 0; fieldInput[i] != '\0' && fieldInput[i] != ','; i++ ) {}
-
-  fieldName = (char *) malloc(i+1);
-  strncpy( fieldName, fieldInput, i );
-  fieldName[i] = '\0';
-
-  fieldInput += i+1;
-
-  return( fieldInput );
-}
-
-int ossimAuxField::getInstBytes( char *entryData, int nDataSize )
-
-{
-  int		nCount;
-  int		nInstBytes = 0;
-
-  if( nBytes > -1 )
-    return nBytes;
-
-  if( chPointer != '\0' )
-  {
-    memcpy( &nCount, entryData, 4 );
-    ossimAuxStandardFile( 4, &nCount );
-
-    entryData += 8;
-    nInstBytes += 8;
-  }
-  else
-    nCount = 1;
-
-  if( chItemType == 'b' && nCount != 0 ) // BASEDATA
-  {
-    ossim_int32 nRows, nColumns;
-    ossim_int16 nBaseItemType;
-
-    memcpy( &nRows, entryData, 4 );
-    ossimAuxStandardFile( 4, &nRows );
-    memcpy( &nColumns, entryData+4, 4 );
-    ossimAuxStandardFile( 4, &nColumns );
-    memcpy( &nBaseItemType, entryData+8, 2 );
-    ossimAuxStandardFile( 2, &nBaseItemType );
-
-    nInstBytes += 12;
-
-    nInstBytes += 
-      ((ossimAuxGetDataTypeBits(nBaseItemType) + 7) / 8) * nRows * nColumns;
-  }
-  else if( m_auxItemObjectType == NULL )
-  {
-    nInstBytes += nCount * ossimAuxDictionary::getItemSize(chItemType);
-  }
-  else
-  {
-    int		i;
-
-    for( i = 0; i < nCount; i++ )
-    {
-      int	nThisBytes;
-
-      nThisBytes =
-        m_auxItemObjectType->getInstBytes( entryData,
-        nDataSize - nInstBytes );
-      nInstBytes += nThisBytes;
-      entryData += nThisBytes;
-    }
-  }
-
-  return( nInstBytes );
-}
-
-
-/************************************************************************/
-/*                              ossimAuxType()                              */
-/************************************************************************/
-ossimAuxType::ossimAuxType()
-{
-  nBytes = 0;
-  nFields = 0;
-  m_auxFields = NULL;
-  auxTypeName = NULL;
-}
-
-ossimAuxType::~ossimAuxType()
-{
-  for(int i = 0; i < nFields; i++ )
-  {
-    delete m_auxFields[i];
-    m_auxFields[i] = 0;
-  }
-
-  if (auxTypeName != NULL)
-  {
-    delete[] auxTypeName;
-    auxTypeName = 0;
-  }
-}
-
-const char* ossimAuxType::initialize( const char * typeInput )
-{
-  int		i;
-  if( *typeInput != '{' )
-  {
-    while( *typeInput != '{' && *typeInput != '\0' )
-      typeInput++;
-
-    if( *typeInput == '\0' )
-      return NULL;
-  }
-
-  typeInput++;
-
-  while( typeInput != NULL && *typeInput != '}' )
-  {
-    ossimAuxField	*newField = new ossimAuxField();
-
-    typeInput = newField->initialize( typeInput );
-    if( typeInput != NULL )
-    {
-      m_auxFields = (ossimAuxField **)realloc(m_auxFields, sizeof(void*) * (nFields+1) );
-      m_auxFields[nFields++] = newField;
-    }
-    else
-    {
-      delete newField;
-    }
-  }
-
-  if( typeInput == NULL )
-  {
-    return NULL;
-  }
-
-  typeInput++; /* skip `}' */
-
-  for( i = 0; typeInput[i] != '\0' && typeInput[i] != ','; i++ ) {}
-
-  auxTypeName = (char *) malloc(i+1);
-  strncpy( auxTypeName, typeInput, i );
-  auxTypeName[i] = '\0';
-
-  typeInput += i+1;
-
-  return( typeInput );
-}
-
-void ossimAuxType::completeDefn( ossimAuxDictionary* auxDict )
-{
-  int		i;
-
-  if( nBytes != 0 )
-    return;
-
-  for( i = 0; i < nFields; i++ )
-  {
-    m_auxFields[i]->completeDefn( auxDict );
-    if( m_auxFields[i]->nBytes < 0 || nBytes == -1 )
-    {
-      nBytes = -1;
-    }
-    else
-    {
-      nBytes += m_auxFields[i]->nBytes;
-    }
-  }
-}
-
-int ossimAuxType::extractInstValue( const char * auxFieldPath,
-                          char *entryData, ossim_uint32 nDataOffset, int nDataSize,
-                          char chReqType, void *reqReturn )
-
-{
-  int		nArrayIndex = 0, nNameLen, iField, nByteOffset;
-  const char	*remainder;
-
-  const char *firstArray = strchr(auxFieldPath,'[');
-  const char *firstDot = strchr(auxFieldPath,'.');
-
-  if( firstArray != NULL
-    && (firstDot == NULL
-    || firstDot > firstArray) )
-  {
-    const char	*theEnd = firstArray;
-
-    nArrayIndex = atoi(theEnd+1);
-    nNameLen = theEnd - auxFieldPath;
-
-    remainder = strchr(auxFieldPath,'.');
-    if( remainder != NULL )
-    {
-      remainder++;
-    }
-  }
-  else if( firstDot != NULL )
-  {
-    const char	*theEnd = firstDot;
-
-    nNameLen = theEnd - auxFieldPath;
-
-    remainder = theEnd + 1;
-  }
-  else
-  {
-    nNameLen = (int)strlen(auxFieldPath);
-    remainder = NULL;
-  }
-
-  //Find this field within this type, if possible.                 
-  nByteOffset = 0;
-  for( iField = 0; iField < nFields && nByteOffset < nDataSize; iField++ )
-  {
-    std::string tmpFieldPath = const_cast<char*>(auxFieldPath);
-    tmpFieldPath = tmpFieldPath.substr(0, nNameLen);
-    std::string tmpFieldName = const_cast<char*>(m_auxFields[iField]->fieldName);
-    tmpFieldName = tmpFieldName.substr(0, nNameLen);
-    if( strcmp(tmpFieldPath.c_str(),tmpFieldName.c_str()) == 0
-      && m_auxFields[iField]->fieldName[nNameLen] == '\0' )
-    {
-      break;
-    }
-
-    nByteOffset +=
-      m_auxFields[iField]->getInstBytes( entryData + nByteOffset,
-      nDataSize - nByteOffset );
-  }
-
-  if( iField == nFields || nByteOffset >= nDataSize )
-  {
-    return false;
-  }
-
-  //Extract this field value, and return.                          
-  return( m_auxFields[iField]->
-    extractInstValue( remainder, nArrayIndex,
-    entryData + nByteOffset,
-    nDataOffset + nByteOffset,
-    nDataSize - nByteOffset,
-    chReqType, reqReturn ) );
-}
-
-int ossimAuxType::getInstBytes( char* entryData, int nDataSize )
-{
-  if( nBytes >= 0 )
-  {
-    return( nBytes );
-  }
-  else
-  {
-    int	nTotal = 0;
-    int	iField;
-
-    for( iField = 0; iField < nFields && nTotal < nDataSize; iField++ )
-    {
-      ossimAuxField	*poField = m_auxFields[iField];
-
-      int nInstBytes = poField->getInstBytes( entryData,
-        nDataSize - nTotal );
-
-      entryData += nInstBytes;
-      nTotal += nInstBytes;
-    }
-
-    return( nTotal );
-  }
-}
-
-/************************************************************************/
-/*                              ossimAuxDictionary()                              */
-/************************************************************************/
-static const char *defDefn[] = {
-  "Eprj_MapInfo", 
-  "{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo",
-  NULL,
-  NULL };
-
-ossimAuxDictionary::ossimAuxDictionary( const char* auxDictStr )
-{
-  int		i;
-  nTypes = 0;
-  nTypesMax = 0;
-  m_auxTypes = NULL;
-
-  //Read all the types.            
-  while( auxDictStr != NULL && *auxDictStr != '.' )
-  {
-    ossimAuxType* newType = new ossimAuxType();
-    auxDictStr = newType->initialize( auxDictStr );
-
-    if( auxDictStr != NULL )
-    {
-      addType( newType );
-    }
-    else
-    {
-      delete newType;
-    }
-  }
-
-  for( i = 0; defDefn[i] != NULL; i += 2 )
-  {
-    if( findType( defDefn[i] ) == NULL )
-    {
-      ossimAuxType *newType = new ossimAuxType();
-
-      newType->initialize( defDefn[i+1] );
-      addType( newType );
-    }
-  }
-
-  //Complete the definitions.    
-  for( i = 0; i < nTypes; i++ )
-  {
-    m_auxTypes[i]->completeDefn( this );
-  }
-}
-
-ossimAuxDictionary::~ossimAuxDictionary()
-{
-  for(int i = 0; i < nTypes; i++ )
-  {
-    delete m_auxTypes[i];
-    m_auxTypes[i] = 0;
-  }
-}
-
-void ossimAuxDictionary::addType( ossimAuxType *type )
-
-{
-  if( nTypes == nTypesMax )
-  {
-    nTypesMax = nTypes * 2 + 10;
-    m_auxTypes = (ossimAuxType **) realloc( m_auxTypes,
-      sizeof(void*) * nTypesMax );
-  }
-
-  m_auxTypes[nTypes++] = type;
-}
-
-ossimAuxType* ossimAuxDictionary::findType( const char * name )
-
-{
-  int		i;
-
-  for( i = 0; i < nTypes; i++ )
-  {
-    if( strcmp(name, m_auxTypes[i]->auxTypeName) == 0 )
-    {
-      return( m_auxTypes[i] );
-    }
-  }
-
-  return NULL;
-}
-
-int ossimAuxDictionary::getItemSize( char chType )
-
-{
-  switch( chType )
-  {
-  case '1':
-  case '2':
-  case '4':
-  case 'c':
-  case 'C':
-    return 1;
-
-  case 'e':
-  case 's':
-  case 'S':
-    return 2;
-
-  case 't':
-  case 'l':
-  case 'L':
-  case 'f':
-    return 4;
-
-  case 'd':
-  case 'm':
-    return 8;
-
-  case 'M':
-    return 16;
-
-  case 'b':
-    return -1;
-
-  case 'o':
-  case 'x':
-    return 0;
-  }
-
-  return 0;
-}
diff --git a/src/ossim/support_data/ossimCcfInfo.cpp b/src/ossim/support_data/ossimCcfInfo.cpp
deleted file mode 100644
index 9a3299a..0000000
--- a/src/ossim/support_data/ossimCcfInfo.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: CCF Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <iostream>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/support_data/ossimCcfInfo.h>
-#include <ossim/imaging/ossimCcfHead.h>
-
-ossimCcfInfo::ossimCcfInfo()
-   : theFile()
-{
-}
-
-ossimCcfInfo::~ossimCcfInfo()
-{
-}
-
-bool ossimCcfInfo::open(const ossimFilename& file)
-{
-   bool result = false;
-
-   ossimString extension = file.ext();
-
-   extension.downcase();
-
-   if (extension == "ccf")
-   {
-      theFile = file;
-      result = true;
-   }
-   else
-   {
-      theFile.clear();
-   }
-
-   return result;
-}
-
-std::ostream& ossimCcfInfo::print(std::ostream& out) const
-{
-   
-   if ( theFile.size() )
-   {
-      ossimCcfHead ccf(theFile);
-      out << "File:  " << theFile << "\n" << ccf;
-   }
-   return out;
-}
diff --git a/src/ossim/support_data/ossimCeosData.cpp b/src/ossim/support_data/ossimCeosData.cpp
deleted file mode 100644
index 92a9c83..0000000
--- a/src/ossim/support_data/ossimCeosData.cpp
+++ /dev/null
@@ -1,1379 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Oscar Kramer
-//
-// Description:
-//
-// Class for reading CEOS-formatted metadata.
-// 
-//*******************************************************************
-//  $Id:$
-
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-using namespace std;
-
-#include <ossim/support_data/ossimCeosData.h>
-#include "ossim/base/ossimCommon.h"
-#include <ossim/base/ossimTrace.h>
-
-// Define Trace flags for use within this file:
-static ossimTrace traceExec  ("ossimCeosData:exec");
-static ossimTrace traceDebug ("ossimCeosData:debug");
-
-static const ossimFilename   CEOS_VOL_DIR_FILENAME  = "vdf_dat.001";
-static const ossimFilename   CEOS_LEADER_FILENAME   = "lea_01.001";
-static const ossimFilename   CEOS_IMAGE_FILENAME    = "dat_01.001";
-static const ossimFilename   CEOS_TRAILER_FILENAME  = "tra_01.001";
-
-
-//******************************************************************************
-//  CONSTRUCTOR: 
-//******************************************************************************
-ossimCeosData::ossimCeosData(const ossimFilename& volDirFile,
-                   const ossimFilename& leaderFile,
-                   const ossimFilename& imageFile,
-                   const ossimFilename& trailerFile)
-   :
-      theVolDirFileName  (volDirFile),
-      theLeaderFileName  (leaderFile),
-      theImageFileName   (imageFile),
-      theTrailerFileName (trailerFile),
-      theErrorStatus     (OK),
-      theVolDescRec      (0),
-      theTextRec         (0),
-      theDataSetSumRec   (0),
-      theQualSumRec      (0),
-      theSdrHistRec      (0),
-      thePdr16HistRec    (0),
-      thePdr8HistRec     (0),
-      theProcParmRec     (0),
-      theMapProjRec      (0),
-      thePosDataRec      (0),
-      theAttDataRec      (0),
-      theRadiDataRec     (0),
-      theRadiCompRec     (0)
-{
-   static const char MODULE[] = "ossimCeosData Constructor #1";
-   if (traceExec())  CLOG << "entering..." << endl;
-
-   loadCeosRecords();
-   
-   if (traceExec())  CLOG << "returning..." << endl;
-}
-
-
-//******************************************************************************
-//  CONSTRUCTOR: ossimCeosData(ossimFilename)
-//  
-//  Initializes given the image directory (assumes default filenames).
-//  
-//******************************************************************************
-ossimCeosData::ossimCeosData(const ossimFilename& imageDir)
-   :
-      theErrorStatus   (OK),
-      theVolDescRec    (0),
-      theTextRec       (0),
-      theDataSetSumRec (0),
-      theQualSumRec    (0),
-      theSdrHistRec    (0),
-      thePdr16HistRec  (0),
-      thePdr8HistRec   (0),
-      theProcParmRec   (0),
-      theMapProjRec    (0),
-      thePosDataRec    (0),
-      theAttDataRec    (0),
-      theRadiDataRec   (0),
-      theRadiCompRec   (0)
-{
-   static const char MODULE[] = "ossimCeosData Constructor #1";
-   if (traceExec())  CLOG << "entering..." << endl;
-
-   //***
-   // Assign values to ossimFilename data members:
-   //***
-   theVolDirFileName  = imageDir.dirCat(CEOS_VOL_DIR_FILENAME);
-   theLeaderFileName  = imageDir.dirCat(CEOS_LEADER_FILENAME);
-   theImageFileName   = imageDir.dirCat(CEOS_IMAGE_FILENAME);
-   theTrailerFileName = imageDir.dirCat(CEOS_TRAILER_FILENAME);
-
-   loadCeosRecords();
-   
-   if (traceExec())  CLOG << "returning..." << endl;
-}
-
-
-//******************************************************************************
-// PUBLIC METHOD: ossimCeosData::dump(ostream&)
-//  
-//******************************************************************************
-void ossimCeosData::dump(ostream& stream) const 
-{
-   static const char MODULE[] = "ossimCeosData::dump(ostream& stream)";
-   if (traceExec())  CLOG << "entering..." << endl;
-
-   stream << "\nDump of ossimCeosData Object -----------------------------" << endl;
-
-   if (theVolDescRec)
-      dumpVolDescRec(stream);
-   else
-      stream << "\n\n\tvol_desc_rec not present." << endl;
-
-   if (theTextRec)
-      dumpTextRec(stream);
-   else
-      stream << "\n\n\ttext_rec not present." << endl;
-
-   if (imopDescRec())
-      dumpImopDescRec(stream);
-   else
-      stream << "\n\n\timop_desc_rec not present." << endl;
-
-   if (theDataSetSumRec)
-      dumpDataSetSumRec(stream);
-   else
-      stream << "\n\n\tdataset_sum_rec not present." << endl;
-
-   if (theQualSumRec)
-      dumpQualSumRec(stream);
-   else
-      stream << "\n\n\tqual_sum_rec not present." << endl;
-
-   if (theSdrHistRec)
-      dumpSdrHistRec(stream);
-   else
-      stream << "\n\n\tsdr_hist_rec not present." << endl;
-
-   if (thePdr16HistRec)
-      dumpPdr16HistRec(stream);
-   else
-      stream << "\n\n\tpdr16_hist_rec not present." << endl;
-
-   if (thePdr8HistRec)
-      dumpPdr8HistRec(stream);
-   else
-      stream << "\n\n\tpdr8_hist_rec not present." << endl;
-
-   if (theProcParmRec)
-      dumpProcParmRec(stream);
-   else
-      stream << "\n\n\tproc_parm_rec not present." << endl;
-
-   if (theMapProjRec)
-      dumpMapProjRec(stream);
-   else
-      stream << "\n\n\tmap_proj_rec not present." << endl;
-
-   if (thePosDataRec)
-      dumpPosDataRec(stream);
-   else
-      stream << "\n\n\tpos_data_rec not present." << endl;
-
-   if (theAttDataRec)
-      dumpAttDataRec(stream);
-   else
-      stream << "\n\n\tatt_data_rec not present." << endl;
-
-   if (theRadiDataRec)
-      dumpRadiDataRec(stream);
-   else
-      stream << "\n\n\tradi_data_rec not present." << endl;
-
-   if (theRadiCompRec)
-      dumpRadiCompRec(stream);
-   else
-      stream << "\n\n\tradi_comp_rec not present." << endl;
-
-   stream << "\nEnd of ossimCeosData Object Dump -------------------------" << endl;
-
-   if (traceExec())  CLOG << "returning..." << endl;
-   return;
-}
-
-//******************************************************************************
-// PRIVATE METHOD: ossimCeosData::dumpVolDescRec()
-//  
-//******************************************************************************
-void ossimCeosData::dumpVolDescRec(ostream& stream) const
-{
-   const vol_desc_rec* p = theVolDescRec;
-
-   stream << "\n\n\tContents of vol_desc_rec:\n";
-   stream << "\n\t  ascii_flag         \""; stream.write(p->ascii_flag, 2);
-   stream << "\"\n\t  format_doc         \""; stream.write(p->format_doc, 12);
-   stream << "\"\n\t  format_ver         \""; stream.write(p->format_ver, 2);
-   stream << "\"\n\t  format_rev         \""; stream.write(p->format_rev, 2);
-   stream << "\"\n\t  software_id        \""; stream.write(p->software_id, 12);
-   stream << "\"\n\t  phyvol_id          \""; stream.write(p->phyvol_id, 16);
-   stream << "\"\n\t  logvol_id          \""; stream.write(p->logvol_id, 16);
-   stream << "\"\n\t  volset_id          \""; stream.write(p->volset_id, 16);
-   stream << "\"\n\t  phyvol_cnt         \""; stream.write(p->phyvol_cnt, 2);
-   stream << "\"\n\t  first_phyvol       \""; stream.write(p->first_phyvol, 2);
-   stream << "\"\n\t  last_phyvol        \""; stream.write(p->last_phyvol, 2);
-   stream << "\"\n\t  curr_phyvol        \""; stream.write(p->curr_phyvol, 2);
-   stream << "\"\n\t  first_file         \""; stream.write(p->first_file, 4);
-   stream << "\"\n\t  volset_log         \""; stream.write(p->volset_log, 4);
-   stream << "\"\n\t  phyvol_log         \""; stream.write(p->phyvol_log, 4);
-   stream << "\"\n\t  logvol_date        \""; stream.write(p->logvol_date, 8);
-   stream << "\"\n\t  logvol_time        \""; stream.write(p->logvol_time, 8);
-   stream << "\"\n\t  logvol_country     \"";
-   stream.write(p->logvol_country, 12);
-   stream << "\"\n\t  logvol_agency      \""; stream.write(p->logvol_agency, 8);
-   stream << "\"\n\t  logvol_facility    \"";
-   stream.write(p->logvol_facility,12);
-   stream << "\"\n\t  n_filepoint        \""; stream.write(p->n_filepoint, 4);
-   stream << "\"\n\t  n_voldir           \""; stream.write(p->n_voldir, 4);
-   stream << "\"\n\t  product_id         \""; stream.write(p->product_id, 8);
-
-   stream << "\"" << endl;
-}
-
-//******************************************************************************
-// PRIVATE METHOD: ossimCeosData::dumpTextRec()
-//  
-//******************************************************************************
-void ossimCeosData::dumpTextRec(ostream& stream) const
-{
-   const text_rec* p = theTextRec;
-   
-   stream << "\n\n\tContents of text_rec:\n\t";
-   stream << "\n\t  ascii_flag         \""; stream.write(p->ascii_flag, 2);
-   stream << "\"\n\t  cont_flag          \""; stream.write(p->cont_flag, 2);
-   stream << "\"\n\t  product_type       \""; stream.write(p->product_type, 40);
-   stream << "\"\n\t  product_create     \"";
-   stream.write(p->product_create, 60);
-   stream << "\"\n\t  phyvol_id          \""; stream.write(p->phyvol_id, 40);
-   stream << "\"\n\t  scene_id           \""; stream.write(p->scene_id, 40);
-   stream << "\"\n\t  scene_loc          \""; stream.write(p->scene_loc, 40);
-   stream << "\"" << endl;
-}
-
-//******************************************************************************
-// PRIVATE METHOD: ossimCeosData::dumpImopDescRec()
-//  
-//******************************************************************************
-void ossimCeosData::dumpImopDescRec(ostream& stream) const
-{
-   const imop_desc_rec* p = &theImopDescRec;
-   
-   stream << "\n\n\tContents of imop_desc_rec:\n\t";
-   stream << "\n\t  ascii_flag         \""; stream.write(p->ascii_flag, 2);
-   stream << "\"\n\t  spare1             \""; stream.write(p->spare1, 2);
-   stream << "\"\n\t  format_doc         \""; stream.write(p->format_doc, 12);
-   stream << "\"\n\t  format_rev         \""; stream.write(p->format_rev, 2);
-   stream << "\"\n\t  design_rev         \""; stream.write(p->design_rev, 2);
-   stream << "\"\n\t  software_id        \""; stream.write(p->software_id, 12);
-   stream << "\"\n\t  file_num           \""; stream.write(p->file_num, 4);
-   stream << "\"\n\t  file_name          \""; stream.write(p->file_name, 16);
-   stream << "\"\n\t  rec_seq            \""; stream.write(p->rec_seq, 4);
-   stream << "\"\n\t  seq_loc            \""; stream.write(p->seq_loc, 8);
-   stream << "\"\n\t  seq_len            \""; stream.write(p->seq_len, 4);
-   stream << "\"\n\t  rec_code           \""; stream.write(p->rec_code, 4);
-   stream << "\"\n\t  code_loc           \""; stream.write(p->code_loc, 8);
-   stream << "\"\n\t  code_len           \""; stream.write(p->code_len, 4);
-   stream << "\"\n\t  rec_len            \""; stream.write(p->rec_len, 4);
-   stream << "\"\n\t  rlen_loc           \""; stream.write(p->rlen_loc, 8);
-   stream << "\"\n\t  rlen_len           \""; stream.write(p->rlen_len, 4);
-   stream << "\"\n\t  spare2             \""; stream.write(p->spare2, 4);
-   stream << "\"\n\t  spare3             \""; stream.write(p->spare3, 64);
-   stream << "\"\n\t  n_dataset          \""; stream.write(p->n_dataset, 6);
-   stream << "\"\n\t  l_dataset          \""; stream.write(p->l_dataset, 6);
-   stream << "\"\n\t  spare4             \""; stream.write(p->spare4, 24);
-   stream << "\"\n\t  nbit               \""; stream.write(p->nbit, 4);
-   stream << "\"\n\t  nsamp              \""; stream.write(p->nsamp, 4);
-   stream << "\"\n\t  nbyte              \""; stream.write(p->nbyte, 4);
-   stream << "\"\n\t  justify            \""; stream.write(p->justify, 4);
-   stream << "\"\n\t  nchn               \""; stream.write(p->nchn, 4);
-   stream << "\"\n\t  nlin               \""; stream.write(p->nlin, 8);
-   stream << "\"\n\t  nleft              \""; stream.write(p->nleft, 4);
-   stream << "\"\n\t  ngrp               \""; stream.write(p->ngrp, 8);
-   stream << "\"\n\t  nright             \""; stream.write(p->nright, 4);
-   stream << "\"\n\t  ntop               \""; stream.write(p->ntop, 4);
-   stream << "\"\n\t  nbott              \""; stream.write(p->nbott, 4);
-   stream << "\"\n\t  intleav            \""; stream.write(p->intleav, 4);
-   stream << "\"\n\t  nrec_lin           \""; stream.write(p->nrec_lin, 2);
-   stream << "\"\n\t  nrec_chn           \""; stream.write(p->nrec_chn, 2);
-   stream << "\"\n\t  n_prefix           \""; stream.write(p->n_prefix, 4);
-   stream << "\"\n\t  n_sar              \""; stream.write(p->n_sar, 8);
-   stream << "\"\n\t  n_suffix           \""; stream.write(p->n_suffix, 4);
-   stream << "\"\n\t  spare5             \""; stream.write(p->spare5, 4);
-   stream << "\"\n\t  lin_loc            \""; stream.write(p->lin_loc, 8);
-   stream << "\"\n\t  chn_loc            \""; stream.write(p->chn_loc, 8);
-   stream << "\"\n\t  tim_loc            \""; stream.write(p->tim_loc, 8);
-   stream << "\"\n\t  left_loc           \""; stream.write(p->left_loc, 8);
-   stream << "\"\n\t  right_loc          \""; stream.write(p->right_loc, 8);
-   stream << "\"\n\t  pad_ind            \""; stream.write(p->pad_ind, 4);
-   stream << "\"\n\t  spare6             \""; stream.write(p->spare6, 28);
-   stream << "\"\n\t  qual_loc           \""; stream.write(p->qual_loc, 8);
-   stream << "\"\n\t  cali_loc           \""; stream.write(p->cali_loc, 8);
-   stream << "\"\n\t  gain_loc           \""; stream.write(p->gain_loc, 8);
-   stream << "\"\n\t  bias_loc           \""; stream.write(p->bias_loc, 8);
-   stream << "\"\n\t  type_id            \""; stream.write(p->type_id, 28);
-   stream << "\"\n\t  type_code          \""; stream.write(p->type_code, 4);
-   stream << "\"\n\t  left_fill          \""; stream.write(p->left_fill, 4);
-   stream << "\"\n\t  right_fill         \""; stream.write(p->right_fill, 4);
-   stream << "\"\n\t  pix_rng            \""; stream.write(p->pix_rng, 8);
-   stream << "\"" << endl;
-}
-
-//******************************************************************************
-// PRIVATE METHOD: ossimCeosData::dumpDataSetSumRec()
-//  
-//******************************************************************************
-void ossimCeosData::dumpDataSetSumRec(ostream& stream) const
-{
-   const dataset_sum_rec* p = theDataSetSumRec;
-   
-   stream << "\n\n\tContents of dataset_sum_rec:\n\t      \"";
-   stream << "\n\t  seq_num            \""; stream.write(p->seq_num, 4);
-   stream << "\"\n\t  sar_chn            \""; stream.write(p->sar_chn, 4);
-   stream << "\"\n\t  scene_id           \""; stream.write(p->scene_id, 16);
-   stream << "\"\n\t  scene_des          \""; stream.write(p->scene_des, 32);
-   stream << "\"\n\t  inp_sctim          \""; stream.write(p->inp_sctim, 32);
-   stream << "\"\n\t  asc_des            \""; stream.write(p->asc_des, 16);
-   stream << "\"\n\t  pro_lat            \""; stream.write(p->pro_lat, 16);
-   stream << "\"\n\t  pro_long           \""; stream.write(p->pro_long, 16);
-   stream << "\"\n\t  pro_head           \""; stream.write(p->pro_head, 16);
-   stream << "\"\n\t  ellip_des          \""; stream.write(p->ellip_des, 16);
-   stream << "\"\n\t  ellip_maj          \""; stream.write(p->ellip_maj, 16);
-   stream << "\"\n\t  ellip_min          \""; stream.write(p->ellip_min, 16);
-   stream << "\"\n\t  earth_mass         \""; stream.write(p->earth_mass, 16);
-   stream << "\"\n\t  grav_const         \""; stream.write(p->grav_const, 16);
-   stream << "\"\n\t  ellip_j[0]         \""; stream.write(p->ellip_j[0], 16);
-   stream << "\"\n\t  ellip_j[1]         \""; stream.write(p->ellip_j[1], 16);
-   stream << "\"\n\t  ellip_j[2]         \""; stream.write(p->ellip_j[2], 16);
-   stream << "\"\n\t  spare1             \""; stream.write(p->spare1, 16);
-   stream << "\"\n\t  terrain_h          \""; stream.write(p->terrain_h, 16);
-   stream << "\"\n\t  sc_lin             \""; stream.write(p->sc_lin, 8);
-   stream << "\"\n\t  sc_pix             \""; stream.write(p->sc_pix, 8);
-   stream << "\"\n\t  scene_len          \""; stream.write(p->scene_len, 16);
-   stream << "\"\n\t  scene_wid          \""; stream.write(p->scene_wid, 16);
-   stream << "\"\n\t  spare2             \""; stream.write(p->spare2, 16);
-   stream << "\"\n\t  nchn               \""; stream.write(p->nchn, 4);
-   stream << "\"\n\t  spare3             \""; stream.write(p->spare3, 4);
-   stream << "\"\n\t  mission_id         \""; stream.write(p->mission_id, 16);
-   stream << "\"\n\t  sensor_id          \""; stream.write(p->sensor_id, 32);
-   stream << "\"\n\t  orbit_num          \""; stream.write(p->orbit_num, 8);
-   stream << "\"\n\t  plat_lat           \""; stream.write(p->plat_lat, 8);
-   stream << "\"\n\t  plat_long          \""; stream.write(p->plat_long, 8);
-   stream << "\"\n\t  plat_head          \""; stream.write(p->plat_head, 8);
-   stream << "\"\n\t  clock_ang          \""; stream.write(p->clock_ang, 8);
-   stream << "\"\n\t  incident_ang       \""; stream.write(p->incident_ang, 8);
-   stream << "\"\n\t  spare4             \""; stream.write(p->spare4, 8);
-   stream << "\"\n\t  wave_length        \""; stream.write(p->wave_length, 16);
-   stream << "\"\n\t  motion_comp        \""; stream.write(p->motion_comp, 2);
-   stream << "\"\n\t  pulse_code         \""; stream.write(p->pulse_code, 16);
-   stream << "\"\n\t  ampl_coef[0]       \""; stream.write(p->ampl_coef[0], 16);
-   stream << "\"\n\t  ampl_coef[1]       \""; stream.write(p->ampl_coef[1], 16);
-   stream << "\"\n\t  ampl_coef[2]       \""; stream.write(p->ampl_coef[2], 16);
-   stream << "\"\n\t  ampl_coef[3]       \""; stream.write(p->ampl_coef[3], 16);
-   stream << "\"\n\t  ampl_coef[4]       \""; stream.write(p->ampl_coef[4], 16);
-   stream << "\"\n\t  phas_coef[0]       \""; stream.write(p->phas_coef[0], 16);
-   stream << "\"\n\t  phas_coef[1]       \""; stream.write(p->phas_coef[1], 16);
-   stream << "\"\n\t  phas_coef[2]       \""; stream.write(p->phas_coef[2], 16);
-   stream << "\"\n\t  phas_coef[3]       \""; stream.write(p->phas_coef[3], 16);
-   stream << "\"\n\t  phas_coef[4]       \""; stream.write(p->phas_coef[4], 16);
-   stream << "\"\n\t  chirp_ext_ind      \""; stream.write(p->chirp_ext_ind, 8);
-   stream << "\"\n\t  spare5             \""; stream.write(p->spare5, 8);
-   stream << "\"\n\t  fr                 \""; stream.write(p->fr, 16);
-   stream << "\"\n\t  rng_gate           \""; stream.write(p->rng_gate, 16);
-   stream << "\"\n\t  rng_length         \""; stream.write(p->rng_length, 16);
-   stream << "\"\n\t  baseband_f         \""; stream.write(p->baseband_f, 4);
-   stream << "\"\n\t  rngcmp_f           \""; stream.write(p->rngcmp_f, 4);
-   stream << "\"\n\t  gn_polar           \""; stream.write(p->gn_polar, 16);
-   stream << "\"\n\t  gn_cross           \""; stream.write(p->gn_cross, 16);
-   stream << "\"\n\t  chn_bits           \""; stream.write(p->chn_bits, 8);
-   stream << "\"\n\t  quant_desc         \""; stream.write(p->quant_desc, 12);
-   stream << "\"\n\t  i_bias             \""; stream.write(p->i_bias, 16);
-   stream << "\"\n\t  q_bias             \""; stream.write(p->q_bias, 16);
-   stream << "\"\n\t  iq_ratio           \""; stream.write(p->iq_ratio, 16);
-   stream << "\"\n\t  spare6             \""; stream.write(p->spare6, 16);
-   stream << "\"\n\t  spare7             \""; stream.write(p->spare7, 16);
-   stream << "\"\n\t  ele_sight          \""; stream.write(p->ele_sight, 16);
-   stream << "\"\n\t  mech_sight         \""; stream.write(p->mech_sight, 16);
-   stream << "\"\n\t  echo_track         \""; stream.write(p->echo_track, 4);
-   stream << "\"\n\t  fa                 \""; stream.write(p->fa, 16);
-   stream << "\"\n\t  elev_beam          \""; stream.write(p->elev_beam, 16);
-   stream << "\"\n\t  azim_beam          \""; stream.write(p->azim_beam, 16);
-   stream << "\"\n\t  sat_bintim         \""; stream.write(p->sat_bintim, 16);
-   stream << "\"\n\t  sat_clktim         \""; stream.write(p->sat_clktim, 32);
-   stream << "\"\n\t  sat_clkinc         \""; stream.write(p->sat_clkinc, 8);
-   stream << "\"\n\t  spare8             \""; stream.write(p->spare8, 8);
-   stream << "\"\n\t  fac_id             \""; stream.write(p->fac_id, 16);
-   stream << "\"\n\t  sys_id             \""; stream.write(p->sys_id, 8);
-   stream << "\"\n\t  ver_id             \""; stream.write(p->ver_id, 8);
-   stream << "\"\n\t  fac_code           \""; stream.write(p->fac_code, 16);
-   stream << "\"\n\t  lev_code           \""; stream.write(p->lev_code, 16);
-   stream << "\"\n\t  prod_type          \""; stream.write(p->prod_type, 32);
-   stream << "\"\n\t  algor_id           \""; stream.write(p->algor_id, 32);
-   stream << "\"\n\t  n_azilok           \""; stream.write(p->n_azilok, 16);
-   stream << "\"\n\t  n_rnglok           \""; stream.write(p->n_rnglok, 16);
-   stream << "\"\n\t  bnd_azilok         \""; stream.write(p->bnd_azilok, 16);
-   stream << "\"\n\t  bnd_rnglok         \""; stream.write(p->bnd_rnglok, 16);
-   stream << "\"\n\t  bnd_azi            \""; stream.write(p->bnd_azi, 16);
-   stream << "\"\n\t  bnd_rng            \""; stream.write(p->bnd_rng, 16);
-   stream << "\"\n\t  azi_weight         \""; stream.write(p->azi_weight, 32);
-   stream << "\"\n\t  rng_weight         \""; stream.write(p->rng_weight, 32);
-   stream << "\"\n\t  data_inpsrc        \""; stream.write(p->data_inpsrc, 16);
-   stream << "\"\n\t  rng_res            \""; stream.write(p->rng_res, 16);
-   stream << "\"\n\t  azi_res            \""; stream.write(p->azi_res, 16);
-   stream << "\"\n\t  radi_stretch[0]    \"";
-   stream.write(p->radi_stretch[0],16);
-   stream << "\"\n\t  radi_stretch[1]    \"";
-   stream.write(p->radi_stretch[1],16);
-   stream << "\"\n\t  alt_dopcen[0]      \""; stream.write(p->alt_dopcen[0],16);
-   stream << "\"\n\t  alt_dopcen[1]      \""; stream.write(p->alt_dopcen[1],16);
-   stream << "\"\n\t  alt_dopcen[2]      \""; stream.write(p->alt_dopcen[2],16);
-   stream << "\"\n\t  spare9             \""; stream.write(p->spare9, 16);
-   stream << "\"\n\t  crt_dopcen[0]      \""; stream.write(p->crt_dopcen[0],16);
-   stream << "\"\n\t  crt_dopcen[1]      \""; stream.write(p->crt_dopcen[1],16);
-   stream << "\"\n\t  crt_dopcen[2]      \""; stream.write(p->crt_dopcen[2],16);
-   stream << "\"\n\t  time_dir_pix       \""; stream.write(p->time_dir_pix, 8);
-   stream << "\"\n\t  time_dir_lin       \""; stream.write(p->time_dir_lin, 8);
-   stream << "\"\n\t  alt_rate[0]        \""; stream.write(p->alt_rate[0], 16);
-   stream << "\"\n\t  alt_rate[1]        \""; stream.write(p->alt_rate[1], 16);
-   stream << "\"\n\t  alt_rate[2]        \""; stream.write(p->alt_rate[2], 16);
-   stream << "\"\n\t  spare10            \""; stream.write(p->spare10, 16);
-   stream << "\"\n\t  crt_rate[0]        \""; stream.write(p->crt_rate[0], 16);
-   stream << "\"\n\t  crt_rate[1]        \""; stream.write(p->crt_rate[1], 16);
-   stream << "\"\n\t  crt_rate[2]        \""; stream.write(p->crt_rate[2], 16);
-   stream << "\"\n\t  spare11            \""; stream.write(p->spare11, 16);
-   stream << "\"\n\t  line_cont          \""; stream.write(p->line_cont, 8);
-   stream << "\"\n\t  clutter_lock       \""; stream.write(p->clutter_lock, 4);
-   stream << "\"\n\t  auto_focus         \""; stream.write(p->auto_focus, 4);
-   stream << "\"\n\t  line_spacing       \""; stream.write(p->line_spacing, 16);
-   stream << "\"\n\t  pix_spacing        \""; stream.write(p->pix_spacing, 16);
-   stream << "\"\n\t  rngcmp_desg        \""; stream.write(p->rngcmp_desg, 16);
-   stream << "\"" << endl;
-}
-
-//******************************************************************************
-// PRIVATE METHOD: ossimCeosData::dumpQualSumRec()
-//  
-//******************************************************************************
-void ossimCeosData::dumpQualSumRec(ostream& stream) const
-{
-   const qual_sum_rec* p = theQualSumRec;
-   
-   stream << "\n\n\tContents of qual_sum_rec:\n\t";
-   stream << "\n\t  rec_seq            \""; stream.write(p->rec_seq, 4);
-   stream << "\"\n\t  sar_chn            \""; stream.write(p->sar_chn, 4);
-   stream << "\"\n\t  cali_date          \""; stream.write(p->cali_date, 6);
-   stream << "\"\n\t  nchn               \""; stream.write(p->nchn, 4);
-   stream << "\"\n\t  islr               \""; stream.write(p->islr, 16);
-   stream << "\"\n\t  pslr               \""; stream.write(p->pslr, 16);
-   stream << "\"\n\t  azi_ambig          \""; stream.write(p->azi_ambig, 16);
-   stream << "\"\n\t  rng_ambig          \""; stream.write(p->rng_ambig, 16);
-   stream << "\"\n\t  snr                \""; stream.write(p->snr, 16);
-   stream << "\"\n\t  ber                \""; stream.write(p->ber, 16);
-   stream << "\"\n\t  rng_res            \""; stream.write(p->rng_res, 16);
-   stream << "\"\n\t  azi_res            \""; stream.write(p->azi_res, 16);
-   stream << "\"\n\t  rad_res            \""; stream.write(p->rad_res, 16);
-   stream << "\"\n\t  dyn_rng            \""; stream.write(p->dyn_rng, 16);
-   stream << "\"\n\t  rad_unc_db         \""; stream.write(p->rad_unc_db, 16);
-   stream << "\"\n\t  rad_unc_deg        \""; stream.write(p->rad_unc_deg, 16);
-   int i;
-   for (i=0; i<16; i++)
-   {
-      stream << "\"\n\t  rad_unc[" << i << "]:";
-      stream << "\n\t    db               \"";
-      stream.write(p->rad_unc[i].db, 16);
-      stream << "\"\n\t    deg              \"";
-      stream.write(p->rad_unc[i].deg, 16);
-   }
-   stream << "\"\n\t  alt_locerr         \""; stream.write(p->alt_locerr, 16);
-   stream << "\"\n\t  crt_locerr         \""; stream.write(p->crt_locerr, 16);
-   stream << "\"\n\t  alt_scale          \""; stream.write(p->alt_scale, 16);
-   stream << "\"\n\t  crt_scale          \""; stream.write(p->crt_scale, 16);
-   stream << "\"\n\t  dis_skew           \""; stream.write(p->dis_skew, 16);
-   stream << "\"\n\t  ori_err            \""; stream.write(p->ori_err, 16);
-   for (i=0; i<16; i++)
-   {
-      stream << "\"\n\t  misreg[" << i << "]:";
-      stream << "\n\t    alt_m            \"";
-      stream.write(p->misreg[i].alt_m, 16);
-      stream << "\"\n\t    crt_m            \"";
-      stream.write(p->misreg[i].crt_m, 16);
-   }
-   stream << "\"\n\t  nesz               \""; stream.write(p->nesz, 16);
-   stream << "\"\n\t  enl                \""; stream.write(p->enl, 16);
-   stream << "\"\n\t  tb_update          \""; stream.write(p->tb_update, 8);
-   stream << "\"" << endl;
-}
-
-//******************************************************************************
-// PRIVATE METHOD: ossimCeosData::dumpSdrHistRec()
-//  
-//******************************************************************************
-void ossimCeosData::dumpSdrHistRec(ostream& stream) const
-{
-   const sdr_hist_rec* p = theSdrHistRec;
-   
-   stream << "\n\n\tContents of sdr_hist_rec:\n\t";
-   stream << "\n\t  rec_seq            \""; stream.write(p->rec_seq, 4);
-   stream << "\"\n\t  sar_chn            \""; stream.write(p->sar_chn, 4);
-   stream << "\"\n\t  ntab               \""; stream.write(p->ntab, 8);
-   stream << "\"\n\t  ltab               \""; stream.write(p->ltab, 8);
-   stream << "\"\n\t  htab[0] (only one sdr_htab_rec declared in data struct):";
-   stream << "\n\t    hist_desc        \"";
-   stream.write(p->htab.hist_desc, 32);
-   stream << "\"\n\t    nrec             \""; stream.write(p->htab.nrec, 4);
-   stream << "\"\n\t    tab_seq          \""; stream.write(p->htab.tab_seq, 4);
-   stream << "\"\n\t    nbin             \""; stream.write(p->htab.nbin, 8);
-   stream << "\"\n\t    ns_lin           \""; stream.write(p->htab.ns_lin, 8);
-   stream << "\"\n\t    ns_pix           \""; stream.write(p->htab.ns_pix, 8);
-   stream << "\"\n\t    ngrp_lin         \""; stream.write(p->htab.ngrp_lin, 8);
-   stream << "\"\n\t    ngrp_pix         \""; stream.write(p->htab.ngrp_pix, 8);
-   stream << "\"\n\t    nsamp_lin        \""; stream.write(p->htab.nsamp_lin,8);
-   stream << "\"\n\t    nsamp_pix        \""; stream.write(p->htab.nsamp_pix,8);
-   stream << "\"\n\t    min_smp          \""; stream.write(p->htab.min_smp, 16);
-   stream << "\"\n\t    max_smp          \""; stream.write(p->htab.max_smp, 16);
-   stream << "\"\n\t    mean_smp         \""; stream.write(p->htab.mean_smp,16);
-   stream << "\"\n\t    std_smp          \""; stream.write(p->htab.std_smp, 16);
-   stream << "\"\n\t    smp_inc          \""; stream.write(p->htab.smp_inc, 16);
-   stream << "\"\n\t    min_hist         \""; stream.write(p->htab.min_hist,16);
-   stream << "\"\n\t    max_hist         \""; stream.write(p->htab.max_hist,16);
-   stream << "\"\n\t    mean_hist        \"";
-   stream.write(p->htab.mean_hist, 16);
-   stream << "\"\n\t    std_hist         \""; stream.write(p->htab.std_hist,16);
-   stream << "\"\n\t    nhist            \""; stream.write(p->htab.nhist, 16);
-   stream << "\"\n\t    [Use debugger to view histogram]";
-   stream << endl;
-}
-
-//******************************************************************************
-// PRIVATE METHOD: ossimCeosData::dumpPdr16HistRec()
-//  
-//******************************************************************************
-void ossimCeosData::dumpPdr16HistRec(ostream& stream) const
-{
-   const  pdr16_hist_rec* p = thePdr16HistRec;
-   
-   stream << "\n\n\tContents of pdr16_hist_rec:\n\t";
-   stream << "\n\t  rec_seq            \""; stream.write(p->rec_seq, 4);
-   stream << "\"\n\t  sar_chn            \""; stream.write(p->sar_chn, 4);
-   stream << "\"\n\t  ntab               \""; stream.write(p->ntab, 8);
-   stream << "\"\n\t  ltab               \""; stream.write(p->ltab, 8);
-
-   char buf[] = "12345678";
-   strncpy(buf, p->ntab, 8);
-   int n = atoi(buf);
-   for (int i=0; i<n; i++)
-   {
-      stream << "\"\n\t  htab[" << i << "]:";
-      stream << "\n\t    hist_desc        \"";
-      stream.write(p->htab[i].hist_desc, 32);
-      stream << "\"\n\t    nrec             \"";
-      stream.write(p->htab[i].nrec, 4);
-      stream << "\"\n\t    tab_seq          \"";
-      stream.write(p->htab[i].tab_seq, 4);
-      stream << "\"\n\t    nbin             \"";
-      stream.write(p->htab[i].nbin, 8);
-      stream << "\"\n\t    ns_lin           \"";
-      stream.write(p->htab[i].ns_lin, 8);
-      stream << "\"\n\t    ns_pix           \"";
-      stream.write(p->htab[i].ns_pix, 8);
-      stream << "\"\n\t    ngrp_lin         \"";
-      stream.write(p->htab[i].ngrp_lin, 8);
-      stream << "\"\n\t    ngrp_pix         \"";
-      stream.write(p->htab[i].ngrp_pix, 8);
-      stream << "\"\n\t    nsamp_lin        \"";
-      stream.write(p->htab[i].nsamp_lin, 8);
-      stream << "\"\n\t    nsamp_pix        \"";
-      stream.write(p->htab[i].nsamp_pix, 8);
-      stream << "\"\n\t    min_smp          \"";
-      stream.write(p->htab[i].min_smp, 16);
-      stream << "\"\n\t    max_smp          \"";
-      stream.write(p->htab[i].max_smp, 16);
-      stream << "\"\n\t    mean_smp         \"";
-      stream.write(p->htab[i].mean_smp, 16);
-      stream << "\"\n\t    std_smp          \"";
-      stream.write(p->htab[i].std_smp, 16);
-      stream << "\"\n\t    smp_inc          \"";
-      stream.write(p->htab[i].smp_inc, 16);
-      stream << "\"\n\t    min_hist         \"";
-      stream.write(p->htab[i].min_hist, 16);
-      stream << "\"\n\t    max_hist         \"";
-      stream.write(p->htab[i].max_hist, 16);
-      stream << "\"\n\t    mean_hist        \"";
-      stream.write(p->htab[i].mean_hist, 16);
-      stream << "\"\n\t    std_hist         \"";
-      stream.write(p->htab[i].std_hist, 16);
-      stream << "\"\n\t    nhist            \"";
-      stream.write(p->htab[i].nhist, 16);
-      stream << "\n\t    [Use debugger to view histogram]";
-   }
-   stream << "\"" << endl;
-}
-
-//******************************************************************************
-// PRIVATE METHOD: ossimCeosData::dumpPdr8HistRec()
-//  
-//******************************************************************************
-void ossimCeosData::dumpPdr8HistRec(ostream& stream) const
-{
-   const pdr8_hist_rec* p = thePdr8HistRec;
-   
-   stream << "\n\n\tContents of pdr18hist_rec:\n\t";
-   stream << "\n\t  rec_seq            \""; stream.write(p->rec_seq, 4);
-   stream << "\"\n\t  sar_chn            \""; stream.write(p->sar_chn, 4);
-   stream << "\"\n\t  ntab               \""; stream.write(p->ntab, 8);
-   stream << "\"\n\t  ltab               \""; stream.write(p->ltab, 8);
-   stream << "\"\n\t  htab[0] (only one sdr_htab_rec declared in data struct):";
-   stream << "\n\t    hist_desc        \"";
-   stream.write(p->htab.hist_desc, 32);
-   stream << "\"\n\t    nrec             \""; stream.write(p->htab.nrec, 4);
-   stream << "\"\n\t    tab_seq          \""; stream.write(p->htab.tab_seq, 4);
-   stream << "\"\n\t    nbin             \""; stream.write(p->htab.nbin, 8);
-   stream << "\"\n\t    ns_lin           \""; stream.write(p->htab.ns_lin, 8);
-   stream << "\"\n\t    ns_pix           \""; stream.write(p->htab.ns_pix, 8);
-   stream << "\"\n\t    ngrp_lin         \""; stream.write(p->htab.ngrp_lin, 8);
-   stream << "\"\n\t    ngrp_pix         \""; stream.write(p->htab.ngrp_pix, 8);
-   stream << "\"\n\t    nsamp_lin        \""; stream.write(p->htab.nsamp_lin,8);
-   stream << "\"\n\t    nsamp_pix        \""; stream.write(p->htab.nsamp_pix,8);
-   stream << "\"\n\t    min_smp          \""; stream.write(p->htab.min_smp, 16);
-   stream << "\"\n\t    max_smp          \""; stream.write(p->htab.max_smp, 16);
-   stream << "\"\n\t    mean_smp         \""; stream.write(p->htab.mean_smp,16);
-   stream << "\"\n\t    std_smp          \""; stream.write(p->htab.std_smp, 16);
-   stream << "\"\n\t    smp_inc          \""; stream.write(p->htab.smp_inc, 16);
-   stream << "\"\n\t    min_hist         \""; stream.write(p->htab.min_hist,16);
-   stream << "\"\n\t    max_hist         \""; stream.write(p->htab.max_hist,16);
-   stream << "\"\n\t    mean_hist        \"";
-   stream.write(p->htab.mean_hist, 16);
-   stream << "\"\n\t    std_hist         \""; stream.write(p->htab.std_hist,16);
-   stream << "\"\n\t    nhist            \""; stream.write(p->htab.nhist, 16);
-   stream << "\"\n\t    [Use debugger to view histogram]";
-   stream << endl;
-}
-
-//******************************************************************************
-// PRIVATE METHOD: ossimCeosData::dumpProcParmRec()
-//  
-//******************************************************************************
-void ossimCeosData::dumpProcParmRec(ostream& stream) const
-{
-   const proc_parm_rec* p = theProcParmRec;
-
-   stream << "\n\n\tContents of proc_parm_rec:\n\t";
-   stream << "\n\t  slow_time_coef[1]  \"";
-   stream.write(p->slow_time_coef[1], 22);
-   stream << "\"\n\t  rec_seq            \""; stream.write(p->rec_seq, 4);
-   stream << "\"\n\t  spare1             \""; stream.write(p->spare1, 4);
-   stream << "\"\n\t  inp_media          \""; stream.write(p->inp_media, 3);
-   stream << "\"\n\t  n_tape_id          \""; stream.write(p->n_tape_id, 4);
-   stream << "\"\n\t  tape_id[0]         \""; stream.write(p->tape_id[0], 8);
-   stream << "\"\n\t  exp_ing_start      \""; stream.write(p->exp_ing_start,21);
-   stream << "\"\n\t  exp_ing_stop       \""; stream.write(p->exp_ing_stop, 21);
-   stream << "\"\n\t  act_ing_start      \""; stream.write(p->act_ing_start,21);
-   stream << "\"\n\t  act_ing_stop       \""; stream.write(p->act_ing_stop, 21);
-   stream << "\"\n\t  proc_start         \""; stream.write(p->proc_start, 21);
-   stream << "\"\n\t  proc_stop          \""; stream.write(p->proc_stop, 21);
-   stream << "\"\n\t  mn_sig_lev[0]      \""; stream.write(p->mn_sig_lev[0],16);
-   stream << "\"\n\t  mn_sig_lev[1]      \""; stream.write(p->mn_sig_lev[1],16);
-   stream << "\"\n\t  mn_sig_lev[2]      \""; stream.write(p->mn_sig_lev[2],16);
-   stream << "\"\n\t  mn_sig_lev[3]      \""; stream.write(p->mn_sig_lev[3],16);
-   stream << "\"\n\t  mn_sig_lev[4]      \""; stream.write(p->mn_sig_lev[4],16);
-   stream << "\"\n\t  mn_sig_lev[5]      \""; stream.write(p->mn_sig_lev[5],16);
-   stream << "\"\n\t  mn_sig_lev[6]      \""; stream.write(p->mn_sig_lev[6],16);
-   stream << "\"\n\t  mn_sig_lev[7]      \""; stream.write(p->mn_sig_lev[7],16);
-   stream << "\"\n\t  mn_sig_lev[8]      \""; stream.write(p->mn_sig_lev[8],16);
-   stream << "\"\n\t  mn_sig_lev[9]      \""; stream.write(p->mn_sig_lev[9],16);
-   stream << "\"\n\t  scr_data_ind       \""; stream.write(p->scr_data_ind, 4);
-   stream << "\"\n\t  miss_ln            \""; stream.write(p->miss_ln, 8);
-   stream << "\"\n\t  rej_ln             \""; stream.write(p->rej_ln, 8);
-   stream << "\"\n\t  large_gap          \""; stream.write(p->large_gap, 8);
-   stream << "\"\n\t  bit_err_rate       \""; stream.write(p->bit_err_rate, 16);
-   stream << "\"\n\t  fm_crc_err         \""; stream.write(p->fm_crc_err, 16);
-   stream << "\"\n\t  date_incons        \""; stream.write(p->date_incons, 8);
-   stream << "\"\n\t  prf_changes        \""; stream.write(p->prf_changes, 8);
-   stream << "\"\n\t  delay_changes      \""; stream.write(p->delay_changes, 8);
-   stream << "\"\n\t  skipd_frams        \""; stream.write(p->skipd_frams, 8);
-   stream << "\"\n\t  rej_bf_start       \""; stream.write(p->rej_bf_start, 8);
-   stream << "\"\n\t  rej_few_fram       \""; stream.write(p->rej_few_fram, 8);
-   stream << "\"\n\t  rej_many_fram      \""; stream.write(p->rej_many_fram, 8);
-   stream << "\"\n\t  rej_mchn_err       \""; stream.write(p->rej_mchn_err, 8);
-   stream << "\"\n\t  rej_vchn_err       \""; stream.write(p->rej_vchn_err, 8);
-   stream << "\"\n\t  rej_rec_type       \""; stream.write(p->rej_rec_type, 8);
-   stream << "\"\n\t  sens_config        \""; stream.write(p->sens_config, 10);
-   stream << "\"\n\t  sens_orient        \""; stream.write(p->sens_orient, 9);
-   stream << "\"\n\t  sych_marker        \""; stream.write(p->sych_marker, 8);
-   stream << "\"\n\t  rng_ref_src        \""; stream.write(p->rng_ref_src, 12);
-   stream << "\"\n\t  rng_amp_coef[0]    \"";
-   stream.write(p->rng_amp_coef[0],16);
-   stream << "\"\n\t  rng_amp_coef[1]    \"";
-   stream.write(p->rng_amp_coef[1],16);
-   stream << "\"\n\t  rng_amp_coef[2]    \"";
-   stream.write(p->rng_amp_coef[2],16);
-   stream << "\"\n\t  rng_amp_coef[3]    \"";
-   stream.write(p->rng_amp_coef[3],16);
-   stream << "\"\n\t  rng_phas_coef[0]   \"";
-   stream.write(p->rng_phas_coef[0], 16);
-   stream << "\"\n\t  rng_phas_coef[1]   \"";
-   stream.write(p->rng_phas_coef[1], 16);
-   stream << "\"\n\t  rng_phas_coef[2]   \"";
-   stream.write(p->rng_phas_coef[2], 16);
-   stream << "\"\n\t  rng_phas_coef[3]   \"";
-   stream.write(p->rng_phas_coef[3], 16);
-   stream << "\"\n\t  err_amp_coef[0]    \"";
-   stream.write(p->err_amp_coef[0],16);
-   stream << "\"\n\t  err_amp_coef[1]    \"";
-   stream.write(p->err_amp_coef[1],16);
-   stream << "\"\n\t  err_amp_coef[2]    \"";
-   stream.write(p->err_amp_coef[2],16);
-   stream << "\"\n\t  err_amp_coef[3]    \"";
-   stream.write(p->err_amp_coef[3],16);
-   stream << "\"\n\t  err_phas_coef[0]   \"";
-   stream.write(p->err_phas_coef[0], 16);
-   stream << "\"\n\t  err_phas_coef[1]   \"";
-   stream.write(p->err_phas_coef[1], 16);
-   stream << "\"\n\t  err_phas_coef[2]   \"";
-   stream.write(p->err_phas_coef[2], 16);
-   stream << "\"\n\t  err_phas_coef[3]   \"";
-   stream.write(p->err_phas_coef[3], 16);
-   stream << "\"\n\t  pulse_bandw        \""; stream.write(p->pulse_bandw, 4);
-   stream << "\"\n\t  adc_samp_rate      \""; stream.write(p->adc_samp_rate, 5);
-   stream << "\"\n\t  rep_agc_attn       \""; stream.write(p->rep_agc_attn, 16);
-   stream << "\"\n\t  gn_corctn_fctr     \"";
-   stream.write(p->gn_corctn_fctr, 16);
-   stream << "\"\n\t  rep_energy_gn      \""; stream.write(p->rep_energy_gn,16);
-   stream << "\"\n\t  orb_data_src       \""; stream.write(p->orb_data_src, 11);
-   stream << "\"\n\t  pulse_cnt_1        \""; stream.write(p->pulse_cnt_1, 4);
-   stream << "\"\n\t  pulse_cnt_2        \""; stream.write(p->pulse_cnt_2, 4);
-   stream << "\"\n\t  beam_edge_rqd      \""; stream.write(p->beam_edge_rqd, 3);
-   stream << "\"\n\t  beam_edge_conf     \"";
-   stream.write(p->beam_edge_conf, 16);
-   stream << "\"\n\t  pix_overlap        \""; stream.write(p->pix_overlap, 4);
-   stream << "\"\n\t  n_beams            \""; stream.write(p->n_beams, 4);
-   stream << "\"\n\t  [Use debugger to view contents of beam_info record] ";
-   stream << "\n\t  n_pix_updates      \""; stream.write(p->n_pix_updates, 4);
-   stream << "\"\n\t  [Use debugger to view contents of pix_count record] ";
-   stream << "\n\t  pwin_start         \""; stream.write(p->pwin_start, 16);
-   stream << "\"\n\t  pwin_end           \""; stream.write(p->pwin_end, 16);
-   stream << "\"\n\t  recd_type          \""; stream.write(p->recd_type, 9);
-   stream << "\"\n\t  temp_set_inc       \""; stream.write(p->temp_set_inc, 16);
-   stream << "\"\n\t  n_temp_set         \""; stream.write(p->n_temp_set, 4);
-   stream << "\"\n\t  [Use debugger to view contents of temp record] ";
-   stream << "\n\t  n_image_pix        \""; stream.write(p->n_image_pix, 8);
-   stream << "\"\n\t  prc_zero_pix       \""; stream.write(p->prc_zero_pix, 16);
-   stream << "\"\n\t  prc_satur_pix      \""; stream.write(p->prc_satur_pix,16);
-   stream << "\"\n\t  img_hist_mean      \""; stream.write(p->img_hist_mean,16);
-   stream << "\"\n\t  img_cumu_dist[0]   \"";
-   stream.write(p->img_cumu_dist[0], 16);
-   stream << "\"\n\t  img_cumu_dist[1]   \"";
-   stream.write(p->img_cumu_dist[1], 16);
-   stream << "\"\n\t  img_cumu_dist[2]   \"";
-   stream.write(p->img_cumu_dist[2], 16);
-   stream << "\"\n\t  pre_img_gn         \""; stream.write(p->pre_img_gn, 16);
-   stream << "\"\n\t  post_img_gn        \""; stream.write(p->post_img_gn, 16);
-   stream << "\"\n\t  dopcen_inc         \""; stream.write(p->dopcen_inc, 16);
-   stream << "\"\n\t  n_dopcen           \""; stream.write(p->n_dopcen, 4);
-   stream << "\"\n\t  [Use debugger to view contents of dopcen_est record] ";
-   stream << "\n\t  dop_amb_err        \""; stream.write(p->dop_amb_err, 4);
-   stream << "\"\n\t  dopamb_conf        \""; stream.write(p->dopamb_conf, 16);
-   stream << "\"\n\t  eph_orb_data[0]    \"";
-   stream.write(p->eph_orb_data[0],16);
-   stream << "\"\n\t  eph_orb_data[1]    \"";
-   stream.write(p->eph_orb_data[1],16);
-   stream << "\"\n\t  eph_orb_data[2]    \"";
-   stream.write(p->eph_orb_data[2],16);
-   stream << "\"\n\t  eph_orb_data[3]    \"";
-   stream.write(p->eph_orb_data[3],16);
-   stream << "\"\n\t  eph_orb_data[4]    \"";
-   stream.write(p->eph_orb_data[4],16);
-   stream << "\"\n\t  eph_orb_data[5]    \"";
-   stream.write(p->eph_orb_data[5],16);
-   stream << "\"\n\t  eph_orb_data[6]    \"";
-   stream.write(p->eph_orb_data[6],16);
-   stream << "\"\n\t  appl_type          \""; stream.write(p->appl_type, 12);
-   stream << "\"\n\t  slow_time_coef[1]  \"";
-   stream.write(p->slow_time_coef[1], 22);
-   stream << "\"\n\t  slow_time_coef[2]  \"";
-   stream.write(p->slow_time_coef[2], 22);
-   stream << "\"\n\t  slow_time_coef[3]  \"";
-   stream.write(p->slow_time_coef[3], 22);
-   stream << "\"\n\t  slow_time_coef[4]  \"";
-   stream.write(p->slow_time_coef[4], 22);
-   stream << "\"\n\t  n_srgr             \""; stream.write(p->n_srgr, 4);
-   stream << "\"\n\t  [Use debugger to view contents of srgr_coefset record]";
-   stream << "\n\t  pixel_spacing      \""; stream.write(p->pixel_spacing,16);
-   stream << "\"\n\t  gics_reqd          \""; stream.write(p->gics_reqd, 3);
-   stream << "\"\n\t  wo_number          \""; stream.write(p->wo_number, 8);
-   stream << "\"\n\t  wo_date            \""; stream.write(p->wo_date, 20);
-   stream << "\"\n\t  satellite_id       \""; stream.write(p->satellite_id, 10);
-   stream << "\"\n\t  user_id            \""; stream.write(p->user_id, 20);
-   stream << "\"\n\t  complete_msg       \""; stream.write(p->complete_msg, 3);
-   stream << "\"\n\t  scene_id           \""; stream.write(p->scene_id, 5);
-   stream << "\"\n\t  density_in         \""; stream.write(p->density_in, 4);
-   stream << "\"\n\t  media_id           \""; stream.write(p->media_id, 8);
-   stream << "\"\n\t  angle_first        \""; stream.write(p->angle_first, 16);
-   stream << "\"\n\t  angle_last         \""; stream.write(p->angle_last, 16);
-   stream << "\"\n\t  prod_type          \""; stream.write(p->prod_type, 3);
-   stream << "\"\n\t  map_system         \""; stream.write(p->map_system, 16);
-   stream << "\"\n\t  centre_lat         \""; stream.write(p->centre_lat, 22);
-   stream << "\"\n\t  centre_long        \""; stream.write(p->centre_long, 22);
-   stream << "\"\n\t  span_x             \""; stream.write(p->span_x, 22);
-   stream << "\"\n\t  span_y             \""; stream.write(p->span_y, 22);
-   stream << "\"\n\t  apply_dtm          \""; stream.write(p->apply_dtm, 3);
-   stream << "\"\n\t  density_out        \""; stream.write(p->density_out, 4);
-   stream << "\"\n\t  state_time         \""; stream.write(p->state_time, 21);
-   stream << "\"\n\t  num_state_vectors  \"";
-   stream.write(p->num_state_vectors, 4);
-   stream << "\"\n\t  state_time_inc     \"";
-   stream.write(p->state_time_inc, 16);
-   stream << "\"" << endl;
-}
-
-//******************************************************************************
-// PRIVATE METHOD: ossimCeosData::dumpMapProjRec()
-//  
-//******************************************************************************
-void ossimCeosData::dumpMapProjRec(ostream& stream) const
-{
-   const map_proj_rec* p = theMapProjRec;
-
-   stream << "\n\n\tContents of map_proj_rec:\n\t";
-   stream << "\n\t  spare1             \""; stream.write(p->spare1, 16);
-   stream << "\"\n\t  map_desc           \""; stream.write(p->map_desc, 32);
-   stream << "\"\n\t  n_pixel            \""; stream.write(p->n_pixel, 16);
-   stream << "\"\n\t  n_line             \""; stream.write(p->n_line, 16);
-   stream << "\"\n\t  pixel_spacing      \""; stream.write(p->pixel_spacing,16);
-   stream << "\"\n\t  line_spacing       \""; stream.write(p->line_spacing, 16);
-   stream << "\"\n\t  osc_orient         \""; stream.write(p->osc_orient, 16);
-   stream << "\"\n\t  orb_incl           \""; stream.write(p->orb_incl, 16);
-   stream << "\"\n\t  asc_node           \""; stream.write(p->asc_node, 16);
-   stream << "\"\n\t  isc_dist           \""; stream.write(p->isc_dist, 16);
-   stream << "\"\n\t  geo_alt            \""; stream.write(p->geo_alt, 16);
-   stream << "\"\n\t  isc_vel            \""; stream.write(p->isc_vel, 16);
-   stream << "\"\n\t  plat_head          \""; stream.write(p->plat_head, 16);
-   stream << "\"\n\t  ref_ellip          \""; stream.write(p->ref_ellip, 32);
-   stream << "\"\n\t  semi_major         \""; stream.write(p->semi_major, 16);
-   stream << "\"\n\t  semi_minor         \""; stream.write(p->semi_minor, 16);
-   stream << "\"\n\t  datum_shift[0]     \"";
-   stream.write(p->datum_shift[0], 16);
-   stream << "\"\n\t  datum_shift[1]     \"";
-   stream.write(p->datum_shift[1], 16);
-   stream << "\"\n\t  datum_shift[2]     \"";
-   stream.write(p->datum_shift[2], 16);
-   stream << "\"\n\t  aux_datum_shift[0] \"";
-   stream.write(p->aux_datum_shift[0], 16);
-   stream << "\"\n\t  aux_datum_shift[1] \"";
-   stream.write(p->aux_datum_shift[1], 16);
-   stream << "\"\n\t  aux_datum_shift[2] \"";
-   stream.write(p->aux_datum_shift[2], 16);
-   stream << "\"\n\t  scal_ellip         \""; stream.write(p->scal_ellip, 16);
-   stream << "\"\n\t  proj_desc          \""; stream.write(p->proj_desc, 32);
-   stream << "\"\n\t  utm_desc           \""; stream.write(p->utm_desc, 32);
-   stream << "\"\n\t  utm_zone_sig       \""; stream.write(p->utm_zone_sig, 4);
-   stream << "\"\n\t  utm_east_orig      \""; stream.write(p->utm_east_orig,16);
-   stream << "\"\n\t  utm_north_orig     \"";
-   stream.write(p->utm_north_orig, 16);
-   stream << "\"\n\t  utm_cent_long      \""; stream.write(p->utm_cent_long,16);
-   stream << "\"\n\t  utm_cent_lat       \""; stream.write(p->utm_cent_lat, 16);
-   stream << "\"\n\t  utm_stand_par[0]   \"";
-   stream.write(p->utm_stand_par[0], 16);
-   stream << "\"\n\t  utm_stand_par[1]   \"";
-   stream.write(p->utm_stand_par[1], 16);
-   stream << "\"\n\t  utm_scale          \""; stream.write(p->utm_scale, 16);
-   stream << "\"\n\t  ups_desc           \""; stream.write(p->ups_desc, 32);
-   stream << "\"\n\t  ups_cent_long      \""; stream.write(p->ups_cent_long,16);
-   stream << "\"\n\t  ups_cent_lat       \""; stream.write(p->ups_cent_lat, 16);
-   stream << "\"\n\t  ups_scale          \""; stream.write(p->ups_scale, 16);
-   stream << "\"\n\t  nsp_desc           \""; stream.write(p->nsp_desc, 32);
-   stream << "\"\n\t  nsp_east_orig      \""; stream.write(p->nsp_east_orig,16);
-   stream << "\"\n\t  nsp_north_orig     \"";
-   stream.write(p->nsp_north_orig,16);
-   stream << "\"\n\t  nsp_cent_long      \""; stream.write(p->nsp_cent_long,16);
-   stream << "\"\n\t  nsp_cent_lat       \""; stream.write(p->nsp_cent_lat, 16);
-   stream << "\"\n\t  nsp_stand_par[0]   \"";
-   stream.write(p->nsp_stand_par[0], 16);
-   stream << "\"\n\t  nsp_stand_par[1]   \"";
-   stream.write(p->nsp_stand_par[1], 16);
-   stream << "\"\n\t  nsp_stand_par[2]   \"";
-   stream.write(p->nsp_stand_par[2], 16);
-   stream << "\"\n\t  nsp_stand_par[3]   \"";
-   stream.write(p->nsp_stand_par[3], 16);
-   stream << "\"\n\t  nsp_stand_mer[0]   \"";
-   stream.write(p->nsp_stand_mer[0], 16);
-   stream << "\"\n\t  nsp_stand_mer[1]   \"";
-   stream.write(p->nsp_stand_mer[1], 16);
-   stream << "\"\n\t  nsp_stand_mer[2]   \"";
-   stream.write(p->nsp_stand_mer[2], 16);
-   stream << "\"\n\t  nsp_spare[0]       \""; stream.write(p->nsp_spare[0], 16);
-   stream << "\"\n\t  nsp_spare[1]       \""; stream.write(p->nsp_spare[1], 16);
-   stream << "\"\n\t  nsp_spare[2]       \""; stream.write(p->nsp_spare[2], 16);
-   stream << "\"\n\t  nsp_spare[3]       \""; stream.write(p->nsp_spare[3], 16);
-   stream << "\"\n\t  corner_ne[0]       \""; stream.write(p->corner_ne[0], 16);
-   stream << "\"\n\t  corner_ne[1]       \""; stream.write(p->corner_ne[1], 16);
-   stream << "\"\n\t  corner_ne[2]       \""; stream.write(p->corner_ne[2], 16);
-   stream << "\"\n\t  corner_ne[3]       \""; stream.write(p->corner_ne[3], 16);
-   stream << "\"\n\t  corner_ne[4]       \""; stream.write(p->corner_ne[4], 16);
-   stream << "\"\n\t  corner_ne[5]       \""; stream.write(p->corner_ne[5], 16);
-   stream << "\"\n\t  corner_ne[6]       \""; stream.write(p->corner_ne[6], 16);
-   stream << "\"\n\t  corner_ne[7]       \""; stream.write(p->corner_ne[7], 16);
-   stream << "\"\n\t  corner_ll[0]       \""; stream.write(p->corner_ll[0], 16);
-   stream << "\"\n\t  corner_ll[1]       \""; stream.write(p->corner_ll[1], 16);
-   stream << "\"\n\t  corner_ll[2]       \""; stream.write(p->corner_ll[2], 16);
-   stream << "\"\n\t  corner_ll[3]       \""; stream.write(p->corner_ll[3], 16);
-   stream << "\"\n\t  corner_ll[4]       \""; stream.write(p->corner_ll[4], 16);
-   stream << "\"\n\t  corner_ll[5]       \""; stream.write(p->corner_ll[5], 16);
-   stream << "\"\n\t  corner_ll[6]       \""; stream.write(p->corner_ll[6], 16);
-   stream << "\"\n\t  corner_ll[7]       \""; stream.write(p->corner_ll[7], 16);
-   stream << "\"\n\t  terr_height[0]     \"";
-   stream.write(p->terr_height[0], 16);
-   stream << "\"\n\t  terr_height[1]     \"";
-   stream.write(p->terr_height[1], 16);
-   stream << "\"\n\t  terr_height[2]     \"";
-   stream.write(p->terr_height[2], 16);
-   stream << "\"\n\t  terr_height[3]     \"";
-   stream.write(p->terr_height[3], 16);
-   stream << "\"\n\t  lp_conv_coef[0]    \"";
-   stream.write(p->lp_conv_coef[0],20);
-   stream << "\"\n\t  lp_conv_coef[1]    \"";
-   stream.write(p->lp_conv_coef[1],20);
-   stream << "\"\n\t  lp_conv_coef[2]    \"";
-   stream.write(p->lp_conv_coef[2],20);
-   stream << "\"\n\t  lp_conv_coef[3]    \"";
-   stream.write(p->lp_conv_coef[3],20);
-   stream << "\"\n\t  lp_conv_coef[4]    \"";
-   stream.write(p->lp_conv_coef[4],20);
-   stream << "\"\n\t  lp_conv_coef[5]    \"";
-   stream.write(p->lp_conv_coef[5],20);
-   stream << "\"\n\t  lp_conv_coef[6]    \"";
-   stream.write(p->lp_conv_coef[6],20);
-   stream << "\"\n\t  lp_conv_coef[7]    \"";
-   stream.write(p->lp_conv_coef[7],20);
-   stream << "\"\n\t  mp_conv_coef[0]    \"";
-   stream.write(p->mp_conv_coef[0],20);
-   stream << "\"\n\t  mp_conv_coef[1]    \"";
-   stream.write(p->mp_conv_coef[1],20);
-   stream << "\"\n\t  mp_conv_coef[2]    \"";
-   stream.write(p->mp_conv_coef[2],20);
-   stream << "\"\n\t  mp_conv_coef[3]    \"";
-   stream.write(p->mp_conv_coef[3],20);
-   stream << "\"\n\t  mp_conv_coef[4]    \"";
-   stream.write(p->mp_conv_coef[4],20);
-   stream << "\"\n\t  mp_conv_coef[5]    \"";
-   stream.write(p->mp_conv_coef[5],20);
-   stream << "\"\n\t  mp_conv_coef[6]    \"";
-   stream.write(p->mp_conv_coef[6],20);
-   stream << "\"\n\t  mp_conv_coef[7]    \"";
-   stream.write(p->mp_conv_coef[7],20);
-   stream << "\"\n\t  dem_type           \""; stream.write(p->dem_type, 4);
-   stream << "\"\n\t  spare3             \""; stream.write(p->spare3, 32);
-   stream << "\"" << endl;
-}
-
-//******************************************************************************
-// PRIVATE METHOD: ossimCeosData::dumpPosDataRec()
-//  
-//******************************************************************************
-void ossimCeosData::dumpPosDataRec(ostream& stream) const
-{
-   const pos_data_rec* p = thePosDataRec;
-   
-   stream << "\n\n\tContents of pos_data_rec:\n\t";
-   stream << "\n\t  orbit_ele_desg     \""; stream.write(p->orbit_ele_desg, 32);
-   stream << "\"\n\t  orbit_ele[0]       \""; stream.write(p->orbit_ele[0], 16);
-   stream << "\"\n\t  orbit_ele[1]       \""; stream.write(p->orbit_ele[1], 16);
-   stream << "\"\n\t  orbit_ele[2]       \""; stream.write(p->orbit_ele[2], 16);
-   stream << "\"\n\t  orbit_ele[3]       \""; stream.write(p->orbit_ele[3], 16);
-   stream << "\"\n\t  orbit_ele[4]       \""; stream.write(p->orbit_ele[4], 16);
-   stream << "\"\n\t  orbit_ele[5]       \""; stream.write(p->orbit_ele[5], 16);
-   stream << "\"\n\t  ndata              \""; stream.write(p->ndata, 4);
-   stream << "\"\n\t  year               \""; stream.write(p->year, 4);
-   stream << "\"\n\t  month              \""; stream.write(p->month, 4);
-   stream << "\"\n\t  day                \""; stream.write(p->day, 4);
-   stream << "\"\n\t  gmt_day            \""; stream.write(p->gmt_day, 4);
-   stream << "\"\n\t  gmt_sec            \""; stream.write(p->gmt_sec, 22);
-   stream << "\"\n\t  data_int           \""; stream.write(p->data_int, 22);
-   stream << "\"\n\t  ref_coord          \""; stream.write(p->ref_coord, 64);
-   stream << "\"\n\t  hr_angle           \""; stream.write(p->hr_angle, 22);
-   stream << "\"\n\t  alt_poserr         \""; stream.write(p->alt_poserr, 16);
-   stream << "\"\n\t  crt_poserr         \""; stream.write(p->crt_poserr, 16);
-   stream << "\"\n\t  rad_poserr         \""; stream.write(p->rad_poserr, 16);
-   stream << "\"\n\t  alt_velerr         \""; stream.write(p->alt_velerr, 16);
-   stream << "\"\n\t  crt_velerr         \""; stream.write(p->crt_velerr, 16);
-   stream << "\"\n\t  rad_velerr         \""; stream.write(p->rad_velerr, 16);
-   stream << "\"\n\t  [Use debugger to view contents of pos_vect record]";
-   stream << endl;
-}
-
-//******************************************************************************
-// PRIVATE METHOD: ossimCeosData::dumpAttDataRec()
-//  
-//******************************************************************************
-void ossimCeosData::dumpAttDataRec(ostream& stream) const
-{
-   const att_data_rec* p = theAttDataRec;
-   
-   stream << "\n\n\tContents of att_data_rec:\n\t";
-   stream << "\n\t  npoint             \""; stream.write(p->npoint, 4);
-   stream << "\"\n\t  [Use debugger to view contents of att_vect record]";
-   stream << "\n\t  pitch_bias         \""; stream.write(p->pitch_bias, 14);
-   stream << "\"\n\t  roll_bias          \""; stream.write(p->roll_bias, 14);
-   stream << "\"\n\t  yaw_bias           \""; stream.write(p->yaw_bias, 14);
-   stream << "\"" << endl;
-}
-
-//******************************************************************************
-// PRIVATE METHOD: ossimCeosData::dumpRadiDataRec()
-//  
-//******************************************************************************
-void ossimCeosData::dumpRadiDataRec(ostream& stream) const
-{
-   const radi_data_rec* p = theRadiDataRec;
-   
-   stream << "\n\n\tContents of radi_data_rec:\n\t";
-   stream << "\n\t  seq_num            \""; stream.write(p->seq_num, 4);
-   stream << "\"\n\t  n_data             \""; stream.write(p->n_data, 4);
-   stream << "\"\n\t  field_size         \""; stream.write(p->field_size, 8);
-   stream << "\"\n\t  [Use debugger to view contents of dset record]";
-   stream << endl;
-}
-
-//******************************************************************************
-// PRIVATE METHOD: ossimCeosData::dumpRadiCompRec()
-//  
-//******************************************************************************
-void ossimCeosData::dumpRadiCompRec(ostream& stream) const
-{
-   const radi_comp_rec* p = theRadiCompRec;
-   
-   stream << "\n\n\tContents of radi_comp_rec:\n\t";
-   stream << "\n\t  seq_num            \""; stream.write(p->seq_num, 4);
-   stream << "\"\n\t  chan_ind           \""; stream.write(p->chan_ind, 4);
-   stream << "\"\n\t  n_dset             \""; stream.write(p->n_dset, 8);
-   stream << "\"\n\t  dset_size          \""; stream.write(p->dset_size, 8);
-   stream << "\"\n\t  [Use debugger to view contents of dset record]";
-   stream << endl;
-}
-
-
-//*****************************************************************************
-// PRIVATE METHOD: ossimCeosData::loadCeosRecords()
-//
-//  Reads the data files and initializes the data members. 
-//
-//*****************************************************************************
-void ossimCeosData::loadCeosRecords()
-{
-   static const char MODULE[] = "ossimCeosData::loadCeosFile()";
-   if (traceExec()) CLOG << " Entered method." << endl;
-
-   int       sizeOfRec;
-   char      bufI6[] = "123456";
-   int       numRecords;
-   
-   //***
-   // Open Volume Directory File and parse:
-   //***
-   FILE* fptr = fopen(theVolDirFileName.chars(), "r");
-   if (!fptr)
-   {
-      if(traceDebug())
-      {
-         CLOG << " ERROR:\n\tCannot open CEOS Volume Directory file: "
-              << theVolDirFileName << endl;
-      }
-      theErrorStatus = ERROR;
-      return;
-   }
-   sizeOfRec = sizeof(theVolumeDirectory);
-   fread(&theVolumeDirectory, sizeOfRec, 1, fptr);
-   fclose(fptr);
-   theVolDescRec = &theVolumeDirectory.volDescRec;
-   theTextRec    = &theVolumeDirectory.textRec;
-
-   if (traceDebug())
-   {
-      CLOG << "DEBUG\n   -- List of Records Present ---" << endl;
-   }
-
-   //***
-   // Open and parse Leader File:
-   //***
-   if (!theLeaderFileName.empty())
-   {
-      fptr = fopen(theLeaderFileName.chars(), "r");
-      if (!fptr)
-      {
-         if(traceDebug())
-         {
-            CLOG << " ERROR:\n\tCannot open CEOS Leader file: "
-                  << theLeaderFileName << endl;
-         }
-         theErrorStatus = ERROR;
-         return;
-      }
-      fread(&(theSarLeaderFile.sarDescRec), 720, 1, fptr);
-
-      //***
-      // Establish which CEOS records are in the leader file, and read them.
-      // First the dataset summary record:
-      //***
-      strncpy(bufI6, theSarLeaderFile.sarDescRec.n_dataset, 6);
-      numRecords = atoi(bufI6);
-      if (numRecords)
-      {
-         fread(&theSarLeaderFile.dataSetSumRec, sizeOfNextRec(fptr), 1, fptr);
-         theDataSetSumRec = &(theSarLeaderFile.dataSetSumRec);
-         if (traceDebug()) clog << "\t Leader: dataSetSumRec" << endl;
-      }
-
-      //***
-      // Data quality summary record:
-      //***
-      strncpy(bufI6, theSarLeaderFile.sarDescRec.n_qual_sum, 6);
-      numRecords = atoi(bufI6);
-      if (numRecords)
-      {
-         fread(&(theSarLeaderFile.qualSumRec), sizeOfNextRec(fptr), 1, fptr);
-         theQualSumRec = &(theSarLeaderFile.qualSumRec);
-         if (traceDebug()) clog << "\t Leader: qualSumRec" << endl;
-      }
-
-      //***
-      // Histogram records:
-      //***
-      strncpy(bufI6, theSarLeaderFile.sarDescRec.n_data_hist, 6);
-      numRecords = atoi(bufI6);
-      if (numRecords)
-      {
-         fread(&(theSarLeaderFile.sdrHistRec), sizeOfNextRec(fptr), 1, fptr);
-         theSdrHistRec = &(theSarLeaderFile.sdrHistRec);
-         fread(&(theSarLeaderFile.pdr16HistRec), sizeOfNextRec(fptr), 1, fptr);
-         thePdr16HistRec = &(theSarLeaderFile.pdr16HistRec);
-         if (traceDebug()) clog << "\t Leader: sdrHistRec & pdr16HistRec"
-                                << endl;
-      }
-
-      //***
-      // Processing parameter record:
-      //***
-      strncpy(bufI6, theSarLeaderFile.sarDescRec.n_det_proc, 6);
-      numRecords = atoi(bufI6);
-      if (numRecords)
-      {
-         fread(&(theSarLeaderFile.procParmRec), sizeOfNextRec(fptr), 1, fptr);
-         theProcParmRec = &(theSarLeaderFile.procParmRec);
-         if (traceDebug()) clog << "\t Leader: procParmRec" << endl;
-      }
-
-      //***
-      // Map projection record:
-      //***
-      strncpy(bufI6, theSarLeaderFile.sarDescRec.n_map_proj, 6);
-      numRecords = atoi(bufI6);
-      if (numRecords)
-      {
-         fread(&(theSarLeaderFile.mapProjRec), sizeOfNextRec(fptr), 1, fptr);
-         theMapProjRec = &(theSarLeaderFile.mapProjRec);
-         if (traceDebug()) clog << "\t Leader: mapProjRec" << endl;
-      }
-
-      //***
-      // Position data record:
-      //***
-      strncpy(bufI6, theSarLeaderFile.sarDescRec.n_plat_pos, 6);
-      numRecords = atoi(bufI6);
-      if (numRecords)
-      {
-         fread(&(theSarLeaderFile.posDataRec), sizeOfNextRec(fptr), 1, fptr);
-         thePosDataRec = &(theSarLeaderFile.posDataRec);
-         if (traceDebug()) clog << "\t Leader: posDataRec" << endl;
-      }
-
-      //***
-      // Attitude data record:
-      //***
-      strncpy(bufI6, theSarLeaderFile.sarDescRec.n_att_data, 6);
-      numRecords = atoi(bufI6);
-      if (numRecords)
-      {
-         fread(&(theSarLeaderFile.attDataRec), sizeOfNextRec(fptr), 1, fptr);
-         theAttDataRec = &(theSarLeaderFile.attDataRec);
-         if (traceDebug()) clog << "\t Leader: attDataRec" << endl;
-      }
-
-      //***
-      // Radiometric data record:
-      //***
-      strncpy(bufI6, theSarLeaderFile.sarDescRec.n_radi_data, 6);
-      numRecords = atoi(bufI6);
-      if (numRecords)
-      {
-         fread(&(theSarLeaderFile.radiDataRec), sizeOfNextRec(fptr), 1, fptr);
-         theRadiDataRec = &(theSarLeaderFile.radiDataRec);
-         if (traceDebug()) clog << "\t Leader: radiDataRec" << endl;
-      }
-
-      //***
-      // Radiometric compensation data record:
-      //***
-      strncpy(bufI6, theSarLeaderFile.sarDescRec.n_radi_comp, 6);
-      numRecords = atoi(bufI6);
-      if (numRecords)
-      {
-         fread(&(theSarLeaderFile.radiCompRec), sizeOfNextRec(fptr), 1, fptr);
-         theRadiCompRec = &(theSarLeaderFile.radiCompRec);
-         if (traceDebug()) clog << "\t Leader: radiCompRec" << endl;
-      }
-
-      fclose(fptr);
-   }
-   
-   //***
-   // Open and parse CEOS SAR data File to read the image options:
-   //***
-   fptr = fopen(theImageFileName.chars(), "r");
-   if (!fptr)
-   {
-      CLOG << " ERROR:\n\tCannot open CEOS image file: " << theImageFileName
-           << endl;
-      theErrorStatus = ERROR;
-      return;
-   }
-   sizeOfRec = sizeof(theImopDescRec);
-   fread(&theImopDescRec, sizeOfRec, 1, fptr);
-   fclose(fptr);
-
-   //***
-   // Open and parse trailer file:
-   //***
-   if (!theTrailerFileName.empty())
-   {
-      fptr = fopen(theTrailerFileName.chars(), "r");
-      if (!fptr)
-      {
-         CLOG << " ERROR:\n\tCannot open CEOS Trailer file: "
-              << theTrailerFileName << endl;
-         theErrorStatus = ERROR;
-         return;
-      }
-      fread(&(theSarTrailerFile.sarDescRec), 720, 1, fptr);
-
-      //***
-      // Establish which CEOS records are in the Trailer file, and read them.
-      // First the dataset summary record:
-      //***
-      strncpy(bufI6, theSarTrailerFile.sarDescRec.n_dataset, 6);
-      numRecords = atoi(bufI6);
-      if (numRecords)
-      {
-         fread(&(theSarTrailerFile.dataSetSumRec), sizeOfNextRec(fptr),1, fptr);
-         theDataSetSumRec = &(theSarTrailerFile.dataSetSumRec);
-         if (traceDebug()) clog << "\t Trailer: dataSetSumRec" << endl;
-      }
-
-      //***
-      // Data quality summary record:
-      //***
-      strncpy(bufI6, theSarTrailerFile.sarDescRec.n_qual_sum, 6);
-      numRecords = atoi(bufI6);
-      if (numRecords)
-      {
-         fread(&(theSarTrailerFile.qualSumRec), sizeOfNextRec(fptr), 1, fptr);
-         theQualSumRec = &(theSarTrailerFile.qualSumRec);
-         if (traceDebug()) clog << "\t Trailer: qualSumRec" << endl;
-      }
-
-      //***
-      // Histogram records:
-      //***
-      strncpy(bufI6, theSarTrailerFile.sarDescRec.n_data_hist, 6);
-      numRecords = atoi(bufI6);
-      if (numRecords)
-      {
-         fread(&(theSarTrailerFile.sdrHistRec), sizeOfNextRec(fptr), 1, fptr);
-         theSdrHistRec = &(theSarTrailerFile.sdrHistRec);
-         fread(&(theSarTrailerFile.pdr8HistRec), 16920, 1, fptr);
-         thePdr8HistRec = &(theSarTrailerFile.pdr8HistRec);
-         if (traceDebug()) clog << "\t Trailer: sdrHistRec & pdr8HistRec"
-                                << endl;
-      }
-
-      //***
-      // Processing parameter record:
-      //***
-      strncpy(bufI6, theSarTrailerFile.sarDescRec.n_det_proc, 6);
-      numRecords = atoi(bufI6);
-      if (numRecords)
-      {
-         fread(&(theSarTrailerFile.procParmRec), sizeOfNextRec(fptr), 1, fptr);
-         theProcParmRec = &(theSarTrailerFile.procParmRec);
-         if (traceDebug()) clog << "\t Trailer: procParmRec" << endl;
-      }
-
-      //***
-      // Attitude data record:
-      //***
-      strncpy(bufI6, theSarTrailerFile.sarDescRec.n_att_data, 6);
-      numRecords = atoi(bufI6);
-      if (numRecords)
-      {
-         fread(&(theSarTrailerFile.attDataRec), sizeOfNextRec(fptr), 1, fptr);
-         theAttDataRec = &(theSarTrailerFile.attDataRec);
-         if (traceDebug()) clog << "\t Trailer: attDataRec" << endl;
-      }
-
-      //***
-      // Radiometric data record:
-      //***
-      strncpy(bufI6, theSarTrailerFile.sarDescRec.n_radi_data, 6);
-      numRecords = atoi(bufI6);
-      if (numRecords)
-      {
-         fread(&(theSarTrailerFile.radiDataRec), sizeOfNextRec(fptr), 1, fptr);
-         theRadiDataRec = &(theSarTrailerFile.radiDataRec);
-         if (traceDebug()) clog << "\t Trailer: radiDataRec" << endl;
-      }
-
-      //***
-      // Radiometric compensation data record:
-      //***
-      strncpy(bufI6, theSarTrailerFile.sarDescRec.n_radi_comp, 6);
-      numRecords = atoi(bufI6);
-      if (numRecords)
-      {
-         fread(&(theSarTrailerFile.radiCompRec), sizeOfNextRec(fptr), 1, fptr);
-         theRadiCompRec = &(theSarTrailerFile.radiCompRec);
-         if (traceDebug()) clog << "\t Trailer: radiCompRec" << endl;
-      }
-
-      fclose(fptr);
-   }
-
-   if (traceExec()) CLOG << " Exiting method." << endl;
-}
-
-
-//******************************************************************************
-// PRIVATE METHOD: ossimCeosData::sizeOfNextRec(FILE*)
-//  
-//  Reads the descriptor record pointed to by the file ptr and returns the
-//  size of the following record in bytes.
-//  
-//******************************************************************************
-int ossimCeosData::sizeOfNextRec(FILE* fptr)
-{
-   static const char MODULE[] = "ossimCeosData::sizeOfNextRec(FILE* fptr)";
-   if (traceExec())  CLOG << "entering..." << endl;
-   
-   static desc_rec descRec;
-   static int DESC_REC_SIZE = 12;
-   
-   fread(&descRec, DESC_REC_SIZE, 1, fptr);
-   fseek(fptr, (long) -DESC_REC_SIZE, SEEK_CUR);
-   
-   if (traceDebug())
-   {
-      CLOG << "DEBUG -- "
-           << "\n\t length = " << descRec.length << endl;
-   }
-
-   if (traceExec())  CLOG << "returning..." << endl;
-   return descRec.length;
-}
diff --git a/src/ossim/support_data/ossimDemHeader.cpp b/src/ossim/support_data/ossimDemHeader.cpp
deleted file mode 100644
index 0edfbbf..0000000
--- a/src/ossim/support_data/ossimDemHeader.cpp
+++ /dev/null
@@ -1,785 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Ken Melero
-//         Orginally written by Jamie Moyers (jmoyers at geeks.com)
-//         Adapted from the package KDEM.
-// Description: This class parses a DEM header.
-//
-//********************************************************************
-// $Id: ossimDemHeader.cpp 15327 2009-09-01 20:31:16Z dburken $
-
-#include <fstream>
-#include <iostream>
-#include <iomanip>
-#include <ossim/support_data/ossimDemHeader.h>
-#include <ossim/support_data/ossimDemUtil.h>
-
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimKeywordNames.h>
-
-static const char* PROCESS_CODE[]
-= { "Autocorrelation resample simple bilinear",
-    "Manual profile GRIDEM simple bilinear",
-    "DLG/hypsography CTOG 8-direction bilinear",
-    "Interpolation from photogrammetic system contours DCASS",
-    "direction bilinear",
-    "DLG/hypsography LINETRACE, LT4X complex linear",
-    "DLG/hypsography CPS-3, ANUDEM, GRASS complex polynomial",
-    "Electronic imaging (non-photogrammetric), active or passive",
-    "sensor systems" };
-
-static const int MAX_PROCESS_CODE_INDEX = 8;
-
-static const char* GROUND_REF_SYSTEM[]
-= { "Geographic",
-    "UTM",
-    "State Plane" };
-
-static const int MAX_GROUND_REF_SYSTEM_INDEX = 2;
-
-static const char* GROUND_REF_SYSTEM_UNITS[]
-= { "Radians",
-    "Feet",
-    "Meters",
-    "Arc Seconds" };
-
-static const int MAX_GROUND_REF_SYSTEM_UNITS_INDEX = 3;
-
-
-static const char* VERTICAL_DATUM[]
-= { "local mean sea level",
-    "National Geodetic Vertical Datum 1929",
-    "North American Vertical Datum 1988" };
-
-static const int MAX_VERTICAL_DATUM_INDEX = 2;
-
-static const char* HORIZONTAL_DATUM[]
-= { "North American Datum 1927 (NAD 27)",
-    "World Geoditic System 1972 (WGS 72)",
-    "WGS 84",
-    "NAD 83",
-    "Old Hawaii Datum",
-    "Puerto Rico Datum" };
-
-static const int MAX_HORIZONTAL_DATUM_INDEX = 5;
-
-
-ossimDemHeader::ossimDemHeader()
-   : _seGeoCornerX(0.0),
-     _seGeoCornerY(0.0),
-     _processCode(0),
-     _levelCode(0),
-     _elevPattern(0),
-     _groundRefSysCode(0),
-     _groundRefSysZone(0),
-     _groundRefSysUnits(0),
-     _elevUnits(0),
-     _numPolySides(0),
-     _counterclockAngle(0.0),
-     _elevAccuracyCode(0),
-     _minElevation(0),
-     _maxElevation(0),
-     _spatialResX(0.0),
-     _spatialResY(0.0),
-     _spatialResZ(0.0),
-     _profileRows(0),
-     _profileColumns(0),
-     _largeContInt(0),
-     _maxSourceUnits(0),
-     _smallContInt(0),
-     _minSourceUnits(0),
-     _sourceDate(0),
-     _inspRevDate(0),
-     _valFlag(0),
-     _suspectVoidFlg(0),
-     _vertDatum(0),
-     _horizDatum(0),
-     _dataEdition(0),
-     _perctVoid(0),
-     _westEdgeFlag(0),
-     _northEdgeFlag(0),
-     _eastEdgeFlag(0),
-     _southEdgeFlag(0),
-     _vertDatumShift(0.0)
-{
-}
-   
-std::string const&
-ossimDemHeader::getQuadName() const
-{
-   return _quadName;
-}
-
-std::string const&
-ossimDemHeader::getProcessInfo() const
-{
-   return _processInfo;
-}
-
-double
-ossimDemHeader::getSEGeoCornerX() const
-{
-   return _seGeoCornerX;
-}
-
-double
-ossimDemHeader::getSEGeoCornerY() const
-{
-   return _seGeoCornerY;
-}
-
-ossim_int32
-ossimDemHeader::getProcessCode() const
-{
-   return _processCode;
-}
-
-std::string const&
-ossimDemHeader::getSectionIndicator() const
-{
-   return _sectionIndicator;
-}
-
-std::string const&
-ossimDemHeader::getMappingCenterCode() const
-{
-   return _mapCenterCode;
-}
-
-ossim_int32
-ossimDemHeader::getLevelCode() const
-{
-   return _levelCode;
-}
-         
-ossim_int32
-ossimDemHeader::getElevPattern() const
-{
-   return _elevPattern;
-}
-
-ossim_int32
-ossimDemHeader::getGroundRefSysCode() const
-{
-   return _groundRefSysCode;
-}
-    
-ossim_int32
-ossimDemHeader::getGroundRefSysZone() const
-{
-   return _groundRefSysZone;
-}
-
-ossim_int32
-ossimDemHeader::getGroundRefSysUnits() const
-{
-   return _groundRefSysUnits;
-}
-
-ossim_int32
-ossimDemHeader::getElevationUnits() const
-{
-   return _elevUnits;
-}
-
-ossim_int32
-ossimDemHeader::getNumPolySides() const
-{
-   return _numPolySides;
-}
-
-ossimDemPointVector const&
-ossimDemHeader::getDEMCorners() const
-{
-   return _demCorners;
-}
-
-double
-ossimDemHeader::getCounterclockAngle() const
-{
-   return _counterclockAngle;
-}
-
-ossim_int32
-ossimDemHeader::getElevAccuracyCode() const
-{
-   return _elevAccuracyCode;
-}
-
-double
-ossimDemHeader::getMinimumElev() const
-{
-   return _minElevation;
-}
-
-double
-ossimDemHeader::getMaximumElev() const
-{
-   return _maxElevation;
-}
-
-double
-ossimDemHeader::getSpatialResX() const
-{
-   return _spatialResX;
-}
-
-double
-ossimDemHeader::getSpatialResY() const
-{
-   return _spatialResY;
-}
-
-double
-ossimDemHeader::getSpatialResZ() const
-{
-   return _spatialResZ;
-}
-
-ossim_int32
-ossimDemHeader::getProfileRows() const
-{
-   return _profileRows;
-}
-
-ossim_int32
-ossimDemHeader::getProfileColumns() const
-{
-   return _profileColumns;
-}
-
-ossim_int32
-ossimDemHeader::getLargeContInt() const
-{
-   return _largeContInt;
-}
-
-ossim_int32
-ossimDemHeader::getMaxSourceUnits() const
-{
-   return _maxSourceUnits;
-}
-
-ossim_int32
-ossimDemHeader::getSmallContInt() const
-{
-   return _smallContInt;
-}
-
-ossim_int32
-ossimDemHeader::getMinSourceUnits() const
-{
-   return _minSourceUnits;
-}
-
-ossim_int32
-ossimDemHeader::getSourceDate() const
-{
-   return _sourceDate;
-}
-
-ossim_int32
-ossimDemHeader::getInspRevDate() const
-{
-   return _inspRevDate;
-}
-
-std::string const&
-ossimDemHeader::getInspFlag() const
-{
-   return _inspFlag;
-}
-
-ossim_int32
-ossimDemHeader::getDataValFlag() const
-{
-   return _valFlag;
-}
-
-ossim_int32
-ossimDemHeader::getSuspectVoidFlag() const
-{
-   return _suspectVoidFlg;
-}
-
-ossim_int32
-ossimDemHeader::getVertDatum () const
-{
-   return _vertDatum;
-}
-
-ossim_int32
-ossimDemHeader::getHorizDatum() const
-{
-   return _horizDatum;
-}
-
-ossim_int32
-ossimDemHeader::getDataEdition() const
-{
-   return _dataEdition;
-}
-
-ossim_int32
-ossimDemHeader::getPerctVoid() const
-{
-   return _perctVoid;
-}
-
-ossim_int32
-ossimDemHeader::getWestEdgeFlag() const
-{
-   return _westEdgeFlag;
-}
-
-ossim_int32
-ossimDemHeader::getNorthEdgeFlag() const
-{
-   return _northEdgeFlag;
-}
-
-ossim_int32
-ossimDemHeader::getEastEdgeFlag() const
-{
-   return _eastEdgeFlag;
-}
-
-ossim_int32
-ossimDemHeader::getSouthEdgeFlag() const
-{
-   return _southEdgeFlag;
-}
-
-double
-ossimDemHeader::getVertDatumShift() const
-{
-   return _vertDatumShift;
-}
-
-std::ostream&
-operator<<(std::ostream& s, const ossimDemHeader& header)
-{
-   return header.print(s);
-}
-
-bool ossimDemHeader::open(const ossimFilename& file)
-{
-   bool result = ossimDemUtil::isUsgsDem(file);
-   std::ifstream is(file.c_str(), std::ios_base::in | std::ios_base::binary);
-   if ( is.good() )
-   {
-      open(is);
-      is.close();
-   }
-   else
-   {
-      result = false;
-   }
-   return result;
-}
-
-std::istream& ossimDemHeader::open(std::istream& is)
-{
-   if ( is.good() )
-   {
-      char* bufstr = new char[1024];
-      char* temp   = new char[1024];
-      ossim_int32 i;
-      
-      ossimDemUtil::getRecord(is, bufstr);
-      
-      strncpy(temp, bufstr, 40);
-      temp[40] = '\0';
-      _quadName = temp;
-      
-      strncpy(temp,bufstr+40,40);
-      temp[40] = '\0';
-      _processInfo = temp;
-      
-      ossimDemUtil::getDouble(bufstr, 109, 13, _seGeoCornerX);
-      ossimDemUtil::getDouble(bufstr, 122, 13, _seGeoCornerY);
-      _processCode = ossimDemUtil::getLong(bufstr, 135, 1);
-      
-      strncpy(temp,bufstr+137,3);
-      temp[3] = '\0';
-      _sectionIndicator = temp;
-      
-      strncpy(temp,bufstr+140,4);
-      temp[4] = '\0';
-      _mapCenterCode = temp;
-      
-      _levelCode = ossimDemUtil::getLong(bufstr, 144, 6);
-      _elevPattern = ossimDemUtil::getLong(bufstr, 150, 6);
-      _groundRefSysCode = ossimDemUtil::getLong(bufstr, 156, 6);
-      _groundRefSysZone = ossimDemUtil::getLong(bufstr, 162, 6);
-      _groundRefSysUnits = ossimDemUtil::getLong(bufstr, 528, 6);
-      _elevUnits = ossimDemUtil::getLong(bufstr, 534, 6);
-      _numPolySides = ossimDemUtil::getLong(bufstr, 540, 6);
-      
-      for (i = 0; i < 4; i++)
-      {
-         double x,y;
-         ossim_int32 pos = 546 + (i * 48);
-         ossimDemUtil::getDouble(bufstr, pos, 24, x);
-         ossimDemUtil::getDouble(bufstr, pos + 24, 24, y);
-      _demCorners.push_back(ossimDemPoint(x,y));
-      }
-      
-      ossimDemUtil::getDouble(bufstr, 738, 24, _minElevation);
-      ossimDemUtil::getDouble(bufstr, 762, 24, _maxElevation);
-      ossimDemUtil::getDouble(bufstr, 786, 24, _counterclockAngle );
-      _elevAccuracyCode = ossimDemUtil::getLong(bufstr, 810, 6);
-      ossimDemUtil::getDouble(bufstr, 816, 12, _spatialResX);
-      ossimDemUtil::getDouble(bufstr, 828, 12, _spatialResY);
-      ossimDemUtil::getDouble(bufstr, 840, 12, _spatialResZ);
-      _profileRows = ossimDemUtil::getLong(bufstr, 852, 6);
-      _profileColumns = ossimDemUtil::getLong(bufstr, 858, 6);
-      _largeContInt = ossimDemUtil::getLong(bufstr, 864, 5);
-      _maxSourceUnits = ossimDemUtil::getLong(bufstr, 869, 1);
-      _smallContInt = ossimDemUtil::getLong(bufstr, 870, 5);
-      _minSourceUnits = ossimDemUtil::getLong(bufstr, 875, 1);
-      _sourceDate = ossimDemUtil::getLong(bufstr, 876, 4);
-      _inspRevDate = ossimDemUtil::getLong(bufstr, 880, 4);
-      
-      strncpy(temp, bufstr+884,1);
-      temp[1]='\0';
-      _inspFlag = temp;
-      
-      _valFlag = ossimDemUtil::getLong(bufstr, 885, 1);
-      _suspectVoidFlg = ossimDemUtil::getLong(bufstr, 886, 2);
-      _vertDatum = ossimDemUtil::getLong(bufstr, 888, 2);
-      _horizDatum = ossimDemUtil::getLong(bufstr, 890, 2);
-      if (_horizDatum == 0)
-         _horizDatum = 1;   // Default to NAD27
-      
-      _dataEdition = ossimDemUtil::getLong(bufstr, 892, 4);
-      _perctVoid = ossimDemUtil::getLong(bufstr, 896, 4);
-      _westEdgeFlag = ossimDemUtil::getLong(bufstr, 900, 2);
-      _northEdgeFlag = ossimDemUtil::getLong(bufstr, 902, 2);
-      _eastEdgeFlag = ossimDemUtil::getLong(bufstr, 904, 2);
-      _southEdgeFlag = ossimDemUtil::getLong(bufstr, 906, 2);
-      ossimDemUtil::getDouble(bufstr, 908, 7, _vertDatumShift);
-
-      delete [] bufstr;
-      delete [] temp;
-      bufstr = 0;
-      temp = 0;
-   }
-   return is;
-}
-
-
-std::ostream& ossimDemHeader::print(std::ostream& out) const
-{
-   const int W = 24; // format width
-   const int CW = W-8; // format corner width
-   
-   // Capture the original flags then set float output to full precision.
-   std::ios_base::fmtflags f = out.flags();
-
-   // Note:  This is only a partial print for now...
-   std::string prefix = "usgs_dem.";
-   
-   out << std::setiosflags(std::ios_base::fixed|std::ios_base::left)
-       << std::setprecision(10)
-      
-       << prefix << std::setw(W)
-       << "quadrangle_name:" << getQuadName().c_str() << "\n"
-       << prefix << std::setw(W)
-       << "process_info:" << getProcessInfo().c_str() << "\n"
-       << prefix << std::setw(W)
-       << "se_geo_corner_x:" << getSEGeoCornerX() << "\n"
-       << prefix << std::setw(W)
-       << "se_geo_corner_y:" << getSEGeoCornerY() << "\n"
-       << prefix << std::setw(W)
-       << "process_code:";
-   
-   ossim_int32 tmpl = getProcessCode() - 1;
-   if ( tmpl >= 0 && tmpl <= MAX_PROCESS_CODE_INDEX)
-   {
-      out << PROCESS_CODE[tmpl] << "\n";
-   }
-   else
-   {
-      out << "unknown" << "\n";
-   }
-
-   out << prefix << std::setw(W)
-       << "section_indicator: " << getSectionIndicator().c_str() << "\n"
-       << prefix << std::setw(W)
-       << "mapping_center_code: " << getMappingCenterCode().c_str() << "\n"
-       << prefix << std::setw(W)
-       << "level_code: " << getLevelCode() << "\n"
-       << prefix << std::setw(W)
-       << "elev_pattern: " << getElevPattern() << "\n"
-       << prefix << std::setw(W) << "ground_ref_sys: ";
-   
-   tmpl = getGroundRefSysCode();
-   if ( tmpl >= 0 && tmpl <= MAX_GROUND_REF_SYSTEM_INDEX)
-   {
-      out << GROUND_REF_SYSTEM[tmpl] << "\n";
-   }
-   else
-   {
-      out << "unknown\n";
-   }
-   
-   out << prefix << std::setw(W)
-       << "ground_ref_sys_zone: " << getGroundRefSysZone() << "\n"
-       << prefix << std::setw(W)
-       << "ground_ref_sys_units:";
-   tmpl = getGroundRefSysUnits();
-   if ( tmpl >= 0 && tmpl <= MAX_GROUND_REF_SYSTEM_UNITS_INDEX)
-   {
-      out << GROUND_REF_SYSTEM_UNITS[tmpl] << "\n";
-   }
-   else
-   {
-      out << "unknown\n";
-   }
-         
-   out << prefix << std::setw(W)
-       << "elevation_units: ";
-   tmpl = getElevationUnits();
-   if ( tmpl >= 0 && tmpl <= MAX_GROUND_REF_SYSTEM_UNITS_INDEX)
-   {
-      out << GROUND_REF_SYSTEM_UNITS[tmpl] << "\n";
-   }
-   else
-   {
-      out << "unknown\n";
-   }
-
-   out << prefix << std::setw(W)
-       << "number_poly_sides: " << getNumPolySides() << "\n"
-       << prefix << std::setw(W)
-       << "counterclock_angle: " << getCounterclockAngle()<< "\n"
-       << prefix << std::setw(W)
-       << "elev_accuracy_code: " << getElevAccuracyCode()<< "\n"
-       << prefix << std::setw(W)
-       << "minimum_elevation: " << getMinimumElev() << "\n"
-       << prefix << std::setw(W)
-       << "maximum_elevation: " << getMaximumElev() << "\n"
-       << prefix << std::setw(W)
-       << "spatial_res_x: " << getSpatialResX() << "\n"
-       << prefix << std::setw(W)
-       << "spatial_res_y: " << getSpatialResY() << "\n"
-       << prefix << std::setw(W)
-       << "spatial_res_z:" << getSpatialResZ() << "\n"
-       << prefix << std::setw(W)
-       << "profile_rows: " << getProfileRows() << "\n"
-       << prefix << std::setw(W)
-       << "profile_columns:" << getProfileColumns() << "\n"
-       << prefix << std::setw(W)
-       << "source_date:" << getSourceDate() << "\n"
-       << prefix << std::setw(W)
-       << "revision_date:" << getInspRevDate() << "\n"
-       << prefix  << std::setw(W)
-       << "vertical_datum:";
-   
-   tmpl = getVertDatum() - 1;
-   if ( tmpl >= 0 && tmpl <= MAX_VERTICAL_DATUM_INDEX)
-   {
-      out << VERTICAL_DATUM[tmpl] << "\n";
-   }
-   else
-   {
-      out << "unknown\n";
-   }
-
-   out << prefix << std::setw(W)
-       << "vertical_datum_shift:" << getVertDatumShift() << "\n"
-       << prefix << std::setw(W)
-       << "horizontal_datum:";
-   tmpl = getHorizDatum() - 1;
-   if ( tmpl >= 0 && tmpl <= MAX_HORIZONTAL_DATUM_INDEX)
-   {
-      out << HORIZONTAL_DATUM[tmpl] << "\n";
-   }
-   else
-   {
-      out << "unknown\n";
-   }
-
-   const ossimDemPointVector CORNERS = getDEMCorners();
-   for (unsigned int i=0; i < CORNERS.size(); ++i)
-   {
-      out << prefix << "corner[" << i
-          << std::setw(CW)<< "].x:  " << CORNERS[i].getX() << "\n"
-          << prefix << "corner[" << i
-          << std::setw(CW)<< "].y:  " << CORNERS[i].getY() << "\n"
-          << std::endl;
-   }
-
-   out << std::endl;
-
-   // Reset flags.
-   out.setf(f);   
-
-   return out;
-}
-
-std::istream& operator>>(std::istream& s, ossimDemHeader& header)
-{
-   return header.open(s);
-}
-
-bool ossimDemHeader::getImageGeometry(ossimKeywordlist& kwl,
-                                      const char* prefix) const
-{
-   ossimString type = getProjectionType();
-   ossimString datum = getHorizDatumCode();
-   if ( (type == "unknown") || (datum == "unknown") )
-   {
-      return false;
-   }
-
-   if (_demCorners.size() != 4)
-   {
-      return false;
-   }
-
-   double tieX   = _demCorners[1].getX();
-   double tieY   = _demCorners[1].getY();
-   double scaleX = getSpatialResX();
-   double scaleY = getSpatialResX();
-   
-   // Add these for all projections.
-   kwl.add(prefix,
-           ossimKeywordNames::TYPE_KW,
-           type);
-   
-   kwl.add(prefix,
-           ossimKeywordNames::DATUM_KW,
-           datum);
-
-   if (getGroundRefSysCode() == 0) // Geographic.
-   {
-      // ESH 10/2008 -- The Dem ground units can be either radians or 
-      // arc seconds, so we have to convert parameters in these units 
-      // to degrees which is what OSSIM is assuming.
-      bool bIsArcSecs = (getGroundRefSysUnits() == 3) ? true : false;
-      bool bIsRadians = (getGroundRefSysUnits() == 0) ? true : false;
-
-      double convertFactor = 1.0;
-      if ( bIsArcSecs == true )
-      {
-         convertFactor = 1.0 / 3600;
-      }
-      else if ( bIsRadians == true )
-      {
-         convertFactor = 180.0 / M_PI;
-      }
-
-      kwl.add(prefix,
-              ossimKeywordNames::TIE_POINT_LON_KW,
-              (tieX * convertFactor) );
-      kwl.add(prefix,
-              ossimKeywordNames::TIE_POINT_LAT_KW,
-              (tieY * convertFactor) );
-      kwl.add(prefix,
-              ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON,
-              (scaleX * convertFactor) );
-      kwl.add(prefix,
-              ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT,
-              (scaleY * convertFactor) );
-   }
-   else if (getGroundRefSysCode() == 1) // UTM
-   {
-      // Get the zone.
-      kwl.add(prefix,
-              ossimKeywordNames::ZONE_KW,
-              abs(getGroundRefSysZone()));
-
-      // Set the hemisphere.
-      kwl.add(prefix,
-              ossimKeywordNames::HEMISPHERE_KW,
-              (getGroundRefSysZone()<0?"S":"N"));
-
-      // Set the tie.
-      if (getGroundRefSysUnits() == 1) // Feet...
-      {
-         tieX = ossim::usft2mtrs(tieX);
-         tieY = ossim::usft2mtrs(tieY);
-         scaleX = ossim::usft2mtrs(scaleX);
-         scaleY = ossim::usft2mtrs(scaleY);
-         
-      }
-      kwl.add(prefix,
-              ossimKeywordNames::TIE_POINT_EASTING_KW,
-              tieX);
-      kwl.add(prefix,
-              ossimKeywordNames::TIE_POINT_NORTHING_KW,
-              tieY);
-      kwl.add(prefix,
-              ossimKeywordNames::METERS_PER_PIXEL_X_KW,
-              scaleX);
-      kwl.add(prefix,
-              ossimKeywordNames::METERS_PER_PIXEL_Y_KW,
-              scaleY);
-   }
-   else if (getGroundRefSysCode() == 2) // State Plane
-   {
-      return false; // Need to code...
-   }
-
-   
-   return true;
-}
-
-ossimString ossimDemHeader::getHorizDatumCode() const
-{
-   ossimString code;
-   switch(getHorizDatum())
-   {
-      case 1:
-         code = "NAS-C";
-         break;
-      case 2:
-         code = "WGD";
-         break;
-      case 3:
-         code = "WGE";
-        break;         
-      case 4:
-         code = "NAR-C";
-        break;         
-      case 5:
-         code = "OHA-M";
-        break;         
-      case 6:
-         code = "PUR";
-         break;
-      default:
-         code = "unknown";
-        break;         
-   }
-   return code;
-}
-         
-ossimString ossimDemHeader::getProjectionType() const
-{
-   ossimString type;
-   switch(getGroundRefSysCode())
-   {
-      case 0:
-         type = "ossimEquDistCylProjection";
-         break;
-      case 1:
-         type = "ossimUtmProjection";
-         break;
-      case 2:
-      default:
-         type = "unknown";
-         break;
-   }
-   return type;
-}
diff --git a/src/ossim/support_data/ossimDemInfo.cpp b/src/ossim/support_data/ossimDemInfo.cpp
deleted file mode 100644
index eab753c..0000000
--- a/src/ossim/support_data/ossimDemInfo.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: USGS DEM Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <iostream>
-
-#include <ossim/support_data/ossimDemInfo.h>
-
-#include <ossim/base/ossimErrorCodes.h>
-#include <ossim/base/ossimFilename.h>
-
-#include <ossim/support_data/ossimDemHeader.h>
-#include <ossim/support_data/ossimDemUtil.h>
-
-ossimDemInfo::ossimDemInfo()
-   : theFile()
-{
-}
-
-ossimDemInfo::~ossimDemInfo()
-{
-}
-
-bool ossimDemInfo::open(const ossimFilename& file)
-{
-   bool result = ossimDemUtil::isUsgsDem(file);
-
-   if ( result )
-   {
-      theFile = file;
-   }
-   else
-   {
-      theFile = ossimFilename::NIL;
-   }
-   
-   return result;
-}
-
-std::ostream& ossimDemInfo::print(std::ostream& out) const
-{
-   if ( theFile.exists() )
-   {
-      ossimDemHeader hdr;
-      if ( hdr.open(theFile) )
-      {
-         // std::string prefix;
-         hdr.print(std::cout);
-      }
-   }
-   return out;
-}
diff --git a/src/ossim/support_data/ossimDemPoint.cpp b/src/ossim/support_data/ossimDemPoint.cpp
deleted file mode 100644
index 16df265..0000000
--- a/src/ossim/support_data/ossimDemPoint.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Contains class definition for DEMPoint.
-//*******************************************************************
-//  $Id: ossimDemPoint.cpp 9094 2006-06-13 19:12:40Z dburken $
-
-#include <ossim/support_data/ossimDemPoint.h>
diff --git a/src/ossim/support_data/ossimDemProfile.cpp b/src/ossim/support_data/ossimDemProfile.cpp
deleted file mode 100644
index e074d1f..0000000
--- a/src/ossim/support_data/ossimDemProfile.cpp
+++ /dev/null
@@ -1,155 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Ken Melero
-//         Orginally written by Jamie Moyers (jmoyers at geeks.com)
-//         Adapted from the package KDEM.
-// Description: This class defines a DEM profile.
-//
-//********************************************************************
-// $Id: ossimDemProfile.cpp 17206 2010-04-25 23:20:40Z dburken $
-
-#include <cstdlib>
-#include <iostream>
-#include <sstream>
-
-#include <ossim/support_data/ossimDemProfile.h>
-#include <ossim/support_data/ossimDemUtil.h>
-
-ossimDemProfile::ossimDemProfile()
-   : _row(0),
-     _column(0),
-     _numberElevations(0),
-     _locDatumElev(0.0),
-     _minElev(0.0),
-     _maxElev(0.0)
-{
-}
-
-ossimDemProfile::ossimDemProfile(ossimDemProfile const& right)
-{
-   operator=(right);
-}
-
-ossimDemProfile const&
-ossimDemProfile::operator=(ossimDemProfile const& right)
-{
-   if (this == &right)
-      return *this;
-
-   _row = right._row;
-   _column = right._column;
-   _numberElevations = right._numberElevations;
-   _profileLocation = right._profileLocation;
-   _locDatumElev = right._locDatumElev;
-   _minElev = right._minElev;
-   _maxElev = right._maxElev;
-   _elevations = right._elevations;
-
-   return *this;
-}
-
-ossim_int32
-ossimDemProfile::getRowNumber() const
-{
-   return _row;
-}
-
-ossim_int32
-ossimDemProfile::getColumnNumber() const
-{
-   return _column;
-}
-
-ossim_int32
-ossimDemProfile::getNumberOfElevations() const
-{
-   return _numberElevations;
-}
-
-ossimDemPoint const&
-ossimDemProfile::getProfileLocation() const
-{
-   return _profileLocation;
-}
-
-double
-ossimDemProfile::getLocalDatumElevation() const
-{
-   return _locDatumElev;
-}
-
-double
-ossimDemProfile::getMinimumElev() const
-{
-   return _minElev;
-}
-
-double
-ossimDemProfile::getMaximumElev() const
-{
-   return _maxElev;
-}
-
-ossimDemElevationVector const&
-ossimDemProfile::getElevations() const
-{
-   return _elevations;
-}
-
-std::istream&
-operator>>(std::istream& s, ossimDemProfile& demp)
-{
-   //   string bufstr;
-   char bufstr[1024];
-
-   ossimDemUtil::getRecord(s,bufstr);
-
-   demp._row = ossimDemUtil::getLong(bufstr, 0, 6);
-   demp._column = ossimDemUtil::getLong(bufstr, 6, 6);
-   demp._numberElevations = ossimDemUtil::getLong(bufstr, 12, 6);
-
-   double x,y;
-   ossimDemUtil::getDouble(bufstr, 24, 24, x);
-   ossimDemUtil::getDouble(bufstr, 48, 24, y);
-   demp._profileLocation.setXY(x,y);
-
-   ossimDemUtil::getDouble(bufstr, 72, 24, demp._locDatumElev);
-   ossimDemUtil::getDouble(bufstr, 96, 24, demp._minElev);
-   ossimDemUtil::getDouble(bufstr, 120, 24, demp._maxElev);
-
-   demp._elevations.erase(demp._elevations.begin(), demp._elevations.end());   
-   demp._elevations.reserve(demp._numberElevations);
-
-   // Extract elevations in this record.
-   ossim_int32 count = 0;
-   while ((count < 146) && (count < demp._numberElevations))
-   {
-      demp._elevations.push_back(ossimDemUtil::getLong(bufstr, 144+(count*6), 6));
-      count++;
-   }
-   
-   ossim_int32 t;
-   while (count < demp._numberElevations)
-   {
-      t = (count - 146) % 170;
-      if (t == 0)
-         ossimDemUtil::getRecord(s,bufstr);
-      demp._elevations.push_back(ossimDemUtil::getLong(bufstr, t*6, 6));
-      count++;
-   }
-
-   return s;
-}
-
-
-std::ostream& operator<<(std::ostream& s, ossimDemProfile& /* demp */)
-{
-   return s;
-}
-
-
diff --git a/src/ossim/support_data/ossimDemStats.cpp b/src/ossim/support_data/ossimDemStats.cpp
deleted file mode 100644
index 665774b..0000000
--- a/src/ossim/support_data/ossimDemStats.cpp
+++ /dev/null
@@ -1,126 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Ken Melero
-//         Orginally written by Jamie Moyers (jmoyers at geeks.com)
-//         Adapted from the package KDEM.
-// Description: This class provides some statistics for DEMs.
-//
-//********************************************************************
-// $Id: ossimDemStats.cpp 17206 2010-04-25 23:20:40Z dburken $
-
-#include <stdlib.h>
-
-#include <ossim/support_data/ossimDemStats.h>
-#include <ossim/support_data/ossimDemUtil.h>
-using namespace std;
-
-ossimDemStats::ossimDemStats()
-   : _availCodeDE2(0),
-     _rsmeDE2x(0),
-     _rsmeDE2y(0),
-     _rsmeDE2z(0),
-     _sampleSizeDE2(0),
-     _availCodeDE5(0),
-     _rsmeDE5x(0),
-     _rsmeDE5y(0),
-     _rsmeDE5z(0),
-     _sampleSizeDE5(0)
-
-{
-}
-
-ossimDemStats::~ossimDemStats()
-{
-}
-
-long
-ossimDemStats::getAvailCodeDE2() const
-{
-   return _availCodeDE2;
-}
-
-long
-ossimDemStats::getRSMEDE2x() const
-{
-   return _rsmeDE2x;
-}
-
-long
-ossimDemStats::getRSMEDE2y() const
-{
-   return _rsmeDE2y;
-}
-
-long
-ossimDemStats::getRSMEDE2z() const
-{
-   return _rsmeDE2z;
-}
-
-long
-ossimDemStats::getSampleSizeDE2() const
-{
-   return _sampleSizeDE2;
-}
-
-long
-ossimDemStats::getAvailCodeDE5() const
-{
-   return _availCodeDE5;
-}
-
-long
-ossimDemStats::getRSMEDE5x() const
-{
-   return _rsmeDE5x;
-}
-
-long
-ossimDemStats::getRSMEDE5y() const
-{
-   return _rsmeDE5y;
-}
-
-long
-ossimDemStats::getRSMEDE5z() const
-{
-   return _rsmeDE5z;
-}
-
-long
-ossimDemStats::getSampleSizeDE5() const
-{
-   return _sampleSizeDE5;
-}
-
-ostream&
-operator<<(ostream& s,  ossimDemStats const& /* stats */)
-{
-   return s;
-}
-
-istream&
-operator>>(istream& s, ossimDemStats& stats)
-{
-   char bufstr[1024];
-
-   ossimDemUtil::getRecord(s, bufstr);
-
-   stats._availCodeDE2 = ossimDemUtil::getLong(bufstr, 0, 6);
-   stats._rsmeDE2x = ossimDemUtil::getLong(bufstr, 6, 6);
-   stats._rsmeDE2y = ossimDemUtil::getLong(bufstr, 12, 6);
-   stats._rsmeDE2z = ossimDemUtil::getLong(bufstr, 18, 6);
-   stats._sampleSizeDE2 = ossimDemUtil::getLong(bufstr, 24, 6);
-   stats._availCodeDE5 = ossimDemUtil::getLong(bufstr, 30, 6);
-   stats._rsmeDE5x = ossimDemUtil::getLong(bufstr, 36, 6);
-   stats._rsmeDE5y = ossimDemUtil::getLong(bufstr, 42, 6);
-   stats._rsmeDE5z = ossimDemUtil::getLong(bufstr, 48, 6);
-   stats._sampleSizeDE5 = ossimDemUtil::getLong(bufstr, 54, 6);
-
-   return s;
-}
diff --git a/src/ossim/support_data/ossimDemUtil.cpp b/src/ossim/support_data/ossimDemUtil.cpp
deleted file mode 100644
index 9b53420..0000000
--- a/src/ossim/support_data/ossimDemUtil.cpp
+++ /dev/null
@@ -1,178 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Ken Melero
-//         Orginally written by Jamie Moyers (jmoyers at geeks.com)
-//         Adapted from the package KDEM.
-// Description: This class provides some simple utilities for DEMs.
-//
-//********************************************************************
-// $Id: ossimDemUtil.cpp 17501 2010-06-02 11:14:55Z dburken $
-
-#include <cstdio>
-#include <cstdlib>
-#include <iostream>
-
-#include <ossim/support_data/ossimDemUtil.h>
-
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimKeywordlist.h>
-using namespace std;
-
-static const char DEM_TYPE_KW[] = "dem_type";
-static const char USGS_DEM_KW[] = "usgs_dem";
-
-bool ossimDemUtil::isUsgsDem(const ossimFilename& file)
-{
-   bool result = false;
-
-   if ( file.exists() )
-   {
-      
-      //---
-      // Open checks:
-      // 1) Check extension for .dem
-      //
-      // 2) Look for file.omd (ossim meta data) file containing keyword
-      //    "dem_type" with value of "usgs_dem".
-      //
-      // NOTE:
-      // There is a keyword list template stored in the templates directory:
-      // "ossim/etc/templates/usgs_dem_template.kwl"
-      //---
-      
-      ossimString ext = file.ext();
-      ext.downcase();
-      if (ext == "dem")
-      {
-         result = true;
-      }
-      else
-      {
-         // Look for file.omd
-         ossimFilename kwlFile = file;
-         kwlFile.setExtension("omd");
-         if (! kwlFile.exists() )
-         {
-            kwlFile.setExtension("OMD");
-         }
-         
-         if ( kwlFile.exists() )
-         {
-            ossimKeywordlist kwl(kwlFile);
-            if (kwl.getErrorStatus() == ossimErrorCodes::OSSIM_OK)
-            {
-               const char* lookup = kwl.find(DEM_TYPE_KW);
-               if (lookup)
-               {
-                  ossimString s = lookup;
-                  s.downcase();
-                  if (s == USGS_DEM_KW)
-                  {
-                     result = true;
-                  }
-               }
-            }
-         }
-      }
-      
-      if ( result )
-      {
-         // Open up the file for reading.
-         std::ifstream is(file.c_str(),
-                          std::ios_base::in | std::ios_base::binary);
-         if ( is.good() )
-         {
-            //---
-            // SPECIAL HACK (drb):
-            // Check some bytes and make sure there is no binary data.
-            // There are files out there with .dem extension that are binary
-            // rasters.
-            //---
-            ossim_uint8* ubuf = new ossim_uint8[512];
-            is.read((char*)ubuf, 512);
-            for (int i = 0; i < 512; ++i)
-            {
-               if (ubuf[i] > 0x7f)
-               {
-                  result = false;
-                  break;
-               }
-            }
-            delete [] ubuf;
-            ubuf = 0;
-            is.close();
-         }
-         else
-         {
-            result = false;
-         }
-      }
-      
-   } // matches:  if ( file.exists() )
-
-   return result;
-}
-
-bool
-ossimDemUtil::getRecord(istream& s, string& strbuf, long reclength)
-{
-   char* buf = new char[reclength + 1];
-
-   bool flag = ossimDemUtil::getRecord(s,buf,reclength);
-   if (flag == true)
-      strbuf = buf;
-
-   delete [] buf;
-
-   return flag;
-}
-
-bool
-ossimDemUtil::getRecord(istream& s, char* buf, long reclength)
-{
-   // buf is assumed to be at least reclength+1 in size.
-
-   if (!s)
-      return false;
-
-   long curpos = 0;
-   buf[curpos] = s.get();
-   while ((buf[curpos] != EOF) && 
-          (buf[curpos] != '\n') &&
-          (curpos < reclength-1))
-   {
-      curpos++;
-      buf[curpos] = s.get();
-   }
-   buf[curpos] = '\0';
-
-   if (s.peek() == '\n')
-      s.get();
-
-   return true;
-
-}
-
-bool
-ossimDemUtil::getDouble(string const& strbuf,
-                   long const startpos,
-                   long const width,
-                   double& val)
-{
-   if ((startpos + width - 1) > (long)(strbuf.length()))
-      return false;
-
-   // Convert FORTRAN 'D' exponent indicator to 'E'.
-   string tempbuf(strbuf.substr(startpos,width));
-   for (unsigned int i = 0; i < tempbuf.length(); i++)
-      if (tempbuf[i] == 'D')
-         tempbuf[i] = 'E';
-
-   val = atof(tempbuf.c_str());
-   return true;
-}
diff --git a/src/ossim/support_data/ossimDoqq.cpp b/src/ossim/support_data/ossimDoqq.cpp
deleted file mode 100644
index fce4374..0000000
--- a/src/ossim/support_data/ossimDoqq.cpp
+++ /dev/null
@@ -1,437 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Ken Melero
-// 
-// Description: This class parses a Digital Ortho Quarter Quad (DOQQ)
-//              header.
-//
-//********************************************************************
-// $Id: ossimDoqq.cpp 19900 2011-08-04 14:19:57Z dburken $
-
-#include <string.h>
-#include <ossim/support_data/ossimDoqq.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimNotifyContext.h>
-
-static ossimTrace traceDebug("ossimDoqq:debug");
-
-//**************************************************************************
-// CONSTRUCTOR
-//**************************************************************************
-ossimDoqq::ossimDoqq()
-   :  theErrorStatus(OSSIM_ERROR)
-{
-}
-
-//**************************************************************************
-// CONSTRUCTOR
-//**************************************************************************
-ossimDoqq::ossimDoqq(ossimFilename file)
-   :  theErrorStatus(OSSIM_ERROR)
-{
-   open(file);
-   theDoqFile.close();
-}
-
-//**************************************************************************
-// Opens the DOQ header and parses info.
-//**************************************************************************
-bool ossimDoqq::open(const ossimFilename& file)
-{
-   // Assume all kosher:
-   theErrorStatus = OSSIM_OK;
-
-   // Check first line of header to determine which version to parse.
-   if (theDoqFile.is_open())
-      theDoqFile.close();
-
-   theDoqFile.open(file.c_str(), std::ios::in);
-   char header[23];
-   theDoqFile.seekg(0, std::ios::beg);
-   theDoqFile.get(header, 22);
-   header[22] = '\0';
-   if(strcmp((const char*)header, "BEGIN_USGS_DOQ_HEADER") == 0)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimDoqq::ossimDoqq Loading DOQ version 2 header..."
-            << std::endl;
-      }
-
-      ldstr_v2(theDoqFile);
-   }
-   else
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimDoqq::ossimDoqq  Loading DOQ version 1 header..."
-            << std::endl;
-      }
-
-      ldstr_v1(theDoqFile);
-   }
-
-   // Check for error.
-   if(theErrorStatus)
-      return false;
-   return true;
-}
-
-ossimDoqq::~ossimDoqq()
-{
-}
-
-void ossimDoqq::ldstr_v2(std::istream& in)
-{
-   static const char MODULE[] = "ossimDoqq::ldstr_v2(istream& in)";
-
-   if (!in)
-   {
-      theErrorStatus = OSSIM_ERROR;
-      return;
-   }
-
-   char line[100];
-   char dum1[30];
-   char dum2[30];
-   char dum3[30];
-   char dum4[30];
-
-   while((!strncmp(line, "END_USGS_HEADER", 15) == 0)&&
-			(in.good()))
-   {
-      // Read in one line of header at a time.
-      in.getline(line, 100);
-      
-      if(strncmp(line, "SAMPLES_AND_LINES", 17) == 0)
-      {
-         sscanf(line, "%s %s %s", dum1, dum2, dum3);
-         theLine = atoi(dum3);
-         theSample = atoi(dum2);
-      }
-
-      else if(strncmp(line, "HORIZONTAL_COORDINATE_SYSTEM", 28) == 0)
-      {
-         sscanf(line, "%s %s", dum1, dum2);
-         theProjection = dum2;
-      }
-      
-      else if(strncmp(line, "NW_QUAD_CORNER_XY", 17) == 0)
-      {         
-         sscanf(line, "%s %s %s", dum1, dum2, dum3);
-         
-         theUE = atof(dum2);
-         theUN = atof(dum3);
-      }
-      
-      else if(strncmp(line, "NE_QUAD_CORNER_XY", 17) == 0)
-      {
-         sscanf(line, "%s %s %s", dum1, dum2, dum3);
-         theLE = atof(dum2);
-         theLN = atof(dum3);
-      }
-
-      else if(strncmp(line, "COORDINATE_ZONE", 15) == 0)
-      {
-         sscanf(line, "%s %s", dum1, dum2);
-         theUtmZone = atoi(dum2);
-      }
-
-      else if(strncmp(line, "SOURCE_IMAGE_DATE", 17) == 0)
-      {
-         sscanf(line, "%s %s %s %s", dum1, dum2, dum3, dum4);
-         theAcqYear  = ossimString(dum2);
-         theAcqMonth = ossimString(dum3);
-         theAcqDay   = ossimString(dum4);
-      }
-
-      else if((strncmp(line, "XY_ORIGIN", 9) == 0))
-      {
-         sscanf(line, "%s %s %s", dum1, dum2, dum3);
-         theEasting = atof(dum2);
-         theNorthing = atof(dum3);        
-      }
-
-      else if((strncmp(line, "HORIZONTAL_DATUM", 16) == 0) && theDatum.empty())
-      {
-         ossimString datum;         
-         sscanf(line, "%s %s", dum1, dum2);
-         datum = dum2; 
-         
-         if(datum.contains("NAD27"))
-            theDatum = "NAD";
-         else
-            theDatum = "NAR";
-      }
-
-      else if(strncmp(line, "BYTE_COUNT", 10) == 0)
-      {
-         ossimString header;         
-         sscanf(line, "%s %s", dum1, dum2);
-         header = dum2;
-         
-         theHeaderSize = atoi(header.chars());
-      }
-
-      else if(strncmp(line, "BAND_CONTENT", 12) == 0)
-      {
-         ossimString rgbType;        
-         sscanf(line, "%s %s", dum1, dum2);
-         rgbType = dum2;
-
-         if(rgbType.contains("BLACK&WHITE"))
-            theRgb = 1;
-         else
-            theRgb = 3;
-      }
-
-      else if(strncmp(line, "HORIZONTAL_RESOLUTION", 21) == 0)
-      {
-         ossimString gsd;
-         sscanf(line, "%s %s", dum1, dum2);
-         gsd = dum2;
-
-         theGsd.x = gsd.toDouble();
-         theGsd.y = gsd.toDouble();
-      }
-
-      else if(strncmp(line, "QUADRANGLE_NAME", 15) == 0)
-      {
-         sscanf(line, "%s %29c", dum1, dum2);
-         dum2[29] = 0;
-         theQuadName = dum2;
-      }
-
-      else if(strncmp(line, "QUADRANT", 8) == 0)
-      {
-         sscanf(line, "%s %s", dum1, dum2);
-         theQuad = dum2;
-      }
-
-      else if(strncmp(line, "NATION", 6) == 0)
-      {
-         sscanf(line, "%s %s", dum1, dum2);
-         theNation = dum2;
-      }
-
-      else if(strncmp(line, "STATE", 5) == 0)
-      {
-         sscanf(line, "%s %s", dum1, dum2);
-         theState = dum2;
-      }
-
-      else if(strncmp(line, "RMSE_XY", 7) == 0)
-      {
-         sscanf(line, "%s %s", dum1, dum2);
-         theRMSE = ossimString(dum2).toDouble();
-      }
-
-      else if(strncmp(line, "IMAGE_SOURCE", 12) == 0)
-      {
-         sscanf(line, "%s %29c", dum1, dum2);
-         dum2[29] = 0;
-         theImageSource = dum2;
-      }
-
-      else if(strncmp(line, "SOURCE_IMAGE_ID", 15) == 0)
-      {
-         sscanf(line, "%s %29c", dum1, dum2);
-         dum2[29] = 0;
-         theSourceImageID = dum2;
-      }
-   }
-
-	if (!in.good())
-	{
-      theErrorStatus = OSSIM_ERROR;
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-			<< MODULE << " ERROR:\n"
-			<< "\tHeader stream is bad."
-			<< std::endl;
-      }
-		return;
-	}
-
-   // Check for valid lines and samples and header size.
-   if(theLine <= 0 || theSample <= 0 || theHeaderSize <= 0)
-   {
-      theErrorStatus = OSSIM_ERROR;
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << MODULE << " ERROR:\n"
-            << "\tInvalid lines or samples or header size."
-            << std::endl;
-      }
-      return;
-   }
-
-   // Assign concatenated acquisition date:
-   theAcqYearMonthDay = theAcqYear;
-   theAcqYearMonthDay += "-";
-   theAcqYearMonthDay += theAcqMonth;
-   theAcqYearMonthDay += "-";
-   theAcqYearMonthDay += theAcqDay;
-
-}
-
-void ossimDoqq::ldstr_v1(std::istream& in)
-{
-   static const char MODULE[] = "ossimDoqq::ldstr_v1(istream& in)";
-
-   if (!in)
-   {
-      theErrorStatus = OSSIM_ERROR;
-      return;
-   }
-
-   char tmp1[DATA_ORDER_SIZE+1];
-   in.seekg(DATA_ORDER_OFFSET, std::ios::beg);
-   in.get(tmp1, DATA_ORDER_SIZE+1);
-   theDataOrder = tmp1;
-
-   //***
-   // Perform a sanity check on the data order just in case this isn't a
-   // ossimDoqq file.
-   //***  
-   tmp1[DATA_ORDER_SIZE] = '\0';
-   int data_order = atoi(tmp1);
-   if ( (data_order != 1) && (data_order != 2) )
-   {
-      theErrorStatus = OSSIM_ERROR;
-
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << MODULE << " NOTICE:\n"
-            << "Invalid data ordering.  Not a doq?" << std::endl;
-      }
-   }
-   
-   char tmp2[LINE_SIZE+1];
-   in.seekg(LINE_OFFSET, std::ios::beg);
-   in.get(tmp2, LINE_SIZE+1);
-   theLine = atoi(tmp2);
-
-   char tmp3[SAMPLE_SIZE+1];
-   in.seekg(SAMPLE_OFFSET,std::ios::beg);
-   in.get(tmp3, SAMPLE_SIZE+1); 
-   theSample = atoi(tmp3);
-
-   // Check for valid lines and samples.
-   if (theLine <= 0 || theSample <= 0)
-   {
-      theErrorStatus = OSSIM_ERROR;
-
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << MODULE << " ERROR:\n"
-            << "\tInvalid lines or samples."
-            << std::endl;
-      }
-      
-      return;
-   }
-   
-   char tmp4[PROJECTION_SIZE+1];
-   in.seekg(PROJECTION_OFFSET, std::ios::beg);
-   in.get(tmp4, PROJECTION_SIZE+1);
-   theProjection = tmp4;
-
-   char tmp5[UTM_ZONE_SIZE+1];
-   in.seekg(UTM_ZONE_OFFSET, std::ios::beg);
-   in.get(tmp5, UTM_ZONE_SIZE+1);
-   theUtmZone = atoi(tmp5);
-
-   char tmp8[DATUM_SIZE+1];
-   in.seekg(DATUM_OFFSET, std::ios::beg);
-   in.get(tmp8, DATUM_SIZE+1);
-   theDatum = tmp8;
-
-   char rgbType[RGB_SIZE+1];
-   in.seekg(RGB_OFFSET, std::ios::beg);
-   in.get(rgbType, RGB_SIZE+1);
-
-
-   if(atoi(rgbType) == 5)
-   {
-      theRgb = 3;
-   }
-   else
-   {
-      theRgb = 1;
-   }
-   
-   theHeaderSize = (theSample * theRgb * 4);
-
-   // Calculate the size of each record.
-   theRecordSize = (theSample * theRgb);
-
-   char tmp6[UL_EASTING_SIZE+1];
-   in.seekg( (theRecordSize * 2) + UL_EASTING_OFFSET, std::ios::beg);
-   in.get(tmp6, UL_EASTING_SIZE+1);
-
-   char tmp7[UL_NORTHING_SIZE+1];
-   in.seekg( (theRecordSize * 2) + UL_NORTHING_OFFSET, std::ios::beg);
-   in.get(tmp7, UL_NORTHING_SIZE+1);
-   
-   // Get Easting and Northing.
-   theEasting = convertStr(tmp6);
-   theNorthing = convertStr(tmp7);
-
-   char tmp10[GSD_SIZE+1];
-   in.seekg( (theRecordSize*3) + GSD_X_OFFSET, std::ios::beg);
-   in.get(tmp10, GSD_SIZE+1);
-   theGsd.x = std::abs(ossimString(tmp10, tmp10+GSD_SIZE).toDouble());
-   in.seekg( (theRecordSize*3) + GSD_Y_OFFSET, std::ios::beg);
-   in.get(tmp10, GSD_SIZE+1);
-   theGsd.y = std::abs(ossimString(tmp10, tmp10+GSD_SIZE).toDouble());
-   
-}
-
-ossim_float64 ossimDoqq::convertStr(const char* str) const
-{
-   //***
-   // The USGS Projection Parameters in a OssimDoqq header have a "D" to
-   // denote the exponent.  This simply substitutes the "D" with an
-   // "E" so that atof works properly.
-   //***
-   ossimString tmp = str;
-   tmp.gsub("D", "E");
-   return tmp.toFloat64();
-}
-
-std::ostream& ossimDoqq::print(std::ostream& out) const
-{
-   const char* prefix = "doqq.";
-   out << prefix << "Quadrangle_Name: " << theQuadName << std::endl;
-   out << prefix << "Quadrant: " << theQuad << std::endl;
-   out << prefix << "Image_Source: " << theImageSource << std::endl;
-   out << prefix << "Source_Image_ID: " << theSourceImageID << std::endl;
-   out << prefix << "RMSE_XY: " << theRMSE << std::endl;
-   out << prefix << "Line: " << theLine << std::endl;
-   out << prefix << "Sample: " << theSample << std::endl;
-   out << prefix << "Projection: " << theProjection << std::endl;
-   out << prefix << "Datum: " << theDatum << std::endl;
-   out << prefix << "Easting: " << theEasting << std::endl;
-   out << prefix << "Northing: " << theNorthing << std::endl;
-   out << prefix << "UN: " << theUN << std::endl;
-   out << prefix << "UE: " << theUE << std::endl;
-   out << prefix << "LN: " << theLN << std::endl;
-   out << prefix << "LE: " << theLE << std::endl;
-   out << prefix << "GSD: " << theGsd << std::endl;
-   out << prefix << "Band: " << theRgb << std::endl;
-   out << prefix << "Utm_Zone: " << theUtmZone << std::endl;
-   
-   return out;
-}
diff --git a/src/ossim/support_data/ossimDtedAcc.cpp b/src/ossim/support_data/ossimDtedAcc.cpp
deleted file mode 100644
index be95b78..0000000
--- a/src/ossim/support_data/ossimDtedAcc.cpp
+++ /dev/null
@@ -1,285 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Ken Melero
-// 
-// Description:  This class gives access to the Accuracy Description
-//               (ACC) of a DTED Level 1 file.
-//
-//********************************************************************
-// $Id: ossimDtedAcc.cpp 17206 2010-04-25 23:20:40Z dburken $
-
-#include <cstdlib>
-#include <iostream>
-#include <iomanip>
-#include <fstream>
-#include <string>
-
-#include <ossim/support_data/ossimDtedAcc.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimProperty.h>
-#include <ossim/base/ossimStringProperty.h>
-
-//**************************************************************************
-// CONSTRUCTOR
-//**************************************************************************
-ossimDtedAcc::ossimDtedAcc(const ossimFilename& dted_file,
-                           ossim_int32 offset)
-{
-   if(!dted_file.empty())
-   {
-      theStartOffset = offset;
-      // Check to see that dted file exists. 
-      if(!dted_file.exists())
-      {
-         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-         ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimDtedAcc::ossimDtedAcc: The DTED file does not exist: " << dted_file << std::endl;
-         return;
-      }
-      
-      // Check to see that the dted file is readable.
-      if(!dted_file.isReadable())
-      {
-         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-         ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimDtedAcc::ossimDtedAcc: The DTED file is not readable: " << dted_file << std::endl;
-         return;
-      }
-      
-      // Open the dted file for reading.
-      std::ifstream in(dted_file.c_str());
-      if(!in)
-      {
-         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-         ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimDtedAcc::ossimDtedAcc: Can't open the DTED file: " << dted_file << std::endl;
-         return;
-      }
-      in.seekg(offset);
-      parse(in);
-   }
-   else
-   {
-      clearFields();
-   }
-}
-ossimDtedAcc::ossimDtedAcc(std::istream& in)
-{
-   parse(in);
-}
-
-void ossimDtedAcc::clearFields()
-{
-   memset(theRecSen, '\0', FIELD1_SIZE+1);
-   memset(theAbsoluteCE, '\0',FIELD2_SIZE+1);
-   memset(theAbsoluteLE, '\0',FIELD3_SIZE+1);
-   memset(theRelativeCE, '\0',FIELD4_SIZE+1);
-   memset(theRelativeLE, '\0',FIELD5_SIZE+1);
-   memset(theField6, '\0',FIELD6_SIZE+1);
-   memset(theField7, '\0',FIELD7_SIZE+1);
-   memset(theField8, '\0',FIELD8_SIZE+1);
-   memset(theField9, '\0',FIELD9_SIZE+1);
-   memset(theField10, '\0',FIELD10_SIZE+1);
-   memset(theField11, '\0',FIELD11_SIZE+1);
-   memset(theField12, '\0',FIELD12_SIZE+1);
-   memset(theField13, '\0',FIELD13_SIZE+1);
-   memset(theField14, '\0',FIELD14_SIZE+1);
-   memset(theField15, '\0',FIELD15_SIZE+1);
-   memset(theField16, '\0',FIELD16_SIZE+1);
-   memset(theField17, '\0',FIELD17_SIZE+1);
-   
-   theStartOffset = 0;
-   theStopOffset = 0;
-}
-//**************************************************************************
-// ossimDtedAcc::parse()
-//**************************************************************************
-void ossimDtedAcc::parse(std::istream& in)
-{
-   clearErrorStatus();
-	clearFields();
-	theStartOffset = in.tellg();
-   theStopOffset  = theStartOffset;
-   // Parse theRecSen
-   in.read(theRecSen, FIELD1_SIZE);
-   theRecSen[FIELD1_SIZE] = '\0';
-
-   if(!(strncmp(theRecSen, "ACC", 3) == 0))
-   {
-      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-      in.seekg(theStartOffset);
-      return;
-   }
-   
-   // Parse theAbsoluteCE
-   in.read(theAbsoluteCE, FIELD2_SIZE);
-   theAbsoluteCE[FIELD2_SIZE] = '\0';
-   
-   // Parse theAbsoluteLE
-   in.read(theAbsoluteLE, FIELD3_SIZE);
-   theAbsoluteLE[FIELD3_SIZE] = '\0';
-   
-   // Parse theRelativeCE
-   in.read(theRelativeCE, FIELD4_SIZE);
-   theRelativeCE[FIELD4_SIZE] = '\0';
-   
-   // Parse theRelativeLE
-   in.read(theRelativeLE, FIELD5_SIZE);
-   theRelativeLE[FIELD5_SIZE] = '\0';
-   
-   // Parse Field 6
-   in.read(theField6, FIELD6_SIZE);
-   theField6[FIELD6_SIZE] = '\0';
-   
-   // Parse Field 7
-   in.read(theField7, FIELD7_SIZE);
-   theField7[FIELD7_SIZE] = '\0';
-   
-   // Parse Field 8
-   in.read(theField8, FIELD8_SIZE);
-   theField8[FIELD8_SIZE] = '\0';
-   
-   // Parse Field 9
-   in.read(theField9, FIELD9_SIZE);
-   theField9[FIELD9_SIZE] = '\0';
-   
-   // Parse Field 10
-   in.read(theField10, FIELD10_SIZE);
-   theField10[FIELD10_SIZE] = '\0';
-   
-   // Parse Field 11
-   in.read(theField11, FIELD11_SIZE);
-   theField11[FIELD11_SIZE] = '\0';
-   
-   // Parse Field 12
-   in.read(theField12, FIELD12_SIZE);
-   theField12[FIELD12_SIZE] = '\0';
-   
-   // Parse Field 13
-   in.read(theField13, FIELD13_SIZE);
-   theField13[FIELD13_SIZE] = '\0';
-   
-   // Parse Field 14
-   in.read(theField14, FIELD14_SIZE);
-   theField14[FIELD14_SIZE] = '\0';
-   
-   // Parse Field 15
-   in.read(theField15, FIELD15_SIZE);
-   theField15[FIELD15_SIZE] = '\0';
-   
-   // Parse Field 16
-   in.read(theField16, FIELD16_SIZE);
-   theField16[FIELD16_SIZE] = '\0';
-   
-   // Parse Field 17
-   in.read(theField17, FIELD17_SIZE);
-   theField17[FIELD17_SIZE] = '\0';
-
-   in.ignore(FIELD18_SIZE);
-   // Set the stop offset.
-   theStopOffset = theStartOffset + ACC_LENGTH;
-}
-
-ossimRefPtr<ossimProperty> ossimDtedAcc::getProperty(
-   const ossimString& name) const
-{
-   ossimRefPtr<ossimProperty> result = 0;
-   if (name == "recognition_sentinel")
-   {
-      result = new ossimStringProperty(name, theRecSen);
-      
-   }
-   else if (name == "absolute_ce")
-   {
-      result = new ossimStringProperty(name, theAbsoluteCE);
-   }
-   else if (name == "absolute_le")
-   {
-      result = new ossimStringProperty(name, theAbsoluteLE); 
-   }
-   else if (name == "relative_ce")
-   {
-      result = new ossimStringProperty(name, theRelativeCE);
-   }
-   else if (name == "relative_le")
-   {
-      result = new ossimStringProperty(name, theRelativeLE);
-   }
-   return result;
-}
-
-void ossimDtedAcc::getPropertyNames(
-   std::vector<ossimString>& propertyNames) const
-{
-   propertyNames.push_back(ossimString("recognition_sentinel"));
-   propertyNames.push_back(ossimString("absolute_ce"));
-   propertyNames.push_back(ossimString("absolute_le"));
-   propertyNames.push_back(ossimString("relative_ce"));
-   propertyNames.push_back(ossimString("relative_le"));
-}
-
-std::ostream& ossimDtedAcc::print(std::ostream& out,
-                                  const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += "acc.";
-
-   out << setiosflags(ios::left)
-       << pfx << setw(28) << "recognition_sentinel:" << theRecSen << "\n"
-       << pfx << setw(28) << "absolute_ce:"  << theAbsoluteCE << "\n"
-       << pfx << setw(28) << "absolute_le:"  << theAbsoluteLE << "\n"
-       << pfx << setw(28) << "relative ce:"  << theRelativeCE << "\n"
-       << pfx << setw(28) << "relative le:"  << theRelativeLE << "\n"
-       << pfx << setw(28) << "start_offset:" << theStartOffset << "\n"
-       << pfx << setw(28) << "stop_offset:"  << theStopOffset
-       << std::endl;
-   return out;
-}
-
-ossim_int32 ossimDtedAcc::absCE() const
-{
-   return (theAbsoluteCE ? atoi(theAbsoluteCE) : 0);
-}
-
-ossim_int32 ossimDtedAcc::absLE() const
-{
-   return (theAbsoluteLE ? atoi(theAbsoluteLE) : 0);
-}
-
-ossim_int32 ossimDtedAcc::relCE() const
-{
-   return (theRelativeCE ? atoi(theRelativeCE) : 0);
-}
-
-ossim_int32 ossimDtedAcc::relLE() const
-{
-   return (theRelativeLE ? atoi(theRelativeLE) : 0);
-}
-   
-ossim_int32 ossimDtedAcc::startOffset() const
-{
-   return theStartOffset;
-}
-
-ossim_int32 ossimDtedAcc::stopOffset()  const
-{
-   return theStopOffset;
-}
-
-
-
-//**************************************************************************
-// operator <<
-//**************************************************************************
-std::ostream& operator<<( std::ostream& os, const ossimDtedAcc& acc)
-{
-   std::string prefix;
-   return acc.print(os, prefix);
-}
-
-ossimDtedAcc::ossimDtedAcc(const ossimDtedAcc& /* source */)
-{}
-
-const ossimDtedAcc& ossimDtedAcc::operator=(const ossimDtedAcc& rhs)
-{
-   return rhs;
-}
diff --git a/src/ossim/support_data/ossimDtedDsi.cpp b/src/ossim/support_data/ossimDtedDsi.cpp
deleted file mode 100644
index 46e54b8..0000000
--- a/src/ossim/support_data/ossimDtedDsi.cpp
+++ /dev/null
@@ -1,586 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Ken Melero
-// 
-// Description:  This class gives access to the Data Set Identification
-//               (DSI) of a DTED Level 1 file.
-//
-//********************************************************************
-// $Id: ossimDtedDsi.cpp 17206 2010-04-25 23:20:40Z dburken $
-
-#include <cstdlib>
-#include <iostream>
-#include <iomanip>
-#include <fstream>
-#include <string>
-
-#include <ossim/support_data/ossimDtedDsi.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimProperty.h>
-
-//**************************************************************************
-// CONSTRUCTOR
-//**************************************************************************
-ossimDtedDsi::ossimDtedDsi(const ossimFilename& dted_file, ossim_int32 offset)
-   :
-      theRecSen(),
-      theSecurityCode(),
-      theField3(),
-      theField4(),
-      theProductLevel(),
-      theField7(),
-      theField8(),
-      theEdition(),
-      theMatchMergeVersion(),
-      theMaintenanceDate(),
-      theMatchMergeDate(),
-      theMaintenanceCode(),
-      theProducerCode(),
-      theField15(),
-      theProductStockSpecNumber(),
-      theProductSpecNumber(),
-      theProductSpecDate(),
-      theVerticalDatum(),
-      theHorizontalDatum(),
-      theField21(),
-      theCompilationDate(),
-      theField23(),
-      theLatOrigin(),
-      theLonOrigin(),
-      theLatSW(),
-      theLonSW(),
-      theLatNW(),
-      theLonNW(),
-      theLatNE(),
-      theLonNE(),
-      theLatSE(),
-      theLonSE(),
-      theOrientation(),
-      theLatInterval(),
-      theLonInterval(),
-      theNumLatPoints(),
-      theNumLonLines(),
-      theCellIndicator(),
-      theField40(),
-      theField41(),
-      theField42(),
-      theStartOffset(0),
-      theStopOffset(0)
-{
-   if(!dted_file.empty())
-   {
-      // Check to see that dted file exists.
-      if(!dted_file.exists())
-      {
-         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedDsi::ossimDtedDsi: \nThe DTED file does not exist: " << dted_file << std::endl;
-         return;
-      }
-      
-      // Check to see that the dted file is readable.
-      if(!dted_file.isReadable())
-      {
-         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedDsi::ossimDtedDsi: The DTED file is not readable: " << dted_file << std::endl;
-         return;
-      }
-      
-      // Open the dted file for reading.
-      std::ifstream in(dted_file.c_str());
-      if(!in)
-      {
-         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedDsi::ossimDtedDsi: Unable to open the DTED file: " << dted_file << std::endl;
-         return;
-      }
-      in.seekg(offset);
-      parse(in);
-      
-      in.close();
-   }
-}
-
-//**************************************************************************
-// CONSTRUCTOR
-//**************************************************************************
-ossimDtedDsi::ossimDtedDsi(std::istream&  in)
-   :
-      theRecSen(),
-      theSecurityCode(),
-      theField3(),
-      theField4(),
-      theProductLevel(),
-      theField7(),
-      theField8(),
-      theEdition(),
-      theMatchMergeVersion(),
-      theMaintenanceDate(),
-      theMatchMergeDate(),
-      theMaintenanceCode(),
-      theProducerCode(),
-      theField15(),
-      theProductStockSpecNumber(),
-      theProductSpecNumber(),
-      theProductSpecDate(),
-      theVerticalDatum(),
-      theHorizontalDatum(),
-      theField21(),
-      theCompilationDate(),
-      theField23(),
-      theLatOrigin(),
-      theLonOrigin(),
-      theLatSW(),
-      theLonSW(),
-      theLatNW(),
-      theLonNW(),
-      theLatNE(),
-      theLonNE(),
-      theLatSE(),
-      theLonSE(),
-      theOrientation(),
-      theLatInterval(),
-      theLonInterval(),
-      theNumLatPoints(),
-      theNumLonLines(),
-      theCellIndicator(),
-      theField40(),
-      theField41(),
-      theField42(),
-      theStartOffset(0),
-      theStopOffset(0)
-{
-   parse(in);
-}
-
-void ossimDtedDsi::parse(std::istream& in)
-{
-   clearErrorStatus();
-   theStartOffset = in.tellg();
-   theStopOffset  = theStartOffset;
-   char tmp_chars[26]; // For blank field reads.
-   
-   // Seek to the start of the record.
-   in.seekg(theStartOffset, std::ios::beg);
-   
-   // Parse theRecSen
-   in.read(theRecSen, FIELD1_SIZE);
-   theRecSen[FIELD1_SIZE] = '\0';
-   if(!(strncmp(theRecSen, "DSI", 3) == 0))
-   {
-      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-      in.seekg(theStartOffset);
-      return;
-   }
-
-   // Parse theSecurityCode
-   in.read(theSecurityCode, FIELD2_SIZE);
-   theSecurityCode[FIELD2_SIZE] = '\0';
-   
-   // Parse Field 3
-   in.read(theField3, FIELD3_SIZE);
-   theField3[FIELD3_SIZE] = '\0';
-   
-   // Parse Field 4
-   in.read(theField4, FIELD4_SIZE);
-   theField4[FIELD4_SIZE] = '\0';
-   
-   // Parse Field 5 (currently blank)
-   in.read(tmp_chars, FIELD5_SIZE);
-   
-   // Parse theProductLevel
-   in.read(theProductLevel, FIELD6_SIZE);
-   theProductLevel[FIELD6_SIZE] = '\0';
-   
-   // Parse Field 7
-   in.read(theField7, FIELD7_SIZE);
-   theField7[FIELD7_SIZE] = '\0';
-   
-   // Parse Field 8
-   in.read(theField8, FIELD8_SIZE);
-   theField8[FIELD8_SIZE] = '\0';
-   
-   // Parse theEdition
-   in.read(theEdition, FIELD9_SIZE);
-   theEdition[FIELD9_SIZE] = '\0';
-   
-   // Parse theMatchMergeVersion
-   in.read(theMatchMergeVersion, FIELD10_SIZE);
-   theMatchMergeVersion[FIELD10_SIZE] = '\0';
-   
-   // Parse theMaintenanceDate
-   in.read(theMaintenanceDate, FIELD11_SIZE);
-   theMaintenanceDate[FIELD11_SIZE] = '\0';
-   
-   // Parse theMatchMergeDate
-   in.read(theMatchMergeDate, FIELD12_SIZE);
-   theMatchMergeDate[FIELD12_SIZE] = '\0';
-   
-   // Parse theMaintenanceCode
-   in.read(theMaintenanceCode, FIELD13_SIZE);
-   theMaintenanceCode[FIELD13_SIZE] = '\0';
-   
-   // Parse theProducerCode
-   in.read(theProducerCode, FIELD14_SIZE);
-   theProducerCode[FIELD14_SIZE] = '\0';
-   
-   // Parse Field 15
-   in.read(theField15, FIELD15_SIZE);
-   theField15[FIELD15_SIZE] = '\0';
-   
-   // Parse theProductStockSpecNumber
-   in.read(theProductStockSpecNumber, FIELD16_SIZE);
-   theProductStockSpecNumber[FIELD16_SIZE] = '\0';
-   
-   // Parse theProductSpecNumber
-   in.read(theProductSpecNumber, FIELD17_SIZE);
-   theProductSpecNumber[FIELD17_SIZE] = '\0';
-   
-   // Parse theProductSpecDate
-   in.read(theProductSpecDate, FIELD18_SIZE);
-   theProductSpecDate[FIELD18_SIZE] = '\0';
-   
-   // Parse theVerticalDatum
-   in.read(theVerticalDatum, FIELD19_SIZE);
-   theVerticalDatum[FIELD19_SIZE] = '\0';
-   
-   // Parse theHorizontalDatum
-   in.read(theHorizontalDatum, FIELD20_SIZE);
-   theHorizontalDatum[FIELD20_SIZE] = '\0';
-   
-   // Parse Field 21
-   in.read(theField21, FIELD21_SIZE);
-   theField21[FIELD21_SIZE] = '\0';
-   
-   // Parse theCompilationDate
-   in.read(theCompilationDate, FIELD22_SIZE);
-   theCompilationDate[FIELD22_SIZE] = '\0';
-   
-   // Parse Field 23
-   in.read(theField23, FIELD23_SIZE);
-   theField23[FIELD23_SIZE] = '\0';
-   
-   // Parse theLatOrigin
-   in.read(theLatOrigin, FIELD24_SIZE);
-   theLatOrigin[FIELD24_SIZE] = '\0';
-   
-   // Parse theLonOrigin
-   in.read(theLonOrigin, FIELD25_SIZE);
-   theLonOrigin[FIELD25_SIZE] = '\0';
-   
-   // Parse theLatSW
-   in.read(theLatSW, FIELD26_SIZE);
-   theLatSW[FIELD26_SIZE] = '\0';
-   
-   // Parse theLonSW
-   in.read(theLonSW, FIELD27_SIZE);
-   theLonSW[FIELD27_SIZE] = '\0';
-   
-   // Parse theLatNW
-   in.read(theLatNW, FIELD28_SIZE);
-   theLatNW[FIELD28_SIZE] = '\0';
-   
-   // Parse theLonNW
-   in.read(theLonNW, FIELD29_SIZE);
-   theLonNW[FIELD29_SIZE] = '\0';
-   
-   // Parse theLatNE
-   in.read(theLatNE, FIELD30_SIZE);
-   theLatNE[FIELD30_SIZE] = '\0';
-   
-   // Parse theLonNE
-   in.read(theLonNE, FIELD31_SIZE);
-   theLonNE[FIELD31_SIZE] = '\0';
-   
-   // Parse theLatSE
-   in.read(theLatSE, FIELD32_SIZE);
-   theLatSE[FIELD32_SIZE] = '\0';
-   
-   // Parse theLonSE
-   in.read(theLonSE, FIELD33_SIZE);
-   theLonSE[FIELD33_SIZE] = '\0';
-   
-   // Parse theOrientation
-   in.read(theOrientation, FIELD34_SIZE);
-   theOrientation[FIELD34_SIZE] = '\0';
-   
-   // Parse theLatInterval
-   in.read(theLatInterval, FIELD35_SIZE);
-   theLatInterval[FIELD35_SIZE] = '\0';
-   
-   // Parse theLonInterval
-   in.read(theLonInterval, FIELD36_SIZE);
-   theLonInterval[FIELD36_SIZE] = '\0';
-   
-   // Parse theNumLatPoints
-   in.read(theNumLatPoints, FIELD37_SIZE);
-   theNumLatPoints[FIELD37_SIZE] = '\0';
-   
-   // Parse theNumLonLines
-   in.read(theNumLonLines, FIELD38_SIZE);
-   theNumLonLines[FIELD38_SIZE] = '\0';
-   
-   // Parse theCellIndicator
-   in.read(theCellIndicator, FIELD39_SIZE);
-   theCellIndicator[FIELD39_SIZE] = '\0';
-   
-   // Parse Field 40
-   in.read(theField40, FIELD40_SIZE);
-   theField40[FIELD40_SIZE] = '\0';
-   
-   // Parse Field 41
-   in.read(theField41, FIELD41_SIZE);
-   theField41[FIELD41_SIZE] = '\0';
-   
-   // Parse Field 42
-   in.read(theField42, FIELD42_SIZE);
-   theField42[FIELD42_SIZE] = '\0';
-
-   // Set the stop offset.
-   theStopOffset = theStartOffset + DSI_LENGTH;
-}
-
-ossimRefPtr<ossimProperty> ossimDtedDsi::getProperty(
-   const ossimString& /* name */) const
-{
-   ossimRefPtr<ossimProperty> result = 0;
-   return result;
-}
-
-void ossimDtedDsi::getPropertyNames(
-   std::vector<ossimString>& propertyNames) const
-{
-   propertyNames.push_back(ossimString("dted_dsi_record"));
-}
-
-ossimString ossimDtedDsi::recognitionSentinel() const
-{
-   return theRecSen;
-}
-
-ossimString ossimDtedDsi::securityCode() const
-{
-   return ossimString(theSecurityCode);
-}
-
-ossimString ossimDtedDsi::productLevel() const
-{
-   return ossimString(theProductLevel);
-}
-
-ossimString ossimDtedDsi::edition() const
-{
-   return ossimString(theEdition);
-}
-
-ossimString ossimDtedDsi::matchMergeVersion() const
-{
-   return ossimString(theMatchMergeVersion);
-}
-
-ossimString ossimDtedDsi::maintanenceDate() const
-{
-   return ossimString(theMaintenanceDate);
-}
-
-ossimString ossimDtedDsi::matchMergeDate() const
-{
-   return ossimString(theMatchMergeDate);
-}
-
-ossimString ossimDtedDsi::maintenanceCode() const
-{
-   return ossimString(theMaintenanceCode);
-}
-
-ossimString ossimDtedDsi::producerCode() const
-{
-   return ossimString(theProducerCode);
-}
-
-ossimString ossimDtedDsi::productStockSpecNumber() const
-{
-   return ossimString(theProductStockSpecNumber);
-}
-
-ossimString ossimDtedDsi::productSpecNumber() const
-{
-   return ossimString(theProductSpecNumber);
-}
-
-ossimString ossimDtedDsi::productSpecDate() const
-{
-   return ossimString(theProductSpecDate);
-}
-
-ossimString ossimDtedDsi::verticalDatum() const
-{
-   return ossimString(theVerticalDatum);
-}
-
-ossimString ossimDtedDsi::horizontalDatum() const
-{
-   return ossimString(theHorizontalDatum);
-}
-
-ossimString ossimDtedDsi::compilationDate() const
-{
-   return ossimString(theCompilationDate);
-}
-
-ossimString ossimDtedDsi::latOrigin() const
-{
-   return ossimString(theLatOrigin);
-}
-
-ossimString ossimDtedDsi::lonOrigin() const
-{
-   return ossimString(theLonOrigin);
-}
-
-ossimString ossimDtedDsi::latSW() const
-{
-   return ossimString(theLatSW);
-}
-
-ossimString ossimDtedDsi::lonSW() const
-{
-   return ossimString(theLonSW);
-}
-
-ossimString ossimDtedDsi::latNW() const
-{
-   return ossimString(theLatNW);
-}
-
-ossimString ossimDtedDsi::lonNW() const
-{
-   return ossimString(theLonNW);
-}
-
-ossimString ossimDtedDsi::latNE() const
-{
-   return ossimString(theLatNE);
-}
-
-ossimString ossimDtedDsi::lonNE() const
-{
-   return ossimString(theLonNE);
-}
-
-ossimString ossimDtedDsi::latSE() const
-{
-   return ossimString(theLatSE);
-}
-
-ossimString ossimDtedDsi::lonSE() const
-{
-   return ossimString(theLonSE);
-}
-
-ossimString ossimDtedDsi::orientation() const
-{
-   return ossimString(theOrientation);
-}
-
-ossimString ossimDtedDsi::latInterval() const
-{
-   return ossimString(theLatInterval);
-}
-
-ossimString ossimDtedDsi::lonInterval() const
-{
-   return ossimString(theLonInterval);
-}
-
-ossim_int32  ossimDtedDsi::numLatPoints() const
-{
-   return (theNumLatPoints ? atoi(theNumLatPoints) : 0);
-}
-
-ossim_int32  ossimDtedDsi::numLonLines() const
-{
-   return (theNumLonLines ? atoi(theNumLonLines) : 0);
-}
-
-ossim_int32  ossimDtedDsi::cellIndicator() const
-{
-   return (theCellIndicator ? atoi(theCellIndicator) : 0);
-}
-
-ossim_int32 ossimDtedDsi::startOffset() const
-{
-   return theStartOffset;
-}
-ossim_int32 ossimDtedDsi::stopOffset() const
-{
-   return theStopOffset;
-}
-
-
-//**************************************************************************
-// operator <<
-//**************************************************************************
-std::ostream& operator<<( std::ostream& os, const ossimDtedDsi& dsi)
-{
-   std::string prefix;
-   return dsi.print(os, prefix);
-}
-
-std::ostream& ossimDtedDsi::print(std::ostream& out,
-                                  const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += "dsi.";
-   
-   out << setiosflags(ios::left)
-       << pfx << setw(28) << "recognition_sentinel:" << theRecSen << "\n"
-       << pfx << setw(28) << "security_code:" << theSecurityCode << "\n"
-       << pfx << setw(28) << "product_level:" << theProductLevel << "\n"
-       << pfx << setw(28) << "edition:" << theEdition << "\n"
-       << pfx << setw(28) << "match_merge_version:" << theMatchMergeVersion
-       << "\n"
-       << pfx << setw(28) << "maintenance_date:" << theMaintenanceDate << "\n"
-       << pfx << setw(28) << "match_merge_date:" << theMatchMergeDate << "\n"
-       << pfx << setw(28) << "maintenance_code:" << theMaintenanceCode << "\n"
-       << pfx << setw(28) << "producer_code:" << theProducerCode << "\n"
-       << pfx << setw(28) << "product_stock_spec_number:"
-       << theProductStockSpecNumber
-       << "\n"
-       << pfx << setw(28) << "product_spec_number:"
-       << theProductSpecNumber << "\n"
-       << pfx << setw(28) << "vertical_datum:" << theVerticalDatum << "\n"
-       << pfx << setw(28) << "horizontal_datum:" << theHorizontalDatum << "\n"
-       << pfx << setw(28) << "compilation_date:" << theCompilationDate << "\n"
-       << pfx << setw(28) << "lat_origin:" << theLatOrigin << "\n"
-       << pfx << setw(28) << "lon_origin:" << theLonOrigin << "\n"
-       << pfx << setw(28) << "lat_sw:" << theLatSW << "\n"
-       << pfx << setw(28) << "lon_sw:" << theLonSW << "\n"
-       << pfx << setw(28) << "lat_nw:" << theLatNW << "\n"
-       << pfx << setw(28) << "lon_nw:" << theLonNW << "\n"
-       << pfx << setw(28) << "lat_ne:" << theLatNE << "\n"
-       << pfx << setw(28) << "lon_ne:" << theLonNE << "\n"
-       << pfx << setw(28) << "lat_se:" << theLatSE << "\n"
-       << pfx << setw(28) << "lon_se:" << theLonSE << "\n"
-       << pfx << setw(28) << "orientation:" << theOrientation << "\n"
-       << pfx << setw(28) << "lat_interval:" << theLatInterval << "\n"
-       << pfx << setw(28) << "lon_interval:" << theLonInterval << "\n"
-       << pfx << setw(28) << "number_of_lat_points:" << theNumLatPoints << "\n"
-       << pfx << setw(28) << "number_of_lon_lines:" << theNumLonLines << "\n"
-       << pfx << setw(28) << "cell_indicator:" << theCellIndicator << "\n"
-       << pfx << setw(28) << "start_offset:" << theStartOffset << "\n"
-       << pfx << setw(28) << "stop_offset:" << theStopOffset
-       << std::endl;
-   return out;
-}
-
-ossimDtedDsi::ossimDtedDsi(const ossimDtedDsi& /* source */)
-{}
-
-const ossimDtedDsi& ossimDtedDsi::operator=(const ossimDtedDsi& rhs)
-{
-   return rhs;
-}
diff --git a/src/ossim/support_data/ossimDtedHdr.cpp b/src/ossim/support_data/ossimDtedHdr.cpp
deleted file mode 100644
index b870736..0000000
--- a/src/ossim/support_data/ossimDtedHdr.cpp
+++ /dev/null
@@ -1,233 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Ken Melero
-// 
-// Description:  This class gives access to the File Header Label
-//               (HDR) of a DTED Level 1 file.
-//
-//********************************************************************
-// $Id: ossimDtedHdr.cpp 17501 2010-06-02 11:14:55Z dburken $
-
-#include <iostream>
-#include <fstream>
-#include <string>
-
-#include <ossim/support_data/ossimDtedHdr.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimProperty.h>
-
-//**************************************************************************
-// CONSTRUCTOR
-//**************************************************************************
-ossimDtedHdr::ossimDtedHdr(const ossimFilename& dted_file, ossim_int32 offset)
-   :
-      theStartOffset(0),
-      theStopOffset(0)
-{
-   if(!dted_file.empty())
-   {
-      // Check to see that dted file exists.
-      if(!dted_file.exists())
-      {
-         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedHdr::ossimDtedHdr: The DTED file does not exist: " << dted_file << std::endl;
-         return;
-      }
-      
-      // Check to see that the dted file is readable.
-      if(!dted_file.isReadable())
-      {
-         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedHdr::ossimDtedHdr: The DTED file is not readable: " << dted_file << std::endl;
-         return;
-      }
-      
-      std::ifstream in(dted_file.c_str());
-      // Open the dted file for reading.
-      if(!in)
-      {
-         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedHdr::ossimDtedHdr: Error opening the DTED file: " << dted_file << std::endl;
-         return;
-      }
-      in.seekg(offset);
-      // Continue parsing all the record fields.
-      parse(in);
-      
-      in.close();
-   }
-}
-
-//**************************************************************************
-// CONSTRUCTOR
-//**************************************************************************
-ossimDtedHdr::ossimDtedHdr(std::istream& in)
-   :
-      theStartOffset(0),
-      theStopOffset(0)
-{
-   parse(in);
-}
-
-//**************************************************************************
-// ossimDtedHdr::parse()
-//**************************************************************************
-void ossimDtedHdr::parse(std::istream& in)
-{
-   clearErrorStatus();
-   theStartOffset = in.tellg();
-   theStopOffset  = theStartOffset;
-   // Parse theRecSen
-   in.read(theRecSen, FIELD1_SIZE);
-   theRecSen[FIELD1_SIZE] = '\0';
-
-   if(!(strncmp(theRecSen, "HDR", 3) == 0))
-   {
-      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-      in.seekg(theStartOffset);
-      return;
-   }
-   
-   // Parse Field 2
-   in.read(theField2, FIELD2_SIZE);
-   theField2[FIELD2_SIZE] = '\0';
-   
-   // Parse theFilename
-   in.read(theFilename, FIELD3_SIZE);
-   theFilename[FIELD3_SIZE] = '\0';
-   
-   // Parse Field 4
-   in.read(theField4, FIELD4_SIZE);
-   theField4[FIELD4_SIZE] = '\0';
-   
-   // Parse Field 5
-   in.read(theField5, FIELD5_SIZE);
-   theField5[FIELD5_SIZE] = '\0';
-   
-   // Parse Field 6
-   in.read(theField6, FIELD6_SIZE);
-   theField6[FIELD6_SIZE] = '\0';
-   
-   // Parse Field 7
-   in.read(theVersion, FIELD7_SIZE);
-   theVersion[FIELD7_SIZE] = '\0';
-   
-   // Parse theCreationDate
-   in.read(theCreationDate, FIELD8_SIZE);
-   theCreationDate[FIELD8_SIZE] = '\0';
-   
-   // Parse Field 9
-   in.read(theField9, FIELD9_SIZE);
-   theField9[FIELD9_SIZE] = '\0';   
-   
-   // Parse Field 10
-   in.read(theField10, FIELD10_SIZE);
-   theField10[FIELD10_SIZE] = '\0';   
-   
-   // Parse Field 11
-   in.read(theField11, FIELD11_SIZE);
-   theField11[FIELD11_SIZE] = '\0';   
-   
-   // Parse Field 12
-   in.read(theField12, FIELD12_SIZE);
-   theField12[FIELD12_SIZE] = '\0';   
-   
-   // Parse Field 13
-   in.read(theField13, FIELD13_SIZE);
-   theField13[FIELD13_SIZE] = '\0';   
-   
-   // Parse Field 14
-   in.read(theField14, FIELD14_SIZE);
-   theField14[FIELD14_SIZE] = '\0';
-
-   // Set the stop offset.
-   theStopOffset = theStartOffset + HDR_LENGTH;
-}
-
-ossimRefPtr<ossimProperty> ossimDtedHdr::getProperty(
-   const ossimString& /* name */) const
-{
-   ossimRefPtr<ossimProperty> result = 0;
-   return result;
-}
-
-void ossimDtedHdr::getPropertyNames(
-   std::vector<ossimString>& propertyNames) const
-{
-   propertyNames.push_back(ossimString("dted_hdr_record"));
-}
-
-
-//**************************************************************************
-// operator <<
-//**************************************************************************
-std::ostream& operator<<( std::ostream& os, const ossimDtedHdr& hdr)
-{
-   std::string prefix;
-   return hdr.print(os, prefix);
-}
-
-std::ostream& ossimDtedHdr::print(std::ostream& out,
-                                  const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += "hdr.";
-   
-   out << pfx << "recognition_sentinel:  " << theRecSen << "\n"
-       << pfx << "field2:                " << theField2 << "\n"
-       << pfx << "filename:              " << theFilename << "\n"
-       << pfx << "field4:                " << theField4 << "\n"
-       << pfx << "field5:                " << theField5 << "\n"
-       << pfx << "field6:                " << theField6 << "\n"
-       << pfx << "version:               " << theVersion << "\n"
-       << pfx << "creation_date:         " << theCreationDate << "\n"
-       << pfx << "field9:                " << theField9 << "\n"
-       << pfx << "field10:               " << theField10 << "\n"
-       << pfx << "field11:               " << theField11 << "\n"
-       << pfx << "field12:               " << theField12 << "\n"
-       << pfx << "field13:               " << theField13 << "\n"
-       << pfx << "field14:               " << theField14 << "\n"
-       << std::endl;
-   
-   return out;
-}
-
-ossimString ossimDtedHdr::recognitionSentinel() const
-{
-   return theRecSen;
-}
-
-ossimString ossimDtedHdr::fileName() const
-{
-   return theFilename;
-}
-ossimString ossimDtedHdr::version() const
-{ return theVersion;
-}
-
-ossimString ossimDtedHdr::creationDate() const
-{
-   return theCreationDate;
-}
-
-ossim_int32 ossimDtedHdr::startOffset() const
-{
-   return theStartOffset;
-}
-
-ossim_int32 ossimDtedHdr::stopOffset() const
-{
-   return theStopOffset;
-}
-
-ossimDtedHdr::ossimDtedHdr(const ossimDtedHdr& /* source */)
-{}
-
-const ossimDtedHdr& ossimDtedHdr::operator=(const ossimDtedHdr& rhs)
-{
-   return rhs;
-}
diff --git a/src/ossim/support_data/ossimDtedInfo.cpp b/src/ossim/support_data/ossimDtedInfo.cpp
deleted file mode 100644
index bd6d398..0000000
--- a/src/ossim/support_data/ossimDtedInfo.cpp
+++ /dev/null
@@ -1,284 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: DTED Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <iostream>
-#include <ossim/support_data/ossimDtedInfo.h>
-#include <ossim/support_data/ossimDtedVol.h>
-#include <ossim/support_data/ossimDtedHdr.h>
-#include <ossim/support_data/ossimDtedUhl.h>
-#include <ossim/support_data/ossimDtedDsi.h>
-#include <ossim/support_data/ossimDtedAcc.h>
-#include <ossim/base/ossimErrorContext.h>
-#include <ossim/base/ossimProperty.h>
-#include <ossim/base/ossimContainerProperty.h>
-#include <ossim/base/ossimRegExp.h>
-
-
-ossimDtedInfo::ossimDtedInfo()
-   : theFile()
-{
-}
-
-ossimDtedInfo::~ossimDtedInfo()
-{
-}
-
-bool ossimDtedInfo::open(const ossimFilename& file)
-{
-   bool result = false;
-
-   // Test for extension, like dt0, dt1...
-   ossimString ext = file.ext();
-   ossimRegExp regExp("^[d|D][t|T][0-9]");
-   
-   if ( regExp.find( ext.c_str() ) )
-   {
-      ossimDtedVol vol(file, 0);
-      ossimDtedHdr hdr(file, vol.stopOffset());
-      ossimDtedUhl uhl(file, hdr.stopOffset());
-      ossimDtedDsi dsi(file, uhl.stopOffset());
-      ossimDtedAcc acc(file, dsi.stopOffset());
-      
-      //---
-      // Check for errors.  Must have uhl, dsi and acc records.  vol and hdr
-      // are for magnetic tape only; hence, may or may not be there.
-      //---
-      if ( (uhl.getErrorStatus() == ossimErrorCodes::OSSIM_OK) &&
-           (dsi.getErrorStatus() == ossimErrorCodes::OSSIM_OK) &&
-           (acc.getErrorStatus() == ossimErrorCodes::OSSIM_OK) )
-      {
-         theFile = file;
-         result = true;
-      }
-      else
-      {
-         theFile.clear();
-      }
-   }
-
-   return result;
-}
-
-std::ostream& ossimDtedInfo::print(std::ostream& out) const
-{
-   if ( theFile.size() )
-   {
-      std::string prefix = "dted.";
-      
-      ossimDtedVol vol(theFile, 0);
-      ossimDtedHdr hdr(theFile, vol.stopOffset());
-      ossimDtedUhl uhl(theFile, hdr.stopOffset());
-      ossimDtedDsi dsi(theFile, uhl.stopOffset());
-      ossimDtedAcc acc(theFile, dsi.stopOffset());
-      if( vol.getErrorStatus() == ossimErrorCodes::OSSIM_OK )
-      {
-         vol.print(out, prefix);
-      }
-      if( hdr.getErrorStatus() == ossimErrorCodes::OSSIM_OK )
-      {
-         hdr.print(out, prefix);
-      }
-      if( uhl.getErrorStatus() == ossimErrorCodes::OSSIM_OK )
-      {
-         uhl.print(out, prefix);
-      }
-      if( dsi.getErrorStatus() == ossimErrorCodes::OSSIM_OK )
-      {
-         dsi.print(out, prefix);
-      }
-      if( acc.getErrorStatus() == ossimErrorCodes::OSSIM_OK )
-      {
-         acc.print(out, prefix);
-      }
-   }
-   return out;
-}
-
-ossimRefPtr<ossimProperty> ossimDtedInfo::getProperty(
-   const ossimString& name)const
-{
-   ossimRefPtr<ossimProperty> result = 0;
-
-   //---
-   // Look through dted records.
-   // Must have uhl, dsi and acc records.  vol and hdr
-   // are for magnetic tape only; hence, may or may not be there.
-   //---
-   ossimDtedVol vol(theFile, 0);
-   if( vol.getErrorStatus() == ossimErrorCodes::OSSIM_OK )
-   {
-      if (name == "dted_vol_record")
-      {
-         ossimContainerProperty* box = new ossimContainerProperty();
-         box->setName(name);
-
-         std::vector<ossimString> list;
-         vol.getPropertyNames(list);
-
-         std::vector< ossimRefPtr<ossimProperty> > propList;
-
-         std::vector<ossimString>::const_iterator i = list.begin();
-         while (i != list.end())
-         {
-            ossimRefPtr<ossimProperty> prop = vol.getProperty( (*i) );
-            if (prop.valid())
-            {
-               propList.push_back(prop);
-            }
-            ++i;
-         }
-         box->addChildren(propList);
-         result = box;
-      }
-   }
-   if (result.valid() == false)
-   {
-      ossimDtedHdr hdr(theFile, vol.stopOffset());
-      if( hdr.getErrorStatus() == ossimErrorCodes::OSSIM_OK )
-      {
-         if (name == "dted_hdr_record")
-         {
-            ossimContainerProperty* box = new ossimContainerProperty();
-            box->setName(name);
-            
-            std::vector<ossimString> list;
-            hdr.getPropertyNames(list);
-            
-            std::vector< ossimRefPtr<ossimProperty> > propList;
-            
-            std::vector<ossimString>::const_iterator i = list.begin();
-            while (i != list.end())
-            {
-               ossimRefPtr<ossimProperty> prop = hdr.getProperty( (*i) );
-               if (prop.valid())
-               {
-                  propList.push_back(prop);
-               }
-               ++i;
-            }
-            box->addChildren(propList);
-            result = box;
-         }
-      }
-      if (result.valid() == false)
-      {
-         ossimDtedUhl uhl(theFile, hdr.stopOffset());
-         if( uhl.getErrorStatus() == ossimErrorCodes::OSSIM_OK )
-         {
-            if (name == "dted_uhl_record")
-            {
-               ossimContainerProperty* box = new ossimContainerProperty();
-               box->setName(name);
-               
-               std::vector<ossimString> list;
-               uhl.getPropertyNames(list);
-               
-               std::vector< ossimRefPtr<ossimProperty> > propList;
-               
-               std::vector<ossimString>::const_iterator i = list.begin();
-               while (i != list.end())
-               {
-                  ossimRefPtr<ossimProperty> prop = uhl.getProperty( (*i) );
-                  if (prop.valid())
-                  {
-                     propList.push_back(prop); 
-                  }
-                  ++i;
-               }
-               box->addChildren(propList);
-               result = box;
-            }
-         }
-         if (result.valid() == false)
-         {
-            ossimDtedDsi dsi(theFile, uhl.stopOffset());
-            if( dsi.getErrorStatus() == ossimErrorCodes::OSSIM_OK )
-            {
-               if (name == "dted_dsi_record")
-               {
-                  ossimContainerProperty* box =
-                     new ossimContainerProperty();
-                  box->setName(name);
-                  
-                  std::vector<ossimString> list;
-                  dsi.getPropertyNames(list);
-                  
-                  std::vector< ossimRefPtr<ossimProperty> > propList;
-                  
-                  std::vector<ossimString>::const_iterator i = list.begin();
-                  while (i != list.end())
-                  {
-                     ossimRefPtr<ossimProperty> prop =
-                        dsi.getProperty( (*i) );
-                     if (prop.valid())
-                     {
-                        propList.push_back(prop);
-                     }
-                     ++i;
-                  }
-                  box->addChildren(propList);
-                  result = box;
-               }
-            }
-            if (result.valid() == false)
-            {
-               ossimDtedAcc acc(theFile, dsi.stopOffset());
-               if( acc.getErrorStatus() == ossimErrorCodes::OSSIM_OK )
-               {
-                  if (name == "dted_acc_record")
-                  {
-                     ossimContainerProperty* box =
-                        new ossimContainerProperty();
-                     box->setName(name);
-                     
-                     std::vector<ossimString> list;
-                     acc.getPropertyNames(list);
-                     
-                     std::vector< ossimRefPtr<ossimProperty> > propList;
-                     
-                     ossimRefPtr<ossimProperty> prop = 0;
-                     std::vector<ossimString>::const_iterator i =
-                        list.begin();
-                     while (i != list.end())
-                     {
-                        ossimRefPtr<ossimProperty> prop =
-                           acc.getProperty( (*i) );
-                        if (prop.valid())
-                        {
-                           propList.push_back(prop);
-                        }
-                        ++i;
-                     }
-                     box->addChildren(propList);
-                     result = box;
-                  }
-               }
-            }
-         }
-      }
-   }
-
-   return result;
-}
-
-void ossimDtedInfo::getPropertyNames(
-   std::vector<ossimString>& propertyNames)const
-{
-   propertyNames.push_back(ossimString("dted_vol_record"));
-   propertyNames.push_back(ossimString("dted_hdr_record"));
-   propertyNames.push_back(ossimString("dted_uhl_record"));
-   propertyNames.push_back(ossimString("dted_dsi_record"));
-   propertyNames.push_back(ossimString("dted_acc_record"));
-}
-
-
diff --git a/src/ossim/support_data/ossimDtedUhl.cpp b/src/ossim/support_data/ossimDtedUhl.cpp
deleted file mode 100644
index bca664f..0000000
--- a/src/ossim/support_data/ossimDtedUhl.cpp
+++ /dev/null
@@ -1,330 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Ken Melero
-// 
-// Description:  This class gives access to the User Header Label
-//               (UHL) of a DTED Level 1 file.
-//
-//********************************************************************
-// $Id: ossimDtedUhl.cpp 17206 2010-04-25 23:20:40Z dburken $
-
-#include <cstdlib>
-#include <iostream>
-#include <iomanip>
-#include <fstream>
-#include <string>
-
-#include <ossim/support_data/ossimDtedUhl.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimProperty.h>
-
-
-//**************************************************************************
-// CONSTRUCTOR
-//**************************************************************************
-ossimDtedUhl::ossimDtedUhl(const ossimFilename& dted_file, ossim_int32 offset)
-   :
-      theRecSen(),
-      theField2(),
-      theLonOrigin(),
-      theLatOrigin(),
-      theLonInterval(),
-      theLatInterval(),
-      theAbsoluteLE(),
-      theSecurityCode(),
-      theNumLonLines(),
-      theNumLatPoints(),
-      theMultipleAccuracy(),
-      theStartOffset(0),
-      theStopOffset(0)
-{
-   if(!dted_file.empty())
-   {
-      // Check to see that dted file exists.
-      if(!dted_file.exists())
-      {
-         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedUhl::ossimDtedUhl: The DTED file does not exist: " << dted_file << std::endl;
-         return;
-      }
-      
-      // Check to see that the dted file is readable.
-      if(!dted_file.isReadable())
-      {
-         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedUhl::ossimDtedUhl: The DTED file is not readable --> " << dted_file << std::endl;
-         return;
-      }
-      
-      std::ifstream in(dted_file.c_str());
-      if(!in)
-      {
-         theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-         ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedUhl::ossimDtedUhl: Error opening the DTED file: " << dted_file << std::endl;
-         
-         return;
-      }
-      in.seekg(offset);
-      parse(in);
-      
-      in.close();
-   }
-}
-
-//**************************************************************************
-// CONSTRUCTOR
-//**************************************************************************
-ossimDtedUhl::ossimDtedUhl(std::istream& in)
-   :
-      theRecSen(),
-      theLonOrigin(),
-      theLatOrigin(),
-      theLonInterval(),
-      theLatInterval(),
-      theAbsoluteLE(),
-      theSecurityCode(),
-      theNumLonLines(),
-      theNumLatPoints(),
-      theMultipleAccuracy(),
-      theStartOffset(0),
-      theStopOffset(0)
-{
-   parse(in);
-}
-
-//**************************************************************************
-// ossimDtedUhl::parse()
-//**************************************************************************
-void ossimDtedUhl::parse(std::istream& in)
-{
-   clearErrorStatus();
-   theStartOffset = in.tellg();
-   theStopOffset  = theStartOffset;
-   // Parse theRecSen
-   in.read(theRecSen, FIELD1_SIZE);
-   theRecSen[FIELD1_SIZE] = '\0';
-
-   if(!(strncmp(theRecSen, "UHL", 3) == 0))
-   {
-      // Not a user header label.
-      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;  
-      in.seekg(theStartOffset);
-      return;
-   }  
-   
-   // Parse Field 2
-   in.read(theField2, FIELD2_SIZE);
-   theField2[FIELD2_SIZE] = '\0';
-   
-   // Parse theLonOrigin
-   in.read(theLonOrigin, FIELD3_SIZE);
-   theLonOrigin[FIELD3_SIZE] = '\0';
-   
-   // Parse theLatOrigin
-   in.read(theLatOrigin, FIELD4_SIZE);
-   theLatOrigin[FIELD4_SIZE] = '\0';
-   
-   // Parse theLonInterval
-   in.read(theLonInterval, FIELD5_SIZE);
-   theLonInterval[FIELD5_SIZE] = '\0';
-   
-   // Parse theLatInterval
-   in.read(theLatInterval, FIELD6_SIZE);
-   theLatInterval[FIELD6_SIZE] = '\0';
-   
-   // Parse theAbsoluteLE
-   in.read(theAbsoluteLE, FIELD7_SIZE);
-   theAbsoluteLE[FIELD7_SIZE] = '\0';
-   
-   // Parse theSecurityCode
-   in.read(theSecurityCode, FIELD8_SIZE);
-   theSecurityCode[FIELD8_SIZE] = '\0';
-   
-   // Parse Field 9
-   in.read(theField9, FIELD9_SIZE);
-   theField9[FIELD9_SIZE] = '\0';
-   
-   // Parse theNumLonLines
-   in.read(theNumLonLines, FIELD10_SIZE);
-   theNumLonLines[FIELD10_SIZE] = '\0';
-   
-   // Parse theNumLatPoints
-   in.read(theNumLatPoints, FIELD11_SIZE);
-   theNumLatPoints[FIELD11_SIZE] = '\0';
-   
-   // Parse theMultipleAccuracy
-   in.read(theMultipleAccuracy, FIELD12_SIZE);
-   theMultipleAccuracy[FIELD12_SIZE] = '\0';
-
-   // Field 13 not parsed as it's unused.
-   in.ignore(FIELD13_SIZE);
-   // Set the stop offset.
-   theStopOffset = theStartOffset + UHL_LENGTH;
-}
-
-ossimRefPtr<ossimProperty> ossimDtedUhl::getProperty(
-   const ossimString& /* name */) const
-{
-   ossimRefPtr<ossimProperty> result = 0;
-   return result;
-}
-
-void ossimDtedUhl::getPropertyNames(
-   std::vector<ossimString>& propertyNames) const
-{
-   propertyNames.push_back(ossimString("dted_uhl_record"));
-}
-
-ossimString ossimDtedUhl::recognitionSentinel() const
-{
-   return theRecSen;
-}
-
-double ossimDtedUhl::lonOrigin() const
-{
-   return degreesFromString(theLonOrigin);
-}
-
-double ossimDtedUhl::latOrigin() const
-{
-   return degreesFromString(theLatOrigin);
-}
-
-double ossimDtedUhl::lonInterval()      const
-{
-   return spacingFromString(theLonInterval);
-}
-
-double ossimDtedUhl::latInterval()      const
-{
-   return spacingFromString(theLatInterval);
-}
-  
-double ossimDtedUhl::degreesFromString(const char* str) const
-{
-   // Parse the string:  DDDMMMSSH
-   if (!str)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL)
-         << "FATAL ossimDtedUhl::degreesFromString: "
-         << "Null pointer passed to method!" << std::endl;
-      return 0.0;
-   }
-   
-   if (strlen(str) < 8)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL)
-         << "FATAL ossimDtedUhl::decimalDegreesFromString:"
-         << "String not big enough!" << std::endl;
-      return 0.0;
-   }
-
-   double d = ((str[0]-'0')*100 + (str[1]-'0')*10 + (str[2]-'0') +
-               (str[3]-'0')/6.0 + (str[4]-'0')/60.0 +
-               (str[5]-'0')/360.0 + (str[6]-'0')/3600.0);
-   
-   if ( (str[7] == 'S') || (str[7] == 's') ||
-        (str[7] == 'W') || (str[7] == 'w') )
-   {
-      d *= -1.0;
-   }
-   
-   return d;
-}
- 
-double ossimDtedUhl::spacingFromString(const char* str) const
-{
-   // Parse the string: SSSS (tenths of a second)
-   if (!str)
-   {
-      ossimNotify(ossimNotifyLevel_FATAL)
-         << "FATAL ossimDtedUhl::decimalDegreesFromString: "
-         << "Null pointer passed to method!" << std::endl;
-      return 0.0;
-   }
-
-   return atof(str) / 36000.0;  // return 10ths of second as decimal degrees.
-}
-
-double ossimDtedUhl::absoluteLE() const
-{
-   return (theAbsoluteLE ? atoi(theAbsoluteLE) : 0);
-}
-
-ossimString ossimDtedUhl::securityCode() const
-{
-   return theSecurityCode;
-}
-
-ossim_int32 ossimDtedUhl::numLonLines() const
-{
-   return (theNumLonLines ? atoi(theNumLonLines) : 0);
-}
-
-ossim_int32 ossimDtedUhl::numLatPoints() const
-{
-   return (theNumLatPoints ? atoi(theNumLatPoints) : 0);
-}
-
-ossim_int32 ossimDtedUhl::mulitpleAccuracy() const
-{
-   return (theMultipleAccuracy ? atoi(theMultipleAccuracy) : 0);
-}
-
-ossim_int32 ossimDtedUhl::startOffset() const
-{
-   return theStartOffset;
-}
-
-ossim_int32 ossimDtedUhl::stopOffset() const
-{
-   return theStopOffset;
-}
-
-//**************************************************************************
-// operator <<
-//**************************************************************************
-std::ostream& operator<<( std::ostream& out, const ossimDtedUhl& uhl)
-{
-   std::string prefix;
-   return uhl.print(out, prefix);
-}
-
-std::ostream& ossimDtedUhl::print(std::ostream& out,
-                                  const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += "uhl.";
-   
-   out << setiosflags(ios::left)
-       << pfx << setw(28) << "recognition_sentinel:" << theRecSen << "\n"
-       << pfx << setw(28) << "lon_origin:" << theLonOrigin << "\n"
-       << pfx << setw(28) << "lat_origin:" << theLatOrigin << "\n"
-       << pfx << setw(28) << "lon_interval:" << theLonInterval << "\n"
-       << pfx << setw(28) << "lat_interval:" << theLatInterval << "\n"
-       << pfx << setw(28) << "absolute_le:" << theAbsoluteLE << "\n"
-       << pfx << setw(28) << "security_code:" << theSecurityCode << "\n"
-       << pfx << setw(28) << "number_of_lat_points:" << theNumLatPoints << "\n"
-       << pfx << setw(28) << "number_of_lon_lines:" << theNumLonLines << "\n"
-       << pfx << setw(28) << "multiple_accuracy:"
-       << theMultipleAccuracy << "\n"
-       << pfx << setw(28) << "start_offset:" << theStartOffset << "\n"
-       << pfx << setw(28) << "stop_offset:" << theStopOffset
-       << std::endl;
-   
-   return out;
-}
-
-ossimDtedUhl::ossimDtedUhl(const ossimDtedUhl& /* source */)
-{
-}
-
-const ossimDtedUhl& ossimDtedUhl::operator=(const ossimDtedUhl& rhs)
-{
-   return rhs;
-}
-
diff --git a/src/ossim/support_data/ossimEnviHeader.cpp b/src/ossim/support_data/ossimEnviHeader.cpp
deleted file mode 100644
index ce40bb6..0000000
--- a/src/ossim/support_data/ossimEnviHeader.cpp
+++ /dev/null
@@ -1,952 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  David Burken
-//
-// Description:
-// 
-// Class for reading and writing an ENVI (The Environment for Visualizing
-// Images) header file.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimEnviHeader.cpp 22354 2013-08-02 16:22:15Z gpotts $
-
-#include <ossim/support_data/ossimEnviHeader.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/support_data/ossimWavelength.h>
-#include <algorithm>
-#include <fstream>
-#include <string>
-
-typedef  std::unary_function<std::pair<ossimString, ossimString>, bool> KwlCompareFunctionType;
-typedef  std::pair<const ossimString, ossimString> KwlComparePairType;
-
-class KwlKeyCaseInsensitiveEquals : public KwlCompareFunctionType
-{
-public:
-   KwlKeyCaseInsensitiveEquals(const ossimString& key):m_key(key){}
-   virtual bool operator()(const KwlComparePairType& rhs)const
-   {
-      return (m_key == rhs.first.downcase());
-   }
-   ossimString m_key;
-};
-class KwlKeySubStringCaseInsensitive : public KwlCompareFunctionType
-{
-public:
-   KwlKeySubStringCaseInsensitive(const ossimString& key):m_key(key){}
-   virtual bool operator()(const KwlComparePairType& rhs)const
-   {
-      return (rhs.first.downcase().contains(m_key));
-   }
-   ossimString m_key;
-};
-
-// Define keywords not already found in ossimKeywordNames.
-static const char HEADER_OFFSET_KW[]    = "header_offset";
-static const char FILE_TYPE_KW[]        = "file_type";
-static const char DATA_TYPE_KW[]        = "data_type";
-static const char SENSOR_TYPE_KW[]      = "sensor_type";
-static const char X_START_KW[]          = "x_start";
-static const char Y_START_KW[]          = "y_start";
-static const char MAP_INFO_KW[]         = "map_info";
-static const char WAVELENGTH_UNITS_KW[] = "wavelength_units";
-static const char BAND_NAME_KW[]        = "band_name";
-static const char WAVELENGTH_KW[]       = "wavelength";
-
-static ossimTrace traceDebug(ossimString("ossimEnviHeader:debug"));
-
-ossimEnviHeader::ossimEnviHeader()
-   :
-   m_file(),
-   m_keywords()
-{
-   // Start the byte order of with the machine byte order.
-   m_keywords[FILE_TYPE_KW] = "ENVI Standard";
-   setByteorder(ossim::byteOrder());   
-}
-
-ossimEnviHeader::~ossimEnviHeader()
-{
-}
-
-void ossimEnviHeader::reset()
-{
-   m_file.string().clear();
-   m_keywords.clear();
-   m_keywords[FILE_TYPE_KW] = "ENVI Standard";
-   setByteorder(ossim::byteOrder());
-}
-
-const ossimKeywordlist& ossimEnviHeader::getMap() const
-{
-   return m_keywords;
-}
-
-ossimKeywordlist& ossimEnviHeader::getMap()
-{
-   return m_keywords;
-}
-
-bool ossimEnviHeader::getValue( const ossimString& key, ossimString& value ) const
-{
-   bool result = false;
-   value.string() = m_keywords.findKey( key.string());
-   if( value.size() )
-   {
-      result = true;
-   }
-   else
-   {
-      result = m_keywords.hasKey( key.string() );
-   }
-   return result;
-}
-
-bool ossimEnviHeader::findSubStringCaseInsensitive(const ossimString& key,
-                                                   ossimString& value) const
-{
-   return m_keywords.findValue<KwlKeySubStringCaseInsensitive>(
-      value, KwlKeySubStringCaseInsensitive(key));
-}
-
-bool ossimEnviHeader::open(const ossimFilename& file)
-{
-   bool result = false;
-
-   reset(); // Clear the map, file name.
-
-   std::ifstream in;
-   in.open(file.c_str(), std::ios::in | std::ios::binary);
-   if( in.is_open() )
-   {
-      result = readStream( in );
-      if ( result )
-      {
-         m_file = file;
-      }
-   }
-
-   return result;
-}
-
-bool ossimEnviHeader::readStream(std::istream& in)
-{
-   reset();
-   bool result = isEnviHeader( in );
-   if ( result )
-   {
-      m_keywords.clear();
-      
-      while(!in.eof()&&in.good())
-      {
-         // read name
-         ossimString name = "";
-         ossimString value = "";
-         ossim::skipws(in);
-         int c = static_cast<char>(in.get());
-         while((c != '=')&&(in.good())&&!in.eof())
-         {
-            name +=static_cast<char>(c);
-            c = in.get();
-         }
-         ossim::skipws(in);
-         c = in.get();
-         
-         if(in.good()&&!in.eof())
-         {
-            if(c == '{') // continue til '}'
-            {
-               c = in.get();
-               while((c != '}')&&(in.good())&&!in.eof())
-               {
-                  value +=static_cast<char>(c);
-                  c = in.get();
-               }
-            }
-            else
-            {
-               while(((c != '\n')&&(c!='\r'))&&(in.good())&&!in.eof())
-               {
-                  value +=static_cast<char>(c);
-                  c = (in.get());
-               }
-               
-            }
-            m_keywords.add(name.trim(), value);
-         }
-      }
-
-      // Test for minimum set of keywords needed.
-      if ( m_keywords.findKey( std::string("samples") ).empty() ||
-           m_keywords.findKey( std::string("lines") ).empty() || 
-           m_keywords.findKey( std::string("bands") ).empty())
-      {
-         result =  false;
-      }
-   }
-
-   return result;
-}
-
-bool ossimEnviHeader::writeFile(const ossimFilename& file)
-{
-   if (m_keywords.findKey( std::string("description") ).empty())
-   {
-      m_keywords["description"] = file.c_str();
-   }
-   
-   std::ofstream out(file.c_str(), std::ios_base::out);
-
-   if (!out)
-   {
-      return false;
-   }
-   
-   print(out);
-   out.close();
-   return true;
-}
-
-std::ostream& ossimEnviHeader::print(std::ostream& out) const
-{
-   out << "ENVI" << "\n" << m_keywords << std::endl;
-   return out;
-}
-
-std::ostream& operator<<(std::ostream& out, const ossimEnviHeader& obj)
-{
-   return obj.print( out );
-}
-
-ossimString ossimEnviHeader::getDescription() const
-{
-   return ossimString( m_keywords.findKey( std::string("description") ) );
-}
-
-void ossimEnviHeader::setDescription(const ossimString& description)
-{
-   m_keywords["description"] = description.c_str();
-}
-
-ossim_uint32 ossimEnviHeader::getSamples() const
-{
-   ossim_uint32 result = 0;
-   ossimString value = m_keywords.findKey( std::string("samples") );
-   if( value.size() )
-   {
-      result = value.toUInt32();
-   }
-   return result;
-}
-
-void ossimEnviHeader::setSamples(ossim_uint32 samples)
-{
-   m_keywords[ std::string("samples") ] = ossimString::toString(samples).c_str();
-}
-
-ossim_uint32 ossimEnviHeader::getLines() const
-{
-   ossim_uint32 result = 0;
-   ossimString value = m_keywords.findKey( std::string("lines") );
-   if( value.size() )
-   {
-      result = value.toUInt32();
-   }
-   return result;
-}
-
-void ossimEnviHeader::setLines(ossim_uint32 lines)
-{
-   m_keywords["lines"] = ossimString::toString(lines).c_str();
-}
-
-ossim_uint32 ossimEnviHeader::getBands() const
-{
-   ossim_uint32 result = 0;
-   ossimString value = m_keywords.findKey( std::string("bands") );
-   if( value.size() )
-   {
-      result = value.toUInt32();
-   }
-   return result;
-}
-
-void ossimEnviHeader::setBands(ossim_uint32 bands)
-{
-   m_keywords["bands"] = ossimString::toString(bands).c_str();
-}
-
-bool ossimEnviHeader::getDefaultBands( std::vector<ossim_uint32>& bands ) const
-{
-   bands.clear();
-
-   // Note: We could do a "m_map.downcaseKeywords()". (drb)
-   ossimString value = m_keywords.findKey( std::string("default bands") );
-   if ( !value.size() )
-   {
-      value = m_keywords.findKey( std::string("Default bands") );
-      if ( !value.size() )
-      {
-        value = m_keywords.findKey( std::string("DEFAULT BANDS") );
-      }
-   }
-
-   if ( value.size() )
-   {
-      std::vector<ossimString> strLst;
-      value.split( strLst, ossimString(","));
-      if ( strLst.size() )
-      {
-         std::vector<ossimString>::const_iterator i = strLst.begin();
-         ossim_uint32 band = 0;
-         while ( i != strLst.end() )
-         {
-            band = (*i).toUInt32();
-            if ( band )
-            {
-               // Assuming "default bands" are one based.  Totally a hunch... (drb)
-               --band;
-               bands.push_back(band);
-            }
-            else
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << "ossimEnviHeader::getDefaultBands WARN!"
-                  << "\nDetected zero based bands in \"default bands\" from header!"
-                  << std::endl;
-            }
-            
-            ++i;
-         }
-      }
-   }
-
-   if ( rangeCheckBands( bands ) == false )
-   {
-      bands.clear();
-   }
-   
-   return (bands.size() ? true : false);
-}
-
-ossim_uint32 ossimEnviHeader::getHeaderOffset() const
-{
-   ossim_uint32 result = 0;
-   ossimString value = m_keywords["header offset"];
-   if( value.size() )
-   {
-      result = value.toUInt32();
-   }
-   return result;
-}
-
-void ossimEnviHeader::setHeaderOffset(ossim_uint32 headerOffset)
-{
-   m_keywords["header offset"] = ossimString::toString(headerOffset).c_str();
-}
-
-ossimString ossimEnviHeader::getFileType() const
-{
-   return m_keywords[FILE_TYPE_KW];
-}
-
-void ossimEnviHeader::setFileType(const ossimString& fileType)
-{
-    m_keywords[FILE_TYPE_KW] = fileType.c_str();
-}
-
-ossim_uint32 ossimEnviHeader::getDataType() const
-{
-   return ossimString(m_keywords["data type"]).toUInt32();
-}
-
-ossimScalarType ossimEnviHeader::getOssimScalarType() const
-{
-   ossim_uint32 dataTypeInt = ossimString(m_keywords["data type"]).toUInt32();
-   
-   ossimScalarType result = OSSIM_SCALAR_UNKNOWN;
-
-   switch( dataTypeInt )
-   {
-      case 1:
-         result = OSSIM_UINT8;
-         break;
-      case 2:
-         result = OSSIM_SINT16;
-         break;
-      case 3:
-         result = OSSIM_SINT32;
-         break;
-      case 4:
-         result = OSSIM_FLOAT32;
-         break;
-      case 5:
-         result = OSSIM_FLOAT64;
-         break;
-      case 6:
-         result = OSSIM_CFLOAT32;
-         break;
-      case 9:
-         result = OSSIM_CFLOAT64;
-         break;
-      case 12:
-         result = OSSIM_UINT16;
-         break;
-      case 13:
-         result = OSSIM_UINT32;
-         break;
-      default:
-         break;
-   }
-
-   return result;
-}
-
-void ossimEnviHeader::setDataType(ossimScalarType scalar)
-{
-   ossimString dataTypeString = "";
-   switch( scalar )
-   {
-      case OSSIM_UINT8:
-         dataTypeString = "1";
-         break;
-      case OSSIM_SINT16:
-         dataTypeString = "2";
-         break;
-      case OSSIM_SINT32:
-         dataTypeString = "3";
-         break;
-      case OSSIM_FLOAT32:
-         dataTypeString = "4";
-         break;
-      case OSSIM_FLOAT64:
-         dataTypeString = "5";
-         break;
-      case OSSIM_CFLOAT32:
-         dataTypeString = "6";
-         break;
-      case OSSIM_CFLOAT64:
-         dataTypeString = "9";
-         break;
-      case OSSIM_UINT16:
-         dataTypeString = "12";
-         break;
-      case OSSIM_UINT32:
-         dataTypeString = "13";
-         break;
-      default:
-         break;
-   }
-   
-   if(!dataTypeString.empty())
-   {
-      m_keywords["data type"] = dataTypeString.c_str();
-   }
-}
-ossimString ossimEnviHeader::getInterleaveType() const
-{
-   return m_keywords["interleave"];
-}
-ossimInterleaveType ossimEnviHeader::getOssimInterleaveType() const
-{
-   ossimString interleave = getInterleaveType();
-   if (interleave == "bsq")
-   {
-      return OSSIM_BSQ;
-   }
-   else if  (interleave == "bil")
-   {
-      return OSSIM_BIL;
-   }
-   else if  (interleave == "bip")
-   {
-      return OSSIM_BIP;
-   }
-   else
-   {
-      return OSSIM_INTERLEAVE_UNKNOWN;
-   }
-}
-
-void ossimEnviHeader::setInterleaveType(ossimInterleaveType interleave)
-{
-   std::string interleaveString = "";
-   switch (interleave)
-   {
-      case OSSIM_BIL:
-         interleaveString = "bil";
-         break;
-      case OSSIM_BSQ:
-         interleaveString = "bsq";
-         break;
-      case OSSIM_BIP:
-         interleaveString = "bip";
-         break;
-      default:
-         interleaveString = "Unknown";
-         break;
-   }
-   m_keywords["interleave"] = interleaveString;
-}
-
-ossimString ossimEnviHeader::getSensorType() const
-{
-   return m_keywords["sensor type"];
-}
-
-void ossimEnviHeader::setSensorType(const ossimString& sensorType)
-{
-   m_keywords["sensor type"] = sensorType.c_str();
-}
-
-ossimByteOrder ossimEnviHeader::getByteOrder() const
-{
-   ossimByteOrder result = ossim::byteOrder(); // System byte order.
-   std::string value = m_keywords["byte order"];
-   if ( value.size() )
-   {
-      // 0 = LITTLE_ENDIAN
-      // 1 = BIG_ENDIAN
-      ossim_int32 order = ossimString(value).toInt32();
-      result = order ? OSSIM_BIG_ENDIAN : OSSIM_LITTLE_ENDIAN;
-   }
-   return result;
-}
-
-void ossimEnviHeader::setByteorder(ossimByteOrder byteOrder)
-{
-   if(byteOrder==OSSIM_LITTLE_ENDIAN)
-   {
-      m_keywords["byte order"] = "0";
-   }
-   else
-   {
-      m_keywords["byte order"] = "1";
-   }
-}
-
-ossim_int32 ossimEnviHeader::getXStart() const
-{
-   ossim_int32 result = 0;
-   std::string s = m_keywords.findKey( std::string("x start") );
-   if ( !s.size() )
-   {
-      s = m_keywords.findKey( std::string("sample start") );
-   }
-   if ( s.size() )
-   {
-      result = ossimString( s ).toInt32();
-   }
-   return result;
-}
-
-void ossimEnviHeader::setXStart(ossim_int32 xstart)
-{
-   m_keywords["x start"] = ossimString::toString(xstart).c_str();
-}
-
-ossim_int32 ossimEnviHeader::getYStart() const
-{
-   ossim_int32 result = 0;
-   std::string s = m_keywords.findKey( std::string("y start") );
-   if ( !s.size() )
-   {
-      s = m_keywords.findKey( std::string("line start") );
-   }
-   if ( s.size() )
-   {
-      result = ossimString( s ).toInt32();
-   }
-   return result;
-}
-
-void ossimEnviHeader::setYStart(ossim_int32 ystart)
-{
-   m_keywords["y start"] = ossimString::toString(ystart).c_str();
-}
-
-ossimString ossimEnviHeader::getMapInfo() const
-{
-   return m_keywords["map info"];
-}
-
-void ossimEnviHeader::setMapInfo(const ossimString& mapInfo)
-{
-   m_keywords["map info"] = mapInfo.c_str();
-}
-
-void ossimEnviHeader::setMapInfo(const ossimKeywordlist& kwl,
-                                 const char* prefix)
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimEnviHeader::setMapInfo DEBUG:"
-         << "\nkwl:\n"
-         << kwl
-         << std::endl;
-   }
-   ossimString mapInfoString;
-   const char* lookup;
-   
-   // Get the projection type.
-   ossimString projection;
-   lookup = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
-   if (lookup)
-   {
-      projection = lookup;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimEnviHeader::setMapInfo WARNING:"
-         << "\nNo projection type found!\nReturning..."
-         << std::endl;
-         
-      return; // Have to have the projection type!
-   }
-
-   // Get the datum.
-   ossimString datum = "WGS-84";
-   lookup = kwl.find(prefix, ossimKeywordNames::DATUM_KW);
-   if (lookup)
-   {
-      ossimString os = lookup;
-      if (os == "WGE")
-      {
-         datum = "WGS-84";
-      }
-      else
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimEnviHeader::setMapInfo WARNING:"
-            << "\nUnhandled ossim -> envi datum:  " << datum
-            << "\nAssuming WGS-84!"
-            << std::endl;
-      }
-   }
-
-   if ( (projection == "ossimEquDistCylProjection") ||
-        (projection == "ossimLlxyProjection") )
-   {
-      const char* tieLat = NULL;
-      const char* tieLon = NULL;
-      const char* degLat = NULL;
-      const char* degLon = NULL;
-      tieLat = kwl.find(prefix, ossimKeywordNames::TIE_POINT_LAT_KW);
-      tieLon = kwl.find(prefix, ossimKeywordNames::TIE_POINT_LON_KW);
-      degLat = kwl.find(prefix,
-                        ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT);
-      degLon = kwl.find(prefix,
-                       ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON);
-      
-      if (!tieLat || !tieLon || !degLat || !degLon)
-      {
-         return;
-      }
-                 
-      mapInfoString = "{Geographic Lat/Lon, 1.0000, 1.0000, ";
-      mapInfoString += tieLon;
-      mapInfoString += ", ";
-      mapInfoString += tieLat;
-      mapInfoString += ", ";
-      mapInfoString += degLon;
-      mapInfoString += ", ";
-      mapInfoString += degLat;
-      mapInfoString += ", ";
-      mapInfoString += datum;
-      mapInfoString += ", units=degrees}";
-   }
-
-   m_keywords["map info"] = mapInfoString.c_str();
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimEnviHeader::setMapInfo DEBUG:"
-         << "\ntheMapInfo:  " << mapInfoString
-         << std::endl;
-   }
-}
-
-ossimString ossimEnviHeader::getWavelengthUnits() const
-{
-   return m_keywords["wavelength units"];
-}
-
-void ossimEnviHeader::setWavelengthUnits(const ossimString& waveLengthUnits)
-{
-   
-   m_keywords["wavelength units"] = waveLengthUnits.c_str();
-}
-
-void ossimEnviHeader::getBandNames(std::vector<ossimString>& bandNames) const
-{
-   bandNames.clear();
-   ossimString bandNamesString = m_keywords["band names"];
-   bandNamesString.split(bandNames, ",");
-}
-
-void ossimEnviHeader::setBandNames(const std::vector<ossimString>& bandNames)
-{
-   ossimString value;
-   value.join(bandNames, ",");
-   m_keywords["band names"] = value.c_str();
-}
-
-void ossimEnviHeader::getWavelengths(std::vector<ossimString>& waveLengths)
-   const
-{
-   waveLengths.clear();
-   ossimString bandNamesString = m_keywords[WAVELENGTH_KW];
-   bandNamesString.split(waveLengths, ",");
-}
-
-void ossimEnviHeader::setWavelengths(
-   const std::vector<ossimString>& wavelengths)
-{
-   ossimString value;
-   value.join(wavelengths, ",");
-   m_keywords[WAVELENGTH_KW] = value.c_str();
-}
-
-bool ossimEnviHeader::loadState(const ossimKeywordlist& kwl,
-                                const char* prefix)
-{
-   std::string lookup;
-   std::string pfx = (prefix ? prefix: "" );
-   ossimString s;
-
-   reset();
-
-   lookup = kwl.findKey(pfx, std::string(ossimKeywordNames::FILENAME_KW));
-   if (lookup.size())
-   {
-      m_file.string() = lookup;
-   }
-  
-   lookup = kwl.findKey(pfx, std::string(ossimKeywordNames::DESCRIPTION_KW));
-   if (lookup.size())
-   {
-      setDescription(lookup);
-   }
-
-   lookup = kwl.findKey(pfx, std::string(ossimKeywordNames::NUMBER_SAMPLES_KW));
-   if (lookup.size())
-   {
-      m_keywords["samples"] = lookup;
-   }
-   
-   lookup = kwl.findKey(pfx, std::string(ossimKeywordNames::NUMBER_LINES_KW));
-   if (lookup.size())
-   {
-      m_keywords["lines"] = lookup;
-   }
-
-   lookup = kwl.findKey(pfx, std::string(ossimKeywordNames::NUMBER_BANDS_KW));
-   if (lookup.size())
-   {
-      m_keywords["bands"] = lookup;
-   }
-
-   lookup = kwl.findKey(pfx, std::string(HEADER_OFFSET_KW));
-   if (lookup.size())
-   {
-      m_keywords["header offset"] = lookup;
-   }
-
-   lookup = kwl.findKey(pfx, std::string(FILE_TYPE_KW));
-   if (lookup.size())
-   {
-       m_keywords["file_type"] = lookup;
-   }
-
-   lookup = kwl.findKey(pfx, DATA_TYPE_KW);
-   if (lookup.size())
-   {
-      m_keywords["data type"] = lookup;
-   }
-
-   lookup = kwl.findKey(pfx, std::string(ossimKeywordNames::INTERLEAVE_TYPE_KW));
-   if (lookup.size())
-   {
-      m_keywords["interleave"] = lookup;
-   }
-
-   lookup = kwl.findKey(pfx, std::string(SENSOR_TYPE_KW));
-   if (lookup.size())
-   {
-      m_keywords["sensor type"] = lookup;
-   }
-
-   lookup = kwl.findKey(pfx, std::string(ossimKeywordNames::BYTE_ORDER_KW));
-   if (lookup.size())
-   {
-      s = lookup;
-      s.downcase();
-      if (s == "little_endian")
-      {
-         m_keywords["byte order"] = "0";
-      }
-      else if (s == "big_endian")
-      {
-         m_keywords["byte order"] = "1";
-      }
-      else
-      {
-         m_keywords["byte order"] = lookup;
-      }
-   }
-   
-   lookup = kwl.findKey(pfx, std::string(X_START_KW));
-   if (lookup.size())
-   {
-      m_keywords["x start"] = lookup;
-   }
-   lookup = kwl.findKey(pfx, std::string(Y_START_KW));
-   if (lookup.size())
-   {
-      m_keywords["y start"] = lookup;
-   }
-
-   lookup = kwl.findKey(pfx, std::string(MAP_INFO_KW));
-   if (lookup.size())
-   {
-      m_keywords["map info"] = lookup;
-   }
-
-   lookup = kwl.findKey(pfx, std::string(WAVELENGTH_UNITS_KW));
-   if (lookup.size())
-   {
-      m_keywords["wavelength units"] = lookup;
-   }
-
-   ossim_uint32 n;
-   ossim_uint32 count;
-   const ossim_uint32 MAX_TRIES = 1024; // Avoid infinate loop.
-   
-   // Get the band names.
-   n = kwl.numberOf(prefix, BAND_NAME_KW);
-   if (n)
-   {
-      ossimString value = "";
-      count = 0;
-      while ( (count < n) || (count > MAX_TRIES) )
-      {
-         s = BAND_NAME_KW;
-         s += ossimString::toString(count);
-         lookup = kwl.findKey(pfx, s.string());
-         if (lookup.size())
-         {
-            if(!value.empty())
-            {
-               value += ossimString(lookup);
-            }
-            else
-            {
-               value += (", " + ossimString(lookup));
-
-            }
-            
-         }
-         ++count;
-      }
-      m_keywords["band names"] = value.c_str();
-   }
-            
-   // Get the band names.
-   n = kwl.numberOf(prefix, WAVELENGTH_KW);
-   if (n)
-   {
-      ossimString value;
-      count = 0;
-      while ( (count < n) || (count > MAX_TRIES) )
-      {
-         s = WAVELENGTH_KW;
-         s += ossimString::toString(count);
-         lookup = kwl.findKey(pfx, s.string());
-         if (lookup.size())
-         {
-            if(!value.empty())
-            {
-               value += ossimString(lookup);
-            }
-            else
-            {
-               value += (", " + ossimString(lookup));
-            }
-         }
-         ++count;
-      }
-      m_keywords["wavelength"] = value.c_str();
-   }
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimEnviHeader::loadState DEUG\n";
-      print(ossimNotify(ossimNotifyLevel_DEBUG));
-   }
-   
-   return true;
-}
-
-bool ossimEnviHeader::isEnviHeader( const ossimFilename& file )
-{
-   bool result = false;
-   std::ifstream in;
-   in.open(file.c_str(), std::ios::in | std::ios::binary);
-   if ( in.is_open() )
-   {
-      result = isEnviHeader( in );
-      in.close();
-   }
-   return result;
-}
-
-bool ossimEnviHeader::isEnviHeader( std::istream& in )
-{
-   bool result = false;
-   ossim::skipws(in);
-   char eh[5];
-   in.read(eh, 4);
-   eh[4] = '\0';
-   std::string s(eh);
-   if ( s == "ENVI" )
-   {
-      result = true;
-   }
-   return result;
-}
-
-const ossimFilename& ossimEnviHeader::getFile() const
-{
-   return m_file;
-}
-
-bool ossimEnviHeader::rangeCheckBands( const std::vector<ossim_uint32>& bands ) const
-{
-   bool result = false;
-   const ossim_uint32 INPUT_BANDS = getBands();
-   if ( INPUT_BANDS )
-   {
-      result = true;
-      std::vector<ossim_uint32>::const_iterator i = bands.begin();
-      while ( i != bands.end() )
-      {
-         if ( (*i) >= INPUT_BANDS )
-         {
-            result = false;
-            break;
-         }
-         ++i;
-      }
-   }
-   return result;
-}
diff --git a/src/ossim/support_data/ossimEnviInfo.cpp b/src/ossim/support_data/ossimEnviInfo.cpp
deleted file mode 100644
index a5030ce..0000000
--- a/src/ossim/support_data/ossimEnviInfo.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: ENVI Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/support_data/ossimEnviInfo.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/support_data/ossimEnviHeader.h>
-#include <iostream>
-
-ossimEnviInfo::ossimEnviInfo()
-   : ossimInfoBase(),
-     m_file()
-{
-}
-
-ossimEnviInfo::~ossimEnviInfo()
-{
-}
-
-bool ossimEnviInfo::open( const ossimFilename& file )
-{
-   bool result = false;
-
-   m_file = file;
-
-   if ( file.ext().downcase() != "hdr" )
-   {
-      // Typical case, we were fed the image file.  Look for a header file beside image.
-      m_file.setExtension("hdr"); // image.hdr
-      if ( !m_file.exists() )
-      {
-         m_file.setExtension("HDR"); // image.HDR
-         if ( !m_file.exists() )
-         {
-            m_file = file;
-            m_file.string() += ".hdr"; // image.ras.hdr
-         }
-      }
-   }
-
-   if ( m_file.exists() )
-   {
-      if ( ossimEnviHeader::isEnviHeader( m_file ) )
-      {
-         result = true;
-      }
-   }
-
-   if ( !result ) 
-   {
-      m_file.clear();
-   }
-
-   return result;
-}
-
-std::ostream& ossimEnviInfo::print( std::ostream& out ) const
-{
-   if ( m_file.size() )
-   {
-      ossimEnviHeader hdr;
-      if ( hdr.open( m_file ) )
-      {
-         hdr.getMap().addPrefixToAll( ossimString( "envi." ) );
-         out << hdr.getMap() << std::endl;
-      }
-   }
-   return out; 
-}
diff --git a/src/ossim/support_data/ossimFfL7.cpp b/src/ossim/support_data/ossimFfL7.cpp
deleted file mode 100644
index fe48821..0000000
--- a/src/ossim/support_data/ossimFfL7.cpp
+++ /dev/null
@@ -1,707 +0,0 @@
-//*******************************************************************
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Ken Melero
-//         Orginally written by Oscar Kramer (SoBe Software)
-//         
-// Description: Container class for LandSat7 Fast Format header files.
-//
-//********************************************************************
-// $Id: ossimFfL7.cpp 17501 2010-06-02 11:14:55Z dburken $
-
-#include <cstdio>
-#include <fstream>
-#include <sstream>
-#include <string>
-#include <iomanip>
-#include <ctime>  
-using namespace std;
-
-#include <ossim/support_data/ossimFfL7.h>
-
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimDate.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimProperty.h>
-#include <ossim/base/ossimDateProperty.h>
-#include <ossim/base/ossimStringProperty.h>
-
-static const ossimString ACQUISITION_DATE_KW = "acquisition_date";
-static const ossimString PATH_KW             = "path";
-static const ossimString PATH_ROW_KW         = "path_row";
-static const ossimString ROW_KW              = "row";
-static const ossimString SATELLITE_NAME_KW   = "satellite_name";
-static const ossimString SENSOR_NAME_KW      = "sensor_name";
-
-
-ossimFfL7::ossimFfL7()
-   :
-      ossimErrorStatusInterface()
-{
-   initialize();
-}
-
-ossimFfL7::ossimFfL7(const char* headerFile)
-   :
-      ossimErrorStatusInterface()
-{
-   initialize();
-   
-   // open the header file:
-   FILE* fptr = fopen(headerFile, "r");
-   if (!fptr)
-   {
-      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-   }
-
-   // Begin reading records:
-   if (!theErrorStatus)
-      readAdminRecord(fptr);
-   if (!theErrorStatus)
-      readRadiomRecord(fptr);
-   if (!theErrorStatus)
-      readGeomRecord(fptr);
-   if(fptr)
-   {
-      fclose(fptr);
-   }
-}
-ossimFfL7::~ossimFfL7()
-{}
- 
-ossimString ossimFfL7::pathRow() const
-{
-   ossimString tmp = "p";
-   tmp += theLocationCode;
-   tmp.gsub("/", "r");
-   tmp.gsub(" ", "");
-
-   return tmp;
-}
-
-void ossimFfL7::dump(std::ostream& os) const
-{
-   os << setiosflags(ios::left | ios::fixed)
-      << "\nAdministrative Record:"
-      << setw(30) << "\ntheRequestNumber: " 
-      << theRequestNumber;
-
-   os << setw(30) << "\nLocationCode:     " << theLocationCode
-      << setw(30) << "\nAcquisitionDate:  " << theAcquisitionDate
-      << setw(30) << "\nSatelliteName:    " << theSatName
-      << setw(30) << "\nSensorName:       " << theSensorName
-      << setw(30) << "\nSensorMode:       " << theSensorMode
-      << setw(30) << "\nOffNadirAngle:    "
-      << setprecision(2) << theOffNadirAngle;
-
-   os << setw(30) << "\nProductType: " 
-      << theProductType
-      << setw(30) << "\nProductSize: " 
-      << theProductSize
-      << setw(30) << "\nProcessingType: " 
-      << theProcessingType 
-      << setw(30) << "\nResampAlgorithm: " 
-      << theResampAlgorithm
-      << setw(30) << "\nPixelsPerLine: " 
-      << thePixelsPerLine
-      << setw(30) << "\nLinesPerImage: " 
-      << theLinesPerBand
-      << setw(30) << "\nRecordSize: " 
-      << theRecordSize
-      << setw(30) << "\nGsd: " 
-      << setprecision(2) << theGsd
-      << setw(30) << "\nOutputBitsPerPixel: " 
-      << theOutputBitsPerPixel
-      << setw(30) << "\nAcquiredBitsPerPixel: " 
-      << theAcquiredBitsPerPixel
-      << setw(30) << "\nBandsPresentString: " 
-      << theBandsPresentString;
-   
-   for (int i=0; i<6; i++)
-      os << "\nBandFileNames["<<i<<"]:             " <<theBandFileNames[i];
-   os << endl;
-
-   os << setprecision(15) << setw(30) << "\nRadiometric record:" << endl;
-   ossim_uint32 band = 0;
-   vector<ossim_float64>::const_iterator bi = theBias.begin();
-   while (bi != theBias.end())
-   {
-      os << "band[" << band << "] bias:  " << (*bi) << endl;
-      ++bi;
-      ++band;
-   }
-
-   band = 0;
-   bi = theGain.begin();
-   while (bi != theGain.end())
-   {
-      os << "band[" << band << "] gain:  " << (*bi) << endl;
-      ++bi;
-      ++band;
-   }
-   
-   os << endl
-      << "Geometric Record:"
-      << setw(30) << "\nMapProjectionName:" 
-      << theMapProjectionName
-      << setw(30) << "\nEllipsoid:" 
-      << theEllipsoid
-      << setw(30) << "\nDatum:" 
-      << theDatum;
-
-   for (int i = 0; i < 15; i++)
-   {
-      os << "\nProjectionParams[" << setw(2) << i << setw(10) << "]:  "
-         << theProjectionParams[i];
-   }
-
-   os << setprecision(3) 
-      << setw(30) << "\nUL Corner:" << theUL_Corner
-      << setw(30) << "\nUR Corner:" << theUR_Corner
-      << setw(30) << "\nLR Corner:" << theLR_Corner
-      << setw(30) << "\nLL Corner:" << theLL_Corner
-      << setw(30) << "\nCenter Point (Ground):" << theCenterGP
-      << setw(30) << "\nCenter Point (Image):" << theCenterImagePoint
-      << setw(30) << "\nHorizontalOffset:" 
-      << theHorizontalOffset
-      << setprecision(2) << setw(30) << "\nOrientationAngle:" 
-      << theOrientationAngle
-      << setw(30) << "\nSunElevationAngle:" 
-      << setprecision(1) << theSunElevation
-      << setw(30) << "\nSunAzimuth:" <<  theSunAzimuth
-      << resetiosflags(ios::left)
-      << endl << endl;
-}
-
-void ossimFfL7::writeHeader(std::ostream& os) const
-{
-   ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimFfL7::writeHeader: This method is not yet implemented. Ignoring request..."
-                                      << std::endl;
-   os << "WARNING ossimFfL7::writeHeader: This method is not yet implemented. Ignoring request..."
-      << std::endl;
-}
-
-void ossimFfL7::readAdminRecord(FILE* fptr)
-{
-   static const int OFFSET = -1;
-   int converted;
-   theErrorStatus = ossimErrorCodes::OSSIM_ERROR; // assume error, prove not at end;
-
-   fseek(fptr, OFFSET + 9, SEEK_SET);
-   converted = fscanf(fptr, "%20c", theRequestNumber);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 35, SEEK_SET);
-   converted = fscanf(fptr, "%17c", theLocationCode);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 71, SEEK_SET);
-   converted = fscanf(fptr, "%8c", theAcquisitionDate);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 92, SEEK_SET);
-   converted = fscanf(fptr, "%10c", theSatName);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 111, SEEK_SET);
-   converted = fscanf(fptr, "%10c", theSensorName);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 135, SEEK_SET);
-   converted = fscanf(fptr, "%6c", theSensorMode);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 154, SEEK_SET);
-   converted = fscanf(fptr, "%6lf", &theOffNadirAngle);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 655, SEEK_SET);
-   converted = fscanf(fptr, "%18c", theProductType);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 688, SEEK_SET);
-   converted = fscanf(fptr, "%10c", theProductSize);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 741, SEEK_SET);
-   converted = fscanf(fptr, "%11c", theProcessingType);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 765, SEEK_SET);
-   converted = fscanf(fptr, "%2c", theResampAlgorithm);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 843, SEEK_SET);
-   converted = fscanf(fptr, "%5d", &thePixelsPerLine);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 865, SEEK_SET);
-   converted = fscanf(fptr, "%5d", &theLinesPerBand);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 932, SEEK_SET);
-   converted = fscanf(fptr, "%9d", &theRecordSize);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 954, SEEK_SET);
-   converted = fscanf(fptr, "%6lf", &theGsd);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 984, SEEK_SET);
-   converted = fscanf(fptr, "%2d", &theOutputBitsPerPixel);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 1012, SEEK_SET);
-   converted = fscanf(fptr, "%2d", &theAcquiredBitsPerPixel);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 1056, SEEK_SET);
-   converted = fscanf(fptr, "%32c", theBandsPresentString);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 1131, SEEK_SET);
-   converted = fscanf(fptr, "%29c", theBandFileNames[0]);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 1170, SEEK_SET);
-   converted = fscanf(fptr, "%29c", theBandFileNames[1]);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 1211, SEEK_SET);
-   converted = fscanf(fptr, "%29c", theBandFileNames[2]);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 1250, SEEK_SET);
-   converted = fscanf(fptr, "%29c", theBandFileNames[3]);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 1291, SEEK_SET);
-   converted = fscanf(fptr, "%29c", theBandFileNames[4]);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 1330, SEEK_SET);
-   converted = fscanf(fptr, "%29c", theBandFileNames[5]);
-   if (converted != 1) return;
-
-   std::vector<ossimString> arrayPathRow = ossimString(theLocationCode).split("/");
-   if(arrayPathRow.size() == 2)
-   {
-      thePathNumber = arrayPathRow[0].toInt();
-      theRowNumber = arrayPathRow[1].beforePos(3).toInt();
-   }
-   
-   // The Admin record was successfully extracted:
-   theErrorStatus = ossimErrorCodes::OSSIM_OK;   
-   return;
-}
-
-int ossimFfL7::path() const
-{
-   return thePathNumber;
-}
-
-int ossimFfL7::row() const
-{
-   return theRowNumber;
-}
-
-//***************************************************************************
-// PRIVATE METHOD: ossimFfL7::readRadiomRecord()
-//  
-//***************************************************************************
-void ossimFfL7::readRadiomRecord(FILE* fptr)
-{
-   int converted;
-   char radiom_record[1537];
-   
-   if (!theErrorStatus)
-   {
-      fseek(fptr, 1536, SEEK_SET);
-      converted = fscanf(fptr, "%1536c", radiom_record);
-      if (converted != 1) theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-   }
-
-   // Get the gains and biases.
-   theBias.clear();
-   theGain.clear();
-
-   const ossim_uint32 MAX = 128;
-   char temp_chars[MAX];
-   std::istringstream is(radiom_record);
-
-   // Eat the first line. "GAINS AND BIASES IN ASCENDING BAND NUMBER ORDER"
-   is.getline(temp_chars, MAX);
-   
-   const char SPACE     = 0x20;
-   const char LINE_FEED = 0x0a;
-   
-   // LS7 header has room for eight bands per spec.   
-   for (ossim_uint32 band = 0; band < 8; ++band)
-   {
-      is.getline(temp_chars, MAX);
-      bool blank_line = true;
-      for (ossim_uint32 i = 0; i < MAX; ++i)
-      {
-         if (temp_chars[i] == LINE_FEED) break;  // end of line...
-
-         if (temp_chars[i] != SPACE)
-         {
-            blank_line = false; // has bias and gain...
-            break;
-         }
-      }
-
-      if (blank_line == true) continue; // go to next line...
-      
-      std::vector<ossimString> splitString;
-      ossimString tempString(temp_chars);
-      tempString.split(splitString, " ");
-      
-      if(splitString.size() > 1)
-      {
-         theBias.push_back(splitString[0].toDouble());
-         theGain.push_back(splitString[1].toDouble());
-     }
-   }
-}
-
-//***************************************************************************
-// PRIVATE METHOD: ossimFfL7::readGeomRecord()
-//  
-//***************************************************************************
-void ossimFfL7::readGeomRecord(FILE* fptr)
-{
-   static const int OFFSET = 3071;
-   int converted;
-   theErrorStatus = ossimErrorCodes::OSSIM_ERROR; // assume error, prove not at end;
-
-   fseek(fptr, OFFSET + 32, SEEK_SET);
-   converted = fscanf(fptr, "%4c", theMapProjectionName);
-   if (converted != 1) return;
-
-   fseek(fptr, OFFSET + 48, SEEK_SET);
-   converted = fscanf(fptr, "%18c", theEllipsoid);
-   if (converted != 1) return;
-      
-   strcpy(theDatum, "WGS-84");
-
-   // added to read in all 15 parameters instead of the first two.
-   long currentOffset = OFFSET + 110;
-   for(long parameter=0;parameter < 15; ++parameter)
-   {
-      fseek(fptr, currentOffset, SEEK_SET);
-      converted = fscanf(fptr, "%24lf", &theProjectionParams[parameter]);
-      if (converted != 1) return;
-
-      currentOffset +=25;
-   }
-      
-   
-   fseek(fptr, OFFSET + 521, SEEK_SET);
-   converted = fscanf(fptr, "%6d", &theUsgsMapZone);
-   if (converted != 1) return;
-      
-   fseek(fptr, OFFSET + 566, SEEK_SET);
-   if(convertGeoPoint(fptr, theUL_Corner)) return;
-      
-   fseek(fptr, OFFSET + 646, SEEK_SET);
-   if(convertGeoPoint(fptr, theUR_Corner)) return;
-      
-   fseek(fptr, OFFSET + 726, SEEK_SET);
-   if(convertGeoPoint(fptr, theLR_Corner)) return;
-      
-   fseek(fptr, OFFSET + 806, SEEK_SET);
-   if(convertGeoPoint(fptr, theLL_Corner)) return;
-      
-   fseek(fptr, OFFSET + 890, SEEK_SET);
-   if(convertGeoPoint(fptr, theCenterGP)) return;
-      
-   fseek(fptr, OFFSET + 945, SEEK_SET);
-
-   int x;
-   int y;
-   
-   converted = fscanf(fptr, "%5d %5d", &x, &y);
-   if (converted != 2) return;
-   
-   theCenterImagePoint.x = x;
-   theCenterImagePoint.y = y;
-      
-   fseek(fptr, OFFSET + 969, SEEK_SET);
-   converted = fscanf(fptr, "%6d", &theHorizontalOffset);
-   if (converted != 1) return;
-      
-   fseek(fptr, OFFSET + 995, SEEK_SET);
-   converted = fscanf(fptr, "%6lf", &theOrientationAngle);
-   if (converted != 1) return;
-      
-   fseek(fptr, OFFSET + 1062, SEEK_SET);
-   converted = fscanf(fptr, "%4lf", &theSunElevation);
-   if (converted != 1) return;
-      
-   fseek(fptr, OFFSET + 1086, SEEK_SET);
-   converted = fscanf(fptr, "%5lf", &theSunAzimuth);
-   if (converted != 1) return;
-
-   // successfully reached the end of Geom record:
-   theErrorStatus = ossimErrorCodes::OSSIM_OK;
-
-   return;
-}
-
-
-//***************************************************************************
-// PRIVATE METHOD: ossimFfL7::convertGeoPoint(char* buffer);
-//  
-//***************************************************************************
-int ossimFfL7::convertGeoPoint(FILE* fptr, ossimGpt& geo_point)
-{
-   int    londeg;
-   int    lonmin;
-   double lonsec;
-   char   lonhem;
-   int    latdeg;
-   int    latmin;
-   double latsec;
-   char   lathem;
-   
-   int converted = fscanf(fptr, "%03d%02d%7lf%c %02d%02d%7lf%c",
-                          &londeg, &lonmin, &lonsec, &lonhem,
-                          &latdeg, &latmin, &latsec, &lathem);
-
-   if (converted != 8)
-   {
-      theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
-      return ossimErrorCodes::OSSIM_ERROR;
-   }
-   
-   geo_point.lat = (double)latdeg + (double)latmin/60.0 + latsec/3600.0;
-   if (lathem == 'S')
-      geo_point.lat *= -1.0;
-   
-   geo_point.lon= (double)londeg + (double)lonmin/60.0 + lonsec/3600.0;
-   if (lonhem == 'W')
-      geo_point.lon *= -1.0;
-
-   return ossimErrorCodes::OSSIM_OK;
-}
-   
-//***************************************************************************
-// PRIVATE METHOD: ossimFfL7::initialize()
-// Initializes all fields to blanks (or 0's) and null terminates strings.
-//***************************************************************************
-void ossimFfL7::initialize()
-{
-   static const char source[] = "";
-
-   // The Admin Record:
-   strncpy(theRequestNumber, source, 21);
-   strncpy(theLocationCode, source, 18);
-   thePathNumber = 0;
-   theRowNumber = 0;
-   strncpy(theAcquisitionDate, source, 20);
-   strncpy(theSatName, source, 11);
-   strncpy(theSensorName, source, 11);
-   strncpy(theSensorMode, source, 7);
-   theOffNadirAngle = 0.0;      
-   strncpy(theProductType, source, 19);
-   strncpy(theProductSize, source, 11);
-   strncpy(theProcessingType, source, 12);
-   strncpy(theResampAlgorithm, source, 3);
-   thePixelsPerLine = 0;
-   theLinesPerBand = 0;
-   theRecordSize = 0;
-   theGsd = 0.0;
-   theOutputBitsPerPixel = 0;
-   theAcquiredBitsPerPixel = 0;
-   strncpy(theBandsPresentString, source, 33);
-   strncpy(theBandFileNames[0], source, 30);
-   strncpy(theBandFileNames[1], source, 30);
-   strncpy(theBandFileNames[2], source, 30);
-   strncpy(theBandFileNames[3], source, 30);
-   strncpy(theBandFileNames[4], source, 30);
-   strncpy(theBandFileNames[5], source, 30);
-
-   // The Radiometry Record:
-   theBias.clear();
-   theGain.clear();
-
-   // The Geometry Record:
-   strncpy(theMapProjectionName, source, 5);
-   strncpy(theEllipsoid, source, 19);
-   strncpy(theDatum, source, 7);
-   for (int i=0; i<15; i++)
-      theProjectionParams[i] = 0.0;
-   theUsgsMapZone = 0;
-
-   theHorizontalOffset  = 0;   
-   theOrientationAngle  = 0.0; 
-   theSunElevation      = 0.0; 
-   theSunAzimuth        = 0.0; 
-
-   return;
-}
-
-void ossimFfL7::getBias(vector<double>& bias) const
-{
-   bias = theBias;
-}
-
-double ossimFfL7::getBias(long bandIdx)const
-{
-   return theBias[bandIdx];
-}
-
-void ossimFfL7::getGain(vector<double>& gain) const
-{
-   gain = theGain;
-}
-
-double ossimFfL7::getGain(long bandIdx)const
-{
-   return theGain[bandIdx];
-}
-
-double ossimFfL7::getParam(ossim_uint32 i)const
-{
-   if(i < 16)
-   {
-      return theProjectionParams[i];
-   }
-   return 0.0;
-}
-
-long ossimFfL7::getJulianDay()const
-{
-   ossimDate date;
-   getAcquisitionDate(date);
-   return static_cast<long>(date.getJulian());
-}
-
-ossimString ossimFfL7::getAcquisitionDate() const
-{
-   return ossimString(theAcquisitionDate);
-}
-
-void ossimFfL7::getAcquisitionDate(ossimDate& date)const
-{
-   ossimString y = ossimString(theAcquisitionDate,
-                               theAcquisitionDate+4);
-   ossimString m = ossimString(theAcquisitionDate+4,
-                               theAcquisitionDate+6);
-   ossimString d = ossimString(theAcquisitionDate+6,
-                               theAcquisitionDate+8);
-
-   date = ossimDate(m.toInt(),
-                    d.toInt(),
-                    y.toInt());
-}
-
-ossimString ossimFfL7::getSatelliteName() const
-{
-   return ossimString(theSatName);
-}
-
-ossimFilename ossimFfL7::getBandFilename(ossim_uint32 idx)const
-{
-   ossimFilename result;
-   if (idx < getBandCount())
-   {
-      result = theBandFileNames[idx];
-   }
-   return result;
-}
-
-int ossimFfL7::getLinesPerBand() const
-{
-   return theLinesPerBand;
-}
-
-int ossimFfL7::getPixelsPerLine() const
-{
-   return thePixelsPerLine;
-}
-
-void ossimFfL7::getSunElevation(double& elevation) const
-{
-   elevation = theSunElevation;
-}
-
-void ossimFfL7::getSunAzimuth(double& azimuth) const
-{
-   azimuth = theSunAzimuth;
-}
-
-ossimRefPtr<ossimProperty> ossimFfL7::getProperty(const ossimString& name)const
-{
-   ossimRefPtr<ossimProperty> result = 0;
-
-   if(name == ACQUISITION_DATE_KW)
-   {
-      ossimDate date;
-      getAcquisitionDate(date);
-      result = new ossimDateProperty(ACQUISITION_DATE_KW, date);
-   }
-   else if (name == PATH_KW)
-   {
-      result = new ossimStringProperty(PATH_KW,
-                                       ossimString::toString(path()),
-                                       false);
-   }
-   else if (name == PATH_ROW_KW)
-   {
-      result = new ossimStringProperty(PATH_ROW_KW,
-                                       pathRow(),
-                                       false);
-   }                                       
-   else if (name == ROW_KW)
-   {
-      result = new ossimStringProperty(ROW_KW,
-                                       ossimString::toString(row()),
-                                       false);
-   }
-   else if (name == SATELLITE_NAME_KW)
-   {
-      result = new ossimStringProperty(SATELLITE_NAME_KW,
-                                       ossimString(theSatName),
-                                       false);
-   }
-   else if (name == SENSOR_NAME_KW)
-   {
-      result = new ossimStringProperty(SENSOR_NAME_KW,
-                                       ossimString(theSensorName),
-                                       false);
-   }
-
-   return result;
-}
-
-void ossimFfL7::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   propertyNames.push_back(ACQUISITION_DATE_KW);   
-   propertyNames.push_back(PATH_KW);
-   propertyNames.push_back(PATH_ROW_KW);
-   propertyNames.push_back(ROW_KW);      
-   propertyNames.push_back(SATELLITE_NAME_KW);
-   propertyNames.push_back(SENSOR_NAME_KW);
-}
-
-unsigned int ossimFfL7::getBandCount()const
-{
-   ossimString tmp(theBandsPresentString);
-   tmp.trim(); //remove spaces
-   return (unsigned int)tmp.length();
-//   return strlen(tmp.chars()); //beurk! should implement length in ossimString
-}
- 
-//***************************************************************************
-// Function:
-// ostream& operator<<(ostream& os, const ossimFfL7& head)
-//***************************************************************************
-std::ostream& operator<<(std::ostream& os, const ossimFfL7& head)
-{
-   head.dump(os);
-   return os;
-}
-
diff --git a/src/ossim/support_data/ossimFgdcTxtDoc.cpp b/src/ossim/support_data/ossimFgdcTxtDoc.cpp
deleted file mode 100644
index 6aa2a2a..0000000
--- a/src/ossim/support_data/ossimFgdcTxtDoc.cpp
+++ /dev/null
@@ -1,306 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File ossimFgdcTxtDoc.cpp
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: ossimFgdcTxtDoc class definition.
-//
-// FGDC = "Federal Geographic Data Committee"
-//
-// See: http://www.fgdc.gov/
-// 
-//----------------------------------------------------------------------------
-
-#include <ossim/support_data/ossimFgdcTxtDoc.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/projection/ossimMapProjectionFactory.h>
-#include <fstream>
-#include <iostream>
-#include <string>
-#include <vector>
-
-static const std::string ALTITUDE_DISTANCE_UNITS_KW = "altitude_distance_units";
-static const std::string FGDC_FILE_KW               = "fgdc_file";
-static const std::string FGDC_VERSION_KW            = "fgdc_version";
-static const std::string FGDC_VERSION_001_1998      = "FGDC-STD-001-1998";
-
-ossimFgdcTxtDoc::ossimFgdcTxtDoc()
-   : m_kwl( new ossimKeywordlist() )
-{
-}
-
-ossimFgdcTxtDoc::~ossimFgdcTxtDoc()
-{
-   m_kwl = 0; // Not a leak, m_kwl is a ossimRefPtr.
-}
-
-bool ossimFgdcTxtDoc::open(const ossimFilename& file)
-{
-   bool result = false;
-
-   // Open the file:
-   std::ifstream str( file.c_str(), std::ios_base::in );
-
-   if ( str.good() )
-   {
-      std::string key = "Metadata_Standard_Version";
-      std::string value;
-      if ( findKey( str, true, key, value ) )
-      {
-         if ( value == FGDC_VERSION_001_1998 )
-         {
-            result = true;
-            m_kwl->addPair( FGDC_VERSION_KW, value );
-            m_kwl->addPair( FGDC_FILE_KW, file.string() );
-
-            // Store for getAltitudeDistanceUnits() method if key found.
-            key = "Altitude_Distance_Units";
-            if ( findKey( str, false, key, value ) )
-            {
-               m_kwl->addPair( ALTITUDE_DISTANCE_UNITS_KW, value );
-            }
-         }
-      }
-   }
-
-   return result;
-}
-
-void ossimFgdcTxtDoc::close()
-{
-   m_kwl->clear();
-}
-
-void ossimFgdcTxtDoc::getProjection(ossimRefPtr<ossimProjection>& proj)
-{
-   static const char M[] = "ossimFgdcTxtDoc::getProjection";
-   
-   try
-   {
-      // Get the file name:
-      std::string file = m_kwl->findKey( FGDC_FILE_KW );
-      if ( file.size() )
-      {
-         // Get the version:
-         std::string version = m_kwl->findKey( FGDC_VERSION_KW );
-         if ( version.size() )
-         {
-            // Note: Currently only coded against FGDC-STD-001-1998
-            if ( version ==  FGDC_VERSION_001_1998)
-            {
-               // Open the file:
-               std::ifstream str( file.c_str(), std::ios_base::in );
-               if ( str.good() )
-               {
-                  // Find the Spatial_Reference_Information  section:
-                  std::string key = "Spatial_Reference_Information:";
-                  if ( findKey( str, key ) )
-                  {
-                     getProjectionV1( str, proj );
-                  }
-               }
-            }
-         }
-      }
-   }
-   catch (const ossimException& e)
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << M << " caught exception:\n" << e.what() << std::endl;
-   }
-}
-
-void ossimFgdcTxtDoc::getAltitudeDistanceUnits(std::string& units) const
-{
-   units = m_kwl->findKey( ALTITUDE_DISTANCE_UNITS_KW );
-}
-
-void ossimFgdcTxtDoc::getProjectionV1(std::ifstream& str, ossimRefPtr<ossimProjection>& proj)
-{
-   static const char M[] = "ossimFgdcTxtDoc::getProjectionV1";
-   
-   std::string fgdcKey;
-   std::string fgdcValue;
-   std::string key;
-   std::string value;
-   ossimKeywordlist projectionKwl;
-   
-   fgdcKey = "Grid_Coordinate_System_Name";
-   if ( findKey( str, true, fgdcKey, fgdcValue ) )
-   {
-      if ( fgdcValue == "Universal Transverse Mercator" )
-      {
-         key = "type";
-         value = "ossimUtmProjection";
-         projectionKwl.addPair(key, value);
-
-         // Get the zone:
-         fgdcKey = "UTM_Zone_Number";
-         if ( findKey( str, true, fgdcKey, fgdcValue ) )
-         {
-            key = "zone";
-            value = fgdcValue;
-            projectionKwl.addPair(key, value);
-         }
-         else
-         {
-            std::string errMsg = M;
-            errMsg += " ERROR: Could not determine utm zone!";
-            throw ossimException(errMsg);
-         }
-
-         // Check for Southern hemisphere.
-         fgdcKey = "False_Northing";
-         if ( findKey( str, true, fgdcKey, fgdcValue ) )
-         {
-            key = "hemisphere";
-            
-            // Hemisphere( North false easting = 0.0, South = 10000000):
-            ossim_float64 f = ossimString::toFloat64( fgdcKey.c_str() );
-            if ( f == 0.0 )
-            {
-               value = "N";
-            }
-            else
-            {
-               value = "S";
-            }
-            projectionKwl.addPair(key, value);
-         }
-         
-      } // UTM section:
-      else
-      {
-         // Exception thrown so that we see that we are not handling a projection.
-         std::string errMsg = M;
-         errMsg += "ERROR: Unhandled projection: ";
-         errMsg += fgdcValue;
-         throw ossimException(errMsg);  
-      }
-
-      fgdcKey = "Horizontal_Datum_Name";
-      if ( findKey( str, true, fgdcKey, fgdcValue ) )
-      {
-         getOssimDatum( fgdcValue, value );
-         key = "datum";
-         projectionKwl.addPair(key, value);
-      }
-      
-   } // Matches: findKey( Grid_Coordinate_System_Name )
-
-   if ( projectionKwl.getSize() )
-   {
-      proj = ossimMapProjectionFactory::instance()->createProjection(projectionKwl);
-   }
-   else
-   {
-      proj = 0;
-   }
-}
-
-bool ossimFgdcTxtDoc::findKey( std::ifstream& str, const std::string& key)
-{
-   bool result = false;
-   ossimString line;
-   while ( !str.eof() )
-   {
-      // Read line:
-      std::getline( str, line.string() );
-      if ( line.size() )
-      {
-         // Eat white space.
-         line.trim();
-         if ( line.string() == key )
-         {
-            result = true;
-            break;
-         }
-      }
-   }
-   return result;
-}
-
-bool ossimFgdcTxtDoc::findKey(
-   std::ifstream& str, bool seekBack, const std::string& key, std::string& value)
-{
-   bool result = false;
-
-   std::vector<ossimString> fgdcKeyValue;
-   ossimString separator = ":";
-   ossimString line;
-   ossimKeywordlist projectionKwl;
-   std::streampos currentPosition = str.tellg();
-   
-   while ( !str.eof() )
-   {
-      // Read line:
-      std::getline( str, line.string() );
-      
-      if ( line.size() )
-      {
-         // Eat white space.
-         line.trim();
-         
-         // Split between ':'
-         fgdcKeyValue.clear();
-         line.split(fgdcKeyValue, separator, false);
-         if ( fgdcKeyValue.size() == 2 )
-         {
-            fgdcKeyValue[0].trim();
-
-            if ( fgdcKeyValue[0].size() )
-            {
-               if ( fgdcKeyValue[0] == key )
-               {
-                  // Found it.  Initialize value and get out.
-                  result = true;
-                  fgdcKeyValue[1].trim();
-                  value = fgdcKeyValue[1].string();
-                  break; // from while loop.
-               }
-            }
-         }
-      }
-   }
-
-   if ( seekBack )
-   {
-      str.seekg(currentPosition);
-   }
-   
-   return result;
-}
-
-// Could be moved to base class for xml and text doc.
-void ossimFgdcTxtDoc::getOssimDatum( const std::string& fgdcDatumString,
-                                     std::string& ossimDatumCode ) const
-{
-   ossimString horizdn = fgdcDatumString;
-   horizdn.downcase();
-   if ( horizdn == "north american datum of 1983" )
-   {
-      ossimDatumCode = "NAR-C";
-   }
-   else if ( horizdn == "north american datum of 1927" )
-   {
-      ossimDatumCode = "NAS-C";
-   }
-   else if ( horizdn == "wgs84")
-   {
-      ossimDatumCode = "WGE";
-   }
-   else
-   {
-      // Exception thrown so that we see that we are not handling a datum.
-      std::string errMsg = "ossimFgdcTxtDoc::getOssimDatum ERROR: Unhandled datum: ";
-      errMsg += horizdn.string();
-      throw ossimException(errMsg);
-   }
-}
diff --git a/src/ossim/support_data/ossimFgdcXmlDoc.cpp b/src/ossim/support_data/ossimFgdcXmlDoc.cpp
deleted file mode 100644
index 737ea52..0000000
--- a/src/ossim/support_data/ossimFgdcXmlDoc.cpp
+++ /dev/null
@@ -1,548 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description: Utility class to encapsulate parsing projection info in the xml file.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimFgdcXmlDoc.cpp 2063 2011-01-19 19:38:12Z ming.su $
-
-#include <ossim/support_data/ossimFgdcXmlDoc.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimDatumFactoryRegistry.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimXmlNode.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimEpsgProjectionFactory.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/projection/ossimUtmProjection.h>
-
-#include <cmath> /* for std::fabs */
-
-// Static trace for debugging
-static ossimTrace traceDebug("ossimFgdcXmlDoc:debug");
-
-ossimFgdcXmlDoc::ossimFgdcXmlDoc()
-   : m_xmlFilename(ossimFilename::NIL),
-     m_xmlDocument(0),
-     m_projection(0),
-     m_boundInDegree(false)
-{
-}
-
-ossimFgdcXmlDoc::~ossimFgdcXmlDoc()
-{
-}
-
-bool ossimFgdcXmlDoc::open(const ossimFilename& xmlFileName)
-{
-   bool result = false;
-   if ( isOpen() )
-   {
-      close();
-   }
-   
-   if (xmlFileName.size())
-   {
-      m_xmlDocument = new ossimXmlDocument(xmlFileName);
-      if ( m_xmlDocument.valid() )
-      {
-         // May want to add a test for valid FGDC here??? (drb)
-         m_xmlFilename = xmlFileName;
-         result = true;
-      }
-   }
-   return result;
-}
-
-void ossimFgdcXmlDoc::close()
-{
-   m_xmlFilename = ossimFilename::NIL;
-   m_xmlDocument = 0;
-   m_projection  = 0;
-}
-
-ossimRefPtr<ossimProjection> ossimFgdcXmlDoc::getProjection()
-{
-   if ( (m_projection.valid() == false) && isOpen() )
-   {
-      ossimString projName;
-      if ( getProjCsn(projName) )
-      {
-         if (!projName.empty())
-         {
-            m_projection = ossimEpsgProjectionFactory::instance()->createProjection(projName);
-            
-            if ( m_projection.valid() )
-            {
-               ossimDpt gsd;
-               gsd.makeNan();
-               ossim_float64 d;
-               if ( getXRes(d) )
-               {
-                  gsd.x = std::fabs(d);
-               }
-               if ( getYRes(d) )
-               {
-                  gsd.y = std::fabs(d);
-               }
-               ossimMapProjection* mapProj = dynamic_cast<ossimMapProjection*>(m_projection.get());
-               if (mapProj)
-               {
-                  ossimDrect rect;
-                  getBoundingBox(rect);
-                  if (mapProj->isGeographic())
-                  {
-                     ossimGpt tie(rect.ul().lat, rect.ul().lon);
-                     mapProj->setUlTiePoints(tie);
-                     mapProj->setDecimalDegreesPerPixel(gsd);
-                  }
-                  else
-                  {
-                     ossimDpt tie(rect.ul().x, rect.ul().y);
-                     ossimUnitType unitType = getUnitType();
-                     if ( unitType == OSSIM_US_SURVEY_FEET)
-                     {
-                        gsd = gsd * US_METERS_PER_FT;
-                        tie = tie * US_METERS_PER_FT;
-                     }
-                     else if ( unitType == OSSIM_FEET )
-                     {
-                        gsd = gsd * MTRS_PER_FT;
-                        tie = tie * MTRS_PER_FT;
-                     }
-                        
-                     mapProj->setUlTiePoints(tie);
-                     mapProj->setMetersPerPixel(gsd);
-                  }
-               }
-            }
-         }
-      }
-   }
-   return m_projection;
-}
-
-ossimUnitType ossimFgdcXmlDoc::getUnitType() const
-{
-   ossimUnitType result = OSSIM_METERS; // default
-   ossimString units;
-   if ( getPlanarDistantUnits(units) )
-   {
-      units.downcase();
-      if ( units.contains("feet") )
-      {
-         if ( units.contains("international") )
-         {
-            result = OSSIM_FEET;
-         }
-         else
-         {
-            result = OSSIM_US_SURVEY_FEET; // Default for feet.
-         }
-      }
-   }
-   return result;
-}
-
-bool ossimFgdcXmlDoc::isOpen() const
-{
-   return m_xmlDocument.valid();
-}
-
-bool ossimFgdcXmlDoc::getGeoCsn(ossimString& s) const
-{
-   ossimString xpath = "/metadata/spref/horizsys/cordsysn/geogcsn";
-   return getPath(xpath, s);
-}
-
-bool ossimFgdcXmlDoc::getProjCsn(ossimString& s) const
-{
-   ossimString xpath = "/metadata/spref/horizsys/cordsysn/projcsn";
-   return getPath(xpath, s);
-}
-
-bool ossimFgdcXmlDoc::getAltitudeDistantUnits(ossimString& s) const
-{
-   ossimString xpath = "/metadata/spref/vertdef/altsys/altunits";
-   return getPath(xpath, s);
-}
-
-bool ossimFgdcXmlDoc::getGridCoordinateSystem(ossimString& s) const
-{
-   ossimString xpath = "/metadata/spref/horizsys/planar/gridsys/gridsysn";
-   return getPath(xpath, s);
-}
-
-ossimRefPtr<ossimProjection> ossimFgdcXmlDoc::getGridCoordSysProjection()
-{
-   static const char M[] = "ossimFgdcXmlDoc::getGridCoordSysProjection";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
-   }
-
-   if ( m_projection.valid() == false )
-   {
-      ossimString s;
-      if ( getGridCoordinateSystem(s) )
-      {
-         ossimString gridsysn = s.downcase();
-         if ( getHorizontalDatum(s) )
-         {
-            ossimString horizdn = s.downcase();
-            const ossimDatum* datum = createOssimDatum(s); // throws exception
-            
-            if ( gridsysn == "universal transverse mercator" )
-            {
-               // Get the zone:
-               if ( getUtmZone(s) )
-               {
-                  ossim_int32 zone = s.toInt32();
-
-                  //---
-                  // Note: Contruct with an origin with our datum.
-                  // "proj->setDatum" does not change the origin's datum.
-                  // This ensures theossimEpsgProjectionDatabase::findProjectionCode
-                  // sets the psc code correctly down the line.
-                  //---
-                  ossimRefPtr<ossimUtmProjection> utmProj =
-                     new ossimUtmProjection( *(datum->ellipsoid()), ossimGpt(0.0,0.0,0.0,datum) );
-                  utmProj->setDatum(datum);
-                  utmProj->setZone(zone);
-                  
-                  // Hemisphere( North false easting = 0.0, South = 10000000):
-                  bool tmpResult = getUtmFalseNorthing(s);
-                  if ( tmpResult && ( s != "0.0" ) )
-                  {
-                     utmProj->setHemisphere('S');
-                  }
-                  else
-                  {
-                     utmProj->setHemisphere('N');
-                  }
-                  utmProj->setPcsCode(0);
-
-                  ossim_float64 xRes = 0.0;
-                  ossim_float64 yRes = 0.0;
-                  if (getXRes(xRes) && getYRes(yRes))
-                  {
-                     ossimDrect rect;
-                     getBoundingBox(rect);
-
-                     ossimDpt gsd(std::fabs(xRes), std::fabs(yRes));
-                     ossimUnitType unitType = getUnitType();
-                   
-                     if (m_boundInDegree)
-                     {
-                        ossimGpt tieg(rect.ul().lat, rect.ul().lon);
-                        utmProj->setUlTiePoints(tieg);
-                     }
-                     else
-                     {
-                        ossimDpt tie(rect.ul().x, rect.ul().y);
-                        if ( unitType == OSSIM_US_SURVEY_FEET)
-                        {
-                           tie = tie * US_METERS_PER_FT;
-                        }
-                        else if ( unitType == OSSIM_FEET )
-                        {
-                           tie = tie * MTRS_PER_FT;
-                        }
-                        utmProj->setUlTiePoints(tie);
-                     }
-
-                     if ( unitType == OSSIM_US_SURVEY_FEET)
-                     {
-                        gsd = gsd * US_METERS_PER_FT;
-                     }
-                     else if ( unitType == OSSIM_FEET )
-                     {
-                        gsd = gsd * MTRS_PER_FT;
-                     }
-                     utmProj->setMetersPerPixel(gsd);
-                  }
-                  m_projection = utmProj.get(); // Capture projection.
-               }
-               else
-               {
-                  std::string errMsg = M;
-                  errMsg += " ERROR: Could not determine utm zone!";
-                  throw ossimException(errMsg);
-               }
-            }
-         }
-      }
-   }
-   
-   if ( traceDebug() )
-   {
-      if ( m_projection.valid() )
-      {
-         m_projection->print(ossimNotify(ossimNotifyLevel_DEBUG));
-      }
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exiting...\n";
-   }
-   return m_projection;
-}
-
-
-bool ossimFgdcXmlDoc::getHorizontalDatum(ossimString& s) const
-{
-   ossimString xpath = "/metadata/spref/horizsys/geodetic/horizdn";
-   return getPath(xpath, s);
-}
-
-bool ossimFgdcXmlDoc::getPlanarDistantUnits(ossimString& s) const
-{
-   ossimString xpath = "/metadata/spref/horizsys/planar/planci/plandu";
-   return getPath(xpath, s);
-}
-
-bool ossimFgdcXmlDoc::getUtmFalseNorthing(ossimString& s) const
-{
-   ossimString xpath = "/metadata/spref/horizsys/planar/gridsys/utm/transmer/fnorth";
-   return getPath(xpath, s); 
-}
-
-bool ossimFgdcXmlDoc::getUtmZone(ossimString& s) const
-{
-   ossimString xpath = "/metadata/spref/horizsys/planar/gridsys/utm/utmzone";
-   return getPath(xpath, s); 
-}
-
-bool ossimFgdcXmlDoc::getXRes(ossim_float64& v) const
-{
-   ossimString xpath = "/metadata/spdoinfo/rastinfo/rastxsz";
-   if (getPath(xpath, v) == false)
-   {
-      xpath = "/metadata/spref/horizsys/planar/planci/coordrep/absres";
-   }
-   return getPath(xpath, v);
-}
-
-bool ossimFgdcXmlDoc::getYRes(ossim_float64& v) const
-{
-   ossimString xpath = "/metadata/spdoinfo/rastinfo/rastysz";
-   if (getPath(xpath, v) == false)
-   {
-      xpath = "/metadata/spref/horizsys/planar/planci/coordrep/ordres";
-   }
-   return getPath(xpath, v);
-}
-
-bool ossimFgdcXmlDoc::getImageSize(ossimIpt& size) const
-{
-   bool result = false;
-   if (  m_xmlDocument.valid() )
-   {
-      ossimString xpath = "/metadata/spatRepInfo/GridSpatRep/axDimProps/Dimen/dimSize";
-      vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
-      m_xmlDocument->findNodes(xpath, xml_nodes);
-      if (xml_nodes.size() > 1)
-      {
-         size.x = xml_nodes[0]->getText().toInt32();
-         size.y = xml_nodes[1]->getText().toInt32();
-         result = true;
-      }
-
-      if (result == false)
-      {
-         xpath = "/metadata/spdoinfo/rastinfo/colcount";
-         ossim_float64 x = 0.0;
-         result = getPath(xpath, x);
-         if (result)
-         {
-            size.x = (ossim_int32)x;
-         }
-         xpath = "/metadata/spdoinfo/rastinfo/rowcount";
-         ossim_float64 y = 0.0;
-         result = getPath(xpath, y);
-         if (result)
-         {
-            size.y = (ossim_int32)y;
-         }
-      }
-   }
-   return result;
-}
-
-void ossimFgdcXmlDoc::getBoundingBox(ossimDrect& rect) const
-{
-   rect.makeNan();
-   
-   if (isOpen())
-   {
-      double ll_lat = 0.0;
-      double ll_lon = 0.0;
-      double lr_lat = 0.0;
-      double lr_lon = 0.0;
-      double ul_lat = 0.0;
-      double ul_lon = 0.0;
-      double ur_lat = 0.0;
-      double ur_lon = 0.0;
-     
-      ossimString xpath = "/metadata/idinfo/spdom/lboundng/leftbc";
-      bool result = getPath(xpath, ul_lon);
-      if (!result)
-      {
-         xpath = "/metadata/idinfo/spdom/bounding/westbc";
-         result = getPath(xpath, ul_lon);
-         m_boundInDegree = true;
-      }
-      if (result)
-      {
-         ll_lon = ul_lon;
-      }
-      
-      xpath = "/metadata/idinfo/spdom/lboundng/rightbc";
-      result = getPath(xpath, ur_lon);
-      if (!result)
-      {
-         xpath = "/metadata/idinfo/spdom/bounding/eastbc";
-         result = getPath(xpath, ur_lon);
-         m_boundInDegree = true;
-      }
-      if (result)
-      {
-         lr_lon = ur_lon;
-      }
-
-      xpath = "/metadata/idinfo/spdom/lboundng/bottombc";
-      result = getPath(xpath, ll_lat);
-      if (!result)
-      {
-         xpath = "/metadata/idinfo/spdom/bounding/southbc";
-         result = getPath(xpath, ll_lat);
-         m_boundInDegree = true;
-      }
-      if (result)
-      {
-         lr_lat = ll_lat;
-      }
-
-      xpath = "/metadata/idinfo/spdom/lboundng/topbc";
-      result = getPath(xpath, ul_lat);
-      if (!result)
-      {
-         xpath = "/metadata/idinfo/spdom/bounding/northbc";
-         result = getPath(xpath, ul_lat);
-         m_boundInDegree = true;
-      }
-      if (result)
-      {
-         ur_lat = ul_lat;
-      }
-      
-      rect = ossimDrect(ossimDpt(ul_lon, ul_lat),
-                        ossimDpt(ur_lon, ur_lat),
-                        ossimDpt(lr_lon, lr_lat),
-                        ossimDpt(ll_lon, ll_lat), OSSIM_RIGHT_HANDED); 
-   }
-}
-
-ossim_uint32 ossimFgdcXmlDoc::getNumberOfBands()
-{
-   ossim_uint32 numOfBands = 0;
-   ossimString s;
-   ossimString xpath = "/metadata/spdoinfo/rastinfo/vrtcount";
-   if (getPath(xpath, s))
-   {
-      numOfBands = s.toInt();
-   }
-   return numOfBands;
-}
-
-bool ossimFgdcXmlDoc::getPath(const ossimString& path, ossimString& s) const
-{
-   static const char M[] = "ossimFgdcXmlDoc::getPath";
-   
-   bool result = false;
-   if ( m_xmlDocument.valid() )
-   {
-      std::vector<ossimRefPtr<ossimXmlNode> > xnodes;
-      m_xmlDocument->findNodes(path, xnodes);
-      if ( xnodes.size() == 1 ) // Error if more than one.
-      {
-         if ( xnodes[0].valid() )
-         {
-            s = xnodes[0]->getText();
-            result = true;
-         }
-         else
-         {
-            if(traceDebug())
-            {
-               
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << M << " ERROR:\n"
-                  << "Node not found: " << path
-                  << std::endl;
-            }
-         }
-      }
-      else if ( xnodes.size() == 0 )
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN) << M << " ERROR:\nNode not found: " << path
-               << std::endl;
-         }
-      }
-      else
-      {
-         if(traceDebug())
-         {
-            
-            ossimNotify(ossimNotifyLevel_WARN)
-               << M << " ERROR:\nMultiple nodes found: " << path << std::endl;
-         }
-      }
-   }
-   if (!result)
-   {
-      s.clear();
-   }
-   return result;      
-}
-   
-bool ossimFgdcXmlDoc::getPath(const ossimString& path, ossim_float64& v) const
-{
-   ossimString s;
-   bool result = getPath(path, s);
-   if ( result )
-   {
-      v = s.toFloat64();
-   }
-   return result;
-}
-
-const ossimDatum* ossimFgdcXmlDoc::createOssimDatum(const ossimString& s) const
-{
-   ossimString horizdn = s.downcase();
-   ossimString datumCode;
-   if ( horizdn == "north american datum of 1983" )
-   {
-      datumCode = "NAR-C";
-   }
-   else if ( horizdn == "north american datum of 1927" )
-   {
-      datumCode = "NAS-C";
-   }
-   else if ( horizdn == "wgs84")
-   {
-      datumCode = "WGE";
-   }
-   else
-   {
-      std::string errMsg = "ossimFgdcXmlDoc::createOssimDatum ERROR: Unhandled datum: ";
-      errMsg += horizdn.string();
-      throw ossimException(errMsg);
-   }
-   return ossimDatumFactoryRegistry::instance()->create(datumCode);   
-}
diff --git a/src/ossim/support_data/ossimIkonosMetaData.cpp b/src/ossim/support_data/ossimIkonosMetaData.cpp
deleted file mode 100644
index 8e803a0..0000000
--- a/src/ossim/support_data/ossimIkonosMetaData.cpp
+++ /dev/null
@@ -1,599 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Description:
-// 
-// Class definition for ossimIkonosMetaData.
-// 
-// This class parses a Space Imaging Ikonos meta data file.
-//
-//********************************************************************
-// $Id: ossimIkonosMetaData.cpp 17206 2010-04-25 23:20:40Z dburken $
-
-#include <cstdio>
-#include <iostream>
-#include <ossim/support_data/ossimIkonosMetaData.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimTrace.h>
-
-RTTI_DEF1(ossimIkonosMetaData, "ossimIkonosMetaData", ossimObject);
-
-// Define Trace flags for use within this file:
-static ossimTrace traceExec  ("ossimIkonosMetaData:exec");
-static ossimTrace traceDebug ("ossimIkonosMetaData:debug");
-
-ossimIkonosMetaData::ossimIkonosMetaData()
-  :
-  theNominalCollectionAzimuth(0.0),
-  theNominalCollectionElevation(0.0),
-  theSunAzimuth(0.0),
-  theSunElevation(0.0),
-  theNumBands(0),
-  theBandName("Unknown"),
-  theProductionDate("Unknown"),
-  theAcquisitionDate("Unknown"),
-  theAcquisitionTime("Unknown"),
-  theSensorID("Unknown")
-{
-}
-
-ossimIkonosMetaData::~ossimIkonosMetaData()
-{
-}
-
-bool ossimIkonosMetaData::open(const ossimFilename& imageFile)
-{
-   static const char MODULE[] = "ossimIkonosMetaData::open";
-   
-   clearFields();
-   
-   //retrieve information from the metadata file
-   //if the ikonos tif is po_2619900_pan_0000000.tif
-   //the metadata file will be po_2619900_metadata.txt
-
-   ossimString separator("_");
-   ossimString filenamebase = imageFile.fileNoExtension();
-   std::vector< ossimString > filenameparts = filenamebase.split(separator);
-   
-   if(filenameparts.size() < 2)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE << " Ikonos filename non standard" << std::endl;
-      }
-      return false;
-   }
-   ossimFilename metadatafile = filenameparts[0];
-   metadatafile += "_";
-   metadatafile += filenameparts[1];
-   metadatafile += "_metadata.txt";
-   
-   metadatafile.setPath(imageFile.path());
-   
-   if( parseMetaData(metadatafile) == false )
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << MODULE << " errors parsing metadata" << std::endl;
-      }
-      return false;
-   }
-   
-   ossimFilename hdrfile = imageFile;
-   hdrfile.setExtension(ossimString("hdr"));
-   if( parseHdrData(hdrfile) == false )
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << MODULE << " errors parsing hdr" << std::endl;
-      }
-      return false;
-   }
-   
-   ossimFilename rpcfile = imageFile.noExtension();
-   rpcfile += "_rpc.txt";
-   if (parseRpcData (rpcfile) == false)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << MODULE << " errors parsing rpc" << std::endl;
-      }
-      return false;
-   }
-
-   return true;
-}
-
-void ossimIkonosMetaData::clearFields()
-{
-  theNominalCollectionAzimuth = 0.0;
-  theNominalCollectionElevation = 0.0;
-  theSunAzimuth = 0.0;
-  theSunElevation = 0.0;
-  theNumBands = 0;
-  theBandName = "Unknown";
-  theProductionDate = "Unknown";
-  theAcquisitionDate = "Unknown";
-  theAcquisitionTime = "Unknown";
-  theSensorID = "Unknown";
-}
-
-std::ostream& ossimIkonosMetaData::print(std::ostream& out) const
-{
-
-  out << "\n----------------- Info on Ikonos Image -------------------"
-      << "\n  "
-      << "\n  Nominal Azimuth:    " << theNominalCollectionAzimuth
-      << "\n  Nominal Elevation:   " << theNominalCollectionElevation
-      << "\n  Sun Azimuth:    " << theSunAzimuth
-      << "\n  Sun Elevation:   " << theSunElevation
-      << "\n  Number of bands:   " << theNumBands
-      << "\n  Band name:   " << theBandName
-      << "\n  Production date:   " << theProductionDate
-      << "\n  Acquisition date:   " << theAcquisitionDate
-      << "\n  Acquisition time:   " << theAcquisitionTime
-      << "\n  Sensor Type:   " << theSensorID
-      << "\n"
-      << "\n---------------------------------------------------------"
-      << "\n  " << std::endl;
-  return out;
-}
-
-ossimString ossimIkonosMetaData::getSensorID() const
-{
-  return theSensorID;
-}
-
-bool ossimIkonosMetaData::saveState(ossimKeywordlist& kwl,
-                                    const char* prefix)const
-{
-
-  kwl.add(prefix,
-          ossimKeywordNames::TYPE_KW,
-          "ossimIkonosMetaData",
-          true);
-
-  kwl.add(prefix,
-          "nominal_collection_azimuth_angle",
-          theNominalCollectionAzimuth,
-          true);
-
-  kwl.add(prefix,
-          "nominal_collection_elevation_angle",
-          theNominalCollectionElevation,
-          true);
-          
-  kwl.add(prefix,
-          ossimKeywordNames::AZIMUTH_ANGLE_KW,
-          theSunAzimuth,
-          true);
-
-  kwl.add(prefix,
-          ossimKeywordNames::ELEVATION_ANGLE_KW,
-          theSunElevation,
-          true);
-
-  kwl.add(prefix,
-          ossimKeywordNames::NUMBER_BANDS_KW,
-          theNumBands,
-          true);
-
-  kwl.add(prefix,
-          "band_name",
-          theBandName,
-          true);
-
-  kwl.add(prefix,
-          "production_date",
-          theProductionDate,
-          true);
-
-  kwl.add(prefix,
-          "acquisition_date",
-          theAcquisitionDate,
-          true);
-
-  kwl.add(prefix,
-          "acquisition_time",
-          theAcquisitionTime,
-          true);
-
-  kwl.add(prefix,
-          "sensor",
-          theSensorID,
-          true);
-
-  return true;
-}
-
-bool ossimIkonosMetaData::loadState(const ossimKeywordlist& kwl,
-                                    const char* prefix)
-{
-   clearFields();
-
-   const char* lookup = 0;
-   ossimString s;
-  
-   lookup = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
-   if (lookup)
-   {
-      s = lookup;
-      if(s != "ossimIkonosMetaData")
-      {
-         return false;
-      }
-   }
-
-  lookup = kwl.find(prefix, "nominal_collection_azimuth_angle");
-  if (lookup)
-  {
-     s = lookup;
-     theNominalCollectionAzimuth = s.toFloat64();
-  }
-
-  lookup = kwl.find(prefix, "nominal_collection_elevation_angle");
-  if (lookup)
-  {
-     s = lookup;
-     theNominalCollectionElevation = s.toFloat64();
-  }
-  
-   lookup = kwl.find(prefix, ossimKeywordNames::AZIMUTH_ANGLE_KW);
-   if (lookup)
-   {
-      s = lookup;
-      theSunAzimuth = s.toFloat64();
-   }
-
-   lookup = kwl.find(prefix, ossimKeywordNames::ELEVATION_ANGLE_KW);
-   if (lookup)
-   {
-      s = lookup;
-      theSunElevation = s.toFloat64();
-   }
-  
-   lookup = kwl.find(prefix, ossimKeywordNames::NUMBER_BANDS_KW);
-   if (lookup)
-   {
-      s = lookup;
-      theNumBands = s.toUInt32();
-   }
-
-   lookup = kwl.find(prefix, "band_name");
-   if (lookup)
-   {
-      theBandName = lookup;
-   }
-
-   lookup = kwl.find(prefix, "production_date");
-   if (lookup)
-   {
-      theProductionDate = lookup;
-   }
-
-  lookup = kwl.find(prefix, "acquisition_date");
-  if (lookup)
-  {
-     theAcquisitionDate = lookup;
-  }
-
-  lookup = kwl.find(prefix, "acquisition_time");
-  if (lookup)
-  {
-     theAcquisitionTime = lookup;
-  }
-
-  lookup = kwl.find(prefix, "sensor");
-  if (lookup)
-  {
-     theSensorID = lookup;
-  }
-  
-   return true;
-}
-
-//*****************************************************************************
-// PROTECTED METHOD: ossimIkonosMetaData::parseMetaData()
-//
-//  Parses the Ikonos metadata file.
-//
-//*****************************************************************************
-bool ossimIkonosMetaData::parseMetaData(const ossimFilename& data_file)
-{
-   if (traceExec())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimIkonosRpcModel::parseMetaData(data_file): entering..."
-         << std::endl;
-   }
-
-   FILE* fptr = fopen (data_file, "r");
-   if (!fptr)
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimIkonosRpcModel::parseMetaData(data_file) DEBUG:"
-            << "\nCould not open Meta data file:  " << data_file
-            << "\nreturning with error..." << std::endl;
-      }
-      return false;
-   }
-
-   char* strptr;
-   char dummy[80], name[80];
-   double value;
-
-   //---
-   // Read the file into a buffer:
-   //---
-   ossim_int32 fileSize = static_cast<ossim_int32>(data_file.fileSize());
-   char* filebuf = new char[fileSize];
-   fread(filebuf, 1, fileSize, fptr);
-   fclose(fptr);
-
-   //---
-   // Production date:
-   //---
-   strptr = strstr(filebuf, "\nCreation Date:");
-   if (!strptr)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
-            << "\n\tAborting construction. Error encountered parsing "
-            << "presumed meta-data file." << std::endl;
-      }
-      delete [] filebuf;
-      return false;
-   }
-
-   sscanf(strptr, "%15c %s", dummy, name);
-   theProductionDate = name;
-
-   //***
-   // Sensor Type:
-   //***
-   strptr = strstr(strptr, "\nSensor:");
-   if (!strptr)
-   {
-      if(traceDebug())
-      { 
-         ossimNotify(ossimNotifyLevel_FATAL)
-            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
-            << "\n\tAborting construction. Error encountered parsing "
-            << "presumed meta-data file." << std::endl;
-      }
-      delete [] filebuf;
-      return false;
-   }
-
-   sscanf(strptr, "%8c %s", dummy, name);
-   theSensorID = name;
-
-
-   //***
-   // Nominal Azimuth:
-   //***
-   strptr = strstr(strptr, "\nNominal Collection Azimuth:");
-   if (!strptr)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
-            << "\n\tAborting construction. Error encountered parsing "
-            << "presumed meta-data file." << std::endl;
-      }
-      delete [] filebuf;
-      return false;
-   }
-
-   sscanf(strptr, "%28c %lf %s", dummy, &value, dummy);
-   theNominalCollectionAzimuth = value;
-
-   //***
-   // Nominal Elevation:
-   //***
-   strptr = strstr(strptr, "\nNominal Collection Elevation:");
-   if (!strptr)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
-            << "\n\tAborting construction. Error encountered parsing "
-            << "presumed meta-data file." << std::endl;
-      }
-      delete [] filebuf;
-      return false;
-   }
-  
-   sscanf(strptr, "%31c %lf %s", dummy, &value, dummy);
-   theNominalCollectionElevation = value;
-
-   //***
-   // Sun Azimuth:
-   //***
-   strptr = strstr(strptr, "\nSun Angle Azimuth:");
-   if (!strptr)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
-            << "\n\tAborting construction. Error encountered parsing "
-            << "presumed meta-data file." << std::endl;
-      }
-      delete [] filebuf;
-      return false;
-   }
-
-   sscanf(strptr, "%19c %lf %s", dummy, &value, dummy);
-   theSunAzimuth = value;
-
-   //***
-   // Sun Elevation:
-   //***
-   strptr = strstr(strptr, "\nSun Angle Elevation:");
-   if (!strptr)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-            << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
-            << "\n\tAborting construction. Error encountered parsing "
-            << "presumed meta-data file." << std::endl;
-      }
-      delete [] filebuf;
-      return false;
-   }
-
-   sscanf(strptr, "%21c %lf %s", dummy, &value, name);
-   theSunElevation = value;
-
-   //---
-   // Acquisition date and time:
-   //---
-   strptr = strstr(filebuf, "\nAcquisition Date/Time:");
-   if (!strptr)
-   {
-      if(traceDebug())
-      {
-      ossimNotify(ossimNotifyLevel_FATAL)
-          << "FATAL ossimIkonosRpcModel::parseMetaData(data_file): "
-          << "\n\tAborting construction. Error encountered parsing "
-          << "presumed meta-data file." << std::endl;
-      }
-      delete [] filebuf;
-      return false;
-   }
-
-   char name2[80];
-   sscanf(strptr, "%23c %s %s", dummy, name, name2);
-   theAcquisitionDate = name;
-   theAcquisitionTime = name2;
-
-   delete [] filebuf;
-   filebuf = 0;
-
-   if (traceExec())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimIkonosRpcModel::parseMetaData(data_file): returning..."
-         << std::endl;
-   }
-
-   return true;
-}
-
-//*****************************************************************************
-// PROTECTED METHOD: ossimIkonosMetaData::parseHdrData()
-//
-//  Parses the Ikonos hdr file.
-//
-//*****************************************************************************
-bool ossimIkonosMetaData::parseHdrData(const ossimFilename& data_file)
-{
-   if (traceExec())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimIkonosRpcModel::parseHdrData(data_file): entering..."
-         << std::endl;
-   }
-
-   FILE* fptr = fopen (data_file, "r");
-   if (!fptr)
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimIkonosRpcModel::parseHdrData(data_file) WARN:"
-            << "\nCould not open hdr data file <" << data_file << ">. "
-            << "returning with error..." << std::endl;
-      }
-      return false;
-   }
-
-   char* strptr;
-   // char linebuf[80];
-   char dummy[80];
-   char name[80];
-   int value=0;
-
-   //***
-   // Read the file into a buffer:
-   //***
-   char filebuf[5000];
-   fread(filebuf, 1, 5000, fptr);
-   fclose(fptr);
-
-   //***
-   // Band name:
-   //***
-   strptr = strstr(filebuf, "\nBand:");
-   if (!strptr)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimIkonosRpcModel::parseHdrData(data_file):"
-            << "\n\tAborting construction. Error encountered parsing "
-            << "presumed hdr file." << std::endl;
-      }
-
-      return false;
-   }
-
-   sscanf(strptr, "%6c %s", dummy, name);
-   theBandName = name;
-
-   //***
-   // Number of Bands:
-   //***
-   strptr = strstr(filebuf, "\nNumber of Bands:");
-   if (!strptr)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimIkonosRpcModel::parseHdrData(data_file):"
-            << "\n\tAborting construction. Error encountered parsing "
-            << "presumed hdr file." << std::endl;
-      }
-
-      return false;
-   }
-
-   sscanf(strptr, "%17c %d", dummy, &value);
-   theNumBands = value;
-
-   if (traceExec())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimIkonosRpcModel::parseHdrData(data_file): returning..."
-         << std::endl;
-   }
-   return true;
-}
-
-//*****************************************************************************
-// PROTECTED METHOD: ossimIkonosMetaData::parseRpcData()
-//
-//  Parses the Ikonos rpc file.
-//
-//*****************************************************************************
-bool ossimIkonosMetaData::parseRpcData(const ossimFilename& /* data_file */)
-{
-   return true;
-}
diff --git a/src/ossim/support_data/ossimInfoBase.cpp b/src/ossim/support_data/ossimInfoBase.cpp
deleted file mode 100644
index 6acc6c4..0000000
--- a/src/ossim/support_data/ossimInfoBase.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Base class for Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/support_data/ossimInfoBase.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <sstream>
-
-ossimInfoBase::ossimInfoBase()
-   : theOverviewFlag(true)
-{}
-
-ossimInfoBase::~ossimInfoBase()
-{}
-
-void ossimInfoBase::setProcessOverviewFlag(bool flag)
-{
-   theOverviewFlag = flag;
-}
-
-bool ossimInfoBase::getProcessOverviewFlag() const
-{
-   return theOverviewFlag;
-}
-
-bool ossimInfoBase::getKeywordlist(ossimKeywordlist& kwl)const
-{  
-   // Do a print to a memory stream.
-   std::ostringstream out;
-   print(out);
-
-   std::istringstream in(out.str());
-   // Give the result to the keyword list.
-   return kwl.parseStream(in);
-}
diff --git a/src/ossim/support_data/ossimInfoFactory.cpp b/src/ossim/support_data/ossimInfoFactory.cpp
deleted file mode 100644
index 5b2b818..0000000
--- a/src/ossim/support_data/ossimInfoFactory.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Factory for info objects.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimInfoFactory.cpp 22118 2013-01-18 21:05:14Z dburken $
-
-#include <ossim/support_data/ossimInfoFactory.h>
-#include <ossim/support_data/ossimInfoBase.h>
-#include <ossim/support_data/ossimCcfInfo.h>
-#include <ossim/support_data/ossimDemInfo.h>
-#include <ossim/support_data/ossimDoqq.h>
-#include <ossim/support_data/ossimDtedInfo.h>
-#include <ossim/support_data/ossimEnviInfo.h>
-#include <ossim/support_data/ossimJ2kInfo.h>
-#include <ossim/support_data/ossimJp2Info.h>
-#include <ossim/support_data/ossimLasInfo.h>
-#include <ossim/support_data/ossimNitfInfo.h>
-#include <ossim/support_data/ossimRpfInfo.h>
-#include <ossim/support_data/ossimTiffInfo.h>
-#include <ossim/support_data/ossimXmpInfo.h>
-
-#include <ossim/base/ossimFilename.h>
-
-ossimInfoFactory* ossimInfoFactory::theInstance = 0;
-
-ossimInfoFactory::~ossimInfoFactory()
-{}
-
-ossimInfoFactory* ossimInfoFactory::instance()
-{
-   if ( !theInstance )
-   {
-      theInstance = new ossimInfoFactory;
-   }
-   return theInstance;
-}
-
-ossimInfoBase* ossimInfoFactory::create(const ossimFilename& file) const
-{
-   ossimRefPtr<ossimInfoBase> result = 0;
-
-   result = new ossimTiffInfo();
-   if ( result->open(file) )
-   {
-      return result.release();
-   }
-
-   result = new ossimJp2Info();
-   if ( result->open(file) )
-   {
-      return result.release();
-   }
-
-   result = new ossimNitfInfo();
-   if ( result->open(file) )
-   {
-      return result.release();
-   }
-
-   result = new ossimDemInfo();
-   if ( result->open(file) )
-   {
-      return result.release();
-   }
-
-   result = new ossimDtedInfo();
-   if ( result->open(file) )
-   {
-      return result.release();
-   }
-
-   result = new ossimEnviInfo();
-   if ( result->open(file) )
-   {
-      return result.release();
-   }
-
-   result = new ossimRpfInfo();
-   if ( result->open(file) )
-   {
-      return result.release();
-   }
-   
-   result = new ossimXmpInfo();
-   if ( result->open(file) )
-   {
-      return result.release();
-   }
-   
-   result = new ossimLasInfo();
-   if ( result->open(file) )
-   {
-      return result.release();
-   }
-
-   result = new ossimDoqq();
-   if ( result->open(file) )
-   {
-      return result.release();
-   }
-
-   result = new ossimJ2kInfo();
-   if ( result->open(file) )
-   {
-      return result.release();
-   }
-   
-   result = new ossimCcfInfo();
-   if ( result->open(file) )
-   {
-      return result.release();
-   }
-   
-   return 0;
-}
-
-ossimInfoFactory::ossimInfoFactory()
-{}
-
-ossimInfoFactory::ossimInfoFactory(const ossimInfoFactory& /* obj */ )
-{}
-
-const ossimInfoFactory& ossimInfoFactory::operator=(
-   const ossimInfoFactory& /* rhs */)
-{
-   return *this;
-}
diff --git a/src/ossim/support_data/ossimJ2kCodRecord.cpp b/src/ossim/support_data/ossimJ2kCodRecord.cpp
deleted file mode 100644
index 42e5abc..0000000
--- a/src/ossim/support_data/ossimJ2kCodRecord.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Container class for J2K Coding style default (COD) record.
-//
-// See document BPJ2K01.00 Table 7-7 Image and tile size (15444-1 Annex A5.1)
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimJ2kCodRecord.h,v 1.5 2005/10/13 21:24:47 dburken Exp $
-
-#include <iostream>
-#include <iomanip>
-
-#include <ossim/support_data/ossimJ2kCodRecord.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimEndian.h>
-
-
-ossimJ2kCodRecord::ossimJ2kCodRecord()
-   :
-   theMarker(0xff52),
-   theLcod(0),
-   theScod(0),
-   theSGcod(0),
-   theSPcod(0)
-{
-}
-
-ossimJ2kCodRecord::~ossimJ2kCodRecord()
-{
-}
-
-void ossimJ2kCodRecord::parseStream(std::istream& in)
-{
-   // Get the stream posistion.
-   std::streamoff pos = in.tellg();
-
-   // Note: Marker is not read.
-   in.read((char*)&theLcod,      2);
-   in.read((char*)&theScod,      1);
-   in.read((char*)&theSGcod,     4);
-   in.read((char*)&theSPcod,     4);
-
-   if (ossim::byteOrder() == OSSIM_LITTLE_ENDIAN)
-   {
-      // Stored big endian, must swap.
-      ossimEndian s;
-      s.swap(theLcod);
-      s.swap(theSGcod);
-   }
-
-   //---
-   // Seek to next record.  This is needed because there are sometimes extra
-   // bytes.
-   //---
-   in.seekg(pos + theLcod, std::ios_base::beg);
-}
-
-std::ostream& ossimJ2kCodRecord::print(std::ostream& out,
-                                       const std::string& prefix) const
-{
-   // Capture the original flags.
-   std::ios_base::fmtflags f = out.flags();
-
-   std::string pfx = prefix;
-   pfx += "cod.";
-
-   out.setf(std::ios_base::hex, std::ios_base::basefield);
-   out << pfx << "marker: 0x" << theMarker << "\n";
-   out.setf(std::ios_base::fmtflags(0), std::ios_base::basefield);
-
-   out << pfx << "Lcod:   " << theLcod       << "\n"
-       << pfx << "Scod:   " << int(theScod)  << "\n"
-       << pfx << "SGcod:  " << theSGcod      << "\n"
-       << pfx << "SPcod:  " << int(theSPcod)
-       << std::endl;
-
-   // Reset flags.
-   out.setf(f);
-
-   return out;
-}
-
-std::ostream& operator<<(std::ostream& out, const ossimJ2kCodRecord& obj)
-{
-   return obj.print(out);
-}
diff --git a/src/ossim/support_data/ossimJ2kInfo.cpp b/src/ossim/support_data/ossimJ2kInfo.cpp
deleted file mode 100644
index 0204119..0000000
--- a/src/ossim/support_data/ossimJ2kInfo.cpp
+++ /dev/null
@@ -1,248 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: J2K Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-#include <fstream>
-#include <iostream>
-#include <iomanip>
-#include <sstream>
-#include <ossim/support_data/ossimJ2kInfo.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/support_data/ossimJ2kCodRecord.h>
-#include <ossim/support_data/ossimJ2kSizRecord.h>
-#include <ossim/support_data/ossimJ2kSotRecord.h>
-
-// Static trace for debugging
-static ossimTrace traceDebug("ossimJ2kInfo:debug");
-static ossimTrace traceDump("ossimJ2kInfo:dump"); // This will dump offsets.
-
-static const ossim_uint16 SOC_MARKER = 0xff4f; // start of codestream marker
-static const ossim_uint16 SIZ_MARKER = 0xff51; // size maker
-static const ossim_uint16 COD_MARKER = 0xff52; // cod maker
-static const ossim_uint16 SOT_MARKER = 0xff90; // start of tile marker
-static const ossim_uint16 EOC_MARKER = 0xffd9; // End of codestream marker.
-
-ossimJ2kInfo::ossimJ2kInfo()
-   : ossimInfoBase(),
-     theFile(),
-     theEndian(0)
-{
-}
-
-ossimJ2kInfo::~ossimJ2kInfo()
-{
-   if (theEndian)
-   {
-      delete theEndian;
-      theEndian = 0;
-   }
-}
-
-bool ossimJ2kInfo::open(const ossimFilename& file)
-{
-   bool result = false;
-
-   //---
-   // Open the file.
-   //---
-   std::ifstream str(file.c_str(), std::ios_base::binary|std::ios_base::in);
-   if (str.good()) 
-   {
-      if (ossim::byteOrder() == OSSIM_LITTLE_ENDIAN)
-      {
-         if (!theEndian)
-         {
-            theEndian = new ossimEndian();
-         }
-      }
-      else if (theEndian)
-      {
-         delete theEndian;
-         theEndian = 0;
-      }
-
-      //---
-      // Check for the Start Of Codestream (SOC) and Size (SIZ) markers which
-      // are required as first and second fields in the main header.
-      //---
-      ossim_uint16 soc;
-      ossim_uint16 siz;
-      readShort(soc, str);
-      readShort(siz, str);
-
-      if ( (soc == SOC_MARKER) && (siz == SIZ_MARKER) )
-      {
-         result = true; // Is a j2k...
-      }
-   }
-
-   if (result)
-   {
-      theFile = file;
-   }
-   else
-   {
-      theFile.clear();
-      if (theEndian)
-      {
-         delete theEndian;
-         theEndian = 0;
-      }
-   }
-
-   return result;
-}
-
-std::ostream& ossimJ2kInfo::print(std::ostream& out) const
-{
-   static const char MODULE[] = "ossimJ2kInfo::print";
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " DEBUG Entered...\n";
-   }
-      
-   //---
-   // Open the tif file.
-   //---
-   std::ifstream str(theFile.c_str(), std::ios_base::binary|std::ios_base::in);
-   if (str.good())
-   {
-      ossim_uint16 marker;
-      readShort(marker, str); // SOC
-      readShort(marker, str); // SIZ
-
-      std::string prefix = "j2k.";
-
-      // SIZ marker required next.
-      printSizMarker(out, prefix, str);
-
-      readShort(marker, str);
-      
-      while ( str.good() && (marker != EOC_MARKER) ) // marker != SOT_MARKER )
-      {
-         switch(marker)
-         {
-            case COD_MARKER:
-            {
-               printCodMarker(out, prefix, str);
-               break;
-            }
-            case SOT_MARKER:
-            {
-               printSotMarker(out, prefix, str);
-               break;
-            }
-            default:
-            {
-               printUnknownMarker(out, prefix, str, marker);
-            }
-         }
-
-         readShort(marker, str);
-        
-      }
-   }
-   else
-   {
-      if (traceDebug())
-      {
-         out << MODULE << " Cannot open file:  " << theFile << std::endl;
-      }
-   }
-
-   return out;
-}
-
-void ossimJ2kInfo::readShort(ossim_uint16& s, std::ifstream& str) const
-{
-   str.read((char*)&s, sizeof(s));
-   if (theEndian)
-   {
-      theEndian->swap(s);
-   }
-}
-
-std::ostream& ossimJ2kInfo::printCodMarker(std::ostream& out,
-                                           const std::string& prefix,
-                                           std::ifstream& str) const
-{
-   ossimJ2kCodRecord siz;
-   siz.parseStream(str);
-   siz.print(out, prefix);
-   return out;
-}
-
-std::ostream& ossimJ2kInfo::printSizMarker(std::ostream& out,
-                                           const std::string& prefix,
-                                           std::ifstream& str) const
-{
-   ossimJ2kSizRecord siz;
-   siz.parseStream(str);
-   siz.print(out, prefix);
-   return out;
-}
-
-std::ostream& ossimJ2kInfo::printSotMarker(std::ostream& out,
-                                           const std::string& prefix,
-                                           std::ifstream& str) const
-{
-   // Get the stream posistion.
-   std::streamoff pos = str.tellg();
-   
-   ossimJ2kSotRecord sot;
-   sot.parseStream(str);
-   pos += sot.thePsot - 2;
-
-   // Seek past the tile to the next marker.
-   str.seekg(pos, std::ios_base::beg);
-   
-   sot.print(out,prefix);
-   return out;
-}
-
-
-std::ostream& ossimJ2kInfo::printUnknownMarker(std::ostream& out,
-                                               const std::string& prefix,
-                                               std::ifstream& str,
-                                               ossim_uint16 marker) const
-{
-   // Capture the original flags.
-   std::ios_base::fmtflags f = out.flags();
-
-   ossim_uint16 segmentLength;
-   readShort(segmentLength, str);
-
-   std::string pfx = prefix;
-   pfx += "unkown.";
-
-   out.setf(std::ios_base::hex, std::ios_base::basefield);
-   out << pfx << "marker: 0x" << std::setfill('0') << std::setw(4)
-       << marker << "\n";
-   out.setf(std::ios_base::fmtflags(0), std::ios_base::basefield);
-   
-   out << pfx << "length: " << segmentLength
-       << std::endl;
-
-   // Reset flags.
-   out.setf(f);
-
-   // Seek to the next marker.
-   str.seekg( (segmentLength-2), std::ios_base::cur);
-
-   return out;
-}
-      
-
diff --git a/src/ossim/support_data/ossimJ2kSizRecord.cpp b/src/ossim/support_data/ossimJ2kSizRecord.cpp
deleted file mode 100644
index 91a069c..0000000
--- a/src/ossim/support_data/ossimJ2kSizRecord.cpp
+++ /dev/null
@@ -1,169 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Container class for J2K Image and tile size (SIZ) record.
-//
-// See document BPJ2K01.00 Table 7-6 Image and tile size (15444-1 Annex A5.1)
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimJ2kSizRecord.h,v 1.5 2005/10/13 21:24:47 dburken Exp $
-
-#include <iostream>
-#include <iomanip>
-
-#include <ossim/support_data/ossimJ2kSizRecord.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimEndian.h>
-
-
-ossimJ2kSizRecord::ossimJ2kSizRecord()
-   :
-   theMarker(0xff51),
-   theLsiz(0),
-   theRsiz(0),
-   theXsiz(0),
-   theYsiz(0),
-   theXOsiz(0),
-   theYOsiz(0),
-   theXTsiz(0),
-   theYTsiz(0),
-   theXTOsiz(0),
-   theYTOsiz(0),
-   theCsiz(0),
-   theSsiz(0),
-   theXRsiz(0),
-   theYRsiz(0)
-{
-}
-
-ossimJ2kSizRecord::~ossimJ2kSizRecord()
-{
-}
-
-void ossimJ2kSizRecord::parseStream(std::istream& in)
-{
-   // Get the stream posistion.
-   std::streamoff pos = in.tellg();
-
-   // Note: Marker is not read.
-   in.read((char*)&theLsiz,      2);
-   in.read((char*)&theRsiz,      2);
-   in.read((char*)&theXsiz,      4);
-   in.read((char*)&theYsiz,      4);
-   in.read((char*)&theXOsiz,     4);
-   in.read((char*)&theYOsiz,     4);
-   in.read((char*)&theXTsiz,     4);
-   in.read((char*)&theYTsiz,     4);
-   in.read((char*)&theXTOsiz,    4);
-   in.read((char*)&theYTOsiz,    4);
-   in.read((char*)&theCsiz,      2);
-   in.read((char*)&theSsiz,      1);
-   in.read((char*)&theXRsiz,     1);
-   in.read((char*)&theYRsiz,     1);
-
-   if (ossim::byteOrder() == OSSIM_LITTLE_ENDIAN)
-   {
-      // Stored big endian, must swap.
-      ossimEndian s;
-      s.swap(theLsiz);
-      s.swap(theRsiz);
-      s.swap(theXsiz);
-      s.swap(theYsiz);
-      s.swap(theXOsiz);
-      s.swap(theYOsiz);
-      s.swap(theXTsiz);
-      s.swap(theYTsiz);
-      s.swap(theXTOsiz);
-      s.swap(theYTOsiz);
-      s.swap(theCsiz);
-   }
-
-   //---
-   // Seek to next record.  This is needed because there are sometimes extra
-   // bytes.
-   //---
-   in.seekg(pos + theLsiz, std::ios_base::beg);
-}
-
-ossimScalarType ossimJ2kSizRecord::getScalarType() const
-{
-   ossimScalarType result = OSSIM_SCALAR_UNKNOWN;
-
-   // Bits per pixel first seven bits plus one.
-   ossim_uint8 bpp = ( theSsiz & 0x3f ) + 1;
-
-   // Signed bit is msb.
-   bool isSigned = ( theSsiz & 0x80 ) ? true : false;
-
-   // std::cout << "bpp: " << int(bpp) << " signed: " << isSigned << std::endl;
-      
-   if(bpp <= 8)
-   {
-      if(isSigned == 0)
-      {
-         result = OSSIM_UINT8;
-      }
-      else if(isSigned == 1)
-      {
-         result = OSSIM_SINT8;
-      }
-   }
-   else if(bpp <= 16)
-   {
-      if(isSigned == 0)
-      {
-         result = OSSIM_UINT16;
-      }
-      else if(isSigned == 1)
-      {
-         result = OSSIM_SINT16;
-      }
-   }
-   return result;
-}
-
-std::ostream& ossimJ2kSizRecord::print(std::ostream& out,
-                                       const std::string& prefix) const
-{
-   // Capture the original flags.
-   std::ios_base::fmtflags f = out.flags();
-
-   std::string pfx = prefix;
-   pfx += "siz.";
-
-   out.setf(std::ios_base::hex, std::ios_base::basefield);
-   out << pfx << "marker: 0x" << theMarker << "\n";
-   out.setf(std::ios_base::fmtflags(0), std::ios_base::basefield);
-
-   out << pfx << "Lsiz:   " << theLsiz       << "\n"
-       << pfx << "Rsiz:   " << theRsiz       << "\n"
-       << pfx << "Xsiz:   " << theXsiz       << "\n"
-       << pfx << "Yziz:   " << theYsiz       << "\n"
-       << pfx << "XOsiz:  " << theXOsiz      << "\n"
-       << pfx << "YOsiz:  " << theYOsiz      << "\n"
-       << pfx << "XTsiz:  " << theXTsiz      << "\n"
-       << pfx << "YTsiz:  " << theYTsiz      << "\n"
-       << pfx << "XTOsiz: " << theXTOsiz     << "\n"
-       << pfx << "YTOsiz: " << theYTOsiz     << "\n"
-       << pfx << "Csiz:   " << theCsiz       << "\n"
-       << pfx << "Ssiz:   " << int(theSsiz)  << "\n"
-       << pfx << "XRsiz:  " << int(theXRsiz) << "\n"
-       << pfx << "YRsiz:  " << int(theYRsiz)
-       << std::endl;
-
-   // Reset flags.
-   out.setf(f);
-
-   return out;
-}
-
-std::ostream& operator<<(std::ostream& out, const ossimJ2kSizRecord& obj)
-{
-   return obj.print(out);
-}
diff --git a/src/ossim/support_data/ossimJ2kSotRecord.cpp b/src/ossim/support_data/ossimJ2kSotRecord.cpp
deleted file mode 100644
index b4f0d22..0000000
--- a/src/ossim/support_data/ossimJ2kSotRecord.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// // Description: Container class for J2K "Start Of Tile" (SOT) record.
-//
-// See document BPJ2K01.00 Table 7-3 Image and tile size (15444-1 Annex A.4.2)
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimJ2kSotRecord.h,v 1.5 2005/10/13 21:24:47 dburken Exp $
-
-#include <iostream>
-#include <iomanip>
-
-#include <ossim/support_data/ossimJ2kSotRecord.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimEndian.h>
-
-ossimJ2kSotRecord::ossimJ2kSotRecord()
-   :
-   theMarker(0xff90),
-   theLsot(0),
-   theIsot(0),
-   thePsot(0),
-   theTpsot(0),
-   theTnsot(0)
-{
-}
-
-ossimJ2kSotRecord::~ossimJ2kSotRecord()
-{
-}
-
-void ossimJ2kSotRecord::parseStream(std::istream& in)
-{
-   // Note: marker not read...
-   
-   in.read((char*)&theLsot,  2);
-   in.read((char*)&theIsot,  2);
-   in.read((char*)&thePsot,  4);
-   in.read((char*)&theTpsot, 1);
-   in.read((char*)&theTnsot, 1);
-
-   if (ossim::byteOrder() == OSSIM_LITTLE_ENDIAN)
-   {
-      // Stored big endian, must swap.
-      ossimEndian s;
-      s.swap(theLsot);
-      s.swap(theIsot);
-      s.swap(thePsot);
-   }
-}
-
-std::ostream& ossimJ2kSotRecord::print(std::ostream& out,
-                                       const std::string& prefix) const
-{
-   // Capture the original flags.
-   std::ios_base::fmtflags f = out.flags();
-
-   std::string pfx = prefix;
-   pfx += "sot.";
-
-   out.setf(std::ios_base::hex, std::ios_base::basefield);
-   out << pfx << "marker: 0x" << theMarker << "\n";
-   out.setf(std::ios_base::fmtflags(0), std::ios_base::basefield);
-
-   out << pfx << "Lsot:   "  << theLsot      << "\n"
-       << pfx << "Isot:   "  << theIsot      << "\n"
-       << pfx << "Psot:   "  << thePsot      << "\n"
-       << pfx << "Tpsot:  " << int(theTpsot) << "\n"
-       << pfx << "Tnsot:  " << int(theTnsot)
-       << std::endl;
-
-   // Reset flags.
-   out.setf(f);
-
-   return out;
-}
-
-std::ostream& operator<<(std::ostream& out, const ossimJ2kSotRecord& obj)
-{
-   return obj.print(out);
-}
diff --git a/src/ossim/support_data/ossimJp2Info.cpp b/src/ossim/support_data/ossimJp2Info.cpp
deleted file mode 100644
index 22d26db..0000000
--- a/src/ossim/support_data/ossimJp2Info.cpp
+++ /dev/null
@@ -1,211 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: JP2 Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimJp2Info.cpp 20504 2012-01-27 15:34:21Z dburken $
-
-#include <ossim/support_data/ossimJp2Info.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/support_data/ossimTiffInfo.h>
-#include <fstream>
-#include <iostream>
-
-ossimJp2Info::ossimJp2Info()
-   : ossimInfoBase(),
-     m_file()
-{
-}
-
-ossimJp2Info::~ossimJp2Info()
-{
-}
-
-bool ossimJp2Info::open(const ossimFilename& file)
-{
-   bool result = false;
-
-   std::ifstream str;
-   str.open( file.c_str(), std::ios_base::in | std::ios_base::binary);
-
-   if ( str.is_open() )
-   {
-      const ossim_uint8 J2K_SIGNATURE_BOX[SIGNATURE_BOX_SIZE] = 
-         {0x00,0x00,0x00,0x0c,0x6a,0x50,0x20,0x20,0x0d,0x0a,0x87,0x0a};
-      
-      ossim_uint8 box[SIGNATURE_BOX_SIZE];
-      
-      // Read in the box.
-      str.read((char*)box, SIGNATURE_BOX_SIZE);
-      
-      result = true;
-      for (ossim_uint32 i = 0; i < SIGNATURE_BOX_SIZE; ++i)
-      {
-         if (box[i] != J2K_SIGNATURE_BOX[i])
-         {
-            result = false;
-            break;
-         }
-      }
-      str.close();
-   }
-
-   if ( result ) m_file = file; // Capture file name.
-
-   return result;
-}
-
-std::ostream& ossimJp2Info::print(std::ostream& out) const
-{
-   if ( m_file.size() )
-   {
-      // Look for the GeoTIFF Box
-      std::ifstream str;
-      str.open( m_file.c_str(), std::ios_base::in | std::ios_base::binary);
-      
-      if ( str.is_open() )
-      {
-         // Position to start of code file.
-         str.seekg(SIGNATURE_BOX_SIZE, std::ios_base::beg);
-         
-         // See if we need to byte swap.  JP2 boxes are big endian.
-         ossimEndian* swapper = 0;
-         if ( ossim::byteOrder() == OSSIM_LITTLE_ENDIAN )
-         {
-            swapper = new ossimEndian();
-         }
-         
-         ossim_uint32 lbox  = 0;
-         ossim_uint32 tbox  = 0;
-         ossim_uint64 xlbox = 0;
-         
-         const ossim_uint32 UUID_TYPE = 0x75756964;
-         
-         const ossim_uint8 GEOTIFF_UUID[GEOTIFF_UUID_SIZE] = 
-            {
-               0xb1, 0x4b, 0xf8, 0xbd,
-               0x08, 0x3d, 0x4b, 0x43,
-               0xa5, 0xae, 0x8c, 0xd7,
-               0xd5, 0xa6, 0xce, 0x03
-            };
-         
-         while ( str.good() )
-         {
-            str.read((char*)&lbox, 4);
-            str.read((char*)&tbox, 4);
-            ossim_uint32 bytesRead = 8;
-            if (swapper)
-            {
-               swapper->swap(lbox);
-               swapper->swap(tbox);
-            }
-            
-            if (tbox == UUID_TYPE)
-            {
-               // Check for GeoTIFF box.
-               
-               ossim_uint8 geotiffUuid[GEOTIFF_UUID_SIZE];
-               
-               // Read in the id.
-               str.read((char*)geotiffUuid, GEOTIFF_UUID_SIZE);
-               bytesRead += GEOTIFF_UUID_SIZE;
-               
-               bool foundIt = true;
-               for (ossim_uint32 i = 0; i < GEOTIFF_UUID_SIZE; ++i)
-               {
-                  if (geotiffUuid[i] != GEOTIFF_UUID[i])
-                  {
-                     foundIt = false;
-                     break;
-                  }
-               }
-               
-               if ( foundIt )
-               {
-                  //---
-                  // Feed the stream to the tiff info object to get a keyword
-                  // list with geometry/projection info.
-                  //---
-                  ossimTiffInfo info;
-                  
-                  //---
-                  // Have geotiff boxes with badly terminated geotiffs. So to keep
-                  // the tag parser from walking past the first image file directory
-                  // (IFD) into garbage we will set the process overview flag to false.
-                  //
-                  // Note if we ever get multiple entries we will need to take this out.
-                  //---
-                  info.setProcessOverviewFlag(false);
-
-                  // Do a print to a memory stream.
-                  std::ostringstream os;
-                  info.print(str, os);
-
-                  // Open an input stream to pass to the keyword list.
-                  std::istringstream in( os.str() );
-                  
-                  ossimKeywordlist kwl;
-                  if ( kwl.parseStream(in) )      
-                  {
-                     kwl.addPrefixToAll( ossimString("jp2.") );
-
-                     // Print it:
-                     out << kwl << std::endl;
-                  }
-                  
-                  break; // Get out of while loop.
-               }
-            }
-            else
-            {
-               str.read((char*)&xlbox, 8);
-               bytesRead += 8;
-               if (swapper)
-               {
-                  swapper->swap(xlbox);
-               }
-            }
-            
-            if (lbox == 0) // last box?
-            {
-               break;
-            }
-            
-            // Seek to the next box.  If xlbox is 1
-            std::streamoff seekPos = 0;
-            if (lbox == 1)
-            {
-               seekPos = static_cast<std::streamoff>(xlbox) - static_cast<std::streamoff>(bytesRead);
-            }
-            else
-            {
-               seekPos = static_cast<std::streamoff>(lbox) - static_cast<std::streamoff>(bytesRead);
-            }
-            str.seekg(seekPos,  std::ios_base::cur);
-            
-         } // matches: while ( str.good() )
-         
-         // cleanup
-         if (swapper)
-         {
-            delete swapper; 
-            swapper = 0;
-         }
-         
-         // Close the stream.
-         str.close();
-         
-      } // matches: if ( str.is_open() )
-      
-   } // matches: if ( m_file.size() )
-   
-   return out; 
-}
diff --git a/src/ossim/support_data/ossimLasHdr.cpp b/src/ossim/support_data/ossimLasHdr.cpp
deleted file mode 100644
index 741debe..0000000
--- a/src/ossim/support_data/ossimLasHdr.cpp
+++ /dev/null
@@ -1,627 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossimLasHdr.cpp
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Container class for LAS LIDAR format public header block.
-
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/support_data/ossimLasHdr.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimKeywordlist.h>
-
-#include <cstring> /* memset */
-#include <iomanip>
-#include <iostream>
-#include <sstream>
-#include <string>
-
-ossimLasHdr::ossimLasHdr() :
-   m_fileSourceId(0),
-   m_globalEncoding(0),
-   m_projectIdGuidData1(0),
-   m_projectIdGuidData2(0),
-   m_projectIdGuidData3(0),
-   m_versionMajor(0),
-   m_versionMinor(0),
-   m_fileCreationDay(0),
-   m_fileCreateionYear(0),
-   m_headerSize(0),
-   m_offsetToPointData(0),
-   m_numberOfVariableLengthRecords(0),
-   m_pointDataFormatId(0),
-   m_pointDataRecordLength(0),
-   m_numberOfPointRecords(0),
-   m_numberOfPointsReturn1(0),
-   m_numberOfPointsReturn2(0),
-   m_numberOfPointsReturn3(0),
-   m_numberOfPointsReturn4(0),
-   m_numberOfPointsReturn5(0),
-   m_xScaleFactor(0.0),
-   m_yScaleFactor(0.0),
-   m_zScaleFactor(0.0),
-   m_xOffset(0.0),
-   m_yOffset(0.0),
-   m_zOffset(0.0),
-   m_maxX(0.0),
-   m_minX(0.0),
-   m_maxY(0.0),
-   m_minY(0.0),
-   m_maxZ(0.0),
-   m_minZ(0.0),
-   m_startOfWaveformData(0)
-   
-{
-   strncpy(m_fileSignature, "LASF", 4);
-   memset(m_projectIdGuidData4, 0, 8);
-   memset(m_systemIndentifier, 0, 32);
-   memset(m_generatingSoftware, 0, 32);
-}
-
-ossimLasHdr::ossimLasHdr(const ossimLasHdr& hdr) :
-   m_fileSourceId(hdr.m_fileSourceId),
-   m_globalEncoding(hdr.m_globalEncoding),
-   m_projectIdGuidData1(hdr.m_projectIdGuidData1),
-   m_projectIdGuidData2(hdr.m_projectIdGuidData2),
-   m_projectIdGuidData3(hdr.m_projectIdGuidData3),
-   m_versionMajor(hdr.m_versionMajor),
-   m_versionMinor(hdr.m_versionMinor),
-   m_fileCreationDay(hdr.m_fileCreationDay),
-   m_fileCreateionYear(hdr.m_fileCreateionYear),
-   m_headerSize(hdr.m_headerSize),
-   m_offsetToPointData(hdr.m_offsetToPointData),
-   m_numberOfVariableLengthRecords(hdr.m_numberOfVariableLengthRecords),
-   m_pointDataFormatId(hdr.m_pointDataFormatId),
-   m_pointDataRecordLength(hdr.m_pointDataRecordLength),
-   m_numberOfPointRecords(hdr.m_numberOfPointRecords),
-   m_numberOfPointsReturn1(hdr.m_numberOfPointsReturn1),
-   m_numberOfPointsReturn2(hdr.m_numberOfPointsReturn2),
-   m_numberOfPointsReturn3(hdr.m_numberOfPointsReturn3),
-   m_numberOfPointsReturn4(hdr.m_numberOfPointsReturn4),
-   m_numberOfPointsReturn5(hdr.m_numberOfPointsReturn5),
-   m_xScaleFactor(hdr.m_xScaleFactor),
-   m_yScaleFactor(hdr.m_yScaleFactor),
-   m_zScaleFactor(hdr.m_zScaleFactor),
-   m_xOffset(hdr.m_xOffset),
-   m_yOffset(hdr.m_yOffset),
-   m_zOffset(hdr.m_zOffset),
-   m_maxX(hdr.m_maxX),
-   m_minX(hdr.m_minX),
-   m_maxY(hdr.m_maxY),
-   m_minY(hdr.m_minY),
-   m_maxZ(hdr.m_maxZ),
-   m_minZ(hdr.m_minZ),
-   m_startOfWaveformData(hdr.m_startOfWaveformData)
-{
-   strncpy(m_fileSignature, hdr.m_fileSignature, 4);
-   for (int i=0; i<8; ++i)
-   {
-      m_projectIdGuidData4[i] = hdr.m_projectIdGuidData4[i];
-   }
-   strncpy(m_systemIndentifier, hdr.m_systemIndentifier, 32);
-   strncpy(m_generatingSoftware, hdr.m_generatingSoftware, 32);
-}
-
-const ossimLasHdr& ossimLasHdr::operator=(const ossimLasHdr& copy_this)
-{
-   if (this != &copy_this)
-   {
-      strncpy(m_fileSignature, copy_this.m_fileSignature, 4);
-      m_fileSourceId= copy_this.m_fileSourceId;
-      m_globalEncoding = copy_this.m_globalEncoding;
-      m_projectIdGuidData1 = copy_this.m_projectIdGuidData1;
-      m_projectIdGuidData2 = copy_this.m_projectIdGuidData2;
-      m_projectIdGuidData3 = copy_this.m_projectIdGuidData3;
-      for (int i=0; i<8; ++i)
-      {
-         m_projectIdGuidData4[i] = copy_this.m_projectIdGuidData4[i];
-      }
-      m_versionMajor = copy_this.m_versionMajor;
-      m_versionMinor = copy_this.m_versionMinor;
-      strncpy(m_systemIndentifier, copy_this.m_systemIndentifier, 32);
-      strncpy(m_generatingSoftware, copy_this.m_generatingSoftware, 32);      
-      m_fileCreationDay = copy_this.m_fileCreationDay;
-      m_fileCreateionYear = copy_this.m_fileCreateionYear;
-      m_headerSize = copy_this.m_headerSize;
-      m_offsetToPointData = copy_this.m_offsetToPointData;
-      m_numberOfVariableLengthRecords = copy_this.m_numberOfVariableLengthRecords;
-      m_pointDataFormatId = copy_this.m_pointDataFormatId;
-      m_pointDataRecordLength = copy_this.m_pointDataRecordLength;
-      m_numberOfPointRecords = copy_this.m_numberOfPointRecords;
-      m_numberOfPointsReturn1 = copy_this.m_numberOfPointsReturn1;
-      m_numberOfPointsReturn2 = copy_this.m_numberOfPointsReturn2;
-      m_numberOfPointsReturn3 = copy_this.m_numberOfPointsReturn3;
-      m_numberOfPointsReturn4 = copy_this.m_numberOfPointsReturn4;
-      m_numberOfPointsReturn5 = copy_this.m_numberOfPointsReturn5;
-      m_xScaleFactor = copy_this.m_xScaleFactor;
-      m_yScaleFactor = copy_this.m_yScaleFactor;
-      m_zScaleFactor = copy_this.m_zScaleFactor;
-      m_xOffset = copy_this.m_xOffset;
-      m_yOffset = copy_this.m_yOffset;
-      m_zOffset = copy_this.m_zOffset;
-      m_maxX = copy_this.m_maxX;
-      m_minX = copy_this.m_minX;
-      m_maxY = copy_this.m_maxY;
-      m_minY = copy_this.m_minY;
-      m_maxZ = copy_this.m_maxZ;
-      m_minZ = copy_this.m_minZ;
-      m_startOfWaveformData = copy_this.m_startOfWaveformData;
-   }
-   return *this;
-}
-
-ossimLasHdr::~ossimLasHdr()
-{
-}
-
-bool ossimLasHdr::checkSignature(std::istream& in) const
-{
-   bool result = false;
-   char SIG[4];
-   in.read(SIG, 4);
-   if ( (SIG[0] == 'L') && (SIG[1] == 'A') &&
-        (SIG[2] == 'S') && (SIG[3] == 'F') )
-   {
-      result = true;
-   }
-   return result;
-}
-
-void ossimLasHdr::readStream(std::istream& in)
-{
-   in.read((char*)&m_fileSourceId, 2);
-   in.read((char*)&m_globalEncoding, 2);
-   in.read((char*)&m_projectIdGuidData1, 4);
-   in.read((char*)&m_projectIdGuidData2, 2);
-   in.read((char*)&m_projectIdGuidData3, 2);
-   in.read((char*)&m_projectIdGuidData4, 8);
-   in.read((char*)&m_versionMajor, 1);
-   in.read((char*)&m_versionMinor, 1);
-   in.read(m_systemIndentifier, 32);
-   in.read(m_generatingSoftware, 32);
-   in.read((char*)&m_fileCreationDay, 2);
-   in.read((char*)&m_fileCreateionYear, 2);
-   in.read((char*)&m_headerSize, 2);
-   in.read((char*)&m_offsetToPointData, 4);
-   in.read((char*)&m_numberOfVariableLengthRecords, 4);
-   in.read((char*)&m_pointDataFormatId, 1);
-   in.read((char*)&m_pointDataRecordLength, 2);
-   in.read((char*)&m_numberOfPointRecords, 4);
-   in.read((char*)&m_numberOfPointsReturn1, 4);
-   in.read((char*)&m_numberOfPointsReturn2, 4);
-   in.read((char*)&m_numberOfPointsReturn3, 4);
-   in.read((char*)&m_numberOfPointsReturn4, 4);
-   in.read((char*)&m_numberOfPointsReturn5, 4);
-   in.read((char*)&m_xScaleFactor, 8);
-   in.read((char*)&m_yScaleFactor, 8);
-   in.read((char*)&m_zScaleFactor, 8);
-   in.read((char*)&m_xOffset, 8);
-   in.read((char*)&m_yOffset, 8);
-   in.read((char*)&m_zOffset, 8);
-   in.read((char*)&m_maxX, 8);
-   in.read((char*)&m_minX, 8);
-   in.read((char*)&m_maxY, 8);
-   in.read((char*)&m_minY, 8);
-   in.read((char*)&m_maxZ, 8);
-   in.read((char*)&m_minZ, 8);
-   if ( (m_versionMajor == 1) && ( m_versionMinor > 2) )
-   {
-      in.read((char*)&m_startOfWaveformData, 8);
-   }
-
-   if ( ossim::byteOrder() == OSSIM_BIG_ENDIAN )
-   {
-      swap();
-   }
-}
-
-void ossimLasHdr::writeStream(std::ostream& out)
-{
-   if ( ossim::byteOrder() == OSSIM_BIG_ENDIAN )
-   {
-      // Write little endian per spec.
-      swap();
-   }
-   
-   out.write(m_fileSignature, 4);
-   out.write((char*)&m_fileSourceId, 2);
-   out.write((char*)&m_globalEncoding, 2);
-   out.write((char*)&m_projectIdGuidData1, 4);
-   out.write((char*)&m_projectIdGuidData2, 2);
-   out.write((char*)&m_projectIdGuidData3, 2);
-   out.write((char*)&m_projectIdGuidData4, 8);
-   out.write((char*)&m_versionMajor, 1);
-   out.write((char*)&m_versionMinor, 1);
-   out.write(m_systemIndentifier, 32);
-   out.write(m_generatingSoftware, 32);
-   out.write((char*)&m_fileCreationDay, 2);
-   out.write((char*)&m_fileCreateionYear, 2);
-   out.write((char*)&m_headerSize, 2);
-   out.write((char*)&m_offsetToPointData, 4);
-   out.write((char*)&m_numberOfVariableLengthRecords, 4);
-   out.write((char*)&m_pointDataFormatId, 1);
-   out.write((char*)&m_pointDataRecordLength, 2);
-   out.write((char*)&m_numberOfPointRecords, 4);
-   out.write((char*)&m_numberOfPointsReturn1, 4);
-   out.write((char*)&m_numberOfPointsReturn2, 4);
-   out.write((char*)&m_numberOfPointsReturn3, 4);
-   out.write((char*)&m_numberOfPointsReturn4, 4);
-   out.write((char*)&m_numberOfPointsReturn5, 4);
-   out.write((char*)&m_xScaleFactor, 8);
-   out.write((char*)&m_yScaleFactor, 8);
-   out.write((char*)&m_zScaleFactor, 8);
-   out.write((char*)&m_xOffset, 8);
-   out.write((char*)&m_yOffset, 8);
-   out.write((char*)&m_zOffset, 8);
-   out.write((char*)&m_maxX, 8);
-   out.write((char*)&m_minX, 8);
-   out.write((char*)&m_maxY, 8);
-   out.write((char*)&m_minY, 8);
-   out.write((char*)&m_maxZ, 8);
-   out.write((char*)&m_minZ, 8);
-   if ( (m_versionMajor == 1) && ( m_versionMinor > 2) )
-   {
-      out.write((char*)&m_startOfWaveformData, 8);
-   }
-
-   if ( ossim::byteOrder() == OSSIM_BIG_ENDIAN )
-   {
-      // Swap back to native byte order if needed:
-      swap();
-   }
-}
-
-std::ostream& ossimLasHdr::print(std::ostream& out) const
-{
-   // Capture the original flags.
-   std::ios_base::fmtflags f = out.flags();
-
-   out << std::setiosflags(std::ios_base::fixed) << std::setprecision(4);
-   
-   out << "las.file_source_id: " << m_fileSourceId;
-
-   //---
-   // m_globalEncoding is a bit encoding so we output bit at a time:
-   // At the time of this coding only first four bits used.
-   //---
-   out << "\nlas.gps_time_type: " << (getGpsTimeTypeBit()?"1":"0")
-       << "\nlas.waveform_data_packets_internal: " << (getWaveforDataPacketsInternalBit()?"1":"0")
-       << "\nlas.waveform_data_packets_external: " << (getWaveforDataPacketsExternalBit()?"1":"0")
-       << "\nlas.synthetically_generated: " << (getReturnsSyntheticallyGeneratedBit()?"1":"0")
-
-       << "\nlas.project_id_guid: " << getProjectIdGuid()
-      
-       << "\nlas.version: " << getVersion()
-      
-       << "\nlas.system_indentifier: " << getSystemIndentifier().c_str()
-       << "\nlas.generating_software: " << getGeneratingSoftware().c_str()
-      
-       << "\nlas.file_creation_day: " << m_fileCreationDay
-       << "\nlas.file_creation_year: " << m_fileCreateionYear
-
-       << "\nlas.header_size: " << m_headerSize
-       << "\nlas.offset_to_point_data: " << m_offsetToPointData 
-       << "\nlas.number_of_variable_length_records: " << m_numberOfVariableLengthRecords
-       << "\nlas.point_data_format_id: " << int(m_pointDataFormatId)
-       << "\nlas.point_data_record_length: " << m_pointDataRecordLength
-      
-       << "\nlas.number_of_point_records: " << m_numberOfPointRecords
-       << "\nlas.number_of_points_return1: " << m_numberOfPointsReturn1
-       << "\nlas.number_of_points_return2: " << m_numberOfPointsReturn2
-       << "\nlas.number_of_points_return3: " << m_numberOfPointsReturn3
-       << "\nlas.number_of_points_return4: " << m_numberOfPointsReturn4
-       << "\nlas.number_of_points_return5: " << m_numberOfPointsReturn5
-      
-       << "\nlas.x_scale_factor: " << m_xScaleFactor
-       << "\nlas.y_scale_factor: " << m_yScaleFactor
-       << "\nlas.z_scale_factor: " << m_zScaleFactor
-      
-       << "\nlas.x_offset: " << m_xOffset
-       << "\nlas.y_offset: " << m_yOffset
-       << "\nlas.z_offset: " << m_zOffset
-      
-       << "\nlas.max_x: " << m_maxX
-       << "\nlas.min_x: " << m_minX
-       << "\nlas.max_y: " << m_maxY
-       << "\nlas.min_y: " << m_minY
-       << "\nlas.max_z: " << m_maxZ
-       << "\nlas.min_z: " << m_minZ;
-   
-   if ( (m_versionMajor == 1) && ( m_versionMinor > 2) )
-   {
-      out << "\nlas.start_of_wave_form_data: " << m_startOfWaveformData << std::endl;
-   }
-   else
-   {
-      out << std::endl;
-   }
-
-   // Reset flags.
-   out.setf(f);
-
-   return out;
-}
-
-std::ostream& operator<<(std::ostream& out, const ossimLasHdr& hdr)
-{
-   return hdr.print(out);
-}
-
-void ossimLasHdr::getKeywordlist(ossimKeywordlist& kwl) const
-{
-   kwl.add("las.file_source_id", m_fileSourceId);
-
-   //---
-   // m_globalEncoding is a bit encoding so we output bit at a time:
-   // At the time of this coding only first four bits used.
-   //---
-   kwl.add("las.gps_time_type", (getGpsTimeTypeBit()?"1":"0") );
-   kwl.add("las.waveform_data_packets_internal", (getWaveforDataPacketsInternalBit()?"1":"0") );
-   kwl.add("las.waveform_data_packets_external", (getWaveforDataPacketsExternalBit()?"1":"0") );
-   kwl.add("las.synthetically_generated", (getReturnsSyntheticallyGeneratedBit()?"1":"0") );
-   
-   kwl.add("las.project_id_guid", getProjectIdGuid().c_str());
-
-
-   kwl.add("las.gps_time_type", (getGpsTimeTypeBit()?"1":"0") );
-   kwl.add("las.waveform_data_packets_internal", (getWaveforDataPacketsInternalBit()?"1":"0") );
-   kwl.add("las.waveform_data_packets_external", (getWaveforDataPacketsExternalBit()?"1":"0") );
-   kwl.add("las.synthetically_generated", (getReturnsSyntheticallyGeneratedBit()?"1":"0") );
-
-   kwl.add("las.version", getVersion().c_str());
-
-   kwl.add("las.system_indentifier", getSystemIndentifier().c_str());
-   kwl.add("las.generating_software", getGeneratingSoftware().c_str());
-
-   kwl.add("las.file_creation_day", m_fileCreationDay);
-   kwl.add("las.file_creation_year", m_fileCreateionYear);
-
-   kwl.add("las.header_size", m_headerSize);
-   kwl.add("las.offset_to_point_data", m_offsetToPointData );
-   kwl.add("las.number_of_variable_length_records", m_numberOfVariableLengthRecords);
-   kwl.add("las.point_data_format_id", m_pointDataFormatId);
-   kwl.add("las.point_data_record_length", m_pointDataRecordLength);
-
-   kwl.add("las.number_of_point_records", m_numberOfPointRecords);
-   kwl.add("las.number_of_points_return1", m_numberOfPointsReturn1);
-   kwl.add("las.number_of_points_return2", m_numberOfPointsReturn2);
-   kwl.add("las.number_of_points_return3", m_numberOfPointsReturn3);
-   kwl.add("las.number_of_points_return4", m_numberOfPointsReturn4);
-   kwl.add("las.number_of_points_return5", m_numberOfPointsReturn5);
-
-   kwl.add("las.x_scale_factor", m_xScaleFactor);
-   kwl.add("las.y_scale_factor", m_yScaleFactor);
-   kwl.add("las.z_scale_factor", m_zScaleFactor);
-
-   kwl.add("las.x_offset", m_xOffset);
-   kwl.add("las.y_offset", m_yOffset);
-   kwl.add("las.z_offset", m_zOffset);
-   
-   kwl.add("las.max_x", m_maxX);
-   kwl.add("las.min_x", m_minX);
-   kwl.add("las.max_y", m_maxY);
-   kwl.add("las.min_y", m_minY);
-   kwl.add("las.max_z", m_maxZ);
-   kwl.add("las.min_z", m_minZ);
-
-   kwl.add("las.start_of_wave_form_data", m_startOfWaveformData);
-}
-
-bool ossimLasHdr::getGpsTimeTypeBit() const
-{
-   return (0x0001 & m_globalEncoding) ? true : false;
-}
-
-bool ossimLasHdr::getWaveforDataPacketsInternalBit() const
-{
-   return (0x0010 & m_globalEncoding) ? true : false;
-}
-
-bool ossimLasHdr::getWaveforDataPacketsExternalBit() const
-{
-   return (0x0100 & m_globalEncoding) ? true : false;
-}
-
-bool ossimLasHdr::getReturnsSyntheticallyGeneratedBit() const
-{
-   return (0x1000 & m_globalEncoding) ? true : false;
-}
-
-std::string ossimLasHdr::getProjectIdGuid() const
-{
-   std::ostringstream os;
-   os << std::hex
-      << m_projectIdGuidData1 << "-"
-      << m_projectIdGuidData2 << "-"
-      << m_projectIdGuidData3 << "-";
-   for (int i=0; i<8; ++i)
-   {
-      ossim_uint16 uid = m_projectIdGuidData4[i];
-      os << uid;
-   }
-   return os.str();
-}
-
-std::string ossimLasHdr::getVersion() const
-{
-   std::ostringstream os;
-   os << int(m_versionMajor) << "." << int(m_versionMinor);
-   return os.str();
-}
-
-std::string  ossimLasHdr::getSystemIndentifier() const
-{
-   std::string s;
-   s.reserve(32);
-   for (int i=0; i<32; ++i)
-   {
-      s.push_back(m_systemIndentifier[i]);
-   }
-   return s;
-}
-
-std::string  ossimLasHdr::getGeneratingSoftware() const
-{
-   std::string s;
-   s.reserve(32);
-   for (int i=0; i<32; ++i)
-   {
-      s.push_back(m_generatingSoftware[i]);
-   }
-   return s;
-}
-
-ossim_uint16 ossimLasHdr::getHeaderSize() const
-{
-   return m_headerSize;
-}
-
-ossim_uint32 ossimLasHdr::getOffsetToPointData() const
-{
-   return m_offsetToPointData;
-}
-
-ossim_uint32 ossimLasHdr::getNumberOfVlrs() const
-{
-   return m_numberOfVariableLengthRecords;
-}
-
-ossim_uint8 ossimLasHdr::getPointDataFormatId() const
-{
-   return m_pointDataFormatId;
-}
-
-ossim_uint32 ossimLasHdr::getNumberOfPoints() const
-{
-   return m_numberOfPointRecords;
-}
-
-ossim_uint32 ossimLasHdr::getNumberOfPoints(ossim_uint32 entry) const
-{
-   ossim_uint32 result = 0;
-   switch (entry)
-   {
-      case 0:
-         result = m_numberOfPointsReturn1;
-         break;
-      case 1:
-         result = m_numberOfPointsReturn2;
-         break;
-      case 2:
-         result = m_numberOfPointsReturn3;
-         break;
-      case 3:
-         result = m_numberOfPointsReturn4;
-         break;
-      case 4:
-         result = m_numberOfPointsReturn5;
-         break;
-      default:
-         break;
-   }
-   return result;
-}
-
-const ossim_float64& ossimLasHdr::getScaleFactorX() const
-{
-   return m_xScaleFactor;
-}
-
-const ossim_float64& ossimLasHdr::getScaleFactorY() const
-{
-   return m_yScaleFactor;
-}
-
-const ossim_float64& ossimLasHdr::getScaleFactorZ() const
-{
-   return m_zScaleFactor;
-}
-
-const ossim_float64& ossimLasHdr::getOffsetX() const
-{
-   return m_xOffset;
-}
-
-const ossim_float64& ossimLasHdr::getOffsetY() const
-{
-   return m_yOffset;
-}
-
-const ossim_float64& ossimLasHdr::getOffsetZ() const
-{
-   return m_zOffset;
-}
-
-const ossim_float64& ossimLasHdr::getMinX() const
-{
-   return m_minX;
-}
-
-const ossim_float64& ossimLasHdr::getMinY() const
-{
-   return m_minY;
-}
-
-const ossim_float64& ossimLasHdr::getMinZ() const
-{
-   return m_minZ;
-}
-
-const ossim_float64& ossimLasHdr::getMaxX() const
-{
-   return m_maxX;
-}
-
-const ossim_float64& ossimLasHdr::getMaxY() const
-{
-   return m_maxY;
-}
-
-const ossim_float64& ossimLasHdr::getMaxZ() const
-{
-   return m_maxZ;
-}
-
-void ossimLasHdr::swap()
-{
-   ossimEndian endian;
-   endian.swap(m_fileSourceId);
-   endian.swap(m_globalEncoding);
-   endian.swap(m_projectIdGuidData1);
-   endian.swap(m_projectIdGuidData2);
-   endian.swap(m_projectIdGuidData3);
-   endian.swap(m_fileCreationDay);
-   endian.swap(m_fileCreateionYear);
-   endian.swap(m_headerSize);
-   endian.swap(m_offsetToPointData);
-   endian.swap(m_numberOfVariableLengthRecords);
-   endian.swap(m_pointDataRecordLength);
-   endian.swap(m_numberOfPointRecords);
-   endian.swap(m_numberOfPointsReturn1);
-   endian.swap(m_numberOfPointsReturn2);
-   endian.swap(m_numberOfPointsReturn3);
-   endian.swap(m_numberOfPointsReturn4);
-   endian.swap(m_numberOfPointsReturn5);
-   endian.swap(m_xScaleFactor);
-   endian.swap(m_yScaleFactor);
-   endian.swap(m_zScaleFactor);
-   endian.swap(m_xOffset);
-   endian.swap(m_yOffset);
-   endian.swap(m_zOffset);
-   endian.swap(m_maxX);
-   endian.swap(m_minX);
-   endian.swap(m_maxY);
-   endian.swap(m_minY);
-   endian.swap(m_maxZ);
-   endian.swap(m_minZ);
-   endian.swap(m_startOfWaveformData);
-}
diff --git a/src/ossim/support_data/ossimLasInfo.cpp b/src/ossim/support_data/ossimLasInfo.cpp
deleted file mode 100644
index 506cec7..0000000
--- a/src/ossim/support_data/ossimLasInfo.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossimLibLasInfo.cpp
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: LAS LIDAR info object.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/support_data/ossimLasInfo.h>
-#include <ossim/support_data/ossimLasHdr.h>
-
-#include <fstream>
-
-ossimLasInfo::ossimLasInfo()
-   : m_file()
-{
-}
-
-ossimLasInfo::~ossimLasInfo()
-{
-}
-
-bool ossimLasInfo::open(const ossimFilename& file)
-{
-   bool result = false;
-   std::ifstream istr;
-   istr.open(file.c_str(), std::ios_base::in | std::ios_base::binary);
-   if ( istr.is_open() )
-   {
-      ossimLasHdr hdr;
-      result = hdr.checkSignature(istr);
-      if (result) m_file = file;
-   }
-   return result;
-}
-
-std::ostream& ossimLasInfo::print(std::ostream& out) const
-{
-   std::ifstream istr;
-   istr.open(m_file.c_str(), std::ios_base::in | std::ios_base::binary);
-   if ( istr.is_open() )
-   {
-      ossimLasHdr hdr;
-      if ( hdr.checkSignature(istr) )
-      {
-         hdr.readStream(istr);
-         hdr.print(out);
-      }
-   }
-   return out;
-}
diff --git a/src/ossim/support_data/ossimNitfAcftbTag.cpp b/src/ossim/support_data/ossimNitfAcftbTag.cpp
deleted file mode 100644
index 14e11ba..0000000
--- a/src/ossim/support_data/ossimNitfAcftbTag.cpp
+++ /dev/null
@@ -1,264 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: ACFTB - Aircraft Infomation Extension Format tag class
-// declaration.
-//
-// See document STDI-0002 (version 3), Appendix E, Table E-6 for more info.
-// 
-//----------------------------------------------------------------------------
-// $Id
-
-#include <cstring>
-#include <istream>
-#include <iostream>
-#include <iomanip>
-
-#include <ossim/support_data/ossimNitfAcftbTag.h>
-
-
-RTTI_DEF1(ossimNitfAcftbTag, "ossimNitfAcftbTag", ossimNitfRegisteredTag);
-
-ossimNitfAcftbTag::ossimNitfAcftbTag()
-   : ossimNitfRegisteredTag(std::string("ACFTB"), CEL_SIZE)
-{
-   clearFields();
-}
-
-ossimNitfAcftbTag::~ossimNitfAcftbTag()
-{
-}
-
-void ossimNitfAcftbTag::parseStream(std::istream& in)
-{
-   clearFields();
-
-   in.read(theAcMsnId, AC_MSN_ID_SIZE);
-   in.read(theAcTailNo, AC_TAIL_NO_SIZE);
-   in.read(theAcTo, AC_TO_SIZE);
-   in.read(theSensorIdType, SENSOR_ID_TYPE_SIZE);
-   in.read(theSensorId, SENSOR_ID_SIZE);
-   in.read(theSceneSource, SCENE_SOURCE_SIZE);
-   in.read(theScNum, SCNUM_SIZE);
-   in.read(thePDate, PDATE_SIZE);
-   in.read(theImHostNo, IMHOSTNO_SIZE);
-   in.read(theImReqID, IMREQID_SIZE);
-   in.read(theMPlan, MPLAN_SIZE);
-   in.read(theEntLoc, ENTLOC_SIZE);
-   in.read(theLocAccy, LOC_ACCY_SIZE);
-   in.read(theEntelv, ENTELV_SIZE);
-   in.read(theElvUnit, ELV_UNIT_SIZE);
-   in.read(theExitLoc, EXITLOC_SIZE);
-   in.read(theExitElev, EXITELV_SIZE);
-   in.read(theTMap, TMAP_SIZE);
-   in.read(theRowSpacing, ROW_SPACING_SIZE);
-   in.read(theRowSpacingUnits, ROW_SPACING_UNITS_SIZE);
-   in.read(theColSpacing, COL_SPACING_SIZE);
-   in.read(theColSpacingUnits, COL_SPACING_UINTS_SIZE);
-   in.read(theFocalLength, FOCAL_LENGTH_SIZE);
-   in.read(theSenserial, SENSERIAL_SIZE);
-   in.read(theAbSwVer, ABSWVER_SIZE);
-   in.read(theCalDate, CAL_DATE_SIZE);
-   in.read(thePatchTot, PATCH_TOT_SIZE);
-   in.read(theMtiTot, MTI_TOT_SIZE);
-}
-
-void ossimNitfAcftbTag::writeStream(std::ostream& out)
-{
-   out.write(theAcMsnId, AC_MSN_ID_SIZE);
-   out.write(theAcTailNo, AC_TAIL_NO_SIZE);
-   out.write(theAcTo, AC_TO_SIZE);
-   out.write(theSensorIdType, SENSOR_ID_TYPE_SIZE);
-   out.write(theSensorId, SENSOR_ID_SIZE);
-   out.write(theSceneSource, SCENE_SOURCE_SIZE);
-   out.write(theScNum, SCNUM_SIZE);
-   out.write(thePDate, PDATE_SIZE);
-   out.write(theImHostNo, IMHOSTNO_SIZE);
-   out.write(theImReqID, IMREQID_SIZE);
-   out.write(theMPlan, MPLAN_SIZE);
-   out.write(theEntLoc, ENTLOC_SIZE);
-   out.write(theLocAccy, LOC_ACCY_SIZE);
-   out.write(theEntelv, ENTELV_SIZE);
-   out.write(theElvUnit, ELV_UNIT_SIZE);
-   out.write(theExitLoc, EXITLOC_SIZE);
-   out.write(theExitElev, EXITELV_SIZE);
-   out.write(theTMap, TMAP_SIZE);
-   out.write(theRowSpacing, ROW_SPACING_SIZE);
-   out.write(theRowSpacingUnits, ROW_SPACING_UNITS_SIZE);
-   out.write(theColSpacing, COL_SPACING_SIZE);
-   out.write(theColSpacingUnits, COL_SPACING_UINTS_SIZE);
-   out.write(theFocalLength, FOCAL_LENGTH_SIZE);
-   out.write(theSenserial, SENSERIAL_SIZE);
-   out.write(theAbSwVer, ABSWVER_SIZE);
-   out.write(theCalDate, CAL_DATE_SIZE);
-   out.write(thePatchTot, PATCH_TOT_SIZE);
-   out.write(theMtiTot, MTI_TOT_SIZE);
-}
-
-void ossimNitfAcftbTag::clearFields()
-{
-   // BCS-N's to '0's, BCS-A's to ' '(spaces)
-
-   // clear
-   memset(theAcMsnId, ' ', AC_MSN_ID_SIZE);
-   memset(theAcTailNo, ' ', AC_TAIL_NO_SIZE);
-   memset(theAcTo, ' ', AC_TO_SIZE);
-   memset(theSensorIdType, ' ', SENSOR_ID_TYPE_SIZE);
-   memset(theSensorId, ' ', SENSOR_ID_SIZE);
-   memset(theSceneSource, ' ', SCENE_SOURCE_SIZE);
-   memset(theScNum, ' ', SCNUM_SIZE);
-   memset(thePDate, ' ', PDATE_SIZE);
-   memset(theImHostNo, ' ', IMHOSTNO_SIZE);
-   memset(theImReqID, ' ', IMREQID_SIZE);
-   memset(theMPlan, ' ', MPLAN_SIZE);
-   memset(theEntLoc, ' ', ENTLOC_SIZE);
-   memset(theLocAccy, ' ', LOC_ACCY_SIZE);
-   memset(theEntelv, ' ', ENTELV_SIZE);
-   memset(theElvUnit, ' ', ELV_UNIT_SIZE);
-   memset(theExitLoc, ' ', EXITLOC_SIZE);
-   memset(theExitElev, ' ', EXITELV_SIZE);
-   memset(theTMap, ' ', TMAP_SIZE);
-   memset(theRowSpacing, ' ', ROW_SPACING_SIZE);
-   memset(theRowSpacingUnits, ' ', ROW_SPACING_UNITS_SIZE);
-   memset(theColSpacing, ' ', COL_SPACING_SIZE);
-   memset(theColSpacingUnits, ' ', COL_SPACING_UINTS_SIZE);
-   memset(theFocalLength, ' ', FOCAL_LENGTH_SIZE);
-   memset(theSenserial, ' ', SENSERIAL_SIZE);
-   memset(theAbSwVer, ' ', ABSWVER_SIZE);
-   memset(theCalDate, ' ', CAL_DATE_SIZE);
-   memset(thePatchTot, ' ', PATCH_TOT_SIZE);
-   memset(theMtiTot, ' ', MTI_TOT_SIZE);
-
-
-   // null terminate
-   theAcMsnId[AC_MSN_ID_SIZE] = '\0';
-   theAcTailNo[AC_TAIL_NO_SIZE] = '\0';
-   theAcTo[AC_TO_SIZE] = '\0';
-   theSensorIdType[SENSOR_ID_TYPE_SIZE] = '\0';
-   theSensorId[SENSOR_ID_SIZE] = '\0';
-   theSceneSource[SCENE_SOURCE_SIZE] = '\0';
-   theScNum[SCNUM_SIZE] = '\0';
-   thePDate[PDATE_SIZE] = '\0';
-   theImHostNo[IMHOSTNO_SIZE] = '\0';
-   theImReqID[IMREQID_SIZE] = '\0';
-   theMPlan[MPLAN_SIZE] = '\0';
-   theEntLoc[ENTLOC_SIZE] = '\0';
-   theLocAccy[LOC_ACCY_SIZE] = '\0';
-   theEntelv[ENTELV_SIZE] = '\0';
-   theElvUnit[ELV_UNIT_SIZE] = '\0';
-   theExitLoc[EXITLOC_SIZE] = '\0';
-   theExitElev[EXITELV_SIZE] = '\0';
-   theTMap[TMAP_SIZE] = '\0';
-   theRowSpacing[ROW_SPACING_SIZE] = '\0';
-   theRowSpacingUnits[ROW_SPACING_UNITS_SIZE] = '\0';
-   theColSpacing[COL_SPACING_SIZE] = '\0';
-   theColSpacingUnits[COL_SPACING_UINTS_SIZE] = '\0';
-   theFocalLength[FOCAL_LENGTH_SIZE] = '\0';
-   theSenserial[SENSERIAL_SIZE] = '\0';
-   theAbSwVer[ABSWVER_SIZE] = '\0';
-   theCalDate[CAL_DATE_SIZE] = '\0';
-   thePatchTot[PATCH_TOT_SIZE] = '\0';
-   theMtiTot[MTI_TOT_SIZE] = '\0';
-}
-
-ossimString ossimNitfAcftbTag::getFocalLength()const
-{
-   return ossimString(theFocalLength);
-}
-
-ossimString ossimNitfAcftbTag::getColumnSpacing()const
-{
-   return ossimString(theColSpacing);
-}
-
-ossimString ossimNitfAcftbTag::getColumnSpacingUnits()const
-{
-   return ossimString(theColSpacingUnits);
-}
-
-ossimString ossimNitfAcftbTag::getRowSpacing()const
-{
-   return ossimString(theRowSpacing);
-}
-
-ossimString ossimNitfAcftbTag::getRowSpacingUnits()const
-{
-   return ossimString(theRowSpacingUnits);
-}
-
-
-std::ostream& ossimNitfAcftbTag::print(
-   std::ostream& out, const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += getTagName();
-   pfx += ".";
-   
-   out << setiosflags(std::ios::left)
-       << pfx << std::setw(24) << "CETAG:"
-       << getTagName() << "\n"
-       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
-       << pfx << std::setw(24) << "AC_MSN_ID:"
-       << theAcMsnId << "\n"
-       << pfx << std::setw(24) << "AC_TAIL_NO:"
-       << theAcTailNo << "\n"
-       << pfx << std::setw(24) << "AC_TO:"
-       << theAcTo << "\n"
-       << pfx << std::setw(24) << "SENSOR_ID_TYPE:"
-       << theSensorIdType << "\n"
-       << pfx << std::setw(24) << "SENSOR_ID:"
-       << theSensorId << "\n"
-       << pfx << std::setw(24) << "SCENE_SOURCE:"
-       << theSceneSource << "\n"
-       << pfx << std::setw(24) << "SCNUM:"
-       << theScNum << "\n"
-       << pfx << std::setw(24) << "PDATE:"
-       << thePDate << "\n"
-       << pfx << std::setw(24) << "IMHOSTNO:"
-       << theImHostNo << "\n"
-       << pfx << std::setw(24) << "IMREQID:"
-       << theImReqID << "\n"
-       << pfx << std::setw(24) << "MPLAN:"
-       << theMPlan << "\n"
-       << pfx << std::setw(24) << "ENTLOC:"
-       << theEntLoc << "\n"
-       << pfx << std::setw(24) << "LOC_ACCY:"
-       << theLocAccy << "\n"
-       << pfx << std::setw(24) << "ENTELV:"
-       << theEntelv << "\n"
-       << pfx << std::setw(24) << "ELV_UNIT:"
-       << theElvUnit << "\n"
-       << pfx << std::setw(24) << "EXITLOC:"
-       << theExitLoc << "\n"
-       << pfx << std::setw(24) << "EXITELV:"
-       << theExitElev << "\n"
-       << pfx << std::setw(24) << "TMAP:"
-       << theTMap << "\n"
-       << pfx << std::setw(24) << "ROW_SPACING:"
-       << theRowSpacing << "\n"
-       << pfx << std::setw(24) << "ROW_SPACING_UNITS:"
-       << theRowSpacingUnits << "\n"
-       << pfx << std::setw(24) << "COL_SPACING:"
-       << theColSpacing << "\n"
-       << pfx << std::setw(24) << "COL_SPACING_UINTS:"
-       << theColSpacingUnits << "\n"
-       << pfx << std::setw(24) << "FOCAL_LENGTH:"
-       << theFocalLength << "\n"
-       << pfx << std::setw(24) << "SENSERIAL:"
-       << theSenserial << "\n"
-       << pfx << std::setw(24) << "ABSWVER:"
-       << theAbSwVer << "\n"
-       << pfx << std::setw(24) << "CAL_DATE:"
-       << theCalDate << "\n"
-       << pfx << std::setw(24) << "PATCH_TOT:"
-       << thePatchTot << "\n"
-       << pfx << std::setw(24) << "MTI_TOT:"
-       << theMtiTot << "\n";
-   
-   return out;
-}
diff --git a/src/ossim/support_data/ossimNitfAimidbTag.cpp b/src/ossim/support_data/ossimNitfAimidbTag.cpp
deleted file mode 100644
index 02af9d9..0000000
--- a/src/ossim/support_data/ossimNitfAimidbTag.cpp
+++ /dev/null
@@ -1,171 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: AIMIDB - Additional Image ID Extension Format tag class
-// definition.
-//
-// See document STDI-0002 (version 3), Appendix E, Table E-3 for more info.
-// 
-//----------------------------------------------------------------------------
-// $Id
-
-#include <cstring>
-#include <istream>
-#include <iostream>
-#include <iomanip>
-
-#include <ossim/support_data/ossimNitfAimidbTag.h>
-
-
-RTTI_DEF1(ossimNitfAimidbTag, "ossimNitfAimidbTag", ossimNitfRegisteredTag);
-
-ossimNitfAimidbTag::ossimNitfAimidbTag()
-   : ossimNitfRegisteredTag(std::string("AIMIDB"), CEL_SIZE)
-{
-   clearFields();
-}
-
-ossimNitfAimidbTag::~ossimNitfAimidbTag()
-{
-}
-
-void ossimNitfAimidbTag::parseStream(std::istream& in)
-{
-   clearFields();
-
-   in.read(theAcquisitionDate, ACQUISITION_DATE_SIZE);
-   in.read(theMissionNumber, MISSION_NO_SIZE);
-   in.read(theMissionIdentification, MISSION_IDENTIFICATION_SIZE);
-   in.read(theFlightNo, FLIGHT_NO_SIZE);
-   in.read(theOpNum, OP_NUM_SIZE);
-   in.read(theCurrentSegment, CURRENT_SEGMENT_SIZE);
-   in.read(theReproNum, REPRO_NUM_SIZE);
-   in.read(theReplay, REPLAY_SIZE);
-   in.read(theReserved1, RESERVED_1_SIZE);
-   in.read(theStartTileColumn, START_TILE_COLUMN_SIZE);
-   in.read(theStartTileRow, START_TILE_ROW_SIZE);
-   in.read(theEndSegment, END_SEGMENT_SIZE);
-   in.read(theTileColumn, END_TILE_COLUMN_SIZE);
-   in.read(theTileRow, END_TILE_ROW_SIZE);
-   in.read(theCountry, COUNTRY_SIZE);
-   in.read(theReserved2, RESERVED_2_SIZE);
-   in.read(theLocation, LOCATION_SIZE);
-   in.read(theReserved3, RESERVED_3_SIZE);
-}
-
-void ossimNitfAimidbTag::writeStream(std::ostream& out)
-{
-   out.write(theAcquisitionDate, ACQUISITION_DATE_SIZE);
-   out.write(theMissionNumber, MISSION_NO_SIZE);
-   out.write(theMissionIdentification, MISSION_IDENTIFICATION_SIZE);
-   out.write(theFlightNo, FLIGHT_NO_SIZE);
-   out.write(theOpNum, OP_NUM_SIZE);
-   out.write(theCurrentSegment, CURRENT_SEGMENT_SIZE);
-   out.write(theReproNum, REPRO_NUM_SIZE);
-   out.write(theReplay, REPLAY_SIZE);
-   out.write(theReserved1, RESERVED_1_SIZE);
-   out.write(theStartTileColumn, START_TILE_COLUMN_SIZE);
-   out.write(theStartTileRow, START_TILE_ROW_SIZE);
-   out.write(theEndSegment, END_SEGMENT_SIZE);
-   out.write(theTileColumn, END_TILE_COLUMN_SIZE);
-   out.write(theTileRow, END_TILE_ROW_SIZE);
-   out.write(theCountry, COUNTRY_SIZE);
-   out.write(theReserved2, RESERVED_2_SIZE);
-   out.write(theLocation, LOCATION_SIZE);
-   out.write(theReserved3, RESERVED_3_SIZE);
-}
-
-void ossimNitfAimidbTag::clearFields()
-{
-   // BCS-N's to '0's, BCS-A's to ' '(spaces)
-
-   // clear
-   memset(theAcquisitionDate, ' ', ACQUISITION_DATE_SIZE);
-   memset(theMissionNumber, ' ', MISSION_NO_SIZE);
-   memset(theMissionIdentification, ' ', MISSION_IDENTIFICATION_SIZE);
-   memset(theFlightNo, ' ', FLIGHT_NO_SIZE);
-   memset(theOpNum, ' ', OP_NUM_SIZE);
-   memset(theCurrentSegment, ' ', CURRENT_SEGMENT_SIZE);
-   memset(theReproNum, ' ', REPRO_NUM_SIZE);
-   memset(theReplay, ' ', REPLAY_SIZE);
-   memset(theReserved1, ' ', RESERVED_1_SIZE);
-   memset(theStartTileColumn, ' ', START_TILE_COLUMN_SIZE);
-   memset(theStartTileRow, ' ', START_TILE_ROW_SIZE);
-   memset(theEndSegment, ' ', END_SEGMENT_SIZE);
-   memset(theTileColumn, ' ', END_TILE_COLUMN_SIZE);
-   memset(theTileRow, ' ', END_TILE_ROW_SIZE);
-   memset(theCountry, ' ', COUNTRY_SIZE);
-   memset(theReserved2, ' ', RESERVED_2_SIZE);
-   memset(theLocation, ' ', LOCATION_SIZE);
-   memset(theReserved3, ' ', RESERVED_3_SIZE);
-
-   // null terminate
-   theAcquisitionDate[ACQUISITION_DATE_SIZE] = '\0';
-   theMissionNumber[MISSION_NO_SIZE] = '\0';
-   theMissionIdentification[MISSION_IDENTIFICATION_SIZE] = '\0';
-   theFlightNo[FLIGHT_NO_SIZE] = '\0';
-   theOpNum[OP_NUM_SIZE] = '\0';
-   theCurrentSegment[CURRENT_SEGMENT_SIZE] = '\0';
-   theReproNum[REPRO_NUM_SIZE] = '\0';
-   theReplay[REPLAY_SIZE] = '\0';
-   theReserved1[RESERVED_1_SIZE] = '\0';
-   theStartTileColumn[START_TILE_COLUMN_SIZE] = '\0';
-   theStartTileRow[START_TILE_ROW_SIZE] = '\0';
-   theEndSegment[END_SEGMENT_SIZE] = '\0';
-   theTileColumn[END_TILE_COLUMN_SIZE] = '\0';
-   theTileRow[END_TILE_ROW_SIZE] = '\0';
-   theCountry[COUNTRY_SIZE] = '\0';
-   theReserved2[RESERVED_2_SIZE] = '\0';
-   theLocation[LOCATION_SIZE] = '\0';
-   theReserved3[RESERVED_3_SIZE] = '\0';
-}
-
-std::ostream& ossimNitfAimidbTag::print(
-   std::ostream& out, const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += getTagName();
-   pfx += ".";
-   
-   out << setiosflags(std::ios::left)
-       << pfx << std::setw(24) << "CETAG:"
-       << getTagName() << "\n"
-       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
-       << pfx << std::setw(24) << "ACQUISITION_DATE:"
-       << theAcquisitionDate << "\n"
-       << pfx << std::setw(24) << "MISSION_NO:"
-       << theMissionNumber << "\n"
-       << pfx << std::setw(24) << "MISSION_IDENTIFICATION:"
-       << theMissionIdentification<< "\n"
-       << pfx << std::setw(24) << "FLIGHT_NO:"
-       << theFlightNo << "\n"
-       << pfx << std::setw(24) << "OP_NUM:"
-       << theOpNum << "\n"
-       << pfx << std::setw(24) << "CURRENT_SEGMENT:"
-       << theCurrentSegment << "\n"
-       << pfx << std::setw(24) << "REPRO_NUM:"
-       << theReproNum<< "\n"
-       << pfx << std::setw(24) << "REPLAY:"
-       << theReplay<< "\n"
-       << pfx << std::setw(24) << "START_TILE_COLUMN:"
-       << theStartTileColumn << "\n"
-       << pfx << std::setw(24) << "START_TILE_ROW:"
-       << theStartTileRow << "\n"
-       << pfx << std::setw(24) << "END_SEGMENT:"
-       << theEndSegment << "\n"
-       << pfx << std::setw(24) << "END_TILE_COLUMN:"
-       << theTileColumn << "\n"
-       << pfx << std::setw(24) << "END_TILE_ROW:"
-       << theTileRow << "\n"
-       << pfx << std::setw(24) << "COUNTRY:"
-       << theCountry << "\n"
-       << pfx << std::setw(24) << "LOCATION:"
-       << theLocation << "\n";
-   
-   return out;
-}
diff --git a/src/ossim/support_data/ossimNitfBlockaTag.cpp b/src/ossim/support_data/ossimNitfBlockaTag.cpp
deleted file mode 100644
index 3aea93a..0000000
--- a/src/ossim/support_data/ossimNitfBlockaTag.cpp
+++ /dev/null
@@ -1,325 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: BLOCKA tag class declaration.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimNitfBlockaTag.cpp 22013 2012-12-19 17:37:20Z dburken $
-
-#include <cstring> /* for memcpy */
-#include <sstream>
-#include <iomanip>
-
-#include <ossim/support_data/ossimNitfBlockaTag.h>
-#include <ossim/support_data/ossimNitfCommon.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimDms.h>
-#include <ossim/base/ossimDpt.h>
-
-static const ossimTrace traceDebug(ossimString("ossimNitfBlockaTag:debug"));
-
-RTTI_DEF1(ossimNitfBlockaTag, "ossimNitfBlockaTag", ossimNitfRegisteredTag);
-
-ossimNitfBlockaTag::ossimNitfBlockaTag()
-   : ossimNitfRegisteredTag(std::string("BLOCKA"), 123)
-{
-   clearFields();
-}
-
-void ossimNitfBlockaTag::parseStream(std::istream& in)
-{
-   clearFields();
-   
-   in.read(theBlockInstance, BLOCK_INSTANCE_SIZE);
-   in.read(theNGray,         N_GRAY_SIZE);
-   in.read(theLLines,        L_LINES_SIZE);
-   in.read(theLayoverAngle,  LAYOVER_ANGLE_SIZE);
-   in.read(theShadowAngle,   SHADOW_ANGLE_SIZE);
-   in.read(theField6,        FIELD_6_SIZE);
-   in.read(theFrlcLoc,       FRLC_LOC_SIZE);
-   in.read(theLrlcLoc,       LRLC_LOC_SIZE);
-   in.read(theLrfcLoc,       LRFC_LOC_SIZE);
-   in.read(theFrfcLoc,       FRFC_LOC_SIZE);
-   in.read(theField11,       FIELD_11_SIZE);
-   
-}
-
-void ossimNitfBlockaTag::writeStream(std::ostream& out)
-{
-   out.write(theBlockInstance, BLOCK_INSTANCE_SIZE);
-   out.write(theNGray,         N_GRAY_SIZE);
-   out.write(theLLines,        L_LINES_SIZE);
-   out.write(theLayoverAngle,  LAYOVER_ANGLE_SIZE);
-   out.write(theShadowAngle,   SHADOW_ANGLE_SIZE);
-   out.write(theField6,        FIELD_6_SIZE);
-   out.write(theFrlcLoc,       FRLC_LOC_SIZE);
-   out.write(theLrlcLoc,       LRLC_LOC_SIZE);
-   out.write(theLrfcLoc,       LRFC_LOC_SIZE);
-   out.write(theFrfcLoc,       FRFC_LOC_SIZE);
-   out.write(theField11,       FIELD_11_SIZE);
-}
-
-void ossimNitfBlockaTag::clearFields()
-{
-   memcpy(theBlockInstance, "01",    BLOCK_INSTANCE_SIZE);
-   memset(theNGray,         '0',     N_GRAY_SIZE);
-   memset(theLLines,        '0',     L_LINES_SIZE);
-   memset(theLayoverAngle,  ' ',     LAYOVER_ANGLE_SIZE);
-   memset(theShadowAngle,   ' ',     SHADOW_ANGLE_SIZE);
-   memset(theField6,        ' ',     FIELD_6_SIZE);
-   memset(theFrlcLoc,       ' ',     FRLC_LOC_SIZE);
-   memset(theLrlcLoc,       ' ',     LRLC_LOC_SIZE);
-   memset(theLrfcLoc,       ' ',     LRFC_LOC_SIZE);
-   memset(theFrfcLoc,       ' ',     FRFC_LOC_SIZE);
-   memcpy(theField11,       "010.0", FIELD_11_SIZE);
-   
-   theBlockInstance[BLOCK_INSTANCE_SIZE] = '\0';
-   theNGray[N_GRAY_SIZE]                 = '\0';
-   theLLines[L_LINES_SIZE]               = '\0';
-   theLayoverAngle[LAYOVER_ANGLE_SIZE]   = '\0';
-   theShadowAngle[SHADOW_ANGLE_SIZE]     = '\0';
-   theField6[FIELD_6_SIZE]               = '\0';
-   theFrlcLoc[FRLC_LOC_SIZE]             = '\0';
-   theLrlcLoc[LRLC_LOC_SIZE]             = '\0';
-   theLrfcLoc[LRFC_LOC_SIZE]             = '\0';
-   theFrfcLoc[FRFC_LOC_SIZE]             = '\0';
-   theField11[FIELD_11_SIZE]              = '\0';
-}
-
-std::ostream& ossimNitfBlockaTag::print(std::ostream& out,
-                                        const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += getTagName();
-   pfx += ".";
-   
-   // Grab the corners parsed into points.
-   ossimDpt ulPt;
-   ossimDpt urPt;
-   ossimDpt lrPt;
-   ossimDpt llPt;
-   getFrfcLoc(ulPt);
-   getFrlcLoc(urPt);
-   getLrlcLoc(lrPt);
-   getLrfcLoc(llPt);
-   
-   out << setiosflags(ios::left)
-       << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n"
-       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
-       << pfx << std::setw(24) << "BLOCK_INSTANCE:" << theBlockInstance << "\n"
-       << pfx << std::setw(24) << "N_GRAY:"         << theNGray << "\n"
-       << pfx << std::setw(24) << "L_LINES:"        << theLLines << "\n"
-       << pfx << std::setw(24) << "LAYOVER_ANGLE:"  << theLayoverAngle << "\n"
-       << pfx << std::setw(24) << "SHADOW_ANGLE:"   << theShadowAngle << "\n"
-       << pfx << std::setw(24) << "FIELD_6:"        << theField6 << "\n"
-       << pfx << std::setw(24) << "FRLC_LOC:"       << theFrlcLoc << "\n"
-       << pfx << std::setw(24) << "LRLC_LOC:"       << theLrlcLoc << "\n"
-       << pfx << std::setw(24) << "LRFC_LOC:"       << theLrfcLoc << "\n"
-       << pfx << std::setw(24) << "FRFC_LOC:"       << theFrfcLoc << "\n"
-       << pfx << std::setw(24) << "FIELD_11:"       << theField11 << "\n"
-       << pfx << std::setw(24) << "upper left:"     << ulPt << "\n"
-       << pfx << std::setw(24) << "upper right:"    << urPt << "\n"
-       << pfx << std::setw(24) << "lower right:"    << lrPt << "\n"
-       << pfx << std::setw(24) << "lower left:"     << llPt << "\n";
-
-   return out;
-}
-
-void ossimNitfBlockaTag::setBlockInstance(ossim_uint32 block)
-{
-   if ( (block > 0) && (block < 100) )
-   {
-      ossimString os =
-         ossimNitfCommon::convertToIntString(block,
-                                             BLOCK_INSTANCE_SIZE);
-      memcpy(theBlockInstance, os.c_str(), BLOCK_INSTANCE_SIZE);
-   }
-}
-
-ossimString ossimNitfBlockaTag::getBlockInstance() const
-{
-   return ossimString(theBlockInstance);
-}
-
-void ossimNitfBlockaTag::setNGray(ossim_uint32 grayCount)
-{
-   if (grayCount < 100000)
-   {
-      ossimString os =
-         ossimNitfCommon::convertToUIntString(grayCount,
-                                              N_GRAY_SIZE);
-      memcpy(theNGray, os.c_str(), N_GRAY_SIZE);
-   }
-}
-
-ossimString ossimNitfBlockaTag::getNGray() const
-{
-   return ossimString(theNGray);
-}
-
-void ossimNitfBlockaTag::setLLines(ossim_uint32 lines)
-{
-   if (lines < 100000)
-   {
-      ossimString os =
-         ossimNitfCommon::convertToUIntString(lines, L_LINES_SIZE);
-      memcpy(theLLines, os.c_str(), L_LINES_SIZE);
-   }
-}
-
-ossimString ossimNitfBlockaTag::getLLines() const
-{
-   return ossimString(theLLines);
-}
-
-void ossimNitfBlockaTag::setLayoverAngle(ossim_uint32 angle)
-{
-   if (angle < 360)
-   {
-      ossimString os =
-         ossimNitfCommon::convertToUIntString(angle, LAYOVER_ANGLE_SIZE);
-      memcpy(theLayoverAngle, os.c_str(), LAYOVER_ANGLE_SIZE);
-   }
-}
-
-ossimString ossimNitfBlockaTag::getLayoverAngle() const
-{
-   return ossimString(theLayoverAngle);
-}
-
-void ossimNitfBlockaTag::setShadowAngle(ossim_uint32 angle)
-{
-   if (angle < 360)
-   {
-      ossimString os =
-         ossimNitfCommon::convertToUIntString(angle, SHADOW_ANGLE_SIZE);
-      memcpy(theShadowAngle, os.c_str(), SHADOW_ANGLE_SIZE);
-   }
-}
-
-ossimString ossimNitfBlockaTag::getShadowAngle() const
-{
-   return ossimString(theShadowAngle);
-}
-
-void ossimNitfBlockaTag::setFrlcLoc(const ossimDpt& pt)
-{
-   ossimString os = ossimNitfCommon::convertToDdLatLonLocString(pt, 6);
-   memcpy(theFrlcLoc, os.c_str(), FRLC_LOC_SIZE);
-}
-
-ossimString ossimNitfBlockaTag::getFrlcLoc() const
-{
-   return ossimString(theFrlcLoc);
-}
-
-void ossimNitfBlockaTag::getFrlcLoc(ossimDpt& pt) const
-{
-   ossimString os = theFrlcLoc;
-   converLocStringToPt(os, pt);
-}
-
-void ossimNitfBlockaTag::setLrlcLoc(const ossimDpt& pt)
-{
-   ossimString os = ossimNitfCommon::convertToDdLatLonLocString(pt, 6);
-   memcpy(theLrlcLoc, os.c_str(), LRLC_LOC_SIZE);
-}
-   
-ossimString ossimNitfBlockaTag::getLrlcLoc() const
-{
-   return ossimString(theLrlcLoc);
-}
-
-void ossimNitfBlockaTag::getLrlcLoc(ossimDpt& pt) const
-{
-   ossimString os = theLrlcLoc;
-   converLocStringToPt(os, pt);
-}
-
-void ossimNitfBlockaTag::setLrfcLoc(const ossimDpt& pt)
-{
-   ossimString os = ossimNitfCommon::convertToDdLatLonLocString(pt, 6);
-   memcpy(theLrfcLoc, os.c_str(), LRFC_LOC_SIZE);
-}
-
-ossimString ossimNitfBlockaTag::getLrfcLoc() const
-{
-   return ossimString(theLrfcLoc);
-}
-
-void ossimNitfBlockaTag::getLrfcLoc(ossimDpt& pt) const
-{
-   ossimString os = theLrfcLoc;
-   converLocStringToPt(os, pt); 
-}
-
-void ossimNitfBlockaTag::setFrfcLoc(const ossimDpt& pt)
-{
-   ossimString os = ossimNitfCommon::convertToDdLatLonLocString(pt, 6);
-   memcpy(theFrfcLoc, os.c_str(), FRFC_LOC_SIZE);
-}
-
-ossimString ossimNitfBlockaTag::getFrfcLoc() const
-{
-   return ossimString(theFrfcLoc);
-}
-
-void ossimNitfBlockaTag::getFrfcLoc(ossimDpt& pt) const
-{
-   ossimString os = theFrfcLoc;
-   converLocStringToPt(os, pt);
-}
-
-void ossimNitfBlockaTag::converLocStringToPt(const ossimString& locationString,
-                                             ossimDpt& pt) const
-{
-   if (locationString.size() != 21) return;
-
-   std::string s = locationString;
-   
-   std::string lat(s, 0, 10);
-   std::string lon(s, 10, 11);
-
-   if ( (lat[0] == 'N') || (lat[0] == 'S') )
-   {
-      // Need to enter spaces for ossimDms to parse correctly
-      std::ostringstream latStream;
-      latStream << lat.substr(0, 3) << " " << lat.substr(3, 2)
-                << " " << lat.substr(5);
-      lat = latStream.str();
-      
-      // Use the dms class to parse.
-      ossimDms dms(0.0, true);
-      dms.setDegrees(lat.c_str());
-      pt.y = dms.getDegrees();
-   }
-   else
-   {
-      ossimString os = lat;
-      pt.y = os.toDouble();
-   }
-   if ( (lon[0] == 'E') || (lon[0] == 'W') )
-   {
-      // Need to enter spaces for ossimDms to parse correctly
-      std::ostringstream lonStream;
-      lonStream << lon.substr(0, 4) << " " << lon.substr(4, 2)
-                << " " << lon.substr(6);
-      lon = lonStream.str();
-      
-      // Use the dms class to parse.
-      ossimDms dms(0.0, false);
-      dms.setDegrees(lon.c_str());
-      pt.x = dms.getDegrees();
-   }
-   else
-   {
-      ossimString os = lon;
-      pt.x = os.toDouble();
-   }
-}
diff --git a/src/ossim/support_data/ossimNitfCommon.cpp b/src/ossim/support_data/ossimNitfCommon.cpp
deleted file mode 100644
index c6e3cf7..0000000
--- a/src/ossim/support_data/ossimNitfCommon.cpp
+++ /dev/null
@@ -1,541 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Utility class for global nitf methods.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimNitfCommon.cpp 17978 2010-08-24 16:17:00Z dburken $
-
-#include <cstring> /* for memcpy */
-#include <sstream>
-#include <iomanip>
-#include <sstream>
-#include <stdexcept>
-#include <iostream>
-#include <ossim/support_data/ossimNitfCommon.h>
-#include <ossim/base/ossimDms.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimTrace.h>
-
-static const ossimTrace traceDebug(ossimString("ossimNitfCommon:debug"));
-
-                                   
-ossimNitfCommon::ossimNitfCommon(){}
-
-ossimNitfCommon::~ossimNitfCommon(){}
-
-ossimString ossimNitfCommon::convertToScientificString(
-   const ossim_float64& aValue,
-   ossim_uint32 size)
-{
-   // Precision cannot hit 0 for this to work...
-   if ( ((aValue < 0.0) && (size < 8)) ||
-        ((aValue >= 0.0) && (size < 7)) )
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfCommon::convertToScientificString DEBUG:"
-            << "\nsize range error!"
-            << std::endl;
-      }
-      return ossimString();
-   }
-
-   //--
-   // Set the precision to account for size with 1.xxxxxE+01
-   //---
-   ossim_uint32 precision = size - 6;
-   
-   if (aValue < 0.0)
-   {
-      --precision;
-   }
-   
-   std::ostringstream s1;
-   s1 << std::setiosflags(std::ios_base::scientific|std::ios_base::internal)
-      << std::setfill('0')
-      // << setw(size)
-      << std::setprecision(precision)
-      << aValue;
-   
-   ossimString result = s1.str();
-
-   // Upcase the "e".
-   result.upcase();
-   
-   if (traceDebug())
-   {
-      if (result.size() != size)
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfCommon::convertToScientificString DEBUG:"
-            << "\nIncorrect output size!"
-            << "\nValue:  " << aValue
-            << "\nString: " << result
-            << std::endl;
-      }
-   }
-   return result;
-}
-
-ossimString ossimNitfCommon::convertToDoubleString(
-   const ossim_float64& aValue,
-   ossim_uint32 precision,
-   ossim_uint32 size)
-{
-   ossim_uint32 width = size;
-   
-   std::ostringstream s1;
-   s1 << std::setiosflags(std::ios_base::fixed|
-                     std::ios_base::internal)
-      << std::setprecision(precision)
-      << std::setfill('0')
-      << std::setw(width)
-      << aValue;
-   
-   ossimString result = s1.str();
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfCommon::convertToDoubleString DEBUG:"
-         << "\nresult: " << result << std::endl;
-      
-      if (result.size() != size)
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfCommon::convertToDoubleString DEBUG:"
-            << "\nIncorrect output size!"
-            << std::endl;
-      }
-   }
-   return result;
-}
-
-ossimString ossimNitfCommon::convertToUIntString(ossim_uint32 aValue,
-                                                ossim_uint32 size)
-{
-   ossim_uint32 width = size;
-   
-   std::ostringstream s1;
-   s1 << std::setiosflags(std::ios_base::fixed|
-                     std::ios_base::internal)
-      << std::setfill('0')
-      << std::setw(width)
-      << aValue;
-   
-   ossimString result = s1.str();
-
-   if (traceDebug())
-   {
-      if (result.size() != size)
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfCommon::convertToUIntString DEBUG:"
-            << "\nIncorrect output size!"
-            << "\nValue:  " << aValue
-            << "\nString: " << result
-            << std::endl;
-      }
-   }
-   return result;   
-}
-
-ossimString ossimNitfCommon::convertToIntString(ossim_int32 aValue,
-                                                ossim_uint32 size)
-{
-   ossim_uint32 width = size;
-   
-   std::ostringstream s1;
-   s1 << std::setiosflags(std::ios_base::fixed|
-                     std::ios_base::internal)
-      << std::setfill('0')
-      << std::setw(width)
-      << aValue;
-   
-   ossimString result = s1.str();
-
-   if (traceDebug())
-   {
-      if (result.size() != size)
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfCommon::convertToIntString DEBUG:"
-            << "\nIncorrect output size!"
-            << "\nValue:  " << aValue
-            << "\nString: " << result
-            << std::endl;
-      }
-   }
-   return result;   
-}
-
-ossimString ossimNitfCommon::convertToDdLatLonLocString(const ossimDpt& pt,
-                                                        ossim_uint32 precision)
-{
-   ossimString lat;
-   ossimString lon;
-   ossim_uint32 latSize = precision+4; // size = precision + "-33."
-   ossim_uint32 lonSize = precision+5; // size = precision + "-122."
-   
-   if (pt.y >= 0.0)
-   {
-      lat = "+";
-      --latSize;
-   }
-   if (pt.x >= 0.0)
-   {
-      lon = "+";
-      --lonSize;
-   }
-   lat += convertToDoubleString(pt.y,
-                                precision,
-                                latSize);
-   lon += convertToDoubleString(pt.x,
-                                precision,
-                                lonSize);
-   ossimString result = lat+lon;
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfCommon::convertToDdLatLonLocString DEBUG:"
-         << "\nresult: " << result
-         << std::endl;
-   }
-
-   return result;
-}
-
-void ossimNitfCommon::setField(void* fieldDestination,
-                               const ossimString& src,
-                               std::streamsize width,
-                               std::ios_base::fmtflags ioflags,
-                               char fill)
-{
-   std::ostringstream out;
-   out << std::setw(width)
-       << std::setfill(fill)
-       << std::setiosflags(ioflags)
-       << src.trim().c_str();
-   
-   memcpy(fieldDestination, out.str().c_str(), width);
-}
-
-ossimString ossimNitfCommon::encodeUtm(
-                                       ossim_uint32 zone,
-                                       const ossimDpt& ul,
-                                       const ossimDpt& ur,
-                                       const ossimDpt& lr,
-                                       const ossimDpt& ll)
-{
-   std::ostringstream out;
-   
-   if(zone > 60)
-   {
-      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUTM zone greate than 60!";
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
-      }
-      throw std::out_of_range(s);
-   }
-   
-   ossim_float64 east  = ul.x;
-   ossim_float64 north = ul.y;
-   
-   if((ossim_uint32)(east+.5) > 999999)
-   {
-      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUpper left easting too large for NITF field!";
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
-      }
-      throw std::out_of_range(s);
-   }
-   
-   if((ossim_uint32)(north+.5) > 9999999)
-   {
-      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUpper left northing too large for NITF field!";
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
-      }
-      throw std::out_of_range(s);
-   }
-   
-   out << std::setw(2)
-   << std::setfill('0')
-   << zone
-   << std::setw(6)
-   << std::setfill('0')
-   <<(ossim_uint32)(east+.5)
-   << std::setw(7)
-   << std::setfill('0')
-   <<(ossim_uint32)(north+.5);
-   
-   
-   east  = ur.x;
-   north = ur.y;
-   
-   if((ossim_uint32)(east+.5) > 999999)
-   {
-      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUpper right easting too large for NITF field!";
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
-      }
-      throw std::out_of_range(s);
-   }
-   
-   if((ossim_uint32)(north+.5) > 9999999)
-   {
-      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUpper right northing too large for NITF field!";
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
-      }
-      throw std::out_of_range(s);
-   }
-   
-   out << std::setw(2)
-   << std::setfill('0')
-   << zone
-   << std::setw(6)
-   << std::setfill('0')
-   <<(ossim_uint32)(east+.5)
-   << std::setw(7)
-   << std::setfill('0')
-   <<(ossim_uint32)(north+.5);
-   east  = lr.x;
-   north = lr.y;
-   
-   if((ossim_uint32)(east+.5) > 999999)
-   {
-      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nLower right easting too large for NITF field!";
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
-      }
-      throw std::out_of_range(s);
-   }
-   
-   if((ossim_uint32)(north+.5) > 9999999)
-   {
-      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nLower right northing too large for NITF field!";
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
-      }
-      throw std::out_of_range(s);
-   }   
-   
-   out << std::setw(2)
-   << std::setfill('0')
-   << zone
-   << std::setw(6)
-   << std::setfill('0')
-   <<(ossim_uint32)(east+.5)
-   << std::setw(7)
-   << std::setfill('0')
-   <<(ossim_uint32)(north+.5);
-   
-   east  = ll.x;
-   north = ll.y;
-   
-   if((ossim_uint32)(east+.5) > 999999)
-   {
-      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nLower left easting too large for NITF field!";
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
-      }
-      throw std::out_of_range(s);
-   }
-   
-   if((ossim_uint32)(north+.5) > 9999999)
-   {
-      std::string s = "ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nLower left northing too large for NITF field!";
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
-      }
-      throw std::out_of_range(s);
-   }
-   
-   out << std::setw(2)
-   << std::setfill('0')
-   << zone
-   << std::setw(6)
-   << std::setfill('0')
-   <<(ossim_uint32)(east+.5)
-   << std::setw(7)
-   << std::setfill('0')
-   <<(ossim_uint32)(north+.5);
-   
-   return out.str().c_str();
-}
-
-ossimString ossimNitfCommon::encodeGeographicDms(const ossimDpt& ul,
-                                                 const ossimDpt& ur,
-                                                 const ossimDpt& lr,
-                                                 const ossimDpt& ll)
-{
-   std::ostringstream out;
-   
-   out << ossimDms(ul.y, true).toString("ddmmssC").c_str();
-   out << ossimDms(ul.x, false).toString("dddmmssC").c_str();
-   out << ossimDms(ur.y, true).toString("ddmmssC").c_str();
-   out << ossimDms(ur.x, false).toString("dddmmssC").c_str();
-   out << ossimDms(lr.y, true).toString("ddmmssC").c_str();
-   out << ossimDms(lr.x, false).toString("dddmmssC").c_str();
-   out << ossimDms(ll.y, true).toString("ddmmssC").c_str();
-   out << ossimDms(ll.x, false).toString("dddmmssC").c_str();
-
-   return ossimString(out.str());
-}
-
-ossimString ossimNitfCommon::encodeGeographicDecimalDegrees(const ossimDpt& ul,
-                                                            const ossimDpt& ur,
-                                                            const ossimDpt& lr,
-                                                            const ossimDpt& ll)
-{
-   std::ostringstream out;
-   
-   out << (ul.lat >= 0.0?"+":"")
-   << std::setw(6)
-   << std::setfill('0')
-   << std::setprecision(3)
-   << std::setiosflags(std::ios::fixed)
-   << ul.lat
-   << (ul.lon >= 0.0?"+":"")
-   << std::setw(7)
-   << std::setfill('0')
-   << std::setprecision(3)
-   << std::setiosflags(std::ios::fixed)
-   << ul.lon;
-   out << (ur.lat >= 0.0?"+":"")
-   << std::setw(6)
-   << std::setfill('0')
-   << std::setprecision(3)
-   << std::setiosflags(std::ios::fixed)
-   << ur.lat
-   << (ur.lon >= 0.0?"+":"")
-   << std::setw(7)
-   << std::setfill('0')
-   << std::setprecision(3)
-   << std::setiosflags(std::ios::fixed)
-   << ur.lon;
-   out << (lr.lat >= 0.0?"+":"")
-   << std::setw(6)
-   << std::setfill('0')
-   << std::setprecision(3)
-   << std::setiosflags(std::ios::fixed)
-   << lr.lat
-   << (lr.lon >= 0.0?"+":"")
-   << std::setw(7)
-   << std::setfill('0')
-   << std::setprecision(3)
-   << std::setiosflags(std::ios::fixed)
-   << lr.lon;
-   out << (ll.lat >= 0.0?"+":"")
-   << std::setw(6)
-   << std::setfill('0')
-   << std::setprecision(3)
-   << std::setiosflags(std::ios::fixed)
-   << ll.lat
-   << (ll.lon >= 0.0?"+":"")
-   << std::setw(7)
-   << std::setfill('0')
-   << std::setprecision(3)
-   << std::setiosflags(std::ios::fixed)
-   << ll.lon;
-   
-   return ossimString(out.str());
-}
-
-ossimString ossimNitfCommon::getNitfPixelType(ossimScalarType scalarType)
-{
-   ossimString pixelType;
-   switch(scalarType)
-   {
-      case OSSIM_UINT8:
-      case OSSIM_USHORT11:
-      case OSSIM_UINT16:
-      case OSSIM_UINT32:
-      {
-         pixelType = "INT";
-         break;
-      }
-      case OSSIM_SINT16:
-      case OSSIM_SINT32:
-      {
-         pixelType    = "SI";
-         break;
-      }
-      case OSSIM_FLOAT:
-      case OSSIM_NORMALIZED_FLOAT:
-      case OSSIM_DOUBLE:
-      case OSSIM_NORMALIZED_DOUBLE:
-      {
-         pixelType    = "R";
-         break;
-      }
-      default:
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << __FILE__ << ":" << __LINE__
-            << "\nUnhandled scalar type:  " << scalarType << std::endl;
-         break;
-      }
-   }
-   return pixelType;
-}
-
-ossimString ossimNitfCommon::getCompressionRate(const ossimIrect& rect,
-                                                ossim_uint32 bands,
-                                                ossimScalarType scalar,
-                                                ossim_uint64 lengthInBytes)
-{
-   ossimString result("");
-   
-   ossim_float64 uncompressedSize =
-      ossim::scalarSizeInBytes(scalar) * rect.width() * rect.height() * bands;
-   ossim_float64 bitsPerPix = ossim::getBitsPerPixel(scalar);
-   ossim_float64 rate = ( bitsPerPix *
-                          (static_cast<ossim_float64>(lengthInBytes) /
-                           uncompressedSize) );
-
-   // Multiply by ten as there is an implied decimal point.
-   rate *= 10.0;
-
-   // Convert to string with zero precision.
-   ossimString s = ossimString::toString(rate, 0);
-
-   if (s.size())
-   {
-      if (s.size() <= 3)
-      {
-         result = "N";
-         if (s.size() == 2)
-         {
-            result += "0";
-         }
-         else if (s.size() == 1)
-         {
-            result += "00";
-         }
-         result += s;
-      }
-   }
-   return result;
-}
-
diff --git a/src/ossim/support_data/ossimNitfCompressionHeader.cpp b/src/ossim/support_data/ossimNitfCompressionHeader.cpp
deleted file mode 100644
index 1a89c5e..0000000
--- a/src/ossim/support_data/ossimNitfCompressionHeader.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2004 Garrett Potts
-//
-// LICENSE: LGPL see top level LICENSE.txt for more details
-// 
-// Author: Garrett Potts
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfCompressionHeader.cpp 18413 2010-11-11 19:56:22Z gpotts $
-#include <ossim/support_data/ossimNitfCompressionHeader.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <sstream>
-
-RTTI_DEF1(ossimNitfCompressionHeader, "ossimNitfCompressionHeader", ossimObject);
-
-bool ossimNitfCompressionHeader::saveState(ossimKeywordlist& kwl, const ossimString& prefix)const
-{
-   return ossimObject::saveState(kwl, prefix);
-}
diff --git a/src/ossim/support_data/ossimNitfCsccgaTag.cpp b/src/ossim/support_data/ossimNitfCsccgaTag.cpp
deleted file mode 100644
index 1cb56ae..0000000
--- a/src/ossim/support_data/ossimNitfCsccgaTag.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Garrett Potts
-//
-// Description: CSCCGA tag source file
-//
-//----------------------------------------------------------------------------
-// $Id$
-#include <ossim/support_data/ossimNitfCsccgaTag.h>
-#include <iomanip>
-#include <iostream>
-
-ossimNitfCsccgaTag::ossimNitfCsccgaTag()
-   : ossimNitfRegisteredTag(std::string("CSCCGA"), CEL_SIZE)
-{
-   clearFields();
-}
-
-void ossimNitfCsccgaTag::parseStream(std::istream& in)
-{
-   in.read(m_ccgSource, CCG_SOURCE_SIZE);
-   in.read(m_regSensor, REG_SENSOR_SIZE);
-   in.read(m_originLine, ORIGIN_LINE_SIZE);
-   in.read(m_originSample, ORIGIN_SAMPLE_SIZE);
-   in.read(m_asCellSize, AS_CELL_SIZE_SIZE);
-   in.read(m_csCellSize, CS_CELL_SIZE_SIZE);
-   in.read(m_ccgMaxLine, CCG_MAX_LINE_SIZE);
-   in.read(m_ccgMaxSample, CCG_MAX_SAMPLE_SIZE);
-}
-
-void ossimNitfCsccgaTag::writeStream(std::ostream& out)
-{
-   out.write(m_ccgSource, CCG_SOURCE_SIZE);
-   out.write(m_regSensor, REG_SENSOR_SIZE);
-   out.write(m_originLine, ORIGIN_LINE_SIZE);
-   out.write(m_originSample, ORIGIN_SAMPLE_SIZE);
-   out.write(m_asCellSize, AS_CELL_SIZE_SIZE);
-   out.write(m_csCellSize, CS_CELL_SIZE_SIZE);
-   out.write(m_ccgMaxLine, CCG_MAX_LINE_SIZE);
-   out.write(m_ccgMaxSample, CCG_MAX_SAMPLE_SIZE);
-}
-
-std::ostream& ossimNitfCsccgaTag::print(std::ostream& out,
-                                        const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += getTagName();
-   pfx += ".";
-   out << setiosflags(ios::left)
-       << pfx << std::setw(24) << "CETAG:"      << getTagName() << "\n"
-       << pfx << std::setw(24) << "CEL:"        << getTagLength() << "\n"
-       << pfx << std::setw(24) << "CCG_SOURCE:" << m_ccgSource << "\n"
-       << pfx << std::setw(24) << "CCG_SOURCE:" << m_regSensor << "\n"
-       << pfx << std::setw(24) << "ORIGIN_LINE:" << m_originLine << "\n"
-       << pfx << std::setw(24) << "ORIGIN_SAMPLE:" << m_originSample << "\n"
-       << pfx << std::setw(24) << "AS_CELL_SIZE:" << m_asCellSize << "\n"
-       << pfx << std::setw(24) << "CS_CELL_SIZE:" << m_csCellSize << "\n"
-       << pfx << std::setw(24) << "CCG_MAX_LINE:" << m_ccgMaxLine << "\n"
-       << pfx << std::setw(24) << "CCG_MAX_SAMPLE:" << m_ccgMaxSample << "\n";
-
-
-   return out;
-}
-
-void ossimNitfCsccgaTag::clearFields()
-{
-   memset(m_ccgSource,' ', CCG_SOURCE_SIZE);
-   memset(m_regSensor, ' ', REG_SENSOR_SIZE);
-   memset(m_originLine, '0', ORIGIN_LINE_SIZE);
-   memset(m_originSample, '0', ORIGIN_SAMPLE_SIZE);
-   memset(m_asCellSize, '0', AS_CELL_SIZE_SIZE);
-   memset(m_csCellSize, '0', CS_CELL_SIZE_SIZE);
-   memset(m_ccgMaxLine, '0', CCG_MAX_LINE_SIZE);
-   memset(m_ccgMaxSample, '0', CCG_MAX_SAMPLE_SIZE);
-
-   m_ccgSource[CCG_SOURCE_SIZE] = '\0';
-   m_regSensor[REG_SENSOR_SIZE] = '\0';
-   m_originLine[ORIGIN_LINE_SIZE] = '\0';
-   m_originSample[ORIGIN_SAMPLE_SIZE] = '\0';
-   m_asCellSize[AS_CELL_SIZE_SIZE] = '\0';
-   m_csCellSize[CS_CELL_SIZE_SIZE] = '\0';
-   m_ccgMaxLine[CCG_MAX_LINE_SIZE] = '\0';
-   m_ccgMaxSample[CCG_MAX_SAMPLE_SIZE] = '\0';
-}
diff --git a/src/ossim/support_data/ossimNitfCscrnaTag.cpp b/src/ossim/support_data/ossimNitfCscrnaTag.cpp
deleted file mode 100644
index ac4fe6b..0000000
--- a/src/ossim/support_data/ossimNitfCscrnaTag.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: CSCRNA tag class definition.
-//
-// Corner Footprint TRE.
-//
-// See document STDI-0006-NCDRD Table 3.2-13 for more info.
-// 
-//----------------------------------------------------------------------------
-// $Id
-
-#include <cstring>
-#include <istream>
-#include <iostream>
-#include <iomanip>
-
-#include <ossim/support_data/ossimNitfCscrnaTag.h>
-
-
-RTTI_DEF1(ossimNitfCscrnaTag, "ossimNitfCscrnaTag", ossimNitfRegisteredTag);
-
-ossimNitfCscrnaTag::ossimNitfCscrnaTag()
-   : ossimNitfRegisteredTag(std::string("CSCRNA"), 109)
-{
-   clearFields();
-}
-
-ossimNitfCscrnaTag::~ossimNitfCscrnaTag()
-{
-}
-
-void ossimNitfCscrnaTag::parseStream(std::istream& in)
-{
-   clearFields();
-
-   in.read(thePredictedCornerFlag, 1);
-
-   in.read(theUlLat, 9);
-   in.read(theUlLon, 10);
-   in.read(theUlHt, 8);
-
-   in.read(theUrLat, 9);
-   in.read(theUrLon, 10);
-   in.read(theUrHt, 8);
-
-   in.read(theLrLat, 9);
-   in.read(theLrLon, 10);
-   in.read(theLrHt, 8);
-
-   in.read(theLlLat, 9);
-   in.read(theLlLon, 10);
-   in.read(theLlHt, 8);
-}
-
-void ossimNitfCscrnaTag::writeStream(std::ostream& out)
-{
-   out.write(thePredictedCornerFlag, 1);
-
-   out.write(theUlLat, 9);
-   out.write(theUlLon, 10);
-   out.write(theUlHt, 8);
-
-   out.write(theUrLat, 9);
-   out.write(theUrLon, 10);
-   out.write(theUrHt, 8);
-
-   out.write(theLrLat, 9);
-   out.write(theLrLon, 10);
-   out.write(theLrHt, 8);
-
-   out.write(theLlLat, 9);
-   out.write(theLlLon, 10);
-   out.write(theLlHt, 8);
-}
-
-void ossimNitfCscrnaTag::clearFields()
-{
-   // BCS-N's to '0's, BCS-A's to ' '(spaces)
-   memset(thePredictedCornerFlag, ' ', 1);
-   
-   memset(theUlLat, '0', 9);
-   memset(theUlLon, '0', 10);
-   memset(theUlHt, '0', 8);
-
-   memset(theUrLat, '0', 9);
-   memset(theUrLon, '0', 10);
-   memset(theUrHt, '0', 8);
-
-   memset(theLrLat, '0', 9);
-   memset(theLrLon, '0', 10);
-   memset(theLrHt, '0', 8);
-
-   memset(theLlLat, '0', 9);
-   memset(theLlLon, '0', 10);
-   memset(theLlHt, '0', 8);
-
-   thePredictedCornerFlag[1] = '\0';
-   
-   theUlLat[9] = '\0';
-   theUlLon[10] = '\0';
-   theUlHt[8] = '\0';
-
-   theUrLat[9] = '\0';
-   theUrLon[10] = '\0';
-   theUrHt[8] = '\0';
-
-   theLrLat[9] = '\0';
-   theLrLon[10] = '\0';
-   theLrHt[8] = '\0';
-
-   theLlLat[9] = '\0';
-   theLlLon[10] = '\0';
-   theLlHt[8] = '\0';
-}
-
-std::ostream& ossimNitfCscrnaTag::print(
-   std::ostream& out, const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += getTagName();
-   pfx += ".";
-   
-   out << setiosflags(std::ios::left)
-       << pfx << std::setw(24) << "CETAG:"
-       << getTagName() << "\n"
-       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
-      
-       << pfx << std::setw(24) << "PREDICT_CORNERS:"
-       << thePredictedCornerFlag << "\n"
-      
-       << pfx << std::setw(24) << "ULCRN_LAT:" << theUlLat << "\n"
-       << pfx << std::setw(24) << "ULCRN_LON:" << theUlLon << "\n"
-       << pfx << std::setw(24) << "ULCRN_HT:" << theUlHt << "\n"
-
-       << pfx << std::setw(24) << "URCRN_LAT:" << theUrLat << "\n"
-       << pfx << std::setw(24) << "URCRN_LON:" << theUrLon << "\n"
-       << pfx << std::setw(24) << "URCRN_HT:" << theUrHt << "\n"
-   
-       << pfx << std::setw(24) << "LRCRN_LAT:" << theLrLat << "\n"
-       << pfx << std::setw(24) << "LRCRN_LON:" << theLrLon << "\n"
-       << pfx << std::setw(24) << "LRCRN_HT:" << theLrHt << "\n"
-      
-       << pfx << std::setw(24) << "LLCRN_LAT:" << theLlLat << "\n"
-       << pfx << std::setw(24) << "LLCRN_LON:" << theLlLon << "\n"
-       << pfx << std::setw(24) << "LLCRN_HT:" << theLlHt << "\n";
-
-      return out;
-}
diff --git a/src/ossim/support_data/ossimNitfCsdidaTag.cpp b/src/ossim/support_data/ossimNitfCsdidaTag.cpp
deleted file mode 100644
index eba286d..0000000
--- a/src/ossim/support_data/ossimNitfCsdidaTag.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: CSDIDA tag class definition.
-//
-// Dataset Indentification TRE.
-//
-// See document STDI-0006-NCDRD Table 3.3-14 for more info.
-// 
-//----------------------------------------------------------------------------
-// $Id
-
-#include <cstring>
-#include <istream>
-#include <iostream>
-#include <iomanip>
-
-#include <ossim/support_data/ossimNitfCsdidaTag.h>
-
-
-RTTI_DEF1(ossimNitfCsdidaTag, "ossimNitfCsdidaTag", ossimNitfRegisteredTag);
-
-ossimNitfCsdidaTag::ossimNitfCsdidaTag()
-   : ossimNitfRegisteredTag(std::string("CSDIDA"), 70)
-{
-   clearFields();
-}
-
-ossimNitfCsdidaTag::~ossimNitfCsdidaTag()
-{
-}
-
-void ossimNitfCsdidaTag::parseStream(std::istream& in)
-{
-   clearFields();
-
-   in.read(theDay, 2);
-   in.read(theMonth, 3);
-   in.read(theYear, 4);
-   in.read(thePlatformCode, 2);
-   in.read(theVehicleId, 2);
-   in.read(thePass, 2);
-   in.read(theOperation, 3);
-   in.read(theSensorId, 2);
-   in.read(theProductId, 2);
-   in.read(theReservedField1, 4);
-   in.read(theTime, 14);
-   in.read(theProcessTime, 14);
-   in.read(theReservedField2, 2);
-   in.read(theReservedField3, 2);
-   in.read(theReservedField4, 1);
-   in.read(theReservedField5, 1);
-   in.read(theSoftwareVersionNumber, 10);
-}
-
-void ossimNitfCsdidaTag::writeStream(std::ostream& out)
-{
-   out.write(theDay, 2);
-   out.write(theMonth, 3);
-   out.write(theYear, 4);
-   out.write(thePlatformCode, 2);
-   out.write(theVehicleId, 2);
-   out.write(thePass, 2);
-   out.write(theOperation, 3);
-   out.write(theSensorId, 2);
-   out.write(theProductId, 2);
-   out.write(theReservedField1, 4);
-   out.write(theTime, 14);
-   out.write(theProcessTime, 14);
-   out.write(theReservedField2, 2);
-   out.write(theReservedField3, 2);
-   out.write(theReservedField4, 1);
-   out.write(theReservedField5, 1);
-   out.write(theSoftwareVersionNumber, 10);
-}
-
-void ossimNitfCsdidaTag::clearFields()
-{
-   // BCS-N's to '0's, BCS-A's to ' '(spaces)
-   
-   memset(theDay, '0', 2);
-   memset(theMonth, ' ', 3);
-   memset(theYear, '0', 4);
-   memset(thePlatformCode, ' ', 2);
-   memset(theVehicleId, '0', 2);
-   memset(thePass, '0', 2);
-   memset(theOperation, '0', 3);
-   memset(theSensorId, ' ', 2);
-   memset(theProductId, ' ', 2);
-   memcpy(theReservedField1, "00  ", 4);
-   memset(theTime, '0', 14);
-   memset(theProcessTime, '0', 14);
-   memcpy(theReservedField2, "00", 2);
-   memcpy(theReservedField3, "01", 2);
-   memcpy(theReservedField4, "N", 1);
-   memcpy(theReservedField5, "N", 1);
-   memset(theSoftwareVersionNumber, ' ', 10);
-
-   theDay[2] = '\0';
-   theMonth[3] = '\0';
-   theYear[4] = '\0';
-   thePlatformCode[2] = '\0';
-   theVehicleId[2] = '\0';
-   thePass[2] = '\0';
-   theOperation[3] = '\0';
-   theSensorId[2] = '\0';
-   theProductId[2] = '\0';
-   theReservedField1[4] = '\0';
-   theTime[14] = '\0';
-   theProcessTime[14] = '\0';
-   theReservedField2[2] = '\0';
-   theReservedField3[2] = '\0';
-   theReservedField4[0] = '\0';
-   theReservedField5[0] = '\0';
-   theSoftwareVersionNumber[10] = '\0';
-}
-
-std::ostream& ossimNitfCsdidaTag::print(
-   std::ostream& out, const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += getTagName();
-   pfx += ".";
-   
-   out << setiosflags(std::ios::left)
-       << pfx << std::setw(24) << "CETAG:"
-       << getTagName() << "\n"
-       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
-       << pfx << std::setw(24) << "DAY:" << theDay << "\n"
-       << pfx << std::setw(24) << "MONTH:" << theMonth << "\n"
-       << pfx << std::setw(24) << "YEAR:" << theYear << "\n"
-       << pfx << std::setw(24) << "PLATFORM_CODE:" << thePlatformCode << "\n"
-       << pfx << std::setw(24) << "VEHICLE_ID:" << theVehicleId << "\n"
-       << pfx << std::setw(24) << "PASS:" << thePass << "\n"
-       << pfx << std::setw(24) << "OPERATION:" << theOperation << "\n"
-       << pfx << std::setw(24) << "SENSOR_ID:" << theSensorId << "\n"
-       << pfx << std::setw(24) << "PRODUCT_ID:" << theProductId << "\n"
-       << pfx << std::setw(24) << "TIME:" << theTime << "\n"
-       << pfx << std::setw(24) << "PROCESS_TIME:" << theProcessTime << "\n"
-       << pfx << std::setw(24) << "SOFTWARE_VERSION_NUMBER:"
-       << theSoftwareVersionNumber << "\n";
-   
-   return out;
-}
diff --git a/src/ossim/support_data/ossimNitfCsexraTag.cpp b/src/ossim/support_data/ossimNitfCsexraTag.cpp
deleted file mode 100644
index 9cc07da..0000000
--- a/src/ossim/support_data/ossimNitfCsexraTag.cpp
+++ /dev/null
@@ -1,337 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: CSEXRA tag class definition.
-//
-// Exploitation Reference Data TRE.
-//
-// See document STDI-0006-NCDRD Table 3.5-16 for more info.
-// 
-//----------------------------------------------------------------------------
-// $Id
-
-#include <cstring>
-#include <istream>
-#include <iostream>
-#include <iomanip>
-
-#include <ossim/support_data/ossimNitfCsexraTag.h>
-
-
-RTTI_DEF1(ossimNitfCsexraTag, "ossimNitfCsexraTag", ossimNitfRegisteredTag);
-
-ossimNitfCsexraTag::ossimNitfCsexraTag()
-   : ossimNitfRegisteredTag(std::string("CSEXRA"), 132)
-{
-   clearFields();
-}
-
-ossimNitfCsexraTag::~ossimNitfCsexraTag()
-{
-}
-
-void ossimNitfCsexraTag::parseStream(std::istream& in)
-{
-   clearFields();
-
-   in.read(theSensor, 6);
-   in.read(theTileFirstLine, 12);
-   in.read(theImageTimeDuration, 12);
-   in.read(theMaxGsd, 5);
-   in.read(theAlongScanGsd, 5);
-   in.read(theCrossScanGsd, 5);
-   in.read(theGeoMeanGsd, 5);
-   in.read(theAlongScanVertGsd, 5);
-   in.read(theCrossScanVertGsd, 5);
-   in.read(theGeoMeanVertGsd, 5);
-   in.read(theGeoBetaAngle, 5);
-   in.read(theDynamicRange, 5);
-   in.read(theLine, 7);
-   in.read(theSamples, 5);
-   in.read(theAngleToNorth, 7);
-   in.read(theObliquityAngle, 6);
-   in.read(theAzOfObliquity, 7);
-   in.read(theGrdCover, 1);
-   in.read(theSnowDepthCategory, 1);
-   in.read(theSunAzimuth, 7);
-   in.read(theSunElevation, 7);
-   in.read(thePredictedNiirs, 3);
-   in.read(theCircularError, 3);
-   in.read(theLinearError, 3);
-}
-
-void ossimNitfCsexraTag::writeStream(std::ostream& out)
-{
-   out.write(theSensor, 6);
-   out.write(theTileFirstLine, 12);
-   out.write(theImageTimeDuration, 12);
-   out.write(theMaxGsd, 5);
-   out.write(theAlongScanGsd, 5);
-   out.write(theCrossScanGsd, 5);
-   out.write(theGeoMeanGsd, 5);
-   out.write(theAlongScanVertGsd, 5);
-   out.write(theCrossScanVertGsd, 5);
-   out.write(theGeoMeanVertGsd, 5);
-   out.write(theGeoBetaAngle, 5);
-   out.write(theDynamicRange, 5);
-   out.write(theLine, 7);
-   out.write(theSamples, 5);
-   out.write(theAngleToNorth, 7);
-   out.write(theObliquityAngle, 6);
-   out.write(theAzOfObliquity, 7);
-   out.write(theGrdCover, 1);
-   out.write(theSnowDepthCategory, 1);
-   out.write(theSunAzimuth, 7);
-   out.write(theSunElevation, 7);
-   out.write(thePredictedNiirs, 3);
-   out.write(theCircularError, 3);
-   out.write(theLinearError, 3);
-}
-
-void ossimNitfCsexraTag::clearFields()
-{
-   //---
-   // No attempt made to set to defaults.
-   // BCS-N's to '0's, BCS-A's to ' '(spaces)
-   //---
-
-   memset(theSensor, ' ',  6);
-   memset(theTileFirstLine, '0', 12);
-   memset(theImageTimeDuration, '0', 12);
-   memset(theMaxGsd, '0', 5);
-   memset(theAlongScanGsd, ' ', 5);
-   memset(theCrossScanGsd, ' ', 5);
-   memset(theGeoMeanGsd, ' ', 5);
-   memset(theAlongScanVertGsd, ' ', 5);
-   memset(theCrossScanVertGsd, ' ', 5);
-   memset(theGeoMeanVertGsd, ' ', 5);
-   memset(theGeoBetaAngle, ' ', 5);
-   memset(theDynamicRange, '0', 5);
-   memset(theLine, '0', 7);
-   memset(theSamples, '0', 5);
-   memset(theAngleToNorth, '0', 7);
-   memset(theObliquityAngle, '0', 6);
-   memset(theAzOfObliquity, '0', 7);
-   memset(theGrdCover, '0', 1);
-   memset(theSnowDepthCategory, '0', 1);
-   memset(theSunAzimuth, '0', 7);
-   memset(theSunElevation, '0', 7);
-   memset(thePredictedNiirs, ' ', 3);
-   memset(theCircularError, '0', 3);
-   memset(theLinearError, '0', 3);
-
-   theSensor[6] = '\0';
-   theTileFirstLine[12] = '\0';
-   theImageTimeDuration[12] = '\0';
-   theMaxGsd[5] = '\0';
-   theAlongScanGsd[5] = '\0';
-   theCrossScanGsd[5] = '\0';
-   theGeoMeanGsd[5] = '\0';
-   theAlongScanVertGsd[5] = '\0';
-   theCrossScanVertGsd[5] = '\0';
-   theGeoMeanVertGsd[5] = '\0';
-   theGeoBetaAngle[5] = '\0';
-   theDynamicRange[5] = '\0';
-   theLine[7] = '\0';
-   theSamples[5] = '\0';
-   theAngleToNorth[7] = '\0';
-   theObliquityAngle[6] = '\0';
-   theAzOfObliquity[7] = '\0';
-   theGrdCover[1] = '\0';
-   theSnowDepthCategory[1] = '\0';
-   theSunAzimuth[7] = '\0';
-   theSunElevation[7] = '\0';
-   thePredictedNiirs[3] = '\0';
-   theCircularError[3] = '\0';
-   theLinearError[3] = '\0';
-   
-}
-
-std::ostream& ossimNitfCsexraTag::print(
-   std::ostream& out, const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += getTagName();
-   pfx += ".";
-   
-   out << setiosflags(std::ios::left)
-       << pfx << std::setw(24) << "CETAG:"
-       << getTagName() << "\n"
-       << pfx << std::setw(24) << "CEL:"
-       << getTagLength() << "\n"
-       << pfx << std::setw(24) << "SENSOR:"
-       << theSensor << "\n"
-       << pfx << std::setw(24) << "TIME_FIRST_LINE_IMAGE:"
-       << theTileFirstLine << "\n"
-       << pfx << std::setw(24) << "TIME_IMAGE_DURATION:"
-       << theImageTimeDuration << "\n"
-       << pfx << std::setw(24) << "MAX_GSD:"
-       << theMaxGsd << "\n"
-       << pfx << std::setw(24) << "ALONG_SCAN_GSD:"
-       << theAlongScanGsd << "\n"
-       << pfx << std::setw(24) << "CROSS_SCAN_GSD:"
-       << theCrossScanGsd << "\n"
-       << pfx << std::setw(24) << "GEO_MEAN_GSD:"
-       << theGeoMeanGsd << "\n"
-       << pfx << std::setw(24) << "A_S_VERT_GSD:"
-       << theAlongScanVertGsd << "\n"
-       << pfx << std::setw(24) << "C_S_VERT_GSD:"
-       << theCrossScanVertGsd << "\n"
-       << pfx << std::setw(24) << "GEO_MEAN_VERT_GSD:"
-       << theGeoMeanVertGsd << "\n"
-       << pfx << std::setw(24) << "GEO_BETA_ANGLE:"
-       << theGeoBetaAngle << "\n"
-       << pfx << std::setw(24) << "DYNAMIC_RANGE:"
-       << theDynamicRange << "\n"
-       << pfx << std::setw(24) << "NUM_LINES:"
-       << theLine << "\n"
-       << pfx << std::setw(24) << "NUM_SAMPLES:"
-       << theSamples << "\n"
-       << pfx << std::setw(24) << "ANGLE_TO_NORTH:"
-       << theAngleToNorth << "\n"
-       << pfx << std::setw(24) << "OBLIQUITY_ANGLE:"
-       << theObliquityAngle << "\n"
-       << pfx << std::setw(24) << "AZ_OF_OBLIQUITY:"
-       << theAzOfObliquity << "\n"
-       << pfx << std::setw(24) << "GRD_COVER:"
-       << theGrdCover << "\n"
-       << pfx << std::setw(24) << "SNOW_DEPTH_CAT:"
-       << theSnowDepthCategory << "\n"
-       << pfx << std::setw(24) << "SUN_AZIMUTH:"
-       << theSunAzimuth << "\n"
-       << pfx << std::setw(24) << "SUN_ELEVATION:"
-       << theSunElevation << "\n"
-       << pfx << std::setw(24) << "PREDICTED_NIIRS:"
-       << thePredictedNiirs << "\n"
-       << pfx << std::setw(24) << "CIRCL_ERR:"
-       << theCircularError << "\n"
-       << pfx << std::setw(24) << "LINEAR_ERR:"
-       << theLinearError<< "\n";
-   
-   return out;
-}
-
-ossimString ossimNitfCsexraTag::getSensor() const
-{
-   return ossimString(theSensor);
-}
-   
-ossimString ossimNitfCsexraTag::getTimeFirstLineImage() const
-{
-   return ossimString(theTileFirstLine);
-}
-   
-ossimString ossimNitfCsexraTag::getTimeImageDuration() const
-{
-   return ossimString(theImageTimeDuration);
-}
-   
-ossimString ossimNitfCsexraTag::getMaxGsd() const
-{
-   return ossimString(theMaxGsd);
-}
-   
-ossimString ossimNitfCsexraTag::getAlongScanGsd() const
-{
-   return ossimString(theAlongScanGsd);
-}
-   
-ossimString ossimNitfCsexraTag::getCrossScanGsd() const
-{
-   return ossimString(theCrossScanGsd);
-}
-   
-ossimString ossimNitfCsexraTag::getGeoMeanGsd() const
-{
-   return ossimString(theGeoMeanGsd);
-}
-   
-ossimString ossimNitfCsexraTag::getAlongScanVerticalGsd() const
-{
-   return ossimString(theAlongScanVertGsd);
-}
-   
-ossimString ossimNitfCsexraTag::getCrossScanVerticalGsd() const
-{
-   return ossimString(theCrossScanVertGsd);
-}
-
-ossimString ossimNitfCsexraTag::getGeoMeanVerticalGsd() const
-{
-   return ossimString(theGeoMeanVertGsd);
-}
-
-ossimString ossimNitfCsexraTag::getGeoBetaAngle() const
-{
-   return ossimString(theGeoBetaAngle);
-}
-
-ossimString ossimNitfCsexraTag::getDynamicRange() const
-{
-   return ossimString(theDynamicRange);
-}
-   
-ossimString ossimNitfCsexraTag::getNumLines() const
-{
-   return ossimString(theLine);
-}
-   
-ossimString ossimNitfCsexraTag::getNumSamples() const
-{
-   return ossimString(theSamples);
-}
-   
-ossimString ossimNitfCsexraTag::getAngleToNorth() const
-{
-   return ossimString(theAngleToNorth);
-}
-
-ossimString ossimNitfCsexraTag::getObliquityAngle() const
-{
-   return ossimString(theObliquityAngle);
-}
-
-ossimString ossimNitfCsexraTag::getAzimuthOfObliquity() const
-{
-   return ossimString(theAzOfObliquity);
-}
-   
-ossimString ossimNitfCsexraTag::getGroundCover() const
-{
-   return ossimString(theGrdCover);
-}
-
-ossimString ossimNitfCsexraTag::getSnowDepth() const
-{
-   return ossimString(theSnowDepthCategory);
-}
-   
-ossimString ossimNitfCsexraTag::getSunAzimuth() const
-{
-   return ossimString(theSunAzimuth);
-}
-
-ossimString ossimNitfCsexraTag::getSunElevation() const
-{
-   return ossimString(theSunElevation);
-}
-
-ossimString ossimNitfCsexraTag::getPredictedNiirs() const
-{
-   return ossimString(thePredictedNiirs);
-}
-   
-ossimString ossimNitfCsexraTag::getCE90() const
-{
-   return ossimString(theCircularError);
-}
-
-ossimString ossimNitfCsexraTag::getLE90() const
-{
-   return ossimString(theLinearError);
-}
diff --git a/src/ossim/support_data/ossimNitfDataExtensionSegment.cpp b/src/ossim/support_data/ossimNitfDataExtensionSegment.cpp
deleted file mode 100644
index bfa73f0..0000000
--- a/src/ossim/support_data/ossimNitfDataExtensionSegment.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfDataExtensionSegment.cpp 9094 2006-06-13 19:12:40Z dburken $
-
-#include <ostream>
-
-#include <ossim/support_data/ossimNitfDataExtensionSegment.h>
-RTTI_DEF1(ossimNitfDataExtensionSegment,
-          "ossimNitfDataExtensionSegment",
-          ossimObject)
-
-std::ostream& operator <<(std::ostream &out,
-                          const ossimNitfDataExtensionSegment &data)
-{
-   data.print(out);
-   
-   return out;
-}
diff --git a/src/ossim/support_data/ossimNitfDataExtensionSegmentV2_0.cpp b/src/ossim/support_data/ossimNitfDataExtensionSegmentV2_0.cpp
deleted file mode 100644
index 44ce56f..0000000
--- a/src/ossim/support_data/ossimNitfDataExtensionSegmentV2_0.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfDataExtensionSegmentV2_0.cpp 13218 2008-07-23 19:22:37Z dburken $
-
-#include <iostream>
-#include <ossim/support_data/ossimNitfDataExtensionSegmentV2_0.h>
-
-
-RTTI_DEF1(ossimNitfDataExtensionSegmentV2_0, "ossimNitfDataExtensionSegmentV2_0",ossimNitfDataExtensionSegment)
-
-std::ostream& operator <<(std::ostream& out,
-                          const ossimNitfDataExtIdentSecurityChunkV2_0& data)
-{
-   out << "theFilePartType:                " << data.theFilePartType
-       << "\ntheUniqueDataExtTypeId:         " << data.theUniqueDataExtTypeId
-       << "\ntheVersionDataFieldDef:         " << data.theVersionDataFieldDef
-       << "\ntheDataExtSecurityClass:        " << data.theDataExtSecurityClass
-       << "\ntheDataExtCodewords:            " << data.theDataExtCodewords
-       << "\ntheDataExtControlAndHand:       " << data.theDataExtControlAndHand
-       << "\ntheDataExtReleasingInst:        " << data.theDataExtReleasingInst
-       << "\ntheDataExtClassAuthority:       " << data.theDataExtClassAuthority
-       << "\ntheDataExtSecurityConNum:       " << data.theDataExtSecurityConNum
-       << "\ntheDataExtSecuityDowngrade:     " << data.theDataExtSecuityDowngrade
-       << "\ntheDataExtDowngradingEvent:     " << data.theDataExtDowngradingEvent
-       << std::endl;
-   
-   return out;
-}
-   
-ossimNitfDataExtensionSegmentV2_0::ossimNitfDataExtensionSegmentV2_0()
-{
-   clearFields();
-}
-
-ossimNitfDataExtensionSegmentV2_0::~ossimNitfDataExtensionSegmentV2_0()
-{
-}
-
-void ossimNitfDataExtensionSegmentV2_0::parseStream(std::istream &in)
-{
-   if(in)
-   {
-      clearFields();
-
-      in.read(theIdentSecurityChunk.theFilePartType, 2); // 2 byte alpha
-      in.read(theIdentSecurityChunk.theUniqueDataExtTypeId, 25); // 25 byte alpha numeric
-      in.read(theIdentSecurityChunk.theVersionDataFieldDef, 2); // 2 byte numeric
-      in.read(theIdentSecurityChunk.theDataExtSecurityClass, 1); // 1 byte alpha
-      in.read(theIdentSecurityChunk.theDataExtCodewords, 40);    // 40 byte alpha numeric
-      in.read(theIdentSecurityChunk.theDataExtControlAndHand, 40); // 40 byte alpha numeric
-      in.read(theIdentSecurityChunk.theDataExtReleasingInst, 40); // 40 byte alpha numeric
-      in.read(theIdentSecurityChunk.theDataExtClassAuthority, 20); // 20 byte alph num
-      in.read(theIdentSecurityChunk.theDataExtSecurityConNum, 20); // 20 byte alpha num
-      in.read(theIdentSecurityChunk.theDataExtSecuityDowngrade, 6); // 6 byte alpha num      
-      if(ossimString(theIdentSecurityChunk.theDataExtSecuityDowngrade) == "999998")
-      {
-         in.read(theIdentSecurityChunk.theDataExtDowngradingEvent, 40); // 40 byte alpha num
-      }
-      in.read(theOverflowedHeaderType, 6);
-      in.read(theDataItemOverflowed, 3);
-      in.read(theLengthOfUserDefinedSubheaderFields, 4);
-      // look to see if there is any data and if so read the tag
-      // to see what it is
-      long length = ossimString(theLengthOfUserDefinedSubheaderFields).toLong();
-      
-      if(length > 0)
-      {
-         in.ignore(length);
-      }
-      // currently I think we are looking for registered extensions keyword in
-      // the theUniqueDataExtTypeId field
-      if(ossimString(theIdentSecurityChunk.theUniqueDataExtTypeId).trim().upcase() == "REGISTERED EXTENSIONS")
-      {
-         theTag.clearFields();
-         theTag.parseStream(in);
-      }
-   }
-}
-
-void ossimNitfDataExtensionSegmentV2_0::clearFields()
-{
-   memset(theIdentSecurityChunk.theFilePartType, ' ', 2); // 2 byte alpha
-   memset(theIdentSecurityChunk.theUniqueDataExtTypeId, ' ', 25); // 25 byte alpha numeric
-   memset(theIdentSecurityChunk.theVersionDataFieldDef, ' ', 2); // 2 byte numeric
-   memset(theIdentSecurityChunk.theDataExtSecurityClass, ' ', 1); // 1 byte alpha
-   memset(theIdentSecurityChunk.theDataExtCodewords, ' ', 40);    // 40 byte alpha numeric
-   memset(theIdentSecurityChunk.theDataExtControlAndHand, ' ', 40); // 40 byte alpha numeric
-   memset(theIdentSecurityChunk.theDataExtReleasingInst, ' ', 40); // 40 byte alpha numeric
-   memset(theIdentSecurityChunk.theDataExtClassAuthority, ' ', 20); // 20 byte alph num
-   memset(theIdentSecurityChunk.theDataExtSecurityConNum, ' ', 20); // 20 byte alpha num
-   memset(theIdentSecurityChunk.theDataExtSecuityDowngrade, ' ', 6); // 6 byte alpha num
-   memset(theIdentSecurityChunk.theDataExtDowngradingEvent, ' ', 40); // 40 byte alpha num
-   memset(theOverflowedHeaderType, ' ', 6);
-   memset(theDataItemOverflowed, ' ', 3);
-   memset(theLengthOfUserDefinedSubheaderFields, ' ', 4);
-   
-   theIdentSecurityChunk.theFilePartType[2] = '\0'; // 2 byte alpha
-   theIdentSecurityChunk.theUniqueDataExtTypeId[25] = '\0'; // 25 byte alpha numeric
-   theIdentSecurityChunk.theVersionDataFieldDef[2] = '\0'; // 2 byte numeric
-   theIdentSecurityChunk.theDataExtSecurityClass[1] = '\0'; // 1 byte alpha
-   theIdentSecurityChunk.theDataExtCodewords[40] = '\0';    // 40 byte alpha numeric
-   theIdentSecurityChunk.theDataExtControlAndHand[40] = '\0'; // 40 byte alpha numeric
-   theIdentSecurityChunk.theDataExtReleasingInst[40] = '\0'; // 40 byte alpha numeric
-   theIdentSecurityChunk.theDataExtClassAuthority[20] = '\0'; // 20 byte alph num
-   theIdentSecurityChunk.theDataExtSecurityConNum[20] = '\0'; // 20 byte alpha num
-   theIdentSecurityChunk.theDataExtSecuityDowngrade[6] = '\0'; // 6 byte alpha num
-   theIdentSecurityChunk.theDataExtDowngradingEvent[40] = '\0'; // 40 byte alpha num
-   theOverflowedHeaderType[6] = '\0';
-   theDataItemOverflowed[3]   = '\0';
-   theLengthOfUserDefinedSubheaderFields[4] = '\0';
-   
-}
-
-  
-std::ostream& ossimNitfDataExtensionSegmentV2_0::print(std::ostream& out)const
-{
-   out << "theIdentSecurityChunk:                   "
-       << theIdentSecurityChunk
-       << "\ntheOverflowedHeaderType:               "
-       << theOverflowedHeaderType
-       << "\ntheDataItemOverflowed:                 "
-       << theDataItemOverflowed
-       << "\ntheLengthOfUserDefinedSubheaderFields: "
-       << theLengthOfUserDefinedSubheaderFields << std::endl
-       << theTag;
-   return out;
-}
diff --git a/src/ossim/support_data/ossimNitfEmbeddedRpfDes.cpp b/src/ossim/support_data/ossimNitfEmbeddedRpfDes.cpp
deleted file mode 100644
index ab4e959..0000000
--- a/src/ossim/support_data/ossimNitfEmbeddedRpfDes.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfEmbeddedRpfDes.cpp 22013 2012-12-19 17:37:20Z dburken $
-
-#include <istream>
-#include <ostream>
-#include <ossim/support_data/ossimNitfEmbeddedRpfDes.h>
-
-
-RTTI_DEF1(ossimNitfEmbeddedRpfDes, "ossimNitfEmbeddedRpfDes", ossimNitfRegisteredTag)
-
-
-ossimNitfEmbeddedRpfDes::ossimNitfEmbeddedRpfDes()
-   : ossimNitfRegisteredTag(std::string("RPFDES"), 0)
-{
-}
-
-ossimNitfEmbeddedRpfDes::~ossimNitfEmbeddedRpfDes()
-{
-}
-
-void ossimNitfEmbeddedRpfDes::parseStream(std::istream& /* in */ )
-{
-}
-
-std::ostream& ossimNitfEmbeddedRpfDes::print(std::ostream& out, const std::string& /* prefix */)const
-{
-   return out;
-}
diff --git a/src/ossim/support_data/ossimNitfEngrdaTag.cpp b/src/ossim/support_data/ossimNitfEngrdaTag.cpp
deleted file mode 100644
index c09c321..0000000
--- a/src/ossim/support_data/ossimNitfEngrdaTag.cpp
+++ /dev/null
@@ -1,253 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: ENGRDA - Engineering Data tag class declaration.
-//
-// See document STDI-0002 (version 3), Appendix N for more info.
-// 
-//----------------------------------------------------------------------------
-// $Id
-
-#include <cstring>
-#include <istream>
-#include <iostream>
-#include <iomanip>
-#include <sstream>
-
-#include <ossim/support_data/ossimNitfEngrdaTag.h>
-#include <ossim/base/ossimNotify.h>
-
-
-RTTI_DEF1(ossimNitfEngrdaTag, "ossimNitfEngrdaTag", ossimNitfRegisteredTag);
-
-ossimNitfEngrdaTag::ossimNitfEngrdaTag()
-   : ossimNitfRegisteredTag(std::string("ENGRDA"), 0)
-{
-   clearFields();
-}
-
-ossimNitfEngrdaTag::~ossimNitfEngrdaTag()
-{
-}
-
-void ossimNitfEngrdaTag::parseStream(std::istream& in)
-{
-   clearFields();
-
-   // m_tagLength = RETAG_SIZE + REL_SIZE;
-   
-   in.read(theReSrc, RESRC_SIZE);
-   m_tagLength += RESRC_SIZE;
-   
-   in.read(theReCnt, RECNT_SIZE);
-   m_tagLength += RECNT_SIZE;
-
-   const ossim_uint16 ELEMENT_COUNT = ossimString(theReCnt).toUInt16();
-   
-   for (ossim_uint16 i = 0; i < ELEMENT_COUNT; ++i)
-   {
-      ossimString os;
-      char buf[TMP_BUF_SIZE];
-      ossimEngDataElement element;
-
-      // ENGLN - label length field
-      in.read(buf, ENGLN_SIZE);
-      m_tagLength += ENGLN_SIZE;
-      buf[ENGLN_SIZE] = '\n';
-      os = buf;
-
-      // ENGLBL - label field
-      ossim_uint32 size = os.toUInt16();
-      in.read(buf, size);
-      m_tagLength += size;
-      buf[size] = '\0';
-      element.theEngLbl = buf;
-
-      // ENGMTXC - data column count
-      in.read(buf, ENGMTXC_SIZE);
-      m_tagLength += ENGMTXC_SIZE;
-      buf[ENGMTXC_SIZE] = '\0';
-      os = buf;
-      element.theEngMtxC = os.toUInt16();
-
-      // ENGMTXR - data row count
-      in.read(buf, ENGMTXR_SIZE);
-      m_tagLength += ENGMTXR_SIZE;
-      buf[ENGMTXR_SIZE] = '\0';
-      os = buf;
-      element.theEngMtxR = os.toUInt16();
-
-      // ENGTYP - Value Type of Engineering Data Element.
-      in.get( element.theEngTyp );
-      m_tagLength += ENGTYP_SIZE;
-
-      // ENGDTS - Engineering Data Element Size
-      element.theEngDts = static_cast<ossim_uint8>(in.get());
-      m_tagLength += ENGDTS_SIZE;
-
-      // ENGDATU - Engineering Data Units.
-      in.read(buf, ENGDATU_SIZE);
-      m_tagLength += ENGDATU_SIZE;
-      buf[ENGDATU_SIZE] = '\0';
-      element.theEngDatU = buf;
-
-      // ENGDATC - Engineering Data Count
-      in.read(buf, ENGDATC_SIZE);
-      m_tagLength += ENGDATC_SIZE;
-      buf[ENGDATC_SIZE] = '\n';
-      os = buf;
-      ossim_uint32 engDatC = os.toUInt32();
-
-      // ENGDATA - Engineering Data
-      element.theEngDat.resize(engDatC);
-      in.read((char*)&(element.theEngDat.front()), (std::streamsize)element.theEngDat.size());
-      m_tagLength += engDatC;
-      
-      theData.push_back(element);
-
-   } // Matches: for (ossim_uint16 i = 0; i < ELEMENT_COUNT; ++i)
-}
-
-void ossimNitfEngrdaTag::writeStream(std::ostream& out)
-{
-   //out.write(theAcMsnId, AC_MSN_ID_SIZE);
-   // out.write(theAcTailNo, AC_TAIL_NO_SIZE);
-
-   out.write(theReSrc, RESRC_SIZE);
-   out.write(theReCnt, RECNT_SIZE);
-
-   const ossim_uint16 ELEMENT_COUNT = ossimString(theReCnt).toUInt16();
-   
-   for (ossim_uint16 i = 0; i < ELEMENT_COUNT; ++i)
-   {
-      // ENGLN - label length field      
-      std::string s;
-      getValueAsString(theData[i].theEngLbl.size(), ENGLN_SIZE, s);
-      out.write(s.data(), ENGLN_SIZE);
-
-      // ENGLBL - label field
-      out.write(theData[i].theEngLbl.data(), (std::streamsize)theData[i].theEngLbl.size());
-
-      // ENGMTXC - data column count
-      getValueAsString(theData[i].theEngMtxC, ENGMTXC_SIZE, s); 
-      out.write(s.data(), ENGMTXC_SIZE);
-
-      // ENGMTXR - data row count
-      getValueAsString(theData[i].theEngMtxR, ENGMTXR_SIZE, s);
-      out.write(s.data(), ENGMTXR_SIZE);
-
-      // ENGTYP - Value Type of Engineering Data Element.
-      out.write(&theData[i].theEngTyp, ENGTYP_SIZE);
-
-      // ENGDTS - Engineering Data Element Size
-      out.write((char*)(&theData[i].theEngDts), ENGDTS_SIZE);
-
-      // ENGDATU - Engineering Data Units.
-      out.write(theData[i].theEngDatU.data(), ENGDATU_SIZE);
-
-      // ENGDATC - Engineering Data Count
-      getValueAsString(theData[i].theEngDat.size(), ENGDATC_SIZE, s); 
-      out.write(s.data(), ENGDATC_SIZE);
-
-      // ENGDATA - Engineering Data NOTE: should be big endian...
-      out.write((char*)&(theData[i].theEngDat.front()),
-                (std::streamsize)theData[i].theEngDat.size());
-
-   } // Matches: for (ossim_uint16 i = 0; i < ELEMENT_COUNT; ++i)
-   
-}
-
-void ossimNitfEngrdaTag::clearFields()
-{
-   // BCS-N's to '0's, BCS-A's to ' '(spaces)
-
-   // clear
-   memset(theReSrc, ' ', RESRC_SIZE);
-   memset(theReCnt, ' ', RECNT_SIZE);
-   theData.clear();
-
-   // null terminate
-   theReSrc[RESRC_SIZE] = '\0';
-   theReCnt[RECNT_SIZE] = '\0';
-
-   m_tagLength = 0;
-}
-
-std::ostream& ossimNitfEngrdaTag::print(
-   std::ostream& out, const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += getTagName();
-   pfx += ".";
-   
-   out << setiosflags(std::ios::left)
-       << pfx << std::setw(24) << "CETAG:"
-       << getTagName() << "\n"
-       << pfx << std::setw(24) << "CEL:"   << getSizeInBytes() << "\n"
-       << pfx << std::setw(24) << "RESRC:" << theReSrc << "\n"
-       << pfx << std::setw(24) << "RECNT:" << theReCnt << "\n";
-
-   for (ossim_uint32 i = 0; i < theData.size(); ++i)
-   {
-      out << pfx << "ENGLBL[" << i << std::setw(24) << "]:"
-          << theData[i].theEngLbl << "\n"
-          << pfx << "ENGMTXC[" << i << std::setw(24) << "]:"
-          << theData[i].theEngMtxC << "\n"
-          << pfx << "ENGMTXR[" << i << std::setw(24) << "]:"
-          << theData[i].theEngMtxR << "\n"
-          << pfx << "ENGTYP[" << i << std::setw(24) << "]:"
-          << theData[i].theEngTyp << "\n"
-          << pfx << "ENGDTS[" << i << std::setw(24) << "]:"
-          << theData[i].theEngDts << "\n"
-          << pfx << "ENGDATU[" << i << std::setw(24) << "]:"
-          << theData[i].theEngDatU << "\n"
-          << pfx << "ENGDATC[" << i << std::setw(24) << "]:"
-          << theData[i].theEngDat.size() << "\n";
-      
-      printData(out, theData[i], i, pfx);
-
-      
-   }
-   
-   return out;
-}
-
-std::ostream& ossimNitfEngrdaTag::printData(std::ostream& out,
-                                            const ossimEngDataElement& element,
-                                            ossim_uint32 /* elIndex */,
-                                            const std::string& /* prefix */) const
-{
-   if (element.theEngTyp == 'A')
-   {
-      std::vector<ossim_uint8>::const_iterator i = element.theEngDat.begin();
-      while (i != element.theEngDat.end())
-      {
-         out << static_cast<ossim_int8>(*i);
-         ++i;
-      }
-      out << "\n";
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimNitfEngrdaTag::printData WARNING unhandled data type."
-         << "Data type = " << (char)element.theEngTyp << "\n"
-         << std::endl;
-   } 
-   return out;
-}
-
-template <class T>
-void ossimNitfEngrdaTag::getValueAsString(
-   T v, ossim_uint16 w, std::string& s) const
-{
-   std::ostringstream os;
-   os << std::setw(w) << std::setfill('0') << setiosflags(ios::right) << v;
-   s = os.str();
-}
-   
diff --git a/src/ossim/support_data/ossimNitfFile.cpp b/src/ossim/support_data/ossimNitfFile.cpp
deleted file mode 100644
index 01bc679..0000000
--- a/src/ossim/support_data/ossimNitfFile.cpp
+++ /dev/null
@@ -1,407 +0,0 @@
-//*******************************************************************
-//
-//  License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfFile.cpp 22238 2013-04-18 12:57:27Z dburken $
-
-#include <ossim/support_data/ossimNitfFile.h>
-#include <ossim/support_data/ossimNitfFileHeader.h>
-#include <ossim/support_data/ossimNitfImageHeader.h>
-#include <ossim/support_data/ossimNitfFileHeaderV2_0.h>
-#include <ossim/support_data/ossimNitfFileHeaderV2_1.h>
-#include <ossim/support_data/ossimNitfImageHeaderV2_0.h>
-#include <ossim/support_data/ossimNitfImageHeaderV2_1.h>
-#include <ossim/support_data/ossimNitfTagFactoryRegistry.h>
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-#include <ossim/support_data/ossimRpfToc.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimNotify.h>
-#include <fstream>
-#include <iostream>
-#include <iomanip>
-
-
-// Static trace for debugging
-static ossimTrace traceDebug("ossimNitfFile:debug");
-
-std::ostream& operator <<(std::ostream& out, const ossimNitfFile& data)
-{
-   return data.print(out);
-}
-
-std::ostream& ossimNitfFile::print(std::ostream& out,
-                                   const std::string& prefix,
-                                   bool printOverviews) const
-{
-   if(theNitfFileHeader.valid())
-   {
-      std::string pfx = prefix;
-      pfx += "nitf.";
-      theNitfFileHeader->print(out, pfx);
-      
-      ossim_int32 n = theNitfFileHeader->getNumberOfImages();
-      for(ossim_int32 idx = 0; idx < n; ++idx)
-      {
-         ossimNitfImageHeader* ih = getNewImageHeader(idx);
-         if(ih)
-         {
-            bool printIt = true;
-            
-            if ( !printOverviews )
-            {
-               // Check the IMAG field.
-               ossim_float64 imag;
-               ih->getDecimationFactor(imag);
-               if ( !ossim::isnan(imag) )
-               {
-                  if ( imag < 1.0)
-                  {
-                     printIt = false;
-                  }
-               }
-
-               //---
-               // Now see if it's a cloud mask image.  Do not print
-               // cloud mask images if the printOverviews is false.
-               //---
-               if ( printIt )
-               {
-                  if ( (ih->getCategory().trim(ossimString(" ")) ==
-                        "CLOUD") &&
-                       (ih->getRepresentation().trim(ossimString(" ")) ==
-                        "NODISPLY") )
-                  {
-                     printIt = false;
-                  }
-               }
-            }
-
-            if (printIt)
-            {
-               // Add our prefix onto prefix.
-               std::string s = pfx;
-               s += "image";
-               s += ossimString::toString(idx).string();
-               s += ".";
-               
-               ih->print(out, s);
-            }
-            
-            delete ih;
-            ih = 0;
-         }
-      }
-
-      //---
-      // Check for RPF stuff:
-      //---
-      ossimNitfTagInformation info; 
-      theNitfFileHeader->getTag(info, "RPFHDR");
-      if(info.getTagName() == "RPFHDR")
-      {
-         // Open of the a.toc.
-         ossimRefPtr<ossimRpfToc> toc = new ossimRpfToc;
-         if ( toc->parseFile(getFilename()) ==
-              ossimErrorCodes::OSSIM_OK )
-         {
-            pfx += "rpf.";
-            toc->print(out, pfx, printOverviews);
-         }
-      }
-      
-   } // matches:  if(theNitfFileHeader.valid())
-
-   return out;
-   
-}
-
-bool ossimNitfFile::saveState(ossimKeywordlist& kwl, const ossimString& prefix)const
-{
-   bool result = theNitfFileHeader.valid(); 
-   
-   if(theNitfFileHeader.valid())
-   {
-      theNitfFileHeader->saveState(kwl, prefix);
-   }
-   ossim_int32 n = theNitfFileHeader->getNumberOfImages();
-   for(ossim_int32 idx = 0; idx < n; ++idx)
-   {
-      ossimRefPtr<ossimNitfImageHeader> ih = getNewImageHeader(idx);
-      ossimString newPrefix = prefix + "image" + ossimString::toString(idx) + ".";
-#if 1     
-      ih->saveState(kwl, newPrefix);
-#else
-      if ( (ih->getCategory().trim(ossimString(" ")) !=
-            "CLOUD") ||
-          (ih->getRepresentation().trim(ossimString(" ")) !=
-           "NODISPLY") )
-      {
-         ih->saveState(kwl, newPrefix);
-      }
-#endif
-   }
-   return result;
-}
-
-ossimNitfFile::ossimNitfFile()
-   : theFilename(""),
-     theNitfFileHeader(0)
-{
-}
-
-ossimNitfFile::~ossimNitfFile()
-{
-   theNitfFileHeader = 0;
-}
-
-bool ossimNitfFile::parseFile(const ossimFilename& file)
-{
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimNitfFile::parseFile: "
-         << "endtered......"
-         << std::endl;
-   }
-   std::ifstream in(file.c_str(), std::ios::in|std::ios::binary);
-   if (in.fail())
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG ossimNitfFile::parseFile: "
-            << "Could not open file:  " << file.c_str()
-            << "\nReturning..." << std::endl;
-      }
-      return false;
-   }
-      
-   if(theNitfFileHeader.valid())
-   {
-      theNitfFileHeader = 0;
-   }
-
-   char temp[10];
-   in.read(temp, 9);
-   in.seekg(0, std::ios::beg);
-   temp[9] ='\0';
-   
-   theFilename = file;
-
-   ossimString s(temp);
-   if(s == "NITF02.00")
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG: NITF Version 2.0"
-            << std::endl;
-      }
-      theNitfFileHeader = new ossimNitfFileHeaderV2_0;
-   }
-   else if ( (s == "NITF02.10") || (s == "NSIF01.00") )
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG: NITF Version 2.1"
-            << std::endl;
-      }
-      theNitfFileHeader = new ossimNitfFileHeaderV2_1;
-   }
-   else
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG ossimNitfFile::parseFile: "
-            << "Not an NITF file!"
-            << std::endl;
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG ossimNitfFile::parseFile: returning...........false"
-            << "endtered......"
-            << std::endl;
-      }
-      return false;
-   }
-
-   if(theNitfFileHeader.valid())
-   {
-      try
-      {
-         theNitfFileHeader->parseStream(in);
-
-         // Sanity check the size before going on:
-
-#if 0                                                                   \
-   /*
-    * Temp removed for release as workaround for VS10 >2gb offset issue.
-    * drb 20130418
-    */
-         if ( file.fileSize() < theNitfFileHeader->getFileSize() )
-         {
-            if (traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << "ossimNitfFile::parseFile ERROR:\n"
-                  << "File size is less than file length in header!"
-                  << "\nNITF FL field: " << theNitfFileHeader->getFileSize()
-                  << "\nActual file length: " << file.fileSize()
-                  << std::endl;
-            }
-            return false;
-         }
-#endif
-         
-      }
-      catch( const ossimException& e )
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimNitfFile::parseFile caught exception:\n"
-               << e.what()
-               << std::endl;
-         }
-         return false;
-      }
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimNitfFile::parseFile: returning...........true"
-         << std::endl;
-   }
-   return true;
-}
-
-const ossimNitfFileHeader* ossimNitfFile::getHeader() const
-{
-   return theNitfFileHeader.get();
-}
-
-ossimNitfFileHeader* ossimNitfFile::getHeader() 
-{
-   return theNitfFileHeader.get();
-}
-
-ossimIrect ossimNitfFile::getImageRect()const
-{
-   if(theNitfFileHeader.valid())
-   {
-      return theNitfFileHeader->getImageRect();
-   }
-
-   return ossimIrect(ossimIpt(0,0), ossimIpt(0,0));
-}
-
-ossimNitfImageHeader* ossimNitfFile::getNewImageHeader(
-   ossim_uint32 imageNumber)const
-{
-   ossimNitfImageHeader* result = 0;
-   if(theNitfFileHeader.valid())
-   {
-      try // getNewImageHeader can throw exception on parse.
-      {
-         std::ifstream in(theFilename.c_str(), std::ios::in|std::ios::binary);
-         result = theNitfFileHeader->getNewImageHeader(imageNumber, in);
-         in.close();
-      }
-      catch( const ossimException& e )
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimNitfFile::getNewImageHeader caught exception:\n"
-               << e.what()
-               << std::endl;
-         }
-         result = 0;
-      }
-   }
-   return result;
-}
-
-ossimNitfSymbolHeader* ossimNitfFile::getNewSymbolHeader(
-   ossim_uint32 symbolNumber)const
-{
-   ossimNitfSymbolHeader* result = 0;
-   if(theNitfFileHeader.valid())
-   {
-      std::ifstream in(theFilename.c_str(), std::ios::in|std::ios::binary);
-
-      result = theNitfFileHeader->getNewSymbolHeader(symbolNumber, in);
-      in.close();
-   }
-   
-   return result;
-}
-
-ossimNitfLabelHeader* ossimNitfFile::getNewLabelHeader(
-   ossim_uint32 labelNumber)const
-{
-   ossimNitfLabelHeader* result = 0;
-   if(theNitfFileHeader.valid())
-   {
-      std::ifstream in(theFilename.c_str(), std::ios::in|std::ios::binary);
-
-      result = theNitfFileHeader->getNewLabelHeader(labelNumber, in);
-      in.close();
-   }
-   
-   return result;
-}
-
-ossimNitfTextHeader* ossimNitfFile::getNewTextHeader(
-   ossim_uint32 textNumber)const
-{
-   ossimNitfTextHeader* result = 0;
-   if(theNitfFileHeader.valid())
-   {
-      std::ifstream in(theFilename.c_str(), std::ios::in|std::ios::binary);
-
-      result = theNitfFileHeader->getNewTextHeader(textNumber, in);
-      in.close();
-   }
-   
-   return result;
-}
-
-ossimNitfDataExtensionSegment* ossimNitfFile::getNewDataExtensionSegment(
-   ossim_uint32 dataExtNumber)const
-{
-   ossimNitfDataExtensionSegment* result = 0;
-   if(theNitfFileHeader.valid())
-   {
-      std::ifstream in(theFilename.c_str(), std::ios::in|std::ios::binary);
-
-      result = theNitfFileHeader->getNewDataExtensionSegment(dataExtNumber, in);
-      in.close();
-   }
-   
-   return result;
-}
-
-ossimString ossimNitfFile::getVersion()const
-{
-   if(theNitfFileHeader.valid())
-   {
-      return ossimString(theNitfFileHeader->getVersion());
-   }
-   
-   return ossimString("");
-}
-
-ossimFilename ossimNitfFile::getFilename() const
-{
-   return theFilename;
-}
diff --git a/src/ossim/support_data/ossimNitfFileHeader.cpp b/src/ossim/support_data/ossimNitfFileHeader.cpp
deleted file mode 100644
index c6a0a56..0000000
--- a/src/ossim/support_data/ossimNitfFileHeader.cpp
+++ /dev/null
@@ -1,226 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfFileHeader.cpp 19043 2011-03-10 15:24:24Z dburken $
-#include <ossim/support_data/ossimNitfFileHeader.h>
-#include <ossim/base/ossimContainerProperty.h>
-#include <iostream>
-#include <sstream>
-
-static const char* TAGS_KW = "tags";
-
-RTTI_DEF2(ossimNitfFileHeader, "ossimNitfFileHeader", ossimObject, ossimPropertyInterface);
-
-std::ostream& ossimNitfImageOffsetInformation::print(std::ostream& out) const
-{
-   return out << "theImageHeaderOffset:          "
-              << theImageHeaderOffset << std::endl
-              << "theImageDataOffset:            "
-              << theImageDataOffset;
-}
-
-ossimNitfFileHeader::ossimNitfFileHeader()
-{
-}
-
-ossimNitfFileHeader::~ossimNitfFileHeader()
-{
-}
-
-
-bool ossimNitfFileHeader::getTag(ossimNitfTagInformation& tagInfo,
-                                 const ossimString& tagName)const
-{
-   if(theTagList.size())
-   {
-      for(ossim_uint32 i = 0; i < theTagList.size(); ++i)
-      {
-         if(theTagList[i].getTagName() == tagName)
-         {
-            tagInfo = theTagList[i];
-            return true;
-         }
-      }
-   }
-
-   return false;
-}
-
-bool  ossimNitfFileHeader::hasImages()const
-{
-   return (getNumberOfImages() > 0);
-}
-
-bool  ossimNitfFileHeader::hasSymbols()const
-{
-   return (getNumberOfSymbols() > 0);
-}
-
-bool  ossimNitfFileHeader::hasGraphics()const
-{
-   return (getNumberOfGraphics() > 0);
-}
-
-bool  ossimNitfFileHeader::hasText()const
-{
-   return (getNumberOfTextSegments() > 0);
-}
-
-bool  ossimNitfFileHeader::hasLabels()const
-{
-   return (getNumberOfLabels() > 0);
-}
-bool ossimNitfFileHeader::hasDataExtSegments()const
-{
-   return (getNumberOfDataExtSegments() > 0);
-}
-
-void ossimNitfFileHeader::removeTag(const ossimString& tagName)
-{
-   ossim_uint32 idx = 0;
-   for(idx = 0; idx < theTagList.size(); ++idx)
-   {
-      if(theTagList[idx].getTagName() == tagName)
-      {
-         theTagList.erase(theTagList.begin() + idx);
-         return;
-      }
-   }
-}
-void ossimNitfFileHeader::addTag(const ossimNitfTagInformation& tag)
-{
-   removeTag(tag.getTagName());
-   theTagList.push_back(tag);
-}
-
-bool ossimNitfFileHeader::getTagInformation(ossimNitfTagInformation& tag,
-                                            int idx) const
-{
-   bool result = false;
-   
-   if(static_cast<ossim_uint32>(idx) < theTagList.size())
-   {
-      tag = theTagList[idx];
-      result = true;
-   }
-   
-   return result;
-}
-
-int ossimNitfFileHeader::getNumberOfTags()const
-{
-   return (int)theTagList.size();
-}
-
-ossim_uint32 ossimNitfFileHeader::getTotalTagLength()const
-{
-   ossim_uint32 tagLength = 0;
-   
-   for(ossim_uint32 i = 0; i < theTagList.size(); ++i)
-   {
-      tagLength += theTagList[i].getTotalTagLength();
-   }
-   
-   return tagLength;
-}
-
-
-void ossimNitfFileHeader::setProperty(ossimRefPtr<ossimProperty> /* property */)
-{
-}
-
-ossimRefPtr<ossimProperty> ossimNitfFileHeader::getProperty(const ossimString& name)const
-{
-   ossimRefPtr<ossimProperty> result = 0;
-
-   if(name == TAGS_KW)
-   {
-      ossim_uint32 idxMax = (ossim_uint32)theTagList.size();
-      if(idxMax > 0)
-      {
-         ossimContainerProperty* containerProperty = new ossimContainerProperty;
-         containerProperty->setName(name);
-         ossim_uint32 idx = 0;
-
-         result = containerProperty;
-         for(idx = 0; idx < idxMax; ++idx)
-         {
-            ossimNitfTagInformation tagInfo;
-            getTagInformation(tagInfo, idx);
-            
-            const ossimRefPtr<ossimNitfRegisteredTag> tagData = tagInfo.getTagData();
-            if(tagData.valid())
-            {
-               ossimContainerProperty* containerPropertyTag = new ossimContainerProperty;
-               containerPropertyTag->setName(tagInfo.getTagName());
-               std::vector<ossimRefPtr<ossimProperty> > propertyList;
-               tagData->getPropertyList(propertyList);
-               
-               containerPropertyTag->addChildren(propertyList);
-               containerProperty->addChild(containerPropertyTag);
-            }
-            else
-            {
-               containerProperty->addStringProperty(tagInfo.getTagName(), "", true);
-            }
-         }
-      }
-   }
-   
-   return result;
-}
-
-void ossimNitfFileHeader::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   propertyNames.push_back(TAGS_KW);
-}
-
-bool ossimNitfFileHeader::saveState(ossimKeywordlist& kwl, const ossimString& prefix)const
-{
-   ossimObject::saveState(kwl, prefix);
-   
-   bool result = true;
-   ossimString tagsPrefix = prefix;
-   for(ossim_uint32 i = 0; i < theTagList.size(); ++i)
-   {
-      ossimRefPtr<ossimNitfRegisteredTag> tag = theTagList[i].getTagData();
-      if (tag.valid())
-      {
-         // we eventually need to do our own prefix for this object and not let the calling object do any prefix definitions
-//         ossimString newPrefix = tagsPrefix + tag->getRegisterTagName() + ".";
-
-         tag->saveState(kwl, tagsPrefix);
-      }
-   }
-   
-   return result;
-}
-
-std::ostream& ossimNitfFileHeader::print(std::ostream& out,
-                                         const std::string& prefix ) const
-{
-   return printTags(out, prefix);
-}
-
-std::ostream& ossimNitfFileHeader::printTags(std::ostream& out,
-                                             const std::string& prefix) const
-{
-   for(ossim_uint32 i = 0; i < theTagList.size(); ++i)
-   {
-      ossimRefPtr<ossimNitfRegisteredTag> tag = theTagList[i].getTagData();
-      if (tag.valid())
-      {
-         tag->print(out, prefix);
-      }
-   }
-
-   return out;
-}
diff --git a/src/ossim/support_data/ossimNitfFileHeaderV2_0.cpp b/src/ossim/support_data/ossimNitfFileHeaderV2_0.cpp
deleted file mode 100644
index 2a75b29..0000000
--- a/src/ossim/support_data/ossimNitfFileHeaderV2_0.cpp
+++ /dev/null
@@ -1,1638 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfFileHeaderV2_0.cpp 19058 2011-03-11 20:03:24Z dburken $
-
-
-#include <sstream>
-#include <cstring> // for memset
-#include <iostream>
-#include <iomanip>
-#include <stdexcept>
-#include <ossim/support_data/ossimNitfCommon.h>
-#include <ossim/support_data/ossimNitfFileHeaderV2_0.h>
-#include <ossim/support_data/ossimNitfImageHeaderV2_0.h>
-#include <ossim/support_data/ossimNitfSymbolHeaderV2_0.h>
-#include <ossim/support_data/ossimNitfLabelHeaderV2_0.h>
-#include <ossim/support_data/ossimNitfTextHeaderV2_0.h>
-#include <ossim/support_data/ossimNitfDataExtensionSegmentV2_0.h>
-
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimStringProperty.h>
-
-
-const ossimString ossimNitfFileHeaderV2_0::FSDWNG_KW = "fsdwng";
-const ossimString ossimNitfFileHeaderV2_0::FSDEVT_KW = "fsdevt";
-
-static const ossimTrace traceDebug("ossimNitfFileHeaderV2_0:debug");
-
-RTTI_DEF1(ossimNitfFileHeaderV2_0, "ossimNitfFileHeaderV2_0", ossimNitfFileHeaderV2_X)
-
-std::ostream& operator <<(std::ostream& out,
-                          const ossimNitfImageInfoRecordV2_0 &data)
-{
-   return out << "theImageSubheaderLength:       "
-              << data.theImageSubheaderLength << std::endl
-              << "theImageLength:                "
-              << data.theImageLength;
-}
-
-ossim_uint32 ossimNitfImageInfoRecordV2_0::getHeaderLength()const
-{
-   return ossimString(theImageSubheaderLength).toInt32();
-}
-
-ossim_uint64  ossimNitfImageInfoRecordV2_0::getImageLength()const
-{
-   return ossimString(theImageLength).toInt32();
-}
-
-ossim_uint64 ossimNitfImageInfoRecordV2_0::getTotalLength()const
-{
-   return (getHeaderLength() + getImageLength());
-}
-
-void ossimNitfImageInfoRecordV2_0::setSubheaderLength(ossim_uint32 length)
-{
-   ostringstream out;
-   
-   out << std::setw(6)
-   << std::setfill('0')
-   << std::setiosflags(ios::right)
-   << length;
-   
-   memcpy(theImageSubheaderLength, out.str().c_str(), 6);
-   theImageSubheaderLength[6] = '\0';
-}
-
-void ossimNitfImageInfoRecordV2_0::setImageLength(ossim_uint64 length)
-{
-   ostringstream out;
-   
-   out << std::setw(10)
-   << std::setfill('0')
-   << std::setiosflags(ios::right)
-   << length;
-   
-   memcpy(theImageLength, out.str().c_str(), 10);
-   theImageLength[10] = '\0';
-}
-
-std::ostream& operator <<(std::ostream& out,
-                     const ossimNitfSymbolInfoRecordV2_0 &data)
-{
-   return out << "theSymbolSubheaderLength:       "
-              << data.theSymbolSubheaderLength << std::endl
-              << "theSymbolLength:                "
-              << data.theSymbolLength;
-}
-ossim_int32 ossimNitfSymbolInfoRecordV2_0::getHeaderLength()const
-{
-   return ossimString(theSymbolSubheaderLength).toInt32();
-}
-
-ossim_int32 ossimNitfSymbolInfoRecordV2_0::getImageLength()const
-{
-   return ossimString(theSymbolLength).toInt32();
-}
-
-ossim_int32 ossimNitfSymbolInfoRecordV2_0::getTotalLength()const
-{
-   return (getHeaderLength() + getImageLength());
-}
-
-std::ostream& operator <<(std::ostream& out,
-                     const ossimNitfLabelInfoRecordV2_0 &data)
-{
-   return out << "theLabelSubheaderLength:       "
-              << data.theLabelSubheaderLength << std::endl
-              << "theLabelLength:                "
-              << data.theLabelLength;
-}
-
-ossim_int32 ossimNitfLabelInfoRecordV2_0::getHeaderLength()const
-{
-   return ossimString(theLabelSubheaderLength).toInt32();
-}
-
-ossim_int32 ossimNitfLabelInfoRecordV2_0::getImageLength()const
-{
-   return ossimString(theLabelLength).toInt32();
-}
-
-ossim_int32 ossimNitfLabelInfoRecordV2_0::getTotalLength()const
-{
-   return (getHeaderLength() + getImageLength());
-}
-
-std::ostream& operator <<(std::ostream& out,
-                     const ossimNitfTextInfoRecordV2_0 &data)
-{
-   return out << "theTextSubheaderLength:       "
-              << data.theTextSubheaderLength << std::endl
-              << "theTextLength:                "
-              << data.theTextLength;
-}
-
-ossim_int32 ossimNitfTextInfoRecordV2_0::getHeaderLength()const
-{
-   return ossimString(theTextSubheaderLength).toInt32();
-}
-
-ossim_int32 ossimNitfTextInfoRecordV2_0::getImageLength()const
-{
-   return ossimString(theTextLength).toInt32();
-}
-
-ossim_int32 ossimNitfTextInfoRecordV2_0::getTotalLength()const
-{
-   return (getHeaderLength() + getImageLength());
-}
-
-std::ostream& operator <<(std::ostream& out,
-                     const ossimNitfDataExtSegInfoRecordV2_0 &data)
-{
-   return out << "theDataExtSegSubheaderLength:       "
-              << data.theDataExtSegSubheaderLength << std::endl
-              << "theDataExtSegLength:                "
-              << data.theDataExtSegLength;
-}
-
-ossim_int32 ossimNitfDataExtSegInfoRecordV2_0::getHeaderLength()const
-{
-   return ossimString(theDataExtSegSubheaderLength).toInt32();
-}
-
-ossim_int32 ossimNitfDataExtSegInfoRecordV2_0::getImageLength()const
-{
-   return ossimString(theDataExtSegLength).toInt32();
-}
-
-ossim_int32 ossimNitfDataExtSegInfoRecordV2_0::getTotalLength()const
-{
-   return (getHeaderLength() + getImageLength());
-}
-
-std::ostream& operator <<(std::ostream& out,
-                     const ossimNitfResExtSegInfoRecordV2_0 &data)
-{
-   return out << "theResExtSegSubheaderLength:       "
-              << data.theResExtSegSubheaderLength << std::endl
-              << "theResExtSegLength:                "
-              << data.theResExtSegLength;
-}
-
-ossimNitfFileHeaderV2_0::ossimNitfFileHeaderV2_0()
-   :ossimNitfFileHeaderV2_X()
-{
-   clearFields();
-}
-
-ossimNitfFileHeaderV2_0::~ossimNitfFileHeaderV2_0()
-{
-}
-
-void ossimNitfFileHeaderV2_0::parseStream(std::istream &in)
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfFileHeaderV2_0::parseStream:   entered ......."
-         << std::endl;
-   }
-   
-   clearFields();
-   
-   // identification and origination group
-   in.read(theFileTypeVersion, 9);
-   theHeaderSize+=9;
-   in.read(theComplexityLevel, 2);
-   theHeaderSize+=2;
-   in.read(theSystemType, 4);
-   theHeaderSize+=4;
-   in.read(theOriginatingStationId, 10);
-   theHeaderSize+=10;
-   in.read(theDateTime, 14);
-   theHeaderSize+=14;
-   in.read(theFileTitle, 80);
-   theHeaderSize+=80;
-   
-   // read security group
-   in.read(theSecurityClassification, 1);
-   theHeaderSize++;
-   in.read(theCodewords, 40);
-   theHeaderSize+=40;
-   in.read(theControlAndHandling, 40);
-   theHeaderSize+=40;
-   in.read(theReleasingInstructions, 40);
-   theHeaderSize+=40;
-   in.read(theClassificationAuthority, 20);
-   theHeaderSize+=20;
-   in.read(theSecurityControlNumber, 20);
-   theHeaderSize+=20;
-   in.read(theSecurityDowngrade, 6);
-   theHeaderSize+=6;
-   if(ossimString(theSecurityDowngrade) == "999998")
-   {
-      in.read(theDowngradingEvent, 40);
-      theHeaderSize+=40;
-   }      
-   in.read(theCopyNumber, 5);
-   theHeaderSize+=5;
-   in.read(theNumberOfCopies, 5);
-   theHeaderSize+=5;
-   in.read(theEncryption, 1);
-   theHeaderSize++;
-   in.read(theOriginatorsName, 27);
-   theHeaderSize+=27;
-   in.read(theOriginatorsPhone, 18);
-   theHeaderSize+=18;
-   
-   in.read(theFileLength, 12);
-   theHeaderSize+=12;
-   in.read(theHeaderLength, 6);
-   theHeaderSize+=6;
-   
-   // image description group
-   in.read(theNumberOfImageInfoRecords, 3);
-   theHeaderSize+=3;
-   readImageInfoRecords(in);
-
-   // symbol description group
-   in.read(theNumberOfSymbolInfoRecords, 3);
-   theHeaderSize+=3;
-   readSymbolInfoRecords(in);
-   
-   // label description group
-   in.read(theNumberOfLabelInfoRecords, 3);
-   theHeaderSize+=3;
-   readLabelInfoRecords(in);
-   
-   // text file information group
-   in.read(theNumberOfTextFileInfoRecords, 3);
-   theHeaderSize+=3;
-   readTextFileInfoRecords(in);
-   
-   // Data extension group
-   in.read(theNumberOfDataExtSegInfoRecords, 3);
-   theHeaderSize+=3;
-   readDataExtSegInfoRecords(in);
-   
-   // Reserve Extension Segment group
-   in.read(theNumberOfResExtSegInfoRecords, 3);
-   theHeaderSize+=3;
-   readResExtSegInfoRecords(in);
-   
-   in.read(theUserDefinedHeaderDataLength, 5);
-   theHeaderSize+=5;
-   
-   theTagList.clear();
-   // only get the header overflow if there even exists
-   // user defined data.
-   ossim_int32 userDefinedHeaderLength = ossimString(theUserDefinedHeaderDataLength).toInt32();
-   
-   ossimNitfTagInformation         headerTag;
-   
-   std::streampos start   = in.tellg();
-   std::streampos current = in.tellg();
-
-   theHeaderSize+=userDefinedHeaderLength;
-   if(userDefinedHeaderLength > 0)
-   {
-      in.read(theUserDefinedHeaderOverflow, 3);
-      
-      while((current - start) < userDefinedHeaderLength)
-      {
-         headerTag.parseStream(in);
-         theTagList.push_back(headerTag);
-         // in.ignore(headerTag.getTagLength());
-         // headerTag.clearFields();
-
-         //---
-         // We will check the stream here as there have been instances of
-         // rpf's with bad stream offsets.
-         //---
-         if (!in)
-         {
-            std::string e =
-               "ossimNitfFileHeaderV2_0::parseStream stream error!";
-            throw ossimException(e);
-         }
-
-         current = in.tellg();
-      }
-   }
-   in.read(theExtendedHeaderDataLength, 5);
-   theHeaderSize+=5;
-   ossim_int32 extendedHeaderDataLength = ossimString(theExtendedHeaderDataLength).toInt32();
-   theHeaderSize+=extendedHeaderDataLength;
-   
-   start   = in.tellg();
-   current = in.tellg();
-   // for now let's just ignore it
-   if(extendedHeaderDataLength > 0)
-   {
-      in.read(theExtendedHeaderOverflow, 3);
-      
-      while((current - start) < extendedHeaderDataLength)
-      {
-         headerTag.parseStream(in);
-         theTagList.push_back(headerTag);
-         in.ignore(headerTag.getTagLength());
-         headerTag.clearFields();
-         current = in.tellg();
-      }
-   }
-   
-   // this need to be re-thought
-   initializeAllOffsets();
-
-   if(traceDebug())
-   {
-      ossimNitfFileHeader::print( ossimNotify(ossimNotifyLevel_DEBUG) );
-   }
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimNitfFileHeaderV2_0::parseStream:   Leaving......."
-         << std::endl;
-   }
-//      initializeDisplayLevels(in);
-
-}
-
-void ossimNitfFileHeaderV2_0::writeStream(std::ostream &out)
-{
-   // identification and origination group
-   out.write(theFileTypeVersion, 9);
-   out.write(theComplexityLevel, 2);
-   out.write(theSystemType, 4);
-   out.write(theOriginatingStationId, 10);
-   out.write(theDateTime, 14);
-   out.write(theFileTitle, 80);
-   
-   // read security group
-   out.write(theSecurityClassification, 1);
-   out.write(theCodewords, 40);
-   out.write(theControlAndHandling, 40);
-   out.write(theReleasingInstructions, 40);
-   out.write(theClassificationAuthority, 20);
-   out.write(theSecurityControlNumber, 20);
-   out.write(theSecurityDowngrade, 6);
-   if(ossimString(theSecurityDowngrade) == "999998")
-   {
-      out.write(theDowngradingEvent, 40);
-   }      
-   out.write(theCopyNumber, 5);
-   out.write(theNumberOfCopies, 5);
-   out.write(theEncryption, 1);
-   out.write(theOriginatorsName, 27);
-   out.write(theOriginatorsPhone, 18);
-   
-   out.write(theFileLength, 12);
-   out.write(theHeaderLength, 6);   
-   ossim_uint32 idx = 0;
-   {
-      ostringstream outString;
-      
-      
-      outString << std::setw(3)
-      << std::setfill('0')
-      << std::setiosflags(ios::right)
-      << theNitfImageInfoRecords.size();
-      
-      out.write(outString.str().c_str(), 3);
-      
-      for(idx = 0; idx < theNitfImageInfoRecords.size(); ++idx)
-      {
-         out.write(theNitfImageInfoRecords[idx].theImageSubheaderLength, 6);
-         out.write(theNitfImageInfoRecords[idx].theImageLength, 10);
-      }
-   }
-   {
-      ostringstream outString;
-      
-      outString << std::setw(3)
-      << std::setfill('0')
-      << std::setiosflags(ios::right)
-      << theNitfSymbolInfoRecords.size();
-      
-      out.write(outString.str().c_str(), 3);
-      
-      for(idx = 0; idx < theNitfSymbolInfoRecords.size(); ++idx)
-      {
-         out.write(theNitfSymbolInfoRecords[idx].theSymbolSubheaderLength, 4);
-         out.write(theNitfSymbolInfoRecords[idx].theSymbolLength, 6);
-      }
-   }
-   {
-      ostringstream outString;
-      
-      outString << std::setw(3)
-      << std::setfill('0')
-      << std::setiosflags(ios::right)
-      << theNitfLabelInfoRecords.size();
-      
-      out.write(outString.str().c_str(), 3);
-      
-      for(idx = 0; idx < theNitfLabelInfoRecords.size(); ++idx)
-      {
-         out.write(theNitfLabelInfoRecords[idx].theLabelSubheaderLength, 4);
-         out.write(theNitfLabelInfoRecords[idx].theLabelLength, 3);
-      }
-   }
-   {
-      ostringstream outString;
-      
-      outString << std::setw(3)
-      << std::setfill('0')
-      << std::setiosflags(ios::right)
-      << theNitfTextInfoRecords.size();
-      
-      out.write(outString.str().c_str(), 3);
-      
-      for(idx = 0; idx < theNitfTextInfoRecords.size(); ++idx)
-      {
-         out.write(theNitfTextInfoRecords[idx].theTextSubheaderLength, 4);
-         out.write(theNitfTextInfoRecords[idx].theTextLength, 5);
-      }
-   }
-   {
-      ostringstream outString;
-      
-      outString << std::setw(3)
-      << std::setfill('0')
-      << std::setiosflags(ios::right)
-      << theNitfDataExtSegInfoRecords.size();
-      
-      out.write(outString.str().c_str(), 3);
-      
-      for(idx = 0; idx < theNitfDataExtSegInfoRecords.size(); ++idx)
-      {
-         out.write(theNitfDataExtSegInfoRecords[idx].theDataExtSegSubheaderLength, 4);
-         out.write(theNitfDataExtSegInfoRecords[idx].theDataExtSegLength, 9);
-      }
-   }
-   {
-      ostringstream outString;
-      
-      outString << std::setw(3)
-      << std::setfill('0')
-      << std::setiosflags(ios::right)
-      << theNitfResExtSegInfoRecords.size();
-      
-      out.write(outString.str().c_str(), 3);
-      
-      for(idx = 0; idx < theNitfResExtSegInfoRecords.size(); ++idx)
-      {
-         out.write(theNitfResExtSegInfoRecords[idx].theResExtSegSubheaderLength, 4);
-         out.write(theNitfResExtSegInfoRecords[idx].theResExtSegLength, 7);
-      }
-   }
-   out.write(theUserDefinedHeaderDataLength, 5);
-   if(ossimString(theUserDefinedHeaderDataLength).toInt32() > 0)
-   {
-      out.write(theUserDefinedHeaderOverflow, 3);
-   }
-   ossim_uint32 totalLength = getTotalTagLength();
-   if(totalLength <= 99999)
-   {
-      std::ostringstream tempOut;
-      
-      tempOut << std::setw(5)
-      << std::setfill('0')
-      << std::setiosflags(ios::right)
-      << totalLength;
-      
-      memcpy(theExtendedHeaderDataLength, tempOut.str().c_str(), 5);
-      
-      out.write(theExtendedHeaderDataLength, 5);
-      
-      // for now we hard code te 000 for we do not currently support writing to the DES if the total tag length is
-      // larger than supported
-      //
-      memset(theExtendedHeaderOverflow, '0', 3);
-      if(totalLength > 0)
-      {
-         ossim_uint32 i = 0;
-         out.write(theExtendedHeaderOverflow, 3);
-         
-         for(i = 0; i < theTagList.size(); ++i)
-         {
-            theTagList[i].writeStream(out);
-         }
-      }
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimNitfFileHeaderV2_0::writeStream: Only support writing of total tag length < 99999" << std::endl;
-   }
-}
-
-std::ostream& ossimNitfFileHeaderV2_0::print(std::ostream& out,
-                                             const std::string& prefix) const
-{
-   out << setiosflags(std::ios::left)
-       << prefix << std::setw(24) << "FHDR:"
-       << theFileTypeVersion << "\n"
-       << prefix << std::setw(24) << "CLEVEL:"
-       << theComplexityLevel << "\n"
-       << prefix << std::setw(24) << "STYPE:"
-       << theSystemType  << "\n"    
-       << prefix << std::setw(24) << "OSTAID:"
-       << theOriginatingStationId << "\n"
-       << prefix << std::setw(24) << "FDT:"
-       << theDateTime  << "\n"      
-       << prefix << std::setw(24) << "FTITLE:"
-       << theFileTitle  << "\n"     
-       << prefix << std::setw(24) << "FSCLAS:"
-       << theSecurityClassification << "\n"
-       << prefix << std::setw(24) << "FSCODE:"
-       << theCodewords << "\n"
-       << prefix << std::setw(24) << "FSCTLH:"
-       << theControlAndHandling << "\n"
-       << prefix << std::setw(24) << "FSREL:"
-       << theReleasingInstructions << "\n"
-       << prefix << std::setw(24) << "FSCAUT:"
-       << theClassificationAuthority << "\n"
-       << prefix << std::setw(24) << "FSCTLN:"
-       << theSecurityControlNumber << "\n"
-       << prefix << std::setw(24) << "FSDWNG:"
-       << theSecurityDowngrade << "\n"
-       << prefix << std::setw(24) << "FSDEVT:"
-       << theDowngradingEvent << "\n"
-       << prefix << std::setw(24) << "FSCOP:"
-       << theCopyNumber << "\n"
-       << prefix << std::setw(24) << "FSCPYS:"
-       << theNumberOfCopies << "\n"
-       << prefix << std::setw(24) << "ENCRYP:"
-       << theEncryption << "\n"
-       << prefix << std::setw(24) << "ONAME:"
-       << theOriginatorsName << "\n"
-       << prefix << std::setw(24) << "OPHONE:"
-       << theOriginatorsPhone << "\n"
-       << prefix << std::setw(24) << "FL:"
-       << theFileLength << "\n"
-       << prefix << std::setw(24) << "HL:"
-       << theHeaderLength << "\n"
-       << prefix << std::setw(24) << "NUMI:"
-       << theNumberOfImageInfoRecords << "\n";
-
-   ossim_uint32 index;
-   
-   for (index = 0; index < theNitfImageInfoRecords.size(); ++index)
-   {
-      std::ostringstream os;
-      os << std::setw(3) << std::setfill('0') << (index+1) << ":";
-      
-      ossimString tmpStr = "LISH";
-      tmpStr += os.str();
-      
-      out << prefix << std::setw(24) << tmpStr
-          << theNitfImageInfoRecords[index].theImageSubheaderLength << "\n";
-      tmpStr = "LI";
-      tmpStr += os.str();
-      
-      out << prefix << std::setw(24) << tmpStr
-          << theNitfImageInfoRecords[index].theImageLength << "\n";
-   }
-
-   out << prefix << std::setw(24) << "NUMS:" << theNumberOfSymbolInfoRecords
-       << "\n";
-
-   for (index = 0; index < theNitfSymbolInfoRecords.size(); ++index)
-   {
-      std::ostringstream os;
-      os << std::setw(3) << std::setfill('0') << (index+1) << ":";
-
-      ossimString tmpStr = "LSSH";
-      tmpStr += os.str();
-
-      out << tmpStr
-          << theNitfSymbolInfoRecords[index].theSymbolSubheaderLength << "\n";
-
-      tmpStr = "LS";
-      tmpStr += os.str();
-
-      out << tmpStr 
-          << theNitfSymbolInfoRecords[index].theSymbolLength << "\n";
-   }
-
-   
-   out << prefix << std::setw(24) << "NUML:" << theNumberOfLabelInfoRecords
-       << "\n";
-
-   for (index = 0; index < theNitfLabelInfoRecords.size(); ++index)
-   {
-      std::ostringstream os;
-      os << std::setw(3) << std::setfill('0') << (index+1) << ":";
-
-      ossimString tmpStr = "LLSH";
-      tmpStr += os.str();
-
-      out << tmpStr
-          << theNitfLabelInfoRecords[index].theLabelSubheaderLength  << "\n";
-
-      tmpStr = "LL";
-      tmpStr += os.str();
-
-      out << tmpStr 
-          << theNitfLabelInfoRecords[index].theLabelLength << "\n";
-   }
-
-   out << prefix << std::setw(24) << "NUMT:" << theNumberOfTextFileInfoRecords
-       << "\n";
-
-   for (index = 0; index < theNitfTextInfoRecords.size(); ++index)
-   {
-      std::ostringstream os;
-      os << std::setw(3) << std::setfill('0') << (index+1) << ":";
-
-      ossimString tmpStr = "LTSH";
-      tmpStr += os.str();
-
-      out << prefix << std::setw(24) << tmpStr
-          << theNitfTextInfoRecords[index].theTextSubheaderLength << "\n";
-
-      tmpStr = "LT";
-      tmpStr += os.str();
-
-      out << prefix << std::setw(24) << tmpStr 
-          << theNitfTextInfoRecords[index].theTextLength<< "\n";
-   }
-
-   out << prefix << std::setw(24) << "NUMDES:"
-       << theNumberOfDataExtSegInfoRecords << "\n";
-
-   for (index = 0; index < theNitfDataExtSegInfoRecords.size(); ++index)
-   {
-      std::ostringstream os;
-      os << std::setw(3) << std::setfill('0') << (index+1) << ":";
-
-      ossimString tmpStr = "LDSH";
-      tmpStr += os.str();
-
-      out << prefix << std::setw(24) << tmpStr
-          << theNitfDataExtSegInfoRecords[index].theDataExtSegSubheaderLength
-          << "\n";
-
-      tmpStr = "LD";
-      tmpStr += os.str();
-
-      out << prefix << std::setw(24) << tmpStr 
-          << theNitfDataExtSegInfoRecords[index].theDataExtSegLength << "\n";
-   }
-
-   out << prefix << std::setw(24) << "NUMRES:"
-       << theNumberOfResExtSegInfoRecords << "\n";
-
-   for (index = 0; index < theNitfResExtSegInfoRecords.size(); ++index)
-   {
-      std::ostringstream os;
-      os << std::setw(3) << std::setfill('0') << (index+1) << ":";
-
-      ossimString tmpStr = "LRSH";
-      tmpStr += os.str();
-
-      out << tmpStr
-          << theNitfResExtSegInfoRecords[index].theResExtSegSubheaderLength
-          << "\n";
-
-      tmpStr = "LR";
-      tmpStr += os.str();
-
-      out << tmpStr 
-          << theNitfResExtSegInfoRecords[index].theResExtSegLength
-          << "\n";
-   }
-
-   out << prefix << std::setw(24) << "UDHDL:"
-       << theUserDefinedHeaderDataLength << "\n"
-       << prefix << std::setw(24) << "UDHOFL:"
-       << theUserDefinedHeaderOverflow << "\n"
-       << prefix << std::setw(24) << "XHDL:"
-       << theExtendedHeaderDataLength << "\n";
-   
-   return ossimNitfFileHeader::print(out, prefix);
-}
-
-
-bool ossimNitfFileHeaderV2_0::saveState(ossimKeywordlist& kwl, const ossimString& prefix)const
-{
-   bool result = ossimNitfFileHeaderV2_X::saveState(kwl, prefix);
-   
-   if(result)
-   {
-      kwl.add(prefix, "FSCODE",theCodewords);
-      kwl.add(prefix, "FSCTLH",theControlAndHandling);
-      kwl.add(prefix, "FSREL",theReleasingInstructions);
-      kwl.add(prefix, "FSCAUT",theClassificationAuthority);
-      kwl.add(prefix, "FSCTLN",theSecurityControlNumber);
-      kwl.add(prefix, "FSDWNG",theSecurityDowngrade);
-      kwl.add(prefix, "FSDEVT",theDowngradingEvent);
-      kwl.add(prefix, "ONAME",theOriginatorsName);
-      kwl.add(prefix, "OPHONE",theOriginatorsPhone);
-      kwl.add(prefix, "FL",theFileLength);
-      kwl.add(prefix, "HL",theHeaderLength);
-      kwl.add(prefix, "NUMI",theNumberOfImageInfoRecords);
-      kwl.add(prefix, "UDHDL",theUserDefinedHeaderDataLength);
-      kwl.add(prefix, "UDHOFL",theUserDefinedHeaderDataLength);
-      kwl.add(prefix, "XHDL",theExtendedHeaderDataLength);
-
-      std::ostringstream out;
-      ossim_uint32 index;
-      for (index = 0; index < theNitfImageInfoRecords.size(); ++index)
-      {
-         std::ostringstream os;
-         os << std::setw(3) << std::setfill('0') << (index+1) << ":";
-         
-         ossimString tmpStr = "LISH";
-         tmpStr += os.str();
-         
-         out << tmpStr
-         << theNitfImageInfoRecords[index].theImageSubheaderLength << "\n";
-         tmpStr = "LI";
-         tmpStr += os.str();
-         
-         out << tmpStr
-         << theNitfImageInfoRecords[index].theImageLength << "\n";
-      }
-      
-      out <<"NUMS:" << theNumberOfSymbolInfoRecords
-      << "\n";
-      
-      for (index = 0; index < theNitfSymbolInfoRecords.size(); ++index)
-      {
-         std::ostringstream os;
-         os << std::setw(3) << std::setfill('0') << (index+1) << ":";
-         
-         ossimString tmpStr = "LSSH";
-         tmpStr += os.str();
-         
-         out << tmpStr
-         << theNitfSymbolInfoRecords[index].theSymbolSubheaderLength << "\n";
-         
-         tmpStr = "LS";
-         tmpStr += os.str();
-         
-         out << tmpStr 
-         << theNitfSymbolInfoRecords[index].theSymbolLength << "\n";
-      }
-      
-      
-      out << "NUML:" << theNumberOfLabelInfoRecords
-      << "\n";
-      
-      for (index = 0; index < theNitfLabelInfoRecords.size(); ++index)
-      {
-         std::ostringstream os;
-         os << std::setw(3) << std::setfill('0') << (index+1) << ":";
-         
-         ossimString tmpStr = "LLSH";
-         tmpStr += os.str();
-         
-         out << tmpStr
-         << theNitfLabelInfoRecords[index].theLabelSubheaderLength  << "\n";
-         
-         tmpStr = "LL";
-         tmpStr += os.str();
-         
-         out << tmpStr 
-         << theNitfLabelInfoRecords[index].theLabelLength << "\n";
-      }
-      
-      out << "NUMT:" << theNumberOfTextFileInfoRecords
-      << "\n";
-      
-      for (index = 0; index < theNitfTextInfoRecords.size(); ++index)
-      {
-         std::ostringstream os;
-         os << std::setw(3) << std::setfill('0') << (index+1) << ":";
-         
-         ossimString tmpStr = "LTSH";
-         tmpStr += os.str();
-         
-         out << tmpStr
-         << theNitfTextInfoRecords[index].theTextSubheaderLength << "\n";
-         
-         tmpStr = "LT";
-         tmpStr += os.str();
-         
-         out << tmpStr 
-         << theNitfTextInfoRecords[index].theTextLength<< "\n";
-      }
-      
-      out << "NUMDES:"
-      << theNumberOfDataExtSegInfoRecords << "\n";
-      
-      for (index = 0; index < theNitfDataExtSegInfoRecords.size(); ++index)
-      {
-         std::ostringstream os;
-         os << std::setw(3) << std::setfill('0') << (index+1) << ":";
-         
-         ossimString tmpStr = "LDSH";
-         tmpStr += os.str();
-         
-         out << tmpStr
-         << theNitfDataExtSegInfoRecords[index].theDataExtSegSubheaderLength
-         << "\n";
-         
-         tmpStr = "LD";
-         tmpStr += os.str();
-         
-         out << tmpStr 
-         << theNitfDataExtSegInfoRecords[index].theDataExtSegLength << "\n";
-      }
-      
-      out << "NUMRES:"
-      << theNumberOfResExtSegInfoRecords << "\n";
-      
-      for (index = 0; index < theNitfResExtSegInfoRecords.size(); ++index)
-      {
-         std::ostringstream os;
-         os << std::setw(3) << std::setfill('0') << (index+1) << ":";
-         
-         ossimString tmpStr = "LRSH";
-         tmpStr += os.str();
-         
-         out << tmpStr
-         << theNitfResExtSegInfoRecords[index].theResExtSegSubheaderLength
-         << "\n";
-         
-         tmpStr = "LR";
-         tmpStr += os.str();
-         
-         out << tmpStr 
-         << theNitfResExtSegInfoRecords[index].theResExtSegLength
-         << "\n";
-      }
-      
-      {
-         std::istringstream in(out.str());
-         ossimKeywordlist tempKwl;
-         if(tempKwl.parseStream(in))
-         {
-            result = true;
-            kwl.add(prefix, tempKwl);
-         }
-      }
-   }
-   
-   return result;
-}
-
-ossimDrect ossimNitfFileHeaderV2_0::getImageRect()const
-{
-   return theImageRect;
-}
-
-void ossimNitfFileHeaderV2_0::addImageInfoRecord(const ossimNitfImageInfoRecordV2_0& recordInfo)
-{
-   theNitfImageInfoRecords.push_back(recordInfo);
-   
-   setNumberOfImageInfoRecords(theNitfImageInfoRecords.size());
-}
-
-void ossimNitfFileHeaderV2_0::replaceImageInfoRecord(ossim_uint32 i, const ossimNitfImageInfoRecordV2_0& recordInfo)
-{
-   theNitfImageInfoRecords[i]=recordInfo;
-}
-
-ossimNitfImageHeader*
-ossimNitfFileHeaderV2_0::getNewImageHeader(ossim_uint32 imageNumber,
-                                           std::istream& in)const
-{
-   ossimNitfImageHeader *result = 0;
-   
-   if( (getNumberOfImages() > 0) && (imageNumber < theImageOffsetList.size()) )
-   {
-      result = allocateImageHeader();
-      in.seekg(theImageOffsetList[imageNumber].theImageHeaderOffset, std::ios::beg);
-      result->parseStream(in);
-   }
-   else
-   {
-#if 0
-      ossimNotify(ossimNotifyLevel_FATAL) << "ossimNitfFileHeaderV2_0::getNewImageHeader ERROR:"
-                                          << "\nNo images in file or image number (" << imageNumber
-                                          << ") is out of range!\n";
-#endif
-   }
-   
-   return result;
-}
-
-ossimNitfSymbolHeader *ossimNitfFileHeaderV2_0::getNewSymbolHeader(
-   ossim_uint32 symbolNumber, std::istream& in)const
-{
-   ossimNitfSymbolHeader *result = 0;
-
-   if( (getNumberOfSymbols() > 0) &&
-       (symbolNumber < theSymbolOffsetList.size()) )
-   {
-      result = allocateSymbolHeader();
-      in.seekg(theSymbolOffsetList[symbolNumber].theSymbolHeaderOffset, std::ios::beg);
-      result->parseStream(in);
-   }
-   
-   return result;
-}
-
-ossimNitfLabelHeader *ossimNitfFileHeaderV2_0::getNewLabelHeader(
-   ossim_uint32 labelNumber, std::istream& in)const
-{
-   ossimNitfLabelHeader *result = 0;
-
-   if( (getNumberOfLabels() > 0) &&
-       (labelNumber < theLabelOffsetList.size()) )
-   {
-      result = allocateLabelHeader();
-      in.seekg(theLabelOffsetList[labelNumber].theLabelHeaderOffset, std::ios::beg);
-      result->parseStream(in);
-   }
-   
-   return result;
-}
-
-ossimNitfTextHeader *ossimNitfFileHeaderV2_0::getNewTextHeader(
-   ossim_uint32 textNumber, std::istream& in)const
-{
-   ossimNitfTextHeader *result = 0;
-
-   if( (getNumberOfTextSegments() > 0) &&
-       (textNumber < theTextOffsetList.size()) )
-   {
-      result = allocateTextHeader();
-      in.seekg(theTextOffsetList[textNumber].theTextHeaderOffset, std::ios::beg);
-      result->parseStream(in);
-   }
-   
-   return result;
-}
-
-ossimNitfDataExtensionSegment*
-ossimNitfFileHeaderV2_0::getNewDataExtensionSegment(
-    ossim_uint32 dataExtNumber, std::istream& in)const
-{
-   ossimNitfDataExtensionSegment *result = 0;
-
-   if( (getNumberOfDataExtSegments() > 0) &&
-       (dataExtNumber < theNitfDataExtSegInfoRecords.size()) )
-   {
-      result = allocateDataExtSegment();
-      in.seekg(theDataExtSegOffsetList[dataExtNumber].theDataExtSegHeaderOffset, std::ios::beg);
-      result->parseStream(in);
-   }
-   
-   return result;
-}
-
-void ossimNitfFileHeaderV2_0::initializeDisplayLevels(std::istream& in)
-{
-   // we will need to temporarily save the get pointer since
-   // initializeDisplayLevels changes it.
-   std::streampos saveTheGetPointer = in.tellg();
-   
-   std::vector<ossimNitfImageOffsetInformation>::iterator imageOffsetList = theImageOffsetList.begin();
-
-   // allocate temporary space to store image headers
-   ossimNitfImageHeader* imageHeader = allocateImageHeader();
-
-   // clear the list
-   theDisplayInformationList.clear();
-   
-   theImageRect = ossimDrect(0,0,0,0);
-   if(!imageHeader)
-   {
-      return;
-   }
-   
-   ossim_uint32 idx = 0;
-   while(imageOffsetList != theImageOffsetList.end())
-   {
-      // position the get pointer in the input
-      // stream to the start of the image header
-      in.seekg((*imageOffsetList).theImageHeaderOffset, std::ios::beg);
-      // get the data
-      imageHeader->parseStream(in);
-      // create a union of rects.  The result should be the image rect.
-      ossimDrect tempRect = imageHeader->getImageRect();
-      if((tempRect.width() > 1) &&
-         (tempRect.height() > 1))
-      {
-         theImageRect = theImageRect.combine(tempRect);
-      }
-      
-      insertIntoDisplayInfoList(ossimNitfDisplayInfo(ossimString("IM"),
-                                                     imageHeader->getDisplayLevel(),
-                                                     idx));
-      
-      ++imageOffsetList;
-      ++idx;                                       
-   }
-   delete imageHeader;
-   imageHeader = 0;
-
-
-   
-   // finally we reset the saved get state back
-   // to its original position
-   in.seekg(saveTheGetPointer, std::ios::beg);
-}
-
-void ossimNitfFileHeaderV2_0::insertIntoDisplayInfoList(const ossimNitfDisplayInfo &displayInformation)
-{
-   std::vector<ossimNitfDisplayInfo>::iterator displayList = theDisplayInformationList.begin();
-
-   while(displayList != theDisplayInformationList.end())
-   {
-      if(displayInformation.theDisplayLevel < (*displayList).theDisplayLevel)
-      {
-         theDisplayInformationList.insert(displayList, displayInformation);
-         return;
-      }
-      ++displayList;
-   }
-
-   // If we get here it means it's larger than all others
-   // and we push onto the end
-   theDisplayInformationList.push_back(displayInformation);
-}
-
-void ossimNitfFileHeaderV2_0::initializeAllOffsets()
-{
-   // this will be a running tally 
-   ossim_uint64 tally = theHeaderSize;
-   ossim_uint32 idx = 0;
-
-   // clear out all offset inforamtion and begin populating them
-   theImageOffsetList.clear();
-   theSymbolOffsetList.clear();
-   theLabelOffsetList.clear();
-   theLabelOffsetList.clear();
-   
-
-   for(idx = 0; idx < theNitfImageInfoRecords.size(); ++idx)
-   {
-      theImageOffsetList.push_back(ossimNitfImageOffsetInformation(tally,
-                                                                   tally + theNitfImageInfoRecords[idx].getHeaderLength()));
-      tally += theNitfImageInfoRecords[idx].getTotalLength();
-   }
-   for(idx = 0; idx < theNitfSymbolInfoRecords.size(); ++idx)
-   {
-      theSymbolOffsetList.push_back(ossimNitfSymbolOffsetInformation(tally,
-                                                                     tally + theNitfSymbolInfoRecords[idx].getHeaderLength()));
-      tally += theNitfSymbolInfoRecords[idx].getTotalLength();
-   }
-
-   for(idx = 0; idx < theNitfLabelInfoRecords.size(); ++idx)
-   {
-      theLabelOffsetList.push_back(ossimNitfLabelOffsetInformation(tally,
-                                                                   tally + theNitfLabelInfoRecords[idx].getHeaderLength()));
-      tally += theNitfLabelInfoRecords[idx].getTotalLength();
-   }
-
-   for(idx = 0; idx < theNitfTextInfoRecords.size(); ++idx)
-   {
-      theTextOffsetList.push_back(ossimNitfTextOffsetInformation(tally,
-                                                                 tally + theNitfTextInfoRecords[idx].getHeaderLength()));
-      tally += theNitfTextInfoRecords[idx].getTotalLength();
-   }
-
-   for(idx = 0; idx < theNitfDataExtSegInfoRecords.size(); ++idx)
-   {
-      theDataExtSegOffsetList.push_back(ossimNitfDataExtSegOffsetInformation(tally,
-                                                                             tally + theNitfDataExtSegInfoRecords[idx].getHeaderLength()));
-      tally += theNitfDataExtSegInfoRecords[idx].getTotalLength();
-   }
-}
-
-ossimNitfImageHeader *ossimNitfFileHeaderV2_0::allocateImageHeader()const
-{
-   return new ossimNitfImageHeaderV2_0;
-}
-
-ossimNitfSymbolHeader *ossimNitfFileHeaderV2_0::allocateSymbolHeader()const
-{
-   return new ossimNitfSymbolHeaderV2_0;
-}
-
-ossimNitfLabelHeader *ossimNitfFileHeaderV2_0::allocateLabelHeader()const
-{
-   return new ossimNitfLabelHeaderV2_0;
-}
-
-ossimNitfTextHeader *ossimNitfFileHeaderV2_0::allocateTextHeader()const
-{
-   return new ossimNitfTextHeaderV2_0;
-}
-
-ossimNitfDataExtensionSegment* ossimNitfFileHeaderV2_0::allocateDataExtSegment()const
-{
-   return new ossimNitfDataExtensionSegmentV2_0;
-}
-
-bool ossimNitfFileHeaderV2_0::isEncrypted()const
-{
-   return (theEncryption[0] == '1');
-}
-
-ossim_int32 ossimNitfFileHeaderV2_0::getNumberOfImages()const
-{
-   return (ossim_int32)theNitfImageInfoRecords.size();
-}
-
-ossim_int32 ossimNitfFileHeaderV2_0::getNumberOfLabels()const
-{
-   return ((ossim_int32)theNitfLabelInfoRecords.size());
-}
-
-ossim_int32 ossimNitfFileHeaderV2_0::getNumberOfSymbols()const
-{
-   return ((ossim_int32)theNitfSymbolInfoRecords.size());
-}
-
-ossim_int32 ossimNitfFileHeaderV2_0::getNumberOfGraphics()const
-{
-   return 0;
-}
-
-ossim_int32 ossimNitfFileHeaderV2_0::getNumberOfTextSegments()const
-{
-   return (ossim_int32)theNitfTextInfoRecords.size();
-}
-
-ossim_int32 ossimNitfFileHeaderV2_0::getNumberOfDataExtSegments()const
-{
-   return (ossim_int32)theNitfDataExtSegInfoRecords.size();
-}
-
-ossim_int32 ossimNitfFileHeaderV2_0::getHeaderSize()const
-{
-   return theHeaderSize;
-}
-
-ossim_int64 ossimNitfFileHeaderV2_0::getFileSize()const
-{
-   ossimString temp = theFileLength;
-   if(temp == "999999999999")
-   {
-      return -1;
-   }
-   else
-   {
-      return temp.toInt64();
-   }
-}
-
-const char* ossimNitfFileHeaderV2_0::getVersion()const
-{
-   return &theFileTypeVersion[4];
-}
-
-const char* ossimNitfFileHeaderV2_0::getDateTime()const
-{
-   return theDateTime;
-}
-
-ossimString ossimNitfFileHeaderV2_0::getSecurityClassification()const
-{
-   return theSecurityClassification;
-}
-
-void ossimNitfFileHeaderV2_0::clearFields()
-{
-   theDisplayInformationList.clear();
-   theImageOffsetList.clear();
-   theSymbolOffsetList.clear();
-   theLabelOffsetList.clear();
-   theTextOffsetList.clear();
-   theDataExtSegOffsetList.clear();
-   theNitfSymbolInfoRecords.clear();
-   theNitfLabelInfoRecords.clear();
-   theNitfTextInfoRecords.clear();
-   theNitfDataExtSegInfoRecords.clear();
-   theNitfResExtSegInfoRecords.clear();
-   
-   theFilename = "";
-   memcpy(theFileTypeVersion, "NITF02.00", 9);
-   memset(theComplexityLevel, ' ', 2);
-   memset(theSystemType, ' ', 4);
-   memset(theOriginatingStationId, ' ', 10);
-   memset(theDateTime, ' ', 14);
-   memset(theFileTitle, ' ', 80);
-   memset(theSecurityClassification, ' ', 1);
-   memset(theCodewords, ' ', 40);
-   memset(theControlAndHandling, ' ', 40);
-   memset(theReleasingInstructions, ' ', 40);
-   memset(theClassificationAuthority, ' ', 20);
-   memset(theSecurityControlNumber, ' ', 20);
-   memset(theSecurityDowngrade, ' ', 6);
-   memset(theDowngradingEvent, ' ', 40);
-   memset(theCopyNumber, ' ', 5);
-   memset(theNumberOfCopies, ' ', 5);
-   memset(theEncryption, ' ', 1);
-   memset(theOriginatorsName, ' ', 27);
-   memset(theOriginatorsPhone, ' ', 18);
-   memset(theFileLength, ' ', 12);
-   memset(theHeaderLength, ' ', 6);
-   memset(theNumberOfImageInfoRecords, ' ', 3);
-   memset(theNumberOfSymbolInfoRecords, ' ', 3);
-   memset(theNumberOfLabelInfoRecords, ' ', 3);
-   memset(theNumberOfTextFileInfoRecords, ' ', 3);
-   memset(theNumberOfDataExtSegInfoRecords, ' ', 3);
-   memset(theNumberOfResExtSegInfoRecords, ' ', 3);
-   memset(theUserDefinedHeaderDataLength, '0', 5);
-   memset(theUserDefinedHeaderOverflow, ' ', 3);
-   memset(theExtendedHeaderDataLength, '0', 5);
-   memset(theExtendedHeaderOverflow, ' ', 3);
-   
-   theFileTypeVersion[9] = '\0';
-   theComplexityLevel[2] = '\0';
-   theSystemType[4]      = '\0';
-   theOriginatingStationId[10] = '\0';
-   theDateTime[14]       = '\0';
-   theFileTitle[80]      = '\0';
-   theSecurityClassification[1] = '\0';
-   theCodewords[40] = '\0';
-   theControlAndHandling[40] = '\0';
-   theReleasingInstructions[40] = '\0';
-   theClassificationAuthority[20] = '\0';
-   theSecurityControlNumber[20] = '\0';
-   theSecurityDowngrade[6] = '\0';
-   theDowngradingEvent[40] = '\0';
-   theCopyNumber[5] = '\0';
-   theNumberOfCopies[5] = '\0';
-   theEncryption[1] = '\0';
-   theOriginatorsName[27] = '\0';
-   theOriginatorsPhone[18] = '\0';
-   theFileLength[12]  = '\0';
-   theHeaderLength[6] = '\0';
-   theNumberOfImageInfoRecords[3] = '\0';
-   theNumberOfSymbolInfoRecords[3] = '\0';
-   theNumberOfLabelInfoRecords[3] = '\0';
-   theNumberOfTextFileInfoRecords[3] = '\0';
-   theNumberOfDataExtSegInfoRecords[3] = '\0';
-   theNumberOfResExtSegInfoRecords[3] = '\0';
-   theUserDefinedHeaderDataLength[5] = '\0';
-   theUserDefinedHeaderOverflow[3] = '\0';
-   theExtendedHeaderDataLength[5] = '\0';
-   theExtendedHeaderOverflow[3] = '\0';
-   theHeaderSize = 0;
-}
-
-void ossimNitfFileHeaderV2_0::setNumberOfImageInfoRecords(ossim_uint64 num)
-{
-   if (num < 1000)
-   {
-      ostringstream out;
-      
-      out << std::setw(3)
-      << std::setfill('0')
-      << std::setiosflags(ios::right)
-      << num;
-      
-      memcpy(theNumberOfImageInfoRecords, out.str().c_str(), 3);
-   }
-   else
-   {
-      std::string s = "ossimNitfFileHeaderV2_0::setNumberOfImageInfoRecords:";
-      s += " ERROR\nExceeded max image info number of 999!";
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
-      }
-      throw std::out_of_range(s);
-   }
-}
-
-void ossimNitfFileHeaderV2_0::readImageInfoRecords(std::istream &in)
-{
-   ossim_int32 numberOfImages = ossimString(theNumberOfImageInfoRecords).toInt32();
-   ossim_int32 index;
-
-   theNitfImageInfoRecords.clear();
-   for(index=0; index < numberOfImages; index++)
-   {
-      ossimNitfImageInfoRecordV2_0 temp;
-      
-      in.read(temp.theImageSubheaderLength, 6);
-      in.read(temp.theImageLength, 10);
-      theHeaderSize+=16;
-      temp.theImageSubheaderLength[6] = '\0';
-      temp.theImageLength[10] = '\0';
-
-      theNitfImageInfoRecords.push_back(temp);
-   }
-}
-
-void ossimNitfFileHeaderV2_0::readSymbolInfoRecords(std::istream &in)
-{
-   ossim_int32 numberOfSymbols = ossimString(theNumberOfSymbolInfoRecords).toInt32();
-   ossim_int32 index;
-
-   theNitfSymbolInfoRecords.clear();
-   
-   for(index=0; index < numberOfSymbols; index++)
-   {
-      ossimNitfSymbolInfoRecordV2_0 temp;
-
-      
-      in.read(temp.theSymbolSubheaderLength, 4);
-      in.read(temp.theSymbolLength, 6);
-      theHeaderSize+=10;
-      
-      temp.theSymbolSubheaderLength[4] = '\0';
-      temp.theSymbolLength[6] = '\0';
-      
-      theNitfSymbolInfoRecords.push_back(temp);
-   }
-}
-
-void ossimNitfFileHeaderV2_0::readLabelInfoRecords(std::istream &in)
-{
-   ossim_int32 numberOfLabels = ossimString(theNumberOfLabelInfoRecords).toInt32();
-   ossim_int32 index;
-
-   theNitfLabelInfoRecords.clear();
-   
-   for(index=0; index < numberOfLabels; index++)
-   {
-      ossimNitfLabelInfoRecordV2_0 temp;
-      
-      in.read(temp.theLabelSubheaderLength, 4);
-      in.read(temp.theLabelLength, 3);
-      theHeaderSize+=7;
-      temp.theLabelSubheaderLength[4] = '\0';
-      temp.theLabelLength[3]          = '\0';
-
-      theNitfLabelInfoRecords.push_back(temp);
-   }
-}
-
-void ossimNitfFileHeaderV2_0::readTextFileInfoRecords(std::istream &in)
-{
-   ossim_int32 numberOfTextFiles = ossimString(theNumberOfTextFileInfoRecords).toInt32();
-   ossim_int32 index;
-
-   theNitfTextInfoRecords.clear();
-   for(index=0; index < numberOfTextFiles; index++)
-   {
-      ossimNitfTextInfoRecordV2_0 temp;
-      
-      in.read(temp.theTextSubheaderLength, 4);
-      in.read(temp.theTextLength, 5);
-      theHeaderSize+=9;
-      
-      temp.theTextSubheaderLength[4] = '\0';
-      temp.theTextLength[5] = '\0';
-      
-      theNitfTextInfoRecords.push_back(temp);
-   }
-}
-
-void ossimNitfFileHeaderV2_0::readDataExtSegInfoRecords(std::istream &in)
-{
-   ossim_int32 numberOfDataExtSegs = ossimString(theNumberOfDataExtSegInfoRecords).toInt32();
-   ossim_int32 index;
-
-   theNitfDataExtSegInfoRecords.clear();
-   for(index=0; index < numberOfDataExtSegs; index++)
-   {
-      ossimNitfDataExtSegInfoRecordV2_0 temp;
-      
-      in.read(temp.theDataExtSegSubheaderLength, 4);
-      in.read(temp.theDataExtSegLength, 9);
-      theHeaderSize+=13;
-      
-      temp.theDataExtSegSubheaderLength[4] = '\0';
-      temp.theDataExtSegLength[9]          = '\0';
-
-      theNitfDataExtSegInfoRecords.push_back(temp);
-   }
-}
-
-void ossimNitfFileHeaderV2_0::readResExtSegInfoRecords(std::istream &in)
-{
-   ossim_int32 numberOfResExtSegs = ossimString(theNumberOfResExtSegInfoRecords).toInt32();
-   ossim_int32 index;
-
-   theNitfResExtSegInfoRecords.clear();
-   for(index=0; index < numberOfResExtSegs; index++)
-   {
-      ossimNitfResExtSegInfoRecordV2_0 temp;
-
-      in.read(temp.theResExtSegSubheaderLength, 4);
-      in.read(temp.theResExtSegLength, 7);
-      theHeaderSize+=11;
-      
-      temp.theResExtSegSubheaderLength[4] = '\0';
-      temp.theResExtSegLength[7]          = '\0';
-      
-      theNitfResExtSegInfoRecords.push_back(temp);      
-   }
-}
-
-void ossimNitfFileHeaderV2_0::setComplianceLevel(const ossimString& complianceLevel)
-{
-   ossimNitfCommon::setField(theComplexityLevel, complianceLevel, 2);
-}
-
-void ossimNitfFileHeaderV2_0::setCodeWords(const ossimString& codeWords)
-{
-   ossimNitfCommon::setField(theCodewords, codeWords, 40);
-}
-
-void ossimNitfFileHeaderV2_0::setControlAndHandling(const ossimString& controlAndHandling)
-{
-   ossimNitfCommon::setField(theControlAndHandling, controlAndHandling, 40);
-}
-
-void ossimNitfFileHeaderV2_0::setReleasingInstructions(const ossimString& releasingInstructions)
-{
-   ossimNitfCommon::setField(theReleasingInstructions, releasingInstructions, 40);
-}
-
-void ossimNitfFileHeaderV2_0::setClassificationAuthority(const ossimString& classAuth)
-{
-   ossimNitfCommon::setField(theClassificationAuthority, classAuth, 20);
-}
-
-void ossimNitfFileHeaderV2_0::setSecurityControlNumber(const ossimString& controlNo)
-{
-   ossimNitfCommon::setField(theSecurityControlNumber, controlNo, 20);
-}
-
-void ossimNitfFileHeaderV2_0::setOriginatorsName(const ossimString& originatorName)
-{
-   ossimNitfCommon::setField(theOriginatorsName, originatorName, 27);
-}
-
-void ossimNitfFileHeaderV2_0::setOriginatorsPhone(const ossimString& originatorPhone)
-{
-   ossimNitfCommon::setField(theOriginatorsPhone, originatorPhone, 18);
-}
-
-void ossimNitfFileHeaderV2_0::setSecurityDowngrade(const ossimString& securityDowngrade)
-{
-   ossimNitfCommon::setField(theSecurityDowngrade, securityDowngrade, 6);
-}
-
-void ossimNitfFileHeaderV2_0::setDowngradingEvent(const ossimString& downgradeEvent)
-{
-   ossimNitfCommon::setField(theDowngradingEvent, downgradeEvent, 40);
-}
-
-void ossimNitfFileHeaderV2_0::setFileLength(ossim_uint64 fileLength)
-{
-   ostringstream out;
-   
-   out << std::setw(12)
-   << std::setfill('0')
-   << std::setiosflags(ios::right)
-   << fileLength;
-   
-   memcpy(theFileLength, out.str().c_str(), 12);
-}
-
-void ossimNitfFileHeaderV2_0::setHeaderLength(ossim_uint64 headerLength)
-{
-   ostringstream out;
-   
-   out << std::setw(6)
-   << std::setfill('0')
-   << std::setiosflags(ios::right)
-   << headerLength;
-   
-   memcpy(theHeaderLength, out.str().c_str(), 6);
-}
-
-ossimString ossimNitfFileHeaderV2_0::getComplianceLevel()const
-{
-   return theComplexityLevel;
-}
-
-ossimString ossimNitfFileHeaderV2_0::getSecurityDowngrade()const
-{
-   return theSecurityDowngrade;
-}
-
-ossimString ossimNitfFileHeaderV2_0::getDowngradingEvent()const
-{
-   return theDowngradingEvent;
-}
-
-ossimString ossimNitfFileHeaderV2_0::getCodeWords()const
-{
-   return theCodewords;
-}
-
-ossimString ossimNitfFileHeaderV2_0::getControlAndHandling()const
-{
-   return theControlAndHandling;
-}
-
-ossimString ossimNitfFileHeaderV2_0::getReleasingInstructions()const
-{
-   return theReleasingInstructions;
-}
-
-ossimString ossimNitfFileHeaderV2_0::getClassificationAuthority()const
-{
-   return theClassificationAuthority;
-}
-
-ossimString ossimNitfFileHeaderV2_0::getSecurityControlNumber()const
-{
-   return theSecurityControlNumber;
-}
-
-ossimString ossimNitfFileHeaderV2_0::getOriginatorsName()const
-{
-   return theOriginatorsName;
-}
-
-ossimString ossimNitfFileHeaderV2_0::getOriginatorsPhone()const
-{
-   return theOriginatorsPhone;
-}
-
-void ossimNitfFileHeaderV2_0::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   const ossimString& name = property->getName();
-   if(name == CLEVEL_KW)
-   {
-      setComplianceLevel(property->valueToString());
-   }
-   else if(name == FSDWNG_KW)
-   {
-      setSecurityDowngrade(property->valueToString());
-   }
-   else if(name == FSDEVT_KW)
-   {
-      setDowngradingEvent(property->valueToString());
-   }
-   else if(name == ONAME_KW)
-   {
-      setOriginatorsName(property->valueToString());
-   }
-   else if(name == OPHONE_KW)
-   {
-      setOriginatorsPhone(property->valueToString());
-   }
-   else
-   {
-      ossimNitfFileHeaderV2_X::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimNitfFileHeaderV2_0::getProperty(const ossimString& name)const
-{
-   ossimProperty* property = 0;
-
-	
-   if(name == CLEVEL_KW)
-   {
-      property = new ossimStringProperty(name, ossimString(theComplexityLevel).trim());
-   }
-   else if(name == FSDWNG_KW)
-   {
-      property = new ossimStringProperty(name, ossimString(theSecurityDowngrade).trim());
-   }
-   else if(name == FSDEVT_KW)
-   {
-      property = new ossimStringProperty(name, ossimString(theDowngradingEvent).trim());
-   }
-   else if(name == ONAME_KW)
-   {
-      property = new ossimStringProperty(name, ossimString(theOriginatorsName).trim());
-   }
-   else if(name == OPHONE_KW)
-   {
-      property = new ossimStringProperty(name, ossimString(theOriginatorsPhone).trim());
-   }
-   else
-   {
-      return ossimNitfFileHeaderV2_X::getProperty(name);
-   }
-   return property;
-}
-
-void ossimNitfFileHeaderV2_0::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimNitfFileHeaderV2_X::getPropertyNames(propertyNames);
-}
-
diff --git a/src/ossim/support_data/ossimNitfFileHeaderV2_1.cpp b/src/ossim/support_data/ossimNitfFileHeaderV2_1.cpp
deleted file mode 100644
index b934093..0000000
--- a/src/ossim/support_data/ossimNitfFileHeaderV2_1.cpp
+++ /dev/null
@@ -1,1820 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfFileHeaderV2_1.cpp 20123 2011-10-11 17:55:44Z dburken $
-
-#include <iostream>
-#include <iomanip>
-#include <sstream>
-#include <cstring> // for memset
-
-#include <ossim/support_data/ossimNitfFileHeaderV2_1.h>
-#include <ossim/support_data/ossimNitfTextHeaderV2_0.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimColorProperty.h>
-#include <ossim/base/ossimDateProperty.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimNumericProperty.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/support_data/ossimNitfImageHeaderV2_1.h>
-#include <ossim/support_data/ossimNitfImageHeaderV2_X.h>
-#include <ossim/support_data/ossimNitfDataExtensionSegmentV2_0.h> // ??? drb
-
-
-RTTI_DEF1(ossimNitfFileHeaderV2_1,
-          "ossimNitfFileHeaderV2_1",
-          ossimNitfFileHeaderV2_X)
-
-const ossimString ossimNitfFileHeaderV2_1::FSCLSY_KW  = "FSCLSY";
-const ossimString ossimNitfFileHeaderV2_1::FSDCTP_KW  = "FSDCTP";
-const ossimString ossimNitfFileHeaderV2_1::FSDCDT_KW  = "FSDCDT";
-const ossimString ossimNitfFileHeaderV2_1::FSDCXM_KW  = "FSDCXM";
-const ossimString ossimNitfFileHeaderV2_1::FSDG_KW    = "FSDG";
-const ossimString ossimNitfFileHeaderV2_1::FSDGDT_KW  = "FSDGDT";
-const ossimString ossimNitfFileHeaderV2_1::FSCLTX_KW  = "FSCLTX";
-const ossimString ossimNitfFileHeaderV2_1::FSCATP_KW  = "FSCATP";
-const ossimString ossimNitfFileHeaderV2_1::FSCRSN_KW  = "FSCRSN";
-const ossimString ossimNitfFileHeaderV2_1::FSSRDT_KW  = "FSSRDT";
-const ossimString ossimNitfFileHeaderV2_1::FBKGC_KW   = "FBKGC";
-
-static const
-ossimTrace traceDebug(ossimString("ossimNitfFileHeaderV2_1:debug"));
-   
-std::ostream& operator <<(std::ostream& out,
-                     const ossimNitfImageInfoRecordV2_1 &data)
-{
-   return out << "theImageSubheaderLength:       "
-              << data.theImageSubheaderLength
-              << "\ntheImageLength:                "
-              << data.theImageLength
-              << std::endl;
-}
-
-ossim_uint32 ossimNitfImageInfoRecordV2_1::getHeaderLength()const
-{
-   return ossimString(theImageSubheaderLength).toUInt32();
-}
-
-ossim_uint64 ossimNitfImageInfoRecordV2_1::getImageLength()const
-{
-   return ossimString(theImageLength).toUInt64();
-}
-
-ossim_uint64 ossimNitfImageInfoRecordV2_1::getTotalLength()const
-{
-   return (getHeaderLength() + getImageLength());
-}
-
-std::ostream& operator <<(std::ostream& out,
-                     const ossimNitfGraphicInfoRecordV2_1 &data)
-{
-   return out << "theGraphicSubheaderLength:     "
-              << data.theGraphicSubheaderLength
-              << "\ntheGraphicLength:              "
-              << data.theGraphicLength
-              << std::endl;
-}
-
-std::ostream& operator <<(std::ostream& out,
-                     const ossimNitfTextFileInfoRecordV2_1 &data)
-{
-   return out << "theTextFileSubheaderLength:    "
-              << data.theTextFileSubheaderLength
-              << "\ntheTextFileLength:             "
-              << data.theTextFileLength
-              << std::endl;
-}
-
-void ossimNitfTextFileInfoRecordV2_1::setSubheaderLength(ossim_uint32 length)
-{
-   ostringstream out;
-   
-   out << std::setw(4)
-   << std::setfill('0')
-   << std::setiosflags(ios::right)
-   << length;
-   
-   memcpy(theTextFileSubheaderLength, out.str().c_str(), 4);
-   theTextFileSubheaderLength[4] = '\0';
-}
-
-void ossimNitfTextFileInfoRecordV2_1::setTextLength(ossim_uint64 length)
-{
-   ostringstream out;
-   
-   out << std::setw(5)
-   << std::setfill('0')
-   << std::setiosflags(ios::right)
-   << length;
-   
-   memcpy(theTextFileLength, out.str().c_str(), 5);
-   theTextFileLength[5] = '\0';
-}
-
-ossim_uint32 ossimNitfTextFileInfoRecordV2_1::getHeaderLength()const
-{
-   return ossimString(theTextFileSubheaderLength).toInt32();
-}
-
-ossim_uint32 ossimNitfTextFileInfoRecordV2_1::getTextLength()const
-{
-   return ossimString(theTextFileLength).toInt32();
-}
-
-ossim_uint32 ossimNitfTextFileInfoRecordV2_1::getTotalLength()const
-{
-   return (getHeaderLength() + getTextLength());
-}
-
-
-std::ostream& operator <<(std::ostream& out,
-                     const ossimNitfDataExtSegInfoRecordV2_1 &data)
-{
-   return out << "theDataExtSegSubheaderLength:  "
-              << data.theDataExtSegSubheaderLength
-              << "\ntheDataExtSegLength:           "
-              << data.theDataExtSegLength
-              << std::endl;
-}
-
-std::ostream& operator <<(std::ostream& out,
-                     const ossimNitfResExtSegInfoRecordV2_1 &data)
-{
-   return out << "theResExtSegSubheaderLength:   "
-              << data.theResExtSegSubheaderLength
-              << "\ntheResExtSegLength:            "
-              << data.theResExtSegLength
-              << std::endl;
-}
-
-
-void ossimNitfImageInfoRecordV2_1::setSubheaderLength(ossim_uint32 length)
-{
-   ostringstream out;
-
-   out << std::setw(6)
-       << std::setfill('0')
-       << std::setiosflags(ios::right)
-       << length;
-
-   memcpy(theImageSubheaderLength, out.str().c_str(), 6);
-   theImageSubheaderLength[6] = '\0';
-}
-
-void ossimNitfImageInfoRecordV2_1::setImageLength(ossim_uint64 length)
-{
-   ostringstream out;
-
-   out << std::setw(10)
-       << std::setfill('0')
-       << std::setiosflags(ios::right)
-       << length;
-   
-   memcpy(theImageLength, out.str().c_str(), 10);
-   theImageLength[10] = '\0';
-}
-
-// 
-
-ossimNitfFileHeaderV2_1::ossimNitfFileHeaderV2_1()
-   :ossimNitfFileHeaderV2_X()
-{
-   clearFields();
-}
-
-ossimNitfFileHeaderV2_1::~ossimNitfFileHeaderV2_1()
-{
-}
-
-void ossimNitfFileHeaderV2_1::parseStream(std::istream& in)
-{
-   clearFields();
-
-   // identification and origination group
-   in.read(theFileTypeVersion, 9);
-   theHeaderSize += 9;
-   in.read(theComplexityLevel, 2);
-   theHeaderSize += 2;
-   in.read(theSystemType, 4);
-   theHeaderSize += 4;
-   in.read(theOriginatingStationId, 10);
-   theHeaderSize += 10;
-   in.read(theDateTime, 14);
-   theHeaderSize += 14;
-   in.read(theFileTitle, 80);
-   theHeaderSize += 80;
-
-   // read security group
-   in.read(theSecurityClassification, 1);
-   theHeaderSize ++;
-   in.read(theSecurityClassificationSys, 2);
-   theHeaderSize += 2;
-   in.read(theCodewords, 11);
-   theHeaderSize += 11;
-   in.read(theControlAndHandling, 2);
-   theHeaderSize += 2;
-   in.read(theReleasingInstructions, 20);
-   theHeaderSize += 20;
-   in.read(theDeclassificationType, 2);
-   theHeaderSize += 2;
-   in.read(theDeclassificationDate, 8);
-   theHeaderSize += 8;
-   in.read(theDeclassificationExemption, 4);
-   theHeaderSize += 4;
-      
-   in.read(theDowngrade, 1);
-   theHeaderSize ++;
-   in.read(theDowngradingDate, 8);
-   theHeaderSize += 8;
-   in.read(theClassificationText, 43);
-   theHeaderSize += 43;
-   in.read(theClassificationAuthorityType, 1);
-   theHeaderSize ++;
-   in.read(theClassificationAuthority, 40);
-   theHeaderSize += 40;
-   in.read(theClassificationReason, 1);
-   theHeaderSize ++;
-   in.read(theSecuritySourceDate, 8);
-   theHeaderSize += 8;
-   in.read(theSecurityControlNumber, 15);
-   theHeaderSize += 15;
-   in.read(theCopyNumber, 5);
-   theHeaderSize += 5;
-   in.read(theNumberOfCopies, 5);
-   theHeaderSize += 5;
-   in.read(theEncryption, 1);
-   theHeaderSize ++;
-   in.read((char*)theFileBackgroundColor, 3);
-   theHeaderSize += 3;
-   in.read(theOriginatorsName, 24);
-   theHeaderSize += 24;
-   in.read(theOriginatorsPhone, 18);
-   theHeaderSize += 18;
-   in.read(theFileLength, 12);
-   theHeaderSize += 12;
-   in.read(theHeaderLength, 6);
-   theHeaderSize += 6;
-   
-   // image description group
-   in.read(theNumberOfImageInfoRecords, 3); 
-   theHeaderSize += 3;
-   readImageInfoRecords(in); 
-
-   // symbol description group
-   in.read(theNumberOfGraphicInfoRecords, 3); 
-   theHeaderSize += 3;
-   readGraphicInfoRecords(in);
-
-   in.read(theReservedForFutureUse1, 3);
-   theHeaderSize += 3;
-      
-   // text file information group
-   in.read(theNumberOfTextFileInfoRecords, 3); 
-   theHeaderSize += 3;
-   readTextFileInfoRecords(in);
-
-   // Data extension group
-   in.read(theNumberOfDataExtSegInfoRecords, 3); 
-   theHeaderSize += 3;
-   readDataExtSegInfoRecords(in);
-
-   // Reserve Extension Segment group
-   in.read(theNumberOfResExtSegInfoRecords, 3); 
-   theHeaderSize += 3;
-   readResExtSegInfoRecords(in);
-
-   in.read(theUserDefinedHeaderDataLength, 5);
-   theHeaderSize += 5;
-
-   // only get the header overflow if there even exists
-   // user defined data.
-   std::streampos userDefinedHeaderLength = ossimString(theUserDefinedHeaderDataLength).toInt32();
-   ossimNitfTagInformation         headerTag;
-   std::streampos start   = in.tellg();
-   std::streampos current = in.tellg();
-   if(userDefinedHeaderLength > 0)
-   {
-      in.read(theUserDefinedHeaderOverflow, 3);
-         
-      while((current - start) < userDefinedHeaderLength)
-      {
-         headerTag.parseStream(in);
-         theTagList.push_back(headerTag);
-         // in.ignore(headerTag.getTagLength());
-         // headerTag.clearFields();
-         current = in.tellg();
-      }
-      in.seekg(start + userDefinedHeaderLength);
-      theHeaderSize += (userDefinedHeaderLength);
-   }
-   in.read(theExtendedHeaderDataLength, 5);
-   theHeaderSize += 5;
-   std::streampos extendedHeaderDataLength = ossimString(theExtendedHeaderDataLength).toInt32();
-
-   start   = in.tellg();
-   current = in.tellg();
-   // for now let's just ignore it
-   if(extendedHeaderDataLength > 0)
-   {
-      in.read(theExtendedHeaderDataOverflow, 3);
-      while((current - start) < extendedHeaderDataLength)
-      {
-         headerTag.parseStream(in);
-         theTagList.push_back(headerTag);
-         
-         // in.ignore(headerTag.getTagLength());
-         // headerTag.clearFields();
-         current = in.tellg();
-      }
-      theHeaderSize += extendedHeaderDataLength;
-      in.seekg(start + extendedHeaderDataLength);
-   }
-
-   // this need to be re-thought
-   initializeAllOffsets();
-}
-
-void ossimNitfFileHeaderV2_1::writeStream(std::ostream &out)
-{
-   out.write(theFileTypeVersion, 9);
-   out.write(theComplexityLevel, 2);
-   out.write(theSystemType, 4);
-   out.write(theOriginatingStationId, 10);
-   out.write(theDateTime, 14);
-   out.write(theFileTitle, 80);
-   out.write(theSecurityClassification, 1);
-   out.write(theSecurityClassificationSys, 2);
-   out.write(theCodewords, 11);
-   out.write(theControlAndHandling, 2);
-   out.write(theReleasingInstructions, 20);
-   out.write(theDeclassificationType, 2);
-   out.write(theDeclassificationDate, 8);
-   out.write(theDeclassificationExemption, 4);
-   out.write(theDowngrade, 1);
-   out.write(theDowngradingDate, 8);
-   out.write(theClassificationText, 43);
-   out.write(theClassificationAuthorityType, 1);
-   out.write(theClassificationAuthority, 40);
-   out.write(theClassificationReason, 1);
-   out.write(theSecuritySourceDate, 8);
-   out.write(theSecurityControlNumber, 15);
-   out.write(theCopyNumber, 5);
-   out.write(theNumberOfCopies, 5);
-   out.write(theEncryption, 1);
-   out.write((char*)theFileBackgroundColor, 3);
-   out.write(theOriginatorsName, 24);
-   out.write(theOriginatorsPhone, 18);
-   out.write(theFileLength, 12);
-   out.write(theHeaderLength, 6);
-   ossim_uint32 idx = 0;
-   {
-      ostringstream outString;
-      
-      
-      outString << std::setw(3)
-                << std::setfill('0')
-                << std::setiosflags(ios::right)
-                << theNitfImageInfoRecords.size();
-      
-      out.write(outString.str().c_str(), 3);
-      
-      for(idx = 0; idx < theNitfImageInfoRecords.size(); ++idx)
-      {
-         out.write(theNitfImageInfoRecords[idx].theImageSubheaderLength, 6);
-         out.write(theNitfImageInfoRecords[idx].theImageLength, 10);
-      }
-   }
-   {
-      ostringstream outString;
-      
-      
-      outString << std::setw(3)
-                << std::setfill('0')
-                << std::setiosflags(ios::right)
-                << theNitfGraphicInfoRecords.size();
-      
-      out.write(outString.str().c_str(), 3);
-      for(idx = 0; idx < theNitfGraphicInfoRecords.size(); ++idx)
-      {
-         out.write(theNitfGraphicInfoRecords[idx].theGraphicSubheaderLength, 4);
-         out.write(theNitfGraphicInfoRecords[idx].theGraphicLength, 6);
-      }
-   }
-   out.write(theReservedForFutureUse1, 3);
-   {
-      ostringstream outString;
-      
-      
-      outString << std::setw(3)
-                << std::setfill('0')
-                << std::setiosflags(ios::right)
-                << theNitfTextFileInfoRecords.size();
-      
-      out.write(outString.str().c_str(), 3);
-      for(idx = 0; idx < theNitfTextFileInfoRecords.size(); ++idx)
-      {
-         out.write(theNitfTextFileInfoRecords[idx].theTextFileSubheaderLength, 4);
-         out.write(theNitfTextFileInfoRecords[idx].theTextFileLength, 5);
-      }
-   }
-   {
-      ostringstream outString;
-      
-      
-      outString << std::setw(3)
-                << std::setfill('0')
-                << std::setiosflags(ios::right)
-                << theNitfDataExtSegInfoRecords.size();
-      
-      out.write(outString.str().c_str(), 3);
-      for(idx = 0; idx < theNitfDataExtSegInfoRecords.size(); ++idx)
-      {
-         out.write(theNitfDataExtSegInfoRecords[idx].theDataExtSegSubheaderLength, 4);
-         out.write(theNitfDataExtSegInfoRecords[idx].theDataExtSegLength, 9);
-      }
-   }
-   {
-      ostringstream outString;
-      
-      
-      outString << std::setw(3)
-                << std::setfill('0')
-                << std::setiosflags(ios::right)
-                << theNitfResExtSegInfoRecords.size();
-
-      out.write(outString.str().c_str(), 3);
-      for(idx = 0; idx < theNitfResExtSegInfoRecords.size(); ++idx)
-      {
-         out.write(theNitfResExtSegInfoRecords[idx].theResExtSegSubheaderLength, 4);
-         out.write(theNitfResExtSegInfoRecords[idx].theResExtSegLength, 7);
-      }
-   }
-   out.write(theUserDefinedHeaderDataLength, 5);
-   if(ossimString(theUserDefinedHeaderDataLength).toInt32() > 0)
-   {
-      out.write(theUserDefinedHeaderOverflow, 3);
-   }
-
-   ossim_uint32 totalLength = getTotalTagLength();
-   if(totalLength <= 99999)
-   {
-      std::ostringstream tempOut;
-
-      tempOut << std::setw(5)
-              << std::setfill('0')
-	      << std::setiosflags(ios::right)
-              << totalLength;
-      
-      memcpy(theExtendedHeaderDataLength, tempOut.str().c_str(), 5);
-      
-      out.write(theExtendedHeaderDataLength, 5);
-
-      // for now we hard code the 000 for we do not currently support writing to the DES if the total tag length is
-      // larger than supported
-      //
-      memset(theExtendedHeaderDataOverflow, '0', 3);
-
-      if(totalLength > 0)
-      {
-         out.write(theExtendedHeaderDataOverflow, 3);
-         ossim_uint32 i = 0;
-         
-         for(i = 0; i < theTagList.size(); ++i)
-         {
-            theTagList[i].writeStream(out);
-         }
-      }
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimNitfFileHeaderV2_1::writeStream: Only support writing of total tag length < 99999" << std::endl;
-   }
-}
-
-std::ostream& ossimNitfFileHeaderV2_1::print(std::ostream& out,
-                                             const std::string& prefix) const
-{
-   out << setiosflags(ios::left)
-       << prefix << std::setw(24) << "FHDR:"
-       << theFileTypeVersion << "\n"
-       << prefix << std::setw(24) << "CLEVEL:"
-       << theComplexityLevel << "\n"
-       << prefix << std::setw(24) << "STYPE:"
-       << theSystemType << "\n"
-       << prefix << std::setw(24) << "OSTAID:"
-       << theOriginatingStationId << "\n"
-       << prefix << std::setw(24) << "FDT:"
-       << theDateTime << "\n"      
-       << prefix << std::setw(24) << "FTITLE:"
-       << theFileTitle << "\n"    
-       << prefix << std::setw(24) << "FSCLAS:"
-       << theSecurityClassification<< "\n"
-       << prefix << std::setw(24) << "FSCLSY:"
-       << theSecurityClassificationSys<< "\n"
-       << prefix << std::setw(24) << "FSCODE:"
-       << theCodewords << "\n"
-       << prefix << std::setw(24) << "FSCTLH:"
-       << theControlAndHandling << "\n"
-       << prefix << std::setw(24) << "FSREL:"
-       << theReleasingInstructions << "\n"
-       << prefix << std::setw(24) << "FSDCTP:"
-       << theDeclassificationType << "\n"
-       << prefix << std::setw(24) << "FSDCDT:"
-       << theDeclassificationDate << "\n"
-       << prefix << std::setw(24) << "FSDCXM:"
-       << theDeclassificationExemption << "\n"
-       << prefix << std::setw(24) << "FSDG:"
-       << theDowngrade << "\n"
-       << prefix << std::setw(24) << "FSDGDT:"
-       << theDowngradingDate << "\n"
-       << prefix << std::setw(24) << "FSCLTX:"
-       << theClassificationText << "\n"
-       << prefix << std::setw(24) << "FSCATP:"
-       << theClassificationAuthorityType << "\n"
-       << prefix << std::setw(24) << "FSCAUT:"
-       << theClassificationAuthority << "\n"
-       << prefix << std::setw(24) << "FSCRSN:"
-       << theClassificationReason << "\n"
-       << prefix << std::setw(24) << "FSSRDT:"
-       << theSecuritySourceDate << "\n"
-       << prefix << std::setw(24) << "FSCTLN:"
-       << theSecurityControlNumber << "\n"
-       << prefix << std::setw(24) << "FSCOP:"
-       << theCopyNumber << "\n"
-       << prefix << std::setw(24) << "FSCOPYS:"
-       << theNumberOfCopies << "\n"
-       << prefix << std::setw(24) << "ENCRYP:"
-       << theEncryption << "\n"
-       << prefix << std::setw(24) << "FBKGC[0]:"
-       << (int)theFileBackgroundColor[0] << "\n"
-       << prefix << std::setw(24) << "FBKGC[1]:"
-       << (int)theFileBackgroundColor[1] << "\n"
-       << prefix << std::setw(24) << "FBKGC[2]:"
-       << (int)theFileBackgroundColor[2] << "\n"
-       << prefix << std::setw(24) << "ONAME:"
-       << theOriginatorsName<< "\n"
-       << prefix << std::setw(24) << "OPHONE:"
-       << theOriginatorsPhone << "\n"
-       << prefix << std::setw(24) << "FL:"
-       << theFileLength  << "\n"
-       << prefix << std::setw(24) << "HL:"
-       << theHeaderLength << "\n"
-       << prefix << std::setw(24) << "NUMI:"
-       << theNumberOfImageInfoRecords << "\n";
-
-   ossim_uint32 index;
-
-   for (index = 0; index < theNitfImageInfoRecords.size(); ++index)
-   {
-      ostringstream os;
-      os << setw(3) << setfill('0') << (index+1) << ":";
-
-      ossimString tmpStr = "LISH";
-      tmpStr += os.str();
-      
-      out << prefix << std::setw(24) << tmpStr
-          << theNitfImageInfoRecords[index].theImageSubheaderLength << "\n";
-      tmpStr = "LI";
-      tmpStr += os.str();
-
-      out << prefix << std::setw(24) << tmpStr
-          << theNitfImageInfoRecords[index].theImageLength << "\n";
-   }
-
-   out << prefix << std::setw(24) << "NUMS:" << theNumberOfGraphicInfoRecords
-       << "\n";
- 
-   for (index = 0; index < theNitfGraphicInfoRecords.size(); ++index)
-   {
-      ostringstream os;
-      os << setw(3) << setfill('0') << (index+1) << ":";
-
-      ossimString tmpStr = "LSSH";
-      tmpStr += os.str();
-
-      out << prefix << std::setw(24) << tmpStr
-          << theNitfGraphicInfoRecords[index].theGraphicSubheaderLength
-          << "\n";
-
-      tmpStr = "LS";
-      tmpStr += os.str();
-
-      out << prefix << std::setw(24) << tmpStr 
-          << theNitfGraphicInfoRecords[index].theGraphicLength
-          << "\n";
-   }
-
-   out << prefix << std::setw(24) << "NUMX:" << theReservedForFutureUse1 << "\n"
-       << prefix << std::setw(24) << "NUMT:" 
-       << theNumberOfTextFileInfoRecords << "\n";
-   
-   for (index = 0; index < theNitfTextFileInfoRecords.size(); ++index)
-   {
-      ostringstream os;
-      os << setw(3) << setfill('0') << (index+1) << ":";
-
-      ossimString tmpStr = "LTSH";
-      tmpStr += os.str();
-      
-      out << prefix << std::setw(24) << tmpStr
-          << theNitfTextFileInfoRecords[index].theTextFileSubheaderLength
-          << "\n";
-
-      tmpStr = "LT";
-      tmpStr += os.str();
-
-      out << prefix << std::setw(24) << tmpStr
-          << theNitfTextFileInfoRecords[index].theTextFileLength << "\n";
-   }
-
-   out << prefix << std::setw(24) << "NUMDES:" << theNumberOfDataExtSegInfoRecords
-       << "\n";
-
-   for (index = 0; index < theNitfDataExtSegInfoRecords.size(); ++index)
-   {
-      ostringstream os;
-      os << setw(3) << setfill('0') << (index+1) << ":";
-
-      ossimString tmpStr = "LDSH";
-      tmpStr += os.str();
-      
-      out << prefix << std::setw(24) << tmpStr
-          << theNitfDataExtSegInfoRecords[index].theDataExtSegSubheaderLength
-          << "\n";
-
-      tmpStr = "LD";
-      tmpStr += os.str();
-
-      out << prefix << std::setw(24) << tmpStr
-          << theNitfDataExtSegInfoRecords[index].theDataExtSegLength
-          << "\n";
-   }
-
-   out << prefix << std::setw(24) << "NUMRES:"
-       << theNumberOfResExtSegInfoRecords << "\n";
-   
-   for (index = 0; index < theNitfResExtSegInfoRecords.size(); ++index)
-   {
-      ostringstream os;
-      os << setw(3) << setfill('0') << (index+1) << ":";
-
-      ossimString tmpStr = "LRESSH";
-      tmpStr += os.str();
-      
-      out << prefix << std::setw(24) << tmpStr
-          << theNitfResExtSegInfoRecords[index].theResExtSegSubheaderLength
-          << "\n";
-
-      tmpStr = "LRE";
-      tmpStr += os.str();
-
-      out << prefix << std::setw(24) << tmpStr
-          << theNitfResExtSegInfoRecords[index].theResExtSegLength
-          << "\n";
-   }
-   
-   out << prefix << std::setw(24) << "UDHDL:"
-       << theUserDefinedHeaderDataLength
-       << "\n"
-       << prefix << std::setw(24) << "UDHOFL:"
-       << theUserDefinedHeaderOverflow
-       << "\n"
-       << prefix << std::setw(24) << "XHDL:"
-       << theExtendedHeaderDataLength
-       << "\n"
-       << prefix << std::setw(24) << "XHDLOFL:"
-       << theExtendedHeaderDataOverflow
-       << "\n";
-
-   return ossimNitfFileHeader::print(out, prefix);
-}
-
-ossimNitfImageHeader* ossimNitfFileHeaderV2_1::allocateImageHeader()const
-{
-   return new ossimNitfImageHeaderV2_1;
-}
-
-ossimNitfTextHeader *ossimNitfFileHeaderV2_1::allocateTextHeader()const
-{
-   return new ossimNitfTextHeaderV2_0;
-}
-
-ossimNitfDataExtensionSegment* ossimNitfFileHeaderV2_1::allocateDataExtSegment()const
-{
-   return new ossimNitfDataExtensionSegmentV2_0;
-}
-
-bool ossimNitfFileHeaderV2_1::isEncrypted()const
-{
-   return (theEncryption[0]=='1');
-}
-
-ossim_int32 ossimNitfFileHeaderV2_1::getNumberOfImages()const
-{
-   return (ossim_int32)theNitfImageInfoRecords.size();
-}
-
-ossim_int32 ossimNitfFileHeaderV2_1::getNumberOfTextSegments()const
-{
-   return static_cast<ossim_int32>(theNitfTextFileInfoRecords.size());
-}
-
-ossim_int32 ossimNitfFileHeaderV2_1::getHeaderSize()const
-{
-   return theHeaderSize;
-}
-
-ossim_int64 ossimNitfFileHeaderV2_1::getFileSize()const
-{
-   ossimString temp = theFileLength;
-
-   if(temp == "999999999999")
-   {
-      return -1;
-   }
-   else
-   {
-      return temp.toInt64();
-   }
-}
-
-const char* ossimNitfFileHeaderV2_1::getVersion()const
-{
-   return &theFileTypeVersion[4];
-}
-
-
-void ossimNitfFileHeaderV2_1::clearFields()
-{
-   memcpy(theFileTypeVersion, "NITF02.10", 9);
-   memcpy(theComplexityLevel, "01", 2);
-   memcpy(theSystemType, "BF01", 4);
-   memset(theOriginatingStationId, ' ', 10);
-   memset(theDateTime, ' ', 14);
-   memset(theFileTitle, ' ', 80);
-   memset(theSecurityClassification, ' ', 1);
-   memset(theSecurityClassificationSys, ' ', 2);
-   memset(theCodewords, ' ', 11);
-   memset(theControlAndHandling, ' ', 2);
-   memset(theReleasingInstructions, ' ', 20);
-   memset(theDeclassificationType, ' ', 2);
-   memset(theDeclassificationDate, ' ', 8);
-   memset(theDeclassificationExemption, ' ', 4);
-   memset(theDowngrade, ' ', 1);
-   memset(theDowngradingDate, ' ', 8);
-   memset(theClassificationText, ' ', 43);
-   memset(theClassificationAuthorityType, ' ', 1);
-   memset(theClassificationAuthority, ' ', 40);
-   memset(theClassificationReason, ' ', 1);
-   memset(theSecuritySourceDate, ' ', 8);
-   memset(theSecurityControlNumber, ' ', 15);
-   memset(theCopyNumber, '0', 5);
-   memset(theNumberOfCopies, '0', 5);
-   memset(theEncryption, ' ', 1);
-   memset(theFileBackgroundColor, 0, 3);
-   memset(theOriginatorsName, ' ', 24);
-   memset(theOriginatorsPhone, ' ', 18);
-   memset(theFileLength, ' ', 12);
-   memset(theHeaderLength, ' ', 6);
-   memset(theNumberOfImageInfoRecords, '0', 3);
-   memset(theNumberOfGraphicInfoRecords, '0', 3);
-   memset(theReservedForFutureUse1, '0', 3);
-   memset(theNumberOfTextFileInfoRecords, '0', 3);
-   memset(theNumberOfDataExtSegInfoRecords, '0', 3);
-   memset(theNumberOfResExtSegInfoRecords, '0', 3);
-   memset(theUserDefinedHeaderDataLength, '0', 5);
-   memset(theUserDefinedHeaderOverflow, '0',3);
-   memset(theExtendedHeaderDataLength, '0',5);
-   memset(theExtendedHeaderDataOverflow, '0', 3);
-   theFileTypeVersion[9] = '\0';
-   theComplexityLevel[2] = '\0';
-   theSystemType[4] = '\0';
-   theOriginatingStationId[10] = '\0';
-   theDateTime[14] = '\0';
-   theFileTitle[80] = '\0';
-   theSecurityClassification[1] = '\0';
-   theSecurityClassificationSys[2] = '\0';
-   theCodewords[11] = '\0';
-   theControlAndHandling[2] = '\0';
-   theReleasingInstructions[20] = '\0';
-   theDeclassificationType[2] = '\0';
-   theDeclassificationDate[8] = '\0';
-   theDeclassificationExemption[4] = '\0';
-   theDowngrade[1] = '\0';
-   theDowngradingDate[8] = '\0';
-   theClassificationText[43] = '\0';
-   theClassificationAuthorityType[1] = '\0';
-   theClassificationAuthority[40] = '\0';
-   theClassificationReason[1] = '\0';
-   theSecuritySourceDate[8] = '\0';
-   theSecurityControlNumber[15] = '\0';
-   theCopyNumber[5] = '\0';
-   theNumberOfCopies[5] = '\0';
-   theEncryption[1] = '\0';
-   theOriginatorsName[24] = '\0';
-   theOriginatorsPhone[18] = '\0';
-   theFileLength[12] = '\0';
-   theHeaderLength[6] = '\0';
-   theNumberOfImageInfoRecords[3] = '\0';
-   theNumberOfGraphicInfoRecords[3] = '\0';
-   theReservedForFutureUse1[3] = '\0';
-   theNumberOfTextFileInfoRecords[3] = '\0';
-   theNumberOfDataExtSegInfoRecords[3] = '\0';
-   theNumberOfResExtSegInfoRecords[3] = '\0';
-   theUserDefinedHeaderDataLength[5] = '\0';
-   theUserDefinedHeaderOverflow[3] = '\0';
-   theExtendedHeaderDataLength[5] = '\0';
-   theExtendedHeaderDataOverflow[3] = '\0';
-
-   theHeaderSize = 0;
-}
-
-void ossimNitfFileHeaderV2_1::readImageInfoRecords(std::istream &in)
-{
-   ossim_int32 numberOfImages = ossimString(theNumberOfImageInfoRecords).toInt32();
-   ossim_int32 index;
-
-   theNitfImageInfoRecords.clear();
-   for(index=0; index < numberOfImages; index++)
-   {
-      ossimNitfImageInfoRecordV2_1 temp;
-
-      
-      in.read(temp.theImageSubheaderLength, 6);
-      in.read(temp.theImageLength, 10);
-      theHeaderSize += 16;
-
-      temp.theImageSubheaderLength[6] = '\0';
-      temp.theImageLength[10] = '\0';
-      
-      theNitfImageInfoRecords.push_back(temp);
-   }
-}
-
-void ossimNitfFileHeaderV2_1::readGraphicInfoRecords(std::istream &in)
-{
-   ossim_int32 numberOfGraphics = ossimString(theNumberOfGraphicInfoRecords).toInt32();
-   ossim_int32 index;
-
-   theNitfGraphicInfoRecords.clear();
-   
-   for(index=0; index < numberOfGraphics; index++)
-   {
-      ossimNitfGraphicInfoRecordV2_1 temp;
-
-      
-      in.read(temp.theGraphicSubheaderLength, 4);
-      in.read(temp.theGraphicLength, 6);
-      theHeaderSize += 10;
-
-      temp.theGraphicSubheaderLength[4] = '\0';
-      temp.theGraphicLength[6] = '\0';
-      
-      theNitfGraphicInfoRecords.push_back(temp);
-   }
-}
-
-void ossimNitfFileHeaderV2_1::readTextFileInfoRecords(std::istream &in)
-{
-   ossim_int32 numberOfTextFiles = ossimString(theNumberOfTextFileInfoRecords).toInt32();
-   ossim_int32 index;
-
-   theNitfTextFileInfoRecords.clear();
-   for(index=0; index < numberOfTextFiles; index++)
-   {
-      ossimNitfTextFileInfoRecordV2_1 temp;
-      
-      in.read(temp.theTextFileSubheaderLength, 4);
-      in.read(temp.theTextFileLength, 5);
-      theHeaderSize += 9;
-      
-      temp.theTextFileSubheaderLength[4] = '\0';
-      temp.theTextFileLength[5] = '\0';
-      
-      theNitfTextFileInfoRecords.push_back(temp);
-   }
-}
-
-void ossimNitfFileHeaderV2_1::readDataExtSegInfoRecords(std::istream &in)
-{
-   ossim_int32 numberOfDataExtSegs = ossimString(theNumberOfDataExtSegInfoRecords).toInt32();
-   ossim_int32 index;
-
-   theNitfDataExtSegInfoRecords.clear();
-   for(index=0; index < numberOfDataExtSegs; index++)
-   {
-      ossimNitfDataExtSegInfoRecordV2_1 temp;
-      
-      in.read(temp.theDataExtSegSubheaderLength, 4);
-      in.read(temp.theDataExtSegLength, 9);
-      theHeaderSize += 13;
-
-      temp.theDataExtSegSubheaderLength[4] = '\0';
-      temp.theDataExtSegLength[9]          = '\0';
-
-      theNitfDataExtSegInfoRecords.push_back(temp);
-   }
-}
-
-void ossimNitfFileHeaderV2_1::readResExtSegInfoRecords(std::istream &in)
-{
-   ossim_int32 numberOfResExtSegs = ossimString(theNumberOfResExtSegInfoRecords).toInt32();
-   ossim_int32 index;
-
-   theNitfResExtSegInfoRecords.clear();
-   for(index=0; index < numberOfResExtSegs; index++)
-   {
-      ossimNitfResExtSegInfoRecordV2_1 temp;
-
-      in.read(temp.theResExtSegSubheaderLength, 4);
-      in.read(temp.theResExtSegLength, 7);
-      theHeaderSize += 11;
-
-      temp.theResExtSegSubheaderLength[4] = '\0';
-      temp.theResExtSegLength[7]          = '\0';
-      
-      theNitfResExtSegInfoRecords.push_back(temp);      
-   }
-}
-
-ossim_int32 ossimNitfFileHeaderV2_1::getNumberOfLabels()const
-{
-   return 0;
-}
-
-ossim_int32 ossimNitfFileHeaderV2_1::getNumberOfSymbols()const
-{
-   return 0;
-}
-
-ossim_int32 ossimNitfFileHeaderV2_1::getNumberOfGraphics()const
-{
-   return 0;
-}
-
-ossim_int32 ossimNitfFileHeaderV2_1::getNumberOfDataExtSegments()const
-{
-   return 0;
-}
-
-const char* ossimNitfFileHeaderV2_1::getDateTime()const
-{
-   return theDateTime;
-}
-
-ossimDrect ossimNitfFileHeaderV2_1::getImageRect()const
-{
-   return theImageRect;
-}
-
-void ossimNitfFileHeaderV2_1::addImageInfoRecord(const ossimNitfImageInfoRecordV2_1& recordInfo)
-{
-   theNitfImageInfoRecords.push_back(recordInfo);
-
-   setNumberOfImageInfoRecords(theNitfImageInfoRecords.size());
-}
-
-void ossimNitfFileHeaderV2_1::addTextInfoRecord(const ossimNitfTextFileInfoRecordV2_1& recordInfo)
-{
-   theNitfTextFileInfoRecords.push_back(recordInfo);
-
-   setNumberOfTextInfoRecords(theNitfTextFileInfoRecords.size());
-}
-
-void ossimNitfFileHeaderV2_1::addDataExtSegInfoRecord(const ossimNitfDataExtSegInfoRecordV2_1& recordInfo)
-{
-   theNitfDataExtSegInfoRecords.push_back(recordInfo);
-
-   setNumberOfDataExtSegInfoRecords(theNitfDataExtSegInfoRecords.size());
-}
-
-
-void ossimNitfFileHeaderV2_1::replaceImageInfoRecord(int i, const ossimNitfImageInfoRecordV2_1& recordInfo)
-{
-   if ( i < static_cast<int>(theNitfImageInfoRecords.size()) )
-   {
-      theNitfImageInfoRecords[i] = recordInfo;
-   }
-}
-
-ossimNitfSymbolHeader *ossimNitfFileHeaderV2_1::allocateSymbolHeader()const
-{
-   return 0;
-}
-
-ossimNitfLabelHeader *ossimNitfFileHeaderV2_1::allocateLabelHeader()const
-{
-   return 0;
-}
-
-void ossimNitfFileHeaderV2_1::initializeAllOffsets()
-{
-   // this will be a running tally 
-   ossim_uint64 tally = theHeaderSize;
-   ossim_uint64 idx = 0;
-
-   // clear out all offset inforamtion and begin populating them
-   theImageOffsetList.clear();
-
-   for(idx = 0; idx < theNitfImageInfoRecords.size(); ++idx)
-   {
-      theImageOffsetList.push_back(ossimNitfImageOffsetInformation(tally,
-                                                                   tally + (ossim_uint64)theNitfImageInfoRecords[idx].getHeaderLength()));
-      tally += theNitfImageInfoRecords[idx].getTotalLength();
-
-   }
-}
-
-ossimNitfImageHeader*
-ossimNitfFileHeaderV2_1::getNewImageHeader(ossim_uint32 imageNumber,
-                                           std::istream& in)const
-{
-   ossimNitfImageHeader *result = 0;
-   
-   if( (getNumberOfImages() > 0) && (imageNumber < theImageOffsetList.size()) )
-   {
-      result = allocateImageHeader();
-      in.seekg(theImageOffsetList[imageNumber].theImageHeaderOffset, ios::beg);
-      result->parseStream(in);
-   }
-   else
-   {
-#if 0
-      ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimNitfFileHeaderV2_1::getNewImageHeader: "
-                                          << "\nNo images in file or image number (" << imageNumber
-                                          << ") is out of range!\n";
-#endif
-   }
-   
-   return result;
-}
-
-ossimNitfSymbolHeader*
-ossimNitfFileHeaderV2_1::getNewSymbolHeader(ossim_uint32 /* symbolNumber */,
-                                            std::istream& /* in */)const
-{
-   // Currently not implemented...
-   
-   ossimNitfSymbolHeader *result = 0;
-
-
-   
-   return result;
-}
-
-ossimNitfLabelHeader*
-ossimNitfFileHeaderV2_1::getNewLabelHeader(ossim_uint32 /* labelNumber */,
-                                           std::istream& /* in */)const
-{
-   // Currently not implemented...
-   ossimNitfLabelHeader *result = 0;
-   
-   return result;
-}
-
-ossimNitfTextHeader*
-ossimNitfFileHeaderV2_1::getNewTextHeader(ossim_uint32 /* textNumber */,
-                                          std::istream& /* in */)const
-{
-   // Currently not implemented...
-   ossimNitfTextHeader *result = 0;
-   
-   return result;
-}
-
-ossimNitfDataExtensionSegment*
-ossimNitfFileHeaderV2_1::getNewDataExtensionSegment(
-   ossim_uint32 /* dataExtNumber */, std::istream& /* in */)const
-{
-   // Currently not implemented...
-   ossimNitfDataExtensionSegment *result = 0;
-   
-   return result;
-}
-
-ossimString ossimNitfFileHeaderV2_1::getSecurityClassificationSys()const
-{
-   return theSecurityClassificationSys;
-}
-
-ossimString ossimNitfFileHeaderV2_1::getCodeWords()const
-{
-   return theCodewords;
-}
-
-ossimString ossimNitfFileHeaderV2_1::getControlAndHandling()const
-{
-   return theControlAndHandling;
-}
-
-ossimString ossimNitfFileHeaderV2_1::getReleasingInstructions()const
-{
-   return theReleasingInstructions;
-}
-
-ossimString ossimNitfFileHeaderV2_1::getDeclassificationType()const
-{
-   return theDeclassificationType;
-}
-
-ossimString ossimNitfFileHeaderV2_1::getDeclassificationDate()const
-{
-   return theDeclassificationDate;
-}
-
-ossimString ossimNitfFileHeaderV2_1::getDeclassificationExemption()const
-{
-   return theDeclassificationExemption;
-}
-
-ossimString ossimNitfFileHeaderV2_1::getDowngrade()const
-{
-   return theDowngrade;
-}
-
-ossimString ossimNitfFileHeaderV2_1::getDowngradingDate()const
-{
-   return theDowngradingDate;
-}
-
-ossimString ossimNitfFileHeaderV2_1::getClassificationText()const
-{
-   return theClassificationText;
-}
-
-ossimString ossimNitfFileHeaderV2_1::getClassificationAuthorityType()const
-{
-   return theClassificationAuthorityType;
-}
-
-ossimString ossimNitfFileHeaderV2_1::getClassificationAuthority()const
-{
-   return theClassificationAuthority;
-}
-
-ossimString ossimNitfFileHeaderV2_1::getClassificationReason()const
-{
-   return theClassificationReason;
-}
-
-ossimString ossimNitfFileHeaderV2_1::getSecuritySourceDate()const
-{
-   return theSecuritySourceDate;
-}
-
-ossimString ossimNitfFileHeaderV2_1::getSecurityControlNumber()const
-{
-   return theSecurityControlNumber;
-}
-
-void ossimNitfFileHeaderV2_1::getBackgroundColor(ossim_uint8& r,
-                                                 ossim_uint8& g,
-                                                 ossim_uint8& b)const
-{
-   r = theFileBackgroundColor[0];
-   g = theFileBackgroundColor[1];
-   b = theFileBackgroundColor[2];
-}
-
-ossimString ossimNitfFileHeaderV2_1::getOriginatorsName()const
-{
-   return theOriginatorsName;
-}
-
-ossimString ossimNitfFileHeaderV2_1::getOriginatorsPhone()const
-{
-   return theOriginatorsPhone;
-}
-
-void ossimNitfFileHeaderV2_1::setFileLength(ossim_uint64 fileLength)
-{
-   ostringstream out;
-
-   out << std::setw(12)
-       << std::setfill('0')
-       << std::setiosflags(ios::right)
-       << fileLength;
-
-   memcpy(theFileLength, out.str().c_str(), 12);
-}
-
-
-
-void ossimNitfFileHeaderV2_1::setNumberOfGraphicInfoRecords(ossim_uint64 num)
-	{
-		if (num < 1000)
-   {
-      ostringstream out;
-      
-      out << std::setw(3)
-          << std::setfill('0')
-          << std::setiosflags(ios::right)
-          << num;
-      
-      memcpy(theNumberOfGraphicInfoRecords, out.str().c_str(), 3);
-   }
-   else
-   {
-      std::string s = "ossimNitfFileHeaderV2_1::setNumberOfGraphicInfoRecords:";
-      s += " ERROR\nExceeded max number of 999!";
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
-      }
-      throw std::out_of_range(s);
-   }
-		
-	}
-
-void ossimNitfFileHeaderV2_1::setNumberOfDataExtSegInfoRecords(ossim_uint64 num)
-{
-   if (num < 1000)
-   {
-      ostringstream out;
-      
-      out << std::setw(3)
-          << std::setfill('0')
-          << std::setiosflags(ios::right)
-          << num;
-      
-      memcpy(theNumberOfDataExtSegInfoRecords, out.str().c_str(), 3);
-   }
-   else
-   {
-      std::string s = "ossimNitfFileHeaderV2_1::setNumberOfDataExtSegInfoRecords:";
-      s += " ERROR\nExceeded max number of 999!";
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
-      }
-      throw std::out_of_range(s);
-   }
-}
-
-
-void ossimNitfFileHeaderV2_1::setNumberOfTextInfoRecords(ossim_uint64 num)
-{
-   if (num < 1000)
-   {
-      ostringstream out;
-      
-      out << std::setw(3)
-          << std::setfill('0')
-          << std::setiosflags(ios::right)
-          << num;
-      
-      memcpy(theNumberOfTextFileInfoRecords, out.str().c_str(), 3);
-   }
-   else
-   {
-      std::string s = "ossimNitfFileHeaderV2_1::setNumberOfTextRecords:";
-      s += " ERROR\nExceeded max number of 999!";
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
-      }
-      throw std::out_of_range(s);
-   }
-}
-
-
-void ossimNitfFileHeaderV2_1::setNumberOfImageInfoRecords(ossim_uint64 num)
-{
-   if (num < 1000)
-   {
-      ostringstream out;
-      
-      out << std::setw(3)
-          << std::setfill('0')
-          << std::setiosflags(ios::right)
-          << num;
-      
-      memcpy(theNumberOfImageInfoRecords, out.str().c_str(), 3);
-   }
-   else
-   {
-      std::string s = "ossimNitfFileHeaderV2_1::setNumberOfImageInfoRecords:";
-      s += " ERROR\nExceeded max image info number of 999!";
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << s << std::endl;
-      }
-      throw std::out_of_range(s);
-   }
-}
-
-void ossimNitfFileHeaderV2_1::setHeaderLength(ossim_uint64 headerLength)
-{
-   ostringstream out;
-
-   out << std::setw(6)
-       << std::setfill('0')
-       << std::setiosflags(ios::right)
-       << headerLength;
-
-   memcpy(theHeaderLength, out.str().c_str(), 6);
-}
-
-void ossimNitfFileHeaderV2_1::setSecurityClassificationSys(const ossimString& value)
-{
-   std::ostringstream out;
-   
-   out << std::setw(2)
-       << std::setfill(' ')
-       << std::setiosflags(ios::left)
-       << ossimString(value).trim();
-
-   memcpy(theSecurityClassificationSys, out.str().c_str(), 1);
-}
-
-void ossimNitfFileHeaderV2_1::setCodeWords(const ossimString& codeWords)
-{
-   std::ostringstream out;
-   
-   out << std::setw(11)
-       << std::setfill(' ')
-       << std::setiosflags(ios::left)
-       << ossimString(codeWords).trim();
-
-   memcpy(theCodewords, out.str().c_str(), 1);
-}
-
-void ossimNitfFileHeaderV2_1::setControlAndHandling(const ossimString& controlAndHandling)
-{
-   std::ostringstream out;
-   
-   out << std::setw(2)
-       << std::setfill(' ')
-       << std::setiosflags(ios::left)
-       << ossimString(controlAndHandling).trim();
-
-   memcpy(theControlAndHandling, out.str().c_str(), 1);
-}
-
-void ossimNitfFileHeaderV2_1::setReleasingInstructions(const ossimString& releasingInstructions)
-{
-   std::ostringstream out;
-   
-   out << std::setw(2)
-       << std::setfill(' ')
-       << std::setiosflags(ios::left)
-       << ossimString(releasingInstructions).trim();
-
-   memcpy(theReleasingInstructions, out.str().c_str(), 1);
-}
-
-void ossimNitfFileHeaderV2_1::setDeclassificationType(const ossimString& declassType)
-{
-   std::ostringstream out;
-   
-   out << std::setw(2)
-       << std::setfill(' ')
-       << std::setiosflags(ios::left)
-       << declassType.trim();
-
-   memcpy(theDeclassificationType, out.str().c_str(), 1);
-}
-
-void ossimNitfFileHeaderV2_1::setDeclassificationDate(const ossimLocalTm& d)
-{
-   memcpy(theDeclassificationDate, formatDate(getVersion(), d).c_str(), 8);
-}
-
-void ossimNitfFileHeaderV2_1::setDeclassificationDate(const ossimString& d)
-{
-   if(d.size() >=8)
-   {
-      memcpy(theDeclassificationDate, d.c_str(), 8);
-   }
-}
-
-void ossimNitfFileHeaderV2_1::setDeclassificationExemption(const ossimString& exemption)
-{
-   std::ostringstream out;
-   
-   out << std::setw(4)
-       << std::setfill(' ')
-       << std::setiosflags(ios::left)
-       << exemption.trim();
-
-   memcpy(theDeclassificationExemption, out.str().c_str(), 4);
-}
-
-void ossimNitfFileHeaderV2_1::setDowngrade(const ossimString& downgrade)
-{
-   std::ostringstream out;
-   
-   out << std::setw(1)
-       << std::setfill(' ')
-       << std::setiosflags(ios::left)
-       << downgrade.trim();
-
-   memcpy(theDowngrade, out.str().c_str(), 1);
-}
-
-void ossimNitfFileHeaderV2_1::setDowngradingDate(const ossimLocalTm& d)
-{
-   memcpy(theDowngradingDate, formatDate(getVersion(), d).c_str(), 8);
-}
-
-void ossimNitfFileHeaderV2_1::setDowngradingDate(const ossimString& d)
-{
-   if(d.size() >=8)
-   {
-      memcpy(theDowngradingDate, d.c_str(), 8);
-   }
-}
-
-void ossimNitfFileHeaderV2_1::setClassificationText(const ossimString& classificationText)
-{
-   std::ostringstream out;
-   
-   out << std::setw(43)
-       << std::setfill(' ')
-       << std::setiosflags(ios::left)
-       << classificationText.trim();
-
-   memcpy(theClassificationText, out.str().c_str(), 43);
-}
-
-void ossimNitfFileHeaderV2_1::setClassificationAuthorityType(const ossimString& authorityType)
-{
-   std::ostringstream out;
-   
-   out << std::setw(1)
-       << std::setfill(' ')
-       << std::setiosflags(ios::left)
-       << authorityType.trim();
-
-   memcpy(theClassificationAuthorityType, out.str().c_str(), 1);
-}
-
-void ossimNitfFileHeaderV2_1::setClassificationAuthority(const ossimString& authority)
-{
-   std::ostringstream out;
-   
-   out << std::setw(40)
-       << std::setfill(' ')
-       << std::setiosflags(ios::left)
-       << authority.trim();
-
-   memcpy(theClassificationAuthority, out.str().c_str(), 40);
-}
-
-void ossimNitfFileHeaderV2_1::setClassificationReason(const ossimString& reason)
-{
-   std::ostringstream out;
-   
-   out << std::setw(1)
-       << std::setfill(' ')
-       << std::setiosflags(ios::left)
-       << reason.trim();
-
-   memcpy(theClassificationReason, out.str().c_str(), 1);
-}
-
-void ossimNitfFileHeaderV2_1::setSecuritySourceDate(const ossimLocalTm& d)
-{
-   memcpy(theSecuritySourceDate, formatDate(getVersion(), d).c_str(), 8);
-}
-
-void ossimNitfFileHeaderV2_1::setSecuritySourceDate(const ossimString& d)
-{
-   if(d.size() >=8)
-   {
-      memcpy(theSecuritySourceDate, d.c_str(), 8);
-   }
-}
-
-void ossimNitfFileHeaderV2_1::setSecurityControlNumber(const ossimString& number)
-{
-   std::ostringstream out;
-   
-   out << std::setw(15)
-       << std::setfill(' ')
-       << std::setiosflags(ios::left)
-       << number.trim();
-
-   memcpy(theSecurityControlNumber, out.str().c_str(), 15);
-}
-
-void ossimNitfFileHeaderV2_1::setFileBackgroundColor(ossim_uint8 r,
-                                                     ossim_uint8 g,
-                                                     ossim_uint8 b)
-{
-   theFileBackgroundColor[0] = r;
-   theFileBackgroundColor[1] = g;
-   theFileBackgroundColor[2] = b;
-}
-
-void ossimNitfFileHeaderV2_1::setOriginatorsName(const ossimString& name)
-{
-   std::ostringstream out;
-   
-   out << std::setw(24)
-       << std::setfill(' ')
-       << std::setiosflags(ios::left)
-       << name.trim();
-   
-   memcpy(theOriginatorsName, out.str().c_str(), 24);
-}
-
-void ossimNitfFileHeaderV2_1::setOriginatorsPhone(const ossimString& phone)
-{
-   std::ostringstream out;
-   
-   out << std::setw(18)
-       << std::setfill(' ')
-       << std::setiosflags(ios::left)
-       << phone.trim();
-   
-   memcpy(theOriginatorsPhone, out.str().c_str(), 18);
-}
-
-bool ossimNitfFileHeaderV2_1::loadState(const ossimKeywordlist& kwl,
-                                        const char* prefix)
-{
-   // Note: Currently not looking up all fieds only ones that make sense.
-   
-   const char* lookup;
-
-   lookup = kwl.find( prefix, FSCLSY_KW);
-   if ( lookup )
-   {
-      setSecurityClassificationSys( ossimString(lookup) );
-   }  
-   lookup = kwl.find( prefix, FSDCTP_KW);
-   if ( lookup )
-   {
-      setDeclassificationType( ossimString(lookup) );
-   }  
-   lookup = kwl.find( prefix, FSDCDT_KW);
-   if ( lookup )
-   {
-      setDeclassificationDate( ossimString(lookup) );
-   }  
-   lookup = kwl.find( prefix, FSDCXM_KW);
-   if ( lookup )
-   {
-      setDeclassificationExemption( ossimString(lookup) );
-   }  
-   lookup = kwl.find( prefix, FSDG_KW);
-   if ( lookup )
-   {
-      setDowngrade( ossimString(lookup) );
-   }  
-   lookup = kwl.find( prefix, FSDGDT_KW);
-   if ( lookup )
-   {
-      setDowngradingDate( ossimString(lookup) );
-   }  
-   lookup = kwl.find( prefix, FSCLTX_KW );
-   if ( lookup )
-   {
-      setClassificationText( ossimString(lookup) );
-   }  
-   lookup = kwl.find( prefix, FSCATP_KW );
-   if ( lookup )
-   {
-      setClassificationAuthorityType( ossimString(lookup) );
-   }  
-   lookup = kwl.find( prefix, FSCRSN_KW );
-   if ( lookup )
-   {
-      setClassificationReason( ossimString(lookup) );
-   }  
-   lookup = kwl.find( prefix, FSSRDT_KW );
-   if ( lookup )
-   {
-      setClassificationReason( ossimString(lookup) );
-   }  
-   lookup = kwl.find( prefix, FSSRDT_KW);
-   if ( lookup )
-   {
-      setSecuritySourceDate( ossimString(lookup) );
-   }  
-   lookup = kwl.find( prefix, FBKGC_KW );
-   if ( lookup )
-   {
-      ossimString value = lookup;
-      std::vector<ossimString> splitString;
-      value = value.trim();
-      value.split(splitString, " ");
-      if(splitString.size() == 3)
-      {
-         setFileBackgroundColor((ossim_uint8)splitString[0].toUInt32(), 
-                                (ossim_uint8)splitString[1].toUInt32(), 
-                                (ossim_uint8)splitString[2].toUInt32());
-      }
-   }  
-   
-   return ossimNitfFileHeaderV2_X::loadState(kwl, prefix);
-}
-
-void ossimNitfFileHeaderV2_1::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property.valid()) return;
-   
-   ossimString name = property->getName();
-
-   // Make case insensitive:
-   name.upcase();
-   
-   if(name == FSCLSY_KW)
-   {
-     setSecurityClassificationSys(property->valueToString()); 
-   }
-   else if(name == FSDCTP_KW)
-   {
-      setDeclassificationType(property->valueToString());
-   }
-   else if(name == FSDCDT_KW)
-   {
-      setDeclassificationDate(property->valueToString());
-   }
-   else if(name == FSDCXM_KW)
-   {
-      setDeclassificationExemption(property->valueToString());
-   }
-   else if(name == FSDG_KW)
-   {
-      setDowngrade(property->valueToString());
-   }
-   else if(name == FSDGDT_KW)
-   {
-      setDowngradingDate(property->valueToString());
-   }
-   else if(name == FSCLTX_KW)
-   {
-      setClassificationText(property->valueToString());
-   }
-   else if(name == FSCATP_KW)
-   {
-      setClassificationAuthorityType(property->valueToString());
-   }
-   else if(name == FSCRSN_KW)
-   {
-      setClassificationReason(property->valueToString());
-   }
-   else if(name == FSSRDT_KW)
-   {
-      setSecuritySourceDate(property->valueToString());
-   }
-   else if(name == FBKGC_KW)
-   {
-      ossimString value = property->valueToString();
-      std::vector<ossimString> splitString;
-      value = value.trim();
-      value.split(splitString, " ");
-      if(splitString.size() == 3)
-      {
-         setFileBackgroundColor((ossim_uint8)splitString[0].toUInt32(), 
-                                (ossim_uint8)splitString[1].toUInt32(), 
-                                (ossim_uint8)splitString[2].toUInt32());
-      }
-   }
-   else
-   {
-      ossimNitfFileHeaderV2_X::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimNitfFileHeaderV2_1::getProperty(const ossimString& name)const
-{
-   ossimProperty* property = 0;
-   ossimStringProperty* stringProperty = 0;
-   ossimColorProperty* colorProperty = 0;
-
-   if(name == CLEVEL_KW)
-   {
-      property = new ossimStringProperty(name, getComplexityLevel().trim());
-   }
-   else if(name == FSCLSY_KW)
-   {
-      property = new ossimStringProperty(name,
-                                               getSecurityClassificationSys().trim());
-   }
-   else if(name == FSDCTP_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         getDeclassificationType().trim());
-   }
-   else if(name == FSDCDT_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         getDeclassificationDate().trim());
-   }
-   else if(name == FSDCXM_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         getDeclassificationExemption().trim());
-   }
-   else if(name == FSDG_KW)
-   {
-      stringProperty = new ossimStringProperty(name,
-                                               getDowngrade().trim(),
-                                               false);
-      
-      stringProperty->addConstraint("");
-      stringProperty->addConstraint("S");
-      stringProperty->addConstraint("C");
-      stringProperty->addConstraint("R");
-
-      property = stringProperty;
-   }
-   else if(name == FSDGDT_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         getDowngradingDate().trim());
-   }
-   else if(name == FSCLTX_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         getClassificationText().trim());
-   }
-   else if(name == FSCATP_KW)
-   {
-      stringProperty = new ossimStringProperty(name,
-                                               getClassificationAuthorityType().trim(),
-                                               false);
-      
-      stringProperty->addConstraint("");
-      stringProperty->addConstraint("O");
-      stringProperty->addConstraint("D");
-      stringProperty->addConstraint("M");
-      
-      property = stringProperty;
-   }
-   else if(name == FSCRSN_KW)
-   {
-      stringProperty = new ossimStringProperty(name,
-                                               getClassificationReason().trim(),
-                                               false);
-      
-      stringProperty->addConstraint("");
-      stringProperty->addConstraint("A");
-      stringProperty->addConstraint("B");
-      stringProperty->addConstraint("C");
-      stringProperty->addConstraint("D");
-      stringProperty->addConstraint("E");
-      stringProperty->addConstraint("F");
-      stringProperty->addConstraint("G");
-      
-      property = stringProperty;
-   }
-   else if(name == FSSRDT_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         getSecuritySourceDate().trim());
-   }
-   else if(name == FBKGC_KW)
-   {
-      ossim_uint8 r, g, b;
-      getBackgroundColor(r, g, b);
-      
-      colorProperty = new ossimColorProperty(name,
-                                             ossimRgbVector(r, g, b));
-
-      property = colorProperty;
-   }
-   else if(name == ONAME_KW)
-   {
-      property = new ossimStringProperty(name, ossimString(theOriginatorsName).trim());
-   }
-   else if(name == OPHONE_KW)
-   {
-      property = new ossimStringProperty(name, ossimString(theOriginatorsPhone).trim());
-   }
-   else
-   {
-      return ossimNitfFileHeaderV2_X::getProperty(name);
-   }
-   return property;
-}
-
-
-void ossimNitfFileHeaderV2_1::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimNitfFileHeaderV2_X::getPropertyNames(propertyNames);
-
-   propertyNames.push_back(FSCLSY_KW);
-   propertyNames.push_back(FSDCTP_KW);
-   propertyNames.push_back(FSDCDT_KW);
-   propertyNames.push_back(FSDCXM_KW);
-   propertyNames.push_back(FSDG_KW);
-   propertyNames.push_back(FSDGDT_KW);
-   propertyNames.push_back(FSCLTX_KW);
-   propertyNames.push_back(FSCATP_KW);
-   propertyNames.push_back(FSCRSN_KW);
-   propertyNames.push_back(FSSRDT_KW);
-   propertyNames.push_back(FBKGC_KW);
-}
diff --git a/src/ossim/support_data/ossimNitfFileHeaderV2_X.cpp b/src/ossim/support_data/ossimNitfFileHeaderV2_X.cpp
deleted file mode 100644
index 0320ea0..0000000
--- a/src/ossim/support_data/ossimNitfFileHeaderV2_X.cpp
+++ /dev/null
@@ -1,531 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimNitfFileHeaderV2_X.cpp 20123 2011-10-11 17:55:44Z dburken $
-
-#include <ossim/support_data/ossimNitfFileHeaderV2_X.h>
-#include <ossim/support_data/ossimNitfCommon.h>
-
-#include <iomanip>
-#include <sstream>
-#include <ossim/base/ossimDate.h> /* for ossimLocalTm */
-#include <ossim/base/ossimDateProperty.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimNumericProperty.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/support_data/ossimNitfCommon.h>
-
-RTTI_DEF1(ossimNitfFileHeaderV2_X, "ossimNitfFileHeaderV2_X", ossimNitfFileHeader);
-static ossimString monthConversionTable[] = {"   ", "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"};
-
-const ossimString ossimNitfFileHeaderV2_X::FILE_TYPE_KW = "FILE_TYPE";
-const ossimString ossimNitfFileHeaderV2_X::VERSION_KW   = "VERSION";
-const ossimString ossimNitfFileHeaderV2_X::FHDR_KW      = "FHDR";
-const ossimString ossimNitfFileHeaderV2_X::CLEVEL_KW    = "CLEVEL";
-const ossimString ossimNitfFileHeaderV2_X::STYPE_KW     = "STYPE";
-const ossimString ossimNitfFileHeaderV2_X::OSTAID_KW    = "OSTAID";
-const ossimString ossimNitfFileHeaderV2_X::FDT_KW       = "FDT";  
-const ossimString ossimNitfFileHeaderV2_X::FTITLE_KW    = "FTITLE";
-const ossimString ossimNitfFileHeaderV2_X::FSCLAS_KW    = "FSCLAS";
-const ossimString ossimNitfFileHeaderV2_X::FSCODE_KW    = "FSCODE";
-const ossimString ossimNitfFileHeaderV2_X::FSCTLH_KW    = "FSCTLH";
-const ossimString ossimNitfFileHeaderV2_X::FSREL_KW     = "FSREL";
-const ossimString ossimNitfFileHeaderV2_X::FSCAUT_KW    = "FSCAUT";
-const ossimString ossimNitfFileHeaderV2_X::FSCTLN_KW    = "FSCTLN";
-const ossimString ossimNitfFileHeaderV2_X::FSCOP_KW     = "FSCOP";
-const ossimString ossimNitfFileHeaderV2_X::FSCPYS_KW    = "FSCPYS";
-const ossimString ossimNitfFileHeaderV2_X::ENCRYP_KW    = "ENCRYP";
-const ossimString ossimNitfFileHeaderV2_X::ONAME_KW     = "ONAME";
-const ossimString ossimNitfFileHeaderV2_X::OPHONE_KW    = "OPHONE";
-
-ossimNitfFileHeaderV2_X::ossimNitfFileHeaderV2_X()
-{
-}
-
-void ossimNitfFileHeaderV2_X::setComplexityLevel(const ossimString& level)
-{
-   ossimNitfCommon::setField(theComplexityLevel, level, 2, std::ios::right, '0');
-}
-
-void ossimNitfFileHeaderV2_X::setSystemType(const ossimString& systemType)
-{
-   ossimNitfCommon::setField(theSystemType, systemType, 4);
-}
-
-void ossimNitfFileHeaderV2_X::setOriginatingStationId(const ossimString& originationId)
-{
-   ossimNitfCommon::setField(theOriginatingStationId, originationId, 10);
-}
-
-ossimString ossimNitfFileHeaderV2_X::formatDate(const ossimString& version,
-                                                const ossimLocalTm& d)
-{
-   // Convert to ZULU as per spec for both versions.
-   ossimLocalTm d1 = d.convertToGmt();
-   
-   std::ostringstream out;
-
-   if(version.contains("2.1"))
-   {
-      out << std::setw(4)
-      << std::setfill('0')
-      << d1.getYear()
-      << std::setw(2)
-      << std::setfill('0')
-      << d1.getMonth()
-      << std::setw(2)
-      << std::setfill('0')
-      << d1.getDay()
-      << std::setw(2)
-      << std::setfill('0')
-      << d1.getHour()
-      << std::setw(2)
-      << std::setfill('0')
-      << d1.getMin()
-      << std::setw(2)
-      << std::setfill('0')
-      << d1.getSec();
-   }
-   else
-   {
-      out  << std::setw(2)
-      << std::setfill('0')
-      << d1.getDay()
-      << std::setw(2)
-      << std::setfill('0')
-      << d1.getHour()
-      << std::setw(2)
-      << std::setfill('0')
-      << d1.getMin()
-      << std::setw(2)
-      << std::setfill('0')
-      << d1.getSec()
-      << "Z"
-      <<monthConversionTable[d1.getMonth()]
-      << std::setw(2)
-      << std::setfill('0')
-      <<d1.getShortYear();
-      
-   }
-      
-   return out.str();
-}
-
-void ossimNitfFileHeaderV2_X::setDate(const ossimLocalTm& d)
-{
-   memcpy(theDateTime, formatDate(getVersion(), d).c_str(), 14);
-}
-
-void ossimNitfFileHeaderV2_X::setDate(const ossimString& d)
-{
-   if(d.size()==14)
-   {
-      memcpy(theDateTime, d.c_str(), 14);
-   }
-}
-
-void ossimNitfFileHeaderV2_X::setDate()
-{
-   setDate(ossimLocalTm(0));
-}  
-
-void ossimNitfFileHeaderV2_X::setTitle(const ossimString& title)
-{
-   ossimNitfCommon::setField(theFileTitle, title, 80);
-}
-
-void ossimNitfFileHeaderV2_X::setFileSecurityClassification(const ossimString& securityClassification)
-{
-   ossimNitfCommon::setField(theSecurityClassification, securityClassification, 1);
-}
-
-void ossimNitfFileHeaderV2_X::setCopyNumber(const ossimString& copyNumber)
-{
-   if(copyNumber.trim() == "")
-   {
-      memset(theCopyNumber, '0', 5);
-   }
-   else
-   {
-      ossimNitfCommon::setField(theCopyNumber, copyNumber, 5, std::ios::right, '0');
-   }
-}
-
-void ossimNitfFileHeaderV2_X::setNumberOfCopies(const ossimString& numberOfCopies)
-{
-   if(numberOfCopies.trim() == "")
-   {
-      memset(theNumberOfCopies, '0', 5);
-   }
-   else
-   {
-      ossimNitfCommon::setField(theNumberOfCopies, numberOfCopies, 5, std::ios::right, '0');
-   }
-}
-
-void ossimNitfFileHeaderV2_X::setEncryption(const ossimString& encryption)
-{
-   ossimNitfCommon::setField(theEncryption, encryption, 1);
-}
-
-ossimString ossimNitfFileHeaderV2_X::getComplexityLevel()const
-{
-   return theComplexityLevel;
-}
-
-ossimString ossimNitfFileHeaderV2_X::getSystemType()const
-{
-   return theSystemType;
-}
-
-ossimString ossimNitfFileHeaderV2_X::getOriginatingStationId()const
-{
-   return theOriginatingStationId;
-}
-
-ossimString ossimNitfFileHeaderV2_X::getDate()const
-{
-   return theDateTime;
-}
-
-ossimString ossimNitfFileHeaderV2_X::getTitle()const
-{
-   return theFileTitle;
-}
-
-ossimString ossimNitfFileHeaderV2_X::getSecurityClassification()const
-{
-   return theSecurityClassification;
-}
-
-ossimString ossimNitfFileHeaderV2_X::getCopyNumber()const
-{
-   return theCopyNumber;
-}
-
-ossimString ossimNitfFileHeaderV2_X::getNumberOfCopies()const
-{
-   return theNumberOfCopies;
-}
-
-ossimString ossimNitfFileHeaderV2_X::getEncryption()const
-{
-   return theEncryption;
-}
-
-void ossimNitfFileHeaderV2_X::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   if(!property.valid()) return;
-
-   ossimString name = property->getName();
-
-   // Make case insensitive:
-   name.upcase();
-
-   if(name == FHDR_KW)
-   {
-      
-   }
-   else if(name == STYPE_KW)
-   {
-      setSystemType(property->valueToString());
-   }
-   else if(name == OSTAID_KW)
-   {
-      setOriginatingStationId(property->valueToString());
-   }
-   else if(name == FDT_KW)
-   {
-      setDate(property->valueToString());
-   }
-   else if(name == FTITLE_KW)
-   {
-      setTitle(property->valueToString());
-   }
-   else if(name == FSCLAS_KW)
-   {
-      setFileSecurityClassification(property->valueToString());
-   }
-   else if(name == FSCODE_KW)
-   {
-      setCodeWords(property->valueToString()); 
-   }
-   else if(name == FSCTLH_KW)
-   {
-      setControlAndHandling(property->valueToString());
-   }
-   else if(name == FSREL_KW)
-   {
-      setReleasingInstructions(property->valueToString());
-   }
-   else if(name == FSCAUT_KW)
-   {
-      setClassificationAuthority(property->valueToString()); 
-   }
-   else if(name == FSCTLN_KW)
-   {
-      setSecurityControlNumber(property->valueToString());
-   }
-   else if(name == FSCOP_KW)
-   {
-      setCopyNumber(property->valueToString());
-   }
-   else if(name == FSCPYS_KW)
-   {
-      setNumberOfCopies(property->valueToString());
-   }
-   else if(name == ENCRYP_KW)
-   {
-      setEncryption(property->valueToString());
-   }
-   else if(name == ONAME_KW)
-   {
-      setOriginatorsName(property->valueToString());
-   }
-   else if(name == OPHONE_KW)
-   {
-      setOriginatorsPhone(property->valueToString());
-   }
-   else
-   {
-      ossimNitfFileHeader::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimNitfFileHeaderV2_X::getProperty(const ossimString& name)const
-{
-   ossimRefPtr<ossimProperty> property = 0;
-   
-   if(name == FHDR_KW)
-   {
-      property = new ossimStringProperty(name, ossimString(theFileTypeVersion));
-   }
-   else if(name == VERSION_KW)
-   {
-      property = new ossimStringProperty(name, ossimString(getVersion()));
-   }
-   else if(name == FILE_TYPE_KW)
-   {
-      property = new ossimStringProperty(name, "NITF");
-   }
-   else if(name == CLEVEL_KW)
-   {
-      ossimNumericProperty* numericProperty =
-         new ossimNumericProperty(name,
-                                  getComplexityLevel(),
-                                  1,
-                                  99);
-      numericProperty->setNumericType(ossimNumericProperty::ossimNumericPropertyType_INT);
-      property = numericProperty;
-      
-   }
-   else if(name == STYPE_KW)
-   {
-      property = new ossimStringProperty(name, getSystemType().trim());
-   }
-   else if(name == OSTAID_KW)
-   {
-      property = new ossimStringProperty(name, getOriginatingStationId().trim());
-   }
-   else if(name == FDT_KW)
-   {
-      property = new ossimStringProperty(name, getDate());
-   }
-   else if(name == FTITLE_KW)
-   {
-      property = new ossimStringProperty(name, getTitle().trim());
-   }
-   else if(name == FSCLAS_KW)
-   {
-      ossimStringProperty* stringProperty =
-         new ossimStringProperty(name,
-                                 getSecurityClassification().trim(),
-                                 false);
-      
-      stringProperty->addConstraint("");
-      stringProperty->addConstraint("T");
-      stringProperty->addConstraint("S");
-      stringProperty->addConstraint("C");
-      stringProperty->addConstraint("R");
-      stringProperty->addConstraint("U");
-      
-      property = stringProperty;
-   }
-   else if(name == FSCODE_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         getCodeWords().trim());
-   }
-   else if(name == FSCTLH_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         getControlAndHandling().trim());
-   }
-   else if(name == FSREL_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         getReleasingInstructions().trim());
-   }
-   else if(name == FSCAUT_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         getClassificationAuthority().trim());
-   }
-   else if(name == FSCTLN_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         getSecurityControlNumber().trim());
-      
-   }
-   else if(name == FSCOP_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         getCopyNumber().trim());
-   }
-   else if(name == FSCPYS_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         getNumberOfCopies().trim());
-   }
-   else if(name == ENCRYP_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         getEncryption().trim(),
-                                         false);
-   }
-   else
-   {
-      property = ossimNitfFileHeader::getProperty(name).get();
-   }
-   
-   return property;
-}
-
-bool ossimNitfFileHeaderV2_X::saveState(ossimKeywordlist& kwl, const ossimString& prefix)const
-{
-   bool result = ossimNitfFileHeader::saveState(kwl, prefix);
-   
-   if(result)
-   {
-      kwl.add(prefix, FHDR_KW.c_str(),   theFileTypeVersion);
-      kwl.add(prefix, CLEVEL_KW.c_str(), theComplexityLevel);
-      kwl.add(prefix, STYPE_KW.c_str(),  theSystemType);
-      kwl.add(prefix, OSTAID_KW.c_str(), theOriginatingStationId);
-      kwl.add(prefix, FDT_KW.c_str(),    theDateTime);
-      kwl.add(prefix, FTITLE_KW.c_str(), theFileTitle);
-      kwl.add(prefix, FSCLAS_KW.c_str(), theSecurityClassification);
-      kwl.add(prefix, FSCOP_KW.c_str(),  theCopyNumber);
-      kwl.add(prefix, FSCPYS_KW.c_str(), theNumberOfCopies);
-      kwl.add(prefix, ENCRYP_KW.c_str(), theEncryption);
-   }
-   
-   return result;
-}
-
-bool ossimNitfFileHeaderV2_X::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   // Note: Currently not looking up all fieds only ones that make sense.
-   
-   const char* lookup;
-   
-   lookup = kwl.find( prefix, OSTAID_KW);
-   if ( lookup )
-   {
-      setOriginatingStationId( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, FDT_KW);
-   if ( lookup )
-   {
-      setDate( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, FTITLE_KW);
-   if ( lookup )
-   {
-      setTitle( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, FSCLAS_KW);
-   if ( lookup )
-   {
-      setFileSecurityClassification( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, FSCODE_KW);
-   if ( lookup )
-   {
-      setCodeWords( ossimString(lookup) ); 
-   }
-   lookup = kwl.find( prefix, FSCTLH_KW);
-   if ( lookup )
-   {
-      setControlAndHandling( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, FSREL_KW);
-   if ( lookup )
-   {
-      setReleasingInstructions( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, FSCAUT_KW);
-   if ( lookup )
-   {
-      setClassificationAuthority( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, FSCTLN_KW);
-   if ( lookup )
-   {
-      setSecurityControlNumber( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, FSCOP_KW);
-   if ( lookup )
-   {
-      setCopyNumber( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, FSCPYS_KW);
-   if ( lookup )
-   {
-      setNumberOfCopies( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, ENCRYP_KW);
-   if ( lookup )
-   {
-      setEncryption( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, ONAME_KW);
-   if ( lookup )
-   {
-      setOriginatorsName( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, OPHONE_KW);
-   if ( lookup )
-   {
-      setOriginatorsPhone( ossimString(lookup) );
-   }
-
-   return true;
-}
-
-void ossimNitfFileHeaderV2_X::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimNitfFileHeader::getPropertyNames(propertyNames);
-   propertyNames.push_back(FILE_TYPE_KW);
-   propertyNames.push_back(VERSION_KW);
-   propertyNames.push_back(FHDR_KW);
-   propertyNames.push_back(CLEVEL_KW);
-   propertyNames.push_back(STYPE_KW);
-   propertyNames.push_back(OSTAID_KW);
-   propertyNames.push_back(FDT_KW);
-   propertyNames.push_back(FTITLE_KW);
-   propertyNames.push_back(FSCLAS_KW);
-   propertyNames.push_back(FSCODE_KW);
-   propertyNames.push_back(FSCTLH_KW);
-   propertyNames.push_back(FSREL_KW);
-   propertyNames.push_back(FSCAUT_KW);
-   propertyNames.push_back(FSCTLN_KW);
-   propertyNames.push_back(FSCOP_KW);
-   propertyNames.push_back(FSCPYS_KW);
-   propertyNames.push_back(ENCRYP_KW);
-   propertyNames.push_back(ONAME_KW);
-   propertyNames.push_back(OPHONE_KW);
-}
diff --git a/src/ossim/support_data/ossimNitfGeoPositioningTag.cpp b/src/ossim/support_data/ossimNitfGeoPositioningTag.cpp
deleted file mode 100644
index 5a4b0ea..0000000
--- a/src/ossim/support_data/ossimNitfGeoPositioningTag.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfGeoPositioningTag.cpp 22013 2012-12-19 17:37:20Z dburken $
-
-#include <ossim/support_data/ossimNitfGeoPositioningTag.h>
-#include <cstring>
-#include <istream>
-#include <iostream>
-#include <iomanip>
-
-RTTI_DEF1(ossimNitfGeoPositioningTag, "ossimNitfGeoPositioningTag", ossimNitfRegisteredTag);
-
-ossimNitfGeoPositioningTag::ossimNitfGeoPositioningTag()
-   : ossimNitfRegisteredTag(std::string("GEOPSB"),  443)
-{
-   clearFields();
-}
-
-ossimNitfGeoPositioningTag::~ossimNitfGeoPositioningTag()
-{
-}
-
-void ossimNitfGeoPositioningTag::parseStream(std::istream& in)
-{
-   clearFields();
-   
-   in.read(theType, 3);
-   in.read(theCoordinateUnits, 3);
-   in.read(theGeodeticDatumName, 80);
-   in.read(theGeodeticDatumCode, 4);
-   in.read(theEllipsoidName, 80);
-   in.read(theEllipsoidCode, 3);
-   in.read(theVerticalDatumReference, 80);
-   in.read(theVerticalReferenceCode, 4);
-   in.read(theSoundingDatumName, 80);
-   in.read(theSoundingDatumCode, 4);
-   in.read(theZFalseOrigin, 15);
-   in.read(theGridCode, 3);
-   in.read(theGridDescription, 80);
-   in.read(theGridZoneNumber, 4);
-}
-
-void ossimNitfGeoPositioningTag::writeStream(std::ostream& out)
-{
-   out.write(theType, 3);
-   out.write(theCoordinateUnits, 3);
-   out.write(theGeodeticDatumName, 80);
-   out.write(theGeodeticDatumCode, 4);
-   out.write(theEllipsoidName, 80);
-   out.write(theEllipsoidCode, 3);
-   out.write(theVerticalDatumReference, 80);
-   out.write(theVerticalReferenceCode, 4);
-   out.write(theSoundingDatumName, 80);
-   out.write(theSoundingDatumCode, 4);
-   out.write(theZFalseOrigin, 15);
-   out.write(theGridCode, 3);
-   out.write(theGridDescription, 80);
-   out.write(theGridZoneNumber, 4);
-}
-
-void ossimNitfGeoPositioningTag::clearFields()
-{
-   memset(theType, ' ', 3);
-   memset(theCoordinateUnits, ' ', 3);
-   memset(theGeodeticDatumName, ' ', 80);
-   memset(theGeodeticDatumCode, ' ', 4);
-   memset(theEllipsoidName, ' ', 80);
-   memset(theEllipsoidCode, ' ', 3);
-   memset(theVerticalDatumReference, ' ', 80);
-   memset(theVerticalReferenceCode, ' ', 4);
-   memset(theSoundingDatumName, ' ', 80);
-   memset(theSoundingDatumCode, ' ', 4);
-   memset(theZFalseOrigin, '0', 15);
-   memset(theGridCode, ' ', 3);
-   memset(theGridDescription, ' ', 80);
-   memset(theGridZoneNumber, '0',  4);
-   
-   memcpy(theType, "MAP", 3);
-   memcpy(theCoordinateUnits, "M  ", 3);
-   memcpy(theGeodeticDatumName, "World Geodetic System 1984", 26);
-   memcpy(theGeodeticDatumCode, "WGE", 3);
-   memcpy(theEllipsoidName, "World Geodetic System 1984", 26);
-   memcpy(theEllipsoidCode, "WE", 2);
-   memcpy(theVerticalDatumReference, "Geodetic", 8);
-   memcpy(theVerticalReferenceCode, "GEOD", 4);
-   memcpy(theSoundingDatumName, "Mean Sea", 8);
-   memcpy(theSoundingDatumCode, "MSL", 3);
-
-   theType[3]                    = '\0';
-   theCoordinateUnits[3]         = '\0';
-   theGeodeticDatumName[80]      = '\0';
-   theGeodeticDatumCode[4]       = '\0';
-   theEllipsoidName[80]          = '\0';
-   theEllipsoidCode[3]           = '\0';
-   theVerticalDatumReference[80] = '\0';
-   theVerticalReferenceCode[4]   = '\0';
-   theSoundingDatumName[80]      = '\0';
-   theSoundingDatumCode[4]       = '\0';
-   theZFalseOrigin[15]           = '\0';
-   theGridCode[3]                = '\0';
-   theGridDescription[80]        = '\0';
-   theGridZoneNumber[4]          = '\0';
-   
-}
-
-std::ostream& ossimNitfGeoPositioningTag::print(
-   std::ostream& out, const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += getTagName();
-   pfx += ".";
-   
-   out << setiosflags(std::ios::left)
-       << pfx << std::setw(24) << "CETAG:"
-       << getTagName() << "\n"
-       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
-       << pfx << std::setw(24) << "TYP:" << theType << "\n"
-       << pfx << std::setw(24) << "UNI:" << theCoordinateUnits << "\n"
-       << pfx << std::setw(24) << "DAG:" << theGeodeticDatumName << "\n"
-       << pfx << std::setw(24) << "DCD:" << theGeodeticDatumCode << "\n"
-       << pfx << std::setw(24) << "ELL:" << theEllipsoidName << "\n"
-       << pfx << std::setw(24) << "ELC:" << theEllipsoidCode << "\n"
-       << pfx << std::setw(24) << "DVR:" << theVerticalDatumReference << "\n"
-       << pfx << std::setw(24) << "VDCDVR:" << theVerticalReferenceCode << "\n"
-       << pfx << std::setw(24) << "SDA:" << theSoundingDatumName << "\n"
-       << pfx << std::setw(24) << "VDCSDA:" << theSoundingDatumCode << "\n"
-       << pfx << std::setw(24) << "ZOR:" << theZFalseOrigin << "\n"
-       << pfx << std::setw(24) << "GRD:" << theGridCode << "\n"
-       << pfx << std::setw(24) << "GRN:" << theGridDescription << "\n"
-       << pfx << std::setw(24) << "ZNA:" << theGridZoneNumber << "\n";
-   
-   return out;
-}
diff --git a/src/ossim/support_data/ossimNitfHistoaTag.cpp b/src/ossim/support_data/ossimNitfHistoaTag.cpp
deleted file mode 100644
index a5d4b72..0000000
--- a/src/ossim/support_data/ossimNitfHistoaTag.cpp
+++ /dev/null
@@ -1,470 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  Garrett Potts
-//
-// Description: HISTOA tag class definition.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimNitfHistoaTag.cpp 22013 2012-12-19 17:37:20Z dburken $
-
-#include <ossim/support_data/ossimNitfHistoaTag.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimString.h>
-#include <iomanip>
-
-ossimNitfHistoaProcessingEvent::ossimNitfHistoaProcessingEvent()
-{
-   clearFields();
-}
-
-ossim_uint32 ossimNitfHistoaProcessingEvent::getSizeInBytes()const
-{
-   ossim_uint32 sizeInBytes = (PDATE_SIZE + PSITE_SIZE + PAS_SIZE + NIPCOM_SIZE);
-
-   if ( (*m_nIpcom != '0') && m_comment.size() )
-   {
-      sizeInBytes += ( m_comment.size() * IPCOM_SIZE );
-   }
-
-   sizeInBytes += (IBPP_SIZE + IPVTYPE_SIZE + INBWC_SIZE + 
-                   DISP_FLAG_SIZE + ROT_FLAG_SIZE);
-
-   if(*m_rotFlag == '1')
-   {
-      sizeInBytes += ROT_ANGLE_SIZE;
-   }
-   
-   sizeInBytes += ASYM_FLAG_SIZE;
-   if(*m_asymFlag == '1')
-   {
-      sizeInBytes += (ZOOMROW_SIZE + ZOOMCOL_SIZE);
-   }
-   
-   sizeInBytes += ( PROJ_FLAG_SIZE + SHARP_FLAG_SIZE );
-   if(*m_sharpFlag == '1')
-   {
-      sizeInBytes += (SHARPFAM_SIZE + SHARPMEM_SIZE);
-   }
-
-   sizeInBytes += MAG_FLAG_SIZE;
-   if(*m_magFlag == '1')
-   {
-      sizeInBytes += MAG_LEVEL_SIZE;
-   }
-
-   sizeInBytes += DRA_FLAG_SIZE;
-   if(*m_draFlag == '1')
-   {
-      sizeInBytes += (DRA_MULT_SIZE + DRA_SUB_SIZE);
-   }
-
-   sizeInBytes += TTC_FLAG_SIZE;
-   if(*m_ttcFlag == '1')
-   {
-      sizeInBytes += (TTCFAM_SIZE + TTCMEM_SIZE);
-   }
-
-   sizeInBytes += DEVLUT_FLAG_SIZE + OBPP_SIZE + OPVTYPE_SIZE + OUTBWC_SIZE;
-
-   return sizeInBytes;
-}
-
-void ossimNitfHistoaProcessingEvent::parseStream(std::istream& in)
-{
-   clearFields();
-
-   in.read(m_pdate, PDATE_SIZE);
-   in.read(m_psite, PSITE_SIZE);
-   in.read(m_pas, PAS_SIZE);
-   in.read(m_nIpcom, NIPCOM_SIZE);
-   ossim_uint32 nIpcom = ossimString(m_nIpcom).toUInt32();
-   if(nIpcom < 10)
-   {
-      ossim_uint32 idx = 0;
-      for(;idx < nIpcom;++idx)
-      {
-         char tempBuf[IPCOM_SIZE+1];
-         in.read(tempBuf, IPCOM_SIZE);
-         tempBuf[IPCOM_SIZE] = '\0';
-      
-         // m_comment += std::string(tempBuf, tempBuf + 80);
-         
-         m_comment.push_back( std::string(tempBuf) );
-      }
-   }
-   in.read(m_ibpp, IBPP_SIZE);
-   in.read(m_ipvType, IPVTYPE_SIZE);
-   
-   in.read(m_inbwc, INBWC_SIZE);
-   in.read(m_dispFlag, DISP_FLAG_SIZE);
-   in.read(m_rotFlag, ROT_FLAG_SIZE);
-   if(*m_rotFlag =='1')
-   {
-      in.read(m_rotAngle, ROT_ANGLE_SIZE);
-   }
-
-   in.read(m_asymFlag, ASYM_FLAG_SIZE);
-   if(ossimString(m_asymFlag).toBool())
-   {
-      in.read(m_zoomRow, ZOOMROW_SIZE);
-      in.read(m_zoomCol, ZOOMCOL_SIZE);
-   }
-
-   in.read(m_projFlag, PROJ_FLAG_SIZE);   
-   in.read(m_sharpFlag, SHARP_FLAG_SIZE);
-   if(ossimString(m_sharpFlag).toBool())
-   {
-      in.read(m_sharpFam, SHARPFAM_SIZE);
-      in.read(m_sharpMem, SHARPMEM_SIZE);
-   }
-
-   in.read(m_magFlag, MAG_FLAG_SIZE);
-   if(ossimString(m_magFlag).toBool())
-   {
-      in.read(m_magLevel, MAG_LEVEL_SIZE);
-   }
-
-   in.read(m_draFlag, DRA_FLAG_SIZE);
-   if(ossimString(m_draFlag).toBool())
-   {
-      in.read(m_draMult, DRA_MULT_SIZE);
-      in.read(m_draSub, DRA_SUB_SIZE);
-   }
-
-   in.read(m_ttcFlag, TTC_FLAG_SIZE);
-   if(ossimString(m_ttcFlag).toBool())
-   {
-      in.read(m_ttcFam, TTCFAM_SIZE);
-      in.read(m_ttcMem, TTCMEM_SIZE);
-   }
-
-   in.read(m_devLutFlag, DEVLUT_FLAG_SIZE);
-   in.read(m_obpp, OBPP_SIZE);
-   in.read(m_opvType, OPVTYPE_SIZE);
-   in.read(m_outBwc, OUTBWC_SIZE);
-}
-
-void ossimNitfHistoaProcessingEvent::writeStream(std::ostream& out)
-{
-   out.write(m_pdate, PDATE_SIZE);
-   out.write(m_psite, PSITE_SIZE);
-   out.write(m_pas, PAS_SIZE);
-   out.write(m_nIpcom, NIPCOM_SIZE);
-   ossim_uint32 nIpcom = ossimString(m_nIpcom).toUInt32();
-   if( (nIpcom > 0) && (nIpcom < 10) )
-   {
-      for( ossim_uint32 i = 0; i < nIpcom; ++i )
-      {
-         // Should size check std::string or make set method that ensures 80 chars.
-         out.write( m_comment[i].data(), IPCOM_SIZE );
-      }
-   }
-   out.write(m_ibpp, IBPP_SIZE);
-   out.write(m_ipvType, IPVTYPE_SIZE);
-   
-   out.write(m_inbwc, INBWC_SIZE);
-   out.write(m_dispFlag, DISP_FLAG_SIZE);
-   out.write(m_rotFlag, ROT_FLAG_SIZE);
-   if(*m_rotFlag =='1')
-   {
-      out.write(m_rotAngle, ROT_ANGLE_SIZE);
-   }
-   out.write(m_asymFlag, ASYM_FLAG_SIZE);
-   if(*m_asymFlag == '1')
-   {
-      out.write(m_zoomRow, ZOOMROW_SIZE);
-      out.write(m_zoomCol, ZOOMCOL_SIZE);
-   }
-   out.write(m_projFlag, PROJ_FLAG_SIZE);
-   out.write(m_sharpFlag, SHARP_FLAG_SIZE);
-   if(*m_sharpFlag == '1')
-   {
-      out.write(m_sharpFam, SHARPFAM_SIZE);
-      out.write(m_sharpMem, SHARPMEM_SIZE);
-   }
-   out.write(m_magFlag, MAG_FLAG_SIZE);
-   if(*m_magFlag == '1')
-   {
-      out.write(m_magLevel, MAG_LEVEL_SIZE);
-   }
-   out.write(m_draFlag, DRA_FLAG_SIZE);
-   if(*m_draFlag == '1')
-   {
-      out.write(m_draMult, DRA_MULT_SIZE);
-      out.write(m_draSub, DRA_SUB_SIZE);
-   }
-   out.write(m_ttcFlag, TTC_FLAG_SIZE);
-   if(*m_ttcFlag == '1')
-   {
-      out.write(m_ttcFam, TTCFAM_SIZE);
-      out.write(m_ttcMem, TTCMEM_SIZE);
-   }
-   out.write(m_devLutFlag, DEVLUT_FLAG_SIZE);
-   out.write(m_obpp, OBPP_SIZE);
-   out.write(m_opvType, OPVTYPE_SIZE);
-   out.write(m_outBwc, OUTBWC_SIZE);
-}
-
-std::ostream& ossimNitfHistoaProcessingEvent::print(std::ostream& out,
-                                                    const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += ".";
-   
-   out << setiosflags(std::ios::left)
-   << pfx << std::setw(24) << "PDATE:"     << m_pdate << "\n"
-   << pfx << std::setw(24) << "PSITE:"  << m_psite << "\n"
-   << pfx << std::setw(24) << "PAS:"  << m_pas << "\n"
-   << pfx << std::setw(24) << "NIPCOM:"   << m_nIpcom << "\n";
-   ossim_uint32 nIpcom = ossimString(m_nIpcom).toUInt32();
-   if( ( nIpcom > 0 ) && ( nIpcom < 10 ) )
-   {
-      for( ossim_uint32 i = 0; i < nIpcom; ++i )
-      {
-         std::string s = "IPCOM";
-         
-         //---
-         // NOTE:
-         // Doing  s += ossimString::toString( i ).string() core dumping linux gcc version 4.7.0.
-         //---
-         std::string s2 = ossimString::toString( i ).string();
-         s += s2;
-         s += ":";
-         out << pfx << std::setw(24) << s.c_str();
-         out.write( m_comment[i].data(), IPCOM_SIZE );
-         out << "\n";
-      }
-   }
-   
-   out << setiosflags(std::ios::left)
-   << pfx << std::setw(24) << "IBPP:"     << m_ibpp << "\n"
-   << pfx << std::setw(24) << "IPVTYPE:"     << m_ipvType << "\n"
-   << pfx << std::setw(24) << "INBWC:"     << m_inbwc << "\n"
-   << pfx << std::setw(24) << "DISP_FLAG:"     << m_dispFlag << "\n"
-   << pfx << std::setw(24) << "ROT_FLAG:"     << m_rotFlag << "\n";
-   if(*m_rotFlag == '1')
-   {
-      out<< pfx << std::setw(24) << "ROT_ANGLE:" << m_rotAngle << "\n";
-   }
-
-   out<< pfx << std::setw(24) << "ASYM_FLAG:" << m_asymFlag << "\n";
-   
-   if(*m_asymFlag=='1')
-   {
-      out<< pfx << std::setw(24) << "ZOOMROW:" << m_zoomRow << "\n";
-      out<< pfx << std::setw(24) << "ZOOMCOL:" << m_zoomCol << "\n";
-   }
-   out<< pfx << std::setw(24) << "PROJ_FLAG:" << m_projFlag << "\n";
-   out<< pfx << std::setw(24) << "SHARP_FLAG:" << *m_sharpFlag << "\n";
-   if(*m_sharpFlag == '1')
-   {
-      out<< pfx << std::setw(24) << "SHARPFAM:" << m_sharpFam << "\n";
-      out<< pfx << std::setw(24) << "SHARPMEM:" << m_sharpMem << "\n";
-   }
-   out<< pfx << std::setw(24) << "MAG_FLAG:" << *m_magFlag << "\n";
-   if(*m_magFlag  == '1')
-   {
-      out<< pfx << std::setw(24) << "MAG_LEVEL:" << m_magLevel << "\n";
-   }
-   out<< pfx << std::setw(24) << "DRA_FLAG:" << *m_draFlag << "\n";
-   if(*m_draFlag=='1')
-   {
-      out<< pfx << std::setw(24) << "DRA_MULT:" << m_draMult << "\n";
-      out<< pfx << std::setw(24) << "DRA_SUB:" << m_draSub << "\n";
-   }
-   out<< pfx << std::setw(24) << "TTC_FLAG:" << *m_ttcFlag << "\n";
-   if(*m_ttcFlag == '1')
-   {
-      out<< pfx << std::setw(24) << "TTCFAM:" << m_ttcFam << "\n";
-      out<< pfx << std::setw(24) << "TTCMEM:" << m_ttcMem << "\n";
-   }
-   out<< pfx << std::setw(24) << "DEVLUT_FLAG:" << *m_devLutFlag << "\n";
-   out<< pfx << std::setw(24) << "OBPP:" << m_obpp << "\n";
-   out<< pfx << std::setw(24) << "OPVTYPE:" << m_opvType << "\n";
-   out<< pfx << std::setw(24) << "OUTBWC:" << m_outBwc << "\n";
-   
-   return out;
-}
-
-void ossimNitfHistoaProcessingEvent::clearFields()
-{
-   memset(m_pdate, ' ', PDATE_SIZE+1);
-   memset(m_psite, ' ', PSITE_SIZE+1);
-   memset(m_pas, ' ', PAS_SIZE+1);
-   memset(m_nIpcom, ' ', NIPCOM_SIZE+1);
-   memset(m_ibpp, ' ', IBPP_SIZE+1);
-   memset(m_ipvType, ' ', IPVTYPE_SIZE+1);
-   
-   memset(m_inbwc, ' ', INBWC_SIZE);
-   memset(m_dispFlag, '0', DISP_FLAG_SIZE);
-   memset(m_rotFlag, '0', DISP_FLAG_SIZE);
-   memset(m_rotAngle, '0', ROT_ANGLE_SIZE);
-   m_rotAngle[3]='.';
-   memset(m_projFlag, '0', PROJ_FLAG_SIZE);
-   memset(m_asymFlag, '0', ASYM_FLAG_SIZE);
-   memset(m_zoomRow, '0', ZOOMROW_SIZE);
-   m_zoomRow[2]='.';
-   memset(m_zoomCol, '0', ZOOMCOL_SIZE);
-   m_zoomCol[2]='.';
-   memset(m_sharpFlag, '0', SHARP_FLAG_SIZE);
-   memset(m_sharpFam, ' ', SHARPFAM_SIZE);
-   memset(m_sharpMem, ' ', SHARPMEM_SIZE);
-   memset(m_magFlag, '0', MAG_FLAG_SIZE);
-   memset(m_magLevel, ' ', MAG_LEVEL_SIZE);
-   memset(m_draFlag, '0', DRA_FLAG_SIZE);
-   memset(m_draMult, ' ', DRA_MULT_SIZE);
-   
-   memset(m_draSub, ' ', DRA_SUB_SIZE);
-   memset(m_ttcFlag, '0', TTC_FLAG_SIZE);
-   memset(m_ttcFam, ' ', TTCFAM_SIZE);
-   memset(m_ttcMem, ' ', TTCMEM_SIZE);
-   memset(m_obpp, ' ', OBPP_SIZE);
-   memset(m_opvType, ' ', OPVTYPE_SIZE);
-   memset(m_outBwc, ' ', OUTBWC_SIZE);
-   
-   m_pdate[PDATE_SIZE]     = '\0';
-   m_psite[PSITE_SIZE]     = '\0';
-   m_pas[PAS_SIZE]         = '\0';
-   m_nIpcom[NIPCOM_SIZE]   = '\0';
-   m_ibpp[IBPP_SIZE]       = '\0';
-   m_ipvType[IPVTYPE_SIZE] = '\0';
-   
-   m_comment.clear();
-
-   m_inbwc[INBWC_SIZE] = '\0';
-   m_dispFlag[DISP_FLAG_SIZE] = '\0';
-   m_rotFlag[ROT_FLAG_SIZE] = '\0';
-   m_rotAngle[ROT_ANGLE_SIZE] = '\0';
-   m_projFlag[PROJ_FLAG_SIZE] = '\0';
-   m_asymFlag[ASYM_FLAG_SIZE] = '\0';
-   m_zoomRow[ZOOMROW_SIZE] = '\0';
-   m_zoomCol[ZOOMCOL_SIZE] = '\0';
-   m_sharpFlag[SHARP_FLAG_SIZE] = '\0';
-   m_sharpFam[SHARPFAM_SIZE] = '\0';
-   m_sharpMem[SHARPMEM_SIZE] = '\0';
-   m_magFlag[MAG_FLAG_SIZE] = '\0';
-   m_magLevel[MAG_LEVEL_SIZE] = '\0';
-   m_draFlag[DRA_FLAG_SIZE] = '\0';
-   m_draMult[DRA_MULT_SIZE] = '\0';
-   m_draSub[DRA_SUB_SIZE] = '\0';
-   m_ttcFlag[TTC_FLAG_SIZE] = '\0';
-   m_ttcFam[TTCFAM_SIZE] = '\0';
-   m_ttcMem[TTCMEM_SIZE] = '\0';
-   m_obpp[OBPP_SIZE] = '\0';
-   m_opvType[OPVTYPE_SIZE] = '\0';
-   m_outBwc[OUTBWC_SIZE] = '\0';
-}
-
-ossimNitfHistoaTag::ossimNitfHistoaTag()
-   : ossimNitfRegisteredTag( std::string("HISTOA"), 0 )
-{
-}
-
-void ossimNitfHistoaTag::parseStream(std::istream& in)
-{
-   clearFields();
-
-   in.read(m_systype, SYSTYPE_SIZE);
-   in.read(m_pc, PC_SIZE);
-   in.read(m_pe, PE_SIZE);
-   in.read(m_remapFlag, REMAP_FLAG_SIZE);
-   in.read(m_lutid, LUTID_SIZE);
-   in.read(m_nEvents, NEVENTS_SIZE);
-
-   ossim_uint32 nEvents = ossimString(m_nEvents).toUInt32();
-   if(nEvents < 100)
-   {
-      for(ossim_uint32 idx = 0; idx < nEvents; ++idx)
-      {
-         ossimNitfHistoaProcessingEvent evt;
-         evt.parseStream(in);
-         m_eventList.push_back(evt);
-      }
-   }
-
-   // Set the tag length in base for the getTagLenth method.
-   setTagLength( getSizeInBytes() );
-}
-
-void ossimNitfHistoaTag::writeStream(std::ostream& out)
-{
-   out.write(m_systype, SYSTYPE_SIZE);
-   out.write(m_pc, PC_SIZE);
-   out.write(m_pe, PE_SIZE);
-   out.write(m_remapFlag, REMAP_FLAG_SIZE);
-   out.write(m_lutid, LUTID_SIZE);
-   out.write(m_nEvents, NEVENTS_SIZE);
-   ossim_uint32 idx = 0;
-   ossim_uint32 nEvents = ossimString(m_nEvents).toUInt32();
-   if(nEvents < 100)
-   {
-      for(;idx < nEvents; ++idx)
-      {
-         m_eventList[idx].writeStream(out);
-      }
-   }
-}
-
-ossim_uint32 ossimNitfHistoaTag::getSizeInBytes()const
-{
-   // Make this dynamic for constructed HISTOA tags instead of using theTagLength.
-   ossim_uint32 sizeInBytes = (SYSTYPE_SIZE + PC_SIZE + PE_SIZE + 
-                               REMAP_FLAG_SIZE + LUTID_SIZE + NEVENTS_SIZE);
-
-   for ( ossim_uint32 idx = 0; idx < m_eventList.size(); ++idx)
-   {
-      sizeInBytes += m_eventList[idx].getSizeInBytes();
-   }
-
-   return sizeInBytes;
-}
-
-void ossimNitfHistoaTag::clearFields()
-{
-   memset(m_systype,     ' ', SYSTYPE_SIZE);
-   memset(m_pc,     ' ', PC_SIZE);
-   memset(m_pe,     ' ', PE_SIZE);
-   memset(m_remapFlag,     ' ', REMAP_FLAG_SIZE);
-   memset(m_lutid,     '0', LUTID_SIZE);
-   memset(m_nEvents,     '0', NEVENTS_SIZE);
-
-   m_systype[SYSTYPE_SIZE] = '\0';
-   m_pc[PC_SIZE] = '\0';
-   m_pe[PE_SIZE] = '\0';
-   m_remapFlag[REMAP_FLAG_SIZE] = '\0';
-   m_lutid[LUTID_SIZE] = '\0';
-   m_nEvents[NEVENTS_SIZE] = '\0';
-   m_eventList.clear();
-
-   // Clear the tag length in base.
-   setTagLength(0);
-}
-
-std::ostream& ossimNitfHistoaTag::print(std::ostream& out,
-                                        const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += getTagName();
-   pfx += ".";
-   
-   out << setiosflags(std::ios::left)
-   << pfx << std::setw(24) << "CETAG:"
-   << getTagName() << "\n"
-   << pfx << std::setw(24) << "CEL:"
-   << getSizeInBytes() << "\n"
-   << pfx << std::setw(24) << "SYSTYPE:"     << m_systype << "\n"
-   << pfx << std::setw(24) << "PC:"  << m_pc << "\n"
-   << pfx << std::setw(24) << "PE:"  << m_pe << "\n"
-   << pfx << std::setw(24) << "REMAP_FLAG:"   << m_remapFlag << "\n"
-   << pfx << std::setw(24) << "LUTID:"     << m_lutid << "\n"
-   << pfx << std::setw(24) << "NEVENTS:"     << m_nEvents << "\n";
-   for ( ossim_uint32 idx = 0; idx < m_eventList.size(); ++idx )
-   {
-      m_eventList[idx].print(out, pfx+"EVENT"+ossimString::toString(idx));
-   }
-   
-   return out;
-}
-
diff --git a/src/ossim/support_data/ossimNitfImageBand.cpp b/src/ossim/support_data/ossimNitfImageBand.cpp
deleted file mode 100644
index b97cb09..0000000
--- a/src/ossim/support_data/ossimNitfImageBand.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfImageBand.cpp 14241 2009-04-07 19:59:23Z dburken $
-#include <ossim/support_data/ossimNitfImageBand.h>
-#include <ossim/support_data/ossimNitfImageLut.h>
-#include <ossim/base/ossimString.h>
-
-RTTI_DEF1(ossimNitfImageBand, "ossimNitfImageBand", ossimObject);
-
-ossimNitfImageBand::ossimNitfImageBand()
-{
-}
-
-ossimNitfImageBand::~ossimNitfImageBand()
-{
-}
-
diff --git a/src/ossim/support_data/ossimNitfImageBandV2_0.cpp b/src/ossim/support_data/ossimNitfImageBandV2_0.cpp
deleted file mode 100644
index f8bd270..0000000
--- a/src/ossim/support_data/ossimNitfImageBandV2_0.cpp
+++ /dev/null
@@ -1,217 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfImageBandV2_0.cpp 16035 2009-12-03 21:32:27Z dburken $
-
-#include <sstream>
-#include <iostream>
-#include <iomanip>
-#include <ossim/support_data/ossimNitfImageBandV2_0.h>
-#include <ossim/base/ossimString.h>
-
-ossimNitfImageBandV2_0::ossimNitfImageBandV2_0()
-{
-   clearFields();
-}
-
-ossimNitfImageBandV2_0::~ossimNitfImageBandV2_0()
-{
-}
-
-void ossimNitfImageBandV2_0::parseStream(std::istream& in)
-{
-   theLookupTables.clear();
-   if(in)
-   {      
-      theLookupTables.clear();
-      in.read(theBandRepresentation, 2);
-      in.read(theBandSignificance, 6);
-      in.read(theBandImageFilterCondition, 1);
-      in.read(theBandStandardImageFilterCode, 3);
-      in.read(theBandNumberOfLuts, 1);
-
-      long numberOfLuts = ossimString(theBandNumberOfLuts).toLong();
-
-      if(numberOfLuts > 0)
-      {
-         theLookupTables.resize(numberOfLuts);
-         in.read(theBandNumberOfLutEntries, 5);
-         
-         ossim_uint32 numberOfLutsIndex = numberOfLuts;
-         ossim_uint32 numberOfLutEntries = ossimString(theBandNumberOfLutEntries).toLong();
-         ossim_uint32 idx = 0;
-
-         while(idx < numberOfLutsIndex)
-         {
-            theLookupTables[idx] = new ossimNitfImageLutV2_0; 
-            theLookupTables[idx]->setNumberOfEntries(numberOfLutEntries);
-            theLookupTables[idx]->parseStream(in);
-            
-            ++idx;
-         }
-      }
-   }   
-}
-
-void ossimNitfImageBandV2_0::writeStream(std::ostream& out)
-{
-   out.write(theBandRepresentation, 2);
-   out.write(theBandSignificance, 6);
-   out.write(theBandImageFilterCondition, 1);
-   out.write(theBandStandardImageFilterCode, 3);
-   out.write(theBandNumberOfLuts, 1);
-
-   if(ossimString(theBandNumberOfLuts) > 0)
-   {
-      // lut output not supported currently
-   }
-}
-
-std::ostream& ossimNitfImageBandV2_0::print(std::ostream& out,
-                                            const std::string& prefix,
-                                            ossim_uint32 band)const
-{
-   std::ostringstream os;
-   os << std::setw(3) << std::setfill('0') << (band+1) << ":";
-
-   ossimString tmpStr = "IREPBAND";
-   tmpStr += os.str();
-   
-   out << prefix << std::setw(24)
-       << tmpStr << theBandRepresentation << "\n";
-
-   tmpStr = "ISUBCAT";
-   tmpStr += os.str();
-   
-   out << prefix << std::setw(24)
-       << tmpStr << theBandSignificance << "\n";
-
-   tmpStr = "IFC";
-   tmpStr += os.str();
-   
-   out << prefix << std::setw(24)
-       << tmpStr << theBandImageFilterCondition << "\n";
-
-   tmpStr = "IMFLT";
-   tmpStr += os.str();
-
-   out << prefix << std::setw(24)
-       << tmpStr << theBandStandardImageFilterCode << "\n";
-
-   tmpStr = "NLUTS";
-   tmpStr += os.str();
-
-   out << prefix << std::setw(24)
-       << tmpStr << theBandNumberOfLuts << "\n";
-
-   tmpStr = "NELUTS";
-   tmpStr += os.str();
-
-   out << prefix << std::setw(24)
-       << tmpStr << theBandNumberOfLutEntries << "\n";
-   
-   return out;
-}
-
-ossim_uint32 ossimNitfImageBandV2_0::getNumberOfLuts()const
-{
-   return static_cast<ossim_uint32>(theLookupTables.size());
-}
-
-const ossimRefPtr<ossimNitfImageLut> ossimNitfImageBandV2_0::getLut(ossim_uint32 idx)const
-{
-   if(idx < getNumberOfLuts())
-   {
-      return theLookupTables[idx];
-   }
-   
-   return NULL;
-}
-
-ossimRefPtr<ossimNitfImageLut> ossimNitfImageBandV2_0::getLut(ossim_uint32 idx)
-{
-   if(idx < getNumberOfLuts())
-   {
-      return theLookupTables[idx];
-   }
-   
-   return NULL;
-}
-
-ossimString ossimNitfImageBandV2_0::getBandRepresentation()const
-{
-   return ossimString(theBandRepresentation);
-}
-
-void ossimNitfImageBandV2_0::setBandRepresentation(const ossimString& rep)
-{
-   std::ostringstream out;
-
-   out << std::setw(2)
-       << std::setfill(' ')
-       << std::setiosflags(std::ios::left)
-       << rep.c_str();
-
-   memcpy(theBandRepresentation, out.str().c_str(), 2);
-}
-
-ossimString ossimNitfImageBandV2_0::getBandSignificance()const
-{
-   return ossimString(theBandSignificance);
-}
-
-void ossimNitfImageBandV2_0::setBandSignificance(const ossimString& rep)
-{
-   std::ostringstream out;
-   
-   out << std::setw(6)
-       << std::setfill(' ')
-       << rep.c_str();
-
-   memcpy(theBandSignificance, out.str().c_str(), 6);
-}
-
-void ossimNitfImageBandV2_0::clearFields()
-{
-   memset(theBandRepresentation, ' ', 2);
-   memset(theBandSignificance, ' ', 6);
-   memset(theBandImageFilterCondition, 'N', 1);
-   memset(theBandStandardImageFilterCode, ' ', 3);
-   memset(theBandNumberOfLuts, '0', 1);
-   memset(theBandNumberOfLutEntries, ' ', 5);
-   
-   theLookupTables.clear();
-   theBandRepresentation[2] = '\0';
-   theBandSignificance[6] = '\0';
-   theBandImageFilterCondition[1] = '\0';
-   theBandStandardImageFilterCode[3] = '\0';
-   theBandNumberOfLuts[1] = '\0';
-   theBandNumberOfLutEntries[5] = '\0';
-}
-
-void ossimNitfImageBandV2_0::printLookupTables(std::ostream& out)const
-{
-   std::vector<ossimRefPtr<ossimNitfImageLut> >::const_iterator tables;
-
-   tables = theLookupTables.begin();
-   while(tables != theLookupTables.end())
-   {
-      if((*tables).valid())
-      {
-         out << *((*tables).get());
-      }
-      ++tables;
-      if(tables != theLookupTables.end())
-      {
-         out << std::endl;
-      }
-   }
-}
diff --git a/src/ossim/support_data/ossimNitfImageHeader.cpp b/src/ossim/support_data/ossimNitfImageHeader.cpp
deleted file mode 100644
index ce10757..0000000
--- a/src/ossim/support_data/ossimNitfImageHeader.cpp
+++ /dev/null
@@ -1,396 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfImageHeader.cpp 18443 2010-11-22 23:42:39Z gpotts $
-
-#include <cmath> /* for fmod */
-#include <iomanip>
-#include <sstream>
-
-#include <ossim/support_data/ossimNitfImageHeader.h>
-#include <ossim/base/ossimContainerProperty.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimNotifyContext.h>
-
-RTTI_DEF2(ossimNitfImageHeader,
-          "ossimNitfImageHeader",
-          ossimObject,
-          ossimPropertyInterface)
-static const char* TAGS_KW = "tags";
-ossimNitfImageHeader::ossimNitfImageHeader()
-{
-}
-
-ossimNitfImageHeader::~ossimNitfImageHeader()
-{
-}
-
-bool ossimNitfImageHeader::getTagInformation(ossimNitfTagInformation& tagInfo,
-                                             const ossimString& tagName)const
-{
-   if(theTagList.size())
-   {
-      for(ossim_uint32 idx = 0; idx < theTagList.size(); ++idx)
-      {
-         if(theTagList[idx].getTagName() == tagName)
-         {
-            tagInfo = theTagList[idx];
-            return true;
-         }
-      }
-   }
-   
-   return false;
-}
-
-bool ossimNitfImageHeader::getTagInformation(ossimNitfTagInformation& tag,
-                                             ossim_uint32 idx)const
-{
-   bool result = false;
-   
-   if(idx < theTagList.size())
-   {
-      tag = theTagList[idx];
-      result = true;
-   }
-   
-   return result;
-}
-
-ossimRefPtr<ossimNitfRegisteredTag> ossimNitfImageHeader::getTagData(
-   const ossimString& tagName)
-{
-   if(theTagList.size())
-   {
-      for(ossim_uint32 idx = 0; idx < theTagList.size(); ++idx)
-      {
-         if(theTagList[idx].getTagName() == tagName)
-         {
-            return theTagList[idx].getTagData();
-         }
-      }
-   }
-
-   return ossimRefPtr<ossimNitfRegisteredTag>();
-}
-   
-const ossimRefPtr<ossimNitfRegisteredTag> ossimNitfImageHeader::getTagData(
-   const ossimString& tagName) const
-{
-   if(theTagList.size())
-   {
-      for(ossim_uint32 idx = 0; idx < theTagList.size(); ++idx)
-      {
-         if(theTagList[idx].getTagName() == tagName)
-         {
-            return theTagList[idx].getTagData();
-         }
-      }
-   }
-   
-   return ossimRefPtr<ossimNitfRegisteredTag>();
-}
-
-ossim_uint32 ossimNitfImageHeader::getNumberOfTags()const
-{
-   return static_cast<ossim_uint32>(theTagList.size());
-}
-
-void ossimNitfImageHeader::addTag(const ossimNitfTagInformation& tag)
-{
-   removeTag(tag.getTagName());
-   theTagList.push_back(tag);
-}
-
-void ossimNitfImageHeader::removeTag(const ossimString& tagName)
-{
-   ossim_uint32 idx = 0;
-   for(idx = 0; idx < theTagList.size(); ++idx)
-   {
-      if(theTagList[idx].getTagName() == tagName)
-      {
-         theTagList.erase(theTagList.begin() + idx);
-         return;
-      }
-   }
-}
-
-bool ossimNitfImageHeader::isSameAs(const ossimNitfImageHeader* hdr) const
-{
-   if (!hdr) return false;
-   
-   return ( (isCompressed() == hdr->isCompressed()) &&
-            (getNumberOfRows() == hdr->getNumberOfRows()) &&
-            (getNumberOfBands() == hdr->getNumberOfBands()) &&
-            (getNumberOfCols() == hdr->getNumberOfCols()) &&
-            (getNumberOfBlocksPerRow() == hdr->getNumberOfBlocksPerRow()) &&
-            (getNumberOfBlocksPerCol() == hdr->getNumberOfBlocksPerCol()) &&
-            (getNumberOfPixelsPerBlockHoriz() ==
-             hdr->getNumberOfPixelsPerBlockHoriz()) &&
-            (getNumberOfPixelsPerBlockVert() ==
-             hdr->getNumberOfPixelsPerBlockVert()) &&
-            (getBitsPerPixelPerBand() == hdr->getBitsPerPixelPerBand()) &&
-            (getImageRect() == hdr->getImageRect()) &&
-            (getIMode() == hdr->getIMode()) &&
-            (getCoordinateSystem() == hdr->getCoordinateSystem()) &&
-            (getGeographicLocation() == hdr->getGeographicLocation()) );
-}
-
-
-void ossimNitfImageHeader::setProperty(ossimRefPtr<ossimProperty> /* property */)
-{
-}
-
-ossimRefPtr<ossimProperty> ossimNitfImageHeader::getProperty(const ossimString& name)const
-{
-   ossimProperty* result = 0;
-
-   if(name == TAGS_KW)
-   {
-      ossim_uint32 idxMax = getNumberOfTags();
-      if(idxMax > 0)
-      {
-         ossimContainerProperty* containerProperty = new ossimContainerProperty;
-         containerProperty->setName(name);
-         ossim_uint32 idx = 0;
-
-         result = containerProperty;
-         for(idx = 0; idx < idxMax; ++idx)
-         {
-            ossimNitfTagInformation tagInfo;
-            getTagInformation(tagInfo, idx);
-            
-            const ossimRefPtr<ossimNitfRegisteredTag> tagData = tagInfo.getTagData();
-            if(tagData.valid())
-            {
-               ossimContainerProperty* containerPropertyTag = new ossimContainerProperty;
-               containerPropertyTag->setName(tagInfo.getTagName());
-               std::vector<ossimRefPtr<ossimProperty> > propertyList;
-               tagData->getPropertyList(propertyList);
-               
-               containerPropertyTag->addChildren(propertyList);
-               containerProperty->addChild(containerPropertyTag);
-            }
-            else
-            {
-               containerProperty->addStringProperty(tagInfo.getTagName(), "", true);
-            }
-         }
-      }
-   }
-   
-   return result;
-}
-
-void ossimNitfImageHeader::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   propertyNames.push_back(TAGS_KW);
-  
-}
-
-ossim_uint32 ossimNitfImageHeader::getTotalTagLength()const
-{
-   ossim_uint32 tagLength = 0;
-   
-   for(ossim_uint32 i = 0; i < theTagList.size(); ++i)
-   {
-      tagLength += theTagList[i].getTotalTagLength();
-   }
-
-   return tagLength;
-}
-
-std::ostream& ossimNitfImageHeader::printTags(std::ostream& out,
-                                              const std::string& prefix)const
-{
-   for(ossim_uint32 i = 0; i < theTagList.size(); ++i)
-   {
-      ossimRefPtr<ossimNitfRegisteredTag> tag = theTagList[i].getTagData();
-      if (tag.valid())
-      {
-         tag->print(out, prefix);
-      }
-   }
-   return out;
-}
-
-void ossimNitfImageHeader::getMetadata(ossimKeywordlist& kwl,
-                                       const char* prefix) const
-{
-   kwl.add(prefix, "source",
-           getImageSource().c_str(),
-           false);
-   kwl.add(prefix,
-           "image_date",
-           getAcquisitionDateMonthDayYear().c_str(),
-           false);
-   kwl.add(prefix,
-           "image_title",
-           getTitle().c_str(),
-           false);
-}
-
-bool ossimNitfImageHeader::hasLut() const
-{
-   bool result = false;
-
-   const ossim_uint32 BANDS = static_cast<ossim_uint32>(getNumberOfBands());
-   for (ossim_uint32 band = 0; band < BANDS; ++band)
-   {
-      const ossimRefPtr<ossimNitfImageBand> imgBand = getBandInformation(band);
-      if(imgBand.valid())
-      {
-         ossim_uint32 luts = imgBand->getNumberOfLuts();
-         if(luts > 0)
-         {
-            if(imgBand->getLut(0).valid())
-            {
-               result = true;
-               break;
-            }
-         }
-      }
-   }
-   
-   return result;
-}
-
-ossimRefPtr<ossimNBandLutDataObject> ossimNitfImageHeader::createLut(
-   ossim_uint32 bandIdx)const
-{
-   ossimRefPtr<ossimNBandLutDataObject> result;
-   
-   if(bandIdx < (ossim_uint32)getNumberOfBands())
-   {
-      const ossimRefPtr<ossimNitfImageBand> band = getBandInformation(bandIdx);
-      if(band.valid())
-      {
-         ossim_uint32 bands = band->getNumberOfLuts();
-         if(bands > 0)
-         {
-            if(band->getLut(0).valid())
-            {
-               ossim_uint32 entries = band->getLut(0)->getNumberOfEntries();
-               
-               result = new ossimNBandLutDataObject();
-               result->create(entries, band->getNumberOfLuts());
-               ossim_uint32 bIdx;
-               ossim_uint32 entryIdx;
-
-               for(bIdx = 0; bIdx < bands; ++bIdx)
-               {
-                  const ossimRefPtr<ossimNitfImageLut> lut = band->getLut(bIdx);
-                  if(lut.valid())
-                  {
-                     for(entryIdx = 0; entryIdx < entries; ++entryIdx)
-                     {
-                        (*result)[entryIdx][bIdx] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(lut->getValue(entryIdx));
-                     }
-                  }
-               }
-            }
-         }
-      }
-   }
-
-   return result;
-}
-
-
-void ossimNitfImageHeader::checkForGeographicTiePointTruncation(
-   const ossimDpt& tie) const
-{
-   // One arc second in decimal degrees.
-   const ossim_float64 ARC_SECOND = 1.0/3600.0;
-
-   // Very small number.
-   const ossim_float64 FUDGE_FACTOR = 0.000000001;
-
-   // Remainder portion of latitude divided by an arc second.
-   ossim_float64 y = std::fmod(tie.y, ARC_SECOND);
-
-   // Remainder portion of longitue divided by an arc second.
-   ossim_float64 x = std::fmod(tie.x, ARC_SECOND);
-
-   if ( (std::fabs(y) > FUDGE_FACTOR) || (std::fabs(x) > FUDGE_FACTOR) )
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimNitfImageHeader WARNING:\n"
-         << "Tie point will be truncated in image header:  "
-         << tie
-         << std::endl;
-   }
-}
-
-void ossimNitfImageHeader::getDecimationFactor(ossim_float64& result) const
-{
-   //---
-   // Look for string like:
-   // 
-   // "/2" = 1/2
-   // "/4  = 1/4
-   // ...
-   // "/16 = 1/16
-   // 
-   // If it is full resolution it should be "1.0"
-   //
-   // or
-   //
-   // "0.5" which is the same as "/2"
-   // "0.25" which is the same as "/4"
-   //---
-   ossimString os = getImageMagnification();
-
-   // Spec says to fill with spaces so strip them.
-   os.trim(ossimString(" "));
-
-   if (os.size())
-   {
-      if ( os.contains("/") )
-      {
-         os = os.after("/");
-         result = os.toFloat64();
-         if (result)
-         {
-            result = 1.0 / result;
-         }
-      }
-      else
-      {
-         result = os.toFloat64();
-      }
-   }
-   else
-   {
-      result = ossim::nan();
-   }
-}
-
-
-bool ossimNitfImageHeader::saveState(ossimKeywordlist& kwl, const ossimString& prefix)const
-{
-   if(!ossimObject::saveState(kwl, prefix)) return false;
-   ossimString tagsPrefix = prefix;
-   
-   for(ossim_uint32 i = 0; i < theTagList.size(); ++i)
-   {
-      ossimRefPtr<ossimNitfRegisteredTag> tag = theTagList[i].getTagData();
-      if (tag.valid())
-      {
-         if(!tag->saveState(kwl, tagsPrefix))
-         {
-            return false;
-         }
-      }
-   }
-   return true;
-}
diff --git a/src/ossim/support_data/ossimNitfImageHeaderV2_0.cpp b/src/ossim/support_data/ossimNitfImageHeaderV2_0.cpp
deleted file mode 100644
index f129cd7..0000000
--- a/src/ossim/support_data/ossimNitfImageHeaderV2_0.cpp
+++ /dev/null
@@ -1,1038 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfImageHeaderV2_0.cpp 21518 2012-08-22 21:15:56Z dburken $
-
-
-#include <iomanip>
-
-#include <ossim/support_data/ossimNitfImageHeaderV2_0.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimDrect.h>
-#include <cstring> //for memset
-#include <ossim/base/ossimEndian.h>
-#include <ossim/support_data/ossimNitfVqCompressionHeader.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <stdexcept>
-#include <sstream>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/support_data/ossimNitfCommon.h>
-static const ossimTrace traceDebug(ossimString("ossimNitfImageHeaderV2_0:debug"));
-
-RTTI_DEF1(ossimNitfImageHeaderV2_0,
-          "ossimNitfImageHeaderV2_0",
-          ossimNitfImageHeaderV2_X);
-
-const ossimString ossimNitfImageHeaderV2_0::ISCODE_KW = "iscode";
-const ossimString ossimNitfImageHeaderV2_0::ISCTLH_KW = "isctlh";
-const ossimString ossimNitfImageHeaderV2_0::ISREL_KW = "isrel";
-const ossimString ossimNitfImageHeaderV2_0::ISCAUT_KW = "iscaut";
-const ossimString ossimNitfImageHeaderV2_0::CTLN_KW = "ctln";
-const ossimString ossimNitfImageHeaderV2_0::ISDWNG_KW = "isdwng";
-const ossimString ossimNitfImageHeaderV2_0::ISDEVT_KW = "isdevt";
-
-ossimNitfImageHeaderV2_0::ossimNitfImageHeaderV2_0()
-{
-   clearFields();
-}
-
-ossimNitfImageHeaderV2_0::~ossimNitfImageHeaderV2_0()
-{
-}
-
-void ossimNitfImageHeaderV2_0::parseStream(std::istream &in)
-{
-   clearFields();
-   theImageBands.clear();
-      
-   in.read(theType, 2);
-   if(ossimString(theType) != "IM")
-   {
-      // error
-   }
-   in.read(theImageId, 10);
-   in.read(theDateTime, 14);
-   in.read(theTargetId, 17);
-   in.read(theTitle, 80);
-   in.read(theSecurityClassification, 1);
-   in.read(theCodewords, 40);
-   in.read(theControlAndHandling, 40);
-   in.read(theReleasingInstructions, 40);
-   in.read(theClassificationAuthority, 20);
-   in.read(theSecurityControlNumber, 20);
-   in.read(theSecurityDowngrade, 6);
-   if(ossimString(theSecurityDowngrade) == "999998")
-   {
-      in.read(theDowngradingEvent, 40);
-   }
-   in.read(theEncryption, 1);
-   in.read(theImageSource, 42);
-   in.read(theSignificantRows, 8);
-   in.read(theSignificantCols, 8);
-   in.read(thePixelValueType, 3);
-   in.read(theRepresentation, 8);
-   in.read(theCategory, 8);
-   in.read(theActualBitsPerPixelPerBand, 2);
-   in.read(theJustification, 1);
-   in.read(theCoordinateSystem, 1);
-   if(theCoordinateSystem[0] != 'N')
-   {
-      in.read(theGeographicLocation, 60);
-   }
-   in.read(theNumberOfComments, 1);
-   ossim_uint32 numberOfComments = ossimString(theNumberOfComments).toInt32();
-   if(numberOfComments > 0)
-   {
-      // for now let's ignore the comments about the image
-      in.ignore(numberOfComments*80);
-   }
-   in.read(theCompression, 2);
-   // check to see if there is compression
-   ossimString temp = theCompression;
-   if((temp !=  "NC") &&
-      (temp != "NM"))
-   {
-      // get the rate if compression exists.
-      in.read(theCompressionRateCode, 4);
-   }
-   in.read(theNumberOfBands, 1);
-   ossim_uint32 numberOfBands = ossimString(theNumberOfBands).toUInt32();
-   theImageBands.resize(numberOfBands);
-   ossim_uint32 idx = 0;
-   while(idx < numberOfBands)
-   {
-      theImageBands[idx] = new ossimNitfImageBandV2_0;
-      theImageBands[idx]->parseStream(in);
-      ++idx;
-   }
-   in.read(theImageSyncCode, 1);
-   in.read(theImageMode, 1);
-   in.read(theNumberOfBlocksPerRow, 4);
-   in.read(theNumberOfBlocksPerCol, 4);
-   in.read(theNumberOfPixelsPerBlockHoriz, 4);
-   in.read(theNumberOfPixelsPerBlockVert, 4);
-   in.read(theNumberOfBitsPerPixelPerBand, 2);
-   in.read(theDisplayLevel, 3);
-   in.read(theAttachmentLevel, 3);
-   in.read(theImageLocation, 10);
-   in.read(theImageMagnification, 4);
-   in.read(theUserDefinedImageDataLength, 5);
-   std::streampos userDefinedDataLen = (std::streampos)ossimString(theUserDefinedImageDataLength).toUInt32();
-   theTagList.clear();
-   ossimNitfTagInformation         headerTag;
-   std::streampos start   = in.tellg();
-   std::streampos current = in.tellg();
-   if(userDefinedDataLen > 0)
-   {
-      in.read(theUserDefinedOverflow, 3);
-      
-      while((current - start) < userDefinedDataLen)
-      {
-         headerTag.parseStream(in);
-         theTagList.push_back(headerTag);
-         // in.ignore(headerTag.getTagLength());
-         // headerTag.clearFields();
-         current = in.tellg();
-      }
-   }
-
-   in.read(theExtendedSubheaderDataLen, 5);
-   std::streampos extSubHeadLen = (std::streampos)ossimString(theExtendedSubheaderDataLen).toUInt32();
-   start   = in.tellg();
-   current = in.tellg();
-   if(extSubHeadLen > 0)
-   {
-      in.read(theExtendedSubheaderOverflow, 3);
-
-      // ossim_uint32 test = 0;
-      while((current - start) < extSubHeadLen)
-      {
-         headerTag.parseStream(in);
-         theTagList.push_back(headerTag);
-         // test = headerTag.getTagLength()+in.tellg();
-         // in.ignore(headerTag.getTagLength());
-         // headerTag.clearFields();
-         current = in.tellg();
-      }
-   }
-   
-   ossimString compressionType = theCompression;
-   compressionType = compressionType.trim().upcase();
-   ossimEndian endian;
-   ossim_uint64 locationBefore = in.tellg();
-
-   //---
-   // Note: "C4" added to skip over the image data mask subheader.
-   // See MIL-STD-2500A paragraph 5.5.1.5
-   //
-   // Seems like CIB data does not have.  Could not find a hard and fast
-   // rule in the specs.  Need a better was to detect if this needs to be
-   // read. (drb - 20100317)
-   //---
-   if( (compressionType == "NM") ||
-       (compressionType == "M0") ||
-       (compressionType == "M3") ||
-       (compressionType == "M4") ||
-       ( (compressionType == "C4") && ( !getImageId().contains("CIB")) ) )
-   {
-      in.read((char*)(&theBlockedImageDataOffset), 4);
-      in.read((char*)(&theBlockMaskRecordLength),2);
-      in.read((char*)(&thePadPixelMaskRecordLength), 2);
-      in.read((char*)(&theTransparentOutputPixelCodeLength), 2);
-
-      
-      if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
-      {
-         endian.swap(theBlockedImageDataOffset);
-         endian.swap(theBlockMaskRecordLength);
-         endian.swap(thePadPixelMaskRecordLength);
-         endian.swap(theTransparentOutputPixelCodeLength);
-      }
-      if(theTransparentOutputPixelCodeLength <9)
-      {
-         if(theTransparentOutputPixelCodeLength != 0)
-         {
-            ossim_uint8 padOutputPixelCode;
-            in.read((char*)(&padOutputPixelCode), 1);
-            thePadOutputPixelCode = padOutputPixelCode;
-         }
-      }
-      else
-      {
-         in.read((char*)(&thePadOutputPixelCode), 2);
-         if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
-         {
-            endian.swap(thePadOutputPixelCode);
-         }
-         // I need to add code here to check for justification when its 2 bytes
-         // but the code length is less than 16 bits.
-         //
-      }
-      if(theBlockMaskRecordLength>0)
-      {
-         ossim_uint32 totalNumber = 0;
-         if(theImageMode[0] == 'S')
-         {
-            totalNumber = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol()*getNumberOfBands();
-         }
-         else
-         {
-            totalNumber = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol();
-         }
-         ossim_uint32 *blockRead = new ossim_uint32[totalNumber];
-         ossim_uint32 idx = 0;
-         theBlockMaskRecords.resize(totalNumber);
-         in.read((char*)(blockRead), totalNumber*4);
-         for(idx = 0; idx < totalNumber; ++idx)
-         {
-            if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
-            {
-               endian.swap(blockRead[idx]);
-            }
-            theBlockMaskRecords[idx] = blockRead[idx];
-         }
-         delete [] blockRead;
-      }
-      if((thePadPixelMaskRecordLength > 0)||
-         (( (getCompressionCode().upcase() == "M3"))&&
-          (thePadPixelMaskRecordLength == 0)))
-      {
-         ossim_uint32 totalNumber = 0;
-         if(theImageMode[0] == 'S')
-         {
-            totalNumber = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol()*getNumberOfBands();
-         }
-         else
-         {
-            totalNumber = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol();
-         }
-         ossim_uint32 *blockRead = new ossim_uint32[totalNumber];
-         ossim_uint32 idx = 0;
-         thePadPixelMaskRecords.resize(totalNumber);
-         in.read((char*)(blockRead), totalNumber*4);
-         for(idx = 0; idx < totalNumber; ++idx)
-         {
-            if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
-            {
-               endian.swap(blockRead[idx]);
-            }
-            thePadPixelMaskRecords[idx] = blockRead[idx];
-         }
-         delete [] blockRead;
-      }
-   }
-
-   theCompressionHeader = 0;
-   if((getCompressionCode() == "C4")||
-      (getCompressionCode() == "M4"))
-   {
-      ossimRefPtr<ossimNitfVqCompressionHeader> compressionHeader =
-         new ossimNitfVqCompressionHeader;
-      compressionHeader->parseStream(in);
-      // do a check to see if the compression header is good
-      //
-      
-      if( compressionHeader->getCompressionAlgorithmId()!= 1 )
-      {
-         compressionHeader = 0;
-      }
-      theCompressionHeader = compressionHeader.get();
-   }
-
-   ossim_uint64 delta = (ossim_uint64)in.tellg() - locationBefore;
-   if(delta < theBlockedImageDataOffset)
-   {
-      in.ignore(theBlockedImageDataOffset-delta);
-   }
-   
-   //
-   // The stream should now be at the start of the data location so capture
-   // it.
-   //
-   theDataLocation = in.tellg();
-}
-
-void ossimNitfImageHeaderV2_0::writeStream(std::ostream &out)
-{
-   out.write(theType, 2);
-   out.write(theImageId, 10);
-   out.write(theDateTime, 14);
-   out.write(theTargetId, 17);
-   out.write(theTitle, 80);
-   out.write(theSecurityClassification, 1);
-   out.write(theCodewords, 40);
-   out.write(theControlAndHandling, 40);
-   out.write(theReleasingInstructions, 40);
-   out.write(theClassificationAuthority, 20);
-   out.write(theSecurityControlNumber, 20);
-   out.write(theSecurityDowngrade, 6);
-   if(ossimString(theSecurityDowngrade) == "999998")
-   {
-      out.write(theDowngradingEvent, 40);
-   }
-   out.write(theEncryption, 1);
-   out.write(theImageSource, 42);
-   out.write(theSignificantRows, 8);
-   out.write(theSignificantCols, 8);
-   out.write(thePixelValueType, 3);
-   out.write(theRepresentation, 8);
-   out.write(theCategory, 8);
-   out.write(theActualBitsPerPixelPerBand, 2);
-   out.write(theJustification, 1);
-   out.write(theCoordinateSystem, 1);
-   if(theCoordinateSystem[0] != 'N')
-   {
-      out.write(theGeographicLocation, 60);
-   }
-   out.write(theNumberOfComments, 1);
-   out.write(theCompression, 2);
-   if(ossimString(theCompression) != "NC")
-   {
-      out.write(theCompressionRateCode, 4);
-   }
-   out.write(theNumberOfBands, 1);
-   ossim_uint32 bandIdx = 0;
-   for(bandIdx=0;bandIdx<theImageBands.size();++bandIdx)
-   {
-      theImageBands[bandIdx]->writeStream(out);
-   }
-   out.write(theImageSyncCode, 1);
-   out.write(theImageMode, 1);
-   out.write(theNumberOfBlocksPerRow, 4);
-   out.write(theNumberOfBlocksPerCol, 4);
-   out.write(theNumberOfPixelsPerBlockHoriz, 4);
-   out.write(theNumberOfPixelsPerBlockVert, 4);
-   out.write(theNumberOfBitsPerPixelPerBand, 2);
-   out.write(theDisplayLevel, 3);
-   out.write(theAttachmentLevel, 3);
-   out.write(theImageLocation, 10);
-   out.write(theImageMagnification, 4);
-   out.write(theUserDefinedImageDataLength, 5);
-   if(ossimString(theUserDefinedImageDataLength).toInt32() > 0)
-   {
-      out.write(theUserDefinedOverflow, 3);
-   }
-   ossim_uint32 totalLength = getTotalTagLength();
-   
-   if(totalLength == 0)
-   {
-      //memcpy(theExtendedSubheaderDataLen, "00000", 5);
-      out.write(theExtendedSubheaderDataLen, 5);
-   }
-   else
-   {
-      totalLength += 3; // per Table A-3 of MIL-STD-2500B
-      
-      if(totalLength <= 99999)
-      {
-         std::ostringstream tempOut;
-         
-         tempOut << std::setw(5)
-         << std::setfill('0')
-         << std::setiosflags(ios::right)
-         << totalLength;
-         
-         memcpy(theExtendedSubheaderDataLen, tempOut.str().c_str(), 5);
-         
-         out.write(theExtendedSubheaderDataLen, 5);
-         memset(theExtendedSubheaderOverflow, '0', 3);
-         
-         if(totalLength > 0)
-         {
-            out.write(theExtendedSubheaderOverflow, 3);
-            
-            ossim_uint32 i = 0;
-            
-            for(i = 0; i < theTagList.size(); ++i)
-            {
-               theTagList[i].writeStream(out);
-            }
-         }
-      }
-      else
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << "WARNING ossimNitfFileHeaderV2_0::writeStream: Only support writing of total tag length < 99999" << std::endl;
-      }
-   }
-}
-
-std::ostream& ossimNitfImageHeaderV2_0::print(std::ostream& out,
-                                              const std::string& prefix) const
-{
-   out << setiosflags(std::ios::left)
-       << prefix << std::setw(24) << "IM:"
-       << theType << "\n"
-       << prefix << std::setw(24) << "IID:"
-       << theImageId  << "\n"
-       << prefix << std::setw(24) << "IDATIM:"
-       << theDateTime << "\n" 
-       << prefix << std::setw(24) << "TGTID:"
-       << theTargetId  << "\n"
-       << prefix << std::setw(24) << "ITITLE:"
-       << theTitle  << "\n"   
-       << prefix << std::setw(24) << "ISCLAS:"
-       << theSecurityClassification << "\n"
-       << prefix << std::setw(24) << "ISCODE:"
-       << theCodewords  << "\n"
-       << prefix << std::setw(24) << "ISCTLH:"
-       << theControlAndHandling << "\n" 
-       << prefix << std::setw(24) << "ISREL:"
-       << theReleasingInstructions << "\n" 
-       << prefix << std::setw(24) << "ISCAUT:"
-       << theClassificationAuthority << "\n" 
-       << prefix << std::setw(24) << "ISCTLN:"
-       << theSecurityControlNumber << "\n" 
-       << prefix << std::setw(24) << "ISDWNG:"
-       << theSecurityDowngrade  << "\n"    
-       << prefix << std::setw(24) << "ISDEBT:"
-       << theDowngradingEvent  << "\n"
-       << prefix << std::setw(24) << "ENCRYP:"
-       << theEncryption  << "\n"
-       << prefix << std::setw(24) << "ISORCE:"
-       << theImageSource  << "\n"
-       << prefix << std::setw(24) << "NROWS:"
-       << theSignificantRows  << "\n"
-       << prefix << std::setw(24) << "NCOLS:"
-       << theSignificantCols  << "\n"
-       << prefix << std::setw(24) << "PVTYPE:"
-       << thePixelValueType  << "\n"
-       << prefix << std::setw(24) << "IREP:"
-       << theRepresentation  << "\n"
-       << prefix << std::setw(24) << "ICAT:"
-       << theCategory  << "\n"      
-       << prefix << std::setw(24) << "ABPP:"
-       << theActualBitsPerPixelPerBand << "\n"
-       << prefix << std::setw(24) << "PJUST:"
-       << theJustification  << "\n"
-       << prefix << std::setw(24) << "ICORDS:"
-       << theCoordinateSystem  << "\n"
-       << prefix << std::setw(24) << "IGEOLO:"
-       << theGeographicLocation  << "\n"
-       << prefix << std::setw(24) << "NICOM:"
-       << theNumberOfComments << "\n" 
-       << prefix << std::setw(24) << "IC:"
-       << theCompression  << "\n"     
-       << prefix << std::setw(24) << "COMRAT:"
-       << theCompressionRateCode  << "\n"
-       << prefix << std::setw(24) << "NBANDS:"
-       << theNumberOfBands  << "\n";
-
-   ossim_uint32 idx = 0;
-   for(idx = 0; idx < theImageBands.size(); ++idx)
-   {
-      if(theImageBands[idx].valid())
-      {
-         theImageBands[idx]->print(out, prefix, idx); 
-      }
-   }
-   
-   out << prefix << std::setw(24) << "ISYNC:"
-       << theImageSyncCode << "\n" 
-       << prefix << std::setw(24) << "IMODE:"
-       << theImageMode  << "\n"
-       << prefix << std::setw(24) << "NBPR:"
-       << theNumberOfBlocksPerRow << "\n" 
-       << prefix << std::setw(24) << "NBPC:"
-       << theNumberOfBlocksPerCol << "\n" 
-       << prefix << std::setw(24) << "NPPBH:"
-       << theNumberOfPixelsPerBlockHoriz << "\n" 
-       << prefix << std::setw(24) << "NPPBV:"
-       << theNumberOfPixelsPerBlockVert  << "\n"
-       << prefix << std::setw(24) << "NBPP:"
-       << theNumberOfBitsPerPixelPerBand  << "\n"
-       << prefix << std::setw(24) << "IDLVL:"
-       << theDisplayLevel << "\n"
-       << prefix << std::setw(24) << "IALVL:"
-       << theAttachmentLevel << "\n" 
-       << prefix << std::setw(24) << "ILOC:"
-       << theImageLocation << "\n" 
-       << prefix << std::setw(24) << "IMAG:"
-       << theImageMagnification  << "\n"
-       << prefix << std::setw(24) << "UDIDL:"
-       << theUserDefinedImageDataLength  << "\n"
-       << prefix << std::setw(24) << "UDOFL:"
-       << theUserDefinedOverflow  << "\n"
-       << prefix << std::setw(24) << "IXSHDL:"
-       << theExtendedSubheaderDataLen  << "\n"
-       << prefix << std::setw(24) << "IXSOFL:"
-       << theExtendedSubheaderOverflow  << "\n";
-
-   if ( traceDebug() )
-   {
-       out << prefix << std::setw(24) << "theDataLocation:"
-           << theDataLocation << "\n"
-           << prefix << std::setw(24) << "theBlockedImageDataOffset:"
-           << theBlockedImageDataOffset << "\n"
-           << prefix << std::setw(24) << "theBlockMaskRecordLength:"
-           << theBlockMaskRecordLength << "\n"
-           << prefix << std::setw(24) << "thePadPixelMaskRecordLength:"
-           << thePadPixelMaskRecordLength << "\n"
-           << prefix << std::setw(24) << "theTransparentOutputPixelCodeLength:"
-           << theTransparentOutputPixelCodeLength << "\n"
-           << prefix << std::setw(24) << "thePadOutputPixelCode:"
-           << thePadOutputPixelCode << "\n";
-   }
-
-   if(theCompressionHeader.valid())
-   {
-      theCompressionHeader->print(out, prefix);
-   }
-
-   out << std::endl;
-
-   return printTags(out, prefix);
-}
-
-bool ossimNitfImageHeaderV2_0::saveState(ossimKeywordlist& kwl, const ossimString& prefix)const
-{
-   ossimNitfImageHeaderV2_X::saveState(kwl, prefix);
-   std::ostringstream out;
-   
-   kwl.add(prefix, "ITITLE", theTitle);
-
-   ossim_uint32 idx = 0;
-   if(theCompressionHeader.valid())
-   {
-      theCompressionHeader->saveState(kwl, prefix + "compression_header.");
-   }
-   
-   for(idx = 0; idx < theImageBands.size(); ++idx)
-   {
-      if(theImageBands[idx].valid())
-      {
-         theImageBands[idx]->print(out, "", idx); 
-      }
-   }
-   
-   out << std::endl;
-   
-   ossimKeywordlist kwlTemp;
-   
-   std::istringstream in(out.str());
-   if(kwlTemp.parseStream(in))
-   {
-      kwl.add(prefix, kwlTemp);
-   }
-   return true;
-}
-
-bool ossimNitfImageHeaderV2_0::isCompressed()const
-{
-   ossimString temp = theCompression;
-   temp = temp.trim();
-   return ((temp != "NC") &&
-           (temp != "NM"));
-}
-
-bool ossimNitfImageHeaderV2_0::isEncrypted()const
-{
-   return (theEncryption[0] == '1');
-}
-
-ossim_int32 ossimNitfImageHeaderV2_0::getNumberOfBands()const
-{
-   return ossimString(theNumberOfBands).toInt32();
-}
-
-ossim_int32 ossimNitfImageHeaderV2_0::getNumberOfRows()const
-{
-   return ossimString(theSignificantRows).toInt32();
-}
-
-ossim_int32 ossimNitfImageHeaderV2_0::getNumberOfCols()const
-{
-   return ossimString(theSignificantCols).toInt32();
-}
-
-ossim_int32 ossimNitfImageHeaderV2_0::getNumberOfBlocksPerRow()const
-{
-   return ossimString(theNumberOfBlocksPerRow).toInt32();
-}
-
-ossim_int32 ossimNitfImageHeaderV2_0::getNumberOfBlocksPerCol()const
-{
-   return ossimString(theNumberOfBlocksPerCol).toInt32();
-}
-
-ossim_int32 ossimNitfImageHeaderV2_0::getNumberOfPixelsPerBlockHoriz()const
-{
-   return ossimString(theNumberOfPixelsPerBlockHoriz).toInt32();
-}
-
-ossim_int32 ossimNitfImageHeaderV2_0::getNumberOfPixelsPerBlockVert()const
-{
-   return ossimString(theNumberOfPixelsPerBlockVert).toInt32();
-}
-
-ossimString ossimNitfImageHeaderV2_0::getImageId()const
-{
-   return theImageId;
-}
-
-ossim_int32 ossimNitfImageHeaderV2_0::getBitsPerPixelPerBand()const
-{
-   return ossimString(theNumberOfBitsPerPixelPerBand).toInt32();
-}
-
-ossim_int32 ossimNitfImageHeaderV2_0::getActualBitsPerPixelPerBand()const
-{
-   return ossimString(theActualBitsPerPixelPerBand).toInt32();
-}
-
-ossimString ossimNitfImageHeaderV2_0::getIMode() const
-{
-   return ossimString(theImageMode).trim();
-}
-
-ossimString ossimNitfImageHeaderV2_0::getSecurityClassification()const
-{
-   return ossimString(theSecurityClassification);
-}
-
-ossimString  ossimNitfImageHeaderV2_0::getImageDateAndTime() const
-{
-   return ossimString(theDateTime);
-}
-
-ossimString ossimNitfImageHeaderV2_0::getAcquisitionDateMonthDayYear(ossim_uint8 separationChar)const
-{
-   ossimString result;
-   ossimString month(theDateTime+9,
-                     theDateTime+12);
-   month = month.downcase();
-   if(month == "jan")
-   {
-      result += "01";
-   }
-   else if(month == "feb")
-   {
-      result += "02";
-   }
-   else if(month == "mar")
-   {
-      result += "03";
-   }
-   else if(month == "apr")
-   {
-      result += "04";
-   }
-   else if(month == "may")
-   {
-      result += "05";
-   }
-   else if(month == "jun")
-   {
-      result += "06";
-   }
-   else if(month == "jul")
-   {
-      result += "07";
-   }
-   else if(month == "aug")
-   {
-      result += "08";
-   }
-   else if(month == "sep")
-   {
-      result += "09";
-   }
-   else if(month == "oct")
-   {
-      result += "10";
-   }
-   else if(month == "nov")
-   {
-      result += "11";
-   }
-   else if(month == "dec")
-   {
-      result += "12";
-   }
-   result += ossimString(separationChar);
-   result += ossimString(theDateTime,
-                         theDateTime + 2);
-   result += ossimString(separationChar);
-   ossimString year(theDateTime+12,
-                    theDateTime+14);
-   if(year.toUInt32() < 70)
-   {
-      result += "20";
-   }
-   else
-   {
-      result += "19";
-   }
-   result += ossimString(theDateTime+12,
-                         theDateTime+14);
-
-   return result;
-}
-
-ossimString ossimNitfImageHeaderV2_0::getCategory()const
-{
-   return theCategory;
-}
-
-ossimString ossimNitfImageHeaderV2_0::getImageSource()const
-{
-   return theImageSource;
-}
-
-ossimString ossimNitfImageHeaderV2_0::getRepresentation()const
-{
-   return theRepresentation;
-}
-
-ossimString ossimNitfImageHeaderV2_0::getCoordinateSystem()const
-{
-	return theCoordinateSystem;
-}
-
-ossimString ossimNitfImageHeaderV2_0::getPixelValueType()const
-{
-   return ossimString(thePixelValueType).trim();
-}
-
-bool ossimNitfImageHeaderV2_0::hasBlockMaskRecords()const
-{
-   return (theBlockMaskRecords.size() > 0);
-}
-
-bool ossimNitfImageHeaderV2_0::hasPadPixelMaskRecords()const
-{
-   return (thePadPixelMaskRecords.size() > 0);
-}
-
-bool ossimNitfImageHeaderV2_0::hasTransparentCode()const
-{
-   return (theTransparentOutputPixelCodeLength > 0);
-}
-
-ossim_uint32 ossimNitfImageHeaderV2_0::getTransparentCode()const
-{
-   return thePadOutputPixelCode;
-}
-
-ossim_uint32 ossimNitfImageHeaderV2_0::getBlockMaskRecordOffset(ossim_uint32 blockNumber,
-                                                                ossim_uint32 bandNumber)const
-{
-   ossim_uint32 maxBlock = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol();
-   ossim_uint32 result = 0xffffffff;
-   
-   if((hasBlockMaskRecords())&&
-      (blockNumber < maxBlock))
-   {
-      if(theImageMode[0] == 'S')
-      {
-         if(bandNumber < (ossim_uint32)getNumberOfBands())
-         {
-            result = theBlockMaskRecords[bandNumber*maxBlock + blockNumber];
-         }
-      }
-      else
-      {
-         result = theBlockMaskRecords[blockNumber];
-      }
-   }
-
-   return result;
-}
-ossim_uint32 ossimNitfImageHeaderV2_0::getPadPixelMaskRecordOffset(ossim_uint32 blockNumber,
-                                                                   ossim_uint32 bandNumber)const
-{
-   ossim_uint32 maxBlock = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol();
-   ossim_uint32 result = 0xffffffff;
-   
-   if((hasPadPixelMaskRecords())&&
-      (blockNumber < maxBlock))
-   {
-      if(theImageMode[0] == 'S')
-      {
-         if(bandNumber < (ossim_uint32)getNumberOfBands())
-         {
-            result = thePadPixelMaskRecords[bandNumber*maxBlock + blockNumber];
-         }
-      }
-      else
-      {
-         result = thePadPixelMaskRecords[blockNumber];
-      }
-   }
-
-   return result;
-}
-
-void ossimNitfImageHeaderV2_0::clearFields()
-{
-   theTagList.clear();
-   
-   memcpy(theType, "IM", 2);
-   memset(theImageId, ' ', 10);
-   memset(theDateTime, ' ', 14);
-   memset(theTargetId, ' ', 17);
-   memset(theTitle, ' ', 80);
-   memset(theSecurityClassification, ' ', 1);
-   memset(theCodewords, ' ', 40);
-   memset(theControlAndHandling, ' ', 40);
-   memset(theReleasingInstructions, ' ', 40);
-   memset(theClassificationAuthority, ' ', 20);
-   memset(theSecurityControlNumber, ' ', 20);
-   memset(theSecurityDowngrade, ' ', 6);
-   memset(theDowngradingEvent, ' ', 40);
-   memset(theEncryption, '0', 1);
-   memset(theImageSource, ' ', 42);
-   memset(theSignificantRows, ' ', 8);
-   memset(theSignificantCols, ' ', 8);
-   memset(thePixelValueType, ' ', 3);
-   memset(theRepresentation, ' ', 8);
-   memset(theCategory, ' ', 8);
-   memset(theActualBitsPerPixelPerBand, '0', 2);
-   memset(theJustification, ' ', 1);
-   memset(theCoordinateSystem, 'N', 1);
-   memset(theGeographicLocation, ' ', 60);
-   memset(theNumberOfComments, '0', 1);
-   memcpy(theCompression, "NC", 2);
-   memset(theCompressionRateCode, ' ', 4);
-   memset(theNumberOfBands, ' ', 1);
-   memset(theImageSyncCode, '0', 1);
-   memset(theImageMode, ' ', 1);
-   memset(theNumberOfBlocksPerRow, ' ', 4);
-   memset(theNumberOfBlocksPerCol, ' ', 4);
-   memset(theNumberOfPixelsPerBlockHoriz, ' ', 4);
-   memset(theNumberOfPixelsPerBlockVert, ' ', 4);
-   memset(theNumberOfBitsPerPixelPerBand, '0', 2);
-   memset(theDisplayLevel, ' ', 3);
-   memset(theAttachmentLevel, ' ', 3);
-   memcpy(theImageLocation, "0000000000", 10);
-   memcpy(theImageMagnification, "1.00", 4);
-   memset(theUserDefinedImageDataLength, '0', 5);
-   memset(theUserDefinedOverflow, '0', 3);
-   memset(theExtendedSubheaderDataLen, '0', 5);
-   memset(theExtendedSubheaderOverflow, ' ', 3);
-   
-   theBlockMaskRecords.clear();
-   thePadPixelMaskRecords.clear();
-
-   theBlockedImageDataOffset = 0;
-   theBlockMaskRecordLength = 0;
-   thePadPixelMaskRecordLength = 0;
-   theTransparentOutputPixelCodeLength = 0;
-   thePadOutputPixelCode = 0;
-   theCompressionHeader  = 0;
-   theType[2] = '\0';
-   theImageId[10] = '\0';
-   theDateTime[14] = '\0';
-   theTargetId[17] = '\0';
-   theTitle[80] = '\0';
-   theSecurityClassification[1] = '\0';
-   theCodewords[40] = '\0';
-   theControlAndHandling[40] = '\0';
-   theReleasingInstructions[40] = '\0';
-   theClassificationAuthority[20] = '\0';
-   theSecurityControlNumber[20] = '\0';
-   theSecurityDowngrade[6] = '\0';
-   theDowngradingEvent[40] = '\0';
-   theEncryption[1] = '\0';
-   theImageSource[42] = '\0';
-   theSignificantRows[8] = '\0';
-   theSignificantCols[8] = '\0';
-   thePixelValueType[3] = '\0';
-   theRepresentation[8] = '\0';
-   theCategory[8] = '\0';
-   theActualBitsPerPixelPerBand[2] = '\0';
-   theJustification[1] = '\0';
-   theCoordinateSystem[1] = '\0';
-   theGeographicLocation[60] = '\0';
-   theNumberOfComments[1] = '\0';
-   theCompression[2] = '\0';
-   theCompressionRateCode[4] = '\0';
-   theNumberOfBands[1] = '\0';
-   theImageSyncCode[1] = '\0';
-   theImageMode[1] = '\0';
-   theNumberOfBlocksPerRow[4] = '\0';
-   theNumberOfBlocksPerCol[4] = '\0';
-   theNumberOfPixelsPerBlockHoriz[4] = '\0';
-   theNumberOfPixelsPerBlockVert[4] = '\0';
-   theNumberOfBitsPerPixelPerBand[2] = '\0';
-   theDisplayLevel[3] = '\0';
-   theAttachmentLevel[3] = '\0';
-   theImageLocation[10] = '\0';
-   theImageMagnification[4] = '\0';
-   theUserDefinedImageDataLength[5] = '\0';
-   theUserDefinedOverflow[3] = '\0';
-   theExtendedSubheaderDataLen[5] = '\0';
-   theExtendedSubheaderOverflow[3] = '\0'; 
-   theDataLocation = 0;
-}
-
-const ossimRefPtr<ossimNitfCompressionHeader> ossimNitfImageHeaderV2_0::getCompressionHeader()const
-{
-   return theCompressionHeader;
-}
-
-const ossimRefPtr<ossimNitfImageBand> ossimNitfImageHeaderV2_0::getBandInformation(ossim_uint32 idx)const
-{
-   if(idx < theImageBands.size())
-   {
-      return (ossimNitfImageBand*)theImageBands[idx].get();
-   }
-   
-   return NULL;
-}
-
-void ossimNitfImageHeaderV2_0::setNumberOfBands(ossim_uint32 nbands)
-{
-   std::ostringstream out;
-   if(nbands > 9)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << "ossimNitfImageHeaderV2_0::setNumberOfBands: NBANDS is too large.  For 2.0 spec we can only have up to 9 bands\n";
-      }
-      std::string s = "ossimNitfImageHeaderV2_0::setNumberOfBands:";
-      s += " ERROR\nExceeded max number of bands of 9!";
-      throw std::out_of_range(s);
-   }
-   else
-   {
-      out << nbands;
-      theNumberOfBands[0] = out.str().c_str()[0];
-   }
-   
-   theImageBands.resize(getNumberOfBands());
-}
-
-void ossimNitfImageHeaderV2_0::setBandInfo(ossim_uint32 idx,
-                                           const ossimNitfImageBandV2_0& info)
-{
-   if(idx < theImageBands.size())
-   {
-      if(!theImageBands[idx].valid())
-      {
-         theImageBands[idx] = new ossimNitfImageBandV2_0;
-      }
-      (*theImageBands[idx]) = info;
-   }
-}
-void ossimNitfImageHeaderV2_0::setNumberOfRows(ossim_uint32 rows)
-{
-   std::ostringstream out;
-   if(rows > 99999999) rows = 99999999;
-   
-   out << rows;
-   ossimNitfCommon::setField(theSignificantRows, out.str(), 8, ios::right, '0');
-}
-
-void ossimNitfImageHeaderV2_0::setNumberOfCols(ossim_uint32 cols)
-{
-   std::ostringstream out;
-   if(cols > 99999999) cols = 99999999;
-   
-   out << cols;
-   ossimNitfCommon::setField(theSignificantCols, out.str(), 8, ios::right, '0');
-}
-
-void ossimNitfImageHeaderV2_0::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   ossimNitfImageHeaderV2_X::setProperty(property);
-}
-
-ossimRefPtr<ossimProperty> ossimNitfImageHeaderV2_0::getProperty(const ossimString& name)const
-{
-   ossimRefPtr<ossimProperty> property = 0;
-   if(name == ISCODE_KW)
-   {
-      property = new ossimStringProperty(name, theCodewords);
-   }
-   else if(name == ISCTLH_KW)
-   {
-      property = new ossimStringProperty(name, theControlAndHandling);
-   }
-   else if(name == ISREL_KW)
-   {
-      property = new ossimStringProperty(name, theReleasingInstructions);
-   }
-   else if(name == ISCAUT_KW)
-   {
-      property = new ossimStringProperty(name, theClassificationAuthority);
-   }
-   else if(name == CTLN_KW)
-   {
-      property = new ossimStringProperty(name, theSecurityControlNumber);
-   }
-   else if(name == ISDWNG_KW)
-   {
-      property = new ossimStringProperty(name, theSecurityDowngrade);
-   }
-   else if(name == ISDEVT_KW)
-   {
-      property = new ossimStringProperty(name, theDowngradingEvent);
-   }
-   else 
-   {
-      property = ossimNitfImageHeaderV2_X::getProperty(name);
-   }
-   return property;
-}
-
-void ossimNitfImageHeaderV2_0::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimNitfImageHeaderV2_X::getPropertyNames(propertyNames);
-   propertyNames.push_back(ISCODE_KW);
-   propertyNames.push_back(ISCTLH_KW);
-   propertyNames.push_back(ISREL_KW);
-   propertyNames.push_back(ISCAUT_KW);
-   propertyNames.push_back(CTLN_KW);
-   propertyNames.push_back(ISDWNG_KW);
-   propertyNames.push_back(ISDEVT_KW);
-}
diff --git a/src/ossim/support_data/ossimNitfImageHeaderV2_1.cpp b/src/ossim/support_data/ossimNitfImageHeaderV2_1.cpp
deleted file mode 100644
index 7b18e11..0000000
--- a/src/ossim/support_data/ossimNitfImageHeaderV2_1.cpp
+++ /dev/null
@@ -1,1380 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfImageHeaderV2_1.cpp 21518 2012-08-22 21:15:56Z dburken $
-#include <sstream>
-#include <iomanip>
-#include <cstring> // for memset
-
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/support_data/ossimNitfCommon.h>
-#include <ossim/support_data/ossimNitfImageHeaderV2_1.h>
-#include <ossim/support_data/ossimNitfVqCompressionHeader.h>
-
-RTTI_DEF1(ossimNitfImageHeaderV2_1,
-          "ossimNitfImageHeaderV2_1",
-          ossimNitfImageHeaderV2_X)
-
-const ossimString ossimNitfImageHeaderV2_1::ISCLSY_KW = "isclsy";
-const ossimString ossimNitfImageHeaderV2_1::ISCODE_KW = "iscode";
-const ossimString ossimNitfImageHeaderV2_1::ISCTLH_KW = "isctlh";
-const ossimString ossimNitfImageHeaderV2_1::ISREL_KW = "isrel";
-const ossimString ossimNitfImageHeaderV2_1::ISDCTP_KW = "isdctp";
-const ossimString ossimNitfImageHeaderV2_1::ISDCDT_KW = "isdcdt";
-const ossimString ossimNitfImageHeaderV2_1::ISDCXM_KW = "isdcxm";
-const ossimString ossimNitfImageHeaderV2_1::ISDG_KW = "isdg";
-const ossimString ossimNitfImageHeaderV2_1::ISDGDT_KW = "isdgdt";
-const ossimString ossimNitfImageHeaderV2_1::ISCLTX_KW = "iscltx";
-const ossimString ossimNitfImageHeaderV2_1::ISCATP_KW = "iscatp";
-const ossimString ossimNitfImageHeaderV2_1::ISCAUT_KW = "iscaut";
-const ossimString ossimNitfImageHeaderV2_1::ISCRSN_KW = "iscrsn";
-const ossimString ossimNitfImageHeaderV2_1::ISSRDT_KW = "issrdt";
-const ossimString ossimNitfImageHeaderV2_1::ISCTLN_KW = "isctln";
-const ossimString ossimNitfImageHeaderV2_1::XBANDS_KW = "xbands";
-
-static const
-ossimTrace traceDebug(ossimString("ossimNitfImageHeaderV2_1:debug"));
-
-ossimNitfImageHeaderV2_1::ossimNitfImageHeaderV2_1()
-{
-   clearFields();
-}
-ossimNitfImageHeaderV2_1::~ossimNitfImageHeaderV2_1()
-{
-}
-
-void ossimNitfImageHeaderV2_1::parseStream(std::istream &in)
-{
-   if (!in)
-   {
-      return;
-   }
-   clearFields();
-   theTagList.clear();
-   in.read(theType, 2);
-   in.read(theImageId, 10);
-   in.read(theDateTime,14);
-   in.read(theTargetId, 17);
-   in.read(theTitle, 80);
-   in.read(theSecurityClassification, 1);
-   in.read(theSecurityClassificationSys, 2);
-   in.read(theCodewords, 11);
-   in.read(theControlAndHandling, 2);
-   in.read(theReleasingInstructions, 20);
-   in.read(theDeclassificationType, 2);
-   in.read(theDeclassificationDate, 8);
-   in.read(theDeclassificationExempt, 4);
-   in.read(theDowngrade, 1);
-   in.read(theDowngradeDate, 8);
-   in.read(theClassificationText, 43);
-   in.read(theClassificationAuthType, 1);
-   in.read(theClassificationAuthority, 40);
-   in.read(theClassificationReason, 1);
-   in.read(theSecuritySourceDate, 8);
-   in.read(theSecurityControlNumber, 15);
-   in.read(theEncryption, 1);
-   in.read(theImageSource, 42);
-   in.read(theSignificantRows, 8);
-   in.read(theSignificantCols, 8);
-   in.read(thePixelValueType, 3);
-   in.read(theRepresentation, 8);
-   in.read(theCategory, 8);
-   in.read(theActualBitsPerPixelPerBand, 2);
-   in.read(theJustification, 1);
-   in.read(theCoordinateSystem, 1);
-   // if it's not blank then read coordinates
-   if(theCoordinateSystem[0] != ' ')
-   {
-      in.read(theGeographicLocation, 60);
-   }
-   in.read(theNumberOfComments, 1);
-   ossim_int32 numberOfComments = ossimString(theNumberOfComments).toInt32();
-   
-   // for now just ignore the comments
-   if(numberOfComments > 0)
-   {
-      in.ignore(numberOfComments*80);
-   }
-   in.read(theCompression, 2);
-   
-   // only need the Rate code if its not
-   // NC (No compression)
-   ossimString temp = theCompression;
-   if((temp != "NC") &&
-      (temp != "NM"))
-   {
-      in.read(theCompressionRateCode, 4);
-   }
-   in.read(theNumberOfBands, 1);
-   // check to see if multi spectral bands
-   // exceed 9.  A value of 0 indicates this
-   ossim_int32 numberOfBands = ossimString(theNumberOfBands).toInt32();
-   if (numberOfBands == 0)
-   {
-      in.read(theNumberOfMultispectralBands, 5);
-      numberOfBands = ossimString(theNumberOfMultispectralBands).toInt32();
-   }
-   theImageBands.clear();
-   theImageBands.resize(numberOfBands);
-   for (ossim_int32 band = 0; band < numberOfBands; ++band)
-   {
-      theImageBands[band] = new ossimNitfImageBandV2_1;
-      theImageBands[band]->parseStream(in);
-   }
-   in.read(theImageSyncCode, 1);
-   in.read(theImageMode, 1);
-   in.read(theNumberOfBlocksPerRow, 4);
-   in.read(theNumberOfBlocksPerCol, 4);
-   in.read(theNumberOfPixelsPerBlockHoriz, 4);
-   in.read(theNumberOfPixelsPerBlockVert, 4);
-   in.read(theNumberOfBitsPerPixelPerBand, 2);
-   in.read(theDisplayLevel, 3);
-   in.read(theAttachmentLevel, 3);
-   in.read(theImageLocation, 10);
-   in.read(theImageMagnification, 4);
-   in.read(theUserDefinedImageDataLength, 5);
-   
-   ossimNitfTagInformation         headerTag;
-   std::streampos start   = in.tellg();
-   std::streampos current = in.tellg();
-   
-   std::streampos userDefinedDataLen
-      = ossimString(theUserDefinedImageDataLength).toInt32();
-   if(userDefinedDataLen > 0)
-   {
-      in.read(theUserDefinedOverflow, 3);
-      while((current - start) < userDefinedDataLen)
-      {
-         headerTag.parseStream(in);
-         theTagList.push_back(headerTag);
-         // in.ignore(headerTag.getTagLength());
-         // headerTag.clearFields();
-         current = in.tellg();
-      }
-      in.seekg(start + userDefinedDataLen);
-   }
-   in.read(theExtendedSubheaderDataLen, 5);
-   std::streampos extSubHeadLen = ossimString(theExtendedSubheaderDataLen).toInt32();
-   start   = in.tellg();
-   current = in.tellg();
-   if(extSubHeadLen > 0)
-   {
-      in.read(theExtendedSubheaderOverflow, 3);
-      while((current - start) < extSubHeadLen)
-      {
-         headerTag.parseStream(in);
-         theTagList.push_back(headerTag);
-         
-         // in.ignore(headerTag.getTagLength());
-         // headerTag.clearFields();
-         current = in.tellg();
-      }
-      in.seekg(start + extSubHeadLen);
-   }
-   ossimString compressionType = theCompression;
-   compressionType = compressionType.trim().upcase();
-   ossimEndian endian;
-
-   //---
-   // Note: "C4" added to skip over the image data mask subheader.
-   // See MIL-STD-2500C paragraph 5.4.3.2
-   //---
-   if((compressionType == "NM")||
-      (compressionType == "M1")||
-      (compressionType == "M3")||
-      (compressionType == "M4")||
-      (compressionType == "M5")||
-      (compressionType == "C4"))
-   {
-      ossim_uint64 locationBefore = in.tellg();
-      in.read((char*)(&theBlockedImageDataOffset), 4);
-      in.read((char*)(&theBlockMaskRecordLength),2);
-      in.read((char*)(&thePadPixelMaskRecordLength), 2);
-      in.read((char*)(&theTransparentOutputPixelCodeLength), 2);
-
-      
-      if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
-      {
-         endian.swap(theBlockedImageDataOffset);
-         endian.swap(theBlockMaskRecordLength);
-         endian.swap(thePadPixelMaskRecordLength);
-         endian.swap(theTransparentOutputPixelCodeLength);
-      }
-      if(theTransparentOutputPixelCodeLength <9)
-      {
-         if(theTransparentOutputPixelCodeLength != 0)
-         {
-            ossim_uint8 padOutputPixelCode;
-            in.read((char*)(&padOutputPixelCode), 1);
-            thePadOutputPixelCode = padOutputPixelCode;
-         }
-      }
-      else
-      {
-         in.read((char*)(&thePadOutputPixelCode), 2);
-         if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
-         {
-            endian.swap(thePadOutputPixelCode);
-         }
-         // I need to add code here to check for justification when its 2 bytes
-         // but the code length is less than 16 bits.
-         //
-      }
-      if(theBlockMaskRecordLength>0)
-      {
-         ossim_uint32 totalNumber = 0;
-         if(theImageMode[0] == 'S')
-         {
-             totalNumber = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol()*getNumberOfBands();
-         }
-         else
-         {
-            totalNumber = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol();
-         }
-         ossim_uint32 *blockRead = new ossim_uint32[totalNumber];
-         ossim_uint32 idx = 0;
-         theBlockMaskRecords.resize(totalNumber);
-         in.read((char*)(blockRead), totalNumber*4);
-         for(idx = 0; idx < totalNumber; ++idx)
-         {
-            if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
-            {
-               endian.swap(blockRead[idx]);
-            }
-            theBlockMaskRecords[idx] = blockRead[idx];
-         }
-         delete [] blockRead;
-      }
-      if( (thePadPixelMaskRecordLength > 0) ||
-          ( (getCompressionCode().upcase() == "M3") && (thePadPixelMaskRecordLength == 0) ) )
-      {
-         ossim_uint32 totalNumber = 0;
-         if(theImageMode[0] == 'S')
-         {
-            totalNumber = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol()*getNumberOfBands();
-         }
-         else
-         {
-            totalNumber = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol();
-         }
-         ossim_uint32 *blockRead = new ossim_uint32[totalNumber];
-         ossim_uint32 idx = 0;
-         thePadPixelMaskRecords.resize(totalNumber);
-         in.read((char*)(blockRead), totalNumber*4);
-         for(idx = 0; idx < totalNumber; ++idx)
-         {
-            if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
-            {
-               endian.swap(blockRead[idx]);
-            }
-            thePadPixelMaskRecords[idx] = blockRead[idx];
-         }
-         delete [] blockRead;
-      }
-      theCompressionHeader = 0;
-      if((getCompressionCode() == "C4")||
-         (getCompressionCode() == "M4"))
-      {
-         ossimRefPtr<ossimNitfVqCompressionHeader> compressionHeader = new ossimNitfVqCompressionHeader;
-         compressionHeader->parseStream(in);
-         // do a check to see if the compression header is good
-         //
-         if(compressionHeader->getCompressionAlgorithmId()!= 1)
-         {
-            compressionHeader = 0;
-         }
-         theCompressionHeader = compressionHeader.get();
-      }
-      
-      ossim_uint64 delta = (ossim_uint64)in.tellg() - locationBefore;
-      if(delta < theBlockedImageDataOffset)
-      {
-         in.ignore(theBlockedImageDataOffset-delta);
-      }
-   }
-   //***
-   // The stream should now be at the start of the data location so capture
-   // it.
-   //***
-   theDataLocation = in.tellg();
-}
-
-void ossimNitfImageHeaderV2_1::writeStream(std::ostream &out)
-{
-   out.write(theType, 2);
-   out.write(theImageId, 10);
-   out.write(theDateTime,14);
-   out.write(theTargetId, 17);
-   out.write(theTitle, 80);
-   out.write(theSecurityClassification, 1);
-   out.write(theSecurityClassificationSys, 2);
-   out.write(theCodewords, 11);
-   out.write(theControlAndHandling, 2);
-   out.write(theReleasingInstructions, 20);
-   out.write(theDeclassificationType, 2);
-   out.write(theDeclassificationDate, 8);
-   out.write(theDeclassificationExempt, 4);
-   out.write(theDowngrade, 1);
-   out.write(theDowngradeDate, 8);
-   out.write(theClassificationText, 43);
-   out.write(theClassificationAuthType, 1);
-   out.write(theClassificationAuthority, 40);
-   out.write(theClassificationReason, 1);
-   out.write(theSecuritySourceDate, 8);
-   out.write(theSecurityControlNumber, 15);
-   out.write(theEncryption, 1);
-   out.write(theImageSource, 42);
-   out.write(theSignificantRows, 8);
-   out.write(theSignificantCols, 8);
-   out.write(thePixelValueType, 3);
-   out.write(theRepresentation, 8);
-   out.write(theCategory, 8);
-   out.write(theActualBitsPerPixelPerBand, 2);
-   out.write(theJustification, 1);
-   out.write(theCoordinateSystem, 1);
-   
-   if(theCoordinateSystem[0] != ' ')
-   {
-      out.write(theGeographicLocation, 60);
-   }
-   // for now force the number of comments to be 0
-   out.write(theNumberOfComments, 1);
-   
-   out.write(theCompression, 2);
-   ossimString compressionTest = theCompression;
-   if(compressionTest != "NC" &&
-      compressionTest != "NM")
-     {
-      out.write(theCompressionRateCode, 4);
-     }
-
-   out.write(theNumberOfBands, 1);
-
-   if(ossimString(theNumberOfBands).toInt32() == 0)
-   {
-      out.write(theNumberOfMultispectralBands, 5);
-   }
-
-   if(theImageBands.size())
-   {
-      ossim_uint32 idx = 0;
-      for(idx = 0; idx < theImageBands.size(); ++idx)
-      {
-         theImageBands[idx]->writeStream(out);
-      }
-   }
-
-   out.write(theImageSyncCode, 1);
-   out.write(theImageMode, 1);
-   out.write(theNumberOfBlocksPerRow, 4);
-   out.write(theNumberOfBlocksPerCol, 4);
-   out.write(theNumberOfPixelsPerBlockHoriz, 4);
-   out.write(theNumberOfPixelsPerBlockVert, 4);
-   out.write(theNumberOfBitsPerPixelPerBand, 2);
-   out.write(theDisplayLevel, 3);
-   out.write(theAttachmentLevel, 3);
-   out.write(theImageLocation, 10);
-   out.write(theImageMagnification, 4);
-   out.write(theUserDefinedImageDataLength, 5);
-
-   if(ossimString(theUserDefinedImageDataLength).toInt32() > 0)
-   {
-      out.write(theUserDefinedOverflow, 3);
-   }
-
-   // need to ouput tagged data
-   // here
-   //
-   ossim_uint32 totalLength = getTotalTagLength();
-
-   if (totalLength == 0)
-   {
-      out.write(theExtendedSubheaderDataLen, 5);
-   }
-   else
-   {
-      totalLength += 3; // per Table A-3 of MIL-STD-2500B
-      
-      if(totalLength <= 99999)
-      {
-         std::ostringstream tempOut;
-         
-         tempOut << std::setw(5)
-                 << std::setfill('0')
-                 << std::setiosflags(ios::right)
-                 << totalLength;
-         
-         memcpy(theExtendedSubheaderDataLen, tempOut.str().c_str(), 5);
-         
-         out.write(theExtendedSubheaderDataLen, 5);
-         memset(theExtendedSubheaderOverflow, '0', 3);
-         
-         if(totalLength > 0)
-         {
-            out.write(theExtendedSubheaderOverflow, 3);
-            
-            ossim_uint32 i = 0;
-            
-            for(i = 0; i < theTagList.size(); ++i)
-            {
-               theTagList[i].writeStream(out);
-            }
-         }
-      }
-      else
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "WARNING ossimNitfFileHeaderV2_1::writeStream: Only support writing of total tag length < 99999" << std::endl;
-      }
-   }
-}
-
-std::ostream& ossimNitfImageHeaderV2_1::print(std::ostream& out,
-                                              const std::string& prefix) const
-{
-   out << setiosflags(ios::left)
-       << prefix << setw(24)
-       << "IM:"     << theType << "\n"
-       << prefix << setw(24)
-       << "IID1:"   << theImageId << "\n"
-       << prefix << setw(24)
-       << "IDATIM:" << theDateTime << "\n"
-       << prefix << setw(24)
-       << "TGTID:"  << theTargetId << "\n"
-       << prefix << setw(24)
-       << "IID2:"   << theTitle << "\n"
-       << prefix << setw(24)
-       << "ISCLAS:" << theSecurityClassification << "\n"
-       << prefix << setw(24)
-       << "ISCLSY:" << theSecurityClassificationSys << "\n"
-       << prefix << setw(24)
-       << "ISCODE:" << theCodewords << "\n"
-       << prefix << setw(24)
-       << "ISCTLH:" << theControlAndHandling << "\n"
-       << prefix << setw(24)
-       << "ISREL:"  << theReleasingInstructions << "\n"
-       << prefix << setw(24)
-       << "ISDCTP:" << theDeclassificationType << "\n"
-       << prefix << setw(24)
-       << "ISDCDT:" << theDeclassificationDate << "\n"
-       << prefix << setw(24)
-       << "ISDCXM:" << theDeclassificationExempt << "\n"
-       << prefix << setw(24)
-       << "ISDG:"   << theDowngrade << "\n"
-       << prefix << setw(24)
-       << "ISDGDT:" << theDowngradeDate << "\n"
-       << prefix << setw(24)
-       << "ISCLTX:" << theClassificationText << "\n"
-       << prefix << setw(24)
-       << "ISCATP:" << theClassificationAuthType << "\n"
-       << prefix << setw(24)
-       << "ISCAUT:" << theClassificationAuthority << "\n"
-       << prefix << setw(24)
-       << "ISCRSN:" << theClassificationReason << "\n"
-       << prefix << setw(24)
-       << "ISSRDT:" << theSecuritySourceDate << "\n"
-       << prefix << setw(24)
-       << "ISCTLN:" << theSecurityControlNumber << "\n"
-       << prefix << setw(24)
-       << "ENCRYP:" << theEncryption << "\n"
-       << prefix << setw(24)
-       << "ISORCE:" << theImageSource << "\n"
-       << prefix << setw(24)
-       << "NROWS:"  << theSignificantRows << "\n"
-       << prefix << setw(24)
-       << "NCOLS:"  << theSignificantCols << "\n"
-       << prefix << setw(24)
-       << "PVTYPE:" << thePixelValueType << "\n"
-       << prefix << setw(24)
-       << "IREP:"   << theRepresentation << "\n"
-       << prefix << setw(24)
-       << "ICAT:"   << theCategory << "\n"
-       << prefix << setw(24)
-       << "ABPP:"   << theActualBitsPerPixelPerBand << "\n"
-       << prefix << setw(24)
-       << "PJUST:"  << theJustification << "\n"
-       << prefix << setw(24)
-       << "ICORDS:" << theCoordinateSystem << "\n"
-       << prefix << setw(24)
-       << "IGEOLO:" << theGeographicLocation << "\n"
-       << prefix << setw(24)
-       << "NICOM:"  << theNumberOfComments << "\n"
-       << prefix << setw(24)
-       << "IC:"     << theCompression << "\n"
-       << prefix << setw(24)
-       << "COMRAT:" << theCompressionRateCode << "\n"
-       << prefix << setw(24)
-       << "NBANDS:" << theNumberOfBands << "\n"
-       << prefix << setw(24)
-       << "XBANDS:" << theNumberOfMultispectralBands << "\n";
-   
-   ossim_uint32 idx = 0;
-   for(idx = 0; idx < theImageBands.size(); ++idx)
-   {
-      if(theImageBands[idx].valid())
-      {
-         theImageBands[idx]->print(out, prefix, idx); 
-      }
-   }
-
-   out << prefix << setw(24)
-       << "ISYNC:"     << theImageSyncCode << "\n"
-       << prefix << setw(24)
-       << "IMODE:"     << theImageMode << "\n"
-       << prefix << setw(24)
-       << "NBPR:"      << theNumberOfBlocksPerRow << "\n"
-       << prefix << setw(24)
-       << "NBPC:"      << theNumberOfBlocksPerCol << "\n"
-       << prefix << setw(24)
-       << "NPPBH:"     << theNumberOfPixelsPerBlockHoriz << "\n"
-       << prefix << setw(24)
-       << "NPPBV:"     << theNumberOfPixelsPerBlockVert << "\n"
-       << prefix << setw(24)
-       << "NBPP:"      << theNumberOfBitsPerPixelPerBand << "\n"
-       << prefix << setw(24)
-       << "IDLVL:"     << theDisplayLevel << "\n"
-       << prefix << setw(24)
-       << "IALVL:"     << theAttachmentLevel << "\n"
-       << prefix << setw(24)
-       << "ILOC:"      << theImageLocation << "\n"
-       << prefix << setw(24)
-       << "IMAG:"      << theImageMagnification << "\n"
-       << prefix << setw(24)
-       << "UDIDL:"     << theUserDefinedImageDataLength << "\n"
-       << prefix << setw(24)
-       << "UDOFL:"     << theUserDefinedOverflow << "\n"
-       << prefix << setw(24)
-       << "IXSHDL:"    << theExtendedSubheaderDataLen << "\n"
-       << prefix << setw(24)
-       << "IXSOFL:"    << theExtendedSubheaderOverflow << "\n"
-       << prefix << setw(24)
-       << "IMDATOFF:"  << theBlockedImageDataOffset << "\n"
-       << prefix << setw(24)
-       << "BMRLNTH:"   << theBlockMaskRecordLength << "\n"
-       << prefix << setw(24)
-       << "TMRLNTH:"   << thePadPixelMaskRecordLength << "\n"
-       << prefix << setw(24)
-       << "TPXCDLNTH:" << theTransparentOutputPixelCodeLength << "\n"
-       << prefix << setw(24)
-       << "TPXCD:"     << thePadOutputPixelCode << "\n";
-
-   if ( traceDebug() )
-   {
-      out << prefix << setw(24)
-          << "theDataLocation:" << theDataLocation << "\n";
-   }
-
-   out << std::endl;
-
-   return printTags(out, prefix);
-}
-
-
-bool ossimNitfImageHeaderV2_1::saveState(ossimKeywordlist& kwl, const ossimString& prefix)const
-{
-   ossimNitfImageHeaderV2_X::saveState(kwl, prefix);
-   
-   kwl.add(prefix, "ISCLSY", theSecurityClassificationSys);
-   kwl.add(prefix, "ISCODE", theCodewords);
-   kwl.add(prefix, "ISCTLH", theControlAndHandling);
-   kwl.add(prefix, "ISREL", theReleasingInstructions);
-   kwl.add(prefix, "ISDCTP", theDeclassificationType);
-   kwl.add(prefix, "ISDCDT", theDeclassificationDate);
-   kwl.add(prefix, "ISDCXM", theDeclassificationExempt);
-   kwl.add(prefix, "ISDG", theDowngrade);
-   kwl.add(prefix, "ISDGDT", theDowngradeDate);
-   kwl.add(prefix, "ISCLTX", theClassificationText);
-   kwl.add(prefix, "ISCATP", theClassificationAuthType);
-   kwl.add(prefix, "ISCAUT", theClassificationAuthority);
-   kwl.add(prefix, "ISCRSN", theClassificationReason);
-   kwl.add(prefix, "ISSRDT", theSecuritySourceDate);
-   kwl.add(prefix, "ISCTLN", theSecurityControlNumber);
-   kwl.add(prefix, "XBANDS", theNumberOfMultispectralBands);
-   
-   ossim_uint32 idx = 0;
-   
-   std::ostringstream out;
-   if(theCompressionHeader.valid())
-   {
-      theCompressionHeader->saveState(kwl, prefix);
-   }
-
-   for(idx = 0; idx < theImageBands.size(); ++idx)
-   {
-      if(theImageBands[idx].valid())
-      {
-         theImageBands[idx]->print(out, "", idx); 
-      }
-   }
-   
-   out << std::endl;
-   
-   ossimKeywordlist kwlTemp;
-   
-   std::istringstream in(out.str());
-   if(kwlTemp.parseStream(in))
-   {
-      kwl.add(prefix, kwlTemp);
-   }
-   
-   return true;
-}
-
-bool ossimNitfImageHeaderV2_1::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   // Note: Currently not looking up all fieds only ones that make sense.
-   
-   const char* lookup;
-
-   lookup = kwl.find( prefix, ISCLSY_KW );
-   if ( lookup )
-   {
-      setSecurityClassificationSystem( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, ISCODE_KW );
-   if ( lookup )
-   {
-      setCodewords( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, ISCTLH_KW );
-   if ( lookup )
-   {
-      setControlAndHandling( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, ISREL_KW);
-   if ( lookup )
-   {
-      setReleasingInstructions( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, ISDCTP_KW );
-   if ( lookup )
-   {
-      setDeclassificationType( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, ISDCDT_KW );
-   if ( lookup )
-   {
-      setDeclassificationDate( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, ISDCXM_KW );
-   if ( lookup )
-   {
-      setDeclassificationExempt( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, ISDG_KW );
-   if ( lookup )
-   {
-      setDowngrade( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, ISDGDT_KW );
-   if ( lookup )
-   {
-      setDowngradeDate( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, ISCLTX_KW );
-   if ( lookup )
-   {
-      setClassificationText( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, ISCATP_KW );
-   if ( lookup )
-   {
-      setClassificationAuthorityType( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, ISCAUT_KW );
-   if ( lookup )
-   {
-      setClassificationAuthority( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, ISCRSN_KW );
-   if ( lookup )
-   {
-      setClassificationReason( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, ISSRDT_KW );
-   if ( lookup )
-   {
-      setSecuritySourceDate( ossimString(lookup) );
-   }
-   lookup = kwl.find( prefix, ISCTLN_KW );
-   if ( lookup )
-   {
-      setSecurityControlNumber( ossimString(lookup) );
-   }
-   
-   return ossimNitfImageHeaderV2_X::loadState(kwl, prefix);
-}
-
-bool ossimNitfImageHeaderV2_1::isCompressed()const
-{
-   ossimString temp = theCompression;
-   temp = temp.trim();
-   return ((temp != "NC") && (temp != "NM"));
-}
-
-bool ossimNitfImageHeaderV2_1::isEncrypted()const
-{
-   return (theEncryption[0] == '1');
-}
-
-ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfBands()const
-{
-   if(theNumberOfBands[0] == '0')
-   {
-      return ossimString(theNumberOfMultispectralBands).toInt32();
-   }
-   else
-   {
-      return ossimString(theNumberOfBands).toInt32();
-   }
-}
-
-ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfRows()const
-{
-   return ossimString(theSignificantRows).toInt32();
-}
-
-ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfCols()const
-{
-   return ossimString(theSignificantCols).toInt32();
-}
-
-ossimString ossimNitfImageHeaderV2_1::getImageId()const
-{
-   return theImageId;
-}
-
-ossim_int32 ossimNitfImageHeaderV2_1::getBitsPerPixelPerBand()const
-{
-   return ossimString(theNumberOfBitsPerPixelPerBand).toInt32();
-}
-
-ossim_int32 ossimNitfImageHeaderV2_1::getActualBitsPerPixelPerBand()const
-{
-   return ossimString(theActualBitsPerPixelPerBand).toInt32();
-}
-
-ossimString ossimNitfImageHeaderV2_1::getIMode() const
-{
-   return ossimString(theImageMode).trim();
-}
-
-ossimString ossimNitfImageHeaderV2_1::getSecurityClassification()const
-{
-   return theSecurityClassification;
-}
-
-ossimString  ossimNitfImageHeaderV2_1::getImageDateAndTime() const
-{
-   return ossimString(theDateTime);
-}
-
-ossimString ossimNitfImageHeaderV2_1::getAcquisitionDateMonthDayYear(ossim_uint8 separationChar)const
-{
-   ossimString result;
-
-   result += ossimString(theDateTime + 4,
-                         theDateTime + 6);
-   result += ossimString(separationChar);
-   result += ossimString(theDateTime + 6,
-                         theDateTime + 8);
-   result += ossimString(separationChar);
-   result += ossimString(theDateTime,
-                         theDateTime + 4);
-   
-   return result;
-}
-
-ossimString ossimNitfImageHeaderV2_1::getCategory()const
-{
-   return theCategory;
-}
-
-ossimString ossimNitfImageHeaderV2_1::getImageSource()const
-{
-   return theImageSource;
-}
-
-ossimString ossimNitfImageHeaderV2_1::getRepresentation()const
-{
-   return theRepresentation;
-}
-
-ossimString ossimNitfImageHeaderV2_1::getCoordinateSystem()const
-{
-   return theCoordinateSystem;
-}
-
-bool ossimNitfImageHeaderV2_1::hasBlockMaskRecords()const
-{
-   return (theBlockMaskRecords.size() > 0);
-}
-
-bool ossimNitfImageHeaderV2_1::hasPadPixelMaskRecords()const
-{
-   return (thePadPixelMaskRecords.size()>0);
-}
-
-bool ossimNitfImageHeaderV2_1::hasTransparentCode()const
-{
-   return (theTransparentOutputPixelCodeLength > 0);
-}
-
-ossim_uint32 ossimNitfImageHeaderV2_1::getTransparentCode()const
-{
-   return thePadOutputPixelCode;
-}
-
-ossim_uint32 ossimNitfImageHeaderV2_1::getBlockMaskRecordOffset(ossim_uint32 blockNumber,
-                                                                ossim_uint32 bandNumber)const
-{
-   ossim_uint32 maxBlock = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol();
-   ossim_uint32 result = 0xffffffff;
-   
-   if((hasBlockMaskRecords())&&
-      (blockNumber < maxBlock))
-   {
-      if(theImageMode[0] == 'S')
-      {
-         if(bandNumber < (ossim_uint32)getNumberOfBands())
-         {
-            result = theBlockMaskRecords[bandNumber*maxBlock + blockNumber];
-         }
-      }
-      else
-      {
-         result = theBlockMaskRecords[blockNumber];
-      }
-   }
-
-   return result;
-}
-
-ossim_uint32 ossimNitfImageHeaderV2_1::getPadPixelMaskRecordOffset(ossim_uint32 blockNumber,
-                                                                   ossim_uint32 bandNumber)const
-{
-   ossim_uint32 maxBlock = getNumberOfBlocksPerRow()*getNumberOfBlocksPerCol();
-   ossim_uint32 result = 0xffffffff;
-   
-   if((hasPadPixelMaskRecords())&&
-      (blockNumber < maxBlock))
-   {
-      if(theImageMode[0] == 'S')
-      {
-         if(bandNumber < (ossim_uint32)getNumberOfBands())
-         {
-            result = thePadPixelMaskRecords[bandNumber*maxBlock + blockNumber];
-         }
-      }
-      else
-      {
-         result = thePadPixelMaskRecords[blockNumber];
-      }
-   }
-
-   return result;
-}
-
-
-void ossimNitfImageHeaderV2_1::clearFields()
-{
-   memcpy(theType, "IM", 2);
-   memset(theImageId, ' ',10);
-   memset(theDateTime, ' ',14);
-   memset(theTargetId, ' ',17);
-   memset(theTitle, ' ',80);
-   memset(theSecurityClassification, ' ',1);
-   memset(theSecurityClassificationSys, ' ',2);
-   memset(theCodewords, ' ',11);
-   memset(theControlAndHandling, ' ',2);
-   memset(theReleasingInstructions, ' ',20);
-   memset(theDeclassificationType, ' ',2);
-   memset(theDeclassificationDate, ' ',8);
-   memset(theDeclassificationExempt, ' ',4);
-   memset(theDowngrade, ' ',1);
-   memset(theDowngradeDate, ' ',8);
-   memset(theClassificationText, ' ',43);
-   memset(theClassificationAuthType, ' ',1);
-   memset(theClassificationAuthority, ' ',40);
-   memset(theClassificationReason, ' ',1);
-   memset(theSecuritySourceDate, ' ',8);
-   memset(theSecurityControlNumber, ' ',15);
-   memset(theEncryption, '0',1);
-   memset(theImageSource, ' ',42);
-   memset(theSignificantRows, '0',8);
-   memset(theSignificantCols, '0',8);
-   memset(thePixelValueType, ' ',3);
-   memset(theRepresentation, ' ',8);
-   memset(theCategory, ' ',8);
-   memset(theActualBitsPerPixelPerBand, '0',2);
-   memset(theJustification, ' ',1);
-   memset(theCoordinateSystem, ' ',1);
-   memset(theGeographicLocation, ' ',60);
-   memset(theNumberOfComments, '0', 1);
-   memcpy(theCompression, "NC",2);
-   memset(theCompressionRateCode, ' ',4);
-   memset(theNumberOfBands, '0',1);
-   memset(theNumberOfMultispectralBands, ' ',5);
-   memset(theImageSyncCode, '0', 1);
-   memset(theImageMode, 'B', 1);
-   memset(theNumberOfBlocksPerRow, '0', 4);
-   memset(theNumberOfBlocksPerCol, '0', 4);
-   memset(theNumberOfPixelsPerBlockHoriz, '0', 4);
-   memset(theNumberOfPixelsPerBlockVert, '0', 4);
-   memset(theNumberOfBitsPerPixelPerBand, '0', 2);
-   memcpy(theDisplayLevel, "001", 3);
-   memset(theAttachmentLevel, '0', 3);
-   memset(theImageLocation, '0', 10);
-   memcpy(theImageMagnification, "1.0 ", 4);
-   
-   memset(theUserDefinedImageDataLength,'0', 5);
-   memset(theUserDefinedOverflow, '0', 3);
-   memset(theExtendedSubheaderDataLen, '0', 5);
-   memset(theExtendedSubheaderOverflow, ' ', 3);
-   theBlockMaskRecords.clear();
-   thePadPixelMaskRecords.clear();
-
-   theBlockedImageDataOffset = 0;
-   theBlockMaskRecordLength = 0;
-   thePadPixelMaskRecordLength = 0;
-   theTransparentOutputPixelCodeLength = 0;
-   thePadOutputPixelCode = 0;
-   
-   theCompressionHeader = 0;
-   
-   theType[2] = '\0';
-   theImageId[10] = '\0';
-   theDateTime[14] = '\0';
-   theTargetId[17] = '\0';
-   theTitle[80] = '\0';
-   theSecurityClassification[1] = '\0';
-   theSecurityClassificationSys[2] = '\0';
-   theCodewords[11] = '\0';
-   theControlAndHandling[2] = '\0';
-   theReleasingInstructions[20] = '\0';
-   theDeclassificationType[2] = '\0';
-   theDeclassificationDate[8] = '\0';
-   theDeclassificationExempt[4] = '\0';
-   theDowngrade[1] = '\0';
-   theDowngradeDate[8] = '\0';
-   theClassificationText[43] = '\0';
-   theClassificationAuthType[1] = '\0';
-   theClassificationAuthority[40] = '\0';
-   theClassificationReason[1] = '\0';
-   theSecuritySourceDate[8] = '\0';
-   theSecurityControlNumber[15] = '\0';
-   theEncryption[1] = '\0';
-   theImageSource[42] = '\0';
-   theSignificantRows[8] = '\0';
-   theSignificantCols[8] = '\0';
-   thePixelValueType[3] = '\0';
-   theRepresentation[8] = '\0';
-   theCategory[8] = '\0';
-   theActualBitsPerPixelPerBand[2] = '\0';
-   theJustification[1] = '\0';
-   theCoordinateSystem[1] = '\0';
-   theGeographicLocation[60] = '\0';
-   theNumberOfComments[1] = '\0';
-   theCompression[2] = '\0';
-   theCompressionRateCode[4] = '\0';
-   theNumberOfBands[1] = '\0';
-   theNumberOfMultispectralBands[5] = '\0';
-   theImageSyncCode[1] = '\0';
-   theImageMode[1] = '\0';
-   theNumberOfBlocksPerRow[4] = '\0';
-   theNumberOfBlocksPerCol[4] = '\0';
-   theNumberOfPixelsPerBlockHoriz[4] = '\0';
-   theNumberOfPixelsPerBlockVert[4] = '\0';
-   theNumberOfBitsPerPixelPerBand[2] = '\0';
-   theDisplayLevel[3] = '\0';
-   theAttachmentLevel[3] = '\0';
-   theImageLocation[10] = '\0';
-   theImageMagnification[4] = '\0';
-   theUserDefinedImageDataLength[5] = '\0';
-   theUserDefinedOverflow[3] = '\0';
-   theExtendedSubheaderDataLen[5] = '\0';
-   theExtendedSubheaderOverflow[3] = '\0';
-   
-   theDataLocation = 0;
-}
-
-ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfBlocksPerRow()const
-{
-   return ossimString(theNumberOfBlocksPerRow).toInt32();
-}
-
-ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfBlocksPerCol()const
-{
-   return ossimString(theNumberOfBlocksPerCol).toInt32();
-}
-
-ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfPixelsPerBlockHoriz()const
-{
- //  return ossimString(theNumberOfPixelsPerBlockHoriz).toInt32();
-   ossim_int32 rval = ossimString(theNumberOfPixelsPerBlockHoriz).toInt32();
-   if ((rval == 0) && (getNumberOfBlocksPerCol() == 1))
-   {
-      rval = getNumberOfCols();
-   }
-   return rval;
-   
-}
-
-ossim_int32 ossimNitfImageHeaderV2_1::getNumberOfPixelsPerBlockVert()const
-{
-//   return ossimString(theNumberOfPixelsPerBlockVert).toInt32();
-   ossim_int32 rval = ossimString(theNumberOfPixelsPerBlockVert).toInt32();
-   if ((rval == 0) && (getNumberOfBlocksPerRow() == 1))
-   {
-      rval = getNumberOfRows();
-   }
-   return rval;
-}
-
-ossimString ossimNitfImageHeaderV2_1::getPixelValueType()const
-{
-   return ossimString(thePixelValueType).trim();
-}
-
-void ossimNitfImageHeaderV2_1::setNumberOfBands(ossim_uint32 nbands)
-{
-   std::ostringstream out;
-
-   if(nbands > 9)
-   {
-      out << std::setw(5)
-          << std::setfill('0')
-          << std::setiosflags(ios::right)
-          << nbands;
-
-      theNumberOfBands[0] = '0';
-      memcpy(theNumberOfMultispectralBands, out.str().c_str(), 5);
-   }
-   else
-   {
-      out << nbands;
-      theNumberOfBands[0] = out.str().c_str()[0];
-   }
-
-   theImageBands.resize(getNumberOfBands());
-}
-
-void ossimNitfImageHeaderV2_1::setBandInfo(ossim_uint32 idx,
-                                           const ossimNitfImageBandV2_1& info)
-{
-   if(idx < theImageBands.size())
-   {
-      if(!theImageBands[idx].valid())
-      {
-         theImageBands[idx] = new ossimNitfImageBandV2_1;
-      }
-      (*theImageBands[idx]) = info;
-   }
-}
-
-void ossimNitfImageHeaderV2_1::setNumberOfRows(ossim_uint32 rows)
-{
-   std::ostringstream out;
-   if(rows > 99999999) rows = 99999999;
-   
-   out << rows;
-   ossimNitfCommon::setField(theSignificantRows, out.str(), 8, ios::right, '0');
-}
-
-void ossimNitfImageHeaderV2_1::setNumberOfCols(ossim_uint32 cols)
-{
-   std::ostringstream out;
-   if(cols > 99999999) cols = 99999999;
-
-   out << cols;
-   ossimNitfCommon::setField(theSignificantCols, out.str(), 8, ios::right, '0');
-}
-
-void ossimNitfImageHeaderV2_1::setSecurityClassificationSystem(const ossimString& value)
-{
-   ossimNitfCommon::setField(theSecurityClassificationSys, value, 2);
-}
-
-void ossimNitfImageHeaderV2_1::setCodewords(const ossimString& value)
-{
-   ossimNitfCommon::setField(theCodewords, value, 11);
-}
-
-void ossimNitfImageHeaderV2_1::setControlAndHandling(const ossimString& value)
-{
-   ossimNitfCommon::setField(theControlAndHandling, value, 2);
-}
-
-void ossimNitfImageHeaderV2_1::setReleasingInstructions(const ossimString& value)
-{
-   ossimNitfCommon::setField(theReleasingInstructions, value, 20);
-}
-
-void ossimNitfImageHeaderV2_1::setDeclassificationType(const ossimString& value)
-{
-   ossimNitfCommon::setField(theDeclassificationType, value, 2);
-}
-
-void ossimNitfImageHeaderV2_1::setDeclassificationDate(const ossimString& value)
-{
-   ossimNitfCommon::setField(theDeclassificationDate, value, 8);
-}
-
-void ossimNitfImageHeaderV2_1::setDeclassificationExempt(const ossimString& value)
-{
-   ossimNitfCommon::setField(theDeclassificationExempt, value, 4);
-}
-
-void ossimNitfImageHeaderV2_1::setDowngrade(const ossimString& value)
-{
-   ossimNitfCommon::setField(theDowngrade, value, 1);
-}
-
-void ossimNitfImageHeaderV2_1::setDowngradeDate(const ossimString& value)
-{
-   ossimNitfCommon::setField(theDowngradeDate, value, 8);
-}
-
-void ossimNitfImageHeaderV2_1::setClassificationText(const ossimString& value)
-{
-   ossimNitfCommon::setField(theClassificationText, value, 43);
-}
-
-void ossimNitfImageHeaderV2_1::setClassificationAuthorityType(const ossimString& value)
-{
-   ossimNitfCommon::setField(theClassificationAuthType, value, 1);
-}
-
-void ossimNitfImageHeaderV2_1::setClassificationAuthority(const ossimString& value)
-{
-   ossimNitfCommon::setField(theClassificationAuthority, value, 40);
-}
-
-void ossimNitfImageHeaderV2_1::setClassificationReason(const ossimString& value)
-{
-   ossimNitfCommon::setField(theClassificationReason, value, 1);
-}
-
-void ossimNitfImageHeaderV2_1::setSecuritySourceDate(const ossimString& value)
-{
-   ossimNitfCommon::setField(theSecuritySourceDate, value, 8);
-}
-
-void ossimNitfImageHeaderV2_1::setSecurityControlNumber(const ossimString& value)
-{
-   ossimNitfCommon::setField(theSecurityControlNumber, value, 15);
-}
-
-void ossimNitfImageHeaderV2_1::setImageMagnification(const ossimString& value)
-{
-   ossimNitfCommon::setField(theImageMagnification, value, 4);
-}
-
-void ossimNitfImageHeaderV2_1::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   ossimString name = property->getName();
-
-   // Make case insensitive:
-   name.upcase();
-   
-   std::ostringstream out;
-   
-   if(!property) return;
-   
-   if(name.contains(ISCLSY_KW))
-   {
-      setSecurityClassificationSystem(property->valueToString());
-   }
-   else if(name.contains(ISCODE_KW))
-   {
-      setCodewords(property->valueToString());
-   }
-   else if(name.contains(ISCTLH_KW))
-   {
-      setControlAndHandling(property->valueToString());
-   }
-   else if(name.contains(ISREL_KW))
-   {
-      setReleasingInstructions(property->valueToString());
-   }
-   else if(name.contains(ISDCTP_KW))
-   {
-      setDeclassificationType(property->valueToString());
-   }
-   else if(name.contains(ISDCDT_KW))
-   {
-      setDeclassificationDate(property->valueToString());
-   }
-   else if(name.contains(ISDCXM_KW))
-   {
-      setDeclassificationExempt(property->valueToString());
-   }
-   else if(name.contains(ISDG_KW))
-   {
-      setDowngrade(property->valueToString());
-   }
-   else if(name.contains(ISDGDT_KW))
-   {
-      setDowngradeDate(property->valueToString());
-   }
-   else if(name.contains(ISCLTX_KW))
-   {
-      setClassificationText(property->valueToString());
-   }
-   else if(name.contains(ISCATP_KW))
-   {
-      setClassificationAuthorityType(property->valueToString());
-   }
-   else if(name.contains(ISCAUT_KW))
-   {
-      setClassificationAuthority(property->valueToString());
-   }
-   else if(name.contains(ISCRSN_KW))
-   {
-      setClassificationReason(property->valueToString());
-   }
-   else if(name.contains(ISSRDT_KW))
-   {
-      setSecuritySourceDate(property->valueToString());
-   }
-   else if(name.contains(ISCTLN_KW))
-   {
-      setSecurityControlNumber(property->valueToString());
-   }
-   else
-   {
-      ossimNitfImageHeaderV2_X::setProperty(property);
-   }
-}
-
-ossimRefPtr<ossimProperty> ossimNitfImageHeaderV2_1::getProperty(const ossimString& name)const
-{
-   ossimProperty* property = 0;
-
-   if(name == ISCLSY_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         ossimString(theSecurityClassificationSys).trim());
-   }
-   else if(name == ISCODE_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         ossimString(theCodewords).trim());
-   }
-   else if(name == ISCTLH_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         ossimString(theControlAndHandling).trim());
-   }
-   else if(name == ISREL_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         ossimString(theReleasingInstructions).trim());
-   }
-   else if(name == ISDCTP_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         ossimString(theDeclassificationType).trim());
-   }
-   else if(name == ISDCDT_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         ossimString(theDeclassificationDate).trim());
-   }
-   else if(name == ISDCXM_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         ossimString(theDeclassificationExempt).trim());
-   }
-   else if(name == ISDG_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         ossimString(theDowngrade).trim());
-   }
-   else if(name == ISDGDT_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         ossimString(theDowngradeDate).trim());
-   }
-   else if(name == ISCLTX_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         ossimString(theClassificationText).trim());
-   }
-   else if(name == ISCATP_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         ossimString(theClassificationAuthType).trim());
-   }
-   else if(name == ISCRSN_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         ossimString(theClassificationAuthority).trim());
-   }
-   else if(name == ISSRDT_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         ossimString(theSecuritySourceDate).trim());
-   }
-   else if(name == ISCTLN_KW)
-   {
-      property = new ossimStringProperty(name,
-                                         ossimString(theSecurityControlNumber).trim());
-   }
-   else
-   {
-      return ossimNitfImageHeaderV2_X::getProperty(name);
-   }
-   
-   return property;
-}
-
-void ossimNitfImageHeaderV2_1::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimNitfImageHeaderV2_X::getPropertyNames(propertyNames);
-
-   propertyNames.push_back(ISCLSY_KW);
-   propertyNames.push_back(ISCODE_KW);
-   propertyNames.push_back(ISCTLH_KW);
-   propertyNames.push_back(ISREL_KW);
-   propertyNames.push_back(ISDCTP_KW);
-   propertyNames.push_back(ISDCDT_KW);
-   propertyNames.push_back(ISDCXM_KW);
-   propertyNames.push_back(ISDG_KW);
-   propertyNames.push_back(ISDGDT_KW);
-   propertyNames.push_back(ISCLTX_KW);
-   propertyNames.push_back(ISCATP_KW);
-   propertyNames.push_back(ISCAUT_KW);
-   propertyNames.push_back(ISCRSN_KW);
-   propertyNames.push_back(ISSRDT_KW);
-   propertyNames.push_back(ISCTLN_KW);
-   propertyNames.push_back(XBANDS_KW);
-}
-
-const ossimRefPtr<ossimNitfCompressionHeader> ossimNitfImageHeaderV2_1::getCompressionHeader()const
-{
-   return theCompressionHeader;
-}
-
-const ossimRefPtr<ossimNitfImageBand> ossimNitfImageHeaderV2_1::getBandInformation(ossim_uint32 idx)const
-{
-   if(idx < theImageBands.size())
-   {
-      return (ossimNitfImageBand*)theImageBands[idx].get();
-   }
-   
-   return 0;
-}
diff --git a/src/ossim/support_data/ossimNitfInfo.cpp b/src/ossim/support_data/ossimNitfInfo.cpp
deleted file mode 100644
index c791e28..0000000
--- a/src/ossim/support_data/ossimNitfInfo.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description: NITF Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <iostream>
-
-#include <ossim/support_data/ossimNitfInfo.h>
-
-ossimNitfInfo::ossimNitfInfo()
-   : m_nitfFile(0)
-{
-}
-
-ossimNitfInfo::~ossimNitfInfo()
-{
-   m_nitfFile = 0;
-}
-
-bool ossimNitfInfo::open(const ossimFilename& file)
-{
-   m_nitfFile = new ossimNitfFile();
-
-   bool result = m_nitfFile->parseFile(file);
-
-   if (result == false)
-   {
-      m_nitfFile = 0;
-   }
-
-   return result;
-}
-
-std::ostream& ossimNitfInfo::print(std::ostream& out) const
-{
-   if ( m_nitfFile.valid() )
-   {
-      std::string prefix;
-      m_nitfFile->print(out, prefix, getProcessOverviewFlag());
-   }
-   return out;
-}
-
-bool ossimNitfInfo::getKeywordlist(ossimKeywordlist& kwl)const
-{
-   bool result = false;
-   if ( m_nitfFile.valid() )
-   {
-      m_nitfFile->saveState(kwl, "nitf.");
-   }
-   
-   return result;
-}
diff --git a/src/ossim/support_data/ossimNitfJ2klraTag.cpp b/src/ossim/support_data/ossimNitfJ2klraTag.cpp
deleted file mode 100644
index c6faaeb..0000000
--- a/src/ossim/support_data/ossimNitfJ2klraTag.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossimNitfJ2klraTag.cpp
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: NITF J2KLRA tag.
-//
-// See:  ISO/IEC BIIF Profile BPJ2K01.00 Table 9-3.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-
-#include <ossim/support_data/ossimNitfJ2klraTag.h>
-#include <ossim/base/ossimString.h>
-
-#include <cstring> /* for memcpy */
-#include <iomanip>
-#include <istream>
-#include <ostream>
-
-RTTI_DEF1(ossimNitfJ2klraTag, "ossimNitfJ2klraTag", ossimNitfRegisteredTag);
-
-ossimNitfJ2klraTag::ossimNitfJ2klraTag()
-   : ossimNitfRegisteredTag(std::string("J2KLRA"), 0),
-     m_layer(1)
-{
-   clearFields();
-}
-
-void ossimNitfJ2klraTag::parseStream(std::istream& in)
-{
-   clearFields();
-   
-   in.read(m_orig, ORIG_SIZE);
-   in.read(m_levels_o, NLEVELS_O_SIZE);
-   in.read(m_bands_o, NBANDS_O_SIZE);
-   in.read(m_layers_o, NLAYERS_O_SIZE);
-
-   ossim_uint32 layers = getNumberOfLayersOriginal();
-   if ( layers && (layers < 1000) ) // 999 max
-   {
-      m_layer.resize(layers);
-      for ( ossim_uint32 i = 0; i < layers; ++i )
-      {
-         in.read(m_layer[i].m_layer_id, LAYER_ID_SIZE);
-         in.read(m_layer[i].m_bitrate, BITRATE_SIZE);
-         m_layer[i].m_layer_id[LAYER_ID_SIZE] = '\0';
-         m_layer[i].m_bitrate[BITRATE_SIZE]   = '\0';
-      }
-   }
-   else
-   {
-      m_layer.clear();
-   }
-
-   // Conditional:
-   ossim_uint32 orig = getOriginNumber();
-   if ( (orig == 1) || ( orig == 3 ) || ( orig == 9 ) )
-   {
-      in.read(m_nlevels_i, NLEVELS_I_SIZE);
-      in.read(m_nbands_i, NBANDS_I_SIZE);
-      in.read(m_nlayers_i, NLAYERS_I_SIZE);
-   }
-
-   // Set the base tag length.
-   setTagLength( getSizeInBytes() );
-}
-
-void ossimNitfJ2klraTag::writeStream(std::ostream& out)
-{
-   out.write(m_orig, ORIG_SIZE);
-   out.write(m_levels_o, NLEVELS_O_SIZE);
-   out.write(m_bands_o, NBANDS_O_SIZE);
-   out.write(m_layers_o, NLAYERS_O_SIZE);
-   
-   ossim_uint32 size = m_layer.size();
-   for ( ossim_uint32 i = 0; i < size; ++i )
-   {
-      out.write(m_layer[i].m_layer_id, LAYER_ID_SIZE);
-      out.write(m_layer[i].m_bitrate, BITRATE_SIZE);
-   }
-
-   // Conditional:
-   ossim_uint32 orig = getOriginNumber();
-   if ( (orig == 1) || ( orig == 3 ) || ( orig == 9 ) )
-   {
-      out.write(m_nlevels_i, NLEVELS_I_SIZE);
-      out.write(m_nbands_i, NBANDS_I_SIZE);
-      out.write(m_nlayers_i, NLAYERS_I_SIZE);
-   }
-}
-
-ossim_uint32 ossimNitfJ2klraTag::getSizeInBytes()const
-{
-   ossim_uint32 result = 11 + (m_layer.size() * 12);
-
-   // Conditional:
-   ossim_uint32 orig = getOriginNumber();
-   if ( (orig == 1) || ( orig == 3 ) || ( orig == 9 ) )
-   {
-      result += 10;
-   }
-   return result;
-}
-
-void ossimNitfJ2klraTag::clearFields()
-{
-   memset(m_orig, '0', ORIG_SIZE);
-
-   memset(m_levels_o, '0', NLEVELS_O_SIZE);
-   memset(m_bands_o, '0', NBANDS_O_SIZE);
-   memset(m_layers_o, '0', NLAYERS_O_SIZE);
-
-   m_layer.clear();
-
-   memset(m_nlevels_i, '0', NLEVELS_I_SIZE);
-   memset(m_nbands_i, '0', NBANDS_I_SIZE);
-   memset(m_nlayers_i, '0', NLAYERS_I_SIZE);
-   
-   m_orig[ORIG_SIZE]= '\0';
-   
-   m_levels_o[NLEVELS_O_SIZE]= '\0';
-   m_bands_o[NBANDS_O_SIZE]= '\0';
-   m_layers_o[NLAYERS_O_SIZE]= '\0';
-
-   m_nlevels_i[NLEVELS_I_SIZE]= '\0';
-   m_nbands_i[NBANDS_I_SIZE] = '\0';
-   m_nlayers_i[NLAYERS_I_SIZE] = '\0';
-
-   // Set the base tag length.
-   setTagLength( 0 );
-}
-
-std::ostream& ossimNitfJ2klraTag::print(std::ostream& out,
-                                        const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += getTagName();
-   pfx += ".";
-   
-   out << setiosflags(ios::left)
-       << pfx << std::setw(24) << "CETAG:"     << getTagName() << "\n"
-       << pfx << std::setw(24) << "CEL:"       << getTagLength() << "\n"
-       << pfx << std::setw(24) << "ORIG:"      << m_orig << "\n"
-       << pfx << std::setw(24) << "NLEVELS_O:" << m_levels_o << "\n"
-       << pfx << std::setw(24) << "NBANDS_O:"  << m_bands_o << "\n"
-       << pfx << std::setw(24) << "NLAYERS_O:" << m_layers_o << "\n";
-
-   ossim_uint32 size = m_layer.size();
-   for ( ossim_uint32 i = 0; i < size; ++i )
-   {
-      out << pfx << "LAYER_ID[" << i << std::setw(14) << "]:" << m_layer[i].m_layer_id << "\n"
-          << pfx << "BITRATE[" << i << std::setw(15) << "]:" << m_layer[i].m_bitrate << "\n";
-   }
-
-   // Conditional:
-   ossim_uint32 orig = getOriginNumber();
-   if ( (orig == 1) || ( orig == 3 ) || ( orig == 9 ) )
-   {
-      out << pfx << std::setw(24) << "NLEVELS_I:"     << m_nlevels_i << "\n"
-          << pfx << std::setw(24) << "NBANDS_I_SIZE:" << m_nbands_i << "\n"
-          << pfx << std::setw(24) << "NLAYERS_I:"     << m_nlayers_i << "\n";
-   }
-   return out;
-}
-   
-ossim_uint32 ossimNitfJ2klraTag::getOriginNumber() const
-{
-   return ossimString(m_orig).toUInt32();
-}
-   
-ossim_uint32 ossimNitfJ2klraTag::getNumberOfLayersOriginal() const
-{
-   return ossimString(m_layers_o).toUInt32();
-}
diff --git a/src/ossim/support_data/ossimNitfLocalCartographicTag.cpp b/src/ossim/support_data/ossimNitfLocalCartographicTag.cpp
deleted file mode 100644
index 5ba8f89..0000000
--- a/src/ossim/support_data/ossimNitfLocalCartographicTag.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-//*******************************************************************
-//
-// LICENSE: LGPL
-//
-// see top level LICENSE.txt
-// 
-// Author: Garrett Potts
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfLocalCartographicTag.cpp 22013 2012-12-19 17:37:20Z dburken $
-
-#include <sstream>
-#include <iostream>
-#include <iomanip>
-#include <ossim/support_data/ossimNitfLocalCartographicTag.h>
-
-RTTI_DEF1(ossimNitfLocalCartographicTag, "ossimNitfLocalCartographicTag", ossimNitfRegisteredTag);
-
-ossimNitfLocalCartographicTag::ossimNitfLocalCartographicTag()
-   : ossimNitfRegisteredTag(std::string("MAPLOB"), 43)
-{
-}
-
-ossimNitfLocalCartographicTag::~ossimNitfLocalCartographicTag()
-{
-}
-
-void ossimNitfLocalCartographicTag::parseStream(std::istream& in)
-{
-   clearFields();
-   
-   in.read(theLengthUnits, 3);
-   in.read(theEastingInterval, 5);
-   in.read(theNorthingInterval, 5);
-   in.read(theEastingReferenceOrigin, 15);
-   in.read(theNorthingReferenceOrigin, 15);
-}
-
-void ossimNitfLocalCartographicTag::writeStream(std::ostream& out)
-{
-   out.write(theLengthUnits, 3);
-   out.write(theEastingInterval, 5);
-   out.write(theNorthingInterval, 5);
-   out.write(theEastingReferenceOrigin, 15);
-   out.write(theNorthingReferenceOrigin, 15);
-}
-
-void ossimNitfLocalCartographicTag::clearFields()
-{
-   memset(theLengthUnits, ' ', 3);
-   memset(theEastingInterval, '0', 5);
-   memset(theNorthingInterval, '0', 5);
-   memset(theEastingReferenceOrigin, '0', 15);
-   memset(theNorthingReferenceOrigin, '0', 15);
-
-   theLengthUnits[3]              = '\0';
-   theEastingInterval[5]          = '\0';
-   theNorthingInterval[5]         = '\0';
-   theEastingReferenceOrigin[15]  = '\0';
-   theNorthingReferenceOrigin[15] = '\0';
-}
-
-void ossimNitfLocalCartographicTag::setLengthUnits(const ossimString& units)
-{
-   ossimString temp = ossimString(units).trim().upcase();
-   std::ostringstream out;
-
-   out << std::setw(3)
-       << std::setfill(' ')
-       << temp.c_str();
-   
-   memcpy(theLengthUnits, out.str().c_str(), 3);
-}
-
-void ossimNitfLocalCartographicTag::setEastingInterval(ossim_uint32 eastingInterval)
-{
-   ossim_uint32 temp = eastingInterval;
-
-   if(temp > 99999)
-   {
-      temp = 99999;
-   }
-   
-   std::ostringstream out;
-
-   out << std::setw(5)
-       << std::setfill('0')
-       << temp;
-   
-   memcpy(theEastingInterval, out.str().c_str(), 5);
-}
-
-void ossimNitfLocalCartographicTag::setNorthingInterval(ossim_uint32 northingInterval)
-{
-   ossim_uint32 temp = northingInterval;
-
-   if(temp > 99999)
-   {
-      temp = 99999;
-   }
-   
-   std::ostringstream out;
-
-   out << std::setw(5)
-       << std::setfill('0')
-       << temp;
-   
-   memcpy(theNorthingInterval, out.str().c_str(), 5);
-}
-
-void ossimNitfLocalCartographicTag::setEastingReferenceOrigin(ossim_float64 east)
-{
-   std::ostringstream out;
-
-   out << std::setw(15)
-       << std::setfill(' ')
-       << std::setprecision(1)
-       << std::setiosflags(std::ios::fixed)
-       << east;
-   
-   memcpy(theEastingReferenceOrigin, out.str().c_str(), 15);
-   
-}
-
-void ossimNitfLocalCartographicTag::setNorthingReferenceOrigin(ossim_float64 north)
-{
-   std::ostringstream out;
-
-   out << std::setw(15)
-       << std::setfill(' ')
-       << std::setprecision(1)
-       << std::setiosflags(std::ios::fixed)
-       << north;
-   
-   memcpy(theNorthingReferenceOrigin, out.str().c_str(), 15);
-}
diff --git a/src/ossim/support_data/ossimNitfLocalGeographicTag.cpp b/src/ossim/support_data/ossimNitfLocalGeographicTag.cpp
deleted file mode 100644
index c9135b9..0000000
--- a/src/ossim/support_data/ossimNitfLocalGeographicTag.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2004 Intelligence Data Systems. 
-//
-// LICENSE: LGPL
-//
-// see top level LICENSE.txt
-// 
-// Author: Garrett Potts
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfLocalGeographicTag.cpp 22013 2012-12-19 17:37:20Z dburken $
-#include <ossim/support_data/ossimNitfLocalGeographicTag.h>
-#include <iomanip>
-#include <sstream>
-
-RTTI_DEF1(ossimNitfLocalGeographicTag, "ossimNitfLocalGeographicTag", ossimNitfRegisteredTag);
-
-ossimNitfLocalGeographicTag::ossimNitfLocalGeographicTag()
-   : ossimNitfRegisteredTag(std::string("GEOLOB"), 48)
-{
-   clearFields();
-}
-
-ossimNitfLocalGeographicTag::~ossimNitfLocalGeographicTag()
-{
-}
-
-void ossimNitfLocalGeographicTag::parseStream(std::istream& in)
-{
-   in.read(theLonDensity, 9);
-   in.read(theLatDensity, 9);
-   in.read(theLonOrigin, 15);
-   in.read(theLatOrigin, 15);
-}
-
-void ossimNitfLocalGeographicTag::writeStream(std::ostream& out)
-{
-   out.write(theLonDensity, 9);
-   out.write(theLatDensity, 9);
-   out.write(theLonOrigin, 15);
-   out.write(theLatOrigin, 15);
-}
-
-void ossimNitfLocalGeographicTag::clearFields()
-{
-   memset(theLonDensity, ' ', 9);
-   memset(theLatDensity, ' ', 9);
-   memset(theLonOrigin, '0', 15);
-   memset(theLatOrigin, '0', 15);
-
-   
-   
-   theLonDensity[9] = '\0';
-   theLatDensity[9] = '\0';
-   theLonOrigin[15] = '\0';
-   theLatOrigin[14] = '\0';
-}
-
-void ossimNitfLocalGeographicTag::setDegreesPerPixelLat(double deltaLat)
-{
-   ossim_uint32 pixels = 0;
-   if(deltaLat > 0.0)
-   {
-      pixels = (ossim_uint32)((1.0/deltaLat)*360.0 + .5);
-   }
-   std::ostringstream out;
-
-   out << std::setw(9)
-       << std::setfill('0')
-       << pixels;
-
-   memcpy(theLatDensity, out.str().c_str(), 9);
-}
-
-void ossimNitfLocalGeographicTag::setDegreesPerPixelLon(double deltaLon)
-{
-   ossim_uint32 pixels = 0;
-   if(deltaLon > 0.0)
-   {
-      pixels = (ossim_uint32)((1.0/deltaLon)*360.0 + .5);
-   }
-   std::ostringstream out;
-
-   out << std::setw(9)
-       << std::setfill('0')
-       << pixels;
-
-   memcpy(theLonDensity, out.str().c_str(), 9);
-}
-
-void ossimNitfLocalGeographicTag::setLatOrigin(double origin)
-{
-   std::ostringstream out;
-
-   out << std::setw(15)
-       << std::setfill('0')
-       << origin;
-   memcpy(theLatOrigin, out.str().c_str(), 15);
-}
-
-void ossimNitfLocalGeographicTag::setLonOrigin(double origin)
-{
-   std::ostringstream out;
-
-   out << std::setw(15)
-       << std::setfill('0')
-       << origin;
-   memcpy(theLonOrigin, out.str().c_str(), 15);
-}
diff --git a/src/ossim/support_data/ossimNitfMstgtaTag.cpp b/src/ossim/support_data/ossimNitfMstgtaTag.cpp
deleted file mode 100644
index 445e6b0..0000000
--- a/src/ossim/support_data/ossimNitfMstgtaTag.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: MSTGTA Mission Target Information Extension Format
-// tag class definition.
-//
-// See document STDI-0002 Table 8-16 for more info.
-// 
-//----------------------------------------------------------------------------
-// $Id
-
-#include <cstring>
-#include <istream>
-#include <iostream>
-#include <iomanip>
-
-#include <ossim/support_data/ossimNitfMstgtaTag.h>
-
-
-RTTI_DEF1(ossimNitfMstgtaTag, "ossimNitfMstgtaTag", ossimNitfRegisteredTag);
-
-ossimNitfMstgtaTag::ossimNitfMstgtaTag()
-   : ossimNitfRegisteredTag(std::string("MSTGTA"), 101)
-{
-   clearFields();
-}
-
-ossimNitfMstgtaTag::~ossimNitfMstgtaTag()
-{
-}
-
-void ossimNitfMstgtaTag::parseStream(std::istream& in)
-{
-   clearFields();
-   
-   in.read(theTgtNum, TGT_NUM_SIZE);
-   in.read(theTgtId, TGT_ID_SIZE);
-   in.read(theTgtBe, TGT_BE_SIZE);
-   in.read(theTgtPri, TGT_PRI_SIZE);
-   in.read(theTgtReq, TGT_REQ_SIZE);
-   in.read(theTgtLtiov, TGT_LTIOV_SIZE);
-   in.read(theTgtType, TGT_TYPE_SIZE);
-   in.read(theTgtColl, TGT_COLL_SIZE);
-   in.read(theTgtCat, TGT_CAT_SIZE);
-   in.read(theTgtUtc, TGT_UTC_SIZE);
-   in.read(theTgtElev, TGT_ELEV_SIZE);
-   in.read(theTgtElevUnit, TGT_ELEV_UNIT_SIZE);
-   in.read(theTgtLoc, TGT_LOC_SIZE);
-}
-
-void ossimNitfMstgtaTag::writeStream(std::ostream& out)
-{
-   out.write(theTgtNum, TGT_NUM_SIZE);
-   out.write(theTgtId, TGT_ID_SIZE);
-   out.write(theTgtBe, TGT_BE_SIZE);
-   out.write(theTgtPri, TGT_PRI_SIZE);
-   out.write(theTgtReq, TGT_REQ_SIZE);
-   out.write(theTgtLtiov, TGT_LTIOV_SIZE);
-   out.write(theTgtType, TGT_TYPE_SIZE);
-   out.write(theTgtColl, TGT_COLL_SIZE);
-   out.write(theTgtCat, TGT_CAT_SIZE);
-   out.write(theTgtUtc, TGT_UTC_SIZE);
-   out.write(theTgtElev, TGT_ELEV_SIZE);
-   out.write(theTgtElevUnit, TGT_ELEV_UNIT_SIZE);
-   out.write(theTgtLoc, TGT_LOC_SIZE);
-}
-
-void ossimNitfMstgtaTag::clearFields()
-{
-   // BCS-N's to '0's, BCS-A's to ' '(spaces)
-
-   // clear
-   memset(theTgtNum, '0', TGT_NUM_SIZE);
-   memset(theTgtId, ' ', TGT_ID_SIZE);
-   memset(theTgtBe, ' ', TGT_BE_SIZE);
-   memset(theTgtPri, ' ', TGT_PRI_SIZE);
-   memset(theTgtReq, ' ', TGT_REQ_SIZE);
-   memset(theTgtLtiov, ' ', TGT_LTIOV_SIZE);
-   memset(theTgtType, ' ', TGT_TYPE_SIZE);
-   memset(theTgtColl, '0', TGT_COLL_SIZE);
-   memset(theTgtCat, ' ', TGT_CAT_SIZE);
-   memset(theTgtUtc, ' ', TGT_UTC_SIZE);
-   memset(theTgtElev, ' ', TGT_ELEV_SIZE);
-   memset(theTgtElevUnit, ' ', TGT_ELEV_UNIT_SIZE);
-   memset(theTgtLoc, ' ', TGT_LOC_SIZE);
-
-   // null terminate
-   theTgtNum[TGT_NUM_SIZE] = '\0';
-   theTgtId[TGT_ID_SIZE] = '\0';
-   theTgtBe[TGT_BE_SIZE] = '\0';
-   theTgtPri[TGT_PRI_SIZE] = '\0';
-   theTgtReq[TGT_REQ_SIZE] = '\0';
-   theTgtLtiov[TGT_LTIOV_SIZE] = '\0';
-   theTgtType[TGT_TYPE_SIZE] = '\0';
-   theTgtColl[TGT_COLL_SIZE] = '\0';
-   theTgtCat[TGT_CAT_SIZE] = '\0';
-   theTgtUtc[TGT_UTC_SIZE] = '\0';
-   theTgtElev[TGT_ELEV_SIZE] = '\0';
-   theTgtElevUnit[TGT_ELEV_UNIT_SIZE] = '\0';
-   theTgtLoc[TGT_LOC_SIZE] = '\0';
-}
-
-std::ostream& ossimNitfMstgtaTag::print(
-   std::ostream& out, const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += getTagName();
-   pfx += ".";
-   
-   out << setiosflags(std::ios::left)
-       << pfx << std::setw(24) << "CETAG:"
-       << getTagName() << "\n"
-       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
-       << pfx << std::setw(24) << "TGT_NUM:" << theTgtNum << "\n"
-       << pfx << std::setw(24) << "TGT_ID:" << theTgtId << "\n"
-       << pfx << std::setw(24) << "TGT_BE:" << theTgtBe << "\n"
-       << pfx << std::setw(24) << "TGT_PRI:" << theTgtPri << "\n"
-       << pfx << std::setw(24) << "TGT_REQ:" << theTgtReq << "\n"
-       << pfx << std::setw(24) << "TGT_LTIOV:" << theTgtLtiov << "\n"
-       << pfx << std::setw(24) << "TGT_TYPE:" << theTgtType << "\n"
-       << pfx << std::setw(24) << "TGT_COLL:" << theTgtColl << "\n"
-       << pfx << std::setw(24) << "TGT_CAT:" << theTgtCat << "\n"
-       << pfx << std::setw(24) << "TGT_UTC:" << theTgtUtc << "\n"
-       << pfx << std::setw(24) << "TGT_ELEV:" << theTgtElev << "\n"
-       << pfx << std::setw(24) << "TGT_ELEV_UNIT:" << theTgtElevUnit << "\n"
-       << pfx << std::setw(24) << "TGT_LOC:" << theTgtLoc << "\n";
-   
-   return out;
-}
diff --git a/src/ossim/support_data/ossimNitfNameConversionTables.cpp b/src/ossim/support_data/ossimNitfNameConversionTables.cpp
deleted file mode 100644
index d741fda..0000000
--- a/src/ossim/support_data/ossimNitfNameConversionTables.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2004 Garrett Potts.
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Garrett Potts
-//
-//*******************************************************************
-//  $Id: ossimNitfNameConversionTables.cpp 13219 2008-07-23 19:27:49Z dburken $
-
-#include <cstddef>
-#include <ossim/support_data/ossimNitfNameConversionTables.h>
-#include <ossim/base/ossimString.h>
-
-struct ossimNitfMapProjectionCodeToOssimName
-{
-   const char* nitfProjCode; // nitf code name
-   const char* projectionName; // ossim projection name
-};
-
-struct ossimNitfMapProjectionCodeToNitfName
-{
-   const char* nitfProjCode; // nitf code name
-   const char* projectionName; // ossim projection name
-};
-
-static const ossimNitfMapProjectionCodeToOssimName mapProjectiontable[]=
-{
-   {"AC", "ossimAlbersProjection"},
-   {"AL", "ossimAzimEquDistProjection"},
-   {"BF", "ossimBonneProjection"},
-   {"CP", "ossimEquDistCylProjection"},
-   {"CP", "ossimLlxyProjection"},
-   {"CS", "ossimCassiniProjection"},
-   {"ED", "ossimEckert6Projection"},
-   {"EF", "ossimEckert4Projection"},
-   {"GN", "ossimGnomonicProjection"},
-   {"LE", "ossimLambertConformalConicProjection"},
-   {"LI", "ossimCylEquAreaProjection"},
-   {"MC", "ossimMercatorProjection"},
-   {"MH", "ossimMillerProjection"},
-   {"MP", "ossimMollweidProjection"},
-   {"NT", "ossimNewZealandMapGridProjection"},
-   {"OD", "ossimOrthoGraphicProjection"},
-   {"PG", "ossimPolarStereoProjection"},
-   {"PH", "ossimPolyconicProjection"},
-   {"SA", "ossimSinusoidalProjection"},
-   {"SX", "ossimSpaceObliqueMercatorProjection"},
-   {"TC", "ossimTransMercatorProjection"},
-   {"TX", "ossimTransCylEquAreaProjection"},
-   {"VA", "ossimVanDerGrintenProjection"},
-   { 0, 0 }
-};
-
-static const ossimNitfMapProjectionCodeToNitfName nitfMapProjectiontable[]=
-{
-   {"AC", "Albers Equal-Area Conic"},
-   {"AK", "(Lambert) Azimuthal Equal-Area"},
-   {"AL", "Azimuthal Equidistant"},
-   {"BF", "Bonne"},
-   {"CC", "Equidistant Conic with 1 Standard Parallel"},
-   {"CP", "Equirectangular"},
-   {"CS", "Cassini-Soldner"},
-   {"ED", "Eckert VI"},
-   {"EF", "Eckert IV"},
-   {"GN", "Gnomonic"},
-   {"HX", "Hotine Oblique Mercator based on 2 Points"},
-   {"KA", " Equidistant Conic with 2 Standard Parallels"},
-   {"LA", "Laborde"},
-   {"LE", "Lambert Conformal Conic"},
-   {"LI", "Cylindrical Equal Area"},
-   {"LJ", " Lambert Equal-Area Meridional"},
-   {"MC", "Mercator"},
-   {"MH", "Miller Cylindrical"},
-   {"MJ", "French Lambert"},
-   {"MP", "Mollweide"},
-   {"NT", "New Zealand Map Grid"},
-   {"OC", "Oblique Mercator"},
-   {"OD", "Orthographic"},
-   {"PG", "Polar Stereographic"},
-   {"PH", "Polyconic"},
-   {"RS", "Hotine Oblique Mercator (Rectified Skew Orthomorphic)"},
-   {"RB", "Hotine Oblique Mercator (Rectified Skew Orthomorphic)"},
-   {"RX", "Robinson"},
-   {"SA", "Sinusoidal"},
-   {"SD", "Oblique Stereographic"},
-   {"SX", "Space Oblique Mercator"},
-   {"TC", " Transverse Mercator"},
-   {"TX", "Transverse Cylindrical Equal Area"},
-   {"VA", "Van der Grinten"},
-   {"VX", "General Vertical NearSide Perspective"},
-   { 0, 0 }
-};
-
-ossimNitfNameConversionTables::ossimNitfNameConversionTables()
-{
-}
-
-ossimString ossimNitfNameConversionTables::convertMapProjectionNameToNitfCode(const ossimString& mapProjectionName)const
-{
-   ossim_uint32 idx = 0;
-
-   while(mapProjectiontable[idx].nitfProjCode)
-   {
-      if(mapProjectionName == mapProjectiontable[idx].projectionName)
-      {
-         return mapProjectiontable[idx].nitfProjCode;
-      }
-      ++idx;
-   }
-
-   return "";
-}
-
-ossimString ossimNitfNameConversionTables::convertNitfCodeToOssimProjectionName(const ossimString& nitfProjectionCode)const
-{
-   ossim_uint32 idx = 0;
-
-   while(mapProjectiontable[idx].nitfProjCode)
-   {
-      if(nitfProjectionCode == mapProjectiontable[idx].nitfProjCode)
-      {
-         return mapProjectiontable[idx].projectionName;
-      }
-      ++idx;
-   }
-
-   return "";
-}
-
-ossimString ossimNitfNameConversionTables::convertNitfCodeToNitfProjectionName(const ossimString& nitfProjectionCode)const
-{
-   ossim_uint32 idx = 0;
-
-   while(nitfMapProjectiontable[idx].nitfProjCode)
-   {
-      if(nitfProjectionCode == nitfMapProjectiontable[idx].nitfProjCode)
-      {
-         return nitfMapProjectiontable[idx].projectionName;
-      }
-      ++idx;
-   }
-
-   return "";
-}
-
-ossimString ossimNitfNameConversionTables::convertNitfProjectionNameToNitfCode(const ossimString& nitfProjectionName)const
-{
-   ossim_uint32 idx = 0;
-
-   while(nitfMapProjectiontable[idx].nitfProjCode)
-   {
-      if(nitfProjectionName ==  nitfMapProjectiontable[idx].projectionName)
-      {
-         return nitfMapProjectiontable[idx].nitfProjCode;
-      }
-      ++idx;
-   }
-
-   return "";
-}
diff --git a/src/ossim/support_data/ossimNitfPiaimcTag.cpp b/src/ossim/support_data/ossimNitfPiaimcTag.cpp
deleted file mode 100644
index f2a10f9..0000000
--- a/src/ossim/support_data/ossimNitfPiaimcTag.cpp
+++ /dev/null
@@ -1,411 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: PIAIMC tag class declaration.
-// 
-// "Profile for Imagery Access Image Support Extensions"
-//
-// See document STDI-0002 Table 6-1 for more info.
-// 
-// http://164.214.2.51/ntb/baseline/docs/stdi0002/final.pdf
-//
-//----------------------------------------------------------------------------
-// $Id: ossimNitfPiaimcTag.cpp 22013 2012-12-19 17:37:20Z dburken $
-
-#include <cstring> /* for memcpy */
-#include <iostream>
-#include <iomanip>
-
-#include <ossim/support_data/ossimNitfPiaimcTag.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimCommon.h>
-
-static const ossimString CLOUDCVR_KW = "CLOUDCVR";
-static const ossimString SRP_KW = "SRP";
-static const ossimString SENSMODE_KW = "SENSMODE";
-static const ossimString SENSNAME_KW = "SENSNAME";
-static const ossimString SOURCE_KW = "SOURCE";
-static const ossimString COMGEN_KW = "COMGEN";
-static const ossimString SUBQUAL_KW = "SUBQUAL";
-static const ossimString PIAMSNNUM_KW = "PIAMSNNUM";
-static const ossimString CAMSPECS_KW = "CAMSPECS";
-static const ossimString PROJID_KW = "PROJID";
-static const ossimString GENERATION_KW = "GENERATION";
-static const ossimString ESD_KW = "ESD";
-static const ossimString OTHERCOND_KW = "OTHERCOND";
-static const ossimString MEANGSD_KW = "MEANGSD";
-static const ossimString IDATUM_KW = "IDATUM";
-static const ossimString IELLIP_KW = "IELLIP";
-static const ossimString PREPROC_KW = "PREPROC";
-static const ossimString IPROJ_KW = "IPROJ";
-static const ossimString SATTRACK_KW = "SATTRACK";
-
-RTTI_DEF1(ossimNitfPiaimcTag,
-          "ossimNitfPiaimcTag",
-          ossimNitfRegisteredTag);
-
-ossimNitfPiaimcTag::ossimNitfPiaimcTag()
-   : ossimNitfRegisteredTag(std::string("PIAIMC"), 362)
-{
-   clearFields();
-}
-
-void ossimNitfPiaimcTag::parseStream(std::istream& in)
-{
-   clearFields();
-   
-   in.read(theCloudcvr,   CLOUDCVR_SIZE);
-   in.read(theSrp,        SRP_SIZE);
-   in.read(thesSensmode,  SENSMODE_SIZE);
-   in.read(theSensname,   SENSNAME_SIZE);
-   in.read(theSource,     SOURCE_SIZE);
-   in.read(theComgen,     COMGEN_SIZE);
-   in.read(theSubqual,    SUBQUAL_SIZE);
-   in.read(thePiamsnnum,  PIAMSNNUM_SIZE);
-   in.read(theCamspecs,   CAMSPECS_SIZE);
-   in.read(theProjid,     PROJID_SIZE);
-   in.read(theGeneration, GENERATION_SIZE);
-   in.read(theEsd,        ESD_SIZE);
-   in.read(theOthercond,  OTHERCOND_SIZE);
-   in.read(theMeanGsd,    MEANGSD_SIZE);
-   in.read(theIdatum,     IDATUM_SIZE);
-   in.read(theIellip,     IELLIP_SIZE);
-   in.read(thePreproc,    PREPROC_SIZE);
-   in.read(theIproj,      IPROJ_SIZE);
-   in.read(theSattrack,   SATTRACK_SIZE);
-}
-
-void ossimNitfPiaimcTag::writeStream(std::ostream& out)
-{
-   out.write(theCloudcvr,   CLOUDCVR_SIZE);
-   out.write(theSrp,        SRP_SIZE);
-   out.write(thesSensmode,  SENSMODE_SIZE);
-   out.write(theSensname,   SENSNAME_SIZE);
-   out.write(theSource,     SOURCE_SIZE);
-   out.write(theComgen,     COMGEN_SIZE);
-   out.write(theSubqual,    SUBQUAL_SIZE);
-   out.write(thePiamsnnum,  PIAMSNNUM_SIZE);
-   out.write(theCamspecs,   CAMSPECS_SIZE);
-   out.write(theProjid,     PROJID_SIZE);
-   out.write(theGeneration, GENERATION_SIZE);
-   out.write(theEsd,        ESD_SIZE);
-   out.write(theOthercond,  OTHERCOND_SIZE);
-   out.write(theMeanGsd,    MEANGSD_SIZE);
-   out.write(theIdatum,     IDATUM_SIZE);
-   out.write(theIellip,     IELLIP_SIZE);
-   out.write(thePreproc,    PREPROC_SIZE);
-   out.write(theIproj,      IPROJ_SIZE);
-   out.write(theSattrack,   SATTRACK_SIZE);
-}
-
-void ossimNitfPiaimcTag::clearFields()
-{
-   memcpy(theCloudcvr, "999",   CLOUDCVR_SIZE);
-   memset(theSrp,        ' ',        SRP_SIZE);
-   memset(thesSensmode,  ' ',  SENSMODE_SIZE);
-   memset(theSensname,   ' ',   SENSNAME_SIZE);
-   memset(theSource,     ' ',     SOURCE_SIZE);
-   memset(theComgen,     ' ',     COMGEN_SIZE);
-   memset(theSubqual,    ' ',    SUBQUAL_SIZE);
-   memset(thePiamsnnum,  ' ',  PIAMSNNUM_SIZE);
-   memset(theCamspecs,   ' ',   CAMSPECS_SIZE);
-   memset(theProjid,     ' ',     PROJID_SIZE);
-   memset(theGeneration, ' ', GENERATION_SIZE);
-   memset(theEsd,        ' ',        ESD_SIZE);
-   memset(theOthercond,  ' ',  OTHERCOND_SIZE);
-   memset(theMeanGsd,    ' ',    MEANGSD_SIZE);
-   memset(theIdatum,     ' ',     IDATUM_SIZE);
-   memset(theIellip,     ' ',     IELLIP_SIZE);
-   memset(thePreproc,    ' ',    PREPROC_SIZE);
-   memset(theIproj,      ' ',     IPROJ_SIZE);
-   memset(theSattrack,   ' ',   SATTRACK_SIZE);
-
-   theCloudcvr[CLOUDCVR_SIZE]     = '\0';
-   theSrp[SRP_SIZE]               = '\0';
-   thesSensmode[SENSMODE_SIZE]    = '\0';
-   theSensname[SENSNAME_SIZE]     = '\0';
-   theSource[SOURCE_SIZE]         = '\0';
-   theComgen[COMGEN_SIZE]         = '\0';
-   theSubqual[SUBQUAL_SIZE]       = '\0';
-   thePiamsnnum[PIAMSNNUM_SIZE]   = '\0';
-   theCamspecs[CAMSPECS_SIZE]     = '\0';
-   theProjid[PROJID_SIZE]         = '\0';
-   theGeneration[GENERATION_SIZE] = '\0';
-   theEsd[ESD_SIZE]               = '\0';
-   theOthercond[OTHERCOND_SIZE]   = '\0';
-   theMeanGsd[MEANGSD_SIZE]       = '\0';
-   theIdatum[IDATUM_SIZE]         = '\0';
-   theIellip[IELLIP_SIZE]         = '\0';
-   thePreproc[PREPROC_SIZE]       = '\0';
-   theIproj[IPROJ_SIZE]           = '\0';
-   theSattrack[SATTRACK_SIZE]     = '\0';
-}
-
-std::ostream& ossimNitfPiaimcTag::print(std::ostream& out,
-                                        const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += getTagName();
-   pfx += ".";
-   
-   out << setiosflags(std::ios::left)
-       << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n"
-       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
-       << pfx << std::setw(24) << "CLOUDCVR:"  << theCloudcvr << "\n"
-       << pfx << std::setw(24) << "SRP:"       << theSrp << "\n"
-       << pfx << std::setw(24) << "SENSMODE:"   << thesSensmode << "\n"
-       << pfx << std::setw(24) << "SENSNAME:"   << theSensname << "\n"
-       << pfx << std::setw(24) << "SOURCE:"     << theSource << "\n"
-       << pfx << std::setw(24) << "COMGEN:"     << theComgen << "\n"
-       << pfx << std::setw(24) << "SUBQUAL:"    << theSubqual << "\n"
-       << pfx << std::setw(24) << "PIAMSNNUM:"  << thePiamsnnum << "\n"
-       << pfx << std::setw(24) << "CAMSPECS:"   << theCamspecs << "\n"
-       << pfx << std::setw(24) << "PROJID:"     << theProjid << "\n"
-       << pfx << std::setw(24) << "GENERATION:" << theGeneration << "\n"
-       << pfx << std::setw(24) << "ESD:"        << theEsd << "\n"
-       << pfx << std::setw(24) << "OTHERCOND:"  << theOthercond << "\n"
-       << pfx << std::setw(24) << "MEANGSD:"    << theMeanGsd << "\n"
-       << pfx << std::setw(24) << "IDATUM:"     << theIdatum << "\n"
-       << pfx << std::setw(24) << "IELLIP:"     << theIellip << "\n"
-       << pfx << std::setw(24) << "PREPROC:"    << thePreproc << "\n"
-       << pfx << std::setw(24) << "IPROJ:"     << theIproj << "\n"
-       << pfx << std::setw(24) << "SATTRACK:"  << theSattrack << "\n";
-
-   return out;
-}
-
-ossimString ossimNitfPiaimcTag::getCloudcvrString() const
-{
-   return ossimString(theCloudcvr);
-}
-
-ossimString ossimNitfPiaimcTag::getSrpString() const
-{
-   return ossimString(theSrp);
-}
-   
-ossimString ossimNitfPiaimcTag::getSensmodeString() const
-{
-   return ossimString(thesSensmode);
-}
-
-ossimString ossimNitfPiaimcTag::getSensnameString() const
-{
-   return ossimString(theSensname);
-}
-   
-ossimString ossimNitfPiaimcTag::getSourceString() const
-{
-   return ossimString(theSource);
-}
-  
-ossimString ossimNitfPiaimcTag::getComgenString() const
-{
-   return ossimString(theComgen);
-}
-
-ossimString ossimNitfPiaimcTag::getSubqualString() const
-{
-   return ossimString(theSubqual);
-}
-
-ossimString ossimNitfPiaimcTag::getPiamsnnumString() const
-{
-   return ossimString(thePiamsnnum);
-}
-
-ossimString ossimNitfPiaimcTag::getCamspecsString() const
-{
-   return ossimString(theCamspecs);
-}
-
-ossimString ossimNitfPiaimcTag::getProjidString() const
-{
-   return ossimString(theProjid);
-}
-
-ossimString ossimNitfPiaimcTag::getGenerationString() const
-{
-   return ossimString(theGeneration);
-}
-
-ossimString ossimNitfPiaimcTag::getEsdString() const
-{
-   return ossimString(theEsd);
-}
-   
-ossimString ossimNitfPiaimcTag::getOthercondString() const
-{
-   return ossimString(theOthercond);
-}
-
-ossimString ossimNitfPiaimcTag::getMeadGsdString() const
-{
-   return ossimString(theMeanGsd);
-}
-
-ossim_float64 ossimNitfPiaimcTag::getMeanGsdInMeters() const
-{
-   ossim_float64 gsd = 0.0;
-   
-   ossimString s = theMeanGsd;
-   if (s.size())
-   {
-      ossim_float64 d = s.toFloat64();
-      if ( (d != 0.0) && (ossim::isnan(d) == false) )
-      {
-         gsd = d / 12.0 * MTRS_PER_FT;
-      }
-   }
-   
-   return gsd;
-}
-
-ossimString ossimNitfPiaimcTag::getIdatumString() const
-{
-   return ossimString(theIdatum);
-}
-   
-ossimString ossimNitfPiaimcTag::getIellipString() const
-{
-   return ossimString(theIellip);
-}
-   
-ossimString ossimNitfPiaimcTag::getPreprocString() const
-{
-   return ossimString(thePreproc);
-}
-   
-ossimString ossimNitfPiaimcTag::getIprojString() const
-{
-   return ossimString(theIproj);
-}
-   
-ossimString ossimNitfPiaimcTag::getSattrackString() const
-{
-   return ossimString(theSattrack);
-}
-
-void ossimNitfPiaimcTag::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   ossimNitfRegisteredTag::setProperty(property);
-}
-
-ossimRefPtr<ossimProperty> ossimNitfPiaimcTag::getProperty(const ossimString& name)const
-{
-   ossimProperty* result = 0;
-
-   if(name == CLOUDCVR_KW)
-   {
-      result = new ossimStringProperty(name, theCloudcvr);
-   }
-   else if(name == SRP_KW)
-   {
-      result = new ossimStringProperty(name, theSrp);
-   }
-   else if(name == SENSMODE_KW)
-   {
-      result = new ossimStringProperty(name, thesSensmode);
-   }
-   else if(name == SENSNAME_KW)
-   {
-      result = new ossimStringProperty(name, theSensname);
-   }
-   else if(name == SOURCE_KW)
-   {
-      result = new ossimStringProperty(name, theSource);
-   }
-   else if(name == COMGEN_KW)
-   {
-      result = new ossimStringProperty(name, theComgen);
-   }
-   else if(name == SUBQUAL_KW)
-   {
-      result = new ossimStringProperty(name, theSubqual);
-   }
-   else if(name == PIAMSNNUM_KW)
-   {
-      result = new ossimStringProperty(name, thePiamsnnum);
-   }
-   else if(name == CAMSPECS_KW)
-   {
-      result = new ossimStringProperty(name, theCamspecs);
-   }
-   else if(name == PROJID_KW)
-   {
-      result = new ossimStringProperty(name, theProjid);
-   }
-   else if(name == GENERATION_KW)
-   {
-      result = new ossimStringProperty(name, theGeneration);
-   }
-   else if(name == ESD_KW)
-   {
-      result = new ossimStringProperty(name, theEsd);
-   }
-   else if(name == OTHERCOND_KW)
-   {
-      result = new ossimStringProperty(name, theOthercond);
-   }
-   else if(name == MEANGSD_KW)
-   {
-      result = new ossimStringProperty(name, theMeanGsd);
-   }
-   else if(name == IDATUM_KW)
-   {
-      result = new ossimStringProperty(name, theIdatum);
-   }
-   else if(name == IELLIP_KW)
-   {
-      result = new ossimStringProperty(name, theIellip);
-   }
-   else if(name == PREPROC_KW)
-   {
-      result = new ossimStringProperty(name, thePreproc);
-   }
-   else if(name == IPROJ_KW)
-   {
-      result = new ossimStringProperty(name, theIproj);
-   }
-   else if(name == SATTRACK_KW)
-   {
-      result = new ossimStringProperty(name, theSattrack);
-   }
-   else
-   {
-      return ossimNitfRegisteredTag::getProperty(name);
-   }
-
-   return result;
-}
-
-void ossimNitfPiaimcTag::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimNitfRegisteredTag::getPropertyNames(propertyNames);
-   
-   propertyNames.push_back(CLOUDCVR_KW);
-   propertyNames.push_back(SRP_KW);
-   propertyNames.push_back(SENSMODE_KW);
-   propertyNames.push_back(SENSNAME_KW);
-   propertyNames.push_back(SOURCE_KW);
-   propertyNames.push_back(COMGEN_KW);
-   propertyNames.push_back(SUBQUAL_KW);
-   propertyNames.push_back(PIAMSNNUM_KW);
-   propertyNames.push_back(CAMSPECS_KW);
-   propertyNames.push_back(PROJID_KW);
-   propertyNames.push_back(GENERATION_KW);
-   propertyNames.push_back(ESD_KW);
-   propertyNames.push_back(OTHERCOND_KW);
-   propertyNames.push_back(MEANGSD_KW);
-   propertyNames.push_back(IDATUM_KW);
-   propertyNames.push_back(IELLIP_KW);
-   propertyNames.push_back(PREPROC_KW);
-   propertyNames.push_back(IPROJ_KW);
-   propertyNames.push_back(SATTRACK_KW);
-}
diff --git a/src/ossim/support_data/ossimNitfProjectionParameterTag.cpp b/src/ossim/support_data/ossimNitfProjectionParameterTag.cpp
deleted file mode 100644
index 7831558..0000000
--- a/src/ossim/support_data/ossimNitfProjectionParameterTag.cpp
+++ /dev/null
@@ -1,212 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfProjectionParameterTag.cpp 22013 2012-12-19 17:37:20Z dburken $
-#include <ossim/support_data/ossimNitfProjectionParameterTag.h>
-#include <sstream>
-#include <iomanip>
-
-ossimNitfProjectionParameterTag::ossimNitfProjectionParameterTag()
-   :ossimNitfRegisteredTag(std::string("PRJPSB"), 0 )
-{
-   clearFields();
-}
-
-ossimNitfProjectionParameterTag::~ossimNitfProjectionParameterTag()
-{
-}
-
-void ossimNitfProjectionParameterTag::parseStream(std::istream& in)
-{
-   clearFields();
-   
-   in.read(theProjectionName, 80);
-   in.read(theProjectionCode, 2);
-   in.read(theNumberOfParameters, 1);
-
-   ossim_uint32 numberOfParameters = ossimString(theNumberOfParameters).toUInt32();
-
-   for(ossim_uint32 i = 0; i < numberOfParameters; ++i)
-   {
-      char param[15];
-
-      in.read(param, 15);
-      theProjectionParameters.push_back(ossimString(param,
-                                                    param + 15));
-   }
-   in.read(theFalseXOrigin, 15);
-   in.read(theFalseYOrigin, 15);
-
-   // Set the base tag length.
-   setTagLength( getSizeInBytes() );
-}
-
-void ossimNitfProjectionParameterTag::writeStream(std::ostream& out)
-{
-   out.write(theProjectionName, 80);
-   out.write(theProjectionCode, 2);
-
-   {
-      std::ostringstream tempOut;
-
-      tempOut << std::setw(1)
-              << theProjectionParameters.size();
-      theNumberOfParameters[0] = *(tempOut.str().c_str());
-   }
-   out.write(theNumberOfParameters, 1);
-   ossim_uint32 numberOfParameters = ossimString(theNumberOfParameters).toUInt32();
-
-   for(ossim_uint32 i = 0; i < numberOfParameters; ++i)
-   {
-      out.write(theProjectionParameters[i].c_str(), 15);
-   }
-   out.write(theFalseXOrigin, 15);
-   out.write(theFalseYOrigin, 15);
-}
-
-ossim_uint32 ossimNitfProjectionParameterTag::getSizeInBytes()const
-{
-   return (113 + (ossim_uint32)theProjectionParameters.size()*15);
-}
-
-std::ostream& ossimNitfProjectionParameterTag::print(
-   std::ostream& out, const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += getRegisterTagName();
-   pfx += ".";
-
-   out << setiosflags(std::ios::left)
-       << pfx << std::setw(24) << "CETAG:" << getRegisterTagName() << "\n"
-       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
-       << pfx << std::setw(24) << "PRN:"   << theProjectionName << "\n"
-       << pfx << std::setw(24) << "PCO:"   << theProjectionCode << "\n"
-       << pfx << std::setw(24) << "NUM_PRJ:" << theNumberOfParameters << "\n";
-
-   for (ossim_uint32 i = 0; i < theProjectionParameters.size(); ++i)
-   {
-      ossimString s = "PRJ";
-      s += ossimString::toString(i);
-      s += ":";
-      out << pfx << std::setw(24) << s
-          << theProjectionParameters[i] << "\n";
-   }
-
-   out << pfx << std::setw(24) << "XOR:"   <<theFalseXOrigin << "\n"
-       << pfx << std::setw(24) << "YOR:"   <<theFalseYOrigin << std::endl;
-   
-   return out;   
-}
-    
-void ossimNitfProjectionParameterTag::clearFields()
-{
-   theProjectionParameters.clear();
-   
-   memset(theProjectionName, ' ', 80);
-   memset(theProjectionCode, ' ', 2);
-   memset(theNumberOfParameters, '0', 1);
-   memset(theFalseXOrigin, '0', 15);
-   memset(theFalseYOrigin, '0', 15);
-
-   theProjectionName[80] = '\0';
-   theProjectionCode[2] = '\0';
-   theNumberOfParameters[1] = '\0';
-   theFalseXOrigin[15] = '\0';
-   theFalseYOrigin[15] = '\0';
-
-   // Set the base tag length.
-   setTagLength( 0 );
-}
-
-void ossimNitfProjectionParameterTag::clearParameters()
-{
-   theProjectionParameters.clear();
-   theNumberOfParameters[0] = '0';
-}
-
-void ossimNitfProjectionParameterTag::addParameter(const ossimString& param)
-{
-   std::ostringstream out;
-
-   out << std::setw(15)
-       << std::setfill('0')
-       << param.c_str();
-
-   theProjectionParameters.push_back(out.str());
-}
-
-void ossimNitfProjectionParameterTag::addParameter(const ossim_float64& param)
-{
-   addParameter(ossimString::toString(param));
-}
-
-void ossimNitfProjectionParameterTag::setName(const ossimString& name)
-{
-   std::ostringstream out;
-
-   out << std::setw(80)
-       << std::setfill(' ')
-       << name.c_str();
-
-   memcpy(theProjectionName, out.str().c_str(), 80);
-}
-
-void ossimNitfProjectionParameterTag::setCode(const ossimString& code)
-{
-   std::ostringstream out;
-
-   out << std::setw(2)
-       << std::setfill(' ')
-       << code.c_str();
-
-   memcpy(theProjectionCode, out.str().c_str(), 2);
-}
-
-ossimString ossimNitfProjectionParameterTag::getName()const
-{
-   return ossimString(theProjectionName).trim();
-}
-
-ossimString ossimNitfProjectionParameterTag::getCode()const
-{
-   return ossimString(theProjectionCode).trim();
-}
-
-void ossimNitfProjectionParameterTag::setFalseX(double falseX)
-{
-   std::ostringstream out;
-   out << std::setw(15)
-       << std::setprecision(15)
-       << std::setfill('0')
-       << falseX;
-   
-   memcpy(theFalseXOrigin, out.str().c_str(), 15);
-}
-
-void ossimNitfProjectionParameterTag::setFalseY(double falseY)
-{
-   std::ostringstream out;
-   out << std::setw(15)
-       << std::setprecision(15)
-       << std::setfill('0')
-       << falseY;
-   
-   memcpy(theFalseYOrigin, out.str().c_str(), 15);
-}
-
-double ossimNitfProjectionParameterTag::getFalseX()const
-{
-   return ossimString(theFalseXOrigin).toDouble();
-}
-
-double ossimNitfProjectionParameterTag::getFalseY()const
-{
-   return ossimString(theFalseYOrigin).toDouble();
-}
diff --git a/src/ossim/support_data/ossimNitfRegisteredTag.cpp b/src/ossim/support_data/ossimNitfRegisteredTag.cpp
deleted file mode 100644
index c3ae575..0000000
--- a/src/ossim/support_data/ossimNitfRegisteredTag.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfRegisteredTag.cpp 22013 2012-12-19 17:37:20Z dburken $
-
-#include <iostream>
-#include <sstream>
-#include <string>
-#include <sstream>
-#include <ossim/support_data/ossimNitfRegisteredTag.h>
-
-RTTI_DEF2(ossimNitfRegisteredTag, "ossimNitfRegisteredTag", ossimObject, ossimPropertyInterface)
-
-ossimNitfRegisteredTag::ossimNitfRegisteredTag()
-   : 
-   ossimObject(),
-   ossimPropertyInterface(),
-   m_tagName(),
-   m_tagLength(0)
-{}
-ossimNitfRegisteredTag::ossimNitfRegisteredTag(const std::string& tagName, ossim_uint32 tagLength)
-   : 
-   ossimObject(),
-   ossimPropertyInterface(),
-   m_tagName(tagName),
-   m_tagLength(tagLength)
-{}
-
-ossimNitfRegisteredTag::~ossimNitfRegisteredTag()
-{}
-
-std::string ossimNitfRegisteredTag::getRegisterTagName() const
-{
-   // Deprecated:
-   return m_tagName;
-}
-
-const std::string& ossimNitfRegisteredTag::getTagName() const
-{
-   return m_tagName;
-}
-
-void ossimNitfRegisteredTag::setTagName(const std::string& tagName)
-{
-   m_tagName = tagName;
-}
-
-ossim_uint32 ossimNitfRegisteredTag::getSizeInBytes() const
-{
-   // Deprecated:
-   return getTagLength();
-}
-
-ossim_uint32 ossimNitfRegisteredTag::getTagLength() const
-{
-   return m_tagLength;
-}
-
-void ossimNitfRegisteredTag::setTagLength(ossim_uint32 length)
-{
-   m_tagLength = length;
-}
-
-void ossimNitfRegisteredTag::setProperty(ossimRefPtr<ossimProperty> /* property */)
-{
-}
-
-ossimRefPtr<ossimProperty> ossimNitfRegisteredTag::getProperty(const ossimString& /* name */)const
-{
-   return 0;
-}
-
-void ossimNitfRegisteredTag::getPropertyNames(std::vector<ossimString>& /* propertyNames */)const
-{
-}
-
-void ossimNitfRegisteredTag::getMetadata(ossimKeywordlist& /* kwl */,
-                                         const char* /* prefix */ ) const
-{
-}
-
-std::ostream& ossimNitfRegisteredTag::print(
-   std::ostream& out, const std::string& /* prefix */) const
-{
-   // return print(out);
-   return out;
-}
-
-bool ossimNitfRegisteredTag::saveState(ossimKeywordlist& kwl, const ossimString& prefix)const
-{
-   bool result = false;
-   // by default we will use the already implemented print method as backup
-   //
-   std::ostringstream out;
-   
-   print(out);
-   
-   ossimKeywordlist kwlTemp;
-   
-   std::istringstream in(out.str());
-   if(kwlTemp.parseStream(in))
-   {
-      result = true;
-      kwl.add(prefix, kwlTemp);
-   }
-   
-   return result;
-}
diff --git a/src/ossim/support_data/ossimNitfRegisteredTagFactory.cpp b/src/ossim/support_data/ossimNitfRegisteredTagFactory.cpp
deleted file mode 100644
index bbe5cbd..0000000
--- a/src/ossim/support_data/ossimNitfRegisteredTagFactory.cpp
+++ /dev/null
@@ -1,193 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-//
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfRegisteredTagFactory.cpp 20689 2012-03-14 18:31:20Z gpotts $
-
-#include <ossim/support_data/ossimNitfRegisteredTagFactory.h>
-
-#include <ossim/support_data/ossimNitfAcftbTag.h>
-#include <ossim/support_data/ossimNitfAimidbTag.h>
-#include <ossim/support_data/ossimNitfBlockaTag.h>
-#include <ossim/support_data/ossimNitfCscrnaTag.h>
-#include <ossim/support_data/ossimNitfCsdidaTag.h>
-#include <ossim/support_data/ossimNitfCsexraTag.h>
-#include <ossim/support_data/ossimNitfCsexraTag.h>
-#include <ossim/support_data/ossimNitfEngrdaTag.h>
-#include <ossim/support_data/ossimNitfGeoPositioningTag.h>
-#include <ossim/support_data/ossimNitfIchipbTag.h>
-#include <ossim/support_data/ossimNitfJ2klraTag.h>
-#include <ossim/support_data/ossimNitfLocalGeographicTag.h>
-#include <ossim/support_data/ossimNitfLocalCartographicTag.h>
-#include <ossim/support_data/ossimNitfMstgtaTag.h>
-#include <ossim/support_data/ossimNitfPiaimcTag.h>
-#include <ossim/support_data/ossimNitfProjectionParameterTag.h>
-#include <ossim/support_data/ossimNitfRpcBTag.h>
-#include <ossim/support_data/ossimNitfRpcATag.h>
-#include <ossim/support_data/ossimNitfSensraTag.h>
-#include <ossim/support_data/ossimNitfStdidcTag.h>
-#include <ossim/support_data/ossimNitfUse00aTag.h>
-#include <ossim/support_data/ossimNitfHistoaTag.h>
-#include <ossim/support_data/ossimNitfCsccgaTag.h>
-#include <ossim/support_data/ossimNitfCsproaTag.h>
-#include <ossim/support_data/ossimNitfExoptaTag.h>
-
-RTTI_DEF1(ossimNitfRegisteredTagFactory, "ossimNitfRegisteredTagFactory", ossimNitfTagFactory);
-
-ossimNitfRegisteredTagFactory* ossimNitfRegisteredTagFactory::theInstance = NULL;
-
-static const char ACFTB_TAG[]                = "ACFTB";
-static const char AIMIDB_TAG[]               = "AIMIDB";
-static const char BLOCKA_TAG[]               = "BLOCKA";
-static const char CSCRNA_TAG[]               = "CSCRNA";
-static const char CSDIDA_TAG[]               = "CSDIDA";
-static const char CSEXRA_TAG[]               = "CSEXRA";
-static const char ENGRDA_TAG[]               = "ENGRDA";
-static const char GEO_POSITIONING_TAG[]      = "GEOPSB";
-static const char ICHIPB_TAG[]               = "ICHIPB";
-static const char J2KLRA_TAG[]               = "J2KLRA";
-static const char LOCAL_GEOGRAPHIC_TAG[]     = "GEOLOB";
-static const char LOCAL_CARTOGRAPHIC_TAG[]   = "MAPLOB";
-static const char MSTGTA_TAG[]               = "MSTGTA";
-static const char PIAIMC_TAG[]               = "PIAIMC";
-static const char PROJECTION_PARAMETER_TAG[] = "PRJPSB";
-static const char RPCB_TAG[]                 = "RPC00B";
-static const char RPCA_TAG[]                 = "RPC00A";
-static const char SENSRA_TAG[]               = "SENSRA";
-static const char STDIDC_TAG[]               = "STDIDC";
-static const char USE00A_TAG[]               = "USE00A";
-static const char HISTOA_TAG[]               = "HISTOA";
-static const char CSCCGA_TAG[]               = "CSCCGA";
-static const char CSPROA_TAG[]               = "CSPROA";
-static const char EXOPTA_TAG[]               = "EXOPTA";
-
-ossimNitfRegisteredTagFactory::ossimNitfRegisteredTagFactory()
-{
-   theInstance = this;
-}
-
-ossimNitfRegisteredTagFactory::~ossimNitfRegisteredTagFactory()
-{
-   theInstance = NULL;
-}
-
-ossimNitfRegisteredTagFactory* ossimNitfRegisteredTagFactory::instance()
-{
-   if(!theInstance)
-   {
-      theInstance = new ossimNitfRegisteredTagFactory;
-   }
-
-   return theInstance;
-}
-
-ossimRefPtr<ossimNitfRegisteredTag> ossimNitfRegisteredTagFactory::create(
-   const ossimString& tagName)const
-{
-   ossimString name = ossimString(tagName).trim().upcase();
-   
-   if(tagName == ACFTB_TAG)
-   {
-      return new ossimNitfAcftbTag;
-   }
-   else if(tagName == AIMIDB_TAG)
-   {
-      return new ossimNitfAimidbTag;
-   }
-   else if(tagName == BLOCKA_TAG)
-   {
-      return new ossimNitfBlockaTag;
-   }
-   else if(tagName == CSCRNA_TAG)
-   {
-      return new ossimNitfCscrnaTag;
-   }
-   else if(tagName == CSDIDA_TAG)
-   {
-      return new ossimNitfCsdidaTag;
-   }
-   else if(tagName == CSEXRA_TAG)
-   {
-      return new ossimNitfCsexraTag;
-   }
-   else if(tagName == ENGRDA_TAG)
-   {
-      return new ossimNitfEngrdaTag;
-   }
-   else if(tagName == GEO_POSITIONING_TAG)
-   {
-      return new ossimNitfGeoPositioningTag;
-   }
-   else if(tagName == ICHIPB_TAG)
-   {
-      return new ossimNitfIchipbTag;
-   }
-   else if(tagName == J2KLRA_TAG)
-   {
-      return new ossimNitfJ2klraTag;
-   }
-   else if(tagName == LOCAL_GEOGRAPHIC_TAG)
-   {
-      return new ossimNitfLocalGeographicTag;
-   }
-   else if(tagName == LOCAL_CARTOGRAPHIC_TAG)
-   {
-      return new ossimNitfLocalCartographicTag;
-   }
-   else if(tagName == MSTGTA_TAG)
-   {
-      return new ossimNitfMstgtaTag;
-   }
-   else if(tagName == PIAIMC_TAG)
-   {
-      return new ossimNitfPiaimcTag;
-   }
-   else if(tagName == PROJECTION_PARAMETER_TAG)
-   {
-      return new ossimNitfProjectionParameterTag;
-   }
-   else if(tagName == RPCB_TAG)
-   {
-      return new ossimNitfRpcBTag;
-   }
-   else if(tagName == RPCA_TAG)
-   {
-      return new ossimNitfRpcATag;
-   }
-   else if (tagName == SENSRA_TAG)
-   {
-      return new ossimNitfSensraTag;
-   }
-   else if (tagName == STDIDC_TAG)
-   {
-      return new ossimNitfStdidcTag;
-   }
-   else if (tagName == USE00A_TAG)
-   {
-      return new ossimNitfUse00aTag;
-   }
-   else if(tagName == HISTOA_TAG)
-   {
-      return new ossimNitfHistoaTag;
-   }
-   else if(tagName == CSCCGA_TAG)
-   {
-      return new ossimNitfCsccgaTag;
-   }
-   else if(tagName == CSPROA_TAG)
-   {
-      return new ossimNitfCsproaTag;
-   }
-   else if(tagName == EXOPTA_TAG)
-   {
-      return new ossimNitfExoptaTag;
-   }
-   return NULL;
-}
diff --git a/src/ossim/support_data/ossimNitfRpcATag.cpp b/src/ossim/support_data/ossimNitfRpcATag.cpp
deleted file mode 100644
index 14626a1..0000000
--- a/src/ossim/support_data/ossimNitfRpcATag.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-//*******************************************************************
-//
-// LICENSE: LGPL
-//
-// see top level LICENSE.txt
-// 
-// Author: Garrett Potts
-//
-// Description: Nitf support class for RPC00A -
-// Rational Polynomial Coefficient extension.
-//
-//********************************************************************
-// $Id: ossimNitfRpcATag.cpp 22013 2012-12-19 17:37:20Z dburken $
-
-#include <ossim/support_data/ossimNitfRpcATag.h>
-
-RTTI_DEF1(ossimNitfRpcATag, "ossimNitfRpcATag", ossimNitfRpcBase);
-
-ossimNitfRpcATag::ossimNitfRpcATag()
-   : ossimNitfRpcBase()
-{
-   // Set the tag name in base.
-   setTagName(std::string("RPC00A"));
-}
diff --git a/src/ossim/support_data/ossimNitfRpcBTag.cpp b/src/ossim/support_data/ossimNitfRpcBTag.cpp
deleted file mode 100644
index 1656db2..0000000
--- a/src/ossim/support_data/ossimNitfRpcBTag.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-//*******************************************************************
-//
-// LICENSE: LGPL
-//
-// see top level LICENSE.txt
-// 
-// Author: Garrett Potts
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfRpcBTag.cpp 22013 2012-12-19 17:37:20Z dburken $
-
-#include <ossim/support_data/ossimNitfRpcBTag.h>
-
-RTTI_DEF1(ossimNitfRpcBTag, "ossimNitfRpcBTag", ossimNitfRpcBase);
-
-ossimNitfRpcBTag::ossimNitfRpcBTag()
-   : ossimNitfRpcBase()
-{
-   // Set the tag name in base.
-   setTagName(std::string("RPC00B"));
-}
diff --git a/src/ossim/support_data/ossimNitfRpcBase.cpp b/src/ossim/support_data/ossimNitfRpcBase.cpp
deleted file mode 100644
index 587b026..0000000
--- a/src/ossim/support_data/ossimNitfRpcBase.cpp
+++ /dev/null
@@ -1,928 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-//
-// Description: Nitf support class for RPC00A -
-// Rational Polynomial Coefficient extension.
-//
-//********************************************************************
-// $Id: ossimNitfRpcBase.cpp 22013 2012-12-19 17:37:20Z dburken $
-
-#include <algorithm>
-#include <iostream>
-#include <iomanip>
-#include <vector>
-#include <ossim/support_data/ossimNitfRpcBase.h>
-#include <ossim/support_data/ossimNitfCommon.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimStringProperty.h>
-
-static const ossimTrace traceDebug(ossimString("ossimNitfRpcBase:debug"));
-static const ossimString ERR_BIAS_KW = "ERR_BIAS";
-static const ossimString ERR_RAND_KW = "ERR_RAND";
-static const ossimString LINE_OFF_KW = "LINE_OFF";
-static const ossimString SAMP_OFF_KW = "SAMP_OFF";
-static const ossimString LAT_OFF_KW = "LAT_OFF";
-static const ossimString LONG_OFF_KW = "LONG_OFF";
-static const ossimString HEIGHT_OFF_KW = "HEIGHT_OFF";
-static const ossimString LINE_SCALE_KW = "LINE_SCALE";
-static const ossimString SAMP_SCALE_KW = "SAMP_SCALE";
-static const ossimString LAT_SCALE_KW = "LAT_SCALE";
-static const ossimString LONG_SCALE_KW = "LONG_SCALE";
-static const ossimString HEIGHT_SCALE_KW = "HEIGHT_SCALE";
-static const ossimString LINE_NUM_COEFF_KW = "LINE_NUM_COEFF_";
-static const ossimString LINE_DEN_COEFF_KW = "LINE_DEN_COEFF_";
-static const ossimString SAMP_NUM_COEFF_KW = "SAMP_NUM_COEFF_";
-static const ossimString SAMP_DEN_COEFF_KW = "SAMP_DEN_COEFF_";
-
-RTTI_DEF1(ossimNitfRpcBase, "ossimNitfRpcBase", ossimNitfRegisteredTag);
-
-
-ossimNitfRpcBase::ossimNitfRpcBase()
-   : ossimNitfRegisteredTag()
-{
-   // Set the tag length in base.
-   setTagLength(1041);
-   
-   clearFields();
-}
-
-void ossimNitfRpcBase::parseStream(std::istream& in)
-{
-   clearFields();
-   
-   in.read(theSuccess, SUCCESS_SIZE);
-   in.read(theErrorBias, ERROR_BIAS_SIZE);
-   in.read(theErrRand, ERR_RAND_SIZE);
-   in.read(theLineOffset, LINE_OFFSET_SIZE);
-   in.read(theSampleOffset, SAMPLE_OFFSET_SIZE);
-   in.read(theGeodeticLatOffset, GEODETIC_LAT_OFFSET_SIZE);
-   in.read(theGeodeticLonOffset, GEODETIC_LON_OFFSET_SIZE);
-   in.read(theGeodeticHeightOffset, GEODETIC_HEIGHT_OFFSET_SIZE);
-   in.read(theLineScale, LINE_SCALE_SIZE);
-   in.read(theSampleScale, SAMPLE_SCALE_SIZE);
-   in.read(theGeodeticLatScale, GEODETIC_LAT_SCALE_SIZE);
-   in.read(theGeodeticLonScale, GEODETIC_LON_SCALE_SIZE);
-   in.read(theGeodeticHeightScale, GEODETIC_HEIGHT_SCALE_SIZE);
-   
-   ossim_uint32 idx = 0;
-   
-   char temp1[LINE_NUMERATOR_COEFFICIENT_SIZE+1];
-   temp1[LINE_NUMERATOR_COEFFICIENT_SIZE] = '\0';
-   for(idx = 0; idx < LINE_NUMERATOR_COEFFICIENT_COUNT; ++idx)
-   {
-      in.read(temp1, LINE_NUMERATOR_COEFFICIENT_SIZE);
-      theLineNumeratorCoefficient[idx] = temp1;
-   }
-   
-   char temp2[LINE_DENOMINATOR_COEFFICIENT_SIZE+1];
-   temp2[LINE_DENOMINATOR_COEFFICIENT_SIZE] = '\0';
-   for(idx = 0; idx < LINE_DENOMINATOR_COEFFICIENT_COUNT; ++idx)
-   {
-      in.read(temp2, LINE_DENOMINATOR_COEFFICIENT_SIZE);
-      theLineDenominatorCoefficient[idx] = temp2;
-   }
-   
-   char temp3[SAMPLE_NUMERATOR_COEFFICIENT_SIZE+1];
-   temp3[SAMPLE_NUMERATOR_COEFFICIENT_SIZE] = '\0';
-   for(idx = 0; idx < SAMPLE_NUMERATOR_COEFFICIENT_COUNT; ++idx)
-   {
-      in.read(temp3, SAMPLE_NUMERATOR_COEFFICIENT_SIZE);
-      theSampleNumeratorCoefficient[idx] = temp3;
-   }
-   
-   char temp4[SAMPLE_DENOMINATOR_COEFFICIENT_SIZE+1];
-   temp4[SAMPLE_DENOMINATOR_COEFFICIENT_SIZE] = '\0';
-   for(idx = 0; idx < SAMPLE_DENOMINATOR_COEFFICIENT_COUNT; ++idx)
-   {
-      in.read(temp4, SAMPLE_DENOMINATOR_COEFFICIENT_SIZE);
-      theSampleDenominatorCoefficient[idx] = temp4;
-   }
-}
-
-void ossimNitfRpcBase::writeStream(std::ostream& out)
-{
-   ossim_uint32 idx = 0;
-   
-   out.write(theSuccess, SUCCESS_SIZE);
-   out.write(theErrorBias, ERROR_BIAS_SIZE);
-   out.write(theErrRand, ERR_RAND_SIZE);
-   out.write(theLineOffset, LINE_OFFSET_SIZE);
-   out.write(theSampleOffset, SAMPLE_OFFSET_SIZE);
-   out.write(theGeodeticLatOffset, GEODETIC_LAT_OFFSET_SIZE);
-   out.write(theGeodeticLonOffset, GEODETIC_LON_OFFSET_SIZE);
-   out.write(theGeodeticHeightOffset, GEODETIC_HEIGHT_OFFSET_SIZE);
-   out.write(theLineScale, LINE_SCALE_SIZE);
-   out.write(theSampleScale, SAMPLE_SCALE_SIZE);
-   out.write(theGeodeticLatScale, GEODETIC_LAT_SCALE_SIZE);
-   out.write(theGeodeticLonScale, GEODETIC_LON_SCALE_SIZE);
-   out.write(theGeodeticHeightScale, GEODETIC_HEIGHT_SCALE_SIZE);
-   for(idx = 0; idx < LINE_NUMERATOR_COEFFICIENT_COUNT; ++idx)
-   {
-      out.write(theLineNumeratorCoefficient[idx].c_str(),
-                LINE_NUMERATOR_COEFFICIENT_SIZE);
-   }
-   for(idx = 0; idx < LINE_DENOMINATOR_COEFFICIENT_COUNT; ++idx)
-   {
-      out.write(theLineDenominatorCoefficient[idx].c_str(),
-                LINE_DENOMINATOR_COEFFICIENT_SIZE);
-   }
-   for(idx = 0; idx < SAMPLE_NUMERATOR_COEFFICIENT_COUNT; ++idx)
-   {
-      out.write(theSampleNumeratorCoefficient[idx].c_str(),
-                SAMPLE_NUMERATOR_COEFFICIENT_SIZE);
-   }
-   for(idx = 0; idx < SAMPLE_DENOMINATOR_COEFFICIENT_COUNT; ++idx)
-   {
-      out.write(theSampleDenominatorCoefficient[idx].c_str(),
-                SAMPLE_DENOMINATOR_COEFFICIENT_SIZE);
-   }
-}
-
-void ossimNitfRpcBase::clearFields()
-{
-   theSuccess[0] = '1';
-   memcpy(theErrorBias, "0000.00", 7);
-   memcpy(theErrRand, "0000.00", 7);
-   memcpy(theLineOffset, "000000", 6);
-   memcpy(theSampleOffset, "00000", 5);
-   memcpy(theGeodeticLatOffset, "+00.0000", 8);
-   memcpy(theGeodeticLonOffset, "+000.0000", 9);
-   memcpy(theGeodeticHeightOffset, "+0000", 5);
-   memcpy(theLineScale, "000001", 6);
-   memcpy(theSampleScale, "00001", 5);
-   memcpy(theGeodeticLatScale, "+00.0000", 8);
-   memcpy(theGeodeticLonScale, "+000.0000", 9);
-   memcpy(theGeodeticHeightScale, "+0000", 5);
-   
-   theSuccess[1] = '\0';
-   theErrorBias[7] = '\0';
-   theErrRand[7] = '\0';
-   theLineOffset[6] = '\0';
-   theSampleOffset[5] = '\0';
-   theGeodeticLatOffset[8]='\0';
-   theGeodeticLonOffset[9]='\0';
-   theGeodeticHeightOffset[5]='\0';
-   theLineScale[6]='\0';
-   theSampleScale[5]='\0';
-   theGeodeticLatScale[8]='\0';
-   theGeodeticLonScale[9]='\0';
-   theGeodeticHeightScale[5]='\0';
-   
-   theLineNumeratorCoefficient.resize(20);
-   theLineDenominatorCoefficient.resize(20);
-   theSampleNumeratorCoefficient.resize(20);
-   theSampleDenominatorCoefficient.resize(20);
-   ossim_uint32 idx = 0;
-   const char* zeroString = "+0.000000E+0";
-   
-   for(idx = 0; idx < theLineNumeratorCoefficient.size();++idx)
-   {
-      theLineNumeratorCoefficient[idx] = zeroString; 
-      theLineDenominatorCoefficient[idx] = zeroString;;
-      theSampleNumeratorCoefficient[idx] = zeroString;;
-      theSampleDenominatorCoefficient[idx] = zeroString;;
-   }
-}
-
-bool ossimNitfRpcBase::getSuccess()const
-{
-   return (theSuccess[0] == '1');
-}
-
-void ossimNitfRpcBase::setSuccess(bool success)
-{
-   theSuccess[0] = success?'1':'0';
-}
-
-ossimString ossimNitfRpcBase::getErrorBias()const
-{
-   return theErrorBias;
-}
-
-void ossimNitfRpcBase::setErrorBias(const ossim_float64& errorBias)
-{
-   ossimString os = ossimNitfCommon::convertToDoubleString(errorBias,
-                                                           2,
-                                                           ERROR_BIAS_SIZE);
-   setErrorBias(os);
-}
-
-void ossimNitfRpcBase::setErrorBias(const ossimString& errorBias)
-{
-   memset(theErrorBias, ' ', ERROR_BIAS_SIZE);
-   memcpy(theErrorBias, errorBias.c_str(), std::min((size_t)ERROR_BIAS_SIZE, errorBias.length()));
-}
-
-ossimString ossimNitfRpcBase::getErrorRand()const
-{
-   return theErrRand;
-}
-
-void ossimNitfRpcBase::setErrorRand(const ossim_float64& errorRand)
-{
-   ossimString os = ossimNitfCommon::convertToDoubleString(errorRand,
-                                                           2,
-                                                           ERROR_BIAS_SIZE);
-   setErrorRand(os);
-}
-
-void ossimNitfRpcBase::setErrorRand(const ossimString& errorRand)
-{
-   memset(theErrRand, ' ', ERR_RAND_SIZE);
-   memcpy(theErrRand, errorRand.c_str(), std::min((size_t)ERR_RAND_SIZE, errorRand.length()));
-}
-
-ossimString ossimNitfRpcBase::getLineOffset()const
-{
-   return theLineOffset;
-}
-
-void ossimNitfRpcBase::setLineOffset(ossim_uint32 lineOffset)
-{
-   ossimString os = ossimNitfCommon::convertToUIntString(lineOffset,
-                                                         LINE_OFFSET_SIZE);
-   setLineOffset(os);
-}
-
-void ossimNitfRpcBase::setLineOffset(const ossimString& lineOffset)
-{
-   memset(theLineOffset, ' ', LINE_OFFSET_SIZE);
-   memcpy(theLineOffset, lineOffset.c_str(), std::min((size_t)LINE_OFFSET_SIZE, lineOffset.length()));
-}
-
-ossimString ossimNitfRpcBase::getSampleOffset()const
-{
-   return theSampleOffset;
-}
-
-void ossimNitfRpcBase::setSampleOffset(ossim_uint32 sampleOffset)
-{
-   ossimString os = ossimNitfCommon::convertToUIntString(sampleOffset,
-                                                         SAMPLE_OFFSET_SIZE);
-   setSampleOffset(os);
-}
-
-void ossimNitfRpcBase::setSampleOffset(const ossimString& sampleOffset)
-{
-   memset(theSampleOffset, ' ', SAMPLE_OFFSET_SIZE);
-   memcpy(theSampleOffset, sampleOffset.c_str(), std::min((size_t)SAMPLE_OFFSET_SIZE, sampleOffset.length()));
-}
-
-ossimString ossimNitfRpcBase::getGeodeticLatOffset()const
-{
-   return theGeodeticLatOffset;
-}
-
-void ossimNitfRpcBase::setGeodeticLatOffset(
-   const ossim_float64& geodeticLatOffset)
-{
-   if ( (geodeticLatOffset >= -90.0) && (geodeticLatOffset <= 90.0) )
-   {
-      ossimString os =
-         ossimNitfCommon::convertToDoubleString(geodeticLatOffset,
-                                                4,
-                                                GEODETIC_LAT_OFFSET_SIZE);
-      setGeodeticLatOffset(os);
-   }
-}
-
-void ossimNitfRpcBase::setGeodeticLatOffset(
-   const ossimString& geodeticLatOffset)
-{
-   memset(theGeodeticLatOffset, ' ', GEODETIC_LAT_OFFSET_SIZE);
-   memcpy(theGeodeticLatOffset, geodeticLatOffset.c_str(), std::min((size_t)GEODETIC_LAT_OFFSET_SIZE, geodeticLatOffset.length()));
-}
-
-ossimString ossimNitfRpcBase::getGeodeticLonOffset()const
-{
-   return theGeodeticLonOffset;
-}
-
-void ossimNitfRpcBase::setGeodeticLonOffset(
-   const ossim_float64& geodeticLonOffset)
-{
-   if ( (geodeticLonOffset >= -180.0) && (geodeticLonOffset <= 180.0) )
-   {
-      ossimString os =
-         ossimNitfCommon::convertToDoubleString(geodeticLonOffset,
-                                                4,
-                                                GEODETIC_LON_OFFSET_SIZE);
-      setGeodeticLonOffset(os);
-   }
-}
-
-void ossimNitfRpcBase::setGeodeticLonOffset(const ossimString& geodeticLonOffset)
-{
-   memset(theGeodeticLonOffset, ' ', GEODETIC_LON_OFFSET_SIZE);
-   memcpy(theGeodeticLonOffset, geodeticLonOffset.c_str(), std::min((size_t)GEODETIC_LON_OFFSET_SIZE, geodeticLonOffset.length()));
-}
-
-ossimString ossimNitfRpcBase::getGeodeticHeightOffset()const
-{
-   return theGeodeticHeightOffset;
-}
-
-void ossimNitfRpcBase::setGeodeticHeightOffset(
-   ossim_int32 geodeticHeightOffset)
-{
-   ossimString os =
-      ossimNitfCommon::convertToIntString(geodeticHeightOffset,
-                                          GEODETIC_HEIGHT_OFFSET_SIZE);
-   setGeodeticHeightOffset(os);
-}
-
-void ossimNitfRpcBase::setGeodeticHeightOffset(const ossimString& geodeticHeightOffset)
-{
-   memset(theGeodeticHeightOffset, ' ', GEODETIC_HEIGHT_OFFSET_SIZE);
-   memcpy(theGeodeticHeightOffset, geodeticHeightOffset.c_str(), std::min((size_t)GEODETIC_HEIGHT_OFFSET_SIZE, geodeticHeightOffset.length()));
-}
-
-ossimString ossimNitfRpcBase::getLineScale()const
-{
-   return theLineScale;
-}
-
-void ossimNitfRpcBase::setLineScale(ossim_uint32 lineScale)
-{
-   ossimString os = ossimNitfCommon::convertToUIntString(lineScale,
-                                                         LINE_SCALE_SIZE);
-   setLineScale(os);
-}
-
-void ossimNitfRpcBase::setLineScale(const ossimString& lineScale)
-{
-   memset(theLineScale, ' ', LINE_SCALE_SIZE);
-   memcpy(theLineScale, lineScale.c_str(), std::min((size_t)LINE_SCALE_SIZE, lineScale.length()));
-}
-
-ossimString ossimNitfRpcBase::getSampleScale()const
-{
-   return theSampleScale;
-}
-
-void ossimNitfRpcBase::setSampleScale(ossim_uint32 sampleScale)
-{
-   ossimString os = ossimNitfCommon::convertToUIntString(sampleScale,
-                                       SAMPLE_SCALE_SIZE);
-   setSampleScale(os);
-}
-
-void ossimNitfRpcBase::setSampleScale(const ossimString& sampleScale)
-{
-   memset(theSampleScale, ' ', SAMPLE_SCALE_SIZE);
-   memcpy(theSampleScale, sampleScale.c_str(), std::min((size_t)SAMPLE_SCALE_SIZE, sampleScale.length()));
-}
-
-ossimString ossimNitfRpcBase::getGeodeticLatScale()const
-{
-   return theGeodeticLatScale;
-}
-
-void ossimNitfRpcBase::setGeodeticLatScale(
-   const ossim_float64& geodeticLatScale)
-{
-   if (geodeticLatScale == 0.0)
-   {
-      // Error scale cannot be zero.
-      return;
-   }
-   
-   if ( (geodeticLatScale >= -90.0) && (geodeticLatScale <= 90.0) )
-   {
-      ossimString os = ossimNitfCommon::convertToDoubleString(geodeticLatScale,
-                                             4,
-                                             GEODETIC_LAT_SCALE_SIZE);
-      setGeodeticLatScale(os);
-   }
-}
-
-void ossimNitfRpcBase::setGeodeticLatScale(const ossimString& geodeticLatScale)
-{
-   memset(theGeodeticLatScale, ' ', GEODETIC_LAT_SCALE_SIZE);
-   memcpy(theGeodeticLatScale, geodeticLatScale.c_str(), std::min((size_t)GEODETIC_LAT_SCALE_SIZE, geodeticLatScale.length()));
-}
-
-ossimString ossimNitfRpcBase::getGeodeticLonScale()const
-{
-   return theGeodeticLonScale;
-}
-
-void ossimNitfRpcBase::setGeodeticLonScale(
-   const ossim_float64& geodeticLonScale)
-{
-   if (geodeticLonScale == 0.0)
-   {
-      // Error scale cannot be zero.
-      return;
-   }
-   
-   if ( (geodeticLonScale >= -180.0) && (geodeticLonScale <= 180.0) )
-   {
-      ossimString os = ossimNitfCommon::convertToDoubleString(geodeticLonScale,
-                                             4,
-                                             GEODETIC_LON_SCALE_SIZE);
-      setGeodeticLonScale(os);
-   }
-}
-
-void ossimNitfRpcBase::setGeodeticLonScale(const ossimString& geodeticLonScale)
-{
-   memset(theGeodeticLonScale, ' ', GEODETIC_LON_SCALE_SIZE);
-   memcpy(theGeodeticLonScale, geodeticLonScale.c_str(), std::min((size_t)GEODETIC_LON_SCALE_SIZE, geodeticLonScale.length()));
-}
-
-ossimString ossimNitfRpcBase::getGeodeticHeightScale()const
-{
-   return theGeodeticHeightScale;
-}
-
-void ossimNitfRpcBase::setGeodeticHeightScale(ossim_int32 geodeticHeightScale)
-{
-   ossimString os =
-      ossimNitfCommon::convertToIntString(geodeticHeightScale,
-                                          GEODETIC_HEIGHT_SCALE_SIZE);
-   setGeodeticHeightScale(os);
-}
-
-void ossimNitfRpcBase::setGeodeticHeightScale(
-   const ossimString& geodeticHeightScale)
-{
-   memset(theGeodeticHeightScale, ' ', GEODETIC_HEIGHT_SCALE_SIZE);
-   memcpy(theGeodeticHeightScale, geodeticHeightScale.c_str(), std::min((size_t)GEODETIC_HEIGHT_SCALE_SIZE, geodeticHeightScale.length()));
-}
-
-/* Temp comment out until range error handling is decided.*/
-#if 0
-// The assert here will be ignored when compiled with -DNDEBUG so ossimSetError and fix the index
-#define ASSERT_ARRAY_CONSTRAINT(expression, idx, correctedValue, module) \
-   assert(expression);                                                  \
-   ossimSetError(getClassName().c_str(), ossimErrorCodes::OSSIM_ERROR,  \
-                 "File %s line %d Module %s Error:\nArray index constraint error.\n", \
-                 __FILE__, __LINE__, module);                           \
-   if (! (expression) ) idx = correctedValue;
-
-#endif
-   
-ossimString ossimNitfRpcBase::getLineNumeratorCoeff(ossim_uint32 idx)const
-{
-//ASSERT_ARRAY_CONSTRAINT(idx >= 0 && idx < LINE_NUMERATOR_COEFFICIENT_COUNT,idx,0,"ossimNitfRpcBase::getLineNumeratorCoeff");
-
-   if (idx >= LINE_NUMERATOR_COEFFICIENT_COUNT)
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimNitfRpcBase::getLineNumeratorCoeff range error!"
-            << std::endl;
-      }
-      return ossimString();
-   }
-   
-   return theLineNumeratorCoefficient[idx];
-}
-
-void ossimNitfRpcBase::setLineNumeratorCoeff(
-   const std::vector<ossim_float64>& coeff)
-{
-   if (coeff.size() != LINE_NUMERATOR_COEFFICIENT_COUNT)
-   {
-      // Error...
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfRpcBase::setLineNumeratorCoeff WARNING:"
-            << "\nArray not of correct size!"
-            << std::endl;
-      }
-      return;
-   }
-
-   for (ossim_uint32 i = 0; i < LINE_NUMERATOR_COEFFICIENT_COUNT; ++i)
-   {
-      ossimString os = ossimNitfCommon::convertToScientificString(
-         coeff[i], LINE_NUMERATOR_COEFFICIENT_SIZE);
-      setLineNumeratorCoeff(i, os);
-   }
-}
-
-void ossimNitfRpcBase::setLineNumeratorCoeff(ossim_uint32 idx,
-                                             const ossimString& coeff)
-{
-   // ASSERT_ARRAY_CONSTRAINT(idx >= 0 && idx < LINE_NUMERATOR_COEFFICIENT_COUNT,idx,0,"ossimNitfRpcBase::setLineNumeratorCoeff");
-
-   if (idx >= LINE_NUMERATOR_COEFFICIENT_COUNT)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimNitfRpcBase::setLineNumeratorCoeff range error!"
-         << std::endl;
-      return;
-   } 
-
-   std::string s(coeff, 0, LINE_NUMERATOR_COEFFICIENT_SIZE);
-   theLineNumeratorCoefficient[idx] = s;  
-}
-
-ossimString ossimNitfRpcBase::getLineDenominatorCoeff(ossim_uint32 idx)const
-{
-   // ASSERT_ARRAY_CONSTRAINT(idx >= 0 && idx < LINE_DENOMINATOR_COEFFICIENT_COUNT,idx,0,"ossimNitfRpcBase::getLineDenominatorCoeff");
-
-   if (idx >= LINE_DENOMINATOR_COEFFICIENT_COUNT)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimNitfRpcBase::getLineDenominatorCoeff range error!"
-         << std::endl;
-      return ossimString();
-   }  
-   
-   return theLineDenominatorCoefficient[idx];
-}
-
-void ossimNitfRpcBase::setLineDenominatorCoeff(
-   const std::vector<ossim_float64>& coeff)
-{
-   if (coeff.size() != LINE_DENOMINATOR_COEFFICIENT_COUNT)
-   {
-      // Error...
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfRpcBase::setLineDenominatorCoeff WARNING:"
-            << "\nArray not of correct size!"
-            << std::endl;
-      }
-      return;
-   }
-
-   for (ossim_uint32 i = 0; i < LINE_DENOMINATOR_COEFFICIENT_COUNT; ++i)
-   {
-      ossimString os = ossimNitfCommon::convertToScientificString(
-         coeff[i], LINE_DENOMINATOR_COEFFICIENT_SIZE);
-      setLineDenominatorCoeff(i, os);
-   }
-}
-
-void ossimNitfRpcBase::setLineDenominatorCoeff(ossim_uint32 idx,
-                                               const ossimString& coeff)
-{
-   // ASSERT_ARRAY_CONSTRAINT(idx >= 0 && idx < LINE_DENOMINATOR_COEFFICIENT_COUNT,idx,0,"ossimNitfRpcBase::setLineDenominatorCoeff");
-
-   if (idx >= LINE_DENOMINATOR_COEFFICIENT_COUNT)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimNitfRpcBase::setLineDenominatorCoeff range error!"
-         << std::endl;
-      return;
-   } 
-   
-   std::string s(coeff, 0, LINE_DENOMINATOR_COEFFICIENT_SIZE);
-   theLineDenominatorCoefficient[idx] = s;  
-}
-
-ossimString ossimNitfRpcBase::getSampleNumeratorCoeff(ossim_uint32 idx)const
-{
-   // ASSERT_ARRAY_CONSTRAINT(idx >= 0 && idx < SAMPLE_NUMERATOR_COEFFICIENT_COUNT,idx,0,"ossimNitfRpcBase::getSampleNumeratorCoeff");
-
-   if (idx >= SAMPLE_NUMERATOR_COEFFICIENT_COUNT)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimNitfRpcBase::getSampleNumeratorCoeff range error!"
-         << std::endl;
-      return ossimString();
-   } 
-   return theSampleNumeratorCoefficient[idx];
-}
-
-void ossimNitfRpcBase::setSampleNumeratorCoeff(
-   const std::vector<ossim_float64>& coeff)
-{
-   if (coeff.size() != SAMPLE_NUMERATOR_COEFFICIENT_COUNT)
-   {
-      // Error...
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfRpcBase::setSampleNumeratorCoeff WARNING:"
-            << "\nArray not of correct size!"
-            << std::endl;
-      }
-      return;
-   }
-
-   for (ossim_uint32 i = 0; i < SAMPLE_NUMERATOR_COEFFICIENT_COUNT; ++i)
-   {
-      ossimString os = ossimNitfCommon::convertToScientificString(
-         coeff[i], SAMPLE_NUMERATOR_COEFFICIENT_SIZE);
-      setSampleNumeratorCoeff(i, os);
-   }
-}
-
-void ossimNitfRpcBase::setSampleNumeratorCoeff(ossim_uint32 idx,
-                                               const ossimString& coeff)
-{
-   // ASSERT_ARRAY_CONSTRAINT(idx >= 0 && idx < SAMPLE_NUMERATOR_COEFFICIENT_COUNT,idx,0,"ossimNitfRpcBase::setSampleNumeratorCoeff");
-
-   if (idx >= SAMPLE_NUMERATOR_COEFFICIENT_COUNT)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimNitfRpcBase::setSampleNumeratorCoeff range error!"
-         << std::endl;
-      return;
-   } 
-   
-   std::string s(coeff, 0, SAMPLE_NUMERATOR_COEFFICIENT_SIZE);
-   theSampleNumeratorCoefficient[idx] = s;  
-}
-
-ossimString ossimNitfRpcBase::getSampleDenominatorCoeff(ossim_uint32 idx)const
-{
-   // ASSERT_ARRAY_CONSTRAINT(idx >= 0 && idx < SAMPLE_DENOMINATOR_COEFFICIENT_COUNT,idx,0,"ossimNitfRpcBase::getSampleDenominatorCoeff");
-
-   if (idx >= SAMPLE_DENOMINATOR_COEFFICIENT_COUNT)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimNitfRpcBase::getSampleDenominatorCoeff range error!"
-         << std::endl;
-      return ossimString();
-   } 
-   
-   return theSampleDenominatorCoefficient[idx];
-}
-
-void ossimNitfRpcBase::setSampleDenominatorCoeff(
-   const std::vector<ossim_float64>& coeff)
-{
-   if (coeff.size() != SAMPLE_DENOMINATOR_COEFFICIENT_COUNT)
-   {
-      // Error...
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfRpcBase::setSampleDenominatorCoeff WARNING:"
-            << "\nArray not of correct size!"
-            << std::endl;
-      }
-      return;
-   }
-
-   for (ossim_uint32 i = 0; i < SAMPLE_DENOMINATOR_COEFFICIENT_COUNT; ++i)
-   {
-      ossimString os = ossimNitfCommon::convertToScientificString(
-         coeff[i], SAMPLE_DENOMINATOR_COEFFICIENT_SIZE);
-      setSampleDenominatorCoeff(i, os);
-   }
-}
-
-void ossimNitfRpcBase::setSampleDenominatorCoeff(
-   ossim_uint32 idx, const ossimString& coeff)
-{
-   // ASSERT_ARRAY_CONSTRAINT(idx >= 0 && idx < SAMPLE_DENOMINATOR_COEFFICIENT_COUNT,idx,0,"ossimNitfRpcBase::setSampleDenominatorCoeff");
-
-   if (idx >= SAMPLE_DENOMINATOR_COEFFICIENT_COUNT)
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << "ossimNitfRpcBase::setSampleDenominatorCoeff range error!"
-         << std::endl;
-      return;
-   }
-   
-  std::string s(coeff, 0, SAMPLE_DENOMINATOR_COEFFICIENT_SIZE);
-  s.resize(SAMPLE_DENOMINATOR_COEFFICIENT_SIZE, ' ');
-  theSampleDenominatorCoefficient[idx] = s;  
-}
-
-std::ostream& ossimNitfRpcBase::print(std::ostream& out,
-                                      const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += getTagName();
-   pfx += ".";
-
-   out << setiosflags(std::ios::left)
-       << pfx << std::setw(24) << "CETAG:"
-       << getTagName() << "\n"
-       << pfx << std::setw(24) << "CEL:"
-       << getSizeInBytes() << "\n"
-       << pfx << std::setw(24) << "SUCCESS:"
-       << theSuccess << "\n" 
-       << pfx << std::setw(24) << "ERR_BIAS:"
-       << theErrorBias << "\n"
-       << pfx << std::setw(24) << "ERR_RAND:"
-       <<theErrRand  << "\n" 
-       << pfx << std::setw(24) << "LINE_OFF:"
-       << theLineOffset << "\n"
-       << pfx << std::setw(24) << "SAMP_OFF:"
-       << theSampleOffset << "\n" 
-       << pfx << std::setw(24) << "LAT_OFF:"
-       << theGeodeticLatOffset << "\n"
-       << pfx << std::setw(24) << "LONG_OFF:"
-       << theGeodeticLonOffset << "\n" 
-       << pfx << std::setw(24) << "HEIGHT_OFF:"
-       << theGeodeticHeightOffset << "\n"
-       << pfx << std::setw(24) << "LINE_SCALE:"
-       << theLineScale  << "\n" 
-       << pfx << std::setw(24)
-       << "SAMP_SCALE:" << theSampleScale << "\n"
-       << pfx << std::setw(24) << "LAT_SCALE:"
-       << theGeodeticLatScale << "\n" 
-       << pfx << std::setw(24) << "LONG_SCALE:"
-       << theGeodeticLonScale << "\n"
-       << pfx << std::setw(24) << "HEIGHT_SCALE:"
-       << theGeodeticHeightScale << "\n";
-
-   ossim_int32 i;
-   ossimString s;
-   
-   for (i=0; i<LINE_NUMERATOR_COEFFICIENT_COUNT; ++i)
-   {
-      s = "LINE_NUM_COEFF_";
-      s += ossimString::toString(i);
-      s += ":";
-      out << pfx << std::setw(24) << s
-          << theLineNumeratorCoefficient[i] << "\n";
-   }
-
-   for (i=0; i<LINE_DENOMINATOR_COEFFICIENT_COUNT; ++i)
-   {
-      s = "LINE_DEN_COEFF_";
-      s += ossimString::toString(i);
-      s += ":";
-      out << pfx << std::setw(24) << s
-          << theLineDenominatorCoefficient[i] << "\n";
-   }
-
-   for (i=0; i<LINE_NUMERATOR_COEFFICIENT_COUNT; ++i)
-   {
-      s = "SAMP_NUM_COEFF_";
-      s += ossimString::toString(i);
-      s += ":";
-      out << pfx << std::setw(24) << s
-          << theSampleNumeratorCoefficient[i] << "\n";
-   }
-
-   for (i=0; i<LINE_DENOMINATOR_COEFFICIENT_COUNT; ++i)
-   {
-      s = "SAMP_DEN_COEFF_";
-      s += ossimString::toString(i);
-      s += ":";
-      out << pfx << std::setw(24) << s
-          << theSampleDenominatorCoefficient[i] << "\n";
-   }
-
-   out.flush();
-   
-   return out;
-}
-
-void ossimNitfRpcBase::setProperty(ossimRefPtr<ossimProperty> /* property */)
-{
-   
-}
-
-ossimRefPtr<ossimProperty> ossimNitfRpcBase::getProperty(const ossimString& name)const
-{
-   ossimProperty* result = 0;
-   if(name == ERR_BIAS_KW)
-   {
-      result = new ossimStringProperty(name, theErrorBias);
-   }
-   else if(name == ERR_RAND_KW)
-   {
-      result = new ossimStringProperty(name, theErrRand);
-   }
-   else if(name == LINE_OFF_KW)
-   {
-      result = new ossimStringProperty(name, theLineOffset);
-   }
-   else if(name == SAMP_OFF_KW)
-   {
-      result = new ossimStringProperty(name, theSampleOffset);
-   }
-   else if(name == LAT_OFF_KW)
-   {
-      result = new ossimStringProperty(name, theGeodeticLatOffset);
-   }
-   else if(name == LONG_OFF_KW)
-   {
-      result = new ossimStringProperty(name, theGeodeticLonOffset);
-   }
-   else if(name == HEIGHT_OFF_KW)
-   {
-      result = new ossimStringProperty(name, theGeodeticHeightOffset);
-   }
-   else if(name == LINE_SCALE_KW)
-   {
-      result = new ossimStringProperty(name, theLineScale);
-   }
-   else if(name == SAMP_SCALE_KW)
-   {
-      result = new ossimStringProperty(name,theSampleScale );
-   }
-   else if(name == LAT_SCALE_KW)
-   {
-      result = new ossimStringProperty(name, theGeodeticLatScale);
-   }
-   else if(name == LONG_SCALE_KW)
-   {
-      result = new ossimStringProperty(name, theGeodeticLonScale);
-   }
-   else if(name == HEIGHT_SCALE_KW)
-   {
-      result = new ossimStringProperty(name, theGeodeticHeightScale);
-   }
-   else if(name.contains(LINE_NUM_COEFF_KW))
-   {
-      ossim_uint32 idx = 0;
-
-         idx = ossimString(name.begin()+LINE_NUM_COEFF_KW.length(),
-                           name.end()).toUInt32();
-      --idx;
-
-      if(idx < theLineNumeratorCoefficient.size())
-      {
-         result = new ossimStringProperty(name, theLineNumeratorCoefficient[idx]);
-      }
-   }
-   else if(name.contains(LINE_DEN_COEFF_KW))
-   {
-      ossim_uint32 idx = 0;
-
-      idx = ossimString(name.begin()+LINE_DEN_COEFF_KW.length(),
-                        name.end()).toUInt32();
-      --idx;
-
-      if(idx < theLineDenominatorCoefficient.size())
-      {
-         result = new ossimStringProperty(name, theLineDenominatorCoefficient[idx]);
-      }
-   }
-   else if(name.contains(SAMP_NUM_COEFF_KW))
-   {
-      ossim_uint32 idx = 0;
-
-      idx = ossimString(name.begin()+SAMP_NUM_COEFF_KW.length(),
-                        name.end()).toUInt32(); 
-      --idx;
-
-      if(idx < theSampleNumeratorCoefficient.size())
-      {
-         result = new ossimStringProperty(name, theSampleNumeratorCoefficient[idx]);
-      }
-   }
-   else if(name.contains(SAMP_DEN_COEFF_KW))
-   {
-      ossim_uint32 idx = 0;
-
-      idx = ossimString(name.begin()+SAMP_DEN_COEFF_KW.length(),
-                        name.end()).toUInt32();
-      --idx;
-
-      if(idx < theSampleDenominatorCoefficient.size())
-      {
-         result = new ossimStringProperty(name, theSampleDenominatorCoefficient[idx]);
-      }
-   }
-
-   return result;
-}
-
-void ossimNitfRpcBase::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossim_uint32 idx = 0;
-   
-   propertyNames.push_back(ERR_BIAS_KW);
-   propertyNames.push_back(ERR_RAND_KW);
-   propertyNames.push_back(LINE_OFF_KW);
-   propertyNames.push_back(SAMP_OFF_KW);
-   propertyNames.push_back(LAT_OFF_KW);
-   propertyNames.push_back(LONG_OFF_KW);
-   propertyNames.push_back(HEIGHT_OFF_KW);
-   propertyNames.push_back(LINE_SCALE_KW);
-   propertyNames.push_back(SAMP_SCALE_KW);
-   propertyNames.push_back(LAT_SCALE_KW);
-   propertyNames.push_back(LONG_SCALE_KW);
-   propertyNames.push_back(HEIGHT_SCALE_KW);
-
-   for(idx = 1; idx <= 20; ++idx)
-   {
-      propertyNames.push_back(LINE_NUM_COEFF_KW+ossimString::toString(idx));
-   }
-   for(idx = 1; idx <= 20; ++idx)
-   {
-      propertyNames.push_back(LINE_DEN_COEFF_KW+ossimString::toString(idx));
-   }
-   for(idx = 1; idx <= 20; ++idx)
-   {
-      propertyNames.push_back(SAMP_NUM_COEFF_KW+ossimString::toString(idx));
-   }
-   for(idx = 1; idx <= 20; ++idx)
-   {
-      propertyNames.push_back(SAMP_DEN_COEFF_KW+ossimString::toString(idx));
-   }
-}
-
diff --git a/src/ossim/support_data/ossimNitfRpfTagFactory.cpp b/src/ossim/support_data/ossimNitfRpfTagFactory.cpp
deleted file mode 100644
index a8bb5f1..0000000
--- a/src/ossim/support_data/ossimNitfRpfTagFactory.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-//*******************************************************************
-//
-// LICENSE: LGPL  see top level LICENSE.txt
-// 
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfRpfTagFactory.cpp 16997 2010-04-12 18:53:48Z dburken $
-#include <ossim/support_data/ossimNitfRpfTagFactory.h>
-#include <ossim/support_data/ossimRpfHeader.h>
-#include <ossim/base/ossimNotify.h>
-
-RTTI_DEF1(ossimNitfRpfTagFactory, "ossimNitfRpfTagFactory", ossimNitfTagFactory);
-
-ossimNitfRpfTagFactory* ossimNitfRpfTagFactory::theInstance = 0;
-
-static const ossimString REGISTERED_RPF_HEADER_TAG = "RPFHDR";
-static const ossimString REGISTERED_RPF_DES_TAG    = "RPFDES";
-
-ossimNitfRpfTagFactory::ossimNitfRpfTagFactory()
-{
-   theInstance = this;
-}
-
-ossimNitfRpfTagFactory::~ossimNitfRpfTagFactory()
-{
-   theInstance = 0;
-}
-
-ossimNitfRpfTagFactory* ossimNitfRpfTagFactory::instance()
-{
-   if(!theInstance)
-   {
-      theInstance = new ossimNitfRpfTagFactory;
-   }
-   
-   return theInstance;
-}
-
-ossimRefPtr<ossimNitfRegisteredTag> ossimNitfRpfTagFactory::create(const ossimString &tagName)const
-{
-   ossimString temp(ossimString(tagName).trim().upcase());
-   
-   if(temp == REGISTERED_RPF_HEADER_TAG)
-   {
-      return new ossimRpfHeader;
-   }
-   if(temp == REGISTERED_RPF_DES_TAG)
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "WARNING  ossimNitfRpfTagFactory::create: Reader for REGISTERED_RPF_DES_TAG not implemented yet" << std::endl;
-   }
-   
-   return 0;
-}
diff --git a/src/ossim/support_data/ossimNitfSensraTag.cpp b/src/ossim/support_data/ossimNitfSensraTag.cpp
deleted file mode 100644
index 489928f..0000000
--- a/src/ossim/support_data/ossimNitfSensraTag.cpp
+++ /dev/null
@@ -1,444 +0,0 @@
-//*******************************************************************
-
-// LICENSE: LGPL
-//
-// see top level LICENSE.txt
-// 
-// Author: Walt Bunch
-//
-// Description: Nitf support class for SENSRA - Sensor parameters extension.
-// 
-//********************************************************************
-// $Id: ossimNitfSensraTag.cpp 22013 2012-12-19 17:37:20Z dburken $
-
-#include <istream>
-#include <iomanip>
-#include <ossim/support_data/ossimNitfSensraTag.h>
-
-RTTI_DEF1(ossimNitfSensraTag, "ossimNitfSensraTag", ossimNitfRegisteredTag);
-
-
-ossimNitfSensraTag::ossimNitfSensraTag()
-   : ossimNitfRegisteredTag(std::string("SENSRA"), 132)
-{
-   clearFields();
-}
-
-ossimNitfSensraTag::~ossimNitfSensraTag()
-{
-}
-
-void ossimNitfSensraTag::parseStream(std::istream& in)
-{
-   clearFields();
-   
-   in.read(theRefRow, REF_ROW_SIZE);
-   in.read(theRefCol, REF_COL_SIZE);
-   in.read(theSensorModel, SENSOR_MODEL_SIZE);
-   in.read(theSensorMount, SENSOR_MOUNT_SIZE);
-   in.read(theSensorLoc, SENSOR_LOC_SIZE);
-   in.read(theSensorAltSrc, SENSOR_ALT_SRC_SIZE);
-   in.read(theSensorAlt, SENSOR_ALT_SIZE);
-   in.read(theSensorAltUnit, SENSOR_ALT_UNIT_SIZE);
-   in.read(theSensorAgl, SENSOR_AGL_SIZE);
-   in.read(theSensorPitch, SENSOR_PITCH_SIZE);
-   in.read(theSensorRoll, SENSOR_ROLL_SIZE);
-   in.read(theSensorYaw, SENSOR_YAW_SIZE);
-   in.read(thePlatformPitch, PLATFORM_PITCH_SIZE);
-   in.read(thePlatformRoll, PLATFORM_ROLL_SIZE);
-   in.read(thePlatformHdg, PLATFORM_HDG_SIZE);
-   in.read(theGroundSpdSrc, GROUND_SPD_SRC_SIZE);
-   in.read(theGroundSpeed, GROUND_SPEED_SIZE);
-   in.read(theGroundSpdUnit, GROUND_SPD_UNIT_SIZE);
-   in.read(theGroundTrack, GROUND_TRACK_SIZE);
-   in.read(theVerticalVel, VERTICAL_VEL_SIZE);
-   in.read(theVertVelUnit, VERT_VEL_UNIT_SIZE);
-   in.read(theSwathFrames, SWATH_FRAMES_SIZE);
-   in.read(theNSwaths, N_SWATHS_SIZE);
-   in.read(theSpotNum, SPOT_NUM_SIZE);
-}
-
-void ossimNitfSensraTag::writeStream(std::ostream& out)
-{
-   out.write(theRefRow, REF_ROW_SIZE);
-   out.write(theRefCol, REF_COL_SIZE);
-   out.write(theSensorModel, SENSOR_MODEL_SIZE);
-   out.write(theSensorMount, SENSOR_MOUNT_SIZE);
-   out.write(theSensorLoc, SENSOR_LOC_SIZE);
-   out.write(theSensorAltSrc, SENSOR_ALT_SRC_SIZE);
-   out.write(theSensorAlt, SENSOR_ALT_SIZE);
-   out.write(theSensorAltUnit, SENSOR_ALT_UNIT_SIZE);
-   out.write(theSensorAgl, SENSOR_AGL_SIZE);
-   out.write(theSensorPitch, SENSOR_PITCH_SIZE);
-   out.write(theSensorRoll, SENSOR_ROLL_SIZE);
-   out.write(theSensorYaw, SENSOR_YAW_SIZE);
-   out.write(thePlatformPitch, PLATFORM_PITCH_SIZE);
-   out.write(thePlatformRoll, PLATFORM_ROLL_SIZE);
-   out.write(thePlatformHdg, PLATFORM_HDG_SIZE);
-   out.write(theGroundSpdSrc, GROUND_SPD_SRC_SIZE);
-   out.write(theGroundSpeed, GROUND_SPEED_SIZE);
-   out.write(theGroundSpdUnit, GROUND_SPD_UNIT_SIZE);
-   out.write(theGroundTrack, GROUND_TRACK_SIZE);
-   out.write(theVerticalVel, VERTICAL_VEL_SIZE);
-   out.write(theVertVelUnit, VERT_VEL_UNIT_SIZE);
-   out.write(theSwathFrames, SWATH_FRAMES_SIZE);
-   out.write(theNSwaths, N_SWATHS_SIZE);
-   out.write(theSpotNum, SPOT_NUM_SIZE);
-}
-
-void ossimNitfSensraTag::clearFields()
-{
-   memset(theRefRow, ' ', REF_ROW_SIZE);
-   memset(theRefCol, ' ', REF_COL_SIZE);
-   memset(theSensorModel, ' ', SENSOR_MODEL_SIZE);
-   memset(theSensorMount, ' ', SENSOR_MOUNT_SIZE);
-   memset(theSensorLoc, ' ', SENSOR_LOC_SIZE);
-   memset(theSensorAltSrc, ' ', SENSOR_ALT_SRC_SIZE);
-   memset(theSensorAlt, ' ', SENSOR_ALT_SIZE);
-   memset(theSensorAltUnit, ' ', SENSOR_ALT_UNIT_SIZE);
-   memset(theSensorAgl, ' ', SENSOR_AGL_SIZE);
-   memset(theSensorPitch, ' ', SENSOR_PITCH_SIZE);
-   memset(theSensorRoll, ' ', SENSOR_ROLL_SIZE);
-   memset(theSensorYaw, ' ', SENSOR_YAW_SIZE);
-   memset(thePlatformPitch, ' ', PLATFORM_PITCH_SIZE);
-   memset(thePlatformRoll, ' ', PLATFORM_ROLL_SIZE);
-   memset(thePlatformHdg, ' ', PLATFORM_HDG_SIZE);
-   memset(theGroundSpdSrc, ' ', GROUND_SPD_SRC_SIZE);
-   memset(theGroundSpeed, ' ', GROUND_SPEED_SIZE);
-   memset(theGroundSpdUnit, ' ', GROUND_SPD_UNIT_SIZE);
-   memset(theGroundTrack, ' ', GROUND_TRACK_SIZE);
-   memset(theVerticalVel, ' ', VERTICAL_VEL_SIZE);
-   memset(theVertVelUnit, ' ', VERT_VEL_UNIT_SIZE);
-   memset(theSwathFrames, ' ', SWATH_FRAMES_SIZE);
-   memset(theNSwaths, ' ', N_SWATHS_SIZE);
-   memset(theSpotNum, ' ', SPOT_NUM_SIZE);
-
-   theRefRow[REF_ROW_SIZE] = '\0';
-   theRefCol[REF_COL_SIZE] = '\0';
-   theSensorModel[SENSOR_MODEL_SIZE] = '\0';
-   theSensorMount[SENSOR_MOUNT_SIZE] = '\0';
-   theSensorLoc[SENSOR_LOC_SIZE] = '\0';
-   theSensorAltSrc[SENSOR_ALT_SRC_SIZE] = '\0';
-   theSensorAlt[SENSOR_ALT_SIZE] = '\0';
-   theSensorAltUnit[SENSOR_ALT_UNIT_SIZE] = '\0';
-   theSensorAgl[SENSOR_AGL_SIZE] = '\0';
-   theSensorPitch[SENSOR_PITCH_SIZE] = '\0';
-   theSensorRoll[SENSOR_ROLL_SIZE] = '\0';
-   theSensorYaw[SENSOR_YAW_SIZE] = '\0';
-   thePlatformPitch[PLATFORM_PITCH_SIZE] = '\0';
-   thePlatformRoll[PLATFORM_ROLL_SIZE] = '\0';
-   thePlatformHdg[PLATFORM_HDG_SIZE] = '\0';
-   theGroundSpdSrc[GROUND_SPD_SRC_SIZE] = '\0';
-   theGroundSpeed[GROUND_SPEED_SIZE] = '\0';
-   theGroundSpdUnit[GROUND_SPD_UNIT_SIZE] = '\0';
-   theGroundTrack[GROUND_TRACK_SIZE] = '\0';
-   theVerticalVel[VERTICAL_VEL_SIZE] = '\0';
-   theVertVelUnit[VERT_VEL_UNIT_SIZE] = '\0';
-   theSwathFrames[SWATH_FRAMES_SIZE] = '\0';
-   theNSwaths[N_SWATHS_SIZE] = '\0';
-   theSpotNum[SPOT_NUM_SIZE] = '\0';
-}
-
-std::ostream& ossimNitfSensraTag::print(
-   std::ostream& out, const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += getTagName();
-   pfx += ".";
-   
-   out << std::setiosflags(std::ios::left)
-       << pfx << std::setw(24) << "CETAG:"
-       << getTagName() << "\n"
-       << pfx << std::setw(24) << "CEL:" << getTagLength() << "\n"
-       << pfx << std::setw(24) << "REFROW:" << theRefRow << "\n"
-       << pfx << std::setw(24) << "REFCOL:" << theRefCol << "\n"
-       << pfx << std::setw(24) << "SENSORMODEL:" << theSensorModel<< "\n"
-       << pfx << std::setw(24) << "SENSORMOUNT:" << theSensorMount << "\n"
-       << pfx << std::setw(24) << "SENSORLOC:" << theSensorLoc << "\n"
-       << pfx << std::setw(24) << "SENSORALTSRC:" << theSensorAltSrc<< "\n"
-       << pfx << std::setw(24) << "SENSORALT:" << theSensorAlt << "\n"
-       << pfx << std::setw(24) << "SENSORALTUNIT:" << theSensorAltUnit << "\n"
-       << pfx << std::setw(24) << "SENSORAGL:" << theSensorAgl << "\n"
-       << pfx << std::setw(24) << "SENSORPITCH:" << theSensorPitch << "\n"
-       << pfx << std::setw(24) << "SENSORROLL:" << theSensorRoll<< "\n"
-       << pfx << std::setw(24) << "SENSORYAW:" << theSensorYaw << "\n"
-       << pfx << std::setw(24) << "PLATFORMPITCH:" << thePlatformPitch << "\n"
-       << pfx << std::setw(24) << "PLATFORMROLL:" << thePlatformRoll << "\n"
-       << pfx << std::setw(24) << "PLATFORMHDG:" << thePlatformHdg << "\n"
-       << pfx << std::setw(24) << "GROUNDSPDSRC:" << theGroundSpdSrc << "\n"
-       << pfx << std::setw(24) << "GROUNDSPEED:" << theGroundSpeed << "\n"
-       << pfx << std::setw(24) << "GROUNDSPDUNIT:" << theGroundSpdUnit << "\n"
-       << pfx << std::setw(24) << "GROUNDTRACK:" << theGroundTrack << "\n"
-       << pfx << std::setw(24) << "VERTICALVEL:" << theVerticalVel<< "\n"
-       << pfx << std::setw(24) << "VERTVELUNIT:" << theVertVelUnit << "\n"
-       << pfx << std::setw(24) << "SWATHFRAMES:" << theSwathFrames<< "\n"
-       << pfx << std::setw(24) << "NSWATHS:" << theNSwaths << "\n"
-       << pfx << std::setw(24) << "SPOTNUM:" << theSpotNum << "\n";
-   
-   return out;
-}
-
-ossimString ossimNitfSensraTag::getRefRow()const
-{
-   return theRefRow;
-}
-
-void ossimNitfSensraTag::setRefRow(ossimString refRow)
-{
-   memset(theRefRow, ' ', REF_ROW_SIZE);
-   memcpy(theRefRow, refRow.c_str(), std::min((size_t)REF_ROW_SIZE, refRow.length()));
-}
-
-ossimString ossimNitfSensraTag::getRefCol()const
-{
-   return theRefCol;
-}
-
-void ossimNitfSensraTag::setRefCol(ossimString refCol)
-{
-   memset(theRefCol, ' ', REF_COL_SIZE);
-   memcpy(theRefCol, refCol.c_str(), std::min((size_t)REF_COL_SIZE, refCol.length()));
-}
-
-ossimString ossimNitfSensraTag::getSensorModel()const
-{
-   return theSensorModel;
-}
-
-void ossimNitfSensraTag::setSensorModel(ossimString sensorModel)
-{
-   memset(theSensorModel, ' ', SENSOR_MODEL_SIZE);
-   memcpy(theSensorModel, sensorModel.c_str(), std::min((size_t)SENSOR_MODEL_SIZE, sensorModel.length()));
-}
-
-ossimString ossimNitfSensraTag::getSensorMount()const
-{
-   return theSensorMount;
-}
-
-void ossimNitfSensraTag::setSensorMount(ossimString sensorMount)
-{
-   memset(theSensorMount, ' ', SENSOR_MOUNT_SIZE);
-   memcpy(theSensorMount, sensorMount.c_str(), std::min((size_t)SENSOR_MOUNT_SIZE, sensorMount.length()));
-}
-
-ossimString ossimNitfSensraTag::getSensorLoc()const
-{
-   return theSensorLoc;
-}
-
-void ossimNitfSensraTag::setSensorLoc(ossimString sensorLoc)
-{
-   memset(theSensorLoc, ' ', SENSOR_LOC_SIZE);
-   memcpy(theSensorLoc, sensorLoc.c_str(), std::min((size_t)SENSOR_LOC_SIZE, sensorLoc.length()));
-}
-
-ossimString ossimNitfSensraTag::getSensorAltSrc()const
-{
-   return theSensorAltSrc;
-}
-
-void ossimNitfSensraTag::setSensorAltSrc(ossimString sensorAltSrc)
-{
-   memset(theSensorAltSrc, ' ', SENSOR_ALT_SRC_SIZE);
-   memcpy(theSensorAltSrc, sensorAltSrc.c_str(), std::min((size_t)SENSOR_ALT_SRC_SIZE, sensorAltSrc.length()));
-}
-
-ossimString ossimNitfSensraTag::getSensorAlt()const
-{
-   return theSensorAlt;
-}
-
-void ossimNitfSensraTag::setSensorAlt(ossimString sensorAlt)
-{
-   memset(theSensorAlt, ' ', SENSOR_ALT_SIZE);
-   memcpy(theSensorAlt, sensorAlt.c_str(), std::min((size_t)SENSOR_ALT_SIZE, sensorAlt.length()));
-}
-
-ossimString ossimNitfSensraTag::getSensorAltUnit()const
-{
-   return theSensorAltUnit;
-}
-
-void ossimNitfSensraTag::setSensorAltUnit(ossimString sensorAltUnit)
-{
-   memset(theSensorAltUnit, ' ', SENSOR_ALT_UNIT_SIZE);
-   memcpy(theSensorAltUnit, sensorAltUnit.c_str(), std::min((size_t)SENSOR_ALT_UNIT_SIZE, sensorAltUnit.length()));
-}
-
-ossimString ossimNitfSensraTag::getSensorAgl()const
-{
-   return theSensorAgl;
-}
-
-void ossimNitfSensraTag::setSensorAgl(ossimString sensorAgl)
-{
-   memset(theSensorAgl, ' ', SENSOR_AGL_SIZE);
-   memcpy(theSensorAgl, sensorAgl.c_str(), std::min((size_t)SENSOR_AGL_SIZE, sensorAgl.length()));
-}
-
-ossimString ossimNitfSensraTag::getSensorPitch()const
-{
-   return theSensorPitch;
-}
-
-void ossimNitfSensraTag::setSensorPitch(ossimString sensorPitch)
-{
-   memset(theSensorPitch, ' ', SENSOR_PITCH_SIZE);
-   memcpy(theSensorPitch, sensorPitch.c_str(), std::min((size_t)SENSOR_PITCH_SIZE, sensorPitch.length()));
-}
-
-ossimString ossimNitfSensraTag::getSensorRoll()const
-{
-   return theSensorRoll;
-}
-
-void ossimNitfSensraTag::setSensorRoll(ossimString sensorRoll)
-{
-   memset(theSensorRoll, ' ', SENSOR_ROLL_SIZE);
-   memcpy(theSensorRoll, sensorRoll.c_str(), std::min((size_t)SENSOR_ROLL_SIZE, sensorRoll.length()));
-}
-
-ossimString ossimNitfSensraTag::getSensorYaw()const
-{
-   return theSensorYaw;
-}
-
-void ossimNitfSensraTag::setSensorYaw(ossimString sensorYaw)
-{
-   memset(theSensorYaw, ' ', SENSOR_YAW_SIZE);
-   memcpy(theSensorYaw, sensorYaw.c_str(), std::min((size_t)SENSOR_YAW_SIZE, sensorYaw.length()));
-}
-
-ossimString ossimNitfSensraTag::getPlatformPitch()const
-{
-   return thePlatformPitch;
-}
-
-void ossimNitfSensraTag::setPlatformPitch(ossimString platformPitch)
-{
-   memset(thePlatformPitch, ' ', PLATFORM_PITCH_SIZE);
-   memcpy(thePlatformPitch, platformPitch.c_str(), std::min((size_t)PLATFORM_PITCH_SIZE, platformPitch.length()));
-}
-
-ossimString ossimNitfSensraTag::getPlatformRoll()const
-{
-   return thePlatformRoll;
-}
-
-void ossimNitfSensraTag::setPlatformRoll(ossimString platformRoll)
-{
-   memset(thePlatformRoll, ' ', PLATFORM_ROLL_SIZE);
-   memcpy(thePlatformRoll, platformRoll.c_str(), std::min((size_t)PLATFORM_ROLL_SIZE, platformRoll.length()));
-}
-
-ossimString ossimNitfSensraTag::getPlatformHdg()const
-{
-   return thePlatformHdg;
-}
-
-void ossimNitfSensraTag::setPlatformHdg(ossimString platformHdg)
-{
-   memset(thePlatformHdg, ' ', PLATFORM_HDG_SIZE);
-   memcpy(thePlatformHdg, platformHdg.c_str(), std::min((size_t)PLATFORM_HDG_SIZE, platformHdg.length()));
-}
-
-ossimString ossimNitfSensraTag::getGroundSpdSrc()const
-{
-   return theGroundSpdSrc;
-}
-
-void ossimNitfSensraTag::setGroundSpdSrc(ossimString groundSpdSrc)
-{
-   memset(theGroundSpdSrc, ' ', GROUND_SPD_SRC_SIZE);
-   memcpy(theGroundSpdSrc, groundSpdSrc.c_str(), std::min((size_t)GROUND_SPD_SRC_SIZE, groundSpdSrc.length()));
-}
-
-ossimString ossimNitfSensraTag::getGroundSpeed()const
-{
-   return theGroundSpeed;
-}
-
-void ossimNitfSensraTag::setGroundSpeed(ossimString groundSpeed)
-{
-   memset(theGroundSpeed, ' ', GROUND_SPEED_SIZE);
-   memcpy(theGroundSpeed, groundSpeed.c_str(), std::min((size_t)GROUND_SPEED_SIZE, groundSpeed.length()));
-}
-
-ossimString ossimNitfSensraTag::getGroundSpdUnit()const
-{
-   return theGroundSpdUnit;
-}
-
-void ossimNitfSensraTag::setGroundSpdUnit(ossimString groundSpdUnit)
-{
-   memset(theGroundSpdUnit, ' ', GROUND_SPD_UNIT_SIZE);
-   memcpy(theGroundSpdUnit, groundSpdUnit.c_str(), std::min((size_t)GROUND_SPD_UNIT_SIZE, groundSpdUnit.length()));
-}
-
-ossimString ossimNitfSensraTag::getGroundTrack()const
-{
-   return theGroundTrack;
-}
-
-void ossimNitfSensraTag::setGroundTrack(ossimString groundTrack)
-{
-   memset(theGroundTrack, ' ', GROUND_TRACK_SIZE);
-   memcpy(theGroundTrack, groundTrack.c_str(), std::min((size_t)GROUND_TRACK_SIZE, groundTrack.length()));
-}
-
-ossimString ossimNitfSensraTag::getVerticalVel()const
-{
-   return theVerticalVel;
-}
-
-void ossimNitfSensraTag::setVerticalVel(ossimString verticalVel)
-{
-   memset(theVerticalVel, ' ', VERTICAL_VEL_SIZE);
-   memcpy(theVerticalVel, verticalVel.c_str(), std::min((size_t)VERTICAL_VEL_SIZE, verticalVel.length()));
-}
-
-ossimString ossimNitfSensraTag::getVertVelUnit()const
-{
-   return theVertVelUnit;
-}
-
-void ossimNitfSensraTag::setVertVelUnit(ossimString vertVelUnit)
-{
-   memset(theVertVelUnit, ' ', VERT_VEL_UNIT_SIZE);
-   memcpy(theVertVelUnit, vertVelUnit.c_str(), std::min((size_t)VERT_VEL_UNIT_SIZE, vertVelUnit.length()));
-}
-
-ossimString ossimNitfSensraTag::getSwathFrames()const
-{
-   return theSwathFrames;
-}
-
-void ossimNitfSensraTag::setSwathFrames(ossimString swathFrames)
-{
-   memset(theSwathFrames, ' ', SWATH_FRAMES_SIZE);
-   memcpy(theSwathFrames, swathFrames.c_str(), std::min((size_t)SWATH_FRAMES_SIZE, swathFrames.length()));
-}
-
-ossimString ossimNitfSensraTag::getNSwaths()const
-{
-   return theNSwaths;
-}
-
-void ossimNitfSensraTag::setNSwaths(ossimString nSwaths)
-{
-   memset(theNSwaths, ' ', N_SWATHS_SIZE);
-   memcpy(theNSwaths, nSwaths.c_str(), std::min((size_t)N_SWATHS_SIZE, nSwaths.length()));
-}
-
-ossimString ossimNitfSensraTag::getSpotNum()const
-{
-   return theSpotNum;
-}
-
-void ossimNitfSensraTag::setSpotNum(ossimString spotNum)
-{
-   memset(theSpotNum, ' ', SPOT_NUM_SIZE);
-   memcpy(theSpotNum, spotNum.c_str(), std::min((size_t)SPOT_NUM_SIZE, spotNum.length()));
-}
-
diff --git a/src/ossim/support_data/ossimNitfStdidcTag.cpp b/src/ossim/support_data/ossimNitfStdidcTag.cpp
deleted file mode 100644
index 6802bcf..0000000
--- a/src/ossim/support_data/ossimNitfStdidcTag.cpp
+++ /dev/null
@@ -1,468 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author:  Walt Bunch
-// 
-// Description:   NITF support data class for STDIDC - Standard ID extension.
-//
-// See:  STDI-000_v2.1 Table 7-3 for detailed description.
-// 
-//********************************************************************
-// $Id: ossimNitfStdidcTag.cpp 22013 2012-12-19 17:37:20Z dburken $
-
-#include <iostream>
-#include <iomanip>
-#include <ossim/support_data/ossimNitfStdidcTag.h>
-#include <ossim/base/ossimStringProperty.h>
-
-RTTI_DEF1(ossimNitfStdidcTag, "ossimNitfStdidcTag", ossimNitfRegisteredTag);
-static const ossimString ACQDATE_KW = "ACQDATE";
-static const ossimString MISSION_KW = "MISSION";
-static const ossimString PASS_KW = "PASS";
-static const ossimString OPNUM_KW = "OPNUM";
-static const ossimString STARTSEGMENT_KW = "STARTSEGMENT";
-static const ossimString REPRONUM_KW = "REPRONUM";
-static const ossimString REPLAYREGEN_KW = "REPLAYREGEN";
-static const ossimString BLANKFILL_KW = "BLANKFILL";
-static const ossimString STARTCOLUMN_KW = "STARTCOLUMN";
-static const ossimString STARTROW_KW = "STARTROW";
-static const ossimString ENDSEGMENT_KW = "ENDSEGMENT";
-static const ossimString ENDCOLUMN_KW = "ENDCOLUMN";
-static const ossimString ENDROW_KW = "ENDROW";
-static const ossimString COUNTRY_KW = "COUNTRY";
-static const ossimString WAC_KW = "WAC";
-static const ossimString LOCATION_KW = "LOCATION";
-
-
-ossimNitfStdidcTag::ossimNitfStdidcTag()
-   : ossimNitfRegisteredTag(std::string("STDIDC"), 89)
-{
-   clearFields();
-}
-
-ossimNitfStdidcTag::~ossimNitfStdidcTag()
-{
-}
-
-void ossimNitfStdidcTag::parseStream(std::istream& in)
-{
-   clearFields();
-   
-   in.read(theAcqDate,      ACQ_DATE_SIZE);
-   in.read(theMission,      MISSION_SIZE);
-   in.read(thePass,         PASS_SIZE);
-   in.read(theOpNum,        OP_NUM_SIZE);
-   in.read(theStartSegment, START_SEGMENT_SIZE);
-   in.read(theReproNum,     REPRO_NUM_SIZE);
-   in.read(theReplayRegen,  REPLAY_REGEN_SIZE);
-   in.read(theBlankFill,    BLANK_FILL_SIZE);
-   in.read(theStartColumn,  START_COLUMN_SIZE);
-   in.read(theStartRow,     START_ROW_SIZE);
-   in.read(theEndSegment,   END_SEGMENT_SIZE);
-   in.read(theEndColumn,    END_COLUMN_SIZE);
-   in.read(theEndRow,       END_ROW_SIZE);
-   in.read(theCountry,      COUNTRY_SIZE);
-   in.read(theWac,          WAC_SIZE);
-   in.read(theLocation,     LOCATION_SIZE);
-   in.read(theField17,      FIELD17_SIZE);
-   in.read(theField18,      FIELD18_SIZE);
-}
-
-void ossimNitfStdidcTag::writeStream(std::ostream& out)
-{
-   out.write(theAcqDate,      ACQ_DATE_SIZE);
-   out.write(theMission,      MISSION_SIZE);
-   out.write(thePass,         PASS_SIZE);
-   out.write(theOpNum,        OP_NUM_SIZE);
-   out.write(theStartSegment, START_SEGMENT_SIZE);
-   out.write(theReproNum,     REPRO_NUM_SIZE);
-   out.write(theReplayRegen,  REPLAY_REGEN_SIZE);
-   out.write(theBlankFill,    BLANK_FILL_SIZE);
-   out.write(theStartColumn,  START_COLUMN_SIZE);
-   out.write(theStartRow,     START_ROW_SIZE);
-   out.write(theEndSegment,   END_SEGMENT_SIZE);
-   out.write(theEndColumn,    END_COLUMN_SIZE);
-   out.write(theEndRow,       END_ROW_SIZE);
-   out.write(theCountry,      COUNTRY_SIZE);
-   out.write(theWac,          WAC_SIZE);
-   out.write(theLocation,     LOCATION_SIZE);
-   out.write(theField17,      FIELD17_SIZE);
-   out.write(theField18,      FIELD18_SIZE);
-}
-
-void ossimNitfStdidcTag::clearFields()
-{
-   memset(theAcqDate,      ' ', ACQ_DATE_SIZE);
-   memset(theMission,      ' ', MISSION_SIZE);
-   memset(thePass,         ' ', PASS_SIZE);
-   memset(theOpNum,        ' ', OP_NUM_SIZE);
-   memset(theStartSegment, ' ', START_SEGMENT_SIZE);
-   memset(theReproNum,     ' ', REPRO_NUM_SIZE);
-   memset(theReplayRegen,  ' ', REPLAY_REGEN_SIZE);
-   memset(theBlankFill,    ' ', BLANK_FILL_SIZE);
-   memset(theStartColumn,  ' ', START_COLUMN_SIZE);
-   memset(theStartRow,     ' ', START_ROW_SIZE);
-   memset(theEndSegment,   ' ', END_SEGMENT_SIZE);
-   memset(theEndColumn,    ' ', END_COLUMN_SIZE);
-   memset(theEndRow,       ' ', END_ROW_SIZE);
-   memset(theCountry,      ' ', COUNTRY_SIZE);
-   memset(theWac,          ' ', WAC_SIZE);
-   memset(theLocation,     ' ', LOCATION_SIZE);
-   memset(theField17,      ' ', FIELD17_SIZE);
-   memset(theField18,      ' ', FIELD18_SIZE);
-
-   theAcqDate[ACQ_DATE_SIZE]           = '\0';
-   theMission[MISSION_SIZE]            = '\0';
-   thePass[PASS_SIZE]                  = '\0';
-   theOpNum[OP_NUM_SIZE]               = '\0';
-   theStartSegment[START_SEGMENT_SIZE] = '\0';
-   theReproNum[REPRO_NUM_SIZE]         = '\0';
-   theReplayRegen[REPLAY_REGEN_SIZE]   = '\0';
-   theBlankFill[BLANK_FILL_SIZE]       = '\0';
-   theStartColumn[START_COLUMN_SIZE]   = '\0';
-   theStartRow[START_ROW_SIZE]         = '\0';
-   theEndSegment[END_SEGMENT_SIZE]     = '\0';
-   theEndColumn[END_COLUMN_SIZE]       = '\0';
-   theEndRow[END_ROW_SIZE]             = '\0';
-   theCountry[COUNTRY_SIZE]            = '\0';
-   theWac[WAC_SIZE]                    = '\0';
-   theLocation[LOCATION_SIZE]          = '\0';
-   theField17[FIELD17_SIZE]            = '\0';
-   theField18[FIELD18_SIZE]            = '\0';
-}
-
-ossimString ossimNitfStdidcTag::getAcqDate()const
-{
-  return ossimString(theAcqDate);
-}
-
-void ossimNitfStdidcTag::setAcqDate(ossimString acqDate)
-{
-   memset(theAcqDate, ' ', ACQ_DATE_SIZE);
-   memcpy(theAcqDate, acqDate.c_str(), std::min((size_t)ACQ_DATE_SIZE, acqDate.length()));
-}
-
-ossimString ossimNitfStdidcTag::getMission()const
-{
-  return ossimString(theMission);
-}
-
-void ossimNitfStdidcTag::setMission(ossimString mission)
-{
-   memset(theMission, ' ', MISSION_SIZE);
-   memcpy(theMission, mission.c_str(), std::min((size_t)MISSION_SIZE, mission.length()));
-}
-
-ossimString ossimNitfStdidcTag::getPass()const
-{
-  return ossimString(thePass);
-}
-
-void ossimNitfStdidcTag::setPass(ossimString pass)
-{
-   memset(thePass, ' ', PASS_SIZE);
-   memcpy(thePass, pass.c_str(), std::min((size_t)PASS_SIZE, pass.length()));
-}
-
-ossimString ossimNitfStdidcTag::getOpNum()const
-{
-  return ossimString(theOpNum);
-}
-
-void ossimNitfStdidcTag::setOpNum(ossimString opNum) 
-{
-   memset(theOpNum, ' ', OP_NUM_SIZE);
-   memcpy(theOpNum, opNum.c_str(), std::min((size_t)OP_NUM_SIZE, opNum.length()));
-}
-
-ossimString ossimNitfStdidcTag::getStartSegment()const
-{
-  return ossimString(theStartSegment);
-}
-
-void ossimNitfStdidcTag::setStartSegment(ossimString startSegment) 
-{
-   memset(theStartSegment, ' ', START_SEGMENT_SIZE);
-   memcpy(theStartSegment, startSegment.c_str(), std::min((size_t)START_SEGMENT_SIZE, startSegment.length()));
-}
-
-ossimString ossimNitfStdidcTag::getReproNum()const
-{
-  return ossimString(theReproNum);
-}
-
-void ossimNitfStdidcTag::setReproNum(ossimString reproNum) 
-{
-   memset(theReproNum, ' ', REPRO_NUM_SIZE);
-   memcpy(theReproNum, reproNum.c_str(), std::min((size_t)REPRO_NUM_SIZE, reproNum.length()));
-}
-
-ossimString ossimNitfStdidcTag::getReplayRegen()const
-{
-  return ossimString(theReplayRegen);
-}
-
-void ossimNitfStdidcTag::setReplayRegen(ossimString replayRegen) 
-{
-   memset(theReplayRegen, ' ', REPLAY_REGEN_SIZE);
-   memcpy(theReplayRegen, replayRegen.c_str(), std::min((size_t)REPLAY_REGEN_SIZE, replayRegen.length()));
-}
-
-ossimString ossimNitfStdidcTag::getBlankFill()const
-{
-  return ossimString(theBlankFill);
-}
-
-void ossimNitfStdidcTag::setBlankFill(ossimString blankFill) 
-{
-   memset(theBlankFill, ' ', BLANK_FILL_SIZE);
-   memcpy(theBlankFill, blankFill.c_str(), std::min((size_t)BLANK_FILL_SIZE, blankFill.length()));
-}
-
-ossimString ossimNitfStdidcTag::getStartColumn()const
-{
-  return ossimString(theStartColumn);
-}
-
-void ossimNitfStdidcTag::setStartColumn(ossimString startColumn) 
-{
-   memset(theStartColumn, ' ', START_COLUMN_SIZE);
-   memcpy(theStartColumn, startColumn.c_str(), std::min((size_t)START_COLUMN_SIZE, startColumn.length()));
-}
-
-ossimString ossimNitfStdidcTag::getStartRow()const
-{
-  return ossimString(theStartRow);
-}
-
-void ossimNitfStdidcTag::setStartRow(ossimString startRow) 
-{
-   memset(theStartRow, ' ', START_ROW_SIZE);
-   memcpy(theStartRow, startRow.c_str(), std::min((size_t)START_ROW_SIZE, startRow.length()));
-}
-
-ossimString ossimNitfStdidcTag::getEndSegment()const
-{
-  return ossimString(theEndSegment);
-}
-
-void ossimNitfStdidcTag::setEndSegment(ossimString endSegment) 
-{
-   memset(theEndSegment, ' ', END_SEGMENT_SIZE);
-   memcpy(theEndSegment, endSegment.c_str(), std::min((size_t)END_SEGMENT_SIZE, endSegment.length()));
-}
-
-ossimString ossimNitfStdidcTag::getEndColumn()const
-{
-  return ossimString(theEndColumn);
-}
-
-void ossimNitfStdidcTag::setEndColumn(ossimString endColumn) 
-{
-   memset(theEndColumn, ' ', END_COLUMN_SIZE);
-   memcpy(theEndColumn, endColumn.c_str(), std::min((size_t)END_COLUMN_SIZE, endColumn.length()));
-}
-
-ossimString ossimNitfStdidcTag::getEndRow()const
-{
-  return ossimString(theEndRow);
-}
-
-void ossimNitfStdidcTag::setEndRow(ossimString endRow) 
-{
-   memset(theEndRow, ' ', END_ROW_SIZE);
-   memcpy(theEndRow, endRow.c_str(), std::min((size_t)END_ROW_SIZE, endRow.length()));
-}
-
-ossimString ossimNitfStdidcTag::getCountry()const
-{
-  return ossimString(theCountry);
-}
-
-void ossimNitfStdidcTag::setCountry(ossimString country) 
-{
-   memset(theCountry, ' ', COUNTRY_SIZE);
-   memcpy(theCountry, country.c_str(), std::min((size_t)COUNTRY_SIZE, country.length()));
-}
-
-ossimString ossimNitfStdidcTag::getWac()const
-{
-  return ossimString(theWac);
-}
-
-void ossimNitfStdidcTag::setWac(ossimString wac) 
-{
-   memset(theWac, ' ', WAC_SIZE);
-   memcpy(theWac, wac.c_str(), std::min((size_t)WAC_SIZE, wac.length()));
-}
-
-ossimString ossimNitfStdidcTag::getLocation()const
-{
-  return ossimString(theLocation);
-}
-
-void ossimNitfStdidcTag::setLocation(ossimString location) 
-{
-   memset(theLocation, ' ', LOCATION_SIZE);
-   memcpy(theLocation, location.c_str(), std::min((size_t)LOCATION_SIZE, location.length()));
-}
-
-ossimString ossimNitfStdidcTag::getField17()const
-{
-  return ossimString(theField17);
-}
-
-void ossimNitfStdidcTag::setField17(ossimString field17) 
-{
-   memset(theField17, ' ', FIELD17_SIZE);
-   memcpy(theField17, field17.c_str(), std::min((size_t)FIELD17_SIZE, field17.length()));
-}
-
-ossimString ossimNitfStdidcTag::getField18()const
-{
-  return ossimString(theField18);
-}
-
-void ossimNitfStdidcTag::setField18(ossimString field18) 
-{
-   memset(theField18, ' ', FIELD18_SIZE);
-   memcpy(theField18, field18.c_str(), std::min((size_t)FIELD18_SIZE, field18.length()));
-}
-
-std::ostream& ossimNitfStdidcTag::print(std::ostream& out,
-                                        const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += getTagName();
-   pfx += ".";
-   
-   out << setiosflags(std::ios::left)
-       << pfx << std::setw(24) << "CETAG:"
-       << getTagName() << "\n"
-       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
-       << pfx << std::setw(24) << "ACQDATE:"      << theAcqDate << "\n"
-       << pfx << std::setw(24) << "MISSION:"      << theMission << "\n"
-       << pfx << std::setw(24) << "PASS:"         << thePass << "\n"
-       << pfx << std::setw(24) << "OPNUM:"        << theOpNum  << "\n"
-       << pfx << std::setw(24) << "STARTSEGMENT:" << theStartSegment << "\n"
-       << pfx << std::setw(24) << "REPRONUM:"     << theReproNum << "\n"
-       << pfx << std::setw(24) << "REPLAYREGEN:"  << theReplayRegen << "\n"
-       << pfx << std::setw(24) << "STARTCOLUMN:"  << theStartColumn << "\n"
-       << pfx << std::setw(24) << "STARTROW:"     << theStartRow << "\n"
-       << pfx << std::setw(24) << "ENDSEGMENT:"   << theEndSegment << "\n"
-       << pfx << std::setw(24) << "ENDCOLUMN:"    << theEndColumn << "\n"
-       << pfx << std::setw(24) << "ENDROW:"       << theEndRow << "\n"
-       << pfx << std::setw(24) << "COUNTRY:"      << theCountry << "\n"
-       << pfx << std::setw(24) << "WAC:"          << theWac << "\n"
-       << pfx << std::setw(24) << "LOCATION:"     << theLocation << "\n";
-
-   return out;
-}
-
-void ossimNitfStdidcTag::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   ossimNitfRegisteredTag::setProperty(property);
-}
-
-ossimRefPtr<ossimProperty> ossimNitfStdidcTag::getProperty(const ossimString& name)const
-{
-   ossimProperty* result = 0;
-   
-   if(name == ACQDATE_KW)
-   {
-      result = new ossimStringProperty(name, theAcqDate);
-   }
-   else if(name == MISSION_KW)
-   {
-      result = new ossimStringProperty(name, theMission);
-   }
-   else if(name == PASS_KW)
-   {
-      result = new ossimStringProperty(name, thePass);
-   }
-   else if(name == OPNUM_KW)
-   {
-      result = new ossimStringProperty(name, theOpNum);
-   }
-   else if(name == STARTSEGMENT_KW)
-   {
-      result = new ossimStringProperty(name, theStartSegment);
-   }
-   else if(name == REPRONUM_KW)
-   {
-      result = new ossimStringProperty(name, theReproNum);
-   }
-   else if(name == REPLAYREGEN_KW)
-   {
-      result = new ossimStringProperty(name, theReplayRegen);
-   }
-   else if(name == BLANKFILL_KW)
-   {
-      result = new ossimStringProperty(name, theBlankFill);
-   }
-   else if(name == STARTCOLUMN_KW)
-   {
-      result = new ossimStringProperty(name, theStartColumn);
-   }
-   else if(name == STARTROW_KW)
-   {
-      result = new ossimStringProperty(name, theStartRow);
-   }
-   else if(name == ENDSEGMENT_KW)
-   {
-      result = new ossimStringProperty(name, theEndSegment);
-   }
-   else if(name == ENDCOLUMN_KW)
-   {
-      result = new ossimStringProperty(name, theEndColumn);
-   }
-   else if(name == ENDROW_KW)
-   {
-      result = new ossimStringProperty(name, theEndRow);
-   }
-   else if(name == COUNTRY_KW)
-   {
-      result = new ossimStringProperty(name,theCountry );
-   }
-   else if(name == WAC_KW)
-   {
-      result = new ossimStringProperty(name, theWac);
-   }
-   else if(name == LOCATION_KW)
-   {
-      result = new ossimStringProperty(name, theLocation);
-   }
-   else
-   {
-      return ossimNitfRegisteredTag::getProperty(name);
-   }
-
-   return result;
-}
-
-void ossimNitfStdidcTag::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimNitfRegisteredTag::getPropertyNames(propertyNames);
-
-   propertyNames.push_back(ACQDATE_KW);
-   propertyNames.push_back(MISSION_KW);
-   propertyNames.push_back(PASS_KW);
-   propertyNames.push_back(OPNUM_KW);
-   propertyNames.push_back(STARTSEGMENT_KW);
-   propertyNames.push_back(REPRONUM_KW);
-   propertyNames.push_back(REPLAYREGEN_KW);
-   propertyNames.push_back(BLANKFILL_KW);
-   propertyNames.push_back(STARTCOLUMN_KW);
-   propertyNames.push_back(STARTROW_KW);
-   propertyNames.push_back(ENDSEGMENT_KW);
-   propertyNames.push_back(ENDCOLUMN_KW);
-   propertyNames.push_back(ENDROW_KW);
-   propertyNames.push_back(COUNTRY_KW);
-   propertyNames.push_back(WAC_KW);
-   propertyNames.push_back(LOCATION_KW);
-   
-}
-
diff --git a/src/ossim/support_data/ossimNitfTagFactoryRegistry.cpp b/src/ossim/support_data/ossimNitfTagFactoryRegistry.cpp
deleted file mode 100644
index 12b890b..0000000
--- a/src/ossim/support_data/ossimNitfTagFactoryRegistry.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-//*******************************************************************
-//
-// LICENSE: See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-// 
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfTagFactoryRegistry.cpp 9212 2006-06-28 23:28:53Z dburken $
-
-#include <cstddef>   /* for NULL      */
-#include <algorithm> /* for std::find */
-
-#include <ossim/support_data/ossimNitfTagFactoryRegistry.h>
-#include <ossim/support_data/ossimNitfRpfTagFactory.h>
-#include <ossim/support_data/ossimNitfRegisteredTagFactory.h>
-#include <ossim/support_data/ossimNitfUnknownTag.h>
-
-ossimNitfTagFactoryRegistry* ossimNitfTagFactoryRegistry::theInstance=NULL;
-
-ossimNitfTagFactoryRegistry::ossimNitfTagFactoryRegistry()
-{
-}
-
-ossimNitfTagFactoryRegistry::~ossimNitfTagFactoryRegistry()
-{
-   theInstance = NULL;
-}
-
-void ossimNitfTagFactoryRegistry::registerFactory(ossimNitfTagFactory* aFactory)
-{
-   if(aFactory&&!exists(aFactory))
-   {
-      theFactoryList.push_back(aFactory);
-   }
-}
-
-void ossimNitfTagFactoryRegistry::unregisterFactory
-(ossimNitfTagFactory* aFactory)
-{
-   std::vector<ossimNitfTagFactory*>::iterator iter =
-      std::find(theFactoryList.begin(),
-                theFactoryList.end(),
-                aFactory);
-   if(iter != theFactoryList.end())
-   {
-      theFactoryList.erase(iter);
-   }
-}
-
-ossimNitfTagFactoryRegistry* ossimNitfTagFactoryRegistry::instance()
-{
-   if(theInstance)
-   {
-      return theInstance;
-   }
-   else
-   {
-      theInstance = new ossimNitfTagFactoryRegistry;
-      theInstance->initializeDefaults();
-   }
-   
-   return theInstance;
-}
-
-ossimRefPtr<ossimNitfRegisteredTag> ossimNitfTagFactoryRegistry::create(const ossimString &tagName)const
-{
-   std::vector<ossimNitfTagFactory*>::const_iterator factory;
-   ossimRefPtr<ossimNitfRegisteredTag> result = NULL;
-
-   factory = theFactoryList.begin();
-   while(factory != theFactoryList.end())
-   {
-      result = (*factory)->create(tagName);
-
-      if(result.valid())
-      {
-         return result;
-      }
-      ++factory;
-   }
-
-   ossimRefPtr<ossimNitfRegisteredTag> tag = new ossimNitfUnknownTag;
-   return tag;
-}
-
-void ossimNitfTagFactoryRegistry::initializeDefaults()
-{
-   theFactoryList.push_back(ossimNitfRegisteredTagFactory::instance());
-   theFactoryList.push_back(ossimNitfRpfTagFactory::instance());
-}
-
-bool ossimNitfTagFactoryRegistry::exists(ossimNitfTagFactory* factory)const
-{
-   std::vector<ossimNitfTagFactory*>::const_iterator iter = std::find(theFactoryList.begin(),
-                                                                      theFactoryList.end(),
-                                                                      factory);
-
-   return (iter != theFactoryList.end());
-   
-}
-
-ossimNitfTagFactoryRegistry::ossimNitfTagFactoryRegistry(
-   const ossimNitfTagFactoryRegistry&)
-{
-}
-
-const ossimNitfTagFactoryRegistry& ossimNitfTagFactoryRegistry::operator=(
-   const ossimNitfTagFactoryRegistry&)
-{
-   return *this;
-}
diff --git a/src/ossim/support_data/ossimNitfTagInformation.cpp b/src/ossim/support_data/ossimNitfTagInformation.cpp
deleted file mode 100644
index d707216..0000000
--- a/src/ossim/support_data/ossimNitfTagInformation.cpp
+++ /dev/null
@@ -1,190 +0,0 @@
-//*******************************************************************
-//
-// LICENSE: LGPL  see top level LICENSE.txt
-//
-// Author: Garrett Potts
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfTagInformation.cpp 22013 2012-12-19 17:37:20Z dburken $
-
-#include <ossim/support_data/ossimNitfTagInformation.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/support_data/ossimNitfTagFactoryRegistry.h>
-#include <ossim/support_data/ossimNitfUnknownTag.h>
-#include <sstream>
-#include <iomanip>
-#include <cstring> // for memset
-
-ossimNitfTagInformation::ossimNitfTagInformation(ossimRefPtr<ossimNitfRegisteredTag> tagData)
-{
-   clearFields();
-   setTagData(tagData);
-}
-
-ossimNitfTagInformation::~ossimNitfTagInformation()
-{
-}
-
-void ossimNitfTagInformation::parseStream(std::istream &in)
-{
-   if(in)
-   {
-      theTagOffset = in.tellg();
-      in.read(theTagName, 6);
-      in.read(theTagLength, 5);
-      theTagDataOffset = in.tellg();
-
-      theTagData = ossimNitfTagFactoryRegistry::instance()->create(getTagName());
-
-      if (theTagData.valid())
-      {
-         if (theTagData->getClassName() == "ossimNitfUnknownTag")
-         {
-            // Unknown tag doesn't know his tag name yet.
-            theTagData->setTagName( getTagName() );
-         }
-
-         //---
-         // Tags with dynamic tag length construct with 0 length.
-         // Set if 0.
-         //---
-         if ( theTagData->getTagLength() == 0 )
-         {
-            theTagData->setTagLength( getTagLength() );
-         }
-         // Sanity check fixed length in code with length from CEL field:
-         else if ( theTagData->getTagLength() != getTagLength() )
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "ossimNitfTagInformation::parseStream WARNING!"
-               << "\nCEL field length does not match fixed tag length for tag: "
-               << theTagData->getTagName().c_str()
-               << "\nCEL: " << getTagLength()
-               << "\nTag: " << theTagData->getTagLength()
-               << std::endl;
-         }
-                               
-         theTagData->parseStream(in);
-      }
-      else
-      {
-         theTagData = (ossimNitfRegisteredTag*)NULL;
-      }
-   }
-}
-
-void ossimNitfTagInformation::writeStream(std::ostream &out)
-{
-   theTagOffset = out.tellp(); // Capture the offset.
-   out.write(theTagName, 6);
-   out.write(theTagLength, 5);
-   if(theTagData.valid())
-   {
-      theTagDataOffset = out.tellp();
-      theTagData->writeStream(out);
-   }
-}
-
-ossim_uint32 ossimNitfTagInformation::getTotalTagLength()const
-{
-   return (getTagLength() + (ossim_uint32)11);
-}
-
-ossim_uint32 ossimNitfTagInformation::getTagLength()const
-{
-   return ossimString(theTagLength).toUInt32();
-}
-
-ossim_uint64 ossimNitfTagInformation::getTagOffset()const
-{
-   return theTagOffset;
-}
-
-ossim_uint64 ossimNitfTagInformation::getTagDataOffset()const
-{
-   return theTagDataOffset;
-}
-
-ossimString ossimNitfTagInformation::getTagName()const
-{
-   return ossimString(theTagName).trim();
-}
-
-std::ostream& ossimNitfTagInformation::print(std::ostream& out)const
-{
-   out << "theTagName:          " << theTagName
-       << "\ntheTagLength:        " << theTagLength
-       << "\ntheTagOffset:        " << theTagOffset
-       << "\ntheTagDataOffset:    " << theTagDataOffset
-       << std::endl;
-
-   return out;
-}
-
-void ossimNitfTagInformation::clearFields()
-{
-   memset(theTagName, ' ', 6);
-   memset(theTagLength, '0', 5);
-
-   theTagName[6]    = '\0';
-   theTagLength[5]  = '\0';
-   
-   theTagOffset     = 0;
-   theTagDataOffset = 0;
-}
-
-void ossimNitfTagInformation::setTagName(const ossimString& tagName)
-{
-   memset(theTagName, ' ', 6);
-
-   std::ostringstream out;
-
-   out << std::setw(6)
-       << std::setfill(' ')
-       << tagName;
-   memcpy(theTagName, out.str().c_str(), 6);
-}
-
-void ossimNitfTagInformation::setTagLength(ossim_uint32 tagLength)
-{
-   memset(theTagLength, '0', 5);
-   
-   if(tagLength > 99999)
-   {
-      tagLength = 99999;
-   }
-
-   std::ostringstream out;
-
-   out << std::setw(5)
-       << std::setfill('0')
-       << tagLength;
-   
-   memcpy(theTagLength, out.str().c_str(), 5);
-}
-
-ossimRefPtr<ossimNitfRegisteredTag> ossimNitfTagInformation::getTagData()
-{
-   return theTagData;
-}
-
-const ossimRefPtr<ossimNitfRegisteredTag> ossimNitfTagInformation::getTagData()const
-{
-   return theTagData;
-}
-
-void ossimNitfTagInformation::setTagData(ossimRefPtr<ossimNitfRegisteredTag> tagData)
-{
-   theTagData = tagData;
-
-   memset(theTagName, ' ', 6);
-   memset(theTagLength, ' ', 5);
-   
-   if(theTagData.valid())
-   {
-      setTagName(theTagData->getRegisterTagName());
-      setTagLength(theTagData->getSizeInBytes());
-   }
-}
diff --git a/src/ossim/support_data/ossimNitfUnknownTag.cpp b/src/ossim/support_data/ossimNitfUnknownTag.cpp
deleted file mode 100644
index 7061810..0000000
--- a/src/ossim/support_data/ossimNitfUnknownTag.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Unknown tag class declaration.
-//
-// Note: By "unknown" this means that the tag name was not found in any of
-// the tag factories.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimNitfUnknownTag.cpp 22013 2012-12-19 17:37:20Z dburken $
-
-#include <ostream>
-#include <iomanip>
-#include <cctype> /* for isascii */
-
-#include <ossim/support_data/ossimNitfUnknownTag.h>
-#include <ossim/support_data/ossimNitfCommon.h>
-
-RTTI_DEF1(ossimNitfUnknownTag, "ossimNitfUnknownTag", ossimNitfRegisteredTag);
-
-ossimNitfUnknownTag::ossimNitfUnknownTag()
-   : m_tagData(0)
-{
-}
-
-ossimNitfUnknownTag::~ossimNitfUnknownTag()
-{
-   if (m_tagData)
-   {
-      delete [] m_tagData;
-      m_tagData = 0;
-   }
-}
-
-void ossimNitfUnknownTag::parseStream(std::istream& in)
-{
-   if (m_tagLength)
-   {
-      if (m_tagData)
-      {
-         delete [] m_tagData;
-      }
-
-      m_tagData = new char[m_tagLength+1];
-      
-      in.read(m_tagData, m_tagLength);
-
-      m_tagData[m_tagLength] = '\0';
-   }
-}
-
-void ossimNitfUnknownTag::writeStream(std::ostream& out)
-{
-   if (m_tagLength && m_tagData)
-   {
-      out.write(m_tagData, m_tagLength);
-   }
-}
-
-void ossimNitfUnknownTag::clearFields()
-{
-   if (m_tagData)
-   {
-      delete [] m_tagData;
-      m_tagData = 0;
-   }
-}
-
-std::ostream& ossimNitfUnknownTag::print(std::ostream& out,
-                                         const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += getTagName();
-   pfx += ".";
-
-   out << setiosflags(std::ios::left)
-       << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n"
-       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
-       << pfx << std::setw(24) << "unformatted_tag_data: ";
-   
-   if (tagDataIsAscii())
-   {
-      out << m_tagData << "\n";
-   }
-   else
-   {
-      out << "binary not displayed\n";
-   }
-   
-   return out;
-}
-
-void ossimNitfUnknownTag::setTagLength(ossim_uint32 length)
-{
-   if (m_tagData)
-   {
-      delete [] m_tagData;
-      m_tagData = 0;
-   }
-   m_tagLength = length;
-}
-
-bool ossimNitfUnknownTag::tagDataIsAscii() const
-{
-   if ( (m_tagLength == 0) || !m_tagData )
-   {
-      return false;
-   }
-
-   for (ossim_uint32 i = 0; i < m_tagLength; ++i)
-   {
-      int c = m_tagData[i];
-      if (isascii(c) == false)
-      {
-         return false;
-      }
-   }
-
-   return true;
-}
diff --git a/src/ossim/support_data/ossimNitfUse00aTag.cpp b/src/ossim/support_data/ossimNitfUse00aTag.cpp
deleted file mode 100644
index cce55f9..0000000
--- a/src/ossim/support_data/ossimNitfUse00aTag.cpp
+++ /dev/null
@@ -1,539 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Walt Bunch
-//
-// Description: Nitf support class for USE00A -
-// Exploitation Usability extension.
-// 
-//********************************************************************
-// $Id: ossimNitfUse00aTag.cpp 22013 2012-12-19 17:37:20Z dburken $
-
-#include <iostream>
-#include <iomanip>
-#include <ossim/support_data/ossimNitfUse00aTag.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimCommon.h>
-
-RTTI_DEF1(ossimNitfUse00aTag, "ossimNitfUse00aTag", ossimNitfRegisteredTag);
-
-static const ossimString ANGLETONORTH_KW = "ANGLETONORTH";
-static const ossimString MEANGSD_KW = "MEANGSD";
-static const ossimString DYNAMICRANGE_KW = "DYNAMICRANGE";
-static const ossimString OBLANG_KW = "OBLANG";
-static const ossimString ROLLANG_KW = "ROLLANG";
-static const ossimString NREF_KW = "NREF";
-static const ossimString REVNUM_KW = "REVNUM";
-static const ossimString NSEG_KW = "NSEG";
-static const ossimString MAXLPSEG_KW = "MAXLPSEG";
-static const ossimString SUNEL_KW = "SUNEL";
-static const ossimString SUNAZ_KW = "SUNAZ";
-
-
-ossimNitfUse00aTag::ossimNitfUse00aTag()
-   : ossimNitfRegisteredTag(std::string("USE00A"), 107) 
-{
-   clearFields();
-}
-
-ossimNitfUse00aTag::~ossimNitfUse00aTag()
-{
-}
-
-void ossimNitfUse00aTag::parseStream(std::istream& in)
-{
-   clearFields();
-   
-   in.read(theAngleToNorth, ANGLE_TO_NORTH_SIZE);
-   in.read(theMeanGsd, MEAN_GSD_SIZE);
-   in.read(theField3, FIELD3_SIZE);
-   in.read(theDynamicRange, DYNAMIC_RANGE_SIZE);
-   in.read(theField5, FIELD5_SIZE);
-   in.read(theField6, FIELD6_SIZE);
-   in.read(theField7, FIELD7_SIZE);
-   in.read(theOblAng, OBL_ANG_SIZE);
-   in.read(theRollAng, ROLL_ANG_SIZE);
-   in.read(theField10, FIELD10_SIZE);
-   in.read(theField11, FIELD11_SIZE);
-   in.read(theField12, FIELD12_SIZE);
-   in.read(theField13, FIELD13_SIZE);
-   in.read(theField14, FIELD14_SIZE);
-   in.read(theField15, FIELD15_SIZE);
-   in.read(theField16, FIELD16_SIZE);
-   in.read(theNRef, N_REF_SIZE);
-   in.read(theRevNum, REV_NUM_SIZE);
-   in.read(theNSeg, N_SEG_SIZE);
-   in.read(theMaxLpSeg, MAX_LP_SEG_SIZE);
-   in.read(theField20, FIELD20_SIZE);
-   in.read(theField21, FIELD21_SIZE);
-   in.read(theSunEl, SUN_EL_SIZE);
-   in.read(theSunAz, SUN_AZ_SIZE);
-}
-
-void ossimNitfUse00aTag::writeStream(std::ostream& out)
-{
-   out.write(theAngleToNorth, ANGLE_TO_NORTH_SIZE);
-   out.write(theMeanGsd, MEAN_GSD_SIZE);
-   out.write(theField3, FIELD3_SIZE);
-   out.write(theDynamicRange, DYNAMIC_RANGE_SIZE);
-   out.write(theField5, FIELD5_SIZE);
-   out.write(theField6, FIELD6_SIZE);
-   out.write(theField7, FIELD7_SIZE);
-   out.write(theOblAng, OBL_ANG_SIZE);
-   out.write(theRollAng, ROLL_ANG_SIZE);
-   out.write(theField10, FIELD10_SIZE);
-   out.write(theField11, FIELD11_SIZE);
-   out.write(theField12, FIELD12_SIZE);
-   out.write(theField13, FIELD13_SIZE);
-   out.write(theField14, FIELD14_SIZE);
-   out.write(theField15, FIELD15_SIZE);
-   out.write(theField16, FIELD16_SIZE);
-   out.write(theNRef, N_REF_SIZE);
-   out.write(theRevNum, REV_NUM_SIZE);
-   out.write(theNSeg, N_SEG_SIZE);
-   out.write(theMaxLpSeg, MAX_LP_SEG_SIZE);
-   out.write(theField20, FIELD20_SIZE);
-   out.write(theField21, FIELD21_SIZE);
-   out.write(theSunEl, SUN_EL_SIZE);
-   out.write(theSunAz, SUN_AZ_SIZE);
-}
-
-void ossimNitfUse00aTag::clearFields()
-{
-   memset(theAngleToNorth, ' ', ANGLE_TO_NORTH_SIZE);
-   memset(theMeanGsd, ' ', MEAN_GSD_SIZE);
-   memset(theField3, ' ', FIELD3_SIZE);
-   memset(theDynamicRange, ' ', DYNAMIC_RANGE_SIZE);
-   memset(theField5, ' ', FIELD5_SIZE);
-   memset(theField6, ' ', FIELD6_SIZE);
-   memset(theField7, ' ', FIELD7_SIZE);
-   memset(theOblAng, ' ', OBL_ANG_SIZE);
-   memset(theRollAng, ' ', ROLL_ANG_SIZE);
-   memset(theField10, ' ', FIELD10_SIZE);
-   memset(theField11, ' ', FIELD11_SIZE);
-   memset(theField12, ' ', FIELD12_SIZE);
-   memset(theField13, ' ', FIELD13_SIZE);
-   memset(theField14, ' ', FIELD14_SIZE);
-   memset(theField15, ' ', FIELD15_SIZE);
-   memset(theField16, ' ', FIELD16_SIZE);
-   memset(theNRef, ' ', N_REF_SIZE);
-   memset(theRevNum, ' ', REV_NUM_SIZE);
-   memset(theNSeg, ' ', N_SEG_SIZE);
-   memset(theMaxLpSeg, ' ', MAX_LP_SEG_SIZE);
-   memset(theField20, ' ', FIELD20_SIZE);
-   memset(theField21, ' ', FIELD21_SIZE);
-   memset(theSunEl, ' ', SUN_EL_SIZE);
-   memset(theSunAz, ' ', SUN_AZ_SIZE);
-
-   theAngleToNorth[ANGLE_TO_NORTH_SIZE] = '\0';
-   theMeanGsd[MEAN_GSD_SIZE] = '\0';
-   theField3[FIELD3_SIZE] = '\0';
-   theDynamicRange[DYNAMIC_RANGE_SIZE] = '\0';
-   theField5[FIELD5_SIZE] = '\0';
-   theField6[FIELD6_SIZE] = '\0';
-   theField7[FIELD7_SIZE] = '\0';
-   theOblAng[OBL_ANG_SIZE] = '\0';
-   theRollAng[ROLL_ANG_SIZE] = '\0';
-   theField10[FIELD10_SIZE] = '\0';
-   theField11[FIELD11_SIZE] = '\0';
-   theField12[FIELD12_SIZE] = '\0';
-   theField13[FIELD13_SIZE] = '\0';
-   theField14[FIELD14_SIZE] = '\0';
-   theField15[FIELD15_SIZE] = '\0';
-   theField16[FIELD16_SIZE] = '\0';
-   theNRef[N_REF_SIZE] = '\0';
-   theRevNum[REV_NUM_SIZE] = '\0';
-   theNSeg[N_SEG_SIZE] = '\0';
-   theMaxLpSeg[MAX_LP_SEG_SIZE] = '\0';
-   theField20[FIELD20_SIZE] = '\0';
-   theField21[FIELD21_SIZE] = '\0';
-   theSunEl[SUN_EL_SIZE] = '\0';
-   theSunAz[SUN_AZ_SIZE] = '\0';
-}
-
-ossimString ossimNitfUse00aTag::getAngleToNorth()const
-{
-   return theAngleToNorth;
-}
-
-void ossimNitfUse00aTag::setAngleToNorth(const ossimString& angleToNorth)
-{
-   memset(theAngleToNorth, ' ', ANGLE_TO_NORTH_SIZE);
-   memcpy(theAngleToNorth, angleToNorth.c_str(), std::min((size_t)ANGLE_TO_NORTH_SIZE, angleToNorth.length()));
-}
-
-ossimString ossimNitfUse00aTag::getMeanGsd()const
-{
-   return theMeanGsd;
-}
-
-ossim_float64 ossimNitfUse00aTag::getMeanGsdInMeters() const
-{
-   ossim_float64 gsd = 0.0;
-   
-   ossimString s = theMeanGsd;
-   if (s.size())
-   {
-      ossim_float64 d = s.toFloat64();
-      if ( (d != 0.0) && (ossim::isnan(d) == false) )
-      {
-         gsd = d / 12.0 * MTRS_PER_FT;
-      }
-   }
-   
-   return gsd;
-}
-
-void ossimNitfUse00aTag::setMeanGsd(const ossimString& meanGsd)
-{
-   memset(theMeanGsd, ' ', MEAN_GSD_SIZE);
-   memcpy(theMeanGsd, meanGsd.c_str(), std::min((size_t)MEAN_GSD_SIZE, meanGsd.length()));
-}
-
-ossimString ossimNitfUse00aTag::getField3()const
-{
-   return theField3;
-}
-
-void ossimNitfUse00aTag::setField3(const ossimString& field3)
-{
-   memset(theField3, ' ', FIELD3_SIZE);
-   memcpy(theField3, field3.c_str(), std::min((size_t)FIELD3_SIZE, field3.length()));
-}
-
-ossimString ossimNitfUse00aTag::getDynamicRange()const
-{
-   return theDynamicRange;
-}
-
-void ossimNitfUse00aTag::setDynamicRange(const ossimString& dynamicRange)
-{
-   memset(theDynamicRange, ' ', DYNAMIC_RANGE_SIZE);
-   memcpy(theDynamicRange, dynamicRange.c_str(), std::min((size_t)DYNAMIC_RANGE_SIZE, dynamicRange.length()));
-}
-
-ossimString ossimNitfUse00aTag::getField5()const
-{
-   return theField5;
-}
-
-void ossimNitfUse00aTag::setField5(const ossimString& field5)
-{
-   memset(theField5, ' ', FIELD5_SIZE);
-   memcpy(theField5, field5.c_str(), std::min((size_t)FIELD5_SIZE, field5.length()));
-}
-
-ossimString ossimNitfUse00aTag::getField6()const
-{
-   return theField6;
-}
-
-void ossimNitfUse00aTag::setField6(const ossimString& field6)
-{
-   memset(theField6, ' ', FIELD6_SIZE);
-   memcpy(theField6, field6.c_str(), std::min((size_t)FIELD6_SIZE, field6.length()));
-}
-
-ossimString ossimNitfUse00aTag::getField7()const
-{
-   return theField7;
-}
-
-void ossimNitfUse00aTag::setField7(const ossimString& field7)
-{
-   memset(theField7, ' ', FIELD7_SIZE);
-   memcpy(theField7, field7.c_str(), std::min((size_t)FIELD7_SIZE, field7.length()));
-}
-
-ossimString ossimNitfUse00aTag::getOblAng()const
-{
-   return theOblAng;
-}
-
-void ossimNitfUse00aTag::setOblAng(const ossimString& oblAng)
-{
-   memset(theOblAng, ' ', OBL_ANG_SIZE);
-   memcpy(theOblAng, oblAng.c_str(), std::min((size_t)OBL_ANG_SIZE, oblAng.length()));
-}
-
-ossimString ossimNitfUse00aTag::getRollAng()const
-{
-   return theRollAng;
-}
-
-void ossimNitfUse00aTag::setRollAng(const ossimString& rollAng)
-{
-   memset(theRollAng, ' ', ROLL_ANG_SIZE);
-   memcpy(theRollAng, rollAng.c_str(), std::min((size_t)ROLL_ANG_SIZE, rollAng.length()));
-}
-
-ossimString ossimNitfUse00aTag::getField10()const
-{
-   return theField10;
-}
-
-void ossimNitfUse00aTag::setField10(const ossimString& field10)
-{
-   memset(theField10, ' ', FIELD10_SIZE);
-   memcpy(theField10, field10.c_str(), std::min((size_t)FIELD10_SIZE, field10.length()));
-}
-
-ossimString ossimNitfUse00aTag::getField11()const
-{
-   return theField11;
-}
-
-void ossimNitfUse00aTag::setField11(const ossimString& field11)
-{
-   memset(theField11, ' ', FIELD11_SIZE);
-   memcpy(theField11, field11.c_str(), std::min((size_t)FIELD11_SIZE, field11.length()));
-}
-
-ossimString ossimNitfUse00aTag::getField12()const
-{
-   return theField12;
-}
-
-void ossimNitfUse00aTag::setField12(const ossimString& field12)
-{
-   memset(theField12, ' ', FIELD12_SIZE);
-   memcpy(theField12, field12.c_str(), std::min((size_t)FIELD12_SIZE, field12.length()));
-}
-
-ossimString ossimNitfUse00aTag::getField13()const
-{
-   return theField13;
-}
-
-void ossimNitfUse00aTag::setField13(const ossimString& field13)
-{
-   memset(theField13, ' ', FIELD13_SIZE);
-   memcpy(theField13, field13.c_str(), std::min((size_t)FIELD13_SIZE, field13.length()));
-}
-
-ossimString ossimNitfUse00aTag::getField14()const
-{
-   return theField14;
-}
-
-void ossimNitfUse00aTag::setField14(const ossimString& field14)
-{
-   memset(theField14, ' ', FIELD14_SIZE);
-   memcpy(theField14, field14.c_str(), std::min((size_t)FIELD14_SIZE, field14.length()));
-}
-
-ossimString ossimNitfUse00aTag::getField15()const
-{
-   return theField15;
-}
-
-void ossimNitfUse00aTag::setField15(const ossimString& field15)
-{
-   memset(theField15, ' ', FIELD15_SIZE);
-   memcpy(theField15, field15.c_str(), std::min((size_t)FIELD15_SIZE, field15.length()));
-}
-
-ossimString ossimNitfUse00aTag::getField16()const
-{
-   return theField16;
-}
-
-void ossimNitfUse00aTag::setField16(const ossimString& field16)
-{
-   memset(theField16, ' ', FIELD16_SIZE);
-   memcpy(theField16, field16.c_str(), std::min((size_t)FIELD16_SIZE, field16.length()));
-}
-
-ossimString ossimNitfUse00aTag::getNRef()const
-{
-   return theNRef;
-}
-
-void ossimNitfUse00aTag::setNRef(const ossimString& nRef)
-{
-   memset(theNRef, ' ', N_REF_SIZE);
-   memcpy(theNRef, nRef.c_str(), std::min((size_t)N_REF_SIZE, nRef.length()));
-}
-
-ossimString ossimNitfUse00aTag::getRevNum()const
-{
-   return theRevNum;
-}
-
-void ossimNitfUse00aTag::setRevNum(const ossimString& revNum)
-{
-   memset(theRevNum, ' ', REV_NUM_SIZE);
-   memcpy(theRevNum, revNum.c_str(), std::min((size_t)REV_NUM_SIZE, revNum.length()));
-}
-
-ossimString ossimNitfUse00aTag::getNSeg()const
-{
-   return theNSeg;
-}
-
-void ossimNitfUse00aTag::setNSeg(const ossimString& nSeg)
-{
-   memset(theNSeg, ' ', N_SEG_SIZE);
-   memcpy(theNSeg, nSeg.c_str(), std::min((size_t)N_SEG_SIZE, nSeg.length()));
-}
-
-ossimString ossimNitfUse00aTag::getMaxLpSeg()const
-{
-   return theMaxLpSeg;
-}
-
-void ossimNitfUse00aTag::setMaxLpSeg(const ossimString& maxLpSeg)
-{
-   memset(theMaxLpSeg, ' ', MAX_LP_SEG_SIZE);
-   memcpy(theMaxLpSeg, maxLpSeg.c_str(), std::min((size_t)MAX_LP_SEG_SIZE, maxLpSeg.length()));
-}
-
-ossimString ossimNitfUse00aTag::getField20()const
-{
-   return theField20;
-}
-
-void ossimNitfUse00aTag::setField20(const ossimString& field20)
-{
-   memset(theField20, ' ', FIELD20_SIZE);
-   memcpy(theField20, field20.c_str(), std::min((size_t)FIELD20_SIZE, field20.length()));
-}
-
-ossimString ossimNitfUse00aTag::getField21()const
-{
-   return theField21;
-}
-
-void ossimNitfUse00aTag::setField21(const ossimString& field21)
-{
-   memset(theField21, ' ', FIELD21_SIZE);
-   memcpy(theField21, field21.c_str(), std::min((size_t)FIELD21_SIZE, field21.length()));
-}
-
-ossimString ossimNitfUse00aTag::getSunEl()const
-{
-   return theSunEl;
-}
-
-void ossimNitfUse00aTag::setSunEl(const ossimString& sunEl)
-{
-   memset(theSunEl, ' ', SUN_EL_SIZE);
-   memcpy(theSunEl, sunEl.c_str(), std::min((size_t)SUN_EL_SIZE, sunEl.length()));
-}
-
-ossimString ossimNitfUse00aTag::getSunAz()const
-{
-   return theSunAz;
-}
-
-void ossimNitfUse00aTag::setSunAz(const ossimString& sunAz)
-{
-   memset(theSunAz, ' ', SUN_AZ_SIZE);
-   memcpy(theSunAz, sunAz.c_str(), std::min((size_t)SUN_AZ_SIZE, sunAz.length()));
-}
-
-std::ostream& ossimNitfUse00aTag::print(std::ostream& out,
-                                        const std::string& prefix) const
-{
-   std::string pfx = prefix;
-   pfx += getTagName();
-   pfx += ".";
-
-   out << setiosflags(std::ios::left)
-       << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n"
-       << pfx << std::setw(24) << "CEL:"   << getTagLength() << "\n"
-       << pfx << std::setw(24) << "ANGLETONORTH:" << theAngleToNorth << "\n" 
-       << pfx << std::setw(24) << "MEANGSD:"      << theMeanGsd << "\n"
-       << pfx << std::setw(24) << "DYNAMICRANGE:" << theDynamicRange << "\n"
-       << pfx << std::setw(24) << "OBLANG:"       << theOblAng << "\n"
-       << pfx << std::setw(24) << "ROLLANG:"      << theRollAng << "\n"
-       << pfx << std::setw(24) << "NREF:"         << theNRef << "\n"
-       << pfx << std::setw(24) << "REVNUM:"       << theRevNum << "\n"
-       << pfx << std::setw(24) << "NSEG:"         << theNSeg << "\n"
-       << pfx << std::setw(24) << "MAXLPSEG:"     << theMaxLpSeg << "\n"
-       << pfx << std::setw(24) << "SUNEL:"        << theSunEl << "\n"
-       << pfx << std::setw(24) << "SUNAZ:"        << theSunAz << "\n";
-
-   return out; 
-}
-   
-void ossimNitfUse00aTag::setProperty(ossimRefPtr<ossimProperty> property)
-{
-   ossimNitfRegisteredTag::setProperty(property);
-}
-
-ossimRefPtr<ossimProperty> ossimNitfUse00aTag::getProperty(const ossimString& name)const
-{
-   ossimProperty* result = 0;
-
-   if(name == ANGLETONORTH_KW)
-   {
-      result = new ossimStringProperty(name, theAngleToNorth);
-   }
-   else if(name == MEANGSD_KW)
-   {
-      result = new ossimStringProperty(name, theMeanGsd);
-   }
-   else if(name == DYNAMICRANGE_KW)
-   {
-      result = new ossimStringProperty(name, theDynamicRange);
-   }
-   else if(name == OBLANG_KW)
-   {
-      result = new ossimStringProperty(name, theOblAng);
-   }
-   else if(name == ROLLANG_KW)
-   {
-      result = new ossimStringProperty(name, theRollAng);
-   }
-   else if(name == NREF_KW)
-   {
-      result = new ossimStringProperty(name, theNRef);
-   }
-   else if(name == REVNUM_KW)
-   {
-      result = new ossimStringProperty(name, theRevNum);
-   }
-   else if(name == NSEG_KW)
-   {
-      result = new ossimStringProperty(name, theNSeg);
-   }
-   else if(name == MAXLPSEG_KW)
-   {
-      result = new ossimStringProperty(name, theMaxLpSeg);
-   }
-   else if(name == SUNEL_KW)
-   {
-      result = new ossimStringProperty(name, theSunEl);
-   }
-   else if(name == SUNAZ_KW)
-   {
-      result = new ossimStringProperty(name, theSunAz);
-   }
-   else
-   {
-      return ossimNitfRegisteredTag::getProperty(name);
-   }
-
-   return result;
-}
-
-void ossimNitfUse00aTag::getPropertyNames(std::vector<ossimString>& propertyNames)const
-{
-   ossimNitfRegisteredTag::getPropertyNames(propertyNames);
-
-   propertyNames.push_back(ANGLETONORTH_KW);
-   propertyNames.push_back(MEANGSD_KW);
-   propertyNames.push_back(DYNAMICRANGE_KW);
-   propertyNames.push_back(OBLANG_KW);
-   propertyNames.push_back(ROLLANG_KW);
-   propertyNames.push_back(NREF_KW);
-   propertyNames.push_back(REVNUM_KW);
-   propertyNames.push_back(NSEG_KW);
-   propertyNames.push_back(MAXLPSEG_KW);
-   propertyNames.push_back(SUNEL_KW);
-   propertyNames.push_back(SUNAZ_KW);
-}
diff --git a/src/ossim/support_data/ossimNitfVqCompressionHeader.cpp b/src/ossim/support_data/ossimNitfVqCompressionHeader.cpp
deleted file mode 100644
index 68f30c1..0000000
--- a/src/ossim/support_data/ossimNitfVqCompressionHeader.cpp
+++ /dev/null
@@ -1,349 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2004 Garrett Potts
-//
-// LICENSE: LGPL see top level LICENSE.txt for more details
-// 
-// Author: Garrett Potts
-// Description: Nitf support class
-// 
-//********************************************************************
-// $Id: ossimNitfVqCompressionHeader.cpp 19682 2011-05-31 14:21:20Z dburken $
-
-#include <iostream>
-#include <sstream>
-#include <iomanip>
-
-#include <ossim/support_data/ossimNitfVqCompressionHeader.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimKeywordlist.h>
-
-RTTI_DEF1(ossimNitfVqCompressionHeader, "ossimNitfVqCompressionHeader", ossimNitfCompressionHeader);
-
-#if 0
-std::ostream& operator<<(std::ostream& out,
-                         const ossimNitfVqCompressionOffsetTableData& data)
-{
-   out << "theTableId:                              " << data.theTableId << std::endl
-       << "theNumberOfCompressionLookupRecords:     " << data.theNumberOfCompressionLookupRecords << std::endl
-       << "theNumberOfValuesPerCompressionLookup:   " << data.theNumberOfValuesPerCompressionLookup << std::endl
-       << "theCompressionLookupValueBitLength:      " << data.theCompressionLookupValueBitLength<< std::endl
-       << "theCompressionLookupTableOffset:         " << data.theCompressionLookupTableOffset;
-
-   return out;
-}
-#endif
-
-
-ossimNitfVqCompressionOffsetTableData::ossimNitfVqCompressionOffsetTableData()
-      :theData(NULL)
-{
-   clearFields();
-}
-
-ossimNitfVqCompressionOffsetTableData::ossimNitfVqCompressionOffsetTableData(const ossimNitfVqCompressionOffsetTableData& rhs)
-      :theTableId(rhs.theTableId),
-       theNumberOfCompressionLookupRecords(rhs.theNumberOfCompressionLookupRecords),
-       theNumberOfValuesPerCompressionLookup(rhs.theNumberOfValuesPerCompressionLookup),
-       theCompressionLookupValueBitLength(rhs.theCompressionLookupValueBitLength),
-       theCompressionLookupTableOffset(rhs.theCompressionLookupTableOffset),
-       theData(NULL)
-
-{
-   ossim_uint32 size = (theNumberOfValuesPerCompressionLookup*
-                        theNumberOfCompressionLookupRecords*
-                        theCompressionLookupValueBitLength)/8;
-   if(size > 0)
-   {
-      theData = new unsigned char[size];
-      if(rhs.theData)
-      {
-         memcpy(theData, rhs.theData, size);
-      }
-   }
-}
-
-ossimNitfVqCompressionOffsetTableData::~ossimNitfVqCompressionOffsetTableData()
-{
-   if(theData)
-   {
-      delete [] theData;
-      theData = NULL;
-   }
-}
-
-const ossimNitfVqCompressionOffsetTableData& ossimNitfVqCompressionOffsetTableData::operator =(const ossimNitfVqCompressionOffsetTableData& rhs)
-{
-   if(this != &rhs)
-   {
-      if(theData)
-      {
-         delete [] theData;
-         theData = NULL;
-      }
-
-      theTableId                            = rhs.theTableId;
-      theNumberOfCompressionLookupRecords   = rhs.theNumberOfCompressionLookupRecords;
-      theCompressionLookupValueBitLength    = rhs.theCompressionLookupValueBitLength;
-      theNumberOfValuesPerCompressionLookup = rhs.theNumberOfValuesPerCompressionLookup;
-      theCompressionLookupTableOffset       = rhs.theCompressionLookupTableOffset;
-      
-      if(rhs.theData)
-      {
-         ossim_uint32 size = (theNumberOfValuesPerCompressionLookup*
-                              theNumberOfCompressionLookupRecords*
-                              theCompressionLookupValueBitLength)/8;
-         if(size > 0)
-         {
-            theData = new unsigned char[size];
-            memcpy(theData, rhs.theData, size);
-         }
-      }
-   }
-   
-   return *this;
-   
-}
-ossim_uint32 ossimNitfVqCompressionOffsetTableData::getDataLengthInBytes()const
-{
-   return (theNumberOfValuesPerCompressionLookup*
-           theNumberOfCompressionLookupRecords*
-           theCompressionLookupValueBitLength)/8;
-}
-
-void ossimNitfVqCompressionOffsetTableData::parseStream(std::istream& in)
-{
-   ossimEndian endian;
-   in.read((char*)(&theTableId), 2);
-   in.read((char*)(&theNumberOfCompressionLookupRecords),4);
-   in.read((char*)(&theNumberOfValuesPerCompressionLookup), 2);
-   in.read((char*)(&theCompressionLookupValueBitLength),2);
-   in.read((char*)(&theCompressionLookupTableOffset), 4);
-
-   if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
-   {
-      endian.swap(theTableId);
-      endian.swap(theNumberOfCompressionLookupRecords);
-      endian.swap(theNumberOfValuesPerCompressionLookup);
-      endian.swap(theCompressionLookupValueBitLength);
-      endian.swap(theCompressionLookupTableOffset);
-   }
-}
-
-void ossimNitfVqCompressionOffsetTableData::clearFields()
-{
-   theTableId = 0;
-   theNumberOfCompressionLookupRecords = 0;
-   theNumberOfValuesPerCompressionLookup = 0;
-   theCompressionLookupValueBitLength = 0;
-   theCompressionLookupTableOffset = 0;
-
-   if(theData)
-   {
-      delete [] theData;
-      theData = NULL;
-   }
-}
-
-ossimNitfVqCompressionHeader::ossimNitfVqCompressionHeader()
-{
-   clearFields();
-}
-
-void ossimNitfVqCompressionHeader::parseStream(std::istream &in)
-{
-   ossimEndian endian;
-
-   in.read((char*)(&theNumberOfImageRows), 4);
-   in.read((char*)(&theNumberOfImageCodesPerRow), 4);
-   in.read((char*)(&theImageCodeBitLength), 1);
-   in.read((char*)(&theCompressionAlgorithmId), 2);
-
-   in.read((char*)(&theNumberOfCompressionLookupOffsetRecords), 2);
-   in.read((char*)(&theNumberOfCompressionParameterOffsetRecords), 2);
-   in.read((char*)(&theCompressionLookupOffsetTableOffset), 4);
-   in.read((char*)(&theCompressionLookupTableOffsetRecordLength), 2);
-   
-   if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
-   {
-      endian.swap(theNumberOfImageRows);
-      endian.swap(theNumberOfImageCodesPerRow);
-      endian.swap(theCompressionAlgorithmId);
-      endian.swap(theNumberOfCompressionLookupOffsetRecords);
-      endian.swap(theNumberOfCompressionParameterOffsetRecords);
-      endian.swap(theCompressionLookupOffsetTableOffset);
-      endian.swap(theCompressionLookupTableOffsetRecordLength);
-   }
-   
-   if((theNumberOfCompressionLookupOffsetRecords > 0)&&
-      (theCompressionAlgorithmId == 1)) 
-   {
-      theTable.clear();
-      theTable.resize(theNumberOfCompressionLookupOffsetRecords);
-
-      ossim_uint32 idx = 0;
-
-      for(idx = 0; idx < theNumberOfCompressionLookupOffsetRecords; ++idx)
-      {
-         theTable[idx].parseStream(in);
-      }
-      for(idx = 0; idx < theTable.size(); ++idx)
-      {
-         if(theTable[idx].theData)
-         {
-            delete [] theTable[idx].theData;
-            theTable[idx].theData = 0;
-         }
-         if(theTable[idx].getDataLengthInBytes()>0)
-         {
-            theTable[idx].theData = new ossim_uint8[theTable[idx].getDataLengthInBytes()];
-            in.read((char*)(theTable[idx].theData), theTable[idx].getDataLengthInBytes());
-         }
-      }
-   }
-}
-
-std::ostream& ossimNitfVqCompressionHeader::print(std::ostream& out) const
-{
-   return this->print(out, std::string(""));
-}
-
-std::ostream& ossimNitfVqCompressionHeader::print(
-   std::ostream& out, const std::string& prefix ) const
-{
-   std::string pfx = prefix;
-   pfx += "vq_header.";
-
-   out << std::setiosflags(std::ios::left)
-       << pfx << std::setw(24) << "image_rows:"
-       << theNumberOfImageRows << "\n"
-       << pfx << std::setw(24) << "codes_per_row:"
-       << theNumberOfImageCodesPerRow << "\n"
-       << pfx << std::setw(24) << "codebit_length:"
-       << (ossim_uint32)theImageCodeBitLength << "\n"
-       << pfx << std::setw(24) << "algorithm_id:"
-       << theCompressionAlgorithmId << "\n"
-       << pfx << std::setw(24)
-       << "offset_records:"
-       << theNumberOfCompressionLookupOffsetRecords << "\n"
-       << pfx << std::setw(24)
-       << "offset_record_length:"
-       << theCompressionLookupTableOffsetRecordLength << "\n";
-
-   if(theTable.size() > 0)
-   {
-      for(ossim_uint32 idx = 0; idx < theTable.size()-1; ++idx)
-      {
-         std::string tblPfx = pfx;
-         tblPfx += "table";
-         tblPfx += ossimString::toString(idx).string();
-         tblPfx += ".";
-
-         out << tblPfx << std::setw(24) << "id:"
-             << theTable[idx].theTableId << "\n"
-             << tblPfx << std::setw(24) << "lookup_records:"
-             << theTable[idx].theNumberOfCompressionLookupRecords << "\n"
-             << tblPfx << std::setw(24) << "values_per_lookup:"
-             << theTable[idx].theNumberOfValuesPerCompressionLookup << "\n"
-             << tblPfx << std::setw(24) << "lookup_bit_length:"
-             << theTable[idx].theCompressionLookupValueBitLength << "\n"
-             << tblPfx << std::setw(24) << "lookup_table_offset:"
-             << theTable[idx].theCompressionLookupTableOffset << "\n";
-      }
-
-   }
-
-   return out;
-}
-
-bool ossimNitfVqCompressionHeader::saveState(ossimKeywordlist& kwl, const ossimString& prefix)const
-{
-   bool result = ossimNitfCompressionHeader::saveState(kwl, prefix);
-   
-   if(result)
-   {
-      std::ostringstream out;
-      
-      out << std::setiosflags(std::ios::left)
-      << "image_rows:" << theNumberOfImageRows << "\n"
-      << "codes_per_row:" << theNumberOfImageCodesPerRow << "\n"
-      << "codebit_length:" << (ossim_uint32)theImageCodeBitLength << "\n"
-      << "algorithm_id:" << theCompressionAlgorithmId << "\n"
-      << "offset_records:" << theNumberOfCompressionLookupOffsetRecords << "\n"
-      << "offset_record_length:" << theCompressionLookupTableOffsetRecordLength << "\n";
-      
-      if(theTable.size() > 0)
-      {
-         for(ossim_uint32 idx = 0; idx < theTable.size()-1; ++idx)
-         {
-            std::string tblPfx = "table";
-            tblPfx += ossimString::toString(idx).string();
-            tblPfx += ".";
-            
-            out << tblPfx<< "id:"
-            << theTable[idx].theTableId << "\n"
-            << tblPfx << "lookup_records:"<< theTable[idx].theNumberOfCompressionLookupRecords << "\n"
-            << tblPfx <<"values_per_lookup:"<< theTable[idx].theNumberOfValuesPerCompressionLookup << "\n"
-            << tblPfx << "lookup_bit_length:"<< theTable[idx].theCompressionLookupValueBitLength << "\n"
-            << tblPfx << "lookup_table_offset:"<< theTable[idx].theCompressionLookupTableOffset << "\n";
-         }
-      }
-      ossimKeywordlist kwlTemp;
-      
-      std::istringstream in(out.str());
-      if(kwlTemp.parseStream(in))
-      {
-         kwl.add(prefix, kwlTemp);
-      }
-   }
-   
-   return result;
-}
-
-ossim_uint32 ossimNitfVqCompressionHeader::getBlockSizeInBytes()const
-{
-   return (getNumberOfImageRows()*
-           getNumberOfImageCodesPerRow()*
-           getImageCodeBitLength())/8;
-}
-
-ossim_uint32 ossimNitfVqCompressionHeader::getNumberOfImageRows()const
-{
-   return theNumberOfImageRows;
-}
-
-ossim_uint32 ossimNitfVqCompressionHeader::getNumberOfImageCodesPerRow()const
-{
-   return theNumberOfImageCodesPerRow;
-}
-
-ossim_uint32 ossimNitfVqCompressionHeader::getCompressionAlgorithmId()const
-{
-   return theCompressionAlgorithmId;
-}
-
-ossim_uint32 ossimNitfVqCompressionHeader::getImageCodeBitLength()const
-{
-   return theImageCodeBitLength;
-}
-
-ossim_uint32 ossimNitfVqCompressionHeader::getNumberOfTables()const
-{
-   return (ossim_uint32)theTable.size();
-}
-
-const std::vector<ossimNitfVqCompressionOffsetTableData>& ossimNitfVqCompressionHeader::getTable()const
-{
-   return theTable;
-}
-
-void ossimNitfVqCompressionHeader::clearFields()
-{
-   theNumberOfImageRows                        = 0;
-   theNumberOfImageCodesPerRow                 = 0;
-   theImageCodeBitLength                       = 0;
-   theCompressionAlgorithmId                   = 0;
-   theNumberOfCompressionLookupOffsetRecords   = 0;
-   theCompressionLookupTableOffsetRecordLength = 0;
-}
-
diff --git a/src/ossim/support_data/ossimNmeaMessage.cpp b/src/ossim/support_data/ossimNmeaMessage.cpp
deleted file mode 100644
index 47d6d4b..0000000
--- a/src/ossim/support_data/ossimNmeaMessage.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL See top level LICENSE.txt file.
-//
-// File: ossimNmeaMessage.h
-//
-// Author:  Garrett Potts
-//
-// Description: Contains a general parser for NMEA messages.
-//
-//
-// $Id$
-//----------------------------------------------------------------------------
-#include <ossim/support_data/ossimNmeaMessage.h>
-#include <ossim/base/ossimCommon.h>
-#include <iomanip>
-
-ossim_uint32 ossimNmeaMessage::checksum(std::string::const_iterator start, std::string::const_iterator end)
-{
-   ossim_uint32 sum = 0;
-   
-   while(start!=end&&((*start)!='*'))
-   {
-      sum ^= ((*start)%128);
-      ++start;
-   }
-   return sum;
-}
-
-void ossimNmeaMessage::setFields(std::string::const_iterator start, std::string::const_iterator end)
-{
-   m_fields.clear();
-   ossim_uint32 idx = 0;
-   while(start != end)
-   {
-      m_fields.push_back("");
-      
-      while((start!=end)&&
-            (*start!=','))
-      {
-         m_fields[idx]+=*start;
-         ++start;
-      }
-      
-      if(start!=end)
-      {
-         ++start;
-      }
-      ++idx;
-   }
-}
-
-bool ossimNmeaMessage::isValidStartChar(char c)const
-{
-   std::string::const_iterator iter = std::find(m_startChars.begin(), m_startChars.end(), c);
-   return (iter != m_startChars.end());
-}
-
-
-void ossimNmeaMessage::parseMessage(std::istream& in)throw(ossimException)
-{
-   ossim::skipws(in);
-   m_validCheckSum = false;
-   m_message = "";
-   if(!isValidStartChar(static_cast<char>(in.peek())))
-   {
-      throw ossimException(ossimString("Starting NMEA messsage indicator not found, expected one of ") +
-                           m_startChars + " but found " +
-                           ossimString((char)in.peek()));
-   }
-   
-   char c = static_cast<char>(in.get());
-   while(((c!='\n')&&(c!='\r'))&&
-         !in.eof()&&!in.bad()) 
-   {
-      m_message += c;
-      c = static_cast<char>(in.get());
-   }
-   std::string::iterator iter = std::find(m_message.begin(), m_message.end(), '*');
-   
-   if(iter != m_message.end())
-   {
-      setFields(m_message.begin()+1, m_message.end());
-      ossim_uint32 check = checksum(m_message.begin()+1, iter);
-      std::ostringstream out;
-      out << std::setw(2) << std::setfill('0') << std::hex << check;
-      std::string::iterator endChecksumIter = iter+1;
-      while((endChecksumIter!= m_message.end())&&(*endChecksumIter!=',')) ++endChecksumIter;
-      if(out.str() == ossimString(iter+1, endChecksumIter).downcase()) 
-      {
-         m_validCheckSum = true;
-      }
-   }
-   else
-   {
-      throw ossimException("Terminating * indicator for cbecksum not found in NMEA message format");
-   }
-}
diff --git a/src/ossim/support_data/ossimQuickbirdMetaData.cpp b/src/ossim/support_data/ossimQuickbirdMetaData.cpp
deleted file mode 100644
index 6a3934a..0000000
--- a/src/ossim/support_data/ossimQuickbirdMetaData.cpp
+++ /dev/null
@@ -1,818 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Description:
-// 
-// Class definition for ossimQuickbirdMetaData.
-// 
-// This class parses a Space Imaging Quickbird meta data file.
-//
-//********************************************************************
-// $Id: ossimQuickbirdMetaData.cpp 14431 2009-04-30 21:58:33Z dburken $
-
-#include <ossim/support_data/ossimQuickbirdMetaData.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimTrace.h>
-#include <cstdio>
-#include <iostream>
-
-
-RTTI_DEF1(ossimQuickbirdMetaData, "ossimQuickbirdMetaData", ossimObject);
- 
-// Define Trace flags for use within this file:
-static ossimTrace traceExec  ("ossimQuickbirdMetaData:exec");
-static ossimTrace traceDebug ("ossimQuickbirdMetaData:debug");
-
-ossimQuickbirdMetaData::ossimQuickbirdMetaData()
-   :
-   theGenerationDate("Unknown"),
-   theBandId("Unknown"),
-   theBitsPerPixel(0),
-   theSatID("Unknown"),
-   theTLCDate("Unknown"),
-   theSunAzimuth(0.0),
-   theSunElevation(0.0),
-   theSatAzimuth(0.0),
-   theSatElevation(0.0),
-   theTDILevel(0),
-   theAbsCalFactors(),
-   theBandNameList("Unknown"),
-   theImageSize()
-{
-   theImageSize.makeNan();
-   theAbsCalFactors.clear();
-}
-
-ossimQuickbirdMetaData::~ossimQuickbirdMetaData()
-{
-}
-
-bool ossimQuickbirdMetaData::open(const ossimFilename& imageFile)
-{
-   static const char MODULE[] = "ossimQuickbirdMetaData::open";
-
-   clearFields();
-
-   //retrieve information from the metadata file
-   //if the Quickbird tif is 02APR01105228-M1BS-000000128955_01_P001.TIF
-   //the metadata file will be 02APR01105228-M1BS-000000128955_01_P001.IMD
-
-   ossimFilename metadatafile = imageFile;
-   metadatafile.setExtension(ossimString("IMD"));
-
-   if( parseMetaData(metadatafile) == false )
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-	    << MODULE << " errors parsing metadata" << std::endl;
-      }
-      return false;
-   }
-
-   return true;
-}
-
-void ossimQuickbirdMetaData::clearFields()
-{
-   theGenerationDate = "Unknown";
-   theBitsPerPixel = 0;
-   theBandId = "Unknown";
-   theSatID = "Unknown";
-   theTLCDate = "Unknown";
-   theSunAzimuth = 0.0;
-   theSunElevation = 0.0;
-   theSatAzimuth = 0.0;
-   theSatElevation = 0.0;
-   theTDILevel = 0;
-   theAbsCalFactors.clear();
-   theBandNameList = "Unknown";
-   theImageSize.makeNan();
-}
-
-std::ostream& ossimQuickbirdMetaData::print(std::ostream& out) const
-{
-
-   out << "\n----------------- Info on Quickbird Image -------------------"
-       << "\n  "
-       << "\n  Generation date:    " << theGenerationDate
-       << "\n  Band Id:            " << theBandId
-       << "\n  Bits per pixel:     " << theBitsPerPixel
-       << "\n  Sat Id:             " << theSatID
-       << "\n  TLC date:           " << theTLCDate
-       << "\n  Sun Azimuth:        " << theSunAzimuth
-       << "\n  Sun Elevation:      " << theSunElevation
-       << "\n  Sat Azimuth:        " << theSatAzimuth
-       << "\n  Sat Elevation:      " << theSatElevation
-       << "\n  Band name list:     " << theBandNameList
-       << "\n  TDI Level:          " << theTDILevel
-       << "\n  abs Calibration Factors:   " 
-       << std::endl;
-   for(unsigned int i=0; i<theAbsCalFactors.size(); i++)
-   {
-      out<<theAbsCalFactors[i] << "   ";
-   }
-   out << "\n  Image Size:         " << theImageSize
-       << "n"
-       << "\n---------------------------------------------------------"
-       << "\n  " << std::endl;
-   return out;
-}
-
-bool ossimQuickbirdMetaData::saveState(ossimKeywordlist& kwl,
-				       const char* prefix)const
-{
-   kwl.add(prefix,
-           ossimKeywordNames::TYPE_KW,
-           "ossimQuickbirdMetaData",
-           true);
-
-   kwl.add(prefix,
-           "generation_date",
-           theGenerationDate,
-           true);
-
-   kwl.add(prefix,
-           "bits_per_pixel",
-           theBitsPerPixel,
-           true);
-
-   kwl.add(prefix,
-           "band_id",
-           theBandId,
-           true);
-
-   kwl.add(prefix,
-           "sat_id",
-           theSatID,
-           true);
-
-   kwl.add(prefix,
-           "tlc_date",
-           theTLCDate,
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::AZIMUTH_ANGLE_KW,
-           theSunAzimuth,
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::ELEVATION_ANGLE_KW,
-           theSunElevation,
-           true);
-
-   kwl.add(prefix,
-           "sat_azimuth_angle",
-           theSatAzimuth,
-           true);
-
-   kwl.add(prefix,
-           "sat_elevation_angle",
-           theSatElevation,
-           true);
-          
-   kwl.add(prefix,
-           "TDI_level",
-           theTDILevel,
-           true);
-   kwl.add(prefix,
-           "band_name_list",
-           theBandNameList,
-           true);
-
-   if( theBandId=="Multi" )
-   {
-      std::vector<ossimString> bandNameList = theBandNameList.split(" ");
-      for(unsigned int i = 0 ; i < bandNameList.size(); ++i)
-      {
-         kwl.add(prefix,
-                 bandNameList[i] + "_band_absCalFactor",
-                 theAbsCalFactors[i],
-                 true);
-      }
-   }
-   else if(!theAbsCalFactors.empty())
-   {
-      kwl.add(prefix,
-              "absCalFactor",
-              theAbsCalFactors[0],
-              true);  	
-   }
-
-   return true;
-}
-
-bool ossimQuickbirdMetaData::loadState(const ossimKeywordlist& kwl,
-				       const char* prefix)
-{
-   clearFields();
-
-   const char* lookup = 0;
-   ossimString s;
-  
-   lookup = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
-   if (lookup)
-   {
-      s = lookup;
-      if(s != "ossimQuickbirdMetaData")
-      {
-         return false;
-      }
-   }
-
-   lookup = kwl.find(prefix, "generation_date");
-   if (lookup)
-   {
-      theGenerationDate = lookup;
-   }
-
-   lookup = kwl.find(prefix, "band_id");
-   if (lookup)
-   {
-      theBandId = lookup;
-   }
-  
-   lookup = kwl.find(prefix, "bits_per_pixel");
-   if (lookup)
-   {
-      s = lookup;
-      theBitsPerPixel = s.toInt();;
-   }
-    
-   lookup = kwl.find(prefix, "sat_id");
-   if (lookup)
-   {
-      theSatID = lookup;
-   }
-
-   lookup = kwl.find(prefix, "tlc_date");
-   if (lookup)
-   {
-      theTLCDate= lookup;
-   }
-
-   lookup = kwl.find(prefix, "TDI_level");
-   if (lookup)
-   {
-      s = lookup;
-      theTDILevel = s.toInt();
-   }
-
-   lookup = kwl.find(prefix, ossimKeywordNames::AZIMUTH_ANGLE_KW);
-   if (lookup)
-   {
-      s = lookup;
-      theSunAzimuth = s.toFloat64();
-   }
-
-   lookup = kwl.find(prefix, ossimKeywordNames::ELEVATION_ANGLE_KW);
-   if (lookup)
-   {
-      s = lookup;
-      theSunElevation = s.toFloat64();
-   }
-
-   lookup = kwl.find(prefix, "sat_azimuth_angle");
-   if (lookup)
-   {
-      s = lookup;
-      theSatAzimuth = s.toFloat64();
-   }
-
-   lookup = kwl.find(prefix, "sat_elevation_angle");
-   if (lookup)
-   {
-      s = lookup;
-      theSatElevation = s.toFloat64();
-   }
-
-   lookup = kwl.find(prefix, "band_name_list");
-   if (lookup)
-   {
-      theBandNameList= lookup;
-   }
-
-   if(theBandId=="Multi")
-   {
-      std::vector<ossimString> bandNameList = theBandNameList.split(" ");
-      theAbsCalFactors = std::vector<double>(bandNameList.size(), 1.);
-      for(unsigned int i = 0 ; i < bandNameList.size() ; ++i)
-      {
-         lookup = kwl.find(prefix, bandNameList[i] + "_band_absCalFactor");
-         if (lookup)
-         {
-            s = lookup;
-            theAbsCalFactors[i] = s.toDouble();
-         }
-      }
-   }
-   else if (theBandId=="P")
-   {
-      theAbsCalFactors = std::vector<double>(1, 1.);
-      lookup = kwl.find(prefix, "absCalFactor");
-      if (lookup)
-      {
-         s = lookup;
-         theAbsCalFactors[0] = s.toDouble();
-      }	
-   }
-   return true;
-}
-
-//*****************************************************************************
-// PROTECTED METHOD: ossimQuickbirdMetaData::parseMetaData()
-//
-//  Parses the Quickbird IMD file.
-//
-//*****************************************************************************
-bool ossimQuickbirdMetaData::parseMetaData(const ossimFilename& data_file)
-{
-   if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimQuickbirdMetaData::parseMetaData(data_file): entering..." << std::endl;
-   
-   if( !data_file.exists() )
-   {
-      if (traceExec()) ossimNotify(ossimNotifyLevel_WARN) << "ossimQuickbirdMetaData::parseMetaData(data_file) WARN:" << "\nmetadate data file <" << data_file << ">. " << "doesn't exist..." << std::endl;
-      return false;
-   }
-  
-
-   FILE* fptr = fopen (data_file, "r");
-   if (!fptr)
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-	    << "ossimQuickbirdRpcModel::parseMetaData(data_file) DEBUG:"
-	    << "\nCould not open Meta data file:  " << data_file
-	    << "\nreturning with error..." << std::endl;
-      }
-      return false;
-   }
-
-   char* strptr(NULL);
-
-   //---
-   // Read the file into a buffer:
-   //---
-   ossim_int32 fileSize = static_cast<ossim_int32>(data_file.fileSize());
-   char* filebuf = new char[fileSize];
-   fread(filebuf, 1, fileSize, fptr);
-   strptr = filebuf;
-   fclose(fptr);
-   ossimString temp;
-
-   //---
-   // Generation time:
-   //---
-  
-   if(getEndOfLine( strptr, ossimString("\ngenerationTime ="), "%17c %s", temp))
-      theGenerationDate = ossimString(temp).before(";");
-   else
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-	    << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
-	    << "\n\tAborting construction. Error encountered parsing "
-	    << "presumed meta-data file." << std::endl;
-
-         delete [] filebuf;
-         return false;
-      }
-   }
-
-   // Number of rows and columns in full image:
-   if(getEndOfLine( strptr, ossimString("\nnumRows ="), "%10c %s", temp))
-      theImageSize.line = ossimString(temp).before("\";").toInt();
-
-   if(getEndOfLine( strptr, ossimString("\nnumColumns ="), "%13c %s", temp))
-      theImageSize.samp = ossimString(temp).before("\";").toInt();
-
-   //---
-   // BandId:
-   //---
-   if(getEndOfLine( strptr, ossimString("\nbandId ="), "%9c %s", temp))
-      theBandId = ossimString(temp).after("\"").before("\";");
-   else
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-	    << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
-	    << "\n\tAborting construction. Error encountered parsing "
-	    << "presumed meta-data file." << std::endl;
-
-         delete [] filebuf;
-         return false;
-      }
-   }
-    
-  
-   //---
-   // BitsPerPixel:
-   //---
-   if(getEndOfLine( strptr, ossimString("\nbitsPerPixel = "), "%16c %s", temp))
-      theBitsPerPixel = ossimString(temp).before(";").toInt();
-   else
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-	    << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
-	    << "\n\tAborting construction. Error encountered parsing "
-	    << "presumed meta-data file." << std::endl;
-
-         delete [] filebuf;
-         return false;
-      }
-   }
-     
-   //---
-   // absCalFactors:
-   //---
-
-   char *iter = (char *)filebuf;
-   unsigned int nbBand = 0;
-   theBandNameList = "";
-   for(iter = strstr(iter, "BEGIN_GROUP = BAND_"); iter ; iter = strstr(iter, "BEGIN_GROUP = BAND_"))
-   {
-      ++nbBand;
-      char dummy[80], nameChar[80];
-      sscanf(iter, "%19c %s", dummy, nameChar);
-      ossimString bandCur = ossimString(nameChar).before("\n");
-      theBandNameList = theBandNameList + bandCur + " ";
-      ++iter;
-   }
-   theBandNameList.trim();
-   
-   //--- Multispectral
-   if(theBandId=="Multi")
-   {
-      std::vector<ossimString> bandList;
-      bandList = theBandNameList.split(" ");
-      theAbsCalFactors = std::vector<double>(bandList.size(), 1.);
-      for(unsigned int j=0; j<bandList.size(); j++)
-      {
-         ossimString begin_group = "BEGIN_GROUP = BAND_" + bandList[j];
-         strptr = strstr(filebuf, begin_group.c_str());
-         if(!strptr && traceDebug())
-         {	  				
-            ossimNotify(ossimNotifyLevel_FATAL)
-               << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
-               << "\n\tAborting construction. Error encountered parsing "
-               << "presumed meta-data file." << std::endl;
-            delete [] filebuf;
-            return false;
-         }
-         else
-         {
-            char dummy[80], nameChar[80];
-            sscanf(strptr, "%19c %s", dummy, nameChar);
-            ossimString bandCur = ossimString(nameChar).before("\n");
-            if(!strptr && traceDebug())
-            {	  				
-               ossimNotify(ossimNotifyLevel_FATAL)
-                  << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
-                  << "\n\tAborting construction. Error encountered parsing "
-                  << "presumed meta-data file." << std::endl;
-               delete [] filebuf;
-               return false;
-            }
-            else
-            {
-               if(bandList[j] == bandCur)
-               {
-                  strptr = strstr(strptr, "\tabsCalFactor = ");
-                  sscanf(strptr, "%16c %s", dummy, nameChar);
-                  theAbsCalFactors[j] = ossimString(nameChar).before(";").toDouble();
-               }
-            }
-         }
-      }
-   }
-   //--- Panchromatic
-   else
-   {
-      theAbsCalFactors = std::vector<double>(1, 1.);
-      if(getEndOfLine( strptr, ossimString("\tabsCalFactor = "), "%16c %s", temp))
-         theAbsCalFactors[0] = ossimString(temp).before(";").toDouble();
-      else
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_FATAL)
-               << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
-               << "\n\tAborting construction. Error encountered parsing "
-               << "presumed meta-data file." << std::endl;
-
-            delete [] filebuf;
-            return false;
-         }
-      }
-   }
-    
-   //---
-   // SatID:
-   //---
-   if(getEndOfLine( strptr, ossimString("\n\tsatId ="), "%9c %s", temp))
-      theSatID = ossimString(temp).after("\"").before("\";");
-   else
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-	    << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
-	    << "\n\tAborting construction. Error encountered parsing "
-	    << "presumed meta-data file." << std::endl;
-
-         delete [] filebuf;
-         return false;
-      }
-   }
-
-   //---
-   // TLCTime:
-   //---
-   if(getEndOfLine( strptr, ossimString("\n\tTLCTime ="), "%11c %s", temp))
-      theTLCDate = ossimString(temp).before("\";");
-   else
-   {
-      if(getEndOfLine( strptr, ossimString("\n\tfirstLineTime ="), "%17c %s", temp))
-         theTLCDate = ossimString(temp).before("\";");
-      else
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_FATAL)
-               << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
-               << "\n\tAborting construction. Error encountered parsing "
-               << "presumed meta-data file." << std::endl;
-            delete [] filebuf;
-            return false;
-         }
-      }
-   }
-   
-   //---
-   // Sun Azimuth:
-   //---
-   if(getEndOfLine( strptr, ossimString("\n\tsunAz ="), "%9c %s", temp))
-        theSunAzimuth = ossimString(temp).before(";").toFloat64();
-   else
-   {
-      if(getEndOfLine( strptr, ossimString("\n\tmeanSunAz ="), "%13c %s", temp))
-         theSunAzimuth = ossimString(temp).before(";").toFloat64();
-      else
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_FATAL)
-               << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
-               << "\n\tAborting construction. Error encountered parsing "
-               << "presumed meta-data file." << std::endl;
-
-            delete [] filebuf;
-            return false;
-         }
-      }
-   }
-
-   //---
-   // Sun Elevation:
-   //---
-   if(getEndOfLine( filebuf, ossimString("\n\tsunEl ="), "%9c %s", temp))
-        theSunElevation = ossimString(temp).before(";").toFloat64();
-   else
-   {
-      if(getEndOfLine( filebuf, ossimString("\n\tmeanSunEl ="), "%13c %s", temp))
-         theSunElevation = ossimString(temp).before(";").toFloat64();
-      else
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_FATAL)
-               << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
-               << "\n\tAborting construction. Error encountered parsing "
-               << "presumed meta-data file." << std::endl;
-
-            delete [] filebuf;
-            return false;
-         }
-      }
-   }
-
-   //---
-   // Sun Azimuth:
-   //---
-   if(getEndOfLine( strptr, ossimString("\n\tsunAz ="), "%9c %s", temp))
-      theSunAzimuth = ossimString(temp).before(";").toFloat64();
-   else
-   {
-      if(getEndOfLine( strptr, ossimString("\n\tmeanSunAz ="), "%13c %s", temp))
-         theSunAzimuth = ossimString(temp).before(";").toFloat64();
-      else
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_FATAL)
-               << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
-               << "\n\tAborting construction. Error encountered parsing "
-               << "presumed meta-data file." << std::endl;
-            
-            delete [] filebuf;
-            return false;
-         }
-      }
-   }
-
-   //---
-   // Sun Elevation:
-   //---
-   if(getEndOfLine( filebuf, ossimString("\n\tsunEl ="), "%9c %s", temp))
-      theSunElevation = ossimString(temp).before(";").toFloat64();
-   else
-   {
-      if(getEndOfLine( filebuf, ossimString("\n\tmeanSunEl ="), "%13c %s", temp))
-         theSunElevation = ossimString(temp).before(";").toFloat64();
-      else
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_FATAL)
-               << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
-               << "\n\tAborting construction. Error encountered parsing "
-               << "presumed meta-data file." << std::endl;
-
-            delete [] filebuf;
-            return false;
-         }
-      }
-   }
-
-
-   //---
-   // Sat Azimuth:
-   //---
-   if(getEndOfLine( strptr, ossimString("\n\tsatAz ="), "%9c %s", temp))
-      theSatAzimuth = ossimString(temp).before(";").toFloat64();
-   else
-   {
-      if(getEndOfLine( strptr, ossimString("\n\tmeanSatAz ="), "%13c %s", temp))
-         theSatAzimuth = ossimString(temp).before(";").toFloat64();
-      else
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_FATAL)
-               << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
-               << "\n\tAborting construction. Error encountered parsing "
-               << "presumed meta-data file." << std::endl;
-            
-            delete [] filebuf;
-            return false;
-         }
-      }
-   }
-   
-   //---
-   // Sat Elevation:
-   //---
-   if(getEndOfLine( filebuf, ossimString("\n\tsatEl ="), "%9c %s", temp))
-      theSatElevation = ossimString(temp).before(";").toFloat64();
-   else
-   {
-      if(getEndOfLine( filebuf, ossimString("\n\tmeanSatEl ="), "%13c %s", temp))
-         theSatElevation = ossimString(temp).before(";").toFloat64();
-      else
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_FATAL)
-               << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
-               << "\n\tAborting construction. Error encountered parsing "
-               << "presumed meta-data file." << std::endl;
-            
-            delete [] filebuf;
-            return false;
-         }
-      }
-   }
-   
-   
-   //---
-   // TDILevel:
-   //---
-   if(getEndOfLine( strptr, ossimString("\n\tTDILevel = "), "%13c %s", temp))
-      theTDILevel = ossimString(temp).before(";").toInt();
-   else
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_FATAL)
-	    << "FATAL ossimQuickbirdRpcModel::parseMetaData(data_file): "
-	    << "\n\tAborting construction. Error encountered parsing "
-	    << "presumed meta-data file." << std::endl;
-
-         delete [] filebuf;
-         return false;
-      }
-   }
-
-
-   delete [] filebuf;
-   filebuf = 0;
-
-   if (traceExec())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "DEBUG ossimQuickbirdRpcModel::parseMetaData(data_file): returning..."
-         << std::endl;
-   }
-
-   return true;
-}
-
-//*****************************************************************************
-// PROTECTED METHOD: ossimQuickbirdMetaData::parseGEOData()
-//
-//  Parses the Quickbird GEO file.
-//
-//*****************************************************************************
-bool ossimQuickbirdMetaData::parseGEOData(const ossimFilename& /* data_file */)
-{
-  return true;
-}
-
-//*****************************************************************************
-// PROTECTED METHOD: ossimQuickbirdMetaData::parseRpcData()
-//
-//  Parses the Quickbird EPH file.
-//
-//*****************************************************************************
-bool ossimQuickbirdMetaData::parseEPHData(const ossimFilename& /* data_file */)
-{
-  return true;
-}
-
-//*****************************************************************************
-// PROTECTED METHOD: ossimQuickbirdMetaData::parseRpcData()
-//
-//  Parses the Quickbird ATT file.
-//
-//*****************************************************************************
-bool ossimQuickbirdMetaData::parseATTData(const ossimFilename& /* data_file */)
-{
-  return true;
-}
-
-ossimString ossimQuickbirdMetaData::getSatID() const
-{
-   return theSatID;
-}
-
-//*****************************************************************************
-// PROTECTED METHOD: ossimQuickbirdMetaData::getEndOfLine
-//
-// //  Parse a char * to find another char *. Change the pointer only if the second char * is found.
-//
-//*****************************************************************************
-bool ossimQuickbirdMetaData::getEndOfLine( char * fileBuf,
-                                           ossimString lineBeginning,
-                                           const char * format,
-                                           ossimString & name)
-{
-   //char * res = strstr(fileBuf, lineBeginning.c_str());
-   //if (!res)
-   //{
-   //  return false;
-   // }
-   //// if the lineBeginning is found, update the start pointer adress
-   //fileBuf = res;
-   
-   //char dummy[80], nameChar[80];
-   //sscanf(res, format, dummy, nameChar);    
-   //name = ossimString(nameChar);
-    
-   char * res = strstr(fileBuf, lineBeginning.c_str());
-   if(!res)
-   {
-      return false;
-   }
-   fileBuf = strstr(fileBuf, lineBeginning.c_str());
-   char dummy[80], nameChar[80];
-   sscanf(fileBuf, format, dummy, nameChar);  
-   name = ossimString(nameChar);
-    
-   return true;
-}
-
-const ossimIpt& ossimQuickbirdMetaData::getImageSize() const
-{
-   return theImageSize;
-}
diff --git a/src/ossim/support_data/ossimQuickbirdRpcHeader.cpp b/src/ossim/support_data/ossimQuickbirdRpcHeader.cpp
deleted file mode 100644
index 69fefb4..0000000
--- a/src/ossim/support_data/ossimQuickbirdRpcHeader.cpp
+++ /dev/null
@@ -1,246 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-//----------------------------------------------------------------------------
-// $Id: ossimQuickbirdRpcHeader.cpp 9094 2006-06-13 19:12:40Z dburken $
-
-#include <ossim/support_data/ossimQuickbirdRpcHeader.h>
-#include <iostream>
-#include <fstream>
-#include <algorithm>
-#include <iterator>
-
-std::ostream& operator << (std::ostream& out,
-		      const ossimQuickbirdRpcHeader& data)
-{
-   out << "theSatId      = " << data.theSatId << std::endl
-       << "theBandId     = " << data.theBandId << std::endl
-       << "theSpecId     = " << data.theSpecId << std::endl
-       << "theErrBias    = " << data.theErrBias << std::endl
-       << "theLineOffset = " << data.theLineOffset << std::endl
-       << "theSampOffset = " << data.theSampOffset << std::endl
-       << "theLatOffset  = " << data.theLatOffset << std::endl
-       << "theLonOffset  = " << data.theLonOffset << std::endl
-       << "theHeightOffset  = " << data.theHeightOffset << std::endl
-       << "theLineScale  = " << data.theLineScale << std::endl
-       << "theSampScale  = " << data.theSampScale << std::endl
-       << "theLatScale  = " << data.theLatScale << std::endl
-       << "theLonScale  = " << data.theLonScale << std::endl
-       << "theHeightScale  = " << data.theHeightScale << std::endl;
-   
-   out << "lineNumCoef = " << std::endl;
-   std::copy(data.theLineNumCoeff.begin(),
-             data.theLineNumCoeff.end(),
-             std::ostream_iterator<double>(out, "\n"));
-   out << "lineDenCoef = " << std::endl;
-   std::copy(data.theLineDenCoeff.begin(),
-             data.theLineDenCoeff.end(),
-             std::ostream_iterator<double>(out, "\n"));
-   out << "sampNumCoef = " << std::endl;
-   std::copy(data.theSampNumCoeff.begin(),
-             data.theSampNumCoeff.end(),
-             std::ostream_iterator<double>(out, "\n"));
-   out << "sampDenCoef = " << std::endl;
-   std::copy(data.theSampDenCoeff.begin(),
-             data.theSampDenCoeff.end(),
-             std::ostream_iterator<double>(out, "\n"));
-   
-   return out;
-}
-
-
-ossimQuickbirdRpcHeader::ossimQuickbirdRpcHeader()
-{
-}
-
-bool ossimQuickbirdRpcHeader::open(const ossimFilename& file)
-{
-   theFilename = file;
-   std::ifstream in(file.c_str(), std::ios::in|std::ios::binary);
-   
-   char test[64];
-   
-   in.read((char*)test, 63);
-   test[63] = '\0';
-   in.seekg(0);
-   ossimString line = test;
-   line = line.upcase();
-   
-   if(parseNameValue(line))
-   {
-      theErrorStatus = ossimErrorCodes::OSSIM_OK;
-      getline(in,
-              line);
-      while((in)&&(theErrorStatus == ossimErrorCodes::OSSIM_OK))
-      {
-         line = line.upcase();
-         if(line.contains("LINENUMCOEF"))
-         {
-            if(!readCoeff(in, theLineNumCoeff))
-            {
-               setErrorStatus();
-               break;
-            }
-         }
-         else if(line.contains("LINEDENCOEF"))
-         {
-            if(!readCoeff(in, theLineDenCoeff))
-            {
-               setErrorStatus();
-               break;
-            }
-         }
-         else if(line.contains("SAMPNUMCOEF"))
-         {
-            if(!readCoeff(in, theSampNumCoeff))
-            {
-               setErrorStatus();
-               break;
-            }
-         }
-         else if(line.contains("SAMPDENCOEF"))
-         {
-            if(!readCoeff(in, theSampDenCoeff))
-            {
-               setErrorStatus();
-               break;
-            }
-         }
-         else if(!parseNameValue(line))
-         {
-            setErrorStatus();
-            break;
-         }
-         getline(in,
-                 line);
-      }
-   }
-   else
-   {
-      setErrorStatus();
-   }
-   return (theErrorStatus == ossimErrorCodes::OSSIM_OK);
-}
-
-bool ossimQuickbirdRpcHeader::readCoeff(std::istream& in,
-					std::vector<double>& coeff)
-{
-   coeff.clear();
-   bool done = false;
-   ossimString line;
-   while(!in.eof()&&!in.bad()&&!done)
-   {
-      getline(in,
-	      line);
-      line.trim();
-      line.trim(',');
-      if(line.contains(");"))
-      {
-         done = true;
-         line.trim(';');
-         line.trim(')');
-      }
-      coeff.push_back(line.toDouble());
-   }
-   return done;
-}
-
-bool ossimQuickbirdRpcHeader::parseNameValue(const ossimString& line)
-{
-   bool result = true;
-   ossimString lineCopy = line;
-   
-   if(lineCopy.contains("SATID"))
-   {
-      theSatId = lineCopy.after("\"");
-      theSatId = theSatId.before("\"");
-   }
-   else if(lineCopy.contains("BANDID"))
-   {
-      theBandId = lineCopy.after("\"");
-      theBandId = theBandId.before("\"");
-   }
-   else if(lineCopy.contains("SPECID"))
-   {
-      theSpecId = lineCopy.after("\"");
-      theSpecId = theSpecId.before("\"");
-   }
-   else if(lineCopy.contains("BEGIN_GROUP"))
-   {
-   }
-   else if(lineCopy.contains("ERRBIAS"))
-   {
-      lineCopy = lineCopy.after("=");
-      theErrBias = lineCopy.before(";").toDouble();
-   }
-   else if(lineCopy.contains("ERRRAND"))
-   {
-      lineCopy = lineCopy.after("=");
-      theErrRand = lineCopy.before(";").toDouble();
-   }
-   else if(lineCopy.contains("LINEOFFSET"))
-   {
-      lineCopy = lineCopy.after("=");
-      theLineOffset = lineCopy.before(";").toInt();
-   }
-   else if(lineCopy.contains("SAMPOFFSET"))
-   {
-      lineCopy = lineCopy.after("=");
-      theSampOffset = lineCopy.before(";").toInt();
-   }
-   else if(lineCopy.contains("LATOFFSET"))
-   {
-      lineCopy = lineCopy.after("=");
-      theLatOffset = lineCopy.before(";").toDouble();
-   }
-   else if(lineCopy.contains("LONGOFFSET"))
-   {
-      lineCopy = lineCopy.after("=");
-      theLonOffset = lineCopy.before(";").toDouble();
-   }
-   else if(lineCopy.contains("HEIGHTOFFSET"))
-   {
-      lineCopy = lineCopy.after("=");
-      theHeightOffset = lineCopy.before(";").toDouble();
-   }
-   else if(lineCopy.contains("LINESCALE"))
-   {
-      lineCopy = lineCopy.after("=");
-      theLineScale = lineCopy.before(";").toDouble();
-   }
-   else if(lineCopy.contains("SAMPSCALE"))
-   {
-      lineCopy = lineCopy.after("=");
-      theSampScale = lineCopy.before(";").toDouble();
-   }
-   else if(lineCopy.contains("LATSCALE"))
-   {
-      lineCopy = lineCopy.after("=");
-      theLatScale = lineCopy.before(";").toDouble();
-   }
-   else if(lineCopy.contains("LONGSCALE"))
-   {
-      lineCopy = lineCopy.after("=");
-      theLonScale = lineCopy.before(";").toDouble();
-   }
-   else if(lineCopy.contains("HEIGHTSCALE"))
-   {
-      lineCopy = lineCopy.after("=");
-      theHeightScale = lineCopy.before(";").toDouble();
-   }
-   else if(lineCopy.contains("END_GROUP"))
-   {
-   }
-   else if(lineCopy.contains("END"))
-   {
-   }
-   else
-   {
-      result = false;
-   }
-
-   return result;
-}
diff --git a/src/ossim/support_data/ossimRpfAttributes.cpp b/src/ossim/support_data/ossimRpfAttributes.cpp
deleted file mode 100644
index 4e6fb6f..0000000
--- a/src/ossim/support_data/ossimRpfAttributes.cpp
+++ /dev/null
@@ -1,170 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimRpfAttributes.cpp 14241 2009-04-07 19:59:23Z dburken $
-
-#include <iostream>
- 
-#include <ossim/support_data/ossimRpfAttributes.h>
-
-std::ostream& operator<<(std::ostream& out,
-                    const ossimRpfAttributes& data)
-{
-   data.print(out);
-   
-   return out;
-}
-
-ossimRpfAttributes::ossimRpfAttributes()
-{
-   clearFields();
-}
-ossimRpfAttributes::~ossimRpfAttributes()
-{
-}
-
-std::ostream& ossimRpfAttributes::print(std::ostream& out,
-                                        const std::string& prefix) const
-{
-   out << prefix << "CurrencyDate: " << theCurrencyDate << "\n"
-       << prefix << "ProductionDate: " << theProductionDate << "\n"
-       << prefix << "SignificantDate: " << theSignificantDate << "\n"
-       << prefix << "ChartSeriesCode: " << theChartSeriesCode << "\n"
-       << prefix << "MapDesignationCode: " << theMapDesignationCode << "\n"
-       << prefix << "OldHorDatum: " << theOldHorDatum << "\n"
-       << prefix << "Edition: " << theEdition << "\n"
-       << prefix << "ProjectionCode: " << theProjectionCode << "\n"
-       << prefix << "ProjectionA: " << theProjectionA << "\n"
-       << prefix << "ProjectionB: " << theProjectionB << "\n"
-       << prefix << "ProjectionC: " << theProjectionC << "\n"
-       << prefix << "ProjectionD: " << theProjectionD << "\n"
-       << prefix << "VertDatumCode: " << theVertDatumCode<< "\n"
-       << prefix << "HorDatumCode: " << theHorDatumCode << "\n"
-       << prefix << "VertAbsAccuracy: " << theVertAbsAccuracy << "\n"
-       << prefix << "VertAbsUnits: " << theVertAbsUnits << "\n"
-       << prefix << "HorAbsAccuracy: " << theHorAbsAccuracy << "\n"
-       << prefix << "HorAbsUnits: " << theHorAbsUnits << "\n"
-       << prefix << "VertRelAccuracy: " << theVertRelAccuracy << "\n"
-       << prefix << "VertRelUnits: " << theVertRelUnits << "\n"
-       << prefix << "HorRelAccuracy: " << theHorRelAccuracy << "\n"
-       << prefix << "HorRelUnits: " << theHorRelUnits << "\n"
-       << prefix << "ellipsoidCode: " << ellipsoidCode << "\n"
-       << prefix << "SoundingDatumCode: " << theSoundingDatumCode << "\n"
-       << prefix << "NavSystemCode: " << theNavSystemCode << "\n"
-       << prefix << "GridCode: " << theGridCode << "\n"
-       << prefix << "EeasterlyMagChange: " << theEeasterlyMagChange << "\n"
-       << prefix << "EasterlyMagChangeUnits: " << theEasterlyMagChangeUnits << "\n"
-       << prefix << "WesterlyMagChange: " << theWesterlyMagChange << "\n"
-       << prefix << "WesterlyMagChangeUnits: " << theWesterlyMagChangeUnits << "\n"
-       << prefix << "MagAngle: " << theMagAngle << "\n"
-       << prefix << "GridConver: " << theGridConver << "\n"
-       << prefix << "GridConverUnits: " << theGridConverUnits << "\n"
-       << prefix << "HighElevation: " << theHighElevation << "\n"
-       << prefix << "HighElevationUnits: " << theHighElevationUnits << "\n"
-       << prefix << "HighLat: " << theHighLat << "\n"
-       << prefix << "HighLon: " << theHighLon << "\n"
-       << prefix << "LegendFileName: " << theLegendFileName << "\n"
-       << prefix << "DataSource: " << theDataSource << "\n"
-       << prefix << "gsd: " << theGsd << "\n"
-       << prefix << "DataLevel: " << theDataLevel << std::endl;
-   return out;
-}
-
-bool ossimRpfAttributes::isEmpty()const
-{
-   for(std::map<ossim_uint32, bool>::const_iterator iter= theAttributeIdBoolMap.begin();
-       iter != theAttributeIdBoolMap.end();++iter)
-   {
-      if(iter->second!=false)
-      {
-         return false;
-      }
-   }
-   return true;
-}
-
-void ossimRpfAttributes::clearFields()
-{
-   theCurrencyDate    = "";
-   theProductionDate  = "";
-   theSignificantDate = "";
-   theChartSeriesCode = "";
-   theMapDesignationCode = "";
-   theOldHorDatum = "";
-   theEdition = "";
-   theProjectionCode = "";
-   theProjectionA = 0.0;
-   theProjectionB = 0.0;
-   theProjectionC = 0.0;
-   theProjectionD = 0.0;
-   theVertDatumCode = "";
-   theHorDatumCode = "";
-   theVertAbsAccuracy = 0;
-   theVertAbsUnits = 0;
-   theHorAbsAccuracy = 0;
-   theHorAbsUnits    = 0;
-   theVertRelAccuracy = 0;
-   theVertRelUnits = 0;
-   theHorRelAccuracy = 0;
-   theHorRelUnits = 0;
-   ellipsoidCode = "";
-   theSoundingDatumCode = "";
-   theNavSystemCode = 0;
-   theGridCode = "";
-   theEeasterlyMagChange = 0.0;
-   theEasterlyMagChangeUnits = 0;
-   theWesterlyMagChange = 0.0;
-   theWesterlyMagChangeUnits = 0;
-   theMagAngle = 0.0;
-   theMagAngleUnits = 0;
-   theGridConver = 0.0;
-   theGridConverUnits = 0;
-   theHighElevation = 0.0;
-   theHighElevationUnits = 0;
-   theHighLat = 0.0;
-   theHighLon = 0.0;
-   theLegendFileName = "";
-   theDataSource = "";
-   theGsd = 0;
-   theDataLevel = 0;
-
-   theAttributeIdBoolMap.clear();
-}
-
-void ossimRpfAttributes::setAttributeFlag(ossim_uint32 id,
-                                          bool flag)
-{
-   std::map<ossim_uint32, bool>::iterator iter = theAttributeIdBoolMap.find(id);
-
-   if(iter != theAttributeIdBoolMap.end())
-   {
-      if(flag)
-      {
-         iter->second = flag;
-      }
-      else
-      {
-         theAttributeIdBoolMap.erase(iter); 
-      }
-   }
-   else if(flag)
-   {
-	   theAttributeIdBoolMap.insert(std::make_pair(id, flag));
-   }
-}
-
-bool ossimRpfAttributes::getAttributeFlag(ossim_uint32 id)const
-{
-   std::map<ossim_uint32, bool>::const_iterator iter = theAttributeIdBoolMap.find(id);
-
-   if(iter != theAttributeIdBoolMap.end())
-   {
-      return iter->second;
-   }
-
-   return false;
-}
diff --git a/src/ossim/support_data/ossimRpfColorConverterSubsection.cpp b/src/ossim/support_data/ossimRpfColorConverterSubsection.cpp
deleted file mode 100644
index 1897967..0000000
--- a/src/ossim/support_data/ossimRpfColorConverterSubsection.cpp
+++ /dev/null
@@ -1,130 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//********************************************************************
-// $Id: ossimRpfColorConverterSubsection.cpp 9094 2006-06-13 19:12:40Z dburken $
-
-#include <ossim/support_data/ossimRpfColorConverterSubsection.h>
-#include <ossim/support_data/ossimRpfColorConverterOffsetRecord.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimErrorCodes.h>
-
-ostream& operator <<(ostream& out,
-                     const ossimRpfColorConverterSubsection& data)
-{
-   data.print(out);
-   
-   return out;
-}
-
-ossimRpfColorConverterSubsection::ossimRpfColorConverterSubsection()
-{
-   theNumberOfColorConverterOffsetRecords = 0;
-   clearFields();
-}
-
-void ossimRpfColorConverterSubsection::clearFields()
-{
-   theColorConverterOffsetTableOffset     = 0;
-   theColorConverterOffsetRecordLength    = 0;
-   theConverterRecordLength               = 0;
-
-   theTableList.clear();
-}
-
-const ossimRpfColorConverterTable* ossimRpfColorConverterSubsection::getColorConversionTable(ossim_uint32 givenThisNumberOfEntires)const
-{
-   vector<ossimRpfColorConverterTable>::const_iterator listElement = theTableList.begin();
-
-   while(listElement != theTableList.end())
-   {
-      if((*listElement).getNumberOfEntries() == givenThisNumberOfEntires)
-      {
-         return &(*listElement);
-      }
-   }
-
-   return NULL;
-}
-
-ossimErrorCode ossimRpfColorConverterSubsection::parseStream(istream& in,
-                                                             ossimByteOrder byteOrder)
-{
-   if(in)
-   {
-      clearFields();
-
-      // this is the start of the subsection
-      theStartOffset = in.tellg();
-      in.read((char*)&theColorConverterOffsetTableOffset, 4);
-      in.read((char*)&theColorConverterOffsetRecordLength, 2);
-      in.read((char*)&theConverterRecordLength, 2);
-
-      // this grabs the end of the subsection
-      theEndOffset   = in.tellg();
-
-      ossimEndian anEndian;
-
-      if(anEndian.getSystemEndianType() != byteOrder)
-      {
-         anEndian.swap(theColorConverterOffsetTableOffset);
-         anEndian.swap(theColorConverterOffsetRecordLength);
-         anEndian.swap(theConverterRecordLength);
-
-      }
-      theTableList.resize(theNumberOfColorConverterOffsetRecords);
-      for(unsigned long index = 0;
-          index < theNumberOfColorConverterOffsetRecords;
-          ++index)
-      {
-         ossimRpfColorConverterOffsetRecord recordInfo;
-         
-         if(recordInfo.parseStream(in, byteOrder) ==
-            ossimErrorCodes::OSSIM_OK)
-         {
-            unsigned long rememberGet = in.tellg();
-
-            theTableList[index].setNumberOfEntries(recordInfo.theNumberOfColorConverterRecords);
-            theTableList[index].setTableId(recordInfo.theColorConverterTableId);
-            in.seekg(theStartOffset + recordInfo.theColorConverterTableOffset, ios::beg);
-            theTableList[index].parseStream(in, byteOrder);
-            
-            in.seekg(rememberGet, ios::beg);
-         }
-         else
-         {
-            return ossimErrorCodes::OSSIM_ERROR;
-         }
-      }
-   }
-   else
-   {
-      return ossimErrorCodes::OSSIM_ERROR;
-   }
-
-   return ossimErrorCodes::OSSIM_OK;
-}
-
-void ossimRpfColorConverterSubsection::setNumberOfColorConverterOffsetRecords(ossim_uint16 numberOfRecords)
-{
-   theNumberOfColorConverterOffsetRecords = numberOfRecords;
-}
-
-void ossimRpfColorConverterSubsection::print(ostream& out)const
-{
-   out << "theColorConverterOffsetTableOffset:      "
-       << theColorConverterOffsetTableOffset << endl
-       << "theColorConverterOffsetRecordLength:     "
-       << theColorConverterOffsetRecordLength << endl
-       << "theConverterRecordLength:                "
-       << theConverterRecordLength << endl;
-
-   copy(theTableList.begin(),
-        theTableList.end(),
-        ostream_iterator<ossimRpfColorConverterTable>(out, "\n"));
-}
diff --git a/src/ossim/support_data/ossimRpfCoverageSection.cpp b/src/ossim/support_data/ossimRpfCoverageSection.cpp
deleted file mode 100644
index 51e441b..0000000
--- a/src/ossim/support_data/ossimRpfCoverageSection.cpp
+++ /dev/null
@@ -1,295 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-// 
-// Description: Rpf support class
-// 
-//********************************************************************
-// $Id: ossimRpfCoverageSection.cpp 16997 2010-04-12 18:53:48Z dburken $
-
-#include <istream>
-#include <iostream>
-
-#include <ossim/support_data/ossimRpfCoverageSection.h>
-#include <ossim/base/ossimCommon.h> /* ossim::byteOrder */
-#include <ossim/base/ossimEndian.h>
-
-std::ostream& operator <<(std::ostream &out, const ossimRpfCoverageSection &data)
-{
-   return data.print(out);
-}
-
-ossimRpfCoverageSection::ossimRpfCoverageSection()
-   :
-   theUpperLeftLat(0.0),
-   theUpperLeftLon(0.0),
-
-   theLowerLeftLat(0.0),
-   theLowerLeftLon(0.0),
-
-   theUpperRightLat(0.0),
-   theUpperRightLon(0.0),
-
-   theLowerRightLat(0.0),
-   theLowerRightLon(0.0),
-
-   theVerticalResolution(0.0),
-   theHorizontalResolution(0.0),
-
-   theVerticalInterval(0.0),
-   theHorizontalInterval(0.0)
-{
-}
-
-ossimRpfCoverageSection::ossimRpfCoverageSection(const ossimRpfCoverageSection& obj)
-   :
-   theUpperLeftLat(obj.theUpperLeftLat),
-   theUpperLeftLon(obj.theUpperLeftLon),
-
-   theLowerLeftLat(obj.theLowerLeftLat),
-   theLowerLeftLon(obj.theLowerLeftLon),
-
-   theUpperRightLat(obj.theUpperRightLat),
-   theUpperRightLon(obj.theUpperRightLon),
-
-   theLowerRightLat(obj.theLowerRightLat),
-   theLowerRightLon(obj.theLowerRightLon),
-
-   theVerticalResolution(obj.theVerticalResolution),
-   theHorizontalResolution(obj.theHorizontalResolution),
-
-   theVerticalInterval(obj.theVerticalInterval),
-   theHorizontalInterval(obj.theHorizontalInterval)
-{
-}
-
-const ossimRpfCoverageSection& ossimRpfCoverageSection::operator=(
-   const ossimRpfCoverageSection& rhs)
-{
-   if ( this != & rhs )
-   {
-      theUpperLeftLat = rhs.theUpperLeftLat;
-      theUpperLeftLon = rhs.theUpperLeftLon;
-      
-      theLowerLeftLat = rhs.theLowerLeftLat;
-      theLowerLeftLon = rhs.theLowerLeftLon;
-      
-      theUpperRightLat = rhs.theUpperRightLat;
-      theUpperRightLon = rhs.theUpperRightLon;
-      
-      theLowerRightLat = rhs.theLowerRightLat;
-      theLowerRightLon = rhs.theLowerRightLon;
-      
-      theVerticalResolution = rhs.theVerticalResolution;
-      theHorizontalResolution = rhs.theHorizontalResolution;
-      
-      theVerticalInterval = rhs.theVerticalInterval;
-      theHorizontalInterval = rhs.theHorizontalInterval;
-   }
-   return *this;
-}
-
-ossimErrorCode ossimRpfCoverageSection::parseStream(std::istream &in,
-                                                    ossimByteOrder byteOrder)
-{
-   if(in)
-   {
-      in.read((char*)&theUpperLeftLat,  8);
-      in.read((char*)&theUpperLeftLon,  8);
-      in.read((char*)&theLowerLeftLat,  8);
-      in.read((char*)&theLowerLeftLon,  8);
-      in.read((char*)&theUpperRightLat, 8);
-      in.read((char*)&theUpperRightLon, 8);
-      in.read((char*)&theLowerRightLat, 8);
-      in.read((char*)&theLowerRightLon, 8);
-      in.read((char*)&theVerticalResolution,   8);
-      in.read((char*)&theHorizontalResolution, 8);
-      in.read((char*)&theVerticalInterval,     8);
-      in.read((char*)&theHorizontalInterval,   8);
-
-      if( ossim::byteOrder()  != byteOrder )
-      {
-         ossimEndian anEndian;
-         anEndian.swap(theUpperLeftLat);
-         anEndian.swap(theUpperLeftLon);
-         anEndian.swap(theLowerLeftLat);
-         anEndian.swap(theLowerLeftLon);
-         anEndian.swap(theUpperRightLat);
-         anEndian.swap(theUpperRightLon);
-         anEndian.swap(theLowerRightLat);
-         anEndian.swap(theLowerRightLon);
-         anEndian.swap(theVerticalResolution);
-         anEndian.swap(theHorizontalResolution);
-         anEndian.swap(theVerticalInterval);
-         anEndian.swap(theHorizontalInterval);
-      }
-   }
-   else
-   {
-      return ossimErrorCodes::OSSIM_ERROR;
-   }
-
-   return ossimErrorCodes::OSSIM_OK;
-}
-
-void ossimRpfCoverageSection::writeStream(std::ostream& out)
-{
-   ossimEndian anEndian;
-
-   if( anEndian.getSystemEndianType() != OSSIM_BIG_ENDIAN )
-   {
-      // Always write out big endian.
-      anEndian.swap(theUpperLeftLat);
-      anEndian.swap(theUpperLeftLon);
-      anEndian.swap(theLowerLeftLat);
-      anEndian.swap(theLowerLeftLon);
-      anEndian.swap(theUpperRightLat);
-      anEndian.swap(theUpperRightLon);
-      anEndian.swap(theLowerRightLat);
-      anEndian.swap(theLowerRightLon);
-      anEndian.swap(theVerticalResolution);
-      anEndian.swap(theHorizontalResolution);
-      anEndian.swap(theVerticalInterval);
-      anEndian.swap(theHorizontalInterval);
-   }     
-   
-   out.write((char*)&theUpperLeftLat,  8);
-   out.write((char*)&theUpperLeftLon,  8);
-   out.write((char*)&theLowerLeftLat,  8);
-   out.write((char*)&theLowerLeftLon,  8);
-   out.write((char*)&theUpperRightLat, 8);
-   out.write((char*)&theUpperRightLon, 8);
-   out.write((char*)&theLowerRightLat, 8);
-   out.write((char*)&theLowerRightLon, 8);
-   out.write((char*)&theVerticalResolution,   8);
-   out.write((char*)&theHorizontalResolution, 8);
-   out.write((char*)&theVerticalInterval,     8);
-   out.write((char*)&theHorizontalInterval,   8);
-   
-   if( anEndian.getSystemEndianType() != OSSIM_BIG_ENDIAN )
-   {
-      // Swap back to native byte order.
-      anEndian.swap(theUpperLeftLat);
-      anEndian.swap(theUpperLeftLon);
-      anEndian.swap(theLowerLeftLat);
-      anEndian.swap(theLowerLeftLon);
-      anEndian.swap(theUpperRightLat);
-      anEndian.swap(theUpperRightLon);
-      anEndian.swap(theLowerRightLat);
-      anEndian.swap(theLowerRightLon);
-      anEndian.swap(theVerticalResolution);
-      anEndian.swap(theHorizontalResolution);
-      anEndian.swap(theVerticalInterval);
-      anEndian.swap(theHorizontalInterval);
-   }
-}
-
-std::ostream& ossimRpfCoverageSection::print(
-   std::ostream& out, const std::string& prefix) const
-{
-   out << prefix << "ul_lat: "
-       << theUpperLeftLat << "\n"
-       << prefix << "ul_lon: "
-       << theUpperLeftLon << "\n"
-       << prefix << "ll_lat: "
-       << theLowerLeftLat << "\n"
-       << prefix << "ll_lon: "
-       << theLowerLeftLon << "\n"
-       << prefix << "ur_lat: "
-       << theUpperRightLat << "\n"
-       << prefix << "ur_lon: "
-       << theUpperRightLon << "\n"
-       << prefix << "lr_lat: "
-       << theLowerRightLat << "\n"
-       << prefix << "lr_lon: "
-       << theLowerRightLon << "\n"
-       << prefix << "vertical_resolution: "
-       << theVerticalResolution << "\n"
-       << prefix << "horizontal_resolution: "
-       << theHorizontalResolution << "\n"
-       << prefix << "vertical_interval: "
-       << theVerticalInterval << "\n"
-       << prefix << "horizontal_interval: "
-       << theHorizontalInterval << std::endl;
-   return out;
-}
-
-void ossimRpfCoverageSection::clearFields()
-{
-   theUpperLeftLat  = 0.0;
-   theUpperLeftLon  = 0.0;
-   theLowerLeftLat  = 0.0;
-   theLowerLeftLon  = 0.0;
-   theUpperRightLat = 0.0;
-   theUpperRightLon = 0.0;
-   theLowerRightLat = 0.0;
-   theLowerRightLon = 0.0;
-   theVerticalResolution   = 0.0;
-   theHorizontalResolution = 0.0;
-   theVerticalInterval     = 0.0;
-   theHorizontalInterval   = 0.0;
-}
-
-void ossimRpfCoverageSection::setUlLat(ossim_float64 value)
-{
-   theUpperLeftLat = value;
-}
-
-void ossimRpfCoverageSection::setUlLon(ossim_float64 value)
-{
-   theUpperLeftLon = value;
-}
-
-void ossimRpfCoverageSection::setLlLat(ossim_float64 value)
-{
-   theLowerLeftLat = value;
-}
-
-void ossimRpfCoverageSection::setLlLon(ossim_float64 value)
-{
-   theLowerLeftLon = value;
-}
-
-void ossimRpfCoverageSection::setLrLat(ossim_float64 value)
-{
-   theLowerRightLat = value;
-}
-
-void ossimRpfCoverageSection::setLrLon(ossim_float64 value)
-{
-   theLowerRightLon = value;
-}
-
-void ossimRpfCoverageSection::setUrLat(ossim_float64 value)
-{
-   theUpperRightLat = value;
-}
-
-void ossimRpfCoverageSection::setUrLon(ossim_float64 value)
-{
-   theUpperRightLon = value;
-}
-
-void ossimRpfCoverageSection::setVerticalResolution(ossim_float64 value)
-{
-   theVerticalResolution = value;
-}
-
-void ossimRpfCoverageSection::setHorizontalResolution(ossim_float64 value)
-{
-   theHorizontalResolution = value;
-}
-
-void ossimRpfCoverageSection::setVerticalInterval(ossim_float64 value)
-{
-   theVerticalInterval = value;
-}
-
-void ossimRpfCoverageSection::setHorizontalInterval(ossim_float64 value)
-{
-   theHorizontalInterval = value;
-}
diff --git a/src/ossim/support_data/ossimRpfFrame.cpp b/src/ossim/support_data/ossimRpfFrame.cpp
deleted file mode 100644
index 2dd0a4f..0000000
--- a/src/ossim/support_data/ossimRpfFrame.cpp
+++ /dev/null
@@ -1,1121 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-// Description: This class give the capability to access tiles from an
-//              rpf file.
-//
-//********************************************************************
-// $Id: ossimRpfFrame.cpp 20324 2011-12-06 22:25:23Z dburken $
-
-#include <ossim/support_data/ossimRpfFrame.h>
-#include <ossim/support_data/ossimRpfHeader.h>
-#include <ossim/support_data/ossimRpfAttributes.h>
-#include <ossim/support_data/ossimRpfAttributeOffsetRecord.h>
-#include <ossim/support_data/ossimRpfAttributeSectionSubheader.h>
-#include <ossim/support_data/ossimRpfCoverageSection.h>
-#include <ossim/support_data/ossimRpfImageDescriptionSubheader.h>
-#include <ossim/support_data/ossimRpfImageDisplayParameterSubheader.h>
-#include <ossim/support_data/ossimRpfMaskSubheader.h>
-#include <ossim/support_data/ossimRpfCompressionSection.h>
-#include <ossim/support_data/ossimRpfColorGrayscaleSubheader.h>
-#include <ossim/support_data/ossimRpfColorGrayscaleOffsetRecord.h>
-#include <ossim/support_data/ossimRpfColorConverterSubsection.h>
-#include <ossim/support_data/ossimRpfColorConverterTable.h>
-#include <ossim/support_data/ossimRpfColorGrayscaleTable.h>
-#include <ossim/support_data/ossimRpfLocationSection.h>
-#include <ossim/support_data/ossimRpfColorConverterSubsection.h>
-#include <ossim/support_data/ossimRpfConstants.h>
-#include <ossim/support_data/ossimRpfReplaceUpdateRecord.h>
-#include <ossim/support_data/ossimRpfReplaceUpdateSectionSubheader.h>
-#include <ossim/support_data/ossimNitfFile.h>
-#include <ossim/support_data/ossimNitfFileHeader.h>
-#include <ossim/support_data/ossimNitfTagInformation.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimErrorCodes.h>
-#include <ossim/base/ossimTrace.h>
-#include <istream>
-#include <ostream>
-
-static const ossimTrace traceDebug("ossimRpfFrame:debug");
-
-std::ostream& operator <<(std::ostream& out, const ossimRpfFrame& data)
-{
-   data.print(out);
-   
-   return out;
-}
-
-ossimRpfFrame::ossimRpfFrame()
-   :theHeader(0),
-    theFilename(""),
-    theCoverage(0),
-    theAttributes(0),
-    theImageDescriptionSubheader(0),
-    theMaskSubheader(0),
-    theImageDisplayParameterSubheader(0),
-    theCompressionSection(0),
-    theColorGrayscaleSubheader(0),
-    theColorConverterSubsection(0),
-    theNitfFile(0),
-    theSubframeMaskTable(0),
-    theSubframeTransparencyMaskTable(0),
-    theReplaceUpdateTable(0)
-{
-}
-
-ossimRpfFrame::~ossimRpfFrame()
-{
-   deleteAll();
-}
-
-std::ostream& ossimRpfFrame::print(std::ostream& out, const std::string& prefix) const
-{
-   if (traceDebug())
-   {
-      out << "begin_rpf_frame_print:\n";
-   }
-   
-   if(theHeader)
-   {
-      theHeader->print(out, prefix);
-   }
-
-   out << prefix << "filename: " << theFilename << "\n";
-
-   if ( theReplaceUpdateTable.valid() )
-   {
-      theReplaceUpdateTable->print(out, prefix);
-   }
-
-   if (traceDebug())
-   {
-      if(theCoverage)
-      {
-         theCoverage->print(out, prefix);
-      }
-   }
-
-   if(theAttributes)
-   {
-      theAttributes->print(out, prefix);
-   }
-
-   if (traceDebug())
-   {
-      if(theImageDescriptionSubheader)
-      {
-         theImageDescriptionSubheader->print(out, prefix);
-      }
-      
-      if(theMaskSubheader)
-      {
-         out << *theMaskSubheader << endl;
-      }
-      if(theImageDisplayParameterSubheader)
-      {
-         out << *theImageDisplayParameterSubheader << endl;
-      }
-      if(theCompressionSection)
-      {
-         out << *theCompressionSection << endl;
-      }
-      if(theColorGrayscaleSubheader)
-      {
-         out << *theColorGrayscaleSubheader << endl;
-      }
-      if(theColorConverterSubsection)
-      {
-         out << *theColorConverterSubsection << endl;
-      }
-      
-      copy(theColorGrayscaleTable.begin(),
-           theColorGrayscaleTable.end(),
-           ostream_iterator<ossimRpfColorGrayscaleTable>(out, "\n"));
-      
-      if(theImageDescriptionSubheader&&
-         !(theImageDescriptionSubheader->isSubframeMaskTableOffsetNull()))
-      {
-         out << "Subframe Mask Table:" << endl;
-         unsigned long spectralIndex;
-         unsigned long rowIndex;
-         unsigned long colIndex;
-         // first loop through the Mask table and allocate while we do it
-         for(spectralIndex = 0;
-             spectralIndex < theImageDescriptionSubheader->getNumberOfSpectralGroups();
-             ++spectralIndex)
-         {
-            for(rowIndex = 0;
-                rowIndex < theImageDescriptionSubheader->getNumberOfSubframesVertical();
-                ++rowIndex)
-            {
-               for(colIndex = 0;
-                   colIndex < theImageDescriptionSubheader->getNumberOfSubframesHorizontal();
-                   ++colIndex)
-               {
-                  if( theSubframeMaskTable[spectralIndex][rowIndex][colIndex] == OSSIM_RPF_ULONG_NULL)
-                  {
-                     out << "NULL ";
-                  }
-                  else
-                  {
-                     out << theSubframeMaskTable[spectralIndex][rowIndex][colIndex] << " ";
-                  }
-               }
-               out << endl;
-            }
-         }
-      }
-
-
-      if(theImageDescriptionSubheader&&
-         !(theImageDescriptionSubheader->isTransparencyMaskTableOffsetNull()))
-      {
-         out << "Transparency Mask Table:" << endl;
-         unsigned long spectralIndex;
-         unsigned long rowIndex;
-         unsigned long colIndex;
-         // first loop through the Mask table and allocate while we do it
-         for(spectralIndex = 0;
-             spectralIndex < theImageDescriptionSubheader->getNumberOfSpectralGroups();
-             ++spectralIndex)
-         {
-            for(rowIndex = 0;
-                rowIndex < theImageDescriptionSubheader->getNumberOfSubframesVertical();
-                ++rowIndex)
-            {
-               for(colIndex = 0;
-                   colIndex < theImageDescriptionSubheader->getNumberOfSubframesHorizontal();
-                   ++colIndex)
-               {
-                  if( theSubframeTransparencyMaskTable[spectralIndex][rowIndex][colIndex] == OSSIM_RPF_ULONG_NULL)
-                  {
-                     out << "NULL ";
-                  }
-                  else
-                  {
-                     out << theSubframeTransparencyMaskTable[spectralIndex][rowIndex][colIndex] << " ";
-                  }
-               }
-            }
-         }
-      }
-
-
-      
-      out << "end_rpf_frame_print:\n";
-      
-   } // matches:  if (traceDebug())
-
-   out << std::endl;
-   
-   return out;
-}
-
-ossimErrorCode ossimRpfFrame::parseFile(const ossimFilename& filename,
-                                        bool minimalParse)
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimRpfFrame::parseFile: entered......" << std::endl;
-   }
-   ossimErrorCode result = ossimErrorCodes::OSSIM_OK;
-
-   //Make sure any fileds have beend cleared
-   clearFields();
-
-   // Make sure all data is deleted.  The initialize call the
-   // populate methods.  These methods will re-allocate the information
-   deleteAll();
-
-
-   theNitfFile = new ossimNitfFile;
-   theNitfFile->parseFile(filename);
-   
-   const ossimRefPtr<ossimNitfFileHeader> nitfFileHeader =
-      theNitfFile.valid() ? theNitfFile->getHeader() : 0;
-
-   if(!nitfFileHeader)
-   {
-      theNitfFile = 0;
-
-      return ossimErrorCodes::OSSIM_ERROR;
-   }
-   ossimNitfTagInformation info;
-   nitfFileHeader->getTag(info, "RPFHDR");
-
-   theFilename = filename;
-   if(info.getTagName() == "RPFHDR")
-   {
-      ifstream in(filename.c_str(), ios::in|ios::binary);
-      // set the get pointer for the stream to the start
-      // of the Rpf header data
-      in.seekg(info.getTagDataOffset(), ios::beg);
-
-      if(theHeader) delete theHeader;
-      theHeader = new ossimRpfHeader;
-      
-      // if(theHeader->parseStream(in) != ossimErrorCodes::OSSIM_OK)
-      theHeader->parseStream(in);
-
-      if ( in.fail() )
-      {
-         deleteAll();
-         
-         return ossimErrorCodes::OSSIM_ERROR;
-      }
-      else
-         // if(!in.fail()&&theHeader)
-      {
-         result = populateAttributeSection(in);
-
-         // This is needed for ossim-rpf --list-frames so NOT put in full parse section.
-         if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
-         {
-            result = populateReplaceUpdateTable(in);
-         }
-
-         if ( minimalParse == false )
-         {
-            if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
-            {
-               populateCompressionSection(in);
-            }
-            if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
-            {
-               result = populateCoverageSection(in);
-            }
-            if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
-            {
-               result = populateImageSection(in);
-            }
-            if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
-            {
-               result = populateColorGrayscaleSection(in);
-            }
-            if(!in.fail()&&(result == ossimErrorCodes::OSSIM_OK))
-            {
-               result = populateMasks(in);
-            }
-         }
-      }
-   }
-   else
-   {
-      return ossimErrorCodes::OSSIM_ERROR;
-   }
-
-   return ossimErrorCodes::OSSIM_OK;
-}
-
-bool ossimRpfFrame::hasSubframeMaskTable()const
-{
-   if(theImageDescriptionSubheader)
-   {
-      return (!theImageDescriptionSubheader->isSubframeMaskTableOffsetNull());
-   }
-
-   return false;
-          
-}
-
-bool ossimRpfFrame::fillSubFrameBuffer(ossim_uint8* buffer,
-                                       ossim_uint32 /* spectralGroup */,
-                                       ossim_uint32 row,
-                                       ossim_uint32 col)const
-{
-   if(theImageDescriptionSubheader &&
-      theImageDisplayParameterSubheader&&
-      theHeader&&
-      (col < theImageDescriptionSubheader->getNumberOfSubframesHorizontal()) &&
-      (row < theImageDescriptionSubheader->getNumberOfSubframesVertical()))
-   {
-      ossimRpfComponentLocationRecord info;
-      
-      if(!theHeader->getLocationSection()->getComponent(OSSIM_RPF_SPATIAL_DATA_SUBSECTION, info))
-      {
-         return false;
-      }
-      
-      ossim_uint32 offset = info.m_componentLocation;
-      ossim_uint32 bytesPerSubframe = 0;
-
-      // note that the code length is bit encoded so we must devide by 8
-      // in order to get the byte offset instead of the bit offset.  We
-      // then add that to the start of the spatial data section which is
-      // the current value of offset.
-      bytesPerSubframe = (theImageDisplayParameterSubheader->getNumberOfImageRows()*
-                          theImageDisplayParameterSubheader->getNumberOfImageCodesPerRow()*
-                          theImageDisplayParameterSubheader->getImageCodeLength())/8;
-      
-         
-      if(hasSubframeMaskTable())
-      {
-         // check to see if the offset is NULL.  If it is
-         // then just return false to let the caller know that the
-         // buffer did not exist.
-         if(theSubframeMaskTable[0][row][col] != OSSIM_RPF_ULONG_NULL)
-         {
-            offset += theSubframeMaskTable[0][row][col];
-         }
-         else
-         {
-            return false;
-         }
-      }
-      else
-      {
-         ossim_uint32 bytes = bytesPerSubframe*(row*theImageDescriptionSubheader->getNumberOfSubframesHorizontal()+
-                                                col);
-         offset += bytes;
-      }
-      
-      // now since we have the adjustment and we got to this point then
-      // we can read in the data into the destination buffer.
-      ifstream in(theFilename.c_str(), ios::in|ios::binary);
-      if(!in.fail())
-      {
-         in.seekg(offset, ios::beg);
-         in.read((char*)buffer, bytesPerSubframe);
-         if(in.fail())
-         {
-            return false;
-         }
-      }
-      else
-      {
-         return false;
-      }
-   }
-   else
-   {
-      // this is if it was not within the rows and cols of
-      // the subframe or if the image description header didn't exist
-      return false;
-   }
-
-   return true;
-}
-
-void ossimRpfFrame::clearFields()
-{   
-   theFilename = "";
-}
-
-void ossimRpfFrame::deleteAll()
-{
-   if(theHeader)
-   {
-      delete theHeader;
-      theHeader = 0;
-   }
-   if(theAttributes)
-   {
-      delete theAttributes;
-      theAttributes = 0;
-   }
-   if(theCoverage)
-   {
-      delete theCoverage;
-      theCoverage = 0;
-   }
-   if(theImageDescriptionSubheader)
-   {
-      delete theImageDescriptionSubheader;
-      theImageDescriptionSubheader = 0;
-   }
-   if(theMaskSubheader)
-   {
-      delete theMaskSubheader;
-      theMaskSubheader = 0;
-   }
-   if(theImageDisplayParameterSubheader)
-   {
-      delete theImageDisplayParameterSubheader;
-      theImageDisplayParameterSubheader = 0;
-   }
-   if(theCompressionSection)
-   {
-      delete theCompressionSection;
-      theCompressionSection = 0;
-   }
-   if(theColorGrayscaleSubheader)
-   {
-      delete theColorGrayscaleSubheader;
-      theColorGrayscaleSubheader = 0;
-   }
-   if(theColorConverterSubsection)
-   {
-      delete theColorConverterSubsection;
-      theColorConverterSubsection = 0;
-   }
-   if (theNitfFile.valid())
-   {
-      theNitfFile = 0;
-   }
-}
-
-ossimErrorCode ossimRpfFrame::populateCoverageSection(istream& in)
-{
-   if(theCoverage) delete theCoverage;
-   theCoverage = 0;
-   if(theHeader)
-   {
-      theCoverage = theHeader->getNewCoverageSection(in);
-   }
-   return ossimErrorCodes::OSSIM_OK;
-}
-
-ossimErrorCode ossimRpfFrame::populateCompressionSection(istream& in)
-{
-   if(theCompressionSection) delete theCompressionSection;
-   theCompressionSection = 0;
-   if(theHeader)
-   {
-      theCompressionSection = theHeader->getNewCompressionSection(in);
-   }
-   return ossimErrorCodes::OSSIM_OK;
-}
-
-ossimErrorCode ossimRpfFrame::populateColorGrayscaleSection(istream& in)
-{
-   ossimErrorCode resultError = ossimErrorCodes::OSSIM_OK;
-   if(theColorGrayscaleSubheader) delete theColorGrayscaleSubheader;
-   theColorGrayscaleSubheader = 0;
-   if(theHeader)
-   {
-      theColorGrayscaleSubheader  = theHeader->getNewColorGrayscaleSubheader(in);
-
-      if(theColorGrayscaleSubheader)
-      {
-         const ossimRpfLocationSection* location = theHeader->getLocationSection();
-         if(location)
-         {
-            ossimRpfComponentLocationRecord component;
-            
-            if(location->getComponent(OSSIM_RPF_COLOR_CONVERTER_SUBSECTION,
-                                     component))
-            {
-               in.seekg(component.m_componentLocation,ios::beg);
-               if(theColorConverterSubsection) delete theColorConverterSubsection;
-               theColorConverterSubsection = new ossimRpfColorConverterSubsection;
-               theColorConverterSubsection->setNumberOfColorConverterOffsetRecords(
-                  theColorGrayscaleSubheader->getNumberOfColorConverterOffsetRecords());
-               resultError = theColorConverterSubsection->parseStream(in, theHeader->getByteOrder());
-            }
-            if(location->getComponent(OSSIM_RPF_COLORMAP_SUBSECTION, component))
-            {
-               in.seekg(component.m_componentLocation, ios::beg);
-               
-               theColorGrayscaleTable.clear();
-               theColorGrayscaleTable.resize(theColorGrayscaleSubheader->getNumberOfColorGreyscaleOffsetRecords());
-
-               // we will ignore the offset table offset which is a 4 byte value
-               // and ignore the offset record length which is a 2 byte value.
-               // This is suppose to put us at the beginning of the
-               // [color/grayscale offset record].  The total number of
-               // these offset records is found in the [color/grayscale section
-               // subheader.
-               in.ignore(6);
-               for(ossim_uint32 index = 0;
-                   index < theColorGrayscaleSubheader->getNumberOfColorGreyscaleOffsetRecords();
-                   ++index)
-               {
-                  
-                  ossimRpfColorGrayscaleOffsetRecord grayscaleOffsetRecord;
-
-                  if(grayscaleOffsetRecord.parseStream(in, theHeader->getByteOrder()) == ossimErrorCodes::OSSIM_OK)
-                  {
-                     ossim_uint32 rememberLocation = in.tellg();
-                     in.seekg(grayscaleOffsetRecord.getColorGrayscaleTableOffset()+component.m_componentLocation, ios::beg);
-                     theColorGrayscaleTable[index].setTableData(grayscaleOffsetRecord.getColorGrayscaleTableId(),
-                                                                grayscaleOffsetRecord.getNumberOfColorGrayscaleRecords());
-                     theColorGrayscaleTable[index].parseStream(in, theHeader->getByteOrder());
-                     in.seekg(rememberLocation, ios::beg);
-                  }
-                  else
-                  {
-                     return ossimErrorCodes::OSSIM_ERROR;
-                  }
-               }
-            }
-         }
-      }
-   }
-   
-   return resultError;
-}
-
-ossimErrorCode ossimRpfFrame::populateImageSection(istream& in)
-{
-   ossimErrorCode result = ossimErrorCodes::OSSIM_OK;
-   if(theImageDescriptionSubheader) delete theImageDescriptionSubheader;
-   theImageDescriptionSubheader = 0;
-   if(theHeader&&in)
-   {
-      // get the subheader information.
-      theImageDescriptionSubheader = theHeader->getNewImageDescriptionSubheader(in);
-
-      
-      // need to do something with the table before going to the display.
-      if(theImageDescriptionSubheader &&(!theImageDescriptionSubheader->isSubframeMaskTableOffsetNull()))
-      {
-         if(theMaskSubheader) delete theMaskSubheader;
-         // need to get the mask subheader
-         theMaskSubheader = new ossimRpfMaskSubheader;
-
-         // seek to the start of the subheader
-         in.seekg(theImageDescriptionSubheader->getEndOffset() +
-                  theImageDescriptionSubheader->getSubframeMaskTableOffset(), ios::beg);
-
-         // get the information
-         result = theMaskSubheader->parseStream(in, theHeader->getByteOrder());
-      }
-
-      if(theImageDisplayParameterSubheader) delete theImageDisplayParameterSubheader;
-      // Get the display parameter header
-      theImageDisplayParameterSubheader = theHeader->getNewImageDisplayParameterSubheader(in);
-   }
-   return result;
-}
-
-ossimErrorCode ossimRpfFrame::populateAttributeSection(istream& in)
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimRpfFrame::populateAttributeSection:  entered ..." << std::endl;
-   }
-   ossimRpfAttributeSectionSubheader* temp = 0;
-   
-   const ossimRpfLocationSection* location = theHeader->getLocationSection();
-   if(location)
-   {
-      ossimRpfComponentLocationRecord component;
-      
-      if(location->getComponent(OSSIM_RPF_ATTRIBUTE_SECTION_SUBHEADER,
-                               component))
-      {
-         temp = new ossimRpfAttributeSectionSubheader;
-         in.seekg(component.m_componentLocation, std::ios::beg);
-         if(temp->parseStream(in, theHeader->getByteOrder()) != ossimErrorCodes::OSSIM_OK)
-         {
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG) << "ossimRpfFrame::populateAttributeSection:  leaving 1 ..." << std::endl;
-            }
-            return ossimErrorCodes::OSSIM_ERROR;
-         }
-      }
-   }
-   if(!in.fail()&&temp)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG: Has attribute section" << std::endl;
-      }
-      if(theAttributes) delete theAttributes;
-      theAttributes = new ossimRpfAttributes;
-      ossimRpfAttributeOffsetRecord record;
-      ossim_uint64 locationAttributeSubsection = in.tellg();
-      ossim_uint64 absoluteAddresToTable = locationAttributeSubsection + temp->getAttributeOffsetTableOffset();
-      ossimEndian anEndian;
-
-      
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG: Number of attributes = "
-                                             <<  temp->getNumberOfAttributeOffsetRecords()
-                                             << std::endl;
-      }
-      in.seekg(absoluteAddresToTable, ios::beg);
-      for(ossim_uint32 index = 0;
-          index < temp->getNumberOfAttributeOffsetRecords();
-          index++)
-      {
-         if((!in.fail())&&
-            record.parseStream(in, theHeader->getByteOrder()) ==
-            ossimErrorCodes::OSSIM_OK)
-         {
-            // make sure we save the current position.  The attribute
-            // parser in the switch/case will change the location and
-            // we must come back to the start of the next record.
-            ossim_uint64 currentLocation = in.tellg();
-
-            // go to the location of the start of the attribute.               
-            in.seekg(locationAttributeSubsection + record.getAttributeRecordOffset(), ios::beg);
-
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG: Parsing attribute number  " << index
-                                                   << " with id = " << record.getAttributeId()
-                                                   << std::endl;
-            }
-            // allocate some temporary space for the string type
-            // attributes.
-            char tempString[50];
-            if(!theAttributes->getAttributeFlag(record.getAttributeId()))
-            {
-               theAttributes->setAttributeFlag(record.getAttributeId(), true);
-               switch(record.getAttributeId())
-               {
-               case 1:
-               {
-                  in.read((char*)tempString, 8);
-                  tempString[8] = '\0';
-                  theAttributes->theCurrencyDate = tempString;
-                  break;
-               }
-               case 2:
-               {
-                  in.read((char*)tempString, 8);
-                  tempString[8] = '\0';
-                  theAttributes->theProductionDate = tempString;
-                  break;
-               }
-               case 3:
-               {
-                  in.read((char*)tempString, 8);
-                  tempString[8] = '\0';
-                  theAttributes->theSignificantDate = tempString;
-                  break;
-               }
-               case 4:
-               {
-                  in.read((char*)tempString, 10);
-                  theAttributes->theChartSeriesCode = ossimString(tempString,
-                                                                  &tempString[10]);
-                  in.read((char*)tempString, 8);
-                  theAttributes->theMapDesignationCode = ossimString(tempString,
-                                                                     &tempString[8]);
-                  in.read((char*)tempString, 4);
-                  theAttributes->theOldHorDatum = ossimString(tempString,
-                                                              &tempString[4]);
-                  in.read((char*)tempString, 7);
-                  theAttributes->theEdition = ossimString(tempString,
-                                                          &tempString[7]);
-                  break;
-               }
-               case 5:
-               {
-                  in.read((char*)tempString, 2);
-                  theAttributes->theProjectionCode = ossimString(tempString,
-                                                                 &tempString[2]);
-                  theAttributes->theProjectionCode = theAttributes->theProjectionCode.upcase();
-                  if((theAttributes->theProjectionCode == "AC") ||
-                     (theAttributes->theProjectionCode == "LE") ||
-                     (theAttributes->theProjectionCode == "PG"))
-                  {
-                     in.read((char*)&(theAttributes->theProjectionA), 4);
-                     in.read((char*)&(theAttributes->theProjectionB), 4);
-                     in.read((char*)&(theAttributes->theProjectionC), 4);
-                     in.read((char*)&(theAttributes->theProjectionD), 4);
-                  }
-                  else if((theAttributes->theProjectionCode == "RB") ||
-                          (theAttributes->theProjectionCode == "OC") ||
-                          (theAttributes->theProjectionCode == "TC"))
-                  {
-                     in.read((char*)&(theAttributes->theProjectionA), 4);
-                     in.read((char*)&(theAttributes->theProjectionB), 4);
-                     in.read((char*)&(theAttributes->theProjectionC), 4);
-                  }
-                  else if((theAttributes->theProjectionCode == "AL") ||
-                          (theAttributes->theProjectionCode == "MC") ||
-                          (theAttributes->theProjectionCode == "OD") ||
-                          (theAttributes->theProjectionCode == "PH"))
-                  {
-                     in.read((char*)&(theAttributes->theProjectionA), 4);
-                     in.read((char*)&(theAttributes->theProjectionB), 4);
-                  }
-                  else if((theAttributes->theProjectionCode == "UT"))
-                  {
-                     in.read((char*)&(theAttributes->theProjectionA), 4);
-                  }
-                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
-                  {
-                     anEndian.swap(theAttributes->theProjectionA);
-                     anEndian.swap(theAttributes->theProjectionB);
-                     anEndian.swap(theAttributes->theProjectionC);
-                     anEndian.swap(theAttributes->theProjectionD);
-                  }
-                  break;
-               }
-               case 6:
-               {
-                  in.read((char*)tempString, 4);
-                  theAttributes->theVertDatumCode = ossimString(tempString,
-                                                                &tempString[4]);
-                  break;
-               }
-               case 7:
-               {
-                  in.read((char*)tempString, 4);
-                  theAttributes->theHorDatumCode = ossimString(tempString,
-                                                               &tempString[4]);
-                  break;
-               }
-               case 8:
-               {
-                  in.read((char*)&(theAttributes->theVertAbsAccuracy), 4);
-                  in.read((char*)&(theAttributes->theVertAbsUnits), 2);
-                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
-                  {
-                     anEndian.swap(theAttributes->theVertAbsAccuracy);
-                     anEndian.swap(theAttributes->theVertAbsUnits);
-                  }
-                  break;
-               }
-               case 9:
-               {
-                  in.read((char*)&(theAttributes->theHorAbsAccuracy), 4);
-                  in.read((char*)&(theAttributes->theHorAbsUnits), 2);
-                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
-                  {
-                     anEndian.swap(theAttributes->theHorAbsAccuracy);
-                     anEndian.swap(theAttributes->theHorAbsUnits);
-                  }
-                  break;
-               }
-               case 10:
-               {
-                  in.read((char*)&(theAttributes->theVertRelAccuracy), 4);
-                  in.read((char*)&(theAttributes->theVertRelUnits), 2);
-                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
-                  {
-                     anEndian.swap(theAttributes->theVertRelAccuracy);
-                     anEndian.swap(theAttributes->theVertRelUnits);
-                  }
-                  break;
-               }
-               case 11:
-               {
-                  in.read((char*)&(theAttributes->theHorRelAccuracy), 4);
-                  in.read((char*)&(theAttributes->theHorRelUnits), 2);
-                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
-                  {
-                     anEndian.swap(theAttributes->theHorRelAccuracy);
-                     anEndian.swap(theAttributes->theHorRelUnits);
-                  }
-                  break;
-               }            
-               case 12:
-               {
-                  in.read((char*)tempString, 3);
-                  theAttributes->ellipsoidCode = ossimString(tempString,
-                                                             &tempString[3]);
-                  break;
-               }            
-               case 13:
-               {
-                  in.read((char*)tempString, 4);
-                  theAttributes->theSoundingDatumCode = ossimString(tempString,
-                                                                    &tempString[4]);
-                  break;
-               }            
-               case 14:
-               {
-                  in.read((char*)&(theAttributes->theNavSystemCode), 2);
-                  
-                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
-                  {
-                     anEndian.swap(theAttributes->theNavSystemCode);
-                  }
-                  break;
-               }            
-               case 15:
-               {
-                  in.read((char*)tempString, 2);
-                  theAttributes->theGridCode = ossimString(tempString,
-                                                           &tempString[2]);
-                  break;
-               }            
-               case 16:
-               {
-                  in.read((char*)&(theAttributes->theEeasterlyMagChange), 4);
-                  in.read((char*)&(theAttributes->theEasterlyMagChangeUnits), 2);
-                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
-                  {
-                     anEndian.swap(theAttributes->theEeasterlyMagChange);
-                     anEndian.swap(theAttributes->theEasterlyMagChangeUnits);
-                  }
-                  break;
-               }
-               case 17:
-               {
-                  in.read((char*)&(theAttributes->theWesterlyMagChange), 4);
-                  in.read((char*)&(theAttributes->theWesterlyMagChangeUnits), 2);
-                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
-                  {
-                     anEndian.swap(theAttributes->theWesterlyMagChange);
-                     anEndian.swap(theAttributes->theWesterlyMagChangeUnits);
-                  }
-                  break;
-               }
-               case 18:
-               {
-                  in.read((char*)&(theAttributes->theMagAngle), 4);
-                  in.read((char*)&(theAttributes->theMagAngleUnits), 2);
-                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
-                  {
-                     anEndian.swap(theAttributes->theMagAngle);
-                     anEndian.swap(theAttributes->theMagAngleUnits);
-                  }
-                  break;
-               }
-               case 19:
-               {
-                  in.read((char*)&(theAttributes->theGridConver), 4);
-                  in.read((char*)&(theAttributes->theGridConverUnits), 2);
-                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
-                  {
-                     anEndian.swap(theAttributes->theGridConver);
-                     anEndian.swap(theAttributes->theGridConverUnits);
-                  }
-                  break;
-               }
-               case 20:
-               {
-                  in.read((char*)&(theAttributes->theHighElevation), 8);
-                  in.read((char*)&(theAttributes->theHighElevationUnits), 2);
-                  in.read((char*)&(theAttributes->theHighLat), 8);
-                  in.read((char*)&(theAttributes->theHighLon), 8);
-                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
-                  {
-                     anEndian.swap(theAttributes->theHighElevation);
-                     anEndian.swap(theAttributes->theHighElevationUnits);
-                     anEndian.swap(theAttributes->theHighLat);
-                     anEndian.swap(theAttributes->theHighLon);
-                  }
-                  break;
-               }
-               case 21:
-               {
-                  in.read((char*)tempString, 12);
-                  theAttributes->theLegendFileName = ossimString(tempString,
-                                                                 &tempString[12]);
-                  break;
-               }
-               case 22:
-               {
-                  in.read((char*)tempString, 12);
-                  tempString[12] = '\0';
-                  theAttributes->theDataSource = tempString;
-                  in.read((char*)&(theAttributes->theGsd), 4);
-                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
-                  {
-                     anEndian.swap(theAttributes->theGsd);
-                  }
-                  break;
-               }
-               case 23:
-               {
-                  in.read((char*)&(theAttributes->theDataLevel), 2);
-                  if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
-                  {
-                     anEndian.swap(theAttributes->theDataLevel);
-                  }
-                  break;
-               }
-               }
-            }
-            in.seekg(currentLocation, ios::beg);
-         }
-         else
-         {
-            delete temp;
-            temp = 0;
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG) << "ossimRpfFrame::populateAttributeSection:  leaving 2 ..." << std::endl;
-            }
-            return ossimErrorCodes::OSSIM_ERROR;
-         }
-      }
-   }
-   if(temp) delete temp;
-   temp = 0;
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimRpfFrame::populateAttributeSection:  leaving OK ..." << std::endl;
-   }
-   return ossimErrorCodes::OSSIM_OK;
-}
-
-ossimErrorCode ossimRpfFrame::populateMasks(istream& in)
-{
-   theSubframeMaskTable.clear();
-   theSubframeTransparencyMaskTable.clear();
-
-   if(!in)
-   {
-      return ossimErrorCodes::OSSIM_ERROR;
-   }
-   
-   if(theImageDescriptionSubheader)
-   {
-      const ossimRpfLocationSection* location = theHeader->getLocationSection();
-      if(location)
-      {
-         ossimRpfComponentLocationRecord component;
-         
-         if(location->getComponent(OSSIM_RPF_MASK_SUBSECTION,
-                                   component))
-         {
-            
-            // now allocate the space we need and then reader the table in
-            
-            theSubframeMaskTable.resize(theImageDescriptionSubheader->getNumberOfSpectralGroups());
-            theSubframeTransparencyMaskTable.resize(theImageDescriptionSubheader->getNumberOfSpectralGroups());
-            
-            ossim_uint32 spectralIndex;
-            ossim_uint32 rowIndex;
-            ossim_uint32 colIndex;
-            
-            if(!theImageDescriptionSubheader->isSubframeMaskTableOffsetNull())
-            {
-               // move get to the first byte of the Mask table.  This is the offset from the
-               // start of the maskSubsection. 
-               in.seekg(component.m_componentLocation +
-                        theImageDescriptionSubheader->getSubframeMaskTableOffset(), ios::beg);
-               // first loop through the Mask table and allocate while we do it
-               for(spectralIndex = 0;
-                   spectralIndex < theImageDescriptionSubheader->getNumberOfSpectralGroups();
-                   ++spectralIndex)
-               {
-                  // reserve space for the number of rows
-                  theSubframeMaskTable[spectralIndex].resize(theImageDescriptionSubheader->getNumberOfSubframesVertical());
-                  for(rowIndex = 0;
-                      rowIndex < theImageDescriptionSubheader->getNumberOfSubframesVertical();
-                      ++rowIndex)
-                  {
-                     // allocate the columns
-                     theSubframeMaskTable[spectralIndex][rowIndex].resize(theImageDescriptionSubheader->getNumberOfSubframesHorizontal());
-                     for(colIndex = 0;
-                         colIndex < theImageDescriptionSubheader->getNumberOfSubframesHorizontal();
-                         ++colIndex)
-                     {
-                        ossim_uint32 value;
-                        
-                        in.read((char*)&value, 4);
-                        ossimEndian anEndian;
-                        
-                        if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
-                        {
-                           anEndian.swap(value);
-                        }
-                        theSubframeMaskTable[spectralIndex][rowIndex][colIndex] = value;
-                     }
-                  }
-               }
-            }
-            if(!theImageDescriptionSubheader->isTransparencyMaskTableOffsetNull())
-            {
-               // move get to the first byte of the Mask table.  This is the offset from the
-               // start of the maskSubsection. 
-               in.seekg(component.m_componentLocation +
-                        theImageDescriptionSubheader->getTransparencyMaskTableOffset(),ios::beg);
-               for(spectralIndex = 0;
-                   spectralIndex < theImageDescriptionSubheader->getNumberOfSpectralGroups();
-                   ++spectralIndex)
-               {
-                  // reserve space for the number of rows
-                  theSubframeTransparencyMaskTable[spectralIndex].resize(theImageDescriptionSubheader->getNumberOfSubframesVertical());
-                  for(rowIndex = 0;
-                      rowIndex < theImageDescriptionSubheader->getNumberOfSubframesVertical();
-                      ++rowIndex)
-                  {
-                     // allocate the columns
-                     theSubframeTransparencyMaskTable[spectralIndex][rowIndex].resize(theImageDescriptionSubheader->getNumberOfSubframesHorizontal());
-                     for(colIndex = 0;
-                         colIndex < theImageDescriptionSubheader->getNumberOfSubframesHorizontal();
-                         ++colIndex)
-                     {
-                        ossim_uint32 value;
-                        
-                        in.read((char*)&value, 4);
-                        ossimEndian anEndian;
-                        
-                        if(anEndian.getSystemEndianType() != theHeader->getByteOrder())
-                        {
-                           anEndian.swap(value);
-                        }
-                        theSubframeTransparencyMaskTable[spectralIndex][rowIndex][colIndex] = value;
-                     }
-                  }
-               }
-            }
-         }
-      }
-   }
-   
-   return ossimErrorCodes::OSSIM_OK;
-}
-
-ossimErrorCode ossimRpfFrame::populateReplaceUpdateTable(std::istream& in)
-{
-   ossimErrorCode result = ossimErrorCodes::OSSIM_OK;
-   
-   const ossimRpfLocationSection* location = theHeader->getLocationSection();
-
-   if( location )
-   {
-      if ( location->hasComponent(OSSIM_RPF_REPLACE_UPDATE_SECTION_SUBHEADER) )
-      {
-         ossimRpfComponentLocationRecord component;
-         if( location->getComponent(OSSIM_RPF_REPLACE_UPDATE_SECTION_SUBHEADER, component) )
-         {
-            ossimRefPtr<ossimRpfReplaceUpdateSectionSubheader> hdr =
-               new ossimRpfReplaceUpdateSectionSubheader();
-            
-            in.seekg(component.m_componentLocation, ios::beg);
-            
-            if( hdr->parseStream( in, theHeader->getByteOrder() ) == ossimErrorCodes::OSSIM_OK )
-            {
-               ossim_uint16 count = hdr->getNumberOfRecords();
-               if ( count )
-               {
-                  if ( theReplaceUpdateTable.valid() )
-                  {
-                     theReplaceUpdateTable->clear();
-                  }
-                  else
-                  {
-                     theReplaceUpdateTable = new ossimRpfReplaceUpdateTable();
-                  }
-                  ossimRpfReplaceUpdateRecord record;
-                  for ( ossim_uint16 i = 0; i < count; ++i )
-                  {
-                     if ( record.parseStream(in) == ossimErrorCodes::OSSIM_OK )
-                     {
-                        theReplaceUpdateTable->addRecord( record );
-                     }
-                     else
-                     {
-                        break;
-                     }
-                  }
-               }
-               
-            }
-         }  
-      }
-   }
-
-   if ( in.fail() )
-   {
-      theReplaceUpdateTable = 0;
-      result = ossimErrorCodes::OSSIM_ERROR;
-   }
-
-   return result;
-
-} // End: ossimRpfFrame::populateReplaceUpdateTable(std::istream& in)
-
-ossimRefPtr<ossimRpfReplaceUpdateTable> ossimRpfFrame::getRpfReplaceUpdateTable() const
-{
-   return theReplaceUpdateTable;
-}
diff --git a/src/ossim/support_data/ossimRpfFrameEntry.cpp b/src/ossim/support_data/ossimRpfFrameEntry.cpp
deleted file mode 100644
index 7b1b3a0..0000000
--- a/src/ossim/support_data/ossimRpfFrameEntry.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-//
-// Description: Rpf support class
-// 
-//********************************************************************
-// $Id: ossimRpfFrameEntry.cpp 18052 2010-09-06 14:33:08Z dburken $
-
-#include <ostream>
-#include <ossim/support_data/ossimRpfFrameEntry.h>
-
-std::ostream& operator<<(std::ostream& out, const ossimRpfFrameEntry& data)
-{
-   return data.print(out);
-}
-
-ossimRpfFrameEntry::ossimRpfFrameEntry(const ossimFilename& rootDirectory,
-                                       const ossimFilename& pathToFrameFileFromRoot)
-   :m_exists(false),
-    m_rootDirectory(rootDirectory),
-    m_pathToFrameFileFromRoot(pathToFrameFileFromRoot),
-    m_fullValidPath()
-{
-   setEntry(rootDirectory,
-            pathToFrameFileFromRoot);
-}
-
-ossimRpfFrameEntry::ossimRpfFrameEntry(const ossimRpfFrameEntry& obj)
-   :m_exists(obj.m_exists),
-    m_rootDirectory(obj.m_rootDirectory),
-    m_pathToFrameFileFromRoot(obj.m_pathToFrameFileFromRoot),
-    m_fullValidPath(obj.m_fullValidPath)
-{}
-
-const ossimRpfFrameEntry& ossimRpfFrameEntry::operator=(const ossimRpfFrameEntry& rhs)
-{
-   if (this != &rhs)
-   {
-      m_exists                  = rhs.m_exists;
-      m_rootDirectory           = rhs.m_rootDirectory;
-      m_pathToFrameFileFromRoot = rhs.m_pathToFrameFileFromRoot;
-      m_fullValidPath           = rhs.m_fullValidPath;
-   }
-   return *this;
-}
-
-void ossimRpfFrameEntry::setEntry(const ossimFilename& rootDirectory,
-                                  const ossimFilename& pathToFrameFileFromRoot)
-{
-   //---
-   // We must check for case combinations:
-   //---
-   m_rootDirectory           = rootDirectory;
-   m_pathToFrameFileFromRoot = pathToFrameFileFromRoot;
-   m_fullValidPath = m_rootDirectory.dirCat(m_pathToFrameFileFromRoot);
-
-   // Check as supplied:
-   if(m_fullValidPath.exists())
-   {
-      m_exists = true;
-   }
-   else // Check root/downcased_path
-   {
-      m_pathToFrameFileFromRoot = m_pathToFrameFileFromRoot.downcase();
-      m_fullValidPath = m_rootDirectory.dirCat(m_pathToFrameFileFromRoot);
-
-      if(m_fullValidPath.exists())
-      {
-         m_exists = true;
-      }
-      else // Check root/upcased_path
-      {
-         m_pathToFrameFileFromRoot = m_pathToFrameFileFromRoot.upcase();
-         m_fullValidPath =
-            m_rootDirectory.dirCat(m_pathToFrameFileFromRoot);
-         if(m_fullValidPath.exists())
-         {
-            m_exists = true;
-         }
-         else
-         {
-            m_pathToFrameFileFromRoot = pathToFrameFileFromRoot;
-            m_fullValidPath =
-               m_rootDirectory.dirCat(m_pathToFrameFileFromRoot);
-            m_exists = false;
-         }
-      }
-   }
-}
-std::ostream& ossimRpfFrameEntry::print(
-   std::ostream& out, const std::string& prefix) const
-{
-   out << prefix << "exists:       " << m_exists << "\n"
-       << prefix << "root_directory: " << m_rootDirectory << "\n"
-       << prefix << "relative_path: "
-       << m_pathToFrameFileFromRoot << "\n"
-       << prefix << "full_path:     " << m_fullValidPath << "\n";
-
-   return out;
-}
-
-bool ossimRpfFrameEntry::exists() const
-{
-   return m_exists;
-}
-
-const ossimFilename& ossimRpfFrameEntry::getFullPath() const
-{
-   return m_fullValidPath;
-}
-
-const ossimString& ossimRpfFrameEntry::getRootDirectory() const
-{
-   return m_rootDirectory;
-}
-
-const ossimString ossimRpfFrameEntry::getPathToFrameFileFromRoot() const
-{
-   return m_pathToFrameFileFromRoot;
-}
diff --git a/src/ossim/support_data/ossimRpfHeader.cpp b/src/ossim/support_data/ossimRpfHeader.cpp
deleted file mode 100644
index 191e6e1..0000000
--- a/src/ossim/support_data/ossimRpfHeader.cpp
+++ /dev/null
@@ -1,872 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: This class extends the stl's string class.
-//
-//********************************************************************
-// $Id: ossimRpfHeader.cpp 22013 2012-12-19 17:37:20Z dburken $
-
-#include <cstring>
-#include <iostream>
-#include <fstream>
-
-#include <ossim/support_data/ossimRpfHeader.h>
-#include <ossim/base/ossimCommon.h> /* ossim::byteOrder() */
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimErrorCodes.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/support_data/ossimNitfCommon.h>
-#include <ossim/support_data/ossimRpfLocationSection.h>
-#include <ossim/support_data/ossimRpfCoverageSection.h>
-#include <ossim/support_data/ossimRpfBoundaryRectSectionSubheader.h>
-#include <ossim/support_data/ossimRpfBoundaryRectTable.h>
-#include <ossim/support_data/ossimRpfFrameFileIndexSectionSubheader.h>
-#include <ossim/support_data/ossimRpfFrameFileIndexSubsection.h>
-#include <ossim/support_data/ossimRpfImageDescriptionSubheader.h>
-#include <ossim/support_data/ossimRpfMaskSubsection.h>
-#include <ossim/support_data/ossimRpfAttributeSectionSubheader.h>
-#include <ossim/support_data/ossimRpfImageDisplayParameterSubheader.h>
-#include <ossim/support_data/ossimRpfCompressionSectionSubheader.h>
-#include <ossim/support_data/ossimRpfCompressionSection.h>
-#include <ossim/support_data/ossimRpfColorGrayscaleSubheader.h>
-
-#include <ossim/base/ossimTrace.h>
-
- // Static trace for debugging
-static ossimTrace traceDebug("ossimRpfHeader:debug");
-
-// Keywords:
-static const ossimString HEADER_SECTION_LENGTH_KW    = "HeaderSectionLength";
-static const ossimString NEW_REP_UP_INDICATOR_KW     = "NewRepUpIndicator";
-static const ossimString GOV_SPEC_NUMBER_KW          = "GovSpecNumber";
-static const ossimString GOV_SPEC_DATE_KW            = "GovSpecDate";
-static const ossimString SECURITY_CLASSIFICATION_KW  = "SecurityClassification";
-static const ossimString COUNTRY_CODE_KW             = "CountryCode";
-static const ossimString SECURITY_RELEASE_MARKING_KW = "SecurityReleaseMarking";
-
-
-ossimRpfHeader::ossimRpfHeader()
-   :
-   ossimNitfRegisteredTag(std::string("RPFHDR"), 48),
-   m_littleBigEndianIndicator(0x00),
-   m_headerSectionLength(48),
-   m_fileName(),
-   m_newRepUpIndicator(0),
-   m_govSpecNumber(),
-   m_govSpecDate(),
-   m_securityClassification(),
-   m_countryCode(),
-   m_securityReleaseMarking(),
-   m_locSectionLoc(0),
-   m_locationSection(new ossimRpfLocationSection)
-{
-   memset(m_fileName, ' ' , 12);
-   memset(m_govSpecNumber, ' ', 15);
-   memset(m_govSpecDate, ' ', 8);
-   memset(m_securityClassification, ' ', 1);
-   memset(m_countryCode, ' ', 2);
-   memset(m_securityReleaseMarking, ' ', 2);
-   
-   m_fileName[12] = '\0';
-   m_govSpecNumber[15] = '\0';
-   m_govSpecDate[8] = '\0';
-   m_securityClassification[1] = '\0';
-   m_countryCode[2] = '\0';
-   m_securityReleaseMarking[2] = '\0';
-}
-
-ossimRpfHeader::ossimRpfHeader(const ossimRpfHeader& obj)
-   :
-   ossimNitfRegisteredTag(std::string("RPFHDR"), 48),
-   m_littleBigEndianIndicator(obj.m_littleBigEndianIndicator),
-   m_headerSectionLength(obj.m_headerSectionLength),
-   m_fileName(),
-   m_newRepUpIndicator(obj.m_newRepUpIndicator),
-   m_govSpecNumber(),
-   m_govSpecDate(),
-   m_securityClassification(),
-   m_countryCode(),
-   m_securityReleaseMarking(),
-   m_locSectionLoc(obj.m_locSectionLoc),
-   m_locationSection( new ossimRpfLocationSection( *(obj.m_locationSection) ) )
-{
-   memcpy(m_fileName, obj.m_fileName, 13);
-   memcpy(m_govSpecNumber, obj.m_govSpecNumber, 16);
-   memcpy(m_govSpecDate, obj.m_govSpecDate, 9);
-   memcpy(m_securityClassification, obj.m_securityClassification, 2);
-   memcpy(m_countryCode, obj.m_countryCode, 3);
-   memcpy(m_securityReleaseMarking, obj.m_securityReleaseMarking, 3);
-}
-
-const ossimRpfHeader& ossimRpfHeader::operator=(const ossimRpfHeader& rhs)
-{
-   if ( this != &rhs )
-   {
-      m_littleBigEndianIndicator = rhs.m_littleBigEndianIndicator;
-      m_headerSectionLength = rhs.m_headerSectionLength;
-      memcpy(m_fileName, rhs.m_fileName, 13);
-      m_newRepUpIndicator = rhs.m_newRepUpIndicator;
-      memcpy(m_govSpecNumber, rhs.m_govSpecNumber, 16);
-      memcpy(m_govSpecDate, rhs.m_govSpecDate, 9);   
-      memcpy(m_securityClassification, rhs.m_securityClassification, 2);
-      memcpy(m_countryCode, rhs.m_countryCode, 3);
-      memcpy(m_securityReleaseMarking, rhs.m_securityReleaseMarking, 3);
-      m_locSectionLoc = rhs.m_locSectionLoc;
-
-      m_locationSection = new ossimRpfLocationSection( *(rhs.m_locationSection) );
-   }
-   return *this;
-}
-
-ossimRpfHeader::~ossimRpfHeader()
-{
-   if(m_locationSection)
-   {
-      delete m_locationSection;
-      m_locationSection = 0;
-   }
-}
-
-void ossimRpfHeader::parseStream(std::istream& in)
-{
-   if(in)
-   {
-      in.read((char*)&m_littleBigEndianIndicator, 1);
-
-      in.read((char*)&m_headerSectionLength, 2);
-      in.read((char*)m_fileName, 12);
-      in.read((char*)&m_newRepUpIndicator, 1);
-      in.read((char*)m_govSpecNumber, 15);
-      in.read((char*)m_govSpecDate, 8);
-      in.read((char*)m_securityClassification, 1);
-      in.read((char*)m_countryCode, 2);
-      in.read((char*)m_securityReleaseMarking, 2);
-      in.read((char*)&m_locSectionLoc, 4);
-      
-      m_fileName[12] = '\0';
-      m_govSpecNumber[15] = '\0';
-      m_govSpecDate[8] = '\0';
-      m_securityClassification[1] = '\0';
-      m_countryCode[2] = '\0';
-      m_securityReleaseMarking[2] = '\0';
-      
-      //---
-      // From spec:  MIL-PRF-89038CARDG m_littleBigEndianIndicator shall
-      // be 0x00 for all data denoting big endian storage.  We will test
-      // anyway just in case...
-      //---
-      ossimByteOrder dataByteOrder = getByteOrder();
-
-      if( ossim::byteOrder() != dataByteOrder )
-      {
-         ossimEndian anEndian;
-         anEndian.swap(m_headerSectionLength);
-         anEndian.swap(m_locSectionLoc);
-      }
-
-      std::streamoff saveGet = in.tellg();
-      in.seekg(m_locSectionLoc, ios::beg);
-      m_locationSection->parseStream(in, dataByteOrder);
-      in.seekg(saveGet, ios::beg);
-   }
-}
-
-void ossimRpfHeader::writeStream(std::ostream& out)
-{
-   // Always write in big endian.
-   if (m_littleBigEndianIndicator != 0x00)
-   {
-      ossimNotify(ossimNotifyLevel_NOTICE)
-         << "ossimRpfHeader::writeStream writing in big endian even though"
-         << " the m_littleBigEndianIndicator is set to little endian."
-         << std::endl;
-      m_littleBigEndianIndicator = 0x00;
-   }
-   
-   ossimByteOrder dataByteOrder = getByteOrder();
-
-   if( ossim::byteOrder() != dataByteOrder )
-   {
-      ossimEndian anEndian;
-      anEndian.swap(m_headerSectionLength);
-      anEndian.swap(m_locSectionLoc);
-   }
-
-   out.write((char*)&m_littleBigEndianIndicator, 1);
-   
-   out.write((char*)&m_headerSectionLength, 2);
-   out.write((char*)m_fileName, 12);
-   out.write((char*)&m_newRepUpIndicator, 1);
-   out.write((char*)m_govSpecNumber, 15);
-   out.write((char*)m_govSpecDate, 8);
-   out.write((char*)m_securityClassification, 1);
-   out.write((char*)m_countryCode, 2);
-   out.write((char*)m_securityReleaseMarking, 2);
-   out.write((char*)&m_locSectionLoc, 4);
-
-   if( ossim::byteOrder() != dataByteOrder )
-   {
-      // Must swap things back or we will seek to a bad location.
-      ossimEndian anEndian;
-      anEndian.swap(m_headerSectionLength);
-      anEndian.swap(m_locSectionLoc);
-   }
-
-   if (m_locSectionLoc) // May or may not be set.
-   {
-      std::streampos pos = out.tellp();
-      out.seekp(m_locSectionLoc, ios::beg);
-      m_locationSection->writeStream(out);
-      out.seekp(pos);
-   }
-}
-
-std::ostream& ossimRpfHeader::print(std::ostream& out, const std::string& prefix) const
-{
-   out << prefix << "byte_order:               "
-       << (m_littleBigEndianIndicator==0x00?"big_endian\n":"little_endian\n")
-       << prefix << HEADER_SECTION_LENGTH_KW << ":      "
-       << m_headerSectionLength << "\n"
-       << prefix << ossimKeywordNames::FILENAME_KW << ":                 "
-       << m_fileName << "\n"
-       << prefix << NEW_REP_UP_INDICATOR_KW << ":        "
-       << int(m_newRepUpIndicator) << "\n"       
-       << prefix << GOV_SPEC_NUMBER_KW << ":            "
-       << m_govSpecNumber << "\n"
-       << prefix << GOV_SPEC_DATE_KW << ":              "
-       << m_govSpecDate << "\n"
-       << prefix << SECURITY_CLASSIFICATION_KW << ":   "
-       << m_securityClassification << "\n"
-       << prefix << COUNTRY_CODE_KW << ":              "
-       << m_countryCode   << "\n"           
-       << prefix << SECURITY_RELEASE_MARKING_KW << ":   "
-       << m_securityReleaseMarking << "\n";
-
-   if ( traceDebug() )
-   {
-      out << prefix << "LocSectionLoc:            "
-          << m_locSectionLoc << "\n";
-      if (m_locationSection)
-      {
-         m_locationSection->print(out, prefix);
-      }
-   }
-
-   return out;
-}
-
-ossimByteOrder ossimRpfHeader::getByteOrder()const
-{
-   return ( (m_littleBigEndianIndicator==0x00) ? OSSIM_BIG_ENDIAN : OSSIM_LITTLE_ENDIAN);
-}
-
-const ossimRpfLocationSection* ossimRpfHeader::getLocationSection() const
-{
-   return m_locationSection;
-}
-
-ossimRpfLocationSection* ossimRpfHeader::getLocationSection()
-{
-   return m_locationSection;
-}
-
-bool ossimRpfHeader::hasComponent(ossimRpfComponentId componentId)const
-{
-   if(m_locationSection)
-   {
-      return m_locationSection->hasComponent(componentId);
-   }
-   
-   return false;
-}
-
-ossimString ossimRpfHeader::getSecurityClassification()const
-{
-   return m_securityClassification;
-}
-
-ossimRpfCoverageSection* ossimRpfHeader::getNewCoverageSection(std::istream& in)const
-{
-   ossimRpfCoverageSection* result = 0;
-
-   if(in&&m_locationSection)
-   {
-      ossimRpfComponentLocationRecord component;
-
-      if(m_locationSection->getComponent(OSSIM_RPF_COVERAGE_SECTION_SUBHEADER,
-                                          component))
-      {
-         result = new ossimRpfCoverageSection;
-
-         in.seekg(component.m_componentLocation, ios::beg);
-         
-         if(in)
-         {
-            result->parseStream(in, getByteOrder());
-         }
-         else
-         {
-            delete result;
-            result = 0;
-         }
-      }
-   }
-   return result;
-}
-
-ossimRpfMaskSubsection*  ossimRpfHeader::getNewMaskSubsection(std::istream& in)const
-{
-   ossimRpfMaskSubsection* result = 0;
-
-   if(in&&m_locationSection)
-   {
-      ossimRpfComponentLocationRecord component;
-
-      if(m_locationSection->getComponent(OSSIM_RPF_MASK_SUBSECTION,
-                                          component))
-      {
-         result = new ossimRpfMaskSubsection;
-
-         in.seekg(component.m_componentLocation, ios::beg);
-         
-         if(in)
-         {
-            if(result->parseStream(in, getByteOrder()) !=
-               ossimErrorCodes::OSSIM_OK)
-            {
-               delete result;
-               result = 0;
-            }
-         }
-         else
-         {
-            delete result;
-            result = 0;
-         }
-      }
-   }
-   
-   return result;   
-}
-
-
-ossimRpfAttributeSectionSubheader* ossimRpfHeader::getNewAttributeSectionSubheader(std::istream& in)const
-{
-   ossimRpfAttributeSectionSubheader* result = 0;
-
-   if(in&&m_locationSection)
-   {
-      ossimRpfComponentLocationRecord component;
-
-      if(m_locationSection->getComponent(OSSIM_RPF_ATTRIBUTE_SECTION_SUBHEADER,
-                                          component))
-      {
-         result = new ossimRpfAttributeSectionSubheader;
-
-         in.seekg(component.m_componentLocation, ios::beg);
-         
-         if(in)
-         {
-            if(result->parseStream(in, getByteOrder()) !=
-               ossimErrorCodes::OSSIM_OK)
-            {
-               delete result;
-               result = 0;
-            }
-         }
-         else
-         {
-            delete result;
-            result = 0;
-         }
-      }
-   }
-   
-   return result;
-}
-
-ossimRpfColorGrayscaleSubheader* ossimRpfHeader::getNewColorGrayscaleSubheader(std::istream& in)const
-{
-   ossimRpfColorGrayscaleSubheader* result = 0;
-   
-   if(in&&m_locationSection)
-   {
-      ossimRpfComponentLocationRecord component;
-
-      if(m_locationSection->getComponent(OSSIM_RPF_COLOR_GRAYSCALE_SECTION_SUBHEADER,
-                                          component))
-      {
-         result = new ossimRpfColorGrayscaleSubheader;
-
-         in.seekg(component.m_componentLocation, ios::beg);
-         
-         if(in)
-         {
-            if(result->parseStream(in, getByteOrder()) !=
-               ossimErrorCodes::OSSIM_OK)
-            {
-               delete result;
-               result = 0;
-            }
-         }
-         else
-         {
-            delete result;
-            result = 0;
-         }
-      }      
-   }
-
-   return result;
-}
-
-ossimRpfCompressionSection* ossimRpfHeader::getNewCompressionSection(std::istream& in)const
-{   
-   ossimRpfCompressionSection* result = 0;
-
-   if(in&&m_locationSection)
-   {
-      ossimRpfComponentLocationRecord component;
-
-      if(m_locationSection->getComponent(OSSIM_RPF_COMPRESSION_SECTION_SUBHEADER,
-                                          component))
-      {
-         result = new ossimRpfCompressionSection;
-         
-         in.seekg(component.m_componentLocation, ios::beg);
-         
-         if(in)
-         {
-            if(result->parseStream(in, getByteOrder()) !=
-               ossimErrorCodes::OSSIM_OK)
-            {
-               delete result;
-               result = 0;
-            }
-         }
-         else
-         {
-            delete result;
-            result = 0;
-         }
-      }
-   }
-   
-   return result;   
-}
-
-ossimRpfCompressionSectionSubheader* ossimRpfHeader::getNewCompressionSectionSubheader(std::istream& in)const
-{
-   ossimRpfCompressionSectionSubheader* result = 0;
-
-   if(in&&m_locationSection)
-   {
-      ossimRpfComponentLocationRecord component;
-
-      if(m_locationSection->getComponent(OSSIM_RPF_COMPRESSION_SECTION_SUBHEADER,
-                                          component))
-      {
-         result = new ossimRpfCompressionSectionSubheader;
-
-         in.seekg(component.m_componentLocation, ios::beg);
-         
-         if(in)
-         {
-            if(result->parseStream(in, getByteOrder()) !=
-               ossimErrorCodes::OSSIM_OK)
-            {
-               delete result;
-               result = 0;
-            }
-         }
-         else
-         {
-            delete result;
-            result = 0;
-         }
-      }
-   }
-   
-   return result;   
-}
-
-   
-
-ossimRpfImageDisplayParameterSubheader* ossimRpfHeader::getNewImageDisplayParameterSubheader(std::istream& in)const
-{
-   ossimRpfImageDisplayParameterSubheader* result = 0;
-
-   if(in&&m_locationSection)
-   {
-      ossimRpfComponentLocationRecord component;
-
-      if(m_locationSection->getComponent(OSSIM_RPF_IMAGE_DISPLAY_PARAMETERS_SUBHEADER,
-                                          component))
-      {
-         result = new ossimRpfImageDisplayParameterSubheader;
-
-         in.seekg(component.m_componentLocation, ios::beg);
-         
-         if(in)
-         {
-            if(result->parseStream(in, getByteOrder()) !=
-               ossimErrorCodes::OSSIM_OK)
-            {
-               delete result;
-               result = 0;
-            }
-         }
-         else
-         {
-            delete result;
-            result = 0;
-         }
-      }
-   }
-   
-   return result;
-}
-
-ossimRpfImageDescriptionSubheader* ossimRpfHeader::getNewImageDescriptionSubheader(std::istream& in)const
-{
-   ossimRpfImageDescriptionSubheader* result = 0;
-
-   if(in&&m_locationSection)
-   {
-      ossimRpfComponentLocationRecord component;
-
-      if(m_locationSection->getComponent(OSSIM_RPF_IMAGE_DESCRIPTION_SUBHEADER,
-                                          component))
-      {
-         result = new ossimRpfImageDescriptionSubheader;
-
-         in.seekg(component.m_componentLocation, ios::beg);
-         
-         if(in)
-         {
-            if(result->parseStream(in, getByteOrder()) !=
-               ossimErrorCodes::OSSIM_OK)
-            {
-               delete result;
-               result = 0;
-            }
-         }
-         else
-         {
-            delete result;
-            result = 0;
-         }
-      }
-   }
-   
-   return result;
-}
-
-
-ossimRpfBoundaryRectTable* ossimRpfHeader::getNewBoundaryRectTable(std::istream &in)const
-{
-   ossimRpfBoundaryRectTable* result = 0;
-
-   if(in&&m_locationSection)
-   {
-      ossimRpfComponentLocationRecord component;
-
-      ossimRpfBoundaryRectSectionSubheader* tempSubheader = getNewBoundaryRectSectSubheader(in);
-
-      if(tempSubheader)
-      {
-         if(m_locationSection->getComponent(OSSIM_RPF_BOUNDARY_RECT_TABLE,
-                                             component))
-         {
-            result = new ossimRpfBoundaryRectTable;
-            
-            result->setNumberOfEntries(tempSubheader->getNumberOfEntries());
-            in.seekg(component.m_componentLocation, ios::beg);
-            if(in)
-            {
-               if(result->parseStream(in, getByteOrder()) !=
-                  ossimErrorCodes::OSSIM_OK)
-               {
-                  delete result;
-                  result = 0;
-               }
-            }
-            else
-            {
-               delete result;
-               result = 0;
-            }
-         }
-
-         delete tempSubheader;
-         tempSubheader = 0;
-      }
-   }   
-
-   return result;
-}
-
-ossimRpfBoundaryRectSectionSubheader* ossimRpfHeader::getNewBoundaryRectSectSubheader(std::istream &in)const
-{
-   ossimRpfBoundaryRectSectionSubheader* result = 0;
-
-   if(in&&m_locationSection)
-   {
-      ossimRpfComponentLocationRecord component;
-      
-      if(m_locationSection->getComponent(OSSIM_RPF_BOUNDARY_RECT_SECTION_SUBHEADER,
-                                          component))
-      {
-         result = new ossimRpfBoundaryRectSectionSubheader;
-
-         in.seekg(component.m_componentLocation, ios::beg);
-         
-         if(in)
-         {
-            if(result->parseStream(in, getByteOrder()) !=
-               ossimErrorCodes::OSSIM_OK)
-            {
-               delete result;
-               result = 0;
-            }
-         }
-         else
-         {
-            delete result;
-            result = 0;
-         }
-      }
-   }   
-
-   return result;
-   
-}
-
-ossimRpfFrameFileIndexSectionSubheader* ossimRpfHeader::getNewFrameFileIndexSectionSubheader(std::istream &in)const
-{
-   ossimRpfFrameFileIndexSectionSubheader* result = 0;
-
-   if(in&&m_locationSection)
-   {
-      ossimRpfComponentLocationRecord component;
-
-      if(m_locationSection->getComponent(OSSIM_RPF_FRAME_FILE_INDEX_SECTION_SUBHEADER,
-                                          component))
-      {
-         result = new ossimRpfFrameFileIndexSectionSubheader;
-
-         in.seekg(component.m_componentLocation, ios::beg);
-         if(in)
-         {
-            if(result->parseStream(in, getByteOrder()) !=
-               ossimErrorCodes::OSSIM_OK)
-            {
-               delete result;
-               result = 0;
-            }
-         }
-         else
-         {
-            delete result;
-            result = 0;
-         }
-      }
-   }   
-
-   return result;   
-}
-
-ossimRpfFrameFileIndexSubsection* ossimRpfHeader::getNewFileIndexSubsection(std::istream& in)const
-{
-   ossimRpfFrameFileIndexSubsection* result = 0;
-
-   if(in&&m_locationSection)
-   {
-      ossimRpfComponentLocationRecord component;
-      ossimRpfFrameFileIndexSectionSubheader* tempSubheader = getNewFrameFileIndexSectionSubheader(in);
-
-      if(m_locationSection->getComponent(OSSIM_RPF_FRAME_FILE_INDEX_SUBSECTION,
-                                          component))
-      {
-         result = new ossimRpfFrameFileIndexSubsection;
-
-         result->setNumberOfFileIndexRecords(tempSubheader->getNumberOfIndexRecords());
-         result->setNumberOfPathnames(tempSubheader->getNumberOfPathnameRecords());
-         in.seekg(component.m_componentLocation, ios::beg);
-         if(in)
-         {
-            if(result->parseStream(in, getByteOrder()) !=
-               ossimErrorCodes::OSSIM_OK)
-            {
-               delete result;
-               result = 0;
-            }
-         }
-         else
-         {
-            delete result;
-            result = 0;
-         }
-      }
-      if(tempSubheader)
-      {
-         delete tempSubheader;
-         tempSubheader = 0;
-      }
-   }   
-
-   return result;      
-}
-
-ossimRpfCompressionSection* ossimRpfHeader::getNewCompressionSection(const ossimFilename& file)const
-{
-   ifstream in(file.c_str(), ios::in|ios::binary);
-
-   return getNewCompressionSection(in);
-}
-
-ossimRpfCoverageSection* ossimRpfHeader::getNewCoverageSection(const ossimFilename& file)const
-{
-   ifstream in(file.c_str(), ios::in|ios::binary);
-   
-   return getNewCoverageSection(in);
-}
-
-ossimRpfBoundaryRectTable* ossimRpfHeader::getNewBoundaryRectTable(const ossimFilename &file)const
-{
-   ifstream in(file.c_str(), ios::in|ios::binary);
-   
-   return getNewBoundaryRectTable(in);
-}
-
-ossimRpfBoundaryRectSectionSubheader* ossimRpfHeader::getNewBoundaryRectSectSubheader(const ossimFilename &file)const
-{
-   ifstream in(file.c_str(), ios::in|ios::binary);
-
-   return getNewBoundaryRectSectSubheader(in);
-}
-
-ossimRpfFrameFileIndexSectionSubheader* ossimRpfHeader::getNewFrameFileIndexSectionSubheader(const ossimFilename &file)const
-{
-   ifstream in(file.c_str(), ios::in|ios::binary);
-
-   return getNewFrameFileIndexSectionSubheader(in);
-}
-
-ossimRpfFrameFileIndexSubsection* ossimRpfHeader::getNewFileIndexSubsection(const ossimFilename& file)const
-{
-   ifstream in(file.c_str(), ios::in|ios::binary);
-
-   return getNewFileIndexSubsection(in);
-}
-
-ossimString ossimRpfHeader::getDate()const
-{
-   return m_govSpecDate;
-}
-
-ossim_uint32 ossimRpfHeader::getLocationSectionLocation() const
-{
-   return m_locSectionLoc;
-}
-
-void ossimRpfHeader::setFilename(const ossimString& file)
-{
-   ossimNitfCommon::setField(m_fileName, file, 12);
-}
-
-void ossimRpfHeader::setNewRepUpIndicator(const ossimString& s)
-{
-   if (s.size())
-   {
-      // Range check maybe??? (drb)
-      m_newRepUpIndicator = static_cast<ossim_uint8>(*s.begin());
-   }
-}
-
-void ossimRpfHeader::setGovSpecNumber(const ossimString& s)
-{
-   ossimNitfCommon::setField(m_govSpecNumber, s, 15); 
-}
-
-void ossimRpfHeader::setGovSpecDate(const ossimString& s)
-{
-   ossimNitfCommon::setField(m_govSpecDate, s, 8); 
-}
-
-void ossimRpfHeader::setSecurityClassification(const ossimString& s)
-{
-   ossimNitfCommon::setField(m_securityClassification, s, 1);
-}
-
-void ossimRpfHeader::setCountryCode(const ossimString& s)
-{
-   ossimNitfCommon::setField(m_countryCode, s, 2); 
-}
-
-void ossimRpfHeader::setSecurityReleaseMarking(const ossimString& s)
-{
-   ossimNitfCommon::setField(m_securityReleaseMarking, s, 2);
-}
-
-void ossimRpfHeader::setLocationSectionPos(std::streamoff off)
-{
-   m_locSectionLoc = static_cast<ossim_uint32>(off);
-}
-
-bool ossimRpfHeader::loadState(const ossimKeywordlist& kwl, const char* prefix)
-{
-   const char* lookup = 0;
-   ossimString s;
-
-   lookup = kwl.find(prefix, NEW_REP_UP_INDICATOR_KW);
-   if (lookup)
-   {
-      s = lookup;
-      setNewRepUpIndicator(s);
-   }
-
-   lookup = kwl.find(prefix, GOV_SPEC_NUMBER_KW);
-   if (lookup)
-   {
-      s = lookup;
-      setGovSpecNumber(s);
-   }
-
-   lookup = kwl.find(prefix, GOV_SPEC_DATE_KW);
-   if (lookup)
-   {
-      s = lookup;
-      setGovSpecDate(s);
-   }
-
-   lookup = kwl.find(prefix, SECURITY_CLASSIFICATION_KW);
-   if (lookup)
-   {
-      s = lookup;
-      setSecurityClassification(s);
-   }
-
-   lookup = kwl.find(prefix, COUNTRY_CODE_KW);
-   if (lookup)
-   {
-      s = lookup;
-      setCountryCode(s);
-   }
-
-   lookup = kwl.find(prefix, SECURITY_RELEASE_MARKING_KW);
-   if (lookup)
-   {
-      s = lookup;
-      setSecurityReleaseMarking(s);
-   }
-
-   return true;
-}
diff --git a/src/ossim/support_data/ossimRpfImageDescriptionSubheader.cpp b/src/ossim/support_data/ossimRpfImageDescriptionSubheader.cpp
deleted file mode 100644
index 070928e..0000000
--- a/src/ossim/support_data/ossimRpfImageDescriptionSubheader.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: This class extends the stl's string class.
-//
-//********************************************************************
-// $Id: ossimRpfImageDescriptionSubheader.cpp 14241 2009-04-07 19:59:23Z dburken $
-
-#include <istream>
-#include <ostream>
-#include <ossim/support_data/ossimRpfImageDescriptionSubheader.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimErrorCodes.h>
-
-std::ostream& operator <<(std::ostream& out,
-                          const ossimRpfImageDescriptionSubheader& data)
-{
-   return data.print(out);
-}
-
-ossimRpfImageDescriptionSubheader::ossimRpfImageDescriptionSubheader()
-{
-   clearFields();
-}
-
-ossimErrorCode ossimRpfImageDescriptionSubheader::parseStream(
-   std::istream& in, ossimByteOrder byteOrder)
-{
-   if(in)
-   {
-      theStartOffset = in.tellg();
-      in.read((char*)&theNumberOfSpectralGroups, 2);
-      in.read((char*)&theNumberOfSubframeTables, 2);
-      in.read((char*)&theNumberOfSpectralBandTables, 2);
-      in.read((char*)&theNumberOfSpectralBandLinesPerImageRow, 2);
-      in.read((char*)&theNumberOfSubframesHorizontal, 2);
-      in.read((char*)&theNumberOfSubframesVertical, 2);
-      in.read((char*)&theNumberOfOutputColumnsPerSubframe, 4);
-      in.read((char*)&theNumberOfOutputRowsPerSubframe, 4);
-      in.read((char*)&theSubframeMaskTableOffset, 4);
-      in.read((char*)&theTransparencyMaskTableOffset, 4);
-
-      theEndOffset = in.tellg();
-      ossimEndian anEndian;
-
-      if(anEndian.getSystemEndianType() != byteOrder)
-      {
-         anEndian.swap(theNumberOfSpectralGroups);
-         anEndian.swap(theNumberOfSubframeTables);
-         anEndian.swap(theNumberOfSpectralBandTables);
-         anEndian.swap(theNumberOfSpectralBandLinesPerImageRow);
-         anEndian.swap(theNumberOfSubframesHorizontal);
-         anEndian.swap(theNumberOfSubframesVertical);
-         anEndian.swap(theNumberOfOutputColumnsPerSubframe);
-         anEndian.swap(theNumberOfOutputRowsPerSubframe);
-         anEndian.swap(theSubframeMaskTableOffset);
-         anEndian.swap(theTransparencyMaskTableOffset);
-      }
-   }
-   else
-   {
-      return ossimErrorCodes::OSSIM_ERROR;
-   }
-
-   return ossimErrorCodes::OSSIM_OK;
-}
-
-std::ostream& ossimRpfImageDescriptionSubheader::print(
-   std::ostream& out, const std::string& prefix) const
-{
-   out << prefix << "NumberOfSpectralGroups: "
-       << theNumberOfSpectralGroups << "\n"
-       << prefix << "NumberOfSubframeTables: "
-       << theNumberOfSubframeTables << "\n"
-       << prefix << "NumberOfSpectralBandTables: "
-       << theNumberOfSpectralBandTables << "\n"
-       << prefix << "NumberOfSpectralBandLinesPerImageRow: "
-       << theNumberOfSpectralBandLinesPerImageRow << "\n"
-       << prefix << "NumberOfSubframesHorizontal: "
-       << theNumberOfSubframesHorizontal << "\n"
-       << prefix << "NumberOfSubframesVertical: "
-       << theNumberOfSubframesVertical << "\n"
-       << prefix << "NumberOfOutputColumnsPerSubframe: "
-       << theNumberOfOutputColumnsPerSubframe << "\n"
-       << prefix << "NumberOfOutputRowsPerSubframe: "
-       << theNumberOfOutputRowsPerSubframe << "\n"
-       << prefix << "SubframeMaskTableOffset: "
-       << theSubframeMaskTableOffset << "\n"
-       << prefix << "TransparencyMaskTableOffset: "
-       << theTransparencyMaskTableOffset << std::endl;
-   return out;
-}
-
-void ossimRpfImageDescriptionSubheader::clearFields()
-{
-   theStartOffset                          = 0;
-   theEndOffset                            = 0;
-   
-   theNumberOfSpectralGroups               = 0;
-   theNumberOfSubframeTables               = 0;
-   theNumberOfSpectralBandTables           = 0;
-   theNumberOfSpectralBandLinesPerImageRow = 0;
-   theNumberOfSubframesHorizontal          = 0;
-   theNumberOfSubframesVertical            = 0;
-   theNumberOfOutputColumnsPerSubframe     = 0;
-   theNumberOfOutputRowsPerSubframe        = 0;
-   theSubframeMaskTableOffset              = 0;
-   theTransparencyMaskTableOffset          = 0;
-}
diff --git a/src/ossim/support_data/ossimRpfInfo.cpp b/src/ossim/support_data/ossimRpfInfo.cpp
deleted file mode 100644
index 34a6c6a..0000000
--- a/src/ossim/support_data/ossimRpfInfo.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  Mingjie Su
-//
-// Description: Rpf Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimRpfInfo.cpp 1237 2010-08-05 19:50:27Z ming.su $
-
-//ossim includes
-#include <ossim/base/ossimTrace.h>
-#include <ossim/support_data/ossimRpfInfo.h>
-#include <ossim/support_data/ossimInfoFactory.h>
-
-// Static trace for debugging
-static ossimTrace traceDebug("ossimRpfInfo:debug");
-static ossimTrace traceDump("ossimRpfInfo:dump"); // This will dump offsets.
-
-ossimRpfInfo::ossimRpfInfo()
-   : ossimInfoBase(),
-     theFile(),
-     m_infoFile()
-{
-}
-
-ossimRpfInfo::~ossimRpfInfo()
-{
-}
-
-bool ossimRpfInfo::open(const ossimFilename& file)
-{
-   theFile = file;
-   if (isOpen())
-   {
-     std::ifstream in((theFile).c_str() );
-
-     std::string line;
-     int index = 0;
-     while(in.good())
-     {
-       // Read in a line.
-       std::getline(in, line);
-       ossimString tmpStr = ossimString(line);
-       if (index > 0)
-       {
-         if (!tmpStr.empty())
-         {
-           std::vector<ossimString> tmpVector = tmpStr.split("|");
-           if (tmpVector.size() > 0)
-           {
-             m_infoFile = tmpVector[0];
-             break;
-           }
-         }
-       }
-       index++;
-     }
-     in.close();
-
-     return true;
-   }
-   return false;
-}
-
-bool ossimRpfInfo::isOpen()
-{
-  ossimString ext = theFile.ext().downcase();
-
-  if(ext == "rpf")
-  {
-    return true;
-  }
-  else
-  {
-    return false;
-  }
-}
-
-std::ostream& ossimRpfInfo::print(std::ostream& out) const
-{
-  ossimInfoBase* info = ossimInfoFactory::instance()->create(m_infoFile);
-  if (info)
-  {
-    info->print(out);
-  }
-
-  return out;
-}
\ No newline at end of file
diff --git a/src/ossim/support_data/ossimRpfLocationSection.cpp b/src/ossim/support_data/ossimRpfLocationSection.cpp
deleted file mode 100644
index 3b89862..0000000
--- a/src/ossim/support_data/ossimRpfLocationSection.cpp
+++ /dev/null
@@ -1,315 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: Rpf support class
-//
-//********************************************************************
-// $Id: ossimRpfLocationSection.cpp 20324 2011-12-06 22:25:23Z dburken $
-
-#include <ossim/support_data/ossimRpfLocationSection.h>
-#include <ossim/base/ossimCommon.h> /* ossim::byteOrder() */
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimErrorCodes.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/support_data/ossimRpfComponentIdLut.h>
-#include <istream>
-#include <ostream>
-#include <iterator>
-
-static const ossimTrace traceDebug("ossimRpfLocationSection:debug");
-
-std::ostream& operator<<(std::ostream& out, const ossimRpfComponentLocationRecord& data)
-{
-   return data.print(out);
-}
-
-ossimRpfComponentLocationRecord::ossimRpfComponentLocationRecord()
-   : m_componentId(0),
-     m_componentLength(0),
-     m_componentLocation(0)
-{
-}
-
-ossimRpfComponentLocationRecord::ossimRpfComponentLocationRecord(
-   const ossimRpfComponentLocationRecord& record)
-   : m_componentId(record.m_componentId),
-     m_componentLength(record.m_componentLength),
-     m_componentLocation(record.m_componentLocation)
-{
-}
-
-const ossimRpfComponentLocationRecord& ossimRpfComponentLocationRecord::operator=(
-   const ossimRpfComponentLocationRecord& rhs)
-{
-   if (this != &rhs)
-   {
-      m_componentId       = rhs.m_componentId;
-      m_componentLength   = rhs.m_componentLength;
-      m_componentLocation = rhs.m_componentLocation;
-   }
-   return *this;
-}
-
-std::ostream& ossimRpfComponentLocationRecord::print(
-   std::ostream& out, const std::string& prefix) const
-{
-   out << prefix << "ComponentId:             "
-       << m_componentId << "\n"
-       << prefix << "ComponentIdString:       "
-       << ossimRpfComponentIdLut::instance()->getEntryString(m_componentId) << "\n"
-       << prefix << "ComponentLength:         "
-       << m_componentLength   << "\n"
-       << prefix << "ComponentLocation:       "
-       << m_componentLocation << "\n";
-   return out;
-}
-
-std::ostream& operator <<(std::ostream& out, const ossimRpfLocationSection &data)
-{
-   return data.print(out);
-}
-
-ossimErrorCode ossimRpfComponentLocationRecord::parseStream(
-   std::istream& in, ossimByteOrder byteOrder)
-{
-   if(in)
-   {
-      in.read((char*)&m_componentId, 2);
-      in.read((char*)&m_componentLength, 4);
-      in.read((char*)&m_componentLocation, 4);
-
-      if( ossim::byteOrder() != byteOrder)
-      {
-         // swap to native
-         ossimEndian anEndian;
-         anEndian.swap(m_componentId);
-         anEndian.swap(m_componentLength);
-         anEndian.swap(m_componentLocation);
-      }
-   }
-   else
-   {
-      return ossimErrorCodes::OSSIM_ERROR;
-   }
-
-   return  ossimErrorCodes::OSSIM_OK;
-}
-
-void ossimRpfComponentLocationRecord::writeStream(std::ostream& out)
-{
-   if( ossim::byteOrder() != OSSIM_BIG_ENDIAN)
-   {
-      ossimEndian endian;
-      endian.swap(m_componentId);
-      endian.swap(m_componentLength);
-      endian.swap(m_componentLocation);
-   }
-
-   out.write((char*)&m_componentId, 2);
-   out.write((char*)&m_componentLength, 4);
-   out.write((char*)&m_componentLocation, 4);
-
-   if( ossim::byteOrder() != OSSIM_BIG_ENDIAN)
-   {
-      // Swap back to native byte order.
-      ossimEndian endian;
-      endian.swap(m_componentId);
-      endian.swap(m_componentLength);
-      endian.swap(m_componentLocation);
-   }
-}
-
-ossimRpfLocationSection::ossimRpfLocationSection()
-{
-   clearFields();
-}
-
-ossimErrorCode ossimRpfLocationSection::parseStream(std::istream& in,
-                                                    ossimByteOrder byteOrder)
-{
-   ossimErrorCode result = ossimErrorCodes::OSSIM_OK;
-   
-   if(in)
-   {
-      clearFields();
-      
-      in.read((char*)&m_locationSectionLength, 2);
-      in.read((char*)&m_locationTableOffset, 4);
-      in.read((char*)&m_numberOfComponentLocationRecords, 2);
-      in.read((char*)&m_locationRecordLength, 2);
-      in.read((char*)&m_componentAggregateLength, 4);
-
-      if( ossim::byteOrder() != byteOrder )
-      {
-         ossimEndian anEndian;
-         anEndian.swap(m_locationSectionLength);
-         anEndian.swap(m_locationTableOffset);
-         anEndian.swap(m_numberOfComponentLocationRecords);
-         anEndian.swap(m_locationRecordLength);
-         anEndian.swap(m_componentAggregateLength);
-      }
-      
-      if(traceDebug())
-      {
-         print(ossimNotify(ossimNotifyLevel_DEBUG));
-         ossimNotify(ossimNotifyLevel_DEBUG) << std::endl;
-      }
-
-      m_componentLocationList.resize(m_numberOfComponentLocationRecords);
-      for(ossim_uint32 index = 0;
-          (index < m_componentLocationList.size())&&
-             (result == ossimErrorCodes::OSSIM_OK);
-          ++index)
-      {        
-         result = m_componentLocationList[index].parseStream(in, byteOrder);
-      }
-   }
-   else
-   {
-      result = ossimErrorCodes::OSSIM_ERROR;
-   }
-
-   return result;
-}
-
-
-void ossimRpfLocationSection::writeStream(std::ostream& out)
-{
-   if( ossim::byteOrder() != OSSIM_BIG_ENDIAN)
-   {
-      // Always write in big endian.
-      ossimEndian endian;
-      endian.swap(m_locationSectionLength);
-      endian.swap(m_locationTableOffset);
-      endian.swap(m_numberOfComponentLocationRecords);
-      endian.swap(m_locationRecordLength);
-      endian.swap(m_componentAggregateLength);
-   }
-   
-   out.write((char*)&m_locationSectionLength, 2);
-   out.write((char*)&m_locationTableOffset, 4);
-   out.write((char*)&m_numberOfComponentLocationRecords, 2);
-   out.write((char*)&m_locationRecordLength, 2);
-   out.write((char*)&m_componentAggregateLength, 4);
-
-   if( ossim::byteOrder() != OSSIM_BIG_ENDIAN)
-   {
-      // Swap back to native byte order.
-      ossimEndian endian;
-      endian.swap(m_locationSectionLength);
-      endian.swap(m_locationTableOffset);
-      endian.swap(m_numberOfComponentLocationRecords);
-      endian.swap(m_locationRecordLength);
-      endian.swap(m_componentAggregateLength);
-   }
-   
-   for(ossim_uint32 i = 0; i < m_componentLocationList.size(); ++i)
-   {
-      m_componentLocationList[i].writeStream(out);
-   }
-}
-
-std::ostream& ossimRpfLocationSection::print(
-   std::ostream& out, const std::string& prefix) const
-{
-   out << prefix << "LocationSectionLength:            "
-       << m_locationSectionLength << "\n"
-       << prefix << "LocationTableOffset:              "
-       << m_locationTableOffset << "\n"
-       << prefix << "NumberOfComponentLocationRecords: "
-       << m_numberOfComponentLocationRecords << "\n"
-       << prefix << "LocationRecordLength:             "
-       << m_locationRecordLength << "\n"
-       << prefix << "ComponentAggregateLength:         "
-       << m_componentAggregateLength << "\n";
-   
-   if(m_numberOfComponentLocationRecords > 0)
-   {
-      std::vector<ossimRpfComponentLocationRecord>::const_iterator i =
-         m_componentLocationList.begin();
-      while (i != m_componentLocationList.end())
-      {
-         (*i).print(out, prefix);
-         ++i;
-      }
-   }
-   return out;
-}
-
-bool ossimRpfLocationSection::hasComponent(ossimRpfComponentId componentId)const
-{
-   ossimRpfComponentLocationRecord result;
-   
-   return getComponent(componentId, result);
-}
-
-bool ossimRpfLocationSection::getComponent(ossimRpfComponentId componentId,
-                                           ossimRpfComponentLocationRecord &result)const
-{
-   std::vector<ossimRpfComponentLocationRecord>::const_iterator component =
-      m_componentLocationList.begin();
-   
-   while(component != m_componentLocationList.end())
-   {
-      if((*component).m_componentId == static_cast<unsigned short>(componentId))
-      {
-         result = *component;
-
-         return true;
-      }      
-      ++component;
-   }
-   
-   return false;
-}
-
-void ossimRpfLocationSection::addComponentRecord(const ossimRpfComponentLocationRecord& record)
-{
-   m_componentLocationList.push_back(record);
-}
-
-void ossimRpfLocationSection::setLocationSectionLength(ossim_uint16 length)
-{
-   m_locationSectionLength = length;
-}
-
-void ossimRpfLocationSection::setLocationTableOffset(ossim_uint32 offset)
-{
-   m_locationTableOffset = offset;
-}
-
-void ossimRpfLocationSection::setNumberOfComponentLocationRecords(ossim_uint16 count)
-{
-   m_numberOfComponentLocationRecords = count;
-}
-
-void ossimRpfLocationSection::setLocationRecordLength(ossim_uint16 length)
-{
-   m_locationRecordLength = length;
-}
-
-void ossimRpfLocationSection::setComponentAggregateLength(ossim_uint32 length)
-{
-   m_componentAggregateLength = length;
-}
-
-void ossimRpfLocationSection::clearFields()
-{
-   m_locationSectionLength            = 0;
-   m_locationTableOffset              = 0;
-   m_numberOfComponentLocationRecords = 0;
-   m_locationRecordLength             = 0;
-   m_componentAggregateLength         = 0;
-
-   m_componentLocationList.clear();
-}
-
-std::vector<ossimRpfComponentLocationRecord>& ossimRpfLocationSection::getLocationRecordList()
-{
-   return m_componentLocationList;
-}
diff --git a/src/ossim/support_data/ossimRpfToc.cpp b/src/ossim/support_data/ossimRpfToc.cpp
deleted file mode 100644
index f0a1e0e..0000000
--- a/src/ossim/support_data/ossimRpfToc.cpp
+++ /dev/null
@@ -1,1294 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-// 
-// Description: Rpf support class
-// 
-//********************************************************************
-// $Id: ossimRpfToc.cpp 21214 2012-07-03 16:20:11Z dburken $
-
-#include <ossim/support_data/ossimRpfToc.h>
-#include <ossim/base/ossimErrorCodes.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimProperty.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/support_data/ossimNitfFileHeaderV2_X.h>
-#include <ossim/support_data/ossimNitfFileHeaderV2_0.h>
-#include <ossim/support_data/ossimRpfFrame.h>
-#include <ossim/support_data/ossimRpfFrameFileIndexSectionSubheader.h>
-#include <ossim/support_data/ossimRpfFrameFileIndexSubsection.h>
-#include <ossim/support_data/ossimRpfBoundaryRectTable.h>
-#include <ossim/support_data/ossimRpfLocationSection.h>
-#include <ossim/support_data/ossimRpfTocEntry.h>
-#include <ossim/support_data/ossimRpfFrameFileIndexRecord.h>
-#include <ossim/support_data/ossimRpfBoundaryRectSectionSubheader.h>
-#include <ossim/support_data/ossimRpfPathnameRecord.h>
-#include <ossim/support_data/ossimNitfFile.h>
-#include <ossim/base/ossimTrace.h>
-#include <iostream>
-#include <fstream>
-
-static ossimTrace traceDebug("ossimRpfToc:debug");
-
-std::ostream& operator <<(std::ostream& out, const ossimRpfToc& data)
-{
-   return data.print(out);
-}
-
-ossimRpfToc::ossimRpfToc()
-   :m_tocEntryList(),
-    m_filename(),
-    m_nitfFileHeader(0),
-    m_rpfHeader(0)
-{
-}
-
-ossimRpfToc::~ossimRpfToc()
-{
-   deleteAll();
-}
-
-ossimErrorCode ossimRpfToc::parseFile(const ossimFilename &fileName, bool keepFileHeader)
-{
-   static const char MODULE[] = "ossimRpfToc::parseFile";
-   
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered....." << std::endl;
-   }
-
-   ossimRefPtr<ossimNitfFile> nitfFile = new ossimNitfFile;
-
-   clearAll();
-
-   nitfFile->parseFile(fileName);
-
-   m_nitfFileHeader = nitfFile->getHeader();
-
-   m_rpfHeader = 0; // ossimRefPtr
-   
-   if( !m_nitfFileHeader.valid() )
-   {
-      nitfFile = 0;
-      
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE << " leaving with no nitf header found....." << std::endl;
-      }
-      return ossimErrorCodes::OSSIM_ERROR;
-   }
-   
-   ossimNitfTagInformation info; 
-   m_nitfFileHeader->getTag(info, "RPFHDR");
-
-   if(traceDebug() && (info.getTagName() == "RPFHDR") )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " nitf file header print\n";
-      m_nitfFileHeader->print( ossimNotify(ossimNotifyLevel_DEBUG) );
-   }
-   
-   if ( !keepFileHeader )
-   {
-      // we no longer need access to the nitf header.  We got what we needed.
-      m_nitfFileHeader = 0;
-   }
-   nitfFile = 0;
-   
-   m_filename = fileName;
-
-   if(info.getTagName() == "RPFHDR")
-   {
-      m_rpfHeader = new ossimRpfHeader;
-
-      std::ifstream in(m_filename.c_str(), std::ios::in|std::ios::binary);
-      
-      // set the get pointer for the stream to the start
-      // of the Rpf header data
-      in.seekg(info.getTagDataOffset(), std::ios::beg);
-      
-      // now get the header data.  We do not need to pass in the byte order.
-      // this is grabbed from the first byte of the stream.  To see this,
-      // Look at the RpfHeader implementation.
-      m_rpfHeader->parseStream(in);
-
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE << " DEBUG: Found RPF HEADER tag\n";
-         m_rpfHeader->print( ossimNotify(ossimNotifyLevel_DEBUG) );
-      }
-
-   }
-   else
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimRpfToc::parseFile: Leaving No RPFHDR tag found" << "\n";
-      }
-      return ossimErrorCodes::OSSIM_ERROR;
-   }
-   
-   if( m_rpfHeader.valid() )
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG: Building toc list" << "\n";
-      }
-      buildTocEntryList( m_rpfHeader.get() );
-   }
-   else
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimRpfToc::parseFile: Leaving no RPFHDR " << __LINE__ << "\n";
-      }
-      return ossimErrorCodes::OSSIM_ERROR;
-   }
-   
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimRpfToc::parseFile: Returning with OK." << std::endl;
-   }
-   
-   return ossimErrorCodes::OSSIM_OK;
-}
-
-void ossimRpfToc::createTocAndCopyFrames( const ossimFilename& dotRpfFile,
-                                          const ossimFilename& outputDir )
-{
-   static const char MODULE[] = "ossimRpfToc::createTocAndCopyFrames";
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " entered..."
-         << "\ndot rpf file:      " << dotRpfFile
-         << "\noutput directory:  " << outputDir
-         << "\n";
-   }
-
-   if ( outputDir.expand().exists() == false )
-   {
-      if ( !outputDir.createDirectory(true, 0775) )
-      {
-         std::string e = MODULE;
-         e += " ERROR:\nCould not create directory: ";
-         e+= outputDir.c_str();
-         throw ossimException(e);
-      }
-   }
-
-   // Open the dot rpf file.
-   std::ifstream* dotRpfStr = new std::ifstream;
-   dotRpfStr->open(dotRpfFile.c_str(), ios_base::in);
-   if ( !dotRpfStr->good() )
-   {
-      delete dotRpfStr;
-      dotRpfStr = 0;
-
-      std::string e = MODULE;
-      e += " ERROR:\nCould not open: ";
-      e += dotRpfFile.c_str();
-      throw ossimException(e);
-   }
-
-   ossimFilename sourceADotTocFile = getSourceTocFile(*dotRpfStr);
-   if ( sourceADotTocFile.empty() )
-   {
-      delete dotRpfStr;
-      dotRpfStr = 0;
-
-      std::string e = MODULE;
-      e += " ERROR:\nCould not deduce source a.toc file!";
-      throw ossimException(e);
-   }
-   
-   // Open the source a.toc file. Note the true flag is to keep the file header.
-   ossimRefPtr<ossimRpfToc> sourceADotToc = new ossimRpfToc;
-   if ( sourceADotToc->parseFile(sourceADotTocFile, true) != ossimErrorCodes::OSSIM_OK )
-   {
-      delete dotRpfStr;
-      dotRpfStr = 0;
- 
-      std::string e = MODULE;
-      e += " ERROR:\nCould not open: ";
-      e += sourceADotTocFile.c_str();
-      throw ossimException(e);
-   }
-
-   ossimRefPtr<const ossimNitfFileHeader> sourceNitfFileHdr = sourceADotToc->getNitfFileHeader();
-   if ( !sourceNitfFileHdr.valid() )
-   {
-      delete dotRpfStr;
-      dotRpfStr = 0;        
-
-      std::string e = MODULE;
-      e += " ERROR:\nCould not get nitf file header from: ";
-      e += sourceADotTocFile.c_str();
-      throw ossimException(e);
-   }
-   
-   ossimRefPtr<const ossimRpfHeader> sourceRpfHdr = sourceADotToc->getRpfHeader();
-   if ( !sourceRpfHdr.valid() )
-   {
-      delete dotRpfStr;
-      dotRpfStr = 0;
-      
-      std::string e = MODULE;
-      e += " ERROR:\nCould not get rpf header from: ";
-      e += sourceADotTocFile.c_str();
-      throw ossimException(e);
-   }
-
-   // Get the boundary rect sub header from the source a.toc.
-   ossimRefPtr<ossimRpfBoundaryRectSectionSubheader> boundaryRectSectionSubheader =
-      sourceRpfHdr->getNewBoundaryRectSectSubheader(sourceADotTocFile);
-   if ( !boundaryRectSectionSubheader.valid() )
-   {
-      delete dotRpfStr;
-      dotRpfStr = 0;
-
-      std::string e = MODULE;
-      e += " ERROR:\nCould not pull boundary rect sub header from source file: ";
-      e += sourceADotTocFile.c_str();
-      throw ossimException(e);
-   }   
-
-   // Get the boundary rect table from the source a.toc.
-   ossimRefPtr<ossimRpfBoundaryRectTable> boundaryRectTable =
-      sourceRpfHdr->getNewBoundaryRectTable(sourceADotTocFile);
-   if ( !boundaryRectTable.valid() )
-   {
-      delete dotRpfStr;
-      dotRpfStr = 0;
-      
-      std::string e = MODULE;
-      e += " ERROR:\nCould not pull boundary rect table from source file: ";
-      e += sourceADotTocFile.c_str();
-      throw ossimException(e);
-   }
-   
-   // Get the frame file subheader from the source a.toc.
-   ossimRefPtr<ossimRpfFrameFileIndexSectionSubheader> frameFileSubHeader =
-      sourceRpfHdr->getNewFrameFileIndexSectionSubheader(sourceADotTocFile);
-   if ( !frameFileSubHeader.valid() )
-   {
-      delete dotRpfStr;
-      dotRpfStr = 0;
-
-      std::string e = MODULE;
-      e += " ERROR:\nCould not pull frame file sub header from source file: ";
-      e += sourceADotTocFile.c_str();
-      throw ossimException(e);
-   }
-
-   // Get the frame file subsection from the source a.toc.
-   ossimRefPtr<ossimRpfFrameFileIndexSubsection> frameFileSubSection =
-      sourceRpfHdr->getNewFileIndexSubsection(sourceADotTocFile);
-   if ( !frameFileSubSection.valid() )
-   {
-      delete dotRpfStr;
-      dotRpfStr = 0;
-
-      std::string e = MODULE;
-      e += " ERROR:\nCould not pull frame file sub section from source file: ";
-      e += sourceADotTocFile.c_str();
-      throw ossimException(e); 
-   }
-   
-   // Open the output file to write to.
-   const ossimFilename A_DOT_TOC_FILE = "a.toc";
-   ossimFilename dotTocFile = outputDir.dirCat(A_DOT_TOC_FILE);
-   std::ofstream* dotTocStr = new std::ofstream;
-   dotTocStr->open( dotTocFile.c_str(), ios::out|ios::binary );
-   if ( !dotTocStr->good() )
-   {
-      delete dotRpfStr;
-      dotRpfStr = 0;
-      delete dotTocStr;
-      dotTocStr =0;
-
-      std::string e = MODULE;
-      e += " ERROR:\nCould not open: ";
-      e += dotTocFile.c_str();
-      throw ossimException(e);
-   }
-   
-   // Variables used throughout:
-   ossimRefPtr<ossimProperty> prop = new ossimStringProperty();
-   ossimString field;
-   ossimString s;
-   // std::streampos fileHeaderLength = 0;
-   // std::streampos fileLength = 0;
-      
-   ossimRefPtr<ossimNitfFileHeaderV2_0> fileHdr = new ossimNitfFileHeaderV2_0();
-   
-   // Set the CLEVEL:
-   s = "01";
-   fileHdr->setComplexityLevel(s);
-   
-   // Set the OSTAID:
-   prop = sourceNitfFileHdr->getProperty(ossimNitfFileHeaderV2_X::OSTAID_KW);
-   fileHdr->setProperty(prop);
-   
-   // Set the FDT (date):
-   fileHdr->setDate();
-   
-   // Set the FTITLE:
-   s = "a.toc";
-   fileHdr->setTitle(s);
-   
-   // Set the FSCLAS:
-   prop = sourceNitfFileHdr->getProperty(ossimNitfFileHeaderV2_X::FSCLAS_KW);
-   fileHdr->setProperty(prop);
-   
-   // Set the FSCODE:
-   prop = sourceNitfFileHdr->getProperty(ossimNitfFileHeaderV2_X::FSCODE_KW);
-   fileHdr->setProperty(prop);
-   
-   // Set the FSCTLH:
-   prop = sourceNitfFileHdr->getProperty(ossimNitfFileHeaderV2_X::FSCTLH_KW);
-   fileHdr->setProperty(prop);
-   
-   // Set the ONAME:
-   prop = sourceNitfFileHdr->getProperty(ossimNitfFileHeaderV2_X::ONAME_KW);
-   fileHdr->setProperty(prop);
-   
-   // Set the OPHONE:
-   prop = sourceNitfFileHdr->getProperty(ossimNitfFileHeaderV2_X::OPHONE_KW);
-   fileHdr->setProperty(prop);
-   
-   // Add the rpf header.
-   ossimRpfHeader* rpfHdr = new ossimRpfHeader( *(sourceRpfHdr.get()) );
-   
-   ossimRefPtr<ossimNitfRegisteredTag> rpfHdrRp = rpfHdr;
-   ossimNitfTagInformation rpfHdrInfo(rpfHdrRp);
-   fileHdr->addTag(rpfHdrInfo);
-   
-   //---
-   // Write it out...
-   // The first write will be with an rpfheader with no location sections just
-   // to see where the end of the file header is.
-   //---
-   fileHdr->writeStream(*dotTocStr);
-   
-   //---
-   // End of file header. Get the header length. This will also be the
-   // start of the location section.
-   //---
-   std::streampos pos = dotTocStr->tellp();
-   std::streamoff locationSectionOffset = pos;
-   
-   // Set the header length:
-   fileHdr->setHeaderLength( static_cast<ossim_uint64>(locationSectionOffset) );
-   
-   // Set the location of the location section.
-   rpfHdr->setLocationSectionPos(locationSectionOffset);
-
-   // Set the file name.
-   rpfHdr->setFilename(A_DOT_TOC_FILE);
-   
-   // Add the component location records to the header.
-   ossimRpfLocationSection* locSec = rpfHdr->getLocationSection();
-   
-   // Clear the records copied from the source a.toc.
-   locSec->clearFields();
-   
-   //---
-   // Set the length of the locSec to 74.  The record itself is 14 bytes plus
-   // an additional 60 bytes for six location records ten bytes each.
-   //---
-   const ossim_uint16 LOCATION_SECTION_SIZE = 74;
-   locSec->setLocationSectionLength(LOCATION_SECTION_SIZE);
-   
-   // Set the offset which 14 bytes to get to the first record.
-   locSec->setLocationTableOffset(14);
-   
-   // Six records:
-   locSec->setNumberOfComponentLocationRecords(6);
-   
-   // Each record 10 bytes:
-   locSec->setLocationRecordLength(10);
-   
-   // Don't know the aggregate length yet.
-   
-   ossimRpfComponentLocationRecord locRec;
-   
-   // Note: See ossimRpfConstants for enum ossimRpfComponentId
-   
-   const ossim_uint32 RPFHDR_SIZE = 48;
-   const ossim_uint32 LOCATION_SECTION_OFFSET = static_cast<ossim_uint32>(locationSectionOffset);
-   const ossim_uint32 BOUNDARY_SUBHEADER_SIZE = 8;
-   const ossim_uint32 BOUNDARY_RECORD_SIZE = 132;
-   const ossim_uint32 FILE_SUBHEADER_SIZE = 13;
-   // const ossim_uint32 = ;
-   
-   // Record 1 RPFHDR location:
-   ossim_uint32 rpfHdrOffset = 0;
-   if ( fileHdr->getTag(rpfHdrInfo, "RPFHDR") )
-   {
-      rpfHdrOffset = rpfHdrInfo.getTagDataOffset();
-   }
-
-   locRec.m_componentId = OSSIM_RPF_HEADER_COMPONENT; // 128
-   locRec.m_componentLength = RPFHDR_SIZE;
-   locRec.m_componentLocation = static_cast<ossim_uint32>(rpfHdrInfo.getTagDataOffset());
-   locSec->addComponentRecord(locRec);
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)<< "rpf hdr offset: " << rpfHdrOffset << "\n";
-      locRec.print( ossimNotify(ossimNotifyLevel_DEBUG) );
-   }
-   
-   // Record 2 location section:
-   locRec.m_componentId = OSSIM_RPF_LOCATION_COMPONENT; // 129
-   locRec.m_componentLength = LOCATION_SECTION_SIZE;
-   locRec.m_componentLocation = LOCATION_SECTION_OFFSET;
-   locSec->addComponentRecord(locRec);
-
-   if ( traceDebug() )
-   {
-      locRec.print( ossimNotify(ossimNotifyLevel_DEBUG) );
-   }
-   
-   // Record 3 boundary rect sub header section:
-   locRec.m_componentId = OSSIM_RPF_BOUNDARY_RECT_SECTION_SUBHEADER; // 148
-   locRec.m_componentLength = BOUNDARY_SUBHEADER_SIZE;
-   locRec.m_componentLocation = locRec.m_componentLocation + LOCATION_SECTION_SIZE;
-   locSec->addComponentRecord(locRec);
-
-   if ( traceDebug() )
-   {
-      locRec.print( ossimNotify(ossimNotifyLevel_DEBUG) );
-   }
-   
-   // Capture the location.
-   std::streamoff boundaryRectPosition = locRec.m_componentLocation;
-   
-   // Record 4 boundary rect table:
-   locRec.m_componentId = OSSIM_RPF_BOUNDARY_RECT_TABLE; // 149
-   locRec.m_componentLength = BOUNDARY_RECORD_SIZE;
-   locRec.m_componentLocation = locRec.m_componentLocation + BOUNDARY_SUBHEADER_SIZE;
-   locSec->addComponentRecord(locRec);
-
-   if ( traceDebug() )
-   {
-      locRec.print( ossimNotify(ossimNotifyLevel_DEBUG) );
-   }
-   
-   // Record 5 file index sub header:
-   locRec.m_componentId = OSSIM_RPF_FRAME_FILE_INDEX_SECTION_SUBHEADER; // 150
-   locRec.m_componentLength = FILE_SUBHEADER_SIZE;
-   locRec.m_componentLocation = locRec.m_componentLocation + BOUNDARY_RECORD_SIZE;
-   locSec->addComponentRecord(locRec);
-
-   if ( traceDebug() )
-   {
-      locRec.print( ossimNotify(ossimNotifyLevel_DEBUG) );
-   }
-    
-   // Record 6 file index sub header:
-   locRec.m_componentId = OSSIM_RPF_FRAME_FILE_INDEX_SUBSECTION; // 151
-   locRec.m_componentLength = 0;  // need to calculate.
-   locRec.m_componentLocation = locRec.m_componentLocation + FILE_SUBHEADER_SIZE;
-   locSec->addComponentRecord(locRec);
-
-   if ( traceDebug() )
-   {
-      locRec.print( ossimNotify(ossimNotifyLevel_DEBUG) );
-   }
-   
-   // Seek back and re-write...
-   dotTocStr->seekp(0, ios::beg);
-   fileHdr->writeStream(*dotTocStr);
-   
-   dotTocStr->seekp(boundaryRectPosition, ios::beg);
-
-   // Only writing one entry:
-   boundaryRectSectionSubheader->setNumberOfEntries(1);
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "writing boundaryRectSectionSubheader:\n" << *(boundaryRectSectionSubheader.get())
-         << "\n";
-   }
-
-   //---
-   // Write the boundary rectangle section.  This includes the subheader and subsection.
-   // These coorespond to location records 3 and 4 above.
-   //---
-   boundaryRectSectionSubheader->writeStream(*dotTocStr);
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) 
-         << "Original boundaryRectTable:\n" << *(boundaryRectTable.get()) << "\n";
-   }
-
-   ossim_uint32 entry;
-   if ( getCorespondingEntry( frameFileSubSection.get(), *dotRpfStr, entry ) )
-   {
-      ossimRpfBoundaryRectRecord boundaryRectRecord;
-      if ( boundaryRectTable->getEntry( entry, boundaryRectRecord) )
-      {
-         if ( traceDebug() )
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG) 
-               << "writing boundaryRectTable:\n" << boundaryRectRecord << "\n";
-         }
-         
-         boundaryRectRecord.writeStream(*dotTocStr);
-      }
-      else
-      {
-         std::string e = MODULE;
-         e += " ERROR:\nCould not get bounding rect record for entry: ";
-         e += ossimString::toString(entry).c_str();
-         throw ossimException(e);
-      }
-   }
-   else
-   {
-      std::string e = MODULE;
-      e += " ERROR:\nCould not deduce entry from frame list!";
-      throw ossimException(e);
-   }
-
-   frameFileSubHeader->setNumberOfIndexRecords( getNumberOfFrames(*dotRpfStr) );
-   frameFileSubHeader->setNumberOfPathnameRecords(1);
-   const ossim_uint16 FRAME_FILE_INDEX_RECORD_LENGTH = 33;
-   frameFileSubHeader->setIndexRecordLength( FRAME_FILE_INDEX_RECORD_LENGTH );
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "writing frameFileSubHeader:\n" << *(frameFileSubHeader.get()) << "\n";
-   }
-   frameFileSubHeader->writeStream( *dotTocStr );
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "writing frameFileSubSection:\n";
-   }
-
-   std::streamoff frameFileIndexSectionStartPos = dotTocStr->tellp();
-   
-   writeFrameFileIndexSection(frameFileSubSection.get(), *dotRpfStr, *dotTocStr);
-   
-   std::streamoff endOfFilePos = dotTocStr->tellp();
-
-   // Update the location section length for the frame file index section.
-   locSec->getLocationRecordList()[5].m_componentLength =
-      static_cast<ossim_uint32>(endOfFilePos - frameFileIndexSectionStartPos);
-
-   // Update the length of all location sections.
-   locSec->setComponentAggregateLength(
-      static_cast<ossim_uint32>(endOfFilePos) - rpfHdr->getLocationSectionLocation() );
-   
-
-   fileHdr->setFileLength(static_cast<ossim_uint64>(endOfFilePos));
-   dotTocStr->seekp(0, ios::beg);
-   fileHdr->writeStream(*dotTocStr);
-
-   ossimNotify(ossimNotifyLevel_DEBUG) << "Wrote file: " << dotTocFile << "\n";
-
-   // Copy the frames to the output directory.
-   copyFrames(*dotRpfStr, outputDir);
-
-   // Cleanup:
-   delete dotRpfStr;
-   dotRpfStr = 0;
-   delete dotTocStr;
-   dotTocStr =0;
-}
-
-std::ostream& ossimRpfToc::print(std::ostream& out,
-                                 const std::string& prefix,
-                                 bool printOverviews) const
-{
-   if( m_rpfHeader.valid() )
-   {
-      m_rpfHeader->print(out, prefix);
-
-      //---
-      // Go through the entries...  We're going to skip overviews here.
-      //---
-      ossim_uint32 prefixIndex = 0;
-      std::vector< ossimRpfTocEntry*>::const_iterator tocEntry =
-         m_tocEntryList.begin();
-      while(tocEntry != m_tocEntryList.end())
-      {
-         if (*tocEntry)
-         {
-            if ( traceDebug() )
-            {
-               (*tocEntry)->print(out, prefix);
-            }
-            
-            const ossimRpfBoundaryRectRecord REC =
-               (*tocEntry)->getBoundaryInformation();
-
-            ossimString scale = REC.getScale();
-            if ( (scale.contains("OVERVIEW")) == false ||
-                 printOverviews )
-            {
-               ossimString entryPrefix = prefix;
-               entryPrefix += "image";
-               entryPrefix += ossimString::toString(prefixIndex);
-               entryPrefix += ".";
-               REC.print(out, entryPrefix);
-
-               //---
-               // Get the first frame that exists so we can get to
-               // the attributes.
-               //---
-               ossimRpfFrameEntry frameEntry;
-               getFirstEntry((*tocEntry), frameEntry);
-
-               if (frameEntry.exists())
-               {
-                  ossimRpfFrame rpfFrame;
-                  if ( rpfFrame.parseFile(frameEntry.getFullPath())
-                       == ossimErrorCodes::OSSIM_OK )
-                  {
-                     rpfFrame.print(out, entryPrefix);
-                  }
-               }
-            }
-         }
-         ++prefixIndex;
-         ++tocEntry;
-      }
-   }
-   return out;
-}
-
-ossim_uint32 ossimRpfToc::getNumberOfEntries()const
-{
-   return static_cast<ossim_uint32>(m_tocEntryList.size());
-}
-
-const ossimRpfTocEntry* ossimRpfToc::getTocEntry(ossim_uint32 index)const
-{
-   if(index < m_tocEntryList.size())
-   {
-      return m_tocEntryList[index];
-   }
-   return 0;
-}
-
-ossim_int32 ossimRpfToc::getTocEntryIndex(const ossimRpfTocEntry* entry)
-
-{
-   for(ossim_int32 i = 0; i < (ossim_int32)m_tocEntryList.size(); ++i)
-   {
-      if(m_tocEntryList[i] == entry)
-      {
-         return i;
-      }
-   }
-
-   return -1;
-}
-
-const ossimNitfFileHeader* ossimRpfToc::getNitfFileHeader()const
-{
-   return m_nitfFileHeader.get();
-}
-
-const ossimRpfHeader* ossimRpfToc::getRpfHeader()const
-{
-   return m_rpfHeader.get();
-}
-
-ossim_uint32 ossimRpfToc::getNumberOfFramesHorizontal(ossim_uint32 idx) const
-{
-   ossim_uint32 nFrames = 0;
-   const ossimRpfTocEntry* pEntry = getTocEntry( idx );
-   if ( pEntry != NULL )
-   {
-      nFrames = pEntry->getNumberOfFramesHorizontal();
-   }
-   return nFrames;
-}
-
-ossim_uint32 ossimRpfToc::getNumberOfFramesVertical(ossim_uint32 idx) const
-{
-   ossim_uint32 nFrames = 0;
-   const ossimRpfTocEntry* pEntry = getTocEntry( idx );
-   if ( pEntry != NULL )
-   {
-      nFrames = pEntry->getNumberOfFramesVertical();
-   }
-   return nFrames;
-}
-
-bool ossimRpfToc::getRpfFrameEntry(ossim_uint32 entryIdx, 
-                                   ossim_uint32 row,
-                                   ossim_uint32 col,
-                                   ossimRpfFrameEntry& result)const
-{
-   const ossimRpfTocEntry* pEntry = getTocEntry( entryIdx );
-   if ( pEntry != NULL )
-   {
-      return pEntry->getEntry( row, col, result );
-   }
-   return false;
-}
-
-const ossimString ossimRpfToc::getRelativeFramePath( ossim_uint32 entryIdx,
-                                                     ossim_uint32 row,
-                                                     ossim_uint32 col) const
-{
-   ossimRpfFrameEntry frameEntry;
-   bool bResult = getRpfFrameEntry( entryIdx, row, col, frameEntry );
-   if ( bResult == true )
-   {
-      return frameEntry.getPathToFrameFileFromRoot();
-   }
-   return ossimString("");
-}
-
-void ossimRpfToc::deleteAll()
-{
-   m_rpfHeader = 0;
-
-   deleteTocEntryList();
-}
-
-void ossimRpfToc::clearAll()
-{
-   deleteTocEntryList();
-   m_filename = "";
-}
-
-void ossimRpfToc::deleteTocEntryList()
-{
-   std::vector< ossimRpfTocEntry*>::iterator tocEntry =
-      m_tocEntryList.begin();
-   while(tocEntry != m_tocEntryList.end())
-   {
-      if(*tocEntry)
-      {
-         delete (*tocEntry);
-         *tocEntry = NULL;
-      }
-      ++tocEntry;
-   }
-   m_tocEntryList.clear();
-}
-
-void ossimRpfToc::buildTocEntryList(ossimRpfHeader* rpfHeader)
-{
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimRpfToc::buildTocEntryList: entered.....\n";
-   }
-   std::ifstream in(m_filename.c_str(), std::ios::in | std::ios::binary);
-
-   if(!in)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimRpfToc::buildTocEntryList: invalid input leaving..... " << std::endl;
-      }
-      return;
-   }
-   
-   if(rpfHeader)
-   {
-      if(traceDebug())
-      {
-         rpfHeader->print(ossimNotify(ossimNotifyLevel_DEBUG));
-      }
-      
-      deleteTocEntryList();
-      ossimRpfBoundaryRectSectionSubheader *boundaryRect =
-         rpfHeader->getNewBoundaryRectSectSubheader(in);
-
-      if(boundaryRect)
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG: Got boundary rect\n";
-         }
-         std::streamoff current = in.tellg();
-
-         // they give the offset from the
-         // end of the boundary subheader to the start of the 
-         // entry table.  We have to create an absolute
-         // offset.
-         current += boundaryRect->getTableOffset();
-
-         // take to the start of the table entries
-         in.seekg(current, ios::beg);
-         allocateTocEntryList(boundaryRect->getNumberOfEntries());
-
-         // now we can read the entries
-         if(m_tocEntryList.size() > 0)
-         {
-            for(ossim_uint32 index = 0; index < m_tocEntryList.size(); index++)
-            {
-               m_tocEntryList[index]->parseStream(in, rpfHeader->getByteOrder());
-            }
-         }
-         
-         ossimRpfFrameFileIndexSectionSubheader* frameFileIndexHead = rpfHeader->getNewFrameFileIndexSectionSubheader(in);
-         // get the offset to the table
-         long offsetToIndexSubsection = in.tellg();
-         if(frameFileIndexHead)
-         {
-            ossimRpfFrameFileIndexRecord tempIndexRec;
-            ossimRpfPathnameRecord       tempPathNameRec;
-            
-            ossim_int32 count = frameFileIndexHead->getNumberOfIndexRecords();
-            while(count > 0)
-            {
-               tempIndexRec.parseStream(in, rpfHeader->getByteOrder() );
-
-               // get the path information.  we must seek to a different location
-               // within the file.  So we must remember where we currently are at
-               std::streamoff currentPosition = in.tellg();
-               
-               in.seekg(offsetToIndexSubsection + tempIndexRec.getPathnameRecordOffset(), ios::beg);
-               tempPathNameRec.parseStream(in, rpfHeader->getByteOrder());
-
-               // We have the root directory where all frame files are subfiles of
-//               ossimString rootDirectory(ossimFilename(m_filename.path())+
-               // ossimFilename(ossimFilename::thePathSeparator));
-               ossimFilename rootDirectory;
-               getRootDirectory(rootDirectory);
-
-               // we have the actual path from the root directory to the
-               // frame file.  We must separate the two.  There have been
-               // occurrences where the path in the A.TOC file
-               // is upper case but the path in the directory on the file
-               // system is lower case.  This
-               // will fool the system in thinking the file does not exist
-               // when it actually does.
-               ossimString pathToFrameFile( ossimFilename(tempPathNameRec.getPathname()) +
-                                              tempIndexRec.getFilename());
-
-               ossimRpfFrameEntry entry(rootDirectory,
-                                        pathToFrameFile);
-               m_tocEntryList[tempIndexRec.getBoundaryRecNumber()]->setEntry(entry,
-                                                                              tempIndexRec.getLocationRowNumber(),
-                                                                              tempIndexRec.getLocationColNumber());
-               // now go back to where we were
-               in.seekg(currentPosition, ios::beg);
-               
-               --count;
-            }
-            delete frameFileIndexHead;
-            frameFileIndexHead = 0;
-         }
-      }
-      delete boundaryRect;
-      boundaryRect = NULL;
-   }
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimRpfToc::buildTocEntryList: leaving....." << std::endl;
-   }
-}
-
-void ossimRpfToc::allocateTocEntryList(ossim_uint32 numberOfEntries)
-{
-   if(m_tocEntryList.size() > 0)
-   {
-      deleteTocEntryList();
-   }
-   for(ossim_uint32 index = 0; index < numberOfEntries; index++)
-   {
-      m_tocEntryList.push_back(new ossimRpfTocEntry);
-   }   
-}
-
-void ossimRpfToc::getRootDirectory(ossimFilename& dir) const
-{
-   dir = m_filename.expand().path();
-}
-
-void ossimRpfToc::getFirstEntry(const ossimRpfTocEntry* rpfTocEntry,
-                                ossimRpfFrameEntry& frameEntry) const
-{
-   if (rpfTocEntry)
-   {
-      ossim_int32 framesHorizontal =
-         rpfTocEntry->getNumberOfFramesHorizontal();
-      ossim_int32 framesVertical =
-         rpfTocEntry->getNumberOfFramesVertical();
-   
-      bool foundEntry = false;
-      for (ossim_int32 v = 0; v < framesVertical; ++v)
-      {
-         for (ossim_int32 h = 0; h < framesHorizontal; ++h)
-         {
-            rpfTocEntry->getEntry(v, h, frameEntry);
-            if (frameEntry.exists())
-            {
-               foundEntry = true;
-               break;
-            }
-         }
-         if (foundEntry)
-         {
-            break;
-         }
-      }
-   }
-}
-
-void ossimRpfToc::writeFrameFileIndexSection(ossimRpfFrameFileIndexSubsection* frameFileSubSection,
-                                             std::ifstream& dotRpfStr,
-                                             std::ofstream& dotTocStr)
-{
-   static const char MODULE[] = "ossimRpfToc::writeFrameFileIndexSection";
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   const ossim_uint16 FRAME_FILE_INDEX_RECORD_LENGTH = 33;
-   ossim_uint32 frames = getNumberOfFrames(dotRpfStr);
-   ossim_uint32 pathnameRecordOffset = FRAME_FILE_INDEX_RECORD_LENGTH * frames;
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "frames: " << frames << "\n";
-   }
-   
-   if ( !dotRpfStr.good() )
-   {
-      // see if we can clear it.  Someone might have hit end of file(eof).
-      dotRpfStr.clear();
-   }
-
-   dotRpfStr.seekg(0, ios_base::beg);
-
-   std::string line;
-   ossimFilename file;
-   ossimRpfFrameFileIndexRecord record;
-   ossim_uint32 framesWritten = 0;
-
-   // Eat the first line which is the bounding rect line
-   std::getline(dotRpfStr, line);
-
-   while( dotRpfStr.good() )
-   {
-      std::getline(dotRpfStr, line);
-
-      if ( dotRpfStr.good() )
-      {
-         if ( getFile(line, file) )
-         {
-            if ( frameFileSubSection->getFrameFileIndexRecordFromFile(file.file(), record) )
-            {
-               // Always single entry.
-               record.setBoundaryRecNumber(0);
-               
-               record.setPathnameRecordOffset(pathnameRecordOffset);
-               record.writeStream(dotTocStr);
-               ++framesWritten;
-
-               if ( traceDebug() )
-               {
-                  ossimNotify(ossimNotifyLevel_DEBUG) << "wrote record:\n" << record << "\n";
-               }
-            }
-         }
-      }
-   }
-
-   // Now set the path record.
-   ossimFilename d = file.path();
-   ossimString s = "./";
-   s += d.file();
-   s += "/";
-   ossimRpfPathnameRecord pathRecord;
-   pathRecord.setPathName(s);
-   pathRecord.writeStream(dotTocStr);
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "frames written: " << framesWritten
-         << "\nwrote record:\n" << pathRecord
-         << "\n";
-   }
-
-   dotRpfStr.clear();
-   dotRpfStr.seekg(0, ios_base::beg);
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited..." << std::endl;
-   }
-}
-
-void ossimRpfToc::copyFrames(std::ifstream& dotRpfStr, const ossimFilename& outputDir)
-{
-   static const char MODULE[] = "ossimRpfToc::copyFrames";
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   ossim_uint32 frames = getNumberOfFrames(dotRpfStr);
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "frames to copy: " << frames << "\n";
-   }
-   
-   if ( !dotRpfStr.good() )
-   {
-      // see if we can clear it.  Someone might have hit end of file(eof).
-      dotRpfStr.clear();
-   }
-
-   dotRpfStr.seekg(0, ios_base::beg);
-
-   std::string line;
-   ossimFilename file;
-   ossimFilename destinationFile;
-   ossimFilename subDir;
-   ossim_uint32 framesCopied = 0;
-            
-   // Eat the first line which is the bounding rect line
-   std::getline(dotRpfStr, line);
-
-   // Get the second line which is first file. 
-   std::getline(dotRpfStr, line);
-
-   // Get the file name and make the sub directory if needed.
-   if ( getFile(line, file) )
-   {
-      destinationFile = outputDir;
-      subDir = file.path();
-      subDir = subDir.file();
-      destinationFile = destinationFile.dirCat( subDir );
-      
-      // This is output_dir/subdir.  See if subdir exist:
-      if ( !destinationFile.exists() )
-      {
-         destinationFile.createDirectory();
-      }
-   }
-
-   // Start over:
-   if ( !dotRpfStr.good() )
-   {
-      // see if we can clear it.  Someone might have hit end of file(eof).
-      dotRpfStr.clear();
-   }
-   dotRpfStr.seekg(0, ios_base::beg);
-   
-   // Eat the first line which is the bounding rect line
-   std::getline(dotRpfStr, line);
-   
-   while( dotRpfStr.good() )
-   {
-      std::getline(dotRpfStr, line);
-
-      if ( dotRpfStr.good() )
-      {
-         if ( getFile(line, file) )
-         {
-            destinationFile = outputDir;
-            subDir = file.path();
-            subDir = subDir.file();
-            destinationFile = destinationFile.dirCat( subDir );
-            destinationFile = destinationFile.dirCat( file.file() );
-
-            if ( file.copyFileTo(destinationFile) )
-            {
-               ++framesCopied;
-            }
-            if ( traceDebug() )
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG) << "Copied frame: " << destinationFile << "\n";
-            }
-         }
-      }
-   }
-
-   ossimNotify(ossimNotifyLevel_NOTICE) << "Frames copied: " << framesCopied << std::endl;
-
-   dotRpfStr.clear();
-   dotRpfStr.seekg(0, ios_base::beg);
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited..." << std::endl;
-   }
-}
-
-ossim_uint32 ossimRpfToc::getNumberOfFrames(std::ifstream& dotRpfStr) const
-{
-   ossim_uint32 result = 0;
-
-   if ( !dotRpfStr.good() )
-   {
-      // see if we can clear it.  Someone might have hit end of file(eof).
-      dotRpfStr.clear();
-   }
-
-   dotRpfStr.seekg(0, ios_base::beg);
-
-   // Eat the first line which is the bounding rect.
-   std::string line;
-   std::getline(dotRpfStr, line);
-   
-   while( dotRpfStr.good() )
-   {
-      std::getline(dotRpfStr, line);
-
-      if ( dotRpfStr.good() )
-      {
-         ++result;
-      }
-   }
-
-   dotRpfStr.clear();
-   dotRpfStr.seekg(0, ios_base::beg);
-
-   return result;
-}
-
-ossimFilename ossimRpfToc::getSourceTocFile(std::ifstream& dotRpfStr) const
-{
-   ossimFilename tocFile;
-   
-   if ( !dotRpfStr.good() )
-   {
-      dotRpfStr.clear();
-   }
-
-   dotRpfStr.seekg(0, ios_base::beg);
-
-   // Eat the first line which is the bounding rect.
-   std::string line;
-   std::getline(dotRpfStr, line);
-
-   // Get the second line which is first file. 
-   std::getline(dotRpfStr, line);
-
-   // Get the file name and make the sub directory if needed.
-   ossimFilename file;
-   if ( getFile(line, file) )
-   {
-      ossimFilename subDir = file.path();
-      tocFile = subDir.dirCat("a.toc");
-      if ( !tocFile.exists() )
-      {
-         tocFile = subDir.dirCat("A.TOC");
-         if ( !tocFile.exists() )
-         {
-            subDir = subDir.path();
-            tocFile = subDir.dirCat("a.toc");
-            if ( !tocFile.exists() )
-            {
-               tocFile = subDir.dirCat("A.TOC");
-               if ( !tocFile.exists() )
-               {
-                  tocFile.clear();
-               }
-            }
-         }
-      }
-   }
-
-   if ( !dotRpfStr.good() )
-   {
-      dotRpfStr.clear();
-   }
-   dotRpfStr.seekg(0, ios_base::beg);
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "ossimRpfToc::getSourceTocFile result: " << tocFile << "\n";
-   }
-
-   return tocFile;
-}
-
-bool ossimRpfToc::getCorespondingEntry(
-   ossimRpfFrameFileIndexSubsection* frameFileSubSection,
-   std::ifstream& dotRpfStr, ossim_uint32& entry) const
-{
-   bool result = false;
-   
-   if ( !dotRpfStr.good() )
-   {
-      // see if we can clear it.  Someone might have hit end of file(eof).
-      dotRpfStr.clear();
-   }
-   
-   dotRpfStr.seekg(0, ios_base::beg);
-
-   std::string line;
-   ossimFilename file;
-   ossimRpfFrameFileIndexRecord record;
-
-   // Eat the first line which is the bounding rect line
-   std::getline(dotRpfStr, line);
-
-   std::getline(dotRpfStr, line);
-
-   if ( getFile(line, file) )
-   {
-      if ( frameFileSubSection->getFrameFileIndexRecordFromFile(file.file(), record) )
-      {
-         entry = record.getBoundaryRecNumber();
-         result = true;
-      }
-   }
-
-   if ( !dotRpfStr.good() )
-   {
-      dotRpfStr.clear();
-   }
-
-   dotRpfStr.seekg(0, ios_base::beg);
-   return result;
-}
-
-bool ossimRpfToc::getFile(const std::string& line, ossimFilename& file) const
-{
-   //---
-   // line form:
-   // /some_path/N03E030/006EZC1B.I21|30.4654240835311,3.59074642049858|30.5401678385356,3.65984532949882
-   //           <file>                    <lr_lon>           <lr_lat>        <ur_lon>          <ur_lat>
-   //---
-   
-   bool result = false;
-   if ( line.size() )
-   {
-      ossimString os(line);
-      std::vector<ossimString> lineArray;
-      os.split(lineArray, "|");
-      if ( lineArray.size() )
-      {
-         file = lineArray[0];
-         result = true;
-      }
-   }
-   return result;
-}
diff --git a/src/ossim/support_data/ossimRpfTocEntry.cpp b/src/ossim/support_data/ossimRpfTocEntry.cpp
deleted file mode 100644
index 1bd712e..0000000
--- a/src/ossim/support_data/ossimRpfTocEntry.cpp
+++ /dev/null
@@ -1,279 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-// 
-// Author: Garrett Potts
-//
-//*************************************************************************
-// $Id: ossimRpfTocEntry.cpp 19900 2011-08-04 14:19:57Z dburken $
-
-#include <istream>
-#include <ostream>
-#include <iterator>
-
-#include <ossim/support_data/ossimRpfTocEntry.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimErrorCodes.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/projection/ossimEquDistCylProjection.h>
-#include <ossim/projection/ossimAzimEquDistProjection.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/support_data/ossimRpfFrameEntry.h>
-
-std::ostream& operator <<(std::ostream& out,
-                          const ossimRpfTocEntry& data)
-{
-   data.print(out);
-   return out;
-}
-
-ossimRpfTocEntry::ossimRpfTocEntry()
-{
-   
-}
-
-ossimErrorCode ossimRpfTocEntry::parseStream(
-   std::istream &in, ossimByteOrder byteOrder)
-{
-   ossimErrorCode result = ossimErrorCodes::OSSIM_OK;
-   
-   result = theBoundaryInformation.parseStream(in, byteOrder);
-   if(result == ossimErrorCodes::OSSIM_OK)
-   {
-      allocateFrameEntryArray();
-   }
-
-   // Fetch the number of samples as data member since it may need to be adjusted due to 
-   // wrap (OLK 10/10):
-   theNumSamples =  theBoundaryInformation.getNumberOfFramesHorizontal() * 1536;
-   ossimDpt ddpp;
-   getDecimalDegreesPerPixel(ddpp);
-   ossim_float64 width_in_deg = theNumSamples*ddpp.x;
-   if (width_in_deg >= 360.0)
-      theNumSamples -= (width_in_deg - 360.0)/ddpp.x;
-
-   return result;
-}
-
-std::ostream& ossimRpfTocEntry::print(std::ostream& out,
-                                      const std::string& prefix) const
-{
-   theBoundaryInformation.print(out, prefix);
-
-   std::vector< std::vector<ossimRpfFrameEntry> >::const_iterator frameEntry =
-      theFrameEntryArray.begin();
-
-   while( frameEntry != theFrameEntryArray.end() )
-   {
-      std::vector<ossimRpfFrameEntry>::const_iterator i =
-         (*frameEntry).begin();
-      while ( i != (*frameEntry).end() ) 
-      {
-         (*i).print(out, prefix);
-         ++i;
-      }
-      ++frameEntry;
-   }
-   return out;
-}
-
-ossim_uint32 ossimRpfTocEntry::getNumberOfFramesHorizontal()const
-{
-   return theBoundaryInformation.getNumberOfFramesHorizontal();
-}
-
-ossim_uint32 ossimRpfTocEntry::getNumberOfFramesVertical()const
-{
-   return theBoundaryInformation.getNumberOfFramesVertical();
-}
-
-ossim_uint32 ossimRpfTocEntry::getNumberOfLines() const
-{
-   return  theBoundaryInformation.getNumberOfFramesVertical() * 1536;
-}
-
-ossim_uint32 ossimRpfTocEntry::getNumberOfSamples() const
-{
-   return theNumSamples;
-}
-
-ossim_uint32 ossimRpfTocEntry::getNumberOfBands() const
-{
-   ossim_uint32 result = 0;
-   ossimString productType = getProductType().trim().upcase();
-   if( productType == "CIB" )
-   {
-      result = 1;
-   }
-   else if ( productType == "CADRG" )
-   {
-      result = 3;
-   }
-   return result;
-}
-
-void ossimRpfTocEntry::getBoundingRect(ossimIrect& rect) const
-{
-   rect = ossimIrect(0, 0, getNumberOfSamples()-1, getNumberOfLines()-1); 
-}
-
-const ossimRpfBoundaryRectRecord& ossimRpfTocEntry::getBoundaryInformation() const
-{
-   return theBoundaryInformation;
-}
-
-void ossimRpfTocEntry::setEntry(const ossimRpfFrameEntry& entry,
-                                long row,
-                                long col)
-{
-   if(row < (long)theFrameEntryArray.size() && row >= 0)
-   {
-      if(col < (long)theFrameEntryArray[row].size() && col >= 0)
-      {
-         theFrameEntryArray[row][col] = entry;
-      }
-   }
-}
-
-bool ossimRpfTocEntry::getEntry(long row,
-                                long col,
-                                ossimRpfFrameEntry& result)const
-{
-   if(row < (long)theFrameEntryArray.size() && row >= 0)
-   {
-      if(col < (long)theFrameEntryArray[row].size() && col >= 0)
-      {
-         result = theFrameEntryArray[row][col];
-      }
-      else
-      {
-         return false;
-      }
-   }
-   else
-   {
-      return false;
-   }
-   
-   return true;
-}
-
-ossimString ossimRpfTocEntry::getProductType() const
-{
-   return theBoundaryInformation.getProductType();
-}
-
-/*!
- * If there is an entry and all the files don't exist we will return
- * true.
- */
-bool ossimRpfTocEntry::isEmpty()const
-{
-   long rows = (long)theFrameEntryArray.size();
-   long cols = 0;
-   if(rows > 0)
-   {
-      cols = (long)theFrameEntryArray[0].size();
-      for(long rowIndex = 0; rowIndex < rows; ++ rowIndex)
-      {
-         for(long colIndex = 0; colIndex < cols; ++colIndex)
-         {
-            if(theFrameEntryArray[rowIndex][colIndex].exists())
-            {
-               return false;
-            }
-         }
-      }
-   }
-
-   return true;
-}
-
-ossimRefPtr<ossimImageGeometry> ossimRpfTocEntry::getImageGeometry() const
-{
-
-   ossimGpt ul(theBoundaryInformation.getCoverage().getUlLat(), 
-               theBoundaryInformation.getCoverage().getUlLon());
-
-   // Decimal degrees per pixel:
-   ossimDpt ddpp;
-   getDecimalDegreesPerPixel(ddpp);
-   
-   // Tie point - Shifted to pixel-is-point:
-   ossimGpt tie( (ul.latd() - (ddpp.y/2.0)), (ul.lond() + (ddpp.x/2.0)), 0.0 );
-   
-   // Origin - Use the center latitude for horizontal scale, and the left edge as origin longitude
-   // (OLK 10/10)
-   ossimGpt origin ((ul.lat + theBoundaryInformation.getCoverage().getLlLat())/2.0, tie.lon);
-
-#if 0 /* Please leave for debug. (drb) */
-   std::cout << "boundaryInfo:\n" << boundaryInfo << std::endl;
-#endif
-
-   int z = theBoundaryInformation.getZone();
-   
-   if (z == 74) z--; // Fix J to a zone.
-   if (z > 64) z -= 64; // Below the equator
-   else z -= 48; // Above the equator
-
-   ossimRefPtr<ossimMapProjection> mapProj = 0;
-   if ( z != 9 )
-   {
-      mapProj = new ossimEquDistCylProjection;
-   }
-   else
-   {
-      mapProj = new ossimAzimEquDistProjection;
-   }
-
-   // Set the origin:
-   mapProj->setOrigin(origin);
-   
-   // Set the scale:
-   mapProj->setDecimalDegreesPerPixel(ddpp);
-
-   // Set the tie:
-   mapProj->setUlTiePoints(tie);
-
-   // Give projection to the geometry object.
-   ossimRefPtr<ossimImageGeometry> geom =  new ossimImageGeometry;
-   geom->setProjection( mapProj.get() );
-
-   return geom;
-}
-
-void ossimRpfTocEntry::getDecimalDegreesPerPixel(ossimDpt& scale) const
-{
-#if 1
-   scale.x = theBoundaryInformation.getCoverage().getHorizontalInterval();
-   scale.y = theBoundaryInformation.getCoverage().getVerticalInterval();
-#else
-   ossim_float64 ulLat = theBoundaryInformation.getCoverage().getUlLat();
-   ossim_float64 ulLon = theBoundaryInformation.getCoverage().getUlLon();
-   ossim_float64 urLon = theBoundaryInformation.getCoverage().getUrLon();
-   ossim_float64 llLat = theBoundaryInformation.getCoverage().getLrLat();
-   ossim_float64 lines = getNumberOfLines();
-   ossim_float64 samps = getNumberOfSamples();
-   scale.x = (urLon - ulLon) / samps;
-   scale.y = (ulLat - llLat) / lines;
-#endif
-}
-
-void ossimRpfTocEntry::getMetersPerPixel(ossimDpt& scale) const
-{
-   scale.x = theBoundaryInformation.getCoverage().getVerticalResolution();
-   scale.y = theBoundaryInformation.getCoverage().getHorizontalResolution();
-}
-
-void ossimRpfTocEntry::allocateFrameEntryArray()
-{
-   theFrameEntryArray.resize(theBoundaryInformation.getNumberOfFramesVertical());
-   ossim_uint32 horizontalSize = theBoundaryInformation.getNumberOfFramesHorizontal();
-
-   for(ossim_uint32 index = 0; index < theFrameEntryArray.size(); index++)
-   {
-      theFrameEntryArray[index].resize(horizontalSize);
-   }
-}
diff --git a/src/ossim/support_data/ossimSupportFilesList.cpp b/src/ossim/support_data/ossimSupportFilesList.cpp
deleted file mode 100644
index 3e4d1d0..0000000
--- a/src/ossim/support_data/ossimSupportFilesList.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-//**************************************************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Oscar Kramer
-// 
-// Description: Singleton class for logging all support data files opened during a session.
-//
-//**************************************************************************************************
-// $Id$
-
-#include <ossim/support_data/ossimSupportFilesList.h>
-#include <ossim/base/ossimKeywordlist.h>
-
-ossimSupportFilesList* ossimSupportFilesList::m_instance = 0;
-
-//*************************************************************************************************
-// Implements singleton pattern
-//*************************************************************************************************
-ossimSupportFilesList* ossimSupportFilesList::instance()
-{
-   if (!m_instance)
-      m_instance = new ossimSupportFilesList;
-
-   return m_instance;
-}
-
-//*************************************************************************************************
-// Saves the list to a KWL
-//*************************************************************************************************
-void ossimSupportFilesList::save(ossimKeywordlist& kwl, const char* prefix) const
-{
-   ossimString baseName ("support_file");
-   for (unsigned int i=0; i< (unsigned int) m_list.size(); i++)
-   {
-      ossimString key = baseName + ossimString::toString(i);
-      kwl.add(prefix, key.chars(), m_list[i]);
-   }
-}
diff --git a/src/ossim/support_data/ossimTiffInfo.cpp b/src/ossim/support_data/ossimTiffInfo.cpp
deleted file mode 100644
index e4964ee..0000000
--- a/src/ossim/support_data/ossimTiffInfo.cpp
+++ /dev/null
@@ -1,3890 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: TIFF Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimTiffInfo.cpp 2673 2011-06-06 14:57:24Z david.burken $
-
-#include <ossim/support_data/ossimTiffInfo.h>
-
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimGeoTiffCoordTransformsLut.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimTieGptSet.h>
-#include <ossim/base/ossimTrace.h>
-
-#include <ossim/projection/ossimBilinearProjection.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/projection/ossimEpsgProjectionFactory.h>
-
-#include <fstream>
-#include <iostream>
-#include <iomanip>
-#include <sstream>
-
-// Static trace for debugging
-static ossimTrace traceDebug("ossimTiffInfo:debug");
-static ossimTrace traceDump("ossimTiffInfo:dump"); // This will dump offsets.
-
-static const std::string PHOTO_INTERP[] =
-{
-   "MINISWHITE",
-   "MINISBLACK",
-   "RGB",
-   "PALETTE",
-   "MASK",
-   "SEPARATED",
-   "YCBCR",
-   "CIELAB"
-};
-
-static const std::string ANGULAR_UNITS_KW = "angular_units";
-static const std::string CENTER_LATITUDE__KW = "center_latitude";
-static const std::string CENTER_LONGITUDE_KW = "center_longitude";
-static const std::string COORD_TRANS_CODE_KW = "coord_trans_code";
-static const std::string FALSE_ORIGIN_LONGITUDE_KW = "false_origin_longitude";
-static const std::string FALSE_ORIGIN_LATITUDE_KW = "false_origin_latitude";
-static const std::string FALSE_ORIGIN_EASTING_KW = "false_origin_easting";
-static const std::string FALSE_ORIGIN_NORTHING_KW = "false_origin_northing";
-static const std::string GEODETIC_DATUM_KW = "geodetic_datum";
-static const std::string IMAGE_LENGTH_KW = "image_length";
-static const std::string IMAGE_WIDTH_KW = "image_width";
-static const std::string LINEAR_UNITS_KW = "linear_units";
-static const std::string MODEL_PIXEL_SCALE_KW = "model_pixel_scale";
-static const std::string MODEL_TIE_POINT_KW = "model_tie_point";
-static const std::string MODEL_TRANSFORM_KW = "model_transform";
-static const std::string MODEL_TYPE_KW = "model_type";
-static const std::string ORIGIN_LATITUDE_KW = "origin_latitude";
-static const std::string ORIGIN_LONGITUDE_KW = "origin_longitude";
-static const std::string RASTER_TYPE_KW = "raster_type";
-static const std::string VERTICAL_UNITS_KW = "vertical_units";
-
-
-ossimTiffInfo::ossimTiffInfo()
-   : ossimInfoBase(),
-     theFile(),
-     theEndian(0)
-{
-}
-
-ossimTiffInfo::~ossimTiffInfo()
-{
-   if (theEndian)
-   {
-      delete theEndian;
-      theEndian = 0;
-   }
-}
-
-bool ossimTiffInfo::open(const ossimFilename& file)
-{
-   bool result = false;
-
-   //---
-   // Open the tif file.
-   //---
-   std::ifstream str(file.c_str(), std::ios_base::binary|std::ios_base::in);
-   if (str.good()) 
-   {
-      //---
-      // Get the byte order.  First two byte should be "II" or "MM".
-      //---
-      char byteOrder[2];
-      str.read(byteOrder, 2); // Read the byte order.
-      ossimByteOrder sysByteOrder = ossim::byteOrder();
-      ossimByteOrder tifByteOrder = OSSIM_LITTLE_ENDIAN;
-      
-      if (byteOrder[0] == 'M')
-      {
-         tifByteOrder = OSSIM_BIG_ENDIAN;
-      }
-
-      if (sysByteOrder != tifByteOrder)
-      {
-         if (!theEndian)
-         {
-            theEndian = new ossimEndian();
-         }
-      }
-      else if (theEndian)
-      {
-         delete theEndian;
-         theEndian = 0;
-      }
-      
-      //--
-      // Get the version. Note theEndian must be set/unset before calling
-      // "readShort".
-      //---
-      ossim_uint16 version;
-      readShort(version, str);
-
-      if ( ( (byteOrder[0] == 'M') || (byteOrder[0] == 'I') ) &&
-           ( (version == 42) || (version == 43) ) )
-      {
-         result = true;  // is a tif...
-      }
-   }
-
-   if (result)
-   {
-      theFile = file;
-   }
-   else
-   {
-      theFile.clear();
-      if (theEndian)
-      {
-         delete theEndian;
-         theEndian = 0;
-      }
-   }
-
-   return result;
-}
-
-std::ostream& ossimTiffInfo::print(std::ostream& out) const
-{
-   static const char MODULE[] = "ossimTiffInfo::print";
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " DEBUG Entered...\n";
-   }
-
-   //---
-   // Open the tif file.
-   //---
-   std::ifstream str(theFile.c_str(), std::ios_base::binary|std::ios_base::in);
-   if (!str) 
-   {
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE << " Cannot open file:  " << theFile << std::endl;
-      }
-      return out;
-   }
-   
-   //---
-   // Get the byte order.  First two byte should be "II" or "MM".
-   //---
-   char byteOrder[2];
-   str.read(byteOrder, 2); // Read the byte order.
-   ossimByteOrder sysByteOrder = ossim::byteOrder();
-   ossimByteOrder tifByteOrder = OSSIM_LITTLE_ENDIAN;
-   
-   if (byteOrder[0] == 'M')
-   {
-      tifByteOrder = OSSIM_BIG_ENDIAN;
-   }
-   
-   if (sysByteOrder != tifByteOrder)
-   {
-      if (!theEndian)
-      {
-         theEndian = new ossimEndian();
-      }
-   }
-   else if (theEndian) // No swapping required.
-   {
-      delete theEndian;
-      theEndian = 0;
-   }
-
-   //--
-   // Get the version. Note theEndian must be set/unset before calling
-   // "readShort".
-   //---
-   ossim_uint16 version;
-   readShort(version, str);
-
-   // Set the tag value length.
-   ossim_uint64 tagValueLength;
-   if (version == 42)
-   {
-      tagValueLength = 4;
-   }
-   else
-   {
-      tagValueLength = 8;
-   }
-
-   out << "tiff.version: " << int(version)
-       << ((version==42)?"(classic)\n":"(big)\n")
-       << "tiff.byte_order: ";
-   
-   if (byteOrder[0] == 'M')
-   {
-      out << "big_endian\n";
-   }
-   else // OSSIM_LITTLE_ENDIAN
-   {
-      out  << "little_endian\n";
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)<< "system_byte_order: ";
-      if (ossim::byteOrder() == OSSIM_BIG_ENDIAN)
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)<< "big_endian\n";
-      }
-      else // OSSIM_LITTLE_ENDIAN
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)<< "little_endian\n";
-      }
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "tiff.tag_value_length: " << tagValueLength << "\n";
-   }
-
-   //---
-   // Variables used within the loop.
-   //---
-   std::streamoff seekOffset;      // used throughout
-   std::streampos streamPosition;  // used throughout
-
-   if (version == 43)
-   {
-      // We must skip the first four bytes.
-      ossim_uint32 offsetSize;
-      readLong(offsetSize, str);
-   }
-
-   // Get the offset.
-   if (getOffset(seekOffset, str, version) == false)
-   {
-     ossimNotify(ossimNotifyLevel_WARN) 
-        << MODULE << " FATAL ERROR - "
-        << "No offset to an image file directory found.\n"
-        << "Returning with error."
-        << std::endl;
-     str.close();
-     return out;
-   }
-   
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " DEBUG: "
-         << "Offset to first ifd:  " << seekOffset
-         << "\n";
-   }
-
-   // Capture the original flags then set float output to full precision.
-   std::ios_base::fmtflags f = out.flags();
-   out << std::setprecision(15);
-   
-   // Image File Directory (IFD) loop.
-   ossim_int32 ifdIndex = 0;
-   while(seekOffset)
-   {
-      out << "tiff.directory_offset: " << seekOffset << "\n";
-
-      // Seek to the image file directory.
-      str.seekg(seekOffset, std::ios_base::beg);  
-
-      // directory prefix for prints.
-      std::string prefix = "tiff.";
-      getDirPrefix(ifdIndex, prefix);
-
-      //---
-      // Things we need to save for printGeoKeys:
-      //---
-      ossim_uint16*  geoKeyBlock     = 0;
-      ossim_uint64   geoKeyLength    = 0;
-      ossim_float64* geoDoubleBlock  = 0;
-      ossim_uint64   geoDoubleLength = 0;
-      ossim_int8*    geoAsciiBlock   = 0;
-      ossim_uint64   geoAsciiLength  = 0;
-      
-      //---
-      // Get the number of directories within the IFD.
-      //---
-      ossim_uint64 nTags; // Number of tags in an IFD.
-      if (getValue(nTags, str, TWO_OR_EIGHT, version) == false)
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << " FATAL error reading number of direcories."
-               << std::endl;
-         }
-         str.close();
-         return out;
-      }
-
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE << " DEBUG:\n"
-            << "ifd:  " << seekOffset
-            << "\ntags in directory:  " << nTags<< "\n";
-      }
-
-      // Tag loop:
-      for (ossim_uint64 tagIdx = 0; tagIdx < nTags; ++tagIdx)
-      {
-         // Variables used within the loop.
-         ossim_uint16   tag              = 0; // Tag number
-         ossim_uint16   type             = 0; // Type(short, long...)
-         ossim_uint64   count            = 0;
-         ossim_uint64   arraySizeInBytes = 0; // 
-         ossim_uint8*   valueArray       = 0; // To hold value.
-         
-         //---
-         // Get the tag.
-         //---
-         readShort(tag, str);
-         if (!str)
-         {
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << MODULE << " FATAL error reading tag number."
-                  << std::endl;
-            }
-            str.close();
-            return out;
-         }
-
-         //---
-         // Get the type (byte, ascii, short...)
-         //---
-         readShort(type, str);
-         if (!str)
-         {
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << MODULE << " FATAL error reading type number."
-                  << std::endl;
-            }
-            str.close();
-            return out;
-         }
-
-         //---
-         // Get the count.  This is not in bytes.  It is based on the
-         // type.  So if the type is a short and the count is one then
-         // read "sizeof(short"(2) bytes.
-         //---
-         getValue(count, str, FOUR_OR_EIGHT, version);
-         if (!str)
-         {
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << MODULE << " FATAL error reading count."
-                  << std::endl;
-            }
-            str.close();
-            return out;
-         }
-
-         // Get the array size in bytes.
-         arraySizeInBytes = getArraySizeInBytes(count, type);
-         if (arraySizeInBytes == 0)
-         {
-            // Could be an unhandle type.  Gobble the value.
-            eatValue(str, version);
-         }
-         else
-         {
-            // Allocate array.
-            if (valueArray) delete [] valueArray;
-            valueArray = new ossim_uint8[arraySizeInBytes];
-
-            if (arraySizeInBytes <= tagValueLength)
-            {
-               // Read in the value(s).
-               str.read((char*)valueArray, arraySizeInBytes);
-
-               // Skip any byes left in the field.
-               if (arraySizeInBytes < tagValueLength)
-               {
-                  // Skip these bytes.
-                  str.ignore(tagValueLength-arraySizeInBytes);
-               }
-            }
-            else // Data to big for field.  Stored elsewhere...
-            {
-               // Get the offset to the data.
-               getOffset(seekOffset, str, version);
-
-               // Capture the seek position to come back to.
-               streamPosition = str.tellg();
-
-               // Seek to the data.
-               str.seekg(seekOffset, std::ios_base::beg);
-
-               // Read in the value(s).
-               str.read((char*)valueArray, arraySizeInBytes);
-
-               // Seek back.
-               str.seekg(streamPosition);
-            }
-
-            // Swap the bytes if needed.
-            swapBytes(valueArray, type, count);
-         }
-
-         if( traceDebug() )
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << MODULE << " DEBUG:"
-               << "\ntag[" << tagIdx << "]:" << tag
-               << "\ntype:                " << type
-               << "\ncount:        " << count
-               << "\narray size in bytes: " << arraySizeInBytes
-               << "\n";
-	 }
-
-         if (tag == OGEO_KEY_DIRECTORY_TAG)
-         {
-            // tag 34735 save for printGeoKeys
-            geoKeyBlock = reinterpret_cast<ossim_uint16*>(valueArray);
-            geoKeyLength = count;
-         }
-         else if (tag == OGEO_DOUBLE_PARAMS_TAG)
-         {
-            // tag 34736 save for printGeoKeys
-            geoDoubleBlock  = reinterpret_cast<ossim_float64*>(valueArray);
-            geoDoubleLength = count;
-         }
-         else if (tag == OGEO_ASCII_PARAMS_TAG)
-         {
-            // tag 34737 save for printGeoKeys
-            geoAsciiBlock   = reinterpret_cast<ossim_int8*>(valueArray);
-            geoAsciiLength  = count;
-         }
-         else
-         {
-            print(out,
-                  prefix,
-                  tagIdx,
-                  tag,
-                  type,
-                  count,
-                  arraySizeInBytes,
-                  valueArray);
-            
-            // Free memory if allocated...
-            if (valueArray)
-            {
-               delete [] valueArray;
-               valueArray = 0;
-            }
-         }
-         
-      } // End of tag loop.
-
-      //---
-      // If Geotiff Keys read them.
-      // This had to done last since the keys could
-      // have references to tags GEO_DOUBLE_PARAMS_TAG and
-      // GEO_ASCII_PARAMS_TAG.
-      //---
-      if (geoKeyBlock)
-      {
-         printGeoKeys(out, prefix, geoKeyLength, geoKeyBlock,
-                      geoDoubleLength,geoDoubleBlock,
-                      geoAsciiLength,geoAsciiBlock);
-
-         delete [] geoKeyBlock;
-         geoKeyBlock = 0;
-      }
-
-      if (geoDoubleBlock)
-      {
-         delete [] geoDoubleBlock;
-         geoDoubleBlock = 0;
-      }
-      if (geoAsciiBlock)
-      {
-         delete [] geoAsciiBlock;
-         geoAsciiBlock = 0;
-      }
-      geoKeyLength = 0;
-      geoDoubleLength = 0;
-      geoAsciiLength = 0;
-
-      //---
-      // Get the next IFD offset.  Continue this loop until the offset is
-      // zero.
-      //---
-      if (getOffset(seekOffset, str, version) == false)
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << " No offset to an image file directory found.\n"
-               << "Returning with error."
-               << std::endl;
-         }
-         str.close();
-         return out;
-      }
-      
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG ossimTiffInfo::readTags: "
-            << "Next Image File Directory(IFD) offset = "
-            << seekOffset << "\n";
-      }
-
-      ++ifdIndex; // next ifd
-
-      //---
-      // Note this does NOT check to see if sub_file_type is '1' simply
-      // skips all directories past the first if theOverviewFlag is false.
-      //---
-      if ( ifdIndex && !theOverviewFlag) // Don't process overviews...
-      {
-         break;
-      }
-      
-   } // End of loop through the IFD's.
-   
-   out << std::endl;
-    
-   str.close();
-
-   // Reset flags.
-   out.setf(f);
-   
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " DEBUG Exited..." << std::endl;
-   }
-   
-   return out;
-}
-
-std::ostream& ossimTiffInfo::print(std::istream& inStr,
-                                   std::ostream& outStr) const
-{
-   static const char MODULE[] = "ossimTiffInfo::print(std::istream&, std::ostream&)";
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG Entered...\n";
-   }
-
-   std::streampos startPosition = inStr.tellg();
-   
-   //---
-   // Get the byte order.  First two byte should be "II" or "MM".
-   //---
-   char byteOrder[2];
-   inStr.read(byteOrder, 2); // Read the byte order.
-   ossimByteOrder sysByteOrder = ossim::byteOrder();
-   ossimByteOrder tifByteOrder = OSSIM_LITTLE_ENDIAN;
-   
-   if (byteOrder[0] == 'M')
-   {
-      tifByteOrder = OSSIM_BIG_ENDIAN;
-   }
-   
-   if (sysByteOrder != tifByteOrder)
-   {
-      if (!theEndian)
-      {
-         theEndian = new ossimEndian();
-      }
-   }
-   else if (theEndian) // No swapping required.
-   {
-      delete theEndian;
-      theEndian = 0;
-   }
-
-   //--
-   // Get the version. Note theEndian must be set/unset before calling
-   // "readShort".
-   //---
-   ossim_uint16 version;
-   readShort(version, inStr);
-
-   // Set the tag value length.
-   ossim_uint64 tagValueLength;
-   if (version == 42)
-   {
-      tagValueLength = 4;
-   }
-   else
-   {
-      tagValueLength = 8;
-   }
-
-   outStr << "tiff.version: " << int(version)
-          << ((version==42)?"(classic)\n":"(big)\n")
-          << "tiff.byte_order: ";
-   
-   if (byteOrder[0] == 'M')
-   {
-      outStr << "big_endian\n";
-   }
-   else // OSSIM_LITTLE_ENDIAN
-   {
-      outStr  << "little_endian\n";
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)<< "system_byte_order: ";
-      if (ossim::byteOrder() == OSSIM_BIG_ENDIAN)
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)<< "big_endian\n";
-      }
-      else // OSSIM_LITTLE_ENDIAN
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)<< "little_endian\n";
-      }
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "tiff.tag_value_length: " << tagValueLength << "\n";
-   }
-
-   //---
-   // Variables used within the loop.
-   //---
-   std::streamoff seekOffset;      // used throughout
-   std::streampos streamPosition;  // used throughout
-
-   if (version == 43)
-   {
-      // We must skip the first four bytes.
-      ossim_uint32 offsetSize;
-      readLong(offsetSize, inStr);
-   }
-
-   // Get the offset.
-   if (getOffset(seekOffset, inStr, version) == false)
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN) 
-            << MODULE << " FATAL ERROR - "
-            << "No offset to an image file directory found.\n"
-            << "Returning with error."
-            << std::endl;
-      }
-      return outStr;
-   }
-   
-   if (traceDebug())
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << MODULE << " DEBUG: "
-            << "Offset to first ifd:  " << seekOffset
-            << "\n";
-      }
-   }
-
-   // Capture the original flags then set float output to full precision.
-   std::ios_base::fmtflags f = outStr.flags();
-   outStr << std::setprecision(15);
-   
-   // Image File Directory (IFD) loop.
-   ossim_int32 ifdIndex = 0;
-   while(seekOffset)
-   {
-      outStr << "tiff.directory_offset: " << seekOffset << "\n";
-
-      // Seek to the image file directory.
-      inStr.seekg(startPosition+seekOffset, std::ios_base::beg);  
-
-      // directory prefix for prints.
-      std::string prefix = "tiff.";
-      getDirPrefix(ifdIndex, prefix);
-
-      //---
-      // Things we need to save for printGeoKeys:
-      //---
-      ossim_uint16*  geoKeyBlock     = 0;
-      ossim_uint64   geoKeyLength    = 0;
-      ossim_float64* geoDoubleBlock  = 0;
-      ossim_uint64   geoDoubleLength = 0;
-      ossim_int8*    geoAsciiBlock   = 0;
-      ossim_uint64   geoAsciiLength  = 0;
-      
-      //---
-      // Get the number of directories within the IFD.
-      //---
-      ossim_uint64 nTags; // Number of tags in an IFD.
-      if (getValue(nTags, inStr, TWO_OR_EIGHT, version) == false)
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << " FATAL error reading number of direcories."
-               << std::endl;
-         }
-         return outStr;
-      }
-
-      if (traceDebug())
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << MODULE << " DEBUG:\n"
-               << "ifd:  " << seekOffset
-               << "\ntags in directory:  " << nTags<< "\n";
-         }
-      }
-
-      // Tag loop:
-      for (ossim_uint64 tagIdx = 0; tagIdx < nTags; ++tagIdx)
-      {
-         // Variables used within the loop.
-         ossim_uint16   tag              = 0; // Tag number
-         ossim_uint16   type             = 0; // Type(short, long...)
-         ossim_uint64   count            = 0;
-         ossim_uint64   arraySizeInBytes = 0; // 
-         ossim_uint8*   valueArray       = 0; // To hold value.
-         
-         //---
-         // Get the tag.
-         //---
-         readShort(tag, inStr);
-         if (!inStr)
-         {
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << MODULE << " FATAL error reading tag number."
-                  << std::endl;
-            }
-            return outStr;
-         }
-
-         //---
-         // Get the type (byte, ascii, short...)
-         //---
-         readShort(type, inStr);
-         if (!inStr)
-         {
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << MODULE << " FATAL error reading type number."
-                  << std::endl;
-            }
-            return outStr;
-         }
-
-         //---
-         // Get the count.  This is not in bytes.  It is based on the
-         // type.  So if the type is a short and the count is one then
-         // read "sizeof(short"(2) bytes.
-         //---
-         getValue(count, inStr, FOUR_OR_EIGHT, version);
-         if (!inStr)
-         {
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_WARN)
-                  << MODULE << " FATAL error reading count."
-                  << std::endl;
-            }
-            return outStr;
-         }
-
-         // Get the array size in bytes.
-         arraySizeInBytes = getArraySizeInBytes(count, type);
-         if (arraySizeInBytes == 0)
-         {
-            // Could be an unhandle type.  Gobble the value.
-            eatValue(inStr, version);
-         }
-         else
-         {
-            // Allocate array.
-            if (valueArray) delete [] valueArray;
-            valueArray = new ossim_uint8[arraySizeInBytes];
-
-            if (arraySizeInBytes <= tagValueLength)
-            {
-               // Read in the value(s).
-               inStr.read((char*)valueArray, arraySizeInBytes);
-
-               // Skip any byes left in the field.
-               if (arraySizeInBytes < tagValueLength)
-               {
-                  // Skip these bytes.
-                  inStr.ignore(tagValueLength-arraySizeInBytes);
-               }
-            }
-            else // Data to big for field.  Stored elsewhere...
-            {
-               // Get the offset to the data.
-               getOffset(seekOffset, inStr, version);
-
-               // Capture the seek position to come back to.
-               streamPosition = inStr.tellg();
-
-               // Seek to the data.
-               inStr.seekg(startPosition+seekOffset, std::ios_base::beg);
-
-               // Read in the value(s).
-               inStr.read((char*)valueArray, arraySizeInBytes);
-
-               // Seek back.
-               inStr.seekg(streamPosition);
-            }
-
-            // Swap the bytes if needed.
-            swapBytes(valueArray, type, count);
-         }
-
-         if( traceDebug() )
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << MODULE << " DEBUG:"
-               << "\ntag[" << tagIdx << "]:" << tag
-               << "\ntype:                " << type
-               << "\ncount:        " << count
-               << "\narray size in bytes: " << arraySizeInBytes
-               << "\n";
-         }
-
-         if (tag == OGEO_KEY_DIRECTORY_TAG)
-         {
-            // tag 34735 save for printGeoKeys
-            geoKeyBlock = reinterpret_cast<ossim_uint16*>(valueArray);
-            geoKeyLength = count;
-         }
-         else if (tag == OGEO_DOUBLE_PARAMS_TAG)
-         {
-            // tag 34736 save for printGeoKeys
-            geoDoubleBlock  = reinterpret_cast<ossim_float64*>(valueArray);
-            geoDoubleLength = count;
-         }
-         else if (tag == OGEO_ASCII_PARAMS_TAG)
-         {
-            // tag 34737 save for printGeoKeys
-            geoAsciiBlock   = reinterpret_cast<ossim_int8*>(valueArray);
-            geoAsciiLength  = count;
-         }
-         else
-         {
-            print(outStr,
-                  prefix,
-                  tagIdx,
-                  tag,
-                  type,
-                  count,
-                  arraySizeInBytes,
-                  valueArray);
-            
-            // Free memory if allocated...
-            if (valueArray)
-            {
-               delete [] valueArray;
-               valueArray = 0;
-            }
-         }
-         
-      } // End of tag loop.
-
-      //---
-      // If Geotiff Keys read them.
-      // This had to done last since the keys could
-      // have references to tags GEO_DOUBLE_PARAMS_TAG and
-      // GEO_ASCII_PARAMS_TAG.
-      //---
-      if (geoKeyBlock)
-      {
-         printGeoKeys(outStr, prefix, geoKeyLength, geoKeyBlock,
-                      geoDoubleLength,geoDoubleBlock,
-                      geoAsciiLength,geoAsciiBlock);
-
-         delete [] geoKeyBlock;
-         geoKeyBlock = 0;
-      }
-
-      if (geoDoubleBlock)
-      {
-         delete [] geoDoubleBlock;
-         geoDoubleBlock = 0;
-      }
-      if (geoAsciiBlock)
-      {
-         delete [] geoAsciiBlock;
-         geoAsciiBlock = 0;
-      }
-      geoKeyLength = 0;
-      geoDoubleLength = 0;
-      geoAsciiLength = 0;
-
-      //---
-      // Get the next IFD offset.  Continue this loop until the offset is
-      // zero.
-      //---
-      if (getOffset(seekOffset, inStr, version) == false)
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << " No offset to an image file directory found.\n"
-               << "Returning with error."
-               << std::endl;
-         }
-         return outStr;
-      }
-      
-      if (traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "DEBUG ossimTiffInfo::readTags: "
-            << "Next Image File Directory(IFD) offset = "
-            << seekOffset << "\n";
-      }
-
-      ++ifdIndex; // next ifd
-
-      //---
-      // Note this does NOT check to see if sub_file_type is '1' simply
-      // skips all directories past the first if theOverviewFlag is false.
-      //---
-      if ( ifdIndex && !theOverviewFlag) // Don't process overviews...
-      {
-         break;
-      }
-      
-   } // End of loop through the IFD's.
-   
-   outStr << std::endl;
-    
-   // Reset flags.
-   outStr.setf(f);
-   
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " DEBUG Exited..." << std::endl;
-   }
-   
-   return outStr;
-}
-
-bool ossimTiffInfo::getImageGeometry(ossimKeywordlist& geomKwl,
-                                     ossim_uint32 entryIndex) const
-{
-   static const char MODULE[] = "ossimTiffInfo::getImageGeometry #1";
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << " entered...\n";
-   }
-   
-   bool result = false;
-
-   // Open the file.
-   std::ifstream str;
-   str.open(theFile.c_str(), ios::in | ios::binary);
-   
-   if ( str.is_open() )
-   {
-      result = getImageGeometry(str, geomKwl, entryIndex);
-
-      str.close();
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "geomKwl:\n"
-         << geomKwl
-         << MODULE << " exit status = " << (result?"true":"false") << "\n";
-   }
-
-   return result;
-}
-
-bool ossimTiffInfo::getImageGeometry(std::istream& inStr,
-                                     ossimKeywordlist& geomKwl,
-                                     ossim_uint32 entryIndex) const
-{
-   static const char M[] = "ossimTiffInfo::getImageGeometry #2";
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << " entered...\n";
-   }
-   
-   bool result = false;
-
-   // Do a print to a memory stream.
-   std::ostringstream out;
-   print(inStr, out);
-
-   // Open an input stream to pass to the keyword list.
-   std::istringstream in( out.str() );
-
-   // Since the print is in key:value format we can pass to a keyword list.
-   ossimKeywordlist gtiffKwl;
-   if ( gtiffKwl.parseStream(in) )      
-   {
-      result = getImageGeometry(gtiffKwl, geomKwl, entryIndex);
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "geomKwl:\n"
-         << geomKwl
-         << M << " exit status = " << (result?"true":"false") << "\n";
-   }
-
-   return result;
-}
-
-void ossimTiffInfo::getImageGeometry(ossim_uint64   geoKeyLength,
-                                     ossim_uint16*  geoKeyBlock,
-                                     ossim_uint64   geoDoubleLength,
-                                     ossim_float64* geoDoubleBlock,
-                                     ossim_uint64   geoAsciiLength,
-                                     ossim_int8*    geoAsciiBlock,
-                                     ossimKeywordlist& geomKwl) const
-{
-   static const char M[] = "ossimTiffInfo::getImageGeometry #3";
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
-   }
-
-   // Dump the geotiff keys to memory.
-   ostringstream out;
-   printGeoKeys(out, std::string("tiff.image0."),
-                geoKeyLength, geoKeyBlock,
-                geoDoubleLength,geoDoubleBlock,
-                geoAsciiLength,geoAsciiBlock);
-
-   // Open an input stream to pass to the keyword list.
-   std::istringstream in( out.str() );
-
-   // Since the print is in key:value format we can pass to a keyword list.
-   ossimKeywordlist gtiffKwl;
-   if ( gtiffKwl.parseStream(in) )
-   {
-      getImageGeometry(gtiffKwl, geomKwl, 0);
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
-   }
-}
-
-// Private method:
-bool ossimTiffInfo::getImageGeometry(const ossimKeywordlist& gtiffKwl,
-                                     ossimKeywordlist& geomKwl,
-                                     ossim_uint32 entryIndex) const
-{
-   static const char M[] = "ossimTiffInfo::getImageGeometry #4";
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
-   }
-   
-   //---
-   // Start with a return status of true and set to false if something bad
-   // happens.
-   //---
-   bool result = true;
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "tiffinfo dump to kwl:\n" << gtiffKwl << "\n";
-   }
-   
-   ossimString gtiffPrefix = "tiff.image";
-   gtiffPrefix += ossimString::toString(entryIndex);
-   gtiffPrefix += ".";
-   ossimString geomPrefix = "image";
-   geomPrefix += ossimString::toString(entryIndex);
-   geomPrefix += ".";
-   
-   // Get the pixel type.
-   ossimString pixelType;
-   if ( getPixelType(gtiffPrefix, gtiffKwl, pixelType) == false )
-   {
-      pixelType = "pixel_is_point"; // Not an error we'll make assumption?
-   }
-   geomKwl.add(geomPrefix.c_str(),
-               ossimKeywordNames::PIXEL_TYPE_KW,
-               pixelType.c_str());
-   
-   // Get the lines.
-   ossim_uint32 height = getLines(gtiffPrefix, gtiffKwl);
-   if (height)
-   {
-      geomKwl.add(geomPrefix.c_str(),
-                  ossimKeywordNames::NUMBER_LINES_KW,
-                  height);
-   }
-   else
-   {
-      result = false;
-   }
-   
-   // Get the samples.
-   ossim_uint32 width = getSamples(gtiffPrefix, gtiffKwl);
-   if (width)
-   {
-      geomKwl.add(geomPrefix.c_str(),
-                  ossimKeywordNames::NUMBER_SAMPLES_KW,
-                  width);
-   }
-   else
-   {
-      result = false;
-   }
-   
-   // Add the pixel type.
-   geomKwl.add(geomPrefix.c_str(),
-               ossimKeywordNames::PIXEL_TYPE_KW,
-               pixelType.c_str());
-   
-   // Set the projection type.
-   bool isGeographic = false;
-   ossimString pcsCode;
-   ossimString ossimProjectionName = "";
-   bool hasPcsCode = getPcsCode(gtiffPrefix, gtiffKwl, pcsCode);
-
-   //---
-   // The ossimEpsgProjectionFactory will not pick up the origin latitude if code is
-   // 4326 (geographic) so we use the projection name; else, the origin_latitude will
-   // always be 0.  This is so the gsd comes out correct for scale.
-   //---
-   if ( hasPcsCode && ( pcsCode != "4326" ) )
-   {
-      // Add the pcs code.
-      geomKwl.add(geomPrefix.c_str(),
-                  ossimKeywordNames::PCS_CODE_KW,
-                  pcsCode.c_str());
-   }
-   else
-   {
-      if ( getOssimProjectionName(gtiffPrefix, gtiffKwl, ossimProjectionName) == false )
-      {
-         ossimProjectionName = "ossimEquDistCylProjection";
-      }
-      geomKwl.add(geomPrefix.c_str(), ossimKeywordNames::TYPE_KW, ossimProjectionName);
-
-      if ( ossimProjectionName == "ossimEquDistCylProjection" )
-      {
-         isGeographic = true;
-      }
-   }
-   
-   // Get the units. 
-   ossimString units = "";
-   getUnits(gtiffPrefix, gtiffKwl, units);
-   if (units.empty() || (units.contains("unknown")))
-   {
-      // HACK: Encountered JP2 with geotiff info that did not specify units, so using projection
-      // type to discern units if none explicitly specified. (OLK 05/11)
-      if (ossimProjectionName == "ossimEquDistCylProjection")
-         units = "degrees";
-   }
-   
-   // Get the pixel scale.
-   ossimDpt scale;
-   bool hasScale = getPixelScale(gtiffPrefix, gtiffKwl, scale);
-   
-   // Get the tie point.
-   std::vector<ossim_float64> ties;
-   getTiePoint(gtiffPrefix, gtiffKwl, ties);
-
-   //---
-   // Tie count:
-   // NOTE: It takes six doubles to make one tie point ie:
-   // x,y,z,longitude,latitude,height or x,y,z,easting,northing,height
-   //--- 
-   ossim_uint32 tieCount = (ossim_uint32)ties.size()/6;
-   
-   // Get the model transform.
-   std::vector<ossim_float64> xfrm;
-   getModelTransform(gtiffPrefix, gtiffKwl, xfrm);
-   
-   bool useXfrm = false;
-   if ( xfrm.size() == 16 )
-   {
-      // Need at least 24 (which is four ties) to use bilinear.
-      if ( !hasScale && ties.size() < 24 )
-      {
-         useXfrm = true;
-      }
-   }
-   if (useXfrm)
-   {
-      std::ostringstream out;
-      out << std::setprecision(15); // To avoid truncating.
-      ossim_uint32 idx = 0;
-      for(idx =0; idx < 16; ++idx)
-      {
-         out << xfrm[idx] << " ";
-      }
-      geomKwl.add(geomPrefix.c_str(),
-                  ossimKeywordNames::IMAGE_MODEL_TRANSFORM_MATRIX_KW,
-                  out.str().c_str(), true);
-      geomKwl.add(geomPrefix.c_str(),
-                  ossimKeywordNames::IMAGE_MODEL_TRANSFORM_UNIT_KW,
-                  units.c_str(), true);
-   }
-   else // Use tie points.
-   {
-      if ( hasScale && (tieCount == 1) )
-      {
-         // Shift the tile to 0,0 pixel of image if not already there.
-         ossimDpt tie;
-         tie.x = ties[3] - ties[0] * scale.x;
-         tie.y = ties[4] + ties[1] * scale.y;
-         geomKwl.add(geomPrefix.c_str(),
-                     ossimKeywordNames::TIE_POINT_XY_KW,
-                     tie.toString().c_str());
-         geomKwl.add(geomPrefix.c_str(),
-                     ossimKeywordNames::TIE_POINT_UNITS_KW,
-                     units.c_str());
-         
-         // Add the scale.
-         geomKwl.add(geomPrefix.c_str(),
-                     ossimKeywordNames::PIXEL_SCALE_XY_KW,
-                     scale.toString().c_str());
-         geomKwl.add(geomPrefix.c_str(),
-                     ossimKeywordNames::PIXEL_SCALE_UNITS_KW,
-                     units.c_str());
-      }
-      else if (tieCount > 1) // four or better tie points.
-      {
-         ossimTieGptSet tieSet;
-         getTieSets(ties, width, height, tieSet);
-         
-         if(tieCount >= 4)
-         {
-            ossimRefPtr<ossimBilinearProjection> proj =
-               new ossimBilinearProjection;
-            proj->optimizeFit(tieSet);
-            proj->saveState(geomKwl, geomPrefix.c_str());
-            if(traceDebug())
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG)
-                  << "Creating a bilinear projection\n";
-            }
-         }
-         else  // Need at least four ties.
-         {
-            result = false;
-         }
-      }
-      else
-      {
-         result = false;
-      }
-      
-   } // matches: else Use tie points block.
-   
-   ossimString tmpStr;
-   if ( getStdParallelOne(gtiffPrefix, gtiffKwl, tmpStr) )
-   {
-      geomKwl.add(geomPrefix.c_str(),
-                  ossimKeywordNames::STD_PARALLEL_1_KW,
-                  tmpStr);
-   }
-   
-   if ( getStdParallelTwo(gtiffPrefix, gtiffKwl, tmpStr) )
-   {
-      geomKwl.add(geomPrefix.c_str(),
-                  ossimKeywordNames::STD_PARALLEL_2_KW,
-                  tmpStr);
-   }
-   
-   ossimDpt eastingNorthing;
-   if ( getFalseEastingNorthing(gtiffPrefix, gtiffKwl,
-                                eastingNorthing) )
-   {
-      geomKwl.add(geomPrefix.c_str(),
-                  ossimKeywordNames::FALSE_EASTING_NORTHING_KW,
-                  eastingNorthing.toString());
-      geomKwl.add(geomPrefix.c_str(),
-                  ossimKeywordNames::
-                  FALSE_EASTING_NORTHING_UNITS_KW, units);
-   }
-   
-   ossim_float64 tmpDbl = ossim::nan();
-   
-   if ( getOriginLat(gtiffPrefix, gtiffKwl, tmpDbl) == false )
-   {
-      if ( isGeographic && hasScale && scale.x )
-      {
-         //---
-         // ossimEquDistCylProjection uses the origin_latitude for meters per pixel (gsd)
-         // computation.  So is not set in tiff tags, compute to achieve the proper
-         // horizontal scaling.
-         //---
-         tmpDbl = ossim::acosd(scale.y/scale.x);
-      }
-   }
-   if ( !ossim::isnan(tmpDbl) )
-   {
-      geomKwl.add(geomPrefix.c_str(),
-                  ossimKeywordNames::ORIGIN_LATITUDE_KW,
-                  tmpDbl);
-   }
-   
-   if ( getCentralMeridian(gtiffPrefix, gtiffKwl, tmpDbl) )
-   {
-      geomKwl.add(geomPrefix.c_str(),
-                  ossimKeywordNames::CENTRAL_MERIDIAN_KW,
-                  tmpDbl);
-   }
-   
-   if ( getScaleFactor(gtiffPrefix, gtiffKwl, tmpDbl) )
-   {
-      geomKwl.add(geomPrefix.c_str(),
-                  ossimKeywordNames::SCALE_FACTOR_KW,
-                  tmpDbl);
-   }
-   
-   if ( getDatumCode(gtiffPrefix, gtiffKwl, tmpStr) )
-   {
-      geomKwl.add(geomPrefix.c_str(),
-                  ossimKeywordNames::DATUM_KW,
-                  tmpStr.c_str());
-   }
-
-   //---
-   // Linear and vertical units not read by projection factories but added so external user could
-   // query.
-   //---
-   if ( getLinearUnits(gtiffPrefix, gtiffKwl, tmpStr) )
-   {
-      geomKwl.add(geomPrefix.c_str(),
-                  LINEAR_UNITS_KW.c_str(),
-                  tmpStr.c_str());
-   }
-
-   if ( getVerticalUnits(gtiffPrefix, gtiffKwl, tmpStr) )
-   {
-      geomKwl.add(geomPrefix.c_str(),
-                  VERTICAL_UNITS_KW.c_str(),
-                  tmpStr.c_str());
-   }
-
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "geomKwl:\n"
-         << geomKwl << "\n"
-         << M << " exit status = " << (result?"true":"false") << "\n";
-   }
-   
-   return result;
-}
-
-void ossimTiffInfo::readShort(ossim_uint16& s, std::istream& str) const
-{
-   str.read((char*)&s, sizeof(s));
-   if (theEndian)
-   {
-      theEndian->swap(s);
-   }
-}
-
-void ossimTiffInfo::readLong(ossim_uint32& l, std::istream& str) const
-{
-   str.read((char*)&l, sizeof(l));
-   if (theEndian)
-   {
-      theEndian->swap(l);
-   }
-}
-
-void ossimTiffInfo::readLongLong(ossim_uint64& l, std::istream& str) const
-{
-   str.read((char*)&l, sizeof(l));
-   if (theEndian)
-   {
-      theEndian->swap(l);
-   }
-}
-
-
-
-bool ossimTiffInfo::getOffset(
-   std::streamoff& offset, std::istream& str, ossim_uint16 version) const
-{
-   bool status = true;
-   if  (version == 42)
-   {
-      ossim_uint32   littleOffset;
-      readLong(littleOffset, str);
-      offset = littleOffset;
-   }
-   else
-   {
-      ossim_uint64 bigOffset;
-      readLongLong(bigOffset, str);
-      offset = bigOffset;
-   }
-   if (!str)
-   {
-      status = false;
-   }
-   return status;
-}
-
-bool ossimTiffInfo::getValue(ossim_uint64& value,
-                             std::istream& str,
-                             WordType type,
-                             ossim_uint16 version) const
-{
-   bool status = true;
-   if  (version == 42)
-   {
-      if (type == TWO_OR_EIGHT)
-      {
-         ossim_uint16 i;
-         readShort(i, str);
-         value = i;
-      }
-      else
-      {
-         ossim_uint32 i;
-         readLong(i, str);
-         value = i;
-      }
-   }
-   else
-   {
-      ossim_uint64 i;
-      readLongLong(i, str);
-      value = i;
-   }
-   if (!str)
-   {
-      status = false;
-   }
-   return status;
-}
-
-ossim_uint64 ossimTiffInfo::getArraySizeInBytes(ossim_uint64 length,
-                                                ossim_uint16 type) const
-{
-   return length * getTypeByteSize(type);
-}
-
-ossim_uint16 ossimTiffInfo::getTypeByteSize(ossim_uint16 type) const
-{
-   ossim_uint16 result = 0;
-   
-   switch (type)
-   {
-      case OTIFF_BYTE:
-      case OTIFF_ASCII:
-      case OTIFF_SBYTE:
-      case OTIFF_UNDEFINED:
-      {
-         result = 1;
-         break;
-      }
-         
-      case OTIFF_SHORT:
-      case OTIFF_SSHORT:
-      {
-         result = 2;
-         break;
-      }
-         
-      case OTIFF_LONG:
-      case OTIFF_SLONG:
-      case OTIFF_IFD:
-      case OTIFF_FLOAT:
-      {
-         result = 4;
-         break;
-      }
-         
-      case OTIFF_RATIONAL:
-      case OTIFF_SRATIONAL:
-      case OTIFF_DOUBLE:
-      case 16:             // TIFF_LONG8 defined in big tiff only.
-      case 17:             // TIFF_SLONG8 defined in big tiff only.
-      case 18:             // TIFF_IFD8 defined in big tiff only.
-      {
-         result = 8;
-         break;
-      }
-
-      default:
-      {
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "ossimTiffInfo::getTypeByteSize DEBUG:"
-               << "\nUnhandled type: " << int(type) << "\n";
-         }
-         break;
-      }
-   }
-   return result;
-}
-
-void ossimTiffInfo::eatValue(std::istream& str, ossim_uint16 version) const
-{
-   if (version == 42)
-   {
-      ossim_uint32 dummy;
-      readLong(dummy, str);
-   }
-   else
-   {
-      ossim_uint64 dummy;
-      readLongLong(dummy, str);
-   }
-}
-
-void ossimTiffInfo::swapBytes(ossim_uint8* v,
-                              ossim_uint16 type,
-                              ossim_uint64 count) const
-{
-   if (theEndian)
-   {
-      ossim_uint32 byteSize = getTypeByteSize(type);
-      switch(byteSize)
-      {
-         case 2:
-            theEndian->swapTwoBytes(v, count);
-            break;
-         case 4:
-            theEndian->swapFourBytes(v, count);
-            break;
-         case 8:
-            theEndian->swapEightBytes(v, count);
-            break;
-         default:
-            break;
-      }
-   }
-}
-
-template <class T> void ossimTiffInfo::getArrayValue(
-   T& v,
-   ossim_uint8* array,
-   ossim_uint64 position) const
-{
-   T* p = (T*)array;
-   v = p[position];
-}
-
-std::ostream& ossimTiffInfo::print(std::ostream& out,
-                                   const std::string& prefix,
-                                   ossim_uint64 tagIdx,
-                                   ossim_uint16 tag,
-                                   ossim_uint16 type,
-                                   ossim_uint64 count,
-                                   ossim_uint64 arraySizeInBytes,
-                                   ossim_uint8* valueArray) const
-{
-   switch(tag)
-   {
-      case OTIFFTAG_SUBFILETYPE: // tag 254
-      {
-         out << prefix << "sub_file_type: ";
-         printValue(out, type, valueArray);
-         break;
-      }
-      case OTIFFTAG_IMAGEWIDTH: // tag 256
-      {
-         out << prefix << IMAGE_WIDTH_KW << ": ";
-         printValue(out, type, valueArray);
-         break;
-      }
-      
-      case OTIFFTAG_IMAGELENGTH: // tag 257
-      {
-         out << prefix << IMAGE_LENGTH_KW << ": ";
-         printValue(out, type, valueArray);
-         break;
-      }
-
-      case OTIFFTAG_BITSPERSAMPLE: // tag 258
-      {
-         out << prefix << "bits_per_sample: ";
-         if (count == 1)
-         {
-            printValue(out, type, valueArray);
-         }
-         else if (valueArray)
-         {
-            printArray(out, type, count, valueArray);
-         }
-         break;
-      }
-         
-      case OTIFFTAG_COMPRESSION: // tag 259
-      {
-         if ( (count == 1) && (type == OTIFF_SHORT) )
-         {
-            out << prefix << "compression: ";
-            
-            ossim_uint16 s;
-            getArrayValue(s, valueArray, 0);
-            if (s == 1)
-            {
-               out << "false\n";
-            }
-            else
-            {
-               out << "true\n";
-            }
-         }
-         break;
-      }
-
-      case OTIFFTAG_PHOTOMETRIC: // tag 262
-      {
-         out << prefix << "photo_interpretation: ";
-
-         if ( (count == 1) && (type == OTIFF_SHORT) )
-         {
-            ossim_uint16 s;
-            getArrayValue(s, valueArray, 0);
-            if (s <= OPHOTO_CIELAB)
-            {
-               out << PHOTO_INTERP[s] << "\n";
-            }
-            else
-            {
-               out <<"range error!\n";
-            }
-         }
-         break;
-      }
-
-      case OTIFFTAG_FILLORDER: // tag 266
-      {
-         if ( (count == 1) && (type == OTIFF_SHORT) )
-         {
-            out << prefix << "fill_order: ";
-            ossim_uint16 s;
-            getArrayValue(s, valueArray, 0);
-            out << s << "\n";
-
-         }
-         break;
-      }
-
-      case OTIFFTAG_IMAGEDESCRIPTION: // tag 270
-      {
-         out << prefix << "image_description: ";
-         printArray(out, type, count, valueArray);
-         break;
-      }
-
-      case OTIFFTAG_STRIPOFFSETS: // tag 273
-      {
-         if (traceDump())
-         {
-            out << prefix << "bytes_per_strip: ";
-            
-            if (count == 1)
-            {
-               printValue(out, type, valueArray);
-            }
-            else
-            {
-               printArray(out, type, count, valueArray);
-            }
-         }
-         break;
-      }
-      case OTIFFTAG_ORIENTATION: // tag 274
-      {
-         ossim_uint16 code;
-         getArrayValue(code, valueArray, 0);
-         printOrientation(out, prefix, code);
-         break;
-      }
-      
-      case OTIFFTAG_SAMPLESPERPIXEL: // tag 277
-      {
-         out << prefix << "samples_per_pixel: ";
-         printValue(out, type, valueArray);
-         break;
-      }
-
-      case OTIFFTAG_ROWSPERSTRIP: // tag 278
-      {
-         out << prefix << "rows_per_strip: ";
-         printValue(out, type, valueArray);
-         break;
-      }
-
-      case OTIFFTAG_STRIPBYTECOUNTS: // tag 279
-      {
-         if (traceDump())
-         {
-            out << prefix << "bytes_per_strip: ";
-            
-            if (count == 1)
-            {
-               printValue(out, type, valueArray);
-            }
-            else
-            {
-               printArray(out, type, count, valueArray);
-            }
-         }
-         break;
-      }
-      
-      case OTIFFTAG_MINSAMPLEVALUE: // tag 280
-      {
-         out << prefix << "min_sample_value: ";
-         printValue(out, type, valueArray);
-         break;
-      }
-      case OTIFFTAG_MAXSAMPLEVALUE: // tag 281
-      {
-         out << prefix << "max_sample_value: ";
-         printValue(out, type, valueArray);
-         break;
-      }
-      
-      case OTIFFTAG_XRESOLUTION: // tag 282
-      {
-         out << prefix << "xresolution: ";
-         printValue(out, type, valueArray);
-         break;
-      }
-      case OTIFFTAG_YRESOLUTION: // tag 283
-      {
-         out << prefix << "yresolution: ";
-         printValue(out, type, valueArray);
-         break;
-      }
-      
-      case OTIFFTAG_PLANARCONFIG: // tag 284
-      {
-         if ( (count == 1) && (type == OTIFF_SHORT) )
-         {
-            out << prefix << "planar_configuration: ";
-            ossim_uint16 v;
-            getArrayValue(v, valueArray, 0);
-            if (v == 1)
-            {
-               out << "single image plane\n";
-            }
-            else if (v == 2)
-            {
-               out << "separate image planes\n";
-            }
-            else
-            {
-               out << "unknown planar value!\n";
-            }
-         }
-         break;
-      }
-
-      case OTIFFTAG_RESOLUTIONUNIT: // tag 296
-      {
-         out << prefix << "resolution_units: ";
-         ossim_uint16 v;
-         getArrayValue(v, valueArray, 0);
-         if (v == 2) 
-         {
-            out << "inch\n";
-         }
-         else if (v == 3)
-         {
-            out << "cm\n";
-         }
-         else
-         {
-            out << "none\n";
-         }
-         break;
-      }
-
-      case OTIFFTAG_PAGENUMBER: // tag 297
-      {
-         if ( (count == 2) && (type == OTIFF_SHORT) )
-         {
-            out << prefix << "page_number: ";
-            ossim_uint16 s;
-            getArrayValue(s, valueArray, 0);
-            out << s << "\n";
-            out << prefix << "total_pages: ";
-            getArrayValue(s, valueArray, 1);
-            out << s << "\n";
-         }
-         break;
-      }
-      
-      case OTIFFTAG_SOFTWARE: // tag 305
-      {
-         out << prefix << "software: ";
-         printArray(out, type, count, valueArray);
-         break;
-      }
-
-      case OTIFFTAG_DATETIME: // tag 306
-      {
-         out << prefix << "date_time: ";
-         printArray(out, type, count, valueArray);
-         break;
-      }
-
-      case OTIFFTAG_ARTIST: // tag 315
-      {
-         out << prefix << "artist: ";
-         printArray(out, type, count, valueArray);
-         break;
-      }
-      
-      case OTIFFTAG_TILEWIDTH: // tag 322
-      {
-         out << prefix << "tile_width: ";
-         printValue(out, type, valueArray);
-         break;
-      }
-      case OTIFFTAG_TILELENGTH: // tag 323
-      {
-         out << prefix << "tile_length: ";
-         printValue(out, type, valueArray);
-         break;
-      }
-      case OTIFFTAG_TILEOFFSETS: // tag 324
-      {
-         if (traceDump())
-         {
-            out << prefix << "tile_offsets: ";
-            if (count == 1)
-            {
-               printValue(out, type, valueArray);
-            }
-            else
-            {
-               printArray(out, type, count, valueArray);
-            }
-         }
-         break;
-      }
-      case OTIFFTAG_TILEBYTECOUNTS: // tag 325
-      {
-         if (traceDump())
-         {
-            out << prefix << "tile_byte_counts: ";
-            if (count == 1)
-            {
-               printValue(out, type, valueArray);
-            }
-            else
-            {
-               printArray(out, type, count, valueArray);
-            }
-         }
-         break;
-      }
-      case OTIFFTAG_SUBIFD: // tag 330
-      {
-         if ( (count == 1) && (type == OTIFF_IFD8) )
-         {
-            out << prefix << "subimage_descriptor: ";
-            ossim_uint64 v;
-            getArrayValue(v, valueArray, 0);
-            out << v << "\n";
-         }
-         else
-         {
-            out << prefix << "tag 330 unhandled condition.\n";
-         }
-         break;
-      }
-      case OTIFFTAG_EXTRASAMPLES: // tag 338
-      {
-         out << prefix << "extra_samples: ";
-         ossim_uint16 v;
-         getArrayValue(v, valueArray, 0);
-         switch (v)
-         {
-            case 1:
-            {
-               out << "associated_alpha_data\n";
-               break;
-            }
-            case 2:
-            {
-               out << "unassociated_alpha_data\n";
-               break;
-            }
-            default:
-            {
-               out << "unspecified_data\n";
-               break;
-            }
-         }
-         break;
-      }
-      case OTIFFTAG_SAMPLEFORMAT: // tag 339
-      {
-         out << prefix << "sample_format: ";
-         
-         if (count == 1)
-         {
-            printValue(out, type, valueArray);
-         }
-         else if (valueArray)
-         {
-            printArray(out, type, count, valueArray);
-         }
-         for (ossim_uint64 i = 0; i < count; ++i)
-         {
-            std::ostringstream s;
-            s << "sample_format_string";
-            if (count > 1)
-            {
-               s << i;
-            }
-            out << prefix << s.str() << ": ";
-            
-            ossim_uint16 v;
-            getArrayValue(v, valueArray, i);
-            switch (v)
-            {
-               case OSAMPLEFORMAT_UINT:
-                  out << "unsigned integer data\n";
-                  break;
-               case OSAMPLEFORMAT_INT:
-                  out << "signed integer data\n";
-                  break;
-               case OSAMPLEFORMAT_IEEEFP:
-                  out << "IEEE floating point data\n";
-                  break;
-               case OSAMPLEFORMAT_COMPLEXINT:
-                  out << "complex signed int\n";
-                  break;
-               case OSAMPLEFORMAT_COMPLEXIEEEFP:
-                  out << "complex ieee floating\n";
-                  break;
-               case OSAMPLEFORMAT_VOID:
-               default:
-                  out << "untyped data\n";
-                  break;
-            }
-         }
-         break;
-      }
-      case OTIFFTAG_SMINSAMPLEVALUE: // tag 340
-      {
-         out << prefix << "smin_sample_value: ";
-         printValue(out, type, valueArray);
-         break;
-      }
-      case OTIFFTAG_SMAXSAMPLEVALUE: // tag 341
-      {
-         out << prefix << "smax_sample_value: ";
-         printValue(out, type, valueArray);
-         break;
-      }
-      case OTIFFTAG_COPYRIGHT: // tag 33432
-      {
-         out << prefix << "copyright: ";
-         printArray(out, type, count, valueArray);
-         break;
-      }
-      case OMODEL_PIXEL_SCALE_TAG: // tag 33550
-      {
-         out << prefix << MODEL_PIXEL_SCALE_KW << ": ";
-         printArray(out, type, count, valueArray);
-         break;
-      }
-      case OMODEL_TIE_POINT_TAG: // tag 33992
-      {
-         out << prefix << MODEL_TIE_POINT_KW << ": ";
-         printArray(out, type, count, valueArray);
-         break;
-      }
-      case OMODEL_TRANSFORM_TAG: // tag 34264
-      {
-         out << prefix << MODEL_TRANSFORM_KW << ": ";
-         printArray(out, type, count, valueArray);
-         break;
-      }
-      case OTIFFTAG_PHOTOSHOP:  // tag 34377
-      {
-         out << prefix << "photoshop_image_resource_blocks: found\n";
-         break;
-      }
-      case OGEO_DOUBLE_PARAMS_TAG: // tag 34736
-      {
-         out << prefix << "double_params: ";
-         printArray(out, type, count, valueArray);
-         break;
-      }
-      case OGEO_ASCII_PARAMS_TAG: // tag 34737
-      {
-         out << prefix << "ascii_params: ";
-         printArray(out, type, count, valueArray);
-         break;
-      }
-      case OGDAL_METADATA_TAG: // tag  42112
-      {
-         printGdalMetadata(out, prefix, count, valueArray);
-         break;
-      }
-      case OGDAL_NODATA: // tag 42113
-      {
-         out << prefix << "gdal_nodata: ";
-         printArray(out, type, count, valueArray);
-         break;
-      }
-      default:
-      {
-         out << prefix << "unhandled_tag: " << tag << "\n";
-         if (traceDebug())
-         {
-             ossimNotify(ossimNotifyLevel_DEBUG)
-                << "generic:"
-                << "\ntag[" << tagIdx << "]:         " << tag
-                << "\ntype:                " << type
-                << "\ncount:        " << count
-                << "\narray size in bytes: " << arraySizeInBytes
-                << "\n";
-            printArray(out, type, count, valueArray);
-         }
-         break;
-      }
-
-   } // end of switch on tag...
-
-   return out;
-
-} // end of print
-
-std::ostream& ossimTiffInfo::printValue(std::ostream& out,
-                                        ossim_uint16 type,
-                                        ossim_uint8* valueArray) const
-{
-   switch (type)
-   {
-      case OTIFF_BYTE:
-      {
-         ossim_uint8 v;
-         getArrayValue(v, valueArray, 0);
-         out << (ossim_uint16)v << "\n";
-         break;
-      }
-      case OTIFF_SHORT:
-      {
-         ossim_uint16 v;
-         getArrayValue(v, valueArray, 0);
-         out << v << "\n";
-         break;
-      }
-      case OTIFF_SSHORT:
-      {
-         ossim_sint16 v;
-         getArrayValue(v, valueArray, 0);
-         out << v << "\n";
-         break;
-      }
-      case OTIFF_LONG:
-      {
-         ossim_uint32 v;
-         getArrayValue(v, valueArray, 0);
-         out << v << "\n";
-         break;
-      }
-      case OTIFF_RATIONAL: // two longs first=numerator, second=denominator
-      {
-         ossim_uint32 num;
-         ossim_uint32 den;
-         
-         getArrayValue(num, valueArray, 0);
-         getArrayValue(den, valueArray, 1);
-
-         if ( den )
-         {
-            out << (num/den) << "\n";
-         }
-         else
-         {
-            out << num << " / " << den << "\n";
-         }
-         
-         break;
-         
-      }
-      case OTIFF_SLONG:
-      {
-         ossim_sint32 v;
-         getArrayValue(v, valueArray, 0);
-         out << v << "\n";
-         break;
-      }
-      case OTIFF_FLOAT:
-      {
-         ossim_float32 v;
-         getArrayValue(v, valueArray, 0);
-         out << v << "\n";
-         break;
-      }
-      case OTIFF_DOUBLE:
-      {
-         ossim_float64 v;
-         getArrayValue(v, valueArray, 0);
-         out << v << "\n";
-         break;
-      }
-      default:
-      {
-         out << "print_value_unhandled type: " << type << "\n";
-         break;
-      }
-   }
-   return out;
-}
-
-std::ostream& ossimTiffInfo::printArray(std::ostream& out,
-                                        ossim_uint16 type,
-                                        ossim_uint64 arraySizeInBytes,
-                                        ossim_uint8* valueArray) const
-{
-   if (valueArray)
-   {
-      switch (type)
-      {
-         case OTIFF_BYTE:
-         {
-            for (ossim_uint64 i = 0; i < arraySizeInBytes; ++i)
-            {
-               out << ((ossim_uint8)valueArray[i]);
-            }
-            out << "\n";
-            break;
-         }
-         case OTIFF_ASCII:
-         {
-            for (ossim_uint64 i = 0; i < arraySizeInBytes; ++i)
-            {
-               //---
-               // Test to avoid putting nulls in the ascii string out.  Added to fix
-               // ossimKeywordlist::parseStream returning false on trailing null Where array was
-               // tagged as 11 bytes and ascii string was OrthoVista(10 bytes) and 11 byte was
-               // ascii NUL '\0'.
-               //---
-               if ( valueArray[i] != 0 )
-               {
-                  out << ((char)valueArray[i]);
-               }
-            }
-            out << "\n";
-            break;
-         }
-         case OTIFF_SHORT:
-         {
-            ossim_uint16* p = (ossim_uint16*)valueArray;
-            for (ossim_uint64 i = 0; i < arraySizeInBytes; ++i)
-            {
-               out << p[i] << " ";
-            }
-            out << "\n";
-            break;
-         }
-         case OTIFF_LONG:
-         {
-            ossim_uint32* p = (ossim_uint32*)valueArray;
-            for (ossim_uint64 i = 0; i < arraySizeInBytes; ++i)
-            {
-               out << p[i] << " ";
-            }
-            out << "\n";
-            break;
-         }
-         case OTIFF_DOUBLE:
-         {
-            ossim_float64* p = (ossim_float64*)valueArray;
-            for (ossim_uint64 i = 0; i < arraySizeInBytes; ++i)
-            {
-               out << p[i] << " ";
-            }
-            out << "\n";
-            break;
-         }
-         default:
-         {
-            out << "print_array_unhandled type: " << type << "\n";
-            break;
-         }
-      }
-   }
-   else
-   {
-      out << "null array passed to ossimTiffInfo::printArray method." << "\n";
-   }
-   return out;
-}
-
-std::ostream& ossimTiffInfo::printGdalMetadata(std::ostream& out,
-                                               const std::string& prefix,
-                                               ossim_uint64 count,
-                                               ossim_uint8* valueArray) const
-{
-   ossimString xmlString(valueArray, valueArray+count);
-   ossimRefPtr<ossimXmlNode> xmlNode = new ossimXmlNode();
-   std::istringstream in(xmlString);
-   if(xmlNode->read(in))
-   {
-      const ossimXmlNode::ChildListType& children = xmlNode->getChildNodes();
-      
-      ossim_uint32 idx = 0;
-      for(idx = 0; idx < children.size(); ++idx)
-      {
-         out << prefix << "gdalmetadata."
-             << ossimString(children[idx]->getAttributeValue("name")).downcase()
-             << ":" << children[idx]->getText() << std::endl;
-      }
-   }
-   return out;
-}
-
-std::ostream& ossimTiffInfo::printGeoKeys(
-   std::ostream& out,
-   const std::string&  prefix,
-   ossim_uint64   geoKeyLength,
-   ossim_uint16*  geoKeyBlock,
-   ossim_uint64   geoDoubleLength,
-   ossim_float64* geoDoubleBlock,
-   ossim_uint64   geoAsciiLength,
-   ossim_int8*    geoAsciiBlock) const
-{
-   if (geoKeyLength && geoKeyBlock)
-   {
-      //---
-      // Length passed in is the total number of shorts in the geo key
-      // directory.  Each key has four short values; hence, "length/4".
-      //---
-      ossim_int32 index = 0;
-      ossim_int32 tagCount = static_cast<ossim_int32>(geoKeyLength/4);
-      for (ossim_int32 i = 0; i < tagCount; ++i)
-      {
-         //---
-         // Each key contains four unsigned shorts:
-         // GeoKey ID
-         // TIFF Tag ID or 0
-         // GeoKey value count
-         // value or tag offset
-         //---
-         ossim_uint16 key   = geoKeyBlock[index++];
-         ossim_uint16 tag   = geoKeyBlock[index++];
-         ossim_uint16 count = geoKeyBlock[index++];
-         ossim_uint16 code  = geoKeyBlock[index++];
-
-         if (traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "DEBUG  ossimTiffInfo::printGeoKeys"
-               << "\nKey index:  " << i
-               << "\ngeo key:  " << key
-               << "\ntag:      " << tag
-               << "\ncount:    " << count
-               << "\ncode:     " << code
-               << "\n";
-         }
-
-         switch (key)
-         {
-            case OGT_MODEL_TYPE_GEO_KEY:  // key 1024 Section 6.3.1.1 Codes
-            {
-               printModelType(out, prefix, code);
-               break;
-            }               
-            case OGT_RASTER_TYPE_GEO_KEY:  // key 1025 Section 6.3.1.2 Code
-            {
-               printRasterType(out, prefix, code);
-               break;
-            }
-
-            case OGT_CITATION_GEO_KEY: // key 1026
-            {
-               if (tag == 34737) // using ascii array
-               {
-                  if (geoAsciiBlock && ( (code+count) <= geoAsciiLength ) )
-                  {
-                     std::string s;
-                     int i = 0;
-                     while (i < count)
-                     {
-                        s.push_back(geoAsciiBlock[code+i]);
-                        ++i;
-                     }
-                     out << prefix << "citation: " << s << "\n";
-                  }
-               }
-               break;
-            }
-
-            case OGEOGRAPHIC_TYPE_GEO_KEY:  // key 2048  Section 6.3.2.1 Codes
-            {
-               out << prefix << ossimKeywordNames::GCS_CODE_KW << ": "
-                   << code << "\n";
-               break;
-            }
-
-            case OGEOG_CITATION_GEO_KEY: // key 2049
-            {
-               if (tag == 34737) // using ascii array
-               {
-                  if (geoAsciiBlock && ( (code+count) <= geoAsciiLength ) )
-                  {
-                     std::string s;
-                     int i = 0;
-                     while (i < count)
-                     {
-                        s.push_back(geoAsciiBlock[code+i]);
-                        ++i;
-                     }
-                     out << prefix << "geographic_citation: " << s << "\n";
-                  }
-               }
-               break;
-            }
-
-            case OGEOG_GEODETIC_DATUM_GEO_KEY:// key 2050 Section 6.3.2.2 Codes
-            {
-               out << prefix << GEODETIC_DATUM_KW << ": " << code << "\n";
-               break;
-            }
-
-            case OGEOG_PRIME_MERIDIAN_GEOKEY:// key 2051 Section 6.3.2.4 Codes
-            {
-               out << prefix << "prime_meridian_code: " << code << "\n";
-               break;
-            }
-            
-            case OGEOG_LINEAR_UNITS_GEO_KEY:// key 2052  Section 6.3.1.3 Codes
-            {
-               out << prefix << "linear_units_code: " << code << "\n";
-               printLinearUnits(out, prefix, LINEAR_UNITS_KW, code);
-               break;
-            }
-            
-            case OGEOG_ANGULAR_UNITS_GEO_KEY:// key 2054  Section 6.3.1.4 Codes
-            {
-               out << prefix << "angular_units_code: " << code << "\n";
-               printAngularUnits(out, prefix, code);
-               break;
-            }
-
-            case OGEOG_ANGULAR_UNIT_SIZE_GEO_KEY:// key 2055 Size in radians Section 6.2.2
-            {
-               if (tag == 34736) // using double array
-               {
-                  // Code is index into array.
-                  if ( geoDoubleBlock && (code < geoDoubleLength) )
-                  {
-                     // Always count of one.
-                     out << prefix << "angular_units_size_radians: "
-                         << geoDoubleBlock[code] << "\n";
-                  }
-               }
-               break;
-            }
-            
-            case OGEOG_ELLIPSOID_GEO_KEY:// key 2056  Section 6.3.23 Codes
-            {
-               out << prefix << "ellipsoid_code: " << code << "\n";
-               break;
-            }
-            
-            case OGEOG_SEMI_MAJOR_AXIS: // key 2057
-            {
-               if (tag == 34736) // using double array
-               {
-                  // Code is index into array.
-                  if ( geoDoubleBlock && (code < geoDoubleLength) )
-                  {
-                     // Always count of one.
-                     out << prefix << "semi_major_axis: " << geoDoubleBlock[code] << "\n";
-                  }
-               }
-               break;
-            }
-            
-            case OGEOG_SEMI_MINOR_AXIS: // key 2058
-            {
-               if (tag == 34736) // using double array
-               {
-                  // Code is index into array.
-                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
-                  {
-                     // Always count of one.
-                     out << prefix << "semi_minor_axis: "  << geoDoubleBlock[code] << "\n";
-                  }
-               }
-               break;
-            }
-
-            case OGEOG_INV_FLATTENING_GEO_KEY: // key 2059 ratio Section 6.2.2
-            {
-               if (tag == 34736) // using double array
-               {  
-                  // Code is index into array.
-                  if ( geoDoubleBlock && (code < geoDoubleLength) )
-                  {
-                     // Always count of one.
-                     out << prefix << "inverse_flattening_ratio: " << geoDoubleBlock[code] << "\n";
-                  }
-               }
-               break;
-            }
-
-            case OGEOG_PRIME_MERIDIAN_LONG_GEO_KEY: // key 2061 GeogAngularUnit Section 6.2.2
-            {
-               if (tag == 34736) // using double array
-               {
-                  // Code is index into array.
-                  if ( geoDoubleBlock && (code < geoDoubleLength) )
-                  {
-                     // Always count of one.
-                     out << prefix << "prime_meridian_longitude: " << geoDoubleBlock[code] << "\n";
-                  }
-               }
-               break;
-            }
-
-            case OPROJECTED_CS_TYPE_GEO_KEY: // key 3072 Section 6.3.3.1 codes
-            {
-               out << prefix << "pcs_code: " << code << "\n";
-               break;
-            }
-
-            case OPCS_CITATION_GEO_KEY: // key 3073 ascii
-            {
-               if (tag == 34737) // using ascii array
-               {
-                  if (geoAsciiBlock && ( (code+count) <= geoAsciiLength ) )
-                  {
-                     std::string s;
-                     int i = 0;
-                     while (i < count)
-                     {
-                        s.push_back(geoAsciiBlock[code+i]);
-                        ++i;
-                     }
-                     out << prefix << "pcs_citation: " << s << "\n";
-                  }
-               }
-               
-               break;
-            }
-      
-            case OPROJECTION_GEO_KEY: // key 3074 Section 6.3.3.2 codes
-            {
-               out << prefix << "proj_code: " << code << "\n";
-               break;
-            }
-            
-            case OPROJ_COORD_TRANS_GEO_KEY:  // key 3075 Section 6.3.3.3 codes
-            {
-               out << prefix << COORD_TRANS_CODE_KW << ": " << code << "\n";
-               printCoordTrans(out, prefix, code);
-               break;
-            }
-         
-            case OPROJ_LINEAR_UNITS_GEO_KEY:  // key 3076 Section 6.3.1.3 codes
-            {
-               out << prefix << "linear_units_code: " << code << "\n";
-               printLinearUnits(out, prefix, std::string("linear_units"), code);
-               break;
-            }
-
-            case OPROJ_LINEAR_UNIT_SIZE_GEO_KEY:  // key 3077 meters Section 6.2.3
-            {
-               if (tag == 34736) // using double array
-               {
-                  // Code is index into array.
-                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
-                  {
-                     // Always count of one.
-                     out << prefix << "linear_units_size: " << geoDoubleBlock[code] << "\n";
-                  }
-               }
-               break;
-            }
-
-            case OPROJ_STD_PARALLEL1_GEO_KEY:  // key 3078
-            {
-               if (tag == 34736) // using double array
-               {
-                  // Code is index into array.
-                  if ( geoDoubleBlock && (code < geoDoubleLength) )
-                  {
-                     // Always count of one.
-                     out << prefix
-                         << ossimKeywordNames::STD_PARALLEL_1_KW << ": "
-                         << geoDoubleBlock[code] << "\n";
-                  }
-               }
-               break;
-            }
-         
-            case OPROJ_STD_PARALLEL2_GEO_KEY:  // key 3079
-            {
-               if (tag == 34736) // using double array
-               {
-                  // Code is index into array.
-                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
-                  {
-                     // Always count of one.
-                     out << prefix
-                         << ossimKeywordNames::STD_PARALLEL_2_KW << ": "
-                         << geoDoubleBlock[code] << "\n";
-                  }
-               }
-               break;
-            }
-         
-            case OPROJ_NAT_ORIGIN_LONG_GEO_KEY:  // key 3080
-            {
-               if (tag == 34736) // using double array
-               {
-                  // Code is index into array.
-                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
-                  {
-                     // Always count of one.
-                     out << prefix << ORIGIN_LONGITUDE_KW << ": "
-                         << geoDoubleBlock[code] << "\n";
-                  }
-               }
-               break;
-            }
-               
-            case OPROJ_NAT_ORIGIN_LAT_GEO_KEY:  // key 3081
-            {
-               if (tag == 34736) // using double array
-               {
-                  // Code is index into array.
-                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
-                  {
-                     // Always count of one.
-                     out << prefix << ORIGIN_LATITUDE_KW << ": "
-                         << geoDoubleBlock[code] << "\n";
-                  }
-               }
-               break;
-            }
-
-            case OPROJ_FALSE_EASTING_GEO_KEY:  // key 3082
-            {
-               if (tag == 34736) // using double array
-               {
-                  // Code is index into array.
-                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
-                  {
-                     // Always count of one.
-                     out << prefix
-                         << ossimKeywordNames::FALSE_EASTING_KW<< ": "
-                         << geoDoubleBlock[code] << "\n";
-                  }
-               }
-               break;
-            }
-
-            case OPROJ_FALSE_NORTHING_GEO_KEY:  // key 3083
-            {
-               if (tag == 34736) // using double array
-               {
-                  // Code is index into array.
-                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
-                  {
-                     // Always count of one.
-                     out << prefix
-                         << ossimKeywordNames::FALSE_NORTHING_KW
-                         << ": "
-                         << geoDoubleBlock[code] << "\n";
-                  }
-               }
-               break;
-            }
-            
-            case OPROJ_FALSE_ORIGIN_LONG_GEO_KEY:  // key 3084
-            {
-               if (tag == 34736) // using double array
-               {
-                  // Code is index into array.
-                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
-                  {
-                     // Always count of one.
-                     out << prefix
-                         << FALSE_ORIGIN_LONGITUDE_KW << ": "
-                         << geoDoubleBlock[code] << "\n";
-                  }
-               }
-               break;
-            }
-            
-            case OPROJ_FALSE_ORIGIN_LAT_GEO_KEY:  // key 3085
-            {
-               if (tag == 34736) // using double array
-               {
-                  // Code is index into array.
-                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
-                  {
-                     // Always count of one.
-                     out << prefix
-                         << FALSE_ORIGIN_LATITUDE_KW << ": "
-                         << geoDoubleBlock[code] << "\n";
-                  }
-               }
-               break;
-            }
-            
-            case OPROJ_FALSE_ORIGIN_EASTING_GEO_KEY:  // key 3086
-            {
-               if (tag == 34736) // using double array
-               {
-                  // Code is index into array.
-                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
-                  {
-                     // Always count of one.
-                     out << prefix
-                         <<  FALSE_ORIGIN_EASTING_KW<< ": "
-                         << geoDoubleBlock[code] << "\n";
-                  }
-               }
-               break;
-            }
-            
-            case OPROJ_FALSE_ORIGIN_NORTHING_GEO_KEY:  // key 3087
-            {
-               if (tag == 34736) // using double array
-               {
-                  // Code is index into array.
-                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
-                  {
-                     // Always count of one.
-                     out << prefix
-                         <<  FALSE_ORIGIN_NORTHING_KW<< ": "
-                         << geoDoubleBlock[code] << "\n";
-                  }
-               }
-               break;
-            }
-           
-            case OPROJ_CENTER_LONG_GEO_KEY:  // key 3088
-            {
-               if (tag == 34736) // using double array
-               {
-                  // Code is index into array.
-                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
-                  {
-                     // Always count of one.
-                     out << prefix << "center_longitude: "
-                         << geoDoubleBlock[code] << "\n";
-                  }
-               }
-               break;
-            }
-
-            case OPROJ_CENTER_LAT_GEO_KEY:  // key 3089
-            {
-               if (tag == 34736) // using double array
-               {
-                  // Code is index into array.
-                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
-                  {
-                     // Always count of one.
-                     out << prefix << "center_latitude: "
-                         << geoDoubleBlock[code] << "\n";
-                  }
-               }
-               break;
-            }
-
-            case OPROJ_SCALE_AT_NAT_ORIGIN_GEO_KEY:  // key 3092
-            {
-               if (tag == 34736) // using double array
-               {
-                  // Code is index into array.
-                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
-                  {
-                     // Always count of one.
-                     out << prefix << ossimKeywordNames::SCALE_FACTOR_KW
-                         << ": "
-                         << geoDoubleBlock[code] << "\n";
-                  }
-               }
-               break;
-            }
-            case OPROJ_SCALE_AT_CENTER_GEO_KEY:  // key 3093
-            {
-               if (tag == 34736) // using double array
-               {
-                  // Code is index into array.
-                  if ( geoDoubleBlock && ( code < geoDoubleLength) )
-                  {
-                     // Always count of one.
-                     out << prefix << ossimKeywordNames::SCALE_FACTOR_KW
-                         << ": "
-                         << geoDoubleBlock[code] << "\n";
-                  }
-               }
-               break;
-            }
-
-            case OVERTICAL_CITATION_GEO_KEY: // key 4097
-            {               
-               if (tag == 34737) // using ascii array
-               {
-                  if (geoAsciiBlock && ( (code+count) <= geoAsciiLength ) )
-                  {
-                     std::string s;
-                     int i = 0;
-                     while (i < count)
-                     {
-                        s.push_back(geoAsciiBlock[code+i]);
-                        ++i;
-                     }
-                     out << prefix << "vertical_citation: " << s << "\n";
-                  }
-               }
-               break;
-            }
-
-            case OVERTICAL_UNITS_GEO_KEY: // key 4099  Section 6.3.1.3 Codes
-            {
-               out << prefix << "vertical_units_code: " << code << "\n";
-               printLinearUnits(out, prefix, VERTICAL_UNITS_KW, code);
-               break;
-            }
- 
-            default:
-            {
-               if (key > 1)
-               {
-                  if (tag == 34737) // using ascii array
-                  {
-                     if (geoAsciiBlock && ( (code+count) <= geoAsciiLength ) )
-                     {
-                        std::string s;
-                        int i = 0;
-                        while (i < count)
-                        {
-                           s.push_back(geoAsciiBlock[code+i]);
-                           ++i;
-                        }
-                        out << prefix << "key_" << key << ": " << s << "\n";
-                     }
-                  }
-                  else
-                  {
-                     out << prefix << "unhandle_key: " << key << "\n";
-                  }
-               }
-               break;
-            }
-            
-         } // matches: switch(key)
-
-      } //  for (ossim_int32 i = 0; i < tagCount; ++i)
-      
-      if (traceDebug())
-      {
-         if (geoAsciiBlock && geoAsciiLength)
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "ossimTiffInfo::printGeoKeys DEBUG: geo ascii block: ";
-            std::string s(geoAsciiBlock, static_cast<std::string::size_type>(geoAsciiLength));
-            ossimNotify(ossimNotifyLevel_DEBUG)<< s << "\n";
-         }
-      } 
-      
-   } // if (geoKeyLength && geoKeyBlock)
-   
-   return out;
-}
-
-
-std::ostream& ossimTiffInfo::printModelType(std::ostream& out,
-                                            const std::string& prefix,
-                                            ossim_uint16 code) const
-{
-   // key 1024 Section 6.3.1.1 Codes
-   out << prefix << MODEL_TYPE_KW << ": ";
-   if (code == 1)
-   {
-      out << "projected\n";
-   }
-   else if (code == 2)
-   {
-      out << "geographic\n";
-   }
-   else if (code == 2)
-   {
-      out << "geocentric\n";
-   }
-   else
-   {
-      out << "unknown\n";
-   }
-   return out;
-}
-
-std::ostream& ossimTiffInfo::printRasterType(std::ostream& out,
-                                             const std::string& prefix,
-                                             ossim_uint16 code) const
-{
-   // key 1025 Section 6.3.1.2 Codes
-   out << prefix << RASTER_TYPE_KW << ": ";
-   if (code == 1)
-   {
-      out << "pixel_is_area\n";
-   }
-   else if (code == 2)
-   {
-      out << "pixel_is_point\n";
-   }
-   else
-   {
-      out << "unknown\n";
-   }
-   return out;
-}
-
-std::ostream& ossimTiffInfo::printAngularUnits(std::ostream& out,
-                                               const std::string& prefix,
-                                               ossim_uint16 code) const
-{
-   // key 2054 Section 6.3.1.4 Codes
-   out << prefix << ANGULAR_UNITS_KW << ": ";
-   switch (code)
-   {
-      case 9101:
-      {
-         out << "radians\n";
-         break;
-      }
-      case 9102:
-      {
-         out << "degrees\n";
-         break;
-      }
-      case 9103:
-      {
-         out << "arc_minutes\n";
-         break;
-      }
-      case 9104:
-      {
-         out << "arc_seconds\n";
-         break;
-      }
-      case 9105:
-      {
-         out << "grad\n";
-         break;
-      }
-      case 9106:
-      {
-         out << "gon\n";
-         break;
-      }
-      case 9107:
-      {
-         out << "dms\n";
-         break;
-      }
-      case 9108:
-      {
-         out << "dms_hemisphere\n";
-         break;
-      }
-      default:
-      {
-         out << "unknown\n";
-         break;
-      }
-   }
-   return out;
-}
-
-std::ostream& ossimTiffInfo::printCoordTrans(std::ostream& out,
-                                             const std::string& prefix,
-                                             ossim_uint16 code) const
-{
-   // key 3075 Section 6.3.3.3 Codes
-   out << prefix << "coord_trans: ";
-   switch (code)
-   {
-      case 1:
-      {
-         out << "TransverseMercator\n";
-         break;
-      }
-      case 2:
-      {
-         out << "TransvMercator_Modified_Alaska\n";
-         break;
-      }
-      case 3:
-      {
-         out << "ObliqueMercator\n";
-         break;
-      }
-      case 4:
-      {
-         out << "ObliqueMercator_Laborde\n";
-         break;
-      }
-      case 5:
-      {
-         out << "ObliqueMercator_Rosenmund\n";
-         break;
-      }
-      case 6:
-      {
-         out << "ObliqueMercator_Spherical\n";
-         break;
-      }
-      case 7:
-      {
-         out << "Mercator\n";
-         break;
-      }
-      case 8:
-      {
-         out << "LambertConfConic_2SP\n";
-         break;
-      }
-      case 9:
-      {
-         out << "LambertConfConic_Helmert\n";
-         break;
-      }
-      case 10:
-      {
-         out << "LambertAzimEqualArea\n";
-         break;
-      }
-      case 11:
-      {
-         out << "AlbersEqualArea\n";
-         break;
-      }
-      case 12:
-      {
-         out << "AzimuthalEquidistant\n";
-         break;
-      }
-      case 13:
-      {
-         out << "EquidistantConic\n";
-         break;
-      }
-      case 14:
-      {
-         out << "Stereographic\n";
-         break;
-      }
-      case 15:
-      {
-         out << "PolarStereographic\n";
-         break;
-      }
-      case 16:
-      {
-         out << "ObliqueStereographic\n";
-         break;
-      }
-      case 17:
-      {
-         out << "Equirectangular\n";
-         break;
-      }
-      case 18:
-      {
-         out << "CassiniSoldner\n";
-         break;
-      }
-      case 19:
-      {
-         out << "Gnomonic\n";
-         break;
-      }
-      case 20:
-      {
-         out << "MillerCylindrical\n";
-         break;
-      }
-      case 21:
-      {
-         out << "Orthographic\n";
-         break;
-      }
-      case 22:
-      {
-         out << "Polyconic\n";
-         break;
-      }
-      case 23:
-      {
-         out << "Robinson\n";
-         break;
-      }
-      case 24:
-      {
-         out << "Sinusoidal\n";
-         break;
-      }
-      case 25:
-      {
-         out << "VanDerGrinten\n";
-         break;
-      }
-      case 26:
-      {
-         out << "NewZealandMapGrid\n";
-         break;
-      }
-      case 27:
-      {
-         out << "TransvMercator_SouthOriented\n";
-         break;
-      }
-      default:
-      {
-         out << code << " unknown\n";
-         break;
-      }
-   }
-   return out;
-}
-
-std::ostream& ossimTiffInfo::printLinearUnits(std::ostream& out,
-                                              const std::string& prefix,
-                                              const std::string& key,
-                                              ossim_uint16 code) const
-{
-   // key 3076 Section 6.3.1.3 Codes
-   out << prefix << key << ": ";
-   switch (code)
-   {
-      case 9001:
-      {
-         out << "meters\n";
-         break;
-      }
-      case 9002:
-      {
-         out << "feet\n";
-         break;
-      }
-      case 9003:
-      {
-         out << "us_survey_feet\n";
-         break;
-      }
-      case 9004:
-      {
-         out << "foot_modified_american\n";
-         break;
-      }
-      case 9005:
-      {
-         out << "foot_clarke\n";
-         break;
-      }
-      case 9006:
-      {
-         out << "foot_indian\n";
-         break;
-      }
-      case 9007:
-      {
-         out << "link\n";
-         break;
-      }
-      case 9008:
-      {
-         out << "link_benoit\n";
-         break;
-      }
-      case 9009:
-      {
-         out << "link_sears\n";
-         break;
-      }
-      case 9010:
-      {
-         out << "chain_benoit\n";
-         break;
-      }
-      case 9011:
-      {
-         out << "chain_sears\n";
-         break;
-      }
-      case 9012:
-      {
-         out << "yard_sears\n";
-         break;
-      }
-      case 9013:
-      {
-         out << "yard_indian\n";
-         break;
-      }
-      case 9014:
-      {
-         out << "fathom\n";
-         break;
-      }
-      case 9015:
-      {
-         out << "mile_international_nautical\n";
-         break;
-      }
-      default:
-      {
-         out << code << " unknown\n";
-         break;
-      }
-   }
-   return out;
-}
-
-std::ostream& ossimTiffInfo::printOrientation(std::ostream& out,
-                                              const std::string& prefix,
-                                              ossim_uint16 code) const
-{
-   // Tag 274:
-   out << prefix << "orientation: ";
-   switch (code)
-   {
-      case 1:
-      {
-         out << "top_left\n";
-         break;
-      }
-      case 2:
-      {
-         out << "top_right\n";
-         break;
-      }
-      case 3:
-      {
-         out << "bottom_right\n";
-         break;
-      }
-      case 4:
-      {
-         out << "bottom_left\n";
-         break;
-      }
-      case 5:
-      {
-         out << "left_top\n";
-         break;
-      }
-      case 6:
-      {
-         out << "right_top\n";
-         break;
-      }
-      case 7:
-      {
-         out << "right_bottom\n";
-         break;
-      }
-      case 8:
-      {
-         out << "left_bottom\n";
-         break;
-      }
-      default:
-      {
-         out << code << " unknown\n";
-         break;
-      }
-   }
-   return out;
-}
-
-void ossimTiffInfo::getDirPrefix(ossim_int32 index,
-                                 std::string& prefix) const
-{
-   prefix += "image";
-   std::ostringstream s;
-   s << index;
-   prefix += s.str();
-   prefix += ".";
-}
-
-bool ossimTiffInfo::getPixelScale(const ossimString& gtiffPrefix,
-                                  const ossimKeywordlist& gtiffKwl,
-                                  ossimDpt& scale) const
-{
-   bool result = false;
-
-   std::vector<ossim_float64> floats;
-   if ( getFloats(gtiffPrefix, MODEL_PIXEL_SCALE_KW, gtiffKwl, floats) )
-   {
-      if ( floats.size() == 3 )
-      {
-         scale.x = floats[0];
-         scale.y = floats[1];
-         result = true;
-      }
-   }
-
-   return result;
-}
-
-bool ossimTiffInfo::getTiePoint(const ossimString& gtiffPrefix,
-                                const ossimKeywordlist& gtiffKwl,
-                                std::vector<ossim_float64>& ties) const
-{
-   return getFloats(gtiffPrefix, MODEL_TIE_POINT_KW, gtiffKwl, ties);
-}
-
-bool ossimTiffInfo::getModelTransform(const ossimString& gtiffPrefix,
-                                      const ossimKeywordlist& gtiffKwl,
-                                      std::vector<ossim_float64>& xfrm) const
-{
-   return getFloats(gtiffPrefix, MODEL_TRANSFORM_KW, gtiffKwl, xfrm);
-}
-
-bool ossimTiffInfo::getFloats(const ossimString& gtiffPrefix,
-                              const ossimString& key,
-                              const ossimKeywordlist& gtiffKwl,
-                              std::vector<ossim_float64>& floats) const
-{
-   bool result = false;
-   
-   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), key.c_str());
-   if ( lookup )
-   {
-      ossimString line = lookup;
-      result  = getFloats(line, floats);
-   }
-
-   return result; 
-}
-
-bool ossimTiffInfo::getFloats(const ossimString& line,
-                              std::vector<ossim_float64>& floats) const
-{
-   bool result = false;
-   
-   floats.clear();
-   
-   if (line.size())
-   {
-      ossim_float64 f;
-      std::istringstream is(line);
-
-      is >> f; // Get the first double.
-      while ( ! is.fail() )
-      {
-         floats.push_back(f);
-         is >> f;
-      }
-   }
-
-   if ( floats.size() )
-   {
-      result = true;
-   }
-
-   return result;
-}
-
-bool ossimTiffInfo::getDatumCode(const ossimString& gtiffPrefix,
-                                 const ossimKeywordlist& gtiffKwl,
-                                 ossimString& datumCode) const
-{
-   bool result = false;
-   
-   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), GEODETIC_DATUM_KW.c_str());
-
-   // There is some ambiguity in the definition of EPSG GCS code. Here both the datum code (6000-
-   // series) and projection code (4000-series) are tested to get to the datum's native ascii code:
-
-   // Look for GEODETIC_DATUM_KW code first:
-   if (lookup)
-   {
-      ossim_int32 code = ossimString(lookup).toInt32();
-      result = getDatumCode( code, datumCode );
-   }
-
-   if ( !result )
-   {
-      // Try GCS_CODE_KW:
-      lookup = gtiffKwl.find(gtiffPrefix.c_str(), ossimKeywordNames::GCS_CODE_KW);
-      if ( lookup )
-      {
-         ossim_int32 code = ossimString(lookup).toInt32();
-         result = getDatumCode( code, datumCode );
-      }
-   }
-   return result;
-}
-
-bool ossimTiffInfo::getDatumCode(ossim_int32 code, ossimString& datumCode) const
-{
-   bool result = false;
-   datumCode.clear();
-   switch(code)
-   {
-      case 4267:
-      case 6267:   
-      {
-         datumCode = "NAS-C";
-         break;
-      }
-      case 4269:
-      case 6269:
-      {
-         datumCode = "NAR-C";
-         break;
-      }
-      case 4322:
-      case 6322:
-      {
-         datumCode = "WGD";
-         break;
-      }
-      case 4326:
-      case 6326:
-      {
-         datumCode = "WGE";
-         break;
-      }
-      
-   } // matches: switch(code)
-
-   if ( datumCode.size() )
-   {
-      result = true;
-   }
-   return result;
-}
-
-bool ossimTiffInfo::getPcsCode(const ossimString& gtiffPrefix,
-                               const ossimKeywordlist& gtiffKwl,
-                               ossimString& pcsCode) const
-{
-   bool result = false;
-
-   // Check for key "pcs_code":
-   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), ossimKeywordNames::PCS_CODE_KW);
-   if (lookup)
-   {
-      pcsCode = lookup;
-      
-      ossim_uint32 code = pcsCode.toUInt32();
-      if ( code != 32767 )
-      {
-         // See if we handle this code in our projection factories.
-         ossimRefPtr<ossimProjection>  proj = 
-            ossimEpsgProjectionFactory::instance()->createProjection(pcsCode);
-         if (proj.valid())
-         {
-            proj = 0;
-            result = true;
-         }
-      }
-      
-   }
-
-   if (result == false)
-   {
-      // Check for key "pcs_citation":
-      lookup = gtiffKwl.find(gtiffPrefix.c_str(), "pcs_citation");
-      if ( lookup )
-      {
-         ossimString spec = lookup;
-
-         // Strip commonly found or bar '|' from end if present.
-         spec.trim(ossimString("|"));
-
-         // See if we handle this code in our projection factories.
-         ossimRefPtr<ossimProjection>  proj =
-            ossimEpsgProjectionFactory::instance()->createProjection(spec);
-         if (proj.valid())
-         {
-            ossimMapProjection* mapProj = dynamic_cast<ossimMapProjection*>(proj.get());
-            if ( mapProj )
-            {
-               ossim_uint32 intCode = mapProj->getPcsCode();
-               if ( intCode != 32767 )
-               {
-                  proj = 0;
-                  pcsCode = ossimString::toString(intCode);
-                  result = true;
-               }
-            }
-         }
-      }
-   }
-
-   return result;
-}
-
-bool ossimTiffInfo::getUnits(const ossimString& gtiffPrefix,
-                             const ossimKeywordlist& gtiffKwl,
-                             ossimString& units) const
-{
-   bool result = true;
-   
-   ossimString linearUnits = "";
-   getLinearUnits(gtiffPrefix, gtiffKwl, linearUnits);
-   
-   ossimString angularUnits = "";
-   getAngularUnits(gtiffPrefix, gtiffKwl, angularUnits);
-
-   ossimString modelType;
-   getModelType(gtiffPrefix, gtiffKwl, modelType);
-   
-   if (modelType == "geographic")
-   {
-      if (angularUnits.size())
-      {
-         units = angularUnits;
-      }
-      else
-      {
-         units = "degrees";
-      }
-   }
-   else if (modelType == "projected")
-   {
-      if (linearUnits.size())
-      {
-         units = linearUnits;
-      }
-      else
-      {
-         units = "meters";
-      }
-   }
-   else
-   {
-      units = "meters";
-   }
-
-   return result;
-}
-
-
-bool ossimTiffInfo::getLinearUnits(const ossimString& gtiffPrefix,
-                                   const ossimKeywordlist& gtiffKwl,
-                                   ossimString& linearUnits) const
-{
-   bool result = false;
-   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), LINEAR_UNITS_KW.c_str());
-   if (lookup)
-   {
-      linearUnits = lookup;
-      result = true;
-   }
-   return result;
-}
-
-bool ossimTiffInfo::getVerticalUnits(const ossimString& gtiffPrefix,
-                                     const ossimKeywordlist& gtiffKwl,
-                                     ossimString& verticalUnits) const
-{
-   bool result = false;
-   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), VERTICAL_UNITS_KW.c_str());
-   if (lookup)
-   {
-      verticalUnits = lookup;
-      result = true;
-   }
-   return result;
-}
-
-bool ossimTiffInfo::getAngularUnits(const ossimString& gtiffPrefix,
-                                    const ossimKeywordlist& gtiffKwl,
-                                    ossimString& angularUnits) const
-{
-   bool result = false;
-   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), ANGULAR_UNITS_KW.c_str());
-   if (lookup)
-   {
-      angularUnits = lookup;
-      result = true;
-   }
-   return result;
-}
-
-bool ossimTiffInfo::getPixelType(const ossimString& gtiffPrefix,
-                                 const ossimKeywordlist& gtiffKwl,
-                                 ossimString& pixelType) const
-{
-   bool result = false;
-   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), RASTER_TYPE_KW.c_str());
-   if (lookup)
-   {
-      pixelType = lookup;
-      result = true;
-   }
-   return result;
-}
-
-bool ossimTiffInfo::getModelType(const ossimString& gtiffPrefix,
-                                 const ossimKeywordlist& gtiffKwl,
-                                 ossimString& modelType) const
-{
-   bool result = false;
-   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), MODEL_TYPE_KW.c_str());
-   if (lookup)
-   {
-      modelType = lookup;
-      result = true;
-   }
-   return result;
-}
-
-bool ossimTiffInfo::getOssimProjectionName(const ossimString& gtiffPrefix,
-                                           const ossimKeywordlist& gtiffKwl,
-                                           ossimString& ossimProj) const
-{
-   bool result = false;
-   ossimProj.clear();
-   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), COORD_TRANS_CODE_KW.c_str());
-   if (lookup)
-   {
-      ossim_uint32 code = ossimString(lookup).toUInt32();
-
-      ossimGeoTiffCoordTransformsLut lut;
-      
-      ossimProj = lut.getEntryString(code);
-      
-      if (ossimProj.size())
-      {
-         result = true;
-      }
-   }
-   return result;
-}
-
-ossim_uint32 ossimTiffInfo::getLines(const ossimString& gtiffPrefix,
-                                     const ossimKeywordlist& gtiffKwl) const
-{
-   ossim_uint32 result = 0;
-   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), IMAGE_LENGTH_KW.c_str());
-   if (lookup)
-   {
-      result = ossimString(lookup).toUInt32();
-   }
-   return result;
-}
-
-ossim_uint32 ossimTiffInfo::getSamples(const ossimString& gtiffPrefix,
-                                       const ossimKeywordlist& gtiffKwl) const
-{
-   ossim_uint32 result = 0;
-   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), IMAGE_WIDTH_KW.c_str());
-   if (lookup)
-   {
-      result = ossimString(lookup).toUInt32();
-   }   
-   return result;
-}
-
-bool ossimTiffInfo::getStdParallelOne(const ossimString& gtiffPrefix,
-                                      const ossimKeywordlist& gtiffKwl,
-                                      ossimString& value) const
-{
-   bool result = false;
-   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), ossimKeywordNames::STD_PARALLEL_1_KW);
-   if (lookup)
-   {
-      value = lookup;
-      result = true;
-   }
-   return result;
-}
-
-bool ossimTiffInfo::getStdParallelTwo(const ossimString& gtiffPrefix,
-                                      const ossimKeywordlist& gtiffKwl,
-                                      ossimString& value) const
-{
-   bool result = false;
-   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), ossimKeywordNames::STD_PARALLEL_2_KW);
-   if (lookup)
-   {
-      value = lookup;
-      result = true;
-   }
-   return result;
-}
-
-bool ossimTiffInfo::getFalseEasting(const ossimString& gtiffPrefix,
-                                    const ossimKeywordlist& gtiffKwl,
-                                    ossimString& value) const
-{
-   bool result = false;
-   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), ossimKeywordNames::FALSE_EASTING_KW);
-   if (lookup)
-   {
-      value = lookup;
-      result = true;
-   }
-   return result; 
-}
-
-bool ossimTiffInfo::getFalseNorthing(const ossimString& gtiffPrefix,
-                                     const ossimKeywordlist& gtiffKwl,
-                                     ossimString& value) const
-{
-   bool result = false;
-   const char* lookup = gtiffKwl.find(gtiffPrefix.c_str(), ossimKeywordNames::FALSE_NORTHING_KW);
-   if (lookup)
-   {
-      value = lookup;
-      result = true;
-   }
-   return result; 
-}
-
-bool ossimTiffInfo::getFalseEastingNorthing(const ossimString& gtiffPrefix,
-                                            const ossimKeywordlist& gtiffKwl,
-                                            ossimDpt& eastingNorthing) const
-{
-   bool result = false;
-   ossimString value;
-   if ( getFalseEasting(gtiffPrefix, gtiffKwl, value) )
-   {
-      eastingNorthing.x = value.toFloat64();
-
-      if ( getFalseNorthing(gtiffPrefix, gtiffKwl, value) )
-      {
-         eastingNorthing.y = value.toFloat64();
-         result = true;
-      }
-   }
-   return result;
-}
-
-bool ossimTiffInfo::getScaleFactor(const ossimString& gtiffPrefix,
-                                   const ossimKeywordlist& gtiffKwl,
-                                   ossim_float64& value) const
-{
-   bool result = false;
-
-   const char* lookup =
-      gtiffKwl.find(gtiffPrefix.c_str(), ossimKeywordNames::SCALE_FACTOR_KW);
-   
-   if (lookup)
-   {
-      value = ossimString(lookup).toFloat64();
-      result = true;
-   }
-
-   return result; 
-}
-
-bool ossimTiffInfo::getOriginLat(const ossimString& gtiffPrefix,
-                                 const ossimKeywordlist& gtiffKwl,
-                                 ossim_float64& value) const
-{
-   bool result = false;
-
-   //---
-   // Not sure of the order of precedence here.
-   //---
-   const char* projOriginLatGeoKey =
-      gtiffKwl.find(gtiffPrefix.c_str(), ORIGIN_LATITUDE_KW.c_str());
-
-   //---
-   // Go for this key first as it is used in geotiff spec example:
-   // http://www.remotesensing.org/geotiff/spec/geotiff3.html#3.1.3.
-   //---
-   if (projOriginLatGeoKey)
-   {
-      value = ossimString(projOriginLatGeoKey).toFloat64();
-      result = true;
-   }
-   else
-   {
-      const char* projCenterLatGeoKey =
-         gtiffKwl.find(gtiffPrefix.c_str(), CENTER_LATITUDE__KW.c_str());
-
-      if (projCenterLatGeoKey)
-      {
-         value = ossimString(projCenterLatGeoKey).toFloat64();
-         result = true;
-      }
-      else
-      {
-         const char* projFalseOriginLatGeoKey =
-            gtiffKwl.find(gtiffPrefix.c_str(),
-                          FALSE_ORIGIN_LATITUDE_KW.c_str());
-
-         if (projFalseOriginLatGeoKey)
-         {
-            //---
-            // Seems the term "false" implies it should be added to the real
-            // origin?
-            //---
-            value = ossimString(projFalseOriginLatGeoKey).toFloat64();
-            result = true;
-         }
-      }
-   }
-   
-   return result;
-}
-
-bool ossimTiffInfo::getCentralMeridian(const ossimString& gtiffPrefix,
-                                       const ossimKeywordlist& gtiffKwl,
-                                       ossim_float64& value) const
-{
-   bool result = false;
-
-   //---
-   // Not sure of the order of precedence here.
-   //---
-   const char* projCenterLongGeoKey =
-      gtiffKwl.find(gtiffPrefix.c_str(), CENTER_LONGITUDE_KW.c_str());
-
-   //---
-   // Go for this key first as it is used in geotiff spec example:
-   // http://www.remotesensing.org/geotiff/spec/geotiff3.html#3.1.3.
-   //---
-   if (projCenterLongGeoKey)
-   {
-      value = ossimString(projCenterLongGeoKey).toFloat64();
-      result = true;
-   }
-   else
-   {
-      const char* projOriginLongGeoKey =
-         gtiffKwl.find(gtiffPrefix.c_str(), ORIGIN_LONGITUDE_KW.c_str());
-
-      if (projOriginLongGeoKey)
-      {
-         value = ossimString(projOriginLongGeoKey).toFloat64();
-         result = true;
-      }
-      else
-      {
-         const char* projFalseOriginLongGeoKey =
-            gtiffKwl.find(gtiffPrefix.c_str(),
-                          FALSE_ORIGIN_LONGITUDE_KW.c_str());
-
-         if (projFalseOriginLongGeoKey)
-         {
-            //---
-            // Seems the term "false" implies it should be added to the real
-            // origin?
-            //---
-            value = ossimString(projFalseOriginLongGeoKey).toFloat64();
-            result = true;
-         }
-      }
-   }
-   
-   return result;
-}
-
-void ossimTiffInfo::getTieSets(const std::vector<ossim_float64>& ties,
-                               ossim_uint32 width,
-                               ossim_uint32 height,
-                               ossimTieGptSet& tieSet) const
-{
-   ossim_uint32 idx = 0;
-   ossim_uint32 tieCount = (ossim_uint32)ties.size()/6;
-   const double* tiePointsPtr = &ties.front();
-   double offset = 0;
-   if (hasOneBasedTiePoints(ties, width, height))
-   {
-      offset = -1.0;
-   }
-   
-   for(idx = 0; idx < tieCount; ++idx)
-   {
-      ossimDpt xyPixel(tiePointsPtr[0]+offset, tiePointsPtr[1]+offset);
-      // tie[3] = x, tie[4]
-      ossimGpt gpt(tiePointsPtr[4], tiePointsPtr[3], tiePointsPtr[5]);
-      
-      tieSet.addTiePoint(new ossimTieGpt(gpt, xyPixel, .5));
-      tiePointsPtr+=6;
-   }
-}
-
-bool ossimTiffInfo::hasOneBasedTiePoints(
-   const std::vector<ossim_float64>& ties,
-   ossim_uint32 width, ossim_uint32 height) const
-{
-   bool result = false;
-   
-   // Assuming ties of (x,y,z,lat,lon,hgt) so size should be divide by 3.
-   if (ties.size()%6)
-   {
-      return result;
-   }
-   
-   ossim_float64 minX = 999999.0;
-   ossim_float64 minY = 999999.0;
-   ossim_float64 maxX = 0.0;
-   ossim_float64 maxY = 0.0;
-
-   const ossim_uint32 SIZE = (ossim_uint32)ties.size();
-   ossim_uint32 tieIndex = 0;
-
-   while (tieIndex < SIZE)
-   {
-      if ( ties[tieIndex]   < minX ) minX = ties[tieIndex];
-      if ( ties[tieIndex]   > maxX ) maxX = ties[tieIndex];
-      if ( ties[tieIndex+1] < minY ) minY = ties[tieIndex+1];
-      if ( ties[tieIndex+1] > maxY ) maxY = ties[tieIndex+1];
-      tieIndex += 6;
-   }
-
-   if ( (minX == 1) && (maxX == width) &&
-        (minY == 1) && (maxY == height) )
-   {
-      result = true;
-   }
-
-#if 0
-   if (traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimGeoTiff::hasOneBasedTiePoints DEBUG:"
-         << "\nminX:       " << minX
-         << "\nmaxX:       " << maxX
-         << "\nminY:       " << minY
-         << "\nmaxY:       " << maxY
-         << "\ntheWidth:   " << theWidth
-         << "\ntheLength:  " << theLength
-         << "\none based:  " << (result?"true":"false")
-         << std::endl;
-   }
-#endif
-   
-   return result;
-}
diff --git a/src/ossim/support_data/ossimTiffWorld.cpp b/src/ossim/support_data/ossimTiffWorld.cpp
deleted file mode 100644
index 0fabd67..0000000
--- a/src/ossim/support_data/ossimTiffWorld.cpp
+++ /dev/null
@@ -1,268 +0,0 @@
-//*******************************************************************
-//
-// License:  LGPL
-//
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Ken Melero
-// 
-// Description: Container class for a tiff world file data.
-//
-//********************************************************************
-// $Id: ossimTiffWorld.cpp 19682 2011-05-31 14:21:20Z dburken $
-
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimDirectory.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimUnitConversionTool.h>
-#include <ossim/support_data/ossimTiffWorld.h>
-#include <ossim/base/ossimNotify.h>
-#include <cmath>
-#include <fstream>
-#include <iomanip>
-#include <iostream>
-using namespace std;
-
-//**************************************************************************
-// ossimTiffWorld::ossimTiffWorld()
-//***************************************************************************
-ossimTiffWorld::ossimTiffWorld()
-   :
-      theXform1(1.0),
-      theXform2(0.0),
-      theXform3(0.0),
-      theXform4(-1.0),
-      theTranslation(0.0,0.0),
-      thePixelType(OSSIM_PIXEL_IS_AREA),
-      theUnit(OSSIM_METERS),
-      theComputedScale(0.0, 0.0),
-      theComputedRotation(0.0)
-{}
-
-//**************************************************************************
-// ossimTiffWorld::ossimTiffWorld(const char* file, PixelType ptype)
-//***************************************************************************
-ossimTiffWorld::ossimTiffWorld(const char* file, 
-			       ossimPixelType ptype,
-			       ossimUnitType  scaleUnits)
-   :
-      theXform1(1.0),
-      theXform2(0.0),
-      theXform3(0.0),
-      theXform4(-1.0),
-      theTranslation(0.0,0.0),
-      thePixelType(ptype),
-      theUnit(scaleUnits),
-      theComputedScale(0.0, 0.0),
-      theComputedRotation(0.0)
-{
-   open(ossimFilename(file), ptype, scaleUnits);
-}
-
-bool ossimTiffWorld::open(const ossimFilename& file, ossimPixelType ptype, ossimUnitType  unit)
-{
-   bool result = false;
-
-   ifstream is;
-   is.open(file.c_str());
-
-   if( !is.is_open() )
-   {
-      // ESH 07/2008, Trac #234: OSSIM is case sensitive 
-      // when using worldfile templates during ingest
-      // -- If first you don't succeed with the user-specified
-      // filename, try again with the results of a case insensitive search.
-      ossimFilename fullName(file);
-      ossimDirectory directory(fullName.path());
-      ossimFilename filename(fullName.file());
-      
-      std::vector<ossimFilename> result;
-      bool bSuccess = directory.findCaseInsensitiveEquivalents(
-         filename, result );
-      if ( bSuccess == true )
-      {
-         int numResults = (int)result.size();
-         int i;
-         for ( i=0; i<numResults && !is.is_open(); ++i )
-         {
-            is.open( result[i].c_str() );
-         }
-      }
-   }
-      
-   if ( is.is_open() )
-   {
-      double x,y;
-      is >> theXform1 >> theXform2 >> theXform3 >> theXform4 >> x >> y;
-      theTranslation = ossimDpt(x,y);
-      
-      // Compute the affine parameters from the transform:
-      theComputedRotation = atan2(theXform2,theXform1);
-      
-/*
- * Commented out warning.
- * Used all the time for tie and scale, NOT for affine. We could wrap around trace
- * if we added trace to class. (drb - 20110115)
- */
-#if 0
-      double angle2 = atan2(theXform4,theXform3);
-      if (fabs(theComputedRotation - angle2) > 0.00001)
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimTiffWorld -- Non-affine transform encountered."
-            << " Use of an affine transform to represent this world file geometry will result in errors."
-            << endl;
-      }
-#endif
-      
-      double cos_rot = cos(theComputedRotation);
-      if (cos_rot != 0.0)
-      {
-         theComputedScale.x = theXform1/cos_rot;
-         theComputedScale.y = theXform4/cos_rot;
-      }
-      else
-      {
-         theComputedScale.x = theXform4;
-         theComputedScale.y = theXform1;
-      }
-      thePixelType = ptype;
-      theUnit = unit;
-      is.close();
-      result = true;
-   }
-   return result;
-}
-
-ossimTiffWorld::~ossimTiffWorld()
-{
-}
-
-void ossimTiffWorld::forward(const ossimDpt& ip,
-                             ossimDpt& transformedPoint)
-{
-   transformedPoint.x = ip.x*theXform1 + ip.y*theXform2 + theTranslation.x;
-   transformedPoint.y = ip.x*theXform3 + ip.y*theXform4 + theTranslation.y;
-}
-
-bool ossimTiffWorld::saveToOssimGeom(ossimKeywordlist& kwl, const char* prefix)const
-{
-   ossimDpt scale(fabs(theXform1), fabs(theXform4));
-   ossimDpt tie(theTranslation.x, theTranslation.y);
-
-   if ( (theUnit == OSSIM_FEET) || (theUnit == OSSIM_US_SURVEY_FEET) )
-   {
-      // Convert to meters.
-      scale.x = ossimUnitConversionTool(scale.x, theUnit).getMeters();
-      scale.y = ossimUnitConversionTool(scale.y, theUnit).getMeters();
-      tie.x   = ossimUnitConversionTool(tie.x, theUnit).getMeters();
-      tie.y   = ossimUnitConversionTool(tie.y, theUnit).getMeters();
-   }
-   
-   // Shift the tie point to be relative to the center of the pixel.
-   if(thePixelType == OSSIM_PIXEL_IS_AREA)
-   {
-      tie.x += (scale.x/2.0);
-      tie.y -= (scale.y/2.0);
-
-      // Adjust the keyword list to reflect pixel is point.
-      kwl.add(prefix,
-              ossimKeywordNames::PIXEL_TYPE_KW,
-              "pixel_is_point",
-              true);
-   }
-
-   // Units in feet converted to meters up above.
-   ossimString units = "meters";
-   if(theUnit == OSSIM_DEGREES)
-   {
-      units = "degrees";
-   }
-   
-   kwl.add(prefix,
-           ossimKeywordNames::TIE_POINT_XY_KW,
-           tie.toString().c_str(),
-           true);
-   
-   kwl.add(prefix,
-           ossimKeywordNames::TIE_POINT_UNITS_KW,
-           units.c_str(),
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::PIXEL_SCALE_XY_KW,
-           scale.toString().c_str(),
-           true);
-
-   kwl.add(prefix,
-           ossimKeywordNames::PIXEL_SCALE_UNITS_KW,
-           units.c_str(),
-           true);
-
-   return true;
-}
-
-bool ossimTiffWorld::loadFromOssimGeom(const ossimKeywordlist& kwl, const char* prefix)
-{
-   theXform2 = 0.0;
-   theXform3 = 0.0;
-
-   const char* lookup;
-
-   // Get the scale...
-   lookup = kwl.find(prefix, ossimKeywordNames::PIXEL_SCALE_XY_KW);
-   if (lookup)
-   {
-      ossimDpt scale;
-      scale.toPoint(std::string(lookup));
-      theXform1      = scale.x;
-      theXform4      = -(scale.y);
-   }
-   else // BACKWARDS COMPATIBILITY LOOKUPS...
-   {
-      ossimString xscale = kwl.find(prefix, ossimKeywordNames::METERS_PER_PIXEL_X_KW);
-      ossimString yscale = kwl.find(prefix, ossimKeywordNames::METERS_PER_PIXEL_Y_KW);
-      theXform1 = xscale.toDouble();
-      theXform4 = -(yscale.toDouble());
-   }
-
-   // Get the tie...
-   lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_XY_KW);
-   if (lookup)
-   {
-      ossimDpt tie;
-      tie.toPoint(std::string(lookup));
-      theTranslation.x  = tie.x;
-      theTranslation.y  = tie.y;
-   }
-   else // BACKWARDS COMPATIBILITY LOOKUPS...
-   {
-      ossimString easting  =
-         kwl.find(prefix, ossimKeywordNames::TIE_POINT_EASTING_KW);
-      ossimString northing =
-         kwl.find(prefix, ossimKeywordNames::TIE_POINT_NORTHING_KW);
-      theTranslation.x  = easting.toDouble();
-      theTranslation.y  = northing.toDouble(); 
-   }
-   
-   return true;
-}
-
-std::ostream& ossimTiffWorld::print(std::ostream& out) const
-{
-   out << setiosflags(ios::fixed) << setprecision(15)
-       << theXform1     << "\n"
-       << theXform2     << "\n"
-       << theXform3     << "\n"
-       << theXform4     << "\n"
-       << theTranslation
-       << endl;
-   return out;
-}
-
-std::ostream& operator<<(std::ostream& out, const ossimTiffWorld& obj)
-{
-   return obj.print(out);
-}
-
diff --git a/src/ossim/support_data/ossimWavelength.cpp b/src/ossim/support_data/ossimWavelength.cpp
deleted file mode 100644
index 2289847..0000000
--- a/src/ossim/support_data/ossimWavelength.cpp
+++ /dev/null
@@ -1,204 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Class definition for ossimWavelength.
-//
-//----------------------------------------------------------------------------
-
-#include <ossim/support_data/ossimWavelength.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/support_data/ossimEnviHeader.h>
-#include <cmath>
-
-ossimWavelength::ossimWavelength()
-   : m_map()
-{}
-
-ossimWavelength::ossimWavelength( const ossimWavelength& obj )
-   : m_map( obj.m_map )
-{}
-
-const ossimWavelength& ossimWavelength::operator=( const ossimWavelength& rhs )
-{
-   if ( this != &rhs )
-   {
-      m_map = rhs.m_map;
-   }
-   return *this;   
-}
-
-ossimWavelength::~ossimWavelength()
-{
-}
-   
-const ossimWavelength::WavelengthMap& ossimWavelength::getMap() const
-{
-   return m_map;
-}
-   
-ossimWavelength::WavelengthMap& ossimWavelength::getMap()
-{
-   return m_map;
-}
-
-bool ossimWavelength::initialize( const ossimEnviHeader& hdr )
-{
-   //---
-   // Example envi wavelength format:
-   // wavelength = { 374.323608,  382.530487,  390.737427 }
-   //---
-   bool result = false;
-   ossimString value;
-
-   // Check the units...
-   ossimString key = "wavelength units";
-   if ( hdr.getValue( key, value ) )
-   {
-      if ( value.downcase() == "nanometers" )
-      {
-         // Check for wavelength key:
-         key = "wavelength";
-         if ( hdr.getValue( key, value ) )
-         {
-            if ( value.size() )
-            {
-               // Split into array.
-               value.trim( ossimString("{}") );
-               std::vector<ossimString> list;
-               value.split( list, ossimString(","), true );
-
-               if ( list.size() )
-               {
-                  // Initialize the map:
-                  
-                  std::vector<ossimString>::const_iterator i = list.begin();
-                  ossim_uint32 band = 0;
-                  ossim_float32 wavelength = 0.0;
-            
-                  while ( i != list.end() )
-                  {
-                     wavelength = (*i).toFloat64();
-                     m_map.insert( std::make_pair( wavelength, band ) );
-                     ++band;
-                     ++i;
-                  }
-               }
-            }
-         }
-      }
-   }
-   
-   return ( m_map.size() ? true : false);
-   
-} // End: bool ossimWavelength::initialize(const ossimEnviHeader&)
-
-using namespace std;
-ossimWavelength::WavelengthMap::const_iterator ossimWavelength::findClosestIterator(
-   const ossim_float64& requestedWavelength,
-   const ossim_float64& thresholdFromCenter  ) const
-{
-   WavelengthMap::const_iterator result = m_map.lower_bound( requestedWavelength );
-   if ( result != m_map.end() )
-   {
-      if ( result != m_map.begin() ) //  && (result->first > requestedWavelength) )
-      {
-         // Somewhere in the middle.
-         WavelengthMap::const_iterator lower = result;
-         --lower;
-
-         ossim_float64 t = (requestedWavelength - lower->first) / (result->first -lower->first);
-         if ( t < 0.5 )
-         {
-            result = lower;
-         }
-      }
-   }
-   else
-   {
-      --result;
-   }
-      
-   if ( result != m_map.end() )
-   {
-      // Within threshold check.
-      if ( std::fabs( result->first - requestedWavelength) > thresholdFromCenter )
-      {
-         result = m_map.end();
-      }
-      
-   } // if ( result != m_map.end() )
-
-   return result;
-   
-} // End: WavelengthMap::const_iterator ossimWavelength::findClosestIterator
-
-ossim_int32 ossimWavelength::findClosestIndex(
-   const ossim_float64& requestedWavelength, const ossim_float64& thresholdFromCenter  ) const
-{
-   ossim_int32 result = -1;
-   WavelengthMap::const_iterator i =
-      findClosestIterator( requestedWavelength, thresholdFromCenter );
-   if ( i != m_map.end() )
-   {
-      result = (*i).second;
-   }
-   return result;
-   
-} // End: ossim_int32 ossimWavelength::findClosestIndex(...
-
-bool ossimWavelength::getRgbBands( std::vector<ossim_uint32>& bands ) const
-{
-   bool result = false;
-
-   if ( m_map.size() )
-   {
-      //---
-      // Attempt to find bands with closest rgb wavelengths.
-      // red:   620 - 750 nm
-      // green: 495 - 570 nm
-      // blue:  450 - 495 nm
-      //---
-      //const ossim_float32 RED_WAVELENGTH              = 439.978577; // 442.0;      
-      //const ossim_float32 GREEN_WAVELENGTH            = 546.666504; // 546.0;
-      //const ossim_float32 BLUE_WAVELENGTH             = 636.941406; // 637.0;
-      const ossim_float32 RED_WAVELENGTH              = 685.0;      
-      const ossim_float32 GREEN_WAVELENGTH            = 532.5;
-      const ossim_float32 BLUE_WAVELENGTH             = 472.5;
-      const ossim_float32 RED_THRESHOLD_FROM_CENTER   =  65.0;      
-      const ossim_float32 GREEN_THRESHOLD_FROM_CENTER =  37.5;
-      const ossim_float32 BLUE_THRESHOLD_FROM_CENTER  =  22.5;
-
-      WavelengthMap::const_iterator r =
-         findClosestIterator( RED_WAVELENGTH, RED_THRESHOLD_FROM_CENTER );
-      WavelengthMap::const_iterator g =
-         findClosestIterator( GREEN_WAVELENGTH, GREEN_THRESHOLD_FROM_CENTER );
-      WavelengthMap::const_iterator b =
-         findClosestIterator( BLUE_WAVELENGTH, BLUE_THRESHOLD_FROM_CENTER );
-
-      if ( (r != m_map.end()) && (g != m_map.end()) && (b != m_map.end()) )
-      {
-         bands.resize(3);
-         bands[0] = (*r).second;
-         bands[1] = (*g).second;
-         bands[2] = (*b).second;
-         result = true;
-      }
-   }
-   return result;
-   
-} // bool ossimWavelength::getRgbBands( std::vector<ossim_uint32>& ) const
-
-ossimWavelength::WavelengthMap::const_iterator ossimWavelength::end() const
-{
-   return m_map.end();
-}
-
-ossimWavelength::WavelengthMap::iterator ossimWavelength::end()
-{
-   return m_map.end();
-}
diff --git a/src/ossim/support_data/ossimXmpInfo.cpp b/src/ossim/support_data/ossimXmpInfo.cpp
deleted file mode 100644
index 6cd7c21..0000000
--- a/src/ossim/support_data/ossimXmpInfo.cpp
+++ /dev/null
@@ -1,644 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Extensible Metadata Platform (XMP) Info object.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/support_data/ossimXmpInfo.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimEndian.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimXmlDocument.h>
-#include <ossim/base/ossimXmlNode.h>
-#include <ossim/projection/ossimBilinearProjection.h>
-#include <ossim/projection/ossimProjection.h>
-#include <fstream>
-#include <iomanip>
-#include <iostream>
-#include <sstream>
-#include <vector>
-
-// Static trace for debugging.
-static const ossimTrace traceDebug( ossimString("ossimXmpInfo:debug") );
-
-ossimXmpInfo::ossimXmpInfo()
-   : ossimInfoBase(),
-     m_file(),
-     m_xmpApp1XmlBlock()
-{
-}
-
-ossimXmpInfo::~ossimXmpInfo()
-{
-}
-
-bool ossimXmpInfo::open(const ossimFilename& file)
-{
-   //---
-   // NOTE:
-   // This parser was written for a specific aerial camera.  If something more generic is
-   // needed please provide sample to the group. D. Burken, 17 January 2013.
-   //---
-   
-   bool result = false;
-
-   //---
-   // Open the file.
-   //---
-   std::ifstream str(file.c_str(), std::ios_base::binary|std::ios_base::in);
-   if ( str.good() ) 
-   {
-      // Parse for XMP APP1 XML block. Currently only case.
-      std::string xmlString;
-      result = getXmpApp1XmlBlock( str, xmlString );
-      if ( result )
-      {
-         m_file = file;
-         m_xmpApp1XmlBlock = xmlString;
-      }
-      else
-      {
-         m_file.clear();
-         m_xmpApp1XmlBlock.clear();
-      }
-   }
-
-   return result;
-}
-
-bool ossimXmpInfo::getXmpApp1XmlBlock( std::ifstream& str, std::string& xmpApp1XmlBlock ) const
-{
-   bool result = false;
-
-   if ( str.good() )
-   {
-      ossim_uint8 c;
-      
-      // Look for Start Of Image (SOI) marker 0xFFD8:
-      str.read( (char*)&c, 1);
-      if ( c == 0xff )
-      {
-         str.read( (char*)&c, 1);
-         if ( c == 0xd8 )
-         {
-            // Found SOI marker.
-            
-            // Now find APP1 marker 0xffe1.  Only do 24 iterations max:
-            for ( ossim_uint32 i = 0; i < 24; ++i )
-            {
-               str.read( (char*)&c, 1);
-               if ( c == 0xff )
-               {
-                  str.read( (char*)&c, 1);
-                  if ( c == 0xe1 )
-                  {
-                     // Found APP1 marker.
-                     
-                     //---
-                     // Next two bytes are the length, MSB first (big endian) per jpeg spec.
-                     // length = 2 + 29 + length_of_xmp_packet
-                     //---
-                     ossim_uint16 xpacketLength = 0;
-                     str.read( (char*)&xpacketLength, 2 );
-                     
-                     // See if system is not big endian and swap if needed.
-                     if ( ossim::byteOrder() != OSSIM_BIG_ENDIAN )
-                     {
-                        ossimEndian swapper;
-                        swapper.swap( xpacketLength );
-                     }
-                     
-                     if ( xpacketLength > 31 )
-                     {
-                        //---
-                        // XMP namepsace URI, used as unique ID:
-                        // Null terminated ascii string: "http://ns.adobe.com/xap/1.0/"
-                        // (29 bytes)
-                        // Not using getline until ID verified.
-                        //---
-                        const ossim_uint32 XMP_ID_SIZE = 29;
-                        std::vector<char> v( XMP_ID_SIZE );
-                        
-                        // Read the next 29 bytes.  (string + null)
-                        str.read( &v.front(), XMP_ID_SIZE );
-                        
-                        // Copy.
-                        v.push_back( '\0' ); // Just in case string is bad.
-                        std::string s = &v.front();
-                        
-                        if ( s == "http://ns.adobe.com/xap/1.0/" )
-                        {
-                           //---
-                           // Now read header to determine encoding:
-                           // Note: Currently hard coded for UTF-8.
-                           //---
-                           
-                           //---
-                           // Look for "<?xpacket begin="
-                           // Line has binary data in it or getline could be used.
-                           //---
-                           const ossim_uint32 HEADER_SIZE = 16;
-                           v.resize( HEADER_SIZE );
-                           str.read( &v.front(), HEADER_SIZE );
-                           
-                           v.push_back( '\0' ); // Null terminate.
-                           s = &v.front();
-                           
-                           if ( s == "<?xpacket begin=" )
-                           {
-                              // Skip the quote which can be single or double.
-                              str.seekg( 1, std::ios_base::cur );
-                              
-                              // Now look for 0xEF, 0xBB, 0xBF which is UTF-8
-                              ossim_uint8 encode_bytes[3];
-                              str.read( (char*)encode_bytes, 3 );
-                              
-                              if ( ( encode_bytes[0] == 0xef ) &&
-                                   ( encode_bytes[1] == 0xbb ) &&
-                                   ( encode_bytes[2] == 0xbf ) )
-                              {
-                                 // Skip the next six bytes: "' id='"
-                                 str.seekg( 6, std::ios_base::cur );
-                                 
-                                 // Read the ID: W5M0MpCehiHzreSzNTczkc9d
-                                 const ossim_uint32 XPACKET_ID_SIZE = 24;
-                                 v.resize( XPACKET_ID_SIZE );
-                                 str.read ( &v.front(), XPACKET_ID_SIZE );
-                                 
-                                 v.push_back( '\0' ); // null terminate
-                                 s = &v.front();
-                                 
-                                 if ( s == "W5M0MpCehiHzreSzNTczkc9d" )
-                                 {
-                                    //---
-                                    // Gobble the rest of the line. No more binary characters
-                                    // so just use getline.
-                                    //---
-                                    std::getline( str, s );
-                                    
-                                    // Read in the xml string (single line):
-                                    std::getline( str, xmpApp1XmlBlock );
-                                    
-                                    if ( xmpApp1XmlBlock.size() )
-                                    {
-                                       result = true;
-                                    }
-                                 }
-                              }
-                              
-                           } // Matches: if ( s == "<?xpacket begin=" )
-                           
-                        } // Matches: if ( s == "http://ns.adobe.com/xap/1.0/" )
-                        
-                     } // Matches: if ( xpacketLength > 31 )
-                  
-                  } // Matches: if ( c == 0xd8 )
-                  
-               } // Matches: if ( c == 0xff )
-               
-            } // Matches: for ( ossim_uint32 i; i < 24; ++i )
-            
-         } // Matches: if ( c == 0xd8 )
-         
-      } // Matches: if ( c == 0xff )
-      
-   } // Matches: if ( str.good() ) 
-
-   return result;
-   
-} // End: ossimXmpInfo::getXmpApp1XmlBlock
-
-std::ostream& ossimXmpInfo::print(std::ostream& out) const
-{
-   if ( getXmpApp1XmlBlock().size() )
-   {
-      std::string prefix = "";
-      std::string ext = m_file.ext().downcase().string();
-      if ( ( ext == "jpg" ) || ( ext == "jpeg" ) )
-      {
-         prefix = "jpeg.";
-      }
-      
-      std::string s;
-
-      // Date:
-      getDate( s );
-      if ( s.size() )
-      {
-         out << prefix << "acquisitionDate: " << s << std::endl;
-      }      
-      
-      // Mission ID:
-      getMissionId( s );
-      if ( s.size() )
-      {
-         out << prefix << "missionId: " << s << std::endl;
-      }
-
-      // Sensor ID:
-      getSensorId( s );
-      if ( s.size() )
-      {
-         out << prefix << "sensorId: " << s << std::endl;
-      }
-      
-      out << prefix << "xmp.app1.xml: " << getXmpApp1XmlBlock() << std::endl;
-      
-   }
-   return out;
-
-} // End: std::ostream& ossimXmpInfo::print(std::ostream& out) const
-
-const std::string& ossimXmpInfo::getXmpApp1XmlBlock() const
-{
-   return m_xmpApp1XmlBlock;
-}
-
-ossimRefPtr<ossimProjection> ossimXmpInfo::getProjection( const ossimDrect& imageRect ) const
-{
-   ossimRefPtr<ossimProjection> result = 0;
-
-   if ( getXmpApp1XmlBlock().size() && ( imageRect.hasNans() == false ) )
-   {
-      // Open a stream to the xml block.
-      std::istringstream is;
-      is.str( m_xmpApp1XmlBlock );
-
-      ossimXmlDocument xmlDoc;
-
-      // Read the xml document:
-      if ( xmlDoc.read( is ) )
-      {
-         // Find the four corner ground points.
-         ossimString s;
-         ossimString path;
-         ossimGpt ulg;
-         ossimGpt urg;
-         ossimGpt lrg;
-         ossimGpt llg;
-         bool foundAll = false;
-
-         while ( 1 )
-         {
-            // Upper left:
-            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:UL_Latitude";
-            if ( getPath( path, xmlDoc, s ) )
-            {
-               ulg.lat = s.toFloat64();
-            }
-            else
-            {
-               break;
-            }
-            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:UL_Longitude";
-            if ( getPath( path, xmlDoc, s ) )
-            {
-               ulg.lon = s.toFloat64();
-            }
-            else
-            {
-               break;
-            }
-
-            // Upper right:
-            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:UR_Latitude";
-            if ( getPath( path, xmlDoc, s ) )
-            {
-               urg.lat = s.toFloat64();
-            }
-            else
-            {
-               break;
-            }
-            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:UR_Longitude";
-            if ( getPath( path, xmlDoc, s ) )
-            {
-               urg.lon = s.toFloat64();
-            }
-            else
-            {
-               break;
-            }
-            
-            // Lower right:
-            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:LR_Latitude";
-            if ( getPath( path, xmlDoc, s ) )
-            {
-               lrg.lat = s.toFloat64();
-            }
-            else
-            {
-               break;
-            }
-            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:LR_Longitude";
-            if ( getPath( path, xmlDoc, s ) )
-            {
-               lrg.lon = s.toFloat64();
-            }
-            else
-            {
-               break;
-            }
-            
-            // Lower left:
-            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:LL_Latitude";
-            if ( getPath( path, xmlDoc, s ) )
-            {
-               llg.lat = s.toFloat64();
-            }
-            else
-            {
-               break;
-            }
-            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:LL_Longitude";
-            if ( getPath( path, xmlDoc, s ) )
-            {
-               llg.lon = s.toFloat64();
-
-               // If we get here mark the status good:
-               foundAll = true;
-            }
-            else
-            {
-               break;
-            }
-
-            //---
-            // Final trailing break out of infinite loop.
-            // No code past this point if while loop.
-            //---
-            break;
-         }
-
-         if ( foundAll )
-         {
-            result = new ossimBilinearProjection( imageRect.ul(),
-                                                  imageRect.ur(),
-                                                  imageRect.lr(),
-                                                  imageRect.ll(),
-                                                  ulg,
-                                                  urg,
-                                                  lrg,
-                                                  llg );
-         }
-         
-      } // Matches: if ( xmlDoc.read( is ) )
-      
-   } // Matches: if ( getXmpApp1XmlBlock().size() )
-   
-   return result;
-   
-} // End: ossimXmpInfo::getProjection
-
-void  ossimXmpInfo::getDate( std::string& date ) const
-{
-   date.clear();
-   
-   if ( getXmpApp1XmlBlock().size() )
-   {
-      // Open a stream to the xml block.
-      std::istringstream is;
-      is.str( m_xmpApp1XmlBlock );
-      
-      ossimXmlDocument xmlDoc;
-      
-      // Read the xml document:
-      if ( xmlDoc.read( is ) )
-      {
-         //---
-         // ISO8601 date in the form of: YYYY-MM-DDThh:mm:ss.sssZ
-         // Find the four corner ground points.
-         //---
-         ossimString s;
-         ossimString path;
-         std::string year;
-         std::string month;
-         std::string dayOfMonth;
-         std::string hour;
-         std::string minute;
-         std::string second;
-         std::string milliSecond;
-         
-         bool foundAll = false;
-
-         while ( 1 )
-         {
-            // year:
-            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:IRIG_Year";
-            if ( getPath( path, xmlDoc, s ) )
-            {
-               year = s.string();
-            }
-            else
-            {
-               break;
-            }
-            // month:
-            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:IRIG_Month";
-            if ( getPath( path, xmlDoc, s ) )
-            {
-               month = s.string();
-            }
-            else
-            {
-               break;
-            }
-            
-            // day of month:
-            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:IRIG_Day_of_Month";
-            if ( getPath( path, xmlDoc, s ) )
-            {
-               dayOfMonth = s.string();
-            }
-            else
-            {
-               break;
-            }
-            
-            // hour:
-            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:IRIG_Hour";
-            if ( getPath( path, xmlDoc, s ) )
-            {
-               hour = s.string();
-            }
-            else
-            {
-               break;
-            }
-            
-            // minute:
-            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:IRIG_Min";
-            if ( getPath( path, xmlDoc, s ) )
-            {
-               minute = s.string();
-            }
-            else
-            {
-               break;
-            }
-            
-            // second:
-            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:IRIG_Sec";
-            if ( getPath( path, xmlDoc, s ) )
-            {
-               second = s.string();
-            }
-            else
-            {
-               break;
-            }
-            
-            // millisecond:
-            path = "/x:xmpmeta/rdf:RDF/rdf:Description/dc:IRIG_Msec";
-            if ( getPath( path, xmlDoc, s ) )
-            {
-               milliSecond = s.string();
-            }
-            else
-            {
-               break;
-            }
-
-            // If we get here mark the status good for downstream code.
-            foundAll = true;
-            
-            //---
-            // Final trailing break out of infinite loop.
-            // No code past this point if while loop.
-            //---
-            break;
-
-         } // End: while ( 1 )
-         
-         if ( foundAll )
-         {
-            date = year + "-"; // Assuming year in 4 digit form, e.g. 2013.
-
-            // Month two digit wide.
-            std::ostringstream os1;
-            os1 << std::setiosflags(std::ios_base::fixed|std::ios_base::right) 
-                << std::setfill('0')
-                << std::setw(2)
-                << month;
-            date += os1.str() + "-";
-
-            // Day two digit wide.
-            std::ostringstream os2;
-            os2 << std::setiosflags(std::ios_base::fixed|std::ios_base::right) 
-                << std::setfill('0')
-                << std::setw(2)
-                << dayOfMonth;
-            date += os2.str() + "T";
-
-            // Hour two digit wide.
-            std::ostringstream os3;
-            os3 << std::setiosflags(std::ios_base::fixed|std::ios_base::right) 
-                << std::setfill('0')
-                << std::setw(2)
-                << hour;
-            date += os3.str() + ":";
-
-            // Minute two digit wide.
-            std::ostringstream os4;
-            os4 << std::setiosflags(std::ios_base::fixed|std::ios_base::right) 
-                << std::setfill('0')
-                << std::setw(2)
-                << minute;
-            date += os4.str() + ":";
-
-            // Second two digit wide.
-            std::ostringstream os5;
-            os5 << std::setiosflags(std::ios_base::fixed|std::ios_base::right) 
-                << std::setfill('0')
-                << std::setw(2)
-                << second;
-            date += os5.str() + ".";
-
-             // Milli second three digit wide.
-            std::ostringstream os6;
-            os6 << std::setiosflags(std::ios_base::fixed|std::ios_base::right) 
-                << std::setfill('0')
-                << std::setw(3)
-                << milliSecond;
-            date += os6.str() + "Z"; // Assumption...
-         }
-         
-      } // Matches: if ( xmlDoc.read( is ) )
-      
-   } // Matches: if ( getXmpApp1XmlBlock().size() )
-   
-} // End: void  ossimXmpInfo::getDate( std::string& date ) const
-
-
-void ossimXmpInfo::getMissionId( std::string& mission ) const
-{
-   // Currently nothing in sample data to grab so using mission "x".
-   mission = "x";
-}
-
-void ossimXmpInfo::getSensorId( std::string& sensor ) const
-{
-   // Currently nothing in sample data to grab so using sensor "x".
-   sensor = "x";
-}
-
-bool ossimXmpInfo::getPath(
-   const ossimString& path, const ossimXmlDocument& xdoc, ossimString& s) const
-{
-   bool result = false;
-
-   std::vector<ossimRefPtr<ossimXmlNode> > xnodes;
-   xdoc.findNodes(path, xnodes);
-   if ( xnodes.size() == 1 ) // Error if more than one.
-   {
-      if ( xnodes[0].valid() )
-      {
-         s = xnodes[0]->getText();
-         result = true;
-      }
-      else if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimXmpInfo::getPath ERROR:\n"
-            << "Node not found: " << path
-            << std::endl;
-      }
-   }
-   else if ( xnodes.size() == 0 )
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimXmpInfo::getPath ERROR:\n"
-            << "Node not found: " << path
-            << std::endl;
-      }
-   }
-   else
-   {
-      if(traceDebug())
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "ossimXmpInfo::getPath ERROR:\n"
-            << "Multiple nodes found: " << path
-            << std::endl;
-      }
-   }
-
-   if (!result)
-   {
-      s.clear();
-   }
-   return result;
-   
-} // bool ossimXmpInfo::getPath
-
diff --git a/src/ossim/util/ossimBatchTest.cpp b/src/ossim/util/ossimBatchTest.cpp
deleted file mode 100644
index 00451ee..0000000
--- a/src/ossim/util/ossimBatchTest.cpp
+++ /dev/null
@@ -1,1268 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File ossim-batch-test.cpp
-// 
-// License:  See top level LICENSE.txt file.
-//
-// Author:  David Burken, Oscar Kramer
-//
-// Description: Test code application ossim batch test.
-//
-//----------------------------------------------------------------------------
-// $Id: ossim-batch-test.cpp 3112 2012-01-26 17:28:00Z david.burken $
-
-#include <ossim/util/ossimBatchTest.h>
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <ossim/base/ossimEnvironmentUtility.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimTimer.h>
-#include <ossim/init/ossimInit.h>
-
-#include <cstdlib> /* for system() */
-#include <ctime>
-#include <iomanip>
-#include <iostream>
-#include <string>
-#include <sstream>
-
-using namespace std;
-
-//**************************************************************************************************
-// Constructor
-//**************************************************************************************************
-ossimBatchTest::ossimBatchTest()
-   :
-   m_allIsDisabled(false),
-   m_templateModeActive(false)
-{
-
-}
-
-//**************************************************************************************************
-// Initialize parses the command line. Returns true if status OK.
-//**************************************************************************************************
-bool ossimBatchTest::initialize(ossimArgumentParser& ap)
-{
-   if ( (ap.argc() == 1) || ap.read("-h") || ap.read("--help") )
-   {
-      usage(ap);
-
-      // continue_after_init to false
-      return false;
-   }
-
-   // Initialize environment:
-#if defined(WIN32) || defined(_MSC_VER) && !defined(__CYGWIN__) && !defined(__MWERKS__)
-   _putenv("DEL_CMD=del /Q"); // For backwards compatiblity.
-   _putenv("DIFF_CMD=fc /W");
-   _putenv("COPY_CMD=copy /Y");
-   _putenv("MKDIR_CMD=mkdir");
-   _putenv("RM_CMD=del /Q");
-   _putenv("RMDIR_CMD=rmdir /S /Q");
-   
-#else
-   setenv("DEL_CMD",  "rm -rf",    1); // For backwards compatiblity.
-   setenv("DIFF_CMD",  "diff -w",  1);
-   setenv("COPY_CMD",  "cp",       1);
-   setenv("MKDIR_CMD", "mkdir -p", 1);
-   setenv("RM_CMD",    "rm -f",    1);
-   setenv("RMDIR_CMD", "rm -rf",   1);
-   
-#endif
-   
-   std::string tempString;
-   ossimArgumentParser::ossimParameter stringParam(tempString);
-   
-   if (ap.read("-W", stringParam) || ap.read("-W"))
-   {
-      ossimFilename templateFile (tempString.c_str());
-      if (templateFile.empty())
-         templateFile = "obt_config_long_template.kwl";
-      m_templateModeActive = true;
-      writeTemplate(templateFile, true);
-      return true;
-   }
-   if (ap.read("-w", stringParam) || ap.read("-w"))
-   {
-      ossimFilename templateFile(tempString.c_str());
-      if (templateFile.empty())
-         templateFile = "obt_config_short_template.kwl";
-      m_templateModeActive = true;
-      writeTemplate(templateFile, false);
-      return true;
-   }
-   
-   while ( ap.read("-a", stringParam) || ap.read("--accept-test", stringParam) )
-   {
-      if ( tempString.size() )
-      {
-         m_allIsDisabled = true;
-         ossimString os = tempString;
-         ossimString separatorList = " ";
-         std::vector<ossimString> result;
-         os.split(result, separatorList);
-         std::vector<ossimString>::const_iterator i = result.begin();
-         while ( i != result.end() )
-         {
-            m_acceptTestList.push_back((*i));
-            ++i;
-         }
-      }
-   }
-
-   while ( ap.read("-c", stringParam) || ap.read("--clean-test", stringParam) )
-   {
-      if ( tempString.size() )
-      {
-         m_allIsDisabled = true;
-         ossimString os = tempString;
-         ossimString separatorList = " ";
-         std::vector<ossimString> result;
-         os.split(result, separatorList);
-         std::vector<ossimString>::const_iterator i = result.begin();
-         while ( i != result.end() )
-         {
-            m_cleanTestList.push_back((*i));
-            ++i;
-         }
-      }
-   }
-
-   while ( ap.read("-p", stringParam) || ap.read("--preprocess-test", stringParam) )
-   {
-      if ( tempString.size() )
-      {
-         m_allIsDisabled = true;
-         ossimString os = tempString;
-         ossimString separatorList = " ";
-         std::vector<ossimString> result;
-         os.split(result, separatorList);
-         std::vector<ossimString>::const_iterator i = result.begin();
-         while ( i != result.end() )
-         {
-            m_preprocessTestList.push_back((*i));
-            ++i;
-         }
-      }
-   }
-
-   while ( ap.read("-r", stringParam) || ap.read("--run-test", stringParam) )
-   {
-      if ( tempString.size() )
-      {
-         m_allIsDisabled = true;
-         ossimString os = tempString;
-         ossimString separatorList = " ";
-         std::vector<ossimString> result;
-         os.split(result, separatorList);
-         std::vector<ossimString>::const_iterator i = result.begin();
-         while ( i != result.end() )
-         {
-            m_runTestList.push_back((*i));
-            ++i;
-         }
-      }
-   }
-
-   // End of arg parsing.
-   ap.reportRemainingOptionsAsUnrecognized();
-   if ( ap.errors() )
-   {
-      ap.writeErrorMessages(ossimNotify(ossimNotifyLevel_NOTICE));
-      return false;
-   }
-
-   if (ap.argc() > 1 )
-   {
-      m_configFileName = ap.argv()[1];
-   }
-   else
-   {
-      usage(ap);
-
-      // continue_after_init to false
-      return false;
-   }
-
-   // Special command line case: When only a config filename is provided, this implies "run all 
-   // tests".
-   if (m_cleanTestList.empty()  && m_preprocessTestList.empty() &&
-       m_acceptTestList.empty() && m_runTestList.empty() && m_configFileName.size())
-   {
-      m_runTestList.push_back("all");
-   }
-
-   return true;
-}
-
-//**************************************************************************************************
-// Writes a template (either long form or short) to the file name specified.
-//**************************************************************************************************
-void ossimBatchTest::writeTemplate(const ossimFilename& templateFile, bool write_long_form)
-{
-   if (templateFile.exists())
-   {
-      ossimString del_cmd ("$(RM_CMD) ");
-      del_cmd += templateFile;
-      del_cmd = del_cmd.expandEnvironmentVariable();
-      if (system(del_cmd.chars()) != 0)
-      {
-         cerr << "ERROR: Could not delete existing template file before writing new template."
-            " Please delete the existing and rerun the command."<< endl;
-         return;
-      }
-   }
-
-   std::ofstream out(templateFile.c_str());
-   if ( !out.good() )
-   {
-      ossimNotify(ossimNotifyLevel_NOTICE)
-         << "Could not open: " << templateFile.c_str() << std::endl;
-      return;
-   }
-
-   if (write_long_form)
-   {
-      out<< "//===================================================================================\n"
-         << "// \n"
-         << "// File: " << templateFile.c_str() << "\n"
-         << "// Generated by command: ossim-batch-test -W " << templateFile.c_str() << "\n"
-         << "// Description: ossim-batch-test template config file.\n"
-         << "// \n"
-         << "// Control flags:\n"
-         << "// Use 1 or true, 0 or false to turn on and off sections.\n"
-         << "// Typically preprocess and expected results only turned on for first run.\n"
-         << "// Clean commands should erase anything created by this test.\n"
-         << "// Command order if flag turned on:\n"
-         << "// 1) clean, 2) pre-process, 3) expected, 4) test, 5) post-process\n"
-         << "// \n"
-         << "// NOTES:\n"
-         << "// * The following environment variables must be set before running batch test:\n"
-         << "//     OSSIM_BATCH_TEST_DATA     Top-level dir containing all test source data\n"
-         << "//     OSSIM_BATCH_TEST_RESULTS  Top-level dir containing all test results (exp, \n"
-         << "//                               out and log),\n"
-         << "// \n"
-         << "// * The variables OBT_EXP_DIR and OBT_OUT_DIR are assigned during run-time to\n"
-         << "//   the proper paths according to the config filename. It isn't required to replace\n"
-         << "//   these nor predefine them in the environment. You can leave them as is or modify\n"
-         << "//   the paths to your unconventional file paths.\n"
-         << "// \n"
-         << "// * In order to preserve platform independence, please utilize the following \n"
-         << "//   variables for the common OS commands when adding new commands to the test\n"
-         << "//   configuration KWL file. Examples are provided in this template\n"
-         << "//       $(DIFF_CMD) Use this var for windows \"fc\" or linux \"diff\"\n"
-         << "//       $(COPY_CMD) Use this var for windows \"copy\" or linux \"cp\"\n"
-         << "//       $(MKDIR_CMD) Use this var for windows \"mkdir\" or linux \"mkdir\"\n"
-         << "//       $(RM_CMD) Use this var for windows \"del /Q\" or linux \"rm -f\"\n"
-         << "//       $(RMDIR_CMD) Use this var for windows \"rmdir /S /Q\" or linux \"rm -rf\"\n"
-         << "//   This application will set the environment variables to the proper values at \n"
-         << "//   runtime, so no need to worry about defining these.\n"
-         << "// \n"
-         << "// * Use forward slashes \"//\", at beginning of line for comments.\n"
-         << "// \n"
-         << "// * You can use existing environment variables as $(YOUR_VARIABLE). They will be \n"
-         << "//   expanded at run time if valid.\n"
-         << "// \n"
-         << "// * Clean, preprocess, run, and accept test sections can be switched on or off\n"
-         << "//   at run time.  These override config file flags.  Optional arguments are the \n"
-         << "//   the following: \n"
-         << "//      -c or --clean-test \n"
-         << "//      -p or --preprocess-test\n"
-         << "//      -r or --run-test \n"
-         << "//      -a or --accept-test \n"
-         << "//   Multiple tests can be entered by quoting string of space-separated\n"
-         << "//   test names, e.g. \"test1 test2\". To do all tests use \"all\" or leave blank.\n"
-         << "// \n"
-         << "//===================================================================================\n"
-         << "\n"
-         << "// If the config file will contain only a list of subordinate config files to be\n"
-         << "// run as one consolidated \"super-test\", then use only the following suffixed\n"
-         << "// keywords. Otherwise, REMOVE THESE:\n"
-         << "test_config_file1: <my_first_test_config.kwl>\n"
-         << "test_config_file2: <my_second_test_config.kwl>\n"
-         << "// ... etc.\n"
-         << "\n"
-         << "// The remaining keywords are used exclusive of \"test_config_fileX\" above. The\n"
-         << "// config files must be either a list of subordinate configs, or a concrete, \n"
-         << "// low-level config file.\n"
-         << "\n"
-         << "// Where you want the top-level (inter-test) log files to go:\n"
-         << "log_directory: $(OBT_OUT_DIR)\\..\\log\n"
-         << "\n"
-         << "//===================================================================================\n"
-         << "// Begin Test 1\n"
-         << "// NOTE: If the config file contains just a single test, then the use of the \"test1\"\n"
-         << "// prefix is optional. Make sure the results directory spec reflects the proper path.\n"
-         << "\n"
-         << "test1.name: <YOUR_TEST_NAME>\n"
-         << "test1.description: Test height for the center of the image for test2 and test3.\n"
-         << "\n"
-         << "// Controls/turns on/off whole test (all sections):\n"
-         << "test1.enabled: 1\n"
-         << "\n"
-         << "// Individual control flags:\n"
-         << "test1.run_clean_commands: 0\n"
-         << "test1.run_preprocessing_commands: 0\n"
-         << "test1.run_expected_results_commands: 0\n"
-         << "test1.run_test_commands: 1\n"
-         << "test1.run_postprocessing_commands: 1\n"
-         << "\n"
-         << "// Temp file to catch diff output.\n"
-         << "test1.temp_file: $(TEMP)\\tmp.txt\n"
-         << "\n"
-         << "// Clean up commands\n"
-         << "test1.clean_command1: $(RMDIR_CMD) $(OBT_OUT_DIR)\n"
-         << "\n"
-         << "// Pre-process commands\n"
-         << "test1.preprocess_command1: $(MKDIR_CMD) $(OBT_OUT_DIR)\n"
-         << "test1.preprocess_command1: $(MKDIR_CMD) $(OBT_OUT_DIR)\\..\\log\n"
-         << "\n"
-         << "//---------------------------------------\n"
-         << "// Commands to generate expected results\n"
-         << "//---------------------------------------\n"
-         << "// Since test2 and test3 are dependent on elevation test the center of the image.\n"
-         << "test1.expected_results_command0: ossim-info --height -42.8508 147.2537 > $(OBT_EXP_DIR)\\height.txt\n"
-         << "test1.expected_results_command1: $(COPY_CMD) $(OBT_OUT_DIR)\\height.txt $(OBT_EXP_DIR)\\height.txt\n"
-         << "\n"
-         << "//---------------------------------------\n"
-         << "// The actual commands to test\n"
-         << "//---------------------------------------\n"
-         << "test1.test_command0: ossim-info --height -42.8508 147.2537 > $(OBT_OUT_DIR)\\height.txt\n"
-         << "\n"
-         << "//-------------------------------------------\n"
-         << "// Post process commands for diffs, etc.\n"
-         << "//-------------------------------------------\n"
-         << "test1.postprocess_command0: $(DIFF_CMD) $(OBT_EXP_DIR)\\height.txt $(OBT_OUT_DIR)\\height.txt\n"
-         << " \n"
-         << "\n"
-         << "// End <TEST_NAME>\n"
-         << "//===================================================================================\n"
-         << "// Begin <TEST2_NAME>...\n"
-         << "\n"
-         << "// You can specify additional tests by copying the test1 keywords and changing the\n"
-         << "// prefix indices to be unique. It is not necessary to be consecutive.\n"
-         << "\n"
-         << std::endl;
-   }
-   else 
-   {
-      out<< "//===================================================================================\n"
-         << "// \n"
-         << "// File: " << templateFile.c_str() << "\n"
-         << "// Generated by command: ossim-batch-test -w " << templateFile.c_str() << "\n"
-         << "// Description: ossim-batch-test template config file.\n"
-         << "// \n"
-         << "// NOTES:\n"
-         << "// * The following environment variables must be set before running batch test:\n"
-         << "//     OSSIM_BATCH_TEST_DATA     Top-level dir containing all test source data\n"
-         << "//     OSSIM_BATCH_TEST_RESULTS  Top-level dir containing all test results (exp, \n"
-         << "//                               out and log),\n"
-         << "// \n"
-         << "// * You can use existing environment variables as $(YOUR_VARIABLE). They will be \n"
-         << "//   expanded at run time if valid.\n"
-         << "// \n"
-         << "// * If the config file contains more than a single test, then it will be necessary \n" 
-         << "//   to prefix all test-specific keywords with \"testN.\"\n"
-         << "// \n"
-         << "// * The variables OBT_EXP_DIR and OBT_OUT_DIR are assigned during runtime to\n"
-         << "//   the proper paths according to the config filename. It isn't required to replace\n"
-         << "//   these nor predefine them in the environment. You can leave them as is or modify\n"
-         << "//   the paths to your unconventional file paths.\n"
-         << "// \n"
-         << "//===================================================================================\n"
-         << "\n"
-         << "description: Test height for the center of the image for test2 and test3.\n"
-         << "\n"
-         << "//---------------------------------------\n"
-         << "// Commands to generate expected results.\n"
-         << "//---------------------------------------\n"
-         << "expected_results_command0: ossim-info --height -42.8508 147.2537 > $(OBT_OUT_DIR)\\height.txt\n"
-         << "expected_results_command1: $(COPY_CMD) $(OBT_OUT_DIR)\\height.txt $(OBT_EXP_DIR)\\height.txt\n"
-         << "\n"
-         << "//---------------------------------------\n"
-         << "// The actual commands to test.\n"
-         << "//---------------------------------------\n"
-         << "test_command0: ossim-info --height -42.8508 147.2537 > $(OBT_OUT_DIR)\\height.txt\n"
-         << "\n"
-         << "//---------------------------------------\n"
-         << "// The post-processing (comparison) commands. Typically these involve a file \n"
-         << "// comparison of last run command against expected results.\n"
-         << "//---------------------------------------\n"
-         << "postprocess_command0: $(DIFF_CMD) $(OBT_EXP_DIR)\\height.txt $(OBT_OUT_DIR)\\height.txt\n"
-         << std::endl;
-   }
-
-   out.close();
-   ossimNotify(ossimNotifyLevel_NOTICE) << "Wrote file: " << templateFile.c_str() << std::endl;
-
-}
-
-//**************************************************************************************************
-// Processes a test config file
-//**************************************************************************************************
-ossim_uint8 ossimBatchTest::execute()
-{
-   if (m_templateModeActive)
-      return (ossim_uint8) TEST_PASSED;
-
-   // Establish the top-level test directory that will contain log, exp and out subdirs:
-   ossimFilename base_output_dir = ossimEnvironmentUtility::instance()->getEnvironmentVariable(
-         ossimString("OSSIM_BATCH_TEST_RESULTS") );
-   if (base_output_dir.empty())
-   {
-      cout<<"\nossimBatchTest WARNING: The environment variable OSSIM_BATCH_TEST_RESULTS is not "
-         "defined. Results will be written relative to the current working directory."<<endl;
-   }
-   base_output_dir = base_output_dir.expand().dirCat(m_configFileName.fileNoExtension());
-   
-   // The following env vars permits the user to specify the test directory as a variable in the KWL
-   // config file:
-   m_outDir = base_output_dir.dirCat("out");
-   m_expDir = base_output_dir.dirCat("exp");
-#if defined(WIN32) || defined(_MSC_VER) && !defined(__CYGWIN__) && !defined(__MWERKS__)
-   ossimString env_spec = ossimString("OBT_OUT_DIR=") + m_outDir;
-   _putenv(env_spec.chars());
-   env_spec = ossimString("OBT_EXP_DIR=") + m_expDir;
-   _putenv(env_spec.chars());
-#else
-   setenv("OBT_OUT_DIR", m_outDir.chars(), 1);
-   setenv("OBT_EXP_DIR", m_expDir.chars(), 1);
-#endif
-
-   // Turn expansion of for like: $(OBT_TEST_RESULTS)
-   ossimKeywordlist kwl;
-   kwl.setExpandEnvVarsFlag(true);
-   if (!kwl.addFile(m_configFileName))
-      return (ossim_uint8) TEST_ERROR;
-
-   // The KWL may contain names of other test config files. Is this a list of config files? If the
-   // status returns anything other than TBD, then a list was present and processed:
-   ossim_uint8 status = processConfigList(kwl);
-   if (status != TEST_TBD)
-      return status;
-
-   if ( m_allIsDisabled )
-      disableAllKwl(kwl);
-
-   // Pick up individual test options passed in by user.  These will adjust the keyword list
-   // flags loaded in memory.
-   if ( m_cleanTestList.size() ) // Do this first always...
-   {
-      std::string testCommand = "run_clean_commands";
-      preprocessKwl(m_cleanTestList, testCommand, kwl);
-   }
-
-   if ( m_preprocessTestList.size() )
-   {
-      std::string testCommand = "run_preprocessing_commands";
-      preprocessKwl(m_preprocessTestList, testCommand, kwl);
-   }
-
-   if ( m_acceptTestList.size() )
-   {
-      std::string testCommand = "run_expected_results_commands";
-      preprocessKwl(m_acceptTestList, testCommand, kwl);
-   }
-
-   if ( m_runTestList.size() ) // Do this last always...
-   {
-      std::string testCommand = "run_test_commands";
-      preprocessKwl(m_runTestList, testCommand, kwl);
-   }
-
-   ossimFilename logDir = base_output_dir.dirCat("log");
-   const char* lookup = kwl.find("log_directory");
-   if ( lookup )
-   {
-      logDir = convertToNative( lookup ).c_str();
-   }
-
-   if ( logDir.exists() == false ) 
-   {
-      if ( logDir.createDirectory() == false )
-      {
-         cerr << "Could not create: " << logDir << endl;
-         return (ossim_uint8) TEST_ERROR;
-      }
-   }
-
-   // Establish path to and active stream for the log file:
-   ossimFilename logFile;
-   getLogFilename(logFile);
-   logFile = logDir.dirCat(logFile);
-   ossimSetLogFilename(logFile);
-   m_logStr.open(logFile.c_str());
-   if ( m_logStr.fail() )
-   {
-      cerr << "Could not open: " << logFile << endl;
-      return (ossim_uint8) TEST_ERROR;
-   }
-   else
-   {
-      cout << "Logging to file: " << logFile << "\n";
-   }
-
-   ossimString date;
-   getDateString(date);
-   m_logStr << "// ---\n"
-      << "// ossim-batch-test log:\n"
-      << "// date format = yyyymmddhhmmss\n"
-      << "//---\n"
-      << "start_time: " << date << "\n"
-      << "config_file: " << m_configFileName<< "\n";
-   // Start the timer.
-   ossimTimer::instance()->setStartTick();
-
-   double startTime = ossimTimer::instance()->time_s();
-
-   // Get the number of test:
-   ossimString regExpStr = "test[0-9]+\\.";
-   ossim_uint32 num_tests = kwl.getNumberOfSubstringKeys(regExpStr);
-   const ossim_uint32 MAX_INDEX = num_tests + 1000;
-   ossimString prefixBase = "test";
-   ossim_uint32 index = 0;
-   ossim_uint32 processedIndexes = 0;
-   ossimString prefix;
-
-   // If no test prefix is used, this implies a single test:
-   bool is_single_test = (num_tests == 0);
-   if (is_single_test)
-   {
-      num_tests = 1;
-      prefix = "";
-   }
-   
-   ossim_uint8 overall_test_status = (ossim_uint8) TEST_TBD;
-   while ( processedIndexes < num_tests )
-   {
-      if (!is_single_test)
-         prefix = prefixBase + ossimString::toString(index) + ".";
-
-      ossim_uint8 individual_test_status = processTest( prefix, kwl);
-      if ( individual_test_status != (ossim_uint8) TEST_TBD)
-         ++processedIndexes;
-
-      overall_test_status |= individual_test_status;
-      ++index;
-      if ( index >= MAX_INDEX ) 
-         break; 
-   }
-
-   getDateString(date);
-   m_logStr << "\nstop_time: " << date << "\n";
-   double stopTime = ossimTimer::instance()->time_s();
-   m_logStr << "total elapsed time in seconds: "
-      << std::setiosflags(ios::fixed) << std::setprecision(4)
-      << (stopTime-startTime)
-      << endl; // flush
-   m_logStr.close();
-
-   cout << "Wrote: " << logFile << endl;
-   return overall_test_status;
-}
-
-//************************************************************************************************
-// Special handler for KWL containing list of test config files.
-//************************************************************************************************
-ossim_uint8 ossimBatchTest::processConfigList(const ossimKeywordlist& kwl)
-{
-   ossim_uint8 overall_test_status = (ossim_uint8) TEST_TBD;
-   ossimFilename config_list_path = m_configFileName.path();
-
-   // Look for keywords for config file name:
-   ossimString prefixBase = "test_config_file";
-   ossimString regExpStr = prefixBase + "[0-9]+";
-   const ossim_uint32 count = kwl.getNumberOfSubstringKeys(regExpStr);
-   const ossim_uint32 MAX_INDEX = count + 100;
-   if (count != 0)
-   {
-      // This is indeed a list of config files:
-      ossim_uint32 index = 0;
-      ossim_uint32 processedIndexes = 0;
-      while (processedIndexes < count)
-      {
-         // Looping over each config file listed, performing an execute() on each:
-         ossimString kw = prefixBase + ossimString::toString(index);
-         m_configFileName = ossimFilename(kwl.find(kw.chars()));
-         
-         if (!m_configFileName.empty())
-         {
-            // Expand any environment variable:
-            if (m_configFileName.contains("$("))
-               m_configFileName = m_configFileName.expand();
-
-            // Handle paths relative to the master config list file:
-            if (m_configFileName.path().empty())
-               m_configFileName = m_configFileName.setPath(config_list_path);
-         }
-
-         // Execute this config file:
-         if (m_configFileName.isReadable())
-         {
-            overall_test_status |= execute();
-            ++processedIndexes;
-         }
-
-         ++index;
-         
-         if ( index >= MAX_INDEX )
-         {
-            break;  // Config file has bad numbering...
-         }
-      }
-   }
-
-   return overall_test_status;
-}
-
-//************************************************************************************************
-//! Fetches string from OS for naming and tagging the log file.
-//************************************************************************************************
-void ossimBatchTest::getDateString(ossimString& date)
-{
-   time_t t;
-   time(&t);
-   tm* lt;
-   lt = localtime(&t);
-   std::string frmt = "%Y%m%d%H%M%S";
-   // yyyymmddhhmmss
-   char s[15];
-   size_t count = strftime(s, 15, frmt.c_str(), lt);
-   if ( count && (count < 15) )
-      date = s;
-   else
-      date.clear();
-
-}
-
-//**************************************************************************************************
-//! Establishes name of output log file.
-//**************************************************************************************************
-void ossimBatchTest::getLogFilename(ossimFilename& logFile)
-{
-   logFile = "obt-log-";
-   ossimString date;
-   getDateString(date);
-   logFile += date;
-   logFile += ".txt";
-}
-
-//**************************************************************************************************
-//! Within a single config file can be multiple tests, distinguished by the "test*." prefix. This
-//! method manages the execution of a single test.
-//**************************************************************************************************
-ossim_uint8 ossimBatchTest::processTest(const ossimString& prefix, const ossimKeywordlist& kwl)
-{
-   ossim_uint8 testStatus = TEST_TBD;
-
-   // Determine first if this test prefix is represented in the KWL:
-   if (kwl.getNumberOfSubstringKeys(prefix) == 0)
-      return testStatus;
-
-   ossimString testName;
-   const char* lookup = kwl.find( prefix, "name" );
-   if ( lookup )
-   {
-      testName = lookup;
-   }
-   if (testName.empty())
-   {
-      if (prefix.empty())
-         testName = m_configFileName.fileNoExtension();
-      else
-         testName = prefix.trim(".");
-   }
-
-   m_logStr << "\n----------------------------------------------------------------------\n";
-
-   // See if test is disabled/enabled:
-   bool enabled = true;
-   lookup = kwl.find( prefix, "enabled" );
-   if ( lookup )
-      enabled = ossimString(lookup).toBool();
-
-   if ( !enabled )
-   {
-      testStatus = TEST_DISABLED;
-      ossimString statusString;
-      if ( prefix.size() )
-      {
-         statusString = prefix.trim(ossimString(".")) + ossimString(": disabled");
-      }
-      else
-      {
-         statusString = "test: disabled";
-      }
-      cout << "test name: " << testName << "\n" << statusString << endl;
-      m_logStr << "test name: " << testName << "\n" << statusString << endl;
-      return testStatus;
-   }
-
-   cout << "\n\nProcessing Test: " << testName << "\n";
-   m_logStr << "\n\nProcessing Test: " << testName << "\n";   
-   lookup = kwl.find( prefix, "description" );
-   if ( lookup )
-      m_logStr << "description: " << lookup << "\n";
-
-   bool preProcessFlag  = false;
-   bool expectedFlag    = false;
-   bool testFlag        = false;
-   bool postProcessFlag = false;
-   bool cleanFlag       = false;
-   std::string date; 
-
-   lookup = kwl.find(prefix.c_str(), "run_clean_commands");
-   if ( lookup )
-      cleanFlag = ossimString(lookup).toBool();
-
-   lookup = kwl.find(prefix.c_str(), "run_preprocessing_commands");
-   if ( lookup )
-      preProcessFlag = ossimString(lookup).toBool();
-
-   lookup = kwl.find(prefix.c_str(), "run_expected_results_commands");
-   if ( lookup )
-      expectedFlag = ossimString(lookup).toBool();
-
-   lookup = kwl.find(prefix.c_str(), "run_test_commands");
-   if ( lookup )
-      testFlag = ossimString(lookup).toBool();
-
-   lookup = kwl.find(prefix.c_str(), "run_postprocessing_commands");
-   if ( lookup )
-      postProcessFlag = ossimString(lookup).toBool();
-
-   m_logStr << "preProcessFlag:  " << preProcessFlag
-      << "\nexpectedFlag:    " <<expectedFlag
-      << "\ntestFlag:        " <<testFlag
-      << "\npostProcessFlag: " <<postProcessFlag
-      << "\ncleanFlag:       " <<cleanFlag
-      << "\n";
-
-   // Run the clean first if set...
-   if ( cleanFlag )
-   {
-      ossimString prefixBase = prefix + "clean_command";
-      testStatus |= processCommands( prefixBase, kwl, testName, false );
-   }
-
-   if ( preProcessFlag && !(testStatus & TEST_ERROR))
-   {
-      ossimString prefixBase = prefix + "preprocess_command";
-      testStatus |= processCommands( prefixBase, kwl, testName, false );
-   }
-   if ( expectedFlag  && !(testStatus & TEST_ERROR))
-   {
-      ossimString prefixBase = prefix + "expected_results_command";
-      testStatus |= processCommands( prefixBase, kwl, testName, true );
-   }
-   if ( testFlag  && !(testStatus & TEST_ERROR))
-   {
-      ossimString prefixBase = prefix + "test_command";
-      testStatus |= processCommands( prefixBase, kwl, testName, true );
-   }
-   if ( postProcessFlag  && !(testStatus & TEST_ERROR))
-   {
-      ossimFilename tempFile;
-
-      if ( getTempFileName( prefix, kwl, tempFile ) )
-      {
-         ossimString prefixBase = prefix + "postprocess_command";
-         testStatus |= processCommands( prefixBase, kwl, testName, false, tempFile );
-      }
-      else
-      {
-         m_logStr << testName << ": ERROR temp file could not be derived..." << endl;
-         testStatus |= TEST_ERROR; // Set an error bit...
-      }
-   }
-
-   m_logStr << "end_test: " << testName << "\n";
-
-   m_logStr << "----------------------------------------------------------------------\n"; 
-   return testStatus; 
-}
-
-//**************************************************************************************************
-ossim_uint8 ossimBatchTest::processCommands(const ossimString& prefixBase,
-                                            const ossimKeywordlist& kwl,
-                                            const ossimString& testName,
-                                            bool logTime,
-                                            const ossimFilename& tempFileName)
-{
-   ossim_uint8 result = TEST_TBD;
-
-   //---
-   // We must do these in order so we will use the
-   // ossimKeywordlist::getNumberOfSubstringKeys
-   // instead of: ossimKeywordlist::getSubstringKeyList
-   //
-   // MAX_INDEX is just so people can skip numbers in their config file like:
-   // test1.command
-   // test3.command oops...
-   //---
-   ossimString regExpStr = prefixBase + "[0-9]+";
-   const ossim_uint32 num_commands = kwl.getNumberOfSubstringKeys(regExpStr);
-   const ossim_uint32 MAX_INDEX = num_commands + 1000;
-
-   // Hack to permit defaulted results paths and default clean operation:
-   if (num_commands == 0)
-   {
-      bool rtn_ok = true;
-      if (prefixBase.contains("preprocess"))
-         rtn_ok = makeDefaultResultsDir();
-      if (prefixBase.contains("clean"))
-         rtn_ok = doDefaultClean();
-      if (rtn_ok)
-         result = TEST_PASSED;
-      else
-         result = TEST_ERROR;
-      return result;
-   }
-
-   ossimString date;
-   double startTime;
-   double stopTime;
-   
-   ossimString command;
-   ossim_uint32 index = 0;
-   ossim_uint32 processedIndexes = 0;
-   const char* lookup = 0;
-   
-   bool postprocessing = false;
-   if (prefixBase.contains("postprocess"))
-      postprocessing = true;
-
-   while (  processedIndexes < num_commands )
-   {
-      ossimString cmd_kw =  prefixBase + ossimString::toString(index);
-      lookup = kwl.find( cmd_kw );
-      if ( lookup )
-      {
-         ossimString command_line = convertToNative( lookup ).c_str();
-         if ( tempFileName.size() )
-         {
-            command_line += " > " + tempFileName;
-         }
-
-         m_logStr << "executing command: " << command_line << "\n";
-
-         if ( logTime )
-         {
-            getDateString(date);
-            m_logStr << "begin: " << date << "\n";
-
-            // Start the clock:
-            startTime = ossimTimer::instance()->time_s();
-         }
-            
-         // Launch the command:
-         int status = system(command_line.chars());
-         if (status == 0)
-            result |= TEST_PASSED;
-         else if (postprocessing)
-            result |= TEST_FAILED;
-         else
-            result |= TEST_ERROR;
-
-         if ( logTime )
-         {
-            // Log the time and status:
-            stopTime = ossimTimer::instance()->time_s();
-            getDateString(date);
-            m_logStr << "end: " << date << "\n"
-                   << testName << "[" << index << "]: elapsed time in seconds: "
-                   << std::setiosflags(ios::fixed)
-                   << std::setprecision(4)
-                   << (stopTime-startTime) << "\n";
-         }
-         
-         m_logStr << "return status: " << status << "\n";
-         
-         // Output the status.
-         // If failed write the temp file to the log.  This should have the diffs in it.
-         ostringstream statusString;
-         if ( prefixBase.size() )
-         {
-            statusString << prefixBase;
-         }
-         else
-         {
-            statusString << "test";
-         }
-         statusString << "[" << index << "]: ";
-
-         if ( status != 0 )
-         {
-            // A bad return status can be a test fail if the command was a postprocess:
-            if ( postprocessing )
-            {
-               statusString << "FAILED";
-            }
-            else
-            {
-               statusString << "ERROR";
-            }
-
-            cout << statusString.str() << endl;
-            m_logStr << statusString.str() << endl;
-            m_logStr << command << "\noutput follows:\n";
-            std::ifstream in;
-            if (!tempFileName.empty())
-            {
-               in.open(tempFileName.c_str(), ios::in | ios::binary);
-               if ( in.is_open() )
-               {
-                  char ch;
-                  while ( in.get(ch) ) m_logStr.put(ch);
-                  m_logStr << "\n";
-                  in.close();
-               }
-            }
-         }
-         else
-         {
-            statusString << "PASSED";
-            cout << statusString.str() << endl;
-            m_logStr << statusString.str() << endl;
-         }
-
-         ++processedIndexes;
-      }
-      ++index;
-      
-      if ( index >= MAX_INDEX ) 
-         break; // Config file has bad numbering...
-   }
-   return result;
-}
-
-//**************************************************************************************************
-void ossimBatchTest::preprocessKwl(const std::vector<std::string>& testList,
-                                   const std::string& testCommand,
-                                   ossimKeywordlist& kwl)
-{
-   if ( testList.empty() || testCommand.empty() || (kwl.getSize()==0) )
-      return;
-
-   // Check for user passed in "all" to option.
-   std::vector<std::string>::const_iterator testIter = testList.begin();
-   bool enableAllTestFlag = false;
-   ossimString firstTest(*testIter);
-   firstTest.downcase();
-   if ( firstTest == "all" )
-      enableAllTestFlag = true;
-
-   while ( testIter != testList.end() )
-   {
-      // Get the number of test:
-      ossimString regExpStr = "test[0-9]+\\.";
-      ossim_uint32 num_tests = kwl.getNumberOfSubstringKeys(regExpStr);
-      const ossim_uint32 MAX_INDEX = num_tests + 1000;
-      ossimString prefixBase = "test";
-      ossim_uint32 index = 0;
-      ossim_uint32 processedIndexes = 0;
-
-      // A count of 0 may indicate that the config file consists of a single, unprefixed test spec:
-      bool is_single_test = false;
-      if (num_tests == 0)
-      {
-         regExpStr = "test_command[0-9]+";
-         const ossim_uint32 cmd_count = kwl.getNumberOfSubstringKeys(regExpStr);
-         if (cmd_count != 0)
-         {
-            ++num_tests;
-            is_single_test = true;
-         }
-         else
-            break; // Nothing to do here:
-      }
-
-      while ( processedIndexes < num_tests )
-      {
-         ossimString prefix ("");
-         bool test_name_matches = true;
-         bool test_exists = true;
-         
-         if (!is_single_test)
-         {
-            // The tests are prefixed with "test*". Assign the prefix for this test set:
-            prefix = prefixBase + ossimString::toString(index);
-            test_name_matches = (prefix == (*testIter).c_str());
-            prefix += ".";
-            
-            // With a valid prefix, check if this test even exists before doing any more 
-            // preprocessing:
-            regExpStr = prefix + "test_command[0-9]+";
-            const ossim_uint32 cmd_count = kwl.getNumberOfSubstringKeys(regExpStr);
-            test_exists = cmd_count > 0;
-         }
-
-         if ( test_exists )
-         {
-            if ( test_name_matches || enableAllTestFlag )
-            {
-               kwl.add(prefix.c_str(), "enabled", "1", true);
-               kwl.add(prefix.c_str(), testCommand.c_str(), "1", true);
-               if ( testCommand == "run_expected_results_commands" )
-               {
-                  // Need pre-processing if clean performed.
-                  kwl.add(prefix.c_str(), "run_preprocessing_commands", "1", true);
-               }
-               if ( testCommand == "run_test_commands" )
-               {
-                  // Need pre/post-processing:
-                  kwl.add(prefix.c_str(), "run_preprocessing_commands", "1", true);
-                  kwl.add(prefix.c_str(), "run_postprocessing_commands", "1", true);
-               }
-            }
-            ++processedIndexes;
-         }
-         ++index;
-         if ( index >= MAX_INDEX ) break; 
-      }
-      ++testIter;
-
-   } // End: while ( testIter != testList.end() )
-   
-} // End: preprocessKwl method
-
-//**************************************************************************************************
-void ossimBatchTest::disableAllKwl(ossimKeywordlist& kwl)
-{
-   if ( kwl.getSize() )
-   {
-      // Get the number of test:
-      ossimString regExpStr = "test[0-9]+\\.";
-      const ossim_uint32 COUNT = kwl.getNumberOfSubstringKeys(regExpStr);
-      const ossim_uint32 MAX_INDEX = COUNT + 1000;
-      ossimString prefixBase = "test";
-      ossim_uint32 index = 0;
-      ossim_uint32 processedIndexes = 0;
-      
-      while ( processedIndexes < COUNT )
-      {
-         ossimString prefix =  prefixBase + ossimString::toString(index) + ".";
-         const char* lookup = kwl.find( prefix, "name" );
-         if (lookup)
-         {
-            kwl.add(prefix.c_str(), "enabled", "0", true);
-            kwl.add(prefix.c_str(), "run_clean_commands", "0", true);
-            kwl.add(prefix.c_str(), "run_expected_results_commands", "0", true);
-            kwl.add(prefix.c_str(), "run_test_commands", "0", true);
-            kwl.add(prefix.c_str(), "run_postprocessing_commands", "0", true);
-            ++processedIndexes;
-         }
-         ++index;
-         if ( index >= MAX_INDEX ) break; 
-      }
-   }
-   
-} // End: disableAllKwl(ossimKeywordlist& kwl)
-
-
-//**************************************************************************************************
-//! Default preprocessing step makes expected and output results directories. Returns TRUE if
-//! successful.
-//**************************************************************************************************
-bool ossimBatchTest::makeDefaultResultsDir()
-{
-   if ( !m_outDir.exists() && !m_outDir.createDirectory() )
-   {
-      cerr << "Could not create: " << m_outDir << endl;
-      return false;
-   }
-   if ( !m_expDir.exists() &&  !m_expDir.createDirectory() )
-   {
-      cerr << "Could not create: " << m_expDir << endl;
-      return false;
-   }
-   return true;
-}
-
-//**************************************************************************************************
-//! Default clean step deletes all files in out and exp dirs. Returns TRUE if successful.
-//**************************************************************************************************
-bool ossimBatchTest::doDefaultClean()
-{
-   bool result = true;
-
-   ossimString del_cmd = ossimEnvironmentUtility::instance()->getEnvironmentVariable(
-      ossimString("RMDIR_CMD") );
-   ossimString command_line;
-   
-   if ( m_outDir.exists() )
-   {
-      command_line = del_cmd + " " + m_outDir;
-      m_logStr << "executing command: " << command_line << "\n";
-      if (system(command_line) != 0)
-      {
-         m_logStr << "ERROR: execution failed!\n";
-         cerr << "ERROR: Could not delete <"<<m_outDir<<">. Clean operation failed."<< endl;
-         result = false;
-      }
-   }
-   
-   ossimFilename tmpDir;
-   if ( getDefaultTempFileDir( tmpDir ) )
-   {
-      if ( tmpDir.exists() )
-      {
-         command_line = del_cmd + " " + tmpDir;
-         m_logStr << "executing command: " << command_line << "\n";
-         if (system(command_line) != 0)
-         {
-            m_logStr << "ERROR: execution failed!\n";
-            cerr << "ERROR: Could not delete <"<<m_outDir<<">. Clean operation failed."<< endl;
-            result = false;
-         }
-      }
-   }
-   
-   return result;
-}
-
-bool ossimBatchTest::getTempFileName( const ossimString& prefix,
-                                      const ossimKeywordlist& kwl,
-                                      ossimFilename& tempFile ) const
-{
-   const char* lookup = kwl.find(prefix.c_str(), "temp_file");
-   if ( lookup )
-   {
-      tempFile = ossimFilename(lookup);
-      if (tempFile.contains("$("))
-         tempFile = tempFile.expand();
-   }
-   else
-   {
-      if ( getDefaultTempFileDir( tempFile ) )
-      {
-         if ( tempFile.createDirectory( true, 0775 ) )
-         {
-            // Tack on the file name.
-            tempFile = tempFile.dirCat("tmp.txt");
-         }
-         else
-         {
-            tempFile.clear();
-         }
-      }
-   }
-   return ( tempFile.size() > 0 );
-}
-
-bool ossimBatchTest::getDefaultTempFileDir( ossimFilename& tempFile ) const
-{
-   // Create a default tmp directory under OSSIM_BATCH_TEST_RESULTS.
-   tempFile = ossimEnvironmentUtility::instance()->getEnvironmentVariable(
-      ossimString("OSSIM_BATCH_TEST_RESULTS") );
-   if (!tempFile.empty())
-      tempFile = tempFile.dirCat("tmp");
-   else
-      tempFile = ossimEnvironmentUtility::instance()->getEnvironmentVariable(ossimString("TEMP"));
-   return ( tempFile.size() > 0 );
-}
-
-void ossimBatchTest::usage(ossimArgumentParser& ap)
-{
-   ossimApplicationUsage* au = ap.getApplicationUsage();
-
-   au->setApplicationName(ap.getApplicationName());
-   au->setDescription(ap.getApplicationName()+" batch test application.");
-   
-   au->setCommandLineUsage(ap.getApplicationName()+" <test-configuration-file.kwl>\n\n"
-      "This will run all test within the configuration file.  For individual test control edit "
-      "flags of the configuration file or use individual test options below. The following status "
-      "is returned on exit:"
-      "\n   -1 if any error occurred during test"
-      "\n    1 if any test failed"
-      "\n    0 if all tests passed\n");
-
-   au->addCommandLineOption("-a or --accept-test", 
-      "<testX> Runs \"run_expected_results_commands\" portion from test configuration file for "
-      "testX where X is some test number, i.e. 1, 2, 3...  This will turn off all other test in "
-      "the test config file. Notes: Multiple tests can be entered by quoting string of space "
-      "separated test, e.g. \"test1 test2\". To accept all tests use \"all\" for test.");
-   
-   au->addCommandLineOption("-c or --clean-test", "<testX> Runs \"run_clean_commands\" portion "
-      "from test configuration file for testX where X is some test number, i.e. 1, 2, 3...  This "
-      "will turn off all other test in the test config file. Notes: Multiple tests can be entered "
-      "by quoting string of space separated test, e.g. \"test1 test2\". To clean all tests use "
-      "\"all\" for test.");
-
-   au->addCommandLineOption("-p or --preprocess-test", 
-      "<testX> Runs \"run_preprocessing_commands\" portion from test configuration file for testX "
-      "where X is some test number, i.e. 1, 2, 3...  This will turn off all other test in the test "
-      "config file. Notes: Multiple tests can be entered by quoting string of space separated "
-      "test, e.g. \"test1 test2\". To preprocess all tests use \"all\" for test.");
-   
-   au->addCommandLineOption("-r or --run-test", 
-      "<testX> Runs \"run_test_commands\" portion from test configuration file for testX where X "
-      "is some test number, i.e. 1, 2, 3...  This will turn off all other test in the test config "
-      "file. Notes: Multiple tests can be entered by quoting string of space separated test, e.g. "
-      "\"test1 test2\". To run all tests use \"all\" for test.");
-   
-   au->addCommandLineOption("-h or --help", "Display usage.");
-   
-   au->addCommandLineOption("-W or -w", 
-      "<template_name.kwl> Writes a long-form (-W) or a short-form (-w) template test "
-      "configuration file.");
-
-   // Write usage.
-   au->write(ossimNotify(ossimNotifyLevel_INFO));
-}
-
-std::string ossimBatchTest::convertToNative( const char* lookup ) const
-{
-   std::string s;
-   
-   if ( lookup )
-   {
-      s = lookup;
-      const std::string::size_type SIZE = s.size();
-      std::string::size_type i = 0;
-      
-#if defined(_WIN32)
-      //---
-      // Must not convert slashes for: "del /Q", "fc /W", and "copy /Y"
-      //---
-      while( i < SIZE )
-      {
-         if( s[i] == '/' )
-         {
-            bool replace = true;
-            if ( (i+2) < SIZE ) // Could fit a window command and space like: "/Y "
-            {
-               if ( (s[i+1] == 'Q') || (s[i+1] == 'W') || (s[i+1] == 'Y') )
-               {
-                  if ( s[i+2] == ' ' ) // Check for space after "/Q".
-                  {
-                     replace = false;
-                  }
-               }
-            }
-            if ( replace )
-            {
-               s[i] = '\\';
-            }
-         }
-         ++i;
-      }
-#else
-      while( i < SIZE )
-      {
-         if( s[i] == '\\' )
-         {
-            s[i] = '/';
-         }
-         ++i;
-      }
-#endif
-      
-   } // Matches: if ( lookup )
-   
-   return s;
-}
-
diff --git a/src/ossim/util/ossimChipperUtil.cpp b/src/ossim/util/ossimChipperUtil.cpp
deleted file mode 100644
index 03d00c1..0000000
--- a/src/ossim/util/ossimChipperUtil.cpp
+++ /dev/null
@@ -1,3861 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossimChipperUtil.cpp
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Utility class definition processing digital elevation
-// models(dems).
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimChipperUtil.cpp 22257 2013-05-01 19:21:35Z dburken $
-
-#include <ossim/util/ossimChipperUtil.h>
-
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <ossim/base/ossimConnectableObject.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimKeywordNames.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimProperty.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimScalarTypeLut.h>
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimVisitor.h>
-
-#include <ossim/imaging/ossimBumpShadeTileSource.h>
-#include <ossim/imaging/ossimFilterResampler.h>
-#include <ossim/imaging/ossimImageFileWriter.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageMosaic.h>
-#include <ossim/imaging/ossimImageRenderer.h>
-#include <ossim/imaging/ossimImageSource.h>
-#include <ossim/imaging/ossimImageSourceFilter.h>
-#include <ossim/imaging/ossimImageToPlaneNormalFilter.h>
-#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
-#include <ossim/imaging/ossimIndexToRgbLutFilter.h>
-#include <ossim/imaging/ossimScalarRemapper.h>
-#include <ossim/imaging/ossimTwoColorView.h>
-
-#include <ossim/init/ossimInit.h>
-
-#include <ossim/projection/ossimEquDistCylProjection.h>
-#include <ossim/projection/ossimImageViewAffineTransform.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/projection/ossimUtmProjection.h>
-
-#include <ossim/support_data/ossimSrcRecord.h>
-
-#include <sstream>
-#include <string>
-
-static ossimTrace traceDebug("ossimChipperUtil:debug");
-static ossimTrace traceLog("ossimChipperUtil:log");
-static ossimTrace traceOptions("ossimChipperUtil:options");
-
-static const char APPLICATION_NAME_KW[]     = "application_name";
-static const char COLOR_BLUE_KW[]           = "color_blue";
-static const char COLOR_GREEN_KW[]          = "color_green";
-static const char COLOR_RED_KW[]            = "color_red";
-static const char CUT_CENTER_LAT_KW[]       = "cut_center_latitude";
-static const char CUT_CENTER_LON_KW[]       = "cut_center_longitude";
-static const char CUT_CENTER_HEIGHT_KW[]    = "cut_center_height";  // pixels
-static const char CUT_CENTER_WIDTH_KW[]     = "cut_center_width";   // pixels
-static const char CUT_CENTER_RADIUS_KW[]    = "cut_center_radius";  // meters
-static const char CUT_MAX_LAT_KW[]          = "cut_maximum_latitude";
-static const char CUT_MAX_LON_KW[]          = "cut_maximum_longitude";
-static const char CUT_MIN_LAT_KW[]          = "cut_minimum_latitude";
-static const char CUT_MIN_LON_KW[]          = "cut_minimum_longitude";
-static const char DEM_KW[]                  = "dem";
-static const char GAIN_KW[]                 = "gain";
-static const char FILE_KW[]                 = "file";
-static const char HISTO_OP_KW[]             = "hist-op";
-static const char IMG_KW[]                  = "image";
-static const char LUT_FILE_KW[]             = "lut_file";
-static const char DEGREES_X_KW[]            = "degrees_x";
-static const char DEGREES_Y_KW[]            = "degrees_y";
-static const char METERS_KW[]               = "meters";
-static const char NORTH_UP_KW[]             = "north_up"; // bool
-static const char OP_KW[]                   = "operation";
-static const char OUTPUT_RADIOMETRY_KW[]    = "output_radiometry";
-static const char RESAMPLER_FILTER_KW[]     = "resampler_filter";
-static const char ROTATION_KW[]             = "rotation";
-static const char SCALE_2_8_BIT_KW[]        = "scale_2_8_bit";
-static const char SNAP_TIE_TO_ORIGIN_KW[]   = "snap_tie_to_origin";
-static const char SRC_FILE_KW[]             = "src_file";
-static const char SRS_KW[]                  = "srs";
-static const char THUMBNAIL_RESOLUTION_KW[] = "thumbnail_resolution"; // pixels
-static const char TRUE_KW[]                 = "true";
-static const char UP_IS_UP_KW[]             = "up_is_up"; // bool
-static const char WRITER_KW[]               = "writer";
-static const char WRITER_PROPERTY_KW[]      = "writer_property";
-
-static const char TWOCMV_OLD_INPUT_BAND_KW[]      = "2cmv_old_input_band";
-static const char TWOCMV_NEW_INPUT_BAND_KW[]      = "2cmv_new_input_band";
-static const char TWOCMV_RED_OUTPUT_SOURCE_KW[]   = "2cmv_red_output_source";
-static const char TWOCMV_GREEN_OUTPUT_SOURCE_KW[] = "2cmv_green_output_source";
-static const char TWOCMV_BLUE_OUTPUT_SOURCE_KW[]  = "2cmv_blue_output_source";
-
-ossimChipperUtil::ossimChipperUtil()
-   : ossimReferenced(),
-     m_operation(OSSIM_CHIPPER_OP_UNKNOWN),
-     m_kwl(new ossimKeywordlist()),
-     m_srcKwl(0),
-     m_geom(0),
-     m_ivt(0),
-     m_demLayer(0),
-     m_imgLayer(0)
-{
-   m_kwl->setExpandEnvVarsFlag(true);
-}
-
-ossimChipperUtil::~ossimChipperUtil()
-{
-}
-
-void ossimChipperUtil::addArguments(ossimArgumentParser& ap)
-{
-   ossimString usageString = ap.getApplicationName();
-   usageString += " [option]... [input-option]... <input-file(s)> <output-file>\nNote at least one input is required either from one of the input options, e.g. --input-dem <my-dem.hgt> or adding to command line in front of the output file in which case the code will try to ascertain what type of input it is.\n\nAvailable traces:\n-T \"ossimChipperUtil:debug\"   - General debug trace to standard out.\n-T \"ossimChipperUtil:log\"     - Writes a log file to output-file.log.\n-T \"ossimChipp [...]
-
-   ossimApplicationUsage* au = ap.getApplicationUsage();
-   
-   au->setCommandLineUsage(usageString);
-   
-   au->setDescription(ap.getApplicationName()+" Utility application for generating elevation products from dem data.");
-   
-   au->addCommandLineOption("--azimuth", "<azimuth>\nhillshade option - Light source azimuth angle for bump shade.\nRange: 0 to 360, Default = 180.0");
-
-   au->addCommandLineOption( "-b or --bands <n,n...>", "Use the specified bands in given order: e.g. \"3,2,1\" will select bands 3, 2 and 1 of the input image.\nNote: it is 1 based" );
-
-   au->addCommandLineOption("--central-meridian","<central_meridian_in_decimal_degrees>\nNote if set this will be used for the central meridian of the projection.  This can be used to lock the utm zone.");
-
-   au->addCommandLineOption("--color","<r> <g> <b>\nhillshade option - Set the red, green and blue color values to be used with hillshade.\nThis option can be used with or without an image source for color.\nRange 0 to 255, Defualt r=255, g=255, b=255");
-
-   au->addCommandLineOption("--color-table","<color-table.kwl>\nhillshade or color-relief option - Keyword list containing color table for color-relief option.");
-
-   au->addCommandLineOption("--cut-bbox-ll", "<min_lat> <min_lon> <max_lat> <max_lon>\nSpecify a bounding box with the minimum latitude/longitude and max latitude/longitude in decimal degrees.");
-   
-   au->addCommandLineOption("--cut-center-llwh","<latitude> <longitude> <width> <height>\nSpecify the center cut in latitude longitude space with width and height in pixels.");
-
-   au->addCommandLineOption("--cut-center-llr","<latitude> <longitude> <radius_in_meters>\nSpecify the center cut in latitude longitude space with radius in meters.");
-
-   au->addCommandLineOption("--degrees","<dpp_xy> | <dpp_x> <dpp_y>\nSpecifies an override for degrees per pixel. Takes either a single value applied equally to x and y directions, or two values applied correspondingly to x then y. This option takes precedence over the \"--meters\" option.");
-
-   au->addCommandLineOption("--elevation", "<elevation>\nhillshade option - Light source elevation angle for bumb shade.\nRange: 0 to 90, Default = 45.0");
-
-   au->addCommandLineOption("-e or --entry", "<entry> For multi image handlers which entry do you wish to extract. For list of entries use: \"ossim-info -i <your_image>\" ");  
-
-   au->addCommandLineOption("--exaggeration", "<factor>\nMultiplier for elevation values when computing surface normals. Has the effect of lengthening shadows for oblique lighting.\nRange: .0001 to 50000, Default = 1.0");
-   
-   au->addCommandLineOption("-h or --help", "Display this help and exit.");
-
-   au->addCommandLineOption("--histogram-op", "<operation>\nHistogram operation to perform. Valid operations are \"auto-minmax\", \"std-stretch-1\", \"std-stretch-2\" and \"std-stretch-3\".");
-
-   au->addCommandLineOption("--input-dem", "<dem> Input dem to process.");
-
-   au->addCommandLineOption("--input-img", "<image> Input image to process.");
-   
-   au->addCommandLineOption("--input-src","<file.src> Input source file list keyword list with list of dems or images or both to process.");
-   
-   au->addCommandLineOption("--meters", "<meters>\nSpecifies an override for the meters per pixel");
-
-   au->addCommandLineOption("-n or --north-up", "Rotates image North up. \"chip\" operation only.");
-   
-   au->addCommandLineOption( "--op", "<operation>\nOperation to perform. Valid operations are \"chip\", \"color-relief\", \"hillshade\", \"2cmv\"(two color multi view) and \"ortho\".\nchip = input projection = output projection(image space), single image operation only." );
-
-   au->addCommandLineOption("--options-keyword-list","<options.kwl>  This can be all or part of the application options.  To get a template you can turn on trace to the ossimChipperUtil class by adding \"-T ossimChipperUtil\" to your command.");
-
-   au->addCommandLineOption("--origin-latitude","<latidude_in_decimal_degrees>\nNote if set this will be used for the origin latitude of the projection.  Setting this to something other than 0.0 with a geographic projection creates a scaled geographic projection.");
-
-   au->addCommandLineOption("--output-radiometry", "<R>\nSpecifies the desired product's pixel radiometry type. Possible values for <R> are: U8, U11, U16, S16, F32. Note this overrides the deprecated option \"scale-to-8-bit\"."); 
-
-   au->addCommandLineOption("--projection", "<output_projection> Valid projections: geo, geo-scaled, input or utm\ngeo = Equidistant Cylindrical, origin latitude = 0.0\ngeo-scaled = Equidistant Cylindrical, origin latitude = image center\ninput Use first images projection. Must be a map projecion.\nutm = Universal Tranverse Mercator\nIf input and multiple sources the projection of the first image will be used.\nIf utm the zone will be set from the scene center of first image.\nNOTE: --sr [...]
-   
-   au->addCommandLineOption("--resample-filter","<type>\nSpecify what resampler filter to use, e.g. nearest neighbor, bilinear, cubic.\nSee ossim-info ----resampler-filters"); 
-
-   au->addCommandLineOption("-r or --rotate", "<degrees>\nRotate image by degrees. \"chip\" operation only.");
-   
-   au->addCommandLineOption("--scale-to-8-bit", "Scales the output to unsigned eight bits per band. This option has been deprecated by the newer \"--output-radiometry\" option.");
-
-   au->addCommandLineOption("--snap-tie-to-origin",
-                                "Snaps tie point to projection origin so that (tie-origin)/gsd come out on an even integer boundary.");   
-   
-   au->addCommandLineOption("--srs","<src_code>\nSpecify an output reference frame/projection. Example: --srs EPSG:4326");
-
-   au->addCommandLineOption("-t or --thumbnail", "<max_dimension>\nSpecify a thumbnail resolution.\nScale will be adjusted so the maximum dimension = argument given.");
-
-   au->addCommandLineOption("-u or --up-is-up", "Rotates image to up is up. \"chip\" operation only.");
-
-   au->addCommandLineOption("-w or --writer","<writer>\nSpecifies the output writer.  Default uses output file extension to determine writer. For valid output writer types use: \"ossim-info --writers\"\n");
-   
-   au->addCommandLineOption("--writer-prop", "<writer-property>\nPasses a name=value pair to the writer for setting it's property. Any number of these can appear on the line.");
-
-   au->addCommandLineOption("--2cmv-old-input-band", "<band>\nBand to use for two color multi view old input.\n");   
-   au->addCommandLineOption("--2cmv-new-input-band", "<band>\nBand to use for two color multi view new input.\n");
-   
-   au->addCommandLineOption("--2cmv-red-output-source", "<source>\nTwo color multi view source input for red output.  Either, old, new, or mp(min pix).  Default=old.\n");
-   
-   au->addCommandLineOption("--2cmv-green-output-source", "<source>\nTwo color multi view source input for green output.  Either, old, new, or mp(min pix).  Default=new.\n");
-   
-   au->addCommandLineOption("--2cmv-blue-output-source", "<source>\nTwo color multi view source input for blue output.  Either, old, new, or mp(min pix).  Default=new.\n");
-   
-} // End: ossimChipperUtil::addArguments
-
-bool ossimChipperUtil::initialize(ossimArgumentParser& ap)
-{
-   static const char MODULE[] = "ossimChipperUtil::initialize(ossimArgumentParser&)";
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-   
-
-   if( ap.read("-h") || ap.read("--help") || (ap.argc() == 1) )
-   {
-      usage(ap);
-      
-      return false; // Indicates process should be terminated to caller.
-   }
-
-   // Start with clean options keyword list.
-   m_kwl->clear();
-
-   ossimString tempString1;
-   ossimArgumentParser::ossimParameter stringParam1(tempString1);
-   ossimString tempString2;
-   ossimArgumentParser::ossimParameter stringParam2(tempString2);
-   ossimString tempString3;
-   ossimArgumentParser::ossimParameter stringParam3(tempString3);
-   ossimString tempString4;
-   ossimArgumentParser::ossimParameter stringParam4(tempString4);
-   double tempDouble1;
-   ossimArgumentParser::ossimParameter doubleParam1(tempDouble1);
-   double tempDouble2;
-   ossimArgumentParser::ossimParameter doubleParam2(tempDouble2);
-
-   ossim_uint32 demIdx  = 0;
-   ossim_uint32 imgIdx  = 0;
-   ossim_uint32 propIdx = 0;
-   ossimString  key     = "";
-   
-   // Extract optional arguments and stuff them in a keyword list.
-   if( ap.read("--azimuth", stringParam1) )
-   {
-      m_kwl->add( ossimKeywordNames::AZIMUTH_ANGLE_KW, tempString1.c_str() );
-   }
-
-   if (ap.read("-b", stringParam1) || ap.read("--bands", stringParam1))
-   {
-      m_kwl->add( ossimKeywordNames::BANDS_KW, tempString1.c_str() );
-   }   
-   
-   if( ap.read("--central-meridian", stringParam1) )
-   {
-      m_kwl->add( ossimKeywordNames::CENTRAL_MERIDIAN_KW, tempString1.c_str() );
-   }
-
-   if( ap.read("--color", stringParam1, stringParam2, stringParam3) )
-   {
-      m_kwl->add( COLOR_RED_KW,   tempString1.c_str() );
-      m_kwl->add( COLOR_GREEN_KW, tempString2.c_str() );
-      m_kwl->add( COLOR_BLUE_KW,  tempString3.c_str() );
-   }
-
-   if( ap.read("--color-table", stringParam1) )
-   {
-      m_kwl->add( LUT_FILE_KW, tempString1.c_str() );
-   }
-
-   if( ap.read("--cut-bbox-ll", stringParam1, stringParam2, stringParam3, stringParam4) )
-   {
-      m_kwl->add( CUT_MIN_LAT_KW, tempString1.c_str() );
-      m_kwl->add( CUT_MIN_LON_KW, tempString2.c_str() );
-      m_kwl->add( CUT_MAX_LAT_KW, tempString3.c_str() );
-      m_kwl->add( CUT_MAX_LON_KW, tempString4.c_str() );
-   }
-   
-   if( ap.read("--cut-center-llwh", stringParam1, stringParam2, stringParam3, stringParam4) )
-   {
-      m_kwl->add( CUT_CENTER_LAT_KW,    tempString1.c_str() );
-      m_kwl->add( CUT_CENTER_LON_KW,    tempString2.c_str() );
-      m_kwl->add( CUT_CENTER_WIDTH_KW,  tempString3.c_str() );
-      m_kwl->add( CUT_CENTER_HEIGHT_KW, tempString4.c_str() );
-   }
-
-   if( ap.read("--cut-center-llr", stringParam1, stringParam2, stringParam3) )
-   {
-      m_kwl->add( CUT_CENTER_LAT_KW,    tempString1.c_str() );
-      m_kwl->add( CUT_CENTER_LON_KW,    tempString2.c_str() );
-      m_kwl->add( CUT_CENTER_RADIUS_KW, tempString3.c_str() );
-   }
-
-   int num_params = ap.numberOfParams("--degrees", doubleParam1);
-   if (num_params == 1)
-   {
-      ap.read("--degrees", doubleParam1);
-      m_kwl->add( DEGREES_X_KW, tempDouble1 );
-      m_kwl->add( DEGREES_Y_KW, tempDouble1 );
-   }
-   else if (num_params == 2)
-   {
-      ap.read("--degrees", doubleParam1, doubleParam2);
-      m_kwl->add( DEGREES_X_KW, tempDouble1 );
-      m_kwl->add( DEGREES_Y_KW, tempDouble2 );
-   }   
-
-   if ( ap.read("--elevation", stringParam1) )
-   {
-      m_kwl->add( ossimKeywordNames::ELEVATION_ANGLE_KW, tempString1.c_str() );
-   }
-
-   if ( ap.read("-e", stringParam1) || ap.read("--entry", stringParam1) )
-   {
-      m_kwl->add( ossimKeywordNames::ENTRY_KW, tempString1.c_str() );
-   }
-
-   if ( ap.read("--exaggeration", stringParam1) )
-   {
-      m_kwl->add( GAIN_KW, tempString1.c_str() );
-   }
-
-   if ( ap.read("--histogram-op", stringParam1) )
-   {
-      m_kwl->add( HISTO_OP_KW, tempString1.c_str() );
-   }
-
-   while( ap.read("--input-dem", stringParam1) )
-   {
-      key = DEM_KW;
-      key += ossimString::toString(demIdx);
-      key += ".";
-      key += FILE_KW;
-      m_kwl->add( key, tempString1.c_str() );
-      ++demIdx;
-   }
-   
-   while( ap.read("--input-img", stringParam1) )
-   {
-      key = IMG_KW;
-      key += ossimString::toString(imgIdx);
-      key += ".";
-      key += FILE_KW;
-      m_kwl->add(key, tempString1.c_str() );
-      ++imgIdx;
-   }
-
-   if( ap.read("--input-src", stringParam1) )
-   {
-      m_kwl->add( SRC_FILE_KW, tempString1.c_str() );
-   }
-
-   if( ap.read("--meters", stringParam1) )
-   {
-      m_kwl->add( METERS_KW, tempString1.c_str() );
-   }
-
-   if ( ap.read("-n") || ap.read("--north-up") )
-   {
-      m_kwl->add( NORTH_UP_KW, TRUE_KW);
-   }
-
-   if( ap.read("--op", stringParam1) )
-   {
-      m_kwl->add( OP_KW, tempString1.c_str() );
-   }
-
-   if( ap.read("--options-keyword-list", stringParam1) )
-   {
-      ossimFilename optionsKwl = tempString1;
-      if ( optionsKwl.exists() )
-      {
-         if ( m_kwl->addFile(optionsKwl) == false )
-         {
-            std::string errMsg = "ERROR could not open options keyword list file: ";
-            errMsg += optionsKwl.string();
-            throw ossimException(errMsg);
-         }
-      }
-      else
-      {
-         std::string errMsg = "ERROR options keyword list file does not exists: ";
-         errMsg += optionsKwl.string();
-         throw ossimException(errMsg); 
-      }
-   }
-   
-   if( ap.read("--origin-latitude", stringParam1) )
-   {
-      m_kwl->add( ossimKeywordNames::ORIGIN_LATITUDE_KW, tempString1.c_str() );
-   }
-
-   if(ap.read("--output-radiometry", stringParam1))
-   {
-      m_kwl->add( OUTPUT_RADIOMETRY_KW, tempString1.c_str() );
-   }
-
-   if( ap.read("--projection", stringParam1) )
-   {
-      m_kwl->add( ossimKeywordNames::PROJECTION_KW, tempString1.c_str() );
-   }
-
-   if( ap.read("--resample-filter", stringParam1) )
-   {
-      m_kwl->add( RESAMPLER_FILTER_KW, tempString1.c_str() );
-   }
-
-   if ( ap.read("-r", stringParam1) || ap.read("--rotate", stringParam1) )
-   {
-      m_kwl->add( ROTATION_KW, tempString1.c_str() );
-   }
-
-   if ( ap.read("--scale-to-8-bit") )
-   {
-      m_kwl->add( SCALE_2_8_BIT_KW, TRUE_KW);
-   }
-
-   if ( ap.read("--snap-tie-to-origin") )
-   {
-      m_kwl->add( SNAP_TIE_TO_ORIGIN_KW, TRUE_KW);
-   }
-   
-   if( ap.read("--srs", stringParam1) )
-   {
-      if ( tempString1.contains("EPSG:") )
-      {
-         tempString1.gsub( ossimString("EPSG:"), ossimString("") );
-      }
-      m_kwl->add( SRS_KW, tempString1.c_str() );
-   }
-
-   if( ap.read("-t", stringParam1) || ap.read("--thumbnail", stringParam1) )
-   {
-      m_kwl->add( THUMBNAIL_RESOLUTION_KW, tempString1.c_str() );
-   }
-
-   if ( ap.read("-u") || ap.read("--up-is-up") )
-   {
-      m_kwl->add( UP_IS_UP_KW, TRUE_KW);
-   }
-
-   if( ap.read("-w", stringParam1) || ap.read("--writer", stringParam1) )
-   {
-      m_kwl->add( WRITER_KW, tempString1); 
-   }
-
-   while (ap.read("--writer-prop", stringParam1))
-   {
-      key = WRITER_PROPERTY_KW;
-      key += ossimString::toString(propIdx);
-      m_kwl->add(key, tempString1.c_str() );
-      ++propIdx;
-   }
-   
-   if( ap.read("--2cmv-old-input-band", stringParam1) )
-   {
-      m_kwl->add( TWOCMV_OLD_INPUT_BAND_KW, tempString1.c_str() );
-   }
-
-   if( ap.read("--2cmv-new-input-band", stringParam1) )
-   {
-      m_kwl->add( TWOCMV_NEW_INPUT_BAND_KW, tempString1.c_str() );
-   }
-   if( ap.read("--2cmv-red-output-source", stringParam1) )
-   {
-      m_kwl->add( TWOCMV_RED_OUTPUT_SOURCE_KW, tempString1.c_str() );
-   }
-   
-   if( ap.read("--2cmv-green-output-source", stringParam1) )
-   {
-      m_kwl->add( TWOCMV_GREEN_OUTPUT_SOURCE_KW, tempString1.c_str() );
-   }
-   
-   if( ap.read("--2cmv-blue-output-source", stringParam1) )
-   {
-      m_kwl->add( TWOCMV_BLUE_OUTPUT_SOURCE_KW, tempString1.c_str() );
-   }
-
-   // End of arg parsing.
-   ap.reportRemainingOptionsAsUnrecognized();
-   if ( ap.errors() )
-   {
-      ap.writeErrorMessages(ossimNotify(ossimNotifyLevel_NOTICE));
-      std::string errMsg = "Unknown option...";
-      throw ossimException(errMsg);
-   }
-
-   if ( ap.argc() >= 2 )
-   {
-      // Output file is last arg:
-      m_kwl->add( ossimKeywordNames::OUTPUT_FILE_KW, ap[ap.argc()-1]);
-   }
-   else
-   {
-      if (  !m_kwl->find(ossimKeywordNames::OUTPUT_FILE_KW) )
-      {
-         ap.writeErrorMessages(ossimNotify(ossimNotifyLevel_NOTICE));
-         std::string errMsg = "Must supply an output file.";
-         throw ossimException(errMsg);
-      }
-   }
-
-   if ( ap.argc() > 2 ) // User passed inputs in front of output file.
-   {
-      int pos = 1; // ap.argv[0] is application name. 
-      while ( pos < (ap.argc()-1) )
-      {
-         ossimFilename file = ap[pos];
-         if ( traceDebug() )
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "argv[" << pos << "]: " << file << "\n";
-         }
-         
-         if ( isDemFile(file) )
-         {
-            key = DEM_KW;
-            key += ossimString::toString(demIdx);
-            key += ".";
-            key += FILE_KW;
-            m_kwl->add( key, file.c_str() );
-            ++demIdx;
-         }
-         else if ( isSrcFile(file) ) 
-         {
-            if ( m_kwl->find( SRC_FILE_KW ) ) // --input-src used also
-            {
-               std::string errMsg = MODULE;
-               errMsg += "ERROR Multiple src files passed in.  Please combine into one.";
-               throw ossimException(errMsg);
-            }
-            
-            m_kwl->add( SRC_FILE_KW, file.c_str() );
-         }
-         else // Add as an input image.
-         {
-            key = IMG_KW;
-            key += ossimString::toString(imgIdx);
-            key += ".";
-            key += FILE_KW;
-            m_kwl->add(key, file.c_str() );
-            ++imgIdx;
-         }
-         
-         ++pos; // Go to next arg...
-         
-      } // End: while ( pos < (ap.argc()-1) )
-       
-   } // End: if ( ap.argc() > 2 )
-
-   initialize();
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited..." << std::endl;
-   }  
-   return true;
-   
-} // End: void ossimChipperUtil::initialize(ossimArgumentParser& ap)
-
-void ossimChipperUtil::initialize()
-{
-   static const char MODULE[] = "ossimChipperUtil::initialize()";
-
-   if ( traceOptions() )
-   {
-      ossimFilename optionsFile;
-      getOutputFilename(optionsFile);
-      optionsFile = optionsFile.noExtension();
-      optionsFile += "-options.kwl";
-      ossimString comment = " Can be use for --options-keyword-list argument.";
-      m_kwl->write( optionsFile.c_str(), comment.c_str() );
-   } 
-
-   // Determine the operation to do.
-   std::string op = m_kwl->findKey( std::string(OP_KW) );
-   if ( op.size() )
-   {
-      ossimString s = op;
-      s.downcase();
-      
-      if ( s == "chip" )
-      {
-         m_operation = OSSIM_CHIPPER_OP_CHIP;
-      }
-      else if ( s == "hillshade" )
-      {
-         m_operation = OSSIM_CHIPPER_OP_HILL_SHADE;
-      }
-
-      else if ( s == "color-relief" )
-      {
-         m_operation = OSSIM_CHIPPER_OP_COLOR_RELIEF;
-      }
-      else if ( s == "ortho" )
-      {
-         m_operation = OSSIM_CHIPPER_OP_ORTHO;
-      }
-      else if ( s == "2cmv" )
-      {
-         m_operation = OSSIM_CHIPPER_OP_2CMV;
-      }
-      else
-      {
-         std::string errMsg = "unknown operation: ";
-         errMsg += s.string();
-         throw ossimException(errMsg);
-      }
-   }
-   else
-   {
-      std::string errMsg = "keyword not found: ";
-      errMsg += OP_KW;
-      errMsg += "\nUse --op option to specify operation.\n";
-      throw ossimException(errMsg);  
-   }
-
-   //---
-   // Populate the m_srcKwl if --src option was set.
-   // Note do this before creating chains.
-   //---
-   initializeSrcKwl();
-   
-   // Check for required inputs. Do this after initializeSrcKwl.
-   if ( m_operation == OSSIM_CHIPPER_OP_CHIP )
-   {
-      if ( getNumberOfInputs() != 1 )
-      {
-         std::ostringstream errMsg;
-         errMsg << op << " operation takes one input.";
-         throw ossimException( errMsg.str() );
-      }
-   }
-   
-   if ( m_operation == OSSIM_CHIPPER_OP_2CMV )
-   {
-      if ( getNumberOfInputs() != 2 )
-      {
-         std::ostringstream errMsg;
-         errMsg << op << " operation requires two inputs.";
-         throw ossimException( errMsg.str() );
-      }
-   }
-
-   // Sanity check rotation options.
-   if ( upIsUp() || northUp() || hasRotation() )
-   {
-      std::string option;
-      ossim_uint32 rotationOptionCount = 0;
-      if ( upIsUp() )
-      {
-         option = UP_IS_UP_KW;
-         ++rotationOptionCount; 
-      }
-      if ( northUp() )
-      {
-         option = NORTH_UP_KW;
-         ++rotationOptionCount; 
-      }
-      if ( hasRotation() )
-      {
-         option = ROTATION_KW; 
-         ++rotationOptionCount;
-      }
-
-      // Can only do ONE rotation option.
-      if ( rotationOptionCount > 1 )
-      {
-         std::ostringstream errMsg;
-         if ( upIsUp() )
-         {
-            errMsg << UP_IS_UP_KW << " is on.\n";
-         }
-         if ( northUp() )
-         {
-            errMsg << NORTH_UP_KW << " is on.\n";
-         }
-         if ( hasRotation() )
-         {
-            errMsg << ROTATION_KW << " is on.\n";
-         }
-         errMsg << "Multiple rotation options do not make sense!";
-         throw ossimException( errMsg.str() );
-      }
-         
-      // One input, chip operation only.
-      if ( getNumberOfInputs() != 1 )
-      {
-         std::ostringstream errMsg;
-         errMsg << option << " option takes one input.";
-         throw ossimException( errMsg.str() );
-      }
-
-      if ( m_operation != OSSIM_CHIPPER_OP_CHIP )
-      {
-         std::ostringstream errMsg;
-         errMsg << option << " option only valid with \"chip\" operation.";
-         throw ossimException( errMsg.str() );
-      }
-   }
-
-   // Create chains for any dem sources.
-   addDemSources();
-
-   // Create chains for any image sources.
-   addImgSources();
-
-   // Initialize projection and propagate to chains.
-   initializeOutputProjection();
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
-   }
-
-} // End: void ossimChipperUtil::initialize()
-
-void ossimChipperUtil::initializeOutputProjection()
-{
-   if ( isIdentity() )
-   {
-      createIdentityProjection();
-   }
-   else
-   {
-      // Create the output projection.
-      createOutputProjection();
-      
-      // Setup the view in all the chains.
-      propagateOutputProjectionToChains();
-   }
-}
-
-void ossimChipperUtil::execute()
-{
-   static const char MODULE[] = "ossimChipperUtil::execute";
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   const char* lookup = 0;  // used throughout...
-
-   ossimRefPtr<ossimImageSource> source = 0;
-
-   if ( hasBumpShadeArg() )
-   {
-      // Combine the dems.
-      ossimRefPtr<ossimImageSource> demSource = combineLayers( m_demLayer );
-
-      // Set up the normal source.
-      ossimRefPtr<ossimImageToPlaneNormalFilter> normSource = new ossimImageToPlaneNormalFilter;
-
-      //---
-      // Set the track scale flag to true.  This enables scaling the surface
-      // normals by the GSD in order to maintain terrain proportions.
-      //---
-      normSource->setTrackScaleFlag(true);
-
-      // Connect to dems.
-      normSource->connectMyInputTo( demSource.get() );
-
-      // Set the smoothness factor.
-      ossim_float64 gain = 1.0;
-      lookup = m_kwl->find( GAIN_KW );
-      if ( lookup )
-      {
-         gain = ossimString::toFloat64(lookup);
-      }
-      normSource->setSmoothnessFactor(gain);
-
-      ossimRefPtr<ossimImageSource> colorSource = 0;
-      if ( hasLutFile() )
-      {
-         if ( m_imgLayer.size() )
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << MODULE << " WARNING:"
-               << "\nBoth a color table and image(s) have been provided for a color source.\n"
-               << "Choosing color table of image(s).\n";
-         }
-
-         colorSource = addIndexToRgbLutFilter( demSource );
-      }
-      else
-      {
-         // Combine the images and set as color source for bump shade.
-         colorSource = combineLayers( m_imgLayer );
-      }
-
-      // Create the bump shade.
-      ossimRefPtr<ossimBumpShadeTileSource> bumpShade = new ossimBumpShadeTileSource;
-
-      // Set the azimuth angle.
-      ossim_float64 azimuthAngle = 180;
-      lookup = m_kwl->find( ossimKeywordNames::AZIMUTH_ANGLE_KW );
-      if ( lookup )
-      {
-         ossim_float64 f = ossimString::toFloat64(lookup);
-         if ( (f >= 0) && (f <= 360) )
-         {
-            azimuthAngle = f;
-         }
-      }
-      bumpShade->setAzimuthAngle(azimuthAngle);
-
-      // Set the elevation angle.
-      ossim_float64 elevationAngle = 45.0;
-      lookup = m_kwl->find( ossimKeywordNames::ELEVATION_ANGLE_KW );
-      if ( lookup )
-      {
-         ossim_float64 f = ossimString::toFloat64(lookup);
-         if ( (f >= 0.0) && (f <= 90) )
-         {
-            elevationAngle = f;
-         }
-      }
-      bumpShade->setElevationAngle(elevationAngle);
-
-      if ( !hasLutFile() )
-      {
-         // Set the color.
-         ossim_uint8 r = 0xff;
-         ossim_uint8 g = 0xff;
-         ossim_uint8 b = 0xff;
-         lookup = m_kwl->find( COLOR_RED_KW );
-         if ( lookup )
-         {
-            r = ossimString(lookup).toUInt8();
-         }
-         lookup = m_kwl->find( COLOR_GREEN_KW );
-         if ( lookup )
-         {
-            g = ossimString(lookup).toUInt8();
-         }
-         lookup = m_kwl->find( COLOR_BLUE_KW );
-         if ( lookup )
-         {
-            b = ossimString(lookup).toUInt8();
-         }
-         bumpShade->setRgbColorSource(r, g, b);
-      }
-
-      // Connect the two sources.
-      bumpShade->connectMyInputTo(0, normSource.get());
-      bumpShade->connectMyInputTo(1, colorSource.get());
-
-      if ( traceDebug() )
-      {
-         ossim_uint8 r = 0xff;
-         ossim_uint8 g = 0xff;
-         ossim_uint8 b = 0xff;
-         bumpShade->getRgbColorSource(r, g, b);
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "\nazimuthAngle:      " << azimuthAngle
-            << "\nelevation angle:   " << elevationAngle
-            << "\ngain factor:       " << gain
-            << "\nr:                 " << int(r)
-            << "\ng:                 " << int(g)
-            << "\nb:                 " << int(b)
-            << "\n";
-      }
-
-      // Capture the pointer to give to the writer.
-      source = bumpShade.get();
-   }
-   else if ( m_operation == OSSIM_CHIPPER_OP_COLOR_RELIEF )
-   {
-      source = combineLayers();
-      if ( hasLutFile() )
-      {
-         source = addIndexToRgbLutFilter( source );
-      }
-      else
-      {
-         // No LUT file provided, so doing the default 8-bit linear stretch:
-         if ( source->getOutputScalarType() != OSSIM_UINT8 )
-         {
-            source = addScalarRemapper( source, OSSIM_UINT8 );
-         }
-      }
-   }
-   else if ( ( m_operation == OSSIM_CHIPPER_OP_CHIP ) ||
-             ( m_operation == OSSIM_CHIPPER_OP_ORTHO ) )  
-   {
-      source = combineLayers();
-   }
-   else if ( m_operation == OSSIM_CHIPPER_OP_2CMV )
-   {
-      source = combine2CmvLayers(); // Two Color Multiview.
-   }
-
-   if ( source.valid() )
-   {
-      //---
-      // This is conditional.  Output radiometry may of may not be set.  This can also be set at
-      // the ossimSingleImageChain level.
-      //---
-      if ( ( getOutputScalarType() != OSSIM_SCALAR_UNKNOWN) &&
-           ( source->getOutputScalarType() != getOutputScalarType() ) )
-      {
-         source = addScalarRemapper( source, getOutputScalarType() );
-      }
-      
-      //---
-      // Get the area of interest. This will be the scene bounding rect if not
-      // explicitly set by user with one of the --cut options.
-      //  Need to get this before the thumbnail code.
-      //---
-      ossimIrect aoi;
-      getAreaOfInterest(source.get(), aoi);
-
-      //---
-      // Set the image size here.  Note must be set after combineLayers.  This is needed for
-      // the ossimImageGeometry::worldToLocal call for a geographic projection to handle wrapping
-      // accross the date line.
-      //---
-      m_geom->setImageSize( aoi.size() );
-
-      if ( hasThumbnailResolution() )
-      {
-         //---
-         // Adjust the projection scale and get the new rect.
-         // Note this will resize the ossimImageGeometry::m_imageSize is scale changes.
-         //---
-         initializeThumbnailProjection( aoi, aoi );
-
-         // Reset the source bounding rect if it changed.
-         source->initialize();
-      }
-
-      // Set up the writer.
-      ossimRefPtr<ossimImageFileWriter> writer = createNewWriter();
-
-      // Connect the writer.
-      writer->connectMyInputTo(0, source.get());
-
-      //---
-      // Set the area of interest.
-      // NOTE: This must be called after the writer->connectMyInputTo as
-      // ossimImageFileWriter::initialize incorrectly resets theAreaOfInterest
-      // back to the bounding rect.
-      //---
-      if ( !aoi.hasNans() )
-      {
-         writer->setAreaOfInterest(aoi);
-      }
-      
-      if (writer->getErrorStatus() == ossimErrorCodes::OSSIM_OK)
-      {
-         // Add a listener to get percent complete.
-         ossimStdOutProgress prog(0, true);
-         writer->addListener(&prog);
-
-         if ( traceLog() )
-         {
-            ossimKeywordlist logKwl;
-            writer->saveStateOfAllInputs(logKwl);
-            
-            ossimFilename logFile;
-            getOutputFilename(logFile);
-            logFile.setExtension("log");
-            ossimKeywordlist kwl;
-            writer->saveStateOfAllInputs(kwl);
-            kwl.write(logFile.c_str() );
-         }
-         
-         // Write the file:
-         writer->execute();
-
-         writer->removeListener(&prog);
-      }
-   }
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
-   }   
-}
-
-void ossimChipperUtil::addDemSources()
-{
-   static const char MODULE[] = "ossimChipperUtil::addDemSources";
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   // Add the images from the options keyword list.
-   ossim_uint32 demCount = m_kwl->numberOf(DEM_KW);
-   ossim_uint32 maxIndex = demCount + 1000; // Allow for skippage in numbering.
-   ossim_uint32 foundRecords = 0;
-   ossim_uint32 i = 0;
-   while ( foundRecords < demCount )
-   {
-      ossimString key = DEM_KW;
-      key += ossimString::toString(i);
-      key += ".";
-      key += FILE_KW;
-      const char* lookup = m_kwl->find( key.c_str() );
-      if ( lookup )
-      {
-         ossimFilename f = lookup;
-         addDemSource(f);
-         ++foundRecords;
-      }
-      ++i;
-      if ( i >= maxIndex ) break;
-   }
-
-   if ( m_srcKwl.valid() )
-   {
-      // Add stuff from src keyword list.
-      demCount = m_srcKwl->numberOf(DEM_KW);
-      maxIndex = demCount + 1000;
-      foundRecords = 0;
-      i = 0;
-      while ( foundRecords < demCount )
-      {
-         ossimString prefix = DEM_KW;
-         prefix += ossimString::toString(i);
-         prefix += ".";
-         ossimSrcRecord src;
-         if ( src.loadState( *(m_srcKwl.get()), prefix ) )
-         {
-            addDemSource(src);
-            ++foundRecords;
-         }
-         ++i;
-         if ( i >= maxIndex ) break;
-      }
-   }
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
-   } 
-}
-
-void ossimChipperUtil::addDemSource(const ossimFilename& file)
-{
-   static const char MODULE[] = "ossimChipperUtil::addDemSource(const ossimFilename&)";
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   ossimRefPtr<ossimSingleImageChain> ic = createChain(file);
-   if ( ic.valid() )
-   {
-      m_demLayer.push_back(ic);
-   }
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exiting...\n";
-   }
-}
-
-void ossimChipperUtil::addDemSource(const ossimSrcRecord& rec)
-{
-   static const char MODULE[] = "ossimChipperUtil::addDemSource(const ossimSrcRecord&)";
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   ossimRefPtr<ossimSingleImageChain> ic = createChain(rec);
-   if ( ic.valid() )
-   {
-      m_demLayer.push_back(ic);
-   }
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exiting...\n";
-   }
-}
-
-void ossimChipperUtil::addImgSources()
-{
-   static const char MODULE[] = "ossimChipperUtil::addImgSources";
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-   
-   ossim_uint32 imgCount = m_kwl->numberOf(IMG_KW);
-   ossim_uint32 maxIndex = imgCount + 1000; // Allow for skippage in numbering.
-   ossim_uint32 foundRecords = 0;
-   ossim_uint32 i = 0;
-   while ( foundRecords < imgCount )
-   {
-      ossimString key = IMG_KW;
-      key += ossimString::toString(i);
-      key += ".";
-      key += FILE_KW;
-      const char* lookup = m_kwl->find( key.c_str() );
-      if ( lookup )
-      {
-         ossimFilename f = lookup;
-         addImgSource(f);
-         ++foundRecords;
-      }
-      ++i;
-      if ( i >= maxIndex ) break;
-   }
-
-   if ( m_srcKwl.valid() )
-   {
-      // Add stuff from src keyword list.
-      imgCount = m_srcKwl->numberOf(IMG_KW);
-      maxIndex = imgCount + 1000;
-      foundRecords = 0;
-      i = 0;
-      while ( foundRecords < imgCount )
-      {
-         ossimString prefix = IMG_KW;
-         prefix += ossimString::toString(i);
-         prefix += ".";
-         ossimSrcRecord src;
-         if ( src.loadState( *(m_srcKwl.get()), prefix ) )
-         {
-            addImgSource(src);
-            ++foundRecords;
-         }
-         ++i;
-         if ( i >= maxIndex ) break;
-      }
-   }
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
-   }
-}
-
-void ossimChipperUtil::addImgSource(const ossimFilename& file)
-{
-   static const char MODULE[] = "ossimChipperUtil::addImgSource";
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   ossimRefPtr<ossimSingleImageChain> ic = createChain(file);
-   if ( ic.valid() )
-   {
-      m_imgLayer.push_back(ic);
-   }
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exiting...\n";
-   }
-}
-
-void ossimChipperUtil::addImgSource(const ossimSrcRecord& rec)
-{
-   static const char MODULE[] = "ossimChipperUtil::addImgSource(const ossimSrcRecord&)";
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   ossimRefPtr<ossimSingleImageChain> ic = createChain(rec);
-   if ( ic.valid() )
-   {
-      m_imgLayer.push_back(ic);
-   }
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exiting...\n";
-   }
-}
-
-ossimRefPtr<ossimSingleImageChain> ossimChipperUtil::createChain(const ossimFilename& file) const
-{
-   static const char MODULE[] = "ossimChipperUtil::createChain(const ossimFilename&";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " entered..." << "\nfile: " << file << "\n";
-   }   
-   
-   ossimRefPtr<ossimSingleImageChain> ic = 0;
-
-   if ( file.size() )
-   {
-      if ( file.exists() )
-      {
-         ic = new ossimSingleImageChain;
-         if ( ic->open( file ) )
-         {
-            // Set the entry if not zero.
-            ossim_uint32 entryIndex = getEntryNumber();
-            if ( entryIndex )
-            {
-               if ( setChainEntry( ic, entryIndex ) == false )
-               {
-                  std::ostringstream errMsg;
-                  errMsg << MODULE << " ERROR:\nEntry " << entryIndex << " out of range!"
-                         << std::endl;
-                  throw ossimException( errMsg.str() );
-               }
-            }
-
-            // Bands selection: Two pieces here and then after the initialize of chain.
-            std::vector<ossim_uint32> bandList(0);
-            getBandList( bandList );
-            if ( bandList.size() == 3 )
-            {
-               if ( ( bandList[0] == 0 ) && ( bandList[1] == 1 ) && ( bandList[2] == 2 ) )
-               {
-                  ic->setThreeBandFlag( true );
-                  
-                  bandList.clear(); // Clear list as we don't need now.
-               }
-               else if ( ( bandList[0] == 2 ) && ( bandList[1] == 1 ) && ( bandList[2] == 0 ) )
-               {
-                  ic->setThreeBandReverseFlag( true );
-                  
-                  bandList.clear(); // Clear list as we don't need now.
-               }
-            }
-            
-            //---
-            // If multiple inputs and scaleToEightBit do it at the end of the processing
-            // chain to alleviate un-even stretches between inputs.
-            //---
-            bool scaleFlag = ( scaleToEightBit() && ( getNumberOfInputs() == 1) );
-            ic->setRemapToEightBitFlag( scaleFlag );
-            
-            // Always have resampler cache.
-            ic->setAddResamplerCacheFlag(true);
-
-            //---
-            // Don't need a chain cache as we're doing a sequential write.  So the same tile
-            // should never be visited more than once.
-            //---
-            ic->setAddChainCacheFlag(false);
-
-            // Histogram.
-            ic->setAddHistogramFlag( hasHistogramOperation() );
-
-            // Create the chain.
-            ic->createRenderedChain();
-
-            // Band selection: Do this post creation of chain if needed.
-            if ( bandList.size() )
-            {
-               ic->setBandSelection( bandList );
-            }
-
-            // Set the filter type if needed.
-            const char* lookup = m_kwl->find( RESAMPLER_FILTER_KW );
-            if ( lookup )
-            {
-               ic->getImageRenderer()->getResampler()->setFilterType(ossimString(lookup));
-            }
-
-            // Histogram setup.
-            if ( hasHistogramOperation() )
-            {
-               setupChainHistogram( ic );
-            }
-         }
-      }
-   }
-
-   if ( ic.valid() == false )
-   {
-      std::string errMsg = "Could not open: ";
-      errMsg += file.string();
-      throw ossimException(errMsg); 
-   }
-
-   if ( traceDebug() )
-   {
-      ossimKeywordlist kwl;
-      ic->saveState(kwl, 0);
-
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "chain:\n" << kwl << "\n"
-         << MODULE << " exiting...\n";
-   }   
-
-   return ic;
-}
-
-ossimRefPtr<ossimSingleImageChain> ossimChipperUtil::createChain(const ossimSrcRecord& rec) const
-{
-   static const char MODULE[] = "ossimChipperUtil::createChain(const ossimSrcRecord&)";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }   
-   
-   ossimRefPtr<ossimSingleImageChain> ic = new ossimSingleImageChain;
-   if ( ic->open(rec) )
-   {
-      //---
-      // If multiple inputs and scaleToEightBit do it at the end of the processing
-      // chain to alleviate un-even strectes between inputs.
-      //---
-      bool scaleFlag = ( scaleToEightBit() && ( getNumberOfInputs() == 1) );
-      ic->setRemapToEightBitFlag( scaleFlag );
-      
-      // Always have resampler cache.
-      ic->setAddResamplerCacheFlag(true);
-      
-      //---
-      // Don't need a chain cache as we're doing a sequential write.  So the same tile
-      // should never be visited more than once.
-      //---
-      ic->setAddChainCacheFlag(false);
-
-      // Histogram.
-      ic->setAddHistogramFlag( hasHistogramOperation() );
-
-      //---
-      // NOTE: Histogram and band selector can be set in ic->createRenderedChain(rec)
-      // if the right keywords are there.
-      //---
-      ic->createRenderedChain(rec);
-
-      // Set the filter type if needed.
-      const char* lookup = m_kwl->find( RESAMPLER_FILTER_KW );
-      if ( lookup )
-      {
-         ic->getImageRenderer()->getResampler()->setFilterType(ossimString(lookup));
-      }
-   }
-   else // Open failed.
-   {
-      std::string errMsg = "Could not open from src record!";
-      throw ossimException(errMsg); 
-   }
-
-   if ( traceDebug() )
-   {
-      ossimKeywordlist kwl;
-      ic->saveState(kwl, 0);
-
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "chain:\n" << kwl << "\n"
-         << MODULE << " exiting...\n";
-   }   
-
-   return ic;
-}
-   
-void ossimChipperUtil::createOutputProjection()
-{
-   static const char MODULE[] = "ossimChipperUtil::createOutputProjection";
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   const char* op  = m_kwl->find(ossimKeywordNames::PROJECTION_KW);
-   const char* srs = m_kwl->find(SRS_KW);
-   
-   if ( op && srs )
-   {
-      ossimNotify(ossimNotifyLevel_WARN)
-         << MODULE << " WARNING:"
-         << "\nBoth " << SRS_KW << " and " << ossimKeywordNames::PROJECTION_KW
-         << " keywords are set!"
-         << "\nsrs:               " << srs
-         << "\noutput_projection: " << op
-         << "\nTaking " << srs << " over " << op << "\n";
-   }
-   
-   bool usingInput = false;
-   ossimChipperOutputProjection projType = getOutputProjectionType();
-   ossimRefPtr<ossimMapProjection> proj = 0;
-   
-   // If an srs code use that first.
-   if (srs)
-   {
-      proj = getNewProjectionFromSrsCode( ossimString(srs) );
-   }
-   else if (op)
-   {
-      switch ( projType )
-      {
-         case ossimChipperUtil::OSSIM_CHIPPER_PROJ_GEO:
-         {
-            proj = getNewGeoProjection();
-            break;
-         }
-         case ossimChipperUtil::OSSIM_CHIPPER_PROJ_GEO_SCALED:
-         {
-            proj = getNewGeoScaledProjection();
-            break;
-         }
-         case ossimChipperUtil::OSSIM_CHIPPER_PROJ_INPUT:
-         {
-            proj = getFirstInputProjection();
-            usingInput = true;
-            break;
-         }
-         case ossimChipperUtil::OSSIM_CHIPPER_PROJ_UTM:
-         {
-            proj = getNewUtmProjection();
-            break;
-         }
-         default:
-         {
-            break; // Just for un-handled type warning.
-         }
-      }
-   }
-   
-   // Check for identity projection:
-   ossimRefPtr<ossimMapProjection> inputProj = getFirstInputProjection();   
-   if ( proj.valid() && inputProj.valid() )
-   {
-      if ( *(inputProj.get()) == *(proj.get()) )
-      {
-         if ( projType == OSSIM_CHIPPER_PROJ_GEO_SCALED )
-         {
-            // Get the origin used for scaling. 
-            ossimGpt origin = proj->getOrigin();
-
-            // Copy the input projection to our projection.  Has the tie and scale we need.
-            proj = inputProj;
-
-            // Set the origin for scaling.
-            proj->setOrigin(origin);
-         }
-         else
-         {
-            proj = inputProj;
-         }
-         usingInput = true;
-      }
-   }
-   
-   if ( !proj.valid() )
-   {
-      // Try first input. If map projected use that.
-      if ( inputProj.valid() )
-      {
-         proj = inputProj;
-         usingInput = true;
-         if ( traceDebug() )
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "WARNING: No projection set!"
-               << "\nDefaulting to first input's projection.\n";
-         }
-      }
-      else
-      {
-         proj = getNewGeoScaledProjection();
-         if ( traceDebug() )
-         {
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "WARNING: No projection set!"
-               << "\nDefaulting to scaled geographic at scene center.\n";
-         }
-      }
-   }
-
-   // Create our ossimImageGeometry with projection (no transform).
-   m_geom  = new ossimImageGeometry( 0, proj.get() );
-
-   //---
-   // If the input is the same as output projection do not modify; else, set
-   // the gsd to user selected "METERS_KW" or the best resolution of the inputs,
-   // set the tie and then snap it to the projection origin.
-   //---
-   if ( !usingInput || m_kwl->find(METERS_KW) || m_kwl->find(DEGREES_X_KW))
-   {
-      // Set the scale.
-      initializeProjectionGsd();
-   }
-
-   // Set the tie.
-   intiailizeProjectionTiePoint();
-
-   if ( snapTieToOrigin() )
-   {
-      // Adjust the projection tie to the origin.
-      proj->snapTiePointToOrigin();
-   }
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "using input projection: " << (usingInput?"true":"false")
-         << "\noutput image geometry:\n";
-
-      m_geom->print(ossimNotify(ossimNotifyLevel_DEBUG));
-
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
-   }
-   
-} // End: ossimChipperUtil::createOutputProjection()
-
-void ossimChipperUtil::createIdentityProjection()
-{
-   static const char MODULE[] = "ossimChipperUtil::createIdentityProjection";
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   // Get the singe image chain.  Sould be only one.
-   ossimRefPtr<ossimSingleImageChain> sic = 0;
-   if ( m_demLayer.size() )
-   {
-      sic = m_demLayer[0];
-   }
-   else if ( m_imgLayer.size() )
-   {
-      sic = m_imgLayer[0];
-   }
-
-   if ( sic.valid() )
-   {
-      // Get the image handler.
-      ossimRefPtr<ossimImageHandler>  ih = sic->getImageHandler();
-
-      // Resampler:
-      ossimRefPtr<ossimImageRenderer> resampler = sic->getImageRenderer();
-
-      if ( ih.valid() )
-      {
-         //---
-         // Get the geometry from the image handler.  Since we're in "identity"
-         // mode use the inputs for the outputs.
-         //---
-         m_geom = ih->getImageGeometry();
-         
-         if ( m_geom.valid() )
-         {
-            // Get the image projection.
-            ossimRefPtr<ossimProjection> proj = m_geom->getProjection();
-            if ( proj.valid() )
-            {
-               ossim_float64 rotation = 0.0;
-               if ( upIsUp() )
-               {
-                  rotation = m_geom->upIsUpAngle();
-               }
-               else if ( northUp() )
-               {
-                  rotation = m_geom->northUpAngle();
-               }
-               else if ( hasRotation() )
-               {
-                  rotation = getRotation();
-               }
-
-               if ( ossim::isnan( rotation ) )
-               {
-                  rotation = 0.0;
-               }
-               
-               ossimDrect rect;
-               m_geom->getBoundingRect(rect);
-               ossimDpt midPt = rect.midPoint();
-               
-               if ( traceDebug() )
-               {
-                  ossimNotify(ossimNotifyLevel_DEBUG)
-                     << MODULE
-                     << "\nAffine transform parameters:"
-                     << "\nrotation:  " << rotation
-                     << "\nmid point: " << midPt << std::endl;
-               }
-               
-               m_ivt = new ossimImageViewAffineTransform(-rotation,
-                                                         1.0,1.0, //scale x and y
-                                                         0.0, 0.0, // translate x,y
-                                                         midPt.x, midPt.y); // pivot point
-
-               if ( m_kwl->find(METERS_KW) || m_kwl->find(DEGREES_X_KW ) )
-               {
-                  // Set the image view transform scale.
-                  initializeIvtScale();
-               }
-               
-               resampler->setImageViewTransform( m_ivt.get() );
-            }
-
-         } // Matches: if ( m_geom.valid() )
-         
-      } // Matches: if ( ih.valid() )
-      
-   } // Matches: if ( sic.valid() 
-   
-} // End: createIdentityProjection()
-
-void ossimChipperUtil::initializeIvtScale()
-{
-   ossimDpt scale;
-   scale.makeNan();
-   
-   if ( isIdentity() && m_ivt.valid() && m_geom.valid() )
-   {
-      // Check for GSD spec. Degrees/pixel takes priority over meters/pixel:
-      const char* lookup = m_kwl->find(DEGREES_X_KW);
-      if ( lookup )
-      {
-         ossimDpt outputDpp;
-         outputDpp.makeNan();
-
-         outputDpp.x = ossimString::toFloat64(lookup);
-
-         lookup = m_kwl->find(DEGREES_Y_KW);
-         if ( lookup )
-         {
-            outputDpp.y = ossimString::toFloat64(lookup);
-         }
-         
-         if ( !outputDpp.hasNans() )
-         {
-            // Input degress per pixel.  Consider this a scale of 1.0.
-            ossimDpt inputDpp;
-            m_geom->getDegreesPerPixel( inputDpp );
-
-            if ( !inputDpp.hasNans() )
-            {
-               scale.x = outputDpp.x/inputDpp.x;
-               scale.y = outputDpp.y/inputDpp.y;
-            }
-         }
-      }
-      else
-      {
-         lookup = m_kwl->find(METERS_KW);
-         if ( lookup )
-         {
-            ossimDpt outputMpp;
-            outputMpp.makeNan();
-            outputMpp.x = ossimString::toFloat64(lookup);
-            outputMpp.y = outputMpp.x;
-
-            if ( !outputMpp.hasNans() )
-            {
-               // Input meters per pixel.  Consider this a scale of 1.0.
-               ossimDpt inputMpp;
-               m_geom->getMetersPerPixel( inputMpp );
-
-               if ( !inputMpp.hasNans() )
-               {
-                  scale.x = outputMpp.x/inputMpp.x;
-                  scale.y = outputMpp.y/inputMpp.y;
-               }
-            }
-         }
-      }
-   }
-
-   if ( !scale.hasNans() )
-   {
-      m_ivt->scale( scale.x, scale.y );
-   }
-   else
-   {
-      std::string errMsg = "ossimChipperUtil::initializeIvtScale failed!";
-      throw ossimException(errMsg);
-   }
-   
-} // End: ossimChipperUtil::initializeIvtScale()
-
-void ossimChipperUtil::intiailizeProjectionTiePoint()
-{
-   static const char MODULE[] = "ossimChipperUtil::initializeProjectionTiePoint()";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   // Get the map projection from the output geometry:
-   ossimRefPtr<ossimMapProjection> mapProj = getMapProjection();
-
-   if ( mapProj.valid() )
-   {
-      //---
-      // If the output is geographic of there are sensor model inputs, get the tie
-      // using the ground point.
-      //---
-      if ( mapProj->isGeographic() || hasSensorModelInput() )
-      {
-         ossimGpt tiePoint;
-         tiePoint.makeNan();
-         getTiePoint(tiePoint);
-         
-         if ( !tiePoint.hasNans() )
-         {
-            //---
-            // The tie point coordinates currently reflect the UL edge of the UL pixel.
-            // We'll need to shift the tie point bac from the edge to the center base on the
-            // output gsd.
-            //---
-            ossimDpt half_pixel_shift = m_geom->getDegreesPerPixel() * 0.5;
-            tiePoint.lat -= half_pixel_shift.lat;
-            tiePoint.lon += half_pixel_shift.lon;
-            mapProj->setUlTiePoints(tiePoint);
-         }
-         else
-         {
-            std::string errMsg = MODULE;
-            errMsg += " tie point has nans!";
-            throw( ossimException(errMsg) );
-         }
-
-         if ( traceDebug() )
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "projection tie point: " << tiePoint << "\n" << MODULE << " exited...\n";
-         }
-      }
-      else
-      {
-         //---
-         // TODO: Add test for like input projections and use above geographic tie
-         // code if not.
-         //---
-         ossimDpt tiePoint;
-         tiePoint.makeNan();
-         getTiePoint(tiePoint);
-
-         if ( !tiePoint.hasNans() )
-         {
-            //---
-            // The tie point coordinates currently reflect the UL edge of the UL pixel.
-            // We'll need to shift the tie point bac from the edge to the center base on the
-            // output gsd.
-            //---
-            ossimDpt half_pixel_shift = m_geom->getMetersPerPixel() * 0.5;
-            tiePoint.y -= half_pixel_shift.y;
-            tiePoint.x += half_pixel_shift.x;
-            mapProj->setUlTiePoints(tiePoint);
-         }
-         else
-         {
-            std::string errMsg = MODULE;
-            errMsg += " tie point has nans!";
-            throw( ossimException(errMsg) );
-         }
-
-         if ( traceDebug() )
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "projection tie point: " << tiePoint << "\n" << MODULE << " exited...\n";
-         }
-      }
-      
-   } // Matches: if ( mapProj.valid() )
-   else
-   {
-      std::string errMsg = MODULE;
-      errMsg += "m_projection is null!";
-      throw( ossimException(errMsg) ); 
-   }
-}
-
-void ossimChipperUtil::initializeProjectionGsd()
-{
-   static const char MODULE[] = "ossimChipperUtil::initializeProjectionGsd()";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   ossimRefPtr<ossimMapProjection> mapProj = getMapProjection();
-
-   if ( !mapProj.valid() )
-   {
-      std::string errMsg = MODULE;
-      errMsg += "projection is null!";
-      throw( ossimException(errMsg) ); 
-   }
-   
-   ossimDpt gsd;
-   gsd.makeNan();
-
-   // Check for GSD spec. Degrees/pixel takes priority over meters/pixel:
-   const char* lookup = m_kwl->find(DEGREES_X_KW);
-   if ( lookup )
-   {
-      gsd.x = ossimString::toFloat64(lookup);
-
-      lookup = m_kwl->find(DEGREES_Y_KW);
-      if ( lookup )
-      {
-         gsd.y = ossimString::toFloat64(lookup);
-      }
-      if ( !gsd.hasNans() )
-      {
-         mapProj->setDecimalDegreesPerPixel(gsd);
-      }
-   }
-   else
-   {
-      lookup = m_kwl->find(METERS_KW);
-      if ( lookup )
-      {
-         gsd.x = ossimString::toFloat64(lookup);
-         gsd.y = gsd.x;
-         if ( !gsd.hasNans() )
-         {
-            mapProj->setMetersPerPixel(gsd);
-         }
-      }
-   }
-
-   if ( gsd.hasNans() )
-   {
-      // Get the best resolution from the inputs.
-      getMetersPerPixel(gsd);
-
-      // See if the output projection is geo-scaled; if so, make the pixels square in meters.
-      if ( getOutputProjectionType() == ossimChipperUtil::OSSIM_CHIPPER_PROJ_GEO_SCALED )
-      {
-         // Pick the best resolution and make them both the same.
-         gsd.x = ossim::min<ossim_float64>(gsd.x, gsd.y);
-         gsd.y = gsd.x;
-      }
-
-      // Set to input gsd.
-      mapProj->setMetersPerPixel(gsd);
-   }
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "projection gsd: " << gsd << "\n" << MODULE << " exited...\n";
-   }
-}
-
-void ossimChipperUtil::getTiePoint(ossimGpt& tie)
-{
-   static const char MODULE[] = "ossimChipperUtil::getTiePoint(ossimGpt&)";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   std::vector< ossimRefPtr<ossimSingleImageChain> >::iterator chainIdx;
-
-   tie.lat = ossim::nan();
-   tie.lon = ossim::nan();
-   tie.hgt = 0.0;
-   
-   // Loop through dem layers.
-   ossimGpt chainTiePoint;
-   chainIdx = m_demLayer.begin();
-   while ( chainIdx != m_demLayer.end() )
-   {
-      getTiePoint( (*chainIdx).get(), chainTiePoint );
-      if ( tie.hasNans() )
-      {
-         tie = chainTiePoint;
-      }
-      else
-      {
-         if ( chainTiePoint.lat > tie.lat )
-         {
-            tie.lat = chainTiePoint.lat;
-         }
-         if ( chainTiePoint.lon < tie.lon )
-         {
-            tie.lon = chainTiePoint.lon;
-         }
-      }
-      ++chainIdx;
-   }
-
-   // Loop through image layers.
-   chainIdx = m_imgLayer.begin();
-   while ( chainIdx != m_imgLayer.end() )
-   {
-      getTiePoint( (*chainIdx).get(), chainTiePoint );
-      if ( tie.hasNans() )
-      {
-         tie = chainTiePoint;
-      }
-      else
-      {
-         if ( chainTiePoint.lat > tie.lat )
-         {
-            tie.lat = chainTiePoint.lat;
-         }
-         if ( chainTiePoint.lon < tie.lon )
-         {
-            tie.lon = chainTiePoint.lon;
-         }
-      }
-      ++chainIdx;
-   }
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "tie point: " << tie << "\n" << MODULE << " exited...\n";
-   }
-}
-
-void ossimChipperUtil::getTiePoint(ossimSingleImageChain* chain, ossimGpt& tie)
-{
-   static const char MODULE[] = "ossimChipperUtil::getTiePoint(ossimSingleImageChain*,ossimGpt&)";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }   
-
-   if (chain && m_geom.valid() )
-   {
-      //---
-      // The view is not set yet in the chain so we get the tie point from the
-      // image handler geometry not from the chain which will come from the
-      // ossimImageRenderer.
-      //---
-      ossimRefPtr<ossimImageHandler> ih = chain->getImageHandler();
-      if ( ih.valid() )
-      {
-         ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
-         if ( geom.valid() )
-         {
-            geom->getTiePoint( tie, true );
-         }
-         
-
-         // Set height to 0.0 even though it's not used so hasNans test works.
-         tie.hgt = 0.0;
-         
-         if ( tie.hasNans() )
-         {
-            std::string errMsg = MODULE;
-            errMsg += "\ngeom->localToWorld returned nan for chain.";
-            errMsg += "\nChain: ";
-            errMsg += chain->getFilename().string();
-            throw ossimException(errMsg);
-         }
-      }
-      else
-      {
-         std::string errMsg = MODULE;
-         errMsg += "\nNo geometry for chain: ";
-         errMsg += chain->getFilename().string();
-         throw ossimException(errMsg);
-      }
-   }
-   else
-   {
-      std::string errMsg = MODULE;
-      errMsg += " ERROR: Null chain passed to method!";
-      throw ossimException(errMsg);
-   }
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "chain name: " << chain->getFilename()
-         << "\ntie point:  " << tie << "\n"
-         << MODULE << " exited...\n";
-   }
-}
-
-void ossimChipperUtil::getTiePoint(ossimDpt& tie)
-{
-   static const char MODULE[] = "ossimChipperUtil::getTiePoint(ossimDpt&)";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   std::vector< ossimRefPtr<ossimSingleImageChain> >::iterator chainIdx;
-
-   tie.makeNan();
-   
-   // Loop through dem layers.
-   ossimDpt chainTiePoint;
-   chainIdx = m_demLayer.begin();
-   while ( chainIdx != m_demLayer.end() )
-   {
-      getTiePoint( (*chainIdx).get(), chainTiePoint );
-      if ( tie.hasNans() )
-      {
-         tie = chainTiePoint;
-      }
-      else
-      {
-         if ( chainTiePoint.y > tie.y )
-         {
-            tie.y = chainTiePoint.y;
-         }
-         if ( chainTiePoint.x < tie.x )
-         {
-            tie.x = chainTiePoint.x;
-         }
-      }
-      ++chainIdx;
-   }
-
-   // Loop through image layers.
-   chainIdx = m_imgLayer.begin();
-   while ( chainIdx != m_imgLayer.end() )
-   {
-      getTiePoint( (*chainIdx).get(), chainTiePoint );
-      if ( tie.hasNans() )
-      {
-         tie = chainTiePoint;
-      }
-      else
-      {
-         if ( chainTiePoint.y > tie.y )
-         {
-            tie.y = chainTiePoint.y;
-         }
-         if ( chainTiePoint.x < tie.x )
-         {
-            tie.x = chainTiePoint.x;
-         }
-      }
-      ++chainIdx;
-   }
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "tie point: " << tie << "\n" << MODULE << " exited...\n";
-   }
-}
-
-void ossimChipperUtil::getTiePoint(ossimSingleImageChain* chain, ossimDpt& tie)
-{
-   static const char MODULE[] = "ossimChipperUtil::getTiePoint(ossimSingleImageChain*,ossimDpt&)";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }   
-
-   if (chain && m_geom.valid() )
-   {
-      //---
-      // The view is not set yet in the chain so we get the tie point from the
-      // image handler geometry not from the chain which will come from the
-      // ossimImageRenderer.
-      //---
-      ossimRefPtr<ossimImageHandler> ih = chain->getImageHandler();
-      if ( ih.valid() )
-      {
-         ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
-         if ( geom.valid() )
-         {
-            geom->getTiePoint( tie, true );
-         }
-         
-         if ( tie.hasNans() )
-         {
-            std::string errMsg = MODULE;
-            errMsg += "\ngeom->localToWorld returned nan for chain.";
-            errMsg += "\nChain: ";
-            errMsg += chain->getFilename().string();
-            throw ossimException(errMsg);
-         }
-      }
-      else
-      {
-         std::string errMsg = MODULE;
-         errMsg += "\nNo geometry for chain: ";
-         errMsg += chain->getFilename().string();
-         throw ossimException(errMsg);
-      }
-   }
-   else
-   {
-      std::string errMsg = MODULE;
-      errMsg += " ERROR: Null chain passed to method!";
-      throw ossimException(errMsg);
-   }
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "chain name: " << chain->getFilename()
-         << "\ntie point:  " << tie << "\n"
-         << MODULE << " exited...\n";
-   }
-}
-
-void ossimChipperUtil::getMetersPerPixel(ossimDpt& gsd)
-{
-   static const char MODULE[] = "ossimChipperUtil::getMetersPerPixel(ossimDpt&)";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   gsd.makeNan();
-   
-   ossimDpt chainGsd;
-   std::vector< ossimRefPtr<ossimSingleImageChain> >::iterator chainIdx;
-
-   // Loop through dem layers.
-   chainIdx = m_demLayer.begin();
-   while ( chainIdx != m_demLayer.end() )
-   {
-      getMetersPerPixel( (*chainIdx).get(), chainGsd);
-      if ( gsd.hasNans() || ( chainGsd.x < gsd.x ) ) 
-      {
-         gsd = chainGsd;
-      }
-      ++chainIdx;
-   }
-
-   // Loop through image layers.
-   chainIdx = m_imgLayer.begin();
-   while ( chainIdx != m_imgLayer.end() )
-   {
-      getMetersPerPixel( (*chainIdx).get(), chainGsd);
-      if ( gsd.hasNans() || ( chainGsd.x < gsd.x ) )
-      {
-         gsd = chainGsd;
-      }
-      ++chainIdx;
-   }
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "gsd: " << gsd << "\n" << MODULE << " exited...\n";
-   }
-}
-
-void ossimChipperUtil::getMetersPerPixel(ossimSingleImageChain* chain, ossimDpt& gsd)
-{
-   static const char MODULE[] = "ossimChipperUtil::getMetersPerPixel(ossimSingleImageChain*,ossimDpt&)";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   if (chain)
-   {
-      ossimRefPtr<ossimImageGeometry> geom = chain->getImageGeometry();
-      if ( geom.valid() )
-      {
-         geom->getMetersPerPixel( gsd );
-         if ( gsd.hasNans() )
-         {
-            std::string errMsg = MODULE;
-            errMsg += "\ngeom->getMetersPerPixel returned nan for chain.";
-            errMsg += "\nChain: ";
-            errMsg += chain->getFilename().string();
-            throw ossimException(errMsg);
-         }
-      }
-      else
-      {
-         std::string errMsg = MODULE;
-         errMsg += "\nNo geometry for chain: ";
-         errMsg += chain->getFilename().string();
-         throw ossimException(errMsg);
-      }
-   }
-   else
-   {
-      std::string errMsg = MODULE;
-      errMsg += " ERROR: Null chain passed to method!";
-      throw ossimException(errMsg);
-   }
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "chain name: " << chain->getFilename()
-         << "\nmeters per pixel: " << gsd << "\n" << MODULE << " exited...\n";
-   }
-}
-
-ossim_float64 ossimChipperUtil::getCentralMeridian() const
-{
-   ossim_float64 result = ossim::nan();
-   const char* lookup = m_kwl->find(ossimKeywordNames::CENTRAL_MERIDIAN_KW);
-   if ( lookup )
-   {
-      result = ossimString::toFloat64(lookup);
-      if ( (result < -180.0) || (result > 180.0) )
-      {
-         std::string errMsg = "central meridian range error!";
-         errMsg += " Valid range: -180 to 180";
-         throw ossimException(errMsg);
-      }
-   }
-   return result;
-}
-
-ossim_float64 ossimChipperUtil::getOriginLatitude() const
-{
-   ossim_float64 result = ossim::nan();
-   const char* lookup = m_kwl->find(ossimKeywordNames::ORIGIN_LATITUDE_KW);
-   if ( lookup )
-   {
-      result = ossimString::toFloat64(lookup);
-      if ( (result < -90) || (result > 90.0) )
-      {
-         std::string errMsg = "origin latitude range error!";
-         errMsg += " Valid range: -90 to 90";
-         throw ossimException(errMsg);
-      }
-   }
-   return result;
-}
-
-void ossimChipperUtil::getSceneCenter(ossimGpt& gpt)
-{
-   static const char MODULE[] = "ossimChipperUtil::getSceneCenter(ossimGpt&)";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   std::vector<ossimGpt> centerGptArray;
-   ossimGpt centerGpt;
-   
-   std::vector< ossimRefPtr<ossimSingleImageChain> >::iterator chainIdx;
-
-   // Loop through dem layers.
-   chainIdx = m_demLayer.begin();
-   while ( chainIdx != m_demLayer.end() )
-   {
-      getSceneCenter( (*chainIdx).get(), centerGpt);
-      if ( !centerGpt.hasNans() )
-      {
-         centerGptArray.push_back( centerGpt );
-      }
-      ++chainIdx;
-   }
-
-   // Loop through image layers.
-   chainIdx = m_imgLayer.begin();
-   while ( chainIdx != m_imgLayer.end() )
-   {
-      getSceneCenter( (*chainIdx).get(), centerGpt);
-      if ( !centerGpt.hasNans() )
-      {
-         centerGptArray.push_back( centerGpt );
-      }
-      ++chainIdx;
-   }
-
-   ossim_float64 lat = 0.0;
-   ossim_float64 lon = 0.0;
-   
-   std::vector<ossimGpt>::const_iterator pointIdx = centerGptArray.begin();
-   while ( pointIdx != centerGptArray.end() )
-   {
-      lat += (*pointIdx).lat;
-      lon += (*pointIdx).lon;
-      ++pointIdx;
-   }
-
-   lat /= centerGptArray.size();
-   lon /= centerGptArray.size();
-
-   if ( (lat >= -90.0) && (lat <= 90.0) && (lon >= -180.0) && (lon <= 180.0) )
-   {
-      gpt.lat = lat;
-      gpt.lon = lon;
-   }
-   else
-   {
-      std::ostringstream errMsg;
-      errMsg << MODULE << " range error!\nlatitude = "
-             << ossimString::toString(lat).string()
-             << "\nlongitude = "
-             << ossimString::toString(lon).string();
-      throw ossimException( errMsg.str() );
-   }
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "scene center: " << gpt << "\n" << MODULE << " exited...\n";
-   }
-}
-
-void ossimChipperUtil::getSceneCenter(ossimSingleImageChain* chain, ossimGpt& gpt)
-{
-   static const char MODULE[] =
-      "ossimChipperUtil::getSceneCenter(const ossimSingleImageChain*,ossimGpt&)";
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }   
-   
-   if (chain)
-   {
-      ossimRefPtr<ossimImageGeometry> geom = chain->getImageGeometry();
-      if ( geom.valid() )
-      {
-         ossimIrect boundingRect = chain->getBoundingRect();
-         ossimDpt midPoint = boundingRect.midPoint();
-         geom->localToWorld(midPoint, gpt);
-         gpt.hgt = 0.0;
-         
-         if ( gpt.hasNans() )
-         {
-            std::string errMsg = MODULE;
-            errMsg += "\ngeom->localToWorld returned nan for chain.";
-            errMsg += "\nChain: ";
-            errMsg += chain->getFilename().string();
-            throw ossimException(errMsg);
-         }
-      }
-      else
-      {
-         std::string errMsg = MODULE;
-         errMsg += "\nNo geometry for chain: ";
-         errMsg += chain->getFilename().string();
-         throw ossimException(errMsg);
-      }
-   }
-   else
-   {
-      std::string errMsg = MODULE;
-      errMsg += " ERROR: Null chain passed to method!";
-      throw ossimException(errMsg);
-   }
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "chain name: " << chain->getFilename()
-         << "\nscene center: " << gpt << "\n"
-         << MODULE << " exited...\n";
-   }
-}
-
-ossimRefPtr<ossimMapProjection> ossimChipperUtil::getFirstInputProjection()
-{
-   static const char MODULE[] = "ossimChipperUtil::getFirstInputProjection";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   ossimRefPtr<ossimImageHandler>  ih     = 0;
-   ossimRefPtr<ossimMapProjection> result = 0;
-
-   // Get the first image handler.
-   if ( m_demLayer.size() )
-   {
-      ih = m_demLayer[0]->getImageHandler();
-   }
-   else if ( m_imgLayer.size() )
-   {
-      ih = m_imgLayer[0]->getImageHandler();
-   }
-   
-   if ( ih.valid() )
-   {
-      // Get the geometry from the first image handler.      
-      ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
-      if ( geom.valid() )
-      {
-         // Get the image projection.
-         ossimRefPtr<ossimProjection> proj = geom->getProjection();
-         if ( proj.valid() )
-         {
-            // Cast and assign to result.
-            ossimMapProjection* mapProj = PTR_CAST( ossimMapProjection, proj.get() );
-            if (mapProj)
-            {
-               // Must duplicate in case the output projection gets modified.
-               result = (ossimMapProjection*) mapProj->dup();
-            }
-            if ( !result.valid() && traceDebug() )
-            {
-               ossimNotify(ossimNotifyLevel_WARN) << "Could not cast to map projection.\n";
-            }
-         }
-         else if ( traceDebug() )
-         {
-            ossimNotify(ossimNotifyLevel_WARN) << "No projection in first chain...\n";
-         }
-      }
-   }
-   else if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << "No image handler in first chain...\n";
-   }
-   
-   if ( traceDebug() )
-   {
-      if ( result.valid() )
-      {
-         result->print(ossimNotify(ossimNotifyLevel_DEBUG));
-      }
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
-   }
-   
-   return result;
-}
-
-ossimRefPtr<ossimMapProjection> ossimChipperUtil::getNewGeoProjection()
-{
-   return ossimRefPtr<ossimMapProjection>(new ossimEquDistCylProjection());
-}
-
-ossimRefPtr<ossimMapProjection> ossimChipperUtil::getNewGeoScaledProjection()
-{
-   // Make projection:
-   ossimRefPtr<ossimMapProjection> result = getNewGeoProjection();
-
-   // Set the origin for scaling:
-   
-   // First check for user set "central_meridian" and "origin_latitude":
-   ossimGpt origin;
-   origin.lat = getOriginLatitude();
-   origin.lon = getCentralMeridian();
-   origin.hgt = 0.0;
-   
-   if ( origin.hasNans() )
-   {
-      // Use the scene center from the input.
-      getSceneCenter( origin );
-
-      //---
-      // Note only latitude used for scaling, origin kept at 0.0.
-      // This is a fix/hack for ossimEquDistCylProjection wrapping issues.
-      //---
-      origin.lon = 0.0;
-   }
-
-   if ( !origin.hasNans() )
-   {
-      result->setOrigin(origin);
-   }
-   else
-   {
-      std::string errMsg = "ossimChipperUtil::getNewGeoScaledProjection ERROR";
-      errMsg += "\nOrigin has nans!";
-      throw ossimException(errMsg);
-   }
-   
-   return result;
-}
-
-ossimRefPtr<ossimMapProjection> ossimChipperUtil::getNewProjectionFromSrsCode(
-   const ossimString& code)
-{
-   ossimRefPtr<ossimMapProjection> result = 0;
-
-   if (code == "4326")  // Avoid factory call for this.
-   {
-      result = new ossimEquDistCylProjection();
-   }
-   else
-   {
-      ossimRefPtr<ossimProjection> proj = ossimProjectionFactoryRegistry::instance()->
-         createProjection(code);
-      if ( proj.valid() )
-      {
-         result = PTR_CAST( ossimMapProjection, proj.get() );
-      }
-   }
-   return result;
-}
-
-ossimRefPtr<ossimMapProjection> ossimChipperUtil::getNewUtmProjection()
-{
-   // Make projection:
-   ossimRefPtr<ossimUtmProjection> utm = new ossimUtmProjection;
-
-   // First check for user set "central_meridian" and "origin_latitude":
-   ossimGpt origin;
-   origin.lat = getOriginLatitude();
-   origin.lon = getCentralMeridian();
-   origin.hgt = 0.0;
-   
-   if ( origin.hasNans() )
-   {
-      // Use the scene center from the input.
-      getSceneCenter( origin );
-   }
-
-   if ( !origin.hasNans() )
-   {
-      utm->setZone(origin);
-      utm->setHemisphere(origin);
-   }
-   else
-   {
-      std::string errMsg = "ossimChipperUtil::getNewUtmProjection ERROR";
-      errMsg += "\nOrigin has nans!";
-      throw ossimException(errMsg);
-   }
-
-   return ossimRefPtr<ossimMapProjection>(utm.get());
-}
-
-ossimRefPtr<ossimMapProjection> ossimChipperUtil::getMapProjection()
-{
-   ossimRefPtr<ossimMapProjection> mp = 0;
-   if ( m_geom.valid() )
-   {
-      mp = dynamic_cast<ossimMapProjection*>( m_geom->getProjection() );
-   }
-   return mp;
-}
-
-ossimRefPtr<ossimImageFileWriter> ossimChipperUtil::createNewWriter() const
-{
-   static const char MODULE[] = "ossimChipperUtil::createNewWriter()";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   ossimFilename outputFile;
-   getOutputFilename(outputFile);
-
-   if ( outputFile == ossimFilename::NIL)
-   {
-      std::string errMsg = MODULE;
-      errMsg += " ERROR no output file name!";
-      throw ossimException(errMsg);
-   }
-
-   ossimRefPtr<ossimImageFileWriter> writer = 0;
-   
-   const char* lookup = m_kwl->find( WRITER_KW );
-   if ( lookup ) // User defined.
-   {
-      writer = ossimImageWriterFactoryRegistry::instance()->createWriter(ossimString(lookup));
-
-      if ( !writer.valid() )
-      {
-         std::string errMsg = MODULE;
-         errMsg += " ERROR creating writer: ";
-         errMsg += lookup;
-         throw ossimException(errMsg);
-      }
-   }
-   else // Create from output file extension.
-   {
-      writer = ossimImageWriterFactoryRegistry::instance()->
-         createWriterFromExtension( outputFile.ext() );
-
-      if ( !writer.valid() )
-      {
-         std::string errMsg = MODULE;
-         errMsg += " ERROR creating writer from extension: ";
-         errMsg += outputFile.ext().string();
-         throw ossimException(errMsg);
-      }
-   }
-
-   // Set the output name.
-   writer->setFilename( outputFile );
-
-   // Add any writer props.
-   ossim_uint32 count = m_kwl->numberOf(WRITER_PROPERTY_KW);
-   for (ossim_uint32 i = 0; i < count; ++i)
-   {
-      ossimString key = WRITER_PROPERTY_KW;
-      key += ossimString::toString(i);
-      lookup = m_kwl->find( key.c_str() );
-      if ( lookup )
-      {
-         ossimString s = lookup;
-         std::vector<ossimString> splitArray;
-         s.split(splitArray, "=");
-         if(splitArray.size() == 2)
-         {
-            ossimRefPtr<ossimProperty> prop =
-               new ossimStringProperty(splitArray[0], splitArray[1]);
-
-            if ( traceDebug() )
-            {
-               ossimNotify(ossimNotifyLevel_DEBUG)
-                  << "Setting writer prop: " << splitArray[0] << "=" << splitArray[1] << "\n";
-            }
-            
-            writer->setProperty( prop );
-         }
-      }
-   }
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "writer name: " << writer->getClassName() << "\n"
-         << MODULE << " exited...\n";
-   }
-
-   return writer;
-}
-
-void ossimChipperUtil::propagateOutputProjectionToChains()
-{
-   static const char MODULE[] = "ossimChipperUtil::propagateOutputProjectionToChains()";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   std::vector< ossimRefPtr<ossimSingleImageChain> >::iterator chainIdx;
-
-   // Loop through dem layers.
-   chainIdx = m_demLayer.begin();
-   while ( chainIdx != m_demLayer.end() )
-   {
-      ossimRefPtr<ossimImageRenderer> resampler = (*chainIdx)->getImageRenderer();
-      if ( resampler.valid() )
-      {
-         resampler->setView( m_geom.get() );
-      }
-      else
-      {
-         std::string errMsg = MODULE;
-         errMsg += " chain has no resampler!";
-         throw( ossimException(errMsg) );
-      }
-      ++chainIdx;
-   }
-
-   // Loop through image layers.
-   chainIdx = m_imgLayer.begin();
-   while ( chainIdx != m_imgLayer.end() )
-   {
-      ossimRefPtr<ossimImageRenderer> resampler = (*chainIdx)->getImageRenderer();
-      if ( resampler.valid() )
-      {
-         resampler->setView( m_geom.get() );
-      }
-      else
-      {
-         std::string errMsg = MODULE;
-         errMsg += " chain has no resampler!";
-         throw( ossimException(errMsg) );
-      }
-      ++chainIdx;
-   }
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
-   }
-}
-
-ossimRefPtr<ossimImageSource> ossimChipperUtil::combineLayers(
-   std::vector< ossimRefPtr<ossimSingleImageChain> >& layers) const
-{
-   static const char MODULE[] = "ossimChipperUtil::combineLayers(layers)";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   ossimRefPtr<ossimImageSource> result = 0;
-
-   if ( layers.size() == 1 )
-   {
-      result = layers[0].get();
-   }
-   else if ( layers.size() > 1 )
-   {
-      result = new ossimImageMosaic;
-
-      std::vector< ossimRefPtr<ossimSingleImageChain> >::iterator chainIdx = layers.begin();
-      while ( chainIdx != layers.end() )
-      {
-         result->connectMyInputTo( (*chainIdx).get() );
-         ++chainIdx;
-      }
-   }
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
-   }
-
-   return result;
-}
-
-ossimRefPtr<ossimImageSource> ossimChipperUtil::combineLayers()
-{
-   static const char MODULE[] = "ossimChipperUtil::combineLayers()";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   ossimRefPtr<ossimImageSource> result = 0;
-
-   ossim_uint32 layerCount = (ossim_uint32) (m_demLayer.size() + m_imgLayer.size());
-
-   if ( layerCount )
-   {
-      if ( layerCount == 1 )
-      {
-         if ( m_imgLayer.size() )
-         {
-            result = m_imgLayer[0].get();
-         }
-         else
-         {
-            result = m_demLayer[0].get();
-         }
-      }
-      else
-      {
-         result = new ossimImageMosaic;
-         
-         // Combine the images.  Note we'll put the images on top of the dems.
-         if ( m_imgLayer.size() )
-         {
-            std::vector< ossimRefPtr<ossimSingleImageChain> >::iterator chainIdx =
-               m_imgLayer.begin();
-            while ( chainIdx !=  m_imgLayer.end() )
-            {
-               result->connectMyInputTo( (*chainIdx).get() );
-               ++chainIdx;
-            }
-         }
-         if ( m_demLayer.size() ) // Combine any dem layers.
-         {
-            std::vector< ossimRefPtr<ossimSingleImageChain> >::iterator chainIdx =
-               m_demLayer.begin();
-            while ( chainIdx != m_demLayer.end() )
-            {
-               result->connectMyInputTo( (*chainIdx).get() );
-               ++chainIdx;
-            }
-         }
-      }
-   }
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
-   }
-   
-   return result;
-}
-
-ossimRefPtr<ossimImageSource> ossimChipperUtil::combine2CmvLayers()
-{
-   static const char MODULE[] = "ossimChipperUtil::combine2CmvLayers()";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   ossimRefPtr<ossimImageSource> result = 0;
-
-   ossim_uint32 layerCount = (ossim_uint32) (m_demLayer.size() + m_imgLayer.size());
-
-   // Must have two and only two inputs.
-   if ( layerCount == 2 )
-   {     
-      ossimRefPtr<ossimConnectableObject> oldImg = 0;
-      ossimRefPtr<ossimConnectableObject> newImg = 0;
-
-      //---
-      // Expecting two image layers.  We'll code it for flexabilty though...
-      // - Take old and new from m_imgLayer if present.
-      // - Use m_demLayer only if missing.
-      // - Using first image found as old, second new.
-      //---
-
-      // Most likely case, two image layers.
-      if ( m_imgLayer.size() )
-      {
-         oldImg = m_imgLayer[0].get();
-         
-         if ( m_imgLayer.size() == 2 )
-         {
-            newImg = m_imgLayer[1].get();
-         }
-      }
-
-      if ( m_demLayer.size() )
-      {
-         if ( !oldImg.valid() )
-         {
-            oldImg = m_demLayer[0].get();
-         }
-
-         if ( !newImg.valid() )
-         {
-            if ( m_demLayer.size() == 1 )
-            {
-               newImg = m_demLayer[0].get();
-            }
-            else if ( m_demLayer.size() == 2 )
-            {
-               newImg = m_demLayer[1].get();
-            }
-         }
-      }
-
-      if ( newImg.valid() && oldImg.valid() )
-      {
-         // Input 0 is old, 1 is new.
-         ossimRefPtr<ossimTwoColorView> tcmv = new ossimTwoColorView;
-         tcmv->connectMyInputTo( 0, oldImg.get() );
-         tcmv->connectMyInputTo( 1, newImg.get() );
-
-         // Look for 2cmv options.
-         ossim_uint32 oldInputBandIndex = 0;
-         ossim_uint32 newInputBandIndex = 0;
-         ossimTwoColorView::ossimTwoColorMultiViewOutputSource redOutputSource = ossimTwoColorView::OLD;
-         ossimTwoColorView::ossimTwoColorMultiViewOutputSource grnOutputSource = ossimTwoColorView::NEW;
-         ossimTwoColorView::ossimTwoColorMultiViewOutputSource bluOutputSource = ossimTwoColorView::NEW;
-
-         ossimString os;
-         std::string key = TWOCMV_OLD_INPUT_BAND_KW;
-         std::string val = m_kwl->findKey( key );
-         
-         if ( val.size() )
-         {
-            os = val;
-            oldInputBandIndex = os.toUInt32();
-         }
-         
-         key = TWOCMV_NEW_INPUT_BAND_KW;
-         val = m_kwl->findKey( key );
-         if ( val.size() )
-         {
-            os = val;
-            newInputBandIndex = os.toUInt32();
-         }
-
-         key = TWOCMV_RED_OUTPUT_SOURCE_KW;
-         val = m_kwl->findKey( key );
-         if ( val.size() )
-         {
-            os = val;
-            os.downcase();
-            
-            if ( os == "new" )
-            {
-               redOutputSource = ossimTwoColorView::NEW;
-            }
-            else if ( os == "MIN" )
-            {
-               redOutputSource = ossimTwoColorView::MIN;
-            }
-         }
-
-         key = TWOCMV_GREEN_OUTPUT_SOURCE_KW;
-         val = m_kwl->findKey( key );
-         if ( val.size() )
-         {
-            os = val;
-            os.downcase();
-            
-            if ( os == "old" )
-            {
-               grnOutputSource = ossimTwoColorView::OLD;
-            }
-            else if ( os == "MIN" )
-            {
-               grnOutputSource = ossimTwoColorView::MIN;
-            }
-         }
-
-         key = TWOCMV_BLUE_OUTPUT_SOURCE_KW;
-         val = m_kwl->findKey( key );
-         if ( val.size() )
-         {
-            os = val;
-            os.downcase();
-            
-            if ( os == "old" )
-            {
-               bluOutputSource = ossimTwoColorView::OLD;
-            }
-            else if ( os == "MIN" )
-            {
-               bluOutputSource = ossimTwoColorView::MIN;
-            }
-         }
-
-         // Set options.
-         tcmv->setBandIndexMapping( oldInputBandIndex,
-                                    newInputBandIndex,
-                                    redOutputSource,
-                                    grnOutputSource,
-                                    bluOutputSource );
-         tcmv->initialize();
-
-         result = tcmv.get();
-      }
-   }
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
-   }
-   
-   return result;
-}
-
-ossimRefPtr<ossimImageSource> ossimChipperUtil::addIndexToRgbLutFilter(
-   ossimRefPtr<ossimImageSource> &source) const
-{
-   static const char MODULE[] = "ossimChipperUtil::addIndexToRgbLutFilter(source)";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   ossimRefPtr<ossimImageSource> result = 0;
-
-   if ( source.valid() )
-   {
-      ossimRefPtr<ossimIndexToRgbLutFilter> lut = new ossimIndexToRgbLutFilter();
-      ossimFilename lutFile = m_kwl->find( LUT_FILE_KW );
-      if ( lutFile.exists() )
-      {
-         lut->setLut(lutFile);
-         
-         // Connect to dems:
-         lut->connectMyInputTo( source.get() );
-
-         // Note sure about this.  Make option maybe? (drb)
-         lut->setInterpolationType(ossimIndexToRgbLutFilter::ossimIndexToRgbLutFilter_LINEAR);
-         
-         // Set as color source for bump shade.
-         result = lut.get();
-      }
-      else
-      {
-         std::string errMsg = MODULE;
-         errMsg += " color table does not exists: ";
-         errMsg += lutFile.string();
-         throw ossimException(errMsg);
-      }
-   }
-   else
-   {
-      std::string errMsg = MODULE;
-      errMsg += " ERROR: Null source passed to method!";
-      throw ossimException(errMsg);
-   }
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
-   }
-
-   return result;
-}
-
-ossimRefPtr<ossimImageSource> ossimChipperUtil::addScalarRemapper(
-   ossimRefPtr<ossimImageSource> &source, ossimScalarType scalar) const
-{
-   static const char MODULE[] = "ossimChipperUtil::addScalarRemapper(source)";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   ossimRefPtr<ossimImageSource> result = 0;
-   
-   if ( source.valid() )
-   {
-      if ( ( scalar != OSSIM_SCALAR_UNKNOWN ) && ( source->getOutputScalarType() != scalar ) )
-      {
-         ossimRefPtr<ossimScalarRemapper> remapper = new ossimScalarRemapper();
-         remapper->setOutputScalarType(scalar);
-         remapper->connectMyInputTo( source.get() );
-         result = remapper.get();
-         
-         if ( traceDebug() )
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "\nOutput remapped to: "
-               << ossimScalarTypeLut::instance()->getEntryString(scalar) << "\n";
-         }
-      }
-      else
-      {
-         result = source;
-      }
-   }
-   else
-   {
-      std::string errMsg = MODULE;
-      errMsg += " ERROR: Null source passed to method!";
-      throw ossimException(errMsg);
-   }
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " exited...\n";
-   }
-   
-   return result;
-}
-
-bool ossimChipperUtil::setupChainHistogram( ossimRefPtr<ossimSingleImageChain>& chain) const
-{
-   static const char MODULE[] = "ossimChipperUtil::setupChainHistogram(chain)";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   } 
-   
-   bool result = false;
-
-   if ( chain.valid() )
-   {
-      ossimRefPtr<ossimHistogramRemapper> remapper = chain->getHistogramRemapper();
-
-      if ( remapper.valid() )
-      {
-         if ( remapper->getHistogramFile() == ossimFilename::NIL )
-         {
-            ossimRefPtr<ossimImageHandler> ih = chain->getImageHandler();
-            if ( ih.valid() )
-            {
-               ossimFilename f = ih->getFilenameWithThisExtension( ossimString("his") );
-
-               if ( f.empty() || (f.exists() == false) )
-               {
-                  // For backward compatibility check if single entry and _e0.his
-                  f = ih->getFilenameWithThisExtension( ossimString("his"), true );
-               }
-
-               if ( remapper->openHistogram( f ) == false )
-               {
-                  ossimNotify(ossimNotifyLevel_WARN)
-                     << MODULE << " WARNING:"
-                     << "\nCould not open:  " << f << "\n";
-               }
-            }
-         }
-
-         if ( remapper->getHistogramFile() != ossimFilename::NIL )
-         {
-            const char* lookup = m_kwl->find(HISTO_OP_KW);
-            if (lookup)
-            {
-               result = true;
-               
-               // Enable.
-               remapper->setEnableFlag(true);
-               
-               // Set the histo mode:
-               ossimString op = lookup;
-               op.downcase();
-               if ( op == "auto-minmax" )
-               {
-                  remapper->setStretchMode( ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX );
-               }
-               else if ( (op == "std-stretch-1") || (op == "std-stretch 1") )
-               {
-                  remapper->setStretchMode( ossimHistogramRemapper::LINEAR_1STD_FROM_MEAN );
-               } 
-               else if ( (op == "std-stretch-2") || (op == "std-stretch 2") )
-               {
-                  remapper->setStretchMode( ossimHistogramRemapper::LINEAR_2STD_FROM_MEAN );
-               } 
-               else if ( (op == "std-stretch-3") || (op == "std-stretch 3") )
-               {
-                  remapper->setStretchMode( ossimHistogramRemapper::LINEAR_3STD_FROM_MEAN );
-               }
-               else
-               {
-                  result = false;
-                  remapper->setEnableFlag(false);
-                  ossimNotify(ossimNotifyLevel_WARN)
-                     << MODULE << "\nUnhandled operation: " << op << "\n";
-               }
-            }
-         }
-      }
-   }
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
-   }
-   
-   return result;
-}
-
-bool ossimChipperUtil::setChainEntry(
-   ossimRefPtr<ossimSingleImageChain>& chain, ossim_uint32 entryIndex ) const
-{
-   bool result = false;
-   if ( chain.valid() )
-   {
-      ossimRefPtr<ossimImageHandler> ih = chain->getImageHandler();
-      if ( ih.valid() )
-      {
-         result = ih->setCurrentEntry( entryIndex );
-      }
-   }
-   return result;
-}
-
-void ossimChipperUtil::getOutputFilename(ossimFilename& f) const
-{
-   static const char MODULE[] = "ossimChipperUtil::getOutputFilename()";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   } 
-
-   const char* lookup =  m_kwl->find( ossimKeywordNames::OUTPUT_FILE_KW );
-   if ( lookup )
-   {
-      f = lookup;
-   }
-   else
-   {
-      f = ossimFilename::NIL;
-   }
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
-   }   
-}
-
-void ossimChipperUtil::getAreaOfInterest(ossimImageSource* source, ossimIrect& rect) const
-{
-   static const char MODULE[] = "ossimChipperUtil::getAreaOfInterest()";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
-   }
-
-   // Nan rect for starters.
-   rect.makeNan();
-   
-   if ( source )
-   {
-      if ( m_geom.valid() )
-      {
-         if ( m_kwl->find( CUT_CENTER_LAT_KW ) ) 
-         {
-            // "Cut Center" with: --cut-center-llwh or --cut-center-llr:
-
-            const char* latStr = m_kwl->find( CUT_CENTER_LAT_KW );
-            const char* lonStr = m_kwl->find( CUT_CENTER_LON_KW );
-            if ( latStr && lonStr )
-            {
-               ossimGpt centerGpt;
-
-               //---
-               // Want the height nan going into worldToLocal call so it gets picked
-               // up by the elevation manager.
-               //---
-               centerGpt.makeNan(); 
-
-               centerGpt.lat = ossimString(latStr).toFloat64();
-               centerGpt.lon = ossimString(lonStr).toFloat64();
-
-               if ( !centerGpt.isLatNan() && !centerGpt.isLonNan() )
-               {
-                  // Ground "cut center" to view:
-                  ossimDpt centerDpt(0.0, 0.0);
-                  m_geom->worldToLocal(centerGpt, centerDpt);
-
-                  if ( !centerDpt.hasNans() )
-                  {
-                     if ( isIdentity() && m_ivt.valid() ) // Chipping in image space.
-                     {
-                        // Tranform image center point to view:
-                        ossimDpt ipt = centerDpt;
-                        m_ivt->imageToView( ipt, centerDpt );
-                     }
-                     
-                     // --cut-center-llwh:
-                     const char* widthStr  = m_kwl->find( CUT_CENTER_WIDTH_KW );
-                     const char* heightStr = m_kwl->find( CUT_CENTER_HEIGHT_KW );
-                     if ( widthStr && heightStr )
-                     {
-                        ossim_int32 width  = ossimString(widthStr).toInt32();
-                        ossim_int32 height = ossimString(heightStr).toInt32();
-                        if ( width && height )
-                        {
-                           ossimIpt ul( ossim::round<int>(centerDpt.x - (width/2)),
-                                        ossim::round<int>(centerDpt.y - (height/2)) );
-                           ossimIpt lr( (ul.x + width - 1), ul.y + height - 1);
-                           rect = ossimIrect(ul, lr);
-                        }
-                     }
-                     else // --cut-center-llr: 
-                     {
-                        const char* radiusStr = m_kwl->find( CUT_CENTER_RADIUS_KW );
-                        if ( radiusStr )
-                        {
-                           ossim_float64 radius = ossimString(radiusStr).toFloat64();
-                           if ( radius )
-                           {
-                              ossimDpt mpp;
-                              m_geom->getMetersPerPixel( mpp );
-
-                              if ( !mpp.hasNans() )
-                              {
-                                 ossim_float64 rx = radius/mpp.x;
-                                 ossim_float64 ry = radius/mpp.y;
-                                 
-                                 ossimIpt ul( ossim::round<int>( centerDpt.x - rx ),
-                                              ossim::round<int>( centerDpt.y - ry ) );
-                                 ossimIpt lr( ossim::round<int>( centerDpt.x + rx ),
-                                              ossim::round<int>( centerDpt.y + ry ) );
-                                 rect = ossimIrect(ul, lr);
-                              }
-                           }
-                        }
-                     }
-                  }
-                  
-               } // Matches: if ( !centerGpt.hasNans() )
-               
-            } // Matches: if ( latStr && lonStr )
-            
-         } // Matches: if ( m_kwl->find( CUT_CENTER_LAT_KW ) )
-         
-         else if ( m_kwl->find( CUT_MAX_LAT_KW ) ) // --cut-bbox-ll
-         {
-            const char* maxLat = m_kwl->find( CUT_MAX_LAT_KW );
-            const char* maxLon = m_kwl->find( CUT_MAX_LON_KW );
-            const char* minLat = m_kwl->find( CUT_MIN_LAT_KW );
-            const char* minLon = m_kwl->find( CUT_MIN_LON_KW );
-         
-            if ( maxLat && maxLon && minLat && minLon )
-            {
-               ossim_float64 minLatF = ossimString(minLat).toFloat64();
-               ossim_float64 maxLatF = ossimString(maxLat).toFloat64();
-
-               //---
-               // Check for swap so we don't get a negative height.
-               // Note no swap check for longitude as box could cross date line.
-               //---
-               if ( minLatF > maxLatF )
-               {
-                  ossim_float64 tmpF = minLatF;
-                  minLatF = maxLatF;
-                  maxLatF = tmpF;
-               }
-            
-               ossimGpt gpt(0.0, 0.0, 0.0);
-               ossimDpt ulPt;
-               ossimDpt lrPt;
-            
-               // Upper left:
-               gpt.lat = maxLatF;
-               gpt.lon = ossimString(minLon).toFloat64();
-               m_geom->worldToLocal(gpt, ulPt);
-            
-               // Lower right:
-               gpt.lat = minLatF;
-               gpt.lon = ossimString(maxLon).toFloat64();
-               m_geom->worldToLocal(gpt, lrPt);
-
-               if ( isIdentity() && m_ivt.valid() )
-               {
-                  // Chipping in image space:
-                  
-                  // Tranform image ul point to view:
-                  ossimDpt ipt = ulPt;
-                  m_ivt->imageToView( ipt, ulPt );
-                  
-                  // Tranform image lr point to view:
-                  ipt = lrPt;
-                  m_ivt->imageToView( ipt, lrPt );
-               }
-            
-               rect = ossimIrect( ossimIpt(ulPt), ossimIpt(lrPt) );
-            }
-         }
-
-         // If no user defined rect set to scene bounding rect.
-         if ( rect.hasNans() ) 
-         {
-            rect = source->getBoundingRect(0);
-         }
-      
-      } // if ( m_getOuputGeometry.valid() )
-      else
-      {
-         // Should never happer...
-         std::string errMsg = MODULE;
-         if ( !source )
-         {
-            errMsg += " image source null!";
-         }
-         else
-         {
-            errMsg += " output projection null!";
-         }
-         throw( ossimException(errMsg) );
-      }
-
-   } // if ( source )
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "aoi: " << rect << "\n"
-         << MODULE << " exited...\n";
-   }
-   
-} // End: ossimChipperUtil::getAreaOfInterest
-
-void ossimChipperUtil::initializeThumbnailProjection(const ossimIrect& originalRect,
-                                                  ossimIrect& adjustedRect)
-{
-   static const char MODULE[] = "ossimChipperUtil::initializeThumbnailProjection";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " entered...\n"
-         << "origial rect:  " << originalRect << "\n";
-
-      if (m_geom.valid())
-      {
-         m_geom->print(ossimNotify(ossimNotifyLevel_DEBUG));
-      }
-   }
-   
-   if ( !originalRect.hasNans() && m_geom.valid() )
-   {
-      //---
-      // Thumbnail setup:
-      //---
-      const char* thumbRes = m_kwl->find(THUMBNAIL_RESOLUTION_KW);
-      if ( thumbRes )
-      {
-         ossim_float64 thumbSize = ossimString(thumbRes).toFloat64();
-         ossim_float64 maxRectDimension =
-            ossim::max( originalRect.width(), originalRect.height() );
-         
-         if ( maxRectDimension > thumbSize )
-         {
-            // Need to adjust scale:
-            
-            // Get the corners:
-            ossimGpt ulGpt;
-            ossimGpt lrGpt;
-            ossimDpt dpt;
-            
-            m_geom->localToWorld(ossimDpt(originalRect.ul()), ulGpt);
-            m_geom->localToWorld(ossimDpt(originalRect.lr()), lrGpt);         
-            
-            ossim_float64 scale = maxRectDimension / thumbSize;
-
-            //---
-            // Adjust the projection scale.  Note the "true" is to recenter
-            // the tie point so it falls relative to the projection origin.
-            //
-            // This call also scales: ossimImageGeometry::m_imageSize
-            //---
-            m_geom->applyScale(ossimDpt(scale, scale), true);
-
-            // Must call to reset the ossimImageRenderer's bounding rect for each input.
-            propagateOutputProjectionToChains();
-            
-            // Get the new upper left in view space.
-            m_geom->worldToLocal(ulGpt, dpt);
-            ossimIpt ul(dpt);
-            
-            // Get the new lower right in view space.
-            m_geom->worldToLocal(lrGpt, dpt);
-            ossimIpt lr(dpt);
-
-            // Clamp to thumbnail bounds.
-            ossim_int32 ts = thumbSize;
-
-            if ( (lr.x - ul.x + 1) > ts )
-            {
-               lr.x = ul.x + ts - 1;
-            }
-            if ( (lr.y - ul.y + 1) > ts )
-            {
-               lr.y = ul.y + ts - 1;
-            }
-            
-            adjustedRect = ossimIrect(ul, lr);
-         }
-      }
-      
-   } // if ( !originalRect.hasNans() && m_geom.valid() )
-   else
-   {
-      // Should never happer...
-      std::string errMsg = MODULE;
-      if ( originalRect.hasNans() )
-      {
-         errMsg += " passed in rect has nans!";
-      }
-      else
-      {
-         errMsg += " output projection null!";
-      }
-      throw( ossimException(errMsg) );
-   }
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << "\nadjusted rect: " << adjustedRect << "\n";
-      if (m_geom.valid())
-      {
-         m_geom->print(ossimNotify(ossimNotifyLevel_DEBUG));
-      }
-      ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exited...\n";
-   }
-}
-
-bool ossimChipperUtil::hasBandSelection() const
-{
-   bool result = false;
-   if ( m_kwl.valid() )
-   {
-      result = ( m_kwl->find( ossimKeywordNames::BANDS_KW ) != 0 );
-   }
-   return result;
-}
-
-void ossimChipperUtil::getBandList( std::vector<ossim_uint32>& bandList ) const
-{
-   bandList.clear();
-   if ( m_kwl.valid() )
-   {
-      std::string s = m_kwl->findKey( std::string( ossimKeywordNames::BANDS_KW ) );
-      if ( s.size() )
-      {
-         ossimString os = s;
-         std::vector<ossimString> band_list(0);
-         os.split( band_list, ossimString(","), false );
-         if ( band_list.size() )
-         {
-            std::vector<ossimString>::const_iterator i = band_list.begin();
-            while ( i != band_list.end() )
-            {
-               ossim_uint32 band = (*i).toUInt32();
-               if ( band ) // One based so we need to subtract.
-               {
-                  bandList.push_back( band - 1 );
-               }
-               ++i;
-            }
-         }
-      }
-   }
-   
-} // End: ossimChipperUtil::getBandList
-
-bool ossimChipperUtil::hasLutFile() const
-{
-   bool result = false;
-   if ( m_kwl.valid() )
-   {
-      result = ( m_kwl->find( LUT_FILE_KW ) != 0 );
-   }
-   return result;
-}
-
-bool ossimChipperUtil::hasBumpShadeArg() const
-{
-   bool result = ( m_operation == OSSIM_CHIPPER_OP_HILL_SHADE );
-   if ( !result && m_kwl.valid() )
-   {
-      result = ( m_kwl->find( ossimKeywordNames::AZIMUTH_ANGLE_KW ) ||
-                 m_kwl->find( COLOR_RED_KW ) ||
-                 m_kwl->find( COLOR_GREEN_KW ) ||
-                 m_kwl->find( COLOR_BLUE_KW ) ||
-                 m_kwl->find( ossimKeywordNames::ELEVATION_ANGLE_KW ) ||
-                 m_kwl->find( GAIN_KW ) );
-   }
-   return result;
-}
-
-bool ossimChipperUtil::hasThumbnailResolution() const
-{
-   bool result = false;
-   if ( m_kwl.valid() )
-   {
-      result = ( m_kwl->find(THUMBNAIL_RESOLUTION_KW) != 0 );
-   }
-   return result;
-}
-
-bool ossimChipperUtil::hasHistogramOperation() const
-{
-   bool result = false;
-   
-   if ( m_kwl.valid() )
-   {
-      result = ( m_kwl->find(HISTO_OP_KW) != 0 );
-   }
-   // No option for this right now.  Only through src file.
-   return result;
-}
-
-bool ossimChipperUtil::isDemFile(const ossimFilename& file) const
-{
-   bool result = false;
-   ossimString ext = file.ext();
-   if ( ext.size() >= 2 )
-   {
-      ext.downcase();
-      if ( ( ext == "hgt" ) ||
-           ( ext == "dem" ) ||
-          ( ( (*ext.begin()) == 'd' ) && ( (*(ext.begin()+1)) == 't' ) ) )
-      {
-         result = true;
-      }
-   }
-   return result;
-}
-
-bool ossimChipperUtil::isSrcFile(const ossimFilename& file) const
-{
-   bool result = false;
-   ossimString ext = file.ext();
-   ext.downcase();
-   if ( ext == "src" )
-   {
-      result = true;
-   }
-   return result;
-}
-
-ossimScalarType ossimChipperUtil::getOutputScalarType() const
-{
-   ossimScalarType scalar = OSSIM_SCALAR_UNKNOWN;
-   const char* lookup = m_kwl->find(OUTPUT_RADIOMETRY_KW);
-   if ( lookup )
-   {
-      scalar = ossimScalarTypeLut::instance()->getScalarTypeFromString( ossimString(lookup) );
-   }
-   if ( scalar == OSSIM_SCALAR_UNKNOWN )
-   {
-      // deprecated keyword...
-      if ( keyIsTrue( std::string(SCALE_2_8_BIT_KW) ) )
-      {
-         scalar = OSSIM_UINT8;
-      }
-   }
-   return scalar;
-}
-
-bool ossimChipperUtil::scaleToEightBit() const
-{
-   bool result = false;
-   if ( ( m_operation == OSSIM_CHIPPER_OP_COLOR_RELIEF ) || // Always 8 bit...
-        ( getOutputScalarType() == OSSIM_UINT8 ) )
-   {
-      result = true;
-   }
-   return result;
-}
-
-bool ossimChipperUtil::snapTieToOrigin() const
-{
-   return keyIsTrue( std::string(SNAP_TIE_TO_ORIGIN_KW) );
-}
-
-ossim_float64 ossimChipperUtil::getRotation() const
-{
-   ossim_float64 result = ossim::nan();
-   if ( m_kwl.valid() )
-   {
-      std::string value = m_kwl->findKey(std::string(ROTATION_KW));
-      if ( value.size() )
-      {
-         result = ossimString(value).toFloat64();
-         if ( result < 0 )
-         {
-            result += 360.0;
-         }
-
-         // Range check:
-         if ( ( result < 0.0 ) || ( result > 360.0 ) )
-         {
-            std::ostringstream errMsg;
-            errMsg << "ossimChipperUtil::getRotation range error!\n"
-                   << "rotation = " << result
-                   << "\nMust be between 0 and 360.";
-            throw ossimException( errMsg.str() );
-         }
-      }
-   }
-   return result;
-}
-
-bool ossimChipperUtil::upIsUp() const
-{
-   return keyIsTrue( std::string(UP_IS_UP_KW) );
-}
-
-bool ossimChipperUtil::hasRotation() const
-{
-   bool result = false;
-   std::string value = m_kwl->findKey(std::string(ROTATION_KW));
-   if ( value.size() )
-   {
-      result = true;
-   }
-   return result;
-}
-
-bool ossimChipperUtil::northUp() const
-{
-   return keyIsTrue( std::string(NORTH_UP_KW) );
-}
-
-bool ossimChipperUtil::isIdentity() const
-{
-   return (m_operation == OSSIM_CHIPPER_OP_CHIP);
-}
-
-bool ossimChipperUtil::keyIsTrue( const std::string& key ) const
-{
-   bool result = false;
-   if ( m_kwl.valid() )
-   {
-      std::string value = m_kwl->findKey( key );
-      if ( value.size() )
-      {
-         result = ossimString(value).toBool();
-      }
-   }
-   return result;
-}
-
-ossim_uint32 ossimChipperUtil::getEntryNumber() const
-{
-   ossim_uint32 result = 0;
-   if ( m_kwl.valid() )
-   {
-      std::string value = m_kwl->findKey( std::string( ossimKeywordNames::ENTRY_KW ) );
-      if ( value.size() )
-      {
-         result = ossimString(value).toUInt32();
-      }
-   }
-   return result;
-}
-
-bool ossimChipperUtil::hasSensorModelInput() const
-{
-   bool result = false;
-
-   // Test image layers.
-   std::vector< ossimRefPtr<ossimSingleImageChain> >::const_iterator chainIdx = m_imgLayer.begin();
-   while ( chainIdx != m_imgLayer.end() )
-   {
-      // Get the image handler:
-      ossimRefPtr<ossimImageHandler>  ih = (*chainIdx)->getImageHandler();
-      if ( ih.valid() )
-      {
-         // Get the geometry from the first image handler.      
-         ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
-         if ( geom.valid() )
-         {
-            // Get the image projection.
-            ossimRefPtr<ossimProjection> proj = geom->getProjection();
-            if ( proj.valid() )
-            {
-               // Cast and assign to result.
-               ossimMapProjection* mapProj = PTR_CAST( ossimMapProjection, proj.get() );
-               if ( !mapProj )
-               {
-                  result = true;
-                  break;
-               }
-            }
-         }
-      }   
-      ++chainIdx;
-   }
-
-   if ( !result )
-   {
-      // Test dem layers.
-      chainIdx = m_demLayer.begin();
-      while ( chainIdx != m_demLayer.end() )
-      {
-         // Get the image handler:
-         ossimRefPtr<ossimImageHandler>  ih = (*chainIdx)->getImageHandler();
-         if ( ih.valid() )
-         {
-            // Get the geometry from the first image handler.      
-            ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
-            if ( geom.valid() )
-            {
-               // Get the image projection.
-               ossimRefPtr<ossimProjection> proj = geom->getProjection();
-               if ( proj.valid() )
-               {
-                  // Cast and assign to result.
-                  ossimMapProjection* mapProj = PTR_CAST( ossimMapProjection, proj.get() );
-                  if ( !mapProj )
-                  {
-                     result = true;
-                     break;
-                  }
-               }
-            }
-         }   
-         ++chainIdx;
-      }
-   }
-   
-   return result;
-}
-
-void  ossimChipperUtil::initializeSrcKwl()
-{
-   static const char MODULE[] = "ossimChipperUtil::initializeSrcKwl";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " entered...\n";
-   }
-
-   std::string value = m_kwl->findKey(std::string(SRC_FILE_KW));
-   if ( value.size() )
-   {
-      m_srcKwl = new ossimKeywordlist();
-      m_srcKwl->setExpandEnvVarsFlag(true);
-      if ( m_srcKwl->addFile( value.c_str() ) == false )
-      {
-         m_srcKwl = 0;
-      }
-   }
-   else
-   {
-      m_srcKwl = 0; 
-   }
-
-   if ( traceDebug() )
-   {
-      if ( m_srcKwl.valid() )
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "src keyword list:\n" << *(m_srcKwl.get()) << "\n";
-      }
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " exited...\n";
-   }
-}
-
-ossim_uint32 ossimChipperUtil::getNumberOfInputs() const
-{
-   ossim_uint32 result = 0;
-   if ( m_kwl.valid() )
-   {
-      result += m_kwl->numberOf(DEM_KW);
-      result += m_kwl->numberOf(IMG_KW);
-   }
-   if ( m_srcKwl.valid() )
-   {
-      result += m_srcKwl->numberOf(DEM_KW);
-      result += m_srcKwl->numberOf(IMG_KW);
-   }
-   return result;
-}
-
-ossimChipperUtil::ossimChipperOutputProjection ossimChipperUtil::getOutputProjectionType() const
-{
-   ossimChipperOutputProjection result = ossimChipperUtil::OSSIM_CHIPPER_PROJ_UNKNOWN;
-   const char* op  = m_kwl->find(ossimKeywordNames::PROJECTION_KW);
-   if ( op )
-   {
-      ossimString os = op;
-      os.downcase();
-      if (os == "geo")
-      {
-         result = ossimChipperUtil::OSSIM_CHIPPER_PROJ_GEO;
-      }
-      else if (os == "geo-scaled")
-      {
-         result = ossimChipperUtil::OSSIM_CHIPPER_PROJ_GEO_SCALED;
-      }
-      else if ( os == "input" )
-      {
-         result = ossimChipperUtil::OSSIM_CHIPPER_PROJ_INPUT;
-      }
-      else if ( (os == "utm") || (os == "ossimutmprojection") )
-      {
-         result = ossimChipperUtil::OSSIM_CHIPPER_PROJ_UTM;
-      }
-   }
-   return result;
-}
-
-void ossimChipperUtil::usage(ossimArgumentParser& ap)
-{
-   // Add global usage options.
-   ossimInit::instance()->addOptions(ap);
-   
-   // Set app name.
-   std::string appName = ap.getApplicationName();
-   ap.getApplicationUsage()->setApplicationName( ossimString( appName ) );
-
-   // Add options.
-   addArguments(ap);
-   
-   // Write usage.
-   ap.getApplicationUsage()->write(ossimNotify(ossimNotifyLevel_INFO));
-
-   // Keeping single line in tact for examples for cut and paste purposes.
-   ossimNotify(ossimNotifyLevel_INFO)
-      << "\nExample commands:\n"
-
-      << "\n// A two color multi view with cut box.  First image is old, second image is new:\n"
-      << appName << " --cut-bbox-ll 28.092885092033352 -80.664539599998633 28.109128691071547 -80.626914963229325 --op 2cmv oldMLB.tif newMLB.tif outputs/2cmv-test1.tif\n"
-
-      << "\n// Ortho about point, 512x512, with histogram stretch, and 3,2,1 band order:\n"
-      << appName << " --op ortho -b 3,2,1 --histogram-op auto-minmax --cut-center-llwh -42.819784401784275 147.265811350983 512 512 5V090205M0001912264B220000100072M_001508507.ntf orth.tif\n"
-
-      << "\n// Chip, in image space, about point, 512x512, with histogram stretch, and 3,2,1 band order:\n"
-      << appName << " --op chip -b 3,2,1 --histogram-op auto-minmax --cut-center-llwh -42.819784401784275 147.265811350983 512 512 5V090205M0001912264B220000100072M_001508507.ntf chip.tif\n"
-
-      << "\n// Chip in image space, rotate \"up is up\"(-u option) about point, 512x512 with histogram stretch and 3,2,1 band order:\n"
-      << appName << " --op chip -u -b 3,2,1 --histogram-op auto-minmax --cut-center-llwh -42.819784401784275 147.265811350983 512 512 5V090205M0001912264B220000100072M_001508507.ntf up-is-up-chip.tif\n"
-
-      << "\n// Chip in image space, rotate 39 degrees (-r option) about point, 1024x1024, scaled to eight bit:\n"
-      << appName << " --op chip -r 39 --histogram-op auto-minmax --cut-center-llwh -42.883809539602893 147.331984112985765 1024 1024 --scale-to-8-bit 5V090205P0001912264B220000100282M_001508507.ntf outputs/r39.png\n"
-
-      << "\n// Above command where all options are in a keyword list:\n"
-      << appName << " --options-keyword-list r39-options.kwl\n"
-      << std::endl;
-}
diff --git a/src/ossim/util/ossimFileWalker.cpp b/src/ossim/util/ossimFileWalker.cpp
deleted file mode 100644
index 30710c8..0000000
--- a/src/ossim/util/ossimFileWalker.cpp
+++ /dev/null
@@ -1,504 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossimFileWalker.h
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:
-//
-// Utility class to walk through directories and get a list of files to
-// process.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/util/ossimFileWalker.h>
-#include <ossim/base/ossimDirectory.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/parallel/ossimJobQueue.h>
-#include <OpenThreads/Thread>
-
-static ossimTrace traceDebug(ossimString("ossimFileWalker:debug"));
-
-ossimFileWalker::ossimFileWalker()
-   : m_processFileCallBackPtr(0),
-     m_jobQueue(new ossimJobMultiThreadQueue(new ossimJobQueue(), 1)),     
-     m_filteredExtensions(0),
-     m_recurseFlag(true),
-     m_waitOnDirFlag(false),
-     m_abortFlag(false),
-     m_mutex()
-{
-}
-
-ossimFileWalker::~ossimFileWalker()
-{
-   m_jobQueue = 0; // Not a leak, ref pointer.
-}
-
-void ossimFileWalker::walk(const std::vector<ossimFilename>& files)
-{
-   static const char M[] = "ossimFileWalker::walk";
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered\n";
-   }
-
-   if ( files.size() )
-   {
-      std::vector<ossimFilename>::const_iterator i = files.begin();
-      while ( i != files.end() )
-      {
-         // Must have call back set at this point.
-         if ( !m_abortFlag && m_processFileCallBackPtr )
-         {
-            ossimFilename file = (*i).expand();
-            if ( file.size() && file.exists() )
-            {
-               if ( file.isDir() ) // Directory:
-               {
-                  walkDir(file);
-               }  
-               else // File:
-               {
-                  if ( isFiltered(file) == false )
-                  {
-                     if(traceDebug())
-                     {
-                        ossimNotify(ossimNotifyLevel_DEBUG)
-                           << "Making the job for: " << (*i) << std::endl;
-                     }
-                     
-                     // Make the job:
-                     ossimRefPtr<ossimFileWalkerJob> job =
-                        new ossimFileWalkerJob( m_processFileCallBackPtr, file );
-                     
-                     job->setName( ossimString( file.string() ) );
-                     
-                     job->setCallback( new ossimFileWalkerJobCallback() );
-                     
-                     // Set the state to ready:
-                     job->ready();
-                     
-                     // Add job to the queue:
-                     m_jobQueue->getJobQueue()->add( job.get() );
-                     
-                     m_mutex.lock();
-                     if ( m_abortFlag )
-                     {
-                        // Clear out the queue.
-                        m_jobQueue->getJobQueue()->clear();
-                        
-                        break; // Callee set our abort flag so break out of loop.
-                     }
-                     m_mutex.unlock();
-                  }
-               }
-            }
-         }
-
-         ++i;
-      
-      } // while ( i != files.end() )
-
-      // FOREVER loop until all jobs are completed.
-      while (1)
-      {
-         if ( OpenThreads::Thread::microSleep(250) == 0 )
-         {
-            if ( m_jobQueue->hasJobsToProcess() == false )
-            {
-               break;
-            }
-         }
-      }
-
-   } // if ( files.size() )
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exiting...\n";
-   }  
-}
-
-void ossimFileWalker::walk(const ossimFilename& root)
-{
-   static const char M[] = "ossimFileWalker::walk";
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered root=" << root << "\n";
-   }
-
-   // Must have call back set at this point.
-   if ( !m_abortFlag && m_processFileCallBackPtr )
-   {
-      ossimFilename rootFile = root.expand();
-      if ( rootFile.size() && rootFile.exists() )
-      {
-         if ( rootFile.isDir() )
-         {
-            walkDir(rootFile);
-
-            // FOREVER loop until all jobs are completed.
-            while (1)
-            {
-               if ( OpenThreads::Thread::microSleep(250) == 0 )
-               {
-                  if ( m_jobQueue->hasJobsToProcess() == false )
-                  {
-                     break;
-                  }
-               }
-            }
-         }
-         else
-         {
-            // Single file no job queue needed.
-            if ( isFiltered(rootFile) == false )
-            {
-               m_processFileCallBackPtr->operator()(rootFile);
-            }
-         }
-      }
-   }
-   
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exiting...\n";
-   }  
-}
-
-void ossimFileWalker::walkDir(const ossimFilename& dir)
-{
-   static const char M[] = "ossimFileWalker::walkDir";
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << M << " entered...\n" << "processing dir: " << dir << "\n";
-   }
-
-   // List of directories in this directory...
-   std::vector<ossimFilename> dirs;
-   
-   // List of files in this directory...
-   std::vector<ossimFilename> files;
-
-   m_mutex.lock();
-   ossimDirectory d;
-   bool ossimDirectoryStatus = d.open(dir);
-   m_mutex.unlock();
-
-   if ( ossimDirectoryStatus )
-   {
-      // Loop to get the list of files and directories in this directory.
-      m_mutex.lock();
-      ossimFilename f;
-      bool valid_file = d.getFirst(f);
-      while ( valid_file )
-      {
-         if ( isFiltered(f) == false )
-         {
-            if (f.isDir())
-            {
-               dirs.push_back(f);
-            }
-            else
-            {
-               files.push_back(f);
-            }
-         }
-         valid_file = d.getNext(f);
-      }
-      m_mutex.unlock();
-
-      //---
-      // Process files first before recursing directories.  If a file is a directory base image,
-      // e.g. RPF, then the callee should call ossimFileWalker::setRecurseFlag to false to
-      // stop us from going into sub directories.
-      //---
-      std::vector<ossimFilename>::const_iterator i = files.begin();
-      while (i != files.end())
-      {
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG) << "Making the job for: " << (*i) << std::endl;
-         }
-         
-         // Make the job:
-         ossimRefPtr<ossimFileWalkerJob> job =
-            new ossimFileWalkerJob( m_processFileCallBackPtr, (*i) );
-
-         job->setName( ossimString( (*i).string() ) );
-
-         job->setCallback( new ossimFileWalkerJobCallback() );
-
-         // Set the state to ready:
-         job->ready();
-
-         // Add job to the queue:
-         m_jobQueue->getJobQueue()->add( job.get() );
-
-         m_mutex.lock();
-         if ( m_abortFlag )
-         {
-            // Clear out the queue.
-            m_jobQueue->getJobQueue()->clear();
-            
-            break; // Callee set our abort flag so break out of loop.
-         }
-         m_mutex.unlock();
-
-         ++i;
-      }
-
-      if ( m_waitOnDirFlag )
-      {
-         // FOREVER loop until all jobs are completed.
-         while (1)
-         {
-            if ( OpenThreads::Thread::microSleep(250) == 0 )
-            {
-               if ( m_jobQueue->hasJobsToProcess() == false )
-               {
-                  break;
-               }
-            }
-         }
-      }
-
-      m_mutex.lock();
-      if ( !m_abortFlag && m_recurseFlag )
-      {
-         // Process sub directories...
-         i = dirs.begin();
-         while (i != dirs.end())
-         {
-            m_mutex.unlock();
-            walkDir( (*i) );
-            m_mutex.lock();
-
-            if ( m_abortFlag )
-            {
-               break; // Callee set our abort flag so break out of loop.
-            }
-            ++i;
-         }
-      }
-      m_mutex.unlock();
-      
-   } // if ( ossimDirectoryOpenStatus )
-
-   // Reset the m_recurseFlag.
-   m_mutex.lock();
-   m_recurseFlag = true;
-   m_mutex.unlock();
-   
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
-   }
-}
-
-bool ossimFileWalker::isFiltered(const ossimFilename& file) const
-{
-   bool result = false;
-   if ( file.size() )
-   {
-      if ( isDotFile(file) )
-      {
-         result = true;
-      }
-      else if ( file[file.size()-1] == '~' )
-      {
-         result = true;
-      }
-      else 
-      {
-         std::string ext = file.ext().downcase().c_str();
-         if ( ext.size() )
-         {
-            std::vector<std::string>::const_iterator i = m_filteredExtensions.begin();
-            while ( i != m_filteredExtensions.end() )
-            {
-               if ( ext == (*i) )
-               {
-                  result = true;
-                  break;
-               }
-               ++i;
-            }
-         }
-      }
-   }
-#if 0 /* Please leave for debug. (drb) */
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "ossimFileWalker::isFiltered file " << (result?"filtered: ":"not filtered: ")
-         << file << "\n";
-   }
-#endif
-   
-   return result;
-}
-
-bool ossimFileWalker::isDotFile(const ossimFilename& f) const
-{
-   bool result = false;
-   
-   // Get the size in bytes.
-   if ( f.size() )
-   {
-      std::string::size_type firstDotPos = f.find('.');
-      if ( firstDotPos == 0 )
-      {
-         result = true;
-      }
-      else if ( firstDotPos != std::string::npos ) // Dot in file.
-      {
-         // Get the position of first dot from the end.
-         std::string::size_type lastDotPos = f.find_last_of('.');
-         if ( lastDotPos != std::string::npos )
-         {
-            // Make copy.
-            ossimFilename f2 = f;
-            
-            // Convert an '\'s to '/'s. 
-            f2.convertBackToForwardSlashes();
-            
-            // Find the first slash from end.
-            std::string::size_type lastSlashPos = f2.find_last_of('/');
-            
-            if (lastSlashPos != std::string::npos) // Found a slash.
-            {
-               if ( (lastSlashPos+1) == lastDotPos )
-               {
-                  // dot in front of slash like /home/foo/.xemacs
-                  result = true;
-               }
-            }
-         }
-      }
-   }
-
-   return result;
-}
-
-const std::vector<std::string>& ossimFileWalker::getFilteredExtensions() const
-{
-   return m_filteredExtensions;
-}
-
-std::vector<std::string>& ossimFileWalker::getFilteredExtensions()
-{
-   return m_filteredExtensions;
-}
-
-void ossimFileWalker::initializeDefaultFilterList()
-{
-   m_mutex.lock();
-   
-   // Common extensions to filter out, most common first.
-   m_filteredExtensions.push_back(std::string("ovr"));
-   m_filteredExtensions.push_back(std::string("omd"));
-   m_filteredExtensions.push_back(std::string("his"));
-   m_filteredExtensions.push_back(std::string("geom"));
-   
-   // The rest alphabetical.
-   m_filteredExtensions.push_back(std::string("aux"));
-   m_filteredExtensions.push_back(std::string("bin"));
-   m_filteredExtensions.push_back(std::string("dbf"));
-   m_filteredExtensions.push_back(std::string("hdr"));
-   m_filteredExtensions.push_back(std::string("jpw"));
-   m_filteredExtensions.push_back(std::string("kwl"));
-   m_filteredExtensions.push_back(std::string("log"));
-   m_filteredExtensions.push_back(std::string("out"));
-   m_filteredExtensions.push_back(std::string("prj"));
-   m_filteredExtensions.push_back(std::string("save"));
-   m_filteredExtensions.push_back(std::string("sdw"));
-   m_filteredExtensions.push_back(std::string("sh"));   
-   m_filteredExtensions.push_back(std::string("shx"));
-   m_filteredExtensions.push_back(std::string("spec"));
-   m_filteredExtensions.push_back(std::string("statistics"));
-   m_filteredExtensions.push_back(std::string("tfw"));
-   m_filteredExtensions.push_back(std::string("tmp"));
-   m_filteredExtensions.push_back(std::string("txt"));
-
-   m_mutex.unlock();
-}
-
-void ossimFileWalker::setRecurseFlag(bool flag)
-{
-   m_mutex.lock();
-   m_recurseFlag = flag;
-   m_mutex.unlock();
-}
-
-void ossimFileWalker::setWaitOnDirFlag(bool flag)
-{
-   m_mutex.lock();
-   m_waitOnDirFlag = flag;
-   m_mutex.unlock();
-}
-
-void ossimFileWalker::setAbortFlag(bool flag)
-{
-   m_mutex.lock();
-   m_abortFlag = flag;
-   m_mutex.unlock();
-}
-
-void ossimFileWalker::setNumberOfThreads(ossim_uint32 nThreads)
-{
-   m_mutex.lock();
-   m_jobQueue->setNumberOfThreads(nThreads);
-   m_mutex.unlock();
-}
-
-void ossimFileWalker::registerProcessFileCallback(
-   ossimCallback1<const ossimFilename&>* cb)
-{
-   m_mutex.lock();
-   m_processFileCallBackPtr = cb;
-   m_mutex.unlock();
-}
-
-ossimFileWalker::ossimFileWalkerJob::ossimFileWalkerJob(
-   ossimCallback1<const ossimFilename&>* cb,
-   const ossimFilename& file)
-   : m_processFileCallBackPtr(cb),
-     m_file(file)
-{
-}
-
-void ossimFileWalker::ossimFileWalkerJob::start()
-{
-   if ( m_processFileCallBackPtr && m_file.size() )
-   {
-      m_processFileCallBackPtr->operator()(m_file);
-   }
-}
-
-ossimFileWalker::ossimFileWalkerJobCallback::ossimFileWalkerJobCallback()
-   : ossimJobCallback()
-{
-}
-
-void ossimFileWalker::ossimFileWalkerJobCallback::started(ossimJob* job)
-{
-   ossimJobCallback::started(job);
-}
-
-void ossimFileWalker::ossimFileWalkerJobCallback::finished(ossimJob* job)
-{
-   ossimJobCallback::finished(job);
-}
-
-void ossimFileWalker::ossimFileWalkerJobCallback::canceled(ossimJob* job)
-{
-   ossimJobCallback::canceled(job);
-}
diff --git a/src/ossim/util/ossimImageUtil.cpp b/src/ossim/util/ossimImageUtil.cpp
deleted file mode 100644
index 0891cfe..0000000
--- a/src/ossim/util/ossimImageUtil.cpp
+++ /dev/null
@@ -1,1511 +0,0 @@
-//----------------------------------------------------------------------------
-// File: ossimImageUtil.cpp
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: ossimImageUtil class definition
-//
-// Utility class for processing image recursively.  This is for doing things like:
-// building overview, histograms, compute min/max, extract vertices.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/util/ossimImageUtil.h>
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <ossim/base/ossimCallback1.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimContainerProperty.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimDatumFactoryRegistry.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimObjectFactoryRegistry.h>
-#include <ossim/base/ossimEllipsoid.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimGeoidManager.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimPreferences.h>
-#include <ossim/base/ossimProperty.h>
-#include <ossim/base/ossimPropertyInterface.h>
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimXmlDocument.h>
-#include <ossim/elevation/ossimElevManager.h>
-#include <ossim/imaging/ossimFilterResampler.h>
-#include <ossim/imaging/ossimHistogramWriter.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/imaging/ossimImageHistogramSource.h>
-#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
-#include <ossim/imaging/ossimOverviewBuilderFactoryRegistry.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/plugin/ossimSharedPluginRegistry.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/support_data/ossimSupportFilesList.h>
-#include <ossim/util/ossimFileWalker.h>
-
-#include <iomanip>
-#include <string>
-#include <vector>
-
-static std::string COPY_ALL_FLAG_KW           = "copy_all_flag";
-static std::string CREATE_HISTOGRAM_KW        = "create_histogram";
-static std::string CREATE_HISTOGRAM_FAST_KW   = "create_histogram_fast";
-static std::string CREATE_HISTOGRAM_R0_KW     = "create_histogram_r0";
-static std::string CREATE_OVERVIEWS_KW        = "create_overviews";
-static std::string FALSE_KW                   = "false";
-static std::string FILE_KW                    = "file";
-static std::string INTERNAL_OVERVIEWS_FLAG_KW = "internal_overviews_flag";
-static std::string OUTPUT_DIRECTORY_KW        = "output_directory";
-static std::string OUTPUT_FILENAMES_KW        = "output_filenames";
-static std::string OVERVIEW_STOP_DIM_KW       = "overview_stop_dimension";
-static std::string OVERVIEW_TYPE_KW           = "overview_type";
-static std::string READER_PROP_KW             = "reader_prop";
-static std::string REBUILD_HISTOGRAM_KW       = "rebuild_histogram";
-static std::string REBUILD_OVERVIEWS_KW       = "rebuild_overviews";
-static std::string SCAN_MIN_MAX_KW            = "scan_for_min_max";
-static std::string SCAN_MIN_MAX_NULL_KW       = "scan_for_min_max_null";
-static std::string THREADS_KW                 = "threads";
-static std::string TILE_SIZE_KW               = "tile_size";
-static std::string TRUE_KW                    = "true";
-static std::string WRITER_PROP_KW             = "writer_prop";
-
-//---
-// Call back class to register with ossimFileWalker for call to
-// ossimImageUtil::processFile
-//
-// Placed here as it is unique to this class.
-//---
-class ProcessFileCB: public ossimCallback1<const ossimFilename&>
-{
-public:
-   ProcessFileCB(
-      ossimImageUtil* obj,
-      void (ossimImageUtil::*func)(const ossimFilename&))
-      :
-      m_obj(obj),
-      m_func(func)
-   {}
-      
-   virtual void operator()(const ossimFilename& file) const
-   {
-      (m_obj->*m_func)(file);
-   }
-
-private:
-   ossimImageUtil* m_obj;
-   void (ossimImageUtil::*m_func)(const ossimFilename& file);
-};
-
-
-// Static trace for debugging.  Use -T ossimImageUtil to turn on.
-static ossimTrace traceDebug = ossimTrace("ossimImageUtil:debug");
-
-ossimImageUtil::ossimImageUtil()
-   :
-   m_kwl( new ossimKeywordlist() ),
-   m_fileWalker(0),
-   m_mutex(),
-   m_errorStatus(0)
-{
-}
-
-ossimImageUtil::~ossimImageUtil()
-{
-   if ( m_fileWalker )
-   {
-      delete m_fileWalker;
-      m_fileWalker = 0;
-   }
-}
-
-void ossimImageUtil::addArguments(ossimArgumentParser& ap)
-{
-   // Set the general usage:
-   ossimApplicationUsage* au = ap.getApplicationUsage();
-   ossimString usageString = ap.getApplicationName();
-   usageString += " [options] <file-or-directory-to-walk>";
-   au->setCommandLineUsage(usageString);
-
-   // Set the command line options:
-   au->addCommandLineOption("-a or --include-fullres", "Copy full res dataset to overview file as well as building reduced res sets. Option only valid with tiff overview builder. Requires -o option.");
-
-   au->addCommandLineOption("--compression-quality", "Compression quality for TIFF JPEG takes values from 0 to 100, where 100 is best.  For J2K plugin, numerically_lossless, visually_lossless, lossy");
-   
-   au->addCommandLineOption("--compression-type", "Compression type can be: deflate, jpeg, lzw, none or packbits");
-
-   au->addCommandLineOption("--ch or --create-histogram", "Computes full histogram alongside overview.");
-   
-   au->addCommandLineOption("--chf or --create-histogram-fast", "Computes a histogram in fast mode which samples partial tiles.");
-
-   au->addCommandLineOption("--create-histogram-r0", "Forces create-histogram code to compute a histogram using r0 instead of the starting resolution for the overview builder. Can require a separate pass of R0 layer if the base image has built in overviews.");
-
-   au->addCommandLineOption("-d", "<output_directory> Write overview to output directory specified.");
-
-   au->addCommandLineOption("--of or --output-files", "Output image files we can open, exluding overviews.");
-   
-   au->addCommandLineOption("-h", "Display this information");
-
-   au->addCommandLineOption("-i or --internal-overviews", "Builds internal overviews. Requires -o option. Option only valid with tiff input image and tiff overview builder. WARNING: Modifies source image and cannot be undone!");
-   
-   au->addCommandLineOption("--list-entries", "Lists the entries within the image");
-
-   au->addCommandLineOption("-o", "Creates overviews. (default=ossim_tiff_box)");
-
-   au->addCommandLineOption("--ot", "<overview_type> Overview type. see list at bottom for valid types. (default=ossim_tiff_box)");
-
-   au->addCommandLineOption("-r or --rebuild-overviews", "Rebuild overviews even if they are already present.");
-   
-   au->addCommandLineOption("--rebuild-histogram", "Rebuild histogram even if they are already present.");
-
-   au->addCommandLineOption("--reader-prop", "Adds a property to send to the reader. format is name=value");
-
-   au->addCommandLineOption("-s",  "Stop dimension for overviews.  This controls how \nmany layers will be built. If set to 64 then the builder will stop when height and width for current level are less than or equal to 64.  Note a default can be set in the ossim preferences file by setting the keyword \"overview_stop_dimension\".");
-
-   au->addCommandLineOption("--tile-size", "<size> Defines the tile size for overview builder.  Tiff option only. Must be a multiple of 16. Size will be used in both x and y directions. Note a default can be set in your ossim preferences file by setting the key \"tile_size\".");
-
-   au->addCommandLineOption("--threads", "<threads> The number of threads to use. (default=1) Note a default can be set in your ossim preferences file by setting the key \"ossim_threads\".");
-
-   au->addCommandLineOption("--scanForMinMax", "Turns on min, max scanning when reading tiles. This option assumes the null is known.");
-
-   au->addCommandLineOption("--scanForMinMaxNull", "Turns on min, max, null scanning when reading tiles.  This option tries to find a null value which is useful for float data.");
-
-   au->addCommandLineOption("--writer-prop", "Adds a property to send to the writer. format is name=value");
-   
-} // void ossimImageUtil::addArguments(ossimArgumentParser& ap)
-
-bool ossimImageUtil::initialize(ossimArgumentParser& ap)
-{
-   static const char M[] = "ossimImageUtil::initialize(ossimArgumentParser&)";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
-   }
-
-   bool result = true;
-
-   if ( (ap.argc() == 1) || ap.read("-h") || ap.read("--help") )
-   {
-      usage(ap);
-
-      // continue_after_init to false
-      result = false;
-   }
-   else
-   {
-      //---
-      // Start with clean options keyword list.
-      //---
-      m_kwl->clear();
-
-      while ( 1 ) //  While forever loop...
-      {
-         // Used throughout below:
-         std::string ts1;
-         ossimArgumentParser::ossimParameter sp1(ts1);
-         std::string ts2;
-         ossimArgumentParser::ossimParameter sp2(ts2);
-
-         if( ap.read("-a") || ap.read("--include-fullres") )
-         {
-            setCopyAllFlag( true );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--compression-quality", sp1) )
-         {
-            if ( ts1.size() )
-            {
-               setCompressionQuality( ts1 );
-            }
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--compression-type", sp1) )
-         {
-            if ( ts1.size() )
-            {
-               setCompressionType( ts1 );
-            }
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-         
-         if( ap.read("--ch") || ap.read("--create-histogram") )
-         {
-            setCreateHistogramFlag( true );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-         
-         if( ap.read("--chf") || ap.read("--create-histogram-fast") )
-         {
-            setCreateHistogramFastFlag( true );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-         
-         if( ap.read("--create-histogram-r0") )
-         {
-            setCreateHistogramR0Flag( true );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-         
-         if( ap.read("-d", sp1) )
-         {
-            setOutputDirectory( ts1 );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("-i") || ap.read("--internal-overviews") )
-         {
-            setInternalOverviewsFlag( true );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--of") || ap.read("--output-files") )
-         {
-            setOutputFileNamesFlag( true );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-         
-         if( ap.read("-o") )
-         {
-            setCreateOverviewsFlag( true );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }        
-         
-         if( ap.read("--ot", sp1) )
-         {
-            setOverviewType( ts1 );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-         
-         if( ap.read("-r") || ap.read("--rebuild-overviews") )
-         {
-            setRebuildOverviewsFlag( true );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--rebuild-histogram") )
-         {
-            setRebuildHistogramFlag( true );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         while(ap.read("--reader-prop", sp1))
-         {
-            if (ts1.size())
-            {
-               std::string key = READER_PROP_KW;
-               key += ossimString::toString( getNextReaderPropIndex() ).string();
-               addOption( key, ts1 );
-            }
-         }
-         if ( ap.argc() < 2 )
-         {
-            break;
-         }
-         
-         if( ap.read("--scanForMinMax" ) )
-         {
-            setScanForMinMax( true );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--scanForMinMaxNull" ) )
-         {
-            setScanForMinMaxNull( true );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-         
-         if( ap.read("-s", sp1) )
-         {
-            setOverviewStopDimension( ts1 );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if ( ap.read("-tile-size", sp1))
-         {
-            setTileSize( ossimString(ts1).toInt32() );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--threads", sp1) )
-         {
-            m_kwl->addPair( THREADS_KW, ts1 );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         while(ap.read("--writer-prop", sp1))
-         {
-            if (ts1.size())
-            {
-               std::string key = WRITER_PROP_KW;
-               key += ossimString::toString( getNextWriterPropIndex() ).string();
-               addOption( key, ts1 );
-            }
-         }
-         if ( ap.argc() < 2 )
-         {
-            break;
-         }
-
-         // End of arg parsing.
-         ap.reportRemainingOptionsAsUnrecognized();
-         if ( ap.errors() )
-         {
-            ap.writeErrorMessages(ossimNotify(ossimNotifyLevel_NOTICE));
-            std::string errMsg = "Unknown option...";
-            throw ossimException(errMsg);
-         }
-
-         break; // Break from while forever.
-         
-      } // End while (forever) loop.
-
-      if(ap.argc() > 1)
-      {
-         for (ossim_int32 i = 0; i < (ap.argc()-1); ++i)
-         {
-            ossimString kw = "file";
-            kw += ossimString::toString(i);
-            std::string value = ap[i+1];
-            m_kwl->addPair(kw.string(), value, true);
-         }
-      }
-      else
-      {
-         usage(ap);
-         result = false;
-      }
-
-   } // not usage
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "m_kwl:\n" << *(m_kwl.get()) << "\n"
-         << M << " exit result = " << (result?"true":"false")
-         << "\n";
-   }
-   
-   return result;
-}
-
-ossim_int32 ossimImageUtil::execute()
-{
-   static const char M[] = "ossimImageUtil::execute()";
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
-   }
-
-   if ( !m_fileWalker )
-   {
-      m_fileWalker = new ossimFileWalker();
-   }
-   
-   // Get the number of "file*" keywords.
-   ossim_uint32 fileCount = m_kwl->numberOf("file");
-
-   if ( fileCount )
-   {
-      m_fileWalker->initializeDefaultFilterList();
-      
-      m_fileWalker->setNumberOfThreads( getNumberOfThreads() );
-
-      // Must set this so we can stop recursion on directory based images.
-      m_fileWalker->setWaitOnDirFlag( true );
-
-      ossimCallback1<const ossimFilename&>* cb =
-         new ProcessFileCB(this, &ossimImageUtil::processFile);
-
-      m_fileWalker->registerProcessFileCallback(cb);
-      
-      // Wrap in try catch block as excptions can be thrown under the hood.
-      try
-      {
-         // Get the list of files passed to us:
-         std::vector<ossimFilename> files;
-         ossim_uint32 processedFiles = 0;;
-         ossim_uint32 i = 0;
-         while ( processedFiles < fileCount )
-         {
-            ossimString kw = FILE_KW;
-            kw += ossimString::toString(i);
-            std::string lookup = m_kwl->findKey( kw.string() );
-            if ( lookup.size() )
-            {
-               files.push_back( ossimFilename(lookup) );
-               ++processedFiles;
-            }
-            
-            ++i;
-            if ( i > (fileCount + 100) ) break;
-         }
-
-         // Process the files:
-         m_fileWalker->walk( files ); 
-      }
-      catch (const ossimException& e)
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "Caught exception: " << e.what() << endl;
-         setErrorStatus( ossimErrorCodes::OSSIM_ERROR );
-      }
-      
-      // cleanup:
-      if ( cb )
-      {
-         delete cb;
-         cb = 0;
-      }
-      
-   } // if ( fileCount )
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << M << " exit status: " << m_errorStatus << std::endl;
-   }
-   
-   // Zero is good, non zero is bad.
-   return m_errorStatus; 
-}
-
-//---
-// This method is called back by the ossimFileWalker::walk method for each file it finds that it
-// deems can be processed.
-//---
-void ossimImageUtil::processFile(const ossimFilename& file)
-{
-   static const char M[] = "ossimImageUtil::processFile";
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << M << " entered...\n" << "file: " << file << "\n";
-   }
-
-   ossimNotify(ossimNotifyLevel_NOTICE) << "Processing file: " << file << "\n";
-
-   m_mutex.lock();
-   ossimRefPtr<ossimImageHandler> ih =
-      ossimImageHandlerRegistry::instance()->open(file, true, true);
-
-
-   m_mutex.unlock();
-
-   if ( ih.valid() && !ih->hasError() )
-   {
-      if ( isDirectoryBasedImage( ih.get() ) )
-      {
-         // Tell the walker not to recurse this directory.
-         m_mutex.lock();
-         m_fileWalker->setRecurseFlag(false);
-         m_mutex.unlock();
-      }
-
- 
-      // Set any reader props:
-      ossimPropertyInterface* pi = dynamic_cast<ossimPropertyInterface*>(ih.get());
-      if ( pi ) setProps(pi);
-
-      bool consumedHistogramOptions  = false;
-      bool consumedCmmOptionsOptions = false;
- 
-      if ( getOutputFileNamesFlag() )
-      {
-         // Simply output the file name of any images we can open:
-         ossimNotify(ossimNotifyLevel_NOTICE) << ih->getFilename().expand(); 
-      }
-     
-      if ( createOverviews() )
-      {
-         // Skip shape files...
-         if ( ih->getClassName() != "ossimOgrGdalTileSource" )
-         {
-            createOverview(ih, consumedHistogramOptions, consumedCmmOptionsOptions);
-         }
-      }
-
-      // Build stand alone histogram.  Note the overview sequencer may have computed for us.
-      if ( hasHistogramOption() && !consumedHistogramOptions)
-      {
-         createHistogram( ih );
-      }
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << M << "\nCould not open: " << file << std::endl;
-   }
-   
-   if(traceDebug())
-   {
-      // Since ossimFileWalker is threaded output the file so we know which job exited.
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << "\nfile: " << file << "\nexited...\n";
-   }
-}
-
-// Create overview for image:
-void ossimImageUtil::createOverview(ossimRefPtr<ossimImageHandler>& ih,
-                                    bool& consumedHistogramOptions,
-                                    bool& /* consumedCmmOptions */)
-{
-   static const char M[] = "ossimImageUtil::createOverview #1";
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
-   }
-    
-   if ( ih.valid() )
-   {
-      // Get the entry list:
-      std::vector<ossim_uint32> entryList;
-      ih->getEntryList(entryList);
-      
-      bool useEntryIndex = false;
-      if ( entryList.size() )
-      {
-         if ( (entryList.size() > 1) || (entryList[0] != 0) ) useEntryIndex = true;
-      }
-
-      // Create the overview builder:
-      ossimString overviewType;
-      getOverviewType( overviewType.string() );
-      ossimRefPtr<ossimOverviewBuilderBase> ob =
-         ossimOverviewBuilderFactoryRegistry::instance()->createBuilder(overviewType);
-      if ( ob.valid() )
-      {
-         // Set up any overview builder options that don't involve histograms.
-         ossimPropertyInterface* pi = dynamic_cast<ossimPropertyInterface*>( ob.get() );
-         if ( pi ) setProps(pi);
-         
-         ossim_uint32 stopDimension = getOverviewStopDimension();
-         if ( stopDimension ) ob->setOverviewStopDimension(stopDimension);
-
-         ob->setScanForMinMax( scanForMinMax() );
-         
-         ob->setScanForMinMaxNull( scanForMinMaxNull() );
-         
-         for(ossim_uint32 idx = 0; idx < entryList.size(); ++idx)
-         {
-            createOverview(ih, ob, entryList[idx], useEntryIndex, consumedHistogramOptions);
-         }
-      }
-      else
-      {
-        ossimNotify(ossimNotifyLevel_WARN)
-           << "ERROR:\nCould not create builder for:  "<< overviewType << std::endl;
-        outputOverviewWriterTypes();
-      }
-   }
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
-   }
-}
-
-// Create overview for entry:
-void ossimImageUtil::createOverview(ossimRefPtr<ossimImageHandler>& ih,
-                                    ossimRefPtr<ossimOverviewBuilderBase>& ob,
-                                    ossim_uint32 entry,
-                                    bool useEntryIndex,
-                                    bool& consumedHistogramOptions)
-{
-   static const char M[] = "ossimImageUtil::createOverview #2";
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
-   }
-   
-   if ( ih.valid() && ob.valid() )
-   {
-      if (useEntryIndex)
-      {
-         // Set entry before deriving file name.
-         ih->setCurrentEntry(entry);
-         ossimNotify(ossimNotifyLevel_NOTICE) << "entry number: "<< entry << std::endl;
-      }
-      
-      ossimFilename outputFile =
-         ih->getFilenameWithThisExtension(ossimString(".ovr"), useEntryIndex);
-      
-      if ( rebuildOverviews() )
-      {
-         ih->closeOverview(); 
-         if ( outputFile.exists() )
-         {
-            outputFile.remove();
-         }
-      }
-
-      if ( getInternalOverviewsFlag() )
-      {
-         if ( ih->getClassName() == "ossimTiffTileSource")
-         {
-            //---
-            // INTERNAL_OVERVIEWS_FLAG_KW is set to true:
-            // Tiff reader can handle internal overviews.  Set the output file to
-            // input file.  Do it after the above remove so that if there were
-            // external overviews they will get removed.
-            //---
-            outputFile = ih->getFilename();
-         }
-         else 
-         {
-            ossimNotify(ossimNotifyLevel_NOTICE)
-               << "Internal overviews not supported for reader type: "
-               <<ih->getClassName()
-               << "\nIgnoring option..."
-               << endl;
-         }
-      }
-
-      if ( hasRequiredOverview( ih, ob ) == false )
-      {
-         //---
-         // Set create histogram code...
-         //
-         // Notes:
-         // 1) Must put this logic after any removal of external overview file.
-         // 
-         // 2) Base file could have built in overviews, e.g. jp2 files.  So the sequensor could
-         //    start at R6 even if there is no external overview file.
-         //
-         // 3) If user want the histogram from R0 the overview builder can do as long as
-         //    ossimImageHandler::getNumberOfDecimationLevels returns 1.  If we are starting
-         //    overview building at R6 then we must do the create histogram in a separate path.
-         //---
-         ossimHistogramMode histoMode = OSSIM_HISTO_MODE_UNKNOWN;
-         if ( createHistogram() ||
-              ( createHistogramR0() && ( ih->getNumberOfDecimationLevels() == 1 ) ) )
-         {
-            histoMode = OSSIM_HISTO_MODE_NORMAL;
-         }
-         else if ( createHistogramFast() )
-         {
-            histoMode = OSSIM_HISTO_MODE_FAST;
-         }
-         
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG) << "Histogram mode: " << histoMode << "\n";
-         }
-         
-         if ( histoMode != OSSIM_HISTO_MODE_UNKNOWN )
-         {
-            consumedHistogramOptions = true;
-            ob->setHistogramMode(histoMode);
-            
-            ossimNotify(ossimNotifyLevel_NOTICE)
-               << "Creating overviews with histogram for file: " << ih->getFilename() << std::endl;
-         }
-         else
-         {
-            if ( histoMode != OSSIM_HISTO_MODE_UNKNOWN )
-            {
-               consumedHistogramOptions = false;  
-               ossimNotify(ossimNotifyLevel_NOTICE)
-                  << "Creating overviews for file: " << ih->getFilename() << std::endl;
-            }
-         }
-         
-         ob->setOutputFile(outputFile);
-         ob->setInputSource(ih.get());
-         
-         // Create the overview for this entry in this file:
-         if ( ob->execute() == false )
-         {
-            setErrorStatus( ossimErrorCodes::OSSIM_ERROR );
-            ossimNotify(ossimNotifyLevel_WARN)
-               << "Error returned creating overviews for file: " << ih->getFilename() << std::endl;
-         }
-      }
-      else
-      {
-         consumedHistogramOptions = false;
-         ossimNotify(ossimNotifyLevel_NOTICE)
-            << "Image has required reduced resolution data sets." << std::endl;
-      }
-   }
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
-   }
-}
-
-bool ossimImageUtil::hasRequiredOverview( ossimRefPtr<ossimImageHandler>& ih,
-                                          ossimRefPtr<ossimOverviewBuilderBase>& ob )
-{
-   bool result = false;
-   if ( ih.valid() && ob.valid() && ( getCopyAllFlag() == false ) )
-   {
-      if ( ih->getClassName() == "ossimCcfTileSource" )
-      {
-         // CCF reader does not use external overviews.
-         result = true;
-      }
-      else
-      {
-         // Note we always have one rset
-         ossim_uint32 required = 1;
-         
-         ossim_uint32 startingResLevel      = ih->getNumberOfDecimationLevels();
-         ossim_uint32 overviewStopDimension = ob->getOverviewStopDimension();
-         
-         ossim_uint32 largestImageDimension =
-            ih->getNumberOfSamples(0) >
-            ih->getNumberOfLines(0) ?
-            ih->getNumberOfSamples(0) :
-            ih->getNumberOfLines(0);
-         
-         while(largestImageDimension > overviewStopDimension)
-         {
-            largestImageDimension /= 2;
-            ++required;
-         }
-         
-         if ( startingResLevel >= required )
-         {
-            result = true;
-         }
-      }
-   }
-   return result;
-}
-
-void ossimImageUtil::createHistogram(ossimRefPtr<ossimImageHandler>& ih)
-{
-   static const char M[] = "ossimImageUtil::createHistogram #1";
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
-   }
-   
-   if ( ih.valid() )
-   {
-      // Get the entry list:
-      std::vector<ossim_uint32> entryList;
-      ih->getEntryList(entryList);
-      
-      bool useEntryIndex = false;
-      if ( entryList.size() )
-      {
-         if ( (entryList.size() > 1) || (entryList[0] != 0) ) useEntryIndex = true;
-      }
-
-      for(ossim_uint32 idx = 0; idx < entryList.size(); ++idx)
-      {
-         createHistogram(ih, entryList[idx], useEntryIndex);
-      }
-   }
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
-   }
-}
-
-// Create histogram for entry:
-void ossimImageUtil::createHistogram(ossimRefPtr<ossimImageHandler>& ih,
-                                     ossim_uint32 entry,
-                                     bool useEntryIndex)
-{
-   static const char M[] = "ossimImageUtil::createHistogram #2";
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
-   }
-   
-   if ( ih.valid() )
-   {
-      if (useEntryIndex)
-      {
-         // Set entry before deriving file name.
-         ih->setCurrentEntry(entry);
-         ossimNotify(ossimNotifyLevel_NOTICE) << "entry number: "<< entry << std::endl;
-      }
-
-      ossimFilename outputFile =
-         ih->getFilenameWithThisExtension(ossimString(".his"), useEntryIndex);
-
-      // Only build if needed:
-      if ( (outputFile.exists() == false) || rebuildHistogram() )
-      {
-         ossimNotify(ossimNotifyLevel_NOTICE)
-            << "Computing histogram for file: " << ih->getFilename() << std::endl;
-
-         // Check handler to see if it's filtering bands.
-         std::vector<ossim_uint32> originalBandList(0);
-         if ( ih->isBandSelector() )
-         { 
-            // Capture for finalize method.
-            ih->getOutputBandList( originalBandList );
-            
-            // Set output list to input.
-            ih->setOutputToInputBandList();
-         }
-
-         ossimRefPtr<ossimImageHistogramSource> histoSource = new ossimImageHistogramSource;
-         ossimRefPtr<ossimHistogramWriter> writer = new ossimHistogramWriter;
-         
-         histoSource->setMaxNumberOfRLevels(1); // Currently hard coded...
-         
-#if 0 /* TODO tmp drb */
-         if( !ossim::isnan(histoMin) )
-         {
-            histoSource->setMinValueOverride(histoMin);
-         }
-         
-         if( !ossim::isnan(histoMax) )
-         {
-            histoSource->setMaxValueOverride(histoMax);
-         }
-         
-         if(histoBins > 0)
-         {
-            histoSource->setNumberOfBinsOverride(histoBins);
-         }
-#endif
-         
-         if(traceDebug())
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "Histogram mode: " << getHistogramMode() << "\n";
-         }
-         
-         // Connect histogram source to image handler.
-         histoSource->setComputationMode( getHistogramMode() );
-         histoSource->connectMyInputTo(0, ih.get() );
-         histoSource->enableSource();
-         
-         // Connect writer to histogram source.
-         writer->connectMyInputTo(0, histoSource.get());
-         writer->setFilename(outputFile);
-         theStdOutProgress.setFlushStreamFlag(true);
-         writer->addListener(&theStdOutProgress);
-         
-         // Compute...
-         writer->execute();
-         
-         writer=0;
-
-         // Reset the band list.
-         if ( ih->isBandSelector() && originalBandList.size() )
-         {
-            ih->setOutputBandList( originalBandList );
-         }
-
-      } // Matches: if ( (outputFile.exists() == false) || rebuildHistogram() )
-      
-   } // Matches: if ( ih.valid() )
-
-   if(traceDebug())
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
-   }
-
-} // End: ossimImageUtil::createHistogram #2
-
-void ossimImageUtil::usage(ossimArgumentParser& ap)
-{
-   // Add global usage options.
-   ossimInit::instance()->addOptions(ap);
-   
-   // Set app name.
-   ap.getApplicationUsage()->setApplicationName(ap.getApplicationName());
-
-   // Add options.
-   addArguments(ap);
-   
-   // Write usage.
-   ap.getApplicationUsage()->write(ossimNotify(ossimNotifyLevel_INFO));
-
-   outputOverviewWriterTypes();
-   
-   ossimNotify(ossimNotifyLevel_INFO)
-      << "\nExample commands:\n"
-      << "\n// A single image standard tiff overviews, histogram:\n"
-      << "ossim-preproc -o --ch <file>\n"
-      << "\n// A single image with j2k overviews(requires kakadu plugin), histogram:\n"
-      << "ossim-preproc --ot ossim_kakadu_nitf_j2k --ch <file>\n"
-      << "\n// j2k, histogram, 4 threads\n"
-      << "\n// standard tiff overviews, full histogram, 4 threads:\n"
-      << "ossim-preproc -r -o --ch --threads 4 <directory_to_walk>\n"
-      << "\n// j2k, histogram (fast mode), 4 threads\n"
-      << "ossim-preproc -r --ot ossim_kakadu_nitf_j2k --chf --threads 4 "
-      << "<directory_to_walk>\n"
-      << "\n// tiff, jpeg compression, histogram, 4 threads\n"
-      << "ossim-preproc -r --ch --compression-quality 75 --compression-type "
-      << "jpeg --threads 4 <directory_to_walk>\n"
-      << "\nNOTES:\n"
-      << "\n  --ch  equals --create-histogram"
-      << "\n  --chf equals --create-histogram-fast"
-      << std::endl;
-}
-
-// Private method:
-void ossimImageUtil::outputOverviewWriterTypes() const
-{
-   ossimNotify(ossimNotifyLevel_NOTICE)
-      << "\nValid overview types: " << std::endl;
-   
-   std::vector<ossimString> outputType;
-   
-   ossimOverviewBuilderFactoryRegistry::instance()->getTypeNameList(outputType);
-   std::copy(outputType.begin(),
-             outputType.end(),
-             std::ostream_iterator<ossimString>(ossimNotify(ossimNotifyLevel_NOTICE), "\t\n"));
-}
-
-// Private method:
-bool ossimImageUtil::isDirectoryBasedImage(const ossimImageHandler* ih) const
-{
-   bool result = false;
-   if ( ih )
-   {
-      // Get the image handler name.
-      ossimString imageHandlerName = ih->getClassName();
-      if ( (imageHandlerName == "ossimAdrgTileSource") ||
-           (imageHandlerName == "ossimCibCadrgTileSource") )  
-      {
-         result = true;
-      }
-   }
-   return result;
-}
-
-void ossimImageUtil::setCreateOverviewsFlag( bool flag )
-{
-   addOption( CREATE_OVERVIEWS_KW, ( flag ? TRUE_KW : FALSE_KW ) );
-}
-
-bool ossimImageUtil::createOverviews() const
-{
-   bool result = false;
-   std::string lookup = m_kwl->findKey( CREATE_OVERVIEWS_KW );
-   if ( lookup.size() )
-   {
-      result = ossimString(lookup).toBool();
-   }
-   return result;
-}
-
-void ossimImageUtil::setRebuildOverviewsFlag( bool flag )
-{
-   addOption( REBUILD_OVERVIEWS_KW, ( flag ? TRUE_KW : FALSE_KW ) );
-   if ( flag )
-   {
-      setCreateOverviewsFlag( true ); // Turn on overview building.
-   }
-}
-
-bool ossimImageUtil::rebuildOverviews() const
-{
-   bool result = false;
-   std::string lookup = m_kwl->findKey( REBUILD_OVERVIEWS_KW );
-   if ( lookup.size() )
-   {
-      result = ossimString(lookup).toBool();
-   }
-   return result;
-}
-
-void ossimImageUtil::setRebuildHistogramFlag( bool flag )
-{
-   addOption( REBUILD_HISTOGRAM_KW, ( flag ? TRUE_KW : FALSE_KW ) );
-   if ( flag )
-   {
-      setCreateHistogramFlag( true ); // Turn on histogram building.
-   }
-}
-
-bool ossimImageUtil::rebuildHistogram() const
-{
-   bool result = false;
-   std::string lookup = m_kwl->findKey( REBUILD_HISTOGRAM_KW );
-   if ( lookup.size() )
-   {
-      result = ossimString(lookup).toBool();
-   }
-   return result;
-}
-
-void ossimImageUtil::setScanForMinMax( bool flag )
-{
-   addOption( SCAN_MIN_MAX_KW, ( flag ? TRUE_KW : FALSE_KW ) ); 
-}
-
-bool ossimImageUtil::scanForMinMax() const
-{
-   bool result = false;
-   std::string lookup = m_kwl->findKey( SCAN_MIN_MAX_KW );
-   if ( lookup.size() )
-   {
-      result = ossimString(lookup).toBool();
-   }
-   return result;
-}
-
-void ossimImageUtil::setScanForMinMaxNull( bool flag )
-{
-   addOption( SCAN_MIN_MAX_NULL_KW, ( flag ? TRUE_KW : FALSE_KW ) ); 
-}
-
-bool ossimImageUtil::scanForMinMaxNull() const
-{
-   bool result = false;
-   std::string lookup = m_kwl->findKey( SCAN_MIN_MAX_NULL_KW );
-   if ( lookup.size() )
-   {
-      result = ossimString(lookup).toBool();
-   }
-   return result;
-}
-
-void ossimImageUtil::setCompressionQuality( const std::string& quality )
-{
-   if ( quality.size() )
-   {
-      std::string key = WRITER_PROP_KW;
-      key += ossimString::toString( getNextWriterPropIndex() ).string();
-      std::string value = ossimKeywordNames::COMPRESSION_QUALITY_KW;
-      value += "=";
-      value += quality;
-      addOption( key, value );
-   }
-}
-
-void ossimImageUtil::setCompressionType(const std::string& type)
-{
-   if ( type.size() )
-   {
-      std::string key = WRITER_PROP_KW;
-      key += ossimString::toString( getNextWriterPropIndex() ).string();
-      std::string value = ossimKeywordNames::COMPRESSION_TYPE_KW;
-      value += "=";
-      value += type;
-      addOption( key, value );
-   }   
-}
-
-void ossimImageUtil::setCopyAllFlag( bool flag )
-{
-   // Add this for hasRequiredOverview method.
-   std::string key   = COPY_ALL_FLAG_KW;
-   std::string value = ( flag ? TRUE_KW : FALSE_KW );
-   addOption( key, value );
-
-   // Add as a writer prop:
-   key = WRITER_PROP_KW;
-   key += ossimString::toString( getNextWriterPropIndex() ).string();
-   value = COPY_ALL_FLAG_KW;
-   value += "=";
-   value += ( flag ? TRUE_KW : FALSE_KW );
-   addOption( key, value );
-}
-
-bool ossimImageUtil::getCopyAllFlag() const
-{
-   bool result = false;
-   std::string lookup = m_kwl->findKey( COPY_ALL_FLAG_KW );
-   if ( lookup.size() )
-   {
-      ossimString os(lookup);
-      result = os.toBool();
-   }
-   return result;
-}
-
-void ossimImageUtil::setInternalOverviewsFlag( bool flag )
-{
-   // Add this for hasRequiredOverview method.
-   std::string key   = INTERNAL_OVERVIEWS_FLAG_KW;
-   std::string value = ( flag ? TRUE_KW : FALSE_KW );
-   addOption( key, value );
-
-   // Add as a writer prop:
-   key = WRITER_PROP_KW;
-   key += ossimString::toString( getNextWriterPropIndex() ).string();
-   value = INTERNAL_OVERVIEWS_FLAG_KW;
-   value += "=";
-   value += ( flag ? TRUE_KW : FALSE_KW );
-   addOption( key, value );
-}
-
-bool ossimImageUtil::getInternalOverviewsFlag() const
-{
-   bool result = false;
-   std::string lookup = m_kwl->findKey( INTERNAL_OVERVIEWS_FLAG_KW );
-   if ( lookup.size() )
-   {
-      ossimString os(lookup);
-      result = os.toBool();
-   }
-   return result;
-}
-
-void ossimImageUtil::setOutputFileNamesFlag( bool flag )
-{
-   std::string key   = OUTPUT_FILENAMES_KW;
-   std::string value = ( flag ? TRUE_KW : FALSE_KW );
-   addOption( key, value );
-}
-
-bool ossimImageUtil::getOutputFileNamesFlag() const
-{
-   bool result = false;
-   std::string lookup = m_kwl->findKey( OUTPUT_FILENAMES_KW );
-   if ( lookup.size() )
-   {
-      ossimString os(lookup);
-      result = os.toBool();
-   }
-   return result;
-}
-
-void ossimImageUtil::setOutputDirectory( const std::string& directory )
-{
-   std::string key = OUTPUT_DIRECTORY_KW;
-   addOption( key, directory );
-}
-   
-void ossimImageUtil::setOverviewType( const std::string& type )
-{
-   std::string key = OVERVIEW_TYPE_KW;
-   addOption( key, type );
-   setCreateOverviewsFlag( true ); // Assume caller wants overviews.
-}
-
-void ossimImageUtil::getOverviewType(std::string& type) const
-{
-   std::string lookup = m_kwl->findKey(OVERVIEW_TYPE_KW);
-   if ( lookup.size() )
-   {
-      type = lookup;
-   }
-   else
-   {
-      type = "ossim_tiff_box"; // default
-   }
-}
-
-void ossimImageUtil::setProps(ossimPropertyInterface* pi) const
-{
-   if ( pi )
-   {
-      ossimString baseKey;
-      if ( dynamic_cast<ossimImageHandler*>(pi) )
-      {
-         baseKey = READER_PROP_KW;
-      }
-      else
-      {
-         baseKey = WRITER_PROP_KW;
-      }
-      
-      ossim_uint32 propCount = m_kwl->numberOf( baseKey.c_str() );
-      if ( propCount )
-      {
-         ossim_uint32 foundProps = 0;
-         ossim_uint32 index = 0;
-         
-         // (propCount+100) is to allow for holes like reader_prop0, reader_prop2...
-         while ( (foundProps < propCount) && (index < (propCount+100) ) ) 
-         {
-            ossimString key = baseKey;
-            key += ossimString::toString(index);
-            std::string lookup = m_kwl->findKey( key.string() );
-            if ( lookup.size() )
-            {
-               ossimString value = lookup;
-               std::vector<ossimString> v = value.split("=");
-               if (v.size() == 2)
-               {
-                  ossimString propertyName  = v[0];
-                  ossimString propertyValue = v[1];
-                  ossimRefPtr<ossimProperty> p =
-                     new ossimStringProperty(propertyName, propertyValue);
-                  pi->setProperty( p );
-               }
-               ++foundProps;
-            }
-            ++index;
-         }
-      }
-   }
-}
-
-void ossimImageUtil::setOverviewStopDimension( ossim_uint32 dimension )
-{
-   addOption( OVERVIEW_STOP_DIM_KW, dimension );
-}
-
-void ossimImageUtil::setOverviewStopDimension( const std::string& dimension )
-{
-   addOption( OVERVIEW_STOP_DIM_KW, dimension );
-}
-
-void ossimImageUtil::setTileSize( ossim_uint32 tileSize )
-{
-   if ((tileSize % 16) == 0)
-   {
-      addOption( TILE_SIZE_KW, tileSize );
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_NOTICE)
-         << "ossimImageUtil::setTileSize NOTICE:"
-         << "\nTile width must be a multiple of 16!"
-         << std::endl;
-   }
-}
-
-
-ossim_uint32 ossimImageUtil::getOverviewStopDimension() const
-{
-   ossim_uint32 result = 0;
-   std::string lookup = m_kwl->findKey( OVERVIEW_STOP_DIM_KW );
-   if ( lookup.size() )
-   {
-      result = ossimString(lookup).toUInt32();
-   }
-   return result;
-}
-
-void ossimImageUtil::setCreateHistogramFlag( bool flag )
-{
-   addOption( CREATE_HISTOGRAM_KW, ( flag ? TRUE_KW : FALSE_KW ) );
-}
-
-bool ossimImageUtil::createHistogram() const
-{
-   bool result = false;
-   std::string lookup = m_kwl->findKey( CREATE_HISTOGRAM_KW );
-   if ( lookup.size() )
-   {
-      result = ossimString(lookup).toBool();
-   }
-   return result;
-}
-
-void ossimImageUtil::setCreateHistogramFastFlag( bool flag )
-{
-   addOption( CREATE_HISTOGRAM_FAST_KW, ( flag ? TRUE_KW : FALSE_KW ) );
-}
-
-bool ossimImageUtil::createHistogramFast() const
-{
-   bool result = false;
-   std::string lookup = m_kwl->findKey( CREATE_HISTOGRAM_FAST_KW );
-   if ( lookup.size() )
-   {
-      result = ossimString(lookup).toBool();
-   }
-   return result;
-}
-
-void ossimImageUtil::setCreateHistogramR0Flag( bool flag )
-{
-   addOption( CREATE_HISTOGRAM_R0_KW, ( flag ? TRUE_KW : FALSE_KW ) );
-}
-
-bool ossimImageUtil::createHistogramR0() const
-{   bool result = false;
-   std::string lookup = m_kwl->findKey( CREATE_HISTOGRAM_R0_KW );
-   if ( lookup.size() )
-   {
-      result = ossimString(lookup).toBool();
-   }
-   return result;
-}
-
-bool ossimImageUtil::hasHistogramOption() const
-{
-   return ( createHistogram() || createHistogramFast() || createHistogramR0() );
-}
-
-ossimHistogramMode ossimImageUtil::getHistogramMode() const
-{
-   ossimHistogramMode result = OSSIM_HISTO_MODE_UNKNOWN;
-   if ( createHistogram() || createHistogramR0() )
-   {
-      result = OSSIM_HISTO_MODE_NORMAL;
-   }
-   else if ( createHistogramFast() )
-   {
-      result = OSSIM_HISTO_MODE_FAST;
-   }
-   return result;
-}
-
-void ossimImageUtil::setNumberOfThreads( ossim_uint32 threads )
-{
-   addOption( THREADS_KW, threads );
-}
-
-void ossimImageUtil::setNumberOfThreads( const std::string& threads )
-{
-   addOption( THREADS_KW, threads );
-}
-
-ossim_uint32 ossimImageUtil::getNumberOfThreads() const
-{
-   ossim_uint32 result;
-   std::string lookup = m_kwl->findKey( THREADS_KW );
-   if ( lookup.size() )
-   {
-      result = ossimString(lookup).toUInt32();
-   }
-   else
-   {
-      result = ossim::getNumberOfThreads();
-   }
-   return result;
-}
-
-ossim_uint32 ossimImageUtil::getNextWriterPropIndex() const
-{
-   ossim_uint32 result = m_kwl->numberOf( WRITER_PROP_KW.c_str() );
-   if ( result )
-   {
-      ossim_uint32 foundProps = 0;
-      ossim_uint32 index = 0;
-
-      //---
-      // Loop until we find the last index used for WRITER_PROP_KW.
-      // (result+100) is to allow for holes like writer_prop0, writer_prop2...
-      //---
-      while ( (foundProps < result) && (index < (result+100) ) ) 
-      {
-         ossimString key = WRITER_PROP_KW;
-         key += ossimString::toString(index);
-         std::string lookup = m_kwl->findKey( key.string() );
-         if ( lookup.size() )
-         {
-            ++foundProps;
-         }
-         ++index;
-      }
-      result = index;
-   }
-   return result;
-}
-
-ossim_uint32 ossimImageUtil::getNextReaderPropIndex() const
-{
-   ossim_uint32 result = m_kwl->numberOf( READER_PROP_KW.c_str() );
-   if ( result )
-   {
-      ossim_uint32 foundProps = 0;
-      ossim_uint32 index = 0;
-      
-      //---
-      // Loop until we find the last index used for WRITER_PROP_KW.
-      // (result+100) is to allow for holes like reader_prop0, reader_prop2...
-      //---
-      while ( (foundProps < result) && (index < (result+100) ) ) 
-      {
-         ossimString key = READER_PROP_KW;
-         key += ossimString::toString(index);
-         std::string lookup = m_kwl->findKey( key.string() );
-         if ( lookup.size() )
-         {
-            ++foundProps;
-         }
-         ++index;
-      }
-      result = index;
-   }
-   return result;
-}
-
-void ossimImageUtil::addOption( const std::string& key, ossim_uint32 value )
-{
-   addOption( key, ossimString::toString( value ).string() );
-}
-
-void ossimImageUtil::addOption(  const std::string& key, const std::string& value )
-{
-   m_mutex.lock();
-   if ( m_kwl.valid() )
-   {
-      if ( key.size() && value.size() )
-      {
-         m_kwl->addPair( key, value );
-      }
-   }
-   m_mutex.unlock();
-}
-
-void ossimImageUtil::setErrorStatus( ossim_int32 status )
-{
-   m_mutex.lock();
-   m_errorStatus = status;
-   m_mutex.unlock();
-}
diff --git a/src/ossim/util/ossimInfo.cpp b/src/ossim/util/ossimInfo.cpp
deleted file mode 100644
index ffd4a30..0000000
--- a/src/ossim/util/ossimInfo.cpp
+++ /dev/null
@@ -1,2403 +0,0 @@
-//----------------------------------------------------------------------------
-// File: ossimInfo.cpp
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: ossimInfo class definition
-//
-// Utility class for getting information from the ossim library.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossimInfo.cpp 22282 2013-06-09 14:57:06Z dburken $
-
-#include <ossim/util/ossimInfo.h>
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <ossim/base/ossimContainerProperty.h>
-#include <ossim/base/ossimDatum.h>
-#include <ossim/base/ossimDatumFactoryRegistry.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimObjectFactoryRegistry.h>
-#include <ossim/base/ossimEllipsoid.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/imaging/ossimFilterResampler.h>
-#include <ossim/base/ossimGeoidManager.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimPreferences.h>
-#include <ossim/base/ossimProperty.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/base/ossimXmlDocument.h>
-#include <ossim/elevation/ossimElevManager.h>
-#include <ossim/imaging/ossimFilterResampler.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
-#include <ossim/imaging/ossimOverviewBuilderFactoryRegistry.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/plugin/ossimSharedPluginRegistry.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-#include <ossim/support_data/ossimInfoBase.h>
-#include <ossim/support_data/ossimInfoFactoryRegistry.h>
-#include <ossim/support_data/ossimSupportFilesList.h>
-
-#include <iomanip>
-#include <vector>
-
-static const char CENTER_GROUND_KW[]        = "center_ground";
-static const char CENTER_IMAGE_KW[]         = "center_image";
-static const char CONFIGURATION_KW[]        = "configuration";
-static const char DATUMS_KW[]               = "datums";
-static const char DEG2RAD_KW[]              = "deg2rad";
-static const char DUMP_KW[]                 = "dump";
-static const char DUMP_NO_OVERVIEWS_KW[]    = "dump_no_overviews";
-static const char FACTORIES_KW[]            = "factories";
-static const char FACTORY_KEYWORD_LIST_KW[] = "factory_keyword_list";
-static const char FACTORY_OBJECT_KW[]       = "factory_object";
-static const char FACTORY_TYPE_KW[]         = "factory_type";
-static const char FORMAT_KW[]               = "format"; 
-static const char FT2MTRS_KW[]              = "ft2mtrs";
-static const char FT2MTRS_US_SURVEY_KW[]    = "ft2mtrs_us_survey";
-static const char GEOM_INFO_KW[]            = "geometry_info";
-static const char HEIGHT_KW[]               = "height";
-static const char IMAGE_CENTER_KW[]         = "image_center";
-static const char IMAGE_FILE_KW[]           = "image_file";
-static const char IMAGE_INFO_KW[]           = "image_info";
-static const char IMAGE_RECT_KW[]           = "image_rect";
-static const char METADATA_KW[]             = "metadata";
-static const char MTRS2FT_KW[]              = "mtrs2ft";
-static const char MTRS2FT_US_SURVEY_KW[]    = "mtrs2ft_us_survey";
-static const char MTRSPERDEG_KW[]           = "mtrs_per_deg";
-static const char OUTPUT_FILE_KW[]          = "output_file";
-static const char OSSIM_LOGFILE_KW[]        = "ossim_logfile";
-static const char OVERVIEW_TYPES_KW[]       = "overview_types";
-static const char OVERWRITE_KW[]            = "overwrite";
-static const char PALETTE_KW[]              = "palette";
-static const char PLUGINS_KW[]              = "plugins";
-static const char PLUGIN_TEST_KW[]          = "plugin_test";
-static const char PROJECTIONS_KW[]          = "projections";
-static const char RAD2DEG_KW[]              = "rad2deg";
-static const char READER_PROPS_KW[]         = "reader_props";
-static const char RESAMPLER_FILTERS_KW[]    = "resampler_filters";
-static const char UP_IS_UP_KW[]             = "up_is_up_angel";
-static const char WRITERS_KW[]              = "writers_kw";
-static const char WRITER_PROPS_KW[]         = "writer_props";
-
-// Static trace for debugging.  Use -T ossimInfo to turn on.
-static ossimTrace traceDebug = ossimTrace("ossimInfo:debug");
-
-ossimInfo::ossimInfo() :
-   m_kwl(new ossimKeywordlist()),
-   m_img(0)
-{
-}
-
-ossimInfo::~ossimInfo()
-{
-}
-
-void ossimInfo::addArguments(ossimArgumentParser& ap)
-{
-   // Set the general usage:
-   ossimApplicationUsage* au = ap.getApplicationUsage();
-   ossimString usageString = ap.getApplicationName();
-   usageString += " [options] <optional-image>";
-   au->setCommandLineUsage(usageString);
-
-   // Set the command line options:
-   au->addCommandLineOption("-c", "Will print ground and image center.");
-
-   au->addCommandLineOption("--cg", "Will print out ground center.");
-
-   au->addCommandLineOption("--ci", "Will print out image center.");
-
-   au->addCommandLineOption("--config", "Displays configuration info.");
-
-   au->addCommandLineOption("-d", "A generic dump if one is available.");
-
-   au->addCommandLineOption("--datums", "Prints datum list.");   
-
-   au->addCommandLineOption("--deg2rad", "<degrees> Gives radians from degrees.");
-   
-   au->addCommandLineOption("--dno", "A generic dump if one is available.  This option ignores overviews.");
-   
-   au->addCommandLineOption("-f", "<format> Will output the information specified format [KWL | XML].  Default is KWL.");   
-
-   au->addCommandLineOption("--factories", "<keyword_list_flag> Prints factory list.  If keyword_list_flag is true, the result of a saveState will be output for each object.");
-   
-   au->addCommandLineOption("--ft2mtrs", "<feet> Gives meters from feet (0.3048 meters per foot).");
-   
-   au->addCommandLineOption("--ft2mtrs-us-survey", "<feet> Gives meters from feet (0.3048006096 meters per foot).");
-   
-   au->addCommandLineOption("-h", "Display this information");
-
-   au->addCommandLineOption("--height", "<latitude-in-degrees> <longitude-in-degrees> Returns the MSL and ellipoid height given a latitude longitude position.");
-
-   au->addCommandLineOption("-i", "Will print out the general image information.");
-   
-   au->addCommandLineOption("-m", "Will print out meta data image information.");
-
-   au->addCommandLineOption("--mtrsPerDeg", "<latitude> Gives meters per degree and meters per minute for a given latitude.");
-   
-   au->addCommandLineOption("--mtrs2ft", "<meters> Gives feet from meters (0.3048 meters per foot).");
-
-   au->addCommandLineOption("--mtrs2ft-us-survey", "<meters> Gives feet from meters (0.3048006096 meters per foot).");   
-   
-   au->addCommandLineOption("-o", "<output-file> Will output the information to the file specified.  Default is to standard out.");
-
-   au->addCommandLineOption("--overview-types", "Prints overview builder types.");
-   
-   au->addCommandLineOption("-p", "Will print out the image projection information.");
-   
-   au->addCommandLineOption("--palette", "Will print out the color palette if one exists.");
-
-   au->addCommandLineOption("--plugins", "Prints plugin list.");
-   
-   au->addCommandLineOption("--plugin-test", "Test plugin passed to option.");
-   
-   au->addCommandLineOption("--projections", "Prints projections.");
-   
-   au->addCommandLineOption("-r", "Will print image rectangle.");
-
-   au->addCommandLineOption("--rad2deg", "<radians> Gives degrees from radians.");
-
-   au->addCommandLineOption("--reader-props", "Prints readers and properties.");
-
-   au->addCommandLineOption("--resampler-filters", "Prints resampler filter list.");
-   
-   au->addCommandLineOption("-s", "Force the ground rect to be the specified datum");
-   
-   au->addCommandLineOption("-u or --up-is-up", "Rotation angle to \"up is up\" for an image.\nWill return 0 if image's projection is not affected by elevation.");
-
-   au->addCommandLineOption("-v", "Overwrite existing geometry.");
-   
-   au->addCommandLineOption("--writer-props", "Prints writers and properties.");
-
-   au->addCommandLineOption("--writers", "Prints list of available writers.");
-   
-} // void ossimInfo::addArguments(ossimArgumentParser& ap)
-
-bool ossimInfo::initialize(ossimArgumentParser& ap)
-{
-   static const char M[] = "ossimInfo::initialize(ossimArgumentParser&)";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
-   }
-
-   bool result = true;
-
-   if ( (ap.argc() == 1) || ap.read("-h") || ap.read("--help") )
-   {
-      usage(ap);
-
-      // continue_after_init to false
-      result = false;
-   }
-   else
-   {
-      //---
-      // Start with clean options keyword list.
-      //---
-      m_kwl->clear();
-
-      bool requiresInputImage = false;
-      
-      while ( 1 ) //  While forever loop...
-      {
-         // Used throughout below:
-         std::string ts1;
-         ossimArgumentParser::ossimParameter sp1(ts1);
-         std::string ts2;
-         ossimArgumentParser::ossimParameter sp2(ts2);
-         const char TRUE_KW[] = "true";
-
-         if( ap.read("-c") )
-         {
-            m_kwl->add( IMAGE_CENTER_KW, TRUE_KW );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--cg") )
-         {
-            m_kwl->add( CENTER_GROUND_KW, TRUE_KW );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--ci") )
-         {
-            m_kwl->add( CENTER_IMAGE_KW, TRUE_KW );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--config") || ap.read("--configuration") )
-         {
-            m_kwl->add( CONFIGURATION_KW, TRUE_KW );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--datums") )
-         {
-            m_kwl->add( DATUMS_KW, TRUE_KW );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--deg2rad", sp1) )
-         {
-            m_kwl->add( DEG2RAD_KW, ts1.c_str() );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-         if( ap.read("-d") )
-         {
-            m_kwl->add( DUMP_KW, TRUE_KW );
-            requiresInputImage = true;
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--dno") )
-         {
-            m_kwl->add( DUMP_KW, TRUE_KW );
-            m_kwl->add( DUMP_NO_OVERVIEWS_KW, TRUE_KW );
-            requiresInputImage = true;
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("-f", sp1) )
-         {
-            m_kwl->add( FORMAT_KW, ts1.c_str());
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--factories", sp1) )
-         {
-            m_kwl->add( FACTORIES_KW, TRUE_KW);
-            m_kwl->add( FACTORY_KEYWORD_LIST_KW, ts1.c_str());
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--ft2mtrs", sp1) )
-         {
-            m_kwl->add( FT2MTRS_KW, ts1.c_str());
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--ft2mtrs-us-survey", sp1) )
-         {
-            m_kwl->add( FT2MTRS_KW, ts1.c_str());
-            m_kwl->add( FT2MTRS_US_SURVEY_KW, TRUE_KW);
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--height", sp1, sp2) )
-         {
-            ossimString lat = ts1;
-            ossimString lon = ts2;
-            ossimGpt gpt;
-            gpt.lat = lat.toFloat64();
-            gpt.lon = lon.toFloat64();
-            m_kwl->add( HEIGHT_KW, gpt.toString().c_str() );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-         
-         if( ap.read("-i") )
-         {
-            m_kwl->add( IMAGE_INFO_KW, TRUE_KW );
-            requiresInputImage = true;
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("-m") )
-         {
-            m_kwl->add( METADATA_KW, TRUE_KW );
-            requiresInputImage = true;
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--mtrs2ft", sp1) )
-         {
-            m_kwl->add( MTRS2FT_KW, ts1.c_str());
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--mtrs2ft-us-survey", sp1) )
-         {
-            m_kwl->add( MTRS2FT_KW, ts1.c_str());
-            m_kwl->add( MTRS2FT_US_SURVEY_KW, TRUE_KW);
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-         
-         if( ap.read("--mtrsPerDeg", sp1) )
-         {
-            m_kwl->add( MTRSPERDEG_KW, ts1.c_str());
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("-o", sp1) )
-         {
-            m_kwl->add( OUTPUT_FILE_KW, ts1.c_str());
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--overview-types") )
-         {
-            m_kwl->add( OVERVIEW_TYPES_KW, TRUE_KW );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("-p") )
-         {
-            m_kwl->add( GEOM_INFO_KW, TRUE_KW );
-            requiresInputImage = true;
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-         
-         if( ap.read("--palette") )
-         {
-            m_kwl->add( PALETTE_KW, TRUE_KW );
-            requiresInputImage = true;
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--plugins") )
-         {
-            m_kwl->add( PLUGINS_KW, TRUE_KW );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--plugin-test", sp1) )
-         {
-            m_kwl->add( PLUGIN_TEST_KW, ts1.c_str());
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--projections") )
-         {
-            m_kwl->add( PROJECTIONS_KW, TRUE_KW );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("-r") )
-         {
-            m_kwl->add( IMAGE_RECT_KW, TRUE_KW );
-            requiresInputImage = true;
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--rad2deg", sp1) )
-         {
-            m_kwl->add( RAD2DEG_KW, ts1.c_str());
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--reader-props") )
-         {
-            m_kwl->add( READER_PROPS_KW, TRUE_KW );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-         
-         if( ap.read("--resampler-filters") )
-         {
-            m_kwl->add( RESAMPLER_FILTERS_KW, TRUE_KW );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("-u") || ap.read("--up-is-up") )
-         {
-            m_kwl->add( UP_IS_UP_KW, TRUE_KW );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("-v") )
-         {
-            m_kwl->add( OVERWRITE_KW, TRUE_KW );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--writer-props") )
-         {
-            m_kwl->add( WRITER_PROPS_KW, TRUE_KW );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-
-         if( ap.read("--writers") )
-         {
-            m_kwl->add( WRITERS_KW, TRUE_KW );
-            if ( ap.argc() < 2 )
-            {
-               break;
-            }
-         }
-         
-         // End of arg parsing.
-         ap.reportRemainingOptionsAsUnrecognized();
-         if ( ap.errors() )
-         {
-            ap.writeErrorMessages(ossimNotify(ossimNotifyLevel_NOTICE));
-            std::string errMsg = "Unknown option...";
-            throw ossimException(errMsg);
-         }
-
-         break; // Break from while forever.
-         
-      } // End while (forever) loop.
-
-      if ( ap.argc() == 2 )
-      {
-         m_kwl->add( IMAGE_FILE_KW, ap[1]  );
-      }
-
-      if ( requiresInputImage && ( ap.argc() == 1 ) )
-      {
-         usage(ap);
-         
-         // continue_after_init to false
-         result = false;
-      }
-
-   } // not usage
-         
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "m_kwl:\n" << *(m_kwl.get()) << "\n"
-         << M << " exit result = " << (result?"true":"false")
-         << "\n";
-   }
-   
-   return result;
-}
-
-void ossimInfo::execute()
-{
-   static const char M[] = "ossimInfo::execute()";
-   
-   const ossim_uint32 KEY_COUNT = m_kwl->getSize();
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << M << " entered..."
-         << "\nMap size: " << KEY_COUNT << "\n";
-   }
-
-   if ( KEY_COUNT )
-   {
-      ossim_uint32 consumedKeys = 0;
-   
-      const char* lookup;
-
-      lookup = m_kwl->find(IMAGE_FILE_KW);
-      if ( lookup )
-      {
-         ++consumedKeys;
-         ossimFilename image = lookup;
-
-         consumedKeys += executeImageOptions(image);
-      }
-
-      if ( consumedKeys < KEY_COUNT )
-      {
-         ossimString value;
-
-         lookup = m_kwl->find(CONFIGURATION_KW);
-         if ( lookup )
-         {
-            ++consumedKeys;
-            value = lookup;
-            if ( value.toBool() )
-            {
-               printConfiguration();
-            }
-         }
-   
-         lookup = m_kwl->find(DATUMS_KW);
-         if ( lookup )
-         {
-            ++consumedKeys;
-            value = lookup;
-            if ( value.toBool() )
-            {
-               printDatums();
-            }
-         }
-
-         lookup = m_kwl->find(DEG2RAD_KW);
-         if ( lookup )
-         {
-            ++consumedKeys;
-            value = lookup;
-            deg2rad( value.toFloat64() );
-         }
-
-         lookup = m_kwl->find(FACTORIES_KW);
-         if ( lookup )
-         {
-            ++consumedKeys;
-            ossimString factories = lookup;
-            bool keywordListFlag = false;
-            lookup = m_kwl->find(FACTORY_KEYWORD_LIST_KW);
-            if ( lookup )
-            {
-               ++consumedKeys;
-               keywordListFlag = ossimString(lookup).toBool();
-            }
-            printFactories(keywordListFlag);
-         }
-
-         lookup = m_kwl->find(FT2MTRS_KW);
-         if ( lookup )
-         {
-            ++consumedKeys;
-            value = lookup;
-            bool us_survey = false;
-            lookup = m_kwl->find(FT2MTRS_US_SURVEY_KW);
-            if ( lookup )
-            {
-               ++consumedKeys;
-               us_survey = ossimString(lookup).toBool();
-            }
-            ft2mtrs( value.toFloat64(), us_survey);
-         }
-
-         lookup = m_kwl->find(HEIGHT_KW);
-         if ( lookup )
-         {
-            ++consumedKeys;
-            value = lookup;
-            ossimGpt gpt;
-            gpt.toPoint(value);
-            outputHeight(gpt);
-         }
-
-         lookup = m_kwl->find(MTRS2FT_KW);
-         if ( lookup )
-         {
-            ++consumedKeys;
-            value = lookup;
-            bool us_survey = false;
-            lookup = m_kwl->find(MTRS2FT_US_SURVEY_KW);
-            if ( lookup )
-            {
-               ++consumedKeys;
-               us_survey = ossimString(lookup).toBool();
-            }
-            mtrs2ft( value.toFloat64(), us_survey);
-         }
-
-         lookup = m_kwl->find(MTRSPERDEG_KW);
-         if ( lookup )
-         {
-            ++consumedKeys;
-            value = lookup;
-            mtrsPerDeg( value.toFloat64() );
-         }
-
-         lookup = m_kwl->find(OVERVIEW_TYPES_KW);
-         if ( lookup )
-         {
-            ++consumedKeys;
-            value = lookup;
-            if ( value.toBool() )
-            {
-               printOverviewTypes();
-            }
-         }
-
-         lookup = m_kwl->find(PLUGINS_KW);
-         if ( lookup )
-         {
-            ++consumedKeys;
-            value = lookup;
-            if ( value.toBool() )
-            {
-               printPlugins();
-            }
-         }
-
-         lookup = m_kwl->find(PLUGIN_TEST_KW);
-         if ( lookup )
-         {
-            ++consumedKeys;
-            value = lookup;
-            testPlugin(value);
-         }
-
-         lookup = m_kwl->find(PROJECTIONS_KW);
-         if ( lookup )
-         {
-            ++consumedKeys;
-            value = lookup;
-            if ( value.toBool() )
-            {
-               printProjections();
-            }
-         }
-
-         lookup = m_kwl->find(RAD2DEG_KW);
-         if ( lookup )
-         {
-            ++consumedKeys;
-            value = lookup;
-            rad2deg( value.toFloat64() );
-         }
-
-         lookup = m_kwl->find(READER_PROPS_KW);
-         if ( lookup )
-         {
-            ++consumedKeys;
-            value = lookup;
-            if ( value.toBool() )
-            {
-               printReaderProps();
-            }
-         }
-   
-         lookup = m_kwl->find(RESAMPLER_FILTERS_KW);
-         if ( lookup )
-         {
-            ++consumedKeys;
-            value = lookup;
-            if ( value.toBool() )
-            {
-               printResamplerFilters();
-            }
-         }
-
-         lookup = m_kwl->find(WRITERS_KW);
-         if ( lookup )
-         {
-            ++consumedKeys;
-            value = lookup;
-            if ( value.toBool() )
-            {
-               printWriters();
-            }
-         }
-
-         lookup = m_kwl->find(WRITER_PROPS_KW);
-         if ( lookup )
-         {
-            ++consumedKeys;
-            value = lookup;
-            if ( value.toBool() )
-            {
-               printWriterProps();
-            }
-         }
-         
-      } // if ( consumedKeys < KEY_COUNT )
-
-      if ( traceDebug() )
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "KEY_COUNT:    " << KEY_COUNT
-            << "\nconsumedKeys: " << consumedKeys << "\n";
-      }
-         
-   } // if ( KEY_COUNT )
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
-   }
-}
-
-ossim_uint32 ossimInfo::executeImageOptions(const ossimFilename& file)
-{
-   static const char M[] = "ossimInfo::executeImageOptions()";
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\nfile: " << file << "\n";
-   }
-   
-   ossim_uint32 consumedKeys = 0;
-
-   const char* lookup = 0;
-   ossimString value = "";
-   bool dnoFlag = false;
-   
-   // Check for dump.  Does not require image to be opened.
-   lookup = m_kwl->find( DUMP_KW );
-   if ( lookup )
-   {
-      ++consumedKeys;
-      lookup = m_kwl->find( DUMP_NO_OVERVIEWS_KW );
-      if ( lookup )
-      {
-         ++consumedKeys;
-         value = lookup;
-         dnoFlag = value.toBool();
-      }
-      dumpImage(file, dnoFlag);
-   }
-   
-   bool centerGroundFlag = false;
-   bool centerImageFlag  = false;
-   bool imageCenterFlag  = false;
-   bool imageRectFlag    = false;
-   bool metaDataFlag     = false;
-   bool paletteFlag      = false;
-   bool imageInfoFlag    = false;
-   bool imageGeomFlag    = false;
-   bool upIsUpFlag       = false;
-   
-   // Center Ground:
-   lookup = m_kwl->find( CENTER_GROUND_KW );
-   if ( lookup )
-   {
-      ++consumedKeys;
-      value = lookup;
-      centerGroundFlag = value.toBool();
-   }
-
-   // Center Image:
-   lookup = m_kwl->find( CENTER_IMAGE_KW );
-   if ( lookup )
-   {
-      ++consumedKeys;
-      value = lookup;
-      centerImageFlag = value.toBool();
-   }
-
-   // Metadata:
-   lookup = m_kwl->find( METADATA_KW );
-   if ( lookup )
-   {
-      ++consumedKeys;
-      value = lookup;
-      metaDataFlag = value.toBool();
-   }
-   
-   // Palette:
-   lookup = m_kwl->find( PALETTE_KW );
-   if ( lookup )
-   {
-      ++consumedKeys;
-      value = lookup;
-      paletteFlag = value.toBool();
-   }
-
-   // Image center:
-   lookup = m_kwl->find( IMAGE_CENTER_KW );
-   if ( lookup )
-   {
-      ++consumedKeys;
-      value = lookup;
-      imageCenterFlag = value.toBool();
-   }
-
-   // Image rect:
-   lookup = m_kwl->find( IMAGE_RECT_KW );
-   if ( lookup )
-   {
-      ++consumedKeys;
-      value = lookup;
-      imageRectFlag = value.toBool();
-   }
-   
-   //---
-   // General image info:
-   // Defaulted ON if no image options set.
-   //---
-   lookup = m_kwl->find( IMAGE_INFO_KW ); 
-   if ( lookup )
-   {
-      ++consumedKeys;
-      value = lookup;
-      imageInfoFlag = value.toBool();
-   }
-   
-   //---
-   // Image geometry info:
-   // Defaulted on if no image options set.
-   //---
-   lookup = m_kwl->find( GEOM_INFO_KW );
-   if ( lookup )
-   {
-      ++consumedKeys;
-      value = lookup;
-      imageGeomFlag = value.toBool();
-   }      
-
-   //---
-   // Up is up:
-   //---
-   lookup = m_kwl->find( UP_IS_UP_KW );
-   if ( lookup )
-   {
-      ++consumedKeys;
-      value = lookup;
-      upIsUpFlag = value.toBool();
-   }
-   
-   // If no options consumed default is image info and geom info:
-   if ( consumedKeys == 0 )
-   {
-      imageInfoFlag = true;
-      imageGeomFlag = true;
-   }
-
-   if ( centerGroundFlag || centerImageFlag || imageCenterFlag || imageRectFlag || metaDataFlag || paletteFlag || imageInfoFlag || imageGeomFlag || upIsUpFlag )
-   {
-      // Requires open image.
-      if ( m_img.valid() == false )
-      {
-         openImage(file);
-      }
-
-      // Output keyword list.
-      ossimKeywordlist okwl;
-
-      if ( centerGroundFlag )
-      {
-         getCenterGround(okwl);
-      }
-
-      if ( centerImageFlag )
-      {
-         getCenterImage(okwl);
-      }
-
-      if ( imageCenterFlag )
-      {
-         getCenterGround(okwl);
-         getCenterImage(okwl);
-      }
-
-      if ( imageRectFlag )
-      {
-         getImageRect(okwl);
-      }
-    
-      if ( metaDataFlag )
-      {
-         getImageMetadata(okwl);
-      }
-      
-      if ( paletteFlag )
-      {
-         getImagePalette(okwl);
-      }
-      
-      if ( imageInfoFlag )
-      {
-         getImageInfo(okwl, dnoFlag);
-      }
-      
-      if ( imageGeomFlag )
-      {
-         getImageGeometryInfo(okwl, dnoFlag);
-      }
-
-      if ( imageRectFlag )
-      {
-         getImageRect(okwl);
-      }
-
-      if ( upIsUpFlag )
-      {
-         getUpIsUpAngle( okwl );
-      }
-      
-      lookup = m_kwl->find( OUTPUT_FILE_KW );
-      ossimFilename outputFile;
-      if ( lookup )
-      {
-         ++consumedKeys;
-         outputFile = lookup;
-      }
-      
-      bool xmlOutFlag = false;
-      lookup = m_kwl->find( FORMAT_KW );
-      if ( lookup )
-      {
-         ++consumedKeys;
-         ossimString format = lookup;
-         if ( format.upcase() == "XML" )
-         {
-            xmlOutFlag = true;
-         }
-      }
-      
-      bool overwriteFlag = false;
-      lookup = m_kwl->find( OVERWRITE_KW );
-      if ( lookup )
-      {
-         ++consumedKeys;
-         value = lookup;
-         overwriteFlag = value.toBool();
-      }
-      
-      if ( !xmlOutFlag )
-      {
-         if ( outputFile == ossimFilename::NIL )
-         {
-            ossimNotify(ossimNotifyLevel_INFO) << okwl << std::endl;
-         }
-         else
-         {
-            // check to make sure geometry doesn't already exist
-            if( outputFile.exists() && !overwriteFlag )
-            {
-               ossimNotify(ossimNotifyLevel_INFO)
-                  << "ERROR: Geometry already exists - "  << outputFile
-                  << "\nUse -v option to overwrite."
-                  << std::endl;
-            }
-            else
-            {
-               okwl.write(outputFile);
-            }
-         }
-      }
-      else
-      {
-         ossimXmlDocument document;
-         document.fromKwl( okwl );
-         if ( outputFile == ossimFilename::NIL )
-         {
-            ossimNotify(ossimNotifyLevel_INFO) << document << std::endl;
-         }
-         else
-         {
-            // check to make sure geometry doesn't already exist
-            if( outputFile.exists() && !overwriteFlag )
-            {
-               ossimNotify(ossimNotifyLevel_INFO)
-                  << "ERROR: Geometry already exists - "  << outputFile
-                  << "\nUse -v option to overwrite."
-                  << std::endl;
-            }
-            else
-            {
-               document.write( outputFile );
-            }
-         }
-      }
-      
-   } // if ( metaDataFlag || paletteFlag || imageInfoFlag || imageGeomFlag )
-   
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "consumedKeys: " << consumedKeys << "\n"
-         << M << " exited...\n";
-   }
-   
-   return consumedKeys;
-}
-
-void ossimInfo::getImageInfo(const ossimFilename& file,
-                             bool dumpFlag,
-                             bool dnoFlag,
-                             bool imageGeomFlag,
-                             bool imageInfoFlag,
-                             bool metaDataFlag,
-                             bool paletteFlag,
-                             ossimKeywordlist& kwl)
-{
-   if ( dumpFlag || dnoFlag )
-   {
-      dumpImage(file, dnoFlag, kwl);
-   }
-
-   // These flags requires open image.
-   if ( imageGeomFlag || imageInfoFlag || metaDataFlag || paletteFlag )
-   {
-      // Note: openImageHandler throws ossimException if it can't open.
-      ossimRefPtr<ossimImageHandler> ih = openImageHandler( file );
-      if ( ih.valid() )
-      {
-         if ( metaDataFlag )
-         {
-            getImageMetadata( ih.get(), kwl );
-         }
-         if ( paletteFlag )
-         {
-            getImagePalette( ih.get(), kwl );
-         }
-         if ( imageInfoFlag )
-         {
-            getImageInfo( ih.get(), kwl, dnoFlag );
-         }
-         if ( imageGeomFlag )
-         {
-            getImageGeometryInfo( ih.get(), kwl, dnoFlag) ;
-         }
-      }
-   }
-}
-
-void ossimInfo::openImage(const ossimFilename& file)
-{
-   m_img = openImageHandler( file );
-}
-
-ossimRefPtr<ossimImageHandler> ossimInfo::openImageHandler(const ossimFilename& file) const
-{
-   ossimRefPtr<ossimImageHandler> result = ossimImageHandlerRegistry::instance()->open(file);
-   if ( result.valid() == false )
-   {
-      std::string errMsg = "ossimInfo::openImage ERROR:\nCould not open: ";
-      errMsg += file.string();
-      throw ossimException(errMsg);
-   }
-   return result;
-}
-
-void ossimInfo::closeImage()
-{
-   m_img = 0;
-}
-
-ossimRefPtr<ossimImageHandler> ossimInfo::getImageHandler()
-{
-   return m_img;
-}
-
-void ossimInfo::dumpImage(const ossimFilename& file, bool dnoFlag) const
-{
-   ossimRefPtr<ossimInfoBase> info = ossimInfoFactoryRegistry::instance()->create(file);
-   if (info.valid())
-   {
-      if (dnoFlag) // Default info processes overviews.
-      {
-         info->setProcessOverviewFlag(false);
-      }
-      info->print(ossimNotify(ossimNotifyLevel_INFO));
-      info = 0;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_INFO)
-         << "No dump available for:  " << file.c_str() << std::endl;
-   }
-}
-
-void ossimInfo::dumpImage(const ossimFilename& file,
-                          bool dnoFlag,
-                          ossimKeywordlist& kwl) const
-{
-   ossimRefPtr<ossimInfoBase> info = ossimInfoFactoryRegistry::instance()->create(file);
-   if (info.valid())
-   {
-      if (dnoFlag) // Default info processes overviews.
-      {
-         info->setProcessOverviewFlag(false);
-      }
-      info->getKeywordlist(kwl);
-      info = 0;
-   }
-   else
-   {
-      ossimNotify(ossimNotifyLevel_INFO)
-         << "No dump available for:  " << file.c_str() << std::endl;
-   }
-}
-void ossimInfo::getImageMetadata(ossimKeywordlist& kwl) const
-{
-   if ( m_img.valid() )
-   {
-      getImageMetadata( m_img.get(), kwl);
-   }
-}
-
-void ossimInfo::getImageMetadata(const ossimImageHandler* ih, ossimKeywordlist& kwl) const
-{
-   if ( ih )
-   {
-      std::vector< ossimRefPtr< ossimProperty > > list;
-      ih->getPropertyList(list);
-      std::vector< ossimRefPtr< ossimProperty > >::const_iterator i = list.begin();
-      while (i != list.end())
-      {
-         if ( (*i).valid() )
-         {
-            ossimString key;
-            ossimString value;
-            
-            // Check for one level of nested container.
-            if ((*i)->getClassName() == "ossimContainerProperty")
-            {
-               ossimContainerProperty* ptr = PTR_CAST(ossimContainerProperty, (*i).get());
-               if (ptr)
-               {
-                  std::vector< ossimRefPtr< ossimProperty > > list2;    
-                  ptr->getPropertyList(list2);
-                  
-                  std::vector< ossimRefPtr< ossimProperty > >::const_iterator i2 = list2.begin();
-                  while (i2 != list2.end())
-                  {
-                     key   = (*i2)->getName();
-                     value = (*i2)->valueToString();
-                     kwl.add(key.c_str(), value.c_str(), true);
-                     ++i2;
-                  }
-               }
-            }
-            else // Not a container.
-            {
-               key   = (*i)->getName();
-               value = (*i)->valueToString();
-               kwl.add(key.c_str(), value.c_str(), true);
-            }
-         }
-         ++i;
-      }
-      
-   } // if ( ih )
-
-} // End: getImageMetadata(ossimImageHandler* ih, ossimKeywordlist& kwl)
-
-void ossimInfo::getImagePalette(ossimKeywordlist& kwl)
-{
-   if ( m_img.valid() )
-   {
-      getImagePalette( m_img.get(), kwl );
-   }
-}
-
-void ossimInfo::getImagePalette(ossimImageHandler* ih, ossimKeywordlist& kwl) const
-{
-   if ( ih )
-   {
-      if(ih->getLut().valid())
-      {
-         ossim_uint32 entryIdx = 0;
-         std::vector<ossim_uint32> entryList;
-         ih->getEntryList(entryList);
-         for(entryIdx = 0; entryIdx < ih->getNumberOfEntries();++entryIdx)
-         {
-            ih->setCurrentEntry(entryList[entryIdx]);
-            ossimString prefix = "image";
-            prefix = prefix + ossimString::toString(entryList[entryIdx]) + ".lut.";
-            if(ih->getLut().valid())
-            {
-               ih->getLut()->saveState(kwl, prefix);
-            }
-         }
-      }
-      
-   } // if ( ih )
-}
-
-void ossimInfo::getImageInfo(ossimKeywordlist& kwl, bool dnoFlag)
-{
-   if ( m_img.valid() )
-   {
-      getImageInfo( m_img.get(), kwl, dnoFlag );
-   }
-}
-
-void ossimInfo::getImageInfo( ossimImageHandler* ih, ossimKeywordlist& kwl, bool dnoFlag ) const
-{
-   if ( ih )
-   {
-      ossim_uint32 numEntries = 0;
-
-      std::vector<ossim_uint32> entryList;
-      ih->getEntryList(entryList);
-
-      std::vector<ossim_uint32>::const_iterator i = entryList.begin();
-      while ( i != entryList.end() )
-      {
-         if ( getImageInfo( ih, (*i), kwl, dnoFlag ) )
-         {
-            ++numEntries;
-         }
-         ++i;
-      }
-      
-      kwl.add(ossimKeywordNames::NUMBER_ENTRIES_KW, numEntries, true);
-
-   } // if ( ih )
-}
-   
-bool ossimInfo::getImageInfo( ossim_uint32 entry, ossimKeywordlist& kwl, bool dnoFlag )
-{
-   bool result = false;
-   if ( m_img.valid() )
-   {
-      result = getImageInfo( m_img.get(), entry, kwl, dnoFlag );
-   }
-   return result;
-}
- 
-bool ossimInfo::getImageInfo( ossimImageHandler* ih, ossim_uint32 entry, 
-                              ossimKeywordlist& kwl, bool dnoFlag ) const
-{
-   bool result = false;
-   
-   if ( ih )
-   {
-      if ( ih->setCurrentEntry(entry) )
-      {
-         bool outputEntry = true;
-         if ( dnoFlag )
-         {
-            if ( isImageEntryOverview() )
-            {
-               outputEntry = false;
-            }
-         }
-
-         if ( outputEntry )
-         {
-            result = true;
-
-            // Entry number:
-            ossimString prefix = "image";
-            prefix = prefix + ossimString::toString(entry) + ".";
-            kwl.add(prefix.c_str(), ossimKeywordNames::ENTRY_KW, entry, true);
-            
-            // Get the entry_name (specialized multi-entry readers only):
-            std::string entryName;
-            ih->getEntryName( entry, entryName );
-            if ( entryName.size() )
-            {
-               kwl.add(prefix.c_str(), "entry_name", entryName.c_str(), true);
-            }
-
-            // Type/class of reader:
-            kwl.add(prefix, "type", ih->getClassName().c_str(), true);
-
-            // Driver name if different from class name:
-            if ( ih->getClassName() != ih->getShortName() )
-            {
-               kwl.add(prefix, "driver", ih->getShortName().c_str(), true);
-            }
-
-            // Type/class of overview reader:
-            if (ih->getOverview())
-            {
-               kwl.add(prefix, "overview.type",
-                       ih->getOverview()->getClassName().c_str(), true);
-            }
-            
-            ossimDrect boundingRect = ih->getBoundingRect();
-            kwl.add(prefix,ossimKeywordNames::UL_X_KW, boundingRect.ul().x, true);
-            kwl.add(prefix,ossimKeywordNames::UL_Y_KW, boundingRect.ul().y, true);
-            kwl.add(prefix,ossimKeywordNames::LR_X_KW, boundingRect.lr().x, true);
-            kwl.add(prefix,ossimKeywordNames::LR_Y_KW, boundingRect.lr().y, true);
-            
-            const ossim_uint32 BANDS = ih->getNumberOfInputBands();
-            kwl.add(prefix,ossimKeywordNames::NUMBER_INPUT_BANDS_KW, BANDS, true);
-            kwl.add(prefix,ossimKeywordNames::NUMBER_OUTPUT_BANDS_KW,
-                    ih->getNumberOfOutputBands(), true);
-            kwl.add(prefix,ossimKeywordNames::NUMBER_LINES_KW,
-                    boundingRect.height(), true);
-            kwl.add(prefix,ossimKeywordNames::NUMBER_SAMPLES_KW,
-                    boundingRect.width(), true);
-            
-            ossimScalarType scalar = ih->getOutputScalarType();
-            
-            for(ossim_uint32 i = 0; i < BANDS; ++i)
-            {
-               ossimString band = ossimString("band") + ossimString::toString(i) + ".";
-               
-               kwl.add(prefix, band+"null_value", ih->getNullPixelValue(i), true);
-               kwl.add(prefix, band+"min_value", ih->getMinPixelValue(i), true);
-               kwl.add(prefix, band+"max_value", ih->getMaxPixelValue(i), true);
-            }
-            
-            // Output Radiometry.
-            std::string rad;
-            getRadiometry(scalar, rad);
-            kwl.add(prefix, "radiometry", rad.c_str(), true);
-            kwl.add(prefix,"number_decimation_levels", ih->getNumberOfDecimationLevels(), true);
-            
-         } // if ( outputEntry )
-         
-      } // if ( ih->setCurrentEntry(entry) )
-      
-   } // if ( ih )
-   
-   return result;
-
-} // End: ossimInfo::getImageInfo( ih, entry...
-
-void ossimInfo::getImageGeometryInfo(ossimKeywordlist& kwl, bool dnoFlag)
-{
-   if ( m_img.valid() )
-   {
-      getImageGeometryInfo( m_img.get(), kwl, dnoFlag );
-   }
-}
-
-void ossimInfo::getImageGeometryInfo( ossimImageHandler* ih, ossimKeywordlist& kwl, bool dnoFlag) const
-{
-   if ( ih )
-   {      ossim_uint32 numEntries = 0;
-
-      std::vector<ossim_uint32> entryList;
-      ih->getEntryList(entryList);
-
-      std::vector<ossim_uint32>::const_iterator i = entryList.begin();
-      while ( i != entryList.end() )
-      {
-         if ( getImageGeometryInfo( ih, (*i), kwl, dnoFlag ) )
-         {
-            ++numEntries;
-         }
-         ++i;
-      }
-      
-      kwl.add(ossimKeywordNames::NUMBER_ENTRIES_KW, numEntries, true);
-
-   } // if ( ih )
-}
-   
-bool ossimInfo::getImageGeometryInfo(ossim_uint32 entry, ossimKeywordlist& kwl, bool dnoFlag)
-{
-   bool result = false; 
-   if ( m_img.valid() )
-   {
-      getImageGeometryInfo( m_img.get(), entry, kwl, dnoFlag );
-   }
-   return result;
-}
-
-bool ossimInfo::getImageGeometryInfo( ossimImageHandler* ih,
-                                      ossim_uint32 entry, 
-                                      ossimKeywordlist& kwl, 
-                                      bool dnoFlag) const
-{
-   bool result = false;
-   
-   if ( ih )
-   {      
-      if ( ih->setCurrentEntry(entry) )
-      {
-         bool outputEntry = true;
-         if ( dnoFlag )
-         {
-            if ( isImageEntryOverview() )
-            {
-               outputEntry = false;
-            }
-         }
-
-         if ( outputEntry )
-         {
-            ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
-            if(geom.valid())
-            {
-               result = true;
-               
-               ossimString prefix = "image";
-               prefix = prefix + ossimString::toString(entry) + ossimString(".geometry.");
-               
-               geom->saveState(kwl, prefix);
-               
-               // Output support files list:
-               ossimSupportFilesList::instance()->save(kwl, prefix);
-               
-               ossimGpt ulg;
-               ossimGpt llg;
-               ossimGpt lrg;
-               ossimGpt urg;
-
-               ossimDrect outputRect = ih->getBoundingRect();
-
-               geom->localToWorld(outputRect.ul(), ulg);
-               geom->localToWorld(outputRect.ll(), llg);
-               geom->localToWorld(outputRect.lr(), lrg);
-               geom->localToWorld(outputRect.ur(), urg);
-               
-               //---
-               // *** HACK *** 
-               // Encountered CADRG RPF imagery where the left edge was longitude -180 and
-               // right edge +180. The projection code above reasonably maps all -180 to +180.
-               // This however breaks the image footprint since it would appear that the left
-               // and right edges were coincident instead of 360 degrees apart, i.e., a line
-               // segment instead of a rect. So added check here for coincident left and right
-               // edges and remapping left edge to -180.
-               //---
-               if ((ulg.lon == 180.0) && (urg.lon == 180.0))  
-               {
-                  ulg.lon = -180.0;
-               }
-               if ((llg.lon == 180.0) && (lrg.lon == 180.0))  
-               {
-                  llg.lon = -180.0;
-               }
-
-               kwl.add(prefix, "ul_lat", ulg.latd(), true);
-               kwl.add(prefix, "ul_lon", ulg.lond(), true);
-               kwl.add(prefix, "ll_lat", llg.latd(), true);
-               kwl.add(prefix, "ll_lon", llg.lond(), true);
-               kwl.add(prefix, "lr_lat", lrg.latd(), true);
-               kwl.add(prefix, "lr_lon", lrg.lond(), true);
-               kwl.add(prefix, "ur_lat", urg.latd(), true);
-               kwl.add(prefix, "ur_lon", urg.lond(), true);
-               
-               if(!kwl.find(ossimKeywordNames::TIE_POINT_LAT_KW))
-               {
-                  kwl.add(prefix, ossimKeywordNames::TIE_POINT_LAT_KW, ulg.latd(), true);
-                  kwl.add(prefix, ossimKeywordNames::TIE_POINT_LON_KW, ulg.lond(), true);
-                  
-                  if ( outputRect.height()-1.0 > DBL_EPSILON )
-                  {
-                     kwl.add(prefix, ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT,
-                             fabs(ulg.latd()-llg.latd())/(outputRect.height()-1.0), true);
-                  }
-                  
-                  if ( outputRect.width()-1.0 > DBL_EPSILON )
-                  {
-                     kwl.add(prefix, ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON,
-                             fabs(ulg.lond()-urg.lond())/(outputRect.width()-1.0), true);
-                  }
-               }
-               
-               ossimDpt gsd = geom->getMetersPerPixel();
-               kwl.add(prefix, ossimKeywordNames::METERS_PER_PIXEL_X_KW, gsd.x, true);
-               kwl.add(prefix, ossimKeywordNames::METERS_PER_PIXEL_Y_KW, gsd.y, true);
-               
-            } // if(geom.valid())
-
-         } // if ( outputEntry )
-
-      } // if ( ih->setCurrentEntry(entry) )
-
-      if ( !result )
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "No geometry for file " << ih->getFilename() << std::endl;
-      }
-      
-   } // if ( ih )
-   
-   return result;
-
-} // End: ossimInfo::getImageGeometryInfo( ih, entry...
-
-void ossimInfo::getCenterImage(ossimKeywordlist& kwl)
-{
-   if ( m_img.valid() )
-   {
-      getCenterImage( m_img.get(), kwl );
-   }
-}
-
-void ossimInfo::getCenterImage( ossimImageHandler* ih, ossimKeywordlist& kwl) const
-{
-   if ( ih )
-   {  
-      std::vector<ossim_uint32> entryList;
-      ih->getEntryList(entryList);
-      
-      std::vector<ossim_uint32>::const_iterator i = entryList.begin();
-      while ( i != entryList.end() )
-      {
-         getCenterImage( ih, (*i), kwl );
-         ++i;
-      }
-   } 
-}
-   
-void ossimInfo::getCenterImage(ossim_uint32 entry, ossimKeywordlist& kwl)
-{
-   if ( m_img.valid() )
-   {
-      getCenterImage( m_img.get(), entry, kwl );
-   }
-}
-
-void ossimInfo::getCenterImage( ossimImageHandler* ih,
-                                ossim_uint32 entry, 
-                                ossimKeywordlist& kwl ) const
-{
-   if ( ih )
-   {
-      if ( ih->setCurrentEntry(entry) )
-      {
-         ossimString prefix = "image";
-         prefix = prefix + ossimString::toString(entry) + ".";
-         ossimDrect bounds = ih->getBoundingRect();
-
-         if( !bounds.hasNans() )
-         {
-            ossimDpt iPt = bounds.midPoint();
-            kwl.add(prefix, "center_image", iPt.toString().c_str(), true);
-         }
-
-      } // if ( ih->setCurrentEntry(entry) )
-      else
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "Could not get image center for: " << ih->getFilename() << std::endl;
-      }
-      
-   } // if ( ih )
-}
-
-void ossimInfo::getCenterGround(ossimKeywordlist& kwl)
-{
-   if ( m_img.valid() )
-   {
-      getCenterGround( m_img.get(), kwl );
-   }
-}
-
-void ossimInfo::getCenterGround( ossimImageHandler* ih, ossimKeywordlist& kwl) const
-{
-   if ( ih )
-   {  
-      std::vector<ossim_uint32> entryList;
-      ih->getEntryList(entryList);
-      
-      std::vector<ossim_uint32>::const_iterator i = entryList.begin();
-      while ( i != entryList.end() )
-      {
-         getCenterGround( ih, (*i), kwl );
-         ++i;
-      }
-   } 
-}
-   
-void ossimInfo::getCenterGround(ossim_uint32 entry, ossimKeywordlist& kwl)
-{
-   if ( m_img.valid() )
-   {
-      getCenterGround( m_img.get(), entry, kwl );
-   }
-}
-
-void ossimInfo::getCenterGround( ossimImageHandler* ih,
-                                 ossim_uint32 entry, 
-                                 ossimKeywordlist& kwl ) const
-{
-   if ( ih )
-   {
-      if ( ih->setCurrentEntry(entry) )
-      {
-         ossimString prefix = "image";
-         prefix = prefix + ossimString::toString(entry) + ".";
-
-         ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
-         if(geom.valid())
-         {
-            ossimDrect bounds;
-            geom->getBoundingRect( bounds );
-            
-            if( !bounds.hasNans() )
-            {
-               ossimDpt iPt = bounds.midPoint();
-               ossimGpt gPt;
-               geom->localToWorld(iPt, gPt);
-               kwl.add(prefix, "center_ground", gPt.toString().c_str(), true);
-            }
-         }
-
-      } // if ( ih->setCurrentEntry(entry) )
-      else
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "Could not get ground center for: " << ih->getFilename() << std::endl;
-      }
-      
-   } // if ( ih )
-}
-
-void ossimInfo::getUpIsUpAngle(ossimKeywordlist& kwl)
-{
-   if ( m_img.valid() )
-   {
-      getUpIsUpAngle( m_img.get(), kwl );
-   }
-}
-
-void ossimInfo::getUpIsUpAngle( ossimImageHandler* ih, ossimKeywordlist& kwl) const
-{
-   if ( ih )
-   {  
-      std::vector<ossim_uint32> entryList;
-      ih->getEntryList(entryList);
-      
-      std::vector<ossim_uint32>::const_iterator i = entryList.begin();
-      while ( i != entryList.end() )
-      {
-         getUpIsUpAngle( ih, (*i), kwl );
-         ++i;
-      }
-   } 
-}
-
-void ossimInfo::getUpIsUpAngle(ossim_uint32 entry, ossimKeywordlist& kwl)
-{
-   if ( m_img.valid() )
-   {
-      getUpIsUpAngle( m_img.get(), entry, kwl );
-   }
-}
-
-void ossimInfo::getUpIsUpAngle( ossimImageHandler* ih,
-                                ossim_uint32 entry, 
-                                ossimKeywordlist& kwl ) const
-{
-   if ( ih )
-   {
-      bool result = false;
-
-      if ( ih->setCurrentEntry(entry) )
-      {
-         ossimString prefix = "image";
-         prefix = prefix + ossimString::toString(entry) + ".";
-         
-         ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
-         if(geom.valid())
-         {
-            ossim_float64 upIsUp = 0.0;
-            if ( geom->isAffectedByElevation() )
-            {
-               upIsUp = geom->upIsUpAngle();
-               kwl.add(prefix, UP_IS_UP_KW, upIsUp, true);
-            }
-         }
-
-         result = true;
-
-      } // if ( ih->setCurrentEntry(entry) )
-
-      if ( !result )
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "Could not get up is up angle for: " << ih->getFilename() << std::endl;
-      }
-      
-   } // if ( ih )
-}
-   
-
-void ossimInfo::getImageRect(ossimKeywordlist& kwl)
-{
-   if ( m_img.valid() )
-   {
-      getImageRect( m_img.get(), kwl );
-   }
-}
-
-void ossimInfo::getImageRect( ossimImageHandler* ih, ossimKeywordlist& kwl) const
-{
-   if ( ih )
-   {  
-      std::vector<ossim_uint32> entryList;
-      ih->getEntryList(entryList);
-      
-      std::vector<ossim_uint32>::const_iterator i = entryList.begin();
-      while ( i != entryList.end() )
-      {
-         getImageRect( ih, (*i), kwl );
-         ++i;
-      }
-   } // if ( ih )
-}
-   
-void ossimInfo::getImageRect(ossim_uint32 entry, ossimKeywordlist& kwl)
-{
-   if ( m_img.valid() )
-   {
-      getImageRect( m_img.get(), entry, kwl );
-   }
-}
-
-void ossimInfo::getImageRect( ossimImageHandler* ih,
-                              ossim_uint32 entry, 
-                              ossimKeywordlist& kwl ) const
-{
-   if ( ih )
-   {
-      if ( ih->setCurrentEntry(entry) )
-      {
-         ossimString prefix = "image";
-         prefix = prefix + ossimString::toString(entry) + ".";
-         ossimIrect outputRect = ih->getBoundingRect();
-         kwl.add(prefix, "image_rectangle", outputRect.toString().c_str(), true);
-
-      } // if ( ih->setCurrentEntry(entry) )
-      else
-      {
-         ossimNotify(ossimNotifyLevel_WARN)
-            << "Could not get image rectangle for: " << ih->getFilename() << std::endl;
-      }
-      
-   } // if ( ih )
-
-} // End: getImageRect( ih, entry...
-
-// Note be sure to m_img->setCurrentEntry before calling.
-bool ossimInfo::isImageEntryOverview() const
-{
-   bool result = false; // Have to prove it.
-   if ( m_img.valid() )
-   {
-      result = isImageEntryOverview( m_img.get() );
-   }
-   return result;
-}
- 
-bool ossimInfo::isImageEntryOverview( const ossimImageHandler* ih ) const
-{
-   bool result = false; // Have to prove it.
-   if ( ih )
-   {     
-      ossimString s = "imag";
-      ossimRefPtr<ossimProperty> prop = ih->getProperty(s);
-      if (prop.valid())
-      {
-         ossimString s;
-         prop->valueToString(s);
-         if (s.toFloat32() < 1.0)
-         {
-            result = true;
-         }
-      }
-   }
-   return result;
-}
-
-void ossimInfo::printConfiguration() const
-{
-   printConfiguration( ossimNotify(ossimNotifyLevel_INFO) );
-}
-
-std::ostream& ossimInfo::printConfiguration(std::ostream& out) const
-{
-   out << "version:  OSSIM "
-       << ossimInit::instance()->instance()->version().c_str()
-       << "\npreferences_keyword_list:\n"
-       << ossimPreferences::instance()->preferencesKWL()
-       << std::endl;
-   return out;
-}
-
-void ossimInfo::printFactories(bool keywordListFlag)const
-{
-   std::vector<ossimString> typeList;
-   ossimObjectFactoryRegistry::instance()->getTypeNameList(typeList);
-   for(int i = 0; i < (int)typeList.size(); ++i)
-   {
-      if(keywordListFlag)
-      {
-         ossimObject* obj = ossimObjectFactoryRegistry::instance()->createObject(typeList[i]);
-         if(obj)
-         {
-            cout << typeList[i] << endl;
-            cout << "______________________________________________________" << endl;
-            ossimKeywordlist kwl;
-            obj->saveState(kwl);
-            cout << kwl << endl;
-            cout << "______________________________________________________" << endl;
-            delete obj;
-         }
-      }
-      else
-      {
-         cout << typeList[i] << endl;
-      }
-   }  
-}
-
-void ossimInfo::printDatums() const
-{
-   ossimInfo::printDatums( ossimNotify(ossimNotifyLevel_INFO) );
-}
-
-std::ostream& ossimInfo::printDatums(std::ostream& out) const
-{
-   // Capture the original flags.
-   std::ios_base::fmtflags f = out.flags();
-
-   std::vector<ossimString> datumList;
-   ossimDatumFactoryRegistry::instance()->getList(datumList);
-   
-   std::vector<ossimString>::const_iterator i = datumList.begin();
-   
-   while ( i != datumList.end() )
-   {
-      const ossimDatum* datum = ossimDatumFactoryRegistry::instance()->create(*i);
-      if (datum)
-      {
-         if ( datum->ellipsoid() )
-         {
-            out << setiosflags(ios::left)
-                << setw(7)
-                << datum->code().c_str()
-                << setw(48)
-                << datum->name().c_str()
-                << setw(10) 
-                << "Ellipse:"
-                << datum->ellipsoid()->name()
-                << std::endl;
-         }
-         else
-         {
-            out << "No ellipsoid for code: " << (*i) << std::endl;
-         }
-      }
-      else
-      {
-         out << "No datum for code: " << (*i) << std::endl;
-      }
-      
-      ++i;
-   }
-
-   // Reset flags.
-   out.setf(f);
-   
-   return out;
-}
-
-void ossimInfo::deg2rad(const ossim_float64& degrees) const
-{
-   deg2rad( degrees, ossimNotify(ossimNotifyLevel_INFO) );
-}
-
-std::ostream& ossimInfo::deg2rad(const ossim_float64& degrees, std::ostream& out) const
-{
-   double radians = degrees * RAD_PER_DEG;
-
-   // Capture the original flags.
-   std::ios_base::fmtflags f = out.flags();
-   
-   out << std::setiosflags(std::ios::fixed) << std::setprecision(15)
-       << "\n" << degrees << " degrees = "
-       << radians << " radians.\n" << std::endl;
-
-   // Reset flags.
-   out.setf(f);
-
-   return out;
-}
-
-void ossimInfo::rad2deg(const ossim_float64& radians) const
-{
-   rad2deg(radians, ossimNotify(ossimNotifyLevel_INFO));
-}
-
-std::ostream& ossimInfo::rad2deg(const ossim_float64& radians, std::ostream& out) const
-{
-   double degrees = radians * DEG_PER_RAD;
-
-   // Capture the original flags.
-   std::ios_base::fmtflags f = out.flags();
-   
-   out << std::setiosflags(std::ios::fixed) << std::setprecision(15)
-       << "\n" << radians << " radians = "
-       << degrees << " degrees.\n" << std::endl;
-
-   // Reset flags.
-   out.setf(f);
-
-   return out;
-}
-
-void ossimInfo::ft2mtrs(const ossim_float64& feet, bool us_survey) const
-{
-   ft2mtrs( feet, us_survey, ossimNotify(ossimNotifyLevel_INFO) );
-}
-
-std::ostream& ossimInfo::ft2mtrs(const ossim_float64& feet,
-                                 bool us_survey,
-                                 std::ostream& out) const
-{
-   ossim_float64 meters = 0.0;
-   std::string conversionString;
-   if (us_survey)
-   {
-      meters = feet * US_METERS_PER_FT;
-      conversionString = "0.3048006096";
-   }
-   else
-   {
-      meters = feet * MTRS_PER_FT;
-      conversionString = "0.3048";
-   }
-
-   // Capture the original flags.
-   std::ios_base::fmtflags f = out.flags();
-   
-   out << setiosflags(ios::fixed) << setprecision(15)
-       << feet << " * " << conversionString << " = "
-       << meters << " meters." << std::endl;
-
-   // Reset flags.
-   out.setf(f);
-
-   return out;
-}
-
-void ossimInfo::mtrs2ft(const ossim_float64& meters, bool us_survey) const
-{
-   mtrs2ft(meters, us_survey, ossimNotify(ossimNotifyLevel_INFO));
-}
-
-std::ostream& ossimInfo::mtrs2ft(const ossim_float64& meters,
-                                 bool us_survey,
-                                 std::ostream& out) const
-{
-   // Capture the original flags.
-   std::ios_base::fmtflags f = out.flags();
-
-   double feet = 0.0;
-   std::string conversionString;
-
-   if (us_survey)
-   {
-      feet = meters / US_METERS_PER_FT;
-      conversionString = "0.3048006096";
-   }
-   else
-   {
-      feet = meters / MTRS_PER_FT;
-      conversionString = "0.3048";
-   }
-
-   out << setiosflags(ios::fixed) << setprecision(15)
-       << meters << " / " << conversionString << " = "
-       << feet << " feet." << std::endl;
-
-   // Reset flags.
-   out.setf(f);
-   
-   return out;
-}
-
-void ossimInfo::mtrsPerDeg(const ossim_float64& latitude) const
-{
-   mtrsPerDeg(latitude, ossimNotify(ossimNotifyLevel_INFO));
-}
-
-std::ostream& ossimInfo::mtrsPerDeg(const ossim_float64& latitude, std::ostream& out) const
-{
-   ossimGpt gpt(latitude, 0.0);
-   ossimDpt      mpd          = gpt.metersPerDegree();  
-   ossim_float64 radius       = gpt.datum()->ellipsoid()->geodeticRadius(latitude);
-   ossim_float64 arcLengthLat = mpd.y/60.0;
-   ossim_float64 arcLengthLon = mpd.x/60.0;
-   out << setiosflags(ios::fixed) << setprecision(15)
-       << "Meters per degree and minute at latitude of " << latitude << ":\n"
-       << "Meters per degree latitude:   "
-       << setw(20) << mpd.y << "\n"
-       << "Meters per degree longitude:  "
-       << setw(20) << mpd.x << "\n"
-       << "Meters per minute latitude:   "
-       << setw(20) << arcLengthLat << "\n"
-       << "Meters per minute longitude:  "
-       << setw(20) << arcLengthLon << "\n"
-       << "Geodetic radius:              "
-       << setw(20) << radius << "\n"
-       << std::endl;
-   return out;
-}
-
-void ossimInfo::outputHeight(const ossimGpt& gpt) const
-{
-   outputHeight(gpt, ossimNotify(ossimNotifyLevel_INFO));
-}
-
-std::ostream& ossimInfo::outputHeight(const ossimGpt& gpt, std::ostream& out) const
-{
-   // Capture the original flags.
-   std::ios_base::fmtflags f = out.flags();
-
-   ossim_float64 hgtAboveMsl = ossimElevManager::instance()->getHeightAboveMSL(gpt);
-   ossim_float64 hgtAboveEllipsoid = ossimElevManager::instance()->getHeightAboveEllipsoid(gpt);
-   ossim_float64 geoidOffset = ossimGeoidManager::instance()->offsetFromEllipsoid(gpt);
-   ossim_float64 mslOffset = 0.0;
-   
-   if(ossim::isnan(hgtAboveEllipsoid)||ossim::isnan(hgtAboveMsl))
-   {
-      mslOffset = ossim::nan();
-   }
-   else
-   {
-      mslOffset = hgtAboveEllipsoid - hgtAboveMsl;
-   }
-   
-   std::vector<ossimFilename> cellList;
-   ossimElevManager::instance()->getOpenCellList(cellList);
-   
-   if (!cellList.empty())
-   {
-      out << "Opened cell:            " << cellList[0] << "\n";
-   }
-   else
-   {
-      out << "Did not find cell for point: " << gpt << "\n";
-   }
-   
-   out << "MSL to ellipsoid delta: ";
-   if (!ossim::isnan(mslOffset))
-   {
-      out << std::setprecision(15) << mslOffset;
-   }
-   else
-   {
-      out << "nan";
-   }
-   out << "\nHeight above MSL:       ";
-   if (!ossim::isnan(hgtAboveMsl))
-   {
-      out << std::setprecision(15) << hgtAboveMsl;
-   }
-   else
-   {
-      out << "nan";
-   }
-   out << "\nHeight above ellipsoid: ";
-   if (!ossim::isnan(hgtAboveEllipsoid))
-   {
-      out << std::setprecision(15) << hgtAboveEllipsoid << "\n";
-   }
-   else
-   {
-      out << "nan" << "\n";
-   }
-   out << "Geoid value:            ";
-
-   if (!ossim::isnan(geoidOffset))
-   {
-      out << std::setprecision(15) << geoidOffset << std::endl;
-   }
-   else
-   {
-      out << "nan" << std::endl;
-   }
-
-   // Reset flags.
-   out.setf(f);
-   
-   return out;
-}
-
-void ossimInfo::printPlugins() const
-{
-   printPlugins(ossimNotify(ossimNotifyLevel_INFO));
-}
-
-std::ostream& ossimInfo::printPlugins(std::ostream& out) const
-{
-   if(ossimSharedPluginRegistry::instance()->getNumberOfPlugins() > 0)
-   {
-      ossimSharedPluginRegistry::instance()->printAllPluginInformation(out);
-   }
-   else
-   {
-      out << "No plugins loaded in the OSSIM core library" << std::endl;
-   }
-   return out;
-}
-
-void ossimInfo::testPlugin(const ossimFilename& plugin) const
-{
-   testPlugin(plugin, ossimNotify(ossimNotifyLevel_INFO));
-}
-
-std::ostream& ossimInfo::testPlugin(const ossimFilename& plugin, std::ostream& out) const
-{
-   if( ossimSharedPluginRegistry::instance()->registerPlugin(plugin.expand()) )
-   {
-      out << "Plugin loaded: " << plugin << std::endl;
-   }
-   else
-   {
-      out << "Unable to load plugin: " << plugin << std::endl;
-   }
-   return out;
-}
-
-void ossimInfo::printOverviewTypes() const
-{
-   printOverviewTypes(ossimNotify(ossimNotifyLevel_INFO));
-}
-
-std::ostream& ossimInfo::printOverviewTypes(std::ostream& out) const
-{
-   out << "\nValid overview types: " << std::endl;
-   
-   std::vector<ossimString> outputType;
-   
-   ossimOverviewBuilderFactoryRegistry::instance()->getTypeNameList(outputType);
-   std::copy(outputType.begin(),
-             outputType.end(),
-             std::ostream_iterator<ossimString>(out, "\t\n"));
-   return out;
-}
-
-void ossimInfo::printProjections() const
-{
-   printProjections(ossimNotify(ossimNotifyLevel_INFO));
-}
-
-std::ostream& ossimInfo::printProjections(std::ostream& out) const
-{
-   out << "Projections:\n";
-   
-   std::vector<ossimString> list;
-   ossimProjectionFactoryRegistry::instance()->
-      getAllTypeNamesFromRegistry(list);
-   
-   std::vector<ossimString>::const_iterator i = list.begin();
-   while ( i != list.end() )
-   {
-      out << *i << "\n";
-      ++i;
-   }
-   out << std::endl;
-   
-   return out;
-}
-
-void ossimInfo::printReaderProps() const
-{
-   printReaderProps(ossimNotify(ossimNotifyLevel_INFO));
-}
-
-std::ostream& ossimInfo::printReaderProps(std::ostream& out) const
-{
-   return ossimImageHandlerRegistry::instance()->printReaderProps( out );
-}
-
-void ossimInfo::printResamplerFilters() const
-{
-   printResamplerFilters(ossimNotify(ossimNotifyLevel_INFO));
-}
-
-std::ostream& ossimInfo::printResamplerFilters(std::ostream& out) const
-{
-   std::vector<ossimString> list;
-   ossimFilterResampler f;
-   f.getFilterTypes(list);
-   std::vector<ossimString>::const_iterator i = list.begin();
-   while ( i != list.end() )
-   {
-      out << *i << "\n";
-      ++i;
-   }
-   out << std::endl;
-   return out;
-}
-
-void ossimInfo::printWriters() const
-{
-   printWriters(ossimNotify(ossimNotifyLevel_INFO));
-}
-
-std::ostream& ossimInfo::printWriters(std::ostream& out) const
-{
-   return ossimImageWriterFactoryRegistry::instance()->printImageTypeList( out );
-}
-
-
-void ossimInfo::printWriterProps() const
-{
-   printWriterProps(ossimNotify(ossimNotifyLevel_INFO));
-}
-
-std::ostream& ossimInfo::printWriterProps(std::ostream& out) const
-{
-   return ossimImageWriterFactoryRegistry::instance()->printWriterProps( out );
-}
-
-void ossimInfo::getRadiometry(ossimScalarType scalar, std::string& s) const
-{
-   // Output Radiometry.
-   switch(scalar)
-   {
-      case OSSIM_UINT8:
-      {
-         s = "8-bit";
-         break;
-      }
-      case OSSIM_USHORT11:
-      {
-         s = "11-bit";
-         break;
-      }
-      case OSSIM_UINT16:
-      {
-         s = "16-bit unsigned";
-         break;
-      }
-      case OSSIM_SINT16:
-      {
-         s = "16-bit signed";
-         break;
-      }
-      case OSSIM_UINT32:
-      {
-         s = "32-bit unsigned";
-         break;
-      }
-      case OSSIM_SINT32:
-      {
-         s = "32-bit signed";
-         break;
-      }
-      case OSSIM_FLOAT32:
-      {
-         s = "float";
-         break;
-      }
-      case OSSIM_NORMALIZED_FLOAT:
-      {
-         s = "normalized float";
-         break;
-      }
-      default:
-      {
-         s = "unknown";
-         break;
-      }
-   }
-}
-
-void ossimInfo::usage(ossimArgumentParser& ap)
-{
-   // Add global usage options.
-   ossimInit::instance()->addOptions(ap);
-   
-   // Set app name.
-   ap.getApplicationUsage()->setApplicationName(ap.getApplicationName());
-
-   // Add options.
-   addArguments(ap);
-   
-   // Write usage.
-   ap.getApplicationUsage()->write(ossimNotify(ossimNotifyLevel_INFO));
-   
-   ossimNotify(ossimNotifyLevel_INFO)
-      << " examples:\n\n" 
-      << "    ossim-info --version\n"
-      << "    ossim-info -i ./myfile.tif\n"
-      << "      prints out only general image information\n\n"
-      << "    ossim-info -p ./myfile.tif\n"
-      << "      prints out only image projection information\n\n"
-      << "    ossim-info -p -s wge ./myfile.tif\n"
-      << "      prints out only image projection information and shifts to wgs84\n\n"
-      << "    ossim-info -p -i ./myfile.tif\n"
-      << "      prints out both image and projection information\n\n"
-      << "    ossim-info -p -i ./myfile.tif -o ./myfile.geom\n"
-      << "      writes geometry file with both image and projection information\n\n"
-      << "    ossim-info -p -i ./myfile.tif -v -o ./myfile.geom\n"
-      << "      writes geometry file with both image and projection information\n"
-      << "      while overwriting existing .geom file.\n\n"
-      << "    ossim-info -f XML ./myfile.tif\n"
-      << "      prints out image and projection information as an XML document\n\n"
-      << "    ossim-info -d myfile.ntf\n"
-      << "      Dumps all data available, in this case, all nitf tags, from file.\n\n"
-      << "    ossim-info -d a.toc\n"
-      << "      Dumps all data available, in this case, all nitf and rpf tags, from file.\n\n"
-      << "    ossim-info --dno a.toc\n"
-      << "      \"dno\" for \"dump no overviws\" Dumps all data available,\n"
-      << "       in this case, all nitf and rpf tags, from file ignoring overviews.\n\n"
-      << "    ossim-info -d -i -p myfile.ntf\n"
-      << "      Typical usage case, i.e. do a dump of tags and print out image and\n"
-      << "      projection information.\n\n"
-      << std::endl;
-}
diff --git a/src/ossim/util/ossimRpfUtil.cpp b/src/ossim/util/ossimRpfUtil.cpp
deleted file mode 100644
index a6ec92f..0000000
--- a/src/ossim/util/ossimRpfUtil.cpp
+++ /dev/null
@@ -1,348 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description:  ossimRpfUtil.cpp
-// 
-// Utility class to stuff with rpf files.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/util/ossimRpfUtil.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimIrect.h>
-#include <ossim/base/ossimTrace.h>
-#include <ossim/support_data/ossimRpfToc.h>
-#include <ossim/support_data/ossimRpfTocEntry.h>
-#include <ctime>
-#include <iomanip>
-
-static ossimTrace traceDebug = ossimTrace("ossimRpfUtil:debug");
-
-ossimRpfUtil::ossimRpfUtil()
-{
-}
-
-ossimRpfUtil::~ossimRpfUtil()
-{
-}
-
-
-// Note: throws ossimException on error.
-void ossimRpfUtil::writeDotRpfFiles( const ossimFilename& aDotTocFile,
-                                     const ossimFilename& outputDir )
-{
-   static const char MODULE[] = "ossimRpfUtil::writeDotRpfFiles";
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " entered..."
-         << "\na.toc file:        " << aDotTocFile
-         << "\noutput directory:  " << outputDir
-         << "\n";
-   }
-   
-   // Parse the a.toc file:
-   ossimRefPtr<ossimRpfToc> toc = new ossimRpfToc();
-   
-   if ( toc->parseFile(aDotTocFile) != ossimErrorCodes::OSSIM_OK )
-   {
-      std::string e = MODULE;
-      e += " ERROR:\nCould not open: ";
-      e+= aDotTocFile.string();
-      throw ossimException(e);
-   }
-
-   if ( outputDir.expand().exists() == false )
-   {
-      if ( !outputDir.createDirectory(true, 0775) )
-      {
-         std::string e = MODULE;
-         e += " ERROR:\nCould not create directory: ";
-         e+= outputDir.c_str();
-         throw ossimException(e);
-      }
-   }
-
-   //---
-   // Go through the entries...
-   //---
-   ossim_uint32 entries = toc->getNumberOfEntries();
-   for (ossim_uint32 entry = 0; entry < entries; ++entry)
-   {
-      const ossimRpfTocEntry* tocEntry = toc->getTocEntry(entry);
-      if (tocEntry)
-      {
-         if ( tocEntry->isEmpty() == false )
-         {
-            writeDotRpfFile(toc.get(), tocEntry, outputDir, entry);
-         }
-      }
-      else
-      {
-         std::string e = MODULE;
-         e += " ERROR:  Null entry: ";
-         e += ossimString::toString(entry).string();
-         throw ossimException(e);
-      }
-   }
-   
-} // End: ossimRpfUtil::writeDotRpfFiles
-
-//---
-// Writer a dot rpf file for entry to output directory.
-// 
-// NOTES:
-//
-// 1) All coordinate written out in AREA or edge to edge format.
-// 2) Throws ossimException on error.
-//---
-void ossimRpfUtil::writeDotRpfFile( const ossimRpfToc* toc,
-                                    const ossimRpfTocEntry* tocEntry,
-                                    const ossimFilename& outputDir,
-                                    ossim_uint32 entry)
-{
-   static const char MODULE[] = "ossimRpfUtil::writeDotRpfFile";
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << MODULE << " entered..."
-         << "\noutput directory:  " << outputDir
-         << "\nentry: " << entry << "\n";
-   }
-
-   if ( !toc )
-   {
-      std::string errMsg = MODULE;
-      errMsg += " ERROR toc pointer null!";
-      throw ossimException(errMsg);
-   }
-   if ( !tocEntry )
-   {
-      std::string errMsg = MODULE;
-      errMsg += " ERROR toc entry pointer null!";
-      throw ossimException(errMsg);
-   }
-
-   // Get the file name.
-   ossimFilename outFile;
-   if ( outputDir.expand().isDir() )
-   {
-      getDotRfpFilenameForEntry(outputDir, entry, outFile);
-   }
-   else
-   {
-      outFile = outputDir;
-   }
-   
-   // Open the file to write.
-   std::ofstream os;
-   os.open(outFile.c_str(), ios::out);
-   if ( os.good() == false )
-   {
-      std::string errMsg = MODULE;
-      errMsg += "ERROR could not open: ";
-      errMsg += outFile.string();
-      throw ossimException(errMsg);
-   }
-   
-   // Set up the output stream fix with full precision for ground points.
-   os << setiosflags(std::ios_base::fixed) << setprecision(15);
-   
-   //---
-   // Overall TOC entry bounds:
-   // 
-   // Write the first line which is the bounding box of the entry in the form of:
-   // "89.9850464205332, 23.9892538162654|90.5085823882692, 24.5002602501599|1"
-   //      lr-lon            lr-lat           ul-lon            ul-lat
-   //---
-   ossimRefPtr<ossimImageGeometry> geom = tocEntry->getImageGeometry();
-   if( geom.valid() == false)
-   {
-      std::string errMsg = "ERROR could not get geometry.";
-      errMsg += outFile.string();
-      throw ossimException(errMsg);  
-   }
-
-   // Rectangle in image space.
-   ossimIrect outputRect;
-   tocEntry->getBoundingRect(outputRect);
-
-   // bands:
-   ossim_uint32 bands = tocEntry->getNumberOfBands();
-
-   // scale:
-   ossimDpt scale;
-   tocEntry->getDecimalDegreesPerPixel(scale);
-   ossimDpt halfPix = scale / 2.0;
-
-   ossimGpt llg;
-   ossimGpt urg;
-   geom->localToWorld(outputRect.ur(), urg);
-   geom->localToWorld(outputRect.ll(), llg);
-
-   if ( traceDebug() )
-   {
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "outputRect: " << outputRect
-         << "\nbands: " << bands
-         << "\nscale: " << scale
-         << "\nllg:   " << llg
-         << "\nurg:   " << urg
-         << std::endl;
-   }
-
-   // Expand coordinates to edge:
-   llg.lon -= halfPix.x;
-   llg.lat -= halfPix.y;
-   urg.lon += halfPix.x;
-   urg.lat += halfPix.y;
-   
-   // Test for 360 degrees apart.
-   checkLongitude(llg, urg);
-   
-   os << llg.lon << "," // lower left longitude
-      << llg.lat << "|" // lower left latitude
-      << urg.lon << "," // upper right longitude
-      << urg.lat << "|" // upper right latitude
-      << bands << "\n";
-
-   // Frame loop:
-   const ossim_int32 FRAMESIZE = 1536;
-   const ossim_int32 ROWS = static_cast<ossim_int32>(tocEntry->getNumberOfFramesVertical());
-   if( ROWS == 0 )
-   {
-      std::string errMsg = MODULE;
-      errMsg += " ERROR no rows!";
-      throw ossimException(errMsg);  
-   }
-   const ossim_int32 COLS = static_cast<ossim_int32>(tocEntry->getNumberOfFramesHorizontal());
-   if( COLS == 0 )
-   {
-      std::string errMsg = MODULE;
-      errMsg += " ERROR no columns!";
-      throw ossimException(errMsg);  
-   }
-
-   // Set the initial lower left and upper right image points for localToWorld call.
-   //ossimDpt urd( ( (ROWS-1)*FRAMESIZE) -1, 0.0);
-   //ossimDpt lld(0.0, (ROWS*FRAMESIZE)-1);
-   ossimDpt urd( FRAMESIZE-1, 0.0);
-   ossimDpt lld(0.0, FRAMESIZE-1);
-   
-   for (ossim_int32 row = ROWS-1; row > -1; --row)
-   {
-      for (ossim_int32 col = 0; col < COLS; ++col)
-      {
-         //---
-         // Example format (only with 15 digit precision):
-         // /data/spadac/rpf/world/cb01/ng467a1/0xslpk1a.i41|90.0448,24.3621|90.0598,24.3750
-         //---
-         
-         // Get the path to the frame.
-         ossimFilename path;
-         toc->getRootDirectory(path);
-         
-         path = path.dirCat( toc->getRelativeFramePath(entry, row, col) );
-
-         // Not sure if this is backwards:
-         geom->localToWorld(urd, urg);
-         geom->localToWorld(lld, llg);
-
-         // Expand coordinates to edge:
-         llg.lon -= halfPix.x;
-         llg.lat -= halfPix.y;
-         urg.lon += halfPix.x;
-         urg.lat += halfPix.y;
-         
-         // Test for 360 degrees apart.
-         checkLongitude(llg, urg);
-
-         os << path.c_str() << "|"
-            << llg.lon << "," // lower left longitude
-            << llg.lat << "|" // lower left latitude
-            << urg.lon << "," // upper right longitude
-            << urg.lat        // upper right latitude
-            << "\n";
-
-         if ( traceDebug() )
-         {
-            ossimNotify(ossimNotifyLevel_DEBUG)
-               << "row[" << row << "]col[" << col << "]path: " << path
-               << "\nlld: " << lld
-               << "\nllg: " << llg
-               << "\nurd: " << urd
-               << "\nurg: " << urg
-               << std::endl;
-         }
-
-         // Go to next col.
-         urd.x += FRAMESIZE;
-         lld.x += FRAMESIZE;
-            
-      } // End column loop.
-
-      // Go to nex row.
-      urd.y += FRAMESIZE;
-      urd.x = FRAMESIZE-1;
-      lld.y += FRAMESIZE;
-      lld.x = 0;
-      
-   } // End row loop.
-
-   // Close the file.
-   os.close();
-
-   ossimNotify(ossimNotifyLevel_DEBUG) << "wrote file: " << outFile << std::endl;
-   
-} // End: ossimRpfUtil::writeDotRpfFile
-
-void ossimRpfUtil::checkLongitude(ossimGpt& left, ossimGpt& right) const
-{
-   //---
-   // Test for scene coordinates being 180 to 180 (360 degree spread) and
-   // adjust leftLon to -180 if so.
-   //
-   // NOTE:
-   // Setting tolerance to 1/7200 about 15 meters.
-   // Not sure if this is too loose or not. (drb)
-   //---
-   const ossim_float64 TOLERANCE = 0.000138889; // 1/7200 about 15 meters.
-
-   if ( ossim::almostEqual(left.lon, 180.0, TOLERANCE) )
-   {
-      if ( ossim::almostEqual(right.lon, 180.0, TOLERANCE) )
-      {
-         left.lon = -180.0;
-         right.lon = 180.0;
-      }
-   }
-}
-
-void ossimRpfUtil::getDotRfpFilenameForEntry(const ossimFilename& outputDir,
-                                             ossim_uint32 entry,
-                                             ossimFilename& outFile) const
-{
-   // Get the build date in the format of (yyyymmddhhmmss).
-   char s[15];
-   s[14] = '\0';
-   time_t t;
-   time(&t);
-   tm* lt = localtime(&t);
-   strftime(s, 15, "%Y%m%d%H%M%S", lt);
-   std::string date = s;
-   
-   outFile = outputDir.dirCat(s);
-   outFile += "_e";
-   outFile += ossimString::toString(entry);
-   outFile += ".rpf";
-}
diff --git a/src/ossim/vec/.cvsignore b/src/ossim/vec/.cvsignore
deleted file mode 100644
index 6142305..0000000
--- a/src/ossim/vec/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.o
-*.d
diff --git a/src/ossim/vec/ossimVpfCoverage.cpp b/src/ossim/vec/ossimVpfCoverage.cpp
deleted file mode 100644
index 924af99..0000000
--- a/src/ossim/vec/ossimVpfCoverage.cpp
+++ /dev/null
@@ -1,196 +0,0 @@
-//*******************************************************************
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-// 
-// Description: This class extends the stl's string class.
-//
-//********************************************************************
-// $Id: ossimVpfCoverage.cpp 9963 2006-11-28 21:11:01Z gpotts $
-#include <algorithm>
-using namespace std;
-
-#include <ossim/vec/ossimVpfCoverage.h>
-#include <ossim/vec/ossimVpfLibrary.h>
-#include <ossim/vec/ossimVpfFeatureClassSchema.h>
-#include <ossim/vec/ossimVpfBoundingRecordTable.h>
-#include <ossim/base/ossimErrorCodes.h>
-
-ossimVpfCoverage::ossimVpfCoverage()
-   :theLibrary(NULL),
-    theCoverageName(""),
-    theCoverageNameFullPath("")
-{
-}
-
-ossimVpfCoverage::~ossimVpfCoverage()
-{
-   theLibrary = NULL;
-}
-
-bool ossimVpfCoverage::openCoverage(ossimVpfLibrary* library,
-                                    const ossimString& name,
-                                    const ossimFilename& fullPath)
-{
-   bool result = true;
-   theCoverageName         = name;
-   theCoverageNameFullPath = fullPath;
-   theLibrary = library;
-
-   if(!theCoverageNameFullPath.dirCat("fcs").exists())
-   {
-      result = false;
-   }
-   
-   return result;
-}
-
-const ossimFilename& ossimVpfCoverage::getPath()const
-{
-   return theCoverageNameFullPath;
-}
-
-const ossimString& ossimVpfCoverage::getName()const
-{
-   return theCoverageName;
-}
-
-void ossimVpfCoverage::print(ostream& out)const
-{
-  ossimVpfTable table;
-  if(table.openTable(theCoverageNameFullPath.dirCat("fcs")))
-  {
-     table.print(out);
-  }
-}
-
-bool ossimVpfCoverage::getExtent(ossimVpfExtent& extent)const
-{
-   bool result = false;
-   bool firstOneSetFlag = false;
-   ossimVpfExtent resultExtent;
-   ossimVpfExtent tempExtent;
-   if(theLibrary)
-   {
-      if(theCoverageNameFullPath.dirCat("ebr").exists())
-      {
-         ossimVpfBoundingRecordTable boundingRecord;
-         
-         if(boundingRecord.openTable(theCoverageNameFullPath.dirCat("ebr")))
-         {
-            boundingRecord.getExtent(tempExtent);
-
-            if(!firstOneSetFlag)
-            {
-               resultExtent = tempExtent;
-               firstOneSetFlag = true;
-            }
-            else
-            {
-               resultExtent = resultExtent + tempExtent;
-            }
-            
-            result = true;
-         }
-      }
-      if(theCoverageNameFullPath.dirCat("fbr").exists())
-      {
-         ossimVpfBoundingRecordTable boundingRecord;
-         
-         if(boundingRecord.openTable(theCoverageNameFullPath.dirCat("fbr")))
-         {
-            boundingRecord.getExtent(tempExtent);
-            
-            if(!firstOneSetFlag)
-            {
-               resultExtent = tempExtent;
-               firstOneSetFlag = true;
-            }
-            else
-            {
-               resultExtent = resultExtent + tempExtent;
-            }
-            
-            result = true;
-         }
-      }
-      std::vector<ossimString> tileNames;
-      
-      theLibrary->getTileNames(tileNames);
-      
-      for(int i = 0; i < (int)tileNames.size(); ++i)
-      {
-         ossimFilename tileName = tileNames[0];
-         ossimFilename tileDir;
-         if(theCoverageNameFullPath.dirCat(tileName).exists())
-         {
-            tileDir = theCoverageNameFullPath.dirCat(tileName);
-         }
-         else if(theCoverageNameFullPath.dirCat(tileName.downcase()).exists())
-         {
-            tileDir = theCoverageNameFullPath.dirCat(tileName.downcase());
-         }
-         if(tileDir != "")
-         {
-            if(tileDir.dirCat("ebr").exists())
-            {
-               ossimVpfBoundingRecordTable boundingRecord;
-               
-               if(boundingRecord.openTable(tileDir.dirCat("ebr")))
-               {
-                  boundingRecord.getExtent(tempExtent);
-                  
-                  if(!firstOneSetFlag)
-                  {
-                     resultExtent = tempExtent;
-                     firstOneSetFlag = true;
-                  }
-                  else
-                  {
-                     resultExtent = resultExtent + tempExtent;
-                  }
-                  
-                  result = true;
-               }
-            }
-            if(tileDir.dirCat("fbr").exists())
-            {
-               ossimVpfBoundingRecordTable boundingRecord;
-               
-               if(boundingRecord.openTable(tileDir.dirCat("fbr")))
-               {
-                  boundingRecord.getExtent(tempExtent);
-                  
-                  if(!firstOneSetFlag)
-                  {
-                     resultExtent = tempExtent;
-                     firstOneSetFlag = true;
-                  }
-                  else
-                  {
-                     resultExtent = resultExtent + tempExtent;
-                  }
-                  
-                  result = true;
-               }
-            }
-         }
-      }
-   }
-
-   extent = resultExtent;
-   
-   return result;
-}
-
-ossimVpfLibrary* ossimVpfCoverage::getLibrary()
-{
-   return theLibrary;
-}
-
-bool ossimVpfCoverage::openFeatureClassSchema(ossimVpfFeatureClassSchema& schema)
-{
-   if(!schema.isClosed()) schema.closeTable();
-
-   return schema.openSchema(this);
-}
diff --git a/src/ossim/vec/ossimVpfDatabaseHeaderTableValidator.cpp b/src/ossim/vec/ossimVpfDatabaseHeaderTableValidator.cpp
deleted file mode 100644
index 1e3ff4d..0000000
--- a/src/ossim/vec/ossimVpfDatabaseHeaderTableValidator.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-//-----------------------------------------------------------------
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//-----------------------------------------------------------------
-#include <ossim/vec/ossimVpfDatabaseHeaderTableValidator.h>
-#include <ossim/vec/ossimVpfTable.h>
-
-ossimVpfDatabaseHeaderTableValidator::~ossimVpfDatabaseHeaderTableValidator()
-{
-}
-
-bool ossimVpfDatabaseHeaderTableValidator::isValid(ossimVpfTable& aTable)const
-{
-   // make sure the table is not null
-   if(&aTable == NULL)
-   {
-      return false;
-   }
-
-   // and make sure that the table is not closed
-   if(aTable.isClosed())
-   {
-      return false;
-   }
-
-   // get the table data defined in vpf_util/vpftable.h"
-   const vpf_table_type* data = aTable.getVpfTableData();
-
-   if(!data)
-   {
-      return false;
-   }
-   
-   // if the file is not open then we can't validate
-   if(!data->fp)
-   {
-      return false;
-   }
-
-   // The way that we will validate is to see if the columns of a dht
-   // exist.  if the column didn't exist then the position
-   // will be negative
-   long column = table_pos("ID", *data);
-   if(column < 0)
-   {
-      return false;
-   }
-   column = table_pos("VPF_VERSION", *data);
-   if(column < 0)
-   {
-      return false;
-   }
-   column = table_pos("DATABASE_NAME", *data);
-   if(column < 0)
-   {
-      return false;
-   }
-   column = table_pos("DATABASE_DESC", *data);
-   if(column < 0)
-   {
-      return false;
-   }
-   column = table_pos("MEDIA_STANDARD", *data);
-   if(column < 0)
-   {
-      return false;
-   }
-   column = table_pos("ORIGINATOR", *data);
-   if(column < 0)
-   {
-      return false;
-   }
-   column = table_pos("ADDRESSEE", *data);
-   if(column < 0)
-   {
-      return false;
-   }
-   column = table_pos("MEDIA_VOLUMES", *data);
-   if(column < 0)
-   {
-      return false;
-   }
-   column = table_pos("SEQ_NUMBERS", *data);
-   if(column < 0)
-   {
-      return false;
-   }
-   column = table_pos("NUM_DATA_SETS", *data);
-   if(column < 0)
-   {
-      return false;
-   }
-   column = table_pos("SECURITY_CLASS", *data);
-   if(column < 0)
-   {
-      return false;
-   }
-   column = table_pos("DOWNGRADING", *data);
-   if(column < 0)
-   {
-      return false;
-   }
-   column = table_pos("DOWNGRADE_DATE", *data);
-   if(column < 0)
-   {
-      return false;
-   }
-   column = table_pos("RELEASABILITY", *data);
-   if(column < 0)
-   {
-      return false;
-   }
-   column = table_pos("TRANSMITTAL_ID", *data);
-   if(column < 0)
-   {
-      return false;
-   }
-   column = table_pos("EDITION_NUMBER", *data);
-   if(column < 0)
-   {
-      return false;
-   }
-   column = table_pos("EDITION_DATE", *data);
-   if(column < 0)
-   {
-      return false;
-   }
-   
-   return true;
-
-}
diff --git a/src/ossim/vec/ossimVpfFeatureClassSchema.cpp b/src/ossim/vec/ossimVpfFeatureClassSchema.cpp
deleted file mode 100644
index c3be940..0000000
--- a/src/ossim/vec/ossimVpfFeatureClassSchema.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc. 
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author: Garrett Potts
-//
-//********************************************************************
-// $Id: ossimVpfFeatureClassSchema.cpp 20936 2012-05-18 14:45:00Z oscarkramer $
-#include <ossim/vec/ossimVpfLibrary.h>
-#include <ossim/vec/ossimVpfCoverage.h>
-#include <ossim/vec/ossimVpfFeatureClassSchema.h>
-#include <ossim/vec/ossimVpfFeatureClass.h>
-
-ossimVpfFeatureClassSchema::ossimVpfFeatureClassSchema()
-   :theCoverage(NULL)
-{
-}
-
-bool ossimVpfFeatureClassSchema::openSchema(ossimVpfCoverage* coverage)
-{
-   theCoverage = coverage;
-   bool result = false;
-
-   if(theCoverage)
-   {
-      theSchemaTableName = theCoverage->getPath().dirCat("fcs");
-
-      if(theSchemaTableName.exists())
-      {
-         result = openTable(theSchemaTableName);
-
-         if(result)
-         {
-            result = validateColumnNames();
-         }
-         if(result)
-         {
-            setFeatureClassMapping();
-         }
-      }
-   }
-   
-   return result;
-}
-
-void ossimVpfFeatureClassSchema::closeTable()
-{
-   ossimVpfTable::closeTable();
-   theFeatureClassMap.clear();
-}
-
-void ossimVpfFeatureClassSchema::getFeatureClasses(std::vector<ossimString>& featureClassArray)const
-{
-   featureClassArray.clear();
-   std::map<ossimString, ossimVpfFeatureClassSchemaNode, ossimStringLtstr>::const_iterator featureClassIter = theFeatureClassMap.begin();
-
-   while(featureClassIter != theFeatureClassMap.end())
-   {
-      featureClassArray.push_back((*featureClassIter).first);
-      ++featureClassIter;
-   }
-}
-
-bool ossimVpfFeatureClassSchema::getFeatureClassNode(const ossimString& featureClass,
-                                                     ossimVpfFeatureClassSchemaNode& featureClassNode)const
-{
-   std::map<ossimString, ossimVpfFeatureClassSchemaNode, ossimStringLtstr>::const_iterator fIter = theFeatureClassMap.find(featureClass);
-
-   if(fIter != theFeatureClassMap.end())
-   {
-      featureClassNode = (*fIter).second;
-      return true;
-   }
-
-   return false;
-}
-
-ossim_int32 ossimVpfFeatureClassSchema::getNumberOfFeatureClasses()const
-{
-   return (ossim_int32)theFeatureClassMap.size();
-}
-
-bool ossimVpfFeatureClassSchema::validateColumnNames()const
-{
-   if(isClosed()) return false;
-   return ((getColumnPosition("feature_class")>=0)&&
-           (getColumnPosition("table1")>=0)&&
-           (getColumnPosition("table1_key")>=0)&&
-           (getColumnPosition("table2")>=0)&&
-           (getColumnPosition("table2_key")>=0));
-}
-
-void ossimVpfFeatureClassSchema::setFeatureClassMapping()
-{
-   if(!isClosed())
-   {
-      ossim_int32 featureIdx = getColumnPosition("feature_class");
-      ossim_int32 table1Idx = getColumnPosition("table1");
-      ossim_int32 table1KeyIdx = getColumnPosition("table1_key");
-      ossim_int32 table2Idx = getColumnPosition("table2");
-      ossim_int32 table2KeyIdx = getColumnPosition("table2_key");
-      reset();
-      if(getNumberOfRows() > 0)
-      {
-         row_type row;
-         const int ROWS = getNumberOfRows();
-         for(int rowIdx = 1; rowIdx <= ROWS; ++rowIdx)
-         {
-            if(rowIdx == 1)
-            {
-               row = read_row(rowIdx,
-                              *theTableInformation);
-            }
-            else
-            {
-               row = read_next_row(*theTableInformation);
-            }
-            ossimFilename primitiveTable =  getColumnValueAsString(row,
-                                                                   table2Idx);
-            if(ossimVpfFeatureClass::isPrimitive(primitiveTable))
-            {
-               ossimString primitiveTableKey = getColumnValueAsString(row,
-                                                                      table2KeyIdx);
-               ossimFilename table = getColumnValueAsString(row,
-                                                            table1Idx);
-               ossimString tableKey = getColumnValueAsString(row,
-                                                             table1KeyIdx);
-               ossimString featureClass = getColumnValueAsString(row,
-                                                                 featureIdx);
-               ossimVpfFeatureClassSchemaNode node(table,
-                                                   tableKey,
-                                                   primitiveTable,
-                                                   primitiveTableKey);
-               
-               theFeatureClassMap.insert(make_pair(featureClass,
-                                                   node));
-            }
-            
-            free_row(row, *theTableInformation);
-         }
-      }
-   }
-}
-
-
diff --git a/src/ossim/vec/ossimVpfTable.cpp b/src/ossim/vec/ossimVpfTable.cpp
deleted file mode 100644
index 9103132..0000000
--- a/src/ossim/vec/ossimVpfTable.cpp
+++ /dev/null
@@ -1,913 +0,0 @@
-//*******************************************************************
-// Copyright (C) 2000 ImageLinks Inc.
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author: Garrett Potts
-// 
-// Description: This class give the capability to access tiles from an
-//              vpf file.
-//
-//********************************************************************
-// $Id: ossimVpfTable.cpp 19636 2011-05-24 16:48:45Z gpotts $
-#include <ossim/vec/ossimVpfTable.h>
-#include <ossim/vec/vpf.h>
-#include <ossim/base/ossimErrorCodes.h>
-#include <cstdlib>
-#include <cstring>
-
-std::ostream& operator <<(std::ostream& out,
-                     const ossimVpfTable& data)
-{
-   data.print(out);
-   return out;
-}
-
-ossimVpfTable::ossimVpfTable()
-   :theTableInformation(NULL)
-{
-}
-
-ossimVpfTable::~ossimVpfTable()
-{
-   if(theTableInformation)
-   {
-      closeTable();
-      delete theTableInformation;
-      theTableInformation = NULL;
-   }
-}
-
-bool ossimVpfTable::openTable(const ossimFilename& tableName)
-{
-   closeTable();
-
-   if(is_vpf_table(const_cast<char*>(tableName.c_str())))
-   {
-      if(theTableInformation)
-      {
-         delete theTableInformation;
-         theTableInformation = NULL;
-      }
-      theTableInformation = new vpf_table_type;
-      memset(theTableInformation, 0, sizeof(vpf_table_type));
-
-      theTableName = tableName;
-      *theTableInformation = vpf_open_table(const_cast<char*>(tableName.c_str()),
-                                            disk,
-                                            "rb",
-                                            NULL);
-   }
-   else
-   {
-      delete theTableInformation;
-      theTableInformation = NULL;
-
-      return false;
-   }
-
-   return true;
-}
-
-void ossimVpfTable::closeTable()
-{
-   if(theTableInformation&&(theTableInformation->status!=CLOSED))
-   {
-      vpf_close_table(theTableInformation);
-   }
-}
-
-int ossimVpfTable::getNumberOfRows()const
-{
-  if(theTableInformation) return theTableInformation->nrows;
-
-  return 0;
-}
-
-int ossimVpfTable::getNumberOfColumns()const
-{
-  if(theTableInformation) return theTableInformation->nfields;
-
-  return 0;
-}
-
-ossimString ossimVpfTable::getColumnName(int idx)const
-{
-  if((idx < 0) || idx > getNumberOfColumns())
-    {
-      return ossimString("");
-    }
-  return ossimString(theTableInformation->header[idx].name);
-}
-
-bool ossimVpfTable::isClosed()const
-{
-   return (theTableInformation &&
-           (theTableInformation->status==CLOSED));
-}
-
-void ossimVpfTable::reset()const
-{
-   if(theTableInformation &&
-      (theTableInformation->status!=CLOSED))
-   {
-      long fpos;
-
-      fpos = index_pos(0, *theTableInformation);
-      fseek(theTableInformation->fp, fpos, SEEK_SET);
-   }
-}
-
-bool ossimVpfTable::goToRow(long row)const
-{
-   if(theTableInformation &&
-      (theTableInformation->status!=CLOSED))
-   {
-      long fpos;
-
-      fpos = index_pos(row, *theTableInformation);
-      if(fpos < 0)
-      {
-         return false;
-      }
-      fseek(theTableInformation->fp, fpos, SEEK_SET);
-   }
-
-   return true;
-}
-
-std::vector<ossimString> ossimVpfTable::getColumnValues(const ossimString& columnName)const
-{
-	std::vector<ossimString> result;
-
-   if(theTableInformation &&
-      theTableInformation->status == OPENED)
-   {
-      long int columnNumber = table_pos(const_cast<char*>(columnName.c_str()), *theTableInformation);
-
-      if(columnNumber >=0 &&
-         (columnNumber < theTableInformation->nfields))
-      {
-         row_type row;
-         // start at the first row of the table
-         reset();
-         for (int rowIndex = 1;
-              rowIndex <= theTableInformation->nrows;
-              ++rowIndex)
-         {
-            row = read_next_row(*theTableInformation);
-            ossimString value = getColumnValueAsString(row,
-                                                       columnNumber);
-	    value.trim();
-            result.push_back(value);
-            free_row(row, *theTableInformation);
-         }
-      }
-   }
-
-   return result;
-}
-
-std::vector<ossimString> ossimVpfTable::getColumnValues(long columnNumber)const
-{
-	std::vector<ossimString> result;
-
-   if(theTableInformation &&
-      theTableInformation->status == OPENED)
-   {
-      if(columnNumber >=0 &&
-         (columnNumber < theTableInformation->nfields))
-      {
-         row_type row;
-         // start at the first row of the table
-         reset();
-         for (int rowIndex = 0;
-              rowIndex < theTableInformation->nrows;
-              ++rowIndex)
-         {
-            row = read_next_row(*theTableInformation);
-            ossimString value = getColumnValueAsString(row,
-                                                       columnNumber);
-//            value = value.downcase();
-            value = value.trim();
-            result.push_back(value);
-            free_row(row, *theTableInformation);
-         }
-      }
-   }
-
-   return result;
-}
-
-
-
-ossimString ossimVpfTable::getColumnValueAsString(row_type& row,
-                                                  long columnNumber)const
-{
-   ossimString result;
-   ossim_int32 n=1;
-   switch(theTableInformation->header[columnNumber].type)
-   {
-   case 'T': // it's of type text so
-   {
-      char c;
-      char *buf = (char *)get_table_element(columnNumber,
-                                            row,
-                                            *theTableInformation,
-                                            &c,
-                                            &n);
-      if(buf)
-      {
-         result = buf;
-         free(buf);
-      }
-      else
-      {
-         result = c;
-      }
-      break;
-   }
-   case 'I':
-   {
-      ossim_int32 value;
-      ossim_int32* v = (ossim_int32*)get_table_element(columnNumber,
-                                                       row,
-                                                       *theTableInformation,
-                                                       &value,
-                                                       &n);
-      if(v)
-      {
-         result = ossimString::toString(v[0]);
-
-         free(v);
-      }
-      else
-      {
-         result = ossimString::toString(value);
-      }
-      break;
-   }
-   case 'S':
-   {
-      short int value;
-      short int* v = (short int*)get_table_element(columnNumber,
-                                                   row,
-                                                   *theTableInformation,
-                                                   &value,
-                                                   &n);
-      if(v)
-      {
-         result = ossimString::toString(v[0]);
-
-         free(v);
-      }
-      else
-      {
-         result = ossimString::toString(value);
-      }
-      break;
-   }
-   case 'F':
-   {
-      float value;
-      float* v = (float*)get_table_element(columnNumber,
-                                           row,
-                                           *theTableInformation,
-                                           &value,
-                                           &n);
-      if(v)
-      {
-         value = v[0];
-         free(v);
-      }
-      if (!is_vpf_null_float(value))
-      {
-         result = ossimString::toString(value);
-      }
-      else
-      {
-         result = "nan";
-      }
-      break;
-   }
-   case 'B':
-   {
-      double value;
-      double* tempBuf = (double*)get_table_element(columnNumber,
-                                                 row,
-                                                 *theTableInformation,
-                                                 &value,
-                                                 &n);
-      if(tempBuf)
-      {
-         value = tempBuf[0];
-         free(tempBuf);
-      }
-      if (!is_vpf_null_double(value))
-      {
-         result = ossimString::toString(value);
-      }
-      else
-      {
-         result = "nan";
-      }
-
-      break;
-   }
-   case 'C':
-   {
-      coordinate_type coordType;
-      coordinate_type* temp = (coordinate_type*)get_table_element(columnNumber,
-                                                                  row,
-                                                                  *theTableInformation,
-                                                                  &coordType,
-                                                                  &n);
-      if(temp)
-      {
-         coordType = temp[0];
-         free(temp);
-      }
-      result = ossimString::toString(coordType.x)+
-               ossimString(" ") +
-               ossimString::toString(coordType.y);
-      break;
-   }
-   case 'K':
-   {
-      id_triplet_type idTripletType;
-      id_triplet_type* tempType = (id_triplet_type*)get_table_element(columnNumber,
-                                                                      row,
-                                                                      *theTableInformation,
-                                                                      &idTripletType,
-                                                                      &n);
-      if(tempType)
-      {
-         idTripletType = tempType[0];
-         free (tempType);
-      }
-      result = ossimString(idTripletType.type) +
-         ossimString(" ") +
-         ossimString::toString(static_cast<ossim_int32>(idTripletType.id)) +
-         ossimString(" ") +
-         ossimString::toString(static_cast<ossim_int32>(idTripletType.tile))+
-         ossimString(" ") +
-         ossimString::toString(static_cast<ossim_int32>(idTripletType.exid));
-      break;
-   }
-   case 'D':
-   {
-      date_type date, formatDate;
-      date_type* temp = (date_type*)get_table_element(columnNumber,
-                                                      row,
-                                                      *theTableInformation,
-                                                      &date,
-                                                      &n);
-      if(temp)
-      {
-         free(temp);
-      }
-      format_date(date, formatDate);
-      result = formatDate;
-      break;
-   }
-   case 'Z': // tri coordinate types x, y, z
-   {
-      tri_coordinate_type  *tcptr=NULL;
-      tcptr = (tri_coordinate_type *) get_table_element(columnNumber,row,
-                                                        *theTableInformation, NULL,&n);
-      result = "";
-      for (int k=0;k<n;k++)
-      {
-         
-         result = result + " (" +
-            ossimString::toString(tcptr[k].x) +
-            ossimString(" ") +
-            ossimString::toString(tcptr[k].y) +
-            ossimString(" ") +
-            ossimString::toString(tcptr[k].z) +
-            ossimString(") ") ;
-      }
-      
-      if (tcptr)
-      {
-         free(tcptr);
-      }
-      break;
-   }   
-   }
-   result.trim();
-   return result;
-}
-
-ossimString ossimVpfTable::getColumnValueAsString(ossim_int32 rowNumber,
-                                                  long columnNumber)const
-{
-   row_type row = read_row( rowNumber, *theTableInformation);
-   ossimString result = getColumnValueAsString(row,
-                                               columnNumber);
-   free_row(row, *theTableInformation);
-
-   return result;
-}
-
-ossimString ossimVpfTable::getColumnValueAsString(const ossimString& columnName)
-{
-   if(theTableInformation &&
-      (theTableInformation->status!=CLOSED))
-   {
-      long int columnNumber = table_pos(const_cast<char*>(columnName.c_str()),
-                                        *theTableInformation);
-      row_type row = read_next_row(*theTableInformation);
-      ossimString result = getColumnValueAsString(row,
-                                                  columnNumber);
-      free_row(row, *theTableInformation);
-      return result;
-   }
-
-   return "";
-}
-
-ossim_int32 ossimVpfTable::getColumnPosition(const ossimString& columnName)const
-{
-   return ((ossim_int32)table_pos(const_cast<char*>(columnName.c_str()), *theTableInformation));
-}
-
-void ossimVpfTable::print(std::ostream& out)const
-{
-   if(theTableInformation &&
-      (theTableInformation->status!=CLOSED))
-   {
-      // make sure we are at the beginning of the table.
-      this->reset();
-
-
-      // the rest of this code is from the vpfutil.  The vpfutil
-      // was grabbed from the vhcl map server software.
-      vpf_table_type& table = *theTableInformation;
-
-      ossim_int32       i,j,k,n;
-      ossim_int16  ival=0,*iptr=NULL;
-      ossim_int32       lval=0,*lptr=NULL;
-      ossim_float32      fval=0,*fptr=NULL;
-      date_type  dval,*dptr=NULL;
-      id_triplet_type kval={0,0,0}, *kptr=NULL;
-      coordinate_type cval={0,0}, *cptr=NULL;
-      char       *buf,  ch, date[40];
-      row_type   row;
-
-
-	  out << "table name:        " << theTableName << std::endl
-		  << "desciption:        " << table.description << std::endl
-		  << std::endl;
-
-	  out << "Definition:" << std::endl;
-      for (i=0;i<table.nfields;i++) {
-         if (table.header[i].count < 0)
-         {
-
-            out << table.header[i].name << " ("
-                << table.header[i].type << ",*)  "
-				<< table.header[i].description << std::endl;
-         }
-         else
-         {
-            out << table.header[i].name << " ("
-                << table.header[i].type << ","
-                << table.header[i].count << ")  "
-				<< table.header[i].description << std::endl;
-         }
-      }
-
-	  out << "\nContents:" << std::endl;
-      for (i=1;i<=table.nrows;i++)
-      {
-         row = read_next_row(table);
-         for (j=0;j<table.nfields;j++)
-         {
-            out << table.header[j].name << ": ";
-            switch (table.header[j].type) {
-	    case 'T':
-	       if (table.header[j].count==1)
-               {
-		  get_table_element(j,row,table,&ch,&n);
-
-		  out << ch << std::endl;
-	       }
-               else
-               {
-		  buf = (char *)get_table_element(j,row,table,NULL,&n);
-		  n = (long)strlen(table.header[j].name) + 2;
-		  for (k=0;k<(long)strlen(buf);k++)
-                  {
-                     out << buf[k];
-		     n++;
-		     if (n>80)
-                     {
-						 out << std::endl;
-			n = 0;
-		     }
-		  }
-				  out << std::endl;
-		  free(buf);
-	       }
-	       break;
-	    case 'I': // long
-	       if (table.header[j].count==1)
-               {
-		  get_table_element(j,row,table,&lval,&n);
-		  if (!is_vpf_null_float(lval))
-                  {
-					  out << lval << std::endl;
-                  }
-		  else
-                  {
-					  out << "null" << std::endl;
-                  }
-	       }
-               else
-               {
-		  lptr = (ossim_int32*)get_table_element(j,row,table,NULL,&n);
-		  for (k=0;k<n;k++)
-                  {
-		     if (!is_vpf_null_float(lptr[k]))
-                     {
-                        out << lptr[k];
-                     }
-		     else
-                     {
-                        out << "null";
-                     }
-		  }
-				  out << std::endl;
-		  free(lptr);
-	       }
-	       break;
-            case 'R': // for double
-            {
-               double *dptr=NULL;
-               double value = 0;
-	       if (table.header[j].count==1)
-               {
-		  get_table_element(j,row,table,&value,&n);
-                  if(!is_vpf_null_double(value))
-                  {
-					  out << "null" << std::endl;
-                  }
-                  else
-                  {
-					  out << value << std::endl;
-                  }
-               }
-               else
-               {
-		  dptr = (double*)get_table_element(j,row,table,NULL,&n);
-		  for (k=0;k<n;k++)
-                  {
-		     if (!is_vpf_null_double(dptr[k]))
-                     {
-                        out << dptr[k];
-                     }
-		     else
-                     {
-                        out << "null ";
-                     }
-		  }
-				  out << std::endl;
-		  free(dptr);
-               }
-            }
-	    case 'S': // integer
-	       if (table.header[j].count==1)
-               {
-		  get_table_element(j,row,table,&ival,&n);
-		  if (ival != (short int)INT_MAX)
-                  {
-					  out << ival << std::endl;
-                  }
-		  else
-                  {
-					  out << "null" << std::endl;
-                  }
-	       }
-               else
-               {
-		  iptr = (short int*)get_table_element(j,row,table,NULL,&n);
-		  for (k=0;k<n;k++)
-                  {
-		     if (iptr[k] != (short int)INT_MAX)
-                     {
-                        out << iptr[k];
-                     }
-		     else
-                     {
-                        out << "null ";
-                     }
-		  }
-				  out << std::endl;
-		  free(iptr);
-	       }
-	       break;
-	    case 'F': // float type
-	       if (table.header[j].count==1)
-               {
-		  get_table_element(j,row,table,&fval,&n);
-		  if (!is_vpf_null_float(fval))
-                  {
-					  out << fval << std::endl;
-                  }
-		  else
-                  {
-					  out << "null" << std::endl;
-                  }
-	       }
-               else
-               {
-		  fptr = (float*)get_table_element(j,row,table,NULL,&n);
-		  for (k=0;k<n;k++)
-                  {
-		     if (!is_vpf_null_float(fptr[k]))
-                     {
-                        out << fptr[k] << " ";
-                     }
-		     else
-                     {
-                        out << "null ";
-                     }
-		  }
-				  out << std::endl;
-		  free(fptr);
-	       }
-	       break;
-            case 'Y':
-            {
-               double_tri_coordinate_type dtctValue, *dtctPtr;
-	       if (table.header[j].count==1)
-               {
-                  get_table_element(j,row,table,&dtctValue,&n);
-                  out << "(";
-                  if(is_vpf_null_double(dtctValue.x))
-                  {
-                     out << "null, ";
-                  }
-                  else
-                  {
-                     out << dtctValue.x << ", ";
-                  }
-                  if(is_vpf_null_double(dtctValue.y))
-                  {
-                     out << "null, ";
-                  }
-                  else
-                  {
-                     out << dtctValue.y << ", ";
-                  }
-                  if(is_vpf_null_double(dtctValue.z))
-                  {
-                     out << "null, ";
-                  }
-                  else
-                  {
-                     out << dtctValue.z << ", ";
-                  }
-               }
-               else
-               {
-		  dtctPtr = (double_tri_coordinate_type*)get_table_element(j,row,table,NULL,&n);
-		  for (k=0;k<n;k++)
-                  {
-                     out << "(";
-                     if(is_vpf_null_double(dtctPtr[k].x))
-                     {
-                        out << "null, ";
-                     }
-                     else
-                     {
-                        out << dtctPtr[k].x  << ", ";
-                     }
-                     if(is_vpf_null_double(dtctPtr[k].y))
-                     {
-                        out << "null, ";
-                     }
-                     else
-                     {
-                        out << dtctPtr[k].y  << ", ";
-                     }
-                     if(is_vpf_null_double(dtctPtr[k].z))
-                     {
-                        out << "null, ";
-                     }
-                     else
-                     {
-                        out << dtctPtr[k].z  << ", ";
-                     }
-                  }
-                  free(dtctPtr);
-               }
-               break;
-            }
-            case 'Z': // tri coordinate types x, y, z
-            {
-               tri_coordinate_type tcval={0,0,0}, *tcptr=NULL;
-	       if (table.header[j].count==1)
-               {
-		  get_table_element(j,row,table,&tcval,&n);
-                  out << "(";
-                  if(is_vpf_null_float(tcval.x))
-                  {
-                     out << "null" << ",";
-                  }
-                  else
-                  {
-                     out << tcval.x << ", ";
-                  }
-                  if(is_vpf_null_float(tcval.y))
-                  {
-                     out << "null" << ", ";
-                  }
-                  else
-                  {
-                     out << tcval.y << ", ";
-                  }
-                  if(is_vpf_null_float(tcval.z))
-                  {
-					  out << "null)" << std::endl;
-                  }
-                  else
-                  {
-					  out << tcval.z << ")" << std::endl;
-                  }
-	       }
-               else
-               {
-		  tcptr = (tri_coordinate_type*)get_table_element(j,row,table,NULL,&n);
-		  for (k=0;k<n;k++)
-                  {
-                     out << "(";
-                     if(is_vpf_null_float(tcptr[k].x))
-                     {
-                        out << "null, ";
-                     }
-                     else
-                     {
-                        out << tcptr[k].x << ", ";
-                     }
-                     if(is_vpf_null_float(tcptr[k].y))
-                     {
-                        out << "null, ";
-                     }
-                     else
-                     {
-                        out << tcptr[k].y << ", ";
-                     }
-                     if(is_vpf_null_float(tcptr[k].z))
-                     {
-                        out << "null)";
-                     }
-                     else
-                     {
-                        out << tcptr[k].z << ")";
-                     }
-                  }
-				  out << std::endl;
-		  free(cptr);
-	       }
-	       break;
-            }
-	    case 'C': // coordinate type  x, y
-	       if (table.header[j].count==1)
-               {
-		  get_table_element(j,row,table,&cval,&n);
-                  out << "(";
-                  if(is_vpf_null_float(cval.x))
-                  {
-                     out << "null, ";
-                  }
-                  else
-                  {
-                     out << cval.x << ", ";
-                  }
-                  if(is_vpf_null_float(cval.y))
-                  {
-                     out << "null, ";
-                  }
-                  else
-                  {
-                     out << cval.y << ")";
-                  }
-	       }
-               else
-               {
-		  cptr = (coordinate_type*)get_table_element(j,row,table,NULL,&n);
-		  for (k=0;k<n;k++)
-                  {
-
-                     out << "(" << cptr[k].x << "," << cptr[k].y << ") ";
-                  }
-				  out << std::endl;
-		  free(cptr);
-	       }
-	       break;
-            case 'B': // double coordinate type
-            {
-               double_coordinate_type dct, *dctPtr;
-
-	       if (table.header[j].count==1)
-               {
-		  get_table_element(j,row,table,&dct,&n);
-
-                  out << "(";
-                  if(is_vpf_null_double(dct.x))
-                  {
-                     out << "null, ";
-                  }
-                  else
-                  {
-                     out << dct.x << ", ";
-                  }
-                  if(is_vpf_null_double(dct.y))
-                  {
-                     out << "null, ";
-                  }
-                  else
-                  {
-                     out << dct.y << ")";
-                  }
-	       }
-               else
-               {
-		  dctPtr = (double_coordinate_type*)get_table_element(j,row,table,NULL,&n);
-		  for (k=0;k<n;k++)
-                  {
-                     out << "(";
-                     if(is_vpf_null_double(dctPtr[k].x))
-                     {
-                        out << "null,";
-                     }
-                     else
-                     {
-                        out << dctPtr[k].x << ", ";
-                     }
-                     if(is_vpf_null_double(dctPtr[k].y))
-                     {
-                        out << "null,";
-                     }
-                     else
-                     {
-                        out << dctPtr[k].y << ", ";
-                     }
-                  }
-				  out << std::endl;
-		  free(dctPtr);
-	       }
-
-            }
-	    case 'K': //id triplet
-	       if (table.header[j].count==1)
-               {
-		  get_table_element(j,row,table,&kval,&n);
-                  out <<  "(" << kval.id
-                      << ", " << kval.tile
-                      << ", " << kval.exid
-					  << ")" << std::endl;
-	       }
-               else
-               {
-		  kptr = (id_triplet_type*)get_table_element(j,row,table,NULL,&n);
-		  for (k=0;k<n;k++)
-                  {
-                     out <<  "(" << kptr[k].id
-                         << ", " << kptr[k].tile
-                         << ", " << kptr[k].exid
-						 << ")  " << std::endl;
-
-                  }
-				  out << std::endl;
-		  free(kptr);
-	       }
-	       break;
-	    case 'D':   /* Date */
-	       if (table.header[j].count==1)
-               {
-		  get_table_element(j,row,table,&dval,&n);
-		  format_date(dval,date);
-		  out << date << std::endl;
-	       }
-               else
-               {
-		  dptr = (date_type*)get_table_element(j,row,table,NULL,&n);
-		  for (k=0;k<n;k++)
-                  {
-		     format_date((char*)(&dptr[k]),date);
-                     out << dptr[k] << " ";
-		  }
-				  out << std::endl;
-		  free(dptr);
-	       }
-	       break;
-            }
-         }
-		 out << std::endl;
-         free_row( row, table );
-      }
-   }
-}
diff --git a/src/ossim/vpfutil/.cvsignore b/src/ossim/vpfutil/.cvsignore
deleted file mode 100644
index a438335..0000000
--- a/src/ossim/vpfutil/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.d
diff --git a/src/ossim/vpfutil/set.c b/src/ossim/vpfutil/set.c
deleted file mode 100644
index b248909..0000000
--- a/src/ossim/vpfutil/set.c
+++ /dev/null
@@ -1,1303 +0,0 @@
-/*************************************************************************
- *
- *N  Module SET.C
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This module contains functions that make up an abstract data type
- *     "set".  The data structures and algorithms herein allow programs
- *     to perform basic manipulations defined in the mathematics of set
- *     theory.  These operations are fundamental to relational database
- *     theory, as well.
- *
- *     This version allows sets too large to fit in memory to be swapped
- *     out to disk.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    N/A
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   July 1990                       DOS Turbo C
- *    Nov 1991 - Embedded bit manipulation routines instead of using a
- *               separate module (speed & size).
- *    Nov 1991 - Added disk swapping capabilities.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    set_type set_init( long int n );
- *    int  set_empty( set_type set );
- *    void set_insert( long int element, set_type set );
- *    void set_delete( long int element, set_type set );
- *    int set_member( long int element, set_type set );
- *    long int set_min( set_type set );
- *    long int set_max( set_type set );
- *    int  num_in_set( set_type set );
- *    void set_on( set_type set );
- *    void set_off( set_type set );
- *    int  set_equal( set_type a, set_type b );
- *    void set_assign( set_type *a, set_type b );
- *    set_type set_union( set_type a, set_type b );
- *    set_type set_intersection( set_type a, set_type b );
- *    set_type set_difference( set_type a, set_type b );
- *    void set_nuke( set_type *set );
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    These functions are all ANSI C compatible.
- *E
- *************************************************************************/
-#if defined(__MSDOS__) || defined(__MINGW32__)
-#    include <dirent.h>
-#    include <malloc.h>
-#    include <mem.h>
-#    include <dos.h>
-#else
-#ifndef _WIN32
-
-#include <unistd.h>
-
-#endif
-
-#endif
-
-#include <stdlib.h>
-#include <ossim/vpfutil/set.h>
-
-#include <stdio.h>
-#include <string.h>
-#ifndef TRUE
-#define TRUE  1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-static char chkmask[] = {254,253,251,247,239,223,191,127};
-static char setmask[] = {1,2,4,8,16,32,64,128};
-
-#define BITSET(bit,byte)  ((byte | chkmask[bit]) ^ chkmask[bit])
-#define SET_BIT(bit,byte)  (byte | setmask[bit])
-#define UNSET_BIT(bit,byte)  (byte ^ setmask[bit])
-
-#define NBYTES(set)  ((set.size>>3L) + 1L)
-
-/* #define BOUNDSCHECK 1 */
-
-
-static char set_byte( long int nbyte, set_type set )
-{
-   char byte;
-
-   if ( (nbyte < 0) || (nbyte > NBYTES(set)) ) return 0;
-
-   if (set.diskstorage) {
-      fseek(set.fp,nbyte,SEEK_SET);
-      fread(&byte,1,1,set.fp);
-   } else {
-      byte = set.buf[nbyte];
-   }
-   return byte;
-}
-
-#define SET_BYTE( nbyte, set, byte )\
-   if ( (nbyte < 0) || (nbyte > NBYTES(set)) ) byte = 0;        \
-   if (set.diskstorage) {					\
-      fseek(set.fp,nbyte,SEEK_SET);                             \
-      fread(&byte,1,1,set.fp);                                  \
-   } else {                                                     \
-      byte = set.buf[nbyte];                                    \
-   }
-
-
-/*************************************************************************
- *
- *N  set_off
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     Turns each element in the set 'off'.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    set <inout> == (set_type) set to be acted upon.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   Nov 1991                   DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This function conforms to ANSI C standards.
- *E
- *************************************************************************/
-void set_off( set_type set )
-{
-   register long int nbytes, nbyte, bufsize;
-   char byte=0, *buf;
-
-   if (set.diskstorage) {
-      rewind(set.fp);
-      nbytes = NBYTES(set);
-      /* Use buffered reads and writes to set blocks of bits at a time */
-      nbyte = 0;
-      while (nbyte < nbytes) {
-#ifdef __MSDOS__
-	 bufsize = (long int)min(nbytes-nbyte,farcoreleft()/2L);
-#else
-	 bufsize = (long int)(nbytes-nbyte);
-#endif
-	 buf = (char *)malloc(bufsize);
-	 memset(buf,byte,bufsize);
-	 fwrite(buf,bufsize,1,set.fp);
-	 free(buf);
-	 nbyte += bufsize;
-      }
-
-      rewind(set.fp);
-
-   } else {
-      SET_OFF(set);
-   }
-}
-
-/*************************************************************************
- *
- *N  set_on
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     Turns each element in the set 'on'.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    set <inout> == (set_type) set to be acted upon.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   Nov 1991                   DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This function conforms to ANSI C standards.
- *E
- *************************************************************************/
-void set_on( set_type set )
-{
-   register long int nbytes,i, bufsize, nbyte;
-#if !defined(__MSDOS__)
-   unsigned
-#endif
-   char byte=255, *buf;
-
-   if (set.diskstorage) {
-      rewind(set.fp);
-      nbytes = NBYTES(set);
-      /* Use buffered reads and writes to set blocks of bits */
-      nbyte = 0;
-      while (nbyte < nbytes) {
-#ifdef __MSDOS__
-	 bufsize = (long int)min(nbytes-nbyte,farcoreleft()/2L);
- 	buf = (char*)malloc(bufsize);
-#else
-	 bufsize = (long int)(nbytes-nbyte);
-	buf = (unsigned char*)malloc(bufsize);
-#endif
-	 memset(buf,byte,bufsize);
-	 fwrite(buf,bufsize,1,set.fp);
-	 free(buf);
-	 nbyte += bufsize;
-      }
-
-   } else {
-      /* Turn on all bits up through set.size. */
-      /* All but the last byte. */
-      memset(set.buf,byte,set.size>>3L);
-      /* The valid bits of the last byte. */
-      for (i=(set.size>>3L)*8L;i<=set.size;i++)
-	 set_insert(i,set);
-   }
-}
-
-#if __MSDOS__
-static long int available_space( char *drive )
-{
-   struct dfree disktable;
-   int disknum;
-
-   if (!drive) return 0;
-   disknum=toupper(drive[0])-'A'+1;
-   getdfree(disknum,&disktable);
-   return (long int) disktable.df_avail *
-	  (long int) disktable.df_sclus *
-	  (long int) disktable.df_bsec;
-}
-#endif
-
-/*************************************************************************
- *
- *N  set_init
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     Initialize the set for 'n' elements.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    n       <input> == (long int) maximum number of elements in the set.
- *    return <output> == (set_type) initialized set.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   July 1990                  DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This function conforms to ANSI C standards.
- *E
- *************************************************************************/
-set_type set_init( long int n )
-{
-   set_type s;
-   long int nbytes;
-
-   s.size = n;
-   nbytes = NBYTES(s);
-#ifdef __MSDOS__
-   if (nbytes < (farcoreleft()/2L)-4096L) {
-#endif
-      s.buf = (char *)malloc(nbytes);
-      s.diskstorage = 0;
-#ifdef __MSDOS__
-   } else {
-      s.diskstorage = 1;
-      s.buf = (char *)malloc(20);
-      /* If the user has specified a RAM disk, use it (faster) */
-      if (getenv("TMP")  &&  nbytes < available_space(getenv("TMP")))
-	 sprintf(s.buf,"%s\\%s",getenv("TMP"),tmpnam(NULL));
-      else
-	 tmpnam(s.buf);
-      s.fp = fopen(s.buf,"w+b");
-      if (!s.fp) {
-	 perror("set_init: ");
-	 exit(1);
-      }
-   }
-#endif
-   set_off(s);
-   return s;
-}
-
-/*************************************************************************
- *
- *N  set_empty
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function returns TRUE if the given set is empty; else it
- *     returns FALSE.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    set     <input> == (set_type) set.
- *    return <output> == (int) TRUE[1] or FALSE[0].
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   July 1990                  DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This function conforms to ANSI C standards.
- *E
- *************************************************************************/
-int set_empty( set_type set )
-{
-   register long int i, nbytes;
-
-   nbytes = NBYTES(set);
-   for (i=0;i<nbytes;i++) {
-      if (set_byte(i,set)) {
-	 return FALSE;
-      }
-   }
-   return TRUE;
-}
-
-/*************************************************************************
- *
- *N  set_insert
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function inserts the given element into the specified set.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    element <input> == (long int) element to insert into the set.
- *    set     <inout> == (set_type) set.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   July 1990                  DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This function conforms to ANSI C standards.
- *E
- *************************************************************************/
-void set_insert( long int element,
-		 set_type set )
-{
-   long int nbyte,bit;
-   char byte;
-
-   if ((element<0)||(element>set.size)) {
-#ifdef BOUNDSCHECK
-printf("Invalid call to set_insert! (%ld, %ld)\n",
-       element,set.size);
-exit(1);
-#endif
-      return;
-   }
-   nbyte = element>>3L; /* element/8 */
-   bit = element%8L;
-   SET_BYTE(nbyte,set,byte);
-   byte = SET_BIT(bit,byte);
-   if (set.diskstorage) {
-      fseek(set.fp,nbyte,SEEK_SET);
-      fwrite(&byte,1,1,set.fp);
-   } else {
-      set.buf[nbyte] = byte;
-   }
-}
-
-/*************************************************************************
- *
- *N  set_delete
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function deletes the given element from the specified set.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    element <input> == (long int) element to delete from the set.
- *    set     <inout> == (set_type) set.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   July 1990                  DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    void unset_bit()    BITSTUFF.C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This function conforms to ANSI C standards.
- *E
- *************************************************************************/
-void set_delete( long int element,
-		 set_type set )
-{
-   long int nbyte,bit;
-   char byte;
-
-   if ((element<0)||(element>set.size)) {
-#ifdef BOUNDSCHECK
-printf("Invalid call to set_delete!\n");
-exit(1);
-#endif
-      return;
-   }
-   nbyte = element>>3L;  /* element/8 */
-   bit = element%8L;
-   SET_BYTE(nbyte,set,byte);
-   if (!BITSET(bit,byte)) return;
-   byte = UNSET_BIT(bit,byte);
-   if (set.diskstorage) {
-      fseek(set.fp,nbyte,SEEK_SET);
-      fwrite(&byte,1,1,set.fp);
-   } else {
-      set.buf[nbyte] = byte;
-   }
-}
-
-/*************************************************************************
- *
- *N  set_member
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function determines whether a given element is a member of
- *     the specified set.  It returns either TRUE or FALSE.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    element <input> == (long int) element to check in the set.
- *    set     <input> == (set_type) set.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   July 1990                  DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    void bitset()    BITSTUFF.C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This function conforms to ANSI C standards.
- *E
- *************************************************************************/
-int set_member( long int element,
-		set_type set )
-{
-   long int nbyte,bit;
-   char byte;
-
-   if ((element < 0)||(element > set.size)) return FALSE;
-   nbyte = element>>3L;  /* element/8L */
-   bit = element%8L;
-   SET_BYTE(nbyte,set,byte);
-   return BITSET(bit,byte);
-}
-
-/*************************************************************************
- *
- *N  set_min
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function returns the minimum element in the given set.
- *     If the set is empty, the return value is -1.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    set     <input> == (set_type) set.
- *    return <output> == (long int) minimum element in the set.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   July 1990                  DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    void bitset()    BITSTUFF.C
- *    int set_empty( set_type set )     SET.C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This function conforms to ANSI C standards.
- *E
- *************************************************************************/
-long int set_min( set_type set )
-{
-   register long int nbyte, bit, element, nbytes, bufsize, i;
-   char byte='\0', *buf, on;
-
-   /* Find the first byte with a bit set */
-   nbytes = NBYTES(set);
-
-   if (set.diskstorage) {
-
-      /* Set is stored on disk, use block reads to get set into */
-      /* memory one chunk at a time */
-      nbyte = 0;
-      on = 0;
-      rewind(set.fp);
-      while (nbyte < nbytes) {
-#ifdef __MSDOS__
-	 bufsize = (long int)min(nbytes-nbyte,farcoreleft()/2L);
-#else
-	 bufsize = (long int)(nbytes-nbyte);
-#endif
-	 buf = (char *)malloc(bufsize);
-	 fread(buf,bufsize,1,set.fp);
-	 for (i=0;i<bufsize;i++,nbyte++) {
-	    if (buf[i]) {
-	       on = 1;
-	       byte = buf[i];
-	       break;
-	    }
-	 }
-	 free(buf);
-	 if (on) break;
-      }
-
-   } else {
-      for (nbyte=0;nbyte<nbytes;nbyte++)
-	 if (set.buf[nbyte]) {
-	    byte = set.buf[nbyte];
-	    break;
-	 }
-   }
-
-   /* Now find the first bit set in the byte */
-   element = nbyte*8L;
-   for (bit=0; bit<8; bit++,element++) {
-      if (element > set.size) return -1;
-      if (BITSET(bit,byte)) return element;
-   }
-   return -1;
-}
-
-/*************************************************************************
- *
- *N  set_max
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function returns the maximum element in the given set.
- *     If the set is empty, the return value is 0.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    set     <input> == (set_type) set.
- *    return <output> == (long int) maximum element in the set.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   July 1990                  DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This function conforms to ANSI C standards.
- *E
- *************************************************************************/
-long int set_max( set_type set )
-{
-   register long int nbyte, bit, element, nbytes, bufsize, i;
-   char byte='\0', *buf=0, on='\0';
-
-   /* Find the last byte with a bit set */
-   nbytes = NBYTES(set);
-
-   if (set.diskstorage) {
-
-      /* Set is stored on disk, use block reads to get set into */
-      /* memory one chunk at a time */
-      nbyte = nbytes-1L;
-      on = 0;
-      while (nbyte > 0) {
-#ifdef __MSDOS__
-	 bufsize = (long int)min(nbyte+1L,farcoreleft()/2L);
-#else
-	 bufsize = (long int)(nbyte+1L);
-#endif
-	 buf = (char *)malloc(bufsize);
-	 fseek(set.fp,nbyte-bufsize+1L,SEEK_SET);
-	 fread(buf,bufsize,1,set.fp);
-	 for (i=bufsize-1L;i>0;i--,nbyte--) {
-	    if (buf[i]) {
-	       on = 1;
-	       byte = buf[i];
-	       break;
-	    }
-	 }
-	 free(buf);
-	 if (on) break;
-      }
-   } else {
-
-      for (nbyte = nbytes-1; nbyte >= 0; nbyte--) {
-	 if (set.buf[nbyte]) {
-	    byte = set.buf[nbyte];
-	    break;
-	 }
-      }
-      if (nbyte < 0) return 0L;
-
-   }
-
-   /* Now find last bit set in the byte */
-   element = nbyte*8L + 7L;
-   for (bit=7; bit >= 0; bit--,element--) {
-      if (BITSET(bit,byte)) {
-	 return element;
-      }
-   }
-
-   return 0L;
-}
-
-/*************************************************************************
- *
- *N  num_in_set
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function returns the number of elements in the given set.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    set     <input> == (set_type) set.
- *    return <output> == (long int) number of elements in the set.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   July 1990                  DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    void bitset()    BITSTUFF.C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This function conforms to ANSI C standards.
- *E
- *************************************************************************/
-long int num_in_set( set_type set )
-{
-   register long int nbyte,bit,n=0, nbytes;
-   char byte;
-
-   nbytes = NBYTES(set);
-   for (nbyte=0;nbyte<nbytes;nbyte++) {
-      byte = set_byte(nbyte,set);
-      if (byte) {
-	 for (bit=0;bit<8;bit++)
-	    if (BITSET(bit,byte)) n++;
-      }
-   }
-   return n;
-}
-
-#if 0
-/*************************************************************************
- *
- *N  set_equal
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function determines whether two sets are equal to each other.
- *     It returns TRUE or FALSE.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    a       <input> == (set_type) first set to compare.
- *    b       <input> == (set_type) second set to compare.
- *    return <output> == (int) TRUE if (a==b) or FALSE if (a!=b).
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   July 1990                  DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This function conforms to ANSI C standards.
- *E
- *************************************************************************/
-int  set_equal( set_type a,
-		set_type b )
-{
-   long int i, nbytes;
-
-   if (a.size != b.size) return FALSE;
-   if ((!a.diskstorage)&&(!b.diskstorage)) {
-      if (memcmp(a.buf,b.buf,NBYTES(a))==0)
-	 return TRUE;
-      else
-	 return FALSE;
-   } else {
-      nbytes = NBYTES(a);
-      for (i=0;i<nbytes;i++) {
-	 if (set_byte(i,a) != set_byte(i,b)) return FALSE;
-      }
-      return TRUE;
-   }
-}
-#endif
-
-/*************************************************************************
- *
- *N  set_assign
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function assigns set a to be equal to set b.  If a and b are
- *     different sizes, the function will reallocate a to match b.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    a       <input> == (set_type *) set to be assigned.
- *    b       <input> == (set_type) set to assign to a.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   July 1990                  DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This function conforms to ANSI C standards.
- *E
- *************************************************************************/
-void set_assign( set_type *a,
-		 set_type b )
-{
-   register long int nbytes, nbyte, bufsize;
-   char *buf;
-
-   nbytes = NBYTES(b);
-
-   if (!a->diskstorage && !b.diskstorage) {
-      if (a->size == b.size) {
-	 memcpy(a->buf,b.buf,nbytes);
-      } else {    /* a and b are different sizes */
-	 a->buf = (char *)realloc(a->buf,nbytes);
-	 if (a->buf==NULL) {
-	    a->diskstorage = 1;
-	    a->fp = tmpfile();
-	    fwrite(b.buf,1,nbytes,a->fp);
-	 } else {
-	    memcpy(a->buf,b.buf,nbytes);
-	 }
-	 a->size = b.size;
-      }
-   } else {
-      /* Either a or b or both are stored on disk */
-      if (a->diskstorage && !b.diskstorage) {
-	 rewind(a->fp);
-	 fwrite(b.buf,1,nbytes,a->fp);
-	 a->size = b.size;
-      } else {
-	 /* b.diskstorage must be true to get here */
-	 if (!a->diskstorage) {
-	    /* Force a->diskstorage */
-	    a->diskstorage = 1;
-	    if (a->size > 0) free(a->buf);
-	    a->fp = tmpfile();
-	 }
-
-	 /* Block copy file from b.fp to a->fp */
-	 nbyte = 0;
-	 rewind(b.fp);
-	 rewind(a->fp);
-	 while (nbyte < nbytes) {
-#ifdef __MSDOS__
-	    bufsize = (long int)min(nbytes-nbyte,farcoreleft()/2L);
-#else
-	    bufsize = (long int)(nbytes-nbyte);
-#endif
-	    buf = (char *)malloc(bufsize);
-	    fread(buf,bufsize,1,b.fp);
-	    fwrite(buf,bufsize,1,a->fp);
-	    free(buf);
-	    nbyte += bufsize;
-	 }
-
-	 a->size = b.size;
-      }
-   }
-}
-
-#if 0
-/*************************************************************************
- *
- *N  set_union
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     Return the set C such that C = (A U B).  C is initialized within
- *     this function, and should be nuked when no longer needed.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    a       <input> == (set_type) set to be unioned.
- *    b       <input> == (set_type) set to be unioned.
- *    return <output> == (set_type) (A U B).
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   July 1990                  DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    set_type set_init()   SET.C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This function conforms to ANSI C standards.
- *E
- *************************************************************************/
-set_type set_union( set_type a,
-		    set_type b )
-{
-   register long int i, nbytes;
-   set_type c;
-   char byte;
-
-   c = set_init( (long int)max(a.size,b.size) );
-
-   nbytes = NBYTES(c);
-
-   for (i=0;i<nbytes;i++) {
-
-      byte = set_byte(i,a) | set_byte(i,b);
-
-      if (c.diskstorage) {
-	 if (byte) {
-	    fseek(c.fp,i,SEEK_SET);
-	    fwrite(&byte,1,1,c.fp);
-	 }
-      } else {
-	 c.buf[i] = byte;
-      }
-
-   }
-
-   return c;
-}
-#endif
-
-
-/*************************************************************************
- *
- *N  set_intersection
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     Return the set C such that C = (A o B).  C is initialized within
- *     this function, and should be nuked when no longer needed.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    a       <input> == (set_type) set to be intersectioned.
- *    b       <input> == (set_type) set to be intersectioned.
- *    return <output> == (set_type) (A o B).
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   July 1990                  DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    set_type set_init()   SET.C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This function conforms to ANSI C standards.
- *E
- *************************************************************************/
-set_type set_intersection( set_type a,
-			   set_type b )
-{
-   register long int i, nbytes;
-   set_type c;
-   char byte;
-#ifdef __MSDOS__
-   c = set_init( (long int)max(a.size,b.size) );
-#else
-   c = set_init( a.size > b.size ? a.size : b.size );
-#endif
-
-   if (c.diskstorage) rewind(c.fp);
-
-   nbytes = NBYTES(c);
-   for (i=0;i<nbytes;i++) {
-      byte = set_byte(i,a) & set_byte(i,b);
-      if (c.diskstorage)
-	 fwrite(&byte,1,1,c.fp);
-      else
-	 c.buf[i] = byte;
-   }
-
-   return c;
-}
-
-#if 0
-/*************************************************************************
- *
- *N  set_difference
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     Return the set C such that C = (A - B).  C is initialized within
- *     this function, and should be nuked when no longer needed.
- *
- *     NOTE:  This function can be sped up, if necessary, by direct
- *     manipulation of the bytes and bits rather than the abstract
- *     set function calls used presently.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    a       <input> == (set_type) set to subtract from.
- *    b       <input> == (set_type) set to be subtracted.
- *    return <output> == (set_type) (A - B).
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   July 1990                  DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    set_type set_init()   SET.C
- *    int set_member()      SET.C
- *    void set_insert()     SET.C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This function conforms to ANSI C standards.
- *E
- *************************************************************************/
-set_type set_difference( set_type a,
-			 set_type b )
-{
-   register long int i;
-   set_type c;
-
-   c = set_init( a.size );
-
-   for (i=0;i<=a.size;i++) {
-      if ( i > b.size ) {
-	 if (set_member(i,a)) set_insert( i, c );
-      } else {
-	 if ((set_member(i,a)) && (!set_member(i,b))) set_insert(i,c);
-      }
-   }
-
-   return c;
-}
-#endif
-
-/*************************************************************************
- *
- *N  set_nuke
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     Nucleate a set from existence.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    set     <inout> == (set_type *) set to be nuked.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   July 1990                  DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This function conforms to ANSI C standards.
- *E
- *************************************************************************/
-void set_nuke( set_type *set )
-{
-   if (set->diskstorage) {
-      fclose(set->fp);
-      unlink(set->buf);
-   }
-   free( set->buf );
-   set->size = -1;
-   set->diskstorage = 0;
-}
diff --git a/src/ossim/vpfutil/vpfdisp.c b/src/ossim/vpfutil/vpfdisp.c
deleted file mode 100644
index b43e610..0000000
--- a/src/ossim/vpfutil/vpfdisp.c
+++ /dev/null
@@ -1,504 +0,0 @@
-/*************************************************************************
- *
- *N  Module VPFDISP - Display VPF records
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This module contains functions used to display VPF records in
- *     human readable format.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    N/A
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels    May 1991                      DOS Turbo C
- *E
- *************************************************************************/
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#if defined(__MINGW32__)
-#  include <dirent.h>
-#  include <malloc.h>
-#  include <mem.h>
-#  include <dos.h>
-#  ifdef __MSDOS__
-#    include <graphics.h>
-#    include <conio.h>
-#    include <dos.h>
-#    include <alloc.h>
-#    include <mem.h>
-#  endif
-#  ifdef _MSC_VER
-#    include <io.h>
-#  endif
-#  ifndef _WIN32
-#    include <unistd.h>
-#  endif
-#  ifdef __APPLE__
-#    include <sys/types.h>
-#    include <sys/malloc.h>
-#    define MAXSHORT 255
-#    define MAXLONG  LONG_MAX
-#  else
-#    include <malloc.h>
-#  endif
-#endif
-
-
-#include <string.h>
-#include <ctype.h>
-#include <math.h>
-#if defined(__CYGWIN__) || defined(__APPLE__)|| defined(_WIN32)
-#include <ossim/vpfutil/values.h>
-#else
-#include <ossim/vpfutil/values.h>
-#endif
-#include <ossim/vpfutil/vpfapi.h>
-#include <ossim/vpfutil/vpftable.h>
-#include <ossim/vpfutil/vpfview.h>
-
-#if (!defined(_WIN32)||defined(__CYGWIN__))
-#    include <unistd.h>  /* For "access" function. */
-#endif
-
-extern color_type menucolor, menubordercolor, menutextcolor;
-
-#ifndef __MSDOS__
-void strupr2(char* str) {
-  char* s = str;
-  while (*s)
-  {
-	  *s = toupper(*s);
-	  ++s;
-  }
-}
-#endif
-
-
-/*************************************************************************
- *
- *N  format_date
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function converts a VPF date value into a string of the
- *     form  mm/dd/yyyy with time displayed as hh:mm:ss if non-zero.
- *     'fmtdate' must be a character string with at least 18 bytes
- *     allocated.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *     date     <input>==(date_type) VPF date type value.
- *     fmtdate <output>==(char *) output formatted date string.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels    Sept 1991                     DOS Turbo C
- *E
- *************************************************************************/
-void format_date( date_type date, char *fmtdate )
-{
-   char year[8], month[8], day[8], hour[8], min[8], sec[8];
-
-   date[20]='\0';
-   strncpy(year, date, 4);
-   year[4]='\0';
-   strncpy(month, &date[4], 2);
-   month[2]='\0';
-   strncpy(day, &date[6], 2);
-   day[2]='\0';
-   strncpy(hour, &date[8], 2);
-   hour[2]='\0';
-   strncpy(min, &date[10], 2);
-   min[2]='\0';
-   strncpy(sec, &date[12], 2);
-   sec[2]='\0';
-   if ( (strcmp(hour,"00") == 0) && (strcmp(min,"00")==0) &&
-	(strcmp(sec,"00") == 0) )
-      sprintf(fmtdate,"%s/%s/%s",month,day,year);
-   else
-      sprintf(fmtdate,"%s/%s/%s %s:%s:%s",month,day,year,hour,min,sec);
-}
-
-/*************************************************************************
- *
- *N  vpf_display_record
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function displays all of the fields of a particular VPF
- *     record, including the descriptions of the fields and their
- *     values.  It accesses the online data dictionary metadata
- *     contained in the specified Value Description Tables.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    row     <input> == (row_type) vpf table row structure.
- *    table   <input> == (vpf_table_type) vpf table.
- *    fp      <input> == (FILE *) pointer to the output file.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels    Sept 1991                     DOS Turbo C
- *E
- *************************************************************************/
-void vpf_display_record( row_type row,
-			 vpf_table_type table,
-			 FILE *fp )
-{
-   register int i,j;
-   char *buf,*num, path[128], *tablename;
-   char *attr,*val,*descr, vdtpath[128], fmtdate[40];
-   vpf_table_type vdt;
-   row_type vdtrow;
-   int found;
-   ossim_int32 l, lval, count, *lptr;
-   short int s,sval,*sptr;
-   float f,*fptr;
-   date_type date;
-   int TABLE_ = 1, ATTR_ = 2, VAL_ = 3, DESCR_ = 4;
-
-   num = (char *)vpfmalloc(20*sizeof(char));
-
-   strcpy( vdtpath, "" );
-
-   /* Display all secondary attributes */
-   for (i=0;i<table.nfields;i++) {
-      switch (table.header[i].type) {
-	 case 'T':
-	    buf = (char *)get_table_element(i,row,table,
-					    NULL,&count);
-	    rightjust(buf);
-	    if (strcmp( buf, "" ) != 0) {
-	       fputs(table.header[i].name,fp);
-	       fputs(" - ",fp);
-	       fputs(table.header[i].description,fp);
-	       fputs(": ",fp);
-	       fputs(buf,fp);
-
-
-	       strcpy( path, table.path );
-	       strcat( path, table.header[i].vdt );
-	       if ( (access(path,4)==0) &&
-		    (strcmp(table.header[i].vdt,"") != 0) ) {
-
-		  if (strcmp(vdtpath,path) != 0) {
-		     if (strcmp(vdtpath,"") != 0) {
-			vpf_close_table(&vdt);
-		     }
-		     vdt = vpf_open_table( path, disk, "rb", NULL );
-		  }
-
-		  strcpy( vdtpath, path );
-		  for (j=1;j<=vdt.nrows;j++) {
-		     vdtrow = read_row( j, vdt );
-		     tablename = (char *)get_table_element( TABLE_, vdtrow,
-							 vdt, NULL, &count );
-		     rightjust(tablename);
-		     strupr2(tablename);
-		     attr = (char *)get_table_element( ATTR_, vdtrow, vdt,
-						       NULL, &count );
-		     rightjust(attr);
-		     val = (char *)get_table_element( VAL_, vdtrow, vdt,
-						      NULL, &count );
-		     rightjust(val);
-
-		     found = FALSE;
-		     if ( (strstr(table.name,tablename)) &&
-			  (ossim_strcasecmp(attr,table.header[i].name)==0) &&
-			  (ossim_strcasecmp(val,buf)==0) ) {
-			descr = (char *)get_table_element(DESCR_,vdtrow,vdt,
-							  NULL, &count);
-			rightjust(descr);
-			fputs(" (",fp);
-			fputs(descr,fp);
-			fputs(")",fp);
-
-			free(descr);
-			found = TRUE;
-		     }
-		     free(tablename);
-		     free(attr);
-		     free(val);
-		     free_row( vdtrow, vdt );
-		     if (found) break;
-		  }
-	       }
-
-
-	       fputc('\n',fp);
-	    }
-	    free(buf);
-	    break;
-	 case 'I':
-	    if (table.header[i].count==1) {
-	       get_table_element(i,row,table,&l,&count);
-	       if (l != NULLINT) {
-		  fputs(table.header[i].name,fp);
-		  fputs(" - ",fp);
-		  fputs(table.header[i].description,fp);
-		  fputs(": ",fp);
-		  ltoa((int)l,num,10);
-		  fputs(num,fp);
-
-		  strcpy( path, table.path );
-		  strcat( path, table.header[i].vdt );
-		  if ( (access(path,4)==0) &&
-		     (strcmp(table.header[i].vdt,"") != 0) ) {
-
-		     if (strcmp(vdtpath,path) != 0) {
-			if (strcmp(vdtpath,"") != 0) {
-			   vpf_close_table(&vdt);
-			}
-			vdt = vpf_open_table( path, disk, "rb", NULL );
-		     }
-		     strcpy( vdtpath, path );
-
-		     for (j=1;j<=vdt.nrows;j++) {
-			vdtrow = read_row( j, vdt );
-			tablename = (char *)get_table_element( TABLE_,
-					      vdtrow, vdt, NULL, &count );
-			rightjust(tablename);
-			strupr2(tablename);
-			attr = (char *)get_table_element( ATTR_, vdtrow, vdt,
-							  NULL, &count );
-			rightjust(attr);
-			get_table_element( VAL_, vdtrow, vdt,
-					   &lval, &count );
-
-			found = FALSE;
-			if ( (strstr(table.name,tablename)) &&
-			   (ossim_strcasecmp(attr,table.header[i].name)==0) &&
-			   (lval==l) ) {
-			   descr = (char *)get_table_element(DESCR_,vdtrow,
-							 vdt, NULL, &count);
-			   rightjust(descr);
-			   fputs(" (",fp);
-			   fputs(descr,fp);
-			   fputs(")",fp);
-
-			   free(descr);
-			   found = TRUE;
-			}
-			free(tablename);
-			free(attr);
-			free_row( vdtrow, vdt );
-			if (found) break;
-		     }
-		  }
-
-		  fputc('\n',fp);
-	       }
-	    } else {
-	       get_table_element(i,row,table,&lptr,&count);
-	       fputs(table.header[i].name,fp);
-	       fputs(" - ",fp);
-	       fputs(table.header[i].description,fp);
-	       fputs(": (",fp);
-	       for (j=0;j<count;j++) {
-		  ltoa((int)lptr[j],num,10);
-		  fputs(num,fp);
-		  if (j<count-1) fputs(", ",fp);
-	       }
-	       fputs(")\n",fp);
-	    }
-	    break;
-	 case 'S':
-	    if (table.header[i].count==1) {
-	       get_table_element(i,row,table,&s,&count);
-	       if (s != NULLSHORT) {
-		  fputs(table.header[i].name,fp);
-		  fputs(" - ",fp);
-		  fputs(table.header[i].description,fp);
-		  fputs(": ",fp);
-		  itoa(s,num,10);
-		  fputs(num,fp);
-
-		  strcpy( path, table.path );
-		  strcat( path, table.header[i].vdt );
-		  if ( (access(path,4)==0) &&
-		     (strcmp(table.header[i].vdt,"") != 0) ) {
-
-		     if (strcmp(vdtpath,path) != 0) {
-			if (strcmp(vdtpath,"") != 0) {
-			   vpf_close_table(&vdt);
-			}
-			vdt = vpf_open_table( path, disk, "rb", NULL );
-		     }
-		     strcpy( vdtpath, path );
-
-		     for (j=1;j<=vdt.nrows;j++) {
-			vdtrow = read_row( j, vdt );
-			tablename = (char *)get_table_element( TABLE_,
-					      vdtrow, vdt, NULL, &count );
-			rightjust(tablename);
-			strupr2(tablename);
-			attr = (char *)get_table_element( ATTR_, vdtrow, vdt,
-							  NULL, &count );
-			rightjust(attr);
-			get_table_element( VAL_, vdtrow, vdt,
-					   &sval, &count );
-
-			found = FALSE;
-			if ( (strstr(table.name,tablename)) &&
-			   (ossim_strcasecmp(attr,table.header[i].name)==0) &&
-			   (sval==s) ) {
-			   descr = (char *)get_table_element(DESCR_,vdtrow,
-							 vdt, NULL, &count);
-			   rightjust(descr);
-			   fputs(" (",fp);
-			   fputs(descr,fp);
-			   fputs(")",fp);
-
-			   free(descr);
-			   found = TRUE;
-			}
-			free(tablename);
-			free(attr);
-			free_row( vdtrow, vdt );
-			if (found) break;
-		     }
-		  }
-
-		  fputc('\n',fp);
-	       }
-	    } else {
-	       get_table_element(i,row,table,&sptr,&count);
-	       fputs(table.header[i].name,fp);
-	       fputs(" - ",fp);
-	       fputs(table.header[i].description,fp);
-	       fputs(": (",fp);
-	       for (j=0;j<count;j++) {
-		  itoa(sptr[j],num,10);
-		  fputs(num,fp);
-		  if (j<count-1) fputs(", ",fp);
-	       }
-	       fputs(")\n",fp);
-	    }
-	    break;
-	 case 'F':
-	    if (table.header[i].count==1) {
-	       get_table_element(i,row,table,&f,&count);
-	       if (!is_vpf_null_float(f)) {
-		  fputs(table.header[i].name,fp);
-		  fputs(" - ",fp);
-		  fputs(table.header[i].description,fp);
-		  fputs(": ",fp);
-#if !defined(__APPLE__) && !defined(__FreeBSD__)
-		  gcvt(f,6,num);
-#endif
-		  fputs(num,fp);
-		  fputc('\n',fp);
-	       }
-	    } else {
-	       get_table_element(i,row,table,&fptr,&count);
-	       fputs(table.header[i].name,fp);
-	       fputs(" - ",fp);
-	       fputs(table.header[i].description,fp);
-	       fputs(": (",fp);
-	       for (j=0;j<count;j++) {
-		  if (is_vpf_null_float(fptr[j])) {
-		     fputs("(null)",fp);
-		  } else {
-#if !defined(__APPLE__) && !defined(__FreeBSD__)
-		     gcvt(fptr[j],6,num);
-#endif
-		     fputs(num,fp);
-		  }
-		  if (j<count-1) fputs(", ",fp);
-	       }
-	       fputs(")\n",fp);
-	    }
-	    break;
-	 case 'D':
-	    if (table.header[i].count==1) {
-	       get_table_element(i,row,table,date,&count);
-	       fputs(table.header[i].name,fp);
-	       fputs(" - ",fp);
-	       fputs(table.header[i].description,fp);
-	       fputs(": ",fp);
-	       format_date(date,fmtdate);
-	       fputs(fmtdate,fp);
-	       fputc('\n',fp);
-	    }
-	    break;
-      }
-   }
-
-   if (strcmp(vdtpath,"") != 0)
-      vpf_close_table( &vdt );
-
-   free(num);
-}
-
-
-
-
-/*************************************************************************
- *
- *N  display_attributes
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function displays all of the attributes of a particular
- *     feature, including the descriptions of the fields and their
- *     values.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    fc      <input> == (int) feature class number.
- *    row     <input> == (ossim_int32) row of the attribute table.
- *    library <input> == (library_type *) VPF library structure.
- *    fp      <input> == (FILE *) pointer to the output file.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels    May 1991                      DOS Turbo C
- *E
- *************************************************************************/
-void display_attributes( int fc,
-			 ossim_int32 row,
-			 library_type *library,
-			 FILE *fp )
-{
-   vpf_table_type feature_table;
-   row_type vpfrow;
-
-   feature_table = vpf_open_table(library->fc[fc].table,disk,"rb",NULL);
-
-   vpfrow = read_row( row, feature_table );
-
-   vpf_display_record( vpfrow, feature_table, fp );
-
-   free_row(vpfrow,feature_table);
-
-   vpf_close_table(&feature_table);
-}
diff --git a/src/ossim/vpfutil/vpfread.c b/src/ossim/vpfutil/vpfread.c
deleted file mode 100644
index e960441..0000000
--- a/src/ossim/vpfutil/vpfread.c
+++ /dev/null
@@ -1,1646 +0,0 @@
-/*************************************************************************
- *
- *N  Module VPFREAD.C
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This module contains functions for reading VPF tables.  It, along
- *     with VPFTABLE.C and VPFWRITE.C (and VPFIO.C for UNIX), comprises a
- *     fairly extensive set of functions for handling VPF tables.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    N/A
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   May 1991  Original Version   DOS Turbo C
- *    David Flinn      Jul 1991	 Merged with Barry & Mody's code for UNIX
- *    Jim TenBrink     Oct 1991  Split this module off from vpftable and
- *                               merged converter and vpfview branches
- *                               for the functions included here..
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.  It includes #ifdefs for
- *    all system dependencies, so that it will work efficiently with
- *    either Turbo C in DOS or (at least) GNU C in UNIX.
- *E
- *
- *************************************************************************/
-
-#include <ossim/vpfutil/machine.h>
-
-#ifdef __MSDOS__
-#include <mem.h>
-#include <io.h>
-#include <alloc.h>
-#include <dos.h>
-#include <graphics.h>
-#else
-#ifndef _WIN32
-#include <unistd.h>
-#endif
-#endif
-
-#if UNIX
-#include <sys/stat.h>
-#define   SEEK_SET    0         /* Turbo C fseek value */
-#define   SEEK_CUR    1
-#define   farmalloc   malloc    /* no farmallocs on UNIX */
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <ossim/vpfutil/vpftable.h>
-#include <ossim/vpfutil/vpfmisc.h>
-#  ifndef min
-#    define min(a,b) ((a) <= (b) ? (a) : (b))
-#  endif
-#  ifndef max
-#    define max(a,b) ((a) <= (b) ? (b) : (a))
-#  endif
-
-extern int STORAGE_BYTE_ORDER;
-
-
-/* Repeat functions statically to reduce external module dependencies */
-
-/*
- * currently being used by the converter routines, not by the vpfview
- * routines
- */
-static char * get_line (FILE *fp)
-{
-  ossim_int32 CurrentChar,   /* This is an int because fgetc returns an int */
-      count ,
-      NextBlock = 256 ,
-      LineAllocation = 0 ;
-  char *CurrentLine = (char *) NULL ;
-
-/* This forever loop searches past all lines beginning with #,
-   indicating comments. */
-
-  for (;;) {
-      CurrentChar = fgetc(fp);
-      if ( CurrentChar == COMMENT )             /* skip past comment line */
-        for (;CurrentChar != NEW_LINE; ) {
-          if (CurrentChar == EOF) return (char *) NULL ;
-          CurrentChar = fgetc (fp) ;
-        }
-      else
-        break ;
-    }  /* end of forever loop */
-
-  if (CurrentChar == EOF ) return (char *) NULL ;
-
-  for(count = 0; CurrentChar != EOF; CurrentChar = fgetc(fp), count++) {
-
-    /* Allocate space for output line, if needed */
- 
-    if (! ( count < LineAllocation )) {
-      LineAllocation += NextBlock ;
-      if ( CurrentLine )
-        CurrentLine = (char *) realloc ( CurrentLine, LineAllocation );
-      else
-        CurrentLine = (char *) vpfmalloc ( LineAllocation );
-      if (!CurrentLine) {
-        return (char *) NULL ;
-      }
-    }  
-    if ( ( CurrentChar == (ossim_int32) LINE_CONTINUE ) ) {
-      CurrentChar = fgetc(fp ) ;        /* read character after backslash */
-      /* A newline will be ignored and thus skipped over */
-      if ( CurrentChar == (ossim_int32) SPACE )  /* Assume line continue error */
-        while ( fgetc (fp) != (ossim_int32) SPACE ) ;
-      else if (CurrentChar != (ossim_int32) NEW_LINE ) {
-        /* copy it if not new line */
-        CurrentLine[count++] = (char) LINE_CONTINUE ;
-        CurrentLine[count] = (char) CurrentChar ;
-      } else
-        count -- ;      /* Decrement the counter on a newline character */
-    } else if (CurrentChar == (ossim_int32) NEW_LINE )     /* We're done */
-        break;
-    else
-      CurrentLine[count] = (char)CurrentChar;
-
-  }  /* end of for count */
-
-  CurrentLine[count] = '\0';  /* terminate string */
-  return CurrentLine ;
-
-}
-
-
-/* #if UNIX */
-
-ossim_int32 VpfRead ( void *to, VpfDataType type, ossim_int32 count, FILE *from )
-{
-  ossim_int32 retval=0 , i ;
-
-  switch ( type ) {
-  case VpfChar:
-    retval = (long)fread ( to, sizeof (char), count, from ) ;
-    break ;
-  case VpfShort:
-    {
-      short int stemp ,
-                *sptr = (short *) to ;
-      for ( i=0; i < count; i++ ) {
-	retval = (long)fread ( &stemp, sizeof (short), 1, from ) ;
-	if (STORAGE_BYTE_ORDER != MACHINE_BYTE_ORDER)
-	   swap_two ( (char*)&stemp, (char*)sptr ) ;
-	else
-	   *sptr = stemp;
-        sptr++ ;
-      }
-    }  
-    break ;
-  case VpfInteger:
-    {
-      if (STORAGE_BYTE_ORDER != MACHINE_BYTE_ORDER) {
-	ossim_int32 itemp,
-	  *iptr = (ossim_int32 *) to ;
-	for ( i=0; i < count; i++ ) {
-	  retval = (long)fread ( &itemp, sizeof (ossim_int32), 1, from ) ;
-	  swap_four ( (char*)&itemp, (char*)iptr ) ;
-	  iptr++ ;
-	}
-      } else {
-	retval = (long)fread ( to, sizeof (ossim_int32), count, from ) ;
-      }
-    }  
-    break ;
-  case VpfFloat:
-    {
-      float ftemp ,
-            *fptr = (float *) to ;
-      for ( i=0; i < count; i++ ) {
-        retval = (long)fread ( &ftemp, sizeof (float), 1, from ) ;
-	if (STORAGE_BYTE_ORDER != MACHINE_BYTE_ORDER)
-	   swap_four ( (char*)&ftemp, (char*)fptr ) ;
-	else
-	   *fptr = ftemp;
-	fptr++ ;
-      }
-    }
-    break ;
-  case VpfDouble:
-    {
-      double dtemp ,
-             *dptr = (double *) to ;
-      for ( i=0; i < count; i++ ) {
-        retval = (long)fread ( &dtemp, sizeof (double), 1, from ) ;
-	if (STORAGE_BYTE_ORDER != MACHINE_BYTE_ORDER)
-	   swap_eight ( (char*)&dtemp, (char*)dptr ) ;
-	else
-	   *dptr = dtemp;
-	dptr++ ;
-      }
-    }
-    break ;
-  case VpfDate:
-    {
-      date_type *dp = (date_type *) to ;
-      retval = (long)fread(dp,sizeof(date_type)-1,count,from);
-    }
-    break ;
-  case VpfCoordinate:
-    {
-      if (STORAGE_BYTE_ORDER != MACHINE_BYTE_ORDER) {
-	 coordinate_type ctemp ,
-		      *cptr = (coordinate_type *) to ;
-	 for ( i=0; i < count; i++ ) {
-	   retval = (long)fread ( &ctemp, sizeof (coordinate_type), 1, from ) ;
-	   swap_four ( (char*)&ctemp.x, (char*)&cptr->x ) ;
-	   swap_four ( (char*)&ctemp.y, (char*)&cptr->y ) ;
-	   cptr++ ;
-	 }
-      } else {
-	 retval = (long)fread ( to, sizeof (coordinate_type), count, from ) ;
-      }
-    }  
-    break ;
-  case VpfDoubleCoordinate:
-    {
-      double_coordinate_type dctemp ,
-                             *dcptr = (double_coordinate_type *) to ;
-      for ( i=0; i < count; i++ ) {
-        retval = (long)fread ( &dctemp, sizeof (double_coordinate_type), 1, from ) ;
-	if (STORAGE_BYTE_ORDER != MACHINE_BYTE_ORDER) {
-	   swap_eight ( (char*)&dctemp.x, (char*)&dcptr->x ) ;
-	   swap_eight ( (char*)&dctemp.y, (char*)&dcptr->y ) ;
-	} else {
-	   dcptr->x = dctemp.x;
-	   dcptr->y = dctemp.y;
-	}
-	dcptr++ ;
-      }
-    }
-    break ;
-  case VpfTriCoordinate:
-    {
-      tri_coordinate_type ttemp ,
-                          *tptr = (tri_coordinate_type *) to ;
-      for ( i=0; i < count; i++ ) {
-        retval = (long)fread ( &ttemp, sizeof (tri_coordinate_type), 1, from ) ;
-	if (STORAGE_BYTE_ORDER != MACHINE_BYTE_ORDER) {
-	   swap_four ( (char*)&ttemp.x, (char*)&tptr->x ) ;
-	   swap_four ( (char*)&ttemp.y, (char*)&tptr->y ) ;
-	   swap_four ( (char*)&ttemp.z, (char*)&tptr->z ) ;
-	} else {
-	   tptr->x = ttemp.x;
-	   tptr->y = ttemp.y;
-	   tptr->z = ttemp.z;
-	}
-	tptr++ ;
-      }
-    }
-    break ;
-  case VpfDoubleTriCoordinate:
-    {
-      double_tri_coordinate_type dttemp ,
-                                 *dtptr = (double_tri_coordinate_type *) to ;
-      for ( i=0; i < count; i++ ) {
-        retval = (long)fread ( &dttemp, sizeof (double_tri_coordinate_type), 1, from);
-	if (STORAGE_BYTE_ORDER != MACHINE_BYTE_ORDER) {
-	   swap_eight ( (char*)&dttemp.x, (char*)&dtptr->x ) ;
-	   swap_eight ( (char*)&dttemp.y, (char*)&dtptr->y ) ;
-	   swap_eight ( (char*)&dttemp.z, (char*)&dtptr->z ) ;
-	} else {
-	   dtptr->x = dttemp.x;
-	   dtptr->y = dttemp.y;
-	   dtptr->z = dttemp.z;
-	}
-	dtptr++ ;
-      }
-    }  
-    break ;
-  case VpfNull:
-    /* Do Nothing */
-    break ;
-  default:
-    break ;
-  }   /* end of switch */
-
-  return retval ;       /* whatever fread returns */
-
-}
-
-/* #endif */
-
-
-
-/*************************************************************************
- *
- *N  read_text_defstr
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function reads the definition string from an input file for
- *     creating a VPF table.
- *     Currently being used by converter routines, not by vpfview routines.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    infile  <input> == (FILE *) file pointer to the input file.
- *    outerr  <input> == (FILE *) file pointer to the error file.
- *    return <output> == (char *) definition string of the file.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Dave Flinn       July 1991      Original version developed for UNIX
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    get_line()
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-char *read_text_defstr ( FILE *infile, FILE * outerr )
-{
-  char *definition ;
-
-  rewind ( infile );
-
-  if (( (definition = get_line (infile )) == NULL ) ||
-      ( definition[strlen(definition)-1] != ';' )) {
-    return (char *) NULL ;
-  }
-
-  return definition ;
-
-}
-
-#if UNIX
-/*
- * currently being used by converter routines, not by vpfview
- * routines
- */
-int add_null_values ( char *name, vpf_table_type table, FILE * fpout )
-{
-  FILE *nullfp;
-  ossim_int32  i , ptr ;
-  char *cval, *line, *field ;
- 
-  nullfp = fopen( name, "r");
-  if ( !nullfp )
-    return 0;
- 
-  /* Now read nulls from file and populate table structure */
-
-  while ( (line = get_line ( nullfp )) ) {
- 
-    ptr = 0 ;
-    field = get_string ( &ptr, line, FIELD_SEPERATOR ) ;
-    i = table_pos ( field, table ) ;
- 
-    switch ( table.header[i].type ) {
-    case 'T':
-      cval = get_string ( &ptr, line, FIELD_SEPERATOR ) ;
-      free ( table.header[i].nullval.Char ) ;   /* get rid of default */
-      table.header[i].nullval.Char = (char *) vpfmalloc ( (unsigned long)strlen (cval)+1) ;
-      strcpy ( table.header[i].nullval.Char, cval ) ;
-      free (cval) ;
-      break ;
-    case 'I':
-      table.header[i].nullval.Int = get_number ( &ptr, line, FIELD_SEPERATOR );
-      break ;
-    case 'S':
-      table.header[i].nullval.Short =
-        (short int) get_number ( &ptr, line, FIELD_SEPERATOR );
-      break ;
-    case 'R':
-      cval = get_string ( &ptr, line, FIELD_SEPERATOR ) ;
-      table.header[i].nullval.Double = atof ( cval ) ;
-      free ( cval ) ;
-      break ;
-    case 'F':
-      cval = get_string ( &ptr, line, FIELD_SEPERATOR ) ;
-      table.header[i].nullval.Float = (float) atof ( cval ) ;
-      free ( cval ) ;
-      break ;
-    default:
-      return 0 ;
-      break ;
-    }
-  }
-
-  return 1 ;
-}
-#endif
-
-/*************************************************************************
- *
- *N  index_length
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function returns the length of a specified row from the table
- *     index.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    row_number <input> == (ossim_int32) row number in the table.
- *    table      <input> == (vpf_table_type) VPF table structure.
- *    return    <output> == (ossim_int32) length of the table row or 0 on error.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   May 1991       Original Version   DOS Turbo C
- *    Dave Flinn       July 1991      UNIX extensions
- *    JTB              10/91          removed aborts()
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-ossim_int32 index_length( ossim_int32 row_number,
-		       vpf_table_type table )
-{
-   ossim_int32   recsize,len=0;
-   ossim_uint32 ulen;
-   long  int pos;
-
-   STORAGE_BYTE_ORDER = table.byte_order;
-
-   if (row_number < 1) row_number = 1;
-   if (row_number > table.nrows) row_number = table.nrows;
-
-   switch (table.xstorage) {
-      case COMPUTE:
-	 len = table.reclen;
-	 break;
-      case DISK:
-	 recsize = sizeof(index_cell);
-	 fseek( table.xfp, (ossim_int32)(row_number*recsize), SEEK_SET );
-
-	 if ( ! Read_Vpf_Int(&pos,table.xfp,1) ) {
-	   len = (ossim_int32)0 ;
-	 }
-
-	 if ( ! Read_Vpf_Int(&ulen,table.xfp,1) ) {
-	   return (ossim_int32)0 ;
-	 }
-	 len = ulen;
-	 break;
-      case RAM:
-	 len = table.index[row_number-1].length;
-	 break;
-      default:
-	if ( table.mode == Write && table.nrows != row_number ) {
-	   /* Just an error check, should never get here in writing */
-	   fprintf(stderr,"\nindex_length: error trying to access row %d",
-		   (int)row_number ) ;
-	   len = (ossim_int32)0 ;
-	}
-	break;
-   }
-   return len;
-}
-
-/*************************************************************************
- *
- *N  index_pos
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function returns the position of a specified row from the table
- *     index.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    row_number <input> == (ossim_int32) row number in the table.
- *    table      <input> == (vpf_table_type) VPF table structure.
- *    return    <output> == (ossim_int32) position of the table row 
- *                          or zero on error.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   May 1991       Original Version   DOS Turbo C
- *    Dave Flinn       July 1991      Updated for UNIX
- *    JTB              10/91          removed aborts()
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-ossim_int32 index_pos( ossim_int32 row_number,
-		    vpf_table_type table )
-{
-   ossim_int32   recsize;
-   ossim_uint32 pos=0;
-
-   STORAGE_BYTE_ORDER = table.byte_order;
-
-   if (row_number < 1) row_number = 1;
-   if (row_number > table.nrows) row_number = table.nrows;
-
-   switch (table.xstorage) {
-      case COMPUTE:
-	 pos = table.ddlen + ((row_number-1) * table.reclen);
-	 break;
-      case DISK:
-	 recsize = sizeof(index_cell);
-	 fseek( table.xfp, (ossim_int32)(row_number*recsize), SEEK_SET );
-	 if ( ! Read_Vpf_Int(&pos,table.xfp,1) ) {
-	   pos = (ossim_uint32)0 ;
-	 }
-	 break;
-      case RAM:
-	 pos = table.index[row_number-1].pos;
-	 break;
-      default:
-	 if ( table.mode == Write && table.nrows != row_number ) {
-	   /* Just an error check, should never get here in writing */
-	   fprintf(stderr,"\nindex_length: error trying to access row %d",
-		   (int)row_number ) ;
-	   pos = (ossim_uint32)0;
-	 }
-	 break;
-   }
-   return pos;
-}
-
-#if 0
-/* Compute the offset from the start of the row to the given field */
-static ossim_int32 row_offset( int field, row_type row, vpf_table_type table)
-{
-   ossim_int32 offset,n,size;
-   int i;
-   id_triplet_type key;
-   int keysize[] = {0,sizeof(char),sizeof(short int),sizeof(ossim_int32)};
-
-   if (field < 0 || field >= table.nfields) return -1;
-
-   offset = 0L;
-   for (i=0;i<field;i++) {
-      switch (table.header[i].type) {
-	 case 'I':
-	    offset += sizeof(ossim_int32)*row[i].count;
-	    break;
-	 case 'S':
-	    offset += sizeof(short int)*row[i].count;
-	    break;
-	 case 'T':
-	    offset += sizeof(char)*row[i].count;
-	    break;
-	 case 'F':
-	    offset += sizeof(float)*row[i].count;
-	    break;
-	 case 'D':
-	    offset += sizeof(date_type)*row[i].count;
-	    break;
-	 case 'K':
-	    get_table_element(i,row,table,&key,&n);
-	    size = sizeof(char) +
-		   keysize[TYPE0(key.type)] +
-		   keysize[TYPE1(key.type)] +
-		   keysize[TYPE2(key.type)];
-	    offset += size*row[i].count;
-	    break;
-	 case 'R':
-	    offset += sizeof(double)*row[i].count;
-	    break;
-	 case 'C':
-	    offset += sizeof(coordinate_type)*row[i].count;
-	    break;
-	 case 'B':
-	    offset += sizeof(double_coordinate_type)*row[i].count;
-	    break;
-	 case 'Z':
-	    offset += sizeof(tri_coordinate_type)*row[i].count;
-	    break;
-	 case 'Y':
-	    offset += sizeof(double_tri_coordinate_type)*row[i].count;
-	    break;
-      }
-   }
-   return offset;
-}
-#endif
-
-/*************************************************************************
- *
- *N  read_key
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function reads an id triplet key from a VPF table.
- *     The table must be open for read.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    table    <input>  == (vpf_table_type) VPF table.
- *    read_key <output> == (id_triplet_type) id triplet key.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   May 1991       Original Version   DOS Turbo C
- *    Dave Flinn       July 1991      Updated for UNIX
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-id_triplet_type read_key( vpf_table_type table )
-{
-   id_triplet_type key;
-   unsigned char ucval;
-   unsigned short int uival;
-
-   STORAGE_BYTE_ORDER = table.byte_order;
-
-   key.id = 0L;
-   key.tile = 0L;
-   key.exid = 0L;
-
-   /* just doing this to be consistent */
-   Read_Vpf_Char (&(key.type),table.fp,1);
-
-   switch (TYPE0(key.type)) {
-      case 0:
-	 break;
-      case 1:
-
-	 Read_Vpf_Char (&ucval, table.fp, 1 ) ;
-	 key.id = (ossim_int32)ucval;
-	 break;
-      case 2:
-
-	 Read_Vpf_Short (&uival, table.fp, 1 ) ;
-	 key.id = (ossim_int32)uival;
-	 break;
-      case 3:
-
-	 Read_Vpf_Int (&(key.id), table.fp, 1 ) ;
-	 break;
-   }
-   switch (TYPE1(key.type)) {
-   case 0:
-     break;
-   case 1:
-     Read_Vpf_Char (&ucval, table.fp, 1 ) ;
-     key.tile = (ossim_int32)ucval;
-     break;
-   case 2:
-     Read_Vpf_Short (&uival, table.fp, 1 ) ;
-     key.tile = (ossim_int32)uival;
-     break;
-   case 3:
-     Read_Vpf_Int (&(key.tile), table.fp, 1 ) ;
-     break;
-   }
-
-   switch (TYPE2(key.type)) {
-   case 0:
-     break;
-   case 1:
-     Read_Vpf_Char (&ucval, table.fp, 1 ) ;
-     key.exid = (ossim_int32)ucval;
-     break;
-   case 2:
-     Read_Vpf_Short (&uival, table.fp, 1 ) ;
-     key.exid = (ossim_int32)uival;
-     break;
-   case 3:
-     Read_Vpf_Int (&(key.exid), table.fp, 1 ) ;
-     break;
-   }
-
-   return key;
- }
-
-/*************************************************************************
- *
- *N  read_next_row
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function reads the next row of the table.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    table      <input> == (vpf_table_type) vpf table structure.
- *    return    <output> == (row_type) the next row in the table.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   May 1991       Original Version   DOS Turbo C
- *    Dave Flinn       July 1991      Updated for UNIX
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    void *vpfmalloc()
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-row_type read_next_row( vpf_table_type table )
-{
-   register ossim_int32 i,j;
-   ossim_int32      status;
-   char     *tptr;
-   ossim_int32 size,count;
-   row_type row;
-   id_triplet_type * keys;
-   coordinate_type dummycoord;
-
-   if (feof(table.fp)) {
-      return NULL;
-   }
-
-   STORAGE_BYTE_ORDER = table.byte_order;
-
-   row = (row_type)vpfmalloc((table.nfields+1) * sizeof(column_type));
-
-   for (i=0;i<table.nfields;i++) row[i].ptr = NULL;
-
-   for (i=0;i<table.nfields;i++) {
-      if (table.header[i].count < 0) {
-
-	 Read_Vpf_Int (&count,table.fp,1) ;
-
-      } else {
-	 count = table.header[i].count;
-      }
-      row[i].count = count;
-
-      status = 0;
-      switch (table.header[i].type) {
-	 case 'T':
-	    if (count == 1) {
-	       row[i].ptr = (char *)vpfmalloc(sizeof(char));
-	       Read_Vpf_Char(row[i].ptr, table.fp, 1) ;
-	    } else {
-	       size = count*sizeof(char);
-	       row[i].ptr = (char *)vpfmalloc(size+2);
-	       tptr = (char *)vpfmalloc(size+2);
-	       Read_Vpf_Char(tptr,table.fp,count) ;
-	       tptr[count] = '\0';
-	       strcpy((char*)row[i].ptr,(char*)tptr);
-	       free(tptr);
-	    }
-	    break;
-	 case 'I':
-	    row[i].ptr = (ossim_int32 *)vpfmalloc(count*sizeof(ossim_int32));
-	    Read_Vpf_Int (row[i].ptr, table.fp, count ) ;
-	    break;
-	 case 'S':
-	    row[i].ptr = (short int *)vpfmalloc(count*sizeof(short int));
-	    Read_Vpf_Short (row[i].ptr, table.fp, count ) ;
-	    break;
-	 case 'F':
-	    row[i].ptr = (float *)vpfmalloc(count*sizeof(float));
-	    Read_Vpf_Float (row[i].ptr, table.fp, count ) ;
-	    break;
-	 case 'R':
-	    row[i].ptr = (double *)vpfmalloc(count*sizeof(double));
-	    Read_Vpf_Double (row[i].ptr, table.fp, count ) ;
-	    break;
-	 case 'D':
-	    row[i].ptr = (date_type *)vpfmalloc(count*sizeof(date_type));
-	    Read_Vpf_Date (row[i].ptr, table.fp, count ) ;
-	    break;
-	 case 'C':
-	    /* Coordinate strings may be quite large.          */
-	    /* Allow for null coordinate string pointer if     */
-	    /* not enough memory that can be handled one       */
-	    /* coordinate at a time in higher level functions. */
-	    row[i].ptr = (coordinate_type *)malloc(count*
-			 sizeof(coordinate_type));
-	    if (row[i].ptr)
-	       Read_Vpf_Coordinate(row[i].ptr,table.fp,count);
-	    else
-	       for (j=0;j<count;j++)
-		  Read_Vpf_Coordinate(&dummycoord,table.fp,1);
-	    break;
-	 case 'Z':
-	    row[i].ptr = (tri_coordinate_type *)vpfmalloc(count*
-			 sizeof(tri_coordinate_type));
-	    Read_Vpf_CoordinateZ(row[i].ptr,table.fp,count);
-	    break;
-	 case 'B':
-	    row[i].ptr = (double_coordinate_type *)vpfmalloc(count*
-			 sizeof(double_coordinate_type));
-	    Read_Vpf_DoubleCoordinate(row[i].ptr,table.fp,count);
-	    break;
-	 case 'Y':
-	    row[i].ptr = (double_tri_coordinate_type *)vpfmalloc(count*
-			 sizeof(double_tri_coordinate_type));
-	    Read_Vpf_DoubleCoordinateZ(row[i].ptr,table.fp,count);
-	    break;
-	 case 'K':   /* ID Triplet */
-	    row[i].ptr = (id_triplet_type *)vpfmalloc(count*
-			 sizeof(id_triplet_type));
-	    keys = (id_triplet_type *)vpfmalloc(count*
-		   sizeof(id_triplet_type));
-	    for (j=0;j<count;j++) {
-	       keys[j] = read_key(table);
-	    }
-	    memcpy(row[i].ptr,keys,count*sizeof(id_triplet_type));
-	    free(keys);
-	    break;
-	 case 'X':
-	    row[i].ptr = NULL;
-	    break;
-	  default:
-	    fprintf(stderr,"\n%s%s >>> read_next_row: no such type < %c >",
-		table.path,table.name,table.header[i].type ) ;
-	    status = 1;
-	    break ;
-	  }   /* end of switch */
-      if (status == 1) {
-	 free_row ( row, table ) ;
-	 return (row_type) NULL;
-      }
-   }
-   return row;
-}
-
-/*************************************************************************
- *
- *N  rowcpy
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function returns a copy of the specified row.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    origrow    <input> == (row_type) row to copy.
- *    table      <input> == (vpf_table_type) vpf table structure.
- *    return    <output> == (row_type) copy of the row.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   May 1991                     DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    void *vpfmalloc()                            VPFMISC.C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-row_type rowcpy( row_type origrow,
-		 vpf_table_type table )
-{
-   register ossim_int32 i;
-   ossim_int32      count;
-   ossim_int32 size;
-   row_type row;
-
-   row = (row_type)vpfmalloc(table.nfields * sizeof(column_type));
-   for (i=0;i<table.nfields;i++) {
-      count = origrow[i].count;
-      row[i].count = count;
-      switch (table.header[i].type) {
-	 case 'T':
-	    if (count==1) {
-	       row[i].ptr = (char *)vpfmalloc(1);
-	       memcpy(row[i].ptr,origrow[i].ptr,sizeof(char));
-	    } else {
-	       size = count*sizeof(char);
-	       row[i].ptr = (char *)vpfmalloc(size+1);
-	       strcpy((char*)row[i].ptr,(char*)origrow[i].ptr);
-	    }
-	    break;
-	 case 'I':
-	    size = count*sizeof(ossim_int32);
-	    row[i].ptr = (ossim_int32 *)vpfmalloc(size);
-	    memcpy(row[i].ptr,origrow[i].ptr,size);
-	    break;
-	 case 'S':
-	    size = count*sizeof(short int);
-	    row[i].ptr = (short int *)vpfmalloc(size);
-	    memcpy(row[i].ptr,origrow[i].ptr,size);
-	    break;
-	 case 'F':
-	    size = count*sizeof(float);
-	    row[i].ptr = (float *)vpfmalloc(size);
-	    memcpy(row[i].ptr,origrow[i].ptr,size);
-	    break;
-	 case 'R':
-	    size = count*sizeof(double);
-	    row[i].ptr = (double *)vpfmalloc(size);
-	    memcpy(row[i].ptr,origrow[i].ptr,size);
-	    break;
-	 case 'C':
-	    size = count*sizeof(coordinate_type);
-	    row[i].ptr = (coordinate_type *)malloc(size);
-	    if (row[i].ptr && origrow[i].ptr)
-	       memcpy(row[i].ptr,origrow[i].ptr,size);
-	    else
-	       row[i].ptr = NULL;
-	    break;
-	 case 'Z':
-	    size = count*sizeof(tri_coordinate_type);
-	    row[i].ptr = (tri_coordinate_type *)vpfmalloc(size);
-	    memcpy(row[i].ptr,origrow[i].ptr,size);
-	    break;
-	 case 'B':
-	    size = count*sizeof(double_coordinate_type);
-	    row[i].ptr = (double_coordinate_type *)vpfmalloc(size);
-	    memcpy(row[i].ptr,origrow[i].ptr,size);
-	    break;
-	 case 'Y':
-	    size = count*sizeof(double_tri_coordinate_type);
-	    row[i].ptr = (double_tri_coordinate_type *)vpfmalloc(size);
-	    memcpy(row[i].ptr,origrow[i].ptr,size);
-	    break;
-	 case 'D':  /* Date */
-	    size = count*sizeof(date_type);
-	    row[i].ptr = (date_type *)vpfmalloc(size);
-	    memcpy(row[i].ptr,origrow[i].ptr,size);
-	    break;
-	 case 'K':  /* ID Triplet */
-	    size = count*sizeof(id_triplet_type);
-	    row[i].ptr = (id_triplet_type *)vpfmalloc(size);
-	    memcpy(row[i].ptr,origrow[i].ptr,size);
-	    break;
-	 case 'X':
-	    row[i].ptr = NULL;
-	    break;
-	  default:
-	    fprintf (stderr,"\nrow_cpy: error in data type < %c >",
-		     table.header[i].type ) ;
-	    abort () ;
-	    break ;
-	  }   	/* end of switch */
-    }    	/* end of table.nfields */
-   return row;
-}
-
-/*************************************************************************
- *
- *N  read_row
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function reads a specified row from the table.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    row_number <input> == (ossim_int32) row number.
- *    table      <input> == (vpf_table_type) vpf table structure.
- *    return    <output> == (row_type) row that was read in.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   May 1991      DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    ossim_int32 index_pos()                             VPFTABLE.C
- *    row_type read_next_row()                         VPFTABLE.C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-row_type read_row( ossim_int32 row_number,
-		   vpf_table_type table )
-{
-   ossim_int32 fpos;
-
-   fpos = index_pos(row_number,table);
-
-   fseek(table.fp,fpos,SEEK_SET);
-
-   return read_next_row(table);
-}
-
-/*************************************************************************
- *
- *N  free_row
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function frees the memory that was dynamically allocated for the
- *     specified row.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    row   <input> == (row_type) row to be freed.
- *    table <input> == (vpf_table_type) vpf table structure.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   May 1991                     DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-void free_row( row_type row,
-	       vpf_table_type table)
-{
-   register ossim_int32 i;
-
-   if (!row) return;
-   for (i=0;i<table.nfields;i++)
-      if (row[i].ptr) free(row[i].ptr);
-   free(row);
-}
-
-/*************************************************************************
- *
- *N  get_row
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function returns the specified row of the table.  If the table
- *     is stored in memory, the row is copied from there.  If it is on disk,
- *     it is read and returned.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    row_number <input> == (ossim_int32) row number in range [1 .. table.nrows].
- *    table      <input> == (vpf_table_type) vpf table structure.
- *    return    <output> == (row_type) returned row.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   May 1991      DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    row_type rowcpy                VPFREAD.C
- *    row_type read_row              VPFREAD.C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-row_type get_row( ossim_int32 row_number,
-		  vpf_table_type table )
-{
-   row_type row;
-
-   row_number = max(min(row_number, table.nrows), 1);
-
-   if (table.storage == RAM) {
-      row = rowcpy(table.row[row_number-1],table);
-      return row;
-   } else {
-      return read_row( row_number, table );
-   }
-}
-
-/*************************************************************************
- *
- *N  table_pos
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function returns the column offset of the specified field name
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    field_name <input> == (char *) field name.
- *    table      <input> == (vpf_table_type) VPF table structure.
- *    table_pos  <output> == (ossim_int32) returned column number.
- *                          UNIX returns -1 if not exists
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   May 1991                     DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-ossim_int32 table_pos( const char* field_name, vpf_table_type table )
-{
-   register ossim_int32 i;
-   ossim_int32 col;
-   char altfn[256];
-
-   col = -1;
-   for (i = 0; i < table.nfields; i++) {
-      strcpy(altfn, ",:");
-      strcat(altfn, field_name);
-      if (ossim_strcasecmp(field_name,table.header[i].name) == 0
-	  || ossim_strcasecmp(altfn,table.header[i].name) == 0) {
-	 col = i;
-	 break;
-      }
-   }
-   return col;
-}
-
-/*************************************************************************
- *
- *N  get_table_element
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function returns the element in the given row in the given
- *     column.  If the element is a single element (count=1), the value
- *     is passed back via the void pointer *value; otherwise, an array
- *     is allocated and passed back as the return value.
- *     NOTE: If an array is allocated in this function, it should be freed
- *     when no longer needed.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    field_number <input> == (ossim_int32) field column number.
- *    row          <input> == (row_type) vpf table row.
- *    table        <input> == (vpf_table_type) VPF table structure.
- *    value       <output> == (void *) pointer to a single element value.
- *    count       <output> == (ossim_int32 *) pointer to the array size for a
- *                                    multiple element value.
- *    return      <output> == (void *) returned multiple element value.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   May 1991             DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    void *vpfmalloc()
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-void *get_table_element( ossim_int32 field_number,
-			 row_type row,
-			 vpf_table_type table,
-			 void *value,
-			 ossim_int32  *count )
-{
-   ossim_int32   col;
-   char     * tptr;
-   void     * retvalue;
-
-   retvalue = NULL;
-   col = field_number;
-   if ((col < 0) || (col >= table.nfields)) {
-      fprintf(stderr,"%s: Invalid field number %d\n",
-	      table.name,(int)field_number);
-      return NULL;
-   }
-
-   if (!row) return NULL;
-
-   switch (table.header[col].type) {
-      case 'X':
-	 retvalue = NULL;
-	 break;
-      case 'T':
-	 if (table.header[col].count == 1) {
-	    memcpy(value,row[col].ptr,sizeof(char));
-	 } else {
-	    retvalue = (char *)vpfmalloc((row[col].count+1)*sizeof(char));
-	    tptr = (char *)vpfmalloc((row[col].count+1)*sizeof(char));
-	    memcpy(tptr,row[col].ptr,row[col].count*sizeof(char));
-	    tptr[row[col].count] = '\0';
-	    strcpy((char *)retvalue,tptr);
-	    free(tptr);
-	 }
-	 break;
-      case 'I':
-	 if (table.header[col].count == 1) {
-	    memcpy(value,row[col].ptr,sizeof(ossim_int32));
-	 } else {
-	    retvalue = (ossim_int32 *)vpfmalloc(row[col].count*
-					     sizeof(ossim_int32));
-	    memcpy(retvalue,row[col].ptr,row[col].count*sizeof(ossim_int32));
-	 }
-	 break;
-      case 'S':
-	 if (table.header[col].count == 1) {
-	    memcpy(value,row[col].ptr,sizeof(short int));
-	 } else {
-	    retvalue = (short int *)vpfmalloc(row[col].count*
-					     sizeof(short int));
-	    memcpy(retvalue,row[col].ptr,row[col].count*sizeof(short int));
-	 }
-	 break;
-      case 'F':
-	 if (table.header[col].count == 1) {
-	    memcpy(value,row[col].ptr,sizeof(float));
-	 } else {
-	    retvalue = (float *)vpfmalloc(row[col].count*sizeof(float));
-	    memcpy(retvalue,row[col].ptr,row[col].count*sizeof(float));
-	 }
-	 break;
-      case 'R':
-	 if (table.header[col].count == 1) {
-	    memcpy(value,row[col].ptr,sizeof(double));
-	 } else {
-	    retvalue = (double *)vpfmalloc(row[col].count*sizeof(double));
-	    memcpy(retvalue,row[col].ptr,row[col].count*sizeof(double));
-	 }
-	 break;
-      case 'C':
-	 if (table.header[col].count == 1) {
-	    memcpy(value,row[col].ptr,sizeof(coordinate_type));
-	 } else {
-	    if (row[col].ptr) {
-	       retvalue = (coordinate_type *)malloc(row[col].count*
-			  sizeof(coordinate_type));
-	       if (retvalue)
-		  memcpy(retvalue,row[col].ptr,row[col].count*
-			 sizeof(coordinate_type));
-	    } else {
-	       retvalue = NULL;
-	    }
-	 }
-	 break;
-      case 'Z':
-	 if (table.header[col].count == 1) {
-	    memcpy(value,row[col].ptr,sizeof(tri_coordinate_type));
-	 } else {
-	    retvalue = (tri_coordinate_type *)vpfmalloc(row[col].count*
-			sizeof(tri_coordinate_type));
-	    memcpy(retvalue,row[col].ptr,row[col].count*
-		    sizeof(tri_coordinate_type));
-	 }
-	 break;
-      case 'B':
-	 if (table.header[col].count == 1) {
-	    memcpy(value,row[col].ptr,sizeof(double_coordinate_type));
-	 } else {
-	    retvalue = (double_coordinate_type *)vpfmalloc(row[col].count*
-			sizeof(double_coordinate_type));
-	    memcpy(retvalue,row[col].ptr,row[col].count*
-		    sizeof(double_coordinate_type));
-	 }
-	 break;
-      case 'Y':
-	 if (table.header[col].count == 1) {
-	    memcpy(value,row[col].ptr,sizeof(double_tri_coordinate_type));
-	 } else {
-	    retvalue = (double_tri_coordinate_type *)vpfmalloc(row[col].count*
-			sizeof(double_tri_coordinate_type));
-	    memcpy(retvalue,row[col].ptr,row[col].count*
-		    sizeof(double_tri_coordinate_type));
-	 }
-	 break ;
-      case 'D':
-	 if (table.header[col].count == 1) {
-	    memcpy(value,row[col].ptr,sizeof(date_type));
-	 } else {
-	    retvalue = (date_type *)vpfmalloc(row[col].count*
-					      sizeof(date_type));
-	    memcpy(retvalue,row[col].ptr,row[col].count*
-					  sizeof(date_type));
-	 }
-	 break;
-      case 'K':  /* ID Triplet */
-	 if (table.header[col].count == 1) {
-	    memcpy(value,row[col].ptr,sizeof(id_triplet_type));
-	 } else {
-	    retvalue = (id_triplet_type *)vpfmalloc(row[col].count*
-					      sizeof(id_triplet_type));
-	    memcpy(retvalue,row[col].ptr,row[col].count*
-					  sizeof(id_triplet_type));
-	 }
-	 break;
-   }
-   *count = row[col].count;
-
-   return retvalue;
-}
-
-/*************************************************************************
- *
- *N  named_table_element
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function returns the element in the specified row in the column
- *     matching the given field name.  If the element is a single element
- *     (count=1), the value is passed back via the void pointer *value;
- *     otherwise, an array is allocated and passed back as the return value.
- *     NOTE: If an array is allocated in this function, it should be freed
- *     when no longer needed.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    field_name <input> == (char *) field name.
- *    row_number <input> == (ossim_int32) row_number.
- *    table      <input> == (vpf_table_type) VPF table structure.
- *    value     <output> == (void *) pointer to a single element value.
- *    count     <output> == (ossim_int32 *) pointer to the array size for a multiple
- *                                  element value.
- *    return    <output> == (void *) returned multiple element value.
- *                          or NULL if field_name could not be found
- *                          as a column
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   May 1991                     DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    void *vpfmalloc()                    VPFREAD.C
- *    row_type get_row()                   VPFREAD.C
- *    void free_row()                      VPFREAD.C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-void *named_table_element( char           * field_name,
-			   ossim_int32         row_number,
-			   vpf_table_type   table,
-			   void           * value,
-			   ossim_int32       * count )
-{
-   ossim_int32     col;
-   row_type     row;
-   void       * retvalue;
-
-   col = table_pos(field_name, table);
-
-   if (col < 0) {
-      fprintf(stderr,"%s: Invalid field name <%s>\n",table.name,field_name);
-      return NULL;
-   }
-   row = get_row(row_number,table);
-
-   retvalue = get_table_element( col, row, table, value, count );
-
-   free_row(row, table);
-
-   return retvalue;
-}
-
-/*************************************************************************
- *
- *N  table_element
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function returns the element in the specified row in the column
- *     matching the given field number.  If the element is a single element
- *     (count=1), the value is passed back via the void pointer *value;
- *     otherwise, an array is allocated and passed back as the return value.
- *     NOTE: If an array is allocated in this function, it should be freed
- *     when no longer needed.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    field_number <input> == (ossim_int32) field number (offset from
- *                                   first field in table).
- *    row_number <input> == (ossim_int32) row_number.
- *    table      <input> == (vpf_table_type) VPF table structure.
- *    value     <output> == (void *) pointer to a single element value.
- *    count     <output> == (ossim_int32 *) pointer to the array size for a multiple
- *                                  element value.
- *    return    <output> == (void *) returned multiple element value or
- *                          NULL of the field number is invalid
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   May 1991                     DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    row_type get_row()                   VPFREAD.C
- *    void free_row()                      VPFREAD.C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-void *table_element( ossim_int32         field_number,
-		     ossim_int32         row_number,
-		     vpf_table_type   table,
-		     void           * value,
-		     ossim_int32       * count )
-{
-   row_type    row;
-   void      * retvalue;
-
-   row      = get_row(row_number, table);
-   retvalue = get_table_element(field_number, row, table, value, count);
-   free_row(row,table);
-
-   return retvalue;
-}
diff --git a/src/ossim/vpfutil/vpfrelat.c b/src/ossim/vpfutil/vpfrelat.c
deleted file mode 100644
index 69922e8..0000000
--- a/src/ossim/vpfutil/vpfrelat.c
+++ /dev/null
@@ -1,904 +0,0 @@
-/***************************************************************************
- *
- *N  Module VPFRELAT.C
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *    This module contains functions supporting relates between VPF
- *    feature classes and primitives (and vice versa).  It relies
- *    upon the information provided by the Feature Class Schema table.
- *    This table is used to generate a feature class relationship (fcrel)
- *    data structure for a feature class.  This structure contains all
- *    of the tables and their primary and foreign keys for the
- *    relationships between a feature table and its primitive, or
- *    from a primitive to its feature table (each relate chain is one way).
- *    This module tries to be as much of a black box as it can to
- *    enable a programmer to simply return the corresponding primitive
- *    row of a feature record, or the corresponding feature row of a
- *    primitive record.
- *
- *    This is one of the most difficult modules required to support
- *    a truly 'generic' VPF application, since VPF allows so many
- *    variations of feature-primitive relationships.  The final version
- *    of this module must support every allowed relationship.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels
- *
- *    Added one-to-many relates 3/2/92 - BJM
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- **************************************************************************/
-#include <stdio.h>
-#include <stdlib.h>
-
-#ifdef __MSDOS__
-#include <alloc.h>
-#include <mem.h>
-#else
-#ifdef __APPLE__ 
-#include <sys/types.h>
-#include <sys/malloc.h>
-#else
-#ifndef __FreeBSD__
-#include <malloc.h>
-#include <string.h>
-#endif
-#endif
-#endif
-
-
-#if defined(__CYGWIN__)||defined(__APPLE__)|| defined(_WIN32)
-#include <ossim/vpfutil/values.h>
-#else
-#include <ossim/vpfutil/values.h>
-#endif
-#include <string.h>
-#include <stdarg.h>
-#include <ossim/vpfutil/vpftable.h>
-#include <ossim/vpfutil/vpfview.h>
-#include <ossim/vpfutil/vpfrelat.h>
-#include <ossim/vpfutil/vpftidx.h>
-
-/* Determine if the given table name is in the given list of */
-/* vpf relate structures.				     */
-static int table_in_list( char *tablename, linked_list_type rlist )
-{
-   position_type p;
-   vpf_relate_struct rcell;
-
-   p = ll_first(rlist);
-   while (!ll_end(p)) {
-      ll_element(p,&rcell);
-      if (strcmp(rcell.table1,tablename)==0) return 1;
-      p = ll_next(p);
-   }
-   return 0;
-}
-
-/**************************************************************************
- *
- *N  fcs_relate_list
- *
- *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *    Read the feature class schema table and create the list of
- *    tables to chain through.
- *E
- *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    fcname       <input> == (char *) feature class name.
- *    start_table  <input> == (char *) table to start from.
- *    end_table    <input> == (char *) table to end with.
- *    fcs          <input> == (vpf_table_type) feature class schema table.
- *    fcs_relate_list <output> == (linked_list_type) list of tables to
- *                                chain through.
- *E
- *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels  DOS Turbo C
- *E
- *************************************************************************/
-linked_list_type fcs_relate_list( char *fcname, char *start_table,
-				  char *end_table, vpf_table_type fcs )
-{
-   linked_list_type rlist;
-   vpf_relate_struct rstruct;
-   set_type fcset, set1, set2;
-   char tablename[255], *buf, expr[255];
-   row_type row;
-   ossim_int32 rownum,n;
-   int TABLE1_, KEY1_, TABLE2_, KEY2_;
-
-   rlist = ll_init();
-
-   sprintf(expr,"FEATURE_CLASS = %s",fcname);
-
-   fcset = query_table(expr,fcs);
-
-   if (set_empty(fcset)) {
-      set_nuke(&fcset);
-      return rlist;
-   }
-
-   TABLE1_ = table_pos("TABLE1",fcs);
-   KEY1_ = table_pos("FOREIGN_KEY",fcs);
-   if (KEY1_ < 0) KEY1_ = table_pos("TABLE1_KEY",fcs);
-   TABLE2_ = table_pos("TABLE2",fcs);
-   KEY2_ = table_pos("PRIMARY_KEY",fcs);
-   if (KEY2_ < 0) KEY2_ = table_pos("TABLE2_KEY",fcs);
-
-   strcpy( tablename, start_table );
-   while (1) {
-      sprintf(expr,"TABLE1 = %s",tablename);
-
-      set1 = query_table(expr,fcs);
-      set2 = set_intersection(set1,fcset);
-      set_nuke(&set1);
-      if (set_empty(set2)) {
-	 set_nuke(&fcset);
-	 set_nuke(&set2);
-	 return rlist;
-      }
-      rownum = set_min(set2);
-
-      set_nuke(&set2);
-
-      row = get_row(rownum,fcs);
-
-      buf = (char *)get_table_element(TABLE1_,row,fcs,NULL,&n);
-      strcpy(rstruct.table1,buf);
-      rightjust(rstruct.table1);
-      free(buf);
-
-      buf = (char *)get_table_element(KEY1_,row,fcs,NULL,&n);
-      strcpy(rstruct.key1,buf);
-      rightjust(rstruct.key1);
-      free(buf);
-
-      buf = (char *)get_table_element(TABLE2_,row,fcs,NULL,&n);
-      strcpy(rstruct.table2,buf);
-      rightjust(rstruct.table2);
-      free(buf);
-
-      buf = (char *)get_table_element(KEY2_,row,fcs,NULL,&n);
-      strcpy(rstruct.key2,buf);
-      rightjust(rstruct.key2);
-      free(buf);
-
-      rstruct.degree = R_ONE;  /* Default */
-
-      free_row( row, fcs );
-
-      if (table_in_list(rstruct.table1, rlist)) break;
-
-      ll_insert( &rstruct, sizeof(rstruct), ll_last(rlist) );
-
-      strcpy( tablename, rstruct.table2 );
-
-      if (ossim_strcasecmp(tablename,end_table)==0) break;
-   }
-
-   set_nuke(&fcset);
-
-   return rlist;
-}
-
-
-/**************************************************************************
- *
- *N  vpf_binary_search
- *
- *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *    This function performs a binary search on a VPF table for the
- *    specified integer value.  Only VPF data type 'I' is supported.
- *    The table must be sorted on the specified field, or this function
- *    will give unpredictable results.  The table must have been
- *    successfully opened.  If more than one row matches the search
- *    value, only the first encountered will be returned.
- *E
- *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    srchval <input> == (ossim_int32) specified search value.
- *    field   <input> == (int) table sort field.
- *    table   <input> == (vpf_table_type) VPF table.
- *    vpf_binary_search <output> == (ossim_int32) first matching row.
- *E
- *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels  DOS Turbo C
- *E
- *************************************************************************/
-ossim_int32 vpf_binary_search( ossim_int32 srchval,
-			    int field,
-			    vpf_table_type table )
-{
-   ossim_int32 left,right, ival, rowid, n;
-   row_type row;
-
-   left = 1;
-   right = table.nrows;
-
-   do {
-      rowid = (left+right)/2;
-      row = get_row(rowid,table);
-      get_table_element(field,row,table,&ival,&n);
-      free_row(row,table);
-      if (ival < srchval)
-	 right = rowid-1;
-      else
-	 left = rowid+1;
-   } while ((srchval != ival) && (left <= right));
-
-   if (srchval != ival) rowid = 0;
-
-   return rowid;
-}
-
-
-/**************************************************************************
- *
- *N  related_row
- *
- *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *    Return the related row of table2 based upon the value of table 1's key
- *    Table 2 must be the '1' side of an n:1 relationship  --  If it isn't,
- *    use 'related_rows()'.
- *    Supported data types - I and T<n>.
- *    Binary search supported only for data type I. (column must be sorted)
- *E
- *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels  DOS Turbo C
- *E
- *************************************************************************/
-ossim_int32 related_row( void *keyval1,
-		      vpf_table_type table2, char *key2,
-		      int sort_flag )
-{
-   ossim_int32 rowid, i, ival, kval, n;
-   row_type row;
-   int KEY2_;
-   char cval, *tval;
-
-   if (ossim_strcasecmp(key2,"ID")==0) {
-      memcpy( &rowid, keyval1, sizeof(rowid) );
-      return rowid;
-   }
-
-   rowid = 0;
-
-   KEY2_ = table_pos(key2,table2);
-
-   if ((table2.header[KEY2_].type != 'I')&&
-       (table2.header[KEY2_].type != 'T')) return rowid;
-
-   if ((table2.header[KEY2_].type == 'I')&&
-       (table2.header[KEY2_].count != 1)) return rowid;
-
-   if ((table2.header[KEY2_].type == 'T')&&(sort_flag)) sort_flag = 0;
-
-   if (table2.header[KEY2_].type == 'I') memcpy(&kval,keyval1,sizeof(kval));
-
-   if (!sort_flag) {   /* Sequential search */
-
-      for (i=1;i<=table2.nrows;i++) {
-	 row = get_row(i,table2);
-	 if (table2.header[KEY2_].type == 'I') {
-	    get_table_element(KEY2_,row,table2,&ival,&n);
-	    if (ival == kval) rowid = i;
-	 } else {
-	    if (table2.header[KEY2_].count==1) {
-	       get_table_element(KEY2_,row,table2,&cval,&n);
-	       if (memcmp(&cval,keyval1,sizeof(ival))==0) rowid = i;
-	    } else {
-	       tval = (char*)get_table_element(KEY2_,row,table2,NULL,&n);
-	       if (strcmp(tval,(char *)keyval1)==0) rowid = i;
-	    }
-	 }
-	 free_row(row,table2);
-	 if (rowid > 0) break;
-      }
-
-   } else {   /* Binary search */
-
-      memcpy(&kval,keyval1,sizeof(kval));
-      rowid = vpf_binary_search( kval, KEY2_, table2 );
-
-   }
-
-   return rowid;
-}
-
-
-/**************************************************************************
- *
- *N  related_rows
- *
- *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *    Return the list of related rows of table2 based upon the value of
- *    table 1's key.
- *    Supported data types - I and T<n>.
- *    Binary search supported only for data type I. (column must be sorted)
- *    Thematic index used, if present on key column.
- *    NOTE: A sequential search operation will search the entire
- *          table ...zzz...
- *E
- *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels  DOS Turbo C
- *E
- *************************************************************************/
-linked_list_type related_rows( void *keyval1,
-		       vpf_table_type table2, char *key2,
-		       int sort_flag,
-		       ThematicIndex *idx )
-{
-   linked_list_type rowlist;
-   set_type rowset;
-   ossim_int32 rowid, i, ival, kval, n, start,end;
-   row_type row = 0;
-   int KEY2_;
-   char cval, *tval;
-
-   rowlist = ll_init();
-
-   if (ossim_strcasecmp(key2,"ID")==0) {
-      memcpy( &rowid, keyval1, sizeof(rowid) );
-      ll_insert(&rowid,sizeof(rowid),rowlist);
-      return rowlist;
-   }
-
-   KEY2_ = table_pos(key2,table2);
-
-   if ((table2.header[KEY2_].type != 'I')&&
-       (table2.header[KEY2_].type != 'T')) return rowlist;
-
-   if ((table2.header[KEY2_].type == 'I')&&
-       (table2.header[KEY2_].count != 1)) return rowlist;
-
-   if ((table2.header[KEY2_].type == 'T')&&(sort_flag)) sort_flag = 0;
-
-   if (idx) {
-      if (idx->fp) {
-	 rowset = search_thematic_index(idx,(char *)keyval1);
-	 start = set_min(rowset);
-	 end = set_max(rowset);
-	 for (i=start;i<=end;i++)
-	    if (set_member(i,rowset)) {
-	       ll_insert(&i,sizeof(i),ll_last(rowlist));
-	    }
-	 set_nuke(&rowset);
-	 return rowlist;
-      }
-   }
-
-   if (!sort_flag) {   /* Sequential search */
-
-      for (i=1;i<=table2.nrows;i++) {
-	 row = get_row(i,table2);
-	 if (table2.header[KEY2_].type == 'I') {
-	    get_table_element(KEY2_,row,table2,&ival,&n);
-	    if (memcmp(&ival,keyval1,sizeof(ival))==0)
-	       ll_insert(&i,sizeof(i),ll_last(rowlist));
-	 } else {
-	    if (table2.header[KEY2_].count==1) {
-	       get_table_element(KEY2_,row,table2,&cval,&n);
-	       if (memcmp(&cval,keyval1,sizeof(ival))==0)
-		  ll_insert(&i,sizeof(i),ll_last(rowlist));
-	    } else {
-	       tval = (char*)get_table_element(KEY2_,row,table2,NULL,&n);
-	       if (strcmp(tval,(char *)keyval1)==0)
-		  ll_insert(&i,sizeof(i),ll_last(rowlist));
-	    }
-	 }
-	 free_row(row,table2);
-      }
-
-   } else {   /* Binary search */
-
-      memcpy(&kval,keyval1,sizeof(kval));
-      rowid = vpf_binary_search( kval, KEY2_, table2 );
-
-      if (rowid > 0) {
-	 ll_insert(&rowid,sizeof(rowid),ll_last(rowlist));
-	 i = rowid-1L;
-	 do {
-	    get_row(i,table2);
-	    get_table_element(KEY2_,row,table2,&ival,&n);
-	    if (ival == kval)
-	       ll_insert(&i,sizeof(i),ll_last(rowlist));
-	    i--;
-	 } while ((ival==kval)&&(i>0));
-	 i = rowid+1L;
-	 do {
-	    get_row(i,table2);
-	    get_table_element(KEY2_,row,table2,&ival,&n);
-	    if (ival == kval)
-	       ll_insert(&i,sizeof(i),ll_last(rowlist));
-	    i++;
-	 } while ((ival==kval)&&(i<=table2.nrows));
-      }
-
-   }
-
-   return rowlist;
-}
-
-
-/**************************************************************************
- *
- *N  vpf_nullify_table
- *
- *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *    Nullify the given VPF table structure.
- *E
- *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels  DOS Turbo C
- *E
- *************************************************************************/
-void vpf_nullify_table( vpf_table_type *table )
-{
-   strcpy(table->name,"");
-   table->path = NULL;
-   table->nfields = 0;
-   strcpy(table->description,"");
-   strcpy(table->narrative,"");
-   table->header = NULL;
-   table->xfp = NULL;
-   table->index = NULL;
-   table->xstorage = (storage_type)0;
-   table->fp = NULL;
-   table->nrows = 0;
-   table->row = NULL;
-   table->reclen = 0;
-   table->ddlen = 0;
-   table->defstr = NULL;
-   table->storage = (storage_type)0;
-   table->mode = (file_mode)0;
-   table->status = CLOSED;
-}
-
-
-/**************************************************************************
- *
- *N  select_feature_class_relate
- *
- *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *    Set up the relationships between features and primitives or between
- *    primitives and features (one way only) for a specified feature class.
- *E
- *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels  DOS Turbo C
- *E
- *************************************************************************/
-fcrel_type select_feature_class_relate( int fcnum,
-					library_type *library,
-					char *start_table,
-					char *end_table )
-{
-   int storage, cov;
-   vpf_table_type fcs;
-   ossim_int32 i;
-   char path[255], covpath[255];
-   position_type p;
-   vpf_relate_struct rcell;
-   fcrel_type fcrel;
-
-   fcrel.nchain = 0;
-   fcrel.table = NULL;
-   fcrel.relate_list = NULL;
-
-   cov = library->fc[fcnum].coverage;
-   strcpy(covpath,library->cover[cov].path);
-   rightjust(covpath);
-   sprintf( path, "%sfcs", covpath );
-
-   /* Feature Class Schema table */
-   fcs = vpf_open_table( path, disk, "rb", NULL );
-
-   fcrel.relate_list = fcs_relate_list( library->fc[fcnum].name,
-					start_table,end_table,
-					fcs );
-
-   if (ll_empty(fcrel.relate_list)) {
-      ll_reset(fcrel.relate_list);
-      displaymessage("ERROR in feature class relationship!",
-		     start_table,end_table,NULL);
-      return fcrel;
-   }
-
-   /* Find the number of tables in the relate chain */
-   p = ll_first(fcrel.relate_list);
-   fcrel.nchain = 0;
-   while (!ll_end(p)) {
-      fcrel.nchain++;
-      p = ll_next(p);
-   }
-   /* Allow for last table2 */
-   fcrel.nchain++;
-
-   fcrel.table = (vpf_table_type *)
-		  vpfmalloc((fcrel.nchain+1)*
-			     sizeof(vpf_table_type));
-
-   for (i=0;i<fcrel.nchain+1;i++)
-      vpf_nullify_table( &(fcrel.table[i]) );
-
-
-   p = ll_first(fcrel.relate_list);
-   for (i=0;i<fcrel.nchain-1;i++) {
-
-      ll_element(p,&rcell);
-
-      /** Can't open primitive table - may be several under tile **/
-      /** directories.  Open all others **/
-      if (!is_primitive(rcell.table1)) {
-
-	 sprintf(path,"%s%s",covpath,rcell.table1);
-	 if (is_join(rcell.table1))
-	    storage = ram;
-	 else
-	    storage = disk;
-
-	 fcrel.table[i] = vpf_open_table(path,(storage_type)storage,"rb",NULL);
-
-      }
-
-      if (!ll_end(p)) p = ll_next(p);
-   }
-
-   /* End of relate chain */
-   i = fcrel.nchain-1;
-   if (!is_primitive(rcell.table2)) {
-
-      sprintf(path,"%s%s",covpath,rcell.table2);
-      storage = disk;
-
-      fcrel.table[i] = vpf_open_table(path,(storage_type)storage,"rb",NULL);
-
-   }
-
-
-   vpf_close_table( &fcs );
-
-   return fcrel;
-}
-
-
-/**************************************************************************
- *
- *N  fc_row_number
- *
- *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *    Given the starting row of a feature class relationship, return the
- *    row number of the table at the end of the feature class relate
- *    chain.
- *    If your relate goes from the feature to the primitive, this will
- *    return the primitive id for the given feature row.
- *    If your relate goes from the primitive to the feature, this will
- *    return the feature id of the given primitive row.
- *
- *    Currently only supports relates on 'I' or 'K' fields.
- *E
- *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels  DOS Turbo C
- *E
- *************************************************************************/
-ossim_int32 fc_row_number( row_type row, fcrel_type fcrel, ossim_int32 tile )
-{
-   row_type relrow;
-   ossim_int32 count;
-   ossim_int32 i, rownum, keyval;
-   id_triplet_type triplet_keyval;
-   int KEY1_, KEY_;
-   position_type p;
-   vpf_relate_struct rcell;
-
-   p = ll_first(fcrel.relate_list);
-   ll_element(p,&rcell);
-   KEY1_ = table_pos(rcell.key1,fcrel.table[0]);
-
-   get_table_element(0,row,fcrel.table[0],&rownum,&count);
-
-   if (KEY1_ == 0) {     /* "ID" */
-      keyval = rownum;
-   } else {
-      switch (fcrel.table[0].header[KEY1_].type) {
-	 case 'I':
-	    get_table_element(KEY1_,row,fcrel.table[0],&keyval,&count);
-	    break;
-	 case 'K':
-	    get_table_element(KEY1_,row,fcrel.table[0],&triplet_keyval,
-			      &count);
-	    keyval = triplet_keyval.exid;
-	    if (tile != triplet_keyval.tile) {
-	       return -2;
-	    }
-	    break;
-	 default:
-	    keyval = 0;
-	    break;
-      }
-   }
-
-   p = ll_first(fcrel.relate_list);
-   for (i=1;i<(fcrel.nchain-1);i++) {
-      /* Relate through Join table(s) */
-      rownum = related_row(&keyval,fcrel.table[i],rcell.key2,0);
-      relrow = get_row(rownum,fcrel.table[i]);
-
-      p = ll_next(p);
-      ll_element(p,&rcell);
-      KEY_ = table_pos(rcell.key1,fcrel.table[i]);
-
-      if (KEY_ == 0) {     /* "ID" */
-	 keyval = rownum;
-      } else {
-	 switch (fcrel.table[i].header[KEY_].type) {
-	 case 'I':
-	    get_table_element(KEY_,relrow,fcrel.table[i],&keyval,&count);
-	    break;
-	 case 'K':
-	    get_table_element(KEY_,relrow,fcrel.table[i],&triplet_keyval,
-			      &count);
-	    keyval = triplet_keyval.exid;
-	    if (tile != triplet_keyval.tile) {
-	       return -2;
-	    }
-	    break;
-	 default:
-	    keyval = 0;
-	    break;
-	 }
-      }
-
-      free_row(relrow,fcrel.table[i]);
-   }
-
-   if (ossim_strcasecmp(rcell.key2,"ID")==0)
-      rownum = keyval;
-   else
-      rownum = related_row(&keyval,fcrel.table[i],rcell.key2,0);
-
-   return rownum;
-}
-
-
-/**************************************************************************
- *
- *N  fc_row_numbers
- *
- *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *    Given the starting row of a feature class relationship, return the
- *    list of row numbers of the table at the end of the feature class
- *    relate chain.
- *    If your relate goes from the feature to the primitive, this will
- *    return the primitive ids for the given feature row.
- *    If your relate goes from the primitive to the feature, this will
- *    return the feature ids of the given primitive row.
- *
- *    Currently only supports relates on 'I' or 'K' fields.
- *E
- *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels  DOS Turbo C
- *E
- *************************************************************************/
-linked_list_type fc_row_numbers( row_type row,
-				 fcrel_type fcrel,
-				 ossim_int32 tile,
-				 ThematicIndex *idx )
-{
-   row_type relrow;
-   ossim_int32 count;
-   ossim_int32 n, rownum, keyval;
-   id_triplet_type triplet_keyval;
-   int KEY1_, KEY_;
-   position_type p, prow, pkey;
-   vpf_relate_struct rcell;
-   linked_list_type rowlist, keylist, templist;
-
-   p = ll_first(fcrel.relate_list);
-   ll_element(p,&rcell);
-   KEY1_ = table_pos(rcell.key1,fcrel.table[0]);
-
-   get_table_element(0,row,fcrel.table[0],&rownum,&count);
-
-   if (KEY1_ == 0) {     /* "ID" */
-      keyval = rownum;
-   } else {
-      switch (fcrel.table[0].header[KEY1_].type) {
-	 case 'I':
-	    get_table_element(KEY1_,row,fcrel.table[0],&keyval,&count);
-	    break;
-	 case 'K':
-	    get_table_element(KEY1_,row,fcrel.table[0],&triplet_keyval,
-			      &count);
-	    keyval = triplet_keyval.exid;
-	    if (tile != triplet_keyval.tile) {
-	       keyval = -2;
-	    }
-	    break;
-	 default:
-	    keyval = 0;
-	    break;
-      }
-   }
-
-   keylist = ll_init();
-   ll_insert(&keyval,sizeof(keyval),keylist);
-
-   n = 0;
-
-   p = ll_first(fcrel.relate_list);
-   for (n=1;n<(fcrel.nchain-1);n++) {
-
-      /* Relate through Join table(s) */
-
-      rowlist = ll_init();
-      pkey = ll_first(keylist);
-      while (!ll_end(pkey)) {
-	 ll_element(pkey,&keyval);
-	 templist = related_rows(&keyval,fcrel.table[n],rcell.key2,0,NULL);
-	 prow = ll_first(templist);
-	 while (!ll_end(prow)) {
-	    ll_element(prow,&rownum);
-	    if (!ll_locate(&rownum,rowlist))
-	       ll_insert(&rownum,sizeof(rownum),ll_last(rowlist));
-	    prow = ll_next(prow);
-	 }
-	 ll_reset(templist);
-	 pkey = ll_next(pkey);
-      }
-      ll_reset(keylist);
-
-      p = ll_next(p);
-      ll_element(p,&rcell);
-      KEY_ = table_pos(rcell.key1,fcrel.table[n]);
-
-      keylist = ll_init();
-      prow = ll_first(rowlist);
-      while (!ll_end(prow)) {
-	 ll_element(prow,&rownum);
-	 relrow = get_row(rownum,fcrel.table[n]);
-
-	 if (KEY_ == 0) {     /* "ID" */
-	    keyval = rownum;
-	 } else {
-	    switch (fcrel.table[n].header[KEY_].type) {
-	    case 'I':
-	       get_table_element(KEY_,relrow,fcrel.table[n],&keyval,&count);
-	       break;
-	    case 'K':
-	       get_table_element(KEY_,relrow,fcrel.table[n],&triplet_keyval,
-				 &count);
-	       keyval = triplet_keyval.exid;
-	       if (tile != triplet_keyval.tile) {
-		  keyval = -2;
-	       }
-	       break;
-	    default:
-	       keyval = 0;
-	       break;
-	    }
-	 }
-	 if (keyval > 0)
-	    ll_insert(&keyval,sizeof(keyval),ll_last(keylist));
-	 prow = ll_next(prow);
-	 free_row(relrow,fcrel.table[n]);
-      }
-      ll_reset(rowlist);
-   }
-
-   rowlist = ll_init();
-   p = ll_first(keylist);
-   while (!ll_end(p)) {
-      ll_element(p,&keyval);
-      templist = related_rows(&keyval,fcrel.table[n],rcell.key2,0,idx);
-      prow = ll_first(templist);
-      while (!ll_end(prow)) {
-	 ll_element(prow,&rownum);
-	 if (!ll_locate(&rownum,rowlist))
-	    ll_insert(&rownum,sizeof(rownum),ll_last(rowlist));
-	 prow = ll_next(prow);
-      }
-      ll_reset(templist);
-      p = ll_next(p);
-   }
-   ll_reset(keylist);
-
-   return rowlist;
-}
-
-
-/**************************************************************************
- *
- *N  deselect_feature_class_relate
- *
- *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *    Clear out a previously allocated feature class relate structure
- *    from memory.
- *E
- *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels  DOS Turbo C
- *E
- *************************************************************************/
-void deselect_feature_class_relate( fcrel_type *fcrel )
-{
-   register int i;
-
-   if (fcrel->nchain > 0) {
-      for (i=0;i<fcrel->nchain;i++) {
-	 if (fcrel->table[i].status == OPENED) {
-	    vpf_close_table(&(fcrel->table[i]));
-	 }
-      }
-      free(fcrel->table);
-      ll_reset(fcrel->relate_list);
-   }
-   fcrel->nchain = 0;
-}
-
diff --git a/src/ossim/vpfutil/vpftable.c b/src/ossim/vpfutil/vpftable.c
deleted file mode 100644
index 1b548da..0000000
--- a/src/ossim/vpfutil/vpftable.c
+++ /dev/null
@@ -1,1082 +0,0 @@
-/*************************************************************************
- *
- * Environmental Systems Research Institute (ESRI) Applications Programming
- *
- *N  Module VPFTABLE.C
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This module contains functions to open, close and parse VPF relational
- *     tables.  VPF tables are defined as being a set of rows and columns.
- *     Each column may contain a single value, a fixed array of values,
- *     or a variable number of values.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    N/A
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   April 1991  - DOS Turbo C.
- *    Mody Buchbinder  May 1991    - Modified parse_data_def for new table
- *                                   header structure.
- *    Dave Flinn       July 1991   - Updated file for UNIX.
- *    JTB              10/91       - split off read routines into vpfread.c
- *                                   merged view and converter branches of
- *                                   this module; replaced various aborts()
- *                                   and exits with return codes
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    (function) displayerror(char *text[], int nlines) - function
- *       specified by the application to display a message to the user.
- *       It should return an integer indicating whether to retry (1) or
- *       not (0).
- *    FILE *errorfp - file pointer to error file.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    N/A
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *    Updated to port to UNIX platforms with big-endian architectures
- *E
- *************************************************************************/
-
-#include <ossim/vpfutil/machine.h>
-#ifdef CARBON
-#define MACHINE_BYTE_ORDER 0
-#endif
-
-#ifdef __MSDOS__
-#include <mem.h>
-#include <io.h>
-#include <alloc.h>
-#include <dos.h>
-#include <graphics.h>
-#else
-#ifndef _WIN32
-#define UNIX 1
-#include <unistd.h>
-#endif
-#endif
-
-#if UNIX
-#include <sys/stat.h>
-#include <sys/types.h>
-#define   getch()               /* Make this a null function */
-#define   farcoreleft()	" "
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <ossim/vpfutil/values.h>
-#include <ossim/vpfutil/vpftable.h>
-#include <ossim/vpfutil/vpftidx.h>
-#include <ossim/vpfutil/vpfmisc.h>
-
-#ifndef __64K
-#define __64K 65536
-#endif
-
-/*
- * per heap block byte overhead
- */
-#define HEAP_OVERHEAD 4
-
-/* Global variable shared by VPFTABLE.C, VPFREAD.C, and VPFWRITE.C  */
-/* The above modules are logically one, only separated by file size */
-/* constraints. */
-int STORAGE_BYTE_ORDER = LEAST_SIGNIFICANT;  /* default */
-
-
-int  vpfutilMachineByteOrder()
-{
-   unsigned short  test = 0x0001;
-   unsigned char*  testPtr=NULL;
-   
-   testPtr       = (unsigned char*)(&test);
-   return (testPtr[0] ? LEAST_SIGNIFICANT : MOST_SIGNIFICANT);
-}
-
-/* Include these to decrease external module dependencies */
-
-#if 0 /* Defined in vpfmisc??? (drb) */
-static char *rightjust( char *str )
-{
-   register int  len,i;
-
-   len = strlen(str);
-   i = len - 1;
-   while ((i>0) && ((str[i]==0) || (str[i]==' '))) i--;
-   if (i < (len-1)) str[i+1] = '\0';
-   for (i=0;i<strlen(str);i++) if (str[i]=='\n') str[i] = '\0';
-   return str;
-}
-#endif
-
-
-
-void swap_two ( char *in, char *out )
-{
-  out[0] = in[1] ;
-  out[1] = in[0] ;
-}
-
-void swap_four ( char *in, char *out )
-{
-  out[0] = in[3] ;
-  out[1] = in[2] ;
-  out[2] = in[1] ;
-  out[3] = in[0] ;
-}
-
-void swap_eight ( char *in, char *out )
-{
-  out[0] = in[7] ;
-  out[1] = in[6] ;
-  out[2] = in[5] ;
-  out[3] = in[4] ;
-  out[4] = in[3] ;
-  out[5] = in[2] ;
-  out[6] = in[1] ;
-  out[7] = in[0] ;
-}
-
-/* Return floating point Not a Number (for NULL values) */
-double quiet_nan( int unused )
-{
-   char nanstr[8] = {-1,-1,-1,-1,-1,-1,-1,127};
-   double n;
-   memcpy(&n,&nanstr[0],sizeof(n));
-   if (unused) return n;
-   return n;
-}
-
-int is_vpf_null_float( float num )
-{
-   float nan;
-   nan = (float)quiet_nan(0);
-   if (memcmp(&nan,&num,sizeof(float))==0) return 1;
-   return 0;
-}
-
-int is_vpf_null_double( double num )
-{
-   double nan;
-   nan = (double)quiet_nan(0);
-   if (memcmp(&nan,&num,sizeof(double))==0) return 1;
-   return 0;
-}
-
-
-/***********Mody B**********/
-/* get string until delimeter */
-static char *cpy_del(char *src, char delimiter, ossim_int32 *ind )
-{
-  ossim_int32 i, skipchar ;
-  char *temp, *tempstr ;
-
-  /* remove all blanks ahead of good data */
-
-  skipchar = 0 ;
-  while ( src[skipchar] == SPACE || src[skipchar] == TAB )
-    skipchar++ ;
-
-  temp = &src[skipchar];
-
-  /* If t
-  he first character is a COMMENT, goto LINE_CONTINUE */
-
-  if ( *temp == COMMENT ) {
-    while ( *temp != LINE_CONTINUE && *temp != END_OF_FIELD && *temp != '\0'){
-      temp++ ;
-      skipchar ++ ;
-    }
-    skipchar++ ;
-    temp++ ;		/* skip past LC, EOF, or NULL */
-  }
-
-  /* Start with temporary string value */
-
-  tempstr = (char *)vpfmalloc ( (unsigned long)strlen ( temp ) + 10 ) ;
-
-  if ( *temp == '"' ) {	/* If field is quoted, do no error checks */
-
-    temp++ ; 	  /* skip past quote character */
-    skipchar++ ;  /* update the position pointer */
-
-    for ( i=0 ; *temp != '\0'; temp++,i++) {
-      if ( *temp == LINE_CONTINUE || *temp == TAB ) {
-	temp++ ;
-	skipchar++ ;
-      } else if ( *temp == '"' )
-	break ;
-      /* Now copy the char into the output string */
-      tempstr[i] = *temp ;
-    }
-    tempstr[i] = '\0';		/* terminate string */
-    *ind += ( i + skipchar + 2) ;	/* Increment position locate past */
-    return tempstr ;			/* quote and semicolon */
-  }
-
-  /* search for delimiter to end, or end of string */
-
-  i=0 ;	/* initialize */
-
-  if ( *temp != END_OF_FIELD ) {	/* backward compatability check */
-
-    for ( i=0; *temp != '\0';temp++,i++){/* Stop on NULL*/
-
-      if ( ( *temp == LINE_CONTINUE && *(temp+1) == '\n') ||  *temp == TAB ) {
-	temp++ ;
-	skipchar++ ;
-      } else if ( *temp == delimiter )
-	break ;					/* break for delimiter  */
-      /* Now copy the char into the output string */
-      tempstr[i] = *temp ;
-    }
-                             /* Eat the delimiter from ind also */
-    *ind += ( i + skipchar + 1) ;	/* Increment position locate */
-  }	
-  tempstr[i] = '\0';		/* terminate string */   
-  return tempstr;
-}
-/***********Mody B*********/
-char *get_string(ossim_int32 *ind,char *src,char delimeter )
-{ char *temp;
-  temp  = cpy_del(&src[*ind],delimeter, ind);
-  if( ! strcmp ( temp, TEXT_NULL ))
-    strcpy ( temp, "" ) ;
-  return temp;
-}
-/**********Mody B*************/
-char vpf_get_char(ossim_int32 *ind, char *src)
-{  char temp;
-   while ( src[*ind] == SPACE || src[*ind] == TAB ) (*ind)++ ;
-   temp  = src[*ind];
-   *ind += 2;
-   return temp;
-}
-/***********Mody B***********/
-ossim_int32 get_number(ossim_int32 *ind, char *src,char delimeter)
-{  char *temp;
-   ossim_int32  num;
-   temp  = cpy_del(&src[*ind],delimeter, ind);
-   if (strchr(temp, VARIABLE_COUNT ) == NULL)
-      num = atoi(temp);
-   else
-      num = -1;
-   free(temp);
-   return num;
-}
-
-
-/*************************************************************************
- *
- *N  parse_data_def
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function parses a table's data definition and creates a header
- *     in memory that is associated with the table.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    table <inout> == (vpf_table_type *) vpf table structure.
- *    ddlen <input> == (ossim_int32) length of the table's data definition.
- *
- *    return value is the record length if all items are fixed length, or
- *    -1 if the record contains variable length items
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   April 1991                        DOS Turbo C
- *    Mody Buchbinder  May 1991 - Modified for new table header.
- *    Dave Flinn       July 1991 - updated for UNIX
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    void *vpfmalloc()                                  VPFMISC.C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-ossim_int32 parse_data_def( vpf_table_type *table )
-{
-   register ossim_int32 n,i;
-   ossim_int32 p, k;
-   char *buf,*des,*nar,*vdt, *tdx, *doc, byte ;/*temporary storage */
-   char end_of_rec;
-   int status;
-   ossim_int32 ddlen;
-   ossim_int32 reclen = 0;
-#if UNIX
-   /* just for backward compat check */
-   ossim_int32 bkcompat = 1 ;
-#endif
-
-   if ( table->mode == Read ) {
-     fread(&ddlen,sizeof(ddlen),1,table->fp);
-
-     /* Check the next byte to see if the byte order is specified */
-     fread(&byte,1,1,table->fp);
-     p=0;
-     table->byte_order = LEAST_SIGNIFICANT; /* default */
-     switch (toupper(byte)) {
-	case 'L':
-	   p++;
-	   break;
-	case 'M':
-	   table->byte_order = MOST_SIGNIFICANT;
-	   p++;
-	   break;
-     }
-     if (MACHINE_BYTE_ORDER != table->byte_order) {
-	k = ddlen;
-	swap_four((char *)&k,(char *)&ddlen);
-     }
-     if ( ddlen < 0 ) {
-       return (ossim_int32)0 ;
-     }
-
-     STORAGE_BYTE_ORDER = table->byte_order;
-
-     /* header without first 4 bytes */
-     table->ddlen = ddlen + sizeof (ossim_int32) ;
-     buf = (char *)vpfmalloc((ddlen+3)*sizeof(char));
-     buf[0] = byte; /* already have the first byte of the buffer */
-     Read_Vpf_Char(&buf[1],table->fp,ddlen-1) ;
-   } else {
-     table->ddlen = (long)strlen ( table->defstr ) ;
-     ddlen = table->ddlen ;
-     buf = (char *)vpfmalloc((ddlen+3)*sizeof(char));
-     strncpy ( buf, table->defstr, ddlen ) ;
-     p=0;
-     table->byte_order = LEAST_SIGNIFICANT; /* default */
-     byte = buf[0];
-     switch (toupper(byte)) {
-	case 'L':
-	   p++;
-	   break;
-	case 'M':
-	   table->byte_order = MOST_SIGNIFICANT;
-	   p++;
-	   break;
-     }
-     STORAGE_BYTE_ORDER = table->byte_order;
-   }
-
-   buf[ddlen-1] = '\0'; /* mark end of string for reading functions */
-   if ( buf[p] == ';' )
-     p++; /* buf[p] is semi-colon */
-   des = get_string(&p,buf,COMPONENT_SEPERATOR );
-   strncpy(table->description,des,80);
-   free(des);
-   nar = get_string(&p,buf,COMPONENT_SEPERATOR );
-   strncpy(table->narrative ,nar,12);
-   free(nar);
-   n = 0 ;
-   /* get number of fields */
-   for (i=p; i < ddlen;i++)
-     if ( buf[i] == LINE_CONTINUE )
-       i++ ;	/* skip past line continue, and next character */
-     else if (buf[i] == END_OF_FIELD ) 		/* Found end of field */
-	n++;					/* increment nfields */
-     else if (buf[i] == COMMENT )		/* skip past comments */
-       while ( buf[i] != LINE_CONTINUE &&
-	       buf[i] != END_OF_FIELD &&
-	       buf[i] != '\0')
-	 i++ ;					/* increment i */
-
-   table->nfields = n ;
-   table->header = (header_type)vpfmalloc((n+1)*sizeof(header_cell));
-
-   for(i=0;i<n;i++) {
-     end_of_rec = FALSE;
-     table->header[i].name  = get_string(&p,buf, FIELD_COUNT);  /*****/
-     rightjust(table->header[i].name);
-     table->header[i].type  = toupper(vpf_get_char  (&p,buf));
-     table->header[i].count = get_number(&p,buf,FIELD_SEPERATOR );
-
-     if ( i == 0 )
-       if ( ossim_strcasecmp ( table->header[0].name, "ID" ) ) {
-	      return (ossim_int32)0 ;
-       }
-
-     if(table->header[i].count == -1)
-       reclen = -1;			/* set reclen to variable len flag */
-
-     /* Now set null values and add up record length, if fixed length */
-
-     status = 0;
-
-     switch (table->header[i].type) {
-     case 'I':
-       if ( reclen >= 0 )
-	 reclen += (sizeof(ossim_int32)*table->header[i].count);
-       table->header[i].nullval.Int = NULLINT ;
-       break;
-     case 'S':
-       if ( reclen >= 0 )
-	 reclen += (sizeof(short int)*table->header[i].count);
-       table->header[i].nullval.Short = NULLSHORT ;
-       break;
-     case 'F':
-       if ( reclen >= 0 )
-	 reclen += (sizeof(float)*table->header[i].count);
-       table->header[i].nullval.Float = NULLFLOAT ;
-       break;
-     case 'R':
-       if ( reclen >= 0 )
-	 reclen += (sizeof(double)*table->header[i].count);
-       table->header[i].nullval.Double = NULLDOUBLE ;
-       break;
-     case 'T':
-       if ( reclen >= 0 ) { 		/* if fixed length */
-	 reclen += (sizeof(char)*table->header[i].count);
-	 table->header[i].nullval.Char =
-	   (char *) vpfmalloc ( table->header[i].count + 1 ) ;
-	 for ( k=0; k < table->header[i].count; k++ )
-	   table->header[i].nullval.Char[k] = NULLCHAR ;
-	 table->header[i].nullval.Char[k] = '\0';
-       } else {			/* variable length */
-	 table->header[i].nullval.Char =
-	   (char *) vpfmalloc ( VARIABLE_STRING_NULL_LENGTH + 1 ) ;
-	 for ( k=0; k < VARIABLE_STRING_NULL_LENGTH ; k++ )
-	   table->header[i].nullval.Char[k] = NULLCHAR ;
-	 table->header[i].nullval.Char[k] = '\0';
-       }
-       break;
-     case 'C':
-       if ( reclen >= 0 )
-	 reclen += (sizeof(coordinate_type)*table->header[i].count);
-       table->header[i].nullval.Other = '\0';
-       break;
-     case 'Z':
-       if ( reclen >= 0 )
-	 reclen += (sizeof(tri_coordinate_type)*table->header[i].count);
-       table->header[i].nullval.Other = '\0' ;
-       break;
-     case 'B':
-       if ( reclen >= 0 )
-	 reclen += (sizeof(double_coordinate_type)*table->header[i].count);
-       table->header[i].nullval.Other = '\0' ;
-       break;
-     case 'Y':
-       if ( reclen >= 0 )
-	 reclen +=
-	   (sizeof(double_tri_coordinate_type)*table->header[i].count);
-       table->header[i].nullval.Other ='\0';
-       break;
-     case 'D':
-       if ( reclen >= 0 )
-	 reclen += ((sizeof(date_type)-1)*table->header[i].count);
-       strcpy ( table->header[i].nullval.Date, NULLDATE ) ;
-       break;
-     case 'K':
-       reclen = -1;
-       table->header[i].nullval.Other = '\0' ;
-       break;
-     case 'X':
-       /* do nothing */
-       table->header[i].nullval.Other = '\0' ;
-       break ;
-     default:
-       status = 1;
-       break ;
-     } /** switch type **/
-
-     if (status) return (ossim_int32)0;
-
-     table->header[i].keytype     = vpf_get_char  (&p,buf);
-     des = get_string(&p,buf, FIELD_SEPERATOR );
-     rightjust(des);
-     strncpy(table->header[i].description,des,80);
-     free(des);
-     vdt = get_string(&p,buf, FIELD_SEPERATOR );
-     strncpy(table->header[i].vdt,vdt,12);
-     free(vdt);
-#if UNIX
-     /* This is for backward compatability qc checking */
-     if ( bkcompat && buf[p] == END_OF_FIELD ) {
-       bkcompat= 0 ;
-     }
-#endif
-     tdx = get_string(&p,buf, FIELD_SEPERATOR ) ;
-     if ( ! strcmp ( tdx, "" ) ) {
-       table->header[i].tdx = (char *) NULL ;
-       if (buf[p] == ':')
-	 end_of_rec = TRUE;
-     } else {
-       if (strcmp(tdx,"-") != 0) {
-	  table->header[i].tdx =(char*) vpfmalloc ( (unsigned long)strlen ( tdx ) +1 ) ;
-	  strcpy (table->header[i].tdx, tdx );
-       } else table->header[i].tdx = (char *)NULL;
-     }
-     free(tdx);
-     if (!end_of_rec) {
-	doc = get_string(&p,buf, FIELD_SEPERATOR ) ;
-	if ( ! strcmp ( doc, "" ) ) {
-	  table->header[i].narrative = (char *) NULL ;
-	  end_of_rec = TRUE;
-	} else {
-	  if (strcmp(doc,"-") != 0) {
-	     table->header[i].narrative = (char*)vpfmalloc ( (unsigned long)strlen(doc) +1) ;
-	     strcpy (table->header[i].narrative, doc );
-	  } else table->header[i].narrative = (char *)NULL;
-	}
-	free(doc);
-     } else table->header[i].narrative = (char *)NULL;
-     p += 1; /** eat semicolon **/
-    }
-   free(buf);
-   return reclen;
-}
-
-
-/*************************************************************************
- *
- *N  vpfhandler
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function temporarily takes the place of the DOS hard error
- *     handler.  It is needed when 'vpfopencheck' replaces the DOS error
- *     handler for disk operations, so that the disk errors may be handled
- *     more suitably for our environment.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels    May 1991                       DOS Turbo C
- *    Dave Flinn        July 1991  Updated for UNIX, basically commented
- *                                 the subroutine out
- *E
- *************************************************************************/
-/*static int disk_error;*/
-#define IGNORE 0
-#define RETRY  1
-#define ABORT  2
-#define DISPLAY_STRING 0x09
-
-#ifdef __MSDOS__
-static int vpfhandler(ossim_int32 errval, ossim_int32 ax, ossim_int32 bp, ossim_int32 si)
-{
-   if (ax < 0) {
-      bdosptr(DISPLAY_STRING,"device error$", 0);
-      hardretn(-1);
-   }
-   disk_error = errval;
-
-   si++; bp++;  /* get rid of compiler warning */
-   return(IGNORE);
-}
-#endif
-
-
-/*************************************************************************
- *
- *N  vpfopencheck
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function tries its darndest to open a file.  It initially calls
- *     fopen with the given filename and mode.  If that doesn't work and
- *     the file is not on the hard disk, it displays a message asking the
- *     user to enter the correct disk in the drive, waits for either a retry
- *     or a cancel response, and, if told to retry, tries again.  This
- *     process is repeated until either the file is opened or the user
- *     requests cancel.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    filename <input> == (char *) full path name of the file to be opened.
- *    mode     <input> == (char *) mode of the file.
- *    diskname <input> == (char *) descriptive name of the disk the file is
- *                                 on.
- *    return  <output> == (FILE *) file pointer newly associated with
- *                                 filename.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels    May 1991                       DOS Turbo C
- *    Dave Flinn        July 1991     Updated for UNIX
- *E
- *************************************************************************/
-FILE *vpfopencheck( const char *filename,
-		    const char *mode,
-		    const char * diskname )
-{
-   FILE *fp;
-   char* tmpFilename = (char*) malloc ( strlen(filename) + 1 );
-/*
-   char *text[] = {"Please insert",
-		   "                                        ",
-		   "in data drive",
-		   "                                                      "};
-*/
-   ossim_int32 retry = 0;
-#ifdef __MSDOS__
-   extern char home[255];
-   void interrupt (*doshandler)();
-
-   doshandler = getvect(36);
-   harderr(vpfhandler);
-
-   strncpy(text[1],diskname,strlen(text[1]));
-   strcpy(text[3],filename);
-#endif
-   fp = NULL;
-
-
-   /* copy the filename because we might modify it. */
-   tmpFilename[strlen(filename)] = '\0'; /* just in case */
-   strcpy(tmpFilename, filename);
-   
-   while (fp == NULL)
-   {
-      fp = fopen(tmpFilename,mode);
-      if (fp == NULL)
-      {
-#ifdef __MSDOS__
-	 if ( toupper(home[0]) != toupper(tmpFilename[0]) )
-	    retry = displayerror(text,   4);
-	 else
-#else
-            /* give names ending in dot another chance without the dot */
-            if (tmpFilename[strlen(tmpFilename)-1] == '.')
-            {
-               tmpFilename[strlen(tmpFilename)-1] = '\0';
-               retry = TRUE;
-            }
-            else
-#endif
-               retry = FALSE;
-	 if (!retry) break;
-      }
-   }
-
-   free(tmpFilename);
-   tmpFilename = 0;
-   
-#ifdef __MSDOS__
-   setvect(36,doshandler);
-#endif
-   return fp;
-}
-
-
-/*************************************************************************
- *
- *N  vpf_open_table
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function opens a vpf table and either loads it into RAM or sets
- *     up the structure to read off of disk.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    tablename <input> == (const char *) file name of the table.
- *    storage   <input> == (storage_type) table storage mode -
- *                                        either ram or disk.
- *    mode      <input> == (const char *) file mode for opening the table -
- *                                  same as fopen() mode in C.
- *    defstr    <input> == (char *) table definition string used for
- *                                  creating a writable table.
- *    vpf_open_table <output> == (vpf_table_type) VPF table structure.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   April 1991                   DOS Turbo C
- *    Dave Flinn       July 1991                    UNIX compatable
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-vpf_table_type vpf_open_table( const char * tablename,
-			       storage_type   storage ,
-			       const char * mode,
-			       char         * defstr )
-{
-   vpf_table_type   table;
-   char             tablepath[255],
-		  * idxname;
-   ossim_int32         i,
-		    j;
-   ossim_int32         tablesize,
-		    idxsize,
-		    memsize;
-   ossim_uint32 ulval;
-   char            * diskname = "VPF data disc";
-
-   strcpy(tablepath,tablename);
-   rightjust(tablepath);
-
-   /* Parse out name and path */
-   j = -1;
-   i=(long)strlen(tablepath);
-   while (i>0) {
-#ifdef __MSDOS__
-      if (tablepath[i] == '\\') {
-#else
-      if (tablepath[i] == '/') {
-#endif
-	 j = i;
-	 break;
-      }
-      i--;
-   }
-   strncpy(table.name,&(tablepath[j+1]),12);
-   rightjust(table.name);
-   strupr(table.name);
-   table.path = (char *)vpfmalloc(((unsigned long)strlen(tablepath)+5)*(unsigned long)sizeof(char));
-   strcpy(table.path, tablepath);
-   table.path[j+1] = '\0';
-
- /* Establish a read or write table operation */
-
-   if ( mode[0] == 'r' )
-     table.mode = Read ;
-   else
-     table.mode = Write ;
-
-   /*fprintf(stderr, "vpf_open_table opening %s\n", tablepath);*/
-   table.fp = vpfopencheck(tablepath,mode,diskname);
-   if (table.fp == NULL) {
-      perror(tablepath);
-/*
-#if __MSDOS__
-      perror(tablepath);
-      getch();
-      if (getgraphmode() >= 0) closegraph();
-      exit(0);
-#endif
-*/
-      free(table.path);
-      if (table.fp) {
-	fclose(table.fp);
-	table.fp = NULL;
-      } 
-      return table;
-   }
-
-   /* If file is to be created, copy the def string ptr into header for now */
-
-   if ( table.mode == Write )
-     table.defstr = defstr ;
-
-#ifdef __MSDOS__
-   tablesize = (filelength(fileno(table.fp)));
-#else
-   {  /* UNIX doesn't have a filelength function, so this is the best */
-     struct stat statbuf ;
-     if ( stat ( tablepath, &statbuf ) < 0 ) {
-       fprintf (stderr, "vpf_open_table: can't stat file\n" ) ;
-       free(table.path);
-       fclose(table.fp);
-       table.fp = NULL;
-       return table;
-     }
-     tablesize = statbuf.st_size ;
-   }
-#endif
-
-   /* Populate table structure with correct data, either for read or write */
-
-   table.reclen = parse_data_def(&table);
-
-   if ( table.mode == Write ) {   /* write out header */
-     rewind ( table.fp ) ;
-     Write_Vpf_Int ( &table.ddlen, table.fp, 1 ) ;
-     Write_Vpf_Char ( table.defstr, table.fp, table.ddlen ) ;
-     free ( table.defstr ) ;
-     table.defstr = (char *) NULL ;
-     table.nrows = 0 ;
-   }
-
-   if (table.reclen > 0) {      /* Index file */
-      table.xstorage = (storage_type)COMPUTE;
-      if (table.mode != Write)
-	 table.nrows = (tablesize - table.ddlen)/table.reclen;
-      table.xfp = (FILE *) NULL ;
-   } else {
-      idxname = strdup( tablepath );
-#ifdef __MSDOS__
-      idxname[strlen(tablepath)-1] = 'x';
-#else
-      if (idxname[strlen(tablepath)-1] == '.')
-	idxname[strlen(tablepath)-2] = 'x';
-      else
-	idxname[strlen(tablepath)-1] = 'x';
-#endif
-      table.xfp = fopen(idxname, mode);
-
-      if ((!table.xfp) && (table.mode == Read)) {
-	 perror(idxname);
-         fprintf(stderr, "hit RETURN to continue...");
-	 i=getc(stdin);
-	 free(idxname);
-	 for (i = 0; i < table.nfields; i++)
-	   free(table.header[i].name);
-	 free(table.header);
-	 free(table.path);
-         fclose(table.fp);
-         table.fp = NULL;
-         return table;
-      }
-
-      free(idxname);
-
-/*#ifdef __MSDOS__*/
-      table.xstorage = (storage_type)DISK;   /* Worst case default */
-/*#endif*/
-
-   /* Only read in index if file is read only */
-
-      if (table.xfp && ( table.mode == Read ) ) {
-	Read_Vpf_Int (&(table.nrows), table.xfp, 1 ) ;
-	Read_Vpf_Int (&ulval, table.xfp, 1 ) ;
-	idxsize = table.nrows*sizeof(index_cell) + 10L;
-
-#ifdef __MSDOS__
-	if ( (idxsize < (farcoreleft()/2)) && (idxsize < __64K) )
-#else
-	if (0)
-#endif
-	  {
-	    table.xstorage = (storage_type)RAM;
-	    table.index = (index_type)vpfmalloc(idxsize);
-	    for (i=0;i<table.nrows;i++) {
-	      Read_Vpf_Int (&(table.index[i].pos), table.xfp, 1) ;
-	      Read_Vpf_Int (&(table.index[i].length),table.xfp,1 ) ;
-	    }
-	    fclose(table.xfp);
-	  }
-      } else if (table.mode == Write) {
-
-     /* Write out dummy header record for index file. vpf_close_table finishes
-	the job. */
-
-	 Write_Vpf_Int ( &(table.ddlen), table.xfp, 1 ) ;
-	 Write_Vpf_Int ( &(table.ddlen), table.xfp, 1 ) ;
-	 table.xstorage = (storage_type)DISK;
-	 table.index = (index_type) NULL ;
-
-      }
-   }  /* end of if table .reclen */
-
-    table.storage = (storage_type)DISK;
-#ifdef __MSDOS__
-   memsize = (ossim_int32)min(farcoreleft(),__64K);
-#else
-   memsize = MAXINT;
-#endif
-
-   if ( (storage != disk) && ( table.mode == Read ) ) {
-      if (tablesize + table.nrows * table.nfields * HEAP_OVERHEAD < memsize) {
-	 fseek(table.fp,index_pos(1,table),SEEK_SET);
-	 table.row = (row_type *)vpfmalloc((table.nrows+1)*sizeof(row_type));
-	 for (i=0;i<table.nrows;i++) {
-	    table.row[i] = read_next_row(table);
-	 }
-	 fclose(table.fp);
-	 table.storage = (storage_type)RAM;
-      }
-   }
-   table.status = OPENED;
-   return table;
- }
-
-/*************************************************************************
- *
- *N  vpf_close_table
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     This function frees an entire table from memory.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    table       <inout> == (vpf_table_type) VPF table structure.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Barry Michaels   May 1991                     DOS Turbo C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-void vpf_close_table( vpf_table_type *table )
-{
-   register ossim_int32 i;
-
-   if (table->status != OPENED) {
-      return;
-   }
-   /*fprintf(stderr, "vpf_close_table closing %s%s\n", table->path, table->name);*/
-
-   /* If the table is writable, write out the final record count */
-
-   if ( table->mode == Write && table->xfp ) {
-     rewind ( table->xfp ) ;
-     Write_Vpf_Int ( &table->nrows, table->xfp, 1 ) ;
-     Write_Vpf_Int ( &table->ddlen, table->xfp, 1 ) ;
-   }
-
-   for (i=0;i<table->nfields;i++) {
-      free(table->header[i].name);
-      /* free up null text string */
-      if ( table->header[i].type == 'T')
-	 free(table->header[i].nullval.Char);
-      /* free up index file string */
-      if (table->header[i].tdx!=(char *)NULL)
-	free ( table->header[i].tdx ) ;
-      /* free up narrative table string */
-      if (table->header[i].narrative!=(char *)NULL) {
-	free ( table->header[i].narrative ) ;
-      }
-   }
-   free(table->header);
-
-   switch (table->storage) {
-      case RAM:
-	 for (i=0;i<table->nrows;i++) free_row(table->row[i],*table);
-	 free(table->row);
-	 break;
-      case DISK:
-	 fclose(table->fp);
-	 break;
-      default:
-	 printf("%s%s: unknown storage flag: %d\n",table->path,table->name,
-		table->storage);
-	 break;
-   }
-
-   switch (table->xstorage) {
-      case RAM:
-	 free(table->index);
-	 break;
-      case DISK:
-	 fclose(table->xfp);
-	 break;
-      case COMPUTE:
-	 break;
-      default:
-	 printf("%s%s: unknown index storage flag: %d\n",
-		table->path,table->name,table->storage);
-	 break;
-   }
-   table->nfields = 0;
-   free(table->path);
-   table->status = CLOSED;
-}
-
-
-
-ossim_int32 is_vpf_table( const char *fname )
-{
-   FILE *fp;
-   ossim_int32 n, ok;
-
-   fp = fopen( fname, "rb" );
-   if (!fp) {
-      return FALSE;
-   }
-   Read_Vpf_Int ( &n, fp, 1 ) ;
-   fseek( fp, n-1, SEEK_CUR );
-   if (fgetc(fp) == ';')
-      ok = TRUE;
-   else
-      ok = FALSE;
-   fclose(fp);
-   return ok;
-}
-
diff --git a/src/ossim/vpfutil/vpftidx.c b/src/ossim/vpfutil/vpftidx.c
deleted file mode 100644
index 037ab7c..0000000
--- a/src/ossim/vpfutil/vpftidx.c
+++ /dev/null
@@ -1,1958 +0,0 @@
-/*************************************************************************
- *
- * Environmental Systems Research Institute (ESRI) Applications Programming
- *
- *N  Module VPFTIDX
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *P
- *   Purpose: Subroutines to create and read both the thematic index
- *	      or a gazeteer index on a VPF table column.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    N/A
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Dave Flinn       September/October 1991
- *    Barry Michaels   January 1992   A few adjustments for DOS.
- *                                    Added sets to create function to
- *                                    take advantage of SET's disk-
- *				      swapping ability when low on memory.
- *E
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions:
- *F
- *
- *    set_type read_thematic_index ( char *tablename,
- *				     char *value ) ;
- *
- *    ThematicIndex open_thematic_index ( char *tablename );
- *
- *    set_type search_thematic_index ( ThematicIndex *themindex,
- *				       char *value ) ;
- *
- *    void close_thematic_index ( ThematicIndex *themindex );
- *
- *    set_type read_gazetteer_index (char * vpfname, char * query_str ) ;
- *
- *    set_type search_gazetteer_index (ThematicIndex *idx,
- *				       char * query_str ) ;
- *
- *    ossim_int32 read_gazetteer_index_directory (
- *					ThematicIndexDirectory ** gid,
- *					ThematicIndexHeader     * gi,
- *					FILE * idx_fp);
- *
- *    ossim_int32 write_thematic_index_header ( ThematicIndexHeader h ,
- *					     FILE *fp ) ;
- *
- *    ossim_int32 read_thematic_index_header ( ThematicIndexHeader *h ,
- *					    FILE *fp ) ;
- *
- *    ossim_int32 write_thematic_index_directory (
- *				       ThematicIndexHeader h ,
- *				       ThematicIndexDirectory *d,
- *				       ossim_int32 size,
- *				       FILE *fp ) ;
- *
- *    ossim_int32 write_gazetteer_index_directory (
- *				       ThematicIndexHeader h ,
- *				       ThematicIndexDirectory *d,
- *				       ossim_int32 size,
- *				       FILE *fp ) ;
- *
- *    ossim_int32 create_thematic_index ( char indextype,
- *				       char *tablename,
- *				       char *idxname ,
- *				       char *columnname,
- *				       char *idx_set );
- *
- *    ossim_int32 create_gazetteer_index (char *tablename,
- *				       char *idx_fname ,
- *				       char *columnname,
- *				       char *idx_set);
- *
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible. Created on UNIX first
- *E
- *************************************************************************/
-
-#include <ctype.h>
-#include <ossim/vpfutil/machine.h>
-#include <ossim/vpfutil/vpfmisc.h>
-#include <ossim/vpfutil/vpftable.h>
-#include <ossim/vpfutil/vpftidx.h>
-#include <string.h>
-#include <stdlib.h>
-#include <memory.h>
-
-#ifndef __MSDOS__ 
-#  ifndef _WIN32
-#    include <unistd.h>
-#  endif
-#endif
-
-void *vpfmalloc(unsigned long size);
-
-#define Whimper(str) {\
-      return ((ossim_int32)0) ; }
-
-#define SWhimper(str) {\
-      set_type err; err = set_init (1) ;\
-      printf("\nvpftidx: < %s >\n", str ) ;\
-      return err ; }
-
-#define OWhimper(str) {\
-      printf("\nvpftidx: < %s >\n", str ) ;\
-      return idx ; }
-
-
-/*
- * an index file directory entry takes up a different amount
- * of space in memory than it does on disk; the following constant
- * should be used to calculate the starting offset for
- * index data
- *
- * example: if the number of items to be indexed is t, and each item is
- *          s bytes long, then use
- *
- *          sizeof(ThematicIndexHeader) + t * (s + DIR_ON_DISK_INCR)
- *
- * to find out where the first byte of indexing data will be placed.
- *
- * That first byte is what must be stored as the value of Header.nbytes
- */
-
-#define DIR_ON_DISK_INCR (2 * sizeof(ossim_int32))
-
-/*************************************************************************
- *
- *N  create_thematic_index
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *
- *      Create a thematic index file on a given vpf table.
- *P
- *
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    indextype  <input> == (char) either 'T' for thematic index or
- *					  'G' for gazetteer.
- *    tablename  <input> == (char *) path name of the vpf table.
- *    idxname    <input> == (char *) name of the index file to be created.
- *    columnname <input> == (char *) name of column to create index on
- *			    if the column is a triplet id, the columnname
- *			    should be as such: EDG_ID\ID
- *					       EDG_ID\TILE_ID
- *					       EDG_ID\EXT_ID
- *    idxset     <input> == (char *) array of character values to index on
- *                          if the index type is gazetteer.  Not used for
- *                          index type = 'T'.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Dave Flinn       October	 1991 
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *    void *vpfmalloc                                    VPFMISC.C
- *    vpf_open_table					 VPFTABLE.C
- *    table_pos
- *    table_element
- *    vpf_close_table
- *    write_thematic_index_header			see below
- *    write_thematic_index_directory			see below
- *    Vpf_Write_* macros
- *    set_init						SET.C
- *    set_insert
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.  developed on UNIX
- *E
- *************************************************************************/
-ossim_int32 create_thematic_index ( char indextype,
-		 	         char *tablename,
-				 char *idxname ,
-				 char *columnname,
-				 char *idx_set ) 
-{
-   unsigned int i;
-   unsigned int column_length;
-   FILE           *ifp ;
-   ossim_int32	 j,tablepos,k,
-      keycolumn = 0 ,	/* 1 if key column */
-      itemp , n,
-      idsize ,		/* either 2 or 4 bytes */
-      datasize ;		/* Directory value data size */
-   char           *buf ,
-      hack[80] ;
-   vpf_table_type table ;
-   ThematicIndexHeader		h ;
-   ThematicIndexDirectory	*d ;
-   short int			stemp ;
-   float				ftemp ;
-   double			dtemp ;
-   id_triplet_type		key ;
-   
-   if ( indextype == 'G' )
-   {
-      return ( create_gazetteer_index ( tablename, idxname,columnname,idx_set)) ;
-   }
-   
-   /* convert columnname to uppercase and check for id triplet */
-   column_length = (unsigned int)strlen(columnname);
-   for ( i=0 ; i < column_length; i++ )
-   {
-      /* copy into header structure */
-      h.vpf_column_name[i] = toupper ( columnname[i] ) ;
-   }
-   
-   h.vpf_column_name[i] = '\0';
-   
-   h.index_type = 'T' ;		/* default */
-   h.type_count = 1 ;
-
-   for (i=0 ; i < column_length; i++ )
-   {
-      columnname[i] = toupper ( columnname[i] ) ;
-
-#if 0
-    /* check if request is on a triplet id field */
-
-    if ( columnname[i] == '\\' ) {
-
-      columnname[i+1] = toupper ( columnname[i+1] ) ;
-      
-      switch ( columnname[i+1] ) {	/* locate sub-column key */
-      case 'I':	/* ID of triplet id */
-	keycolumn = 1 ; break ;
-      case 'T':	/* TILE_ID of triplet id */
-	keycolumn = 2 ; break ;
-      case 'E':	/* EXT_ID of triplet id */
-	keycolumn = 3 ; break ;
-      default:
-	Whimper ("error in key column request") ;
-	/* break ; Whimper contains a return */
-      }	/* end of switch */
-      strcpy( h.vpf_column_name, strupr ( columnname )) ;
-      columnname[i] = (char) NULL ;
-    }     /* end of if columnname == \ */
-#endif
-  }	/* end of for loop */
-
-  table = vpf_open_table ( tablename, disk, "rb", NULL ) ;
-
-
-  /* Determine the id_data_size. This will save 50% of file size  */
-
-  if ( table.nrows > MAX_ID ) {
-    h.id_data_type = 'I' ;		/* ossim_int32s */
-    idsize = sizeof ( ossim_int32 ) ;
-  } else {
-    h.id_data_type = 'S' ;		/* ossim_int32s */
-    idsize = sizeof ( short int ) ;
-  }
-
-  /* Find position of column in input table */
-
-  tablepos = table_pos ( columnname, table ) ;
-
-  /* Now check data type */
-
-  switch (table.header[tablepos].type) {
-  case 'X':
-    Whimper ("Cannot make index on Null Column") ;
-    /* A return is in Whimper - break statement cannot be reached */
-  case 'T':
-    /* Don't bother with variable length, it's too hard for now */
-    if ( table.header[tablepos].count <= 0 )
-      Whimper ("Cannot make index on variable length text column") ;
-    datasize = table.header[tablepos].count ;
-    h.type_count = datasize ;		/* the special case */
-    break;
-  case 'D': 
-    datasize = sizeof ( date_type ) ;
-    Whimper ("Not implemented yet") ;
-  case 'I':
-    datasize = sizeof ( ossim_int32 ) ;
-    break ;
-  case 'K':				/* treat keys like integers */
-    Whimper ("Cannot make index on key column") ;
-  case 'S':
-    datasize = sizeof ( short int ) ;
-    break ;
-  case 'F':
-    datasize = sizeof ( float ) ;
-    break ;
-  case 'R':
-    datasize = sizeof ( double ) ;
-    break ;
-  case 'C':
-  case 'Z':
-  case 'B':
-  case 'Y':
-    Whimper ("Cannot make index on Coordinate Column") ;
-  default:
-    sprintf (hack,"No such type < %c >", table.header[tablepos].type ) ;
-    Whimper ( hack ) ;
-  }  /* end of switch */
-
-  /* open output index file */
-
-  if (( ifp = fopen ( idxname, "wb" )) == NULL )
-    Whimper ( idxname ) ;
-
-  /* Create directory size as big as table, for worst case */
-
-  d = (ThematicIndexDirectory *)
-    vpfmalloc(sizeof(ThematicIndexDirectory)) ;
-  h.nbins = 0 ;		/* initialize the directory counter */
-
-#define REALLOC_DIRECTORY(loc) {\
-  if ((d = (ThematicIndexDirectory *) \
-       realloc(d,sizeof(ThematicIndexDirectory) * (loc+1))) == NULL )\
-    Whimper ("error in reallocing directory") ; \
-  d[loc].num_items = 0 ;\
-  d[loc].idset = set_init(table.nrows+1); }
-
-#define INSERT_ID(loc,val) {\
-  d[loc].num_items++ ; \
-  set_insert(val,d[loc].idset); }
-
-/* Fill up id sets */
-
-  switch ( table.header[tablepos].type ) {
-  case 'I':
-
-    for ( i=1; (int)i <= table.nrows; i++ ) {
-      /* read in record from disk */
-      table_element ( tablepos,i,table,&itemp,&n);
-      for ( k=0; k < h.nbins; k++ )	/* Search directory for value*/
-	if ( d[k].value.ival == itemp )
-	  break ;/* Found a match */
-      if ( k == h.nbins ) { 		/* New value in column */
-	REALLOC_DIRECTORY ( k ) ;
-	d[k].value.ival = itemp ;
-	h.nbins++ ;
-      }
-      INSERT_ID(k,i) ;
-    }   /* end of for i loop */ 
-
-    break ;
-  case 'T':
-
-    /* initialize */
-    buf = (char *) table_element (tablepos,1,table,NULL,&n);
-    REALLOC_DIRECTORY ( 0 ) ;
-    d[0].value.strval = (char *) vpfmalloc ( (unsigned long)strlen ( buf ) +1) ;
-    memcpy( d[0].value.strval, buf, (unsigned long)strlen(buf) ) ;
-    free (buf) ;
-    h.nbins++ ;
-
-    for ( i=1; (int)i <= table.nrows; i++ ) {
-      /* read in record from disk */
-      buf = (char *) table_element (tablepos,i,table,NULL,&n);
-
-      /* strlen ( buf ) should equal datasize */
-
-      for ( k=0; k < h.nbins; k++ )	/* Search directory for value*/
-	if ( ! strcmp ( d[k].value.strval, buf ) )
-	  break ;/* Found a match */
-
-      if ( k == h.nbins ) { 		/* New value in column */
-	REALLOC_DIRECTORY ( k ) ;
-	d[k].value.strval = (char *) vpfmalloc ( (unsigned long)strlen ( buf ) +1) ;
-	memcpy( d[0].value.strval, buf, strlen(buf) ) ;
-	h.nbins++ ;
-      }
-      INSERT_ID(k,i) ;
-      free(buf);
-    }   /* end of for i loop */
-
-    break ;
-  case 'S':
-
-    for ( i=1; (int)i <= table.nrows; i++ ) {
-      /* read in record from disk */
-      table_element ( tablepos,i,table,&stemp,&n);
-      for ( k=0; k < h.nbins; k++ )	/* Search directory for value*/
-	if ( d[k].value.sval == stemp ) 
-	  break ;/* Found a match */
-      if ( k == h.nbins ) { 		/* New value in column */
-	REALLOC_DIRECTORY ( k ) ;
-	d[k].value.sval = stemp ;
-	h.nbins++ ;
-      }
-      INSERT_ID (k,i) ;
-    }   /* end of for i loop */
-
-    break ;
-  case 'F':
-
-    for ( i=1; (int)i <= table.nrows; i++ ) {
-      /* read in record from disk */
-      table_element ( tablepos,i,table,&ftemp,&n);
-      for ( k=0; k < h.nbins; k++ )	/* Search directory for value*/
-	if ( d[k].value.fval == ftemp ) 
-	  break ;/* Found a match */
-      if ( k == h.nbins ) { 		/* New value in column */
-	REALLOC_DIRECTORY ( k ) ;
-	d[k].value.fval = ftemp ;
-	h.nbins++ ;
-      }
-      INSERT_ID (k,i) ;
-    }   /* end of for i loop */
-
-    break ;
-  case 'R':
-    for ( i=1; (int)i <= table.nrows; i++ ) {
-      /* read in record from disk */
-      table_element ( tablepos,i,table,&dtemp,&n);
-      for ( k=0; k < h.nbins; k++ )	/* Search directory for value*/
-	if ( d[k].value.dval == dtemp )
-	  break ;/* Found a match */
-      if ( k == h.nbins ) { 		/* New value in column */
-	REALLOC_DIRECTORY ( k ) ;
-	d[k].value.dval = dtemp ;
-	h.nbins++ ;
-      }
-      INSERT_ID (k,i) ;
-    }   /* end of for i loop */
-
-    break ;
-  case 'K':
-
-    for ( i=1; (int)i <= table.nrows; i++ ) {
-      /* read in record from disk */
-      table_element ( tablepos,i,table,&key,&n);
-
-      if ( keycolumn == 1 ) 
-	itemp = key.id ;
-      else if ( keycolumn == 2 ) 
-	itemp = key.tile ;
-      else 
-	itemp = key.exid ;
-
-      for ( k=0; k < h.nbins; k++ )	/* Search directory for value*/
-	if ( d[k].value.ival == itemp ) 
-	  break ;/* Found a match */
-      if ( k == h.nbins ) { 		/* New value in column */
-	REALLOC_DIRECTORY ( k ) ;
-	d[k].value.ival = itemp ;
-	h.nbins++ ;
-      }
-      INSERT_ID (k,i) ;
-    }   /* end of for i loop */ 
-
-    break ;
-  default:
-    Whimper ("error in table reading switch, no such type") ;
-  } /* end of switch */
-
-  /* set up header and write it out */
-  /* h.id_data_size and columnname set up above */
-  /* h.type_count set above */
-
-  h.nbytes = THEMATIC_INDEX_HEADER_SIZE +
-             h.nbins * ( datasize + DIRECTORY_SIZE ) ;
-
-  h.column_type = table.header[tablepos].type ;
-  if ( h.column_type == 'K' )		/* It's really an I */
-    h.column_type = 'I' ;
-  for ( i=0; i < 4; i++ )
-    h.padding[i] = '\0' ;
-
-  /* only write the table name, no pathname */
-
-  for ( i = (unsigned int)strlen ( tablename ); i > 0; i-- )
-    if ( tablename[i] == '/' ) break ;
-  if ( i && i < strlen (tablename) )
-    strcpy ( h.vpf_table_name, strupr ( &tablename[i+1] ) ) ;
-  else
-    strcpy( h.vpf_table_name, strupr ( tablename) );
-  
-  for ( i=(unsigned int)strlen(h.vpf_table_name); i < 12 ; i++ )
-    h.vpf_table_name[i] = ' ' ;
-  h.vpf_table_name[11] = '\0';
-
-  /* columname setup above */
-
-  h.table_nrows = table.nrows ;
-
-  if ( write_thematic_index_header ( h, ifp ) == (ossim_int32)0 )
-    Whimper ( "error writing index header" ) ;
-
-  /* Now write out the rest of the header directory */
-
-  if ( write_thematic_index_directory ( h, d, idsize, ifp ) == (ossim_int32)0 )
-    Whimper ( "error writing index directory" ) ;
-
-  /* now write the data */
-  if ( h.id_data_type == 'I' ) {
-    for ( i=0; (int)i < h.nbins; i++ )
-      for ( j=1; j <= table.nrows; j++ )
-	if (set_member(j,d[i].idset))
-	  Write_Vpf_Int ( &j, ifp, 1 ) ;
-  } else {
-    for ( i=0; (int)i < h.nbins; i++ )
-      for ( j=1; j <= table.nrows; j++ )
-	if (set_member(j,d[i].idset)) {
-	  stemp = (short int)j;
-	  Write_Vpf_Short ( &stemp, ifp, 1 ) ;
-	}
-  }
-
-  /* close up shop and exit */
-
-  vpf_close_table ( &table );
-  fclose ( ifp ) ;
-  for ( i=0; (int)i < h.nbins; i++ )
-    set_nuke(&d[i].idset);
-  free ( d ) ;
-  return ( h.nbins ) ;
-
-}
-
-
-/*************************************************************************
- *
- *N  read_thematic_index
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *	To read an index file, regardless of its type ( T or G ) and 
- *	return a set type array
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    idxname <input> == (char *) name of index file
- *    value   <input> == (char *) address of value to search on. 
- *			 THE PROGRAMMER MUST INSURE THAT THIS ADDRESS
- *			 CORRESPONDS TO THE TABLE COLUMN AND INDEX FILE.
- *
- *   Returns:
- *
- *    set_type		a set corresponding to the vpf table, where each
- *			bit relates to the ID in the table.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Dave Flinn       October 1991
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *	read_thematic_index_header		see below
- *	set_init				SET.C
- *	set_insert
- *	Vpf_Read_*                              VPFREAD.C
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-set_type read_thematic_index ( char *idxname,
-			       char *value )
-{
-  ossim_int32 			i , ival = 0, Match = -1;
-  short int			sval = 0;
-  float				fval = 0.0 ;
-  double			dval = 0.0 , atof () ;
-  FILE				*ifp ;
-  char				hack[80] , *buf = (char *) NULL, bufalloc=0 ;
-  ThematicIndexHeader		h ;
-  ThematicIndexDirectory	d ;
-  set_type			s ;
-
-  /* open output index file */
-
-  if (( ifp = fopen ( idxname, "rb" )) == NULL ) {
-    sprintf ( hack, "No such index < %s >", idxname ) ;
-    SWhimper ( hack ) ;
-  }
-
-  if ( read_thematic_index_header ( &h, ifp ) == (ossim_int32)0 )
-    SWhimper ( "error reading index header" ) ;
-
-  if ( h.index_type == 'G' ) {
-    fclose ( ifp ) ;
-    s = read_gazetteer_index ( idxname, value ) ;
-    return s ;
-  }
-
-  if ( value ) 		/* search for pattern */
-    switch ( h.column_type ) {			/* using address */
-    case	'I':
-      memcpy ( &ival, value, sizeof (ossim_int32)) ;
-      break ;
-    case	'S':
-      memcpy ( &sval, value, sizeof (short int)) ;
-      break ;
-    case	'F':
-      memcpy ( &fval, value, sizeof (float)) ;
-      break ;
-    case	'R':
-      memcpy ( &dval, value, sizeof (double)) ;
-      break ;
-    case	'T':
-      buf = (char *) vpfmalloc ( h.type_count ) ;
-      /* leave value as is */
-      bufalloc = 1;
-      break ;
-    }
-  else
-    SWhimper ( "require a value to search on.") ;
-
-  /* create set */
-
-  s = set_init ( h.table_nrows ) ;
-
-  /* Look for a matching directory entry */
-
-  for ( i=0; i < h.nbins; i++ ) {
-
-    switch ( h.column_type ) {
-    case 	'I':
-      Read_Vpf_Int ( &d.value.ival, ifp, 1) ;
-      if ( ival == d.value.ival ) {
-	/* found the match */
-	Match = i ;
-	i = h.nbins ;	/* exit */
-      }
-      break ;
-    case 	'S':         
-      Read_Vpf_Short ( &d.value.sval, ifp, 1) ;
-      if ( sval == d.value.sval ) {
-	/* found the match */
-	Match = i ;
-	i = h.nbins ;	/* exit */
-      }
-      break ;
-    case 	'F':
-      Read_Vpf_Float ( &d.value.fval, ifp, 1) ;
-      if ( fval == d.value.fval ) {
-	/* found the match */
-	Match = i ;
-	i = h.nbins ;	/* exit */
-      }
-      break ;
-    case 	'R':         
-      Read_Vpf_Float ( &d.value.dval, ifp, 1) ;
-      if ( dval == d.value.dval ) {
-	/* found the match */
-	Match = i ;
-	i = h.nbins ;	/* exit */
-      }
-      break ;
-    case 	'T':
-      Read_Vpf_Char ( buf, ifp, h.type_count ) ;
-      bufalloc = 1;
-      if ( ! strcmp ( value, buf ) ) {
-	/* found the match */
-	Match = i ;
-	i = h.nbins ;	/* exit */
-      }
-      break ;
-    } /* end of switch */
-
-    Read_Vpf_Int ( &d.start_offset, ifp, 1) ;
-    Read_Vpf_Int ( &d.num_items, ifp, 1) ;
-
-  }  /* end of i loop */
-
-  if ( bufalloc ) free ( buf ) ;
-
-  if ( Match < 0 ) {
-     fclose(ifp);
-     return s;
-  }
-
-  /* We've got a match, so now read the ids in */
-
-  if ( fseek ( ifp, d.start_offset, 0 ) != 0 )
-    SWhimper ( "error in fseek") ;
-
-  /* read data into user-defined pointer.  User must free this pointer */
-
-  if ( h.id_data_type == 'I' )
-    for ( i=0 ; i < d.num_items; i++ ) {
-      Read_Vpf_Int ( &ival, ifp, 1 ) ;
-      set_insert ( ival, s ) ;			/* set the id in the set */
-    }
-  else
-    for ( i=0 ; i < d.num_items; i++ ) {
-      Read_Vpf_Short ( &sval, ifp, 1 ) ;
-      set_insert ( (ossim_int32) sval, s ) ;
-    }
-
-  fclose ( ifp ) ;
-
-  return s ;					/* also return set */
-
-}   /*end of read_index */
-
-
-/*************************************************************************
- *
- *N  open_thematic_index
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *     Open and initialize a thematic index.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    idxname <input> == (char *) name of index file
- *
- *   Returns:
- *
- *    ThematicIndex     Thematic index structure.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Dave Flinn       October 1991
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *	read_thematic_index_header		see below
- *	set_init				SET.C
- *	set_insert
- *	Vpf_Read_* macros
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-ThematicIndex open_thematic_index ( char *idxname )
-{
-  char				hack[80];
-  ThematicIndex		        idx ;
-
-  idx.d = NULL;
-  idx.gid = NULL;
-
-  /* open output index file */
-
-  if (( idx.fp = fopen ( idxname, "rb" )) == NULL ) {
-    sprintf ( hack, "No such index < %s >", idxname ) ;
-    OWhimper ( hack ) ;
-  }
-
-  if ( read_thematic_index_header ( &idx.h, idx.fp ) == (ossim_int32)0 )
-    OWhimper ( "error reading index header" ) ;
-
-  if ( idx.h.index_type == 'G' ) {
-    /* gazetteer_index  */
-     if (read_gazetteer_index_directory(&idx.gid,&idx.h,idx.fp) == (ossim_int32)0) {
-	   fclose(idx.fp);
-	   idx.fp = NULL;
-     }
-  }
-
-  return idx;
-}
-
-/*************************************************************************
- *
- *N  search_thematic_index
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *	To search an index file, regardless of its type ( T or G ) and
- *	return a set type array
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    idx     <input> == (ThematicIndex) thematic index
- *    value   <input> == (char *) address of value to search on.
- *			 THE PROGRAMMER MUST INSURE THAT THIS ADDRESS
- *			 CORRESPONDS TO THE TABLE COLUMN AND INDEX FILE.
- *
- *   Returns:
- *
- *    set_type		a set corresponding to the vpf table, where each
- *			bit relates to the ID in the table.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Dave Flinn       October 1991
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *	read_thematic_index_header		see below
- *	set_init				SET.C
- *	set_insert
- *	Vpf_Read_* macros
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-set_type search_thematic_index ( ThematicIndex *idx,
-				 char *value )
-{
-  ossim_int32 			i , ival = 0, Match = -1;
-  short int			sval = 0;
-  float				fval = 0.0 ;
-  double			dval = 0.0 , atof () ;
-  char				*buf = (char *) NULL, bufalloc=0 ;
-  ThematicIndexDirectory	d ;
-  set_type			s ;
-
-  /* open output index file */
-
-  if (!idx->fp) {
-     s = set_init(1);
-     return s;
-  }
-
-  if ( idx->h.index_type == 'G' ) {
-    s = search_gazetteer_index ( idx, value ) ;
-    return s ;
-  }
-
-  if ( value ) 		/* search for pattern */
-    switch ( idx->h.column_type ) {			/* using address */
-    case	'I':
-      memcpy ( &ival, value, sizeof (ossim_int32)) ;
-      break ;
-    case	'S':
-      memcpy ( &sval, value, sizeof (short int)) ;
-      break ;
-    case	'F':
-      memcpy ( &fval, value, sizeof (float)) ;
-      break ;
-    case	'R':
-      memcpy ( &dval, value, sizeof (double)) ;
-      break ;
-    case	'T':
-      buf = (char *) vpfmalloc ( idx->h.type_count ) ;
-      /* leave value as is */
-      bufalloc = 1;
-      break ;
-    }
-  else
-    SWhimper ( "require a value to search on.") ;
-
-  /* create set */
-
-  s = set_init ( idx->h.table_nrows ) ;
-
-  /* Look for a matching directory entry */
-
-  fseek(idx->fp,THEMATIC_INDEX_HEADER_SIZE,SEEK_SET);
-
-  for ( i=0; i < idx->h.nbins; i++ ) {
-
-    switch ( idx->h.column_type ) {
-    case 	'I':
-      Read_Vpf_Int ( &d.value.ival, idx->fp, 1) ;
-      if ( ival == d.value.ival ) {
-	/* found the match */
-	Match = i ;
-	i = idx->h.nbins ;	/* exit */
-      }
-      break ;
-    case 	'S':         
-      Read_Vpf_Short ( &d.value.sval, idx->fp, 1) ;
-      if ( sval == d.value.sval ) {
-	/* found the match */
-	Match = i ;
-	i = idx->h.nbins ;	/* exit */
-      }
-      break ;
-    case 	'F':
-      Read_Vpf_Float ( &d.value.fval, idx->fp, 1) ;
-      if ( fval == d.value.fval ) {
-	/* found the match */
-	Match = i ;
-	i = idx->h.nbins ;	/* exit */
-      }
-      break ;
-    case 	'R':         
-      Read_Vpf_Float ( &d.value.dval, idx->fp, 1) ;
-      if ( dval == d.value.dval ) {
-	/* found the match */
-	Match = i ;
-	i = idx->h.nbins ;	/* exit */
-      }
-      break ;
-    case 	'T':
-      Read_Vpf_Char ( buf, idx->fp, idx->h.type_count ) ;
-      bufalloc = 1;
-      if ( ! strcmp ( value, buf ) ) {
-	/* found the match */
-	Match = i ;
-	i = idx->h.nbins ;	/* exit */
-      }
-      break ;
-    } /* end of switch */
-
-    Read_Vpf_Int ( &d.start_offset, idx->fp, 1) ;
-    Read_Vpf_Int ( &d.num_items, idx->fp, 1) ;
-
-  }  /* end of i loop */
-
-  if ( bufalloc ) free ( buf ) ;
-
-  if ( Match < 0 ) {
-     return s;
-  }
-
-  /* We've got a match, so now read the ids in */
-
-  if ( fseek ( idx->fp, d.start_offset, 0 ) != 0 )
-    SWhimper ( "error in fseek") ;
-
-  /* read data into user-defined pointer.  User must free this pointer */
-
-  if ( idx->h.id_data_type == 'I' )
-    for ( i=0 ; i < d.num_items; i++ ) {
-      Read_Vpf_Int ( &ival, idx->fp, 1 ) ;
-      set_insert ( ival, s ) ;			/* set the id in the set */
-    }
-  else
-    for ( i=0 ; i < d.num_items; i++ ) {
-      Read_Vpf_Short ( &sval, idx->fp, 1 ) ;
-      set_insert ( (ossim_int32) sval, s ) ;
-    }
-
-  return s ;					/* also return set */
-
-}   /*end of search_index */
-
-
-/*************************************************************************
- *
- *N  close_thematic_index
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *	Close a thematic index.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    idx <input> == (ThematicIndex *) thematic index
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Dave Flinn       October 1991
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *	read_thematic_index_header		see below
- *	set_init				SET.C
- *	set_insert
- *	Vpf_Read_* macros
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-void close_thematic_index ( ThematicIndex *idx )
-{
-  fclose ( idx->fp ) ;
-  if (idx->d) free(idx->d);
-  if (idx->gid) free(idx->gid);
-}
-
-/*************************************************************************
- *
- *N  create_gazetteer_index
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *	To create a gazetteer file
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *
- *    tablename  <input> == (char *) the name of an existing file
- *					<= 11 chars long
- *    idx_fname  <input> == (char *) name of index file
- *    columnname <input> == (char *) is a column existing in tablename
- *				        <= 24 chars long
- *
- *    idx_set <input> == (char *) is an array of printable ASCII characters 
- *				with no duplicates
- *
- *    return value < 0
- *
- *  	  -1 some OS error, check errno for something more exact
- *        -2 tablename is not a vpf table
- *        -3 columnname is not in the vpf table 
- *        -4 column type not text
- *
- *    return value = 0
- *         an index record for each character in index_set has been created
- *
- *         the index file name is the same as tablename but with .?ti
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    	Jim Tenbrink
- *	Dave Flinn       October 1991
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *	read_thematic_index_header		see below
- *	set_init				SET.C
- *	set_insert
- *	Vpf_Read_* macros
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-
-ossim_int32 create_gazetteer_index (char *tablename,
-				 char *idx_fname ,
-				 char *columnname,
-				 char *idx_set)
-{
-  vpf_table_type t;
-  row_type       r;
-  ossim_int32       c;
-  FILE         * idx_fp;
-  ThematicIndexHeader
-                 gi;
-  ThematicIndexDirectory
-               * gid;
-  set_type     * idx_bit_sets;
-  register ossim_int32   i,
-                      j;
-  ossim_uint32 l,
-                    set_byte_size;
-
-  t = vpf_open_table(tablename, disk, "rb", NULL);
-  c = table_pos(strupr(columnname), t);
-
-  if (t.header[c].type != 'T') {
-    vpf_close_table(&t);
-    return -4;
-  }
-
-  idx_fp = fopen(idx_fname, "wb");
-
-  if (idx_fp == NULL)
-    return -1;
-
-  /* only write out the table name, not the rest */
-
-  for ( i = (long)strlen ( tablename ); i > 0; i-- )
-    if ( tablename[i] == '/' ) break ;
-  if ( i && (unsigned int)i < strlen (tablename) )
-    strcpy ( gi.vpf_table_name, strupr ( &tablename[i+1] ) ) ;
-  else
-    strcpy(gi.vpf_table_name, strupr ( tablename) );
-  strcpy(gi.vpf_column_name, columnname);
-
-  gi.column_type = 'T';
-  gi.index_type  = 'G';
-  gi.type_count = 1 ;
-  gi.id_data_type = 'S' ;
-  gi.nbins       = (long)strlen(idx_set);
-  gi.table_nrows = t.nrows;
-  set_byte_size  = (unsigned int)ceil(t.nrows/8.0);
-
-  /* force input string to lower case , rdf */
-
-  for ( i=0; i < gi.nbins; i++ )
-    idx_set[i] = tolower ( idx_set[i] ) ;
-
-  /*
-   * ti.nbytes is the offset into the index file at which the
-   * bit arrays start
-   */
-
-  gi.nbytes = THEMATIC_INDEX_HEADER_SIZE +
-              gi.nbins * ( sizeof (char) + DIRECTORY_SIZE ) ;
-
-  gid = (ThematicIndexDirectory *) malloc(sizeof(ThematicIndexDirectory)
-					  * gi.nbins);
-  idx_bit_sets = (set_type *) malloc(sizeof(set_type) * gi.nbins);
-
-  for (i = 0; i < gi.nbins; i++) {
-    idx_bit_sets[i]   = set_init(t.nrows);
-    gid[i].value.cval = idx_set[i];
-    gid[i].num_items  = 1;
-  }
-
-  /*
-   * lets suck up some CPU cycles here
-   */
-  for (l = 0; (int)l < t.nrows; l++) {
-
-    r = get_row(l+1, t);
-
-    for (i = 0; i < gi.nbins; i++)
-      for (j = 0; j < r[c].count; j++)
-	/* No matter the input character, make it lower case , rdf added */
-        if ( tolower (*((char *) r[c].ptr + j)) == idx_set[i]) {
-          set_insert(l, idx_bit_sets[i]);
-          break;
-        }
-
-    free_row(r, t);
-
-  }
-
-  vpf_close_table(&t);
-
-  if (write_thematic_index_header(gi, idx_fp) == (ossim_int32)0) {
-    fclose(idx_fp);
-    for (i = 0; i < gi.nbins; i++)
-      set_nuke(&idx_bit_sets[i]);
-    return -1;
-  }
-
-  if (write_gazetteer_index_directory(gi,
-                                     gid,
-                                     set_byte_size,
-                                     idx_fp) == 0         ) {
-    fclose(idx_fp);
-    for (i = 0; i < gi.nbins; i++)
-      set_nuke(&idx_bit_sets[i]);
-    return -1;
-  }
-
-  for (i = 0; i < gi.nbins; i++) {
-    if ( ! Write_Vpf_Char(idx_bit_sets[i].buf, idx_fp, set_byte_size) ) {
-      fclose(idx_fp);
-      for (i = 0; i < gi.nbins; i++)
-        set_nuke(&idx_bit_sets[i]);
-      return -1;
-    }
-  }
-
-  fclose(idx_fp);
-  for (i = 0; i < gi.nbins; i++)
-    set_nuke(&idx_bit_sets[i]);
-  free(idx_bit_sets);
-
-  return 0;
-}
-
-
-
-/*************************************************************************
- *
- *N  read_gazetteer_index
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *	To read an gazeeteer index file, and return a set type array
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *    idx_fname <input> == (char *) the name of a vpf gazetteer index
- *                         created with a call to to create_gaz_index.
- *
- *    query_str <input> == (char *) string that contains only characters
- *                         which form a subset of the characters passed
- *                         to create_gaz_index when idx_fname was created.
- *
- *      the vpf table from which the file idx_fname was derived must
- *      exist in the same directory as idx_fname
- *
- * out: case the returned set size > 0
- *        a bit array which can be used as a rough filter for the
- *        vpf table from which the index file idx_fname was derived.
- *    
- *      bits which are set in the array are the record numbers in the vpf table
- *        (from which idx_fname was derived) which may contain query_string
- *
- *      case the returned set size = 0
- *        some system error occurred
- *        most likely the indexed vpf table couldn't be found in the
- *        same directory
- *
- * note: query_str is treated as a set, so duplicate occurrences
- *       of the same character are ignored. I need a way of flagging
- *       those duplicate occurrences. Instead of sorting the string
- *       and removing duplicates, I use the num_items field in each
- *       element of the directory array.
- *
- *   Returns:
- *
- *    set_type		a set corresponding to the vpf table, where each
- *			bit relates to the ID in the table.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    	Jim Tenbrink
- * 	Dave Flinn       October 1991
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *	read_thematic_index_header		see below
- *	set_init				SET.C
- *	set_insert
- *	Vpf_Read_* macros
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-set_type read_gazetteer_index (char *idx_fname, char *query_str )
-{
-  ThematicIndexHeader gi;
-  ThematicIndexDirectory
-                    * gid;
-  FILE              * idx_fp;
-  set_type            query_set = {0, 0},
-		      xsect_set,
-                      result_set;
-  register int        query_len = (int)strlen(query_str),
-                      i,
-                      j;
-  unsigned long       set_byte_size;
-  char                query_char;
-
-  idx_fp = fopen(idx_fname, "rb");
-
-  if (idx_fp == NULL)
-    return query_set;
-
-  if (read_thematic_index_header (&gi, idx_fp) == (ossim_int32)0) {
-    fclose(idx_fp);
-    return query_set;
-  }
-
-  if (read_gazetteer_index_directory (&gid, &gi, idx_fp) == (ossim_int32)0) {
-    fclose(idx_fp);
-    return query_set;
-  }
-
-  for (j = 0; j < gi.nbins; j++)
-    gid[j].num_items = 0;
-
-  query_set = set_init(gi.table_nrows);
-  xsect_set = set_init(gi.table_nrows);
-
-  set_on(query_set);
-  set_byte_size = (unsigned int)ceil(gi.table_nrows/8.0);
-
-  for (i = 0; i < query_len; i++) {
-
-    query_char = tolower(query_str[i]);
-
-    for (j = 0; j < gi.nbins; j++)
-      if (gid[j].value.cval == query_char)  {
-        gid[j].num_items++;
-        break;
-      }
-    if (gid[j].num_items > 1)
-      continue;
-
-    fseek(idx_fp, gid[j].start_offset, 0);
-    if ( ! Read_Vpf_Char(xsect_set.buf, idx_fp, set_byte_size) ) {
-      set_type err = set_init ( 0 ) ;
-      return err ;
-    }
-
-    result_set = set_intersection(query_set, xsect_set);
-    set_assign(&query_set, result_set);
-    set_nuke(&result_set);
-
-  }
-
-  fclose(idx_fp);
-  free(gid);
-  set_nuke(&xsect_set);
-
-  return query_set;
-}
-
-/*************************************************************************
- *
- *N  search_gazetteer_index
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *	To search an gazeeteer index file, and return a set type array
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- * in : idx is the gazetteer index opened with open_thematic_index
- *
- *      query_str contains only characters which form a subset of
- *      the characters passed to create_gaz_index when idx_fname
- *      was created
- *
- *      the vpf table from which the file idx_fname was derived must
- *      exist in the same directory as idx_fname
- *
- * out: case the returned set size > 0
- *        a bit array which can be used as a rough filter for the
- *        vpf table from which the index file idx_fname was derived.
- *    
- *      bits which are set in the array are the record numbers in the vpf table
- *        (from which idx_fname was derived) which may contain query_string
- *
- *      case the returned set size = 0
- *        some system error occurred
- *        most likely the indexed vpf table couldn't be found in the
- *        same directory
- *
- * note: query_str is treated as a set, so duplicate occurrences
- *       of the same character are ignored. I need a way of flagging
- *       those duplicate occurrences. Instead of sorting the string
- *       and removing duplicates, I use the num_items field in each
- *       element of the directory array.
- *
- *   Returns:
- *
- *    set_type		a set corresponding to the vpf table, where each
- *			bit relates to the ID in the table.
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    	Jim Tenbrink
- * 	Dave Flinn       October 1991
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *	read_thematic_index_header		see below
- *	set_init				SET.C
- *	set_insert
- *	Vpf_Read_* macros
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-set_type search_gazetteer_index (ThematicIndex *idx, char *query_str )
-{
-  set_type            query_set = {0, 0, 0, 0},
-		      xsect_set,
-                      result_set;
-  register int        query_len = (int)strlen(query_str),
-                      i,
-                      j;
-  unsigned long       set_byte_size;
-  char                query_char;
-
-  if (idx->fp == NULL)
-    return query_set;
-
-  for (j = 0; j < idx->h.nbins; j++)
-    idx->gid[j].num_items = 0;
-
-  query_set = set_init(idx->h.table_nrows);
-  xsect_set = set_init(idx->h.table_nrows);
-
-  set_on(query_set);
-  set_byte_size = (unsigned int)ceil(idx->h.table_nrows/8.0);
-
-  for (i = 0; i < query_len; i++) {
-
-    query_char = tolower(query_str[i]);
-
-    for (j = 0; j < idx->h.nbins; j++)
-      if (idx->gid[j].value.cval == query_char)  {
-	idx->gid[j].num_items++;
-	break;
-      }
-    if (idx->gid[j].num_items > 1)
-      continue;
-
-    fseek(idx->fp, idx->gid[j].start_offset, 0);
-    if ( ! Read_Vpf_Char(xsect_set.buf, idx->fp, set_byte_size) ) {
-      set_type err = set_init ( 1 ) ;
-      return err ;
-    }
-
-    result_set = set_intersection(query_set, xsect_set);
-    set_assign(&query_set, result_set);
-    set_nuke(&result_set);
-
-  }
-
-  set_nuke(&xsect_set);
-
-  return query_set;
-}
-
-/*************************************************************************
- *
- *N  read_gazetteer_index_directory
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *	To read an index file, regardless of its type ( T or G ) and
- *	return a set type array
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- * in : *gid is undefined
- *
- *      *gi is the gazetteer index header for the open index file
- *      referenced by idx_fp
- *
- * out: case return value is one
- *        *gid is an array of directory entries with gi->nbin elements
- *
- *        the sval member of the value union contains the indexed character
- *
- *        the start_offset member of the directory structure contains the
- *        disk offset for the start of the indexed characters bit array
- *
- *      case zero return value
- *        an error was probably encountered during the read
- *        *gid is undefined
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Dave Flinn       October 1991
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *	read_thematic_index_header		see below
- *	set_init				SET.C
- *	set_insert
- *	Vpf_Read_* macros
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-ossim_int32 read_gazetteer_index_directory(
-				   ThematicIndexDirectory **gid,
-				   ThematicIndexHeader     *gi,
-				   FILE                    *idx_fp)
-{
-  int i;
-
-#if UNIX
-  if ( fseek ( idx_fp,sizeof (ThematicIndexHeader)-sizeof(ossim_int32), 0 )!= 0 )
-#else
-  if (fseek(idx_fp, sizeof (ThematicIndexHeader), 0) != 0)
-#endif
-    return 0 ;
-
-  *gid = (ThematicIndexDirectory *) malloc(sizeof(ThematicIndexDirectory)
-                                           * gi->nbins);
-  if (*gid == NULL)
-    return 0;
-
-  for (i = 0; i < gi->nbins; i++) {
-    if ( ( ! Read_Vpf_Char(  &( (*gid)[i].value.cval ),   idx_fp, 1) ) ||
-	 ( ! Read_Vpf_Int(   &( (*gid)[i].start_offset ), idx_fp, 1) ) ||
-	 ( ! Read_Vpf_Int(   &( (*gid)[i].num_items ),    idx_fp, 1) )) {
-      return (ossim_int32)0 ;
-    }
-  }
-  return 1;
-}
-
-/*************************************************************************
- *
- *N  read_thematic_index_header
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *	To read the thematic index header in a standard way
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *	h < in/out > == (ThematicIndexHeader *) header structure to be filled
- *	ifp <input>  == ( FILE *ifp ) index file pointer
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Dave Flinn       October 1991
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *	Read_Vpf_Int
- *	Read_Vpf_Char
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-
-#define RWhimper() {\
-   return (ossim_int32)0 ; }
-
-ossim_int32 read_thematic_index_header ( ThematicIndexHeader *h, FILE *ifp ) 
-{
-  if ( fseek ( ifp, 0, 0 ) != 0 ) 	/* rewind, just in case */
-    return 0 ;				/* error */
-  if ( ! Read_Vpf_Int ( &h->nbytes, ifp, 1 ) )
-    RWhimper();
-  if ( ! Read_Vpf_Int ( &h->nbins, ifp, 1 ) )
-    RWhimper() ;
-  if ( ! Read_Vpf_Int ( &h->table_nrows, ifp, 1 ) )
-    RWhimper() ;
-  if ( ! Read_Vpf_Char ( &h->index_type, ifp, 1 ) )
-    RWhimper() ;
-  if ( ! Read_Vpf_Char ( &h->column_type, ifp, 1 ) )
-    RWhimper() ;
-  if ( ! Read_Vpf_Int ( &h->type_count, ifp, 1 ) )
-    RWhimper() ;
-  if ( ! Read_Vpf_Char ( &h->id_data_type, ifp, 1 ) )
-    RWhimper() ;
-  if ( ! Read_Vpf_Char ( &h->vpf_table_name, ifp, 12 ) )
-    RWhimper() ;
-  if ( ! Read_Vpf_Char ( &h->vpf_column_name, ifp, 25 ) )
-    RWhimper() ;
-  if ( ! Read_Vpf_Char ( &h->padding, ifp, 4 ) )
-    RWhimper() ;
-  return 1 ;
-}
-
-/*************************************************************************
- *
- *N  write_thematic_index_header
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *	To write the thematic index header in a standard way
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *	h < input > == (ThematicIndexHeader) header structure to write from
- *	ifp <input>  == ( FILE *ifp ) index file pointer
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Dave Flinn       October 1991
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *	Write_Vpf_Int
- *	Write_Vpf_Char
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-
-#define WWhimper() {\
-   return (ossim_int32)0 ; }
-
-ossim_int32 write_thematic_index_header ( ThematicIndexHeader h, FILE *ifp ) 
-{
-  if ( fseek ( ifp, 0, 0 ) != 0 ) 	/* rewind, just in case */
-    WWhimper() ;				/* error */
-  if ( ! Write_Vpf_Int ( &h.nbytes, ifp, 1 ) )
-    WWhimper() ;
-  if ( ! Write_Vpf_Int ( &h.nbins, ifp, 1 ) )
-    WWhimper() ;
-  if ( ! Write_Vpf_Int ( &h.table_nrows, ifp, 1 ) )
-    WWhimper() ;
-  if ( ! Write_Vpf_Char ( &h.index_type, ifp, 1 ) )
-    WWhimper() ;
-  if ( ! Write_Vpf_Char ( &h.column_type, ifp, 1 ) )
-    WWhimper() ;
-  if ( ! Write_Vpf_Int ( &h.type_count, ifp, 1 ) )
-    WWhimper() ;
-  if ( ! Write_Vpf_Char ( &h.id_data_type, ifp, 1 ) )
-    WWhimper() ;
-  if ( ! Write_Vpf_Char ( &h.vpf_table_name, ifp, 12 ) )
-    WWhimper() ;
-  if ( ! Write_Vpf_Char ( &h.vpf_column_name, ifp, 25 ) )
-    WWhimper() ;
-  if ( ! Write_Vpf_Char ( &h.padding, ifp, 4 ) )
-    WWhimper() ;
-  return 1 ;
-}
-
-
-/*************************************************************************
- *
- *N  write_thematic_index_directory
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *	To write the thematic index header in a standard way
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *	h < input > == (ThematicIndexHeader) header structure
- *	d < input > == (ThematicIndexDirectory *) directory array structure
- *	idsize < input > == (ossim_int32) size of each data element.
- *		for T indexes, this is either 2 bytes or 4 bytes
- *		for G indexes, it will be num_in_set (set) 
- *			       or the size of the bit array.
- *	ifp <input>  == ( FILE *ifp ) index file pointer
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Dave Flinn       October 1991
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *	Vpf_Write_*
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-
-#define WTWhimper() {\
-   return (ossim_int32)0 ; }
-
-ossim_int32 write_thematic_index_directory ( ThematicIndexHeader h, 
-					  ThematicIndexDirectory *d,
-					  ossim_int32 idsize , /* size of data */
-					  FILE *ifp )
-{
-  long	int	offset = h.nbytes ,
-                i ;
-
-  /* rewind, just in case */
-#if UNIX
-  if ( fseek ( ifp, sizeof (ThematicIndexHeader)-sizeof(ossim_int32), 0 ) != 0 )
-#else
-  if ( fseek ( ifp, sizeof (ThematicIndexHeader), 0 ) != 0 )
-#endif
-    WTWhimper() ;
-
-  for ( i=0; i < h.nbins; i++ ) {
-    
-    switch ( h.column_type ) {
-    case 'I':
-      if ( ! Write_Vpf_Int ( &d[i].value.ival, ifp, 1 ) )
-	WTWhimper() ;
-      break ;
-    case 'T':
-      /* Not tested for text strings */
-      if ( ! Write_Vpf_Char ( &d[i].value.strval, ifp, h.type_count ) )
-	WTWhimper() ;
-      break ;
-    case 'S':
-      if ( ! Write_Vpf_Short ( &d[i].value.sval, ifp, 1 ) )
-	WTWhimper() ;				
-      break ;
-    case 'F':
-      if ( ! Write_Vpf_Float ( &d[i].value.fval, ifp, 1 ) )
-	WTWhimper() ;				
-      break ;
-    case 'R':
-      if ( ! Write_Vpf_Double ( &d[i].value.dval, ifp, 1 ) )
-	WTWhimper() ;				
-      break ;
-    }	/* end of switch */
-
-    if ( ! Write_Vpf_Int ( &offset, ifp, 1 ) )
-	WTWhimper() ;				
-    if ( ! Write_Vpf_Int ( &d[i].num_items, ifp, 1 ) )
-	WTWhimper() ;				
-    
-    /* this offset is constant, no matter the data type */
-
-    offset += ( idsize * d[i].num_items ) ;
-
-  }  /* end of i loop */
-
-  return 1 ;
-
-}    /* end of write_directory */
-
-
-/*************************************************************************
- *
- *N  write_gazetteer_index_directory
- *
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Purpose:
- *P
- *	To write the gazetteer thematic index header in a standard way
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Parameters:
- *A
- *	h < input > == (ThematicIndexHeader) header structure 
- *	d < input > == (ThematicIndexDirectory *) directory array structure
- *	idsize < input > == (ossim_int32) size of each data element.
- *		for T indexes, this is either 2 bytes or 4 bytes
- *		for G indexes, it will be num_in_set (set) 
- *			       or the size of the bit array.
- *	ifp <input>  == ( FILE *ifp ) index file pointer
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   History:
- *H
- *    Dave Flinn       October 1991
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   External Variables:
- *X
- *    None
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Functions Called:
- *F
- *	Vpf_Write_*
- *E
- *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- *
- *   Portability:
- *O
- *    This module should be ANSI C compatible.
- *E
- *************************************************************************/
-
-#define WTGWhimper() {\
-  return (ossim_int32)0 ; }
-
-ossim_int32 write_gazetteer_index_directory ( ThematicIndexHeader h, 
-					  ThematicIndexDirectory *d, 
-					  ossim_int32 idsize , /* size of data */
-					  FILE *ifp )
-{
-  long	int	offset = h.nbytes ,
-                i ;
-
-  /* rewind, just in case */
-
-  if ( fseek ( ifp, THEMATIC_INDEX_HEADER_SIZE, 0 )!= 0 )
-    WTWhimper() ;				
-
-  for ( i=0; i < h.nbins; i++ ) {
-    
-    if ( ! Write_Vpf_Char ( &d[i].value.cval, ifp, 1 ) )
-      WTGWhimper() ;
-
-    if ( ! Write_Vpf_Int ( &offset, ifp, 1 ) )
-	WTGWhimper() ;				
-    if ( ! Write_Vpf_Int ( &d[i].num_items, ifp, 1 ) )
-	WTGWhimper() ;				
-    
-    /* this offset is constant, no matter the data type */
-
-    offset += ( idsize * d[i].num_items ) ;
-
-  }  /* end of i loop */
-
-  return 1 ;
-
-}    /* end of write_directory */
-
-
diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
deleted file mode 100644
index 74105f8..0000000
--- a/src/test/CMakeLists.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-# $Id: CMakeLists.txt 22354 2013-08-02 16:22:15Z gpotts $
-
-OSSIM_SETUP_APPLICATION(ossim-byte-stream-buffer-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-byte-stream-buffer-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-csv-file-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-csv-file-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-date-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-date-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-datum-shift COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-datum-shift.cpp)
-OSSIM_SETUP_APPLICATION(ossim-directory-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-directory-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-duration-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-duration-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-elevation-manager-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-elevation-manager-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-envi-hdr-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-envi-hdr-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-epsg-factory-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-epsg-factory-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-fgdc-txt-doc-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-fgdc-txt-doc-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-filename-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-filename-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-foo COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-foo.cpp)
-OSSIM_SETUP_APPLICATION(ossim-get-pixel-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-get-pixel-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-gpt-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-gpt-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-gsd-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-gsd-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-histo-compare COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-histo-compare.cpp)
-OSSIM_SETUP_APPLICATION(ossim-image-chain-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-image-chain-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-image-elevation-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-image-elevation-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-image-geometry-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-image-geometry-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-image-handler-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-image-handler-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-info-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-info-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-image-writer-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-image-writer-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-jobqueue-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-jobqueue-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-keywordlist-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-keywordlist-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-loadtile-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-loadtile-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-lsr-space-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-lsr-space-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-mask-filter-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-mask-filter-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-notify-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-notify-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-pixel-flipper-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-pixel-flipper-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-point-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-point-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-projection-factory-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-projection-factory-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-projection-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-projection-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-read-write-consistency-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-read-write-consistency-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-ref-ptr-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-ref-ptr-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-remap-table-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-remap-table-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-single-image-chain-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-single-image-chain-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-single-image-chain-threaded-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-single-image-chain-threaded-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-string-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-string-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-thin-plate-spline-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-thin-plate-spline-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-threaded-chain-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-threaded-chain-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-threaded-elevation-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-threaded-elevation-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-threaded-polyarea2d-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-threaded-polyarea2d-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-tiled-elevation-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-tiled-elevation-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-tiff-info-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-tiff-info-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-visitor-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-visitor-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-wavelength-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-wavelength-test.cpp)
-OSSIM_SETUP_APPLICATION(ossim-xml-test COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ossim-xml-test.cpp)
diff --git a/src/test/ossim-date-test.cpp b/src/test/ossim-date-test.cpp
deleted file mode 100644
index 199c465..0000000
--- a/src/test/ossim-date-test.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Test code for generic ossim test.
-//
-// 
-//----------------------------------------------------------------------------
-// $Id: ossim-date-test.cpp 19751 2011-06-13 15:13:07Z dburken $
-
-#include <iostream>
-using namespace std;
-
-#include <ossim/base/ossimDate.h>
-#include <ossim/init/ossimInit.h>
-
-int main(int argc, char *argv[])
-{
-   ossimInit::instance()->initialize(argc, argv);
-
-   std::string s1 = "2009-02-05T11:26:13.458650Z";
-   ossimLocalTm d1;
-   d1.setIso8601(s1);
-   
-   std::string s2 = "2009-01-11T09:06:05.606000Z";
-   ossimLocalTm d2;
-   d2.setIso8601(s2);
-
-   cout << "s1: " << s1 << "\n";
-   d1.dump(std::cout);
-   cout << "s2: " << s2 << "\n";
-   d2.dump(std::cout);
-
-   ossimLocalTm d4;
-   cout << "local time:\n";
-   d4.dump(cout);
- 
-   ossimLocalTm d5 = d4.convertToGmt();
-   cout << "local time converted to GMT:\n";
-   d5.dump(cout);
-
-   
-   ossimDate d6;
-   cout << "Date:\n";
-   d6.print(cout);
-   cout << "\n";
-   d6.dump(cout);
-   cout << endl;
-
-   return 0;
-}
-
diff --git a/src/test/ossim-directory-test.cpp b/src/test/ossim-directory-test.cpp
deleted file mode 100755
index 582f4c2..0000000
--- a/src/test/ossim-directory-test.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossim-directory-test.cpp
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description:
-//
-// Test application for ossimDirectory class.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/init/ossimInit.h>
-#include <ossim/base/ossimDirectory.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimFilename.h>
-#include <iostream>
-using namespace std;
-
-static void usage()
-{
-   cout << "ossim-directory-test <directory>"
-        << "\nDumps files in directory..." << endl;
-}
-
-int main(int argc, char *argv[])
-{
-   int result = 0;
-   
-   ossimInit::instance()->initialize(argc, argv);
-   
-   if (argc == 2)
-   {
-      try // Exceptions can be thrown so 
-      {
-         ossimFilename directory = argv[1];
-         
-         cout << "directory: " << directory << "\n";
-         directory = directory.expand();
-
-         ossimDirectory d;
-         if ( d.open(directory) )
-         {
-            ossimFilename f;
-            if ( d.getFirst(f) )
-            {
-               do
-               {
-                  if ( f.size() )
-                  {
-                     cout << "file: " << f << endl;
-                  }
-                  else
-                  {
-                     cout << "file is empty!" << endl;
-                  }
-               } while ( d.getNext(f) );
-            }
-            else
-            {
-               cout << "ossimDirectory::getFirst() returned false!" << endl;
-            }
-         }
-      }
-      catch( const ossimException& e )
-      {
-         cout << e.what() << endl;
-         result = 1;
-      }
-   }
-   else
-   {
-      usage();
-   }
-   
-   return result;
-}
diff --git a/src/test/ossim-elevation-manager-test.cpp b/src/test/ossim-elevation-manager-test.cpp
deleted file mode 100644
index 2e5b5c4..0000000
--- a/src/test/ossim-elevation-manager-test.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  David Burken
-//
-// Description: Test code for ossimElevManger.
-//
-// $Id: ossim-elevation-manager-test.cpp 19751 2011-06-13 15:13:07Z dburken $
-//----------------------------------------------------------------------------
-#include <iostream>
-using namespace std;
-
-#include <ossim/init/ossimInit.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/elevation/ossimElevManager.h>
-
-int main(int argc, char *argv[])
-{
-   ossimInit::instance()->initialize(argc, argv);
-
-   if (argc != 2)
-   {
-      cout << "usage: " << argv[0] << " <elevationDirectoryToOpen>" << endl;
-      return 0;
-   }
-   
-   ossimFilename dir = argv[1];
-
-   cout << "dir: " << dir << endl;
-   
-   if (ossimElevManager::instance()->loadElevationPath(dir))
-   {
-      cout << "ossimElevManager::openDirectory worked for: " << dir << endl;
-   }
-   else
-   {
-      cout << "ossimElevManager::openDirectory failed for: " << dir << endl;
-   }
-   return 0;
-}
diff --git a/src/test/ossim-envi-hdr-test.cpp b/src/test/ossim-envi-hdr-test.cpp
deleted file mode 100644
index 0b0d9af..0000000
--- a/src/test/ossim-envi-hdr-test.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Test app for ossimEnviHeader class.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/init/ossimInit.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/support_data/ossimEnviHeader.h>
-#include <iostream>
-using namespace std;
-
-
-int main(int argc, char *argv[])
-{
-   ossimInit::instance()->initialize(argc, argv);
-
-   if (argc != 2)
-   {
-      cout << argv[0] << " <envi_header_file>"
-           << "\nOpen, parse and print ossimEnviHeader object." << endl;
-      return 0;
-   }
-
-   cout << "ossimEnviHeader test:\n";
-
-   ossimEnviHeader hdr;
-   if ( hdr.open( ossimFilename( argv[1] ) ) )
-   {
-      ossimString s = "Hello world...";
-      hdr.setDescription( s );
-      
-      cout << hdr << endl;
-   }
-   else
-   {
-      cout << "Could not open: " << argv[1] << endl;
-   }
-
-   return 0;
-}
diff --git a/src/test/ossim-fgdc-txt-doc-test.cpp b/src/test/ossim-fgdc-txt-doc-test.cpp
deleted file mode 100644
index a61e8a1..0000000
--- a/src/test/ossim-fgdc-txt-doc-test.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File ossim-fgdc-txt-doc-test.cpp
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Test application for ossimFgdcTxtDoc class.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossim-info-test.cpp 19751 2011-06-13 15:13:07Z dburken $
-
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/support_data/ossimFgdcTxtDoc.h>
-
-#include <iostream>
-using namespace std;
-
-int main(int argc, char *argv[])
-{
-   ossimArgumentParser ap(&argc, argv);
-
-   // Initialize ossim stuff, factories, plugin, etc.
-   ossimInit::instance()->initialize(ap);
-
-   if ( ap.argc() == 2 )
-   {
-      try
-      {
-         // Test the ossimFgdcTxtDoc
-         ossimRefPtr<ossimFgdcTxtDoc> fgdcDoc = new ossimFgdcTxtDoc();
-         ossimFilename file(argv[1]);
-         if ( fgdcDoc->open( file ) )
-         {
-            cout << "opened: " << file << endl;
-            ossimRefPtr<ossimProjection> proj;
-            fgdcDoc->getProjection(proj);
-            if ( proj.valid() )
-            {
-               proj->print(cout);
-            }
-
-            std::string units;
-            fgdcDoc->getAltitudeDistanceUnits(units);
-            cout << "units: " << units << endl;
-         }
-         
-      }
-      catch (const ossimException& e)
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
-         return 1;
-      }
-      
-   }  // End: if ( ( ap.argc() == 2 ) ...
-   else
-   {
-      cout << argv[0] << " <FGDC-text-doc.txt>\nTest ossimFgdcTxtDoc class..." << endl;
-   }
-   
-   return 0;
-   
-} // End of main...
diff --git a/src/test/ossim-filename-test.cpp b/src/test/ossim-filename-test.cpp
deleted file mode 100644
index ff81f8d..0000000
--- a/src/test/ossim-filename-test.cpp
+++ /dev/null
@@ -1,201 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// ossimFilename class test app.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossim-filename-test.cpp 20097 2011-09-14 17:03:00Z dburken $
-
-#include <ossim/init/ossimInit.h>
-#include <ossim/base/ossimFilename.h>
-
-#include <iostream>
-#include <string>
-using namespace std;
-
-int main(int argc, char *argv[])
-{
-   ossimInit::instance()->initialize(argc, argv);
-
-   ossimFilename directoryToDelete;
-
-   if ( argc == 2 )
-   {
-      ossimString osArg1 = argv[1];
-      osArg1.downcase();
-      if ( (osArg1 == "-h") || (osArg1 == "--help") )
-      {
-         cout << "\nUsage: ossim-filename-test <optional_directory_to_delete>\n"
-              << "Runs various test on ossimFilename class.\n"
-              << "If optional_directory_to_delete is set calls ossimFilename::remove on it.\n"
-              << "Options: -h --help Gives this usage.\n" << endl;
-         return 0;
-      }
-      else
-      {
-         directoryToDelete = argv[1];
-      }
-   }
-         
-   ossimFilename a  = "c:\\foo\\you";
-   ossimFilename a2 = "\\foo\\you";
-   ossimFilename b  = "/foo/you";
-   ossimFilename c  = "foo/you";
-   ossimFilename d1 = "~/docs";
-   ossimFilename d2 = "./foo";
-   ossimFilename d3 = "../../foo";
-   ossimFilename d4 = ".";
-   ossimFilename d5 = "ab";
-   ossimFilename d6 = "a";
-
-   // Environment var WORK must be set.
-   ossimFilename d7 = "$(WORK)/ossim";
-   ossimFilename d8 = "~/tmp/$(WORK)/ossim";
-   
-  ossimFilename e = "/foo/you.xxx";
-   ossimString   ext1 = ".tif";
-   ossimString   ext2 = "jpg";
-   ossimString   ext3;
-
-
-   cout << "\na:              " << a
-        << "\na.expand():     " << a.expand()
-        << "\na.isRelative(): " << a.isRelative() << "\n"
-
-        << "\na2:              " << a2
-        << "\na2.expand():     " << a2.expand()
-        << "\na2.isRelative(): " << a2.isRelative() << "\n"      
-
-        << "\nb:              " << b
-        << "\nb.expand():     " << b.expand()
-        << "\nb.isRelative(): " << b.isRelative() << "\n"
-      
-        << "\nc:              " << c
-        << "\nc.expand():     " << c.expand()
-        << "\nc.isRelative(): " << c.isRelative() << "\n"
-
-        << "\nd1:              " << d1
-        << "\nd1.expand():     " << d1.expand()
-        << "\nd1.isRelative(): " << d1.isRelative() << "\n"
-      
-        << "\nd2:              " << d2
-        << "\nd2.expand():     " << d2.expand()
-        << "\nd2.isRelative(): " << d2.isRelative() << "\n"
-
-        << "\nd3:              " << d3
-        << "\nd3.expand():     " << d3.expand()
-        << "\nd3.isRelative(): " << d3.isRelative() << "\n"
-
-        << "\nd4:              " << d4
-        << "\nd4.expand():     " << d4.expand()
-        << "\nd4.isRelative(): " << d4.isRelative() << "\n"
-
-        << "\nd5:              " << d5
-        << "\nd5.expand():     " << d5.expand()
-        << "\nd5.isRelative(): " << d5.isRelative() << "\n"
-      
-        << "\nd6:              " << d6
-        << "\nd6.expand():     " << d6.expand()
-        << "\nd6.isRelative(): " << d6.isRelative() << "\n";
-
-   cout << "\nNOTE: d7 and d8 output require variable WORK be set in your "
-        << "environment.\n"
-      
-        << "\nd7:              " << d7
-        << "\nd7.expand():     " << d7.expand()
-        << "\nd7.isRelative(): " << d7.isRelative() << "\n"
-
-        << "\nd8:              " << d8
-        << "\nd8.expand():     " << d8.expand()
-        << "\nd8.isRelative(): " << d8.isRelative() << "\n"
-      
-        << "\next1:        " << ext1
-        << "\next2:        " << ext2
-        << "\next3:        " << ext3 << "\n";
-   
-   cout << "e:                    " << e << "\n";
-   cout << "e.setExtension(ext1): " << e.setExtension(ext1) << "\n";
-   cout << "e.setExtension(ext2): " << e.setExtension(ext2) << "\n";
-   cout << "e.setExtension(ext3): " << e.setExtension(ext3) << "\n";
-
-   // Test dir cat.
-   a = "/foo/";
-   b = "you";
-   c = a.dirCat(b);
-   cout << "\na:           " << a
-        << "\nb:           " << b
-        << "\nc = a.dirCat(b): " << c << "\n";
-
-   a = "/foo";
-   b = "you";
-   c = a.dirCat(b);
-   cout << "\na:           " << a
-        << "\nb:           " << b
-        << "\nc = a.dirCat(b): " << c << "\n";
-
-   a = "/foo";
-   b = "./you";
-   c = a.dirCat(b);
-   cout << "\na:           " << a
-        << "\nb:           " << b
-        << "\nc = a.dirCat(b): " << c << "\n";
-
-   a = "/foo";
-   b = "/you";
-   c = a.dirCat(b);
-   cout << "\na:           " << a
-        << "\nb:           " << b
-        << "\nc = a.dirCat(b): " << c << "\n";
-
-   a = "/foo";
-   b = "";
-   c = a.dirCat(b);
-   cout << "\na:           " << a
-        << "\nb:           " << b
-        << "\nc = a.dirCat(b): " << c << "\n";
-
-   a = "";
-   b = "you";
-   c = a.dirCat(b);
-   cout << "\na:           " << a
-        << "\nb:           " << b
-        << "\nc = a.dirCat(b): " << c << "\n";
-
-   a = "/data/images/t1.tif";
-   cout << "\na: " << a
-        << "\na.fileNoExtension(): " << a.fileNoExtension()
-        << "\na.noExtension(): " << a.noExtension() << "\n";
-
-   // Test a file with two dots.
-   a = "/data/ascii_dems/dtm_v1.5_5mp_3141.asc";
-   cout << "\n// Test a file with two dots."
-        << "\na: " << a
-        << "\na.fileNoExtension(): " << a.fileNoExtension()
-        << "\na.noExtension(): " << a.noExtension() << "\n";
-
-   std::string s = "abc";
-   ossimFilename f = s; // Used to not compile.
-   cout << "ossimFilename f = std::string(abc): " << f << "\n";
-
-   if ( directoryToDelete.size() )
-   {
-      cout << "ossimFilename::remove on " << directoryToDelete << " was ";
-      if ( directoryToDelete.remove() )
-      {
-         cout << "successful...\n";
-      }
-      else
-      {
-         cout << "unsuccessful...\n";
-      }
-   }
-
-   cout << endl;
-   
-   return 0;
-}
diff --git a/src/test/ossim-foo.cpp b/src/test/ossim-foo.cpp
deleted file mode 100644
index 2c9de9c..0000000
--- a/src/test/ossim-foo.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file.
-//
-// File: ossim-foo.cpp
-//
-// Author:  David Burken
-//
-// Description: Contains application definition "ossim-foo" app.
-//
-// NOTE:  This is supplied for simple quick test. DO NOT checkin your test to
-//        the svn repository.  Simply edit ossim-foo.cpp and run your test.
-//        After completion you can do a "svn revert foo.cpp" if you want to
-//        keep your working repository up to snuff.
-//
-// $Id: ossim-foo.cpp 20095 2011-09-14 14:37:26Z dburken $
-//----------------------------------------------------------------------------
-
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <ossim/base/ossimConstants.h>  // ossim contants...
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/init/ossimInit.h>
-
-// Put your includes here:
-
-#include <iostream>
-#include <sstream>
-using namespace std;
-
-int main(int argc, char *argv[])
-{
-   ossimArgumentParser ap(&argc, argv);
-   ossimInit::instance()->addOptions(ap);
-   ossimInit::instance()->initialize(ap);
-
-   try
-   {
-      // Put your code here.
-   }
-   catch (const ossimException& e)
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
-      return 1;
-   }
-   
-   return 0;
-}
diff --git a/src/test/ossim-get-pixel-test.cpp b/src/test/ossim-get-pixel-test.cpp
deleted file mode 100644
index 88a6583..0000000
--- a/src/test/ossim-get-pixel-test.cpp
+++ /dev/null
@@ -1,218 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description: ossim-get-pixel-test.cpp
-//
-// Test code to spit out a pixel value at a given band, line, sample.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossim-get-pixel-test.cpp 22073 2013-01-04 21:27:39Z dburken $
-
-#include <ossim/init/ossimInit.h>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimProperty.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-
-#include <iostream>
-#include <vector>
-using namespace std;
-
-static void usage(ossimArgumentParser& ap)
-{
-   // Add global usage options.
-   ossimInit::instance()->addOptions(ap);
-   
-   ossimApplicationUsage* au = ap.getApplicationUsage();
-   
-   // Set app name.
-   au->setApplicationName(ap.getApplicationName());
-   
-   au->setDescription(ossimString("Returns pixel value at the given sample and line.\nNotes:\nBand, line and sample are zero based.\nUse an \"a\" for <band> if you want to see all bands.\n"));
-   
-   ossimString usageString = ap.getApplicationName();
-   usageString += " [options] <imagefile> <band> <sample> <line>\n";
-   au->setCommandLineUsage(usageString);
-   
-   au->addCommandLineOption("-e","<entry_index> Entry index to get pixel from.  Only significant with multi entry data only.");
-
-   au->addCommandLineOption("--reader-prop","Passes a name=value pair to the reader(s) for setting it's property.  Any number of these can appear on the line.");
-   
-   // Write usage.
-   au->write(ossimNotify(ossimNotifyLevel_INFO));
-}
-
-struct readerProp
-{
-   ossimString name;
-   ossimString value;
-};
-
-/**
- * @brief Adds band to bandList returning true on success, false on range error
- * with error message to standard out.
- */
-static bool addBand( ossim_uint32 band,
-                     ossim_uint32 bandCount,
-                     vector<ossim_uint32>& bandList );
-
-int main(int argc, char *argv[])
-{
-   // Initialize:
-   ossimArgumentParser ap(&argc, argv);
-   ossimInit::instance()->addOptions(ap);
-   ossimInit::instance()->initialize(ap);
-
-   // Argument check:
-   if ( (ap.argc() < 5) || ap.read("-h") || ap.read("--help") )
-   {
-      usage(ap);
-      return 1;
-   }
-
-   // Read options:
-   
-   // For argument parser reads.
-   ossimString ts1;
-   ossimArgumentParser::ossimParameter sp1(ts1);
-
-   // Entry index:
-   ossim_uint32 entryIndex = 0;
-   if ( ap.read("-e", sp1) )
-   {
-      entryIndex = ts1.toUInt32();
-   }
-
-   // Set the reader properties if any.
-   std::vector<readerProp> readerProps;
-   while(ap.read("--reader-prop", sp1))
-   {
-      std::vector<ossimString> splitArray;
-      ts1.split(splitArray, "=");
-      if(splitArray.size() == 2)
-      {
-         readerProp prop;
-         prop.name = splitArray[0];
-         prop.value = splitArray[1];
-         readerProps.push_back(prop);
-      }
-   }
-
-   ap.reportRemainingOptionsAsUnrecognized();
-
-   // Check the input file:
-   ossimFilename imageFile = argv[1];
-   if ( !imageFile.exists() )
-   {
-      usage(ap);
-      return 1;
-   }
-
-   // Open up an image handler.
-   ossimRefPtr<ossimImageHandler> ih
-      = (ossimImageHandler*)ossimImageHandlerRegistry::instance()->open( imageFile );
-   if ( ih.valid() == false )
-   {
-      cerr << "Could not open: " << imageFile << endl;
-      return 1;
-   }
-
-   if ( entryIndex )
-   {
-      if ( ih->setCurrentEntry( entryIndex ) == false )
-      {
-         cerr << "Invalid entry: " << entryIndex << endl;
-         return 1;
-      }
-   }
-   
-   // Set the reader properties if any.
-   if ( readerProps.size() )
-   {
-      std::vector<readerProp>::const_iterator i = readerProps.begin();
-      while( i != readerProps.end() )
-      {
-         ossimRefPtr<ossimProperty> prop = new ossimStringProperty( (*i).name, (*i).value );
-         ih->setProperty(prop);
-         ++i;
-      }
-   }
-
-   vector<ossim_uint32> bandList;
-   ossimString bandString = argv[2];
-
-   const ossim_uint32 BANDS = ih->getNumberOfOutputBands();
-   if ( bandString.downcase() == "a" )
-   {
-      for ( ossim_uint32 band = 0; band < BANDS; ++band)
-      {
-         if ( addBand( band, BANDS, bandList ) == false )
-         {
-            return 1;
-         }
-      }
-   }
-   else
-   {
-      ossim_int32 band = bandString.toUInt32();
-      if ( addBand( band, BANDS, bandList ) == false )
-      {
-         return 1;
-      }
-   }
-      
-   ossimIpt pt;
-   pt.x = ossimString::toInt32(argv[3]);
-   pt.y = ossimString::toInt32(argv[4]);
-   
-   ossimIrect rect(pt.x, pt.y, pt.x+1, pt.y+1);
-   ossimRefPtr<ossimImageData> id = ih->getTile(rect, 0);
-
-   if ( id.valid() )
-   {
-      cout << "image_file: " << imageFile
-           << "\nsample:     " << pt.x
-           << "\nline:       " << pt.y;
-
-      vector<ossim_uint32>::const_iterator i = bandList.begin();
-      while ( i != bandList.end() )
-      {
-         cout << "\nvalue[" << (*i) << "]: " << id->getPix( pt, (*i) );
-         ++i;
-      }
-      cout << endl;
-   }
-   else
-   {
-      cerr << "getTile request failed!" << endl;
-      return 1;
-   }
-   
-   return 0;
-}
-
-bool addBand( ossim_uint32 band, ossim_uint32 bandCount, vector<ossim_uint32>& bandList )
-{
-   bool result = true;
-   if ( band < bandCount )
-   {
-      bandList.push_back(band);
-   }
-   else
-   {
-      cerr << "Band number " << band << " is out of range!" << endl;
-      result = false;
-   }
-   return result;
-}
diff --git a/src/test/ossim-gpt-test.cpp b/src/test/ossim-gpt-test.cpp
deleted file mode 100644
index d3d803c..0000000
--- a/src/test/ossim-gpt-test.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Test code for ossimGpt class.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossim-gpt-test.cpp 19751 2011-06-13 15:13:07Z dburken $
-
-#include <iostream>
-using namespace std;
-
-#include <ossim/base/ossimGpt.h>
-#include <ossim/init/ossimInit.h>
-
-int main(int argc, char *argv[])
-{
-   ossimInit::instance()->initialize(argc, argv);
-
-   cout << "ossimGpt::wrap test:\n";
-   
-   ossimGpt gpt(0.0, 0.0, 0.0);
-   cout << "gpt: " << gpt << "\n";
-   gpt.wrap();
-   cout << "gpt::wrap: " << gpt << "\n\n";
-
-   gpt.lat = 45.0;
-   gpt.lon = 45.0;
-   cout << "gpt: " << gpt << "\n";
-   gpt.wrap();
-   cout << "gpt::wrap: " << gpt << "\n\n";
-   
-   gpt.lat = 90.0;
-   gpt.lon = 180.0;
-   cout << "gpt: " << gpt << "\n";
-   gpt.wrap();
-   cout << "gpt::wrap: " << gpt << "\n\n";
-
-   gpt.lat = 91.0;
-   gpt.lon = 181.0;
-   cout << "gpt: " << gpt << "\n";
-   gpt.wrap();
-   cout << "gpt::wrap: " << gpt << "\n\n";
-
-   gpt.lat = 179.0;
-   gpt.lon = 359.0;
-   cout << "gpt: " << gpt << "\n";
-   gpt.wrap();
-   cout << "gpt::wrap: " << gpt << "\n\n";
-
-   gpt.lat = 181.0;
-   gpt.lon = 361.0;
-   cout << "gpt: " << gpt << "\n";
-   gpt.wrap();
-   cout << "gpt::wrap: " << gpt << "\n\n";
-
-   gpt.lat = 271.0;
-   gpt.lon = 361.0;
-   cout << "gpt: " << gpt << "\n";
-   gpt.wrap();
-   cout << "gpt::wrap: " << gpt << "\n\n";
-
-   gpt.lat = 359.0;
-   gpt.lon = 361.0;
-   cout << "gpt: " << gpt << "\n";
-   gpt.wrap();
-   cout << "gpt::wrap: " << gpt << "\n\n";
-
-   gpt.lat = 361.0;
-   gpt.lon = 721.0;
-   cout << "gpt: " << gpt << "\n";
-   gpt.wrap();
-   cout << "gpt::wrap: " << gpt << "\n\n";
-
-   gpt.lat = 451.0;
-   gpt.lon = 901.0;
-   cout << "gpt: " << gpt << "\n";
-   gpt.wrap();
-   cout << "gpt::wrap: " << gpt << "\n\n";
-
-   gpt.lat = -45.0;
-   gpt.lon = -45.0;
-   cout << "gpt: " << gpt << "\n";
-   gpt.wrap();
-   cout << "gpt::wrap: " << gpt << "\n\n";
-   
-   gpt.lat = -90.0;
-   gpt.lon = -180.0;
-   cout << "gpt: " << gpt << "\n";
-   gpt.wrap();
-   cout << "gpt::wrap: " << gpt << "\n\n";
-
-   gpt.lat = -91.0;
-   gpt.lon = -181.0;
-   cout << "gpt: " << gpt << "\n";
-   gpt.wrap();
-   cout << "gpt::wrap: " << gpt << "\n\n";
-
-   gpt.lat = -179.0;
-   gpt.lon = -359.0;
-   cout << "gpt: " << gpt << "\n";
-   gpt.wrap();
-   cout << "gpt::wrap: " << gpt << "\n\n";
-
-   gpt.lat = -181.0;
-   gpt.lon = -361.0;
-   cout << "gpt: " << gpt << "\n";
-   gpt.wrap();
-   cout << "gpt::wrap: " << gpt << "\n\n";
-
-   gpt.lat = -271.0;
-   gpt.lon = -361.0;
-   cout << "gpt: " << gpt << "\n";
-   gpt.wrap();
-   cout << "gpt::wrap: " << gpt << "\n\n";
-
-   gpt.lat = -359.0;
-   gpt.lon = -361.0;
-   cout << "gpt: " << gpt << "\n";
-   gpt.wrap();
-   cout << "gpt::wrap: " << gpt << "\n\n";
-
-   gpt.lat = -361.0;
-   gpt.lon = -721.0;
-   cout << "gpt: " << gpt << "\n";
-   gpt.wrap();
-   cout << "gpt::wrap: " << gpt << "\n\n";
-
-   gpt.lat = -451.0;
-   gpt.lon = -901.0;
-   cout << "gpt: " << gpt << "\n";
-   gpt.wrap();
-   cout << "gpt::wrap: " << gpt << "\n\n";
-
-   
-   return 0;
-}
diff --git a/src/test/ossim-gsd-test.cpp b/src/test/ossim-gsd-test.cpp
deleted file mode 100644
index 1eba9cb..0000000
--- a/src/test/ossim-gsd-test.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossim-gsd-test.cpp
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description:
-//
-// Test to output gsd from image geometry and then compute the gsd from center
-// latitude of the image if the projecion is geographic, i.e. scale is in
-// decimal degrees.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossim-gsd-test.cpp 19751 2011-06-13 15:13:07Z dburken $
-
-#include <ossim/init/ossimInit.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-
-#include <iostream>
-using namespace std;
-
-static void usage()
-{
-   cout << "ossim-gsd-test <imagefile>"
-        << "\nThis will compute meters per pixel from the center latitude if the\n"
-        << "underlying projection scale units are in degrees." << endl;
-}
-
-int main(int argc, char *argv[])
-{
-   ossimInit::instance()->initialize(argc, argv);
-
-   if (argc != 2)
-   {
-      usage();
-      return 0;
-   }
-
-   ossimFilename imageFile = argv[argc - 1];
-
-   if ( !imageFile.exists() )
-   {
-      usage();
-      return 1;
-   }
-
-   // Open up an image handler.
-   ossimRefPtr<ossimImageHandler> ih = ossimImageHandlerRegistry::instance()->open(
-      ossimFilename(argv[argc - 1]));
-   if ( ih.valid() == false )
-   {
-      cerr << "Could not open: " << imageFile << endl;
-      return 1;
-   }
-   
-   cout << "image_file:  " << imageFile << "\n";
-   
-   ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
-   if ( geom.valid() )
-   {
-      ossimDpt imageGeomGsd = geom->getMetersPerPixel();
-      cout << "image_geometry_meters_per_pixel: " << imageGeomGsd << "\n";
-
-      ossimDrect rect = ih->getImageRectangle(0);
-      ossimKeywordlist kwl;
-      geom->saveState(kwl);
-      ossimDpt ipt = rect.midPoint();
-      cout << "center_image_point: " << ipt << "\n";
-      ossimGpt wpt;
-      geom->localToWorld(ipt, wpt);
-      cout << "center_world_point: " << wpt << "\n";
-
-      ossimDpt scale;
-      bool scaleDegrees = false;
-      const char* lookup = kwl.find("projection.pixel_scale_xy");
-      if ( lookup )
-      {
-         ossimString s = lookup;
-         scale.toPoint(s);
-         cout << "projection.pixel_scale_xy: " << scale << "\n";
-         const char* lookup = kwl.find("projection.pixel_scale_units");
-         if ( lookup )
-         {
-            s = lookup;
-            scaleDegrees = (s == "degrees");
-            cout << "projection.scale_units: " << s << "\n";
-         }
-
-         if ( scaleDegrees )
-         {
-            ossimDpt mpd = wpt.metersPerDegree();
-            cout << "meters_per_degree_for_center: " << mpd << "\n";
-            ossimDpt computeGsd;
-            computeGsd.x = mpd.x * scale.x;
-            computeGsd.y = mpd.y * scale.y;
-            cout << "computed_meters_per_pixel_for_center_lat: " << computeGsd << "\n";
-         }
-      }
-   }
-   else
-   {
-      cout << "null geometry!\n";
-   }
-
-   cout << endl;
-   return 0;
-}
-
diff --git a/src/test/ossim-image-chain-test.cpp b/src/test/ossim-image-chain-test.cpp
deleted file mode 100644
index 8907fb5..0000000
--- a/src/test/ossim-image-chain-test.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossim-image-chain-test.cpp
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description:
-//
-// Test application for ossimImageChain class.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossim-image-chain-test.cpp 19751 2011-06-13 15:13:07Z dburken $
-
-#include <ossim/init/ossimInit.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/imaging/ossimImageChain.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-
-#include <iostream>
-using namespace std;
-
-static void usage()
-{
-   cout << "ossim-image-chain-test <image>" << endl;
-}
-
-int main(int argc, char *argv[])
-{
-   int result = 0;
-   
-   ossimInit::instance()->initialize(argc, argv);
-
-   if (argc == 2)
-   {
-      try // In case exceptions is thrown. 
-      {
-         ossimFilename image = argv[1];
-         ossimRefPtr<ossimImageHandler> ih = ossimImageHandlerRegistry::instance()->open(image);
-         if ( ih.valid() )
-         {
-            cout << "Opened image: " << image << endl;
-
-            ossimRefPtr<ossimImageChain> ic = new ossimImageChain();
-            ic->addLast( ih.get() );
-            cout << "Added to image chain via ossimImageChain::addLast" << endl;
-
-            cout << "Calling ossimImageChain::removeChild" << endl;
-
-            if ( ic->removeChild( ih.get() ) )
-            {
-               cout << "Removed from chain..." << endl;
-               ih = 0;
-            }
-
-            ic = 0;
-         }
-         else
-         {
-            cout << "Could not open: " << image << endl;
-            result = 1;
-         }
-      }
-      catch( const ossimException& e )
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
-         result = 1;
-      }
-   }
-   else
-   {
-      usage();
-   }
-
-   return result;
-}
diff --git a/src/test/ossim-image-elevation-test.cpp b/src/test/ossim-image-elevation-test.cpp
deleted file mode 100644
index 6e7c0fa..0000000
--- a/src/test/ossim-image-elevation-test.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossim-tiled-elevation-test.cpp
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description:
-//
-// Test application for ossimImageElevationDatabase class.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossim-image-elevation-test.cpp 22197 2013-03-12 02:00:55Z dburken $
-
-#include <ossim/init/ossimInit.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimTimer.h>
-#include <ossim/elevation/ossimImageElevationDatabase.h>
-
-#include <iomanip>
-#include <iostream>
-using namespace std;
-
-static void usage()
-{
-   cout << "ossim-image-elevation-test <elev-dir>"
-        << "\nCreates a ossimImageElevationDatabase from elev-dir." << endl;
-}
-
-int main(int argc, char *argv[])
-{
-   int result = 0;
-
-   ossimTimer::instance()->setStartTick();
-
-   // Turn off elevation initialization as we want to use ours.
-   ossimInit::instance()->setElevEnabledFlag(false);
-   
-   ossimInit::instance()->initialize(argc, argv);
-
-   cout << std::setiosflags(ios::fixed) << std::setprecision(3)
-        << "elapsed time after initialize: "
-        << ossimTimer::instance()->time_s() << "\n";
-   
-   if (argc == 2)
-   {
-      try // Exceptions can be thrown so 
-      {
-         ossimString elevDir = argv[1];
-         
-         cout << "elev-dir: " << elevDir << "\n";
-         
-         ossimImageElevationDatabase* elevdb = new ossimImageElevationDatabase();
-         if ( elevdb->open(elevDir) )
-         {
-            std::vector<ossimGpt> pts(10);
-            
-            pts[0] = ossimGpt(3.5, -67.5);
-            pts[1] = ossimGpt(7.5, -79.5);
-            pts[2] = ossimGpt(35.694166666666668, 51.598333333333336);
-            pts[3] = ossimGpt(35.821992089329882, 51.437673634967858);
-            pts[4] = ossimGpt(35.843333333333334, 51.373333333333335);
-            pts[5] = ossimGpt(3.25, -67.25);
-            pts[6] = ossimGpt(7.5, -79.5);
-            pts[7] = ossimGpt(35.821992089329882, 51.437673634967858);
-            pts[8] = ossimGpt(7, -80);
-            pts[9] = ossimGpt(7.9, -79.1);
-            std::vector<ossimGpt>::iterator i = pts.begin();
-
-            while ( i != pts.end() )
-            {
-               cout << "getHeightAboveEllipsoid(" << (*i) << "): " 
-                    << elevdb->getHeightAboveEllipsoid( (*i) ) << endl;
-               ++i;
-            }
-         }
-         else
-         {
-            cout << "Could not open: " << elevDir << endl;
-         }
-      }
-      catch( const ossimException& e )
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
-         result = 1;
-      }
-   }
-   else
-   {
-      usage();
-   }
-   return result;
-}
-
diff --git a/src/test/ossim-image-geometry-test.cpp b/src/test/ossim-image-geometry-test.cpp
deleted file mode 100644
index a44aa07..0000000
--- a/src/test/ossim-image-geometry-test.cpp
+++ /dev/null
@@ -1,348 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description:
-//
-// Test app for image geometries.  Prints out projection keyword
-// list.  Performs lineSampleToWorld, worldToLineSample, lineSampleToWorld
-// round trip dumping points and delta on image points.  Dumps elevation cells
-// used.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossim-image-geometry-test.cpp 22201 2013-03-20 00:53:33Z dburken $
-
-#include <iostream>
-#include <iomanip>
-#include <string>
-#include <sstream>
-#include <ctime>
-using namespace std;
-
-#include <ossim/init/ossimInit.h>
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimDrect.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/elevation/ossimElevManager.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-
-// Points in one direction.  If 5, will get 5X5 or 25.
-static const ossim_int32 POINTS = 5; 
-
-static std::string getDate()
-{
-// Get the build date in the format of (yyyymmdd).
-   char s[9];
-   s[8] = '\0';
-   time_t t;
-   time(&t);
-   tm* lt = localtime(&t);
-   strftime(s, 9, "%Y%m%d", lt);
-   std::string date = s;
-   return date;
-}
-
-static void usage()
-{
-   cout << "ossimGeometryTest <imagefile>"
-        << "\nTest image geometry." << endl;
-}
-
-static const ossim_uint32 W = 14;
-
-static void print(const std::string& prefix,
-                  const ossimDpt& ipt,
-                  const ossimGpt& wpt,
-                  const ossimDpt& rpt)
-{
-   ossimDpt delta = ipt - rpt;
-   ossim_uint32 w =
-      (prefix.size() < W) ? (W - prefix.size()) : prefix.size();
-                                                     
-   cout << std::setfill(' ') << setiosflags(ios::left) 
-        << prefix << std::setw(w) << "ipt:" << ipt.toString().c_str() << "\n"
-        << prefix << std::setw(w) << "wpt:" << wpt.toString().c_str() << "\n"
-        << prefix << std::setw(w) << "rpt:" << rpt.toString().c_str() << "\n"
-        << prefix << std::setw(w) << "delta:" << delta.toString() << "\n\n";
-}
-
-
-int main(int argc, char *argv[])
-{
-   ossimInit::instance()->initialize(argc, argv);
-
-   if (argc != 2)
-   {
-      usage();
-      return 0;
-   }
-
-   ossimFilename imageFile = argv[argc - 1];
-
-   if ( !imageFile.exists() )
-   {
-      usage();
-      return 1;
-   }
-
-   // Open up an image handler.
-   ossimRefPtr<ossimImageHandler> ih
-      = (ossimImageHandler*)ossimImageHandlerRegistry::instance()->open(
-         ossimFilename(argv[argc - 1]));
-   if ( !ih )
-   {
-      cerr << "Could not open: " << imageFile << endl;
-      return 1;
-   }
-
-   cout << "image_file:  " << imageFile << "\n";
-
-   // cout << "date_yyyymmdd: " << getDate().c_str() << "\n"; 
-   
-   // Get the entry list:
-   std::vector<ossim_uint32> entryList;
-   ih->getEntryList(entryList);
-   
-   std::vector<ossim_uint32>::const_iterator entry = entryList.begin();
-   while ( entry != entryList.end() )
-   {
-      cout << "entry_index:  " << (*entry) << "\n";
-      ih->setCurrentEntry( (*entry) );
-
-      ossimRefPtr<ossimImageGeometry> geom = ih->getImageGeometry();
-
-      if ( geom.valid() )
-      {
-#if 1    /* Comment out to disable elevation for map projections. */
-         ossimRefPtr<ossimProjection> proj = geom->getProjection();
-         if (proj.valid() )
-         {
-            ossimRefPtr<ossimMapProjection> mp = PTR_CAST(ossimMapProjection, proj.get());
-            if (mp.valid())
-            {
-               cout << "setting elev lookup flag..." << endl;
-               mp->setElevationLookupFlag(true);
-            }
-         }
-#endif
-         ossimKeywordlist kwl;
-         geom->saveState(kwl, 0);
-         cout << kwl << "\n";
-
-         ossimDrect rect = ih->getImageRectangle(0);
-
-         cout << "image_rect: " << rect << "\n\n";
-
-         // Do forward, inverse, forward on corners and center.
-
-         std::string prefix;
-         ossimDpt ipt;  // image point
-         ossimDpt rpt;  // round trip image point
-         ossimGpt wpt;  // world point
-
-         // Upper left:
-         prefix = "ul.";
-         ipt = rect.ul();
-         geom->localToWorld(ipt, wpt);
-         geom->worldToLocal(wpt, rpt);
-         print(prefix, ipt, wpt, rpt);
-
-         // Upper right:
-         prefix = "ur.";
-         ipt = rect.ur();
-         geom->localToWorld(ipt, wpt);
-         geom->worldToLocal(wpt, rpt);
-         print(prefix, ipt, wpt, rpt);
-
-         // Lower right:
-         prefix = "lr.";
-         ipt = rect.lr();
-         geom->localToWorld(ipt, wpt);
-         geom->worldToLocal(wpt, rpt);
-         print(prefix, ipt, wpt, rpt);
-
-         // Lower left:
-         prefix = "ll.";
-         ipt = rect.ll();
-         geom->localToWorld(ipt, wpt);
-         geom->worldToLocal(wpt, rpt);
-         print(prefix, ipt, wpt, rpt);
-
-         // center:
-         prefix = "center.";
-         ipt = rect.midPoint();
-         geom->localToWorld(ipt, wpt);
-         geom->worldToLocal(wpt, rpt);
-         print(prefix, ipt, wpt, rpt);
-
-         geom->setTargetRrds(2);
-         cout << "geometry target rrds set to: " << geom->getTargetRrds() << "\n\n";
-         
-         // Upper left:
-         prefix = "ul-r2.";
-         geom->rnToRn(rect.ul(), 0, 2, ipt);
-         geom->localToWorld(ipt, wpt);
-         geom->worldToLocal(wpt, rpt);
-         print(prefix, ipt, wpt, rpt);
-
-         // Upper right:
-         prefix = "ur-r2.";
-         geom->rnToRn(rect.ur(), 0, 2, ipt);
-         geom->localToWorld(ipt, wpt);
-         geom->worldToLocal(wpt, rpt);
-         print(prefix, ipt, wpt, rpt);
-
-         // Lower right:
-         prefix = "lr-r2.";
-         geom->rnToRn(rect.lr(), 0, 2, ipt);
-         geom->localToWorld(ipt, wpt);
-         geom->worldToLocal(wpt, rpt);
-         print(prefix, ipt, wpt, rpt);
-
-         // Lower left:
-         prefix = "ll-r2.";
-         ipt = rect.ll();
-         geom->rnToRn(rect.ll(), 0, 2, ipt);
-         geom->localToWorld(ipt, wpt);
-         geom->worldToLocal(wpt, rpt);
-         print(prefix, ipt, wpt, rpt);
-
-         // center:
-         prefix = "center-r2.";
-         ipt = rect.midPoint();
-         geom->rnToRn(ipt, 0, 2, ipt);
-         geom->localToWorld(ipt, wpt);
-         geom->worldToLocal(wpt, rpt);
-         print(prefix, ipt, wpt, rpt);
-
-         // Test rnToWorld and world to rn:
-         cout << "testing rnToWorld and worldToRn:\n\n";
-         prefix = "center-r3.";
-         ipt = rect.midPoint();
-         geom->rnToRn(ipt, 0, 3, ipt);
-         geom->rnToWorld(ipt, 3, wpt);
-         geom->worldToRn(wpt, 3, rpt);
-         print(prefix, ipt, wpt, rpt);
-
-         geom->setTargetRrds(0);
-         cout << "geometry target rrds set to: " << geom->getTargetRrds() << "\n\n";
-
-         prefix = "center-r3.";
-         ipt = rect.midPoint();
-         geom->rnToRn(ipt, 0, 3, ipt);
-         geom->rnToWorld(ipt, 3, wpt);
-         geom->worldToRn(wpt, 3, rpt);
-         print(prefix, ipt, wpt, rpt);
-         
-
-         ossim_int32 tenthW  = rect.width()  / POINTS;
-         ossim_int32 tenthH  = rect.height() / POINTS;
-         ossim_int32 offW    = tenthW / 2;
-         ossim_int32 offH    = tenthH / 2;
-         ossimIpt    ul      = rect.ul();
-         ossimIpt    lr      = rect.lr();
-         ossim_int32 ptIndex = 0;
-
-         // Line loop:
-         for (ossim_int32 y = ul.y+offH; y < lr.y; y += tenthH)
-         {
-            ipt.y = y;
-            
-            // Sample loop:
-            for (ossim_int32 x = ul.x+offW; x < lr.x; x += tenthW)
-            {
-               ipt.x = x;
-
-               std::ostringstream s;
-               s << std::setfill('0') << setiosflags(ios::right) 
-                 << "pt" << std::setw(3) << ptIndex << ".";
-               prefix = s.str();
-               geom->localToWorld(ipt, wpt);
-               geom->worldToLocal(wpt, rpt);
-               print(s.str(), ipt, wpt, rpt);
-
-               ++ptIndex;
-            }
-         }
-
-      } // matches: if ( proj.valid() )
-
-      // Test the decimationFactors method.
-      ossim_uint32 level;
-      std::vector<ossimDpt> decimations;
-      geom->decimationFactors(decimations);
-      
-      for (level = 0; level < decimations.size(); ++level)
-      {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "decimation[" << level << "]: " << decimations[level]
-            << std::endl;
-      }
-
-      bool isAffectedByElevation = geom->isAffectedByElevation();
-      ossimNotify(ossimNotifyLevel_DEBUG)
-         << "\nImage projection " << ( isAffectedByElevation ? "is" : "isn't")
-         << " affected by elevation." << std::endl;
-      
-      // Test up is code:
-      if ( isAffectedByElevation )
-      {
-         ossim_float64 upIsUpAngle = geom->upIsUpAngle();
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "\nUp is up rotation angle: " << upIsUpAngle << "\n" << std::endl;
-      }
-      
-#if 0 /* commented out as one time test is good */
-      
-      // Test the decimationFactor method.
-      ossimDpt decimation;
-      geom->decimationFactors(decimations);
-      ossim_float64 r0_lines = ih->getNumberOfLines(0);
-      ossim_float64 r0_samps = ih->getNumberOfSamples(0);
-      
-      for (level = 0; level < geom->getNumberOfDecimations(); ++level)
-      {
-         geom->decimationFactor(level, decimation);
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "decimation[" << level << "]:          " << decimation
-            << "\nlines[" << level << "]:             " << ih->getNumberOfLines(level)
-            << "\nsamples[" << level << "]:           " << ih->getNumberOfSamples(level)
-            << "\ncomputed lines[" << level << "]:    " << (r0_lines * decimation.y)
-            << "\ncomputed samples[" << level << "]:  " << (r0_samps * decimation.x)
-            << std::endl;
-      }
-#endif
-      
-      ++entry; // Go to next entry.
-      
-   } // matches: while ( entry != entryList.end() )
-
-#if 0
-   // Dump the elevation cells used:
-   std::vector<ossimFilename> cells;
-   ossimElevManager::instance()->getOpenCellList(cells);
-
-   for (ossim_uint32 cellIndex = 0; cellIndex < cells.size(); ++cellIndex)
-   {
-      std::ostringstream s;
-      s << std::setfill('0')
-        << "cell" << std::setw(3) << cellIndex << ": ";
-
-      cout << std::setfill(' ') << setiosflags(ios::left) << std::setw(W)
-           << s.str().c_str() << cells[cellIndex] << "\n";
-   }
-
-   cout << endl;
-#endif
-   return 0;
-}
-
diff --git a/src/test/ossim-image-writer-test.cpp b/src/test/ossim-image-writer-test.cpp
deleted file mode 100644
index 37a56e8..0000000
--- a/src/test/ossim-image-writer-test.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-#include <cstdlib> /* for exit */
-#include <iostream>
-
-#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-
-
-int main(int argc, char *argv[])
-{
-   ossimArgumentParser argumentParser(&argc, argv);
-   ossimInit::instance()->addOptions(argumentParser);
-   ossimInit::instance()->initialize(argumentParser);
-   argumentParser.getApplicationUsage()->addCommandLineOption("-h or --help", "Shows help");
-   argumentParser.getApplicationUsage()->setCommandLineUsage(argumentParser.getApplicationName()+" [options] ");
-   argumentParser.getApplicationUsage()->setApplicationName(argumentParser.getApplicationName());
-   
-   if(argumentParser.read("-h") || argumentParser.read("--help"))
-   {
-      argumentParser.getApplicationUsage()->write(std::cout);
-      exit(0);
-   }
-   ossimString extensions = "png,gif,j2k,jp2,jpg,jpeg,tif,tiff,nitf,ntf,ccf,til,img,toc,rpf,doq,doqq,dt0,dt1,dt2,dt3,dt4,dt5,dt6,hgt,dem,fst,ras";
-   ossimString mimeTypes = "image/gif,image/jpg,image/png,image/jpx,image/jp2,image/jpeg,image/tiff,image/nitf,image/ntf,image/doq,image/doqq,image/dted,image/hgt,image/dem";
-   std::vector<ossimString> extensionArray;
-   std::vector<ossimString> mimeArray;
-
-   extensions.split(extensionArray, ",");
-   mimeTypes.split(mimeArray, ",");
-   ossim_uint32 idx = 0;
-   for(idx = 0; idx < extensionArray.size(); ++idx)
-   {
-      ossimImageWriterFactoryBase::ImageFileWriterList result;
-      ossimImageWriterFactoryRegistry::instance()->getImageFileWritersBySuffix(result, extensionArray[idx]);
-      
-      std::cout << "extension  " << extensionArray[idx] << ": ";
-      if(!result.empty())
-      {
-         for(ossim_uint32 resultIdx = 0; resultIdx < result.size(); ++resultIdx)
-         {
-            std::cout << result[resultIdx]->getClassName() << (((resultIdx+1)==result.size())?"":", ");
-         }
-      }
-      std::cout << "\n";
-   }
-   for(idx = 0; idx < mimeArray.size(); ++idx)
-   {
-      ossimImageWriterFactoryBase::ImageFileWriterList result;
-      ossimImageWriterFactoryRegistry::instance()->getImageFileWritersByMimeType(result, mimeArray[idx]);
-      
-      std::cout << "mimeType  " << mimeArray[idx] << ": ";
-      if(!result.empty())
-      {
-         for(ossim_uint32 resultIdx = 0; resultIdx < result.size(); ++resultIdx)
-         {
-            std::cout << result[resultIdx]->getClassName() << (((resultIdx+1)==result.size())?"":", ");
-         }
-      }
-      std::cout << "\n";
-   }
-   if(argc > 1)
-   {
-      for(idx = 1; static_cast<ossim_int32>(idx) < argc; ++idx)
-      {
-         ossimRefPtr<ossimImageFileWriter> writer = ossimImageWriterFactoryRegistry::instance()->createWriter(ossimFilename(argv[idx]));
-         
-         if(writer.valid())
-         {
-            std::cout << writer->getClassName() << ": Opened by extension for file " << argv[idx] << std::endl;
-         }
-      }
-   }
-   
-   return 0;
-}
diff --git a/src/test/ossim-info-test.cpp b/src/test/ossim-info-test.cpp
deleted file mode 100644
index 0c11d05..0000000
--- a/src/test/ossim-info-test.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Test application for ossimInfo class.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossim-info-test.cpp 22197 2013-03-12 02:00:55Z dburken $
-
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/util/ossimInfo.h>
-
-#include <iostream>
-using namespace std;
-
-int main(int argc, char *argv[])
-{
-   //---
-   // Get the arg count so we can tell if an arg was consumed by
-   // ossimInit::instance()->initialize
-   //---
-   // int originalArgCount = argc;
-
-   ossimArgumentParser ap(&argc, argv);
-
-   // Initialize ossim stuff, factories, plugin, etc.
-   ossimInit::instance()->initialize(ap);
-
-   if ( ap.argc() == 2 )
-   {
-      try
-      {
-         // Test the ossimInfo::getImageInfo method.
-         ossimRefPtr<ossimInfo> oi = new ossimInfo;
-         ossimFilename file(argv[1]);
-         ossimKeywordlist kwl;
-         oi->getImageInfo(file,
-                          true,  // dump
-                          false, // dno
-                          true,  // image geom
-                          true,  // image info
-                          true,  // metadata
-                          true,  // palette
-                          kwl);
-         cout << kwl << endl;
-      }
-      catch (const ossimException& e)
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
-         return 1;
-      }
-      
-   }  // End: if ( ( ap.argc() == 2 ) ...
-   else
-   {
-      cout << argv[0] << " <image_file>\nTest ossimInfo class..." << endl;
-   }
-   
-   return 0;
-   
-} // End of main...
diff --git a/src/test/ossim-loadtile-test.cpp b/src/test/ossim-loadtile-test.cpp
deleted file mode 100644
index d2bf12b..0000000
--- a/src/test/ossim-loadtile-test.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file.
-//
-// File: ossim-foo.cpp
-//
-// Author:  David Burken
-//
-// Description: Test app:
-//
-// 1) Makes a 256x256 tile.  Each line having a single value from 0 to 255.
-// 2) Test ossimImageData::loadTile where source is 16 bit, destination 8 bit.
-// 3) Test histogram.  Should have 256 bins (0 to 255) each with count of 256.
-//
-// Returns 0 on success and outputs PASSED, 1 on failure and outputs FAILED.
-//
-// $Id$
-//----------------------------------------------------------------------------
-
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <ossim/base/ossimConstants.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimHistogram.h>
-#include <ossim/base/ossimMultiBandHistogram.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/imaging/ossimImageData.h>
-#include <ossim/init/ossimInit.h>
-
-#include <iostream>
-using namespace std;
-
-int main( int argc, char* argv[] )
-{
-   enum
-   {
-      PASSED = 0,
-      FAILED = 1
-   };
-
-   int status = PASSED;
-   
-   ossimArgumentParser ap(&argc, argv);
-   ossimInit::instance()->addOptions(ap);
-   ossimInit::instance()->initialize(ap);
-
-   try
-   {
-      ossimIrect rect(0,0,255,255);
-      
-      ossimRefPtr<ossimImageData> srcTile = new ossimImageData(0, OSSIM_UINT16, 1, 256, 256);
-      srcTile->initialize();
-      srcTile->setImageRectangle( rect );
-
-      // Set max for conversion to 8 bit.
-      srcTile->setMaxPix( 255, 0 );
-      ossim_uint16* src = srcTile->getUshortBuf();
-      
-      const ossim_uint32 LINES   = 256;
-      const ossim_uint32 SAMPLES = 256;
-      ossim_uint32 s = 0;
-   
-      // line loop
-      for(ossim_uint32 line = 0; line < LINES; ++line)
-      {
-         // sample loop
-         for(ossim_uint32 samp = 0; samp < SAMPLES; ++samp)
-         {
-            src[samp] = s;
-         }
-         src += SAMPLES;
-         ++s;
-      }
-      
-      ossimRefPtr<ossimImageData> destTile = new ossimImageData(0, OSSIM_UINT8, 1, 256, 256);
-      destTile->initialize();
-      destTile->setImageRectangle( rect );
-      destTile->loadTile( srcTile.get() );
-      destTile->validate();
-
-      ossimRefPtr<ossimMultiBandHistogram> his = new ossimMultiBandHistogram( 1, 256, 0, 255 );
-
-      destTile->populateHistogram( his );
-
-      const ossimRefPtr<ossimHistogram> h = his->getHistogram( 0 );
-      if ( h.valid() )
-      {
-         float count;
-         for( ossim_uint32 i = 0; i < LINES; ++i )
-         {
-            count = h->GetCount( static_cast<float>(i) );
-            if ( count != 256.0 )
-            {
-               cerr << "bin[" << i << "]: count = " << count
-                    << "\nShould be 256..." << endl;
-               status = FAILED;
-               break;
-            }
-         }
-      }
-      else
-      {
-         status = FAILED;
-      }
-   }
-   catch (const ossimException& e)
-   {
-      ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
-      status = FAILED;
-   }
-
-   cout << "ossim-loadtile-test: " << (status == PASSED ? "PASSED" : "FAILED")  << endl;
-   return status;
-}
diff --git a/src/test/ossim-mask-filter-test.cpp b/src/test/ossim-mask-filter-test.cpp
deleted file mode 100644
index 7dba6a2..0000000
--- a/src/test/ossim-mask-filter-test.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// File: ossim-mask-filter-test.cpp
-//
-// Author:  David Burken
-//
-// Description: Test application for ossimMaskFilter.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossim-mask-filter-test.cpp 21631 2012-09-06 18:10:55Z dburken $
-
-#include <iostream>
-using namespace std;
-
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/base/ossimStringProperty.h>
-#include <ossim/base/ossimTimer.h>
-#include <ossim/base/ossimViewInterface.h>
-#include <ossim/imaging/ossimImageFileWriter.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageWriterFactoryRegistry.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageHandlerRegistry.h>
-#include <ossim/imaging/ossimMaskFilter.h>
-#include <ossim/imaging/ossimSingleImageChain.h>
-#include <ossim/imaging/ossimTiffWriter.h>
-#include <ossim/init/ossimInit.h>
-
-int main(int argc, char* argv[])
-{
-   ossimTimer::instance()->setStartTick();
-   
-   ossimInit::instance()->initialize(argc, argv);
-
-   if (argc != 6)
-   {
-      cout << argv[0] << " <mask_type> <resample_flag> <image_file> <shape_file> <output_file>"
-           << "\nCombines image and shape files with mask filter and writes "
-           << "result to output file.\n"
-           << "valid mask_types:\n"
-           << "1 = OSSIM_MASK_TYPE_SELECT\n"
-           << "2 = OSSIM_MASK_TYPE_INVERT\n"
-           << "3 = OSSIM_MASK_TYPE_WEIGHTED\n"
-           << "4 = OSSIM_MASK_TYPE_BINARY\n"
-           << "5 = OSSIM_MASK_TYPE_BINARY_INVERSE\n"
-           << "resample_flag if true the output will be rendered to a geographic projection.\n"
-           << "output_file is a mask of image and shape.\n"
-           << endl;
-      return 0;
-   }
-
-
-   int i = atoi(argv[1]);
-   if ( (i < 1) || (i > 5) )
-   {
-      cerr << "mask type out of range!" << endl;
-      return 1;
-   }
-   ossimMaskFilter::ossimFileSelectionMaskType mask_type =
-      static_cast<ossimMaskFilter::ossimFileSelectionMaskType>(i);
-   i = atoi(argv[2]);
-   bool resample_flag = (i?true:false);
-   ossimFilename inputImgName = ossimFilename(argv[3]);
-   ossimFilename inputShpName = ossimFilename(argv[4]);
-   ossimFilename outputFile  = ossimFilename(argv[5]);
-
-   cout << "ossim-mask-filter-test:"
-        << "\nmask_type:     " << mask_type
-        << "\nresample_flag: " << resample_flag
-        << "\ninputImgName:  " << inputImgName
-        << "\ninputShpName:  " << inputShpName
-        << "\noutputFile:    " << outputFile
-        << endl;
-
-   //---
-   // Test masking shape and image:
-   //---
-   ossimRefPtr<ossimImageSource> inputImg = 0;
-   if ( !resample_flag )
-   {
-      inputImg = ossimImageHandlerRegistry::instance()->open(inputImgName);
-   }
-   else
-   {
-      ossimRefPtr<ossimSingleImageChain> sic = new ossimSingleImageChain();
-      if ( sic->open( inputImgName ) )
-      {
-         // Render the image chain.
-         sic->createRenderedChain();
-         inputImg = sic.get();
-      }
-      else
-      {
-         sic = 0;
-      }
-   }
-   if ( inputImg.valid() == false )
-   {
-      cout << "Could not open: " << inputImgName  << endl;
-      return 1;
-   }
-         
-   ossimRefPtr<ossimImageHandler> inputShp =
-      ossimImageHandlerRegistry::instance()->open(inputShpName);
-   if ( inputShp.valid() )
-   {
-      if ( inputShp->getClassName() == "ossimOgrGdalTileSource" )
-      {
-         ossimViewInterface* shpView = PTR_CAST(ossimViewInterface, inputShp.get());
-         if (shpView)
-         {
-            //---
-            // Test masking image handler and shape file.
-            //---
-            
-            // Set the shape reader's view to that of the image's.
-            shpView->setView(inputImg->getImageGeometry().get());
-            
-            // Turn fill on...
-            ossimRefPtr<ossimProperty> fillProp =
-               new ossimStringProperty(ossimString("fill_flag"),
-                                       ossimString("1"));
-            inputShp->setProperty(fillProp);
-            
-            
-            ossimRefPtr<ossimMaskFilter> maskFlt = new ossimMaskFilter();
-            maskFlt->setMaskType(mask_type);
-            maskFlt->connectMyInputTo( 0, inputImg.get() );
-            // maskFlt->connectMyInputTo(1, inputShp.get());
-            maskFlt->setMaskSource( inputShp.get() );
-            maskFlt->initialize();
-            
-            ossimRefPtr<ossimImageFileWriter> writer =
-               ossimImageWriterFactoryRegistry::instance()->
-               createWriterFromExtension(outputFile.ext());
-            
-            if ( writer->open( outputFile ) )
-            {
-               // Add a listener to get percent complete.
-               ossimStdOutProgress prog(0, true);
-               writer->addListener(&prog);
-               
-               writer->connectMyInputTo(0, maskFlt.get());
-               
-               // Set the cut rect to the input image.
-               writer->setAreaOfInterest(inputImg->getBoundingRect());
-               
-               writer->execute();
-               
-               cout << "Wrote file: " << outputFile
-                    << "\nElapsed time(seconds): "
-                    << ossimTimer::instance()->time_s() << "\n";
-            }
-            else
-            {
-               cout << "Could not open: " << argv[3] << endl;
-            }
-         }
-         else
-         {
-            cerr << "Could not get view interface..." << endl;
-         }
-      }
-      else
-      {
-         cerr << "2nd argument must be a shape file." << endl;
-      }
-   }
-   else
-   {
-      cerr << "Could not open: " << inputShpName << endl;
-   }
-
-   return 0;
-}
diff --git a/src/test/ossim-notify-test.cpp b/src/test/ossim-notify-test.cpp
deleted file mode 100755
index 3e73138..0000000
--- a/src/test/ossim-notify-test.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// ossimNotify functions test.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossim-notify-test.cpp 22148 2013-02-11 17:59:14Z dburken $
-
-#include <iostream>
-using namespace std;
-
-#include <ossim/init/ossimInit.h>
-#include <ossim/base/ossimNotify.h>
-
-int main(int argc, char *argv[])
-{
-   ossimInit::instance()->initialize(argc, argv);
-
-   ossimFilename logFile;
-   ossimGetLogFilename(logFile);
-
-   cout << "log file after ossimInit::instance()->initialize: "
-        << logFile << endl;
-
-   if (logFile.size() == 0)
-   {
-      logFile = "/tmp/ossim-log.txt";
-      ossimSetLogFilename(logFile);
-   }
-
-   ossimGetLogFilename(logFile);
-
-   cout << "set logFile end of test: " << logFile << endl;
-
-   // ossimSetError was hanging:
-   cout << "Calling ossimSetError(...) ..." << endl;
-   ossimSetError( ossimString("ossimTiffOverviewBuilder"),
-                 ossimErrorCodes::OSSIM_WRITE_FILE_ERROR,
-                 "%s file %s line %d\nError creating reduced res set!",
-                 "MODULE",
-                 __FILE__,
-                 __LINE__);
-   cout << "ossimSetError(...) returned..." << endl;
-   
-   return 0;
-}
diff --git a/src/test/ossim-point-test.cpp b/src/test/ossim-point-test.cpp
deleted file mode 100644
index 522d768..0000000
--- a/src/test/ossim-point-test.cpp
+++ /dev/null
@@ -1,184 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-//----------------------------------------------------------------------------
-// $Id: ossim-point-test.cpp 19751 2011-06-13 15:13:07Z dburken $
-
-#include <string>
-#include <iostream>
-#include <sstream>
-
-#include <ossim/base/ossimIpt.h>
-#include <ossim/base/ossimDpt.h>
-#include <ossim/base/ossimDpt3d.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimEcefPoint.h>
-#include <ossim/base/ossimEcefVector.h>
-
-int main()
-{
-   //---
-   // Test ossiIpt::operator>>
-   //---
-   std::string is1(" ( 0, 1 )");
-   std::string is2(" (2,3)");
-   std::string is3(" ( 4, 5 )");
-   std::string is4_5_6_7(" ( 6, 7 )(8, 9) ( 10, 11 ) ( 12, 13) 9876");
-
-   ossimIpt ip1;
-   ossimIpt ip2;
-   ossimIpt ip3;
-   ossimIpt ip4;
-   ossimIpt ip5;
-   ossimIpt ip6;
-   ossimIpt ip7;
-   
-
-   ip1.toPoint(is1);
-   ip2.toPoint(is2);
-   ip3.toPoint(is3);
-   int i;
-
-   std::istringstream istr(is4_5_6_7);
-   istr >> ip4 >> ip5 >> ip6 >> ip7 >> i;
-
-   //---
-   // Test ossiDpt::operator>>
-   //---
-   std::string ds1(" ( 0.0, 1.1 )");
-   std::string ds2(" (2.2,3.3)");
-   std::string ds3(" ( 4.4, 5.5 )");
-   std::string ds4_5_6_7(" ( 6.6, 7.7 )(8.8, 9.9) ( 10.0, 11.0 ) ( 12.0, 13.0) 9876.12345678");
-   std::string ds8("12 20");
-
-   ossimDpt dp1;
-   ossimDpt dp2;
-   ossimDpt dp3;
-   ossimDpt dp4;
-   ossimDpt dp5;
-   ossimDpt dp6;
-   ossimDpt dp7;
-   ossimDpt dp8;
-
-   dp1.toPoint(ds1);
-   dp2.toPoint(ds2);
-   dp3.toPoint(ds3);
-   double d;
-
-   std::istringstream istr2(ds4_5_6_7);
-   istr2 >> dp4 >> dp5 >> dp6 >> dp7 >> d;
-
-   dp8.toPoint(ds8); // Test an invalid string "12 20"
-
-    //---
-   // Test ossiDpt3d
-   //---
-   std::string ds3d1  = " ( 0.0, 1.1, 2.2 )";
-   std::string ds3d2 = "(1.0,2.0,3.0)";
-   
-   ossimDpt3d dp3d1;
-   ossimDpt3d dp3d2;
-   dp3d1.toPoint(ds3d1);
-   dp3d2.toPoint(ds3d2);
-
-
-   //---
-   // Test ossiGpt::operator>>
-   //---
-   std::string gs1("(0.0,0.0,0.0,WGE)");
-   std::string gs2("(1.1,2.2,3.3,NAR-C)");
-   std::string gs3(" (4.4,5.5,6.6,NAS-C )");
-   std::string gs4_5_6_7(" (4.4,5.5,6.6,NAS-C )( 10.0, 10.0 ,5.0, TOY-C ) (17, -89, 50.0, xxx) (28.2, -44.5, 10000.0, NAS-B) 12345.6789");
-
-   ossimGpt gp1;
-   ossimGpt gp2;
-   ossimGpt gp3;
-   ossimGpt gp4;
-   ossimGpt gp5;
-   ossimGpt gp6;
-   ossimGpt gp7;
-   double d2;
-
-   gp1.toPoint(gs1);
-   gp2.toPoint(gs2);
-   gp3.toPoint(gs3);
-
-   std::istringstream istr4(gs4_5_6_7);
-   istr4 >> gp4 >> gp5 >> gp6 >> gp7 >> d2;
-
-
-   //---
-   // Test ossimEcefPoint toString and toPoint methods.
-   //---
-   std::string es1("(1.0,2.0,3.0)");
-   ossimEcefPoint ep1;
-   ep1.toPoint(es1);
-   std::string es2 = ep1.toString(10).string();
-
-   //---
-   // Test ossimEcefPoint toString and toPoint methods.
-   //---
-   ossimEcefVector ev1;
-   ev1.toPoint(es1);
-   std::string es3 = ev1.toString(10).string();
-  
-   std::cout
-      << "\nis1:       " << is1
-      << "\nip1:       " << ip1
-      << "\nis2:       " << is2
-      << "\nip2:       " << ip2
-      << "\nis3:       " << is3
-      << "\nip3:       " << ip3
-      << "\nis4_5_6_7: " << is4_5_6_7
-      << "\nip4:       " << ip4
-      << "\nip5:       " << ip5
-      << "\nip6:       " << ip6
-      << "\nip7:       " << ip7
-      << "\ni:         " << i
-
-      << "\n\n\nds1:       " << ds1
-      << "\ndp1:       " << dp1
-      << "\nds2:       " << ds2
-      << "\ndp2:       " << dp2
-      << "\nds3:       " << ds3
-      << "\ndp3:       " << dp3
-      << "\nds4_5_6_7: " << ds4_5_6_7
-      << "\ndp4:       " << dp4
-      << "\ndp5:       " << dp5
-      << "\ndp6:       " << dp6
-      << "\ndp7:       " << dp7
-      << "\nds8:       " << ds8
-      << "\ndp8:       " << dp8
-      << "\nd:         " << d
-
-      << "\n\nds3d1:       " << ds3d1
-      << "\nds3d2:     " << ds3d2
-      << "\ndp3d1:     " << dp3d1
-      << "\ndp3d2:     " << dp3d2
-
-      << "\n\n\ngs1:       " << gs1
-      << "\ngp1:       " << gp1
-      << "\ngs2:       " << gs2
-      << "\ngp2:       " << gp2
-      << "\ngs3:       " << gs3
-      << "\ngp3:       " << gp3
-      << "\ngs4_5_6_7: " << gs4_5_6_7
-      << "\ngp4:       " << gp4
-      << "\ngp5:       " << gp5
-      << "\ngp6:       " << gp6
-      << "\ngp7:       " << gp7
-      << "\nd2:         " << d2
-
-      << "\n\n\nes1:       " << es1
-      << "\nep1:       " << ep1
-      << "\nes2:       " << es2
-      << "\nev1:       " << ev1
-      << "\nes3:       " << es3
-
-      << std::endl;
-
-   return 0;
-}
diff --git a/src/test/ossim-projection-test.cpp b/src/test/ossim-projection-test.cpp
deleted file mode 100644
index 0f9dad1..0000000
--- a/src/test/ossim-projection-test.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file.
-//
-// Author:  David Burken
-//
-// Description: Test application to for projection classes.
-//
-//----------------------------------------------------------------------------
-// $Id: ossim-projection-test.cpp 2777 2011-06-27 19:14:17Z david.burken $
-
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/projection/ossimMapProjection.h>
-#include <ossim/projection/ossimEquDistCylProjection.h>
-#include <ossim/projection/ossimProjection.h>
-#include <ossim/projection/ossimProjectionFactoryRegistry.h>
-
-#include <vector>
-#include <iostream>
-#include <fstream>
-using namespace std;
-
-
-int main(int argc, char* argv[])   
-{
-   ossimInit::instance()->initialize(argc, argv);
-
-   ossimRefPtr<ossimMapProjection> proj1 = new ossimEquDistCylProjection();
-
-   cout << "\n\nproj1 orgin=(0,0):\n";
-   proj1->print(cout);
-
-   ossim_float64 dpp = 1.0/3600.0; // Degrees per pixel.
-   ossimDpt scale(dpp, dpp);
-   proj1->setDecimalDegreesPerPixel(scale);
-   cout << "\n\nproj1 after setDecimalDegreesPerPixel(0.000277778, 0.000277778):\n";
-   proj1->print(cout);
-
-   ossimGpt origin(38.0, -123.0, 0.0);
-   proj1->setOrigin(origin);
-
-   cout << "\n\nproj1 after setOrgin=(38, -123):\n";
-   proj1->print(cout);
-
-   proj1->setDecimalDegreesPerPixel(scale);
-   cout << "\n\nproj1 after setDecimalDegreesPerPixel(0.000277778, 0.000277778) with origin lat of 38N:\n";
-   proj1->print(cout);
-
-   ossimRefPtr<ossimMapProjection> proj2 =  static_cast<ossimMapProjection*>(proj1->dup());
-   cout << "\n\nproj2 a dup of proj1:\n";
-   proj2->print(cout);
-
-   ossimKeywordlist kwl;
-   proj2->saveState(kwl);
-
-   cout << "\n\nproj2 save state:\n"
-        << kwl << endl;
-
-   ossimRefPtr<ossimProjection> proj3 = ossimProjectionFactoryRegistry::instance()->
-      createProjection(kwl);
-   cout << "\n\nproj3 created from proj2's saveState via ossimProjectionFactoryRegistry::createProjection\n";
-   if ( proj3.valid() )
-   {
-      proj3->print(cout);
-   }
-
-   ossimRefPtr<ossimMapProjection> proj4 = new ossimEquDistCylProjection();
-   proj4->loadState(kwl);
-   
-   cout << "\n\nproj4 from proj2 save state via ossimEquDistCylProjection::loadState:\n";
-   proj4->print(cout);
-   
-   return 0;
-}
diff --git a/src/test/ossim-ref-ptr-test.cpp b/src/test/ossim-ref-ptr-test.cpp
deleted file mode 100644
index 869a237..0000000
--- a/src/test/ossim-ref-ptr-test.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Test application for ossimRefPtr class.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossim-ref-ptr-test.cpp 19980 2011-08-17 20:14:46Z dburken $
-
-#include <iostream>
-using namespace std;
-
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimReferenced.h>
-#include <ossim/init/ossimInit.h>
-
-// Referenced object.
-class Obj : public ossimReferenced
-{
-public:
-   Obj(){}
-   virtual ~Obj(){ cout << "~Obj..." << endl; }
-};
-
-// Owns a ref ptr.
-class Foo
-{
-public:
-   Foo() : m_refPtr(new Obj) {}
-   ~Foo() { m_refPtr = 0; }
-   ossimRefPtr<Obj>& getRefPtr() { return m_refPtr; }
-
-private:
-   ossimRefPtr<Obj> m_refPtr;
-};
-
-static void assignRefPtr(ossimRefPtr<Obj>& rp)
-{
-   rp = new Obj;
-}
-
-static ossimRefPtr<Obj> getRefPtr()
-{
-   return ossimRefPtr<Obj>(new Obj);
-}
-
-// Test app
-int main( /* int argc, char* argv[] */ )
-{
-   ossimInit::instance()->initialize();
-
-   Foo* f = new Foo;
-
-   cout << "count(1): " << f->getRefPtr()->referenceCount() << endl;
-
-   ossimRefPtr<Obj> rp = f->getRefPtr();
-
-   cout << "count(2): " << f->getRefPtr()->referenceCount() << endl;
-
-   delete f;  
-   f = 0;
-
-   cout << "count(1): " << rp->referenceCount() << endl;
-
-   rp = 0; // Should destroy here...
-
-   rp = 0;
-   assignRefPtr(rp);
-
-   if ( rp.valid() )
-   {
-      cout << "assignRefPtr rp count(1): " << rp->referenceCount() << endl;
-   }
-
-   rp = 0;
-
-   rp = getRefPtr();
-
-   if ( rp.valid() )
-   {
-      cout << "getRefPtr rp count(1): " << rp->referenceCount() << endl;
-   }
-   
-   
-   return 0;
-}
diff --git a/src/test/ossim-remap-table-test.cpp b/src/test/ossim-remap-table-test.cpp
deleted file mode 100644
index ec80c6e..0000000
--- a/src/test/ossim-remap-table-test.cpp
+++ /dev/null
@@ -1,359 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description: Test normalized remap table.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossim-remap-table-test.cpp 19751 2011-06-13 15:13:07Z dburken $
-
-#include <iostream>
-#include <iomanip>
-using namespace std;
-
-#include <ossim/base/ossimConstants.h>  // ossim contants...
-#include <ossim/imaging/ossimNormalizedS16RemapTable.h>
-#include <ossim/imaging/ossimNormalizedU16RemapTable.h>
-#include <ossim/imaging/ossimNormalizedU11RemapTable.h>
-#include <ossim/imaging/ossimNormalizedU8RemapTable.h>
-
-
-int main(int argc, char *argv[])
-{
-   cout << setiosflags(std::ios::fixed) << setprecision(15);
-
-   ossim_float64 n;
-   ossim_int32   p;
-   ossim_int32   i;
-   
-   cout << "//------------------------------------------\n"
-        << "// *** ossimNormalizedS16RemapTable test ***\n"
-        << "//------------------------------------------\n"
-        << endl;
-   
-   ossimNormalizedS16RemapTable s16tbl;
-   
-   i = -32768;
-   while (i < 32768)
-   {
-      n = s16tbl[i];
-      p = s16tbl.pixFromNorm(n);
-      cout << "idx[" << i << "]: n (" << n << "), p(" << p << ")\n";
-      ++i;
-   }
-
-   n = -0.1;
-   p = s16tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-    
-   n = 0.0;
-   p = s16tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 0.000000250; // Just above null pixel
-   p = s16tbl.pixFromNorm(n);
-   cout << "Just above null\n";
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-   
-   n = 0.000015250; // Slightly less than -32767
-   p = s16tbl.pixFromNorm(n);
-   cout << "Slightly less than -32767\n";
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 0.0000152588; // -32767
-   p = s16tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-   
-   n = 0.000015258;  // Slightly bigger than -32767
-   p = s16tbl.pixFromNorm(n);
-   cout << "Slightly bigger than -32767\n";
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 0.000030518043793; // -32766
-   p = s16tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-   
-   n = 0.0000305180436;  // Slightly to the left of -32766
-   p = s16tbl.pixFromNorm(n);
-   cout << "Slightly less than -32766\n";
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 0.5;
-   p = s16tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 0.999984740977; // Slightly less than 32766
-   p = s16tbl.pixFromNorm(n);
-   cout << "Slightly less than 32766\n";
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 0.999984740978103; // 32766
-   p = s16tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 0.99998474098; // Slightly greater than 32766
-   p = s16tbl.pixFromNorm(n);
-   cout << "Slightly greater than 32766\n";
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-   
-   n = 1.0;
-   p = s16tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-   
-   n = 1.1;
-   p = s16tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   p = -32768;
-   n = s16tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-   
-   p = -32767;
-   n = s16tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-
-   p = 0;
-   n = s16tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-
-   p = 32766.99999999999;
-   n = s16tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-
-   p = 32767;
-   n = s16tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-
-   p = 32768;
-   n = s16tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-
-   cout << "//------------------------------------------\n"
-        << "// *** ossimNormalizedU16RemapTable test ***\n"
-        << "//------------------------------------------\n"
-        << endl;
-   
-   ossimNormalizedU16RemapTable u16tbl;
-   
-   i = 0;
-   while (i < 65536)
-   {
-      n = u16tbl[i];
-      p = u16tbl.pixFromNorm(n);
-      cout << "idx[" << i << "]: n (" << n << "), p(" << p << ")\n";
-      ++i;
-   }
-
-   n = -0.1;
-   p = u16tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-
-   n = 0.0;
-   p = u16tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 0.001;
-   p = u16tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 0.000000250; // Just above null pixel
-   p = u16tbl.pixFromNorm(n);
-   cout << "Just above null\n";
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 1.0;
-   p = u16tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 1.1;
-   p = u16tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   p = -1;
-   n = u16tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-
-   p = 0;
-   n = u16tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-
-   p = 1;
-   n = u16tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-
-   p = 65534;
-   n = u16tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-
-   p = 65535;
-   n = u16tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-
-   p = 65536;
-   n = u16tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-      
-   cout << "\n\n//------------------------------------------\n"
-        << "// *** ossimNormalizedU11RemapTable test ***\n"
-        << "//------------------------------------------\n"
-        << endl;
-   
-   ossimNormalizedU11RemapTable u11tbl;
-   
-   i = 0;
-   while (i < 2048)
-   {
-      n = u11tbl[i];
-      p = u11tbl.pixFromNorm(n);
-      cout << "idx[" << i << "]: n (" << n << "), p(" << p << ")\n";
-      ++i;
-   }
-
-   n = -0.1;
-   p = u11tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-    
-   n = 0.0;
-   p = u11tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 0.00000852; // Just above null pixel
-   p = u11tbl.pixFromNorm(n);
-   cout << "Just above null\n";
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 0.000;
-   p = u11tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-   
-   n = .000488519785; // Slightly less than 1
-   p = u11tbl.pixFromNorm(n);
-   cout << "Slightly less than 1\n";
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 0.000488519785051; // 1
-   cout << "1\n";
-   p = u11tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 0.000488519786;  // Slightly bigger than 1
-   p = u11tbl.pixFromNorm(n);
-   cout << "Slightly bigger than 1\n";
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 0.9995114802149; // Slightly less than 2046
-   p = u11tbl.pixFromNorm(n);
-   cout << "Slightly less than 2046\n";
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 0.999511480214949; // 2046
-   p = u11tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 0.999511480215; // Slightly greater than 2046
-   p = u11tbl.pixFromNorm(n);
-   cout << "Slightly greater than 2046\n";
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-   
-   n = 1.0;
-   p = u11tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-   
-   n = 1.1;
-   p = u11tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   p = -1;
-   n = u11tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-   
-   p = 0;
-   n = u11tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-
-   p = 2046;
-   n = u11tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-
-   p = 2047;
-   n = u11tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-
-   p = 2048;
-   n = u11tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-
-   cout << "\n\n//------------------------------------------\n"
-        << "// *** ossimNormalizedU8RemapTable test ***\n"
-        << "//------------------------------------------\n"
-        << endl;
-   
-   ossimNormalizedU8RemapTable u8tbl;
-   
-   i = 0;
-   while (i < 256)
-   {
-      n = u8tbl[i];
-      p = u8tbl.pixFromNorm(n);
-      cout << "idx[" << i << "]: n (" << n << "), p(" << p << ")\n";
-      ++i;
-   }
-
-   n = -0.1;
-   p = u8tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-    
-   n = 0.0;
-   p = u8tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 0.00000625; // Just above null pixel
-   p = u8tbl.pixFromNorm(n);
-   cout << "Just above null\n";
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 0.001;
-   p = u8tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 1.0;
-   p = u8tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 1.1;
-   p = u8tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   n = 1.0;
-   p = u8tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-   
-   n = 1.1;
-   p = u8tbl.pixFromNorm(n);
-   cout << "pixFromNorm(" << n << "): " << p << "\n";
-
-   p = -1;
-   n = u8tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-   
-   p = 0;
-   n = u8tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-
-   p = 254;
-   n = u8tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-
-   p = 255;
-   n = u8tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-
-   p = 256;
-   n = u8tbl.normFromPix(p);
-   cout << "normFromPix(" << p << "): " << n << "\n";
-   
-   return 0;
-}
diff --git a/src/test/ossim-single-image-chain-test.cpp b/src/test/ossim-single-image-chain-test.cpp
deleted file mode 100644
index 03d0599..0000000
--- a/src/test/ossim-single-image-chain-test.cpp
+++ /dev/null
@@ -1,164 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Test application for ossimSingleImageChain class.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossim-single-image-chain-test.cpp 21631 2012-09-06 18:10:55Z dburken $
-
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/base/ossimTimer.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimImageHandler.h>
-#include <ossim/imaging/ossimImageRenderer.h>
-#include <ossim/imaging/ossimSingleImageChain.h>
-#include <ossim/imaging/ossimTiffWriter.h>
-#include <ossim/init/ossimInit.h>
-#include <iomanip>
-#include <iostream>
-using namespace std;
-
-int main(int argc, char* argv[])
-{
-   ossimTimer::instance()->setStartTick();
-   
-   ossimInit::instance()->initialize(argc, argv);
-
-   ossimTimer::Timer_t t1 = ossimTimer::instance()->tick();
-   
-   cout << "elapsed time after initialize(ms): "
-        << std::setiosflags(ios::fixed)
-        << std::setprecision(3)
-        << ossimTimer::instance()->time_s() << "\n";
-
-   if (argc < 2)
-   {
-      cout << argv[0] << "<image_file> <optional_output_file>"
-           << "\nOpens up single image chain and dumps the state to keyword"
-           << " list." << endl;
-      return 0;
-   }
-
-   ossimRefPtr<ossimSingleImageChain> sic1 = new ossimSingleImageChain();
-   if ( sic1->open( ossimFilename(argv[1]) ) )
-   {
-      // Set up chain:
-      
-      if ( sic1->getImageHandler()->getNumberOfOutputBands() == 4 )
-      {
-         // Just guessing...
-         sic1->setThreeBandReverseFlag(true);
-      }
-               
-      // Always have resampler cache.
-      sic1->setAddResamplerCacheFlag(true);
-
-      // Histogram:
-      sic1->setAddHistogramFlag(true);
-
-      sic1->createRenderedChain();
-
-      // Histogram stretch:
-      if ( sic1->openHistogram(ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX) == false )
-      {
-         cout << "Could not do histogram stretch!" << endl;
-      }
-      
-      if (argc == 3)
-      {
-         // Write image:
-         ossimRefPtr<ossimImageFileWriter> writer = new ossimTiffWriter();
-         if ( writer->open( ossimFilename(argv[2]) ) )
-         {
-            cout << "Outputting file: " << ossimFilename(argv[2]) << endl;
-            
-            // Add a listener to get percent complete.
-            ossimStdOutProgress prog(0, true);
-            writer->addListener(&prog);
-
-            writer->connectMyInputTo(0, sic1.get());
-            writer->execute();
-            ossimTimer::Timer_t t2 = ossimTimer::instance()->tick();
-            cout << "elapsed time after write(ms): "
-                 << std::setiosflags(ios::fixed)
-                 << std::setprecision(3)
-                 << ossimTimer::instance()->time_s() << "\n";
-
-            cout << "write time minus initialize: "
-                 << std::setiosflags(ios::fixed)
-                 << std::setprecision(3)
-                 << ossimTimer::instance()->delta_s(t1, t2) << "\n";
-         }
-      }
-
-      ossimRefPtr<ossimImageGeometry> geom = sic1->getImageGeometry();
-      if (geom.valid())
-      {
-         geom->print(cout);
-      }
-
-      // Test the load state.
-      ossimKeywordlist kwl;
-      sic1->saveState(kwl, 0);
-
-      ossimSingleImageChain* sic2 = new ossimSingleImageChain();
-      sic2->loadState(kwl, 0);
-
-      kwl.clear();
-      sic2->saveState(kwl, 0);
-
-      cout << "\n\nSingle image chain from load state kwl\n" << kwl;
-   }
-
-   // Create a normal chain.
-   sic1 = new ossimSingleImageChain(true,  // addHistogramFlag
-                                    true,  // addResamplerCacheFlag
-                                    true,  // addChainCacheFlag
-                                    false, // remapToEightBitFlag
-                                    false, // threeBandFlag
-                                    false); // threeBandReverseFlag
-   
-   if ( sic1->open( ossimFilename(argv[1]) ) )
-   {
-      sic1->createRenderedChain();
-      ossimKeywordlist kwl;
-      sic1->saveState(kwl, 0);
-      cout << "\n\nNormal single image chain kwl\n" << kwl;
-   }
-
-   // Create a stripped down chain.
-   sic1 = new ossimSingleImageChain();
-   if ( sic1->open( ossimFilename(argv[1]) ) )
-   {
-      sic1->createRenderedChain();
-      ossimKeywordlist kwl;
-      sic1->saveState(kwl, 0);
-      cout << "\n\nSingle image chain stripped down kwl\n" << kwl;
-   }
-
-   // Create a rgb reversed chain.
-   sic1 = new ossimSingleImageChain();
-   if ( sic1->open( ossimFilename(argv[1]) ) )
-   {
-      sic1->setThreeBandReverseFlag(true);
-      sic1->createRenderedChain();
-      ossimKeywordlist kwl;
-      sic1->saveState(kwl, 0);
-      cout << "\n\nSingle image chain rgb reversed kwl\n" << kwl;
-   }
-
-   cout << "constness test:\n";
-   ossimRefPtr<const ossimSingleImageChain> consSic = sic1.get();
-   ossimRefPtr<const ossimImageHandler> ihConst =  consSic->getImageHandler().get();
-   cout << "image handler bands: " << ihConst->getNumberOfOutputBands() << endl;
-
-   return 0;
-}
diff --git a/src/test/ossim-single-image-chain-threaded-test.cpp b/src/test/ossim-single-image-chain-threaded-test.cpp
deleted file mode 100644
index 1b2a613..0000000
--- a/src/test/ossim-single-image-chain-threaded-test.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossim-single-image-chain-threaded-test.cpp
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Test application for ossimSingleImageChain with a
-// ossimMultiThreadSequencer.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossim-single-image-chain-threaded-test.cpp 20269 2011-11-18 15:40:56Z dburken $
-
-#include <iostream>
-using namespace std;
-
-#include <ossim/base/ossimCommon.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimRefPtr.h>
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/base/ossimTimer.h>
-#include <ossim/imaging/ossimSingleImageChain.h>
-#include <ossim/imaging/ossimTiffWriter.h>
-#include <ossim/init/ossimInit.h>
-#include <ossim/parallel/ossimMultiThreadSequencer.h>
-
-int main(int argc, char* argv[])
-{
-   ossimTimer::instance()->setStartTick();
-   
-   ossimInit::instance()->initialize(argc, argv);
-
-   ossimTimer::Timer_t t1 = ossimTimer::instance()->tick();
-   
-   cout << "elapsed time after initialize(ms): "
-        << ossimTimer::instance()->time_s() << "\n";
-
-   if (argc < 4)
-   {
-      cout << argv[0] << "<threads> <image_file> <output_file.tif>"
-           << "\nOpens up single image chain and writes to output_file using N threads."
-           << " list.\nNOTE: Hard wired tiff writer; hence, the output_file.tif." << endl;
-      return 0;
-   }
-
-   ossim_uint32  threads     = ossimString(argv[1]).toUInt32();
-   if ( threads == 0 )
-   {
-      threads = ossim::getNumberOfThreads();
-   }
-   ossimFilename image_file  = argv[2];
-   ossimFilename output_file = argv[3];
-
-   cout << "threads:     " << threads
-        << "\nimage_file:  " << image_file
-        << "\noutput_file: " << output_file
-        << "\n";
-   
-   ossimRefPtr<ossimSingleImageChain> sic1 = new ossimSingleImageChain();
-   
-   if ( sic1->open( image_file ) )
-   {
-      sic1->createRenderedChain();
-
-      // Establish the MT sequencer:
-      ossimRefPtr<ossimMultiThreadSequencer> mts =
-         new ossimMultiThreadSequencer( sic1.get(), threads );
-
-      ossimRefPtr<ossimImageFileWriter> writer = new ossimTiffWriter();
-      writer->changeSequencer( mts.get() );
-      
-      if ( writer->open( output_file ) )
-      {
-         // Add a listener to get percent complete.
-         ossimStdOutProgress prog(0, true);
-         writer->addListener(&prog);
-
-         // Connect the chain to writer.
-         writer->connectMyInputTo(0, sic1.get());
-
-         // Write the file.
-         writer->execute();
-         
-         ossimTimer::Timer_t t2 = ossimTimer::instance()->tick();
-         cout << "elapsed time after write(ms): "
-              << std::setiosflags(ios::fixed)
-              << std::setprecision(3)
-              << ossimTimer::instance()->time_s() << "\n";
-         
-         cout << "write time minus initialize: "
-              << std::setiosflags(ios::fixed)
-              << std::setprecision(3)
-              << ossimTimer::instance()->delta_s(t1, t2) << "\n";
-      }
-   }
-
-   return 0;
-}
diff --git a/src/test/ossim-threaded-chain-test.cpp b/src/test/ossim-threaded-chain-test.cpp
deleted file mode 100644
index 6094b88..0000000
--- a/src/test/ossim-threaded-chain-test.cpp
+++ /dev/null
@@ -1,221 +0,0 @@
-//**************************************************************************************************
-//                          OSSIM -- Open Source Software Image Map
-//
-// License:  See top level LICENSE.txt file.
-//
-// Authors:  Oscar Kramer, David Burken
-//
-// Description: Test code for multi-threaded sequencer and associated logic.
-//
-// $Id$
-//**************************************************************************************************
-
-#include <ossim/base/ossimConstants.h>  
-#include <ossim/base/ossimCommon.h>  
-#include <ossim/init/ossimInit.h>
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/imaging/ossimSingleImageChain.h>
-#include <ossim/imaging/ossimImageRenderer.h>
-#include <ossim/imaging/ossimFilterResampler.h>
-#include <ossim/parallel/ossimMultiThreadSequencer.h>
-#include <ossim/parallel/ossimMtDebug.h>
-#include <ossim/base/ossimTimer.h>
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/imaging/ossimTiffWriter.h>
-#include <ossim/imaging/ossimImageMosaic.h>
-#include <iostream>
-#include <sstream>
-
-using namespace std;
-
-//**************************************************************************************************
-// USAGE:  ossim-threaded-chain-test <num_threads> <input_file> <output_file>
-//**************************************************************************************************
-int main(int argc, char *argv[])
-{
-   ossimTimer::instance()->setStartTick();
-
-   ossimArgumentParser ap(&argc, argv);
-   ossimInit::instance()->initialize(ap);
-
-   unsigned int tempUint;
-   ossimArgumentParser::ossimParameter uintParam(tempUint);
-   ossimMtDebug* mt_debug = ossimMtDebug::instance();
-   bool chainCacheEnabled=false;
-   if (ap.read("--chain-cache"))
-      chainCacheEnabled = true;
-   if (ap.read("--handler-cache"))
-      mt_debug->handlerCacheEnabled = true;
-   if (ap.read("--faux-input"))
-      mt_debug->handlerUseFauxTile = true;
-   if (ap.read("--shared-handler"))
-      mt_debug->chainSharedHandlers = true;
-   if (ap.read("--seq-debug"))
-      mt_debug->seqDebugEnabled = true;
-   if (ap.read("--timer"))
-      mt_debug->seqMetricsEnabled = true;
-   if (ap.read("--tblocks", uintParam))
-      mt_debug->seqTimedBlocksDt = tempUint;
-   if (ap.read("--cache-size", uintParam))
-      mt_debug->maxTileCacheSize = tempUint;
-
-   // Parse command line "<num_threads> <input_file> <output_file>":
-   if (argc < 2)
-   {
-      cout << "\n   "<< argv[0] << " [options] <image_file> [<output_file.tif>]\n"
-         << "\n Opens up single image chain and writes to output_file using N threads."
-         << "\n If N=0, this indicates a conventional (unthreaded) sequencer will be used."
-         << "\n If no output file is specified, the processed tiles are dumped on the floor."
-         << "\n Only TIFF file output is supported."
-         << "\n"
-         << "\n Options:"
-         << "\n    --threads <int>     Must be nonzero for multi-threading sequencer"
-         << "\n    --shared-handler    Enable shared handlers"
-         << "\n    --handler-cache     Adds cache to handler adaptor (valid only with shared handler)"
-         << "\n    --chain-cache       Inserts cache source in the image chain"
-         << "\n    --faux-input        Use faux input tiles"
-         << "\n    --seq-debug         Enable sequencer debug"
-         << "\n    --timer             Enable sequencer timing metrics"
-         << "\n    --tblocks <msec>    Enable timed blocks at specified interval"
-         << "\n    --cache-size <int>  Specify the max tile cache factor in sequencer"
-         << endl;
-      return 0;
-   }
-   
-   double t1 = (double)ossimTimer::instance()->time_m()/1000.0;
-
-   ossim_uint32  num_threads = 0;
-   if (ap.read("--threads", uintParam))
-      num_threads = tempUint;
-
-   ossimFilename image_file  = argv[1];
-   ossimFilename output_file;
-   if (argc > 2)
-      output_file = argv[2];
-   
-   // Create original chain:
-   ossimRefPtr<ossimSingleImageChain> singleImageChain =
-      new ossimSingleImageChain(false, chainCacheEnabled, false, false, false, false);
-   if (!singleImageChain->open(image_file))
-   {
-      cout<<"\nUnable to open image file at <"<<image_file<<">. Aborting..."<<endl;
-      return 1;
-   }
-   singleImageChain->createRenderedChain();
-   ossimRefPtr<ossimImageRenderer> renderer = singleImageChain->getImageRenderer().get();
-   if (renderer.valid())
-      renderer->getResampler()->setFilterType(ossimFilterResampler::ossimFilterResampler_GAUSSIAN);
-   ossimIrect rect = singleImageChain->getBoundingRect();
-
-   // Create complex chain of chains:
-   ossimRefPtr<ossimImageChain> product_chain = new ossimImageChain;
-   ossimRefPtr<ossimImageMosaic> mosaicObject = new ossimImageMosaic;
-   mosaicObject->connectMyInputTo(singleImageChain.get());
-   singleImageChain->changeOwner(mosaicObject.get());
-   product_chain->addFirst(mosaicObject.get());
-
-   // Make sequencer:
-   ossimRefPtr<ossimMultiThreadSequencer> mts = 0;
-   ossimRefPtr<ossimImageSourceSequencer> seq = 0;
-   ossimRefPtr<ossimImageFileWriter> writer = 0;
-   const char* noyes[2]={"no","yes"};
-   if (num_threads > 0)
-   {
-      // Establish the MT sequencer:
-      mts = new ossimMultiThreadSequencer(product_chain.get(), num_threads);
-      seq = mts.get();
-      cout<<"\nUsing multi-threaded sequencer..."
-         << "\n   Input file:             " << image_file
-         << "\n   Output file:            " << output_file
-         << "\n   Number of threads:      " << num_threads
-         << "\n   Using faux input tiles: " << noyes[(int)mt_debug->handlerUseFauxTile]
-         << "\n   Using shared handler:   " << noyes[(int)mt_debug->chainSharedHandlers]
-         << "\n   Using handler cache:    " << noyes[(int)mt_debug->handlerCacheEnabled]
-         << "\n   Using chain cache:      " << noyes[(int)chainCacheEnabled];
-      if ( mt_debug->seqTimedBlocksDt > 0)
-         cout<< "\n   Using timed blocks:     yes (" << mt_debug->seqTimedBlocksDt<<" ms)";
-      else
-         cout<< "\n   Using timed blocks:     no";
-      cout<<"\n   Sequencer cache size:   " << mts->maxCacheSize() << endl;
-   }
-   else
-   {
-      cout<<"\nUsing conventional (unthreaded) sequencer..."
-         << "\n   Input file:             " << image_file
-         << "\n   Output file:            " << output_file<<endl;
-      seq = new ossimImageSourceSequencer(product_chain.get());
-   }
-
-   if (output_file.empty())
-   {
-      // No writer specified, so simply perform the sequencing here:
-      seq->setToStartOfSequence();
-      ossim_uint32 num_tiles = seq->getNumberOfTiles();
-      ossim_uint32 show_every_n = num_tiles/20;
-      ossim_uint32 percent_complete = 0;
-      ossim_uint32 n = 0;
-      cout << "  0%   \r"<<ends;
-      for (ossim_uint32 tile_idx=0; tile_idx<num_tiles; ++tile_idx)
-      {
-         seq->getNextTile();
-         if (++n >= show_every_n)
-         {
-            percent_complete += 5;
-            cout << "  "<<percent_complete<<"%   \r"<<ends;
-            n = 0;
-         }
-      }
-      cout<<endl;
-   }
-   else
-   {
-      // Make writer object since output file was specified:
-      writer = new ossimTiffWriter();
-      writer->connectMyInputTo(product_chain.get());
-      writer->setOutputName(output_file);
-      writer->changeSequencer( seq.get() );
-      if ( !writer->open( output_file ) )
-      {
-         cout<<"\nUnable to create output file at <"<<output_file<<">. Aborting..."<<endl;
-         return 1;
-      }
-
-      // Add a listener to get percent complete and start:
-      ossimStdOutProgress prog(0, true);
-      writer->addListener(&prog);
-
-      // Write the file:
-      double writeStartTime = ossimTimer::instance()->time_s();
-      writer->execute();
-      double writeStopTime = ossimTimer::instance()->time_s();
-      double writeTime = writeStopTime - writeStartTime;
-      
-      double bps = ((ossim_uint64)output_file.fileSize())/writeTime;
-      double megaBytePerSecond = bps / ((double) 1024*1024);
-      cout << "   Write MB per second:    " << setprecision(3) << megaBytePerSecond << endl;
-   }
-   double t2 = (double)ossimTimer::instance()->time_m()/1000.0;
-
-   if (mts.valid())
-   {
-      cout << "   Max cache used:         "<< mts->d_maxCacheUsed << endl;
-      cout << "   Cache emptied count:    "<< ossimString::toString(mts->d_cacheEmptyCount) << endl;
-   }
-   cout << setprecision(3);
-
-   if (mts.valid())
-   {
-      double jgtt = mts->d_jobGetTileT;
-      double jgttpj = jgtt/num_threads;
-      cout << "   Time waiting on jobs:   "<<mts->d_idleTime2<<" s"<<endl;
-      cout << "   Time waiting on cache:  "<<mts->d_idleTime5<<" s"<<endl;
-      cout << "   Handler getTile T:      "<<mts->handlerGetTileT()<<" s"<<endl;
-      cout << "   Job getTile T:          "<<jgtt<<" s"<<endl;
-      cout << "   Average getTile T/job:  "<<jgttpj<<" s"<<endl;
-   }
-   cout << "   Execution time:         " << t2-t1  << " s" << endl;
-   cout << "   Total time:             " << t2    << " s" << endl;
-
-   writer = 0;
-   return 0;
-}
diff --git a/src/test/ossim-threaded-elevation-test.cpp b/src/test/ossim-threaded-elevation-test.cpp
deleted file mode 100644
index 0ac7220..0000000
--- a/src/test/ossim-threaded-elevation-test.cpp
+++ /dev/null
@@ -1,165 +0,0 @@
-#include <cstdlib> /* for exit */
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <ossim/base/ossimNotifyContext.h>
-#include <ossim/elevation/ossimElevManager.h>
-#include <ossim/elevation/ossimDtedElevationDatabase.h>
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimTimer.h>
-#include <ossim/init/ossimInit.h>
-#include <OpenThreads/Mutex>
-#include <OpenThreads/Barrier>
-#include <OpenThreads/Thread>
-OpenThreads::Barrier* startBarrier = 0;
-OpenThreads::Barrier* endBarrier = 0;
-ossimRefPtr<ossimDtedElevationDatabase> dtedDatabase = new ossimDtedElevationDatabase;
-class ElevationThread : public OpenThreads::Thread
-{
-public:
-   ElevationThread(const ossimString& threadName="",
-                   double minLon=-180.0, 
-                   double minLat=-90.0,
-                   double maxLon=180.0,
-                   double maxLat=90.0)
-   :m_threadName(threadName),
-   m_minLat(minLat),
-   m_minLon(minLon),
-   m_maxLat(maxLat),
-   m_maxLon(maxLon)
-   {
-      m_numberOfPointsToQuery = 1000;
-      m_lonDelta = m_maxLon-m_minLon;
-      m_latDelta = m_maxLat-m_minLat;
-      m_mslTest = false;
-   }
-   void setNumberOfPointsToQuery(ossim_uint32 nPoints)
-   {
-      m_numberOfPointsToQuery = nPoints;
-   }
-   virtual void run()
-   {
-      // let all threads start at the same time
-      startBarrier->block();
-      ossim_uint32 idx = 0;
-      for(idx = 0; idx < m_numberOfPointsToQuery; ++idx)
-      {
-         ossim_float32 xt = static_cast<double>(rand())/static_cast<double>(RAND_MAX);
-         ossim_float32 yt = static_cast<double>(rand())/static_cast<double>(RAND_MAX);
-         ossimGpt gpt(m_minLat + yt*m_latDelta, m_minLon + xt*m_lonDelta);
-#if 0
-          double h = ossimElevManager::instance()->getHeightAboveEllipsoid(gpt);// << "==" << ossimElevManager::instance()->getHeightAboveMSL(gpt) << "\n";
-         std::cout << h << "\n";
-#else
-         if(m_mslTest)
-         {
-            ossimElevManager::instance()->getHeightAboveMSL(gpt);
-         }
-         else
-         {
-            ossimElevManager::instance()->getHeightAboveEllipsoid(gpt);
-         }
-#endif
-      }
-      // let all threads end at the same time
-      endBarrier->block();
-   }
-   
-   ossimString m_threadName;
-   ossim_uint32 m_numberOfPointsToQuery;
-   double m_minLat;
-   double m_minLon;
-   double m_maxLat;
-   double m_maxLon;
-   double m_latDelta;
-   double m_lonDelta;
-   
-   bool m_mslTest;
-};
-
-int main(int argc, char* argv[])
-{
-   ossimString tempString;
-   ossimArgumentParser::ossimParameter stringParam(tempString);
-   ossimArgumentParser argumentParser(&argc, argv);
-   //ossimInit::instance()->addOptions(argumentParser);
-   ossimInit::instance()->initialize(argumentParser);
-   ossim_uint32 threads = 10;
-   ossim_uint32 postsToQuery = 1000;
-   ossim_uint32 randomSeed = 0;
-   double minLon = -180.0;
-   double minLat = -90.0;
-   double maxLon = 180.0;
-   double maxLat = 90.0;
-   argumentParser.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
-   argumentParser.getApplicationUsage()->addCommandLineOption("--threads","Specify the number of threads to test simultaneus access to elevation");
-   argumentParser.getApplicationUsage()->addCommandLineOption("--elev-post-queries","Number of elevation post queries per thread");
-   argumentParser.getApplicationUsage()->addCommandLineOption("--random-seed", "value to use as the seed for the random elevation post generator");
-   argumentParser.getApplicationUsage()->addCommandLineOption("--use-geoid-if-null", "specify true or fals to use the geoid if the elevation post is null");
-   argumentParser.getApplicationUsage()->addCommandLineOption("--bbox", "ground rect to constrain the random values to");
-   if (argumentParser.read("-h") ||
-       argumentParser.read("--help"))
-   {
-      argumentParser.getApplicationUsage()->write(ossimNotify(ossimNotifyLevel_WARN));
-      exit(0);
-   }
-   if(argumentParser.read("--threads", stringParam))
-   {
-      threads = tempString.toUInt32();
-   }
-   if(argumentParser.read("--elev-post-queries", stringParam))
-   {
-      postsToQuery = tempString.toUInt32();
-   }
-   if(argumentParser.read("--random-seed", stringParam))
-   {
-      randomSeed = tempString.toUInt32();
-   }
-   if(argumentParser.read("--use-geoid-if-null", stringParam))
-   {
-      ossimElevManager::instance()->setUseGeoidIfNullFlag(tempString.toBool());
-   }
-   if(argumentParser.read("--bbox", stringParam))
-   {
-      std::vector<ossimString> splitArray;
-      tempString.split(splitArray, ",");
-      if(splitArray.size()==4)
-      {
-         minLon = splitArray[0].toDouble();
-         minLat = splitArray[1].toDouble();
-         maxLon = splitArray[2].toDouble();
-         maxLat = splitArray[3].toDouble();
-         
-         std::cout  << "minlon = " << minLon << "\n";
-         std::cout  << "minlat = " << minLat << "\n";
-         std::cout  << "maxlon = " << maxLon << "\n";
-         std::cout  << "maxlat = " << maxLat << "\n";
-      }
-   }
-   ossimKeywordlist kwl;
-//   kwl.add("connection_string", "/data/elevation/dted/1k");
-//   kwl.add("type", "ossimDtedElevationDatabase");
-  // std::cout << "Loaded database? " << dtedDatabase->loadState(kwl) << std::endl;
-   srand(randomSeed);
-   std::vector<ElevationThread*> threadList(threads);
-   startBarrier = new OpenThreads::Barrier(threads); // include the main thread for synching
-   endBarrier = new OpenThreads::Barrier(threads+1); //   include main thread for syncing end 
-   ossim_uint32 idx = 0;
-   for(idx = 0; idx < threads; ++ idx)
-   {
-      threadList[idx] = new ElevationThread("Thread " + ossimString::toString(idx), minLon, minLat, maxLon, maxLat);
-      threadList[idx]->setNumberOfPointsToQuery(postsToQuery);
-      threadList[idx]->start();
-   }
-   ossimTimer::Timer_t t1 = ossimTimer::instance()->tick();
-   // synch all threads to start at the same time
-   std::cout << "Number of threads:         " << threads      << "\n";
-   std::cout << "Posts to query per thread: " << postsToQuery << "\n";
-//   startBarrier->block();
-   endBarrier->block();
-   std::cout << "All threads finished\n";
-   ossimTimer::Timer_t t2 = ossimTimer::instance()->tick();
-   std::cout << "Time elapsed:              " << ossimTimer::instance()->delta_s(t1, t2) << " seconds" << "\n";
-   delete startBarrier;
-   delete endBarrier;
-   return 0;
-}
diff --git a/src/test/ossim-tiff-info-test.cpp b/src/test/ossim-tiff-info-test.cpp
deleted file mode 100644
index 1a12c35..0000000
--- a/src/test/ossim-tiff-info-test.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// Description: Test app for ossimTiffInfo class.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossim-tiff-info-test.cpp 19751 2011-06-13 15:13:07Z dburken $
-
-#include <iostream>
-using namespace std;
-
-#include <ossim/init/ossimInit.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/support_data/ossimTiffInfo.h>
-#include <ossim/support_data/ossimGeoTiff.h>
-
-
-
-int main(int argc, char *argv[])
-{
-   ossimInit::instance()->initialize(argc, argv);
-
-   if (argc != 2)
-   {
-      cout << argv[0] << "<tiff_file>"
-           << "\nPrint dump and geometry info for tiff_file." << endl;
-      return 0;
-   }
-
-   cout << "ossimTiffInfo test:\n";
-   
-   ossimTiffInfo* info = new ossimTiffInfo();
-
-   if ( info->open( ossimFilename(argv[1]) ) )
-   {
-      cout << "ossimTiffInfo dump info:\n";
-      info->print(cout);
-
-      ossimKeywordlist kwl;
-      if ( info->getImageGeometry(kwl, 0) )
-      {
-         cout << "ossimTiffInfo geometry info:\n" << kwl << endl;
-      }
-      else
-      {
-         cout << "ossimTiffInfo get image geometry failed..." << endl;
-      }
-   }
-   else
-   {
-      cout << "Could not open: " << argv[1] << endl;
-   }
-
-   delete info;
-   info = 0;
-
-   cout << "ossimGeoTiff test:\n";
-   
-   ossimGeoTiff* gtif = new ossimGeoTiff();
-   if ( gtif->readTags(argv[1], 0) )
-   {
-      ossimKeywordlist kwl;
-      if ( gtif->addImageGeometry(kwl, 0) )
-      {
-         cout << "ossimGeoTiff geometry info:\n" << kwl << endl;
-      }
-      else
-      {
-         cout << "ossimGeoTiff get image geometry failed..." << endl;
-      }
-   }
-
-   delete gtif;
-   gtif = 0;
-
-   return 0;
-}
diff --git a/src/test/ossim-tiled-elevation-test.cpp b/src/test/ossim-tiled-elevation-test.cpp
deleted file mode 100644
index 303e69b..0000000
--- a/src/test/ossim-tiled-elevation-test.cpp
+++ /dev/null
@@ -1,207 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// File: ossim-tiled-elevation-test.cpp
-// 
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description:
-//
-// Test application for ossimTiledElevationDatabase class.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossim-tiled-elevation-test.cpp 22197 2013-03-12 02:00:55Z dburken $
-
-#include <ossim/init/ossimInit.h>
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimGpt.h>
-#include <ossim/base/ossimGrect.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/base/ossimNotify.h>
-#include <ossim/base/ossimStdOutProgress.h>
-#include <ossim/base/ossimString.h>
-#include <ossim/base/ossimTimer.h>
-#include <ossim/elevation/ossimElevManager.h>
-#include <ossim/elevation/ossimTiledElevationDatabase.h>
-#include <ossim/imaging/ossimImageGeometry.h>
-#include <ossim/imaging/ossimSingleImageChain.h>
-#include <ossim/imaging/ossimTiffWriter.h>
-
-#include <iostream>
-using namespace std;
-
-static void usage()
-{
-   cout << "ossim-tiled-elevation-test <elev-dir> <input-image> <output-image>"
-        << "\n\nCreates a ossimTiledElevationDatabase from elev-dir for the bounding box of\ninput-image and writes output-image in tiff format.\n\nThis test the ossimTiledElevationDatabase ability to map a region of interest\nand serve it up as an elevation source.  Since this is testing elevation, the\n\"input-image\" should have a projection affected by elevation.  In other words,\nsome type of sensor model." << endl;
-}
-
-int main(int argc, char *argv[])
-{
-   int result = 0;
-
-   ossimTimer::instance()->setStartTick();
-
-   // Turn off elevation initialization as we want to use ours.
-   ossimInit::instance()->setElevEnabledFlag(false);
-   
-   ossimInit::instance()->initialize(argc, argv);
-
-   cout << std::setiosflags(ios::fixed) << std::setprecision(3)
-        << "elapsed time after initialize: "
-        << ossimTimer::instance()->time_s() << "\n";
-   
-   if (argc == 4)
-   {
-      try // Exceptions can be thrown so 
-      {
-         ossimFilename elevDir     = argv[1];
-         ossimFilename inputImage  = argv[2];
-         ossimFilename outputImage = argv[3];
-         
-         cout << "elev-dir: " << elevDir << "\ninput-image: " << inputImage
-              << "\noutput-image: " << outputImage << "\n";
-         
-         ossimTiledElevationDatabase* elevdb = new ossimTiledElevationDatabase();
-         
-         ossimKeywordlist kwl;
-         kwl.setExpandEnvVarsFlag(true);
-         kwl.add("connection_string", "$(OSSIM_DATA)/elevation/srtm/3arc");
-         kwl.add("geoid.type", "geoid1996");
-         kwl.add("max_open_cells", "50");
-         kwl.add("memory_map_cells", "false");
-         kwl.add("min_open_cells", "25");
-         kwl.add("type", "ossimTiledElevationDatabase");
-         
-         if ( elevdb->loadState(kwl, 0) )
-         {
-            ossimRefPtr<ossimSingleImageChain> sic1 = new ossimSingleImageChain();
-            sic1->setAddResamplerCacheFlag(true);
-            sic1->setAddChainCacheFlag(true);
-
-            // Open:
-            if ( sic1->open( inputImage ) )
-            {
-               // Get the geometry:
-               ossimRefPtr<ossimImageGeometry> geom = sic1->getImageGeometry();
-               
-               // Get the bounding rectangle:
-               ossimGrect boundingRect;
-               std::vector<ossimGpt> corner(4);
-               if ( geom->getCornerGpts(corner[0], corner[1], corner[2], corner[3]) )
-               {
-                  ossimGpt ulGpt(corner[0]);
-                  ossimGpt lrGpt(corner[0]);
-                  cout << "corner[0]: " << corner[0] << endl;
-                  for ( ossim_uint32 i = 1; i < 4; ++i )
-                  {
-                     cout << "corner[" << i << "]: " << corner[i] << endl;
-                     if ( corner[i].lon < ulGpt.lon ) ulGpt.lon = corner[i].lon;
-                     if ( corner[i].lat > ulGpt.lat ) ulGpt.lat = corner[i].lat;
-                     if ( corner[i].lon > lrGpt.lon ) lrGpt.lon = corner[i].lon;
-                     if ( corner[i].lat < lrGpt.lat ) lrGpt.lat = corner[i].lat;
-                  }
-
-                  //---
-                  // Add a padding to ensure no nans on edges:
-                  // Should check for wrap here but just test code.
-                  //---
-                  const ossim_float64 PADDING = 1.0/60.0; // one minute.
-                  ulGpt.lon -= PADDING;
-                  ulGpt.lat += PADDING;
-                  lrGpt.lon += PADDING;
-                  lrGpt.lat -= PADDING;
-                  cout << "ulGpt: " << ulGpt
-                       << "\nlrGpt: " << lrGpt
-                       << endl;
-                  boundingRect = ossimGrect(ulGpt, lrGpt);
-               }
-               else
-               {
-                  boundingRect.makeNan();
-               }
-               
-               if ( boundingRect.isLonLatNan() == false )
-               {
-                  // Create the chain:
-                  sic1->createRenderedChain();
-                  
-                  cout << "boundingRect: " << boundingRect << endl;
-                  elevdb->mapRegion(boundingRect);
-
-                  cout << std::setiosflags(ios::fixed) << std::setprecision(3)
-                       << "elapsed time after mapping elevation: "
-                       << ossimTimer::instance()->time_s() << "\n";
-
-                  cout << "ossimTiledElevationDatabase::getMeanSpacingMeters: "
-                       << elevdb->getMeanSpacingMeters() << "\n";
-                  
-                  cout << "mappedRect: " << elevdb->getBoundingGndRect() << endl;
-                  ossimElevManager::instance()->setDefaultHeightAboveEllipsoid(0.0);
-                  ossimElevManager::instance()->setUseGeoidIfNullFlag(true);
-                  ossimElevManager::instance()->addDatabase(elevdb);
-
-#if 0
-                  // 35.821992089329882, 51.437673634967858
-                  // Height: 1874.649761970292 MSL: 1871.642024320508
-                  ossimGpt pt1(35.821992089329882, 51.437673634967858);
-                  ossimGpt pt2(35.843333333333334, 51.373333333333335);
-                  ossimGpt pt3(35.694166666666668, 51.598333333333336);
-
-                  cout << "getHeightAboveEllipsoid(35.821992089329882, 51.437673634967858): "
-                       << ossimElevManager::instance()->getHeightAboveEllipsoid(pt1)
-                       << "\ngetHeightAboveEllipsoid(35.843333333333334, 51.373333333333335): "
-                       << ossimElevManager::instance()->getHeightAboveEllipsoid(pt2)
-                       << "\ngetHeightAboveEllipsoid(35.694166666666668, 51.598333333333336): "
-                       << ossimElevManager::instance()->getHeightAboveEllipsoid(pt3) << endl;
-#endif
-                  
-                  ossimRefPtr<ossimImageFileWriter> writer = new ossimTiffWriter();
-                  if ( writer->open( outputImage ) )
-                  {
-                     // Add a listener to get percent complete.
-                     ossimStdOutProgress prog(0, true);
-                     writer->addListener(&prog);
-                     
-                     writer->connectMyInputTo(0, sic1.get());
-                     writer->execute();
-                     cout << std::setiosflags(ios::fixed) << std::setprecision(3)
-                          << "elapsed time in seconds: "
-                          << ossimTimer::instance()->time_s() << "\n";
-                  }
-                  else
-                  {
-                    cout << "Could not open: " << outputImage << endl;
-                  }
-               }
-               else
-               {
-                  cout << "bounding box for " << inputImage << " has nans...\n";
-               }
-               
-            } // if ( sic1->open( inputImage) ) )
-            else
-            {
-               cout << "Could not open: " << inputImage << endl;
-            }
-            
-            // ossimDrect boundingRect = elevdb->getBounding
-         }
-
-            
-      }
-      catch( const ossimException& e )
-      {
-         ossimNotify(ossimNotifyLevel_WARN) << e.what() << std::endl;
-         result = 1;
-      }
-   }
-   else
-   {
-      usage();
-   }
-   return result;
-}
-
diff --git a/src/test/ossim-visitor-test.cpp b/src/test/ossim-visitor-test.cpp
deleted file mode 100644
index 11d742f..0000000
--- a/src/test/ossim-visitor-test.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  See top level LICENSE.txt file.
-//
-// File: ossim-foo.cpp
-//
-// Author:  David Burken
-//
-// Description: Contains application definition "foo" app.
-//
-// NOTE:  This is supplied for simple quick test.  Makefile links with
-//        libossim so you don't have to muck with that.
-//        DO NOT checkin your test to the svn repository.  Simply
-//        edit foo.cc (Makefile if needed) and run your test.
-//        After completion you can do a "svn revert foo.cpp" if you want to
-//        keep your working repository up to snuff.  Enjoy!
-//
-// $Id: ossim-visitor-test.cpp 19919 2011-08-09 11:30:59Z gpotts $
-//----------------------------------------------------------------------------
-
-#include <ossim/base/ossimArgumentParser.h>
-#include <ossim/base/ossimApplicationUsage.h>
-#include <ossim/base/ossimConstants.h>  // ossim contants...
-#include <ossim/base/ossimCommon.h>  // ossim contants...
-#include <ossim/base/ossimException.h>
-#include <ossim/base/ossimConnectableObject.h>
-#include <ossim/base/ossimObjectFactoryRegistry.h>
-#include <ossim/base/ossimVisitor.h>
-#include <ossim/base/ossimKeywordlist.h>
-#include <ossim/init/ossimInit.h>
-
-
-// Put your includes here:
-
-#include <iostream>
-#include <sstream>
-#include <iomanip>
-#include <list>
-#include <algorithm>
-
-static const char* kwl1String = "type: ossimImageChain\n"
-"object1.type: ossimRectangleCutFilter\n";
-
-static const char* kwl2String = "type: ossimImageChain\n"
-"object2.type: ossimBrightnessContrastSource\n";
-
-static const char* kwl3NestedString = "type: ossimImageChain\n"
-"object10.type: ossimScalarRemapper\n"
-"object30.type: ossimImageChain\n"
-"object30.object1.type: ossimImageRenderer\n";
-
-int main(int argc, char *argv[])
-{
-   ossimArgumentParser ap(&argc, argv);
-   ossimInit::instance()->addOptions(ap);
-   ossimInit::instance()->initialize(ap);
-   ossimKeywordlist kwl1;
-   ossimKeywordlist kwl2;
-   ossimKeywordlist kwl3;
-   if(kwl1.parseString(kwl1String)&&
-      kwl2.parseString(kwl2String)&&
-      kwl3.parseString(kwl3NestedString))
-   {
-      ossimRefPtr<ossimObject> obj1 =  ossimObjectFactoryRegistry::instance()->createObject(kwl1);
-      ossimRefPtr<ossimObject> obj2 =  ossimObjectFactoryRegistry::instance()->createObject(kwl2);
-      ossimRefPtr<ossimObject> obj3 =  ossimObjectFactoryRegistry::instance()->createObject(kwl3);
-      
-      ossimRefPtr<ossimConnectableObject> connectable1 = dynamic_cast<ossimConnectableObject*> (obj1.get());
-      ossimRefPtr<ossimConnectableObject> connectable2 = dynamic_cast<ossimConnectableObject*> (obj2.get());
-      ossimRefPtr<ossimConnectableObject> connectable3 = dynamic_cast<ossimConnectableObject*> (obj3.get());
-      
-      if(connectable1.valid()&&connectable2.valid()&&connectable3.valid())
-      {
-         connectable2->connectMyInputTo(connectable1.get());
-         connectable3->connectMyInputTo(connectable2.get());
-         
-         ossimTypeNameVisitor visitor("ossimConnectableObject", false, ossimVisitor::VISIT_CHILDREN|ossimVisitor::VISIT_INPUTS);
-         connectable3->accept(visitor);
-         
-         
-         ossimCollectionVisitor::ListRef& collection = visitor.getObjects();
-         if(collection.size() == 8)
-         {
-            std::cout << "PASSED..." << std::endl;
-         }
-         else 
-         {
-            std::cout << "FAILED..." << std::endl;
-         }
-
-         ossimCollectionVisitor::ListRef::iterator iter=collection.begin();
-//         while(iter != collection.end())
-//         {
-//            std::cout << (*iter)->getClassName() << std::endl;
-//            ++iter;
-//         }
-      }
-   }
-   
-   return 0;
-}
diff --git a/src/test/ossim-wavelength-test.cpp b/src/test/ossim-wavelength-test.cpp
deleted file mode 100644
index 7b3528a..0000000
--- a/src/test/ossim-wavelength-test.cpp
+++ /dev/null
@@ -1,127 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Description:
-//
-// Test app for ossimWavelength class.
-// 
-//----------------------------------------------------------------------------
-// $Id$
-
-#include <ossim/init/ossimInit.h>
-#include <ossim/support_data/ossimEnviHeader.h>
-#include <ossim/support_data/ossimWavelength.h>
-
-#include <iostream>
-#include <vector>
-using namespace std;
-
-static void usage()
-{
-   cout << "\nUsage:\nossim-wavelength-test <envi-header-file> <wavelength> <threshold_from_center>"
-        << "\nWill output found closest index and wavelength."
-        << "Note: Units in nanometers"
-        << "\nContents of minimal header file:"
-        << "\nwavelength units = Nanometers"
-        << "\nwavelength = {374.323608,  382.530487,  390.737427,  398.944336,  407.150970}"
-        << "\n" << endl;
-}
-
-int main(int argc, char *argv[])
-{
-   ossimInit::instance()->initialize(argc, argv);
-
-   if (argc != 4)
-   {
-      usage();
-      return 0;
-   }
-
-   ossimFilename hdrFile                   = argv[argc - 3];
-   ossimString   waveLengthString          = argv[argc - 2];
-   ossimString   thresholdFromCenterString = argv[argc - 1];
-   ossim_float64 wavelength                = waveLengthString.toFloat64();
-   ossim_float64 thresholdFromCenter       = thresholdFromCenterString.toFloat64();
-   
-
-   cout << "header file: " << hdrFile
-        << "\nwavelength:  " << waveLengthString
-        << "\nthreshold from center: " << thresholdFromCenterString
-        << "\n";
-
-   if ( hdrFile.exists() )
-   {
-      ossimEnviHeader hdr;
-      if ( hdr.open( hdrFile ) )
-      {
-         ossimWavelength wl;
-         if ( wl.initialize( hdr ) )
-         {
-            cout << "\nossimWavelength::getRgbBands returned:\n";
-            std::vector<ossim_uint32> bands;
-            ossim_uint32 band = 0;
-            if ( wl.getRgbBands( bands ) )
-            {
-               std::vector<ossim_uint32>::const_iterator i = bands.begin();
-               while ( i != bands.end() )
-               {
-                  cout << "band[" << band << "]: " << (*i) << "\n";
-                  ++band;
-                  ++i;
-               }
-            }
-            else
-            {
-               cout << "error...\n";
-            }
-
-            cout << "\nossimWavelength::findClosestIterator(...) returned:\n";
-            ossimWavelength::WavelengthMap::const_iterator i =
-               wl.findClosestIterator( wavelength, thresholdFromCenter );
-            if ( i != wl.end() )
-            {
-               cout << "(*i).first: " << (*i).first << " (*i).second: " << (*i).second << "\n";
-            }
-            else
-            {
-               cout << "error...\n";
-            }
-
-            cout << "\nossimWavelength::findClosestIndex(...) returned:\n";
-            ossim_int32 index = wl.findClosestIndex( wavelength, thresholdFromCenter );
-            if ( index > -1 )
-            {
-               cout << "index: " << index << "\n";
-            }
-            else
-            {
-               cout << "error...\n";
-            }
-
-
-            
-         }
-         else
-         {
-            cerr << "ossimWavelength::initialize( ossimEnviHeader ) failed!" << endl;
-         }
-      }
-      else
-      {
-         cout << "Could not open: " << hdrFile << endl;
-      }
-   }
-   else
-   {
-      cerr << "File: " << hdrFile << "\nDoes not exists!" << endl;
-      usage();
-   }
-   cout << endl;
-   
-   return 0;
-   
-} // End of main...
-
diff --git a/src/test/ossim-xml-test.cpp b/src/test/ossim-xml-test.cpp
deleted file mode 100755
index 464880f..0000000
--- a/src/test/ossim-xml-test.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-//----------------------------------------------------------------------------
-//
-// License:  LGPL
-// 
-// See LICENSE.txt file in the top level directory for more details.
-//
-// Author:  David Burken
-//
-// XML functions test.
-// 
-//----------------------------------------------------------------------------
-// $Id: ossim-xml-test.cpp 19751 2011-06-13 15:13:07Z dburken $
-
-#include <iostream>
-using namespace std;
-
-#include <ossim/base/ossimFilename.h>
-#include <ossim/base/ossimXmlDocument.h>
-#include <ossim/init/ossimInit.h>
-
-int main(int argc, char *argv[])
-{
-   ossimInit::instance()->initialize(argc, argv);
-
-   if (argc != 2)
-   {
-      cout << "usage: " << argv[0] << " <xml_file>" << endl;
-      return 0;
-   }
-   
-   ossimFilename f = argv[1];
-
-   cout << "file: " << f << endl;
-
-   ossimXmlDocument* xdoc = new ossimXmlDocument();
-   if ( xdoc->openFile(f) )
-   {
-      cout << "opened..." << endl;
-   }
-   else
-   {
-      cout << "not opened..." << endl;
-   }
-   
-   delete xdoc;
-
-   return 0;
-}
diff --git a/xcode/ossim/English.lproj/InfoPlist.strings b/xcode/ossim/English.lproj/InfoPlist.strings
deleted file mode 100644
index db707f6..0000000
Binary files a/xcode/ossim/English.lproj/InfoPlist.strings and /dev/null differ
diff --git a/xcode/ossim/Resources/icons/ossimPlanet.icns b/xcode/ossim/Resources/icons/ossimPlanet.icns
deleted file mode 100644
index f2b2865..0000000
Binary files a/xcode/ossim/Resources/icons/ossimPlanet.icns and /dev/null differ
diff --git a/xcode/ossim/Resources/icons/ossimPlanet.ico b/xcode/ossim/Resources/icons/ossimPlanet.ico
deleted file mode 100644
index a0c73df..0000000
Binary files a/xcode/ossim/Resources/icons/ossimPlanet.ico and /dev/null differ
diff --git a/xcode/ossim/Resources/imagelinker-Info.plist b/xcode/ossim/Resources/imagelinker-Info.plist
deleted file mode 100644
index cfea3d9..0000000
--- a/xcode/ossim/Resources/imagelinker-Info.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>imagelinker</string>
-	<key>CFBundleIconFile</key>
-	<string>ImageLinkerIcon</string>
-	<key>CFBundleIdentifier</key>
-	<string>com.yourcompany.imagelinker</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.6.2</string>
-</dict>
-</plist>
diff --git a/xcode/ossim/Resources/iview-Info.plist b/xcode/ossim/Resources/iview-Info.plist
deleted file mode 100644
index 273d10c..0000000
--- a/xcode/ossim/Resources/iview-Info.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>${EXECUTABLE_NAME}</string>
-	<key>CFBundleIconFile</key>
-	<string>IviewIcon</string>
-	<key>CFBundleIdentifier</key>
-	<string>com.yourcompany.iview</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.6.2</string>
-</dict>
-</plist>
diff --git a/xcode/ossim/Resources/ossim-Info.plist b/xcode/ossim/Resources/ossim-Info.plist
deleted file mode 100644
index 26708a8..0000000
--- a/xcode/ossim/Resources/ossim-Info.plist
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>BuildNumber</key>
-	<string>1</string>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>ossim</string>
-	<key>CFBundleGetInfoString</key>
-	<string>1.6.5</string>
-	<key>CFBundleIconFile</key>
-	<string></string>
-	<key>CFBundleIdentifier</key>
-	<string>org.ossim.ossim</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleLongVersionString</key>
-	<string>1.6.5</string>
-	<key>CFBundleName</key>
-	<string>ossim</string>
-	<key>CFBundlePackageType</key>
-	<string>FMWK</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.6.5</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.7.0</string>
-	<key>CSResourcesFileMapped</key>
-	<true/>
-</dict>
-</plist>
diff --git a/xcode/ossim/Resources/ossimPlanet-Info.plist b/xcode/ossim/Resources/ossimPlanet-Info.plist
deleted file mode 100644
index cdcff4a..0000000
--- a/xcode/ossim/Resources/ossimPlanet-Info.plist
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>${EXECUTABLE_NAME}</string>
-	<key>CFBundleIdentifier</key>
-	<string>com.yourcompany.osgPlanet</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundlePackageType</key>
-	<string>FMWK</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.0</string>
-</dict>
-</plist>
diff --git a/xcode/ossim/Resources/ossimPlanetQt-info.plist b/xcode/ossim/Resources/ossimPlanetQt-info.plist
deleted file mode 100644
index cdcff4a..0000000
--- a/xcode/ossim/Resources/ossimPlanetQt-info.plist
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>${EXECUTABLE_NAME}</string>
-	<key>CFBundleIdentifier</key>
-	<string>com.yourcompany.osgPlanet</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundlePackageType</key>
-	<string>FMWK</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.0</string>
-</dict>
-</plist>
diff --git a/xcode/ossim/Resources/ossimPlanetQtApp-Info.plist b/xcode/ossim/Resources/ossimPlanetQtApp-Info.plist
deleted file mode 100644
index 6fe9c9f..0000000
--- a/xcode/ossim/Resources/ossimPlanetQtApp-Info.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>${EXECUTABLE_NAME}</string>
-	<key>CFBundleIconFile</key>
-	<string>ossimPlanet</string>
-	<key>CFBundleIdentifier</key>
-	<string>com.radiantblue.ossimPlanet</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleSignature</key>
-	<string>osPt</string>
-	<key>CFBundleVersion</key>
-	<string>1.0</string>
-</dict>
-</plist>
diff --git a/xcode/ossim/Resources/ossim_qt-Info.plist b/xcode/ossim/Resources/ossim_qt-Info.plist
deleted file mode 100644
index 46b1f63..0000000
--- a/xcode/ossim/Resources/ossim_qt-Info.plist
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>BuildNumber</key>
-	<string>1</string>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>ossim_qt</string>
-	<key>CFBundleGetInfoString</key>
-	<string>1.6.2 rc1</string>
-	<key>CFBundleIconFile</key>
-	<string></string>
-	<key>CFBundleIdentifier</key>
-	<string>org.ossim.ossim_qt</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleLongVersionString</key>
-	<string>1.6.2 rc1</string>
-	<key>CFBundleName</key>
-	<string>ossim_qt</string>
-	<key>CFBundlePackageType</key>
-	<string>FMWK</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.6.2</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.6.6</string>
-	<key>CSResourcesFileMapped</key>
-	<true/>
-</dict>
-</plist>
diff --git a/xcode/ossim/Resources/version.plist b/xcode/ossim/Resources/version.plist
deleted file mode 100644
index aaca2bd..0000000
--- a/xcode/ossim/Resources/version.plist
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>BuildVersion</key>
-	<string>317</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
-	<key>CFBundleVersion</key>
-	<string>1.0</string>
-	<key>ProductBuildVersion</key>
-	<string>7K571</string>
-	<key>ProjectName</key>
-	<string>CarbonProjectTemplates</string>
-	<key>SourceVersion</key>
-	<string>140000</string>
-</dict>
-</plist>
diff --git a/xcode/ossim/common_settings.xcconfig b/xcode/ossim/common_settings.xcconfig
deleted file mode 100644
index 1663162..0000000
--- a/xcode/ossim/common_settings.xcconfig
+++ /dev/null
@@ -1,24 +0,0 @@
-// Define a completely custom build setting with a made-up name.
-OSSIM_VERSION_NUMBER = 1.8.4
-OSSIM_VERSION_COMPATIBILITY_NUMBER = 1.8
-MY_EXTRA_INFO_STRING = "$(OSSIM_VERSION_NUMBER)"
-
-// Tell GCC to add a preprocessor macro that contains the value of the made-up custom build setting.  We use the "$(inherited)" notation to substitute in the inherited value at the beginning, so that we don't accidentally shadow any definitions of the same build setting at lower levels of precedence.
-GCC_PREPROCESSOR_DEFINITIONS = $(inherited) 
-EXTRA_INFO_STRING_FOR_MENU=\"Version\ $(MY_EXTRA_INFO_STRING)\"
-
-// Also, to make cross-project references work well, we define a common build folder for this project.  This causes all targets of all projects that are based on this .xcconfig file to have access to each other's built products.  It's also a good idea to set the build folder to a folder on the local hard disk, if the project sources live on a network-mounted file system.
-SYMROOT = $(HOME)/OssimBuilds/
-
-DEV_HOME_PATH=/Users/Shared/Development
-UNIV_DEP=$(DEV_HOME_PATH)/ossim_dependencies
-//QT4DIR=/usr/local/Trolltech/Qt-4.6.0
-QT4DIR=/usr
-QT3DIR=$(UNIV_DEP)/qt3
-UNIV_STATICLIB_DEP=$(UNIV_DEP)/lib
-UNIV_HEADER_DEP=$(UNIV_DEP)/include $(UNIV_DEP)/include/freetype2
-OSSIM_PACKAGE_SUPPORT=$(DEV_HOME_PATH)/ossim_package_support
-OSSIM_DIR=$(DEV_HOME_PATH)/ossim
-GCC_OPTIMIZATION_LEVEL=3
-ARCHS=i386 x86_64
-QT_BUNDLE_DMG_OPTION=-dmg
\ No newline at end of file
diff --git a/xcode/ossim/convert_headers.pl b/xcode/ossim/convert_headers.pl
deleted file mode 100644
index b7cbee7..0000000
--- a/xcode/ossim/convert_headers.pl
+++ /dev/null
@@ -1,163 +0,0 @@
-#!/usr/bin/perl
-$Base_Dir = "../..";
-$header_index;
-#$Headers_Dir = "/Users/hopper/Development/ossim_stuff/ossim/hopper";
- at headers;
-$cpp_index;
-$c_index;
- at cpp;
- at c;
-
-sub process_headers
-{
-	if (opendir(Input_Files, $Base_Dir . $_[0]))
-	{
-		foreach $name (sort readdir(Input_Files))
-		{ 
-			if (substr($name, length($name) - 2, length($name)) eq ".h")
-			{
-				@headers[$header_index] = $name;
-				@headers_Path[$header_index] = $Base_Dir . $_[0] .  "/" . $name;
-				$header_index = $header_index + 1;
-			} elsif ($name ne "." && $name ne ".." && $name[0] ne '.')
-			{
-				process_headers($_[0] .  "/" . $name);
-			}			
-		} 
-		closedir(Input_Files);
-	}
-}
-
-sub process_cpp
-{
-	if (opendir(Input_Files, $Base_Dir . $_[0]))
-	{
-		foreach $name (sort readdir(Input_Files))
-		{ 
-			if (substr($name, length($name) - 4, length($name)) eq ".cpp" or
-				substr($name, length($name) - 2, length($name)) eq ".c")
-			{
-				@cpp[$cpp_index] = $Base_Dir . $_[0] .  "/" . $name;
-				$cpp_index = $cpp_index + 1;
-			} elsif ($name ne "." && $name ne ".." && $name[0] ne '.')
-			{
-				process_cpp($_[0] .  "/" . $name);
-			}			
-		} 
-		closedir(Input_Files);
-	}
-}
-
-sub mod_headers
-{
-	# open each file in $headers_path
-	open(HANDLE, @headers_Path[$_[0]]);
-#	$outpath = $Headers_Dir . "/" . $headers[$_[0]];
-	@raw_data=<HANDLE>;
-	close(HANDLE);
-	open(OUTHANDLE, ">@headers_Path[$_[0]]");
-	
-	foreach $line (@raw_data)
-	{
-		# search for lines starting with "#include"
-		if ($line =~ m/#include/)
-		{
-			chop($line);
-    		# compare .h file to all values in @headaers
-			for ($j=1; $j < $header_index; $j++)
-			{
-				$position = index($line, @headers[$j]);
-
-		 		if ($position ge 0)
-		 		{
-		 			if (substr($line, $position - 1, 1) eq '/' | substr($line, $position - 1, 1) eq '"' |
-		 				substr($line, $position - 1, 1) eq '<')
-		 			{
-						 # if found change to "ossim/@headers[i]"
-						$start = index($line, '"');
-						if ($start eq -1)
-						{
-							$start = index($line, '<');
-							$end = index($line, '>', $start + 1);
-						} else
-						{
-							$end = index($line, '"', $start + 1);
-						}
-						$line = substr($line, 0, $start + 1) . "ossim/" . $headers[$j] . substr($line, $end, length($line));
-						goto EXIT;
-					}
-		 		}
-		 	}
-		 	EXIT:
-			print OUTHANDLE $line . "\n";
-		} else
-		{
-			print OUTHANDLE $line;
-		}
-	}
-	close(OUTHANDLE);
-}
-
-sub mod_body
-{
-print @cpp[$_[0]] . "\n";
-	open(HANDLE, @cpp[$_[0]]);
-	@raw_data=<HANDLE>;
-	close(HANDLE);
-	open(OUTHANDLE, ">@cpp[$_[0]]");
-	
-	foreach $line (@raw_data)
-	{
-		# search for lines starting with "#include"
-		if ($line =~ m/#include/)
-		{
-			chop($line);
-    		# compare .h file to all values in @headaers
-			for ($j=1; $j < $header_index; $j++)
-			{
-				$position = index($line, @headers[$j]);
-
-		 		if ($position ge 0)
-		 		{
-		 			if (substr($line, $position - 1, 1) eq '/' | substr($line, $position - 1, 1) eq '"' |
-		 				substr($line, $position - 1, 1) eq '<')
-		 			{		 		
-						# if found change to "ossim/@headers[i]"
-						
-						$start = index($line, '"');
-						if ($start eq -1)
-						{
-							$start = index($line, '<');
-							$end = index($line, '>', $start + 1);
-						} else
-						{
-							$end = index($line, '"', $start + 1);
-						}
-						$line = substr($line, 0, $start + 1) . "ossim/" . $headers[$j] . substr($line, $end, length($line));
-						goto EXIT;
-					}
-		 		}
-		 	}
-		 	EXIT:
-			print OUTHANDLE $line . "\n";
-		} else
-		{
-			print OUTHANDLE $line;
-		}
-	}
-	close(OUTHANDLE);
-
-}
-
-$header_index = 1;
-process_headers("/src/ossim_core");
-for ($i=1; $i < $header_index; $i++)
-{
-	mod_headers($i);
-}
-$cpp_index = 1;
-process_cpp("/src");
-for ($i=1; $i < $cpp_index; $i++)
-{
-	mod_body($i);
-}
diff --git a/xcode/ossim/ossim.xcodeproj/project.pbxproj b/xcode/ossim/ossim.xcodeproj/project.pbxproj
deleted file mode 100644
index e787a44..0000000
--- a/xcode/ossim/ossim.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,11353 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 42;
-	objects = {
-
-/* Begin PBXAggregateTarget section */
-		186EFA820B1F3C1500F7886A /* build_plugins */ = {
-			isa = PBXAggregateTarget;
-			buildConfigurationList = 186EFA8C0B1F3C5500F7886A /* Build configuration list for PBXAggregateTarget "build_plugins" */;
-			buildPhases = (
-			);
-			dependencies = (
-				4332DE0D113FEBA800F7059B /* PBXTargetDependency */,
-			);
-			name = build_plugins;
-			productName = build_plugins;
-		};
-		1F33AE1108DC88FA003F541C /* build_gui_frameworks */ = {
-			isa = PBXAggregateTarget;
-			buildConfigurationList = 1F33AE1C08DC892C003F541C /* Build configuration list for PBXAggregateTarget "build_gui_frameworks" */;
-			buildPhases = (
-			);
-			dependencies = (
-				43D5037A110A06D700FDB366 /* PBXTargetDependency */,
-				4310B42B110A0B5A00C258B9 /* PBXTargetDependency */,
-			);
-			name = build_gui_frameworks;
-			productName = build_ossim_framework;
-		};
-		1FF5F59D08D3AB960022B290 /* ossim Apps */ = {
-			isa = PBXAggregateTarget;
-			buildConfigurationList = 1FF5F5FA08D3ABAA0022B290 /* Build configuration list for PBXAggregateTarget "ossim Apps" */;
-			buildPhases = (
-			);
-			dependencies = (
-				43362C521042ED14002A87C7 /* PBXTargetDependency */,
-				43362C541042ED14002A87C7 /* PBXTargetDependency */,
-				43362C561042ED14002A87C7 /* PBXTargetDependency */,
-				43362C581042ED14002A87C7 /* PBXTargetDependency */,
-				43362C5A1042ED14002A87C7 /* PBXTargetDependency */,
-				43362C5C1042ED14002A87C7 /* PBXTargetDependency */,
-				43362C5E1042ED14002A87C7 /* PBXTargetDependency */,
-				43362C601042ED14002A87C7 /* PBXTargetDependency */,
-				43362C621042ED14002A87C7 /* PBXTargetDependency */,
-				43362C641042ED14002A87C7 /* PBXTargetDependency */,
-				43362C6C1042ED14002A87C7 /* PBXTargetDependency */,
-				43362C6E1042ED14002A87C7 /* PBXTargetDependency */,
-				43362C701042ED14002A87C7 /* PBXTargetDependency */,
-				43362C721042ED14002A87C7 /* PBXTargetDependency */,
-				43362C781042ED14002A87C7 /* PBXTargetDependency */,
-				43362C7A1042ED14002A87C7 /* PBXTargetDependency */,
-				43362C7C1042ED14002A87C7 /* PBXTargetDependency */,
-				43362C7E1042ED14002A87C7 /* PBXTargetDependency */,
-				43362C801042ED14002A87C7 /* PBXTargetDependency */,
-				43362C821042ED14002A87C7 /* PBXTargetDependency */,
-				43362C841042ED14002A87C7 /* PBXTargetDependency */,
-				43362C861042ED14002A87C7 /* PBXTargetDependency */,
-				43362C8C1042ED14002A87C7 /* PBXTargetDependency */,
-				43362C8E1042ED14002A87C7 /* PBXTargetDependency */,
-				43362C901042ED14002A87C7 /* PBXTargetDependency */,
-				43362C921042ED14002A87C7 /* PBXTargetDependency */,
-				43362C961042ED14002A87C7 /* PBXTargetDependency */,
-				43362C981042ED14002A87C7 /* PBXTargetDependency */,
-				43362C9A1042ED14002A87C7 /* PBXTargetDependency */,
-				43362C9C1042ED14002A87C7 /* PBXTargetDependency */,
-				43362C9E1042ED14002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim Apps";
-			productName = Command_Line;
-		};
-		43081DB20BD3BE67001238BA /* setup_links */ = {
-			isa = PBXAggregateTarget;
-			buildConfigurationList = 43081DBB0BD3BEB8001238BA /* Build configuration list for PBXAggregateTarget "setup_links" */;
-			buildPhases = (
-				43081DB60BD3BE9A001238BA /* symbolic link the frameworks in ossim_dependencies */,
-			);
-			dependencies = (
-			);
-			name = setup_links;
-			productName = setup_links;
-		};
-		431472450CBE539A00EAADAB /* ossimVersion */ = {
-			isa = PBXAggregateTarget;
-			buildConfigurationList = 4314724B0CBE53D000EAADAB /* Build configuration list for PBXAggregateTarget "ossimVersion" */;
-			buildPhases = (
-				431472460CBE53C000EAADAB /* ShellScript */,
-			);
-			dependencies = (
-			);
-			name = ossimVersion;
-			productName = ossimVersion;
-		};
-		436851420BD55066002EBFEA /* ossimplanet_bundle */ = {
-			isa = PBXAggregateTarget;
-			buildConfigurationList = 436851490BD550AA002EBFEA /* Build configuration list for PBXAggregateTarget "ossimplanet_bundle" */;
-			buildPhases = (
-				436851450BD5508B002EBFEA /* ShellScript */,
-			);
-			dependencies = (
-				4391B889111214D900B5895E /* PBXTargetDependency */,
-			);
-			name = ossimplanet_bundle;
-			productName = ossimplanet_bundle;
-		};
-		4370FD6D0A41004900931C4B /* All */ = {
-			isa = PBXAggregateTarget;
-			buildConfigurationList = 4370FD780A4100A400931C4B /* Build configuration list for PBXAggregateTarget "All" */;
-			buildPhases = (
-			);
-			dependencies = (
-				4310B427110A0B1700C258B9 /* PBXTargetDependency */,
-				43DED93B0EA78A050090F402 /* PBXTargetDependency */,
-				4310B429110A0B3100C258B9 /* PBXTargetDependency */,
-				186EFA900B1F3C7300F7886A /* PBXTargetDependency */,
-				4370FD710A41006500931C4B /* PBXTargetDependency */,
-				4370FD6F0A41005D00931C4B /* PBXTargetDependency */,
-				EEE46ACE0E68823800EFF475 /* PBXTargetDependency */,
-				4301322E104EE2F8009BF7EC /* PBXTargetDependency */,
-				4310B425110A0B0500C258B9 /* PBXTargetDependency */,
-			);
-			name = All;
-			productName = All;
-		};
-		43CD6C9E0A5179CC007A4FB1 /* build_package_dir */ = {
-			isa = PBXAggregateTarget;
-			buildConfigurationList = 43CD6C9F0A5179EB007A4FB1 /* Build configuration list for PBXAggregateTarget "build_package_dir" */;
-			buildPhases = (
-				43CD6C9D0A5179CC007A4FB1 /* ShellScript */,
-			);
-			dependencies = (
-			);
-			name = build_package_dir;
-			productName = build_package_dir;
-		};
-		EE05E7AC0E24FF02005A64BC /* build_core_frameworks */ = {
-			isa = PBXAggregateTarget;
-			buildConfigurationList = EE05E7BF0E24FFB5005A64BC /* Build configuration list for PBXAggregateTarget "build_core_frameworks" */;
-			buildPhases = (
-			);
-			dependencies = (
-				EE05E7B60E24FF31005A64BC /* PBXTargetDependency */,
-				EE05E7B80E24FF4A005A64BC /* PBXTargetDependency */,
-				EE05E7BC0E24FF5D005A64BC /* PBXTargetDependency */,
-				439E0B3A0FF4F73000C02785 /* PBXTargetDependency */,
-				43D045350E546D4B0010BCCA /* PBXTargetDependency */,
-			);
-			name = build_core_frameworks;
-			productName = core_frameworks;
-		};
-		EEAE9B600DBE0646000E8D8F /* imagelinker_bundle */ = {
-			isa = PBXAggregateTarget;
-			buildConfigurationList = EEAE9B640DBE0646000E8D8F /* Build configuration list for PBXAggregateTarget "imagelinker_bundle" */;
-			buildPhases = (
-				EEAE9B630DBE0646000E8D8F /* ShellScript */,
-			);
-			dependencies = (
-				EEAE9B610DBE0646000E8D8F /* PBXTargetDependency */,
-			);
-			name = imagelinker_bundle;
-			productName = ossimplanet_bundle;
-		};
-		EEE46AB80E6881AA00EFF475 /* GUI Apps */ = {
-			isa = PBXAggregateTarget;
-			buildConfigurationList = EEE46ACC0E68820500EFF475 /* Build configuration list for PBXAggregateTarget "GUI Apps" */;
-			buildPhases = (
-			);
-			dependencies = (
-				43D50378110A06C800FDB366 /* PBXTargetDependency */,
-				4310B42D110A0B7200C258B9 /* PBXTargetDependency */,
-				4310B42F110A0B7200C258B9 /* PBXTargetDependency */,
-			);
-			name = "GUI Apps";
-			productName = "GUI Apps";
-		};
-/* End PBXAggregateTarget section */
-
-/* Begin PBXBuildFile section */
-		186F41670B16233900443A9B /* ossimOverviewBuilderBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 186F41630B16233900443A9B /* ossimOverviewBuilderBase.cpp */; };
-		186F41680B16233900443A9B /* ossimOverviewBuilderFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 186F41640B16233900443A9B /* ossimOverviewBuilderFactory.cpp */; };
-		186F41690B16233900443A9B /* ossimOverviewBuilderFactoryBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 186F41650B16233900443A9B /* ossimOverviewBuilderFactoryBase.cpp */; };
-		186F416A0B16233900443A9B /* ossimOverviewBuilderFactoryRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 186F41660B16233900443A9B /* ossimOverviewBuilderFactoryRegistry.cpp */; };
-		188F85D80FA3A1C700B619F6 /* ossimInfoBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 188F85D70FA3A1C700B619F6 /* ossimInfoBase.cpp */; };
-		1FB08BA70FE2B4B3006CD0BD /* ossimNitfEngrdaTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1FB08BA60FE2B4B3006CD0BD /* ossimNitfEngrdaTag.cpp */; };
-		432D60750B4AAF65004E059E /* ossimOverviewSequencer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 432D60740B4AAF65004E059E /* ossimOverviewSequencer.cpp */; };
-		432D60780B4AAF89004E059E /* ossimMpiSlaveOverviewSequencer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 432D60760B4AAF89004E059E /* ossimMpiSlaveOverviewSequencer.cpp */; };
-		432D60790B4AAF89004E059E /* ossimMpiMasterOverviewSequencer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 432D60770B4AAF89004E059E /* ossimMpiMasterOverviewSequencer.cpp */; };
-		43330DC11108F1AF0024C7DA /* libfreetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 43330DBD1108F1AF0024C7DA /* libfreetype.a */; };
-		43330DC21108F1AF0024C7DA /* libgeotiff.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 43330DBE1108F1AF0024C7DA /* libgeotiff.a */; };
-		43330DC31108F1AF0024C7DA /* libjpeg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 43330DBF1108F1AF0024C7DA /* libjpeg.a */; };
-		43330DC41108F1AF0024C7DA /* libtiff.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 43330DC01108F1AF0024C7DA /* libtiff.a */; };
-		433627FE1042E368002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		433627FF1042E368002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		433628101042E3B0002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		433628111042E3B0002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		433628251042E3DB002A87C7 /* ossim-adrg-dump.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 433628231042E3DB002A87C7 /* ossim-adrg-dump.cpp */; };
-		433628321042E3F6002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		433628331042E3F6002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		433628451042E42B002A87C7 /* ossim-applanix2ogeom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 433628431042E42B002A87C7 /* ossim-applanix2ogeom.cpp */; };
-		433628501042E461002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		433628511042E461002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		433628621042E48F002A87C7 /* ossim-band-merge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 433628601042E48F002A87C7 /* ossim-band-merge.cpp */; };
-		4336286F1042E4AC002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		433628701042E4AC002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		433628811042E4D1002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		433628821042E4D1002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		4336288F1042E4EF002A87C7 /* ossim-chgkwval.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4336288D1042E4EF002A87C7 /* ossim-chgkwval.cpp */; };
-		4336289A1042E52A002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		4336289B1042E52A002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		433628AA1042E54C002A87C7 /* ossim-cmm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 433628A81042E54C002A87C7 /* ossim-cmm.cpp */; };
-		433628B41042E560002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		433628B51042E560002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		433628C41042E578002A87C7 /* ossim-computeSrtmStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 433628C21042E578002A87C7 /* ossim-computeSrtmStats.cpp */; };
-		433628D11042E59C002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		433628D21042E59C002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		433628E21042E5C6002A87C7 /* ossim-correl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 433628E01042E5C6002A87C7 /* ossim-correl.cpp */; };
-		433628EC1042E5D1002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		433628ED1042E5D1002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		433628FC1042E5F2002A87C7 /* ossim-create-cg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 433628FA1042E5F2002A87C7 /* ossim-create-cg.cpp */; };
-		433629061042E607002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		433629071042E607002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		433629161042E62F002A87C7 /* ossim-create-histo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 433629141042E62F002A87C7 /* ossim-create-histo.cpp */; };
-		4336297C1042E712002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		4336297D1042E712002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		4336298E1042E740002A87C7 /* ossim-dms2deg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4336298C1042E740002A87C7 /* ossim-dms2deg.cpp */; };
-		433629981042E759002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		433629991042E759002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		433629A61042E76E002A87C7 /* ossim-dump-ocg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 433629A41042E76E002A87C7 /* ossim-dump-ocg.cpp */; };
-		433629B01042E77C002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		433629B11042E77C002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		433629C11042E796002A87C7 /* ossim-ecg2ocg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 433629BF1042E796002A87C7 /* ossim-ecg2ocg.cpp */; };
-		433629CB1042E7B1002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		433629CC1042E7B1002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		433629DF1042E807002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		433629E01042E807002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		433629F91042E83C002A87C7 /* ossim-extract-vertices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 433629F71042E83C002A87C7 /* ossim-extract-vertices.cpp */; };
-		43362A281042E88F002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		43362A291042E88F002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		43362A3C1042E8AE002A87C7 /* ossim-height.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43362A3A1042E8AE002A87C7 /* ossim-height.cpp */; };
-		43362A461042E8BD002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		43362A471042E8BD002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		43362A541042E8DE002A87C7 /* ossim-icp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43362A521042E8DE002A87C7 /* ossim-icp.cpp */; };
-		43362A5E1042E8EE002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		43362A5F1042E8EE002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		43362A6E1042E908002A87C7 /* ossim-igen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43362A6C1042E908002A87C7 /* ossim-igen.cpp */; };
-		43362A781042E914002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		43362A791042E914002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		43362A8B1042E939002A87C7 /* ossim-img2md.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43362A891042E939002A87C7 /* ossim-img2md.cpp */; };
-		43362A951042E955002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		43362A961042E955002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		43362AA51042E96E002A87C7 /* ossim-img2rr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43362AA31042E96E002A87C7 /* ossim-img2rr.cpp */; };
-		43362AAF1042E981002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		43362AB01042E981002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		43362AC01042E9AC002A87C7 /* ossim-info.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43362ABE1042E9AC002A87C7 /* ossim-info.cpp */; };
-		43362ACD1042EA43002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		43362ACE1042EA43002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		43362ADF1042EA5F002A87C7 /* ossim-modopt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43362ADD1042EA5F002A87C7 /* ossim-modopt.cpp */; };
-		43362AEA1042EA81002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		43362AEB1042EA81002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		43362AFB1042EA9B002A87C7 /* ossim-mosaic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43362AF91042EA9B002A87C7 /* ossim-mosaic.cpp */; };
-		43362B421042EB45002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		43362B431042EB45002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		43362B551042EB62002A87C7 /* ossim-ogeom2ogeom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43362B531042EB62002A87C7 /* ossim-ogeom2ogeom.cpp */; };
-		43362B5F1042EB70002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		43362B601042EB70002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		43362B711042EB90002A87C7 /* ossim-orthoigen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43362B6F1042EB90002A87C7 /* ossim-orthoigen.cpp */; };
-		43362B7B1042EB9B002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		43362B7C1042EB9B002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		43362B8C1042EBB9002A87C7 /* ossim-pixelflip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43362B8A1042EBB9002A87C7 /* ossim-pixelflip.cpp */; };
-		43362B961042EBCE002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		43362B971042EBCE002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		43362BA81042EBE6002A87C7 /* ossim-prune.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43362BA61042EBE6002A87C7 /* ossim-prune.cpp */; };
-		43362BCD1042EC26002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		43362BCE1042EC26002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		43362BDF1042EC3F002A87C7 /* ossim-rejout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43362BDD1042EC3F002A87C7 /* ossim-rejout.cpp */; };
-		43362BE91042EC50002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		43362BEA1042EC50002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		43362BF91042EC69002A87C7 /* ossim-senint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43362BF71042EC69002A87C7 /* ossim-senint.cpp */; };
-		43362C031042EC80002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		43362C041042EC80002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		43362C131042EC9E002A87C7 /* ossim-space-imaging.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43362C111042EC9E002A87C7 /* ossim-space-imaging.cpp */; };
-		43362C1D1042ECAF002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		43362C1E1042ECAF002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		43362C2D1042ECC6002A87C7 /* ossim-swapbytes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43362C2B1042ECC6002A87C7 /* ossim-swapbytes.cpp */; };
-		43362C371042ECD6002A87C7 /* ossim.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */; };
-		43362C381042ECD6002A87C7 /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		43362C4E1042ECFB002A87C7 /* ossim-tfw2ogeom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43362C4B1042ECFB002A87C7 /* ossim-tfw2ogeom.cpp */; };
-		43377C6010CD61E200ECC5AD /* ossimGcsCodeProjectionFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43377C5F10CD61E200ECC5AD /* ossimGcsCodeProjectionFactory.cpp */; };
-		433786370CBF128000AE9DCF /* ossimQuaternion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 433786360CBF128000AE9DCF /* ossimQuaternion.cpp */; };
-		434230950C14F94F00F77EBA /* ossimPositionQualityEvaluator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 434230940C14F94F00F77EBA /* ossimPositionQualityEvaluator.cpp */; };
-		43463AF00FCEE7260027D845 /* ossimDuration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43463AEF0FCEE7260027D845 /* ossimDuration.cpp */; };
-		4347EE901084EEC4006E88F6 /* ossimNitfWriterBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4347EE8F1084EEC4006E88F6 /* ossimNitfWriterBase.cpp */; };
-		434D0A5A10174A3F00761D13 /* ossimJ2kInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 434D0A5810174A3F00761D13 /* ossimJ2kInfo.cpp */; };
-		434D0A5B10174A3F00761D13 /* ossimJ2kCodRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 434D0A5910174A3F00761D13 /* ossimJ2kCodRecord.cpp */; };
-		434E648D10D2BFEE005EBB18 /* ossimVirtualOverviewSequencer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 434E648C10D2BFEE005EBB18 /* ossimVirtualOverviewSequencer.cpp */; };
-		434E65DD10D685A2005EBB18 /* ossimTimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 434E65DC10D685A2005EBB18 /* ossimTimer.cpp */; };
-		434E669C10D6CE0D005EBB18 /* ossimDtedElevationDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 434E669B10D6CE0D005EBB18 /* ossimDtedElevationDatabase.cpp */; };
-		434E6B7B10D80CE6005EBB18 /* ossimElevationDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 434E6B7A10D80CE6005EBB18 /* ossimElevationDatabase.cpp */; };
-		434E6BA210D8125C005EBB18 /* ossimElevationDatabaseRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 434E6BA110D8125C005EBB18 /* ossimElevationDatabaseRegistry.cpp */; };
-		434E6BB110D81529005EBB18 /* ossimElevationDatabaseFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 434E6BB010D81529005EBB18 /* ossimElevationDatabaseFactory.cpp */; };
-		434E707210DA60D8005EBB18 /* ossimSrtmElevationDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 434E707110DA60D8005EBB18 /* ossimSrtmElevationDatabase.cpp */; };
-		434E718910DA7D32005EBB18 /* ossimGeneralRasterElevationDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 434E718810DA7D32005EBB18 /* ossimGeneralRasterElevationDatabase.cpp */; };
-		4350C7C00F851DF200CBF038 /* ossimNitfCsdidaTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4350C7BF0F851DF200CBF038 /* ossimNitfCsdidaTag.cpp */; };
-		4350C9C60F8648EA00CBF038 /* ossimNitfCscrnaTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4350C9C50F8648EA00CBF038 /* ossimNitfCscrnaTag.cpp */; };
-		4350CA290F868C5000CBF038 /* ossimNitfCsexraTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4350CA280F868C5000CBF038 /* ossimNitfCsexraTag.cpp */; };
-		436061770A821BFB001CD337 /* ossimNotify.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 436061760A821BFB001CD337 /* ossimNotify.cpp */; };
-		4369F75111204839002FA4B7 /* ossimSingleImageChain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4369F75011204839002FA4B7 /* ossimSingleImageChain.cpp */; };
-		436A7E7B10FBAAD500985348 /* ossimAuxFileHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 436A7E7A10FBAAD500985348 /* ossimAuxFileHandler.cpp */; };
-		436E916C0AC2F3D90051AEC2 /* ossimMemoryImageSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 436E916B0AC2F3D90051AEC2 /* ossimMemoryImageSource.cpp */; };
-		4371846A0BCF03220002D30E /* Openthreads.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437184380BCF03210002D30E /* Openthreads.framework */; };
-		437224AC0AAFAE6A00F7BCC5 /* ossimSarModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 437224AB0AAFAE6A00F7BCC5 /* ossimSarModel.cpp */; };
-		438DED7510B1811C00502C71 /* ossimSmacCallibrationSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438DED7410B1811C00502C71 /* ossimSmacCallibrationSystem.cpp */; };
-		438DEDDD10B1D89B00502C71 /* ossimBuckeyeSensor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438DEDDC10B1D89B00502C71 /* ossimBuckeyeSensor.cpp */; };
-		438DF2DB10B620A800502C71 /* ossimNullPixelFlip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 438DF2DA10B620A800502C71 /* ossimNullPixelFlip.cpp */; };
-		4392B1850AB5906D002759B3 /* ossimColumnVector3d.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4392B1840AB5906D002759B3 /* ossimColumnVector3d.cpp */; };
-		4392B1870AB5907B002759B3 /* ossimEcefVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4392B1860AB5907B002759B3 /* ossimEcefVector.cpp */; };
-		43A114A50D52596300DE3CF3 /* ossimCsvFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43A114A40D52596300DE3CF3 /* ossimCsvFile.cpp */; };
-		43A93B2E0A5024FF00903A9C /* ossimEnvironmentUtility.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43A93B2D0A5024FF00903A9C /* ossimEnvironmentUtility.cpp */; };
-		43AC3A53108DE1EC00A8DB04 /* ossim2dTo2dShiftTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43AC3A4E108DE1EC00A8DB04 /* ossim2dTo2dShiftTransform.cpp */; };
-		43AC3A54108DE1EC00A8DB04 /* ossim2dTo2dIdentityTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43AC3A4F108DE1EC00A8DB04 /* ossim2dTo2dIdentityTransform.cpp */; };
-		43AC3A55108DE1EC00A8DB04 /* ossim2dTo2dTransformFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43AC3A50108DE1EC00A8DB04 /* ossim2dTo2dTransformFactory.cpp */; };
-		43AC3A56108DE1EC00A8DB04 /* ossim2dTo2dTransformRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43AC3A51108DE1EC00A8DB04 /* ossim2dTo2dTransformRegistry.cpp */; };
-		43AC3A57108DE1EC00A8DB04 /* ossim2dBilinearTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43AC3A52108DE1EC00A8DB04 /* ossim2dBilinearTransform.cpp */; };
-		43AC3A67108DE3A300A8DB04 /* ossimImageGeometry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43AC3A64108DE3A300A8DB04 /* ossimImageGeometry.cpp */; };
-		43AC3A68108DE3A300A8DB04 /* ossimImageGeometryRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43AC3A65108DE3A300A8DB04 /* ossimImageGeometryRegistry.cpp */; };
-		43AC3A69108DE3A300A8DB04 /* ossimImageGeometryFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43AC3A66108DE3A300A8DB04 /* ossimImageGeometryFactory.cpp */; };
-		43CF6BAC104EA81E00714C86 /* ossim-foo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43CF6BAB104EA81E00714C86 /* ossim-foo.cpp */; };
-		43D3C5C31151A3DB000A60FB /* ossimQuickbirdMetaData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D3C5C21151A3DB000A60FB /* ossimQuickbirdMetaData.cpp */; };
-		43D622640F7BC48200D93B8F /* ossimDtedInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D6225E0F7BC48200D93B8F /* ossimDtedInfo.cpp */; };
-		43D622650F7BC48200D93B8F /* ossimCcfInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D6225F0F7BC48200D93B8F /* ossimCcfInfo.cpp */; };
-		43D622660F7BC48200D93B8F /* ossimNitfInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D622600F7BC48200D93B8F /* ossimNitfInfo.cpp */; };
-		43D622670F7BC48200D93B8F /* ossimTiffInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D622610F7BC48200D93B8F /* ossimTiffInfo.cpp */; };
-		43D622680F7BC48200D93B8F /* ossimInfoFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D622620F7BC48200D93B8F /* ossimInfoFactory.cpp */; };
-		43D622690F7BC48200D93B8F /* ossimInfoFactoryRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D622630F7BC48200D93B8F /* ossimInfoFactoryRegistry.cpp */; };
-		43D98B520A403AAA00E28AA2 /* ossim2dLinearRegression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D982FF0A403AA500E28AA2 /* ossim2dLinearRegression.cpp */; };
-		43D98B540A403AAA00E28AA2 /* ossim2dTo2dTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983010A403AA500E28AA2 /* ossim2dTo2dTransform.cpp */; };
-		43D98B560A403AAA00E28AA2 /* ossimActiveEdgeTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983030A403AA500E28AA2 /* ossimActiveEdgeTable.cpp */; };
-		43D98B580A403AAA00E28AA2 /* ossimAdjustableParameterInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983050A403AA500E28AA2 /* ossimAdjustableParameterInfo.cpp */; };
-		43D98B5A0A403AAA00E28AA2 /* ossimAdjustableParameterInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983070A403AA500E28AA2 /* ossimAdjustableParameterInterface.cpp */; };
-		43D98B5C0A403AAA00E28AA2 /* ossimAdjustmentInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983090A403AA500E28AA2 /* ossimAdjustmentInfo.cpp */; };
-		43D98B600A403AAA00E28AA2 /* ossimAffineTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9830D0A403AA500E28AA2 /* ossimAffineTransform.cpp */; };
-		43D98B620A403AAA00E28AA2 /* ossimApplicationUsage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9830F0A403AA500E28AA2 /* ossimApplicationUsage.cpp */; };
-		43D98B640A403AAA00E28AA2 /* ossimArgumentParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983110A403AA500E28AA2 /* ossimArgumentParser.cpp */; };
-		43D98B660A403AAA00E28AA2 /* ossimBaseObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983130A403AA500E28AA2 /* ossimBaseObjectFactory.cpp */; };
-		43D98B680A403AAA00E28AA2 /* ossimBilSplitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983150A403AA500E28AA2 /* ossimBilSplitter.cpp */; };
-		43D98B6A0A403AAA00E28AA2 /* ossimBooleanProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983170A403AA500E28AA2 /* ossimBooleanProperty.cpp */; };
-		43D98B6C0A403AAA00E28AA2 /* ossimCmyVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983190A403AA500E28AA2 /* ossimCmyVector.cpp */; };
-		43D98B6E0A403AAA00E28AA2 /* ossimColorProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9831B0A403AA500E28AA2 /* ossimColorProperty.cpp */; };
-		43D98B700A403AAA00E28AA2 /* ossimCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9831D0A403AA500E28AA2 /* ossimCommon.cpp */; };
-		43D98B720A403AAA00E28AA2 /* ossimConnectableContainer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9831F0A403AA500E28AA2 /* ossimConnectableContainer.cpp */; };
-		43D98B740A403AAA00E28AA2 /* ossimConnectableContainerInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983210A403AA500E28AA2 /* ossimConnectableContainerInterface.cpp */; };
-		43D98B760A403AAA00E28AA2 /* ossimConnectableDisplayListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983230A403AA500E28AA2 /* ossimConnectableDisplayListener.cpp */; };
-		43D98B780A403AAA00E28AA2 /* ossimConnectableObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983250A403AA500E28AA2 /* ossimConnectableObject.cpp */; };
-		43D98B7A0A403AAA00E28AA2 /* ossimConnectableObjectListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983270A403AA500E28AA2 /* ossimConnectableObjectListener.cpp */; };
-		43D98B7C0A403AAA00E28AA2 /* ossimConnectionEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983290A403AA500E28AA2 /* ossimConnectionEvent.cpp */; };
-		43D98B7E0A403AAA00E28AA2 /* ossimContainerEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9832B0A403AA500E28AA2 /* ossimContainerEvent.cpp */; };
-		43D98B800A403AAA00E28AA2 /* ossimContainerProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9832D0A403AA500E28AA2 /* ossimContainerProperty.cpp */; };
-		43D98B820A403AAA00E28AA2 /* ossimCplUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9832F0A403AA500E28AA2 /* ossimCplUtil.cpp */; };
-		43D98B840A403AAA00E28AA2 /* ossimCustomEditorWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983310A403AA500E28AA2 /* ossimCustomEditorWindow.cpp */; };
-		43D98B860A403AAA00E28AA2 /* ossimCustomEditorWindowFactoryBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983330A403AA500E28AA2 /* ossimCustomEditorWindowFactoryBase.cpp */; };
-		43D98B880A403AAA00E28AA2 /* ossimCustomEditorWindowRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983350A403AA500E28AA2 /* ossimCustomEditorWindowRegistry.cpp */; };
-		43D98B8A0A403AAA00E28AA2 /* ossimDataObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983370A403AA500E28AA2 /* ossimDataObject.cpp */; };
-		43D98B8C0A403AAA00E28AA2 /* ossimDate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983390A403AA500E28AA2 /* ossimDate.cpp */; };
-		43D98B8E0A403AAA00E28AA2 /* ossimDateProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9833B0A403AA500E28AA2 /* ossimDateProperty.cpp */; };
-		43D98B900A403AAA00E28AA2 /* ossimDatum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9833D0A403AA500E28AA2 /* ossimDatum.cpp */; };
-		43D98B920A403AAA00E28AA2 /* ossimDatumFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9833F0A403AA500E28AA2 /* ossimDatumFactory.cpp */; };
-		43D98B950A403AAA00E28AA2 /* ossimDblGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983420A403AA500E28AA2 /* ossimDblGrid.cpp */; };
-		43D98B970A403AAA00E28AA2 /* ossimDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983440A403AA500E28AA2 /* ossimDirectory.cpp */; };
-		43D98B990A403AAA00E28AA2 /* ossimDirectoryData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983460A403AA500E28AA2 /* ossimDirectoryData.cpp */; };
-		43D98B9B0A403AAA00E28AA2 /* ossimDirectoryTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983480A403AA500E28AA2 /* ossimDirectoryTree.cpp */; };
-		43D98B9D0A403AAA00E28AA2 /* ossimDisplayEventListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9834A0A403AA500E28AA2 /* ossimDisplayEventListener.cpp */; };
-		43D98B9F0A403AAA00E28AA2 /* ossimDisplayInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9834C0A403AA500E28AA2 /* ossimDisplayInterface.cpp */; };
-		43D98BA10A403AAA00E28AA2 /* ossimDisplayListEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9834E0A403AA500E28AA2 /* ossimDisplayListEvent.cpp */; };
-		43D98BA30A403AAA00E28AA2 /* ossimDisplayRefreshEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983500A403AA500E28AA2 /* ossimDisplayRefreshEvent.cpp */; };
-		43D98BA50A403AAA00E28AA2 /* ossimDms.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983520A403AA500E28AA2 /* ossimDms.cpp */; };
-		43D98BA70A403AAA00E28AA2 /* ossimDoubleGridProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983540A403AA500E28AA2 /* ossimDoubleGridProperty.cpp */; };
-		43D98BA90A403AAA00E28AA2 /* ossimDpt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983560A403AA500E28AA2 /* ossimDpt.cpp */; };
-		43D98BAB0A403AAA00E28AA2 /* ossimDpt3d.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983580A403AA500E28AA2 /* ossimDpt3d.cpp */; };
-		43D98BAD0A403AAA00E28AA2 /* ossimDrect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9835A0A403AA500E28AA2 /* ossimDrect.cpp */; };
-		43D98BAF0A403AAA00E28AA2 /* ossimEbcdicToAscii.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9835C0A403AA500E28AA2 /* ossimEbcdicToAscii.cpp */; };
-		43D98BB10A403AAA00E28AA2 /* ossimEcefPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9835E0A403AA500E28AA2 /* ossimEcefPoint.cpp */; };
-		43D98BB30A403AAA00E28AA2 /* ossimEcefRay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983600A403AA500E28AA2 /* ossimEcefRay.cpp */; };
-		43D98BB50A403AAA00E28AA2 /* ossimElevationManagerEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983620A403AA500E28AA2 /* ossimElevationManagerEvent.cpp */; };
-		43D98BB70A403AAA00E28AA2 /* ossimElevationManagerEventListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983640A403AA500E28AA2 /* ossimElevationManagerEventListener.cpp */; };
-		43D98BB90A403AAA00E28AA2 /* ossimEllipsoid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983660A403AA500E28AA2 /* ossimEllipsoid.cpp */; };
-		43D98BBB0A403AAA00E28AA2 /* ossimEllipsoidFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983680A403AA500E28AA2 /* ossimEllipsoidFactory.cpp */; };
-		43D98BBD0A403AAA00E28AA2 /* ossimEndian.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9836A0A403AA500E28AA2 /* ossimEndian.cpp */; };
-		43D98BC00A403AAA00E28AA2 /* ossimEquTokenizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9836D0A403AA500E28AA2 /* ossimEquTokenizer.cpp */; };
-		43D98BC40A403AAA00E28AA2 /* ossimErrorCodes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983710A403AA500E28AA2 /* ossimErrorCodes.cpp */; };
-		43D98BC60A403AAA00E28AA2 /* ossimErrorStatusInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983730A403AA500E28AA2 /* ossimErrorStatusInterface.cpp */; };
-		43D98BC80A403AAA00E28AA2 /* ossimEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983750A403AA500E28AA2 /* ossimEvent.cpp */; };
-		43D98BCA0A403AAA00E28AA2 /* ossimFactoryBaseTemplate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983770A403AA500E28AA2 /* ossimFactoryBaseTemplate.cpp */; };
-		43D98BCC0A403AAA00E28AA2 /* ossimFilename.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983790A403AA500E28AA2 /* ossimFilename.cpp */; };
-		43D98BCE0A403AAA00E28AA2 /* ossimFilenameProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9837B0A403AA500E28AA2 /* ossimFilenameProperty.cpp */; };
-		43D98BD00A403AAA00E28AA2 /* ossimFontInformation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9837D0A403AA500E28AA2 /* ossimFontInformation.cpp */; };
-		43D98BD20A403AAA00E28AA2 /* ossimFontProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9837F0A403AA500E28AA2 /* ossimFontProperty.cpp */; };
-		43D98BD40A403AAA00E28AA2 /* ossimFpt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983810A403AA500E28AA2 /* ossimFpt.cpp */; };
-		43D98BD60A403AAA00E28AA2 /* ossimFpt3d.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983830A403AA500E28AA2 /* ossimFpt3d.cpp */; };
-		43D98BD80A403AAA00E28AA2 /* ossimGeoPolygon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983850A403AA500E28AA2 /* ossimGeoPolygon.cpp */; };
-		43D98BDA0A403AAA00E28AA2 /* ossimGeoTiffCoordTransformsLut.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983870A403AA500E28AA2 /* ossimGeoTiffCoordTransformsLut.cpp */; };
-		43D98BDC0A403AAA00E28AA2 /* ossimGeoTiffDatumLut.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983890A403AA500E28AA2 /* ossimGeoTiffDatumLut.cpp */; };
-		43D98BDE0A403AAA00E28AA2 /* ossimGeocent.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D9838B0A403AA500E28AA2 /* ossimGeocent.c */; };
-		43D98BE00A403AAA00E28AA2 /* ossimGeoid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9838D0A403AA500E28AA2 /* ossimGeoid.cpp */; };
-		43D98BE20A403AAA00E28AA2 /* ossimGeoidEgm96.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9838F0A403AA500E28AA2 /* ossimGeoidEgm96.cpp */; };
-		43D98BE40A403AAA00E28AA2 /* ossimGeoidManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983910A403AA500E28AA2 /* ossimGeoidManager.cpp */; };
-		43D98BE60A403AAA00E28AA2 /* ossimGeoidNgs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983930A403AA500E28AA2 /* ossimGeoidNgs.cpp */; };
-		43D98BE80A403AAA00E28AA2 /* ossimGeoidNgsHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983950A403AA500E28AA2 /* ossimGeoidNgsHeader.cpp */; };
-		43D98BEA0A403AAA00E28AA2 /* ossimGeoref.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983970A403AA500E28AA2 /* ossimGeoref.cpp */; };
-		43D98BEC0A403AAA00E28AA2 /* ossimGpt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983990A403AA500E28AA2 /* ossimGpt.cpp */; };
-		43D98BEE0A403AAA00E28AA2 /* ossimGrect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9839B0A403AA500E28AA2 /* ossimGrect.cpp */; };
-		43D98BF00A403AAA00E28AA2 /* ossimGzStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9839D0A403AA500E28AA2 /* ossimGzStream.cpp */; };
-		43D98BF20A403AAA00E28AA2 /* ossimHexString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9839F0A403AA500E28AA2 /* ossimHexString.cpp */; };
-		43D98BF40A403AAA00E28AA2 /* ossimHistogram.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983A10A403AA500E28AA2 /* ossimHistogram.cpp */; };
-		43D98BF60A403AAA00E28AA2 /* ossimHistogramSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983A30A403AA500E28AA2 /* ossimHistogramSource.cpp */; };
-		43D98BF80A403AAA00E28AA2 /* ossimHsiVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983A50A403AA500E28AA2 /* ossimHsiVector.cpp */; };
-		43D98BFA0A403AAA00E28AA2 /* ossimHsvVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983A70A403AA500E28AA2 /* ossimHsvVector.cpp */; };
-		43D98BFC0A403AAA00E28AA2 /* ossimId.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983A90A403AA500E28AA2 /* ossimId.cpp */; };
-		43D98BFE0A403AAA00E28AA2 /* ossimIdManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983AB0A403AA500E28AA2 /* ossimIdManager.cpp */; };
-		43D98C000A403AAA00E28AA2 /* ossimImageAoiListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983AD0A403AA500E28AA2 /* ossimImageAoiListener.cpp */; };
-		43D98C020A403AAA00E28AA2 /* ossimImageGeometryEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983AF0A403AA500E28AA2 /* ossimImageGeometryEvent.cpp */; };
-		43D98C040A403AAA00E28AA2 /* ossimImageGeometryEventListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983B10A403AA500E28AA2 /* ossimImageGeometryEventListener.cpp */; };
-		43D98C060A403AAA00E28AA2 /* ossimImageTypeLut.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983B30A403AA500E28AA2 /* ossimImageTypeLut.cpp */; };
-		43D98C080A403AAA00E28AA2 /* ossimInterleaveTypeLut.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983B50A403AA500E28AA2 /* ossimInterleaveTypeLut.cpp */; };
-		43D98C0A0A403AAA00E28AA2 /* ossimIoStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983B70A403AA500E28AA2 /* ossimIoStream.cpp */; };
-		43D98C0C0A403AAB00E28AA2 /* ossimIpt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983B90A403AA500E28AA2 /* ossimIpt.cpp */; };
-		43D98C0E0A403AAB00E28AA2 /* ossimIrect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983BB0A403AA500E28AA2 /* ossimIrect.cpp */; };
-		43D98C100A403AAB00E28AA2 /* ossimJpegYCbCrVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983BD0A403AA500E28AA2 /* ossimJpegYCbCrVector.cpp */; };
-		43D98C120A403AAB00E28AA2 /* ossimKeyword.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983BF0A403AA500E28AA2 /* ossimKeyword.cpp */; };
-		43D98C140A403AAB00E28AA2 /* ossimKeywordNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983C10A403AA500E28AA2 /* ossimKeywordNames.cpp */; };
-		43D98C160A403AAB00E28AA2 /* ossimKeywordlist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983C30A403AA500E28AA2 /* ossimKeywordlist.cpp */; };
-		43D98C180A403AAB00E28AA2 /* ossimLeastSquaresBilin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983C50A403AA500E28AA2 /* ossimLeastSquaresBilin.cpp */; };
-		43D98C1A0A403AAB00E28AA2 /* ossimLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983C70A403AA500E28AA2 /* ossimLine.cpp */; };
-		43D98C1C0A403AAB00E28AA2 /* ossimListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983C90A403AA500E28AA2 /* ossimListener.cpp */; };
-		43D98C1E0A403AAB00E28AA2 /* ossimListenerManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983CB0A403AA500E28AA2 /* ossimListenerManager.cpp */; };
-		43D98C200A403AAB00E28AA2 /* ossimLookUpTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983CD0A403AA500E28AA2 /* ossimLookUpTable.cpp */; };
-		43D98C220A403AAB00E28AA2 /* ossimLsrPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983CF0A403AA500E28AA2 /* ossimLsrPoint.cpp */; };
-		43D98C240A403AAB00E28AA2 /* ossimLsrRay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983D10A403AA500E28AA2 /* ossimLsrRay.cpp */; };
-		43D98C260A403AAB00E28AA2 /* ossimLsrSpace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983D30A403AA500E28AA2 /* ossimLsrSpace.cpp */; };
-		43D98C280A403AAB00E28AA2 /* ossimLsrVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983D50A403AA500E28AA2 /* ossimLsrVector.cpp */; };
-		43D98C2A0A403AAB00E28AA2 /* ossimMatrix3x3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983D70A403AA500E28AA2 /* ossimMatrix3x3.cpp */; };
-		43D98C2C0A403AAB00E28AA2 /* ossimMatrix4x4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983D90A403AA500E28AA2 /* ossimMatrix4x4.cpp */; };
-		43D98C2E0A403AAB00E28AA2 /* ossimMatrixProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983DB0A403AA500E28AA2 /* ossimMatrixProperty.cpp */; };
-		43D98C300A403AAB00E28AA2 /* ossimMouseEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983DD0A403AA500E28AA2 /* ossimMouseEvent.cpp */; };
-		43D98C320A403AAB00E28AA2 /* ossimMouseListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983DF0A403AA500E28AA2 /* ossimMouseListener.cpp */; };
-		43D98C340A403AAB00E28AA2 /* ossimMultiBandHistogram.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983E10A403AA500E28AA2 /* ossimMultiBandHistogram.cpp */; };
-		43D98C360A403AAB00E28AA2 /* ossimMultiResLevelHistogram.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983E30A403AA500E28AA2 /* ossimMultiResLevelHistogram.cpp */; };
-		43D98C3A0A403AAB00E28AA2 /* ossimNBandLutDataObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983E70A403AA500E28AA2 /* ossimNBandLutDataObject.cpp */; };
-		43D98C3C0A403AAB00E28AA2 /* ossimNadconGridDatum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983E90A403AA500E28AA2 /* ossimNadconGridDatum.cpp */; };
-		43D98C3E0A403AAB00E28AA2 /* ossimNadconGridFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983EB0A403AA500E28AA2 /* ossimNadconGridFile.cpp */; };
-		43D98C400A403AAB00E28AA2 /* ossimNadconGridHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983ED0A403AA500E28AA2 /* ossimNadconGridHeader.cpp */; };
-		43D98C420A403AAB00E28AA2 /* ossimNadconNarDatum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983EF0A403AA500E28AA2 /* ossimNadconNarDatum.cpp */; };
-		43D98C440A403AAB00E28AA2 /* ossimNadconNasDatum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983F10A403AA500E28AA2 /* ossimNadconNasDatum.cpp */; };
-		43D98C460A403AAB00E28AA2 /* ossimNormRgbVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983F30A403AA500E28AA2 /* ossimNormRgbVector.cpp */; };
-		43D98C4A0A403AAB00E28AA2 /* ossimNumericProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983F70A403AA500E28AA2 /* ossimNumericProperty.cpp */; };
-		43D98C4C0A403AAB00E28AA2 /* ossimObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983F90A403AA500E28AA2 /* ossimObject.cpp */; };
-		43D98C4E0A403AAB00E28AA2 /* ossimObjectDestructingEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983FB0A403AA500E28AA2 /* ossimObjectDestructingEvent.cpp */; };
-		43D98C500A403AAB00E28AA2 /* ossimObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983FD0A403AA500E28AA2 /* ossimObjectFactory.cpp */; };
-		43D98C520A403AAB00E28AA2 /* ossimObjectFactoryRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D983FF0A403AA500E28AA2 /* ossimObjectFactoryRegistry.cpp */; };
-		43D98C540A403AAB00E28AA2 /* ossimOutputSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984010A403AA600E28AA2 /* ossimOutputSource.cpp */; };
-		43D98C560A403AAB00E28AA2 /* ossimPackedBits.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984030A403AA600E28AA2 /* ossimPackedBits.cpp */; };
-		43D98C580A403AAB00E28AA2 /* ossimPolyArea2d.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984050A403AA600E28AA2 /* ossimPolyArea2d.cpp */; };
-		43D98C5A0A403AAB00E28AA2 /* ossimPolyLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984070A403AA600E28AA2 /* ossimPolyLine.cpp */; };
-		43D98C5C0A403AAB00E28AA2 /* ossimPolygon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984090A403AA600E28AA2 /* ossimPolygon.cpp */; };
-		43D98C5E0A403AAB00E28AA2 /* ossimPreferences.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9840B0A403AA600E28AA2 /* ossimPreferences.cpp */; };
-		43D98C600A403AAB00E28AA2 /* ossimProcessInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9840D0A403AA600E28AA2 /* ossimProcessInterface.cpp */; };
-		43D98C620A403AAB00E28AA2 /* ossimProcessListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9840F0A403AA600E28AA2 /* ossimProcessListener.cpp */; };
-		43D98C640A403AAB00E28AA2 /* ossimProcessProgressEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984110A403AA600E28AA2 /* ossimProcessProgressEvent.cpp */; };
-		43D98C660A403AAB00E28AA2 /* ossimProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984130A403AA600E28AA2 /* ossimProperty.cpp */; };
-		43D98C680A403AAB00E28AA2 /* ossimPropertyInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984150A403AA600E28AA2 /* ossimPropertyInterface.cpp */; };
-		43D98C6A0A403AAB00E28AA2 /* ossimPropertyInterfaceFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984170A403AA600E28AA2 /* ossimPropertyInterfaceFactory.cpp */; };
-		43D98C6C0A403AAB00E28AA2 /* ossimPropertyInterfaceRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984190A403AA600E28AA2 /* ossimPropertyInterfaceRegistry.cpp */; };
-		43D98C6E0A403AAB00E28AA2 /* ossimQuadTreeWarp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9841B0A403AA600E28AA2 /* ossimQuadTreeWarp.cpp */; };
-		43D98C700A403AAB00E28AA2 /* ossimQuadrilateralMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9841D0A403AA600E28AA2 /* ossimQuadrilateralMap.cpp */; };
-		43D98C720A403AAB00E28AA2 /* ossimROIEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9841F0A403AA600E28AA2 /* ossimROIEvent.cpp */; };
-		43D98C740A403AAB00E28AA2 /* ossimROIEventListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984210A403AA600E28AA2 /* ossimROIEventListener.cpp */; };
-		43D98C760A403AAB00E28AA2 /* ossimRationalNumber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984230A403AA600E28AA2 /* ossimRationalNumber.cpp */; };
-		43D98C780A403AAB00E28AA2 /* ossimRectanglePartitioner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984250A403AA600E28AA2 /* ossimRectanglePartitioner.cpp */; };
-		43D98C7A0A403AAB00E28AA2 /* ossimRectilinearDataObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984270A403AA600E28AA2 /* ossimRectilinearDataObject.cpp */; };
-		43D98C7C0A403AAB00E28AA2 /* ossimReferenced.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984290A403AA600E28AA2 /* ossimReferenced.cpp */; };
-		43D98C7E0A403AAB00E28AA2 /* ossimRefreshEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9842B0A403AA600E28AA2 /* ossimRefreshEvent.cpp */; };
-		43D98C800A403AAB00E28AA2 /* ossimRegExp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9842D0A403AA600E28AA2 /* ossimRegExp.cpp */; };
-		43D98C820A403AAB00E28AA2 /* ossimRgbLutDataObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9842F0A403AA600E28AA2 /* ossimRgbLutDataObject.cpp */; };
-		43D98C840A403AAB00E28AA2 /* ossimRgbVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984310A403AA600E28AA2 /* ossimRgbVector.cpp */; };
-		43D98C860A403AAB00E28AA2 /* ossimRtti.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984330A403AA600E28AA2 /* ossimRtti.cpp */; };
-		43D98C880A403AAB00E28AA2 /* ossimScalarTypeLut.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984350A403AA600E28AA2 /* ossimScalarTypeLut.cpp */; };
-		43D98C8A0A403AAB00E28AA2 /* ossimSevenParamDatum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984370A403AA600E28AA2 /* ossimSevenParamDatum.cpp */; };
-		43D98C8C0A403AAB00E28AA2 /* ossimSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984390A403AA600E28AA2 /* ossimSource.cpp */; };
-		43D98C8E0A403AAB00E28AA2 /* ossimStateChangedEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9843B0A403AA600E28AA2 /* ossimStateChangedEvent.cpp */; };
-		43D98C900A403AAB00E28AA2 /* ossimStdOutProgress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9843D0A403AA600E28AA2 /* ossimStdOutProgress.cpp */; };
-		43D98C920A403AAB00E28AA2 /* ossimStreamBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9843F0A403AA600E28AA2 /* ossimStreamBase.cpp */; };
-		43D98C940A403AAB00E28AA2 /* ossimStreamFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984410A403AA600E28AA2 /* ossimStreamFactory.cpp */; };
-		43D98C960A403AAB00E28AA2 /* ossimStreamFactoryRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984430A403AA600E28AA2 /* ossimStreamFactoryRegistry.cpp */; };
-		43D98C980A403AAB00E28AA2 /* ossimString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984450A403AA600E28AA2 /* ossimString.cpp */; };
-		43D98C9A0A403AAB00E28AA2 /* ossimStringListProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984470A403AA600E28AA2 /* ossimStringListProperty.cpp */; };
-		43D98C9C0A403AAB00E28AA2 /* ossimStringProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984490A403AA600E28AA2 /* ossimStringProperty.cpp */; };
-		43D98C9E0A403AAB00E28AA2 /* ossimTDpt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9844B0A403AA600E28AA2 /* ossimTDpt.cpp */; };
-		43D98CA00A403AAB00E28AA2 /* ossimTempFilename.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9844D0A403AA600E28AA2 /* ossimTempFilename.cpp */; };
-		43D98CA20A403AAB00E28AA2 /* ossimTextProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9844F0A403AA600E28AA2 /* ossimTextProperty.cpp */; };
-		43D98CA40A403AAB00E28AA2 /* ossimThreeParamDatum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984510A403AA600E28AA2 /* ossimThreeParamDatum.cpp */; };
-		43D98CA60A403AAB00E28AA2 /* ossimTieGpt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984530A403AA600E28AA2 /* ossimTieGpt.cpp */; };
-		43D98CA80A403AAB00E28AA2 /* ossimTieGptSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984550A403AA600E28AA2 /* ossimTieGptSet.cpp */; };
-		43D98CAA0A403AAB00E28AA2 /* ossimTileHash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984570A403AA600E28AA2 /* ossimTileHash.cpp */; };
-		43D98CAC0A403AAB00E28AA2 /* ossimTiledImageHash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984590A403AA600E28AA2 /* ossimTiledImageHash.cpp */; };
-		43D98CAE0A403AAB00E28AA2 /* ossimTrace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9845B0A403AA600E28AA2 /* ossimTrace.cpp */; };
-		43D98CB00A403AAB00E28AA2 /* ossimTraceManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9845D0A403AA600E28AA2 /* ossimTraceManager.cpp */; };
-		43D98CB20A403AAB00E28AA2 /* ossimUnitConversionTool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9845F0A403AA600E28AA2 /* ossimUnitConversionTool.cpp */; };
-		43D98CB40A403AAB00E28AA2 /* ossimUnitTypeLut.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984610A403AA600E28AA2 /* ossimUnitTypeLut.cpp */; };
-		43D98CB60A403AAB00E28AA2 /* ossimUsgsQuad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984630A403AA600E28AA2 /* ossimUsgsQuad.cpp */; };
-		43D98CB80A403AAB00E28AA2 /* ossimViewController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984650A403AA600E28AA2 /* ossimViewController.cpp */; };
-		43D98CBA0A403AAB00E28AA2 /* ossimViewEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984670A403AA600E28AA2 /* ossimViewEvent.cpp */; };
-		43D98CBC0A403AAB00E28AA2 /* ossimViewInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984690A403AA600E28AA2 /* ossimViewInterface.cpp */; };
-		43D98CBE0A403AAB00E28AA2 /* ossimViewListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9846B0A403AA600E28AA2 /* ossimViewListener.cpp */; };
-		43D98CC00A403AAB00E28AA2 /* ossimVrect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9846D0A403AA600E28AA2 /* ossimVrect.cpp */; };
-		43D98CC20A403AAB00E28AA2 /* ossimWgs72Datum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9846F0A403AA600E28AA2 /* ossimWgs72Datum.cpp */; };
-		43D98CC40A403AAB00E28AA2 /* ossimWgs84Datum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984710A403AA600E28AA2 /* ossimWgs84Datum.cpp */; };
-		43D98CC60A403AAB00E28AA2 /* ossimXmlAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984730A403AA600E28AA2 /* ossimXmlAttribute.cpp */; };
-		43D98CC80A403AAB00E28AA2 /* ossimXmlDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984750A403AA600E28AA2 /* ossimXmlDocument.cpp */; };
-		43D98CCA0A403AAB00E28AA2 /* ossimXmlNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984770A403AA600E28AA2 /* ossimXmlNode.cpp */; };
-		43D98CCC0A403AAB00E28AA2 /* ossimXmlString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984790A403AA600E28AA2 /* ossimXmlString.cpp */; };
-		43D98CDE0A403AAB00E28AA2 /* ossimDtedFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9848E0A403AA600E28AA2 /* ossimDtedFactory.cpp */; };
-		43D98CE00A403AAB00E28AA2 /* ossimDtedHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984900A403AA600E28AA2 /* ossimDtedHandler.cpp */; };
-		43D98CE20A403AAB00E28AA2 /* ossimElevCellHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984920A403AA600E28AA2 /* ossimElevCellHandler.cpp */; };
-		43D98CE40A403AAB00E28AA2 /* ossimElevCellHandlerFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984940A403AA600E28AA2 /* ossimElevCellHandlerFactory.cpp */; };
-		43D98CE60A403AAB00E28AA2 /* ossimElevManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984960A403AA600E28AA2 /* ossimElevManager.cpp */; };
-		43D98CE80A403AAB00E28AA2 /* ossimElevSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984980A403AA600E28AA2 /* ossimElevSource.cpp */; };
-		43D98CEA0A403AAB00E28AA2 /* ossimElevSourceFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9849A0A403AA600E28AA2 /* ossimElevSourceFactory.cpp */; };
-		43D98CEE0A403AAB00E28AA2 /* ossimGeneralRasterElevFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9849E0A403AA600E28AA2 /* ossimGeneralRasterElevFactory.cpp */; };
-		43D98CF00A403AAB00E28AA2 /* ossimGeneralRasterElevHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984A00A403AA600E28AA2 /* ossimGeneralRasterElevHandler.cpp */; };
-		43D98CF20A403AAB00E28AA2 /* ossimSrtmFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984A20A403AA600E28AA2 /* ossimSrtmFactory.cpp */; };
-		43D98CF40A403AAB00E28AA2 /* ossimSrtmHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984A40A403AA600E28AA2 /* ossimSrtmHandler.cpp */; };
-		43D98CFD0A403AAB00E28AA2 /* ossimFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984AF0A403AA600E28AA2 /* ossimFont.cpp */; };
-		43D98CFF0A403AAB00E28AA2 /* ossimFontFactoryRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984B10A403AA600E28AA2 /* ossimFontFactoryRegistry.cpp */; };
-		43D98D010A403AAB00E28AA2 /* ossimFreeTypeFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984B30A403AA600E28AA2 /* ossimFreeTypeFont.cpp */; };
-		43D98D030A403AAB00E28AA2 /* ossimFreeTypeFontFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984B50A403AA600E28AA2 /* ossimFreeTypeFontFactory.cpp */; };
-		43D98D050A403AAB00E28AA2 /* ossimGdBitmapFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D984B70A403AA600E28AA2 /* ossimGdBitmapFont.cpp */; };
-		43D98DD60A403AAB00E28AA2 /* ossim3x3ConvolutionFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9858A0A403AA600E28AA2 /* ossim3x3ConvolutionFilter.cpp */; };
-		43D98DD80A403AAB00E28AA2 /* ossimAOD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9858C0A403AA600E28AA2 /* ossimAOD.cpp */; };
-		43D98DDA0A403AAB00E28AA2 /* ossimAdrgHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9858E0A403AA600E28AA2 /* ossimAdrgHeader.cpp */; };
-		43D98DDC0A403AAB00E28AA2 /* ossimAdrgTileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985900A403AA600E28AA2 /* ossimAdrgTileSource.cpp */; };
-		43D98DDE0A403AAB00E28AA2 /* ossimAnnotationEllipseObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985920A403AA600E28AA2 /* ossimAnnotationEllipseObject.cpp */; };
-		43D98DE00A403AAB00E28AA2 /* ossimAnnotationFontObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985940A403AA600E28AA2 /* ossimAnnotationFontObject.cpp */; };
-		43D98DE20A403AAB00E28AA2 /* ossimAnnotationGdBitmapFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985960A403AA600E28AA2 /* ossimAnnotationGdBitmapFont.cpp */; };
-		43D98DE40A403AAB00E28AA2 /* ossimAnnotationLineObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985980A403AA600E28AA2 /* ossimAnnotationLineObject.cpp */; };
-		43D98DE60A403AAB00E28AA2 /* ossimAnnotationMultiEllipseObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9859A0A403AA600E28AA2 /* ossimAnnotationMultiEllipseObject.cpp */; };
-		43D98DE80A403AAB00E28AA2 /* ossimAnnotationMultiLineObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9859C0A403AA600E28AA2 /* ossimAnnotationMultiLineObject.cpp */; };
-		43D98DEA0A403AAB00E28AA2 /* ossimAnnotationMultiPolyLineObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9859E0A403AA600E28AA2 /* ossimAnnotationMultiPolyLineObject.cpp */; };
-		43D98DEC0A403AAB00E28AA2 /* ossimAnnotationMultiPolyObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985A00A403AA600E28AA2 /* ossimAnnotationMultiPolyObject.cpp */; };
-		43D98DEE0A403AAB00E28AA2 /* ossimAnnotationObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985A20A403AA700E28AA2 /* ossimAnnotationObject.cpp */; };
-		43D98DF00A403AAB00E28AA2 /* ossimAnnotationObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985A40A403AA700E28AA2 /* ossimAnnotationObjectFactory.cpp */; };
-		43D98DF20A403AAB00E28AA2 /* ossimAnnotationPolyObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985A60A403AA700E28AA2 /* ossimAnnotationPolyObject.cpp */; };
-		43D98DF40A403AAB00E28AA2 /* ossimAnnotationSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985A80A403AA700E28AA2 /* ossimAnnotationSource.cpp */; };
-		43D98DF60A403AAB00E28AA2 /* ossimAppFixedTileCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985AA0A403AA700E28AA2 /* ossimAppFixedTileCache.cpp */; };
-		43D98DF80A403AAB00E28AA2 /* ossimAppTileCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985AC0A403AA700E28AA2 /* ossimAppTileCache.cpp */; };
-		43D98DFA0A403AAB00E28AA2 /* ossimArcInfoGridWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985AE0A403AA700E28AA2 /* ossimArcInfoGridWriter.cpp */; };
-		43D98DFC0A403AAB00E28AA2 /* ossimAtCorrGridRemapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985B00A403AA700E28AA2 /* ossimAtCorrGridRemapper.cpp */; };
-		43D98DFE0A403AAB00E28AA2 /* ossimAtCorrRemapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985B20A403AA700E28AA2 /* ossimAtCorrRemapper.cpp */; };
-		43D98E000A403AAB00E28AA2 /* ossimAtbController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985B40A403AA700E28AA2 /* ossimAtbController.cpp */; };
-		43D98E020A403AAB00E28AA2 /* ossimAtbMatchPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985B60A403AA700E28AA2 /* ossimAtbMatchPoint.cpp */; };
-		43D98E040A403AAB00E28AA2 /* ossimAtbPointSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985B80A403AA700E28AA2 /* ossimAtbPointSource.cpp */; };
-		43D98E060A403AAB00E28AA2 /* ossimBandAverageFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985BA0A403AA700E28AA2 /* ossimBandAverageFilter.cpp */; };
-		43D98E080A403AAB00E28AA2 /* ossimBandClipFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985BC0A403AA700E28AA2 /* ossimBandClipFilter.cpp */; };
-		43D98E0A0A403AAB00E28AA2 /* ossimBandMergeSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985BE0A403AA700E28AA2 /* ossimBandMergeSource.cpp */; };
-		43D98E0C0A403AAB00E28AA2 /* ossimBandSelector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985C00A403AA700E28AA2 /* ossimBandSelector.cpp */; };
-		43D98E0E0A403AAB00E28AA2 /* ossimBlendMosaic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985C20A403AA700E28AA2 /* ossimBlendMosaic.cpp */; };
-		43D98E100A403AAB00E28AA2 /* ossimBrightnessContrastSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985C40A403AA700E28AA2 /* ossimBrightnessContrastSource.cpp */; };
-		43D98E120A403AAB00E28AA2 /* ossimBrightnessMatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985C60A403AA700E28AA2 /* ossimBrightnessMatch.cpp */; };
-		43D98E140A403AAB00E28AA2 /* ossimBumpShadeTileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985C80A403AA700E28AA2 /* ossimBumpShadeTileSource.cpp */; };
-		43D98E160A403AAB00E28AA2 /* ossimCacheTileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985CA0A403AA700E28AA2 /* ossimCacheTileSource.cpp */; };
-		43D98E180A403AAB00E28AA2 /* ossimCastTileSourceFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985CC0A403AA700E28AA2 /* ossimCastTileSourceFilter.cpp */; };
-		43D98E1A0A403AAB00E28AA2 /* ossimCcfHead.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985CE0A403AA700E28AA2 /* ossimCcfHead.cpp */; };
-		43D98E1C0A403AAB00E28AA2 /* ossimCcfTileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985D00A403AA700E28AA2 /* ossimCcfTileSource.cpp */; };
-		43D98E1E0A403AAB00E28AA2 /* ossimCibCadrgTileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985D20A403AA700E28AA2 /* ossimCibCadrgTileSource.cpp */; };
-		43D98E200A403AAB00E28AA2 /* ossimClosestToCenterCombiner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985D40A403AA700E28AA2 /* ossimClosestToCenterCombiner.cpp */; };
-		43D98E220A403AAB00E28AA2 /* ossimColorNormalizedFusion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985D60A403AA700E28AA2 /* ossimColorNormalizedFusion.cpp */; };
-		43D98E240A403AAB00E28AA2 /* ossimConvolutionFilter1D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985D80A403AA700E28AA2 /* ossimConvolutionFilter1D.cpp */; };
-		43D98E260A403AAB00E28AA2 /* ossimConvolutionSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985DA0A403AA700E28AA2 /* ossimConvolutionSource.cpp */; };
-		43D98E280A403AAB00E28AA2 /* ossimDdffield.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985DC0A403AA700E28AA2 /* ossimDdffield.cpp */; };
-		43D98E2A0A403AAB00E28AA2 /* ossimDdffielddefn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985DE0A403AA700E28AA2 /* ossimDdffielddefn.cpp */; };
-		43D98E2C0A403AAB00E28AA2 /* ossimDdfmodule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985E00A403AA700E28AA2 /* ossimDdfmodule.cpp */; };
-		43D98E2E0A403AAB00E28AA2 /* ossimDdfrecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985E20A403AA700E28AA2 /* ossimDdfrecord.cpp */; };
-		43D98E300A403AAB00E28AA2 /* ossimDdfsubfielddefn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985E40A403AA700E28AA2 /* ossimDdfsubfielddefn.cpp */; };
-		43D98E320A403AAB00E28AA2 /* ossimDdfutils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985E60A403AA700E28AA2 /* ossimDdfutils.cpp */; };
-		43D98E340A403AAB00E28AA2 /* ossimDiscrete3x3HatFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985E80A403AA700E28AA2 /* ossimDiscrete3x3HatFilter.cpp */; };
-		43D98E360A403AAB00E28AA2 /* ossimDiscreteConvolutionKernel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985EA0A403AA700E28AA2 /* ossimDiscreteConvolutionKernel.cpp */; };
-		43D98E380A403AAB00E28AA2 /* ossimDoqqTileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985EC0A403AA700E28AA2 /* ossimDoqqTileSource.cpp */; };
-		43D98E3A0A403AAB00E28AA2 /* ossimDtedElevationImageSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985EE0A403AA700E28AA2 /* ossimDtedElevationImageSource.cpp */; };
-		43D98E3C0A403AAB00E28AA2 /* ossimDtedTileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985F00A403AA700E28AA2 /* ossimDtedTileSource.cpp */; };
-		43D98E3E0A403AAB00E28AA2 /* ossimERSTileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985F20A403AA700E28AA2 /* ossimERSTileSource.cpp */; };
-		43D98E400A403AAB00E28AA2 /* ossimEastingNorthingCutter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985F40A403AA700E28AA2 /* ossimEastingNorthingCutter.cpp */; };
-		43D98E420A403AAB00E28AA2 /* ossimEdgeFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985F60A403AA700E28AA2 /* ossimEdgeFilter.cpp */; };
-		43D98E440A403AAB00E28AA2 /* ossimElevImageSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985F80A403AA700E28AA2 /* ossimElevImageSource.cpp */; };
-		43D98E460A403AAB00E28AA2 /* ossimEnviHeaderFileWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985FA0A403AA700E28AA2 /* ossimEnviHeaderFileWriter.cpp */; };
-		43D98E480A403AAB00E28AA2 /* ossimEquationCombiner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D985FC0A403AA700E28AA2 /* ossimEquationCombiner.cpp */; };
-		43D98E4E0A403AAB00E28AA2 /* ossimFeatherMosaic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986020A403AA700E28AA2 /* ossimFeatherMosaic.cpp */; };
-		43D98E500A403AAB00E28AA2 /* ossimFftFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986040A403AA700E28AA2 /* ossimFftFilter.cpp */; };
-		43D98E520A403AAB00E28AA2 /* ossimFgdcFileWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986060A403AA700E28AA2 /* ossimFgdcFileWriter.cpp */; };
-		43D98E540A403AAB00E28AA2 /* ossimFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986080A403AA700E28AA2 /* ossimFilter.cpp */; };
-		43D98E560A403AAB00E28AA2 /* ossimFilterResampler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9860A0A403AA700E28AA2 /* ossimFilterResampler.cpp */; };
-		43D98E580A403AAB00E28AA2 /* ossimFilterTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9860C0A403AA700E28AA2 /* ossimFilterTable.cpp */; };
-		43D98E5A0A403AAB00E28AA2 /* ossimFixedTileCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9860E0A403AA700E28AA2 /* ossimFixedTileCache.cpp */; };
-		43D98E5C0A403AAB00E28AA2 /* ossimFusionCombiner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986100A403AA700E28AA2 /* ossimFusionCombiner.cpp */; };
-		43D98E5E0A403AAB00E28AA2 /* ossimGammaRemapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986120A403AA700E28AA2 /* ossimGammaRemapper.cpp */; };
-		43D98E600A403AAB00E28AA2 /* ossimGeneralRasterInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986140A403AA700E28AA2 /* ossimGeneralRasterInfo.cpp */; };
-		43D98E620A403AAB00E28AA2 /* ossimGeneralRasterTileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986160A403AA700E28AA2 /* ossimGeneralRasterTileSource.cpp */; };
-		43D98E640A403AAB00E28AA2 /* ossimGeneralRasterWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986180A403AA700E28AA2 /* ossimGeneralRasterWriter.cpp */; };
-		43D98E660A403AAB00E28AA2 /* ossimGeoAnnotationBitmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9861A0A403AA700E28AA2 /* ossimGeoAnnotationBitmap.cpp */; };
-		43D98E680A403AAB00E28AA2 /* ossimGeoAnnotationEllipseObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9861C0A403AA700E28AA2 /* ossimGeoAnnotationEllipseObject.cpp */; };
-		43D98E6A0A403AAB00E28AA2 /* ossimGeoAnnotationFontObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9861E0A403AA700E28AA2 /* ossimGeoAnnotationFontObject.cpp */; };
-		43D98E6C0A403AAB00E28AA2 /* ossimGeoAnnotationGdBitmapFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986200A403AA700E28AA2 /* ossimGeoAnnotationGdBitmapFont.cpp */; };
-		43D98E6E0A403AAB00E28AA2 /* ossimGeoAnnotationLineObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986220A403AA700E28AA2 /* ossimGeoAnnotationLineObject.cpp */; };
-		43D98E700A403AAB00E28AA2 /* ossimGeoAnnotationMultiEllipseObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986240A403AA700E28AA2 /* ossimGeoAnnotationMultiEllipseObject.cpp */; };
-		43D98E720A403AAB00E28AA2 /* ossimGeoAnnotationMultiPolyLineObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986260A403AA700E28AA2 /* ossimGeoAnnotationMultiPolyLineObject.cpp */; };
-		43D98E740A403AAB00E28AA2 /* ossimGeoAnnotationMultiPolyObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986280A403AA700E28AA2 /* ossimGeoAnnotationMultiPolyObject.cpp */; };
-		43D98E760A403AAB00E28AA2 /* ossimGeoAnnotationObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9862A0A403AA700E28AA2 /* ossimGeoAnnotationObject.cpp */; };
-		43D98E780A403AAB00E28AA2 /* ossimGeoAnnotationPolyLineObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9862C0A403AA700E28AA2 /* ossimGeoAnnotationPolyLineObject.cpp */; };
-		43D98E7A0A403AAB00E28AA2 /* ossimGeoAnnotationPolyObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9862E0A403AA700E28AA2 /* ossimGeoAnnotationPolyObject.cpp */; };
-		43D98E7C0A403AAB00E28AA2 /* ossimGeoAnnotationSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986300A403AA700E28AA2 /* ossimGeoAnnotationSource.cpp */; };
-		43D98E7E0A403AAB00E28AA2 /* ossimGeoPolyCutter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986320A403AA700E28AA2 /* ossimGeoPolyCutter.cpp */; };
-		43D98E800A403AAB00E28AA2 /* ossimGeographicAnnotationGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986340A403AA700E28AA2 /* ossimGeographicAnnotationGrid.cpp */; };
-		43D98E820A403AAB00E28AA2 /* ossimGeomFileWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986360A403AA700E28AA2 /* ossimGeomFileWriter.cpp */; };
-		43D98E840A403AAB00E28AA2 /* ossimGridRemapEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986380A403AA700E28AA2 /* ossimGridRemapEngine.cpp */; };
-		43D98E860A403AAB00E28AA2 /* ossimGridRemapEngineFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9863A0A403AA700E28AA2 /* ossimGridRemapEngineFactory.cpp */; };
-		43D98E880A403AAB00E28AA2 /* ossimGridRemapSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9863C0A403AA700E28AA2 /* ossimGridRemapSource.cpp */; };
-		43D98E8A0A403AAB00E28AA2 /* ossimHistoMatchRemapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9863E0A403AA700E28AA2 /* ossimHistoMatchRemapper.cpp */; };
-		43D98E8C0A403AAB00E28AA2 /* ossimHistogramEqualization.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986400A403AA700E28AA2 /* ossimHistogramEqualization.cpp */; };
-		43D98E8E0A403AAB00E28AA2 /* ossimHistogramMatchFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986420A403AA700E28AA2 /* ossimHistogramMatchFilter.cpp */; };
-		43D98E900A403AAB00E28AA2 /* ossimHistogramRemapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986440A403AA700E28AA2 /* ossimHistogramRemapper.cpp */; };
-		43D98E920A403AAB00E28AA2 /* ossimHistogramThreshholdFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986460A403AA700E28AA2 /* ossimHistogramThreshholdFilter.cpp */; };
-		43D98E940A403AAB00E28AA2 /* ossimHistogramWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986480A403AA700E28AA2 /* ossimHistogramWriter.cpp */; };
-		43D98E960A403AAB00E28AA2 /* ossimHsiRemapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9864A0A403AA700E28AA2 /* ossimHsiRemapper.cpp */; };
-		43D98E980A403AAB00E28AA2 /* ossimHsiToRgbSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9864C0A403AA700E28AA2 /* ossimHsiToRgbSource.cpp */; };
-		43D98E9A0A403AAB00E28AA2 /* ossimHsvGridRemapEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9864E0A403AA700E28AA2 /* ossimHsvGridRemapEngine.cpp */; };
-		43D98E9C0A403AAB00E28AA2 /* ossimHsvToRgbSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986500A403AA700E28AA2 /* ossimHsvToRgbSource.cpp */; };
-		43D98E9E0A403AAB00E28AA2 /* ossimIgenGenerator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986520A403AA700E28AA2 /* ossimIgenGenerator.cpp */; };
-		43D98EA00A403AAB00E28AA2 /* ossimImageChain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986540A403AA700E28AA2 /* ossimImageChain.cpp */; };
-		43D98EA20A403AAB00E28AA2 /* ossimImageCombiner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986560A403AA700E28AA2 /* ossimImageCombiner.cpp */; };
-		43D98EA40A403AAB00E28AA2 /* ossimImageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986580A403AA700E28AA2 /* ossimImageData.cpp */; };
-		43D98EA60A403AAB00E28AA2 /* ossimImageDataFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9865A0A403AA700E28AA2 /* ossimImageDataFactory.cpp */; };
-		43D98EA80A403AAB00E28AA2 /* ossimImageDataHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9865C0A403AA700E28AA2 /* ossimImageDataHelper.cpp */; };
-		43D98EAA0A403AAB00E28AA2 /* ossimImageDisplayWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9865E0A403AA700E28AA2 /* ossimImageDisplayWriter.cpp */; };
-		43D98EAC0A403AAB00E28AA2 /* ossimImageFileWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986600A403AA700E28AA2 /* ossimImageFileWriter.cpp */; };
-		43D98EAE0A403AAB00E28AA2 /* ossimImageGaussianFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986620A403AA700E28AA2 /* ossimImageGaussianFilter.cpp */; };
-		43D98EB00A403AAB00E28AA2 /* ossimImageHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986640A403AA700E28AA2 /* ossimImageHandler.cpp */; };
-		43D98EB20A403AAB00E28AA2 /* ossimImageHandlerFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986660A403AA700E28AA2 /* ossimImageHandlerFactory.cpp */; };
-		43D98EB40A403AAB00E28AA2 /* ossimImageHandlerFactoryBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986680A403AA700E28AA2 /* ossimImageHandlerFactoryBase.cpp */; };
-		43D98EB60A403AAB00E28AA2 /* ossimImageHandlerRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9866A0A403AA700E28AA2 /* ossimImageHandlerRegistry.cpp */; };
-		43D98EB80A403AAB00E28AA2 /* ossimImageHistogramSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9866C0A403AA700E28AA2 /* ossimImageHistogramSource.cpp */; };
-		43D98EBA0A403AAB00E28AA2 /* ossimImageMetaData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9866E0A403AA700E28AA2 /* ossimImageMetaData.cpp */; };
-		43D98EBC0A403AAB00E28AA2 /* ossimImageMetaDataWriterFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986700A403AA700E28AA2 /* ossimImageMetaDataWriterFactory.cpp */; };
-		43D98EBE0A403AAB00E28AA2 /* ossimImageMetaDataWriterFactoryBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986720A403AA700E28AA2 /* ossimImageMetaDataWriterFactoryBase.cpp */; };
-		43D98EC00A403AAB00E28AA2 /* ossimImageMetaDataWriterRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986740A403AA700E28AA2 /* ossimImageMetaDataWriterRegistry.cpp */; };
-		43D98EC20A403AAB00E28AA2 /* ossimImageMosaic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986760A403AA700E28AA2 /* ossimImageMosaic.cpp */; };
-		43D98EC40A403AAB00E28AA2 /* ossimImageReconstructionFilterFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986780A403AA700E28AA2 /* ossimImageReconstructionFilterFactory.cpp */; };
-		43D98EC60A403AAB00E28AA2 /* ossimImageReconstructionFilterRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9867A0A403AA700E28AA2 /* ossimImageReconstructionFilterRegistry.cpp */; };
-		43D98EC80A403AAB00E28AA2 /* ossimImageRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9867C0A403AA700E28AA2 /* ossimImageRenderer.cpp */; };
-		43D98ECC0A403AAB00E28AA2 /* ossimImageSharpenFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986800A403AA700E28AA2 /* ossimImageSharpenFilter.cpp */; };
-		43D98ECE0A403AAB00E28AA2 /* ossimImageSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986820A403AA700E28AA2 /* ossimImageSource.cpp */; };
-		43D98ED00A403AAB00E28AA2 /* ossimImageSourceFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986840A403AA700E28AA2 /* ossimImageSourceFactory.cpp */; };
-		43D98ED20A403AAB00E28AA2 /* ossimImageSourceFactoryBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986860A403AA700E28AA2 /* ossimImageSourceFactoryBase.cpp */; };
-		43D98ED40A403AAB00E28AA2 /* ossimImageSourceFactoryRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986880A403AA700E28AA2 /* ossimImageSourceFactoryRegistry.cpp */; };
-		43D98ED60A403AAB00E28AA2 /* ossimImageSourceFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9868A0A403AA700E28AA2 /* ossimImageSourceFilter.cpp */; };
-		43D98ED80A403AAB00E28AA2 /* ossimImageSourceHistogramFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9868C0A403AA700E28AA2 /* ossimImageSourceHistogramFilter.cpp */; };
-		43D98EDC0A403AAB00E28AA2 /* ossimImageSourceSequencer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986900A403AA700E28AA2 /* ossimImageSourceSequencer.cpp */; };
-		43D98EDE0A403AAB00E28AA2 /* ossimImageStatisticsSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986920A403AA700E28AA2 /* ossimImageStatisticsSource.cpp */; };
-		43D98EE00A403AAB00E28AA2 /* ossimImageToPlaneNormalFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986940A403AA700E28AA2 /* ossimImageToPlaneNormalFilter.cpp */; };
-		43D98EE20A403AAB00E28AA2 /* ossimImageWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986960A403AA700E28AA2 /* ossimImageWriter.cpp */; };
-		43D98EE40A403AAB00E28AA2 /* ossimImageWriterFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986980A403AA700E28AA2 /* ossimImageWriterFactory.cpp */; };
-		43D98EE60A403AAB00E28AA2 /* ossimImageWriterFactoryBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9869A0A403AA700E28AA2 /* ossimImageWriterFactoryBase.cpp */; };
-		43D98EE80A403AAB00E28AA2 /* ossimImageWriterFactoryRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9869C0A403AA700E28AA2 /* ossimImageWriterFactoryRegistry.cpp */; };
-		43D98EEA0A403AAB00E28AA2 /* ossimIndexToRgbLutFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9869E0A403AA700E28AA2 /* ossimIndexToRgbLutFilter.cpp */; };
-		43D98EEC0A403AAB00E28AA2 /* ossimIntensityAdjustmentFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986A00A403AA700E28AA2 /* ossimIntensityAdjustmentFilter.cpp */; };
-		43D98EEE0A403AAB00E28AA2 /* ossimJpegTileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986A20A403AA700E28AA2 /* ossimJpegTileSource.cpp */; };
-		43D98EF00A403AAB00E28AA2 /* ossimJpegWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986A40A403AA700E28AA2 /* ossimJpegWriter.cpp */; };
-		43D98EF20A403AAB00E28AA2 /* ossimJpegYCbCrToRgbSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986A60A403AA700E28AA2 /* ossimJpegYCbCrToRgbSource.cpp */; };
-		43D98EF40A403AAB00E28AA2 /* ossimLandsatTileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986A80A403AA700E28AA2 /* ossimLandsatTileSource.cpp */; };
-		43D98EF60A403AAB00E28AA2 /* ossimLandsatTopoCorrectionFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986AA0A403AA700E28AA2 /* ossimLandsatTopoCorrectionFilter.cpp */; };
-		43D98EF80A403AAB00E28AA2 /* ossimLocalCorrelationFusion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986AC0A403AA700E28AA2 /* ossimLocalCorrelationFusion.cpp */; };
-		43D98EFA0A403AAB00E28AA2 /* ossimMapCompositionSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986AE0A403AA700E28AA2 /* ossimMapCompositionSource.cpp */; };
-		43D98EFC0A403AAB00E28AA2 /* ossimMaskFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986B00A403AA700E28AA2 /* ossimMaskFilter.cpp */; };
-		43D98EFE0A403AAB00E28AA2 /* ossimMaxMosaic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986B20A403AA700E28AA2 /* ossimMaxMosaic.cpp */; };
-		43D98F000A403AAB00E28AA2 /* ossimMeanMedianFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986B40A403AA700E28AA2 /* ossimMeanMedianFilter.cpp */; };
-		43D98F020A403AAB00E28AA2 /* ossimMetadataFileWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986B60A403AA700E28AA2 /* ossimMetadataFileWriter.cpp */; };
-		43D98F040A403AAB00E28AA2 /* ossimMonoGridRemapEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986B80A403AA700E28AA2 /* ossimMonoGridRemapEngine.cpp */; };
-		43D98F060A403AAB00E28AA2 /* ossimMultiBandHistogramTileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986BA0A403AA700E28AA2 /* ossimMultiBandHistogramTileSource.cpp */; };
-		43D98F080A403AAB00E28AA2 /* ossimNBandToIndexFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986BC0A403AA700E28AA2 /* ossimNBandToIndexFilter.cpp */; };
-		43D98F0A0A403AAB00E28AA2 /* ossimNitfTileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986BE0A403AA700E28AA2 /* ossimNitfTileSource.cpp */; };
-		43D98F0C0A403AAB00E28AA2 /* ossimNitfWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986C00A403AA700E28AA2 /* ossimNitfWriter.cpp */; };
-		43D98F0E0A403AAB00E28AA2 /* ossimNormalizedRemapTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986C20A403AA700E28AA2 /* ossimNormalizedRemapTable.cpp */; };
-		43D98F100A403AAB00E28AA2 /* ossimNormalizedU11RemapTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986C40A403AA700E28AA2 /* ossimNormalizedU11RemapTable.cpp */; };
-		43D98F120A403AAB00E28AA2 /* ossimNormalizedU16RemapTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986C60A403AA700E28AA2 /* ossimNormalizedU16RemapTable.cpp */; };
-		43D98F140A403AAB00E28AA2 /* ossimNormalizedU8RemapTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986C80A403AA700E28AA2 /* ossimNormalizedU8RemapTable.cpp */; };
-		43D98F160A403AAB00E28AA2 /* ossimOrthoImageMosaic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986CA0A403AA700E28AA2 /* ossimOrthoImageMosaic.cpp */; };
-		43D98F180A403AAB00E28AA2 /* ossimPixelFlipper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986CC0A403AA700E28AA2 /* ossimPixelFlipper.cpp */; };
-		43D98F1A0A403AAB00E28AA2 /* ossimPolyCutter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986CE0A403AA700E28AA2 /* ossimPolyCutter.cpp */; };
-		43D98F1C0A403AAB00E28AA2 /* ossimQuickbirdNitfTileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986D00A403AA700E28AA2 /* ossimQuickbirdNitfTileSource.cpp */; };
-		43D98F1E0A403AAB00E28AA2 /* ossimQuickbirdTiffTileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986D20A403AA700E28AA2 /* ossimQuickbirdTiffTileSource.cpp */; };
-		43D98F200A403AAB00E28AA2 /* ossimRLevelFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986D40A403AA700E28AA2 /* ossimRLevelFilter.cpp */; };
-		43D98F220A403AAB00E28AA2 /* ossimReadmeFileWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986D60A403AA700E28AA2 /* ossimReadmeFileWriter.cpp */; };
-		43D98F240A403AAB00E28AA2 /* ossimRectangleCutFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986D80A403AA700E28AA2 /* ossimRectangleCutFilter.cpp */; };
-		43D98F260A403AAB00E28AA2 /* ossimResampler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986DA0A403AA700E28AA2 /* ossimResampler.cpp */; };
-		43D98F280A403AAB00E28AA2 /* ossimRgbGridRemapEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986DC0A403AA700E28AA2 /* ossimRgbGridRemapEngine.cpp */; };
-		43D98F2A0A403AAB00E28AA2 /* ossimRgbImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986DE0A403AA700E28AA2 /* ossimRgbImage.cpp */; };
-		43D98F2C0A403AAB00E28AA2 /* ossimRgbToGreyFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986E00A403AA700E28AA2 /* ossimRgbToGreyFilter.cpp */; };
-		43D98F2E0A403AAB00E28AA2 /* ossimRgbToHsiSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986E20A403AA700E28AA2 /* ossimRgbToHsiSource.cpp */; };
-		43D98F300A403AAB00E28AA2 /* ossimRgbToHsvSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986E40A403AA700E28AA2 /* ossimRgbToHsvSource.cpp */; };
-		43D98F320A403AAB00E28AA2 /* ossimRgbToIndexFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986E60A403AA700E28AA2 /* ossimRgbToIndexFilter.cpp */; };
-		43D98F340A403AAB00E28AA2 /* ossimRgbToJpegYCbCrSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986E80A403AA700E28AA2 /* ossimRgbToJpegYCbCrSource.cpp */; };
-		43D98F360A403AAB00E28AA2 /* ossimS16ImageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986EA0A403AA700E28AA2 /* ossimS16ImageData.cpp */; };
-		43D98F380A403AAB00E28AA2 /* ossimSFIMFusion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986EC0A403AA700E28AA2 /* ossimSFIMFusion.cpp */; };
-		43D98F3A0A403AAB00E28AA2 /* ossimScalarRemapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986EE0A403AA700E28AA2 /* ossimScalarRemapper.cpp */; };
-		43D98F3C0A403AAB00E28AA2 /* ossimScaleFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986F00A403AA700E28AA2 /* ossimScaleFilter.cpp */; };
-		43D98F3E0A403AAB00E28AA2 /* ossimSrtmTileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986F20A403AA700E28AA2 /* ossimSrtmTileSource.cpp */; };
-		43D98F400A403AAB00E28AA2 /* ossimSubImageTileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986F40A403AA700E28AA2 /* ossimSubImageTileSource.cpp */; };
-		43D98F420A403AAB00E28AA2 /* ossimTableRemapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986F60A403AA700E28AA2 /* ossimTableRemapper.cpp */; };
-		43D98F440A403AAB00E28AA2 /* ossimTiffOverviewBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986F80A403AA700E28AA2 /* ossimTiffOverviewBuilder.cpp */; };
-		43D98F460A403AAB00E28AA2 /* ossimTiffTileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986FA0A403AA800E28AA2 /* ossimTiffTileSource.cpp */; };
-		43D98F480A403AAB00E28AA2 /* ossimTiffWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986FC0A403AA800E28AA2 /* ossimTiffWriter.cpp */; };
-		43D98F4A0A403AAB00E28AA2 /* ossimTileCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D986FE0A403AA800E28AA2 /* ossimTileCache.cpp */; };
-		43D98F4C0A403AAB00E28AA2 /* ossimTilePatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987000A403AA800E28AA2 /* ossimTilePatch.cpp */; };
-		43D98F4E0A403AAB00E28AA2 /* ossimTiling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987020A403AA800E28AA2 /* ossimTiling.cpp */; };
-		43D98F500A403AAB00E28AA2 /* ossimTopographicCorrectionFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987040A403AA800E28AA2 /* ossimTopographicCorrectionFilter.cpp */; };
-		43D98F520A403AAB00E28AA2 /* ossimTrimFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987060A403AA800E28AA2 /* ossimTrimFilter.cpp */; };
-		43D98F540A403AAB00E28AA2 /* ossimU11ImageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987080A403AA800E28AA2 /* ossimU11ImageData.cpp */; };
-		43D98F560A403AAB00E28AA2 /* ossimU16ImageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9870A0A403AA800E28AA2 /* ossimU16ImageData.cpp */; };
-		43D98F580A403AAB00E28AA2 /* ossimU8ImageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9870C0A403AA800E28AA2 /* ossimU8ImageData.cpp */; };
-		43D98F5A0A403AAB00E28AA2 /* ossimUsgsDemTileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9870E0A403AA800E28AA2 /* ossimUsgsDemTileSource.cpp */; };
-		43D98F5C0A403AAB00E28AA2 /* ossimValueAssignImageSourceFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987100A403AA800E28AA2 /* ossimValueAssignImageSourceFilter.cpp */; };
-		43D98F5E0A403AAB00E28AA2 /* ossimVectorRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987120A403AA800E28AA2 /* ossimVectorRenderer.cpp */; };
-		43D98F600A403AAB00E28AA2 /* ossimVertexExtractor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987140A403AA800E28AA2 /* ossimVertexExtractor.cpp */; };
-		43D98F620A403AAB00E28AA2 /* ossimVpfAnnotationCoverageInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987160A403AA800E28AA2 /* ossimVpfAnnotationCoverageInfo.cpp */; };
-		43D98F640A403AAB00E28AA2 /* ossimVpfAnnotationFeatureInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987180A403AA800E28AA2 /* ossimVpfAnnotationFeatureInfo.cpp */; };
-		43D98F660A403AAB00E28AA2 /* ossimVpfAnnotationLibraryInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9871A0A403AA800E28AA2 /* ossimVpfAnnotationLibraryInfo.cpp */; };
-		43D98F680A403AAB00E28AA2 /* ossimVpfAnnotationSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9871C0A403AA800E28AA2 /* ossimVpfAnnotationSource.cpp */; };
-		43D98F6A0A403AAB00E28AA2 /* ossimVpfTileSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9871E0A403AA800E28AA2 /* ossimVpfTileSource.cpp */; };
-		43D98F6C0A403AAB00E28AA2 /* ossimWatermarkFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987200A403AA800E28AA2 /* ossimWatermarkFilter.cpp */; };
-		43D98F6E0A403AAB00E28AA2 /* ossimWorldFileWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987220A403AA800E28AA2 /* ossimWorldFileWriter.cpp */; };
-		43D98F730A403AAB00E28AA2 /* ossimInit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987290A403AA800E28AA2 /* ossimInit.cpp */; };
-		43D98F800A403AAB00E28AA2 /* booleng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987380A403AA800E28AA2 /* booleng.cpp */; };
-		43D98F820A403AAB00E28AA2 /* graph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9873A0A403AA800E28AA2 /* graph.cpp */; };
-		43D98F840A403AAB00E28AA2 /* graphlst.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9873C0A403AA800E28AA2 /* graphlst.cpp */; };
-		43D98F860A403AAB00E28AA2 /* line.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9873E0A403AA800E28AA2 /* line.cpp */; };
-		43D98F880A403AAB00E28AA2 /* link.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987400A403AA800E28AA2 /* link.cpp */; };
-		43D98F8A0A403AAB00E28AA2 /* lpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987420A403AA800E28AA2 /* lpoint.cpp */; };
-		43D98F8C0A403AAB00E28AA2 /* node.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987440A403AA800E28AA2 /* node.cpp */; };
-		43D98F8E0A403AAB00E28AA2 /* record.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987460A403AA800E28AA2 /* record.cpp */; };
-		43D98F900A403AAB00E28AA2 /* scanbeam.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987480A403AA800E28AA2 /* scanbeam.cpp */; };
-		43D98FAC0A403AAB00E28AA2 /* bandmat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987660A403AA800E28AA2 /* bandmat.cpp */; };
-		43D98FB10A403AAB00E28AA2 /* cholesky.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9876B0A403AA800E28AA2 /* cholesky.cpp */; };
-		43D98FB30A403AAB00E28AA2 /* evalue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9876D0A403AA800E28AA2 /* evalue.cpp */; };
-		43D98FB60A403AAB00E28AA2 /* fft.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987700A403AA800E28AA2 /* fft.cpp */; };
-		43D98FB90A403AAB00E28AA2 /* hholder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987730A403AA800E28AA2 /* hholder.cpp */; };
-		43D98FBB0A403AAB00E28AA2 /* jacobi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987750A403AA800E28AA2 /* jacobi.cpp */; };
-		43D98FBF0A403AAB00E28AA2 /* myexcept.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987790A403AA800E28AA2 /* myexcept.cpp */; };
-		43D98FC10A403AAB00E28AA2 /* newfft.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9877B0A403AA800E28AA2 /* newfft.cpp */; };
-		43D98FC40A403AAB00E28AA2 /* newmat1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9877E0A403AA800E28AA2 /* newmat1.cpp */; };
-		43D98FC60A403AAB00E28AA2 /* newmat2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987800A403AA800E28AA2 /* newmat2.cpp */; };
-		43D98FC80A403AAB00E28AA2 /* newmat3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987820A403AA800E28AA2 /* newmat3.cpp */; };
-		43D98FCA0A403AAB00E28AA2 /* newmat4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987840A403AA800E28AA2 /* newmat4.cpp */; };
-		43D98FCC0A403AAB00E28AA2 /* newmat5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987860A403AA800E28AA2 /* newmat5.cpp */; };
-		43D98FCE0A403AAB00E28AA2 /* newmat6.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987880A403AA800E28AA2 /* newmat6.cpp */; };
-		43D98FD00A403AAB00E28AA2 /* newmat7.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9878A0A403AA800E28AA2 /* newmat7.cpp */; };
-		43D98FD20A403AAB00E28AA2 /* newmat8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9878C0A403AA800E28AA2 /* newmat8.cpp */; };
-		43D98FD40A403AAB00E28AA2 /* newmat9.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9878E0A403AA800E28AA2 /* newmat9.cpp */; };
-		43D98FD60A403AAB00E28AA2 /* newmatex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987900A403AA800E28AA2 /* newmatex.cpp */; };
-		43D98FD80A403AAB00E28AA2 /* newmatnl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987920A403AA800E28AA2 /* newmatnl.cpp */; };
-		43D98FDA0A403AAB00E28AA2 /* newmatrm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987940A403AA800E28AA2 /* newmatrm.cpp */; };
-		43D98FDE0A403AAB00E28AA2 /* solution.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987980A403AA800E28AA2 /* solution.cpp */; };
-		43D98FE00A403AAB00E28AA2 /* sort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9879A0A403AA800E28AA2 /* sort.cpp */; };
-		43D98FE20A403AAB00E28AA2 /* submat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9879C0A403AA800E28AA2 /* submat.cpp */; };
-		43D98FE40A403AAB00E28AA2 /* svd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9879E0A403AA800E28AA2 /* svd.cpp */; };
-		43D98FF00A403AAB00E28AA2 /* ossimIgen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987AC0A403AA800E28AA2 /* ossimIgen.cpp */; };
-		43D98FF20A403AAB00E28AA2 /* ossimImageMpiMWriterSequenceConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987AE0A403AA800E28AA2 /* ossimImageMpiMWriterSequenceConnection.cpp */; };
-		43D98FF40A403AAB00E28AA2 /* ossimImageMpiSWriterSequenceConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987B00A403AA800E28AA2 /* ossimImageMpiSWriterSequenceConnection.cpp */; };
-		43D98FF60A403AAB00E28AA2 /* ossimMpi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987B20A403AA800E28AA2 /* ossimMpi.cpp */; };
-		43D98FF80A403AAB00E28AA2 /* ossimOrthoIgen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987B40A403AA800E28AA2 /* ossimOrthoIgen.cpp */; };
-		43D990000A403AAB00E28AA2 /* ossimDynamicLibrary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987BE0A403AA800E28AA2 /* ossimDynamicLibrary.cpp */; };
-		43D990020A403AAB00E28AA2 /* ossimPluginLibrary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987C00A403AA800E28AA2 /* ossimPluginLibrary.cpp */; };
-		43D990040A403AAB00E28AA2 /* ossimSharedObjectBridge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987C20A403AA800E28AA2 /* ossimSharedObjectBridge.cpp */; };
-		43D990060A403AAB00E28AA2 /* ossimSharedPluginRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D987C40A403AA800E28AA2 /* ossimSharedPluginRegistry.cpp */; };
-		43D9905B0A403AAB00E28AA2 /* ossimAdjMapModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9881B0A403AA800E28AA2 /* ossimAdjMapModel.cpp */; };
-		43D9905D0A403AAB00E28AA2 /* ossimAffineProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9881D0A403AA800E28AA2 /* ossimAffineProjection.cpp */; };
-		43D9905F0A403AAB00E28AA2 /* ossimAlbersProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9881F0A403AA800E28AA2 /* ossimAlbersProjection.cpp */; };
-		43D990610A403AAB00E28AA2 /* ossimApplanixEcefModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988210A403AA800E28AA2 /* ossimApplanixEcefModel.cpp */; };
-		43D990630A403AAB00E28AA2 /* ossimApplanixUtmModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988230A403AA800E28AA2 /* ossimApplanixUtmModel.cpp */; };
-		43D990650A403AAB00E28AA2 /* ossimAzimEquDistProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988250A403AA800E28AA2 /* ossimAzimEquDistProjection.cpp */; };
-		43D990670A403AAB00E28AA2 /* ossimBilinearProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988270A403AA800E28AA2 /* ossimBilinearProjection.cpp */; };
-		43D990690A403AAB00E28AA2 /* ossimBngProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988290A403AA800E28AA2 /* ossimBngProjection.cpp */; };
-		43D9906B0A403AAB00E28AA2 /* ossimBonneProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9882B0A403AA800E28AA2 /* ossimBonneProjection.cpp */; };
-		43D9906D0A403AAB00E28AA2 /* ossimCadrgProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9882D0A403AA800E28AA2 /* ossimCadrgProjection.cpp */; };
-		43D9906F0A403AAB00E28AA2 /* ossimCassiniProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9882F0A403AA800E28AA2 /* ossimCassiniProjection.cpp */; };
-		43D990710A403AAB00E28AA2 /* ossimCoarseGridModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988310A403AA800E28AA2 /* ossimCoarseGridModel.cpp */; };
-		43D990730A403AAB00E28AA2 /* ossimCylEquAreaProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988330A403AA800E28AA2 /* ossimCylEquAreaProjection.cpp */; };
-		43D990750A403AAB00E28AA2 /* ossimEckert4Projection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988350A403AA800E28AA2 /* ossimEckert4Projection.cpp */; };
-		43D990770A403AAB00E28AA2 /* ossimEckert6Projection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988370A403AA800E28AA2 /* ossimEckert6Projection.cpp */; };
-		43D990790A403AAB00E28AA2 /* ossimEquDistCylProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988390A403AA800E28AA2 /* ossimEquDistCylProjection.cpp */; };
-		43D9907B0A403AAB00E28AA2 /* ossimFcsiModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9883B0A403AA800E28AA2 /* ossimFcsiModel.cpp */; };
-		43D9907D0A403AAB00E28AA2 /* ossimGnomonicProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9883D0A403AA800E28AA2 /* ossimGnomonicProjection.cpp */; };
-		43D9907F0A403AAB00E28AA2 /* ossimIkonosRpcModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9883F0A403AA800E28AA2 /* ossimIkonosRpcModel.cpp */; };
-		43D990810A403AAB00E28AA2 /* ossimImageViewAffineTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988410A403AA800E28AA2 /* ossimImageViewAffineTransform.cpp */; };
-		43D990830A403AAB00E28AA2 /* ossimImageViewProjectionTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988430A403AA800E28AA2 /* ossimImageViewProjectionTransform.cpp */; };
-		43D990850A403AAB00E28AA2 /* ossimImageViewTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988450A403AA800E28AA2 /* ossimImageViewTransform.cpp */; };
-		43D990870A403AAB00E28AA2 /* ossimImageViewTransformFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988470A403AA800E28AA2 /* ossimImageViewTransformFactory.cpp */; };
-		43D990890A403AAB00E28AA2 /* ossimLambertConformalConicProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988490A403AA800E28AA2 /* ossimLambertConformalConicProjection.cpp */; };
-		43D9908B0A403AAB00E28AA2 /* ossimLandSatModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9884B0A403AA800E28AA2 /* ossimLandSatModel.cpp */; };
-		43D9908D0A403AAB00E28AA2 /* ossimLensDistortion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9884D0A403AA800E28AA2 /* ossimLensDistortion.cpp */; };
-		43D9908F0A403AAB00E28AA2 /* ossimLlxyProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9884F0A403AA800E28AA2 /* ossimLlxyProjection.cpp */; };
-		43D990910A403AAB00E28AA2 /* ossimMapProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988510A403AA800E28AA2 /* ossimMapProjection.cpp */; };
-		43D990930A403AAB00E28AA2 /* ossimMapProjectionFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988530A403AA800E28AA2 /* ossimMapProjectionFactory.cpp */; };
-		43D990950A403AAB00E28AA2 /* ossimMapProjectionInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988550A403AA800E28AA2 /* ossimMapProjectionInfo.cpp */; };
-		43D990970A403AAB00E28AA2 /* ossimMapViewController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988570A403AA800E28AA2 /* ossimMapViewController.cpp */; };
-		43D990990A403AAB00E28AA2 /* ossimMeanRadialLensDistortion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988590A403AA800E28AA2 /* ossimMeanRadialLensDistortion.cpp */; };
-		43D9909B0A403AAB00E28AA2 /* ossimMercatorProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9885B0A403AA900E28AA2 /* ossimMercatorProjection.cpp */; };
-		43D9909D0A403AAB00E28AA2 /* ossimMgrs.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D9885D0A403AA900E28AA2 /* ossimMgrs.c */; };
-		43D9909F0A403AAB00E28AA2 /* ossimMillerProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9885F0A403AA900E28AA2 /* ossimMillerProjection.cpp */; };
-		43D990A10A403AAB00E28AA2 /* ossimMiscProjectionFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988610A403AA900E28AA2 /* ossimMiscProjectionFactory.cpp */; };
-		43D990A30A403AAB00E28AA2 /* ossimMollweidProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988630A403AA900E28AA2 /* ossimMollweidProjection.cpp */; };
-		43D990A50A403AAB00E28AA2 /* ossimNewZealandMapGridProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988650A403AA900E28AA2 /* ossimNewZealandMapGridProjection.cpp */; };
-		43D990A70A403AAB00E28AA2 /* ossimNitfMapModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988670A403AA900E28AA2 /* ossimNitfMapModel.cpp */; };
-		43D990A90A403AAB00E28AA2 /* ossimNitfProjectionFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988690A403AA900E28AA2 /* ossimNitfProjectionFactory.cpp */; };
-		43D990AB0A403AAB00E28AA2 /* ossimNitfRpcModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9886B0A403AA900E28AA2 /* ossimNitfRpcModel.cpp */; };
-		43D990AD0A403AAB00E28AA2 /* ossimObliqueMercatorProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9886D0A403AA900E28AA2 /* ossimObliqueMercatorProjection.cpp */; };
-		43D990AF0A403AAB00E28AA2 /* ossimOptimizableProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9886F0A403AA900E28AA2 /* ossimOptimizableProjection.cpp */; };
-		43D990B10A403AAB00E28AA2 /* ossimOrthoGraphicProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988710A403AA900E28AA2 /* ossimOrthoGraphicProjection.cpp */; };
-		43D990B30A403AAB00E28AA2 /* ossimPcsCodeProjectionFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988730A403AA900E28AA2 /* ossimPcsCodeProjectionFactory.cpp */; };
-		43D990B50A403AAB00E28AA2 /* ossimPolarStereoProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988750A403AA900E28AA2 /* ossimPolarStereoProjection.cpp */; };
-		43D990B70A403AAC00E28AA2 /* ossimPolarst.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D988770A403AA900E28AA2 /* ossimPolarst.c */; };
-		43D990B90A403AAC00E28AA2 /* ossimPolyconicProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988790A403AA900E28AA2 /* ossimPolyconicProjection.cpp */; };
-		43D990BB0A403AAC00E28AA2 /* ossimPolynomProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9887B0A403AA900E28AA2 /* ossimPolynomProjection.cpp */; };
-		43D990BD0A403AAC00E28AA2 /* ossimProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9887D0A403AA900E28AA2 /* ossimProjection.cpp */; };
-		43D990BF0A403AAC00E28AA2 /* ossimProjectionFactoryBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9887F0A403AA900E28AA2 /* ossimProjectionFactoryBase.cpp */; };
-		43D990C10A403AAC00E28AA2 /* ossimProjectionFactoryRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988810A403AA900E28AA2 /* ossimProjectionFactoryRegistry.cpp */; };
-		43D990C30A403AAC00E28AA2 /* ossimProjectionViewControllerFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988830A403AA900E28AA2 /* ossimProjectionViewControllerFactory.cpp */; };
-		43D990C50A403AAC00E28AA2 /* ossimQuadProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988850A403AA900E28AA2 /* ossimQuadProjection.cpp */; };
-		43D990C70A403AAC00E28AA2 /* ossimQuickbirdRpcModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988870A403AA900E28AA2 /* ossimQuickbirdRpcModel.cpp */; };
-		43D990C90A403AAC00E28AA2 /* ossimRadialDecentLensDistortion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988890A403AA900E28AA2 /* ossimRadialDecentLensDistortion.cpp */; };
-		43D990CB0A403AAC00E28AA2 /* ossimRpcModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9888B0A403AA900E28AA2 /* ossimRpcModel.cpp */; };
-		43D990CD0A403AAC00E28AA2 /* ossimRpcProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9888D0A403AA900E28AA2 /* ossimRpcProjection.cpp */; };
-		43D990CF0A403AAC00E28AA2 /* ossimRpcSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9888F0A403AA900E28AA2 /* ossimRpcSolver.cpp */; };
-		43D990D10A403AAC00E28AA2 /* ossimSensorModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988910A403AA900E28AA2 /* ossimSensorModel.cpp */; };
-		43D990D30A403AAC00E28AA2 /* ossimSensorModelFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988930A403AA900E28AA2 /* ossimSensorModelFactory.cpp */; };
-		43D990D50A403AAC00E28AA2 /* ossimSinusoid.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D988950A403AA900E28AA2 /* ossimSinusoid.c */; };
-		43D990D70A403AAC00E28AA2 /* ossimSinusoidalProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988970A403AA900E28AA2 /* ossimSinusoidalProjection.cpp */; };
-		43D990D90A403AAC00E28AA2 /* ossimSpaceObliqueMercatorProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988990A403AA900E28AA2 /* ossimSpaceObliqueMercatorProjection.cpp */; };
-		43D990DB0A403AAC00E28AA2 /* ossimSpot5Model.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9889B0A403AA900E28AA2 /* ossimSpot5Model.cpp */; };
-		43D990DD0A403AAC00E28AA2 /* ossimSrsProjectionFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9889D0A403AA900E28AA2 /* ossimSrsProjectionFactory.cpp */; };
-		43D990DF0A403AAC00E28AA2 /* ossimStatePlaneProjectionFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9889F0A403AA900E28AA2 /* ossimStatePlaneProjectionFactory.cpp */; };
-		43D990E10A403AAC00E28AA2 /* ossimStatePlaneProjectionInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988A10A403AA900E28AA2 /* ossimStatePlaneProjectionInfo.cpp */; };
-		43D990E30A403AAC00E28AA2 /* ossimStereographicProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988A30A403AA900E28AA2 /* ossimStereographicProjection.cpp */; };
-		43D990E50A403AAC00E28AA2 /* ossimTiffProjectionFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988A50A403AA900E28AA2 /* ossimTiffProjectionFactory.cpp */; };
-		43D990E70A403AAC00E28AA2 /* ossimTranmerc.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D988A70A403AA900E28AA2 /* ossimTranmerc.c */; };
-		43D990E90A403AAC00E28AA2 /* ossimTransCylEquAreaProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988A90A403AA900E28AA2 /* ossimTransCylEquAreaProjection.cpp */; };
-		43D990EB0A403AAC00E28AA2 /* ossimTransMercatorProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988AB0A403AA900E28AA2 /* ossimTransMercatorProjection.cpp */; };
-		43D990ED0A403AAC00E28AA2 /* ossimUps.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D988AD0A403AA900E28AA2 /* ossimUps.c */; };
-		43D990EF0A403AAC00E28AA2 /* ossimUpsProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988AF0A403AA900E28AA2 /* ossimUpsProjection.cpp */; };
-		43D990F10A403AAC00E28AA2 /* ossimUpspt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988B10A403AA900E28AA2 /* ossimUpspt.cpp */; };
-		43D990F30A403AAC00E28AA2 /* ossimUtm.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D988B30A403AA900E28AA2 /* ossimUtm.c */; };
-		43D990F50A403AAC00E28AA2 /* ossimUtmProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988B50A403AA900E28AA2 /* ossimUtmProjection.cpp */; };
-		43D990F70A403AAC00E28AA2 /* ossimUtmpt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988B70A403AA900E28AA2 /* ossimUtmpt.cpp */; };
-		43D990F90A403AAC00E28AA2 /* ossimVanDerGrintenProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988B90A403AA900E28AA2 /* ossimVanDerGrintenProjection.cpp */; };
-		43D990FB0A403AAC00E28AA2 /* ossimWarpProjection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D988BB0A403AA900E28AA2 /* ossimWarpProjection.cpp */; };
-		43D991710A403AAC00E28AA2 /* ossimAigBounds.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989330A403AA900E28AA2 /* ossimAigBounds.cpp */; };
-		43D991730A403AAC00E28AA2 /* ossimAigDataFileHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989350A403AA900E28AA2 /* ossimAigDataFileHeader.cpp */; };
-		43D991750A403AAC00E28AA2 /* ossimAigHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989370A403AA900E28AA2 /* ossimAigHeader.cpp */; };
-		43D991770A403AAC00E28AA2 /* ossimAigIndexFileHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989390A403AA900E28AA2 /* ossimAigIndexFileHeader.cpp */; };
-		43D991790A403AAC00E28AA2 /* ossimAigStatistics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9893B0A403AA900E28AA2 /* ossimAigStatistics.cpp */; };
-		43D9917B0A403AAC00E28AA2 /* ossimApplanixEOFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9893D0A403AA900E28AA2 /* ossimApplanixEOFile.cpp */; };
-		43D9917D0A403AAC00E28AA2 /* ossimDemGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9893F0A403AA900E28AA2 /* ossimDemGrid.cpp */; };
-		43D9917F0A403AAC00E28AA2 /* ossimDemHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989410A403AA900E28AA2 /* ossimDemHeader.cpp */; };
-		43D991810A403AAC00E28AA2 /* ossimDemPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989430A403AA900E28AA2 /* ossimDemPoint.cpp */; };
-		43D991830A403AAC00E28AA2 /* ossimDemProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989450A403AA900E28AA2 /* ossimDemProfile.cpp */; };
-		43D991850A403AAC00E28AA2 /* ossimDemStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989470A403AA900E28AA2 /* ossimDemStats.cpp */; };
-		43D991870A403AAC00E28AA2 /* ossimDemUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989490A403AA900E28AA2 /* ossimDemUtil.cpp */; };
-		43D991890A403AAC00E28AA2 /* ossimDoqq.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9894B0A403AA900E28AA2 /* ossimDoqq.cpp */; };
-		43D9918B0A403AAC00E28AA2 /* ossimDtedAcc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9894D0A403AA900E28AA2 /* ossimDtedAcc.cpp */; };
-		43D9918D0A403AAC00E28AA2 /* ossimDtedDsi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9894F0A403AA900E28AA2 /* ossimDtedDsi.cpp */; };
-		43D9918F0A403AAC00E28AA2 /* ossimDtedHdr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989510A403AA900E28AA2 /* ossimDtedHdr.cpp */; };
-		43D991910A403AAC00E28AA2 /* ossimDtedRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989530A403AA900E28AA2 /* ossimDtedRecord.cpp */; };
-		43D991930A403AAC00E28AA2 /* ossimDtedUhl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989550A403AA900E28AA2 /* ossimDtedUhl.cpp */; };
-		43D991950A403AAC00E28AA2 /* ossimDtedVol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989570A403AA900E28AA2 /* ossimDtedVol.cpp */; };
-		43D991970A403AAC00E28AA2 /* ossimERS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989590A403AA900E28AA2 /* ossimERS.cpp */; };
-		43D991990A403AAC00E28AA2 /* ossimEnviHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9895B0A403AA900E28AA2 /* ossimEnviHeader.cpp */; };
-		43D9919B0A403AAC00E28AA2 /* ossimFfL5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9895D0A403AA900E28AA2 /* ossimFfL5.cpp */; };
-		43D9919D0A403AAC00E28AA2 /* ossimFfL7.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9895F0A403AA900E28AA2 /* ossimFfL7.cpp */; };
-		43D9919F0A403AAC00E28AA2 /* ossimFfRevb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989610A403AA900E28AA2 /* ossimFfRevb.cpp */; };
-		43D991A10A403AAC00E28AA2 /* ossimFfRevc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989630A403AA900E28AA2 /* ossimFfRevc.cpp */; };
-		43D991A30A403AAC00E28AA2 /* ossimGeoTiff.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989650A403AA900E28AA2 /* ossimGeoTiff.cpp */; };
-		43D991A50A403AAC00E28AA2 /* ossimIkonosMetaData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989670A403AA900E28AA2 /* ossimIkonosMetaData.cpp */; };
-		43D991A70A403AAC00E28AA2 /* ossimNitfBlockaTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989690A403AA900E28AA2 /* ossimNitfBlockaTag.cpp */; };
-		43D991A90A403AAC00E28AA2 /* ossimNitfCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9896B0A403AA900E28AA2 /* ossimNitfCommon.cpp */; };
-		43D991AB0A403AAC00E28AA2 /* ossimNitfCompressionHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9896D0A403AA900E28AA2 /* ossimNitfCompressionHeader.cpp */; };
-		43D991AD0A403AAC00E28AA2 /* ossimNitfDataExtensionSegment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9896F0A403AA900E28AA2 /* ossimNitfDataExtensionSegment.cpp */; };
-		43D991AF0A403AAC00E28AA2 /* ossimNitfDataExtensionSegmentV2_0.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989710A403AA900E28AA2 /* ossimNitfDataExtensionSegmentV2_0.cpp */; };
-		43D991B10A403AAC00E28AA2 /* ossimNitfEmbeddedRpfDes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989730A403AA900E28AA2 /* ossimNitfEmbeddedRpfDes.cpp */; };
-		43D991B30A403AAC00E28AA2 /* ossimNitfEmbeddedRpfHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989750A403AA900E28AA2 /* ossimNitfEmbeddedRpfHeader.cpp */; };
-		43D991B50A403AAC00E28AA2 /* ossimNitfFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989770A403AA900E28AA2 /* ossimNitfFile.cpp */; };
-		43D991B70A403AAC00E28AA2 /* ossimNitfFileHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989790A403AA900E28AA2 /* ossimNitfFileHeader.cpp */; };
-		43D991B90A403AAC00E28AA2 /* ossimNitfFileHeaderV2_0.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9897B0A403AA900E28AA2 /* ossimNitfFileHeaderV2_0.cpp */; };
-		43D991BB0A403AAC00E28AA2 /* ossimNitfFileHeaderV2_1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9897D0A403AA900E28AA2 /* ossimNitfFileHeaderV2_1.cpp */; };
-		43D991BD0A403AAC00E28AA2 /* ossimNitfFileHeaderV2_X.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9897F0A403AA900E28AA2 /* ossimNitfFileHeaderV2_X.cpp */; };
-		43D991BF0A403AAC00E28AA2 /* ossimNitfGeoPositioningTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989810A403AA900E28AA2 /* ossimNitfGeoPositioningTag.cpp */; };
-		43D991C10A403AAC00E28AA2 /* ossimNitfIchipbTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989830A403AA900E28AA2 /* ossimNitfIchipbTag.cpp */; };
-		43D991C30A403AAC00E28AA2 /* ossimNitfImageBand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989850A403AA900E28AA2 /* ossimNitfImageBand.cpp */; };
-		43D991C50A403AAC00E28AA2 /* ossimNitfImageBandV2_0.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989870A403AA900E28AA2 /* ossimNitfImageBandV2_0.cpp */; };
-		43D991C70A403AAC00E28AA2 /* ossimNitfImageBandV2_1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989890A403AA900E28AA2 /* ossimNitfImageBandV2_1.cpp */; };
-		43D991C90A403AAC00E28AA2 /* ossimNitfImageHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9898B0A403AA900E28AA2 /* ossimNitfImageHeader.cpp */; };
-		43D991CB0A403AAC00E28AA2 /* ossimNitfImageHeaderV2_0.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9898D0A403AA900E28AA2 /* ossimNitfImageHeaderV2_0.cpp */; };
-		43D991CD0A403AAC00E28AA2 /* ossimNitfImageHeaderV2_1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9898F0A403AA900E28AA2 /* ossimNitfImageHeaderV2_1.cpp */; };
-		43D991CF0A403AAC00E28AA2 /* ossimNitfImageHeaderV2_X.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989910A403AA900E28AA2 /* ossimNitfImageHeaderV2_X.cpp */; };
-		43D991D10A403AAC00E28AA2 /* ossimNitfImageLut.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989930A403AA900E28AA2 /* ossimNitfImageLut.cpp */; };
-		43D991D30A403AAC00E28AA2 /* ossimNitfImageLutV2_0.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989950A403AA900E28AA2 /* ossimNitfImageLutV2_0.cpp */; };
-		43D991D50A403AAC00E28AA2 /* ossimNitfImageLutV2_1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989970A403AA900E28AA2 /* ossimNitfImageLutV2_1.cpp */; };
-		43D991D70A403AAC00E28AA2 /* ossimNitfLabelHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989990A403AA900E28AA2 /* ossimNitfLabelHeader.cpp */; };
-		43D991D90A403AAC00E28AA2 /* ossimNitfLabelHeaderV2_0.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9899B0A403AA900E28AA2 /* ossimNitfLabelHeaderV2_0.cpp */; };
-		43D991DB0A403AAC00E28AA2 /* ossimNitfLocalCartographicTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9899D0A403AA900E28AA2 /* ossimNitfLocalCartographicTag.cpp */; };
-		43D991DD0A403AAC00E28AA2 /* ossimNitfLocalGeographicTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9899F0A403AA900E28AA2 /* ossimNitfLocalGeographicTag.cpp */; };
-		43D991DF0A403AAC00E28AA2 /* ossimNitfNameConversionTables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989A10A403AA900E28AA2 /* ossimNitfNameConversionTables.cpp */; };
-		43D991E10A403AAC00E28AA2 /* ossimNitfPiaimcTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989A30A403AA900E28AA2 /* ossimNitfPiaimcTag.cpp */; };
-		43D991E30A403AAC00E28AA2 /* ossimNitfProjectionParameterTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989A50A403AA900E28AA2 /* ossimNitfProjectionParameterTag.cpp */; };
-		43D991E50A403AAC00E28AA2 /* ossimNitfRegisteredTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989A70A403AAA00E28AA2 /* ossimNitfRegisteredTag.cpp */; };
-		43D991E70A403AAC00E28AA2 /* ossimNitfRegisteredTagFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989A90A403AAA00E28AA2 /* ossimNitfRegisteredTagFactory.cpp */; };
-		43D991E90A403AAC00E28AA2 /* ossimNitfRpcATag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989AB0A403AAA00E28AA2 /* ossimNitfRpcATag.cpp */; };
-		43D991EB0A403AAC00E28AA2 /* ossimNitfRpcBTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989AD0A403AAA00E28AA2 /* ossimNitfRpcBTag.cpp */; };
-		43D991ED0A403AAC00E28AA2 /* ossimNitfRpcBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989AF0A403AAA00E28AA2 /* ossimNitfRpcBase.cpp */; };
-		43D991EF0A403AAC00E28AA2 /* ossimNitfRpfTagFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989B10A403AAA00E28AA2 /* ossimNitfRpfTagFactory.cpp */; };
-		43D991F10A403AAC00E28AA2 /* ossimNitfSensraTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989B30A403AAA00E28AA2 /* ossimNitfSensraTag.cpp */; };
-		43D991F30A403AAC00E28AA2 /* ossimNitfStdidcTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989B50A403AAA00E28AA2 /* ossimNitfStdidcTag.cpp */; };
-		43D991F50A403AAC00E28AA2 /* ossimNitfSymbolHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989B70A403AAA00E28AA2 /* ossimNitfSymbolHeader.cpp */; };
-		43D991F70A403AAC00E28AA2 /* ossimNitfSymbolHeaderV2_0.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989B90A403AAA00E28AA2 /* ossimNitfSymbolHeaderV2_0.cpp */; };
-		43D991F90A403AAC00E28AA2 /* ossimNitfTagFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989BB0A403AAA00E28AA2 /* ossimNitfTagFactory.cpp */; };
-		43D991FB0A403AAC00E28AA2 /* ossimNitfTagFactoryRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989BD0A403AAA00E28AA2 /* ossimNitfTagFactoryRegistry.cpp */; };
-		43D991FD0A403AAC00E28AA2 /* ossimNitfTagInformation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989BF0A403AAA00E28AA2 /* ossimNitfTagInformation.cpp */; };
-		43D991FF0A403AAC00E28AA2 /* ossimNitfTextHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989C10A403AAA00E28AA2 /* ossimNitfTextHeader.cpp */; };
-		43D992010A403AAC00E28AA2 /* ossimNitfTextHeaderV2_0.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989C30A403AAA00E28AA2 /* ossimNitfTextHeaderV2_0.cpp */; };
-		43D992030A403AAC00E28AA2 /* ossimNitfUnknownTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989C50A403AAA00E28AA2 /* ossimNitfUnknownTag.cpp */; };
-		43D992050A403AAC00E28AA2 /* ossimNitfUse00aTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989C70A403AAA00E28AA2 /* ossimNitfUse00aTag.cpp */; };
-		43D992070A403AAC00E28AA2 /* ossimNitfVqCompressionHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989C90A403AAA00E28AA2 /* ossimNitfVqCompressionHeader.cpp */; };
-		43D992090A403AAC00E28AA2 /* ossimQuickbirdRpcHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989CB0A403AAA00E28AA2 /* ossimQuickbirdRpcHeader.cpp */; };
-		43D9920B0A403AAC00E28AA2 /* ossimQuickbirdTile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989CD0A403AAA00E28AA2 /* ossimQuickbirdTile.cpp */; };
-		43D9920D0A403AAC00E28AA2 /* ossimRpfAttributeOffsetRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989CF0A403AAA00E28AA2 /* ossimRpfAttributeOffsetRecord.cpp */; };
-		43D9920F0A403AAC00E28AA2 /* ossimRpfAttributeSectionSubheader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989D10A403AAA00E28AA2 /* ossimRpfAttributeSectionSubheader.cpp */; };
-		43D992110A403AAC00E28AA2 /* ossimRpfAttributes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989D30A403AAA00E28AA2 /* ossimRpfAttributes.cpp */; };
-		43D992130A403AAC00E28AA2 /* ossimRpfBoundaryRectRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989D50A403AAA00E28AA2 /* ossimRpfBoundaryRectRecord.cpp */; };
-		43D992150A403AAC00E28AA2 /* ossimRpfBoundaryRectSectionSubheader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989D70A403AAA00E28AA2 /* ossimRpfBoundaryRectSectionSubheader.cpp */; };
-		43D992170A403AAC00E28AA2 /* ossimRpfBoundaryRectTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989D90A403AAA00E28AA2 /* ossimRpfBoundaryRectTable.cpp */; };
-		43D992190A403AAC00E28AA2 /* ossimRpfColorConverterOffsetRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989DB0A403AAA00E28AA2 /* ossimRpfColorConverterOffsetRecord.cpp */; };
-		43D9921B0A403AAC00E28AA2 /* ossimRpfColorConverterSubsection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989DD0A403AAA00E28AA2 /* ossimRpfColorConverterSubsection.cpp */; };
-		43D9921D0A403AAC00E28AA2 /* ossimRpfColorConverterTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989DF0A403AAA00E28AA2 /* ossimRpfColorConverterTable.cpp */; };
-		43D9921F0A403AAC00E28AA2 /* ossimRpfColorGrayscaleOffsetRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989E10A403AAA00E28AA2 /* ossimRpfColorGrayscaleOffsetRecord.cpp */; };
-		43D992210A403AAC00E28AA2 /* ossimRpfColorGrayscaleSubheader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989E30A403AAA00E28AA2 /* ossimRpfColorGrayscaleSubheader.cpp */; };
-		43D992230A403AAC00E28AA2 /* ossimRpfColorGrayscaleTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989E50A403AAA00E28AA2 /* ossimRpfColorGrayscaleTable.cpp */; };
-		43D992250A403AAC00E28AA2 /* ossimRpfCompressionLookupOffsetRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989E70A403AAA00E28AA2 /* ossimRpfCompressionLookupOffsetRecord.cpp */; };
-		43D992270A403AAC00E28AA2 /* ossimRpfCompressionSection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989E90A403AAA00E28AA2 /* ossimRpfCompressionSection.cpp */; };
-		43D992290A403AAC00E28AA2 /* ossimRpfCompressionSectionSubheader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989EB0A403AAA00E28AA2 /* ossimRpfCompressionSectionSubheader.cpp */; };
-		43D9922B0A403AAC00E28AA2 /* ossimRpfCoverageSection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989ED0A403AAA00E28AA2 /* ossimRpfCoverageSection.cpp */; };
-		43D9922D0A403AAC00E28AA2 /* ossimRpfFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989EF0A403AAA00E28AA2 /* ossimRpfFrame.cpp */; };
-		43D9922F0A403AAC00E28AA2 /* ossimRpfFrameEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989F10A403AAA00E28AA2 /* ossimRpfFrameEntry.cpp */; };
-		43D992310A403AAC00E28AA2 /* ossimRpfFrameFileIndexRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989F30A403AAA00E28AA2 /* ossimRpfFrameFileIndexRecord.cpp */; };
-		43D992330A403AAC00E28AA2 /* ossimRpfFrameFileIndexSectionSubheader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989F50A403AAA00E28AA2 /* ossimRpfFrameFileIndexSectionSubheader.cpp */; };
-		43D992350A403AAC00E28AA2 /* ossimRpfFrameFileIndexSubsection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989F70A403AAA00E28AA2 /* ossimRpfFrameFileIndexSubsection.cpp */; };
-		43D992370A403AAC00E28AA2 /* ossimRpfFrameFileReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989F90A403AAA00E28AA2 /* ossimRpfFrameFileReader.cpp */; };
-		43D992390A403AAC00E28AA2 /* ossimRpfHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989FB0A403AAA00E28AA2 /* ossimRpfHeader.cpp */; };
-		43D9923B0A403AAC00E28AA2 /* ossimRpfImageDescriptionSubheader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989FD0A403AAA00E28AA2 /* ossimRpfImageDescriptionSubheader.cpp */; };
-		43D9923D0A403AAC00E28AA2 /* ossimRpfImageDisplayParameterSubheader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D989FF0A403AAA00E28AA2 /* ossimRpfImageDisplayParameterSubheader.cpp */; };
-		43D9923F0A403AAC00E28AA2 /* ossimRpfLocationSection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A010A403AAA00E28AA2 /* ossimRpfLocationSection.cpp */; };
-		43D992410A403AAC00E28AA2 /* ossimRpfMaskSubheader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A030A403AAA00E28AA2 /* ossimRpfMaskSubheader.cpp */; };
-		43D992430A403AAC00E28AA2 /* ossimRpfMaskSubsection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A050A403AAA00E28AA2 /* ossimRpfMaskSubsection.cpp */; };
-		43D992450A403AAC00E28AA2 /* ossimRpfPathnameRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A070A403AAA00E28AA2 /* ossimRpfPathnameRecord.cpp */; };
-		43D992470A403AAC00E28AA2 /* ossimRpfToc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A090A403AAA00E28AA2 /* ossimRpfToc.cpp */; };
-		43D992490A403AAC00E28AA2 /* ossimRpfTocEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A0B0A403AAA00E28AA2 /* ossimRpfTocEntry.cpp */; };
-		43D9924B0A403AAC00E28AA2 /* ossimSpaceImagingGeom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A0D0A403AAA00E28AA2 /* ossimSpaceImagingGeom.cpp */; };
-		43D9924D0A403AAC00E28AA2 /* ossimSpotDimapSupportData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A0F0A403AAA00E28AA2 /* ossimSpotDimapSupportData.cpp */; };
-		43D9924F0A403AAC00E28AA2 /* ossimSrtmFilename.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A110A403AAA00E28AA2 /* ossimSrtmFilename.cpp */; };
-		43D992510A403AAC00E28AA2 /* ossimSrtmSupportData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A130A403AAA00E28AA2 /* ossimSrtmSupportData.cpp */; };
-		43D992530A403AAC00E28AA2 /* ossimTiffWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A150A403AAA00E28AA2 /* ossimTiffWorld.cpp */; };
-		43D9926D0A403AAC00E28AA2 /* ossimVpfBoundingRecordTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A310A403AAA00E28AA2 /* ossimVpfBoundingRecordTable.cpp */; };
-		43D9926F0A403AAC00E28AA2 /* ossimVpfCoverage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A330A403AAA00E28AA2 /* ossimVpfCoverage.cpp */; };
-		43D992710A403AAC00E28AA2 /* ossimVpfDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A350A403AAA00E28AA2 /* ossimVpfDatabase.cpp */; };
-		43D992730A403AAC00E28AA2 /* ossimVpfDatabaseHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A370A403AAA00E28AA2 /* ossimVpfDatabaseHeader.cpp */; };
-		43D992750A403AAC00E28AA2 /* ossimVpfDatabaseHeaderTableValidator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A390A403AAA00E28AA2 /* ossimVpfDatabaseHeaderTableValidator.cpp */; };
-		43D992770A403AAC00E28AA2 /* ossimVpfExtent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A3B0A403AAA00E28AA2 /* ossimVpfExtent.cpp */; };
-		43D992790A403AAC00E28AA2 /* ossimVpfFeatureClass.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A3D0A403AAA00E28AA2 /* ossimVpfFeatureClass.cpp */; };
-		43D9927B0A403AAC00E28AA2 /* ossimVpfFeatureClassSchema.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A3F0A403AAA00E28AA2 /* ossimVpfFeatureClassSchema.cpp */; };
-		43D9927D0A403AAC00E28AA2 /* ossimVpfLibrary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A410A403AAA00E28AA2 /* ossimVpfLibrary.cpp */; };
-		43D9927F0A403AAC00E28AA2 /* ossimVpfLibraryAttributeTableValidator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A430A403AAA00E28AA2 /* ossimVpfLibraryAttributeTableValidator.cpp */; };
-		43D992810A403AAC00E28AA2 /* ossimVpfTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A450A403AAA00E28AA2 /* ossimVpfTable.cpp */; };
-		43D9929F0A403AAC00E28AA2 /* bitarray.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A650A403AAA00E28AA2 /* bitarray.c */; };
-		43D992A10A403AAC00E28AA2 /* distance.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A670A403AAA00E28AA2 /* distance.c */; };
-		43D992A30A403AAC00E28AA2 /* linklist.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A690A403AAA00E28AA2 /* linklist.c */; };
-		43D992A50A403AAC00E28AA2 /* polygrf.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A6B0A403AAA00E28AA2 /* polygrf.c */; };
-		43D992A70A403AAC00E28AA2 /* set.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A6D0A403AAA00E28AA2 /* set.c */; };
-		43D992A90A403AAC00E28AA2 /* vpfclip.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A6F0A403AAA00E28AA2 /* vpfclip.c */; };
-		43D992AB0A403AAC00E28AA2 /* vpfcntnt.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A710A403AAA00E28AA2 /* vpfcntnt.c */; };
-		43D992AD0A403AAC00E28AA2 /* vpfdict.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A730A403AAA00E28AA2 /* vpfdict.c */; };
-		43D992AF0A403AAC00E28AA2 /* vpfdisp.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A750A403AAA00E28AA2 /* vpfdisp.c */; };
-		43D992B10A403AAC00E28AA2 /* vpfdraw.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A770A403AAA00E28AA2 /* vpfdraw.c */; };
-		43D992B30A403AAC00E28AA2 /* vpfmisc.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A790A403AAA00E28AA2 /* vpfmisc.c */; };
-		43D992B50A403AAC00E28AA2 /* vpfnear.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A7B0A403AAA00E28AA2 /* vpfnear.c */; };
-		43D992B70A403AAC00E28AA2 /* vpfprim.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A7D0A403AAA00E28AA2 /* vpfprim.c */; };
-		43D992B90A403AAC00E28AA2 /* vpfptply.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A7F0A403AAA00E28AA2 /* vpfptply.c */; };
-		43D992BB0A403AAC00E28AA2 /* vpfquery.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A810A403AAA00E28AA2 /* vpfquery.c */; };
-		43D992BD0A403AAC00E28AA2 /* vpfread.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A830A403AAA00E28AA2 /* vpfread.c */; };
-		43D992BF0A403AAC00E28AA2 /* vpfrelat.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A850A403AAA00E28AA2 /* vpfrelat.c */; };
-		43D992C10A403AAC00E28AA2 /* vpfselec.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A870A403AAA00E28AA2 /* vpfselec.c */; };
-		43D992C30A403AAC00E28AA2 /* vpfspx.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A890A403AAA00E28AA2 /* vpfspx.c */; };
-		43D992C50A403AAC00E28AA2 /* vpftable.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A8B0A403AAA00E28AA2 /* vpftable.c */; };
-		43D992C70A403AAC00E28AA2 /* vpftidx.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A8D0A403AAA00E28AA2 /* vpftidx.c */; };
-		43D992C90A403AAC00E28AA2 /* vpfwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = 43D98A8F0A403AAA00E28AA2 /* vpfwrite.c */; };
-		43D9C405109F443000BA9119 /* ossimVirtualOverviewBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9C404109F443000BA9119 /* ossimVirtualOverviewBuilder.cpp */; };
-		43D9C421109F445000BA9119 /* ossimVirtualImageWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9C41E109F445000BA9119 /* ossimVirtualImageWriter.cpp */; };
-		43D9C423109F445000BA9119 /* ossimVirtualImageHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43D9C420109F445000BA9119 /* ossimVirtualImageHandler.cpp */; };
-		43E215680E91139B00D67CB8 /* ossimNitf20Writer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43E215670E91139B00D67CB8 /* ossimNitf20Writer.cpp */; };
-		43E65CEC104D85BD0027BB2C /* ossimDemInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43E65CEB104D85BD0027BB2C /* ossimDemInfo.cpp */; };
-		43EDA3DA107247CB007D1913 /* ossimNormalizedS16RemapTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43EDA3D9107247CB007D1913 /* ossimNormalizedS16RemapTable.cpp */; };
-		43F67F110A5415DC00B88295 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43F67F100A5415DC00B88295 /* CoreServices.framework */; };
-		43F67FA70A54161000B88295 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43F67FA60A54161000B88295 /* ApplicationServices.framework */; };
-		43F8A5750FDEF43200FF4F40 /* ossimJ2kSizRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43F8A5700FDEF43200FF4F40 /* ossimJ2kSizRecord.cpp */; };
-		43F8A5760FDEF43200FF4F40 /* ossimJ2kSotRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43F8A5710FDEF43200FF4F40 /* ossimJ2kSotRecord.cpp */; };
-		43F8A5770FDEF43200FF4F40 /* ossimNitfAcftbTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43F8A5720FDEF43200FF4F40 /* ossimNitfAcftbTag.cpp */; };
-		43F8A5780FDEF43200FF4F40 /* ossimNitfAimidbTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43F8A5730FDEF43200FF4F40 /* ossimNitfAimidbTag.cpp */; };
-		43F8A5790FDEF43200FF4F40 /* ossimNitfMstgtaTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43F8A5740FDEF43200FF4F40 /* ossimNitfMstgtaTag.cpp */; };
-		8D07F2C00486CC7A007CD1D0 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
-		EE056A2A0CFFA64E005D6F2F /* ossimDatumFactoryRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE056A290CFFA64E005D6F2F /* ossimDatumFactoryRegistry.cpp */; };
-		EE3F66F00AF7D8D4000507C9 /* ossimHgtRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE3F66EF0AF7D8D4000507C9 /* ossimHgtRef.cpp */; };
-		EE3F66F20AF7D8F3000507C9 /* ossimSensorModelTuple.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE3F66F10AF7D8F3000507C9 /* ossimSensorModelTuple.cpp */; };
-		EE592C1C0BF3F8C200E4B15C /* ossimJpegMemSrc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE592C1B0BF3F8C200E4B15C /* ossimJpegMemSrc.cpp */; };
-		EE6F82880BE674DA0090E263 /* ossimWms.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE6F82870BE674DA0090E263 /* ossimWms.cpp */; };
-		EE7206290B64F69000DE8AE9 /* ossimERSFileWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE7206280B64F69000DE8AE9 /* ossimERSFileWriter.cpp */; };
-		EE7B58E20E3DEBC80039A805 /* ossimTwoColorView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE7B58E10E3DEBC80039A805 /* ossimTwoColorView.cpp */; };
-		EE8D7CBF0C0E5BF800D2C0D1 /* ossimException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EE8D7CBE0C0E5BF800D2C0D1 /* ossimException.cpp */; };
-		EEDECAE30E36724500F52278 /* ossimImageProjectionModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEDECAE20E36724500F52278 /* ossimImageProjectionModel.cpp */; };
-		EEDECAE50E36724F00F52278 /* ossimImageModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EEDECAE40E36724F00F52278 /* ossimImageModel.cpp */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXContainerItemProxy section */
-		186248DC0B1F7FD20021FDF7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 186EEC8A0B1CDAB300F7886A /* ossim_qt.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 186248D50B1F7FB40021FDF7;
-			remoteInfo = iview;
-		};
-		186EEC8E0B1CDAB300F7886A /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 186EEC8A0B1CDAB300F7886A /* ossim_qt.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 8D07F2C80486CC7A007CD1D0;
-			remoteInfo = ossim_qt;
-		};
-		186EFA8F0B1F3C7300F7886A /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 186EFA820B1F3C1500F7886A;
-			remoteInfo = build_plugins;
-		};
-		186EFAF10B1F5B3700F7886A /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 186EEC8A0B1CDAB300F7886A /* ossim_qt.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 186EFAE80B1F5B1900F7886A;
-			remoteInfo = imagelinker;
-		};
-		1886E0D70B1BE9F700D0E4E6 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 1886E0D30B1BE9F700D0E4E6 /* libwms.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 8DC2EF5B0486A6940098B216;
-			remoteInfo = libwms;
-		};
-		4301322D104EE2F8009BF7EC /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 186EF5990B1CE41300F7886A /* ossimPlanet.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = 43C6E2900FEFB4D8004B52F7;
-			remoteInfo = ossimplanetklv;
-		};
-		4310B424110A0B0500C258B9 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = EEFE08CC0D61D97E008454CA /* ossim_qt4.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = 183117D80D07186A002B026F;
-			remoteInfo = All;
-		};
-		4310B426110A0B1700C258B9 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 43081DB20BD3BE67001238BA;
-			remoteInfo = setup_links;
-		};
-		4310B428110A0B3100C258B9 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = EE05E7AC0E24FF02005A64BC;
-			remoteInfo = build_core_frameworks;
-		};
-		4310B42A110A0B5A00C258B9 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = EEFE08CC0D61D97E008454CA /* ossim_qt4.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
-			remoteInfo = ossimQt;
-		};
-		4310B42C110A0B7200C258B9 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = EEFE08CC0D61D97E008454CA /* ossim_qt4.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = 18A6B0760D00436C00F3A329;
-			remoteInfo = iView;
-		};
-		4310B42E110A0B7200C258B9 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = EEFE08CC0D61D97E008454CA /* ossim_qt4.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = 18A6B08F0D0043D000F3A329;
-			remoteInfo = ImageLinker;
-		};
-		4332DE0C113FEBA800F7059B /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 43398B711132B6BA0036A644 /* ossim_plugins.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = 43378DC010D021ED00ECC5AD;
-			remoteInfo = All;
-		};
-		433627FA1042E368002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		4336280D1042E3B0002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		4336282F1042E3F6002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		4336284D1042E461002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		4336286C1042E4AC002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		4336287E1042E4D1002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		433628971042E52A002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		433628B11042E560002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		433628CE1042E59C002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		433628E91042E5D1002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		433629031042E607002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		433629791042E712002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		433629951042E759002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		433629AD1042E77C002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		433629C81042E7B1002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		433629DC1042E807002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		43362A251042E88F002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		43362A431042E8BD002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		43362A5B1042E8EE002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		43362A751042E914002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		43362A921042E955002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		43362AAC1042E981002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		43362ACA1042EA43002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		43362AE71042EA81002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		43362B3F1042EB45002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		43362B5C1042EB70002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		43362B781042EB9B002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		43362B931042EBCE002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		43362BCA1042EC26002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		43362BE61042EC50002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		43362C001042EC80002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		43362C1A1042ECAF002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		43362C341042ECD6002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		43362C511042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 4336280B1042E3B0002A87C7;
-			remoteInfo = "ossim-adrg-dump";
-		};
-		43362C531042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 4336282D1042E3F6002A87C7;
-			remoteInfo = "ossim-applanix2ogeom";
-		};
-		43362C551042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 4336284B1042E461002A87C7;
-			remoteInfo = "ossim-band-merge";
-		};
-		43362C571042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 4336286A1042E4AC002A87C7;
-			remoteInfo = "ossim-btoa";
-		};
-		43362C591042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 4336287C1042E4D1002A87C7;
-			remoteInfo = "ossim-chgkwval";
-		};
-		43362C5B1042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 433628951042E52A002A87C7;
-			remoteInfo = "ossim-cmm";
-		};
-		43362C5D1042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 433628AF1042E560002A87C7;
-			remoteInfo = "ossim-computeSrtmStats";
-		};
-		43362C5F1042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 433628CC1042E59C002A87C7;
-			remoteInfo = "ossim-correl";
-		};
-		43362C611042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 433628E71042E5D1002A87C7;
-			remoteInfo = "ossim-create-cg";
-		};
-		43362C631042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 433629011042E607002A87C7;
-			remoteInfo = "ossim-create-histo";
-		};
-		43362C6B1042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 433629771042E712002A87C7;
-			remoteInfo = "ossim-dms2deg";
-		};
-		43362C6D1042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 433629931042E759002A87C7;
-			remoteInfo = "ossim-dump-ocg";
-		};
-		43362C6F1042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 433629AB1042E77C002A87C7;
-			remoteInfo = "ossim-ecg2ocg";
-		};
-		43362C711042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 433629C61042E7B1002A87C7;
-			remoteInfo = "ossim-extract-vertices";
-		};
-		43362C771042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 43362A231042E88F002A87C7;
-			remoteInfo = "ossim-height";
-		};
-		43362C791042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 43362A411042E8BD002A87C7;
-			remoteInfo = "ossim-icp";
-		};
-		43362C7B1042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 43362A591042E8EE002A87C7;
-			remoteInfo = "ossim-igen";
-		};
-		43362C7D1042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 43362A731042E914002A87C7;
-			remoteInfo = "ossim-img2md";
-		};
-		43362C7F1042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 43362A901042E955002A87C7;
-			remoteInfo = "ossim-img2rr";
-		};
-		43362C811042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 43362AAA1042E981002A87C7;
-			remoteInfo = "ossim-info";
-		};
-		43362C831042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 43362AC81042EA43002A87C7;
-			remoteInfo = "ossim-modopt";
-		};
-		43362C851042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 43362AE51042EA81002A87C7;
-			remoteInfo = "ossim-mosaic";
-		};
-		43362C8B1042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 43362B3D1042EB45002A87C7;
-			remoteInfo = "ossim-ogeom2ogeom";
-		};
-		43362C8D1042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 43362B5A1042EB70002A87C7;
-			remoteInfo = "ossim-orthoigen";
-		};
-		43362C8F1042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 43362B761042EB9B002A87C7;
-			remoteInfo = "ossim-pixelflip";
-		};
-		43362C911042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 43362B911042EBCE002A87C7;
-			remoteInfo = "ossim-prune";
-		};
-		43362C951042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 43362BC81042EC26002A87C7;
-			remoteInfo = "ossim-rejout";
-		};
-		43362C971042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 43362BE41042EC50002A87C7;
-			remoteInfo = "ossim-senint";
-		};
-		43362C991042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 43362BFE1042EC80002A87C7;
-			remoteInfo = "ossim-space-imaging";
-		};
-		43362C9B1042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 43362C181042ECAF002A87C7;
-			remoteInfo = "ossim-swapbytes";
-		};
-		43362C9D1042ED14002A87C7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 43362C321042ECD6002A87C7;
-			remoteInfo = "ossim-tfw2ogeom";
-		};
-		43398B831132B6BA0036A644 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 43398B711132B6BA0036A644 /* ossim_plugins.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 186EF86D0B1F184C00F7886A;
-			remoteInfo = ossimgdal_plugin;
-		};
-		43398B851132B6BA0036A644 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 43398B711132B6BA0036A644 /* ossim_plugins.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 186EF9820B1F222500F7886A;
-			remoteInfo = ossimreg_plugin;
-		};
-		43398B871132B6BA0036A644 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 43398B711132B6BA0036A644 /* ossim_plugins.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 186EFA1C0B1F321200F7886A;
-			remoteInfo = ossimworldwind_plugin;
-		};
-		43398B891132B6BA0036A644 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 43398B711132B6BA0036A644 /* ossim_plugins.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 186EFA5F0B1F394100F7886A;
-			remoteInfo = ossimnui_plugin;
-		};
-		43398B8B1132B6BA0036A644 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 43398B711132B6BA0036A644 /* ossim_plugins.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = EEA720270B2F4256006E37B7;
-			remoteInfo = ossimcontrib_plugin;
-		};
-		43398B8D1132B6BA0036A644 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 43398B711132B6BA0036A644 /* ossim_plugins.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 430D1FE10BB2F96B0057E5FF;
-			remoteInfo = ossimpng_plugin;
-		};
-		43398B8F1132B6BA0036A644 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 43398B711132B6BA0036A644 /* ossim_plugins.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 43132112103C84DF00F96FDF;
-			remoteInfo = ossimkakadu_plugin;
-		};
-		43398B911132B6BA0036A644 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 43398B711132B6BA0036A644 /* ossim_plugins.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 43377EF510CFFAC900ECC5AD;
-			remoteInfo = ossimcsm_plugin;
-		};
-		43398B931132B6BA0036A644 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 43398B711132B6BA0036A644 /* ossim_plugins.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 436A7E3510FB9FC400985348;
-			remoteInfo = ossimmrsid_plugin;
-		};
-		433A4CDE100CEDAC000B969C /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 186EF5990B1CE41300F7886A /* ossimPlanet.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 433A4CD8100CED8D000B969C;
-			remoteInfo = ossimplanettest;
-		};
-		4370FD6E0A41005D00931C4B /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 1F33AE1108DC88FA003F541C;
-			remoteInfo = build_frameworks;
-		};
-		4370FD700A41006500931C4B /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 1FF5F59D08D3AB960022B290;
-			remoteInfo = Command_Line;
-		};
-		4386B23F0DF0605B007011FB /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 4386B2380DF0605A007011FB /* oms.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 8DC2EF5B0486A6940098B216;
-			remoteInfo = oms;
-		};
-		4391B888111214D900B5895E /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 4370FD6D0A41004900931C4B;
-			remoteInfo = All;
-		};
-		4391D6B110FED19F007AC2C1 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 4391D6A610FED19F007AC2C1 /* ossimPlanetQt.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 8D07F2C80486CC7A007CD1D0;
-			remoteInfo = ossimPlanetQt;
-		};
-		439E0B390FF4F73000C02785 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 186EF5990B1CE41300F7886A /* ossimPlanet.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossimPlanet;
-		};
-		43A9A0B01151AC55000860DA /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 43398B711132B6BA0036A644 /* ossim_plugins.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 43A9A0AE1151AC37000860DA;
-			remoteInfo = ossim_plugin;
-		};
-		43C6E22D0FEFB4AD004B52F7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 186EF5990B1CE41300F7886A /* ossimPlanet.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 8D07F2C80486CC7A007CD1D0;
-			remoteInfo = ossimPlanet;
-		};
-		43C6E2A90FEFB4F0004B52F7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 186EF5990B1CE41300F7886A /* ossimPlanet.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 43C6E2910FEFB4D8004B52F7;
-			remoteInfo = ossimplanetklv;
-		};
-		43C6E2AB0FEFB4F0004B52F7 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 186EF5990B1CE41300F7886A /* ossimPlanet.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 43C6E29C0FEFB4E9004B52F7;
-			remoteInfo = ossimplanetviewer;
-		};
-		43C8A7911109FF750095AEE2 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 4391D6A610FED19F007AC2C1 /* ossimPlanetQt.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 43C8A7881109FF750095AEE2;
-			remoteInfo = ossimplanet;
-		};
-		43D045340E546D4B0010BCCA /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 4386B2380DF0605A007011FB /* oms.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
-			remoteInfo = oms;
-		};
-		43D50377110A06C800FDB366 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 4391D6A610FED19F007AC2C1 /* ossimPlanetQt.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = 43C8A7871109FF750095AEE2;
-			remoteInfo = ossimplanet;
-		};
-		43D50379110A06D700FDB366 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 4391D6A610FED19F007AC2C1 /* ossimPlanetQt.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossimPlanetQt;
-		};
-		43DED93A0EA78A050090F402 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 431472450CBE539A00EAADAB;
-			remoteInfo = ossimVersion;
-		};
-		EE05E7B50E24FF31005A64BC /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 1886E0D30B1BE9F700D0E4E6 /* libwms.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
-			remoteInfo = wms;
-		};
-		EE05E7B70E24FF4A005A64BC /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossim;
-		};
-		EE05E7BB0E24FF5D005A64BC /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = EEB5ECA90D0F13E2000CF6B2 /* ossimPredator.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
-			remoteInfo = ossimPredator;
-		};
-		EEAE9B620DBE0646000E8D8F /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 4370FD6D0A41004900931C4B;
-			remoteInfo = All;
-		};
-		EEB5ECAD0D0F13E2000CF6B2 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = EEB5ECA90D0F13E2000CF6B2 /* ossimPredator.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = EE3F868B0D0DBB2300DFD3DF;
-			remoteInfo = ossimPredator;
-		};
-		EEC5156F0E769171008AE662 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 1886E0D30B1BE9F700D0E4E6 /* libwms.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 1FD5B7C80E75D3DC00FBD730;
-			remoteInfo = wmsurl;
-		};
-		EEC515710E769171008AE662 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 1886E0D30B1BE9F700D0E4E6 /* libwms.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 1FD5B7EA0E75D46700FBD730;
-			remoteInfo = wmscapabilities.cpp;
-		};
-		EEC515730E769171008AE662 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 1886E0D30B1BE9F700D0E4E6 /* libwms.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 1FD5B7FE0E75D4C500FBD730;
-			remoteInfo = wmsgetmap;
-		};
-		EEE46ACD0E68823800EFF475 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = EEE46AB80E6881AA00EFF475;
-			remoteInfo = "GUI Apps";
-		};
-		EEFE08D70D61D97E008454CA /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = EEFE08CC0D61D97E008454CA /* ossim_qt4.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 8DC2EF5B0486A6940098B216;
-			remoteInfo = ossimQt;
-		};
-		EEFE08D90D61D97E008454CA /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = EEFE08CC0D61D97E008454CA /* ossim_qt4.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 18A6B0770D00436C00F3A329;
-			remoteInfo = iView;
-		};
-		EEFE08DB0D61D97E008454CA /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = EEFE08CC0D61D97E008454CA /* ossim_qt4.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 18A6B0900D0043D000F3A329;
-			remoteInfo = ImageLinker;
-		};
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXFileReference section */
-		089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		186EEC8A0B1CDAB300F7886A /* ossim_qt.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ossim_qt.xcodeproj; path = ../../../ossim_qt/xcode/ossim_qt/ossim_qt.xcodeproj; sourceTree = SOURCE_ROOT; };
-		186EF5990B1CE41300F7886A /* ossimPlanet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ossimPlanet.xcodeproj; path = ../../../ossimPlanet/xcode/ossimPlanet/ossimPlanet.xcodeproj; sourceTree = SOURCE_ROOT; };
-		186F41630B16233900443A9B /* ossimOverviewBuilderBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimOverviewBuilderBase.cpp; sourceTree = "<group>"; };
-		186F41640B16233900443A9B /* ossimOverviewBuilderFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimOverviewBuilderFactory.cpp; sourceTree = "<group>"; };
-		186F41650B16233900443A9B /* ossimOverviewBuilderFactoryBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimOverviewBuilderFactoryBase.cpp; sourceTree = "<group>"; };
-		186F41660B16233900443A9B /* ossimOverviewBuilderFactoryRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimOverviewBuilderFactoryRegistry.cpp; sourceTree = "<group>"; };
-		1886E0570B1B9F9B00D0E4E6 /* common_settings.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = common_settings.xcconfig; sourceTree = "<group>"; };
-		1886E0D30B1BE9F700D0E4E6 /* libwms.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libwms.xcodeproj; path = ../../../libwms/xcode/libwms/libwms.xcodeproj; sourceTree = SOURCE_ROOT; };
-		188BF9120B333163006B63D2 /* ossimPlanet.icns */ = {isa = PBXFileReference; explicitFileType = image.icns; name = ossimPlanet.icns; path = Resources/icons/ossimPlanet.icns; sourceTree = "<group>"; };
-		188F85D70FA3A1C700B619F6 /* ossimInfoBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimInfoBase.cpp; sourceTree = "<group>"; };
-		1F29D04708CCB16E00DA2723 /* ossim_qt-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "ossim_qt-Info.plist"; path = "Resources/ossim_qt-Info.plist"; sourceTree = "<group>"; };
-		1F29D54D08CCCE0300DA2723 /* imagelinker-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "imagelinker-Info.plist"; path = "Resources/imagelinker-Info.plist"; sourceTree = "<group>"; };
-		1FB08BA60FE2B4B3006CD0BD /* ossimNitfEngrdaTag.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfEngrdaTag.cpp; sourceTree = "<group>"; };
-		1FD5C978094BFF3D00293362 /* iview-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "iview-Info.plist"; path = "Resources/iview-Info.plist"; sourceTree = "<group>"; };
-		432D60670B4AADF4004E059E /* ossimMpiMasterOverviewSequencer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMpiMasterOverviewSequencer.h; sourceTree = "<group>"; };
-		432D60680B4AAE09004E059E /* ossimMpiSlaveOverviewSequencer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMpiSlaveOverviewSequencer.h; sourceTree = "<group>"; };
-		432D60690B4AAE2F004E059E /* ossimOverviewSequencer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimOverviewSequencer.h; sourceTree = "<group>"; };
-		432D60740B4AAF65004E059E /* ossimOverviewSequencer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimOverviewSequencer.cpp; sourceTree = "<group>"; };
-		432D60760B4AAF89004E059E /* ossimMpiSlaveOverviewSequencer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMpiSlaveOverviewSequencer.cpp; sourceTree = "<group>"; };
-		432D60770B4AAF89004E059E /* ossimMpiMasterOverviewSequencer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMpiMasterOverviewSequencer.cpp; sourceTree = "<group>"; };
-		43330DBD1108F1AF0024C7DA /* libfreetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfreetype.a; path = ../../../ossim_dependencies/lib/libfreetype.a; sourceTree = SOURCE_ROOT; };
-		43330DBE1108F1AF0024C7DA /* libgeotiff.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgeotiff.a; path = ../../../ossim_dependencies/lib/libgeotiff.a; sourceTree = SOURCE_ROOT; };
-		43330DBF1108F1AF0024C7DA /* libjpeg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjpeg.a; path = ../../../ossim_dependencies/lib/libjpeg.a; sourceTree = SOURCE_ROOT; };
-		43330DC01108F1AF0024C7DA /* libtiff.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libtiff.a; path = ../../../ossim_dependencies/lib/libtiff.a; sourceTree = SOURCE_ROOT; };
-		433628031042E368002A87C7 /* template-app */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "template-app"; sourceTree = BUILT_PRODUCTS_DIR; };
-		433628151042E3B0002A87C7 /* ossim-adrg-dump */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-adrg-dump"; sourceTree = BUILT_PRODUCTS_DIR; };
-		433628231042E3DB002A87C7 /* ossim-adrg-dump.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-adrg-dump.cpp"; sourceTree = "<group>"; };
-		433628371042E3F6002A87C7 /* ossim-applanix2ogeom */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-applanix2ogeom"; sourceTree = BUILT_PRODUCTS_DIR; };
-		433628431042E42B002A87C7 /* ossim-applanix2ogeom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-applanix2ogeom.cpp"; sourceTree = "<group>"; };
-		433628551042E461002A87C7 /* ossim-band-merge */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-band-merge"; sourceTree = BUILT_PRODUCTS_DIR; };
-		433628601042E48F002A87C7 /* ossim-band-merge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-band-merge.cpp"; sourceTree = "<group>"; };
-		433628741042E4AC002A87C7 /* ossim-btoa */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-btoa"; sourceTree = BUILT_PRODUCTS_DIR; };
-		433628861042E4D1002A87C7 /* template-app */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "template-app"; sourceTree = BUILT_PRODUCTS_DIR; };
-		4336288D1042E4EF002A87C7 /* ossim-chgkwval.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-chgkwval.cpp"; sourceTree = "<group>"; };
-		4336289F1042E52A002A87C7 /* ossim-cmm */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-cmm"; sourceTree = BUILT_PRODUCTS_DIR; };
-		433628A81042E54C002A87C7 /* ossim-cmm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-cmm.cpp"; sourceTree = "<group>"; };
-		433628B91042E560002A87C7 /* ossim-computeSrtmStats */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-computeSrtmStats"; sourceTree = BUILT_PRODUCTS_DIR; };
-		433628C21042E578002A87C7 /* ossim-computeSrtmStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-computeSrtmStats.cpp"; sourceTree = "<group>"; };
-		433628D61042E59C002A87C7 /* ossim-correl */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-correl"; sourceTree = BUILT_PRODUCTS_DIR; };
-		433628E01042E5C6002A87C7 /* ossim-correl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-correl.cpp"; sourceTree = "<group>"; };
-		433628F11042E5D1002A87C7 /* ossim-create-cg */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-create-cg"; sourceTree = BUILT_PRODUCTS_DIR; };
-		433628FA1042E5F2002A87C7 /* ossim-create-cg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-create-cg.cpp"; sourceTree = "<group>"; };
-		4336290B1042E607002A87C7 /* ossim-create-histo */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-create-histo"; sourceTree = BUILT_PRODUCTS_DIR; };
-		433629141042E62F002A87C7 /* ossim-create-histo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-create-histo.cpp"; sourceTree = "<group>"; };
-		4336292E1042E65C002A87C7 /* ossim-deg2dms.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-deg2dms.cpp"; sourceTree = "<group>"; };
-		433629811042E712002A87C7 /* ossim-dms2deg */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-dms2deg"; sourceTree = BUILT_PRODUCTS_DIR; };
-		4336298C1042E740002A87C7 /* ossim-dms2deg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-dms2deg.cpp"; sourceTree = "<group>"; };
-		4336299D1042E759002A87C7 /* ossim-dump-ocg */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-dump-ocg"; sourceTree = BUILT_PRODUCTS_DIR; };
-		433629A41042E76E002A87C7 /* ossim-dump-ocg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-dump-ocg.cpp"; sourceTree = "<group>"; };
-		433629B51042E77C002A87C7 /* ossim-ecg2ocg */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-ecg2ocg"; sourceTree = BUILT_PRODUCTS_DIR; };
-		433629BF1042E796002A87C7 /* ossim-ecg2ocg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-ecg2ocg.cpp"; sourceTree = "<group>"; };
-		433629D01042E7B1002A87C7 /* ossim-extract-vertices */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-extract-vertices"; sourceTree = BUILT_PRODUCTS_DIR; };
-		433629E41042E807002A87C7 /* ossim-foo */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-foo"; sourceTree = BUILT_PRODUCTS_DIR; };
-		433629F71042E83C002A87C7 /* ossim-extract-vertices.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-extract-vertices.cpp"; sourceTree = "<group>"; };
-		43362A2D1042E88F002A87C7 /* ossim-height */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-height"; sourceTree = BUILT_PRODUCTS_DIR; };
-		43362A3A1042E8AE002A87C7 /* ossim-height.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-height.cpp"; sourceTree = "<group>"; };
-		43362A4B1042E8BD002A87C7 /* ossim-icp */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-icp"; sourceTree = BUILT_PRODUCTS_DIR; };
-		43362A521042E8DE002A87C7 /* ossim-icp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-icp.cpp"; sourceTree = "<group>"; };
-		43362A631042E8EE002A87C7 /* ossim-igen */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-igen"; sourceTree = BUILT_PRODUCTS_DIR; };
-		43362A6C1042E908002A87C7 /* ossim-igen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-igen.cpp"; sourceTree = "<group>"; };
-		43362A7D1042E914002A87C7 /* ossim-img2md */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-img2md"; sourceTree = BUILT_PRODUCTS_DIR; };
-		43362A891042E939002A87C7 /* ossim-img2md.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-img2md.cpp"; sourceTree = "<group>"; };
-		43362A9A1042E955002A87C7 /* ossim-img2rr */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-img2rr"; sourceTree = BUILT_PRODUCTS_DIR; };
-		43362AA31042E96E002A87C7 /* ossim-img2rr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-img2rr.cpp"; sourceTree = "<group>"; };
-		43362AB41042E981002A87C7 /* ossim-info */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-info"; sourceTree = BUILT_PRODUCTS_DIR; };
-		43362ABE1042E9AC002A87C7 /* ossim-info.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-info.cpp"; sourceTree = "<group>"; };
-		43362AD21042EA43002A87C7 /* ossim-modopt */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-modopt"; sourceTree = BUILT_PRODUCTS_DIR; };
-		43362ADD1042EA5F002A87C7 /* ossim-modopt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-modopt.cpp"; sourceTree = "<group>"; };
-		43362AEF1042EA81002A87C7 /* ossim-mosaic */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-mosaic"; sourceTree = BUILT_PRODUCTS_DIR; };
-		43362AF81042EA9B002A87C7 /* mosaic_usage.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mosaic_usage.txt; sourceTree = "<group>"; };
-		43362AF91042EA9B002A87C7 /* ossim-mosaic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-mosaic.cpp"; sourceTree = "<group>"; };
-		43362B471042EB45002A87C7 /* ossim-ogeom2ogeom */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-ogeom2ogeom"; sourceTree = BUILT_PRODUCTS_DIR; };
-		43362B531042EB62002A87C7 /* ossim-ogeom2ogeom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-ogeom2ogeom.cpp"; sourceTree = "<group>"; };
-		43362B641042EB70002A87C7 /* ossim-orthoigen */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-orthoigen"; sourceTree = BUILT_PRODUCTS_DIR; };
-		43362B6F1042EB90002A87C7 /* ossim-orthoigen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-orthoigen.cpp"; sourceTree = "<group>"; };
-		43362B801042EB9B002A87C7 /* ossim-pixelflip */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-pixelflip"; sourceTree = BUILT_PRODUCTS_DIR; };
-		43362B8A1042EBB9002A87C7 /* ossim-pixelflip.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-pixelflip.cpp"; sourceTree = "<group>"; };
-		43362B9B1042EBCE002A87C7 /* ossim-prune */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-prune"; sourceTree = BUILT_PRODUCTS_DIR; };
-		43362BA61042EBE6002A87C7 /* ossim-prune.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-prune.cpp"; sourceTree = "<group>"; };
-		43362BD21042EC26002A87C7 /* ossim-rejout */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-rejout"; sourceTree = BUILT_PRODUCTS_DIR; };
-		43362BDD1042EC3F002A87C7 /* ossim-rejout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-rejout.cpp"; sourceTree = "<group>"; };
-		43362BEE1042EC50002A87C7 /* ossim-senint */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-senint"; sourceTree = BUILT_PRODUCTS_DIR; };
-		43362BF71042EC69002A87C7 /* ossim-senint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-senint.cpp"; sourceTree = "<group>"; };
-		43362C081042EC80002A87C7 /* ossim-space-imaging */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-space-imaging"; sourceTree = BUILT_PRODUCTS_DIR; };
-		43362C111042EC9E002A87C7 /* ossim-space-imaging.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-space-imaging.cpp"; sourceTree = "<group>"; };
-		43362C221042ECAF002A87C7 /* ossim-swapbytes */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-swapbytes"; sourceTree = BUILT_PRODUCTS_DIR; };
-		43362C2B1042ECC6002A87C7 /* ossim-swapbytes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-swapbytes.cpp"; sourceTree = "<group>"; };
-		43362C3C1042ECD6002A87C7 /* ossim-tfw2ogeom */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ossim-tfw2ogeom"; sourceTree = BUILT_PRODUCTS_DIR; };
-		43362C4B1042ECFB002A87C7 /* ossim-tfw2ogeom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-tfw2ogeom.cpp"; sourceTree = "<group>"; };
-		43362C4C1042ECFB002A87C7 /* template.kwl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = template.kwl; sourceTree = "<group>"; };
-		43377C5F10CD61E200ECC5AD /* ossimGcsCodeProjectionFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGcsCodeProjectionFactory.cpp; sourceTree = "<group>"; };
-		43377C6310CD620300ECC5AD /* ossimGcsCodeProjectionFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimGcsCodeProjectionFactory.h; sourceTree = "<group>"; };
-		433786340CBF124D00AE9DCF /* ossimQuaternion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimQuaternion.h; sourceTree = "<group>"; };
-		433786360CBF128000AE9DCF /* ossimQuaternion.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimQuaternion.cpp; sourceTree = "<group>"; };
-		43398B711132B6BA0036A644 /* ossim_plugins.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ossim_plugins.xcodeproj; path = ../../../ossim_plugins/xcode/ossim_plugins.xcodeproj; sourceTree = SOURCE_ROOT; };
-		433E7D920D327CE800BA05D0 /* ossimFlexLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimFlexLexer.h; sourceTree = "<group>"; };
-		434230930C14F90000F77EBA /* ossimPositionQualityEvaluator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPositionQualityEvaluator.h; sourceTree = "<group>"; };
-		434230940C14F94F00F77EBA /* ossimPositionQualityEvaluator.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPositionQualityEvaluator.cpp; sourceTree = "<group>"; };
-		43463AEB0FCEE45E0027D845 /* ossimDuration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimDuration.h; sourceTree = "<group>"; };
-		43463AEF0FCEE7260027D845 /* ossimDuration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDuration.cpp; sourceTree = "<group>"; };
-		4347EE8F1084EEC4006E88F6 /* ossimNitfWriterBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfWriterBase.cpp; sourceTree = "<group>"; };
-		4347EE941084EEDC006E88F6 /* ossimNitfWriterBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimNitfWriterBase.h; sourceTree = "<group>"; };
-		434D0A5410174A1E00761D13 /* ossimJ2kInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimJ2kInfo.h; sourceTree = "<group>"; };
-		434D0A5510174A1E00761D13 /* ossimJ2kCodRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimJ2kCodRecord.h; sourceTree = "<group>"; };
-		434D0A5810174A3F00761D13 /* ossimJ2kInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimJ2kInfo.cpp; sourceTree = "<group>"; };
-		434D0A5910174A3F00761D13 /* ossimJ2kCodRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimJ2kCodRecord.cpp; sourceTree = "<group>"; };
-		434E648C10D2BFEE005EBB18 /* ossimVirtualOverviewSequencer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVirtualOverviewSequencer.cpp; sourceTree = "<group>"; };
-		434E648F10D2C020005EBB18 /* ossimVirtualOverviewBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimVirtualOverviewBuilder.h; sourceTree = "<group>"; };
-		434E65D910D68576005EBB18 /* ossimTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimTimer.h; sourceTree = "<group>"; };
-		434E65DC10D685A2005EBB18 /* ossimTimer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTimer.cpp; sourceTree = "<group>"; };
-		434E668D10D6C9DC005EBB18 /* ossimElevationDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimElevationDatabase.h; sourceTree = "<group>"; };
-		434E668E10D6CBDF005EBB18 /* ossimDtedElevationDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimDtedElevationDatabase.h; sourceTree = "<group>"; };
-		434E669B10D6CE0D005EBB18 /* ossimDtedElevationDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDtedElevationDatabase.cpp; sourceTree = "<group>"; };
-		434E6B7A10D80CE6005EBB18 /* ossimElevationDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimElevationDatabase.cpp; sourceTree = "<group>"; };
-		434E6BA110D8125C005EBB18 /* ossimElevationDatabaseRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimElevationDatabaseRegistry.cpp; sourceTree = "<group>"; };
-		434E6BA310D8127E005EBB18 /* ossimElevationDatabaseRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimElevationDatabaseRegistry.h; sourceTree = "<group>"; };
-		434E6BAB10D813D0005EBB18 /* ossimElevationDatabaseFactoryBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimElevationDatabaseFactoryBase.h; sourceTree = "<group>"; };
-		434E6BAF10D81515005EBB18 /* ossimElevationDatabaseFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimElevationDatabaseFactory.h; sourceTree = "<group>"; };
-		434E6BB010D81529005EBB18 /* ossimElevationDatabaseFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimElevationDatabaseFactory.cpp; sourceTree = "<group>"; };
-		434E707110DA60D8005EBB18 /* ossimSrtmElevationDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSrtmElevationDatabase.cpp; sourceTree = "<group>"; };
-		434E707310DA60EB005EBB18 /* ossimSrtmElevationDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimSrtmElevationDatabase.h; sourceTree = "<group>"; };
-		434E718810DA7D32005EBB18 /* ossimGeneralRasterElevationDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeneralRasterElevationDatabase.cpp; sourceTree = "<group>"; };
-		434E718B10DA7D43005EBB18 /* ossimGeneralRasterElevationDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimGeneralRasterElevationDatabase.h; sourceTree = "<group>"; };
-		4350C7BC0F851D8700CBF038 /* ossimNitfCsdidaTag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimNitfCsdidaTag.h; sourceTree = "<group>"; };
-		4350C7BF0F851DF200CBF038 /* ossimNitfCsdidaTag.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfCsdidaTag.cpp; sourceTree = "<group>"; };
-		4350C9C10F8648BD00CBF038 /* ossimNitfCscrnaTag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimNitfCscrnaTag.h; sourceTree = "<group>"; };
-		4350C9C50F8648EA00CBF038 /* ossimNitfCscrnaTag.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfCscrnaTag.cpp; sourceTree = "<group>"; };
-		4350CA280F868C5000CBF038 /* ossimNitfCsexraTag.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfCsexraTag.cpp; sourceTree = "<group>"; };
-		4350CA2C0F868C6E00CBF038 /* ossimNitfCsexraTag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimNitfCsexraTag.h; sourceTree = "<group>"; };
-		436061760A821BFB001CD337 /* ossimNotify.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNotify.cpp; sourceTree = "<group>"; };
-		436061780A821C3C001CD337 /* ossimNotify.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNotify.h; sourceTree = "<group>"; };
-		4369F74F112047FA002FA4B7 /* ossimSingleImageChain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimSingleImageChain.h; sourceTree = "<group>"; };
-		4369F75011204839002FA4B7 /* ossimSingleImageChain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSingleImageChain.cpp; sourceTree = "<group>"; };
-		436A7E7A10FBAAD500985348 /* ossimAuxFileHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAuxFileHandler.cpp; sourceTree = "<group>"; };
-		436A7E7F10FBAAEE00985348 /* ossimAuxFileHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimAuxFileHandler.h; sourceTree = "<group>"; };
-		436B11BB0A80DF4E0052AA54 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
-		436E916A0AC2F3B00051AEC2 /* ossimMemoryImageSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMemoryImageSource.h; sourceTree = "<group>"; };
-		436E916B0AC2F3D90051AEC2 /* ossimMemoryImageSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMemoryImageSource.cpp; sourceTree = "<group>"; };
-		437184380BCF03210002D30E /* Openthreads.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Openthreads.framework; path = ../../../ossim_dependencies/Frameworks/Openthreads.framework; sourceTree = SOURCE_ROOT; };
-		437224A70AAFAE2A00F7BCC5 /* ossimSarModel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSarModel.h; sourceTree = "<group>"; };
-		437224AB0AAFAE6A00F7BCC5 /* ossimSarModel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSarModel.cpp; sourceTree = "<group>"; };
-		4386B2380DF0605A007011FB /* oms.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = oms.xcodeproj; path = ../../../oms/coms/xcode/oms/oms.xcodeproj; sourceTree = SOURCE_ROOT; };
-		438DED7410B1811C00502C71 /* ossimSmacCallibrationSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSmacCallibrationSystem.cpp; sourceTree = "<group>"; };
-		438DED7610B1814300502C71 /* ossimSmacCallibrationSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ossimSmacCallibrationSystem.h; path = ../../include/ossim/projection/ossimSmacCallibrationSystem.h; sourceTree = SOURCE_ROOT; };
-		438DEDD610B1D7A200502C71 /* ossimBuckeyeSensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimBuckeyeSensor.h; sourceTree = "<group>"; };
-		438DEDDC10B1D89B00502C71 /* ossimBuckeyeSensor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimBuckeyeSensor.cpp; sourceTree = "<group>"; };
-		438DF2D610B61F9300502C71 /* ossimNullPixelFlip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimNullPixelFlip.h; sourceTree = "<group>"; };
-		438DF2DA10B620A800502C71 /* ossimNullPixelFlip.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNullPixelFlip.cpp; sourceTree = "<group>"; };
-		4391D6A610FED19F007AC2C1 /* ossimPlanetQt.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ossimPlanetQt.xcodeproj; path = ../../../ossimPlanetQt/xcode/ossimPlanetQt/ossimPlanetQt.xcodeproj; sourceTree = SOURCE_ROOT; };
-		4392B1840AB5906D002759B3 /* ossimColumnVector3d.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimColumnVector3d.cpp; sourceTree = "<group>"; };
-		4392B1860AB5907B002759B3 /* ossimEcefVector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimEcefVector.cpp; sourceTree = "<group>"; };
-		43954AF80AA8EED300250B23 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../../../ossimPlanetQt/apps/ossimplanet/main.cpp; sourceTree = SOURCE_ROOT; };
-		43A114A10D5254C600DE3CF3 /* ossimCsvFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimCsvFile.h; sourceTree = "<group>"; };
-		43A114A40D52596300DE3CF3 /* ossimCsvFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimCsvFile.cpp; sourceTree = "<group>"; };
-		43A68B99110685E5000A153F /* ossimplanet2-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ossimplanet2-Info.plist"; sourceTree = "<group>"; };
-		43A93B2C0A5024CF00903A9C /* ossimEnvironmentUtility.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimEnvironmentUtility.h; sourceTree = "<group>"; };
-		43A93B2D0A5024FF00903A9C /* ossimEnvironmentUtility.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimEnvironmentUtility.cpp; sourceTree = "<group>"; };
-		43AC3A40108DE19B00A8DB04 /* ossim2dTo2dIdentityTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossim2dTo2dIdentityTransform.h; sourceTree = "<group>"; };
-		43AC3A41108DE19B00A8DB04 /* ossim2dTo2dTransformFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossim2dTo2dTransformFactory.h; sourceTree = "<group>"; };
-		43AC3A42108DE19B00A8DB04 /* ossim2dTo2dTransformFactoryBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossim2dTo2dTransformFactoryBase.h; sourceTree = "<group>"; };
-		43AC3A43108DE19B00A8DB04 /* ossim2dTo2dTransformRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossim2dTo2dTransformRegistry.h; sourceTree = "<group>"; };
-		43AC3A44108DE19B00A8DB04 /* ossim2dBilinearTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossim2dBilinearTransform.h; sourceTree = "<group>"; };
-		43AC3A45108DE19B00A8DB04 /* ossim2dTo2dShiftTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossim2dTo2dShiftTransform.h; sourceTree = "<group>"; };
-		43AC3A46108DE19B00A8DB04 /* ossimFactoryListInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimFactoryListInterface.h; sourceTree = "<group>"; };
-		43AC3A47108DE1BE00A8DB04 /* ossimImageGeometry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ossimImageGeometry.h; path = ../../include/ossim/imaging/ossimImageGeometry.h; sourceTree = SOURCE_ROOT; };
-		43AC3A48108DE1BE00A8DB04 /* ossimImageGeometryRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ossimImageGeometryRegistry.h; path = ../../include/ossim/imaging/ossimImageGeometryRegistry.h; sourceTree = SOURCE_ROOT; };
-		43AC3A49108DE1BE00A8DB04 /* ossimImageGeometryFactoryBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ossimImageGeometryFactoryBase.h; path = ../../include/ossim/imaging/ossimImageGeometryFactoryBase.h; sourceTree = SOURCE_ROOT; };
-		43AC3A4A108DE1BE00A8DB04 /* ossimImageGeometryFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ossimImageGeometryFactory.h; path = ../../include/ossim/imaging/ossimImageGeometryFactory.h; sourceTree = SOURCE_ROOT; };
-		43AC3A4E108DE1EC00A8DB04 /* ossim2dTo2dShiftTransform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossim2dTo2dShiftTransform.cpp; sourceTree = "<group>"; };
-		43AC3A4F108DE1EC00A8DB04 /* ossim2dTo2dIdentityTransform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossim2dTo2dIdentityTransform.cpp; sourceTree = "<group>"; };
-		43AC3A50108DE1EC00A8DB04 /* ossim2dTo2dTransformFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossim2dTo2dTransformFactory.cpp; sourceTree = "<group>"; };
-		43AC3A51108DE1EC00A8DB04 /* ossim2dTo2dTransformRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossim2dTo2dTransformRegistry.cpp; sourceTree = "<group>"; };
-		43AC3A52108DE1EC00A8DB04 /* ossim2dBilinearTransform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossim2dBilinearTransform.cpp; sourceTree = "<group>"; };
-		43AC3A64108DE3A300A8DB04 /* ossimImageGeometry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageGeometry.cpp; sourceTree = "<group>"; };
-		43AC3A65108DE3A300A8DB04 /* ossimImageGeometryRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageGeometryRegistry.cpp; sourceTree = "<group>"; };
-		43AC3A66108DE3A300A8DB04 /* ossimImageGeometryFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageGeometryFactory.cpp; sourceTree = "<group>"; };
-		43B7FB950D8EDAD5009169CC /* ossimOverviewBuilderFactoryRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimOverviewBuilderFactoryRegistry.h; sourceTree = "<group>"; };
-		43B7FB960D8EDAD5009169CC /* ossimOverviewBuilderFactoryBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimOverviewBuilderFactoryBase.h; sourceTree = "<group>"; };
-		43B7FB970D8EDAD5009169CC /* ossimOverviewBuilderFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimOverviewBuilderFactory.h; sourceTree = "<group>"; };
-		43B7FB980D8EDAD5009169CC /* ossimOverviewBuilderBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimOverviewBuilderBase.h; sourceTree = "<group>"; };
-		43CF6BAB104EA81E00714C86 /* ossim-foo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "ossim-foo.cpp"; sourceTree = "<group>"; };
-		43D3C5C11151A386000A60FB /* ossimQuickbirdMetaData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimQuickbirdMetaData.h; sourceTree = "<group>"; };
-		43D3C5C21151A3DB000A60FB /* ossimQuickbirdMetaData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimQuickbirdMetaData.cpp; sourceTree = "<group>"; };
-		43D4EF530AC3245200218BA4 /* ossimPlanetQt-info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; name = "ossimPlanetQt-info.plist"; path = "Resources/ossimPlanetQt-info.plist"; sourceTree = "<group>"; };
-		43D4EF600AC3264300218BA4 /* ossimPlanetQtApp-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; name = "ossimPlanetQtApp-Info.plist"; path = "Resources/ossimPlanetQtApp-Info.plist"; sourceTree = "<group>"; };
-		43D622530F7BC31100D93B8F /* ossimCcfInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimCcfInfo.h; sourceTree = "<group>"; };
-		43D622550F7BC33700D93B8F /* ossimNitfInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimNitfInfo.h; sourceTree = "<group>"; };
-		43D622560F7BC33700D93B8F /* ossimTiffInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimTiffInfo.h; sourceTree = "<group>"; };
-		43D622580F7BC36E00D93B8F /* ossimDtedInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimDtedInfo.h; sourceTree = "<group>"; };
-		43D622590F7BC43300D93B8F /* ossimInfoFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimInfoFactory.h; sourceTree = "<group>"; };
-		43D6225A0F7BC43300D93B8F /* ossimInfoFactoryInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimInfoFactoryInterface.h; sourceTree = "<group>"; };
-		43D6225B0F7BC43300D93B8F /* ossimInfoFactoryRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimInfoFactoryRegistry.h; sourceTree = "<group>"; };
-		43D6225E0F7BC48200D93B8F /* ossimDtedInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDtedInfo.cpp; sourceTree = "<group>"; };
-		43D6225F0F7BC48200D93B8F /* ossimCcfInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimCcfInfo.cpp; sourceTree = "<group>"; };
-		43D622600F7BC48200D93B8F /* ossimNitfInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfInfo.cpp; sourceTree = "<group>"; };
-		43D622610F7BC48200D93B8F /* ossimTiffInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTiffInfo.cpp; sourceTree = "<group>"; };
-		43D622620F7BC48200D93B8F /* ossimInfoFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimInfoFactory.cpp; sourceTree = "<group>"; };
-		43D622630F7BC48200D93B8F /* ossimInfoFactoryRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimInfoFactoryRegistry.cpp; sourceTree = "<group>"; };
-		43D622760F7BC51100D93B8F /* ossimInfoBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimInfoBase.h; sourceTree = "<group>"; };
-		43D769AF0A76A08A00E87B08 /* ossimPlanet-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; name = "ossimPlanet-Info.plist"; path = "Resources/ossimPlanet-Info.plist"; sourceTree = "<group>"; };
-		43D982FE0A403AA500E28AA2 /* ellips.dat */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ellips.dat; sourceTree = "<group>"; };
-		43D982FF0A403AA500E28AA2 /* ossim2dLinearRegression.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossim2dLinearRegression.cpp; sourceTree = "<group>"; };
-		43D983010A403AA500E28AA2 /* ossim2dTo2dTransform.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossim2dTo2dTransform.cpp; sourceTree = "<group>"; };
-		43D983030A403AA500E28AA2 /* ossimActiveEdgeTable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimActiveEdgeTable.cpp; sourceTree = "<group>"; };
-		43D983050A403AA500E28AA2 /* ossimAdjustableParameterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAdjustableParameterInfo.cpp; sourceTree = "<group>"; };
-		43D983070A403AA500E28AA2 /* ossimAdjustableParameterInterface.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAdjustableParameterInterface.cpp; sourceTree = "<group>"; };
-		43D983090A403AA500E28AA2 /* ossimAdjustmentInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAdjustmentInfo.cpp; sourceTree = "<group>"; };
-		43D9830D0A403AA500E28AA2 /* ossimAffineTransform.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAffineTransform.cpp; sourceTree = "<group>"; };
-		43D9830F0A403AA500E28AA2 /* ossimApplicationUsage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimApplicationUsage.cpp; sourceTree = "<group>"; };
-		43D983110A403AA500E28AA2 /* ossimArgumentParser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimArgumentParser.cpp; sourceTree = "<group>"; };
-		43D983130A403AA500E28AA2 /* ossimBaseObjectFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimBaseObjectFactory.cpp; sourceTree = "<group>"; };
-		43D983150A403AA500E28AA2 /* ossimBilSplitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimBilSplitter.cpp; sourceTree = "<group>"; };
-		43D983170A403AA500E28AA2 /* ossimBooleanProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimBooleanProperty.cpp; sourceTree = "<group>"; };
-		43D983190A403AA500E28AA2 /* ossimCmyVector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimCmyVector.cpp; sourceTree = "<group>"; };
-		43D9831B0A403AA500E28AA2 /* ossimColorProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimColorProperty.cpp; sourceTree = "<group>"; };
-		43D9831D0A403AA500E28AA2 /* ossimCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimCommon.cpp; sourceTree = "<group>"; };
-		43D9831F0A403AA500E28AA2 /* ossimConnectableContainer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimConnectableContainer.cpp; sourceTree = "<group>"; };
-		43D983210A403AA500E28AA2 /* ossimConnectableContainerInterface.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimConnectableContainerInterface.cpp; sourceTree = "<group>"; };
-		43D983230A403AA500E28AA2 /* ossimConnectableDisplayListener.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimConnectableDisplayListener.cpp; sourceTree = "<group>"; };
-		43D983250A403AA500E28AA2 /* ossimConnectableObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimConnectableObject.cpp; sourceTree = "<group>"; };
-		43D983270A403AA500E28AA2 /* ossimConnectableObjectListener.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimConnectableObjectListener.cpp; sourceTree = "<group>"; };
-		43D983290A403AA500E28AA2 /* ossimConnectionEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimConnectionEvent.cpp; sourceTree = "<group>"; };
-		43D9832B0A403AA500E28AA2 /* ossimContainerEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimContainerEvent.cpp; sourceTree = "<group>"; };
-		43D9832D0A403AA500E28AA2 /* ossimContainerProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimContainerProperty.cpp; sourceTree = "<group>"; };
-		43D9832F0A403AA500E28AA2 /* ossimCplUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimCplUtil.cpp; sourceTree = "<group>"; };
-		43D983310A403AA500E28AA2 /* ossimCustomEditorWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimCustomEditorWindow.cpp; sourceTree = "<group>"; };
-		43D983330A403AA500E28AA2 /* ossimCustomEditorWindowFactoryBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimCustomEditorWindowFactoryBase.cpp; sourceTree = "<group>"; };
-		43D983350A403AA500E28AA2 /* ossimCustomEditorWindowRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimCustomEditorWindowRegistry.cpp; sourceTree = "<group>"; };
-		43D983370A403AA500E28AA2 /* ossimDataObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDataObject.cpp; sourceTree = "<group>"; };
-		43D983390A403AA500E28AA2 /* ossimDate.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDate.cpp; sourceTree = "<group>"; };
-		43D9833B0A403AA500E28AA2 /* ossimDateProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDateProperty.cpp; sourceTree = "<group>"; };
-		43D9833D0A403AA500E28AA2 /* ossimDatum.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDatum.cpp; sourceTree = "<group>"; };
-		43D9833F0A403AA500E28AA2 /* ossimDatumFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDatumFactory.cpp; sourceTree = "<group>"; };
-		43D983420A403AA500E28AA2 /* ossimDblGrid.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDblGrid.cpp; sourceTree = "<group>"; };
-		43D983440A403AA500E28AA2 /* ossimDirectory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDirectory.cpp; sourceTree = "<group>"; };
-		43D983460A403AA500E28AA2 /* ossimDirectoryData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDirectoryData.cpp; sourceTree = "<group>"; };
-		43D983480A403AA500E28AA2 /* ossimDirectoryTree.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDirectoryTree.cpp; sourceTree = "<group>"; };
-		43D9834A0A403AA500E28AA2 /* ossimDisplayEventListener.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDisplayEventListener.cpp; sourceTree = "<group>"; };
-		43D9834C0A403AA500E28AA2 /* ossimDisplayInterface.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDisplayInterface.cpp; sourceTree = "<group>"; };
-		43D9834E0A403AA500E28AA2 /* ossimDisplayListEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDisplayListEvent.cpp; sourceTree = "<group>"; };
-		43D983500A403AA500E28AA2 /* ossimDisplayRefreshEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDisplayRefreshEvent.cpp; sourceTree = "<group>"; };
-		43D983520A403AA500E28AA2 /* ossimDms.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDms.cpp; sourceTree = "<group>"; };
-		43D983540A403AA500E28AA2 /* ossimDoubleGridProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDoubleGridProperty.cpp; sourceTree = "<group>"; };
-		43D983560A403AA500E28AA2 /* ossimDpt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDpt.cpp; sourceTree = "<group>"; };
-		43D983580A403AA500E28AA2 /* ossimDpt3d.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDpt3d.cpp; sourceTree = "<group>"; };
-		43D9835A0A403AA500E28AA2 /* ossimDrect.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDrect.cpp; sourceTree = "<group>"; };
-		43D9835C0A403AA500E28AA2 /* ossimEbcdicToAscii.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimEbcdicToAscii.cpp; sourceTree = "<group>"; };
-		43D9835E0A403AA500E28AA2 /* ossimEcefPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimEcefPoint.cpp; sourceTree = "<group>"; };
-		43D983600A403AA500E28AA2 /* ossimEcefRay.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimEcefRay.cpp; sourceTree = "<group>"; };
-		43D983620A403AA500E28AA2 /* ossimElevationManagerEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimElevationManagerEvent.cpp; sourceTree = "<group>"; };
-		43D983640A403AA500E28AA2 /* ossimElevationManagerEventListener.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimElevationManagerEventListener.cpp; sourceTree = "<group>"; };
-		43D983660A403AA500E28AA2 /* ossimEllipsoid.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimEllipsoid.cpp; sourceTree = "<group>"; };
-		43D983680A403AA500E28AA2 /* ossimEllipsoidFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimEllipsoidFactory.cpp; sourceTree = "<group>"; };
-		43D9836A0A403AA500E28AA2 /* ossimEndian.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimEndian.cpp; sourceTree = "<group>"; };
-		43D9836D0A403AA500E28AA2 /* ossimEquTokenizer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimEquTokenizer.cpp; sourceTree = "<group>"; };
-		43D983710A403AA500E28AA2 /* ossimErrorCodes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimErrorCodes.cpp; sourceTree = "<group>"; };
-		43D983730A403AA500E28AA2 /* ossimErrorStatusInterface.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimErrorStatusInterface.cpp; sourceTree = "<group>"; };
-		43D983750A403AA500E28AA2 /* ossimEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimEvent.cpp; sourceTree = "<group>"; };
-		43D983770A403AA500E28AA2 /* ossimFactoryBaseTemplate.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFactoryBaseTemplate.cpp; sourceTree = "<group>"; };
-		43D983790A403AA500E28AA2 /* ossimFilename.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFilename.cpp; sourceTree = "<group>"; };
-		43D9837B0A403AA500E28AA2 /* ossimFilenameProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFilenameProperty.cpp; sourceTree = "<group>"; };
-		43D9837D0A403AA500E28AA2 /* ossimFontInformation.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFontInformation.cpp; sourceTree = "<group>"; };
-		43D9837F0A403AA500E28AA2 /* ossimFontProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFontProperty.cpp; sourceTree = "<group>"; };
-		43D983810A403AA500E28AA2 /* ossimFpt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFpt.cpp; sourceTree = "<group>"; };
-		43D983830A403AA500E28AA2 /* ossimFpt3d.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFpt3d.cpp; sourceTree = "<group>"; };
-		43D983850A403AA500E28AA2 /* ossimGeoPolygon.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoPolygon.cpp; sourceTree = "<group>"; };
-		43D983870A403AA500E28AA2 /* ossimGeoTiffCoordTransformsLut.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoTiffCoordTransformsLut.cpp; sourceTree = "<group>"; };
-		43D983890A403AA500E28AA2 /* ossimGeoTiffDatumLut.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoTiffDatumLut.cpp; sourceTree = "<group>"; };
-		43D9838B0A403AA500E28AA2 /* ossimGeocent.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ossimGeocent.c; sourceTree = "<group>"; };
-		43D9838D0A403AA500E28AA2 /* ossimGeoid.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoid.cpp; sourceTree = "<group>"; };
-		43D9838F0A403AA500E28AA2 /* ossimGeoidEgm96.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoidEgm96.cpp; sourceTree = "<group>"; };
-		43D983910A403AA500E28AA2 /* ossimGeoidManager.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoidManager.cpp; sourceTree = "<group>"; };
-		43D983930A403AA500E28AA2 /* ossimGeoidNgs.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoidNgs.cpp; sourceTree = "<group>"; };
-		43D983950A403AA500E28AA2 /* ossimGeoidNgsHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoidNgsHeader.cpp; sourceTree = "<group>"; };
-		43D983970A403AA500E28AA2 /* ossimGeoref.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoref.cpp; sourceTree = "<group>"; };
-		43D983990A403AA500E28AA2 /* ossimGpt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGpt.cpp; sourceTree = "<group>"; };
-		43D9839B0A403AA500E28AA2 /* ossimGrect.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGrect.cpp; sourceTree = "<group>"; };
-		43D9839D0A403AA500E28AA2 /* ossimGzStream.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGzStream.cpp; sourceTree = "<group>"; };
-		43D9839F0A403AA500E28AA2 /* ossimHexString.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimHexString.cpp; sourceTree = "<group>"; };
-		43D983A10A403AA500E28AA2 /* ossimHistogram.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimHistogram.cpp; sourceTree = "<group>"; };
-		43D983A30A403AA500E28AA2 /* ossimHistogramSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimHistogramSource.cpp; sourceTree = "<group>"; };
-		43D983A50A403AA500E28AA2 /* ossimHsiVector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimHsiVector.cpp; sourceTree = "<group>"; };
-		43D983A70A403AA500E28AA2 /* ossimHsvVector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimHsvVector.cpp; sourceTree = "<group>"; };
-		43D983A90A403AA500E28AA2 /* ossimId.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimId.cpp; sourceTree = "<group>"; };
-		43D983AB0A403AA500E28AA2 /* ossimIdManager.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimIdManager.cpp; sourceTree = "<group>"; };
-		43D983AD0A403AA500E28AA2 /* ossimImageAoiListener.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageAoiListener.cpp; sourceTree = "<group>"; };
-		43D983AF0A403AA500E28AA2 /* ossimImageGeometryEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageGeometryEvent.cpp; sourceTree = "<group>"; };
-		43D983B10A403AA500E28AA2 /* ossimImageGeometryEventListener.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageGeometryEventListener.cpp; sourceTree = "<group>"; };
-		43D983B30A403AA500E28AA2 /* ossimImageTypeLut.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageTypeLut.cpp; sourceTree = "<group>"; };
-		43D983B50A403AA500E28AA2 /* ossimInterleaveTypeLut.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimInterleaveTypeLut.cpp; sourceTree = "<group>"; };
-		43D983B70A403AA500E28AA2 /* ossimIoStream.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimIoStream.cpp; sourceTree = "<group>"; };
-		43D983B90A403AA500E28AA2 /* ossimIpt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimIpt.cpp; sourceTree = "<group>"; };
-		43D983BB0A403AA500E28AA2 /* ossimIrect.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimIrect.cpp; sourceTree = "<group>"; };
-		43D983BD0A403AA500E28AA2 /* ossimJpegYCbCrVector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimJpegYCbCrVector.cpp; sourceTree = "<group>"; };
-		43D983BF0A403AA500E28AA2 /* ossimKeyword.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimKeyword.cpp; sourceTree = "<group>"; };
-		43D983C10A403AA500E28AA2 /* ossimKeywordNames.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimKeywordNames.cpp; sourceTree = "<group>"; };
-		43D983C30A403AA500E28AA2 /* ossimKeywordlist.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimKeywordlist.cpp; sourceTree = "<group>"; };
-		43D983C50A403AA500E28AA2 /* ossimLeastSquaresBilin.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimLeastSquaresBilin.cpp; sourceTree = "<group>"; };
-		43D983C70A403AA500E28AA2 /* ossimLine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimLine.cpp; sourceTree = "<group>"; };
-		43D983C90A403AA500E28AA2 /* ossimListener.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimListener.cpp; sourceTree = "<group>"; };
-		43D983CB0A403AA500E28AA2 /* ossimListenerManager.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimListenerManager.cpp; sourceTree = "<group>"; };
-		43D983CD0A403AA500E28AA2 /* ossimLookUpTable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimLookUpTable.cpp; sourceTree = "<group>"; };
-		43D983CF0A403AA500E28AA2 /* ossimLsrPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimLsrPoint.cpp; sourceTree = "<group>"; };
-		43D983D10A403AA500E28AA2 /* ossimLsrRay.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimLsrRay.cpp; sourceTree = "<group>"; };
-		43D983D30A403AA500E28AA2 /* ossimLsrSpace.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimLsrSpace.cpp; sourceTree = "<group>"; };
-		43D983D50A403AA500E28AA2 /* ossimLsrVector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimLsrVector.cpp; sourceTree = "<group>"; };
-		43D983D70A403AA500E28AA2 /* ossimMatrix3x3.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMatrix3x3.cpp; sourceTree = "<group>"; };
-		43D983D90A403AA500E28AA2 /* ossimMatrix4x4.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMatrix4x4.cpp; sourceTree = "<group>"; };
-		43D983DB0A403AA500E28AA2 /* ossimMatrixProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMatrixProperty.cpp; sourceTree = "<group>"; };
-		43D983DD0A403AA500E28AA2 /* ossimMouseEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMouseEvent.cpp; sourceTree = "<group>"; };
-		43D983DF0A403AA500E28AA2 /* ossimMouseListener.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMouseListener.cpp; sourceTree = "<group>"; };
-		43D983E10A403AA500E28AA2 /* ossimMultiBandHistogram.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMultiBandHistogram.cpp; sourceTree = "<group>"; };
-		43D983E30A403AA500E28AA2 /* ossimMultiResLevelHistogram.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMultiResLevelHistogram.cpp; sourceTree = "<group>"; };
-		43D983E70A403AA500E28AA2 /* ossimNBandLutDataObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNBandLutDataObject.cpp; sourceTree = "<group>"; };
-		43D983E90A403AA500E28AA2 /* ossimNadconGridDatum.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNadconGridDatum.cpp; sourceTree = "<group>"; };
-		43D983EB0A403AA500E28AA2 /* ossimNadconGridFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNadconGridFile.cpp; sourceTree = "<group>"; };
-		43D983ED0A403AA500E28AA2 /* ossimNadconGridHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNadconGridHeader.cpp; sourceTree = "<group>"; };
-		43D983EF0A403AA500E28AA2 /* ossimNadconNarDatum.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNadconNarDatum.cpp; sourceTree = "<group>"; };
-		43D983F10A403AA500E28AA2 /* ossimNadconNasDatum.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNadconNasDatum.cpp; sourceTree = "<group>"; };
-		43D983F30A403AA500E28AA2 /* ossimNormRgbVector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNormRgbVector.cpp; sourceTree = "<group>"; };
-		43D983F70A403AA500E28AA2 /* ossimNumericProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNumericProperty.cpp; sourceTree = "<group>"; };
-		43D983F90A403AA500E28AA2 /* ossimObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimObject.cpp; sourceTree = "<group>"; };
-		43D983FB0A403AA500E28AA2 /* ossimObjectDestructingEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimObjectDestructingEvent.cpp; sourceTree = "<group>"; };
-		43D983FD0A403AA500E28AA2 /* ossimObjectFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimObjectFactory.cpp; sourceTree = "<group>"; };
-		43D983FF0A403AA500E28AA2 /* ossimObjectFactoryRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimObjectFactoryRegistry.cpp; sourceTree = "<group>"; };
-		43D984010A403AA600E28AA2 /* ossimOutputSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimOutputSource.cpp; sourceTree = "<group>"; };
-		43D984030A403AA600E28AA2 /* ossimPackedBits.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPackedBits.cpp; sourceTree = "<group>"; };
-		43D984050A403AA600E28AA2 /* ossimPolyArea2d.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPolyArea2d.cpp; sourceTree = "<group>"; };
-		43D984070A403AA600E28AA2 /* ossimPolyLine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPolyLine.cpp; sourceTree = "<group>"; };
-		43D984090A403AA600E28AA2 /* ossimPolygon.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPolygon.cpp; sourceTree = "<group>"; };
-		43D9840B0A403AA600E28AA2 /* ossimPreferences.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPreferences.cpp; sourceTree = "<group>"; };
-		43D9840D0A403AA600E28AA2 /* ossimProcessInterface.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimProcessInterface.cpp; sourceTree = "<group>"; };
-		43D9840F0A403AA600E28AA2 /* ossimProcessListener.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimProcessListener.cpp; sourceTree = "<group>"; };
-		43D984110A403AA600E28AA2 /* ossimProcessProgressEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimProcessProgressEvent.cpp; sourceTree = "<group>"; };
-		43D984130A403AA600E28AA2 /* ossimProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimProperty.cpp; sourceTree = "<group>"; };
-		43D984150A403AA600E28AA2 /* ossimPropertyInterface.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPropertyInterface.cpp; sourceTree = "<group>"; };
-		43D984170A403AA600E28AA2 /* ossimPropertyInterfaceFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPropertyInterfaceFactory.cpp; sourceTree = "<group>"; };
-		43D984190A403AA600E28AA2 /* ossimPropertyInterfaceRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPropertyInterfaceRegistry.cpp; sourceTree = "<group>"; };
-		43D9841B0A403AA600E28AA2 /* ossimQuadTreeWarp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimQuadTreeWarp.cpp; sourceTree = "<group>"; };
-		43D9841D0A403AA600E28AA2 /* ossimQuadrilateralMap.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimQuadrilateralMap.cpp; sourceTree = "<group>"; };
-		43D9841F0A403AA600E28AA2 /* ossimROIEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimROIEvent.cpp; sourceTree = "<group>"; };
-		43D984210A403AA600E28AA2 /* ossimROIEventListener.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimROIEventListener.cpp; sourceTree = "<group>"; };
-		43D984230A403AA600E28AA2 /* ossimRationalNumber.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRationalNumber.cpp; sourceTree = "<group>"; };
-		43D984250A403AA600E28AA2 /* ossimRectanglePartitioner.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRectanglePartitioner.cpp; sourceTree = "<group>"; };
-		43D984270A403AA600E28AA2 /* ossimRectilinearDataObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRectilinearDataObject.cpp; sourceTree = "<group>"; };
-		43D984290A403AA600E28AA2 /* ossimReferenced.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimReferenced.cpp; sourceTree = "<group>"; };
-		43D9842B0A403AA600E28AA2 /* ossimRefreshEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRefreshEvent.cpp; sourceTree = "<group>"; };
-		43D9842D0A403AA600E28AA2 /* ossimRegExp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRegExp.cpp; sourceTree = "<group>"; };
-		43D9842F0A403AA600E28AA2 /* ossimRgbLutDataObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRgbLutDataObject.cpp; sourceTree = "<group>"; };
-		43D984310A403AA600E28AA2 /* ossimRgbVector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRgbVector.cpp; sourceTree = "<group>"; };
-		43D984330A403AA600E28AA2 /* ossimRtti.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRtti.cpp; sourceTree = "<group>"; };
-		43D984350A403AA600E28AA2 /* ossimScalarTypeLut.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimScalarTypeLut.cpp; sourceTree = "<group>"; };
-		43D984370A403AA600E28AA2 /* ossimSevenParamDatum.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSevenParamDatum.cpp; sourceTree = "<group>"; };
-		43D984390A403AA600E28AA2 /* ossimSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSource.cpp; sourceTree = "<group>"; };
-		43D9843B0A403AA600E28AA2 /* ossimStateChangedEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimStateChangedEvent.cpp; sourceTree = "<group>"; };
-		43D9843D0A403AA600E28AA2 /* ossimStdOutProgress.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimStdOutProgress.cpp; sourceTree = "<group>"; };
-		43D9843F0A403AA600E28AA2 /* ossimStreamBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimStreamBase.cpp; sourceTree = "<group>"; };
-		43D984410A403AA600E28AA2 /* ossimStreamFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimStreamFactory.cpp; sourceTree = "<group>"; };
-		43D984430A403AA600E28AA2 /* ossimStreamFactoryRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimStreamFactoryRegistry.cpp; sourceTree = "<group>"; };
-		43D984450A403AA600E28AA2 /* ossimString.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimString.cpp; sourceTree = "<group>"; };
-		43D984470A403AA600E28AA2 /* ossimStringListProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimStringListProperty.cpp; sourceTree = "<group>"; };
-		43D984490A403AA600E28AA2 /* ossimStringProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimStringProperty.cpp; sourceTree = "<group>"; };
-		43D9844B0A403AA600E28AA2 /* ossimTDpt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTDpt.cpp; sourceTree = "<group>"; };
-		43D9844D0A403AA600E28AA2 /* ossimTempFilename.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTempFilename.cpp; sourceTree = "<group>"; };
-		43D9844F0A403AA600E28AA2 /* ossimTextProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTextProperty.cpp; sourceTree = "<group>"; };
-		43D984510A403AA600E28AA2 /* ossimThreeParamDatum.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimThreeParamDatum.cpp; sourceTree = "<group>"; };
-		43D984530A403AA600E28AA2 /* ossimTieGpt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTieGpt.cpp; sourceTree = "<group>"; };
-		43D984550A403AA600E28AA2 /* ossimTieGptSet.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTieGptSet.cpp; sourceTree = "<group>"; };
-		43D984570A403AA600E28AA2 /* ossimTileHash.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTileHash.cpp; sourceTree = "<group>"; };
-		43D984590A403AA600E28AA2 /* ossimTiledImageHash.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTiledImageHash.cpp; sourceTree = "<group>"; };
-		43D9845B0A403AA600E28AA2 /* ossimTrace.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTrace.cpp; sourceTree = "<group>"; };
-		43D9845D0A403AA600E28AA2 /* ossimTraceManager.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTraceManager.cpp; sourceTree = "<group>"; };
-		43D9845F0A403AA600E28AA2 /* ossimUnitConversionTool.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimUnitConversionTool.cpp; sourceTree = "<group>"; };
-		43D984610A403AA600E28AA2 /* ossimUnitTypeLut.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimUnitTypeLut.cpp; sourceTree = "<group>"; };
-		43D984630A403AA600E28AA2 /* ossimUsgsQuad.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimUsgsQuad.cpp; sourceTree = "<group>"; };
-		43D984650A403AA600E28AA2 /* ossimViewController.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimViewController.cpp; sourceTree = "<group>"; };
-		43D984670A403AA600E28AA2 /* ossimViewEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimViewEvent.cpp; sourceTree = "<group>"; };
-		43D984690A403AA600E28AA2 /* ossimViewInterface.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimViewInterface.cpp; sourceTree = "<group>"; };
-		43D9846B0A403AA600E28AA2 /* ossimViewListener.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimViewListener.cpp; sourceTree = "<group>"; };
-		43D9846D0A403AA600E28AA2 /* ossimVrect.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVrect.cpp; sourceTree = "<group>"; };
-		43D9846F0A403AA600E28AA2 /* ossimWgs72Datum.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimWgs72Datum.cpp; sourceTree = "<group>"; };
-		43D984710A403AA600E28AA2 /* ossimWgs84Datum.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimWgs84Datum.cpp; sourceTree = "<group>"; };
-		43D984730A403AA600E28AA2 /* ossimXmlAttribute.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimXmlAttribute.cpp; sourceTree = "<group>"; };
-		43D984750A403AA600E28AA2 /* ossimXmlDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimXmlDocument.cpp; sourceTree = "<group>"; };
-		43D984770A403AA600E28AA2 /* ossimXmlNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimXmlNode.cpp; sourceTree = "<group>"; };
-		43D984790A403AA600E28AA2 /* ossimXmlString.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimXmlString.cpp; sourceTree = "<group>"; };
-		43D9848E0A403AA600E28AA2 /* ossimDtedFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDtedFactory.cpp; sourceTree = "<group>"; };
-		43D984900A403AA600E28AA2 /* ossimDtedHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDtedHandler.cpp; sourceTree = "<group>"; };
-		43D984920A403AA600E28AA2 /* ossimElevCellHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimElevCellHandler.cpp; sourceTree = "<group>"; };
-		43D984940A403AA600E28AA2 /* ossimElevCellHandlerFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimElevCellHandlerFactory.cpp; sourceTree = "<group>"; };
-		43D984960A403AA600E28AA2 /* ossimElevManager.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimElevManager.cpp; sourceTree = "<group>"; };
-		43D984980A403AA600E28AA2 /* ossimElevSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimElevSource.cpp; sourceTree = "<group>"; };
-		43D9849A0A403AA600E28AA2 /* ossimElevSourceFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimElevSourceFactory.cpp; sourceTree = "<group>"; };
-		43D9849E0A403AA600E28AA2 /* ossimGeneralRasterElevFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeneralRasterElevFactory.cpp; sourceTree = "<group>"; };
-		43D984A00A403AA600E28AA2 /* ossimGeneralRasterElevHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeneralRasterElevHandler.cpp; sourceTree = "<group>"; };
-		43D984A20A403AA600E28AA2 /* ossimSrtmFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSrtmFactory.cpp; sourceTree = "<group>"; };
-		43D984A40A403AA600E28AA2 /* ossimSrtmHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSrtmHandler.cpp; sourceTree = "<group>"; };
-		43D984AF0A403AA600E28AA2 /* ossimFont.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFont.cpp; sourceTree = "<group>"; };
-		43D984B10A403AA600E28AA2 /* ossimFontFactoryRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFontFactoryRegistry.cpp; sourceTree = "<group>"; };
-		43D984B30A403AA600E28AA2 /* ossimFreeTypeFont.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFreeTypeFont.cpp; sourceTree = "<group>"; };
-		43D984B50A403AA600E28AA2 /* ossimFreeTypeFontFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFreeTypeFontFactory.cpp; sourceTree = "<group>"; };
-		43D984B70A403AA600E28AA2 /* ossimGdBitmapFont.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGdBitmapFont.cpp; sourceTree = "<group>"; };
-		43D9858A0A403AA600E28AA2 /* ossim3x3ConvolutionFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossim3x3ConvolutionFilter.cpp; sourceTree = "<group>"; };
-		43D9858C0A403AA600E28AA2 /* ossimAOD.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAOD.cpp; sourceTree = "<group>"; };
-		43D9858E0A403AA600E28AA2 /* ossimAdrgHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAdrgHeader.cpp; sourceTree = "<group>"; };
-		43D985900A403AA600E28AA2 /* ossimAdrgTileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAdrgTileSource.cpp; sourceTree = "<group>"; };
-		43D985920A403AA600E28AA2 /* ossimAnnotationEllipseObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAnnotationEllipseObject.cpp; sourceTree = "<group>"; };
-		43D985940A403AA600E28AA2 /* ossimAnnotationFontObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAnnotationFontObject.cpp; sourceTree = "<group>"; };
-		43D985960A403AA600E28AA2 /* ossimAnnotationGdBitmapFont.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAnnotationGdBitmapFont.cpp; sourceTree = "<group>"; };
-		43D985980A403AA600E28AA2 /* ossimAnnotationLineObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAnnotationLineObject.cpp; sourceTree = "<group>"; };
-		43D9859A0A403AA600E28AA2 /* ossimAnnotationMultiEllipseObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAnnotationMultiEllipseObject.cpp; sourceTree = "<group>"; };
-		43D9859C0A403AA600E28AA2 /* ossimAnnotationMultiLineObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAnnotationMultiLineObject.cpp; sourceTree = "<group>"; };
-		43D9859E0A403AA600E28AA2 /* ossimAnnotationMultiPolyLineObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAnnotationMultiPolyLineObject.cpp; sourceTree = "<group>"; };
-		43D985A00A403AA600E28AA2 /* ossimAnnotationMultiPolyObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAnnotationMultiPolyObject.cpp; sourceTree = "<group>"; };
-		43D985A20A403AA700E28AA2 /* ossimAnnotationObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAnnotationObject.cpp; sourceTree = "<group>"; };
-		43D985A40A403AA700E28AA2 /* ossimAnnotationObjectFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAnnotationObjectFactory.cpp; sourceTree = "<group>"; };
-		43D985A60A403AA700E28AA2 /* ossimAnnotationPolyObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAnnotationPolyObject.cpp; sourceTree = "<group>"; };
-		43D985A80A403AA700E28AA2 /* ossimAnnotationSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAnnotationSource.cpp; sourceTree = "<group>"; };
-		43D985AA0A403AA700E28AA2 /* ossimAppFixedTileCache.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAppFixedTileCache.cpp; sourceTree = "<group>"; };
-		43D985AC0A403AA700E28AA2 /* ossimAppTileCache.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAppTileCache.cpp; sourceTree = "<group>"; };
-		43D985AE0A403AA700E28AA2 /* ossimArcInfoGridWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimArcInfoGridWriter.cpp; sourceTree = "<group>"; };
-		43D985B00A403AA700E28AA2 /* ossimAtCorrGridRemapper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAtCorrGridRemapper.cpp; sourceTree = "<group>"; };
-		43D985B20A403AA700E28AA2 /* ossimAtCorrRemapper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAtCorrRemapper.cpp; sourceTree = "<group>"; };
-		43D985B40A403AA700E28AA2 /* ossimAtbController.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAtbController.cpp; sourceTree = "<group>"; };
-		43D985B60A403AA700E28AA2 /* ossimAtbMatchPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAtbMatchPoint.cpp; sourceTree = "<group>"; };
-		43D985B80A403AA700E28AA2 /* ossimAtbPointSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAtbPointSource.cpp; sourceTree = "<group>"; };
-		43D985BA0A403AA700E28AA2 /* ossimBandAverageFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimBandAverageFilter.cpp; sourceTree = "<group>"; };
-		43D985BC0A403AA700E28AA2 /* ossimBandClipFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimBandClipFilter.cpp; sourceTree = "<group>"; };
-		43D985BE0A403AA700E28AA2 /* ossimBandMergeSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimBandMergeSource.cpp; sourceTree = "<group>"; };
-		43D985C00A403AA700E28AA2 /* ossimBandSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimBandSelector.cpp; sourceTree = "<group>"; };
-		43D985C20A403AA700E28AA2 /* ossimBlendMosaic.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimBlendMosaic.cpp; sourceTree = "<group>"; };
-		43D985C40A403AA700E28AA2 /* ossimBrightnessContrastSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimBrightnessContrastSource.cpp; sourceTree = "<group>"; };
-		43D985C60A403AA700E28AA2 /* ossimBrightnessMatch.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimBrightnessMatch.cpp; sourceTree = "<group>"; };
-		43D985C80A403AA700E28AA2 /* ossimBumpShadeTileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimBumpShadeTileSource.cpp; sourceTree = "<group>"; };
-		43D985CA0A403AA700E28AA2 /* ossimCacheTileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimCacheTileSource.cpp; sourceTree = "<group>"; };
-		43D985CC0A403AA700E28AA2 /* ossimCastTileSourceFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimCastTileSourceFilter.cpp; sourceTree = "<group>"; };
-		43D985CE0A403AA700E28AA2 /* ossimCcfHead.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimCcfHead.cpp; sourceTree = "<group>"; };
-		43D985D00A403AA700E28AA2 /* ossimCcfTileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimCcfTileSource.cpp; sourceTree = "<group>"; };
-		43D985D20A403AA700E28AA2 /* ossimCibCadrgTileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimCibCadrgTileSource.cpp; sourceTree = "<group>"; };
-		43D985D40A403AA700E28AA2 /* ossimClosestToCenterCombiner.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimClosestToCenterCombiner.cpp; sourceTree = "<group>"; };
-		43D985D60A403AA700E28AA2 /* ossimColorNormalizedFusion.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimColorNormalizedFusion.cpp; sourceTree = "<group>"; };
-		43D985D80A403AA700E28AA2 /* ossimConvolutionFilter1D.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimConvolutionFilter1D.cpp; sourceTree = "<group>"; };
-		43D985DA0A403AA700E28AA2 /* ossimConvolutionSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimConvolutionSource.cpp; sourceTree = "<group>"; };
-		43D985DC0A403AA700E28AA2 /* ossimDdffield.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDdffield.cpp; sourceTree = "<group>"; };
-		43D985DE0A403AA700E28AA2 /* ossimDdffielddefn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDdffielddefn.cpp; sourceTree = "<group>"; };
-		43D985E00A403AA700E28AA2 /* ossimDdfmodule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDdfmodule.cpp; sourceTree = "<group>"; };
-		43D985E20A403AA700E28AA2 /* ossimDdfrecord.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDdfrecord.cpp; sourceTree = "<group>"; };
-		43D985E40A403AA700E28AA2 /* ossimDdfsubfielddefn.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDdfsubfielddefn.cpp; sourceTree = "<group>"; };
-		43D985E60A403AA700E28AA2 /* ossimDdfutils.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDdfutils.cpp; sourceTree = "<group>"; };
-		43D985E80A403AA700E28AA2 /* ossimDiscrete3x3HatFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDiscrete3x3HatFilter.cpp; sourceTree = "<group>"; };
-		43D985EA0A403AA700E28AA2 /* ossimDiscreteConvolutionKernel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDiscreteConvolutionKernel.cpp; sourceTree = "<group>"; };
-		43D985EC0A403AA700E28AA2 /* ossimDoqqTileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDoqqTileSource.cpp; sourceTree = "<group>"; };
-		43D985EE0A403AA700E28AA2 /* ossimDtedElevationImageSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDtedElevationImageSource.cpp; sourceTree = "<group>"; };
-		43D985F00A403AA700E28AA2 /* ossimDtedTileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDtedTileSource.cpp; sourceTree = "<group>"; };
-		43D985F20A403AA700E28AA2 /* ossimERSTileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimERSTileSource.cpp; sourceTree = "<group>"; };
-		43D985F40A403AA700E28AA2 /* ossimEastingNorthingCutter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimEastingNorthingCutter.cpp; sourceTree = "<group>"; };
-		43D985F60A403AA700E28AA2 /* ossimEdgeFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimEdgeFilter.cpp; sourceTree = "<group>"; };
-		43D985F80A403AA700E28AA2 /* ossimElevImageSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimElevImageSource.cpp; sourceTree = "<group>"; };
-		43D985FA0A403AA700E28AA2 /* ossimEnviHeaderFileWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimEnviHeaderFileWriter.cpp; sourceTree = "<group>"; };
-		43D985FC0A403AA700E28AA2 /* ossimEquationCombiner.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimEquationCombiner.cpp; sourceTree = "<group>"; };
-		43D986020A403AA700E28AA2 /* ossimFeatherMosaic.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFeatherMosaic.cpp; sourceTree = "<group>"; };
-		43D986040A403AA700E28AA2 /* ossimFftFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFftFilter.cpp; sourceTree = "<group>"; };
-		43D986060A403AA700E28AA2 /* ossimFgdcFileWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFgdcFileWriter.cpp; sourceTree = "<group>"; };
-		43D986080A403AA700E28AA2 /* ossimFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFilter.cpp; sourceTree = "<group>"; };
-		43D9860A0A403AA700E28AA2 /* ossimFilterResampler.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFilterResampler.cpp; sourceTree = "<group>"; };
-		43D9860C0A403AA700E28AA2 /* ossimFilterTable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFilterTable.cpp; sourceTree = "<group>"; };
-		43D9860E0A403AA700E28AA2 /* ossimFixedTileCache.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFixedTileCache.cpp; sourceTree = "<group>"; };
-		43D986100A403AA700E28AA2 /* ossimFusionCombiner.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFusionCombiner.cpp; sourceTree = "<group>"; };
-		43D986120A403AA700E28AA2 /* ossimGammaRemapper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGammaRemapper.cpp; sourceTree = "<group>"; };
-		43D986140A403AA700E28AA2 /* ossimGeneralRasterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeneralRasterInfo.cpp; sourceTree = "<group>"; };
-		43D986160A403AA700E28AA2 /* ossimGeneralRasterTileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeneralRasterTileSource.cpp; sourceTree = "<group>"; };
-		43D986180A403AA700E28AA2 /* ossimGeneralRasterWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeneralRasterWriter.cpp; sourceTree = "<group>"; };
-		43D9861A0A403AA700E28AA2 /* ossimGeoAnnotationBitmap.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoAnnotationBitmap.cpp; sourceTree = "<group>"; };
-		43D9861C0A403AA700E28AA2 /* ossimGeoAnnotationEllipseObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoAnnotationEllipseObject.cpp; sourceTree = "<group>"; };
-		43D9861E0A403AA700E28AA2 /* ossimGeoAnnotationFontObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoAnnotationFontObject.cpp; sourceTree = "<group>"; };
-		43D986200A403AA700E28AA2 /* ossimGeoAnnotationGdBitmapFont.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoAnnotationGdBitmapFont.cpp; sourceTree = "<group>"; };
-		43D986220A403AA700E28AA2 /* ossimGeoAnnotationLineObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoAnnotationLineObject.cpp; sourceTree = "<group>"; };
-		43D986240A403AA700E28AA2 /* ossimGeoAnnotationMultiEllipseObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoAnnotationMultiEllipseObject.cpp; sourceTree = "<group>"; };
-		43D986260A403AA700E28AA2 /* ossimGeoAnnotationMultiPolyLineObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoAnnotationMultiPolyLineObject.cpp; sourceTree = "<group>"; };
-		43D986280A403AA700E28AA2 /* ossimGeoAnnotationMultiPolyObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoAnnotationMultiPolyObject.cpp; sourceTree = "<group>"; };
-		43D9862A0A403AA700E28AA2 /* ossimGeoAnnotationObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoAnnotationObject.cpp; sourceTree = "<group>"; };
-		43D9862C0A403AA700E28AA2 /* ossimGeoAnnotationPolyLineObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoAnnotationPolyLineObject.cpp; sourceTree = "<group>"; };
-		43D9862E0A403AA700E28AA2 /* ossimGeoAnnotationPolyObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoAnnotationPolyObject.cpp; sourceTree = "<group>"; };
-		43D986300A403AA700E28AA2 /* ossimGeoAnnotationSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoAnnotationSource.cpp; sourceTree = "<group>"; };
-		43D986320A403AA700E28AA2 /* ossimGeoPolyCutter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoPolyCutter.cpp; sourceTree = "<group>"; };
-		43D986340A403AA700E28AA2 /* ossimGeographicAnnotationGrid.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeographicAnnotationGrid.cpp; sourceTree = "<group>"; };
-		43D986360A403AA700E28AA2 /* ossimGeomFileWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeomFileWriter.cpp; sourceTree = "<group>"; };
-		43D986380A403AA700E28AA2 /* ossimGridRemapEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGridRemapEngine.cpp; sourceTree = "<group>"; };
-		43D9863A0A403AA700E28AA2 /* ossimGridRemapEngineFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGridRemapEngineFactory.cpp; sourceTree = "<group>"; };
-		43D9863C0A403AA700E28AA2 /* ossimGridRemapSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGridRemapSource.cpp; sourceTree = "<group>"; };
-		43D9863E0A403AA700E28AA2 /* ossimHistoMatchRemapper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimHistoMatchRemapper.cpp; sourceTree = "<group>"; };
-		43D986400A403AA700E28AA2 /* ossimHistogramEqualization.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimHistogramEqualization.cpp; sourceTree = "<group>"; };
-		43D986420A403AA700E28AA2 /* ossimHistogramMatchFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimHistogramMatchFilter.cpp; sourceTree = "<group>"; };
-		43D986440A403AA700E28AA2 /* ossimHistogramRemapper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimHistogramRemapper.cpp; sourceTree = "<group>"; };
-		43D986460A403AA700E28AA2 /* ossimHistogramThreshholdFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimHistogramThreshholdFilter.cpp; sourceTree = "<group>"; };
-		43D986480A403AA700E28AA2 /* ossimHistogramWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimHistogramWriter.cpp; sourceTree = "<group>"; };
-		43D9864A0A403AA700E28AA2 /* ossimHsiRemapper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimHsiRemapper.cpp; sourceTree = "<group>"; };
-		43D9864C0A403AA700E28AA2 /* ossimHsiToRgbSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimHsiToRgbSource.cpp; sourceTree = "<group>"; };
-		43D9864E0A403AA700E28AA2 /* ossimHsvGridRemapEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimHsvGridRemapEngine.cpp; sourceTree = "<group>"; };
-		43D986500A403AA700E28AA2 /* ossimHsvToRgbSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimHsvToRgbSource.cpp; sourceTree = "<group>"; };
-		43D986520A403AA700E28AA2 /* ossimIgenGenerator.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimIgenGenerator.cpp; sourceTree = "<group>"; };
-		43D986540A403AA700E28AA2 /* ossimImageChain.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageChain.cpp; sourceTree = "<group>"; };
-		43D986560A403AA700E28AA2 /* ossimImageCombiner.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageCombiner.cpp; sourceTree = "<group>"; };
-		43D986580A403AA700E28AA2 /* ossimImageData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageData.cpp; sourceTree = "<group>"; };
-		43D9865A0A403AA700E28AA2 /* ossimImageDataFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageDataFactory.cpp; sourceTree = "<group>"; };
-		43D9865C0A403AA700E28AA2 /* ossimImageDataHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageDataHelper.cpp; sourceTree = "<group>"; };
-		43D9865E0A403AA700E28AA2 /* ossimImageDisplayWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageDisplayWriter.cpp; sourceTree = "<group>"; };
-		43D986600A403AA700E28AA2 /* ossimImageFileWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageFileWriter.cpp; sourceTree = "<group>"; };
-		43D986620A403AA700E28AA2 /* ossimImageGaussianFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageGaussianFilter.cpp; sourceTree = "<group>"; };
-		43D986640A403AA700E28AA2 /* ossimImageHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageHandler.cpp; sourceTree = "<group>"; };
-		43D986660A403AA700E28AA2 /* ossimImageHandlerFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageHandlerFactory.cpp; sourceTree = "<group>"; };
-		43D986680A403AA700E28AA2 /* ossimImageHandlerFactoryBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageHandlerFactoryBase.cpp; sourceTree = "<group>"; };
-		43D9866A0A403AA700E28AA2 /* ossimImageHandlerRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageHandlerRegistry.cpp; sourceTree = "<group>"; };
-		43D9866C0A403AA700E28AA2 /* ossimImageHistogramSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageHistogramSource.cpp; sourceTree = "<group>"; };
-		43D9866E0A403AA700E28AA2 /* ossimImageMetaData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageMetaData.cpp; sourceTree = "<group>"; };
-		43D986700A403AA700E28AA2 /* ossimImageMetaDataWriterFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageMetaDataWriterFactory.cpp; sourceTree = "<group>"; };
-		43D986720A403AA700E28AA2 /* ossimImageMetaDataWriterFactoryBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageMetaDataWriterFactoryBase.cpp; sourceTree = "<group>"; };
-		43D986740A403AA700E28AA2 /* ossimImageMetaDataWriterRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageMetaDataWriterRegistry.cpp; sourceTree = "<group>"; };
-		43D986760A403AA700E28AA2 /* ossimImageMosaic.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageMosaic.cpp; sourceTree = "<group>"; };
-		43D986780A403AA700E28AA2 /* ossimImageReconstructionFilterFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageReconstructionFilterFactory.cpp; sourceTree = "<group>"; };
-		43D9867A0A403AA700E28AA2 /* ossimImageReconstructionFilterRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageReconstructionFilterRegistry.cpp; sourceTree = "<group>"; };
-		43D9867C0A403AA700E28AA2 /* ossimImageRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageRenderer.cpp; sourceTree = "<group>"; };
-		43D986800A403AA700E28AA2 /* ossimImageSharpenFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageSharpenFilter.cpp; sourceTree = "<group>"; };
-		43D986820A403AA700E28AA2 /* ossimImageSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageSource.cpp; sourceTree = "<group>"; };
-		43D986840A403AA700E28AA2 /* ossimImageSourceFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageSourceFactory.cpp; sourceTree = "<group>"; };
-		43D986860A403AA700E28AA2 /* ossimImageSourceFactoryBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageSourceFactoryBase.cpp; sourceTree = "<group>"; };
-		43D986880A403AA700E28AA2 /* ossimImageSourceFactoryRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageSourceFactoryRegistry.cpp; sourceTree = "<group>"; };
-		43D9868A0A403AA700E28AA2 /* ossimImageSourceFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageSourceFilter.cpp; sourceTree = "<group>"; };
-		43D9868C0A403AA700E28AA2 /* ossimImageSourceHistogramFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageSourceHistogramFilter.cpp; sourceTree = "<group>"; };
-		43D986900A403AA700E28AA2 /* ossimImageSourceSequencer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageSourceSequencer.cpp; sourceTree = "<group>"; };
-		43D986920A403AA700E28AA2 /* ossimImageStatisticsSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageStatisticsSource.cpp; sourceTree = "<group>"; };
-		43D986940A403AA700E28AA2 /* ossimImageToPlaneNormalFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageToPlaneNormalFilter.cpp; sourceTree = "<group>"; };
-		43D986960A403AA700E28AA2 /* ossimImageWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageWriter.cpp; sourceTree = "<group>"; };
-		43D986980A403AA700E28AA2 /* ossimImageWriterFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageWriterFactory.cpp; sourceTree = "<group>"; };
-		43D9869A0A403AA700E28AA2 /* ossimImageWriterFactoryBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageWriterFactoryBase.cpp; sourceTree = "<group>"; };
-		43D9869C0A403AA700E28AA2 /* ossimImageWriterFactoryRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageWriterFactoryRegistry.cpp; sourceTree = "<group>"; };
-		43D9869E0A403AA700E28AA2 /* ossimIndexToRgbLutFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimIndexToRgbLutFilter.cpp; sourceTree = "<group>"; };
-		43D986A00A403AA700E28AA2 /* ossimIntensityAdjustmentFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimIntensityAdjustmentFilter.cpp; sourceTree = "<group>"; };
-		43D986A20A403AA700E28AA2 /* ossimJpegTileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimJpegTileSource.cpp; sourceTree = "<group>"; };
-		43D986A40A403AA700E28AA2 /* ossimJpegWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimJpegWriter.cpp; sourceTree = "<group>"; };
-		43D986A60A403AA700E28AA2 /* ossimJpegYCbCrToRgbSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimJpegYCbCrToRgbSource.cpp; sourceTree = "<group>"; };
-		43D986A80A403AA700E28AA2 /* ossimLandsatTileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimLandsatTileSource.cpp; sourceTree = "<group>"; };
-		43D986AA0A403AA700E28AA2 /* ossimLandsatTopoCorrectionFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimLandsatTopoCorrectionFilter.cpp; sourceTree = "<group>"; };
-		43D986AC0A403AA700E28AA2 /* ossimLocalCorrelationFusion.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimLocalCorrelationFusion.cpp; sourceTree = "<group>"; };
-		43D986AE0A403AA700E28AA2 /* ossimMapCompositionSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMapCompositionSource.cpp; sourceTree = "<group>"; };
-		43D986B00A403AA700E28AA2 /* ossimMaskFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMaskFilter.cpp; sourceTree = "<group>"; };
-		43D986B20A403AA700E28AA2 /* ossimMaxMosaic.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMaxMosaic.cpp; sourceTree = "<group>"; };
-		43D986B40A403AA700E28AA2 /* ossimMeanMedianFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMeanMedianFilter.cpp; sourceTree = "<group>"; };
-		43D986B60A403AA700E28AA2 /* ossimMetadataFileWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMetadataFileWriter.cpp; sourceTree = "<group>"; };
-		43D986B80A403AA700E28AA2 /* ossimMonoGridRemapEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMonoGridRemapEngine.cpp; sourceTree = "<group>"; };
-		43D986BA0A403AA700E28AA2 /* ossimMultiBandHistogramTileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMultiBandHistogramTileSource.cpp; sourceTree = "<group>"; };
-		43D986BC0A403AA700E28AA2 /* ossimNBandToIndexFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNBandToIndexFilter.cpp; sourceTree = "<group>"; };
-		43D986BE0A403AA700E28AA2 /* ossimNitfTileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfTileSource.cpp; sourceTree = "<group>"; };
-		43D986C00A403AA700E28AA2 /* ossimNitfWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfWriter.cpp; sourceTree = "<group>"; };
-		43D986C20A403AA700E28AA2 /* ossimNormalizedRemapTable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNormalizedRemapTable.cpp; sourceTree = "<group>"; };
-		43D986C40A403AA700E28AA2 /* ossimNormalizedU11RemapTable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNormalizedU11RemapTable.cpp; sourceTree = "<group>"; };
-		43D986C60A403AA700E28AA2 /* ossimNormalizedU16RemapTable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNormalizedU16RemapTable.cpp; sourceTree = "<group>"; };
-		43D986C80A403AA700E28AA2 /* ossimNormalizedU8RemapTable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNormalizedU8RemapTable.cpp; sourceTree = "<group>"; };
-		43D986CA0A403AA700E28AA2 /* ossimOrthoImageMosaic.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimOrthoImageMosaic.cpp; sourceTree = "<group>"; };
-		43D986CC0A403AA700E28AA2 /* ossimPixelFlipper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPixelFlipper.cpp; sourceTree = "<group>"; };
-		43D986CE0A403AA700E28AA2 /* ossimPolyCutter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPolyCutter.cpp; sourceTree = "<group>"; };
-		43D986D00A403AA700E28AA2 /* ossimQuickbirdNitfTileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimQuickbirdNitfTileSource.cpp; sourceTree = "<group>"; };
-		43D986D20A403AA700E28AA2 /* ossimQuickbirdTiffTileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimQuickbirdTiffTileSource.cpp; sourceTree = "<group>"; };
-		43D986D40A403AA700E28AA2 /* ossimRLevelFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRLevelFilter.cpp; sourceTree = "<group>"; };
-		43D986D60A403AA700E28AA2 /* ossimReadmeFileWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimReadmeFileWriter.cpp; sourceTree = "<group>"; };
-		43D986D80A403AA700E28AA2 /* ossimRectangleCutFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRectangleCutFilter.cpp; sourceTree = "<group>"; };
-		43D986DA0A403AA700E28AA2 /* ossimResampler.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimResampler.cpp; sourceTree = "<group>"; };
-		43D986DC0A403AA700E28AA2 /* ossimRgbGridRemapEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRgbGridRemapEngine.cpp; sourceTree = "<group>"; };
-		43D986DE0A403AA700E28AA2 /* ossimRgbImage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRgbImage.cpp; sourceTree = "<group>"; };
-		43D986E00A403AA700E28AA2 /* ossimRgbToGreyFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRgbToGreyFilter.cpp; sourceTree = "<group>"; };
-		43D986E20A403AA700E28AA2 /* ossimRgbToHsiSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRgbToHsiSource.cpp; sourceTree = "<group>"; };
-		43D986E40A403AA700E28AA2 /* ossimRgbToHsvSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRgbToHsvSource.cpp; sourceTree = "<group>"; };
-		43D986E60A403AA700E28AA2 /* ossimRgbToIndexFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRgbToIndexFilter.cpp; sourceTree = "<group>"; };
-		43D986E80A403AA700E28AA2 /* ossimRgbToJpegYCbCrSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRgbToJpegYCbCrSource.cpp; sourceTree = "<group>"; };
-		43D986EA0A403AA700E28AA2 /* ossimS16ImageData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimS16ImageData.cpp; sourceTree = "<group>"; };
-		43D986EC0A403AA700E28AA2 /* ossimSFIMFusion.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSFIMFusion.cpp; sourceTree = "<group>"; };
-		43D986EE0A403AA700E28AA2 /* ossimScalarRemapper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimScalarRemapper.cpp; sourceTree = "<group>"; };
-		43D986F00A403AA700E28AA2 /* ossimScaleFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimScaleFilter.cpp; sourceTree = "<group>"; };
-		43D986F20A403AA700E28AA2 /* ossimSrtmTileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSrtmTileSource.cpp; sourceTree = "<group>"; };
-		43D986F40A403AA700E28AA2 /* ossimSubImageTileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSubImageTileSource.cpp; sourceTree = "<group>"; };
-		43D986F60A403AA700E28AA2 /* ossimTableRemapper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTableRemapper.cpp; sourceTree = "<group>"; };
-		43D986F80A403AA700E28AA2 /* ossimTiffOverviewBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTiffOverviewBuilder.cpp; sourceTree = "<group>"; };
-		43D986FA0A403AA800E28AA2 /* ossimTiffTileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTiffTileSource.cpp; sourceTree = "<group>"; };
-		43D986FC0A403AA800E28AA2 /* ossimTiffWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTiffWriter.cpp; sourceTree = "<group>"; };
-		43D986FE0A403AA800E28AA2 /* ossimTileCache.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTileCache.cpp; sourceTree = "<group>"; };
-		43D987000A403AA800E28AA2 /* ossimTilePatch.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTilePatch.cpp; sourceTree = "<group>"; };
-		43D987020A403AA800E28AA2 /* ossimTiling.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTiling.cpp; sourceTree = "<group>"; };
-		43D987040A403AA800E28AA2 /* ossimTopographicCorrectionFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTopographicCorrectionFilter.cpp; sourceTree = "<group>"; };
-		43D987060A403AA800E28AA2 /* ossimTrimFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTrimFilter.cpp; sourceTree = "<group>"; };
-		43D987080A403AA800E28AA2 /* ossimU11ImageData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimU11ImageData.cpp; sourceTree = "<group>"; };
-		43D9870A0A403AA800E28AA2 /* ossimU16ImageData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimU16ImageData.cpp; sourceTree = "<group>"; };
-		43D9870C0A403AA800E28AA2 /* ossimU8ImageData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimU8ImageData.cpp; sourceTree = "<group>"; };
-		43D9870E0A403AA800E28AA2 /* ossimUsgsDemTileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimUsgsDemTileSource.cpp; sourceTree = "<group>"; };
-		43D987100A403AA800E28AA2 /* ossimValueAssignImageSourceFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimValueAssignImageSourceFilter.cpp; sourceTree = "<group>"; };
-		43D987120A403AA800E28AA2 /* ossimVectorRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVectorRenderer.cpp; sourceTree = "<group>"; };
-		43D987140A403AA800E28AA2 /* ossimVertexExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVertexExtractor.cpp; sourceTree = "<group>"; };
-		43D987160A403AA800E28AA2 /* ossimVpfAnnotationCoverageInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVpfAnnotationCoverageInfo.cpp; sourceTree = "<group>"; };
-		43D987180A403AA800E28AA2 /* ossimVpfAnnotationFeatureInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVpfAnnotationFeatureInfo.cpp; sourceTree = "<group>"; };
-		43D9871A0A403AA800E28AA2 /* ossimVpfAnnotationLibraryInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVpfAnnotationLibraryInfo.cpp; sourceTree = "<group>"; };
-		43D9871C0A403AA800E28AA2 /* ossimVpfAnnotationSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVpfAnnotationSource.cpp; sourceTree = "<group>"; };
-		43D9871E0A403AA800E28AA2 /* ossimVpfTileSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVpfTileSource.cpp; sourceTree = "<group>"; };
-		43D987200A403AA800E28AA2 /* ossimWatermarkFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimWatermarkFilter.cpp; sourceTree = "<group>"; };
-		43D987220A403AA800E28AA2 /* ossimWorldFileWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimWorldFileWriter.cpp; sourceTree = "<group>"; };
-		43D987290A403AA800E28AA2 /* ossimInit.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimInit.cpp; sourceTree = "<group>"; };
-		43D987380A403AA800E28AA2 /* booleng.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = booleng.cpp; sourceTree = "<group>"; };
-		43D9873A0A403AA800E28AA2 /* graph.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = graph.cpp; sourceTree = "<group>"; };
-		43D9873C0A403AA800E28AA2 /* graphlst.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = graphlst.cpp; sourceTree = "<group>"; };
-		43D9873E0A403AA800E28AA2 /* line.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = line.cpp; sourceTree = "<group>"; };
-		43D987400A403AA800E28AA2 /* link.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = link.cpp; sourceTree = "<group>"; };
-		43D987420A403AA800E28AA2 /* lpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = lpoint.cpp; sourceTree = "<group>"; };
-		43D987440A403AA800E28AA2 /* node.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = node.cpp; sourceTree = "<group>"; };
-		43D987460A403AA800E28AA2 /* record.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = record.cpp; sourceTree = "<group>"; };
-		43D987480A403AA800E28AA2 /* scanbeam.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = scanbeam.cpp; sourceTree = "<group>"; };
-		43D987660A403AA800E28AA2 /* bandmat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = bandmat.cpp; sourceTree = "<group>"; };
-		43D9876B0A403AA800E28AA2 /* cholesky.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = cholesky.cpp; sourceTree = "<group>"; };
-		43D9876D0A403AA800E28AA2 /* evalue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = evalue.cpp; sourceTree = "<group>"; };
-		43D987700A403AA800E28AA2 /* fft.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = fft.cpp; sourceTree = "<group>"; };
-		43D987730A403AA800E28AA2 /* hholder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = hholder.cpp; sourceTree = "<group>"; };
-		43D987750A403AA800E28AA2 /* jacobi.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = jacobi.cpp; sourceTree = "<group>"; };
-		43D987790A403AA800E28AA2 /* myexcept.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = myexcept.cpp; sourceTree = "<group>"; };
-		43D9877B0A403AA800E28AA2 /* newfft.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = newfft.cpp; sourceTree = "<group>"; };
-		43D9877E0A403AA800E28AA2 /* newmat1.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = newmat1.cpp; sourceTree = "<group>"; };
-		43D987800A403AA800E28AA2 /* newmat2.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = newmat2.cpp; sourceTree = "<group>"; };
-		43D987820A403AA800E28AA2 /* newmat3.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = newmat3.cpp; sourceTree = "<group>"; };
-		43D987840A403AA800E28AA2 /* newmat4.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = newmat4.cpp; sourceTree = "<group>"; };
-		43D987860A403AA800E28AA2 /* newmat5.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = newmat5.cpp; sourceTree = "<group>"; };
-		43D987880A403AA800E28AA2 /* newmat6.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = newmat6.cpp; sourceTree = "<group>"; };
-		43D9878A0A403AA800E28AA2 /* newmat7.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = newmat7.cpp; sourceTree = "<group>"; };
-		43D9878C0A403AA800E28AA2 /* newmat8.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = newmat8.cpp; sourceTree = "<group>"; };
-		43D9878E0A403AA800E28AA2 /* newmat9.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = newmat9.cpp; sourceTree = "<group>"; };
-		43D987900A403AA800E28AA2 /* newmatex.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = newmatex.cpp; sourceTree = "<group>"; };
-		43D987920A403AA800E28AA2 /* newmatnl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = newmatnl.cpp; sourceTree = "<group>"; };
-		43D987940A403AA800E28AA2 /* newmatrm.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = newmatrm.cpp; sourceTree = "<group>"; };
-		43D987980A403AA800E28AA2 /* solution.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = solution.cpp; sourceTree = "<group>"; };
-		43D9879A0A403AA800E28AA2 /* sort.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = sort.cpp; sourceTree = "<group>"; };
-		43D9879C0A403AA800E28AA2 /* submat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = submat.cpp; sourceTree = "<group>"; };
-		43D9879E0A403AA800E28AA2 /* svd.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = svd.cpp; sourceTree = "<group>"; };
-		43D987AC0A403AA800E28AA2 /* ossimIgen.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimIgen.cpp; sourceTree = "<group>"; };
-		43D987AE0A403AA800E28AA2 /* ossimImageMpiMWriterSequenceConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageMpiMWriterSequenceConnection.cpp; sourceTree = "<group>"; };
-		43D987B00A403AA800E28AA2 /* ossimImageMpiSWriterSequenceConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageMpiSWriterSequenceConnection.cpp; sourceTree = "<group>"; };
-		43D987B20A403AA800E28AA2 /* ossimMpi.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMpi.cpp; sourceTree = "<group>"; };
-		43D987B40A403AA800E28AA2 /* ossimOrthoIgen.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimOrthoIgen.cpp; sourceTree = "<group>"; };
-		43D987BE0A403AA800E28AA2 /* ossimDynamicLibrary.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDynamicLibrary.cpp; sourceTree = "<group>"; };
-		43D987C00A403AA800E28AA2 /* ossimPluginLibrary.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPluginLibrary.cpp; sourceTree = "<group>"; };
-		43D987C20A403AA800E28AA2 /* ossimSharedObjectBridge.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSharedObjectBridge.cpp; sourceTree = "<group>"; };
-		43D987C40A403AA800E28AA2 /* ossimSharedPluginRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSharedPluginRegistry.cpp; sourceTree = "<group>"; };
-		43D9881B0A403AA800E28AA2 /* ossimAdjMapModel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAdjMapModel.cpp; sourceTree = "<group>"; };
-		43D9881D0A403AA800E28AA2 /* ossimAffineProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAffineProjection.cpp; sourceTree = "<group>"; };
-		43D9881F0A403AA800E28AA2 /* ossimAlbersProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAlbersProjection.cpp; sourceTree = "<group>"; };
-		43D988210A403AA800E28AA2 /* ossimApplanixEcefModel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimApplanixEcefModel.cpp; sourceTree = "<group>"; };
-		43D988230A403AA800E28AA2 /* ossimApplanixUtmModel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimApplanixUtmModel.cpp; sourceTree = "<group>"; };
-		43D988250A403AA800E28AA2 /* ossimAzimEquDistProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAzimEquDistProjection.cpp; sourceTree = "<group>"; };
-		43D988270A403AA800E28AA2 /* ossimBilinearProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimBilinearProjection.cpp; sourceTree = "<group>"; };
-		43D988290A403AA800E28AA2 /* ossimBngProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimBngProjection.cpp; sourceTree = "<group>"; };
-		43D9882B0A403AA800E28AA2 /* ossimBonneProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimBonneProjection.cpp; sourceTree = "<group>"; };
-		43D9882D0A403AA800E28AA2 /* ossimCadrgProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimCadrgProjection.cpp; sourceTree = "<group>"; };
-		43D9882F0A403AA800E28AA2 /* ossimCassiniProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimCassiniProjection.cpp; sourceTree = "<group>"; };
-		43D988310A403AA800E28AA2 /* ossimCoarseGridModel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimCoarseGridModel.cpp; sourceTree = "<group>"; };
-		43D988330A403AA800E28AA2 /* ossimCylEquAreaProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimCylEquAreaProjection.cpp; sourceTree = "<group>"; };
-		43D988350A403AA800E28AA2 /* ossimEckert4Projection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimEckert4Projection.cpp; sourceTree = "<group>"; };
-		43D988370A403AA800E28AA2 /* ossimEckert6Projection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimEckert6Projection.cpp; sourceTree = "<group>"; };
-		43D988390A403AA800E28AA2 /* ossimEquDistCylProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimEquDistCylProjection.cpp; sourceTree = "<group>"; };
-		43D9883B0A403AA800E28AA2 /* ossimFcsiModel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFcsiModel.cpp; sourceTree = "<group>"; };
-		43D9883D0A403AA800E28AA2 /* ossimGnomonicProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGnomonicProjection.cpp; sourceTree = "<group>"; };
-		43D9883F0A403AA800E28AA2 /* ossimIkonosRpcModel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimIkonosRpcModel.cpp; sourceTree = "<group>"; };
-		43D988410A403AA800E28AA2 /* ossimImageViewAffineTransform.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageViewAffineTransform.cpp; sourceTree = "<group>"; };
-		43D988430A403AA800E28AA2 /* ossimImageViewProjectionTransform.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageViewProjectionTransform.cpp; sourceTree = "<group>"; };
-		43D988450A403AA800E28AA2 /* ossimImageViewTransform.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageViewTransform.cpp; sourceTree = "<group>"; };
-		43D988470A403AA800E28AA2 /* ossimImageViewTransformFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageViewTransformFactory.cpp; sourceTree = "<group>"; };
-		43D988490A403AA800E28AA2 /* ossimLambertConformalConicProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimLambertConformalConicProjection.cpp; sourceTree = "<group>"; };
-		43D9884B0A403AA800E28AA2 /* ossimLandSatModel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimLandSatModel.cpp; sourceTree = "<group>"; };
-		43D9884D0A403AA800E28AA2 /* ossimLensDistortion.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimLensDistortion.cpp; sourceTree = "<group>"; };
-		43D9884F0A403AA800E28AA2 /* ossimLlxyProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimLlxyProjection.cpp; sourceTree = "<group>"; };
-		43D988510A403AA800E28AA2 /* ossimMapProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMapProjection.cpp; sourceTree = "<group>"; };
-		43D988530A403AA800E28AA2 /* ossimMapProjectionFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMapProjectionFactory.cpp; sourceTree = "<group>"; };
-		43D988550A403AA800E28AA2 /* ossimMapProjectionInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMapProjectionInfo.cpp; sourceTree = "<group>"; };
-		43D988570A403AA800E28AA2 /* ossimMapViewController.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMapViewController.cpp; sourceTree = "<group>"; };
-		43D988590A403AA800E28AA2 /* ossimMeanRadialLensDistortion.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMeanRadialLensDistortion.cpp; sourceTree = "<group>"; };
-		43D9885B0A403AA900E28AA2 /* ossimMercatorProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMercatorProjection.cpp; sourceTree = "<group>"; };
-		43D9885D0A403AA900E28AA2 /* ossimMgrs.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ossimMgrs.c; sourceTree = "<group>"; };
-		43D9885F0A403AA900E28AA2 /* ossimMillerProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMillerProjection.cpp; sourceTree = "<group>"; };
-		43D988610A403AA900E28AA2 /* ossimMiscProjectionFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMiscProjectionFactory.cpp; sourceTree = "<group>"; };
-		43D988630A403AA900E28AA2 /* ossimMollweidProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimMollweidProjection.cpp; sourceTree = "<group>"; };
-		43D988650A403AA900E28AA2 /* ossimNewZealandMapGridProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNewZealandMapGridProjection.cpp; sourceTree = "<group>"; };
-		43D988670A403AA900E28AA2 /* ossimNitfMapModel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfMapModel.cpp; sourceTree = "<group>"; };
-		43D988690A403AA900E28AA2 /* ossimNitfProjectionFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfProjectionFactory.cpp; sourceTree = "<group>"; };
-		43D9886B0A403AA900E28AA2 /* ossimNitfRpcModel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfRpcModel.cpp; sourceTree = "<group>"; };
-		43D9886D0A403AA900E28AA2 /* ossimObliqueMercatorProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimObliqueMercatorProjection.cpp; sourceTree = "<group>"; };
-		43D9886F0A403AA900E28AA2 /* ossimOptimizableProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimOptimizableProjection.cpp; sourceTree = "<group>"; };
-		43D988710A403AA900E28AA2 /* ossimOrthoGraphicProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimOrthoGraphicProjection.cpp; sourceTree = "<group>"; };
-		43D988730A403AA900E28AA2 /* ossimPcsCodeProjectionFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPcsCodeProjectionFactory.cpp; sourceTree = "<group>"; };
-		43D988750A403AA900E28AA2 /* ossimPolarStereoProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPolarStereoProjection.cpp; sourceTree = "<group>"; };
-		43D988770A403AA900E28AA2 /* ossimPolarst.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ossimPolarst.c; sourceTree = "<group>"; };
-		43D988790A403AA900E28AA2 /* ossimPolyconicProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPolyconicProjection.cpp; sourceTree = "<group>"; };
-		43D9887B0A403AA900E28AA2 /* ossimPolynomProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimPolynomProjection.cpp; sourceTree = "<group>"; };
-		43D9887D0A403AA900E28AA2 /* ossimProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimProjection.cpp; sourceTree = "<group>"; };
-		43D9887F0A403AA900E28AA2 /* ossimProjectionFactoryBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimProjectionFactoryBase.cpp; sourceTree = "<group>"; };
-		43D988810A403AA900E28AA2 /* ossimProjectionFactoryRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimProjectionFactoryRegistry.cpp; sourceTree = "<group>"; };
-		43D988830A403AA900E28AA2 /* ossimProjectionViewControllerFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimProjectionViewControllerFactory.cpp; sourceTree = "<group>"; };
-		43D988850A403AA900E28AA2 /* ossimQuadProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimQuadProjection.cpp; sourceTree = "<group>"; };
-		43D988870A403AA900E28AA2 /* ossimQuickbirdRpcModel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimQuickbirdRpcModel.cpp; sourceTree = "<group>"; };
-		43D988890A403AA900E28AA2 /* ossimRadialDecentLensDistortion.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRadialDecentLensDistortion.cpp; sourceTree = "<group>"; };
-		43D9888B0A403AA900E28AA2 /* ossimRpcModel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpcModel.cpp; sourceTree = "<group>"; };
-		43D9888D0A403AA900E28AA2 /* ossimRpcProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpcProjection.cpp; sourceTree = "<group>"; };
-		43D9888F0A403AA900E28AA2 /* ossimRpcSolver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpcSolver.cpp; sourceTree = "<group>"; };
-		43D988910A403AA900E28AA2 /* ossimSensorModel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSensorModel.cpp; sourceTree = "<group>"; };
-		43D988930A403AA900E28AA2 /* ossimSensorModelFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSensorModelFactory.cpp; sourceTree = "<group>"; };
-		43D988950A403AA900E28AA2 /* ossimSinusoid.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ossimSinusoid.c; sourceTree = "<group>"; };
-		43D988970A403AA900E28AA2 /* ossimSinusoidalProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSinusoidalProjection.cpp; sourceTree = "<group>"; };
-		43D988990A403AA900E28AA2 /* ossimSpaceObliqueMercatorProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSpaceObliqueMercatorProjection.cpp; sourceTree = "<group>"; };
-		43D9889B0A403AA900E28AA2 /* ossimSpot5Model.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSpot5Model.cpp; sourceTree = "<group>"; };
-		43D9889D0A403AA900E28AA2 /* ossimSrsProjectionFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSrsProjectionFactory.cpp; sourceTree = "<group>"; };
-		43D9889F0A403AA900E28AA2 /* ossimStatePlaneProjectionFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimStatePlaneProjectionFactory.cpp; sourceTree = "<group>"; };
-		43D988A10A403AA900E28AA2 /* ossimStatePlaneProjectionInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimStatePlaneProjectionInfo.cpp; sourceTree = "<group>"; };
-		43D988A30A403AA900E28AA2 /* ossimStereographicProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimStereographicProjection.cpp; sourceTree = "<group>"; };
-		43D988A50A403AA900E28AA2 /* ossimTiffProjectionFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTiffProjectionFactory.cpp; sourceTree = "<group>"; };
-		43D988A70A403AA900E28AA2 /* ossimTranmerc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ossimTranmerc.c; sourceTree = "<group>"; };
-		43D988A90A403AA900E28AA2 /* ossimTransCylEquAreaProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTransCylEquAreaProjection.cpp; sourceTree = "<group>"; };
-		43D988AB0A403AA900E28AA2 /* ossimTransMercatorProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTransMercatorProjection.cpp; sourceTree = "<group>"; };
-		43D988AD0A403AA900E28AA2 /* ossimUps.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ossimUps.c; sourceTree = "<group>"; };
-		43D988AF0A403AA900E28AA2 /* ossimUpsProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimUpsProjection.cpp; sourceTree = "<group>"; };
-		43D988B10A403AA900E28AA2 /* ossimUpspt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimUpspt.cpp; sourceTree = "<group>"; };
-		43D988B30A403AA900E28AA2 /* ossimUtm.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ossimUtm.c; sourceTree = "<group>"; };
-		43D988B50A403AA900E28AA2 /* ossimUtmProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimUtmProjection.cpp; sourceTree = "<group>"; };
-		43D988B70A403AA900E28AA2 /* ossimUtmpt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimUtmpt.cpp; sourceTree = "<group>"; };
-		43D988B90A403AA900E28AA2 /* ossimVanDerGrintenProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVanDerGrintenProjection.cpp; sourceTree = "<group>"; };
-		43D988BB0A403AA900E28AA2 /* ossimWarpProjection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimWarpProjection.cpp; sourceTree = "<group>"; };
-		43D989330A403AA900E28AA2 /* ossimAigBounds.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAigBounds.cpp; sourceTree = "<group>"; };
-		43D989350A403AA900E28AA2 /* ossimAigDataFileHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAigDataFileHeader.cpp; sourceTree = "<group>"; };
-		43D989370A403AA900E28AA2 /* ossimAigHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAigHeader.cpp; sourceTree = "<group>"; };
-		43D989390A403AA900E28AA2 /* ossimAigIndexFileHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAigIndexFileHeader.cpp; sourceTree = "<group>"; };
-		43D9893B0A403AA900E28AA2 /* ossimAigStatistics.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimAigStatistics.cpp; sourceTree = "<group>"; };
-		43D9893D0A403AA900E28AA2 /* ossimApplanixEOFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimApplanixEOFile.cpp; sourceTree = "<group>"; };
-		43D9893F0A403AA900E28AA2 /* ossimDemGrid.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDemGrid.cpp; sourceTree = "<group>"; };
-		43D989410A403AA900E28AA2 /* ossimDemHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDemHeader.cpp; sourceTree = "<group>"; };
-		43D989430A403AA900E28AA2 /* ossimDemPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDemPoint.cpp; sourceTree = "<group>"; };
-		43D989450A403AA900E28AA2 /* ossimDemProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDemProfile.cpp; sourceTree = "<group>"; };
-		43D989470A403AA900E28AA2 /* ossimDemStats.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDemStats.cpp; sourceTree = "<group>"; };
-		43D989490A403AA900E28AA2 /* ossimDemUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDemUtil.cpp; sourceTree = "<group>"; };
-		43D9894B0A403AA900E28AA2 /* ossimDoqq.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDoqq.cpp; sourceTree = "<group>"; };
-		43D9894D0A403AA900E28AA2 /* ossimDtedAcc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDtedAcc.cpp; sourceTree = "<group>"; };
-		43D9894F0A403AA900E28AA2 /* ossimDtedDsi.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDtedDsi.cpp; sourceTree = "<group>"; };
-		43D989510A403AA900E28AA2 /* ossimDtedHdr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDtedHdr.cpp; sourceTree = "<group>"; };
-		43D989530A403AA900E28AA2 /* ossimDtedRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDtedRecord.cpp; sourceTree = "<group>"; };
-		43D989550A403AA900E28AA2 /* ossimDtedUhl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDtedUhl.cpp; sourceTree = "<group>"; };
-		43D989570A403AA900E28AA2 /* ossimDtedVol.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDtedVol.cpp; sourceTree = "<group>"; };
-		43D989590A403AA900E28AA2 /* ossimERS.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimERS.cpp; sourceTree = "<group>"; };
-		43D9895B0A403AA900E28AA2 /* ossimEnviHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimEnviHeader.cpp; sourceTree = "<group>"; };
-		43D9895D0A403AA900E28AA2 /* ossimFfL5.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFfL5.cpp; sourceTree = "<group>"; };
-		43D9895F0A403AA900E28AA2 /* ossimFfL7.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFfL7.cpp; sourceTree = "<group>"; };
-		43D989610A403AA900E28AA2 /* ossimFfRevb.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFfRevb.cpp; sourceTree = "<group>"; };
-		43D989630A403AA900E28AA2 /* ossimFfRevc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimFfRevc.cpp; sourceTree = "<group>"; };
-		43D989650A403AA900E28AA2 /* ossimGeoTiff.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimGeoTiff.cpp; sourceTree = "<group>"; };
-		43D989670A403AA900E28AA2 /* ossimIkonosMetaData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimIkonosMetaData.cpp; sourceTree = "<group>"; };
-		43D989690A403AA900E28AA2 /* ossimNitfBlockaTag.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfBlockaTag.cpp; sourceTree = "<group>"; };
-		43D9896B0A403AA900E28AA2 /* ossimNitfCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfCommon.cpp; sourceTree = "<group>"; };
-		43D9896D0A403AA900E28AA2 /* ossimNitfCompressionHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfCompressionHeader.cpp; sourceTree = "<group>"; };
-		43D9896F0A403AA900E28AA2 /* ossimNitfDataExtensionSegment.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfDataExtensionSegment.cpp; sourceTree = "<group>"; };
-		43D989710A403AA900E28AA2 /* ossimNitfDataExtensionSegmentV2_0.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfDataExtensionSegmentV2_0.cpp; sourceTree = "<group>"; };
-		43D989730A403AA900E28AA2 /* ossimNitfEmbeddedRpfDes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfEmbeddedRpfDes.cpp; sourceTree = "<group>"; };
-		43D989750A403AA900E28AA2 /* ossimNitfEmbeddedRpfHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfEmbeddedRpfHeader.cpp; sourceTree = "<group>"; };
-		43D989770A403AA900E28AA2 /* ossimNitfFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfFile.cpp; sourceTree = "<group>"; };
-		43D989790A403AA900E28AA2 /* ossimNitfFileHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfFileHeader.cpp; sourceTree = "<group>"; };
-		43D9897B0A403AA900E28AA2 /* ossimNitfFileHeaderV2_0.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfFileHeaderV2_0.cpp; sourceTree = "<group>"; };
-		43D9897D0A403AA900E28AA2 /* ossimNitfFileHeaderV2_1.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfFileHeaderV2_1.cpp; sourceTree = "<group>"; };
-		43D9897F0A403AA900E28AA2 /* ossimNitfFileHeaderV2_X.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfFileHeaderV2_X.cpp; sourceTree = "<group>"; };
-		43D989810A403AA900E28AA2 /* ossimNitfGeoPositioningTag.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfGeoPositioningTag.cpp; sourceTree = "<group>"; };
-		43D989830A403AA900E28AA2 /* ossimNitfIchipbTag.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfIchipbTag.cpp; sourceTree = "<group>"; };
-		43D989850A403AA900E28AA2 /* ossimNitfImageBand.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfImageBand.cpp; sourceTree = "<group>"; };
-		43D989870A403AA900E28AA2 /* ossimNitfImageBandV2_0.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfImageBandV2_0.cpp; sourceTree = "<group>"; };
-		43D989890A403AA900E28AA2 /* ossimNitfImageBandV2_1.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfImageBandV2_1.cpp; sourceTree = "<group>"; };
-		43D9898B0A403AA900E28AA2 /* ossimNitfImageHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfImageHeader.cpp; sourceTree = "<group>"; };
-		43D9898D0A403AA900E28AA2 /* ossimNitfImageHeaderV2_0.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfImageHeaderV2_0.cpp; sourceTree = "<group>"; };
-		43D9898F0A403AA900E28AA2 /* ossimNitfImageHeaderV2_1.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfImageHeaderV2_1.cpp; sourceTree = "<group>"; };
-		43D989910A403AA900E28AA2 /* ossimNitfImageHeaderV2_X.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfImageHeaderV2_X.cpp; sourceTree = "<group>"; };
-		43D989930A403AA900E28AA2 /* ossimNitfImageLut.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfImageLut.cpp; sourceTree = "<group>"; };
-		43D989950A403AA900E28AA2 /* ossimNitfImageLutV2_0.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfImageLutV2_0.cpp; sourceTree = "<group>"; };
-		43D989970A403AA900E28AA2 /* ossimNitfImageLutV2_1.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfImageLutV2_1.cpp; sourceTree = "<group>"; };
-		43D989990A403AA900E28AA2 /* ossimNitfLabelHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfLabelHeader.cpp; sourceTree = "<group>"; };
-		43D9899B0A403AA900E28AA2 /* ossimNitfLabelHeaderV2_0.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfLabelHeaderV2_0.cpp; sourceTree = "<group>"; };
-		43D9899D0A403AA900E28AA2 /* ossimNitfLocalCartographicTag.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfLocalCartographicTag.cpp; sourceTree = "<group>"; };
-		43D9899F0A403AA900E28AA2 /* ossimNitfLocalGeographicTag.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfLocalGeographicTag.cpp; sourceTree = "<group>"; };
-		43D989A10A403AA900E28AA2 /* ossimNitfNameConversionTables.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfNameConversionTables.cpp; sourceTree = "<group>"; };
-		43D989A30A403AA900E28AA2 /* ossimNitfPiaimcTag.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfPiaimcTag.cpp; sourceTree = "<group>"; };
-		43D989A50A403AA900E28AA2 /* ossimNitfProjectionParameterTag.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfProjectionParameterTag.cpp; sourceTree = "<group>"; };
-		43D989A70A403AAA00E28AA2 /* ossimNitfRegisteredTag.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfRegisteredTag.cpp; sourceTree = "<group>"; };
-		43D989A90A403AAA00E28AA2 /* ossimNitfRegisteredTagFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfRegisteredTagFactory.cpp; sourceTree = "<group>"; };
-		43D989AB0A403AAA00E28AA2 /* ossimNitfRpcATag.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfRpcATag.cpp; sourceTree = "<group>"; };
-		43D989AD0A403AAA00E28AA2 /* ossimNitfRpcBTag.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfRpcBTag.cpp; sourceTree = "<group>"; };
-		43D989AF0A403AAA00E28AA2 /* ossimNitfRpcBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfRpcBase.cpp; sourceTree = "<group>"; };
-		43D989B10A403AAA00E28AA2 /* ossimNitfRpfTagFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfRpfTagFactory.cpp; sourceTree = "<group>"; };
-		43D989B30A403AAA00E28AA2 /* ossimNitfSensraTag.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfSensraTag.cpp; sourceTree = "<group>"; };
-		43D989B50A403AAA00E28AA2 /* ossimNitfStdidcTag.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfStdidcTag.cpp; sourceTree = "<group>"; };
-		43D989B70A403AAA00E28AA2 /* ossimNitfSymbolHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfSymbolHeader.cpp; sourceTree = "<group>"; };
-		43D989B90A403AAA00E28AA2 /* ossimNitfSymbolHeaderV2_0.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfSymbolHeaderV2_0.cpp; sourceTree = "<group>"; };
-		43D989BB0A403AAA00E28AA2 /* ossimNitfTagFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfTagFactory.cpp; sourceTree = "<group>"; };
-		43D989BD0A403AAA00E28AA2 /* ossimNitfTagFactoryRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfTagFactoryRegistry.cpp; sourceTree = "<group>"; };
-		43D989BF0A403AAA00E28AA2 /* ossimNitfTagInformation.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfTagInformation.cpp; sourceTree = "<group>"; };
-		43D989C10A403AAA00E28AA2 /* ossimNitfTextHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfTextHeader.cpp; sourceTree = "<group>"; };
-		43D989C30A403AAA00E28AA2 /* ossimNitfTextHeaderV2_0.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfTextHeaderV2_0.cpp; sourceTree = "<group>"; };
-		43D989C50A403AAA00E28AA2 /* ossimNitfUnknownTag.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfUnknownTag.cpp; sourceTree = "<group>"; };
-		43D989C70A403AAA00E28AA2 /* ossimNitfUse00aTag.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfUse00aTag.cpp; sourceTree = "<group>"; };
-		43D989C90A403AAA00E28AA2 /* ossimNitfVqCompressionHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfVqCompressionHeader.cpp; sourceTree = "<group>"; };
-		43D989CB0A403AAA00E28AA2 /* ossimQuickbirdRpcHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimQuickbirdRpcHeader.cpp; sourceTree = "<group>"; };
-		43D989CD0A403AAA00E28AA2 /* ossimQuickbirdTile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimQuickbirdTile.cpp; sourceTree = "<group>"; };
-		43D989CF0A403AAA00E28AA2 /* ossimRpfAttributeOffsetRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfAttributeOffsetRecord.cpp; sourceTree = "<group>"; };
-		43D989D10A403AAA00E28AA2 /* ossimRpfAttributeSectionSubheader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfAttributeSectionSubheader.cpp; sourceTree = "<group>"; };
-		43D989D30A403AAA00E28AA2 /* ossimRpfAttributes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfAttributes.cpp; sourceTree = "<group>"; };
-		43D989D50A403AAA00E28AA2 /* ossimRpfBoundaryRectRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfBoundaryRectRecord.cpp; sourceTree = "<group>"; };
-		43D989D70A403AAA00E28AA2 /* ossimRpfBoundaryRectSectionSubheader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfBoundaryRectSectionSubheader.cpp; sourceTree = "<group>"; };
-		43D989D90A403AAA00E28AA2 /* ossimRpfBoundaryRectTable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfBoundaryRectTable.cpp; sourceTree = "<group>"; };
-		43D989DB0A403AAA00E28AA2 /* ossimRpfColorConverterOffsetRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfColorConverterOffsetRecord.cpp; sourceTree = "<group>"; };
-		43D989DD0A403AAA00E28AA2 /* ossimRpfColorConverterSubsection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfColorConverterSubsection.cpp; sourceTree = "<group>"; };
-		43D989DF0A403AAA00E28AA2 /* ossimRpfColorConverterTable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfColorConverterTable.cpp; sourceTree = "<group>"; };
-		43D989E10A403AAA00E28AA2 /* ossimRpfColorGrayscaleOffsetRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfColorGrayscaleOffsetRecord.cpp; sourceTree = "<group>"; };
-		43D989E30A403AAA00E28AA2 /* ossimRpfColorGrayscaleSubheader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfColorGrayscaleSubheader.cpp; sourceTree = "<group>"; };
-		43D989E50A403AAA00E28AA2 /* ossimRpfColorGrayscaleTable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfColorGrayscaleTable.cpp; sourceTree = "<group>"; };
-		43D989E70A403AAA00E28AA2 /* ossimRpfCompressionLookupOffsetRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfCompressionLookupOffsetRecord.cpp; sourceTree = "<group>"; };
-		43D989E90A403AAA00E28AA2 /* ossimRpfCompressionSection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfCompressionSection.cpp; sourceTree = "<group>"; };
-		43D989EB0A403AAA00E28AA2 /* ossimRpfCompressionSectionSubheader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfCompressionSectionSubheader.cpp; sourceTree = "<group>"; };
-		43D989ED0A403AAA00E28AA2 /* ossimRpfCoverageSection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfCoverageSection.cpp; sourceTree = "<group>"; };
-		43D989EF0A403AAA00E28AA2 /* ossimRpfFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfFrame.cpp; sourceTree = "<group>"; };
-		43D989F10A403AAA00E28AA2 /* ossimRpfFrameEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfFrameEntry.cpp; sourceTree = "<group>"; };
-		43D989F30A403AAA00E28AA2 /* ossimRpfFrameFileIndexRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfFrameFileIndexRecord.cpp; sourceTree = "<group>"; };
-		43D989F50A403AAA00E28AA2 /* ossimRpfFrameFileIndexSectionSubheader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfFrameFileIndexSectionSubheader.cpp; sourceTree = "<group>"; };
-		43D989F70A403AAA00E28AA2 /* ossimRpfFrameFileIndexSubsection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfFrameFileIndexSubsection.cpp; sourceTree = "<group>"; };
-		43D989F90A403AAA00E28AA2 /* ossimRpfFrameFileReader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfFrameFileReader.cpp; sourceTree = "<group>"; };
-		43D989FB0A403AAA00E28AA2 /* ossimRpfHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfHeader.cpp; sourceTree = "<group>"; };
-		43D989FD0A403AAA00E28AA2 /* ossimRpfImageDescriptionSubheader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfImageDescriptionSubheader.cpp; sourceTree = "<group>"; };
-		43D989FF0A403AAA00E28AA2 /* ossimRpfImageDisplayParameterSubheader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfImageDisplayParameterSubheader.cpp; sourceTree = "<group>"; };
-		43D98A010A403AAA00E28AA2 /* ossimRpfLocationSection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfLocationSection.cpp; sourceTree = "<group>"; };
-		43D98A030A403AAA00E28AA2 /* ossimRpfMaskSubheader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfMaskSubheader.cpp; sourceTree = "<group>"; };
-		43D98A050A403AAA00E28AA2 /* ossimRpfMaskSubsection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfMaskSubsection.cpp; sourceTree = "<group>"; };
-		43D98A070A403AAA00E28AA2 /* ossimRpfPathnameRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfPathnameRecord.cpp; sourceTree = "<group>"; };
-		43D98A090A403AAA00E28AA2 /* ossimRpfToc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfToc.cpp; sourceTree = "<group>"; };
-		43D98A0B0A403AAA00E28AA2 /* ossimRpfTocEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimRpfTocEntry.cpp; sourceTree = "<group>"; };
-		43D98A0D0A403AAA00E28AA2 /* ossimSpaceImagingGeom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSpaceImagingGeom.cpp; sourceTree = "<group>"; };
-		43D98A0F0A403AAA00E28AA2 /* ossimSpotDimapSupportData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSpotDimapSupportData.cpp; sourceTree = "<group>"; };
-		43D98A110A403AAA00E28AA2 /* ossimSrtmFilename.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSrtmFilename.cpp; sourceTree = "<group>"; };
-		43D98A130A403AAA00E28AA2 /* ossimSrtmSupportData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSrtmSupportData.cpp; sourceTree = "<group>"; };
-		43D98A150A403AAA00E28AA2 /* ossimTiffWorld.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTiffWorld.cpp; sourceTree = "<group>"; };
-		43D98A310A403AAA00E28AA2 /* ossimVpfBoundingRecordTable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVpfBoundingRecordTable.cpp; sourceTree = "<group>"; };
-		43D98A330A403AAA00E28AA2 /* ossimVpfCoverage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVpfCoverage.cpp; sourceTree = "<group>"; };
-		43D98A350A403AAA00E28AA2 /* ossimVpfDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVpfDatabase.cpp; sourceTree = "<group>"; };
-		43D98A370A403AAA00E28AA2 /* ossimVpfDatabaseHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVpfDatabaseHeader.cpp; sourceTree = "<group>"; };
-		43D98A390A403AAA00E28AA2 /* ossimVpfDatabaseHeaderTableValidator.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVpfDatabaseHeaderTableValidator.cpp; sourceTree = "<group>"; };
-		43D98A3B0A403AAA00E28AA2 /* ossimVpfExtent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVpfExtent.cpp; sourceTree = "<group>"; };
-		43D98A3D0A403AAA00E28AA2 /* ossimVpfFeatureClass.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVpfFeatureClass.cpp; sourceTree = "<group>"; };
-		43D98A3F0A403AAA00E28AA2 /* ossimVpfFeatureClassSchema.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVpfFeatureClassSchema.cpp; sourceTree = "<group>"; };
-		43D98A410A403AAA00E28AA2 /* ossimVpfLibrary.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVpfLibrary.cpp; sourceTree = "<group>"; };
-		43D98A430A403AAA00E28AA2 /* ossimVpfLibraryAttributeTableValidator.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVpfLibraryAttributeTableValidator.cpp; sourceTree = "<group>"; };
-		43D98A450A403AAA00E28AA2 /* ossimVpfTable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVpfTable.cpp; sourceTree = "<group>"; };
-		43D98A650A403AAA00E28AA2 /* bitarray.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = bitarray.c; sourceTree = "<group>"; };
-		43D98A670A403AAA00E28AA2 /* distance.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = distance.c; sourceTree = "<group>"; };
-		43D98A690A403AAA00E28AA2 /* linklist.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = linklist.c; sourceTree = "<group>"; };
-		43D98A6B0A403AAA00E28AA2 /* polygrf.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = polygrf.c; sourceTree = "<group>"; };
-		43D98A6D0A403AAA00E28AA2 /* set.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = set.c; sourceTree = "<group>"; };
-		43D98A6F0A403AAA00E28AA2 /* vpfclip.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = vpfclip.c; sourceTree = "<group>"; };
-		43D98A710A403AAA00E28AA2 /* vpfcntnt.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = vpfcntnt.c; sourceTree = "<group>"; };
-		43D98A730A403AAA00E28AA2 /* vpfdict.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = vpfdict.c; sourceTree = "<group>"; };
-		43D98A750A403AAA00E28AA2 /* vpfdisp.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = vpfdisp.c; sourceTree = "<group>"; };
-		43D98A770A403AAA00E28AA2 /* vpfdraw.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = vpfdraw.c; sourceTree = "<group>"; };
-		43D98A790A403AAA00E28AA2 /* vpfmisc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = vpfmisc.c; sourceTree = "<group>"; };
-		43D98A7B0A403AAA00E28AA2 /* vpfnear.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = vpfnear.c; sourceTree = "<group>"; };
-		43D98A7D0A403AAA00E28AA2 /* vpfprim.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = vpfprim.c; sourceTree = "<group>"; };
-		43D98A7F0A403AAA00E28AA2 /* vpfptply.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = vpfptply.c; sourceTree = "<group>"; };
-		43D98A810A403AAA00E28AA2 /* vpfquery.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = vpfquery.c; sourceTree = "<group>"; };
-		43D98A830A403AAA00E28AA2 /* vpfread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = vpfread.c; sourceTree = "<group>"; };
-		43D98A850A403AAA00E28AA2 /* vpfrelat.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = vpfrelat.c; sourceTree = "<group>"; };
-		43D98A870A403AAA00E28AA2 /* vpfselec.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = vpfselec.c; sourceTree = "<group>"; };
-		43D98A890A403AAA00E28AA2 /* vpfspx.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = vpfspx.c; sourceTree = "<group>"; };
-		43D98A8B0A403AAA00E28AA2 /* vpftable.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = vpftable.c; sourceTree = "<group>"; };
-		43D98A8D0A403AAA00E28AA2 /* vpftidx.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = vpftidx.c; sourceTree = "<group>"; };
-		43D98A8F0A403AAA00E28AA2 /* vpfwrite.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = vpfwrite.c; sourceTree = "<group>"; };
-		43D992CF0A403AD700E28AA2 /* datum.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = datum.h; sourceTree = "<group>"; };
-		43D992D00A403AD700E28AA2 /* ossim2dLinearRegression.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossim2dLinearRegression.h; sourceTree = "<group>"; };
-		43D992D10A403AD700E28AA2 /* ossim2dTo2dTransform.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossim2dTo2dTransform.h; sourceTree = "<group>"; };
-		43D992D20A403AD700E28AA2 /* ossimActiveEdgeTable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimActiveEdgeTable.h; sourceTree = "<group>"; };
-		43D992D30A403AD700E28AA2 /* ossimAdjustableParameterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAdjustableParameterInfo.h; sourceTree = "<group>"; };
-		43D992D40A403AD700E28AA2 /* ossimAdjustableParameterInterface.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAdjustableParameterInterface.h; sourceTree = "<group>"; };
-		43D992D50A403AD700E28AA2 /* ossimAdjustmentInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAdjustmentInfo.h; sourceTree = "<group>"; };
-		43D992D70A403AD700E28AA2 /* ossimAffineTransform.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAffineTransform.h; sourceTree = "<group>"; };
-		43D992D80A403AD700E28AA2 /* ossimApplicationUsage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimApplicationUsage.h; sourceTree = "<group>"; };
-		43D992D90A403AD700E28AA2 /* ossimArgumentParser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimArgumentParser.h; sourceTree = "<group>"; };
-		43D992DA0A403AD700E28AA2 /* ossimAxes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAxes.h; sourceTree = "<group>"; };
-		43D992DB0A403AD700E28AA2 /* ossimBaseObjectFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimBaseObjectFactory.h; sourceTree = "<group>"; };
-		43D992DC0A403AD700E28AA2 /* ossimBilSplitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimBilSplitter.h; sourceTree = "<group>"; };
-		43D992DD0A403AD700E28AA2 /* ossimBooleanProperty.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimBooleanProperty.h; sourceTree = "<group>"; };
-		43D992DE0A403AD700E28AA2 /* ossimCmyVector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimCmyVector.h; sourceTree = "<group>"; };
-		43D992DF0A403AD700E28AA2 /* ossimColorProperty.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimColorProperty.h; sourceTree = "<group>"; };
-		43D992E00A403AD700E28AA2 /* ossimColumnVector3d.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimColumnVector3d.h; sourceTree = "<group>"; };
-		43D992E10A403AD700E28AA2 /* ossimColumnVector4d.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimColumnVector4d.h; sourceTree = "<group>"; };
-		43D992E20A403AD700E28AA2 /* ossimCommon.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimCommon.h; sourceTree = "<group>"; };
-		43D992E30A403AD700E28AA2 /* ossimConnectableContainer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimConnectableContainer.h; sourceTree = "<group>"; };
-		43D992E40A403AD700E28AA2 /* ossimConnectableContainerInterface.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimConnectableContainerInterface.h; sourceTree = "<group>"; };
-		43D992E50A403AD700E28AA2 /* ossimConnectableDisplayListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimConnectableDisplayListener.h; sourceTree = "<group>"; };
-		43D992E60A403AD700E28AA2 /* ossimConnectableObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimConnectableObject.h; sourceTree = "<group>"; };
-		43D992E70A403AD700E28AA2 /* ossimConnectableObjectListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimConnectableObjectListener.h; sourceTree = "<group>"; };
-		43D992E80A403AD700E28AA2 /* ossimConnectionEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimConnectionEvent.h; sourceTree = "<group>"; };
-		43D992E90A403AD700E28AA2 /* ossimConstants.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimConstants.h; sourceTree = "<group>"; };
-		43D992EA0A403AD700E28AA2 /* ossimContainerEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimContainerEvent.h; sourceTree = "<group>"; };
-		43D992EB0A403AD700E28AA2 /* ossimContainerProperty.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimContainerProperty.h; sourceTree = "<group>"; };
-		43D992EC0A403AD700E28AA2 /* ossimCplUtil.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimCplUtil.h; sourceTree = "<group>"; };
-		43D992ED0A403AD700E28AA2 /* ossimCustomEditorWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimCustomEditorWindow.h; sourceTree = "<group>"; };
-		43D992EE0A403AD700E28AA2 /* ossimCustomEditorWindowFactoryBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimCustomEditorWindowFactoryBase.h; sourceTree = "<group>"; };
-		43D992EF0A403AD700E28AA2 /* ossimCustomEditorWindowRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimCustomEditorWindowRegistry.h; sourceTree = "<group>"; };
-		43D992F00A403AD700E28AA2 /* ossimDataObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDataObject.h; sourceTree = "<group>"; };
-		43D992F10A403AD700E28AA2 /* ossimDate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDate.h; sourceTree = "<group>"; };
-		43D992F20A403AD700E28AA2 /* ossimDateProperty.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDateProperty.h; sourceTree = "<group>"; };
-		43D992F30A403AD700E28AA2 /* ossimDatum.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDatum.h; sourceTree = "<group>"; };
-		43D992F40A403AD700E28AA2 /* ossimDatumFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDatumFactory.h; sourceTree = "<group>"; };
-		43D992F50A403AD700E28AA2 /* ossimDblGrid.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDblGrid.h; sourceTree = "<group>"; };
-		43D992F60A403AD700E28AA2 /* ossimDirectory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDirectory.h; sourceTree = "<group>"; };
-		43D992F70A403AD700E28AA2 /* ossimDirectoryData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDirectoryData.h; sourceTree = "<group>"; };
-		43D992F80A403AD700E28AA2 /* ossimDirectoryTree.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDirectoryTree.h; sourceTree = "<group>"; };
-		43D992F90A403AD700E28AA2 /* ossimDisplayEventListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDisplayEventListener.h; sourceTree = "<group>"; };
-		43D992FA0A403AD700E28AA2 /* ossimDisplayInterface.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDisplayInterface.h; sourceTree = "<group>"; };
-		43D992FB0A403AD700E28AA2 /* ossimDisplayListEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDisplayListEvent.h; sourceTree = "<group>"; };
-		43D992FC0A403AD700E28AA2 /* ossimDisplayRefreshEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDisplayRefreshEvent.h; sourceTree = "<group>"; };
-		43D992FD0A403AD700E28AA2 /* ossimDms.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDms.h; sourceTree = "<group>"; };
-		43D992FE0A403AD700E28AA2 /* ossimDoubleGridProperty.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDoubleGridProperty.h; sourceTree = "<group>"; };
-		43D992FF0A403AD700E28AA2 /* ossimDpt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDpt.h; sourceTree = "<group>"; };
-		43D993000A403AD700E28AA2 /* ossimDpt3d.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDpt3d.h; sourceTree = "<group>"; };
-		43D993010A403AD700E28AA2 /* ossimDrect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDrect.h; sourceTree = "<group>"; };
-		43D993020A403AD700E28AA2 /* ossimEbcdicToAscii.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimEbcdicToAscii.h; sourceTree = "<group>"; };
-		43D993030A403AD700E28AA2 /* ossimEcefPoint.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimEcefPoint.h; sourceTree = "<group>"; };
-		43D993040A403AD700E28AA2 /* ossimEcefRay.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimEcefRay.h; sourceTree = "<group>"; };
-		43D993050A403AD700E28AA2 /* ossimEcefVector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimEcefVector.h; sourceTree = "<group>"; };
-		43D993060A403AD700E28AA2 /* ossimElevationManagerEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimElevationManagerEvent.h; sourceTree = "<group>"; };
-		43D993070A403AD700E28AA2 /* ossimElevationManagerEventListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimElevationManagerEventListener.h; sourceTree = "<group>"; };
-		43D993080A403AD700E28AA2 /* ossimEllipsoid.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimEllipsoid.h; sourceTree = "<group>"; };
-		43D993090A403AD700E28AA2 /* ossimEllipsoidFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimEllipsoidFactory.h; sourceTree = "<group>"; };
-		43D9930A0A403AD700E28AA2 /* ossimEndian.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimEndian.h; sourceTree = "<group>"; };
-		43D9930B0A403AD700E28AA2 /* ossimEquTokenDefines.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimEquTokenDefines.h; sourceTree = "<group>"; };
-		43D9930C0A403AD700E28AA2 /* ossimEquTokenizer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimEquTokenizer.h; sourceTree = "<group>"; };
-		43D9930D0A403AD700E28AA2 /* ossimErrorCodes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimErrorCodes.h; sourceTree = "<group>"; };
-		43D9930E0A403AD700E28AA2 /* ossimErrorContext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimErrorContext.h; sourceTree = "<group>"; };
-		43D9930F0A403AD700E28AA2 /* ossimErrorStatusInterface.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimErrorStatusInterface.h; sourceTree = "<group>"; };
-		43D993100A403AD700E28AA2 /* ossimEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimEvent.h; sourceTree = "<group>"; };
-		43D993110A403AD700E28AA2 /* ossimEventIds.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimEventIds.h; sourceTree = "<group>"; };
-		43D993120A403AD700E28AA2 /* ossimFactoryBaseTemplate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFactoryBaseTemplate.h; sourceTree = "<group>"; };
-		43D993130A403AD700E28AA2 /* ossimFilename.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFilename.h; sourceTree = "<group>"; };
-		43D993140A403AD700E28AA2 /* ossimFilenameProperty.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFilenameProperty.h; sourceTree = "<group>"; };
-		43D993150A403AD700E28AA2 /* ossimFontInformation.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFontInformation.h; sourceTree = "<group>"; };
-		43D993160A403AD700E28AA2 /* ossimFontProperty.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFontProperty.h; sourceTree = "<group>"; };
-		43D993170A403AD700E28AA2 /* ossimFpt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFpt.h; sourceTree = "<group>"; };
-		43D993180A403AD700E28AA2 /* ossimFpt3d.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFpt3d.h; sourceTree = "<group>"; };
-		43D993190A403AD700E28AA2 /* ossimGeoPolygon.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoPolygon.h; sourceTree = "<group>"; };
-		43D9931A0A403AD700E28AA2 /* ossimGeoTiffCoordTransformsLut.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoTiffCoordTransformsLut.h; sourceTree = "<group>"; };
-		43D9931B0A403AD700E28AA2 /* ossimGeoTiffDatumLut.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoTiffDatumLut.h; sourceTree = "<group>"; };
-		43D9931C0A403AD700E28AA2 /* ossimGeocent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeocent.h; sourceTree = "<group>"; };
-		43D9931D0A403AD700E28AA2 /* ossimGeoid.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoid.h; sourceTree = "<group>"; };
-		43D9931E0A403AD700E28AA2 /* ossimGeoidEgm96.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoidEgm96.h; sourceTree = "<group>"; };
-		43D9931F0A403AD700E28AA2 /* ossimGeoidManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoidManager.h; sourceTree = "<group>"; };
-		43D993200A403AD700E28AA2 /* ossimGeoidNgs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoidNgs.h; sourceTree = "<group>"; };
-		43D993210A403AD700E28AA2 /* ossimGeoidNgsHeader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoidNgsHeader.h; sourceTree = "<group>"; };
-		43D993220A403AD700E28AA2 /* ossimGeoref.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoref.h; sourceTree = "<group>"; };
-		43D993230A403AD700E28AA2 /* ossimGpt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGpt.h; sourceTree = "<group>"; };
-		43D993240A403AD700E28AA2 /* ossimGrect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGrect.h; sourceTree = "<group>"; };
-		43D993250A403AD700E28AA2 /* ossimGzStream.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGzStream.h; sourceTree = "<group>"; };
-		43D993260A403AD700E28AA2 /* ossimHexString.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimHexString.h; sourceTree = "<group>"; };
-		43D993270A403AD700E28AA2 /* ossimHistogram.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimHistogram.h; sourceTree = "<group>"; };
-		43D993280A403AD700E28AA2 /* ossimHistogramSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimHistogramSource.h; sourceTree = "<group>"; };
-		43D993290A403AD700E28AA2 /* ossimHsiVector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimHsiVector.h; sourceTree = "<group>"; };
-		43D9932A0A403AD700E28AA2 /* ossimHsvVector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimHsvVector.h; sourceTree = "<group>"; };
-		43D9932B0A403AD700E28AA2 /* ossimId.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimId.h; sourceTree = "<group>"; };
-		43D9932C0A403AD700E28AA2 /* ossimIdManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimIdManager.h; sourceTree = "<group>"; };
-		43D9932D0A403AD700E28AA2 /* ossimImageAoiListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageAoiListener.h; sourceTree = "<group>"; };
-		43D9932E0A403AD700E28AA2 /* ossimImageGeometryEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageGeometryEvent.h; sourceTree = "<group>"; };
-		43D9932F0A403AD700E28AA2 /* ossimImageGeometryEventListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageGeometryEventListener.h; sourceTree = "<group>"; };
-		43D993300A403AD700E28AA2 /* ossimImagePolygonEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImagePolygonEvent.h; sourceTree = "<group>"; };
-		43D993310A403AD700E28AA2 /* ossimImageRectangleEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageRectangleEvent.h; sourceTree = "<group>"; };
-		43D993320A403AD700E28AA2 /* ossimImageTypeLut.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageTypeLut.h; sourceTree = "<group>"; };
-		43D993330A403AD700E28AA2 /* ossimInterleaveTypeLut.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimInterleaveTypeLut.h; sourceTree = "<group>"; };
-		43D993340A403AD700E28AA2 /* ossimIoStream.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimIoStream.h; sourceTree = "<group>"; };
-		43D993350A403AD700E28AA2 /* ossimIpt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimIpt.h; sourceTree = "<group>"; };
-		43D993360A403AD700E28AA2 /* ossimIrect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimIrect.h; sourceTree = "<group>"; };
-		43D993370A403AD700E28AA2 /* ossimJpegYCbCrVector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimJpegYCbCrVector.h; sourceTree = "<group>"; };
-		43D993380A403AD700E28AA2 /* ossimKeyword.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimKeyword.h; sourceTree = "<group>"; };
-		43D993390A403AD700E28AA2 /* ossimKeywordNames.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimKeywordNames.h; sourceTree = "<group>"; };
-		43D9933A0A403AD700E28AA2 /* ossimKeywordlist.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimKeywordlist.h; sourceTree = "<group>"; };
-		43D9933B0A403AD700E28AA2 /* ossimLeastSquaresBilin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimLeastSquaresBilin.h; sourceTree = "<group>"; };
-		43D9933C0A403AD700E28AA2 /* ossimLine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimLine.h; sourceTree = "<group>"; };
-		43D9933D0A403AD700E28AA2 /* ossimListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimListener.h; sourceTree = "<group>"; };
-		43D9933E0A403AD700E28AA2 /* ossimListenerManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimListenerManager.h; sourceTree = "<group>"; };
-		43D9933F0A403AD700E28AA2 /* ossimLookUpTable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimLookUpTable.h; sourceTree = "<group>"; };
-		43D993400A403AD700E28AA2 /* ossimLsrPoint.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimLsrPoint.h; sourceTree = "<group>"; };
-		43D993410A403AD700E28AA2 /* ossimLsrRay.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimLsrRay.h; sourceTree = "<group>"; };
-		43D993420A403AD700E28AA2 /* ossimLsrSpace.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimLsrSpace.h; sourceTree = "<group>"; };
-		43D993430A403AD700E28AA2 /* ossimLsrVector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimLsrVector.h; sourceTree = "<group>"; };
-		43D993440A403AD700E28AA2 /* ossimMatrix3x3.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMatrix3x3.h; sourceTree = "<group>"; };
-		43D993450A403AD700E28AA2 /* ossimMatrix4x4.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMatrix4x4.h; sourceTree = "<group>"; };
-		43D993460A403AD700E28AA2 /* ossimMatrixProperty.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMatrixProperty.h; sourceTree = "<group>"; };
-		43D993470A403AD700E28AA2 /* ossimMouseEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMouseEvent.h; sourceTree = "<group>"; };
-		43D993480A403AD700E28AA2 /* ossimMouseListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMouseListener.h; sourceTree = "<group>"; };
-		43D993490A403AD700E28AA2 /* ossimMultiBandHistogram.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMultiBandHistogram.h; sourceTree = "<group>"; };
-		43D9934A0A403AD700E28AA2 /* ossimMultiResLevelHistogram.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMultiResLevelHistogram.h; sourceTree = "<group>"; };
-		43D9934C0A403AD700E28AA2 /* ossimNBandLutDataObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNBandLutDataObject.h; sourceTree = "<group>"; };
-		43D9934D0A403AD700E28AA2 /* ossimNadconGridDatum.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNadconGridDatum.h; sourceTree = "<group>"; };
-		43D9934E0A403AD700E28AA2 /* ossimNadconGridFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNadconGridFile.h; sourceTree = "<group>"; };
-		43D9934F0A403AD700E28AA2 /* ossimNadconGridHeader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNadconGridHeader.h; sourceTree = "<group>"; };
-		43D993500A403AD700E28AA2 /* ossimNadconNarDatum.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNadconNarDatum.h; sourceTree = "<group>"; };
-		43D993510A403AD700E28AA2 /* ossimNadconNasDatum.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNadconNasDatum.h; sourceTree = "<group>"; };
-		43D993520A403AD700E28AA2 /* ossimNormRgbVector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNormRgbVector.h; sourceTree = "<group>"; };
-		43D993530A403AD700E28AA2 /* ossimNotifyContext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNotifyContext.h; sourceTree = "<group>"; };
-		43D993540A403AD700E28AA2 /* ossimNumericProperty.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNumericProperty.h; sourceTree = "<group>"; };
-		43D993550A403AD700E28AA2 /* ossimObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimObject.h; sourceTree = "<group>"; };
-		43D993560A403AD700E28AA2 /* ossimObjectDestructingEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimObjectDestructingEvent.h; sourceTree = "<group>"; };
-		43D993570A403AD700E28AA2 /* ossimObjectEvents.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimObjectEvents.h; sourceTree = "<group>"; };
-		43D993580A403AD700E28AA2 /* ossimObjectFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimObjectFactory.h; sourceTree = "<group>"; };
-		43D993590A403AD700E28AA2 /* ossimObjectFactoryRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimObjectFactoryRegistry.h; sourceTree = "<group>"; };
-		43D9935A0A403AD700E28AA2 /* ossimOutputSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimOutputSource.h; sourceTree = "<group>"; };
-		43D9935B0A403AD700E28AA2 /* ossimPackedBits.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPackedBits.h; sourceTree = "<group>"; };
-		43D9935C0A403AD700E28AA2 /* ossimPointHash.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPointHash.h; sourceTree = "<group>"; };
-		43D9935D0A403AD700E28AA2 /* ossimPolyArea2d.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPolyArea2d.h; sourceTree = "<group>"; };
-		43D9935E0A403AD700E28AA2 /* ossimPolyLine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPolyLine.h; sourceTree = "<group>"; };
-		43D9935F0A403AD700E28AA2 /* ossimPolygon.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPolygon.h; sourceTree = "<group>"; };
-		43D993600A403AD700E28AA2 /* ossimPolynom.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPolynom.h; sourceTree = "<group>"; };
-		43D993610A403AD700E28AA2 /* ossimPool.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPool.h; sourceTree = "<group>"; };
-		43D993620A403AD700E28AA2 /* ossimPoolObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPoolObject.h; sourceTree = "<group>"; };
-		43D993630A403AD700E28AA2 /* ossimPreferences.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPreferences.h; sourceTree = "<group>"; };
-		43D993640A403AD700E28AA2 /* ossimProcessInterface.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimProcessInterface.h; sourceTree = "<group>"; };
-		43D993650A403AD700E28AA2 /* ossimProcessListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimProcessListener.h; sourceTree = "<group>"; };
-		43D993660A403AD700E28AA2 /* ossimProcessProgressEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimProcessProgressEvent.h; sourceTree = "<group>"; };
-		43D993670A403AD700E28AA2 /* ossimProperty.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimProperty.h; sourceTree = "<group>"; };
-		43D993680A403AD700E28AA2 /* ossimPropertyEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPropertyEvent.h; sourceTree = "<group>"; };
-		43D993690A403AD700E28AA2 /* ossimPropertyInterface.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPropertyInterface.h; sourceTree = "<group>"; };
-		43D9936A0A403AD700E28AA2 /* ossimPropertyInterfaceFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPropertyInterfaceFactory.h; sourceTree = "<group>"; };
-		43D9936B0A403AD700E28AA2 /* ossimPropertyInterfaceRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPropertyInterfaceRegistry.h; sourceTree = "<group>"; };
-		43D9936C0A403AD700E28AA2 /* ossimProtocolStream.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimProtocolStream.h; sourceTree = "<group>"; };
-		43D9936D0A403AD700E28AA2 /* ossimQuadTreeWarp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimQuadTreeWarp.h; sourceTree = "<group>"; };
-		43D9936E0A403AD700E28AA2 /* ossimQuadrilateralMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimQuadrilateralMap.h; sourceTree = "<group>"; };
-		43D9936F0A403AD700E28AA2 /* ossimROIEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimROIEvent.h; sourceTree = "<group>"; };
-		43D993700A403AD700E28AA2 /* ossimROIEventListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimROIEventListener.h; sourceTree = "<group>"; };
-		43D993710A403AD700E28AA2 /* ossimRationalNumber.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRationalNumber.h; sourceTree = "<group>"; };
-		43D993720A403AD700E28AA2 /* ossimRectanglePartitioner.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRectanglePartitioner.h; sourceTree = "<group>"; };
-		43D993730A403AD700E28AA2 /* ossimRectilinearDataObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRectilinearDataObject.h; sourceTree = "<group>"; };
-		43D993740A403AD700E28AA2 /* ossimRefPtr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRefPtr.h; sourceTree = "<group>"; };
-		43D993750A403AD700E28AA2 /* ossimReferenced.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimReferenced.h; sourceTree = "<group>"; };
-		43D993760A403AD700E28AA2 /* ossimRefreshEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRefreshEvent.h; sourceTree = "<group>"; };
-		43D993770A403AD700E28AA2 /* ossimRegExp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRegExp.h; sourceTree = "<group>"; };
-		43D993780A403AD700E28AA2 /* ossimRgbLutDataObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRgbLutDataObject.h; sourceTree = "<group>"; };
-		43D993790A403AD700E28AA2 /* ossimRgbVector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRgbVector.h; sourceTree = "<group>"; };
-		43D9937A0A403AD700E28AA2 /* ossimRtti.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRtti.h; sourceTree = "<group>"; };
-		43D9937B0A403AD700E28AA2 /* ossimScalarTypeLut.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimScalarTypeLut.h; sourceTree = "<group>"; };
-		43D9937D0A403AD700E28AA2 /* ossimSevenParamDatum.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSevenParamDatum.h; sourceTree = "<group>"; };
-		43D9937E0A403AD700E28AA2 /* ossimSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSource.h; sourceTree = "<group>"; };
-		43D9937F0A403AD700E28AA2 /* ossimStateChangedEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimStateChangedEvent.h; sourceTree = "<group>"; };
-		43D993800A403AD700E28AA2 /* ossimStdOutProgress.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimStdOutProgress.h; sourceTree = "<group>"; };
-		43D993810A403AD700E28AA2 /* ossimStreamBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimStreamBase.h; sourceTree = "<group>"; };
-		43D993820A403AD700E28AA2 /* ossimStreamFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimStreamFactory.h; sourceTree = "<group>"; };
-		43D993830A403AD700E28AA2 /* ossimStreamFactoryBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimStreamFactoryBase.h; sourceTree = "<group>"; };
-		43D993840A403AD700E28AA2 /* ossimStreamFactoryRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimStreamFactoryRegistry.h; sourceTree = "<group>"; };
-		43D993850A403AD700E28AA2 /* ossimString.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimString.h; sourceTree = "<group>"; };
-		43D993860A403AD700E28AA2 /* ossimStringListProperty.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimStringListProperty.h; sourceTree = "<group>"; };
-		43D993870A403AD700E28AA2 /* ossimStringProperty.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimStringProperty.h; sourceTree = "<group>"; };
-		43D993880A403AD700E28AA2 /* ossimTDpt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTDpt.h; sourceTree = "<group>"; };
-		43D993890A403AD700E28AA2 /* ossimTempFilename.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTempFilename.h; sourceTree = "<group>"; };
-		43D9938A0A403AD700E28AA2 /* ossimTextProperty.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTextProperty.h; sourceTree = "<group>"; };
-		43D9938B0A403AD700E28AA2 /* ossimThreeParamDatum.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimThreeParamDatum.h; sourceTree = "<group>"; };
-		43D9938C0A403AD700E28AA2 /* ossimTieGpt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTieGpt.h; sourceTree = "<group>"; };
-		43D9938D0A403AD700E28AA2 /* ossimTieGptSet.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTieGptSet.h; sourceTree = "<group>"; };
-		43D9938E0A403AD700E28AA2 /* ossimTileHash.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTileHash.h; sourceTree = "<group>"; };
-		43D9938F0A403AD700E28AA2 /* ossimTiledImageHash.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTiledImageHash.h; sourceTree = "<group>"; };
-		43D993900A403AD700E28AA2 /* ossimTrace.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTrace.h; sourceTree = "<group>"; };
-		43D993910A403AD700E28AA2 /* ossimTraceManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTraceManager.h; sourceTree = "<group>"; };
-		43D993920A403AD700E28AA2 /* ossimUnitConversionTool.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimUnitConversionTool.h; sourceTree = "<group>"; };
-		43D993930A403AD700E28AA2 /* ossimUnitTypeLut.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimUnitTypeLut.h; sourceTree = "<group>"; };
-		43D993940A403AD700E28AA2 /* ossimUsgsQuad.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimUsgsQuad.h; sourceTree = "<group>"; };
-		43D993950A403AD700E28AA2 /* ossimViewController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimViewController.h; sourceTree = "<group>"; };
-		43D993960A403AD700E28AA2 /* ossimViewEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimViewEvent.h; sourceTree = "<group>"; };
-		43D993970A403AD700E28AA2 /* ossimViewInterface.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimViewInterface.h; sourceTree = "<group>"; };
-		43D993980A403AD700E28AA2 /* ossimViewListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimViewListener.h; sourceTree = "<group>"; };
-		43D993990A403AD700E28AA2 /* ossimVrect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVrect.h; sourceTree = "<group>"; };
-		43D9939A0A403AD700E28AA2 /* ossimWgs72Datum.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimWgs72Datum.h; sourceTree = "<group>"; };
-		43D9939B0A403AD700E28AA2 /* ossimWgs84Datum.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimWgs84Datum.h; sourceTree = "<group>"; };
-		43D9939C0A403AD700E28AA2 /* ossimXmlAttribute.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimXmlAttribute.h; sourceTree = "<group>"; };
-		43D9939D0A403AD700E28AA2 /* ossimXmlDocument.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimXmlDocument.h; sourceTree = "<group>"; };
-		43D9939E0A403AD700E28AA2 /* ossimXmlNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimXmlNode.h; sourceTree = "<group>"; };
-		43D9939F0A403AD700E28AA2 /* ossimXmlString.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimXmlString.h; sourceTree = "<group>"; };
-		43D993A10A403AD700E28AA2 /* ossimDtedFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDtedFactory.h; sourceTree = "<group>"; };
-		43D993A20A403AD700E28AA2 /* ossimDtedHandler.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDtedHandler.h; sourceTree = "<group>"; };
-		43D993A30A403AD700E28AA2 /* ossimElevCellHandler.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimElevCellHandler.h; sourceTree = "<group>"; };
-		43D993A40A403AD700E28AA2 /* ossimElevCellHandlerFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimElevCellHandlerFactory.h; sourceTree = "<group>"; };
-		43D993A50A403AD700E28AA2 /* ossimElevLess.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimElevLess.h; sourceTree = "<group>"; };
-		43D993A60A403AD700E28AA2 /* ossimElevManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimElevManager.h; sourceTree = "<group>"; };
-		43D993A70A403AD700E28AA2 /* ossimElevSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimElevSource.h; sourceTree = "<group>"; };
-		43D993A80A403AD700E28AA2 /* ossimElevSourceFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimElevSourceFactory.h; sourceTree = "<group>"; };
-		43D993AA0A403AD700E28AA2 /* ossimGeneralRasterElevFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeneralRasterElevFactory.h; sourceTree = "<group>"; };
-		43D993AB0A403AD700E28AA2 /* ossimGeneralRasterElevHandler.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeneralRasterElevHandler.h; sourceTree = "<group>"; };
-		43D993AC0A403AD700E28AA2 /* ossimSrtmFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSrtmFactory.h; sourceTree = "<group>"; };
-		43D993AD0A403AD700E28AA2 /* ossimSrtmHandler.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSrtmHandler.h; sourceTree = "<group>"; };
-		43D993AF0A403AD700E28AA2 /* ossimFont.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFont.h; sourceTree = "<group>"; };
-		43D993B00A403AD700E28AA2 /* ossimFontFactoryBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFontFactoryBase.h; sourceTree = "<group>"; };
-		43D993B10A403AD700E28AA2 /* ossimFontFactoryRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFontFactoryRegistry.h; sourceTree = "<group>"; };
-		43D993B20A403AD800E28AA2 /* ossimFreeTypeFont.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFreeTypeFont.h; sourceTree = "<group>"; };
-		43D993B30A403AD800E28AA2 /* ossimFreeTypeFontFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFreeTypeFontFactory.h; sourceTree = "<group>"; };
-		43D993B40A403AD800E28AA2 /* ossimGdBitmapFont.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGdBitmapFont.h; sourceTree = "<group>"; };
-		43D993BC0A403AD800E28AA2 /* ossim3x3ConvolutionFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossim3x3ConvolutionFilter.h; sourceTree = "<group>"; };
-		43D993BD0A403AD800E28AA2 /* ossimAOD.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAOD.h; sourceTree = "<group>"; };
-		43D993BE0A403AD800E28AA2 /* ossimAdrgHeader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAdrgHeader.h; sourceTree = "<group>"; };
-		43D993BF0A403AD800E28AA2 /* ossimAdrgTileSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAdrgTileSource.h; sourceTree = "<group>"; };
-		43D993C00A403AD800E28AA2 /* ossimAnnotationEllipseObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAnnotationEllipseObject.h; sourceTree = "<group>"; };
-		43D993C10A403AD800E28AA2 /* ossimAnnotationFontObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAnnotationFontObject.h; sourceTree = "<group>"; };
-		43D993C20A403AD800E28AA2 /* ossimAnnotationGdBitmapFont.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAnnotationGdBitmapFont.h; sourceTree = "<group>"; };
-		43D993C30A403AD800E28AA2 /* ossimAnnotationLineObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAnnotationLineObject.h; sourceTree = "<group>"; };
-		43D993C40A403AD800E28AA2 /* ossimAnnotationMapGridSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAnnotationMapGridSource.h; sourceTree = "<group>"; };
-		43D993C50A403AD800E28AA2 /* ossimAnnotationMultiEllipseObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAnnotationMultiEllipseObject.h; sourceTree = "<group>"; };
-		43D993C60A403AD800E28AA2 /* ossimAnnotationMultiLineObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAnnotationMultiLineObject.h; sourceTree = "<group>"; };
-		43D993C70A403AD800E28AA2 /* ossimAnnotationMultiPolyLineObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAnnotationMultiPolyLineObject.h; sourceTree = "<group>"; };
-		43D993C80A403AD800E28AA2 /* ossimAnnotationMultiPolyObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAnnotationMultiPolyObject.h; sourceTree = "<group>"; };
-		43D993C90A403AD800E28AA2 /* ossimAnnotationObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAnnotationObject.h; sourceTree = "<group>"; };
-		43D993CA0A403AD800E28AA2 /* ossimAnnotationObjectFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAnnotationObjectFactory.h; sourceTree = "<group>"; };
-		43D993CB0A403AD800E28AA2 /* ossimAnnotationPolyObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAnnotationPolyObject.h; sourceTree = "<group>"; };
-		43D993CC0A403AD800E28AA2 /* ossimAnnotationSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAnnotationSource.h; sourceTree = "<group>"; };
-		43D993CD0A403AD800E28AA2 /* ossimAppFixedTileCache.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAppFixedTileCache.h; sourceTree = "<group>"; };
-		43D993CE0A403AD800E28AA2 /* ossimAppTileCache.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAppTileCache.h; sourceTree = "<group>"; };
-		43D993CF0A403AD800E28AA2 /* ossimArcInfoGridWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimArcInfoGridWriter.h; sourceTree = "<group>"; };
-		43D993D00A403AD800E28AA2 /* ossimAtCorrGridRemapper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAtCorrGridRemapper.h; sourceTree = "<group>"; };
-		43D993D10A403AD800E28AA2 /* ossimAtCorrKeywords.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAtCorrKeywords.h; sourceTree = "<group>"; };
-		43D993D20A403AD800E28AA2 /* ossimAtCorrRemapper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAtCorrRemapper.h; sourceTree = "<group>"; };
-		43D993D30A403AD800E28AA2 /* ossimAtbController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAtbController.h; sourceTree = "<group>"; };
-		43D993D40A403AD800E28AA2 /* ossimAtbMatchPoint.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAtbMatchPoint.h; sourceTree = "<group>"; };
-		43D993D50A403AD800E28AA2 /* ossimAtbPointSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAtbPointSource.h; sourceTree = "<group>"; };
-		43D993D60A403AD800E28AA2 /* ossimBandAverageFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimBandAverageFilter.h; sourceTree = "<group>"; };
-		43D993D70A403AD800E28AA2 /* ossimBandClipFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimBandClipFilter.h; sourceTree = "<group>"; };
-		43D993D80A403AD800E28AA2 /* ossimBandMergeSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimBandMergeSource.h; sourceTree = "<group>"; };
-		43D993D90A403AD800E28AA2 /* ossimBandSelector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimBandSelector.h; sourceTree = "<group>"; };
-		43D993DA0A403AD800E28AA2 /* ossimBlendMosaic.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimBlendMosaic.h; sourceTree = "<group>"; };
-		43D993DB0A403AD800E28AA2 /* ossimBrightnessContrastSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimBrightnessContrastSource.h; sourceTree = "<group>"; };
-		43D993DC0A403AD800E28AA2 /* ossimBrightnessMatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimBrightnessMatch.h; sourceTree = "<group>"; };
-		43D993DD0A403AD800E28AA2 /* ossimBumpShadeTileSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimBumpShadeTileSource.h; sourceTree = "<group>"; };
-		43D993DE0A403AD800E28AA2 /* ossimCacheTileSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimCacheTileSource.h; sourceTree = "<group>"; };
-		43D993DF0A403AD800E28AA2 /* ossimCastTileSourceFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimCastTileSourceFilter.h; sourceTree = "<group>"; };
-		43D993E00A403AD800E28AA2 /* ossimCcfHead.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimCcfHead.h; sourceTree = "<group>"; };
-		43D993E10A403AD800E28AA2 /* ossimCcfTileSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimCcfTileSource.h; sourceTree = "<group>"; };
-		43D993E20A403AD800E28AA2 /* ossimCibCadrgTileSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimCibCadrgTileSource.h; sourceTree = "<group>"; };
-		43D993E30A403AD800E28AA2 /* ossimClosestToCenterCombiner.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimClosestToCenterCombiner.h; sourceTree = "<group>"; };
-		43D993E40A403AD800E28AA2 /* ossimColorNormalizedFusion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimColorNormalizedFusion.h; sourceTree = "<group>"; };
-		43D993E50A403AD800E28AA2 /* ossimConvolutionFilter1D.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimConvolutionFilter1D.h; sourceTree = "<group>"; };
-		43D993E60A403AD800E28AA2 /* ossimConvolutionSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimConvolutionSource.h; sourceTree = "<group>"; };
-		43D993E70A403AD800E28AA2 /* ossimDiscrete3x3HatFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDiscrete3x3HatFilter.h; sourceTree = "<group>"; };
-		43D993E80A403AD800E28AA2 /* ossimDiscreteConvolutionKernel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDiscreteConvolutionKernel.h; sourceTree = "<group>"; };
-		43D993E90A403AD800E28AA2 /* ossimDiscreteNearestNeighbor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDiscreteNearestNeighbor.h; sourceTree = "<group>"; };
-		43D993EA0A403AD800E28AA2 /* ossimDoqqTileSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDoqqTileSource.h; sourceTree = "<group>"; };
-		43D993EB0A403AD800E28AA2 /* ossimDtedElevationImageSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDtedElevationImageSource.h; sourceTree = "<group>"; };
-		43D993EC0A403AD800E28AA2 /* ossimDtedTileSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDtedTileSource.h; sourceTree = "<group>"; };
-		43D993ED0A403AD800E28AA2 /* ossimERSTileSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimERSTileSource.h; sourceTree = "<group>"; };
-		43D993EE0A403AD800E28AA2 /* ossimEastingNorthingCutter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimEastingNorthingCutter.h; sourceTree = "<group>"; };
-		43D993EF0A403AD800E28AA2 /* ossimEdgeFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimEdgeFilter.h; sourceTree = "<group>"; };
-		43D993F00A403AD800E28AA2 /* ossimElevImageSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimElevImageSource.h; sourceTree = "<group>"; };
-		43D993F10A403AD800E28AA2 /* ossimEnviHeaderFileWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimEnviHeaderFileWriter.h; sourceTree = "<group>"; };
-		43D993F20A403AD800E28AA2 /* ossimEquationCombiner.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimEquationCombiner.h; sourceTree = "<group>"; };
-		43D993F50A403AD800E28AA2 /* ossimFeatherMosaic.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFeatherMosaic.h; sourceTree = "<group>"; };
-		43D993F60A403AD800E28AA2 /* ossimFftFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFftFilter.h; sourceTree = "<group>"; };
-		43D993F70A403AD800E28AA2 /* ossimFgdcFileWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFgdcFileWriter.h; sourceTree = "<group>"; };
-		43D993F80A403AD800E28AA2 /* ossimFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFilter.h; sourceTree = "<group>"; };
-		43D993F90A403AD800E28AA2 /* ossimFilterResampler.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFilterResampler.h; sourceTree = "<group>"; };
-		43D993FA0A403AD800E28AA2 /* ossimFilterTable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFilterTable.h; sourceTree = "<group>"; };
-		43D993FB0A403AD800E28AA2 /* ossimFixedTileCache.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFixedTileCache.h; sourceTree = "<group>"; };
-		43D993FC0A403AD800E28AA2 /* ossimFusionCombiner.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFusionCombiner.h; sourceTree = "<group>"; };
-		43D993FD0A403AD800E28AA2 /* ossimGammaRemapper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGammaRemapper.h; sourceTree = "<group>"; };
-		43D993FE0A403AD800E28AA2 /* ossimGdFont.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGdFont.h; sourceTree = "<group>"; };
-		43D993FF0A403AD800E28AA2 /* ossimGdFontExterns.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGdFontExterns.h; sourceTree = "<group>"; };
-		43D994000A403AD800E28AA2 /* ossimGeneralRasterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeneralRasterInfo.h; sourceTree = "<group>"; };
-		43D994010A403AD800E28AA2 /* ossimGeneralRasterTileSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeneralRasterTileSource.h; sourceTree = "<group>"; };
-		43D994020A403AD800E28AA2 /* ossimGeneralRasterWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeneralRasterWriter.h; sourceTree = "<group>"; };
-		43D994030A403AD800E28AA2 /* ossimGeoAnnotationBitmap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoAnnotationBitmap.h; sourceTree = "<group>"; };
-		43D994040A403AD800E28AA2 /* ossimGeoAnnotationEllipseObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoAnnotationEllipseObject.h; sourceTree = "<group>"; };
-		43D994050A403AD800E28AA2 /* ossimGeoAnnotationFontObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoAnnotationFontObject.h; sourceTree = "<group>"; };
-		43D994060A403AD800E28AA2 /* ossimGeoAnnotationGdBitmapFont.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoAnnotationGdBitmapFont.h; sourceTree = "<group>"; };
-		43D994070A403AD800E28AA2 /* ossimGeoAnnotationLineObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoAnnotationLineObject.h; sourceTree = "<group>"; };
-		43D994080A403AD800E28AA2 /* ossimGeoAnnotationMultiEllipseObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoAnnotationMultiEllipseObject.h; sourceTree = "<group>"; };
-		43D994090A403AD800E28AA2 /* ossimGeoAnnotationMultiPolyLineObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoAnnotationMultiPolyLineObject.h; sourceTree = "<group>"; };
-		43D9940A0A403AD800E28AA2 /* ossimGeoAnnotationMultiPolyObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoAnnotationMultiPolyObject.h; sourceTree = "<group>"; };
-		43D9940B0A403AD800E28AA2 /* ossimGeoAnnotationObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoAnnotationObject.h; sourceTree = "<group>"; };
-		43D9940C0A403AD800E28AA2 /* ossimGeoAnnotationPolyLineObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoAnnotationPolyLineObject.h; sourceTree = "<group>"; };
-		43D9940D0A403AD800E28AA2 /* ossimGeoAnnotationPolyObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoAnnotationPolyObject.h; sourceTree = "<group>"; };
-		43D9940E0A403AD800E28AA2 /* ossimGeoAnnotationSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoAnnotationSource.h; sourceTree = "<group>"; };
-		43D9940F0A403AD800E28AA2 /* ossimGeoPolyCutter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoPolyCutter.h; sourceTree = "<group>"; };
-		43D994100A403AD800E28AA2 /* ossimGeographicAnnotationGrid.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeographicAnnotationGrid.h; sourceTree = "<group>"; };
-		43D994110A403AD800E28AA2 /* ossimGeomFileWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeomFileWriter.h; sourceTree = "<group>"; };
-		43D994120A403AD800E28AA2 /* ossimGridRemapEngine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGridRemapEngine.h; sourceTree = "<group>"; };
-		43D994130A403AD800E28AA2 /* ossimGridRemapEngineFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGridRemapEngineFactory.h; sourceTree = "<group>"; };
-		43D994140A403AD800E28AA2 /* ossimGridRemapSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGridRemapSource.h; sourceTree = "<group>"; };
-		43D994150A403AD800E28AA2 /* ossimHistoMatchRemapper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimHistoMatchRemapper.h; sourceTree = "<group>"; };
-		43D994160A403AD800E28AA2 /* ossimHistogramEqualization.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimHistogramEqualization.h; sourceTree = "<group>"; };
-		43D994170A403AD800E28AA2 /* ossimHistogramMatchFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimHistogramMatchFilter.h; sourceTree = "<group>"; };
-		43D994180A403AD800E28AA2 /* ossimHistogramRemapper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimHistogramRemapper.h; sourceTree = "<group>"; };
-		43D994190A403AD800E28AA2 /* ossimHistogramThreshholdFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimHistogramThreshholdFilter.h; sourceTree = "<group>"; };
-		43D9941A0A403AD800E28AA2 /* ossimHistogramWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimHistogramWriter.h; sourceTree = "<group>"; };
-		43D9941B0A403AD800E28AA2 /* ossimHsiRemapper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimHsiRemapper.h; sourceTree = "<group>"; };
-		43D9941C0A403AD800E28AA2 /* ossimHsiToRgbSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimHsiToRgbSource.h; sourceTree = "<group>"; };
-		43D9941D0A403AD800E28AA2 /* ossimHsvGridRemapEngine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimHsvGridRemapEngine.h; sourceTree = "<group>"; };
-		43D9941E0A403AD800E28AA2 /* ossimHsvToRgbSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimHsvToRgbSource.h; sourceTree = "<group>"; };
-		43D9941F0A403AD800E28AA2 /* ossimIgenGenerator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimIgenGenerator.h; sourceTree = "<group>"; };
-		43D994200A403AD800E28AA2 /* ossimImageChain.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageChain.h; sourceTree = "<group>"; };
-		43D994210A403AD800E28AA2 /* ossimImageCombiner.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageCombiner.h; sourceTree = "<group>"; };
-		43D994220A403AD800E28AA2 /* ossimImageData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageData.h; sourceTree = "<group>"; };
-		43D994230A403AD800E28AA2 /* ossimImageDataFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageDataFactory.h; sourceTree = "<group>"; };
-		43D994240A403AD800E28AA2 /* ossimImageDataHelper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageDataHelper.h; sourceTree = "<group>"; };
-		43D994250A403AD800E28AA2 /* ossimImageDisplayWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageDisplayWriter.h; sourceTree = "<group>"; };
-		43D994260A403AD800E28AA2 /* ossimImageFileWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageFileWriter.h; sourceTree = "<group>"; };
-		43D994270A403AD800E28AA2 /* ossimImageGaussianFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageGaussianFilter.h; sourceTree = "<group>"; };
-		43D994280A403AD800E28AA2 /* ossimImageHandler.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageHandler.h; sourceTree = "<group>"; };
-		43D994290A403AD800E28AA2 /* ossimImageHandlerFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageHandlerFactory.h; sourceTree = "<group>"; };
-		43D9942A0A403AD800E28AA2 /* ossimImageHandlerFactoryBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageHandlerFactoryBase.h; sourceTree = "<group>"; };
-		43D9942B0A403AD800E28AA2 /* ossimImageHandlerRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageHandlerRegistry.h; sourceTree = "<group>"; };
-		43D9942C0A403AD800E28AA2 /* ossimImageHistogramSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageHistogramSource.h; sourceTree = "<group>"; };
-		43D9942D0A403AD800E28AA2 /* ossimImageMetaData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageMetaData.h; sourceTree = "<group>"; };
-		43D9942E0A403AD800E28AA2 /* ossimImageMetaDataWriterFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageMetaDataWriterFactory.h; sourceTree = "<group>"; };
-		43D9942F0A403AD800E28AA2 /* ossimImageMetaDataWriterFactoryBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageMetaDataWriterFactoryBase.h; sourceTree = "<group>"; };
-		43D994300A403AD800E28AA2 /* ossimImageMetaDataWriterRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageMetaDataWriterRegistry.h; sourceTree = "<group>"; };
-		43D994310A403AD800E28AA2 /* ossimImageMosaic.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageMosaic.h; sourceTree = "<group>"; };
-		43D994320A403AD800E28AA2 /* ossimImageReconstructionFilterFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageReconstructionFilterFactory.h; sourceTree = "<group>"; };
-		43D994330A403AD800E28AA2 /* ossimImageReconstructionFilterRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageReconstructionFilterRegistry.h; sourceTree = "<group>"; };
-		43D994340A403AD800E28AA2 /* ossimImageRenderer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageRenderer.h; sourceTree = "<group>"; };
-		43D994360A403AD800E28AA2 /* ossimImageSharpenFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageSharpenFilter.h; sourceTree = "<group>"; };
-		43D994370A403AD800E28AA2 /* ossimImageSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageSource.h; sourceTree = "<group>"; };
-		43D994380A403AD800E28AA2 /* ossimImageSourceFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageSourceFactory.h; sourceTree = "<group>"; };
-		43D994390A403AD800E28AA2 /* ossimImageSourceFactoryBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageSourceFactoryBase.h; sourceTree = "<group>"; };
-		43D9943A0A403AD800E28AA2 /* ossimImageSourceFactoryRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageSourceFactoryRegistry.h; sourceTree = "<group>"; };
-		43D9943B0A403AD800E28AA2 /* ossimImageSourceFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageSourceFilter.h; sourceTree = "<group>"; };
-		43D9943C0A403AD800E28AA2 /* ossimImageSourceHistogramFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageSourceHistogramFilter.h; sourceTree = "<group>"; };
-		43D9943E0A403AD800E28AA2 /* ossimImageSourceSequencer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageSourceSequencer.h; sourceTree = "<group>"; };
-		43D9943F0A403AD800E28AA2 /* ossimImageStatisticsSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageStatisticsSource.h; sourceTree = "<group>"; };
-		43D994400A403AD800E28AA2 /* ossimImageToPlaneNormalFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageToPlaneNormalFilter.h; sourceTree = "<group>"; };
-		43D994410A403AD800E28AA2 /* ossimImageWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageWriter.h; sourceTree = "<group>"; };
-		43D994420A403AD800E28AA2 /* ossimImageWriterFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageWriterFactory.h; sourceTree = "<group>"; };
-		43D994430A403AD800E28AA2 /* ossimImageWriterFactoryBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageWriterFactoryBase.h; sourceTree = "<group>"; };
-		43D994440A403AD800E28AA2 /* ossimImageWriterFactoryRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageWriterFactoryRegistry.h; sourceTree = "<group>"; };
-		43D994450A403AD800E28AA2 /* ossimIndexToRgbLutFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimIndexToRgbLutFilter.h; sourceTree = "<group>"; };
-		43D994460A403AD800E28AA2 /* ossimIntensityAdjustmentFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimIntensityAdjustmentFilter.h; sourceTree = "<group>"; };
-		43D994470A403AD800E28AA2 /* ossimIso8211.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimIso8211.h; sourceTree = "<group>"; };
-		43D994480A403AD800E28AA2 /* ossimJpegTileSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimJpegTileSource.h; sourceTree = "<group>"; };
-		43D994490A403AD800E28AA2 /* ossimJpegWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimJpegWriter.h; sourceTree = "<group>"; };
-		43D9944A0A403AD800E28AA2 /* ossimJpegYCbCrToRgbSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimJpegYCbCrToRgbSource.h; sourceTree = "<group>"; };
-		43D9944B0A403AD800E28AA2 /* ossimLandsatTileSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimLandsatTileSource.h; sourceTree = "<group>"; };
-		43D9944C0A403AD800E28AA2 /* ossimLandsatTopoCorrectionFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimLandsatTopoCorrectionFilter.h; sourceTree = "<group>"; };
-		43D9944D0A403AD800E28AA2 /* ossimLocalCorrelationFusion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimLocalCorrelationFusion.h; sourceTree = "<group>"; };
-		43D9944E0A403AD800E28AA2 /* ossimMapCompositionSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMapCompositionSource.h; sourceTree = "<group>"; };
-		43D9944F0A403AD800E28AA2 /* ossimMaskFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMaskFilter.h; sourceTree = "<group>"; };
-		43D994500A403AD800E28AA2 /* ossimMaxMosaic.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMaxMosaic.h; sourceTree = "<group>"; };
-		43D994510A403AD800E28AA2 /* ossimMeanMedianFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMeanMedianFilter.h; sourceTree = "<group>"; };
-		43D994520A403AD800E28AA2 /* ossimMetadataFileWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMetadataFileWriter.h; sourceTree = "<group>"; };
-		43D994530A403AD800E28AA2 /* ossimMonoGridRemapEngine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMonoGridRemapEngine.h; sourceTree = "<group>"; };
-		43D994540A403AD800E28AA2 /* ossimMultiBandHistogramTileSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMultiBandHistogramTileSource.h; sourceTree = "<group>"; };
-		43D994550A403AD800E28AA2 /* ossimNBandToIndexFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNBandToIndexFilter.h; sourceTree = "<group>"; };
-		43D994560A403AD800E28AA2 /* ossimNitfTileSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfTileSource.h; sourceTree = "<group>"; };
-		43D994570A403AD800E28AA2 /* ossimNitfWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfWriter.h; sourceTree = "<group>"; };
-		43D994580A403AD800E28AA2 /* ossimNormalizedRemapTable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNormalizedRemapTable.h; sourceTree = "<group>"; };
-		43D994590A403AD800E28AA2 /* ossimNormalizedU11RemapTable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNormalizedU11RemapTable.h; sourceTree = "<group>"; };
-		43D9945A0A403AD800E28AA2 /* ossimNormalizedU16RemapTable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNormalizedU16RemapTable.h; sourceTree = "<group>"; };
-		43D9945B0A403AD800E28AA2 /* ossimNormalizedU8RemapTable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNormalizedU8RemapTable.h; sourceTree = "<group>"; };
-		43D9945C0A403AD800E28AA2 /* ossimOrthoImageMosaic.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimOrthoImageMosaic.h; sourceTree = "<group>"; };
-		43D9945D0A403AD800E28AA2 /* ossimPixelFlipper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPixelFlipper.h; sourceTree = "<group>"; };
-		43D9945E0A403AD800E28AA2 /* ossimPolyCutter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPolyCutter.h; sourceTree = "<group>"; };
-		43D9945F0A403AD800E28AA2 /* ossimQuickbirdNitfTileSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimQuickbirdNitfTileSource.h; sourceTree = "<group>"; };
-		43D994600A403AD800E28AA2 /* ossimQuickbirdTiffTileSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimQuickbirdTiffTileSource.h; sourceTree = "<group>"; };
-		43D994610A403AD800E28AA2 /* ossimRLevelFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRLevelFilter.h; sourceTree = "<group>"; };
-		43D994620A403AD800E28AA2 /* ossimReadmeFileWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimReadmeFileWriter.h; sourceTree = "<group>"; };
-		43D994630A403AD800E28AA2 /* ossimRectangleCutFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRectangleCutFilter.h; sourceTree = "<group>"; };
-		43D994640A403AD800E28AA2 /* ossimResampler.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimResampler.h; sourceTree = "<group>"; };
-		43D994650A403AD800E28AA2 /* ossimRgbGridRemapEngine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRgbGridRemapEngine.h; sourceTree = "<group>"; };
-		43D994660A403AD800E28AA2 /* ossimRgbImage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRgbImage.h; sourceTree = "<group>"; };
-		43D994670A403AD800E28AA2 /* ossimRgbToGreyFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRgbToGreyFilter.h; sourceTree = "<group>"; };
-		43D994680A403AD800E28AA2 /* ossimRgbToHsiSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRgbToHsiSource.h; sourceTree = "<group>"; };
-		43D994690A403AD800E28AA2 /* ossimRgbToHsvSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRgbToHsvSource.h; sourceTree = "<group>"; };
-		43D9946A0A403AD800E28AA2 /* ossimRgbToIndexFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRgbToIndexFilter.h; sourceTree = "<group>"; };
-		43D9946B0A403AD800E28AA2 /* ossimRgbToJpegYCbCrSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRgbToJpegYCbCrSource.h; sourceTree = "<group>"; };
-		43D9946C0A403AD800E28AA2 /* ossimS16ImageData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimS16ImageData.h; sourceTree = "<group>"; };
-		43D9946D0A403AD800E28AA2 /* ossimSFIMFusion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSFIMFusion.h; sourceTree = "<group>"; };
-		43D9946E0A403AD800E28AA2 /* ossimScalarRemapper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimScalarRemapper.h; sourceTree = "<group>"; };
-		43D9946F0A403AD800E28AA2 /* ossimScaleFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimScaleFilter.h; sourceTree = "<group>"; };
-		43D994700A403AD800E28AA2 /* ossimSrtmTileSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSrtmTileSource.h; sourceTree = "<group>"; };
-		43D994710A403AD800E28AA2 /* ossimSubImageTileSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSubImageTileSource.h; sourceTree = "<group>"; };
-		43D994720A403AD800E28AA2 /* ossimTableRemapper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTableRemapper.h; sourceTree = "<group>"; };
-		43D994730A403AD800E28AA2 /* ossimTiffOverviewBuilder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTiffOverviewBuilder.h; sourceTree = "<group>"; };
-		43D994740A403AD800E28AA2 /* ossimTiffTileSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTiffTileSource.h; sourceTree = "<group>"; };
-		43D994750A403AD800E28AA2 /* ossimTiffWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTiffWriter.h; sourceTree = "<group>"; };
-		43D994760A403AD800E28AA2 /* ossimTileCache.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTileCache.h; sourceTree = "<group>"; };
-		43D994770A403AD800E28AA2 /* ossimTilePatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTilePatch.h; sourceTree = "<group>"; };
-		43D994780A403AD800E28AA2 /* ossimTiling.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTiling.h; sourceTree = "<group>"; };
-		43D994790A403AD800E28AA2 /* ossimTopographicCorrectionFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTopographicCorrectionFilter.h; sourceTree = "<group>"; };
-		43D9947A0A403AD800E28AA2 /* ossimTrimFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTrimFilter.h; sourceTree = "<group>"; };
-		43D9947B0A403AD800E28AA2 /* ossimU11ImageData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimU11ImageData.h; sourceTree = "<group>"; };
-		43D9947C0A403AD800E28AA2 /* ossimU16ImageData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimU16ImageData.h; sourceTree = "<group>"; };
-		43D9947D0A403AD800E28AA2 /* ossimU8ImageData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimU8ImageData.h; sourceTree = "<group>"; };
-		43D9947E0A403AD800E28AA2 /* ossimUsgsDemTileSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimUsgsDemTileSource.h; sourceTree = "<group>"; };
-		43D9947F0A403AD800E28AA2 /* ossimValueAssignImageSourceFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimValueAssignImageSourceFilter.h; sourceTree = "<group>"; };
-		43D994800A403AD800E28AA2 /* ossimVectorRenderer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVectorRenderer.h; sourceTree = "<group>"; };
-		43D994810A403AD800E28AA2 /* ossimVertexExtractor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVertexExtractor.h; sourceTree = "<group>"; };
-		43D994820A403AD800E28AA2 /* ossimVpfAnnotationCoverageInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVpfAnnotationCoverageInfo.h; sourceTree = "<group>"; };
-		43D994830A403AD800E28AA2 /* ossimVpfAnnotationFeatureInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVpfAnnotationFeatureInfo.h; sourceTree = "<group>"; };
-		43D994840A403AD800E28AA2 /* ossimVpfAnnotationLibraryInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVpfAnnotationLibraryInfo.h; sourceTree = "<group>"; };
-		43D994850A403AD800E28AA2 /* ossimVpfAnnotationSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVpfAnnotationSource.h; sourceTree = "<group>"; };
-		43D994860A403AD800E28AA2 /* ossimVpfTileSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVpfTileSource.h; sourceTree = "<group>"; };
-		43D994870A403AD800E28AA2 /* ossimWatermarkFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimWatermarkFilter.h; sourceTree = "<group>"; };
-		43D994880A403AD800E28AA2 /* ossimWorldFileWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimWorldFileWriter.h; sourceTree = "<group>"; };
-		43D9948A0A403AD800E28AA2 /* ossimInit.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimInit.h; sourceTree = "<group>"; };
-		43D9948C0A403AD800E28AA2 /* _dl_itr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = _dl_itr.h; sourceTree = "<group>"; };
-		43D9948E0A403AD800E28AA2 /* _lnk_itr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = _lnk_itr.h; sourceTree = "<group>"; };
-		43D994900A403AD800E28AA2 /* bool_globals.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = bool_globals.h; sourceTree = "<group>"; };
-		43D994910A403AD800E28AA2 /* booleng.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = booleng.h; sourceTree = "<group>"; };
-		43D994920A403AD800E28AA2 /* graph.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = graph.h; sourceTree = "<group>"; };
-		43D994930A403AD800E28AA2 /* graphlst.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = graphlst.h; sourceTree = "<group>"; };
-		43D994940A403AD800E28AA2 /* line.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = line.h; sourceTree = "<group>"; };
-		43D994950A403AD800E28AA2 /* link.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = link.h; sourceTree = "<group>"; };
-		43D994960A403AD800E28AA2 /* lpoint.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lpoint.h; sourceTree = "<group>"; };
-		43D994970A403AD800E28AA2 /* node.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = node.h; sourceTree = "<group>"; };
-		43D994980A403AD800E28AA2 /* record.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = record.h; sourceTree = "<group>"; };
-		43D994990A403AD800E28AA2 /* scanbeam.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = scanbeam.h; sourceTree = "<group>"; };
-		43D9949A0A403AD800E28AA2 /* valuesvc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = valuesvc.h; sourceTree = "<group>"; };
-		43D9949D0A403AD900E28AA2 /* controlw.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = controlw.h; sourceTree = "<group>"; };
-		43D9949E0A403AD900E28AA2 /* include.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = include.h; sourceTree = "<group>"; };
-		43D9949F0A403AD900E28AA2 /* myexcept.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = myexcept.h; sourceTree = "<group>"; };
-		43D994A00A403AD900E28AA2 /* newmat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = newmat.h; sourceTree = "<group>"; };
-		43D994A10A403AD900E28AA2 /* newmatap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = newmatap.h; sourceTree = "<group>"; };
-		43D994A20A403AD900E28AA2 /* newmatio.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = newmatio.h; sourceTree = "<group>"; };
-		43D994A30A403AD900E28AA2 /* newmatnl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = newmatnl.h; sourceTree = "<group>"; };
-		43D994A40A403AD900E28AA2 /* newmatrc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = newmatrc.h; sourceTree = "<group>"; };
-		43D994A50A403AD900E28AA2 /* newmatrm.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = newmatrm.h; sourceTree = "<group>"; };
-		43D994A60A403AD900E28AA2 /* precisio.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = precisio.h; sourceTree = "<group>"; };
-		43D994A70A403AD900E28AA2 /* solution.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = solution.h; sourceTree = "<group>"; };
-		43D994A80A403AD900E28AA2 /* ossimConfig.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ossimConfig.h; path = ../../include/ossim/ossimConfig.h; sourceTree = "<group>"; };
-		43D994AC0A403AD900E28AA2 /* ossimIgen.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimIgen.h; sourceTree = "<group>"; };
-		43D994AD0A403AD900E28AA2 /* ossimImageMpiMWriterSequenceConnection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageMpiMWriterSequenceConnection.h; sourceTree = "<group>"; };
-		43D994AE0A403AD900E28AA2 /* ossimImageMpiSWriterSequenceConnection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageMpiSWriterSequenceConnection.h; sourceTree = "<group>"; };
-		43D994AF0A403AD900E28AA2 /* ossimMpi.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMpi.h; sourceTree = "<group>"; };
-		43D994B00A403AD900E28AA2 /* ossimOrthoIgen.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimOrthoIgen.h; sourceTree = "<group>"; };
-		43D994B20A403AD900E28AA2 /* ossimDynamicLibrary.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDynamicLibrary.h; sourceTree = "<group>"; };
-		43D994B30A403AD900E28AA2 /* ossimPluginLibrary.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPluginLibrary.h; sourceTree = "<group>"; };
-		43D994B40A403AD900E28AA2 /* ossimSharedObjectBridge.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSharedObjectBridge.h; sourceTree = "<group>"; };
-		43D994B50A403AD900E28AA2 /* ossimSharedPluginRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSharedPluginRegistry.h; sourceTree = "<group>"; };
-		43D994B70A403AD900E28AA2 /* ossimAdjMapModel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAdjMapModel.h; sourceTree = "<group>"; };
-		43D994B80A403AD900E28AA2 /* ossimAffineProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAffineProjection.h; sourceTree = "<group>"; };
-		43D994B90A403AD900E28AA2 /* ossimAlbersProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAlbersProjection.h; sourceTree = "<group>"; };
-		43D994BA0A403AD900E28AA2 /* ossimApplanixEcefModel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimApplanixEcefModel.h; sourceTree = "<group>"; };
-		43D994BB0A403AD900E28AA2 /* ossimApplanixUtmModel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimApplanixUtmModel.h; sourceTree = "<group>"; };
-		43D994BC0A403AD900E28AA2 /* ossimAzimEquDistProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAzimEquDistProjection.h; sourceTree = "<group>"; };
-		43D994BD0A403AD900E28AA2 /* ossimBilinearProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimBilinearProjection.h; sourceTree = "<group>"; };
-		43D994BE0A403AD900E28AA2 /* ossimBngProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimBngProjection.h; sourceTree = "<group>"; };
-		43D994BF0A403AD900E28AA2 /* ossimBonneProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimBonneProjection.h; sourceTree = "<group>"; };
-		43D994C00A403AD900E28AA2 /* ossimCadrgProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimCadrgProjection.h; sourceTree = "<group>"; };
-		43D994C10A403AD900E28AA2 /* ossimCassiniProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimCassiniProjection.h; sourceTree = "<group>"; };
-		43D994C20A403AD900E28AA2 /* ossimCoarseGridModel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimCoarseGridModel.h; sourceTree = "<group>"; };
-		43D994C30A403AD900E28AA2 /* ossimCylEquAreaProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimCylEquAreaProjection.h; sourceTree = "<group>"; };
-		43D994C40A403AD900E28AA2 /* ossimEckert4Projection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimEckert4Projection.h; sourceTree = "<group>"; };
-		43D994C50A403AD900E28AA2 /* ossimEckert6Projection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimEckert6Projection.h; sourceTree = "<group>"; };
-		43D994C60A403AD900E28AA2 /* ossimEquDistCylProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimEquDistCylProjection.h; sourceTree = "<group>"; };
-		43D994C70A403AD900E28AA2 /* ossimFcsiModel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFcsiModel.h; sourceTree = "<group>"; };
-		43D994C80A403AD900E28AA2 /* ossimGnomonicProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGnomonicProjection.h; sourceTree = "<group>"; };
-		43D994C90A403AD900E28AA2 /* ossimIkonosRpcModel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimIkonosRpcModel.h; sourceTree = "<group>"; };
-		43D994CA0A403AD900E28AA2 /* ossimImageViewAffineTransform.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageViewAffineTransform.h; sourceTree = "<group>"; };
-		43D994CB0A403AD900E28AA2 /* ossimImageViewProjectionTransform.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageViewProjectionTransform.h; sourceTree = "<group>"; };
-		43D994CC0A403AD900E28AA2 /* ossimImageViewTransform.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageViewTransform.h; sourceTree = "<group>"; };
-		43D994CD0A403AD900E28AA2 /* ossimImageViewTransformFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimImageViewTransformFactory.h; sourceTree = "<group>"; };
-		43D994CE0A403AD900E28AA2 /* ossimLambertConformalConicProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimLambertConformalConicProjection.h; sourceTree = "<group>"; };
-		43D994CF0A403AD900E28AA2 /* ossimLandSatModel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimLandSatModel.h; sourceTree = "<group>"; };
-		43D994D00A403AD900E28AA2 /* ossimLensDistortion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimLensDistortion.h; sourceTree = "<group>"; };
-		43D994D10A403AD900E28AA2 /* ossimLlxyProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimLlxyProjection.h; sourceTree = "<group>"; };
-		43D994D20A403AD900E28AA2 /* ossimMapProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMapProjection.h; sourceTree = "<group>"; };
-		43D994D30A403AD900E28AA2 /* ossimMapProjectionFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMapProjectionFactory.h; sourceTree = "<group>"; };
-		43D994D40A403AD900E28AA2 /* ossimMapProjectionInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMapProjectionInfo.h; sourceTree = "<group>"; };
-		43D994D50A403AD900E28AA2 /* ossimMapViewController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMapViewController.h; sourceTree = "<group>"; };
-		43D994D60A403AD900E28AA2 /* ossimMeanRadialLensDistortion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMeanRadialLensDistortion.h; sourceTree = "<group>"; };
-		43D994D70A403AD900E28AA2 /* ossimMercatorProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMercatorProjection.h; sourceTree = "<group>"; };
-		43D994D80A403AD900E28AA2 /* ossimMgrs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMgrs.h; sourceTree = "<group>"; };
-		43D994D90A403AD900E28AA2 /* ossimMillerProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMillerProjection.h; sourceTree = "<group>"; };
-		43D994DA0A403AD900E28AA2 /* ossimMiscProjectionFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMiscProjectionFactory.h; sourceTree = "<group>"; };
-		43D994DB0A403AD900E28AA2 /* ossimMollweidProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimMollweidProjection.h; sourceTree = "<group>"; };
-		43D994DC0A403AD900E28AA2 /* ossimNewZealandMapGridProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNewZealandMapGridProjection.h; sourceTree = "<group>"; };
-		43D994DD0A403AD900E28AA2 /* ossimNitfMapModel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfMapModel.h; sourceTree = "<group>"; };
-		43D994DE0A403AD900E28AA2 /* ossimNitfProjectionFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfProjectionFactory.h; sourceTree = "<group>"; };
-		43D994DF0A403AD900E28AA2 /* ossimNitfRpcModel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfRpcModel.h; sourceTree = "<group>"; };
-		43D994E00A403AD900E28AA2 /* ossimObliqueMercatorProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimObliqueMercatorProjection.h; sourceTree = "<group>"; };
-		43D994E10A403AD900E28AA2 /* ossimOptimizableProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimOptimizableProjection.h; sourceTree = "<group>"; };
-		43D994E20A403AD900E28AA2 /* ossimOrthoGraphicProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimOrthoGraphicProjection.h; sourceTree = "<group>"; };
-		43D994E30A403AD900E28AA2 /* ossimPcsCodeProjectionFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPcsCodeProjectionFactory.h; sourceTree = "<group>"; };
-		43D994E40A403AD900E28AA2 /* ossimPolarStereoProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPolarStereoProjection.h; sourceTree = "<group>"; };
-		43D994E50A403AD900E28AA2 /* ossimPolarst.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPolarst.h; sourceTree = "<group>"; };
-		43D994E60A403AD900E28AA2 /* ossimPolyconicProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPolyconicProjection.h; sourceTree = "<group>"; };
-		43D994E70A403AD900E28AA2 /* ossimPolynomProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimPolynomProjection.h; sourceTree = "<group>"; };
-		43D994E80A403AD900E28AA2 /* ossimProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimProjection.h; sourceTree = "<group>"; };
-		43D994E90A403AD900E28AA2 /* ossimProjectionFactoryBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimProjectionFactoryBase.h; sourceTree = "<group>"; };
-		43D994EA0A403AD900E28AA2 /* ossimProjectionFactoryRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimProjectionFactoryRegistry.h; sourceTree = "<group>"; };
-		43D994EB0A403AD900E28AA2 /* ossimProjectionViewControllerFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimProjectionViewControllerFactory.h; sourceTree = "<group>"; };
-		43D994EC0A403AD900E28AA2 /* ossimQuadProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimQuadProjection.h; sourceTree = "<group>"; };
-		43D994ED0A403AD900E28AA2 /* ossimQuickbirdRpcModel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimQuickbirdRpcModel.h; sourceTree = "<group>"; };
-		43D994EE0A403AD900E28AA2 /* ossimRadialDecentLensDistortion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRadialDecentLensDistortion.h; sourceTree = "<group>"; };
-		43D994EF0A403AD900E28AA2 /* ossimRpcModel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpcModel.h; sourceTree = "<group>"; };
-		43D994F00A403AD900E28AA2 /* ossimRpcProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpcProjection.h; sourceTree = "<group>"; };
-		43D994F10A403AD900E28AA2 /* ossimRpcSolver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpcSolver.h; sourceTree = "<group>"; };
-		43D994F20A403AD900E28AA2 /* ossimSensorModel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSensorModel.h; sourceTree = "<group>"; };
-		43D994F30A403AD900E28AA2 /* ossimSensorModelFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSensorModelFactory.h; sourceTree = "<group>"; };
-		43D994F40A403AD900E28AA2 /* ossimSinusoid.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSinusoid.h; sourceTree = "<group>"; };
-		43D994F50A403AD900E28AA2 /* ossimSinusoidalProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSinusoidalProjection.h; sourceTree = "<group>"; };
-		43D994F60A403AD900E28AA2 /* ossimSpaceObliqueMercatorProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSpaceObliqueMercatorProjection.h; sourceTree = "<group>"; };
-		43D994F70A403AD900E28AA2 /* ossimSpot5Model.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSpot5Model.h; sourceTree = "<group>"; };
-		43D994F80A403AD900E28AA2 /* ossimSrsProjectionFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSrsProjectionFactory.h; sourceTree = "<group>"; };
-		43D994F90A403AD900E28AA2 /* ossimStatePlaneProjectionFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimStatePlaneProjectionFactory.h; sourceTree = "<group>"; };
-		43D994FA0A403AD900E28AA2 /* ossimStatePlaneProjectionInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimStatePlaneProjectionInfo.h; sourceTree = "<group>"; };
-		43D994FB0A403AD900E28AA2 /* ossimStereographicProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimStereographicProjection.h; sourceTree = "<group>"; };
-		43D994FC0A403AD900E28AA2 /* ossimTiffProjectionFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTiffProjectionFactory.h; sourceTree = "<group>"; };
-		43D994FD0A403AD900E28AA2 /* ossimTranmerc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTranmerc.h; sourceTree = "<group>"; };
-		43D994FE0A403AD900E28AA2 /* ossimTransCylEquAreaProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTransCylEquAreaProjection.h; sourceTree = "<group>"; };
-		43D994FF0A403AD900E28AA2 /* ossimTransMercatorProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTransMercatorProjection.h; sourceTree = "<group>"; };
-		43D995000A403AD900E28AA2 /* ossimUps.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimUps.h; sourceTree = "<group>"; };
-		43D995010A403AD900E28AA2 /* ossimUpsProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimUpsProjection.h; sourceTree = "<group>"; };
-		43D995020A403AD900E28AA2 /* ossimUpspt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimUpspt.h; sourceTree = "<group>"; };
-		43D995030A403AD900E28AA2 /* ossimUtm.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimUtm.h; sourceTree = "<group>"; };
-		43D995040A403AD900E28AA2 /* ossimUtmProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimUtmProjection.h; sourceTree = "<group>"; };
-		43D995050A403AD900E28AA2 /* ossimUtmpt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimUtmpt.h; sourceTree = "<group>"; };
-		43D995060A403AD900E28AA2 /* ossimVanDerGrintenProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVanDerGrintenProjection.h; sourceTree = "<group>"; };
-		43D995070A403AD900E28AA2 /* ossimWarpProjection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimWarpProjection.h; sourceTree = "<group>"; };
-		43D995090A403AD900E28AA2 /* ossimAigBounds.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAigBounds.h; sourceTree = "<group>"; };
-		43D9950A0A403AD900E28AA2 /* ossimAigDataFileHeader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAigDataFileHeader.h; sourceTree = "<group>"; };
-		43D9950B0A403AD900E28AA2 /* ossimAigHeader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAigHeader.h; sourceTree = "<group>"; };
-		43D9950C0A403AD900E28AA2 /* ossimAigIndexFileHeader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAigIndexFileHeader.h; sourceTree = "<group>"; };
-		43D9950D0A403AD900E28AA2 /* ossimAigStatistics.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimAigStatistics.h; sourceTree = "<group>"; };
-		43D9950E0A403AD900E28AA2 /* ossimApplanixEOFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimApplanixEOFile.h; sourceTree = "<group>"; };
-		43D9950F0A403AD900E28AA2 /* ossimDemGrid.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDemGrid.h; sourceTree = "<group>"; };
-		43D995100A403AD900E28AA2 /* ossimDemHeader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDemHeader.h; sourceTree = "<group>"; };
-		43D995110A403AD900E28AA2 /* ossimDemPoint.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDemPoint.h; sourceTree = "<group>"; };
-		43D995120A403AD900E28AA2 /* ossimDemProfile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDemProfile.h; sourceTree = "<group>"; };
-		43D995130A403AD900E28AA2 /* ossimDemStats.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDemStats.h; sourceTree = "<group>"; };
-		43D995140A403AD900E28AA2 /* ossimDemUtil.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDemUtil.h; sourceTree = "<group>"; };
-		43D995150A403AD900E28AA2 /* ossimDoqq.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDoqq.h; sourceTree = "<group>"; };
-		43D995160A403AD900E28AA2 /* ossimDtedAcc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDtedAcc.h; sourceTree = "<group>"; };
-		43D995170A403AD900E28AA2 /* ossimDtedDsi.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDtedDsi.h; sourceTree = "<group>"; };
-		43D995180A403AD900E28AA2 /* ossimDtedHdr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDtedHdr.h; sourceTree = "<group>"; };
-		43D995190A403AD900E28AA2 /* ossimDtedRecord.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDtedRecord.h; sourceTree = "<group>"; };
-		43D9951A0A403AD900E28AA2 /* ossimDtedUhl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDtedUhl.h; sourceTree = "<group>"; };
-		43D9951B0A403AD900E28AA2 /* ossimDtedVol.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDtedVol.h; sourceTree = "<group>"; };
-		43D9951C0A403AD900E28AA2 /* ossimERS.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimERS.h; sourceTree = "<group>"; };
-		43D9951D0A403AD900E28AA2 /* ossimEnviHeader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimEnviHeader.h; sourceTree = "<group>"; };
-		43D9951E0A403AD900E28AA2 /* ossimFfL5.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFfL5.h; sourceTree = "<group>"; };
-		43D9951F0A403AD900E28AA2 /* ossimFfL7.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFfL7.h; sourceTree = "<group>"; };
-		43D995200A403AD900E28AA2 /* ossimFfRevb.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFfRevb.h; sourceTree = "<group>"; };
-		43D995210A403AD900E28AA2 /* ossimFfRevc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimFfRevc.h; sourceTree = "<group>"; };
-		43D995220A403AD900E28AA2 /* ossimGeoTiff.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimGeoTiff.h; sourceTree = "<group>"; };
-		43D995230A403AD900E28AA2 /* ossimIkonosMetaData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimIkonosMetaData.h; sourceTree = "<group>"; };
-		43D995240A403AD900E28AA2 /* ossimNitfBlockaTag.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfBlockaTag.h; sourceTree = "<group>"; };
-		43D995250A403AD900E28AA2 /* ossimNitfCommon.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfCommon.h; sourceTree = "<group>"; };
-		43D995260A403AD900E28AA2 /* ossimNitfCompressionHeader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfCompressionHeader.h; sourceTree = "<group>"; };
-		43D995270A403AD900E28AA2 /* ossimNitfDataExtensionSegment.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfDataExtensionSegment.h; sourceTree = "<group>"; };
-		43D995280A403AD900E28AA2 /* ossimNitfDataExtensionSegmentV2_0.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfDataExtensionSegmentV2_0.h; sourceTree = "<group>"; };
-		43D995290A403AD900E28AA2 /* ossimNitfEmbeddedRpfDes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfEmbeddedRpfDes.h; sourceTree = "<group>"; };
-		43D9952A0A403AD900E28AA2 /* ossimNitfEmbeddedRpfHeader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfEmbeddedRpfHeader.h; sourceTree = "<group>"; };
-		43D9952B0A403AD900E28AA2 /* ossimNitfFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfFile.h; sourceTree = "<group>"; };
-		43D9952C0A403AD900E28AA2 /* ossimNitfFileHeader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfFileHeader.h; sourceTree = "<group>"; };
-		43D9952D0A403AD900E28AA2 /* ossimNitfFileHeaderV2_0.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfFileHeaderV2_0.h; sourceTree = "<group>"; };
-		43D9952E0A403AD900E28AA2 /* ossimNitfFileHeaderV2_1.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfFileHeaderV2_1.h; sourceTree = "<group>"; };
-		43D9952F0A403AD900E28AA2 /* ossimNitfFileHeaderV2_X.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfFileHeaderV2_X.h; sourceTree = "<group>"; };
-		43D995300A403AD900E28AA2 /* ossimNitfGeoPositioningTag.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfGeoPositioningTag.h; sourceTree = "<group>"; };
-		43D995310A403AD900E28AA2 /* ossimNitfIchipbTag.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfIchipbTag.h; sourceTree = "<group>"; };
-		43D995320A403AD900E28AA2 /* ossimNitfImageBand.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfImageBand.h; sourceTree = "<group>"; };
-		43D995330A403AD900E28AA2 /* ossimNitfImageBandV2_0.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfImageBandV2_0.h; sourceTree = "<group>"; };
-		43D995340A403AD900E28AA2 /* ossimNitfImageBandV2_1.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfImageBandV2_1.h; sourceTree = "<group>"; };
-		43D995350A403AD900E28AA2 /* ossimNitfImageHeader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfImageHeader.h; sourceTree = "<group>"; };
-		43D995360A403AD900E28AA2 /* ossimNitfImageHeaderV2_0.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfImageHeaderV2_0.h; sourceTree = "<group>"; };
-		43D995370A403AD900E28AA2 /* ossimNitfImageHeaderV2_1.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfImageHeaderV2_1.h; sourceTree = "<group>"; };
-		43D995380A403AD900E28AA2 /* ossimNitfImageHeaderV2_X.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfImageHeaderV2_X.h; sourceTree = "<group>"; };
-		43D995390A403AD900E28AA2 /* ossimNitfImageLut.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfImageLut.h; sourceTree = "<group>"; };
-		43D9953A0A403AD900E28AA2 /* ossimNitfImageLutV2_0.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfImageLutV2_0.h; sourceTree = "<group>"; };
-		43D9953B0A403AD900E28AA2 /* ossimNitfImageLutV2_1.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfImageLutV2_1.h; sourceTree = "<group>"; };
-		43D9953C0A403AD900E28AA2 /* ossimNitfLabelHeader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfLabelHeader.h; sourceTree = "<group>"; };
-		43D9953D0A403AD900E28AA2 /* ossimNitfLabelHeaderV2_0.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfLabelHeaderV2_0.h; sourceTree = "<group>"; };
-		43D9953E0A403AD900E28AA2 /* ossimNitfLocalCartographicTag.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfLocalCartographicTag.h; sourceTree = "<group>"; };
-		43D9953F0A403AD900E28AA2 /* ossimNitfLocalGeographicTag.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfLocalGeographicTag.h; sourceTree = "<group>"; };
-		43D995400A403AD900E28AA2 /* ossimNitfNameConversionTables.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfNameConversionTables.h; sourceTree = "<group>"; };
-		43D995410A403AD900E28AA2 /* ossimNitfPiaimcTag.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfPiaimcTag.h; sourceTree = "<group>"; };
-		43D995420A403AD900E28AA2 /* ossimNitfProjectionParameterTag.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfProjectionParameterTag.h; sourceTree = "<group>"; };
-		43D995430A403AD900E28AA2 /* ossimNitfRegisteredTag.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfRegisteredTag.h; sourceTree = "<group>"; };
-		43D995440A403AD900E28AA2 /* ossimNitfRegisteredTagFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfRegisteredTagFactory.h; sourceTree = "<group>"; };
-		43D995450A403AD900E28AA2 /* ossimNitfRpcATag.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfRpcATag.h; sourceTree = "<group>"; };
-		43D995460A403AD900E28AA2 /* ossimNitfRpcBTag.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfRpcBTag.h; sourceTree = "<group>"; };
-		43D995470A403AD900E28AA2 /* ossimNitfRpcBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfRpcBase.h; sourceTree = "<group>"; };
-		43D995480A403AD900E28AA2 /* ossimNitfRpfTagFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfRpfTagFactory.h; sourceTree = "<group>"; };
-		43D995490A403AD900E28AA2 /* ossimNitfSensraTag.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfSensraTag.h; sourceTree = "<group>"; };
-		43D9954A0A403AD900E28AA2 /* ossimNitfStdidcTag.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfStdidcTag.h; sourceTree = "<group>"; };
-		43D9954B0A403AD900E28AA2 /* ossimNitfSymbolHeader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfSymbolHeader.h; sourceTree = "<group>"; };
-		43D9954C0A403AD900E28AA2 /* ossimNitfSymbolHeaderV2_0.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfSymbolHeaderV2_0.h; sourceTree = "<group>"; };
-		43D9954D0A403AD900E28AA2 /* ossimNitfTagFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfTagFactory.h; sourceTree = "<group>"; };
-		43D9954E0A403AD900E28AA2 /* ossimNitfTagFactoryRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfTagFactoryRegistry.h; sourceTree = "<group>"; };
-		43D9954F0A403AD900E28AA2 /* ossimNitfTagInformation.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfTagInformation.h; sourceTree = "<group>"; };
-		43D995500A403AD900E28AA2 /* ossimNitfTextHeader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfTextHeader.h; sourceTree = "<group>"; };
-		43D995510A403AD900E28AA2 /* ossimNitfTextHeaderV2_0.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfTextHeaderV2_0.h; sourceTree = "<group>"; };
-		43D995520A403AD900E28AA2 /* ossimNitfUnknownTag.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfUnknownTag.h; sourceTree = "<group>"; };
-		43D995530A403AD900E28AA2 /* ossimNitfUse00aTag.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfUse00aTag.h; sourceTree = "<group>"; };
-		43D995540A403AD900E28AA2 /* ossimNitfVqCompressionHeader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimNitfVqCompressionHeader.h; sourceTree = "<group>"; };
-		43D995550A403AD900E28AA2 /* ossimQuickbirdRpcHeader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimQuickbirdRpcHeader.h; sourceTree = "<group>"; };
-		43D995560A403AD900E28AA2 /* ossimQuickbirdTile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimQuickbirdTile.h; sourceTree = "<group>"; };
-		43D995570A403AD900E28AA2 /* ossimRpfAttributeOffsetRecord.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfAttributeOffsetRecord.h; sourceTree = "<group>"; };
-		43D995580A403AD900E28AA2 /* ossimRpfAttributeSectionSubheader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfAttributeSectionSubheader.h; sourceTree = "<group>"; };
-		43D995590A403AD900E28AA2 /* ossimRpfAttributes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfAttributes.h; sourceTree = "<group>"; };
-		43D9955A0A403AD900E28AA2 /* ossimRpfBoundaryRectRecord.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfBoundaryRectRecord.h; sourceTree = "<group>"; };
-		43D9955B0A403AD900E28AA2 /* ossimRpfBoundaryRectSectionSubheader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfBoundaryRectSectionSubheader.h; sourceTree = "<group>"; };
-		43D9955C0A403AD900E28AA2 /* ossimRpfBoundaryRectTable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfBoundaryRectTable.h; sourceTree = "<group>"; };
-		43D9955D0A403AD900E28AA2 /* ossimRpfColorConverterOffsetRecord.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfColorConverterOffsetRecord.h; sourceTree = "<group>"; };
-		43D9955E0A403AD900E28AA2 /* ossimRpfColorConverterSubsection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfColorConverterSubsection.h; sourceTree = "<group>"; };
-		43D9955F0A403AD900E28AA2 /* ossimRpfColorConverterTable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfColorConverterTable.h; sourceTree = "<group>"; };
-		43D995600A403AD900E28AA2 /* ossimRpfColorGrayscaleOffsetRecord.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfColorGrayscaleOffsetRecord.h; sourceTree = "<group>"; };
-		43D995610A403AD900E28AA2 /* ossimRpfColorGrayscaleSubheader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfColorGrayscaleSubheader.h; sourceTree = "<group>"; };
-		43D995620A403AD900E28AA2 /* ossimRpfColorGrayscaleTable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfColorGrayscaleTable.h; sourceTree = "<group>"; };
-		43D995630A403AD900E28AA2 /* ossimRpfCompressionLookupOffsetRecord.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfCompressionLookupOffsetRecord.h; sourceTree = "<group>"; };
-		43D995640A403AD900E28AA2 /* ossimRpfCompressionSection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfCompressionSection.h; sourceTree = "<group>"; };
-		43D995650A403AD900E28AA2 /* ossimRpfCompressionSectionSubheader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfCompressionSectionSubheader.h; sourceTree = "<group>"; };
-		43D995660A403AD900E28AA2 /* ossimRpfConstants.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfConstants.h; sourceTree = "<group>"; };
-		43D995670A403AD900E28AA2 /* ossimRpfCoverageSection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfCoverageSection.h; sourceTree = "<group>"; };
-		43D995680A403AD900E28AA2 /* ossimRpfFrame.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfFrame.h; sourceTree = "<group>"; };
-		43D995690A403AD900E28AA2 /* ossimRpfFrameEntry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfFrameEntry.h; sourceTree = "<group>"; };
-		43D9956A0A403AD900E28AA2 /* ossimRpfFrameFileIndexRecord.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfFrameFileIndexRecord.h; sourceTree = "<group>"; };
-		43D9956B0A403AD900E28AA2 /* ossimRpfFrameFileIndexSectionSubheader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfFrameFileIndexSectionSubheader.h; sourceTree = "<group>"; };
-		43D9956C0A403AD900E28AA2 /* ossimRpfFrameFileIndexSubsection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfFrameFileIndexSubsection.h; sourceTree = "<group>"; };
-		43D9956D0A403AD900E28AA2 /* ossimRpfFrameFileReader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfFrameFileReader.h; sourceTree = "<group>"; };
-		43D9956E0A403AD900E28AA2 /* ossimRpfHeader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfHeader.h; sourceTree = "<group>"; };
-		43D9956F0A403AD900E28AA2 /* ossimRpfImageDescriptionSubheader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfImageDescriptionSubheader.h; sourceTree = "<group>"; };
-		43D995700A403AD900E28AA2 /* ossimRpfImageDisplayParameterSubheader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfImageDisplayParameterSubheader.h; sourceTree = "<group>"; };
-		43D995710A403AD900E28AA2 /* ossimRpfLocationSection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfLocationSection.h; sourceTree = "<group>"; };
-		43D995720A403AD900E28AA2 /* ossimRpfMaskSubheader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfMaskSubheader.h; sourceTree = "<group>"; };
-		43D995730A403AD900E28AA2 /* ossimRpfMaskSubsection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfMaskSubsection.h; sourceTree = "<group>"; };
-		43D995740A403AD900E28AA2 /* ossimRpfPathnameRecord.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfPathnameRecord.h; sourceTree = "<group>"; };
-		43D995750A403AD900E28AA2 /* ossimRpfToc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfToc.h; sourceTree = "<group>"; };
-		43D995760A403AD900E28AA2 /* ossimRpfTocEntry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimRpfTocEntry.h; sourceTree = "<group>"; };
-		43D995770A403AD900E28AA2 /* ossimSpaceImagingGeom.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSpaceImagingGeom.h; sourceTree = "<group>"; };
-		43D995780A403AD900E28AA2 /* ossimSpotDimapSupportData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSpotDimapSupportData.h; sourceTree = "<group>"; };
-		43D995790A403AD900E28AA2 /* ossimSrtmFilename.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSrtmFilename.h; sourceTree = "<group>"; };
-		43D9957A0A403AD900E28AA2 /* ossimSrtmSupportData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSrtmSupportData.h; sourceTree = "<group>"; };
-		43D9957B0A403AD900E28AA2 /* ossimTiffWorld.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimTiffWorld.h; sourceTree = "<group>"; };
-		43D9957F0A403AD900E28AA2 /* ossimVpfBoundingRecordTable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVpfBoundingRecordTable.h; sourceTree = "<group>"; };
-		43D995800A403AD900E28AA2 /* ossimVpfCoverage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVpfCoverage.h; sourceTree = "<group>"; };
-		43D995810A403AD900E28AA2 /* ossimVpfDatabase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVpfDatabase.h; sourceTree = "<group>"; };
-		43D995820A403AD900E28AA2 /* ossimVpfDatabaseHeader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVpfDatabaseHeader.h; sourceTree = "<group>"; };
-		43D995830A403AD900E28AA2 /* ossimVpfDatabaseHeaderTableValidator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVpfDatabaseHeaderTableValidator.h; sourceTree = "<group>"; };
-		43D995840A403AD900E28AA2 /* ossimVpfExtent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVpfExtent.h; sourceTree = "<group>"; };
-		43D995850A403AD900E28AA2 /* ossimVpfFeatureClass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVpfFeatureClass.h; sourceTree = "<group>"; };
-		43D995860A403AD900E28AA2 /* ossimVpfFeatureClassSchema.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVpfFeatureClassSchema.h; sourceTree = "<group>"; };
-		43D995870A403AD900E28AA2 /* ossimVpfLibrary.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVpfLibrary.h; sourceTree = "<group>"; };
-		43D995880A403AD900E28AA2 /* ossimVpfLibraryAttributeTableValidator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVpfLibraryAttributeTableValidator.h; sourceTree = "<group>"; };
-		43D995890A403AD900E28AA2 /* ossimVpfTable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVpfTable.h; sourceTree = "<group>"; };
-		43D9958A0A403AD900E28AA2 /* ossimVpfTableValidator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimVpfTableValidator.h; sourceTree = "<group>"; };
-		43D9958C0A403AD900E28AA2 /* vpf.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = vpf.h; sourceTree = "<group>"; };
-		43D9958E0A403ADA00E28AA2 /* linklist.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = linklist.h; sourceTree = "<group>"; };
-		43D9958F0A403ADA00E28AA2 /* machine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = machine.h; sourceTree = "<group>"; };
-		43D995900A403ADA00E28AA2 /* mapgraph.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = mapgraph.h; sourceTree = "<group>"; };
-		43D995910A403ADA00E28AA2 /* polygrf.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = polygrf.h; sourceTree = "<group>"; };
-		43D995920A403ADA00E28AA2 /* projectn.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = projectn.h; sourceTree = "<group>"; };
-		43D995930A403ADA00E28AA2 /* protomas.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = protomas.h; sourceTree = "<group>"; };
-		43D995940A403ADA00E28AA2 /* set.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = set.h; sourceTree = "<group>"; };
-		43D995950A403ADA00E28AA2 /* system.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = system.h; sourceTree = "<group>"; };
-		43D995960A403ADA00E28AA2 /* values.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = values.h; sourceTree = "<group>"; };
-		43D995970A403ADA00E28AA2 /* vpfdisp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = vpfdisp.h; sourceTree = "<group>"; };
-		43D995980A403ADA00E28AA2 /* vpfdraw.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = vpfdraw.h; sourceTree = "<group>"; };
-		43D995990A403ADA00E28AA2 /* vpfinit.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = vpfinit.h; sourceTree = "<group>"; };
-		43D9959A0A403ADA00E28AA2 /* vpfio.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = vpfio.h; sourceTree = "<group>"; };
-		43D9959B0A403ADA00E28AA2 /* vpfmisc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = vpfmisc.h; sourceTree = "<group>"; };
-		43D9959C0A403ADA00E28AA2 /* vpfprim.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = vpfprim.h; sourceTree = "<group>"; };
-		43D9959D0A403ADA00E28AA2 /* vpfrelat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = vpfrelat.h; sourceTree = "<group>"; };
-		43D9959E0A403ADA00E28AA2 /* vpfselec.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = vpfselec.h; sourceTree = "<group>"; };
-		43D9959F0A403ADA00E28AA2 /* vpftable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = vpftable.h; sourceTree = "<group>"; };
-		43D995A00A403ADA00E28AA2 /* vpftidx.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = vpftidx.h; sourceTree = "<group>"; };
-		43D995A10A403ADA00E28AA2 /* vpfview.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = vpfview.h; sourceTree = "<group>"; };
-		43D995A20A403ADA00E28AA2 /* xmemory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = xmemory.h; sourceTree = "<group>"; };
-		43D9986D0A403B6400E28AA2 /* ossimConfig.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ossimConfig.h; path = ../../include/ossim/ossimConfig.h; sourceTree = "<group>"; };
-		43D9C404109F443000BA9119 /* ossimVirtualOverviewBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVirtualOverviewBuilder.cpp; sourceTree = "<group>"; };
-		43D9C41E109F445000BA9119 /* ossimVirtualImageWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVirtualImageWriter.cpp; sourceTree = "<group>"; };
-		43D9C420109F445000BA9119 /* ossimVirtualImageHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimVirtualImageHandler.cpp; sourceTree = "<group>"; };
-		43D9C426109F448F00BA9119 /* ossimVirtualOverviewBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimVirtualOverviewBuilder.h; sourceTree = "<group>"; };
-		43D9C427109F448F00BA9119 /* ossimVirtualImageWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimVirtualImageWriter.h; sourceTree = "<group>"; };
-		43D9C429109F448F00BA9119 /* ossimVirtualImageHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimVirtualImageHandler.h; sourceTree = "<group>"; };
-		43E215640E91136E00D67CB8 /* ossimNitf20Writer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimNitf20Writer.h; sourceTree = "<group>"; };
-		43E215670E91139B00D67CB8 /* ossimNitf20Writer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitf20Writer.cpp; sourceTree = "<group>"; };
-		43E65CE2104D85540027BB2C /* ossimDemInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimDemInfo.h; sourceTree = "<group>"; };
-		43E65CEB104D85BD0027BB2C /* ossimDemInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDemInfo.cpp; sourceTree = "<group>"; };
-		43EDA3D9107247CB007D1913 /* ossimNormalizedS16RemapTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNormalizedS16RemapTable.cpp; sourceTree = "<group>"; };
-		43EDA3DB107247EA007D1913 /* ossimNormalizedS16RemapTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimNormalizedS16RemapTable.h; sourceTree = "<group>"; };
-		43EEB06011060409000F97D8 /* osg.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = osg.framework; path = ../../../ossim_dependencies/Frameworks/osg.framework; sourceTree = SOURCE_ROOT; };
-		43EEB06111060409000F97D8 /* osgDB.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = osgDB.framework; path = ../../../ossim_dependencies/Frameworks/osgDB.framework; sourceTree = SOURCE_ROOT; };
-		43EEB06211060409000F97D8 /* osgGA.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = osgGA.framework; path = ../../../ossim_dependencies/Frameworks/osgGA.framework; sourceTree = SOURCE_ROOT; };
-		43EEB06311060409000F97D8 /* osgText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = osgText.framework; path = ../../../ossim_dependencies/Frameworks/osgText.framework; sourceTree = SOURCE_ROOT; };
-		43EEB06411060409000F97D8 /* osgUtil.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = osgUtil.framework; path = ../../../ossim_dependencies/Frameworks/osgUtil.framework; sourceTree = SOURCE_ROOT; };
-		43EEB06511060409000F97D8 /* osgViewer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = osgViewer.framework; path = ../../../ossim_dependencies/Frameworks/osgViewer.framework; sourceTree = SOURCE_ROOT; };
-		43F67F100A5415DC00B88295 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
-		43F67FA60A54161000B88295 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
-		43F8A5640FDEF3BD00FF4F40 /* ossimNitfAimidbTag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimNitfAimidbTag.h; sourceTree = "<group>"; };
-		43F8A5650FDEF3DC00FF4F40 /* ossimNitfAcftbTag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimNitfAcftbTag.h; sourceTree = "<group>"; };
-		43F8A5660FDEF3DC00FF4F40 /* ossimJ2kSotRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimJ2kSotRecord.h; sourceTree = "<group>"; };
-		43F8A5670FDEF3DC00FF4F40 /* ossimJ2kSizRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimJ2kSizRecord.h; sourceTree = "<group>"; };
-		43F8A5700FDEF43200FF4F40 /* ossimJ2kSizRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimJ2kSizRecord.cpp; sourceTree = "<group>"; };
-		43F8A5710FDEF43200FF4F40 /* ossimJ2kSotRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimJ2kSotRecord.cpp; sourceTree = "<group>"; };
-		43F8A5720FDEF43200FF4F40 /* ossimNitfAcftbTag.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfAcftbTag.cpp; sourceTree = "<group>"; };
-		43F8A5730FDEF43200FF4F40 /* ossimNitfAimidbTag.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfAimidbTag.cpp; sourceTree = "<group>"; };
-		43F8A5740FDEF43200FF4F40 /* ossimNitfMstgtaTag.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimNitfMstgtaTag.cpp; sourceTree = "<group>"; };
-		43F8A57C0FDEF45F00FF4F40 /* ossimNitfMstgtaTag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimNitfMstgtaTag.h; sourceTree = "<group>"; };
-		8D07F2C70486CC7A007CD1D0 /* ossim-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "ossim-Info.plist"; path = "Resources/ossim-Info.plist"; sourceTree = "<group>"; };
-		8D07F2C80486CC7A007CD1D0 /* ossim.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ossim.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-		EE056A270CFFA62D005D6F2F /* ossimDatumFactoryInterface.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDatumFactoryInterface.h; sourceTree = "<group>"; };
-		EE056A280CFFA62D005D6F2F /* ossimDatumFactoryRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimDatumFactoryRegistry.h; sourceTree = "<group>"; };
-		EE056A290CFFA64E005D6F2F /* ossimDatumFactoryRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimDatumFactoryRegistry.cpp; sourceTree = "<group>"; };
-		EE30BD650C60B7C900AE339A /* qrc_ossimPlanetQt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = qrc_ossimPlanetQt.cpp; path = ../../../ossimPlanetQt/apps/ossimplanet/qrc_ossimPlanetQt.cpp; sourceTree = SOURCE_ROOT; };
-		EE3F66EF0AF7D8D4000507C9 /* ossimHgtRef.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimHgtRef.cpp; sourceTree = "<group>"; };
-		EE3F66F10AF7D8F3000507C9 /* ossimSensorModelTuple.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimSensorModelTuple.cpp; sourceTree = "<group>"; };
-		EE3F66F30AF7D91A000507C9 /* ossimHgtRef.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimHgtRef.h; sourceTree = "<group>"; };
-		EE3F66F40AF7D941000507C9 /* ossimSensorModelTuple.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimSensorModelTuple.h; sourceTree = "<group>"; };
-		EE592C1A0BF3F89F00E4B15C /* ossimJpegMemSrc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimJpegMemSrc.h; sourceTree = "<group>"; };
-		EE592C1B0BF3F8C200E4B15C /* ossimJpegMemSrc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimJpegMemSrc.cpp; sourceTree = "<group>"; };
-		EE6F82860BE674C10090E263 /* ossimWms.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimWms.h; sourceTree = "<group>"; };
-		EE6F82870BE674DA0090E263 /* ossimWms.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimWms.cpp; sourceTree = "<group>"; };
-		EE7206280B64F69000DE8AE9 /* ossimERSFileWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimERSFileWriter.cpp; sourceTree = "<group>"; };
-		EE72062A0B64F6BF00DE8AE9 /* ossimERSFileWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimERSFileWriter.h; sourceTree = "<group>"; };
-		EE7B58E10E3DEBC80039A805 /* ossimTwoColorView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimTwoColorView.cpp; sourceTree = "<group>"; };
-		EE7B58E30E3DEBE00039A805 /* ossimTwoColorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimTwoColorView.h; sourceTree = "<group>"; };
-		EE8D7CBE0C0E5BF800D2C0D1 /* ossimException.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ossimException.cpp; sourceTree = "<group>"; };
-		EE8D7CC00C0E5C1400D2C0D1 /* ossimException.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ossimException.h; sourceTree = "<group>"; };
-		EEAE9CE60DBE212A000E8D8F /* ossimVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ossimVersion.h; path = ../../include/ossim/ossimVersion.h; sourceTree = SOURCE_ROOT; };
-		EEB5ECA90D0F13E2000CF6B2 /* ossimPredator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ossimPredator.xcodeproj; path = ../../../ossimPredator/xcode/ossimPredator/ossimPredator.xcodeproj; sourceTree = SOURCE_ROOT; };
-		EEDECA710E3671EB00F52278 /* ossimImageProjectionModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimImageProjectionModel.h; sourceTree = "<group>"; };
-		EEDECA720E36721400F52278 /* ossimImageModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ossimImageModel.h; sourceTree = "<group>"; };
-		EEDECAE20E36724500F52278 /* ossimImageProjectionModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageProjectionModel.cpp; sourceTree = "<group>"; };
-		EEDECAE40E36724F00F52278 /* ossimImageModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossimImageModel.cpp; sourceTree = "<group>"; };
-		EEFE08CC0D61D97E008454CA /* ossim_qt4.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ossim_qt4.xcodeproj; path = ../../../ossim_qt4/xcode/ossim_qt4/ossim_qt4.xcodeproj; sourceTree = SOURCE_ROOT; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		433627FD1042E368002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433627FE1042E368002A87C7 /* ossim.framework in Frameworks */,
-				433627FF1042E368002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		4336280F1042E3B0002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433628101042E3B0002A87C7 /* ossim.framework in Frameworks */,
-				433628111042E3B0002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433628311042E3F6002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433628321042E3F6002A87C7 /* ossim.framework in Frameworks */,
-				433628331042E3F6002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		4336284F1042E461002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433628501042E461002A87C7 /* ossim.framework in Frameworks */,
-				433628511042E461002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		4336286E1042E4AC002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				4336286F1042E4AC002A87C7 /* ossim.framework in Frameworks */,
-				433628701042E4AC002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433628801042E4D1002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433628811042E4D1002A87C7 /* ossim.framework in Frameworks */,
-				433628821042E4D1002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433628991042E52A002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				4336289A1042E52A002A87C7 /* ossim.framework in Frameworks */,
-				4336289B1042E52A002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433628B31042E560002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433628B41042E560002A87C7 /* ossim.framework in Frameworks */,
-				433628B51042E560002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433628D01042E59C002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433628D11042E59C002A87C7 /* ossim.framework in Frameworks */,
-				433628D21042E59C002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433628EB1042E5D1002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433628EC1042E5D1002A87C7 /* ossim.framework in Frameworks */,
-				433628ED1042E5D1002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433629051042E607002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433629061042E607002A87C7 /* ossim.framework in Frameworks */,
-				433629071042E607002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		4336297B1042E712002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				4336297C1042E712002A87C7 /* ossim.framework in Frameworks */,
-				4336297D1042E712002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433629971042E759002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433629981042E759002A87C7 /* ossim.framework in Frameworks */,
-				433629991042E759002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433629AF1042E77C002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433629B01042E77C002A87C7 /* ossim.framework in Frameworks */,
-				433629B11042E77C002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433629CA1042E7B1002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433629CB1042E7B1002A87C7 /* ossim.framework in Frameworks */,
-				433629CC1042E7B1002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433629DE1042E807002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433629DF1042E807002A87C7 /* ossim.framework in Frameworks */,
-				433629E01042E807002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362A271042E88F002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362A281042E88F002A87C7 /* ossim.framework in Frameworks */,
-				43362A291042E88F002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362A451042E8BD002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362A461042E8BD002A87C7 /* ossim.framework in Frameworks */,
-				43362A471042E8BD002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362A5D1042E8EE002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362A5E1042E8EE002A87C7 /* ossim.framework in Frameworks */,
-				43362A5F1042E8EE002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362A771042E914002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362A781042E914002A87C7 /* ossim.framework in Frameworks */,
-				43362A791042E914002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362A941042E955002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362A951042E955002A87C7 /* ossim.framework in Frameworks */,
-				43362A961042E955002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362AAE1042E981002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362AAF1042E981002A87C7 /* ossim.framework in Frameworks */,
-				43362AB01042E981002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362ACC1042EA43002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362ACD1042EA43002A87C7 /* ossim.framework in Frameworks */,
-				43362ACE1042EA43002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362AE91042EA81002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362AEA1042EA81002A87C7 /* ossim.framework in Frameworks */,
-				43362AEB1042EA81002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362B411042EB45002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362B421042EB45002A87C7 /* ossim.framework in Frameworks */,
-				43362B431042EB45002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362B5E1042EB70002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362B5F1042EB70002A87C7 /* ossim.framework in Frameworks */,
-				43362B601042EB70002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362B7A1042EB9B002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362B7B1042EB9B002A87C7 /* ossim.framework in Frameworks */,
-				43362B7C1042EB9B002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362B951042EBCE002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362B961042EBCE002A87C7 /* ossim.framework in Frameworks */,
-				43362B971042EBCE002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362BCC1042EC26002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362BCD1042EC26002A87C7 /* ossim.framework in Frameworks */,
-				43362BCE1042EC26002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362BE81042EC50002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362BE91042EC50002A87C7 /* ossim.framework in Frameworks */,
-				43362BEA1042EC50002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362C021042EC80002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362C031042EC80002A87C7 /* ossim.framework in Frameworks */,
-				43362C041042EC80002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362C1C1042ECAF002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362C1D1042ECAF002A87C7 /* ossim.framework in Frameworks */,
-				43362C1E1042ECAF002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362C361042ECD6002A87C7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362C371042ECD6002A87C7 /* ossim.framework in Frameworks */,
-				43362C381042ECD6002A87C7 /* Openthreads.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		8D07F2C30486CC7A007CD1D0 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43F67F110A5415DC00B88295 /* CoreServices.framework in Frameworks */,
-				43F67FA70A54161000B88295 /* ApplicationServices.framework in Frameworks */,
-				4371846A0BCF03220002D30E /* Openthreads.framework in Frameworks */,
-				43330DC11108F1AF0024C7DA /* libfreetype.a in Frameworks */,
-				43330DC21108F1AF0024C7DA /* libgeotiff.a in Frameworks */,
-				43330DC31108F1AF0024C7DA /* libjpeg.a in Frameworks */,
-				43330DC41108F1AF0024C7DA /* libtiff.a in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		034768DDFF38A45A11DB9C8B /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				8D07F2C80486CC7A007CD1D0 /* ossim.framework */,
-				433628031042E368002A87C7 /* template-app */,
-				433628151042E3B0002A87C7 /* ossim-adrg-dump */,
-				433628371042E3F6002A87C7 /* ossim-applanix2ogeom */,
-				433628551042E461002A87C7 /* ossim-band-merge */,
-				433628741042E4AC002A87C7 /* ossim-btoa */,
-				433628861042E4D1002A87C7 /* template-app */,
-				4336289F1042E52A002A87C7 /* ossim-cmm */,
-				433628B91042E560002A87C7 /* ossim-computeSrtmStats */,
-				433628D61042E59C002A87C7 /* ossim-correl */,
-				433628F11042E5D1002A87C7 /* ossim-create-cg */,
-				4336290B1042E607002A87C7 /* ossim-create-histo */,
-				433629811042E712002A87C7 /* ossim-dms2deg */,
-				4336299D1042E759002A87C7 /* ossim-dump-ocg */,
-				433629B51042E77C002A87C7 /* ossim-ecg2ocg */,
-				433629D01042E7B1002A87C7 /* ossim-extract-vertices */,
-				433629E41042E807002A87C7 /* ossim-foo */,
-				43362A2D1042E88F002A87C7 /* ossim-height */,
-				43362A4B1042E8BD002A87C7 /* ossim-icp */,
-				43362A631042E8EE002A87C7 /* ossim-igen */,
-				43362A7D1042E914002A87C7 /* ossim-img2md */,
-				43362A9A1042E955002A87C7 /* ossim-img2rr */,
-				43362AB41042E981002A87C7 /* ossim-info */,
-				43362AD21042EA43002A87C7 /* ossim-modopt */,
-				43362AEF1042EA81002A87C7 /* ossim-mosaic */,
-				43362B471042EB45002A87C7 /* ossim-ogeom2ogeom */,
-				43362B641042EB70002A87C7 /* ossim-orthoigen */,
-				43362B801042EB9B002A87C7 /* ossim-pixelflip */,
-				43362B9B1042EBCE002A87C7 /* ossim-prune */,
-				43362BD21042EC26002A87C7 /* ossim-rejout */,
-				43362BEE1042EC50002A87C7 /* ossim-senint */,
-				43362C081042EC80002A87C7 /* ossim-space-imaging */,
-				43362C221042ECAF002A87C7 /* ossim-swapbytes */,
-				43362C3C1042ECD6002A87C7 /* ossim-tfw2ogeom */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		0867D691FE84028FC02AAC07 /* ossim */ = {
-			isa = PBXGroup;
-			children = (
-				08FB77ACFE841707C02AAC07 /* Source */,
-				089C1665FE841158C02AAC07 /* Resources */,
-				0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
-				186EF96B0B1F1BD000F7886A /* External Projects */,
-				034768DDFF38A45A11DB9C8B /* Products */,
-				43A68B99110685E5000A153F /* ossimplanet2-Info.plist */,
-			);
-			comments = "ossimPlanet is being initially developed on the OSX platform with the XCode developer tools.\nThe easiest way to get up and running is to install the latest binary installer. During initial development, a fairly recent version of the software will be available at http://ossim.telascience.org/ossimdata . Look for and download the dmg file which will should mount after download. (e.g. rc4_earth_viz.mpkg.dmg ) Double click the package installer and the libararies and framewor [...]
-			name = ossim;
-			sourceTree = "<group>";
-		};
-		0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
-			isa = PBXGroup;
-			children = (
-				43330DBD1108F1AF0024C7DA /* libfreetype.a */,
-				43330DBE1108F1AF0024C7DA /* libgeotiff.a */,
-				43330DBF1108F1AF0024C7DA /* libjpeg.a */,
-				43330DC01108F1AF0024C7DA /* libtiff.a */,
-				43EEB06011060409000F97D8 /* osg.framework */,
-				43EEB06111060409000F97D8 /* osgDB.framework */,
-				43EEB06211060409000F97D8 /* osgGA.framework */,
-				43EEB06311060409000F97D8 /* osgText.framework */,
-				43EEB06411060409000F97D8 /* osgUtil.framework */,
-				43EEB06511060409000F97D8 /* osgViewer.framework */,
-				437184380BCF03210002D30E /* Openthreads.framework */,
-				436B11BB0A80DF4E0052AA54 /* OpenGL.framework */,
-				43F67FA60A54161000B88295 /* ApplicationServices.framework */,
-				43F67F100A5415DC00B88295 /* CoreServices.framework */,
-			);
-			name = "External Frameworks and Libraries";
-			sourceTree = "<group>";
-		};
-		089C1665FE841158C02AAC07 /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				43D4EF600AC3264300218BA4 /* ossimPlanetQtApp-Info.plist */,
-				43D4EF530AC3245200218BA4 /* ossimPlanetQt-info.plist */,
-				43D769AF0A76A08A00E87B08 /* ossimPlanet-Info.plist */,
-				18DC32A20A4C36B1007D4A73 /* Icons */,
-				1F29D04708CCB16E00DA2723 /* ossim_qt-Info.plist */,
-				1F29D54D08CCCE0300DA2723 /* imagelinker-Info.plist */,
-				1FD5C978094BFF3D00293362 /* iview-Info.plist */,
-				8D07F2C70486CC7A007CD1D0 /* ossim-Info.plist */,
-				089C1666FE841158C02AAC07 /* InfoPlist.strings */,
-			);
-			name = Resources;
-			sourceTree = "<group>";
-		};
-		08FB77ACFE841707C02AAC07 /* Source */ = {
-			isa = PBXGroup;
-			children = (
-				1886E0570B1B9F9B00D0E4E6 /* common_settings.xcconfig */,
-				43D9823B0A403AA400E28AA2 /* ossim */,
-				1FC5AB4608CB8E99002B3E06 /* Apps */,
-			);
-			name = Source;
-			sourceTree = "<group>";
-		};
-		186EEC8B0B1CDAB300F7886A /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				186EEC8F0B1CDAB300F7886A /* ossim_qt.framework */,
-				186EFAF20B1F5B3700F7886A /* imagelinker.app */,
-				186248DD0B1F7FD20021FDF7 /* iview.app */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		186EF59A0B1CE41300F7886A /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				43C6E22E0FEFB4AD004B52F7 /* ossimPlanet.framework */,
-				43C6E2AA0FEFB4F0004B52F7 /* ossimplanetklv */,
-				43C6E2AC0FEFB4F0004B52F7 /* ossimplanetviewer */,
-				433A4CDF100CEDAC000B969C /* ossimplanettest */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		186EF96B0B1F1BD000F7886A /* External Projects */ = {
-			isa = PBXGroup;
-			children = (
-				43398B711132B6BA0036A644 /* ossim_plugins.xcodeproj */,
-				4391D6A610FED19F007AC2C1 /* ossimPlanetQt.xcodeproj */,
-				4386B2380DF0605A007011FB /* oms.xcodeproj */,
-				EEFE08CC0D61D97E008454CA /* ossim_qt4.xcodeproj */,
-				EEB5ECA90D0F13E2000CF6B2 /* ossimPredator.xcodeproj */,
-				1886E0D30B1BE9F700D0E4E6 /* libwms.xcodeproj */,
-				186EEC8A0B1CDAB300F7886A /* ossim_qt.xcodeproj */,
-				186EF5990B1CE41300F7886A /* ossimPlanet.xcodeproj */,
-			);
-			name = "External Projects";
-			sourceTree = "<group>";
-		};
-		1886E0D40B1BE9F700D0E4E6 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				1886E0D80B1BE9F700D0E4E6 /* wms.framework */,
-				EEC515700E769171008AE662 /* wmsurl */,
-				EEC515720E769171008AE662 /* wmscapabilities.cpp */,
-				EEC515740E769171008AE662 /* wmsgetmap */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		18DC32A20A4C36B1007D4A73 /* Icons */ = {
-			isa = PBXGroup;
-			children = (
-				188BF9120B333163006B63D2 /* ossimPlanet.icns */,
-			);
-			name = Icons;
-			sourceTree = "<group>";
-		};
-		1FC5AB4608CB8E99002B3E06 /* Apps */ = {
-			isa = PBXGroup;
-			children = (
-				43362C481042ECFB002A87C7 /* ossim-tfw2ogeom */,
-				43362C281042ECC6002A87C7 /* ossim-swapbytes */,
-				43362C0E1042EC9E002A87C7 /* ossim-space-imaging */,
-				43362BF41042EC69002A87C7 /* ossim-senint */,
-				43362BDA1042EC3F002A87C7 /* ossim-rejout */,
-				43362B871042EBB9002A87C7 /* ossim-pixelflip */,
-				43362B6C1042EB8F002A87C7 /* ossim-orthoigen */,
-				43362B501042EB62002A87C7 /* ossim-ogeom2ogeom */,
-				43362AF51042EA9B002A87C7 /* ossim-mosaic */,
-				43362ADA1042EA5F002A87C7 /* ossim-modopt */,
-				43362ABA1042E9AC002A87C7 /* ossim-info */,
-				43362AA01042E96E002A87C7 /* ossim-img2rr */,
-				43362A861042E939002A87C7 /* ossim-img2md */,
-				43362A691042E908002A87C7 /* ossim-igen */,
-				43362A4F1042E8DE002A87C7 /* ossim-icp */,
-				43362A361042E8AE002A87C7 /* ossim-height */,
-				433629EC1042E82E002A87C7 /* ossim-foo */,
-				433629F41042E83C002A87C7 /* ossim-extract-vertices */,
-				43362BA31042EBE6002A87C7 /* ossim-prune */,
-				433629BD1042E796002A87C7 /* ossim-ecg2ocg */,
-				433629A11042E76E002A87C7 /* ossim-dump-ocg */,
-				433629891042E740002A87C7 /* ossim-dms2deg */,
-				4336292B1042E65C002A87C7 /* ossim-deg2dms */,
-				433628BF1042E578002A87C7 /* ossim-computeSrtmStats */,
-				433629111042E62F002A87C7 /* ossim-create-histo */,
-				433628F71042E5F2002A87C7 /* ossim-create-cg */,
-				433628DD1042E5C6002A87C7 /* ossim-correl */,
-				433628A51042E54C002A87C7 /* ossim-cmm */,
-				4336288A1042E4EF002A87C7 /* ossim-chgkwval */,
-				4336285D1042E48F002A87C7 /* ossim-band-merge */,
-				433628401042E42B002A87C7 /* ossim-applanix2ogeom */,
-				433628201042E3DB002A87C7 /* ossim-adrg-dump */,
-				43954AF70AA8EEB700250B23 /* ossimplanet */,
-			);
-			name = Apps;
-			sourceTree = "<group>";
-		};
-		433628201042E3DB002A87C7 /* ossim-adrg-dump */ = {
-			isa = PBXGroup;
-			children = (
-				433628231042E3DB002A87C7 /* ossim-adrg-dump.cpp */,
-			);
-			name = "ossim-adrg-dump";
-			path = "../../src/apps/ossim-adrg-dump";
-			sourceTree = SOURCE_ROOT;
-		};
-		433628401042E42B002A87C7 /* ossim-applanix2ogeom */ = {
-			isa = PBXGroup;
-			children = (
-				433628431042E42B002A87C7 /* ossim-applanix2ogeom.cpp */,
-			);
-			name = "ossim-applanix2ogeom";
-			path = "../../src/apps/ossim-applanix2ogeom";
-			sourceTree = SOURCE_ROOT;
-		};
-		4336285D1042E48F002A87C7 /* ossim-band-merge */ = {
-			isa = PBXGroup;
-			children = (
-				433628601042E48F002A87C7 /* ossim-band-merge.cpp */,
-			);
-			name = "ossim-band-merge";
-			path = "../../src/apps/ossim-band-merge";
-			sourceTree = SOURCE_ROOT;
-		};
-		4336288A1042E4EF002A87C7 /* ossim-chgkwval */ = {
-			isa = PBXGroup;
-			children = (
-				4336288D1042E4EF002A87C7 /* ossim-chgkwval.cpp */,
-			);
-			name = "ossim-chgkwval";
-			path = "../../src/apps/ossim-chgkwval";
-			sourceTree = SOURCE_ROOT;
-		};
-		433628A51042E54C002A87C7 /* ossim-cmm */ = {
-			isa = PBXGroup;
-			children = (
-				433628A81042E54C002A87C7 /* ossim-cmm.cpp */,
-			);
-			name = "ossim-cmm";
-			path = "../../src/apps/ossim-cmm";
-			sourceTree = SOURCE_ROOT;
-		};
-		433628BF1042E578002A87C7 /* ossim-computeSrtmStats */ = {
-			isa = PBXGroup;
-			children = (
-				433628C21042E578002A87C7 /* ossim-computeSrtmStats.cpp */,
-			);
-			name = "ossim-computeSrtmStats";
-			path = "../../src/apps/ossim-computeSrtmStats";
-			sourceTree = SOURCE_ROOT;
-		};
-		433628DD1042E5C6002A87C7 /* ossim-correl */ = {
-			isa = PBXGroup;
-			children = (
-				433628E01042E5C6002A87C7 /* ossim-correl.cpp */,
-			);
-			name = "ossim-correl";
-			path = "../../src/apps/ossim-correl";
-			sourceTree = SOURCE_ROOT;
-		};
-		433628F71042E5F2002A87C7 /* ossim-create-cg */ = {
-			isa = PBXGroup;
-			children = (
-				433628FA1042E5F2002A87C7 /* ossim-create-cg.cpp */,
-			);
-			name = "ossim-create-cg";
-			path = "../../src/apps/ossim-create-cg";
-			sourceTree = SOURCE_ROOT;
-		};
-		433629111042E62F002A87C7 /* ossim-create-histo */ = {
-			isa = PBXGroup;
-			children = (
-				433629141042E62F002A87C7 /* ossim-create-histo.cpp */,
-			);
-			name = "ossim-create-histo";
-			path = "../../src/apps/ossim-create-histo";
-			sourceTree = SOURCE_ROOT;
-		};
-		4336292B1042E65C002A87C7 /* ossim-deg2dms */ = {
-			isa = PBXGroup;
-			children = (
-				4336292E1042E65C002A87C7 /* ossim-deg2dms.cpp */,
-			);
-			name = "ossim-deg2dms";
-			path = "../../src/apps/ossim-deg2dms";
-			sourceTree = SOURCE_ROOT;
-		};
-		433629891042E740002A87C7 /* ossim-dms2deg */ = {
-			isa = PBXGroup;
-			children = (
-				4336298C1042E740002A87C7 /* ossim-dms2deg.cpp */,
-			);
-			name = "ossim-dms2deg";
-			path = "../../src/apps/ossim-dms2deg";
-			sourceTree = SOURCE_ROOT;
-		};
-		433629A11042E76E002A87C7 /* ossim-dump-ocg */ = {
-			isa = PBXGroup;
-			children = (
-				433629A41042E76E002A87C7 /* ossim-dump-ocg.cpp */,
-			);
-			name = "ossim-dump-ocg";
-			path = "../../src/apps/ossim-dump-ocg";
-			sourceTree = SOURCE_ROOT;
-		};
-		433629BD1042E796002A87C7 /* ossim-ecg2ocg */ = {
-			isa = PBXGroup;
-			children = (
-				433629BF1042E796002A87C7 /* ossim-ecg2ocg.cpp */,
-			);
-			name = "ossim-ecg2ocg";
-			path = "../../src/apps/ossim-ecg2ocg";
-			sourceTree = SOURCE_ROOT;
-		};
-		433629EC1042E82E002A87C7 /* ossim-foo */ = {
-			isa = PBXGroup;
-			children = (
-				43CF6BAB104EA81E00714C86 /* ossim-foo.cpp */,
-			);
-			name = "ossim-foo";
-			path = "../../src/apps/ossim-foo";
-			sourceTree = SOURCE_ROOT;
-		};
-		433629F41042E83C002A87C7 /* ossim-extract-vertices */ = {
-			isa = PBXGroup;
-			children = (
-				433629F71042E83C002A87C7 /* ossim-extract-vertices.cpp */,
-			);
-			name = "ossim-extract-vertices";
-			path = "../../src/apps/ossim-extract-vertices";
-			sourceTree = SOURCE_ROOT;
-		};
-		43362A361042E8AE002A87C7 /* ossim-height */ = {
-			isa = PBXGroup;
-			children = (
-				43362A3A1042E8AE002A87C7 /* ossim-height.cpp */,
-			);
-			name = "ossim-height";
-			path = "../../src/apps/ossim-height";
-			sourceTree = SOURCE_ROOT;
-		};
-		43362A4F1042E8DE002A87C7 /* ossim-icp */ = {
-			isa = PBXGroup;
-			children = (
-				43362A521042E8DE002A87C7 /* ossim-icp.cpp */,
-			);
-			name = "ossim-icp";
-			path = "../../src/apps/ossim-icp";
-			sourceTree = SOURCE_ROOT;
-		};
-		43362A691042E908002A87C7 /* ossim-igen */ = {
-			isa = PBXGroup;
-			children = (
-				43362A6C1042E908002A87C7 /* ossim-igen.cpp */,
-			);
-			name = "ossim-igen";
-			path = "../../src/apps/ossim-igen";
-			sourceTree = SOURCE_ROOT;
-		};
-		43362A861042E939002A87C7 /* ossim-img2md */ = {
-			isa = PBXGroup;
-			children = (
-				43362A891042E939002A87C7 /* ossim-img2md.cpp */,
-			);
-			name = "ossim-img2md";
-			path = "../../src/apps/ossim-img2md";
-			sourceTree = SOURCE_ROOT;
-		};
-		43362AA01042E96E002A87C7 /* ossim-img2rr */ = {
-			isa = PBXGroup;
-			children = (
-				43362AA31042E96E002A87C7 /* ossim-img2rr.cpp */,
-			);
-			name = "ossim-img2rr";
-			path = "../../src/apps/ossim-img2rr";
-			sourceTree = SOURCE_ROOT;
-		};
-		43362ABA1042E9AC002A87C7 /* ossim-info */ = {
-			isa = PBXGroup;
-			children = (
-				43362ABE1042E9AC002A87C7 /* ossim-info.cpp */,
-			);
-			name = "ossim-info";
-			path = "../../src/apps/ossim-info";
-			sourceTree = SOURCE_ROOT;
-		};
-		43362ADA1042EA5F002A87C7 /* ossim-modopt */ = {
-			isa = PBXGroup;
-			children = (
-				43362ADD1042EA5F002A87C7 /* ossim-modopt.cpp */,
-			);
-			name = "ossim-modopt";
-			path = "../../src/apps/ossim-modopt";
-			sourceTree = SOURCE_ROOT;
-		};
-		43362AF51042EA9B002A87C7 /* ossim-mosaic */ = {
-			isa = PBXGroup;
-			children = (
-				43362AF81042EA9B002A87C7 /* mosaic_usage.txt */,
-				43362AF91042EA9B002A87C7 /* ossim-mosaic.cpp */,
-			);
-			name = "ossim-mosaic";
-			path = "../../src/apps/ossim-mosaic";
-			sourceTree = SOURCE_ROOT;
-		};
-		43362B501042EB62002A87C7 /* ossim-ogeom2ogeom */ = {
-			isa = PBXGroup;
-			children = (
-				43362B531042EB62002A87C7 /* ossim-ogeom2ogeom.cpp */,
-			);
-			name = "ossim-ogeom2ogeom";
-			path = "../../src/apps/ossim-ogeom2ogeom";
-			sourceTree = SOURCE_ROOT;
-		};
-		43362B6C1042EB8F002A87C7 /* ossim-orthoigen */ = {
-			isa = PBXGroup;
-			children = (
-				43362B6F1042EB90002A87C7 /* ossim-orthoigen.cpp */,
-			);
-			name = "ossim-orthoigen";
-			path = "../../src/apps/ossim-orthoigen";
-			sourceTree = SOURCE_ROOT;
-		};
-		43362B871042EBB9002A87C7 /* ossim-pixelflip */ = {
-			isa = PBXGroup;
-			children = (
-				43362B8A1042EBB9002A87C7 /* ossim-pixelflip.cpp */,
-			);
-			name = "ossim-pixelflip";
-			path = "../../src/apps/ossim-pixelflip";
-			sourceTree = SOURCE_ROOT;
-		};
-		43362BA31042EBE6002A87C7 /* ossim-prune */ = {
-			isa = PBXGroup;
-			children = (
-				43362BA61042EBE6002A87C7 /* ossim-prune.cpp */,
-			);
-			name = "ossim-prune";
-			path = "../../src/apps/ossim-prune";
-			sourceTree = SOURCE_ROOT;
-		};
-		43362BDA1042EC3F002A87C7 /* ossim-rejout */ = {
-			isa = PBXGroup;
-			children = (
-				43362BDD1042EC3F002A87C7 /* ossim-rejout.cpp */,
-			);
-			name = "ossim-rejout";
-			path = "../../src/apps/ossim-rejout";
-			sourceTree = SOURCE_ROOT;
-		};
-		43362BF41042EC69002A87C7 /* ossim-senint */ = {
-			isa = PBXGroup;
-			children = (
-				43362BF71042EC69002A87C7 /* ossim-senint.cpp */,
-			);
-			name = "ossim-senint";
-			path = "../../src/apps/ossim-senint";
-			sourceTree = SOURCE_ROOT;
-		};
-		43362C0E1042EC9E002A87C7 /* ossim-space-imaging */ = {
-			isa = PBXGroup;
-			children = (
-				43362C111042EC9E002A87C7 /* ossim-space-imaging.cpp */,
-			);
-			name = "ossim-space-imaging";
-			path = "../../src/apps/ossim-space-imaging";
-			sourceTree = SOURCE_ROOT;
-		};
-		43362C281042ECC6002A87C7 /* ossim-swapbytes */ = {
-			isa = PBXGroup;
-			children = (
-				43362C2B1042ECC6002A87C7 /* ossim-swapbytes.cpp */,
-			);
-			name = "ossim-swapbytes";
-			path = "../../src/apps/ossim-swapbytes";
-			sourceTree = SOURCE_ROOT;
-		};
-		43362C481042ECFB002A87C7 /* ossim-tfw2ogeom */ = {
-			isa = PBXGroup;
-			children = (
-				43362C4B1042ECFB002A87C7 /* ossim-tfw2ogeom.cpp */,
-				43362C4C1042ECFB002A87C7 /* template.kwl */,
-			);
-			name = "ossim-tfw2ogeom";
-			path = "../../src/apps/ossim-tfw2ogeom";
-			sourceTree = SOURCE_ROOT;
-		};
-		43398B721132B6BA0036A644 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				43398B841132B6BA0036A644 /* libossimgdal_plugin.dylib */,
-				43398B861132B6BA0036A644 /* libossimreg_plugin.dylib */,
-				43398B881132B6BA0036A644 /* libossimworldwind_plugin.dylib */,
-				43398B8A1132B6BA0036A644 /* libossimnui_plugin.dylib */,
-				43398B8C1132B6BA0036A644 /* libossimcontrib_plugin.dylib */,
-				43398B8E1132B6BA0036A644 /* libossimpng_plugin.dylib */,
-				43398B901132B6BA0036A644 /* libossimkakadu_plugin.dylib */,
-				43398B921132B6BA0036A644 /* libossimcsm_plugin.dylib */,
-				43398B941132B6BA0036A644 /* libossimkakadu_plugin.dylib */,
-				43A9A0B11151AC55000860DA /* libossimpng_plugin.dylib */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		437224A50AAFADE100F7BCC5 /* src */ = {
-			isa = PBXGroup;
-			children = (
-				43D9823E0A403AA400E28AA2 /* base */,
-				43D9847E0A403AA600E28AA2 /* elevation */,
-				43D984A60A403AA600E28AA2 /* font */,
-				43D984B90A403AA600E28AA2 /* imaging */,
-				43D987240A403AA800E28AA2 /* init */,
-				43D9872B0A403AA800E28AA2 /* kbool */,
-				43D9874A0A403AA800E28AA2 /* matrix */,
-				43D987A30A403AA800E28AA2 /* parallel */,
-				43D987B60A403AA800E28AA2 /* plugin */,
-				43D987C60A403AA800E28AA2 /* projection */,
-				43D988BD0A403AA900E28AA2 /* support_data */,
-				43D98A170A403AAA00E28AA2 /* vec */,
-				43D98A4B0A403AAA00E28AA2 /* vpfutil */,
-			);
-			name = src;
-			sourceTree = "<group>";
-		};
-		437224A60AAFADF400F7BCC5 /* headers */ = {
-			isa = PBXGroup;
-			children = (
-				EEAE9CE60DBE212A000E8D8F /* ossimVersion.h */,
-				43D9986D0A403B6400E28AA2 /* ossimConfig.h */,
-				43D992CD0A403AD700E28AA2 /* base */,
-				43D993A00A403AD700E28AA2 /* elevation */,
-				43D993AE0A403AD700E28AA2 /* font */,
-				43D993B60A403AD800E28AA2 /* imaging */,
-				43D994890A403AD800E28AA2 /* init */,
-				43D9948B0A403AD800E28AA2 /* kbool */,
-				43D9949B0A403AD800E28AA2 /* matrix */,
-				43D994A80A403AD900E28AA2 /* ossimConfig.h */,
-				43D994AB0A403AD900E28AA2 /* parallel */,
-				43D994B10A403AD900E28AA2 /* plugin */,
-				43D994B60A403AD900E28AA2 /* projection */,
-				43D995080A403AD900E28AA2 /* support_data */,
-				43D9957C0A403AD900E28AA2 /* vec */,
-				43D9958D0A403ADA00E28AA2 /* vpfutil */,
-			);
-			name = headers;
-			sourceTree = "<group>";
-		};
-		4386B2390DF0605B007011FB /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				4386B2400DF0605B007011FB /* oms.framework */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		4391D6A710FED19F007AC2C1 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				4391D6B210FED19F007AC2C1 /* ossimPlanetQt.framework */,
-				43C8A7921109FF750095AEE2 /* ossimplanet. */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		43954AF70AA8EEB700250B23 /* ossimplanet */ = {
-			isa = PBXGroup;
-			children = (
-				EE30BD650C60B7C900AE339A /* qrc_ossimPlanetQt.cpp */,
-				43954AF80AA8EED300250B23 /* main.cpp */,
-			);
-			name = ossimplanet;
-			sourceTree = "<group>";
-		};
-		43D9823B0A403AA400E28AA2 /* ossim */ = {
-			isa = PBXGroup;
-			children = (
-				437224A60AAFADF400F7BCC5 /* headers */,
-				437224A50AAFADE100F7BCC5 /* src */,
-			);
-			name = ossim;
-			path = ../../src/ossim;
-			sourceTree = SOURCE_ROOT;
-		};
-		43D9823E0A403AA400E28AA2 /* base */ = {
-			isa = PBXGroup;
-			children = (
-				43D982FE0A403AA500E28AA2 /* ellips.dat */,
-				43AC3A52108DE1EC00A8DB04 /* ossim2dBilinearTransform.cpp */,
-				43D982FF0A403AA500E28AA2 /* ossim2dLinearRegression.cpp */,
-				43AC3A4F108DE1EC00A8DB04 /* ossim2dTo2dIdentityTransform.cpp */,
-				43AC3A4E108DE1EC00A8DB04 /* ossim2dTo2dShiftTransform.cpp */,
-				43D983010A403AA500E28AA2 /* ossim2dTo2dTransform.cpp */,
-				43AC3A50108DE1EC00A8DB04 /* ossim2dTo2dTransformFactory.cpp */,
-				43AC3A51108DE1EC00A8DB04 /* ossim2dTo2dTransformRegistry.cpp */,
-				43D983030A403AA500E28AA2 /* ossimActiveEdgeTable.cpp */,
-				43D983050A403AA500E28AA2 /* ossimAdjustableParameterInfo.cpp */,
-				43D983070A403AA500E28AA2 /* ossimAdjustableParameterInterface.cpp */,
-				43D983090A403AA500E28AA2 /* ossimAdjustmentInfo.cpp */,
-				43D9830D0A403AA500E28AA2 /* ossimAffineTransform.cpp */,
-				43D9830F0A403AA500E28AA2 /* ossimApplicationUsage.cpp */,
-				43D983110A403AA500E28AA2 /* ossimArgumentParser.cpp */,
-				43D983130A403AA500E28AA2 /* ossimBaseObjectFactory.cpp */,
-				43D983150A403AA500E28AA2 /* ossimBilSplitter.cpp */,
-				43D983170A403AA500E28AA2 /* ossimBooleanProperty.cpp */,
-				43D983190A403AA500E28AA2 /* ossimCmyVector.cpp */,
-				43D9831B0A403AA500E28AA2 /* ossimColorProperty.cpp */,
-				4392B1840AB5906D002759B3 /* ossimColumnVector3d.cpp */,
-				43D9831D0A403AA500E28AA2 /* ossimCommon.cpp */,
-				43D9831F0A403AA500E28AA2 /* ossimConnectableContainer.cpp */,
-				43D983210A403AA500E28AA2 /* ossimConnectableContainerInterface.cpp */,
-				43D983230A403AA500E28AA2 /* ossimConnectableDisplayListener.cpp */,
-				43D983250A403AA500E28AA2 /* ossimConnectableObject.cpp */,
-				43D983270A403AA500E28AA2 /* ossimConnectableObjectListener.cpp */,
-				43D983290A403AA500E28AA2 /* ossimConnectionEvent.cpp */,
-				43D9832B0A403AA500E28AA2 /* ossimContainerEvent.cpp */,
-				43D9832D0A403AA500E28AA2 /* ossimContainerProperty.cpp */,
-				43D9832F0A403AA500E28AA2 /* ossimCplUtil.cpp */,
-				43A114A40D52596300DE3CF3 /* ossimCsvFile.cpp */,
-				43D983310A403AA500E28AA2 /* ossimCustomEditorWindow.cpp */,
-				43D983330A403AA500E28AA2 /* ossimCustomEditorWindowFactoryBase.cpp */,
-				43D983350A403AA500E28AA2 /* ossimCustomEditorWindowRegistry.cpp */,
-				43D983370A403AA500E28AA2 /* ossimDataObject.cpp */,
-				43D983390A403AA500E28AA2 /* ossimDate.cpp */,
-				43D9833B0A403AA500E28AA2 /* ossimDateProperty.cpp */,
-				43D9833D0A403AA500E28AA2 /* ossimDatum.cpp */,
-				43D9833F0A403AA500E28AA2 /* ossimDatumFactory.cpp */,
-				EE056A290CFFA64E005D6F2F /* ossimDatumFactoryRegistry.cpp */,
-				43D983420A403AA500E28AA2 /* ossimDblGrid.cpp */,
-				43D983440A403AA500E28AA2 /* ossimDirectory.cpp */,
-				43D983460A403AA500E28AA2 /* ossimDirectoryData.cpp */,
-				43D983480A403AA500E28AA2 /* ossimDirectoryTree.cpp */,
-				43D9834A0A403AA500E28AA2 /* ossimDisplayEventListener.cpp */,
-				43D9834C0A403AA500E28AA2 /* ossimDisplayInterface.cpp */,
-				43D9834E0A403AA500E28AA2 /* ossimDisplayListEvent.cpp */,
-				43D983500A403AA500E28AA2 /* ossimDisplayRefreshEvent.cpp */,
-				43D983520A403AA500E28AA2 /* ossimDms.cpp */,
-				43D983540A403AA500E28AA2 /* ossimDoubleGridProperty.cpp */,
-				43D983560A403AA500E28AA2 /* ossimDpt.cpp */,
-				43D983580A403AA500E28AA2 /* ossimDpt3d.cpp */,
-				43D9835A0A403AA500E28AA2 /* ossimDrect.cpp */,
-				43463AEF0FCEE7260027D845 /* ossimDuration.cpp */,
-				43D9835C0A403AA500E28AA2 /* ossimEbcdicToAscii.cpp */,
-				43D9835E0A403AA500E28AA2 /* ossimEcefPoint.cpp */,
-				43D983600A403AA500E28AA2 /* ossimEcefRay.cpp */,
-				4392B1860AB5907B002759B3 /* ossimEcefVector.cpp */,
-				43D983620A403AA500E28AA2 /* ossimElevationManagerEvent.cpp */,
-				43D983640A403AA500E28AA2 /* ossimElevationManagerEventListener.cpp */,
-				43D983660A403AA500E28AA2 /* ossimEllipsoid.cpp */,
-				43D983680A403AA500E28AA2 /* ossimEllipsoidFactory.cpp */,
-				43D9836A0A403AA500E28AA2 /* ossimEndian.cpp */,
-				43A93B2D0A5024FF00903A9C /* ossimEnvironmentUtility.cpp */,
-				43D9836D0A403AA500E28AA2 /* ossimEquTokenizer.cpp */,
-				43D983710A403AA500E28AA2 /* ossimErrorCodes.cpp */,
-				43D983730A403AA500E28AA2 /* ossimErrorStatusInterface.cpp */,
-				43D983750A403AA500E28AA2 /* ossimEvent.cpp */,
-				EE8D7CBE0C0E5BF800D2C0D1 /* ossimException.cpp */,
-				43D983770A403AA500E28AA2 /* ossimFactoryBaseTemplate.cpp */,
-				43D983790A403AA500E28AA2 /* ossimFilename.cpp */,
-				43D9837B0A403AA500E28AA2 /* ossimFilenameProperty.cpp */,
-				43D9837D0A403AA500E28AA2 /* ossimFontInformation.cpp */,
-				43D9837F0A403AA500E28AA2 /* ossimFontProperty.cpp */,
-				43D983810A403AA500E28AA2 /* ossimFpt.cpp */,
-				43D983830A403AA500E28AA2 /* ossimFpt3d.cpp */,
-				43D9838B0A403AA500E28AA2 /* ossimGeocent.c */,
-				43D9838D0A403AA500E28AA2 /* ossimGeoid.cpp */,
-				43D9838F0A403AA500E28AA2 /* ossimGeoidEgm96.cpp */,
-				43D983910A403AA500E28AA2 /* ossimGeoidManager.cpp */,
-				43D983930A403AA500E28AA2 /* ossimGeoidNgs.cpp */,
-				43D983950A403AA500E28AA2 /* ossimGeoidNgsHeader.cpp */,
-				43D983850A403AA500E28AA2 /* ossimGeoPolygon.cpp */,
-				43D983970A403AA500E28AA2 /* ossimGeoref.cpp */,
-				43D983870A403AA500E28AA2 /* ossimGeoTiffCoordTransformsLut.cpp */,
-				43D983890A403AA500E28AA2 /* ossimGeoTiffDatumLut.cpp */,
-				43D983990A403AA500E28AA2 /* ossimGpt.cpp */,
-				43D9839B0A403AA500E28AA2 /* ossimGrect.cpp */,
-				43D9839D0A403AA500E28AA2 /* ossimGzStream.cpp */,
-				43D9839F0A403AA500E28AA2 /* ossimHexString.cpp */,
-				43D983A10A403AA500E28AA2 /* ossimHistogram.cpp */,
-				43D983A30A403AA500E28AA2 /* ossimHistogramSource.cpp */,
-				43D983A50A403AA500E28AA2 /* ossimHsiVector.cpp */,
-				43D983A70A403AA500E28AA2 /* ossimHsvVector.cpp */,
-				43D983A90A403AA500E28AA2 /* ossimId.cpp */,
-				43D983AB0A403AA500E28AA2 /* ossimIdManager.cpp */,
-				43D983AD0A403AA500E28AA2 /* ossimImageAoiListener.cpp */,
-				43D983AF0A403AA500E28AA2 /* ossimImageGeometryEvent.cpp */,
-				43D983B10A403AA500E28AA2 /* ossimImageGeometryEventListener.cpp */,
-				43D983B30A403AA500E28AA2 /* ossimImageTypeLut.cpp */,
-				43D983B50A403AA500E28AA2 /* ossimInterleaveTypeLut.cpp */,
-				43D983B70A403AA500E28AA2 /* ossimIoStream.cpp */,
-				43D983B90A403AA500E28AA2 /* ossimIpt.cpp */,
-				43D983BB0A403AA500E28AA2 /* ossimIrect.cpp */,
-				43D983BD0A403AA500E28AA2 /* ossimJpegYCbCrVector.cpp */,
-				43D983BF0A403AA500E28AA2 /* ossimKeyword.cpp */,
-				43D983C30A403AA500E28AA2 /* ossimKeywordlist.cpp */,
-				43D983C10A403AA500E28AA2 /* ossimKeywordNames.cpp */,
-				43D983C50A403AA500E28AA2 /* ossimLeastSquaresBilin.cpp */,
-				43D983C70A403AA500E28AA2 /* ossimLine.cpp */,
-				43D983C90A403AA500E28AA2 /* ossimListener.cpp */,
-				43D983CB0A403AA500E28AA2 /* ossimListenerManager.cpp */,
-				43D983CD0A403AA500E28AA2 /* ossimLookUpTable.cpp */,
-				43D983CF0A403AA500E28AA2 /* ossimLsrPoint.cpp */,
-				43D983D10A403AA500E28AA2 /* ossimLsrRay.cpp */,
-				43D983D30A403AA500E28AA2 /* ossimLsrSpace.cpp */,
-				43D983D50A403AA500E28AA2 /* ossimLsrVector.cpp */,
-				43D983D70A403AA500E28AA2 /* ossimMatrix3x3.cpp */,
-				43D983D90A403AA500E28AA2 /* ossimMatrix4x4.cpp */,
-				43D983DB0A403AA500E28AA2 /* ossimMatrixProperty.cpp */,
-				43D983DD0A403AA500E28AA2 /* ossimMouseEvent.cpp */,
-				43D983DF0A403AA500E28AA2 /* ossimMouseListener.cpp */,
-				43D983E10A403AA500E28AA2 /* ossimMultiBandHistogram.cpp */,
-				43D983E30A403AA500E28AA2 /* ossimMultiResLevelHistogram.cpp */,
-				43D983E90A403AA500E28AA2 /* ossimNadconGridDatum.cpp */,
-				43D983EB0A403AA500E28AA2 /* ossimNadconGridFile.cpp */,
-				43D983ED0A403AA500E28AA2 /* ossimNadconGridHeader.cpp */,
-				43D983EF0A403AA500E28AA2 /* ossimNadconNarDatum.cpp */,
-				43D983F10A403AA500E28AA2 /* ossimNadconNasDatum.cpp */,
-				43D983E70A403AA500E28AA2 /* ossimNBandLutDataObject.cpp */,
-				43D983F30A403AA500E28AA2 /* ossimNormRgbVector.cpp */,
-				436061760A821BFB001CD337 /* ossimNotify.cpp */,
-				43D983F70A403AA500E28AA2 /* ossimNumericProperty.cpp */,
-				43D983F90A403AA500E28AA2 /* ossimObject.cpp */,
-				43D983FB0A403AA500E28AA2 /* ossimObjectDestructingEvent.cpp */,
-				43D983FD0A403AA500E28AA2 /* ossimObjectFactory.cpp */,
-				43D983FF0A403AA500E28AA2 /* ossimObjectFactoryRegistry.cpp */,
-				43D984010A403AA600E28AA2 /* ossimOutputSource.cpp */,
-				43D984030A403AA600E28AA2 /* ossimPackedBits.cpp */,
-				43D984050A403AA600E28AA2 /* ossimPolyArea2d.cpp */,
-				43D984090A403AA600E28AA2 /* ossimPolygon.cpp */,
-				43D984070A403AA600E28AA2 /* ossimPolyLine.cpp */,
-				43D9840B0A403AA600E28AA2 /* ossimPreferences.cpp */,
-				43D9840D0A403AA600E28AA2 /* ossimProcessInterface.cpp */,
-				43D9840F0A403AA600E28AA2 /* ossimProcessListener.cpp */,
-				43D984110A403AA600E28AA2 /* ossimProcessProgressEvent.cpp */,
-				43D984130A403AA600E28AA2 /* ossimProperty.cpp */,
-				43D984150A403AA600E28AA2 /* ossimPropertyInterface.cpp */,
-				43D984170A403AA600E28AA2 /* ossimPropertyInterfaceFactory.cpp */,
-				43D984190A403AA600E28AA2 /* ossimPropertyInterfaceRegistry.cpp */,
-				43D9841D0A403AA600E28AA2 /* ossimQuadrilateralMap.cpp */,
-				43D9841B0A403AA600E28AA2 /* ossimQuadTreeWarp.cpp */,
-				433786360CBF128000AE9DCF /* ossimQuaternion.cpp */,
-				43D984230A403AA600E28AA2 /* ossimRationalNumber.cpp */,
-				43D984250A403AA600E28AA2 /* ossimRectanglePartitioner.cpp */,
-				43D984270A403AA600E28AA2 /* ossimRectilinearDataObject.cpp */,
-				43D984290A403AA600E28AA2 /* ossimReferenced.cpp */,
-				43D9842B0A403AA600E28AA2 /* ossimRefreshEvent.cpp */,
-				43D9842D0A403AA600E28AA2 /* ossimRegExp.cpp */,
-				43D9842F0A403AA600E28AA2 /* ossimRgbLutDataObject.cpp */,
-				43D984310A403AA600E28AA2 /* ossimRgbVector.cpp */,
-				43D9841F0A403AA600E28AA2 /* ossimROIEvent.cpp */,
-				43D984210A403AA600E28AA2 /* ossimROIEventListener.cpp */,
-				43D984330A403AA600E28AA2 /* ossimRtti.cpp */,
-				43D984350A403AA600E28AA2 /* ossimScalarTypeLut.cpp */,
-				43D984370A403AA600E28AA2 /* ossimSevenParamDatum.cpp */,
-				43D984390A403AA600E28AA2 /* ossimSource.cpp */,
-				43D9843B0A403AA600E28AA2 /* ossimStateChangedEvent.cpp */,
-				43D9843D0A403AA600E28AA2 /* ossimStdOutProgress.cpp */,
-				43D9843F0A403AA600E28AA2 /* ossimStreamBase.cpp */,
-				43D984410A403AA600E28AA2 /* ossimStreamFactory.cpp */,
-				43D984430A403AA600E28AA2 /* ossimStreamFactoryRegistry.cpp */,
-				43D984450A403AA600E28AA2 /* ossimString.cpp */,
-				43D984470A403AA600E28AA2 /* ossimStringListProperty.cpp */,
-				43D984490A403AA600E28AA2 /* ossimStringProperty.cpp */,
-				43D9844B0A403AA600E28AA2 /* ossimTDpt.cpp */,
-				43D9844D0A403AA600E28AA2 /* ossimTempFilename.cpp */,
-				43D9844F0A403AA600E28AA2 /* ossimTextProperty.cpp */,
-				43D984510A403AA600E28AA2 /* ossimThreeParamDatum.cpp */,
-				43D984530A403AA600E28AA2 /* ossimTieGpt.cpp */,
-				43D984550A403AA600E28AA2 /* ossimTieGptSet.cpp */,
-				43D984590A403AA600E28AA2 /* ossimTiledImageHash.cpp */,
-				43D984570A403AA600E28AA2 /* ossimTileHash.cpp */,
-				434E65DC10D685A2005EBB18 /* ossimTimer.cpp */,
-				43D9845B0A403AA600E28AA2 /* ossimTrace.cpp */,
-				43D9845D0A403AA600E28AA2 /* ossimTraceManager.cpp */,
-				43D9845F0A403AA600E28AA2 /* ossimUnitConversionTool.cpp */,
-				43D984610A403AA600E28AA2 /* ossimUnitTypeLut.cpp */,
-				43D984630A403AA600E28AA2 /* ossimUsgsQuad.cpp */,
-				43D984650A403AA600E28AA2 /* ossimViewController.cpp */,
-				43D984670A403AA600E28AA2 /* ossimViewEvent.cpp */,
-				43D984690A403AA600E28AA2 /* ossimViewInterface.cpp */,
-				43D9846B0A403AA600E28AA2 /* ossimViewListener.cpp */,
-				43D9846D0A403AA600E28AA2 /* ossimVrect.cpp */,
-				43D9846F0A403AA600E28AA2 /* ossimWgs72Datum.cpp */,
-				43D984710A403AA600E28AA2 /* ossimWgs84Datum.cpp */,
-				EE6F82870BE674DA0090E263 /* ossimWms.cpp */,
-				43D984730A403AA600E28AA2 /* ossimXmlAttribute.cpp */,
-				43D984750A403AA600E28AA2 /* ossimXmlDocument.cpp */,
-				43D984770A403AA600E28AA2 /* ossimXmlNode.cpp */,
-				43D984790A403AA600E28AA2 /* ossimXmlString.cpp */,
-			);
-			path = base;
-			sourceTree = "<group>";
-		};
-		43D9847E0A403AA600E28AA2 /* elevation */ = {
-			isa = PBXGroup;
-			children = (
-				434E669B10D6CE0D005EBB18 /* ossimDtedElevationDatabase.cpp */,
-				43D9848E0A403AA600E28AA2 /* ossimDtedFactory.cpp */,
-				43D984900A403AA600E28AA2 /* ossimDtedHandler.cpp */,
-				434E6B7A10D80CE6005EBB18 /* ossimElevationDatabase.cpp */,
-				434E6BB010D81529005EBB18 /* ossimElevationDatabaseFactory.cpp */,
-				434E6BA110D8125C005EBB18 /* ossimElevationDatabaseRegistry.cpp */,
-				43D984920A403AA600E28AA2 /* ossimElevCellHandler.cpp */,
-				43D984940A403AA600E28AA2 /* ossimElevCellHandlerFactory.cpp */,
-				43D984960A403AA600E28AA2 /* ossimElevManager.cpp */,
-				43D984980A403AA600E28AA2 /* ossimElevSource.cpp */,
-				43D9849A0A403AA600E28AA2 /* ossimElevSourceFactory.cpp */,
-				434E718810DA7D32005EBB18 /* ossimGeneralRasterElevationDatabase.cpp */,
-				43D9849E0A403AA600E28AA2 /* ossimGeneralRasterElevFactory.cpp */,
-				43D984A00A403AA600E28AA2 /* ossimGeneralRasterElevHandler.cpp */,
-				EE3F66EF0AF7D8D4000507C9 /* ossimHgtRef.cpp */,
-				434E707110DA60D8005EBB18 /* ossimSrtmElevationDatabase.cpp */,
-				43D984A20A403AA600E28AA2 /* ossimSrtmFactory.cpp */,
-				43D984A40A403AA600E28AA2 /* ossimSrtmHandler.cpp */,
-			);
-			path = elevation;
-			sourceTree = "<group>";
-		};
-		43D984A60A403AA600E28AA2 /* font */ = {
-			isa = PBXGroup;
-			children = (
-				43D984AF0A403AA600E28AA2 /* ossimFont.cpp */,
-				43D984B10A403AA600E28AA2 /* ossimFontFactoryRegistry.cpp */,
-				43D984B30A403AA600E28AA2 /* ossimFreeTypeFont.cpp */,
-				43D984B50A403AA600E28AA2 /* ossimFreeTypeFontFactory.cpp */,
-				43D984B70A403AA600E28AA2 /* ossimGdBitmapFont.cpp */,
-			);
-			path = font;
-			sourceTree = "<group>";
-		};
-		43D984B90A403AA600E28AA2 /* imaging */ = {
-			isa = PBXGroup;
-			children = (
-				4369F75011204839002FA4B7 /* ossimSingleImageChain.cpp */,
-				434E648C10D2BFEE005EBB18 /* ossimVirtualOverviewSequencer.cpp */,
-				438DF2DA10B620A800502C71 /* ossimNullPixelFlip.cpp */,
-				43D9C41E109F445000BA9119 /* ossimVirtualImageWriter.cpp */,
-				43D9C420109F445000BA9119 /* ossimVirtualImageHandler.cpp */,
-				43D9C404109F443000BA9119 /* ossimVirtualOverviewBuilder.cpp */,
-				43AC3A64108DE3A300A8DB04 /* ossimImageGeometry.cpp */,
-				43AC3A65108DE3A300A8DB04 /* ossimImageGeometryRegistry.cpp */,
-				43AC3A66108DE3A300A8DB04 /* ossimImageGeometryFactory.cpp */,
-				4347EE8F1084EEC4006E88F6 /* ossimNitfWriterBase.cpp */,
-				43EDA3D9107247CB007D1913 /* ossimNormalizedS16RemapTable.cpp */,
-				43E215670E91139B00D67CB8 /* ossimNitf20Writer.cpp */,
-				EE7B58E10E3DEBC80039A805 /* ossimTwoColorView.cpp */,
-				EEDECAE40E36724F00F52278 /* ossimImageModel.cpp */,
-				EE592C1B0BF3F8C200E4B15C /* ossimJpegMemSrc.cpp */,
-				EE7206280B64F69000DE8AE9 /* ossimERSFileWriter.cpp */,
-				436E916B0AC2F3D90051AEC2 /* ossimMemoryImageSource.cpp */,
-				432D60740B4AAF65004E059E /* ossimOverviewSequencer.cpp */,
-				186F41630B16233900443A9B /* ossimOverviewBuilderBase.cpp */,
-				186F41640B16233900443A9B /* ossimOverviewBuilderFactory.cpp */,
-				186F41650B16233900443A9B /* ossimOverviewBuilderFactoryBase.cpp */,
-				186F41660B16233900443A9B /* ossimOverviewBuilderFactoryRegistry.cpp */,
-				43D9858A0A403AA600E28AA2 /* ossim3x3ConvolutionFilter.cpp */,
-				43D9858C0A403AA600E28AA2 /* ossimAOD.cpp */,
-				43D9858E0A403AA600E28AA2 /* ossimAdrgHeader.cpp */,
-				43D985900A403AA600E28AA2 /* ossimAdrgTileSource.cpp */,
-				43D985920A403AA600E28AA2 /* ossimAnnotationEllipseObject.cpp */,
-				43D985940A403AA600E28AA2 /* ossimAnnotationFontObject.cpp */,
-				43D985960A403AA600E28AA2 /* ossimAnnotationGdBitmapFont.cpp */,
-				43D985980A403AA600E28AA2 /* ossimAnnotationLineObject.cpp */,
-				43D9859A0A403AA600E28AA2 /* ossimAnnotationMultiEllipseObject.cpp */,
-				43D9859C0A403AA600E28AA2 /* ossimAnnotationMultiLineObject.cpp */,
-				43D9859E0A403AA600E28AA2 /* ossimAnnotationMultiPolyLineObject.cpp */,
-				43D985A00A403AA600E28AA2 /* ossimAnnotationMultiPolyObject.cpp */,
-				43D985A20A403AA700E28AA2 /* ossimAnnotationObject.cpp */,
-				43D985A40A403AA700E28AA2 /* ossimAnnotationObjectFactory.cpp */,
-				43D985A60A403AA700E28AA2 /* ossimAnnotationPolyObject.cpp */,
-				43D985A80A403AA700E28AA2 /* ossimAnnotationSource.cpp */,
-				43D985AA0A403AA700E28AA2 /* ossimAppFixedTileCache.cpp */,
-				43D985AC0A403AA700E28AA2 /* ossimAppTileCache.cpp */,
-				43D985AE0A403AA700E28AA2 /* ossimArcInfoGridWriter.cpp */,
-				43D985B00A403AA700E28AA2 /* ossimAtCorrGridRemapper.cpp */,
-				43D985B20A403AA700E28AA2 /* ossimAtCorrRemapper.cpp */,
-				43D985B40A403AA700E28AA2 /* ossimAtbController.cpp */,
-				43D985B60A403AA700E28AA2 /* ossimAtbMatchPoint.cpp */,
-				43D985B80A403AA700E28AA2 /* ossimAtbPointSource.cpp */,
-				43D985BA0A403AA700E28AA2 /* ossimBandAverageFilter.cpp */,
-				43D985BC0A403AA700E28AA2 /* ossimBandClipFilter.cpp */,
-				43D985BE0A403AA700E28AA2 /* ossimBandMergeSource.cpp */,
-				43D985C00A403AA700E28AA2 /* ossimBandSelector.cpp */,
-				43D985C20A403AA700E28AA2 /* ossimBlendMosaic.cpp */,
-				43D985C40A403AA700E28AA2 /* ossimBrightnessContrastSource.cpp */,
-				43D985C60A403AA700E28AA2 /* ossimBrightnessMatch.cpp */,
-				43D985C80A403AA700E28AA2 /* ossimBumpShadeTileSource.cpp */,
-				43D985CA0A403AA700E28AA2 /* ossimCacheTileSource.cpp */,
-				43D985CC0A403AA700E28AA2 /* ossimCastTileSourceFilter.cpp */,
-				43D985CE0A403AA700E28AA2 /* ossimCcfHead.cpp */,
-				43D985D00A403AA700E28AA2 /* ossimCcfTileSource.cpp */,
-				43D985D20A403AA700E28AA2 /* ossimCibCadrgTileSource.cpp */,
-				43D985D40A403AA700E28AA2 /* ossimClosestToCenterCombiner.cpp */,
-				43D985D60A403AA700E28AA2 /* ossimColorNormalizedFusion.cpp */,
-				43D985D80A403AA700E28AA2 /* ossimConvolutionFilter1D.cpp */,
-				43D985DA0A403AA700E28AA2 /* ossimConvolutionSource.cpp */,
-				43D985DC0A403AA700E28AA2 /* ossimDdffield.cpp */,
-				43D985DE0A403AA700E28AA2 /* ossimDdffielddefn.cpp */,
-				43D985E00A403AA700E28AA2 /* ossimDdfmodule.cpp */,
-				43D985E20A403AA700E28AA2 /* ossimDdfrecord.cpp */,
-				43D985E40A403AA700E28AA2 /* ossimDdfsubfielddefn.cpp */,
-				43D985E60A403AA700E28AA2 /* ossimDdfutils.cpp */,
-				43D985E80A403AA700E28AA2 /* ossimDiscrete3x3HatFilter.cpp */,
-				43D985EA0A403AA700E28AA2 /* ossimDiscreteConvolutionKernel.cpp */,
-				43D985EC0A403AA700E28AA2 /* ossimDoqqTileSource.cpp */,
-				43D985EE0A403AA700E28AA2 /* ossimDtedElevationImageSource.cpp */,
-				43D985F00A403AA700E28AA2 /* ossimDtedTileSource.cpp */,
-				43D985F20A403AA700E28AA2 /* ossimERSTileSource.cpp */,
-				43D985F40A403AA700E28AA2 /* ossimEastingNorthingCutter.cpp */,
-				43D985F60A403AA700E28AA2 /* ossimEdgeFilter.cpp */,
-				43D985F80A403AA700E28AA2 /* ossimElevImageSource.cpp */,
-				43D985FA0A403AA700E28AA2 /* ossimEnviHeaderFileWriter.cpp */,
-				43D985FC0A403AA700E28AA2 /* ossimEquationCombiner.cpp */,
-				43D986020A403AA700E28AA2 /* ossimFeatherMosaic.cpp */,
-				43D986040A403AA700E28AA2 /* ossimFftFilter.cpp */,
-				43D986060A403AA700E28AA2 /* ossimFgdcFileWriter.cpp */,
-				43D986080A403AA700E28AA2 /* ossimFilter.cpp */,
-				43D9860A0A403AA700E28AA2 /* ossimFilterResampler.cpp */,
-				43D9860C0A403AA700E28AA2 /* ossimFilterTable.cpp */,
-				43D9860E0A403AA700E28AA2 /* ossimFixedTileCache.cpp */,
-				43D986100A403AA700E28AA2 /* ossimFusionCombiner.cpp */,
-				43D986120A403AA700E28AA2 /* ossimGammaRemapper.cpp */,
-				43D986140A403AA700E28AA2 /* ossimGeneralRasterInfo.cpp */,
-				43D986160A403AA700E28AA2 /* ossimGeneralRasterTileSource.cpp */,
-				43D986180A403AA700E28AA2 /* ossimGeneralRasterWriter.cpp */,
-				43D9861A0A403AA700E28AA2 /* ossimGeoAnnotationBitmap.cpp */,
-				43D9861C0A403AA700E28AA2 /* ossimGeoAnnotationEllipseObject.cpp */,
-				43D9861E0A403AA700E28AA2 /* ossimGeoAnnotationFontObject.cpp */,
-				43D986200A403AA700E28AA2 /* ossimGeoAnnotationGdBitmapFont.cpp */,
-				43D986220A403AA700E28AA2 /* ossimGeoAnnotationLineObject.cpp */,
-				43D986240A403AA700E28AA2 /* ossimGeoAnnotationMultiEllipseObject.cpp */,
-				43D986260A403AA700E28AA2 /* ossimGeoAnnotationMultiPolyLineObject.cpp */,
-				43D986280A403AA700E28AA2 /* ossimGeoAnnotationMultiPolyObject.cpp */,
-				43D9862A0A403AA700E28AA2 /* ossimGeoAnnotationObject.cpp */,
-				43D9862C0A403AA700E28AA2 /* ossimGeoAnnotationPolyLineObject.cpp */,
-				43D9862E0A403AA700E28AA2 /* ossimGeoAnnotationPolyObject.cpp */,
-				43D986300A403AA700E28AA2 /* ossimGeoAnnotationSource.cpp */,
-				43D986320A403AA700E28AA2 /* ossimGeoPolyCutter.cpp */,
-				43D986340A403AA700E28AA2 /* ossimGeographicAnnotationGrid.cpp */,
-				43D986360A403AA700E28AA2 /* ossimGeomFileWriter.cpp */,
-				43D986380A403AA700E28AA2 /* ossimGridRemapEngine.cpp */,
-				43D9863A0A403AA700E28AA2 /* ossimGridRemapEngineFactory.cpp */,
-				43D9863C0A403AA700E28AA2 /* ossimGridRemapSource.cpp */,
-				43D9863E0A403AA700E28AA2 /* ossimHistoMatchRemapper.cpp */,
-				43D986400A403AA700E28AA2 /* ossimHistogramEqualization.cpp */,
-				43D986420A403AA700E28AA2 /* ossimHistogramMatchFilter.cpp */,
-				43D986440A403AA700E28AA2 /* ossimHistogramRemapper.cpp */,
-				43D986460A403AA700E28AA2 /* ossimHistogramThreshholdFilter.cpp */,
-				43D986480A403AA700E28AA2 /* ossimHistogramWriter.cpp */,
-				43D9864A0A403AA700E28AA2 /* ossimHsiRemapper.cpp */,
-				43D9864C0A403AA700E28AA2 /* ossimHsiToRgbSource.cpp */,
-				43D9864E0A403AA700E28AA2 /* ossimHsvGridRemapEngine.cpp */,
-				43D986500A403AA700E28AA2 /* ossimHsvToRgbSource.cpp */,
-				43D986520A403AA700E28AA2 /* ossimIgenGenerator.cpp */,
-				43D986540A403AA700E28AA2 /* ossimImageChain.cpp */,
-				43D986560A403AA700E28AA2 /* ossimImageCombiner.cpp */,
-				43D986580A403AA700E28AA2 /* ossimImageData.cpp */,
-				43D9865A0A403AA700E28AA2 /* ossimImageDataFactory.cpp */,
-				43D9865C0A403AA700E28AA2 /* ossimImageDataHelper.cpp */,
-				43D9865E0A403AA700E28AA2 /* ossimImageDisplayWriter.cpp */,
-				43D986600A403AA700E28AA2 /* ossimImageFileWriter.cpp */,
-				43D986620A403AA700E28AA2 /* ossimImageGaussianFilter.cpp */,
-				43D986640A403AA700E28AA2 /* ossimImageHandler.cpp */,
-				43D986660A403AA700E28AA2 /* ossimImageHandlerFactory.cpp */,
-				43D986680A403AA700E28AA2 /* ossimImageHandlerFactoryBase.cpp */,
-				43D9866A0A403AA700E28AA2 /* ossimImageHandlerRegistry.cpp */,
-				43D9866C0A403AA700E28AA2 /* ossimImageHistogramSource.cpp */,
-				43D9866E0A403AA700E28AA2 /* ossimImageMetaData.cpp */,
-				43D986700A403AA700E28AA2 /* ossimImageMetaDataWriterFactory.cpp */,
-				43D986720A403AA700E28AA2 /* ossimImageMetaDataWriterFactoryBase.cpp */,
-				43D986740A403AA700E28AA2 /* ossimImageMetaDataWriterRegistry.cpp */,
-				43D986760A403AA700E28AA2 /* ossimImageMosaic.cpp */,
-				43D986780A403AA700E28AA2 /* ossimImageReconstructionFilterFactory.cpp */,
-				43D9867A0A403AA700E28AA2 /* ossimImageReconstructionFilterRegistry.cpp */,
-				43D9867C0A403AA700E28AA2 /* ossimImageRenderer.cpp */,
-				43D986800A403AA700E28AA2 /* ossimImageSharpenFilter.cpp */,
-				43D986820A403AA700E28AA2 /* ossimImageSource.cpp */,
-				43D986840A403AA700E28AA2 /* ossimImageSourceFactory.cpp */,
-				43D986860A403AA700E28AA2 /* ossimImageSourceFactoryBase.cpp */,
-				43D986880A403AA700E28AA2 /* ossimImageSourceFactoryRegistry.cpp */,
-				43D9868A0A403AA700E28AA2 /* ossimImageSourceFilter.cpp */,
-				43D9868C0A403AA700E28AA2 /* ossimImageSourceHistogramFilter.cpp */,
-				43D986900A403AA700E28AA2 /* ossimImageSourceSequencer.cpp */,
-				43D986920A403AA700E28AA2 /* ossimImageStatisticsSource.cpp */,
-				43D986940A403AA700E28AA2 /* ossimImageToPlaneNormalFilter.cpp */,
-				43D986960A403AA700E28AA2 /* ossimImageWriter.cpp */,
-				43D986980A403AA700E28AA2 /* ossimImageWriterFactory.cpp */,
-				43D9869A0A403AA700E28AA2 /* ossimImageWriterFactoryBase.cpp */,
-				43D9869C0A403AA700E28AA2 /* ossimImageWriterFactoryRegistry.cpp */,
-				43D9869E0A403AA700E28AA2 /* ossimIndexToRgbLutFilter.cpp */,
-				43D986A00A403AA700E28AA2 /* ossimIntensityAdjustmentFilter.cpp */,
-				43D986A20A403AA700E28AA2 /* ossimJpegTileSource.cpp */,
-				43D986A40A403AA700E28AA2 /* ossimJpegWriter.cpp */,
-				43D986A60A403AA700E28AA2 /* ossimJpegYCbCrToRgbSource.cpp */,
-				43D986A80A403AA700E28AA2 /* ossimLandsatTileSource.cpp */,
-				43D986AA0A403AA700E28AA2 /* ossimLandsatTopoCorrectionFilter.cpp */,
-				43D986AC0A403AA700E28AA2 /* ossimLocalCorrelationFusion.cpp */,
-				43D986AE0A403AA700E28AA2 /* ossimMapCompositionSource.cpp */,
-				43D986B00A403AA700E28AA2 /* ossimMaskFilter.cpp */,
-				43D986B20A403AA700E28AA2 /* ossimMaxMosaic.cpp */,
-				43D986B40A403AA700E28AA2 /* ossimMeanMedianFilter.cpp */,
-				43D986B60A403AA700E28AA2 /* ossimMetadataFileWriter.cpp */,
-				43D986B80A403AA700E28AA2 /* ossimMonoGridRemapEngine.cpp */,
-				43D986BA0A403AA700E28AA2 /* ossimMultiBandHistogramTileSource.cpp */,
-				43D986BC0A403AA700E28AA2 /* ossimNBandToIndexFilter.cpp */,
-				43D986BE0A403AA700E28AA2 /* ossimNitfTileSource.cpp */,
-				43D986C00A403AA700E28AA2 /* ossimNitfWriter.cpp */,
-				43D986C20A403AA700E28AA2 /* ossimNormalizedRemapTable.cpp */,
-				43D986C40A403AA700E28AA2 /* ossimNormalizedU11RemapTable.cpp */,
-				43D986C60A403AA700E28AA2 /* ossimNormalizedU16RemapTable.cpp */,
-				43D986C80A403AA700E28AA2 /* ossimNormalizedU8RemapTable.cpp */,
-				43D986CA0A403AA700E28AA2 /* ossimOrthoImageMosaic.cpp */,
-				43D986CC0A403AA700E28AA2 /* ossimPixelFlipper.cpp */,
-				43D986CE0A403AA700E28AA2 /* ossimPolyCutter.cpp */,
-				43D986D00A403AA700E28AA2 /* ossimQuickbirdNitfTileSource.cpp */,
-				43D986D20A403AA700E28AA2 /* ossimQuickbirdTiffTileSource.cpp */,
-				43D986D40A403AA700E28AA2 /* ossimRLevelFilter.cpp */,
-				43D986D60A403AA700E28AA2 /* ossimReadmeFileWriter.cpp */,
-				43D986D80A403AA700E28AA2 /* ossimRectangleCutFilter.cpp */,
-				43D986DA0A403AA700E28AA2 /* ossimResampler.cpp */,
-				43D986DC0A403AA700E28AA2 /* ossimRgbGridRemapEngine.cpp */,
-				43D986DE0A403AA700E28AA2 /* ossimRgbImage.cpp */,
-				43D986E00A403AA700E28AA2 /* ossimRgbToGreyFilter.cpp */,
-				43D986E20A403AA700E28AA2 /* ossimRgbToHsiSource.cpp */,
-				43D986E40A403AA700E28AA2 /* ossimRgbToHsvSource.cpp */,
-				43D986E60A403AA700E28AA2 /* ossimRgbToIndexFilter.cpp */,
-				43D986E80A403AA700E28AA2 /* ossimRgbToJpegYCbCrSource.cpp */,
-				43D986EA0A403AA700E28AA2 /* ossimS16ImageData.cpp */,
-				43D986EC0A403AA700E28AA2 /* ossimSFIMFusion.cpp */,
-				43D986EE0A403AA700E28AA2 /* ossimScalarRemapper.cpp */,
-				43D986F00A403AA700E28AA2 /* ossimScaleFilter.cpp */,
-				43D986F20A403AA700E28AA2 /* ossimSrtmTileSource.cpp */,
-				43D986F40A403AA700E28AA2 /* ossimSubImageTileSource.cpp */,
-				43D986F60A403AA700E28AA2 /* ossimTableRemapper.cpp */,
-				43D986F80A403AA700E28AA2 /* ossimTiffOverviewBuilder.cpp */,
-				43D986FA0A403AA800E28AA2 /* ossimTiffTileSource.cpp */,
-				43D986FC0A403AA800E28AA2 /* ossimTiffWriter.cpp */,
-				43D986FE0A403AA800E28AA2 /* ossimTileCache.cpp */,
-				43D987000A403AA800E28AA2 /* ossimTilePatch.cpp */,
-				43D987020A403AA800E28AA2 /* ossimTiling.cpp */,
-				43D987040A403AA800E28AA2 /* ossimTopographicCorrectionFilter.cpp */,
-				43D987060A403AA800E28AA2 /* ossimTrimFilter.cpp */,
-				43D987080A403AA800E28AA2 /* ossimU11ImageData.cpp */,
-				43D9870A0A403AA800E28AA2 /* ossimU16ImageData.cpp */,
-				43D9870C0A403AA800E28AA2 /* ossimU8ImageData.cpp */,
-				43D9870E0A403AA800E28AA2 /* ossimUsgsDemTileSource.cpp */,
-				43D987100A403AA800E28AA2 /* ossimValueAssignImageSourceFilter.cpp */,
-				43D987120A403AA800E28AA2 /* ossimVectorRenderer.cpp */,
-				43D987140A403AA800E28AA2 /* ossimVertexExtractor.cpp */,
-				43D987160A403AA800E28AA2 /* ossimVpfAnnotationCoverageInfo.cpp */,
-				43D987180A403AA800E28AA2 /* ossimVpfAnnotationFeatureInfo.cpp */,
-				43D9871A0A403AA800E28AA2 /* ossimVpfAnnotationLibraryInfo.cpp */,
-				43D9871C0A403AA800E28AA2 /* ossimVpfAnnotationSource.cpp */,
-				43D9871E0A403AA800E28AA2 /* ossimVpfTileSource.cpp */,
-				43D987200A403AA800E28AA2 /* ossimWatermarkFilter.cpp */,
-				43D987220A403AA800E28AA2 /* ossimWorldFileWriter.cpp */,
-			);
-			path = imaging;
-			sourceTree = "<group>";
-		};
-		43D987240A403AA800E28AA2 /* init */ = {
-			isa = PBXGroup;
-			children = (
-				43D987290A403AA800E28AA2 /* ossimInit.cpp */,
-			);
-			path = init;
-			sourceTree = "<group>";
-		};
-		43D9872B0A403AA800E28AA2 /* kbool */ = {
-			isa = PBXGroup;
-			children = (
-				43D987380A403AA800E28AA2 /* booleng.cpp */,
-				43D9873A0A403AA800E28AA2 /* graph.cpp */,
-				43D9873C0A403AA800E28AA2 /* graphlst.cpp */,
-				43D9873E0A403AA800E28AA2 /* line.cpp */,
-				43D987400A403AA800E28AA2 /* link.cpp */,
-				43D987420A403AA800E28AA2 /* lpoint.cpp */,
-				43D987440A403AA800E28AA2 /* node.cpp */,
-				43D987460A403AA800E28AA2 /* record.cpp */,
-				43D987480A403AA800E28AA2 /* scanbeam.cpp */,
-			);
-			path = kbool;
-			sourceTree = "<group>";
-		};
-		43D9874A0A403AA800E28AA2 /* matrix */ = {
-			isa = PBXGroup;
-			children = (
-				43D987660A403AA800E28AA2 /* bandmat.cpp */,
-				43D9876B0A403AA800E28AA2 /* cholesky.cpp */,
-				43D9876D0A403AA800E28AA2 /* evalue.cpp */,
-				43D987700A403AA800E28AA2 /* fft.cpp */,
-				43D987730A403AA800E28AA2 /* hholder.cpp */,
-				43D987750A403AA800E28AA2 /* jacobi.cpp */,
-				43D987790A403AA800E28AA2 /* myexcept.cpp */,
-				43D9877B0A403AA800E28AA2 /* newfft.cpp */,
-				43D9877E0A403AA800E28AA2 /* newmat1.cpp */,
-				43D987800A403AA800E28AA2 /* newmat2.cpp */,
-				43D987820A403AA800E28AA2 /* newmat3.cpp */,
-				43D987840A403AA800E28AA2 /* newmat4.cpp */,
-				43D987860A403AA800E28AA2 /* newmat5.cpp */,
-				43D987880A403AA800E28AA2 /* newmat6.cpp */,
-				43D9878A0A403AA800E28AA2 /* newmat7.cpp */,
-				43D9878C0A403AA800E28AA2 /* newmat8.cpp */,
-				43D9878E0A403AA800E28AA2 /* newmat9.cpp */,
-				43D987900A403AA800E28AA2 /* newmatex.cpp */,
-				43D987920A403AA800E28AA2 /* newmatnl.cpp */,
-				43D987940A403AA800E28AA2 /* newmatrm.cpp */,
-				43D987980A403AA800E28AA2 /* solution.cpp */,
-				43D9879A0A403AA800E28AA2 /* sort.cpp */,
-				43D9879C0A403AA800E28AA2 /* submat.cpp */,
-				43D9879E0A403AA800E28AA2 /* svd.cpp */,
-			);
-			path = matrix;
-			sourceTree = "<group>";
-		};
-		43D987A30A403AA800E28AA2 /* parallel */ = {
-			isa = PBXGroup;
-			children = (
-				432D60760B4AAF89004E059E /* ossimMpiSlaveOverviewSequencer.cpp */,
-				432D60770B4AAF89004E059E /* ossimMpiMasterOverviewSequencer.cpp */,
-				43D987AC0A403AA800E28AA2 /* ossimIgen.cpp */,
-				43D987AE0A403AA800E28AA2 /* ossimImageMpiMWriterSequenceConnection.cpp */,
-				43D987B00A403AA800E28AA2 /* ossimImageMpiSWriterSequenceConnection.cpp */,
-				43D987B20A403AA800E28AA2 /* ossimMpi.cpp */,
-				43D987B40A403AA800E28AA2 /* ossimOrthoIgen.cpp */,
-			);
-			path = parallel;
-			sourceTree = "<group>";
-		};
-		43D987B60A403AA800E28AA2 /* plugin */ = {
-			isa = PBXGroup;
-			children = (
-				43D987BE0A403AA800E28AA2 /* ossimDynamicLibrary.cpp */,
-				43D987C00A403AA800E28AA2 /* ossimPluginLibrary.cpp */,
-				43D987C20A403AA800E28AA2 /* ossimSharedObjectBridge.cpp */,
-				43D987C40A403AA800E28AA2 /* ossimSharedPluginRegistry.cpp */,
-			);
-			path = plugin;
-			sourceTree = "<group>";
-		};
-		43D987C60A403AA800E28AA2 /* projection */ = {
-			isa = PBXGroup;
-			children = (
-				43377C5F10CD61E200ECC5AD /* ossimGcsCodeProjectionFactory.cpp */,
-				438DEDDC10B1D89B00502C71 /* ossimBuckeyeSensor.cpp */,
-				438DED7410B1811C00502C71 /* ossimSmacCallibrationSystem.cpp */,
-				EEDECAE20E36724500F52278 /* ossimImageProjectionModel.cpp */,
-				434230940C14F94F00F77EBA /* ossimPositionQualityEvaluator.cpp */,
-				EE3F66F10AF7D8F3000507C9 /* ossimSensorModelTuple.cpp */,
-				437224AB0AAFAE6A00F7BCC5 /* ossimSarModel.cpp */,
-				43D9881B0A403AA800E28AA2 /* ossimAdjMapModel.cpp */,
-				43D9881D0A403AA800E28AA2 /* ossimAffineProjection.cpp */,
-				43D9881F0A403AA800E28AA2 /* ossimAlbersProjection.cpp */,
-				43D988210A403AA800E28AA2 /* ossimApplanixEcefModel.cpp */,
-				43D988230A403AA800E28AA2 /* ossimApplanixUtmModel.cpp */,
-				43D988250A403AA800E28AA2 /* ossimAzimEquDistProjection.cpp */,
-				43D988270A403AA800E28AA2 /* ossimBilinearProjection.cpp */,
-				43D988290A403AA800E28AA2 /* ossimBngProjection.cpp */,
-				43D9882B0A403AA800E28AA2 /* ossimBonneProjection.cpp */,
-				43D9882D0A403AA800E28AA2 /* ossimCadrgProjection.cpp */,
-				43D9882F0A403AA800E28AA2 /* ossimCassiniProjection.cpp */,
-				43D988310A403AA800E28AA2 /* ossimCoarseGridModel.cpp */,
-				43D988330A403AA800E28AA2 /* ossimCylEquAreaProjection.cpp */,
-				43D988350A403AA800E28AA2 /* ossimEckert4Projection.cpp */,
-				43D988370A403AA800E28AA2 /* ossimEckert6Projection.cpp */,
-				43D988390A403AA800E28AA2 /* ossimEquDistCylProjection.cpp */,
-				43D9883B0A403AA800E28AA2 /* ossimFcsiModel.cpp */,
-				43D9883D0A403AA800E28AA2 /* ossimGnomonicProjection.cpp */,
-				43D9883F0A403AA800E28AA2 /* ossimIkonosRpcModel.cpp */,
-				43D988410A403AA800E28AA2 /* ossimImageViewAffineTransform.cpp */,
-				43D988430A403AA800E28AA2 /* ossimImageViewProjectionTransform.cpp */,
-				43D988450A403AA800E28AA2 /* ossimImageViewTransform.cpp */,
-				43D988470A403AA800E28AA2 /* ossimImageViewTransformFactory.cpp */,
-				43D988490A403AA800E28AA2 /* ossimLambertConformalConicProjection.cpp */,
-				43D9884B0A403AA800E28AA2 /* ossimLandSatModel.cpp */,
-				43D9884D0A403AA800E28AA2 /* ossimLensDistortion.cpp */,
-				43D9884F0A403AA800E28AA2 /* ossimLlxyProjection.cpp */,
-				43D988510A403AA800E28AA2 /* ossimMapProjection.cpp */,
-				43D988530A403AA800E28AA2 /* ossimMapProjectionFactory.cpp */,
-				43D988550A403AA800E28AA2 /* ossimMapProjectionInfo.cpp */,
-				43D988570A403AA800E28AA2 /* ossimMapViewController.cpp */,
-				43D988590A403AA800E28AA2 /* ossimMeanRadialLensDistortion.cpp */,
-				43D9885B0A403AA900E28AA2 /* ossimMercatorProjection.cpp */,
-				43D9885D0A403AA900E28AA2 /* ossimMgrs.c */,
-				43D9885F0A403AA900E28AA2 /* ossimMillerProjection.cpp */,
-				43D988610A403AA900E28AA2 /* ossimMiscProjectionFactory.cpp */,
-				43D988630A403AA900E28AA2 /* ossimMollweidProjection.cpp */,
-				43D988650A403AA900E28AA2 /* ossimNewZealandMapGridProjection.cpp */,
-				43D988670A403AA900E28AA2 /* ossimNitfMapModel.cpp */,
-				43D988690A403AA900E28AA2 /* ossimNitfProjectionFactory.cpp */,
-				43D9886B0A403AA900E28AA2 /* ossimNitfRpcModel.cpp */,
-				43D9886D0A403AA900E28AA2 /* ossimObliqueMercatorProjection.cpp */,
-				43D9886F0A403AA900E28AA2 /* ossimOptimizableProjection.cpp */,
-				43D988710A403AA900E28AA2 /* ossimOrthoGraphicProjection.cpp */,
-				43D988730A403AA900E28AA2 /* ossimPcsCodeProjectionFactory.cpp */,
-				43D988750A403AA900E28AA2 /* ossimPolarStereoProjection.cpp */,
-				43D988770A403AA900E28AA2 /* ossimPolarst.c */,
-				43D988790A403AA900E28AA2 /* ossimPolyconicProjection.cpp */,
-				43D9887B0A403AA900E28AA2 /* ossimPolynomProjection.cpp */,
-				43D9887D0A403AA900E28AA2 /* ossimProjection.cpp */,
-				43D9887F0A403AA900E28AA2 /* ossimProjectionFactoryBase.cpp */,
-				43D988810A403AA900E28AA2 /* ossimProjectionFactoryRegistry.cpp */,
-				43D988830A403AA900E28AA2 /* ossimProjectionViewControllerFactory.cpp */,
-				43D988850A403AA900E28AA2 /* ossimQuadProjection.cpp */,
-				43D988870A403AA900E28AA2 /* ossimQuickbirdRpcModel.cpp */,
-				43D988890A403AA900E28AA2 /* ossimRadialDecentLensDistortion.cpp */,
-				43D9888B0A403AA900E28AA2 /* ossimRpcModel.cpp */,
-				43D9888D0A403AA900E28AA2 /* ossimRpcProjection.cpp */,
-				43D9888F0A403AA900E28AA2 /* ossimRpcSolver.cpp */,
-				43D988910A403AA900E28AA2 /* ossimSensorModel.cpp */,
-				43D988930A403AA900E28AA2 /* ossimSensorModelFactory.cpp */,
-				43D988950A403AA900E28AA2 /* ossimSinusoid.c */,
-				43D988970A403AA900E28AA2 /* ossimSinusoidalProjection.cpp */,
-				43D988990A403AA900E28AA2 /* ossimSpaceObliqueMercatorProjection.cpp */,
-				43D9889B0A403AA900E28AA2 /* ossimSpot5Model.cpp */,
-				43D9889D0A403AA900E28AA2 /* ossimSrsProjectionFactory.cpp */,
-				43D9889F0A403AA900E28AA2 /* ossimStatePlaneProjectionFactory.cpp */,
-				43D988A10A403AA900E28AA2 /* ossimStatePlaneProjectionInfo.cpp */,
-				43D988A30A403AA900E28AA2 /* ossimStereographicProjection.cpp */,
-				43D988A50A403AA900E28AA2 /* ossimTiffProjectionFactory.cpp */,
-				43D988A70A403AA900E28AA2 /* ossimTranmerc.c */,
-				43D988A90A403AA900E28AA2 /* ossimTransCylEquAreaProjection.cpp */,
-				43D988AB0A403AA900E28AA2 /* ossimTransMercatorProjection.cpp */,
-				43D988AD0A403AA900E28AA2 /* ossimUps.c */,
-				43D988AF0A403AA900E28AA2 /* ossimUpsProjection.cpp */,
-				43D988B10A403AA900E28AA2 /* ossimUpspt.cpp */,
-				43D988B30A403AA900E28AA2 /* ossimUtm.c */,
-				43D988B50A403AA900E28AA2 /* ossimUtmProjection.cpp */,
-				43D988B70A403AA900E28AA2 /* ossimUtmpt.cpp */,
-				43D988B90A403AA900E28AA2 /* ossimVanDerGrintenProjection.cpp */,
-				43D988BB0A403AA900E28AA2 /* ossimWarpProjection.cpp */,
-			);
-			path = projection;
-			sourceTree = "<group>";
-		};
-		43D988BD0A403AA900E28AA2 /* support_data */ = {
-			isa = PBXGroup;
-			children = (
-				43D3C5C21151A3DB000A60FB /* ossimQuickbirdMetaData.cpp */,
-				436A7E7A10FBAAD500985348 /* ossimAuxFileHandler.cpp */,
-				188F85D70FA3A1C700B619F6 /* ossimInfoBase.cpp */,
-				43E65CEB104D85BD0027BB2C /* ossimDemInfo.cpp */,
-				434D0A5810174A3F00761D13 /* ossimJ2kInfo.cpp */,
-				434D0A5910174A3F00761D13 /* ossimJ2kCodRecord.cpp */,
-				1FB08BA60FE2B4B3006CD0BD /* ossimNitfEngrdaTag.cpp */,
-				43F8A5700FDEF43200FF4F40 /* ossimJ2kSizRecord.cpp */,
-				43F8A5710FDEF43200FF4F40 /* ossimJ2kSotRecord.cpp */,
-				43F8A5720FDEF43200FF4F40 /* ossimNitfAcftbTag.cpp */,
-				43F8A5730FDEF43200FF4F40 /* ossimNitfAimidbTag.cpp */,
-				43F8A5740FDEF43200FF4F40 /* ossimNitfMstgtaTag.cpp */,
-				4350CA280F868C5000CBF038 /* ossimNitfCsexraTag.cpp */,
-				4350C9C50F8648EA00CBF038 /* ossimNitfCscrnaTag.cpp */,
-				4350C7BF0F851DF200CBF038 /* ossimNitfCsdidaTag.cpp */,
-				43D6225E0F7BC48200D93B8F /* ossimDtedInfo.cpp */,
-				43D6225F0F7BC48200D93B8F /* ossimCcfInfo.cpp */,
-				43D622600F7BC48200D93B8F /* ossimNitfInfo.cpp */,
-				43D622610F7BC48200D93B8F /* ossimTiffInfo.cpp */,
-				43D622620F7BC48200D93B8F /* ossimInfoFactory.cpp */,
-				43D622630F7BC48200D93B8F /* ossimInfoFactoryRegistry.cpp */,
-				43D989330A403AA900E28AA2 /* ossimAigBounds.cpp */,
-				43D989350A403AA900E28AA2 /* ossimAigDataFileHeader.cpp */,
-				43D989370A403AA900E28AA2 /* ossimAigHeader.cpp */,
-				43D989390A403AA900E28AA2 /* ossimAigIndexFileHeader.cpp */,
-				43D9893B0A403AA900E28AA2 /* ossimAigStatistics.cpp */,
-				43D9893D0A403AA900E28AA2 /* ossimApplanixEOFile.cpp */,
-				43D9893F0A403AA900E28AA2 /* ossimDemGrid.cpp */,
-				43D989410A403AA900E28AA2 /* ossimDemHeader.cpp */,
-				43D989430A403AA900E28AA2 /* ossimDemPoint.cpp */,
-				43D989450A403AA900E28AA2 /* ossimDemProfile.cpp */,
-				43D989470A403AA900E28AA2 /* ossimDemStats.cpp */,
-				43D989490A403AA900E28AA2 /* ossimDemUtil.cpp */,
-				43D9894B0A403AA900E28AA2 /* ossimDoqq.cpp */,
-				43D9894D0A403AA900E28AA2 /* ossimDtedAcc.cpp */,
-				43D9894F0A403AA900E28AA2 /* ossimDtedDsi.cpp */,
-				43D989510A403AA900E28AA2 /* ossimDtedHdr.cpp */,
-				43D989530A403AA900E28AA2 /* ossimDtedRecord.cpp */,
-				43D989550A403AA900E28AA2 /* ossimDtedUhl.cpp */,
-				43D989570A403AA900E28AA2 /* ossimDtedVol.cpp */,
-				43D989590A403AA900E28AA2 /* ossimERS.cpp */,
-				43D9895B0A403AA900E28AA2 /* ossimEnviHeader.cpp */,
-				43D9895D0A403AA900E28AA2 /* ossimFfL5.cpp */,
-				43D9895F0A403AA900E28AA2 /* ossimFfL7.cpp */,
-				43D989610A403AA900E28AA2 /* ossimFfRevb.cpp */,
-				43D989630A403AA900E28AA2 /* ossimFfRevc.cpp */,
-				43D989650A403AA900E28AA2 /* ossimGeoTiff.cpp */,
-				43D989670A403AA900E28AA2 /* ossimIkonosMetaData.cpp */,
-				43D989690A403AA900E28AA2 /* ossimNitfBlockaTag.cpp */,
-				43D9896B0A403AA900E28AA2 /* ossimNitfCommon.cpp */,
-				43D9896D0A403AA900E28AA2 /* ossimNitfCompressionHeader.cpp */,
-				43D9896F0A403AA900E28AA2 /* ossimNitfDataExtensionSegment.cpp */,
-				43D989710A403AA900E28AA2 /* ossimNitfDataExtensionSegmentV2_0.cpp */,
-				43D989730A403AA900E28AA2 /* ossimNitfEmbeddedRpfDes.cpp */,
-				43D989750A403AA900E28AA2 /* ossimNitfEmbeddedRpfHeader.cpp */,
-				43D989770A403AA900E28AA2 /* ossimNitfFile.cpp */,
-				43D989790A403AA900E28AA2 /* ossimNitfFileHeader.cpp */,
-				43D9897B0A403AA900E28AA2 /* ossimNitfFileHeaderV2_0.cpp */,
-				43D9897D0A403AA900E28AA2 /* ossimNitfFileHeaderV2_1.cpp */,
-				43D9897F0A403AA900E28AA2 /* ossimNitfFileHeaderV2_X.cpp */,
-				43D989810A403AA900E28AA2 /* ossimNitfGeoPositioningTag.cpp */,
-				43D989830A403AA900E28AA2 /* ossimNitfIchipbTag.cpp */,
-				43D989850A403AA900E28AA2 /* ossimNitfImageBand.cpp */,
-				43D989870A403AA900E28AA2 /* ossimNitfImageBandV2_0.cpp */,
-				43D989890A403AA900E28AA2 /* ossimNitfImageBandV2_1.cpp */,
-				43D9898B0A403AA900E28AA2 /* ossimNitfImageHeader.cpp */,
-				43D9898D0A403AA900E28AA2 /* ossimNitfImageHeaderV2_0.cpp */,
-				43D9898F0A403AA900E28AA2 /* ossimNitfImageHeaderV2_1.cpp */,
-				43D989910A403AA900E28AA2 /* ossimNitfImageHeaderV2_X.cpp */,
-				43D989930A403AA900E28AA2 /* ossimNitfImageLut.cpp */,
-				43D989950A403AA900E28AA2 /* ossimNitfImageLutV2_0.cpp */,
-				43D989970A403AA900E28AA2 /* ossimNitfImageLutV2_1.cpp */,
-				43D989990A403AA900E28AA2 /* ossimNitfLabelHeader.cpp */,
-				43D9899B0A403AA900E28AA2 /* ossimNitfLabelHeaderV2_0.cpp */,
-				43D9899D0A403AA900E28AA2 /* ossimNitfLocalCartographicTag.cpp */,
-				43D9899F0A403AA900E28AA2 /* ossimNitfLocalGeographicTag.cpp */,
-				43D989A10A403AA900E28AA2 /* ossimNitfNameConversionTables.cpp */,
-				43D989A30A403AA900E28AA2 /* ossimNitfPiaimcTag.cpp */,
-				43D989A50A403AA900E28AA2 /* ossimNitfProjectionParameterTag.cpp */,
-				43D989A70A403AAA00E28AA2 /* ossimNitfRegisteredTag.cpp */,
-				43D989A90A403AAA00E28AA2 /* ossimNitfRegisteredTagFactory.cpp */,
-				43D989AB0A403AAA00E28AA2 /* ossimNitfRpcATag.cpp */,
-				43D989AD0A403AAA00E28AA2 /* ossimNitfRpcBTag.cpp */,
-				43D989AF0A403AAA00E28AA2 /* ossimNitfRpcBase.cpp */,
-				43D989B10A403AAA00E28AA2 /* ossimNitfRpfTagFactory.cpp */,
-				43D989B30A403AAA00E28AA2 /* ossimNitfSensraTag.cpp */,
-				43D989B50A403AAA00E28AA2 /* ossimNitfStdidcTag.cpp */,
-				43D989B70A403AAA00E28AA2 /* ossimNitfSymbolHeader.cpp */,
-				43D989B90A403AAA00E28AA2 /* ossimNitfSymbolHeaderV2_0.cpp */,
-				43D989BB0A403AAA00E28AA2 /* ossimNitfTagFactory.cpp */,
-				43D989BD0A403AAA00E28AA2 /* ossimNitfTagFactoryRegistry.cpp */,
-				43D989BF0A403AAA00E28AA2 /* ossimNitfTagInformation.cpp */,
-				43D989C10A403AAA00E28AA2 /* ossimNitfTextHeader.cpp */,
-				43D989C30A403AAA00E28AA2 /* ossimNitfTextHeaderV2_0.cpp */,
-				43D989C50A403AAA00E28AA2 /* ossimNitfUnknownTag.cpp */,
-				43D989C70A403AAA00E28AA2 /* ossimNitfUse00aTag.cpp */,
-				43D989C90A403AAA00E28AA2 /* ossimNitfVqCompressionHeader.cpp */,
-				43D989CB0A403AAA00E28AA2 /* ossimQuickbirdRpcHeader.cpp */,
-				43D989CD0A403AAA00E28AA2 /* ossimQuickbirdTile.cpp */,
-				43D989CF0A403AAA00E28AA2 /* ossimRpfAttributeOffsetRecord.cpp */,
-				43D989D10A403AAA00E28AA2 /* ossimRpfAttributeSectionSubheader.cpp */,
-				43D989D30A403AAA00E28AA2 /* ossimRpfAttributes.cpp */,
-				43D989D50A403AAA00E28AA2 /* ossimRpfBoundaryRectRecord.cpp */,
-				43D989D70A403AAA00E28AA2 /* ossimRpfBoundaryRectSectionSubheader.cpp */,
-				43D989D90A403AAA00E28AA2 /* ossimRpfBoundaryRectTable.cpp */,
-				43D989DB0A403AAA00E28AA2 /* ossimRpfColorConverterOffsetRecord.cpp */,
-				43D989DD0A403AAA00E28AA2 /* ossimRpfColorConverterSubsection.cpp */,
-				43D989DF0A403AAA00E28AA2 /* ossimRpfColorConverterTable.cpp */,
-				43D989E10A403AAA00E28AA2 /* ossimRpfColorGrayscaleOffsetRecord.cpp */,
-				43D989E30A403AAA00E28AA2 /* ossimRpfColorGrayscaleSubheader.cpp */,
-				43D989E50A403AAA00E28AA2 /* ossimRpfColorGrayscaleTable.cpp */,
-				43D989E70A403AAA00E28AA2 /* ossimRpfCompressionLookupOffsetRecord.cpp */,
-				43D989E90A403AAA00E28AA2 /* ossimRpfCompressionSection.cpp */,
-				43D989EB0A403AAA00E28AA2 /* ossimRpfCompressionSectionSubheader.cpp */,
-				43D989ED0A403AAA00E28AA2 /* ossimRpfCoverageSection.cpp */,
-				43D989EF0A403AAA00E28AA2 /* ossimRpfFrame.cpp */,
-				43D989F10A403AAA00E28AA2 /* ossimRpfFrameEntry.cpp */,
-				43D989F30A403AAA00E28AA2 /* ossimRpfFrameFileIndexRecord.cpp */,
-				43D989F50A403AAA00E28AA2 /* ossimRpfFrameFileIndexSectionSubheader.cpp */,
-				43D989F70A403AAA00E28AA2 /* ossimRpfFrameFileIndexSubsection.cpp */,
-				43D989F90A403AAA00E28AA2 /* ossimRpfFrameFileReader.cpp */,
-				43D989FB0A403AAA00E28AA2 /* ossimRpfHeader.cpp */,
-				43D989FD0A403AAA00E28AA2 /* ossimRpfImageDescriptionSubheader.cpp */,
-				43D989FF0A403AAA00E28AA2 /* ossimRpfImageDisplayParameterSubheader.cpp */,
-				43D98A010A403AAA00E28AA2 /* ossimRpfLocationSection.cpp */,
-				43D98A030A403AAA00E28AA2 /* ossimRpfMaskSubheader.cpp */,
-				43D98A050A403AAA00E28AA2 /* ossimRpfMaskSubsection.cpp */,
-				43D98A070A403AAA00E28AA2 /* ossimRpfPathnameRecord.cpp */,
-				43D98A090A403AAA00E28AA2 /* ossimRpfToc.cpp */,
-				43D98A0B0A403AAA00E28AA2 /* ossimRpfTocEntry.cpp */,
-				43D98A0D0A403AAA00E28AA2 /* ossimSpaceImagingGeom.cpp */,
-				43D98A0F0A403AAA00E28AA2 /* ossimSpotDimapSupportData.cpp */,
-				43D98A110A403AAA00E28AA2 /* ossimSrtmFilename.cpp */,
-				43D98A130A403AAA00E28AA2 /* ossimSrtmSupportData.cpp */,
-				43D98A150A403AAA00E28AA2 /* ossimTiffWorld.cpp */,
-			);
-			path = support_data;
-			sourceTree = "<group>";
-		};
-		43D98A170A403AAA00E28AA2 /* vec */ = {
-			isa = PBXGroup;
-			children = (
-				43D98A310A403AAA00E28AA2 /* ossimVpfBoundingRecordTable.cpp */,
-				43D98A330A403AAA00E28AA2 /* ossimVpfCoverage.cpp */,
-				43D98A350A403AAA00E28AA2 /* ossimVpfDatabase.cpp */,
-				43D98A370A403AAA00E28AA2 /* ossimVpfDatabaseHeader.cpp */,
-				43D98A390A403AAA00E28AA2 /* ossimVpfDatabaseHeaderTableValidator.cpp */,
-				43D98A3B0A403AAA00E28AA2 /* ossimVpfExtent.cpp */,
-				43D98A3D0A403AAA00E28AA2 /* ossimVpfFeatureClass.cpp */,
-				43D98A3F0A403AAA00E28AA2 /* ossimVpfFeatureClassSchema.cpp */,
-				43D98A410A403AAA00E28AA2 /* ossimVpfLibrary.cpp */,
-				43D98A430A403AAA00E28AA2 /* ossimVpfLibraryAttributeTableValidator.cpp */,
-				43D98A450A403AAA00E28AA2 /* ossimVpfTable.cpp */,
-			);
-			path = vec;
-			sourceTree = "<group>";
-		};
-		43D98A4B0A403AAA00E28AA2 /* vpfutil */ = {
-			isa = PBXGroup;
-			children = (
-				43D98A650A403AAA00E28AA2 /* bitarray.c */,
-				43D98A670A403AAA00E28AA2 /* distance.c */,
-				43D98A690A403AAA00E28AA2 /* linklist.c */,
-				43D98A6B0A403AAA00E28AA2 /* polygrf.c */,
-				43D98A6D0A403AAA00E28AA2 /* set.c */,
-				43D98A6F0A403AAA00E28AA2 /* vpfclip.c */,
-				43D98A710A403AAA00E28AA2 /* vpfcntnt.c */,
-				43D98A730A403AAA00E28AA2 /* vpfdict.c */,
-				43D98A750A403AAA00E28AA2 /* vpfdisp.c */,
-				43D98A770A403AAA00E28AA2 /* vpfdraw.c */,
-				43D98A790A403AAA00E28AA2 /* vpfmisc.c */,
-				43D98A7B0A403AAA00E28AA2 /* vpfnear.c */,
-				43D98A7D0A403AAA00E28AA2 /* vpfprim.c */,
-				43D98A7F0A403AAA00E28AA2 /* vpfptply.c */,
-				43D98A810A403AAA00E28AA2 /* vpfquery.c */,
-				43D98A830A403AAA00E28AA2 /* vpfread.c */,
-				43D98A850A403AAA00E28AA2 /* vpfrelat.c */,
-				43D98A870A403AAA00E28AA2 /* vpfselec.c */,
-				43D98A890A403AAA00E28AA2 /* vpfspx.c */,
-				43D98A8B0A403AAA00E28AA2 /* vpftable.c */,
-				43D98A8D0A403AAA00E28AA2 /* vpftidx.c */,
-				43D98A8F0A403AAA00E28AA2 /* vpfwrite.c */,
-			);
-			path = vpfutil;
-			sourceTree = "<group>";
-		};
-		43D992CD0A403AD700E28AA2 /* base */ = {
-			isa = PBXGroup;
-			children = (
-				434E65D910D68576005EBB18 /* ossimTimer.h */,
-				43AC3A47108DE1BE00A8DB04 /* ossimImageGeometry.h */,
-				43AC3A48108DE1BE00A8DB04 /* ossimImageGeometryRegistry.h */,
-				43AC3A49108DE1BE00A8DB04 /* ossimImageGeometryFactoryBase.h */,
-				43AC3A4A108DE1BE00A8DB04 /* ossimImageGeometryFactory.h */,
-				43AC3A40108DE19B00A8DB04 /* ossim2dTo2dIdentityTransform.h */,
-				43AC3A41108DE19B00A8DB04 /* ossim2dTo2dTransformFactory.h */,
-				43AC3A42108DE19B00A8DB04 /* ossim2dTo2dTransformFactoryBase.h */,
-				43AC3A43108DE19B00A8DB04 /* ossim2dTo2dTransformRegistry.h */,
-				43AC3A44108DE19B00A8DB04 /* ossim2dBilinearTransform.h */,
-				43AC3A45108DE19B00A8DB04 /* ossim2dTo2dShiftTransform.h */,
-				43AC3A46108DE19B00A8DB04 /* ossimFactoryListInterface.h */,
-				43463AEB0FCEE45E0027D845 /* ossimDuration.h */,
-				433E7D920D327CE800BA05D0 /* ossimFlexLexer.h */,
-				EE056A270CFFA62D005D6F2F /* ossimDatumFactoryInterface.h */,
-				EE056A280CFFA62D005D6F2F /* ossimDatumFactoryRegistry.h */,
-				433786340CBF124D00AE9DCF /* ossimQuaternion.h */,
-				EE8D7CC00C0E5C1400D2C0D1 /* ossimException.h */,
-				EE6F82860BE674C10090E263 /* ossimWms.h */,
-				436061780A821C3C001CD337 /* ossimNotify.h */,
-				43A93B2C0A5024CF00903A9C /* ossimEnvironmentUtility.h */,
-				43D992CF0A403AD700E28AA2 /* datum.h */,
-				43D992D00A403AD700E28AA2 /* ossim2dLinearRegression.h */,
-				43D992D10A403AD700E28AA2 /* ossim2dTo2dTransform.h */,
-				43D992D20A403AD700E28AA2 /* ossimActiveEdgeTable.h */,
-				43D992D30A403AD700E28AA2 /* ossimAdjustableParameterInfo.h */,
-				43D992D40A403AD700E28AA2 /* ossimAdjustableParameterInterface.h */,
-				43D992D50A403AD700E28AA2 /* ossimAdjustmentInfo.h */,
-				43D992D70A403AD700E28AA2 /* ossimAffineTransform.h */,
-				43D992D80A403AD700E28AA2 /* ossimApplicationUsage.h */,
-				43D992D90A403AD700E28AA2 /* ossimArgumentParser.h */,
-				43D992DA0A403AD700E28AA2 /* ossimAxes.h */,
-				43D992DB0A403AD700E28AA2 /* ossimBaseObjectFactory.h */,
-				43D992DC0A403AD700E28AA2 /* ossimBilSplitter.h */,
-				43D992DD0A403AD700E28AA2 /* ossimBooleanProperty.h */,
-				43D992DE0A403AD700E28AA2 /* ossimCmyVector.h */,
-				43D992DF0A403AD700E28AA2 /* ossimColorProperty.h */,
-				43D992E00A403AD700E28AA2 /* ossimColumnVector3d.h */,
-				43D992E10A403AD700E28AA2 /* ossimColumnVector4d.h */,
-				43D992E20A403AD700E28AA2 /* ossimCommon.h */,
-				43D992E30A403AD700E28AA2 /* ossimConnectableContainer.h */,
-				43D992E40A403AD700E28AA2 /* ossimConnectableContainerInterface.h */,
-				43D992E50A403AD700E28AA2 /* ossimConnectableDisplayListener.h */,
-				43D992E60A403AD700E28AA2 /* ossimConnectableObject.h */,
-				43D992E70A403AD700E28AA2 /* ossimConnectableObjectListener.h */,
-				43D992E80A403AD700E28AA2 /* ossimConnectionEvent.h */,
-				43D992E90A403AD700E28AA2 /* ossimConstants.h */,
-				43D992EA0A403AD700E28AA2 /* ossimContainerEvent.h */,
-				43D992EB0A403AD700E28AA2 /* ossimContainerProperty.h */,
-				43D992EC0A403AD700E28AA2 /* ossimCplUtil.h */,
-				43D992ED0A403AD700E28AA2 /* ossimCustomEditorWindow.h */,
-				43D992EE0A403AD700E28AA2 /* ossimCustomEditorWindowFactoryBase.h */,
-				43D992EF0A403AD700E28AA2 /* ossimCustomEditorWindowRegistry.h */,
-				43D992F00A403AD700E28AA2 /* ossimDataObject.h */,
-				43D992F10A403AD700E28AA2 /* ossimDate.h */,
-				43D992F20A403AD700E28AA2 /* ossimDateProperty.h */,
-				43D992F30A403AD700E28AA2 /* ossimDatum.h */,
-				43D992F40A403AD700E28AA2 /* ossimDatumFactory.h */,
-				43D992F50A403AD700E28AA2 /* ossimDblGrid.h */,
-				43D992F60A403AD700E28AA2 /* ossimDirectory.h */,
-				43D992F70A403AD700E28AA2 /* ossimDirectoryData.h */,
-				43D992F80A403AD700E28AA2 /* ossimDirectoryTree.h */,
-				43D992F90A403AD700E28AA2 /* ossimDisplayEventListener.h */,
-				43D992FA0A403AD700E28AA2 /* ossimDisplayInterface.h */,
-				43D992FB0A403AD700E28AA2 /* ossimDisplayListEvent.h */,
-				43D992FC0A403AD700E28AA2 /* ossimDisplayRefreshEvent.h */,
-				43D992FD0A403AD700E28AA2 /* ossimDms.h */,
-				43D992FE0A403AD700E28AA2 /* ossimDoubleGridProperty.h */,
-				43D992FF0A403AD700E28AA2 /* ossimDpt.h */,
-				43D993000A403AD700E28AA2 /* ossimDpt3d.h */,
-				43D993010A403AD700E28AA2 /* ossimDrect.h */,
-				43D993020A403AD700E28AA2 /* ossimEbcdicToAscii.h */,
-				43D993030A403AD700E28AA2 /* ossimEcefPoint.h */,
-				43D993040A403AD700E28AA2 /* ossimEcefRay.h */,
-				43D993050A403AD700E28AA2 /* ossimEcefVector.h */,
-				43D993060A403AD700E28AA2 /* ossimElevationManagerEvent.h */,
-				43D993070A403AD700E28AA2 /* ossimElevationManagerEventListener.h */,
-				43D993080A403AD700E28AA2 /* ossimEllipsoid.h */,
-				43D993090A403AD700E28AA2 /* ossimEllipsoidFactory.h */,
-				43D9930A0A403AD700E28AA2 /* ossimEndian.h */,
-				43D9930B0A403AD700E28AA2 /* ossimEquTokenDefines.h */,
-				43D9930C0A403AD700E28AA2 /* ossimEquTokenizer.h */,
-				43D9930D0A403AD700E28AA2 /* ossimErrorCodes.h */,
-				43D9930E0A403AD700E28AA2 /* ossimErrorContext.h */,
-				43D9930F0A403AD700E28AA2 /* ossimErrorStatusInterface.h */,
-				43D993100A403AD700E28AA2 /* ossimEvent.h */,
-				43D993110A403AD700E28AA2 /* ossimEventIds.h */,
-				43D993120A403AD700E28AA2 /* ossimFactoryBaseTemplate.h */,
-				43D993130A403AD700E28AA2 /* ossimFilename.h */,
-				43D993140A403AD700E28AA2 /* ossimFilenameProperty.h */,
-				43D993150A403AD700E28AA2 /* ossimFontInformation.h */,
-				43D993160A403AD700E28AA2 /* ossimFontProperty.h */,
-				43D993170A403AD700E28AA2 /* ossimFpt.h */,
-				43D993180A403AD700E28AA2 /* ossimFpt3d.h */,
-				43D993190A403AD700E28AA2 /* ossimGeoPolygon.h */,
-				43D9931A0A403AD700E28AA2 /* ossimGeoTiffCoordTransformsLut.h */,
-				43D9931B0A403AD700E28AA2 /* ossimGeoTiffDatumLut.h */,
-				43D9931C0A403AD700E28AA2 /* ossimGeocent.h */,
-				43D9931D0A403AD700E28AA2 /* ossimGeoid.h */,
-				43D9931E0A403AD700E28AA2 /* ossimGeoidEgm96.h */,
-				43D9931F0A403AD700E28AA2 /* ossimGeoidManager.h */,
-				43D993200A403AD700E28AA2 /* ossimGeoidNgs.h */,
-				43D993210A403AD700E28AA2 /* ossimGeoidNgsHeader.h */,
-				43D993220A403AD700E28AA2 /* ossimGeoref.h */,
-				43D993230A403AD700E28AA2 /* ossimGpt.h */,
-				43D993240A403AD700E28AA2 /* ossimGrect.h */,
-				43D993250A403AD700E28AA2 /* ossimGzStream.h */,
-				43D993260A403AD700E28AA2 /* ossimHexString.h */,
-				43D993270A403AD700E28AA2 /* ossimHistogram.h */,
-				43D993280A403AD700E28AA2 /* ossimHistogramSource.h */,
-				43D993290A403AD700E28AA2 /* ossimHsiVector.h */,
-				43D9932A0A403AD700E28AA2 /* ossimHsvVector.h */,
-				43D9932B0A403AD700E28AA2 /* ossimId.h */,
-				43D9932C0A403AD700E28AA2 /* ossimIdManager.h */,
-				43D9932D0A403AD700E28AA2 /* ossimImageAoiListener.h */,
-				43D9932E0A403AD700E28AA2 /* ossimImageGeometryEvent.h */,
-				43D9932F0A403AD700E28AA2 /* ossimImageGeometryEventListener.h */,
-				43D993300A403AD700E28AA2 /* ossimImagePolygonEvent.h */,
-				43D993310A403AD700E28AA2 /* ossimImageRectangleEvent.h */,
-				43D993320A403AD700E28AA2 /* ossimImageTypeLut.h */,
-				43D993330A403AD700E28AA2 /* ossimInterleaveTypeLut.h */,
-				43D993340A403AD700E28AA2 /* ossimIoStream.h */,
-				43D993350A403AD700E28AA2 /* ossimIpt.h */,
-				43D993360A403AD700E28AA2 /* ossimIrect.h */,
-				43D993370A403AD700E28AA2 /* ossimJpegYCbCrVector.h */,
-				43D993380A403AD700E28AA2 /* ossimKeyword.h */,
-				43D993390A403AD700E28AA2 /* ossimKeywordNames.h */,
-				43D9933A0A403AD700E28AA2 /* ossimKeywordlist.h */,
-				43D9933B0A403AD700E28AA2 /* ossimLeastSquaresBilin.h */,
-				43D9933C0A403AD700E28AA2 /* ossimLine.h */,
-				43D9933D0A403AD700E28AA2 /* ossimListener.h */,
-				43D9933E0A403AD700E28AA2 /* ossimListenerManager.h */,
-				43D9933F0A403AD700E28AA2 /* ossimLookUpTable.h */,
-				43D993400A403AD700E28AA2 /* ossimLsrPoint.h */,
-				43D993410A403AD700E28AA2 /* ossimLsrRay.h */,
-				43D993420A403AD700E28AA2 /* ossimLsrSpace.h */,
-				43D993430A403AD700E28AA2 /* ossimLsrVector.h */,
-				43D993440A403AD700E28AA2 /* ossimMatrix3x3.h */,
-				43D993450A403AD700E28AA2 /* ossimMatrix4x4.h */,
-				43D993460A403AD700E28AA2 /* ossimMatrixProperty.h */,
-				43D993470A403AD700E28AA2 /* ossimMouseEvent.h */,
-				43D993480A403AD700E28AA2 /* ossimMouseListener.h */,
-				43D993490A403AD700E28AA2 /* ossimMultiBandHistogram.h */,
-				43D9934A0A403AD700E28AA2 /* ossimMultiResLevelHistogram.h */,
-				43D9934C0A403AD700E28AA2 /* ossimNBandLutDataObject.h */,
-				43D9934D0A403AD700E28AA2 /* ossimNadconGridDatum.h */,
-				43D9934E0A403AD700E28AA2 /* ossimNadconGridFile.h */,
-				43D9934F0A403AD700E28AA2 /* ossimNadconGridHeader.h */,
-				43D993500A403AD700E28AA2 /* ossimNadconNarDatum.h */,
-				43D993510A403AD700E28AA2 /* ossimNadconNasDatum.h */,
-				43D993520A403AD700E28AA2 /* ossimNormRgbVector.h */,
-				43D993530A403AD700E28AA2 /* ossimNotifyContext.h */,
-				43D993540A403AD700E28AA2 /* ossimNumericProperty.h */,
-				43D993550A403AD700E28AA2 /* ossimObject.h */,
-				43D993560A403AD700E28AA2 /* ossimObjectDestructingEvent.h */,
-				43D993570A403AD700E28AA2 /* ossimObjectEvents.h */,
-				43D993580A403AD700E28AA2 /* ossimObjectFactory.h */,
-				43D993590A403AD700E28AA2 /* ossimObjectFactoryRegistry.h */,
-				43D9935A0A403AD700E28AA2 /* ossimOutputSource.h */,
-				43D9935B0A403AD700E28AA2 /* ossimPackedBits.h */,
-				43D9935C0A403AD700E28AA2 /* ossimPointHash.h */,
-				43D9935D0A403AD700E28AA2 /* ossimPolyArea2d.h */,
-				43D9935E0A403AD700E28AA2 /* ossimPolyLine.h */,
-				43D9935F0A403AD700E28AA2 /* ossimPolygon.h */,
-				43D993600A403AD700E28AA2 /* ossimPolynom.h */,
-				43D993610A403AD700E28AA2 /* ossimPool.h */,
-				43D993620A403AD700E28AA2 /* ossimPoolObject.h */,
-				43D993630A403AD700E28AA2 /* ossimPreferences.h */,
-				43D993640A403AD700E28AA2 /* ossimProcessInterface.h */,
-				43D993650A403AD700E28AA2 /* ossimProcessListener.h */,
-				43D993660A403AD700E28AA2 /* ossimProcessProgressEvent.h */,
-				43D993670A403AD700E28AA2 /* ossimProperty.h */,
-				43D993680A403AD700E28AA2 /* ossimPropertyEvent.h */,
-				43D993690A403AD700E28AA2 /* ossimPropertyInterface.h */,
-				43D9936A0A403AD700E28AA2 /* ossimPropertyInterfaceFactory.h */,
-				43D9936B0A403AD700E28AA2 /* ossimPropertyInterfaceRegistry.h */,
-				43D9936C0A403AD700E28AA2 /* ossimProtocolStream.h */,
-				43D9936D0A403AD700E28AA2 /* ossimQuadTreeWarp.h */,
-				43D9936E0A403AD700E28AA2 /* ossimQuadrilateralMap.h */,
-				43D9936F0A403AD700E28AA2 /* ossimROIEvent.h */,
-				43D993700A403AD700E28AA2 /* ossimROIEventListener.h */,
-				43D993710A403AD700E28AA2 /* ossimRationalNumber.h */,
-				43D993720A403AD700E28AA2 /* ossimRectanglePartitioner.h */,
-				43D993730A403AD700E28AA2 /* ossimRectilinearDataObject.h */,
-				43D993740A403AD700E28AA2 /* ossimRefPtr.h */,
-				43D993750A403AD700E28AA2 /* ossimReferenced.h */,
-				43D993760A403AD700E28AA2 /* ossimRefreshEvent.h */,
-				43D993770A403AD700E28AA2 /* ossimRegExp.h */,
-				43D993780A403AD700E28AA2 /* ossimRgbLutDataObject.h */,
-				43D993790A403AD700E28AA2 /* ossimRgbVector.h */,
-				43D9937A0A403AD700E28AA2 /* ossimRtti.h */,
-				43D9937B0A403AD700E28AA2 /* ossimScalarTypeLut.h */,
-				43D9937D0A403AD700E28AA2 /* ossimSevenParamDatum.h */,
-				43D9937E0A403AD700E28AA2 /* ossimSource.h */,
-				43D9937F0A403AD700E28AA2 /* ossimStateChangedEvent.h */,
-				43D993800A403AD700E28AA2 /* ossimStdOutProgress.h */,
-				43D993810A403AD700E28AA2 /* ossimStreamBase.h */,
-				43D993820A403AD700E28AA2 /* ossimStreamFactory.h */,
-				43D993830A403AD700E28AA2 /* ossimStreamFactoryBase.h */,
-				43D993840A403AD700E28AA2 /* ossimStreamFactoryRegistry.h */,
-				43D993850A403AD700E28AA2 /* ossimString.h */,
-				43D993860A403AD700E28AA2 /* ossimStringListProperty.h */,
-				43D993870A403AD700E28AA2 /* ossimStringProperty.h */,
-				43D993880A403AD700E28AA2 /* ossimTDpt.h */,
-				43D993890A403AD700E28AA2 /* ossimTempFilename.h */,
-				43D9938A0A403AD700E28AA2 /* ossimTextProperty.h */,
-				43D9938B0A403AD700E28AA2 /* ossimThreeParamDatum.h */,
-				43D9938C0A403AD700E28AA2 /* ossimTieGpt.h */,
-				43D9938D0A403AD700E28AA2 /* ossimTieGptSet.h */,
-				43D9938E0A403AD700E28AA2 /* ossimTileHash.h */,
-				43D9938F0A403AD700E28AA2 /* ossimTiledImageHash.h */,
-				43D993900A403AD700E28AA2 /* ossimTrace.h */,
-				43D993910A403AD700E28AA2 /* ossimTraceManager.h */,
-				43D993920A403AD700E28AA2 /* ossimUnitConversionTool.h */,
-				43D993930A403AD700E28AA2 /* ossimUnitTypeLut.h */,
-				43D993940A403AD700E28AA2 /* ossimUsgsQuad.h */,
-				43D993950A403AD700E28AA2 /* ossimViewController.h */,
-				43D993960A403AD700E28AA2 /* ossimViewEvent.h */,
-				43D993970A403AD700E28AA2 /* ossimViewInterface.h */,
-				43D993980A403AD700E28AA2 /* ossimViewListener.h */,
-				43D993990A403AD700E28AA2 /* ossimVrect.h */,
-				43D9939A0A403AD700E28AA2 /* ossimWgs72Datum.h */,
-				43D9939B0A403AD700E28AA2 /* ossimWgs84Datum.h */,
-				43D9939C0A403AD700E28AA2 /* ossimXmlAttribute.h */,
-				43D9939D0A403AD700E28AA2 /* ossimXmlDocument.h */,
-				43D9939E0A403AD700E28AA2 /* ossimXmlNode.h */,
-				43D9939F0A403AD700E28AA2 /* ossimXmlString.h */,
-				43A114A10D5254C600DE3CF3 /* ossimCsvFile.h */,
-			);
-			name = base;
-			path = ../../include/ossim/base;
-			sourceTree = "<group>";
-		};
-		43D993A00A403AD700E28AA2 /* elevation */ = {
-			isa = PBXGroup;
-			children = (
-				434E718B10DA7D43005EBB18 /* ossimGeneralRasterElevationDatabase.h */,
-				434E707310DA60EB005EBB18 /* ossimSrtmElevationDatabase.h */,
-				434E6BAF10D81515005EBB18 /* ossimElevationDatabaseFactory.h */,
-				434E6BAB10D813D0005EBB18 /* ossimElevationDatabaseFactoryBase.h */,
-				434E6BA310D8127E005EBB18 /* ossimElevationDatabaseRegistry.h */,
-				434E668E10D6CBDF005EBB18 /* ossimDtedElevationDatabase.h */,
-				434E668D10D6C9DC005EBB18 /* ossimElevationDatabase.h */,
-				EE3F66F30AF7D91A000507C9 /* ossimHgtRef.h */,
-				43D993A10A403AD700E28AA2 /* ossimDtedFactory.h */,
-				43D993A20A403AD700E28AA2 /* ossimDtedHandler.h */,
-				43D993A30A403AD700E28AA2 /* ossimElevCellHandler.h */,
-				43D993A40A403AD700E28AA2 /* ossimElevCellHandlerFactory.h */,
-				43D993A50A403AD700E28AA2 /* ossimElevLess.h */,
-				43D993A60A403AD700E28AA2 /* ossimElevManager.h */,
-				43D993A70A403AD700E28AA2 /* ossimElevSource.h */,
-				43D993A80A403AD700E28AA2 /* ossimElevSourceFactory.h */,
-				43D993AA0A403AD700E28AA2 /* ossimGeneralRasterElevFactory.h */,
-				43D993AB0A403AD700E28AA2 /* ossimGeneralRasterElevHandler.h */,
-				43D993AC0A403AD700E28AA2 /* ossimSrtmFactory.h */,
-				43D993AD0A403AD700E28AA2 /* ossimSrtmHandler.h */,
-			);
-			name = elevation;
-			path = ../../include/ossim/elevation;
-			sourceTree = "<group>";
-		};
-		43D993AE0A403AD700E28AA2 /* font */ = {
-			isa = PBXGroup;
-			children = (
-				43D993AF0A403AD700E28AA2 /* ossimFont.h */,
-				43D993B00A403AD700E28AA2 /* ossimFontFactoryBase.h */,
-				43D993B10A403AD700E28AA2 /* ossimFontFactoryRegistry.h */,
-				43D993B20A403AD800E28AA2 /* ossimFreeTypeFont.h */,
-				43D993B30A403AD800E28AA2 /* ossimFreeTypeFontFactory.h */,
-				43D993B40A403AD800E28AA2 /* ossimGdBitmapFont.h */,
-			);
-			name = font;
-			path = ../../include/ossim/font;
-			sourceTree = "<group>";
-		};
-		43D993B60A403AD800E28AA2 /* imaging */ = {
-			isa = PBXGroup;
-			children = (
-				4369F74F112047FA002FA4B7 /* ossimSingleImageChain.h */,
-				434E648F10D2C020005EBB18 /* ossimVirtualOverviewBuilder.h */,
-				438DF2D610B61F9300502C71 /* ossimNullPixelFlip.h */,
-				43D9C426109F448F00BA9119 /* ossimVirtualOverviewBuilder.h */,
-				43D9C427109F448F00BA9119 /* ossimVirtualImageWriter.h */,
-				43D9C429109F448F00BA9119 /* ossimVirtualImageHandler.h */,
-				4347EE941084EEDC006E88F6 /* ossimNitfWriterBase.h */,
-				43EDA3DB107247EA007D1913 /* ossimNormalizedS16RemapTable.h */,
-				43E215640E91136E00D67CB8 /* ossimNitf20Writer.h */,
-				EE7B58E30E3DEBE00039A805 /* ossimTwoColorView.h */,
-				EEDECA720E36721400F52278 /* ossimImageModel.h */,
-				43B7FB950D8EDAD5009169CC /* ossimOverviewBuilderFactoryRegistry.h */,
-				43B7FB960D8EDAD5009169CC /* ossimOverviewBuilderFactoryBase.h */,
-				43B7FB970D8EDAD5009169CC /* ossimOverviewBuilderFactory.h */,
-				43B7FB980D8EDAD5009169CC /* ossimOverviewBuilderBase.h */,
-				EE592C1A0BF3F89F00E4B15C /* ossimJpegMemSrc.h */,
-				EE72062A0B64F6BF00DE8AE9 /* ossimERSFileWriter.h */,
-				432D60690B4AAE2F004E059E /* ossimOverviewSequencer.h */,
-				436E916A0AC2F3B00051AEC2 /* ossimMemoryImageSource.h */,
-				43D993BC0A403AD800E28AA2 /* ossim3x3ConvolutionFilter.h */,
-				43D993BD0A403AD800E28AA2 /* ossimAOD.h */,
-				43D993BE0A403AD800E28AA2 /* ossimAdrgHeader.h */,
-				43D993BF0A403AD800E28AA2 /* ossimAdrgTileSource.h */,
-				43D993C00A403AD800E28AA2 /* ossimAnnotationEllipseObject.h */,
-				43D993C10A403AD800E28AA2 /* ossimAnnotationFontObject.h */,
-				43D993C20A403AD800E28AA2 /* ossimAnnotationGdBitmapFont.h */,
-				43D993C30A403AD800E28AA2 /* ossimAnnotationLineObject.h */,
-				43D993C40A403AD800E28AA2 /* ossimAnnotationMapGridSource.h */,
-				43D993C50A403AD800E28AA2 /* ossimAnnotationMultiEllipseObject.h */,
-				43D993C60A403AD800E28AA2 /* ossimAnnotationMultiLineObject.h */,
-				43D993C70A403AD800E28AA2 /* ossimAnnotationMultiPolyLineObject.h */,
-				43D993C80A403AD800E28AA2 /* ossimAnnotationMultiPolyObject.h */,
-				43D993C90A403AD800E28AA2 /* ossimAnnotationObject.h */,
-				43D993CA0A403AD800E28AA2 /* ossimAnnotationObjectFactory.h */,
-				43D993CB0A403AD800E28AA2 /* ossimAnnotationPolyObject.h */,
-				43D993CC0A403AD800E28AA2 /* ossimAnnotationSource.h */,
-				43D993CD0A403AD800E28AA2 /* ossimAppFixedTileCache.h */,
-				43D993CE0A403AD800E28AA2 /* ossimAppTileCache.h */,
-				43D993CF0A403AD800E28AA2 /* ossimArcInfoGridWriter.h */,
-				43D993D00A403AD800E28AA2 /* ossimAtCorrGridRemapper.h */,
-				43D993D10A403AD800E28AA2 /* ossimAtCorrKeywords.h */,
-				43D993D20A403AD800E28AA2 /* ossimAtCorrRemapper.h */,
-				43D993D30A403AD800E28AA2 /* ossimAtbController.h */,
-				43D993D40A403AD800E28AA2 /* ossimAtbMatchPoint.h */,
-				43D993D50A403AD800E28AA2 /* ossimAtbPointSource.h */,
-				43D993D60A403AD800E28AA2 /* ossimBandAverageFilter.h */,
-				43D993D70A403AD800E28AA2 /* ossimBandClipFilter.h */,
-				43D993D80A403AD800E28AA2 /* ossimBandMergeSource.h */,
-				43D993D90A403AD800E28AA2 /* ossimBandSelector.h */,
-				43D993DA0A403AD800E28AA2 /* ossimBlendMosaic.h */,
-				43D993DB0A403AD800E28AA2 /* ossimBrightnessContrastSource.h */,
-				43D993DC0A403AD800E28AA2 /* ossimBrightnessMatch.h */,
-				43D993DD0A403AD800E28AA2 /* ossimBumpShadeTileSource.h */,
-				43D993DE0A403AD800E28AA2 /* ossimCacheTileSource.h */,
-				43D993DF0A403AD800E28AA2 /* ossimCastTileSourceFilter.h */,
-				43D993E00A403AD800E28AA2 /* ossimCcfHead.h */,
-				43D993E10A403AD800E28AA2 /* ossimCcfTileSource.h */,
-				43D993E20A403AD800E28AA2 /* ossimCibCadrgTileSource.h */,
-				43D993E30A403AD800E28AA2 /* ossimClosestToCenterCombiner.h */,
-				43D993E40A403AD800E28AA2 /* ossimColorNormalizedFusion.h */,
-				43D993E50A403AD800E28AA2 /* ossimConvolutionFilter1D.h */,
-				43D993E60A403AD800E28AA2 /* ossimConvolutionSource.h */,
-				43D993E70A403AD800E28AA2 /* ossimDiscrete3x3HatFilter.h */,
-				43D993E80A403AD800E28AA2 /* ossimDiscreteConvolutionKernel.h */,
-				43D993E90A403AD800E28AA2 /* ossimDiscreteNearestNeighbor.h */,
-				43D993EA0A403AD800E28AA2 /* ossimDoqqTileSource.h */,
-				43D993EB0A403AD800E28AA2 /* ossimDtedElevationImageSource.h */,
-				43D993EC0A403AD800E28AA2 /* ossimDtedTileSource.h */,
-				43D993ED0A403AD800E28AA2 /* ossimERSTileSource.h */,
-				43D993EE0A403AD800E28AA2 /* ossimEastingNorthingCutter.h */,
-				43D993EF0A403AD800E28AA2 /* ossimEdgeFilter.h */,
-				43D993F00A403AD800E28AA2 /* ossimElevImageSource.h */,
-				43D993F10A403AD800E28AA2 /* ossimEnviHeaderFileWriter.h */,
-				43D993F20A403AD800E28AA2 /* ossimEquationCombiner.h */,
-				43D993F50A403AD800E28AA2 /* ossimFeatherMosaic.h */,
-				43D993F60A403AD800E28AA2 /* ossimFftFilter.h */,
-				43D993F70A403AD800E28AA2 /* ossimFgdcFileWriter.h */,
-				43D993F80A403AD800E28AA2 /* ossimFilter.h */,
-				43D993F90A403AD800E28AA2 /* ossimFilterResampler.h */,
-				43D993FA0A403AD800E28AA2 /* ossimFilterTable.h */,
-				43D993FB0A403AD800E28AA2 /* ossimFixedTileCache.h */,
-				43D993FC0A403AD800E28AA2 /* ossimFusionCombiner.h */,
-				43D993FD0A403AD800E28AA2 /* ossimGammaRemapper.h */,
-				43D993FE0A403AD800E28AA2 /* ossimGdFont.h */,
-				43D993FF0A403AD800E28AA2 /* ossimGdFontExterns.h */,
-				43D994000A403AD800E28AA2 /* ossimGeneralRasterInfo.h */,
-				43D994010A403AD800E28AA2 /* ossimGeneralRasterTileSource.h */,
-				43D994020A403AD800E28AA2 /* ossimGeneralRasterWriter.h */,
-				43D994030A403AD800E28AA2 /* ossimGeoAnnotationBitmap.h */,
-				43D994040A403AD800E28AA2 /* ossimGeoAnnotationEllipseObject.h */,
-				43D994050A403AD800E28AA2 /* ossimGeoAnnotationFontObject.h */,
-				43D994060A403AD800E28AA2 /* ossimGeoAnnotationGdBitmapFont.h */,
-				43D994070A403AD800E28AA2 /* ossimGeoAnnotationLineObject.h */,
-				43D994080A403AD800E28AA2 /* ossimGeoAnnotationMultiEllipseObject.h */,
-				43D994090A403AD800E28AA2 /* ossimGeoAnnotationMultiPolyLineObject.h */,
-				43D9940A0A403AD800E28AA2 /* ossimGeoAnnotationMultiPolyObject.h */,
-				43D9940B0A403AD800E28AA2 /* ossimGeoAnnotationObject.h */,
-				43D9940C0A403AD800E28AA2 /* ossimGeoAnnotationPolyLineObject.h */,
-				43D9940D0A403AD800E28AA2 /* ossimGeoAnnotationPolyObject.h */,
-				43D9940E0A403AD800E28AA2 /* ossimGeoAnnotationSource.h */,
-				43D9940F0A403AD800E28AA2 /* ossimGeoPolyCutter.h */,
-				43D994100A403AD800E28AA2 /* ossimGeographicAnnotationGrid.h */,
-				43D994110A403AD800E28AA2 /* ossimGeomFileWriter.h */,
-				43D994120A403AD800E28AA2 /* ossimGridRemapEngine.h */,
-				43D994130A403AD800E28AA2 /* ossimGridRemapEngineFactory.h */,
-				43D994140A403AD800E28AA2 /* ossimGridRemapSource.h */,
-				43D994150A403AD800E28AA2 /* ossimHistoMatchRemapper.h */,
-				43D994160A403AD800E28AA2 /* ossimHistogramEqualization.h */,
-				43D994170A403AD800E28AA2 /* ossimHistogramMatchFilter.h */,
-				43D994180A403AD800E28AA2 /* ossimHistogramRemapper.h */,
-				43D994190A403AD800E28AA2 /* ossimHistogramThreshholdFilter.h */,
-				43D9941A0A403AD800E28AA2 /* ossimHistogramWriter.h */,
-				43D9941B0A403AD800E28AA2 /* ossimHsiRemapper.h */,
-				43D9941C0A403AD800E28AA2 /* ossimHsiToRgbSource.h */,
-				43D9941D0A403AD800E28AA2 /* ossimHsvGridRemapEngine.h */,
-				43D9941E0A403AD800E28AA2 /* ossimHsvToRgbSource.h */,
-				43D9941F0A403AD800E28AA2 /* ossimIgenGenerator.h */,
-				43D994200A403AD800E28AA2 /* ossimImageChain.h */,
-				43D994210A403AD800E28AA2 /* ossimImageCombiner.h */,
-				43D994220A403AD800E28AA2 /* ossimImageData.h */,
-				43D994230A403AD800E28AA2 /* ossimImageDataFactory.h */,
-				43D994240A403AD800E28AA2 /* ossimImageDataHelper.h */,
-				43D994250A403AD800E28AA2 /* ossimImageDisplayWriter.h */,
-				43D994260A403AD800E28AA2 /* ossimImageFileWriter.h */,
-				43D994270A403AD800E28AA2 /* ossimImageGaussianFilter.h */,
-				43D994280A403AD800E28AA2 /* ossimImageHandler.h */,
-				43D994290A403AD800E28AA2 /* ossimImageHandlerFactory.h */,
-				43D9942A0A403AD800E28AA2 /* ossimImageHandlerFactoryBase.h */,
-				43D9942B0A403AD800E28AA2 /* ossimImageHandlerRegistry.h */,
-				43D9942C0A403AD800E28AA2 /* ossimImageHistogramSource.h */,
-				43D9942D0A403AD800E28AA2 /* ossimImageMetaData.h */,
-				43D9942E0A403AD800E28AA2 /* ossimImageMetaDataWriterFactory.h */,
-				43D9942F0A403AD800E28AA2 /* ossimImageMetaDataWriterFactoryBase.h */,
-				43D994300A403AD800E28AA2 /* ossimImageMetaDataWriterRegistry.h */,
-				43D994310A403AD800E28AA2 /* ossimImageMosaic.h */,
-				43D994320A403AD800E28AA2 /* ossimImageReconstructionFilterFactory.h */,
-				43D994330A403AD800E28AA2 /* ossimImageReconstructionFilterRegistry.h */,
-				43D994340A403AD800E28AA2 /* ossimImageRenderer.h */,
-				43D994360A403AD800E28AA2 /* ossimImageSharpenFilter.h */,
-				43D994370A403AD800E28AA2 /* ossimImageSource.h */,
-				43D994380A403AD800E28AA2 /* ossimImageSourceFactory.h */,
-				43D994390A403AD800E28AA2 /* ossimImageSourceFactoryBase.h */,
-				43D9943A0A403AD800E28AA2 /* ossimImageSourceFactoryRegistry.h */,
-				43D9943B0A403AD800E28AA2 /* ossimImageSourceFilter.h */,
-				43D9943C0A403AD800E28AA2 /* ossimImageSourceHistogramFilter.h */,
-				43D9943E0A403AD800E28AA2 /* ossimImageSourceSequencer.h */,
-				43D9943F0A403AD800E28AA2 /* ossimImageStatisticsSource.h */,
-				43D994400A403AD800E28AA2 /* ossimImageToPlaneNormalFilter.h */,
-				43D994410A403AD800E28AA2 /* ossimImageWriter.h */,
-				43D994420A403AD800E28AA2 /* ossimImageWriterFactory.h */,
-				43D994430A403AD800E28AA2 /* ossimImageWriterFactoryBase.h */,
-				43D994440A403AD800E28AA2 /* ossimImageWriterFactoryRegistry.h */,
-				43D994450A403AD800E28AA2 /* ossimIndexToRgbLutFilter.h */,
-				43D994460A403AD800E28AA2 /* ossimIntensityAdjustmentFilter.h */,
-				43D994470A403AD800E28AA2 /* ossimIso8211.h */,
-				43D994480A403AD800E28AA2 /* ossimJpegTileSource.h */,
-				43D994490A403AD800E28AA2 /* ossimJpegWriter.h */,
-				43D9944A0A403AD800E28AA2 /* ossimJpegYCbCrToRgbSource.h */,
-				43D9944B0A403AD800E28AA2 /* ossimLandsatTileSource.h */,
-				43D9944C0A403AD800E28AA2 /* ossimLandsatTopoCorrectionFilter.h */,
-				43D9944D0A403AD800E28AA2 /* ossimLocalCorrelationFusion.h */,
-				43D9944E0A403AD800E28AA2 /* ossimMapCompositionSource.h */,
-				43D9944F0A403AD800E28AA2 /* ossimMaskFilter.h */,
-				43D994500A403AD800E28AA2 /* ossimMaxMosaic.h */,
-				43D994510A403AD800E28AA2 /* ossimMeanMedianFilter.h */,
-				43D994520A403AD800E28AA2 /* ossimMetadataFileWriter.h */,
-				43D994530A403AD800E28AA2 /* ossimMonoGridRemapEngine.h */,
-				43D994540A403AD800E28AA2 /* ossimMultiBandHistogramTileSource.h */,
-				43D994550A403AD800E28AA2 /* ossimNBandToIndexFilter.h */,
-				43D994560A403AD800E28AA2 /* ossimNitfTileSource.h */,
-				43D994570A403AD800E28AA2 /* ossimNitfWriter.h */,
-				43D994580A403AD800E28AA2 /* ossimNormalizedRemapTable.h */,
-				43D994590A403AD800E28AA2 /* ossimNormalizedU11RemapTable.h */,
-				43D9945A0A403AD800E28AA2 /* ossimNormalizedU16RemapTable.h */,
-				43D9945B0A403AD800E28AA2 /* ossimNormalizedU8RemapTable.h */,
-				43D9945C0A403AD800E28AA2 /* ossimOrthoImageMosaic.h */,
-				43D9945D0A403AD800E28AA2 /* ossimPixelFlipper.h */,
-				43D9945E0A403AD800E28AA2 /* ossimPolyCutter.h */,
-				43D9945F0A403AD800E28AA2 /* ossimQuickbirdNitfTileSource.h */,
-				43D994600A403AD800E28AA2 /* ossimQuickbirdTiffTileSource.h */,
-				43D994610A403AD800E28AA2 /* ossimRLevelFilter.h */,
-				43D994620A403AD800E28AA2 /* ossimReadmeFileWriter.h */,
-				43D994630A403AD800E28AA2 /* ossimRectangleCutFilter.h */,
-				43D994640A403AD800E28AA2 /* ossimResampler.h */,
-				43D994650A403AD800E28AA2 /* ossimRgbGridRemapEngine.h */,
-				43D994660A403AD800E28AA2 /* ossimRgbImage.h */,
-				43D994670A403AD800E28AA2 /* ossimRgbToGreyFilter.h */,
-				43D994680A403AD800E28AA2 /* ossimRgbToHsiSource.h */,
-				43D994690A403AD800E28AA2 /* ossimRgbToHsvSource.h */,
-				43D9946A0A403AD800E28AA2 /* ossimRgbToIndexFilter.h */,
-				43D9946B0A403AD800E28AA2 /* ossimRgbToJpegYCbCrSource.h */,
-				43D9946C0A403AD800E28AA2 /* ossimS16ImageData.h */,
-				43D9946D0A403AD800E28AA2 /* ossimSFIMFusion.h */,
-				43D9946E0A403AD800E28AA2 /* ossimScalarRemapper.h */,
-				43D9946F0A403AD800E28AA2 /* ossimScaleFilter.h */,
-				43D994700A403AD800E28AA2 /* ossimSrtmTileSource.h */,
-				43D994710A403AD800E28AA2 /* ossimSubImageTileSource.h */,
-				43D994720A403AD800E28AA2 /* ossimTableRemapper.h */,
-				43D994730A403AD800E28AA2 /* ossimTiffOverviewBuilder.h */,
-				43D994740A403AD800E28AA2 /* ossimTiffTileSource.h */,
-				43D994750A403AD800E28AA2 /* ossimTiffWriter.h */,
-				43D994760A403AD800E28AA2 /* ossimTileCache.h */,
-				43D994770A403AD800E28AA2 /* ossimTilePatch.h */,
-				43D994780A403AD800E28AA2 /* ossimTiling.h */,
-				43D994790A403AD800E28AA2 /* ossimTopographicCorrectionFilter.h */,
-				43D9947A0A403AD800E28AA2 /* ossimTrimFilter.h */,
-				43D9947B0A403AD800E28AA2 /* ossimU11ImageData.h */,
-				43D9947C0A403AD800E28AA2 /* ossimU16ImageData.h */,
-				43D9947D0A403AD800E28AA2 /* ossimU8ImageData.h */,
-				43D9947E0A403AD800E28AA2 /* ossimUsgsDemTileSource.h */,
-				43D9947F0A403AD800E28AA2 /* ossimValueAssignImageSourceFilter.h */,
-				43D994800A403AD800E28AA2 /* ossimVectorRenderer.h */,
-				43D994810A403AD800E28AA2 /* ossimVertexExtractor.h */,
-				43D994820A403AD800E28AA2 /* ossimVpfAnnotationCoverageInfo.h */,
-				43D994830A403AD800E28AA2 /* ossimVpfAnnotationFeatureInfo.h */,
-				43D994840A403AD800E28AA2 /* ossimVpfAnnotationLibraryInfo.h */,
-				43D994850A403AD800E28AA2 /* ossimVpfAnnotationSource.h */,
-				43D994860A403AD800E28AA2 /* ossimVpfTileSource.h */,
-				43D994870A403AD800E28AA2 /* ossimWatermarkFilter.h */,
-				43D994880A403AD800E28AA2 /* ossimWorldFileWriter.h */,
-			);
-			name = imaging;
-			path = ../../include/ossim/imaging;
-			sourceTree = "<group>";
-		};
-		43D994890A403AD800E28AA2 /* init */ = {
-			isa = PBXGroup;
-			children = (
-				43D9948A0A403AD800E28AA2 /* ossimInit.h */,
-			);
-			name = init;
-			path = ../../include/ossim/init;
-			sourceTree = "<group>";
-		};
-		43D9948B0A403AD800E28AA2 /* kbool */ = {
-			isa = PBXGroup;
-			children = (
-				43D9948C0A403AD800E28AA2 /* _dl_itr.h */,
-				43D9948E0A403AD800E28AA2 /* _lnk_itr.h */,
-				43D994900A403AD800E28AA2 /* bool_globals.h */,
-				43D994910A403AD800E28AA2 /* booleng.h */,
-				43D994920A403AD800E28AA2 /* graph.h */,
-				43D994930A403AD800E28AA2 /* graphlst.h */,
-				43D994940A403AD800E28AA2 /* line.h */,
-				43D994950A403AD800E28AA2 /* link.h */,
-				43D994960A403AD800E28AA2 /* lpoint.h */,
-				43D994970A403AD800E28AA2 /* node.h */,
-				43D994980A403AD800E28AA2 /* record.h */,
-				43D994990A403AD800E28AA2 /* scanbeam.h */,
-				43D9949A0A403AD800E28AA2 /* valuesvc.h */,
-			);
-			name = kbool;
-			path = ../../include/ossim/kbool;
-			sourceTree = "<group>";
-		};
-		43D9949B0A403AD800E28AA2 /* matrix */ = {
-			isa = PBXGroup;
-			children = (
-				43D9949D0A403AD900E28AA2 /* controlw.h */,
-				43D9949E0A403AD900E28AA2 /* include.h */,
-				43D9949F0A403AD900E28AA2 /* myexcept.h */,
-				43D994A00A403AD900E28AA2 /* newmat.h */,
-				43D994A10A403AD900E28AA2 /* newmatap.h */,
-				43D994A20A403AD900E28AA2 /* newmatio.h */,
-				43D994A30A403AD900E28AA2 /* newmatnl.h */,
-				43D994A40A403AD900E28AA2 /* newmatrc.h */,
-				43D994A50A403AD900E28AA2 /* newmatrm.h */,
-				43D994A60A403AD900E28AA2 /* precisio.h */,
-				43D994A70A403AD900E28AA2 /* solution.h */,
-			);
-			name = matrix;
-			path = ../../include/ossim/matrix;
-			sourceTree = "<group>";
-		};
-		43D994AB0A403AD900E28AA2 /* parallel */ = {
-			isa = PBXGroup;
-			children = (
-				432D60680B4AAE09004E059E /* ossimMpiSlaveOverviewSequencer.h */,
-				432D60670B4AADF4004E059E /* ossimMpiMasterOverviewSequencer.h */,
-				43D994AC0A403AD900E28AA2 /* ossimIgen.h */,
-				43D994AD0A403AD900E28AA2 /* ossimImageMpiMWriterSequenceConnection.h */,
-				43D994AE0A403AD900E28AA2 /* ossimImageMpiSWriterSequenceConnection.h */,
-				43D994AF0A403AD900E28AA2 /* ossimMpi.h */,
-				43D994B00A403AD900E28AA2 /* ossimOrthoIgen.h */,
-			);
-			name = parallel;
-			path = ../../include/ossim/parallel;
-			sourceTree = "<group>";
-		};
-		43D994B10A403AD900E28AA2 /* plugin */ = {
-			isa = PBXGroup;
-			children = (
-				43D994B20A403AD900E28AA2 /* ossimDynamicLibrary.h */,
-				43D994B30A403AD900E28AA2 /* ossimPluginLibrary.h */,
-				43D994B40A403AD900E28AA2 /* ossimSharedObjectBridge.h */,
-				43D994B50A403AD900E28AA2 /* ossimSharedPluginRegistry.h */,
-			);
-			name = plugin;
-			path = ../../include/ossim/plugin;
-			sourceTree = "<group>";
-		};
-		43D994B60A403AD900E28AA2 /* projection */ = {
-			isa = PBXGroup;
-			children = (
-				43377C6310CD620300ECC5AD /* ossimGcsCodeProjectionFactory.h */,
-				438DEDD610B1D7A200502C71 /* ossimBuckeyeSensor.h */,
-				EEDECA710E3671EB00F52278 /* ossimImageProjectionModel.h */,
-				434230930C14F90000F77EBA /* ossimPositionQualityEvaluator.h */,
-				EE3F66F40AF7D941000507C9 /* ossimSensorModelTuple.h */,
-				437224A70AAFAE2A00F7BCC5 /* ossimSarModel.h */,
-				43D994B70A403AD900E28AA2 /* ossimAdjMapModel.h */,
-				43D994B80A403AD900E28AA2 /* ossimAffineProjection.h */,
-				43D994B90A403AD900E28AA2 /* ossimAlbersProjection.h */,
-				43D994BA0A403AD900E28AA2 /* ossimApplanixEcefModel.h */,
-				43D994BB0A403AD900E28AA2 /* ossimApplanixUtmModel.h */,
-				43D994BC0A403AD900E28AA2 /* ossimAzimEquDistProjection.h */,
-				43D994BD0A403AD900E28AA2 /* ossimBilinearProjection.h */,
-				43D994BE0A403AD900E28AA2 /* ossimBngProjection.h */,
-				43D994BF0A403AD900E28AA2 /* ossimBonneProjection.h */,
-				43D994C00A403AD900E28AA2 /* ossimCadrgProjection.h */,
-				43D994C10A403AD900E28AA2 /* ossimCassiniProjection.h */,
-				43D994C20A403AD900E28AA2 /* ossimCoarseGridModel.h */,
-				43D994C30A403AD900E28AA2 /* ossimCylEquAreaProjection.h */,
-				43D994C40A403AD900E28AA2 /* ossimEckert4Projection.h */,
-				43D994C50A403AD900E28AA2 /* ossimEckert6Projection.h */,
-				43D994C60A403AD900E28AA2 /* ossimEquDistCylProjection.h */,
-				43D994C70A403AD900E28AA2 /* ossimFcsiModel.h */,
-				43D994C80A403AD900E28AA2 /* ossimGnomonicProjection.h */,
-				43D994C90A403AD900E28AA2 /* ossimIkonosRpcModel.h */,
-				43D994CA0A403AD900E28AA2 /* ossimImageViewAffineTransform.h */,
-				43D994CB0A403AD900E28AA2 /* ossimImageViewProjectionTransform.h */,
-				43D994CC0A403AD900E28AA2 /* ossimImageViewTransform.h */,
-				43D994CD0A403AD900E28AA2 /* ossimImageViewTransformFactory.h */,
-				43D994CE0A403AD900E28AA2 /* ossimLambertConformalConicProjection.h */,
-				43D994CF0A403AD900E28AA2 /* ossimLandSatModel.h */,
-				43D994D00A403AD900E28AA2 /* ossimLensDistortion.h */,
-				43D994D10A403AD900E28AA2 /* ossimLlxyProjection.h */,
-				43D994D20A403AD900E28AA2 /* ossimMapProjection.h */,
-				43D994D30A403AD900E28AA2 /* ossimMapProjectionFactory.h */,
-				43D994D40A403AD900E28AA2 /* ossimMapProjectionInfo.h */,
-				43D994D50A403AD900E28AA2 /* ossimMapViewController.h */,
-				43D994D60A403AD900E28AA2 /* ossimMeanRadialLensDistortion.h */,
-				43D994D70A403AD900E28AA2 /* ossimMercatorProjection.h */,
-				43D994D80A403AD900E28AA2 /* ossimMgrs.h */,
-				43D994D90A403AD900E28AA2 /* ossimMillerProjection.h */,
-				43D994DA0A403AD900E28AA2 /* ossimMiscProjectionFactory.h */,
-				43D994DB0A403AD900E28AA2 /* ossimMollweidProjection.h */,
-				43D994DC0A403AD900E28AA2 /* ossimNewZealandMapGridProjection.h */,
-				43D994DD0A403AD900E28AA2 /* ossimNitfMapModel.h */,
-				43D994DE0A403AD900E28AA2 /* ossimNitfProjectionFactory.h */,
-				43D994DF0A403AD900E28AA2 /* ossimNitfRpcModel.h */,
-				43D994E00A403AD900E28AA2 /* ossimObliqueMercatorProjection.h */,
-				43D994E10A403AD900E28AA2 /* ossimOptimizableProjection.h */,
-				43D994E20A403AD900E28AA2 /* ossimOrthoGraphicProjection.h */,
-				43D994E30A403AD900E28AA2 /* ossimPcsCodeProjectionFactory.h */,
-				43D994E40A403AD900E28AA2 /* ossimPolarStereoProjection.h */,
-				43D994E50A403AD900E28AA2 /* ossimPolarst.h */,
-				43D994E60A403AD900E28AA2 /* ossimPolyconicProjection.h */,
-				43D994E70A403AD900E28AA2 /* ossimPolynomProjection.h */,
-				43D994E80A403AD900E28AA2 /* ossimProjection.h */,
-				43D994E90A403AD900E28AA2 /* ossimProjectionFactoryBase.h */,
-				43D994EA0A403AD900E28AA2 /* ossimProjectionFactoryRegistry.h */,
-				43D994EB0A403AD900E28AA2 /* ossimProjectionViewControllerFactory.h */,
-				43D994EC0A403AD900E28AA2 /* ossimQuadProjection.h */,
-				43D994ED0A403AD900E28AA2 /* ossimQuickbirdRpcModel.h */,
-				43D994EE0A403AD900E28AA2 /* ossimRadialDecentLensDistortion.h */,
-				43D994EF0A403AD900E28AA2 /* ossimRpcModel.h */,
-				43D994F00A403AD900E28AA2 /* ossimRpcProjection.h */,
-				43D994F10A403AD900E28AA2 /* ossimRpcSolver.h */,
-				43D994F20A403AD900E28AA2 /* ossimSensorModel.h */,
-				43D994F30A403AD900E28AA2 /* ossimSensorModelFactory.h */,
-				43D994F40A403AD900E28AA2 /* ossimSinusoid.h */,
-				43D994F50A403AD900E28AA2 /* ossimSinusoidalProjection.h */,
-				43D994F60A403AD900E28AA2 /* ossimSpaceObliqueMercatorProjection.h */,
-				43D994F70A403AD900E28AA2 /* ossimSpot5Model.h */,
-				43D994F80A403AD900E28AA2 /* ossimSrsProjectionFactory.h */,
-				43D994F90A403AD900E28AA2 /* ossimStatePlaneProjectionFactory.h */,
-				43D994FA0A403AD900E28AA2 /* ossimStatePlaneProjectionInfo.h */,
-				43D994FB0A403AD900E28AA2 /* ossimStereographicProjection.h */,
-				43D994FC0A403AD900E28AA2 /* ossimTiffProjectionFactory.h */,
-				43D994FD0A403AD900E28AA2 /* ossimTranmerc.h */,
-				43D994FE0A403AD900E28AA2 /* ossimTransCylEquAreaProjection.h */,
-				43D994FF0A403AD900E28AA2 /* ossimTransMercatorProjection.h */,
-				43D995000A403AD900E28AA2 /* ossimUps.h */,
-				43D995010A403AD900E28AA2 /* ossimUpsProjection.h */,
-				43D995020A403AD900E28AA2 /* ossimUpspt.h */,
-				43D995030A403AD900E28AA2 /* ossimUtm.h */,
-				43D995040A403AD900E28AA2 /* ossimUtmProjection.h */,
-				43D995050A403AD900E28AA2 /* ossimUtmpt.h */,
-				43D995060A403AD900E28AA2 /* ossimVanDerGrintenProjection.h */,
-				43D995070A403AD900E28AA2 /* ossimWarpProjection.h */,
-			);
-			name = projection;
-			path = ../../include/ossim/projection;
-			sourceTree = "<group>";
-		};
-		43D995080A403AD900E28AA2 /* support_data */ = {
-			isa = PBXGroup;
-			children = (
-				43D3C5C11151A386000A60FB /* ossimQuickbirdMetaData.h */,
-				436A7E7F10FBAAEE00985348 /* ossimAuxFileHandler.h */,
-				438DED7610B1814300502C71 /* ossimSmacCallibrationSystem.h */,
-				43E65CE2104D85540027BB2C /* ossimDemInfo.h */,
-				434D0A5410174A1E00761D13 /* ossimJ2kInfo.h */,
-				434D0A5510174A1E00761D13 /* ossimJ2kCodRecord.h */,
-				43F8A57C0FDEF45F00FF4F40 /* ossimNitfMstgtaTag.h */,
-				43F8A5650FDEF3DC00FF4F40 /* ossimNitfAcftbTag.h */,
-				43F8A5660FDEF3DC00FF4F40 /* ossimJ2kSotRecord.h */,
-				43F8A5670FDEF3DC00FF4F40 /* ossimJ2kSizRecord.h */,
-				43F8A5640FDEF3BD00FF4F40 /* ossimNitfAimidbTag.h */,
-				4350CA2C0F868C6E00CBF038 /* ossimNitfCsexraTag.h */,
-				4350C9C10F8648BD00CBF038 /* ossimNitfCscrnaTag.h */,
-				4350C7BC0F851D8700CBF038 /* ossimNitfCsdidaTag.h */,
-				43D622760F7BC51100D93B8F /* ossimInfoBase.h */,
-				43D622590F7BC43300D93B8F /* ossimInfoFactory.h */,
-				43D6225A0F7BC43300D93B8F /* ossimInfoFactoryInterface.h */,
-				43D6225B0F7BC43300D93B8F /* ossimInfoFactoryRegistry.h */,
-				43D622580F7BC36E00D93B8F /* ossimDtedInfo.h */,
-				43D622550F7BC33700D93B8F /* ossimNitfInfo.h */,
-				43D622560F7BC33700D93B8F /* ossimTiffInfo.h */,
-				43D622530F7BC31100D93B8F /* ossimCcfInfo.h */,
-				43D995090A403AD900E28AA2 /* ossimAigBounds.h */,
-				43D9950A0A403AD900E28AA2 /* ossimAigDataFileHeader.h */,
-				43D9950B0A403AD900E28AA2 /* ossimAigHeader.h */,
-				43D9950C0A403AD900E28AA2 /* ossimAigIndexFileHeader.h */,
-				43D9950D0A403AD900E28AA2 /* ossimAigStatistics.h */,
-				43D9950E0A403AD900E28AA2 /* ossimApplanixEOFile.h */,
-				43D9950F0A403AD900E28AA2 /* ossimDemGrid.h */,
-				43D995100A403AD900E28AA2 /* ossimDemHeader.h */,
-				43D995110A403AD900E28AA2 /* ossimDemPoint.h */,
-				43D995120A403AD900E28AA2 /* ossimDemProfile.h */,
-				43D995130A403AD900E28AA2 /* ossimDemStats.h */,
-				43D995140A403AD900E28AA2 /* ossimDemUtil.h */,
-				43D995150A403AD900E28AA2 /* ossimDoqq.h */,
-				43D995160A403AD900E28AA2 /* ossimDtedAcc.h */,
-				43D995170A403AD900E28AA2 /* ossimDtedDsi.h */,
-				43D995180A403AD900E28AA2 /* ossimDtedHdr.h */,
-				43D995190A403AD900E28AA2 /* ossimDtedRecord.h */,
-				43D9951A0A403AD900E28AA2 /* ossimDtedUhl.h */,
-				43D9951B0A403AD900E28AA2 /* ossimDtedVol.h */,
-				43D9951C0A403AD900E28AA2 /* ossimERS.h */,
-				43D9951D0A403AD900E28AA2 /* ossimEnviHeader.h */,
-				43D9951E0A403AD900E28AA2 /* ossimFfL5.h */,
-				43D9951F0A403AD900E28AA2 /* ossimFfL7.h */,
-				43D995200A403AD900E28AA2 /* ossimFfRevb.h */,
-				43D995210A403AD900E28AA2 /* ossimFfRevc.h */,
-				43D995220A403AD900E28AA2 /* ossimGeoTiff.h */,
-				43D995230A403AD900E28AA2 /* ossimIkonosMetaData.h */,
-				43D995240A403AD900E28AA2 /* ossimNitfBlockaTag.h */,
-				43D995250A403AD900E28AA2 /* ossimNitfCommon.h */,
-				43D995260A403AD900E28AA2 /* ossimNitfCompressionHeader.h */,
-				43D995270A403AD900E28AA2 /* ossimNitfDataExtensionSegment.h */,
-				43D995280A403AD900E28AA2 /* ossimNitfDataExtensionSegmentV2_0.h */,
-				43D995290A403AD900E28AA2 /* ossimNitfEmbeddedRpfDes.h */,
-				43D9952A0A403AD900E28AA2 /* ossimNitfEmbeddedRpfHeader.h */,
-				43D9952B0A403AD900E28AA2 /* ossimNitfFile.h */,
-				43D9952C0A403AD900E28AA2 /* ossimNitfFileHeader.h */,
-				43D9952D0A403AD900E28AA2 /* ossimNitfFileHeaderV2_0.h */,
-				43D9952E0A403AD900E28AA2 /* ossimNitfFileHeaderV2_1.h */,
-				43D9952F0A403AD900E28AA2 /* ossimNitfFileHeaderV2_X.h */,
-				43D995300A403AD900E28AA2 /* ossimNitfGeoPositioningTag.h */,
-				43D995310A403AD900E28AA2 /* ossimNitfIchipbTag.h */,
-				43D995320A403AD900E28AA2 /* ossimNitfImageBand.h */,
-				43D995330A403AD900E28AA2 /* ossimNitfImageBandV2_0.h */,
-				43D995340A403AD900E28AA2 /* ossimNitfImageBandV2_1.h */,
-				43D995350A403AD900E28AA2 /* ossimNitfImageHeader.h */,
-				43D995360A403AD900E28AA2 /* ossimNitfImageHeaderV2_0.h */,
-				43D995370A403AD900E28AA2 /* ossimNitfImageHeaderV2_1.h */,
-				43D995380A403AD900E28AA2 /* ossimNitfImageHeaderV2_X.h */,
-				43D995390A403AD900E28AA2 /* ossimNitfImageLut.h */,
-				43D9953A0A403AD900E28AA2 /* ossimNitfImageLutV2_0.h */,
-				43D9953B0A403AD900E28AA2 /* ossimNitfImageLutV2_1.h */,
-				43D9953C0A403AD900E28AA2 /* ossimNitfLabelHeader.h */,
-				43D9953D0A403AD900E28AA2 /* ossimNitfLabelHeaderV2_0.h */,
-				43D9953E0A403AD900E28AA2 /* ossimNitfLocalCartographicTag.h */,
-				43D9953F0A403AD900E28AA2 /* ossimNitfLocalGeographicTag.h */,
-				43D995400A403AD900E28AA2 /* ossimNitfNameConversionTables.h */,
-				43D995410A403AD900E28AA2 /* ossimNitfPiaimcTag.h */,
-				43D995420A403AD900E28AA2 /* ossimNitfProjectionParameterTag.h */,
-				43D995430A403AD900E28AA2 /* ossimNitfRegisteredTag.h */,
-				43D995440A403AD900E28AA2 /* ossimNitfRegisteredTagFactory.h */,
-				43D995450A403AD900E28AA2 /* ossimNitfRpcATag.h */,
-				43D995460A403AD900E28AA2 /* ossimNitfRpcBTag.h */,
-				43D995470A403AD900E28AA2 /* ossimNitfRpcBase.h */,
-				43D995480A403AD900E28AA2 /* ossimNitfRpfTagFactory.h */,
-				43D995490A403AD900E28AA2 /* ossimNitfSensraTag.h */,
-				43D9954A0A403AD900E28AA2 /* ossimNitfStdidcTag.h */,
-				43D9954B0A403AD900E28AA2 /* ossimNitfSymbolHeader.h */,
-				43D9954C0A403AD900E28AA2 /* ossimNitfSymbolHeaderV2_0.h */,
-				43D9954D0A403AD900E28AA2 /* ossimNitfTagFactory.h */,
-				43D9954E0A403AD900E28AA2 /* ossimNitfTagFactoryRegistry.h */,
-				43D9954F0A403AD900E28AA2 /* ossimNitfTagInformation.h */,
-				43D995500A403AD900E28AA2 /* ossimNitfTextHeader.h */,
-				43D995510A403AD900E28AA2 /* ossimNitfTextHeaderV2_0.h */,
-				43D995520A403AD900E28AA2 /* ossimNitfUnknownTag.h */,
-				43D995530A403AD900E28AA2 /* ossimNitfUse00aTag.h */,
-				43D995540A403AD900E28AA2 /* ossimNitfVqCompressionHeader.h */,
-				43D995550A403AD900E28AA2 /* ossimQuickbirdRpcHeader.h */,
-				43D995560A403AD900E28AA2 /* ossimQuickbirdTile.h */,
-				43D995570A403AD900E28AA2 /* ossimRpfAttributeOffsetRecord.h */,
-				43D995580A403AD900E28AA2 /* ossimRpfAttributeSectionSubheader.h */,
-				43D995590A403AD900E28AA2 /* ossimRpfAttributes.h */,
-				43D9955A0A403AD900E28AA2 /* ossimRpfBoundaryRectRecord.h */,
-				43D9955B0A403AD900E28AA2 /* ossimRpfBoundaryRectSectionSubheader.h */,
-				43D9955C0A403AD900E28AA2 /* ossimRpfBoundaryRectTable.h */,
-				43D9955D0A403AD900E28AA2 /* ossimRpfColorConverterOffsetRecord.h */,
-				43D9955E0A403AD900E28AA2 /* ossimRpfColorConverterSubsection.h */,
-				43D9955F0A403AD900E28AA2 /* ossimRpfColorConverterTable.h */,
-				43D995600A403AD900E28AA2 /* ossimRpfColorGrayscaleOffsetRecord.h */,
-				43D995610A403AD900E28AA2 /* ossimRpfColorGrayscaleSubheader.h */,
-				43D995620A403AD900E28AA2 /* ossimRpfColorGrayscaleTable.h */,
-				43D995630A403AD900E28AA2 /* ossimRpfCompressionLookupOffsetRecord.h */,
-				43D995640A403AD900E28AA2 /* ossimRpfCompressionSection.h */,
-				43D995650A403AD900E28AA2 /* ossimRpfCompressionSectionSubheader.h */,
-				43D995660A403AD900E28AA2 /* ossimRpfConstants.h */,
-				43D995670A403AD900E28AA2 /* ossimRpfCoverageSection.h */,
-				43D995680A403AD900E28AA2 /* ossimRpfFrame.h */,
-				43D995690A403AD900E28AA2 /* ossimRpfFrameEntry.h */,
-				43D9956A0A403AD900E28AA2 /* ossimRpfFrameFileIndexRecord.h */,
-				43D9956B0A403AD900E28AA2 /* ossimRpfFrameFileIndexSectionSubheader.h */,
-				43D9956C0A403AD900E28AA2 /* ossimRpfFrameFileIndexSubsection.h */,
-				43D9956D0A403AD900E28AA2 /* ossimRpfFrameFileReader.h */,
-				43D9956E0A403AD900E28AA2 /* ossimRpfHeader.h */,
-				43D9956F0A403AD900E28AA2 /* ossimRpfImageDescriptionSubheader.h */,
-				43D995700A403AD900E28AA2 /* ossimRpfImageDisplayParameterSubheader.h */,
-				43D995710A403AD900E28AA2 /* ossimRpfLocationSection.h */,
-				43D995720A403AD900E28AA2 /* ossimRpfMaskSubheader.h */,
-				43D995730A403AD900E28AA2 /* ossimRpfMaskSubsection.h */,
-				43D995740A403AD900E28AA2 /* ossimRpfPathnameRecord.h */,
-				43D995750A403AD900E28AA2 /* ossimRpfToc.h */,
-				43D995760A403AD900E28AA2 /* ossimRpfTocEntry.h */,
-				43D995770A403AD900E28AA2 /* ossimSpaceImagingGeom.h */,
-				43D995780A403AD900E28AA2 /* ossimSpotDimapSupportData.h */,
-				43D995790A403AD900E28AA2 /* ossimSrtmFilename.h */,
-				43D9957A0A403AD900E28AA2 /* ossimSrtmSupportData.h */,
-				43D9957B0A403AD900E28AA2 /* ossimTiffWorld.h */,
-			);
-			name = support_data;
-			path = ../../include/ossim/support_data;
-			sourceTree = "<group>";
-		};
-		43D9957C0A403AD900E28AA2 /* vec */ = {
-			isa = PBXGroup;
-			children = (
-				43D9957F0A403AD900E28AA2 /* ossimVpfBoundingRecordTable.h */,
-				43D995800A403AD900E28AA2 /* ossimVpfCoverage.h */,
-				43D995810A403AD900E28AA2 /* ossimVpfDatabase.h */,
-				43D995820A403AD900E28AA2 /* ossimVpfDatabaseHeader.h */,
-				43D995830A403AD900E28AA2 /* ossimVpfDatabaseHeaderTableValidator.h */,
-				43D995840A403AD900E28AA2 /* ossimVpfExtent.h */,
-				43D995850A403AD900E28AA2 /* ossimVpfFeatureClass.h */,
-				43D995860A403AD900E28AA2 /* ossimVpfFeatureClassSchema.h */,
-				43D995870A403AD900E28AA2 /* ossimVpfLibrary.h */,
-				43D995880A403AD900E28AA2 /* ossimVpfLibraryAttributeTableValidator.h */,
-				43D995890A403AD900E28AA2 /* ossimVpfTable.h */,
-				43D9958A0A403AD900E28AA2 /* ossimVpfTableValidator.h */,
-				43D9958C0A403AD900E28AA2 /* vpf.h */,
-			);
-			name = vec;
-			path = ../../include/ossim/vec;
-			sourceTree = "<group>";
-		};
-		43D9958D0A403ADA00E28AA2 /* vpfutil */ = {
-			isa = PBXGroup;
-			children = (
-				43D9958E0A403ADA00E28AA2 /* linklist.h */,
-				43D9958F0A403ADA00E28AA2 /* machine.h */,
-				43D995900A403ADA00E28AA2 /* mapgraph.h */,
-				43D995910A403ADA00E28AA2 /* polygrf.h */,
-				43D995920A403ADA00E28AA2 /* projectn.h */,
-				43D995930A403ADA00E28AA2 /* protomas.h */,
-				43D995940A403ADA00E28AA2 /* set.h */,
-				43D995950A403ADA00E28AA2 /* system.h */,
-				43D995960A403ADA00E28AA2 /* values.h */,
-				43D995970A403ADA00E28AA2 /* vpfdisp.h */,
-				43D995980A403ADA00E28AA2 /* vpfdraw.h */,
-				43D995990A403ADA00E28AA2 /* vpfinit.h */,
-				43D9959A0A403ADA00E28AA2 /* vpfio.h */,
-				43D9959B0A403ADA00E28AA2 /* vpfmisc.h */,
-				43D9959C0A403ADA00E28AA2 /* vpfprim.h */,
-				43D9959D0A403ADA00E28AA2 /* vpfrelat.h */,
-				43D9959E0A403ADA00E28AA2 /* vpfselec.h */,
-				43D9959F0A403ADA00E28AA2 /* vpftable.h */,
-				43D995A00A403ADA00E28AA2 /* vpftidx.h */,
-				43D995A10A403ADA00E28AA2 /* vpfview.h */,
-				43D995A20A403ADA00E28AA2 /* xmemory.h */,
-			);
-			name = vpfutil;
-			path = ../../include/ossim/vpfutil;
-			sourceTree = "<group>";
-		};
-		EEB5ECAA0D0F13E2000CF6B2 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				EEB5ECAE0D0F13E2000CF6B2 /* ossimPredator.framework */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		EEFE08CD0D61D97E008454CA /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				EEFE08D80D61D97E008454CA /* ossimQt.framework */,
-				EEFE08DA0D61D97E008454CA /* iView.app */,
-				EEFE08DC0D61D97E008454CA /* ImageLinker.app */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		433627F81042E368002A87C7 /* template-app */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 433628001042E368002A87C7 /* Build configuration list for PBXNativeTarget "template-app" */;
-			buildPhases = (
-				433627FB1042E368002A87C7 /* Sources */,
-				433627FD1042E368002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				433627F91042E368002A87C7 /* PBXTargetDependency */,
-			);
-			name = "template-app";
-			productName = igen;
-			productReference = 433628031042E368002A87C7 /* template-app */;
-			productType = "com.apple.product-type.tool";
-		};
-		4336280B1042E3B0002A87C7 /* ossim-adrg-dump */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 433628121042E3B0002A87C7 /* Build configuration list for PBXNativeTarget "ossim-adrg-dump" */;
-			buildPhases = (
-				4336280E1042E3B0002A87C7 /* Sources */,
-				4336280F1042E3B0002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				4336280C1042E3B0002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-adrg-dump";
-			productName = igen;
-			productReference = 433628151042E3B0002A87C7 /* ossim-adrg-dump */;
-			productType = "com.apple.product-type.tool";
-		};
-		4336282D1042E3F6002A87C7 /* ossim-applanix2ogeom */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 433628341042E3F6002A87C7 /* Build configuration list for PBXNativeTarget "ossim-applanix2ogeom" */;
-			buildPhases = (
-				433628301042E3F6002A87C7 /* Sources */,
-				433628311042E3F6002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				4336282E1042E3F6002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-applanix2ogeom";
-			productName = igen;
-			productReference = 433628371042E3F6002A87C7 /* ossim-applanix2ogeom */;
-			productType = "com.apple.product-type.tool";
-		};
-		4336284B1042E461002A87C7 /* ossim-band-merge */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 433628521042E461002A87C7 /* Build configuration list for PBXNativeTarget "ossim-band-merge" */;
-			buildPhases = (
-				4336284E1042E461002A87C7 /* Sources */,
-				4336284F1042E461002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				4336284C1042E461002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-band-merge";
-			productName = igen;
-			productReference = 433628551042E461002A87C7 /* ossim-band-merge */;
-			productType = "com.apple.product-type.tool";
-		};
-		4336286A1042E4AC002A87C7 /* ossim-btoa */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 433628711042E4AC002A87C7 /* Build configuration list for PBXNativeTarget "ossim-btoa" */;
-			buildPhases = (
-				4336286D1042E4AC002A87C7 /* Sources */,
-				4336286E1042E4AC002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				4336286B1042E4AC002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-btoa";
-			productName = igen;
-			productReference = 433628741042E4AC002A87C7 /* ossim-btoa */;
-			productType = "com.apple.product-type.tool";
-		};
-		4336287C1042E4D1002A87C7 /* ossim-chgkwval */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 433628831042E4D1002A87C7 /* Build configuration list for PBXNativeTarget "ossim-chgkwval" */;
-			buildPhases = (
-				4336287F1042E4D1002A87C7 /* Sources */,
-				433628801042E4D1002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				4336287D1042E4D1002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-chgkwval";
-			productName = igen;
-			productReference = 433628861042E4D1002A87C7 /* template-app */;
-			productType = "com.apple.product-type.tool";
-		};
-		433628951042E52A002A87C7 /* ossim-cmm */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 4336289C1042E52A002A87C7 /* Build configuration list for PBXNativeTarget "ossim-cmm" */;
-			buildPhases = (
-				433628981042E52A002A87C7 /* Sources */,
-				433628991042E52A002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				433628961042E52A002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-cmm";
-			productName = igen;
-			productReference = 4336289F1042E52A002A87C7 /* ossim-cmm */;
-			productType = "com.apple.product-type.tool";
-		};
-		433628AF1042E560002A87C7 /* ossim-computeSrtmStats */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 433628B61042E560002A87C7 /* Build configuration list for PBXNativeTarget "ossim-computeSrtmStats" */;
-			buildPhases = (
-				433628B21042E560002A87C7 /* Sources */,
-				433628B31042E560002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				433628B01042E560002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-computeSrtmStats";
-			productName = igen;
-			productReference = 433628B91042E560002A87C7 /* ossim-computeSrtmStats */;
-			productType = "com.apple.product-type.tool";
-		};
-		433628CC1042E59C002A87C7 /* ossim-correl */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 433628D31042E59C002A87C7 /* Build configuration list for PBXNativeTarget "ossim-correl" */;
-			buildPhases = (
-				433628CF1042E59C002A87C7 /* Sources */,
-				433628D01042E59C002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				433628CD1042E59C002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-correl";
-			productName = igen;
-			productReference = 433628D61042E59C002A87C7 /* ossim-correl */;
-			productType = "com.apple.product-type.tool";
-		};
-		433628E71042E5D1002A87C7 /* ossim-create-cg */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 433628EE1042E5D1002A87C7 /* Build configuration list for PBXNativeTarget "ossim-create-cg" */;
-			buildPhases = (
-				433628EA1042E5D1002A87C7 /* Sources */,
-				433628EB1042E5D1002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				433628E81042E5D1002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-create-cg";
-			productName = igen;
-			productReference = 433628F11042E5D1002A87C7 /* ossim-create-cg */;
-			productType = "com.apple.product-type.tool";
-		};
-		433629011042E607002A87C7 /* ossim-create-histo */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 433629081042E607002A87C7 /* Build configuration list for PBXNativeTarget "ossim-create-histo" */;
-			buildPhases = (
-				433629041042E607002A87C7 /* Sources */,
-				433629051042E607002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				433629021042E607002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-create-histo";
-			productName = igen;
-			productReference = 4336290B1042E607002A87C7 /* ossim-create-histo */;
-			productType = "com.apple.product-type.tool";
-		};
-		433629771042E712002A87C7 /* ossim-dms2deg */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 4336297E1042E712002A87C7 /* Build configuration list for PBXNativeTarget "ossim-dms2deg" */;
-			buildPhases = (
-				4336297A1042E712002A87C7 /* Sources */,
-				4336297B1042E712002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				433629781042E712002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-dms2deg";
-			productName = igen;
-			productReference = 433629811042E712002A87C7 /* ossim-dms2deg */;
-			productType = "com.apple.product-type.tool";
-		};
-		433629931042E759002A87C7 /* ossim-dump-ocg */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 4336299A1042E759002A87C7 /* Build configuration list for PBXNativeTarget "ossim-dump-ocg" */;
-			buildPhases = (
-				433629961042E759002A87C7 /* Sources */,
-				433629971042E759002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				433629941042E759002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-dump-ocg";
-			productName = igen;
-			productReference = 4336299D1042E759002A87C7 /* ossim-dump-ocg */;
-			productType = "com.apple.product-type.tool";
-		};
-		433629AB1042E77C002A87C7 /* ossim-ecg2ocg */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 433629B21042E77C002A87C7 /* Build configuration list for PBXNativeTarget "ossim-ecg2ocg" */;
-			buildPhases = (
-				433629AE1042E77C002A87C7 /* Sources */,
-				433629AF1042E77C002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				433629AC1042E77C002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-ecg2ocg";
-			productName = igen;
-			productReference = 433629B51042E77C002A87C7 /* ossim-ecg2ocg */;
-			productType = "com.apple.product-type.tool";
-		};
-		433629C61042E7B1002A87C7 /* ossim-extract-vertices */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 433629CD1042E7B1002A87C7 /* Build configuration list for PBXNativeTarget "ossim-extract-vertices" */;
-			buildPhases = (
-				433629C91042E7B1002A87C7 /* Sources */,
-				433629CA1042E7B1002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				433629C71042E7B1002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-extract-vertices";
-			productName = igen;
-			productReference = 433629D01042E7B1002A87C7 /* ossim-extract-vertices */;
-			productType = "com.apple.product-type.tool";
-		};
-		433629DA1042E807002A87C7 /* ossim-foo */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 433629E11042E807002A87C7 /* Build configuration list for PBXNativeTarget "ossim-foo" */;
-			buildPhases = (
-				433629DD1042E807002A87C7 /* Sources */,
-				433629DE1042E807002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				433629DB1042E807002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-foo";
-			productName = igen;
-			productReference = 433629E41042E807002A87C7 /* ossim-foo */;
-			productType = "com.apple.product-type.tool";
-		};
-		43362A231042E88F002A87C7 /* ossim-height */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 43362A2A1042E88F002A87C7 /* Build configuration list for PBXNativeTarget "ossim-height" */;
-			buildPhases = (
-				43362A261042E88F002A87C7 /* Sources */,
-				43362A271042E88F002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				43362A241042E88F002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-height";
-			productName = igen;
-			productReference = 43362A2D1042E88F002A87C7 /* ossim-height */;
-			productType = "com.apple.product-type.tool";
-		};
-		43362A411042E8BD002A87C7 /* ossim-icp */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 43362A481042E8BD002A87C7 /* Build configuration list for PBXNativeTarget "ossim-icp" */;
-			buildPhases = (
-				43362A441042E8BD002A87C7 /* Sources */,
-				43362A451042E8BD002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				43362A421042E8BD002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-icp";
-			productName = igen;
-			productReference = 43362A4B1042E8BD002A87C7 /* ossim-icp */;
-			productType = "com.apple.product-type.tool";
-		};
-		43362A591042E8EE002A87C7 /* ossim-igen */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 43362A601042E8EE002A87C7 /* Build configuration list for PBXNativeTarget "ossim-igen" */;
-			buildPhases = (
-				43362A5C1042E8EE002A87C7 /* Sources */,
-				43362A5D1042E8EE002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				43362A5A1042E8EE002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-igen";
-			productName = igen;
-			productReference = 43362A631042E8EE002A87C7 /* ossim-igen */;
-			productType = "com.apple.product-type.tool";
-		};
-		43362A731042E914002A87C7 /* ossim-img2md */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 43362A7A1042E914002A87C7 /* Build configuration list for PBXNativeTarget "ossim-img2md" */;
-			buildPhases = (
-				43362A761042E914002A87C7 /* Sources */,
-				43362A771042E914002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				43362A741042E914002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-img2md";
-			productName = igen;
-			productReference = 43362A7D1042E914002A87C7 /* ossim-img2md */;
-			productType = "com.apple.product-type.tool";
-		};
-		43362A901042E955002A87C7 /* ossim-img2rr */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 43362A971042E955002A87C7 /* Build configuration list for PBXNativeTarget "ossim-img2rr" */;
-			buildPhases = (
-				43362A931042E955002A87C7 /* Sources */,
-				43362A941042E955002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				43362A911042E955002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-img2rr";
-			productName = igen;
-			productReference = 43362A9A1042E955002A87C7 /* ossim-img2rr */;
-			productType = "com.apple.product-type.tool";
-		};
-		43362AAA1042E981002A87C7 /* ossim-info */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 43362AB11042E981002A87C7 /* Build configuration list for PBXNativeTarget "ossim-info" */;
-			buildPhases = (
-				43362AAD1042E981002A87C7 /* Sources */,
-				43362AAE1042E981002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				43362AAB1042E981002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-info";
-			productName = igen;
-			productReference = 43362AB41042E981002A87C7 /* ossim-info */;
-			productType = "com.apple.product-type.tool";
-		};
-		43362AC81042EA43002A87C7 /* ossim-modopt */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 43362ACF1042EA43002A87C7 /* Build configuration list for PBXNativeTarget "ossim-modopt" */;
-			buildPhases = (
-				43362ACB1042EA43002A87C7 /* Sources */,
-				43362ACC1042EA43002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				43362AC91042EA43002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-modopt";
-			productName = igen;
-			productReference = 43362AD21042EA43002A87C7 /* ossim-modopt */;
-			productType = "com.apple.product-type.tool";
-		};
-		43362AE51042EA81002A87C7 /* ossim-mosaic */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 43362AEC1042EA81002A87C7 /* Build configuration list for PBXNativeTarget "ossim-mosaic" */;
-			buildPhases = (
-				43362AE81042EA81002A87C7 /* Sources */,
-				43362AE91042EA81002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				43362AE61042EA81002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-mosaic";
-			productName = igen;
-			productReference = 43362AEF1042EA81002A87C7 /* ossim-mosaic */;
-			productType = "com.apple.product-type.tool";
-		};
-		43362B3D1042EB45002A87C7 /* ossim-ogeom2ogeom */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 43362B441042EB45002A87C7 /* Build configuration list for PBXNativeTarget "ossim-ogeom2ogeom" */;
-			buildPhases = (
-				43362B401042EB45002A87C7 /* Sources */,
-				43362B411042EB45002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				43362B3E1042EB45002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-ogeom2ogeom";
-			productName = igen;
-			productReference = 43362B471042EB45002A87C7 /* ossim-ogeom2ogeom */;
-			productType = "com.apple.product-type.tool";
-		};
-		43362B5A1042EB70002A87C7 /* ossim-orthoigen */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 43362B611042EB70002A87C7 /* Build configuration list for PBXNativeTarget "ossim-orthoigen" */;
-			buildPhases = (
-				43362B5D1042EB70002A87C7 /* Sources */,
-				43362B5E1042EB70002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				43362B5B1042EB70002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-orthoigen";
-			productName = igen;
-			productReference = 43362B641042EB70002A87C7 /* ossim-orthoigen */;
-			productType = "com.apple.product-type.tool";
-		};
-		43362B761042EB9B002A87C7 /* ossim-pixelflip */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 43362B7D1042EB9B002A87C7 /* Build configuration list for PBXNativeTarget "ossim-pixelflip" */;
-			buildPhases = (
-				43362B791042EB9B002A87C7 /* Sources */,
-				43362B7A1042EB9B002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				43362B771042EB9B002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-pixelflip";
-			productName = igen;
-			productReference = 43362B801042EB9B002A87C7 /* ossim-pixelflip */;
-			productType = "com.apple.product-type.tool";
-		};
-		43362B911042EBCE002A87C7 /* ossim-prune */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 43362B981042EBCE002A87C7 /* Build configuration list for PBXNativeTarget "ossim-prune" */;
-			buildPhases = (
-				43362B941042EBCE002A87C7 /* Sources */,
-				43362B951042EBCE002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				43362B921042EBCE002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-prune";
-			productName = igen;
-			productReference = 43362B9B1042EBCE002A87C7 /* ossim-prune */;
-			productType = "com.apple.product-type.tool";
-		};
-		43362BC81042EC26002A87C7 /* ossim-rejout */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 43362BCF1042EC26002A87C7 /* Build configuration list for PBXNativeTarget "ossim-rejout" */;
-			buildPhases = (
-				43362BCB1042EC26002A87C7 /* Sources */,
-				43362BCC1042EC26002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				43362BC91042EC26002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-rejout";
-			productName = igen;
-			productReference = 43362BD21042EC26002A87C7 /* ossim-rejout */;
-			productType = "com.apple.product-type.tool";
-		};
-		43362BE41042EC50002A87C7 /* ossim-senint */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 43362BEB1042EC50002A87C7 /* Build configuration list for PBXNativeTarget "ossim-senint" */;
-			buildPhases = (
-				43362BE71042EC50002A87C7 /* Sources */,
-				43362BE81042EC50002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				43362BE51042EC50002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-senint";
-			productName = igen;
-			productReference = 43362BEE1042EC50002A87C7 /* ossim-senint */;
-			productType = "com.apple.product-type.tool";
-		};
-		43362BFE1042EC80002A87C7 /* ossim-space-imaging */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 43362C051042EC80002A87C7 /* Build configuration list for PBXNativeTarget "ossim-space-imaging" */;
-			buildPhases = (
-				43362C011042EC80002A87C7 /* Sources */,
-				43362C021042EC80002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				43362BFF1042EC80002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-space-imaging";
-			productName = igen;
-			productReference = 43362C081042EC80002A87C7 /* ossim-space-imaging */;
-			productType = "com.apple.product-type.tool";
-		};
-		43362C181042ECAF002A87C7 /* ossim-swapbytes */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 43362C1F1042ECAF002A87C7 /* Build configuration list for PBXNativeTarget "ossim-swapbytes" */;
-			buildPhases = (
-				43362C1B1042ECAF002A87C7 /* Sources */,
-				43362C1C1042ECAF002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				43362C191042ECAF002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-swapbytes";
-			productName = igen;
-			productReference = 43362C221042ECAF002A87C7 /* ossim-swapbytes */;
-			productType = "com.apple.product-type.tool";
-		};
-		43362C321042ECD6002A87C7 /* ossim-tfw2ogeom */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 43362C391042ECD6002A87C7 /* Build configuration list for PBXNativeTarget "ossim-tfw2ogeom" */;
-			buildPhases = (
-				43362C351042ECD6002A87C7 /* Sources */,
-				43362C361042ECD6002A87C7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				43362C331042ECD6002A87C7 /* PBXTargetDependency */,
-			);
-			name = "ossim-tfw2ogeom";
-			productName = igen;
-			productReference = 43362C3C1042ECD6002A87C7 /* ossim-tfw2ogeom */;
-			productType = "com.apple.product-type.tool";
-		};
-		8D07F2BC0486CC7A007CD1D0 /* ossim */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 1FC5980F08CB6539002B3E06 /* Build configuration list for PBXNativeTarget "ossim" */;
-			buildPhases = (
-				1886E18C0B1C8C3D00D0E4E6 /* ShellScript */,
-				43D99BCE0A40527900E28AA2 /* Copy Header Files With directories intact */,
-				8D07F2BF0486CC7A007CD1D0 /* Resources */,
-				8D07F2C10486CC7A007CD1D0 /* Sources */,
-				8D07F2C30486CC7A007CD1D0 /* Frameworks */,
-				8D07F2C50486CC7A007CD1D0 /* Rez */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = ossim;
-			productInstallPath = "$(HOME)/Library/Frameworks";
-			productName = ossim;
-			productReference = 8D07F2C80486CC7A007CD1D0 /* ossim.framework */;
-			productType = "com.apple.product-type.framework";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		0867D690FE84028FC02AAC07 /* Project object */ = {
-			isa = PBXProject;
-			buildConfigurationList = 1FC5981308CB6539002B3E06 /* Build configuration list for PBXProject "ossim" */;
-			compatibilityVersion = "Xcode 2.4";
-			developmentRegion = English;
-			hasScannedForEncodings = 1;
-			knownRegions = (
-				English,
-				Japanese,
-				French,
-				German,
-				da,
-				Dutch,
-				fi,
-				Italian,
-				ko,
-				no,
-				Spanish,
-				sv,
-				zh_CN,
-				zh_TW,
-				pt,
-				de,
-				en,
-				es,
-				fr,
-				it,
-				ja,
-				nl,
-			);
-			mainGroup = 0867D691FE84028FC02AAC07 /* ossim */;
-			productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */;
-			projectDirPath = "";
-			projectReferences = (
-				{
-					ProductGroup = 1886E0D40B1BE9F700D0E4E6 /* Products */;
-					ProjectRef = 1886E0D30B1BE9F700D0E4E6 /* libwms.xcodeproj */;
-				},
-				{
-					ProductGroup = 4386B2390DF0605B007011FB /* Products */;
-					ProjectRef = 4386B2380DF0605A007011FB /* oms.xcodeproj */;
-				},
-				{
-					ProductGroup = 43398B721132B6BA0036A644 /* Products */;
-					ProjectRef = 43398B711132B6BA0036A644 /* ossim_plugins.xcodeproj */;
-				},
-				{
-					ProductGroup = 186EEC8B0B1CDAB300F7886A /* Products */;
-					ProjectRef = 186EEC8A0B1CDAB300F7886A /* ossim_qt.xcodeproj */;
-				},
-				{
-					ProductGroup = EEFE08CD0D61D97E008454CA /* Products */;
-					ProjectRef = EEFE08CC0D61D97E008454CA /* ossim_qt4.xcodeproj */;
-				},
-				{
-					ProductGroup = 186EF59A0B1CE41300F7886A /* Products */;
-					ProjectRef = 186EF5990B1CE41300F7886A /* ossimPlanet.xcodeproj */;
-				},
-				{
-					ProductGroup = 4391D6A710FED19F007AC2C1 /* Products */;
-					ProjectRef = 4391D6A610FED19F007AC2C1 /* ossimPlanetQt.xcodeproj */;
-				},
-				{
-					ProductGroup = EEB5ECAA0D0F13E2000CF6B2 /* Products */;
-					ProjectRef = EEB5ECA90D0F13E2000CF6B2 /* ossimPredator.xcodeproj */;
-				},
-			);
-			projectRoot = "";
-			targets = (
-				4370FD6D0A41004900931C4B /* All */,
-				43081DB20BD3BE67001238BA /* setup_links */,
-				431472450CBE539A00EAADAB /* ossimVersion */,
-				EE05E7AC0E24FF02005A64BC /* build_core_frameworks */,
-				186EFA820B1F3C1500F7886A /* build_plugins */,
-				1F33AE1108DC88FA003F541C /* build_gui_frameworks */,
-				1FF5F59D08D3AB960022B290 /* ossim Apps */,
-				EEE46AB80E6881AA00EFF475 /* GUI Apps */,
-				8D07F2BC0486CC7A007CD1D0 /* ossim */,
-				43CD6C9E0A5179CC007A4FB1 /* build_package_dir */,
-				436851420BD55066002EBFEA /* ossimplanet_bundle */,
-				EEAE9B600DBE0646000E8D8F /* imagelinker_bundle */,
-				433627F81042E368002A87C7 /* template-app */,
-				4336280B1042E3B0002A87C7 /* ossim-adrg-dump */,
-				4336282D1042E3F6002A87C7 /* ossim-applanix2ogeom */,
-				4336284B1042E461002A87C7 /* ossim-band-merge */,
-				4336286A1042E4AC002A87C7 /* ossim-btoa */,
-				4336287C1042E4D1002A87C7 /* ossim-chgkwval */,
-				433628951042E52A002A87C7 /* ossim-cmm */,
-				433628AF1042E560002A87C7 /* ossim-computeSrtmStats */,
-				433628CC1042E59C002A87C7 /* ossim-correl */,
-				433628E71042E5D1002A87C7 /* ossim-create-cg */,
-				433629011042E607002A87C7 /* ossim-create-histo */,
-				433629771042E712002A87C7 /* ossim-dms2deg */,
-				433629931042E759002A87C7 /* ossim-dump-ocg */,
-				433629AB1042E77C002A87C7 /* ossim-ecg2ocg */,
-				433629C61042E7B1002A87C7 /* ossim-extract-vertices */,
-				433629DA1042E807002A87C7 /* ossim-foo */,
-				43362A231042E88F002A87C7 /* ossim-height */,
-				43362A411042E8BD002A87C7 /* ossim-icp */,
-				43362A591042E8EE002A87C7 /* ossim-igen */,
-				43362A731042E914002A87C7 /* ossim-img2md */,
-				43362A901042E955002A87C7 /* ossim-img2rr */,
-				43362AAA1042E981002A87C7 /* ossim-info */,
-				43362AC81042EA43002A87C7 /* ossim-modopt */,
-				43362AE51042EA81002A87C7 /* ossim-mosaic */,
-				43362B3D1042EB45002A87C7 /* ossim-ogeom2ogeom */,
-				43362B5A1042EB70002A87C7 /* ossim-orthoigen */,
-				43362B761042EB9B002A87C7 /* ossim-pixelflip */,
-				43362B911042EBCE002A87C7 /* ossim-prune */,
-				43362BC81042EC26002A87C7 /* ossim-rejout */,
-				43362BE41042EC50002A87C7 /* ossim-senint */,
-				43362BFE1042EC80002A87C7 /* ossim-space-imaging */,
-				43362C181042ECAF002A87C7 /* ossim-swapbytes */,
-				43362C321042ECD6002A87C7 /* ossim-tfw2ogeom */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXReferenceProxy section */
-		186248DD0B1F7FD20021FDF7 /* iview.app */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.application;
-			path = iview.app;
-			remoteRef = 186248DC0B1F7FD20021FDF7 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		186EEC8F0B1CDAB300F7886A /* ossim_qt.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = ossim_qt.framework;
-			remoteRef = 186EEC8E0B1CDAB300F7886A /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		186EFAF20B1F5B3700F7886A /* imagelinker.app */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.application;
-			path = imagelinker.app;
-			remoteRef = 186EFAF10B1F5B3700F7886A /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		1886E0D80B1BE9F700D0E4E6 /* wms.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = wms.framework;
-			remoteRef = 1886E0D70B1BE9F700D0E4E6 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		43398B841132B6BA0036A644 /* libossimgdal_plugin.dylib */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.dylib";
-			path = libossimgdal_plugin.dylib;
-			remoteRef = 43398B831132B6BA0036A644 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		43398B861132B6BA0036A644 /* libossimreg_plugin.dylib */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.dylib";
-			path = libossimreg_plugin.dylib;
-			remoteRef = 43398B851132B6BA0036A644 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		43398B881132B6BA0036A644 /* libossimworldwind_plugin.dylib */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.dylib";
-			path = libossimworldwind_plugin.dylib;
-			remoteRef = 43398B871132B6BA0036A644 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		43398B8A1132B6BA0036A644 /* libossimnui_plugin.dylib */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.dylib";
-			path = libossimnui_plugin.dylib;
-			remoteRef = 43398B891132B6BA0036A644 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		43398B8C1132B6BA0036A644 /* libossimcontrib_plugin.dylib */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.dylib";
-			path = libossimcontrib_plugin.dylib;
-			remoteRef = 43398B8B1132B6BA0036A644 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		43398B8E1132B6BA0036A644 /* libossimpng_plugin.dylib */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.dylib";
-			path = libossimpng_plugin.dylib;
-			remoteRef = 43398B8D1132B6BA0036A644 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		43398B901132B6BA0036A644 /* libossimkakadu_plugin.dylib */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.dylib";
-			path = libossimkakadu_plugin.dylib;
-			remoteRef = 43398B8F1132B6BA0036A644 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		43398B921132B6BA0036A644 /* libossimcsm_plugin.dylib */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.dylib";
-			path = libossimcsm_plugin.dylib;
-			remoteRef = 43398B911132B6BA0036A644 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		43398B941132B6BA0036A644 /* libossimkakadu_plugin.dylib */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.dylib";
-			path = libossimkakadu_plugin.dylib;
-			remoteRef = 43398B931132B6BA0036A644 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		433A4CDF100CEDAC000B969C /* ossimplanettest */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.executable";
-			path = ossimplanettest;
-			remoteRef = 433A4CDE100CEDAC000B969C /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		4386B2400DF0605B007011FB /* oms.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = oms.framework;
-			remoteRef = 4386B23F0DF0605B007011FB /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		4391D6B210FED19F007AC2C1 /* ossimPlanetQt.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = ossimPlanetQt.framework;
-			remoteRef = 4391D6B110FED19F007AC2C1 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		43A9A0B11151AC55000860DA /* libossimpng_plugin.dylib */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.dylib";
-			path = libossimpng_plugin.dylib;
-			remoteRef = 43A9A0B01151AC55000860DA /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		43C6E22E0FEFB4AD004B52F7 /* ossimPlanet.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = ossimPlanet.framework;
-			remoteRef = 43C6E22D0FEFB4AD004B52F7 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		43C6E2AA0FEFB4F0004B52F7 /* ossimplanetklv */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.executable";
-			path = ossimplanetklv;
-			remoteRef = 43C6E2A90FEFB4F0004B52F7 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		43C6E2AC0FEFB4F0004B52F7 /* ossimplanetviewer */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.executable";
-			path = ossimplanetviewer;
-			remoteRef = 43C6E2AB0FEFB4F0004B52F7 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		43C8A7921109FF750095AEE2 /* ossimplanet. */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.application;
-			path = ossimplanet.;
-			remoteRef = 43C8A7911109FF750095AEE2 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		EEB5ECAE0D0F13E2000CF6B2 /* ossimPredator.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = ossimPredator.framework;
-			remoteRef = EEB5ECAD0D0F13E2000CF6B2 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		EEC515700E769171008AE662 /* wmsurl */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.executable";
-			path = wmsurl;
-			remoteRef = EEC5156F0E769171008AE662 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		EEC515720E769171008AE662 /* wmscapabilities.cpp */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.executable";
-			path = wmscapabilities.cpp;
-			remoteRef = EEC515710E769171008AE662 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		EEC515740E769171008AE662 /* wmsgetmap */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.executable";
-			path = wmsgetmap;
-			remoteRef = EEC515730E769171008AE662 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		EEFE08D80D61D97E008454CA /* ossimQt.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = ossimQt.framework;
-			remoteRef = EEFE08D70D61D97E008454CA /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		EEFE08DA0D61D97E008454CA /* iView.app */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.application;
-			path = iView.app;
-			remoteRef = EEFE08D90D61D97E008454CA /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		EEFE08DC0D61D97E008454CA /* ImageLinker.app */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.application;
-			path = ImageLinker.app;
-			remoteRef = EEFE08DB0D61D97E008454CA /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-/* End PBXReferenceProxy section */
-
-/* Begin PBXResourcesBuildPhase section */
-		8D07F2BF0486CC7A007CD1D0 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8D07F2C00486CC7A007CD1D0 /* InfoPlist.strings in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXRezBuildPhase section */
-		8D07F2C50486CC7A007CD1D0 /* Rez */ = {
-			isa = PBXRezBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXRezBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
-		1886E18C0B1C8C3D00D0E4E6 /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/tcsh;
-			shellScript = "echo \"Checking for ossimConfig.h\"\nif ( ! -f ${DEV_HOME_PATH}/ossim/include/ossim/ossimConfig.h ) then\n\techo \"Generating ossimConfig.h\"\n\tcd ${DEV_HOME_PATH}/ossim\n\tsh ./configure --with-libtiff=${UNIV_DEP} --with-jpeg=${UNIV_DEP} --without-mpi --with-freetype=${UNIV_DEP} --with-geotiff=${UNIV_DEP} --with-openthreads=${UNIV_DEP}/Frameworks\nendif\n\necho \"Checking for ossimVersion.h\"\nif ( ! -f ${DEV_HOME_PATH}/ossim/include/ossim/ossimVersion.h ) then\n\tech [...]
-		};
-		43081DB60BD3BE9A001238BA /* symbolic link the frameworks in ossim_dependencies */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			comments = "This will symbolically link the frameworks in the ossim_dependencies to the target build dir.  This will allow xcode to run the applications within xcode.  If there is a better way to do this please let me know";
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "symbolic link the frameworks in ossim_dependencies";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "mkdir -p $TARGET_BUILD_DIR\n\ncd $TARGET_BUILD_DIR\nrm -f osg*.framework\nrm -f Qt*.framework\nrm -f gdal.framework\nrm -f OpenThreads.framework\nrm -f Producer.framework\nrm -f libqt*.dylib\nln -f -s $UNIV_DEP/Frameworks/*.framework .\nln -f -s $QT4DIR/lib/*.framework .\nln -f -s $QT3DIR/lib/libqt*.dylib .\n";
-		};
-		431472460CBE53C000EAADAB /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "g++ -I${DEV_HOME_PATH}/ossim/include ${DEV_HOME_PATH}/ossim/src/ossim/version-config.cpp  -o ${DEV_HOME_PATH}/ossim/src/ossim/version-config\n${DEV_HOME_PATH}/ossim/src/ossim/version-config ${DEV_HOME_PATH}/ossim/include/ossim/ossimVersion.h ${OSSIM_VERSION_NUMBER}\n\n";
-		};
-		436851450BD5508B002EBFEA /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "if [ ! -d \"$TARGET_BUILD_DIR/ossimplanet.app\" ]; then\n\n#echo ***ERROR CAN'T MAKE ossimplanet.app a bundle since application doesn't exist\n#echo ***PLEASE REBUILD\nexit\nfi\nrm -rf $BUILT_PRODUCTS_DIR/planetqt_bundle\nmkdir $BUILT_PRODUCTS_DIR/planetqt_bundle\ncp -R $BUILT_PRODUCTS_DIR/ossimplanet.app $BUILT_PRODUCTS_DIR/planetqt_bundle\n\nexport PLANETQT_FRAMEWORKS=$BUILT_PRODUCTS_DIR/planetqt_bundle/ossimplanet.app/Contents/Frameworks\nexport OSSIM_PLUGINS=$BUILT_ [...]
-		};
-		43CD6C9D0A5179CC007A4FB1 /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "# shell script goes here\necho \"Starting Package build\"\ncd $BUILT_PRODUCTS_DIR\nBIN_LOC=package/usr/local/bin\nINSTALL_BIN_LOC=/usr/local/bin\nLIB_LOC=package/usr/local/lib\nINSTALL_LIB_LOC=/usr/local/lib\nOSG_SUPPORT_LOC=/Library/Application\\ Support/OpenSceneGraph\n\necho \"Removing old Package directory\"\nrm -rf $BUILT_PRODUCTS_DIR/package\nrm -f uninstall.sh\nmkdir -p $BUILT_PRODUCTS_DIR/package\nmkdir -p $BIN_LOC\nmkdir -p $BUILT_PRODUCTS_DIR/package/Library/F [...]
-		};
-		43D99BCE0A40527900E28AA2 /* Copy Header Files With directories intact */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 12;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "Copy Header Files With directories intact";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/csh;
-			shellScript = "#!/bin/csh\n\necho ${DEV_HOME_PATH}/ossim\ncd ${DEV_HOME_PATH}/ossim/include/ossim\n\nset directories=`find . -type d`\nrm -rf $TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/*\nrm -rf $TARGET_BUILD_DIR/$WRAPPER_NAME/Headers\nforeach f ($directories)\necho \"creating directory $TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/$f\"\ninstall -d $TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/$f\ncp -p $f/*.h $f/*.inc $TARGET_BUILD_DIR/$PUBLIC_HEADERS_FOLDER_PATH/$f\nend\ncd $TARG [...]
-		};
-		EEAE9B630DBE0646000E8D8F /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "if [ ! -d \"$TARGET_BUILD_DIR/imagelinker.app\" ]; then\n\n#echo ***ERROR CAN'T MAKE imagelinker.app bundle since application doesn't exist\n#echo ***PLEASE REBUILD\nexit\nfi\nexport IMAGELINKER_BUNDLE_DIR=$BUILT_PRODUCTS_DIR/imagelinker_bundle\nexport IMAGELINKER_BUNDLE=$BUILT_PRODUCTS_DIR/imagelinker_bundle/imagelinker.app\nrm -rf $IMAGELINKER_BUNDLE_DIR\nmkdir $IMAGELINKER_BUNDLE_DIR\ncp -R $BUILT_PRODUCTS_DIR/imagelinker.app $IMAGELINKER_BUNDLE_DIR\n\nexport IMAGELI [...]
-		};
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		433627FB1042E368002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		4336280E1042E3B0002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433628251042E3DB002A87C7 /* ossim-adrg-dump.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433628301042E3F6002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433628451042E42B002A87C7 /* ossim-applanix2ogeom.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		4336284E1042E461002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433628621042E48F002A87C7 /* ossim-band-merge.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		4336286D1042E4AC002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		4336287F1042E4D1002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				4336288F1042E4EF002A87C7 /* ossim-chgkwval.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433628981042E52A002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433628AA1042E54C002A87C7 /* ossim-cmm.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433628B21042E560002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433628C41042E578002A87C7 /* ossim-computeSrtmStats.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433628CF1042E59C002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433628E21042E5C6002A87C7 /* ossim-correl.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433628EA1042E5D1002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433628FC1042E5F2002A87C7 /* ossim-create-cg.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433629041042E607002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433629161042E62F002A87C7 /* ossim-create-histo.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		4336297A1042E712002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				4336298E1042E740002A87C7 /* ossim-dms2deg.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433629961042E759002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433629A61042E76E002A87C7 /* ossim-dump-ocg.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433629AE1042E77C002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433629C11042E796002A87C7 /* ossim-ecg2ocg.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433629C91042E7B1002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				433629F91042E83C002A87C7 /* ossim-extract-vertices.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		433629DD1042E807002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43CF6BAC104EA81E00714C86 /* ossim-foo.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362A261042E88F002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362A3C1042E8AE002A87C7 /* ossim-height.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362A441042E8BD002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362A541042E8DE002A87C7 /* ossim-icp.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362A5C1042E8EE002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362A6E1042E908002A87C7 /* ossim-igen.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362A761042E914002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362A8B1042E939002A87C7 /* ossim-img2md.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362A931042E955002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362AA51042E96E002A87C7 /* ossim-img2rr.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362AAD1042E981002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362AC01042E9AC002A87C7 /* ossim-info.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362ACB1042EA43002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362ADF1042EA5F002A87C7 /* ossim-modopt.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362AE81042EA81002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362AFB1042EA9B002A87C7 /* ossim-mosaic.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362B401042EB45002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362B551042EB62002A87C7 /* ossim-ogeom2ogeom.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362B5D1042EB70002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362B711042EB90002A87C7 /* ossim-orthoigen.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362B791042EB9B002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362B8C1042EBB9002A87C7 /* ossim-pixelflip.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362B941042EBCE002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362BA81042EBE6002A87C7 /* ossim-prune.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362BCB1042EC26002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362BDF1042EC3F002A87C7 /* ossim-rejout.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362BE71042EC50002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362BF91042EC69002A87C7 /* ossim-senint.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362C011042EC80002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362C131042EC9E002A87C7 /* ossim-space-imaging.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362C1B1042ECAF002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362C2D1042ECC6002A87C7 /* ossim-swapbytes.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		43362C351042ECD6002A87C7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43362C4E1042ECFB002A87C7 /* ossim-tfw2ogeom.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		8D07F2C10486CC7A007CD1D0 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				43D98FAC0A403AAB00E28AA2 /* bandmat.cpp in Sources */,
-				43D9929F0A403AAC00E28AA2 /* bitarray.c in Sources */,
-				43D98F800A403AAB00E28AA2 /* booleng.cpp in Sources */,
-				43D98FB10A403AAB00E28AA2 /* cholesky.cpp in Sources */,
-				43D992A10A403AAC00E28AA2 /* distance.c in Sources */,
-				43D98FB30A403AAB00E28AA2 /* evalue.cpp in Sources */,
-				43D98FB60A403AAB00E28AA2 /* fft.cpp in Sources */,
-				43D98F820A403AAB00E28AA2 /* graph.cpp in Sources */,
-				43D98F840A403AAB00E28AA2 /* graphlst.cpp in Sources */,
-				43D98FB90A403AAB00E28AA2 /* hholder.cpp in Sources */,
-				43D98FBB0A403AAB00E28AA2 /* jacobi.cpp in Sources */,
-				43D98F860A403AAB00E28AA2 /* line.cpp in Sources */,
-				43D98F880A403AAB00E28AA2 /* link.cpp in Sources */,
-				43D992A30A403AAC00E28AA2 /* linklist.c in Sources */,
-				43D98F8A0A403AAB00E28AA2 /* lpoint.cpp in Sources */,
-				43D98FBF0A403AAB00E28AA2 /* myexcept.cpp in Sources */,
-				43D98FC10A403AAB00E28AA2 /* newfft.cpp in Sources */,
-				43D98FC40A403AAB00E28AA2 /* newmat1.cpp in Sources */,
-				43D98FC60A403AAB00E28AA2 /* newmat2.cpp in Sources */,
-				43D98FC80A403AAB00E28AA2 /* newmat3.cpp in Sources */,
-				43D98FCA0A403AAB00E28AA2 /* newmat4.cpp in Sources */,
-				43D98FCC0A403AAB00E28AA2 /* newmat5.cpp in Sources */,
-				43D98FCE0A403AAB00E28AA2 /* newmat6.cpp in Sources */,
-				43D98FD00A403AAB00E28AA2 /* newmat7.cpp in Sources */,
-				43D98FD20A403AAB00E28AA2 /* newmat8.cpp in Sources */,
-				43D98FD40A403AAB00E28AA2 /* newmat9.cpp in Sources */,
-				43D98FD60A403AAB00E28AA2 /* newmatex.cpp in Sources */,
-				43D98FD80A403AAB00E28AA2 /* newmatnl.cpp in Sources */,
-				43D98FDA0A403AAB00E28AA2 /* newmatrm.cpp in Sources */,
-				43D98F8C0A403AAB00E28AA2 /* node.cpp in Sources */,
-				43AC3A57108DE1EC00A8DB04 /* ossim2dBilinearTransform.cpp in Sources */,
-				43D98B520A403AAA00E28AA2 /* ossim2dLinearRegression.cpp in Sources */,
-				43AC3A54108DE1EC00A8DB04 /* ossim2dTo2dIdentityTransform.cpp in Sources */,
-				43AC3A53108DE1EC00A8DB04 /* ossim2dTo2dShiftTransform.cpp in Sources */,
-				43D98B540A403AAA00E28AA2 /* ossim2dTo2dTransform.cpp in Sources */,
-				43AC3A55108DE1EC00A8DB04 /* ossim2dTo2dTransformFactory.cpp in Sources */,
-				43AC3A56108DE1EC00A8DB04 /* ossim2dTo2dTransformRegistry.cpp in Sources */,
-				43D98DD60A403AAB00E28AA2 /* ossim3x3ConvolutionFilter.cpp in Sources */,
-				43D98B560A403AAA00E28AA2 /* ossimActiveEdgeTable.cpp in Sources */,
-				43D9905B0A403AAB00E28AA2 /* ossimAdjMapModel.cpp in Sources */,
-				43D98B580A403AAA00E28AA2 /* ossimAdjustableParameterInfo.cpp in Sources */,
-				43D98B5A0A403AAA00E28AA2 /* ossimAdjustableParameterInterface.cpp in Sources */,
-				43D98B5C0A403AAA00E28AA2 /* ossimAdjustmentInfo.cpp in Sources */,
-				43D98DDA0A403AAB00E28AA2 /* ossimAdrgHeader.cpp in Sources */,
-				43D98DDC0A403AAB00E28AA2 /* ossimAdrgTileSource.cpp in Sources */,
-				43D9905D0A403AAB00E28AA2 /* ossimAffineProjection.cpp in Sources */,
-				43D98B600A403AAA00E28AA2 /* ossimAffineTransform.cpp in Sources */,
-				43D991710A403AAC00E28AA2 /* ossimAigBounds.cpp in Sources */,
-				43D991730A403AAC00E28AA2 /* ossimAigDataFileHeader.cpp in Sources */,
-				43D991750A403AAC00E28AA2 /* ossimAigHeader.cpp in Sources */,
-				43D991770A403AAC00E28AA2 /* ossimAigIndexFileHeader.cpp in Sources */,
-				43D991790A403AAC00E28AA2 /* ossimAigStatistics.cpp in Sources */,
-				43D9905F0A403AAB00E28AA2 /* ossimAlbersProjection.cpp in Sources */,
-				43D98DDE0A403AAB00E28AA2 /* ossimAnnotationEllipseObject.cpp in Sources */,
-				43D98DE00A403AAB00E28AA2 /* ossimAnnotationFontObject.cpp in Sources */,
-				43D98DE20A403AAB00E28AA2 /* ossimAnnotationGdBitmapFont.cpp in Sources */,
-				43D98DE40A403AAB00E28AA2 /* ossimAnnotationLineObject.cpp in Sources */,
-				43D98DE60A403AAB00E28AA2 /* ossimAnnotationMultiEllipseObject.cpp in Sources */,
-				43D98DE80A403AAB00E28AA2 /* ossimAnnotationMultiLineObject.cpp in Sources */,
-				43D98DEA0A403AAB00E28AA2 /* ossimAnnotationMultiPolyLineObject.cpp in Sources */,
-				43D98DEC0A403AAB00E28AA2 /* ossimAnnotationMultiPolyObject.cpp in Sources */,
-				43D98DEE0A403AAB00E28AA2 /* ossimAnnotationObject.cpp in Sources */,
-				43D98DF00A403AAB00E28AA2 /* ossimAnnotationObjectFactory.cpp in Sources */,
-				43D98DF20A403AAB00E28AA2 /* ossimAnnotationPolyObject.cpp in Sources */,
-				43D98DF40A403AAB00E28AA2 /* ossimAnnotationSource.cpp in Sources */,
-				43D98DD80A403AAB00E28AA2 /* ossimAOD.cpp in Sources */,
-				43D98DF60A403AAB00E28AA2 /* ossimAppFixedTileCache.cpp in Sources */,
-				43D990610A403AAB00E28AA2 /* ossimApplanixEcefModel.cpp in Sources */,
-				43D9917B0A403AAC00E28AA2 /* ossimApplanixEOFile.cpp in Sources */,
-				43D990630A403AAB00E28AA2 /* ossimApplanixUtmModel.cpp in Sources */,
-				43D98B620A403AAA00E28AA2 /* ossimApplicationUsage.cpp in Sources */,
-				43D98DF80A403AAB00E28AA2 /* ossimAppTileCache.cpp in Sources */,
-				43D98DFA0A403AAB00E28AA2 /* ossimArcInfoGridWriter.cpp in Sources */,
-				43D98B640A403AAA00E28AA2 /* ossimArgumentParser.cpp in Sources */,
-				43D98E000A403AAB00E28AA2 /* ossimAtbController.cpp in Sources */,
-				43D98E020A403AAB00E28AA2 /* ossimAtbMatchPoint.cpp in Sources */,
-				43D98E040A403AAB00E28AA2 /* ossimAtbPointSource.cpp in Sources */,
-				43D98DFC0A403AAB00E28AA2 /* ossimAtCorrGridRemapper.cpp in Sources */,
-				43D98DFE0A403AAB00E28AA2 /* ossimAtCorrRemapper.cpp in Sources */,
-				436A7E7B10FBAAD500985348 /* ossimAuxFileHandler.cpp in Sources */,
-				43D990650A403AAB00E28AA2 /* ossimAzimEquDistProjection.cpp in Sources */,
-				43D98E060A403AAB00E28AA2 /* ossimBandAverageFilter.cpp in Sources */,
-				43D98E080A403AAB00E28AA2 /* ossimBandClipFilter.cpp in Sources */,
-				43D98E0A0A403AAB00E28AA2 /* ossimBandMergeSource.cpp in Sources */,
-				43D98E0C0A403AAB00E28AA2 /* ossimBandSelector.cpp in Sources */,
-				43D98B660A403AAA00E28AA2 /* ossimBaseObjectFactory.cpp in Sources */,
-				43D990670A403AAB00E28AA2 /* ossimBilinearProjection.cpp in Sources */,
-				43D98B680A403AAA00E28AA2 /* ossimBilSplitter.cpp in Sources */,
-				43D98E0E0A403AAB00E28AA2 /* ossimBlendMosaic.cpp in Sources */,
-				43D990690A403AAB00E28AA2 /* ossimBngProjection.cpp in Sources */,
-				43D9906B0A403AAB00E28AA2 /* ossimBonneProjection.cpp in Sources */,
-				43D98B6A0A403AAA00E28AA2 /* ossimBooleanProperty.cpp in Sources */,
-				43D98E100A403AAB00E28AA2 /* ossimBrightnessContrastSource.cpp in Sources */,
-				43D98E120A403AAB00E28AA2 /* ossimBrightnessMatch.cpp in Sources */,
-				438DEDDD10B1D89B00502C71 /* ossimBuckeyeSensor.cpp in Sources */,
-				43D98E140A403AAB00E28AA2 /* ossimBumpShadeTileSource.cpp in Sources */,
-				43D98E160A403AAB00E28AA2 /* ossimCacheTileSource.cpp in Sources */,
-				43D9906D0A403AAB00E28AA2 /* ossimCadrgProjection.cpp in Sources */,
-				43D9906F0A403AAB00E28AA2 /* ossimCassiniProjection.cpp in Sources */,
-				43D98E180A403AAB00E28AA2 /* ossimCastTileSourceFilter.cpp in Sources */,
-				43D98E1A0A403AAB00E28AA2 /* ossimCcfHead.cpp in Sources */,
-				43D622650F7BC48200D93B8F /* ossimCcfInfo.cpp in Sources */,
-				43D98E1C0A403AAB00E28AA2 /* ossimCcfTileSource.cpp in Sources */,
-				43D98E1E0A403AAB00E28AA2 /* ossimCibCadrgTileSource.cpp in Sources */,
-				43D98E200A403AAB00E28AA2 /* ossimClosestToCenterCombiner.cpp in Sources */,
-				43D98B6C0A403AAA00E28AA2 /* ossimCmyVector.cpp in Sources */,
-				43D990710A403AAB00E28AA2 /* ossimCoarseGridModel.cpp in Sources */,
-				43D98E220A403AAB00E28AA2 /* ossimColorNormalizedFusion.cpp in Sources */,
-				43D98B6E0A403AAA00E28AA2 /* ossimColorProperty.cpp in Sources */,
-				4392B1850AB5906D002759B3 /* ossimColumnVector3d.cpp in Sources */,
-				43D98B700A403AAA00E28AA2 /* ossimCommon.cpp in Sources */,
-				43D98B720A403AAA00E28AA2 /* ossimConnectableContainer.cpp in Sources */,
-				43D98B740A403AAA00E28AA2 /* ossimConnectableContainerInterface.cpp in Sources */,
-				43D98B760A403AAA00E28AA2 /* ossimConnectableDisplayListener.cpp in Sources */,
-				43D98B780A403AAA00E28AA2 /* ossimConnectableObject.cpp in Sources */,
-				43D98B7A0A403AAA00E28AA2 /* ossimConnectableObjectListener.cpp in Sources */,
-				43D98B7C0A403AAA00E28AA2 /* ossimConnectionEvent.cpp in Sources */,
-				43D98B7E0A403AAA00E28AA2 /* ossimContainerEvent.cpp in Sources */,
-				43D98B800A403AAA00E28AA2 /* ossimContainerProperty.cpp in Sources */,
-				43D98E240A403AAB00E28AA2 /* ossimConvolutionFilter1D.cpp in Sources */,
-				43D98E260A403AAB00E28AA2 /* ossimConvolutionSource.cpp in Sources */,
-				43D98B820A403AAA00E28AA2 /* ossimCplUtil.cpp in Sources */,
-				43A114A50D52596300DE3CF3 /* ossimCsvFile.cpp in Sources */,
-				43D98B840A403AAA00E28AA2 /* ossimCustomEditorWindow.cpp in Sources */,
-				43D98B860A403AAA00E28AA2 /* ossimCustomEditorWindowFactoryBase.cpp in Sources */,
-				43D98B880A403AAA00E28AA2 /* ossimCustomEditorWindowRegistry.cpp in Sources */,
-				43D990730A403AAB00E28AA2 /* ossimCylEquAreaProjection.cpp in Sources */,
-				43D98B8A0A403AAA00E28AA2 /* ossimDataObject.cpp in Sources */,
-				43D98B8C0A403AAA00E28AA2 /* ossimDate.cpp in Sources */,
-				43D98B8E0A403AAA00E28AA2 /* ossimDateProperty.cpp in Sources */,
-				43D98B900A403AAA00E28AA2 /* ossimDatum.cpp in Sources */,
-				43D98B920A403AAA00E28AA2 /* ossimDatumFactory.cpp in Sources */,
-				EE056A2A0CFFA64E005D6F2F /* ossimDatumFactoryRegistry.cpp in Sources */,
-				43D98B950A403AAA00E28AA2 /* ossimDblGrid.cpp in Sources */,
-				43D98E280A403AAB00E28AA2 /* ossimDdffield.cpp in Sources */,
-				43D98E2A0A403AAB00E28AA2 /* ossimDdffielddefn.cpp in Sources */,
-				43D98E2C0A403AAB00E28AA2 /* ossimDdfmodule.cpp in Sources */,
-				43D98E2E0A403AAB00E28AA2 /* ossimDdfrecord.cpp in Sources */,
-				43D98E300A403AAB00E28AA2 /* ossimDdfsubfielddefn.cpp in Sources */,
-				43D98E320A403AAB00E28AA2 /* ossimDdfutils.cpp in Sources */,
-				43D9917D0A403AAC00E28AA2 /* ossimDemGrid.cpp in Sources */,
-				43D9917F0A403AAC00E28AA2 /* ossimDemHeader.cpp in Sources */,
-				43E65CEC104D85BD0027BB2C /* ossimDemInfo.cpp in Sources */,
-				43D991810A403AAC00E28AA2 /* ossimDemPoint.cpp in Sources */,
-				43D991830A403AAC00E28AA2 /* ossimDemProfile.cpp in Sources */,
-				43D991850A403AAC00E28AA2 /* ossimDemStats.cpp in Sources */,
-				43D991870A403AAC00E28AA2 /* ossimDemUtil.cpp in Sources */,
-				43D98B970A403AAA00E28AA2 /* ossimDirectory.cpp in Sources */,
-				43D98B990A403AAA00E28AA2 /* ossimDirectoryData.cpp in Sources */,
-				43D98B9B0A403AAA00E28AA2 /* ossimDirectoryTree.cpp in Sources */,
-				43D98E340A403AAB00E28AA2 /* ossimDiscrete3x3HatFilter.cpp in Sources */,
-				43D98E360A403AAB00E28AA2 /* ossimDiscreteConvolutionKernel.cpp in Sources */,
-				43D98B9D0A403AAA00E28AA2 /* ossimDisplayEventListener.cpp in Sources */,
-				43D98B9F0A403AAA00E28AA2 /* ossimDisplayInterface.cpp in Sources */,
-				43D98BA10A403AAA00E28AA2 /* ossimDisplayListEvent.cpp in Sources */,
-				43D98BA30A403AAA00E28AA2 /* ossimDisplayRefreshEvent.cpp in Sources */,
-				43D98BA50A403AAA00E28AA2 /* ossimDms.cpp in Sources */,
-				43D991890A403AAC00E28AA2 /* ossimDoqq.cpp in Sources */,
-				43D98E380A403AAB00E28AA2 /* ossimDoqqTileSource.cpp in Sources */,
-				43D98BA70A403AAA00E28AA2 /* ossimDoubleGridProperty.cpp in Sources */,
-				43D98BA90A403AAA00E28AA2 /* ossimDpt.cpp in Sources */,
-				43D98BAB0A403AAA00E28AA2 /* ossimDpt3d.cpp in Sources */,
-				43D98BAD0A403AAA00E28AA2 /* ossimDrect.cpp in Sources */,
-				43D9918B0A403AAC00E28AA2 /* ossimDtedAcc.cpp in Sources */,
-				43D9918D0A403AAC00E28AA2 /* ossimDtedDsi.cpp in Sources */,
-				434E669C10D6CE0D005EBB18 /* ossimDtedElevationDatabase.cpp in Sources */,
-				43D98E3A0A403AAB00E28AA2 /* ossimDtedElevationImageSource.cpp in Sources */,
-				43D98CDE0A403AAB00E28AA2 /* ossimDtedFactory.cpp in Sources */,
-				43D98CE00A403AAB00E28AA2 /* ossimDtedHandler.cpp in Sources */,
-				43D9918F0A403AAC00E28AA2 /* ossimDtedHdr.cpp in Sources */,
-				43D622640F7BC48200D93B8F /* ossimDtedInfo.cpp in Sources */,
-				43D991910A403AAC00E28AA2 /* ossimDtedRecord.cpp in Sources */,
-				43D98E3C0A403AAB00E28AA2 /* ossimDtedTileSource.cpp in Sources */,
-				43D991930A403AAC00E28AA2 /* ossimDtedUhl.cpp in Sources */,
-				43D991950A403AAC00E28AA2 /* ossimDtedVol.cpp in Sources */,
-				43463AF00FCEE7260027D845 /* ossimDuration.cpp in Sources */,
-				43D990000A403AAB00E28AA2 /* ossimDynamicLibrary.cpp in Sources */,
-				43D98E400A403AAB00E28AA2 /* ossimEastingNorthingCutter.cpp in Sources */,
-				43D98BAF0A403AAA00E28AA2 /* ossimEbcdicToAscii.cpp in Sources */,
-				43D98BB10A403AAA00E28AA2 /* ossimEcefPoint.cpp in Sources */,
-				43D98BB30A403AAA00E28AA2 /* ossimEcefRay.cpp in Sources */,
-				4392B1870AB5907B002759B3 /* ossimEcefVector.cpp in Sources */,
-				43D990750A403AAB00E28AA2 /* ossimEckert4Projection.cpp in Sources */,
-				43D990770A403AAB00E28AA2 /* ossimEckert6Projection.cpp in Sources */,
-				43D98E420A403AAB00E28AA2 /* ossimEdgeFilter.cpp in Sources */,
-				434E6B7B10D80CE6005EBB18 /* ossimElevationDatabase.cpp in Sources */,
-				434E6BB110D81529005EBB18 /* ossimElevationDatabaseFactory.cpp in Sources */,
-				434E6BA210D8125C005EBB18 /* ossimElevationDatabaseRegistry.cpp in Sources */,
-				43D98BB50A403AAA00E28AA2 /* ossimElevationManagerEvent.cpp in Sources */,
-				43D98BB70A403AAA00E28AA2 /* ossimElevationManagerEventListener.cpp in Sources */,
-				43D98CE20A403AAB00E28AA2 /* ossimElevCellHandler.cpp in Sources */,
-				43D98CE40A403AAB00E28AA2 /* ossimElevCellHandlerFactory.cpp in Sources */,
-				43D98E440A403AAB00E28AA2 /* ossimElevImageSource.cpp in Sources */,
-				43D98CE60A403AAB00E28AA2 /* ossimElevManager.cpp in Sources */,
-				43D98CE80A403AAB00E28AA2 /* ossimElevSource.cpp in Sources */,
-				43D98CEA0A403AAB00E28AA2 /* ossimElevSourceFactory.cpp in Sources */,
-				43D98BB90A403AAA00E28AA2 /* ossimEllipsoid.cpp in Sources */,
-				43D98BBB0A403AAA00E28AA2 /* ossimEllipsoidFactory.cpp in Sources */,
-				43D98BBD0A403AAA00E28AA2 /* ossimEndian.cpp in Sources */,
-				43D991990A403AAC00E28AA2 /* ossimEnviHeader.cpp in Sources */,
-				43D98E460A403AAB00E28AA2 /* ossimEnviHeaderFileWriter.cpp in Sources */,
-				43A93B2E0A5024FF00903A9C /* ossimEnvironmentUtility.cpp in Sources */,
-				43D98E480A403AAB00E28AA2 /* ossimEquationCombiner.cpp in Sources */,
-				43D990790A403AAB00E28AA2 /* ossimEquDistCylProjection.cpp in Sources */,
-				43D98BC00A403AAA00E28AA2 /* ossimEquTokenizer.cpp in Sources */,
-				43D98BC40A403AAA00E28AA2 /* ossimErrorCodes.cpp in Sources */,
-				43D98BC60A403AAA00E28AA2 /* ossimErrorStatusInterface.cpp in Sources */,
-				43D991970A403AAC00E28AA2 /* ossimERS.cpp in Sources */,
-				EE7206290B64F69000DE8AE9 /* ossimERSFileWriter.cpp in Sources */,
-				43D98E3E0A403AAB00E28AA2 /* ossimERSTileSource.cpp in Sources */,
-				43D98BC80A403AAA00E28AA2 /* ossimEvent.cpp in Sources */,
-				EE8D7CBF0C0E5BF800D2C0D1 /* ossimException.cpp in Sources */,
-				43D98BCA0A403AAA00E28AA2 /* ossimFactoryBaseTemplate.cpp in Sources */,
-				43D9907B0A403AAB00E28AA2 /* ossimFcsiModel.cpp in Sources */,
-				43D98E4E0A403AAB00E28AA2 /* ossimFeatherMosaic.cpp in Sources */,
-				43D9919B0A403AAC00E28AA2 /* ossimFfL5.cpp in Sources */,
-				43D9919D0A403AAC00E28AA2 /* ossimFfL7.cpp in Sources */,
-				43D9919F0A403AAC00E28AA2 /* ossimFfRevb.cpp in Sources */,
-				43D991A10A403AAC00E28AA2 /* ossimFfRevc.cpp in Sources */,
-				43D98E500A403AAB00E28AA2 /* ossimFftFilter.cpp in Sources */,
-				43D98E520A403AAB00E28AA2 /* ossimFgdcFileWriter.cpp in Sources */,
-				43D98BCC0A403AAA00E28AA2 /* ossimFilename.cpp in Sources */,
-				43D98BCE0A403AAA00E28AA2 /* ossimFilenameProperty.cpp in Sources */,
-				43D98E540A403AAB00E28AA2 /* ossimFilter.cpp in Sources */,
-				43D98E560A403AAB00E28AA2 /* ossimFilterResampler.cpp in Sources */,
-				43D98E580A403AAB00E28AA2 /* ossimFilterTable.cpp in Sources */,
-				43D98E5A0A403AAB00E28AA2 /* ossimFixedTileCache.cpp in Sources */,
-				43D98CFD0A403AAB00E28AA2 /* ossimFont.cpp in Sources */,
-				43D98CFF0A403AAB00E28AA2 /* ossimFontFactoryRegistry.cpp in Sources */,
-				43D98BD00A403AAA00E28AA2 /* ossimFontInformation.cpp in Sources */,
-				43D98BD20A403AAA00E28AA2 /* ossimFontProperty.cpp in Sources */,
-				43D98BD40A403AAA00E28AA2 /* ossimFpt.cpp in Sources */,
-				43D98BD60A403AAA00E28AA2 /* ossimFpt3d.cpp in Sources */,
-				43D98D010A403AAB00E28AA2 /* ossimFreeTypeFont.cpp in Sources */,
-				43D98D030A403AAB00E28AA2 /* ossimFreeTypeFontFactory.cpp in Sources */,
-				43D98E5C0A403AAB00E28AA2 /* ossimFusionCombiner.cpp in Sources */,
-				43D98E5E0A403AAB00E28AA2 /* ossimGammaRemapper.cpp in Sources */,
-				43377C6010CD61E200ECC5AD /* ossimGcsCodeProjectionFactory.cpp in Sources */,
-				43D98D050A403AAB00E28AA2 /* ossimGdBitmapFont.cpp in Sources */,
-				434E718910DA7D32005EBB18 /* ossimGeneralRasterElevationDatabase.cpp in Sources */,
-				43D98CEE0A403AAB00E28AA2 /* ossimGeneralRasterElevFactory.cpp in Sources */,
-				43D98CF00A403AAB00E28AA2 /* ossimGeneralRasterElevHandler.cpp in Sources */,
-				43D98E600A403AAB00E28AA2 /* ossimGeneralRasterInfo.cpp in Sources */,
-				43D98E620A403AAB00E28AA2 /* ossimGeneralRasterTileSource.cpp in Sources */,
-				43D98E640A403AAB00E28AA2 /* ossimGeneralRasterWriter.cpp in Sources */,
-				43D98E660A403AAB00E28AA2 /* ossimGeoAnnotationBitmap.cpp in Sources */,
-				43D98E680A403AAB00E28AA2 /* ossimGeoAnnotationEllipseObject.cpp in Sources */,
-				43D98E6A0A403AAB00E28AA2 /* ossimGeoAnnotationFontObject.cpp in Sources */,
-				43D98E6C0A403AAB00E28AA2 /* ossimGeoAnnotationGdBitmapFont.cpp in Sources */,
-				43D98E6E0A403AAB00E28AA2 /* ossimGeoAnnotationLineObject.cpp in Sources */,
-				43D98E700A403AAB00E28AA2 /* ossimGeoAnnotationMultiEllipseObject.cpp in Sources */,
-				43D98E720A403AAB00E28AA2 /* ossimGeoAnnotationMultiPolyLineObject.cpp in Sources */,
-				43D98E740A403AAB00E28AA2 /* ossimGeoAnnotationMultiPolyObject.cpp in Sources */,
-				43D98E760A403AAB00E28AA2 /* ossimGeoAnnotationObject.cpp in Sources */,
-				43D98E780A403AAB00E28AA2 /* ossimGeoAnnotationPolyLineObject.cpp in Sources */,
-				43D98E7A0A403AAB00E28AA2 /* ossimGeoAnnotationPolyObject.cpp in Sources */,
-				43D98E7C0A403AAB00E28AA2 /* ossimGeoAnnotationSource.cpp in Sources */,
-				43D98BDE0A403AAA00E28AA2 /* ossimGeocent.c in Sources */,
-				43D98E800A403AAB00E28AA2 /* ossimGeographicAnnotationGrid.cpp in Sources */,
-				43D98BE00A403AAA00E28AA2 /* ossimGeoid.cpp in Sources */,
-				43D98BE20A403AAA00E28AA2 /* ossimGeoidEgm96.cpp in Sources */,
-				43D98BE40A403AAA00E28AA2 /* ossimGeoidManager.cpp in Sources */,
-				43D98BE60A403AAA00E28AA2 /* ossimGeoidNgs.cpp in Sources */,
-				43D98BE80A403AAA00E28AA2 /* ossimGeoidNgsHeader.cpp in Sources */,
-				43D98E820A403AAB00E28AA2 /* ossimGeomFileWriter.cpp in Sources */,
-				43D98E7E0A403AAB00E28AA2 /* ossimGeoPolyCutter.cpp in Sources */,
-				43D98BD80A403AAA00E28AA2 /* ossimGeoPolygon.cpp in Sources */,
-				43D98BEA0A403AAA00E28AA2 /* ossimGeoref.cpp in Sources */,
-				43D991A30A403AAC00E28AA2 /* ossimGeoTiff.cpp in Sources */,
-				43D98BDA0A403AAA00E28AA2 /* ossimGeoTiffCoordTransformsLut.cpp in Sources */,
-				43D98BDC0A403AAA00E28AA2 /* ossimGeoTiffDatumLut.cpp in Sources */,
-				43D9907D0A403AAB00E28AA2 /* ossimGnomonicProjection.cpp in Sources */,
-				43D98BEC0A403AAA00E28AA2 /* ossimGpt.cpp in Sources */,
-				43D98BEE0A403AAA00E28AA2 /* ossimGrect.cpp in Sources */,
-				43D98E840A403AAB00E28AA2 /* ossimGridRemapEngine.cpp in Sources */,
-				43D98E860A403AAB00E28AA2 /* ossimGridRemapEngineFactory.cpp in Sources */,
-				43D98E880A403AAB00E28AA2 /* ossimGridRemapSource.cpp in Sources */,
-				43D98BF00A403AAA00E28AA2 /* ossimGzStream.cpp in Sources */,
-				43D98BF20A403AAA00E28AA2 /* ossimHexString.cpp in Sources */,
-				EE3F66F00AF7D8D4000507C9 /* ossimHgtRef.cpp in Sources */,
-				43D98BF40A403AAA00E28AA2 /* ossimHistogram.cpp in Sources */,
-				43D98E8C0A403AAB00E28AA2 /* ossimHistogramEqualization.cpp in Sources */,
-				43D98E8E0A403AAB00E28AA2 /* ossimHistogramMatchFilter.cpp in Sources */,
-				43D98E900A403AAB00E28AA2 /* ossimHistogramRemapper.cpp in Sources */,
-				43D98BF60A403AAA00E28AA2 /* ossimHistogramSource.cpp in Sources */,
-				43D98E920A403AAB00E28AA2 /* ossimHistogramThreshholdFilter.cpp in Sources */,
-				43D98E940A403AAB00E28AA2 /* ossimHistogramWriter.cpp in Sources */,
-				43D98E8A0A403AAB00E28AA2 /* ossimHistoMatchRemapper.cpp in Sources */,
-				43D98E960A403AAB00E28AA2 /* ossimHsiRemapper.cpp in Sources */,
-				43D98E980A403AAB00E28AA2 /* ossimHsiToRgbSource.cpp in Sources */,
-				43D98BF80A403AAA00E28AA2 /* ossimHsiVector.cpp in Sources */,
-				43D98E9A0A403AAB00E28AA2 /* ossimHsvGridRemapEngine.cpp in Sources */,
-				43D98E9C0A403AAB00E28AA2 /* ossimHsvToRgbSource.cpp in Sources */,
-				43D98BFA0A403AAA00E28AA2 /* ossimHsvVector.cpp in Sources */,
-				43D98BFC0A403AAA00E28AA2 /* ossimId.cpp in Sources */,
-				43D98BFE0A403AAA00E28AA2 /* ossimIdManager.cpp in Sources */,
-				43D98FF00A403AAB00E28AA2 /* ossimIgen.cpp in Sources */,
-				43D98E9E0A403AAB00E28AA2 /* ossimIgenGenerator.cpp in Sources */,
-				43D991A50A403AAC00E28AA2 /* ossimIkonosMetaData.cpp in Sources */,
-				43D9907F0A403AAB00E28AA2 /* ossimIkonosRpcModel.cpp in Sources */,
-				43D98C000A403AAA00E28AA2 /* ossimImageAoiListener.cpp in Sources */,
-				43D98EA00A403AAB00E28AA2 /* ossimImageChain.cpp in Sources */,
-				43D98EA20A403AAB00E28AA2 /* ossimImageCombiner.cpp in Sources */,
-				43D98EA40A403AAB00E28AA2 /* ossimImageData.cpp in Sources */,
-				43D98EA60A403AAB00E28AA2 /* ossimImageDataFactory.cpp in Sources */,
-				43D98EA80A403AAB00E28AA2 /* ossimImageDataHelper.cpp in Sources */,
-				43D98EAA0A403AAB00E28AA2 /* ossimImageDisplayWriter.cpp in Sources */,
-				43D98EAC0A403AAB00E28AA2 /* ossimImageFileWriter.cpp in Sources */,
-				43D98EAE0A403AAB00E28AA2 /* ossimImageGaussianFilter.cpp in Sources */,
-				43AC3A67108DE3A300A8DB04 /* ossimImageGeometry.cpp in Sources */,
-				43D98C020A403AAA00E28AA2 /* ossimImageGeometryEvent.cpp in Sources */,
-				43D98C040A403AAA00E28AA2 /* ossimImageGeometryEventListener.cpp in Sources */,
-				43AC3A69108DE3A300A8DB04 /* ossimImageGeometryFactory.cpp in Sources */,
-				43AC3A68108DE3A300A8DB04 /* ossimImageGeometryRegistry.cpp in Sources */,
-				43D98EB00A403AAB00E28AA2 /* ossimImageHandler.cpp in Sources */,
-				43D98EB20A403AAB00E28AA2 /* ossimImageHandlerFactory.cpp in Sources */,
-				43D98EB40A403AAB00E28AA2 /* ossimImageHandlerFactoryBase.cpp in Sources */,
-				43D98EB60A403AAB00E28AA2 /* ossimImageHandlerRegistry.cpp in Sources */,
-				43D98EB80A403AAB00E28AA2 /* ossimImageHistogramSource.cpp in Sources */,
-				43D98EBA0A403AAB00E28AA2 /* ossimImageMetaData.cpp in Sources */,
-				43D98EBC0A403AAB00E28AA2 /* ossimImageMetaDataWriterFactory.cpp in Sources */,
-				43D98EBE0A403AAB00E28AA2 /* ossimImageMetaDataWriterFactoryBase.cpp in Sources */,
-				43D98EC00A403AAB00E28AA2 /* ossimImageMetaDataWriterRegistry.cpp in Sources */,
-				EEDECAE50E36724F00F52278 /* ossimImageModel.cpp in Sources */,
-				43D98EC20A403AAB00E28AA2 /* ossimImageMosaic.cpp in Sources */,
-				43D98FF20A403AAB00E28AA2 /* ossimImageMpiMWriterSequenceConnection.cpp in Sources */,
-				43D98FF40A403AAB00E28AA2 /* ossimImageMpiSWriterSequenceConnection.cpp in Sources */,
-				EEDECAE30E36724500F52278 /* ossimImageProjectionModel.cpp in Sources */,
-				43D98EC40A403AAB00E28AA2 /* ossimImageReconstructionFilterFactory.cpp in Sources */,
-				43D98EC60A403AAB00E28AA2 /* ossimImageReconstructionFilterRegistry.cpp in Sources */,
-				43D98EC80A403AAB00E28AA2 /* ossimImageRenderer.cpp in Sources */,
-				43D98ECC0A403AAB00E28AA2 /* ossimImageSharpenFilter.cpp in Sources */,
-				43D98ECE0A403AAB00E28AA2 /* ossimImageSource.cpp in Sources */,
-				43D98ED00A403AAB00E28AA2 /* ossimImageSourceFactory.cpp in Sources */,
-				43D98ED20A403AAB00E28AA2 /* ossimImageSourceFactoryBase.cpp in Sources */,
-				43D98ED40A403AAB00E28AA2 /* ossimImageSourceFactoryRegistry.cpp in Sources */,
-				43D98ED60A403AAB00E28AA2 /* ossimImageSourceFilter.cpp in Sources */,
-				43D98ED80A403AAB00E28AA2 /* ossimImageSourceHistogramFilter.cpp in Sources */,
-				43D98EDC0A403AAB00E28AA2 /* ossimImageSourceSequencer.cpp in Sources */,
-				43D98EDE0A403AAB00E28AA2 /* ossimImageStatisticsSource.cpp in Sources */,
-				43D98EE00A403AAB00E28AA2 /* ossimImageToPlaneNormalFilter.cpp in Sources */,
-				43D98C060A403AAA00E28AA2 /* ossimImageTypeLut.cpp in Sources */,
-				43D990810A403AAB00E28AA2 /* ossimImageViewAffineTransform.cpp in Sources */,
-				43D990830A403AAB00E28AA2 /* ossimImageViewProjectionTransform.cpp in Sources */,
-				43D990850A403AAB00E28AA2 /* ossimImageViewTransform.cpp in Sources */,
-				43D990870A403AAB00E28AA2 /* ossimImageViewTransformFactory.cpp in Sources */,
-				43D98EE20A403AAB00E28AA2 /* ossimImageWriter.cpp in Sources */,
-				43D98EE40A403AAB00E28AA2 /* ossimImageWriterFactory.cpp in Sources */,
-				43D98EE60A403AAB00E28AA2 /* ossimImageWriterFactoryBase.cpp in Sources */,
-				43D98EE80A403AAB00E28AA2 /* ossimImageWriterFactoryRegistry.cpp in Sources */,
-				43D98EEA0A403AAB00E28AA2 /* ossimIndexToRgbLutFilter.cpp in Sources */,
-				188F85D80FA3A1C700B619F6 /* ossimInfoBase.cpp in Sources */,
-				43D622680F7BC48200D93B8F /* ossimInfoFactory.cpp in Sources */,
-				43D622690F7BC48200D93B8F /* ossimInfoFactoryRegistry.cpp in Sources */,
-				43D98F730A403AAB00E28AA2 /* ossimInit.cpp in Sources */,
-				43D98EEC0A403AAB00E28AA2 /* ossimIntensityAdjustmentFilter.cpp in Sources */,
-				43D98C080A403AAA00E28AA2 /* ossimInterleaveTypeLut.cpp in Sources */,
-				43D98C0A0A403AAA00E28AA2 /* ossimIoStream.cpp in Sources */,
-				43D98C0C0A403AAB00E28AA2 /* ossimIpt.cpp in Sources */,
-				43D98C0E0A403AAB00E28AA2 /* ossimIrect.cpp in Sources */,
-				434D0A5B10174A3F00761D13 /* ossimJ2kCodRecord.cpp in Sources */,
-				434D0A5A10174A3F00761D13 /* ossimJ2kInfo.cpp in Sources */,
-				43F8A5750FDEF43200FF4F40 /* ossimJ2kSizRecord.cpp in Sources */,
-				43F8A5760FDEF43200FF4F40 /* ossimJ2kSotRecord.cpp in Sources */,
-				EE592C1C0BF3F8C200E4B15C /* ossimJpegMemSrc.cpp in Sources */,
-				43D98EEE0A403AAB00E28AA2 /* ossimJpegTileSource.cpp in Sources */,
-				43D98EF00A403AAB00E28AA2 /* ossimJpegWriter.cpp in Sources */,
-				43D98EF20A403AAB00E28AA2 /* ossimJpegYCbCrToRgbSource.cpp in Sources */,
-				43D98C100A403AAB00E28AA2 /* ossimJpegYCbCrVector.cpp in Sources */,
-				43D98C120A403AAB00E28AA2 /* ossimKeyword.cpp in Sources */,
-				43D98C160A403AAB00E28AA2 /* ossimKeywordlist.cpp in Sources */,
-				43D98C140A403AAB00E28AA2 /* ossimKeywordNames.cpp in Sources */,
-				43D990890A403AAB00E28AA2 /* ossimLambertConformalConicProjection.cpp in Sources */,
-				43D9908B0A403AAB00E28AA2 /* ossimLandSatModel.cpp in Sources */,
-				43D98EF40A403AAB00E28AA2 /* ossimLandsatTileSource.cpp in Sources */,
-				43D98EF60A403AAB00E28AA2 /* ossimLandsatTopoCorrectionFilter.cpp in Sources */,
-				43D98C180A403AAB00E28AA2 /* ossimLeastSquaresBilin.cpp in Sources */,
-				43D9908D0A403AAB00E28AA2 /* ossimLensDistortion.cpp in Sources */,
-				43D98C1A0A403AAB00E28AA2 /* ossimLine.cpp in Sources */,
-				43D98C1C0A403AAB00E28AA2 /* ossimListener.cpp in Sources */,
-				43D98C1E0A403AAB00E28AA2 /* ossimListenerManager.cpp in Sources */,
-				43D9908F0A403AAB00E28AA2 /* ossimLlxyProjection.cpp in Sources */,
-				43D98EF80A403AAB00E28AA2 /* ossimLocalCorrelationFusion.cpp in Sources */,
-				43D98C200A403AAB00E28AA2 /* ossimLookUpTable.cpp in Sources */,
-				43D98C220A403AAB00E28AA2 /* ossimLsrPoint.cpp in Sources */,
-				43D98C240A403AAB00E28AA2 /* ossimLsrRay.cpp in Sources */,
-				43D98C260A403AAB00E28AA2 /* ossimLsrSpace.cpp in Sources */,
-				43D98C280A403AAB00E28AA2 /* ossimLsrVector.cpp in Sources */,
-				43D98EFA0A403AAB00E28AA2 /* ossimMapCompositionSource.cpp in Sources */,
-				43D990910A403AAB00E28AA2 /* ossimMapProjection.cpp in Sources */,
-				43D990930A403AAB00E28AA2 /* ossimMapProjectionFactory.cpp in Sources */,
-				43D990950A403AAB00E28AA2 /* ossimMapProjectionInfo.cpp in Sources */,
-				43D990970A403AAB00E28AA2 /* ossimMapViewController.cpp in Sources */,
-				43D98EFC0A403AAB00E28AA2 /* ossimMaskFilter.cpp in Sources */,
-				43D98C2A0A403AAB00E28AA2 /* ossimMatrix3x3.cpp in Sources */,
-				43D98C2C0A403AAB00E28AA2 /* ossimMatrix4x4.cpp in Sources */,
-				43D98C2E0A403AAB00E28AA2 /* ossimMatrixProperty.cpp in Sources */,
-				43D98EFE0A403AAB00E28AA2 /* ossimMaxMosaic.cpp in Sources */,
-				43D98F000A403AAB00E28AA2 /* ossimMeanMedianFilter.cpp in Sources */,
-				43D990990A403AAB00E28AA2 /* ossimMeanRadialLensDistortion.cpp in Sources */,
-				436E916C0AC2F3D90051AEC2 /* ossimMemoryImageSource.cpp in Sources */,
-				43D9909B0A403AAB00E28AA2 /* ossimMercatorProjection.cpp in Sources */,
-				43D98F020A403AAB00E28AA2 /* ossimMetadataFileWriter.cpp in Sources */,
-				43D9909D0A403AAB00E28AA2 /* ossimMgrs.c in Sources */,
-				43D9909F0A403AAB00E28AA2 /* ossimMillerProjection.cpp in Sources */,
-				43D990A10A403AAB00E28AA2 /* ossimMiscProjectionFactory.cpp in Sources */,
-				43D990A30A403AAB00E28AA2 /* ossimMollweidProjection.cpp in Sources */,
-				43D98F040A403AAB00E28AA2 /* ossimMonoGridRemapEngine.cpp in Sources */,
-				43D98C300A403AAB00E28AA2 /* ossimMouseEvent.cpp in Sources */,
-				43D98C320A403AAB00E28AA2 /* ossimMouseListener.cpp in Sources */,
-				43D98FF60A403AAB00E28AA2 /* ossimMpi.cpp in Sources */,
-				432D60790B4AAF89004E059E /* ossimMpiMasterOverviewSequencer.cpp in Sources */,
-				432D60780B4AAF89004E059E /* ossimMpiSlaveOverviewSequencer.cpp in Sources */,
-				43D98C340A403AAB00E28AA2 /* ossimMultiBandHistogram.cpp in Sources */,
-				43D98F060A403AAB00E28AA2 /* ossimMultiBandHistogramTileSource.cpp in Sources */,
-				43D98C360A403AAB00E28AA2 /* ossimMultiResLevelHistogram.cpp in Sources */,
-				43D98C3C0A403AAB00E28AA2 /* ossimNadconGridDatum.cpp in Sources */,
-				43D98C3E0A403AAB00E28AA2 /* ossimNadconGridFile.cpp in Sources */,
-				43D98C400A403AAB00E28AA2 /* ossimNadconGridHeader.cpp in Sources */,
-				43D98C420A403AAB00E28AA2 /* ossimNadconNarDatum.cpp in Sources */,
-				43D98C440A403AAB00E28AA2 /* ossimNadconNasDatum.cpp in Sources */,
-				43D98C3A0A403AAB00E28AA2 /* ossimNBandLutDataObject.cpp in Sources */,
-				43D98F080A403AAB00E28AA2 /* ossimNBandToIndexFilter.cpp in Sources */,
-				43D990A50A403AAB00E28AA2 /* ossimNewZealandMapGridProjection.cpp in Sources */,
-				43E215680E91139B00D67CB8 /* ossimNitf20Writer.cpp in Sources */,
-				43F8A5770FDEF43200FF4F40 /* ossimNitfAcftbTag.cpp in Sources */,
-				43F8A5780FDEF43200FF4F40 /* ossimNitfAimidbTag.cpp in Sources */,
-				43D991A70A403AAC00E28AA2 /* ossimNitfBlockaTag.cpp in Sources */,
-				43D991A90A403AAC00E28AA2 /* ossimNitfCommon.cpp in Sources */,
-				43D991AB0A403AAC00E28AA2 /* ossimNitfCompressionHeader.cpp in Sources */,
-				4350C9C60F8648EA00CBF038 /* ossimNitfCscrnaTag.cpp in Sources */,
-				4350C7C00F851DF200CBF038 /* ossimNitfCsdidaTag.cpp in Sources */,
-				4350CA290F868C5000CBF038 /* ossimNitfCsexraTag.cpp in Sources */,
-				43D991AD0A403AAC00E28AA2 /* ossimNitfDataExtensionSegment.cpp in Sources */,
-				43D991AF0A403AAC00E28AA2 /* ossimNitfDataExtensionSegmentV2_0.cpp in Sources */,
-				43D991B10A403AAC00E28AA2 /* ossimNitfEmbeddedRpfDes.cpp in Sources */,
-				43D991B30A403AAC00E28AA2 /* ossimNitfEmbeddedRpfHeader.cpp in Sources */,
-				1FB08BA70FE2B4B3006CD0BD /* ossimNitfEngrdaTag.cpp in Sources */,
-				43D991B50A403AAC00E28AA2 /* ossimNitfFile.cpp in Sources */,
-				43D991B70A403AAC00E28AA2 /* ossimNitfFileHeader.cpp in Sources */,
-				43D991B90A403AAC00E28AA2 /* ossimNitfFileHeaderV2_0.cpp in Sources */,
-				43D991BB0A403AAC00E28AA2 /* ossimNitfFileHeaderV2_1.cpp in Sources */,
-				43D991BD0A403AAC00E28AA2 /* ossimNitfFileHeaderV2_X.cpp in Sources */,
-				43D991BF0A403AAC00E28AA2 /* ossimNitfGeoPositioningTag.cpp in Sources */,
-				43D991C10A403AAC00E28AA2 /* ossimNitfIchipbTag.cpp in Sources */,
-				43D991C30A403AAC00E28AA2 /* ossimNitfImageBand.cpp in Sources */,
-				43D991C50A403AAC00E28AA2 /* ossimNitfImageBandV2_0.cpp in Sources */,
-				43D991C70A403AAC00E28AA2 /* ossimNitfImageBandV2_1.cpp in Sources */,
-				43D991C90A403AAC00E28AA2 /* ossimNitfImageHeader.cpp in Sources */,
-				43D991CB0A403AAC00E28AA2 /* ossimNitfImageHeaderV2_0.cpp in Sources */,
-				43D991CD0A403AAC00E28AA2 /* ossimNitfImageHeaderV2_1.cpp in Sources */,
-				43D991CF0A403AAC00E28AA2 /* ossimNitfImageHeaderV2_X.cpp in Sources */,
-				43D991D10A403AAC00E28AA2 /* ossimNitfImageLut.cpp in Sources */,
-				43D991D30A403AAC00E28AA2 /* ossimNitfImageLutV2_0.cpp in Sources */,
-				43D991D50A403AAC00E28AA2 /* ossimNitfImageLutV2_1.cpp in Sources */,
-				43D622660F7BC48200D93B8F /* ossimNitfInfo.cpp in Sources */,
-				43D991D70A403AAC00E28AA2 /* ossimNitfLabelHeader.cpp in Sources */,
-				43D991D90A403AAC00E28AA2 /* ossimNitfLabelHeaderV2_0.cpp in Sources */,
-				43D991DB0A403AAC00E28AA2 /* ossimNitfLocalCartographicTag.cpp in Sources */,
-				43D991DD0A403AAC00E28AA2 /* ossimNitfLocalGeographicTag.cpp in Sources */,
-				43D990A70A403AAB00E28AA2 /* ossimNitfMapModel.cpp in Sources */,
-				43F8A5790FDEF43200FF4F40 /* ossimNitfMstgtaTag.cpp in Sources */,
-				43D991DF0A403AAC00E28AA2 /* ossimNitfNameConversionTables.cpp in Sources */,
-				43D991E10A403AAC00E28AA2 /* ossimNitfPiaimcTag.cpp in Sources */,
-				43D990A90A403AAB00E28AA2 /* ossimNitfProjectionFactory.cpp in Sources */,
-				43D991E30A403AAC00E28AA2 /* ossimNitfProjectionParameterTag.cpp in Sources */,
-				43D991E50A403AAC00E28AA2 /* ossimNitfRegisteredTag.cpp in Sources */,
-				43D991E70A403AAC00E28AA2 /* ossimNitfRegisteredTagFactory.cpp in Sources */,
-				43D991E90A403AAC00E28AA2 /* ossimNitfRpcATag.cpp in Sources */,
-				43D991ED0A403AAC00E28AA2 /* ossimNitfRpcBase.cpp in Sources */,
-				43D991EB0A403AAC00E28AA2 /* ossimNitfRpcBTag.cpp in Sources */,
-				43D990AB0A403AAB00E28AA2 /* ossimNitfRpcModel.cpp in Sources */,
-				43D991EF0A403AAC00E28AA2 /* ossimNitfRpfTagFactory.cpp in Sources */,
-				43D991F10A403AAC00E28AA2 /* ossimNitfSensraTag.cpp in Sources */,
-				43D991F30A403AAC00E28AA2 /* ossimNitfStdidcTag.cpp in Sources */,
-				43D991F50A403AAC00E28AA2 /* ossimNitfSymbolHeader.cpp in Sources */,
-				43D991F70A403AAC00E28AA2 /* ossimNitfSymbolHeaderV2_0.cpp in Sources */,
-				43D991F90A403AAC00E28AA2 /* ossimNitfTagFactory.cpp in Sources */,
-				43D991FB0A403AAC00E28AA2 /* ossimNitfTagFactoryRegistry.cpp in Sources */,
-				43D991FD0A403AAC00E28AA2 /* ossimNitfTagInformation.cpp in Sources */,
-				43D991FF0A403AAC00E28AA2 /* ossimNitfTextHeader.cpp in Sources */,
-				43D992010A403AAC00E28AA2 /* ossimNitfTextHeaderV2_0.cpp in Sources */,
-				43D98F0A0A403AAB00E28AA2 /* ossimNitfTileSource.cpp in Sources */,
-				43D992030A403AAC00E28AA2 /* ossimNitfUnknownTag.cpp in Sources */,
-				43D992050A403AAC00E28AA2 /* ossimNitfUse00aTag.cpp in Sources */,
-				43D992070A403AAC00E28AA2 /* ossimNitfVqCompressionHeader.cpp in Sources */,
-				43D98F0C0A403AAB00E28AA2 /* ossimNitfWriter.cpp in Sources */,
-				4347EE901084EEC4006E88F6 /* ossimNitfWriterBase.cpp in Sources */,
-				43D98F0E0A403AAB00E28AA2 /* ossimNormalizedRemapTable.cpp in Sources */,
-				43EDA3DA107247CB007D1913 /* ossimNormalizedS16RemapTable.cpp in Sources */,
-				43D98F100A403AAB00E28AA2 /* ossimNormalizedU11RemapTable.cpp in Sources */,
-				43D98F120A403AAB00E28AA2 /* ossimNormalizedU16RemapTable.cpp in Sources */,
-				43D98F140A403AAB00E28AA2 /* ossimNormalizedU8RemapTable.cpp in Sources */,
-				43D98C460A403AAB00E28AA2 /* ossimNormRgbVector.cpp in Sources */,
-				436061770A821BFB001CD337 /* ossimNotify.cpp in Sources */,
-				438DF2DB10B620A800502C71 /* ossimNullPixelFlip.cpp in Sources */,
-				43D98C4A0A403AAB00E28AA2 /* ossimNumericProperty.cpp in Sources */,
-				43D98C4C0A403AAB00E28AA2 /* ossimObject.cpp in Sources */,
-				43D98C4E0A403AAB00E28AA2 /* ossimObjectDestructingEvent.cpp in Sources */,
-				43D98C500A403AAB00E28AA2 /* ossimObjectFactory.cpp in Sources */,
-				43D98C520A403AAB00E28AA2 /* ossimObjectFactoryRegistry.cpp in Sources */,
-				43D990AD0A403AAB00E28AA2 /* ossimObliqueMercatorProjection.cpp in Sources */,
-				43D990AF0A403AAB00E28AA2 /* ossimOptimizableProjection.cpp in Sources */,
-				43D990B10A403AAB00E28AA2 /* ossimOrthoGraphicProjection.cpp in Sources */,
-				43D98FF80A403AAB00E28AA2 /* ossimOrthoIgen.cpp in Sources */,
-				43D98F160A403AAB00E28AA2 /* ossimOrthoImageMosaic.cpp in Sources */,
-				43D98C540A403AAB00E28AA2 /* ossimOutputSource.cpp in Sources */,
-				186F41670B16233900443A9B /* ossimOverviewBuilderBase.cpp in Sources */,
-				186F41680B16233900443A9B /* ossimOverviewBuilderFactory.cpp in Sources */,
-				186F41690B16233900443A9B /* ossimOverviewBuilderFactoryBase.cpp in Sources */,
-				186F416A0B16233900443A9B /* ossimOverviewBuilderFactoryRegistry.cpp in Sources */,
-				432D60750B4AAF65004E059E /* ossimOverviewSequencer.cpp in Sources */,
-				43D98C560A403AAB00E28AA2 /* ossimPackedBits.cpp in Sources */,
-				43D990B30A403AAB00E28AA2 /* ossimPcsCodeProjectionFactory.cpp in Sources */,
-				43D98F180A403AAB00E28AA2 /* ossimPixelFlipper.cpp in Sources */,
-				43D990020A403AAB00E28AA2 /* ossimPluginLibrary.cpp in Sources */,
-				43D990B70A403AAC00E28AA2 /* ossimPolarst.c in Sources */,
-				43D990B50A403AAB00E28AA2 /* ossimPolarStereoProjection.cpp in Sources */,
-				43D98C580A403AAB00E28AA2 /* ossimPolyArea2d.cpp in Sources */,
-				43D990B90A403AAC00E28AA2 /* ossimPolyconicProjection.cpp in Sources */,
-				43D98F1A0A403AAB00E28AA2 /* ossimPolyCutter.cpp in Sources */,
-				43D98C5C0A403AAB00E28AA2 /* ossimPolygon.cpp in Sources */,
-				43D98C5A0A403AAB00E28AA2 /* ossimPolyLine.cpp in Sources */,
-				43D990BB0A403AAC00E28AA2 /* ossimPolynomProjection.cpp in Sources */,
-				434230950C14F94F00F77EBA /* ossimPositionQualityEvaluator.cpp in Sources */,
-				43D98C5E0A403AAB00E28AA2 /* ossimPreferences.cpp in Sources */,
-				43D98C600A403AAB00E28AA2 /* ossimProcessInterface.cpp in Sources */,
-				43D98C620A403AAB00E28AA2 /* ossimProcessListener.cpp in Sources */,
-				43D98C640A403AAB00E28AA2 /* ossimProcessProgressEvent.cpp in Sources */,
-				43D990BD0A403AAC00E28AA2 /* ossimProjection.cpp in Sources */,
-				43D990BF0A403AAC00E28AA2 /* ossimProjectionFactoryBase.cpp in Sources */,
-				43D990C10A403AAC00E28AA2 /* ossimProjectionFactoryRegistry.cpp in Sources */,
-				43D990C30A403AAC00E28AA2 /* ossimProjectionViewControllerFactory.cpp in Sources */,
-				43D98C660A403AAB00E28AA2 /* ossimProperty.cpp in Sources */,
-				43D98C680A403AAB00E28AA2 /* ossimPropertyInterface.cpp in Sources */,
-				43D98C6A0A403AAB00E28AA2 /* ossimPropertyInterfaceFactory.cpp in Sources */,
-				43D98C6C0A403AAB00E28AA2 /* ossimPropertyInterfaceRegistry.cpp in Sources */,
-				43D990C50A403AAC00E28AA2 /* ossimQuadProjection.cpp in Sources */,
-				43D98C700A403AAB00E28AA2 /* ossimQuadrilateralMap.cpp in Sources */,
-				43D98C6E0A403AAB00E28AA2 /* ossimQuadTreeWarp.cpp in Sources */,
-				433786370CBF128000AE9DCF /* ossimQuaternion.cpp in Sources */,
-				43D98F1C0A403AAB00E28AA2 /* ossimQuickbirdNitfTileSource.cpp in Sources */,
-				43D992090A403AAC00E28AA2 /* ossimQuickbirdRpcHeader.cpp in Sources */,
-				43D990C70A403AAC00E28AA2 /* ossimQuickbirdRpcModel.cpp in Sources */,
-				43D98F1E0A403AAB00E28AA2 /* ossimQuickbirdTiffTileSource.cpp in Sources */,
-				43D9920B0A403AAC00E28AA2 /* ossimQuickbirdTile.cpp in Sources */,
-				43D990C90A403AAC00E28AA2 /* ossimRadialDecentLensDistortion.cpp in Sources */,
-				43D98C760A403AAB00E28AA2 /* ossimRationalNumber.cpp in Sources */,
-				43D98F220A403AAB00E28AA2 /* ossimReadmeFileWriter.cpp in Sources */,
-				43D98F240A403AAB00E28AA2 /* ossimRectangleCutFilter.cpp in Sources */,
-				43D98C780A403AAB00E28AA2 /* ossimRectanglePartitioner.cpp in Sources */,
-				43D98C7A0A403AAB00E28AA2 /* ossimRectilinearDataObject.cpp in Sources */,
-				43D98C7C0A403AAB00E28AA2 /* ossimReferenced.cpp in Sources */,
-				43D98C7E0A403AAB00E28AA2 /* ossimRefreshEvent.cpp in Sources */,
-				43D98C800A403AAB00E28AA2 /* ossimRegExp.cpp in Sources */,
-				43D98F260A403AAB00E28AA2 /* ossimResampler.cpp in Sources */,
-				43D98F280A403AAB00E28AA2 /* ossimRgbGridRemapEngine.cpp in Sources */,
-				43D98F2A0A403AAB00E28AA2 /* ossimRgbImage.cpp in Sources */,
-				43D98C820A403AAB00E28AA2 /* ossimRgbLutDataObject.cpp in Sources */,
-				43D98F2C0A403AAB00E28AA2 /* ossimRgbToGreyFilter.cpp in Sources */,
-				43D98F2E0A403AAB00E28AA2 /* ossimRgbToHsiSource.cpp in Sources */,
-				43D98F300A403AAB00E28AA2 /* ossimRgbToHsvSource.cpp in Sources */,
-				43D98F320A403AAB00E28AA2 /* ossimRgbToIndexFilter.cpp in Sources */,
-				43D98F340A403AAB00E28AA2 /* ossimRgbToJpegYCbCrSource.cpp in Sources */,
-				43D98C840A403AAB00E28AA2 /* ossimRgbVector.cpp in Sources */,
-				43D98F200A403AAB00E28AA2 /* ossimRLevelFilter.cpp in Sources */,
-				43D98C720A403AAB00E28AA2 /* ossimROIEvent.cpp in Sources */,
-				43D98C740A403AAB00E28AA2 /* ossimROIEventListener.cpp in Sources */,
-				43D990CB0A403AAC00E28AA2 /* ossimRpcModel.cpp in Sources */,
-				43D990CD0A403AAC00E28AA2 /* ossimRpcProjection.cpp in Sources */,
-				43D990CF0A403AAC00E28AA2 /* ossimRpcSolver.cpp in Sources */,
-				43D9920D0A403AAC00E28AA2 /* ossimRpfAttributeOffsetRecord.cpp in Sources */,
-				43D992110A403AAC00E28AA2 /* ossimRpfAttributes.cpp in Sources */,
-				43D9920F0A403AAC00E28AA2 /* ossimRpfAttributeSectionSubheader.cpp in Sources */,
-				43D992130A403AAC00E28AA2 /* ossimRpfBoundaryRectRecord.cpp in Sources */,
-				43D992150A403AAC00E28AA2 /* ossimRpfBoundaryRectSectionSubheader.cpp in Sources */,
-				43D992170A403AAC00E28AA2 /* ossimRpfBoundaryRectTable.cpp in Sources */,
-				43D992190A403AAC00E28AA2 /* ossimRpfColorConverterOffsetRecord.cpp in Sources */,
-				43D9921B0A403AAC00E28AA2 /* ossimRpfColorConverterSubsection.cpp in Sources */,
-				43D9921D0A403AAC00E28AA2 /* ossimRpfColorConverterTable.cpp in Sources */,
-				43D9921F0A403AAC00E28AA2 /* ossimRpfColorGrayscaleOffsetRecord.cpp in Sources */,
-				43D992210A403AAC00E28AA2 /* ossimRpfColorGrayscaleSubheader.cpp in Sources */,
-				43D992230A403AAC00E28AA2 /* ossimRpfColorGrayscaleTable.cpp in Sources */,
-				43D992250A403AAC00E28AA2 /* ossimRpfCompressionLookupOffsetRecord.cpp in Sources */,
-				43D992270A403AAC00E28AA2 /* ossimRpfCompressionSection.cpp in Sources */,
-				43D992290A403AAC00E28AA2 /* ossimRpfCompressionSectionSubheader.cpp in Sources */,
-				43D9922B0A403AAC00E28AA2 /* ossimRpfCoverageSection.cpp in Sources */,
-				43D9922D0A403AAC00E28AA2 /* ossimRpfFrame.cpp in Sources */,
-				43D9922F0A403AAC00E28AA2 /* ossimRpfFrameEntry.cpp in Sources */,
-				43D992310A403AAC00E28AA2 /* ossimRpfFrameFileIndexRecord.cpp in Sources */,
-				43D992330A403AAC00E28AA2 /* ossimRpfFrameFileIndexSectionSubheader.cpp in Sources */,
-				43D992350A403AAC00E28AA2 /* ossimRpfFrameFileIndexSubsection.cpp in Sources */,
-				43D992370A403AAC00E28AA2 /* ossimRpfFrameFileReader.cpp in Sources */,
-				43D992390A403AAC00E28AA2 /* ossimRpfHeader.cpp in Sources */,
-				43D9923B0A403AAC00E28AA2 /* ossimRpfImageDescriptionSubheader.cpp in Sources */,
-				43D9923D0A403AAC00E28AA2 /* ossimRpfImageDisplayParameterSubheader.cpp in Sources */,
-				43D9923F0A403AAC00E28AA2 /* ossimRpfLocationSection.cpp in Sources */,
-				43D992410A403AAC00E28AA2 /* ossimRpfMaskSubheader.cpp in Sources */,
-				43D992430A403AAC00E28AA2 /* ossimRpfMaskSubsection.cpp in Sources */,
-				43D992450A403AAC00E28AA2 /* ossimRpfPathnameRecord.cpp in Sources */,
-				43D992470A403AAC00E28AA2 /* ossimRpfToc.cpp in Sources */,
-				43D992490A403AAC00E28AA2 /* ossimRpfTocEntry.cpp in Sources */,
-				43D98C860A403AAB00E28AA2 /* ossimRtti.cpp in Sources */,
-				43D98F360A403AAB00E28AA2 /* ossimS16ImageData.cpp in Sources */,
-				437224AC0AAFAE6A00F7BCC5 /* ossimSarModel.cpp in Sources */,
-				43D98F3A0A403AAB00E28AA2 /* ossimScalarRemapper.cpp in Sources */,
-				43D98C880A403AAB00E28AA2 /* ossimScalarTypeLut.cpp in Sources */,
-				43D98F3C0A403AAB00E28AA2 /* ossimScaleFilter.cpp in Sources */,
-				43D990D10A403AAC00E28AA2 /* ossimSensorModel.cpp in Sources */,
-				43D990D30A403AAC00E28AA2 /* ossimSensorModelFactory.cpp in Sources */,
-				EE3F66F20AF7D8F3000507C9 /* ossimSensorModelTuple.cpp in Sources */,
-				43D98C8A0A403AAB00E28AA2 /* ossimSevenParamDatum.cpp in Sources */,
-				43D98F380A403AAB00E28AA2 /* ossimSFIMFusion.cpp in Sources */,
-				43D990040A403AAB00E28AA2 /* ossimSharedObjectBridge.cpp in Sources */,
-				43D990060A403AAB00E28AA2 /* ossimSharedPluginRegistry.cpp in Sources */,
-				43D990D50A403AAC00E28AA2 /* ossimSinusoid.c in Sources */,
-				43D990D70A403AAC00E28AA2 /* ossimSinusoidalProjection.cpp in Sources */,
-				438DED7510B1811C00502C71 /* ossimSmacCallibrationSystem.cpp in Sources */,
-				43D98C8C0A403AAB00E28AA2 /* ossimSource.cpp in Sources */,
-				43D9924B0A403AAC00E28AA2 /* ossimSpaceImagingGeom.cpp in Sources */,
-				43D990D90A403AAC00E28AA2 /* ossimSpaceObliqueMercatorProjection.cpp in Sources */,
-				43D990DB0A403AAC00E28AA2 /* ossimSpot5Model.cpp in Sources */,
-				43D9924D0A403AAC00E28AA2 /* ossimSpotDimapSupportData.cpp in Sources */,
-				43D990DD0A403AAC00E28AA2 /* ossimSrsProjectionFactory.cpp in Sources */,
-				434E707210DA60D8005EBB18 /* ossimSrtmElevationDatabase.cpp in Sources */,
-				43D98CF20A403AAB00E28AA2 /* ossimSrtmFactory.cpp in Sources */,
-				43D9924F0A403AAC00E28AA2 /* ossimSrtmFilename.cpp in Sources */,
-				43D98CF40A403AAB00E28AA2 /* ossimSrtmHandler.cpp in Sources */,
-				43D992510A403AAC00E28AA2 /* ossimSrtmSupportData.cpp in Sources */,
-				43D98F3E0A403AAB00E28AA2 /* ossimSrtmTileSource.cpp in Sources */,
-				43D98C8E0A403AAB00E28AA2 /* ossimStateChangedEvent.cpp in Sources */,
-				43D990DF0A403AAC00E28AA2 /* ossimStatePlaneProjectionFactory.cpp in Sources */,
-				43D990E10A403AAC00E28AA2 /* ossimStatePlaneProjectionInfo.cpp in Sources */,
-				43D98C900A403AAB00E28AA2 /* ossimStdOutProgress.cpp in Sources */,
-				43D990E30A403AAC00E28AA2 /* ossimStereographicProjection.cpp in Sources */,
-				43D98C920A403AAB00E28AA2 /* ossimStreamBase.cpp in Sources */,
-				43D98C940A403AAB00E28AA2 /* ossimStreamFactory.cpp in Sources */,
-				43D98C960A403AAB00E28AA2 /* ossimStreamFactoryRegistry.cpp in Sources */,
-				43D98C980A403AAB00E28AA2 /* ossimString.cpp in Sources */,
-				43D98C9A0A403AAB00E28AA2 /* ossimStringListProperty.cpp in Sources */,
-				43D98C9C0A403AAB00E28AA2 /* ossimStringProperty.cpp in Sources */,
-				43D98F400A403AAB00E28AA2 /* ossimSubImageTileSource.cpp in Sources */,
-				43D98F420A403AAB00E28AA2 /* ossimTableRemapper.cpp in Sources */,
-				43D98C9E0A403AAB00E28AA2 /* ossimTDpt.cpp in Sources */,
-				43D98CA00A403AAB00E28AA2 /* ossimTempFilename.cpp in Sources */,
-				43D98CA20A403AAB00E28AA2 /* ossimTextProperty.cpp in Sources */,
-				43D98CA40A403AAB00E28AA2 /* ossimThreeParamDatum.cpp in Sources */,
-				43D98CA60A403AAB00E28AA2 /* ossimTieGpt.cpp in Sources */,
-				43D98CA80A403AAB00E28AA2 /* ossimTieGptSet.cpp in Sources */,
-				43D622670F7BC48200D93B8F /* ossimTiffInfo.cpp in Sources */,
-				43D98F440A403AAB00E28AA2 /* ossimTiffOverviewBuilder.cpp in Sources */,
-				43D990E50A403AAC00E28AA2 /* ossimTiffProjectionFactory.cpp in Sources */,
-				43D98F460A403AAB00E28AA2 /* ossimTiffTileSource.cpp in Sources */,
-				43D992530A403AAC00E28AA2 /* ossimTiffWorld.cpp in Sources */,
-				43D98F480A403AAB00E28AA2 /* ossimTiffWriter.cpp in Sources */,
-				43D98F4A0A403AAB00E28AA2 /* ossimTileCache.cpp in Sources */,
-				43D98CAC0A403AAB00E28AA2 /* ossimTiledImageHash.cpp in Sources */,
-				43D98CAA0A403AAB00E28AA2 /* ossimTileHash.cpp in Sources */,
-				43D98F4C0A403AAB00E28AA2 /* ossimTilePatch.cpp in Sources */,
-				43D98F4E0A403AAB00E28AA2 /* ossimTiling.cpp in Sources */,
-				434E65DD10D685A2005EBB18 /* ossimTimer.cpp in Sources */,
-				43D98F500A403AAB00E28AA2 /* ossimTopographicCorrectionFilter.cpp in Sources */,
-				43D98CAE0A403AAB00E28AA2 /* ossimTrace.cpp in Sources */,
-				43D98CB00A403AAB00E28AA2 /* ossimTraceManager.cpp in Sources */,
-				43D990E70A403AAC00E28AA2 /* ossimTranmerc.c in Sources */,
-				43D990E90A403AAC00E28AA2 /* ossimTransCylEquAreaProjection.cpp in Sources */,
-				43D990EB0A403AAC00E28AA2 /* ossimTransMercatorProjection.cpp in Sources */,
-				43D98F520A403AAB00E28AA2 /* ossimTrimFilter.cpp in Sources */,
-				EE7B58E20E3DEBC80039A805 /* ossimTwoColorView.cpp in Sources */,
-				43D98F540A403AAB00E28AA2 /* ossimU11ImageData.cpp in Sources */,
-				43D98F560A403AAB00E28AA2 /* ossimU16ImageData.cpp in Sources */,
-				43D98F580A403AAB00E28AA2 /* ossimU8ImageData.cpp in Sources */,
-				43D98CB20A403AAB00E28AA2 /* ossimUnitConversionTool.cpp in Sources */,
-				43D98CB40A403AAB00E28AA2 /* ossimUnitTypeLut.cpp in Sources */,
-				43D990ED0A403AAC00E28AA2 /* ossimUps.c in Sources */,
-				43D990EF0A403AAC00E28AA2 /* ossimUpsProjection.cpp in Sources */,
-				43D990F10A403AAC00E28AA2 /* ossimUpspt.cpp in Sources */,
-				43D98F5A0A403AAB00E28AA2 /* ossimUsgsDemTileSource.cpp in Sources */,
-				43D98CB60A403AAB00E28AA2 /* ossimUsgsQuad.cpp in Sources */,
-				43D990F30A403AAC00E28AA2 /* ossimUtm.c in Sources */,
-				43D990F50A403AAC00E28AA2 /* ossimUtmProjection.cpp in Sources */,
-				43D990F70A403AAC00E28AA2 /* ossimUtmpt.cpp in Sources */,
-				43D98F5C0A403AAB00E28AA2 /* ossimValueAssignImageSourceFilter.cpp in Sources */,
-				43D990F90A403AAC00E28AA2 /* ossimVanDerGrintenProjection.cpp in Sources */,
-				43D98F5E0A403AAB00E28AA2 /* ossimVectorRenderer.cpp in Sources */,
-				43D98F600A403AAB00E28AA2 /* ossimVertexExtractor.cpp in Sources */,
-				43D98CB80A403AAB00E28AA2 /* ossimViewController.cpp in Sources */,
-				43D98CBA0A403AAB00E28AA2 /* ossimViewEvent.cpp in Sources */,
-				43D98CBC0A403AAB00E28AA2 /* ossimViewInterface.cpp in Sources */,
-				43D98CBE0A403AAB00E28AA2 /* ossimViewListener.cpp in Sources */,
-				43D9C423109F445000BA9119 /* ossimVirtualImageHandler.cpp in Sources */,
-				43D9C421109F445000BA9119 /* ossimVirtualImageWriter.cpp in Sources */,
-				43D9C405109F443000BA9119 /* ossimVirtualOverviewBuilder.cpp in Sources */,
-				434E648D10D2BFEE005EBB18 /* ossimVirtualOverviewSequencer.cpp in Sources */,
-				43D98F620A403AAB00E28AA2 /* ossimVpfAnnotationCoverageInfo.cpp in Sources */,
-				43D98F640A403AAB00E28AA2 /* ossimVpfAnnotationFeatureInfo.cpp in Sources */,
-				43D98F660A403AAB00E28AA2 /* ossimVpfAnnotationLibraryInfo.cpp in Sources */,
-				43D98F680A403AAB00E28AA2 /* ossimVpfAnnotationSource.cpp in Sources */,
-				43D9926D0A403AAC00E28AA2 /* ossimVpfBoundingRecordTable.cpp in Sources */,
-				43D9926F0A403AAC00E28AA2 /* ossimVpfCoverage.cpp in Sources */,
-				43D992710A403AAC00E28AA2 /* ossimVpfDatabase.cpp in Sources */,
-				43D992730A403AAC00E28AA2 /* ossimVpfDatabaseHeader.cpp in Sources */,
-				43D992750A403AAC00E28AA2 /* ossimVpfDatabaseHeaderTableValidator.cpp in Sources */,
-				43D992770A403AAC00E28AA2 /* ossimVpfExtent.cpp in Sources */,
-				43D992790A403AAC00E28AA2 /* ossimVpfFeatureClass.cpp in Sources */,
-				43D9927B0A403AAC00E28AA2 /* ossimVpfFeatureClassSchema.cpp in Sources */,
-				43D9927D0A403AAC00E28AA2 /* ossimVpfLibrary.cpp in Sources */,
-				43D9927F0A403AAC00E28AA2 /* ossimVpfLibraryAttributeTableValidator.cpp in Sources */,
-				43D992810A403AAC00E28AA2 /* ossimVpfTable.cpp in Sources */,
-				43D98F6A0A403AAB00E28AA2 /* ossimVpfTileSource.cpp in Sources */,
-				43D98CC00A403AAB00E28AA2 /* ossimVrect.cpp in Sources */,
-				43D990FB0A403AAC00E28AA2 /* ossimWarpProjection.cpp in Sources */,
-				43D98F6C0A403AAB00E28AA2 /* ossimWatermarkFilter.cpp in Sources */,
-				43D98CC20A403AAB00E28AA2 /* ossimWgs72Datum.cpp in Sources */,
-				43D98CC40A403AAB00E28AA2 /* ossimWgs84Datum.cpp in Sources */,
-				EE6F82880BE674DA0090E263 /* ossimWms.cpp in Sources */,
-				43D98F6E0A403AAB00E28AA2 /* ossimWorldFileWriter.cpp in Sources */,
-				43D98CC60A403AAB00E28AA2 /* ossimXmlAttribute.cpp in Sources */,
-				43D98CC80A403AAB00E28AA2 /* ossimXmlDocument.cpp in Sources */,
-				43D98CCA0A403AAB00E28AA2 /* ossimXmlNode.cpp in Sources */,
-				43D98CCC0A403AAB00E28AA2 /* ossimXmlString.cpp in Sources */,
-				43D992A50A403AAC00E28AA2 /* polygrf.c in Sources */,
-				43D98F8E0A403AAB00E28AA2 /* record.cpp in Sources */,
-				43D98F900A403AAB00E28AA2 /* scanbeam.cpp in Sources */,
-				43D992A70A403AAC00E28AA2 /* set.c in Sources */,
-				43D98FDE0A403AAB00E28AA2 /* solution.cpp in Sources */,
-				43D98FE00A403AAB00E28AA2 /* sort.cpp in Sources */,
-				43D98FE20A403AAB00E28AA2 /* submat.cpp in Sources */,
-				43D98FE40A403AAB00E28AA2 /* svd.cpp in Sources */,
-				43D992A90A403AAC00E28AA2 /* vpfclip.c in Sources */,
-				43D992AB0A403AAC00E28AA2 /* vpfcntnt.c in Sources */,
-				43D992AD0A403AAC00E28AA2 /* vpfdict.c in Sources */,
-				43D992AF0A403AAC00E28AA2 /* vpfdisp.c in Sources */,
-				43D992B10A403AAC00E28AA2 /* vpfdraw.c in Sources */,
-				43D992B30A403AAC00E28AA2 /* vpfmisc.c in Sources */,
-				43D992B50A403AAC00E28AA2 /* vpfnear.c in Sources */,
-				43D992B70A403AAC00E28AA2 /* vpfprim.c in Sources */,
-				43D992B90A403AAC00E28AA2 /* vpfptply.c in Sources */,
-				43D992BB0A403AAC00E28AA2 /* vpfquery.c in Sources */,
-				43D992BD0A403AAC00E28AA2 /* vpfread.c in Sources */,
-				43D992BF0A403AAC00E28AA2 /* vpfrelat.c in Sources */,
-				43D992C10A403AAC00E28AA2 /* vpfselec.c in Sources */,
-				43D992C30A403AAC00E28AA2 /* vpfspx.c in Sources */,
-				43D992C50A403AAC00E28AA2 /* vpftable.c in Sources */,
-				43D992C70A403AAC00E28AA2 /* vpftidx.c in Sources */,
-				43D992C90A403AAC00E28AA2 /* vpfwrite.c in Sources */,
-				4369F75111204839002FA4B7 /* ossimSingleImageChain.cpp in Sources */,
-				43D3C5C31151A3DB000A60FB /* ossimQuickbirdMetaData.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXTargetDependency section */
-		186EFA900B1F3C7300F7886A /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 186EFA820B1F3C1500F7886A /* build_plugins */;
-			targetProxy = 186EFA8F0B1F3C7300F7886A /* PBXContainerItemProxy */;
-		};
-		4301322E104EE2F8009BF7EC /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = ossimplanetklv;
-			targetProxy = 4301322D104EE2F8009BF7EC /* PBXContainerItemProxy */;
-		};
-		4310B425110A0B0500C258B9 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = All;
-			targetProxy = 4310B424110A0B0500C258B9 /* PBXContainerItemProxy */;
-		};
-		4310B427110A0B1700C258B9 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 43081DB20BD3BE67001238BA /* setup_links */;
-			targetProxy = 4310B426110A0B1700C258B9 /* PBXContainerItemProxy */;
-		};
-		4310B429110A0B3100C258B9 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = EE05E7AC0E24FF02005A64BC /* build_core_frameworks */;
-			targetProxy = 4310B428110A0B3100C258B9 /* PBXContainerItemProxy */;
-		};
-		4310B42B110A0B5A00C258B9 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = ossimQt;
-			targetProxy = 4310B42A110A0B5A00C258B9 /* PBXContainerItemProxy */;
-		};
-		4310B42D110A0B7200C258B9 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = iView;
-			targetProxy = 4310B42C110A0B7200C258B9 /* PBXContainerItemProxy */;
-		};
-		4310B42F110A0B7200C258B9 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = ImageLinker;
-			targetProxy = 4310B42E110A0B7200C258B9 /* PBXContainerItemProxy */;
-		};
-		4332DE0D113FEBA800F7059B /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = All;
-			targetProxy = 4332DE0C113FEBA800F7059B /* PBXContainerItemProxy */;
-		};
-		433627F91042E368002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 433627FA1042E368002A87C7 /* PBXContainerItemProxy */;
-		};
-		4336280C1042E3B0002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 4336280D1042E3B0002A87C7 /* PBXContainerItemProxy */;
-		};
-		4336282E1042E3F6002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 4336282F1042E3F6002A87C7 /* PBXContainerItemProxy */;
-		};
-		4336284C1042E461002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 4336284D1042E461002A87C7 /* PBXContainerItemProxy */;
-		};
-		4336286B1042E4AC002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 4336286C1042E4AC002A87C7 /* PBXContainerItemProxy */;
-		};
-		4336287D1042E4D1002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 4336287E1042E4D1002A87C7 /* PBXContainerItemProxy */;
-		};
-		433628961042E52A002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 433628971042E52A002A87C7 /* PBXContainerItemProxy */;
-		};
-		433628B01042E560002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 433628B11042E560002A87C7 /* PBXContainerItemProxy */;
-		};
-		433628CD1042E59C002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 433628CE1042E59C002A87C7 /* PBXContainerItemProxy */;
-		};
-		433628E81042E5D1002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 433628E91042E5D1002A87C7 /* PBXContainerItemProxy */;
-		};
-		433629021042E607002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 433629031042E607002A87C7 /* PBXContainerItemProxy */;
-		};
-		433629781042E712002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 433629791042E712002A87C7 /* PBXContainerItemProxy */;
-		};
-		433629941042E759002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 433629951042E759002A87C7 /* PBXContainerItemProxy */;
-		};
-		433629AC1042E77C002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 433629AD1042E77C002A87C7 /* PBXContainerItemProxy */;
-		};
-		433629C71042E7B1002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 433629C81042E7B1002A87C7 /* PBXContainerItemProxy */;
-		};
-		433629DB1042E807002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 433629DC1042E807002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362A241042E88F002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 43362A251042E88F002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362A421042E8BD002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 43362A431042E8BD002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362A5A1042E8EE002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 43362A5B1042E8EE002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362A741042E914002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 43362A751042E914002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362A911042E955002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 43362A921042E955002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362AAB1042E981002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 43362AAC1042E981002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362AC91042EA43002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 43362ACA1042EA43002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362AE61042EA81002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 43362AE71042EA81002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362B3E1042EB45002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 43362B3F1042EB45002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362B5B1042EB70002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 43362B5C1042EB70002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362B771042EB9B002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 43362B781042EB9B002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362B921042EBCE002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 43362B931042EBCE002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362BC91042EC26002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 43362BCA1042EC26002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362BE51042EC50002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 43362BE61042EC50002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362BFF1042EC80002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 43362C001042EC80002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C191042ECAF002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 43362C1A1042ECAF002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C331042ECD6002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = 43362C341042ECD6002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C521042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 4336280B1042E3B0002A87C7 /* ossim-adrg-dump */;
-			targetProxy = 43362C511042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C541042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 4336282D1042E3F6002A87C7 /* ossim-applanix2ogeom */;
-			targetProxy = 43362C531042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C561042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 4336284B1042E461002A87C7 /* ossim-band-merge */;
-			targetProxy = 43362C551042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C581042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 4336286A1042E4AC002A87C7 /* ossim-btoa */;
-			targetProxy = 43362C571042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C5A1042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 4336287C1042E4D1002A87C7 /* ossim-chgkwval */;
-			targetProxy = 43362C591042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C5C1042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 433628951042E52A002A87C7 /* ossim-cmm */;
-			targetProxy = 43362C5B1042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C5E1042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 433628AF1042E560002A87C7 /* ossim-computeSrtmStats */;
-			targetProxy = 43362C5D1042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C601042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 433628CC1042E59C002A87C7 /* ossim-correl */;
-			targetProxy = 43362C5F1042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C621042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 433628E71042E5D1002A87C7 /* ossim-create-cg */;
-			targetProxy = 43362C611042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C641042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 433629011042E607002A87C7 /* ossim-create-histo */;
-			targetProxy = 43362C631042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C6C1042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 433629771042E712002A87C7 /* ossim-dms2deg */;
-			targetProxy = 43362C6B1042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C6E1042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 433629931042E759002A87C7 /* ossim-dump-ocg */;
-			targetProxy = 43362C6D1042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C701042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 433629AB1042E77C002A87C7 /* ossim-ecg2ocg */;
-			targetProxy = 43362C6F1042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C721042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 433629C61042E7B1002A87C7 /* ossim-extract-vertices */;
-			targetProxy = 43362C711042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C781042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 43362A231042E88F002A87C7 /* ossim-height */;
-			targetProxy = 43362C771042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C7A1042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 43362A411042E8BD002A87C7 /* ossim-icp */;
-			targetProxy = 43362C791042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C7C1042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 43362A591042E8EE002A87C7 /* ossim-igen */;
-			targetProxy = 43362C7B1042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C7E1042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 43362A731042E914002A87C7 /* ossim-img2md */;
-			targetProxy = 43362C7D1042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C801042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 43362A901042E955002A87C7 /* ossim-img2rr */;
-			targetProxy = 43362C7F1042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C821042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 43362AAA1042E981002A87C7 /* ossim-info */;
-			targetProxy = 43362C811042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C841042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 43362AC81042EA43002A87C7 /* ossim-modopt */;
-			targetProxy = 43362C831042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C861042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 43362AE51042EA81002A87C7 /* ossim-mosaic */;
-			targetProxy = 43362C851042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C8C1042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 43362B3D1042EB45002A87C7 /* ossim-ogeom2ogeom */;
-			targetProxy = 43362C8B1042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C8E1042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 43362B5A1042EB70002A87C7 /* ossim-orthoigen */;
-			targetProxy = 43362C8D1042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C901042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 43362B761042EB9B002A87C7 /* ossim-pixelflip */;
-			targetProxy = 43362C8F1042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C921042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 43362B911042EBCE002A87C7 /* ossim-prune */;
-			targetProxy = 43362C911042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C961042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 43362BC81042EC26002A87C7 /* ossim-rejout */;
-			targetProxy = 43362C951042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C981042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 43362BE41042EC50002A87C7 /* ossim-senint */;
-			targetProxy = 43362C971042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C9A1042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 43362BFE1042EC80002A87C7 /* ossim-space-imaging */;
-			targetProxy = 43362C991042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C9C1042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 43362C181042ECAF002A87C7 /* ossim-swapbytes */;
-			targetProxy = 43362C9B1042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		43362C9E1042ED14002A87C7 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 43362C321042ECD6002A87C7 /* ossim-tfw2ogeom */;
-			targetProxy = 43362C9D1042ED14002A87C7 /* PBXContainerItemProxy */;
-		};
-		4370FD6F0A41005D00931C4B /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 1F33AE1108DC88FA003F541C /* build_gui_frameworks */;
-			targetProxy = 4370FD6E0A41005D00931C4B /* PBXContainerItemProxy */;
-		};
-		4370FD710A41006500931C4B /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 1FF5F59D08D3AB960022B290 /* ossim Apps */;
-			targetProxy = 4370FD700A41006500931C4B /* PBXContainerItemProxy */;
-		};
-		4391B889111214D900B5895E /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 4370FD6D0A41004900931C4B /* All */;
-			targetProxy = 4391B888111214D900B5895E /* PBXContainerItemProxy */;
-		};
-		439E0B3A0FF4F73000C02785 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = ossimPlanet;
-			targetProxy = 439E0B390FF4F73000C02785 /* PBXContainerItemProxy */;
-		};
-		43D045350E546D4B0010BCCA /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = oms;
-			targetProxy = 43D045340E546D4B0010BCCA /* PBXContainerItemProxy */;
-		};
-		43D50378110A06C800FDB366 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = ossimplanet;
-			targetProxy = 43D50377110A06C800FDB366 /* PBXContainerItemProxy */;
-		};
-		43D5037A110A06D700FDB366 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = ossimPlanetQt;
-			targetProxy = 43D50379110A06D700FDB366 /* PBXContainerItemProxy */;
-		};
-		43DED93B0EA78A050090F402 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 431472450CBE539A00EAADAB /* ossimVersion */;
-			targetProxy = 43DED93A0EA78A050090F402 /* PBXContainerItemProxy */;
-		};
-		EE05E7B60E24FF31005A64BC /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = wms;
-			targetProxy = EE05E7B50E24FF31005A64BC /* PBXContainerItemProxy */;
-		};
-		EE05E7B80E24FF4A005A64BC /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 8D07F2BC0486CC7A007CD1D0 /* ossim */;
-			targetProxy = EE05E7B70E24FF4A005A64BC /* PBXContainerItemProxy */;
-		};
-		EE05E7BC0E24FF5D005A64BC /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = ossimPredator;
-			targetProxy = EE05E7BB0E24FF5D005A64BC /* PBXContainerItemProxy */;
-		};
-		EEAE9B610DBE0646000E8D8F /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 4370FD6D0A41004900931C4B /* All */;
-			targetProxy = EEAE9B620DBE0646000E8D8F /* PBXContainerItemProxy */;
-		};
-		EEE46ACE0E68823800EFF475 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = EEE46AB80E6881AA00EFF475 /* GUI Apps */;
-			targetProxy = EEE46ACD0E68823800EFF475 /* PBXContainerItemProxy */;
-		};
-/* End PBXTargetDependency section */
-
-/* Begin PBXVariantGroup section */
-		089C1666FE841158C02AAC07 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				089C1667FE841158C02AAC07 /* English */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		186EFA8D0B1F3C5500F7886A /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				PRODUCT_NAME = build_plugins;
-			};
-			name = Debug;
-		};
-		186EFA8E0B1F3C5500F7886A /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = YES;
-				GCC_ENABLE_FIX_AND_CONTINUE = NO;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				PRODUCT_NAME = build_plugins;
-				ZERO_LINK = NO;
-			};
-			name = Release;
-		};
-		1F33AE1D08DC892C003F541C /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PRODUCT_NAME = build_ossim_framework;
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		1F33AE1E08DC892C003F541C /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = YES;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PRODUCT_NAME = build_ossim_framework;
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		1FC5981008CB6539002B3E06 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				FRAMEWORK_VERSION = A;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_FIX_AND_CONTINUE = YES;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = "";
-				GCC_OPTIMIZATION_LEVEL = s;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = ossim_Prefix.pch;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"_FILE_OFFSET_BITS=64",
-					_LARGE_FILES,
-				);
-				HEADER_SEARCH_PATHS = (
-					$SRCROOT/../../include,
-					"$(UNIV_HEADER_DEP)",
-				);
-				INFOPLIST_FILE = "Resources/ossim-Info.plist";
-				INSTALL_PATH = "@executable_path/../Frameworks";
-				LIBRARY_SEARCH_PATHS = "$(UNIV_STATICLIB_DEP)";
-				LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)\"";
-				LIBRARY_SEARCH_PATHS_QUOTED_2 = "\"$(SYSTEM_LIBRARY_DIR)/CoreServices/Encodings\"";
-				LIBRARY_STYLE = DYNAMIC;
-				MACH_O_TYPE = mh_dylib;
-				OTHER_CFLAGS = "-Wno-long-double";
-				OTHER_LDFLAGS = (
-					"$(UNIV_STATICLIB_DEP)/libgeotiff.a",
-					"$(UNIV_STATICLIB_DEP)/libtiff.a",
-					"$(UNIV_STATICLIB_DEP)/libjpeg.a",
-					"$(UNIV_STATICLIB_DEP)/libfreetype.a",
-					"-lz",
-				);
-				PRODUCT_NAME = ossim;
-				SKIP_INSTALL = NO;
-				STRIP_INSTALLED_PRODUCT = NO;
-				WRAPPER_EXTENSION = framework;
-				ZERO_LINK = YES;
-			};
-			name = Debug;
-		};
-		1FC5981108CB6539002B3E06 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				FRAMEWORK_VERSION = A;
-				GCC_ENABLE_FIX_AND_CONTINUE = YES;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = "";
-				GCC_OPTIMIZATION_LEVEL = 3;
-				GCC_PRECOMPILE_PREFIX_HEADER = NO;
-				GCC_PREFIX_HEADER = "";
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"_FILE_OFFSET_BITS=64",
-					_LARGE_FILES,
-				);
-				GCC_VERSION = "$(inherited)";
-				HEADER_SEARCH_PATHS = (
-					$SRCROOT/../../include,
-					"$(UNIV_HEADER_DEP)",
-				);
-				INFOPLIST_FILE = "Resources/ossim-Info.plist";
-				INSTALL_PATH = "@executable_path/../Frameworks";
-				LIBRARY_SEARCH_PATHS = "$(UNIV_STATICLIB_DEP)";
-				LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)\"";
-				LIBRARY_SEARCH_PATHS_QUOTED_2 = "\"$(SYSTEM_LIBRARY_DIR)/CoreServices/Encodings\"";
-				LIBRARY_STYLE = DYNAMIC;
-				MACH_O_TYPE = mh_dylib;
-				OTHER_CFLAGS = (
-					"-g",
-					"-D_REENTRANT",
-				);
-				OTHER_LDFLAGS = (
-					"-lz",
-					"-mt",
-				);
-				PRODUCT_NAME = ossim;
-				SKIP_INSTALL = NO;
-				STRIP_INSTALLED_PRODUCT = NO;
-				WRAPPER_EXTENSION = framework;
-				ZERO_LINK = NO;
-			};
-			name = Release;
-		};
-		1FC5981408CB6539002B3E06 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			baseConfigurationReference = 1886E0570B1B9F9B00D0E4E6 /* common_settings.xcconfig */;
-			buildSettings = {
-				ARCHS = "$(NATIVE_ARCH)";
-				GCC_MODEL_TUNING = "";
-				HEADER_SEARCH_PATHS = (
-					$SRCROOT/../../include,
-					"$(UNIV_HEADER_DEP)",
-				);
-				INSTALL_PATH = "@loader_path/../Frameworks";
-				LIBRARY_SEARCH_PATHS = "$(UNIV_STATICLIB_DEP)";
-				MACOSX_DEPLOYMENT_TARGET = "";
-				REZ_SEARCH_PATHS = (
-					"$(OSSIM_HOME_PATH)/xcode/ossim/Resources",
-					"$(REZ_SEARCH_PATHS)/**",
-				);
-				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
-				USER_HEADER_SEARCH_PATHS = "";
-				WARNING_CFLAGS = "-Wall";
-			};
-			name = Debug;
-		};
-		1FC5981508CB6539002B3E06 /* Release */ = {
-			isa = XCBuildConfiguration;
-			baseConfigurationReference = 1886E0570B1B9F9B00D0E4E6 /* common_settings.xcconfig */;
-			buildSettings = {
-				ARCHS = (
-					x86_64,
-					i386,
-				);
-				DYLIB_COMPATIBILITY_VERSION = "$(OSSIM_VERSION_COMPATIBILITY_NUMBER)";
-				DYLIB_CURRENT_VERSION = "$(OSSIM_VERSION_NUMBER)";
-				FRAMEWORK_SEARCH_PATHS = "$(UNIV_DEP)/Frameworks";
-				GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
-				GCC_MODEL_TUNING = "";
-				GCC_OPTIMIZATION_LEVEL = 3;
-				GCC_VERSION = 4.2;
-				HEADER_SEARCH_PATHS = (
-					$SRCROOT/../../include,
-					"$(UNIV_HEADER_DEP)",
-				);
-				INSTALL_PATH = "";
-				LIBRARY_SEARCH_PATHS = "$(UNIV_STATICLIB_DEP)";
-				MACOSX_DEPLOYMENT_TARGET = 10.5;
-				OTHER_CFLAGS = "-g";
-				REZ_SEARCH_PATHS = (
-					"$(OSSIM_HOME_PATH)/xcode/ossim/Resources",
-					"$(REZ_SEARCH_PATHS)/**",
-				);
-				SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
-				STRIP_STYLE = "non-global";
-				USER_HEADER_SEARCH_PATHS = "";
-				WARNING_CFLAGS = "-Wall";
-			};
-			name = Release;
-		};
-		1FF5F5FB08D3ABAA0022B290 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PRODUCT_NAME = Command_Line;
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		1FF5F5FC08D3ABAA0022B290 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = YES;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PRODUCT_NAME = Command_Line;
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		43081DBC0BD3BEB8001238BA /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				PRODUCT_NAME = setup_links;
-			};
-			name = Debug;
-		};
-		43081DBD0BD3BEB8001238BA /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = YES;
-				GCC_ENABLE_FIX_AND_CONTINUE = NO;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				PRODUCT_NAME = setup_links;
-				ZERO_LINK = NO;
-			};
-			name = Release;
-		};
-		4314724C0CBE53D000EAADAB /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				PRODUCT_NAME = ossimVersion;
-			};
-			name = Debug;
-		};
-		4314724E0CBE53D000EAADAB /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = YES;
-				GCC_ENABLE_FIX_AND_CONTINUE = NO;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				PRODUCT_NAME = ossimVersion;
-				ZERO_LINK = NO;
-			};
-			name = Release;
-		};
-		433628011042E368002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "template-app";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		433628021042E368002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "template-app";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		433628131042E3B0002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-adrg-dump";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		433628141042E3B0002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-adrg-dump";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		433628351042E3F6002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-applanix2ogeom";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		433628361042E3F6002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-applanix2ogeom";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		433628531042E461002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-band-merge";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		433628541042E461002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-band-merge";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		433628721042E4AC002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-btoa";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		433628731042E4AC002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-btoa";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		433628841042E4D1002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "template-app";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		433628851042E4D1002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "template-app";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		4336289D1042E52A002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-cmm";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		4336289E1042E52A002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-cmm";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		433628B71042E560002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-computeSrtmStats";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		433628B81042E560002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-computeSrtmStats";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		433628D41042E59C002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-correl";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		433628D51042E59C002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-correl";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		433628EF1042E5D1002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-create-cg";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		433628F01042E5D1002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-create-cg";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		433629091042E607002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-create-histo";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		4336290A1042E607002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-create-histo";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		4336297F1042E712002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-dms2deg";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		433629801042E712002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-dms2deg";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		4336299B1042E759002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-dump-ocg";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		4336299C1042E759002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-dump-ocg";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		433629B31042E77C002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-ecg2ocg";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		433629B41042E77C002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-ecg2ocg";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		433629CE1042E7B1002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-extract-vertices";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		433629CF1042E7B1002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-extract-vertices";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		433629E21042E807002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-foo";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		433629E31042E807002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-foo";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		43362A2B1042E88F002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-height";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		43362A2C1042E88F002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-height";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		43362A491042E8BD002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-icp";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		43362A4A1042E8BD002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-icp";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		43362A611042E8EE002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-igen";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		43362A621042E8EE002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-igen";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		43362A7B1042E914002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-img2md";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		43362A7C1042E914002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-img2md";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		43362A981042E955002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-img2rr";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		43362A991042E955002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-img2rr";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		43362AB21042E981002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-info";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		43362AB31042E981002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-info";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		43362AD01042EA43002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-modopt";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		43362AD11042EA43002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-modopt";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		43362AED1042EA81002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-mosaic";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		43362AEE1042EA81002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-mosaic";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		43362B451042EB45002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-ogeom2ogeom";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		43362B461042EB45002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-ogeom2ogeom";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		43362B621042EB70002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-orthoigen";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		43362B631042EB70002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-orthoigen";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		43362B7E1042EB9B002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-pixelflip";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		43362B7F1042EB9B002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-pixelflip";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		43362B991042EBCE002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-prune";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		43362B9A1042EBCE002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-prune";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		43362BD01042EC26002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-rejout";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		43362BD11042EC26002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-rejout";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		43362BEC1042EC50002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-senint";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		43362BED1042EC50002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-senint";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		43362C061042EC80002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-space-imaging";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		43362C071042EC80002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-space-imaging";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		43362C201042ECAF002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-swapbytes";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		43362C211042ECAF002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-swapbytes";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		43362C3A1042ECD6002A87C7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-tfw2ogeom";
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Debug;
-		};
-		43362C3B1042ECD6002A87C7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(inherited)";
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
-				);
-				FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../../../ossim_dependencies/Frameworks\"";
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = __OSSIM_DARWIN__;
-				INSTALL_PATH = "$(HOME)/bin";
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PREBINDING = NO;
-				PRODUCT_NAME = "ossim-tfw2ogeom";
-				SECTORDER_FLAGS = "";
-				USE_HEADERMAP = NO;
-				WARNING_CFLAGS = (
-					"-Wmost",
-					"-Wno-four-char-constants",
-					"-Wno-unknown-pragmas",
-				);
-			};
-			name = Release;
-		};
-		4368514A0BD550AA002EBFEA /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				PRODUCT_NAME = ossimplanet_bundle;
-			};
-			name = Debug;
-		};
-		4368514B0BD550AA002EBFEA /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = YES;
-				GCC_ENABLE_FIX_AND_CONTINUE = NO;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				PRODUCT_NAME = ossimplanet_bundle;
-				ZERO_LINK = NO;
-			};
-			name = Release;
-		};
-		4370FD790A4100A400931C4B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				PRODUCT_NAME = All;
-			};
-			name = Debug;
-		};
-		4370FD7A0A4100A400931C4B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = YES;
-				GCC_ENABLE_FIX_AND_CONTINUE = NO;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				PRODUCT_NAME = All;
-				ZERO_LINK = NO;
-			};
-			name = Release;
-		};
-		43CD6CA00A5179EB007A4FB1 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				PRODUCT_NAME = build_package_dir;
-			};
-			name = Debug;
-		};
-		43CD6CA10A5179EB007A4FB1 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = YES;
-				GCC_ENABLE_FIX_AND_CONTINUE = NO;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				PRODUCT_NAME = build_package_dir;
-				ZERO_LINK = NO;
-			};
-			name = Release;
-		};
-		EE05E7AD0E24FF03005A64BC /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				PRODUCT_NAME = core_frameworks;
-			};
-			name = Debug;
-		};
-		EE05E7B00E24FF03005A64BC /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = YES;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				GCC_ENABLE_FIX_AND_CONTINUE = NO;
-				PRODUCT_NAME = core_frameworks;
-				ZERO_LINK = NO;
-			};
-			name = Release;
-		};
-		EEAE9B650DBE0646000E8D8F /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				PRODUCT_NAME = ossimplanet_bundle;
-			};
-			name = Debug;
-		};
-		EEAE9B680DBE0646000E8D8F /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = YES;
-				GCC_ENABLE_FIX_AND_CONTINUE = NO;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				PRODUCT_NAME = ossimplanet_bundle;
-				ZERO_LINK = NO;
-			};
-			name = Release;
-		};
-		EEE46AB90E6881AA00EFF475 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				PRODUCT_NAME = "GUI Apps";
-			};
-			name = Debug;
-		};
-		EEE46ABC0E6881AA00EFF475 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = YES;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				GCC_ENABLE_FIX_AND_CONTINUE = NO;
-				PRODUCT_NAME = "GUI Apps";
-				ZERO_LINK = NO;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		186EFA8C0B1F3C5500F7886A /* Build configuration list for PBXAggregateTarget "build_plugins" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				186EFA8D0B1F3C5500F7886A /* Debug */,
-				186EFA8E0B1F3C5500F7886A /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		1F33AE1C08DC892C003F541C /* Build configuration list for PBXAggregateTarget "build_gui_frameworks" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				1F33AE1D08DC892C003F541C /* Debug */,
-				1F33AE1E08DC892C003F541C /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		1FC5980F08CB6539002B3E06 /* Build configuration list for PBXNativeTarget "ossim" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				1FC5981008CB6539002B3E06 /* Debug */,
-				1FC5981108CB6539002B3E06 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		1FC5981308CB6539002B3E06 /* Build configuration list for PBXProject "ossim" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				1FC5981408CB6539002B3E06 /* Debug */,
-				1FC5981508CB6539002B3E06 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		1FF5F5FA08D3ABAA0022B290 /* Build configuration list for PBXAggregateTarget "ossim Apps" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				1FF5F5FB08D3ABAA0022B290 /* Debug */,
-				1FF5F5FC08D3ABAA0022B290 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		43081DBB0BD3BEB8001238BA /* Build configuration list for PBXAggregateTarget "setup_links" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				43081DBC0BD3BEB8001238BA /* Debug */,
-				43081DBD0BD3BEB8001238BA /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		4314724B0CBE53D000EAADAB /* Build configuration list for PBXAggregateTarget "ossimVersion" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				4314724C0CBE53D000EAADAB /* Debug */,
-				4314724E0CBE53D000EAADAB /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		433628001042E368002A87C7 /* Build configuration list for PBXNativeTarget "template-app" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				433628011042E368002A87C7 /* Debug */,
-				433628021042E368002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		433628121042E3B0002A87C7 /* Build configuration list for PBXNativeTarget "ossim-adrg-dump" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				433628131042E3B0002A87C7 /* Debug */,
-				433628141042E3B0002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		433628341042E3F6002A87C7 /* Build configuration list for PBXNativeTarget "ossim-applanix2ogeom" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				433628351042E3F6002A87C7 /* Debug */,
-				433628361042E3F6002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		433628521042E461002A87C7 /* Build configuration list for PBXNativeTarget "ossim-band-merge" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				433628531042E461002A87C7 /* Debug */,
-				433628541042E461002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		433628711042E4AC002A87C7 /* Build configuration list for PBXNativeTarget "ossim-btoa" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				433628721042E4AC002A87C7 /* Debug */,
-				433628731042E4AC002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		433628831042E4D1002A87C7 /* Build configuration list for PBXNativeTarget "ossim-chgkwval" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				433628841042E4D1002A87C7 /* Debug */,
-				433628851042E4D1002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		4336289C1042E52A002A87C7 /* Build configuration list for PBXNativeTarget "ossim-cmm" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				4336289D1042E52A002A87C7 /* Debug */,
-				4336289E1042E52A002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		433628B61042E560002A87C7 /* Build configuration list for PBXNativeTarget "ossim-computeSrtmStats" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				433628B71042E560002A87C7 /* Debug */,
-				433628B81042E560002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		433628D31042E59C002A87C7 /* Build configuration list for PBXNativeTarget "ossim-correl" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				433628D41042E59C002A87C7 /* Debug */,
-				433628D51042E59C002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		433628EE1042E5D1002A87C7 /* Build configuration list for PBXNativeTarget "ossim-create-cg" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				433628EF1042E5D1002A87C7 /* Debug */,
-				433628F01042E5D1002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		433629081042E607002A87C7 /* Build configuration list for PBXNativeTarget "ossim-create-histo" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				433629091042E607002A87C7 /* Debug */,
-				4336290A1042E607002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		4336297E1042E712002A87C7 /* Build configuration list for PBXNativeTarget "ossim-dms2deg" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				4336297F1042E712002A87C7 /* Debug */,
-				433629801042E712002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		4336299A1042E759002A87C7 /* Build configuration list for PBXNativeTarget "ossim-dump-ocg" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				4336299B1042E759002A87C7 /* Debug */,
-				4336299C1042E759002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		433629B21042E77C002A87C7 /* Build configuration list for PBXNativeTarget "ossim-ecg2ocg" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				433629B31042E77C002A87C7 /* Debug */,
-				433629B41042E77C002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		433629CD1042E7B1002A87C7 /* Build configuration list for PBXNativeTarget "ossim-extract-vertices" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				433629CE1042E7B1002A87C7 /* Debug */,
-				433629CF1042E7B1002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		433629E11042E807002A87C7 /* Build configuration list for PBXNativeTarget "ossim-foo" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				433629E21042E807002A87C7 /* Debug */,
-				433629E31042E807002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		43362A2A1042E88F002A87C7 /* Build configuration list for PBXNativeTarget "ossim-height" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				43362A2B1042E88F002A87C7 /* Debug */,
-				43362A2C1042E88F002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		43362A481042E8BD002A87C7 /* Build configuration list for PBXNativeTarget "ossim-icp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				43362A491042E8BD002A87C7 /* Debug */,
-				43362A4A1042E8BD002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		43362A601042E8EE002A87C7 /* Build configuration list for PBXNativeTarget "ossim-igen" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				43362A611042E8EE002A87C7 /* Debug */,
-				43362A621042E8EE002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		43362A7A1042E914002A87C7 /* Build configuration list for PBXNativeTarget "ossim-img2md" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				43362A7B1042E914002A87C7 /* Debug */,
-				43362A7C1042E914002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		43362A971042E955002A87C7 /* Build configuration list for PBXNativeTarget "ossim-img2rr" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				43362A981042E955002A87C7 /* Debug */,
-				43362A991042E955002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		43362AB11042E981002A87C7 /* Build configuration list for PBXNativeTarget "ossim-info" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				43362AB21042E981002A87C7 /* Debug */,
-				43362AB31042E981002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		43362ACF1042EA43002A87C7 /* Build configuration list for PBXNativeTarget "ossim-modopt" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				43362AD01042EA43002A87C7 /* Debug */,
-				43362AD11042EA43002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		43362AEC1042EA81002A87C7 /* Build configuration list for PBXNativeTarget "ossim-mosaic" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				43362AED1042EA81002A87C7 /* Debug */,
-				43362AEE1042EA81002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		43362B441042EB45002A87C7 /* Build configuration list for PBXNativeTarget "ossim-ogeom2ogeom" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				43362B451042EB45002A87C7 /* Debug */,
-				43362B461042EB45002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		43362B611042EB70002A87C7 /* Build configuration list for PBXNativeTarget "ossim-orthoigen" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				43362B621042EB70002A87C7 /* Debug */,
-				43362B631042EB70002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		43362B7D1042EB9B002A87C7 /* Build configuration list for PBXNativeTarget "ossim-pixelflip" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				43362B7E1042EB9B002A87C7 /* Debug */,
-				43362B7F1042EB9B002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		43362B981042EBCE002A87C7 /* Build configuration list for PBXNativeTarget "ossim-prune" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				43362B991042EBCE002A87C7 /* Debug */,
-				43362B9A1042EBCE002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		43362BCF1042EC26002A87C7 /* Build configuration list for PBXNativeTarget "ossim-rejout" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				43362BD01042EC26002A87C7 /* Debug */,
-				43362BD11042EC26002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		43362BEB1042EC50002A87C7 /* Build configuration list for PBXNativeTarget "ossim-senint" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				43362BEC1042EC50002A87C7 /* Debug */,
-				43362BED1042EC50002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		43362C051042EC80002A87C7 /* Build configuration list for PBXNativeTarget "ossim-space-imaging" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				43362C061042EC80002A87C7 /* Debug */,
-				43362C071042EC80002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		43362C1F1042ECAF002A87C7 /* Build configuration list for PBXNativeTarget "ossim-swapbytes" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				43362C201042ECAF002A87C7 /* Debug */,
-				43362C211042ECAF002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		43362C391042ECD6002A87C7 /* Build configuration list for PBXNativeTarget "ossim-tfw2ogeom" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				43362C3A1042ECD6002A87C7 /* Debug */,
-				43362C3B1042ECD6002A87C7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		436851490BD550AA002EBFEA /* Build configuration list for PBXAggregateTarget "ossimplanet_bundle" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				4368514A0BD550AA002EBFEA /* Debug */,
-				4368514B0BD550AA002EBFEA /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		4370FD780A4100A400931C4B /* Build configuration list for PBXAggregateTarget "All" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				4370FD790A4100A400931C4B /* Debug */,
-				4370FD7A0A4100A400931C4B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		43CD6C9F0A5179EB007A4FB1 /* Build configuration list for PBXAggregateTarget "build_package_dir" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				43CD6CA00A5179EB007A4FB1 /* Debug */,
-				43CD6CA10A5179EB007A4FB1 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		EE05E7BF0E24FFB5005A64BC /* Build configuration list for PBXAggregateTarget "build_core_frameworks" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				EE05E7AD0E24FF03005A64BC /* Debug */,
-				EE05E7B00E24FF03005A64BC /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		EEAE9B640DBE0646000E8D8F /* Build configuration list for PBXAggregateTarget "imagelinker_bundle" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				EEAE9B650DBE0646000E8D8F /* Debug */,
-				EEAE9B680DBE0646000E8D8F /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-		EEE46ACC0E68820500EFF475 /* Build configuration list for PBXAggregateTarget "GUI Apps" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				EEE46AB90E6881AA00EFF475 /* Debug */,
-				EEE46ABC0E6881AA00EFF475 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
-}
diff --git a/xcode/ossim/ossim_Prefix.pch b/xcode/ossim/ossim_Prefix.pch
deleted file mode 100644
index c712670..0000000
--- a/xcode/ossim/ossim_Prefix.pch
+++ /dev/null
@@ -1,5 +0,0 @@
-//
-// Prefix header for all source files of the 'ossim' target in the 'ossim' project.
-//
-
-//#include <Carbon/Carbon.h>
diff --git a/xcode/ossim/ossimplanet2-Info.plist b/xcode/ossim/ossimplanet2-Info.plist
deleted file mode 100644
index 3ba93b5..0000000
--- a/xcode/ossim/ossimplanet2-Info.plist
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>${EXECUTABLE_NAME}</string>
-	<key>CFBundleIdentifier</key>
-	<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1</string>
-	<key>LSMinimumSystemVersion</key>
-	<string>${MACOSX_DEPLOYMENT_TARGET}</string>
-	<key>NSMainNibFile</key>
-	<string>MainMenu</string>
-	<key>NSPrincipalClass</key>
-	<string>NSApplication</string>
-</dict>
-</plist>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/ossim.git



More information about the Pkg-grass-devel mailing list